From c436a7c71f36ebe787f04fe98a114c2486a2c03b Mon Sep 17 00:00:00 2001 From: Tero Auralinna Date: Thu, 28 Dec 2017 19:02:23 +0200 Subject: [PATCH 0001/1100] Added Angular tutorial link --- index.html | 1 + 1 file changed, 1 insertion(+) diff --git a/index.html b/index.html index d606645687..9997e1cb73 100644 --- a/index.html +++ b/index.html @@ -198,6 +198,7 @@

Third-party tutorials

Several tutorials have been written by members of the community to help you integrate Prism into multiple different website types and configurations:

@@ -237,7 +236,7 @@

Credits

  • Special thanks to Golmote and Jannik Zschiesche for their contributions and for being amazing maintainers. Prism would not have been able to keep up without their help.
  • To Roman Komarov for his contributions, feedback and testing.
  • To Zachary Forrest for coming up with the name “Prism”
  • -
  • To stellarr for the spectrum background used on this page
  • +
  • To stellarr for the spectrum background used on this page
  • To Jason Hobbs for encouraging me to release this script as standalone
  • diff --git a/plugins/autolinker/index.html b/plugins/autolinker/index.html index d6200b5e34..74c79e829f 100644 --- a/plugins/autolinker/index.html +++ b/plugins/autolinker/index.html @@ -12,7 +12,7 @@ - + @@ -20,36 +20,36 @@

    Autolinker

    -

    Converts URLs and emails in code to clickable links. Parses Markdown links in comments.

    +

    Converts URLs and emails in code to clickable links. Parses Markdown links in comments.

    How to use

    URLs and emails will be linked automatically, you don’t need to do anything. To link some text inside a comment to a certain URL, - you may use the Markdown syntax: + you may use the Markdown syntax:

    [Text you want to see](http://url-goes-here.com)

    Examples

    - +

    JavaScript

    /**
      * Prism: Lightweight, robust, elegant syntax highlighting
      * MIT license http://www.opensource.org/licenses/mit-license.php/
    - * @author Lea Verou http://lea.verou.me 
    + * @author Lea Verou http://lea.verou.me
      * Reach Lea at fake@email.com (no, not really)
      * And this is [a Markdown link](http://prismjs.com). Sweet, huh?
      */
     var foo = 5;
     // And a single line comment http://google.com
    - +

    CSS

    @font-face {
     	src: url(http://lea.verou.me/logo.otf);
     	font-family: 'LeaVerou';
     }
    - +

    HTML

    <!-- Links in HTML, woo!
     Lea Verou http://lea.verou.me or, with Markdown, [Lea Verou](http://lea.verou.me) -->
    diff --git a/plugins/autoloader/index.html b/plugins/autoloader/index.html
    index bb18a63603..61412e41e4 100644
    --- a/plugins/autoloader/index.html
    +++ b/plugins/autoloader/index.html
    @@ -25,7 +25,7 @@
     
     
     
    -
    +
     
     
     
    diff --git a/plugins/command-line/index.html b/plugins/command-line/index.html
    index 0de8e3ab9e..4fc640e737 100644
    --- a/plugins/command-line/index.html
    +++ b/plugins/command-line/index.html
    @@ -12,7 +12,7 @@
     
     
     
    -
    +
     
     
     
    diff --git a/plugins/copy-to-clipboard/index.html b/plugins/copy-to-clipboard/index.html
    index abd5e57e4a..589964dd7e 100644
    --- a/plugins/copy-to-clipboard/index.html
    +++ b/plugins/copy-to-clipboard/index.html
    @@ -12,7 +12,7 @@
     	
     
     	
    -	
    +	
     
     
     
    diff --git a/plugins/custom-class/index.html b/plugins/custom-class/index.html
    index 81af18587d..68ba9d7570 100644
    --- a/plugins/custom-class/index.html
    +++ b/plugins/custom-class/index.html
    @@ -10,7 +10,7 @@
     
     
     
    -
    +
     
     
     
    diff --git a/plugins/data-uri-highlight/index.html b/plugins/data-uri-highlight/index.html
    index ac817e44b3..03d6021d8e 100644
    --- a/plugins/data-uri-highlight/index.html
    +++ b/plugins/data-uri-highlight/index.html
    @@ -12,7 +12,7 @@
     
     
     
    -
    +
     
     
     
    diff --git a/plugins/file-highlight/index.html b/plugins/file-highlight/index.html
    index 5154de1be9..448466513a 100644
    --- a/plugins/file-highlight/index.html
    +++ b/plugins/file-highlight/index.html
    @@ -12,7 +12,7 @@
     
     
     
    -
    +
     
     
     
    diff --git a/plugins/highlight-keywords/index.html b/plugins/highlight-keywords/index.html
    index a0e01aed28..5d22c6275b 100644
    --- a/plugins/highlight-keywords/index.html
    +++ b/plugins/highlight-keywords/index.html
    @@ -18,7 +18,7 @@
     	}
     
     
    -
    +
     
     
     
    diff --git a/plugins/index.html b/plugins/index.html
    index e0e6cf23ea..c873ce78ec 100644
    --- a/plugins/index.html
    +++ b/plugins/index.html
    @@ -12,7 +12,7 @@
     
     
     
    -
    +
     
     
     
    diff --git a/plugins/jsonp-highlight/index.html b/plugins/jsonp-highlight/index.html
    index d70d375e80..d99d654396 100644
    --- a/plugins/jsonp-highlight/index.html
    +++ b/plugins/jsonp-highlight/index.html
    @@ -11,7 +11,7 @@
     
     
     
    -
    +
     
     
     
    diff --git a/plugins/keep-markup/index.html b/plugins/keep-markup/index.html
    index 1eba471d86..287e817f7b 100644
    --- a/plugins/keep-markup/index.html
    +++ b/plugins/keep-markup/index.html
    @@ -25,7 +25,7 @@
     	
     
     	
    -	
    +	
     
     
     
    diff --git a/plugins/line-highlight/index.html b/plugins/line-highlight/index.html
    index 91eec0df0e..6efc16075f 100644
    --- a/plugins/line-highlight/index.html
    +++ b/plugins/line-highlight/index.html
    @@ -12,7 +12,7 @@
     
     
     
    -
    +
     
     
     
    diff --git a/plugins/line-numbers/index.html b/plugins/line-numbers/index.html
    index 145376277c..26e372901c 100644
    --- a/plugins/line-numbers/index.html
    +++ b/plugins/line-numbers/index.html
    @@ -12,7 +12,7 @@
     
     
     
    -
    +
     
     
     
    diff --git a/plugins/normalize-whitespace/index.html b/plugins/normalize-whitespace/index.html
    index afa129ce73..2e73ae7897 100644
    --- a/plugins/normalize-whitespace/index.html
    +++ b/plugins/normalize-whitespace/index.html
    @@ -24,7 +24,7 @@
     	
     
     	
    -	
    +	
     
     
     
    diff --git a/plugins/previewers/index.html b/plugins/previewers/index.html
    index 9f63d48947..25de46337c 100644
    --- a/plugins/previewers/index.html
    +++ b/plugins/previewers/index.html
    @@ -12,7 +12,7 @@
     	
     
     	
    -	
    +	
     
     
     
    diff --git a/plugins/remove-initial-line-feed/index.html b/plugins/remove-initial-line-feed/index.html
    index 3c05bbc31a..8a05ea1c9e 100644
    --- a/plugins/remove-initial-line-feed/index.html
    +++ b/plugins/remove-initial-line-feed/index.html
    @@ -11,7 +11,7 @@
     	
     
     	
    -	
    +	
     
     
     
    diff --git a/plugins/show-invisibles/index.html b/plugins/show-invisibles/index.html
    index 98c8719f88..2ec9a67ed0 100644
    --- a/plugins/show-invisibles/index.html
    +++ b/plugins/show-invisibles/index.html
    @@ -12,7 +12,7 @@
     
     
     
    -
    +
     
     
     
    diff --git a/plugins/show-language/index.html b/plugins/show-language/index.html
    index 9abad7fdad..98a0b17d65 100644
    --- a/plugins/show-language/index.html
    +++ b/plugins/show-language/index.html
    @@ -12,7 +12,7 @@
     
     
     
    -
    +
     
     
     
    diff --git a/plugins/toolbar/index.html b/plugins/toolbar/index.html
    index 64d8383098..14a836584d 100644
    --- a/plugins/toolbar/index.html
    +++ b/plugins/toolbar/index.html
    @@ -12,7 +12,7 @@
     	
     
     	
    -	
    +	
     
     
     
    diff --git a/plugins/unescaped-markup/index.html b/plugins/unescaped-markup/index.html
    index e2ed7e2707..881dcafc67 100644
    --- a/plugins/unescaped-markup/index.html
    +++ b/plugins/unescaped-markup/index.html
    @@ -13,7 +13,7 @@
     	
     
     	
    -	
    +	
     
     
     
    diff --git a/plugins/wpd/index.html b/plugins/wpd/index.html
    index 3714a7b244..e4f7bf7534 100644
    --- a/plugins/wpd/index.html
    +++ b/plugins/wpd/index.html
    @@ -12,7 +12,7 @@
     
     
     
    -
    +
     
     
     
    @@ -20,16 +20,16 @@
     	

    WebPlatform Docs

    -

    Makes tokens link to WebPlatform.org documentation. The links open in a new tab.

    +

    Makes tokens link to WebPlatform.org documentation. The links open in a new tab.

    How to use

    - +

    No setup required, just include the plugin in your download and you’re good to go!

    - +

    Tokens that currently link to documentation:

    - +
    • HTML, MathML and SVG tags
    • HTML, MathML and SVG non-namespaced attributes
    • @@ -38,20 +38,20 @@

      How to use

    • (Non-prefixed) CSS pseudo-classes
    • (Non-prefixed) CSS pseudo-elements (starting with ::)
    - +

    Beta: This plugin is still in beta. Please help make it better: Test it and report any false positives etc!

    Examples

    - +

    CSS

    
     	
    
    -	
    +
     	

    HTML

    
    -	
    +
     	

    SVG

    
     
    diff --git a/style.css b/style.css index 9e5a247d63..f3e3ad88fe 100644 --- a/style.css +++ b/style.css @@ -1,5 +1,5 @@ -@import url(http://fonts.googleapis.com/css?family=Questrial); -@import url(http://fonts.googleapis.com/css?family=Arvo); +@import url(https://fonts.googleapis.com/css?family=Questrial); +@import url(https://fonts.googleapis.com/css?family=Arvo); @font-face { src: url(http://lea.verou.me/logo.otf); @@ -9,7 +9,7 @@ /* Shared styles */ - + section h1, #features li strong, header h2, @@ -44,15 +44,15 @@ section h1 { section section h1 { font-size: 150%; } - + section h1 code { font-style: normal; } - + section h1 > a { text-decoration: none; } - + section h1 > a:before { content: '§'; position: absolute; @@ -62,7 +62,7 @@ section h1 { color: silver; text-shadow: 0 1px white; } - + section h1 > a:hover:before { color: black; background: #f1ad26; @@ -138,14 +138,14 @@ footer:before { } header { - + } header .intro, html.simple header { overflow: hidden; } - + header h1 { float: left; margin-right: 30px; @@ -155,12 +155,12 @@ header { text-transform: uppercase; letter-spacing: .25em; } - + header h2 { margin-top: .5em; color: #f1ad26; } - + header h1 a { text-decoration: none; } @@ -172,23 +172,23 @@ header { margin-bottom: .3em; border: 0; } - + header h2 { font-size: 300%; } - + header .intro p { margin: 0; font: 150%/1.4 Questrial, sans-serif; font-size: 150%; } - + #features { width: 66em; margin-top: 2em; font-size: 80%; } - + #features li { margin: 0 0 2em 0; list-style: none; @@ -196,11 +196,11 @@ header { width: 27em; vertical-align: top; } - + #features li:nth-child(odd) { margin-right: 5em; } - + #features li:before { content: '✓'; float: left; @@ -209,18 +209,18 @@ header { font-size: 400%; line-height: 1; } - + #features li strong { display: block; margin-bottom: .1em; font-size: 200%; - } - + } + header .download-button { float: right; margin: 0 0 .5em .5em; } - + #theme { position: relative; z-index: 1; @@ -230,7 +230,7 @@ header { text-transform: uppercase; letter-spacing: .2em; } - + #theme > p { position: absolute; left: 100%; @@ -238,7 +238,7 @@ header { transform-origin: top left; font-size: 130%; } - + #theme > label { position: relative; display: flex; @@ -253,7 +253,7 @@ header { font-size: 90%; padding: 0; } - + #theme > label:before { content: ''; position: absolute; @@ -262,20 +262,20 @@ header { border-radius: inherit; background: url(img/spectrum.png) fixed; } - + #theme > label:nth-of-type(n+2) { margin-top: -2.5em; } - + #theme > input:not(:checked) + label:hover { background: hsla(77, 80%, 60%, .5); } - + #theme > input { position: absolute; clip: rect(0,0,0,0); } - + #theme > input:checked + label { background: #7fab14; } @@ -351,11 +351,11 @@ footer { #toc h1 { font-size: 180%; } - + #toc li { list-style: none; } - + #logo:before { content: '☠'; float: right; @@ -383,7 +383,7 @@ footer { left: 50%; transform: translate(-50%, -50%); } - + label a.owner { margin: 0 .5em; } diff --git a/templates/footer.html b/templates/footer.html index 33fb061f05..b0e306a505 100644 --- a/templates/footer.html +++ b/templates/footer.html @@ -1,6 +1,6 @@ -

    Handcrafted with ♥, by Lea Verou, Golmote -& all these awesome people

    +

    Handcrafted with ♥, by Lea Verou, Golmote +& all these awesome people

    diff --git a/test-suite.html b/test-suite.html index ba54a91f00..a78fd8a7ba 100644 --- a/test-suite.html +++ b/test-suite.html @@ -10,7 +10,7 @@ - + diff --git a/test.html b/test.html index 63d46e12f7..be328a1450 100644 --- a/test.html +++ b/test.html @@ -55,7 +55,7 @@ - + From b94f01f14d9e9de124092c346efbac37108e85b2 Mon Sep 17 00:00:00 2001 From: Aaron Fay Date: Tue, 17 Apr 2018 13:17:09 -0600 Subject: [PATCH 0008/1100] Change reserved keyword reference (#1396) * change boolean keyword accessor in bash.min * change boolean keyword accessor in bash --- components/prism-bash.js | 2 +- components/prism-bash.min.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/components/prism-bash.js b/components/prism-bash.js index 09cf67d300..5093ffd9db 100644 --- a/components/prism-bash.js +++ b/components/prism-bash.js @@ -76,7 +76,7 @@ inside.string = Prism.languages.bash.string; inside['function'] = Prism.languages.bash['function']; inside.keyword = Prism.languages.bash.keyword; - inside.boolean = Prism.languages.bash.boolean; + inside['boolean'] = Prism.languages.bash['boolean']; inside.operator = Prism.languages.bash.operator; inside.punctuation = Prism.languages.bash.punctuation; diff --git a/components/prism-bash.min.js b/components/prism-bash.min.js index 46332cbf91..d824e45d3d 100644 --- a/components/prism-bash.min.js +++ b/components/prism-bash.min.js @@ -1 +1 @@ -!function(e){var t={variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--?|-=|\+\+?|\+=|!=?|~|\*\*?|\*=|\/=?|%=?|<<=?|>>=?|<=?|>=?|==?|&&?|&=|\^=?|\|\|?|\|=|\?|:/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\([^)]+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},/\$(?:[\w#?*!@]+|\{[^}]+\})/i]};e.languages.bash={shebang:{pattern:/^#!\s*\/bin\/bash|^#!\s*\/bin\/sh/,alias:"important"},comment:{pattern:/(^|[^"{\\])#.*/,lookbehind:!0},string:[{pattern:/((?:^|[^<])<<\s*)["']?(\w+?)["']?\s*\r?\n(?:[\s\S])*?\r?\n\2/,lookbehind:!0,greedy:!0,inside:t},{pattern:/(["'])(?:\\[\s\S]|\$\([^)]+\)|`[^`]+`|(?!\1)[^\\])*\1/,greedy:!0,inside:t}],variable:t.variable,"function":{pattern:/(^|[\s;|&])(?:alias|apropos|apt-get|aptitude|aspell|awk|basename|bash|bc|bg|builtin|bzip2|cal|cat|cd|cfdisk|chgrp|chmod|chown|chroot|chkconfig|cksum|clear|cmp|comm|command|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|du|egrep|eject|enable|env|ethtool|eval|exec|expand|expect|export|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|getopts|git|grep|groupadd|groupdel|groupmod|groups|gzip|hash|head|help|hg|history|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|jobs|join|kill|killall|less|link|ln|locate|logname|logout|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|make|man|mkdir|mkfifo|mkisofs|mknod|more|most|mount|mtools|mtr|mv|mmv|nano|netstat|nice|nl|nohup|notify-send|npm|nslookup|open|op|passwd|paste|pathchk|ping|pkill|popd|pr|printcap|printenv|printf|ps|pushd|pv|pwd|quota|quotacheck|quotactl|ram|rar|rcp|read|readarray|readonly|reboot|rename|renice|remsync|rev|rm|rmdir|rsync|screen|scp|sdiff|sed|seq|service|sftp|shift|shopt|shutdown|sleep|slocate|sort|source|split|ssh|stat|strace|su|sudo|sum|suspend|sync|tail|tar|tee|test|time|timeout|times|touch|top|traceroute|trap|tr|tsort|tty|type|ulimit|umask|umount|unalias|uname|unexpand|uniq|units|unrar|unshar|uptime|useradd|userdel|usermod|users|uuencode|uudecode|v|vdir|vi|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yes|zip)(?=$|[\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&])(?:let|:|\.|if|then|else|elif|fi|for|break|continue|while|in|case|function|select|do|done|until|echo|exit|return|set|declare)(?=$|[\s;|&])/,lookbehind:!0},"boolean":{pattern:/(^|[\s;|&])(?:true|false)(?=$|[\s;|&])/,lookbehind:!0},operator:/&&?|\|\|?|==?|!=?|<<>|<=?|>=?|=~/,punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];]/};var a=t.variable[1].inside;a.string=e.languages.bash.string,a["function"]=e.languages.bash["function"],a.keyword=e.languages.bash.keyword,a.boolean=e.languages.bash.boolean,a.operator=e.languages.bash.operator,a.punctuation=e.languages.bash.punctuation,e.languages.shell=e.languages.bash}(Prism); \ No newline at end of file +!function(e){var t={variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--?|-=|\+\+?|\+=|!=?|~|\*\*?|\*=|\/=?|%=?|<<=?|>>=?|<=?|>=?|==?|&&?|&=|\^=?|\|\|?|\|=|\?|:/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\([^)]+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},/\$(?:[\w#?*!@]+|\{[^}]+\})/i]};e.languages.bash={shebang:{pattern:/^#!\s*\/bin\/bash|^#!\s*\/bin\/sh/,alias:"important"},comment:{pattern:/(^|[^"{\\])#.*/,lookbehind:!0},string:[{pattern:/((?:^|[^<])<<\s*)["']?(\w+?)["']?\s*\r?\n(?:[\s\S])*?\r?\n\2/,lookbehind:!0,greedy:!0,inside:t},{pattern:/(["'])(?:\\[\s\S]|\$\([^)]+\)|`[^`]+`|(?!\1)[^\\])*\1/,greedy:!0,inside:t}],variable:t.variable,"function":{pattern:/(^|[\s;|&])(?:alias|apropos|apt-get|aptitude|aspell|awk|basename|bash|bc|bg|builtin|bzip2|cal|cat|cd|cfdisk|chgrp|chmod|chown|chroot|chkconfig|cksum|clear|cmp|comm|command|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|du|egrep|eject|enable|env|ethtool|eval|exec|expand|expect|export|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|getopts|git|grep|groupadd|groupdel|groupmod|groups|gzip|hash|head|help|hg|history|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|jobs|join|kill|killall|less|link|ln|locate|logname|logout|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|make|man|mkdir|mkfifo|mkisofs|mknod|more|most|mount|mtools|mtr|mv|mmv|nano|netstat|nice|nl|nohup|notify-send|npm|nslookup|open|op|passwd|paste|pathchk|ping|pkill|popd|pr|printcap|printenv|printf|ps|pushd|pv|pwd|quota|quotacheck|quotactl|ram|rar|rcp|read|readarray|readonly|reboot|rename|renice|remsync|rev|rm|rmdir|rsync|screen|scp|sdiff|sed|seq|service|sftp|shift|shopt|shutdown|sleep|slocate|sort|source|split|ssh|stat|strace|su|sudo|sum|suspend|sync|tail|tar|tee|test|time|timeout|times|touch|top|traceroute|trap|tr|tsort|tty|type|ulimit|umask|umount|unalias|uname|unexpand|uniq|units|unrar|unshar|uptime|useradd|userdel|usermod|users|uuencode|uudecode|v|vdir|vi|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yes|zip)(?=$|[\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&])(?:let|:|\.|if|then|else|elif|fi|for|break|continue|while|in|case|function|select|do|done|until|echo|exit|return|set|declare)(?=$|[\s;|&])/,lookbehind:!0},"boolean":{pattern:/(^|[\s;|&])(?:true|false)(?=$|[\s;|&])/,lookbehind:!0},operator:/&&?|\|\|?|==?|!=?|<<>|<=?|>=?|=~/,punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];]/};var a=t.variable[1].inside;a.string=e.languages.bash.string,a["function"]=e.languages.bash["function"],a.keyword=e.languages.bash.keyword,a['boolean']=e.languages.bash['boolean'],a.operator=e.languages.bash.operator,a.punctuation=e.languages.bash.punctuation,e.languages.shell=e.languages.bash}(Prism); From cd22499c363bcdc6a290b77d271516886dad130f Mon Sep 17 00:00:00 2001 From: Golmote Date: Tue, 17 Apr 2018 21:31:45 +0200 Subject: [PATCH 0009/1100] File Highlight: Fix issue causing the Download button to show up on every code blocks. --- .../file-highlight/prism-file-highlight.js | 25 +++++++++++-------- .../prism-file-highlight.min.js | 2 +- prism.js | 25 +++++++++++-------- 3 files changed, 31 insertions(+), 21 deletions(-) diff --git a/plugins/file-highlight/prism-file-highlight.js b/plugins/file-highlight/prism-file-highlight.js index a2deb65157..1f34abb00e 100644 --- a/plugins/file-highlight/prism-file-highlight.js +++ b/plugins/file-highlight/prism-file-highlight.js @@ -65,19 +65,24 @@ } }; - if (pre.hasAttribute('data-download-link') && Prism.plugins.toolbar) { - Prism.plugins.toolbar.registerButton('download-file', function () { - var a = document.createElement('a'); - a.textContent = pre.getAttribute('data-download-link-label') || 'Download'; - a.setAttribute('download', ''); - a.href = src; - return a; - }); - } - xhr.send(null); }); + if (Prism.plugins.toolbar) { + Prism.plugins.toolbar.registerButton('download-file', function (env) { + var pre = env.element.parentNode; + if (!pre || !/pre/i.test(pre.nodeName) || !pre.hasAttribute('data-src') || !pre.hasAttribute('data-download-link')) { + return; + } + var src = pre.getAttribute('data-src'); + var a = document.createElement('a'); + a.textContent = pre.getAttribute('data-download-link-label') || 'Download'; + a.setAttribute('download', ''); + a.href = src; + return a; + }); + } + }; document.addEventListener('DOMContentLoaded', self.Prism.fileHighlight); diff --git a/plugins/file-highlight/prism-file-highlight.min.js b/plugins/file-highlight/prism-file-highlight.min.js index 593de3e181..5faa78a867 100644 --- a/plugins/file-highlight/prism-file-highlight.min.js +++ b/plugins/file-highlight/prism-file-highlight.min.js @@ -1 +1 @@ -!function(){"undefined"!=typeof self&&self.Prism&&self.document&&document.querySelector&&(self.Prism.fileHighlight=function(){var t={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"};Array.prototype.slice.call(document.querySelectorAll("pre[data-src]")).forEach(function(e){for(var n,a=e.getAttribute("data-src"),o=e,r=/\blang(?:uage)?-(?!\*)([\w-]+)\b/i;o&&!r.test(o.className);)o=o.parentNode;if(o&&(n=(e.className.match(r)||[,""])[1]),!n){var s=(a.match(/\.(\w+)$/)||[,""])[1];n=t[s]||s}var l=document.createElement("code");l.className="language-"+n,e.textContent="",l.textContent="Loading…",e.appendChild(l);var i=new XMLHttpRequest;i.open("GET",a,!0),i.onreadystatechange=function(){4==i.readyState&&(i.status<400&&i.responseText?(l.textContent=i.responseText,Prism.highlightElement(l)):l.textContent=i.status>=400?"✖ Error "+i.status+" while fetching file: "+i.statusText:"✖ Error: File does not exist or is empty")},e.hasAttribute("data-download-link")&&Prism.plugins.toolbar&&Prism.plugins.toolbar.registerButton("download-file",function(){var t=document.createElement("a");return t.textContent=e.getAttribute("data-download-link-label")||"Download",t.setAttribute("download",""),t.href=a,t}),i.send(null)})},document.addEventListener("DOMContentLoaded",self.Prism.fileHighlight))}(); \ No newline at end of file +!function(){"undefined"!=typeof self&&self.Prism&&self.document&&document.querySelector&&(self.Prism.fileHighlight=function(){var t={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"};Array.prototype.slice.call(document.querySelectorAll("pre[data-src]")).forEach(function(e){for(var a,n=e.getAttribute("data-src"),r=e,o=/\blang(?:uage)?-(?!\*)([\w-]+)\b/i;r&&!o.test(r.className);)r=r.parentNode;if(r&&(a=(e.className.match(o)||[,""])[1]),!a){var s=(n.match(/\.(\w+)$/)||[,""])[1];a=t[s]||s}var l=document.createElement("code");l.className="language-"+a,e.textContent="",l.textContent="Loading…",e.appendChild(l);var i=new XMLHttpRequest;i.open("GET",n,!0),i.onreadystatechange=function(){4==i.readyState&&(i.status<400&&i.responseText?(l.textContent=i.responseText,Prism.highlightElement(l)):l.textContent=i.status>=400?"✖ Error "+i.status+" while fetching file: "+i.statusText:"✖ Error: File does not exist or is empty")},i.send(null)}),Prism.plugins.toolbar&&Prism.plugins.toolbar.registerButton("download-file",function(t){var e=t.element.parentNode;if(e&&/pre/i.test(e.nodeName)&&e.hasAttribute("data-src")&&e.hasAttribute("data-download-link")){var a=e.getAttribute("data-src"),n=document.createElement("a");return n.textContent=e.getAttribute("data-download-link-label")||"Download",n.setAttribute("download",""),n.href=a,n}})},document.addEventListener("DOMContentLoaded",self.Prism.fileHighlight))}(); \ No newline at end of file diff --git a/prism.js b/prism.js index c13b992eb7..ea00b09fd7 100644 --- a/prism.js +++ b/prism.js @@ -849,19 +849,24 @@ Prism.languages.js = Prism.languages.javascript; } }; - if (pre.hasAttribute('data-download-link') && Prism.plugins.toolbar) { - Prism.plugins.toolbar.registerButton('download-file', function () { - var a = document.createElement('a'); - a.textContent = pre.getAttribute('data-download-link-label') || 'Download'; - a.setAttribute('download', ''); - a.href = src; - return a; - }); - } - xhr.send(null); }); + if (Prism.plugins.toolbar) { + Prism.plugins.toolbar.registerButton('download-file', function (env) { + var pre = env.element.parentNode; + if (!pre || !/pre/i.test(pre.nodeName) || !pre.hasAttribute('data-src') || !pre.hasAttribute('data-download-link')) { + return; + } + var src = pre.getAttribute('data-src'); + var a = document.createElement('a'); + a.textContent = pre.getAttribute('data-download-link-label') || 'Download'; + a.setAttribute('download', ''); + a.href = src; + return a; + }); + } + }; document.addEventListener('DOMContentLoaded', self.Prism.fileHighlight); From ea3615e32c4d3410f30f48e4eb2bf73433254c53 Mon Sep 17 00:00:00 2001 From: Golmote Date: Tue, 17 Apr 2018 21:31:55 +0200 Subject: [PATCH 0010/1100] Run gulp --- components/prism-bash.min.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/prism-bash.min.js b/components/prism-bash.min.js index d824e45d3d..c468fafaa8 100644 --- a/components/prism-bash.min.js +++ b/components/prism-bash.min.js @@ -1 +1 @@ -!function(e){var t={variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--?|-=|\+\+?|\+=|!=?|~|\*\*?|\*=|\/=?|%=?|<<=?|>>=?|<=?|>=?|==?|&&?|&=|\^=?|\|\|?|\|=|\?|:/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\([^)]+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},/\$(?:[\w#?*!@]+|\{[^}]+\})/i]};e.languages.bash={shebang:{pattern:/^#!\s*\/bin\/bash|^#!\s*\/bin\/sh/,alias:"important"},comment:{pattern:/(^|[^"{\\])#.*/,lookbehind:!0},string:[{pattern:/((?:^|[^<])<<\s*)["']?(\w+?)["']?\s*\r?\n(?:[\s\S])*?\r?\n\2/,lookbehind:!0,greedy:!0,inside:t},{pattern:/(["'])(?:\\[\s\S]|\$\([^)]+\)|`[^`]+`|(?!\1)[^\\])*\1/,greedy:!0,inside:t}],variable:t.variable,"function":{pattern:/(^|[\s;|&])(?:alias|apropos|apt-get|aptitude|aspell|awk|basename|bash|bc|bg|builtin|bzip2|cal|cat|cd|cfdisk|chgrp|chmod|chown|chroot|chkconfig|cksum|clear|cmp|comm|command|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|du|egrep|eject|enable|env|ethtool|eval|exec|expand|expect|export|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|getopts|git|grep|groupadd|groupdel|groupmod|groups|gzip|hash|head|help|hg|history|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|jobs|join|kill|killall|less|link|ln|locate|logname|logout|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|make|man|mkdir|mkfifo|mkisofs|mknod|more|most|mount|mtools|mtr|mv|mmv|nano|netstat|nice|nl|nohup|notify-send|npm|nslookup|open|op|passwd|paste|pathchk|ping|pkill|popd|pr|printcap|printenv|printf|ps|pushd|pv|pwd|quota|quotacheck|quotactl|ram|rar|rcp|read|readarray|readonly|reboot|rename|renice|remsync|rev|rm|rmdir|rsync|screen|scp|sdiff|sed|seq|service|sftp|shift|shopt|shutdown|sleep|slocate|sort|source|split|ssh|stat|strace|su|sudo|sum|suspend|sync|tail|tar|tee|test|time|timeout|times|touch|top|traceroute|trap|tr|tsort|tty|type|ulimit|umask|umount|unalias|uname|unexpand|uniq|units|unrar|unshar|uptime|useradd|userdel|usermod|users|uuencode|uudecode|v|vdir|vi|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yes|zip)(?=$|[\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&])(?:let|:|\.|if|then|else|elif|fi|for|break|continue|while|in|case|function|select|do|done|until|echo|exit|return|set|declare)(?=$|[\s;|&])/,lookbehind:!0},"boolean":{pattern:/(^|[\s;|&])(?:true|false)(?=$|[\s;|&])/,lookbehind:!0},operator:/&&?|\|\|?|==?|!=?|<<>|<=?|>=?|=~/,punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];]/};var a=t.variable[1].inside;a.string=e.languages.bash.string,a["function"]=e.languages.bash["function"],a.keyword=e.languages.bash.keyword,a['boolean']=e.languages.bash['boolean'],a.operator=e.languages.bash.operator,a.punctuation=e.languages.bash.punctuation,e.languages.shell=e.languages.bash}(Prism); +!function(e){var t={variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--?|-=|\+\+?|\+=|!=?|~|\*\*?|\*=|\/=?|%=?|<<=?|>>=?|<=?|>=?|==?|&&?|&=|\^=?|\|\|?|\|=|\?|:/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\([^)]+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},/\$(?:[\w#?*!@]+|\{[^}]+\})/i]};e.languages.bash={shebang:{pattern:/^#!\s*\/bin\/bash|^#!\s*\/bin\/sh/,alias:"important"},comment:{pattern:/(^|[^"{\\])#.*/,lookbehind:!0},string:[{pattern:/((?:^|[^<])<<\s*)["']?(\w+?)["']?\s*\r?\n(?:[\s\S])*?\r?\n\2/,lookbehind:!0,greedy:!0,inside:t},{pattern:/(["'])(?:\\[\s\S]|\$\([^)]+\)|`[^`]+`|(?!\1)[^\\])*\1/,greedy:!0,inside:t}],variable:t.variable,"function":{pattern:/(^|[\s;|&])(?:alias|apropos|apt-get|aptitude|aspell|awk|basename|bash|bc|bg|builtin|bzip2|cal|cat|cd|cfdisk|chgrp|chmod|chown|chroot|chkconfig|cksum|clear|cmp|comm|command|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|du|egrep|eject|enable|env|ethtool|eval|exec|expand|expect|export|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|getopts|git|grep|groupadd|groupdel|groupmod|groups|gzip|hash|head|help|hg|history|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|jobs|join|kill|killall|less|link|ln|locate|logname|logout|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|make|man|mkdir|mkfifo|mkisofs|mknod|more|most|mount|mtools|mtr|mv|mmv|nano|netstat|nice|nl|nohup|notify-send|npm|nslookup|open|op|passwd|paste|pathchk|ping|pkill|popd|pr|printcap|printenv|printf|ps|pushd|pv|pwd|quota|quotacheck|quotactl|ram|rar|rcp|read|readarray|readonly|reboot|rename|renice|remsync|rev|rm|rmdir|rsync|screen|scp|sdiff|sed|seq|service|sftp|shift|shopt|shutdown|sleep|slocate|sort|source|split|ssh|stat|strace|su|sudo|sum|suspend|sync|tail|tar|tee|test|time|timeout|times|touch|top|traceroute|trap|tr|tsort|tty|type|ulimit|umask|umount|unalias|uname|unexpand|uniq|units|unrar|unshar|uptime|useradd|userdel|usermod|users|uuencode|uudecode|v|vdir|vi|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yes|zip)(?=$|[\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&])(?:let|:|\.|if|then|else|elif|fi|for|break|continue|while|in|case|function|select|do|done|until|echo|exit|return|set|declare)(?=$|[\s;|&])/,lookbehind:!0},"boolean":{pattern:/(^|[\s;|&])(?:true|false)(?=$|[\s;|&])/,lookbehind:!0},operator:/&&?|\|\|?|==?|!=?|<<>|<=?|>=?|=~/,punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];]/};var a=t.variable[1].inside;a.string=e.languages.bash.string,a["function"]=e.languages.bash["function"],a.keyword=e.languages.bash.keyword,a["boolean"]=e.languages.bash["boolean"],a.operator=e.languages.bash.operator,a.punctuation=e.languages.bash.punctuation,e.languages.shell=e.languages.bash}(Prism); \ No newline at end of file From d95f8fb48ed497790b1a50f5c177cb4e18542c26 Mon Sep 17 00:00:00 2001 From: Valtteri Laitinen Date: Sun, 22 Apr 2018 15:55:38 +0300 Subject: [PATCH 0011/1100] Use rel="icon" instead of rel="shortcut icon" (#1398) --- download.html | 2 +- examples.html | 2 +- extending.html | 2 +- faq.html | 2 +- index.html | 2 +- plugins/autolinker/index.html | 2 +- plugins/autoloader/index.html | 2 +- plugins/command-line/index.html | 2 +- plugins/copy-to-clipboard/index.html | 2 +- plugins/custom-class/index.html | 2 +- plugins/data-uri-highlight/index.html | 2 +- plugins/file-highlight/index.html | 2 +- plugins/highlight-keywords/index.html | 2 +- plugins/index.html | 2 +- plugins/jsonp-highlight/index.html | 2 +- plugins/keep-markup/index.html | 2 +- plugins/line-highlight/index.html | 2 +- plugins/line-numbers/index.html | 2 +- plugins/normalize-whitespace/index.html | 2 +- plugins/previewers/index.html | 2 +- plugins/remove-initial-line-feed/index.html | 2 +- plugins/show-invisibles/index.html | 2 +- plugins/show-language/index.html | 2 +- plugins/toolbar/index.html | 2 +- plugins/unescaped-markup/index.html | 6 +++--- plugins/wpd/index.html | 2 +- test-suite.html | 2 +- test.html | 2 +- 28 files changed, 30 insertions(+), 30 deletions(-) diff --git a/download.html b/download.html index a5b57be908..b6fd7abab4 100644 --- a/download.html +++ b/download.html @@ -3,7 +3,7 @@ - + Download ▲ Prism diff --git a/examples.html b/examples.html index ae3eb5b84c..b7dce551ce 100644 --- a/examples.html +++ b/examples.html @@ -3,7 +3,7 @@ - + Examples ▲ Prism diff --git a/extending.html b/extending.html index 4eb85f8196..11c647f787 100644 --- a/extending.html +++ b/extending.html @@ -3,7 +3,7 @@ - + Extending Prism ▲ Prism diff --git a/faq.html b/faq.html index 6e61de0a6e..ae32cb68e1 100644 --- a/faq.html +++ b/faq.html @@ -3,7 +3,7 @@ - + FAQ ▲ Prism diff --git a/index.html b/index.html index bbd1996e7f..b8f254d5cf 100644 --- a/index.html +++ b/index.html @@ -7,7 +7,7 @@ window.console && console.log('foo'); - + Prism diff --git a/plugins/autolinker/index.html b/plugins/autolinker/index.html index 74c79e829f..6053b62c02 100644 --- a/plugins/autolinker/index.html +++ b/plugins/autolinker/index.html @@ -3,7 +3,7 @@ - + Autolinker ▲ Prism plugins diff --git a/plugins/autoloader/index.html b/plugins/autoloader/index.html index 61412e41e4..3e5357e06b 100644 --- a/plugins/autoloader/index.html +++ b/plugins/autoloader/index.html @@ -3,7 +3,7 @@ - + Autoloader ▲ Prism plugins diff --git a/plugins/command-line/index.html b/plugins/command-line/index.html index 4fc640e737..109138b671 100644 --- a/plugins/command-line/index.html +++ b/plugins/command-line/index.html @@ -3,7 +3,7 @@ - + Command Line ▲ Prism plugins diff --git a/plugins/copy-to-clipboard/index.html b/plugins/copy-to-clipboard/index.html index 589964dd7e..c42a52620c 100644 --- a/plugins/copy-to-clipboard/index.html +++ b/plugins/copy-to-clipboard/index.html @@ -3,7 +3,7 @@ - + Copy to Clipboard ▲ Prism plugins diff --git a/plugins/custom-class/index.html b/plugins/custom-class/index.html index 68ba9d7570..ee4fade718 100644 --- a/plugins/custom-class/index.html +++ b/plugins/custom-class/index.html @@ -3,7 +3,7 @@ - + Custom Class ▲ Prism plugins diff --git a/plugins/data-uri-highlight/index.html b/plugins/data-uri-highlight/index.html index 03d6021d8e..380be2d67e 100644 --- a/plugins/data-uri-highlight/index.html +++ b/plugins/data-uri-highlight/index.html @@ -3,7 +3,7 @@ - + Data-URI Highlight ▲ Prism plugins diff --git a/plugins/file-highlight/index.html b/plugins/file-highlight/index.html index 448466513a..e66b9897ee 100644 --- a/plugins/file-highlight/index.html +++ b/plugins/file-highlight/index.html @@ -3,7 +3,7 @@ - + File Highlight ▲ Prism plugins diff --git a/plugins/highlight-keywords/index.html b/plugins/highlight-keywords/index.html index 5d22c6275b..466587346b 100644 --- a/plugins/highlight-keywords/index.html +++ b/plugins/highlight-keywords/index.html @@ -3,7 +3,7 @@ - + Highlight Keywords ▲ Prism plugins diff --git a/plugins/index.html b/plugins/index.html index c873ce78ec..7b4a48a7af 100644 --- a/plugins/index.html +++ b/plugins/index.html @@ -3,7 +3,7 @@ - + Plugins ▲ Prism diff --git a/plugins/jsonp-highlight/index.html b/plugins/jsonp-highlight/index.html index d99d654396..2ad4ac9a1f 100644 --- a/plugins/jsonp-highlight/index.html +++ b/plugins/jsonp-highlight/index.html @@ -3,7 +3,7 @@ - + JSONP Highlight ▲ Prism plugins diff --git a/plugins/keep-markup/index.html b/plugins/keep-markup/index.html index 287e817f7b..41b3c5f94d 100644 --- a/plugins/keep-markup/index.html +++ b/plugins/keep-markup/index.html @@ -3,7 +3,7 @@ - + Keep markup ▲ Prism plugins diff --git a/plugins/line-highlight/index.html b/plugins/line-highlight/index.html index 6efc16075f..f3b58b4b41 100644 --- a/plugins/line-highlight/index.html +++ b/plugins/line-highlight/index.html @@ -3,7 +3,7 @@ - + Line highlight ▲ Prism plugins diff --git a/plugins/line-numbers/index.html b/plugins/line-numbers/index.html index 26e372901c..5af756cae0 100644 --- a/plugins/line-numbers/index.html +++ b/plugins/line-numbers/index.html @@ -3,7 +3,7 @@ - + Line Numbers ▲ Prism plugins diff --git a/plugins/normalize-whitespace/index.html b/plugins/normalize-whitespace/index.html index 2e73ae7897..e1469de650 100644 --- a/plugins/normalize-whitespace/index.html +++ b/plugins/normalize-whitespace/index.html @@ -3,7 +3,7 @@ - + Normalize Whitespace ▲ Prism plugins diff --git a/plugins/previewers/index.html b/plugins/previewers/index.html index 25de46337c..539ef9876a 100644 --- a/plugins/previewers/index.html +++ b/plugins/previewers/index.html @@ -3,7 +3,7 @@ - + Previewers ▲ Prism plugins diff --git a/plugins/remove-initial-line-feed/index.html b/plugins/remove-initial-line-feed/index.html index 8a05ea1c9e..8eb942fa67 100644 --- a/plugins/remove-initial-line-feed/index.html +++ b/plugins/remove-initial-line-feed/index.html @@ -3,7 +3,7 @@ - + Remove initial line feed ▲ Prism plugins diff --git a/plugins/show-invisibles/index.html b/plugins/show-invisibles/index.html index 2ec9a67ed0..cb0ad436a4 100644 --- a/plugins/show-invisibles/index.html +++ b/plugins/show-invisibles/index.html @@ -3,7 +3,7 @@ - + Show Invisibles ▲ Prism plugins diff --git a/plugins/show-language/index.html b/plugins/show-language/index.html index 98a0b17d65..e79b1ccf9f 100644 --- a/plugins/show-language/index.html +++ b/plugins/show-language/index.html @@ -3,7 +3,7 @@ - + Show Language ▲ Prism plugins diff --git a/plugins/toolbar/index.html b/plugins/toolbar/index.html index 14a836584d..5547c5de85 100644 --- a/plugins/toolbar/index.html +++ b/plugins/toolbar/index.html @@ -3,7 +3,7 @@ - + Toolbar ▲ Prism plugins diff --git a/plugins/unescaped-markup/index.html b/plugins/unescaped-markup/index.html index 881dcafc67..442ef2aa9f 100644 --- a/plugins/unescaped-markup/index.html +++ b/plugins/unescaped-markup/index.html @@ -3,7 +3,7 @@ - + Unescaped markup ▲ Prism plugins @@ -51,7 +51,7 @@

    Examples

    - + Keep markup ▲ Prism plugins @@ -113,7 +113,7 @@

    FAQ

    - + Keep markup ▲ Prism plugins diff --git a/plugins/wpd/index.html b/plugins/wpd/index.html index e4f7bf7534..9157a483f0 100644 --- a/plugins/wpd/index.html +++ b/plugins/wpd/index.html @@ -3,7 +3,7 @@ - + WebPlatform Docs ▲ Prism plugins diff --git a/test-suite.html b/test-suite.html index a78fd8a7ba..5aeebf2aee 100644 --- a/test-suite.html +++ b/test-suite.html @@ -3,7 +3,7 @@ - + Running the test suite ▲ Prism diff --git a/test.html b/test.html index be328a1450..e28cce1dd9 100644 --- a/test.html +++ b/test.html @@ -3,7 +3,7 @@ - + Test drive ▲ Prism From db2d0ebb9a15dca195ea3bcaec876641f49f068f Mon Sep 17 00:00:00 2001 From: Golmote Date: Sun, 22 Apr 2018 15:12:28 +0200 Subject: [PATCH 0012/1100] JavaScript: Add support for one level of nesting inside template strings. Fix #1397 --- components/prism-javascript.js | 9 +++++---- components/prism-javascript.min.js | 2 +- examples/prism-javascript.html | 5 +---- prism.js | 9 +++++---- tests/languages/javascript/issue1397.test | 21 +++++++++++++++++++++ 5 files changed, 33 insertions(+), 13 deletions(-) create mode 100644 tests/languages/javascript/issue1397.test diff --git a/components/prism-javascript.js b/components/prism-javascript.js index 297550bfea..7800a7d424 100644 --- a/components/prism-javascript.js +++ b/components/prism-javascript.js @@ -22,23 +22,24 @@ Prism.languages.insertBefore('javascript', 'keyword', { Prism.languages.insertBefore('javascript', 'string', { 'template-string': { - pattern: /`(?:\\[\s\S]|[^\\`])*`/, + pattern: /`(?:\\[\s\S]|\${[^}]+}|[^\\`])*`/, greedy: true, inside: { 'interpolation': { - pattern: /\$\{[^}]+\}/, + pattern: /\${[^}]+}/, inside: { 'interpolation-punctuation': { - pattern: /^\$\{|\}$/, + pattern: /^\${|}$/, alias: 'punctuation' }, - rest: Prism.languages.javascript + rest: null // See below } }, 'string': /[\s\S]+/ } } }); +Prism.languages.javascript['template-string'].inside['interpolation'].inside.rest = Prism.languages.javascript; if (Prism.languages.markup) { Prism.languages.insertBefore('markup', 'tag', { diff --git a/components/prism-javascript.min.js b/components/prism-javascript.min.js index 2a1d504518..50a4d54f80 100644 --- a/components/prism-javascript.min.js +++ b/components/prism-javascript.min.js @@ -1 +1 @@ -Prism.languages.javascript=Prism.languages.extend("clike",{keyword:/\b(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|var|void|while|with|yield)\b/,number:/\b(?:0[xX][\dA-Fa-f]+|0[bB][01]+|0[oO][0-7]+|NaN|Infinity)\b|(?:\b\d+\.?\d*|\B\.\d+)(?:[Ee][+-]?\d+)?/,"function":/[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*\()/i,operator:/-[-=]?|\+[+=]?|!=?=?|<>?>?=?|=(?:==?|>)?|&[&=]?|\|[|=]?|\*\*?=?|\/=?|~|\^=?|%=?|\?|\.{3}/}),Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s])\s*)\/(\[[^\]\r\n]+]|\\.|[^\/\\\[\r\n])+\/[gimyu]{0,5}(?=\s*($|[\r\n,.;})\]]))/,lookbehind:!0,greedy:!0},"function-variable":{pattern:/[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*=\s*(?:function\b|(?:\([^()]*\)|[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/i,alias:"function"},constant:/\b[A-Z][A-Z\d_]*\b/}),Prism.languages.insertBefore("javascript","string",{"template-string":{pattern:/`(?:\\[\s\S]|[^\\`])*`/,greedy:!0,inside:{interpolation:{pattern:/\$\{[^}]+\}/,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}}}),Prism.languages.markup&&Prism.languages.insertBefore("markup","tag",{script:{pattern:/()[\s\S]*?(?=<\/script>)/i,lookbehind:!0,inside:Prism.languages.javascript,alias:"language-javascript",greedy:!0}}),Prism.languages.js=Prism.languages.javascript; \ No newline at end of file +Prism.languages.javascript=Prism.languages.extend("clike",{keyword:/\b(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|var|void|while|with|yield)\b/,number:/\b(?:0[xX][\dA-Fa-f]+|0[bB][01]+|0[oO][0-7]+|NaN|Infinity)\b|(?:\b\d+\.?\d*|\B\.\d+)(?:[Ee][+-]?\d+)?/,"function":/[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*\()/i,operator:/-[-=]?|\+[+=]?|!=?=?|<>?>?=?|=(?:==?|>)?|&[&=]?|\|[|=]?|\*\*?=?|\/=?|~|\^=?|%=?|\?|\.{3}/}),Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s])\s*)\/(\[[^\]\r\n]+]|\\.|[^\/\\\[\r\n])+\/[gimyu]{0,5}(?=\s*($|[\r\n,.;})\]]))/,lookbehind:!0,greedy:!0},"function-variable":{pattern:/[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*=\s*(?:function\b|(?:\([^()]*\)|[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/i,alias:"function"},constant:/\b[A-Z][A-Z\d_]*\b/}),Prism.languages.insertBefore("javascript","string",{"template-string":{pattern:/`(?:\\[\s\S]|\${[^}]+}|[^\\`])*`/,greedy:!0,inside:{interpolation:{pattern:/\${[^}]+}/,inside:{"interpolation-punctuation":{pattern:/^\${|}$/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}}}),Prism.languages.javascript["template-string"].inside.interpolation.inside.rest=Prism.languages.javascript,Prism.languages.markup&&Prism.languages.insertBefore("markup","tag",{script:{pattern:/()[\s\S]*?(?=<\/script>)/i,lookbehind:!0,inside:Prism.languages.javascript,alias:"language-javascript",greedy:!0}}),Prism.languages.js=Prism.languages.javascript; \ No newline at end of file diff --git a/examples/prism-javascript.html b/examples/prism-javascript.html index ef86a9023a..9b944680d5 100644 --- a/examples/prism-javascript.html +++ b/examples/prism-javascript.html @@ -74,7 +74,4 @@

    Known failures

    String interpolation containing a closing brace

    `${ {foo:'bar'}.foo }`
    -`${ '}' }`
    - -

    String interpolation containing an unescaped back-tick

    -
    `${ '`' }`
    \ No newline at end of file +`${ '}' }`
    \ No newline at end of file diff --git a/prism.js b/prism.js index ea00b09fd7..239a1e7c17 100644 --- a/prism.js +++ b/prism.js @@ -745,23 +745,24 @@ Prism.languages.insertBefore('javascript', 'keyword', { Prism.languages.insertBefore('javascript', 'string', { 'template-string': { - pattern: /`(?:\\[\s\S]|[^\\`])*`/, + pattern: /`(?:\\[\s\S]|\${[^}]+}|[^\\`])*`/, greedy: true, inside: { 'interpolation': { - pattern: /\$\{[^}]+\}/, + pattern: /\${[^}]+}/, inside: { 'interpolation-punctuation': { - pattern: /^\$\{|\}$/, + pattern: /^\${|}$/, alias: 'punctuation' }, - rest: Prism.languages.javascript + rest: null // See below } }, 'string': /[\s\S]+/ } } }); +Prism.languages.javascript['template-string'].inside['interpolation'].inside.rest = Prism.languages.javascript; if (Prism.languages.markup) { Prism.languages.insertBefore('markup', 'tag', { diff --git a/tests/languages/javascript/issue1397.test b/tests/languages/javascript/issue1397.test new file mode 100644 index 0000000000..6f9b5fb21e --- /dev/null +++ b/tests/languages/javascript/issue1397.test @@ -0,0 +1,21 @@ +`${`a string`}` + +---------------------------------------------------- + +[ + ["template-string", [ + ["string", "`"], + ["interpolation", [ + ["interpolation-punctuation", "${"], + ["template-string", [ + ["string", "`a string`"] + ]], + ["interpolation-punctuation", "}"] + ]], + ["string", "`"] + ]] +] + +---------------------------------------------------- + +Checks for nested template strings. See #1397 \ No newline at end of file From 7bc9a4a140b24d1b8a4a555c30709abcb7081178 Mon Sep 17 00:00:00 2001 From: Valtteri Laitinen Date: Sun, 22 Apr 2018 16:18:32 +0300 Subject: [PATCH 0013/1100] Simplify lang regex on File Highlight plugin (#1399) Similar to #854. --- plugins/file-highlight/prism-file-highlight.js | 4 ++-- plugins/file-highlight/prism-file-highlight.min.js | 2 +- prism.js | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/plugins/file-highlight/prism-file-highlight.js b/plugins/file-highlight/prism-file-highlight.js index 1f34abb00e..6dee6c4c3f 100644 --- a/plugins/file-highlight/prism-file-highlight.js +++ b/plugins/file-highlight/prism-file-highlight.js @@ -21,7 +21,7 @@ var src = pre.getAttribute('data-src'); var language, parent = pre; - var lang = /\blang(?:uage)?-(?!\*)([\w-]+)\b/i; + var lang = /\blang(?:uage)?-([\w-]+)\b/i; while (parent && !lang.test(parent.className)) { parent = parent.parentNode; } @@ -87,4 +87,4 @@ document.addEventListener('DOMContentLoaded', self.Prism.fileHighlight); -})(); +})(); \ No newline at end of file diff --git a/plugins/file-highlight/prism-file-highlight.min.js b/plugins/file-highlight/prism-file-highlight.min.js index 5faa78a867..301fa878d7 100644 --- a/plugins/file-highlight/prism-file-highlight.min.js +++ b/plugins/file-highlight/prism-file-highlight.min.js @@ -1 +1 @@ -!function(){"undefined"!=typeof self&&self.Prism&&self.document&&document.querySelector&&(self.Prism.fileHighlight=function(){var t={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"};Array.prototype.slice.call(document.querySelectorAll("pre[data-src]")).forEach(function(e){for(var a,n=e.getAttribute("data-src"),r=e,o=/\blang(?:uage)?-(?!\*)([\w-]+)\b/i;r&&!o.test(r.className);)r=r.parentNode;if(r&&(a=(e.className.match(o)||[,""])[1]),!a){var s=(n.match(/\.(\w+)$/)||[,""])[1];a=t[s]||s}var l=document.createElement("code");l.className="language-"+a,e.textContent="",l.textContent="Loading…",e.appendChild(l);var i=new XMLHttpRequest;i.open("GET",n,!0),i.onreadystatechange=function(){4==i.readyState&&(i.status<400&&i.responseText?(l.textContent=i.responseText,Prism.highlightElement(l)):l.textContent=i.status>=400?"✖ Error "+i.status+" while fetching file: "+i.statusText:"✖ Error: File does not exist or is empty")},i.send(null)}),Prism.plugins.toolbar&&Prism.plugins.toolbar.registerButton("download-file",function(t){var e=t.element.parentNode;if(e&&/pre/i.test(e.nodeName)&&e.hasAttribute("data-src")&&e.hasAttribute("data-download-link")){var a=e.getAttribute("data-src"),n=document.createElement("a");return n.textContent=e.getAttribute("data-download-link-label")||"Download",n.setAttribute("download",""),n.href=a,n}})},document.addEventListener("DOMContentLoaded",self.Prism.fileHighlight))}(); \ No newline at end of file +!function(){"undefined"!=typeof self&&self.Prism&&self.document&&document.querySelector&&(self.Prism.fileHighlight=function(){var t={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"};Array.prototype.slice.call(document.querySelectorAll("pre[data-src]")).forEach(function(e){for(var a,n=e.getAttribute("data-src"),r=e,o=/\blang(?:uage)?-([\w-]+)\b/i;r&&!o.test(r.className);)r=r.parentNode;if(r&&(a=(e.className.match(o)||[,""])[1]),!a){var s=(n.match(/\.(\w+)$/)||[,""])[1];a=t[s]||s}var l=document.createElement("code");l.className="language-"+a,e.textContent="",l.textContent="Loading…",e.appendChild(l);var i=new XMLHttpRequest;i.open("GET",n,!0),i.onreadystatechange=function(){4==i.readyState&&(i.status<400&&i.responseText?(l.textContent=i.responseText,Prism.highlightElement(l)):l.textContent=i.status>=400?"✖ Error "+i.status+" while fetching file: "+i.statusText:"✖ Error: File does not exist or is empty")},i.send(null)}),Prism.plugins.toolbar&&Prism.plugins.toolbar.registerButton("download-file",function(t){var e=t.element.parentNode;if(e&&/pre/i.test(e.nodeName)&&e.hasAttribute("data-src")&&e.hasAttribute("data-download-link")){var a=e.getAttribute("data-src"),n=document.createElement("a");return n.textContent=e.getAttribute("data-download-link-label")||"Download",n.setAttribute("download",""),n.href=a,n}})},document.addEventListener("DOMContentLoaded",self.Prism.fileHighlight))}(); \ No newline at end of file diff --git a/prism.js b/prism.js index 239a1e7c17..2baadce878 100644 --- a/prism.js +++ b/prism.js @@ -806,7 +806,7 @@ Prism.languages.js = Prism.languages.javascript; var src = pre.getAttribute('data-src'); var language, parent = pre; - var lang = /\blang(?:uage)?-(?!\*)([\w-]+)\b/i; + var lang = /\blang(?:uage)?-([\w-]+)\b/i; while (parent && !lang.test(parent.className)) { parent = parent.parentNode; } @@ -872,4 +872,4 @@ Prism.languages.js = Prism.languages.javascript; document.addEventListener('DOMContentLoaded', self.Prism.fileHighlight); -})(); +})(); \ No newline at end of file From 9272d6f4f690aa47458db3c96dda81219434875f Mon Sep 17 00:00:00 2001 From: Golmote Date: Fri, 27 Apr 2018 08:27:02 +0200 Subject: [PATCH 0014/1100] Powershell: Allow for one level of nesting in expressions inside strings. Fix #1407 --- components/prism-powershell.js | 3 +- components/prism-powershell.min.js | 2 +- tests/languages/powershell/issue1407.test | 43 +++++++++++++++++++ .../languages/powershell/string_feature.test | 14 ++++++ 4 files changed, 60 insertions(+), 2 deletions(-) create mode 100644 tests/languages/powershell/issue1407.test diff --git a/components/prism-powershell.js b/components/prism-powershell.js index 6fe91131a2..90afbaae62 100644 --- a/components/prism-powershell.js +++ b/components/prism-powershell.js @@ -15,7 +15,8 @@ Prism.languages.powershell = { greedy: true, inside: { 'function': { - pattern: /(^|[^`])\$\(.*?\)/, + // Allow for one level of nesting + pattern: /(^|[^`])\$\((?:\$\(.*?\)|(?!\$\()[^\r\n)])*\)/, lookbehind: true, // Populated at end of file inside: {} diff --git a/components/prism-powershell.min.js b/components/prism-powershell.min.js index a5b777d1d0..816c262fb4 100644 --- a/components/prism-powershell.min.js +++ b/components/prism-powershell.min.js @@ -1 +1 @@ -Prism.languages.powershell={comment:[{pattern:/(^|[^`])<#[\s\S]*?#>/,lookbehind:!0},{pattern:/(^|[^`])#.*/,lookbehind:!0}],string:[{pattern:/"(?:`[\s\S]|[^`"])*"/,greedy:!0,inside:{"function":{pattern:/(^|[^`])\$\(.*?\)/,lookbehind:!0,inside:{}}}},{pattern:/'(?:[^']|'')*'/,greedy:!0}],namespace:/\[[a-z](?:\[(?:\[[^\]]*]|[^\[\]])*]|[^\[\]])*]/i,"boolean":/\$(?:true|false)\b/i,variable:/\$\w+\b/i,"function":[/\b(?:Add-(?:Computer|Content|History|Member|PSSnapin|Type)|Checkpoint-Computer|Clear-(?:Content|EventLog|History|Item|ItemProperty|Variable)|Compare-Object|Complete-Transaction|Connect-PSSession|ConvertFrom-(?:Csv|Json|StringData)|Convert-Path|ConvertTo-(?:Csv|Html|Json|Xml)|Copy-(?:Item|ItemProperty)|Debug-Process|Disable-(?:ComputerRestore|PSBreakpoint|PSRemoting|PSSessionConfiguration)|Disconnect-PSSession|Enable-(?:ComputerRestore|PSBreakpoint|PSRemoting|PSSessionConfiguration)|Enter-PSSession|Exit-PSSession|Export-(?:Alias|Clixml|Console|Csv|FormatData|ModuleMember|PSSession)|ForEach-Object|Format-(?:Custom|List|Table|Wide)|Get-(?:Alias|ChildItem|Command|ComputerRestorePoint|Content|ControlPanelItem|Culture|Date|Event|EventLog|EventSubscriber|FormatData|Help|History|Host|HotFix|Item|ItemProperty|Job|Location|Member|Module|Process|PSBreakpoint|PSCallStack|PSDrive|PSProvider|PSSession|PSSessionConfiguration|PSSnapin|Random|Service|TraceSource|Transaction|TypeData|UICulture|Unique|Variable|WmiObject)|Group-Object|Import-(?:Alias|Clixml|Csv|LocalizedData|Module|PSSession)|Invoke-(?:Command|Expression|History|Item|RestMethod|WebRequest|WmiMethod)|Join-Path|Limit-EventLog|Measure-(?:Command|Object)|Move-(?:Item|ItemProperty)|New-(?:Alias|Event|EventLog|Item|ItemProperty|Module|ModuleManifest|Object|PSDrive|PSSession|PSSessionConfigurationFile|PSSessionOption|PSTransportOption|Service|TimeSpan|Variable|WebServiceProxy)|Out-(?:Default|File|GridView|Host|Null|Printer|String)|Pop-Location|Push-Location|Read-Host|Receive-(?:Job|PSSession)|Register-(?:EngineEvent|ObjectEvent|PSSessionConfiguration|WmiEvent)|Remove-(?:Computer|Event|EventLog|Item|ItemProperty|Job|Module|PSBreakpoint|PSDrive|PSSession|PSSnapin|TypeData|Variable|WmiObject)|Rename-(?:Computer|Item|ItemProperty)|Reset-ComputerMachinePassword|Resolve-Path|Restart-(?:Computer|Service)|Restore-Computer|Resume-(?:Job|Service)|Save-Help|Select-(?:Object|String|Xml)|Send-MailMessage|Set-(?:Alias|Content|Date|Item|ItemProperty|Location|PSBreakpoint|PSDebug|PSSessionConfiguration|Service|StrictMode|TraceSource|Variable|WmiInstance)|Show-(?:Command|ControlPanelItem|EventLog)|Sort-Object|Split-Path|Start-(?:Job|Process|Service|Sleep|Transaction)|Stop-(?:Computer|Job|Process|Service)|Suspend-(?:Job|Service)|Tee-Object|Test-(?:ComputerSecureChannel|Connection|ModuleManifest|Path|PSSessionConfigurationFile)|Trace-Command|Unblock-File|Undo-Transaction|Unregister-(?:Event|PSSessionConfiguration)|Update-(?:FormatData|Help|List|TypeData)|Use-Transaction|Wait-(?:Event|Job|Process)|Where-Object|Write-(?:Debug|Error|EventLog|Host|Output|Progress|Verbose|Warning))\b/i,/\b(?:ac|cat|chdir|clc|cli|clp|clv|compare|copy|cp|cpi|cpp|cvpa|dbp|del|diff|dir|ebp|echo|epal|epcsv|epsn|erase|fc|fl|ft|fw|gal|gbp|gc|gci|gcs|gdr|gi|gl|gm|gp|gps|group|gsv|gu|gv|gwmi|iex|ii|ipal|ipcsv|ipsn|irm|iwmi|iwr|kill|lp|ls|measure|mi|mount|move|mp|mv|nal|ndr|ni|nv|ogv|popd|ps|pushd|pwd|rbp|rd|rdr|ren|ri|rm|rmdir|rni|rnp|rp|rv|rvpa|rwmi|sal|saps|sasv|sbp|sc|select|set|shcm|si|sl|sleep|sls|sort|sp|spps|spsv|start|sv|swmi|tee|trcm|type|write)\b/i],keyword:/\b(?:Begin|Break|Catch|Class|Continue|Data|Define|Do|DynamicParam|Else|ElseIf|End|Exit|Filter|Finally|For|ForEach|From|Function|If|InlineScript|Parallel|Param|Process|Return|Sequence|Switch|Throw|Trap|Try|Until|Using|Var|While|Workflow)\b/i,operator:{pattern:/(\W?)(?:!|-(eq|ne|gt|ge|lt|le|sh[lr]|not|b?(?:and|x?or)|(?:Not)?(?:Like|Match|Contains|In)|Replace|Join|is(?:Not)?|as)\b|-[-=]?|\+[+=]?|[*\/%]=?)/i,lookbehind:!0},punctuation:/[|{}[\];(),.]/},Prism.languages.powershell.string[0].inside.boolean=Prism.languages.powershell.boolean,Prism.languages.powershell.string[0].inside.variable=Prism.languages.powershell.variable,Prism.languages.powershell.string[0].inside.function.inside=Prism.languages.powershell; \ No newline at end of file +Prism.languages.powershell={comment:[{pattern:/(^|[^`])<#[\s\S]*?#>/,lookbehind:!0},{pattern:/(^|[^`])#.*/,lookbehind:!0}],string:[{pattern:/"(?:`[\s\S]|[^`"])*"/,greedy:!0,inside:{"function":{pattern:/(^|[^`])\$\((?:\$\(.*?\)|(?!\$\()[^\r\n)])*\)/,lookbehind:!0,inside:{}}}},{pattern:/'(?:[^']|'')*'/,greedy:!0}],namespace:/\[[a-z](?:\[(?:\[[^\]]*]|[^\[\]])*]|[^\[\]])*]/i,"boolean":/\$(?:true|false)\b/i,variable:/\$\w+\b/i,"function":[/\b(?:Add-(?:Computer|Content|History|Member|PSSnapin|Type)|Checkpoint-Computer|Clear-(?:Content|EventLog|History|Item|ItemProperty|Variable)|Compare-Object|Complete-Transaction|Connect-PSSession|ConvertFrom-(?:Csv|Json|StringData)|Convert-Path|ConvertTo-(?:Csv|Html|Json|Xml)|Copy-(?:Item|ItemProperty)|Debug-Process|Disable-(?:ComputerRestore|PSBreakpoint|PSRemoting|PSSessionConfiguration)|Disconnect-PSSession|Enable-(?:ComputerRestore|PSBreakpoint|PSRemoting|PSSessionConfiguration)|Enter-PSSession|Exit-PSSession|Export-(?:Alias|Clixml|Console|Csv|FormatData|ModuleMember|PSSession)|ForEach-Object|Format-(?:Custom|List|Table|Wide)|Get-(?:Alias|ChildItem|Command|ComputerRestorePoint|Content|ControlPanelItem|Culture|Date|Event|EventLog|EventSubscriber|FormatData|Help|History|Host|HotFix|Item|ItemProperty|Job|Location|Member|Module|Process|PSBreakpoint|PSCallStack|PSDrive|PSProvider|PSSession|PSSessionConfiguration|PSSnapin|Random|Service|TraceSource|Transaction|TypeData|UICulture|Unique|Variable|WmiObject)|Group-Object|Import-(?:Alias|Clixml|Csv|LocalizedData|Module|PSSession)|Invoke-(?:Command|Expression|History|Item|RestMethod|WebRequest|WmiMethod)|Join-Path|Limit-EventLog|Measure-(?:Command|Object)|Move-(?:Item|ItemProperty)|New-(?:Alias|Event|EventLog|Item|ItemProperty|Module|ModuleManifest|Object|PSDrive|PSSession|PSSessionConfigurationFile|PSSessionOption|PSTransportOption|Service|TimeSpan|Variable|WebServiceProxy)|Out-(?:Default|File|GridView|Host|Null|Printer|String)|Pop-Location|Push-Location|Read-Host|Receive-(?:Job|PSSession)|Register-(?:EngineEvent|ObjectEvent|PSSessionConfiguration|WmiEvent)|Remove-(?:Computer|Event|EventLog|Item|ItemProperty|Job|Module|PSBreakpoint|PSDrive|PSSession|PSSnapin|TypeData|Variable|WmiObject)|Rename-(?:Computer|Item|ItemProperty)|Reset-ComputerMachinePassword|Resolve-Path|Restart-(?:Computer|Service)|Restore-Computer|Resume-(?:Job|Service)|Save-Help|Select-(?:Object|String|Xml)|Send-MailMessage|Set-(?:Alias|Content|Date|Item|ItemProperty|Location|PSBreakpoint|PSDebug|PSSessionConfiguration|Service|StrictMode|TraceSource|Variable|WmiInstance)|Show-(?:Command|ControlPanelItem|EventLog)|Sort-Object|Split-Path|Start-(?:Job|Process|Service|Sleep|Transaction)|Stop-(?:Computer|Job|Process|Service)|Suspend-(?:Job|Service)|Tee-Object|Test-(?:ComputerSecureChannel|Connection|ModuleManifest|Path|PSSessionConfigurationFile)|Trace-Command|Unblock-File|Undo-Transaction|Unregister-(?:Event|PSSessionConfiguration)|Update-(?:FormatData|Help|List|TypeData)|Use-Transaction|Wait-(?:Event|Job|Process)|Where-Object|Write-(?:Debug|Error|EventLog|Host|Output|Progress|Verbose|Warning))\b/i,/\b(?:ac|cat|chdir|clc|cli|clp|clv|compare|copy|cp|cpi|cpp|cvpa|dbp|del|diff|dir|ebp|echo|epal|epcsv|epsn|erase|fc|fl|ft|fw|gal|gbp|gc|gci|gcs|gdr|gi|gl|gm|gp|gps|group|gsv|gu|gv|gwmi|iex|ii|ipal|ipcsv|ipsn|irm|iwmi|iwr|kill|lp|ls|measure|mi|mount|move|mp|mv|nal|ndr|ni|nv|ogv|popd|ps|pushd|pwd|rbp|rd|rdr|ren|ri|rm|rmdir|rni|rnp|rp|rv|rvpa|rwmi|sal|saps|sasv|sbp|sc|select|set|shcm|si|sl|sleep|sls|sort|sp|spps|spsv|start|sv|swmi|tee|trcm|type|write)\b/i],keyword:/\b(?:Begin|Break|Catch|Class|Continue|Data|Define|Do|DynamicParam|Else|ElseIf|End|Exit|Filter|Finally|For|ForEach|From|Function|If|InlineScript|Parallel|Param|Process|Return|Sequence|Switch|Throw|Trap|Try|Until|Using|Var|While|Workflow)\b/i,operator:{pattern:/(\W?)(?:!|-(eq|ne|gt|ge|lt|le|sh[lr]|not|b?(?:and|x?or)|(?:Not)?(?:Like|Match|Contains|In)|Replace|Join|is(?:Not)?|as)\b|-[-=]?|\+[+=]?|[*\/%]=?)/i,lookbehind:!0},punctuation:/[|{}[\];(),.]/},Prism.languages.powershell.string[0].inside.boolean=Prism.languages.powershell.boolean,Prism.languages.powershell.string[0].inside.variable=Prism.languages.powershell.variable,Prism.languages.powershell.string[0].inside.function.inside=Prism.languages.powershell; \ No newline at end of file diff --git a/tests/languages/powershell/issue1407.test b/tests/languages/powershell/issue1407.test new file mode 100644 index 0000000000..3188bdc2d4 --- /dev/null +++ b/tests/languages/powershell/issue1407.test @@ -0,0 +1,43 @@ +While($true){ + Write-Output "$($($InFiles | Where-Object {$_.ToCopy -eq 0}).count)" +} + +---------------------------------------------------- + +[ + ["keyword", "While"], + ["punctuation", "("], + ["boolean", "$true"], + ["punctuation", ")"], + ["punctuation", "{"], + ["function", "Write-Output"], + ["string", [ + "\"", + ["function", [ + "$", + ["punctuation", "("], + "$", + ["punctuation", "("], + ["variable", "$InFiles"], + ["punctuation", "|"], + ["function", "Where-Object"], + ["punctuation", "{"], + ["variable", "$_"], + ["punctuation", "."], + "ToCopy ", + ["operator", "-eq"], + " 0", + ["punctuation", "}"], + ["punctuation", ")"], + ["punctuation", "."], + "count", + ["punctuation", ")"] + ]], + "\"" + ]], + ["punctuation", "}"] +] + +---------------------------------------------------- + +Checks for nested expressions in strings. \ No newline at end of file diff --git a/tests/languages/powershell/string_feature.test b/tests/languages/powershell/string_feature.test index c444facd8e..b730668c69 100644 --- a/tests/languages/powershell/string_feature.test +++ b/tests/languages/powershell/string_feature.test @@ -11,6 +11,7 @@ an empty '' string "has $interpolated <# variables #>" "$($expression)" "`$(escaped expression)" +"$($($exp))" ---------------------------------------------------- @@ -56,6 +57,19 @@ an empty '' string ]], ["string", [ "\"`$(escaped expression)\"" + ]], + ["string", [ + "\"", + ["function", [ + "$", + ["punctuation", "("], + "$", + ["punctuation", "("], + ["variable", "$exp"], + ["punctuation", ")"], + ["punctuation", ")"] + ]], + "\"" ]] ] From a349c0cd672662fb93dbebc2bdc8f3ecd3495e6a Mon Sep 17 00:00:00 2001 From: Golmote Date: Fri, 27 Apr 2018 08:47:54 +0200 Subject: [PATCH 0015/1100] Add missing reference to issue in specific test. --- tests/languages/powershell/issue1407.test | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/languages/powershell/issue1407.test b/tests/languages/powershell/issue1407.test index 3188bdc2d4..65fc05abb1 100644 --- a/tests/languages/powershell/issue1407.test +++ b/tests/languages/powershell/issue1407.test @@ -40,4 +40,4 @@ While($true){ ---------------------------------------------------- -Checks for nested expressions in strings. \ No newline at end of file +Checks for nested expressions in strings. See #1407 \ No newline at end of file From f1cd7c5691dd08f9e362a4547a10423efeafe9df Mon Sep 17 00:00:00 2001 From: Golmote Date: Fri, 27 Apr 2018 08:56:19 +0200 Subject: [PATCH 0016/1100] JSX: Allow for two levels of nesting inside JSX tags. Fix #1408 --- components/prism-jsx.js | 6 ++--- components/prism-jsx.min.js | 2 +- tests/languages/jsx/issue1408.test | 36 ++++++++++++++++++++++++++++++ 3 files changed, 40 insertions(+), 4 deletions(-) create mode 100644 tests/languages/jsx/issue1408.test diff --git a/components/prism-jsx.js b/components/prism-jsx.js index a34daa17b3..5876ffbe76 100644 --- a/components/prism-jsx.js +++ b/components/prism-jsx.js @@ -3,7 +3,7 @@ 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.:-]+(?:=(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s{'">=]+|\{(?:\{[^}]*\}|[^{}])+\}))?|\{\.{3}[a-z_$][\w$]*(?:\.[a-z_$][\w$]*)*\}))*\s*\/?>/i; +Prism.languages.jsx.tag.pattern= /<\/?[\w.:-]+\s*(?:\s+(?:[\w.:-]+(?:=(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s{'">=]+|\{(?:\{(?:\{[^}]*\}|[^{}])*\}|[^{}])+\}))?|\{\.{3}[a-z_$][\w$]*(?:\.[a-z_$][\w$]*)*\}))*\s*\/?>/i; Prism.languages.jsx.tag.inside['attr-value'].pattern = /=(?!\{)(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s'">]+)/i; @@ -19,8 +19,8 @@ Prism.languages.insertBefore('inside', 'attr-name', { Prism.languages.insertBefore('inside', 'attr-value',{ 'script': { - // Allow for one level of nesting - pattern: /=(\{(?:\{[^}]*\}|[^}])+\})/i, + // Allow for two levels of nesting + pattern: /=(\{(?:\{(?:\{[^}]*\}|[^}])*\}|[^}])+\})/i, inside: { 'script-punctuation': { pattern: /^=(?={)/, diff --git a/components/prism-jsx.min.js b/components/prism-jsx.min.js index 61218d537e..706254bdd2 100644 --- a/components/prism-jsx.min.js +++ b/components/prism-jsx.min.js @@ -1 +1 @@ -!function(t){var n=t.util.clone(t.languages.javascript);t.languages.jsx=t.languages.extend("markup",n),t.languages.jsx.tag.pattern=/<\/?[\w.:-]+\s*(?:\s+(?:[\w.:-]+(?:=(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s{'">=]+|\{(?:\{[^}]*\}|[^{}])+\}))?|\{\.{3}[a-z_$][\w$]*(?:\.[a-z_$][\w$]*)*\}))*\s*\/?>/i,t.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s'">]+)/i,t.languages.insertBefore("inside","attr-name",{spread:{pattern:/\{\.{3}[a-z_$][\w$]*(?:\.[a-z_$][\w$]*)*\}/,inside:{punctuation:/\.{3}|[{}.]/,"attr-value":/\w+/}}},t.languages.jsx.tag),t.languages.insertBefore("inside","attr-value",{script:{pattern:/=(\{(?:\{[^}]*\}|[^}])+\})/i,inside:{"script-punctuation":{pattern:/^=(?={)/,alias:"punctuation"},rest:t.languages.jsx},alias:"language-javascript"}},t.languages.jsx.tag);var e=function(t){return"string"==typeof t?t:"string"==typeof t.content?t.content:t.content.map(e).join("")},a=function(n){for(var s=[],g=0;g0&&s[s.length-1].tagName===e(o.content[0].content[1])&&s.pop():"/>"===o.content[o.content.length-1].content||s.push({tagName:e(o.content[0].content[1]),openedBraces:0}):s.length>0&&"punctuation"===o.type&&"{"===o.content?s[s.length-1].openedBraces++:s.length>0&&s[s.length-1].openedBraces>0&&"punctuation"===o.type&&"}"===o.content?s[s.length-1].openedBraces--:i=!0),(i||"string"==typeof o)&&s.length>0&&0===s[s.length-1].openedBraces){var p=e(o);g0&&("string"==typeof n[g-1]||"plain-text"===n[g-1].type)&&(p=e(n[g-1])+p,n.splice(g-1,1),g--),n[g]=new t.Token("plain-text",p,null,p)}o.content&&"string"!=typeof o.content&&a(o.content)}};t.hooks.add("after-tokenize",function(t){("jsx"===t.language||"tsx"===t.language)&&a(t.tokens)})}(Prism); \ No newline at end of file +!function(t){var n=t.util.clone(t.languages.javascript);t.languages.jsx=t.languages.extend("markup",n),t.languages.jsx.tag.pattern=/<\/?[\w.:-]+\s*(?:\s+(?:[\w.:-]+(?:=(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s{'">=]+|\{(?:\{(?:\{[^}]*\}|[^{}])*\}|[^{}])+\}))?|\{\.{3}[a-z_$][\w$]*(?:\.[a-z_$][\w$]*)*\}))*\s*\/?>/i,t.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s'">]+)/i,t.languages.insertBefore("inside","attr-name",{spread:{pattern:/\{\.{3}[a-z_$][\w$]*(?:\.[a-z_$][\w$]*)*\}/,inside:{punctuation:/\.{3}|[{}.]/,"attr-value":/\w+/}}},t.languages.jsx.tag),t.languages.insertBefore("inside","attr-value",{script:{pattern:/=(\{(?:\{(?:\{[^}]*\}|[^}])*\}|[^}])+\})/i,inside:{"script-punctuation":{pattern:/^=(?={)/,alias:"punctuation"},rest:t.languages.jsx},alias:"language-javascript"}},t.languages.jsx.tag);var e=function(t){return"string"==typeof t?t:"string"==typeof t.content?t.content:t.content.map(e).join("")},a=function(n){for(var s=[],g=0;g0&&s[s.length-1].tagName===e(o.content[0].content[1])&&s.pop():"/>"===o.content[o.content.length-1].content||s.push({tagName:e(o.content[0].content[1]),openedBraces:0}):s.length>0&&"punctuation"===o.type&&"{"===o.content?s[s.length-1].openedBraces++:s.length>0&&s[s.length-1].openedBraces>0&&"punctuation"===o.type&&"}"===o.content?s[s.length-1].openedBraces--:i=!0),(i||"string"==typeof o)&&s.length>0&&0===s[s.length-1].openedBraces){var p=e(o);g0&&("string"==typeof n[g-1]||"plain-text"===n[g-1].type)&&(p=e(n[g-1])+p,n.splice(g-1,1),g--),n[g]=new t.Token("plain-text",p,null,p)}o.content&&"string"!=typeof o.content&&a(o.content)}};t.hooks.add("after-tokenize",function(t){("jsx"===t.language||"tsx"===t.language)&&a(t.tokens)})}(Prism); \ No newline at end of file diff --git a/tests/languages/jsx/issue1408.test b/tests/languages/jsx/issue1408.test new file mode 100644 index 0000000000..e54a44c31f --- /dev/null +++ b/tests/languages/jsx/issue1408.test @@ -0,0 +1,36 @@ +
    + +---------------------------------------------------- + +[ + ["tag", [ + ["tag", [ + ["punctuation", "<"], + "div" + ]], + ["attr-name", ["style"]], + ["script", [ + ["script-punctuation", "="], + ["punctuation", "{"], + ["punctuation", "{"], + " marginLeft", + ["punctuation", ":"], + ["template-string", [ + ["string", "`"], + ["interpolation", [ + ["interpolation-punctuation", "${"], + "sidePanelWidth", + ["interpolation-punctuation", "}"] + ]], + ["string", "px`"] + ]], + ["punctuation", "}"], + ["punctuation", "}"] + ]], + ["punctuation", ">"] + ]] +] + +---------------------------------------------------- + +Checks for template string with interpolation inside object inside JSX tag. See #1408 \ No newline at end of file From c1118692bc85fe70ee47c5b8c6f84c7cc15b9126 Mon Sep 17 00:00:00 2001 From: Jake Worth Date: Fri, 27 Apr 2018 16:50:27 -0400 Subject: [PATCH 0017/1100] Don't process language if block language not set Adding this guard to the function prevents an error if the language is undefined. `env.language.substring(0, 1).toUpperCase()` can fail with `Uncaught TypeError: Cannot read property 'substring' of undefined` when `env.language` is undefined. --- plugins/show-language/prism-show-language.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/show-language/prism-show-language.js b/plugins/show-language/prism-show-language.js index 41647a8c72..bc65c816dd 100644 --- a/plugins/show-language/prism-show-language.js +++ b/plugins/show-language/prism-show-language.js @@ -14,7 +14,7 @@ if (!Prism.plugins.toolbar) { var Languages = /*languages_placeholder[*/{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","css":"CSS","clike":"C-like","javascript":"JavaScript","abap":"ABAP","actionscript":"ActionScript","apacheconf":"Apache Configuration","apl":"APL","applescript":"AppleScript","arff":"ARFF","asciidoc":"AsciiDoc","asm6502":"6502 Assembly","aspnet":"ASP.NET (C#)","autohotkey":"AutoHotkey","autoit":"AutoIt","basic":"BASIC","csharp":"C#","cpp":"C++","coffeescript":"CoffeeScript","csp":"Content-Security-Policy","css-extras":"CSS Extras","django":"Django/Jinja2","erb":"ERB","fsharp":"F#","gedcom":"GEDCOM","glsl":"GLSL","graphql":"GraphQL","http":"HTTP","hpkp":"HTTP Public-Key-Pins","hsts":"HTTP Strict-Transport-Security","ichigojam":"IchigoJam","inform7":"Inform 7","json":"JSON","latex":"LaTeX","livescript":"LiveScript","lolcode":"LOLCODE","markup-templating":"Markup templating","matlab":"MATLAB","mel":"MEL","n4js":"N4JS","nasm":"NASM","nginx":"nginx","nsis":"NSIS","objectivec":"Objective-C","ocaml":"OCaml","opencl":"OpenCL","parigp":"PARI/GP","php":"PHP","php-extras":"PHP Extras","plsql":"PL/SQL","powershell":"PowerShell","properties":".properties","protobuf":"Protocol Buffers","q":"Q (kdb+ database)","jsx":"React JSX","tsx":"React TSX","renpy":"Ren'py","rest":"reST (reStructuredText)","sas":"SAS","sass":"Sass (Sass)","scss":"Sass (Scss)","sql":"SQL","soy":"Soy (Closure Template)","typescript":"TypeScript","vbnet":"VB.Net","vhdl":"VHDL","vim":"vim","visual-basic":"Visual Basic","wasm":"WebAssembly","wiki":"Wiki markup","xojo":"Xojo (REALbasic)","yaml":"YAML"}/*]*/; Prism.plugins.toolbar.registerButton('show-language', function(env) { var pre = env.element.parentNode; - if (!pre || !/pre/i.test(pre.nodeName)) { + if (!pre || !/pre/i.test(pre.nodeName) || !env.language) { return; } var language = pre.getAttribute('data-language') || Languages[env.language] || (env.language.substring(0, 1).toUpperCase() + env.language.substring(1)); From eef860cbe56f6c585ecc90b430d5451948d25995 Mon Sep 17 00:00:00 2001 From: Jake Worth Date: Fri, 27 Apr 2018 17:23:38 -0400 Subject: [PATCH 0018/1100] Move guard into conditional and check for language --- plugins/show-language/prism-show-language.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/plugins/show-language/prism-show-language.js b/plugins/show-language/prism-show-language.js index bc65c816dd..b39cd1d234 100644 --- a/plugins/show-language/prism-show-language.js +++ b/plugins/show-language/prism-show-language.js @@ -14,11 +14,14 @@ if (!Prism.plugins.toolbar) { var Languages = /*languages_placeholder[*/{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","css":"CSS","clike":"C-like","javascript":"JavaScript","abap":"ABAP","actionscript":"ActionScript","apacheconf":"Apache Configuration","apl":"APL","applescript":"AppleScript","arff":"ARFF","asciidoc":"AsciiDoc","asm6502":"6502 Assembly","aspnet":"ASP.NET (C#)","autohotkey":"AutoHotkey","autoit":"AutoIt","basic":"BASIC","csharp":"C#","cpp":"C++","coffeescript":"CoffeeScript","csp":"Content-Security-Policy","css-extras":"CSS Extras","django":"Django/Jinja2","erb":"ERB","fsharp":"F#","gedcom":"GEDCOM","glsl":"GLSL","graphql":"GraphQL","http":"HTTP","hpkp":"HTTP Public-Key-Pins","hsts":"HTTP Strict-Transport-Security","ichigojam":"IchigoJam","inform7":"Inform 7","json":"JSON","latex":"LaTeX","livescript":"LiveScript","lolcode":"LOLCODE","markup-templating":"Markup templating","matlab":"MATLAB","mel":"MEL","n4js":"N4JS","nasm":"NASM","nginx":"nginx","nsis":"NSIS","objectivec":"Objective-C","ocaml":"OCaml","opencl":"OpenCL","parigp":"PARI/GP","php":"PHP","php-extras":"PHP Extras","plsql":"PL/SQL","powershell":"PowerShell","properties":".properties","protobuf":"Protocol Buffers","q":"Q (kdb+ database)","jsx":"React JSX","tsx":"React TSX","renpy":"Ren'py","rest":"reST (reStructuredText)","sas":"SAS","sass":"Sass (Sass)","scss":"Sass (Scss)","sql":"SQL","soy":"Soy (Closure Template)","typescript":"TypeScript","vbnet":"VB.Net","vhdl":"VHDL","vim":"vim","visual-basic":"Visual Basic","wasm":"WebAssembly","wiki":"Wiki markup","xojo":"Xojo (REALbasic)","yaml":"YAML"}/*]*/; Prism.plugins.toolbar.registerButton('show-language', function(env) { var pre = env.element.parentNode; - if (!pre || !/pre/i.test(pre.nodeName) || !env.language) { + if (!pre || !/pre/i.test(pre.nodeName)) { return; } - var language = pre.getAttribute('data-language') || Languages[env.language] || (env.language.substring(0, 1).toUpperCase() + env.language.substring(1)); + var language = pre.getAttribute('data-language') || Languages[env.language] || (env.language && (env.language.substring(0, 1).toUpperCase() + env.language.substring(1))); + if(!language) { + return; + } var element = document.createElement('span'); element.textContent = language; From 0a701430619fcc1c62eece941e4103fe95fc3a5a Mon Sep 17 00:00:00 2001 From: Golmote Date: Tue, 1 May 2018 16:53:13 +0200 Subject: [PATCH 0019/1100] Run gulp --- plugins/show-language/prism-show-language.min.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/show-language/prism-show-language.min.js b/plugins/show-language/prism-show-language.min.js index a6f3ce737a..75e2f4ac66 100644 --- a/plugins/show-language/prism-show-language.min.js +++ b/plugins/show-language/prism-show-language.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof self&&self.Prism&&self.document){if(!Prism.plugins.toolbar)return console.warn("Show Languages plugin loaded before Toolbar plugin."),void 0;var e={html:"HTML",xml:"XML",svg:"SVG",mathml:"MathML",css:"CSS",clike:"C-like",javascript:"JavaScript",abap:"ABAP",actionscript:"ActionScript",apacheconf:"Apache Configuration",apl:"APL",applescript:"AppleScript",arff:"ARFF",asciidoc:"AsciiDoc",asm6502:"6502 Assembly",aspnet:"ASP.NET (C#)",autohotkey:"AutoHotkey",autoit:"AutoIt",basic:"BASIC",csharp:"C#",cpp:"C++",coffeescript:"CoffeeScript",csp:"Content-Security-Policy","css-extras":"CSS Extras",django:"Django/Jinja2",erb:"ERB",fsharp:"F#",gedcom:"GEDCOM",glsl:"GLSL",graphql:"GraphQL",http:"HTTP",hpkp:"HTTP Public-Key-Pins",hsts:"HTTP Strict-Transport-Security",ichigojam:"IchigoJam",inform7:"Inform 7",json:"JSON",latex:"LaTeX",livescript:"LiveScript",lolcode:"LOLCODE","markup-templating":"Markup templating",matlab:"MATLAB",mel:"MEL",n4js:"N4JS",nasm:"NASM",nginx:"nginx",nsis:"NSIS",objectivec:"Objective-C",ocaml:"OCaml",opencl:"OpenCL",parigp:"PARI/GP",php:"PHP","php-extras":"PHP Extras",plsql:"PL/SQL",powershell:"PowerShell",properties:".properties",protobuf:"Protocol Buffers",q:"Q (kdb+ database)",jsx:"React JSX",tsx:"React TSX",renpy:"Ren'py",rest:"reST (reStructuredText)",sas:"SAS",sass:"Sass (Sass)",scss:"Sass (Scss)",sql:"SQL",soy:"Soy (Closure Template)",typescript:"TypeScript",vbnet:"VB.Net",vhdl:"VHDL",vim:"vim","visual-basic":"Visual Basic",wasm:"WebAssembly",wiki:"Wiki markup",xojo:"Xojo (REALbasic)",yaml:"YAML"};Prism.plugins.toolbar.registerButton("show-language",function(t){var a=t.element.parentNode;if(a&&/pre/i.test(a.nodeName)){var s=a.getAttribute("data-language")||e[t.language]||t.language.substring(0,1).toUpperCase()+t.language.substring(1),i=document.createElement("span");return i.textContent=s,i}})}}(); \ No newline at end of file +!function(){if("undefined"!=typeof self&&self.Prism&&self.document){if(!Prism.plugins.toolbar)return console.warn("Show Languages plugin loaded before Toolbar plugin."),void 0;var e={html:"HTML",xml:"XML",svg:"SVG",mathml:"MathML",css:"CSS",clike:"C-like",javascript:"JavaScript",abap:"ABAP",actionscript:"ActionScript",apacheconf:"Apache Configuration",apl:"APL",applescript:"AppleScript",arff:"ARFF",asciidoc:"AsciiDoc",asm6502:"6502 Assembly",aspnet:"ASP.NET (C#)",autohotkey:"AutoHotkey",autoit:"AutoIt",basic:"BASIC",csharp:"C#",cpp:"C++",coffeescript:"CoffeeScript",csp:"Content-Security-Policy","css-extras":"CSS Extras",django:"Django/Jinja2",erb:"ERB",fsharp:"F#",gedcom:"GEDCOM",glsl:"GLSL",graphql:"GraphQL",http:"HTTP",hpkp:"HTTP Public-Key-Pins",hsts:"HTTP Strict-Transport-Security",ichigojam:"IchigoJam",inform7:"Inform 7",json:"JSON",latex:"LaTeX",livescript:"LiveScript",lolcode:"LOLCODE","markup-templating":"Markup templating",matlab:"MATLAB",mel:"MEL",n4js:"N4JS",nasm:"NASM",nginx:"nginx",nsis:"NSIS",objectivec:"Objective-C",ocaml:"OCaml",opencl:"OpenCL",parigp:"PARI/GP",php:"PHP","php-extras":"PHP Extras",plsql:"PL/SQL",powershell:"PowerShell",properties:".properties",protobuf:"Protocol Buffers",q:"Q (kdb+ database)",jsx:"React JSX",tsx:"React TSX",renpy:"Ren'py",rest:"reST (reStructuredText)",sas:"SAS",sass:"Sass (Sass)",scss:"Sass (Scss)",sql:"SQL",soy:"Soy (Closure Template)",typescript:"TypeScript",vbnet:"VB.Net",vhdl:"VHDL",vim:"vim","visual-basic":"Visual Basic",wasm:"WebAssembly",wiki:"Wiki markup",xojo:"Xojo (REALbasic)",yaml:"YAML"};Prism.plugins.toolbar.registerButton("show-language",function(a){var t=a.element.parentNode;if(t&&/pre/i.test(t.nodeName)){var s=t.getAttribute("data-language")||e[a.language]||a.language&&a.language.substring(0,1).toUpperCase()+a.language.substring(1);if(s){var i=document.createElement("span");return i.textContent=s,i}}})}}(); \ No newline at end of file From fa328bb1c14cc394e05197eefba4d0c58c819b2d Mon Sep 17 00:00:00 2001 From: Golmote Date: Tue, 1 May 2018 16:53:32 +0200 Subject: [PATCH 0020/1100] ASP.NET should require C# --- components.js | 2 +- components.json | 2 +- plugins/autoloader/prism-autoloader.js | 2 +- plugins/autoloader/prism-autoloader.min.js | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/components.js b/components.js index 96df9fa3d8..ef16b34056 100644 --- a/components.js +++ b/components.js @@ -1,2 +1,2 @@ -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default"},"clike":{"title":"C-like","option":"default","overrideExampleHeader":true},"javascript":{"title":"JavaScript","require":"clike","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"actionscript":{"title":"ActionScript","require":"javascript","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":"markup","owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","alias":"shell","owner":"Golmote"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":"dotnet","owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"coffeescript":{"title":"CoffeeScript","require":"javascript","owner":"R-osey"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup","alias":"jinja2","owner":"romanvm"},"docker":{"title":"Docker","owner":"JustinBeckwith"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"http":{"title":"HTTP","owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"json":{"title":"JSON","owner":"CupOfTea696"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","owner":"japborst"},"less":{"title":"Less","require":"css","owner":"Golmote"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","owner":"JuanCaicedo","alias":["emacs","elisp","emacs-lisp"]},"livescript":{"title":"LiveScript","owner":"Golmote"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"n4js":{"title":"N4JS","require":"javascript","owner":"bsmith-n4"},"nasm":{"title":"NASM","owner":"rbmj"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"cpp","overrideExampleHeader":true,"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","owner":"Golmote"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"php-extras":{"title":"PHP Extras","require":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":"javascript","owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","owner":"Golmote"},"python":{"title":"Python","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"ruby":{"title":"Ruby","require":"clike","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sql":{"title":"SQL","owner":"multipetros"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","owner":"Golmote"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","alias":"ts","owner":"vkbansal"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","owner":"Golmote","alias":"vb"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"yaml":{"title":"YAML","owner":"hason"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":"Line Highlight","line-numbers":{"title":"Line Numbers","owner":"kuba-kubula"},"show-invisibles":"Show Invisibles","autolinker":"Autolinker","wpd":"WebPlatform Docs","custom-class":{"title":"Custom Class","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","noCSS":true},"show-language":{"title":"Show Language","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","owner":"Golmote","noCSS":true},"previewers":{"title":"Previewers","owner":"Golmote"},"autoloader":{"title":"Autoloader","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","owner":"Golmote","after":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","owner":"chriswells0"},"unescaped-markup":"Unescaped Markup","normalize-whitespace":{"title":"Normalize Whitespace","owner":"zeitgeist87","after":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","owner":"mAAdhaTTah","require":"toolbar","noCSS":true}}}; +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default"},"clike":{"title":"C-like","option":"default","overrideExampleHeader":true},"javascript":{"title":"JavaScript","require":"clike","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"actionscript":{"title":"ActionScript","require":"javascript","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","alias":"shell","owner":"Golmote"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":"dotnet","owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"coffeescript":{"title":"CoffeeScript","require":"javascript","owner":"R-osey"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup","alias":"jinja2","owner":"romanvm"},"docker":{"title":"Docker","owner":"JustinBeckwith"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"http":{"title":"HTTP","owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"json":{"title":"JSON","owner":"CupOfTea696"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","owner":"japborst"},"less":{"title":"Less","require":"css","owner":"Golmote"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","owner":"JuanCaicedo","alias":["emacs","elisp","emacs-lisp"]},"livescript":{"title":"LiveScript","owner":"Golmote"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"n4js":{"title":"N4JS","require":"javascript","owner":"bsmith-n4"},"nasm":{"title":"NASM","owner":"rbmj"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"cpp","overrideExampleHeader":true,"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","owner":"Golmote"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"php-extras":{"title":"PHP Extras","require":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":"javascript","owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","owner":"Golmote"},"python":{"title":"Python","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"ruby":{"title":"Ruby","require":"clike","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sql":{"title":"SQL","owner":"multipetros"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","owner":"Golmote"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","alias":"ts","owner":"vkbansal"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","owner":"Golmote","alias":"vb"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"yaml":{"title":"YAML","owner":"hason"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":"Line Highlight","line-numbers":{"title":"Line Numbers","owner":"kuba-kubula"},"show-invisibles":"Show Invisibles","autolinker":"Autolinker","wpd":"WebPlatform Docs","custom-class":{"title":"Custom Class","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","noCSS":true},"show-language":{"title":"Show Language","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","owner":"Golmote","noCSS":true},"previewers":{"title":"Previewers","owner":"Golmote"},"autoloader":{"title":"Autoloader","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","owner":"Golmote","after":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","owner":"chriswells0"},"unescaped-markup":"Unescaped Markup","normalize-whitespace":{"title":"Normalize Whitespace","owner":"zeitgeist87","after":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","owner":"mAAdhaTTah","require":"toolbar","noCSS":true}}}; if (typeof module !== 'undefined' && module.exports) { module.exports = components; } \ No newline at end of file diff --git a/components.json b/components.json index 4c5b068c3a..a8642bec7d 100644 --- a/components.json +++ b/components.json @@ -116,7 +116,7 @@ }, "aspnet": { "title": "ASP.NET (C#)", - "require": "markup", + "require": ["markup", "csharp"], "owner": "nauzilus" }, "autohotkey": { diff --git a/plugins/autoloader/prism-autoloader.js b/plugins/autoloader/prism-autoloader.js index 33190b0c79..4f8de29f03 100644 --- a/plugins/autoloader/prism-autoloader.js +++ b/plugins/autoloader/prism-autoloader.js @@ -4,7 +4,7 @@ } // The dependencies map is built automatically with gulp - var lang_dependencies = /*languages_placeholder[*/{"javascript":"clike","actionscript":"javascript","arduino":"cpp","aspnet":"markup","bison":"c","c":"clike","csharp":"clike","cpp":"c","coffeescript":"javascript","crystal":"ruby","css-extras":"css","d":"clike","dart":"clike","django":"markup","erb":["ruby","markup-templating"],"fsharp":"clike","flow":"javascript","glsl":"clike","go":"clike","groovy":"clike","haml":"ruby","handlebars":"markup-templating","haxe":"clike","java":"clike","jolie":"clike","kotlin":"clike","less":"css","markdown":"markup","markup-templating":"markup","n4js":"javascript","nginx":"clike","objectivec":"c","opencl":"cpp","parser":"markup","php":["clike","markup-templating"],"php-extras":"php","plsql":"sql","processing":"clike","protobuf":"clike","pug":"javascript","qore":"clike","jsx":["markup","javascript"],"tsx":["jsx","typescript"],"reason":"clike","ruby":"clike","sass":"css","scss":"css","scala":"java","smarty":"markup-templating","soy":"markup-templating","swift":"clike","textile":"markup","twig":"markup","typescript":"javascript","vbnet":"basic","velocity":"markup","wiki":"markup","xeora":"markup"}/*]*/; + var lang_dependencies = /*languages_placeholder[*/{"javascript":"clike","actionscript":"javascript","arduino":"cpp","aspnet":["markup","csharp"],"bison":"c","c":"clike","csharp":"clike","cpp":"c","coffeescript":"javascript","crystal":"ruby","css-extras":"css","d":"clike","dart":"clike","django":"markup","erb":["ruby","markup-templating"],"fsharp":"clike","flow":"javascript","glsl":"clike","go":"clike","groovy":"clike","haml":"ruby","handlebars":"markup-templating","haxe":"clike","java":"clike","jolie":"clike","kotlin":"clike","less":"css","markdown":"markup","markup-templating":"markup","n4js":"javascript","nginx":"clike","objectivec":"c","opencl":"cpp","parser":"markup","php":["clike","markup-templating"],"php-extras":"php","plsql":"sql","processing":"clike","protobuf":"clike","pug":"javascript","qore":"clike","jsx":["markup","javascript"],"tsx":["jsx","typescript"],"reason":"clike","ruby":"clike","sass":"css","scss":"css","scala":"java","smarty":"markup-templating","soy":"markup-templating","swift":"clike","textile":"markup","twig":"markup","typescript":"javascript","vbnet":"basic","velocity":"markup","wiki":"markup","xeora":"markup"}/*]*/; var lang_data = {}; diff --git a/plugins/autoloader/prism-autoloader.min.js b/plugins/autoloader/prism-autoloader.min.js index f982f08af5..5ad5a809cc 100644 --- a/plugins/autoloader/prism-autoloader.min.js +++ b/plugins/autoloader/prism-autoloader.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof self&&self.Prism&&self.document&&document.createElement){var e={javascript:"clike",actionscript:"javascript",arduino:"cpp",aspnet:"markup",bison:"c",c:"clike",csharp:"clike",cpp:"c",coffeescript:"javascript",crystal:"ruby","css-extras":"css",d:"clike",dart:"clike",django:"markup",erb:["ruby","markup-templating"],fsharp:"clike",flow:"javascript",glsl:"clike",go:"clike",groovy:"clike",haml:"ruby",handlebars:"markup-templating",haxe:"clike",java:"clike",jolie:"clike",kotlin:"clike",less:"css",markdown:"markup","markup-templating":"markup",n4js:"javascript",nginx:"clike",objectivec:"c",opencl:"cpp",parser:"markup",php:["clike","markup-templating"],"php-extras":"php",plsql:"sql",processing:"clike",protobuf:"clike",pug:"javascript",qore:"clike",jsx:["markup","javascript"],tsx:["jsx","typescript"],reason:"clike",ruby:"clike",sass:"css",scss:"css",scala:"java",smarty:"markup-templating",soy:"markup-templating",swift:"clike",textile:"markup",twig:"markup",typescript:"javascript",vbnet:"basic",velocity:"markup",wiki:"markup",xeora:"markup"},a={},c="none",t=document.getElementsByTagName("script");t=t[t.length-1];var r="components/";if(t.hasAttribute("data-autoloader-path")){var s=t.getAttribute("data-autoloader-path").trim();s.length>0&&!/^[a-z]+:\/\//i.test(t.src)&&(r=s.replace(/\/?$/,"/"))}else/[\w-]+\.js$/.test(t.src)&&(r=t.src.replace(/[\w-]+\.js$/,"components/"));var n=Prism.plugins.autoloader={languages_path:r,use_minified:!0},t=function(e,a,c){var t=document.createElement("script");t.src=e,t.async=!0,t.onload=function(){document.body.removeChild(t),a&&a()},t.onerror=function(){document.body.removeChild(t),c&&c()},document.body.appendChild(t)},i=function(e){return n.languages_path+"prism-"+e+(n.use_minified?".min":"")+".js"},l=function(e,c){var t=a[e];t||(t=a[e]={});var r=c.getAttribute("data-dependencies");!r&&c.parentNode&&"pre"===c.parentNode.tagName.toLowerCase()&&(r=c.parentNode.getAttribute("data-dependencies")),r=r?r.split(/\s*,\s*/g):[],o(r,function(){p(e,function(){Prism.highlightElement(c)})})},o=function(e,a,c){"string"==typeof e&&(e=[e]);var t=0,r=e.length,s=function(){r>t?p(e[t],function(){t++,s()},function(){c&&c(e[t])}):t===r&&a&&a(e)};s()},p=function(c,r,s){var n=function(){var e=!1;c.indexOf("!")>=0&&(e=!0,c=c.replace("!",""));var n=a[c];if(n||(n=a[c]={}),r&&(n.success_callbacks||(n.success_callbacks=[]),n.success_callbacks.push(r)),s&&(n.error_callbacks||(n.error_callbacks=[]),n.error_callbacks.push(s)),!e&&Prism.languages[c])u(c);else if(!e&&n.error)m(c);else if(e||!n.loading){n.loading=!0;var l=i(c);t(l,function(){n.loading=!1,u(c)},function(){n.loading=!1,n.error=!0,m(c)})}},l=e[c];l&&l.length?o(l,n):n()},u=function(e){a[e]&&a[e].success_callbacks&&a[e].success_callbacks.length&&a[e].success_callbacks.forEach(function(a){a(e)})},m=function(e){a[e]&&a[e].error_callbacks&&a[e].error_callbacks.length&&a[e].error_callbacks.forEach(function(a){a(e)})};Prism.hooks.add("complete",function(e){e.element&&e.language&&!e.grammar&&e.language!==c&&l(e.language,e.element)})}}(); \ No newline at end of file +!function(){if("undefined"!=typeof self&&self.Prism&&self.document&&document.createElement){var e={javascript:"clike",actionscript:"javascript",arduino:"cpp",aspnet:["markup","csharp"],bison:"c",c:"clike",csharp:"clike",cpp:"c",coffeescript:"javascript",crystal:"ruby","css-extras":"css",d:"clike",dart:"clike",django:"markup",erb:["ruby","markup-templating"],fsharp:"clike",flow:"javascript",glsl:"clike",go:"clike",groovy:"clike",haml:"ruby",handlebars:"markup-templating",haxe:"clike",java:"clike",jolie:"clike",kotlin:"clike",less:"css",markdown:"markup","markup-templating":"markup",n4js:"javascript",nginx:"clike",objectivec:"c",opencl:"cpp",parser:"markup",php:["clike","markup-templating"],"php-extras":"php",plsql:"sql",processing:"clike",protobuf:"clike",pug:"javascript",qore:"clike",jsx:["markup","javascript"],tsx:["jsx","typescript"],reason:"clike",ruby:"clike",sass:"css",scss:"css",scala:"java",smarty:"markup-templating",soy:"markup-templating",swift:"clike",textile:"markup",twig:"markup",typescript:"javascript",vbnet:"basic",velocity:"markup",wiki:"markup",xeora:"markup"},a={},c="none",t=document.getElementsByTagName("script");t=t[t.length-1];var r="components/";if(t.hasAttribute("data-autoloader-path")){var s=t.getAttribute("data-autoloader-path").trim();s.length>0&&!/^[a-z]+:\/\//i.test(t.src)&&(r=s.replace(/\/?$/,"/"))}else/[\w-]+\.js$/.test(t.src)&&(r=t.src.replace(/[\w-]+\.js$/,"components/"));var n=Prism.plugins.autoloader={languages_path:r,use_minified:!0},t=function(e,a,c){var t=document.createElement("script");t.src=e,t.async=!0,t.onload=function(){document.body.removeChild(t),a&&a()},t.onerror=function(){document.body.removeChild(t),c&&c()},document.body.appendChild(t)},i=function(e){return n.languages_path+"prism-"+e+(n.use_minified?".min":"")+".js"},l=function(e,c){var t=a[e];t||(t=a[e]={});var r=c.getAttribute("data-dependencies");!r&&c.parentNode&&"pre"===c.parentNode.tagName.toLowerCase()&&(r=c.parentNode.getAttribute("data-dependencies")),r=r?r.split(/\s*,\s*/g):[],o(r,function(){p(e,function(){Prism.highlightElement(c)})})},o=function(e,a,c){"string"==typeof e&&(e=[e]);var t=0,r=e.length,s=function(){r>t?p(e[t],function(){t++,s()},function(){c&&c(e[t])}):t===r&&a&&a(e)};s()},p=function(c,r,s){var n=function(){var e=!1;c.indexOf("!")>=0&&(e=!0,c=c.replace("!",""));var n=a[c];if(n||(n=a[c]={}),r&&(n.success_callbacks||(n.success_callbacks=[]),n.success_callbacks.push(r)),s&&(n.error_callbacks||(n.error_callbacks=[]),n.error_callbacks.push(s)),!e&&Prism.languages[c])u(c);else if(!e&&n.error)m(c);else if(e||!n.loading){n.loading=!0;var l=i(c);t(l,function(){n.loading=!1,u(c)},function(){n.loading=!1,n.error=!0,m(c)})}},l=e[c];l&&l.length?o(l,n):n()},u=function(e){a[e]&&a[e].success_callbacks&&a[e].success_callbacks.length&&a[e].success_callbacks.forEach(function(a){a(e)})},m=function(e){a[e]&&a[e].error_callbacks&&a[e].error_callbacks.length&&a[e].error_callbacks.forEach(function(a){a(e)})};Prism.hooks.add("complete",function(e){e.element&&e.language&&!e.grammar&&e.language!==c&&l(e.language,e.element)})}}(); \ No newline at end of file From e063992b81028d71cd4e45e792f556cffe9b52ea Mon Sep 17 00:00:00 2001 From: Guido Flohr Date: Thu, 10 May 2018 12:07:34 +0300 Subject: [PATCH 0021/1100] Support for Template Toolkit 2 (#1418) * support for Template Toolkit 2 * optimized quoted string regexes * optimized double-quoted string regex * fully qualified tt2 plug-in names don't work Also use \w. * do not use empty character class See #1107. * put keyword tests in alphabetical order * ordered tt2 keywords alphabetically * removed redundant operator rule for tt2 * removed possibly existing old rules before inserti * indentation * allow backslash in front of lf in tt2 strings * indentation * avoid backtracking * escape xml special characters * indent with tab instead of spaces * greedy is no longer needed for variables Also use \w instead of explicit character class. * re-generated with gulp --- components.js | 2 +- components.json | 5 + components/prism-tt2.js | 59 ++++++++ components/prism-tt2.min.js | 1 + examples/prism-tt2.html | 61 ++++++++ plugins/autoloader/prism-autoloader.js | 2 +- plugins/autoloader/prism-autoloader.min.js | 2 +- plugins/show-language/prism-show-language.js | 2 +- .../show-language/prism-show-language.min.js | 2 +- .../markup+tt2/tt2_in_markup_feature.test | 89 ++++++++++++ tests/languages/tt2/comment_feature.test | 36 +++++ tests/languages/tt2/delimiter_feature.test | 18 +++ tests/languages/tt2/keyword_feature.test | 130 ++++++++++++++++++ tests/languages/tt2/operator_feature.test | 69 ++++++++++ .../tt2/string-interpolation_feature.test | 21 +++ tests/languages/tt2/string_feature.test | 35 +++++ tests/languages/tt2/variable_feature.test | 36 +++++ 17 files changed, 565 insertions(+), 5 deletions(-) create mode 100644 components/prism-tt2.js create mode 100644 components/prism-tt2.min.js create mode 100644 examples/prism-tt2.html create mode 100644 tests/languages/markup+tt2/tt2_in_markup_feature.test create mode 100644 tests/languages/tt2/comment_feature.test create mode 100644 tests/languages/tt2/delimiter_feature.test create mode 100644 tests/languages/tt2/keyword_feature.test create mode 100644 tests/languages/tt2/operator_feature.test create mode 100644 tests/languages/tt2/string-interpolation_feature.test create mode 100644 tests/languages/tt2/string_feature.test create mode 100644 tests/languages/tt2/variable_feature.test diff --git a/components.js b/components.js index ef16b34056..0f317551ca 100644 --- a/components.js +++ b/components.js @@ -1,2 +1,2 @@ -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default"},"clike":{"title":"C-like","option":"default","overrideExampleHeader":true},"javascript":{"title":"JavaScript","require":"clike","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"actionscript":{"title":"ActionScript","require":"javascript","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","alias":"shell","owner":"Golmote"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":"dotnet","owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"coffeescript":{"title":"CoffeeScript","require":"javascript","owner":"R-osey"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup","alias":"jinja2","owner":"romanvm"},"docker":{"title":"Docker","owner":"JustinBeckwith"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"http":{"title":"HTTP","owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"json":{"title":"JSON","owner":"CupOfTea696"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","owner":"japborst"},"less":{"title":"Less","require":"css","owner":"Golmote"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","owner":"JuanCaicedo","alias":["emacs","elisp","emacs-lisp"]},"livescript":{"title":"LiveScript","owner":"Golmote"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"n4js":{"title":"N4JS","require":"javascript","owner":"bsmith-n4"},"nasm":{"title":"NASM","owner":"rbmj"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"cpp","overrideExampleHeader":true,"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","owner":"Golmote"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"php-extras":{"title":"PHP Extras","require":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":"javascript","owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","owner":"Golmote"},"python":{"title":"Python","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"ruby":{"title":"Ruby","require":"clike","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sql":{"title":"SQL","owner":"multipetros"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","owner":"Golmote"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","alias":"ts","owner":"vkbansal"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","owner":"Golmote","alias":"vb"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"yaml":{"title":"YAML","owner":"hason"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":"Line Highlight","line-numbers":{"title":"Line Numbers","owner":"kuba-kubula"},"show-invisibles":"Show Invisibles","autolinker":"Autolinker","wpd":"WebPlatform Docs","custom-class":{"title":"Custom Class","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","noCSS":true},"show-language":{"title":"Show Language","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","owner":"Golmote","noCSS":true},"previewers":{"title":"Previewers","owner":"Golmote"},"autoloader":{"title":"Autoloader","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","owner":"Golmote","after":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","owner":"chriswells0"},"unescaped-markup":"Unescaped Markup","normalize-whitespace":{"title":"Normalize Whitespace","owner":"zeitgeist87","after":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","owner":"mAAdhaTTah","require":"toolbar","noCSS":true}}}; +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default"},"clike":{"title":"C-like","option":"default","overrideExampleHeader":true},"javascript":{"title":"JavaScript","require":"clike","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"actionscript":{"title":"ActionScript","require":"javascript","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","alias":"shell","owner":"Golmote"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":"dotnet","owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"coffeescript":{"title":"CoffeeScript","require":"javascript","owner":"R-osey"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup","alias":"jinja2","owner":"romanvm"},"docker":{"title":"Docker","owner":"JustinBeckwith"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"http":{"title":"HTTP","owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"json":{"title":"JSON","owner":"CupOfTea696"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","owner":"japborst"},"less":{"title":"Less","require":"css","owner":"Golmote"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","owner":"JuanCaicedo","alias":["emacs","elisp","emacs-lisp"]},"livescript":{"title":"LiveScript","owner":"Golmote"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"n4js":{"title":"N4JS","require":"javascript","owner":"bsmith-n4"},"nasm":{"title":"NASM","owner":"rbmj"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"cpp","overrideExampleHeader":true,"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","owner":"Golmote"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"php-extras":{"title":"PHP Extras","require":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":"javascript","owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","owner":"Golmote"},"python":{"title":"Python","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"ruby":{"title":"Ruby","require":"clike","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sql":{"title":"SQL","owner":"multipetros"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","owner":"Golmote"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","alias":"ts","owner":"vkbansal"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","owner":"Golmote","alias":"vb"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"yaml":{"title":"YAML","owner":"hason"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":"Line Highlight","line-numbers":{"title":"Line Numbers","owner":"kuba-kubula"},"show-invisibles":"Show Invisibles","autolinker":"Autolinker","wpd":"WebPlatform Docs","custom-class":{"title":"Custom Class","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","noCSS":true},"show-language":{"title":"Show Language","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","owner":"Golmote","noCSS":true},"previewers":{"title":"Previewers","owner":"Golmote"},"autoloader":{"title":"Autoloader","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","owner":"Golmote","after":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","owner":"chriswells0"},"unescaped-markup":"Unescaped Markup","normalize-whitespace":{"title":"Normalize Whitespace","owner":"zeitgeist87","after":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","owner":"mAAdhaTTah","require":"toolbar","noCSS":true}}}; if (typeof module !== 'undefined' && module.exports) { module.exports = components; } \ No newline at end of file diff --git a/components.json b/components.json index a8642bec7d..a26e080806 100644 --- a/components.json +++ b/components.json @@ -651,6 +651,11 @@ "require": "markup", "owner": "Golmote" }, + "tt2": { + "title": "Template Toolkit 2", + "require": ["clike", "markup-templating"], + "owner": "gflohr" + }, "twig": { "title": "Twig", "require": "markup", diff --git a/components/prism-tt2.js b/components/prism-tt2.js new file mode 100644 index 0000000000..4a9215493e --- /dev/null +++ b/components/prism-tt2.js @@ -0,0 +1,59 @@ +(function(Prism) { + + Prism.languages.tt2 = Prism.languages.extend('clike', { + comment: { + pattern: /#.*|\[%#[\s\S]*?%\]/, + lookbehind: true + }, + keyword: /\b(?:BLOCK|CALL|CASE|CATCH|CLEAR|DEBUG|DEFAULT|ELSE|ELSIF|END|FILTER|FINAL|FOREACH|GET|IF|IN|INCLUDE|INSERT|LAST|MACRO|META|NEXT|PERL|PROCESS|RAWPERL|RETURN|SET|STOP|TAGS|THROW|TRY|SWITCH|UNLESS|USE|WHILE|WRAPPER)\b/, + punctuation: /[[\]{},()]/ + }); + + delete Prism.languages.tt2['operator']; + delete Prism.languages.tt2['variable']; + Prism.languages.insertBefore('tt2', 'number', { + operator: /=[>=]?|!=?|<=?|>=?|&&|\|\|?|\b(?:and|or|not)\b/, + variable: { + pattern: /[a-z]\w*(?:\s*\.\s*(?:\d+|\$?[a-z]\w*))*/i + } + }); + + delete Prism.languages.tt2['delimiter']; + Prism.languages.insertBefore('tt2', 'keyword', { + 'delimiter': { + pattern: /^(?:\[%|%%)-?|-?%]$/, + alias: 'punctuation' + } + }); + + Prism.languages.insertBefore('tt2', 'string', { + 'single-quoted-string': { + pattern: /'[^\\']*(?:\\[\s\S][^\\']*)*'/, + greedy: true, + alias: 'string' + }, + 'double-quoted-string': { + pattern: /"[^\\"]*(?:\\[\s\S][^\\"]*)*"/, + greedy: true, + alias: 'string', + inside: { + variable: { + pattern: /\$(?:[a-z]\w*(?:\.(?:\d+|\$?[a-z]\w*))*)/i + } + } + } + }); + + // The different types of TT2 strings "replace" the C-like standard string + delete Prism.languages.tt2.string; + + Prism.hooks.add('before-tokenize', function(env) { + var tt2Pattern = /\[%[\s\S]+?%\]/g; + Prism.languages['markup-templating'].buildPlaceholders(env, 'tt2', tt2Pattern); + }); + + Prism.hooks.add('after-tokenize', function(env) { + Prism.languages['markup-templating'].tokenizePlaceholders(env, 'tt2'); + }); + +}(Prism)); diff --git a/components/prism-tt2.min.js b/components/prism-tt2.min.js new file mode 100644 index 0000000000..f817316510 --- /dev/null +++ b/components/prism-tt2.min.js @@ -0,0 +1 @@ +!function(e){e.languages.tt2=e.languages.extend("clike",{comment:{pattern:/#.*|\[%#[\s\S]*?%\]/,lookbehind:!0},keyword:/\b(?:BLOCK|CALL|CASE|CATCH|CLEAR|DEBUG|DEFAULT|ELSE|ELSIF|END|FILTER|FINAL|FOREACH|GET|IF|IN|INCLUDE|INSERT|LAST|MACRO|META|NEXT|PERL|PROCESS|RAWPERL|RETURN|SET|STOP|TAGS|THROW|TRY|SWITCH|UNLESS|USE|WHILE|WRAPPER)\b/,punctuation:/[[\]{},()]/}),delete e.languages.tt2.operator,delete e.languages.tt2.variable,e.languages.insertBefore("tt2","number",{operator:/=[>=]?|!=?|<=?|>=?|&&|\|\|?|\b(?:and|or|not)\b/,variable:{pattern:/[a-z]\w*(?:\s*\.\s*(?:\d+|\$?[a-z]\w*))*/i}}),delete e.languages.tt2.delimiter,e.languages.insertBefore("tt2","keyword",{delimiter:{pattern:/^(?:\[%|%%)-?|-?%]$/,alias:"punctuation"}}),e.languages.insertBefore("tt2","string",{"single-quoted-string":{pattern:/'[^\\']*(?:\\[\s\S][^\\']*)*'/,greedy:!0,alias:"string"},"double-quoted-string":{pattern:/"[^\\"]*(?:\\[\s\S][^\\"]*)*"/,greedy:!0,alias:"string",inside:{variable:{pattern:/\$(?:[a-z]\w*(?:\.(?:\d+|\$?[a-z]\w*))*)/i}}}}),delete e.languages.tt2.string,e.hooks.add("before-tokenize",function(t){var a=/\[%[\s\S]+?%\]/g;e.languages["markup-templating"].buildPlaceholders(t,"tt2",a)}),e.hooks.add("after-tokenize",function(t){e.languages["markup-templating"].tokenizePlaceholders(t,"tt2")})}(Prism); \ No newline at end of file diff --git a/examples/prism-tt2.html b/examples/prism-tt2.html new file mode 100644 index 0000000000..1a6711f970 --- /dev/null +++ b/examples/prism-tt2.html @@ -0,0 +1,61 @@ +

    Comments

    +
    [%# this entire directive is ignored no
    +    matter how many lines it wraps onto
    +%]
    +[% # this is a comment
    +   theta = 20      # so is this
    +   rho   = 30      # <aol>me too!</aol>
    +%]
    +
    + +

    Variables

    +
    [% text %]
    +[% article.title %]
    +[%= eat.whitespace.left %]
    +[% eat.whitespace.right =%]
    +[%= eat.whitespace.both =%]
    +[% object.method() %]
    + + +

    Conditionals and Loops

    +
    [% IF foo = bar %]
    +this
    +[% ELSE %]
    +that
    +[% END %]
    +[% FOREACH post IN q.listPosts(lingua = "de") %]
    +  <a href="[% post.permalink %]">[% post.title | html %]</a>
    +[% END %]
    + +

    Multiple Directives

    +
    [% IF title;
    +      INCLUDE header;
    +   ELSE;
    +      INCLUDE other/header  title="Some Other Title";
    +   END
    +%]
    + +

    Operators

    +
    [% FOREACH post IN q.listPosts(lingua => 'de') %]
    +  [% post.title | myfilter(foo = "bar") %]
    +[% END %]
    + +

    Known Limitations

    +
      +
    • + Outline tags are not supported.
    • +
    • The arguments to + TAGS + are usually misinterpreted
    • +
    • In TT2, you can use keywords as identifiers where this is + unambiguous. But these keywords will be highlighted as keywords, not + as variables here.
    • +
    • The + ANYCASE + option is not supported.
    • +
    • + Any number of backslashes in front of dollar signs inside of double quoted + strings are ignored since the behavior of Template Toolkit 2.26 seems to be + inconsistent. +
    • +
    diff --git a/plugins/autoloader/prism-autoloader.js b/plugins/autoloader/prism-autoloader.js index 4f8de29f03..f4c8d41f36 100644 --- a/plugins/autoloader/prism-autoloader.js +++ b/plugins/autoloader/prism-autoloader.js @@ -4,7 +4,7 @@ } // The dependencies map is built automatically with gulp - var lang_dependencies = /*languages_placeholder[*/{"javascript":"clike","actionscript":"javascript","arduino":"cpp","aspnet":["markup","csharp"],"bison":"c","c":"clike","csharp":"clike","cpp":"c","coffeescript":"javascript","crystal":"ruby","css-extras":"css","d":"clike","dart":"clike","django":"markup","erb":["ruby","markup-templating"],"fsharp":"clike","flow":"javascript","glsl":"clike","go":"clike","groovy":"clike","haml":"ruby","handlebars":"markup-templating","haxe":"clike","java":"clike","jolie":"clike","kotlin":"clike","less":"css","markdown":"markup","markup-templating":"markup","n4js":"javascript","nginx":"clike","objectivec":"c","opencl":"cpp","parser":"markup","php":["clike","markup-templating"],"php-extras":"php","plsql":"sql","processing":"clike","protobuf":"clike","pug":"javascript","qore":"clike","jsx":["markup","javascript"],"tsx":["jsx","typescript"],"reason":"clike","ruby":"clike","sass":"css","scss":"css","scala":"java","smarty":"markup-templating","soy":"markup-templating","swift":"clike","textile":"markup","twig":"markup","typescript":"javascript","vbnet":"basic","velocity":"markup","wiki":"markup","xeora":"markup"}/*]*/; + var lang_dependencies = /*languages_placeholder[*/{"javascript":"clike","actionscript":"javascript","arduino":"cpp","aspnet":["markup","csharp"],"bison":"c","c":"clike","csharp":"clike","cpp":"c","coffeescript":"javascript","crystal":"ruby","css-extras":"css","d":"clike","dart":"clike","django":"markup","erb":["ruby","markup-templating"],"fsharp":"clike","flow":"javascript","glsl":"clike","go":"clike","groovy":"clike","haml":"ruby","handlebars":"markup-templating","haxe":"clike","java":"clike","jolie":"clike","kotlin":"clike","less":"css","markdown":"markup","markup-templating":"markup","n4js":"javascript","nginx":"clike","objectivec":"c","opencl":"cpp","parser":"markup","php":["clike","markup-templating"],"php-extras":"php","plsql":"sql","processing":"clike","protobuf":"clike","pug":"javascript","qore":"clike","jsx":["markup","javascript"],"tsx":["jsx","typescript"],"reason":"clike","ruby":"clike","sass":"css","scss":"css","scala":"java","smarty":"markup-templating","soy":"markup-templating","swift":"clike","textile":"markup","tt2":["clike","markup-templating"],"twig":"markup","typescript":"javascript","vbnet":"basic","velocity":"markup","wiki":"markup","xeora":"markup"}/*]*/; var lang_data = {}; diff --git a/plugins/autoloader/prism-autoloader.min.js b/plugins/autoloader/prism-autoloader.min.js index 5ad5a809cc..bfd03a098f 100644 --- a/plugins/autoloader/prism-autoloader.min.js +++ b/plugins/autoloader/prism-autoloader.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof self&&self.Prism&&self.document&&document.createElement){var e={javascript:"clike",actionscript:"javascript",arduino:"cpp",aspnet:["markup","csharp"],bison:"c",c:"clike",csharp:"clike",cpp:"c",coffeescript:"javascript",crystal:"ruby","css-extras":"css",d:"clike",dart:"clike",django:"markup",erb:["ruby","markup-templating"],fsharp:"clike",flow:"javascript",glsl:"clike",go:"clike",groovy:"clike",haml:"ruby",handlebars:"markup-templating",haxe:"clike",java:"clike",jolie:"clike",kotlin:"clike",less:"css",markdown:"markup","markup-templating":"markup",n4js:"javascript",nginx:"clike",objectivec:"c",opencl:"cpp",parser:"markup",php:["clike","markup-templating"],"php-extras":"php",plsql:"sql",processing:"clike",protobuf:"clike",pug:"javascript",qore:"clike",jsx:["markup","javascript"],tsx:["jsx","typescript"],reason:"clike",ruby:"clike",sass:"css",scss:"css",scala:"java",smarty:"markup-templating",soy:"markup-templating",swift:"clike",textile:"markup",twig:"markup",typescript:"javascript",vbnet:"basic",velocity:"markup",wiki:"markup",xeora:"markup"},a={},c="none",t=document.getElementsByTagName("script");t=t[t.length-1];var r="components/";if(t.hasAttribute("data-autoloader-path")){var s=t.getAttribute("data-autoloader-path").trim();s.length>0&&!/^[a-z]+:\/\//i.test(t.src)&&(r=s.replace(/\/?$/,"/"))}else/[\w-]+\.js$/.test(t.src)&&(r=t.src.replace(/[\w-]+\.js$/,"components/"));var n=Prism.plugins.autoloader={languages_path:r,use_minified:!0},t=function(e,a,c){var t=document.createElement("script");t.src=e,t.async=!0,t.onload=function(){document.body.removeChild(t),a&&a()},t.onerror=function(){document.body.removeChild(t),c&&c()},document.body.appendChild(t)},i=function(e){return n.languages_path+"prism-"+e+(n.use_minified?".min":"")+".js"},l=function(e,c){var t=a[e];t||(t=a[e]={});var r=c.getAttribute("data-dependencies");!r&&c.parentNode&&"pre"===c.parentNode.tagName.toLowerCase()&&(r=c.parentNode.getAttribute("data-dependencies")),r=r?r.split(/\s*,\s*/g):[],o(r,function(){p(e,function(){Prism.highlightElement(c)})})},o=function(e,a,c){"string"==typeof e&&(e=[e]);var t=0,r=e.length,s=function(){r>t?p(e[t],function(){t++,s()},function(){c&&c(e[t])}):t===r&&a&&a(e)};s()},p=function(c,r,s){var n=function(){var e=!1;c.indexOf("!")>=0&&(e=!0,c=c.replace("!",""));var n=a[c];if(n||(n=a[c]={}),r&&(n.success_callbacks||(n.success_callbacks=[]),n.success_callbacks.push(r)),s&&(n.error_callbacks||(n.error_callbacks=[]),n.error_callbacks.push(s)),!e&&Prism.languages[c])u(c);else if(!e&&n.error)m(c);else if(e||!n.loading){n.loading=!0;var l=i(c);t(l,function(){n.loading=!1,u(c)},function(){n.loading=!1,n.error=!0,m(c)})}},l=e[c];l&&l.length?o(l,n):n()},u=function(e){a[e]&&a[e].success_callbacks&&a[e].success_callbacks.length&&a[e].success_callbacks.forEach(function(a){a(e)})},m=function(e){a[e]&&a[e].error_callbacks&&a[e].error_callbacks.length&&a[e].error_callbacks.forEach(function(a){a(e)})};Prism.hooks.add("complete",function(e){e.element&&e.language&&!e.grammar&&e.language!==c&&l(e.language,e.element)})}}(); \ No newline at end of file +!function(){if("undefined"!=typeof self&&self.Prism&&self.document&&document.createElement){var e={javascript:"clike",actionscript:"javascript",arduino:"cpp",aspnet:["markup","csharp"],bison:"c",c:"clike",csharp:"clike",cpp:"c",coffeescript:"javascript",crystal:"ruby","css-extras":"css",d:"clike",dart:"clike",django:"markup",erb:["ruby","markup-templating"],fsharp:"clike",flow:"javascript",glsl:"clike",go:"clike",groovy:"clike",haml:"ruby",handlebars:"markup-templating",haxe:"clike",java:"clike",jolie:"clike",kotlin:"clike",less:"css",markdown:"markup","markup-templating":"markup",n4js:"javascript",nginx:"clike",objectivec:"c",opencl:"cpp",parser:"markup",php:["clike","markup-templating"],"php-extras":"php",plsql:"sql",processing:"clike",protobuf:"clike",pug:"javascript",qore:"clike",jsx:["markup","javascript"],tsx:["jsx","typescript"],reason:"clike",ruby:"clike",sass:"css",scss:"css",scala:"java",smarty:"markup-templating",soy:"markup-templating",swift:"clike",textile:"markup",tt2:["clike","markup-templating"],twig:"markup",typescript:"javascript",vbnet:"basic",velocity:"markup",wiki:"markup",xeora:"markup"},a={},c="none",t=document.getElementsByTagName("script");t=t[t.length-1];var r="components/";if(t.hasAttribute("data-autoloader-path")){var s=t.getAttribute("data-autoloader-path").trim();s.length>0&&!/^[a-z]+:\/\//i.test(t.src)&&(r=s.replace(/\/?$/,"/"))}else/[\w-]+\.js$/.test(t.src)&&(r=t.src.replace(/[\w-]+\.js$/,"components/"));var i=Prism.plugins.autoloader={languages_path:r,use_minified:!0},t=function(e,a,c){var t=document.createElement("script");t.src=e,t.async=!0,t.onload=function(){document.body.removeChild(t),a&&a()},t.onerror=function(){document.body.removeChild(t),c&&c()},document.body.appendChild(t)},n=function(e){return i.languages_path+"prism-"+e+(i.use_minified?".min":"")+".js"},l=function(e,c){var t=a[e];t||(t=a[e]={});var r=c.getAttribute("data-dependencies");!r&&c.parentNode&&"pre"===c.parentNode.tagName.toLowerCase()&&(r=c.parentNode.getAttribute("data-dependencies")),r=r?r.split(/\s*,\s*/g):[],o(r,function(){p(e,function(){Prism.highlightElement(c)})})},o=function(e,a,c){"string"==typeof e&&(e=[e]);var t=0,r=e.length,s=function(){r>t?p(e[t],function(){t++,s()},function(){c&&c(e[t])}):t===r&&a&&a(e)};s()},p=function(c,r,s){var i=function(){var e=!1;c.indexOf("!")>=0&&(e=!0,c=c.replace("!",""));var i=a[c];if(i||(i=a[c]={}),r&&(i.success_callbacks||(i.success_callbacks=[]),i.success_callbacks.push(r)),s&&(i.error_callbacks||(i.error_callbacks=[]),i.error_callbacks.push(s)),!e&&Prism.languages[c])u(c);else if(!e&&i.error)m(c);else if(e||!i.loading){i.loading=!0;var l=n(c);t(l,function(){i.loading=!1,u(c)},function(){i.loading=!1,i.error=!0,m(c)})}},l=e[c];l&&l.length?o(l,i):i()},u=function(e){a[e]&&a[e].success_callbacks&&a[e].success_callbacks.length&&a[e].success_callbacks.forEach(function(a){a(e)})},m=function(e){a[e]&&a[e].error_callbacks&&a[e].error_callbacks.length&&a[e].error_callbacks.forEach(function(a){a(e)})};Prism.hooks.add("complete",function(e){e.element&&e.language&&!e.grammar&&e.language!==c&&l(e.language,e.element)})}}(); \ No newline at end of file diff --git a/plugins/show-language/prism-show-language.js b/plugins/show-language/prism-show-language.js index b39cd1d234..d8c6664d00 100644 --- a/plugins/show-language/prism-show-language.js +++ b/plugins/show-language/prism-show-language.js @@ -11,7 +11,7 @@ if (!Prism.plugins.toolbar) { } // The languages map is built automatically with gulp -var Languages = /*languages_placeholder[*/{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","css":"CSS","clike":"C-like","javascript":"JavaScript","abap":"ABAP","actionscript":"ActionScript","apacheconf":"Apache Configuration","apl":"APL","applescript":"AppleScript","arff":"ARFF","asciidoc":"AsciiDoc","asm6502":"6502 Assembly","aspnet":"ASP.NET (C#)","autohotkey":"AutoHotkey","autoit":"AutoIt","basic":"BASIC","csharp":"C#","cpp":"C++","coffeescript":"CoffeeScript","csp":"Content-Security-Policy","css-extras":"CSS Extras","django":"Django/Jinja2","erb":"ERB","fsharp":"F#","gedcom":"GEDCOM","glsl":"GLSL","graphql":"GraphQL","http":"HTTP","hpkp":"HTTP Public-Key-Pins","hsts":"HTTP Strict-Transport-Security","ichigojam":"IchigoJam","inform7":"Inform 7","json":"JSON","latex":"LaTeX","livescript":"LiveScript","lolcode":"LOLCODE","markup-templating":"Markup templating","matlab":"MATLAB","mel":"MEL","n4js":"N4JS","nasm":"NASM","nginx":"nginx","nsis":"NSIS","objectivec":"Objective-C","ocaml":"OCaml","opencl":"OpenCL","parigp":"PARI/GP","php":"PHP","php-extras":"PHP Extras","plsql":"PL/SQL","powershell":"PowerShell","properties":".properties","protobuf":"Protocol Buffers","q":"Q (kdb+ database)","jsx":"React JSX","tsx":"React TSX","renpy":"Ren'py","rest":"reST (reStructuredText)","sas":"SAS","sass":"Sass (Sass)","scss":"Sass (Scss)","sql":"SQL","soy":"Soy (Closure Template)","typescript":"TypeScript","vbnet":"VB.Net","vhdl":"VHDL","vim":"vim","visual-basic":"Visual Basic","wasm":"WebAssembly","wiki":"Wiki markup","xojo":"Xojo (REALbasic)","yaml":"YAML"}/*]*/; +var Languages = /*languages_placeholder[*/{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","css":"CSS","clike":"C-like","javascript":"JavaScript","abap":"ABAP","actionscript":"ActionScript","apacheconf":"Apache Configuration","apl":"APL","applescript":"AppleScript","arff":"ARFF","asciidoc":"AsciiDoc","asm6502":"6502 Assembly","aspnet":"ASP.NET (C#)","autohotkey":"AutoHotkey","autoit":"AutoIt","basic":"BASIC","csharp":"C#","cpp":"C++","coffeescript":"CoffeeScript","csp":"Content-Security-Policy","css-extras":"CSS Extras","django":"Django/Jinja2","erb":"ERB","fsharp":"F#","gedcom":"GEDCOM","glsl":"GLSL","graphql":"GraphQL","http":"HTTP","hpkp":"HTTP Public-Key-Pins","hsts":"HTTP Strict-Transport-Security","ichigojam":"IchigoJam","inform7":"Inform 7","json":"JSON","latex":"LaTeX","livescript":"LiveScript","lolcode":"LOLCODE","markup-templating":"Markup templating","matlab":"MATLAB","mel":"MEL","n4js":"N4JS","nasm":"NASM","nginx":"nginx","nsis":"NSIS","objectivec":"Objective-C","ocaml":"OCaml","opencl":"OpenCL","parigp":"PARI/GP","php":"PHP","php-extras":"PHP Extras","plsql":"PL/SQL","powershell":"PowerShell","properties":".properties","protobuf":"Protocol Buffers","q":"Q (kdb+ database)","jsx":"React JSX","tsx":"React TSX","renpy":"Ren'py","rest":"reST (reStructuredText)","sas":"SAS","sass":"Sass (Sass)","scss":"Sass (Scss)","sql":"SQL","soy":"Soy (Closure Template)","tt2":"Template Toolkit 2","typescript":"TypeScript","vbnet":"VB.Net","vhdl":"VHDL","vim":"vim","visual-basic":"Visual Basic","wasm":"WebAssembly","wiki":"Wiki markup","xojo":"Xojo (REALbasic)","yaml":"YAML"}/*]*/; Prism.plugins.toolbar.registerButton('show-language', function(env) { var pre = env.element.parentNode; if (!pre || !/pre/i.test(pre.nodeName)) { diff --git a/plugins/show-language/prism-show-language.min.js b/plugins/show-language/prism-show-language.min.js index 75e2f4ac66..64712c106e 100644 --- a/plugins/show-language/prism-show-language.min.js +++ b/plugins/show-language/prism-show-language.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof self&&self.Prism&&self.document){if(!Prism.plugins.toolbar)return console.warn("Show Languages plugin loaded before Toolbar plugin."),void 0;var e={html:"HTML",xml:"XML",svg:"SVG",mathml:"MathML",css:"CSS",clike:"C-like",javascript:"JavaScript",abap:"ABAP",actionscript:"ActionScript",apacheconf:"Apache Configuration",apl:"APL",applescript:"AppleScript",arff:"ARFF",asciidoc:"AsciiDoc",asm6502:"6502 Assembly",aspnet:"ASP.NET (C#)",autohotkey:"AutoHotkey",autoit:"AutoIt",basic:"BASIC",csharp:"C#",cpp:"C++",coffeescript:"CoffeeScript",csp:"Content-Security-Policy","css-extras":"CSS Extras",django:"Django/Jinja2",erb:"ERB",fsharp:"F#",gedcom:"GEDCOM",glsl:"GLSL",graphql:"GraphQL",http:"HTTP",hpkp:"HTTP Public-Key-Pins",hsts:"HTTP Strict-Transport-Security",ichigojam:"IchigoJam",inform7:"Inform 7",json:"JSON",latex:"LaTeX",livescript:"LiveScript",lolcode:"LOLCODE","markup-templating":"Markup templating",matlab:"MATLAB",mel:"MEL",n4js:"N4JS",nasm:"NASM",nginx:"nginx",nsis:"NSIS",objectivec:"Objective-C",ocaml:"OCaml",opencl:"OpenCL",parigp:"PARI/GP",php:"PHP","php-extras":"PHP Extras",plsql:"PL/SQL",powershell:"PowerShell",properties:".properties",protobuf:"Protocol Buffers",q:"Q (kdb+ database)",jsx:"React JSX",tsx:"React TSX",renpy:"Ren'py",rest:"reST (reStructuredText)",sas:"SAS",sass:"Sass (Sass)",scss:"Sass (Scss)",sql:"SQL",soy:"Soy (Closure Template)",typescript:"TypeScript",vbnet:"VB.Net",vhdl:"VHDL",vim:"vim","visual-basic":"Visual Basic",wasm:"WebAssembly",wiki:"Wiki markup",xojo:"Xojo (REALbasic)",yaml:"YAML"};Prism.plugins.toolbar.registerButton("show-language",function(a){var t=a.element.parentNode;if(t&&/pre/i.test(t.nodeName)){var s=t.getAttribute("data-language")||e[a.language]||a.language&&a.language.substring(0,1).toUpperCase()+a.language.substring(1);if(s){var i=document.createElement("span");return i.textContent=s,i}}})}}(); \ No newline at end of file +!function(){if("undefined"!=typeof self&&self.Prism&&self.document){if(!Prism.plugins.toolbar)return console.warn("Show Languages plugin loaded before Toolbar plugin."),void 0;var e={html:"HTML",xml:"XML",svg:"SVG",mathml:"MathML",css:"CSS",clike:"C-like",javascript:"JavaScript",abap:"ABAP",actionscript:"ActionScript",apacheconf:"Apache Configuration",apl:"APL",applescript:"AppleScript",arff:"ARFF",asciidoc:"AsciiDoc",asm6502:"6502 Assembly",aspnet:"ASP.NET (C#)",autohotkey:"AutoHotkey",autoit:"AutoIt",basic:"BASIC",csharp:"C#",cpp:"C++",coffeescript:"CoffeeScript",csp:"Content-Security-Policy","css-extras":"CSS Extras",django:"Django/Jinja2",erb:"ERB",fsharp:"F#",gedcom:"GEDCOM",glsl:"GLSL",graphql:"GraphQL",http:"HTTP",hpkp:"HTTP Public-Key-Pins",hsts:"HTTP Strict-Transport-Security",ichigojam:"IchigoJam",inform7:"Inform 7",json:"JSON",latex:"LaTeX",livescript:"LiveScript",lolcode:"LOLCODE","markup-templating":"Markup templating",matlab:"MATLAB",mel:"MEL",n4js:"N4JS",nasm:"NASM",nginx:"nginx",nsis:"NSIS",objectivec:"Objective-C",ocaml:"OCaml",opencl:"OpenCL",parigp:"PARI/GP",php:"PHP","php-extras":"PHP Extras",plsql:"PL/SQL",powershell:"PowerShell",properties:".properties",protobuf:"Protocol Buffers",q:"Q (kdb+ database)",jsx:"React JSX",tsx:"React TSX",renpy:"Ren'py",rest:"reST (reStructuredText)",sas:"SAS",sass:"Sass (Sass)",scss:"Sass (Scss)",sql:"SQL",soy:"Soy (Closure Template)",tt2:"Template Toolkit 2",typescript:"TypeScript",vbnet:"VB.Net",vhdl:"VHDL",vim:"vim","visual-basic":"Visual Basic",wasm:"WebAssembly",wiki:"Wiki markup",xojo:"Xojo (REALbasic)",yaml:"YAML"};Prism.plugins.toolbar.registerButton("show-language",function(t){var a=t.element.parentNode;if(a&&/pre/i.test(a.nodeName)){var s=a.getAttribute("data-language")||e[t.language]||t.language&&t.language.substring(0,1).toUpperCase()+t.language.substring(1);if(s){var i=document.createElement("span");return i.textContent=s,i}}})}}(); \ No newline at end of file diff --git a/tests/languages/markup+tt2/tt2_in_markup_feature.test b/tests/languages/markup+tt2/tt2_in_markup_feature.test new file mode 100644 index 0000000000..d548ac15bc --- /dev/null +++ b/tests/languages/markup+tt2/tt2_in_markup_feature.test @@ -0,0 +1,89 @@ +
    [% foo.bar.baz %]
    +
    [%- foo.bar.baz %]
    +
    [% foo.bar.baz -%]
    +
    [%- foo.bar.baz -%]
    + +---------------------------------------------------- + +[ + ["tag", [ + ["tag", [ + ["punctuation", "<"], + "div" + ]], + ["punctuation", ">"] + ]], + ["tt2", [ + ["delimiter", "[%"], + ["variable", "foo.bar.baz"], + ["delimiter", "%]"] + ]], + ["tag", [ + ["tag", [ + ["punctuation", ""] + ]], + ["tag", [ + ["tag", [ + ["punctuation", "<"], + "div" + ]], + ["punctuation", ">"] + ]], + ["tt2", [ + ["delimiter", "[%-"], + ["variable", "foo.bar.baz"], + ["delimiter", "%]"] + ]], + ["tag", [ + ["tag", [ + ["punctuation", ""] + ]], + ["tag", [ + ["tag", [ + ["punctuation", "<"], + "div" + ]], + ["punctuation", ">"] + ]], + ["tt2", [ + ["delimiter", "[%"], + ["variable", "foo.bar.baz"], + ["delimiter", "-%]"] + ]], + ["tag", [ + ["tag", [ + ["punctuation", ""] + ]], + ["tag", [ + ["tag", [ + ["punctuation", "<"], + "div" + ]], + ["punctuation", ">"] + ]], + ["tt2", [ + ["delimiter", "[%-"], + ["variable", "foo.bar.baz"], + ["delimiter", "-%]"] + ]], + ["tag", [ + ["tag", [ + ["punctuation", ""] + ]] +] + +---------------------------------------------------- + +Checks for Template Toolkit 2 inside Markup. diff --git a/tests/languages/tt2/comment_feature.test b/tests/languages/tt2/comment_feature.test new file mode 100644 index 0000000000..4853056451 --- /dev/null +++ b/tests/languages/tt2/comment_feature.test @@ -0,0 +1,36 @@ +[%# this entire directive is ignored no + matter how many lines it wraps onto +%] +[% # this is a comment + theta = 20 # so is this + rho = 30 # me too! +%] + +---------------------------------------------------- + +[ + ["tt2", + [ + ["comment", "[%# this entire directive is ignored no\r\n matter how many lines it wraps onto\r\n%]" ] + ] + ], + ["tt2", + [ + ["delimiter", "[%"], + ["comment", "# this is a comment" ], + ["variable", "theta"], + ["operator", "="], + ["number", "20"], + ["comment", "# so is this" ], + ["variable", "rho"], + ["operator", "="], + ["number", "30"], + ["comment", "# me too!"], + ["delimiter", "%]"] + ] + ] +] + +---------------------------------------------------- + +Checks for single-line and multi-line comments. diff --git a/tests/languages/tt2/delimiter_feature.test b/tests/languages/tt2/delimiter_feature.test new file mode 100644 index 0000000000..d246ecb3ea --- /dev/null +++ b/tests/languages/tt2/delimiter_feature.test @@ -0,0 +1,18 @@ +[%- %] +[% -%] +[%- -%] + [% + %] + +---------------------------------------------------- + +[ + ["tt2", [["delimiter", "[%-"], ["delimiter", "%]"]]], + ["tt2", [["delimiter", "[%"], ["delimiter", "-%]"]]], + ["tt2", [["delimiter", "[%-"], ["delimiter", "-%]"]]], + ["tt2", [["delimiter", "[%"], ["delimiter", "%]"]]] +] + +---------------------------------------------------- + +Checks for delimiters. diff --git a/tests/languages/tt2/keyword_feature.test b/tests/languages/tt2/keyword_feature.test new file mode 100644 index 0000000000..eadf7c10ba --- /dev/null +++ b/tests/languages/tt2/keyword_feature.test @@ -0,0 +1,130 @@ +[% BLOCK header %] +[% CALL dbi.disconnect %] +[% CASE 23 %] +[% CATCH the.ball %] +[% CLEAR %] +[% DEBUG on %] +[% DEBUG off %] +[% DEFAULT answer = 42 %] +[% ELSE %] +[% ELSIF bar %] +[% END %] +[% FILTER html %] +[% FINAL breathe %] +[% FOREACH project IN time %] +[% GET foo %] +[% IF foo %] +[% IN %] +[% INCLUDE "$inc" %] +[% INSERT filename.html %] +[% LAST IF exhausted %] +[% MACRO header INCLUDE header %] +[% META title = 'Hello!' %] +[% NEXT IF client %] +[% PERL %] +[% PROCESS "functions.tt" %] +[% RAWPERL %] +[% RETURN %] +[% SET answer = 42 %] +[% STOP %] +[% SWITCH mday %] +[% TAGS [@ @] %] +[% THROW up %] +[% TRY %] +[% UNLESS fear %] +[% USE Plugin %] +[% WHILE my.guitar.gently.weeps %] +[% WRAPPER 'html5.html' %] + +---------------------------------------------------- + +[ + ["tt2", [["delimiter", "[%"], ["keyword", "BLOCK"], + ["variable", "header"], ["delimiter", "%]"]]], + ["tt2", [["delimiter", "[%"], ["keyword", "CALL"], + ["variable", "dbi.disconnect"], ["delimiter", "%]"]]], + ["tt2", [["delimiter", "[%"], ["keyword", "CASE"], + ["number", "23"], ["delimiter", "%]"]]], + ["tt2", [["delimiter", "[%"], ["keyword", "CATCH"], + ["variable", "the.ball"], + ["delimiter", "%]"]]], + ["tt2", [["delimiter", "[%"], ["keyword", "CLEAR"], ["delimiter", "%]"]]], + ["tt2", [["delimiter", "[%"], ["keyword", "DEBUG"], + ["variable", "on"], + ["delimiter", "%]"]]], + ["tt2", [["delimiter", "[%"], ["keyword", "DEBUG"], + ["variable", "off"], + ["delimiter", "%]"]]], + ["tt2", [["delimiter", "[%"], ["keyword", "DEFAULT"], + ["variable", "answer"], ["operator", "="], ["number", "42"], + ["delimiter", "%]"]]], + ["tt2", [["delimiter", "[%"], ["keyword", "ELSE"], ["delimiter", "%]"]]], + ["tt2", [["delimiter", "[%"], ["keyword", "ELSIF"], ["variable", "bar"], + ["delimiter", "%]"]]], + ["tt2", [["delimiter", "[%"], ["keyword", "END"], ["delimiter", "%]"]]], + ["tt2", [["delimiter", "[%"], ["keyword", "FILTER"], ["variable", "html"], + ["delimiter", "%]"]]], + ["tt2", [["delimiter", "[%"], ["keyword", "FINAL"], + ["variable", "breathe"], + ["delimiter", "%]"]]], + ["tt2", [["delimiter", "[%"], ["keyword", "FOREACH"], + ["variable", "project"], ["keyword", "IN"], ["variable", "time"] , + ["delimiter", "%]"]]], + ["tt2", [["delimiter", "[%"], ["keyword", "GET"], + ["variable", "foo"], ["delimiter", "%]"]]], + ["tt2", [["delimiter", "[%"], ["keyword", "IF"], ["variable", "foo"], + ["delimiter", "%]"]]], + ["tt2", [["delimiter", "[%"], ["keyword", "IN"], + ["delimiter", "%]"]]], + ["tt2", [["delimiter", "[%"], ["keyword", "INCLUDE"], + ["double-quoted-string", ["\"", ["variable", "$inc"], "\""]], + ["delimiter", "%]"]]], + ["tt2", [["delimiter", "[%"], ["keyword", "INSERT"], + ["variable", "filename.html"], + ["delimiter", "%]"]]], + ["tt2", [["delimiter", "[%"], ["keyword", "LAST"], + ["keyword", "IF"], ["variable", "exhausted"], + ["delimiter", "%]"]]], + ["tt2", [["delimiter", "[%"], ["keyword", "MACRO"], ["variable", "header"], + ["keyword", "INCLUDE"], ["variable", "header"], + ["delimiter", "%]"]]], + ["tt2", [["delimiter", "[%"], ["keyword", "META"], + ["variable", "title"], ["operator", "="], ["single-quoted-string", "'Hello!'"], + ["delimiter", "%]"]]], + ["tt2", [["delimiter", "[%"], ["keyword", "NEXT"], + ["keyword", "IF"], ["variable", "client"], + ["delimiter", "%]"]]], + ["tt2", [["delimiter", "[%"], ["keyword", "PERL"], ["delimiter", "%]"]]], + ["tt2", [["delimiter", "[%"], ["keyword", "PROCESS"], + ["double-quoted-string", ["\"functions.tt\""]], + ["delimiter", "%]"]]], + ["tt2", [["delimiter", "[%"], ["keyword", "RAWPERL"], ["delimiter", "%]"]]], + ["tt2", [["delimiter", "[%"], ["keyword", "RETURN"], ["delimiter", "%]"]]], + ["tt2", [["delimiter", "[%"], ["keyword", "SET"], + ["variable", "answer"], ["operator", "="], ["number", "42"], + ["delimiter", "%]"]]], + ["tt2", [["delimiter", "[%"], ["keyword", "STOP"], ["delimiter", "%]"]]], + ["tt2", [["delimiter", "[%"], ["keyword", "SWITCH"], ["variable", "mday"], + ["delimiter", "%]"]]], + ["tt2", [["delimiter", "[%"], ["keyword", "TAGS"], + ["punctuation", "["], "@ @", ["punctuation", "]"], + ["delimiter", "%]"]]], + ["tt2", [["delimiter", "[%"], ["keyword", "THROW"], + ["variable", "up"], + ["delimiter", "%]"]]], + ["tt2", [["delimiter", "[%"], ["keyword", "TRY"], ["delimiter", "%]"]]], + ["tt2", [["delimiter", "[%"], ["keyword", "UNLESS"], ["variable", "fear"], + ["delimiter", "%]"]]], + ["tt2", [["delimiter", "[%"], ["keyword", "USE"], ["variable", "Plugin"], + ["delimiter", "%]"]]], + ["tt2", [["delimiter", "[%"], ["keyword", "WHILE"], + ["variable", "my.guitar.gently.weeps"], + ["delimiter", "%]"]]], + ["tt2", [["delimiter", "[%"], ["keyword", "WRAPPER"], + ["single-quoted-string", "'html5.html'"], + ["delimiter", "%]"]]] +] + +---------------------------------------------------- + +Checks for keywords. diff --git a/tests/languages/tt2/operator_feature.test b/tests/languages/tt2/operator_feature.test new file mode 100644 index 0000000000..a8a6058d46 --- /dev/null +++ b/tests/languages/tt2/operator_feature.test @@ -0,0 +1,69 @@ +[% fat => comma %] +[% foo == bar %] +[% foo != bar %] +[% foo < bar %] +[% foo <= bar %] +[% foo > bar %] +[% foo >= bar %] +[% foo = bar %] +[% foo && bar %] +[% foo || bar %] +[% foo | bar %] +[% foo ! bar %] +[% penthouse and pavement %] +[% sooner or later %] +[% love not war %] + +---------------------------------------------------- + +[ + ["tt2", [["delimiter", "[%"], + ["variable", "fat"], ["operator", "=>"], ["variable", "comma"], + ["delimiter", "%]"]]], + ["tt2", [["delimiter", "[%"], + ["variable", "foo"], ["operator", "=="], ["variable", "bar"], + ["delimiter", "%]"]]], + ["tt2", [["delimiter", "[%"], + ["variable", "foo"], ["operator", "!="], ["variable", "bar"], + ["delimiter", "%]"]]], + ["tt2", [["delimiter", "[%"], + ["variable", "foo"], ["operator", "<"], ["variable", "bar"], + ["delimiter", "%]"]]], + ["tt2", [["delimiter", "[%"], + ["variable", "foo"], ["operator", "<="], ["variable", "bar"], + ["delimiter", "%]"]]], + ["tt2", [["delimiter", "[%"], + ["variable", "foo"], ["operator", ">"], ["variable", "bar"], + ["delimiter", "%]"]]], + ["tt2", [["delimiter", "[%"], + ["variable", "foo"], ["operator", ">="], ["variable", "bar"], + ["delimiter", "%]"]]], + ["tt2", [["delimiter", "[%"], + ["variable", "foo"], ["operator", "="], ["variable", "bar"], + ["delimiter", "%]"]]], + ["tt2", [["delimiter", "[%"], + ["variable", "foo"], ["operator", "&&"], ["variable", "bar"], + ["delimiter", "%]"]]], + ["tt2", [["delimiter", "[%"], + ["variable", "foo"], ["operator", "||"], ["variable", "bar"], + ["delimiter", "%]"]]], + ["tt2", [["delimiter", "[%"], + ["variable", "foo"], ["operator", "|"], ["variable", "bar"], + ["delimiter", "%]"]]], + ["tt2", [["delimiter", "[%"], + ["variable", "foo"], ["operator", "!"], ["variable", "bar"], + ["delimiter", "%]"]]], + ["tt2", [["delimiter", "[%"], + ["variable", "penthouse"], ["operator", "and"], ["variable", "pavement"], + ["delimiter", "%]"]]], + ["tt2", [["delimiter", "[%"], + ["variable", "sooner"], ["operator", "or"], ["variable", "later"], + ["delimiter", "%]"]]], + ["tt2", [["delimiter", "[%"], + ["variable", "love"], ["operator", "not"], ["variable", "war"], + ["delimiter", "%]"]]] +] + +---------------------------------------------------- + +Checks for operators. diff --git a/tests/languages/tt2/string-interpolation_feature.test b/tests/languages/tt2/string-interpolation_feature.test new file mode 100644 index 0000000000..9a977dbd8b --- /dev/null +++ b/tests/languages/tt2/string-interpolation_feature.test @@ -0,0 +1,21 @@ +[% "Hello, $name!" %] + +---------------------------------------------------- + +[ + ["tt2", + [ + ["delimiter", "[%"], + ["double-quoted-string", [ + "\"Hello, ", + ["variable", "$name"], + "!\""] + ], + ["delimiter", "%]"] + ] + ] +] + +---------------------------------------------------- + +Checks for interpolation inside strings. \ No newline at end of file diff --git a/tests/languages/tt2/string_feature.test b/tests/languages/tt2/string_feature.test new file mode 100644 index 0000000000..51a5f792fa --- /dev/null +++ b/tests/languages/tt2/string_feature.test @@ -0,0 +1,35 @@ +[% +"https://example.com/" +" # not a comment" +"multi-line +string" +"escaped \"quotes\"\nwork\twell" +'https://example.com/' +' # not a comment' +'multi-line +string' +'escaped \'quotes\' work' +%] + +---------------------------------------------------- + +[ + ["tt2", + [ + ["delimiter", "[%"], + ["double-quoted-string", ["\"https://example.com/\""]], + ["double-quoted-string", ["\" # not a comment\""]], + ["double-quoted-string", ["\"multi-line\r\nstring\""]], + ["double-quoted-string", ["\"escaped \\\"quotes\\\"\\nwork\\twell\""]], + ["single-quoted-string", "'https://example.com/'"], + ["single-quoted-string", "' # not a comment'"], + ["single-quoted-string", "'multi-line\r\nstring'"], + ["single-quoted-string", "'escaped \\'quotes\\' work'"], + ["delimiter", "%]"] + ] + ] +] + +---------------------------------------------------- + +Checks for strings. \ No newline at end of file diff --git a/tests/languages/tt2/variable_feature.test b/tests/languages/tt2/variable_feature.test new file mode 100644 index 0000000000..7504dd9966 --- /dev/null +++ b/tests/languages/tt2/variable_feature.test @@ -0,0 +1,36 @@ +[% + foo + foo.bar + foo.2 + foo.1.bar.2.baz.3 + foo.$index + foo + . + bar + world + hands + knots +%] +---------------------------------------------------- + +[ + ["tt2", + [ + ["delimiter", "[%"], + ["variable", "foo"], + ["variable", "foo.bar"], + ["variable", "foo.2"], + ["variable", "foo.1.bar.2.baz.3"], + ["variable", "foo.$index"], + ["variable", "foo\r\n\t\t.\r\n\t\t\tbar"], + ["variable", "world"], + ["variable", "hands"], + ["variable", "knots"], + ["delimiter", "%]"] + ] + ] +] + +---------------------------------------------------- + +Checks for simple variables. From 38ce1213598ef9f5d7d6bde35dbbd43600b372a4 Mon Sep 17 00:00:00 2001 From: Golmote Date: Tue, 15 May 2018 20:27:53 +0200 Subject: [PATCH 0022/1100] JSX: Add support for fragments short syntax. Fix #1421 --- components/prism-jsx.js | 6 ++- components/prism-jsx.min.js | 2 +- tests/languages/jsx/issue1421.test | 58 ++++++++++++++++++++++++++++ tests/languages/jsx/tag_feature.test | 23 ++++++++++- 4 files changed, 86 insertions(+), 3 deletions(-) create mode 100644 tests/languages/jsx/issue1421.test diff --git a/components/prism-jsx.js b/components/prism-jsx.js index 5876ffbe76..43a09d8540 100644 --- a/components/prism-jsx.js +++ b/components/prism-jsx.js @@ -3,8 +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.:-]+(?:=(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s{'">=]+|\{(?:\{(?:\{[^}]*\}|[^{}])*\}|[^{}])+\}))?|\{\.{3}[a-z_$][\w$]*(?:\.[a-z_$][\w$]*)*\}))*\s*\/?>/i; +Prism.languages.jsx.tag.pattern= /<\/?(?:[\w.:-]+\s*(?:\s+(?:[\w.:-]+(?:=(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s{'">=]+|\{(?:\{(?:\{[^}]*\}|[^{}])*\}|[^{}])+\}))?|\{\.{3}[a-z_$][\w$]*(?:\.[a-z_$][\w$]*)*\}))*\s*\/?)?>/i; +Prism.languages.jsx.tag.inside['tag'].pattern = /^<\/?[^\s>\/]*/i; Prism.languages.jsx.tag.inside['attr-value'].pattern = /=(?!\{)(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s'">]+)/i; Prism.languages.insertBefore('inside', 'attr-name', { @@ -34,6 +35,9 @@ Prism.languages.insertBefore('inside', 'attr-value',{ // The following will handle plain text inside tags var stringifyToken = function (token) { + if (!token) { + return ''; + } if (typeof token === 'string') { return token; } diff --git a/components/prism-jsx.min.js b/components/prism-jsx.min.js index 706254bdd2..3bc4d12bdc 100644 --- a/components/prism-jsx.min.js +++ b/components/prism-jsx.min.js @@ -1 +1 @@ -!function(t){var n=t.util.clone(t.languages.javascript);t.languages.jsx=t.languages.extend("markup",n),t.languages.jsx.tag.pattern=/<\/?[\w.:-]+\s*(?:\s+(?:[\w.:-]+(?:=(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s{'">=]+|\{(?:\{(?:\{[^}]*\}|[^{}])*\}|[^{}])+\}))?|\{\.{3}[a-z_$][\w$]*(?:\.[a-z_$][\w$]*)*\}))*\s*\/?>/i,t.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s'">]+)/i,t.languages.insertBefore("inside","attr-name",{spread:{pattern:/\{\.{3}[a-z_$][\w$]*(?:\.[a-z_$][\w$]*)*\}/,inside:{punctuation:/\.{3}|[{}.]/,"attr-value":/\w+/}}},t.languages.jsx.tag),t.languages.insertBefore("inside","attr-value",{script:{pattern:/=(\{(?:\{(?:\{[^}]*\}|[^}])*\}|[^}])+\})/i,inside:{"script-punctuation":{pattern:/^=(?={)/,alias:"punctuation"},rest:t.languages.jsx},alias:"language-javascript"}},t.languages.jsx.tag);var e=function(t){return"string"==typeof t?t:"string"==typeof t.content?t.content:t.content.map(e).join("")},a=function(n){for(var s=[],g=0;g0&&s[s.length-1].tagName===e(o.content[0].content[1])&&s.pop():"/>"===o.content[o.content.length-1].content||s.push({tagName:e(o.content[0].content[1]),openedBraces:0}):s.length>0&&"punctuation"===o.type&&"{"===o.content?s[s.length-1].openedBraces++:s.length>0&&s[s.length-1].openedBraces>0&&"punctuation"===o.type&&"}"===o.content?s[s.length-1].openedBraces--:i=!0),(i||"string"==typeof o)&&s.length>0&&0===s[s.length-1].openedBraces){var p=e(o);g0&&("string"==typeof n[g-1]||"plain-text"===n[g-1].type)&&(p=e(n[g-1])+p,n.splice(g-1,1),g--),n[g]=new t.Token("plain-text",p,null,p)}o.content&&"string"!=typeof o.content&&a(o.content)}};t.hooks.add("after-tokenize",function(t){("jsx"===t.language||"tsx"===t.language)&&a(t.tokens)})}(Prism); \ No newline at end of file +!function(t){var n=t.util.clone(t.languages.javascript);t.languages.jsx=t.languages.extend("markup",n),t.languages.jsx.tag.pattern=/<\/?(?:[\w.:-]+\s*(?:\s+(?:[\w.:-]+(?:=(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s{'">=]+|\{(?:\{(?:\{[^}]*\}|[^{}])*\}|[^{}])+\}))?|\{\.{3}[a-z_$][\w$]*(?:\.[a-z_$][\w$]*)*\}))*\s*\/?)?>/i,t.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/i,t.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s'">]+)/i,t.languages.insertBefore("inside","attr-name",{spread:{pattern:/\{\.{3}[a-z_$][\w$]*(?:\.[a-z_$][\w$]*)*\}/,inside:{punctuation:/\.{3}|[{}.]/,"attr-value":/\w+/}}},t.languages.jsx.tag),t.languages.insertBefore("inside","attr-value",{script:{pattern:/=(\{(?:\{(?:\{[^}]*\}|[^}])*\}|[^}])+\})/i,inside:{"script-punctuation":{pattern:/^=(?={)/,alias:"punctuation"},rest:t.languages.jsx},alias:"language-javascript"}},t.languages.jsx.tag);var e=function(t){return t?"string"==typeof t?t:"string"==typeof t.content?t.content:t.content.map(e).join(""):""},a=function(n){for(var s=[],g=0;g0&&s[s.length-1].tagName===e(o.content[0].content[1])&&s.pop():"/>"===o.content[o.content.length-1].content||s.push({tagName:e(o.content[0].content[1]),openedBraces:0}):s.length>0&&"punctuation"===o.type&&"{"===o.content?s[s.length-1].openedBraces++:s.length>0&&s[s.length-1].openedBraces>0&&"punctuation"===o.type&&"}"===o.content?s[s.length-1].openedBraces--:i=!0),(i||"string"==typeof o)&&s.length>0&&0===s[s.length-1].openedBraces){var p=e(o);g0&&("string"==typeof n[g-1]||"plain-text"===n[g-1].type)&&(p=e(n[g-1])+p,n.splice(g-1,1),g--),n[g]=new t.Token("plain-text",p,null,p)}o.content&&"string"!=typeof o.content&&a(o.content)}};t.hooks.add("after-tokenize",function(t){("jsx"===t.language||"tsx"===t.language)&&a(t.tokens)})}(Prism); \ No newline at end of file diff --git a/tests/languages/jsx/issue1421.test b/tests/languages/jsx/issue1421.test new file mode 100644 index 0000000000..f34147c94a --- /dev/null +++ b/tests/languages/jsx/issue1421.test @@ -0,0 +1,58 @@ +class Columns extends React.Component { + render() { + return ( + <> + Hello + World + + ); + } +} + +---------------------------------------------------- + +[ + ["keyword", "class"], + ["class-name", ["Columns"]], + ["keyword", "extends"], + ["class-name", ["React", ["punctuation", "."], "Component"]], + ["punctuation", "{"], + ["function", "render"], + ["punctuation", "("], ["punctuation", ")"], + ["punctuation", "{"], + ["keyword", "return"], ["punctuation", "("], + ["tag", [ + ["tag", [["punctuation", "<"]]], + ["punctuation", ">"] + ]], + ["plain-text", "\r\n "], + ["tag", [ + ["tag", [["punctuation", "<"], "td"]], + ["punctuation", ">"] + ]], + ["plain-text", "Hello"], + ["tag", [ + ["tag", [["punctuation", ""] + ]], + ["plain-text", "\r\n "], + ["tag", [ + ["tag", [["punctuation", "<"], "td"]], + ["punctuation", ">"] + ]], + ["plain-text", "World"], + ["tag", [ + ["tag", [["punctuation", ""] + ]], + ["plain-text", "\r\n "], + ["tag", [ + ["tag", [["punctuation", ""] + ]], + ["punctuation", ")"], ["punctuation", ";"], + ["punctuation", "}"], ["punctuation", "}"] +] + +---------------------------------------------------- +Checks for fragments short syntax. See #1421 \ No newline at end of file diff --git a/tests/languages/jsx/tag_feature.test b/tests/languages/jsx/tag_feature.test index 715558d76a..6cfc82eff9 100644 --- a/tests/languages/jsx/tag_feature.test +++ b/tests/languages/jsx/tag_feature.test @@ -1,6 +1,7 @@ var myDivElement =
    ; var myElement = ; -
    +
    +<> ---------------------------------------------------- @@ -54,6 +55,26 @@ var myElement = ; ["punctuation", "}"] ]], ["punctuation", ">"] + ]], + ["tag", [ + ["tag", [ + ["punctuation", ""] + ]], + ["tag", [ + ["tag", [ + ["punctuation", "<"] + ]], + ["punctuation", ">"] + ]], + ["plain-text", " "], + ["tag", [ + ["tag", [ + ["punctuation", ""] ]] ] From c2ff24822a750f2aad24b9393bd78c6e896fe633 Mon Sep 17 00:00:00 2001 From: Golmote Date: Wed, 16 May 2018 19:33:59 +0200 Subject: [PATCH 0023/1100] Website: Fix Download page not handling multiple dependencies when from Redownload URL --- download.js | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/download.js b/download.js index f01b5c41e3..5db493a06c 100644 --- a/download.js +++ b/download.js @@ -41,20 +41,26 @@ if (hstr) { } setTheme(ids[0]); } - ids.forEach(function(id) { + var makeDefault = function (id) { if (id !== 'meta') { if (components[category][id]) { - var requireId = id; - while (requireId && components[category][requireId] && components[category][requireId].option !== 'default') { - if (typeof components[category][requireId] === 'string') { - components[category][requireId] = { title: components[category][requireId] } + if (components[category][id].option !== 'default') { + if (typeof components[category][id] === 'string') { + components[category][id] = { title: components[category][id] } } - components[category][requireId].option = 'default'; - requireId = components[category][requireId].require; + components[category][id].option = 'default'; + } + if (components[category][id].require) { + var deps = components[category][id].require; + if ($u.type(deps) !== 'array') { + deps = [deps]; + } + deps.forEach(makeDefault); } } } - }); + }; + ids.forEach(makeDefault); } }); } From e326cb031f02cc126b43bb6783ccb0c73f86a760 Mon Sep 17 00:00:00 2001 From: Golmote Date: Sat, 26 May 2018 11:39:35 +0200 Subject: [PATCH 0024/1100] Add support for XQuery. Fix #1405 (#1411) --- components.js | 2 +- components.json | 5 + components/prism-xquery.js | 164 ++++++++++++++++++ components/prism-xquery.min.js | 1 + examples/prism-xquery.html | 47 +++++ plugins/autoloader/prism-autoloader.js | 2 +- plugins/autoloader/prism-autoloader.min.js | 2 +- plugins/show-language/prism-show-language.js | 2 +- .../show-language/prism-show-language.min.js | 2 +- tests/languages/xquery/axis_feature.test | 33 ++++ tests/languages/xquery/builtin_feature.test | 122 +++++++++++++ tests/languages/xquery/extension_feature.test | 11 ++ tests/languages/xquery/function_feature.test | 43 +++++ .../xquery/keyword-operator_feature.test | 43 +++++ tests/languages/xquery/keyword_feature.test | 119 +++++++++++++ tests/languages/xquery/number_feature.test | 17 ++ tests/languages/xquery/operator_feature.test | 21 +++ .../languages/xquery/plain-text_feature.test | 71 ++++++++ tests/languages/xquery/string_feature.test | 25 +++ tests/languages/xquery/tag_feature.test | 133 ++++++++++++++ tests/languages/xquery/variable_feature.test | 15 ++ .../xquery/xquery-attribute_feature.test | 18 ++ .../xquery/xquery-comment_feature.test | 19 ++ .../xquery/xquery-element_feature.test | 18 ++ 24 files changed, 930 insertions(+), 5 deletions(-) create mode 100644 components/prism-xquery.js create mode 100644 components/prism-xquery.min.js create mode 100644 examples/prism-xquery.html create mode 100644 tests/languages/xquery/axis_feature.test create mode 100644 tests/languages/xquery/builtin_feature.test create mode 100644 tests/languages/xquery/extension_feature.test create mode 100644 tests/languages/xquery/function_feature.test create mode 100644 tests/languages/xquery/keyword-operator_feature.test create mode 100644 tests/languages/xquery/keyword_feature.test create mode 100644 tests/languages/xquery/number_feature.test create mode 100644 tests/languages/xquery/operator_feature.test create mode 100644 tests/languages/xquery/plain-text_feature.test create mode 100644 tests/languages/xquery/string_feature.test create mode 100644 tests/languages/xquery/tag_feature.test create mode 100644 tests/languages/xquery/variable_feature.test create mode 100644 tests/languages/xquery/xquery-attribute_feature.test create mode 100644 tests/languages/xquery/xquery-comment_feature.test create mode 100644 tests/languages/xquery/xquery-element_feature.test diff --git a/components.js b/components.js index 0f317551ca..bbdeb90dff 100644 --- a/components.js +++ b/components.js @@ -1,2 +1,2 @@ -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default"},"clike":{"title":"C-like","option":"default","overrideExampleHeader":true},"javascript":{"title":"JavaScript","require":"clike","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"actionscript":{"title":"ActionScript","require":"javascript","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","alias":"shell","owner":"Golmote"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":"dotnet","owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"coffeescript":{"title":"CoffeeScript","require":"javascript","owner":"R-osey"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup","alias":"jinja2","owner":"romanvm"},"docker":{"title":"Docker","owner":"JustinBeckwith"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"http":{"title":"HTTP","owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"json":{"title":"JSON","owner":"CupOfTea696"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","owner":"japborst"},"less":{"title":"Less","require":"css","owner":"Golmote"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","owner":"JuanCaicedo","alias":["emacs","elisp","emacs-lisp"]},"livescript":{"title":"LiveScript","owner":"Golmote"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"n4js":{"title":"N4JS","require":"javascript","owner":"bsmith-n4"},"nasm":{"title":"NASM","owner":"rbmj"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"cpp","overrideExampleHeader":true,"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","owner":"Golmote"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"php-extras":{"title":"PHP Extras","require":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":"javascript","owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","owner":"Golmote"},"python":{"title":"Python","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"ruby":{"title":"Ruby","require":"clike","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sql":{"title":"SQL","owner":"multipetros"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","owner":"Golmote"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","alias":"ts","owner":"vkbansal"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","owner":"Golmote","alias":"vb"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"yaml":{"title":"YAML","owner":"hason"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":"Line Highlight","line-numbers":{"title":"Line Numbers","owner":"kuba-kubula"},"show-invisibles":"Show Invisibles","autolinker":"Autolinker","wpd":"WebPlatform Docs","custom-class":{"title":"Custom Class","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","noCSS":true},"show-language":{"title":"Show Language","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","owner":"Golmote","noCSS":true},"previewers":{"title":"Previewers","owner":"Golmote"},"autoloader":{"title":"Autoloader","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","owner":"Golmote","after":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","owner":"chriswells0"},"unescaped-markup":"Unescaped Markup","normalize-whitespace":{"title":"Normalize Whitespace","owner":"zeitgeist87","after":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","owner":"mAAdhaTTah","require":"toolbar","noCSS":true}}}; +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default"},"clike":{"title":"C-like","option":"default","overrideExampleHeader":true},"javascript":{"title":"JavaScript","require":"clike","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"actionscript":{"title":"ActionScript","require":"javascript","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","alias":"shell","owner":"Golmote"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":"dotnet","owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"coffeescript":{"title":"CoffeeScript","require":"javascript","owner":"R-osey"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup","alias":"jinja2","owner":"romanvm"},"docker":{"title":"Docker","owner":"JustinBeckwith"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"http":{"title":"HTTP","owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"json":{"title":"JSON","owner":"CupOfTea696"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","owner":"japborst"},"less":{"title":"Less","require":"css","owner":"Golmote"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","owner":"JuanCaicedo","alias":["emacs","elisp","emacs-lisp"]},"livescript":{"title":"LiveScript","owner":"Golmote"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"n4js":{"title":"N4JS","require":"javascript","owner":"bsmith-n4"},"nasm":{"title":"NASM","owner":"rbmj"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"cpp","overrideExampleHeader":true,"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","owner":"Golmote"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"php-extras":{"title":"PHP Extras","require":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":"javascript","owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","owner":"Golmote"},"python":{"title":"Python","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"ruby":{"title":"Ruby","require":"clike","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sql":{"title":"SQL","owner":"multipetros"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","owner":"Golmote"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","alias":"ts","owner":"vkbansal"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","owner":"Golmote","alias":"vb"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","owner":"hason"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":"Line Highlight","line-numbers":{"title":"Line Numbers","owner":"kuba-kubula"},"show-invisibles":"Show Invisibles","autolinker":"Autolinker","wpd":"WebPlatform Docs","custom-class":{"title":"Custom Class","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","noCSS":true},"show-language":{"title":"Show Language","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","owner":"Golmote","noCSS":true},"previewers":{"title":"Previewers","owner":"Golmote"},"autoloader":{"title":"Autoloader","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","owner":"Golmote","after":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","owner":"chriswells0"},"unescaped-markup":"Unescaped Markup","normalize-whitespace":{"title":"Normalize Whitespace","owner":"zeitgeist87","after":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","owner":"mAAdhaTTah","require":"toolbar","noCSS":true}}}; if (typeof module !== 'undefined' && module.exports) { module.exports = components; } \ No newline at end of file diff --git a/components.json b/components.json index a26e080806..3d981ad137 100644 --- a/components.json +++ b/components.json @@ -712,6 +712,11 @@ "title": "Xojo (REALbasic)", "owner": "Golmote" }, + "xquery": { + "title": "XQuery", + "require": "markup", + "owner": "Golmote" + }, "yaml": { "title": "YAML", "owner": "hason" diff --git a/components/prism-xquery.js b/components/prism-xquery.js new file mode 100644 index 0000000000..f506c191e7 --- /dev/null +++ b/components/prism-xquery.js @@ -0,0 +1,164 @@ +(function (Prism) { + + Prism.languages.xquery = Prism.languages.extend('markup', { + 'xquery-comment': { + pattern: /\(:[\s\S]*?:\)/, + greedy: true, + alias: "comment" + }, + 'string': { + pattern: /(["'])(?:\1\1|(?!\1)[\s\S])*\1/, + greedy: true + }, + 'extension': { + pattern: /\(#.+?#\)/, + alias: 'symbol' + }, + 'variable': /\$[\w-:]+/, + 'axis': { + pattern: /(^|[^-])(?:ancestor(?:-or-self)?|attribute|child|descendant(?:-or-self)?|following(?:-sibling)?|parent|preceding(?:-sibling)?|self)(?=::)/, + lookbehind: true, + alias: 'operator' + }, + 'keyword-operator': { + pattern: /(^|[^:-])\b(?:and|castable as|div|eq|except|ge|gt|idiv|instance of|intersect|is|le|lt|mod|ne|or|union)\b(?=$|[^:-])/, + lookbehind: true, + alias: 'operator' + }, + 'keyword': { + pattern: /(^|[^:-])\b(?:as|ascending|at|base-uri|boundary-space|case|cast as|collation|construction|copy-namespaces|declare|default|descending|else|empty (?:greatest|least)|encoding|every|external|for|function|if|import|in|inherit|lax|let|map|module|namespace|no-inherit|no-preserve|option|order(?: by|ed|ing)?|preserve|return|satisfies|schema|some|stable|strict|strip|then|to|treat as|typeswitch|unordered|validate|variable|version|where|xquery)\b(?=$|[^:-])/, + lookbehind: true + }, + 'function': /[\w-]+(?::[\w-]+)*(?=\s*\()/, + 'xquery-element': { + pattern: /(element\s+)[\w-]+(?::[\w-]+)*/, + lookbehind: true, + alias: 'tag' + }, + 'xquery-attribute': { + pattern: /(attribute\s+)[\w-]+(?::[\w-]+)*/, + lookbehind: true, + alias: 'attr-name' + }, + 'builtin': { + pattern: /(^|[^:-])\b(?:attribute|comment|document|element|processing-instruction|text|xs:(?:anyAtomicType|anyType|anyURI|base64Binary|boolean|byte|date|dateTime|dayTimeDuration|decimal|double|duration|ENTITIES|ENTITY|float|gDay|gMonth|gMonthDay|gYear|gYearMonth|hexBinary|ID|IDREFS?|int|integer|language|long|Name|NCName|negativeInteger|NMTOKENS?|nonNegativeInteger|nonPositiveInteger|normalizedString|NOTATION|positiveInteger|QName|short|string|time|token|unsigned(?:Byte|Int|Long|Short)|untyped(?:Atomic)?|yearMonthDuration))\b(?=$|[^:-])/, + lookbehind: true + }, + 'number': /\b\d+(?:\.\d+)?(?:E[+-]?\d+)?/, + 'operator': [ + /[+*=?|@]|\.\.?|:=|!=|<[=<]?|>[=>]?/, + { + pattern: /(\s)-(?=\s)/, + lookbehind: true + } + ], + 'punctuation': /[[\](){},;:/]/ + }); + + Prism.languages.xquery.tag.pattern = /<\/?(?!\d)[^\s>\/=$<%]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\[\s\S]|{(?!{)(?:{(?:{[^}]*}|[^}])*}|[^}])+}|(?!\1)[^\\])*\1|[^\s'">=]+))?)*\s*\/?>/i; + Prism.languages.xquery['tag'].inside['attr-value'].pattern = /=(?:("|')(?:\\[\s\S]|{(?!{)(?:{(?:{[^}]*}|[^}])*}|[^}])+}|(?!\1)[^\\])*\1|[^\s'">=]+)/i; + Prism.languages.xquery['tag'].inside['attr-value'].inside['punctuation'] = /^="|"$/; + Prism.languages.xquery['tag'].inside['attr-value'].inside['expression'] = { + // Allow for two levels of nesting + pattern: /{(?!{)(?:{(?:{[^}]*}|[^}])*}|[^}])+}/, + inside: { + rest: Prism.languages.xquery + }, + 'alias': 'language-xquery' + }; + + // The following will handle plain text inside tags + var stringifyToken = function (token) { + if (typeof token === 'string') { + return token; + } + if (typeof token.content === 'string') { + return token.content; + } + return token.content.map(stringifyToken).join(''); + }; + + var walkTokens = function (tokens) { + var openedTags = []; + for (var i = 0; i < tokens.length; i++) { + var token = tokens[i]; + var notTagNorBrace = false; + + if (typeof token !== 'string') { + if (token.type === 'tag' && token.content[0] && token.content[0].type === 'tag') { + // We found a tag, now find its kind + + if (token.content[0].content[0].content === ' 0 && openedTags[openedTags.length - 1].tagName === stringifyToken(token.content[0].content[1])) { + // Pop matching opening tag + openedTags.pop(); + } + } else { + if (token.content[token.content.length - 1].content === '/>') { + // Autoclosed tag, ignore + } else { + // Opening tag + openedTags.push({ + tagName: stringifyToken(token.content[0].content[1]), + openedBraces: 0 + }); + } + } + } else if ( + openedTags.length > 0 && token.type === 'punctuation' && token.content === '{' && + // Ignore `{{` + (!tokens[i + 1] || tokens[i + 1].type !== 'punctuation' || tokens[i + 1].content !== '{') && + (!tokens[i - 1] || tokens[i - 1].type !== 'plain-text' || tokens[i - 1].content !== '{') + ) { + // Here we might have entered an XQuery expression inside a tag + openedTags[openedTags.length - 1].openedBraces++; + + } else if (openedTags.length > 0 && openedTags[openedTags.length - 1].openedBraces > 0 && token.type === 'punctuation' && token.content === '}') { + + // Here we might have left an XQuery expression inside a tag + openedTags[openedTags.length - 1].openedBraces--; + + } else if (token.type !== 'comment') { + notTagNorBrace = true + } + } + if (notTagNorBrace || typeof token === 'string') { + if (openedTags.length > 0 && openedTags[openedTags.length - 1].openedBraces === 0) { + // Here we are inside a tag, and not inside an XQuery expression. + // That's plain text: drop any tokens matched. + var plainText = stringifyToken(token); + + // And merge text with adjacent text + if (i < tokens.length - 1 && (typeof tokens[i + 1] === 'string' || tokens[i + 1].type === 'plain-text')) { + plainText += stringifyToken(tokens[i + 1]); + tokens.splice(i + 1, 1); + } + if (i > 0 && (typeof tokens[i - 1] === 'string' || tokens[i - 1].type === 'plain-text')) { + plainText = stringifyToken(tokens[i - 1]) + plainText; + tokens.splice(i - 1, 1); + i--; + } + + if (/^\s+$/.test(plainText)) { + tokens[i] = plainText; + } else { + tokens[i] = new Prism.Token('plain-text', plainText, null, plainText); + } + } + } + + if (token.content && typeof token.content !== 'string') { + walkTokens(token.content); + } + } + }; + + Prism.hooks.add('after-tokenize', function (env) { + if (env.language !== 'xquery') { + return; + } + walkTokens(env.tokens); + }); + +}(Prism)); \ No newline at end of file diff --git a/components/prism-xquery.min.js b/components/prism-xquery.min.js new file mode 100644 index 0000000000..5123bc23f2 --- /dev/null +++ b/components/prism-xquery.min.js @@ -0,0 +1 @@ +!function(e){e.languages.xquery=e.languages.extend("markup",{"xquery-comment":{pattern:/\(:[\s\S]*?:\)/,greedy:!0,alias:"comment"},string:{pattern:/(["'])(?:\1\1|(?!\1)[\s\S])*\1/,greedy:!0},extension:{pattern:/\(#.+?#\)/,alias:"symbol"},variable:/\$[\w-:]+/,axis:{pattern:/(^|[^-])(?:ancestor(?:-or-self)?|attribute|child|descendant(?:-or-self)?|following(?:-sibling)?|parent|preceding(?:-sibling)?|self)(?=::)/,lookbehind:!0,alias:"operator"},"keyword-operator":{pattern:/(^|[^:-])\b(?:and|castable as|div|eq|except|ge|gt|idiv|instance of|intersect|is|le|lt|mod|ne|or|union)\b(?=$|[^:-])/,lookbehind:!0,alias:"operator"},keyword:{pattern:/(^|[^:-])\b(?:as|ascending|at|base-uri|boundary-space|case|cast as|collation|construction|copy-namespaces|declare|default|descending|else|empty (?:greatest|least)|encoding|every|external|for|function|if|import|in|inherit|lax|let|map|module|namespace|no-inherit|no-preserve|option|order(?: by|ed|ing)?|preserve|return|satisfies|schema|some|stable|strict|strip|then|to|treat as|typeswitch|unordered|validate|variable|version|where|xquery)\b(?=$|[^:-])/,lookbehind:!0},"function":/[\w-]+(?::[\w-]+)*(?=\s*\()/,"xquery-element":{pattern:/(element\s+)[\w-]+(?::[\w-]+)*/,lookbehind:!0,alias:"tag"},"xquery-attribute":{pattern:/(attribute\s+)[\w-]+(?::[\w-]+)*/,lookbehind:!0,alias:"attr-name"},builtin:{pattern:/(^|[^:-])\b(?:attribute|comment|document|element|processing-instruction|text|xs:(?:anyAtomicType|anyType|anyURI|base64Binary|boolean|byte|date|dateTime|dayTimeDuration|decimal|double|duration|ENTITIES|ENTITY|float|gDay|gMonth|gMonthDay|gYear|gYearMonth|hexBinary|ID|IDREFS?|int|integer|language|long|Name|NCName|negativeInteger|NMTOKENS?|nonNegativeInteger|nonPositiveInteger|normalizedString|NOTATION|positiveInteger|QName|short|string|time|token|unsigned(?:Byte|Int|Long|Short)|untyped(?:Atomic)?|yearMonthDuration))\b(?=$|[^:-])/,lookbehind:!0},number:/\b\d+(?:\.\d+)?(?:E[+-]?\d+)?/,operator:[/[+*=?|@]|\.\.?|:=|!=|<[=<]?|>[=>]?/,{pattern:/(\s)-(?=\s)/,lookbehind:!0}],punctuation:/[[\](){},;:\/]/}),e.languages.xquery.tag.pattern=/<\/?(?!\d)[^\s>\/=$<%]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\[\s\S]|{(?!{)(?:{(?:{[^}]*}|[^}])*}|[^}])+}|(?!\1)[^\\])*\1|[^\s'">=]+))?)*\s*\/?>/i,e.languages.xquery.tag.inside["attr-value"].pattern=/=(?:("|')(?:\\[\s\S]|{(?!{)(?:{(?:{[^}]*}|[^}])*}|[^}])+}|(?!\1)[^\\])*\1|[^\s'">=]+)/i,e.languages.xquery.tag.inside["attr-value"].inside.punctuation=/^="|"$/,e.languages.xquery.tag.inside["attr-value"].inside.expression={pattern:/{(?!{)(?:{(?:{[^}]*}|[^}])*}|[^}])+}/,inside:{rest:e.languages.xquery},alias:"language-xquery"};var t=function(e){return"string"==typeof e?e:"string"==typeof e.content?e.content:e.content.map(t).join("")},n=function(a){for(var o=[],i=0;i0&&o[o.length-1].tagName===t(r.content[0].content[1])&&o.pop():"/>"===r.content[r.content.length-1].content||o.push({tagName:t(r.content[0].content[1]),openedBraces:0}):!(o.length>0&&"punctuation"===r.type&&"{"===r.content)||a[i+1]&&"punctuation"===a[i+1].type&&"{"===a[i+1].content||a[i-1]&&"plain-text"===a[i-1].type&&"{"===a[i-1].content?o.length>0&&o[o.length-1].openedBraces>0&&"punctuation"===r.type&&"}"===r.content?o[o.length-1].openedBraces--:"comment"!==r.type&&(s=!0):o[o.length-1].openedBraces++),(s||"string"==typeof r)&&o.length>0&&0===o[o.length-1].openedBraces){var l=t(r);i0&&("string"==typeof a[i-1]||"plain-text"===a[i-1].type)&&(l=t(a[i-1])+l,a.splice(i-1,1),i--),a[i]=/^\s+$/.test(l)?l:new e.Token("plain-text",l,null,l)}r.content&&"string"!=typeof r.content&&n(r.content)}};e.hooks.add("after-tokenize",function(e){"xquery"===e.language&&n(e.tokens)})}(Prism); \ No newline at end of file diff --git a/examples/prism-xquery.html b/examples/prism-xquery.html new file mode 100644 index 0000000000..8166d771c2 --- /dev/null +++ b/examples/prism-xquery.html @@ -0,0 +1,47 @@ +

    Comments

    +
    (::)
    +(: Comment :)
    +(: Multi-line
    +comment :)
    +(:~
    +: The <b>functx:substring-after-last</b> function returns the part
    +: of <b>$string</b> that appears after the last occurrence of
    +: <b>$delim</b>. If <b>$string</b> does not contain
    +: <b>$delim</b>, the entire string is returned.
    +:
    +: @param $string the string to substring
    +: @param $delim the delimiter
    +: @return the substring
    +:)
    + +

    Variables

    +
    $myProduct
    +$foo-bar
    +$strings:LetterA
    + +

    Functions

    +
    document-node(schema-element(catalog))
    +strings:trim($arg as xs:string?)
    +false()
    + +

    Keywords

    +
    xquery version "1.0";
    +declare default element namespace "http://datypic.com/cat";
    +declare boundary-space preserve;
    +declare default collation "http://datypic.com/collation/custom";
    + +

    Types

    +
    xs:anyAtomicType
    +element
    +xs:double
    + +

    Full example

    +
    <report xmlns="http://datypic.com/report"
    +xmlns:cat="http://datypic.com/cat"
    +xmlns:prod="http://datypic.com/prod"> {
    +for $product in doc("prod_ns.xml")/prod:product
    +return <lineItem>
    +{$product/prod:number}
    +{$product/prod:name}
    +</lineItem>
    +} </report>
    \ No newline at end of file diff --git a/plugins/autoloader/prism-autoloader.js b/plugins/autoloader/prism-autoloader.js index f4c8d41f36..6435727a4a 100644 --- a/plugins/autoloader/prism-autoloader.js +++ b/plugins/autoloader/prism-autoloader.js @@ -4,7 +4,7 @@ } // The dependencies map is built automatically with gulp - var lang_dependencies = /*languages_placeholder[*/{"javascript":"clike","actionscript":"javascript","arduino":"cpp","aspnet":["markup","csharp"],"bison":"c","c":"clike","csharp":"clike","cpp":"c","coffeescript":"javascript","crystal":"ruby","css-extras":"css","d":"clike","dart":"clike","django":"markup","erb":["ruby","markup-templating"],"fsharp":"clike","flow":"javascript","glsl":"clike","go":"clike","groovy":"clike","haml":"ruby","handlebars":"markup-templating","haxe":"clike","java":"clike","jolie":"clike","kotlin":"clike","less":"css","markdown":"markup","markup-templating":"markup","n4js":"javascript","nginx":"clike","objectivec":"c","opencl":"cpp","parser":"markup","php":["clike","markup-templating"],"php-extras":"php","plsql":"sql","processing":"clike","protobuf":"clike","pug":"javascript","qore":"clike","jsx":["markup","javascript"],"tsx":["jsx","typescript"],"reason":"clike","ruby":"clike","sass":"css","scss":"css","scala":"java","smarty":"markup-templating","soy":"markup-templating","swift":"clike","textile":"markup","tt2":["clike","markup-templating"],"twig":"markup","typescript":"javascript","vbnet":"basic","velocity":"markup","wiki":"markup","xeora":"markup"}/*]*/; + var lang_dependencies = /*languages_placeholder[*/{"javascript":"clike","actionscript":"javascript","arduino":"cpp","aspnet":["markup","csharp"],"bison":"c","c":"clike","csharp":"clike","cpp":"c","coffeescript":"javascript","crystal":"ruby","css-extras":"css","d":"clike","dart":"clike","django":"markup","erb":["ruby","markup-templating"],"fsharp":"clike","flow":"javascript","glsl":"clike","go":"clike","groovy":"clike","haml":"ruby","handlebars":"markup-templating","haxe":"clike","java":"clike","jolie":"clike","kotlin":"clike","less":"css","markdown":"markup","markup-templating":"markup","n4js":"javascript","nginx":"clike","objectivec":"c","opencl":"cpp","parser":"markup","php":["clike","markup-templating"],"php-extras":"php","plsql":"sql","processing":"clike","protobuf":"clike","pug":"javascript","qore":"clike","jsx":["markup","javascript"],"tsx":["jsx","typescript"],"reason":"clike","ruby":"clike","sass":"css","scss":"css","scala":"java","smarty":"markup-templating","soy":"markup-templating","swift":"clike","textile":"markup","tt2":["clike","markup-templating"],"twig":"markup","typescript":"javascript","vbnet":"basic","velocity":"markup","wiki":"markup","xeora":"markup","xquery":"markup"}/*]*/; var lang_data = {}; diff --git a/plugins/autoloader/prism-autoloader.min.js b/plugins/autoloader/prism-autoloader.min.js index bfd03a098f..23a12e1a78 100644 --- a/plugins/autoloader/prism-autoloader.min.js +++ b/plugins/autoloader/prism-autoloader.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof self&&self.Prism&&self.document&&document.createElement){var e={javascript:"clike",actionscript:"javascript",arduino:"cpp",aspnet:["markup","csharp"],bison:"c",c:"clike",csharp:"clike",cpp:"c",coffeescript:"javascript",crystal:"ruby","css-extras":"css",d:"clike",dart:"clike",django:"markup",erb:["ruby","markup-templating"],fsharp:"clike",flow:"javascript",glsl:"clike",go:"clike",groovy:"clike",haml:"ruby",handlebars:"markup-templating",haxe:"clike",java:"clike",jolie:"clike",kotlin:"clike",less:"css",markdown:"markup","markup-templating":"markup",n4js:"javascript",nginx:"clike",objectivec:"c",opencl:"cpp",parser:"markup",php:["clike","markup-templating"],"php-extras":"php",plsql:"sql",processing:"clike",protobuf:"clike",pug:"javascript",qore:"clike",jsx:["markup","javascript"],tsx:["jsx","typescript"],reason:"clike",ruby:"clike",sass:"css",scss:"css",scala:"java",smarty:"markup-templating",soy:"markup-templating",swift:"clike",textile:"markup",tt2:["clike","markup-templating"],twig:"markup",typescript:"javascript",vbnet:"basic",velocity:"markup",wiki:"markup",xeora:"markup"},a={},c="none",t=document.getElementsByTagName("script");t=t[t.length-1];var r="components/";if(t.hasAttribute("data-autoloader-path")){var s=t.getAttribute("data-autoloader-path").trim();s.length>0&&!/^[a-z]+:\/\//i.test(t.src)&&(r=s.replace(/\/?$/,"/"))}else/[\w-]+\.js$/.test(t.src)&&(r=t.src.replace(/[\w-]+\.js$/,"components/"));var i=Prism.plugins.autoloader={languages_path:r,use_minified:!0},t=function(e,a,c){var t=document.createElement("script");t.src=e,t.async=!0,t.onload=function(){document.body.removeChild(t),a&&a()},t.onerror=function(){document.body.removeChild(t),c&&c()},document.body.appendChild(t)},n=function(e){return i.languages_path+"prism-"+e+(i.use_minified?".min":"")+".js"},l=function(e,c){var t=a[e];t||(t=a[e]={});var r=c.getAttribute("data-dependencies");!r&&c.parentNode&&"pre"===c.parentNode.tagName.toLowerCase()&&(r=c.parentNode.getAttribute("data-dependencies")),r=r?r.split(/\s*,\s*/g):[],o(r,function(){p(e,function(){Prism.highlightElement(c)})})},o=function(e,a,c){"string"==typeof e&&(e=[e]);var t=0,r=e.length,s=function(){r>t?p(e[t],function(){t++,s()},function(){c&&c(e[t])}):t===r&&a&&a(e)};s()},p=function(c,r,s){var i=function(){var e=!1;c.indexOf("!")>=0&&(e=!0,c=c.replace("!",""));var i=a[c];if(i||(i=a[c]={}),r&&(i.success_callbacks||(i.success_callbacks=[]),i.success_callbacks.push(r)),s&&(i.error_callbacks||(i.error_callbacks=[]),i.error_callbacks.push(s)),!e&&Prism.languages[c])u(c);else if(!e&&i.error)m(c);else if(e||!i.loading){i.loading=!0;var l=n(c);t(l,function(){i.loading=!1,u(c)},function(){i.loading=!1,i.error=!0,m(c)})}},l=e[c];l&&l.length?o(l,i):i()},u=function(e){a[e]&&a[e].success_callbacks&&a[e].success_callbacks.length&&a[e].success_callbacks.forEach(function(a){a(e)})},m=function(e){a[e]&&a[e].error_callbacks&&a[e].error_callbacks.length&&a[e].error_callbacks.forEach(function(a){a(e)})};Prism.hooks.add("complete",function(e){e.element&&e.language&&!e.grammar&&e.language!==c&&l(e.language,e.element)})}}(); \ No newline at end of file +!function(){if("undefined"!=typeof self&&self.Prism&&self.document&&document.createElement){var e={javascript:"clike",actionscript:"javascript",arduino:"cpp",aspnet:["markup","csharp"],bison:"c",c:"clike",csharp:"clike",cpp:"c",coffeescript:"javascript",crystal:"ruby","css-extras":"css",d:"clike",dart:"clike",django:"markup",erb:["ruby","markup-templating"],fsharp:"clike",flow:"javascript",glsl:"clike",go:"clike",groovy:"clike",haml:"ruby",handlebars:"markup-templating",haxe:"clike",java:"clike",jolie:"clike",kotlin:"clike",less:"css",markdown:"markup","markup-templating":"markup",n4js:"javascript",nginx:"clike",objectivec:"c",opencl:"cpp",parser:"markup",php:["clike","markup-templating"],"php-extras":"php",plsql:"sql",processing:"clike",protobuf:"clike",pug:"javascript",qore:"clike",jsx:["markup","javascript"],tsx:["jsx","typescript"],reason:"clike",ruby:"clike",sass:"css",scss:"css",scala:"java",smarty:"markup-templating",soy:"markup-templating",swift:"clike",textile:"markup",tt2:["clike","markup-templating"],twig:"markup",typescript:"javascript",vbnet:"basic",velocity:"markup",wiki:"markup",xeora:"markup",xquery:"markup"},a={},c="none",t=document.getElementsByTagName("script");t=t[t.length-1];var r="components/";if(t.hasAttribute("data-autoloader-path")){var s=t.getAttribute("data-autoloader-path").trim();s.length>0&&!/^[a-z]+:\/\//i.test(t.src)&&(r=s.replace(/\/?$/,"/"))}else/[\w-]+\.js$/.test(t.src)&&(r=t.src.replace(/[\w-]+\.js$/,"components/"));var i=Prism.plugins.autoloader={languages_path:r,use_minified:!0},t=function(e,a,c){var t=document.createElement("script");t.src=e,t.async=!0,t.onload=function(){document.body.removeChild(t),a&&a()},t.onerror=function(){document.body.removeChild(t),c&&c()},document.body.appendChild(t)},n=function(e){return i.languages_path+"prism-"+e+(i.use_minified?".min":"")+".js"},l=function(e,c){var t=a[e];t||(t=a[e]={});var r=c.getAttribute("data-dependencies");!r&&c.parentNode&&"pre"===c.parentNode.tagName.toLowerCase()&&(r=c.parentNode.getAttribute("data-dependencies")),r=r?r.split(/\s*,\s*/g):[],o(r,function(){p(e,function(){Prism.highlightElement(c)})})},o=function(e,a,c){"string"==typeof e&&(e=[e]);var t=0,r=e.length,s=function(){r>t?p(e[t],function(){t++,s()},function(){c&&c(e[t])}):t===r&&a&&a(e)};s()},p=function(c,r,s){var i=function(){var e=!1;c.indexOf("!")>=0&&(e=!0,c=c.replace("!",""));var i=a[c];if(i||(i=a[c]={}),r&&(i.success_callbacks||(i.success_callbacks=[]),i.success_callbacks.push(r)),s&&(i.error_callbacks||(i.error_callbacks=[]),i.error_callbacks.push(s)),!e&&Prism.languages[c])u(c);else if(!e&&i.error)m(c);else if(e||!i.loading){i.loading=!0;var l=n(c);t(l,function(){i.loading=!1,u(c)},function(){i.loading=!1,i.error=!0,m(c)})}},l=e[c];l&&l.length?o(l,i):i()},u=function(e){a[e]&&a[e].success_callbacks&&a[e].success_callbacks.length&&a[e].success_callbacks.forEach(function(a){a(e)})},m=function(e){a[e]&&a[e].error_callbacks&&a[e].error_callbacks.length&&a[e].error_callbacks.forEach(function(a){a(e)})};Prism.hooks.add("complete",function(e){e.element&&e.language&&!e.grammar&&e.language!==c&&l(e.language,e.element)})}}(); \ No newline at end of file diff --git a/plugins/show-language/prism-show-language.js b/plugins/show-language/prism-show-language.js index d8c6664d00..8a98e035eb 100644 --- a/plugins/show-language/prism-show-language.js +++ b/plugins/show-language/prism-show-language.js @@ -11,7 +11,7 @@ if (!Prism.plugins.toolbar) { } // The languages map is built automatically with gulp -var Languages = /*languages_placeholder[*/{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","css":"CSS","clike":"C-like","javascript":"JavaScript","abap":"ABAP","actionscript":"ActionScript","apacheconf":"Apache Configuration","apl":"APL","applescript":"AppleScript","arff":"ARFF","asciidoc":"AsciiDoc","asm6502":"6502 Assembly","aspnet":"ASP.NET (C#)","autohotkey":"AutoHotkey","autoit":"AutoIt","basic":"BASIC","csharp":"C#","cpp":"C++","coffeescript":"CoffeeScript","csp":"Content-Security-Policy","css-extras":"CSS Extras","django":"Django/Jinja2","erb":"ERB","fsharp":"F#","gedcom":"GEDCOM","glsl":"GLSL","graphql":"GraphQL","http":"HTTP","hpkp":"HTTP Public-Key-Pins","hsts":"HTTP Strict-Transport-Security","ichigojam":"IchigoJam","inform7":"Inform 7","json":"JSON","latex":"LaTeX","livescript":"LiveScript","lolcode":"LOLCODE","markup-templating":"Markup templating","matlab":"MATLAB","mel":"MEL","n4js":"N4JS","nasm":"NASM","nginx":"nginx","nsis":"NSIS","objectivec":"Objective-C","ocaml":"OCaml","opencl":"OpenCL","parigp":"PARI/GP","php":"PHP","php-extras":"PHP Extras","plsql":"PL/SQL","powershell":"PowerShell","properties":".properties","protobuf":"Protocol Buffers","q":"Q (kdb+ database)","jsx":"React JSX","tsx":"React TSX","renpy":"Ren'py","rest":"reST (reStructuredText)","sas":"SAS","sass":"Sass (Sass)","scss":"Sass (Scss)","sql":"SQL","soy":"Soy (Closure Template)","tt2":"Template Toolkit 2","typescript":"TypeScript","vbnet":"VB.Net","vhdl":"VHDL","vim":"vim","visual-basic":"Visual Basic","wasm":"WebAssembly","wiki":"Wiki markup","xojo":"Xojo (REALbasic)","yaml":"YAML"}/*]*/; +var Languages = /*languages_placeholder[*/{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","css":"CSS","clike":"C-like","javascript":"JavaScript","abap":"ABAP","actionscript":"ActionScript","apacheconf":"Apache Configuration","apl":"APL","applescript":"AppleScript","arff":"ARFF","asciidoc":"AsciiDoc","asm6502":"6502 Assembly","aspnet":"ASP.NET (C#)","autohotkey":"AutoHotkey","autoit":"AutoIt","basic":"BASIC","csharp":"C#","cpp":"C++","coffeescript":"CoffeeScript","csp":"Content-Security-Policy","css-extras":"CSS Extras","django":"Django/Jinja2","erb":"ERB","fsharp":"F#","gedcom":"GEDCOM","glsl":"GLSL","graphql":"GraphQL","http":"HTTP","hpkp":"HTTP Public-Key-Pins","hsts":"HTTP Strict-Transport-Security","ichigojam":"IchigoJam","inform7":"Inform 7","json":"JSON","latex":"LaTeX","livescript":"LiveScript","lolcode":"LOLCODE","markup-templating":"Markup templating","matlab":"MATLAB","mel":"MEL","n4js":"N4JS","nasm":"NASM","nginx":"nginx","nsis":"NSIS","objectivec":"Objective-C","ocaml":"OCaml","opencl":"OpenCL","parigp":"PARI/GP","php":"PHP","php-extras":"PHP Extras","plsql":"PL/SQL","powershell":"PowerShell","properties":".properties","protobuf":"Protocol Buffers","q":"Q (kdb+ database)","jsx":"React JSX","tsx":"React TSX","renpy":"Ren'py","rest":"reST (reStructuredText)","sas":"SAS","sass":"Sass (Sass)","scss":"Sass (Scss)","sql":"SQL","soy":"Soy (Closure Template)","tt2":"Template Toolkit 2","typescript":"TypeScript","vbnet":"VB.Net","vhdl":"VHDL","vim":"vim","visual-basic":"Visual Basic","wasm":"WebAssembly","wiki":"Wiki markup","xojo":"Xojo (REALbasic)","xquery":"XQuery","yaml":"YAML"}/*]*/; Prism.plugins.toolbar.registerButton('show-language', function(env) { var pre = env.element.parentNode; if (!pre || !/pre/i.test(pre.nodeName)) { diff --git a/plugins/show-language/prism-show-language.min.js b/plugins/show-language/prism-show-language.min.js index 64712c106e..7e4d280415 100644 --- a/plugins/show-language/prism-show-language.min.js +++ b/plugins/show-language/prism-show-language.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof self&&self.Prism&&self.document){if(!Prism.plugins.toolbar)return console.warn("Show Languages plugin loaded before Toolbar plugin."),void 0;var e={html:"HTML",xml:"XML",svg:"SVG",mathml:"MathML",css:"CSS",clike:"C-like",javascript:"JavaScript",abap:"ABAP",actionscript:"ActionScript",apacheconf:"Apache Configuration",apl:"APL",applescript:"AppleScript",arff:"ARFF",asciidoc:"AsciiDoc",asm6502:"6502 Assembly",aspnet:"ASP.NET (C#)",autohotkey:"AutoHotkey",autoit:"AutoIt",basic:"BASIC",csharp:"C#",cpp:"C++",coffeescript:"CoffeeScript",csp:"Content-Security-Policy","css-extras":"CSS Extras",django:"Django/Jinja2",erb:"ERB",fsharp:"F#",gedcom:"GEDCOM",glsl:"GLSL",graphql:"GraphQL",http:"HTTP",hpkp:"HTTP Public-Key-Pins",hsts:"HTTP Strict-Transport-Security",ichigojam:"IchigoJam",inform7:"Inform 7",json:"JSON",latex:"LaTeX",livescript:"LiveScript",lolcode:"LOLCODE","markup-templating":"Markup templating",matlab:"MATLAB",mel:"MEL",n4js:"N4JS",nasm:"NASM",nginx:"nginx",nsis:"NSIS",objectivec:"Objective-C",ocaml:"OCaml",opencl:"OpenCL",parigp:"PARI/GP",php:"PHP","php-extras":"PHP Extras",plsql:"PL/SQL",powershell:"PowerShell",properties:".properties",protobuf:"Protocol Buffers",q:"Q (kdb+ database)",jsx:"React JSX",tsx:"React TSX",renpy:"Ren'py",rest:"reST (reStructuredText)",sas:"SAS",sass:"Sass (Sass)",scss:"Sass (Scss)",sql:"SQL",soy:"Soy (Closure Template)",tt2:"Template Toolkit 2",typescript:"TypeScript",vbnet:"VB.Net",vhdl:"VHDL",vim:"vim","visual-basic":"Visual Basic",wasm:"WebAssembly",wiki:"Wiki markup",xojo:"Xojo (REALbasic)",yaml:"YAML"};Prism.plugins.toolbar.registerButton("show-language",function(t){var a=t.element.parentNode;if(a&&/pre/i.test(a.nodeName)){var s=a.getAttribute("data-language")||e[t.language]||t.language&&t.language.substring(0,1).toUpperCase()+t.language.substring(1);if(s){var i=document.createElement("span");return i.textContent=s,i}}})}}(); \ No newline at end of file +!function(){if("undefined"!=typeof self&&self.Prism&&self.document){if(!Prism.plugins.toolbar)return console.warn("Show Languages plugin loaded before Toolbar plugin."),void 0;var e={html:"HTML",xml:"XML",svg:"SVG",mathml:"MathML",css:"CSS",clike:"C-like",javascript:"JavaScript",abap:"ABAP",actionscript:"ActionScript",apacheconf:"Apache Configuration",apl:"APL",applescript:"AppleScript",arff:"ARFF",asciidoc:"AsciiDoc",asm6502:"6502 Assembly",aspnet:"ASP.NET (C#)",autohotkey:"AutoHotkey",autoit:"AutoIt",basic:"BASIC",csharp:"C#",cpp:"C++",coffeescript:"CoffeeScript",csp:"Content-Security-Policy","css-extras":"CSS Extras",django:"Django/Jinja2",erb:"ERB",fsharp:"F#",gedcom:"GEDCOM",glsl:"GLSL",graphql:"GraphQL",http:"HTTP",hpkp:"HTTP Public-Key-Pins",hsts:"HTTP Strict-Transport-Security",ichigojam:"IchigoJam",inform7:"Inform 7",json:"JSON",latex:"LaTeX",livescript:"LiveScript",lolcode:"LOLCODE","markup-templating":"Markup templating",matlab:"MATLAB",mel:"MEL",n4js:"N4JS",nasm:"NASM",nginx:"nginx",nsis:"NSIS",objectivec:"Objective-C",ocaml:"OCaml",opencl:"OpenCL",parigp:"PARI/GP",php:"PHP","php-extras":"PHP Extras",plsql:"PL/SQL",powershell:"PowerShell",properties:".properties",protobuf:"Protocol Buffers",q:"Q (kdb+ database)",jsx:"React JSX",tsx:"React TSX",renpy:"Ren'py",rest:"reST (reStructuredText)",sas:"SAS",sass:"Sass (Sass)",scss:"Sass (Scss)",sql:"SQL",soy:"Soy (Closure Template)",tt2:"Template Toolkit 2",typescript:"TypeScript",vbnet:"VB.Net",vhdl:"VHDL",vim:"vim","visual-basic":"Visual Basic",wasm:"WebAssembly",wiki:"Wiki markup",xojo:"Xojo (REALbasic)",xquery:"XQuery",yaml:"YAML"};Prism.plugins.toolbar.registerButton("show-language",function(t){var a=t.element.parentNode;if(a&&/pre/i.test(a.nodeName)){var s=a.getAttribute("data-language")||e[t.language]||t.language&&t.language.substring(0,1).toUpperCase()+t.language.substring(1);if(s){var i=document.createElement("span");return i.textContent=s,i}}})}}(); \ No newline at end of file diff --git a/tests/languages/xquery/axis_feature.test b/tests/languages/xquery/axis_feature.test new file mode 100644 index 0000000000..08aade5d9d --- /dev/null +++ b/tests/languages/xquery/axis_feature.test @@ -0,0 +1,33 @@ +self:: +child:: +descendant:: +descendant-or-self:: +attribute:: +following:: +following-sibling:: +parent:: +ancestor:: +ancestor-or-self:: +preceding:: +preceding-sibling:: + +---------------------------------------------------- + +[ + ["axis", "self"], ["punctuation", ":"], ["punctuation", ":"], + ["axis", "child"], ["punctuation", ":"], ["punctuation", ":"], + ["axis", "descendant"], ["punctuation", ":"], ["punctuation", ":"], + ["axis", "descendant-or-self"], ["punctuation", ":"], ["punctuation", ":"], + ["axis", "attribute"], ["punctuation", ":"], ["punctuation", ":"], + ["axis", "following"], ["punctuation", ":"], ["punctuation", ":"], + ["axis", "following-sibling"], ["punctuation", ":"], ["punctuation", ":"], + ["axis", "parent"], ["punctuation", ":"], ["punctuation", ":"], + ["axis", "ancestor"], ["punctuation", ":"], ["punctuation", ":"], + ["axis", "ancestor-or-self"], ["punctuation", ":"], ["punctuation", ":"], + ["axis", "preceding"], ["punctuation", ":"], ["punctuation", ":"], + ["axis", "preceding-sibling"], ["punctuation", ":"], ["punctuation", ":"] +] + +---------------------------------------------------- + +Checks for axes. \ No newline at end of file diff --git a/tests/languages/xquery/builtin_feature.test b/tests/languages/xquery/builtin_feature.test new file mode 100644 index 0000000000..11bee02210 --- /dev/null +++ b/tests/languages/xquery/builtin_feature.test @@ -0,0 +1,122 @@ +attribute foo +comment +document +element foo +processing-instruction +text +xs:anyAtomicType +xs:anyType +xs:anyURI +xs:base64Binary +xs:boolean +xs:byte +xs:date +xs:dateTime +xs:dayTimeDuration +xs:decimal +xs:double +xs:duration +xs:ENTITIES +xs:ENTITY +xs:float +xs:gDay +xs:gMonth +xs:gMonthDay +xs:gYear +xs:gYearMonth +xs:hexBinary +xs:ID +xs:IDREF +xs:IDREFS +xs:int +xs:integer +xs:language +xs:long +xs:Name +xs:NCName +xs:negativeInteger +xs:NMTOKEN +xs:NMTOKENS +xs:nonNegativeInteger +xs:nonPositiveInteger +xs:normalizedString +xs:NOTATION +xs:positiveInteger +xs:QName +xs:short +xs:string +xs:time +xs:token +xs:unsignedByte +xs:unsignedInt +xs:unsignedLong +xs:unsignedShort +xs:untyped +xs:untypedAtomic +xs:yearMonthDuration + +---------------------------------------------------- + +[ + ["builtin", "attribute"], + ["xquery-attribute", "foo"], + ["builtin", "comment"], + ["builtin", "document"], + ["builtin", "element"], + ["xquery-element", "foo"], + ["builtin", "processing-instruction"], + ["builtin", "text"], + ["builtin", "xs:anyAtomicType"], + ["builtin", "xs:anyType"], + ["builtin", "xs:anyURI"], + ["builtin", "xs:base64Binary"], + ["builtin", "xs:boolean"], + ["builtin", "xs:byte"], + ["builtin", "xs:date"], + ["builtin", "xs:dateTime"], + ["builtin", "xs:dayTimeDuration"], + ["builtin", "xs:decimal"], + ["builtin", "xs:double"], + ["builtin", "xs:duration"], + ["builtin", "xs:ENTITIES"], + ["builtin", "xs:ENTITY"], + ["builtin", "xs:float"], + ["builtin", "xs:gDay"], + ["builtin", "xs:gMonth"], + ["builtin", "xs:gMonthDay"], + ["builtin", "xs:gYear"], + ["builtin", "xs:gYearMonth"], + ["builtin", "xs:hexBinary"], + ["builtin", "xs:ID"], + ["builtin", "xs:IDREF"], + ["builtin", "xs:IDREFS"], + ["builtin", "xs:int"], + ["builtin", "xs:integer"], + ["builtin", "xs:language"], + ["builtin", "xs:long"], + ["builtin", "xs:Name"], + ["builtin", "xs:NCName"], + ["builtin", "xs:negativeInteger"], + ["builtin", "xs:NMTOKEN"], + ["builtin", "xs:NMTOKENS"], + ["builtin", "xs:nonNegativeInteger"], + ["builtin", "xs:nonPositiveInteger"], + ["builtin", "xs:normalizedString"], + ["builtin", "xs:NOTATION"], + ["builtin", "xs:positiveInteger"], + ["builtin", "xs:QName"], + ["builtin", "xs:short"], + ["builtin", "xs:string"], + ["builtin", "xs:time"], + ["builtin", "xs:token"], + ["builtin", "xs:unsignedByte"], + ["builtin", "xs:unsignedInt"], + ["builtin", "xs:unsignedLong"], + ["builtin", "xs:unsignedShort"], + ["builtin", "xs:untyped"], + ["builtin", "xs:untypedAtomic"], + ["builtin", "xs:yearMonthDuration"] +] + +---------------------------------------------------- +Checks for builtin types. \ No newline at end of file diff --git a/tests/languages/xquery/extension_feature.test b/tests/languages/xquery/extension_feature.test new file mode 100644 index 0000000000..92b820df67 --- /dev/null +++ b/tests/languages/xquery/extension_feature.test @@ -0,0 +1,11 @@ +(# datypic:timeOut 200 #) + +---------------------------------------------------- + +[ + ["extension", "(# datypic:timeOut 200 #)"] +] + +---------------------------------------------------- + +Checks for extensions. \ No newline at end of file diff --git a/tests/languages/xquery/function_feature.test b/tests/languages/xquery/function_feature.test new file mode 100644 index 0000000000..4a06f577f8 --- /dev/null +++ b/tests/languages/xquery/function_feature.test @@ -0,0 +1,43 @@ +doc("catalog.xml") +generate-id($prod) +xs:QName("strings:trim") +declare function prod:countProds ($prods as element(product)*) as xs:string +false() + +---------------------------------------------------- + +[ + ["function", "doc"], + ["punctuation", "("], + ["string", "\"catalog.xml\""], + ["punctuation", ")"], + ["function", "generate-id"], + ["punctuation", "("], + ["variable", "$prod"], + ["punctuation", ")"], + ["function", "xs:QName"], + ["punctuation", "("], + ["string", "\"strings:trim\""], + ["punctuation", ")"], + ["keyword", "declare"], + ["keyword", "function"], + ["function", "prod:countProds"], + ["punctuation", "("], + ["variable", "$prods"], + ["keyword", "as"], + ["function", "element"], + ["punctuation", "("], + "product", + ["punctuation", ")"], + ["operator", "*"], + ["punctuation", ")"], + ["keyword", "as"], + ["builtin", "xs:string"], + ["function", "false"], + ["punctuation", "("], + ["punctuation", ")"] +] + +---------------------------------------------------- + +Checks for functions. \ No newline at end of file diff --git a/tests/languages/xquery/keyword-operator_feature.test b/tests/languages/xquery/keyword-operator_feature.test new file mode 100644 index 0000000000..cc86a9de78 --- /dev/null +++ b/tests/languages/xquery/keyword-operator_feature.test @@ -0,0 +1,43 @@ +and +castable as +div +eq +except +ge +gt +idiv +instance of +intersect +is +le +lt +mod +ne +or +union + +---------------------------------------------------- + +[ + ["keyword-operator", "and"], + ["keyword-operator", "castable as"], + ["keyword-operator", "div"], + ["keyword-operator", "eq"], + ["keyword-operator", "except"], + ["keyword-operator", "ge"], + ["keyword-operator", "gt"], + ["keyword-operator", "idiv"], + ["keyword-operator", "instance of"], + ["keyword-operator", "intersect"], + ["keyword-operator", "is"], + ["keyword-operator", "le"], + ["keyword-operator", "lt"], + ["keyword-operator", "mod"], + ["keyword-operator", "ne"], + ["keyword-operator", "or"], + ["keyword-operator", "union"] +] + +---------------------------------------------------- + +Checks for keyword operators. \ No newline at end of file diff --git a/tests/languages/xquery/keyword_feature.test b/tests/languages/xquery/keyword_feature.test new file mode 100644 index 0000000000..db622bdcbe --- /dev/null +++ b/tests/languages/xquery/keyword_feature.test @@ -0,0 +1,119 @@ +as +ascending +at +base-uri +boundary-space +case +cast as +collation +construction +copy-namespaces +declare +default +descending +else +empty greatest +empty least +encoding +every +external +for +function +if +import +in +inherit +lax +let +map +module +namespace +no-inherit +no-preserve +option +order +order by +ordered +ordering +preserve +return +satisfies +schema +some +stable +strict +strip +then +to +treat as +typeswitch +unordered +validate +variable +version +where +xquery + +---------------------------------------------------- + +[ + ["keyword", "as"], + ["keyword", "ascending"], + ["keyword", "at"], + ["keyword", "base-uri"], + ["keyword", "boundary-space"], + ["keyword", "case"], + ["keyword", "cast as"], + ["keyword", "collation"], + ["keyword", "construction"], + ["keyword", "copy-namespaces"], + ["keyword", "declare"], + ["keyword", "default"], + ["keyword", "descending"], + ["keyword", "else"], + ["keyword", "empty greatest"], + ["keyword", "empty least"], + ["keyword", "encoding"], + ["keyword", "every"], + ["keyword", "external"], + ["keyword", "for"], + ["keyword", "function"], + ["keyword", "if"], + ["keyword", "import"], + ["keyword", "in"], + ["keyword", "inherit"], + ["keyword", "lax"], + ["keyword", "let"], + ["keyword", "map"], + ["keyword", "module"], + ["keyword", "namespace"], + ["keyword", "no-inherit"], + ["keyword", "no-preserve"], + ["keyword", "option"], + ["keyword", "order"], + ["keyword", "order by"], + ["keyword", "ordered"], + ["keyword", "ordering"], + ["keyword", "preserve"], + ["keyword", "return"], + ["keyword", "satisfies"], + ["keyword", "schema"], + ["keyword", "some"], + ["keyword", "stable"], + ["keyword", "strict"], + ["keyword", "strip"], + ["keyword", "then"], + ["keyword", "to"], + ["keyword", "treat as"], + ["keyword", "typeswitch"], + ["keyword", "unordered"], + ["keyword", "validate"], + ["keyword", "variable"], + ["keyword", "version"], + ["keyword", "where"], + ["keyword", "xquery"] +] + +---------------------------------------------------- + +Checks for keywords. \ No newline at end of file diff --git a/tests/languages/xquery/number_feature.test b/tests/languages/xquery/number_feature.test new file mode 100644 index 0000000000..85b4261f82 --- /dev/null +++ b/tests/languages/xquery/number_feature.test @@ -0,0 +1,17 @@ +0 +3.14159 +42E8 +3.25E-4 + +---------------------------------------------------- + +[ + ["number", "0"], + ["number", "3.14159"], + ["number", "42E8"], + ["number", "3.25E-4"] +] + +---------------------------------------------------- + +Checks for numbers. \ No newline at end of file diff --git a/tests/languages/xquery/operator_feature.test b/tests/languages/xquery/operator_feature.test new file mode 100644 index 0000000000..162c1fa578 --- /dev/null +++ b/tests/languages/xquery/operator_feature.test @@ -0,0 +1,21 @@ ++ - * += ? | @ +. .. +:= != +< <= << +> >= >> + +---------------------------------------------------- + +[ + ["operator", "+"], ["operator", "-"], ["operator", "*"], + ["operator", "="], ["operator", "?"], ["operator", "|"], ["operator", "@"], + ["operator", "."], ["operator", ".."], + ["operator", ":="], ["operator", "!="], + ["operator", "<"], ["operator", "<="], ["operator", "<<"], + ["operator", ">"], ["operator", ">="], ["operator", ">>"] +] + +---------------------------------------------------- + +Checks for operators. \ No newline at end of file diff --git a/tests/languages/xquery/plain-text_feature.test b/tests/languages/xquery/plain-text_feature.test new file mode 100644 index 0000000000..f70bbf4e39 --- /dev/null +++ b/tests/languages/xquery/plain-text_feature.test @@ -0,0 +1,71 @@ +return
      + +plaintext +{comment{concat(" List of ", $count, " products ")}} +
    + +

    data($prod/name){data($prod/name)}{{data($prod/name)}}

    + +---------------------------------------------------- + +[ + ["keyword", "return"], + ["tag", [ + ["tag", [ + ["punctuation", "<"], + "ul" + ]], + ["punctuation", ">"] + ]], + ["comment", ""], + ["plain-text", "\r\nplaintext\r\n"], + ["punctuation", "{"], + ["builtin", "comment"], + ["punctuation", "{"], + ["function", "concat"], + ["punctuation", "("], + ["string", "\" List of \""], + ["punctuation", ","], + ["variable", "$count"], + ["punctuation", ","], + ["string", "\" products \""], + ["punctuation", ")"], + ["punctuation", "}"], + ["punctuation", "}"], + ["tag", [ + ["tag", [ + ["punctuation", ""] + ]], + + ["tag", [ + ["tag", [ + ["punctuation", "<"], + "h1" + ]], + ["punctuation", ">"] + ]], + ["plain-text", "data($prod/name)"], + ["punctuation", "{"], + ["function", "data"], + ["punctuation", "("], + ["variable", "$prod"], + ["punctuation", "/"], + "name", + ["punctuation", ")"], + ["punctuation", "}"], + ["plain-text", "{{data($prod/name)}}"], + ["tag", [ + ["tag", [ + ["punctuation", ""] + ]] +] + +---------------------------------------------------- + +Checks for plain-text between tags. \ No newline at end of file diff --git a/tests/languages/xquery/string_feature.test b/tests/languages/xquery/string_feature.test new file mode 100644 index 0000000000..bc64574475 --- /dev/null +++ b/tests/languages/xquery/string_feature.test @@ -0,0 +1,25 @@ +"" +"Foo""bar" +"Foo' +bar"" +baz" +'' +'Foo''bar' +'Foo" +bar'' +baz' + +---------------------------------------------------- + +[ + ["string", "\"\""], + ["string", "\"Foo\"\"bar\""], + ["string", "\"Foo'\r\nbar\"\"\r\nbaz\""], + ["string", "''"], + ["string", "'Foo''bar'"], + ["string", "'Foo\"\r\nbar''\r\nbaz'"] +] + +---------------------------------------------------- + +Checks for strings. \ No newline at end of file diff --git a/tests/languages/xquery/tag_feature.test b/tests/languages/xquery/tag_feature.test new file mode 100644 index 0000000000..01211784c6 --- /dev/null +++ b/tests/languages/xquery/tag_feature.test @@ -0,0 +1,133 @@ +
  • number: {data($prod/number) +}, name: {data($prod/name)}
  • + +return + +
  • + +---------------------------------------------------- + +[ + ["tag", [ + ["tag", [ + ["punctuation", "<"], + "li" + ]], + ["attr-name", ["dep"]], + ["attr-value", [ + ["punctuation", "=\""], + ["expression", [ + ["punctuation", "{"], + ["variable", "$prod"], + ["punctuation", "/"], + ["operator", "@"], + "dept", + ["punctuation", "}"] + ]], + ["punctuation", "\""] + ]], + ["punctuation", ">"] + ]], + ["plain-text", "number: "], + ["punctuation", "{"], + ["function", "data"], + ["punctuation", "("], + ["variable", "$prod"], + ["punctuation", "/"], + "number", + ["punctuation", ")"], + ["punctuation", "}"], + ["plain-text", ", name: "], + ["punctuation", "{"], + ["function", "data"], + ["punctuation", "("], + ["variable", "$prod"], + ["punctuation", "/"], + "name", + ["punctuation", ")"], + ["punctuation", "}"], + ["tag", [ + ["tag", [ + ["punctuation", ""] + ]], + + ["keyword", "return"], + ["tag", [ + ["tag", [ + ["punctuation", "<"], + "item" + ]], + ["attr-name", ["num"]], + ["attr-value", [ + ["punctuation", "=\""], + ["expression", [ + ["punctuation", "{"], + ["variable", "$item"], + ["punctuation", "/"], + ["operator", "@"], + "num", + ["punctuation", "}"] + ]], + ["punctuation", "\""] + ]], + ["attr-name", ["name"]], + ["attr-value", [ + ["punctuation", "=\""], + ["expression", [ + ["punctuation", "{"], + ["variable", "$name"], + ["punctuation", "}"] + ]], + ["punctuation", "\""] + ]], + ["attr-name", ["quan"]], + ["attr-value", [ + ["punctuation", "=\""], + ["expression", [ + ["punctuation", "{"], + ["variable", "$item"], + ["punctuation", "/"], + ["operator", "@"], + "quantity", + ["punctuation", "}"] + ]], + ["punctuation", "\""] + ]], + ["punctuation", "/>"] + ]], + + ["tag", [ + ["tag", [ + ["punctuation", "<"], + "li" + ]], + ["attr-name", ["dep"]], + ["attr-value", [ + ["punctuation", "=\""], + ["expression", [ + ["punctuation", "{"], + ["function", "substring-after"], + ["punctuation", "("], + ["variable", "$prod"], + ["punctuation", "/"], + ["operator", "@"], + "dept", + ["punctuation", ","], + ["string", "\"-\""], + ["punctuation", ")"], + ["punctuation", "}"] + ]], + ["punctuation", "\""] + ]], + ["punctuation", "/>"] + ]] +] + +---------------------------------------------------- + +Checks for XQuery inside tags. \ No newline at end of file diff --git a/tests/languages/xquery/variable_feature.test b/tests/languages/xquery/variable_feature.test new file mode 100644 index 0000000000..bf9d877477 --- /dev/null +++ b/tests/languages/xquery/variable_feature.test @@ -0,0 +1,15 @@ +$foo +$foo-bar +$strings:LetterA + +---------------------------------------------------- + +[ + ["variable", "$foo"], + ["variable", "$foo-bar"], + ["variable", "$strings:LetterA"] +] + +---------------------------------------------------- + +Checks for variables. \ No newline at end of file diff --git a/tests/languages/xquery/xquery-attribute_feature.test b/tests/languages/xquery/xquery-attribute_feature.test new file mode 100644 index 0000000000..db2d131c75 --- /dev/null +++ b/tests/languages/xquery/xquery-attribute_feature.test @@ -0,0 +1,18 @@ +attribute foo +attribute foo-bar +attribute foo:bar + +---------------------------------------------------- + +[ + ["builtin", "attribute"], + ["xquery-attribute", "foo"], + ["builtin", "attribute"], + ["xquery-attribute", "foo-bar"], + ["builtin", "attribute"], + ["xquery-attribute", "foo:bar"] +] + +---------------------------------------------------- + +Checks for XQuery attribute constructor. \ No newline at end of file diff --git a/tests/languages/xquery/xquery-comment_feature.test b/tests/languages/xquery/xquery-comment_feature.test new file mode 100644 index 0000000000..5baff67eb2 --- /dev/null +++ b/tests/languages/xquery/xquery-comment_feature.test @@ -0,0 +1,19 @@ +(::) +(: Single line comment :) +(:Multi +line +comment:) +(: :) + +---------------------------------------------------- + +[ + ["xquery-comment", "(::)"], + ["xquery-comment", "(: Single line comment :)"], + ["xquery-comment", "(:Multi\r\nline\r\ncomment:)"], + ["xquery-comment", "(: :)"] +] + +---------------------------------------------------- + +Checks for XQuery comments. \ No newline at end of file diff --git a/tests/languages/xquery/xquery-element_feature.test b/tests/languages/xquery/xquery-element_feature.test new file mode 100644 index 0000000000..a50319706a --- /dev/null +++ b/tests/languages/xquery/xquery-element_feature.test @@ -0,0 +1,18 @@ +element html +element foo-bar +element foo:bar + +---------------------------------------------------- + +[ + ["builtin", "element"], + ["xquery-element", "html"], + ["builtin", "element"], + ["xquery-element", "foo-bar"], + ["builtin", "element"], + ["xquery-element", "foo:bar"] +] + +---------------------------------------------------- + +Checks for XQuery element constructors. \ No newline at end of file From a0bfc84d86d874046d8ae0a048b18acbcad697c4 Mon Sep 17 00:00:00 2001 From: Golmote Date: Sat, 26 May 2018 11:59:14 +0200 Subject: [PATCH 0025/1100] Add `objectpascal` as an alias to `pascal` (see #1426) --- components.js | 2 +- components.json | 4 ++++ components/prism-pascal.js | 4 +++- components/prism-pascal.min.js | 2 +- plugins/show-language/prism-show-language.js | 2 +- plugins/show-language/prism-show-language.min.js | 2 +- 6 files changed, 11 insertions(+), 5 deletions(-) diff --git a/components.js b/components.js index bbdeb90dff..08a9d9eace 100644 --- a/components.js +++ b/components.js @@ -1,2 +1,2 @@ -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default"},"clike":{"title":"C-like","option":"default","overrideExampleHeader":true},"javascript":{"title":"JavaScript","require":"clike","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"actionscript":{"title":"ActionScript","require":"javascript","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","alias":"shell","owner":"Golmote"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":"dotnet","owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"coffeescript":{"title":"CoffeeScript","require":"javascript","owner":"R-osey"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup","alias":"jinja2","owner":"romanvm"},"docker":{"title":"Docker","owner":"JustinBeckwith"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"http":{"title":"HTTP","owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"json":{"title":"JSON","owner":"CupOfTea696"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","owner":"japborst"},"less":{"title":"Less","require":"css","owner":"Golmote"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","owner":"JuanCaicedo","alias":["emacs","elisp","emacs-lisp"]},"livescript":{"title":"LiveScript","owner":"Golmote"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"n4js":{"title":"N4JS","require":"javascript","owner":"bsmith-n4"},"nasm":{"title":"NASM","owner":"rbmj"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"cpp","overrideExampleHeader":true,"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","owner":"Golmote"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"php-extras":{"title":"PHP Extras","require":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":"javascript","owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","owner":"Golmote"},"python":{"title":"Python","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"ruby":{"title":"Ruby","require":"clike","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sql":{"title":"SQL","owner":"multipetros"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","owner":"Golmote"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","alias":"ts","owner":"vkbansal"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","owner":"Golmote","alias":"vb"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","owner":"hason"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":"Line Highlight","line-numbers":{"title":"Line Numbers","owner":"kuba-kubula"},"show-invisibles":"Show Invisibles","autolinker":"Autolinker","wpd":"WebPlatform Docs","custom-class":{"title":"Custom Class","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","noCSS":true},"show-language":{"title":"Show Language","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","owner":"Golmote","noCSS":true},"previewers":{"title":"Previewers","owner":"Golmote"},"autoloader":{"title":"Autoloader","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","owner":"Golmote","after":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","owner":"chriswells0"},"unescaped-markup":"Unescaped Markup","normalize-whitespace":{"title":"Normalize Whitespace","owner":"zeitgeist87","after":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","owner":"mAAdhaTTah","require":"toolbar","noCSS":true}}}; +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default"},"clike":{"title":"C-like","option":"default","overrideExampleHeader":true},"javascript":{"title":"JavaScript","require":"clike","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"actionscript":{"title":"ActionScript","require":"javascript","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","alias":"shell","owner":"Golmote"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":"dotnet","owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"coffeescript":{"title":"CoffeeScript","require":"javascript","owner":"R-osey"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup","alias":"jinja2","owner":"romanvm"},"docker":{"title":"Docker","owner":"JustinBeckwith"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"http":{"title":"HTTP","owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"json":{"title":"JSON","owner":"CupOfTea696"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","owner":"japborst"},"less":{"title":"Less","require":"css","owner":"Golmote"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","owner":"JuanCaicedo","alias":["emacs","elisp","emacs-lisp"]},"livescript":{"title":"LiveScript","owner":"Golmote"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"n4js":{"title":"N4JS","require":"javascript","owner":"bsmith-n4"},"nasm":{"title":"NASM","owner":"rbmj"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"cpp","overrideExampleHeader":true,"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"php-extras":{"title":"PHP Extras","require":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":"javascript","owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","owner":"Golmote"},"python":{"title":"Python","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"ruby":{"title":"Ruby","require":"clike","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sql":{"title":"SQL","owner":"multipetros"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","owner":"Golmote"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","alias":"ts","owner":"vkbansal"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","owner":"Golmote","alias":"vb"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","owner":"hason"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":"Line Highlight","line-numbers":{"title":"Line Numbers","owner":"kuba-kubula"},"show-invisibles":"Show Invisibles","autolinker":"Autolinker","wpd":"WebPlatform Docs","custom-class":{"title":"Custom Class","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","noCSS":true},"show-language":{"title":"Show Language","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","owner":"Golmote","noCSS":true},"previewers":{"title":"Previewers","owner":"Golmote"},"autoloader":{"title":"Autoloader","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","owner":"Golmote","after":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","owner":"chriswells0"},"unescaped-markup":"Unescaped Markup","normalize-whitespace":{"title":"Normalize Whitespace","owner":"zeitgeist87","after":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","owner":"mAAdhaTTah","require":"toolbar","noCSS":true}}}; if (typeof module !== 'undefined' && module.exports) { module.exports = components; } \ No newline at end of file diff --git a/components.json b/components.json index 3d981ad137..165bf3d226 100644 --- a/components.json +++ b/components.json @@ -480,6 +480,10 @@ }, "pascal": { "title": "Pascal", + "alias": "objectpascal", + "aliasTitles": { + "objectpascal": "Object Pascal" + }, "owner": "Golmote" }, "perl": { diff --git a/components/prism-pascal.js b/components/prism-pascal.js index f61ed98416..bc7a2836f6 100644 --- a/components/prism-pascal.js +++ b/components/prism-pascal.js @@ -50,4 +50,6 @@ Prism.languages.pascal = { } ], 'punctuation': /\(\.|\.\)|[()\[\]:;,.]/ -}; \ No newline at end of file +}; + +Prism.languages.objectpascal = Prism.languages.pascal; \ No newline at end of file diff --git a/components/prism-pascal.min.js b/components/prism-pascal.min.js index 67458a0049..7f17c3621a 100644 --- a/components/prism-pascal.min.js +++ b/components/prism-pascal.min.js @@ -1 +1 @@ -Prism.languages.pascal={comment:[/\(\*[\s\S]+?\*\)/,/\{[\s\S]+?\}/,/\/\/.*/],string:{pattern:/(?:'(?:''|[^'\r\n])*'|#[&$%]?[a-f\d]+)+|\^[a-z]/i,greedy:!0},keyword:[{pattern:/(^|[^&])\b(?:absolute|array|asm|begin|case|const|constructor|destructor|do|downto|else|end|file|for|function|goto|if|implementation|inherited|inline|interface|label|nil|object|of|operator|packed|procedure|program|record|reintroduce|repeat|self|set|string|then|to|type|unit|until|uses|var|while|with)\b/i,lookbehind:!0},{pattern:/(^|[^&])\b(?:dispose|exit|false|new|true)\b/i,lookbehind:!0},{pattern:/(^|[^&])\b(?:class|dispinterface|except|exports|finalization|finally|initialization|inline|library|on|out|packed|property|raise|resourcestring|threadvar|try)\b/i,lookbehind:!0},{pattern:/(^|[^&])\b(?:absolute|abstract|alias|assembler|bitpacked|break|cdecl|continue|cppdecl|cvar|default|deprecated|dynamic|enumerator|experimental|export|external|far|far16|forward|generic|helper|implements|index|interrupt|iochecks|local|message|name|near|nodefault|noreturn|nostackframe|oldfpccall|otherwise|overload|override|pascal|platform|private|protected|public|published|read|register|reintroduce|result|safecall|saveregisters|softfloat|specialize|static|stdcall|stored|strict|unaligned|unimplemented|varargs|virtual|write)\b/i,lookbehind:!0}],number:[/(?:[&%]\d+|\$[a-f\d]+)/i,/\b\d+(?:\.\d+)?(?:e[+-]?\d+)?/i],operator:[/\.\.|\*\*|:=|<[<=>]?|>[>=]?|[+\-*\/]=?|[@^=]/i,{pattern:/(^|[^&])\b(?:and|as|div|exclude|in|include|is|mod|not|or|shl|shr|xor)\b/,lookbehind:!0}],punctuation:/\(\.|\.\)|[()\[\]:;,.]/}; \ No newline at end of file +Prism.languages.pascal={comment:[/\(\*[\s\S]+?\*\)/,/\{[\s\S]+?\}/,/\/\/.*/],string:{pattern:/(?:'(?:''|[^'\r\n])*'|#[&$%]?[a-f\d]+)+|\^[a-z]/i,greedy:!0},keyword:[{pattern:/(^|[^&])\b(?:absolute|array|asm|begin|case|const|constructor|destructor|do|downto|else|end|file|for|function|goto|if|implementation|inherited|inline|interface|label|nil|object|of|operator|packed|procedure|program|record|reintroduce|repeat|self|set|string|then|to|type|unit|until|uses|var|while|with)\b/i,lookbehind:!0},{pattern:/(^|[^&])\b(?:dispose|exit|false|new|true)\b/i,lookbehind:!0},{pattern:/(^|[^&])\b(?:class|dispinterface|except|exports|finalization|finally|initialization|inline|library|on|out|packed|property|raise|resourcestring|threadvar|try)\b/i,lookbehind:!0},{pattern:/(^|[^&])\b(?:absolute|abstract|alias|assembler|bitpacked|break|cdecl|continue|cppdecl|cvar|default|deprecated|dynamic|enumerator|experimental|export|external|far|far16|forward|generic|helper|implements|index|interrupt|iochecks|local|message|name|near|nodefault|noreturn|nostackframe|oldfpccall|otherwise|overload|override|pascal|platform|private|protected|public|published|read|register|reintroduce|result|safecall|saveregisters|softfloat|specialize|static|stdcall|stored|strict|unaligned|unimplemented|varargs|virtual|write)\b/i,lookbehind:!0}],number:[/(?:[&%]\d+|\$[a-f\d]+)/i,/\b\d+(?:\.\d+)?(?:e[+-]?\d+)?/i],operator:[/\.\.|\*\*|:=|<[<=>]?|>[>=]?|[+\-*\/]=?|[@^=]/i,{pattern:/(^|[^&])\b(?:and|as|div|exclude|in|include|is|mod|not|or|shl|shr|xor)\b/,lookbehind:!0}],punctuation:/\(\.|\.\)|[()\[\]:;,.]/},Prism.languages.objectpascal=Prism.languages.pascal; \ No newline at end of file diff --git a/plugins/show-language/prism-show-language.js b/plugins/show-language/prism-show-language.js index 8a98e035eb..8cc62cff32 100644 --- a/plugins/show-language/prism-show-language.js +++ b/plugins/show-language/prism-show-language.js @@ -11,7 +11,7 @@ if (!Prism.plugins.toolbar) { } // The languages map is built automatically with gulp -var Languages = /*languages_placeholder[*/{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","css":"CSS","clike":"C-like","javascript":"JavaScript","abap":"ABAP","actionscript":"ActionScript","apacheconf":"Apache Configuration","apl":"APL","applescript":"AppleScript","arff":"ARFF","asciidoc":"AsciiDoc","asm6502":"6502 Assembly","aspnet":"ASP.NET (C#)","autohotkey":"AutoHotkey","autoit":"AutoIt","basic":"BASIC","csharp":"C#","cpp":"C++","coffeescript":"CoffeeScript","csp":"Content-Security-Policy","css-extras":"CSS Extras","django":"Django/Jinja2","erb":"ERB","fsharp":"F#","gedcom":"GEDCOM","glsl":"GLSL","graphql":"GraphQL","http":"HTTP","hpkp":"HTTP Public-Key-Pins","hsts":"HTTP Strict-Transport-Security","ichigojam":"IchigoJam","inform7":"Inform 7","json":"JSON","latex":"LaTeX","livescript":"LiveScript","lolcode":"LOLCODE","markup-templating":"Markup templating","matlab":"MATLAB","mel":"MEL","n4js":"N4JS","nasm":"NASM","nginx":"nginx","nsis":"NSIS","objectivec":"Objective-C","ocaml":"OCaml","opencl":"OpenCL","parigp":"PARI/GP","php":"PHP","php-extras":"PHP Extras","plsql":"PL/SQL","powershell":"PowerShell","properties":".properties","protobuf":"Protocol Buffers","q":"Q (kdb+ database)","jsx":"React JSX","tsx":"React TSX","renpy":"Ren'py","rest":"reST (reStructuredText)","sas":"SAS","sass":"Sass (Sass)","scss":"Sass (Scss)","sql":"SQL","soy":"Soy (Closure Template)","tt2":"Template Toolkit 2","typescript":"TypeScript","vbnet":"VB.Net","vhdl":"VHDL","vim":"vim","visual-basic":"Visual Basic","wasm":"WebAssembly","wiki":"Wiki markup","xojo":"Xojo (REALbasic)","xquery":"XQuery","yaml":"YAML"}/*]*/; +var Languages = /*languages_placeholder[*/{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","css":"CSS","clike":"C-like","javascript":"JavaScript","abap":"ABAP","actionscript":"ActionScript","apacheconf":"Apache Configuration","apl":"APL","applescript":"AppleScript","arff":"ARFF","asciidoc":"AsciiDoc","asm6502":"6502 Assembly","aspnet":"ASP.NET (C#)","autohotkey":"AutoHotkey","autoit":"AutoIt","basic":"BASIC","csharp":"C#","cpp":"C++","coffeescript":"CoffeeScript","csp":"Content-Security-Policy","css-extras":"CSS Extras","django":"Django/Jinja2","erb":"ERB","fsharp":"F#","gedcom":"GEDCOM","glsl":"GLSL","graphql":"GraphQL","http":"HTTP","hpkp":"HTTP Public-Key-Pins","hsts":"HTTP Strict-Transport-Security","ichigojam":"IchigoJam","inform7":"Inform 7","json":"JSON","latex":"LaTeX","livescript":"LiveScript","lolcode":"LOLCODE","markup-templating":"Markup templating","matlab":"MATLAB","mel":"MEL","n4js":"N4JS","nasm":"NASM","nginx":"nginx","nsis":"NSIS","objectivec":"Objective-C","ocaml":"OCaml","opencl":"OpenCL","parigp":"PARI/GP","objectpascal":"Object Pascal","php":"PHP","php-extras":"PHP Extras","plsql":"PL/SQL","powershell":"PowerShell","properties":".properties","protobuf":"Protocol Buffers","q":"Q (kdb+ database)","jsx":"React JSX","tsx":"React TSX","renpy":"Ren'py","rest":"reST (reStructuredText)","sas":"SAS","sass":"Sass (Sass)","scss":"Sass (Scss)","sql":"SQL","soy":"Soy (Closure Template)","tt2":"Template Toolkit 2","typescript":"TypeScript","vbnet":"VB.Net","vhdl":"VHDL","vim":"vim","visual-basic":"Visual Basic","wasm":"WebAssembly","wiki":"Wiki markup","xojo":"Xojo (REALbasic)","xquery":"XQuery","yaml":"YAML"}/*]*/; Prism.plugins.toolbar.registerButton('show-language', function(env) { var pre = env.element.parentNode; if (!pre || !/pre/i.test(pre.nodeName)) { diff --git a/plugins/show-language/prism-show-language.min.js b/plugins/show-language/prism-show-language.min.js index 7e4d280415..da0ff83c9c 100644 --- a/plugins/show-language/prism-show-language.min.js +++ b/plugins/show-language/prism-show-language.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof self&&self.Prism&&self.document){if(!Prism.plugins.toolbar)return console.warn("Show Languages plugin loaded before Toolbar plugin."),void 0;var e={html:"HTML",xml:"XML",svg:"SVG",mathml:"MathML",css:"CSS",clike:"C-like",javascript:"JavaScript",abap:"ABAP",actionscript:"ActionScript",apacheconf:"Apache Configuration",apl:"APL",applescript:"AppleScript",arff:"ARFF",asciidoc:"AsciiDoc",asm6502:"6502 Assembly",aspnet:"ASP.NET (C#)",autohotkey:"AutoHotkey",autoit:"AutoIt",basic:"BASIC",csharp:"C#",cpp:"C++",coffeescript:"CoffeeScript",csp:"Content-Security-Policy","css-extras":"CSS Extras",django:"Django/Jinja2",erb:"ERB",fsharp:"F#",gedcom:"GEDCOM",glsl:"GLSL",graphql:"GraphQL",http:"HTTP",hpkp:"HTTP Public-Key-Pins",hsts:"HTTP Strict-Transport-Security",ichigojam:"IchigoJam",inform7:"Inform 7",json:"JSON",latex:"LaTeX",livescript:"LiveScript",lolcode:"LOLCODE","markup-templating":"Markup templating",matlab:"MATLAB",mel:"MEL",n4js:"N4JS",nasm:"NASM",nginx:"nginx",nsis:"NSIS",objectivec:"Objective-C",ocaml:"OCaml",opencl:"OpenCL",parigp:"PARI/GP",php:"PHP","php-extras":"PHP Extras",plsql:"PL/SQL",powershell:"PowerShell",properties:".properties",protobuf:"Protocol Buffers",q:"Q (kdb+ database)",jsx:"React JSX",tsx:"React TSX",renpy:"Ren'py",rest:"reST (reStructuredText)",sas:"SAS",sass:"Sass (Sass)",scss:"Sass (Scss)",sql:"SQL",soy:"Soy (Closure Template)",tt2:"Template Toolkit 2",typescript:"TypeScript",vbnet:"VB.Net",vhdl:"VHDL",vim:"vim","visual-basic":"Visual Basic",wasm:"WebAssembly",wiki:"Wiki markup",xojo:"Xojo (REALbasic)",xquery:"XQuery",yaml:"YAML"};Prism.plugins.toolbar.registerButton("show-language",function(t){var a=t.element.parentNode;if(a&&/pre/i.test(a.nodeName)){var s=a.getAttribute("data-language")||e[t.language]||t.language&&t.language.substring(0,1).toUpperCase()+t.language.substring(1);if(s){var i=document.createElement("span");return i.textContent=s,i}}})}}(); \ No newline at end of file +!function(){if("undefined"!=typeof self&&self.Prism&&self.document){if(!Prism.plugins.toolbar)return console.warn("Show Languages plugin loaded before Toolbar plugin."),void 0;var e={html:"HTML",xml:"XML",svg:"SVG",mathml:"MathML",css:"CSS",clike:"C-like",javascript:"JavaScript",abap:"ABAP",actionscript:"ActionScript",apacheconf:"Apache Configuration",apl:"APL",applescript:"AppleScript",arff:"ARFF",asciidoc:"AsciiDoc",asm6502:"6502 Assembly",aspnet:"ASP.NET (C#)",autohotkey:"AutoHotkey",autoit:"AutoIt",basic:"BASIC",csharp:"C#",cpp:"C++",coffeescript:"CoffeeScript",csp:"Content-Security-Policy","css-extras":"CSS Extras",django:"Django/Jinja2",erb:"ERB",fsharp:"F#",gedcom:"GEDCOM",glsl:"GLSL",graphql:"GraphQL",http:"HTTP",hpkp:"HTTP Public-Key-Pins",hsts:"HTTP Strict-Transport-Security",ichigojam:"IchigoJam",inform7:"Inform 7",json:"JSON",latex:"LaTeX",livescript:"LiveScript",lolcode:"LOLCODE","markup-templating":"Markup templating",matlab:"MATLAB",mel:"MEL",n4js:"N4JS",nasm:"NASM",nginx:"nginx",nsis:"NSIS",objectivec:"Objective-C",ocaml:"OCaml",opencl:"OpenCL",parigp:"PARI/GP",objectpascal:"Object Pascal",php:"PHP","php-extras":"PHP Extras",plsql:"PL/SQL",powershell:"PowerShell",properties:".properties",protobuf:"Protocol Buffers",q:"Q (kdb+ database)",jsx:"React JSX",tsx:"React TSX",renpy:"Ren'py",rest:"reST (reStructuredText)",sas:"SAS",sass:"Sass (Sass)",scss:"Sass (Scss)",sql:"SQL",soy:"Soy (Closure Template)",tt2:"Template Toolkit 2",typescript:"TypeScript",vbnet:"VB.Net",vhdl:"VHDL",vim:"vim","visual-basic":"Visual Basic",wasm:"WebAssembly",wiki:"Wiki markup",xojo:"Xojo (REALbasic)",xquery:"XQuery",yaml:"YAML"};Prism.plugins.toolbar.registerButton("show-language",function(a){var t=a.element.parentNode;if(t&&/pre/i.test(t.nodeName)){var s=t.getAttribute("data-language")||e[a.language]||a.language&&a.language.substring(0,1).toUpperCase()+a.language.substring(1);if(s){var i=document.createElement("span");return i.textContent=s,i}}})}}(); \ No newline at end of file From 84935acdacb80c1f73f9a249385c9fb8919a948e Mon Sep 17 00:00:00 2001 From: Golmote Date: Sat, 26 May 2018 15:36:24 +0200 Subject: [PATCH 0026/1100] Handle optional dependencies in `loadLanguages()` (#1417) * Add optional dependencies in `components.json` * Handle optional dependencies in `loadLanguages()` * Feedback --- components.js | 2 +- components.json | 50 ++++++++++++++++++++++++++++++- components/index.js | 72 ++++++++++++++++++++++++++++++++++++++++----- 3 files changed, 115 insertions(+), 9 deletions(-) diff --git a/components.js b/components.js index 08a9d9eace..2422fea844 100644 --- a/components.js +++ b/components.js @@ -1,2 +1,2 @@ -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default"},"clike":{"title":"C-like","option":"default","overrideExampleHeader":true},"javascript":{"title":"JavaScript","require":"clike","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"actionscript":{"title":"ActionScript","require":"javascript","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","alias":"shell","owner":"Golmote"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":"dotnet","owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"coffeescript":{"title":"CoffeeScript","require":"javascript","owner":"R-osey"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup","alias":"jinja2","owner":"romanvm"},"docker":{"title":"Docker","owner":"JustinBeckwith"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"http":{"title":"HTTP","owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"json":{"title":"JSON","owner":"CupOfTea696"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","owner":"japborst"},"less":{"title":"Less","require":"css","owner":"Golmote"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","owner":"JuanCaicedo","alias":["emacs","elisp","emacs-lisp"]},"livescript":{"title":"LiveScript","owner":"Golmote"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"n4js":{"title":"N4JS","require":"javascript","owner":"bsmith-n4"},"nasm":{"title":"NASM","owner":"rbmj"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"cpp","overrideExampleHeader":true,"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"php-extras":{"title":"PHP Extras","require":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":"javascript","owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","owner":"Golmote"},"python":{"title":"Python","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"ruby":{"title":"Ruby","require":"clike","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sql":{"title":"SQL","owner":"multipetros"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","owner":"Golmote"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","alias":"ts","owner":"vkbansal"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","owner":"Golmote","alias":"vb"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","owner":"hason"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":"Line Highlight","line-numbers":{"title":"Line Numbers","owner":"kuba-kubula"},"show-invisibles":"Show Invisibles","autolinker":"Autolinker","wpd":"WebPlatform Docs","custom-class":{"title":"Custom Class","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","noCSS":true},"show-language":{"title":"Show Language","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","owner":"Golmote","noCSS":true},"previewers":{"title":"Previewers","owner":"Golmote"},"autoloader":{"title":"Autoloader","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","owner":"Golmote","after":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","owner":"chriswells0"},"unescaped-markup":"Unescaped Markup","normalize-whitespace":{"title":"Normalize Whitespace","owner":"zeitgeist87","after":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","owner":"mAAdhaTTah","require":"toolbar","noCSS":true}}}; +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default","peerDependencies":"markup"},"clike":{"title":"C-like","option":"default","overrideExampleHeader":true},"javascript":{"title":"JavaScript","require":"clike","peerDependencies":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"actionscript":{"title":"ActionScript","require":"javascript","peerDependencies":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","alias":"shell","owner":"Golmote"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":"dotnet","owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"coffeescript":{"title":"CoffeeScript","require":"javascript","owner":"R-osey"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup","peerDependencies":["css","javascript"],"alias":"jinja2","owner":"romanvm"},"docker":{"title":"Docker","owner":"JustinBeckwith"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","peerDependencies":["css","coffeescript","erb","javascript","less","markdown","ruby","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"http":{"title":"HTTP","peerDependencies":["javascript","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"json":{"title":"JSON","owner":"CupOfTea696"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","owner":"japborst"},"less":{"title":"Less","require":"css","owner":"Golmote"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","owner":"JuanCaicedo","alias":["emacs","elisp","emacs-lisp"]},"livescript":{"title":"LiveScript","owner":"Golmote"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"n4js":{"title":"N4JS","require":"javascript","owner":"bsmith-n4"},"nasm":{"title":"NASM","owner":"rbmj"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"cpp","peerDependencies":["c","cpp"],"overrideExampleHeader":true,"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"php-extras":{"title":"PHP Extras","require":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":"javascript","peerDependencies":["coffeescript","ejs","handlebars","hogan","less","livescript","markdown","mustache","plates","scss","stylus","swig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","peerDependencies":["c","cpp","fortran","ats","dsp"],"owner":"Golmote"},"python":{"title":"Python","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"ruby":{"title":"Ruby","require":"clike","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sql":{"title":"SQL","owner":"multipetros"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","peerDependencies":"css","owner":"Golmote"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","alias":"ts","owner":"vkbansal"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","owner":"Golmote","alias":"vb"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","owner":"hason"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":"Line Highlight","line-numbers":{"title":"Line Numbers","owner":"kuba-kubula"},"show-invisibles":"Show Invisibles","autolinker":"Autolinker","wpd":"WebPlatform Docs","custom-class":{"title":"Custom Class","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","noCSS":true},"show-language":{"title":"Show Language","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","owner":"Golmote","noCSS":true},"previewers":{"title":"Previewers","owner":"Golmote"},"autoloader":{"title":"Autoloader","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","owner":"Golmote","after":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","owner":"chriswells0"},"unescaped-markup":"Unescaped Markup","normalize-whitespace":{"title":"Normalize Whitespace","owner":"zeitgeist87","after":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","owner":"mAAdhaTTah","require":"toolbar","noCSS":true}}}; if (typeof module !== 'undefined' && module.exports) { module.exports = components; } \ No newline at end of file diff --git a/components.json b/components.json index 165bf3d226..cc2beb798c 100644 --- a/components.json +++ b/components.json @@ -59,7 +59,8 @@ }, "css": { "title": "CSS", - "option": "default" + "option": "default", + "peerDependencies": "markup" }, "clike": { "title": "C-like", @@ -69,6 +70,7 @@ "javascript": { "title": "JavaScript", "require": "clike", + "peerDependencies": "markup", "alias": "js", "option": "default" }, @@ -79,6 +81,7 @@ "actionscript": { "title": "ActionScript", "require": "javascript", + "peerDependencies": "markup", "owner": "Golmote" }, "ada": { @@ -209,6 +212,10 @@ "django": { "title": "Django/Jinja2", "require": "markup", + "peerDependencies": [ + "css", + "javascript" + ], "alias": "jinja2", "owner": "romanvm" }, @@ -285,6 +292,17 @@ "haml": { "title": "Haml", "require": "ruby", + "peerDependencies": [ + "css", + "coffeescript", + "erb", + "javascript", + "less", + "markdown", + "ruby", + "scss", + "textile" + ], "owner": "Golmote" }, "handlebars": { @@ -303,6 +321,10 @@ }, "http": { "title": "HTTP", + "peerDependencies": [ + "javascript", + "markup" + ], "owner": "danielgtaylor" }, "hpkp": { @@ -462,6 +484,10 @@ "opencl": { "title": "OpenCL", "require": "cpp", + "peerDependencies": [ + "c", + "cpp" + ], "overrideExampleHeader": true, "owner": "Milania1" }, @@ -530,6 +556,20 @@ "pug": { "title": "Pug", "require": "javascript", + "peerDependencies": [ + "coffeescript", + "ejs", + "handlebars", + "hogan", + "less", + "livescript", + "markdown", + "mustache", + "plates", + "scss", + "stylus", + "swig" + ], "owner": "Golmote" }, "puppet": { @@ -538,6 +578,13 @@ }, "pure": { "title": "Pure", + "peerDependencies": [ + "c", + "cpp", + "fortran", + "ats", + "dsp" + ], "owner": "Golmote" }, "python": { @@ -653,6 +700,7 @@ "textile": { "title": "Textile", "require": "markup", + "peerDependencies": "css", "owner": "Golmote" }, "tt2": { diff --git a/components/index.js b/components/index.js index 80a70c2a79..fe5940ae1c 100644 --- a/components/index.js +++ b/components/index.js @@ -1,24 +1,82 @@ var components = require('../components.js'); +var peerDependentsMap = null; -function loadLanguages(arr) { +function getPeerDependentsMap() { + var peerDependentsMap = {}; + Object.keys(components.languages).forEach(function (language) { + if (language === 'meta') { + return false; + } + if (components.languages[language].peerDependencies) { + var peerDependencies = components.languages[language].peerDependencies; + if (!Array.isArray(peerDependencies)) { + peerDependencies = [peerDependencies]; + } + peerDependencies.forEach(function (peerDependency) { + if (!peerDependentsMap[peerDependency]) { + peerDependentsMap[peerDependency] = []; + } + peerDependentsMap[peerDependency].push(language); + }); + } + }); + return peerDependentsMap; +} + +function getPeerDependents(mainLanguage) { + if (!peerDependentsMap) { + peerDependentsMap = getPeerDependentsMap(); + } + return peerDependentsMap[mainLanguage] || []; +} + +function loadLanguages(arr, withoutDependencies) { // If no argument is passed, load all components if (!arr) { - arr = Object.keys(components.languages).filter(function (lang) { - return lang !== 'meta'; + arr = Object.keys(components.languages).filter(function (language) { + return language !== 'meta'; }); } + if (arr && !arr.length) { + return; + } if (!Array.isArray(arr)) { arr = [arr]; } - arr.forEach(function(language) { + + arr.forEach(function (language) { + if (!components.languages[language]) { + console.warn('Language does not exist ' + language); + return; + } // Load dependencies first - if (components.languages[language] && components.languages[language].require) { + if (!withoutDependencies && components.languages[language].require) { loadLanguages(components.languages[language].require); } - require('./prism-' + language); + var pathToLanguage = './prism-' + language; + delete require.cache[require.resolve(pathToLanguage)]; + delete Prism.languages[language]; + require(pathToLanguage); + + // Reload dependents + var dependents = getPeerDependents(language).filter(function (dependent) { + // If dependent language was already loaded, + // we want to reload it. + if (Prism.languages[dependent]) { + delete Prism.languages[dependent]; + return true; + } + return false; + }); + if (dependents.length) { + loadLanguages(dependents, true); + } }); } -module.exports = loadLanguages; \ No newline at end of file +module.exports = function (arr) { + // Don't expose withoutDependencies + loadLanguages(arr); +}; \ No newline at end of file From 1e99e961ddb62c66f4a044f53dde6c202ae7b53a Mon Sep 17 00:00:00 2001 From: mAAdhaTTah Date: Sat, 26 May 2018 18:05:56 -0400 Subject: [PATCH 0027/1100] Update documentation for node & webpack usage Fix #1403 and #1409. --- index.html | 35 +++++++++++++++++++++++++---------- 1 file changed, 25 insertions(+), 10 deletions(-) diff --git a/index.html b/index.html index b8f254d5cf..194850e0c7 100644 --- a/index.html +++ b/index.html @@ -153,14 +153,28 @@

    Basic usage

    Example:

    <script src="prism.js" data-manual></script>
    -

    If you want to use Prism on the server or through the command line, Prism can be used with Node.js as well. - This might be useful if you're trying to generate static HTML pages with highlighted code for environments that don't support browser-side JS, like AMP pages.

    +

    Usage with Webpack, Browserify, & Other Bundlers

    -

    You can install Prism for Node.js by running:

    -
    $ npm install prismjs
    +

    If you want to use Prism with a bundler, install Prism with npm:

    -

    Example:

    -
    var Prism = require('prismjs');
    +	
    $ npm install prismjs
    + +

    You can then import into your bundle:

    + +
    import Prism from 'prismjs';
    + +

    To make it easy to configure your Prism instance with only the languages and plugins you need, use the babel plugin, + babel-plugin-prismjs. This will allow you to load + the minimum number of languages and plugins to satisfy your needs. + See that plugin's documentation for configuration details.

    + +

    Usage with Node

    + +

    If you want to use Prism on the server or through the command line, Prism can be used with Node.js as well. + This might be useful if you're trying to generate static HTML pages with highlighted code for environments that don't support browser-side JS, like AMP pages.

    + +

    Example:

    +
    var Prism = require('prismjs');
     
     // The code snippet you want to highlight, as a string
     var code = "var data = 1;";
    @@ -169,13 +183,12 @@ 

    Basic usage

    var html = Prism.highlight(code, Prism.languages.javascript, 'javascript');

    Requiring prismjs will load the default languages: markup, css, - clike and javascript. You can load more languages separately by requiring them - directly from the components folder. Or you can use the loadLanguages() utility, that - will automatically handle any required dependencies.

    + clike and javascript. You can load more languages with the + loadLanguages() utility, which will automatically handle any required dependencies.

    Example:

    var Prism = require('prismjs');
    -var loadLanguages = require('prismjs/components/index.js');
    +var loadLanguages = require('prismjs/components');
     loadLanguages(['haml']);
     
     // The code snippet you want to highlight, as a string
    @@ -184,6 +197,8 @@ 

    Basic usage

    // Returns a highlighted HTML string var html = Prism.highlight(code, Prism.languages.haml, 'haml');
    +

    Note: Do not use loadLanguages() with Webpack or another bundler, as this will cause Webpack to include all languages and plugins. Use the babel plugin described above.

    +
  • From 8c2b71f1bafa2df9b890c20a6a9b94c7a1631b6d Mon Sep 17 00:00:00 2001 From: isaacs Date: Fri, 27 Jan 2017 20:21:46 -0800 Subject: [PATCH 0028/1100] Add TAP component Includes build changes. --- components.js | 2 +- components.json | 5 +++++ components/prism-tap.js | 20 +++++++++++++++++++ components/prism-tap.min.js | 1 + plugins/autoloader/prism-autoloader.js | 2 +- plugins/autoloader/prism-autoloader.min.js | 2 +- plugins/show-language/prism-show-language.js | 2 +- .../show-language/prism-show-language.min.js | 2 +- 8 files changed, 31 insertions(+), 5 deletions(-) create mode 100644 components/prism-tap.js create mode 100644 components/prism-tap.min.js diff --git a/components.js b/components.js index 2422fea844..c5aa4cbbad 100644 --- a/components.js +++ b/components.js @@ -1,2 +1,2 @@ -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default","peerDependencies":"markup"},"clike":{"title":"C-like","option":"default","overrideExampleHeader":true},"javascript":{"title":"JavaScript","require":"clike","peerDependencies":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"actionscript":{"title":"ActionScript","require":"javascript","peerDependencies":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","alias":"shell","owner":"Golmote"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":"dotnet","owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"coffeescript":{"title":"CoffeeScript","require":"javascript","owner":"R-osey"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup","peerDependencies":["css","javascript"],"alias":"jinja2","owner":"romanvm"},"docker":{"title":"Docker","owner":"JustinBeckwith"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","peerDependencies":["css","coffeescript","erb","javascript","less","markdown","ruby","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"http":{"title":"HTTP","peerDependencies":["javascript","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"json":{"title":"JSON","owner":"CupOfTea696"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","owner":"japborst"},"less":{"title":"Less","require":"css","owner":"Golmote"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","owner":"JuanCaicedo","alias":["emacs","elisp","emacs-lisp"]},"livescript":{"title":"LiveScript","owner":"Golmote"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"n4js":{"title":"N4JS","require":"javascript","owner":"bsmith-n4"},"nasm":{"title":"NASM","owner":"rbmj"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"cpp","peerDependencies":["c","cpp"],"overrideExampleHeader":true,"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"php-extras":{"title":"PHP Extras","require":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":"javascript","peerDependencies":["coffeescript","ejs","handlebars","hogan","less","livescript","markdown","mustache","plates","scss","stylus","swig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","peerDependencies":["c","cpp","fortran","ats","dsp"],"owner":"Golmote"},"python":{"title":"Python","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"ruby":{"title":"Ruby","require":"clike","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sql":{"title":"SQL","owner":"multipetros"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","peerDependencies":"css","owner":"Golmote"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","alias":"ts","owner":"vkbansal"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","owner":"Golmote","alias":"vb"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","owner":"hason"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":"Line Highlight","line-numbers":{"title":"Line Numbers","owner":"kuba-kubula"},"show-invisibles":"Show Invisibles","autolinker":"Autolinker","wpd":"WebPlatform Docs","custom-class":{"title":"Custom Class","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","noCSS":true},"show-language":{"title":"Show Language","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","owner":"Golmote","noCSS":true},"previewers":{"title":"Previewers","owner":"Golmote"},"autoloader":{"title":"Autoloader","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","owner":"Golmote","after":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","owner":"chriswells0"},"unescaped-markup":"Unescaped Markup","normalize-whitespace":{"title":"Normalize Whitespace","owner":"zeitgeist87","after":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","owner":"mAAdhaTTah","require":"toolbar","noCSS":true}}}; +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default","peerDependencies":"markup"},"clike":{"title":"C-like","option":"default","overrideExampleHeader":true},"javascript":{"title":"JavaScript","require":"clike","peerDependencies":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"actionscript":{"title":"ActionScript","require":"javascript","peerDependencies":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","alias":"shell","owner":"Golmote"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":"dotnet","owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"coffeescript":{"title":"CoffeeScript","require":"javascript","owner":"R-osey"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup","peerDependencies":["css","javascript"],"alias":"jinja2","owner":"romanvm"},"docker":{"title":"Docker","owner":"JustinBeckwith"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","peerDependencies":["css","coffeescript","erb","javascript","less","markdown","ruby","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"http":{"title":"HTTP","peerDependencies":["javascript","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"json":{"title":"JSON","owner":"CupOfTea696"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","owner":"japborst"},"less":{"title":"Less","require":"css","owner":"Golmote"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","owner":"JuanCaicedo","alias":["emacs","elisp","emacs-lisp"]},"livescript":{"title":"LiveScript","owner":"Golmote"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"n4js":{"title":"N4JS","require":"javascript","owner":"bsmith-n4"},"nasm":{"title":"NASM","owner":"rbmj"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"cpp","peerDependencies":["c","cpp"],"overrideExampleHeader":true,"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"php-extras":{"title":"PHP Extras","require":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":"javascript","peerDependencies":["coffeescript","ejs","handlebars","hogan","less","livescript","markdown","mustache","plates","scss","stylus","swig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","peerDependencies":["c","cpp","fortran","ats","dsp"],"owner":"Golmote"},"python":{"title":"Python","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"ruby":{"title":"Ruby","require":"clike","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sql":{"title":"SQL","owner":"multipetros"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","peerDependencies":"css","owner":"Golmote"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","alias":"ts","owner":"vkbansal"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","owner":"Golmote","alias":"vb"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","owner":"hason"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":"Line Highlight","line-numbers":{"title":"Line Numbers","owner":"kuba-kubula"},"show-invisibles":"Show Invisibles","autolinker":"Autolinker","wpd":"WebPlatform Docs","custom-class":{"title":"Custom Class","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","noCSS":true},"show-language":{"title":"Show Language","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","owner":"Golmote","noCSS":true},"previewers":{"title":"Previewers","owner":"Golmote"},"autoloader":{"title":"Autoloader","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","owner":"Golmote","after":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","owner":"chriswells0"},"unescaped-markup":"Unescaped Markup","normalize-whitespace":{"title":"Normalize Whitespace","owner":"zeitgeist87","after":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","owner":"mAAdhaTTah","require":"toolbar","noCSS":true}}}; if (typeof module !== 'undefined' && module.exports) { module.exports = components; } \ No newline at end of file diff --git a/components.json b/components.json index cc2beb798c..101fff9aad 100644 --- a/components.json +++ b/components.json @@ -693,6 +693,11 @@ "require": "clike", "owner": "chrischares" }, + "tap": { + "title": "TAP", + "owner": "isaacs", + "require": "yaml" + }, "tcl": { "title": "Tcl", "owner": "PeterChaplin" diff --git a/components/prism-tap.js b/components/prism-tap.js new file mode 100644 index 0000000000..97bef158e2 --- /dev/null +++ b/components/prism-tap.js @@ -0,0 +1,20 @@ +Prism.languages.tap = { + pass: /(^|\n)( )*ok[^#\{\n]*/, + fail: /(^|\n)( )*not ok[^#\{\n]*/, + pragma: /(^|\n)( )*pragma ([+-])([a-z]+)(\n|$)/, + bailout: /(^|\n)( )*bail out!(.*)(\n|$)/i, + version: /(^|\n)( )*TAP version ([0-9]+)(\n|$)/i, + plan: /(^|\n)( )*([0-9]+)\.\.([0-9]+)( +#[^\n]*)?(\n|$)/m, + subtest: { + pattern: /(^|\n)( )*# Subtest(?:: (.*))?(\n|$)/, + greedy: true + }, + punctuation: /[{}]/, + 'comment': /#.*/, + yamlish: { + pattern: /(^|\n)(( )*( ))---\n(.*?\n)+\2\.\.\.(\n|$)/, + lookbehind: true, + inside: Prism.languages.yaml, + alias: 'language-yaml' + } +}; diff --git a/components/prism-tap.min.js b/components/prism-tap.min.js new file mode 100644 index 0000000000..c5631482f1 --- /dev/null +++ b/components/prism-tap.min.js @@ -0,0 +1 @@ +Prism.languages.tap={pass:/(^|\n)( )*ok[^#\{\n]*/,fail:/(^|\n)( )*not ok[^#\{\n]*/,pragma:/(^|\n)( )*pragma ([+-])([a-z]+)(\n|$)/,bailout:/(^|\n)( )*bail out!(.*)(\n|$)/i,version:/(^|\n)( )*TAP version ([0-9]+)(\n|$)/i,plan:/(^|\n)( )*([0-9]+)\.\.([0-9]+)( +#[^\n]*)?(\n|$)/m,subtest:{pattern:/(^|\n)( )*# Subtest(?:: (.*))?(\n|$)/,greedy:!0},punctuation:/[{}]/,comment:/#.*/,yamlish:{pattern:/(^|\n)(( )*( ))---\n(.*?\n)+\2\.\.\.(\n|$)/,lookbehind:!0,inside:Prism.languages.yaml,alias:"language-yaml"}}; \ No newline at end of file diff --git a/plugins/autoloader/prism-autoloader.js b/plugins/autoloader/prism-autoloader.js index 6435727a4a..7cbf2953fe 100644 --- a/plugins/autoloader/prism-autoloader.js +++ b/plugins/autoloader/prism-autoloader.js @@ -4,7 +4,7 @@ } // The dependencies map is built automatically with gulp - var lang_dependencies = /*languages_placeholder[*/{"javascript":"clike","actionscript":"javascript","arduino":"cpp","aspnet":["markup","csharp"],"bison":"c","c":"clike","csharp":"clike","cpp":"c","coffeescript":"javascript","crystal":"ruby","css-extras":"css","d":"clike","dart":"clike","django":"markup","erb":["ruby","markup-templating"],"fsharp":"clike","flow":"javascript","glsl":"clike","go":"clike","groovy":"clike","haml":"ruby","handlebars":"markup-templating","haxe":"clike","java":"clike","jolie":"clike","kotlin":"clike","less":"css","markdown":"markup","markup-templating":"markup","n4js":"javascript","nginx":"clike","objectivec":"c","opencl":"cpp","parser":"markup","php":["clike","markup-templating"],"php-extras":"php","plsql":"sql","processing":"clike","protobuf":"clike","pug":"javascript","qore":"clike","jsx":["markup","javascript"],"tsx":["jsx","typescript"],"reason":"clike","ruby":"clike","sass":"css","scss":"css","scala":"java","smarty":"markup-templating","soy":"markup-templating","swift":"clike","textile":"markup","tt2":["clike","markup-templating"],"twig":"markup","typescript":"javascript","vbnet":"basic","velocity":"markup","wiki":"markup","xeora":"markup","xquery":"markup"}/*]*/; + var lang_dependencies = /*languages_placeholder[*/{"javascript":"clike","actionscript":"javascript","arduino":"cpp","aspnet":["markup","csharp"],"bison":"c","c":"clike","csharp":"clike","cpp":"c","coffeescript":"javascript","crystal":"ruby","css-extras":"css","d":"clike","dart":"clike","django":"markup","erb":["ruby","markup-templating"],"fsharp":"clike","flow":"javascript","glsl":"clike","go":"clike","groovy":"clike","haml":"ruby","handlebars":"markup-templating","haxe":"clike","java":"clike","jolie":"clike","kotlin":"clike","less":"css","markdown":"markup","markup-templating":"markup","n4js":"javascript","nginx":"clike","objectivec":"c","opencl":"cpp","parser":"markup","php":["clike","markup-templating"],"php-extras":"php","plsql":"sql","processing":"clike","protobuf":"clike","pug":"javascript","qore":"clike","jsx":["markup","javascript"],"tsx":["jsx","typescript"],"reason":"clike","ruby":"clike","sass":"css","scss":"css","scala":"java","smarty":"markup-templating","soy":"markup-templating","swift":"clike","tap":"yaml","textile":"markup","tt2":["clike","markup-templating"],"twig":"markup","typescript":"javascript","vbnet":"basic","velocity":"markup","wiki":"markup","xeora":"markup","xquery":"markup"}/*]*/; var lang_data = {}; diff --git a/plugins/autoloader/prism-autoloader.min.js b/plugins/autoloader/prism-autoloader.min.js index 23a12e1a78..9e3cc2515d 100644 --- a/plugins/autoloader/prism-autoloader.min.js +++ b/plugins/autoloader/prism-autoloader.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof self&&self.Prism&&self.document&&document.createElement){var e={javascript:"clike",actionscript:"javascript",arduino:"cpp",aspnet:["markup","csharp"],bison:"c",c:"clike",csharp:"clike",cpp:"c",coffeescript:"javascript",crystal:"ruby","css-extras":"css",d:"clike",dart:"clike",django:"markup",erb:["ruby","markup-templating"],fsharp:"clike",flow:"javascript",glsl:"clike",go:"clike",groovy:"clike",haml:"ruby",handlebars:"markup-templating",haxe:"clike",java:"clike",jolie:"clike",kotlin:"clike",less:"css",markdown:"markup","markup-templating":"markup",n4js:"javascript",nginx:"clike",objectivec:"c",opencl:"cpp",parser:"markup",php:["clike","markup-templating"],"php-extras":"php",plsql:"sql",processing:"clike",protobuf:"clike",pug:"javascript",qore:"clike",jsx:["markup","javascript"],tsx:["jsx","typescript"],reason:"clike",ruby:"clike",sass:"css",scss:"css",scala:"java",smarty:"markup-templating",soy:"markup-templating",swift:"clike",textile:"markup",tt2:["clike","markup-templating"],twig:"markup",typescript:"javascript",vbnet:"basic",velocity:"markup",wiki:"markup",xeora:"markup",xquery:"markup"},a={},c="none",t=document.getElementsByTagName("script");t=t[t.length-1];var r="components/";if(t.hasAttribute("data-autoloader-path")){var s=t.getAttribute("data-autoloader-path").trim();s.length>0&&!/^[a-z]+:\/\//i.test(t.src)&&(r=s.replace(/\/?$/,"/"))}else/[\w-]+\.js$/.test(t.src)&&(r=t.src.replace(/[\w-]+\.js$/,"components/"));var i=Prism.plugins.autoloader={languages_path:r,use_minified:!0},t=function(e,a,c){var t=document.createElement("script");t.src=e,t.async=!0,t.onload=function(){document.body.removeChild(t),a&&a()},t.onerror=function(){document.body.removeChild(t),c&&c()},document.body.appendChild(t)},n=function(e){return i.languages_path+"prism-"+e+(i.use_minified?".min":"")+".js"},l=function(e,c){var t=a[e];t||(t=a[e]={});var r=c.getAttribute("data-dependencies");!r&&c.parentNode&&"pre"===c.parentNode.tagName.toLowerCase()&&(r=c.parentNode.getAttribute("data-dependencies")),r=r?r.split(/\s*,\s*/g):[],o(r,function(){p(e,function(){Prism.highlightElement(c)})})},o=function(e,a,c){"string"==typeof e&&(e=[e]);var t=0,r=e.length,s=function(){r>t?p(e[t],function(){t++,s()},function(){c&&c(e[t])}):t===r&&a&&a(e)};s()},p=function(c,r,s){var i=function(){var e=!1;c.indexOf("!")>=0&&(e=!0,c=c.replace("!",""));var i=a[c];if(i||(i=a[c]={}),r&&(i.success_callbacks||(i.success_callbacks=[]),i.success_callbacks.push(r)),s&&(i.error_callbacks||(i.error_callbacks=[]),i.error_callbacks.push(s)),!e&&Prism.languages[c])u(c);else if(!e&&i.error)m(c);else if(e||!i.loading){i.loading=!0;var l=n(c);t(l,function(){i.loading=!1,u(c)},function(){i.loading=!1,i.error=!0,m(c)})}},l=e[c];l&&l.length?o(l,i):i()},u=function(e){a[e]&&a[e].success_callbacks&&a[e].success_callbacks.length&&a[e].success_callbacks.forEach(function(a){a(e)})},m=function(e){a[e]&&a[e].error_callbacks&&a[e].error_callbacks.length&&a[e].error_callbacks.forEach(function(a){a(e)})};Prism.hooks.add("complete",function(e){e.element&&e.language&&!e.grammar&&e.language!==c&&l(e.language,e.element)})}}(); \ No newline at end of file +!function(){if("undefined"!=typeof self&&self.Prism&&self.document&&document.createElement){var e={javascript:"clike",actionscript:"javascript",arduino:"cpp",aspnet:["markup","csharp"],bison:"c",c:"clike",csharp:"clike",cpp:"c",coffeescript:"javascript",crystal:"ruby","css-extras":"css",d:"clike",dart:"clike",django:"markup",erb:["ruby","markup-templating"],fsharp:"clike",flow:"javascript",glsl:"clike",go:"clike",groovy:"clike",haml:"ruby",handlebars:"markup-templating",haxe:"clike",java:"clike",jolie:"clike",kotlin:"clike",less:"css",markdown:"markup","markup-templating":"markup",n4js:"javascript",nginx:"clike",objectivec:"c",opencl:"cpp",parser:"markup",php:["clike","markup-templating"],"php-extras":"php",plsql:"sql",processing:"clike",protobuf:"clike",pug:"javascript",qore:"clike",jsx:["markup","javascript"],tsx:["jsx","typescript"],reason:"clike",ruby:"clike",sass:"css",scss:"css",scala:"java",smarty:"markup-templating",soy:"markup-templating",swift:"clike",tap:"yaml",textile:"markup",tt2:["clike","markup-templating"],twig:"markup",typescript:"javascript",vbnet:"basic",velocity:"markup",wiki:"markup",xeora:"markup",xquery:"markup"},a={},c="none",t=document.getElementsByTagName("script");t=t[t.length-1];var r="components/";if(t.hasAttribute("data-autoloader-path")){var s=t.getAttribute("data-autoloader-path").trim();s.length>0&&!/^[a-z]+:\/\//i.test(t.src)&&(r=s.replace(/\/?$/,"/"))}else/[\w-]+\.js$/.test(t.src)&&(r=t.src.replace(/[\w-]+\.js$/,"components/"));var i=Prism.plugins.autoloader={languages_path:r,use_minified:!0},t=function(e,a,c){var t=document.createElement("script");t.src=e,t.async=!0,t.onload=function(){document.body.removeChild(t),a&&a()},t.onerror=function(){document.body.removeChild(t),c&&c()},document.body.appendChild(t)},n=function(e){return i.languages_path+"prism-"+e+(i.use_minified?".min":"")+".js"},l=function(e,c){var t=a[e];t||(t=a[e]={});var r=c.getAttribute("data-dependencies");!r&&c.parentNode&&"pre"===c.parentNode.tagName.toLowerCase()&&(r=c.parentNode.getAttribute("data-dependencies")),r=r?r.split(/\s*,\s*/g):[],o(r,function(){p(e,function(){Prism.highlightElement(c)})})},o=function(e,a,c){"string"==typeof e&&(e=[e]);var t=0,r=e.length,s=function(){r>t?p(e[t],function(){t++,s()},function(){c&&c(e[t])}):t===r&&a&&a(e)};s()},p=function(c,r,s){var i=function(){var e=!1;c.indexOf("!")>=0&&(e=!0,c=c.replace("!",""));var i=a[c];if(i||(i=a[c]={}),r&&(i.success_callbacks||(i.success_callbacks=[]),i.success_callbacks.push(r)),s&&(i.error_callbacks||(i.error_callbacks=[]),i.error_callbacks.push(s)),!e&&Prism.languages[c])u(c);else if(!e&&i.error)m(c);else if(e||!i.loading){i.loading=!0;var l=n(c);t(l,function(){i.loading=!1,u(c)},function(){i.loading=!1,i.error=!0,m(c)})}},l=e[c];l&&l.length?o(l,i):i()},u=function(e){a[e]&&a[e].success_callbacks&&a[e].success_callbacks.length&&a[e].success_callbacks.forEach(function(a){a(e)})},m=function(e){a[e]&&a[e].error_callbacks&&a[e].error_callbacks.length&&a[e].error_callbacks.forEach(function(a){a(e)})};Prism.hooks.add("complete",function(e){e.element&&e.language&&!e.grammar&&e.language!==c&&l(e.language,e.element)})}}(); \ No newline at end of file diff --git a/plugins/show-language/prism-show-language.js b/plugins/show-language/prism-show-language.js index 8cc62cff32..60497b2f76 100644 --- a/plugins/show-language/prism-show-language.js +++ b/plugins/show-language/prism-show-language.js @@ -11,7 +11,7 @@ if (!Prism.plugins.toolbar) { } // The languages map is built automatically with gulp -var Languages = /*languages_placeholder[*/{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","css":"CSS","clike":"C-like","javascript":"JavaScript","abap":"ABAP","actionscript":"ActionScript","apacheconf":"Apache Configuration","apl":"APL","applescript":"AppleScript","arff":"ARFF","asciidoc":"AsciiDoc","asm6502":"6502 Assembly","aspnet":"ASP.NET (C#)","autohotkey":"AutoHotkey","autoit":"AutoIt","basic":"BASIC","csharp":"C#","cpp":"C++","coffeescript":"CoffeeScript","csp":"Content-Security-Policy","css-extras":"CSS Extras","django":"Django/Jinja2","erb":"ERB","fsharp":"F#","gedcom":"GEDCOM","glsl":"GLSL","graphql":"GraphQL","http":"HTTP","hpkp":"HTTP Public-Key-Pins","hsts":"HTTP Strict-Transport-Security","ichigojam":"IchigoJam","inform7":"Inform 7","json":"JSON","latex":"LaTeX","livescript":"LiveScript","lolcode":"LOLCODE","markup-templating":"Markup templating","matlab":"MATLAB","mel":"MEL","n4js":"N4JS","nasm":"NASM","nginx":"nginx","nsis":"NSIS","objectivec":"Objective-C","ocaml":"OCaml","opencl":"OpenCL","parigp":"PARI/GP","objectpascal":"Object Pascal","php":"PHP","php-extras":"PHP Extras","plsql":"PL/SQL","powershell":"PowerShell","properties":".properties","protobuf":"Protocol Buffers","q":"Q (kdb+ database)","jsx":"React JSX","tsx":"React TSX","renpy":"Ren'py","rest":"reST (reStructuredText)","sas":"SAS","sass":"Sass (Sass)","scss":"Sass (Scss)","sql":"SQL","soy":"Soy (Closure Template)","tt2":"Template Toolkit 2","typescript":"TypeScript","vbnet":"VB.Net","vhdl":"VHDL","vim":"vim","visual-basic":"Visual Basic","wasm":"WebAssembly","wiki":"Wiki markup","xojo":"Xojo (REALbasic)","xquery":"XQuery","yaml":"YAML"}/*]*/; +var Languages = /*languages_placeholder[*/{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","css":"CSS","clike":"C-like","javascript":"JavaScript","abap":"ABAP","actionscript":"ActionScript","apacheconf":"Apache Configuration","apl":"APL","applescript":"AppleScript","arff":"ARFF","asciidoc":"AsciiDoc","asm6502":"6502 Assembly","aspnet":"ASP.NET (C#)","autohotkey":"AutoHotkey","autoit":"AutoIt","basic":"BASIC","csharp":"C#","cpp":"C++","coffeescript":"CoffeeScript","csp":"Content-Security-Policy","css-extras":"CSS Extras","django":"Django/Jinja2","erb":"ERB","fsharp":"F#","gedcom":"GEDCOM","glsl":"GLSL","graphql":"GraphQL","http":"HTTP","hpkp":"HTTP Public-Key-Pins","hsts":"HTTP Strict-Transport-Security","ichigojam":"IchigoJam","inform7":"Inform 7","json":"JSON","latex":"LaTeX","livescript":"LiveScript","lolcode":"LOLCODE","markup-templating":"Markup templating","matlab":"MATLAB","mel":"MEL","n4js":"N4JS","nasm":"NASM","nginx":"nginx","nsis":"NSIS","objectivec":"Objective-C","ocaml":"OCaml","opencl":"OpenCL","parigp":"PARI/GP","objectpascal":"Object Pascal","php":"PHP","php-extras":"PHP Extras","plsql":"PL/SQL","powershell":"PowerShell","properties":".properties","protobuf":"Protocol Buffers","q":"Q (kdb+ database)","jsx":"React JSX","tsx":"React TSX","renpy":"Ren'py","rest":"reST (reStructuredText)","sas":"SAS","sass":"Sass (Sass)","scss":"Sass (Scss)","sql":"SQL","soy":"Soy (Closure Template)","tap":"TAP","tt2":"Template Toolkit 2","typescript":"TypeScript","vbnet":"VB.Net","vhdl":"VHDL","vim":"vim","visual-basic":"Visual Basic","wasm":"WebAssembly","wiki":"Wiki markup","xojo":"Xojo (REALbasic)","xquery":"XQuery","yaml":"YAML"}/*]*/; Prism.plugins.toolbar.registerButton('show-language', function(env) { var pre = env.element.parentNode; if (!pre || !/pre/i.test(pre.nodeName)) { diff --git a/plugins/show-language/prism-show-language.min.js b/plugins/show-language/prism-show-language.min.js index da0ff83c9c..b6735335bd 100644 --- a/plugins/show-language/prism-show-language.min.js +++ b/plugins/show-language/prism-show-language.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof self&&self.Prism&&self.document){if(!Prism.plugins.toolbar)return console.warn("Show Languages plugin loaded before Toolbar plugin."),void 0;var e={html:"HTML",xml:"XML",svg:"SVG",mathml:"MathML",css:"CSS",clike:"C-like",javascript:"JavaScript",abap:"ABAP",actionscript:"ActionScript",apacheconf:"Apache Configuration",apl:"APL",applescript:"AppleScript",arff:"ARFF",asciidoc:"AsciiDoc",asm6502:"6502 Assembly",aspnet:"ASP.NET (C#)",autohotkey:"AutoHotkey",autoit:"AutoIt",basic:"BASIC",csharp:"C#",cpp:"C++",coffeescript:"CoffeeScript",csp:"Content-Security-Policy","css-extras":"CSS Extras",django:"Django/Jinja2",erb:"ERB",fsharp:"F#",gedcom:"GEDCOM",glsl:"GLSL",graphql:"GraphQL",http:"HTTP",hpkp:"HTTP Public-Key-Pins",hsts:"HTTP Strict-Transport-Security",ichigojam:"IchigoJam",inform7:"Inform 7",json:"JSON",latex:"LaTeX",livescript:"LiveScript",lolcode:"LOLCODE","markup-templating":"Markup templating",matlab:"MATLAB",mel:"MEL",n4js:"N4JS",nasm:"NASM",nginx:"nginx",nsis:"NSIS",objectivec:"Objective-C",ocaml:"OCaml",opencl:"OpenCL",parigp:"PARI/GP",objectpascal:"Object Pascal",php:"PHP","php-extras":"PHP Extras",plsql:"PL/SQL",powershell:"PowerShell",properties:".properties",protobuf:"Protocol Buffers",q:"Q (kdb+ database)",jsx:"React JSX",tsx:"React TSX",renpy:"Ren'py",rest:"reST (reStructuredText)",sas:"SAS",sass:"Sass (Sass)",scss:"Sass (Scss)",sql:"SQL",soy:"Soy (Closure Template)",tt2:"Template Toolkit 2",typescript:"TypeScript",vbnet:"VB.Net",vhdl:"VHDL",vim:"vim","visual-basic":"Visual Basic",wasm:"WebAssembly",wiki:"Wiki markup",xojo:"Xojo (REALbasic)",xquery:"XQuery",yaml:"YAML"};Prism.plugins.toolbar.registerButton("show-language",function(a){var t=a.element.parentNode;if(t&&/pre/i.test(t.nodeName)){var s=t.getAttribute("data-language")||e[a.language]||a.language&&a.language.substring(0,1).toUpperCase()+a.language.substring(1);if(s){var i=document.createElement("span");return i.textContent=s,i}}})}}(); \ No newline at end of file +!function(){if("undefined"!=typeof self&&self.Prism&&self.document){if(!Prism.plugins.toolbar)return console.warn("Show Languages plugin loaded before Toolbar plugin."),void 0;var e={html:"HTML",xml:"XML",svg:"SVG",mathml:"MathML",css:"CSS",clike:"C-like",javascript:"JavaScript",abap:"ABAP",actionscript:"ActionScript",apacheconf:"Apache Configuration",apl:"APL",applescript:"AppleScript",arff:"ARFF",asciidoc:"AsciiDoc",asm6502:"6502 Assembly",aspnet:"ASP.NET (C#)",autohotkey:"AutoHotkey",autoit:"AutoIt",basic:"BASIC",csharp:"C#",cpp:"C++",coffeescript:"CoffeeScript",csp:"Content-Security-Policy","css-extras":"CSS Extras",django:"Django/Jinja2",erb:"ERB",fsharp:"F#",gedcom:"GEDCOM",glsl:"GLSL",graphql:"GraphQL",http:"HTTP",hpkp:"HTTP Public-Key-Pins",hsts:"HTTP Strict-Transport-Security",ichigojam:"IchigoJam",inform7:"Inform 7",json:"JSON",latex:"LaTeX",livescript:"LiveScript",lolcode:"LOLCODE","markup-templating":"Markup templating",matlab:"MATLAB",mel:"MEL",n4js:"N4JS",nasm:"NASM",nginx:"nginx",nsis:"NSIS",objectivec:"Objective-C",ocaml:"OCaml",opencl:"OpenCL",parigp:"PARI/GP",objectpascal:"Object Pascal",php:"PHP","php-extras":"PHP Extras",plsql:"PL/SQL",powershell:"PowerShell",properties:".properties",protobuf:"Protocol Buffers",q:"Q (kdb+ database)",jsx:"React JSX",tsx:"React TSX",renpy:"Ren'py",rest:"reST (reStructuredText)",sas:"SAS",sass:"Sass (Sass)",scss:"Sass (Scss)",sql:"SQL",soy:"Soy (Closure Template)",tap:"TAP",tt2:"Template Toolkit 2",typescript:"TypeScript",vbnet:"VB.Net",vhdl:"VHDL",vim:"vim","visual-basic":"Visual Basic",wasm:"WebAssembly",wiki:"Wiki markup",xojo:"Xojo (REALbasic)",xquery:"XQuery",yaml:"YAML"};Prism.plugins.toolbar.registerButton("show-language",function(a){var t=a.element.parentNode;if(t&&/pre/i.test(t.nodeName)){var s=t.getAttribute("data-language")||e[a.language]||a.language&&a.language.substring(0,1).toUpperCase()+a.language.substring(1);if(s){var i=document.createElement("span");return i.textContent=s,i}}})}}(); \ No newline at end of file From 2f5f9c3cd664d7882595a08a4c37322f4a462d85 Mon Sep 17 00:00:00 2001 From: Lea Verou Date: Thu, 31 May 2018 12:20:10 +0300 Subject: [PATCH 0029/1100] Delete CNAME --- CNAME | 1 - 1 file changed, 1 deletion(-) delete mode 100644 CNAME diff --git a/CNAME b/CNAME deleted file mode 100644 index 6ad2f79f48..0000000000 --- a/CNAME +++ /dev/null @@ -1 +0,0 @@ -prismjs.com \ No newline at end of file From 0e6fbadadf7b754ff39c38944bdbfa3934885ebd Mon Sep 17 00:00:00 2001 From: Lea Verou Date: Thu, 31 May 2018 12:20:19 +0300 Subject: [PATCH 0030/1100] Create CNAME --- CNAME | 1 + 1 file changed, 1 insertion(+) create mode 100644 CNAME diff --git a/CNAME b/CNAME new file mode 100644 index 0000000000..6ad2f79f48 --- /dev/null +++ b/CNAME @@ -0,0 +1 @@ +prismjs.com \ No newline at end of file From 90aaee1004c389bf14e3583f3ce03fe3939af153 Mon Sep 17 00:00:00 2001 From: Lea Verou Date: Thu, 31 May 2018 12:26:07 +0300 Subject: [PATCH 0031/1100] Fix mixed content warning --- style.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/style.css b/style.css index f3e3ad88fe..80a674edb9 100644 --- a/style.css +++ b/style.css @@ -2,7 +2,7 @@ @import url(https://fonts.googleapis.com/css?family=Arvo); @font-face { - src: url(http://lea.verou.me/logo.otf); + src: url(https://lea.verou.me/logo.otf); font-family: 'LeaVerou'; } @@ -404,4 +404,4 @@ label a.owner:not(:hover) { padding-bottom: 1em; margin-bottom: 1em; margin-right: 1em; - } \ No newline at end of file + } From 9ee4f547fe222d140c347198613fb4d1f1961286 Mon Sep 17 00:00:00 2001 From: mAAdhaTTah Date: Fri, 1 Jun 2018 13:52:21 -0400 Subject: [PATCH 0032/1100] Make line-numbers styles more specific The padding added to `pre.line-numbers` in the line-number's CSS is overwritten by the theme's CSS if the theme is loaded second. This ensures the CSS can come in any order without specificity issues. --- plugins/line-numbers/prism-line-numbers.css | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/line-numbers/prism-line-numbers.css b/plugins/line-numbers/prism-line-numbers.css index d5cbfd3fd5..08b29ed615 100644 --- a/plugins/line-numbers/prism-line-numbers.css +++ b/plugins/line-numbers/prism-line-numbers.css @@ -1,12 +1,12 @@ -pre.line-numbers { +pre[class*="language-"].line-numbers { position: relative; padding-left: 3.8em; counter-reset: linenumber; } -pre.line-numbers > code { +pre[class*="language-"].line-numbers > code { position: relative; - white-space: inherit; + white-space: inherit; } .line-numbers .line-numbers-rows { @@ -38,4 +38,4 @@ pre.line-numbers > code { display: block; padding-right: 0.8em; text-align: right; - } \ No newline at end of file + } From 854cc5b3baac2bbc328272b6c4e218e50e789e82 Mon Sep 17 00:00:00 2001 From: Tero Auralinna Date: Sat, 2 Jun 2018 11:35:44 +0300 Subject: [PATCH 0033/1100] Moved tutorial link to the end of the list --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index 1f95a0bfba..532e2dfb43 100644 --- a/index.html +++ b/index.html @@ -230,7 +230,6 @@

    Third-party tutorials

    Several tutorials have been written by members of the community to help you integrate Prism into multiple different website types and configurations:

    Please note that the tutorials listed here are not verified to contain correct information. Read at your risk and always check the official documentation here if something doesn’t work :)

    From b848e9d6907db3d9ea82bb27b945bb137ffe86f5 Mon Sep 17 00:00:00 2001 From: James DiGioia Date: Mon, 4 Jun 2018 17:15:00 -0400 Subject: [PATCH 0034/1100] Add double-class specificity hack (#1435) Yeah, this isn't ideal, but it does work. Any other ideas? --- themes/prism-coy.css | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/themes/prism-coy.css b/themes/prism-coy.css index 6f04162e3c..1127bbe37d 100644 --- a/themes/prism-coy.css +++ b/themes/prism-coy.css @@ -198,15 +198,15 @@ pre[class*="language-"]:after { } /* Plugin styles: Line Numbers */ -pre[class*="language-"].line-numbers { +pre[class*="language-"].line-numbers.line-numbers { padding-left: 0; } -pre[class*="language-"].line-numbers code { +pre[class*="language-"].line-numbers.line-numbers code { padding-left: 3.8em; } -pre[class*="language-"].line-numbers .line-numbers-rows { +pre[class*="language-"].line-numbers.line-numbers .line-numbers-rows { left: 0; } From a21fdee65bf7f030a7b05a42bd2095924a8f19b5 Mon Sep 17 00:00:00 2001 From: igor Date: Tue, 5 Jun 2018 08:08:33 +0200 Subject: [PATCH 0035/1100] Kotlin: add `typealias` keyword --- components/prism-kotlin.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/prism-kotlin.js b/components/prism-kotlin.js index 0189cfe97d..36790bc63d 100644 --- a/components/prism-kotlin.js +++ b/components/prism-kotlin.js @@ -2,7 +2,7 @@ Prism.languages.kotlin = Prism.languages.extend('clike', { 'keyword': { // The lookbehind prevents wrong highlighting of e.g. kotlin.properties.get - pattern: /(^|[^.])\b(?:abstract|annotation|as|break|by|catch|class|companion|const|constructor|continue|crossinline|data|do|else|enum|final|finally|for|fun|get|if|import|in|init|inline|inner|interface|internal|is|lateinit|noinline|null|object|open|out|override|package|private|protected|public|reified|return|sealed|set|super|tailrec|this|throw|to|try|val|var|when|where|while)\b/, + pattern: /(^|[^.])\b(?:abstract|annotation|as|break|by|catch|class|companion|const|constructor|continue|crossinline|data|do|else|enum|final|finally|for|fun|get|if|import|in|init|inline|inner|interface|internal|is|lateinit|noinline|null|object|open|out|override|package|private|protected|public|reified|return|sealed|set|super|tailrec|this|throw|to|try|typealias|val|var|when|where|while)\b/, lookbehind: true }, 'function': [ @@ -59,4 +59,4 @@ interpolation: interpolation }; -}(Prism)); \ No newline at end of file +}(Prism)); From f356dfe71bf126e6dc060c03f3e042de28a9bec4 Mon Sep 17 00:00:00 2001 From: paladox Date: Tue, 5 Jun 2018 22:28:05 +0100 Subject: [PATCH 0036/1100] Add .token.class-name to rest of themes (#1360) * Add .token.class-name to rest of themes * Update prism-okaidia.css * Update prism-solarizedlight.css --- themes/prism-okaidia.css | 3 ++- themes/prism-solarizedlight.css | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/themes/prism-okaidia.css b/themes/prism-okaidia.css index 3e0da3575f..8efbc074b5 100644 --- a/themes/prism-okaidia.css +++ b/themes/prism-okaidia.css @@ -95,7 +95,8 @@ pre[class*="language-"] { .token.atrule, .token.attr-value, -.token.function { +.token.function, +.token.class-name { color: #e6db74; } diff --git a/themes/prism-solarizedlight.css b/themes/prism-solarizedlight.css index bad770395b..07657dac4f 100644 --- a/themes/prism-solarizedlight.css +++ b/themes/prism-solarizedlight.css @@ -125,7 +125,8 @@ pre[class*="language-"] { color: #859900; /* green */ } -.token.function { +.token.function, +.token.class-name { color: #b58900; /* yellow */ } @@ -145,4 +146,4 @@ pre[class*="language-"] { .token.entity { cursor: help; -} \ No newline at end of file +} From 081e318c40db90a782a11356f2aff1fb1561ad53 Mon Sep 17 00:00:00 2001 From: Ian Leitch Date: Sat, 31 Mar 2018 15:09:18 +1100 Subject: [PATCH 0037/1100] Fix Swift 'protocol' keyword --- components/prism-swift.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/prism-swift.js b/components/prism-swift.js index 972f7f0b4d..889d5fb9bc 100644 --- a/components/prism-swift.js +++ b/components/prism-swift.js @@ -16,10 +16,10 @@ Prism.languages.swift = Prism.languages.extend('clike', { } } }, - 'keyword': /\b(?:as|associativity|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic(?:Type)?|else|enum|extension|fallthrough|final|for|func|get|guard|if|import|in|infix|init|inout|internal|is|lazy|left|let|mutating|new|none|nonmutating|operator|optional|override|postfix|precedence|prefix|private|Protocol|public|repeat|required|rethrows|return|right|safe|self|Self|set|static|struct|subscript|super|switch|throws?|try|Type|typealias|unowned|unsafe|var|weak|where|while|willSet|__(?:COLUMN__|FILE__|FUNCTION__|LINE__))\b/, + 'keyword': /\b(?:as|associativity|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic(?:Type)?|else|enum|extension|fallthrough|final|for|func|get|guard|if|import|in|infix|init|inout|internal|is|lazy|left|let|mutating|new|none|nonmutating|operator|optional|override|postfix|precedence|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|Self|set|static|struct|subscript|super|switch|throws?|try|Type|typealias|unowned|unsafe|var|weak|where|while|willSet|__(?:COLUMN__|FILE__|FUNCTION__|LINE__))\b/, 'number': /\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i, 'constant': /\b(?:nil|[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/, 'atrule': /@\b(?:IB(?:Outlet|Designable|Action|Inspectable)|class_protocol|exported|noreturn|NS(?:Copying|Managed)|objc|UIApplicationMain|auto_closure)\b/, 'builtin': /\b(?:[A-Z]\S+|abs|advance|alignof(?:Value)?|assert|contains|count(?:Elements)?|debugPrint(?:ln)?|distance|drop(?:First|Last)|dump|enumerate|equal|filter|find|first|getVaList|indices|isEmpty|join|last|lexicographicalCompare|map|max(?:Element)?|min(?:Element)?|numericCast|overlaps|partition|print(?:ln)?|reduce|reflect|reverse|sizeof(?:Value)?|sort(?:ed)?|split|startsWith|stride(?:of(?:Value)?)?|suffix|swap|toDebugString|toString|transcode|underestimateCount|unsafeBitCast|with(?:ExtendedLifetime|Unsafe(?:MutablePointers?|Pointers?)|VaList))\b/ }); -Prism.languages.swift['string'].inside['interpolation'].inside.rest = Prism.languages.swift; \ No newline at end of file +Prism.languages.swift['string'].inside['interpolation'].inside.rest = Prism.languages.swift; From f2b19644931a9b13428aab08839fada6ca3d9b46 Mon Sep 17 00:00:00 2001 From: mAAdhaTTah Date: Mon, 11 Jun 2018 21:11:23 -0400 Subject: [PATCH 0038/1100] Add Chinese translation Closes #750. --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 3406859cf7..21c3b45ebe 100644 --- a/README.md +++ b/README.md @@ -20,3 +20,7 @@ Prism depends on community contributions to expand and cover a wider array of us - If you add a new language definition, theme or plugin, you need to add it to `components.js` as well, so that it becomes available to the download build page. Thank you so much for contributing!! + +## Translations + +* [![中文说明](http://awesomes.oss-cn-beijing.aliyuncs.com/readme.png)](http://www.awesomes.cn/repo/PrismJS/prism) From 791f400004d1f2503e1e462968c448c4a9d3ef3c Mon Sep 17 00:00:00 2001 From: mAAdhaTTah Date: Sun, 27 May 2018 17:46:52 -0400 Subject: [PATCH 0039/1100] Add tests Also fix up the patterns in light of said tests & code review. --- components/prism-tap.js | 18 ++++---- components/prism-tap.min.js | 2 +- tests/languages/tap/bail_out_feature.test | 13 ++++++ tests/languages/tap/directive_feature.test | 15 +++++++ tests/languages/tap/pass_fail_feature.test | 17 ++++++++ tests/languages/tap/plan_feature.test | 13 ++++++ tests/languages/tap/pragma_feature.test | 13 ++++++ tests/languages/tap/version_feature.test | 11 +++++ tests/languages/tap/yamlish_feature.test | 50 ++++++++++++++++++++++ 9 files changed, 142 insertions(+), 10 deletions(-) create mode 100644 tests/languages/tap/bail_out_feature.test create mode 100644 tests/languages/tap/directive_feature.test create mode 100644 tests/languages/tap/pass_fail_feature.test create mode 100644 tests/languages/tap/plan_feature.test create mode 100644 tests/languages/tap/pragma_feature.test create mode 100644 tests/languages/tap/version_feature.test create mode 100644 tests/languages/tap/yamlish_feature.test diff --git a/components/prism-tap.js b/components/prism-tap.js index 97bef158e2..80e5d3eb78 100644 --- a/components/prism-tap.js +++ b/components/prism-tap.js @@ -1,18 +1,18 @@ Prism.languages.tap = { - pass: /(^|\n)( )*ok[^#\{\n]*/, - fail: /(^|\n)( )*not ok[^#\{\n]*/, - pragma: /(^|\n)( )*pragma ([+-])([a-z]+)(\n|$)/, - bailout: /(^|\n)( )*bail out!(.*)(\n|$)/i, - version: /(^|\n)( )*TAP version ([0-9]+)(\n|$)/i, - plan: /(^|\n)( )*([0-9]+)\.\.([0-9]+)( +#[^\n]*)?(\n|$)/m, + fail: /not ok[^#{\n\r]*/, + pass: /ok[^#{\n\r]*/, + pragma: /pragma [+-][a-z]+/, + bailout: /bail out!.*/i, + version: /TAP version \d+/i, + plan: /\d+\.\.\d+(?: +#.*)?/, subtest: { - pattern: /(^|\n)( )*# Subtest(?:: (.*))?(\n|$)/, + pattern: /# Subtest(?:: .*)?/, greedy: true }, punctuation: /[{}]/, - 'comment': /#.*/, + directive: /#.*/, yamlish: { - pattern: /(^|\n)(( )*( ))---\n(.*?\n)+\2\.\.\.(\n|$)/, + pattern: /(^[^\S\r\n]*)---(?:\r\n?|\n)(?:.*(?:\r\n?|\n))*?[^\S\r\n]*\.\.\.$/m, lookbehind: true, inside: Prism.languages.yaml, alias: 'language-yaml' diff --git a/components/prism-tap.min.js b/components/prism-tap.min.js index c5631482f1..4f14d9bd2a 100644 --- a/components/prism-tap.min.js +++ b/components/prism-tap.min.js @@ -1 +1 @@ -Prism.languages.tap={pass:/(^|\n)( )*ok[^#\{\n]*/,fail:/(^|\n)( )*not ok[^#\{\n]*/,pragma:/(^|\n)( )*pragma ([+-])([a-z]+)(\n|$)/,bailout:/(^|\n)( )*bail out!(.*)(\n|$)/i,version:/(^|\n)( )*TAP version ([0-9]+)(\n|$)/i,plan:/(^|\n)( )*([0-9]+)\.\.([0-9]+)( +#[^\n]*)?(\n|$)/m,subtest:{pattern:/(^|\n)( )*# Subtest(?:: (.*))?(\n|$)/,greedy:!0},punctuation:/[{}]/,comment:/#.*/,yamlish:{pattern:/(^|\n)(( )*( ))---\n(.*?\n)+\2\.\.\.(\n|$)/,lookbehind:!0,inside:Prism.languages.yaml,alias:"language-yaml"}}; \ No newline at end of file +Prism.languages.tap={fail:/not ok[^#{\n\r]*/,pass:/ok[^#{\n\r]*/,pragma:/pragma [+-][a-z]+/,bailout:/bail out!.*/i,version:/TAP version \d+/i,plan:/\d+\.\.\d+(?: +#.*)?/,subtest:{pattern:/# Subtest(?:: .*)?/,greedy:!0},punctuation:/[{}]/,directive:/#.*/,yamlish:{pattern:/(^[^\S\r\n]*)---(?:\r\n?|\n)(?:.*(?:\r\n?|\n))*?[^\S\r\n]*\.\.\.$/m,lookbehind:!0,inside:Prism.languages.yaml,alias:"language-yaml"}}; \ No newline at end of file diff --git a/tests/languages/tap/bail_out_feature.test b/tests/languages/tap/bail_out_feature.test new file mode 100644 index 0000000000..eba81647c4 --- /dev/null +++ b/tests/languages/tap/bail_out_feature.test @@ -0,0 +1,13 @@ +Bail out! Couldn't connect to database. +bail out! Failed to call API. + +---------------------------------------------------- + +[ + ["bailout", "Bail out! Couldn't connect to database."], + ["bailout", "bail out! Failed to call API."] +] + +---------------------------------------------------- + +Checks bail out diff --git a/tests/languages/tap/directive_feature.test b/tests/languages/tap/directive_feature.test new file mode 100644 index 0000000000..5a3ff9105d --- /dev/null +++ b/tests/languages/tap/directive_feature.test @@ -0,0 +1,15 @@ +ok # SKIP test not written +ok 42 this is the description # TODO write test + +---------------------------------------------------- + +[ + ["pass", "ok " ], + ["directive", "# SKIP test not written"], + ["pass", "ok 42 this is the description "], + ["directive", "# TODO write test"] +] + +---------------------------------------------------- + +Checks directives diff --git a/tests/languages/tap/pass_fail_feature.test b/tests/languages/tap/pass_fail_feature.test new file mode 100644 index 0000000000..d0782990a3 --- /dev/null +++ b/tests/languages/tap/pass_fail_feature.test @@ -0,0 +1,17 @@ +not ok +not ok 42 this is the description of the test +ok +ok 42 this is the description of the test + +---------------------------------------------------- + +[ + ["fail", "not ok" ], + ["fail", "not ok 42 this is the description of the test"], + ["pass", "ok" ], + ["pass", "ok 42 this is the description of the test"] +] + +---------------------------------------------------- + +Checks test pass & fail together correctly diff --git a/tests/languages/tap/plan_feature.test b/tests/languages/tap/plan_feature.test new file mode 100644 index 0000000000..8bdcd4e7a6 --- /dev/null +++ b/tests/languages/tap/plan_feature.test @@ -0,0 +1,13 @@ +1..10 +1..10 # directive + +---------------------------------------------------- + +[ + ["plan", "1..10" ], + ["plan", "1..10 # directive" ] +] + +---------------------------------------------------- + +Checks TAP plan diff --git a/tests/languages/tap/pragma_feature.test b/tests/languages/tap/pragma_feature.test new file mode 100644 index 0000000000..7775f2e535 --- /dev/null +++ b/tests/languages/tap/pragma_feature.test @@ -0,0 +1,13 @@ +pragma +strict +pragma -strict + +---------------------------------------------------- + +[ + ["pragma", "pragma +strict"], + ["pragma", "pragma -strict"] +] + +---------------------------------------------------- + +Checks pragma diff --git a/tests/languages/tap/version_feature.test b/tests/languages/tap/version_feature.test new file mode 100644 index 0000000000..600bcccc3b --- /dev/null +++ b/tests/languages/tap/version_feature.test @@ -0,0 +1,11 @@ +TAP version 13 + +---------------------------------------------------- + +[ + ["version", "TAP version 13" ] +] + +---------------------------------------------------- + +Checks TAP version diff --git a/tests/languages/tap/yamlish_feature.test b/tests/languages/tap/yamlish_feature.test new file mode 100644 index 0000000000..be4a19e3d8 --- /dev/null +++ b/tests/languages/tap/yamlish_feature.test @@ -0,0 +1,50 @@ +ok + --- + message: "Failed with error 'hostname peebles.example.com not found'" + severity: fail + data: + got: + hostname: 'peebles.example.com' + address: ~ + expected: + hostname: 'peebles.example.com' + address: '85.193.201.85' + ... + +---------------------------------------------------- + +[ + ["pass", "ok"], + ["yamlish", [ + ["punctuation", "---"], + ["key", "message"], + ["punctuation", ":"], + ["string", "\"Failed with error 'hostname peebles.example.com not found'\""], + ["key", "severity"], + ["punctuation", ":"], + " fail\n ", + ["key", "data"], + ["punctuation", ":"], + ["key", "got"], + ["punctuation", ":"], + ["key", "hostname"], + ["punctuation", ":"], + ["string", "'peebles.example.com'"], + ["key", "address"], + ["punctuation", ":"], + ["null", "~"], + ["key", "expected"], + ["punctuation", ":"], + ["key", "hostname"], + ["punctuation", ":"], + ["string", "'peebles.example.com'"], + ["key", "address"], + ["punctuation", ":"], + ["string", "'85.193.201.85'"], + ["punctuation", "..."] + ]] +] + +---------------------------------------------------- + +Checks yaml embedding From 2c6b6a421db3d3319db3a73da1d0c841d3caee49 Mon Sep 17 00:00:00 2001 From: mAAdhaTTah Date: Mon, 11 Jun 2018 20:57:22 -0400 Subject: [PATCH 0040/1100] Fix Swift protocol test --- components/prism-swift.min.js | 2 +- tests/languages/swift/keyword_feature.test | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/components/prism-swift.min.js b/components/prism-swift.min.js index 5ce68106c2..06da319b7b 100644 --- a/components/prism-swift.min.js +++ b/components/prism-swift.min.js @@ -1 +1 @@ -Prism.languages.swift=Prism.languages.extend("clike",{string:{pattern:/("|')(\\(?:\((?:[^()]|\([^)]+\))+\)|\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0,inside:{interpolation:{pattern:/\\\((?:[^()]|\([^)]+\))+\)/,inside:{delimiter:{pattern:/^\\\(|\)$/,alias:"variable"}}}}},keyword:/\b(?:as|associativity|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic(?:Type)?|else|enum|extension|fallthrough|final|for|func|get|guard|if|import|in|infix|init|inout|internal|is|lazy|left|let|mutating|new|none|nonmutating|operator|optional|override|postfix|precedence|prefix|private|Protocol|public|repeat|required|rethrows|return|right|safe|self|Self|set|static|struct|subscript|super|switch|throws?|try|Type|typealias|unowned|unsafe|var|weak|where|while|willSet|__(?:COLUMN__|FILE__|FUNCTION__|LINE__))\b/,number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,constant:/\b(?:nil|[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,atrule:/@\b(?:IB(?:Outlet|Designable|Action|Inspectable)|class_protocol|exported|noreturn|NS(?:Copying|Managed)|objc|UIApplicationMain|auto_closure)\b/,builtin:/\b(?:[A-Z]\S+|abs|advance|alignof(?:Value)?|assert|contains|count(?:Elements)?|debugPrint(?:ln)?|distance|drop(?:First|Last)|dump|enumerate|equal|filter|find|first|getVaList|indices|isEmpty|join|last|lexicographicalCompare|map|max(?:Element)?|min(?:Element)?|numericCast|overlaps|partition|print(?:ln)?|reduce|reflect|reverse|sizeof(?:Value)?|sort(?:ed)?|split|startsWith|stride(?:of(?:Value)?)?|suffix|swap|toDebugString|toString|transcode|underestimateCount|unsafeBitCast|with(?:ExtendedLifetime|Unsafe(?:MutablePointers?|Pointers?)|VaList))\b/}),Prism.languages.swift.string.inside.interpolation.inside.rest=Prism.languages.swift; \ No newline at end of file +Prism.languages.swift=Prism.languages.extend("clike",{string:{pattern:/("|')(\\(?:\((?:[^()]|\([^)]+\))+\)|\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0,inside:{interpolation:{pattern:/\\\((?:[^()]|\([^)]+\))+\)/,inside:{delimiter:{pattern:/^\\\(|\)$/,alias:"variable"}}}}},keyword:/\b(?:as|associativity|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic(?:Type)?|else|enum|extension|fallthrough|final|for|func|get|guard|if|import|in|infix|init|inout|internal|is|lazy|left|let|mutating|new|none|nonmutating|operator|optional|override|postfix|precedence|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|Self|set|static|struct|subscript|super|switch|throws?|try|Type|typealias|unowned|unsafe|var|weak|where|while|willSet|__(?:COLUMN__|FILE__|FUNCTION__|LINE__))\b/,number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,constant:/\b(?:nil|[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,atrule:/@\b(?:IB(?:Outlet|Designable|Action|Inspectable)|class_protocol|exported|noreturn|NS(?:Copying|Managed)|objc|UIApplicationMain|auto_closure)\b/,builtin:/\b(?:[A-Z]\S+|abs|advance|alignof(?:Value)?|assert|contains|count(?:Elements)?|debugPrint(?:ln)?|distance|drop(?:First|Last)|dump|enumerate|equal|filter|find|first|getVaList|indices|isEmpty|join|last|lexicographicalCompare|map|max(?:Element)?|min(?:Element)?|numericCast|overlaps|partition|print(?:ln)?|reduce|reflect|reverse|sizeof(?:Value)?|sort(?:ed)?|split|startsWith|stride(?:of(?:Value)?)?|suffix|swap|toDebugString|toString|transcode|underestimateCount|unsafeBitCast|with(?:ExtendedLifetime|Unsafe(?:MutablePointers?|Pointers?)|VaList))\b/}),Prism.languages.swift.string.inside.interpolation.inside.rest=Prism.languages.swift; \ No newline at end of file diff --git a/tests/languages/swift/keyword_feature.test b/tests/languages/swift/keyword_feature.test index 079ffbdf11..75fb886640 100644 --- a/tests/languages/swift/keyword_feature.test +++ b/tests/languages/swift/keyword_feature.test @@ -44,7 +44,7 @@ postfix precedence prefix private -Protocol +protocol public repeat required @@ -126,7 +126,7 @@ __LINE__ ["keyword", "precedence"], ["keyword", "prefix"], ["keyword", "private"], - ["keyword", "Protocol"], + ["keyword", "protocol"], ["keyword", "public"], ["keyword", "repeat"], ["keyword", "required"], @@ -162,4 +162,4 @@ __LINE__ ---------------------------------------------------- -Checks for all keywords. \ No newline at end of file +Checks for all keywords. From 41e3d6a6f6926a4273c928ae857ce375a25fbd6e Mon Sep 17 00:00:00 2001 From: mAAdhaTTah Date: Sat, 16 Jun 2018 11:25:09 -0400 Subject: [PATCH 0041/1100] Update minified files --- components/prism-kotlin.min.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/prism-kotlin.min.js b/components/prism-kotlin.min.js index b19ca1c4cb..092079590f 100644 --- a/components/prism-kotlin.min.js +++ b/components/prism-kotlin.min.js @@ -1 +1 @@ -!function(e){e.languages.kotlin=e.languages.extend("clike",{keyword:{pattern:/(^|[^.])\b(?:abstract|actual|annotation|as|break|by|catch|class|companion|const|constructor|continue|crossinline|data|do|dynamic|else|enum|expect|external|final|finally|for|fun|get|if|import|in|infix|init|inline|inner|interface|internal|is|lateinit|noinline|null|object|open|operator|out|override|package|private|protected|public|reified|return|sealed|set|super|suspend|tailrec|this|throw|try|typealias|val|var|vararg|when|where|while)\b/,lookbehind:!0},"function":[/\w+(?=\s*\()/,{pattern:/(\.)\w+(?=\s*\{)/,lookbehind:!0}],number:/\b(?:0[xX][\da-fA-F]+(?:_[\da-fA-F]+)*|0[bB][01]+(?:_[01]+)*|\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?[fFL]?)\b/,operator:/\+[+=]?|-[-=>]?|==?=?|!(?:!|==?)?|[\/*%<>]=?|[?:]:?|\.\.|&&|\|\||\b(?:and|inv|or|shl|shr|ushr|xor)\b/}),delete e.languages.kotlin["class-name"],e.languages.insertBefore("kotlin","string",{"raw-string":{pattern:/("""|''')[\s\S]*?\1/,alias:"string"}}),e.languages.insertBefore("kotlin","keyword",{annotation:{pattern:/\B@(?:\w+:)?(?:[A-Z]\w*|\[[^\]]+\])/,alias:"builtin"}}),e.languages.insertBefore("kotlin","function",{label:{pattern:/\w+@|@\w+/,alias:"symbol"}});var n=[{pattern:/\$\{[^}]+\}/,inside:{delimiter:{pattern:/^\$\{|\}$/,alias:"variable"},rest:e.languages.kotlin}},{pattern:/\$\w+/,alias:"variable"}];e.languages.kotlin.string.inside=e.languages.kotlin["raw-string"].inside={interpolation:n}}(Prism); \ No newline at end of file +!function(e){e.languages.kotlin=e.languages.extend("clike",{keyword:{pattern:/(^|[^.])\b(?:abstract|actual|annotation|as|break|by|catch|class|companion|const|constructor|continue|crossinline|data|do|dynamic|else|enum|expect|external|final|finally|for|fun|get|if|import|in|infix|init|inline|inner|interface|internal|is|lateinit|noinline|null|object|open|operator|out|override|package|private|protected|public|reified|return|sealed|set|super|suspend|tailrec|this|throw|to|try|typealias|val|var|vararg|when|where|while)\b/,lookbehind:!0},"function":[/\w+(?=\s*\()/,{pattern:/(\.)\w+(?=\s*\{)/,lookbehind:!0}],number:/\b(?:0[xX][\da-fA-F]+(?:_[\da-fA-F]+)*|0[bB][01]+(?:_[01]+)*|\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?[fFL]?)\b/,operator:/\+[+=]?|-[-=>]?|==?=?|!(?:!|==?)?|[\/*%<>]=?|[?:]:?|\.\.|&&|\|\||\b(?:and|inv|or|shl|shr|ushr|xor)\b/}),delete e.languages.kotlin["class-name"],e.languages.insertBefore("kotlin","string",{"raw-string":{pattern:/("""|''')[\s\S]*?\1/,alias:"string"}}),e.languages.insertBefore("kotlin","keyword",{annotation:{pattern:/\B@(?:\w+:)?(?:[A-Z]\w*|\[[^\]]+\])/,alias:"builtin"}}),e.languages.insertBefore("kotlin","function",{label:{pattern:/\w+@|@\w+/,alias:"symbol"}});var n=[{pattern:/\$\{[^}]+\}/,inside:{delimiter:{pattern:/^\$\{|\}$/,alias:"variable"},rest:e.languages.kotlin}},{pattern:/\$\w+/,alias:"variable"}];e.languages.kotlin.string.inside=e.languages.kotlin["raw-string"].inside={interpolation:n}}(Prism); \ No newline at end of file From 7d084d5f17fa40d3451d46cac605308382c9c499 Mon Sep 17 00:00:00 2001 From: mAAdhaTTah Date: Sat, 16 Jun 2018 21:48:35 -0400 Subject: [PATCH 0042/1100] 1.15.0 --- CHANGELOG.md | 240 ++++++++++++++++++++++++++++++++------------------- package.json | 2 +- 2 files changed, 151 insertions(+), 91 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e7abdba61e..a6a4345ad3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,65 @@ # Prism Changelog +## 1.15.0 (2018-06-16) + +### New components + +* __Template Tookit 2__ (#1418) [`e063992b`] +* __XQuery__ (#1411) [`e326cb03`] +* __TAP__ [`8c2b71f1`] + +### Updated components + +* __HTTP__ + * Absolute path is a valid request uri (#1388) [`f6e81cb4`] +* __Kotlin__ + * Add keywords of Kotlin and modify it's number pattern. (#1389) [`1bf73b0b`] + * Add `typealias` keyword [`a21fdee6`] +* __JavaScript + * Improve Regexp pattern [`5b043cf8`] + * Add support for one level of nesting inside template strings. Fix #1397 [`db2d0ebb`] +* __Elixir__ + * Elixir: Fix attributes consuming punctuation. Fix #1392 [`dac0485e`] +* __Bash__ + * Change reserved keyword reference (#1396) [`b94f01f1`] +* __PowerShell__ + * Allow for one level of nesting in expressions inside strings. Fix #1407 [`9272d6f4`] +* __JSX__ + * Allow for two levels of nesting inside JSX tags. Fix #1408 [`f1cd7c56`] + * Add support for fragments short syntax. Fix #1421 [`38ce1213`] +* __Pascal__ + * Add `objectpascal` as an alias to `pascal` (#1426) [`a0bfc84d`] +* __Swift__ + * Fix Swift 'protocol' keyword [`081e318c`] + +### Updated plugins + +* __File Highlight__ + * Fix issue causing the Download button to show up on every code blocks. [`cd22499c`] + * Simplify lang regex on File Highlight plugin (#1399) [`7bc9a4a1`] +* __Show Language__ + * Don't process language if block language not set [`c1118692`] +* __Autoloader__ + * ASP.NET should require C# [`fa328bb1`] +* __Line Numbers__ + * Make line-numbers styles more specific [`9ee4f547`] + +### Updated themes + +* Add .token.class-name to rest of themes (#1360) [`f356dfe7`] + +### Other changes + +* __Website__ + * Site now loads over HTTPS! + * Use HTTPS / canonical URLs (#1390) [`95146c8f`] + * Added Angular tutorial link - `c436a7c7` + * Use rel="icon" instead of rel="shortcut icon" (#1398) [`d95f8fb4`] + * Fix Download page not handling multiple dependencies when from Redownload URL [`c2ff2482`] + * Update documentation for node & webpack usage [`1e99e961`] +* Handle optional dependencies in `loadLanguages()` (#1417) [`84935acd`] +* Add Chinese translation [`f2b19644`] + ## 1.14.0 (2018-04-11) ### New components @@ -87,15 +147,15 @@ * __Markup__: * Make tags greedy. Fix [#1356](https://github.com/PrismJS/prism/issues/1356) [[`af834be`](https://github.com/PrismJS/prism/commit/af834be)] * __Powershell__: - * Add lookbehind to fix function interpolation inside strings. Fix [#1361](https://github.com/PrismJS/prism/issues/1361) [[`d2c026e`](https://github.com/PrismJS/prism/commit/d2c026e)] + * Add lookbehind to fix function interpolation inside strings. Fix [#1361](https://github.com/PrismJS/prism/issues/1361) [[`d2c026e`](https://github.com/PrismJS/prism/commit/d2c026e)] * __Rust__: - * Improve char pattern so that lifetime annotations are matched better. Fix [#1353](https://github.com/PrismJS/prism/issues/1353) [[`efdccbf`](https://github.com/PrismJS/prism/commit/efdccbf)] + * Improve char pattern so that lifetime annotations are matched better. Fix [#1353](https://github.com/PrismJS/prism/issues/1353) [[`efdccbf`](https://github.com/PrismJS/prism/commit/efdccbf)] ### Updated themes * __Default__: - * Add color for class names [[`8572474`](https://github.com/PrismJS/prism/commit/8572474)] + * Add color for class names [[`8572474`](https://github.com/PrismJS/prism/commit/8572474)] * __Coy__: - * Inherit pre's height on code, so it does not break on Download page. [[`c6c7fd1`](https://github.com/PrismJS/prism/commit/c6c7fd1)] + * Inherit pre's height on code, so it does not break on Download page. [[`c6c7fd1`](https://github.com/PrismJS/prism/commit/c6c7fd1)] ### Other changes * Website: Auto-generate example headers [[`c3ed5b5`](https://github.com/PrismJS/prism/commit/c3ed5b5)] @@ -126,7 +186,7 @@ ## 1.12.0 (2018-03-07) ### New components -* __ARFF__ ([#1327](https://github.com/PrismJS/prism/issues/1327)) [[`0bc98ac`](https://github.com/PrismJS/prism/commit/0bc98ac)] +* __ARFF__ ([#1327](https://github.com/PrismJS/prism/issues/1327)) [[`0bc98ac`](https://github.com/PrismJS/prism/commit/0bc98ac)] * __Clojure__ ([#1311](https://github.com/PrismJS/prism/issues/1311)) [[`8b4d3bd`](https://github.com/PrismJS/prism/commit/8b4d3bd)] * __Liquid__ ([#1326](https://github.com/PrismJS/prism/issues/1326)) [[`f0b2c9e`](https://github.com/PrismJS/prism/commit/f0b2c9e)] @@ -150,7 +210,7 @@ * __Ruby__: * Add keywords "protected", "private" and "public" [[`4593837`](https://github.com/PrismJS/prism/commit/4593837)] * __Rust__: - * Add support for lifetime-annotation and => operator. Fix [#1339](https://github.com/PrismJS/prism/issues/1339) [[`926f6f8`](https://github.com/PrismJS/prism/commit/926f6f8)] + * Add support for lifetime-annotation and => operator. Fix [#1339](https://github.com/PrismJS/prism/issues/1339) [[`926f6f8`](https://github.com/PrismJS/prism/commit/926f6f8)] * __Scheme__: * Don't highlight first number of a list as a function. Fix [#1331](https://github.com/PrismJS/prism/issues/1331) [[`51bff80`](https://github.com/PrismJS/prism/commit/51bff80)] * __SQL__: @@ -158,7 +218,7 @@ ### Updated plugins * __Autolinker__: - * Allow more chars in query string and hash to match more URLs. Fix [#1142](https://github.com/PrismJS/prism/issues/1142) [[`109bd6f`](https://github.com/PrismJS/prism/commit/109bd6f)] + * Allow more chars in query string and hash to match more URLs. Fix [#1142](https://github.com/PrismJS/prism/issues/1142) [[`109bd6f`](https://github.com/PrismJS/prism/commit/109bd6f)] * __Copy to Clipboard__: * Bump ClipboardJS to 2.0.0 and remove hack ([#1314](https://github.com/PrismJS/prism/issues/1314)) [[`e9f410e`](https://github.com/PrismJS/prism/commit/e9f410e)] * __Toolbar__: @@ -213,7 +273,7 @@ * __Previewers__: * New plugin combining previous plugins Previewer: Base, Previewer: Angle, Previewer: Color, Previewer: Easing, Previewer: Gradient and Previewer: Time. ([#1244](https://github.com/PrismJS/prism/issues/1244)) [[`28e4b4c`](https://github.com/PrismJS/prism/commit/28e4b4c)] * __Unescaped Markup__: - * Make it work with any language ([#1265](https://github.com/PrismJS/prism/issues/1265)) [[`7bcdae7`](https://github.com/PrismJS/prism/commit/7bcdae7)] + * Make it work with any language ([#1265](https://github.com/PrismJS/prism/issues/1265)) [[`7bcdae7`](https://github.com/PrismJS/prism/commit/7bcdae7)] ### Other changes * Add attribute `style` in `package.json` ([#1256](https://github.com/PrismJS/prism/issues/1256)) [[`a9b6785`](https://github.com/PrismJS/prism/commit/a9b6785)] @@ -229,9 +289,9 @@ * __JSX__: * JSX: Improve highlighting support. Fix [#1235](https://github.com/PrismJS/prism/issues/1235) and [#1236](https://github.com/PrismJS/prism/issues/1236) [[`f41c5cd`](https://github.com/PrismJS/prism/commit/f41c5cd)] * __Markup__: - * Make CSS and JS inclusions in Markup greedy. Fix [#1240](https://github.com/PrismJS/prism/issues/1240) [[`7dc1e45`](https://github.com/PrismJS/prism/commit/7dc1e45)] + * Make CSS and JS inclusions in Markup greedy. Fix [#1240](https://github.com/PrismJS/prism/issues/1240) [[`7dc1e45`](https://github.com/PrismJS/prism/commit/7dc1e45)] * __PHP__: - * Add support for multi-line strings. Fix [#1233](https://github.com/PrismJS/prism/issues/1233) [[`9a542a0`](https://github.com/PrismJS/prism/commit/9a542a0)] + * Add support for multi-line strings. Fix [#1233](https://github.com/PrismJS/prism/issues/1233) [[`9a542a0`](https://github.com/PrismJS/prism/commit/9a542a0)] ### Updated plugins * __Copy to clipboard__: @@ -240,7 +300,7 @@ * __Line highlight__: * Fixes to compatibility of line number and line higlight plugins ([#1194](https://github.com/PrismJS/prism/issues/1194)) [[`e63058f`](https://github.com/PrismJS/prism/commit/e63058f), [`3842a91`](https://github.com/PrismJS/prism/commit/3842a91)] * __Unescaped Markup__: - * Fix ambiguity in documentation by improving examples. Fix [#1197](https://github.com/PrismJS/prism/issues/1197) [[`924784a`](https://github.com/PrismJS/prism/commit/924784a)] + * Fix ambiguity in documentation by improving examples. Fix [#1197](https://github.com/PrismJS/prism/issues/1197) [[`924784a`](https://github.com/PrismJS/prism/commit/924784a)] ### Other changes * Allow any element being root instead of document. ([#1230](https://github.com/PrismJS/prism/issues/1230)) [[`69f2e2c`](https://github.com/PrismJS/prism/commit/69f2e2c), [`6e50d44`](https://github.com/PrismJS/prism/commit/6e50d44)] @@ -305,76 +365,76 @@ * __Erlang__: * Regexp optimisation [[`e7b411e`](https://github.com/PrismJS/prism/commit/e7b411e)] * __F#__: - * Regexp optimisation + don't use captures if not needed [[`7753fc4`](https://github.com/PrismJS/prism/commit/7753fc4)] + * Regexp optimisation + don't use captures if not needed [[`7753fc4`](https://github.com/PrismJS/prism/commit/7753fc4)] * __Gherkin__: - * Regexp optimisation + don't use captures if not needed + added explanation comment on table-body regexp [[`f26197a`](https://github.com/PrismJS/prism/commit/f26197a)] + * Regexp optimisation + don't use captures if not needed + added explanation comment on table-body regexp [[`f26197a`](https://github.com/PrismJS/prism/commit/f26197a)] * __Git__: - * Regexp optimisation [[`b9483b9`](https://github.com/PrismJS/prism/commit/b9483b9)] + * Regexp optimisation [[`b9483b9`](https://github.com/PrismJS/prism/commit/b9483b9)] * __GLSL__: - * Regexp optimisation [[`e66d21b`](https://github.com/PrismJS/prism/commit/e66d21b)] + * Regexp optimisation [[`e66d21b`](https://github.com/PrismJS/prism/commit/e66d21b)] * __Go__: - * Regexp optimisation + don't use captures if not needed [[`88caabb`](https://github.com/PrismJS/prism/commit/88caabb)] + * Regexp optimisation + don't use captures if not needed [[`88caabb`](https://github.com/PrismJS/prism/commit/88caabb)] * __GraphQL__: - * Regexp optimisation and simplification [[`2474f06`](https://github.com/PrismJS/prism/commit/2474f06)] + * Regexp optimisation and simplification [[`2474f06`](https://github.com/PrismJS/prism/commit/2474f06)] * __Groovy__: - * Regexp optimisation + don't use captures if not needed [[`e74e00c`](https://github.com/PrismJS/prism/commit/e74e00c)] + * Regexp optimisation + don't use captures if not needed [[`e74e00c`](https://github.com/PrismJS/prism/commit/e74e00c)] * __Haml__: - * Regexp optimisation + don't use captures if not needed + fix typo in comment [[`23e3b43`](https://github.com/PrismJS/prism/commit/23e3b43)] + * Regexp optimisation + don't use captures if not needed + fix typo in comment [[`23e3b43`](https://github.com/PrismJS/prism/commit/23e3b43)] * __Handlebars__: - * Regexp optimisation + don't use captures if not needed [[`09dbfce`](https://github.com/PrismJS/prism/commit/09dbfce)] + * Regexp optimisation + don't use captures if not needed [[`09dbfce`](https://github.com/PrismJS/prism/commit/09dbfce)] * __Haskell__: - * Regexp simplification + don't use captures if not needed [[`f11390a`](https://github.com/PrismJS/prism/commit/f11390a)] + * Regexp simplification + don't use captures if not needed [[`f11390a`](https://github.com/PrismJS/prism/commit/f11390a)] * __HTTP__: - * Regexp simplification + don't use captures if not needed [[`37ef24e`](https://github.com/PrismJS/prism/commit/37ef24e)] + * Regexp simplification + don't use captures if not needed [[`37ef24e`](https://github.com/PrismJS/prism/commit/37ef24e)] * __Icon__: - * Regexp optimisation [[`9cf64a0`](https://github.com/PrismJS/prism/commit/9cf64a0)] + * Regexp optimisation [[`9cf64a0`](https://github.com/PrismJS/prism/commit/9cf64a0)] * __J__: - * Regexp simplification [[`de15150`](https://github.com/PrismJS/prism/commit/de15150)] + * Regexp simplification [[`de15150`](https://github.com/PrismJS/prism/commit/de15150)] * __Java__: - * Don't use captures if not needed [[`96b35c8`](https://github.com/PrismJS/prism/commit/96b35c8)] + * Don't use captures if not needed [[`96b35c8`](https://github.com/PrismJS/prism/commit/96b35c8)] * __JavaScript__: - * Regexp optimisation + don't use captures if not needed [[`93d4002`](https://github.com/PrismJS/prism/commit/93d4002)] + * Regexp optimisation + don't use captures if not needed [[`93d4002`](https://github.com/PrismJS/prism/commit/93d4002)] * __Jolie__: - * Regexp optimisation + don't use captures if not needed + remove duplicates in keywords [[`a491f9e`](https://github.com/PrismJS/prism/commit/a491f9e)] + * Regexp optimisation + don't use captures if not needed + remove duplicates in keywords [[`a491f9e`](https://github.com/PrismJS/prism/commit/a491f9e)] * __JSON__: * Make strings greedy, remove negative look-ahead for ":". Fix [#1204](https://github.com/PrismJS/prism/issues/1204) [[`98acd2d`](https://github.com/PrismJS/prism/commit/98acd2d)] - * Regexp optimisation + don't use captures if not needed [[`8fc1b03`](https://github.com/PrismJS/prism/commit/8fc1b03)] + * Regexp optimisation + don't use captures if not needed [[`8fc1b03`](https://github.com/PrismJS/prism/commit/8fc1b03)] * __JSX__: - * Regexp optimisation + handle spread operator as a whole [[`28de4e2`](https://github.com/PrismJS/prism/commit/28de4e2)] + * Regexp optimisation + handle spread operator as a whole [[`28de4e2`](https://github.com/PrismJS/prism/commit/28de4e2)] * __Julia__: - * Regexp optimisation and simplification [[`12684c0`](https://github.com/PrismJS/prism/commit/12684c0)] + * Regexp optimisation and simplification [[`12684c0`](https://github.com/PrismJS/prism/commit/12684c0)] * __Keyman__: - * Regexp optimisation + don't use captures if not needed [[`9726087`](https://github.com/PrismJS/prism/commit/9726087)] + * Regexp optimisation + don't use captures if not needed [[`9726087`](https://github.com/PrismJS/prism/commit/9726087)] * __Kotlin__: - * Regexp simplification [[`12ff8dc`](https://github.com/PrismJS/prism/commit/12ff8dc)] + * Regexp simplification [[`12ff8dc`](https://github.com/PrismJS/prism/commit/12ff8dc)] * __LaTeX__: - * Regexp optimisation and simplification [[`aa426b0`](https://github.com/PrismJS/prism/commit/aa426b0)] + * Regexp optimisation and simplification [[`aa426b0`](https://github.com/PrismJS/prism/commit/aa426b0)] * __LiveScript__: - * Make interpolated strings greedy + fix variable and identifier regexps [[`c581049`](https://github.com/PrismJS/prism/commit/c581049)] + * Make interpolated strings greedy + fix variable and identifier regexps [[`c581049`](https://github.com/PrismJS/prism/commit/c581049)] * __LOLCODE__: - * Don't use captures if not needed [[`52903af`](https://github.com/PrismJS/prism/commit/52903af)] + * Don't use captures if not needed [[`52903af`](https://github.com/PrismJS/prism/commit/52903af)] * __Makefile__: - * Regexp optimisation [[`20ae2e5`](https://github.com/PrismJS/prism/commit/20ae2e5)] + * Regexp optimisation [[`20ae2e5`](https://github.com/PrismJS/prism/commit/20ae2e5)] * __Markdown__: - * Don't use captures if not needed [[`f489a1e`](https://github.com/PrismJS/prism/commit/f489a1e)] + * Don't use captures if not needed [[`f489a1e`](https://github.com/PrismJS/prism/commit/f489a1e)] * __Markup__: - * Regexp optimisation + fix punctuation inside attr-value [[`ea380c6`](https://github.com/PrismJS/prism/commit/ea380c6)] + * Regexp optimisation + fix punctuation inside attr-value [[`ea380c6`](https://github.com/PrismJS/prism/commit/ea380c6)] * __MATLAB__: - * Make strings greedy + handle line feeds better [[`4cd4f01`](https://github.com/PrismJS/prism/commit/4cd4f01)] + * Make strings greedy + handle line feeds better [[`4cd4f01`](https://github.com/PrismJS/prism/commit/4cd4f01)] * __Monkey__: - * Don't use captures if not needed [[`7f47140`](https://github.com/PrismJS/prism/commit/7f47140)] + * Don't use captures if not needed [[`7f47140`](https://github.com/PrismJS/prism/commit/7f47140)] * __N4JS__: - * Don't use captures if not needed [[`2d3f9df`](https://github.com/PrismJS/prism/commit/2d3f9df)] + * Don't use captures if not needed [[`2d3f9df`](https://github.com/PrismJS/prism/commit/2d3f9df)] * __NASM__: - * Regexp optimisation and simplification + don't use captures if not needed [[`9937428`](https://github.com/PrismJS/prism/commit/9937428)] + * Regexp optimisation and simplification + don't use captures if not needed [[`9937428`](https://github.com/PrismJS/prism/commit/9937428)] * __nginx__: - * Remove trailing comma + remove duplicates in keywords [[`c6e7195`](https://github.com/PrismJS/prism/commit/c6e7195)] + * Remove trailing comma + remove duplicates in keywords [[`c6e7195`](https://github.com/PrismJS/prism/commit/c6e7195)] * __NSIS__: - * Regexp optimisation + don't use captures if not needed [[`beeb107`](https://github.com/PrismJS/prism/commit/beeb107)] + * Regexp optimisation + don't use captures if not needed [[`beeb107`](https://github.com/PrismJS/prism/commit/beeb107)] * __Objective-C__: - * Don't use captures if not needed [[`9be0f88`](https://github.com/PrismJS/prism/commit/9be0f88)] + * Don't use captures if not needed [[`9be0f88`](https://github.com/PrismJS/prism/commit/9be0f88)] * __OCaml__: - * Regexp simplification [[`5f5f38c`](https://github.com/PrismJS/prism/commit/5f5f38c)] + * Regexp simplification [[`5f5f38c`](https://github.com/PrismJS/prism/commit/5f5f38c)] * __OpenCL__: * Don't use captures if not needed [[`5e70f1d`](https://github.com/PrismJS/prism/commit/5e70f1d)] * __Oz__: @@ -382,77 +442,77 @@ * __PARI/GP__: * Regexp optimisation [[`2c7b59b`](https://github.com/PrismJS/prism/commit/2c7b59b)] * __Parser__: - * Regexp simplification [[`569d511`](https://github.com/PrismJS/prism/commit/569d511)] + * Regexp simplification [[`569d511`](https://github.com/PrismJS/prism/commit/569d511)] * __Perl__: - * Regexp optimisation and simplification + don't use captures if not needed [[`0fe4cf6`](https://github.com/PrismJS/prism/commit/0fe4cf6)] + * Regexp optimisation and simplification + don't use captures if not needed [[`0fe4cf6`](https://github.com/PrismJS/prism/commit/0fe4cf6)] * __PHP__: * Don't use captures if not needed Golmote [[`5235f18`](https://github.com/PrismJS/prism/commit/5235f18)] * __PHP Extras__: - * Add word boundary after global keywords + don't use captures if not needed [[`9049a2a`](https://github.com/PrismJS/prism/commit/9049a2a)] + * Add word boundary after global keywords + don't use captures if not needed [[`9049a2a`](https://github.com/PrismJS/prism/commit/9049a2a)] * __PowerShell__: - * Regexp optimisation + don't use captures if not needed [[`0d05957`](https://github.com/PrismJS/prism/commit/0d05957)] + * Regexp optimisation + don't use captures if not needed [[`0d05957`](https://github.com/PrismJS/prism/commit/0d05957)] * __Processing__: - * Regexp simplification [[`8110d38`](https://github.com/PrismJS/prism/commit/8110d38)] + * Regexp simplification [[`8110d38`](https://github.com/PrismJS/prism/commit/8110d38)] * __.properties__: - * Regexp optimisation [[`678b621`](https://github.com/PrismJS/prism/commit/678b621)] + * Regexp optimisation [[`678b621`](https://github.com/PrismJS/prism/commit/678b621)] * __Protocol Buffers__: - * Don't use captures if not needed [[`3e256d8`](https://github.com/PrismJS/prism/commit/3e256d8)] + * Don't use captures if not needed [[`3e256d8`](https://github.com/PrismJS/prism/commit/3e256d8)] * __Pug__: - * Don't use captures if not needed [[`76dc925`](https://github.com/PrismJS/prism/commit/76dc925)] + * Don't use captures if not needed [[`76dc925`](https://github.com/PrismJS/prism/commit/76dc925)] * __Pure__: - * Make inline-lang greedy [[`92318b0`](https://github.com/PrismJS/prism/commit/92318b0)] + * Make inline-lang greedy [[`92318b0`](https://github.com/PrismJS/prism/commit/92318b0)] * __Python__: * Add Python builtin function highlighting ([#1205](https://github.com/PrismJS/prism/issues/1205)) [[`2169c99`](https://github.com/PrismJS/prism/commit/2169c99)] * Python: Add highlighting to functions with space between name and parentheses ([#1207](https://github.com/PrismJS/prism/issues/1207)) [[`3badd8a`](https://github.com/PrismJS/prism/commit/3badd8a)] - * Make triple-quoted strings greedy + regexp optimisation and simplification [[`f09f9f5`](https://github.com/PrismJS/prism/commit/f09f9f5)] + * Make triple-quoted strings greedy + regexp optimisation and simplification [[`f09f9f5`](https://github.com/PrismJS/prism/commit/f09f9f5)] * __Qore__: * Regexp simplification [[`69459f0`](https://github.com/PrismJS/prism/commit/69459f0)] * __R__: - * Regexp optimisation [[`06a9da4`](https://github.com/PrismJS/prism/commit/06a9da4)] + * Regexp optimisation [[`06a9da4`](https://github.com/PrismJS/prism/commit/06a9da4)] * __Reason__: - * Regexp optimisation + don't use capture if not needed [[`19d79b4`](https://github.com/PrismJS/prism/commit/19d79b4)] + * Regexp optimisation + don't use capture if not needed [[`19d79b4`](https://github.com/PrismJS/prism/commit/19d79b4)] * __Ren'py__: - * Make strings greedy + don't use captures if not needed [[`91d84d9`](https://github.com/PrismJS/prism/commit/91d84d9)] + * Make strings greedy + don't use captures if not needed [[`91d84d9`](https://github.com/PrismJS/prism/commit/91d84d9)] * __reST__: - * Regexp simplification + don't use captures if not needed [[`1a8b3e9`](https://github.com/PrismJS/prism/commit/1a8b3e9)] + * Regexp simplification + don't use captures if not needed [[`1a8b3e9`](https://github.com/PrismJS/prism/commit/1a8b3e9)] * __Rip__: - * Regexp optimisation [[`d7f0ee8`](https://github.com/PrismJS/prism/commit/d7f0ee8)] + * Regexp optimisation [[`d7f0ee8`](https://github.com/PrismJS/prism/commit/d7f0ee8)] * __Ruby__: - * Regexp optimisation and simplification + don't use captures if not needed [[`4902ed4`](https://github.com/PrismJS/prism/commit/4902ed4)] + * Regexp optimisation and simplification + don't use captures if not needed [[`4902ed4`](https://github.com/PrismJS/prism/commit/4902ed4)] * __Rust__: - * Regexp optimisation and simplification + don't use captures if not needed [[`cc9d874`](https://github.com/PrismJS/prism/commit/cc9d874)] + * Regexp optimisation and simplification + don't use captures if not needed [[`cc9d874`](https://github.com/PrismJS/prism/commit/cc9d874)] * __Sass__: - * Regexp simplification Golmote [[`165d957`](https://github.com/PrismJS/prism/commit/165d957)] + * Regexp simplification Golmote [[`165d957`](https://github.com/PrismJS/prism/commit/165d957)] * __Scala__: - * Regexp optimisation Golmote [[`5f50c12`](https://github.com/PrismJS/prism/commit/5f50c12)] + * Regexp optimisation Golmote [[`5f50c12`](https://github.com/PrismJS/prism/commit/5f50c12)] * __Scheme__: * Regexp optimisation [[`bd19b04`](https://github.com/PrismJS/prism/commit/bd19b04)] * __SCSS__: - * Regexp simplification [[`c60b7d4`](https://github.com/PrismJS/prism/commit/c60b7d4)] + * Regexp simplification [[`c60b7d4`](https://github.com/PrismJS/prism/commit/c60b7d4)] * __Smalltalk__: - * Regexp simplification [[`41a2c76`](https://github.com/PrismJS/prism/commit/41a2c76)] + * Regexp simplification [[`41a2c76`](https://github.com/PrismJS/prism/commit/41a2c76)] * __Smarty__: - * Regexp optimisation and simplification [[`e169be9`](https://github.com/PrismJS/prism/commit/e169be9)] + * Regexp optimisation and simplification [[`e169be9`](https://github.com/PrismJS/prism/commit/e169be9)] * __SQL__: - * Regexp optimisation [[`a6244a4`](https://github.com/PrismJS/prism/commit/a6244a4)] + * Regexp optimisation [[`a6244a4`](https://github.com/PrismJS/prism/commit/a6244a4)] * __Stylus__: - * Regexp optimisation [[`df9506c`](https://github.com/PrismJS/prism/commit/df9506c)] + * Regexp optimisation [[`df9506c`](https://github.com/PrismJS/prism/commit/df9506c)] * __Swift__: - * Don't use captures if not needed [[`a2d737a`](https://github.com/PrismJS/prism/commit/a2d737a)] + * Don't use captures if not needed [[`a2d737a`](https://github.com/PrismJS/prism/commit/a2d737a)] * __Tcl__: - * Regexp simplification + don't use captures if not needed [[`f0b8a33`](https://github.com/PrismJS/prism/commit/f0b8a33)] + * Regexp simplification + don't use captures if not needed [[`f0b8a33`](https://github.com/PrismJS/prism/commit/f0b8a33)] * __Textile__: - * Regexp optimisation + don't use captures if not needed [[`08139ad`](https://github.com/PrismJS/prism/commit/08139ad)] + * Regexp optimisation + don't use captures if not needed [[`08139ad`](https://github.com/PrismJS/prism/commit/08139ad)] * __Twig__: * Regexp optimisation and simplification + don't use captures if not needed [[`0b10fd0`](https://github.com/PrismJS/prism/commit/0b10fd0)] * __TypeScript__: - * Don't use captures if not needed [[`e296caf`](https://github.com/PrismJS/prism/commit/e296caf)] + * Don't use captures if not needed [[`e296caf`](https://github.com/PrismJS/prism/commit/e296caf)] * __Verilog__: - * Regexp simplification [[`1b24b34`](https://github.com/PrismJS/prism/commit/1b24b34)] + * Regexp simplification [[`1b24b34`](https://github.com/PrismJS/prism/commit/1b24b34)] * __VHDL__: - * Regexp optimisation and simplification [[`7af36df`](https://github.com/PrismJS/prism/commit/7af36df)] + * Regexp optimisation and simplification [[`7af36df`](https://github.com/PrismJS/prism/commit/7af36df)] * __vim__: - * Remove duplicates in keywords [[`700505e`](https://github.com/PrismJS/prism/commit/700505e)] + * Remove duplicates in keywords [[`700505e`](https://github.com/PrismJS/prism/commit/700505e)] * __Wiki markup__: * Fix escaping consistency [[`1fd690d`](https://github.com/PrismJS/prism/commit/1fd690d)] * __YAML__: @@ -461,7 +521,7 @@ ### Other changes * Remove comments spellcheck for AMP validation ([#1106](https://github.com/PrismJS/prism/issues/1106)) [[`de996d7`](https://github.com/PrismJS/prism/commit/de996d7)] * Prevent error from throwing when element does not have a parentNode in highlightElement. [[`c33be19`](https://github.com/PrismJS/prism/commit/c33be19)] -* Provide a way to load Prism from inside a Worker without listening to messages. ([#1188](https://github.com/PrismJS/prism/issues/1188)) [[`d09982d`](https://github.com/PrismJS/prism/commit/d09982d)] +* Provide a way to load Prism from inside a Worker without listening to messages. ([#1188](https://github.com/PrismJS/prism/issues/1188)) [[`d09982d`](https://github.com/PrismJS/prism/commit/d09982d)] ## 1.8.3 (2017-10-19) @@ -499,7 +559,7 @@ ### Updated plugins * __Autolinker__: - * Silently catch any error thrown by decodeURIComponent. Fixes [#1186](https://github.com/PrismJS/prism/issues/1186) [[`2e43fcf`](https://github.com/PrismJS/prism/commit/2e43fcf)] + * Silently catch any error thrown by decodeURIComponent. Fixes [#1186](https://github.com/PrismJS/prism/issues/1186) [[`2e43fcf`](https://github.com/PrismJS/prism/commit/2e43fcf)] ## 1.7.0 (2017-09-09) @@ -516,11 +576,11 @@ * Add left shoe underbar and right shoe underbar ([#1072](https://github.com/PrismJS/prism/issues/1072)) [[`12238c5`](https://github.com/PrismJS/prism/commit/12238c5)] * Update prism-apl.js ([#1126](https://github.com/PrismJS/prism/issues/1126)) [[`a5f3cdb`](https://github.com/PrismJS/prism/commit/a5f3cdb)] * __C__: - * Add more keywords and constants for C. ([#1029](https://github.com/PrismJS/prism/issues/1029)) [[`43a388e`](https://github.com/PrismJS/prism/commit/43a388e)] + * Add more keywords and constants for C. ([#1029](https://github.com/PrismJS/prism/issues/1029)) [[`43a388e`](https://github.com/PrismJS/prism/commit/43a388e)] * __C#__: * Fix wrong highlighting when three slashes appear inside string. Fix [#1091](https://github.com/PrismJS/prism/issues/1091) [[`dfb6f17`](https://github.com/PrismJS/prism/commit/dfb6f17)] * __C-like__: - * Add support for unclosed block comments. Close [#828](https://github.com/PrismJS/prism/issues/828) [[`3426ed1`](https://github.com/PrismJS/prism/commit/3426ed1)] + * Add support for unclosed block comments. Close [#828](https://github.com/PrismJS/prism/issues/828) [[`3426ed1`](https://github.com/PrismJS/prism/commit/3426ed1)] * __Crystal__: * Update Crystal keywords ([#1092](https://github.com/PrismJS/prism/issues/1092)) [[`125bff1`](https://github.com/PrismJS/prism/commit/125bff1)] * __CSS Extras__: @@ -535,23 +595,23 @@ * __JavaScript__: * Properly match every operator as a whole token. Fix [#1133](https://github.com/PrismJS/prism/issues/1133) [[`9f649fb`](https://github.com/PrismJS/prism/commit/9f649fb)] * Allows uppercase prefixes in JS number literals ([#1151](https://github.com/PrismJS/prism/issues/1151)) [[`d4ee904`](https://github.com/PrismJS/prism/commit/d4ee904)] - * Reduced backtracking in regex pattern. Fix [#1159](https://github.com/PrismJS/prism/issues/1159) [[`ac09e97`](https://github.com/PrismJS/prism/commit/ac09e97)] + * Reduced backtracking in regex pattern. Fix [#1159](https://github.com/PrismJS/prism/issues/1159) [[`ac09e97`](https://github.com/PrismJS/prism/commit/ac09e97)] * __JSON__: * Fix property and string patterns performance. Fix [#1080](https://github.com/PrismJS/prism/issues/1080) [[`0ca1353`](https://github.com/PrismJS/prism/commit/0ca1353)] * __JSX__: * JSX spread operator break. Fixes [#1061](https://github.com/PrismJS/prism/issues/1061) ([#1094](https://github.com/PrismJS/prism/issues/1094)) [[`561bceb`](https://github.com/PrismJS/prism/commit/561bceb)] * Fix highlighting of attributes containing spaces [[`867ea42`](https://github.com/PrismJS/prism/commit/867ea42)] - * Improved performance for tags (when not matching) Fix [#1152](https://github.com/PrismJS/prism/issues/1152) [[`b0fe103`](https://github.com/PrismJS/prism/commit/b0fe103)] + * Improved performance for tags (when not matching) Fix [#1152](https://github.com/PrismJS/prism/issues/1152) [[`b0fe103`](https://github.com/PrismJS/prism/commit/b0fe103)] * __LOLCODE__: * Make strings greedy Golmote [[`1a5e7a4`](https://github.com/PrismJS/prism/commit/1a5e7a4)] * __Markup__: * Support HTML entities in attribute values ([#1143](https://github.com/PrismJS/prism/issues/1143)) [[`1d5047d`](https://github.com/PrismJS/prism/commit/1d5047d)] * __NSIS__: * Update patterns ([#1033](https://github.com/PrismJS/prism/issues/1033)) [[`01a59d8`](https://github.com/PrismJS/prism/commit/01a59d8)] - * Add support for NSIS 3.02 ([#1169](https://github.com/PrismJS/prism/issues/1169)) [[`393b5f7`](https://github.com/PrismJS/prism/commit/393b5f7)] + * Add support for NSIS 3.02 ([#1169](https://github.com/PrismJS/prism/issues/1169)) [[`393b5f7`](https://github.com/PrismJS/prism/commit/393b5f7)] * __PHP__: * Fix the PHP language ([#1100](https://github.com/PrismJS/prism/issues/1100)) [[`1453fa7`](https://github.com/PrismJS/prism/commit/1453fa7)] - * Check for possible pre-existing marker strings in PHP [[`36bc560`](https://github.com/PrismJS/prism/commit/36bc560)] + * Check for possible pre-existing marker strings in PHP [[`36bc560`](https://github.com/PrismJS/prism/commit/36bc560)] * __Ruby__: * Fix slash regex performance. Fix [#1083](https://github.com/PrismJS/prism/issues/1083) [[`a708730`](https://github.com/PrismJS/prism/commit/a708730)] * Add support for =begin =end comments. Manual merge of [#1121](https://github.com/PrismJS/prism/issues/1121). [[`62cdaf8`](https://github.com/PrismJS/prism/commit/62cdaf8)] @@ -559,19 +619,19 @@ * Check for possible pre-existing marker strings in Smarty [[`5df26e2`](https://github.com/PrismJS/prism/commit/5df26e2)] * __TypeScript__: * Update typescript keywords ([#1064](https://github.com/PrismJS/prism/issues/1064)) [[`52020a0`](https://github.com/PrismJS/prism/commit/52020a0)] - * Chmod -x prism-typescript component ([#1145](https://github.com/PrismJS/prism/issues/1145)) [[`afe0542`](https://github.com/PrismJS/prism/commit/afe0542)] + * Chmod -x prism-typescript component ([#1145](https://github.com/PrismJS/prism/issues/1145)) [[`afe0542`](https://github.com/PrismJS/prism/commit/afe0542)] * __YAML__: - * Make strings greedy (partial fix for [#1075](https://github.com/PrismJS/prism/issues/1075)) [[`565a2cc`](https://github.com/PrismJS/prism/commit/565a2cc)] + * Make strings greedy (partial fix for [#1075](https://github.com/PrismJS/prism/issues/1075)) [[`565a2cc`](https://github.com/PrismJS/prism/commit/565a2cc)] ### Updated plugins * __Autolinker__: - * Fixed an rendering issue for encoded urls ([#1173](https://github.com/PrismJS/prism/issues/1173)) [[`abc007f`](https://github.com/PrismJS/prism/commit/abc007f)] + * Fixed an rendering issue for encoded urls ([#1173](https://github.com/PrismJS/prism/issues/1173)) [[`abc007f`](https://github.com/PrismJS/prism/commit/abc007f)] * __Custom Class__: * Add missing noCSS property for the Custom Class plugin [[`ba64f8d`](https://github.com/PrismJS/prism/commit/ba64f8d)] * Added a default for classMap. Fixes [#1137](https://github.com/PrismJS/prism/issues/1137). ([#1157](https://github.com/PrismJS/prism/issues/1157)) [[`5400af9`](https://github.com/PrismJS/prism/commit/5400af9)] * __Keep Markup__: - * Store highlightedCode after reinserting markup. Fix [#1127](https://github.com/PrismJS/prism/issues/1127) [[`6df2ceb`](https://github.com/PrismJS/prism/commit/6df2ceb)] + * Store highlightedCode after reinserting markup. Fix [#1127](https://github.com/PrismJS/prism/issues/1127) [[`6df2ceb`](https://github.com/PrismJS/prism/commit/6df2ceb)] * __Line Highlight__: * Cleanup left-over line-highlight tags before other plugins run [[`79b723d`](https://github.com/PrismJS/prism/commit/79b723d)] * Avoid conflict between line-highlight and other plugins [[`224fdb8`](https://github.com/PrismJS/prism/commit/224fdb8)] @@ -600,7 +660,7 @@ * Add Composer support ([#648](https://github.com/PrismJS/prism/issues/648)) [[`2989633`](https://github.com/PrismJS/prism/commit/2989633)] * Remove IE8 plugin ([#992](https://github.com/PrismJS/prism/issues/992)) [[`25788eb`](https://github.com/PrismJS/prism/commit/25788eb)] * Website: remove width and height on logo.svg, so it becomes scalable. Close [#1005](https://github.com/PrismJS/prism/issues/1005) [[`0621ff7`](https://github.com/PrismJS/prism/commit/0621ff7)] -* Remove yarn.lock ([#1098](https://github.com/PrismJS/prism/issues/1098)) [[`11eed25`](https://github.com/PrismJS/prism/commit/11eed25)] +* Remove yarn.lock ([#1098](https://github.com/PrismJS/prism/issues/1098)) [[`11eed25`](https://github.com/PrismJS/prism/commit/11eed25)] ## 1.6.0 (2016-12-03) diff --git a/package.json b/package.json index cba9283b3a..cbffb02aab 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "prismjs", - "version": "1.14.0", + "version": "1.15.0", "description": "Lightweight, robust, elegant syntax highlighting. A spin-off project from Dabblet.", "main": "prism.js", "style": "themes/prism.css", From fedf03f61645dc5d9372453e421e3697cb922fe7 Mon Sep 17 00:00:00 2001 From: mAAdhaTTah Date: Sat, 16 Jun 2018 21:51:49 -0400 Subject: [PATCH 0043/1100] Linkify CHANGELOG --- CHANGELOG.md | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a6a4345ad3..a6f3bec532 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,31 +4,31 @@ ### New components -* __Template Tookit 2__ (#1418) [`e063992b`] -* __XQuery__ (#1411) [`e326cb03`] +* __Template Tookit 2__ ([#1418](https://github.com/PrismJS/prism/issues/1418)) [`e063992b`] +* __XQuery__ ([#1411](https://github.com/PrismJS/prism/issues/1411)) [`e326cb03`] * __TAP__ [`8c2b71f1`] ### Updated components * __HTTP__ - * Absolute path is a valid request uri (#1388) [`f6e81cb4`] + * Absolute path is a valid request uri ([#1388](https://github.com/PrismJS/prism/issues/1388)) [`f6e81cb4`] * __Kotlin__ - * Add keywords of Kotlin and modify it's number pattern. (#1389) [`1bf73b0b`] + * Add keywords of Kotlin and modify it's number pattern. ([#1389](https://github.com/PrismJS/prism/issues/1389)) [`1bf73b0b`] * Add `typealias` keyword [`a21fdee6`] * __JavaScript * Improve Regexp pattern [`5b043cf8`] - * Add support for one level of nesting inside template strings. Fix #1397 [`db2d0ebb`] + * Add support for one level of nesting inside template strings. Fix [#1397](https://github.com/PrismJS/prism/issues/1397) [`db2d0ebb`] * __Elixir__ - * Elixir: Fix attributes consuming punctuation. Fix #1392 [`dac0485e`] + * Elixir: Fix attributes consuming punctuation. Fix [#1392](https://github.com/PrismJS/prism/issues/1392) [`dac0485e`] * __Bash__ - * Change reserved keyword reference (#1396) [`b94f01f1`] + * Change reserved keyword reference ([#1396](https://github.com/PrismJS/prism/issues/1396)) [`b94f01f1`] * __PowerShell__ - * Allow for one level of nesting in expressions inside strings. Fix #1407 [`9272d6f4`] + * Allow for one level of nesting in expressions inside strings. Fix [#1407](https://github.com/PrismJS/prism/issues/1407) [`9272d6f4`] * __JSX__ - * Allow for two levels of nesting inside JSX tags. Fix #1408 [`f1cd7c56`] - * Add support for fragments short syntax. Fix #1421 [`38ce1213`] + * Allow for two levels of nesting inside JSX tags. Fix [#1408](https://github.com/PrismJS/prism/issues/1408) [`f1cd7c56`] + * Add support for fragments short syntax. Fix [#1421](https://github.com/PrismJS/prism/issues/1421) [`38ce1213`] * __Pascal__ - * Add `objectpascal` as an alias to `pascal` (#1426) [`a0bfc84d`] + * Add `objectpascal` as an alias to `pascal` ([#1426](https://github.com/PrismJS/prism/issues/1426)) [`a0bfc84d`] * __Swift__ * Fix Swift 'protocol' keyword [`081e318c`] @@ -36,7 +36,7 @@ * __File Highlight__ * Fix issue causing the Download button to show up on every code blocks. [`cd22499c`] - * Simplify lang regex on File Highlight plugin (#1399) [`7bc9a4a1`] + * Simplify lang regex on File Highlight plugin ([#1399](https://github.com/PrismJS/prism/issues/1399)) [`7bc9a4a1`] * __Show Language__ * Don't process language if block language not set [`c1118692`] * __Autoloader__ @@ -46,18 +46,18 @@ ### Updated themes -* Add .token.class-name to rest of themes (#1360) [`f356dfe7`] +* Add .token.class-name to rest of themes ([#1360](https://github.com/PrismJS/prism/issues/1360)) [`f356dfe7`] ### Other changes * __Website__ * Site now loads over HTTPS! - * Use HTTPS / canonical URLs (#1390) [`95146c8f`] + * Use HTTPS / canonical URLs ([#1390](https://github.com/PrismJS/prism/issues/1390)) [`95146c8f`] * Added Angular tutorial link - `c436a7c7` - * Use rel="icon" instead of rel="shortcut icon" (#1398) [`d95f8fb4`] + * Use rel="icon" instead of rel="shortcut icon" ([#1398](https://github.com/PrismJS/prism/issues/1398)) [`d95f8fb4`] * Fix Download page not handling multiple dependencies when from Redownload URL [`c2ff2482`] * Update documentation for node & webpack usage [`1e99e961`] -* Handle optional dependencies in `loadLanguages()` (#1417) [`84935acd`] +* Handle optional dependencies in `loadLanguages()` ([#1417](https://github.com/PrismJS/prism/issues/1417)) [`84935acd`] * Add Chinese translation [`f2b19644`] ## 1.14.0 (2018-04-11) From 334c7bca1149075cd115e18eb26cd829956a1b7e Mon Sep 17 00:00:00 2001 From: Brandon Rhodes Date: Tue, 26 Jun 2018 11:21:28 -0400 Subject: [PATCH 0044/1100] Add Python triple-quoted strings "known failure" (#1449) * Add example of failure in Python parser --- examples/prism-python.html | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/examples/prism-python.html b/examples/prism-python.html index a8c383b889..3309732bda 100644 --- a/examples/prism-python.html +++ b/examples/prism-python.html @@ -48,4 +48,17 @@

    Full example

    return (copy[size/2 - 1] + copy[size/2]) / 2 if __name__ == '__main__': import doctest - doctest.testmod()
    \ No newline at end of file + doctest.testmod() + +

    Known failures

    +

    There are certain edge cases where Prism will fail. + There are always such cases in every regex-based syntax highlighter. + However, Prism dares to be open and honest about them. + If a failure is listed here, it doesn’t mean it will never be fixed. This is more of a “known bugs” list, just with a certain type of bug. +

    + +

    Triple-quoted strings with what look like strings inside

    +
    def antique(string):
    +    """Replace anachronistic Latin "j" with "i"."""
    +    return string.replace("j", "i").replace("J", "I")
    +    
    From e00b408fe5d27630b4052c29da86f5ae33b9258f Mon Sep 17 00:00:00 2001 From: mAAdhaTTah Date: Tue, 26 Jun 2018 11:32:31 -0400 Subject: [PATCH 0045/1100] Remove extraneous class --- examples/prism-python.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/prism-python.html b/examples/prism-python.html index 3309732bda..ca7a397e99 100644 --- a/examples/prism-python.html +++ b/examples/prism-python.html @@ -58,7 +58,7 @@

    Known failures

    Triple-quoted strings with what look like strings inside

    -
    def antique(string):
    +
    def antique(string):
         """Replace anachronistic Latin "j" with "i"."""
         return string.replace("j", "i").replace("J", "I")
         
    From 7418dfddbc937fa107e39751b2f9910a197df63b Mon Sep 17 00:00:00 2001 From: Shivang Saxena Date: Fri, 6 Jul 2018 16:48:04 -0400 Subject: [PATCH 0046/1100] Updated index.html to fix broken instructions (#1462) * Updated index.html to fix broken instructions Requiring components without the "index.js" part and calling "loadLanguages" results in a function not found error for me. Adding index.js, as commented by @golmote, fixes that error. Ref: https://github.com/PrismJS/prism/issues/972 * Updated index.html to fix nodejs instructions Fixed the require so that nodejs does not give an error when requiring the loadLanguages function. --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index 532e2dfb43..2d6b430582 100644 --- a/index.html +++ b/index.html @@ -188,7 +188,7 @@

    Usage with Node

    Example:

    var Prism = require('prismjs');
    -var loadLanguages = require('prismjs/components');
    +var loadLanguages = require('prismjs/components/');
     loadLanguages(['haml']);
     
     // The code snippet you want to highlight, as a string
    
    From 2a100db70bad83bd040537f06758120ddfe70f32 Mon Sep 17 00:00:00 2001
    From: Golmote 
    Date: Fri, 6 Jul 2018 21:52:48 +0200
    Subject: [PATCH 0047/1100] Linkify changelog more + add missing PR references
    
    ---
     CHANGELOG.md | 56 ++++++++++++++++++++++++++--------------------------
     1 file changed, 28 insertions(+), 28 deletions(-)
    
    diff --git a/CHANGELOG.md b/CHANGELOG.md
    index a6f3bec532..14c64052d3 100644
    --- a/CHANGELOG.md
    +++ b/CHANGELOG.md
    @@ -4,61 +4,61 @@
     
     ### New components
     
    -* __Template Tookit 2__ ([#1418](https://github.com/PrismJS/prism/issues/1418)) [`e063992b`]
    -* __XQuery__ ([#1411](https://github.com/PrismJS/prism/issues/1411)) [`e326cb03`]
    -* __TAP__ [`8c2b71f1`]
    +* __Template Tookit 2__ ([#1418](https://github.com/PrismJS/prism/issues/1418)) [[`e063992`](https://github.com/PrismJS/prism/commit/e063992)]
    +* __XQuery__ ([#1411](https://github.com/PrismJS/prism/issues/1411)) [[`e326cb0`](https://github.com/PrismJS/prism/commit/e326cb0)]
    +* __TAP__ ([#1430](https://github.com/PrismJS/prism/issues/1430)) [[`8c2b71f`](https://github.com/PrismJS/prism/commit/8c2b71f)]
     
     ### Updated components
     
     * __HTTP__
    -	* Absolute path is a valid request uri ([#1388](https://github.com/PrismJS/prism/issues/1388)) [`f6e81cb4`]
    +	* Absolute path is a valid request uri ([#1388](https://github.com/PrismJS/prism/issues/1388)) [[`f6e81cb`](https://github.com/PrismJS/prism/commit/f6e81cb)]
     * __Kotlin__
    -	* Add keywords of Kotlin and modify it's number pattern. ([#1389](https://github.com/PrismJS/prism/issues/1389)) [`1bf73b0b`]
    -	* Add `typealias` keyword [`a21fdee6`]
    +	* Add keywords of Kotlin and modify it's number pattern. ([#1389](https://github.com/PrismJS/prism/issues/1389)) [[`1bf73b0`](https://github.com/PrismJS/prism/commit/1bf73b0)]
    +	* Add `typealias` keyword ([#1437](https://github.com/PrismJS/prism/issues/1437)) [[`a21fdee`](https://github.com/PrismJS/prism/commit/a21fdee)]
     * __JavaScript
    -	* Improve Regexp pattern [`5b043cf8`]
    -	* Add support for one level of nesting inside template strings. Fix [#1397](https://github.com/PrismJS/prism/issues/1397) [`db2d0ebb`]
    +	* Improve Regexp pattern [[`5b043cf`](https://github.com/PrismJS/prism/commit/5b043cf)]
    +	* Add support for one level of nesting inside template strings. Fix [#1397](https://github.com/PrismJS/prism/issues/1397) [[`db2d0eb`](https://github.com/PrismJS/prism/commit/db2d0eb)]
     * __Elixir__
    -	* Elixir: Fix attributes consuming punctuation. Fix [#1392](https://github.com/PrismJS/prism/issues/1392) [`dac0485e`]
    +	* Elixir: Fix attributes consuming punctuation. Fix [#1392](https://github.com/PrismJS/prism/issues/1392) [[`dac0485`](https://github.com/PrismJS/prism/commit/dac0485)]
     * __Bash__
    -	* Change reserved keyword reference ([#1396](https://github.com/PrismJS/prism/issues/1396)) [`b94f01f1`]
    +	* Change reserved keyword reference ([#1396](https://github.com/PrismJS/prism/issues/1396)) [[`b94f01f`](https://github.com/PrismJS/prism/commit/b94f01f)]
     * __PowerShell__
    -	* Allow for one level of nesting in expressions inside strings. Fix [#1407](https://github.com/PrismJS/prism/issues/1407) [`9272d6f4`]
    +	* Allow for one level of nesting in expressions inside strings. Fix [#1407](https://github.com/PrismJS/prism/issues/1407) [[`9272d6f`](https://github.com/PrismJS/prism/commit/9272d6f)]
     * __JSX__
    -	* Allow for two levels of nesting inside JSX tags. Fix [#1408](https://github.com/PrismJS/prism/issues/1408) [`f1cd7c56`]
    -	* Add support for fragments short syntax. Fix [#1421](https://github.com/PrismJS/prism/issues/1421) [`38ce1213`]
    +	* Allow for two levels of nesting inside JSX tags. Fix [#1408](https://github.com/PrismJS/prism/issues/1408) [[`f1cd7c5`](https://github.com/PrismJS/prism/commit/f1cd7c5)]
    +	* Add support for fragments short syntax. Fix [#1421](https://github.com/PrismJS/prism/issues/1421) [[`38ce121`](https://github.com/PrismJS/prism/commit/38ce121)]
     * __Pascal__
    -	* Add `objectpascal` as an alias to `pascal` ([#1426](https://github.com/PrismJS/prism/issues/1426)) [`a0bfc84d`]
    +	* Add `objectpascal` as an alias to `pascal` ([#1426](https://github.com/PrismJS/prism/issues/1426)) [[`a0bfc84`](https://github.com/PrismJS/prism/commit/a0bfc84)]
     * __Swift__
    -	* Fix Swift 'protocol' keyword [`081e318c`]
    +	* Fix Swift 'protocol' keyword ([#1440](https://github.com/PrismJS/prism/issues/1440)) [[`081e318`](https://github.com/PrismJS/prism/commit/081e318)]
     
     ### Updated plugins
     
     * __File Highlight__
    -	* Fix issue causing the Download button to show up on every code blocks. [`cd22499c`]
    -	* Simplify lang regex on File Highlight plugin ([#1399](https://github.com/PrismJS/prism/issues/1399)) [`7bc9a4a1`]
    +	* Fix issue causing the Download button to show up on every code blocks. [[`cd22499`](https://github.com/PrismJS/prism/commit/cd22499)]
    +	* Simplify lang regex on File Highlight plugin ([#1399](https://github.com/PrismJS/prism/issues/1399)) [[`7bc9a4a`](https://github.com/PrismJS/prism/commit/7bc9a4a)]
     * __Show Language__
    -	* Don't process language if block language not set [`c1118692`]
    +	* Don't process language if block language not set ([#1410](https://github.com/PrismJS/prism/issues/1410)) [[`c111869`](https://github.com/PrismJS/prism/commit/c111869)]
     * __Autoloader__
    -	* ASP.NET should require C# [`fa328bb1`]
    +	* ASP.NET should require C# [[`fa328bb`](https://github.com/PrismJS/prism/commit/fa328bb)]
     * __Line Numbers__
    -	* Make line-numbers styles more specific [`9ee4f547`]
    +	* Make line-numbers styles more specific ([#1434](https://github.com/PrismJS/prism/issues/1434), [#1435](https://github.com/PrismJS/prism/issues/1435)) [[`9ee4f54`](https://github.com/PrismJS/prism/commit/9ee4f54)]
     
     ### Updated themes
     
    -* Add .token.class-name to rest of themes ([#1360](https://github.com/PrismJS/prism/issues/1360)) [`f356dfe7`]
    +* Add .token.class-name to rest of themes ([#1360](https://github.com/PrismJS/prism/issues/1360)) [[`f356dfe`](https://github.com/PrismJS/prism/commit/f356dfe)]
     
     ### Other changes
     
     * __Website__
     	* Site now loads over HTTPS!
    -	* Use HTTPS / canonical URLs ([#1390](https://github.com/PrismJS/prism/issues/1390)) [`95146c8f`]
    -	* Added Angular tutorial link - `c436a7c7`
    -	* Use rel="icon" instead of rel="shortcut icon" ([#1398](https://github.com/PrismJS/prism/issues/1398)) [`d95f8fb4`]
    -	* Fix Download page not handling multiple dependencies when from Redownload URL [`c2ff2482`]
    -	* Update documentation for node & webpack usage [`1e99e961`]
    -* Handle optional dependencies in `loadLanguages()` ([#1417](https://github.com/PrismJS/prism/issues/1417)) [`84935acd`]
    -* Add Chinese translation [`f2b19644`]
    +	* Use HTTPS / canonical URLs ([#1390](https://github.com/PrismJS/prism/issues/1390)) [[`95146c8`](https://github.com/PrismJS/prism/commit/95146c8)]
    +	* Added Angular tutorial link [[`c436a7c`](https://github.com/PrismJS/prism/commit/c436a7c)]
    +	* Use rel="icon" instead of rel="shortcut icon" ([#1398](https://github.com/PrismJS/prism/issues/1398)) [[`d95f8fb`](https://github.com/PrismJS/prism/commit/d95f8fb)]
    +	* Fix Download page not handling multiple dependencies when from Redownload URL [[`c2ff248`](https://github.com/PrismJS/prism/commit/c2ff248)]
    +	* Update documentation for node & webpack usage [[`1e99e96`](https://github.com/PrismJS/prism/commit/1e99e96)]
    +* Handle optional dependencies in `loadLanguages()` ([#1417](https://github.com/PrismJS/prism/issues/1417)) [[`84935ac`](https://github.com/PrismJS/prism/commit/84935ac)]
    +* Add Chinese translation [[`f2b1964`](https://github.com/PrismJS/prism/commit/f2b1964)]
     
     ## 1.14.0 (2018-04-11)
     
    
    From 12a827e73652f273e5015bd56f81badc297ecc48 Mon Sep 17 00:00:00 2001
    From: Jakub Jankiewicz 
    Date: Sat, 7 Jul 2018 14:56:36 +0200
    Subject: [PATCH 0048/1100] fix function without arguments in scheme language
     (#1463)
    
    * fix function without arguments in scheme language
    
    * update tests for scheme
    ---
     components/prism-scheme.js                   | 2 +-
     components/prism-scheme.min.js               | 2 +-
     tests/languages/scheme/function_feature.test | 6 ++++--
     3 files changed, 6 insertions(+), 4 deletions(-)
    
    diff --git a/components/prism-scheme.js b/components/prism-scheme.js
    index 8e9b7b3807..102d848529 100644
    --- a/components/prism-scheme.js
    +++ b/components/prism-scheme.js
    @@ -22,7 +22,7 @@ Prism.languages.scheme = {
     		lookbehind: true
     	},
     	'function' : {
    -		pattern : /(\()[^\s()]*(?=\s)/,
    +		pattern : /(\()[^\s()]*(?=[\s)])/,
     		lookbehind : true
     	},
     	'punctuation' : /[()]/
    diff --git a/components/prism-scheme.min.js b/components/prism-scheme.min.js
    index cdefa62e8d..1767130adf 100644
    --- a/components/prism-scheme.min.js
    +++ b/components/prism-scheme.min.js
    @@ -1 +1 @@
    -Prism.languages.scheme={comment:/;.*/,string:{pattern:/"(?:[^"\\\r\n]|\\.)*"|'[^('\s]*/,greedy:!0},keyword:{pattern:/(\()(?:define(?:-syntax|-library|-values)?|(?:case-)?lambda|let(?:\*|rec)?(?:-values)?|else|if|cond|begin|delay(?:-force)?|parameterize|guard|set!|(?:quasi-)?quote|syntax-rules)/,lookbehind:!0},builtin:{pattern:/(\()(?:(?:cons|car|cdr|list|call-with-current-continuation|call\/cc|append|abs|apply|eval)\b|null\?|pair\?|boolean\?|eof-object\?|char\?|procedure\?|number\?|port\?|string\?|vector\?|symbol\?|bytevector\?)/,lookbehind:!0},number:{pattern:/(\s|[()])[-+]?\d*\.?\d+(?:\s*[-+]\s*\d*\.?\d+i)?\b/,lookbehind:!0},"boolean":/#[tf]/,operator:{pattern:/(\()(?:[-+*%\/]|[<>]=?|=>?)/,lookbehind:!0},"function":{pattern:/(\()[^\s()]*(?=\s)/,lookbehind:!0},punctuation:/[()]/};
    \ No newline at end of file
    +Prism.languages.scheme={comment:/;.*/,string:{pattern:/"(?:[^"\\\r\n]|\\.)*"|'[^('\s]*/,greedy:!0},keyword:{pattern:/(\()(?:define(?:-syntax|-library|-values)?|(?:case-)?lambda|let(?:\*|rec)?(?:-values)?|else|if|cond|begin|delay(?:-force)?|parameterize|guard|set!|(?:quasi-)?quote|syntax-rules)/,lookbehind:!0},builtin:{pattern:/(\()(?:(?:cons|car|cdr|list|call-with-current-continuation|call\/cc|append|abs|apply|eval)\b|null\?|pair\?|boolean\?|eof-object\?|char\?|procedure\?|number\?|port\?|string\?|vector\?|symbol\?|bytevector\?)/,lookbehind:!0},number:{pattern:/(\s|[()])[-+]?\d*\.?\d+(?:\s*[-+]\s*\d*\.?\d+i)?\b/,lookbehind:!0},"boolean":/#[tf]/,operator:{pattern:/(\()(?:[-+*%\/]|[<>]=?|=>?)/,lookbehind:!0},"function":{pattern:/(\()[^\s()]*(?=[\s)])/,lookbehind:!0},punctuation:/[()]/};
    \ No newline at end of file
    diff --git a/tests/languages/scheme/function_feature.test b/tests/languages/scheme/function_feature.test
    index 25c804634e..4d8807c78d 100644
    --- a/tests/languages/scheme/function_feature.test
    +++ b/tests/languages/scheme/function_feature.test
    @@ -2,6 +2,7 @@
     (flmin 2 3)
     (exact? 2)
     (inexact->exact 3)
    +(!fact)
     
     ----------------------------------------------------
     
    @@ -9,9 +10,10 @@
     	["punctuation", "("], ["function", "fl="], ["number", "1"], ["number", "2"], ["punctuation", ")"],
     	["punctuation", "("], ["function", "flmin"], ["number", "2"], ["number", "3"], ["punctuation", ")"],
     	["punctuation", "("], ["function", "exact?"], ["number", "2"], ["punctuation", ")"],
    -	["punctuation", "("], ["function", "inexact->exact"], ["number", "3"], ["punctuation", ")"]
    +	["punctuation", "("], ["function", "inexact->exact"], ["number", "3"], ["punctuation", ")"],
    +	["punctuation", "("], ["function", "!fact"], ["punctuation", ")"]
     ]
     
     ----------------------------------------------------
     
    -Checks for functions.
    \ No newline at end of file
    +Checks for functions.
    
    From 74fe81c640f404763feb7293810aa67d6c87212e Mon Sep 17 00:00:00 2001
    From: Andrew Assarattanakul 
    Date: Sat, 21 Jul 2018 14:10:18 -0500
    Subject: [PATCH 0049/1100] Fix bugs in JSON language
    
    * Fix numbers to include negative numbers.
    * Remove hexidecimal from numbers it is not a valid value.
    * Remove ) and ; from punctuation they are not valid punctuation.
    * Include missing tests for punctuation and operators.
    ---
     components/prism-json.js                      |  4 ++--
     components/prism-json.min.js                  |  2 +-
     tests/languages/json/number_feature.test      | 10 ++++++++--
     tests/languages/json/operator_feature.test    | 11 ++++++++++
     tests/languages/json/punctuation_feature.test | 20 +++++++++++++++++++
     tests/languages/json/string_feature.test      |  2 +-
     6 files changed, 43 insertions(+), 6 deletions(-)
     create mode 100644 tests/languages/json/operator_feature.test
     create mode 100644 tests/languages/json/punctuation_feature.test
    
    diff --git a/components/prism-json.js b/components/prism-json.js
    index 06e847ec60..3ac9be1b4f 100644
    --- a/components/prism-json.js
    +++ b/components/prism-json.js
    @@ -4,8 +4,8 @@ Prism.languages.json = {
     		pattern: /"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,
     		greedy: true
     	},
    -	'number': /\b0x[\dA-Fa-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:[Ee][+-]?\d+)?/,
    -	'punctuation': /[{}[\]);,]/,
    +	'number': /-?\d+\.?\d*([Ee][+-]?\d+)?/,
    +	'punctuation': /[{}[\],]/,
     	'operator': /:/g,
     	'boolean': /\b(?:true|false)\b/i,
     	'null': /\bnull\b/i
    diff --git a/components/prism-json.min.js b/components/prism-json.min.js
    index bf24e77916..e4206fa384 100644
    --- a/components/prism-json.min.js
    +++ b/components/prism-json.min.js
    @@ -1 +1 @@
    -Prism.languages.json={property:/"(?:\\.|[^\\"\r\n])*"(?=\s*:)/i,string:{pattern:/"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,greedy:!0},number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:[Ee][+-]?\d+)?/,punctuation:/[{}[\]);,]/,operator:/:/g,"boolean":/\b(?:true|false)\b/i,"null":/\bnull\b/i},Prism.languages.jsonp=Prism.languages.json;
    \ No newline at end of file
    +Prism.languages.json={property:/"(?:\\.|[^\\"\r\n])*"(?=\s*:)/i,string:{pattern:/"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,greedy:!0},number:/-?\d+\.?\d*([Ee][+-]?\d+)?/,punctuation:/[{}[\],]/,operator:/:/g,"boolean":/\b(?:true|false)\b/i,"null":/\bnull\b/i},Prism.languages.jsonp=Prism.languages.json;
    \ No newline at end of file
    diff --git a/tests/languages/json/number_feature.test b/tests/languages/json/number_feature.test
    index ba045ec3d4..ca87a480d5 100644
    --- a/tests/languages/json/number_feature.test
    +++ b/tests/languages/json/number_feature.test
    @@ -4,6 +4,9 @@
     5.0e8
     0.2E+2
     47e-5
    +-1.23
    +-2.34E33
    +-4.34E-33
     
     ----------------------------------------------------
     
    @@ -13,9 +16,12 @@
     	["number", "3.14159"],
     	["number", "5.0e8"],
     	["number", "0.2E+2"],
    -	["number", "47e-5"]
    +	["number", "47e-5"],
    +	["number", "-1.23"],
    +	["number", "-2.34E33"],
    +	["number", "-4.34E-33"]
     ]
     
     ----------------------------------------------------
     
    -Checks for numbers.
    \ No newline at end of file
    +Checks for numbers.
    diff --git a/tests/languages/json/operator_feature.test b/tests/languages/json/operator_feature.test
    new file mode 100644
    index 0000000000..9d30b2e5e6
    --- /dev/null
    +++ b/tests/languages/json/operator_feature.test
    @@ -0,0 +1,11 @@
    +:
    +
    +----------------------------------------------------
    +
    +[
    +	["operator", ":"]
    +]
    +
    +----------------------------------------------------
    +
    +Checks for all operators.
    diff --git a/tests/languages/json/punctuation_feature.test b/tests/languages/json/punctuation_feature.test
    new file mode 100644
    index 0000000000..b8e351cd8e
    --- /dev/null
    +++ b/tests/languages/json/punctuation_feature.test
    @@ -0,0 +1,20 @@
    +{}
    +{ }
    +[]
    +],
    +},
    +,
    +
    +----------------------------------------------------
    +
    +[
    +	["punctuation", "{"],  ["punctuation", "}"],
    +	["punctuation", "{"],  ["punctuation", "}"],
    +	["punctuation", "["],  ["punctuation", "]"],
    +	["punctuation", "]"],  ["punctuation", ","],
    +	["punctuation", "}"],  ["punctuation", ","],
    +	["punctuation", ","]
    +]
    +----------------------------------------------------
    +
    +Checks for punctuation.
    diff --git a/tests/languages/json/string_feature.test b/tests/languages/json/string_feature.test
    index 08ac8c06f7..8dddae58fb 100644
    --- a/tests/languages/json/string_feature.test
    +++ b/tests/languages/json/string_feature.test
    @@ -24,4 +24,4 @@
     
     ----------------------------------------------------
     
    -Checks for strings.
    \ No newline at end of file
    +Checks for strings.
    
    From b1c2f4df0737a5a455a3fc98af4c0da9f6b33aef Mon Sep 17 00:00:00 2001
    From: Michael Schmidt 
    Date: Sat, 21 Jul 2018 21:48:45 +0200
    Subject: [PATCH 0050/1100] Improve download page typography (#1484)
    
    Fix some of the texts from breaking in weird ways.
    ---
     download.html | 40 +++++++++++++++++++++++++++-------------
     download.js   | 14 +++++++++++---
     2 files changed, 38 insertions(+), 16 deletions(-)
    
    diff --git a/download.html b/download.html
    index b6fd7abab4..3b43f8e4ff 100644
    --- a/download.html
    +++ b/download.html
    @@ -11,11 +11,25 @@
     form label {
     	display: block;
     	padding: .2em;
    +	padding-left: 1.9em;
    +	page-break-inside: avoid;
    +	break-inside: avoid;
    +	-webkit-column-break-inside: avoid;
     }
     
    -form input {
    -	margin-right: .7em;
    -}
    +	form label .name {
    +		margin-right: .3em;
    +	}
    +
    +	form label a.owner {
    +		margin-left: 0;
    +		hyphens: none;
    +	}
    +
    +	form label input {
    +		margin-right: .7em;
    +		margin-left: -1.7em;
    +	}
     
     form > p:first-of-type > label {
     	font-size: 150%;
    @@ -24,7 +38,7 @@
     	form > p:first-of-type > label input {
     		vertical-align: .3em;
     	}
    -	
    +
     .filesize:empty {
     	display: none;
     }
    @@ -113,7 +127,7 @@
     		border-top-right-radius: 0;
     		border-bottom-right-radius: 0;
     	}
    -	
    +
     	#download-css .download-button {
     		background-color: #dc9e23;
     		border-top-left-radius: 0;
    @@ -129,7 +143,7 @@
     
     
    - +

    Customize your download

    Select your compression level, as well as the languages and plugins you need.

    @@ -141,29 +155,29 @@

    Customize your download

    - +
    - +

    Total filesize: ( JavaScript + CSS)

    Note: The filesizes displayed refer to non-gizipped files and include any CSS code required. The CSS code is not minified.

    - +
    Download JS
    - +
    Download CSS
    - + - +
    @@ -176,4 +190,4 @@

    Customize your download

    - \ No newline at end of file + diff --git a/download.js b/download.js index 5db493a06c..7bc05d09de 100644 --- a/download.js +++ b/download.js @@ -220,10 +220,18 @@ for (var category in components) { all.meta.link? { tag: 'a', properties: { - href: all.meta.link.replace(/\{id}/g, id) + href: all.meta.link.replace(/\{id}/g, id), + className: 'name' }, contents: info.title - } : info.title, + } : { + tag: 'span', + properties: { + className: 'name' + }, + contents: info.title + }, + ' ', all[id].owner? { tag: 'a', properties: { @@ -574,4 +582,4 @@ function getVersion() { }); } -})(); \ No newline at end of file +})(); From 9d15ff6ee48f2e8b9df836832590070855d969d1 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Sun, 22 Jul 2018 05:47:02 +0200 Subject: [PATCH 0051/1100] Fixed peer dependencies in download page (#1491) Update the download page to properly order components when they have peer dependencies. --- download.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/download.js b/download.js index 7bc05d09de..494b6e38e1 100644 --- a/download.js +++ b/download.js @@ -143,6 +143,7 @@ for (var category in components) { enabled: checked, require: $u.type(all[id].require) === 'string' ? [all[id].require] : all[id].require, after: $u.type(all[id].after) === 'string' ? [all[id].after] : all[id].after, + peerDependencies: $u.type(all[id].peerDependencies) === 'string' ? [all[id].peerDependencies] : all[id].peerDependencies, owner: all[id].owner, files: { minified: { @@ -465,8 +466,8 @@ function getSortedComponents(components, requireName, sorted) { return sorted; } -function getSortedComponentsByRequirements(components){ - var sorted = getSortedComponents(components, "after"); +function getSortedComponentsByRequirements(components, afterName) { + var sorted = getSortedComponents(components, afterName); return getSortedComponents(components, "require", sorted); } @@ -478,7 +479,7 @@ function generateCode(){ var all = components[category]; // In case if one component requires other, required component should go first. - var sorted = getSortedComponentsByRequirements(all); + var sorted = getSortedComponentsByRequirements(all, category === 'languages' ? 'peerDependencies' : 'after'); for (var i = 0; i < sorted.length; i++) { var id = sorted[i]; From 9dfec340c7af37d21f5812fe1ceb4ae00a22d65a Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Sat, 18 Aug 2018 22:04:51 +0200 Subject: [PATCH 0052/1100] `insertBefore` now correctly updates references (#1531) Removes some workarounds for misplacing the reference when using `insertBefore`. --- components/prism-core.js | 7 +++++-- components/prism-core.min.js | 2 +- components/prism-javascript.js | 3 +-- components/prism-javascript.min.js | 2 +- components/prism-php.js | 22 ++++++++++------------ components/prism-php.min.js | 2 +- prism.js | 10 ++++++---- 7 files changed, 25 insertions(+), 23 deletions(-) diff --git a/components/prism-core.js b/components/prism-core.js index 29330e5533..0ff3bbf38c 100644 --- a/components/prism-core.js +++ b/components/prism-core.js @@ -138,14 +138,17 @@ var _ = _self.Prism = { } } + var old = root[inside]; + root[inside] = ret; + // Update references in other language definitions _.languages.DFS(_.languages, function(key, value) { - if (value === root[inside] && key != inside) { + if (value === old && key != inside) { this[key] = ret; } }); - return root[inside] = ret; + return ret; }, // Traverse a language definition with Depth First Search diff --git a/components/prism-core.min.js b/components/prism-core.min.js index a42f5da40a..1256177db7 100644 --- a/components/prism-core.min.js +++ b/components/prism-core.min.js @@ -1 +1 @@ -var _self="undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{},Prism=function(){var e=/\blang(?:uage)?-([\w-]+)\b/i,t=0,n=_self.Prism={manual:_self.Prism&&_self.Prism.manual,disableWorkerMessageHandler:_self.Prism&&_self.Prism.disableWorkerMessageHandler,util:{encode:function(e){return e instanceof r?new r(e.type,n.util.encode(e.content),e.alias):"Array"===n.util.type(e)?e.map(n.util.encode):e.replace(/&/g,"&").replace(/e.length)return;if(!(w instanceof s)){if(m&&b!=t.length-1){h.lastIndex=k;var _=h.exec(e);if(!_)break;for(var j=_.index+(d?_[1].length:0),P=_.index+_[0].length,A=b,x=k,O=t.length;O>A&&(P>x||!t[A].type&&!t[A-1].greedy);++A)x+=t[A].length,j>=x&&(++b,k=x);if(t[b]instanceof s)continue;I=A-b,w=e.slice(k,x),_.index-=k}else{h.lastIndex=0;var _=h.exec(w),I=1}if(_){d&&(p=_[1]?_[1].length:0);var j=_.index+p,_=_[0].slice(p),P=j+_.length,N=w.slice(0,j),S=w.slice(P),C=[b,I];N&&(++b,k+=N.length,C.push(N));var E=new s(u,f?n.tokenize(_,f):_,y,_,m);if(C.push(E),S&&C.push(S),Array.prototype.splice.apply(t,C),1!=I&&n.matchGrammar(e,t,r,b,k,!0,u),i)break}else if(i)break}}}}},tokenize:function(e,t){var r=[e],a=t.rest;if(a){for(var l in a)t[l]=a[l];delete t.rest}return n.matchGrammar(e,r,t,0,0,!1),r},hooks:{all:{},add:function(e,t){var r=n.hooks.all;r[e]=r[e]||[],r[e].push(t)},run:function(e,t){var r=n.hooks.all[e];if(r&&r.length)for(var a,l=0;a=r[l++];)a(t)}}},r=n.Token=function(e,t,n,r,a){this.type=e,this.content=t,this.alias=n,this.length=0|(r||"").length,this.greedy=!!a};if(r.stringify=function(e,t,a){if("string"==typeof e)return e;if("Array"===n.util.type(e))return e.map(function(n){return r.stringify(n,t,e)}).join("");var l={type:e.type,content:r.stringify(e.content,t,a),tag:"span",classes:["token",e.type],attributes:{},language:t,parent:a};if(e.alias){var i="Array"===n.util.type(e.alias)?e.alias:[e.alias];Array.prototype.push.apply(l.classes,i)}n.hooks.run("wrap",l);var o=Object.keys(l.attributes).map(function(e){return e+'="'+(l.attributes[e]||"").replace(/"/g,""")+'"'}).join(" ");return"<"+l.tag+' class="'+l.classes.join(" ")+'"'+(o?" "+o:"")+">"+l.content+""},!_self.document)return _self.addEventListener?(n.disableWorkerMessageHandler||_self.addEventListener("message",function(e){var t=JSON.parse(e.data),r=t.language,a=t.code,l=t.immediateClose;_self.postMessage(n.highlight(a,n.languages[r],r)),l&&_self.close()},!1),_self.Prism):_self.Prism;var a=document.currentScript||[].slice.call(document.getElementsByTagName("script")).pop();return a&&(n.filename=a.src,n.manual||a.hasAttribute("data-manual")||("loading"!==document.readyState?window.requestAnimationFrame?window.requestAnimationFrame(n.highlightAll):window.setTimeout(n.highlightAll,16):document.addEventListener("DOMContentLoaded",n.highlightAll))),_self.Prism}();"undefined"!=typeof module&&module.exports&&(module.exports=Prism),"undefined"!=typeof global&&(global.Prism=Prism); \ No newline at end of file +var _self="undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{},Prism=function(){var e=/\blang(?:uage)?-([\w-]+)\b/i,t=0,n=_self.Prism={manual:_self.Prism&&_self.Prism.manual,disableWorkerMessageHandler:_self.Prism&&_self.Prism.disableWorkerMessageHandler,util:{encode:function(e){return e instanceof r?new r(e.type,n.util.encode(e.content),e.alias):"Array"===n.util.type(e)?e.map(n.util.encode):e.replace(/&/g,"&").replace(/e.length)return;if(!(w instanceof s)){if(m&&b!=t.length-1){h.lastIndex=k;var _=h.exec(e);if(!_)break;for(var j=_.index+(d?_[1].length:0),P=_.index+_[0].length,A=b,x=k,O=t.length;O>A&&(P>x||!t[A].type&&!t[A-1].greedy);++A)x+=t[A].length,j>=x&&(++b,k=x);if(t[b]instanceof s)continue;I=A-b,w=e.slice(k,x),_.index-=k}else{h.lastIndex=0;var _=h.exec(w),I=1}if(_){d&&(p=_[1]?_[1].length:0);var j=_.index+p,_=_[0].slice(p),P=j+_.length,N=w.slice(0,j),S=w.slice(P),C=[b,I];N&&(++b,k+=N.length,C.push(N));var E=new s(u,f?n.tokenize(_,f):_,y,_,m);if(C.push(E),S&&C.push(S),Array.prototype.splice.apply(t,C),1!=I&&n.matchGrammar(e,t,r,b,k,!0,u),i)break}else if(i)break}}}}},tokenize:function(e,t){var r=[e],a=t.rest;if(a){for(var l in a)t[l]=a[l];delete t.rest}return n.matchGrammar(e,r,t,0,0,!1),r},hooks:{all:{},add:function(e,t){var r=n.hooks.all;r[e]=r[e]||[],r[e].push(t)},run:function(e,t){var r=n.hooks.all[e];if(r&&r.length)for(var a,l=0;a=r[l++];)a(t)}}},r=n.Token=function(e,t,n,r,a){this.type=e,this.content=t,this.alias=n,this.length=0|(r||"").length,this.greedy=!!a};if(r.stringify=function(e,t,a){if("string"==typeof e)return e;if("Array"===n.util.type(e))return e.map(function(n){return r.stringify(n,t,e)}).join("");var l={type:e.type,content:r.stringify(e.content,t,a),tag:"span",classes:["token",e.type],attributes:{},language:t,parent:a};if(e.alias){var i="Array"===n.util.type(e.alias)?e.alias:[e.alias];Array.prototype.push.apply(l.classes,i)}n.hooks.run("wrap",l);var o=Object.keys(l.attributes).map(function(e){return e+'="'+(l.attributes[e]||"").replace(/"/g,""")+'"'}).join(" ");return"<"+l.tag+' class="'+l.classes.join(" ")+'"'+(o?" "+o:"")+">"+l.content+""},!_self.document)return _self.addEventListener?(n.disableWorkerMessageHandler||_self.addEventListener("message",function(e){var t=JSON.parse(e.data),r=t.language,a=t.code,l=t.immediateClose;_self.postMessage(n.highlight(a,n.languages[r],r)),l&&_self.close()},!1),_self.Prism):_self.Prism;var a=document.currentScript||[].slice.call(document.getElementsByTagName("script")).pop();return a&&(n.filename=a.src,n.manual||a.hasAttribute("data-manual")||("loading"!==document.readyState?window.requestAnimationFrame?window.requestAnimationFrame(n.highlightAll):window.setTimeout(n.highlightAll,16):document.addEventListener("DOMContentLoaded",n.highlightAll))),_self.Prism}();"undefined"!=typeof module&&module.exports&&(module.exports=Prism),"undefined"!=typeof global&&(global.Prism=Prism); \ No newline at end of file diff --git a/components/prism-javascript.js b/components/prism-javascript.js index 7800a7d424..0cad213357 100644 --- a/components/prism-javascript.js +++ b/components/prism-javascript.js @@ -32,14 +32,13 @@ Prism.languages.insertBefore('javascript', 'string', { pattern: /^\${|}$/, alias: 'punctuation' }, - rest: null // See below + rest: Prism.languages.javascript } }, 'string': /[\s\S]+/ } } }); -Prism.languages.javascript['template-string'].inside['interpolation'].inside.rest = Prism.languages.javascript; if (Prism.languages.markup) { Prism.languages.insertBefore('markup', 'tag', { diff --git a/components/prism-javascript.min.js b/components/prism-javascript.min.js index 50a4d54f80..8551a48dd7 100644 --- a/components/prism-javascript.min.js +++ b/components/prism-javascript.min.js @@ -1 +1 @@ -Prism.languages.javascript=Prism.languages.extend("clike",{keyword:/\b(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|var|void|while|with|yield)\b/,number:/\b(?:0[xX][\dA-Fa-f]+|0[bB][01]+|0[oO][0-7]+|NaN|Infinity)\b|(?:\b\d+\.?\d*|\B\.\d+)(?:[Ee][+-]?\d+)?/,"function":/[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*\()/i,operator:/-[-=]?|\+[+=]?|!=?=?|<>?>?=?|=(?:==?|>)?|&[&=]?|\|[|=]?|\*\*?=?|\/=?|~|\^=?|%=?|\?|\.{3}/}),Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s])\s*)\/(\[[^\]\r\n]+]|\\.|[^\/\\\[\r\n])+\/[gimyu]{0,5}(?=\s*($|[\r\n,.;})\]]))/,lookbehind:!0,greedy:!0},"function-variable":{pattern:/[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*=\s*(?:function\b|(?:\([^()]*\)|[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/i,alias:"function"},constant:/\b[A-Z][A-Z\d_]*\b/}),Prism.languages.insertBefore("javascript","string",{"template-string":{pattern:/`(?:\\[\s\S]|\${[^}]+}|[^\\`])*`/,greedy:!0,inside:{interpolation:{pattern:/\${[^}]+}/,inside:{"interpolation-punctuation":{pattern:/^\${|}$/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}}}),Prism.languages.javascript["template-string"].inside.interpolation.inside.rest=Prism.languages.javascript,Prism.languages.markup&&Prism.languages.insertBefore("markup","tag",{script:{pattern:/()[\s\S]*?(?=<\/script>)/i,lookbehind:!0,inside:Prism.languages.javascript,alias:"language-javascript",greedy:!0}}),Prism.languages.js=Prism.languages.javascript; \ No newline at end of file +Prism.languages.javascript=Prism.languages.extend("clike",{keyword:/\b(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|var|void|while|with|yield)\b/,number:/\b(?:0[xX][\dA-Fa-f]+|0[bB][01]+|0[oO][0-7]+|NaN|Infinity)\b|(?:\b\d+\.?\d*|\B\.\d+)(?:[Ee][+-]?\d+)?/,"function":/[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*\()/i,operator:/-[-=]?|\+[+=]?|!=?=?|<>?>?=?|=(?:==?|>)?|&[&=]?|\|[|=]?|\*\*?=?|\/=?|~|\^=?|%=?|\?|\.{3}/}),Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s])\s*)\/(\[[^\]\r\n]+]|\\.|[^\/\\\[\r\n])+\/[gimyu]{0,5}(?=\s*($|[\r\n,.;})\]]))/,lookbehind:!0,greedy:!0},"function-variable":{pattern:/[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*=\s*(?:function\b|(?:\([^()]*\)|[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/i,alias:"function"},constant:/\b[A-Z][A-Z\d_]*\b/}),Prism.languages.insertBefore("javascript","string",{"template-string":{pattern:/`(?:\\[\s\S]|\${[^}]+}|[^\\`])*`/,greedy:!0,inside:{interpolation:{pattern:/\${[^}]+}/,inside:{"interpolation-punctuation":{pattern:/^\${|}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}}}),Prism.languages.markup&&Prism.languages.insertBefore("markup","tag",{script:{pattern:/()[\s\S]*?(?=<\/script>)/i,lookbehind:!0,inside:Prism.languages.javascript,alias:"language-javascript",greedy:!0}}),Prism.languages.js=Prism.languages.javascript; \ No newline at end of file diff --git a/components/prism-php.js b/components/prism-php.js index 8302ecb535..36899f16af 100644 --- a/components/prism-php.js +++ b/components/prism-php.js @@ -51,6 +51,14 @@ } }); + var string_interpolation = { + pattern: /{\$(?:{(?:{[^{}]+}|[^{}]+)}|[^{}])+}|(^|[^\\{])\$+(?:\w+(?:\[.+?]|->\w+)*)/, + lookbehind: true, + inside: { + rest: Prism.languages.php + } + }; + Prism.languages.insertBefore('php', 'string', { 'nowdoc-string': { pattern: /<<<'([^']+)'(?:\r\n?|\n)(?:.*(?:\r\n?|\n))*?\1;/, @@ -78,7 +86,7 @@ 'punctuation': /^<<<"?|[";]$/ } }, - 'interpolation': null // See below + 'interpolation': string_interpolation // See below } }, 'single-quoted-string': { @@ -91,23 +99,13 @@ greedy: true, alias: 'string', inside: { - 'interpolation': null // See below + 'interpolation': string_interpolation // See below } } }); // The different types of PHP strings "replace" the C-like standard string delete Prism.languages.php['string']; - var string_interpolation = { - pattern: /{\$(?:{(?:{[^{}]+}|[^{}]+)}|[^{}])+}|(^|[^\\{])\$+(?:\w+(?:\[.+?]|->\w+)*)/, - lookbehind: true, - inside: { - rest: Prism.languages.php - } - }; - Prism.languages.php['heredoc-string'].inside['interpolation'] = string_interpolation; - Prism.languages.php['double-quoted-string'].inside['interpolation'] = string_interpolation; - Prism.hooks.add('before-tokenize', function(env) { if (!/(?:<\?php|<\?)/ig.test(env.code)) { return; diff --git a/components/prism-php.min.js b/components/prism-php.min.js index a4c2efbeef..03260d4808 100644 --- a/components/prism-php.min.js +++ b/components/prism-php.min.js @@ -1 +1 @@ -!function(e){e.languages.php=e.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:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0}}),e.languages.insertBefore("php","string",{"shell-comment":{pattern:/(^|[^\\])#.*/,lookbehind:!0,alias:"comment"}}),e.languages.insertBefore("php","keyword",{delimiter:{pattern:/\?>|<\?(?:php|=)?/i,alias:"important"},variable:/\$+(?:\w+\b|(?={))/i,"package":{pattern:/(\\|namespace\s+|use\s+)[\w\\]+/,lookbehind:!0,inside:{punctuation:/\\/}}}),e.languages.insertBefore("php","operator",{property:{pattern:/(->)[\w]+/,lookbehind:!0}}),e.languages.insertBefore("php","string",{"nowdoc-string":{pattern:/<<<'([^']+)'(?:\r\n?|\n)(?:.*(?:\r\n?|\n))*?\1;/,greedy:!0,alias:"string",inside:{delimiter:{pattern:/^<<<'[^']+'|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<'?|[';]$/}}}},"heredoc-string":{pattern:/<<<(?:"([^"]+)"(?:\r\n?|\n)(?:.*(?:\r\n?|\n))*?\1;|([a-z_]\w*)(?:\r\n?|\n)(?:.*(?:\r\n?|\n))*?\2;)/i,greedy:!0,alias:"string",inside:{delimiter:{pattern:/^<<<(?:"[^"]+"|[a-z_]\w*)|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<"?|[";]$/}},interpolation:null}},"single-quoted-string":{pattern:/'(?:\\[\s\S]|[^\\'])*'/,greedy:!0,alias:"string"},"double-quoted-string":{pattern:/"(?:\\[\s\S]|[^\\"])*"/,greedy:!0,alias:"string",inside:{interpolation:null}}}),delete e.languages.php.string;var n={pattern:/{\$(?:{(?:{[^{}]+}|[^{}]+)}|[^{}])+}|(^|[^\\{])\$+(?:\w+(?:\[.+?]|->\w+)*)/,lookbehind:!0,inside:{rest:e.languages.php}};e.languages.php["heredoc-string"].inside.interpolation=n,e.languages.php["double-quoted-string"].inside.interpolation=n,e.hooks.add("before-tokenize",function(n){if(/(?:<\?php|<\?)/gi.test(n.code)){var i=/(?:<\?php|<\?)[\s\S]*?(?:\?>|$)/gi;e.languages["markup-templating"].buildPlaceholders(n,"php",i)}}),e.hooks.add("after-tokenize",function(n){e.languages["markup-templating"].tokenizePlaceholders(n,"php")})}(Prism); \ No newline at end of file +!function(e){e.languages.php=e.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:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0}}),e.languages.insertBefore("php","string",{"shell-comment":{pattern:/(^|[^\\])#.*/,lookbehind:!0,alias:"comment"}}),e.languages.insertBefore("php","keyword",{delimiter:{pattern:/\?>|<\?(?:php|=)?/i,alias:"important"},variable:/\$+(?:\w+\b|(?={))/i,"package":{pattern:/(\\|namespace\s+|use\s+)[\w\\]+/,lookbehind:!0,inside:{punctuation:/\\/}}}),e.languages.insertBefore("php","operator",{property:{pattern:/(->)[\w]+/,lookbehind:!0}});var n={pattern:/{\$(?:{(?:{[^{}]+}|[^{}]+)}|[^{}])+}|(^|[^\\{])\$+(?:\w+(?:\[.+?]|->\w+)*)/,lookbehind:!0,inside:{rest:e.languages.php}};e.languages.insertBefore("php","string",{"nowdoc-string":{pattern:/<<<'([^']+)'(?:\r\n?|\n)(?:.*(?:\r\n?|\n))*?\1;/,greedy:!0,alias:"string",inside:{delimiter:{pattern:/^<<<'[^']+'|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<'?|[';]$/}}}},"heredoc-string":{pattern:/<<<(?:"([^"]+)"(?:\r\n?|\n)(?:.*(?:\r\n?|\n))*?\1;|([a-z_]\w*)(?:\r\n?|\n)(?:.*(?:\r\n?|\n))*?\2;)/i,greedy:!0,alias:"string",inside:{delimiter:{pattern:/^<<<(?:"[^"]+"|[a-z_]\w*)|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<"?|[";]$/}},interpolation:n}},"single-quoted-string":{pattern:/'(?:\\[\s\S]|[^\\'])*'/,greedy:!0,alias:"string"},"double-quoted-string":{pattern:/"(?:\\[\s\S]|[^\\"])*"/,greedy:!0,alias:"string",inside:{interpolation:n}}}),delete e.languages.php.string,e.hooks.add("before-tokenize",function(n){if(/(?:<\?php|<\?)/gi.test(n.code)){var t=/(?:<\?php|<\?)[\s\S]*?(?:\?>|$)/gi;e.languages["markup-templating"].buildPlaceholders(n,"php",t)}}),e.hooks.add("after-tokenize",function(n){e.languages["markup-templating"].tokenizePlaceholders(n,"php")})}(Prism); \ No newline at end of file diff --git a/prism.js b/prism.js index 2baadce878..0ce19ab429 100644 --- a/prism.js +++ b/prism.js @@ -143,14 +143,17 @@ var _ = _self.Prism = { } } + var old = root[inside]; + root[inside] = ret; + // Update references in other language definitions _.languages.DFS(_.languages, function(key, value) { - if (value === root[inside] && key != inside) { + if (value === old && key != inside) { this[key] = ret; } }); - return root[inside] = ret; + return ret; }, // Traverse a language definition with Depth First Search @@ -755,14 +758,13 @@ Prism.languages.insertBefore('javascript', 'string', { pattern: /^\${|}$/, alias: 'punctuation' }, - rest: null // See below + rest: Prism.languages.javascript } }, 'string': /[\s\S]+/ } } }); -Prism.languages.javascript['template-string'].inside['interpolation'].inside.rest = Prism.languages.javascript; if (Prism.languages.markup) { Prism.languages.insertBefore('markup', 'tag', { From ebd1b9a603dc34e58433eacde151bf9a74afd876 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Sun, 19 Aug 2018 16:06:34 +0200 Subject: [PATCH 0053/1100] Fix regex for `catch` and `finally` (#1527) When called as methods on a promise chain, the current regex would mark `catch` and `finally` as keywords. This regex improvement ensures they're only caught as part of a `try / catch` block, and are marked as functions as part of the promise chain. --- components/prism-javascript.js | 10 +++++- components/prism-javascript.min.js | 2 +- prism.js | 10 +++++- tests/languages/javascript/issue1526.test | 35 +++++++++++++++++++ .../languages/javascript/keyword_feature.test | 17 +++++---- .../javascript/try-catch_feature.test | 22 ++++++++++++ 6 files changed, 86 insertions(+), 10 deletions(-) create mode 100644 tests/languages/javascript/issue1526.test create mode 100644 tests/languages/javascript/try-catch_feature.test diff --git a/components/prism-javascript.js b/components/prism-javascript.js index 0cad213357..47853d3e0b 100644 --- a/components/prism-javascript.js +++ b/components/prism-javascript.js @@ -1,11 +1,19 @@ Prism.languages.javascript = Prism.languages.extend('clike', { - 'keyword': /\b(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|var|void|while|with|yield)\b/, + 'keyword': [ + { + pattern: /((?:^|})\s*)(?:catch|finally)\b/, + lookbehind: true + }, + /\b(?:as|async|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|var|void|while|with|yield)\b/ + ], 'number': /\b(?:0[xX][\dA-Fa-f]+|0[bB][01]+|0[oO][0-7]+|NaN|Infinity)\b|(?:\b\d+\.?\d*|\B\.\d+)(?:[Ee][+-]?\d+)?/, // Allow for all non-ASCII characters (See http://stackoverflow.com/a/2008444) 'function': /[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*\()/i, 'operator': /-[-=]?|\+[+=]?|!=?=?|<>?>?=?|=(?:==?|>)?|&[&=]?|\|[|=]?|\*\*?=?|\/=?|~|\^=?|%=?|\?|\.{3}/ }); +Prism.languages.javascript['class-name'].pattern = /(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/ + Prism.languages.insertBefore('javascript', 'keyword', { 'regex': { pattern: /((?:^|[^$\w\xA0-\uFFFF."'\])\s])\s*)\/(\[[^\]\r\n]+]|\\.|[^/\\\[\r\n])+\/[gimyu]{0,5}(?=\s*($|[\r\n,.;})\]]))/, diff --git a/components/prism-javascript.min.js b/components/prism-javascript.min.js index 8551a48dd7..29cfee7d0a 100644 --- a/components/prism-javascript.min.js +++ b/components/prism-javascript.min.js @@ -1 +1 @@ -Prism.languages.javascript=Prism.languages.extend("clike",{keyword:/\b(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|var|void|while|with|yield)\b/,number:/\b(?:0[xX][\dA-Fa-f]+|0[bB][01]+|0[oO][0-7]+|NaN|Infinity)\b|(?:\b\d+\.?\d*|\B\.\d+)(?:[Ee][+-]?\d+)?/,"function":/[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*\()/i,operator:/-[-=]?|\+[+=]?|!=?=?|<>?>?=?|=(?:==?|>)?|&[&=]?|\|[|=]?|\*\*?=?|\/=?|~|\^=?|%=?|\?|\.{3}/}),Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s])\s*)\/(\[[^\]\r\n]+]|\\.|[^\/\\\[\r\n])+\/[gimyu]{0,5}(?=\s*($|[\r\n,.;})\]]))/,lookbehind:!0,greedy:!0},"function-variable":{pattern:/[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*=\s*(?:function\b|(?:\([^()]*\)|[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/i,alias:"function"},constant:/\b[A-Z][A-Z\d_]*\b/}),Prism.languages.insertBefore("javascript","string",{"template-string":{pattern:/`(?:\\[\s\S]|\${[^}]+}|[^\\`])*`/,greedy:!0,inside:{interpolation:{pattern:/\${[^}]+}/,inside:{"interpolation-punctuation":{pattern:/^\${|}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}}}),Prism.languages.markup&&Prism.languages.insertBefore("markup","tag",{script:{pattern:/()[\s\S]*?(?=<\/script>)/i,lookbehind:!0,inside:Prism.languages.javascript,alias:"language-javascript",greedy:!0}}),Prism.languages.js=Prism.languages.javascript; \ No newline at end of file +Prism.languages.javascript=Prism.languages.extend("clike",{keyword:[{pattern:/((?:^|})\s*)(?:catch|finally)\b/,lookbehind:!0},/\b(?:as|async|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|var|void|while|with|yield)\b/],number:/\b(?:0[xX][\dA-Fa-f]+|0[bB][01]+|0[oO][0-7]+|NaN|Infinity)\b|(?:\b\d+\.?\d*|\B\.\d+)(?:[Ee][+-]?\d+)?/,"function":/[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*\()/i,operator:/-[-=]?|\+[+=]?|!=?=?|<>?>?=?|=(?:==?|>)?|&[&=]?|\|[|=]?|\*\*?=?|\/=?|~|\^=?|%=?|\?|\.{3}/}),Prism.languages.javascript["class-name"].pattern=/(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/,Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s])\s*)\/(\[[^\]\r\n]+]|\\.|[^\/\\\[\r\n])+\/[gimyu]{0,5}(?=\s*($|[\r\n,.;})\]]))/,lookbehind:!0,greedy:!0},"function-variable":{pattern:/[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*=\s*(?:function\b|(?:\([^()]*\)|[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/i,alias:"function"},constant:/\b[A-Z][A-Z\d_]*\b/}),Prism.languages.insertBefore("javascript","string",{"template-string":{pattern:/`(?:\\[\s\S]|\${[^}]+}|[^\\`])*`/,greedy:!0,inside:{interpolation:{pattern:/\${[^}]+}/,inside:{"interpolation-punctuation":{pattern:/^\${|}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}}}),Prism.languages.markup&&Prism.languages.insertBefore("markup","tag",{script:{pattern:/()[\s\S]*?(?=<\/script>)/i,lookbehind:!0,inside:Prism.languages.javascript,alias:"language-javascript",greedy:!0}}),Prism.languages.js=Prism.languages.javascript; \ No newline at end of file diff --git a/prism.js b/prism.js index 0ce19ab429..b48a825af2 100644 --- a/prism.js +++ b/prism.js @@ -725,13 +725,21 @@ Prism.languages.clike = { ********************************************** */ Prism.languages.javascript = Prism.languages.extend('clike', { - 'keyword': /\b(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|var|void|while|with|yield)\b/, + 'keyword': [ + { + pattern: /((?:^|})\s*)(?:catch|finally)\b/, + lookbehind: true + }, + /\b(?:as|async|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|var|void|while|with|yield)\b/ + ], 'number': /\b(?:0[xX][\dA-Fa-f]+|0[bB][01]+|0[oO][0-7]+|NaN|Infinity)\b|(?:\b\d+\.?\d*|\B\.\d+)(?:[Ee][+-]?\d+)?/, // Allow for all non-ASCII characters (See http://stackoverflow.com/a/2008444) 'function': /[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*\()/i, 'operator': /-[-=]?|\+[+=]?|!=?=?|<>?>?=?|=(?:==?|>)?|&[&=]?|\|[|=]?|\*\*?=?|\/=?|~|\^=?|%=?|\?|\.{3}/ }); +Prism.languages.javascript['class-name'].pattern = /(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/ + Prism.languages.insertBefore('javascript', 'keyword', { 'regex': { pattern: /((?:^|[^$\w\xA0-\uFFFF."'\])\s])\s*)\/(\[[^\]\r\n]+]|\\.|[^/\\\[\r\n])+\/[gimyu]{0,5}(?=\s*($|[\r\n,.;})\]]))/, diff --git a/tests/languages/javascript/issue1526.test b/tests/languages/javascript/issue1526.test new file mode 100644 index 0000000000..d361155e41 --- /dev/null +++ b/tests/languages/javascript/issue1526.test @@ -0,0 +1,35 @@ +fetch('some-resource.json') + .then(response => response.json()) + .catch(console.error); + +---------------------------------------------------- + +[ + ["function", "fetch"], + ["punctuation", "("], + ["string", "'some-resource.json'"], + ["punctuation", ")"], + ["punctuation", "."], + ["function", "then"], + ["punctuation", "("], + "response ", + ["operator", "=>"], + " response", + ["punctuation", "."], + ["function", "json"], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", ")"], + ["punctuation", "."], + ["function", "catch"], + ["punctuation", "("], + "console", + ["punctuation", "."], + "error", + ["punctuation", ")"], + ["punctuation", ";"] +] + +---------------------------------------------------- + +Checks for catch function which is not a keyword. See #1526 diff --git a/tests/languages/javascript/keyword_feature.test b/tests/languages/javascript/keyword_feature.test index 13b88875d0..8053f2b1b3 100644 --- a/tests/languages/javascript/keyword_feature.test +++ b/tests/languages/javascript/keyword_feature.test @@ -1,24 +1,28 @@ +catch finally; + as; async; await; break; case; -catch; class; const; continue; debugger; +class; const; continue; debugger; default; delete; do; else; enum; -export; extends; finally; for; +export; extends; for; from; function; get; if; implements; import; in; instanceof; interface; let; new; null; of; package; private; protected; public; return; set; static; -super; switch; this; throw; -try; typeof; var; void; while; +super; switch; this; throw; try; +typeof; var; void; while; with; yield; ---------------------------------------------------- [ + ["keyword", "catch"], + ["keyword", "finally"], ["punctuation", ";"], + ["keyword", "as"], ["punctuation", ";"], ["keyword", "async"], ["punctuation", ";"], ["keyword", "await"], ["punctuation", ";"], ["keyword", "break"], ["punctuation", ";"], ["keyword", "case"], ["punctuation", ";"], - ["keyword", "catch"], ["punctuation", ";"], ["keyword", "class"], ["punctuation", ";"], ["keyword", "const"], ["punctuation", ";"], ["keyword", "continue"], ["punctuation", ";"], @@ -30,7 +34,6 @@ with; yield; ["keyword", "enum"], ["punctuation", ";"], ["keyword", "export"], ["punctuation", ";"], ["keyword", "extends"], ["punctuation", ";"], - ["keyword", "finally"], ["punctuation", ";"], ["keyword", "for"], ["punctuation", ";"], ["keyword", "from"], ["punctuation", ";"], ["keyword", "function"], ["punctuation", ";"], @@ -67,4 +70,4 @@ with; yield; ---------------------------------------------------- -Checks for all keywords. \ No newline at end of file +Checks for all keywords. diff --git a/tests/languages/javascript/try-catch_feature.test b/tests/languages/javascript/try-catch_feature.test new file mode 100644 index 0000000000..c4bbd8b2b8 --- /dev/null +++ b/tests/languages/javascript/try-catch_feature.test @@ -0,0 +1,22 @@ +try { } catch (e) { } finally { } + +---------------------------------------------------- + +[ + ["keyword", "try"], + ["punctuation", "{"], + ["punctuation", "}"], + ["keyword", "catch"], + ["punctuation", "("], + "e", + ["punctuation", ")"], + ["punctuation", "{"], + ["punctuation", "}"], + ["keyword", "finally"], + ["punctuation", "{"], + ["punctuation", "}"] +] + +---------------------------------------------------- + +Checks for try statements. \ No newline at end of file From 44fed4d30911c4184448590b90e95fd20459bc10 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Sun, 19 Aug 2018 16:10:29 +0200 Subject: [PATCH 0054/1100] Replaced all occurrences of `new RegExp` with `RegExp` (#1493) Using the factory vs constructor form is the same, so removing `new` results in less code. --- components/prism-http.js | 2 +- components/prism-http.min.js | 2 +- components/prism-lisp.js | 46 +++++++++---------- components/prism-lisp.min.js | 2 +- .../prism-normalize-whitespace.js | 6 +-- .../prism-normalize-whitespace.min.js | 2 +- 6 files changed, 30 insertions(+), 30 deletions(-) diff --git a/components/prism-http.js b/components/prism-http.js index 82bfed78c8..306bcd8c5d 100644 --- a/components/prism-http.js +++ b/components/prism-http.js @@ -39,7 +39,7 @@ for (var contentType in httpLanguages) { if (httpLanguages[contentType]) { var options = {}; options[contentType] = { - pattern: new RegExp('(content-type:\\s*' + contentType + '[\\w\\W]*?)(?:\\r?\\n|\\r){2}[\\w\\W]*', 'i'), + pattern: RegExp('(content-type:\\s*' + contentType + '[\\w\\W]*?)(?:\\r?\\n|\\r){2}[\\w\\W]*', 'i'), lookbehind: true, inside: { rest: httpLanguages[contentType] diff --git a/components/prism-http.min.js b/components/prism-http.min.js index 0db32ce3f1..8b2c7eed07 100644 --- a/components/prism-http.min.js +++ b/components/prism-http.min.js @@ -1 +1 @@ -Prism.languages.http={"request-line":{pattern:/^(?:POST|GET|PUT|DELETE|OPTIONS|PATCH|TRACE|CONNECT)\s(?:https?:\/\/|\/)\S+\sHTTP\/[0-9.]+/m,inside:{property:/^(?:POST|GET|PUT|DELETE|OPTIONS|PATCH|TRACE|CONNECT)\b/,"attr-name":/:\w+/}},"response-status":{pattern:/^HTTP\/1.[01] \d+.*/m,inside:{property:{pattern:/(^HTTP\/1.[01] )\d+.*/i,lookbehind:!0}}},"header-name":{pattern:/^[\w-]+:(?=.)/m,alias:"keyword"}};var httpLanguages={"application/json":Prism.languages.javascript,"application/xml":Prism.languages.markup,"text/xml":Prism.languages.markup,"text/html":Prism.languages.markup};for(var contentType in httpLanguages)if(httpLanguages[contentType]){var options={};options[contentType]={pattern:new RegExp("(content-type:\\s*"+contentType+"[\\w\\W]*?)(?:\\r?\\n|\\r){2}[\\w\\W]*","i"),lookbehind:!0,inside:{rest:httpLanguages[contentType]}},Prism.languages.insertBefore("http","header-name",options)} \ No newline at end of file +Prism.languages.http={"request-line":{pattern:/^(?:POST|GET|PUT|DELETE|OPTIONS|PATCH|TRACE|CONNECT)\s(?:https?:\/\/|\/)\S+\sHTTP\/[0-9.]+/m,inside:{property:/^(?:POST|GET|PUT|DELETE|OPTIONS|PATCH|TRACE|CONNECT)\b/,"attr-name":/:\w+/}},"response-status":{pattern:/^HTTP\/1.[01] \d+.*/m,inside:{property:{pattern:/(^HTTP\/1.[01] )\d+.*/i,lookbehind:!0}}},"header-name":{pattern:/^[\w-]+:(?=.)/m,alias:"keyword"}};var httpLanguages={"application/json":Prism.languages.javascript,"application/xml":Prism.languages.markup,"text/xml":Prism.languages.markup,"text/html":Prism.languages.markup};for(var contentType in httpLanguages)if(httpLanguages[contentType]){var options={};options[contentType]={pattern:RegExp("(content-type:\\s*"+contentType+"[\\w\\W]*?)(?:\\r?\\n|\\r){2}[\\w\\W]*","i"),lookbehind:!0,inside:{rest:httpLanguages[contentType]}},Prism.languages.insertBefore("http","header-name",options)} \ No newline at end of file diff --git a/components/prism-lisp.js b/components/prism-lisp.js index b8b0451405..4c2dceb5db 100644 --- a/components/prism-lisp.js +++ b/components/prism-lisp.js @@ -3,11 +3,11 @@ // simple form // e.g. (interactive ... or (interactive) function simple_form(name) { - return new RegExp('(\\()' + name + '(?=[\\s\\)])'); + return RegExp('(\\()' + name + '(?=[\\s\\)])'); } // booleans and numbers function primitive(pattern) { - return new RegExp('([\\s([])' + pattern + '(?=[\\s)])'); + return RegExp('([\\s([])' + pattern + '(?=[\\s)])'); } // Patterns in regular expressions @@ -36,24 +36,24 @@ greedy: true, inside: { argument: /[-A-Z]+(?=[.,\s])/, - symbol: new RegExp('`' + symbol + "'") + symbol: RegExp('`' + symbol + "'") } }, 'quoted-symbol': { - pattern: new RegExp("#?'" + symbol), + pattern: RegExp("#?'" + symbol), alias: ['variable', 'symbol'] }, 'lisp-property': { - pattern: new RegExp(':' + symbol), + pattern: RegExp(':' + symbol), alias: 'property' }, splice: { - pattern: new RegExp(',@?' + symbol), + pattern: RegExp(',@?' + symbol), alias: ['symbol', 'variable'] }, keyword: [ { - pattern: new RegExp( + pattern: RegExp( par + '(?:(?:lexical-)?let\\*?|(?:cl-)?letf|if|when|while|unless|cons|cl-loop|and|or|not|cond|setq|error|message|null|require|provide|use-package)' + space @@ -61,7 +61,7 @@ lookbehind: true }, { - pattern: new RegExp( + pattern: RegExp( par + '(?:for|do|collect|return|finally|append|concat|in|by)' + space ), lookbehind: true @@ -86,15 +86,15 @@ lookbehind: true }, defvar: { - pattern: new RegExp(par + 'def(?:var|const|custom|group)\\s+' + symbol), + pattern: RegExp(par + 'def(?:var|const|custom|group)\\s+' + symbol), lookbehind: true, inside: { keyword: /^def[a-z]+/, - variable: new RegExp(symbol) + variable: RegExp(symbol) } }, defun: { - pattern: new RegExp( + pattern: RegExp( par + '(?:cl-)?(?:defun\\*?|defmacro)\\s+' + symbol + @@ -107,14 +107,14 @@ // reference the language object. arguments: null, function: { - pattern: new RegExp('(^\\s)' + symbol), + pattern: RegExp('(^\\s)' + symbol), lookbehind: true }, punctuation: /[()]/ } }, lambda: { - pattern: new RegExp(par + 'lambda\\s+\\((?:&?' + symbol + '\\s*)*\\)'), + pattern: RegExp(par + 'lambda\\s+\\((?:&?' + symbol + '\\s*)*\\)'), lookbehind: true, inside: { keyword: /^lambda/, @@ -125,7 +125,7 @@ } }, car: { - pattern: new RegExp(par + symbol), + pattern: RegExp(par + symbol), lookbehind: true }, punctuation: [ @@ -140,14 +140,14 @@ }; var arg = { - 'lisp-marker': new RegExp(marker), + 'lisp-marker': RegExp(marker), rest: { argument: { - pattern: new RegExp(symbol), + pattern: RegExp(symbol), alias: 'variable' }, varform: { - pattern: new RegExp(par + symbol + '\\s+\\S[\\s\\S]*' + endpar), + pattern: RegExp(par + symbol + '\\s+\\S[\\s\\S]*' + endpar), lookbehind: true, inside: { string: language.string, @@ -163,23 +163,23 @@ var forms = '\\S+(?:\\s+\\S+)*'; var arglist = { - pattern: new RegExp(par + '[\\s\\S]*' + endpar), + pattern: RegExp(par + '[\\s\\S]*' + endpar), lookbehind: true, inside: { 'rest-vars': { - pattern: new RegExp('&(?:rest|body)\\s+' + forms), + pattern: RegExp('&(?:rest|body)\\s+' + forms), inside: arg }, 'other-marker-vars': { - pattern: new RegExp('&(?:optional|aux)\\s+' + forms), + pattern: RegExp('&(?:optional|aux)\\s+' + forms), inside: arg }, keys: { - pattern: new RegExp('&key\\s+' + forms + '(?:\\s+&allow-other-keys)?'), + pattern: RegExp('&key\\s+' + forms + '(?:\\s+&allow-other-keys)?'), inside: arg }, argument: { - pattern: new RegExp(symbol), + pattern: RegExp(symbol), alias: 'variable' }, punctuation: /[()]/ @@ -194,4 +194,4 @@ Prism.languages.elisp = language; Prism.languages.emacs = language; Prism.languages['emacs-lisp'] = language; -}(Prism)); \ No newline at end of file +}(Prism)); diff --git a/components/prism-lisp.min.js b/components/prism-lisp.min.js index 6aa700bca6..9fa2a4e1dd 100644 --- a/components/prism-lisp.min.js +++ b/components/prism-lisp.min.js @@ -1 +1 @@ -!function(e){function n(e){return new RegExp("(\\()"+e+"(?=[\\s\\)])")}function a(e){return new RegExp("([\\s([])"+e+"(?=[\\s)])")}var t="[-+*/_~!@$%^=<>{}\\w]+",r="&"+t,i="(\\()",s="(?=\\))",o="(?=\\s)",l={heading:{pattern:/;;;.*/,alias:["comment","title"]},comment:/;.*/,string:{pattern:/"(?:[^"\\]*|\\.)*"/,greedy:!0,inside:{argument:/[-A-Z]+(?=[.,\s])/,symbol:new RegExp("`"+t+"'")}},"quoted-symbol":{pattern:new RegExp("#?'"+t),alias:["variable","symbol"]},"lisp-property":{pattern:new RegExp(":"+t),alias:"property"},splice:{pattern:new RegExp(",@?"+t),alias:["symbol","variable"]},keyword:[{pattern:new RegExp(i+"(?:(?:lexical-)?let\\*?|(?:cl-)?letf|if|when|while|unless|cons|cl-loop|and|or|not|cond|setq|error|message|null|require|provide|use-package)"+o),lookbehind:!0},{pattern:new RegExp(i+"(?:for|do|collect|return|finally|append|concat|in|by)"+o),lookbehind:!0}],declare:{pattern:n("declare"),lookbehind:!0,alias:"keyword"},interactive:{pattern:n("interactive"),lookbehind:!0,alias:"keyword"},"boolean":{pattern:a("(?:t|nil)"),lookbehind:!0},number:{pattern:a("[-+]?\\d+(?:\\.\\d*)?"),lookbehind:!0},defvar:{pattern:new RegExp(i+"def(?:var|const|custom|group)\\s+"+t),lookbehind:!0,inside:{keyword:/^def[a-z]+/,variable:new RegExp(t)}},defun:{pattern:new RegExp(i+"(?:cl-)?(?:defun\\*?|defmacro)\\s+"+t+"\\s+\\([\\s\\S]*?\\)"),lookbehind:!0,inside:{keyword:/^(?:cl-)?def\S+/,arguments:null,"function":{pattern:new RegExp("(^\\s)"+t),lookbehind:!0},punctuation:/[()]/}},lambda:{pattern:new RegExp(i+"lambda\\s+\\((?:&?"+t+"\\s*)*\\)"),lookbehind:!0,inside:{keyword:/^lambda/,arguments:null,punctuation:/[()]/}},car:{pattern:new RegExp(i+t),lookbehind:!0},punctuation:[/(['`,]?\(|[)\[\]])/,{pattern:/(\s)\.(?=\s)/,lookbehind:!0}]},p={"lisp-marker":new RegExp(r),rest:{argument:{pattern:new RegExp(t),alias:"variable"},varform:{pattern:new RegExp(i+t+"\\s+\\S[\\s\\S]*"+s),lookbehind:!0,inside:{string:l.string,"boolean":l.boolean,number:l.number,symbol:l.symbol,punctuation:/[()]/}}}},d="\\S+(?:\\s+\\S+)*",u={pattern:new RegExp(i+"[\\s\\S]*"+s),lookbehind:!0,inside:{"rest-vars":{pattern:new RegExp("&(?:rest|body)\\s+"+d),inside:p},"other-marker-vars":{pattern:new RegExp("&(?:optional|aux)\\s+"+d),inside:p},keys:{pattern:new RegExp("&key\\s+"+d+"(?:\\s+&allow-other-keys)?"),inside:p},argument:{pattern:new RegExp(t),alias:"variable"},punctuation:/[()]/}};l.lambda.inside.arguments=u,l.defun.inside.arguments=e.util.clone(u),l.defun.inside.arguments.inside.sublist=u,e.languages.lisp=l,e.languages.elisp=l,e.languages.emacs=l,e.languages["emacs-lisp"]=l}(Prism); \ No newline at end of file +!function(e){function n(e){return RegExp("(\\()"+e+"(?=[\\s\\)])")}function a(e){return RegExp("([\\s([])"+e+"(?=[\\s)])")}var t="[-+*/_~!@$%^=<>{}\\w]+",r="&"+t,i="(\\()",s="(?=\\))",o="(?=\\s)",l={heading:{pattern:/;;;.*/,alias:["comment","title"]},comment:/;.*/,string:{pattern:/"(?:[^"\\]*|\\.)*"/,greedy:!0,inside:{argument:/[-A-Z]+(?=[.,\s])/,symbol:RegExp("`"+t+"'")}},"quoted-symbol":{pattern:RegExp("#?'"+t),alias:["variable","symbol"]},"lisp-property":{pattern:RegExp(":"+t),alias:"property"},splice:{pattern:RegExp(",@?"+t),alias:["symbol","variable"]},keyword:[{pattern:RegExp(i+"(?:(?:lexical-)?let\\*?|(?:cl-)?letf|if|when|while|unless|cons|cl-loop|and|or|not|cond|setq|error|message|null|require|provide|use-package)"+o),lookbehind:!0},{pattern:RegExp(i+"(?:for|do|collect|return|finally|append|concat|in|by)"+o),lookbehind:!0}],declare:{pattern:n("declare"),lookbehind:!0,alias:"keyword"},interactive:{pattern:n("interactive"),lookbehind:!0,alias:"keyword"},"boolean":{pattern:a("(?:t|nil)"),lookbehind:!0},number:{pattern:a("[-+]?\\d+(?:\\.\\d*)?"),lookbehind:!0},defvar:{pattern:RegExp(i+"def(?:var|const|custom|group)\\s+"+t),lookbehind:!0,inside:{keyword:/^def[a-z]+/,variable:RegExp(t)}},defun:{pattern:RegExp(i+"(?:cl-)?(?:defun\\*?|defmacro)\\s+"+t+"\\s+\\([\\s\\S]*?\\)"),lookbehind:!0,inside:{keyword:/^(?:cl-)?def\S+/,arguments:null,"function":{pattern:RegExp("(^\\s)"+t),lookbehind:!0},punctuation:/[()]/}},lambda:{pattern:RegExp(i+"lambda\\s+\\((?:&?"+t+"\\s*)*\\)"),lookbehind:!0,inside:{keyword:/^lambda/,arguments:null,punctuation:/[()]/}},car:{pattern:RegExp(i+t),lookbehind:!0},punctuation:[/(['`,]?\(|[)\[\]])/,{pattern:/(\s)\.(?=\s)/,lookbehind:!0}]},p={"lisp-marker":RegExp(r),rest:{argument:{pattern:RegExp(t),alias:"variable"},varform:{pattern:RegExp(i+t+"\\s+\\S[\\s\\S]*"+s),lookbehind:!0,inside:{string:l.string,"boolean":l.boolean,number:l.number,symbol:l.symbol,punctuation:/[()]/}}}},d="\\S+(?:\\s+\\S+)*",u={pattern:RegExp(i+"[\\s\\S]*"+s),lookbehind:!0,inside:{"rest-vars":{pattern:RegExp("&(?:rest|body)\\s+"+d),inside:p},"other-marker-vars":{pattern:RegExp("&(?:optional|aux)\\s+"+d),inside:p},keys:{pattern:RegExp("&key\\s+"+d+"(?:\\s+&allow-other-keys)?"),inside:p},argument:{pattern:RegExp(t),alias:"variable"},punctuation:/[()]/}};l.lambda.inside.arguments=u,l.defun.inside.arguments=e.util.clone(u),l.defun.inside.arguments.inside.sublist=u,e.languages.lisp=l,e.languages.elisp=l,e.languages.emacs=l,e.languages["emacs-lisp"]=l}(Prism); \ No newline at end of file diff --git a/plugins/normalize-whitespace/prism-normalize-whitespace.js b/plugins/normalize-whitespace/prism-normalize-whitespace.js index 0b66de03a0..b6c6472793 100644 --- a/plugins/normalize-whitespace/prism-normalize-whitespace.js +++ b/plugins/normalize-whitespace/prism-normalize-whitespace.js @@ -60,7 +60,7 @@ NormalizeWhitespace.prototype = { }, spacesToTabs: function (input, spaces) { spaces = spaces|0 || 4; - return input.replace(new RegExp(' {' + spaces + '}', 'g'), '\t'); + return input.replace(RegExp(' {' + spaces + '}', 'g'), '\t'); }, removeTrailing: function (input) { return input.replace(/\s*?$/gm, ''); @@ -80,7 +80,7 @@ NormalizeWhitespace.prototype = { if (!indents[0].length) return input; - return input.replace(new RegExp('^' + indents[0], 'gm'), ''); + return input.replace(RegExp('^' + indents[0], 'gm'), ''); }, indent: function (input, tabs) { return input.replace(/^[^\S\n\r]*(?=\S)/gm, new Array(++tabs).join('\t') + '$&'); @@ -187,4 +187,4 @@ Prism.hooks.add('before-sanity-check', function (env) { } }); -}()); \ No newline at end of file +}()); diff --git a/plugins/normalize-whitespace/prism-normalize-whitespace.min.js b/plugins/normalize-whitespace/prism-normalize-whitespace.min.js index b38d064c25..39fa5795a9 100644 --- a/plugins/normalize-whitespace/prism-normalize-whitespace.min.js +++ b/plugins/normalize-whitespace/prism-normalize-whitespace.min.js @@ -1 +1 @@ -!function(){function e(e){this.defaults=r({},e)}function n(e){return e.replace(/-(\w)/g,function(e,n){return n.toUpperCase()})}function t(e){for(var n=0,t=0;tn&&(o[s]="\n"+o[s],a=l)}r[i]=o.join("")}return r.join("\n")}},"undefined"!=typeof module&&module.exports&&(module.exports=e),"undefined"!=typeof Prism&&(Prism.plugins.NormalizeWhitespace=new e({"remove-trailing":!0,"remove-indent":!0,"left-trim":!0,"right-trim":!0}),Prism.hooks.add("before-sanity-check",function(e){var n=Prism.plugins.NormalizeWhitespace;if(!e.settings||e.settings["whitespace-normalization"]!==!1){if((!e.element||!e.element.parentNode)&&e.code)return e.code=n.normalize(e.code,e.settings),void 0;var t=e.element.parentNode,r=/\bno-whitespace-normalization\b/;if(e.code&&t&&"pre"===t.nodeName.toLowerCase()&&!r.test(t.className)&&!r.test(e.element.className)){for(var i=t.childNodes,o="",a="",s=!1,l=0;ln&&(o[s]="\n"+o[s],a=l)}r[i]=o.join("")}return r.join("\n")}},"undefined"!=typeof module&&module.exports&&(module.exports=e),"undefined"!=typeof Prism&&(Prism.plugins.NormalizeWhitespace=new e({"remove-trailing":!0,"remove-indent":!0,"left-trim":!0,"right-trim":!0}),Prism.hooks.add("before-sanity-check",function(e){var n=Prism.plugins.NormalizeWhitespace;if(!e.settings||e.settings["whitespace-normalization"]!==!1){if((!e.element||!e.element.parentNode)&&e.code)return e.code=n.normalize(e.code,e.settings),void 0;var t=e.element.parentNode,r=/\bno-whitespace-normalization\b/;if(e.code&&t&&"pre"===t.nodeName.toLowerCase()&&!r.test(t.className)&&!r.test(e.element.className)){for(var i=t.childNodes,o="",a="",s=!1,l=0;l Date: Sun, 19 Aug 2018 16:33:54 +0200 Subject: [PATCH 0055/1100] Fixed Previewers bug #1496 (#1497) The problem was a bug unique to Firefox which causes offsetTop of span.token to always be 0 under certain conditions. It only occurred together with of the line-number plugin because setting position: relative for the pre > code elements triggers that FF bug. The offset is now calculated using bounding boxes. Tested in Chrome, Edge, IE, FF, and Opera. Fixes #1496. --- plugins/previewers/prism-previewers.js | 35 +++++++++------------- plugins/previewers/prism-previewers.min.js | 2 +- 2 files changed, 15 insertions(+), 22 deletions(-) diff --git a/plugins/previewers/prism-previewers.js b/plugins/previewers/prism-previewers.js index 8c2feb164d..0f0d2f9c72 100644 --- a/plugins/previewers/prism-previewers.js +++ b/plugins/previewers/prism-previewers.js @@ -470,30 +470,23 @@ /** * Returns the absolute X, Y offsets for an element * @param {HTMLElement} element - * @returns {{top: number, right: number, bottom: number, left: number}} + * @returns {{top: number, right: number, bottom: number, left: number, width: number, height: number}} */ var getOffset = function (element) { - var left = 0, top = 0, el = element; - - if (el.parentNode) { - do { - left += el.offsetLeft; - top += el.offsetTop; - } while ((el = el.offsetParent) && el.nodeType < 9); - - el = element; - - do { - left -= el.scrollLeft; - top -= el.scrollTop; - } while ((el = el.parentNode) && !/body/i.test(el.nodeName)); - } + var elementBounds = element.getBoundingClientRect(); + var left = elementBounds.left; + var top = elementBounds.top; + var documentBounds = document.documentElement.getBoundingClientRect(); + left -= documentBounds.left; + top -= documentBounds.top; return { top: top, - right: innerWidth - left - element.offsetWidth, - bottom: innerHeight - top - element.offsetHeight, - left: left + right: innerWidth - left - elementBounds.width, + bottom: innerHeight - top - elementBounds.height, + left: left, + width: elementBounds.width, + height: elementBounds.height }; }; @@ -621,7 +614,7 @@ this._elt.style.top = ''; } - this._elt.style.left = offset.left + Math.min(200, this._token.offsetWidth / 2) + 'px'; + this._elt.style.left = offset.left + Math.min(200, offset.width / 2) + 'px'; } else { this.hide(); } @@ -712,4 +705,4 @@ previewers[previewer].create(); } -}()); \ No newline at end of file +}()); diff --git a/plugins/previewers/prism-previewers.min.js b/plugins/previewers/prism-previewers.min.js index 2595fbdcff..477d4e52d9 100644 --- a/plugins/previewers/prism-previewers.min.js +++ b/plugins/previewers/prism-previewers.min.js @@ -1 +1 @@ -!function(){if(("undefined"==typeof self||self.Prism)&&self.document&&Function.prototype.bind){var e={gradient:{create:function(){var e={},s=function(e,s,i){var t="180deg";return/^(?:-?\d*\.?\d+(?:deg|rad)|to\b|top|right|bottom|left)/.test(i[0])&&(t=i.shift(),t.indexOf("to ")<0&&(t.indexOf("top")>=0?t=t.indexOf("left")>=0?"to bottom right":t.indexOf("right")>=0?"to bottom left":"to bottom":t.indexOf("bottom")>=0?t=t.indexOf("left")>=0?"to top right":t.indexOf("right")>=0?"to top left":"to top":t.indexOf("left")>=0?t="to right":t.indexOf("right")>=0?t="to left":e&&(t.indexOf("deg")>=0?t=90-parseFloat(t)+"deg":t.indexOf("rad")>=0&&(t=Math.PI/2-parseFloat(t)+"rad")))),s+"("+t+","+i.join(",")+")"},i=function(e,s,i){if(i[0].indexOf("at")<0){var t="center",a="ellipse",r="farthest-corner";if(/\bcenter|top|right|bottom|left\b|^\d+/.test(i[0])&&(t=i.shift().replace(/\s*-?\d+(?:rad|deg)\s*/,"")),/\bcircle|ellipse|closest|farthest|contain|cover\b/.test(i[0])){var n=i.shift().split(/\s+/);!n[0]||"circle"!==n[0]&&"ellipse"!==n[0]||(a=n.shift()),n[0]&&(r=n.shift()),"cover"===r?r="farthest-corner":"contain"===r&&(r="clothest-side")}return s+"("+a+" "+r+" at "+t+","+i.join(",")+")"}return s+"("+i.join(",")+")"},t=function(t){if(e[t])return e[t];var a=t.match(/^(\b|\B-[a-z]{1,10}-)((?:repeating-)?(?:linear|radial)-gradient)/),r=a&&a[1],n=a&&a[2],l=t.replace(/^(?:\b|\B-[a-z]{1,10}-)(?:repeating-)?(?:linear|radial)-gradient\(|\)$/g,"").split(/\s*,\s*/);return e[t]=n.indexOf("linear")>=0?s(r,n,l):n.indexOf("radial")>=0?i(r,n,l):n+"("+l.join(",")+")"};return function(){new Prism.plugins.Previewer("gradient",function(e){return this.firstChild.style.backgroundImage="",this.firstChild.style.backgroundImage=t(e),!!this.firstChild.style.backgroundImage},"*",function(){this._elt.innerHTML="
    "})}}(),tokens:{gradient:{pattern:/(?:\b|\B-[a-z]{1,10}-)(?:repeating-)?(?:linear|radial)-gradient\((?:(?:rgb|hsl)a?\(.+?\)|[^\)])+\)/gi,inside:{"function":/[\w-]+(?=\()/,punctuation:/[(),]/}}},languages:{css:!0,less:!0,sass:[{lang:"sass",before:"punctuation",inside:"inside",root:Prism.languages.sass&&Prism.languages.sass["variable-line"]},{lang:"sass",before:"punctuation",inside:"inside",root:Prism.languages.sass&&Prism.languages.sass["property-line"]}],scss:!0,stylus:[{lang:"stylus",before:"func",inside:"rest",root:Prism.languages.stylus&&Prism.languages.stylus["property-declaration"].inside},{lang:"stylus",before:"func",inside:"rest",root:Prism.languages.stylus&&Prism.languages.stylus["variable-declaration"].inside}]}},angle:{create:function(){new Prism.plugins.Previewer("angle",function(e){var s,i,t=parseFloat(e),a=e.match(/[a-z]+$/i);if(!t||!a)return!1;switch(a=a[0]){case"deg":s=360;break;case"grad":s=400;break;case"rad":s=2*Math.PI;break;case"turn":s=1}return i=100*t/s,i%=100,this[(0>t?"set":"remove")+"Attribute"]("data-negative",""),this.querySelector("circle").style.strokeDasharray=Math.abs(i)+",500",!0},"*",function(){this._elt.innerHTML=''})},tokens:{angle:/(?:\b|\B-|(?=\B\.))\d*\.?\d+(?:deg|g?rad|turn)\b/i},languages:{css:!0,less:!0,markup:{lang:"markup",before:"punctuation",inside:"inside",root:Prism.languages.markup&&Prism.languages.markup.tag.inside["attr-value"]},sass:[{lang:"sass",inside:"inside",root:Prism.languages.sass&&Prism.languages.sass["property-line"]},{lang:"sass",before:"operator",inside:"inside",root:Prism.languages.sass&&Prism.languages.sass["variable-line"]}],scss:!0,stylus:[{lang:"stylus",before:"func",inside:"rest",root:Prism.languages.stylus&&Prism.languages.stylus["property-declaration"].inside},{lang:"stylus",before:"func",inside:"rest",root:Prism.languages.stylus&&Prism.languages.stylus["variable-declaration"].inside}]}},color:{create:function(){new Prism.plugins.Previewer("color",function(e){return this.style.backgroundColor="",this.style.backgroundColor=e,!!this.style.backgroundColor})},tokens:{color:{pattern:/\B#(?:[0-9a-f]{3}){1,2}\b|\b(?:rgb|hsl)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:rgb|hsl)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B|\b(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGray|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGray|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGray|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gray|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGray|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGray|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGray|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)\b/i,inside:{"function":/[\w-]+(?=\()/,punctuation:/[(),]/}}},languages:{css:!0,less:!0,markup:{lang:"markup",before:"punctuation",inside:"inside",root:Prism.languages.markup&&Prism.languages.markup.tag.inside["attr-value"]},sass:[{lang:"sass",before:"punctuation",inside:"inside",root:Prism.languages.sass&&Prism.languages.sass["variable-line"]},{lang:"sass",inside:"inside",root:Prism.languages.sass&&Prism.languages.sass["property-line"]}],scss:!0,stylus:[{lang:"stylus",before:"hexcode",inside:"rest",root:Prism.languages.stylus&&Prism.languages.stylus["property-declaration"].inside},{lang:"stylus",before:"hexcode",inside:"rest",root:Prism.languages.stylus&&Prism.languages.stylus["variable-declaration"].inside}]}},easing:{create:function(){new Prism.plugins.Previewer("easing",function(e){e={linear:"0,0,1,1",ease:".25,.1,.25,1","ease-in":".42,0,1,1","ease-out":"0,0,.58,1","ease-in-out":".42,0,.58,1"}[e]||e;var s=e.match(/-?\d*\.?\d+/g);if(4===s.length){s=s.map(function(e,s){return 100*(s%2?1-e:e)}),this.querySelector("path").setAttribute("d","M0,100 C"+s[0]+","+s[1]+", "+s[2]+","+s[3]+", 100,0");var i=this.querySelectorAll("line");return i[0].setAttribute("x2",s[0]),i[0].setAttribute("y2",s[1]),i[1].setAttribute("x2",s[2]),i[1].setAttribute("y2",s[3]),!0}return!1},"*",function(){this._elt.innerHTML=''})},tokens:{easing:{pattern:/\bcubic-bezier\((?:-?\d*\.?\d+,\s*){3}-?\d*\.?\d+\)\B|\b(?:linear|ease(?:-in)?(?:-out)?)(?=\s|[;}]|$)/i,inside:{"function":/[\w-]+(?=\()/,punctuation:/[(),]/}}},languages:{css:!0,less:!0,sass:[{lang:"sass",inside:"inside",before:"punctuation",root:Prism.languages.sass&&Prism.languages.sass["variable-line"]},{lang:"sass",inside:"inside",root:Prism.languages.sass&&Prism.languages.sass["property-line"]}],scss:!0,stylus:[{lang:"stylus",before:"hexcode",inside:"rest",root:Prism.languages.stylus&&Prism.languages.stylus["property-declaration"].inside},{lang:"stylus",before:"hexcode",inside:"rest",root:Prism.languages.stylus&&Prism.languages.stylus["variable-declaration"].inside}]}},time:{create:function(){new Prism.plugins.Previewer("time",function(e){var s=parseFloat(e),i=e.match(/[a-z]+$/i);return s&&i?(i=i[0],this.querySelector("circle").style.animationDuration=2*s+i,!0):!1},"*",function(){this._elt.innerHTML=''})},tokens:{time:/(?:\b|\B-|(?=\B\.))\d*\.?\d+m?s\b/i},languages:{css:!0,less:!0,markup:{lang:"markup",before:"punctuation",inside:"inside",root:Prism.languages.markup&&Prism.languages.markup.tag.inside["attr-value"]},sass:[{lang:"sass",inside:"inside",root:Prism.languages.sass&&Prism.languages.sass["property-line"]},{lang:"sass",before:"operator",inside:"inside",root:Prism.languages.sass&&Prism.languages.sass["variable-line"]}],scss:!0,stylus:[{lang:"stylus",before:"hexcode",inside:"rest",root:Prism.languages.stylus&&Prism.languages.stylus["property-declaration"].inside},{lang:"stylus",before:"hexcode",inside:"rest",root:Prism.languages.stylus&&Prism.languages.stylus["variable-declaration"].inside}]}}},s=function(e){var s=0,i=0,t=e;if(t.parentNode){do s+=t.offsetLeft,i+=t.offsetTop;while((t=t.offsetParent)&&t.nodeType<9);t=e;do s-=t.scrollLeft,i-=t.scrollTop;while((t=t.parentNode)&&!/body/i.test(t.nodeName))}return{top:i,right:innerWidth-s-e.offsetWidth,bottom:innerHeight-i-e.offsetHeight,left:s}},i=/(?:^|\s)token(?=$|\s)/,t=/(?:^|\s)active(?=$|\s)/g,a=/(?:^|\s)flipped(?=$|\s)/g,r=function(e,s,i,t){this._elt=null,this._type=e,this._clsRegexp=RegExp("(?:^|\\s)"+e+"(?=$|\\s)"),this._token=null,this.updater=s,this._mouseout=this.mouseout.bind(this),this.initializer=t;var a=this;i||(i=["*"]),"Array"!==Prism.util.type(i)&&(i=[i]),i.forEach(function(e){"string"!=typeof e&&(e=e.lang),r.byLanguages[e]||(r.byLanguages[e]=[]),r.byLanguages[e].indexOf(a)<0&&r.byLanguages[e].push(a)}),r.byType[e]=this};r.prototype.init=function(){this._elt||(this._elt=document.createElement("div"),this._elt.className="prism-previewer prism-previewer-"+this._type,document.body.appendChild(this._elt),this.initializer&&this.initializer())},r.prototype.isDisabled=function(e){do if(e.hasAttribute&&e.hasAttribute("data-previewers")){var s=e.getAttribute("data-previewers");return-1===(s||"").split(/\s+/).indexOf(this._type)}while(e=e.parentNode);return!1},r.prototype.check=function(e){if(!i.test(e.className)||!this.isDisabled(e)){do if(i.test(e.className)&&this._clsRegexp.test(e.className))break;while(e=e.parentNode);e&&e!==this._token&&(this._token=e,this.show())}},r.prototype.mouseout=function(){this._token.removeEventListener("mouseout",this._mouseout,!1),this._token=null,this.hide()},r.prototype.show=function(){if(this._elt||this.init(),this._token)if(this.updater.call(this._elt,this._token.textContent)){this._token.addEventListener("mouseout",this._mouseout,!1);var e=s(this._token);this._elt.className+=" active",e.top-this._elt.offsetHeight>0?(this._elt.className=this._elt.className.replace(a,""),this._elt.style.top=e.top+"px",this._elt.style.bottom=""):(this._elt.className+=" flipped",this._elt.style.bottom=e.bottom+"px",this._elt.style.top=""),this._elt.style.left=e.left+Math.min(200,this._token.offsetWidth/2)+"px"}else this.hide()},r.prototype.hide=function(){this._elt.className=this._elt.className.replace(t,"")},r.byLanguages={},r.byType={},r.initEvents=function(e,s){var i=[];r.byLanguages[s]&&(i=i.concat(r.byLanguages[s])),r.byLanguages["*"]&&(i=i.concat(r.byLanguages["*"])),e.addEventListener("mouseover",function(e){var s=e.target;i.forEach(function(e){e.check(s)})},!1)},Prism.plugins.Previewer=r,Prism.hooks.add("before-highlight",function(s){for(var i in e){var t=e[i].languages;if(s.language&&t[s.language]&&!t[s.language].initialized){var a=t[s.language];"Array"!==Prism.util.type(a)&&(a=[a]),a.forEach(function(a){var r,n,l,o;a===!0?(r="important",n=s.language,a=s.language):(r=a.before||"important",n=a.inside||a.lang,l=a.root||Prism.languages,o=a.skip,a=s.language),!o&&Prism.languages[a]&&(Prism.languages.insertBefore(n,r,e[i].tokens,l),s.grammar=Prism.languages[a],t[s.language]={initialized:!0})})}}}),Prism.hooks.add("after-highlight",function(e){(r.byLanguages["*"]||r.byLanguages[e.language])&&r.initEvents(e.element,e.language)});for(var n in e)e[n].create()}}(); \ No newline at end of file +!function(){if(("undefined"==typeof self||self.Prism)&&self.document&&Function.prototype.bind){var e={gradient:{create:function(){var e={},s=function(e,s,i){var t="180deg";return/^(?:-?\d*\.?\d+(?:deg|rad)|to\b|top|right|bottom|left)/.test(i[0])&&(t=i.shift(),t.indexOf("to ")<0&&(t.indexOf("top")>=0?t=t.indexOf("left")>=0?"to bottom right":t.indexOf("right")>=0?"to bottom left":"to bottom":t.indexOf("bottom")>=0?t=t.indexOf("left")>=0?"to top right":t.indexOf("right")>=0?"to top left":"to top":t.indexOf("left")>=0?t="to right":t.indexOf("right")>=0?t="to left":e&&(t.indexOf("deg")>=0?t=90-parseFloat(t)+"deg":t.indexOf("rad")>=0&&(t=Math.PI/2-parseFloat(t)+"rad")))),s+"("+t+","+i.join(",")+")"},i=function(e,s,i){if(i[0].indexOf("at")<0){var t="center",a="ellipse",r="farthest-corner";if(/\bcenter|top|right|bottom|left\b|^\d+/.test(i[0])&&(t=i.shift().replace(/\s*-?\d+(?:rad|deg)\s*/,"")),/\bcircle|ellipse|closest|farthest|contain|cover\b/.test(i[0])){var n=i.shift().split(/\s+/);!n[0]||"circle"!==n[0]&&"ellipse"!==n[0]||(a=n.shift()),n[0]&&(r=n.shift()),"cover"===r?r="farthest-corner":"contain"===r&&(r="clothest-side")}return s+"("+a+" "+r+" at "+t+","+i.join(",")+")"}return s+"("+i.join(",")+")"},t=function(t){if(e[t])return e[t];var a=t.match(/^(\b|\B-[a-z]{1,10}-)((?:repeating-)?(?:linear|radial)-gradient)/),r=a&&a[1],n=a&&a[2],l=t.replace(/^(?:\b|\B-[a-z]{1,10}-)(?:repeating-)?(?:linear|radial)-gradient\(|\)$/g,"").split(/\s*,\s*/);return e[t]=n.indexOf("linear")>=0?s(r,n,l):n.indexOf("radial")>=0?i(r,n,l):n+"("+l.join(",")+")"};return function(){new Prism.plugins.Previewer("gradient",function(e){return this.firstChild.style.backgroundImage="",this.firstChild.style.backgroundImage=t(e),!!this.firstChild.style.backgroundImage},"*",function(){this._elt.innerHTML="
    "})}}(),tokens:{gradient:{pattern:/(?:\b|\B-[a-z]{1,10}-)(?:repeating-)?(?:linear|radial)-gradient\((?:(?:rgb|hsl)a?\(.+?\)|[^\)])+\)/gi,inside:{"function":/[\w-]+(?=\()/,punctuation:/[(),]/}}},languages:{css:!0,less:!0,sass:[{lang:"sass",before:"punctuation",inside:"inside",root:Prism.languages.sass&&Prism.languages.sass["variable-line"]},{lang:"sass",before:"punctuation",inside:"inside",root:Prism.languages.sass&&Prism.languages.sass["property-line"]}],scss:!0,stylus:[{lang:"stylus",before:"func",inside:"rest",root:Prism.languages.stylus&&Prism.languages.stylus["property-declaration"].inside},{lang:"stylus",before:"func",inside:"rest",root:Prism.languages.stylus&&Prism.languages.stylus["variable-declaration"].inside}]}},angle:{create:function(){new Prism.plugins.Previewer("angle",function(e){var s,i,t=parseFloat(e),a=e.match(/[a-z]+$/i);if(!t||!a)return!1;switch(a=a[0]){case"deg":s=360;break;case"grad":s=400;break;case"rad":s=2*Math.PI;break;case"turn":s=1}return i=100*t/s,i%=100,this[(0>t?"set":"remove")+"Attribute"]("data-negative",""),this.querySelector("circle").style.strokeDasharray=Math.abs(i)+",500",!0},"*",function(){this._elt.innerHTML=''})},tokens:{angle:/(?:\b|\B-|(?=\B\.))\d*\.?\d+(?:deg|g?rad|turn)\b/i},languages:{css:!0,less:!0,markup:{lang:"markup",before:"punctuation",inside:"inside",root:Prism.languages.markup&&Prism.languages.markup.tag.inside["attr-value"]},sass:[{lang:"sass",inside:"inside",root:Prism.languages.sass&&Prism.languages.sass["property-line"]},{lang:"sass",before:"operator",inside:"inside",root:Prism.languages.sass&&Prism.languages.sass["variable-line"]}],scss:!0,stylus:[{lang:"stylus",before:"func",inside:"rest",root:Prism.languages.stylus&&Prism.languages.stylus["property-declaration"].inside},{lang:"stylus",before:"func",inside:"rest",root:Prism.languages.stylus&&Prism.languages.stylus["variable-declaration"].inside}]}},color:{create:function(){new Prism.plugins.Previewer("color",function(e){return this.style.backgroundColor="",this.style.backgroundColor=e,!!this.style.backgroundColor})},tokens:{color:{pattern:/\B#(?:[0-9a-f]{3}){1,2}\b|\b(?:rgb|hsl)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:rgb|hsl)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B|\b(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGray|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGray|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGray|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gray|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGray|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGray|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGray|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)\b/i,inside:{"function":/[\w-]+(?=\()/,punctuation:/[(),]/}}},languages:{css:!0,less:!0,markup:{lang:"markup",before:"punctuation",inside:"inside",root:Prism.languages.markup&&Prism.languages.markup.tag.inside["attr-value"]},sass:[{lang:"sass",before:"punctuation",inside:"inside",root:Prism.languages.sass&&Prism.languages.sass["variable-line"]},{lang:"sass",inside:"inside",root:Prism.languages.sass&&Prism.languages.sass["property-line"]}],scss:!0,stylus:[{lang:"stylus",before:"hexcode",inside:"rest",root:Prism.languages.stylus&&Prism.languages.stylus["property-declaration"].inside},{lang:"stylus",before:"hexcode",inside:"rest",root:Prism.languages.stylus&&Prism.languages.stylus["variable-declaration"].inside}]}},easing:{create:function(){new Prism.plugins.Previewer("easing",function(e){e={linear:"0,0,1,1",ease:".25,.1,.25,1","ease-in":".42,0,1,1","ease-out":"0,0,.58,1","ease-in-out":".42,0,.58,1"}[e]||e;var s=e.match(/-?\d*\.?\d+/g);if(4===s.length){s=s.map(function(e,s){return 100*(s%2?1-e:e)}),this.querySelector("path").setAttribute("d","M0,100 C"+s[0]+","+s[1]+", "+s[2]+","+s[3]+", 100,0");var i=this.querySelectorAll("line");return i[0].setAttribute("x2",s[0]),i[0].setAttribute("y2",s[1]),i[1].setAttribute("x2",s[2]),i[1].setAttribute("y2",s[3]),!0}return!1},"*",function(){this._elt.innerHTML=''})},tokens:{easing:{pattern:/\bcubic-bezier\((?:-?\d*\.?\d+,\s*){3}-?\d*\.?\d+\)\B|\b(?:linear|ease(?:-in)?(?:-out)?)(?=\s|[;}]|$)/i,inside:{"function":/[\w-]+(?=\()/,punctuation:/[(),]/}}},languages:{css:!0,less:!0,sass:[{lang:"sass",inside:"inside",before:"punctuation",root:Prism.languages.sass&&Prism.languages.sass["variable-line"]},{lang:"sass",inside:"inside",root:Prism.languages.sass&&Prism.languages.sass["property-line"]}],scss:!0,stylus:[{lang:"stylus",before:"hexcode",inside:"rest",root:Prism.languages.stylus&&Prism.languages.stylus["property-declaration"].inside},{lang:"stylus",before:"hexcode",inside:"rest",root:Prism.languages.stylus&&Prism.languages.stylus["variable-declaration"].inside}]}},time:{create:function(){new Prism.plugins.Previewer("time",function(e){var s=parseFloat(e),i=e.match(/[a-z]+$/i);return s&&i?(i=i[0],this.querySelector("circle").style.animationDuration=2*s+i,!0):!1},"*",function(){this._elt.innerHTML=''})},tokens:{time:/(?:\b|\B-|(?=\B\.))\d*\.?\d+m?s\b/i},languages:{css:!0,less:!0,markup:{lang:"markup",before:"punctuation",inside:"inside",root:Prism.languages.markup&&Prism.languages.markup.tag.inside["attr-value"]},sass:[{lang:"sass",inside:"inside",root:Prism.languages.sass&&Prism.languages.sass["property-line"]},{lang:"sass",before:"operator",inside:"inside",root:Prism.languages.sass&&Prism.languages.sass["variable-line"]}],scss:!0,stylus:[{lang:"stylus",before:"hexcode",inside:"rest",root:Prism.languages.stylus&&Prism.languages.stylus["property-declaration"].inside},{lang:"stylus",before:"hexcode",inside:"rest",root:Prism.languages.stylus&&Prism.languages.stylus["variable-declaration"].inside}]}}},s=function(e){var s=e.getBoundingClientRect(),i=s.left,t=s.top,a=document.documentElement.getBoundingClientRect();return i-=a.left,t-=a.top,{top:t,right:innerWidth-i-s.width,bottom:innerHeight-t-s.height,left:i,width:s.width,height:s.height}},i=/(?:^|\s)token(?=$|\s)/,t=/(?:^|\s)active(?=$|\s)/g,a=/(?:^|\s)flipped(?=$|\s)/g,r=function(e,s,i,t){this._elt=null,this._type=e,this._clsRegexp=RegExp("(?:^|\\s)"+e+"(?=$|\\s)"),this._token=null,this.updater=s,this._mouseout=this.mouseout.bind(this),this.initializer=t;var a=this;i||(i=["*"]),"Array"!==Prism.util.type(i)&&(i=[i]),i.forEach(function(e){"string"!=typeof e&&(e=e.lang),r.byLanguages[e]||(r.byLanguages[e]=[]),r.byLanguages[e].indexOf(a)<0&&r.byLanguages[e].push(a)}),r.byType[e]=this};r.prototype.init=function(){this._elt||(this._elt=document.createElement("div"),this._elt.className="prism-previewer prism-previewer-"+this._type,document.body.appendChild(this._elt),this.initializer&&this.initializer())},r.prototype.isDisabled=function(e){do if(e.hasAttribute&&e.hasAttribute("data-previewers")){var s=e.getAttribute("data-previewers");return-1===(s||"").split(/\s+/).indexOf(this._type)}while(e=e.parentNode);return!1},r.prototype.check=function(e){if(!i.test(e.className)||!this.isDisabled(e)){do if(i.test(e.className)&&this._clsRegexp.test(e.className))break;while(e=e.parentNode);e&&e!==this._token&&(this._token=e,this.show())}},r.prototype.mouseout=function(){this._token.removeEventListener("mouseout",this._mouseout,!1),this._token=null,this.hide()},r.prototype.show=function(){if(this._elt||this.init(),this._token)if(this.updater.call(this._elt,this._token.textContent)){this._token.addEventListener("mouseout",this._mouseout,!1);var e=s(this._token);this._elt.className+=" active",e.top-this._elt.offsetHeight>0?(this._elt.className=this._elt.className.replace(a,""),this._elt.style.top=e.top+"px",this._elt.style.bottom=""):(this._elt.className+=" flipped",this._elt.style.bottom=e.bottom+"px",this._elt.style.top=""),this._elt.style.left=e.left+Math.min(200,e.width/2)+"px"}else this.hide()},r.prototype.hide=function(){this._elt.className=this._elt.className.replace(t,"")},r.byLanguages={},r.byType={},r.initEvents=function(e,s){var i=[];r.byLanguages[s]&&(i=i.concat(r.byLanguages[s])),r.byLanguages["*"]&&(i=i.concat(r.byLanguages["*"])),e.addEventListener("mouseover",function(e){var s=e.target;i.forEach(function(e){e.check(s)})},!1)},Prism.plugins.Previewer=r,Prism.hooks.add("before-highlight",function(s){for(var i in e){var t=e[i].languages;if(s.language&&t[s.language]&&!t[s.language].initialized){var a=t[s.language];"Array"!==Prism.util.type(a)&&(a=[a]),a.forEach(function(a){var r,n,l,o;a===!0?(r="important",n=s.language,a=s.language):(r=a.before||"important",n=a.inside||a.lang,l=a.root||Prism.languages,o=a.skip,a=s.language),!o&&Prism.languages[a]&&(Prism.languages.insertBefore(n,r,e[i].tokens,l),s.grammar=Prism.languages[a],t[s.language]={initialized:!0})})}}}),Prism.hooks.add("after-highlight",function(e){(r.byLanguages["*"]||r.byLanguages[e.language])&&r.initEvents(e.element,e.language)});for(var n in e)e[n].create()}}(); \ No newline at end of file From a59a7926026a90f64715fb7443d4fbcc56ef6748 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Sun, 19 Aug 2018 16:47:52 +0200 Subject: [PATCH 0056/1100] Added support for quote escapes to SQL strings (#1500) Fixes #1454. Quotes that are escaped by using the same quote twice (e.g. 'It''s me') are now supported. --- components/prism-sql.js | 4 ++-- components/prism-sql.min.js | 2 +- tests/languages/sql/string_feature.test | 8 ++++++-- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/components/prism-sql.js b/components/prism-sql.js index 3a3e345ff2..bda215d0e3 100644 --- a/components/prism-sql.js +++ b/components/prism-sql.js @@ -4,7 +4,7 @@ Prism.languages.sql= { lookbehind: true }, 'string' : { - pattern: /(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\])*\2/, + pattern: /(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/, greedy: true, lookbehind: true }, @@ -15,4 +15,4 @@ Prism.languages.sql= { 'number': /\b0x[\da-f]+\b|\b\d+\.?\d*|\B\.\d+\b/i, 'operator': /[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|IN|LIKE|NOT|OR|IS|DIV|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i, 'punctuation': /[;[\]()`,.]/ -}; \ No newline at end of file +}; diff --git a/components/prism-sql.min.js b/components/prism-sql.min.js index 162d7ddc97..37056b9ca2 100644 --- a/components/prism-sql.min.js +++ b/components/prism-sql.min.js @@ -1 +1 @@ -Prism.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\])*\2/,greedy:!0,lookbehind:!0},variable:/@[\w.$]+|@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,"function":/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:_INSERT|COL)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURNS?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,"boolean":/\b(?:TRUE|FALSE|NULL)\b/i,number:/\b0x[\da-f]+\b|\b\d+\.?\d*|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|IN|LIKE|NOT|OR|IS|DIV|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/}; \ No newline at end of file +Prism.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},variable:/@[\w.$]+|@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,"function":/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:_INSERT|COL)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURNS?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,"boolean":/\b(?:TRUE|FALSE|NULL)\b/i,number:/\b0x[\da-f]+\b|\b\d+\.?\d*|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|IN|LIKE|NOT|OR|IS|DIV|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/}; \ No newline at end of file diff --git a/tests/languages/sql/string_feature.test b/tests/languages/sql/string_feature.test index 054040cf37..3dfeb990a9 100644 --- a/tests/languages/sql/string_feature.test +++ b/tests/languages/sql/string_feature.test @@ -6,6 +6,8 @@ bar" 'fo\'obar' 'foo bar' +'foo''s bar' +"foo's ""bar""" ---------------------------------------------------- @@ -15,9 +17,11 @@ bar' ["string", "\"foo\r\nbar\""], ["string", "''"], ["string", "'fo\\'obar'"], - ["string", "'foo\r\nbar'"] + ["string", "'foo\r\nbar'"], + ["string", "'foo''s bar'"], + ["string", "\"foo's \"\"bar\"\"\""] ] ---------------------------------------------------- -Checks for strings. \ No newline at end of file +Checks for strings. From 2fb66e040e702b22ddcc4476828f7ab3338de191 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Sun, 19 Aug 2018 16:50:41 +0200 Subject: [PATCH 0057/1100] Added missing aliases to components.json (#1503) Also enforced `alias` before `owner`. --- components.js | 2 +- components.json | 24 +++++++++++++++---- plugins/show-language/prism-show-language.js | 2 +- .../show-language/prism-show-language.min.js | 2 +- 4 files changed, 22 insertions(+), 8 deletions(-) diff --git a/components.js b/components.js index c5aa4cbbad..b24c3038a4 100644 --- a/components.js +++ b/components.js @@ -1,2 +1,2 @@ -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default","peerDependencies":"markup"},"clike":{"title":"C-like","option":"default","overrideExampleHeader":true},"javascript":{"title":"JavaScript","require":"clike","peerDependencies":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"actionscript":{"title":"ActionScript","require":"javascript","peerDependencies":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","alias":"shell","owner":"Golmote"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":"dotnet","owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"coffeescript":{"title":"CoffeeScript","require":"javascript","owner":"R-osey"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup","peerDependencies":["css","javascript"],"alias":"jinja2","owner":"romanvm"},"docker":{"title":"Docker","owner":"JustinBeckwith"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","peerDependencies":["css","coffeescript","erb","javascript","less","markdown","ruby","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"http":{"title":"HTTP","peerDependencies":["javascript","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"json":{"title":"JSON","owner":"CupOfTea696"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","owner":"japborst"},"less":{"title":"Less","require":"css","owner":"Golmote"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","owner":"JuanCaicedo","alias":["emacs","elisp","emacs-lisp"]},"livescript":{"title":"LiveScript","owner":"Golmote"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"n4js":{"title":"N4JS","require":"javascript","owner":"bsmith-n4"},"nasm":{"title":"NASM","owner":"rbmj"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"cpp","peerDependencies":["c","cpp"],"overrideExampleHeader":true,"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"php-extras":{"title":"PHP Extras","require":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":"javascript","peerDependencies":["coffeescript","ejs","handlebars","hogan","less","livescript","markdown","mustache","plates","scss","stylus","swig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","peerDependencies":["c","cpp","fortran","ats","dsp"],"owner":"Golmote"},"python":{"title":"Python","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"ruby":{"title":"Ruby","require":"clike","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sql":{"title":"SQL","owner":"multipetros"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","peerDependencies":"css","owner":"Golmote"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","alias":"ts","owner":"vkbansal"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","owner":"Golmote","alias":"vb"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","owner":"hason"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":"Line Highlight","line-numbers":{"title":"Line Numbers","owner":"kuba-kubula"},"show-invisibles":"Show Invisibles","autolinker":"Autolinker","wpd":"WebPlatform Docs","custom-class":{"title":"Custom Class","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","noCSS":true},"show-language":{"title":"Show Language","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","owner":"Golmote","noCSS":true},"previewers":{"title":"Previewers","owner":"Golmote"},"autoloader":{"title":"Autoloader","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","owner":"Golmote","after":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","owner":"chriswells0"},"unescaped-markup":"Unescaped Markup","normalize-whitespace":{"title":"Normalize Whitespace","owner":"zeitgeist87","after":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","owner":"mAAdhaTTah","require":"toolbar","noCSS":true}}}; +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default","peerDependencies":"markup"},"clike":{"title":"C-like","option":"default","overrideExampleHeader":true},"javascript":{"title":"JavaScript","require":"clike","peerDependencies":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"actionscript":{"title":"ActionScript","require":"javascript","peerDependencies":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","alias":"shell","owner":"Golmote"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":"dotnet","owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"coffeescript":{"title":"CoffeeScript","require":"javascript","owner":"R-osey"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup","peerDependencies":["css","javascript"],"alias":"jinja2","owner":"romanvm"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","peerDependencies":["css","coffeescript","erb","javascript","less","markdown","ruby","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"http":{"title":"HTTP","peerDependencies":["javascript","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"json":{"title":"JSON","alias":"jsonp","aliasTitles":{"jsonp":"JSONP"},"owner":"CupOfTea696"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","owner":"japborst"},"less":{"title":"Less","require":"css","owner":"Golmote"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"n4js":{"title":"N4JS","require":"javascript","alias":"n4jsd","owner":"bsmith-n4"},"nasm":{"title":"NASM","owner":"rbmj"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"cpp","peerDependencies":["c","cpp"],"overrideExampleHeader":true,"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"php-extras":{"title":"PHP Extras","require":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":"javascript","peerDependencies":["coffeescript","ejs","handlebars","hogan","less","livescript","markdown","mustache","plates","scss","stylus","swig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","peerDependencies":["c","cpp","fortran","ats","dsp"],"owner":"Golmote"},"python":{"title":"Python","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"ruby":{"title":"Ruby","require":"clike","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sql":{"title":"SQL","owner":"multipetros"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","peerDependencies":"css","owner":"Golmote"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","alias":"ts","owner":"vkbansal"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","owner":"hason"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":"Line Highlight","line-numbers":{"title":"Line Numbers","owner":"kuba-kubula"},"show-invisibles":"Show Invisibles","autolinker":"Autolinker","wpd":"WebPlatform Docs","custom-class":{"title":"Custom Class","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","noCSS":true},"show-language":{"title":"Show Language","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","owner":"Golmote","noCSS":true},"previewers":{"title":"Previewers","owner":"Golmote"},"autoloader":{"title":"Autoloader","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","owner":"Golmote","after":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","owner":"chriswells0"},"unescaped-markup":"Unescaped Markup","normalize-whitespace":{"title":"Normalize Whitespace","owner":"zeitgeist87","after":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","owner":"mAAdhaTTah","require":"toolbar","noCSS":true}}}; if (typeof module !== 'undefined' && module.exports) { module.exports = components; } \ No newline at end of file diff --git a/components.json b/components.json index 101fff9aad..a7297b40a4 100644 --- a/components.json +++ b/components.json @@ -132,6 +132,10 @@ }, "bash": { "title": "Bash", + "alias": "shell", + "aliasTitles": { + "shell": "Shell" + }, "owner": "zeitgeist87" }, "basic": { @@ -221,6 +225,7 @@ }, "docker": { "title": "Docker", + "alias": "dockerfile", "owner": "JustinBeckwith" }, "eiffel": { @@ -371,6 +376,10 @@ }, "json": { "title": "JSON", + "alias": "jsonp", + "aliasTitles": { + "jsonp": "JSONP" + }, "owner": "CupOfTea696" }, "julia": { @@ -401,8 +410,8 @@ }, "lisp": { "title": "Lisp", - "owner": "JuanCaicedo", - "alias": ["emacs", "elisp", "emacs-lisp"] + "alias": ["emacs", "elisp", "emacs-lisp"], + "owner": "JuanCaicedo" }, "livescript": { "title": "LiveScript", @@ -449,6 +458,7 @@ "n4js": { "title": "N4JS", "require": "javascript", + "alias": "n4jsd", "owner": "bsmith-n4" }, "nasm": { @@ -748,8 +758,8 @@ }, "visual-basic": { "title": "Visual Basic", - "owner": "Golmote", - "alias": "vb" + "alias": "vb", + "owner": "Golmote" }, "wasm": { "title": "WebAssembly", @@ -763,6 +773,10 @@ "xeora": { "title": "Xeora", "require": "markup", + "alias": "xeoracube", + "aliasTitles": { + "xeoracube": "XeoraCube" + }, "owner": "freakmaxi" }, "xojo": { @@ -864,4 +878,4 @@ "noCSS": true } } -} \ No newline at end of file +} diff --git a/plugins/show-language/prism-show-language.js b/plugins/show-language/prism-show-language.js index 60497b2f76..176fb06918 100644 --- a/plugins/show-language/prism-show-language.js +++ b/plugins/show-language/prism-show-language.js @@ -11,7 +11,7 @@ if (!Prism.plugins.toolbar) { } // The languages map is built automatically with gulp -var Languages = /*languages_placeholder[*/{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","css":"CSS","clike":"C-like","javascript":"JavaScript","abap":"ABAP","actionscript":"ActionScript","apacheconf":"Apache Configuration","apl":"APL","applescript":"AppleScript","arff":"ARFF","asciidoc":"AsciiDoc","asm6502":"6502 Assembly","aspnet":"ASP.NET (C#)","autohotkey":"AutoHotkey","autoit":"AutoIt","basic":"BASIC","csharp":"C#","cpp":"C++","coffeescript":"CoffeeScript","csp":"Content-Security-Policy","css-extras":"CSS Extras","django":"Django/Jinja2","erb":"ERB","fsharp":"F#","gedcom":"GEDCOM","glsl":"GLSL","graphql":"GraphQL","http":"HTTP","hpkp":"HTTP Public-Key-Pins","hsts":"HTTP Strict-Transport-Security","ichigojam":"IchigoJam","inform7":"Inform 7","json":"JSON","latex":"LaTeX","livescript":"LiveScript","lolcode":"LOLCODE","markup-templating":"Markup templating","matlab":"MATLAB","mel":"MEL","n4js":"N4JS","nasm":"NASM","nginx":"nginx","nsis":"NSIS","objectivec":"Objective-C","ocaml":"OCaml","opencl":"OpenCL","parigp":"PARI/GP","objectpascal":"Object Pascal","php":"PHP","php-extras":"PHP Extras","plsql":"PL/SQL","powershell":"PowerShell","properties":".properties","protobuf":"Protocol Buffers","q":"Q (kdb+ database)","jsx":"React JSX","tsx":"React TSX","renpy":"Ren'py","rest":"reST (reStructuredText)","sas":"SAS","sass":"Sass (Sass)","scss":"Sass (Scss)","sql":"SQL","soy":"Soy (Closure Template)","tap":"TAP","tt2":"Template Toolkit 2","typescript":"TypeScript","vbnet":"VB.Net","vhdl":"VHDL","vim":"vim","visual-basic":"Visual Basic","wasm":"WebAssembly","wiki":"Wiki markup","xojo":"Xojo (REALbasic)","xquery":"XQuery","yaml":"YAML"}/*]*/; +var Languages = /*languages_placeholder[*/{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","css":"CSS","clike":"C-like","javascript":"JavaScript","abap":"ABAP","actionscript":"ActionScript","apacheconf":"Apache Configuration","apl":"APL","applescript":"AppleScript","arff":"ARFF","asciidoc":"AsciiDoc","asm6502":"6502 Assembly","aspnet":"ASP.NET (C#)","autohotkey":"AutoHotkey","autoit":"AutoIt","shell":"Shell","basic":"BASIC","csharp":"C#","cpp":"C++","coffeescript":"CoffeeScript","csp":"Content-Security-Policy","css-extras":"CSS Extras","django":"Django/Jinja2","erb":"ERB","fsharp":"F#","gedcom":"GEDCOM","glsl":"GLSL","graphql":"GraphQL","http":"HTTP","hpkp":"HTTP Public-Key-Pins","hsts":"HTTP Strict-Transport-Security","ichigojam":"IchigoJam","inform7":"Inform 7","json":"JSON","jsonp":"JSONP","latex":"LaTeX","livescript":"LiveScript","lolcode":"LOLCODE","markup-templating":"Markup templating","matlab":"MATLAB","mel":"MEL","n4js":"N4JS","nasm":"NASM","nginx":"nginx","nsis":"NSIS","objectivec":"Objective-C","ocaml":"OCaml","opencl":"OpenCL","parigp":"PARI/GP","objectpascal":"Object Pascal","php":"PHP","php-extras":"PHP Extras","plsql":"PL/SQL","powershell":"PowerShell","properties":".properties","protobuf":"Protocol Buffers","q":"Q (kdb+ database)","jsx":"React JSX","tsx":"React TSX","renpy":"Ren'py","rest":"reST (reStructuredText)","sas":"SAS","sass":"Sass (Sass)","scss":"Sass (Scss)","sql":"SQL","soy":"Soy (Closure Template)","tap":"TAP","tt2":"Template Toolkit 2","typescript":"TypeScript","vbnet":"VB.Net","vhdl":"VHDL","vim":"vim","visual-basic":"Visual Basic","wasm":"WebAssembly","wiki":"Wiki markup","xeoracube":"XeoraCube","xojo":"Xojo (REALbasic)","xquery":"XQuery","yaml":"YAML"}/*]*/; Prism.plugins.toolbar.registerButton('show-language', function(env) { var pre = env.element.parentNode; if (!pre || !/pre/i.test(pre.nodeName)) { diff --git a/plugins/show-language/prism-show-language.min.js b/plugins/show-language/prism-show-language.min.js index b6735335bd..a9a1471fc1 100644 --- a/plugins/show-language/prism-show-language.min.js +++ b/plugins/show-language/prism-show-language.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof self&&self.Prism&&self.document){if(!Prism.plugins.toolbar)return console.warn("Show Languages plugin loaded before Toolbar plugin."),void 0;var e={html:"HTML",xml:"XML",svg:"SVG",mathml:"MathML",css:"CSS",clike:"C-like",javascript:"JavaScript",abap:"ABAP",actionscript:"ActionScript",apacheconf:"Apache Configuration",apl:"APL",applescript:"AppleScript",arff:"ARFF",asciidoc:"AsciiDoc",asm6502:"6502 Assembly",aspnet:"ASP.NET (C#)",autohotkey:"AutoHotkey",autoit:"AutoIt",basic:"BASIC",csharp:"C#",cpp:"C++",coffeescript:"CoffeeScript",csp:"Content-Security-Policy","css-extras":"CSS Extras",django:"Django/Jinja2",erb:"ERB",fsharp:"F#",gedcom:"GEDCOM",glsl:"GLSL",graphql:"GraphQL",http:"HTTP",hpkp:"HTTP Public-Key-Pins",hsts:"HTTP Strict-Transport-Security",ichigojam:"IchigoJam",inform7:"Inform 7",json:"JSON",latex:"LaTeX",livescript:"LiveScript",lolcode:"LOLCODE","markup-templating":"Markup templating",matlab:"MATLAB",mel:"MEL",n4js:"N4JS",nasm:"NASM",nginx:"nginx",nsis:"NSIS",objectivec:"Objective-C",ocaml:"OCaml",opencl:"OpenCL",parigp:"PARI/GP",objectpascal:"Object Pascal",php:"PHP","php-extras":"PHP Extras",plsql:"PL/SQL",powershell:"PowerShell",properties:".properties",protobuf:"Protocol Buffers",q:"Q (kdb+ database)",jsx:"React JSX",tsx:"React TSX",renpy:"Ren'py",rest:"reST (reStructuredText)",sas:"SAS",sass:"Sass (Sass)",scss:"Sass (Scss)",sql:"SQL",soy:"Soy (Closure Template)",tap:"TAP",tt2:"Template Toolkit 2",typescript:"TypeScript",vbnet:"VB.Net",vhdl:"VHDL",vim:"vim","visual-basic":"Visual Basic",wasm:"WebAssembly",wiki:"Wiki markup",xojo:"Xojo (REALbasic)",xquery:"XQuery",yaml:"YAML"};Prism.plugins.toolbar.registerButton("show-language",function(a){var t=a.element.parentNode;if(t&&/pre/i.test(t.nodeName)){var s=t.getAttribute("data-language")||e[a.language]||a.language&&a.language.substring(0,1).toUpperCase()+a.language.substring(1);if(s){var i=document.createElement("span");return i.textContent=s,i}}})}}(); \ No newline at end of file +!function(){if("undefined"!=typeof self&&self.Prism&&self.document){if(!Prism.plugins.toolbar)return console.warn("Show Languages plugin loaded before Toolbar plugin."),void 0;var e={html:"HTML",xml:"XML",svg:"SVG",mathml:"MathML",css:"CSS",clike:"C-like",javascript:"JavaScript",abap:"ABAP",actionscript:"ActionScript",apacheconf:"Apache Configuration",apl:"APL",applescript:"AppleScript",arff:"ARFF",asciidoc:"AsciiDoc",asm6502:"6502 Assembly",aspnet:"ASP.NET (C#)",autohotkey:"AutoHotkey",autoit:"AutoIt",shell:"Shell",basic:"BASIC",csharp:"C#",cpp:"C++",coffeescript:"CoffeeScript",csp:"Content-Security-Policy","css-extras":"CSS Extras",django:"Django/Jinja2",erb:"ERB",fsharp:"F#",gedcom:"GEDCOM",glsl:"GLSL",graphql:"GraphQL",http:"HTTP",hpkp:"HTTP Public-Key-Pins",hsts:"HTTP Strict-Transport-Security",ichigojam:"IchigoJam",inform7:"Inform 7",json:"JSON",jsonp:"JSONP",latex:"LaTeX",livescript:"LiveScript",lolcode:"LOLCODE","markup-templating":"Markup templating",matlab:"MATLAB",mel:"MEL",n4js:"N4JS",nasm:"NASM",nginx:"nginx",nsis:"NSIS",objectivec:"Objective-C",ocaml:"OCaml",opencl:"OpenCL",parigp:"PARI/GP",objectpascal:"Object Pascal",php:"PHP","php-extras":"PHP Extras",plsql:"PL/SQL",powershell:"PowerShell",properties:".properties",protobuf:"Protocol Buffers",q:"Q (kdb+ database)",jsx:"React JSX",tsx:"React TSX",renpy:"Ren'py",rest:"reST (reStructuredText)",sas:"SAS",sass:"Sass (Sass)",scss:"Sass (Scss)",sql:"SQL",soy:"Soy (Closure Template)",tap:"TAP",tt2:"Template Toolkit 2",typescript:"TypeScript",vbnet:"VB.Net",vhdl:"VHDL",vim:"vim","visual-basic":"Visual Basic",wasm:"WebAssembly",wiki:"Wiki markup",xeoracube:"XeoraCube",xojo:"Xojo (REALbasic)",xquery:"XQuery",yaml:"YAML"};Prism.plugins.toolbar.registerButton("show-language",function(a){var t=a.element.parentNode;if(t&&/pre/i.test(t.nodeName)){var s=t.getAttribute("data-language")||e[a.language]||a.language&&a.language.substring(0,1).toUpperCase()+a.language.substring(1);if(s){var i=document.createElement("span");return i.textContent=s,i}}})}}(); \ No newline at end of file From 74916d48bde7c34fab202c06afd6cb7ee24a1928 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Sun, 19 Aug 2018 16:54:25 +0200 Subject: [PATCH 0058/1100] Fixed empty link in extending (#1507) --- extending.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extending.html b/extending.html index 11c647f787..59101b6ff9 100644 --- a/extending.html +++ b/extending.html @@ -137,7 +137,7 @@

    Writing plugins

    } });

    Of course, to understand which hooks to use you would have to read Prism’s source. Imagine where you would add your code and then find the appropriate hook. - If there is no hook you can use, you may request one to be added, detailing why you need it there. + If there is no hook you can use, you may request one to be added, detailing why you need it there.

    From c322fc802b6f1c1504f4eb4e33bb5e75cc28ece4 Mon Sep 17 00:00:00 2001 From: Thomas Steiner Date: Sun, 19 Aug 2018 16:55:06 +0200 Subject: [PATCH 0059/1100] Correct typo (#1508) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Corrects “accomodate” to spell “accommodate”. --- themes/prism-coy.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/themes/prism-coy.css b/themes/prism-coy.css index 1127bbe37d..d05855cba3 100644 --- a/themes/prism-coy.css +++ b/themes/prism-coy.css @@ -52,7 +52,7 @@ code[class*="language"] { overflow: auto; } -/* Margin bottom to accomodate shadow */ +/* Margin bottom to accommodate shadow */ :not(pre) > code[class*="language-"], pre[class*="language-"] { background-color: #fdfdfd; From e63d159729c1658c4bf6fc4996663b74fb40542f Mon Sep 17 00:00:00 2001 From: Valtteri Laitinen Date: Sun, 19 Aug 2018 17:56:44 +0300 Subject: [PATCH 0060/1100] Set default indentation size (#1516) Updates the .editorconfig to display tabs as four spaces. --- .editorconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/.editorconfig b/.editorconfig index bf094abefc..b2e4603bf0 100644 --- a/.editorconfig +++ b/.editorconfig @@ -4,6 +4,7 @@ root = true insert_final_newline = false charset = utf-8 indent_style = tab +indent_size = 4 [tests/languages/**.test] end_of_line = crlf From 7af8f8bec0f32f02ed6d5ceee1f3e2cc38fb25bc Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Sun, 19 Aug 2018 17:09:29 +0200 Subject: [PATCH 0061/1100] C/C++/Java operator update (#1528) This PR extends and updates the operators of C, C++, and Java. Java and C++ now support the -> operator. (C++ had a bug.) The tests of all languages were updated and the operator pattern for each language is now shorter. --- components/prism-c.js | 2 +- components/prism-c.min.js | 2 +- components/prism-cpp.js | 2 +- components/prism-cpp.min.js | 2 +- components/prism-java.js | 2 +- components/prism-java.min.js | 2 +- tests/languages/c/operator_feature.test | 64 +++++++++++++++---- tests/languages/cpp/operator_feature.test | 73 ++++++++++++++++++++++ tests/languages/java/operator_feature.test | 8 ++- 9 files changed, 138 insertions(+), 19 deletions(-) create mode 100644 tests/languages/cpp/operator_feature.test diff --git a/components/prism-c.js b/components/prism-c.js index 86ffac02d2..ea2452daaf 100644 --- a/components/prism-c.js +++ b/components/prism-c.js @@ -1,6 +1,6 @@ Prism.languages.c = Prism.languages.extend('clike', { 'keyword': /\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|asm|typeof|inline|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|union|unsigned|void|volatile|while)\b/, - 'operator': /-[>-]?|\+\+?|!=?|<>?=?|==?|&&?|\|\|?|[~^%?*\/]/, + 'operator': />>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/, 'number': /(?:\b0x[\da-f]+|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?)[ful]*/i }); diff --git a/components/prism-c.min.js b/components/prism-c.min.js index 764ba0c8ef..78b49c98e8 100644 --- a/components/prism-c.min.js +++ b/components/prism-c.min.js @@ -1 +1 @@ -Prism.languages.c=Prism.languages.extend("clike",{keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|asm|typeof|inline|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|union|unsigned|void|volatile|while)\b/,operator:/-[>-]?|\+\+?|!=?|<>?=?|==?|&&?|\|\|?|[~^%?*\/]/,number:/(?:\b0x[\da-f]+|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?)[ful]*/i}),Prism.languages.insertBefore("c","string",{macro:{pattern:/(^\s*)#\s*[a-z]+(?:[^\r\n\\]|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,alias:"property",inside:{string:{pattern:/(#\s*include\s*)(?:<.+?>|("|')(?:\\?.)+?\2)/,lookbehind:!0},directive:{pattern:/(#\s*)\b(?:define|defined|elif|else|endif|error|ifdef|ifndef|if|import|include|line|pragma|undef|using)\b/,lookbehind:!0,alias:"keyword"}}},constant:/\b(?:__FILE__|__LINE__|__DATE__|__TIME__|__TIMESTAMP__|__func__|EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|stdin|stdout|stderr)\b/}),delete Prism.languages.c["class-name"],delete Prism.languages.c["boolean"]; \ No newline at end of file +Prism.languages.c=Prism.languages.extend("clike",{keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|asm|typeof|inline|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|union|unsigned|void|volatile|while)\b/,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*\/%&|^!=<>]=?/,number:/(?:\b0x[\da-f]+|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?)[ful]*/i}),Prism.languages.insertBefore("c","string",{macro:{pattern:/(^\s*)#\s*[a-z]+(?:[^\r\n\\]|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,alias:"property",inside:{string:{pattern:/(#\s*include\s*)(?:<.+?>|("|')(?:\\?.)+?\2)/,lookbehind:!0},directive:{pattern:/(#\s*)\b(?:define|defined|elif|else|endif|error|ifdef|ifndef|if|import|include|line|pragma|undef|using)\b/,lookbehind:!0,alias:"keyword"}}},constant:/\b(?:__FILE__|__LINE__|__DATE__|__TIME__|__TIMESTAMP__|__func__|EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|stdin|stdout|stderr)\b/}),delete Prism.languages.c["class-name"],delete Prism.languages.c["boolean"]; \ No newline at end of file diff --git a/components/prism-cpp.js b/components/prism-cpp.js index 1228e0f7cf..3d66ba252a 100644 --- a/components/prism-cpp.js +++ b/components/prism-cpp.js @@ -1,7 +1,7 @@ Prism.languages.cpp = Prism.languages.extend('c', { 'keyword': /\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|class|compl|const|constexpr|const_cast|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|float|for|friend|goto|if|inline|int|int8_t|int16_t|int32_t|int64_t|uint8_t|uint16_t|uint32_t|uint64_t|long|mutable|namespace|new|noexcept|nullptr|operator|private|protected|public|register|reinterpret_cast|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/, 'boolean': /\b(?:true|false)\b/, - 'operator': /--?|\+\+?|!=?|<{1,2}=?|>{1,2}=?|->|:{1,2}|={1,2}|\^|~|%|&{1,2}|\|\|?|\?|\*|\/|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/ + 'operator': />>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/ }); Prism.languages.insertBefore('cpp', 'keyword', { diff --git a/components/prism-cpp.min.js b/components/prism-cpp.min.js index 4383accdab..c0c6a0071c 100644 --- a/components/prism-cpp.min.js +++ b/components/prism-cpp.min.js @@ -1 +1 @@ -Prism.languages.cpp=Prism.languages.extend("c",{keyword:/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|class|compl|const|constexpr|const_cast|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|float|for|friend|goto|if|inline|int|int8_t|int16_t|int32_t|int64_t|uint8_t|uint16_t|uint32_t|uint64_t|long|mutable|namespace|new|noexcept|nullptr|operator|private|protected|public|register|reinterpret_cast|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,"boolean":/\b(?:true|false)\b/,operator:/--?|\+\+?|!=?|<{1,2}=?|>{1,2}=?|->|:{1,2}|={1,2}|\^|~|%|&{1,2}|\|\|?|\?|\*|\/|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/}),Prism.languages.insertBefore("cpp","keyword",{"class-name":{pattern:/(class\s+)\w+/i,lookbehind:!0}}),Prism.languages.insertBefore("cpp","string",{"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}); \ No newline at end of file +Prism.languages.cpp=Prism.languages.extend("c",{keyword:/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|class|compl|const|constexpr|const_cast|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|float|for|friend|goto|if|inline|int|int8_t|int16_t|int32_t|int64_t|uint8_t|uint16_t|uint32_t|uint64_t|long|mutable|namespace|new|noexcept|nullptr|operator|private|protected|public|register|reinterpret_cast|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,"boolean":/\b(?:true|false)\b/,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*\/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/}),Prism.languages.insertBefore("cpp","keyword",{"class-name":{pattern:/(class\s+)\w+/i,lookbehind:!0}}),Prism.languages.insertBefore("cpp","string",{"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}); \ No newline at end of file diff --git a/components/prism-java.js b/components/prism-java.js index 881b3067a0..67199692f9 100644 --- a/components/prism-java.js +++ b/components/prism-java.js @@ -2,7 +2,7 @@ Prism.languages.java = Prism.languages.extend('clike', { 'keyword': /\b(?:abstract|continue|for|new|switch|assert|default|goto|package|synchronized|boolean|do|if|private|this|break|double|implements|protected|throw|byte|else|import|public|throws|case|enum|instanceof|return|transient|catch|extends|int|short|try|char|final|interface|static|void|class|finally|long|strictfp|volatile|const|float|native|super|while)\b/, 'number': /\b0b[01]+\b|\b0x[\da-f]*\.?[\da-fp-]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?[df]?/i, 'operator': { - pattern: /(^|[^.])(?:\+[+=]?|-[-=]?|!=?|<>?>?=?|==?|&[&=]?|\|[|=]?|\*=?|\/=?|%=?|\^=?|[?:~])/m, + pattern: /(^|[^.])(?:<<=?|>>>?=?|->|([-+&|])\2|[?:~]|[-+*/%&|^!=<>]=?)/m, lookbehind: true } }); diff --git a/components/prism-java.min.js b/components/prism-java.min.js index e583b73ea5..24c928c4e9 100644 --- a/components/prism-java.min.js +++ b/components/prism-java.min.js @@ -1 +1 @@ -Prism.languages.java=Prism.languages.extend("clike",{keyword:/\b(?:abstract|continue|for|new|switch|assert|default|goto|package|synchronized|boolean|do|if|private|this|break|double|implements|protected|throw|byte|else|import|public|throws|case|enum|instanceof|return|transient|catch|extends|int|short|try|char|final|interface|static|void|class|finally|long|strictfp|volatile|const|float|native|super|while)\b/,number:/\b0b[01]+\b|\b0x[\da-f]*\.?[\da-fp-]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?[df]?/i,operator:{pattern:/(^|[^.])(?:\+[+=]?|-[-=]?|!=?|<>?>?=?|==?|&[&=]?|\|[|=]?|\*=?|\/=?|%=?|\^=?|[?:~])/m,lookbehind:!0}}),Prism.languages.insertBefore("java","function",{annotation:{alias:"punctuation",pattern:/(^|[^.])@\w+/,lookbehind:!0}}),Prism.languages.insertBefore("java","class-name",{generics:{pattern:/<\s*\w+(?:\.\w+)?(?:\s*,\s*\w+(?:\.\w+)?)*>/i,alias:"function",inside:{keyword:Prism.languages.java.keyword,punctuation:/[<>(),.:]/}}}); \ No newline at end of file +Prism.languages.java=Prism.languages.extend("clike",{keyword:/\b(?:abstract|continue|for|new|switch|assert|default|goto|package|synchronized|boolean|do|if|private|this|break|double|implements|protected|throw|byte|else|import|public|throws|case|enum|instanceof|return|transient|catch|extends|int|short|try|char|final|interface|static|void|class|finally|long|strictfp|volatile|const|float|native|super|while)\b/,number:/\b0b[01]+\b|\b0x[\da-f]*\.?[\da-fp-]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?[df]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|([-+&|])\2|[?:~]|[-+*\/%&|^!=<>]=?)/m,lookbehind:!0}}),Prism.languages.insertBefore("java","function",{annotation:{alias:"punctuation",pattern:/(^|[^.])@\w+/,lookbehind:!0}}),Prism.languages.insertBefore("java","class-name",{generics:{pattern:/<\s*\w+(?:\.\w+)?(?:\s*,\s*\w+(?:\.\w+)?)*>/i,alias:"function",inside:{keyword:Prism.languages.java.keyword,punctuation:/[<>(),.:]/}}}); \ No newline at end of file diff --git a/tests/languages/c/operator_feature.test b/tests/languages/c/operator_feature.test index fdcfb19e99..95cef64674 100644 --- a/tests/languages/c/operator_feature.test +++ b/tests/languages/c/operator_feature.test @@ -1,19 +1,61 @@ -+ - ++ -- ! != -< << <= <<= -> >> >= >>= --> == ^ ~ % -& && | || ? * / ++ - * / % -- ++ +>> << +~ & | ^ ++= -= *= /= %= >>= <<= &= |= ^= +! && || +-> :: +? : += == != < > <= >= ---------------------------------------------------- [ - ["operator", "+"], ["operator", "-"], ["operator", "++"], ["operator", "--"], ["operator", "!"], ["operator", "!="], - ["operator", "<"], ["operator", "<<"], ["operator", "<="], ["operator", "<<="], - ["operator", ">"], ["operator", ">>"], ["operator", ">="], ["operator", ">>="], - ["operator", "->"], ["operator", "=="], ["operator", "^"], ["operator", "~"], ["operator", "%"], - ["operator", "&"], ["operator", "&&"], ["operator", "|"], ["operator", "||"], ["operator", "?"], ["operator", "*"], ["operator", "/"] + ["operator", "+"], + ["operator", "-"], + ["operator", "*"], + ["operator", "/"], + ["operator", "%"], + ["operator", "--"], + ["operator", "++"], + + ["operator", ">>"], + ["operator", "<<"], + + ["operator", "~"], + ["operator", "&"], + ["operator", "|"], + ["operator", "^"], + + ["operator", "+="], + ["operator", "-="], + ["operator", "*="], + ["operator", "/="], + ["operator", "%="], + ["operator", ">>="], + ["operator", "<<="], + ["operator", "&="], + ["operator", "|="], + ["operator", "^="], + + ["operator", "!"], + ["operator", "&&"], + ["operator", "||"], + + ["operator", "->"], + ["operator", "::"], + + ["operator", "?"], + ["operator", ":"], + + ["operator", "="], + ["operator", "=="], + ["operator", "!="], + ["operator", "<"], + ["operator", ">"], + ["operator", "<="], + ["operator", ">="] ] ---------------------------------------------------- -Checks for all operators \ No newline at end of file +Checks for all operators diff --git a/tests/languages/cpp/operator_feature.test b/tests/languages/cpp/operator_feature.test new file mode 100644 index 0000000000..a29f08ea5b --- /dev/null +++ b/tests/languages/cpp/operator_feature.test @@ -0,0 +1,73 @@ ++ - * / % -- ++ +>> << +~ & | ^ ++= -= *= /= %= >>= <<= &= |= ^= +! && || +-> :: +? : += == != < > <= >= +and and_eq bitand bitor not not_eq or or_eq xor xor_eq + +---------------------------------------------------- + +[ + ["operator", "+"], + ["operator", "-"], + ["operator", "*"], + ["operator", "/"], + ["operator", "%"], + ["operator", "--"], + ["operator", "++"], + + ["operator", ">>"], + ["operator", "<<"], + + ["operator", "~"], + ["operator", "&"], + ["operator", "|"], + ["operator", "^"], + + ["operator", "+="], + ["operator", "-="], + ["operator", "*="], + ["operator", "/="], + ["operator", "%="], + ["operator", ">>="], + ["operator", "<<="], + ["operator", "&="], + ["operator", "|="], + ["operator", "^="], + + ["operator", "!"], + ["operator", "&&"], + ["operator", "||"], + + ["operator", "->"], + ["operator", "::"], + + ["operator", "?"], + ["operator", ":"], + + ["operator", "="], + ["operator", "=="], + ["operator", "!="], + ["operator", "<"], + ["operator", ">"], + ["operator", "<="], + ["operator", ">="], + + ["operator", "and"], + ["operator", "and_eq"], + ["operator", "bitand"], + ["operator", "bitor"], + ["operator", "not"], + ["operator", "not_eq"], + ["operator", "or"], + ["operator", "or_eq"], + ["operator", "xor"], + ["operator", "xor_eq"] +] + +---------------------------------------------------- + +Checks for all operators. diff --git a/tests/languages/java/operator_feature.test b/tests/languages/java/operator_feature.test index 87f4906b6d..8c8eb39311 100644 --- a/tests/languages/java/operator_feature.test +++ b/tests/languages/java/operator_feature.test @@ -7,9 +7,11 @@ & && &= | || |= ? : ~ +^ ^= * *= / /= % %= +-> ---------------------------------------------------- @@ -23,11 +25,13 @@ ["operator", "&"], ["operator", "&&"], ["operator", "&="], ["operator", "|"], ["operator", "||"], ["operator", "|="], ["operator", "?"], ["operator", ":"], ["operator", "~"], + ["operator", "^"], ["operator", "^="], ["operator", "*"], ["operator", "*="], ["operator", "/"], ["operator", "/="], - ["operator", "%"], ["operator", "%="] + ["operator", "%"], ["operator", "%="], + ["operator", "->"] ] ---------------------------------------------------- -Checks for all operators. \ No newline at end of file +Checks for all operators. From 0f75d9d424f738fd9ef08e4bd475d8ce629a0a97 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Sun, 19 Aug 2018 18:18:03 +0200 Subject: [PATCH 0062/1100] Fixed that selector pattern can take exponential time (#1499) Fixes #1498. --- components/prism-scss.js | 4 ++-- components/prism-scss.min.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/components/prism-scss.js b/components/prism-scss.js index 3b2fee6409..e8494560fc 100644 --- a/components/prism-scss.js +++ b/components/prism-scss.js @@ -21,7 +21,7 @@ Prism.languages.scss = Prism.languages.extend('css', { // this one was hard to do, so please be careful if you edit this one :) 'selector': { // Initial look-ahead is used to prevent matching of blank selectors - pattern: /(?=\S)[^@;{}()]?(?:[^@;{}()]|&|#\{\$[-\w]+\})+(?=\s*\{(?:\}|\s|[^}]+[:{][^}]+))/m, + pattern: /(?=\S)[^@;{}()]?(?:[^@;{}()]|#\{\$[-\w]+\})+(?=\s*\{(?:\}|\s|[^}]+[:{][^}]+))/m, inside: { 'parent': { pattern: /&/, @@ -72,4 +72,4 @@ Prism.languages.insertBefore('scss', 'function', { } }); -Prism.languages.scss['atrule'].inside.rest = Prism.languages.scss; \ No newline at end of file +Prism.languages.scss['atrule'].inside.rest = Prism.languages.scss; diff --git a/components/prism-scss.min.js b/components/prism-scss.min.js index 245db662e1..b03568e479 100644 --- a/components/prism-scss.min.js +++ b/components/prism-scss.min.js @@ -1 +1 @@ -Prism.languages.scss=Prism.languages.extend("css",{comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0},atrule:{pattern:/@[\w-]+(?:\([^()]+\)|[^(])*?(?=\s+[{;])/,inside:{rule:/@[\w-]+/}},url:/(?:[-a-z]+-)*url(?=\()/i,selector:{pattern:/(?=\S)[^@;{}()]?(?:[^@;{}()]|&|#\{\$[-\w]+\})+(?=\s*\{(?:\}|\s|[^}]+[:{][^}]+))/m,inside:{parent:{pattern:/&/,alias:"important"},placeholder:/%[-\w]+/,variable:/\$[-\w]+|#\{\$[-\w]+\}/}}}),Prism.languages.insertBefore("scss","atrule",{keyword:[/@(?:if|else(?: if)?|for|each|while|import|extend|debug|warn|mixin|include|function|return|content)/i,{pattern:/( +)(?:from|through)(?= )/,lookbehind:!0}]}),Prism.languages.scss.property={pattern:/(?:[\w-]|\$[-\w]+|#\{\$[-\w]+\})+(?=\s*:)/i,inside:{variable:/\$[-\w]+|#\{\$[-\w]+\}/}},Prism.languages.insertBefore("scss","important",{variable:/\$[-\w]+|#\{\$[-\w]+\}/}),Prism.languages.insertBefore("scss","function",{placeholder:{pattern:/%[-\w]+/,alias:"selector"},statement:{pattern:/\B!(?:default|optional)\b/i,alias:"keyword"},"boolean":/\b(?:true|false)\b/,"null":/\bnull\b/,operator:{pattern:/(\s)(?:[-+*\/%]|[=!]=|<=?|>=?|and|or|not)(?=\s)/,lookbehind:!0}}),Prism.languages.scss.atrule.inside.rest=Prism.languages.scss; \ No newline at end of file +Prism.languages.scss=Prism.languages.extend("css",{comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0},atrule:{pattern:/@[\w-]+(?:\([^()]+\)|[^(])*?(?=\s+[{;])/,inside:{rule:/@[\w-]+/}},url:/(?:[-a-z]+-)*url(?=\()/i,selector:{pattern:/(?=\S)[^@;{}()]?(?:[^@;{}()]|#\{\$[-\w]+\})+(?=\s*\{(?:\}|\s|[^}]+[:{][^}]+))/m,inside:{parent:{pattern:/&/,alias:"important"},placeholder:/%[-\w]+/,variable:/\$[-\w]+|#\{\$[-\w]+\}/}}}),Prism.languages.insertBefore("scss","atrule",{keyword:[/@(?:if|else(?: if)?|for|each|while|import|extend|debug|warn|mixin|include|function|return|content)/i,{pattern:/( +)(?:from|through)(?= )/,lookbehind:!0}]}),Prism.languages.scss.property={pattern:/(?:[\w-]|\$[-\w]+|#\{\$[-\w]+\})+(?=\s*:)/i,inside:{variable:/\$[-\w]+|#\{\$[-\w]+\}/}},Prism.languages.insertBefore("scss","important",{variable:/\$[-\w]+|#\{\$[-\w]+\}/}),Prism.languages.insertBefore("scss","function",{placeholder:{pattern:/%[-\w]+/,alias:"selector"},statement:{pattern:/\B!(?:default|optional)\b/i,alias:"keyword"},"boolean":/\b(?:true|false)\b/,"null":/\bnull\b/,operator:{pattern:/(\s)(?:[-+*\/%]|[=!]=|<=?|>=?|and|or|not)(?=\s)/,lookbehind:!0}}),Prism.languages.scss.atrule.inside.rest=Prism.languages.scss; \ No newline at end of file From c40f604714182fdec56d6f2d5955f2c2995a5758 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Sun, 19 Aug 2018 20:28:57 +0200 Subject: [PATCH 0063/1100] Highlighting of supposed classes and functions (#1482) Fixes #1471. It also extends function-variable to include object properties. e.g. ```js {foo: function() {}} ``` --- components/prism-javascript.js | 10 +++-- components/prism-javascript.min.js | 2 +- prism.js | 10 +++-- .../javascript/function-variable_feature.test | 5 ++- .../javascript/supposed-classes_feature.test | 22 +++++++++++ .../javascript/supposed-function_feature.test | 38 +++++++++++++++++++ 6 files changed, 79 insertions(+), 8 deletions(-) create mode 100644 tests/languages/javascript/supposed-classes_feature.test create mode 100644 tests/languages/javascript/supposed-function_feature.test diff --git a/components/prism-javascript.js b/components/prism-javascript.js index 47853d3e0b..2c919b1b29 100644 --- a/components/prism-javascript.js +++ b/components/prism-javascript.js @@ -1,4 +1,8 @@ Prism.languages.javascript = Prism.languages.extend('clike', { + 'class-name': [ + Prism.languages.clike['class-name'], + /[_$A-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\.(?:prototype|constructor))/ + ], 'keyword': [ { pattern: /((?:^|})\s*)(?:catch|finally)\b/, @@ -8,11 +12,11 @@ Prism.languages.javascript = Prism.languages.extend('clike', { ], 'number': /\b(?:0[xX][\dA-Fa-f]+|0[bB][01]+|0[oO][0-7]+|NaN|Infinity)\b|(?:\b\d+\.?\d*|\B\.\d+)(?:[Ee][+-]?\d+)?/, // Allow for all non-ASCII characters (See http://stackoverflow.com/a/2008444) - 'function': /[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*\()/i, + 'function': /[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*\(|\.(?:apply|bind|call)\()/, 'operator': /-[-=]?|\+[+=]?|!=?=?|<>?>?=?|=(?:==?|>)?|&[&=]?|\|[|=]?|\*\*?=?|\/=?|~|\^=?|%=?|\?|\.{3}/ }); -Prism.languages.javascript['class-name'].pattern = /(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/ +Prism.languages.javascript['class-name'][0].pattern = /(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/ Prism.languages.insertBefore('javascript', 'keyword', { 'regex': { @@ -22,7 +26,7 @@ Prism.languages.insertBefore('javascript', 'keyword', { }, // This must be declared before keyword because we use "function" inside the look-forward 'function-variable': { - pattern: /[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*=\s*(?:function\b|(?:\([^()]*\)|[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/i, + pattern: /[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*[=:]\s*(?:function\b|(?:\([^()]*\)|[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/i, alias: 'function' }, 'constant': /\b[A-Z][A-Z\d_]*\b/ diff --git a/components/prism-javascript.min.js b/components/prism-javascript.min.js index 29cfee7d0a..cf4284b8a1 100644 --- a/components/prism-javascript.min.js +++ b/components/prism-javascript.min.js @@ -1 +1 @@ -Prism.languages.javascript=Prism.languages.extend("clike",{keyword:[{pattern:/((?:^|})\s*)(?:catch|finally)\b/,lookbehind:!0},/\b(?:as|async|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|var|void|while|with|yield)\b/],number:/\b(?:0[xX][\dA-Fa-f]+|0[bB][01]+|0[oO][0-7]+|NaN|Infinity)\b|(?:\b\d+\.?\d*|\B\.\d+)(?:[Ee][+-]?\d+)?/,"function":/[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*\()/i,operator:/-[-=]?|\+[+=]?|!=?=?|<>?>?=?|=(?:==?|>)?|&[&=]?|\|[|=]?|\*\*?=?|\/=?|~|\^=?|%=?|\?|\.{3}/}),Prism.languages.javascript["class-name"].pattern=/(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/,Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s])\s*)\/(\[[^\]\r\n]+]|\\.|[^\/\\\[\r\n])+\/[gimyu]{0,5}(?=\s*($|[\r\n,.;})\]]))/,lookbehind:!0,greedy:!0},"function-variable":{pattern:/[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*=\s*(?:function\b|(?:\([^()]*\)|[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/i,alias:"function"},constant:/\b[A-Z][A-Z\d_]*\b/}),Prism.languages.insertBefore("javascript","string",{"template-string":{pattern:/`(?:\\[\s\S]|\${[^}]+}|[^\\`])*`/,greedy:!0,inside:{interpolation:{pattern:/\${[^}]+}/,inside:{"interpolation-punctuation":{pattern:/^\${|}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}}}),Prism.languages.markup&&Prism.languages.insertBefore("markup","tag",{script:{pattern:/()[\s\S]*?(?=<\/script>)/i,lookbehind:!0,inside:Prism.languages.javascript,alias:"language-javascript",greedy:!0}}),Prism.languages.js=Prism.languages.javascript; \ No newline at end of file +Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],/[_$A-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\.(?:prototype|constructor))/],keyword:[{pattern:/((?:^|})\s*)(?:catch|finally)\b/,lookbehind:!0},/\b(?:as|async|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|var|void|while|with|yield)\b/],number:/\b(?:0[xX][\dA-Fa-f]+|0[bB][01]+|0[oO][0-7]+|NaN|Infinity)\b|(?:\b\d+\.?\d*|\B\.\d+)(?:[Ee][+-]?\d+)?/,"function":/[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*\(|\.(?:apply|bind|call)\()/,operator:/-[-=]?|\+[+=]?|!=?=?|<>?>?=?|=(?:==?|>)?|&[&=]?|\|[|=]?|\*\*?=?|\/=?|~|\^=?|%=?|\?|\.{3}/}),Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/,Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s])\s*)\/(\[[^\]\r\n]+]|\\.|[^\/\\\[\r\n])+\/[gimyu]{0,5}(?=\s*($|[\r\n,.;})\]]))/,lookbehind:!0,greedy:!0},"function-variable":{pattern:/[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*[=:]\s*(?:function\b|(?:\([^()]*\)|[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/i,alias:"function"},constant:/\b[A-Z][A-Z\d_]*\b/}),Prism.languages.insertBefore("javascript","string",{"template-string":{pattern:/`(?:\\[\s\S]|\${[^}]+}|[^\\`])*`/,greedy:!0,inside:{interpolation:{pattern:/\${[^}]+}/,inside:{"interpolation-punctuation":{pattern:/^\${|}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}}}),Prism.languages.markup&&Prism.languages.insertBefore("markup","tag",{script:{pattern:/()[\s\S]*?(?=<\/script>)/i,lookbehind:!0,inside:Prism.languages.javascript,alias:"language-javascript",greedy:!0}}),Prism.languages.js=Prism.languages.javascript; \ No newline at end of file diff --git a/prism.js b/prism.js index b48a825af2..a0bc986557 100644 --- a/prism.js +++ b/prism.js @@ -725,6 +725,10 @@ Prism.languages.clike = { ********************************************** */ Prism.languages.javascript = Prism.languages.extend('clike', { + 'class-name': [ + Prism.languages.clike['class-name'], + /[_$A-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\.(?:prototype|constructor))/ + ], 'keyword': [ { pattern: /((?:^|})\s*)(?:catch|finally)\b/, @@ -734,11 +738,11 @@ Prism.languages.javascript = Prism.languages.extend('clike', { ], 'number': /\b(?:0[xX][\dA-Fa-f]+|0[bB][01]+|0[oO][0-7]+|NaN|Infinity)\b|(?:\b\d+\.?\d*|\B\.\d+)(?:[Ee][+-]?\d+)?/, // Allow for all non-ASCII characters (See http://stackoverflow.com/a/2008444) - 'function': /[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*\()/i, + 'function': /[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*\(|\.(?:apply|bind|call)\()/, 'operator': /-[-=]?|\+[+=]?|!=?=?|<>?>?=?|=(?:==?|>)?|&[&=]?|\|[|=]?|\*\*?=?|\/=?|~|\^=?|%=?|\?|\.{3}/ }); -Prism.languages.javascript['class-name'].pattern = /(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/ +Prism.languages.javascript['class-name'][0].pattern = /(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/ Prism.languages.insertBefore('javascript', 'keyword', { 'regex': { @@ -748,7 +752,7 @@ Prism.languages.insertBefore('javascript', 'keyword', { }, // This must be declared before keyword because we use "function" inside the look-forward 'function-variable': { - pattern: /[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*=\s*(?:function\b|(?:\([^()]*\)|[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/i, + pattern: /[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*[=:]\s*(?:function\b|(?:\([^()]*\)|[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/i, alias: 'function' }, 'constant': /\b[A-Z][A-Z\d_]*\b/ diff --git a/tests/languages/javascript/function-variable_feature.test b/tests/languages/javascript/function-variable_feature.test index c27095e703..689fb4e923 100644 --- a/tests/languages/javascript/function-variable_feature.test +++ b/tests/languages/javascript/function-variable_feature.test @@ -1,4 +1,5 @@ foo = function () {} +{foo: function () {}} bar = function baz () {} fooBar = x => x ಠ_ಠ = () => {} @@ -9,6 +10,8 @@ fooBar = x => x [ ["function-variable", "foo"], ["operator", "="], ["keyword", "function"], ["punctuation", "("], ["punctuation", ")"], ["punctuation", "{"], ["punctuation", "}"], + ["punctuation", "{"], ["function-variable", "foo"], ["punctuation", ":"], ["keyword", "function"], + ["punctuation", "("], ["punctuation", ")"], ["punctuation", "{"],["punctuation","}"],["punctuation","}"], ["function-variable", "bar"], ["operator", "="], ["keyword", "function"], ["function", "baz"], ["punctuation", "("], ["punctuation", ")"], ["punctuation", "{"], ["punctuation", "}"], ["function-variable", "fooBar"], ["operator", "="], " x ", ["operator", "=>"], " x\r\n", @@ -21,4 +24,4 @@ fooBar = x => x ---------------------------------------------------- -Checks for variables obviously containing functions. \ No newline at end of file +Checks for variables obviously containing functions. diff --git a/tests/languages/javascript/supposed-classes_feature.test b/tests/languages/javascript/supposed-classes_feature.test new file mode 100644 index 0000000000..8d0570873e --- /dev/null +++ b/tests/languages/javascript/supposed-classes_feature.test @@ -0,0 +1,22 @@ +Foo.prototype.bar; +Bar.constructor; + +---------------------------------------------------- + +[ + ["class-name", "Foo"], + ["punctuation", "."], + "prototype", + ["punctuation", "."], + "bar", + ["punctuation", ";"], + + ["class-name", "Bar"], + ["punctuation", "."], + "constructor", + ["punctuation", ";"] +] + +---------------------------------------------------- + +Checks for supposed function variables based on standard function invocations or modifications. diff --git a/tests/languages/javascript/supposed-function_feature.test b/tests/languages/javascript/supposed-function_feature.test new file mode 100644 index 0000000000..7568de9b79 --- /dev/null +++ b/tests/languages/javascript/supposed-function_feature.test @@ -0,0 +1,38 @@ +foo.apply(thisArg, args); +bar.call(...args); +fooBar.bind(thisArg); + +---------------------------------------------------- + +[ + ["function", "foo"], + ["punctuation", "."], + ["function", "apply"], + ["punctuation", "("], + "thisArg", + ["punctuation", ","], + " args", + ["punctuation", ")"], + ["punctuation", ";"], + + ["function", "bar"], + ["punctuation", "."], + ["function", "call"], + ["punctuation", "("], + ["operator", "..."], + "args", + ["punctuation", ")"], + ["punctuation", ";"], + + ["function", "fooBar"], + ["punctuation", "."], + ["function", "bind"], + ["punctuation", "("], + "thisArg", + ["punctuation", ")"], + ["punctuation", ";"] +] + +---------------------------------------------------- + +Checks for supposed function variables based on standard function invocations or modifications. From 3e1a9a3d2fddd2a2b7a655a79a01c6468ace5cb0 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Mon, 20 Aug 2018 16:22:11 +0200 Subject: [PATCH 0064/1100] React component tags are styled as classes in JSX (#1519) The PR adds a class-name alias to all the tags of React components. Tags which start with an uppercase letter are considered React components. HTML tags remain unchanged. Fixes #1518. --- components/prism-jsx.js | 1 + components/prism-jsx.min.js | 2 +- tests/languages/jsx/issue1235.test | 4 ++-- tests/languages/jsx/issue1236.test | 4 ++-- tests/languages/jsx/issue1335.test | 10 +++++----- tests/languages/jsx/issue1342.test | 6 +++--- tests/languages/jsx/issue1364.test | 4 ++-- tests/languages/jsx/tag_feature.test | 4 ++-- tests/languages/tsx/tag_feature.test | 4 ++-- 9 files changed, 20 insertions(+), 19 deletions(-) diff --git a/components/prism-jsx.js b/components/prism-jsx.js index 43a09d8540..970acb7402 100644 --- a/components/prism-jsx.js +++ b/components/prism-jsx.js @@ -7,6 +7,7 @@ Prism.languages.jsx.tag.pattern= /<\/?(?:[\w.:-]+\s*(?:\s+(?:[\w.:-]+(?:=(?:("|' Prism.languages.jsx.tag.inside['tag'].pattern = /^<\/?[^\s>\/]*/i; Prism.languages.jsx.tag.inside['attr-value'].pattern = /=(?!\{)(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s'">]+)/i; +Prism.languages.jsx.tag.inside['tag'].inside['class-name'] = /^[A-Z]\w*$/; Prism.languages.insertBefore('inside', 'attr-name', { 'spread': { diff --git a/components/prism-jsx.min.js b/components/prism-jsx.min.js index 3bc4d12bdc..188971840c 100644 --- a/components/prism-jsx.min.js +++ b/components/prism-jsx.min.js @@ -1 +1 @@ -!function(t){var n=t.util.clone(t.languages.javascript);t.languages.jsx=t.languages.extend("markup",n),t.languages.jsx.tag.pattern=/<\/?(?:[\w.:-]+\s*(?:\s+(?:[\w.:-]+(?:=(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s{'">=]+|\{(?:\{(?:\{[^}]*\}|[^{}])*\}|[^{}])+\}))?|\{\.{3}[a-z_$][\w$]*(?:\.[a-z_$][\w$]*)*\}))*\s*\/?)?>/i,t.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/i,t.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s'">]+)/i,t.languages.insertBefore("inside","attr-name",{spread:{pattern:/\{\.{3}[a-z_$][\w$]*(?:\.[a-z_$][\w$]*)*\}/,inside:{punctuation:/\.{3}|[{}.]/,"attr-value":/\w+/}}},t.languages.jsx.tag),t.languages.insertBefore("inside","attr-value",{script:{pattern:/=(\{(?:\{(?:\{[^}]*\}|[^}])*\}|[^}])+\})/i,inside:{"script-punctuation":{pattern:/^=(?={)/,alias:"punctuation"},rest:t.languages.jsx},alias:"language-javascript"}},t.languages.jsx.tag);var e=function(t){return t?"string"==typeof t?t:"string"==typeof t.content?t.content:t.content.map(e).join(""):""},a=function(n){for(var s=[],g=0;g0&&s[s.length-1].tagName===e(o.content[0].content[1])&&s.pop():"/>"===o.content[o.content.length-1].content||s.push({tagName:e(o.content[0].content[1]),openedBraces:0}):s.length>0&&"punctuation"===o.type&&"{"===o.content?s[s.length-1].openedBraces++:s.length>0&&s[s.length-1].openedBraces>0&&"punctuation"===o.type&&"}"===o.content?s[s.length-1].openedBraces--:i=!0),(i||"string"==typeof o)&&s.length>0&&0===s[s.length-1].openedBraces){var p=e(o);g0&&("string"==typeof n[g-1]||"plain-text"===n[g-1].type)&&(p=e(n[g-1])+p,n.splice(g-1,1),g--),n[g]=new t.Token("plain-text",p,null,p)}o.content&&"string"!=typeof o.content&&a(o.content)}};t.hooks.add("after-tokenize",function(t){("jsx"===t.language||"tsx"===t.language)&&a(t.tokens)})}(Prism); \ No newline at end of file +!function(t){var n=t.util.clone(t.languages.javascript);t.languages.jsx=t.languages.extend("markup",n),t.languages.jsx.tag.pattern=/<\/?(?:[\w.:-]+\s*(?:\s+(?:[\w.:-]+(?:=(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s{'">=]+|\{(?:\{(?:\{[^}]*\}|[^{}])*\}|[^{}])+\}))?|\{\.{3}[a-z_$][\w$]*(?:\.[a-z_$][\w$]*)*\}))*\s*\/?)?>/i,t.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/i,t.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s'">]+)/i,t.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*$/,t.languages.insertBefore("inside","attr-name",{spread:{pattern:/\{\.{3}[a-z_$][\w$]*(?:\.[a-z_$][\w$]*)*\}/,inside:{punctuation:/\.{3}|[{}.]/,"attr-value":/\w+/}}},t.languages.jsx.tag),t.languages.insertBefore("inside","attr-value",{script:{pattern:/=(\{(?:\{(?:\{[^}]*\}|[^}])*\}|[^}])+\})/i,inside:{"script-punctuation":{pattern:/^=(?={)/,alias:"punctuation"},rest:t.languages.jsx},alias:"language-javascript"}},t.languages.jsx.tag);var e=function(t){return t?"string"==typeof t?t:"string"==typeof t.content?t.content:t.content.map(e).join(""):""},a=function(n){for(var s=[],g=0;g0&&s[s.length-1].tagName===e(i.content[0].content[1])&&s.pop():"/>"===i.content[i.content.length-1].content||s.push({tagName:e(i.content[0].content[1]),openedBraces:0}):s.length>0&&"punctuation"===i.type&&"{"===i.content?s[s.length-1].openedBraces++:s.length>0&&s[s.length-1].openedBraces>0&&"punctuation"===i.type&&"}"===i.content?s[s.length-1].openedBraces--:o=!0),(o||"string"==typeof i)&&s.length>0&&0===s[s.length-1].openedBraces){var p=e(i);g0&&("string"==typeof n[g-1]||"plain-text"===n[g-1].type)&&(p=e(n[g-1])+p,n.splice(g-1,1),g--),n[g]=new t.Token("plain-text",p,null,p)}i.content&&"string"!=typeof i.content&&a(i.content)}};t.hooks.add("after-tokenize",function(t){("jsx"===t.language||"tsx"===t.language)&&a(t.tokens)})}(Prism); \ No newline at end of file diff --git a/tests/languages/jsx/issue1235.test b/tests/languages/jsx/issue1235.test index f0fa43b334..d28d61ffc4 100644 --- a/tests/languages/jsx/issue1235.test +++ b/tests/languages/jsx/issue1235.test @@ -6,7 +6,7 @@ ["tag", [ ["tag", [ ["punctuation", "<"], - "Child" + ["class-name", "Child"] ]], ["attr-name", ["options"]], ["script", [ @@ -26,4 +26,4 @@ ---------------------------------------------------- Checks that attribute can contain an simple object. -See #1235. \ No newline at end of file +See #1235. diff --git a/tests/languages/jsx/issue1236.test b/tests/languages/jsx/issue1236.test index a46c48959c..3cc3ae2b8a 100644 --- a/tests/languages/jsx/issue1236.test +++ b/tests/languages/jsx/issue1236.test @@ -6,7 +6,7 @@ ["tag", [ ["tag", [ ["punctuation", "<"], - "Child" + ["class-name", "Child"] ]], ["spread", [ ["punctuation", "{"], @@ -23,4 +23,4 @@ ---------------------------------------------------- Checks that spread can contain an object property. -See #1236. \ No newline at end of file +See #1236. diff --git a/tests/languages/jsx/issue1335.test b/tests/languages/jsx/issue1335.test index cf749e94a6..b34880d5af 100644 --- a/tests/languages/jsx/issue1335.test +++ b/tests/languages/jsx/issue1335.test @@ -14,7 +14,7 @@ ["tag", [ ["tag", [ ["punctuation", "<"], - "Button" + ["class-name", "Button"] ]], ["attr-name", ["onClick"]], ["script", [ @@ -41,7 +41,7 @@ ["tag", [ ["tag", [ ["punctuation", "<"], - "Component" + ["class-name", "Component"] ]], ["attr-name", ["data"]], ["script", [ @@ -76,7 +76,7 @@ ["tag", [ ["tag", [ ["punctuation", "<"], - "Component" + ["class-name", "Component"] ]], ["attr-name", ["title"]], ["script", [ @@ -98,7 +98,7 @@ ["tag", [ ["tag", [ ["punctuation", "<"], - "Component" + ["class-name", "Component"] ]], ["attr-name", ["title"]], ["script", [ @@ -121,4 +121,4 @@ ---------------------------------------------------- -Handles nested pairs of curly braces inside tag attribute. See #1335 \ No newline at end of file +Handles nested pairs of curly braces inside tag attribute. See #1335 diff --git a/tests/languages/jsx/issue1342.test b/tests/languages/jsx/issue1342.test index 1d8a9fa0f4..43864dc61a 100644 --- a/tests/languages/jsx/issue1342.test +++ b/tests/languages/jsx/issue1342.test @@ -6,7 +6,7 @@ ["tag", [ ["tag", [ ["punctuation", "<"], - "CodeView" + ["class-name", "CodeView"] ]], ["attr-name", ["title"]], ["script", [ @@ -42,7 +42,7 @@ ["tag", [ ["tag", [ ["punctuation", ""] ]] @@ -50,4 +50,4 @@ ---------------------------------------------------- -Checks for nested tag with JSX inside another tag with JSX. See #1342 \ No newline at end of file +Checks for nested tag with JSX inside another tag with JSX. See #1342 diff --git a/tests/languages/jsx/issue1364.test b/tests/languages/jsx/issue1364.test index dc35938d52..92f49cef5c 100644 --- a/tests/languages/jsx/issue1364.test +++ b/tests/languages/jsx/issue1364.test @@ -6,7 +6,7 @@ ["tag", [ ["tag", [ ["punctuation", "<"], - "CodeView" + ["class-name", "CodeView"] ]], ["attr-name", ["title"]], ["script", [ @@ -22,4 +22,4 @@ ---------------------------------------------------- -Checks for empty objects in JSX. See #1364 \ No newline at end of file +Checks for empty objects in JSX. See #1364 diff --git a/tests/languages/jsx/tag_feature.test b/tests/languages/jsx/tag_feature.test index 6cfc82eff9..4bc5d101ac 100644 --- a/tests/languages/jsx/tag_feature.test +++ b/tests/languages/jsx/tag_feature.test @@ -31,7 +31,7 @@ var myElement = ; ["tag", [ ["tag", [ ["punctuation", "<"], - "MyComponent" + ["class-name", "MyComponent"] ]], ["attr-name", ["someProperty"]], ["script", [ @@ -80,4 +80,4 @@ var myElement = ; ---------------------------------------------------- -Checks for JSX tags. \ No newline at end of file +Checks for JSX tags. diff --git a/tests/languages/tsx/tag_feature.test b/tests/languages/tsx/tag_feature.test index fa6e87a313..3d5c0e9f96 100644 --- a/tests/languages/tsx/tag_feature.test +++ b/tests/languages/tsx/tag_feature.test @@ -35,7 +35,7 @@ class Test extends Component { ["tag", [ ["tag", [ ["punctuation", "<"], - "MyComponent" + ["class-name", "MyComponent"] ]], ["attr-name", ["someProperty"]], ["script", [ @@ -102,4 +102,4 @@ class Test extends Component { ---------------------------------------------------- -Checks for TSX tags. \ No newline at end of file +Checks for TSX tags. From 42d119a2cc27203fd4673f6c865928af42518227 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Thu, 23 Aug 2018 16:47:45 +0200 Subject: [PATCH 0065/1100] SQL Quoted variables are now greedy (#1510) Behavior with quoted variables was incorrect for SQL. This fixes that issue by introducing a new regex for variables and making the current regex greedy. Fixes #1509. --- components/prism-sql.js | 12 +++++++++--- components/prism-sql.min.js | 2 +- tests/languages/sql/variable_feature.test | 6 +++++- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/components/prism-sql.js b/components/prism-sql.js index bda215d0e3..fc55a5c6a3 100644 --- a/components/prism-sql.js +++ b/components/prism-sql.js @@ -1,14 +1,20 @@ -Prism.languages.sql= { +Prism.languages.sql = { 'comment': { pattern: /(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/, lookbehind: true }, - 'string' : { + 'variable': [ + { + pattern: /@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/, + greedy: true + }, + /@[\w.$]+/ + ], + 'string': { pattern: /(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/, greedy: true, lookbehind: true }, - 'variable': /@[\w.$]+|@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/, 'function': /\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i, // Should we highlight user defined functions too? 'keyword': /\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:_INSERT|COL)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURNS?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i, 'boolean': /\b(?:TRUE|FALSE|NULL)\b/i, diff --git a/components/prism-sql.min.js b/components/prism-sql.min.js index 37056b9ca2..0817e19e75 100644 --- a/components/prism-sql.min.js +++ b/components/prism-sql.min.js @@ -1 +1 @@ -Prism.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},variable:/@[\w.$]+|@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,"function":/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:_INSERT|COL)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURNS?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,"boolean":/\b(?:TRUE|FALSE|NULL)\b/i,number:/\b0x[\da-f]+\b|\b\d+\.?\d*|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|IN|LIKE|NOT|OR|IS|DIV|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/}; \ No newline at end of file +Prism.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},"function":/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:_INSERT|COL)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURNS?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,"boolean":/\b(?:TRUE|FALSE|NULL)\b/i,number:/\b0x[\da-f]+\b|\b\d+\.?\d*|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|IN|LIKE|NOT|OR|IS|DIV|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/}; \ No newline at end of file diff --git a/tests/languages/sql/variable_feature.test b/tests/languages/sql/variable_feature.test index ff5cb5695d..8024a25e96 100644 --- a/tests/languages/sql/variable_feature.test +++ b/tests/languages/sql/variable_feature.test @@ -6,6 +6,8 @@ ar" ar' @`fo\`o-b ar` +@'foo' +@'bar' ---------------------------------------------------- @@ -14,7 +16,9 @@ ar` ["variable", "@foo_bar_42"], ["variable", "@\"fo\\\"o-b\r\nar\""], ["variable", "@'fo\\'o-b\r\nar'"], - ["variable", "@`fo\\`o-b\r\nar`"] + ["variable", "@`fo\\`o-b\r\nar`"], + ["variable", "@'foo'"], + ["variable", "@'bar'"] ] ---------------------------------------------------- From 2b62e57bbe39b5e23ca56d655cab050696090f7d Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Thu, 23 Aug 2018 22:20:26 +0200 Subject: [PATCH 0066/1100] Added support for JS BigInt literals (#1542) Add support for BigInt literals to JS and languages extending or including JS. --- components/prism-javascript.js | 2 +- components/prism-javascript.min.js | 2 +- prism.js | 2 +- tests/languages/javascript/number_feature.test | 8 ++++++-- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/components/prism-javascript.js b/components/prism-javascript.js index 2c919b1b29..243471d3c9 100644 --- a/components/prism-javascript.js +++ b/components/prism-javascript.js @@ -10,7 +10,7 @@ Prism.languages.javascript = Prism.languages.extend('clike', { }, /\b(?:as|async|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|var|void|while|with|yield)\b/ ], - 'number': /\b(?:0[xX][\dA-Fa-f]+|0[bB][01]+|0[oO][0-7]+|NaN|Infinity)\b|(?:\b\d+\.?\d*|\B\.\d+)(?:[Ee][+-]?\d+)?/, + 'number': /\b(?:(?:0[xX][\dA-Fa-f]+|0[bB][01]+|0[oO][0-7]+)n?|\d+n|NaN|Infinity)\b|(?:\b\d+\.?\d*|\B\.\d+)(?:[Ee][+-]?\d+)?/, // Allow for all non-ASCII characters (See http://stackoverflow.com/a/2008444) 'function': /[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*\(|\.(?:apply|bind|call)\()/, 'operator': /-[-=]?|\+[+=]?|!=?=?|<>?>?=?|=(?:==?|>)?|&[&=]?|\|[|=]?|\*\*?=?|\/=?|~|\^=?|%=?|\?|\.{3}/ diff --git a/components/prism-javascript.min.js b/components/prism-javascript.min.js index cf4284b8a1..1176d43816 100644 --- a/components/prism-javascript.min.js +++ b/components/prism-javascript.min.js @@ -1 +1 @@ -Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],/[_$A-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\.(?:prototype|constructor))/],keyword:[{pattern:/((?:^|})\s*)(?:catch|finally)\b/,lookbehind:!0},/\b(?:as|async|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|var|void|while|with|yield)\b/],number:/\b(?:0[xX][\dA-Fa-f]+|0[bB][01]+|0[oO][0-7]+|NaN|Infinity)\b|(?:\b\d+\.?\d*|\B\.\d+)(?:[Ee][+-]?\d+)?/,"function":/[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*\(|\.(?:apply|bind|call)\()/,operator:/-[-=]?|\+[+=]?|!=?=?|<>?>?=?|=(?:==?|>)?|&[&=]?|\|[|=]?|\*\*?=?|\/=?|~|\^=?|%=?|\?|\.{3}/}),Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/,Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s])\s*)\/(\[[^\]\r\n]+]|\\.|[^\/\\\[\r\n])+\/[gimyu]{0,5}(?=\s*($|[\r\n,.;})\]]))/,lookbehind:!0,greedy:!0},"function-variable":{pattern:/[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*[=:]\s*(?:function\b|(?:\([^()]*\)|[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/i,alias:"function"},constant:/\b[A-Z][A-Z\d_]*\b/}),Prism.languages.insertBefore("javascript","string",{"template-string":{pattern:/`(?:\\[\s\S]|\${[^}]+}|[^\\`])*`/,greedy:!0,inside:{interpolation:{pattern:/\${[^}]+}/,inside:{"interpolation-punctuation":{pattern:/^\${|}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}}}),Prism.languages.markup&&Prism.languages.insertBefore("markup","tag",{script:{pattern:/()[\s\S]*?(?=<\/script>)/i,lookbehind:!0,inside:Prism.languages.javascript,alias:"language-javascript",greedy:!0}}),Prism.languages.js=Prism.languages.javascript; \ No newline at end of file +Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],/[_$A-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\.(?:prototype|constructor))/],keyword:[{pattern:/((?:^|})\s*)(?:catch|finally)\b/,lookbehind:!0},/\b(?:as|async|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|var|void|while|with|yield)\b/],number:/\b(?:(?:0[xX][\dA-Fa-f]+|0[bB][01]+|0[oO][0-7]+)n?|\d+n|NaN|Infinity)\b|(?:\b\d+\.?\d*|\B\.\d+)(?:[Ee][+-]?\d+)?/,"function":/[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*\(|\.(?:apply|bind|call)\()/,operator:/-[-=]?|\+[+=]?|!=?=?|<>?>?=?|=(?:==?|>)?|&[&=]?|\|[|=]?|\*\*?=?|\/=?|~|\^=?|%=?|\?|\.{3}/}),Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/,Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s])\s*)\/(\[[^\]\r\n]+]|\\.|[^\/\\\[\r\n])+\/[gimyu]{0,5}(?=\s*($|[\r\n,.;})\]]))/,lookbehind:!0,greedy:!0},"function-variable":{pattern:/[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*[=:]\s*(?:function\b|(?:\([^()]*\)|[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/i,alias:"function"},constant:/\b[A-Z][A-Z\d_]*\b/}),Prism.languages.insertBefore("javascript","string",{"template-string":{pattern:/`(?:\\[\s\S]|\${[^}]+}|[^\\`])*`/,greedy:!0,inside:{interpolation:{pattern:/\${[^}]+}/,inside:{"interpolation-punctuation":{pattern:/^\${|}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}}}),Prism.languages.markup&&Prism.languages.insertBefore("markup","tag",{script:{pattern:/()[\s\S]*?(?=<\/script>)/i,lookbehind:!0,inside:Prism.languages.javascript,alias:"language-javascript",greedy:!0}}),Prism.languages.js=Prism.languages.javascript; \ No newline at end of file diff --git a/prism.js b/prism.js index a0bc986557..08055b2502 100644 --- a/prism.js +++ b/prism.js @@ -736,7 +736,7 @@ Prism.languages.javascript = Prism.languages.extend('clike', { }, /\b(?:as|async|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|var|void|while|with|yield)\b/ ], - 'number': /\b(?:0[xX][\dA-Fa-f]+|0[bB][01]+|0[oO][0-7]+|NaN|Infinity)\b|(?:\b\d+\.?\d*|\B\.\d+)(?:[Ee][+-]?\d+)?/, + 'number': /\b(?:(?:0[xX][\dA-Fa-f]+|0[bB][01]+|0[oO][0-7]+)n?|\d+n|NaN|Infinity)\b|(?:\b\d+\.?\d*|\B\.\d+)(?:[Ee][+-]?\d+)?/, // Allow for all non-ASCII characters (See http://stackoverflow.com/a/2008444) 'function': /[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*\(|\.(?:apply|bind|call)\()/, 'operator': /-[-=]?|\+[+=]?|!=?=?|<>?>?=?|=(?:==?|>)?|&[&=]?|\|[|=]?|\*\*?=?|\/=?|~|\^=?|%=?|\?|\.{3}/ diff --git a/tests/languages/javascript/number_feature.test b/tests/languages/javascript/number_feature.test index b832787882..16f0e5fdf3 100644 --- a/tests/languages/javascript/number_feature.test +++ b/tests/languages/javascript/number_feature.test @@ -9,6 +9,8 @@ 0xBABE NaN Infinity +123n +0x123n ---------------------------------------------------- @@ -23,10 +25,12 @@ Infinity ["number", "0xbabe"], ["number", "0xBABE"], ["number", "NaN"], - ["number", "Infinity"] + ["number", "Infinity"], + ["number", "123n"], + ["number", "0x123n"] ] ---------------------------------------------------- Checks for decimal numbers, binary numbers, octal numbers, hexadecimal numbers. -Also checks for keywords representing numbers. \ No newline at end of file +Also checks for keywords representing numbers. From a47c05adf7c5691cbdfdbae0863f50b58b436185 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Tue, 28 Aug 2018 05:39:08 +0200 Subject: [PATCH 0067/1100] Fixed lowercase supposed class names (#1544) This PR fixes a bug with supposed class names. Lowercase supposed class names are no longer highlighted. **Before**: ![before](https://user-images.githubusercontent.com/20878432/44656379-e7c17900-a9f8-11e8-8b1a-7f1dd694263e.png) **After**: ![after](https://user-images.github usercontent.com/20878432/44656379-e7c17900-a9f8-11e8-8b1a-7f1dd694263e.png) --- components/prism-javascript.js | 5 ++++- components/prism-javascript.min.js | 2 +- prism.js | 5 ++++- tests/languages/javascript/supposed-classes_feature.test | 8 ++++++++ 4 files changed, 17 insertions(+), 3 deletions(-) diff --git a/components/prism-javascript.js b/components/prism-javascript.js index 243471d3c9..58f037a9d3 100644 --- a/components/prism-javascript.js +++ b/components/prism-javascript.js @@ -1,7 +1,10 @@ Prism.languages.javascript = Prism.languages.extend('clike', { 'class-name': [ Prism.languages.clike['class-name'], - /[_$A-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\.(?:prototype|constructor))/ + { + pattern: /(^|[^$\w\xA0-\uFFFF])[_$A-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\.(?:prototype|constructor))/, + lookbehind: true + } ], 'keyword': [ { diff --git a/components/prism-javascript.min.js b/components/prism-javascript.min.js index 1176d43816..64234b0e6f 100644 --- a/components/prism-javascript.min.js +++ b/components/prism-javascript.min.js @@ -1 +1 @@ -Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],/[_$A-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\.(?:prototype|constructor))/],keyword:[{pattern:/((?:^|})\s*)(?:catch|finally)\b/,lookbehind:!0},/\b(?:as|async|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|var|void|while|with|yield)\b/],number:/\b(?:(?:0[xX][\dA-Fa-f]+|0[bB][01]+|0[oO][0-7]+)n?|\d+n|NaN|Infinity)\b|(?:\b\d+\.?\d*|\B\.\d+)(?:[Ee][+-]?\d+)?/,"function":/[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*\(|\.(?:apply|bind|call)\()/,operator:/-[-=]?|\+[+=]?|!=?=?|<>?>?=?|=(?:==?|>)?|&[&=]?|\|[|=]?|\*\*?=?|\/=?|~|\^=?|%=?|\?|\.{3}/}),Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/,Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s])\s*)\/(\[[^\]\r\n]+]|\\.|[^\/\\\[\r\n])+\/[gimyu]{0,5}(?=\s*($|[\r\n,.;})\]]))/,lookbehind:!0,greedy:!0},"function-variable":{pattern:/[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*[=:]\s*(?:function\b|(?:\([^()]*\)|[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/i,alias:"function"},constant:/\b[A-Z][A-Z\d_]*\b/}),Prism.languages.insertBefore("javascript","string",{"template-string":{pattern:/`(?:\\[\s\S]|\${[^}]+}|[^\\`])*`/,greedy:!0,inside:{interpolation:{pattern:/\${[^}]+}/,inside:{"interpolation-punctuation":{pattern:/^\${|}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}}}),Prism.languages.markup&&Prism.languages.insertBefore("markup","tag",{script:{pattern:/()[\s\S]*?(?=<\/script>)/i,lookbehind:!0,inside:Prism.languages.javascript,alias:"language-javascript",greedy:!0}}),Prism.languages.js=Prism.languages.javascript; \ No newline at end of file +Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])[_$A-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\.(?:prototype|constructor))/,lookbehind:!0}],keyword:[{pattern:/((?:^|})\s*)(?:catch|finally)\b/,lookbehind:!0},/\b(?:as|async|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|var|void|while|with|yield)\b/],number:/\b(?:(?:0[xX][\dA-Fa-f]+|0[bB][01]+|0[oO][0-7]+)n?|\d+n|NaN|Infinity)\b|(?:\b\d+\.?\d*|\B\.\d+)(?:[Ee][+-]?\d+)?/,"function":/[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*\(|\.(?:apply|bind|call)\()/,operator:/-[-=]?|\+[+=]?|!=?=?|<>?>?=?|=(?:==?|>)?|&[&=]?|\|[|=]?|\*\*?=?|\/=?|~|\^=?|%=?|\?|\.{3}/}),Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/,Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s])\s*)\/(\[[^\]\r\n]+]|\\.|[^\/\\\[\r\n])+\/[gimyu]{0,5}(?=\s*($|[\r\n,.;})\]]))/,lookbehind:!0,greedy:!0},"function-variable":{pattern:/[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*[=:]\s*(?:function\b|(?:\([^()]*\)|[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/i,alias:"function"},constant:/\b[A-Z][A-Z\d_]*\b/}),Prism.languages.insertBefore("javascript","string",{"template-string":{pattern:/`(?:\\[\s\S]|\${[^}]+}|[^\\`])*`/,greedy:!0,inside:{interpolation:{pattern:/\${[^}]+}/,inside:{"interpolation-punctuation":{pattern:/^\${|}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}}}),Prism.languages.markup&&Prism.languages.insertBefore("markup","tag",{script:{pattern:/()[\s\S]*?(?=<\/script>)/i,lookbehind:!0,inside:Prism.languages.javascript,alias:"language-javascript",greedy:!0}}),Prism.languages.js=Prism.languages.javascript; \ No newline at end of file diff --git a/prism.js b/prism.js index 08055b2502..de97781ec9 100644 --- a/prism.js +++ b/prism.js @@ -727,7 +727,10 @@ Prism.languages.clike = { Prism.languages.javascript = Prism.languages.extend('clike', { 'class-name': [ Prism.languages.clike['class-name'], - /[_$A-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\.(?:prototype|constructor))/ + { + pattern: /(^|[^$\w\xA0-\uFFFF])[_$A-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\.(?:prototype|constructor))/, + lookbehind: true + } ], 'keyword': [ { diff --git a/tests/languages/javascript/supposed-classes_feature.test b/tests/languages/javascript/supposed-classes_feature.test index 8d0570873e..df85fd4fc5 100644 --- a/tests/languages/javascript/supposed-classes_feature.test +++ b/tests/languages/javascript/supposed-classes_feature.test @@ -1,5 +1,6 @@ Foo.prototype.bar; Bar.constructor; +fooBar.prototype.bar; ---------------------------------------------------- @@ -14,6 +15,13 @@ Bar.constructor; ["class-name", "Bar"], ["punctuation", "."], "constructor", + ["punctuation", ";"], + + "\nfooBar", + ["punctuation", "."], + "prototype", + ["punctuation", "."], + "bar", ["punctuation", ";"] ] From 8c981a229855913d43119aed8466fcf90a40571f Mon Sep 17 00:00:00 2001 From: Benjamin Winterberg Date: Thu, 6 Sep 2018 13:33:07 +0200 Subject: [PATCH 0068/1100] Add Java 10 support (#1549) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add `var` as a new keyword–added in Java 10: https://developer.oracle.com/java/jdk-10-local-variable-type-inference --- components/prism-java.js | 2 +- components/prism-java.min.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/components/prism-java.js b/components/prism-java.js index 67199692f9..229333bef4 100644 --- a/components/prism-java.js +++ b/components/prism-java.js @@ -1,5 +1,5 @@ Prism.languages.java = Prism.languages.extend('clike', { - 'keyword': /\b(?:abstract|continue|for|new|switch|assert|default|goto|package|synchronized|boolean|do|if|private|this|break|double|implements|protected|throw|byte|else|import|public|throws|case|enum|instanceof|return|transient|catch|extends|int|short|try|char|final|interface|static|void|class|finally|long|strictfp|volatile|const|float|native|super|while)\b/, + 'keyword': /\b(?:var|abstract|continue|for|new|switch|assert|default|goto|package|synchronized|boolean|do|if|private|this|break|double|implements|protected|throw|byte|else|import|public|throws|case|enum|instanceof|return|transient|catch|extends|int|short|try|char|final|interface|static|void|class|finally|long|strictfp|volatile|const|float|native|super|while)\b/, 'number': /\b0b[01]+\b|\b0x[\da-f]*\.?[\da-fp-]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?[df]?/i, 'operator': { pattern: /(^|[^.])(?:<<=?|>>>?=?|->|([-+&|])\2|[?:~]|[-+*/%&|^!=<>]=?)/m, diff --git a/components/prism-java.min.js b/components/prism-java.min.js index 24c928c4e9..ea612551d1 100644 --- a/components/prism-java.min.js +++ b/components/prism-java.min.js @@ -1 +1 @@ -Prism.languages.java=Prism.languages.extend("clike",{keyword:/\b(?:abstract|continue|for|new|switch|assert|default|goto|package|synchronized|boolean|do|if|private|this|break|double|implements|protected|throw|byte|else|import|public|throws|case|enum|instanceof|return|transient|catch|extends|int|short|try|char|final|interface|static|void|class|finally|long|strictfp|volatile|const|float|native|super|while)\b/,number:/\b0b[01]+\b|\b0x[\da-f]*\.?[\da-fp-]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?[df]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|([-+&|])\2|[?:~]|[-+*\/%&|^!=<>]=?)/m,lookbehind:!0}}),Prism.languages.insertBefore("java","function",{annotation:{alias:"punctuation",pattern:/(^|[^.])@\w+/,lookbehind:!0}}),Prism.languages.insertBefore("java","class-name",{generics:{pattern:/<\s*\w+(?:\.\w+)?(?:\s*,\s*\w+(?:\.\w+)?)*>/i,alias:"function",inside:{keyword:Prism.languages.java.keyword,punctuation:/[<>(),.:]/}}}); \ No newline at end of file +Prism.languages.java=Prism.languages.extend("clike",{keyword:/\b(?:var|abstract|continue|for|new|switch|assert|default|goto|package|synchronized|boolean|do|if|private|this|break|double|implements|protected|throw|byte|else|import|public|throws|case|enum|instanceof|return|transient|catch|extends|int|short|try|char|final|interface|static|void|class|finally|long|strictfp|volatile|const|float|native|super|while)\b/,number:/\b0b[01]+\b|\b0x[\da-f]*\.?[\da-fp-]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?[df]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|([-+&|])\2|[?:~]|[-+*\/%&|^!=<>]=?)/m,lookbehind:!0}}),Prism.languages.insertBefore("java","function",{annotation:{alias:"punctuation",pattern:/(^|[^.])@\w+/,lookbehind:!0}}),Prism.languages.insertBefore("java","class-name",{generics:{pattern:/<\s*\w+(?:\.\w+)?(?:\s*,\s*\w+(?:\.\w+)?)*>/i,alias:"function",inside:{keyword:Prism.languages.java.keyword,punctuation:/[<>(),.:]/}}}); \ No newline at end of file From b520e1b6a4df4ac0452b6a0a1a6cf2fa3cfef577 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Sun, 9 Sep 2018 18:33:43 +0200 Subject: [PATCH 0069/1100] Simplify function pattern of C-like language (#1552) `/[a-z0-9_]/i` == `/\w/` --- components/prism-clike.js | 2 +- components/prism-clike.min.js | 2 +- prism.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/components/prism-clike.js b/components/prism-clike.js index f72eba6002..e0257162db 100644 --- a/components/prism-clike.js +++ b/components/prism-clike.js @@ -23,7 +23,7 @@ Prism.languages.clike = { }, 'keyword': /\b(?:if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/, 'boolean': /\b(?:true|false)\b/, - 'function': /[a-z0-9_]+(?=\()/i, + 'function': /\w+(?=\()/, 'number': /\b0x[\da-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?/i, 'operator': /--?|\+\+?|!=?=?|<=?|>=?|==?=?|&&?|\|\|?|\?|\*|\/|~|\^|%/, 'punctuation': /[{}[\];(),.:]/ diff --git a/components/prism-clike.min.js b/components/prism-clike.min.js index 7784498dec..20c4888cfd 100644 --- a/components/prism-clike.min.js +++ b/components/prism-clike.min.js @@ -1 +1 @@ -Prism.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/((?:\b(?:class|interface|extends|implements|trait|instanceof|new)\s+)|(?:catch\s+\())[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/,"boolean":/\b(?:true|false)\b/,"function":/[a-z0-9_]+(?=\()/i,number:/\b0x[\da-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/--?|\+\+?|!=?=?|<=?|>=?|==?=?|&&?|\|\|?|\?|\*|\/|~|\^|%/,punctuation:/[{}[\];(),.:]/}; \ No newline at end of file +Prism.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/((?:\b(?:class|interface|extends|implements|trait|instanceof|new)\s+)|(?:catch\s+\())[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/,"boolean":/\b(?:true|false)\b/,"function":/\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/--?|\+\+?|!=?=?|<=?|>=?|==?=?|&&?|\|\|?|\?|\*|\/|~|\^|%/,punctuation:/[{}[\];(),.:]/}; \ No newline at end of file diff --git a/prism.js b/prism.js index de97781ec9..a60c2ceac4 100644 --- a/prism.js +++ b/prism.js @@ -713,7 +713,7 @@ Prism.languages.clike = { }, 'keyword': /\b(?:if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/, 'boolean': /\b(?:true|false)\b/, - 'function': /[a-z0-9_]+(?=\()/i, + 'function': /\w+(?=\()/, 'number': /\b0x[\da-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?/i, 'operator': /--?|\+\+?|!=?=?|<=?|>=?|==?=?|&&?|\|\|?|\?|\*|\/|~|\^|%/, 'punctuation': /[{}[\];(),.:]/ From e529edd8a6efd0a8a21cd41412b72019bc522307 Mon Sep 17 00:00:00 2001 From: Mark Shi Date: Sat, 15 Sep 2018 21:52:37 +0800 Subject: [PATCH 0070/1100] Add GameMaker Language support (#1551) GameMaker is a cross-platform game engine developed by YoYo Games. --- components.js | 2 +- components.json | 6 ++++ components/prism-gml.js | 7 +++++ components/prism-gml.min.js | 1 + examples/prism-gml.html | 29 +++++++++++++++++++ plugins/autoloader/prism-autoloader.js | 2 +- plugins/autoloader/prism-autoloader.min.js | 2 +- plugins/show-language/prism-show-language.js | 2 +- .../show-language/prism-show-language.min.js | 2 +- 9 files changed, 48 insertions(+), 5 deletions(-) create mode 100644 components/prism-gml.js create mode 100644 components/prism-gml.min.js create mode 100644 examples/prism-gml.html diff --git a/components.js b/components.js index b24c3038a4..fbb5155766 100644 --- a/components.js +++ b/components.js @@ -1,2 +1,2 @@ -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default","peerDependencies":"markup"},"clike":{"title":"C-like","option":"default","overrideExampleHeader":true},"javascript":{"title":"JavaScript","require":"clike","peerDependencies":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"actionscript":{"title":"ActionScript","require":"javascript","peerDependencies":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","alias":"shell","owner":"Golmote"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":"dotnet","owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"coffeescript":{"title":"CoffeeScript","require":"javascript","owner":"R-osey"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup","peerDependencies":["css","javascript"],"alias":"jinja2","owner":"romanvm"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","peerDependencies":["css","coffeescript","erb","javascript","less","markdown","ruby","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"http":{"title":"HTTP","peerDependencies":["javascript","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"json":{"title":"JSON","alias":"jsonp","aliasTitles":{"jsonp":"JSONP"},"owner":"CupOfTea696"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","owner":"japborst"},"less":{"title":"Less","require":"css","owner":"Golmote"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"n4js":{"title":"N4JS","require":"javascript","alias":"n4jsd","owner":"bsmith-n4"},"nasm":{"title":"NASM","owner":"rbmj"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"cpp","peerDependencies":["c","cpp"],"overrideExampleHeader":true,"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"php-extras":{"title":"PHP Extras","require":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":"javascript","peerDependencies":["coffeescript","ejs","handlebars","hogan","less","livescript","markdown","mustache","plates","scss","stylus","swig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","peerDependencies":["c","cpp","fortran","ats","dsp"],"owner":"Golmote"},"python":{"title":"Python","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"ruby":{"title":"Ruby","require":"clike","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sql":{"title":"SQL","owner":"multipetros"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","peerDependencies":"css","owner":"Golmote"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","alias":"ts","owner":"vkbansal"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","owner":"hason"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":"Line Highlight","line-numbers":{"title":"Line Numbers","owner":"kuba-kubula"},"show-invisibles":"Show Invisibles","autolinker":"Autolinker","wpd":"WebPlatform Docs","custom-class":{"title":"Custom Class","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","noCSS":true},"show-language":{"title":"Show Language","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","owner":"Golmote","noCSS":true},"previewers":{"title":"Previewers","owner":"Golmote"},"autoloader":{"title":"Autoloader","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","owner":"Golmote","after":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","owner":"chriswells0"},"unescaped-markup":"Unescaped Markup","normalize-whitespace":{"title":"Normalize Whitespace","owner":"zeitgeist87","after":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","owner":"mAAdhaTTah","require":"toolbar","noCSS":true}}}; +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default","peerDependencies":"markup"},"clike":{"title":"C-like","option":"default","overrideExampleHeader":true},"javascript":{"title":"JavaScript","require":"clike","peerDependencies":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"actionscript":{"title":"ActionScript","require":"javascript","peerDependencies":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","alias":"shell","owner":"Golmote"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":"dotnet","owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"coffeescript":{"title":"CoffeeScript","require":"javascript","owner":"R-osey"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup","peerDependencies":["css","javascript"],"alias":"jinja2","owner":"romanvm"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","peerDependencies":["css","coffeescript","erb","javascript","less","markdown","ruby","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"http":{"title":"HTTP","peerDependencies":["javascript","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"json":{"title":"JSON","alias":"jsonp","aliasTitles":{"jsonp":"JSONP"},"owner":"CupOfTea696"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","owner":"japborst"},"less":{"title":"Less","require":"css","owner":"Golmote"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"n4js":{"title":"N4JS","require":"javascript","alias":"n4jsd","owner":"bsmith-n4"},"nasm":{"title":"NASM","owner":"rbmj"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"cpp","peerDependencies":["c","cpp"],"overrideExampleHeader":true,"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"php-extras":{"title":"PHP Extras","require":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":"javascript","peerDependencies":["coffeescript","ejs","handlebars","hogan","less","livescript","markdown","mustache","plates","scss","stylus","swig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","peerDependencies":["c","cpp","fortran","ats","dsp"],"owner":"Golmote"},"python":{"title":"Python","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"ruby":{"title":"Ruby","require":"clike","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sql":{"title":"SQL","owner":"multipetros"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","peerDependencies":"css","owner":"Golmote"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","alias":"ts","owner":"vkbansal"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","owner":"hason"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":"Line Highlight","line-numbers":{"title":"Line Numbers","owner":"kuba-kubula"},"show-invisibles":"Show Invisibles","autolinker":"Autolinker","wpd":"WebPlatform Docs","custom-class":{"title":"Custom Class","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","noCSS":true},"show-language":{"title":"Show Language","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","owner":"Golmote","noCSS":true},"previewers":{"title":"Previewers","owner":"Golmote"},"autoloader":{"title":"Autoloader","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","owner":"Golmote","after":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","owner":"chriswells0"},"unescaped-markup":"Unescaped Markup","normalize-whitespace":{"title":"Normalize Whitespace","owner":"zeitgeist87","after":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","owner":"mAAdhaTTah","require":"toolbar","noCSS":true}}}; if (typeof module !== 'undefined' && module.exports) { module.exports = components; } \ No newline at end of file diff --git a/components.json b/components.json index a7297b40a4..bb6d07da1f 100644 --- a/components.json +++ b/components.json @@ -280,6 +280,12 @@ "require": "clike", "owner": "Golmote" }, + "gml": { + "title": "GameMaker Language", + "alias": "gamemakerlanguage", + "require": "clike", + "owner": "LiarOnce" + }, "go": { "title": "Go", "require": "clike", diff --git a/components/prism-gml.js b/components/prism-gml.js new file mode 100644 index 0000000000..1a7a2c347a --- /dev/null +++ b/components/prism-gml.js @@ -0,0 +1,7 @@ +Prism.languages.gamemakerlanguage = Prism.languages.gml = Prism.languages.extend('clike', { + 'number': /(?:\b0x[\da-f]+|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?)[ulf]*/i, + 'keyword': /\b(?:if|else|switch|case|default|break|for|repeat|while|do|until|continue|exit|return|globalvar|var|enum)\b/, + 'operator': /[-+%=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]|\b(?:or|and|not|with|at|xor|not)\b/, + 'constant': /\b(self|other|all|noone|global|local|undefined|pointer_(?:invalid|null)|action_(?:stop|restart|continue|reverse)|pi|GM_build_date|GM_version|timezone_(?:local|utc)|gamespeed_(?:fps|microseconds)|ev_(?:create|destroy|step|alarm|keyboard|mouse|collision|other|draw|draw_(?:begin|end|pre|post)|keypress|keyrelease|trigger|(?:left|right|middle|no)_button|(?:left|right|middle)_press|(?:left|right|middle)_release|mouse_(?:enter|leave|wheel_up|wheel_down)|global_(?:left|right|middle)_button|global_(?:left|right|middle)_press|global_(?:left|right|middle)_release|joystick(?:1|2)_(?:left|right|up|down|button1|button2|button3|button4|button5|button6|button7|button8)|outside|boundary|game_start|game_end|room_start|room_end|no_more_lives|animation_end|end_of_path|no_more_health|user\d|step_(?:normal|begin|end)|gui|gui_begin|gui_end)|vk_(?:nokey|anykey|enter|return|shift|control|alt|escape|space|backspace|tab|pause|printscreen|left|right|up|down|home|end|delete|insert|pageup|pagedown|f\d|numpad\d|divide|multiply|subtract|add|decimal|lshift|lcontrol|lalt|rshift|rcontrol|ralt)|mb_(?:any|none|left|right|middle)|c_(?:aqua|black|blue|dkgray|fuchsia|gray|green|lime|ltgray|maroon|navy|olive|purple|red|silver|teal|white|yellow|orange)|fa_(?:left|center|right|top|middle|bottom|readonly|hidden|sysfile|volumeid|directory|archive)|pr_(?:pointlist|linelist|linestrip|trianglelist|trianglestrip|trianglefan)|bm_(?:complex|normal|add|max|subtract|zero|one|src_colour|inv_src_colour|src_color|inv_src_color|src_alpha|inv_src_alpha|dest_alpha|inv_dest_alpha|dest_colour|inv_dest_colour|dest_color|inv_dest_color|src_alpha_sat)|audio_(?:falloff_(?:none|inverse_distance|inverse_distance_clamped|linear_distance|linear_distance_clamped|exponent_distance|exponent_distance_clamped)|old_system|new_system|mono|stereo|3d)|cr_(?:default|none|arrow|cross|beam|size_nesw|size_ns|size_nwse|size_we|uparrow|hourglass|drag|appstart|handpoint|size_all)|spritespeed_framesper(?:second|gameframe)|asset_(?:object|unknown|sprite|sound|room|path|script|font|timeline|tiles|shader)|ds_type_(?:map|list|stack|queue|grid|priority)|ef_(?:explosion|ring|ellipse|firework|smoke|smokeup|star|spark|flare|cloud|rain|snow)|pt_shape_(?:pixel|disk|square|line|star|circle|ring|sphere|flare|spark|explosion|cloud|smoke|snow)|ps_(?:distr|shape)_(?:linear|gaussian|invgaussian|rectangle|ellipse|diamond|line)|ty_(?:real|string)|dll_(?:cdel|cdecl|stdcall)|matrix_(?:view|projection|world)|os_(?:win32|windows|macosx|ios|android|linux|unknown|winphone|win8native|psvita|ps4|xboxone|ps3|uwp)|browser_(?:not_a_browser|unknown|ie|firefox|chrome|safari|safari_mobile|opera|tizen|windows_store|ie_mobile)|device_ios_(?:unknown|iphone|iphone_retina|ipad|ipad_retina|iphone5|iphone6|iphone6plus)|device_(?:emulator|tablet)|display_(?:landscape|landscape_flipped|portrait|portrait_flipped)|of_challenge_(?:win|lose|tie)|leaderboard_type_(?:number|time_mins_secs)|cmpfunc_(?:never|less|equal|lessequal|greater|notequal|greaterequal|always)|cull_(?:noculling|clockwise|counterclockwise)|lighttype_(?:dir|point)|iap_(?:ev_storeload|ev_product|ev_purchase|ev_consume|ev_restore|storeload_ok|storeload_failed|status_uninitialised|status_unavailable|status_loading|status_available|status_processing|status_restoring|failed|unavailable|available|purchased|canceled|refunded)|fb_login_(?:default|fallback_to_webview|no_fallback_to_webview|forcing_webview|use_system_account|forcing_safari)|phy_joint_(?:anchor_1_x|anchor_1_y|anchor_2_x|anchor_2_y|reaction_force_x|reaction_force_y|reaction_torque|motor_speed|angle|motor_torque|max_motor_torque|translation|speed|motor_force|max_motor_force|length_1|length_2|damping_ratio|frequency|lower_angle_limit|upper_angle_limit|angle_limits|max_length|max_torque|max_force)|phy_debug_render_(?:aabb|collision_pairs|coms|core_shapes|joints|obb|shapes)|phy_particle_flag_(?:water|zombie|wall|spring|elastic|viscous|powder|tensile|colourmixing|colormixing)|phy_particle_group_flag_(?:solid|rigid)|phy_particle_data_flag_(?:typeflags|position|velocity|colour|color|category)|achievement_(?:our_info|friends_info|leaderboard_info|info|filter_(?:all_players|friends_only|favorites_only)|type_challenge|type_score_challenge|pic_loaded|show_(?:ui|profile|leaderboard|achievement|bank|friend_picker|purchase_prompt))|network_(?:socket_(?:tcp|udp|bluetooth)|type_(?:connect|disconnect|data|non_blocking_connect)|config_(?:connect_timeout|use_non_blocking_socket|enable_reliable_udp|disable_reliable_udp))|buffer_(?:fixed|grow|wrap|fast|vbuffer|network|u8|s8|u16|s16|u32|s32|u64|f16|f32|f64|bool|text|string|seek_start|seek_relative|seek_end|generalerror|outofspace|outofbounds|invalidtype)|gp_(?:face\d|shoulderl|shoulderr|shoulderlb|shoulderrb|select|start|stickl|stickr|padu|padd|padl|padr|axislh|axislv|axisrh|axisrv)|ov_(?:friends|community|players|settings|gamegroup|achievements)|lb_sort_(?:none|ascending|descending)|lb_disp_(?:none|numeric|time_sec|time_ms)|ugc_(?:result_success|filetype_(?:community|microtrans)|visibility_(?:public|friends_only|private)|query_RankedBy(?:Vote|PublicationDate|Trend|NumTimesReported|TotalVotesAsc|VotesUp|TextSearch)|query_(?:AcceptedForGameRankedByAcceptanceDate|FavoritedByFriendsRankedByPublicationDate|CreatedByFriendsRankedByPublicationDate|NotYetRated)|sortorder_CreationOrder(?:Desc|Asc)|sortorder_(?:TitleAsc|LastUpdatedDesc|SubscriptionDateDesc|VoteScoreDesc|ForModeration)|list_(?:Published|VotedOn|VotedUp|VotedDown|WillVoteLater|Favorited|Subscribed|UsedOrPlayed|Followed)|match_(?:Items|Items_Mtx|Items_ReadyToUse|Collections|Artwork|Videos|Screenshots|AllGuides|WebGuides|IntegratedGuides|UsableInGame|ControllerBindings))|vertex_usage_(?:position|colour|color|normal|texcoord|textcoord|blendweight|blendindices|psize|tangent|binormal|fog|depth|sample)|vertex_type_(?:float\d|colour|color|ubyte4)|layerelementtype_(?:undefined|background|instance|oldtilemap|sprite|tilemap|particlesystem|tile)|tile_(?:rotate|flip|mirror|index_mask)|input_type|se_(?:chorus|compressor|echo|equalizer|flanger|gargle|none|reverb)|text_type|(obj|scr|spr|rm)\w+)\b/, + 'variable': /\b(x|y|(?:x|y)(?:previous|start)|(?:h|v)speed|direction|speed|friction|gravity|gravity_direction|path_(?:index|position|positionprevious|speed|scale|orientation|endaction)|object_index|id|solid|persistent|mask_index|instance_(?:count|id)|alarm|timeline_(?:index|position|speed|running|loop)|visible|sprite_(?:index|width|height|xoffset|yoffset)|image_(?:number|index|speed|depth|xscale|yscale|angle|alpha|blend)|bbox_(?:left|right|top|bottom)|layer|phy_(?:rotation|(?:position|linear_velocity|speed|com|collision|col_normal)_(?:x|y)|angular_(?:velocity|damping)|position_(?:x|y)previous|speed|linear_damping|bullet|fixed_rotation|active|mass|inertia|dynamic|kinematic|sleeping|collision_points)|working_directory|webgl_enabled|view_(?:(?:y|x|w|h)view|(?:y|x|w|h)port|(?:v|h)(?:speed|border)|visible|surface_id|object|enabled|current|angle)|undefined|transition_(?:steps|kind|color)|temp_directory|show_(?:score|lives|health)|secure_mode|score|room_(?:width|speed|persistent|last|height|first|caption)|room|pointer_(?:null|invalid)|os_(?:version|type|device|browser)|mouse_(?:y|x|lastbutton|button)|lives|keyboard_(?:string|lastkey|lastchar|key)|iap_data|health|gamemaker_(?:version|registered|pro)|game_(?:save|project|display)_(?:id|name)|fps_real|fps|event_(?:type|object|number|action)|error_(?:occurred|last)|display_aa|delta_time|debug_mode|cursor_sprite|current_(?:year|weekday|time|second|month|minute|hour|day)|caption_(?:score|lives|health)|browser_(?:width|height)|background_(?:yscale|y|xscale|x|width|vtiled|vspeed|visible|showcolour|showcolor|index|htiled|hspeed|height|foreground|colour|color|blend|alpha)|async_load|application_surface|argument(?:_relitive|_count|\d)|argument|global|local|self|other)\b/ +}); diff --git a/components/prism-gml.min.js b/components/prism-gml.min.js new file mode 100644 index 0000000000..5f24b0eb3f --- /dev/null +++ b/components/prism-gml.min.js @@ -0,0 +1 @@ +Prism.languages.gamemakerlanguage=Prism.languages.gml=Prism.languages.extend("clike",{number:/(?:\b0x[\da-f]+|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?)[ulf]*/i,keyword:/\b(?:if|else|switch|case|default|break|for|repeat|while|do|until|continue|exit|return|globalvar|var|enum)\b/,operator:/[-+%=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]|\b(?:or|and|not|with|at|xor|not)\b/,constant:/\b(self|other|all|noone|global|local|undefined|pointer_(?:invalid|null)|action_(?:stop|restart|continue|reverse)|pi|GM_build_date|GM_version|timezone_(?:local|utc)|gamespeed_(?:fps|microseconds)|ev_(?:create|destroy|step|alarm|keyboard|mouse|collision|other|draw|draw_(?:begin|end|pre|post)|keypress|keyrelease|trigger|(?:left|right|middle|no)_button|(?:left|right|middle)_press|(?:left|right|middle)_release|mouse_(?:enter|leave|wheel_up|wheel_down)|global_(?:left|right|middle)_button|global_(?:left|right|middle)_press|global_(?:left|right|middle)_release|joystick(?:1|2)_(?:left|right|up|down|button1|button2|button3|button4|button5|button6|button7|button8)|outside|boundary|game_start|game_end|room_start|room_end|no_more_lives|animation_end|end_of_path|no_more_health|user\d|step_(?:normal|begin|end)|gui|gui_begin|gui_end)|vk_(?:nokey|anykey|enter|return|shift|control|alt|escape|space|backspace|tab|pause|printscreen|left|right|up|down|home|end|delete|insert|pageup|pagedown|f\d|numpad\d|divide|multiply|subtract|add|decimal|lshift|lcontrol|lalt|rshift|rcontrol|ralt)|mb_(?:any|none|left|right|middle)|c_(?:aqua|black|blue|dkgray|fuchsia|gray|green|lime|ltgray|maroon|navy|olive|purple|red|silver|teal|white|yellow|orange)|fa_(?:left|center|right|top|middle|bottom|readonly|hidden|sysfile|volumeid|directory|archive)|pr_(?:pointlist|linelist|linestrip|trianglelist|trianglestrip|trianglefan)|bm_(?:complex|normal|add|max|subtract|zero|one|src_colour|inv_src_colour|src_color|inv_src_color|src_alpha|inv_src_alpha|dest_alpha|inv_dest_alpha|dest_colour|inv_dest_colour|dest_color|inv_dest_color|src_alpha_sat)|audio_(?:falloff_(?:none|inverse_distance|inverse_distance_clamped|linear_distance|linear_distance_clamped|exponent_distance|exponent_distance_clamped)|old_system|new_system|mono|stereo|3d)|cr_(?:default|none|arrow|cross|beam|size_nesw|size_ns|size_nwse|size_we|uparrow|hourglass|drag|appstart|handpoint|size_all)|spritespeed_framesper(?:second|gameframe)|asset_(?:object|unknown|sprite|sound|room|path|script|font|timeline|tiles|shader)|ds_type_(?:map|list|stack|queue|grid|priority)|ef_(?:explosion|ring|ellipse|firework|smoke|smokeup|star|spark|flare|cloud|rain|snow)|pt_shape_(?:pixel|disk|square|line|star|circle|ring|sphere|flare|spark|explosion|cloud|smoke|snow)|ps_(?:distr|shape)_(?:linear|gaussian|invgaussian|rectangle|ellipse|diamond|line)|ty_(?:real|string)|dll_(?:cdel|cdecl|stdcall)|matrix_(?:view|projection|world)|os_(?:win32|windows|macosx|ios|android|linux|unknown|winphone|win8native|psvita|ps4|xboxone|ps3|uwp)|browser_(?:not_a_browser|unknown|ie|firefox|chrome|safari|safari_mobile|opera|tizen|windows_store|ie_mobile)|device_ios_(?:unknown|iphone|iphone_retina|ipad|ipad_retina|iphone5|iphone6|iphone6plus)|device_(?:emulator|tablet)|display_(?:landscape|landscape_flipped|portrait|portrait_flipped)|of_challenge_(?:win|lose|tie)|leaderboard_type_(?:number|time_mins_secs)|cmpfunc_(?:never|less|equal|lessequal|greater|notequal|greaterequal|always)|cull_(?:noculling|clockwise|counterclockwise)|lighttype_(?:dir|point)|iap_(?:ev_storeload|ev_product|ev_purchase|ev_consume|ev_restore|storeload_ok|storeload_failed|status_uninitialised|status_unavailable|status_loading|status_available|status_processing|status_restoring|failed|unavailable|available|purchased|canceled|refunded)|fb_login_(?:default|fallback_to_webview|no_fallback_to_webview|forcing_webview|use_system_account|forcing_safari)|phy_joint_(?:anchor_1_x|anchor_1_y|anchor_2_x|anchor_2_y|reaction_force_x|reaction_force_y|reaction_torque|motor_speed|angle|motor_torque|max_motor_torque|translation|speed|motor_force|max_motor_force|length_1|length_2|damping_ratio|frequency|lower_angle_limit|upper_angle_limit|angle_limits|max_length|max_torque|max_force)|phy_debug_render_(?:aabb|collision_pairs|coms|core_shapes|joints|obb|shapes)|phy_particle_flag_(?:water|zombie|wall|spring|elastic|viscous|powder|tensile|colourmixing|colormixing)|phy_particle_group_flag_(?:solid|rigid)|phy_particle_data_flag_(?:typeflags|position|velocity|colour|color|category)|achievement_(?:our_info|friends_info|leaderboard_info|info|filter_(?:all_players|friends_only|favorites_only)|type_challenge|type_score_challenge|pic_loaded|show_(?:ui|profile|leaderboard|achievement|bank|friend_picker|purchase_prompt))|network_(?:socket_(?:tcp|udp|bluetooth)|type_(?:connect|disconnect|data|non_blocking_connect)|config_(?:connect_timeout|use_non_blocking_socket|enable_reliable_udp|disable_reliable_udp))|buffer_(?:fixed|grow|wrap|fast|vbuffer|network|u8|s8|u16|s16|u32|s32|u64|f16|f32|f64|bool|text|string|seek_start|seek_relative|seek_end|generalerror|outofspace|outofbounds|invalidtype)|gp_(?:face\d|shoulderl|shoulderr|shoulderlb|shoulderrb|select|start|stickl|stickr|padu|padd|padl|padr|axislh|axislv|axisrh|axisrv)|ov_(?:friends|community|players|settings|gamegroup|achievements)|lb_sort_(?:none|ascending|descending)|lb_disp_(?:none|numeric|time_sec|time_ms)|ugc_(?:result_success|filetype_(?:community|microtrans)|visibility_(?:public|friends_only|private)|query_RankedBy(?:Vote|PublicationDate|Trend|NumTimesReported|TotalVotesAsc|VotesUp|TextSearch)|query_(?:AcceptedForGameRankedByAcceptanceDate|FavoritedByFriendsRankedByPublicationDate|CreatedByFriendsRankedByPublicationDate|NotYetRated)|sortorder_CreationOrder(?:Desc|Asc)|sortorder_(?:TitleAsc|LastUpdatedDesc|SubscriptionDateDesc|VoteScoreDesc|ForModeration)|list_(?:Published|VotedOn|VotedUp|VotedDown|WillVoteLater|Favorited|Subscribed|UsedOrPlayed|Followed)|match_(?:Items|Items_Mtx|Items_ReadyToUse|Collections|Artwork|Videos|Screenshots|AllGuides|WebGuides|IntegratedGuides|UsableInGame|ControllerBindings))|vertex_usage_(?:position|colour|color|normal|texcoord|textcoord|blendweight|blendindices|psize|tangent|binormal|fog|depth|sample)|vertex_type_(?:float\d|colour|color|ubyte4)|layerelementtype_(?:undefined|background|instance|oldtilemap|sprite|tilemap|particlesystem|tile)|tile_(?:rotate|flip|mirror|index_mask)|input_type|se_(?:chorus|compressor|echo|equalizer|flanger|gargle|none|reverb)|text_type|(obj|scr|spr|rm)\w+)\b/,variable:/\b(x|y|(?:x|y)(?:previous|start)|(?:h|v)speed|direction|speed|friction|gravity|gravity_direction|path_(?:index|position|positionprevious|speed|scale|orientation|endaction)|object_index|id|solid|persistent|mask_index|instance_(?:count|id)|alarm|timeline_(?:index|position|speed|running|loop)|visible|sprite_(?:index|width|height|xoffset|yoffset)|image_(?:number|index|speed|depth|xscale|yscale|angle|alpha|blend)|bbox_(?:left|right|top|bottom)|layer|phy_(?:rotation|(?:position|linear_velocity|speed|com|collision|col_normal)_(?:x|y)|angular_(?:velocity|damping)|position_(?:x|y)previous|speed|linear_damping|bullet|fixed_rotation|active|mass|inertia|dynamic|kinematic|sleeping|collision_points)|working_directory|webgl_enabled|view_(?:(?:y|x|w|h)view|(?:y|x|w|h)port|(?:v|h)(?:speed|border)|visible|surface_id|object|enabled|current|angle)|undefined|transition_(?:steps|kind|color)|temp_directory|show_(?:score|lives|health)|secure_mode|score|room_(?:width|speed|persistent|last|height|first|caption)|room|pointer_(?:null|invalid)|os_(?:version|type|device|browser)|mouse_(?:y|x|lastbutton|button)|lives|keyboard_(?:string|lastkey|lastchar|key)|iap_data|health|gamemaker_(?:version|registered|pro)|game_(?:save|project|display)_(?:id|name)|fps_real|fps|event_(?:type|object|number|action)|error_(?:occurred|last)|display_aa|delta_time|debug_mode|cursor_sprite|current_(?:year|weekday|time|second|month|minute|hour|day)|caption_(?:score|lives|health)|browser_(?:width|height)|background_(?:yscale|y|xscale|x|width|vtiled|vspeed|visible|showcolour|showcolor|index|htiled|hspeed|height|foreground|colour|color|blend|alpha)|async_load|application_surface|argument(?:_relitive|_count|\d)|argument|global|local|self|other)\b/}); \ No newline at end of file diff --git a/examples/prism-gml.html b/examples/prism-gml.html new file mode 100644 index 0000000000..a1649f6b68 --- /dev/null +++ b/examples/prism-gml.html @@ -0,0 +1,29 @@ +

    Comments

    +
    // This is a comment
    +/* This is a comment
    +on multiple lines */
    + +

    Functions

    +
    variable_instance_set(_inst,_var_name,_start+_change);
    + +

    Full example

    +
    if(instance_exists(_inst) || _inst==global){
    +	if(_delay<=0){
    +		_time+=1;
    +		if(_time<_duration){
    +			event_user(0);
    +		}else{
    +			if(_inst!=global){
    +				variable_instance_set(_inst,_var_name,_start+_change);
    +			}else{
    +				variable_global_set(_var_name,_start+_change);
    +			}
    +			instance_destroy();
    +		}
    +	}else{
    +		_delay-=1;
    +	}
    +}else{
    +	instance_destroy();
    +}
    +
    diff --git a/plugins/autoloader/prism-autoloader.js b/plugins/autoloader/prism-autoloader.js index 7cbf2953fe..3eeae676f6 100644 --- a/plugins/autoloader/prism-autoloader.js +++ b/plugins/autoloader/prism-autoloader.js @@ -4,7 +4,7 @@ } // The dependencies map is built automatically with gulp - var lang_dependencies = /*languages_placeholder[*/{"javascript":"clike","actionscript":"javascript","arduino":"cpp","aspnet":["markup","csharp"],"bison":"c","c":"clike","csharp":"clike","cpp":"c","coffeescript":"javascript","crystal":"ruby","css-extras":"css","d":"clike","dart":"clike","django":"markup","erb":["ruby","markup-templating"],"fsharp":"clike","flow":"javascript","glsl":"clike","go":"clike","groovy":"clike","haml":"ruby","handlebars":"markup-templating","haxe":"clike","java":"clike","jolie":"clike","kotlin":"clike","less":"css","markdown":"markup","markup-templating":"markup","n4js":"javascript","nginx":"clike","objectivec":"c","opencl":"cpp","parser":"markup","php":["clike","markup-templating"],"php-extras":"php","plsql":"sql","processing":"clike","protobuf":"clike","pug":"javascript","qore":"clike","jsx":["markup","javascript"],"tsx":["jsx","typescript"],"reason":"clike","ruby":"clike","sass":"css","scss":"css","scala":"java","smarty":"markup-templating","soy":"markup-templating","swift":"clike","tap":"yaml","textile":"markup","tt2":["clike","markup-templating"],"twig":"markup","typescript":"javascript","vbnet":"basic","velocity":"markup","wiki":"markup","xeora":"markup","xquery":"markup"}/*]*/; + var lang_dependencies = /*languages_placeholder[*/{"javascript":"clike","actionscript":"javascript","arduino":"cpp","aspnet":["markup","csharp"],"bison":"c","c":"clike","csharp":"clike","cpp":"c","coffeescript":"javascript","crystal":"ruby","css-extras":"css","d":"clike","dart":"clike","django":"markup","erb":["ruby","markup-templating"],"fsharp":"clike","flow":"javascript","glsl":"clike","gml":"clike","go":"clike","groovy":"clike","haml":"ruby","handlebars":"markup-templating","haxe":"clike","java":"clike","jolie":"clike","kotlin":"clike","less":"css","markdown":"markup","markup-templating":"markup","n4js":"javascript","nginx":"clike","objectivec":"c","opencl":"cpp","parser":"markup","php":["clike","markup-templating"],"php-extras":"php","plsql":"sql","processing":"clike","protobuf":"clike","pug":"javascript","qore":"clike","jsx":["markup","javascript"],"tsx":["jsx","typescript"],"reason":"clike","ruby":"clike","sass":"css","scss":"css","scala":"java","smarty":"markup-templating","soy":"markup-templating","swift":"clike","tap":"yaml","textile":"markup","tt2":["clike","markup-templating"],"twig":"markup","typescript":"javascript","vbnet":"basic","velocity":"markup","wiki":"markup","xeora":"markup","xquery":"markup"}/*]*/; var lang_data = {}; diff --git a/plugins/autoloader/prism-autoloader.min.js b/plugins/autoloader/prism-autoloader.min.js index 9e3cc2515d..c996cbc159 100644 --- a/plugins/autoloader/prism-autoloader.min.js +++ b/plugins/autoloader/prism-autoloader.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof self&&self.Prism&&self.document&&document.createElement){var e={javascript:"clike",actionscript:"javascript",arduino:"cpp",aspnet:["markup","csharp"],bison:"c",c:"clike",csharp:"clike",cpp:"c",coffeescript:"javascript",crystal:"ruby","css-extras":"css",d:"clike",dart:"clike",django:"markup",erb:["ruby","markup-templating"],fsharp:"clike",flow:"javascript",glsl:"clike",go:"clike",groovy:"clike",haml:"ruby",handlebars:"markup-templating",haxe:"clike",java:"clike",jolie:"clike",kotlin:"clike",less:"css",markdown:"markup","markup-templating":"markup",n4js:"javascript",nginx:"clike",objectivec:"c",opencl:"cpp",parser:"markup",php:["clike","markup-templating"],"php-extras":"php",plsql:"sql",processing:"clike",protobuf:"clike",pug:"javascript",qore:"clike",jsx:["markup","javascript"],tsx:["jsx","typescript"],reason:"clike",ruby:"clike",sass:"css",scss:"css",scala:"java",smarty:"markup-templating",soy:"markup-templating",swift:"clike",tap:"yaml",textile:"markup",tt2:["clike","markup-templating"],twig:"markup",typescript:"javascript",vbnet:"basic",velocity:"markup",wiki:"markup",xeora:"markup",xquery:"markup"},a={},c="none",t=document.getElementsByTagName("script");t=t[t.length-1];var r="components/";if(t.hasAttribute("data-autoloader-path")){var s=t.getAttribute("data-autoloader-path").trim();s.length>0&&!/^[a-z]+:\/\//i.test(t.src)&&(r=s.replace(/\/?$/,"/"))}else/[\w-]+\.js$/.test(t.src)&&(r=t.src.replace(/[\w-]+\.js$/,"components/"));var i=Prism.plugins.autoloader={languages_path:r,use_minified:!0},t=function(e,a,c){var t=document.createElement("script");t.src=e,t.async=!0,t.onload=function(){document.body.removeChild(t),a&&a()},t.onerror=function(){document.body.removeChild(t),c&&c()},document.body.appendChild(t)},n=function(e){return i.languages_path+"prism-"+e+(i.use_minified?".min":"")+".js"},l=function(e,c){var t=a[e];t||(t=a[e]={});var r=c.getAttribute("data-dependencies");!r&&c.parentNode&&"pre"===c.parentNode.tagName.toLowerCase()&&(r=c.parentNode.getAttribute("data-dependencies")),r=r?r.split(/\s*,\s*/g):[],o(r,function(){p(e,function(){Prism.highlightElement(c)})})},o=function(e,a,c){"string"==typeof e&&(e=[e]);var t=0,r=e.length,s=function(){r>t?p(e[t],function(){t++,s()},function(){c&&c(e[t])}):t===r&&a&&a(e)};s()},p=function(c,r,s){var i=function(){var e=!1;c.indexOf("!")>=0&&(e=!0,c=c.replace("!",""));var i=a[c];if(i||(i=a[c]={}),r&&(i.success_callbacks||(i.success_callbacks=[]),i.success_callbacks.push(r)),s&&(i.error_callbacks||(i.error_callbacks=[]),i.error_callbacks.push(s)),!e&&Prism.languages[c])u(c);else if(!e&&i.error)m(c);else if(e||!i.loading){i.loading=!0;var l=n(c);t(l,function(){i.loading=!1,u(c)},function(){i.loading=!1,i.error=!0,m(c)})}},l=e[c];l&&l.length?o(l,i):i()},u=function(e){a[e]&&a[e].success_callbacks&&a[e].success_callbacks.length&&a[e].success_callbacks.forEach(function(a){a(e)})},m=function(e){a[e]&&a[e].error_callbacks&&a[e].error_callbacks.length&&a[e].error_callbacks.forEach(function(a){a(e)})};Prism.hooks.add("complete",function(e){e.element&&e.language&&!e.grammar&&e.language!==c&&l(e.language,e.element)})}}(); \ No newline at end of file +!function(){if("undefined"!=typeof self&&self.Prism&&self.document&&document.createElement){var e={javascript:"clike",actionscript:"javascript",arduino:"cpp",aspnet:["markup","csharp"],bison:"c",c:"clike",csharp:"clike",cpp:"c",coffeescript:"javascript",crystal:"ruby","css-extras":"css",d:"clike",dart:"clike",django:"markup",erb:["ruby","markup-templating"],fsharp:"clike",flow:"javascript",glsl:"clike",gml:"clike",go:"clike",groovy:"clike",haml:"ruby",handlebars:"markup-templating",haxe:"clike",java:"clike",jolie:"clike",kotlin:"clike",less:"css",markdown:"markup","markup-templating":"markup",n4js:"javascript",nginx:"clike",objectivec:"c",opencl:"cpp",parser:"markup",php:["clike","markup-templating"],"php-extras":"php",plsql:"sql",processing:"clike",protobuf:"clike",pug:"javascript",qore:"clike",jsx:["markup","javascript"],tsx:["jsx","typescript"],reason:"clike",ruby:"clike",sass:"css",scss:"css",scala:"java",smarty:"markup-templating",soy:"markup-templating",swift:"clike",tap:"yaml",textile:"markup",tt2:["clike","markup-templating"],twig:"markup",typescript:"javascript",vbnet:"basic",velocity:"markup",wiki:"markup",xeora:"markup",xquery:"markup"},a={},c="none",t=document.getElementsByTagName("script");t=t[t.length-1];var r="components/";if(t.hasAttribute("data-autoloader-path")){var s=t.getAttribute("data-autoloader-path").trim();s.length>0&&!/^[a-z]+:\/\//i.test(t.src)&&(r=s.replace(/\/?$/,"/"))}else/[\w-]+\.js$/.test(t.src)&&(r=t.src.replace(/[\w-]+\.js$/,"components/"));var i=Prism.plugins.autoloader={languages_path:r,use_minified:!0},t=function(e,a,c){var t=document.createElement("script");t.src=e,t.async=!0,t.onload=function(){document.body.removeChild(t),a&&a()},t.onerror=function(){document.body.removeChild(t),c&&c()},document.body.appendChild(t)},n=function(e){return i.languages_path+"prism-"+e+(i.use_minified?".min":"")+".js"},l=function(e,c){var t=a[e];t||(t=a[e]={});var r=c.getAttribute("data-dependencies");!r&&c.parentNode&&"pre"===c.parentNode.tagName.toLowerCase()&&(r=c.parentNode.getAttribute("data-dependencies")),r=r?r.split(/\s*,\s*/g):[],o(r,function(){p(e,function(){Prism.highlightElement(c)})})},o=function(e,a,c){"string"==typeof e&&(e=[e]);var t=0,r=e.length,s=function(){r>t?p(e[t],function(){t++,s()},function(){c&&c(e[t])}):t===r&&a&&a(e)};s()},p=function(c,r,s){var i=function(){var e=!1;c.indexOf("!")>=0&&(e=!0,c=c.replace("!",""));var i=a[c];if(i||(i=a[c]={}),r&&(i.success_callbacks||(i.success_callbacks=[]),i.success_callbacks.push(r)),s&&(i.error_callbacks||(i.error_callbacks=[]),i.error_callbacks.push(s)),!e&&Prism.languages[c])u(c);else if(!e&&i.error)m(c);else if(e||!i.loading){i.loading=!0;var l=n(c);t(l,function(){i.loading=!1,u(c)},function(){i.loading=!1,i.error=!0,m(c)})}},l=e[c];l&&l.length?o(l,i):i()},u=function(e){a[e]&&a[e].success_callbacks&&a[e].success_callbacks.length&&a[e].success_callbacks.forEach(function(a){a(e)})},m=function(e){a[e]&&a[e].error_callbacks&&a[e].error_callbacks.length&&a[e].error_callbacks.forEach(function(a){a(e)})};Prism.hooks.add("complete",function(e){e.element&&e.language&&!e.grammar&&e.language!==c&&l(e.language,e.element)})}}(); \ No newline at end of file diff --git a/plugins/show-language/prism-show-language.js b/plugins/show-language/prism-show-language.js index 176fb06918..488f85cdcd 100644 --- a/plugins/show-language/prism-show-language.js +++ b/plugins/show-language/prism-show-language.js @@ -11,7 +11,7 @@ if (!Prism.plugins.toolbar) { } // The languages map is built automatically with gulp -var Languages = /*languages_placeholder[*/{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","css":"CSS","clike":"C-like","javascript":"JavaScript","abap":"ABAP","actionscript":"ActionScript","apacheconf":"Apache Configuration","apl":"APL","applescript":"AppleScript","arff":"ARFF","asciidoc":"AsciiDoc","asm6502":"6502 Assembly","aspnet":"ASP.NET (C#)","autohotkey":"AutoHotkey","autoit":"AutoIt","shell":"Shell","basic":"BASIC","csharp":"C#","cpp":"C++","coffeescript":"CoffeeScript","csp":"Content-Security-Policy","css-extras":"CSS Extras","django":"Django/Jinja2","erb":"ERB","fsharp":"F#","gedcom":"GEDCOM","glsl":"GLSL","graphql":"GraphQL","http":"HTTP","hpkp":"HTTP Public-Key-Pins","hsts":"HTTP Strict-Transport-Security","ichigojam":"IchigoJam","inform7":"Inform 7","json":"JSON","jsonp":"JSONP","latex":"LaTeX","livescript":"LiveScript","lolcode":"LOLCODE","markup-templating":"Markup templating","matlab":"MATLAB","mel":"MEL","n4js":"N4JS","nasm":"NASM","nginx":"nginx","nsis":"NSIS","objectivec":"Objective-C","ocaml":"OCaml","opencl":"OpenCL","parigp":"PARI/GP","objectpascal":"Object Pascal","php":"PHP","php-extras":"PHP Extras","plsql":"PL/SQL","powershell":"PowerShell","properties":".properties","protobuf":"Protocol Buffers","q":"Q (kdb+ database)","jsx":"React JSX","tsx":"React TSX","renpy":"Ren'py","rest":"reST (reStructuredText)","sas":"SAS","sass":"Sass (Sass)","scss":"Sass (Scss)","sql":"SQL","soy":"Soy (Closure Template)","tap":"TAP","tt2":"Template Toolkit 2","typescript":"TypeScript","vbnet":"VB.Net","vhdl":"VHDL","vim":"vim","visual-basic":"Visual Basic","wasm":"WebAssembly","wiki":"Wiki markup","xeoracube":"XeoraCube","xojo":"Xojo (REALbasic)","xquery":"XQuery","yaml":"YAML"}/*]*/; +var Languages = /*languages_placeholder[*/{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","css":"CSS","clike":"C-like","javascript":"JavaScript","abap":"ABAP","actionscript":"ActionScript","apacheconf":"Apache Configuration","apl":"APL","applescript":"AppleScript","arff":"ARFF","asciidoc":"AsciiDoc","asm6502":"6502 Assembly","aspnet":"ASP.NET (C#)","autohotkey":"AutoHotkey","autoit":"AutoIt","shell":"Shell","basic":"BASIC","csharp":"C#","cpp":"C++","coffeescript":"CoffeeScript","csp":"Content-Security-Policy","css-extras":"CSS Extras","django":"Django/Jinja2","erb":"ERB","fsharp":"F#","gedcom":"GEDCOM","glsl":"GLSL","gml":"GameMaker Language","graphql":"GraphQL","http":"HTTP","hpkp":"HTTP Public-Key-Pins","hsts":"HTTP Strict-Transport-Security","ichigojam":"IchigoJam","inform7":"Inform 7","json":"JSON","jsonp":"JSONP","latex":"LaTeX","livescript":"LiveScript","lolcode":"LOLCODE","markup-templating":"Markup templating","matlab":"MATLAB","mel":"MEL","n4js":"N4JS","nasm":"NASM","nginx":"nginx","nsis":"NSIS","objectivec":"Objective-C","ocaml":"OCaml","opencl":"OpenCL","parigp":"PARI/GP","objectpascal":"Object Pascal","php":"PHP","php-extras":"PHP Extras","plsql":"PL/SQL","powershell":"PowerShell","properties":".properties","protobuf":"Protocol Buffers","q":"Q (kdb+ database)","jsx":"React JSX","tsx":"React TSX","renpy":"Ren'py","rest":"reST (reStructuredText)","sas":"SAS","sass":"Sass (Sass)","scss":"Sass (Scss)","sql":"SQL","soy":"Soy (Closure Template)","tap":"TAP","tt2":"Template Toolkit 2","typescript":"TypeScript","vbnet":"VB.Net","vhdl":"VHDL","vim":"vim","visual-basic":"Visual Basic","wasm":"WebAssembly","wiki":"Wiki markup","xeoracube":"XeoraCube","xojo":"Xojo (REALbasic)","xquery":"XQuery","yaml":"YAML"}/*]*/; Prism.plugins.toolbar.registerButton('show-language', function(env) { var pre = env.element.parentNode; if (!pre || !/pre/i.test(pre.nodeName)) { diff --git a/plugins/show-language/prism-show-language.min.js b/plugins/show-language/prism-show-language.min.js index a9a1471fc1..061390cec4 100644 --- a/plugins/show-language/prism-show-language.min.js +++ b/plugins/show-language/prism-show-language.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof self&&self.Prism&&self.document){if(!Prism.plugins.toolbar)return console.warn("Show Languages plugin loaded before Toolbar plugin."),void 0;var e={html:"HTML",xml:"XML",svg:"SVG",mathml:"MathML",css:"CSS",clike:"C-like",javascript:"JavaScript",abap:"ABAP",actionscript:"ActionScript",apacheconf:"Apache Configuration",apl:"APL",applescript:"AppleScript",arff:"ARFF",asciidoc:"AsciiDoc",asm6502:"6502 Assembly",aspnet:"ASP.NET (C#)",autohotkey:"AutoHotkey",autoit:"AutoIt",shell:"Shell",basic:"BASIC",csharp:"C#",cpp:"C++",coffeescript:"CoffeeScript",csp:"Content-Security-Policy","css-extras":"CSS Extras",django:"Django/Jinja2",erb:"ERB",fsharp:"F#",gedcom:"GEDCOM",glsl:"GLSL",graphql:"GraphQL",http:"HTTP",hpkp:"HTTP Public-Key-Pins",hsts:"HTTP Strict-Transport-Security",ichigojam:"IchigoJam",inform7:"Inform 7",json:"JSON",jsonp:"JSONP",latex:"LaTeX",livescript:"LiveScript",lolcode:"LOLCODE","markup-templating":"Markup templating",matlab:"MATLAB",mel:"MEL",n4js:"N4JS",nasm:"NASM",nginx:"nginx",nsis:"NSIS",objectivec:"Objective-C",ocaml:"OCaml",opencl:"OpenCL",parigp:"PARI/GP",objectpascal:"Object Pascal",php:"PHP","php-extras":"PHP Extras",plsql:"PL/SQL",powershell:"PowerShell",properties:".properties",protobuf:"Protocol Buffers",q:"Q (kdb+ database)",jsx:"React JSX",tsx:"React TSX",renpy:"Ren'py",rest:"reST (reStructuredText)",sas:"SAS",sass:"Sass (Sass)",scss:"Sass (Scss)",sql:"SQL",soy:"Soy (Closure Template)",tap:"TAP",tt2:"Template Toolkit 2",typescript:"TypeScript",vbnet:"VB.Net",vhdl:"VHDL",vim:"vim","visual-basic":"Visual Basic",wasm:"WebAssembly",wiki:"Wiki markup",xeoracube:"XeoraCube",xojo:"Xojo (REALbasic)",xquery:"XQuery",yaml:"YAML"};Prism.plugins.toolbar.registerButton("show-language",function(a){var t=a.element.parentNode;if(t&&/pre/i.test(t.nodeName)){var s=t.getAttribute("data-language")||e[a.language]||a.language&&a.language.substring(0,1).toUpperCase()+a.language.substring(1);if(s){var i=document.createElement("span");return i.textContent=s,i}}})}}(); \ No newline at end of file +!function(){if("undefined"!=typeof self&&self.Prism&&self.document){if(!Prism.plugins.toolbar)return console.warn("Show Languages plugin loaded before Toolbar plugin."),void 0;var e={html:"HTML",xml:"XML",svg:"SVG",mathml:"MathML",css:"CSS",clike:"C-like",javascript:"JavaScript",abap:"ABAP",actionscript:"ActionScript",apacheconf:"Apache Configuration",apl:"APL",applescript:"AppleScript",arff:"ARFF",asciidoc:"AsciiDoc",asm6502:"6502 Assembly",aspnet:"ASP.NET (C#)",autohotkey:"AutoHotkey",autoit:"AutoIt",shell:"Shell",basic:"BASIC",csharp:"C#",cpp:"C++",coffeescript:"CoffeeScript",csp:"Content-Security-Policy","css-extras":"CSS Extras",django:"Django/Jinja2",erb:"ERB",fsharp:"F#",gedcom:"GEDCOM",glsl:"GLSL",gml:"GameMaker Language",graphql:"GraphQL",http:"HTTP",hpkp:"HTTP Public-Key-Pins",hsts:"HTTP Strict-Transport-Security",ichigojam:"IchigoJam",inform7:"Inform 7",json:"JSON",jsonp:"JSONP",latex:"LaTeX",livescript:"LiveScript",lolcode:"LOLCODE","markup-templating":"Markup templating",matlab:"MATLAB",mel:"MEL",n4js:"N4JS",nasm:"NASM",nginx:"nginx",nsis:"NSIS",objectivec:"Objective-C",ocaml:"OCaml",opencl:"OpenCL",parigp:"PARI/GP",objectpascal:"Object Pascal",php:"PHP","php-extras":"PHP Extras",plsql:"PL/SQL",powershell:"PowerShell",properties:".properties",protobuf:"Protocol Buffers",q:"Q (kdb+ database)",jsx:"React JSX",tsx:"React TSX",renpy:"Ren'py",rest:"reST (reStructuredText)",sas:"SAS",sass:"Sass (Sass)",scss:"Sass (Scss)",sql:"SQL",soy:"Soy (Closure Template)",tap:"TAP",tt2:"Template Toolkit 2",typescript:"TypeScript",vbnet:"VB.Net",vhdl:"VHDL",vim:"vim","visual-basic":"Visual Basic",wasm:"WebAssembly",wiki:"Wiki markup",xeoracube:"XeoraCube",xojo:"Xojo (REALbasic)",xquery:"XQuery",yaml:"YAML"};Prism.plugins.toolbar.registerButton("show-language",function(a){var t=a.element.parentNode;if(t&&/pre/i.test(t.nodeName)){var s=t.getAttribute("data-language")||e[a.language]||a.language&&a.language.substring(0,1).toUpperCase()+a.language.substring(1);if(s){var r=document.createElement("span");return r.textContent=s,r}}})}}(); \ No newline at end of file From bfa5a8d9a55231366e6a3ba707e706a289634e93 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Sun, 23 Sep 2018 15:17:22 +0200 Subject: [PATCH 0071/1100] Resolved variable name clash (#1568) There is another variable named script in the autoloader. --- plugins/autoloader/prism-autoloader.js | 4 ++-- plugins/autoloader/prism-autoloader.min.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/autoloader/prism-autoloader.js b/plugins/autoloader/prism-autoloader.js index 3eeae676f6..4db91105b7 100644 --- a/plugins/autoloader/prism-autoloader.js +++ b/plugins/autoloader/prism-autoloader.js @@ -32,7 +32,7 @@ * @param {function=} success * @param {function=} error */ - var script = function (src, success, error) { + var addScript = function (src, success, error) { var s = document.createElement('script'); s.src = src; s.async = true; @@ -155,7 +155,7 @@ } else if (force || !data.loading) { data.loading = true; var src = getLanguagePath(lang); - script(src, function () { + addScript(src, function () { data.loading = false; languageSuccess(lang); diff --git a/plugins/autoloader/prism-autoloader.min.js b/plugins/autoloader/prism-autoloader.min.js index c996cbc159..c695e739f3 100644 --- a/plugins/autoloader/prism-autoloader.min.js +++ b/plugins/autoloader/prism-autoloader.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof self&&self.Prism&&self.document&&document.createElement){var e={javascript:"clike",actionscript:"javascript",arduino:"cpp",aspnet:["markup","csharp"],bison:"c",c:"clike",csharp:"clike",cpp:"c",coffeescript:"javascript",crystal:"ruby","css-extras":"css",d:"clike",dart:"clike",django:"markup",erb:["ruby","markup-templating"],fsharp:"clike",flow:"javascript",glsl:"clike",gml:"clike",go:"clike",groovy:"clike",haml:"ruby",handlebars:"markup-templating",haxe:"clike",java:"clike",jolie:"clike",kotlin:"clike",less:"css",markdown:"markup","markup-templating":"markup",n4js:"javascript",nginx:"clike",objectivec:"c",opencl:"cpp",parser:"markup",php:["clike","markup-templating"],"php-extras":"php",plsql:"sql",processing:"clike",protobuf:"clike",pug:"javascript",qore:"clike",jsx:["markup","javascript"],tsx:["jsx","typescript"],reason:"clike",ruby:"clike",sass:"css",scss:"css",scala:"java",smarty:"markup-templating",soy:"markup-templating",swift:"clike",tap:"yaml",textile:"markup",tt2:["clike","markup-templating"],twig:"markup",typescript:"javascript",vbnet:"basic",velocity:"markup",wiki:"markup",xeora:"markup",xquery:"markup"},a={},c="none",t=document.getElementsByTagName("script");t=t[t.length-1];var r="components/";if(t.hasAttribute("data-autoloader-path")){var s=t.getAttribute("data-autoloader-path").trim();s.length>0&&!/^[a-z]+:\/\//i.test(t.src)&&(r=s.replace(/\/?$/,"/"))}else/[\w-]+\.js$/.test(t.src)&&(r=t.src.replace(/[\w-]+\.js$/,"components/"));var i=Prism.plugins.autoloader={languages_path:r,use_minified:!0},t=function(e,a,c){var t=document.createElement("script");t.src=e,t.async=!0,t.onload=function(){document.body.removeChild(t),a&&a()},t.onerror=function(){document.body.removeChild(t),c&&c()},document.body.appendChild(t)},n=function(e){return i.languages_path+"prism-"+e+(i.use_minified?".min":"")+".js"},l=function(e,c){var t=a[e];t||(t=a[e]={});var r=c.getAttribute("data-dependencies");!r&&c.parentNode&&"pre"===c.parentNode.tagName.toLowerCase()&&(r=c.parentNode.getAttribute("data-dependencies")),r=r?r.split(/\s*,\s*/g):[],o(r,function(){p(e,function(){Prism.highlightElement(c)})})},o=function(e,a,c){"string"==typeof e&&(e=[e]);var t=0,r=e.length,s=function(){r>t?p(e[t],function(){t++,s()},function(){c&&c(e[t])}):t===r&&a&&a(e)};s()},p=function(c,r,s){var i=function(){var e=!1;c.indexOf("!")>=0&&(e=!0,c=c.replace("!",""));var i=a[c];if(i||(i=a[c]={}),r&&(i.success_callbacks||(i.success_callbacks=[]),i.success_callbacks.push(r)),s&&(i.error_callbacks||(i.error_callbacks=[]),i.error_callbacks.push(s)),!e&&Prism.languages[c])u(c);else if(!e&&i.error)m(c);else if(e||!i.loading){i.loading=!0;var l=n(c);t(l,function(){i.loading=!1,u(c)},function(){i.loading=!1,i.error=!0,m(c)})}},l=e[c];l&&l.length?o(l,i):i()},u=function(e){a[e]&&a[e].success_callbacks&&a[e].success_callbacks.length&&a[e].success_callbacks.forEach(function(a){a(e)})},m=function(e){a[e]&&a[e].error_callbacks&&a[e].error_callbacks.length&&a[e].error_callbacks.forEach(function(a){a(e)})};Prism.hooks.add("complete",function(e){e.element&&e.language&&!e.grammar&&e.language!==c&&l(e.language,e.element)})}}(); \ No newline at end of file +!function(){if("undefined"!=typeof self&&self.Prism&&self.document&&document.createElement){var e={javascript:"clike",actionscript:"javascript",arduino:"cpp",aspnet:["markup","csharp"],bison:"c",c:"clike",csharp:"clike",cpp:"c",coffeescript:"javascript",crystal:"ruby","css-extras":"css",d:"clike",dart:"clike",django:"markup",erb:["ruby","markup-templating"],fsharp:"clike",flow:"javascript",glsl:"clike",gml:"clike",go:"clike",groovy:"clike",haml:"ruby",handlebars:"markup-templating",haxe:"clike",java:"clike",jolie:"clike",kotlin:"clike",less:"css",markdown:"markup","markup-templating":"markup",n4js:"javascript",nginx:"clike",objectivec:"c",opencl:"cpp",parser:"markup",php:["clike","markup-templating"],"php-extras":"php",plsql:"sql",processing:"clike",protobuf:"clike",pug:"javascript",qore:"clike",jsx:["markup","javascript"],tsx:["jsx","typescript"],reason:"clike",ruby:"clike",sass:"css",scss:"css",scala:"java",smarty:"markup-templating",soy:"markup-templating",swift:"clike",tap:"yaml",textile:"markup",tt2:["clike","markup-templating"],twig:"markup",typescript:"javascript",vbnet:"basic",velocity:"markup",wiki:"markup",xeora:"markup",xquery:"markup"},a={},c="none",t=document.getElementsByTagName("script");t=t[t.length-1];var r="components/";if(t.hasAttribute("data-autoloader-path")){var s=t.getAttribute("data-autoloader-path").trim();s.length>0&&!/^[a-z]+:\/\//i.test(t.src)&&(r=s.replace(/\/?$/,"/"))}else/[\w-]+\.js$/.test(t.src)&&(r=t.src.replace(/[\w-]+\.js$/,"components/"));var i=Prism.plugins.autoloader={languages_path:r,use_minified:!0},n=function(e,a,c){var t=document.createElement("script");t.src=e,t.async=!0,t.onload=function(){document.body.removeChild(t),a&&a()},t.onerror=function(){document.body.removeChild(t),c&&c()},document.body.appendChild(t)},l=function(e){return i.languages_path+"prism-"+e+(i.use_minified?".min":"")+".js"},o=function(e,c){var t=a[e];t||(t=a[e]={});var r=c.getAttribute("data-dependencies");!r&&c.parentNode&&"pre"===c.parentNode.tagName.toLowerCase()&&(r=c.parentNode.getAttribute("data-dependencies")),r=r?r.split(/\s*,\s*/g):[],p(r,function(){u(e,function(){Prism.highlightElement(c)})})},p=function(e,a,c){"string"==typeof e&&(e=[e]);var t=0,r=e.length,s=function(){r>t?u(e[t],function(){t++,s()},function(){c&&c(e[t])}):t===r&&a&&a(e)};s()},u=function(c,t,r){var s=function(){var e=!1;c.indexOf("!")>=0&&(e=!0,c=c.replace("!",""));var s=a[c];if(s||(s=a[c]={}),t&&(s.success_callbacks||(s.success_callbacks=[]),s.success_callbacks.push(t)),r&&(s.error_callbacks||(s.error_callbacks=[]),s.error_callbacks.push(r)),!e&&Prism.languages[c])m(c);else if(!e&&s.error)k(c);else if(e||!s.loading){s.loading=!0;var i=l(c);n(i,function(){s.loading=!1,m(c)},function(){s.loading=!1,s.error=!0,k(c)})}},i=e[c];i&&i.length?p(i,s):s()},m=function(e){a[e]&&a[e].success_callbacks&&a[e].success_callbacks.length&&a[e].success_callbacks.forEach(function(a){a(e)})},k=function(e){a[e]&&a[e].error_callbacks&&a[e].error_callbacks.length&&a[e].error_callbacks.forEach(function(a){a(e)})};Prism.hooks.add("complete",function(e){e.element&&e.language&&!e.grammar&&e.language!==c&&o(e.language,e.element)})}}(); \ No newline at end of file From f96b083a43ed60641fa1263f35c32bc9960bd1e2 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Sun, 23 Sep 2018 15:20:05 +0200 Subject: [PATCH 0072/1100] F#: Chars can only contain one character (#1570) This PR fixes #1480. --- components/prism-fsharp.js | 2 +- components/prism-fsharp.min.js | 2 +- tests/languages/fsharp/issue1480.test | 37 ++++++++++++++++++++++ tests/languages/fsharp/string_feature.test | 2 ++ 4 files changed, 41 insertions(+), 2 deletions(-) create mode 100644 tests/languages/fsharp/issue1480.test diff --git a/components/prism-fsharp.js b/components/prism-fsharp.js index 3e701e0dc1..375ab8cc15 100644 --- a/components/prism-fsharp.js +++ b/components/prism-fsharp.js @@ -11,7 +11,7 @@ Prism.languages.fsharp = Prism.languages.extend('clike', { ], 'keyword': /\b(?:let|return|use|yield)(?:!\B|\b)|\b(abstract|and|as|assert|base|begin|class|default|delegate|do|done|downcast|downto|elif|else|end|exception|extern|false|finally|for|fun|function|global|if|in|inherit|inline|interface|internal|lazy|match|member|module|mutable|namespace|new|not|null|of|open|or|override|private|public|rec|select|static|struct|then|to|true|try|type|upcast|val|void|when|while|with|asr|land|lor|lsl|lsr|lxor|mod|sig|atomic|break|checked|component|const|constraint|constructor|continue|eager|event|external|fixed|functor|include|method|mixin|object|parallel|process|protected|pure|sealed|tailcall|trait|virtual|volatile)\b/, 'string': { - pattern: /(?:"""[\s\S]*?"""|@"(?:""|[^"])*"|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1)B?/, + pattern: /(?:"""[\s\S]*?"""|@"(?:""|[^"])*"|"(?:\\[\s\S]|[^\\"])*")B?|'(?:[^\\']|\\.)'B?/, greedy: true }, 'number': [ diff --git a/components/prism-fsharp.min.js b/components/prism-fsharp.min.js index 85403b8e7a..3579777708 100644 --- a/components/prism-fsharp.min.js +++ b/components/prism-fsharp.min.js @@ -1 +1 @@ -Prism.languages.fsharp=Prism.languages.extend("clike",{comment:[{pattern:/(^|[^\\])\(\*[\s\S]*?\*\)/,lookbehind:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0}],keyword:/\b(?:let|return|use|yield)(?:!\B|\b)|\b(abstract|and|as|assert|base|begin|class|default|delegate|do|done|downcast|downto|elif|else|end|exception|extern|false|finally|for|fun|function|global|if|in|inherit|inline|interface|internal|lazy|match|member|module|mutable|namespace|new|not|null|of|open|or|override|private|public|rec|select|static|struct|then|to|true|try|type|upcast|val|void|when|while|with|asr|land|lor|lsl|lsr|lxor|mod|sig|atomic|break|checked|component|const|constraint|constructor|continue|eager|event|external|fixed|functor|include|method|mixin|object|parallel|process|protected|pure|sealed|tailcall|trait|virtual|volatile)\b/,string:{pattern:/(?:"""[\s\S]*?"""|@"(?:""|[^"])*"|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1)B?/,greedy:!0},number:[/\b0x[\da-fA-F]+(?:un|lf|LF)?\b/,/\b0b[01]+(?:y|uy)?\b/,/(?:\b\d+\.?\d*|\B\.\d+)(?:[fm]|e[+-]?\d+)?\b/i,/\b\d+(?:[IlLsy]|u[lsy]?|UL)?\b/]}),Prism.languages.insertBefore("fsharp","keyword",{preprocessor:{pattern:/^[^\r\n\S]*#.*/m,alias:"property",inside:{directive:{pattern:/(\s*#)\b(?:else|endif|if|light|line|nowarn)\b/,lookbehind:!0,alias:"keyword"}}}}); \ No newline at end of file +Prism.languages.fsharp=Prism.languages.extend("clike",{comment:[{pattern:/(^|[^\\])\(\*[\s\S]*?\*\)/,lookbehind:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0}],keyword:/\b(?:let|return|use|yield)(?:!\B|\b)|\b(abstract|and|as|assert|base|begin|class|default|delegate|do|done|downcast|downto|elif|else|end|exception|extern|false|finally|for|fun|function|global|if|in|inherit|inline|interface|internal|lazy|match|member|module|mutable|namespace|new|not|null|of|open|or|override|private|public|rec|select|static|struct|then|to|true|try|type|upcast|val|void|when|while|with|asr|land|lor|lsl|lsr|lxor|mod|sig|atomic|break|checked|component|const|constraint|constructor|continue|eager|event|external|fixed|functor|include|method|mixin|object|parallel|process|protected|pure|sealed|tailcall|trait|virtual|volatile)\b/,string:{pattern:/(?:"""[\s\S]*?"""|@"(?:""|[^"])*"|"(?:\\[\s\S]|[^\\"])*")B?|'(?:[^\\']|\\.)'B?/,greedy:!0},number:[/\b0x[\da-fA-F]+(?:un|lf|LF)?\b/,/\b0b[01]+(?:y|uy)?\b/,/(?:\b\d+\.?\d*|\B\.\d+)(?:[fm]|e[+-]?\d+)?\b/i,/\b\d+(?:[IlLsy]|u[lsy]?|UL)?\b/]}),Prism.languages.insertBefore("fsharp","keyword",{preprocessor:{pattern:/^[^\r\n\S]*#.*/m,alias:"property",inside:{directive:{pattern:/(\s*#)\b(?:else|endif|if|light|line|nowarn)\b/,lookbehind:!0,alias:"keyword"}}}}); \ No newline at end of file diff --git a/tests/languages/fsharp/issue1480.test b/tests/languages/fsharp/issue1480.test new file mode 100644 index 0000000000..f46fce23df --- /dev/null +++ b/tests/languages/fsharp/issue1480.test @@ -0,0 +1,37 @@ +let foo' = failWith "foo" + +let bar' = failWith "bar" + +let map (f: 'a -> 'b) (xs: 'a list): 'b list = failWith "not implemented" + +---------------------------------------------------- + +[ + ["keyword", "let"], " foo' ", ["operator", "="], " failWith ", ["string", "\"foo\""], + ["keyword", "let"], " bar' ", ["operator", "="], " failWith ", ["string", "\"bar\""], + + ["keyword", "let"], + " map ", + ["punctuation", "("], + "f", + ["punctuation", ":"], + " 'a ", + ["operator", "-"], + ["operator", ">"], + " 'b", + ["punctuation", ")"], + ["punctuation", "("], + "xs", + ["punctuation", ":"], + " 'a list", + ["punctuation", ")"], + ["punctuation", ":"], + " 'b list ", + ["operator", "="], + " failWith ", + ["string", "\"not implemented\""] +] + +---------------------------------------------------- + +Checks for apostrophes in names. See #1480. \ No newline at end of file diff --git a/tests/languages/fsharp/string_feature.test b/tests/languages/fsharp/string_feature.test index 89412ac072..3c984a8c65 100644 --- a/tests/languages/fsharp/string_feature.test +++ b/tests/languages/fsharp/string_feature.test @@ -15,6 +15,7 @@ bar""" """foo"""B 'a' +'a'B '\'' '\\' @@ -36,6 +37,7 @@ bar""" ["string", "\"\"\"foo\"\"\"B"], ["string", "'a'"], + ["string", "'a'B"], ["string", "'\\''"], ["string", "'\\\\'"] ] From 716923f458c2ba90b5a4ec3ab41dcae8bc0a9917 Mon Sep 17 00:00:00 2001 From: Amila Welihinda Date: Sun, 23 Sep 2018 06:21:03 -0700 Subject: [PATCH 0073/1100] Add travis repo badge to readme (#1561) --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 21c3b45ebe..30ff9fa5ad 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # [Prism](http://prismjs.com/) +[![Build Status](https://travis-ci.org/PrismJS/prism.svg?branch=master)](https://travis-ci.org/PrismJS/prism) + Prism is a lightweight, robust, elegant syntax highlighting library. It's a spin-off project from [Dabblet](http://dabblet.com/). You can learn more on http://prismjs.com/. From 11695629f12925c586702453beaee5f4825d0ebd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Lytek?= Date: Thu, 18 Oct 2018 20:34:53 +0200 Subject: [PATCH 0074/1100] Enhance definitions in TypeScript component (#1522) Add missing keywords & built-ins to the TypeScript definition. --- components/prism-typescript.js | 6 +-- components/prism-typescript.min.js | 2 +- .../languages/typescript/builtin_feature.test | 8 +++- .../languages/typescript/keyword_feature.test | 40 ++++++++++++++----- 4 files changed, 42 insertions(+), 14 deletions(-) diff --git a/components/prism-typescript.js b/components/prism-typescript.js index fc8f288106..78a6e1b784 100644 --- a/components/prism-typescript.js +++ b/components/prism-typescript.js @@ -1,7 +1,7 @@ Prism.languages.typescript = Prism.languages.extend('javascript', { // From JavaScript Prism keyword list and TypeScript language spec: https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#221-reserved-words - 'keyword': /\b(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|var|void|while|with|yield|module|declare|constructor|namespace|abstract|require|type)\b/, - 'builtin': /\b(?:string|Function|any|number|boolean|Array|symbol|console)\b/, + 'keyword': /\b(?:abstract|as|async|await|break|case|catch|class|const|constructor|continue|debugger|declare|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|is|keyof|let|module|namespace|new|null|of|package|private|protected|public|readonly|return|require|set|static|super|switch|this|throw|try|type|typeof|var|void|while|with|yield)\b/, + 'builtin': /\b(?:string|Function|any|number|boolean|Array|symbol|console|Promise|unknown|never)\b/, }); -Prism.languages.ts = Prism.languages.typescript; \ No newline at end of file +Prism.languages.ts = Prism.languages.typescript; diff --git a/components/prism-typescript.min.js b/components/prism-typescript.min.js index bded558121..f406c6b340 100644 --- a/components/prism-typescript.min.js +++ b/components/prism-typescript.min.js @@ -1 +1 @@ -Prism.languages.typescript=Prism.languages.extend("javascript",{keyword:/\b(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|var|void|while|with|yield|module|declare|constructor|namespace|abstract|require|type)\b/,builtin:/\b(?:string|Function|any|number|boolean|Array|symbol|console)\b/}),Prism.languages.ts=Prism.languages.typescript; \ No newline at end of file +Prism.languages.typescript=Prism.languages.extend("javascript",{keyword:/\b(?:abstract|as|async|await|break|case|catch|class|const|constructor|continue|debugger|declare|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|is|keyof|let|module|namespace|new|null|of|package|private|protected|public|readonly|return|require|set|static|super|switch|this|throw|try|type|typeof|var|void|while|with|yield)\b/,builtin:/\b(?:string|Function|any|number|boolean|Array|symbol|console|Promise|unknown|never)\b/}),Prism.languages.ts=Prism.languages.typescript; \ No newline at end of file diff --git a/tests/languages/typescript/builtin_feature.test b/tests/languages/typescript/builtin_feature.test index f0f23f968f..6430d93c52 100644 --- a/tests/languages/typescript/builtin_feature.test +++ b/tests/languages/typescript/builtin_feature.test @@ -6,6 +6,9 @@ boolean Array symbol console +Promise +unknown +never ---------------------------------------------------- @@ -17,7 +20,10 @@ console ["builtin", "boolean"], ["builtin", "Array"], ["builtin", "symbol"], - ["builtin", "console"] + ["builtin", "console"], + ["builtin", "Promise"], + ["builtin", "unknown"], + ["builtin", "never"] ] ---------------------------------------------------- diff --git a/tests/languages/typescript/keyword_feature.test b/tests/languages/typescript/keyword_feature.test index e94154e781..9e19b365a4 100644 --- a/tests/languages/typescript/keyword_feature.test +++ b/tests/languages/typescript/keyword_feature.test @@ -1,10 +1,16 @@ +abstract +as +async +await break case catch class; const +constructor continue debugger +declare default delete do @@ -14,6 +20,7 @@ export extends; finally for +from function get if @@ -22,14 +29,21 @@ import in instanceof; interface; +is +keyof let +module +namespace new; null +of package private protected public +readonly return +require set static super @@ -37,27 +51,30 @@ switch this throw try +type typeof var void while with yield -module -declare -constructor -enum ---------------------------------------------------- [ + ["keyword", "abstract"], + ["keyword", "as"], + ["keyword", "async"], + ["keyword", "await"], ["keyword", "break"], ["keyword", "case"], ["keyword", "catch"], ["keyword", "class"], ["punctuation", ";"], ["keyword", "const"], + ["keyword", "constructor"], ["keyword", "continue"], ["keyword", "debugger"], + ["keyword", "declare"], ["keyword", "default"], ["keyword", "delete"], ["keyword", "do"], @@ -67,6 +84,7 @@ enum ["keyword", "extends"], ["punctuation", ";"], ["keyword", "finally"], ["keyword", "for"], + ["keyword", "from"], ["keyword", "function"], ["keyword", "get"], ["keyword", "if"], @@ -75,14 +93,21 @@ enum ["keyword", "in"], ["keyword", "instanceof"], ["punctuation", ";"], ["keyword", "interface"], ["punctuation", ";"], + ["keyword", "is"], + ["keyword", "keyof"], ["keyword", "let"], + ["keyword", "module"], + ["keyword", "namespace"], ["keyword", "new"], ["punctuation", ";"], ["keyword", "null"], + ["keyword", "of"], ["keyword", "package"], ["keyword", "private"], ["keyword", "protected"], ["keyword", "public"], + ["keyword", "readonly"], ["keyword", "return"], + ["keyword", "require"], ["keyword", "set"], ["keyword", "static"], ["keyword", "super"], @@ -90,16 +115,13 @@ enum ["keyword", "this"], ["keyword", "throw"], ["keyword", "try"], + ["keyword", "type"], ["keyword", "typeof"], ["keyword", "var"], ["keyword", "void"], ["keyword", "while"], ["keyword", "with"], - ["keyword", "yield"], - ["keyword", "module"], - ["keyword", "declare"], - ["keyword", "constructor"], - ["keyword", "enum"] + ["keyword", "yield"] ] ---------------------------------------------------- From c1d6cb853ade33da47fa1b422938131bf088713a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9E=D0=BB=D0=B5=D0=B3=20=D0=94=D1=83=D1=82=D1=87=D0=B5?= =?UTF-8?q?=D0=BD=D0=BA=D0=BE?= Date: Fri, 19 Oct 2018 04:06:02 +0300 Subject: [PATCH 0075/1100] Fix tokenizing !important (#1585) Updates the regex to ensure that when `!important` sits next to a property with no spaces, it's still tokenized correctly. --- components/prism-css.js | 4 ++-- components/prism-css.min.js | 2 +- examples/prism-css.html | 10 ++++++++-- prism.js | 4 ++-- tests/languages/css/important_feature.test | 16 +++++++++++----- 5 files changed, 24 insertions(+), 12 deletions(-) diff --git a/components/prism-css.js b/components/prism-css.js index e6fdf6f6b8..38c77ca953 100644 --- a/components/prism-css.js +++ b/components/prism-css.js @@ -14,7 +14,7 @@ Prism.languages.css = { greedy: true }, 'property': /[-_a-z\xA0-\uFFFF][-\w\xA0-\uFFFF]*(?=\s*:)/i, - 'important': /\B!important\b/i, + 'important': /!important\b/i, 'function': /[-a-z0-9]+(?=\()/i, 'punctuation': /[(){};:]/ }; @@ -49,4 +49,4 @@ if (Prism.languages.markup) { alias: 'language-css' } }, Prism.languages.markup.tag); -} \ No newline at end of file +} diff --git a/components/prism-css.min.js b/components/prism-css.min.js index 3fe10c8004..c9f7507fac 100644 --- a/components/prism-css.min.js +++ b/components/prism-css.min.js @@ -1 +1 @@ -Prism.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:/@[\w-]+?.*?(?:;|(?=\s*\{))/i,inside:{rule:/@[\w-]+/}},url:/url\((?:(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1|.*?)\)/i,selector:/[^{}\s][^{};]*?(?=\s*\{)/,string:{pattern:/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},property:/[-_a-z\xA0-\uFFFF][-\w\xA0-\uFFFF]*(?=\s*:)/i,important:/\B!important\b/i,"function":/[-a-z0-9]+(?=\()/i,punctuation:/[(){};:]/},Prism.languages.css.atrule.inside.rest=Prism.languages.css,Prism.languages.markup&&(Prism.languages.insertBefore("markup","tag",{style:{pattern:/()[\s\S]*?(?=<\/style>)/i,lookbehind:!0,inside:Prism.languages.css,alias:"language-css",greedy:!0}}),Prism.languages.insertBefore("inside","attr-value",{"style-attr":{pattern:/\s*style=("|')(?:\\[\s\S]|(?!\1)[^\\])*\1/i,inside:{"attr-name":{pattern:/^\s*style/i,inside:Prism.languages.markup.tag.inside},punctuation:/^\s*=\s*['"]|['"]\s*$/,"attr-value":{pattern:/.+/i,inside:Prism.languages.css}},alias:"language-css"}},Prism.languages.markup.tag)); \ No newline at end of file +Prism.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:/@[\w-]+?.*?(?:;|(?=\s*\{))/i,inside:{rule:/@[\w-]+/}},url:/url\((?:(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1|.*?)\)/i,selector:/[^{}\s][^{};]*?(?=\s*\{)/,string:{pattern:/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},property:/[-_a-z\xA0-\uFFFF][-\w\xA0-\uFFFF]*(?=\s*:)/i,important:/!important\b/i,"function":/[-a-z0-9]+(?=\()/i,punctuation:/[(){};:]/},Prism.languages.css.atrule.inside.rest=Prism.languages.css,Prism.languages.markup&&(Prism.languages.insertBefore("markup","tag",{style:{pattern:/()[\s\S]*?(?=<\/style>)/i,lookbehind:!0,inside:Prism.languages.css,alias:"language-css",greedy:!0}}),Prism.languages.insertBefore("inside","attr-value",{"style-attr":{pattern:/\s*style=("|')(?:\\[\s\S]|(?!\1)[^\\])*\1/i,inside:{"attr-name":{pattern:/^\s*style/i,inside:Prism.languages.markup.tag.inside},punctuation:/^\s*=\s*['"]|['"]\s*$/,"attr-value":{pattern:/.+/i,inside:Prism.languages.css}},alias:"language-css"}},Prism.languages.markup.tag)); diff --git a/examples/prism-css.html b/examples/prism-css.html index e211053efd..a36f196676 100644 --- a/examples/prism-css.html +++ b/examples/prism-css.html @@ -7,7 +7,13 @@

    Simple rule

    p { color: red; }

    Important rule

    -
    p { color: red !important; }
    +
    
    +p {
    +    color: red !important;
    +    line-height: normal!important;
    +}
    +p{position:absolute!important}
    +

    @ rule

    @media screen and (min-width: 100px) {}
    @@ -25,4 +31,4 @@

    String

    content: 'foo';

    URL

    -
    content: url(foo.png);
    \ No newline at end of file +
    content: url(foo.png);
    diff --git a/prism.js b/prism.js index a60c2ceac4..89eaf85172 100644 --- a/prism.js +++ b/prism.js @@ -647,7 +647,7 @@ Prism.languages.css = { greedy: true }, 'property': /[-_a-z\xA0-\uFFFF][-\w\xA0-\uFFFF]*(?=\s*:)/i, - 'important': /\B!important\b/i, + 'important': /!important\b/i, 'function': /[-a-z0-9]+(?=\()/i, 'punctuation': /[(){};:]/ }; @@ -889,4 +889,4 @@ Prism.languages.js = Prism.languages.javascript; document.addEventListener('DOMContentLoaded', self.Prism.fileHighlight); -})(); \ No newline at end of file +})(); diff --git a/tests/languages/css/important_feature.test b/tests/languages/css/important_feature.test index ad69c39a43..0f5c1409e9 100644 --- a/tests/languages/css/important_feature.test +++ b/tests/languages/css/important_feature.test @@ -1,5 +1,6 @@ color: red !important; padding: 10px 20px 30px !important; +position:absolute!important; ---------------------------------------------------- @@ -10,12 +11,17 @@ padding: 10px 20px 30px !important; ["important", "!important"], ["punctuation", ";"], ["property", "padding"], - ["punctuation", ":"], - " 10px 20px 30px ", - ["important", "!important"], - ["punctuation", ";"] + ["punctuation", ":"], + " 10px 20px 30px ", + ["important", "!important"], + ["punctuation", ";"], + ["property", "position"], + ["punctuation", ":"], + "absolute", + ["important", "!important"], + ["punctuation", ";"] ] ---------------------------------------------------- -Checks for !important rule. \ No newline at end of file +Checks for !important rule. From 0d73f7f56c00612e97b1c8cbcebb4cb81f378193 Mon Sep 17 00:00:00 2001 From: Damien Jarry Date: Fri, 19 Oct 2018 22:48:21 +0200 Subject: [PATCH 0076/1100] Add new keywords to nginx (#1587) Adds some missing keywords to the nginx language. --- components/prism-nginx.js | 4 ++-- components/prism-nginx.min.js | 2 +- tests/languages/nginx/keyword_feature.test | 16 +++++++++++++++- 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/components/prism-nginx.js b/components/prism-nginx.js index c3fea0c81a..c9a7ccc37b 100644 --- a/components/prism-nginx.js +++ b/components/prism-nginx.js @@ -3,9 +3,9 @@ Prism.languages.nginx = Prism.languages.extend('clike', { pattern: /(^|[^"{\\])#.*/, lookbehind: true }, - 'keyword': /\b(?:CONTENT_|DOCUMENT_|GATEWAY_|HTTP_|HTTPS|if_not_empty|PATH_|QUERY_|REDIRECT_|REMOTE_|REQUEST_|SCGI|SCRIPT_|SERVER_|http|events|accept_mutex|accept_mutex_delay|access_log|add_after_body|add_before_body|add_header|addition_types|aio|alias|allow|ancient_browser|ancient_browser_value|auth|auth_basic|auth_basic_user_file|auth_http|auth_http_header|auth_http_timeout|autoindex|autoindex_exact_size|autoindex_localtime|break|charset|charset_map|charset_types|chunked_transfer_encoding|client_body_buffer_size|client_body_in_file_only|client_body_in_single_buffer|client_body_temp_path|client_body_timeout|client_header_buffer_size|client_header_timeout|client_max_body_size|connection_pool_size|create_full_put_path|daemon|dav_access|dav_methods|debug_connection|debug_points|default_type|deny|devpoll_changes|devpoll_events|directio|directio_alignment|disable_symlinks|empty_gif|env|epoll_events|error_log|error_page|expires|fastcgi_buffer_size|fastcgi_buffers|fastcgi_busy_buffers_size|fastcgi_cache|fastcgi_cache_bypass|fastcgi_cache_key|fastcgi_cache_lock|fastcgi_cache_lock_timeout|fastcgi_cache_methods|fastcgi_cache_min_uses|fastcgi_cache_path|fastcgi_cache_purge|fastcgi_cache_use_stale|fastcgi_cache_valid|fastcgi_connect_timeout|fastcgi_hide_header|fastcgi_ignore_client_abort|fastcgi_ignore_headers|fastcgi_index|fastcgi_intercept_errors|fastcgi_keep_conn|fastcgi_max_temp_file_size|fastcgi_next_upstream|fastcgi_no_cache|fastcgi_param|fastcgi_pass|fastcgi_pass_header|fastcgi_read_timeout|fastcgi_redirect_errors|fastcgi_send_timeout|fastcgi_split_path_info|fastcgi_store|fastcgi_store_access|fastcgi_temp_file_write_size|fastcgi_temp_path|flv|geo|geoip_city|geoip_country|google_perftools_profiles|gzip|gzip_buffers|gzip_comp_level|gzip_disable|gzip_http_version|gzip_min_length|gzip_proxied|gzip_static|gzip_types|gzip_vary|if|if_modified_since|ignore_invalid_headers|image_filter|image_filter_buffer|image_filter_jpeg_quality|image_filter_sharpen|image_filter_transparency|imap_capabilities|imap_client_buffer|include|index|internal|ip_hash|keepalive|keepalive_disable|keepalive_requests|keepalive_timeout|kqueue_changes|kqueue_events|large_client_header_buffers|limit_conn|limit_conn_log_level|limit_conn_zone|limit_except|limit_rate|limit_rate_after|limit_req|limit_req_log_level|limit_req_zone|limit_zone|lingering_close|lingering_time|lingering_timeout|listen|location|lock_file|log_format|log_format_combined|log_not_found|log_subrequest|map|map_hash_bucket_size|map_hash_max_size|master_process|max_ranges|memcached_buffer_size|memcached_connect_timeout|memcached_next_upstream|memcached_pass|memcached_read_timeout|memcached_send_timeout|merge_slashes|min_delete_depth|modern_browser|modern_browser_value|mp4|mp4_buffer_size|mp4_max_buffer_size|msie_padding|msie_refresh|multi_accept|open_file_cache|open_file_cache_errors|open_file_cache_min_uses|open_file_cache_valid|open_log_file_cache|optimize_server_names|override_charset|pcre_jit|perl|perl_modules|perl_require|perl_set|pid|pop3_auth|pop3_capabilities|port_in_redirect|post_action|postpone_output|protocol|proxy|proxy_buffer|proxy_buffer_size|proxy_buffering|proxy_buffers|proxy_busy_buffers_size|proxy_cache|proxy_cache_bypass|proxy_cache_key|proxy_cache_lock|proxy_cache_lock_timeout|proxy_cache_methods|proxy_cache_min_uses|proxy_cache_path|proxy_cache_use_stale|proxy_cache_valid|proxy_connect_timeout|proxy_cookie_domain|proxy_cookie_path|proxy_headers_hash_bucket_size|proxy_headers_hash_max_size|proxy_hide_header|proxy_http_version|proxy_ignore_client_abort|proxy_ignore_headers|proxy_intercept_errors|proxy_max_temp_file_size|proxy_method|proxy_next_upstream|proxy_no_cache|proxy_pass|proxy_pass_error_message|proxy_pass_header|proxy_pass_request_body|proxy_pass_request_headers|proxy_read_timeout|proxy_redirect|proxy_redirect_errors|proxy_send_lowat|proxy_send_timeout|proxy_set_body|proxy_set_header|proxy_ssl_session_reuse|proxy_store|proxy_store_access|proxy_temp_file_write_size|proxy_temp_path|proxy_timeout|proxy_upstream_fail_timeout|proxy_upstream_max_fails|random_index|read_ahead|real_ip_header|recursive_error_pages|request_pool_size|reset_timedout_connection|resolver|resolver_timeout|return|rewrite|root|rtsig_overflow_events|rtsig_overflow_test|rtsig_overflow_threshold|rtsig_signo|satisfy|satisfy_any|secure_link_secret|send_lowat|send_timeout|sendfile|sendfile_max_chunk|server|server_name|server_name_in_redirect|server_names_hash_bucket_size|server_names_hash_max_size|server_tokens|set|set_real_ip_from|smtp_auth|smtp_capabilities|so_keepalive|source_charset|split_clients|ssi|ssi_silent_errors|ssi_types|ssi_value_length|ssl|ssl_certificate|ssl_certificate_key|ssl_ciphers|ssl_client_certificate|ssl_crl|ssl_dhparam|ssl_engine|ssl_prefer_server_ciphers|ssl_protocols|ssl_session_cache|ssl_session_timeout|ssl_verify_client|ssl_verify_depth|starttls|stub_status|sub_filter|sub_filter_once|sub_filter_types|tcp_nodelay|tcp_nopush|timeout|timer_resolution|try_files|types|types_hash_bucket_size|types_hash_max_size|underscores_in_headers|uninitialized_variable_warn|upstream|use|user|userid|userid_domain|userid_expires|userid_name|userid_p3p|userid_path|userid_service|valid_referers|variables_hash_bucket_size|variables_hash_max_size|worker_connections|worker_cpu_affinity|worker_priority|worker_processes|worker_rlimit_core|worker_rlimit_nofile|worker_rlimit_sigpending|working_directory|xclient|xml_entities|xslt_entities|xslt_stylesheet|xslt_types)\b/i + 'keyword': /\b(?:CONTENT_|DOCUMENT_|GATEWAY_|HTTP_|HTTPS|if_not_empty|PATH_|QUERY_|REDIRECT_|REMOTE_|REQUEST_|SCGI|SCRIPT_|SERVER_|http|events|accept_mutex|accept_mutex_delay|access_log|add_after_body|add_before_body|add_header|addition_types|aio|alias|allow|ancient_browser|ancient_browser_value|auth|auth_basic|auth_basic_user_file|auth_http|auth_http_header|auth_http_timeout|autoindex|autoindex_exact_size|autoindex_localtime|break|charset|charset_map|charset_types|chunked_transfer_encoding|client_body_buffer_size|client_body_in_file_only|client_body_in_single_buffer|client_body_temp_path|client_body_timeout|client_header_buffer_size|client_header_timeout|client_max_body_size|connection_pool_size|create_full_put_path|daemon|dav_access|dav_methods|debug_connection|debug_points|default_type|deny|devpoll_changes|devpoll_events|directio|directio_alignment|disable_symlinks|empty_gif|env|epoll_events|error_log|error_page|expires|fastcgi_buffer_size|fastcgi_buffers|fastcgi_busy_buffers_size|fastcgi_cache|fastcgi_cache_bypass|fastcgi_cache_key|fastcgi_cache_lock|fastcgi_cache_lock_timeout|fastcgi_cache_methods|fastcgi_cache_min_uses|fastcgi_cache_path|fastcgi_cache_purge|fastcgi_cache_use_stale|fastcgi_cache_valid|fastcgi_connect_timeout|fastcgi_hide_header|fastcgi_ignore_client_abort|fastcgi_ignore_headers|fastcgi_index|fastcgi_intercept_errors|fastcgi_keep_conn|fastcgi_max_temp_file_size|fastcgi_next_upstream|fastcgi_no_cache|fastcgi_param|fastcgi_pass|fastcgi_pass_header|fastcgi_read_timeout|fastcgi_redirect_errors|fastcgi_send_timeout|fastcgi_split_path_info|fastcgi_store|fastcgi_store_access|fastcgi_temp_file_write_size|fastcgi_temp_path|flv|geo|geoip_city|geoip_country|google_perftools_profiles|gzip|gzip_buffers|gzip_comp_level|gzip_disable|gzip_http_version|gzip_min_length|gzip_proxied|gzip_static|gzip_types|gzip_vary|if|if_modified_since|ignore_invalid_headers|image_filter|image_filter_buffer|image_filter_jpeg_quality|image_filter_sharpen|image_filter_transparency|imap_capabilities|imap_client_buffer|include|index|internal|ip_hash|keepalive|keepalive_disable|keepalive_requests|keepalive_timeout|kqueue_changes|kqueue_events|large_client_header_buffers|limit_conn|limit_conn_log_level|limit_conn_zone|limit_except|limit_rate|limit_rate_after|limit_req|limit_req_log_level|limit_req_zone|limit_zone|lingering_close|lingering_time|lingering_timeout|listen|location|lock_file|log_format|log_format_combined|log_not_found|log_subrequest|map|map_hash_bucket_size|map_hash_max_size|master_process|max_ranges|memcached_buffer_size|memcached_connect_timeout|memcached_next_upstream|memcached_pass|memcached_read_timeout|memcached_send_timeout|merge_slashes|min_delete_depth|modern_browser|modern_browser_value|mp4|mp4_buffer_size|mp4_max_buffer_size|msie_padding|msie_refresh|multi_accept|open_file_cache|open_file_cache_errors|open_file_cache_min_uses|open_file_cache_valid|open_log_file_cache|optimize_server_names|override_charset|pcre_jit|perl|perl_modules|perl_require|perl_set|pid|pop3_auth|pop3_capabilities|port_in_redirect|post_action|postpone_output|protocol|proxy|proxy_buffer|proxy_buffer_size|proxy_buffering|proxy_buffers|proxy_busy_buffers_size|proxy_cache|proxy_cache_bypass|proxy_cache_key|proxy_cache_lock|proxy_cache_lock_timeout|proxy_cache_methods|proxy_cache_min_uses|proxy_cache_path|proxy_cache_use_stale|proxy_cache_valid|proxy_connect_timeout|proxy_cookie_domain|proxy_cookie_path|proxy_headers_hash_bucket_size|proxy_headers_hash_max_size|proxy_hide_header|proxy_http_version|proxy_ignore_client_abort|proxy_ignore_headers|proxy_intercept_errors|proxy_max_temp_file_size|proxy_method|proxy_next_upstream|proxy_no_cache|proxy_pass|proxy_pass_error_message|proxy_pass_header|proxy_pass_request_body|proxy_pass_request_headers|proxy_read_timeout|proxy_redirect|proxy_redirect_errors|proxy_send_lowat|proxy_send_timeout|proxy_set_body|proxy_set_header|proxy_ssl_session_reuse|proxy_store|proxy_store_access|proxy_temp_file_write_size|proxy_temp_path|proxy_timeout|proxy_upstream_fail_timeout|proxy_upstream_max_fails|random_index|read_ahead|real_ip_header|recursive_error_pages|request_pool_size|reset_timedout_connection|resolver|resolver_timeout|return|rewrite|root|rtsig_overflow_events|rtsig_overflow_test|rtsig_overflow_threshold|rtsig_signo|satisfy|satisfy_any|secure_link_secret|send_lowat|send_timeout|sendfile|sendfile_max_chunk|server|server_name|server_name_in_redirect|server_names_hash_bucket_size|server_names_hash_max_size|server_tokens|set|set_real_ip_from|smtp_auth|smtp_capabilities|so_keepalive|source_charset|split_clients|ssi|ssi_silent_errors|ssi_types|ssi_value_length|ssl|ssl_certificate|ssl_certificate_key|ssl_ciphers|ssl_client_certificate|ssl_crl|ssl_dhparam|ssl_engine|ssl_prefer_server_ciphers|ssl_protocols|ssl_session_cache|ssl_session_timeout|ssl_verify_client|ssl_verify_depth|starttls|stub_status|sub_filter|sub_filter_once|sub_filter_types|tcp_nodelay|tcp_nopush|timeout|timer_resolution|try_files|types|types_hash_bucket_size|types_hash_max_size|underscores_in_headers|uninitialized_variable_warn|upstream|use|user|userid|userid_domain|userid_expires|userid_name|userid_p3p|userid_path|userid_service|valid_referers|variables_hash_bucket_size|variables_hash_max_size|worker_connections|worker_cpu_affinity|worker_priority|worker_processes|worker_rlimit_core|worker_rlimit_nofile|worker_rlimit_sigpending|working_directory|xclient|xml_entities|xslt_entities|xslt_stylesheet|xslt_types|ssl_session_tickets|ssl_stapling|ssl_stapling_verify|ssl_ecdh_curve|ssl_trusted_certificate|more_set_headers|ssl_early_data)\b/i }); Prism.languages.insertBefore('nginx', 'keyword', { 'variable': /\$[a-z_]+/i -}); \ No newline at end of file +}); diff --git a/components/prism-nginx.min.js b/components/prism-nginx.min.js index 134bfbd98f..0c1d62aa8c 100644 --- a/components/prism-nginx.min.js +++ b/components/prism-nginx.min.js @@ -1 +1 @@ -Prism.languages.nginx=Prism.languages.extend("clike",{comment:{pattern:/(^|[^"{\\])#.*/,lookbehind:!0},keyword:/\b(?:CONTENT_|DOCUMENT_|GATEWAY_|HTTP_|HTTPS|if_not_empty|PATH_|QUERY_|REDIRECT_|REMOTE_|REQUEST_|SCGI|SCRIPT_|SERVER_|http|events|accept_mutex|accept_mutex_delay|access_log|add_after_body|add_before_body|add_header|addition_types|aio|alias|allow|ancient_browser|ancient_browser_value|auth|auth_basic|auth_basic_user_file|auth_http|auth_http_header|auth_http_timeout|autoindex|autoindex_exact_size|autoindex_localtime|break|charset|charset_map|charset_types|chunked_transfer_encoding|client_body_buffer_size|client_body_in_file_only|client_body_in_single_buffer|client_body_temp_path|client_body_timeout|client_header_buffer_size|client_header_timeout|client_max_body_size|connection_pool_size|create_full_put_path|daemon|dav_access|dav_methods|debug_connection|debug_points|default_type|deny|devpoll_changes|devpoll_events|directio|directio_alignment|disable_symlinks|empty_gif|env|epoll_events|error_log|error_page|expires|fastcgi_buffer_size|fastcgi_buffers|fastcgi_busy_buffers_size|fastcgi_cache|fastcgi_cache_bypass|fastcgi_cache_key|fastcgi_cache_lock|fastcgi_cache_lock_timeout|fastcgi_cache_methods|fastcgi_cache_min_uses|fastcgi_cache_path|fastcgi_cache_purge|fastcgi_cache_use_stale|fastcgi_cache_valid|fastcgi_connect_timeout|fastcgi_hide_header|fastcgi_ignore_client_abort|fastcgi_ignore_headers|fastcgi_index|fastcgi_intercept_errors|fastcgi_keep_conn|fastcgi_max_temp_file_size|fastcgi_next_upstream|fastcgi_no_cache|fastcgi_param|fastcgi_pass|fastcgi_pass_header|fastcgi_read_timeout|fastcgi_redirect_errors|fastcgi_send_timeout|fastcgi_split_path_info|fastcgi_store|fastcgi_store_access|fastcgi_temp_file_write_size|fastcgi_temp_path|flv|geo|geoip_city|geoip_country|google_perftools_profiles|gzip|gzip_buffers|gzip_comp_level|gzip_disable|gzip_http_version|gzip_min_length|gzip_proxied|gzip_static|gzip_types|gzip_vary|if|if_modified_since|ignore_invalid_headers|image_filter|image_filter_buffer|image_filter_jpeg_quality|image_filter_sharpen|image_filter_transparency|imap_capabilities|imap_client_buffer|include|index|internal|ip_hash|keepalive|keepalive_disable|keepalive_requests|keepalive_timeout|kqueue_changes|kqueue_events|large_client_header_buffers|limit_conn|limit_conn_log_level|limit_conn_zone|limit_except|limit_rate|limit_rate_after|limit_req|limit_req_log_level|limit_req_zone|limit_zone|lingering_close|lingering_time|lingering_timeout|listen|location|lock_file|log_format|log_format_combined|log_not_found|log_subrequest|map|map_hash_bucket_size|map_hash_max_size|master_process|max_ranges|memcached_buffer_size|memcached_connect_timeout|memcached_next_upstream|memcached_pass|memcached_read_timeout|memcached_send_timeout|merge_slashes|min_delete_depth|modern_browser|modern_browser_value|mp4|mp4_buffer_size|mp4_max_buffer_size|msie_padding|msie_refresh|multi_accept|open_file_cache|open_file_cache_errors|open_file_cache_min_uses|open_file_cache_valid|open_log_file_cache|optimize_server_names|override_charset|pcre_jit|perl|perl_modules|perl_require|perl_set|pid|pop3_auth|pop3_capabilities|port_in_redirect|post_action|postpone_output|protocol|proxy|proxy_buffer|proxy_buffer_size|proxy_buffering|proxy_buffers|proxy_busy_buffers_size|proxy_cache|proxy_cache_bypass|proxy_cache_key|proxy_cache_lock|proxy_cache_lock_timeout|proxy_cache_methods|proxy_cache_min_uses|proxy_cache_path|proxy_cache_use_stale|proxy_cache_valid|proxy_connect_timeout|proxy_cookie_domain|proxy_cookie_path|proxy_headers_hash_bucket_size|proxy_headers_hash_max_size|proxy_hide_header|proxy_http_version|proxy_ignore_client_abort|proxy_ignore_headers|proxy_intercept_errors|proxy_max_temp_file_size|proxy_method|proxy_next_upstream|proxy_no_cache|proxy_pass|proxy_pass_error_message|proxy_pass_header|proxy_pass_request_body|proxy_pass_request_headers|proxy_read_timeout|proxy_redirect|proxy_redirect_errors|proxy_send_lowat|proxy_send_timeout|proxy_set_body|proxy_set_header|proxy_ssl_session_reuse|proxy_store|proxy_store_access|proxy_temp_file_write_size|proxy_temp_path|proxy_timeout|proxy_upstream_fail_timeout|proxy_upstream_max_fails|random_index|read_ahead|real_ip_header|recursive_error_pages|request_pool_size|reset_timedout_connection|resolver|resolver_timeout|return|rewrite|root|rtsig_overflow_events|rtsig_overflow_test|rtsig_overflow_threshold|rtsig_signo|satisfy|satisfy_any|secure_link_secret|send_lowat|send_timeout|sendfile|sendfile_max_chunk|server|server_name|server_name_in_redirect|server_names_hash_bucket_size|server_names_hash_max_size|server_tokens|set|set_real_ip_from|smtp_auth|smtp_capabilities|so_keepalive|source_charset|split_clients|ssi|ssi_silent_errors|ssi_types|ssi_value_length|ssl|ssl_certificate|ssl_certificate_key|ssl_ciphers|ssl_client_certificate|ssl_crl|ssl_dhparam|ssl_engine|ssl_prefer_server_ciphers|ssl_protocols|ssl_session_cache|ssl_session_timeout|ssl_verify_client|ssl_verify_depth|starttls|stub_status|sub_filter|sub_filter_once|sub_filter_types|tcp_nodelay|tcp_nopush|timeout|timer_resolution|try_files|types|types_hash_bucket_size|types_hash_max_size|underscores_in_headers|uninitialized_variable_warn|upstream|use|user|userid|userid_domain|userid_expires|userid_name|userid_p3p|userid_path|userid_service|valid_referers|variables_hash_bucket_size|variables_hash_max_size|worker_connections|worker_cpu_affinity|worker_priority|worker_processes|worker_rlimit_core|worker_rlimit_nofile|worker_rlimit_sigpending|working_directory|xclient|xml_entities|xslt_entities|xslt_stylesheet|xslt_types)\b/i}),Prism.languages.insertBefore("nginx","keyword",{variable:/\$[a-z_]+/i}); \ No newline at end of file +Prism.languages.nginx=Prism.languages.extend("clike",{comment:{pattern:/(^|[^"{\\])#.*/,lookbehind:!0},keyword:/\b(?:CONTENT_|DOCUMENT_|GATEWAY_|HTTP_|HTTPS|if_not_empty|PATH_|QUERY_|REDIRECT_|REMOTE_|REQUEST_|SCGI|SCRIPT_|SERVER_|http|events|accept_mutex|accept_mutex_delay|access_log|add_after_body|add_before_body|add_header|addition_types|aio|alias|allow|ancient_browser|ancient_browser_value|auth|auth_basic|auth_basic_user_file|auth_http|auth_http_header|auth_http_timeout|autoindex|autoindex_exact_size|autoindex_localtime|break|charset|charset_map|charset_types|chunked_transfer_encoding|client_body_buffer_size|client_body_in_file_only|client_body_in_single_buffer|client_body_temp_path|client_body_timeout|client_header_buffer_size|client_header_timeout|client_max_body_size|connection_pool_size|create_full_put_path|daemon|dav_access|dav_methods|debug_connection|debug_points|default_type|deny|devpoll_changes|devpoll_events|directio|directio_alignment|disable_symlinks|empty_gif|env|epoll_events|error_log|error_page|expires|fastcgi_buffer_size|fastcgi_buffers|fastcgi_busy_buffers_size|fastcgi_cache|fastcgi_cache_bypass|fastcgi_cache_key|fastcgi_cache_lock|fastcgi_cache_lock_timeout|fastcgi_cache_methods|fastcgi_cache_min_uses|fastcgi_cache_path|fastcgi_cache_purge|fastcgi_cache_use_stale|fastcgi_cache_valid|fastcgi_connect_timeout|fastcgi_hide_header|fastcgi_ignore_client_abort|fastcgi_ignore_headers|fastcgi_index|fastcgi_intercept_errors|fastcgi_keep_conn|fastcgi_max_temp_file_size|fastcgi_next_upstream|fastcgi_no_cache|fastcgi_param|fastcgi_pass|fastcgi_pass_header|fastcgi_read_timeout|fastcgi_redirect_errors|fastcgi_send_timeout|fastcgi_split_path_info|fastcgi_store|fastcgi_store_access|fastcgi_temp_file_write_size|fastcgi_temp_path|flv|geo|geoip_city|geoip_country|google_perftools_profiles|gzip|gzip_buffers|gzip_comp_level|gzip_disable|gzip_http_version|gzip_min_length|gzip_proxied|gzip_static|gzip_types|gzip_vary|if|if_modified_since|ignore_invalid_headers|image_filter|image_filter_buffer|image_filter_jpeg_quality|image_filter_sharpen|image_filter_transparency|imap_capabilities|imap_client_buffer|include|index|internal|ip_hash|keepalive|keepalive_disable|keepalive_requests|keepalive_timeout|kqueue_changes|kqueue_events|large_client_header_buffers|limit_conn|limit_conn_log_level|limit_conn_zone|limit_except|limit_rate|limit_rate_after|limit_req|limit_req_log_level|limit_req_zone|limit_zone|lingering_close|lingering_time|lingering_timeout|listen|location|lock_file|log_format|log_format_combined|log_not_found|log_subrequest|map|map_hash_bucket_size|map_hash_max_size|master_process|max_ranges|memcached_buffer_size|memcached_connect_timeout|memcached_next_upstream|memcached_pass|memcached_read_timeout|memcached_send_timeout|merge_slashes|min_delete_depth|modern_browser|modern_browser_value|mp4|mp4_buffer_size|mp4_max_buffer_size|msie_padding|msie_refresh|multi_accept|open_file_cache|open_file_cache_errors|open_file_cache_min_uses|open_file_cache_valid|open_log_file_cache|optimize_server_names|override_charset|pcre_jit|perl|perl_modules|perl_require|perl_set|pid|pop3_auth|pop3_capabilities|port_in_redirect|post_action|postpone_output|protocol|proxy|proxy_buffer|proxy_buffer_size|proxy_buffering|proxy_buffers|proxy_busy_buffers_size|proxy_cache|proxy_cache_bypass|proxy_cache_key|proxy_cache_lock|proxy_cache_lock_timeout|proxy_cache_methods|proxy_cache_min_uses|proxy_cache_path|proxy_cache_use_stale|proxy_cache_valid|proxy_connect_timeout|proxy_cookie_domain|proxy_cookie_path|proxy_headers_hash_bucket_size|proxy_headers_hash_max_size|proxy_hide_header|proxy_http_version|proxy_ignore_client_abort|proxy_ignore_headers|proxy_intercept_errors|proxy_max_temp_file_size|proxy_method|proxy_next_upstream|proxy_no_cache|proxy_pass|proxy_pass_error_message|proxy_pass_header|proxy_pass_request_body|proxy_pass_request_headers|proxy_read_timeout|proxy_redirect|proxy_redirect_errors|proxy_send_lowat|proxy_send_timeout|proxy_set_body|proxy_set_header|proxy_ssl_session_reuse|proxy_store|proxy_store_access|proxy_temp_file_write_size|proxy_temp_path|proxy_timeout|proxy_upstream_fail_timeout|proxy_upstream_max_fails|random_index|read_ahead|real_ip_header|recursive_error_pages|request_pool_size|reset_timedout_connection|resolver|resolver_timeout|return|rewrite|root|rtsig_overflow_events|rtsig_overflow_test|rtsig_overflow_threshold|rtsig_signo|satisfy|satisfy_any|secure_link_secret|send_lowat|send_timeout|sendfile|sendfile_max_chunk|server|server_name|server_name_in_redirect|server_names_hash_bucket_size|server_names_hash_max_size|server_tokens|set|set_real_ip_from|smtp_auth|smtp_capabilities|so_keepalive|source_charset|split_clients|ssi|ssi_silent_errors|ssi_types|ssi_value_length|ssl|ssl_certificate|ssl_certificate_key|ssl_ciphers|ssl_client_certificate|ssl_crl|ssl_dhparam|ssl_engine|ssl_prefer_server_ciphers|ssl_protocols|ssl_session_cache|ssl_session_timeout|ssl_verify_client|ssl_verify_depth|starttls|stub_status|sub_filter|sub_filter_once|sub_filter_types|tcp_nodelay|tcp_nopush|timeout|timer_resolution|try_files|types|types_hash_bucket_size|types_hash_max_size|underscores_in_headers|uninitialized_variable_warn|upstream|use|user|userid|userid_domain|userid_expires|userid_name|userid_p3p|userid_path|userid_service|valid_referers|variables_hash_bucket_size|variables_hash_max_size|worker_connections|worker_cpu_affinity|worker_priority|worker_processes|worker_rlimit_core|worker_rlimit_nofile|worker_rlimit_sigpending|working_directory|xclient|xml_entities|xslt_entities|xslt_stylesheet|xslt_types|ssl_session_tickets|ssl_stapling|ssl_stapling_verify|ssl_ecdh_curve|ssl_trusted_certificate|more_set_headers|ssl_early_data)\b/i}),Prism.languages.insertBefore("nginx","keyword",{variable:/\$[a-z_]+/i}); \ No newline at end of file diff --git a/tests/languages/nginx/keyword_feature.test b/tests/languages/nginx/keyword_feature.test index 2d55fd4ee5..bd34c52b34 100644 --- a/tests/languages/nginx/keyword_feature.test +++ b/tests/languages/nginx/keyword_feature.test @@ -177,6 +177,7 @@ merge_slashes min_delete_depth modern_browser modern_browser_value +more_set_headers mp4 mp4_buffer_size mp4_max_buffer_size @@ -298,11 +299,17 @@ ssl_ciphers ssl_client_certificate ssl_crl ssl_dhparam +ssl_early_data +ssl_ecdh_curve ssl_engine ssl_prefer_server_ciphers ssl_protocols ssl_session_cache +ssl_session_tickets ssl_session_timeout +ssl_stapling +ssl_stapling_verify +ssl_trusted_certificate ssl_verify_client ssl_verify_depth starttls @@ -529,6 +536,7 @@ xslt_types ["keyword", "min_delete_depth"], ["keyword", "modern_browser"], ["keyword", "modern_browser_value"], + ["keyword", "more_set_headers"], ["keyword", "mp4"], ["keyword", "mp4_buffer_size"], ["keyword", "mp4_max_buffer_size"], @@ -650,11 +658,17 @@ xslt_types ["keyword", "ssl_client_certificate"], ["keyword", "ssl_crl"], ["keyword", "ssl_dhparam"], + ["keyword", "ssl_early_data"], + ["keyword", "ssl_ecdh_curve"], ["keyword", "ssl_engine"], ["keyword", "ssl_prefer_server_ciphers"], ["keyword", "ssl_protocols"], ["keyword", "ssl_session_cache"], + ["keyword", "ssl_session_tickets"], ["keyword", "ssl_session_timeout"], + ["keyword", "ssl_stapling"], + ["keyword", "ssl_stapling_verify"], + ["keyword", "ssl_trusted_certificate"], ["keyword", "ssl_verify_client"], ["keyword", "ssl_verify_depth"], ["keyword", "starttls"], @@ -702,4 +716,4 @@ xslt_types ---------------------------------------------------- -Checks for keywords. \ No newline at end of file +Checks for keywords. From b41fb8f11d912056b04455c722ce2d40bc3630a1 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Mon, 22 Oct 2018 15:47:13 +0200 Subject: [PATCH 0077/1100] Fixes regex for JS examples (#1591) This PR fixes a regex example which Prism does not highlight correctly because it is preceded by a comment. --- examples/prism-javascript.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/prism-javascript.html b/examples/prism-javascript.html index 9b944680d5..51fe4835bd 100644 --- a/examples/prism-javascript.html +++ b/examples/prism-javascript.html @@ -49,7 +49,7 @@

    A division operator on the same line as a regex

    ES6 features

    // Regex "y" and "u" flags
    -/[a-zA-Z]+/gimyu
    +var a = /[a-zA-Z]+/gimyu;
     
     // for..of loops
     for(let x of y) { }
    @@ -74,4 +74,4 @@ 

    Known failures

    String interpolation containing a closing brace

    `${ {foo:'bar'}.foo }`
    -`${ '}' }`
    \ No newline at end of file +`${ '}' }`
    From bfbe4464ce6f4fc997ccdf2b8ce2066c2e0d3fc6 Mon Sep 17 00:00:00 2001 From: Ran Luo Date: Wed, 24 Oct 2018 04:08:51 +0800 Subject: [PATCH 0078/1100] Invoke `callback` after `after-highlight` hook (#1588) Previously, `callback`, as passed to `Prism.highlightElement`, would get called before all of the hooks had been run. This moves it after all the hooks, so it can truly be considered a "complete" callback. This could be a breaking change for any userland modifications that were expecting `callback` to fire before plugins, but we expect this change to mostly conform with user expectations and consider this a bugfix.. --- components/prism-core.js | 7 ++++--- components/prism-core.min.js | 2 +- components/prism-css.min.js | 2 +- prism.js | 10 ++++++---- 4 files changed, 12 insertions(+), 9 deletions(-) diff --git a/components/prism-core.js b/components/prism-core.js index 0ff3bbf38c..a09e69656d 100644 --- a/components/prism-core.js +++ b/components/prism-core.js @@ -249,9 +249,9 @@ var _ = _self.Prism = { env.element.innerHTML = env.highlightedCode; - callback && callback.call(env.element); _.hooks.run('after-highlight', env); _.hooks.run('complete', env); + callback && callback.call(env.element); }; worker.postMessage(JSON.stringify({ @@ -267,10 +267,11 @@ var _ = _self.Prism = { env.element.innerHTML = env.highlightedCode; - callback && callback.call(element); - _.hooks.run('after-highlight', env); + _.hooks.run('complete', env); + + callback && callback.call(element); } }, diff --git a/components/prism-core.min.js b/components/prism-core.min.js index 1256177db7..8b2d545d8e 100644 --- a/components/prism-core.min.js +++ b/components/prism-core.min.js @@ -1 +1 @@ -var _self="undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{},Prism=function(){var e=/\blang(?:uage)?-([\w-]+)\b/i,t=0,n=_self.Prism={manual:_self.Prism&&_self.Prism.manual,disableWorkerMessageHandler:_self.Prism&&_self.Prism.disableWorkerMessageHandler,util:{encode:function(e){return e instanceof r?new r(e.type,n.util.encode(e.content),e.alias):"Array"===n.util.type(e)?e.map(n.util.encode):e.replace(/&/g,"&").replace(/e.length)return;if(!(w instanceof s)){if(m&&b!=t.length-1){h.lastIndex=k;var _=h.exec(e);if(!_)break;for(var j=_.index+(d?_[1].length:0),P=_.index+_[0].length,A=b,x=k,O=t.length;O>A&&(P>x||!t[A].type&&!t[A-1].greedy);++A)x+=t[A].length,j>=x&&(++b,k=x);if(t[b]instanceof s)continue;I=A-b,w=e.slice(k,x),_.index-=k}else{h.lastIndex=0;var _=h.exec(w),I=1}if(_){d&&(p=_[1]?_[1].length:0);var j=_.index+p,_=_[0].slice(p),P=j+_.length,N=w.slice(0,j),S=w.slice(P),C=[b,I];N&&(++b,k+=N.length,C.push(N));var E=new s(u,f?n.tokenize(_,f):_,y,_,m);if(C.push(E),S&&C.push(S),Array.prototype.splice.apply(t,C),1!=I&&n.matchGrammar(e,t,r,b,k,!0,u),i)break}else if(i)break}}}}},tokenize:function(e,t){var r=[e],a=t.rest;if(a){for(var l in a)t[l]=a[l];delete t.rest}return n.matchGrammar(e,r,t,0,0,!1),r},hooks:{all:{},add:function(e,t){var r=n.hooks.all;r[e]=r[e]||[],r[e].push(t)},run:function(e,t){var r=n.hooks.all[e];if(r&&r.length)for(var a,l=0;a=r[l++];)a(t)}}},r=n.Token=function(e,t,n,r,a){this.type=e,this.content=t,this.alias=n,this.length=0|(r||"").length,this.greedy=!!a};if(r.stringify=function(e,t,a){if("string"==typeof e)return e;if("Array"===n.util.type(e))return e.map(function(n){return r.stringify(n,t,e)}).join("");var l={type:e.type,content:r.stringify(e.content,t,a),tag:"span",classes:["token",e.type],attributes:{},language:t,parent:a};if(e.alias){var i="Array"===n.util.type(e.alias)?e.alias:[e.alias];Array.prototype.push.apply(l.classes,i)}n.hooks.run("wrap",l);var o=Object.keys(l.attributes).map(function(e){return e+'="'+(l.attributes[e]||"").replace(/"/g,""")+'"'}).join(" ");return"<"+l.tag+' class="'+l.classes.join(" ")+'"'+(o?" "+o:"")+">"+l.content+""},!_self.document)return _self.addEventListener?(n.disableWorkerMessageHandler||_self.addEventListener("message",function(e){var t=JSON.parse(e.data),r=t.language,a=t.code,l=t.immediateClose;_self.postMessage(n.highlight(a,n.languages[r],r)),l&&_self.close()},!1),_self.Prism):_self.Prism;var a=document.currentScript||[].slice.call(document.getElementsByTagName("script")).pop();return a&&(n.filename=a.src,n.manual||a.hasAttribute("data-manual")||("loading"!==document.readyState?window.requestAnimationFrame?window.requestAnimationFrame(n.highlightAll):window.setTimeout(n.highlightAll,16):document.addEventListener("DOMContentLoaded",n.highlightAll))),_self.Prism}();"undefined"!=typeof module&&module.exports&&(module.exports=Prism),"undefined"!=typeof global&&(global.Prism=Prism); \ No newline at end of file +var _self="undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{},Prism=function(){var e=/\blang(?:uage)?-([\w-]+)\b/i,t=0,n=_self.Prism={manual:_self.Prism&&_self.Prism.manual,disableWorkerMessageHandler:_self.Prism&&_self.Prism.disableWorkerMessageHandler,util:{encode:function(e){return e instanceof r?new r(e.type,n.util.encode(e.content),e.alias):"Array"===n.util.type(e)?e.map(n.util.encode):e.replace(/&/g,"&").replace(/e.length)return;if(!(w instanceof s)){if(m&&b!=t.length-1){h.lastIndex=k;var _=h.exec(e);if(!_)break;for(var j=_.index+(d?_[1].length:0),P=_.index+_[0].length,A=b,x=k,O=t.length;O>A&&(P>x||!t[A].type&&!t[A-1].greedy);++A)x+=t[A].length,j>=x&&(++b,k=x);if(t[b]instanceof s)continue;I=A-b,w=e.slice(k,x),_.index-=k}else{h.lastIndex=0;var _=h.exec(w),I=1}if(_){d&&(p=_[1]?_[1].length:0);var j=_.index+p,_=_[0].slice(p),P=j+_.length,N=w.slice(0,j),S=w.slice(P),C=[b,I];N&&(++b,k+=N.length,C.push(N));var E=new s(u,f?n.tokenize(_,f):_,y,_,m);if(C.push(E),S&&C.push(S),Array.prototype.splice.apply(t,C),1!=I&&n.matchGrammar(e,t,r,b,k,!0,u),i)break}else if(i)break}}}}},tokenize:function(e,t){var r=[e],a=t.rest;if(a){for(var l in a)t[l]=a[l];delete t.rest}return n.matchGrammar(e,r,t,0,0,!1),r},hooks:{all:{},add:function(e,t){var r=n.hooks.all;r[e]=r[e]||[],r[e].push(t)},run:function(e,t){var r=n.hooks.all[e];if(r&&r.length)for(var a,l=0;a=r[l++];)a(t)}}},r=n.Token=function(e,t,n,r,a){this.type=e,this.content=t,this.alias=n,this.length=0|(r||"").length,this.greedy=!!a};if(r.stringify=function(e,t,a){if("string"==typeof e)return e;if("Array"===n.util.type(e))return e.map(function(n){return r.stringify(n,t,e)}).join("");var l={type:e.type,content:r.stringify(e.content,t,a),tag:"span",classes:["token",e.type],attributes:{},language:t,parent:a};if(e.alias){var i="Array"===n.util.type(e.alias)?e.alias:[e.alias];Array.prototype.push.apply(l.classes,i)}n.hooks.run("wrap",l);var o=Object.keys(l.attributes).map(function(e){return e+'="'+(l.attributes[e]||"").replace(/"/g,""")+'"'}).join(" ");return"<"+l.tag+' class="'+l.classes.join(" ")+'"'+(o?" "+o:"")+">"+l.content+""},!_self.document)return _self.addEventListener?(n.disableWorkerMessageHandler||_self.addEventListener("message",function(e){var t=JSON.parse(e.data),r=t.language,a=t.code,l=t.immediateClose;_self.postMessage(n.highlight(a,n.languages[r],r)),l&&_self.close()},!1),_self.Prism):_self.Prism;var a=document.currentScript||[].slice.call(document.getElementsByTagName("script")).pop();return a&&(n.filename=a.src,n.manual||a.hasAttribute("data-manual")||("loading"!==document.readyState?window.requestAnimationFrame?window.requestAnimationFrame(n.highlightAll):window.setTimeout(n.highlightAll,16):document.addEventListener("DOMContentLoaded",n.highlightAll))),_self.Prism}();"undefined"!=typeof module&&module.exports&&(module.exports=Prism),"undefined"!=typeof global&&(global.Prism=Prism); \ No newline at end of file diff --git a/components/prism-css.min.js b/components/prism-css.min.js index c9f7507fac..d761a5c392 100644 --- a/components/prism-css.min.js +++ b/components/prism-css.min.js @@ -1 +1 @@ -Prism.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:/@[\w-]+?.*?(?:;|(?=\s*\{))/i,inside:{rule:/@[\w-]+/}},url:/url\((?:(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1|.*?)\)/i,selector:/[^{}\s][^{};]*?(?=\s*\{)/,string:{pattern:/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},property:/[-_a-z\xA0-\uFFFF][-\w\xA0-\uFFFF]*(?=\s*:)/i,important:/!important\b/i,"function":/[-a-z0-9]+(?=\()/i,punctuation:/[(){};:]/},Prism.languages.css.atrule.inside.rest=Prism.languages.css,Prism.languages.markup&&(Prism.languages.insertBefore("markup","tag",{style:{pattern:/()[\s\S]*?(?=<\/style>)/i,lookbehind:!0,inside:Prism.languages.css,alias:"language-css",greedy:!0}}),Prism.languages.insertBefore("inside","attr-value",{"style-attr":{pattern:/\s*style=("|')(?:\\[\s\S]|(?!\1)[^\\])*\1/i,inside:{"attr-name":{pattern:/^\s*style/i,inside:Prism.languages.markup.tag.inside},punctuation:/^\s*=\s*['"]|['"]\s*$/,"attr-value":{pattern:/.+/i,inside:Prism.languages.css}},alias:"language-css"}},Prism.languages.markup.tag)); +Prism.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:/@[\w-]+?.*?(?:;|(?=\s*\{))/i,inside:{rule:/@[\w-]+/}},url:/url\((?:(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1|.*?)\)/i,selector:/[^{}\s][^{};]*?(?=\s*\{)/,string:{pattern:/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},property:/[-_a-z\xA0-\uFFFF][-\w\xA0-\uFFFF]*(?=\s*:)/i,important:/!important\b/i,"function":/[-a-z0-9]+(?=\()/i,punctuation:/[(){};:]/},Prism.languages.css.atrule.inside.rest=Prism.languages.css,Prism.languages.markup&&(Prism.languages.insertBefore("markup","tag",{style:{pattern:/()[\s\S]*?(?=<\/style>)/i,lookbehind:!0,inside:Prism.languages.css,alias:"language-css",greedy:!0}}),Prism.languages.insertBefore("inside","attr-value",{"style-attr":{pattern:/\s*style=("|')(?:\\[\s\S]|(?!\1)[^\\])*\1/i,inside:{"attr-name":{pattern:/^\s*style/i,inside:Prism.languages.markup.tag.inside},punctuation:/^\s*=\s*['"]|['"]\s*$/,"attr-value":{pattern:/.+/i,inside:Prism.languages.css}},alias:"language-css"}},Prism.languages.markup.tag)); \ No newline at end of file diff --git a/prism.js b/prism.js index 89eaf85172..5116ebda75 100644 --- a/prism.js +++ b/prism.js @@ -254,9 +254,9 @@ var _ = _self.Prism = { env.element.innerHTML = env.highlightedCode; - callback && callback.call(env.element); _.hooks.run('after-highlight', env); _.hooks.run('complete', env); + callback && callback.call(env.element); }; worker.postMessage(JSON.stringify({ @@ -272,10 +272,11 @@ var _ = _self.Prism = { env.element.innerHTML = env.highlightedCode; - callback && callback.call(element); - _.hooks.run('after-highlight', env); + _.hooks.run('complete', env); + + callback && callback.call(element); } }, @@ -684,6 +685,7 @@ if (Prism.languages.markup) { }, Prism.languages.markup.tag); } + /* ********************************************** Begin prism-clike.js ********************************************** */ @@ -889,4 +891,4 @@ Prism.languages.js = Prism.languages.javascript; document.addEventListener('DOMContentLoaded', self.Prism.fileHighlight); -})(); +})(); \ No newline at end of file From 6d1a2c61aa90b00cedb26408dada67f7c741f01e Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Thu, 25 Oct 2018 21:55:21 +0200 Subject: [PATCH 0079/1100] Update README.md (#1553) Make some minor modifications to make contributing clearer. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 30ff9fa5ad..716ab5c818 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ Prism depends on community contributions to expand and cover a wider array of us - Please try to err towards more smaller PRs rather than few huge PRs. If a PR includes changes I want to merge and changes I don't, handling it becomes difficult. - My time is very limited these days, so it might take a long time to review longer PRs (short ones are usually merged very quickly), especially those modifying the Prism Core. This doesn't mean your PR is rejected. - If you contribute a new language definition, you will be responsible for handling bug reports about that language definition. -- If you add a new language definition, theme or plugin, you need to add it to `components.js` as well, so that it becomes available to the download build page. +- If you add a new language definition, theme or plugin, you need to add it to `components.json` as well and rebuild Prism by running `gulp`, so that it becomes available to the download build page. Thank you so much for contributing!! From 8720b3e67681a013232959fd040c82bc35d1267e Mon Sep 17 00:00:00 2001 From: Marius Schulz Date: Thu, 25 Oct 2018 20:56:57 +0100 Subject: [PATCH 0080/1100] Adds support for comments in JSON (#1595) While JSON doesn't explicitly support comments, they're commonly used and there are supersets of JSON that do make comments available. PrismJS is not a linter, and this is a useful feature to include when displaying JSON. --- components/prism-json.js | 6 ++++- components/prism-json.min.js | 2 +- tests/languages/json/comment_feature.test | 27 +++++++++++++++++++++++ 3 files changed, 33 insertions(+), 2 deletions(-) create mode 100644 tests/languages/json/comment_feature.test diff --git a/components/prism-json.js b/components/prism-json.js index 3ac9be1b4f..8b95dcdc7b 100644 --- a/components/prism-json.js +++ b/components/prism-json.js @@ -1,5 +1,9 @@ Prism.languages.json = { - 'property': /"(?:\\.|[^\\"\r\n])*"(?=\s*:)/i, + 'comment': /\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/, + 'property': { + pattern: /"(?:\\.|[^\\"\r\n])*"(?=\s*:)/i, + greedy: true + }, 'string': { pattern: /"(?:\\.|[^\\"\r\n])*"(?!\s*:)/, greedy: true diff --git a/components/prism-json.min.js b/components/prism-json.min.js index e4206fa384..5d73dae749 100644 --- a/components/prism-json.min.js +++ b/components/prism-json.min.js @@ -1 +1 @@ -Prism.languages.json={property:/"(?:\\.|[^\\"\r\n])*"(?=\s*:)/i,string:{pattern:/"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,greedy:!0},number:/-?\d+\.?\d*([Ee][+-]?\d+)?/,punctuation:/[{}[\],]/,operator:/:/g,"boolean":/\b(?:true|false)\b/i,"null":/\bnull\b/i},Prism.languages.jsonp=Prism.languages.json; \ No newline at end of file +Prism.languages.json={comment:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,property:{pattern:/"(?:\\.|[^\\"\r\n])*"(?=\s*:)/i,greedy:!0},string:{pattern:/"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,greedy:!0},number:/-?\d+\.?\d*([Ee][+-]?\d+)?/,punctuation:/[{}[\],]/,operator:/:/g,"boolean":/\b(?:true|false)\b/i,"null":/\bnull\b/i},Prism.languages.jsonp=Prism.languages.json; \ No newline at end of file diff --git a/tests/languages/json/comment_feature.test b/tests/languages/json/comment_feature.test new file mode 100644 index 0000000000..50341d3992 --- /dev/null +++ b/tests/languages/json/comment_feature.test @@ -0,0 +1,27 @@ +{ + // Line comment + "//": "//", + + /* Block comment */ + "/*": "*/" +} + +---------------------------------------------------- + +[ + ["punctuation", "{"], + ["comment", "// Line comment"], + ["property", "\"//\""], + ["operator", ":"], + ["string", "\"//\""], + ["punctuation", ","], + ["comment", "/* Block comment */"], + ["property", "\"/*\""], + ["operator", ":"], + ["string", "\"*/\""], + ["punctuation", "}"] +] + +---------------------------------------------------- + +Checks for single-line and multi-line comments. From da474c77e2da4103192cd29827d3c0c64f9b8801 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Fri, 26 Oct 2018 02:20:21 +0200 Subject: [PATCH 0081/1100] Cleaned up JSON (#1596) This PR removes useless flags (because JS is case sensitive, so is JSON) and adds one to number to make the pattern more compact. --- components/prism-json.js | 10 +++++----- components/prism-json.min.js | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/components/prism-json.js b/components/prism-json.js index 8b95dcdc7b..6ae91b4c13 100644 --- a/components/prism-json.js +++ b/components/prism-json.js @@ -1,18 +1,18 @@ Prism.languages.json = { 'comment': /\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/, 'property': { - pattern: /"(?:\\.|[^\\"\r\n])*"(?=\s*:)/i, + pattern: /"(?:\\.|[^\\"\r\n])*"(?=\s*:)/, greedy: true }, 'string': { pattern: /"(?:\\.|[^\\"\r\n])*"(?!\s*:)/, greedy: true }, - 'number': /-?\d+\.?\d*([Ee][+-]?\d+)?/, + 'number': /-?\d+\.?\d*(e[+-]?\d+)?/i, 'punctuation': /[{}[\],]/, - 'operator': /:/g, - 'boolean': /\b(?:true|false)\b/i, - 'null': /\bnull\b/i + 'operator': /:/, + 'boolean': /\b(?:true|false)\b/, + 'null': /\bnull\b/ }; Prism.languages.jsonp = Prism.languages.json; diff --git a/components/prism-json.min.js b/components/prism-json.min.js index 5d73dae749..4c3c1faab4 100644 --- a/components/prism-json.min.js +++ b/components/prism-json.min.js @@ -1 +1 @@ -Prism.languages.json={comment:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,property:{pattern:/"(?:\\.|[^\\"\r\n])*"(?=\s*:)/i,greedy:!0},string:{pattern:/"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,greedy:!0},number:/-?\d+\.?\d*([Ee][+-]?\d+)?/,punctuation:/[{}[\],]/,operator:/:/g,"boolean":/\b(?:true|false)\b/i,"null":/\bnull\b/i},Prism.languages.jsonp=Prism.languages.json; \ No newline at end of file +Prism.languages.json={comment:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,property:{pattern:/"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,greedy:!0},string:{pattern:/"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,greedy:!0},number:/-?\d+\.?\d*(e[+-]?\d+)?/i,punctuation:/[{}[\],]/,operator:/:/,"boolean":/\b(?:true|false)\b/,"null":/\bnull\b/},Prism.languages.jsonp=Prism.languages.json; \ No newline at end of file From 1c5f28a92bafa7849b067587b809bb30ba3629c4 Mon Sep 17 00:00:00 2001 From: Chris Johnston Date: Mon, 29 Oct 2018 12:00:54 -0700 Subject: [PATCH 0082/1100] Allow YAML strings to have trailing comments (#1602) Updates the string regex to allow for strings that may have a trailing '#'. This uses a different pattern from other regex patterns, because only the string regex pattern is greedy, while the others are not. Fix #1601. --- components/prism-yaml.js | 2 +- components/prism-yaml.min.js | 2 +- tests/languages/yaml/string_feature.test | 8 +++++++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/components/prism-yaml.js b/components/prism-yaml.js index 9a168003a8..4846e41e60 100644 --- a/components/prism-yaml.js +++ b/components/prism-yaml.js @@ -31,7 +31,7 @@ Prism.languages.yaml = { alias: 'important' }, 'string': { - pattern: /([:\-,[{]\s*(?:![^\s]+)?[ \t]*)("|')(?:(?!\2)[^\\\r\n]|\\.)*\2(?=[ \t]*(?:$|,|]|}))/m, + pattern: /([:\-,[{]\s*(?:![^\s]+)?[ \t]*)("|')(?:(?!\2)[^\\\r\n]|\\.)*\2(?=[ \t]*(?:$|,|]|}|\s*#))/m, lookbehind: true, greedy: true }, diff --git a/components/prism-yaml.min.js b/components/prism-yaml.min.js index dde255990a..5cc863451a 100644 --- a/components/prism-yaml.min.js +++ b/components/prism-yaml.min.js @@ -1 +1 @@ -Prism.languages.yaml={scalar:{pattern:/([\-:]\s*(?:![^\s]+)?[ \t]*[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)[^\r\n]+(?:\2[^\r\n]+)*)/,lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:/(\s*(?:^|[:\-,[{\r\n?])[ \t]*(?:![^\s]+)?[ \t]*)[^\r\n{[\]},#\s]+?(?=\s*:\s)/,lookbehind:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:/([:\-,[{]\s*(?:![^\s]+)?[ \t]*)(?:\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?)?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?)(?=[ \t]*(?:$|,|]|}))/m,lookbehind:!0,alias:"number"},"boolean":{pattern:/([:\-,[{]\s*(?:![^\s]+)?[ \t]*)(?:true|false)[ \t]*(?=$|,|]|})/im,lookbehind:!0,alias:"important"},"null":{pattern:/([:\-,[{]\s*(?:![^\s]+)?[ \t]*)(?:null|~)[ \t]*(?=$|,|]|})/im,lookbehind:!0,alias:"important"},string:{pattern:/([:\-,[{]\s*(?:![^\s]+)?[ \t]*)("|')(?:(?!\2)[^\\\r\n]|\\.)*\2(?=[ \t]*(?:$|,|]|}))/m,lookbehind:!0,greedy:!0},number:{pattern:/([:\-,[{]\s*(?:![^\s]+)?[ \t]*)[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+\.?\d*|\.?\d+)(?:e[+-]?\d+)?|\.inf|\.nan)[ \t]*(?=$|,|]|})/im,lookbehind:!0},tag:/![^\s]+/,important:/[&*][\w]+/,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./}; \ No newline at end of file +Prism.languages.yaml={scalar:{pattern:/([\-:]\s*(?:![^\s]+)?[ \t]*[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)[^\r\n]+(?:\2[^\r\n]+)*)/,lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:/(\s*(?:^|[:\-,[{\r\n?])[ \t]*(?:![^\s]+)?[ \t]*)[^\r\n{[\]},#\s]+?(?=\s*:\s)/,lookbehind:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:/([:\-,[{]\s*(?:![^\s]+)?[ \t]*)(?:\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?)?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?)(?=[ \t]*(?:$|,|]|}))/m,lookbehind:!0,alias:"number"},"boolean":{pattern:/([:\-,[{]\s*(?:![^\s]+)?[ \t]*)(?:true|false)[ \t]*(?=$|,|]|})/im,lookbehind:!0,alias:"important"},"null":{pattern:/([:\-,[{]\s*(?:![^\s]+)?[ \t]*)(?:null|~)[ \t]*(?=$|,|]|})/im,lookbehind:!0,alias:"important"},string:{pattern:/([:\-,[{]\s*(?:![^\s]+)?[ \t]*)("|')(?:(?!\2)[^\\\r\n]|\\.)*\2(?=[ \t]*(?:$|,|]|}|\s*#))/m,lookbehind:!0,greedy:!0},number:{pattern:/([:\-,[{]\s*(?:![^\s]+)?[ \t]*)[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+\.?\d*|\.?\d+)(?:e[+-]?\d+)?|\.inf|\.nan)[ \t]*(?=$|,|]|})/im,lookbehind:!0},tag:/![^\s]+/,important:/[&*][\w]+/,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./}; \ No newline at end of file diff --git a/tests/languages/yaml/string_feature.test b/tests/languages/yaml/string_feature.test index 0b9dcadd4b..9ba3ae3161 100644 --- a/tests/languages/yaml/string_feature.test +++ b/tests/languages/yaml/string_feature.test @@ -3,6 +3,8 @@ foo: "" bar: "fo\"obar" foo: '' bar: 'fo\'obar' +foo: "foo" # bar +bar: 'bar' # foo ---------------------------------------------------- @@ -15,7 +17,11 @@ bar: 'fo\'obar' ["key", "foo"], ["punctuation", ":"], ["string", "''"], ["key", "bar"], ["punctuation", ":"], - ["string", "'fo\\'obar'"] + ["string", "'fo\\'obar'"], + ["key", "foo"], ["punctuation", ":"], + ["string", "\"foo\""], ["comment", "# bar"], + ["key", "bar"], ["punctuation", ":"], + ["string", "'bar'"], ["comment", "# foo"] ] ---------------------------------------------------- From 2ba622680074c09f905ba116fe6d30a10cb7162a Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Mon, 12 Nov 2018 13:32:32 +0100 Subject: [PATCH 0083/1100] Updated styles of show invisibles (#1607) Changes the color of the placeholders of invisible characters. They will now use the default text color of the theme as the base and blend in instead of a fixed color for all themes. --- plugins/show-invisibles/prism-show-invisibles.css | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/plugins/show-invisibles/prism-show-invisibles.css b/plugins/show-invisibles/prism-show-invisibles.css index 9af783d502..c57be58812 100644 --- a/plugins/show-invisibles/prism-show-invisibles.css +++ b/plugins/show-invisibles/prism-show-invisibles.css @@ -9,25 +9,26 @@ .token.cr:before, .token.lf:before, .token.space:before { - color: hsl(24, 20%, 85%); + color: inherit; + opacity: 0.4; position: absolute; } .token.tab:not(:empty):before { - content: '\21E5'; + content: '\21E5'; } .token.cr:before { - content: '\240D'; + content: '\240D'; } .token.crlf:before { - content: '\240D\240A'; + content: '\240D\240A'; } .token.lf:before { - content: '\240A'; + content: '\240A'; } .token.space:before { content: '\00B7'; -} \ No newline at end of file +} From 2d622f17e4f6d746e8f4fa211c7f6b7ccb3f27b4 Mon Sep 17 00:00:00 2001 From: RunDevelopment Date: Mon, 12 Nov 2018 20:12:44 +0100 Subject: [PATCH 0084/1100] Show invisibles inside tokens --- .../show-invisibles/prism-show-invisibles.css | 4 +- .../show-invisibles/prism-show-invisibles.js | 99 +++++++++++++++---- .../prism-show-invisibles.min.js | 2 +- 3 files changed, 82 insertions(+), 23 deletions(-) diff --git a/plugins/show-invisibles/prism-show-invisibles.css b/plugins/show-invisibles/prism-show-invisibles.css index c57be58812..16583b31d9 100644 --- a/plugins/show-invisibles/prism-show-invisibles.css +++ b/plugins/show-invisibles/prism-show-invisibles.css @@ -9,8 +9,8 @@ .token.cr:before, .token.lf:before, .token.space:before { - color: inherit; - opacity: 0.4; + color: #888; + opacity: 0.6; position: absolute; } diff --git a/plugins/show-invisibles/prism-show-invisibles.js b/plugins/show-invisibles/prism-show-invisibles.js index f3d120a9e8..3b67c7782b 100644 --- a/plugins/show-invisibles/prism-show-invisibles.js +++ b/plugins/show-invisibles/prism-show-invisibles.js @@ -1,21 +1,80 @@ -(function(){ - -if ( - typeof self !== 'undefined' && !self.Prism || - typeof global !== 'undefined' && !global.Prism -) { - return; -} - -Prism.hooks.add('before-highlight', function(env) { - var tokens = env.grammar; - - if (!tokens) return; - - tokens.tab = /\t/g; - tokens.crlf = /\r\n/g; - tokens.lf = /\n/g; - tokens.cr = /\r/g; - tokens.space = / /g; -}); +(function () { + + if ( + typeof self !== 'undefined' && !self.Prism || + typeof global !== 'undefined' && !global.Prism + ) { + return; + } + + + var invisibles = { + 'tab': /\t/, + 'crlf': /\r\n/, + 'lf': /\n/, + 'cr': /\r/, + 'space': / / + }; + + + /** + * Handles the recursive calling of `addInvisibles` for one token. + * + * @param {Object|Array} tokens The grammar or array which contains the token. + * @param {string|number} name The name or index of the token in `tokens`. + */ + function handleToken(tokens, name) { + var value = tokens[name]; + + var type = Prism.util.type(value); + switch (type) { + case 'RegExp': + var inside = {}; + tokens[name] = { + pattern: value, + inside: inside + }; + addInvisibles(inside); + break; + + case 'Array': + for (var i = 0, l = value.length; i < l; i++) + handleToken(value, i); + break; + + default: // 'Object' + var inside = value.inside || (value.inside = {}); + addInvisibles(inside); + break; + } + } + + /** + * Recursively adds patterns to match invisible characters to the given grammar (if not added already). + * + * @param {Object} grammar + */ + function addInvisibles(grammar) { + if (!grammar || grammar['tab']) + return; + + // assign invisibles here to "mark" the grammar in case of self references + for (var name in invisibles) { + if (invisibles.hasOwnProperty(name)) + grammar[name] = invisibles[name]; + } + + for (var name in grammar) { + if (grammar.hasOwnProperty(name) && !invisibles[name]) { + if (name === 'rest') + addInvisibles(grammar['rest']); + else + handleToken(grammar, name); + } + } + } + + Prism.hooks.add('before-highlight', function (env) { + addInvisibles(env.grammar); + }); })(); diff --git a/plugins/show-invisibles/prism-show-invisibles.min.js b/plugins/show-invisibles/prism-show-invisibles.min.js index 9df7258c89..32de8f2b8f 100644 --- a/plugins/show-invisibles/prism-show-invisibles.min.js +++ b/plugins/show-invisibles/prism-show-invisibles.min.js @@ -1 +1 @@ -!function(){"undefined"!=typeof self&&!self.Prism||"undefined"!=typeof global&&!global.Prism||Prism.hooks.add("before-highlight",function(e){var f=e.grammar;f&&(f.tab=/\t/g,f.crlf=/\r\n/g,f.lf=/\n/g,f.cr=/\r/g,f.space=/ /g)})}(); \ No newline at end of file +!function(){function r(a,i){var n=a[i],t=Prism.util.type(n);switch(t){case"RegExp":var f={};a[i]={pattern:n,inside:f},e(f);break;case"Array":for(var s=0,o=n.length;o>s;s++)r(n,s);break;default:var f=n.inside||(n.inside={});e(f)}}function e(i){if(i&&!i.tab){for(var n in a)a.hasOwnProperty(n)&&(i[n]=a[n]);for(var n in i)i.hasOwnProperty(n)&&!a[n]&&("rest"===n?e(i.rest):r(i,n))}}if(("undefined"==typeof self||self.Prism)&&("undefined"==typeof global||global.Prism)){var a={tab:/\t/,crlf:/\r\n/,lf:/\n/,cr:/\r/,space:/ /};Prism.hooks.add("before-highlight",function(r){e(r.grammar)})}}(); \ No newline at end of file From 7a2d153b9be3edd7b54be37cdf47b06276fa2861 Mon Sep 17 00:00:00 2001 From: RunDevelopment Date: Mon, 12 Nov 2018 20:14:19 +0100 Subject: [PATCH 0085/1100] Revert "Show invisibles inside tokens" This reverts commit 2d622f17e4f6d746e8f4fa211c7f6b7ccb3f27b4. --- .../show-invisibles/prism-show-invisibles.css | 4 +- .../show-invisibles/prism-show-invisibles.js | 99 ++++--------------- .../prism-show-invisibles.min.js | 2 +- 3 files changed, 23 insertions(+), 82 deletions(-) diff --git a/plugins/show-invisibles/prism-show-invisibles.css b/plugins/show-invisibles/prism-show-invisibles.css index 16583b31d9..c57be58812 100644 --- a/plugins/show-invisibles/prism-show-invisibles.css +++ b/plugins/show-invisibles/prism-show-invisibles.css @@ -9,8 +9,8 @@ .token.cr:before, .token.lf:before, .token.space:before { - color: #888; - opacity: 0.6; + color: inherit; + opacity: 0.4; position: absolute; } diff --git a/plugins/show-invisibles/prism-show-invisibles.js b/plugins/show-invisibles/prism-show-invisibles.js index 3b67c7782b..f3d120a9e8 100644 --- a/plugins/show-invisibles/prism-show-invisibles.js +++ b/plugins/show-invisibles/prism-show-invisibles.js @@ -1,80 +1,21 @@ -(function () { - - if ( - typeof self !== 'undefined' && !self.Prism || - typeof global !== 'undefined' && !global.Prism - ) { - return; - } - - - var invisibles = { - 'tab': /\t/, - 'crlf': /\r\n/, - 'lf': /\n/, - 'cr': /\r/, - 'space': / / - }; - - - /** - * Handles the recursive calling of `addInvisibles` for one token. - * - * @param {Object|Array} tokens The grammar or array which contains the token. - * @param {string|number} name The name or index of the token in `tokens`. - */ - function handleToken(tokens, name) { - var value = tokens[name]; - - var type = Prism.util.type(value); - switch (type) { - case 'RegExp': - var inside = {}; - tokens[name] = { - pattern: value, - inside: inside - }; - addInvisibles(inside); - break; - - case 'Array': - for (var i = 0, l = value.length; i < l; i++) - handleToken(value, i); - break; - - default: // 'Object' - var inside = value.inside || (value.inside = {}); - addInvisibles(inside); - break; - } - } - - /** - * Recursively adds patterns to match invisible characters to the given grammar (if not added already). - * - * @param {Object} grammar - */ - function addInvisibles(grammar) { - if (!grammar || grammar['tab']) - return; - - // assign invisibles here to "mark" the grammar in case of self references - for (var name in invisibles) { - if (invisibles.hasOwnProperty(name)) - grammar[name] = invisibles[name]; - } - - for (var name in grammar) { - if (grammar.hasOwnProperty(name) && !invisibles[name]) { - if (name === 'rest') - addInvisibles(grammar['rest']); - else - handleToken(grammar, name); - } - } - } - - Prism.hooks.add('before-highlight', function (env) { - addInvisibles(env.grammar); - }); +(function(){ + +if ( + typeof self !== 'undefined' && !self.Prism || + typeof global !== 'undefined' && !global.Prism +) { + return; +} + +Prism.hooks.add('before-highlight', function(env) { + var tokens = env.grammar; + + if (!tokens) return; + + tokens.tab = /\t/g; + tokens.crlf = /\r\n/g; + tokens.lf = /\n/g; + tokens.cr = /\r/g; + tokens.space = / /g; +}); })(); diff --git a/plugins/show-invisibles/prism-show-invisibles.min.js b/plugins/show-invisibles/prism-show-invisibles.min.js index 32de8f2b8f..9df7258c89 100644 --- a/plugins/show-invisibles/prism-show-invisibles.min.js +++ b/plugins/show-invisibles/prism-show-invisibles.min.js @@ -1 +1 @@ -!function(){function r(a,i){var n=a[i],t=Prism.util.type(n);switch(t){case"RegExp":var f={};a[i]={pattern:n,inside:f},e(f);break;case"Array":for(var s=0,o=n.length;o>s;s++)r(n,s);break;default:var f=n.inside||(n.inside={});e(f)}}function e(i){if(i&&!i.tab){for(var n in a)a.hasOwnProperty(n)&&(i[n]=a[n]);for(var n in i)i.hasOwnProperty(n)&&!a[n]&&("rest"===n?e(i.rest):r(i,n))}}if(("undefined"==typeof self||self.Prism)&&("undefined"==typeof global||global.Prism)){var a={tab:/\t/,crlf:/\r\n/,lf:/\n/,cr:/\r/,space:/ /};Prism.hooks.add("before-highlight",function(r){e(r.grammar)})}}(); \ No newline at end of file +!function(){"undefined"!=typeof self&&!self.Prism||"undefined"!=typeof global&&!global.Prism||Prism.hooks.add("before-highlight",function(e){var f=e.grammar;f&&(f.tab=/\t/g,f.crlf=/\r\n/g,f.lf=/\n/g,f.cr=/\r/g,f.space=/ /g)})}(); \ No newline at end of file From 7ea2ff289649fb50f03ac2121d0b1758ad47eb03 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Sat, 24 Nov 2018 10:54:26 +0100 Subject: [PATCH 0086/1100] Added the comma to the list of CSS punctuation --- components/prism-css.js | 2 +- components/prism-css.min.js | 2 +- components/prism-less.js | 1 - components/prism-less.min.js | 2 +- prism.js | 2 +- tests/languages/css/function_feature.test | 8 +++++++- 6 files changed, 11 insertions(+), 6 deletions(-) diff --git a/components/prism-css.js b/components/prism-css.js index 38c77ca953..284e010682 100644 --- a/components/prism-css.js +++ b/components/prism-css.js @@ -16,7 +16,7 @@ Prism.languages.css = { 'property': /[-_a-z\xA0-\uFFFF][-\w\xA0-\uFFFF]*(?=\s*:)/i, 'important': /!important\b/i, 'function': /[-a-z0-9]+(?=\()/i, - 'punctuation': /[(){};:]/ + 'punctuation': /[(){};:,]/ }; Prism.languages.css['atrule'].inside.rest = Prism.languages.css; diff --git a/components/prism-css.min.js b/components/prism-css.min.js index d761a5c392..a4798c615f 100644 --- a/components/prism-css.min.js +++ b/components/prism-css.min.js @@ -1 +1 @@ -Prism.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:/@[\w-]+?.*?(?:;|(?=\s*\{))/i,inside:{rule:/@[\w-]+/}},url:/url\((?:(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1|.*?)\)/i,selector:/[^{}\s][^{};]*?(?=\s*\{)/,string:{pattern:/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},property:/[-_a-z\xA0-\uFFFF][-\w\xA0-\uFFFF]*(?=\s*:)/i,important:/!important\b/i,"function":/[-a-z0-9]+(?=\()/i,punctuation:/[(){};:]/},Prism.languages.css.atrule.inside.rest=Prism.languages.css,Prism.languages.markup&&(Prism.languages.insertBefore("markup","tag",{style:{pattern:/()[\s\S]*?(?=<\/style>)/i,lookbehind:!0,inside:Prism.languages.css,alias:"language-css",greedy:!0}}),Prism.languages.insertBefore("inside","attr-value",{"style-attr":{pattern:/\s*style=("|')(?:\\[\s\S]|(?!\1)[^\\])*\1/i,inside:{"attr-name":{pattern:/^\s*style/i,inside:Prism.languages.markup.tag.inside},punctuation:/^\s*=\s*['"]|['"]\s*$/,"attr-value":{pattern:/.+/i,inside:Prism.languages.css}},alias:"language-css"}},Prism.languages.markup.tag)); \ No newline at end of file +Prism.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:/@[\w-]+?.*?(?:;|(?=\s*\{))/i,inside:{rule:/@[\w-]+/}},url:/url\((?:(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1|.*?)\)/i,selector:/[^{}\s][^{};]*?(?=\s*\{)/,string:{pattern:/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},property:/[-_a-z\xA0-\uFFFF][-\w\xA0-\uFFFF]*(?=\s*:)/i,important:/!important\b/i,"function":/[-a-z0-9]+(?=\()/i,punctuation:/[(){};:,]/},Prism.languages.css.atrule.inside.rest=Prism.languages.css,Prism.languages.markup&&(Prism.languages.insertBefore("markup","tag",{style:{pattern:/()[\s\S]*?(?=<\/style>)/i,lookbehind:!0,inside:Prism.languages.css,alias:"language-css",greedy:!0}}),Prism.languages.insertBefore("inside","attr-value",{"style-attr":{pattern:/\s*style=("|')(?:\\[\s\S]|(?!\1)[^\\])*\1/i,inside:{"attr-name":{pattern:/^\s*style/i,inside:Prism.languages.markup.tag.inside},punctuation:/^\s*=\s*['"]|['"]\s*$/,"attr-value":{pattern:/.+/i,inside:Prism.languages.css}},alias:"language-css"}},Prism.languages.markup.tag)); \ No newline at end of file diff --git a/components/prism-less.js b/components/prism-less.js index 4f3a3d5d50..bdfce2a51a 100644 --- a/components/prism-less.js +++ b/components/prism-less.js @@ -30,7 +30,6 @@ Prism.languages.less = Prism.languages.extend('css', { }, 'property': /(?:@\{[\w-]+\}|[\w-])+(?:\+_?)?(?=\s*:)/i, - 'punctuation': /[{}();:,]/, 'operator': /[+\-*\/]/ }); diff --git a/components/prism-less.min.js b/components/prism-less.min.js index f8955cb1de..8ca9438a58 100644 --- a/components/prism-less.min.js +++ b/components/prism-less.min.js @@ -1 +1 @@ -Prism.languages.less=Prism.languages.extend("css",{comment:[/\/\*[\s\S]*?\*\//,{pattern:/(^|[^\\])\/\/.*/,lookbehind:!0}],atrule:{pattern:/@[\w-]+?(?:\([^{}]+\)|[^(){};])*?(?=\s*\{)/i,inside:{punctuation:/[:()]/}},selector:{pattern:/(?:@\{[\w-]+\}|[^{};\s@])(?:@\{[\w-]+\}|\([^{}]*\)|[^{};@])*?(?=\s*\{)/,inside:{variable:/@+[\w-]+/}},property:/(?:@\{[\w-]+\}|[\w-])+(?:\+_?)?(?=\s*:)/i,punctuation:/[{}();:,]/,operator:/[+\-*\/]/}),Prism.languages.insertBefore("less","punctuation",{"function":Prism.languages.less.function}),Prism.languages.insertBefore("less","property",{variable:[{pattern:/@[\w-]+\s*:/,inside:{punctuation:/:/}},/@@?[\w-]+/],"mixin-usage":{pattern:/([{;]\s*)[.#](?!\d)[\w-]+.*?(?=[(;])/,lookbehind:!0,alias:"function"}}); \ No newline at end of file +Prism.languages.less=Prism.languages.extend("css",{comment:[/\/\*[\s\S]*?\*\//,{pattern:/(^|[^\\])\/\/.*/,lookbehind:!0}],atrule:{pattern:/@[\w-]+?(?:\([^{}]+\)|[^(){};])*?(?=\s*\{)/i,inside:{punctuation:/[:()]/}},selector:{pattern:/(?:@\{[\w-]+\}|[^{};\s@])(?:@\{[\w-]+\}|\([^{}]*\)|[^{};@])*?(?=\s*\{)/,inside:{variable:/@+[\w-]+/}},property:/(?:@\{[\w-]+\}|[\w-])+(?:\+_?)?(?=\s*:)/i,operator:/[+\-*\/]/}),Prism.languages.insertBefore("less","punctuation",{"function":Prism.languages.less.function}),Prism.languages.insertBefore("less","property",{variable:[{pattern:/@[\w-]+\s*:/,inside:{punctuation:/:/}},/@@?[\w-]+/],"mixin-usage":{pattern:/([{;]\s*)[.#](?!\d)[\w-]+.*?(?=[(;])/,lookbehind:!0,alias:"function"}}); \ No newline at end of file diff --git a/prism.js b/prism.js index 5116ebda75..2871459f1b 100644 --- a/prism.js +++ b/prism.js @@ -650,7 +650,7 @@ Prism.languages.css = { 'property': /[-_a-z\xA0-\uFFFF][-\w\xA0-\uFFFF]*(?=\s*:)/i, 'important': /!important\b/i, 'function': /[-a-z0-9]+(?=\()/i, - 'punctuation': /[(){};:]/ + 'punctuation': /[(){};:,]/ }; Prism.languages.css['atrule'].inside.rest = Prism.languages.css; diff --git a/tests/languages/css/function_feature.test b/tests/languages/css/function_feature.test index 0ed4f12bfc..0af02a0c55 100644 --- a/tests/languages/css/function_feature.test +++ b/tests/languages/css/function_feature.test @@ -17,7 +17,13 @@ filter: opacity(alpha=0); ["punctuation", ":"], ["function", "rgba"], ["punctuation", "("], - "0, 0, 0, 0.2", + "0", + ["punctuation", ","], + " 0", + ["punctuation", ","], + " 0", + ["punctuation", ","], + " 0.2", ["punctuation", ")"], ["punctuation", ";"], From 7155e60f625875e139c800049bb87b64b0dcdfe4 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Wed, 28 Nov 2018 14:04:11 +0100 Subject: [PATCH 0087/1100] Remove batch's shell alias (#1543) Both Batch and Bash have `shell` as their alias but only Bash has an alias title for `shell`. --- components.js | 2 +- components.json | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/components.js b/components.js index fbb5155766..42a7cb62d2 100644 --- a/components.js +++ b/components.js @@ -1,2 +1,2 @@ -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default","peerDependencies":"markup"},"clike":{"title":"C-like","option":"default","overrideExampleHeader":true},"javascript":{"title":"JavaScript","require":"clike","peerDependencies":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"actionscript":{"title":"ActionScript","require":"javascript","peerDependencies":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","alias":"shell","owner":"Golmote"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":"dotnet","owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"coffeescript":{"title":"CoffeeScript","require":"javascript","owner":"R-osey"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup","peerDependencies":["css","javascript"],"alias":"jinja2","owner":"romanvm"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","peerDependencies":["css","coffeescript","erb","javascript","less","markdown","ruby","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"http":{"title":"HTTP","peerDependencies":["javascript","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"json":{"title":"JSON","alias":"jsonp","aliasTitles":{"jsonp":"JSONP"},"owner":"CupOfTea696"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","owner":"japborst"},"less":{"title":"Less","require":"css","owner":"Golmote"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"n4js":{"title":"N4JS","require":"javascript","alias":"n4jsd","owner":"bsmith-n4"},"nasm":{"title":"NASM","owner":"rbmj"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"cpp","peerDependencies":["c","cpp"],"overrideExampleHeader":true,"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"php-extras":{"title":"PHP Extras","require":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":"javascript","peerDependencies":["coffeescript","ejs","handlebars","hogan","less","livescript","markdown","mustache","plates","scss","stylus","swig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","peerDependencies":["c","cpp","fortran","ats","dsp"],"owner":"Golmote"},"python":{"title":"Python","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"ruby":{"title":"Ruby","require":"clike","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sql":{"title":"SQL","owner":"multipetros"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","peerDependencies":"css","owner":"Golmote"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","alias":"ts","owner":"vkbansal"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","owner":"hason"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":"Line Highlight","line-numbers":{"title":"Line Numbers","owner":"kuba-kubula"},"show-invisibles":"Show Invisibles","autolinker":"Autolinker","wpd":"WebPlatform Docs","custom-class":{"title":"Custom Class","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","noCSS":true},"show-language":{"title":"Show Language","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","owner":"Golmote","noCSS":true},"previewers":{"title":"Previewers","owner":"Golmote"},"autoloader":{"title":"Autoloader","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","owner":"Golmote","after":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","owner":"chriswells0"},"unescaped-markup":"Unescaped Markup","normalize-whitespace":{"title":"Normalize Whitespace","owner":"zeitgeist87","after":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","owner":"mAAdhaTTah","require":"toolbar","noCSS":true}}}; +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default","peerDependencies":"markup"},"clike":{"title":"C-like","option":"default","overrideExampleHeader":true},"javascript":{"title":"JavaScript","require":"clike","peerDependencies":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"actionscript":{"title":"ActionScript","require":"javascript","peerDependencies":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":"dotnet","owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"coffeescript":{"title":"CoffeeScript","require":"javascript","owner":"R-osey"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup","peerDependencies":["css","javascript"],"alias":"jinja2","owner":"romanvm"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","peerDependencies":["css","coffeescript","erb","javascript","less","markdown","ruby","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"http":{"title":"HTTP","peerDependencies":["javascript","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"json":{"title":"JSON","alias":"jsonp","aliasTitles":{"jsonp":"JSONP"},"owner":"CupOfTea696"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","owner":"japborst"},"less":{"title":"Less","require":"css","owner":"Golmote"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"n4js":{"title":"N4JS","require":"javascript","alias":"n4jsd","owner":"bsmith-n4"},"nasm":{"title":"NASM","owner":"rbmj"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"cpp","peerDependencies":["c","cpp"],"overrideExampleHeader":true,"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"php-extras":{"title":"PHP Extras","require":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":"javascript","peerDependencies":["coffeescript","ejs","handlebars","hogan","less","livescript","markdown","mustache","plates","scss","stylus","swig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","peerDependencies":["c","cpp","fortran","ats","dsp"],"owner":"Golmote"},"python":{"title":"Python","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"ruby":{"title":"Ruby","require":"clike","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sql":{"title":"SQL","owner":"multipetros"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","peerDependencies":"css","owner":"Golmote"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","alias":"ts","owner":"vkbansal"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","owner":"hason"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":"Line Highlight","line-numbers":{"title":"Line Numbers","owner":"kuba-kubula"},"show-invisibles":"Show Invisibles","autolinker":"Autolinker","wpd":"WebPlatform Docs","custom-class":{"title":"Custom Class","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","noCSS":true},"show-language":{"title":"Show Language","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","owner":"Golmote","noCSS":true},"previewers":{"title":"Previewers","owner":"Golmote"},"autoloader":{"title":"Autoloader","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","owner":"Golmote","after":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","owner":"chriswells0"},"unescaped-markup":"Unescaped Markup","normalize-whitespace":{"title":"Normalize Whitespace","owner":"zeitgeist87","after":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","owner":"mAAdhaTTah","require":"toolbar","noCSS":true}}}; if (typeof module !== 'undefined' && module.exports) { module.exports = components; } \ No newline at end of file diff --git a/components.json b/components.json index bb6d07da1f..fce5add93e 100644 --- a/components.json +++ b/components.json @@ -144,7 +144,6 @@ }, "batch": { "title": "Batch", - "alias": "shell", "owner": "Golmote" }, "bison": { From 9d2fddc26c05a9fd0a8b91ae9cb8769bde5a22b6 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Wed, 28 Nov 2018 14:21:20 +0100 Subject: [PATCH 0088/1100] Added strike support to markdown (#1563) This PR adds support for the strike operator in [both forms][1]. It does not include actual styling for the strike operator as it makes the ~ character really hard to read. [1]: https://webapps.stackexchange.com/questions/14986/strikethrough-with-github-markdown/103691#103691 --- components/prism-markdown.js | 21 +++++- components/prism-markdown.min.js | 2 +- tests/languages/markdown/bold_feature.test | 14 +++- tests/languages/markdown/strike_feature.test | 70 ++++++++++++++++++++ 4 files changed, 104 insertions(+), 3 deletions(-) create mode 100644 tests/languages/markdown/strike_feature.test diff --git a/components/prism-markdown.js b/components/prism-markdown.js index 8b63780406..6ec38a0e91 100644 --- a/components/prism-markdown.js +++ b/components/prism-markdown.js @@ -83,6 +83,7 @@ Prism.languages.insertBefore('markdown', 'prolog', { // Allow only one line break pattern: /(^|[^\\])(\*\*|__)(?:(?:\r?\n|\r)(?!\r?\n|\r)|.)+?\2/, lookbehind: true, + greedy: true, inside: { 'punctuation': /^\*\*|^__|\*\*$|__$/ } @@ -94,10 +95,23 @@ Prism.languages.insertBefore('markdown', 'prolog', { // Allow only one line break pattern: /(^|[^\\])([*_])(?:(?:\r?\n|\r)(?!\r?\n|\r)|.)+?\2/, lookbehind: true, + greedy: true, inside: { 'punctuation': /^[*_]|[*_]$/ } }, + 'strike': { + // ~~strike through~~ + // ~strike~ + + // Allow only one line break + pattern: /(^|[^\\])(~~?)(?:(?:\r?\n|\r)(?!\r?\n|\r)|.)+?\2/, + lookbehind: true, + greedy: true, + inside: { + 'punctuation': /^~~?|~~?$/ + } + }, 'url': { // [example](http://example.com "Optional title") // [example] [id] @@ -116,5 +130,10 @@ Prism.languages.insertBefore('markdown', 'prolog', { Prism.languages.markdown['bold'].inside['url'] = Prism.languages.markdown['url']; Prism.languages.markdown['italic'].inside['url'] = Prism.languages.markdown['url']; +Prism.languages.markdown['strike'].inside['url'] = Prism.languages.markdown['url']; Prism.languages.markdown['bold'].inside['italic'] = Prism.languages.markdown['italic']; -Prism.languages.markdown['italic'].inside['bold'] = Prism.languages.markdown['bold']; \ No newline at end of file +Prism.languages.markdown['bold'].inside['strike'] = Prism.languages.markdown['strike']; +Prism.languages.markdown['italic'].inside['bold'] = Prism.languages.markdown['bold']; +Prism.languages.markdown['italic'].inside['strike'] = Prism.languages.markdown['strike']; +Prism.languages.markdown['strike'].inside['bold'] = Prism.languages.markdown['bold']; +Prism.languages.markdown['strike'].inside['italic'] = Prism.languages.markdown['italic']; diff --git a/components/prism-markdown.min.js b/components/prism-markdown.min.js index 012565b4a6..a13d883ebb 100644 --- a/components/prism-markdown.min.js +++ b/components/prism-markdown.min.js @@ -1 +1 @@ -Prism.languages.markdown=Prism.languages.extend("markup",{}),Prism.languages.insertBefore("markdown","prolog",{blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},code:[{pattern:/^(?: {4}|\t).+/m,alias:"keyword"},{pattern:/``.+?``|`[^`\n]+`/,alias:"keyword"}],title:[{pattern:/\w+.*(?:\r?\n|\r)(?:==+|--+)/,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#+.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:/(^|[^\\])(\*\*|__)(?:(?:\r?\n|\r)(?!\r?\n|\r)|.)+?\2/,lookbehind:!0,inside:{punctuation:/^\*\*|^__|\*\*$|__$/}},italic:{pattern:/(^|[^\\])([*_])(?:(?:\r?\n|\r)(?!\r?\n|\r)|.)+?\2/,lookbehind:!0,inside:{punctuation:/^[*_]|[*_]$/}},url:{pattern:/!?\[[^\]]+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)| ?\[[^\]\n]*\])/,inside:{variable:{pattern:/(!?\[)[^\]]+(?=\]$)/,lookbehind:!0},string:{pattern:/"(?:\\.|[^"\\])*"(?=\)$)/}}}}),Prism.languages.markdown.bold.inside.url=Prism.languages.markdown.url,Prism.languages.markdown.italic.inside.url=Prism.languages.markdown.url,Prism.languages.markdown.bold.inside.italic=Prism.languages.markdown.italic,Prism.languages.markdown.italic.inside.bold=Prism.languages.markdown.bold; \ No newline at end of file +Prism.languages.markdown=Prism.languages.extend("markup",{}),Prism.languages.insertBefore("markdown","prolog",{blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},code:[{pattern:/^(?: {4}|\t).+/m,alias:"keyword"},{pattern:/``.+?``|`[^`\n]+`/,alias:"keyword"}],title:[{pattern:/\w+.*(?:\r?\n|\r)(?:==+|--+)/,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#+.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:/(^|[^\\])(\*\*|__)(?:(?:\r?\n|\r)(?!\r?\n|\r)|.)+?\2/,lookbehind:!0,greedy:!0,inside:{punctuation:/^\*\*|^__|\*\*$|__$/}},italic:{pattern:/(^|[^\\])([*_])(?:(?:\r?\n|\r)(?!\r?\n|\r)|.)+?\2/,lookbehind:!0,greedy:!0,inside:{punctuation:/^[*_]|[*_]$/}},strike:{pattern:/(^|[^\\])(~~?)(?:(?:\r?\n|\r)(?!\r?\n|\r)|.)+?\2/,lookbehind:!0,greedy:!0,inside:{punctuation:/^~~?|~~?$/}},url:{pattern:/!?\[[^\]]+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)| ?\[[^\]\n]*\])/,inside:{variable:{pattern:/(!?\[)[^\]]+(?=\]$)/,lookbehind:!0},string:{pattern:/"(?:\\.|[^"\\])*"(?=\)$)/}}}}),Prism.languages.markdown.bold.inside.url=Prism.languages.markdown.url,Prism.languages.markdown.italic.inside.url=Prism.languages.markdown.url,Prism.languages.markdown.strike.inside.url=Prism.languages.markdown.url,Prism.languages.markdown.bold.inside.italic=Prism.languages.markdown.italic,Prism.languages.markdown.bold.inside.strike=Prism.languages.markdown.strike,Prism.languages.markdown.italic.inside.bold=Prism.languages.markdown.bold,Prism.languages.markdown.italic.inside.strike=Prism.languages.markdown.strike,Prism.languages.markdown.strike.inside.bold=Prism.languages.markdown.bold,Prism.languages.markdown.strike.inside.italic=Prism.languages.markdown.italic; \ No newline at end of file diff --git a/tests/languages/markdown/bold_feature.test b/tests/languages/markdown/bold_feature.test index 7d8e8ba6cd..486e6ab60e 100644 --- a/tests/languages/markdown/bold_feature.test +++ b/tests/languages/markdown/bold_feature.test @@ -7,6 +7,7 @@ bar__ __foo*bar*baz__ __foo_bar_baz__ +__foo~bar~baz__ __foo[bar](baz)__ ---------------------------------------------------- @@ -55,6 +56,17 @@ __foo[bar](baz)__ "baz", ["punctuation", "__"] ]], + ["bold", [ + ["punctuation", "__"], + "foo", + ["strike", [ + ["punctuation", "~"], + "bar", + ["punctuation", "~"] + ]], + "baz", + ["punctuation", "__"] + ]], ["bold", [ ["punctuation", "__"], "foo", @@ -67,4 +79,4 @@ __foo[bar](baz)__ ---------------------------------------------------- -Checks for bold. Also tests for inclusion of italic and url. \ No newline at end of file +Checks for bold. Also tests for inclusion of italic, strike, and url. diff --git a/tests/languages/markdown/strike_feature.test b/tests/languages/markdown/strike_feature.test new file mode 100644 index 0000000000..49a4a139a4 --- /dev/null +++ b/tests/languages/markdown/strike_feature.test @@ -0,0 +1,70 @@ +~~foobar~~ +~~foo +bar~~ +~foobar~ +~foo +bar~ + +~foo*bar*baz~ +~foo__bar__baz~ +~foo[bar](baz)~ + +---------------------------------------------------- + +[ + ["strike", [ + ["punctuation", "~~"], + "foobar", + ["punctuation", "~~"] + ]], + ["strike", [ + ["punctuation", "~~"], + "foo\r\nbar", + ["punctuation", "~~"] + ]], + ["strike", [ + ["punctuation", "~"], + "foobar", + ["punctuation", "~"] + ]], + ["strike", [ + ["punctuation", "~"], + "foo\r\nbar", + ["punctuation", "~"] + ]], + + ["strike", [ + ["punctuation", "~"], + "foo", + ["italic", [ + ["punctuation", "*"], + "bar", + ["punctuation", "*"] + ]], + "baz", + ["punctuation", "~"] + ]], + ["strike", [ + ["punctuation", "~"], + "foo", + ["bold", [ + ["punctuation", "__"], + "bar", + ["punctuation", "__"] + ]], + "baz", + ["punctuation", "~"] + ]], + ["strike", [ + ["punctuation", "~"], + "foo", + ["url", [ + "[bar](baz)" + ]], + ["punctuation", "~"] + ]] +] + +---------------------------------------------------- + +Checks for strike. Also tests for inclusion of bold, italic, and url. From 9f6e50269788eafb7b3ff2b33a2e62cb9999c477 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Wed, 28 Nov 2018 14:23:53 +0100 Subject: [PATCH 0089/1100] Fixed class regex for Command Line plugin (#1566) Fixes #1564 where the plugin would wrongly detect `command-line-prompt` causing the alignment issue. --- plugins/command-line/prism-command-line.js | 48 +++++++++---------- .../command-line/prism-command-line.min.js | 2 +- 2 files changed, 25 insertions(+), 25 deletions(-) diff --git a/plugins/command-line/prism-command-line.js b/plugins/command-line/prism-command-line.js index b8595d72b7..3c77991461 100644 --- a/plugins/command-line/prism-command-line.js +++ b/plugins/command-line/prism-command-line.js @@ -4,14 +4,14 @@ if (typeof self === 'undefined' || !self.Prism || !self.document) { return; } -var clsReg = /\s*\bcommand-line\b\s*/; +var clsReg = /(?:^|\s)command-line(?:\s|$)/; Prism.hooks.add('before-highlight', function (env) { - env.vars = env.vars || {}; - env.vars['command-line'] = env.vars['command-line'] || {}; + var vars = env.vars = env.vars || {}; + var commandLine = vars['command-line'] = vars['command-line'] || {}; - if (env.vars['command-line'].complete || !env.code) { - env.vars['command-line'].complete = true; + if (commandLine.complete || !env.code) { + commandLine.complete = true; return; } @@ -19,18 +19,18 @@ Prism.hooks.add('before-highlight', function (env) { var pre = env.element.parentNode; if (!pre || !/pre/i.test(pre.nodeName) || // Abort only if neither the
     nor the  have the class
     		(!clsReg.test(pre.className) && !clsReg.test(env.element.className))) {
    -		env.vars['command-line'].complete = true;
    +		commandLine.complete = true;
     		return;
     	}
     
     	if (env.element.querySelector('.command-line-prompt')) { // Abort if prompt already exists.
    -		env.vars['command-line'].complete = true;
    +		commandLine.complete = true;
     		return;
     	}
     
     	var codeLines = env.code.split('\n');
    -	env.vars['command-line'].numberOfLines = codeLines.length;
    -	env.vars['command-line'].outputLines = [];
    +	commandLine.numberOfLines = codeLines.length;
    +	var outputLines = commandLine.outputLines = [];
     
     	var outputSections = pre.getAttribute('data-output');
     	var outputFilter = pre.getAttribute('data-filter-output');
    @@ -53,7 +53,7 @@ Prism.hooks.add('before-highlight', function (env) {
     				outputEnd--;
     				// Save the output line in an array and clear it in the code so it's not highlighted. -- cwells
     				for (var j = outputStart; j <= outputEnd; j++) {
    -					env.vars['command-line'].outputLines[j] = codeLines[j];
    +					outputLines[j] = codeLines[j];
     					codeLines[j] = '';
     				}
     			}
    @@ -61,7 +61,7 @@ Prism.hooks.add('before-highlight', function (env) {
     	} else if (outputFilter) { // Treat lines beginning with this string as output. -- cwells
     		for (var i = 0; i < codeLines.length; i++) {
     			if (codeLines[i].indexOf(outputFilter) === 0) { // This line is output. -- cwells
    -				env.vars['command-line'].outputLines[i] = codeLines[i].slice(outputFilter.length);
    +				outputLines[i] = codeLines[i].slice(outputFilter.length);
     				codeLines[i] = '';
     			}
     		}
    @@ -71,26 +71,26 @@ Prism.hooks.add('before-highlight', function (env) {
     });
     
     Prism.hooks.add('before-insert', function (env) {
    -	env.vars = env.vars || {};
    -	env.vars['command-line'] = env.vars['command-line'] || {};
    -	if (env.vars['command-line'].complete) {
    +	var vars = env.vars = env.vars || {};
    +	var commandLine = vars['command-line'] = vars['command-line'] || {};
    +	if (commandLine.complete) {
     		return;
     	}
     
     	// Reinsert the output lines into the highlighted code. -- cwells
     	var codeLines = env.highlightedCode.split('\n');
    -	for (var i = 0; i < env.vars['command-line'].outputLines.length; i++) {
    -		if (env.vars['command-line'].outputLines.hasOwnProperty(i)) {
    -			codeLines[i] = env.vars['command-line'].outputLines[i];
    +	for (var i = 0; i < commandLine.outputLines.length; i++) {
    +		if (commandLine.outputLines.hasOwnProperty(i)) {
    +			codeLines[i] = commandLine.outputLines[i];
     		}
     	}
     	env.highlightedCode = codeLines.join('\n');
     });
     
     Prism.hooks.add('complete', function (env) {
    -	env.vars = env.vars || {};
    -	env.vars['command-line'] = env.vars['command-line'] || {};
    -	if (env.vars['command-line'].complete) {
    +	var vars = env.vars = env.vars || {};
    +	var commandLine = vars['command-line'] = vars['command-line'] || {};
    +	if (commandLine.complete) {
     		return;
     	}
     
    @@ -107,7 +107,7 @@ Prism.hooks.add('complete', function (env) {
     	};
     
     	// Create the "rows" that will become the command-line prompts. -- cwells
    -	var promptLines = new Array(env.vars['command-line'].numberOfLines + 1);
    +	var promptLines = new Array(commandLine.numberOfLines + 1);
     	var promptText = getAttribute('data-prompt', '');
     	if (promptText !== '') {
     		promptLines = promptLines.join('');
    @@ -123,8 +123,8 @@ Prism.hooks.add('complete', function (env) {
     	prompt.innerHTML = promptLines;
     
     	// Remove the prompt from the output lines. -- cwells
    -	for (var i = 0; i < env.vars['command-line'].outputLines.length; i++) {
    -		if (env.vars['command-line'].outputLines.hasOwnProperty(i)) {
    +	for (var i = 0; i < commandLine.outputLines.length; i++) {
    +		if (commandLine.outputLines.hasOwnProperty(i)) {
     			var node = prompt.children[i];
     			node.removeAttribute('data-user');
     			node.removeAttribute('data-host');
    @@ -133,7 +133,7 @@ Prism.hooks.add('complete', function (env) {
     	}
     
     	env.element.insertBefore(prompt, env.element.firstChild);
    -	env.vars['command-line'].complete = true;
    +	commandLine.complete = true;
     });
     
     }());
    diff --git a/plugins/command-line/prism-command-line.min.js b/plugins/command-line/prism-command-line.min.js
    index 159f4094f5..44d011ac44 100644
    --- a/plugins/command-line/prism-command-line.min.js
    +++ b/plugins/command-line/prism-command-line.min.js
    @@ -1 +1 @@
    -!function(){if("undefined"!=typeof self&&self.Prism&&self.document){var e=/\s*\bcommand-line\b\s*/;Prism.hooks.add("before-highlight",function(a){if(a.vars=a.vars||{},a.vars["command-line"]=a.vars["command-line"]||{},a.vars["command-line"].complete||!a.code)return a.vars["command-line"].complete=!0,void 0;var n=a.element.parentNode;if(!n||!/pre/i.test(n.nodeName)||!e.test(n.className)&&!e.test(a.element.className))return a.vars["command-line"].complete=!0,void 0;if(a.element.querySelector(".command-line-prompt"))return a.vars["command-line"].complete=!0,void 0;var t=a.code.split("\n");a.vars["command-line"].numberOfLines=t.length,a.vars["command-line"].outputLines=[];var r=n.getAttribute("data-output"),s=n.getAttribute("data-filter-output");if(r||""===r){r=r.split(",");for(var o=0;oi&&(i=1),l>t.length&&(l=t.length),i--,l--;for(var d=i;l>=d;d++)a.vars["command-line"].outputLines[d]=t[d],t[d]=""}}}else if(s)for(var o=0;o');else{var o=t("data-user","user"),m=t("data-host","localhost");r=r.join('')}var i=document.createElement("span");i.className="command-line-prompt",i.innerHTML=r;for(var l=0;lp&&(p=1),c>o.length&&(c=o.length),p--,c--;for(var u=p;c>=u;u++)s[u]=o[u],o[u]=""}}}else if(l)for(var m=0;m');else{var l=o("data-user","user"),m=o("data-host","localhost");s=s.join('')}var d=document.createElement("span");d.className="command-line-prompt",d.innerHTML=s;for(var p=0;p
    Date: Wed, 28 Nov 2018 14:26:31 +0100
    Subject: [PATCH 0090/1100] Add additional commands to bash (#1577)
    
    Includes "apt", "apt-cache" or "parted" and others.
    ---
     components/prism-bash.js                   |  2 +-
     components/prism-bash.min.js               |  2 +-
     tests/languages/bash/function_feature.test | 68 +++++++++++-----------
     3 files changed, 36 insertions(+), 36 deletions(-)
    
    diff --git a/components/prism-bash.js b/components/prism-bash.js
    index 5093ffd9db..721c4bee1b 100644
    --- a/components/prism-bash.js
    +++ b/components/prism-bash.js
    @@ -57,7 +57,7 @@
     		'variable': insideString.variable,
     		// Originally based on http://ss64.com/bash/
     		'function': {
    -			pattern: /(^|[\s;|&])(?:alias|apropos|apt-get|aptitude|aspell|awk|basename|bash|bc|bg|builtin|bzip2|cal|cat|cd|cfdisk|chgrp|chmod|chown|chroot|chkconfig|cksum|clear|cmp|comm|command|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|du|egrep|eject|enable|env|ethtool|eval|exec|expand|expect|export|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|getopts|git|grep|groupadd|groupdel|groupmod|groups|gzip|hash|head|help|hg|history|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|jobs|join|kill|killall|less|link|ln|locate|logname|logout|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|make|man|mkdir|mkfifo|mkisofs|mknod|more|most|mount|mtools|mtr|mv|mmv|nano|netstat|nice|nl|nohup|notify-send|npm|nslookup|open|op|passwd|paste|pathchk|ping|pkill|popd|pr|printcap|printenv|printf|ps|pushd|pv|pwd|quota|quotacheck|quotactl|ram|rar|rcp|read|readarray|readonly|reboot|rename|renice|remsync|rev|rm|rmdir|rsync|screen|scp|sdiff|sed|seq|service|sftp|shift|shopt|shutdown|sleep|slocate|sort|source|split|ssh|stat|strace|su|sudo|sum|suspend|sync|tail|tar|tee|test|time|timeout|times|touch|top|traceroute|trap|tr|tsort|tty|type|ulimit|umask|umount|unalias|uname|unexpand|uniq|units|unrar|unshar|uptime|useradd|userdel|usermod|users|uuencode|uudecode|v|vdir|vi|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yes|zip)(?=$|[\s;|&])/,
    +			pattern: /(^|[\s;|&])(?:alias|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|builtin|bzip2|cal|cat|cd|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|comm|command|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|du|egrep|eject|enable|env|ethtool|eval|exec|expand|expect|export|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|getopts|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|hash|head|help|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|jobs|join|kill|killall|less|link|ln|locate|logname|logout|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|popd|pr|printcap|printenv|printf|ps|pushd|pv|pwd|quota|quotacheck|quotactl|ram|rar|rcp|read|readarray|readonly|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|shift|shopt|shutdown|sleep|slocate|sort|source|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|tail|tar|tee|test|time|timeout|times|top|touch|tr|traceroute|trap|tsort|tty|type|ulimit|umask|umount|unalias|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yes|zip|zypper)(?=$|[\s;|&])/,
     			lookbehind: true
     		},
     		'keyword': {
    diff --git a/components/prism-bash.min.js b/components/prism-bash.min.js
    index c468fafaa8..b2550482b7 100644
    --- a/components/prism-bash.min.js
    +++ b/components/prism-bash.min.js
    @@ -1 +1 @@
    -!function(e){var t={variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--?|-=|\+\+?|\+=|!=?|~|\*\*?|\*=|\/=?|%=?|<<=?|>>=?|<=?|>=?|==?|&&?|&=|\^=?|\|\|?|\|=|\?|:/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\([^)]+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},/\$(?:[\w#?*!@]+|\{[^}]+\})/i]};e.languages.bash={shebang:{pattern:/^#!\s*\/bin\/bash|^#!\s*\/bin\/sh/,alias:"important"},comment:{pattern:/(^|[^"{\\])#.*/,lookbehind:!0},string:[{pattern:/((?:^|[^<])<<\s*)["']?(\w+?)["']?\s*\r?\n(?:[\s\S])*?\r?\n\2/,lookbehind:!0,greedy:!0,inside:t},{pattern:/(["'])(?:\\[\s\S]|\$\([^)]+\)|`[^`]+`|(?!\1)[^\\])*\1/,greedy:!0,inside:t}],variable:t.variable,"function":{pattern:/(^|[\s;|&])(?:alias|apropos|apt-get|aptitude|aspell|awk|basename|bash|bc|bg|builtin|bzip2|cal|cat|cd|cfdisk|chgrp|chmod|chown|chroot|chkconfig|cksum|clear|cmp|comm|command|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|du|egrep|eject|enable|env|ethtool|eval|exec|expand|expect|export|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|getopts|git|grep|groupadd|groupdel|groupmod|groups|gzip|hash|head|help|hg|history|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|jobs|join|kill|killall|less|link|ln|locate|logname|logout|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|make|man|mkdir|mkfifo|mkisofs|mknod|more|most|mount|mtools|mtr|mv|mmv|nano|netstat|nice|nl|nohup|notify-send|npm|nslookup|open|op|passwd|paste|pathchk|ping|pkill|popd|pr|printcap|printenv|printf|ps|pushd|pv|pwd|quota|quotacheck|quotactl|ram|rar|rcp|read|readarray|readonly|reboot|rename|renice|remsync|rev|rm|rmdir|rsync|screen|scp|sdiff|sed|seq|service|sftp|shift|shopt|shutdown|sleep|slocate|sort|source|split|ssh|stat|strace|su|sudo|sum|suspend|sync|tail|tar|tee|test|time|timeout|times|touch|top|traceroute|trap|tr|tsort|tty|type|ulimit|umask|umount|unalias|uname|unexpand|uniq|units|unrar|unshar|uptime|useradd|userdel|usermod|users|uuencode|uudecode|v|vdir|vi|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yes|zip)(?=$|[\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&])(?:let|:|\.|if|then|else|elif|fi|for|break|continue|while|in|case|function|select|do|done|until|echo|exit|return|set|declare)(?=$|[\s;|&])/,lookbehind:!0},"boolean":{pattern:/(^|[\s;|&])(?:true|false)(?=$|[\s;|&])/,lookbehind:!0},operator:/&&?|\|\|?|==?|!=?|<<>|<=?|>=?|=~/,punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];]/};var a=t.variable[1].inside;a.string=e.languages.bash.string,a["function"]=e.languages.bash["function"],a.keyword=e.languages.bash.keyword,a["boolean"]=e.languages.bash["boolean"],a.operator=e.languages.bash.operator,a.punctuation=e.languages.bash.punctuation,e.languages.shell=e.languages.bash}(Prism);
    \ No newline at end of file
    +!function(e){var t={variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--?|-=|\+\+?|\+=|!=?|~|\*\*?|\*=|\/=?|%=?|<<=?|>>=?|<=?|>=?|==?|&&?|&=|\^=?|\|\|?|\|=|\?|:/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\([^)]+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},/\$(?:[\w#?*!@]+|\{[^}]+\})/i]};e.languages.bash={shebang:{pattern:/^#!\s*\/bin\/bash|^#!\s*\/bin\/sh/,alias:"important"},comment:{pattern:/(^|[^"{\\])#.*/,lookbehind:!0},string:[{pattern:/((?:^|[^<])<<\s*)["']?(\w+?)["']?\s*\r?\n(?:[\s\S])*?\r?\n\2/,lookbehind:!0,greedy:!0,inside:t},{pattern:/(["'])(?:\\[\s\S]|\$\([^)]+\)|`[^`]+`|(?!\1)[^\\])*\1/,greedy:!0,inside:t}],variable:t.variable,function:{pattern:/(^|[\s;|&])(?:alias|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|builtin|bzip2|cal|cat|cd|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|comm|command|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|du|egrep|eject|enable|env|ethtool|eval|exec|expand|expect|export|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|getopts|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|hash|head|help|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|jobs|join|kill|killall|less|link|ln|locate|logname|logout|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|popd|pr|printcap|printenv|printf|ps|pushd|pv|pwd|quota|quotacheck|quotactl|ram|rar|rcp|read|readarray|readonly|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|shift|shopt|shutdown|sleep|slocate|sort|source|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|tail|tar|tee|test|time|timeout|times|top|touch|tr|traceroute|trap|tsort|tty|type|ulimit|umask|umount|unalias|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yes|zip|zypper)(?=$|[\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&])(?:let|:|\.|if|then|else|elif|fi|for|break|continue|while|in|case|function|select|do|done|until|echo|exit|return|set|declare)(?=$|[\s;|&])/,lookbehind:!0},boolean:{pattern:/(^|[\s;|&])(?:true|false)(?=$|[\s;|&])/,lookbehind:!0},operator:/&&?|\|\|?|==?|!=?|<<>|<=?|>=?|=~/,punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];]/};var a=t.variable[1].inside;a.string=e.languages.bash.string,a.function=e.languages.bash.function,a.keyword=e.languages.bash.keyword,a.boolean=e.languages.bash.boolean,a.operator=e.languages.bash.operator,a.punctuation=e.languages.bash.punctuation,e.languages.shell=e.languages.bash}(Prism);
    \ No newline at end of file
    diff --git a/tests/languages/bash/function_feature.test b/tests/languages/bash/function_feature.test
    index 7ebc374b3d..f3fb71232b 100644
    --- a/tests/languages/bash/function_feature.test
    +++ b/tests/languages/bash/function_feature.test
    @@ -1,10 +1,10 @@
    -alias apropos apt-get aptitude aspell
    -awk basename bash bc bg
    +alias apropos apt apt-cache apt-get aptitude aspell
    +automysqlbackup awk basename bash bc bconsole bg
     builtin bzip2 cal cat cd
     cfdisk chgrp chmod chown chroot
     chkconfig cksum clear cmp comm
     command cp cron crontab csplit
    -curl cut date dc dd ddrescue
    +curl cut date dc dd ddrescue debootstrap
     df diff diff3 dig dir dircolors
     dirname dirs dmesg du
     egrep eject enable env ethtool
    @@ -12,49 +12,49 @@ eval exec expand expect
     export expr fdformat fdisk
     fg fgrep file find fmt
     fold format free fsck ftp
    -fuser gawk getopts git grep
    -groupadd groupdel groupmod groups
    -gzip hash head help hg history
    +fuser gawk getopts git gparted grep
    +groupadd groupdel groupmod groups grub-mkconfig
    +gzip halt hash head help hg history host
     hostname htop iconv id ifconfig
    -ifdown ifup import install jobs
    +ifdown ifup import install ip jobs
     join kill killall less link ln
    -locate logname logout look lpc lpr
    +locate logname logout logrotate look lpc lpr
     lprint lprintd lprintq lprm ls
    -lsof make man mkdir mkfifo
    -mkisofs mknod more most mount
    -mtools mtr mv mmv nano netstat
    +lsof lynx make man mc mdadm mkconfig mkdir mke2fs mkfifo
    +mkfs mkisofs mknod mkswap more most mount
    +mtools mtr mutt mv mmv nano nc netstat
     nice nl nohup notify-send nslookup
    -open op passwd paste pathchk ping
    +open parted op passwd paste pathchk ping
     pkill popd pr printcap printenv
     printf ps pushd pv pwd quota
     quotacheck quotactl ram rar rcp
     read readarray readonly reboot
     rename renice remsync rev rm
    -rmdir rsync screen scp sdiff sed
    +rmdir rpm rsync screen scp sdiff sed sendmail
     seq service sftp shift
     shopt shutdown sleep slocate
     sort source split ssh stat strace
    -su sudo sum suspend sync tail tar
    +su sudo sum suspend swapon sync tail tar
     tee test time timeout times
     touch top traceroute trap tr
     tsort tty type ulimit umask
     umount unalias uname unexpand uniq
    -units unrar unshar uptime
    +units unrar unshar unzip update-grub uptime
     useradd userdel usermod users uuencode
    -uudecode v vdir vi vmstat wait watch
    +uudecode vdir vi vim virsh vmstat wait watch
     wc wget whereis which who whoami write
    -xargs xdg-open yes zip
    +xargs xdg-open yes zip zypper
     
     ----------------------------------------------------
     
     [
    -	["function", "alias"], ["function", "apropos"], ["function", "apt-get"], ["function", "aptitude"], ["function", "aspell"],
    -	["function", "awk"], ["function", "basename"], ["function", "bash"], ["function", "bc"], ["function", "bg"],
    +	["function", "alias"], ["function", "apropos"], ["function", "apt"], ["function", "apt-cache"], ["function", "apt-get"], ["function", "aptitude"], ["function", "aspell"],
    +	["function", "automysqlbackup"], ["function", "awk"], ["function", "basename"], ["function", "bash"], ["function", "bc"], ["function", "bconsole"], ["function", "bg"],
     	["function", "builtin"], ["function", "bzip2"], ["function", "cal"], ["function", "cat"], ["function", "cd"],
     	["function", "cfdisk"], ["function", "chgrp"], ["function", "chmod"], ["function", "chown"], ["function", "chroot"],
     	["function", "chkconfig"], ["function", "cksum"], ["function", "clear"], ["function", "cmp"], ["function", "comm"],
     	["function", "command"], ["function", "cp"], ["function", "cron"], ["function", "crontab"], ["function", "csplit"],
    -	["function", "curl"], ["function", "cut"], ["function", "date"], ["function", "dc"], ["function", "dd"], ["function", "ddrescue"],
    +	["function", "curl"], ["function", "cut"], ["function", "date"], ["function", "dc"], ["function", "dd"], ["function", "ddrescue"], ["function", "debootstrap"],
     	["function", "df"], ["function", "diff"], ["function", "diff3"], ["function", "dig"], ["function", "dir"], ["function", "dircolors"],
     	["function", "dirname"], ["function", "dirs"], ["function", "dmesg"], ["function", "du"],
     	["function", "egrep"], ["function", "eject"], ["function", "enable"], ["function", "env"], ["function", "ethtool"],
    @@ -62,38 +62,38 @@ xargs xdg-open yes zip
     	["function", "export"], ["function", "expr"], ["function", "fdformat"], ["function", "fdisk"],
     	["function", "fg"], ["function", "fgrep"], ["function", "file"], ["function", "find"], ["function", "fmt"],
     	["function", "fold"], ["function", "format"], ["function", "free"], ["function", "fsck"], ["function", "ftp"],
    -	["function", "fuser"], ["function", "gawk"], ["function", "getopts"], ["function", "git"], ["function", "grep"],
    -	["function", "groupadd"], ["function", "groupdel"], ["function", "groupmod"], ["function", "groups"],
    -	["function", "gzip"], ["function", "hash"], ["function", "head"], ["function", "help"], ["function", "hg"], ["function", "history"],
    +	["function", "fuser"], ["function", "gawk"], ["function", "getopts"], ["function", "git"], ["function", "gparted"], ["function", "grep"],
    +	["function", "groupadd"], ["function", "groupdel"], ["function", "groupmod"], ["function", "groups"], ["function", "grub-mkconfig"],
    +	["function", "gzip"], ["function", "halt"], ["function", "hash"], ["function", "head"], ["function", "help"], ["function", "hg"], ["function", "history"], ["function", "host"],
     	["function", "hostname"], ["function", "htop"], ["function", "iconv"], ["function", "id"], ["function", "ifconfig"],
    -	["function", "ifdown"], ["function", "ifup"], ["function", "import"], ["function", "install"], ["function", "jobs"],
    +	["function", "ifdown"], ["function", "ifup"], ["function", "import"], ["function", "install"], ["function", "ip"], ["function", "jobs"],
     	["function", "join"], ["function", "kill"], ["function", "killall"], ["function", "less"], ["function", "link"], ["function", "ln"],
    -	["function", "locate"], ["function", "logname"], ["function", "logout"], ["function", "look"], ["function", "lpc"], ["function", "lpr"],
    +	["function", "locate"], ["function", "logname"], ["function", "logout"], ["function", "logrotate"], ["function", "look"], ["function", "lpc"], ["function", "lpr"],
     	["function", "lprint"], ["function", "lprintd"], ["function", "lprintq"], ["function", "lprm"], ["function", "ls"],
    -	["function", "lsof"], ["function", "make"], ["function", "man"], ["function", "mkdir"], ["function", "mkfifo"],
    -	["function", "mkisofs"], ["function", "mknod"], ["function", "more"], ["function", "most"], ["function", "mount"],
    -	["function", "mtools"], ["function", "mtr"], ["function", "mv"], ["function", "mmv"], ["function", "nano"], ["function", "netstat"],
    +	["function", "lsof"], ["function", "lynx"], ["function", "make"], ["function", "man"], ["function", "mc"], ["function", "mdadm"], ["function", "mkconfig"], ["function", "mkdir"], ["function", "mke2fs"], ["function", "mkfifo"],
    +	["function", "mkfs"], ["function", "mkisofs"], ["function", "mknod"], ["function", "mkswap"], ["function", "more"], ["function", "most"], ["function", "mount"],
    +	["function", "mtools"], ["function", "mtr"], ["function", "mutt"], ["function", "mv"], ["function", "mmv"], ["function", "nano"], ["function", "nc"], ["function", "netstat"],
     	["function", "nice"], ["function", "nl"], ["function", "nohup"], ["function", "notify-send"], ["function", "nslookup"],
    -	["function", "open"], ["function", "op"], ["function", "passwd"], ["function", "paste"], ["function", "pathchk"], ["function", "ping"],
    +	["function", "open"], ["function", "parted"], ["function", "op"], ["function", "passwd"], ["function", "paste"], ["function", "pathchk"], ["function", "ping"],
     	["function", "pkill"], ["function", "popd"], ["function", "pr"], ["function", "printcap"], ["function", "printenv"],
     	["function", "printf"], ["function", "ps"], ["function", "pushd"], ["function", "pv"], ["function", "pwd"], ["function", "quota"],
     	["function", "quotacheck"], ["function", "quotactl"], ["function", "ram"], ["function", "rar"], ["function", "rcp"],
     	["function", "read"], ["function", "readarray"], ["function", "readonly"], ["function", "reboot"],
     	["function", "rename"], ["function", "renice"], ["function", "remsync"], ["function", "rev"], ["function", "rm"],
    -	["function", "rmdir"], ["function", "rsync"], ["function", "screen"], ["function", "scp"], ["function", "sdiff"], ["function", "sed"],
    +	["function", "rmdir"], ["function", "rpm"], ["function", "rsync"], ["function", "screen"], ["function", "scp"], ["function", "sdiff"], ["function", "sed"], ["function", "sendmail"],
     	["function", "seq"], ["function", "service"], ["function", "sftp"], ["function", "shift"],
     	["function", "shopt"], ["function", "shutdown"], ["function", "sleep"], ["function", "slocate"],
     	["function", "sort"], ["function", "source"], ["function", "split"], ["function", "ssh"], ["function", "stat"], ["function", "strace"],
    -	["function", "su"], ["function", "sudo"], ["function", "sum"], ["function", "suspend"], ["function", "sync"], ["function", "tail"], ["function", "tar"],
    +	["function", "su"], ["function", "sudo"], ["function", "sum"], ["function", "suspend"], ["function", "swapon"], ["function", "sync"], ["function", "tail"], ["function", "tar"],
     	["function", "tee"], ["function", "test"], ["function", "time"], ["function", "timeout"], ["function", "times"],
     	["function", "touch"], ["function", "top"], ["function", "traceroute"], ["function", "trap"], ["function", "tr"],
     	["function", "tsort"], ["function", "tty"], ["function", "type"], ["function", "ulimit"], ["function", "umask"],
     	["function", "umount"], ["function", "unalias"], ["function", "uname"], ["function", "unexpand"], ["function", "uniq"],
    -	["function", "units"], ["function", "unrar"], ["function", "unshar"], ["function", "uptime"],
    +	["function", "units"], ["function", "unrar"], ["function", "unshar"], ["function", "unzip"], ["function", "update-grub"], ["function", "uptime"],
     	["function", "useradd"], ["function", "userdel"], ["function", "usermod"], ["function", "users"], ["function", "uuencode"],
    -	["function", "uudecode"], ["function", "v"], ["function", "vdir"], ["function", "vi"], ["function", "vmstat"], ["function", "wait"], ["function", "watch"],
    +	["function", "uudecode"], ["function", "vdir"], ["function", "vi"], ["function", "vim"], ["function", "virsh"],  ["function", "vmstat"], ["function", "wait"], ["function", "watch"],
     	["function", "wc"], ["function", "wget"], ["function", "whereis"], ["function", "which"], ["function", "who"], ["function", "whoami"], ["function", "write"],
    -	["function", "xargs"], ["function", "xdg-open"], ["function", "yes"], ["function", "zip"]
    +	["function", "xargs"], ["function", "xdg-open"], ["function", "yes"], ["function", "zip"], ["function", "zypper"]
     ]
     
     ----------------------------------------------------
    
    From 10239c1456030192e9e8390fdbdd5574b2f5a614 Mon Sep 17 00:00:00 2001
    From: =?UTF-8?q?=D0=9E=D0=BB=D0=B5=D0=B3=20=D0=94=D1=83=D1=82=D1=87=D0=B5?=
     =?UTF-8?q?=D0=BD=D0=BA=D0=BE?= 
    Date: Wed, 28 Nov 2018 15:29:22 +0200
    Subject: [PATCH 0091/1100] Prevent double-loading & add scope to File
     Highlight (#1586)
    
    Checks if a file has been loaded already and bails if it is and adds the ability to
    limit the scope of the file highlight plugin.
    ---
     .../file-highlight/prism-file-highlight.js    | 23 +++++++++++++++----
     .../prism-file-highlight.min.js               |  2 +-
     prism.js                                      | 21 ++++++++++++++---
     3 files changed, 38 insertions(+), 8 deletions(-)
    
    diff --git a/plugins/file-highlight/prism-file-highlight.js b/plugins/file-highlight/prism-file-highlight.js
    index 6dee6c4c3f..65efaf9f07 100644
    --- a/plugins/file-highlight/prism-file-highlight.js
    +++ b/plugins/file-highlight/prism-file-highlight.js
    @@ -3,7 +3,11 @@
     		return;
     	}
     
    -	self.Prism.fileHighlight = function() {
    +	/**
    +	 * @param {Element} [container=document]
    +	 */
    +	self.Prism.fileHighlight = function(container) {
    +		container = container || document;
     
     		var Extensions = {
     			'js': 'javascript',
    @@ -17,7 +21,13 @@
     			'tex': 'latex'
     		};
     
    -		Array.prototype.slice.call(document.querySelectorAll('pre[data-src]')).forEach(function (pre) {
    +		Array.prototype.slice.call(container.querySelectorAll('pre[data-src]')).forEach(function (pre) {
    +			// ignore if already loaded
    +			if (pre.hasAttribute('data-src-loaded')) {
    +				return;
    +			}
    +
    +			// load current
     			var src = pre.getAttribute('data-src');
     
     			var language, parent = pre;
    @@ -55,6 +65,8 @@
     						code.textContent = xhr.responseText;
     
     						Prism.highlightElement(code);
    +						// mark as loaded
    +						pre.setAttribute('data-src-loaded', '');
     					}
     					else if (xhr.status >= 400) {
     						code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
    @@ -85,6 +97,9 @@
     
     	};
     
    -	document.addEventListener('DOMContentLoaded', self.Prism.fileHighlight);
    +	document.addEventListener('DOMContentLoaded', function () {
    +		// execute inside handler, for dropping Event as argumnet
    +		self.Prism.fileHighlight();
    +	});
     
    -})();
    \ No newline at end of file
    +})();
    diff --git a/plugins/file-highlight/prism-file-highlight.min.js b/plugins/file-highlight/prism-file-highlight.min.js
    index 301fa878d7..31869b3c84 100644
    --- a/plugins/file-highlight/prism-file-highlight.min.js
    +++ b/plugins/file-highlight/prism-file-highlight.min.js
    @@ -1 +1 @@
    -!function(){"undefined"!=typeof self&&self.Prism&&self.document&&document.querySelector&&(self.Prism.fileHighlight=function(){var t={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"};Array.prototype.slice.call(document.querySelectorAll("pre[data-src]")).forEach(function(e){for(var a,n=e.getAttribute("data-src"),r=e,o=/\blang(?:uage)?-([\w-]+)\b/i;r&&!o.test(r.className);)r=r.parentNode;if(r&&(a=(e.className.match(o)||[,""])[1]),!a){var s=(n.match(/\.(\w+)$/)||[,""])[1];a=t[s]||s}var l=document.createElement("code");l.className="language-"+a,e.textContent="",l.textContent="Loading…",e.appendChild(l);var i=new XMLHttpRequest;i.open("GET",n,!0),i.onreadystatechange=function(){4==i.readyState&&(i.status<400&&i.responseText?(l.textContent=i.responseText,Prism.highlightElement(l)):l.textContent=i.status>=400?"✖ Error "+i.status+" while fetching file: "+i.statusText:"✖ Error: File does not exist or is empty")},i.send(null)}),Prism.plugins.toolbar&&Prism.plugins.toolbar.registerButton("download-file",function(t){var e=t.element.parentNode;if(e&&/pre/i.test(e.nodeName)&&e.hasAttribute("data-src")&&e.hasAttribute("data-download-link")){var a=e.getAttribute("data-src"),n=document.createElement("a");return n.textContent=e.getAttribute("data-download-link-label")||"Download",n.setAttribute("download",""),n.href=a,n}})},document.addEventListener("DOMContentLoaded",self.Prism.fileHighlight))}();
    \ No newline at end of file
    +!function(){"undefined"!=typeof self&&self.Prism&&self.document&&document.querySelector&&(self.Prism.fileHighlight=function(t){t=t||document;var e={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"};Array.prototype.slice.call(t.querySelectorAll("pre[data-src]")).forEach(function(t){if(!t.hasAttribute("data-src-loaded")){for(var a,n=t.getAttribute("data-src"),r=t,s=/\blang(?:uage)?-([\w-]+)\b/i;r&&!s.test(r.className);)r=r.parentNode;if(r&&(a=(t.className.match(s)||[,""])[1]),!a){var o=(n.match(/\.(\w+)$/)||[,""])[1];a=e[o]||o}var l=document.createElement("code");l.className="language-"+a,t.textContent="",l.textContent="Loading…",t.appendChild(l);var i=new XMLHttpRequest;i.open("GET",n,!0),i.onreadystatechange=function(){4==i.readyState&&(i.status<400&&i.responseText?(l.textContent=i.responseText,Prism.highlightElement(l),t.setAttribute("data-src-loaded","")):l.textContent=i.status>=400?"✖ Error "+i.status+" while fetching file: "+i.statusText:"✖ Error: File does not exist or is empty")},i.send(null)}}),Prism.plugins.toolbar&&Prism.plugins.toolbar.registerButton("download-file",function(t){var e=t.element.parentNode;if(e&&/pre/i.test(e.nodeName)&&e.hasAttribute("data-src")&&e.hasAttribute("data-download-link")){var a=e.getAttribute("data-src"),n=document.createElement("a");return n.textContent=e.getAttribute("data-download-link-label")||"Download",n.setAttribute("download",""),n.href=a,n}})},document.addEventListener("DOMContentLoaded",function(){self.Prism.fileHighlight()}))}();
    \ No newline at end of file
    diff --git a/prism.js b/prism.js
    index 5116ebda75..7f6dff2ac2 100644
    --- a/prism.js
    +++ b/prism.js
    @@ -807,7 +807,11 @@ Prism.languages.js = Prism.languages.javascript;
     		return;
     	}
     
    -	self.Prism.fileHighlight = function() {
    +	/**
    +	 * @param {Element} [container=document]
    +	 */
    +	self.Prism.fileHighlight = function(container) {
    +		container = container || document;
     
     		var Extensions = {
     			'js': 'javascript',
    @@ -821,7 +825,13 @@ Prism.languages.js = Prism.languages.javascript;
     			'tex': 'latex'
     		};
     
    -		Array.prototype.slice.call(document.querySelectorAll('pre[data-src]')).forEach(function (pre) {
    +		Array.prototype.slice.call(container.querySelectorAll('pre[data-src]')).forEach(function (pre) {
    +			// ignore if already loaded
    +			if (pre.hasAttribute('data-src-loaded')) {
    +				return;
    +			}
    +
    +			// load current
     			var src = pre.getAttribute('data-src');
     
     			var language, parent = pre;
    @@ -859,6 +869,8 @@ Prism.languages.js = Prism.languages.javascript;
     						code.textContent = xhr.responseText;
     
     						Prism.highlightElement(code);
    +						// mark as loaded
    +						pre.setAttribute('data-src-loaded', '');
     					}
     					else if (xhr.status >= 400) {
     						code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
    @@ -889,6 +901,9 @@ Prism.languages.js = Prism.languages.javascript;
     
     	};
     
    -	document.addEventListener('DOMContentLoaded', self.Prism.fileHighlight);
    +	document.addEventListener('DOMContentLoaded', function () {
    +		// execute inside handler, for dropping Event as argumnet
    +		self.Prism.fileHighlight();
    +	});
     
     })();
    \ No newline at end of file
    
    From 2864fe24a55b0b642997e88a26eab14af83822a7 Mon Sep 17 00:00:00 2001
    From: Michael Schmidt 
    Date: Wed, 28 Nov 2018 14:54:29 +0100
    Subject: [PATCH 0092/1100] Improve `Prism.util.type` performance (#1545)
    
    Drop the regex in favor of a faster `slice` call.
    ---
     components/prism-core.js     | 2 +-
     components/prism-core.min.js | 2 +-
     prism.js                     | 2 +-
     3 files changed, 3 insertions(+), 3 deletions(-)
    
    diff --git a/components/prism-core.js b/components/prism-core.js
    index a09e69656d..c573881ad8 100644
    --- a/components/prism-core.js
    +++ b/components/prism-core.js
    @@ -33,7 +33,7 @@ var _ = _self.Prism = {
     		},
     
     		type: function (o) {
    -			return Object.prototype.toString.call(o).match(/\[object (\w+)\]/)[1];
    +			return Object.prototype.toString.call(o).slice(8, -1);
     		},
     
     		objId: function (obj) {
    diff --git a/components/prism-core.min.js b/components/prism-core.min.js
    index 8b2d545d8e..b1e353efd5 100644
    --- a/components/prism-core.min.js
    +++ b/components/prism-core.min.js
    @@ -1 +1 @@
    -var _self="undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{},Prism=function(){var e=/\blang(?:uage)?-([\w-]+)\b/i,t=0,n=_self.Prism={manual:_self.Prism&&_self.Prism.manual,disableWorkerMessageHandler:_self.Prism&&_self.Prism.disableWorkerMessageHandler,util:{encode:function(e){return e instanceof r?new r(e.type,n.util.encode(e.content),e.alias):"Array"===n.util.type(e)?e.map(n.util.encode):e.replace(/&/g,"&").replace(/e.length)return;if(!(w instanceof s)){if(m&&b!=t.length-1){h.lastIndex=k;var _=h.exec(e);if(!_)break;for(var j=_.index+(d?_[1].length:0),P=_.index+_[0].length,A=b,x=k,O=t.length;O>A&&(P>x||!t[A].type&&!t[A-1].greedy);++A)x+=t[A].length,j>=x&&(++b,k=x);if(t[b]instanceof s)continue;I=A-b,w=e.slice(k,x),_.index-=k}else{h.lastIndex=0;var _=h.exec(w),I=1}if(_){d&&(p=_[1]?_[1].length:0);var j=_.index+p,_=_[0].slice(p),P=j+_.length,N=w.slice(0,j),S=w.slice(P),C=[b,I];N&&(++b,k+=N.length,C.push(N));var E=new s(u,f?n.tokenize(_,f):_,y,_,m);if(C.push(E),S&&C.push(S),Array.prototype.splice.apply(t,C),1!=I&&n.matchGrammar(e,t,r,b,k,!0,u),i)break}else if(i)break}}}}},tokenize:function(e,t){var r=[e],a=t.rest;if(a){for(var l in a)t[l]=a[l];delete t.rest}return n.matchGrammar(e,r,t,0,0,!1),r},hooks:{all:{},add:function(e,t){var r=n.hooks.all;r[e]=r[e]||[],r[e].push(t)},run:function(e,t){var r=n.hooks.all[e];if(r&&r.length)for(var a,l=0;a=r[l++];)a(t)}}},r=n.Token=function(e,t,n,r,a){this.type=e,this.content=t,this.alias=n,this.length=0|(r||"").length,this.greedy=!!a};if(r.stringify=function(e,t,a){if("string"==typeof e)return e;if("Array"===n.util.type(e))return e.map(function(n){return r.stringify(n,t,e)}).join("");var l={type:e.type,content:r.stringify(e.content,t,a),tag:"span",classes:["token",e.type],attributes:{},language:t,parent:a};if(e.alias){var i="Array"===n.util.type(e.alias)?e.alias:[e.alias];Array.prototype.push.apply(l.classes,i)}n.hooks.run("wrap",l);var o=Object.keys(l.attributes).map(function(e){return e+'="'+(l.attributes[e]||"").replace(/"/g,""")+'"'}).join(" ");return"<"+l.tag+' class="'+l.classes.join(" ")+'"'+(o?" "+o:"")+">"+l.content+""},!_self.document)return _self.addEventListener?(n.disableWorkerMessageHandler||_self.addEventListener("message",function(e){var t=JSON.parse(e.data),r=t.language,a=t.code,l=t.immediateClose;_self.postMessage(n.highlight(a,n.languages[r],r)),l&&_self.close()},!1),_self.Prism):_self.Prism;var a=document.currentScript||[].slice.call(document.getElementsByTagName("script")).pop();return a&&(n.filename=a.src,n.manual||a.hasAttribute("data-manual")||("loading"!==document.readyState?window.requestAnimationFrame?window.requestAnimationFrame(n.highlightAll):window.setTimeout(n.highlightAll,16):document.addEventListener("DOMContentLoaded",n.highlightAll))),_self.Prism}();"undefined"!=typeof module&&module.exports&&(module.exports=Prism),"undefined"!=typeof global&&(global.Prism=Prism);
    \ No newline at end of file
    +var _self="undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{},Prism=function(){var e=/\blang(?:uage)?-([\w-]+)\b/i,t=0,n=_self.Prism={manual:_self.Prism&&_self.Prism.manual,disableWorkerMessageHandler:_self.Prism&&_self.Prism.disableWorkerMessageHandler,util:{encode:function(e){return e instanceof r?new r(e.type,n.util.encode(e.content),e.alias):"Array"===n.util.type(e)?e.map(n.util.encode):e.replace(/&/g,"&").replace(/e.length)return;if(!(w instanceof s)){if(m&&b!=t.length-1){h.lastIndex=k;var _=h.exec(e);if(!_)break;for(var j=_.index+(d?_[1].length:0),P=_.index+_[0].length,A=b,x=k,O=t.length;O>A&&(P>x||!t[A].type&&!t[A-1].greedy);++A)x+=t[A].length,j>=x&&(++b,k=x);if(t[b]instanceof s)continue;I=A-b,w=e.slice(k,x),_.index-=k}else{h.lastIndex=0;var _=h.exec(w),I=1}if(_){d&&(p=_[1]?_[1].length:0);var j=_.index+p,_=_[0].slice(p),P=j+_.length,N=w.slice(0,j),S=w.slice(P),C=[b,I];N&&(++b,k+=N.length,C.push(N));var E=new s(u,f?n.tokenize(_,f):_,y,_,m);if(C.push(E),S&&C.push(S),Array.prototype.splice.apply(t,C),1!=I&&n.matchGrammar(e,t,r,b,k,!0,u),i)break}else if(i)break}}}}},tokenize:function(e,t){var r=[e],a=t.rest;if(a){for(var l in a)t[l]=a[l];delete t.rest}return n.matchGrammar(e,r,t,0,0,!1),r},hooks:{all:{},add:function(e,t){var r=n.hooks.all;r[e]=r[e]||[],r[e].push(t)},run:function(e,t){var r=n.hooks.all[e];if(r&&r.length)for(var a,l=0;a=r[l++];)a(t)}}},r=n.Token=function(e,t,n,r,a){this.type=e,this.content=t,this.alias=n,this.length=0|(r||"").length,this.greedy=!!a};if(r.stringify=function(e,t,a){if("string"==typeof e)return e;if("Array"===n.util.type(e))return e.map(function(n){return r.stringify(n,t,e)}).join("");var l={type:e.type,content:r.stringify(e.content,t,a),tag:"span",classes:["token",e.type],attributes:{},language:t,parent:a};if(e.alias){var i="Array"===n.util.type(e.alias)?e.alias:[e.alias];Array.prototype.push.apply(l.classes,i)}n.hooks.run("wrap",l);var o=Object.keys(l.attributes).map(function(e){return e+'="'+(l.attributes[e]||"").replace(/"/g,""")+'"'}).join(" ");return"<"+l.tag+' class="'+l.classes.join(" ")+'"'+(o?" "+o:"")+">"+l.content+""},!_self.document)return _self.addEventListener?(n.disableWorkerMessageHandler||_self.addEventListener("message",function(e){var t=JSON.parse(e.data),r=t.language,a=t.code,l=t.immediateClose;_self.postMessage(n.highlight(a,n.languages[r],r)),l&&_self.close()},!1),_self.Prism):_self.Prism;var a=document.currentScript||[].slice.call(document.getElementsByTagName("script")).pop();return a&&(n.filename=a.src,n.manual||a.hasAttribute("data-manual")||("loading"!==document.readyState?window.requestAnimationFrame?window.requestAnimationFrame(n.highlightAll):window.setTimeout(n.highlightAll,16):document.addEventListener("DOMContentLoaded",n.highlightAll))),_self.Prism}();"undefined"!=typeof module&&module.exports&&(module.exports=Prism),"undefined"!=typeof global&&(global.Prism=Prism);
    \ No newline at end of file
    diff --git a/prism.js b/prism.js
    index 7f6dff2ac2..a64a4614a5 100644
    --- a/prism.js
    +++ b/prism.js
    @@ -38,7 +38,7 @@ var _ = _self.Prism = {
     		},
     
     		type: function (o) {
    -			return Object.prototype.toString.call(o).match(/\[object (\w+)\]/)[1];
    +			return Object.prototype.toString.call(o).slice(8, -1);
     		},
     
     		objId: function (obj) {
    
    From c65842901d58ddaa64d2606ec1e43781e29dfb57 Mon Sep 17 00:00:00 2001
    From: Michael Schmidt 
    Date: Wed, 28 Nov 2018 16:12:09 +0100
    Subject: [PATCH 0093/1100] Fixed Markdown headers (#1557)
    MIME-Version: 1.0
    Content-Type: text/plain; charset=UTF-8
    Content-Transfer-Encoding: 8bit
    
    This PR fixed markdown header of the form:
    
    ```
    Überschrift
    -----------
    ```
    ---
     components/prism-bash.min.js                |  2 +-
     components/prism-markdown.js                |  2 +-
     components/prism-markdown.min.js            |  2 +-
     prism.js                                    |  2 +-
     tests/languages/markdown/hr_feature.test    |  4 +++-
     tests/languages/markdown/title_feature.test | 10 +++++++++-
     6 files changed, 16 insertions(+), 6 deletions(-)
    
    diff --git a/components/prism-bash.min.js b/components/prism-bash.min.js
    index b2550482b7..49845568d1 100644
    --- a/components/prism-bash.min.js
    +++ b/components/prism-bash.min.js
    @@ -1 +1 @@
    -!function(e){var t={variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--?|-=|\+\+?|\+=|!=?|~|\*\*?|\*=|\/=?|%=?|<<=?|>>=?|<=?|>=?|==?|&&?|&=|\^=?|\|\|?|\|=|\?|:/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\([^)]+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},/\$(?:[\w#?*!@]+|\{[^}]+\})/i]};e.languages.bash={shebang:{pattern:/^#!\s*\/bin\/bash|^#!\s*\/bin\/sh/,alias:"important"},comment:{pattern:/(^|[^"{\\])#.*/,lookbehind:!0},string:[{pattern:/((?:^|[^<])<<\s*)["']?(\w+?)["']?\s*\r?\n(?:[\s\S])*?\r?\n\2/,lookbehind:!0,greedy:!0,inside:t},{pattern:/(["'])(?:\\[\s\S]|\$\([^)]+\)|`[^`]+`|(?!\1)[^\\])*\1/,greedy:!0,inside:t}],variable:t.variable,function:{pattern:/(^|[\s;|&])(?:alias|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|builtin|bzip2|cal|cat|cd|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|comm|command|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|du|egrep|eject|enable|env|ethtool|eval|exec|expand|expect|export|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|getopts|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|hash|head|help|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|jobs|join|kill|killall|less|link|ln|locate|logname|logout|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|popd|pr|printcap|printenv|printf|ps|pushd|pv|pwd|quota|quotacheck|quotactl|ram|rar|rcp|read|readarray|readonly|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|shift|shopt|shutdown|sleep|slocate|sort|source|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|tail|tar|tee|test|time|timeout|times|top|touch|tr|traceroute|trap|tsort|tty|type|ulimit|umask|umount|unalias|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yes|zip|zypper)(?=$|[\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&])(?:let|:|\.|if|then|else|elif|fi|for|break|continue|while|in|case|function|select|do|done|until|echo|exit|return|set|declare)(?=$|[\s;|&])/,lookbehind:!0},boolean:{pattern:/(^|[\s;|&])(?:true|false)(?=$|[\s;|&])/,lookbehind:!0},operator:/&&?|\|\|?|==?|!=?|<<>|<=?|>=?|=~/,punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];]/};var a=t.variable[1].inside;a.string=e.languages.bash.string,a.function=e.languages.bash.function,a.keyword=e.languages.bash.keyword,a.boolean=e.languages.bash.boolean,a.operator=e.languages.bash.operator,a.punctuation=e.languages.bash.punctuation,e.languages.shell=e.languages.bash}(Prism);
    \ No newline at end of file
    +!function(e){var t={variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--?|-=|\+\+?|\+=|!=?|~|\*\*?|\*=|\/=?|%=?|<<=?|>>=?|<=?|>=?|==?|&&?|&=|\^=?|\|\|?|\|=|\?|:/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\([^)]+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},/\$(?:[\w#?*!@]+|\{[^}]+\})/i]};e.languages.bash={shebang:{pattern:/^#!\s*\/bin\/bash|^#!\s*\/bin\/sh/,alias:"important"},comment:{pattern:/(^|[^"{\\])#.*/,lookbehind:!0},string:[{pattern:/((?:^|[^<])<<\s*)["']?(\w+?)["']?\s*\r?\n(?:[\s\S])*?\r?\n\2/,lookbehind:!0,greedy:!0,inside:t},{pattern:/(["'])(?:\\[\s\S]|\$\([^)]+\)|`[^`]+`|(?!\1)[^\\])*\1/,greedy:!0,inside:t}],variable:t.variable,"function":{pattern:/(^|[\s;|&])(?:alias|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|builtin|bzip2|cal|cat|cd|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|comm|command|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|du|egrep|eject|enable|env|ethtool|eval|exec|expand|expect|export|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|getopts|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|hash|head|help|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|jobs|join|kill|killall|less|link|ln|locate|logname|logout|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|popd|pr|printcap|printenv|printf|ps|pushd|pv|pwd|quota|quotacheck|quotactl|ram|rar|rcp|read|readarray|readonly|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|shift|shopt|shutdown|sleep|slocate|sort|source|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|tail|tar|tee|test|time|timeout|times|top|touch|tr|traceroute|trap|tsort|tty|type|ulimit|umask|umount|unalias|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yes|zip|zypper)(?=$|[\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&])(?:let|:|\.|if|then|else|elif|fi|for|break|continue|while|in|case|function|select|do|done|until|echo|exit|return|set|declare)(?=$|[\s;|&])/,lookbehind:!0},"boolean":{pattern:/(^|[\s;|&])(?:true|false)(?=$|[\s;|&])/,lookbehind:!0},operator:/&&?|\|\|?|==?|!=?|<<>|<=?|>=?|=~/,punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];]/};var a=t.variable[1].inside;a.string=e.languages.bash.string,a["function"]=e.languages.bash["function"],a.keyword=e.languages.bash.keyword,a["boolean"]=e.languages.bash["boolean"],a.operator=e.languages.bash.operator,a.punctuation=e.languages.bash.punctuation,e.languages.shell=e.languages.bash}(Prism);
    \ No newline at end of file
    diff --git a/components/prism-markdown.js b/components/prism-markdown.js
    index 6ec38a0e91..5f2510dbfd 100644
    --- a/components/prism-markdown.js
    +++ b/components/prism-markdown.js
    @@ -25,7 +25,7 @@ Prism.languages.insertBefore('markdown', 'prolog', {
     
     			// title 2
     			// -------
    -			pattern: /\w+.*(?:\r?\n|\r)(?:==+|--+)/,
    +			pattern: /\S.*(?:\r?\n|\r)(?:==+|--+)/,
     			alias: 'important',
     			inside: {
     				punctuation: /==+$|--+$/
    diff --git a/components/prism-markdown.min.js b/components/prism-markdown.min.js
    index a13d883ebb..44b17fc9d8 100644
    --- a/components/prism-markdown.min.js
    +++ b/components/prism-markdown.min.js
    @@ -1 +1 @@
    -Prism.languages.markdown=Prism.languages.extend("markup",{}),Prism.languages.insertBefore("markdown","prolog",{blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},code:[{pattern:/^(?: {4}|\t).+/m,alias:"keyword"},{pattern:/``.+?``|`[^`\n]+`/,alias:"keyword"}],title:[{pattern:/\w+.*(?:\r?\n|\r)(?:==+|--+)/,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#+.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:/(^|[^\\])(\*\*|__)(?:(?:\r?\n|\r)(?!\r?\n|\r)|.)+?\2/,lookbehind:!0,greedy:!0,inside:{punctuation:/^\*\*|^__|\*\*$|__$/}},italic:{pattern:/(^|[^\\])([*_])(?:(?:\r?\n|\r)(?!\r?\n|\r)|.)+?\2/,lookbehind:!0,greedy:!0,inside:{punctuation:/^[*_]|[*_]$/}},strike:{pattern:/(^|[^\\])(~~?)(?:(?:\r?\n|\r)(?!\r?\n|\r)|.)+?\2/,lookbehind:!0,greedy:!0,inside:{punctuation:/^~~?|~~?$/}},url:{pattern:/!?\[[^\]]+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)| ?\[[^\]\n]*\])/,inside:{variable:{pattern:/(!?\[)[^\]]+(?=\]$)/,lookbehind:!0},string:{pattern:/"(?:\\.|[^"\\])*"(?=\)$)/}}}}),Prism.languages.markdown.bold.inside.url=Prism.languages.markdown.url,Prism.languages.markdown.italic.inside.url=Prism.languages.markdown.url,Prism.languages.markdown.strike.inside.url=Prism.languages.markdown.url,Prism.languages.markdown.bold.inside.italic=Prism.languages.markdown.italic,Prism.languages.markdown.bold.inside.strike=Prism.languages.markdown.strike,Prism.languages.markdown.italic.inside.bold=Prism.languages.markdown.bold,Prism.languages.markdown.italic.inside.strike=Prism.languages.markdown.strike,Prism.languages.markdown.strike.inside.bold=Prism.languages.markdown.bold,Prism.languages.markdown.strike.inside.italic=Prism.languages.markdown.italic;
    \ No newline at end of file
    +Prism.languages.markdown=Prism.languages.extend("markup",{}),Prism.languages.insertBefore("markdown","prolog",{blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},code:[{pattern:/^(?: {4}|\t).+/m,alias:"keyword"},{pattern:/``.+?``|`[^`\n]+`/,alias:"keyword"}],title:[{pattern:/\S.*(?:\r?\n|\r)(?:==+|--+)/,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#+.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:/(^|[^\\])(\*\*|__)(?:(?:\r?\n|\r)(?!\r?\n|\r)|.)+?\2/,lookbehind:!0,greedy:!0,inside:{punctuation:/^\*\*|^__|\*\*$|__$/}},italic:{pattern:/(^|[^\\])([*_])(?:(?:\r?\n|\r)(?!\r?\n|\r)|.)+?\2/,lookbehind:!0,greedy:!0,inside:{punctuation:/^[*_]|[*_]$/}},strike:{pattern:/(^|[^\\])(~~?)(?:(?:\r?\n|\r)(?!\r?\n|\r)|.)+?\2/,lookbehind:!0,greedy:!0,inside:{punctuation:/^~~?|~~?$/}},url:{pattern:/!?\[[^\]]+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)| ?\[[^\]\n]*\])/,inside:{variable:{pattern:/(!?\[)[^\]]+(?=\]$)/,lookbehind:!0},string:{pattern:/"(?:\\.|[^"\\])*"(?=\)$)/}}}}),Prism.languages.markdown.bold.inside.url=Prism.languages.markdown.url,Prism.languages.markdown.italic.inside.url=Prism.languages.markdown.url,Prism.languages.markdown.strike.inside.url=Prism.languages.markdown.url,Prism.languages.markdown.bold.inside.italic=Prism.languages.markdown.italic,Prism.languages.markdown.bold.inside.strike=Prism.languages.markdown.strike,Prism.languages.markdown.italic.inside.bold=Prism.languages.markdown.bold,Prism.languages.markdown.italic.inside.strike=Prism.languages.markdown.strike,Prism.languages.markdown.strike.inside.bold=Prism.languages.markdown.bold,Prism.languages.markdown.strike.inside.italic=Prism.languages.markdown.italic;
    \ No newline at end of file
    diff --git a/prism.js b/prism.js
    index a64a4614a5..1bb30ec769 100644
    --- a/prism.js
    +++ b/prism.js
    @@ -906,4 +906,4 @@ Prism.languages.js = Prism.languages.javascript;
     		self.Prism.fileHighlight();
     	});
     
    -})();
    \ No newline at end of file
    +})();
    diff --git a/tests/languages/markdown/hr_feature.test b/tests/languages/markdown/hr_feature.test
    index 412022652e..bba290d4ac 100644
    --- a/tests/languages/markdown/hr_feature.test
    +++ b/tests/languages/markdown/hr_feature.test
    @@ -1,5 +1,7 @@
     ***
    +
     ---
    +
     * * *
     
     ----------------------------------------------------
    @@ -12,4 +14,4 @@
     
     ----------------------------------------------------
     
    -Checks for hr.
    \ No newline at end of file
    +Checks for hr.
    diff --git a/tests/languages/markdown/title_feature.test b/tests/languages/markdown/title_feature.test
    index e02e86fb7b..a06f332636 100644
    --- a/tests/languages/markdown/title_feature.test
    +++ b/tests/languages/markdown/title_feature.test
    @@ -4,6 +4,12 @@ title 1
     foobar
     ======
     
    +Überschrift
    +===========
    +
    +Überschrift
    +--
    +
     title 2
     --
     
    @@ -19,6 +25,8 @@ title 2
     [
     	["title", ["title 1\r\n", ["punctuation", "=="]]],
     	["title", ["foobar\r\n", ["punctuation", "======"]]],
    +	["title", ["Überschrift\r\n", ["punctuation", "==========="]]],
    +	["title", ["Überschrift\r\n", ["punctuation", "--"]]],
     	["title", ["title 2\r\n", ["punctuation", "--"]]],
     
     	["title", [["punctuation", "#"], " title 1"]],
    @@ -31,4 +39,4 @@ title 2
     
     ----------------------------------------------------
     
    -Checks for titles.
    \ No newline at end of file
    +Checks for titles.
    
    From 38def334bb6114256f96c7b4a06274d395b9bbeb Mon Sep 17 00:00:00 2001
    From: Starbeamrainbowlabs 
    Date: Wed, 28 Nov 2018 17:45:17 +0000
    Subject: [PATCH 0094/1100] Add new language: CIL (#1593)
    
    Add support for the Common Intermediate Language from .NET.
    ---
     components.js                                 |   2 +-
     components.json                               |   4 +
     components/prism-cil.js                       |  27 ++
     components/prism-cil.min.js                   |   1 +
     plugins/show-language/prism-show-language.js  |   2 +-
     .../show-language/prism-show-language.min.js  |   2 +-
     tests/languages/cil/asm_reference.test        |  11 +
     tests/languages/cil/boolean.test              |  14 +
     tests/languages/cil/comment.test              |  11 +
     tests/languages/cil/instructions.test         | 457 ++++++++++++++++++
     tests/languages/cil/keywords.test             | 161 ++++++
     tests/languages/cil/strings.test              |  11 +
     12 files changed, 700 insertions(+), 3 deletions(-)
     create mode 100644 components/prism-cil.js
     create mode 100644 components/prism-cil.min.js
     create mode 100644 tests/languages/cil/asm_reference.test
     create mode 100644 tests/languages/cil/boolean.test
     create mode 100644 tests/languages/cil/comment.test
     create mode 100644 tests/languages/cil/instructions.test
     create mode 100644 tests/languages/cil/keywords.test
     create mode 100644 tests/languages/cil/strings.test
    
    diff --git a/components.js b/components.js
    index 42a7cb62d2..9267a47afc 100644
    --- a/components.js
    +++ b/components.js
    @@ -1,2 +1,2 @@
    -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default","peerDependencies":"markup"},"clike":{"title":"C-like","option":"default","overrideExampleHeader":true},"javascript":{"title":"JavaScript","require":"clike","peerDependencies":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"actionscript":{"title":"ActionScript","require":"javascript","peerDependencies":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":"dotnet","owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"coffeescript":{"title":"CoffeeScript","require":"javascript","owner":"R-osey"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup","peerDependencies":["css","javascript"],"alias":"jinja2","owner":"romanvm"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","peerDependencies":["css","coffeescript","erb","javascript","less","markdown","ruby","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"http":{"title":"HTTP","peerDependencies":["javascript","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"json":{"title":"JSON","alias":"jsonp","aliasTitles":{"jsonp":"JSONP"},"owner":"CupOfTea696"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","owner":"japborst"},"less":{"title":"Less","require":"css","owner":"Golmote"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"n4js":{"title":"N4JS","require":"javascript","alias":"n4jsd","owner":"bsmith-n4"},"nasm":{"title":"NASM","owner":"rbmj"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"cpp","peerDependencies":["c","cpp"],"overrideExampleHeader":true,"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"php-extras":{"title":"PHP Extras","require":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":"javascript","peerDependencies":["coffeescript","ejs","handlebars","hogan","less","livescript","markdown","mustache","plates","scss","stylus","swig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","peerDependencies":["c","cpp","fortran","ats","dsp"],"owner":"Golmote"},"python":{"title":"Python","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"ruby":{"title":"Ruby","require":"clike","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sql":{"title":"SQL","owner":"multipetros"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","peerDependencies":"css","owner":"Golmote"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","alias":"ts","owner":"vkbansal"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","owner":"hason"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":"Line Highlight","line-numbers":{"title":"Line Numbers","owner":"kuba-kubula"},"show-invisibles":"Show Invisibles","autolinker":"Autolinker","wpd":"WebPlatform Docs","custom-class":{"title":"Custom Class","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","noCSS":true},"show-language":{"title":"Show Language","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","owner":"Golmote","noCSS":true},"previewers":{"title":"Previewers","owner":"Golmote"},"autoloader":{"title":"Autoloader","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","owner":"Golmote","after":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","owner":"chriswells0"},"unescaped-markup":"Unescaped Markup","normalize-whitespace":{"title":"Normalize Whitespace","owner":"zeitgeist87","after":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","owner":"mAAdhaTTah","require":"toolbar","noCSS":true}}};
    +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default","peerDependencies":"markup"},"clike":{"title":"C-like","option":"default","overrideExampleHeader":true},"javascript":{"title":"JavaScript","require":"clike","peerDependencies":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"actionscript":{"title":"ActionScript","require":"javascript","peerDependencies":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":"dotnet","owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","owner":"R-osey"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup","peerDependencies":["css","javascript"],"alias":"jinja2","owner":"romanvm"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","peerDependencies":["css","coffeescript","erb","javascript","less","markdown","ruby","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"http":{"title":"HTTP","peerDependencies":["javascript","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"json":{"title":"JSON","alias":"jsonp","aliasTitles":{"jsonp":"JSONP"},"owner":"CupOfTea696"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","owner":"japborst"},"less":{"title":"Less","require":"css","owner":"Golmote"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"n4js":{"title":"N4JS","require":"javascript","alias":"n4jsd","owner":"bsmith-n4"},"nasm":{"title":"NASM","owner":"rbmj"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"cpp","peerDependencies":["c","cpp"],"overrideExampleHeader":true,"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"php-extras":{"title":"PHP Extras","require":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":"javascript","peerDependencies":["coffeescript","ejs","handlebars","hogan","less","livescript","markdown","mustache","plates","scss","stylus","swig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","peerDependencies":["c","cpp","fortran","ats","dsp"],"owner":"Golmote"},"python":{"title":"Python","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"ruby":{"title":"Ruby","require":"clike","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sql":{"title":"SQL","owner":"multipetros"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","peerDependencies":"css","owner":"Golmote"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","alias":"ts","owner":"vkbansal"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","owner":"hason"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":"Line Highlight","line-numbers":{"title":"Line Numbers","owner":"kuba-kubula"},"show-invisibles":"Show Invisibles","autolinker":"Autolinker","wpd":"WebPlatform Docs","custom-class":{"title":"Custom Class","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","noCSS":true},"show-language":{"title":"Show Language","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","owner":"Golmote","noCSS":true},"previewers":{"title":"Previewers","owner":"Golmote"},"autoloader":{"title":"Autoloader","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","owner":"Golmote","after":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","owner":"chriswells0"},"unescaped-markup":"Unescaped Markup","normalize-whitespace":{"title":"Normalize Whitespace","owner":"zeitgeist87","after":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","owner":"mAAdhaTTah","require":"toolbar","noCSS":true}}};
     if (typeof module !== 'undefined' && module.exports) { module.exports = components; }
    \ No newline at end of file
    diff --git a/components.json b/components.json
    index fce5add93e..68b66101fd 100644
    --- a/components.json
    +++ b/components.json
    @@ -175,6 +175,10 @@
     			"require": "c",
     			"owner": "zeitgeist87"
     		},
    +		"cil": {
    +			"title": "CIL",
    +			"owner": "sbrl"
    +		},
     		"coffeescript": {
     			"title": "CoffeeScript",
     			"require": "javascript",
    diff --git a/components/prism-cil.js b/components/prism-cil.js
    new file mode 100644
    index 0000000000..aa153c3160
    --- /dev/null
    +++ b/components/prism-cil.js
    @@ -0,0 +1,27 @@
    +Prism.languages.cil = {
    +	'comment': /\/\/.*/,
    +	
    +	'string': {
    +		pattern: /(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,
    +		greedy: true
    +	},
    +	
    +	'directive': {
    +		pattern: /(^|\W)\.[a-z]+(?=\s)/,
    +		lookbehind: true,
    +		alias: 'class-name'
    +	},
    +	
    +	// Actually an assembly reference
    +	'variable': /\[[\w\.]+\]/,
    +	
    +	
    +	'keyword': /\b(?:abstract|ansi|assembly|auto|autochar|beforefieldinit|bool|bstr|byvalstr|catch|char|cil|class|currency|date|decimal|default|enum|error|explicit|extends|extern|famandassem|family|famorassem|final(?:ly)?|float32|float64|hidebysig|iant|idispatch|implements|import|initonly|instance|u?int(?:8|16|32|64)?|interface|iunknown|literal|lpstr|lpstruct|lptstr|lpwstr|managed|method|native(?:Type)?|nested|newslot|object(?:ref)?|pinvokeimpl|private|privatescope|public|reqsecobj|rtspecialname|runtime|sealed|sequential|serializable|specialname|static|string|struct|syschar|tbstr|unicode|unmanagedexp|unsigned|value(?:type)?|variant|virtual|void)\b/,
    +	
    +	'function': /\b(?:(?:constrained|unaligned|volatile|readonly|tail|no)\.)?(?:conv\.(?:[iu][1248]?|ovf\.[iu][1248]?(?:\.un)?|r\.un|r4|r8)|ldc\.(?:i4(?:\.[0-9]+|\.[mM]1|\.s)?|i8|r4|r8)|ldelem(?:\.[iu][1248]?|\.r[48]|\.ref|a)?|ldind\.(?:[iu][1248]?|r[48]|ref)|stelem\.?(?:i[1248]?|r[48]|ref)?|stind\.(i[1248]?|r[48]|ref)?|end(?:fault|filter|finally)|ldarg(?:\.[0-3s]|a(?:\.s)?)?|ldloc(?:\.[0-9]+|\.s)?|sub(?:\.ovf(?:\.un)?)?|mul(?:\.ovf(?:\.un)?)?|add(?:\.ovf(?:\.un)?)?|stloc(?:\.[0-3s])?|refany(?:type|val)|blt(?:\.un)?(?:\.s)?|ble(?:\.un)?(?:\.s)?|bgt(?:\.un)?(?:\.s)?|bge(?:\.un)?(?:\.s)?|unbox(?:\.any)?|init(?:blk|obj)|call(?:i|virt)?|brfalse(?:\.s)?|bne\.un(?:\.s)?|ldloca(?:\.s)?|brzero(?:\.s)?|brtrue(?:\.s)?|brnull(?:\.s)?|brinst(?:\.s)?|starg(?:\.s)?|leave(?:\.s)?|shr(?:\.un)?|rem(?:\.un)?|div(?:\.un)?|clt(?:\.un)?|alignment|ldvirtftn|castclass|beq(?:\.s)?|mkrefany|localloc|ckfinite|rethrow|ldtoken|ldsflda|cgt\.un|arglist|switch|stsfld|sizeof|newobj|newarr|ldsfld|ldnull|ldflda|isinst|throw|stobj|stloc|stfld|ldstr|ldobj|ldlen|ldftn|ldfld|cpobj|cpblk|break|br\.s|xor|shl|ret|pop|not|nop|neg|jmp|dup|clt|cgt|ceq|box|and|or|br)\b/,
    +	
    +	'boolean': /\b(?:true|false)\b/,
    +	'number': /\b-?(?:0x[0-9a-fA-F]+|[0-9]+)(?:\.[0-9a-fA-F]+)?\b/i,
    +	
    +	'punctuation': /[{}[\];(),:=]|IL_[0-9A-Za-z]+/
    +}
    diff --git a/components/prism-cil.min.js b/components/prism-cil.min.js
    new file mode 100644
    index 0000000000..088d0d295a
    --- /dev/null
    +++ b/components/prism-cil.min.js
    @@ -0,0 +1 @@
    +Prism.languages.cil={comment:/\/\/.*/,string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},directive:{pattern:/(^|\W)\.[a-z]+(?=\s)/,lookbehind:!0,alias:"class-name"},variable:/\[[\w\.]+\]/,keyword:/\b(?:abstract|ansi|assembly|auto|autochar|beforefieldinit|bool|bstr|byvalstr|catch|char|cil|class|currency|date|decimal|default|enum|error|explicit|extends|extern|famandassem|family|famorassem|final(?:ly)?|float32|float64|hidebysig|iant|idispatch|implements|import|initonly|instance|u?int(?:8|16|32|64)?|interface|iunknown|literal|lpstr|lpstruct|lptstr|lpwstr|managed|method|native(?:Type)?|nested|newslot|object(?:ref)?|pinvokeimpl|private|privatescope|public|reqsecobj|rtspecialname|runtime|sealed|sequential|serializable|specialname|static|string|struct|syschar|tbstr|unicode|unmanagedexp|unsigned|value(?:type)?|variant|virtual|void)\b/,"function":/\b(?:(?:constrained|unaligned|volatile|readonly|tail|no)\.)?(?:conv\.(?:[iu][1248]?|ovf\.[iu][1248]?(?:\.un)?|r\.un|r4|r8)|ldc\.(?:i4(?:\.[0-9]+|\.[mM]1|\.s)?|i8|r4|r8)|ldelem(?:\.[iu][1248]?|\.r[48]|\.ref|a)?|ldind\.(?:[iu][1248]?|r[48]|ref)|stelem\.?(?:i[1248]?|r[48]|ref)?|stind\.(i[1248]?|r[48]|ref)?|end(?:fault|filter|finally)|ldarg(?:\.[0-3s]|a(?:\.s)?)?|ldloc(?:\.[0-9]+|\.s)?|sub(?:\.ovf(?:\.un)?)?|mul(?:\.ovf(?:\.un)?)?|add(?:\.ovf(?:\.un)?)?|stloc(?:\.[0-3s])?|refany(?:type|val)|blt(?:\.un)?(?:\.s)?|ble(?:\.un)?(?:\.s)?|bgt(?:\.un)?(?:\.s)?|bge(?:\.un)?(?:\.s)?|unbox(?:\.any)?|init(?:blk|obj)|call(?:i|virt)?|brfalse(?:\.s)?|bne\.un(?:\.s)?|ldloca(?:\.s)?|brzero(?:\.s)?|brtrue(?:\.s)?|brnull(?:\.s)?|brinst(?:\.s)?|starg(?:\.s)?|leave(?:\.s)?|shr(?:\.un)?|rem(?:\.un)?|div(?:\.un)?|clt(?:\.un)?|alignment|ldvirtftn|castclass|beq(?:\.s)?|mkrefany|localloc|ckfinite|rethrow|ldtoken|ldsflda|cgt\.un|arglist|switch|stsfld|sizeof|newobj|newarr|ldsfld|ldnull|ldflda|isinst|throw|stobj|stloc|stfld|ldstr|ldobj|ldlen|ldftn|ldfld|cpobj|cpblk|break|br\.s|xor|shl|ret|pop|not|nop|neg|jmp|dup|clt|cgt|ceq|box|and|or|br)\b/,"boolean":/\b(?:true|false)\b/,number:/\b-?(?:0x[0-9a-fA-F]+|[0-9]+)(?:\.[0-9a-fA-F]+)?\b/i,punctuation:/[{}[\];(),:=]|IL_[0-9A-Za-z]+/};
    \ No newline at end of file
    diff --git a/plugins/show-language/prism-show-language.js b/plugins/show-language/prism-show-language.js
    index 488f85cdcd..d5957cb255 100644
    --- a/plugins/show-language/prism-show-language.js
    +++ b/plugins/show-language/prism-show-language.js
    @@ -11,7 +11,7 @@ if (!Prism.plugins.toolbar) {
     }
     
     // The languages map is built automatically with gulp
    -var Languages = /*languages_placeholder[*/{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","css":"CSS","clike":"C-like","javascript":"JavaScript","abap":"ABAP","actionscript":"ActionScript","apacheconf":"Apache Configuration","apl":"APL","applescript":"AppleScript","arff":"ARFF","asciidoc":"AsciiDoc","asm6502":"6502 Assembly","aspnet":"ASP.NET (C#)","autohotkey":"AutoHotkey","autoit":"AutoIt","shell":"Shell","basic":"BASIC","csharp":"C#","cpp":"C++","coffeescript":"CoffeeScript","csp":"Content-Security-Policy","css-extras":"CSS Extras","django":"Django/Jinja2","erb":"ERB","fsharp":"F#","gedcom":"GEDCOM","glsl":"GLSL","gml":"GameMaker Language","graphql":"GraphQL","http":"HTTP","hpkp":"HTTP Public-Key-Pins","hsts":"HTTP Strict-Transport-Security","ichigojam":"IchigoJam","inform7":"Inform 7","json":"JSON","jsonp":"JSONP","latex":"LaTeX","livescript":"LiveScript","lolcode":"LOLCODE","markup-templating":"Markup templating","matlab":"MATLAB","mel":"MEL","n4js":"N4JS","nasm":"NASM","nginx":"nginx","nsis":"NSIS","objectivec":"Objective-C","ocaml":"OCaml","opencl":"OpenCL","parigp":"PARI/GP","objectpascal":"Object Pascal","php":"PHP","php-extras":"PHP Extras","plsql":"PL/SQL","powershell":"PowerShell","properties":".properties","protobuf":"Protocol Buffers","q":"Q (kdb+ database)","jsx":"React JSX","tsx":"React TSX","renpy":"Ren'py","rest":"reST (reStructuredText)","sas":"SAS","sass":"Sass (Sass)","scss":"Sass (Scss)","sql":"SQL","soy":"Soy (Closure Template)","tap":"TAP","tt2":"Template Toolkit 2","typescript":"TypeScript","vbnet":"VB.Net","vhdl":"VHDL","vim":"vim","visual-basic":"Visual Basic","wasm":"WebAssembly","wiki":"Wiki markup","xeoracube":"XeoraCube","xojo":"Xojo (REALbasic)","xquery":"XQuery","yaml":"YAML"}/*]*/;
    +var Languages = /*languages_placeholder[*/{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","css":"CSS","clike":"C-like","javascript":"JavaScript","abap":"ABAP","actionscript":"ActionScript","apacheconf":"Apache Configuration","apl":"APL","applescript":"AppleScript","arff":"ARFF","asciidoc":"AsciiDoc","asm6502":"6502 Assembly","aspnet":"ASP.NET (C#)","autohotkey":"AutoHotkey","autoit":"AutoIt","shell":"Shell","basic":"BASIC","csharp":"C#","cpp":"C++","cil":"CIL","coffeescript":"CoffeeScript","csp":"Content-Security-Policy","css-extras":"CSS Extras","django":"Django/Jinja2","erb":"ERB","fsharp":"F#","gedcom":"GEDCOM","glsl":"GLSL","gml":"GameMaker Language","graphql":"GraphQL","http":"HTTP","hpkp":"HTTP Public-Key-Pins","hsts":"HTTP Strict-Transport-Security","ichigojam":"IchigoJam","inform7":"Inform 7","json":"JSON","jsonp":"JSONP","latex":"LaTeX","livescript":"LiveScript","lolcode":"LOLCODE","markup-templating":"Markup templating","matlab":"MATLAB","mel":"MEL","n4js":"N4JS","nasm":"NASM","nginx":"nginx","nsis":"NSIS","objectivec":"Objective-C","ocaml":"OCaml","opencl":"OpenCL","parigp":"PARI/GP","objectpascal":"Object Pascal","php":"PHP","php-extras":"PHP Extras","plsql":"PL/SQL","powershell":"PowerShell","properties":".properties","protobuf":"Protocol Buffers","q":"Q (kdb+ database)","jsx":"React JSX","tsx":"React TSX","renpy":"Ren'py","rest":"reST (reStructuredText)","sas":"SAS","sass":"Sass (Sass)","scss":"Sass (Scss)","sql":"SQL","soy":"Soy (Closure Template)","tap":"TAP","tt2":"Template Toolkit 2","typescript":"TypeScript","vbnet":"VB.Net","vhdl":"VHDL","vim":"vim","visual-basic":"Visual Basic","wasm":"WebAssembly","wiki":"Wiki markup","xeoracube":"XeoraCube","xojo":"Xojo (REALbasic)","xquery":"XQuery","yaml":"YAML"}/*]*/;
     Prism.plugins.toolbar.registerButton('show-language', function(env) {
     	var pre = env.element.parentNode;
     	if (!pre || !/pre/i.test(pre.nodeName)) {
    diff --git a/plugins/show-language/prism-show-language.min.js b/plugins/show-language/prism-show-language.min.js
    index 061390cec4..5c043c8b47 100644
    --- a/plugins/show-language/prism-show-language.min.js
    +++ b/plugins/show-language/prism-show-language.min.js
    @@ -1 +1 @@
    -!function(){if("undefined"!=typeof self&&self.Prism&&self.document){if(!Prism.plugins.toolbar)return console.warn("Show Languages plugin loaded before Toolbar plugin."),void 0;var e={html:"HTML",xml:"XML",svg:"SVG",mathml:"MathML",css:"CSS",clike:"C-like",javascript:"JavaScript",abap:"ABAP",actionscript:"ActionScript",apacheconf:"Apache Configuration",apl:"APL",applescript:"AppleScript",arff:"ARFF",asciidoc:"AsciiDoc",asm6502:"6502 Assembly",aspnet:"ASP.NET (C#)",autohotkey:"AutoHotkey",autoit:"AutoIt",shell:"Shell",basic:"BASIC",csharp:"C#",cpp:"C++",coffeescript:"CoffeeScript",csp:"Content-Security-Policy","css-extras":"CSS Extras",django:"Django/Jinja2",erb:"ERB",fsharp:"F#",gedcom:"GEDCOM",glsl:"GLSL",gml:"GameMaker Language",graphql:"GraphQL",http:"HTTP",hpkp:"HTTP Public-Key-Pins",hsts:"HTTP Strict-Transport-Security",ichigojam:"IchigoJam",inform7:"Inform 7",json:"JSON",jsonp:"JSONP",latex:"LaTeX",livescript:"LiveScript",lolcode:"LOLCODE","markup-templating":"Markup templating",matlab:"MATLAB",mel:"MEL",n4js:"N4JS",nasm:"NASM",nginx:"nginx",nsis:"NSIS",objectivec:"Objective-C",ocaml:"OCaml",opencl:"OpenCL",parigp:"PARI/GP",objectpascal:"Object Pascal",php:"PHP","php-extras":"PHP Extras",plsql:"PL/SQL",powershell:"PowerShell",properties:".properties",protobuf:"Protocol Buffers",q:"Q (kdb+ database)",jsx:"React JSX",tsx:"React TSX",renpy:"Ren'py",rest:"reST (reStructuredText)",sas:"SAS",sass:"Sass (Sass)",scss:"Sass (Scss)",sql:"SQL",soy:"Soy (Closure Template)",tap:"TAP",tt2:"Template Toolkit 2",typescript:"TypeScript",vbnet:"VB.Net",vhdl:"VHDL",vim:"vim","visual-basic":"Visual Basic",wasm:"WebAssembly",wiki:"Wiki markup",xeoracube:"XeoraCube",xojo:"Xojo (REALbasic)",xquery:"XQuery",yaml:"YAML"};Prism.plugins.toolbar.registerButton("show-language",function(a){var t=a.element.parentNode;if(t&&/pre/i.test(t.nodeName)){var s=t.getAttribute("data-language")||e[a.language]||a.language&&a.language.substring(0,1).toUpperCase()+a.language.substring(1);if(s){var r=document.createElement("span");return r.textContent=s,r}}})}}();
    \ No newline at end of file
    +!function(){if("undefined"!=typeof self&&self.Prism&&self.document){if(!Prism.plugins.toolbar)return console.warn("Show Languages plugin loaded before Toolbar plugin."),void 0;var e={html:"HTML",xml:"XML",svg:"SVG",mathml:"MathML",css:"CSS",clike:"C-like",javascript:"JavaScript",abap:"ABAP",actionscript:"ActionScript",apacheconf:"Apache Configuration",apl:"APL",applescript:"AppleScript",arff:"ARFF",asciidoc:"AsciiDoc",asm6502:"6502 Assembly",aspnet:"ASP.NET (C#)",autohotkey:"AutoHotkey",autoit:"AutoIt",shell:"Shell",basic:"BASIC",csharp:"C#",cpp:"C++",cil:"CIL",coffeescript:"CoffeeScript",csp:"Content-Security-Policy","css-extras":"CSS Extras",django:"Django/Jinja2",erb:"ERB",fsharp:"F#",gedcom:"GEDCOM",glsl:"GLSL",gml:"GameMaker Language",graphql:"GraphQL",http:"HTTP",hpkp:"HTTP Public-Key-Pins",hsts:"HTTP Strict-Transport-Security",ichigojam:"IchigoJam",inform7:"Inform 7",json:"JSON",jsonp:"JSONP",latex:"LaTeX",livescript:"LiveScript",lolcode:"LOLCODE","markup-templating":"Markup templating",matlab:"MATLAB",mel:"MEL",n4js:"N4JS",nasm:"NASM",nginx:"nginx",nsis:"NSIS",objectivec:"Objective-C",ocaml:"OCaml",opencl:"OpenCL",parigp:"PARI/GP",objectpascal:"Object Pascal",php:"PHP","php-extras":"PHP Extras",plsql:"PL/SQL",powershell:"PowerShell",properties:".properties",protobuf:"Protocol Buffers",q:"Q (kdb+ database)",jsx:"React JSX",tsx:"React TSX",renpy:"Ren'py",rest:"reST (reStructuredText)",sas:"SAS",sass:"Sass (Sass)",scss:"Sass (Scss)",sql:"SQL",soy:"Soy (Closure Template)",tap:"TAP",tt2:"Template Toolkit 2",typescript:"TypeScript",vbnet:"VB.Net",vhdl:"VHDL",vim:"vim","visual-basic":"Visual Basic",wasm:"WebAssembly",wiki:"Wiki markup",xeoracube:"XeoraCube",xojo:"Xojo (REALbasic)",xquery:"XQuery",yaml:"YAML"};Prism.plugins.toolbar.registerButton("show-language",function(a){var t=a.element.parentNode;if(t&&/pre/i.test(t.nodeName)){var s=t.getAttribute("data-language")||e[a.language]||a.language&&a.language.substring(0,1).toUpperCase()+a.language.substring(1);if(s){var i=document.createElement("span");return i.textContent=s,i}}})}}();
    \ No newline at end of file
    diff --git a/tests/languages/cil/asm_reference.test b/tests/languages/cil/asm_reference.test
    new file mode 100644
    index 0000000000..991f998cc2
    --- /dev/null
    +++ b/tests/languages/cil/asm_reference.test
    @@ -0,0 +1,11 @@
    +[mscorlib]
    +
    +--------------------------------------------------------
    +
    +[
    +	[ "variable", "[mscorlib]" ]
    +]
    +
    +--------------------------------------------------------
    +
    +Tests assembly references
    diff --git a/tests/languages/cil/boolean.test b/tests/languages/cil/boolean.test
    new file mode 100644
    index 0000000000..c6cfe746fd
    --- /dev/null
    +++ b/tests/languages/cil/boolean.test
    @@ -0,0 +1,14 @@
    +
    +true
    +false
    +
    +----------------------------------------------------
    +
    +[
    +	["boolean", "true"],
    +	["boolean", "false"]
    +]
    +
    +----------------------------------------------------
    +
    +Tests booleans.
    diff --git a/tests/languages/cil/comment.test b/tests/languages/cil/comment.test
    new file mode 100644
    index 0000000000..97a30a459f
    --- /dev/null
    +++ b/tests/languages/cil/comment.test
    @@ -0,0 +1,11 @@
    +// this is a test
    +
    +--------------------------------------------------------
    +
    +[
    +	[ "comment", "// this is a test" ]
    +]
    +
    +--------------------------------------------------------
    +
    +Tests comments
    diff --git a/tests/languages/cil/instructions.test b/tests/languages/cil/instructions.test
    new file mode 100644
    index 0000000000..fc01826c81
    --- /dev/null
    +++ b/tests/languages/cil/instructions.test
    @@ -0,0 +1,457 @@
    +add
    +add.ovf
    +add.ovf.un
    +and
    +arglist
    +beq
    +beq.s
    +bge
    +bge.s
    +bge.un
    +bge.un.s
    +bgt
    +bgt.s
    +bgt.un
    +bgt.un.s
    +ble
    +ble.s
    +ble.un
    +ble.un.s
    +blt
    +blt.s
    +blt.un
    +blt.un.s
    +bne.un
    +bne.un.s
    +box
    +br
    +br.s
    +break
    +brfalse
    +brfalse.s
    +brinst
    +brinst.s
    +brnull
    +brnull.s
    +brtrue
    +brtrue.s
    +brzero
    +brzero.s
    +call
    +calli
    +callvirt
    +castclass
    +ceq
    +cgt
    +cgt.un
    +ckfinite
    +clt
    +clt.un
    +conv.i
    +conv.i1
    +conv.i2
    +conv.i4
    +conv.i8
    +conv.ovf.i
    +conv.ovf.i.un
    +conv.ovf.i1
    +conv.ovf.i1.un
    +conv.ovf.i2
    +conv.ovf.i2.un
    +conv.ovf.i4
    +conv.ovf.i4.un
    +conv.ovf.i8
    +conv.ovf.i8.un
    +conv.ovf.u
    +conv.ovf.u.un
    +conv.ovf.u1
    +conv.ovf.u1.un
    +conv.ovf.u2
    +conv.ovf.u2.un
    +conv.ovf.u4
    +conv.ovf.u4.un
    +conv.ovf.u8
    +conv.ovf.u8.un
    +conv.r.un
    +conv.r4
    +conv.r8
    +conv.u
    +conv.u1
    +conv.u2
    +conv.u4
    +conv.u8
    +cpblk
    +cpobj
    +div
    +div.un
    +dup
    +endfault
    +endfilter
    +endfinally
    +initblk
    +initobj
    +isinst
    +jmp
    +ldarg
    +ldarg.0
    +ldarg.1
    +ldarg.2
    +ldarg.3
    +ldarg.s
    +ldarga
    +ldarga.s
    +ldc.i4
    +ldc.i4.0
    +ldc.i4.1
    +ldc.i4.2
    +ldc.i4.3
    +ldc.i4.4
    +ldc.i4.5
    +ldc.i4.6
    +ldc.i4.7
    +ldc.i4.8
    +ldc.i4.m1
    +ldc.i4.M1
    +ldc.i4.s
    +ldc.i8
    +ldc.r4
    +ldc.r8
    +ldelem
    +ldelem.i
    +ldelem.i1
    +ldelem.i2
    +ldelem.i4
    +ldelem.i8
    +ldelem.r4
    +ldelem.r8
    +ldelem.ref
    +ldelem.u1
    +ldelem.u2
    +ldelem.u4
    +ldelem.u8
    +ldelema
    +ldfld
    +ldflda
    +ldftn
    +ldind.i
    +ldind.i1
    +ldind.i2
    +ldind.i4
    +ldind.i8
    +ldind.r4
    +ldind.r8
    +ldind.ref
    +ldind.u1
    +ldind.u2
    +ldind.u4
    +ldind.u8
    +ldlen
    +ldloc
    +ldloc.0
    +ldloc.1
    +ldloc.2
    +ldloc.3
    +ldloc.s
    +ldloca
    +ldloca.s
    +ldnull
    +ldobj
    +ldsfld
    +ldsflda
    +ldstr
    +ldtoken
    +ldvirtftn
    +leave
    +leave.s
    +localloc
    +mkrefany
    +mul
    +mul.ovf
    +mul.ovf.un
    +neg
    +newarr
    +newobj
    +nop
    +not
    +or
    +pop
    +refanytype
    +refanyval
    +rem
    +rem.un
    +ret
    +rethrow
    +shl
    +shr
    +shr.un
    +sizeof
    +starg
    +starg.s
    +stelem
    +stelem.i
    +stelem.i1
    +stelem.i2
    +stelem.i4
    +stelem.i8
    +stelem.r4
    +stelem.r8
    +stelem.ref
    +stfld
    +stind.i
    +stind.i1
    +stind.i2
    +stind.i4
    +stind.i8
    +stind.r4
    +stind.r8
    +stind.ref
    +stloc
    +stloc.0
    +stloc.1
    +stloc.2
    +stloc.3
    +stloc.s
    +stobj
    +stsfld
    +sub
    +sub.ovf
    +sub.ovf.un
    +switch
    +throw
    +alignment
    +unbox
    +unbox.any
    +xor
    +
    +----------------------------------------------------
    +
    +[
    +	["function", "add"],
    +	["function", "add.ovf"],
    +	["function", "add.ovf.un"],
    +	["function", "and"],
    +	["function", "arglist"],
    +	["function", "beq"],
    +	["function", "beq.s"],
    +	["function", "bge"],
    +	["function", "bge.s"],
    +	["function", "bge.un"],
    +	["function", "bge.un.s"],
    +	["function", "bgt"],
    +	["function", "bgt.s"],
    +	["function", "bgt.un"],
    +	["function", "bgt.un.s"],
    +	["function", "ble"],
    +	["function", "ble.s"],
    +	["function", "ble.un"],
    +	["function", "ble.un.s"],
    +	["function", "blt"],
    +	["function", "blt.s"],
    +	["function", "blt.un"],
    +	["function", "blt.un.s"],
    +	["function", "bne.un"],
    +	["function", "bne.un.s"],
    +	["function", "box"],
    +	["function", "br"],
    +	["function", "br.s"],
    +	["function", "break"],
    +	["function", "brfalse"],
    +	["function", "brfalse.s"],
    +	["function", "brinst"],
    +	["function", "brinst.s"],
    +	["function", "brnull"],
    +	["function", "brnull.s"],
    +	["function", "brtrue"],
    +	["function", "brtrue.s"],
    +	["function", "brzero"],
    +	["function", "brzero.s"],
    +	["function", "call"],
    +	["function", "calli"],
    +	["function", "callvirt"],
    +	["function", "castclass"],
    +	["function", "ceq"],
    +	["function", "cgt"],
    +	["function", "cgt.un"],
    +	["function", "ckfinite"],
    +	["function", "clt"],
    +	["function", "clt.un"],
    +	["function", "conv.i"],
    +	["function", "conv.i1"],
    +	["function", "conv.i2"],
    +	["function", "conv.i4"],
    +	["function", "conv.i8"],
    +	["function", "conv.ovf.i"],
    +	["function", "conv.ovf.i.un"],
    +	["function", "conv.ovf.i1"],
    +	["function", "conv.ovf.i1.un"],
    +	["function", "conv.ovf.i2"],
    +	["function", "conv.ovf.i2.un"],
    +	["function", "conv.ovf.i4"],
    +	["function", "conv.ovf.i4.un"],
    +	["function", "conv.ovf.i8"],
    +	["function", "conv.ovf.i8.un"],
    +	["function", "conv.ovf.u"],
    +	["function", "conv.ovf.u.un"],
    +	["function", "conv.ovf.u1"],
    +	["function", "conv.ovf.u1.un"],
    +	["function", "conv.ovf.u2"],
    +	["function", "conv.ovf.u2.un"],
    +	["function", "conv.ovf.u4"],
    +	["function", "conv.ovf.u4.un"],
    +	["function", "conv.ovf.u8"],
    +	["function", "conv.ovf.u8.un"],
    +	["function", "conv.r.un"],
    +	["function", "conv.r4"],
    +	["function", "conv.r8"],
    +	["function", "conv.u"],
    +	["function", "conv.u1"],
    +	["function", "conv.u2"],
    +	["function", "conv.u4"],
    +	["function", "conv.u8"],
    +	["function", "cpblk"],
    +	["function", "cpobj"],
    +	["function", "div"],
    +	["function", "div.un"],
    +	["function", "dup"],
    +	["function", "endfault"],
    +	["function", "endfilter"],
    +	["function", "endfinally"],
    +	["function", "initblk"],
    +	["function", "initobj"],
    +	["function", "isinst"],
    +	["function", "jmp"],
    +	["function", "ldarg"],
    +	["function", "ldarg.0"],
    +	["function", "ldarg.1"],
    +	["function", "ldarg.2"],
    +	["function", "ldarg.3"],
    +	["function", "ldarg.s"],
    +	["function", "ldarga"],
    +	["function", "ldarga.s"],
    +	["function", "ldc.i4"],
    +	["function", "ldc.i4.0"],
    +	["function", "ldc.i4.1"],
    +	["function", "ldc.i4.2"],
    +	["function", "ldc.i4.3"],
    +	["function", "ldc.i4.4"],
    +	["function", "ldc.i4.5"],
    +	["function", "ldc.i4.6"],
    +	["function", "ldc.i4.7"],
    +	["function", "ldc.i4.8"],
    +	["function", "ldc.i4.m1"],
    +	["function", "ldc.i4.M1"],
    +	["function", "ldc.i4.s"],
    +	["function", "ldc.i8"],
    +	["function", "ldc.r4"],
    +	["function", "ldc.r8"],
    +	["function", "ldelem"],
    +	["function", "ldelem.i"],
    +	["function", "ldelem.i1"],
    +	["function", "ldelem.i2"],
    +	["function", "ldelem.i4"],
    +	["function", "ldelem.i8"],
    +	["function", "ldelem.r4"],
    +	["function", "ldelem.r8"],
    +	["function", "ldelem.ref"],
    +	["function", "ldelem.u1"],
    +	["function", "ldelem.u2"],
    +	["function", "ldelem.u4"],
    +	["function", "ldelem.u8"],
    +	["function", "ldelema"],
    +	["function", "ldfld"],
    +	["function", "ldflda"],
    +	["function", "ldftn"],
    +	["function", "ldind.i"],
    +	["function", "ldind.i1"],
    +	["function", "ldind.i2"],
    +	["function", "ldind.i4"],
    +	["function", "ldind.i8"],
    +	["function", "ldind.r4"],
    +	["function", "ldind.r8"],
    +	["function", "ldind.ref"],
    +	["function", "ldind.u1"],
    +	["function", "ldind.u2"],
    +	["function", "ldind.u4"],
    +	["function", "ldind.u8"],
    +	["function", "ldlen"],
    +	["function", "ldloc"],
    +	["function", "ldloc.0"],
    +	["function", "ldloc.1"],
    +	["function", "ldloc.2"],
    +	["function", "ldloc.3"],
    +	["function", "ldloc.s"],
    +	["function", "ldloca"],
    +	["function", "ldloca.s"],
    +	["function", "ldnull"],
    +	["function", "ldobj"],
    +	["function", "ldsfld"],
    +	["function", "ldsflda"],
    +	["function", "ldstr"],
    +	["function", "ldtoken"],
    +	["function", "ldvirtftn"],
    +	["function", "leave"],
    +	["function", "leave.s"],
    +	["function", "localloc"],
    +	["function", "mkrefany"],
    +	["function", "mul"],
    +	["function", "mul.ovf"],
    +	["function", "mul.ovf.un"],
    +	["function", "neg"],
    +	["function", "newarr"],
    +	["function", "newobj"],
    +	["function", "nop"],
    +	["function", "not"],
    +	["function", "or"],
    +	["function", "pop"],
    +	["function", "refanytype"],
    +	["function", "refanyval"],
    +	["function", "rem"],
    +	["function", "rem.un"],
    +	["function", "ret"],
    +	["function", "rethrow"],
    +	["function", "shl"],
    +	["function", "shr"],
    +	["function", "shr.un"],
    +	["function", "sizeof"],
    +	["function", "starg"],
    +	["function", "starg.s"],
    +	["function", "stelem"],
    +	["function", "stelem.i"],
    +	["function", "stelem.i1"],
    +	["function", "stelem.i2"],
    +	["function", "stelem.i4"],
    +	["function", "stelem.i8"],
    +	["function", "stelem.r4"],
    +	["function", "stelem.r8"],
    +	["function", "stelem.ref"],
    +	["function", "stfld"],
    +	["function", "stind.i"],
    +	["function", "stind.i1"],
    +	["function", "stind.i2"],
    +	["function", "stind.i4"],
    +	["function", "stind.i8"],
    +	["function", "stind.r4"],
    +	["function", "stind.r8"],
    +	["function", "stind.ref"],
    +	["function", "stloc"],
    +	["function", "stloc.0"],
    +	["function", "stloc.1"],
    +	["function", "stloc.2"],
    +	["function", "stloc.3"],
    +	["function", "stloc.s"],
    +	["function", "stobj"],
    +	["function", "stsfld"],
    +	["function", "sub"],
    +	["function", "sub.ovf"],
    +	["function", "sub.ovf.un"],
    +	["function", "switch"],
    +	["function", "throw"],
    +	["function", "alignment"],
    +	["function", "unbox"],
    +	["function", "unbox.any"],
    +	["function", "xor"]
    +]
    +
    +----------------------------------------------------
    +
    +Tests instruction names
    diff --git a/tests/languages/cil/keywords.test b/tests/languages/cil/keywords.test
    new file mode 100644
    index 0000000000..53a4645a25
    --- /dev/null
    +++ b/tests/languages/cil/keywords.test
    @@ -0,0 +1,161 @@
    +abstract
    +ansi
    +assembly
    +auto
    +autochar
    +beforefieldinit
    +bool
    +bstr
    +byvalstr
    +cil
    +char
    +class
    +currency
    +date
    +decimal
    +default
    +enum
    +error
    +explicit
    +extends
    +extern
    +famandassem
    +family
    +famorassem
    +final
    +float32
    +float64
    +hidebysig
    +iant
    +idispatch
    +import
    +initonly
    +instance
    +int
    +int16
    +int32
    +int64
    +int8
    +uint
    +uint16
    +uint32
    +uint64
    +uint8
    +interface
    +iunknown
    +lpstr
    +lpstruct
    +lptstr
    +lpwstr
    +managed
    +nativeType
    +nested
    +newslot
    +objectref
    +pinvokeimpl
    +private
    +privatescope
    +public
    +reqsecobj
    +rtspecialname
    +sealed
    +sequential
    +serializable
    +specialname
    +static
    +string
    +struct
    +syschar
    +tbstr
    +unicode
    +unmanagedexp
    +unsigned
    +value
    +variant
    +virtual
    +void
    +
    +--------------------------------------------------------
    +
    +[
    +	[ "keyword", "abstract" ],
    +	[ "keyword", "ansi" ],
    +	[ "keyword", "assembly" ],
    +	[ "keyword", "auto" ],
    +	[ "keyword", "autochar" ],
    +	[ "keyword", "beforefieldinit" ],
    +	[ "keyword", "bool" ],
    +	[ "keyword", "bstr" ],
    +	[ "keyword", "byvalstr" ],
    +	[ "keyword", "cil" ],
    +	[ "keyword", "char" ],
    +	[ "keyword", "class" ],
    +	[ "keyword", "currency" ],
    +	[ "keyword", "date" ],
    +	[ "keyword", "decimal" ],
    +	[ "keyword", "default" ],
    +	[ "keyword", "enum" ],
    +	[ "keyword", "error" ],
    +	[ "keyword", "explicit" ],
    +	[ "keyword", "extends" ],
    +	[ "keyword", "extern" ],
    +	[ "keyword", "famandassem" ],
    +	[ "keyword", "family" ],
    +	[ "keyword", "famorassem" ],
    +	[ "keyword", "final" ],
    +	[ "keyword", "float32" ],
    +	[ "keyword", "float64" ],
    +	[ "keyword", "hidebysig" ],
    +	[ "keyword", "iant" ],
    +	[ "keyword", "idispatch" ],
    +	[ "keyword", "import" ],
    +	[ "keyword", "initonly" ],
    +	[ "keyword", "instance" ],
    +	[ "keyword", "int" ],
    +	[ "keyword", "int16" ],
    +	[ "keyword", "int32" ],
    +	[ "keyword", "int64" ],
    +	[ "keyword", "int8" ],
    +	[ "keyword", "uint" ],
    +	[ "keyword", "uint16" ],
    +	[ "keyword", "uint32" ],
    +	[ "keyword", "uint64" ],
    +	[ "keyword", "uint8" ],
    +	[ "keyword", "interface" ],
    +	[ "keyword", "iunknown" ],
    +	[ "keyword", "lpstr" ],
    +	[ "keyword", "lpstruct" ],
    +	[ "keyword", "lptstr" ],
    +	[ "keyword", "lpwstr" ],
    +	[ "keyword", "managed" ],
    +	[ "keyword", "nativeType" ],
    +	[ "keyword", "nested" ],
    +	[ "keyword", "newslot" ],
    +	[ "keyword", "objectref" ],
    +	[ "keyword", "pinvokeimpl" ],
    +	[ "keyword", "private" ],
    +	[ "keyword", "privatescope" ],
    +	[ "keyword", "public" ],
    +	[ "keyword", "reqsecobj" ],
    +	[ "keyword", "rtspecialname" ],
    +	[ "keyword", "sealed" ],
    +	[ "keyword", "sequential" ],
    +	[ "keyword", "serializable" ],
    +	[ "keyword", "specialname" ],
    +	[ "keyword", "static" ],
    +	[ "keyword", "string" ],
    +	[ "keyword", "struct" ],
    +	[ "keyword", "syschar" ],
    +	[ "keyword", "tbstr" ],
    +	[ "keyword", "unicode" ],
    +	[ "keyword", "unmanagedexp" ],
    +	[ "keyword", "unsigned" ],
    +	[ "keyword", "value" ],
    +	[ "keyword", "variant" ],
    +	[ "keyword", "virtual" ],
    +	[ "keyword", "void"]
    +]
    +
    +--------------------------------------------------------
    +
    +Tests keywords
    diff --git a/tests/languages/cil/strings.test b/tests/languages/cil/strings.test
    new file mode 100644
    index 0000000000..da2de2c73b
    --- /dev/null
    +++ b/tests/languages/cil/strings.test
    @@ -0,0 +1,11 @@
    +"testing! £$%^&*"
    +
    +----------------------------------------------------
    +
    +[
    +	["string", "\"testing! £$%^&*\""]
    +]
    +
    +----------------------------------------------------
    +
    +Tests strings.
    
    From 3590eddeaa0d92859842a2d4106a982dac030e41 Mon Sep 17 00:00:00 2001
    From: Ralf Biedert 
    Date: Thu, 29 Nov 2018 12:25:28 +0100
    Subject: [PATCH 0095/1100] Add missing keywords to rust. (#1634)
    
    Adds `dyn`, `Self`, and `union` to the list of rust keywords.
    ---
     components/prism-rust.js                  |  2 +-
     components/prism-rust.min.js              |  2 +-
     tests/languages/rust/keyword_feature.test | 12 ++++++------
     3 files changed, 8 insertions(+), 8 deletions(-)
    
    diff --git a/components/prism-rust.js b/components/prism-rust.js
    index 1a520c004e..3027fae0f6 100644
    --- a/components/prism-rust.js
    +++ b/components/prism-rust.js
    @@ -34,7 +34,7 @@ Prism.languages.rust = {
     		pattern: /'[^\s>']+/,
     		alias: 'symbol'
     	},
    -	'keyword': /\b(?:abstract|alignof|as|be|box|break|const|continue|crate|do|else|enum|extern|false|final|fn|for|if|impl|in|let|loop|match|mod|move|mut|offsetof|once|override|priv|pub|pure|ref|return|sizeof|static|self|struct|super|true|trait|type|typeof|unsafe|unsized|use|virtual|where|while|yield)\b/,
    +	'keyword': /\b(?:abstract|alignof|as|be|box|break|const|continue|crate|do|dyn|else|enum|extern|false|final|fn|for|if|impl|in|let|loop|match|mod|move|mut|offsetof|once|override|priv|pub|pure|ref|return|sizeof|static|self|Self|struct|super|true|trait|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,
     
     	'attribute': {
     		pattern: /#!?\[.+?\]/,
    diff --git a/components/prism-rust.min.js b/components/prism-rust.min.js
    index 62538942c6..c096ab5080 100644
    --- a/components/prism-rust.min.js
    +++ b/components/prism-rust.min.js
    @@ -1 +1 @@
    -Prism.languages.rust={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?\*\//,lookbehind:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0}],string:[{pattern:/b?r(#*)"(?:\\.|(?!"\1)[^\\\r\n])*"\1/,greedy:!0},{pattern:/b?"(?:\\.|[^\\\r\n"])*"/,greedy:!0}],"char":{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u{(?:[\da-fA-F]_*){1,6}|.)|[^\\\r\n\t'])'/,alias:"string"},"lifetime-annotation":{pattern:/'[^\s>']+/,alias:"symbol"},keyword:/\b(?:abstract|alignof|as|be|box|break|const|continue|crate|do|else|enum|extern|false|final|fn|for|if|impl|in|let|loop|match|mod|move|mut|offsetof|once|override|priv|pub|pure|ref|return|sizeof|static|self|struct|super|true|trait|type|typeof|unsafe|unsized|use|virtual|where|while|yield)\b/,attribute:{pattern:/#!?\[.+?\]/,greedy:!0,alias:"attr-name"},"function":[/\w+(?=\s*\()/,/\w+!(?=\s*\(|\[)/],"macro-rules":{pattern:/\w+!/,alias:"function"},number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(\d(?:_?\d)*)?\.?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:[iu](?:8|16|32|64)?|f32|f64))?\b/,"closure-params":{pattern:/\|[^|]*\|(?=\s*[{-])/,inside:{punctuation:/[|:,]/,operator:/[&*]/}},punctuation:/[{}[\];(),:]|\.+|->/,operator:/[-+*\/%!^]=?|=[=>]?|@|&[&=]?|\|[|=]?|<>?=?/};
    \ No newline at end of file
    +Prism.languages.rust={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?\*\//,lookbehind:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0}],string:[{pattern:/b?r(#*)"(?:\\.|(?!"\1)[^\\\r\n])*"\1/,greedy:!0},{pattern:/b?"(?:\\.|[^\\\r\n"])*"/,greedy:!0}],"char":{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u{(?:[\da-fA-F]_*){1,6}|.)|[^\\\r\n\t'])'/,alias:"string"},"lifetime-annotation":{pattern:/'[^\s>']+/,alias:"symbol"},keyword:/\b(?:abstract|alignof|as|be|box|break|const|continue|crate|do|dyn|else|enum|extern|false|final|fn|for|if|impl|in|let|loop|match|mod|move|mut|offsetof|once|override|priv|pub|pure|ref|return|sizeof|static|self|Self|struct|super|true|trait|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,attribute:{pattern:/#!?\[.+?\]/,greedy:!0,alias:"attr-name"},"function":[/\w+(?=\s*\()/,/\w+!(?=\s*\(|\[)/],"macro-rules":{pattern:/\w+!/,alias:"function"},number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(\d(?:_?\d)*)?\.?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:[iu](?:8|16|32|64)?|f32|f64))?\b/,"closure-params":{pattern:/\|[^|]*\|(?=\s*[{-])/,inside:{punctuation:/[|:,]/,operator:/[&*]/}},punctuation:/[{}[\];(),:]|\.+|->/,operator:/[-+*\/%!^]=?|=[=>]?|@|&[&=]?|\|[|=]?|<>?=?/};
    \ No newline at end of file
    diff --git a/tests/languages/rust/keyword_feature.test b/tests/languages/rust/keyword_feature.test
    index 06da8844d2..d7071ec95b 100644
    --- a/tests/languages/rust/keyword_feature.test
    +++ b/tests/languages/rust/keyword_feature.test
    @@ -1,6 +1,6 @@
     abstract alignof as
     be box break const
    -continue crate do
    +continue crate do dyn
     else enum extern
     false final fn for
     if impl in let loop
    @@ -8,9 +8,9 @@ match mod move mut
     offsetof once override
     priv pub pure ref
     return sizeof static
    -self struct super
    +self Self struct super
     true trait type typeof
    -unsafe unsized use
    +union unsafe unsized use
     virtual where while
     yield
     
    @@ -19,7 +19,7 @@ yield
     [
     	["keyword", "abstract"], ["keyword", "alignof"], ["keyword", "as"],
     	["keyword", "be"], ["keyword", "box"], ["keyword", "break"], ["keyword", "const"],
    -	["keyword", "continue"], ["keyword", "crate"], ["keyword", "do"],
    +	["keyword", "continue"], ["keyword", "crate"], ["keyword", "do"], ["keyword", "dyn"],
     	["keyword", "else"], ["keyword", "enum"], ["keyword", "extern"],
     	["keyword", "false"], ["keyword", "final"], ["keyword", "fn"], ["keyword", "for"],
     	["keyword", "if"], ["keyword", "impl"], ["keyword", "in"], ["keyword", "let"], ["keyword", "loop"],
    @@ -27,9 +27,9 @@ yield
     	["keyword", "offsetof"], ["keyword", "once"], ["keyword", "override"],
     	["keyword", "priv"], ["keyword", "pub"], ["keyword", "pure"], ["keyword", "ref"],
     	["keyword", "return"], ["keyword", "sizeof"], ["keyword", "static"],
    -	["keyword", "self"], ["keyword", "struct"], ["keyword", "super"],
    +	["keyword", "self"], ["keyword", "Self"], ["keyword", "struct"], ["keyword", "super"],
     	["keyword", "true"], ["keyword", "trait"], ["keyword", "type"], ["keyword", "typeof"],
    -	["keyword", "unsafe"], ["keyword", "unsized"], ["keyword", "use"],
    +	["keyword", "union"], ["keyword", "unsafe"], ["keyword", "unsized"], ["keyword", "use"],
     	["keyword", "virtual"], ["keyword", "where"], ["keyword", "while"],
     	["keyword", "yield"]
     ]
    
    From 1d1fb800750ef2aaba9145a36af35a7a8471d793 Mon Sep 17 00:00:00 2001
    From: Michael Schmidt 
    Date: Thu, 29 Nov 2018 13:43:22 +0100
    Subject: [PATCH 0096/1100] Python: Operator keywords are now keywords (#1617)
    
    Change `and`, `not`, and `or` to keywords.
    ---
     components/prism-python.js                   | 4 ++--
     components/prism-python.min.js               | 2 +-
     tests/languages/python/keyword_feature.test  | 4 +++-
     tests/languages/python/operator_feature.test | 4 +---
     4 files changed, 7 insertions(+), 7 deletions(-)
    
    diff --git a/components/prism-python.js b/components/prism-python.js
    index ecad408b08..df8374f6fd 100644
    --- a/components/prism-python.js
    +++ b/components/prism-python.js
    @@ -20,10 +20,10 @@ Prism.languages.python = {
     		pattern: /(\bclass\s+)\w+/i,
     		lookbehind: true
     	},
    -	'keyword': /\b(?:as|assert|async|await|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|nonlocal|pass|print|raise|return|try|while|with|yield)\b/,
    +	'keyword': /\b(?:and|as|assert|async|await|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,
     	'builtin':/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,
     	'boolean': /\b(?:True|False|None)\b/,
     	'number': /(?:\b(?=\d)|\B(?=\.))(?:0[bo])?(?:(?:\d|0x[\da-f])[\da-f]*\.?\d*|\.\d+)(?:e[+-]?\d+)?j?\b/i,
    -	'operator': /[-+%=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]|\b(?:or|and|not)\b/,
    +	'operator': /[-+%=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,
     	'punctuation': /[{}[\];(),.:]/
     };
    diff --git a/components/prism-python.min.js b/components/prism-python.min.js
    index 9b91686cf8..f4e17fe81e 100644
    --- a/components/prism-python.min.js
    +++ b/components/prism-python.min.js
    @@ -1 +1 @@
    -Prism.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0},"triple-quoted-string":{pattern:/("""|''')[\s\S]+?\1/,greedy:!0,alias:"string"},string:{pattern:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0},"function":{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},keyword:/\b(?:as|assert|async|await|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|nonlocal|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,"boolean":/\b(?:True|False|None)\b/,number:/(?:\b(?=\d)|\B(?=\.))(?:0[bo])?(?:(?:\d|0x[\da-f])[\da-f]*\.?\d*|\.\d+)(?:e[+-]?\d+)?j?\b/i,operator:/[-+%=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]|\b(?:or|and|not)\b/,punctuation:/[{}[\];(),.:]/};
    \ No newline at end of file
    +Prism.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0},"triple-quoted-string":{pattern:/("""|''')[\s\S]+?\1/,greedy:!0,alias:"string"},string:{pattern:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0},"function":{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},keyword:/\b(?:and|as|assert|async|await|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,"boolean":/\b(?:True|False|None)\b/,number:/(?:\b(?=\d)|\B(?=\.))(?:0[bo])?(?:(?:\d|0x[\da-f])[\da-f]*\.?\d*|\.\d+)(?:e[+-]?\d+)?j?\b/i,operator:/[-+%=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/};
    \ No newline at end of file
    diff --git a/tests/languages/python/keyword_feature.test b/tests/languages/python/keyword_feature.test
    index e50cb7f3b7..56685da88e 100644
    --- a/tests/languages/python/keyword_feature.test
    +++ b/tests/languages/python/keyword_feature.test
    @@ -8,6 +8,7 @@ import in is lambda
     pass print raise return
     try while with yield
     nonlocal
    +and not or
     
     ----------------------------------------------------
     
    @@ -21,7 +22,8 @@ nonlocal
     	["keyword", "import"], ["keyword", "in"], ["keyword", "is"], ["keyword", "lambda"],
     	["keyword", "pass"], ["keyword", "print"], ["keyword", "raise"], ["keyword", "return"],
     	["keyword", "try"], ["keyword", "while"], ["keyword", "with"], ["keyword", "yield"],
    -	["keyword", "nonlocal"]
    +	["keyword", "nonlocal"],
    +	["keyword", "and"], ["keyword", "not"], ["keyword", "or"]
     ]
     
     ----------------------------------------------------
    diff --git a/tests/languages/python/operator_feature.test b/tests/languages/python/operator_feature.test
    index 8d1f01743d..6785336627 100644
    --- a/tests/languages/python/operator_feature.test
    +++ b/tests/languages/python/operator_feature.test
    @@ -8,7 +8,6 @@
     = ==
     !=
     & | ^ ~
    -or and not
     
     ----------------------------------------------------
     
    @@ -22,8 +21,7 @@ or and not
     	["operator", ">"], ["operator", ">="], ["operator", ">>"],
     	["operator", "="], ["operator", "=="],
     	["operator", "!="],
    -	["operator", "&"], ["operator", "|"], ["operator", "^"], ["operator", "~"],
    -	["operator", "or"], ["operator", "and"], ["operator", "not"]
    +	["operator", "&"], ["operator", "|"], ["operator", "^"], ["operator", "~"]
     ]
     
     ----------------------------------------------------
    
    From 5db04656da14fa2063b4f3c16de6113355f7726f Mon Sep 17 00:00:00 2001
    From: Michael Schmidt 
    Date: Thu, 29 Nov 2018 13:48:20 +0100
    Subject: [PATCH 0097/1100] Mention Prism Themes in README (#1625)
    
    ---
     README.md | 2 ++
     1 file changed, 2 insertions(+)
    
    diff --git a/README.md b/README.md
    index 716ab5c818..798208a8b6 100644
    --- a/README.md
    +++ b/README.md
    @@ -8,6 +8,8 @@ You can learn more on http://prismjs.com/.
     
     Why another syntax highlighter?: http://lea.verou.me/2012/07/introducing-prism-an-awesome-new-syntax-highlighter/#more-1841
     
    +More themes for Prism: https://github.com/PrismJS/prism-themes
    +
     ## Contribute to Prism!
     
     Prism depends on community contributions to expand and cover a wider array of use cases. If you like it, considering giving back by sending a pull request. Here are a few tips:
    
    From 225dd3f7316ad8a18454aee499795433656c1615 Mon Sep 17 00:00:00 2001
    From: Michael Schmidt 
    Date: Thu, 29 Nov 2018 14:07:27 +0100
    Subject: [PATCH 0098/1100] Scheme improvements (#1556)
    
    1. `)` is part for symbols (strings).
    2. Function names which have a keyword/builtin as a prefix are not matched correctly.
    3. Zero-length function names.
    4. `'` is highlighted as `string` even if it marks a list.
    
    Also add support for Scheme characters.
    ---
     components/prism-scheme.js                    | 36 ++++---
     components/prism-scheme.min.js                |  2 +-
     tests/languages/scheme/builtin_feature.test   | 90 ++++++++---------
     tests/languages/scheme/character_feature.test | 19 ++++
     tests/languages/scheme/function_feature.test  |  4 +-
     tests/languages/scheme/issue1331.test         |  4 +-
     tests/languages/scheme/keyword_feature.test   | 98 +++++++++----------
     tests/languages/scheme/string_feature.test    |  6 +-
     8 files changed, 143 insertions(+), 116 deletions(-)
     create mode 100644 tests/languages/scheme/character_feature.test
    
    diff --git a/components/prism-scheme.js b/components/prism-scheme.js
    index 102d848529..f4024474eb 100644
    --- a/components/prism-scheme.js
    +++ b/components/prism-scheme.js
    @@ -1,29 +1,33 @@
     Prism.languages.scheme = {
    -	'comment' : /;.*/,
    -	'string' :  {
    -		pattern: /"(?:[^"\\\r\n]|\\.)*"|'[^('\s]*/,
    +	'comment': /;.*/,
    +	'string': {
    +		pattern: /"(?:[^"\\\r\n]|\\.)*"|'[^()#'\s]+/,
     		greedy: true
     	},
    -	'keyword' : {
    -		pattern : /(\()(?:define(?:-syntax|-library|-values)?|(?:case-)?lambda|let(?:\*|rec)?(?:-values)?|else|if|cond|begin|delay(?:-force)?|parameterize|guard|set!|(?:quasi-)?quote|syntax-rules)/,
    -		lookbehind : true
    +	'character': {
    +		pattern: /#\\(?:u[a-fA-F\d]{4}|[a-zA-Z]+|\S)/,
    +		alias: 'string'
     	},
    -	'builtin' : {
    -		pattern :  /(\()(?:(?:cons|car|cdr|list|call-with-current-continuation|call\/cc|append|abs|apply|eval)\b|null\?|pair\?|boolean\?|eof-object\?|char\?|procedure\?|number\?|port\?|string\?|vector\?|symbol\?|bytevector\?)/,
    -		lookbehind : true
    +	'keyword': {
    +		pattern: /(\()(?:define(?:-syntax|-library|-values)?|(?:case-)?lambda|let(?:\*|rec)?(?:-values)?|else|if|cond|begin|delay(?:-force)?|parameterize|guard|set!|(?:quasi-)?quote|syntax-rules)(?=[()\s])/,
    +		lookbehind: true
    +	},
    +	'builtin': {
    +		pattern: /(\()(?:(?:cons|car|cdr|list|call-with-current-continuation|call\/cc|append|abs|apply|eval)\b|null\?|pair\?|boolean\?|eof-object\?|char\?|procedure\?|number\?|port\?|string\?|vector\?|symbol\?|bytevector\?)(?=[()\s])/,
    +		lookbehind: true
     	},
    -	'number' : {
    +	'number': {
     		pattern: /(\s|[()])[-+]?\d*\.?\d+(?:\s*[-+]\s*\d*\.?\d+i)?\b/,
     		lookbehind: true
     	},
    -	'boolean' : /#[tf]/,
    +	'boolean': /#[tf]/,
     	'operator': {
     		pattern: /(\()(?:[-+*%\/]|[<>]=?|=>?)/,
     		lookbehind: true
     	},
    -	'function' : {
    -		pattern : /(\()[^\s()]*(?=[\s)])/,
    -		lookbehind : true
    +	'function': {
    +		pattern: /(\()[^()#'\s]+(?=[()\s)])/,
    +		lookbehind: true
     	},
    -	'punctuation' : /[()]/
    -};
    \ No newline at end of file
    +	'punctuation': /[()']/
    +};
    diff --git a/components/prism-scheme.min.js b/components/prism-scheme.min.js
    index 1767130adf..9b41709b9e 100644
    --- a/components/prism-scheme.min.js
    +++ b/components/prism-scheme.min.js
    @@ -1 +1 @@
    -Prism.languages.scheme={comment:/;.*/,string:{pattern:/"(?:[^"\\\r\n]|\\.)*"|'[^('\s]*/,greedy:!0},keyword:{pattern:/(\()(?:define(?:-syntax|-library|-values)?|(?:case-)?lambda|let(?:\*|rec)?(?:-values)?|else|if|cond|begin|delay(?:-force)?|parameterize|guard|set!|(?:quasi-)?quote|syntax-rules)/,lookbehind:!0},builtin:{pattern:/(\()(?:(?:cons|car|cdr|list|call-with-current-continuation|call\/cc|append|abs|apply|eval)\b|null\?|pair\?|boolean\?|eof-object\?|char\?|procedure\?|number\?|port\?|string\?|vector\?|symbol\?|bytevector\?)/,lookbehind:!0},number:{pattern:/(\s|[()])[-+]?\d*\.?\d+(?:\s*[-+]\s*\d*\.?\d+i)?\b/,lookbehind:!0},"boolean":/#[tf]/,operator:{pattern:/(\()(?:[-+*%\/]|[<>]=?|=>?)/,lookbehind:!0},"function":{pattern:/(\()[^\s()]*(?=[\s)])/,lookbehind:!0},punctuation:/[()]/};
    \ No newline at end of file
    +Prism.languages.scheme={comment:/;.*/,string:{pattern:/"(?:[^"\\\r\n]|\\.)*"|'[^()#'\s]+/,greedy:!0},character:{pattern:/#\\(?:u[a-fA-F\d]{4}|[a-zA-Z]+|\S)/,alias:"string"},keyword:{pattern:/(\()(?:define(?:-syntax|-library|-values)?|(?:case-)?lambda|let(?:\*|rec)?(?:-values)?|else|if|cond|begin|delay(?:-force)?|parameterize|guard|set!|(?:quasi-)?quote|syntax-rules)(?=[()\s])/,lookbehind:!0},builtin:{pattern:/(\()(?:(?:cons|car|cdr|list|call-with-current-continuation|call\/cc|append|abs|apply|eval)\b|null\?|pair\?|boolean\?|eof-object\?|char\?|procedure\?|number\?|port\?|string\?|vector\?|symbol\?|bytevector\?)(?=[()\s])/,lookbehind:!0},number:{pattern:/(\s|[()])[-+]?\d*\.?\d+(?:\s*[-+]\s*\d*\.?\d+i)?\b/,lookbehind:!0},"boolean":/#[tf]/,operator:{pattern:/(\()(?:[-+*%\/]|[<>]=?|=>?)/,lookbehind:!0},"function":{pattern:/(\()[^()#'\s]+(?=[()\s)])/,lookbehind:!0},punctuation:/[()']/};
    \ No newline at end of file
    diff --git a/tests/languages/scheme/builtin_feature.test b/tests/languages/scheme/builtin_feature.test
    index 4f9cf90d52..ab03c8e209 100644
    --- a/tests/languages/scheme/builtin_feature.test
    +++ b/tests/languages/scheme/builtin_feature.test
    @@ -1,53 +1,53 @@
    -(cons
    -(car
    -(cdr
    -(null?
    -(pair?
    -(boolean?
    -(eof-object?
    -(char?
    -(procedure?
    -(number?
    -(port?
    -(string?
    -(vector?
    -(symbol?
    -(bytevector?
    -(list
    -(call-with-current-continuation
    -(call/cc
    -(append
    -(abs
    -(apply
    -(eval
    +(cons)
    +(car)
    +(cdr)
    +(null?)
    +(pair?)
    +(boolean?)
    +(eof-object?)
    +(char?)
    +(procedure?)
    +(number?)
    +(port?)
    +(string?)
    +(vector?)
    +(symbol?)
    +(bytevector?)
    +(list)
    +(call-with-current-continuation)
    +(call/cc)
    +(append)
    +(abs)
    +(apply)
    +(eval)
     
     ----------------------------------------------------
     
     [
    -	["punctuation", "("], ["builtin", "cons"],
    -	["punctuation", "("], ["builtin", "car"],
    -	["punctuation", "("], ["builtin", "cdr"],
    -	["punctuation", "("], ["builtin", "null?"],
    -	["punctuation", "("], ["builtin", "pair?"],
    -	["punctuation", "("], ["builtin", "boolean?"],
    -	["punctuation", "("], ["builtin", "eof-object?"],
    -	["punctuation", "("], ["builtin", "char?"],
    -	["punctuation", "("], ["builtin", "procedure?"],
    -	["punctuation", "("], ["builtin", "number?"],
    -	["punctuation", "("], ["builtin", "port?"],
    -	["punctuation", "("], ["builtin", "string?"],
    -	["punctuation", "("], ["builtin", "vector?"],
    -	["punctuation", "("], ["builtin", "symbol?"],
    -	["punctuation", "("], ["builtin", "bytevector?"],
    -	["punctuation", "("], ["builtin", "list"],
    -	["punctuation", "("], ["builtin", "call-with-current-continuation"],
    -	["punctuation", "("], ["builtin", "call/cc"],
    -	["punctuation", "("], ["builtin", "append"],
    -	["punctuation", "("], ["builtin", "abs"],
    -	["punctuation", "("], ["builtin", "apply"],
    -	["punctuation", "("], ["builtin", "eval"]
    +	["punctuation", "("], ["builtin", "cons"], ["punctuation", ")"],
    +	["punctuation", "("], ["builtin", "car"], ["punctuation", ")"],
    +	["punctuation", "("], ["builtin", "cdr"], ["punctuation", ")"],
    +	["punctuation", "("], ["builtin", "null?"], ["punctuation", ")"],
    +	["punctuation", "("], ["builtin", "pair?"], ["punctuation", ")"],
    +	["punctuation", "("], ["builtin", "boolean?"], ["punctuation", ")"],
    +	["punctuation", "("], ["builtin", "eof-object?"], ["punctuation", ")"],
    +	["punctuation", "("], ["builtin", "char?"], ["punctuation", ")"],
    +	["punctuation", "("], ["builtin", "procedure?"], ["punctuation", ")"],
    +	["punctuation", "("], ["builtin", "number?"], ["punctuation", ")"],
    +	["punctuation", "("], ["builtin", "port?"], ["punctuation", ")"],
    +	["punctuation", "("], ["builtin", "string?"], ["punctuation", ")"],
    +	["punctuation", "("], ["builtin", "vector?"], ["punctuation", ")"],
    +	["punctuation", "("], ["builtin", "symbol?"], ["punctuation", ")"],
    +	["punctuation", "("], ["builtin", "bytevector?"], ["punctuation", ")"],
    +	["punctuation", "("], ["builtin", "list"], ["punctuation", ")"],
    +	["punctuation", "("], ["builtin", "call-with-current-continuation"], ["punctuation", ")"],
    +	["punctuation", "("], ["builtin", "call/cc"], ["punctuation", ")"],
    +	["punctuation", "("], ["builtin", "append"], ["punctuation", ")"],
    +	["punctuation", "("], ["builtin", "abs"], ["punctuation", ")"],
    +	["punctuation", "("], ["builtin", "apply"], ["punctuation", ")"],
    +	["punctuation", "("], ["builtin", "eval"], ["punctuation", ")"]
     ]
     
     ----------------------------------------------------
     
    -Checks for builtins.
    \ No newline at end of file
    +Checks for builtins.
    diff --git a/tests/languages/scheme/character_feature.test b/tests/languages/scheme/character_feature.test
    new file mode 100644
    index 0000000000..14e40cdbde
    --- /dev/null
    +++ b/tests/languages/scheme/character_feature.test
    @@ -0,0 +1,19 @@
    +#\a
    +#\space
    +#\u0041
    +#\λ
    +#\)
    +
    +----------------------------------------------------
    +
    +[
    +	["character", "#\\a"],
    +	["character", "#\\space"],
    +	["character", "#\\u0041"],
    +	["character", "#\\λ"],
    +	["character", "#\\)"]
    +]
    +
    +----------------------------------------------------
    +
    +Checks for character literals.
    diff --git a/tests/languages/scheme/function_feature.test b/tests/languages/scheme/function_feature.test
    index 4d8807c78d..f7c6547b58 100644
    --- a/tests/languages/scheme/function_feature.test
    +++ b/tests/languages/scheme/function_feature.test
    @@ -3,6 +3,7 @@
     (exact? 2)
     (inexact->exact 3)
     (!fact)
    +(defined foo)
     
     ----------------------------------------------------
     
    @@ -11,7 +12,8 @@
     	["punctuation", "("], ["function", "flmin"], ["number", "2"], ["number", "3"], ["punctuation", ")"],
     	["punctuation", "("], ["function", "exact?"], ["number", "2"], ["punctuation", ")"],
     	["punctuation", "("], ["function", "inexact->exact"], ["number", "3"], ["punctuation", ")"],
    -	["punctuation", "("], ["function", "!fact"], ["punctuation", ")"]
    +	["punctuation", "("], ["function", "!fact"], ["punctuation", ")"],
    +	["punctuation", "("], ["function", "defined"], " foo", ["punctuation", ")"]
     ]
     
     ----------------------------------------------------
    diff --git a/tests/languages/scheme/issue1331.test b/tests/languages/scheme/issue1331.test
    index ddbfff5de8..b8026d9328 100644
    --- a/tests/languages/scheme/issue1331.test
    +++ b/tests/languages/scheme/issue1331.test
    @@ -4,9 +4,9 @@
     
     [
     	["punctuation", "("], ["builtin", "pair?"],
    -	["string", "'"], ["punctuation", "("], ["number", "1"], ["number", "2"], ["punctuation", ")"], ["punctuation", ")"]
    +	["punctuation", "'"], ["punctuation", "("], ["number", "1"], ["number", "2"], ["punctuation", ")"], ["punctuation", ")"]
     ]
     
     ----------------------------------------------------
     
    -Tests that first number of a list is not highlighted as a function. See #1331
    \ No newline at end of file
    +Tests that first number of a list is not highlighted as a function. See #1331
    diff --git a/tests/languages/scheme/keyword_feature.test b/tests/languages/scheme/keyword_feature.test
    index 534d8a0b0e..1abc8282a7 100644
    --- a/tests/languages/scheme/keyword_feature.test
    +++ b/tests/languages/scheme/keyword_feature.test
    @@ -1,57 +1,57 @@
    -(define
    -(define-syntax
    -(define-library
    -(define-values
    -(case-lambda
    -(lambda
    -(let
    -(let*
    -(letrec
    -(let-values
    -(let*-values
    -(letrec-values
    -(else
    -(if
    -(cond
    -(begin
    -(delay
    -(delay-force
    -(parameterize
    -(guard
    -(set!
    -(quasi-quote
    -(quote
    -(syntax-rules
    +(define)
    +(define-syntax)
    +(define-library)
    +(define-values)
    +(case-lambda)
    +(lambda)
    +(let)
    +(let*)
    +(letrec)
    +(let-values)
    +(let*-values)
    +(letrec-values)
    +(else)
    +(if)
    +(cond)
    +(begin)
    +(delay)
    +(delay-force)
    +(parameterize)
    +(guard)
    +(set!)
    +(quasi-quote)
    +(quote)
    +(syntax-rules)
     
     ----------------------------------------------------
     
     [
    -	["punctuation", "("], ["keyword", "define"],
    -	["punctuation", "("], ["keyword", "define-syntax"],
    -	["punctuation", "("], ["keyword", "define-library"],
    -	["punctuation", "("], ["keyword", "define-values"],
    -	["punctuation", "("], ["keyword", "case-lambda"],
    -	["punctuation", "("], ["keyword", "lambda"],
    -	["punctuation", "("], ["keyword", "let"],
    -	["punctuation", "("], ["keyword", "let*"],
    -	["punctuation", "("], ["keyword", "letrec"],
    -	["punctuation", "("], ["keyword", "let-values"],
    -	["punctuation", "("], ["keyword", "let*-values"],
    -	["punctuation", "("], ["keyword", "letrec-values"],
    -	["punctuation", "("], ["keyword", "else"],
    -	["punctuation", "("], ["keyword", "if"],
    -	["punctuation", "("], ["keyword", "cond"],
    -	["punctuation", "("], ["keyword", "begin"],
    -	["punctuation", "("], ["keyword", "delay"],
    -	["punctuation", "("], ["keyword", "delay-force"],
    -	["punctuation", "("], ["keyword", "parameterize"],
    -	["punctuation", "("], ["keyword", "guard"],
    -	["punctuation", "("], ["keyword", "set!"],
    -	["punctuation", "("], ["keyword", "quasi-quote"],
    -	["punctuation", "("], ["keyword", "quote"],
    -	["punctuation", "("], ["keyword", "syntax-rules"]
    +	["punctuation", "("], ["keyword", "define"], ["punctuation", ")"],
    +	["punctuation", "("], ["keyword", "define-syntax"], ["punctuation", ")"],
    +	["punctuation", "("], ["keyword", "define-library"], ["punctuation", ")"],
    +	["punctuation", "("], ["keyword", "define-values"], ["punctuation", ")"],
    +	["punctuation", "("], ["keyword", "case-lambda"], ["punctuation", ")"],
    +	["punctuation", "("], ["keyword", "lambda"], ["punctuation", ")"],
    +	["punctuation", "("], ["keyword", "let"], ["punctuation", ")"],
    +	["punctuation", "("], ["keyword", "let*"], ["punctuation", ")"],
    +	["punctuation", "("], ["keyword", "letrec"], ["punctuation", ")"],
    +	["punctuation", "("], ["keyword", "let-values"], ["punctuation", ")"],
    +	["punctuation", "("], ["keyword", "let*-values"], ["punctuation", ")"],
    +	["punctuation", "("], ["keyword", "letrec-values"], ["punctuation", ")"],
    +	["punctuation", "("], ["keyword", "else"], ["punctuation", ")"],
    +	["punctuation", "("], ["keyword", "if"], ["punctuation", ")"],
    +	["punctuation", "("], ["keyword", "cond"], ["punctuation", ")"],
    +	["punctuation", "("], ["keyword", "begin"], ["punctuation", ")"],
    +	["punctuation", "("], ["keyword", "delay"], ["punctuation", ")"],
    +	["punctuation", "("], ["keyword", "delay-force"], ["punctuation", ")"],
    +	["punctuation", "("], ["keyword", "parameterize"], ["punctuation", ")"],
    +	["punctuation", "("], ["keyword", "guard"], ["punctuation", ")"],
    +	["punctuation", "("], ["keyword", "set!"], ["punctuation", ")"],
    +	["punctuation", "("], ["keyword", "quasi-quote"], ["punctuation", ")"],
    +	["punctuation", "("], ["keyword", "quote"], ["punctuation", ")"],
    +	["punctuation", "("], ["keyword", "syntax-rules"], ["punctuation", ")"]
     ]
     
     ----------------------------------------------------
     
    -Checks for keywords.
    \ No newline at end of file
    +Checks for keywords.
    diff --git a/tests/languages/scheme/string_feature.test b/tests/languages/scheme/string_feature.test
    index a1f2a9770a..736942437f 100644
    --- a/tests/languages/scheme/string_feature.test
    +++ b/tests/languages/scheme/string_feature.test
    @@ -1,15 +1,17 @@
     ""
     "fo\"obar"
     'turkey
    +(define a 'foo)
     
     ----------------------------------------------------
     
     [
     	["string", "\"\""],
     	["string", "\"fo\\\"obar\""],
    -	["string", "'turkey"]
    +	["string", "'turkey"],
    +	["punctuation", "("], ["keyword", "define"], " a ", ["string","'foo"], ["punctuation",")"]
     ]
     
     ----------------------------------------------------
     
    -Checks for strings and symbols.
    \ No newline at end of file
    +Checks for strings and symbols.
    
    From 2288c25ee441da15d30b3f587c1ade0a35d6ee28 Mon Sep 17 00:00:00 2001
    From: Michael Schmidt 
    Date: Sat, 1 Dec 2018 18:37:20 +0100
    Subject: [PATCH 0099/1100] Add G-code language (#1572)
    
    This PR adds the [G-code language](https://reprap.org/wiki/G-code) to Prism
    and resolves #1571.
    
    ### Features
    
    - All fields from A-Z ([case sensitive](https://reprap.org/wiki/G-code#Case_sensitivity)) and [checksums](https://reprap.org/wiki/G-code#.2A:_Checksum) (`*`).
    - [Comments](https://reprap.org/wiki/G-code#Comments) of both the semicolon and parenthesis style.
    - [Quoted strings](https://reprap.org/wiki/G-code#Quoted_strings).
    - The colon punctuation of [lists (see the example)](https://reprap.org/wiki/G-code#M584:_Set_drive_mapping).
    ---
     components.js                                 |  2 +-
     components.json                               |  4 ++++
     components/prism-gcode.js                     | 15 ++++++++++++
     components/prism-gcode.min.js                 |  1 +
     examples/prism-gcode.html                     | 22 ++++++++++++++++++
     plugins/show-language/prism-show-language.js  |  2 +-
     .../show-language/prism-show-language.min.js  |  2 +-
     tests/languages/gcode/checksum_feature.test   | 12 ++++++++++
     tests/languages/gcode/comment_feature.test    | 20 ++++++++++++++++
     tests/languages/gcode/keyword_feature.test    | 23 +++++++++++++++++++
     tests/languages/gcode/property_feature.test   | 17 ++++++++++++++
     tests/languages/gcode/string_feature.test     | 17 ++++++++++++++
     12 files changed, 134 insertions(+), 3 deletions(-)
     create mode 100644 components/prism-gcode.js
     create mode 100644 components/prism-gcode.min.js
     create mode 100644 examples/prism-gcode.html
     create mode 100644 tests/languages/gcode/checksum_feature.test
     create mode 100644 tests/languages/gcode/comment_feature.test
     create mode 100644 tests/languages/gcode/keyword_feature.test
     create mode 100644 tests/languages/gcode/property_feature.test
     create mode 100644 tests/languages/gcode/string_feature.test
    
    diff --git a/components.js b/components.js
    index 9267a47afc..e4be7ddf87 100644
    --- a/components.js
    +++ b/components.js
    @@ -1,2 +1,2 @@
    -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default","peerDependencies":"markup"},"clike":{"title":"C-like","option":"default","overrideExampleHeader":true},"javascript":{"title":"JavaScript","require":"clike","peerDependencies":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"actionscript":{"title":"ActionScript","require":"javascript","peerDependencies":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":"dotnet","owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","owner":"R-osey"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup","peerDependencies":["css","javascript"],"alias":"jinja2","owner":"romanvm"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","peerDependencies":["css","coffeescript","erb","javascript","less","markdown","ruby","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"http":{"title":"HTTP","peerDependencies":["javascript","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"json":{"title":"JSON","alias":"jsonp","aliasTitles":{"jsonp":"JSONP"},"owner":"CupOfTea696"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","owner":"japborst"},"less":{"title":"Less","require":"css","owner":"Golmote"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"n4js":{"title":"N4JS","require":"javascript","alias":"n4jsd","owner":"bsmith-n4"},"nasm":{"title":"NASM","owner":"rbmj"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"cpp","peerDependencies":["c","cpp"],"overrideExampleHeader":true,"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"php-extras":{"title":"PHP Extras","require":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":"javascript","peerDependencies":["coffeescript","ejs","handlebars","hogan","less","livescript","markdown","mustache","plates","scss","stylus","swig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","peerDependencies":["c","cpp","fortran","ats","dsp"],"owner":"Golmote"},"python":{"title":"Python","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"ruby":{"title":"Ruby","require":"clike","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sql":{"title":"SQL","owner":"multipetros"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","peerDependencies":"css","owner":"Golmote"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","alias":"ts","owner":"vkbansal"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","owner":"hason"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":"Line Highlight","line-numbers":{"title":"Line Numbers","owner":"kuba-kubula"},"show-invisibles":"Show Invisibles","autolinker":"Autolinker","wpd":"WebPlatform Docs","custom-class":{"title":"Custom Class","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","noCSS":true},"show-language":{"title":"Show Language","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","owner":"Golmote","noCSS":true},"previewers":{"title":"Previewers","owner":"Golmote"},"autoloader":{"title":"Autoloader","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","owner":"Golmote","after":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","owner":"chriswells0"},"unescaped-markup":"Unescaped Markup","normalize-whitespace":{"title":"Normalize Whitespace","owner":"zeitgeist87","after":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","owner":"mAAdhaTTah","require":"toolbar","noCSS":true}}};
    +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default","peerDependencies":"markup"},"clike":{"title":"C-like","option":"default","overrideExampleHeader":true},"javascript":{"title":"JavaScript","require":"clike","peerDependencies":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"actionscript":{"title":"ActionScript","require":"javascript","peerDependencies":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":"dotnet","owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","owner":"R-osey"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup","peerDependencies":["css","javascript"],"alias":"jinja2","owner":"romanvm"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","peerDependencies":["css","coffeescript","erb","javascript","less","markdown","ruby","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"http":{"title":"HTTP","peerDependencies":["javascript","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"json":{"title":"JSON","alias":"jsonp","aliasTitles":{"jsonp":"JSONP"},"owner":"CupOfTea696"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","owner":"japborst"},"less":{"title":"Less","require":"css","owner":"Golmote"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"n4js":{"title":"N4JS","require":"javascript","alias":"n4jsd","owner":"bsmith-n4"},"nasm":{"title":"NASM","owner":"rbmj"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"cpp","peerDependencies":["c","cpp"],"overrideExampleHeader":true,"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"php-extras":{"title":"PHP Extras","require":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":"javascript","peerDependencies":["coffeescript","ejs","handlebars","hogan","less","livescript","markdown","mustache","plates","scss","stylus","swig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","peerDependencies":["c","cpp","fortran","ats","dsp"],"owner":"Golmote"},"python":{"title":"Python","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"ruby":{"title":"Ruby","require":"clike","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sql":{"title":"SQL","owner":"multipetros"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","peerDependencies":"css","owner":"Golmote"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","alias":"ts","owner":"vkbansal"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","owner":"hason"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":"Line Highlight","line-numbers":{"title":"Line Numbers","owner":"kuba-kubula"},"show-invisibles":"Show Invisibles","autolinker":"Autolinker","wpd":"WebPlatform Docs","custom-class":{"title":"Custom Class","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","noCSS":true},"show-language":{"title":"Show Language","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","owner":"Golmote","noCSS":true},"previewers":{"title":"Previewers","owner":"Golmote"},"autoloader":{"title":"Autoloader","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","owner":"Golmote","after":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","owner":"chriswells0"},"unescaped-markup":"Unescaped Markup","normalize-whitespace":{"title":"Normalize Whitespace","owner":"zeitgeist87","after":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","owner":"mAAdhaTTah","require":"toolbar","noCSS":true}}};
     if (typeof module !== 'undefined' && module.exports) { module.exports = components; }
    \ No newline at end of file
    diff --git a/components.json b/components.json
    index 68b66101fd..4120315a2d 100644
    --- a/components.json
    +++ b/components.json
    @@ -266,6 +266,10 @@
     			"title": "Fortran",
     			"owner": "Golmote"
     		},
    +		"gcode": {
    +			"title": "G-code",
    +			"owner": "RunDevelopment"
    +		},
     		"gedcom": {
     			"title": "GEDCOM",
     			"owner": "Golmote"
    diff --git a/components/prism-gcode.js b/components/prism-gcode.js
    new file mode 100644
    index 0000000000..d093878720
    --- /dev/null
    +++ b/components/prism-gcode.js
    @@ -0,0 +1,15 @@
    +Prism.languages.gcode = {
    +	'comment': /;.*|\B\(.*?\)\B/,
    +	'string': {
    +		pattern: /"(?:""|[^"])*"/,
    +		greedy: true
    +	},
    +	'keyword': /\b[GM]\d+(?:\.\d+)?\b/,
    +	'property': /\b[A-Z]/,
    +	'checksum': {
    +		pattern: /\*\d+/,
    +		alias: 'punctuation'
    +	},
    +	// T0:0:0
    +	'punctuation': /:/
    +};
    diff --git a/components/prism-gcode.min.js b/components/prism-gcode.min.js
    new file mode 100644
    index 0000000000..85e2c52826
    --- /dev/null
    +++ b/components/prism-gcode.min.js
    @@ -0,0 +1 @@
    +Prism.languages.gcode={comment:/;.*|\B\(.*?\)\B/,string:{pattern:/"(?:""|[^"])*"/,greedy:!0},keyword:/\b[GM]\d+(?:\.\d+)?\b/,property:/\b[A-Z]/,checksum:{pattern:/\*\d+/,alias:"punctuation"},punctuation:/:/};
    \ No newline at end of file
    diff --git a/examples/prism-gcode.html b/examples/prism-gcode.html
    new file mode 100644
    index 0000000000..ebc1561569
    --- /dev/null
    +++ b/examples/prism-gcode.html
    @@ -0,0 +1,22 @@
    +

    Comments

    +
    ; comment
    +(some more comments)
    +G28 (even in here) X0
    +
    + +

    Quoted strings

    +
    "foo""bar"
    + +

    Full example

    +
    M190 S60 ; Heat bed to 60°C
    +G21 ; Set units to millimeters
    +G28 ; Move to Origin (Homing)
    +G29 ; Auto Bed Leveling
    +G28 X0 Y0 ; Home X and Y to min endstops
    +M107 ; Fan off
    +M109 S200 ; Heat hotend to 200°C
    +G92 E0 ; Set current extruder position as zero
    +G1 F200 E15 ; Extrude 15mm filament with 200mm/min
    +G92 E0 ; Set current extruder position as zero
    +G1 F500
    +
    diff --git a/plugins/show-language/prism-show-language.js b/plugins/show-language/prism-show-language.js index d5957cb255..b1798c559a 100644 --- a/plugins/show-language/prism-show-language.js +++ b/plugins/show-language/prism-show-language.js @@ -11,7 +11,7 @@ if (!Prism.plugins.toolbar) { } // The languages map is built automatically with gulp -var Languages = /*languages_placeholder[*/{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","css":"CSS","clike":"C-like","javascript":"JavaScript","abap":"ABAP","actionscript":"ActionScript","apacheconf":"Apache Configuration","apl":"APL","applescript":"AppleScript","arff":"ARFF","asciidoc":"AsciiDoc","asm6502":"6502 Assembly","aspnet":"ASP.NET (C#)","autohotkey":"AutoHotkey","autoit":"AutoIt","shell":"Shell","basic":"BASIC","csharp":"C#","cpp":"C++","cil":"CIL","coffeescript":"CoffeeScript","csp":"Content-Security-Policy","css-extras":"CSS Extras","django":"Django/Jinja2","erb":"ERB","fsharp":"F#","gedcom":"GEDCOM","glsl":"GLSL","gml":"GameMaker Language","graphql":"GraphQL","http":"HTTP","hpkp":"HTTP Public-Key-Pins","hsts":"HTTP Strict-Transport-Security","ichigojam":"IchigoJam","inform7":"Inform 7","json":"JSON","jsonp":"JSONP","latex":"LaTeX","livescript":"LiveScript","lolcode":"LOLCODE","markup-templating":"Markup templating","matlab":"MATLAB","mel":"MEL","n4js":"N4JS","nasm":"NASM","nginx":"nginx","nsis":"NSIS","objectivec":"Objective-C","ocaml":"OCaml","opencl":"OpenCL","parigp":"PARI/GP","objectpascal":"Object Pascal","php":"PHP","php-extras":"PHP Extras","plsql":"PL/SQL","powershell":"PowerShell","properties":".properties","protobuf":"Protocol Buffers","q":"Q (kdb+ database)","jsx":"React JSX","tsx":"React TSX","renpy":"Ren'py","rest":"reST (reStructuredText)","sas":"SAS","sass":"Sass (Sass)","scss":"Sass (Scss)","sql":"SQL","soy":"Soy (Closure Template)","tap":"TAP","tt2":"Template Toolkit 2","typescript":"TypeScript","vbnet":"VB.Net","vhdl":"VHDL","vim":"vim","visual-basic":"Visual Basic","wasm":"WebAssembly","wiki":"Wiki markup","xeoracube":"XeoraCube","xojo":"Xojo (REALbasic)","xquery":"XQuery","yaml":"YAML"}/*]*/; +var Languages = /*languages_placeholder[*/{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","css":"CSS","clike":"C-like","javascript":"JavaScript","abap":"ABAP","actionscript":"ActionScript","apacheconf":"Apache Configuration","apl":"APL","applescript":"AppleScript","arff":"ARFF","asciidoc":"AsciiDoc","asm6502":"6502 Assembly","aspnet":"ASP.NET (C#)","autohotkey":"AutoHotkey","autoit":"AutoIt","shell":"Shell","basic":"BASIC","csharp":"C#","cpp":"C++","cil":"CIL","coffeescript":"CoffeeScript","csp":"Content-Security-Policy","css-extras":"CSS Extras","django":"Django/Jinja2","erb":"ERB","fsharp":"F#","gcode":"G-code","gedcom":"GEDCOM","glsl":"GLSL","gml":"GameMaker Language","graphql":"GraphQL","http":"HTTP","hpkp":"HTTP Public-Key-Pins","hsts":"HTTP Strict-Transport-Security","ichigojam":"IchigoJam","inform7":"Inform 7","json":"JSON","jsonp":"JSONP","latex":"LaTeX","livescript":"LiveScript","lolcode":"LOLCODE","markup-templating":"Markup templating","matlab":"MATLAB","mel":"MEL","n4js":"N4JS","nasm":"NASM","nginx":"nginx","nsis":"NSIS","objectivec":"Objective-C","ocaml":"OCaml","opencl":"OpenCL","parigp":"PARI/GP","objectpascal":"Object Pascal","php":"PHP","php-extras":"PHP Extras","plsql":"PL/SQL","powershell":"PowerShell","properties":".properties","protobuf":"Protocol Buffers","q":"Q (kdb+ database)","jsx":"React JSX","tsx":"React TSX","renpy":"Ren'py","rest":"reST (reStructuredText)","sas":"SAS","sass":"Sass (Sass)","scss":"Sass (Scss)","sql":"SQL","soy":"Soy (Closure Template)","tap":"TAP","tt2":"Template Toolkit 2","typescript":"TypeScript","vbnet":"VB.Net","vhdl":"VHDL","vim":"vim","visual-basic":"Visual Basic","wasm":"WebAssembly","wiki":"Wiki markup","xeoracube":"XeoraCube","xojo":"Xojo (REALbasic)","xquery":"XQuery","yaml":"YAML"}/*]*/; Prism.plugins.toolbar.registerButton('show-language', function(env) { var pre = env.element.parentNode; if (!pre || !/pre/i.test(pre.nodeName)) { diff --git a/plugins/show-language/prism-show-language.min.js b/plugins/show-language/prism-show-language.min.js index 5c043c8b47..e930afc1c5 100644 --- a/plugins/show-language/prism-show-language.min.js +++ b/plugins/show-language/prism-show-language.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof self&&self.Prism&&self.document){if(!Prism.plugins.toolbar)return console.warn("Show Languages plugin loaded before Toolbar plugin."),void 0;var e={html:"HTML",xml:"XML",svg:"SVG",mathml:"MathML",css:"CSS",clike:"C-like",javascript:"JavaScript",abap:"ABAP",actionscript:"ActionScript",apacheconf:"Apache Configuration",apl:"APL",applescript:"AppleScript",arff:"ARFF",asciidoc:"AsciiDoc",asm6502:"6502 Assembly",aspnet:"ASP.NET (C#)",autohotkey:"AutoHotkey",autoit:"AutoIt",shell:"Shell",basic:"BASIC",csharp:"C#",cpp:"C++",cil:"CIL",coffeescript:"CoffeeScript",csp:"Content-Security-Policy","css-extras":"CSS Extras",django:"Django/Jinja2",erb:"ERB",fsharp:"F#",gedcom:"GEDCOM",glsl:"GLSL",gml:"GameMaker Language",graphql:"GraphQL",http:"HTTP",hpkp:"HTTP Public-Key-Pins",hsts:"HTTP Strict-Transport-Security",ichigojam:"IchigoJam",inform7:"Inform 7",json:"JSON",jsonp:"JSONP",latex:"LaTeX",livescript:"LiveScript",lolcode:"LOLCODE","markup-templating":"Markup templating",matlab:"MATLAB",mel:"MEL",n4js:"N4JS",nasm:"NASM",nginx:"nginx",nsis:"NSIS",objectivec:"Objective-C",ocaml:"OCaml",opencl:"OpenCL",parigp:"PARI/GP",objectpascal:"Object Pascal",php:"PHP","php-extras":"PHP Extras",plsql:"PL/SQL",powershell:"PowerShell",properties:".properties",protobuf:"Protocol Buffers",q:"Q (kdb+ database)",jsx:"React JSX",tsx:"React TSX",renpy:"Ren'py",rest:"reST (reStructuredText)",sas:"SAS",sass:"Sass (Sass)",scss:"Sass (Scss)",sql:"SQL",soy:"Soy (Closure Template)",tap:"TAP",tt2:"Template Toolkit 2",typescript:"TypeScript",vbnet:"VB.Net",vhdl:"VHDL",vim:"vim","visual-basic":"Visual Basic",wasm:"WebAssembly",wiki:"Wiki markup",xeoracube:"XeoraCube",xojo:"Xojo (REALbasic)",xquery:"XQuery",yaml:"YAML"};Prism.plugins.toolbar.registerButton("show-language",function(a){var t=a.element.parentNode;if(t&&/pre/i.test(t.nodeName)){var s=t.getAttribute("data-language")||e[a.language]||a.language&&a.language.substring(0,1).toUpperCase()+a.language.substring(1);if(s){var i=document.createElement("span");return i.textContent=s,i}}})}}(); \ No newline at end of file +!function(){if("undefined"!=typeof self&&self.Prism&&self.document){if(!Prism.plugins.toolbar)return console.warn("Show Languages plugin loaded before Toolbar plugin."),void 0;var e={html:"HTML",xml:"XML",svg:"SVG",mathml:"MathML",css:"CSS",clike:"C-like",javascript:"JavaScript",abap:"ABAP",actionscript:"ActionScript",apacheconf:"Apache Configuration",apl:"APL",applescript:"AppleScript",arff:"ARFF",asciidoc:"AsciiDoc",asm6502:"6502 Assembly",aspnet:"ASP.NET (C#)",autohotkey:"AutoHotkey",autoit:"AutoIt",shell:"Shell",basic:"BASIC",csharp:"C#",cpp:"C++",cil:"CIL",coffeescript:"CoffeeScript",csp:"Content-Security-Policy","css-extras":"CSS Extras",django:"Django/Jinja2",erb:"ERB",fsharp:"F#",gcode:"G-code",gedcom:"GEDCOM",glsl:"GLSL",gml:"GameMaker Language",graphql:"GraphQL",http:"HTTP",hpkp:"HTTP Public-Key-Pins",hsts:"HTTP Strict-Transport-Security",ichigojam:"IchigoJam",inform7:"Inform 7",json:"JSON",jsonp:"JSONP",latex:"LaTeX",livescript:"LiveScript",lolcode:"LOLCODE","markup-templating":"Markup templating",matlab:"MATLAB",mel:"MEL",n4js:"N4JS",nasm:"NASM",nginx:"nginx",nsis:"NSIS",objectivec:"Objective-C",ocaml:"OCaml",opencl:"OpenCL",parigp:"PARI/GP",objectpascal:"Object Pascal",php:"PHP","php-extras":"PHP Extras",plsql:"PL/SQL",powershell:"PowerShell",properties:".properties",protobuf:"Protocol Buffers",q:"Q (kdb+ database)",jsx:"React JSX",tsx:"React TSX",renpy:"Ren'py",rest:"reST (reStructuredText)",sas:"SAS",sass:"Sass (Sass)",scss:"Sass (Scss)",sql:"SQL",soy:"Soy (Closure Template)",tap:"TAP",tt2:"Template Toolkit 2",typescript:"TypeScript",vbnet:"VB.Net",vhdl:"VHDL",vim:"vim","visual-basic":"Visual Basic",wasm:"WebAssembly",wiki:"Wiki markup",xeoracube:"XeoraCube",xojo:"Xojo (REALbasic)",xquery:"XQuery",yaml:"YAML"};Prism.plugins.toolbar.registerButton("show-language",function(a){var t=a.element.parentNode;if(t&&/pre/i.test(t.nodeName)){var s=t.getAttribute("data-language")||e[a.language]||a.language&&a.language.substring(0,1).toUpperCase()+a.language.substring(1);if(s){var i=document.createElement("span");return i.textContent=s,i}}})}}(); \ No newline at end of file diff --git a/tests/languages/gcode/checksum_feature.test b/tests/languages/gcode/checksum_feature.test new file mode 100644 index 0000000000..d3ea45613a --- /dev/null +++ b/tests/languages/gcode/checksum_feature.test @@ -0,0 +1,12 @@ +G28*22 + +---------------------------------------------------- + +[ + ["keyword", "G28"], + ["checksum", "*22"] +] + +---------------------------------------------------- + +Checks for checksums. diff --git a/tests/languages/gcode/comment_feature.test b/tests/languages/gcode/comment_feature.test new file mode 100644 index 0000000000..cb2533f895 --- /dev/null +++ b/tests/languages/gcode/comment_feature.test @@ -0,0 +1,20 @@ +; foo +(Home some axes) +G28 (here come the axes to be homed) X + +---------------------------------------------------- + +[ + ["comment", "; foo"], + + ["comment", "(Home some axes)"], + + ["keyword", "G28"], + ["comment", "(here come the axes to be homed)"], + ["property", "X"] + +] + +---------------------------------------------------- + +Checks for comments. diff --git a/tests/languages/gcode/keyword_feature.test b/tests/languages/gcode/keyword_feature.test new file mode 100644 index 0000000000..d72d0760b2 --- /dev/null +++ b/tests/languages/gcode/keyword_feature.test @@ -0,0 +1,23 @@ +G00 +G200 +G84.1 + +M00 +M123 +M52.4 + +---------------------------------------------------- + +[ + ["keyword", "G00"], + ["keyword", "G200"], + ["keyword", "G84.1"], + + ["keyword", "M00"], + ["keyword", "M123"], + ["keyword", "M52.4"] +] + +---------------------------------------------------- + +Checks for G- and M-codes. diff --git a/tests/languages/gcode/property_feature.test b/tests/languages/gcode/property_feature.test new file mode 100644 index 0000000000..9dee88682d --- /dev/null +++ b/tests/languages/gcode/property_feature.test @@ -0,0 +1,17 @@ +X123 +Y0.2 +Z-3.1415 +E420:420 + +---------------------------------------------------- + +[ + ["property", "X"], "123\n", + ["property", "Y"], "0.2\n", + ["property", "Z"], "-3.1415\n", + ["property", "E"], "420", ["punctuation", ":"], "420" +] + +---------------------------------------------------- + +Checks for all other codes except G- and M-codes. diff --git a/tests/languages/gcode/string_feature.test b/tests/languages/gcode/string_feature.test new file mode 100644 index 0000000000..d05306d7db --- /dev/null +++ b/tests/languages/gcode/string_feature.test @@ -0,0 +1,17 @@ +M587 S"MYROUTER" P"ABCxyz;"" 123" + +---------------------------------------------------- + +[ + ["keyword", "M587"], + + ["property", "S"], + ["string", "\"MYROUTER\""], + + ["property", "P"], + ["string", "\"ABCxyz;\"\" 123\""] +] + +---------------------------------------------------- + +Checks for strings. From 1b75da90769789fcdf8182a07788fdf1fafc8f9c Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Sat, 1 Dec 2018 18:46:55 +0100 Subject: [PATCH 0100/1100] Improved HTTP content highlighting (#1598) Extends the content highlighting capabilities of HTTP. 1. Add support for `application/javascript` and `text/css` content types. 2. Change the languages associated with certain types: 1. `application/json` now uses `json` with `javascript` as a backup instead of just `javascript`. 2. All XML types now use `Prism.languages.xml` instead of `markup`. 3. The HTML type now uses `html` instead of `markup`. 3. Add support for highlighting based on [suffixes](https://en.wikipedia.org/wiki/Media_type#Suffix) for XML and JSON. E.g. `image/svg+xml`, `application/xhtml+xml`, `application/atom+xml` will use `xml` and `application/calendar+json` will use `json`. 4. Stylistic changes: 1. Fix indentation. 2. Use single quotes for token names. --- components/prism-http.js | 119 +++++++++++------- components/prism-http.min.js | 2 +- tests/languages/css+http/css_inclusion.test | 25 ++++ .../javascript+http/javascript_inclusion.test | 20 +-- .../json+http/json-suffix_inclusion.test | 21 ++++ tests/languages/json+http/json_inclusion.test | 21 ++++ .../languages/markup+http/html_inclusion.test | 30 +++++ .../markup+http/xml-suffix_inclusion.test | 30 +++++ ...rkup_inclusion.test => xml_inclusion.test} | 12 +- 9 files changed, 218 insertions(+), 62 deletions(-) create mode 100644 tests/languages/css+http/css_inclusion.test create mode 100644 tests/languages/json+http/json-suffix_inclusion.test create mode 100644 tests/languages/json+http/json_inclusion.test create mode 100644 tests/languages/markup+http/html_inclusion.test create mode 100644 tests/languages/markup+http/xml-suffix_inclusion.test rename tests/languages/markup+http/{markup_inclusion.test => xml_inclusion.test} (63%) diff --git a/components/prism-http.js b/components/prism-http.js index 306bcd8c5d..6c3e20106f 100644 --- a/components/prism-http.js +++ b/components/prism-http.js @@ -1,50 +1,79 @@ -Prism.languages.http = { - 'request-line': { - pattern: /^(?:POST|GET|PUT|DELETE|OPTIONS|PATCH|TRACE|CONNECT)\s(?:https?:\/\/|\/)\S+\sHTTP\/[0-9.]+/m, - inside: { - // HTTP Verb - property: /^(?:POST|GET|PUT|DELETE|OPTIONS|PATCH|TRACE|CONNECT)\b/, - // Path or query argument - 'attr-name': /:\w+/ - } - }, - 'response-status': { - pattern: /^HTTP\/1.[01] \d+.*/m, - inside: { - // Status, e.g. 200 OK - property: { - pattern: /(^HTTP\/1.[01] )\d+.*/i, - lookbehind: true - } +(function (Prism) { + Prism.languages.http = { + 'request-line': { + pattern: /^(?:POST|GET|PUT|DELETE|OPTIONS|PATCH|TRACE|CONNECT)\s(?:https?:\/\/|\/)\S+\sHTTP\/[0-9.]+/m, + inside: { + // HTTP Verb + 'property': /^(?:POST|GET|PUT|DELETE|OPTIONS|PATCH|TRACE|CONNECT)\b/, + // Path or query argument + 'attr-name': /:\w+/ + } + }, + 'response-status': { + pattern: /^HTTP\/1.[01] \d+.*/m, + inside: { + // Status, e.g. 200 OK + 'property': { + pattern: /(^HTTP\/1.[01] )\d+.*/i, + lookbehind: true + } + } + }, + // HTTP header name + 'header-name': { + pattern: /^[\w-]+:(?=.)/m, + alias: 'keyword' } - }, - // HTTP header name - 'header-name': { - pattern: /^[\w-]+:(?=.)/m, - alias: 'keyword' - } -}; + }; -// Create a mapping of Content-Type headers to language definitions -var httpLanguages = { - 'application/json': Prism.languages.javascript, - 'application/xml': Prism.languages.markup, - 'text/xml': Prism.languages.markup, - 'text/html': Prism.languages.markup -}; + // Create a mapping of Content-Type headers to language definitions + var langs = Prism.languages; + var httpLanguages = { + 'application/javascript': langs.javascript, + 'application/json': langs.json || langs.javascript, + 'application/xml': langs.xml, + 'text/xml': langs.xml, + 'text/html': langs.html, + 'text/css': langs.css + }; -// Insert each content type parser that has its associated language -// currently loaded. -for (var contentType in httpLanguages) { - if (httpLanguages[contentType]) { - var options = {}; - options[contentType] = { - pattern: RegExp('(content-type:\\s*' + contentType + '[\\w\\W]*?)(?:\\r?\\n|\\r){2}[\\w\\W]*', 'i'), - lookbehind: true, - inside: { - rest: httpLanguages[contentType] - } - }; + // Declare which types can also be suffixes + var suffixTypes = { + 'application/json': true, + 'application/xml': true + }; + + /** + * Returns a pattern for the given content type which matches it and any type which has it as a suffix. + * + * @param {string} contentType + * @returns {string} + */ + function getSuffixPattern(contentType) { + var suffix = contentType.replace(/^[a-z]+\//, ''); + var suffixPattern = '\\w+/(?:[\\w.-]+\\+)+' + suffix + '(?![+\\w.-])'; + return '(?:' + contentType + '|' + suffixPattern + ')'; + } + + // Insert each content type parser that has its associated language + // currently loaded. + var options; + for (var contentType in httpLanguages) { + if (httpLanguages[contentType]) { + options = options || {}; + + var pattern = suffixTypes[contentType] ? getSuffixPattern(contentType) : contentType; + options[contentType] = { + pattern: RegExp('(content-type:\\s*' + pattern + '[\\s\\S]*?)(?:\\r?\\n|\\r){2}[\\s\\S]*', 'i'), + lookbehind: true, + inside: { + rest: httpLanguages[contentType] + } + }; + } + } + if (options) { Prism.languages.insertBefore('http', 'header-name', options); } -} + +}(Prism)); diff --git a/components/prism-http.min.js b/components/prism-http.min.js index 8b2c7eed07..0e4efcc26a 100644 --- a/components/prism-http.min.js +++ b/components/prism-http.min.js @@ -1 +1 @@ -Prism.languages.http={"request-line":{pattern:/^(?:POST|GET|PUT|DELETE|OPTIONS|PATCH|TRACE|CONNECT)\s(?:https?:\/\/|\/)\S+\sHTTP\/[0-9.]+/m,inside:{property:/^(?:POST|GET|PUT|DELETE|OPTIONS|PATCH|TRACE|CONNECT)\b/,"attr-name":/:\w+/}},"response-status":{pattern:/^HTTP\/1.[01] \d+.*/m,inside:{property:{pattern:/(^HTTP\/1.[01] )\d+.*/i,lookbehind:!0}}},"header-name":{pattern:/^[\w-]+:(?=.)/m,alias:"keyword"}};var httpLanguages={"application/json":Prism.languages.javascript,"application/xml":Prism.languages.markup,"text/xml":Prism.languages.markup,"text/html":Prism.languages.markup};for(var contentType in httpLanguages)if(httpLanguages[contentType]){var options={};options[contentType]={pattern:RegExp("(content-type:\\s*"+contentType+"[\\w\\W]*?)(?:\\r?\\n|\\r){2}[\\w\\W]*","i"),lookbehind:!0,inside:{rest:httpLanguages[contentType]}},Prism.languages.insertBefore("http","header-name",options)} \ No newline at end of file +!function(t){function a(t){var a=t.replace(/^[a-z]+\//,""),e="\\w+/(?:[\\w.-]+\\+)+"+a+"(?![+\\w.-])";return"(?:"+t+"|"+e+")"}t.languages.http={"request-line":{pattern:/^(?:POST|GET|PUT|DELETE|OPTIONS|PATCH|TRACE|CONNECT)\s(?:https?:\/\/|\/)\S+\sHTTP\/[0-9.]+/m,inside:{property:/^(?:POST|GET|PUT|DELETE|OPTIONS|PATCH|TRACE|CONNECT)\b/,"attr-name":/:\w+/}},"response-status":{pattern:/^HTTP\/1.[01] \d+.*/m,inside:{property:{pattern:/(^HTTP\/1.[01] )\d+.*/i,lookbehind:!0}}},"header-name":{pattern:/^[\w-]+:(?=.)/m,alias:"keyword"}};var e,n=t.languages,r={"application/javascript":n.javascript,"application/json":n.json||n.javascript,"application/xml":n.xml,"text/xml":n.xml,"text/html":n.html,"text/css":n.css},i={"application/json":!0,"application/xml":!0};for(var s in r)if(r[s]){e=e||{};var p=i[s]?a(s):s;e[s]={pattern:RegExp("(content-type:\\s*"+p+"[\\s\\S]*?)(?:\\r?\\n|\\r){2}[\\s\\S]*","i"),lookbehind:!0,inside:{rest:r[s]}}}e&&t.languages.insertBefore("http","header-name",e)}(Prism); \ No newline at end of file diff --git a/tests/languages/css+http/css_inclusion.test b/tests/languages/css+http/css_inclusion.test new file mode 100644 index 0000000000..f805d6d4db --- /dev/null +++ b/tests/languages/css+http/css_inclusion.test @@ -0,0 +1,25 @@ +Content-type: text/css + +a.link:hover { + color: red; +} + +---------------------------------------------------- + +[ + ["header-name", "Content-type:"], + " text/css", + ["text/css", [ + ["selector", "a.link:hover"], + ["punctuation", "{"], + ["property", "color"], + ["punctuation", ":"], + " red", + ["punctuation", ";"], + ["punctuation", "}"] + ]] +] + +---------------------------------------------------- + +Checks for JavaScript content in HTTP. \ No newline at end of file diff --git a/tests/languages/javascript+http/javascript_inclusion.test b/tests/languages/javascript+http/javascript_inclusion.test index 825fea49d5..f7977c5545 100644 --- a/tests/languages/javascript+http/javascript_inclusion.test +++ b/tests/languages/javascript+http/javascript_inclusion.test @@ -1,21 +1,21 @@ -Content-type: application/json +Content-type: application/javascript -{"foo":"bar"} +var a = true; ---------------------------------------------------- [ ["header-name", "Content-type:"], - " application/json", - ["application/json", [ - ["punctuation", "{"], - ["string", "\"foo\""], - ["punctuation", ":"], - ["string", "\"bar\""], - ["punctuation", "}"] + " application/javascript", + ["application/javascript", [ + ["keyword", "var"], + " a ", + ["operator", "="], + ["boolean", "true"], + ["punctuation", ";"] ]] ] ---------------------------------------------------- -Checks for JSON content in HTTP. \ No newline at end of file +Checks for JavaScript content in HTTP. \ No newline at end of file diff --git a/tests/languages/json+http/json-suffix_inclusion.test b/tests/languages/json+http/json-suffix_inclusion.test new file mode 100644 index 0000000000..b24009783c --- /dev/null +++ b/tests/languages/json+http/json-suffix_inclusion.test @@ -0,0 +1,21 @@ +Content-type: application/x.foo+bar+json + +{"foo":"bar"} + +---------------------------------------------------- + +[ + ["header-name", "Content-type:"], + " application/x.foo+bar+json", + ["application/json", [ + ["punctuation", "{"], + ["property", "\"foo\""], + ["operator", ":"], + ["string", "\"bar\""], + ["punctuation", "}"] + ]] +] + +---------------------------------------------------- + +Checks for content with JSON suffix in HTTP. \ No newline at end of file diff --git a/tests/languages/json+http/json_inclusion.test b/tests/languages/json+http/json_inclusion.test new file mode 100644 index 0000000000..2282637f57 --- /dev/null +++ b/tests/languages/json+http/json_inclusion.test @@ -0,0 +1,21 @@ +Content-type: application/json + +{"foo":"bar"} + +---------------------------------------------------- + +[ + ["header-name", "Content-type:"], + " application/json", + ["application/json", [ + ["punctuation", "{"], + ["property", "\"foo\""], + ["operator", ":"], + ["string", "\"bar\""], + ["punctuation", "}"] + ]] +] + +---------------------------------------------------- + +Checks for JSON content in HTTP. \ No newline at end of file diff --git a/tests/languages/markup+http/html_inclusion.test b/tests/languages/markup+http/html_inclusion.test new file mode 100644 index 0000000000..b5f067c77d --- /dev/null +++ b/tests/languages/markup+http/html_inclusion.test @@ -0,0 +1,30 @@ +Content-type: text/html + + + +---------------------------------------------------- + +[ + ["header-name", "Content-type:"], + " text/html", + ["text/html", [ + ["tag", [ + ["tag", [ + ["punctuation", "<"], + "b" + ]], + ["punctuation", ">"] + ]], + ["tag", [ + ["tag", [ + ["punctuation", ""] + ]] + ]] +] + +---------------------------------------------------- + +Checks for HTML content in HTTP. \ No newline at end of file diff --git a/tests/languages/markup+http/xml-suffix_inclusion.test b/tests/languages/markup+http/xml-suffix_inclusion.test new file mode 100644 index 0000000000..589b9ed21b --- /dev/null +++ b/tests/languages/markup+http/xml-suffix_inclusion.test @@ -0,0 +1,30 @@ +Content-type: text/x.anything+something-else+xml + + + +---------------------------------------------------- + +[ + ["header-name", "Content-type:"], + " text/x.anything+something-else+xml", + ["application/xml", [ + ["tag", [ + ["tag", [ + ["punctuation", "<"], + "foo" + ]], + ["punctuation", ">"] + ]], + ["tag", [ + ["tag", [ + ["punctuation", ""] + ]] + ]] +] + +---------------------------------------------------- + +Checks for content with XML suffix in HTTP. \ No newline at end of file diff --git a/tests/languages/markup+http/markup_inclusion.test b/tests/languages/markup+http/xml_inclusion.test similarity index 63% rename from tests/languages/markup+http/markup_inclusion.test rename to tests/languages/markup+http/xml_inclusion.test index 77457709bc..89372ea680 100644 --- a/tests/languages/markup+http/markup_inclusion.test +++ b/tests/languages/markup+http/xml_inclusion.test @@ -16,12 +16,12 @@ Content-type: application/xml ["punctuation", ">"] ]], ["tag", [ - ["tag", [ - ["punctuation", ""] - ]] + ["tag", [ + ["punctuation", ""] + ]] ]] ] From 654b527b3ff9dcbcb11c3aaed6e98de160ad317b Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Sat, 1 Dec 2018 18:56:35 +0100 Subject: [PATCH 0101/1100] Display language aliases (#1626) Change the index and download page of the Prism website. The index page will now display the aliases (for `language-xxxx`) of languages and the download page will display all alias title of a language next to it. --- download.js | 14 +++++++++++++- index.html | 37 ++++++++++++++++++++++++++++--------- 2 files changed, 41 insertions(+), 10 deletions(-) diff --git a/download.js b/download.js index 494b6e38e1..054da79d33 100644 --- a/download.js +++ b/download.js @@ -138,6 +138,7 @@ for (var category in components) { var info = all[id] = { title: all[id].title || all[id], + aliasTitles: all[id].aliasTitles, noCSS: all[id].noCSS || all.meta.noCSS, noJS: all[id].noJS || all.meta.noJS, enabled: checked, @@ -176,6 +177,17 @@ for (var category in components) { info.files.dev.paths.push(cssFile); } + function getLanguageTitle(lang) { + if (!lang.aliasTitles) + return lang.title; + + var titles = [lang.title]; + for (var alias in lang.aliasTitles) + if (lang.aliasTitles.hasOwnProperty(alias)) + titles.push(lang.aliasTitles[alias]); + return titles.join(" + "); + } + var label = $u.element.create('label', { attributes: { 'data-id': id @@ -230,7 +242,7 @@ for (var category in components) { properties: { className: 'name' }, - contents: info.title + contents: getLanguageTitle(info) }, ' ', all[id].owner? { diff --git a/index.html b/index.html index 2d6b430582..50be230c2e 100644 --- a/index.html +++ b/index.html @@ -273,21 +273,40 @@

    Credits

    continue; } count++; - var name = languages[id].title || languages[id]; + + var lang = languages[id]; + var name = lang.title || lang; + + var contents = [ + name, + ' - ', + { + tag: 'code', + contents: id + } + ]; + + var alias = lang.alias; + if (typeof alias === 'string') + alias = [alias]; + + if (alias) { + for (var i = 0, l = alias.length; i < l; i++) { + contents.push( + ', ', + { + tag: 'code', + contents: alias[i] + }); + } + } languageItems.push({ tag: 'li', attributes: { 'data-id': id }, - contents: [ - name, - ' - ', - { - tag: 'code', - contents: id - } - ] + contents: contents }); } $u.element.create('ul', { From 86d3179317826edc110cf3469f91a3a9e92a46bc Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Sat, 1 Dec 2018 18:58:10 +0100 Subject: [PATCH 0102/1100] Remove useless insertBefore in LESS (#1629) Remove an `insertBefore` call which was intended to swap the order of `punctuation` and `function`. But as `function` is already before `punctuation` (in [CSS](https://github.com/PrismJS/prism/blob/master/components/prism-css.js#L18)), it doesn't do anything. --- components/prism-less.js | 5 ----- components/prism-less.min.js | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/components/prism-less.js b/components/prism-less.js index 4f3a3d5d50..e7c42cc2e7 100644 --- a/components/prism-less.js +++ b/components/prism-less.js @@ -34,11 +34,6 @@ Prism.languages.less = Prism.languages.extend('css', { 'operator': /[+\-*\/]/ }); -// Invert function and punctuation positions -Prism.languages.insertBefore('less', 'punctuation', { - 'function': Prism.languages.less.function -}); - Prism.languages.insertBefore('less', 'property', { 'variable': [ // Variable declaration (the colon must be consumed!) diff --git a/components/prism-less.min.js b/components/prism-less.min.js index f8955cb1de..88f19d80ec 100644 --- a/components/prism-less.min.js +++ b/components/prism-less.min.js @@ -1 +1 @@ -Prism.languages.less=Prism.languages.extend("css",{comment:[/\/\*[\s\S]*?\*\//,{pattern:/(^|[^\\])\/\/.*/,lookbehind:!0}],atrule:{pattern:/@[\w-]+?(?:\([^{}]+\)|[^(){};])*?(?=\s*\{)/i,inside:{punctuation:/[:()]/}},selector:{pattern:/(?:@\{[\w-]+\}|[^{};\s@])(?:@\{[\w-]+\}|\([^{}]*\)|[^{};@])*?(?=\s*\{)/,inside:{variable:/@+[\w-]+/}},property:/(?:@\{[\w-]+\}|[\w-])+(?:\+_?)?(?=\s*:)/i,punctuation:/[{}();:,]/,operator:/[+\-*\/]/}),Prism.languages.insertBefore("less","punctuation",{"function":Prism.languages.less.function}),Prism.languages.insertBefore("less","property",{variable:[{pattern:/@[\w-]+\s*:/,inside:{punctuation:/:/}},/@@?[\w-]+/],"mixin-usage":{pattern:/([{;]\s*)[.#](?!\d)[\w-]+.*?(?=[(;])/,lookbehind:!0,alias:"function"}}); \ No newline at end of file +Prism.languages.less=Prism.languages.extend("css",{comment:[/\/\*[\s\S]*?\*\//,{pattern:/(^|[^\\])\/\/.*/,lookbehind:!0}],atrule:{pattern:/@[\w-]+?(?:\([^{}]+\)|[^(){};])*?(?=\s*\{)/i,inside:{punctuation:/[:()]/}},selector:{pattern:/(?:@\{[\w-]+\}|[^{};\s@])(?:@\{[\w-]+\}|\([^{}]*\)|[^{};@])*?(?=\s*\{)/,inside:{variable:/@+[\w-]+/}},property:/(?:@\{[\w-]+\}|[\w-])+(?:\+_?)?(?=\s*:)/i,punctuation:/[{}();:,]/,operator:/[+\-*\/]/}),Prism.languages.insertBefore("less","property",{variable:[{pattern:/@[\w-]+\s*:/,inside:{punctuation:/:/}},/@@?[\w-]+/],"mixin-usage":{pattern:/([{;]\s*)[.#](?!\d)[\w-]+.*?(?=[(;])/,lookbehind:!0,alias:"function"}}); \ No newline at end of file From 0536fb14e0c1957d7376296c5c14491bf08a5e67 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Sat, 1 Dec 2018 19:06:04 +0100 Subject: [PATCH 0103/1100] Move SCSS `property` definition (#1633) This PR cleans up the SCSS language definition a little by moving the definition of `property` inside the `extend` object. Also remove useless `i` flag. --- components/prism-scss.js | 13 ++++++------- components/prism-scss.min.js | 2 +- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/components/prism-scss.js b/components/prism-scss.js index e8494560fc..9dffd4b4f3 100644 --- a/components/prism-scss.js +++ b/components/prism-scss.js @@ -30,6 +30,12 @@ Prism.languages.scss = Prism.languages.extend('css', { 'placeholder': /%[-\w]+/, 'variable': /\$[-\w]+|#\{\$[-\w]+\}/ } + }, + 'property': { + pattern: /(?:[\w-]|\$[-\w]+|#\{\$[-\w]+\})+(?=\s*:)/, + inside: { + 'variable': /\$[-\w]+|#\{\$[-\w]+\}/ + } } }); @@ -43,13 +49,6 @@ Prism.languages.insertBefore('scss', 'atrule', { ] }); -Prism.languages.scss.property = { - pattern: /(?:[\w-]|\$[-\w]+|#\{\$[-\w]+\})+(?=\s*:)/i, - inside: { - 'variable': /\$[-\w]+|#\{\$[-\w]+\}/ - } -}; - Prism.languages.insertBefore('scss', 'important', { // var and interpolated vars 'variable': /\$[-\w]+|#\{\$[-\w]+\}/ diff --git a/components/prism-scss.min.js b/components/prism-scss.min.js index b03568e479..668695bc87 100644 --- a/components/prism-scss.min.js +++ b/components/prism-scss.min.js @@ -1 +1 @@ -Prism.languages.scss=Prism.languages.extend("css",{comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0},atrule:{pattern:/@[\w-]+(?:\([^()]+\)|[^(])*?(?=\s+[{;])/,inside:{rule:/@[\w-]+/}},url:/(?:[-a-z]+-)*url(?=\()/i,selector:{pattern:/(?=\S)[^@;{}()]?(?:[^@;{}()]|#\{\$[-\w]+\})+(?=\s*\{(?:\}|\s|[^}]+[:{][^}]+))/m,inside:{parent:{pattern:/&/,alias:"important"},placeholder:/%[-\w]+/,variable:/\$[-\w]+|#\{\$[-\w]+\}/}}}),Prism.languages.insertBefore("scss","atrule",{keyword:[/@(?:if|else(?: if)?|for|each|while|import|extend|debug|warn|mixin|include|function|return|content)/i,{pattern:/( +)(?:from|through)(?= )/,lookbehind:!0}]}),Prism.languages.scss.property={pattern:/(?:[\w-]|\$[-\w]+|#\{\$[-\w]+\})+(?=\s*:)/i,inside:{variable:/\$[-\w]+|#\{\$[-\w]+\}/}},Prism.languages.insertBefore("scss","important",{variable:/\$[-\w]+|#\{\$[-\w]+\}/}),Prism.languages.insertBefore("scss","function",{placeholder:{pattern:/%[-\w]+/,alias:"selector"},statement:{pattern:/\B!(?:default|optional)\b/i,alias:"keyword"},"boolean":/\b(?:true|false)\b/,"null":/\bnull\b/,operator:{pattern:/(\s)(?:[-+*\/%]|[=!]=|<=?|>=?|and|or|not)(?=\s)/,lookbehind:!0}}),Prism.languages.scss.atrule.inside.rest=Prism.languages.scss; \ No newline at end of file +Prism.languages.scss=Prism.languages.extend("css",{comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0},atrule:{pattern:/@[\w-]+(?:\([^()]+\)|[^(])*?(?=\s+[{;])/,inside:{rule:/@[\w-]+/}},url:/(?:[-a-z]+-)*url(?=\()/i,selector:{pattern:/(?=\S)[^@;{}()]?(?:[^@;{}()]|#\{\$[-\w]+\})+(?=\s*\{(?:\}|\s|[^}]+[:{][^}]+))/m,inside:{parent:{pattern:/&/,alias:"important"},placeholder:/%[-\w]+/,variable:/\$[-\w]+|#\{\$[-\w]+\}/}},property:{pattern:/(?:[\w-]|\$[-\w]+|#\{\$[-\w]+\})+(?=\s*:)/,inside:{variable:/\$[-\w]+|#\{\$[-\w]+\}/}}}),Prism.languages.insertBefore("scss","atrule",{keyword:[/@(?:if|else(?: if)?|for|each|while|import|extend|debug|warn|mixin|include|function|return|content)/i,{pattern:/( +)(?:from|through)(?= )/,lookbehind:!0}]}),Prism.languages.insertBefore("scss","important",{variable:/\$[-\w]+|#\{\$[-\w]+\}/}),Prism.languages.insertBefore("scss","function",{placeholder:{pattern:/%[-\w]+/,alias:"selector"},statement:{pattern:/\B!(?:default|optional)\b/i,alias:"keyword"},"boolean":/\b(?:true|false)\b/,"null":/\bnull\b/,operator:{pattern:/(\s)(?:[-+*\/%]|[=!]=|<=?|>=?|and|or|not)(?=\s)/,lookbehind:!0}}),Prism.languages.scss.atrule.inside.rest=Prism.languages.scss; \ No newline at end of file From 6e0c6e86161ab40c35189633d329c8280cfa11cc Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Sat, 1 Dec 2018 19:41:17 +0100 Subject: [PATCH 0104/1100] Corrected load order of Show Invisibles (#1612) Correct the load order of Show Invisibles, Autolinker, and Data-URI Highlight, so that Show Invisibles is loaded after the others. Details in #1609. --- components.js | 2 +- components.json | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/components.js b/components.js index e4be7ddf87..10c805f828 100644 --- a/components.js +++ b/components.js @@ -1,2 +1,2 @@ -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default","peerDependencies":"markup"},"clike":{"title":"C-like","option":"default","overrideExampleHeader":true},"javascript":{"title":"JavaScript","require":"clike","peerDependencies":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"actionscript":{"title":"ActionScript","require":"javascript","peerDependencies":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":"dotnet","owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","owner":"R-osey"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup","peerDependencies":["css","javascript"],"alias":"jinja2","owner":"romanvm"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","peerDependencies":["css","coffeescript","erb","javascript","less","markdown","ruby","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"http":{"title":"HTTP","peerDependencies":["javascript","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"json":{"title":"JSON","alias":"jsonp","aliasTitles":{"jsonp":"JSONP"},"owner":"CupOfTea696"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","owner":"japborst"},"less":{"title":"Less","require":"css","owner":"Golmote"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"n4js":{"title":"N4JS","require":"javascript","alias":"n4jsd","owner":"bsmith-n4"},"nasm":{"title":"NASM","owner":"rbmj"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"cpp","peerDependencies":["c","cpp"],"overrideExampleHeader":true,"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"php-extras":{"title":"PHP Extras","require":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":"javascript","peerDependencies":["coffeescript","ejs","handlebars","hogan","less","livescript","markdown","mustache","plates","scss","stylus","swig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","peerDependencies":["c","cpp","fortran","ats","dsp"],"owner":"Golmote"},"python":{"title":"Python","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"ruby":{"title":"Ruby","require":"clike","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sql":{"title":"SQL","owner":"multipetros"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","peerDependencies":"css","owner":"Golmote"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","alias":"ts","owner":"vkbansal"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","owner":"hason"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":"Line Highlight","line-numbers":{"title":"Line Numbers","owner":"kuba-kubula"},"show-invisibles":"Show Invisibles","autolinker":"Autolinker","wpd":"WebPlatform Docs","custom-class":{"title":"Custom Class","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","noCSS":true},"show-language":{"title":"Show Language","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","owner":"Golmote","noCSS":true},"previewers":{"title":"Previewers","owner":"Golmote"},"autoloader":{"title":"Autoloader","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","owner":"Golmote","after":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","owner":"chriswells0"},"unescaped-markup":"Unescaped Markup","normalize-whitespace":{"title":"Normalize Whitespace","owner":"zeitgeist87","after":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","owner":"mAAdhaTTah","require":"toolbar","noCSS":true}}}; +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default","peerDependencies":"markup"},"clike":{"title":"C-like","option":"default","overrideExampleHeader":true},"javascript":{"title":"JavaScript","require":"clike","peerDependencies":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"actionscript":{"title":"ActionScript","require":"javascript","peerDependencies":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":"dotnet","owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","owner":"R-osey"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup","peerDependencies":["css","javascript"],"alias":"jinja2","owner":"romanvm"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","peerDependencies":["css","coffeescript","erb","javascript","less","markdown","ruby","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"http":{"title":"HTTP","peerDependencies":["javascript","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"json":{"title":"JSON","alias":"jsonp","aliasTitles":{"jsonp":"JSONP"},"owner":"CupOfTea696"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","owner":"japborst"},"less":{"title":"Less","require":"css","owner":"Golmote"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"n4js":{"title":"N4JS","require":"javascript","alias":"n4jsd","owner":"bsmith-n4"},"nasm":{"title":"NASM","owner":"rbmj"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"cpp","peerDependencies":["c","cpp"],"overrideExampleHeader":true,"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"php-extras":{"title":"PHP Extras","require":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":"javascript","peerDependencies":["coffeescript","ejs","handlebars","hogan","less","livescript","markdown","mustache","plates","scss","stylus","swig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","peerDependencies":["c","cpp","fortran","ats","dsp"],"owner":"Golmote"},"python":{"title":"Python","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"ruby":{"title":"Ruby","require":"clike","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sql":{"title":"SQL","owner":"multipetros"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","peerDependencies":"css","owner":"Golmote"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","alias":"ts","owner":"vkbansal"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","owner":"hason"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":"Line Highlight","line-numbers":{"title":"Line Numbers","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","after":["autolinker","data-uri-highlight"]},"autolinker":"Autolinker","wpd":"WebPlatform Docs","custom-class":{"title":"Custom Class","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","noCSS":true},"show-language":{"title":"Show Language","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","owner":"Golmote","noCSS":true},"previewers":{"title":"Previewers","owner":"Golmote"},"autoloader":{"title":"Autoloader","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","owner":"Golmote","after":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","owner":"chriswells0"},"unescaped-markup":"Unescaped Markup","normalize-whitespace":{"title":"Normalize Whitespace","owner":"zeitgeist87","after":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","owner":"mAAdhaTTah","require":"toolbar","noCSS":true}}}; if (typeof module !== 'undefined' && module.exports) { module.exports = components; } \ No newline at end of file diff --git a/components.json b/components.json index 4120315a2d..29312867de 100644 --- a/components.json +++ b/components.json @@ -816,7 +816,13 @@ "title": "Line Numbers", "owner": "kuba-kubula" }, - "show-invisibles": "Show Invisibles", + "show-invisibles": { + "title": "Show Invisibles", + "after": [ + "autolinker", + "data-uri-highlight" + ] + }, "autolinker": "Autolinker", "wpd": "WebPlatform Docs", "custom-class": { From 39686e12b65b19b81fdbad81bd00547bf0fcd1df Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Sat, 1 Dec 2018 19:51:08 +0100 Subject: [PATCH 0105/1100] Remove unused `insertBefore` overload (#1631) Mentioned in #1505. --- components/prism-core.js | 15 +-------------- components/prism-core.min.js | 2 +- prism.js | 15 +-------------- 3 files changed, 3 insertions(+), 29 deletions(-) diff --git a/components/prism-core.js b/components/prism-core.js index c573881ad8..7956b3ee75 100644 --- a/components/prism-core.js +++ b/components/prism-core.js @@ -98,26 +98,13 @@ var _ = _self.Prism = { * As this needs to recreate the object (we cannot actually insert before keys in object literals), * we cannot just provide an object, we need anobject and a key. * @param inside The key (or language id) of the parent - * @param before The key to insert before. If not provided, the function appends instead. + * @param before The key to insert before. * @param insert Object with the key/value pairs to insert * @param root The object that contains `inside`. If equal to Prism.languages, it can be omitted. */ insertBefore: function (inside, before, insert, root) { root = root || _.languages; var grammar = root[inside]; - - if (arguments.length == 2) { - insert = arguments[1]; - - for (var newToken in insert) { - if (insert.hasOwnProperty(newToken)) { - grammar[newToken] = insert[newToken]; - } - } - - return grammar; - } - var ret = {}; for (var token in grammar) { diff --git a/components/prism-core.min.js b/components/prism-core.min.js index b1e353efd5..0c431ce5b2 100644 --- a/components/prism-core.min.js +++ b/components/prism-core.min.js @@ -1 +1 @@ -var _self="undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{},Prism=function(){var e=/\blang(?:uage)?-([\w-]+)\b/i,t=0,n=_self.Prism={manual:_self.Prism&&_self.Prism.manual,disableWorkerMessageHandler:_self.Prism&&_self.Prism.disableWorkerMessageHandler,util:{encode:function(e){return e instanceof r?new r(e.type,n.util.encode(e.content),e.alias):"Array"===n.util.type(e)?e.map(n.util.encode):e.replace(/&/g,"&").replace(/e.length)return;if(!(w instanceof s)){if(m&&b!=t.length-1){h.lastIndex=k;var _=h.exec(e);if(!_)break;for(var j=_.index+(d?_[1].length:0),P=_.index+_[0].length,A=b,x=k,O=t.length;O>A&&(P>x||!t[A].type&&!t[A-1].greedy);++A)x+=t[A].length,j>=x&&(++b,k=x);if(t[b]instanceof s)continue;I=A-b,w=e.slice(k,x),_.index-=k}else{h.lastIndex=0;var _=h.exec(w),I=1}if(_){d&&(p=_[1]?_[1].length:0);var j=_.index+p,_=_[0].slice(p),P=j+_.length,N=w.slice(0,j),S=w.slice(P),C=[b,I];N&&(++b,k+=N.length,C.push(N));var E=new s(u,f?n.tokenize(_,f):_,y,_,m);if(C.push(E),S&&C.push(S),Array.prototype.splice.apply(t,C),1!=I&&n.matchGrammar(e,t,r,b,k,!0,u),i)break}else if(i)break}}}}},tokenize:function(e,t){var r=[e],a=t.rest;if(a){for(var l in a)t[l]=a[l];delete t.rest}return n.matchGrammar(e,r,t,0,0,!1),r},hooks:{all:{},add:function(e,t){var r=n.hooks.all;r[e]=r[e]||[],r[e].push(t)},run:function(e,t){var r=n.hooks.all[e];if(r&&r.length)for(var a,l=0;a=r[l++];)a(t)}}},r=n.Token=function(e,t,n,r,a){this.type=e,this.content=t,this.alias=n,this.length=0|(r||"").length,this.greedy=!!a};if(r.stringify=function(e,t,a){if("string"==typeof e)return e;if("Array"===n.util.type(e))return e.map(function(n){return r.stringify(n,t,e)}).join("");var l={type:e.type,content:r.stringify(e.content,t,a),tag:"span",classes:["token",e.type],attributes:{},language:t,parent:a};if(e.alias){var i="Array"===n.util.type(e.alias)?e.alias:[e.alias];Array.prototype.push.apply(l.classes,i)}n.hooks.run("wrap",l);var o=Object.keys(l.attributes).map(function(e){return e+'="'+(l.attributes[e]||"").replace(/"/g,""")+'"'}).join(" ");return"<"+l.tag+' class="'+l.classes.join(" ")+'"'+(o?" "+o:"")+">"+l.content+""},!_self.document)return _self.addEventListener?(n.disableWorkerMessageHandler||_self.addEventListener("message",function(e){var t=JSON.parse(e.data),r=t.language,a=t.code,l=t.immediateClose;_self.postMessage(n.highlight(a,n.languages[r],r)),l&&_self.close()},!1),_self.Prism):_self.Prism;var a=document.currentScript||[].slice.call(document.getElementsByTagName("script")).pop();return a&&(n.filename=a.src,n.manual||a.hasAttribute("data-manual")||("loading"!==document.readyState?window.requestAnimationFrame?window.requestAnimationFrame(n.highlightAll):window.setTimeout(n.highlightAll,16):document.addEventListener("DOMContentLoaded",n.highlightAll))),_self.Prism}();"undefined"!=typeof module&&module.exports&&(module.exports=Prism),"undefined"!=typeof global&&(global.Prism=Prism); \ No newline at end of file +var _self="undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{},Prism=function(){var e=/\blang(?:uage)?-([\w-]+)\b/i,t=0,n=_self.Prism={manual:_self.Prism&&_self.Prism.manual,disableWorkerMessageHandler:_self.Prism&&_self.Prism.disableWorkerMessageHandler,util:{encode:function(e){return e instanceof a?new a(e.type,n.util.encode(e.content),e.alias):"Array"===n.util.type(e)?e.map(n.util.encode):e.replace(/&/g,"&").replace(/e.length)return;if(!(w instanceof s)){if(m&&b!=t.length-1){h.lastIndex=k;var _=h.exec(e);if(!_)break;for(var j=_.index+(d?_[1].length:0),A=_.index+_[0].length,P=b,x=k,I=t.length;I>P&&(A>x||!t[P].type&&!t[P-1].greedy);++P)x+=t[P].length,j>=x&&(++b,k=x);if(t[b]instanceof s)continue;N=P-b,w=e.slice(k,x),_.index-=k}else{h.lastIndex=0;var _=h.exec(w),N=1}if(_){d&&(p=_[1]?_[1].length:0);var j=_.index+p,_=_[0].slice(p),A=j+_.length,O=w.slice(0,j),S=w.slice(A),C=[b,N];O&&(++b,k+=O.length,C.push(O));var E=new s(u,f?n.tokenize(_,f):_,y,_,m);if(C.push(E),S&&C.push(S),Array.prototype.splice.apply(t,C),1!=N&&n.matchGrammar(e,t,a,b,k,!0,u),i)break}else if(i)break}}}}},tokenize:function(e,t){var a=[e],r=t.rest;if(r){for(var l in r)t[l]=r[l];delete t.rest}return n.matchGrammar(e,a,t,0,0,!1),a},hooks:{all:{},add:function(e,t){var a=n.hooks.all;a[e]=a[e]||[],a[e].push(t)},run:function(e,t){var a=n.hooks.all[e];if(a&&a.length)for(var r,l=0;r=a[l++];)r(t)}}},a=n.Token=function(e,t,n,a,r){this.type=e,this.content=t,this.alias=n,this.length=0|(a||"").length,this.greedy=!!r};if(a.stringify=function(e,t,r){if("string"==typeof e)return e;if("Array"===n.util.type(e))return e.map(function(n){return a.stringify(n,t,e)}).join("");var l={type:e.type,content:a.stringify(e.content,t,r),tag:"span",classes:["token",e.type],attributes:{},language:t,parent:r};if(e.alias){var i="Array"===n.util.type(e.alias)?e.alias:[e.alias];Array.prototype.push.apply(l.classes,i)}n.hooks.run("wrap",l);var o=Object.keys(l.attributes).map(function(e){return e+'="'+(l.attributes[e]||"").replace(/"/g,""")+'"'}).join(" ");return"<"+l.tag+' class="'+l.classes.join(" ")+'"'+(o?" "+o:"")+">"+l.content+""},!_self.document)return _self.addEventListener?(n.disableWorkerMessageHandler||_self.addEventListener("message",function(e){var t=JSON.parse(e.data),a=t.language,r=t.code,l=t.immediateClose;_self.postMessage(n.highlight(r,n.languages[a],a)),l&&_self.close()},!1),_self.Prism):_self.Prism;var r=document.currentScript||[].slice.call(document.getElementsByTagName("script")).pop();return r&&(n.filename=r.src,n.manual||r.hasAttribute("data-manual")||("loading"!==document.readyState?window.requestAnimationFrame?window.requestAnimationFrame(n.highlightAll):window.setTimeout(n.highlightAll,16):document.addEventListener("DOMContentLoaded",n.highlightAll))),_self.Prism}();"undefined"!=typeof module&&module.exports&&(module.exports=Prism),"undefined"!=typeof global&&(global.Prism=Prism); \ No newline at end of file diff --git a/prism.js b/prism.js index 1bb30ec769..49c8585f6a 100644 --- a/prism.js +++ b/prism.js @@ -103,26 +103,13 @@ var _ = _self.Prism = { * As this needs to recreate the object (we cannot actually insert before keys in object literals), * we cannot just provide an object, we need anobject and a key. * @param inside The key (or language id) of the parent - * @param before The key to insert before. If not provided, the function appends instead. + * @param before The key to insert before. * @param insert Object with the key/value pairs to insert * @param root The object that contains `inside`. If equal to Prism.languages, it can be omitted. */ insertBefore: function (inside, before, insert, root) { root = root || _.languages; var grammar = root[inside]; - - if (arguments.length == 2) { - insert = arguments[1]; - - for (var newToken in insert) { - if (insert.hasOwnProperty(newToken)) { - grammar[newToken] = insert[newToken]; - } - } - - return grammar; - } - var ret = {}; for (var token in grammar) { From b0717e701245c56ec26eb1a887f1f338f2f76731 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Sat, 1 Dec 2018 21:09:13 +0100 Subject: [PATCH 0106/1100] Add support for code blocks in Markdown (#1562) It also supports syntax highlighting! The highlighting is done in two steps: 1. Add an alias `language-****` containing the given language to the `code-block` token. This happens in the `after-tokenize` hook. 2. Highlight the code with the `wrap` hook. This is to get around the encoding (`util.encode`) of tokens in `Prism.highlight`. By using this procedure we get the correct execution of the `before-tokenize`, `after-tokenize`, and `wrap` hook for all included languages. --- components/prism-markdown.js | 88 ++++++++++++++++++++++ components/prism-markdown.min.js | 2 +- tests/languages/markdown/code_feature.test | 15 +++- 3 files changed, 102 insertions(+), 3 deletions(-) diff --git a/components/prism-markdown.js b/components/prism-markdown.js index 5f2510dbfd..22c6a4b681 100644 --- a/components/prism-markdown.js +++ b/components/prism-markdown.js @@ -16,6 +16,24 @@ Prism.languages.insertBefore('markdown', 'prolog', { // ``code`` pattern: /``.+?``|`[^`\n]+`/, alias: 'keyword' + }, + { + // ```optional language + // code block + // ``` + pattern: /^```[\s\S]*?^```$/m, + greedy: true, + inside: { + 'code-block': { + pattern: /^(```.*(?:\r?\n|\r))[\s\S]+?(?=(?:\r?\n|\r)^```$)/m, + lookbehind: true + }, + 'code-language': { + pattern: /^(```).+/, + lookbehind: true + }, + 'punctuation': /```/ + } } ], 'title': [ @@ -137,3 +155,73 @@ Prism.languages.markdown['italic'].inside['bold'] = Prism.languages.markdown['bo Prism.languages.markdown['italic'].inside['strike'] = Prism.languages.markdown['strike']; Prism.languages.markdown['strike'].inside['bold'] = Prism.languages.markdown['bold']; Prism.languages.markdown['strike'].inside['italic'] = Prism.languages.markdown['italic']; + +Prism.hooks.add('after-tokenize', function (env) { + if (env.language !== 'markdown') { + return; + } + + function walkTokens(tokens) { + if (!tokens || typeof tokens === 'string') { + return; + } + + for (var i = 0, l = tokens.length; i < l; i++) { + var token = tokens[i]; + + if (token.type !== 'code') { + walkTokens(token.content); + continue; + } + + var codeLang = token.content[1]; + var codeBlock = token.content[3]; + + if (codeLang && codeBlock && + codeLang.type === 'code-language' && codeBlock.type === 'code-block' && + typeof codeLang.content === 'string') { + + // this might be a language that Prism does not support + var alias = 'language-' + codeLang.content.trim().split(/\s+/)[0].toLowerCase(); + + // add alias + if (!codeBlock.alias) { + codeBlock.alias = [alias]; + } else if (typeof codeBlock.alias === 'string') { + codeBlock.alias = [codeBlock.alias, alias]; + } else { + codeBlock.alias.push(alias); + } + } + } + } + + walkTokens(env.tokens); +}); + +Prism.hooks.add('wrap', function (env) { + if (env.type !== 'code-block') { + return; + } + + var codeLang = ''; + for (var i = 0, l = env.classes.length; i < l; i++) { + var cls = env.classes[i]; + var match = /language-(\w+)/.exec(cls); + if (match) { + codeLang = match[1]; + break; + } + } + + var grammar = Prism.languages[codeLang]; + + if (!grammar) { + return; + } + + // reverse Prism.util.encode + var code = env.content.replace(/</g, '<').replace(/&/g, '&'); + + env.content = Prism.highlight(code, grammar, codeLang); +}); diff --git a/components/prism-markdown.min.js b/components/prism-markdown.min.js index 44b17fc9d8..b062e980f9 100644 --- a/components/prism-markdown.min.js +++ b/components/prism-markdown.min.js @@ -1 +1 @@ -Prism.languages.markdown=Prism.languages.extend("markup",{}),Prism.languages.insertBefore("markdown","prolog",{blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},code:[{pattern:/^(?: {4}|\t).+/m,alias:"keyword"},{pattern:/``.+?``|`[^`\n]+`/,alias:"keyword"}],title:[{pattern:/\S.*(?:\r?\n|\r)(?:==+|--+)/,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#+.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:/(^|[^\\])(\*\*|__)(?:(?:\r?\n|\r)(?!\r?\n|\r)|.)+?\2/,lookbehind:!0,greedy:!0,inside:{punctuation:/^\*\*|^__|\*\*$|__$/}},italic:{pattern:/(^|[^\\])([*_])(?:(?:\r?\n|\r)(?!\r?\n|\r)|.)+?\2/,lookbehind:!0,greedy:!0,inside:{punctuation:/^[*_]|[*_]$/}},strike:{pattern:/(^|[^\\])(~~?)(?:(?:\r?\n|\r)(?!\r?\n|\r)|.)+?\2/,lookbehind:!0,greedy:!0,inside:{punctuation:/^~~?|~~?$/}},url:{pattern:/!?\[[^\]]+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)| ?\[[^\]\n]*\])/,inside:{variable:{pattern:/(!?\[)[^\]]+(?=\]$)/,lookbehind:!0},string:{pattern:/"(?:\\.|[^"\\])*"(?=\)$)/}}}}),Prism.languages.markdown.bold.inside.url=Prism.languages.markdown.url,Prism.languages.markdown.italic.inside.url=Prism.languages.markdown.url,Prism.languages.markdown.strike.inside.url=Prism.languages.markdown.url,Prism.languages.markdown.bold.inside.italic=Prism.languages.markdown.italic,Prism.languages.markdown.bold.inside.strike=Prism.languages.markdown.strike,Prism.languages.markdown.italic.inside.bold=Prism.languages.markdown.bold,Prism.languages.markdown.italic.inside.strike=Prism.languages.markdown.strike,Prism.languages.markdown.strike.inside.bold=Prism.languages.markdown.bold,Prism.languages.markdown.strike.inside.italic=Prism.languages.markdown.italic; \ No newline at end of file +Prism.languages.markdown=Prism.languages.extend("markup",{}),Prism.languages.insertBefore("markdown","prolog",{blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},code:[{pattern:/^(?: {4}|\t).+/m,alias:"keyword"},{pattern:/``.+?``|`[^`\n]+`/,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\r?\n|\r))[\s\S]+?(?=(?:\r?\n|\r)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\r?\n|\r)(?:==+|--+)/,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#+.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:/(^|[^\\])(\*\*|__)(?:(?:\r?\n|\r)(?!\r?\n|\r)|.)+?\2/,lookbehind:!0,greedy:!0,inside:{punctuation:/^\*\*|^__|\*\*$|__$/}},italic:{pattern:/(^|[^\\])([*_])(?:(?:\r?\n|\r)(?!\r?\n|\r)|.)+?\2/,lookbehind:!0,greedy:!0,inside:{punctuation:/^[*_]|[*_]$/}},strike:{pattern:/(^|[^\\])(~~?)(?:(?:\r?\n|\r)(?!\r?\n|\r)|.)+?\2/,lookbehind:!0,greedy:!0,inside:{punctuation:/^~~?|~~?$/}},url:{pattern:/!?\[[^\]]+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)| ?\[[^\]\n]*\])/,inside:{variable:{pattern:/(!?\[)[^\]]+(?=\]$)/,lookbehind:!0},string:{pattern:/"(?:\\.|[^"\\])*"(?=\)$)/}}}}),Prism.languages.markdown.bold.inside.url=Prism.languages.markdown.url,Prism.languages.markdown.italic.inside.url=Prism.languages.markdown.url,Prism.languages.markdown.strike.inside.url=Prism.languages.markdown.url,Prism.languages.markdown.bold.inside.italic=Prism.languages.markdown.italic,Prism.languages.markdown.bold.inside.strike=Prism.languages.markdown.strike,Prism.languages.markdown.italic.inside.bold=Prism.languages.markdown.bold,Prism.languages.markdown.italic.inside.strike=Prism.languages.markdown.strike,Prism.languages.markdown.strike.inside.bold=Prism.languages.markdown.bold,Prism.languages.markdown.strike.inside.italic=Prism.languages.markdown.italic,Prism.hooks.add("after-tokenize",function(a){function n(a){if(a&&"string"!=typeof a)for(var e=0,i=a.length;i>e;e++){var r=a[e];if("code"===r.type){var t=r.content[1],s=r.content[3];if(t&&s&&"code-language"===t.type&&"code-block"===s.type&&"string"==typeof t.content){var o="language-"+t.content.trim().split(/\s+/)[0].toLowerCase();s.alias?"string"==typeof s.alias?s.alias=[s.alias,o]:s.alias.push(o):s.alias=[o]}}else n(r.content)}}"markdown"===a.language&&n(a.tokens)}),Prism.hooks.add("wrap",function(a){if("code-block"===a.type){for(var n="",e=0,i=a.classes.length;i>e;e++){var r=a.classes[e],t=/language-(\w+)/.exec(r);if(t){n=t[1];break}}var s=Prism.languages[n];if(s){var o=a.content.replace(/</g,"<").replace(/&/g,"&");a.content=Prism.highlight(o,s,n)}}}); \ No newline at end of file diff --git a/tests/languages/markdown/code_feature.test b/tests/languages/markdown/code_feature.test index 2696ca72e2..948c50920c 100644 --- a/tests/languages/markdown/code_feature.test +++ b/tests/languages/markdown/code_feature.test @@ -5,13 +5,24 @@ foobar +``` js +var a = 0; +``` + ---------------------------------------------------- [ ["code", "`foo bar baz`"], ["code", "``foo `bar` baz``"], ["code", " foobar"], - ["code", "\tfoobar"] + ["code", "\tfoobar"], + + ["code", [ + ["punctuation", "```"], + ["code-language", " js"], + ["code-block", "var a = 0;"], + ["punctuation", "```"] + ]] ] ---------------------------------------------------- @@ -19,4 +30,4 @@ Checks for code blocks and inline code. The first code block is indented with 4 spaces, the second one is indented with 1 tab. The initial dot is necessary because of the first part being trimmed -by the test runner. \ No newline at end of file +by the test runner. From e2f2fd19fd032ff021006df45ff92d20c397824b Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Sat, 1 Dec 2018 21:19:37 +0100 Subject: [PATCH 0107/1100] Reuse CSS selector pattern in CSS Extras (#1637) The CSS extras for the selector now use the CSS selector pattern. --- components/prism-css-extras.js | 4 ++-- components/prism-css-extras.min.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/components/prism-css-extras.js b/components/prism-css-extras.js index 0e95c843b8..3b4261f76e 100644 --- a/components/prism-css-extras.js +++ b/components/prism-css-extras.js @@ -1,5 +1,5 @@ Prism.languages.css.selector = { - pattern: /[^{}\s][^{}]*(?=\s*\{)/, + pattern: Prism.languages.css.selector, inside: { 'pseudo-element': /:(?:after|before|first-letter|first-line|selection)|::[-\w]+/, 'pseudo-class': /:[-\w]+(?:\(.*\))?/, @@ -13,4 +13,4 @@ Prism.languages.insertBefore('css', 'function', { 'hexcode': /#[\da-f]{3,8}/i, 'entity': /\\[\da-f]{1,8}/i, 'number': /[\d%.]+/ -}); \ No newline at end of file +}); diff --git a/components/prism-css-extras.min.js b/components/prism-css-extras.min.js index 76b85d1046..f3d252f762 100644 --- a/components/prism-css-extras.min.js +++ b/components/prism-css-extras.min.js @@ -1 +1 @@ -Prism.languages.css.selector={pattern:/[^{}\s][^{}]*(?=\s*\{)/,inside:{"pseudo-element":/:(?:after|before|first-letter|first-line|selection)|::[-\w]+/,"pseudo-class":/:[-\w]+(?:\(.*\))?/,"class":/\.[-:.\w]+/,id:/#[-:.\w]+/,attribute:/\[[^\]]+\]/}},Prism.languages.insertBefore("css","function",{hexcode:/#[\da-f]{3,8}/i,entity:/\\[\da-f]{1,8}/i,number:/[\d%.]+/}); \ No newline at end of file +Prism.languages.css.selector={pattern:Prism.languages.css.selector,inside:{"pseudo-element":/:(?:after|before|first-letter|first-line|selection)|::[-\w]+/,"pseudo-class":/:[-\w]+(?:\(.*\))?/,"class":/\.[-:.\w]+/,id:/#[-:.\w]+/,attribute:/\[[^\]]+\]/}},Prism.languages.insertBefore("css","function",{hexcode:/#[\da-f]{3,8}/i,entity:/\\[\da-f]{1,8}/i,number:/[\d%.]+/}); \ No newline at end of file From b0d1823cfeef114eb068822cf03c5be3ce18928a Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Sat, 1 Dec 2018 21:24:31 +0100 Subject: [PATCH 0108/1100] Clean up Previewers' page (#1630) This PR makes some changes to the [Previewers plugin's page](https://prismjs.com/plugins/previewers/). 1. Format the code examples to look nicer. 2. Fix the example of the 'Disabling a previewer' section. 3. Highlight API snippets as JavaScript. --- plugins/previewers/index.html | 73 ++++++++++++++++++----------------- 1 file changed, 37 insertions(+), 36 deletions(-) diff --git a/plugins/previewers/index.html b/plugins/previewers/index.html index 539ef9876a..55370a3314 100644 --- a/plugins/previewers/index.html +++ b/plugins/previewers/index.html @@ -43,11 +43,11 @@

    Examples

    CSS

    .example-gradient {
    -	background: -moz-linear-gradient(left,  #cb60b3 0%, #c146a1 50%, #a80077 51%, #db36a4 100%); /* FF3.6+ */
    -	background: -webkit-linear-gradient(left,  #cb60b3 0%,#c146a1 50%,#a80077 51%,#db36a4 100%); /* Chrome10+,Safari5.1+ */
    -	background: -o-linear-gradient(left,  #cb60b3 0%,#c146a1 50%,#a80077 51%,#db36a4 100%); /* Opera 11.10+ */
    -	background: -ms-linear-gradient(left,  #cb60b3 0%,#c146a1 50%,#a80077 51%,#db36a4 100%); /* IE10+ */
    -	background: linear-gradient(to right,  #cb60b3 0%,#c146a1 50%,#a80077 51%,#db36a4 100%); /* W3C */
    +	background: -webkit-linear-gradient(left,     #cb60b3 0%, #c146a1 50%, #a80077 51%, #db36a4 100%); /* Chrome10+, Safari5.1+ */
    +	background:    -moz-linear-gradient(left,     #cb60b3 0%, #c146a1 50%, #a80077 51%, #db36a4 100%); /* FF3.6+ */
    +	background:     -ms-linear-gradient(left,     #cb60b3 0%, #c146a1 50%, #a80077 51%, #db36a4 100%); /* IE10+ */
    +	background:      -o-linear-gradient(left,     #cb60b3 0%, #c146a1 50%, #a80077 51%, #db36a4 100%); /* Opera 11.10+ */
    +	background:         linear-gradient(to right, #cb60b3 0%, #c146a1 50%, #a80077 51%, #db36a4 100%); /* W3C */
     }
     .example-angle {
     	transform: rotate(10deg);
    @@ -55,7 +55,7 @@ 

    CSS

    .example-color { color: rgba(255, 0, 0, 0.2); background: purple; - border: 1px solid hsl(100,70%,40%); + border: 1px solid hsl(100, 70%, 40%); } .example-easing { transition-timing-function: linear; @@ -69,13 +69,13 @@

    Markup attributes

    <tr style="background: lightblue;">

    Less

    -
    @gradient: linear-gradient(135deg,  #9dd53a 0%,#a1d54f 50%,#80c217 51%,#7cbc0a 100%);
    +	
    @gradient: linear-gradient(135deg, #9dd53a 0%, #a1d54f 50%, #80c217 51%, #7cbc0a 100%);
     .example-gradient {
    -	background: -moz-linear-gradient(-45deg,  #9dd53a 0%, #a1d54f 50%, #80c217 51%, #7cbc0a 100%); /* FF3.6+ */
    -	background: -webkit-linear-gradient(-45deg,  #9dd53a 0%,#a1d54f 50%,#80c217 51%,#7cbc0a 100%); /* Chrome10+,Safari5.1+ */
    -	background: -o-linear-gradient(-45deg,  #9dd53a 0%,#a1d54f 50%,#80c217 51%,#7cbc0a 100%); /* Opera 11.10+ */
    -	background: -ms-linear-gradient(-45deg,  #9dd53a 0%,#a1d54f 50%,#80c217 51%,#7cbc0a 100%); /* IE10+ */
    -	background: linear-gradient(135deg,  #9dd53a 0%,#a1d54f 50%,#80c217 51%,#7cbc0a 100%); /* W3C */
    +	background: -webkit-linear-gradient(-45deg, #9dd53a 0%, #a1d54f 50%, #80c217 51%, #7cbc0a 100%); /* Chrome10+, Safari5.1+ */
    +	background:    -moz-linear-gradient(-45deg, #9dd53a 0%, #a1d54f 50%, #80c217 51%, #7cbc0a 100%); /* FF3.6+ */
    +	background:     -ms-linear-gradient(-45deg, #9dd53a 0%, #a1d54f 50%, #80c217 51%, #7cbc0a 100%); /* IE10+ */
    +	background:      -o-linear-gradient(-45deg, #9dd53a 0%, #a1d54f 50%, #80c217 51%, #7cbc0a 100%); /* Opera 11.10+ */
    +	background:         linear-gradient(135deg, #9dd53a 0%, #a1d54f 50%, #80c217 51%, #7cbc0a 100%); /* W3C */
     }
     @angle: 3rad;
     .example-angle {
    @@ -85,7 +85,7 @@ 

    Less

    .example-color { color: hsla(102, 53%, 42%, 0.4); } -@easing: cubic-bezier(0.1,0.3,1,.4); +@easing: cubic-bezier(0.1, 0.3, 1, .4); .example-easing { transition-timing-function: ease; } @@ -95,10 +95,10 @@

    Less

    }

    Sass

    -
    $gradient: linear-gradient(135deg,  #9dd53a 0%,#a1d54f 50%,#80c217 51%,#7cbc0a 100%)
    +	
    $gradient: linear-gradient(135deg, #9dd53a 0%, #a1d54f 50%, #80c217 51%, #7cbc0a 100%)
     @mixin example-gradient
    -	background: -moz-radial-gradient(center, ellipse cover,  #f2f6f8 0%, #d8e1e7 50%, #b5c6d0 51%, #e0eff9 100%)
    -	background: radial-gradient(ellipse at center,  #f2f6f8 0%,#d8e1e7 50%,#b5c6d0 51%,#e0eff9 100%)
    +	background: -moz-radial-gradient(center, ellipse cover, #f2f6f8 0%, #d8e1e7 50%, #b5c6d0 51%, #e0eff9 100%)
    +	background: radial-gradient(ellipse at center, #f2f6f8 0%, #d8e1e7 50%, #b5c6d0 51%, #e0eff9 100%)
     $angle: 380grad
     @mixin example-angle
     	transform: rotate(-120deg)
    @@ -106,9 +106,9 @@ 

    Sass

    transform: rotate(18rad) $color: blue @mixin example-color - color: rgba(147, 32, 34, 0.8) + color: rgba(147, 32, 34, 0.8) .example-color - color: pink + color: pink $easing: ease-out .example-easing transition-timing-function: ease-in-out @@ -120,10 +120,10 @@

    Sass

    Scss

    -
    $gradient: linear-gradient(135deg,  #9dd53a 0%,#a1d54f 50%,#80c217 51%,#7cbc0a 100%);
    +	
    $gradient: linear-gradient(135deg, #9dd53a 0%, #a1d54f 50%, #80c217 51%, #7cbc0a 100%);
     $attr: background;
     .example-gradient {
    -    #{$attr}-image: repeating-linear-gradient(10deg, rgba(255,0,0,0), rgba(255,0,0,1) 10px, rgba(255,0,0,0) 20px);
    +	#{$attr}-image: repeating-linear-gradient(10deg, rgba(255, 0, 0, 0), rgba(255, 0, 0, 1) 10px, rgba(255, 0, 0, 0) 20px);
     }
     $angle: 1.8turn;
     .example-angle {
    @@ -131,11 +131,11 @@ 

    Scss

    } $color: blue; .example-color { - #{$attr}-color: rgba(255,255,0,0.75); + #{$attr}-color: rgba(255, 255, 0, 0.75); } $easing: linear; .example-easing { - transition-timing-function: cubic-bezier(0.9,0.1,.2,.4); + transition-timing-function: cubic-bezier(0.9, 0.1, .2, .4); } $time: 1s; .example-time { @@ -143,9 +143,9 @@

    Scss

    }

    Stylus

    -
    gradient = linear-gradient(135deg,  #9dd53a 0%,#a1d54f 50%,#80c217 51%,#7cbc0a 100%)
    +	
    gradient = linear-gradient(135deg, #9dd53a 0%, #a1d54f 50%, #80c217 51%, #7cbc0a 100%)
     .example-gradient
    -	background-image: repeating-radial-gradient(circle, rgba(255,0,0,0), rgba(255,0,0,1) 10px, rgba(255,0,0,0) 20px)
    +	background-image: repeating-radial-gradient(circle, rgba(255, 0, 0, 0), rgba(255, 0, 0, 1) 10px, rgba(255, 0, 0, 0) 20px)
     angle = 357deg
     .example-angle
     	transform: rotate(100grad)
    @@ -166,15 +166,16 @@ 

    Disabling a previewer

    can be added on a code block or any ancestor. Its value should be a space-separated list of previewers representing the subset.

    For example:

    -
    <pre class="language-css" data-previewers="color"><code>div {
    -	/* Only the previewer for colors is enabled */
    +	
    <pre class="language-css" data-previewers="color time"><code>div {
    +	/* Only the previewer for color and time are enabled */
     	color: red;
    +	transition-duration: 1s;
     	/* The previewer for angles is not enabled. */
     	transform: rotate(10deg);
     }</code></pre>

    will give the following result:

    div {
    -	/* Only the previewers color and time are enabled */
    +	/* Only the previewers for color and time are enabled */
     	color: red;
     	transition-duration: 1s;
     	/* The previewer for angles is not enabled. */
    @@ -184,30 +185,30 @@ 

    Disabling a previewer

    API

    -

    This plugins provides a constructor that can be accessed through Prism.plugins.Previewer.

    +

    This plugins provides a constructor that can be accessed through Prism.plugins.Previewer.

    Once a previewer has been instantiated, an HTML element is appended to the document body. This element will appear when specific tokens are hovered.

    -

    new Prism.plugins.Previewer(type, updater, supportedLanguages)

    +

    new Prism.plugins.Previewer(type, updater, supportedLanguages)

    • -

      type: the token type this previewer is associated to. +

      type: the token type this previewer is associated to. The previewer will be shown when hovering tokens of this type.

    • -

      updater: the function that will be called each time an associated token is hovered. +

      updater: the function that will be called each time an associated token is hovered. This function takes the text content of the token as its only parameter. - The previewer HTML element can be accessed through the keyword this. - This function must return true for the previewer to be shown.

      + The previewer HTML element can be accessed through the keyword this. + This function must return true for the previewer to be shown.

    • -

      supportedLanguages: an optional array of supported languages. +

      supportedLanguages: an optional array of supported languages. The previewer will be available only for those. - Defaults to '*', which means every languages.

      + Defaults to '*', which means every languages.

    • -

      initializer: an optional function. +

      initializer: an optional function. This function will be called when the previewer is initialized, right after the HTML element has been appended to the document body.

    • From 00bfc969e50359c1fcf41d06468159d7ac421670 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Sat, 1 Dec 2018 21:27:42 +0100 Subject: [PATCH 0109/1100] Improve F# (#1573) Implement a few F# features: 1. [Attributes](https://docs.microsoft.com/en-us/dotnet/fsharp/language-reference/attributes). 2. [Computation expressions](https://docs.microsoft.com/en-us/dotnet/fsharp/language-reference/computation-expressions) (resolves #1459). 3. Class names for type annotations, [casts ](https://docs.microsoft.com/en-us/dotnet/fsharp/language-reference/casting-and-conversions)(not including `as`), definitions and instancing (resolves #1460). 4. Proper support for ([nullable](https://docs.microsoft.com/en-us/dotnet/fsharp/language-reference/symbol-and-operator-reference/nullable-operators)) [operators](https://docs.microsoft.com/en-us/dotnet/fsharp/language-reference/symbol-and-operator-reference/). --- components/prism-fsharp.js | 35 +++++++- components/prism-fsharp.min.js | 2 +- .../languages/fsharp/annotation_feature.test | 35 ++++++++ .../languages/fsharp/class-name_feature.test | 86 +++++++++++++++++++ .../computation-expression_feature.test | 17 ++++ tests/languages/fsharp/issue1480.test | 5 +- tests/languages/fsharp/keyword_feature.test | 20 +++-- tests/languages/fsharp/operator_feature.test | 53 ++++++++++++ 8 files changed, 238 insertions(+), 15 deletions(-) create mode 100644 tests/languages/fsharp/annotation_feature.test create mode 100644 tests/languages/fsharp/class-name_feature.test create mode 100644 tests/languages/fsharp/computation-expression_feature.test create mode 100644 tests/languages/fsharp/operator_feature.test diff --git a/components/prism-fsharp.js b/components/prism-fsharp.js index 375ab8cc15..86bd106069 100644 --- a/components/prism-fsharp.js +++ b/components/prism-fsharp.js @@ -9,17 +9,26 @@ Prism.languages.fsharp = Prism.languages.extend('clike', { lookbehind: true } ], - 'keyword': /\b(?:let|return|use|yield)(?:!\B|\b)|\b(abstract|and|as|assert|base|begin|class|default|delegate|do|done|downcast|downto|elif|else|end|exception|extern|false|finally|for|fun|function|global|if|in|inherit|inline|interface|internal|lazy|match|member|module|mutable|namespace|new|not|null|of|open|or|override|private|public|rec|select|static|struct|then|to|true|try|type|upcast|val|void|when|while|with|asr|land|lor|lsl|lsr|lxor|mod|sig|atomic|break|checked|component|const|constraint|constructor|continue|eager|event|external|fixed|functor|include|method|mixin|object|parallel|process|protected|pure|sealed|tailcall|trait|virtual|volatile)\b/, 'string': { pattern: /(?:"""[\s\S]*?"""|@"(?:""|[^"])*"|"(?:\\[\s\S]|[^\\"])*")B?|'(?:[^\\']|\\.)'B?/, greedy: true }, + 'class-name': { + pattern: /(\b(?:exception|inherit|interface|new|of|type)\s+|\w\s*:\s*|\s:\??>\s*)[.\w]+\b(?:\s*(?:->|\*)\s*[.\w]+\b)*(?!\s*[:.])/, + lookbehind: true, + inside: { + 'operator': /->|\*/, + 'punctuation': /\./ + } + }, + 'keyword': /\b(?:let|return|use|yield)(?:!\B|\b)|\b(abstract|and|as|assert|base|begin|class|default|delegate|do|done|downcast|downto|elif|else|end|exception|extern|false|finally|for|fun|function|global|if|in|inherit|inline|interface|internal|lazy|match|member|module|mutable|namespace|new|not|null|of|open|or|override|private|public|rec|select|static|struct|then|to|true|try|type|upcast|val|void|when|while|with|asr|land|lor|lsl|lsr|lxor|mod|sig|atomic|break|checked|component|const|constraint|constructor|continue|eager|event|external|fixed|functor|include|method|mixin|object|parallel|process|protected|pure|sealed|tailcall|trait|virtual|volatile)\b/, 'number': [ /\b0x[\da-fA-F]+(?:un|lf|LF)?\b/, /\b0b[01]+(?:y|uy)?\b/, /(?:\b\d+\.?\d*|\B\.\d+)(?:[fm]|e[+-]?\d+)?\b/i, /\b\d+(?:[IlLsy]|u[lsy]?|UL)?\b/ - ] + ], + 'operator': /([<>~&^])\1\1|([*.:<>&])\2|<-|->|[!=:]=|?|\??(?:<=|>=|<>|[-+*/%=<>])\??|[!?^&]|~[+~-]|:>|:\?>?/ }); Prism.languages.insertBefore('fsharp', 'keyword', { 'preprocessor': { @@ -34,3 +43,25 @@ Prism.languages.insertBefore('fsharp', 'keyword', { } } }); +Prism.languages.insertBefore('fsharp', 'punctuation', { + 'computation-expression': { + pattern: /[_a-z]\w*(?=\s*\{)/i, + alias: 'keyword' + } +}); +Prism.languages.insertBefore('fsharp', 'string', { + 'annotation': { + pattern: /\[<.+?>\]/, + inside: { + 'punctuation': /^\[<|>\]$/, + 'class-name': { + pattern: /^\w+$|(^|;\s*)[A-Z]\w*(?=\()/, + lookbehind: true + }, + 'annotation-content': { + pattern: /[\s\S]*/, + inside: Prism.languages.fsharp + } + } + } +}); diff --git a/components/prism-fsharp.min.js b/components/prism-fsharp.min.js index 3579777708..ffe5bc2562 100644 --- a/components/prism-fsharp.min.js +++ b/components/prism-fsharp.min.js @@ -1 +1 @@ -Prism.languages.fsharp=Prism.languages.extend("clike",{comment:[{pattern:/(^|[^\\])\(\*[\s\S]*?\*\)/,lookbehind:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0}],keyword:/\b(?:let|return|use|yield)(?:!\B|\b)|\b(abstract|and|as|assert|base|begin|class|default|delegate|do|done|downcast|downto|elif|else|end|exception|extern|false|finally|for|fun|function|global|if|in|inherit|inline|interface|internal|lazy|match|member|module|mutable|namespace|new|not|null|of|open|or|override|private|public|rec|select|static|struct|then|to|true|try|type|upcast|val|void|when|while|with|asr|land|lor|lsl|lsr|lxor|mod|sig|atomic|break|checked|component|const|constraint|constructor|continue|eager|event|external|fixed|functor|include|method|mixin|object|parallel|process|protected|pure|sealed|tailcall|trait|virtual|volatile)\b/,string:{pattern:/(?:"""[\s\S]*?"""|@"(?:""|[^"])*"|"(?:\\[\s\S]|[^\\"])*")B?|'(?:[^\\']|\\.)'B?/,greedy:!0},number:[/\b0x[\da-fA-F]+(?:un|lf|LF)?\b/,/\b0b[01]+(?:y|uy)?\b/,/(?:\b\d+\.?\d*|\B\.\d+)(?:[fm]|e[+-]?\d+)?\b/i,/\b\d+(?:[IlLsy]|u[lsy]?|UL)?\b/]}),Prism.languages.insertBefore("fsharp","keyword",{preprocessor:{pattern:/^[^\r\n\S]*#.*/m,alias:"property",inside:{directive:{pattern:/(\s*#)\b(?:else|endif|if|light|line|nowarn)\b/,lookbehind:!0,alias:"keyword"}}}}); \ No newline at end of file +Prism.languages.fsharp=Prism.languages.extend("clike",{comment:[{pattern:/(^|[^\\])\(\*[\s\S]*?\*\)/,lookbehind:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0}],string:{pattern:/(?:"""[\s\S]*?"""|@"(?:""|[^"])*"|"(?:\\[\s\S]|[^\\"])*")B?|'(?:[^\\']|\\.)'B?/,greedy:!0},"class-name":{pattern:/(\b(?:exception|inherit|interface|new|of|type)\s+|\w\s*:\s*|\s:\??>\s*)[.\w]+\b(?:\s*(?:->|\*)\s*[.\w]+\b)*(?!\s*[:.])/,lookbehind:!0,inside:{operator:/->|\*/,punctuation:/\./}},keyword:/\b(?:let|return|use|yield)(?:!\B|\b)|\b(abstract|and|as|assert|base|begin|class|default|delegate|do|done|downcast|downto|elif|else|end|exception|extern|false|finally|for|fun|function|global|if|in|inherit|inline|interface|internal|lazy|match|member|module|mutable|namespace|new|not|null|of|open|or|override|private|public|rec|select|static|struct|then|to|true|try|type|upcast|val|void|when|while|with|asr|land|lor|lsl|lsr|lxor|mod|sig|atomic|break|checked|component|const|constraint|constructor|continue|eager|event|external|fixed|functor|include|method|mixin|object|parallel|process|protected|pure|sealed|tailcall|trait|virtual|volatile)\b/,number:[/\b0x[\da-fA-F]+(?:un|lf|LF)?\b/,/\b0b[01]+(?:y|uy)?\b/,/(?:\b\d+\.?\d*|\B\.\d+)(?:[fm]|e[+-]?\d+)?\b/i,/\b\d+(?:[IlLsy]|u[lsy]?|UL)?\b/],operator:/([<>~&^])\1\1|([*.:<>&])\2|<-|->|[!=:]=|?|\??(?:<=|>=|<>|[-+*\/%=<>])\??|[!?^&]|~[+~-]|:>|:\?>?/}),Prism.languages.insertBefore("fsharp","keyword",{preprocessor:{pattern:/^[^\r\n\S]*#.*/m,alias:"property",inside:{directive:{pattern:/(\s*#)\b(?:else|endif|if|light|line|nowarn)\b/,lookbehind:!0,alias:"keyword"}}}}),Prism.languages.insertBefore("fsharp","punctuation",{"computation-expression":{pattern:/[_a-z]\w*(?=\s*\{)/i,alias:"keyword"}}),Prism.languages.insertBefore("fsharp","string",{annotation:{pattern:/\[<.+?>\]/,inside:{punctuation:/^\[<|>\]$/,"class-name":{pattern:/^\w+$|(^|;\s*)[A-Z]\w*(?=\()/,lookbehind:!0},"annotation-content":{pattern:/[\s\S]*/,inside:Prism.languages.fsharp}}}}); \ No newline at end of file diff --git a/tests/languages/fsharp/annotation_feature.test b/tests/languages/fsharp/annotation_feature.test new file mode 100644 index 0000000000..3445236d0d --- /dev/null +++ b/tests/languages/fsharp/annotation_feature.test @@ -0,0 +1,35 @@ +[] +[] + +---------------------------------------------------- + +[ + ["annotation", [ + ["punctuation", "[<"], + ["class-name", "Foo"], + ["punctuation", ">]"] + ]], + ["annotation", [ + ["punctuation", "[<"], + ["class-name", "Bar"], + ["annotation-content", [ + ["punctuation", "("], + ["string", "\"bar\""], + ["punctuation", ")"], + ["punctuation", ";"] + ]], + ["class-name", "Foo"], + ["annotation-content", [ + ["punctuation", "("], + ["number", "1"], + ["punctuation", ","], + ["number", "2"], + ["punctuation", ")"] + ]], + ["punctuation", ">]"] + ]] +] + +---------------------------------------------------- + +Checks for annotations. diff --git a/tests/languages/fsharp/class-name_feature.test b/tests/languages/fsharp/class-name_feature.test new file mode 100644 index 0000000000..7939964246 --- /dev/null +++ b/tests/languages/fsharp/class-name_feature.test @@ -0,0 +1,86 @@ +let func : HttpFunc = handler (Some >> Task.FromResult) + +type Base1() = + abstract member F : unit -> unit + default u.F() = + printfn "F Base1" + +type Derived1() = + inherit Base1() + override u.F() = + printfn "F Derived1" + +let d1 : Derived1 = Derived1() + +let base1 = d1 :> Base1 +let derived1 = base1 :?> Derived1 + +type PersonName = + | FirstOnly of string + | LastOnly of string + | FirstLast of string * string + +type Shape = + | Rectangle of height : float * width : float + | Circle of radius : float + +type MyInterface = + abstract member Add: int -> int -> int + abstract member Pi : float + +exception Error1 of string +exception Error2 of string * int + +---------------------------------------------------- + +[ + ["keyword", "let"], " func ", + ["punctuation", ":"], ["class-name", ["HttpFunc"]], + ["operator", "="], " handler ", ["punctuation", "("], + "Some ", ["operator", ">>"], " Task", ["punctuation", "."], "FromResult", + ["punctuation", ")"], + + ["keyword", "type"], ["class-name", ["Base1"]], ["punctuation", "("], ["punctuation", ")"], ["operator", "="], + ["keyword", "abstract"], ["keyword", "member"], " F ", ["punctuation", ":"], + ["class-name", [ + "unit ", ["operator", "->"], " unit"] + ], + ["keyword", "default"], " u", ["punctuation", "."], ["function", "F"], ["punctuation", "("], ["punctuation", ")"], + ["operator", "="], "\n printfn ", ["string", "\"F Base1\""], + + ["keyword", "type"], ["class-name", ["Derived1"]], ["punctuation", "("], ["punctuation", ")"], ["operator", "="], + ["keyword", "inherit"], ["class-name", ["Base1"]], ["punctuation", "("], ["punctuation", ")"], + ["keyword", "override"], " u", ["punctuation", "."], ["function", "F"], ["punctuation", "("], ["punctuation", ")"], ["operator", "="], + "\n printfn ", ["string", "\"F Derived1\""], + + ["keyword", "let"], " d1 ", ["punctuation", ":"], ["class-name", ["Derived1"]], ["operator", "="], + ["function", "Derived1"], ["punctuation", "("], ["punctuation", ")"], + + ["keyword", "let"], " base1 ", ["operator", "="], " d1 ", ["operator", ":>"], ["class-name", ["Base1"]], + + ["keyword", "let"], " derived1 ", ["operator", "="], " base1 ", ["operator", ":?>"], ["class-name", ["Derived1"]], + + ["keyword", "type"], ["class-name", ["PersonName"]], ["operator", "="], + ["operator", "|"], " FirstOnly ", ["keyword", "of"], ["class-name", ["string"]], + ["operator", "|"], " LastOnly ", ["keyword", "of"], ["class-name", ["string"]], + ["operator", "|"], " FirstLast ", ["keyword", "of"], ["class-name", ["string ", ["operator", "*"], " string"]], + + ["keyword", "type"], ["class-name", ["Shape"]], ["operator", "="], + ["operator", "|"], " Rectangle ", ["keyword", "of"], + " height ", ["punctuation", ":"], ["class-name", ["float"]], ["operator", "*"], + " width ", ["punctuation", ":"], ["class-name", ["float"]], + ["operator", "|"], " Circle ", ["keyword", "of"], " radius ", ["punctuation", ":"], ["class-name", ["float"]], + + ["keyword", "type"], ["class-name", ["MyInterface"]], ["operator", "="], + ["keyword", "abstract"], ["keyword", "member"], " Add", ["punctuation", ":"], + ["class-name", ["int ", ["operator", "->"], " int ", ["operator", "->"], " int"]], + ["keyword", "abstract"], ["keyword", "member"], " Pi ", ["punctuation", ":"], ["class-name", ["float"]], + + ["keyword", "exception"], ["class-name", ["Error1"]], ["keyword", "of"], ["class-name", ["string"]], + + ["keyword", "exception"], ["class-name", ["Error2"]], ["keyword", "of"], ["class-name", ["string ", ["operator", "*"], " int"]] +] + +---------------------------------------------------- + +Checks for class-names. diff --git a/tests/languages/fsharp/computation-expression_feature.test b/tests/languages/fsharp/computation-expression_feature.test new file mode 100644 index 0000000000..a49c6e3535 --- /dev/null +++ b/tests/languages/fsharp/computation-expression_feature.test @@ -0,0 +1,17 @@ +async {} +task {} +seq {} +foo {} + +---------------------------------------------------- + +[ + ["computation-expression", "async"], ["punctuation", "{"], ["punctuation", "}"], + ["computation-expression", "task"], ["punctuation", "{"], ["punctuation", "}"], + ["computation-expression", "seq"], ["punctuation", "{"], ["punctuation", "}"], + ["computation-expression", "foo"], ["punctuation", "{"], ["punctuation", "}"] +] + +---------------------------------------------------- + +Checks for computation expressions. diff --git a/tests/languages/fsharp/issue1480.test b/tests/languages/fsharp/issue1480.test index f46fce23df..2c692a33df 100644 --- a/tests/languages/fsharp/issue1480.test +++ b/tests/languages/fsharp/issue1480.test @@ -16,8 +16,7 @@ let map (f: 'a -> 'b) (xs: 'a list): 'b list = failWith "not implemented" "f", ["punctuation", ":"], " 'a ", - ["operator", "-"], - ["operator", ">"], + ["operator", "->"], " 'b", ["punctuation", ")"], ["punctuation", "("], @@ -34,4 +33,4 @@ let map (f: 'a -> 'b) (xs: 'a list): 'b list = failWith "not implemented" ---------------------------------------------------- -Checks for apostrophes in names. See #1480. \ No newline at end of file +Checks for apostrophes in names. See #1480. diff --git a/tests/languages/fsharp/keyword_feature.test b/tests/languages/fsharp/keyword_feature.test index d2ef996f47..17f058a5e3 100644 --- a/tests/languages/fsharp/keyword_feature.test +++ b/tests/languages/fsharp/keyword_feature.test @@ -4,19 +4,20 @@ class; default delegate do done downcast downto elif else end -exception extern false finally +exception; +extern false finally for fun function global -if in inherit inline +if in inherit; inline interface; internal lazy let let! match member module mutable namespace new; not -null of open or override +null of; open or override private public rec return return! select static struct -then to true try type +then to true try type; upcast use use! val void when while with yield yield! asr land lor lsl @@ -39,19 +40,20 @@ virtual volatile ["keyword", "default"], ["keyword", "delegate"], ["keyword", "do"], ["keyword", "done"], ["keyword", "downcast"], ["keyword", "downto"], ["keyword", "elif"], ["keyword", "else"], ["keyword", "end"], - ["keyword", "exception"], ["keyword", "extern"], ["keyword", "false"], ["keyword", "finally"], + ["keyword", "exception"], ["punctuation", ";"], + ["keyword", "extern"], ["keyword", "false"], ["keyword", "finally"], ["keyword", "for"], ["keyword", "fun"], ["keyword", "function"], ["keyword", "global"], - ["keyword", "if"], ["keyword", "in"], ["keyword", "inherit"], ["keyword", "inline"], + ["keyword", "if"], ["keyword", "in"], ["keyword", "inherit"], ["punctuation", ";"], ["keyword", "inline"], ["keyword", "interface"], ["punctuation", ";"], ["keyword", "internal"], ["keyword", "lazy"], ["keyword", "let"], ["keyword", "let!"], ["keyword", "match"], ["keyword", "member"], ["keyword", "module"], ["keyword", "mutable"], ["keyword", "namespace"], ["keyword", "new"], ["punctuation", ";"], ["keyword", "not"], - ["keyword", "null"], ["keyword", "of"], ["keyword", "open"], ["keyword", "or"], ["keyword", "override"], + ["keyword", "null"], ["keyword", "of"], ["punctuation", ";"], ["keyword", "open"], ["keyword", "or"], ["keyword", "override"], ["keyword", "private"], ["keyword", "public"], ["keyword", "rec"], ["keyword", "return"], ["keyword", "return!"], ["keyword", "select"], ["keyword", "static"], ["keyword", "struct"], - ["keyword", "then"], ["keyword", "to"], ["keyword", "true"], ["keyword", "try"], ["keyword", "type"], + ["keyword", "then"], ["keyword", "to"], ["keyword", "true"], ["keyword", "try"], ["keyword", "type"], ["punctuation", ";"], ["keyword", "upcast"], ["keyword", "use"], ["keyword", "use!"], ["keyword", "val"], ["keyword", "void"], ["keyword", "when"], ["keyword", "while"], ["keyword", "with"], ["keyword", "yield"], ["keyword", "yield!"], ["keyword", "asr"], ["keyword", "land"], ["keyword", "lor"], ["keyword", "lsl"], @@ -68,4 +70,4 @@ virtual volatile ---------------------------------------------------- -Checks for all keywords. \ No newline at end of file +Checks for all keywords. diff --git a/tests/languages/fsharp/operator_feature.test b/tests/languages/fsharp/operator_feature.test new file mode 100644 index 0000000000..7e15afc40d --- /dev/null +++ b/tests/languages/fsharp/operator_feature.test @@ -0,0 +1,53 @@ + >= <= <> > < = + - * / % + >=? <=? <>? >? =? ?<=? ?<>? ?>? ?= ?<= ?<> ?> ?< ?= ?+ ?- ?* ?/ ?% + +** + +<- -> +.. +:: +:= +:> :? :?> +<< >> +<<< >>> ~~~ ^^^ &&& ||| +| || +<| <|| <||| +|> ||> |||> +~~ ~- ~+ + +? ^ ! +!= == +& && + +---------------------------------------------------- + +[ + ["operator", ">="], ["operator", "<="], ["operator", "<>"], ["operator", ">"], ["operator", "<"], ["operator", "="], ["operator", "+"], ["operator", "-"], ["operator", "*"], ["operator", "/"], ["operator", "%"], + ["operator", ">=?"], ["operator", "<=?"], ["operator", "<>?"], ["operator", ">?"], ["operator", "=?"], ["operator", "?<=?"], ["operator", "?<>?"], ["operator", "?>?"], ["operator", "?="], ["operator", "?<="], ["operator", "?<>"], ["operator", "?>"], ["operator", "?<"], ["operator", "?="], ["operator", "?+"], ["operator", "?-"], ["operator", "?*"], ["operator", "?/"], ["operator", "?%"], + + ["operator", "**"], + + ["operator", "<-"], ["operator", "->"], + ["operator", ".."], + ["operator", "::"], + ["operator", ":="], + ["operator", ":>"], ["operator", ":?"], ["operator", ":?>"], + ["operator", "<<"], ["operator", ">>"], + ["operator", "<<<"], ["operator", ">>>"], ["operator", "~~~"], ["operator", "^^^"], ["operator", "&&&"], ["operator", "|||"], + ["operator", "|"], ["operator", "||"], + ["operator", "<|"], ["operator", "<||"], ["operator", "<|||"], + ["operator", "|>"], ["operator", "||>"], ["operator", "|||>"], + ["operator", "~~"], ["operator", "~-"], ["operator", "~+"], + + ["operator", "?"], ["operator", "^"], ["operator", "!"], + ["operator", "!="], ["operator", "=="], + ["operator", "&"], ["operator", "&&"] +] + +---------------------------------------------------- + +Checks for operators. From 3b1e09160b7a85e080b9a9f3138bf85775808771 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Sat, 1 Dec 2018 21:34:04 +0100 Subject: [PATCH 0110/1100] Improvements to C# operator and punctuation (#1532) Solve the issue of [C# breaking ligature fonts with the `=>` operator](https://github.com/PrismJS/prism/issues/1133#issuecomment-413553956). `=>` is now an operator. There are also some other changes. 1. `?` and `:` are now all included by `punctuation`. Because `:` cannot be included in `operator` (because it is also used for inheritance) the `?` shouldn't be an `operator` either. 2. `??` and `?.` were added to `punctuation`. They weren't explicitly supported before. 3. An operator-test was added. --- components/prism-csharp.js | 6 +- components/prism-csharp.min.js | 2 +- tests/languages/csharp/issue1371.test | 12 ++-- tests/languages/csharp/operator_feature.test | 60 +++++++++++++++++++ .../languages/csharp/punctuation_feature.test | 27 +++++++++ 5 files changed, 96 insertions(+), 11 deletions(-) create mode 100644 tests/languages/csharp/operator_feature.test create mode 100644 tests/languages/csharp/punctuation_feature.test diff --git a/components/prism-csharp.js b/components/prism-csharp.js index 15ce52dc22..6747ea3e2a 100644 --- a/components/prism-csharp.js +++ b/components/prism-csharp.js @@ -43,7 +43,9 @@ Prism.languages.csharp = Prism.languages.extend('clike', { } } ], - 'number': /\b0x[\da-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)f?/i + 'number': /\b0x[\da-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)f?/i, + 'operator': />>=?|<<=?|[-=]>|([-+&|?])\1|~|[-+*/%&|^!=<>]=?/, + 'punctuation': /\?\.?|::|[{}[\];(),.:]/ }); Prism.languages.insertBefore('csharp', 'class-name', { @@ -76,4 +78,4 @@ Prism.languages.insertBefore('csharp', 'class-name', { } }); -Prism.languages.dotnet = Prism.languages.csharp; \ No newline at end of file +Prism.languages.dotnet = Prism.languages.csharp; diff --git a/components/prism-csharp.min.js b/components/prism-csharp.min.js index 6c5de062ff..2f5333750a 100644 --- a/components/prism-csharp.min.js +++ b/components/prism-csharp.min.js @@ -1 +1 @@ -Prism.languages.csharp=Prism.languages.extend("clike",{keyword:/\b(?:abstract|add|alias|as|ascending|async|await|base|bool|break|byte|case|catch|char|checked|class|const|continue|decimal|default|delegate|descending|do|double|dynamic|else|enum|event|explicit|extern|false|finally|fixed|float|for|foreach|from|get|global|goto|group|if|implicit|in|int|interface|internal|into|is|join|let|lock|long|namespace|new|null|object|operator|orderby|out|override|params|partial|private|protected|public|readonly|ref|remove|return|sbyte|sealed|select|set|short|sizeof|stackalloc|static|string|struct|switch|this|throw|true|try|typeof|uint|ulong|unchecked|unsafe|ushort|using|value|var|virtual|void|volatile|where|while|yield)\b/,string:[{pattern:/@("|')(?:\1\1|\\[\s\S]|(?!\1)[^\\])*\1/,greedy:!0},{pattern:/("|')(?:\\.|(?!\1)[^\\\r\n])*?\1/,greedy:!0}],"class-name":[{pattern:/\b[A-Z]\w*(?:\.\w+)*\b(?=\s+\w+)/,inside:{punctuation:/\./}},{pattern:/(\[)[A-Z]\w*(?:\.\w+)*\b/,lookbehind:!0,inside:{punctuation:/\./}},{pattern:/(\b(?:class|interface)\s+[A-Z]\w*(?:\.\w+)*\s*:\s*)[A-Z]\w*(?:\.\w+)*\b/,lookbehind:!0,inside:{punctuation:/\./}},{pattern:/((?:\b(?:class|interface|new)\s+)|(?:catch\s+\())[A-Z]\w*(?:\.\w+)*\b/,lookbehind:!0,inside:{punctuation:/\./}}],number:/\b0x[\da-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)f?/i}),Prism.languages.insertBefore("csharp","class-name",{"generic-method":{pattern:/\w+\s*<[^>\r\n]+?>\s*(?=\()/,inside:{"function":/^\w+/,"class-name":{pattern:/\b[A-Z]\w*(?:\.\w+)*\b/,inside:{punctuation:/\./}},keyword:Prism.languages.csharp.keyword,punctuation:/[<>(),.:]/}},preprocessor:{pattern:/(^\s*)#.*/m,lookbehind:!0,alias:"property",inside:{directive:{pattern:/(\s*#)\b(?:define|elif|else|endif|endregion|error|if|line|pragma|region|undef|warning)\b/,lookbehind:!0,alias:"keyword"}}}}),Prism.languages.dotnet=Prism.languages.csharp; \ No newline at end of file +Prism.languages.csharp=Prism.languages.extend("clike",{keyword:/\b(?:abstract|add|alias|as|ascending|async|await|base|bool|break|byte|case|catch|char|checked|class|const|continue|decimal|default|delegate|descending|do|double|dynamic|else|enum|event|explicit|extern|false|finally|fixed|float|for|foreach|from|get|global|goto|group|if|implicit|in|int|interface|internal|into|is|join|let|lock|long|namespace|new|null|object|operator|orderby|out|override|params|partial|private|protected|public|readonly|ref|remove|return|sbyte|sealed|select|set|short|sizeof|stackalloc|static|string|struct|switch|this|throw|true|try|typeof|uint|ulong|unchecked|unsafe|ushort|using|value|var|virtual|void|volatile|where|while|yield)\b/,string:[{pattern:/@("|')(?:\1\1|\\[\s\S]|(?!\1)[^\\])*\1/,greedy:!0},{pattern:/("|')(?:\\.|(?!\1)[^\\\r\n])*?\1/,greedy:!0}],"class-name":[{pattern:/\b[A-Z]\w*(?:\.\w+)*\b(?=\s+\w+)/,inside:{punctuation:/\./}},{pattern:/(\[)[A-Z]\w*(?:\.\w+)*\b/,lookbehind:!0,inside:{punctuation:/\./}},{pattern:/(\b(?:class|interface)\s+[A-Z]\w*(?:\.\w+)*\s*:\s*)[A-Z]\w*(?:\.\w+)*\b/,lookbehind:!0,inside:{punctuation:/\./}},{pattern:/((?:\b(?:class|interface|new)\s+)|(?:catch\s+\())[A-Z]\w*(?:\.\w+)*\b/,lookbehind:!0,inside:{punctuation:/\./}}],number:/\b0x[\da-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)f?/i,operator:/>>=?|<<=?|[-=]>|([-+&|?])\1|~|[-+*\/%&|^!=<>]=?/,punctuation:/\?[?.]?|::|[{}[\];(),.:]/}),Prism.languages.insertBefore("csharp","class-name",{"generic-method":{pattern:/\w+\s*<[^>\r\n]+?>\s*(?=\()/,inside:{"function":/^\w+/,"class-name":{pattern:/\b[A-Z]\w*(?:\.\w+)*\b/,inside:{punctuation:/\./}},keyword:Prism.languages.csharp.keyword,punctuation:/[<>(),.:]/}},preprocessor:{pattern:/(^\s*)#.*/m,lookbehind:!0,alias:"property",inside:{directive:{pattern:/(\s*#)\b(?:define|elif|else|endif|endregion|error|if|line|pragma|region|undef|warning)\b/,lookbehind:!0,alias:"keyword"}}}}),Prism.languages.dotnet=Prism.languages.csharp; \ No newline at end of file diff --git a/tests/languages/csharp/issue1371.test b/tests/languages/csharp/issue1371.test index 1b2cb7be99..1fec4a0580 100644 --- a/tests/languages/csharp/issue1371.test +++ b/tests/languages/csharp/issue1371.test @@ -48,8 +48,7 @@ class Works : LandAnimal { ["class-name", ["Container"]], ["punctuation", "("], "f ", - ["operator", "="], - ["operator", ">"], + ["operator", "=>"], ["punctuation", "{"], "\r\n f", ["punctuation", "."], @@ -82,8 +81,7 @@ class Works : LandAnimal { ["function", "Move"], ["punctuation", "("], ["punctuation", ")"], - ["operator", "="], - ["operator", ">"], + ["operator", "=>"], ["function", "Run"], ["punctuation", "("], ["punctuation", ")"], @@ -100,8 +98,7 @@ class Works : LandAnimal { ["function", "Move"], ["punctuation", "("], ["punctuation", ")"], - ["operator", "="], - ["operator", ">"], + ["operator", "=>"], ["function", "Run"], ["punctuation", "("], ["punctuation", ")"], @@ -118,8 +115,7 @@ class Works : LandAnimal { ["function", "Move"], ["punctuation", "("], ["punctuation", ")"], - ["operator", "="], - ["operator", ">"], + ["operator", "=>"], ["function", "Run"], ["punctuation", "("], ["punctuation", ")"], diff --git a/tests/languages/csharp/operator_feature.test b/tests/languages/csharp/operator_feature.test new file mode 100644 index 0000000000..4749c38c75 --- /dev/null +++ b/tests/languages/csharp/operator_feature.test @@ -0,0 +1,60 @@ ++ - * / % -- ++ +>> << +~ & | ^ ++= -= *= /= %= >>= <<= &= |= ^= +! && || +-> => += == != < > <= >= +?? + +---------------------------------------------------- + +[ + ["operator", "+"], + ["operator", "-"], + ["operator", "*"], + ["operator", "/"], + ["operator", "%"], + ["operator", "--"], + ["operator", "++"], + + ["operator", ">>"], + ["operator", "<<"], + + ["operator", "~"], + ["operator", "&"], + ["operator", "|"], + ["operator", "^"], + + ["operator", "+="], + ["operator", "-="], + ["operator", "*="], + ["operator", "/="], + ["operator", "%="], + ["operator", ">>="], + ["operator", "<<="], + ["operator", "&="], + ["operator", "|="], + ["operator", "^="], + + ["operator", "!"], + ["operator", "&&"], + ["operator", "||"], + + ["operator", "->"], + ["operator", "=>"], + + ["operator", "="], + ["operator", "=="], + ["operator", "!="], + ["operator", "<"], + ["operator", ">"], + ["operator", "<="], + ["operator", ">="], + + ["operator", "??"] +] + +---------------------------------------------------- + +Checks for all operators. diff --git a/tests/languages/csharp/punctuation_feature.test b/tests/languages/csharp/punctuation_feature.test new file mode 100644 index 0000000000..b9a7bf1499 --- /dev/null +++ b/tests/languages/csharp/punctuation_feature.test @@ -0,0 +1,27 @@ +. , ; : :: +? ?. +[ ] { } ( ) + +---------------------------------------------------- + +[ + ["punctuation", "."], + ["punctuation", ","], + ["punctuation", ";"], + ["punctuation", ":"], + ["punctuation", "::"], + + ["punctuation", "?"], + ["punctuation", "?."], + + ["punctuation", "["], + ["punctuation", "]"], + ["punctuation", "{"], + ["punctuation", "}"], + ["punctuation", "("], + ["punctuation", ")"] +] + +---------------------------------------------------- + +Checks for punctuation. From 81bd8f0bd1ace55ed40e9a243df89be4deda9758 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Sat, 1 Dec 2018 21:44:17 +0100 Subject: [PATCH 0111/1100] Improve Java (#1474) A bunch of small improvements for the Java language. 1. Class highlighting based on [naming conventions](http://www.oracle.com/technetwork/java/javase/overview/codeconventions-135099.html). Because of these conventions, we know that every name which starts with an uppercase letter and contains some lower case letters afterward is a class, interface or enum. 2. Nested generics are now supported. The contents of a generic statement are no longer highlighted as a `function`, but as a `class-name` which is more fitting. 3. Packages will now be highlighted as `namespace`. 4. E.g. `foo::bar`, `bar` will be highlighted as a function. 5. ~Support for `var`.~ #1549 6. `null` is now a keyword. As it should be. --- components/prism-java.js | 75 +++++++++++++------- components/prism-java.min.js | 2 +- tests/languages/java/function_featrue.test | 32 +++++++++ tests/languages/java/generics_feature.test | 28 ++++---- tests/languages/java/issue1351.test | 14 ++-- tests/languages/java/keyword_feature.test | 32 +++++---- tests/languages/java/number_feature.test | 53 +++++++++++--- tests/languages/java/package_feature.test | 80 ++++++++++++++++++++++ 8 files changed, 246 insertions(+), 70 deletions(-) create mode 100644 tests/languages/java/function_featrue.test create mode 100644 tests/languages/java/package_feature.test diff --git a/components/prism-java.js b/components/prism-java.js index 229333bef4..fb138409bb 100644 --- a/components/prism-java.js +++ b/components/prism-java.js @@ -1,27 +1,54 @@ -Prism.languages.java = Prism.languages.extend('clike', { - 'keyword': /\b(?:var|abstract|continue|for|new|switch|assert|default|goto|package|synchronized|boolean|do|if|private|this|break|double|implements|protected|throw|byte|else|import|public|throws|case|enum|instanceof|return|transient|catch|extends|int|short|try|char|final|interface|static|void|class|finally|long|strictfp|volatile|const|float|native|super|while)\b/, - 'number': /\b0b[01]+\b|\b0x[\da-f]*\.?[\da-fp-]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?[df]?/i, - 'operator': { - pattern: /(^|[^.])(?:<<=?|>>>?=?|->|([-+&|])\2|[?:~]|[-+*/%&|^!=<>]=?)/m, - lookbehind: true - } -}); +(function (Prism) { -Prism.languages.insertBefore('java','function', { - 'annotation': { - alias: 'punctuation', - pattern: /(^|[^.])@\w+/, - lookbehind: true - } -}); + var keywords = /\b(?:abstract|continue|for|new|switch|assert|default|goto|package|synchronized|boolean|do|if|private|this|break|double|implements|protected|throw|byte|else|import|public|throws|case|enum|instanceof|return|transient|catch|extends|int|short|try|char|final|interface|static|void|class|finally|long|strictfp|volatile|const|float|native|super|while|var|null)\b/; -Prism.languages.insertBefore('java', 'class-name', { - 'generics': { - pattern: /<\s*\w+(?:\.\w+)?(?:\s*,\s*\w+(?:\.\w+)?)*>/i, - alias: 'function', - inside: { - keyword: Prism.languages.java.keyword, - punctuation: /[<>(),.:]/ + // based on the java naming conventions + var className = /\b[A-Z](?:\w*[a-z]\w*)?\b/; + + Prism.languages.java = Prism.languages.extend('clike', { + 'class-name': [ + className, + + // variables and parameters + // this to support class names (or generic parameters) which do not contain a lower case letter (also works for methods) + /\b[A-Z]\w*(?=\s+\w+\s*[;,=())])/ + ], + 'keyword': keywords, + 'function': [ + Prism.languages.clike.function, + { + pattern: /(\:\:)[a-z_]\w*/, + lookbehind: true + } + ], + 'number': /\b0b[01][01_]*L?\b|\b0x[\da-f_]*\.?[\da-f_p+-]+\b|(?:\b\d[\d_]*\.?[\d_]*|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i, + 'operator': { + pattern: /(^|[^.])(?:<<=?|>>>?=?|->|([-+&|])\2|[?:~]|[-+*/%&|^!=<>]=?)/m, + lookbehind: true + } + }); + + Prism.languages.insertBefore('java', 'class-name', { + 'annotation': { + alias: 'punctuation', + pattern: /(^|[^.])@\w+/, + lookbehind: true + }, + 'namespace': { + pattern: /\b(package\s+|import\s+(?:static\s+)?)[a-z]\w*(\.[a-z]\w*)+/, + lookbehind: true, + inside: { + 'punctuation': /\./, + } + }, + 'generics': { + pattern: /<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<[\w\s,.&?]*>)*>)*>)*>/, + inside: { + 'class-name': className, + 'keyword': keywords, + 'punctuation': /[<>(),.:]/, + 'operator': /[?&|]/ + } } - } -}); + }); +}(Prism)); diff --git a/components/prism-java.min.js b/components/prism-java.min.js index ea612551d1..c71824743d 100644 --- a/components/prism-java.min.js +++ b/components/prism-java.min.js @@ -1 +1 @@ -Prism.languages.java=Prism.languages.extend("clike",{keyword:/\b(?:var|abstract|continue|for|new|switch|assert|default|goto|package|synchronized|boolean|do|if|private|this|break|double|implements|protected|throw|byte|else|import|public|throws|case|enum|instanceof|return|transient|catch|extends|int|short|try|char|final|interface|static|void|class|finally|long|strictfp|volatile|const|float|native|super|while)\b/,number:/\b0b[01]+\b|\b0x[\da-f]*\.?[\da-fp-]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?[df]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|([-+&|])\2|[?:~]|[-+*\/%&|^!=<>]=?)/m,lookbehind:!0}}),Prism.languages.insertBefore("java","function",{annotation:{alias:"punctuation",pattern:/(^|[^.])@\w+/,lookbehind:!0}}),Prism.languages.insertBefore("java","class-name",{generics:{pattern:/<\s*\w+(?:\.\w+)?(?:\s*,\s*\w+(?:\.\w+)?)*>/i,alias:"function",inside:{keyword:Prism.languages.java.keyword,punctuation:/[<>(),.:]/}}}); \ No newline at end of file +!function(a){var e=/\b(?:abstract|continue|for|new|switch|assert|default|goto|package|synchronized|boolean|do|if|private|this|break|double|implements|protected|throw|byte|else|import|public|throws|case|enum|instanceof|return|transient|catch|extends|int|short|try|char|final|interface|static|void|class|finally|long|strictfp|volatile|const|float|native|super|while|var|null)\b/,t=/\b[A-Z](?:\w*[a-z]\w*)?\b/;a.languages.java=a.languages.extend("clike",{"class-name":[t,/\b[A-Z]\w*(?=\s+\w+\s*[;,=())])/],keyword:e,"function":[a.languages.clike.function,{pattern:/(\:\:)[a-z_]\w*/,lookbehind:!0}],number:/\b0b[01][01_]*L?\b|\b0x[\da-f_]*\.?[\da-f_p+-]+\b|(?:\b\d[\d_]*\.?[\d_]*|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|([-+&|])\2|[?:~]|[-+*\/%&|^!=<>]=?)/m,lookbehind:!0}}),a.languages.insertBefore("java","class-name",{annotation:{alias:"punctuation",pattern:/(^|[^.])@\w+/,lookbehind:!0},namespace:{pattern:/\b(package\s+|import\s+(?:static\s+)?)[a-z]\w*(\.[a-z]\w*)+/,lookbehind:!0,inside:{punctuation:/\./}},generics:{pattern:/<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<[\w\s,.&?]*>)*>)*>)*>/,inside:{"class-name":t,keyword:e,punctuation:/[<>(),.:]/,operator:/[?&|]/}}})}(Prism); \ No newline at end of file diff --git a/tests/languages/java/function_featrue.test b/tests/languages/java/function_featrue.test new file mode 100644 index 0000000000..2ca6169f8e --- /dev/null +++ b/tests/languages/java/function_featrue.test @@ -0,0 +1,32 @@ +void foo(int a) {} +foo(0); +Bar::foo; + +---------------------------------------------------- + +[ + ["keyword", "void"], + ["function", "foo"], + ["punctuation", "("], + ["keyword", "int"], + " a", + ["punctuation", ")"], + ["punctuation", "{"], + ["punctuation", "}"], + + ["function", "foo"], + ["punctuation", "("], + ["number", "0"], + ["punctuation", ")"], + ["punctuation", ";"], + + ["class-name", "Bar"], + ["operator", ":"], + ["operator", ":"], + ["function", "foo"], + ["punctuation", ";"] +] + +---------------------------------------------------- + +Checks for functions. diff --git a/tests/languages/java/generics_feature.test b/tests/languages/java/generics_feature.test index 66bfef58bb..d1d5e5363a 100644 --- a/tests/languages/java/generics_feature.test +++ b/tests/languages/java/generics_feature.test @@ -7,49 +7,51 @@ Duo dual = new Duo(12.2585, 'C'); [ ["keyword", "public"], ["keyword", "class"], - ["class-name", ["Solo"]], + ["class-name", "Solo"], ["generics", [ ["punctuation", "<"], - "T", + ["class-name", "T"], ["punctuation", ">"] ]], ["punctuation", "{"], ["punctuation", "}"], - "\r\nSolo", + + ["class-name", "Solo"], ["generics", [ ["punctuation", "<"], - "Integer", + ["class-name", "Integer"], ["punctuation", ">"] ]], " val ", ["operator", "="], ["keyword", "new"], - ["class-name", ["Solo"]], + ["class-name", "Solo"], ["generics", [ ["punctuation", "<"], - "Integer", + ["class-name", "Integer"], ["punctuation", ">"] ]], ["punctuation", "("], ["punctuation", ")"], ["punctuation", ";"], - "\r\nDuo", + + ["class-name", "Duo"], ["generics", [ ["punctuation", "<"], - "Double", + ["class-name", "Double"], ["punctuation", ","], - " Character", + ["class-name", "Character"], ["punctuation", ">"] ]], " dual ", ["operator", "="], ["keyword", "new"], - ["class-name", ["Duo"]], + ["class-name", "Duo"], ["generics", [ ["punctuation", "<"], - "Double", + ["class-name", "Double"], ["punctuation", ","], - " Character", + ["class-name", "Character"], ["punctuation", ">"] ]], ["punctuation", "("], @@ -62,4 +64,4 @@ Duo dual = new Duo(12.2585, 'C'); ---------------------------------------------------- -Checks for generics. \ No newline at end of file +Checks for generics. diff --git a/tests/languages/java/issue1351.test b/tests/languages/java/issue1351.test index 0162eec6c4..3034e3e857 100644 --- a/tests/languages/java/issue1351.test +++ b/tests/languages/java/issue1351.test @@ -5,18 +5,18 @@ public class AllChangesIndexer extends SiteIndexer"] ]], ["punctuation", "{"] @@ -24,4 +24,4 @@ public class AllChangesIndexer extends SiteIndexer Date: Sat, 1 Dec 2018 21:44:57 +0100 Subject: [PATCH 0112/1100] Improve regex detection in JS (#1473) The pattern for regular expressions in JS now also matches empty character sets and it handles expressions like `/[\]/]/` now correctly. --- components/prism-javascript.js | 2 +- components/prism-javascript.min.js | 2 +- prism.js | 2 +- tests/languages/javascript/regex_feature.test | 10 +++++++--- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/components/prism-javascript.js b/components/prism-javascript.js index 58f037a9d3..c2ffa36754 100644 --- a/components/prism-javascript.js +++ b/components/prism-javascript.js @@ -23,7 +23,7 @@ Prism.languages.javascript['class-name'][0].pattern = /(\b(?:class|interface|ext Prism.languages.insertBefore('javascript', 'keyword', { 'regex': { - pattern: /((?:^|[^$\w\xA0-\uFFFF."'\])\s])\s*)\/(\[[^\]\r\n]+]|\\.|[^/\\\[\r\n])+\/[gimyu]{0,5}(?=\s*($|[\r\n,.;})\]]))/, + pattern: /((?:^|[^$\w\xA0-\uFFFF."'\])\s])\s*)\/(\[(?:[^\]\\\r\n]|\\.)*]|\\.|[^/\\\[\r\n])+\/[gimyu]{0,5}(?=\s*($|[\r\n,.;})\]]))/, lookbehind: true, greedy: true }, diff --git a/components/prism-javascript.min.js b/components/prism-javascript.min.js index 64234b0e6f..a0042da32f 100644 --- a/components/prism-javascript.min.js +++ b/components/prism-javascript.min.js @@ -1 +1 @@ -Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])[_$A-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\.(?:prototype|constructor))/,lookbehind:!0}],keyword:[{pattern:/((?:^|})\s*)(?:catch|finally)\b/,lookbehind:!0},/\b(?:as|async|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|var|void|while|with|yield)\b/],number:/\b(?:(?:0[xX][\dA-Fa-f]+|0[bB][01]+|0[oO][0-7]+)n?|\d+n|NaN|Infinity)\b|(?:\b\d+\.?\d*|\B\.\d+)(?:[Ee][+-]?\d+)?/,"function":/[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*\(|\.(?:apply|bind|call)\()/,operator:/-[-=]?|\+[+=]?|!=?=?|<>?>?=?|=(?:==?|>)?|&[&=]?|\|[|=]?|\*\*?=?|\/=?|~|\^=?|%=?|\?|\.{3}/}),Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/,Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s])\s*)\/(\[[^\]\r\n]+]|\\.|[^\/\\\[\r\n])+\/[gimyu]{0,5}(?=\s*($|[\r\n,.;})\]]))/,lookbehind:!0,greedy:!0},"function-variable":{pattern:/[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*[=:]\s*(?:function\b|(?:\([^()]*\)|[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/i,alias:"function"},constant:/\b[A-Z][A-Z\d_]*\b/}),Prism.languages.insertBefore("javascript","string",{"template-string":{pattern:/`(?:\\[\s\S]|\${[^}]+}|[^\\`])*`/,greedy:!0,inside:{interpolation:{pattern:/\${[^}]+}/,inside:{"interpolation-punctuation":{pattern:/^\${|}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}}}),Prism.languages.markup&&Prism.languages.insertBefore("markup","tag",{script:{pattern:/()[\s\S]*?(?=<\/script>)/i,lookbehind:!0,inside:Prism.languages.javascript,alias:"language-javascript",greedy:!0}}),Prism.languages.js=Prism.languages.javascript; \ No newline at end of file +Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])[_$A-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\.(?:prototype|constructor))/,lookbehind:!0}],keyword:[{pattern:/((?:^|})\s*)(?:catch|finally)\b/,lookbehind:!0},/\b(?:as|async|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|var|void|while|with|yield)\b/],number:/\b(?:(?:0[xX][\dA-Fa-f]+|0[bB][01]+|0[oO][0-7]+)n?|\d+n|NaN|Infinity)\b|(?:\b\d+\.?\d*|\B\.\d+)(?:[Ee][+-]?\d+)?/,"function":/[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*\(|\.(?:apply|bind|call)\()/,operator:/-[-=]?|\+[+=]?|!=?=?|<>?>?=?|=(?:==?|>)?|&[&=]?|\|[|=]?|\*\*?=?|\/=?|~|\^=?|%=?|\?|\.{3}/}),Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/,Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s])\s*)\/(\[(?:[^\]\\\r\n]|\\.)*]|\\.|[^\/\\\[\r\n])+\/[gimyu]{0,5}(?=\s*($|[\r\n,.;})\]]))/,lookbehind:!0,greedy:!0},"function-variable":{pattern:/[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*[=:]\s*(?:function\b|(?:\([^()]*\)|[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/i,alias:"function"},constant:/\b[A-Z][A-Z\d_]*\b/}),Prism.languages.insertBefore("javascript","string",{"template-string":{pattern:/`(?:\\[\s\S]|\${[^}]+}|[^\\`])*`/,greedy:!0,inside:{interpolation:{pattern:/\${[^}]+}/,inside:{"interpolation-punctuation":{pattern:/^\${|}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}}}),Prism.languages.markup&&Prism.languages.insertBefore("markup","tag",{script:{pattern:/()[\s\S]*?(?=<\/script>)/i,lookbehind:!0,inside:Prism.languages.javascript,alias:"language-javascript",greedy:!0}}),Prism.languages.js=Prism.languages.javascript; \ No newline at end of file diff --git a/prism.js b/prism.js index 1e05c18d2c..88c331e50f 100644 --- a/prism.js +++ b/prism.js @@ -738,7 +738,7 @@ Prism.languages.javascript['class-name'][0].pattern = /(\b(?:class|interface|ext Prism.languages.insertBefore('javascript', 'keyword', { 'regex': { - pattern: /((?:^|[^$\w\xA0-\uFFFF."'\])\s])\s*)\/(\[[^\]\r\n]+]|\\.|[^/\\\[\r\n])+\/[gimyu]{0,5}(?=\s*($|[\r\n,.;})\]]))/, + pattern: /((?:^|[^$\w\xA0-\uFFFF."'\])\s])\s*)\/(\[(?:[^\]\\\r\n]|\\.)*]|\\.|[^/\\\[\r\n])+\/[gimyu]{0,5}(?=\s*($|[\r\n,.;})\]]))/, lookbehind: true, greedy: true }, diff --git a/tests/languages/javascript/regex_feature.test b/tests/languages/javascript/regex_feature.test index da5501c01c..e08db8a26e 100644 --- a/tests/languages/javascript/regex_feature.test +++ b/tests/languages/javascript/regex_feature.test @@ -2,7 +2,9 @@ /foo/gimyu, /[\[\]]{2,4}(?:foo)*/; /foo"test"bar/; -/foo\// +/foo\//; +/[]/; +/[\]/]/; 1 / 4 + "/, not a regex"; / '1' '2' '3' '4' '5' / [/foo/] @@ -14,7 +16,9 @@ ["regex", "/foo/gimyu"], ["punctuation", ","], ["regex", "/[\\[\\]]{2,4}(?:foo)*/"], ["punctuation", ";"], ["regex", "/foo\"test\"bar/"], ["punctuation", ";"], - ["regex", "/foo\\//"], + ["regex", "/foo\\//"], ["punctuation", ";"], + ["regex", "/[]/"], ["punctuation", ";"], + ["regex", "/[\\]/]/"], ["punctuation", ";"], ["number", "1"], ["operator", "/"], ["number", "4"], ["operator", "+"], ["string", "\"/, not a regex\""], ["punctuation", ";"], ["regex", "/ '1' '2' '3' '4' '5' /"], ["punctuation", "["], ["regex", "/foo/"], ["punctuation", "]"] @@ -22,4 +26,4 @@ ---------------------------------------------------- -Checks for regex. \ No newline at end of file +Checks for regex. From 7277591992394e27335234828345ff6cbaa33bb0 Mon Sep 17 00:00:00 2001 From: Cameron Bothner Date: Sat, 1 Dec 2018 16:38:05 -0500 Subject: [PATCH 0113/1100] Consistent Ruby method highlighting (#1523) Ruby methods might or might be called in C-style creating inconsistent highlighting. This highlights only method definitions and removes the highlighting of C-style-invoked methods. --- components/prism-ruby.js | 12 ++- components/prism-ruby.min.js | 2 +- .../languages/crystal/attribute_feature.test | 2 +- tests/languages/crystal/keyword_feature.test | 6 +- .../languages/erb/erb_in_markup_feature.test | 4 +- tests/languages/haml/tag_feature.test | 4 +- tests/languages/ruby/keyword_feature.test | 6 +- .../ruby/method_definition_feature.test | 82 +++++++++++++++++++ 8 files changed, 106 insertions(+), 12 deletions(-) create mode 100644 tests/languages/ruby/method_definition_feature.test diff --git a/components/prism-ruby.js b/components/prism-ruby.js index 53a6840c54..72b5ebbade 100644 --- a/components/prism-ruby.js +++ b/components/prism-ruby.js @@ -27,6 +27,8 @@ } }; + delete Prism.languages.ruby.function; + Prism.languages.insertBefore('ruby', 'keyword', { 'regex': [ { @@ -75,6 +77,14 @@ 'symbol': { pattern: /(^|[^:]):[a-zA-Z_]\w*(?:[?!]|\b)/, lookbehind: true + }, + 'method-definition': { + pattern: /(\bdef\s+)[\w.]+/, + lookbehind: true, + inside: { + 'function': /\w+$/, + rest: Prism.languages.ruby + } } }); @@ -128,4 +138,4 @@ } } ]; -}(Prism)); \ No newline at end of file +}(Prism)); diff --git a/components/prism-ruby.min.js b/components/prism-ruby.min.js index 48a5092369..7720acc7d2 100644 --- a/components/prism-ruby.min.js +++ b/components/prism-ruby.min.js @@ -1 +1 @@ -!function(e){e.languages.ruby=e.languages.extend("clike",{comment:[/#.*/,{pattern:/^=begin(?:\r?\n|\r)(?:.*(?:\r?\n|\r))*?=end/m,greedy:!0}],keyword:/\b(?:alias|and|BEGIN|begin|break|case|class|def|define_method|defined|do|each|else|elsif|END|end|ensure|false|for|if|in|module|new|next|nil|not|or|protected|private|public|raise|redo|require|rescue|retry|return|self|super|then|throw|true|undef|unless|until|when|while|yield)\b/});var n={pattern:/#\{[^}]+\}/,inside:{delimiter:{pattern:/^#\{|\}$/,alias:"tag"},rest:e.languages.ruby}};e.languages.insertBefore("ruby","keyword",{regex:[{pattern:/%r([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1[gim]{0,3}/,greedy:!0,inside:{interpolation:n}},{pattern:/%r\((?:[^()\\]|\\[\s\S])*\)[gim]{0,3}/,greedy:!0,inside:{interpolation:n}},{pattern:/%r\{(?:[^#{}\\]|#(?:\{[^}]+\})?|\\[\s\S])*\}[gim]{0,3}/,greedy:!0,inside:{interpolation:n}},{pattern:/%r\[(?:[^\[\]\\]|\\[\s\S])*\][gim]{0,3}/,greedy:!0,inside:{interpolation:n}},{pattern:/%r<(?:[^<>\\]|\\[\s\S])*>[gim]{0,3}/,greedy:!0,inside:{interpolation:n}},{pattern:/(^|[^\/])\/(?!\/)(\[.+?]|\\.|[^\/\\\r\n])+\/[gim]{0,3}(?=\s*($|[\r\n,.;})]))/,lookbehind:!0,greedy:!0}],variable:/[@$]+[a-zA-Z_]\w*(?:[?!]|\b)/,symbol:{pattern:/(^|[^:]):[a-zA-Z_]\w*(?:[?!]|\b)/,lookbehind:!0}}),e.languages.insertBefore("ruby","number",{builtin:/\b(?:Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Stat|Fixnum|Float|Hash|Integer|IO|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|String|Struct|TMS|Symbol|ThreadGroup|Thread|Time|TrueClass)\b/,constant:/\b[A-Z]\w*(?:[?!]|\b)/}),e.languages.ruby.string=[{pattern:/%[qQiIwWxs]?([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1/,greedy:!0,inside:{interpolation:n}},{pattern:/%[qQiIwWxs]?\((?:[^()\\]|\\[\s\S])*\)/,greedy:!0,inside:{interpolation:n}},{pattern:/%[qQiIwWxs]?\{(?:[^#{}\\]|#(?:\{[^}]+\})?|\\[\s\S])*\}/,greedy:!0,inside:{interpolation:n}},{pattern:/%[qQiIwWxs]?\[(?:[^\[\]\\]|\\[\s\S])*\]/,greedy:!0,inside:{interpolation:n}},{pattern:/%[qQiIwWxs]?<(?:[^<>\\]|\\[\s\S])*>/,greedy:!0,inside:{interpolation:n}},{pattern:/("|')(?:#\{[^}]+\}|\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0,inside:{interpolation:n}}]}(Prism); \ No newline at end of file +!function(e){e.languages.ruby=e.languages.extend("clike",{comment:[/#.*/,{pattern:/^=begin(?:\r?\n|\r)(?:.*(?:\r?\n|\r))*?=end/m,greedy:!0}],keyword:/\b(?:alias|and|BEGIN|begin|break|case|class|def|define_method|defined|do|each|else|elsif|END|end|ensure|false|for|if|in|module|new|next|nil|not|or|protected|private|public|raise|redo|require|rescue|retry|return|self|super|then|throw|true|undef|unless|until|when|while|yield)\b/});var n={pattern:/#\{[^}]+\}/,inside:{delimiter:{pattern:/^#\{|\}$/,alias:"tag"},rest:e.languages.ruby}};delete e.languages.ruby.function,e.languages.insertBefore("ruby","keyword",{regex:[{pattern:/%r([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1[gim]{0,3}/,greedy:!0,inside:{interpolation:n}},{pattern:/%r\((?:[^()\\]|\\[\s\S])*\)[gim]{0,3}/,greedy:!0,inside:{interpolation:n}},{pattern:/%r\{(?:[^#{}\\]|#(?:\{[^}]+\})?|\\[\s\S])*\}[gim]{0,3}/,greedy:!0,inside:{interpolation:n}},{pattern:/%r\[(?:[^\[\]\\]|\\[\s\S])*\][gim]{0,3}/,greedy:!0,inside:{interpolation:n}},{pattern:/%r<(?:[^<>\\]|\\[\s\S])*>[gim]{0,3}/,greedy:!0,inside:{interpolation:n}},{pattern:/(^|[^\/])\/(?!\/)(\[.+?]|\\.|[^\/\\\r\n])+\/[gim]{0,3}(?=\s*($|[\r\n,.;})]))/,lookbehind:!0,greedy:!0}],variable:/[@$]+[a-zA-Z_]\w*(?:[?!]|\b)/,symbol:{pattern:/(^|[^:]):[a-zA-Z_]\w*(?:[?!]|\b)/,lookbehind:!0},"method-definition":{pattern:/(\bdef\s+)[\w.]+/,lookbehind:!0,inside:{"function":/\w+$/,rest:e.languages.ruby}}}),e.languages.insertBefore("ruby","number",{builtin:/\b(?:Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Stat|Fixnum|Float|Hash|Integer|IO|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|String|Struct|TMS|Symbol|ThreadGroup|Thread|Time|TrueClass)\b/,constant:/\b[A-Z]\w*(?:[?!]|\b)/}),e.languages.ruby.string=[{pattern:/%[qQiIwWxs]?([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1/,greedy:!0,inside:{interpolation:n}},{pattern:/%[qQiIwWxs]?\((?:[^()\\]|\\[\s\S])*\)/,greedy:!0,inside:{interpolation:n}},{pattern:/%[qQiIwWxs]?\{(?:[^#{}\\]|#(?:\{[^}]+\})?|\\[\s\S])*\}/,greedy:!0,inside:{interpolation:n}},{pattern:/%[qQiIwWxs]?\[(?:[^\[\]\\]|\\[\s\S])*\]/,greedy:!0,inside:{interpolation:n}},{pattern:/%[qQiIwWxs]?<(?:[^<>\\]|\\[\s\S])*>/,greedy:!0,inside:{interpolation:n}},{pattern:/("|')(?:#\{[^}]+\}|\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0,inside:{interpolation:n}}]}(Prism); \ No newline at end of file diff --git a/tests/languages/crystal/attribute_feature.test b/tests/languages/crystal/attribute_feature.test index 02d07afd7a..4fb0bad1d0 100644 --- a/tests/languages/crystal/attribute_feature.test +++ b/tests/languages/crystal/attribute_feature.test @@ -11,7 +11,7 @@ ]], ["attribute", [ ["delimiter", "@["], - ["function", "CallConvention"], ["punctuation", "("], ["string", [ "\"X86_StdCall\"" ]], ["punctuation", ")"], + ["constant", "CallConvention"], ["punctuation", "("], ["string", [ "\"X86_StdCall\"" ]], ["punctuation", ")"], ["delimiter", "]"] ]] ] diff --git a/tests/languages/crystal/keyword_feature.test b/tests/languages/crystal/keyword_feature.test index ea15473e98..962beadf84 100644 --- a/tests/languages/crystal/keyword_feature.test +++ b/tests/languages/crystal/keyword_feature.test @@ -1,6 +1,7 @@ abstract alias as asm begin break case class; -def do else elsif +def; +do else elsif end ensure enum extend for fun if include instance_sizeof .is_a? @@ -17,7 +18,8 @@ __FILE__ __LINE__ [ ["keyword", "abstract"], ["keyword", "alias"], ["keyword", "as"], ["keyword", "asm"], ["keyword", "begin"], ["keyword", "break"], ["keyword", "case"], ["keyword", "class"], ["punctuation", ";"], - ["keyword", "def"], ["keyword", "do"], ["keyword", "else"], ["keyword", "elsif"], + ["keyword", "def"], ["punctuation", ";"], + ["keyword", "do"], ["keyword", "else"], ["keyword", "elsif"], ["keyword", "end"], ["keyword", "ensure"], ["keyword", "enum"], ["keyword", "extend"], ["keyword", "for"], ["keyword", "fun"], ["keyword", "if"], ["keyword", "include"], ["keyword", "instance_sizeof"], ["punctuation", "."], ["keyword", "is_a?"], diff --git a/tests/languages/erb/erb_in_markup_feature.test b/tests/languages/erb/erb_in_markup_feature.test index 6bdb845705..20719ea8c6 100644 --- a/tests/languages/erb/erb_in_markup_feature.test +++ b/tests/languages/erb/erb_in_markup_feature.test @@ -19,7 +19,7 @@ ___ERB1___<%= 1 %>___ERB2___<%= 2 %> ["punctuation", "."], "now", ["punctuation", "."], - ["function", "strftime"], + "strftime", ["punctuation", "("], ["string", ["'%A'"]], ["punctuation", ")"], @@ -45,4 +45,4 @@ ___ERB1___<%= 1 %>___ERB2___<%= 2 %> ---------------------------------------------------- -Checks for ERB inside Markup \ No newline at end of file +Checks for ERB inside Markup diff --git a/tests/languages/haml/tag_feature.test b/tests/languages/haml/tag_feature.test index e5927d04a9..a1e0c0de8d 100644 --- a/tests/languages/haml/tag_feature.test +++ b/tests/languages/haml/tag_feature.test @@ -105,7 +105,7 @@ "%html", ["attributes", [ ["punctuation", "{"], - ["function", "html_attrs"], + "html_attrs", ["punctuation", "("], ["string", ["'fr-fr'"]], ["punctuation", ")"], @@ -158,4 +158,4 @@ Checks for tags: basic element names, attributes, html-style attributes, attribute methods, boolean attributes, class and id shortcuts, -implicit div elements, empty tags and whitespace removal. \ No newline at end of file +implicit div elements, empty tags and whitespace removal. diff --git a/tests/languages/ruby/keyword_feature.test b/tests/languages/ruby/keyword_feature.test index f9af2a3599..c67c45d01a 100644 --- a/tests/languages/ruby/keyword_feature.test +++ b/tests/languages/ruby/keyword_feature.test @@ -5,7 +5,7 @@ begin break case class; -def +def; define_method defined do @@ -56,7 +56,7 @@ yield ["keyword", "break"], ["keyword", "case"], ["keyword", "class"], ["punctuation", ";"], - ["keyword", "def"], + ["keyword", "def"], ["punctuation", ";"], ["keyword", "define_method"], ["keyword", "defined"], ["keyword", "do"], @@ -100,4 +100,4 @@ yield ---------------------------------------------------- -Checks for all keywords. \ No newline at end of file +Checks for all keywords. diff --git a/tests/languages/ruby/method_definition_feature.test b/tests/languages/ruby/method_definition_feature.test new file mode 100644 index 0000000000..ee8b5ec530 --- /dev/null +++ b/tests/languages/ruby/method_definition_feature.test @@ -0,0 +1,82 @@ +class Circle + def self.of_diameter(diameter) + new diameter / 2 + end + + def initialize(radius) + @radius = radius + end + + def circumference + Math::PI * radius ** 2 + end + + # Seattle style + def grow_by factor: + @radius = @radius * factor + end +end + +---------------------------------------------------- + +[ + ["keyword", "class"], + ["class-name", ["Circle"]], + ["keyword", "def"], + ["method-definition", [ + ["keyword", "self"], + ["punctuation", "."], + ["function", "of_diameter"] + ]], + ["punctuation", "("], + "diameter", + ["punctuation", ")"], + ["keyword", "new"], + ["class-name", ["diameter"]], + ["operator", "/"], + ["number", "2"], + ["keyword", "end"], + ["keyword", "def"], + ["method-definition", [ + ["function", "initialize"] + ]], + ["punctuation", "("], + "radius", + ["punctuation", ")"], + ["variable", "@radius"], + ["operator", "="], + " radius\n ", + ["keyword", "end"], + ["keyword", "def"], + ["method-definition", [ + ["function", "circumference"] + ]], + ["constant", "Math"], + ["punctuation", ":"], + ["punctuation", ":"], + ["constant", "PI"], + ["operator", "*"], + " radius ", + ["operator", "*"], + ["operator", "*"], + ["number", "2"], + ["keyword", "end"], + ["comment", "# Seattle style"], + ["keyword", "def"], + ["method-definition", [ + ["function", "grow_by"] + ]], + " factor", + ["punctuation", ":"], + ["variable", "@radius"], + ["operator", "="], + ["variable", "@radius"], + ["operator", "*"], + " factor\n ", + ["keyword", "end"], + ["keyword", "end"] +] + +---------------------------------------------------- + +Checks that method definitions are highlighted correctly From d33d259c5599813f1d45fe4b1d51c09b76fffef7 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Sun, 2 Dec 2018 00:02:57 +0100 Subject: [PATCH 0114/1100] Ignore duplicates in insertBefore (#1628) Fix #1525 and implement option number 2. --- components/prism-core.js | 10 +++++----- components/prism-core.min.js | 2 +- components/prism-csharp.min.js | 2 +- components/prism-jolie.js | 1 - components/prism-jolie.min.js | 2 +- components/prism-sass.js | 1 - components/prism-sass.min.js | 2 +- components/prism-tt2.js | 3 --- components/prism-tt2.min.js | 2 +- prism.js | 10 +++++----- 10 files changed, 15 insertions(+), 20 deletions(-) diff --git a/components/prism-core.js b/components/prism-core.js index 7956b3ee75..036870f3b2 100644 --- a/components/prism-core.js +++ b/components/prism-core.js @@ -96,7 +96,7 @@ var _ = _self.Prism = { /** * Insert a token before another token in a language literal * As this needs to recreate the object (we cannot actually insert before keys in object literals), - * we cannot just provide an object, we need anobject and a key. + * we cannot just provide an object, we need an object and a key. * @param inside The key (or language id) of the parent * @param before The key to insert before. * @param insert Object with the key/value pairs to insert @@ -108,20 +108,20 @@ var _ = _self.Prism = { var ret = {}; for (var token in grammar) { - if (grammar.hasOwnProperty(token)) { if (token == before) { - for (var newToken in insert) { - if (insert.hasOwnProperty(newToken)) { ret[newToken] = insert[newToken]; } } } - ret[token] = grammar[token]; + // Do not insert token which also occur in insert. See #1525 + if (!insert.hasOwnProperty(token)) { + ret[token] = grammar[token]; + } } } diff --git a/components/prism-core.min.js b/components/prism-core.min.js index 0c431ce5b2..73c55c9682 100644 --- a/components/prism-core.min.js +++ b/components/prism-core.min.js @@ -1 +1 @@ -var _self="undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{},Prism=function(){var e=/\blang(?:uage)?-([\w-]+)\b/i,t=0,n=_self.Prism={manual:_self.Prism&&_self.Prism.manual,disableWorkerMessageHandler:_self.Prism&&_self.Prism.disableWorkerMessageHandler,util:{encode:function(e){return e instanceof a?new a(e.type,n.util.encode(e.content),e.alias):"Array"===n.util.type(e)?e.map(n.util.encode):e.replace(/&/g,"&").replace(/e.length)return;if(!(w instanceof s)){if(m&&b!=t.length-1){h.lastIndex=k;var _=h.exec(e);if(!_)break;for(var j=_.index+(d?_[1].length:0),A=_.index+_[0].length,P=b,x=k,I=t.length;I>P&&(A>x||!t[P].type&&!t[P-1].greedy);++P)x+=t[P].length,j>=x&&(++b,k=x);if(t[b]instanceof s)continue;N=P-b,w=e.slice(k,x),_.index-=k}else{h.lastIndex=0;var _=h.exec(w),N=1}if(_){d&&(p=_[1]?_[1].length:0);var j=_.index+p,_=_[0].slice(p),A=j+_.length,O=w.slice(0,j),S=w.slice(A),C=[b,N];O&&(++b,k+=O.length,C.push(O));var E=new s(u,f?n.tokenize(_,f):_,y,_,m);if(C.push(E),S&&C.push(S),Array.prototype.splice.apply(t,C),1!=N&&n.matchGrammar(e,t,a,b,k,!0,u),i)break}else if(i)break}}}}},tokenize:function(e,t){var a=[e],r=t.rest;if(r){for(var l in r)t[l]=r[l];delete t.rest}return n.matchGrammar(e,a,t,0,0,!1),a},hooks:{all:{},add:function(e,t){var a=n.hooks.all;a[e]=a[e]||[],a[e].push(t)},run:function(e,t){var a=n.hooks.all[e];if(a&&a.length)for(var r,l=0;r=a[l++];)r(t)}}},a=n.Token=function(e,t,n,a,r){this.type=e,this.content=t,this.alias=n,this.length=0|(a||"").length,this.greedy=!!r};if(a.stringify=function(e,t,r){if("string"==typeof e)return e;if("Array"===n.util.type(e))return e.map(function(n){return a.stringify(n,t,e)}).join("");var l={type:e.type,content:a.stringify(e.content,t,r),tag:"span",classes:["token",e.type],attributes:{},language:t,parent:r};if(e.alias){var i="Array"===n.util.type(e.alias)?e.alias:[e.alias];Array.prototype.push.apply(l.classes,i)}n.hooks.run("wrap",l);var o=Object.keys(l.attributes).map(function(e){return e+'="'+(l.attributes[e]||"").replace(/"/g,""")+'"'}).join(" ");return"<"+l.tag+' class="'+l.classes.join(" ")+'"'+(o?" "+o:"")+">"+l.content+""},!_self.document)return _self.addEventListener?(n.disableWorkerMessageHandler||_self.addEventListener("message",function(e){var t=JSON.parse(e.data),a=t.language,r=t.code,l=t.immediateClose;_self.postMessage(n.highlight(r,n.languages[a],a)),l&&_self.close()},!1),_self.Prism):_self.Prism;var r=document.currentScript||[].slice.call(document.getElementsByTagName("script")).pop();return r&&(n.filename=r.src,n.manual||r.hasAttribute("data-manual")||("loading"!==document.readyState?window.requestAnimationFrame?window.requestAnimationFrame(n.highlightAll):window.setTimeout(n.highlightAll,16):document.addEventListener("DOMContentLoaded",n.highlightAll))),_self.Prism}();"undefined"!=typeof module&&module.exports&&(module.exports=Prism),"undefined"!=typeof global&&(global.Prism=Prism); \ No newline at end of file +var _self="undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{},Prism=function(){var e=/\blang(?:uage)?-([\w-]+)\b/i,t=0,n=_self.Prism={manual:_self.Prism&&_self.Prism.manual,disableWorkerMessageHandler:_self.Prism&&_self.Prism.disableWorkerMessageHandler,util:{encode:function(e){return e instanceof a?new a(e.type,n.util.encode(e.content),e.alias):"Array"===n.util.type(e)?e.map(n.util.encode):e.replace(/&/g,"&").replace(/e.length)return;if(!(w instanceof s)){if(m&&b!=t.length-1){h.lastIndex=k;var _=h.exec(e);if(!_)break;for(var j=_.index+(d?_[1].length:0),P=_.index+_[0].length,A=b,x=k,O=t.length;O>A&&(P>x||!t[A].type&&!t[A-1].greedy);++A)x+=t[A].length,j>=x&&(++b,k=x);if(t[b]instanceof s)continue;I=A-b,w=e.slice(k,x),_.index-=k}else{h.lastIndex=0;var _=h.exec(w),I=1}if(_){d&&(p=_[1]?_[1].length:0);var j=_.index+p,_=_[0].slice(p),P=j+_.length,N=w.slice(0,j),S=w.slice(P),C=[b,I];N&&(++b,k+=N.length,C.push(N));var E=new s(u,f?n.tokenize(_,f):_,y,_,m);if(C.push(E),S&&C.push(S),Array.prototype.splice.apply(t,C),1!=I&&n.matchGrammar(e,t,a,b,k,!0,u),i)break}else if(i)break}}}}},tokenize:function(e,t){var a=[e],r=t.rest;if(r){for(var l in r)t[l]=r[l];delete t.rest}return n.matchGrammar(e,a,t,0,0,!1),a},hooks:{all:{},add:function(e,t){var a=n.hooks.all;a[e]=a[e]||[],a[e].push(t)},run:function(e,t){var a=n.hooks.all[e];if(a&&a.length)for(var r,l=0;r=a[l++];)r(t)}}},a=n.Token=function(e,t,n,a,r){this.type=e,this.content=t,this.alias=n,this.length=0|(a||"").length,this.greedy=!!r};if(a.stringify=function(e,t,r){if("string"==typeof e)return e;if("Array"===n.util.type(e))return e.map(function(n){return a.stringify(n,t,e)}).join("");var l={type:e.type,content:a.stringify(e.content,t,r),tag:"span",classes:["token",e.type],attributes:{},language:t,parent:r};if(e.alias){var i="Array"===n.util.type(e.alias)?e.alias:[e.alias];Array.prototype.push.apply(l.classes,i)}n.hooks.run("wrap",l);var o=Object.keys(l.attributes).map(function(e){return e+'="'+(l.attributes[e]||"").replace(/"/g,""")+'"'}).join(" ");return"<"+l.tag+' class="'+l.classes.join(" ")+'"'+(o?" "+o:"")+">"+l.content+""},!_self.document)return _self.addEventListener?(n.disableWorkerMessageHandler||_self.addEventListener("message",function(e){var t=JSON.parse(e.data),a=t.language,r=t.code,l=t.immediateClose;_self.postMessage(n.highlight(r,n.languages[a],a)),l&&_self.close()},!1),_self.Prism):_self.Prism;var r=document.currentScript||[].slice.call(document.getElementsByTagName("script")).pop();return r&&(n.filename=r.src,n.manual||r.hasAttribute("data-manual")||("loading"!==document.readyState?window.requestAnimationFrame?window.requestAnimationFrame(n.highlightAll):window.setTimeout(n.highlightAll,16):document.addEventListener("DOMContentLoaded",n.highlightAll))),_self.Prism}();"undefined"!=typeof module&&module.exports&&(module.exports=Prism),"undefined"!=typeof global&&(global.Prism=Prism); \ No newline at end of file diff --git a/components/prism-csharp.min.js b/components/prism-csharp.min.js index 2f5333750a..ceba58a89e 100644 --- a/components/prism-csharp.min.js +++ b/components/prism-csharp.min.js @@ -1 +1 @@ -Prism.languages.csharp=Prism.languages.extend("clike",{keyword:/\b(?:abstract|add|alias|as|ascending|async|await|base|bool|break|byte|case|catch|char|checked|class|const|continue|decimal|default|delegate|descending|do|double|dynamic|else|enum|event|explicit|extern|false|finally|fixed|float|for|foreach|from|get|global|goto|group|if|implicit|in|int|interface|internal|into|is|join|let|lock|long|namespace|new|null|object|operator|orderby|out|override|params|partial|private|protected|public|readonly|ref|remove|return|sbyte|sealed|select|set|short|sizeof|stackalloc|static|string|struct|switch|this|throw|true|try|typeof|uint|ulong|unchecked|unsafe|ushort|using|value|var|virtual|void|volatile|where|while|yield)\b/,string:[{pattern:/@("|')(?:\1\1|\\[\s\S]|(?!\1)[^\\])*\1/,greedy:!0},{pattern:/("|')(?:\\.|(?!\1)[^\\\r\n])*?\1/,greedy:!0}],"class-name":[{pattern:/\b[A-Z]\w*(?:\.\w+)*\b(?=\s+\w+)/,inside:{punctuation:/\./}},{pattern:/(\[)[A-Z]\w*(?:\.\w+)*\b/,lookbehind:!0,inside:{punctuation:/\./}},{pattern:/(\b(?:class|interface)\s+[A-Z]\w*(?:\.\w+)*\s*:\s*)[A-Z]\w*(?:\.\w+)*\b/,lookbehind:!0,inside:{punctuation:/\./}},{pattern:/((?:\b(?:class|interface|new)\s+)|(?:catch\s+\())[A-Z]\w*(?:\.\w+)*\b/,lookbehind:!0,inside:{punctuation:/\./}}],number:/\b0x[\da-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)f?/i,operator:/>>=?|<<=?|[-=]>|([-+&|?])\1|~|[-+*\/%&|^!=<>]=?/,punctuation:/\?[?.]?|::|[{}[\];(),.:]/}),Prism.languages.insertBefore("csharp","class-name",{"generic-method":{pattern:/\w+\s*<[^>\r\n]+?>\s*(?=\()/,inside:{"function":/^\w+/,"class-name":{pattern:/\b[A-Z]\w*(?:\.\w+)*\b/,inside:{punctuation:/\./}},keyword:Prism.languages.csharp.keyword,punctuation:/[<>(),.:]/}},preprocessor:{pattern:/(^\s*)#.*/m,lookbehind:!0,alias:"property",inside:{directive:{pattern:/(\s*#)\b(?:define|elif|else|endif|endregion|error|if|line|pragma|region|undef|warning)\b/,lookbehind:!0,alias:"keyword"}}}}),Prism.languages.dotnet=Prism.languages.csharp; \ No newline at end of file +Prism.languages.csharp=Prism.languages.extend("clike",{keyword:/\b(?:abstract|add|alias|as|ascending|async|await|base|bool|break|byte|case|catch|char|checked|class|const|continue|decimal|default|delegate|descending|do|double|dynamic|else|enum|event|explicit|extern|false|finally|fixed|float|for|foreach|from|get|global|goto|group|if|implicit|in|int|interface|internal|into|is|join|let|lock|long|namespace|new|null|object|operator|orderby|out|override|params|partial|private|protected|public|readonly|ref|remove|return|sbyte|sealed|select|set|short|sizeof|stackalloc|static|string|struct|switch|this|throw|true|try|typeof|uint|ulong|unchecked|unsafe|ushort|using|value|var|virtual|void|volatile|where|while|yield)\b/,string:[{pattern:/@("|')(?:\1\1|\\[\s\S]|(?!\1)[^\\])*\1/,greedy:!0},{pattern:/("|')(?:\\.|(?!\1)[^\\\r\n])*?\1/,greedy:!0}],"class-name":[{pattern:/\b[A-Z]\w*(?:\.\w+)*\b(?=\s+\w+)/,inside:{punctuation:/\./}},{pattern:/(\[)[A-Z]\w*(?:\.\w+)*\b/,lookbehind:!0,inside:{punctuation:/\./}},{pattern:/(\b(?:class|interface)\s+[A-Z]\w*(?:\.\w+)*\s*:\s*)[A-Z]\w*(?:\.\w+)*\b/,lookbehind:!0,inside:{punctuation:/\./}},{pattern:/((?:\b(?:class|interface|new)\s+)|(?:catch\s+\())[A-Z]\w*(?:\.\w+)*\b/,lookbehind:!0,inside:{punctuation:/\./}}],number:/\b0x[\da-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)f?/i,operator:/>>=?|<<=?|[-=]>|([-+&|?])\1|~|[-+*\/%&|^!=<>]=?/,punctuation:/\?\.?|::|[{}[\];(),.:]/}),Prism.languages.insertBefore("csharp","class-name",{"generic-method":{pattern:/\w+\s*<[^>\r\n]+?>\s*(?=\()/,inside:{"function":/^\w+/,"class-name":{pattern:/\b[A-Z]\w*(?:\.\w+)*\b/,inside:{punctuation:/\./}},keyword:Prism.languages.csharp.keyword,punctuation:/[<>(),.:]/}},preprocessor:{pattern:/(^\s*)#.*/m,lookbehind:!0,alias:"property",inside:{directive:{pattern:/(\s*#)\b(?:define|elif|else|endif|endregion|error|if|line|pragma|region|undef|warning)\b/,lookbehind:!0,alias:"keyword"}}}}),Prism.languages.dotnet=Prism.languages.csharp; \ No newline at end of file diff --git a/components/prism-jolie.js b/components/prism-jolie.js index b092095cd9..9cd226b221 100644 --- a/components/prism-jolie.js +++ b/components/prism-jolie.js @@ -12,7 +12,6 @@ Prism.languages.jolie = Prism.languages.extend('clike', { }); delete Prism.languages.jolie['class-name']; -delete Prism.languages.jolie['function']; Prism.languages.insertBefore( 'jolie', 'keyword', { 'function': diff --git a/components/prism-jolie.min.js b/components/prism-jolie.min.js index 082cac46c5..9bc5c2747a 100644 --- a/components/prism-jolie.min.js +++ b/components/prism-jolie.min.js @@ -1 +1 @@ -Prism.languages.jolie=Prism.languages.extend("clike",{keyword:/\b(?:include|define|is_defined|undef|main|init|outputPort|inputPort|Location|Protocol|Interfaces|RequestResponse|OneWay|type|interface|extender|throws|cset|csets|forward|Aggregates|Redirects|embedded|courier|execution|sequential|concurrent|single|scope|install|throw|comp|cH|default|global|linkIn|linkOut|synchronized|this|new|for|if|else|while|in|Jolie|Java|Javascript|nullProcess|spawn|constants|with|provide|until|exit|foreach|instanceof|over|service)\b/,builtin:/\b(?:undefined|string|int|void|long|Byte|bool|double|float|char|any)\b/,number:/(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?l?/i,operator:/-[-=>]?|\+[+=]?|<[<=]?|[>=*!]=?|&&|\|\||[:?\/%^]/,symbol:/[|;@]/,punctuation:/[,.]/,string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0}}),delete Prism.languages.jolie["class-name"],delete Prism.languages.jolie["function"],Prism.languages.insertBefore("jolie","keyword",{"function":{pattern:/((?:\b(?:outputPort|inputPort|in|service|courier)\b|@)\s*)\w+/,lookbehind:!0},aggregates:{pattern:/(\bAggregates\s*:\s*)(?:\w+(?:\s+with\s+\w+)?\s*,\s*)*\w+(?:\s+with\s+\w+)?/,lookbehind:!0,inside:{withExtension:{pattern:/\bwith\s+\w+/,inside:{keyword:/\bwith\b/}},"function":{pattern:/\w+/},punctuation:{pattern:/,/}}},redirects:{pattern:/(\bRedirects\s*:\s*)(?:\w+\s*=>\s*\w+\s*,\s*)*(?:\w+\s*=>\s*\w+)/,lookbehind:!0,inside:{punctuation:{pattern:/,/},"function":{pattern:/\w+/},symbol:{pattern:/=>/}}}}); \ No newline at end of file +Prism.languages.jolie=Prism.languages.extend("clike",{keyword:/\b(?:include|define|is_defined|undef|main|init|outputPort|inputPort|Location|Protocol|Interfaces|RequestResponse|OneWay|type|interface|extender|throws|cset|csets|forward|Aggregates|Redirects|embedded|courier|execution|sequential|concurrent|single|scope|install|throw|comp|cH|default|global|linkIn|linkOut|synchronized|this|new|for|if|else|while|in|Jolie|Java|Javascript|nullProcess|spawn|constants|with|provide|until|exit|foreach|instanceof|over|service)\b/,builtin:/\b(?:undefined|string|int|void|long|Byte|bool|double|float|char|any)\b/,number:/(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?l?/i,operator:/-[-=>]?|\+[+=]?|<[<=]?|[>=*!]=?|&&|\|\||[:?\/%^]/,symbol:/[|;@]/,punctuation:/[,.]/,string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0}}),delete Prism.languages.jolie["class-name"],Prism.languages.insertBefore("jolie","keyword",{"function":{pattern:/((?:\b(?:outputPort|inputPort|in|service|courier)\b|@)\s*)\w+/,lookbehind:!0},aggregates:{pattern:/(\bAggregates\s*:\s*)(?:\w+(?:\s+with\s+\w+)?\s*,\s*)*\w+(?:\s+with\s+\w+)?/,lookbehind:!0,inside:{withExtension:{pattern:/\bwith\s+\w+/,inside:{keyword:/\bwith\b/}},"function":{pattern:/\w+/},punctuation:{pattern:/,/}}},redirects:{pattern:/(\bRedirects\s*:\s*)(?:\w+\s*=>\s*\w+\s*,\s*)*(?:\w+\s*=>\s*\w+)/,lookbehind:!0,inside:{punctuation:{pattern:/,/},"function":{pattern:/\w+/},symbol:{pattern:/=>/}}}}); \ No newline at end of file diff --git a/components/prism-sass.js b/components/prism-sass.js index f1708304e6..64f2013402 100644 --- a/components/prism-sass.js +++ b/components/prism-sass.js @@ -62,7 +62,6 @@ // Now that whole lines for other patterns are consumed, // what's left should be selectors - delete Prism.languages.sass.selector; Prism.languages.insertBefore('sass', 'punctuation', { 'selector': { pattern: /([ \t]*)\S(?:,?[^,\r\n]+)*(?:,(?:\r?\n|\r)\1[ \t]+\S(?:,?[^,\r\n]+)*)*/, diff --git a/components/prism-sass.min.js b/components/prism-sass.min.js index 3544aab5e6..c4601d2a96 100644 --- a/components/prism-sass.min.js +++ b/components/prism-sass.min.js @@ -1 +1 @@ -!function(e){e.languages.sass=e.languages.extend("css",{comment:{pattern:/^([ \t]*)\/[\/*].*(?:(?:\r?\n|\r)\1[ \t]+.+)*/m,lookbehind:!0}}),e.languages.insertBefore("sass","atrule",{"atrule-line":{pattern:/^(?:[ \t]*)[@+=].+/m,inside:{atrule:/(?:@[\w-]+|[+=])/m}}}),delete e.languages.sass.atrule;var a=/\$[-\w]+|#\{\$[-\w]+\}/,t=[/[+*\/%]|[=!]=|<=?|>=?|\b(?:and|or|not)\b/,{pattern:/(\s+)-(?=\s)/,lookbehind:!0}];e.languages.insertBefore("sass","property",{"variable-line":{pattern:/^[ \t]*\$.+/m,inside:{punctuation:/:/,variable:a,operator:t}},"property-line":{pattern:/^[ \t]*(?:[^:\s]+ *:.*|:[^:\s]+.*)/m,inside:{property:[/[^:\s]+(?=\s*:)/,{pattern:/(:)[^:\s]+/,lookbehind:!0}],punctuation:/:/,variable:a,operator:t,important:e.languages.sass.important}}}),delete e.languages.sass.property,delete e.languages.sass.important,delete e.languages.sass.selector,e.languages.insertBefore("sass","punctuation",{selector:{pattern:/([ \t]*)\S(?:,?[^,\r\n]+)*(?:,(?:\r?\n|\r)\1[ \t]+\S(?:,?[^,\r\n]+)*)*/,lookbehind:!0}})}(Prism); \ No newline at end of file +!function(e){e.languages.sass=e.languages.extend("css",{comment:{pattern:/^([ \t]*)\/[\/*].*(?:(?:\r?\n|\r)\1[ \t]+.+)*/m,lookbehind:!0}}),e.languages.insertBefore("sass","atrule",{"atrule-line":{pattern:/^(?:[ \t]*)[@+=].+/m,inside:{atrule:/(?:@[\w-]+|[+=])/m}}}),delete e.languages.sass.atrule;var t=/\$[-\w]+|#\{\$[-\w]+\}/,a=[/[+*\/%]|[=!]=|<=?|>=?|\b(?:and|or|not)\b/,{pattern:/(\s+)-(?=\s)/,lookbehind:!0}];e.languages.insertBefore("sass","property",{"variable-line":{pattern:/^[ \t]*\$.+/m,inside:{punctuation:/:/,variable:t,operator:a}},"property-line":{pattern:/^[ \t]*(?:[^:\s]+ *:.*|:[^:\s]+.*)/m,inside:{property:[/[^:\s]+(?=\s*:)/,{pattern:/(:)[^:\s]+/,lookbehind:!0}],punctuation:/:/,variable:t,operator:a,important:e.languages.sass.important}}}),delete e.languages.sass.property,delete e.languages.sass.important,e.languages.insertBefore("sass","punctuation",{selector:{pattern:/([ \t]*)\S(?:,?[^,\r\n]+)*(?:,(?:\r?\n|\r)\1[ \t]+\S(?:,?[^,\r\n]+)*)*/,lookbehind:!0}})}(Prism); \ No newline at end of file diff --git a/components/prism-tt2.js b/components/prism-tt2.js index 4a9215493e..ef943201cd 100644 --- a/components/prism-tt2.js +++ b/components/prism-tt2.js @@ -9,8 +9,6 @@ punctuation: /[[\]{},()]/ }); - delete Prism.languages.tt2['operator']; - delete Prism.languages.tt2['variable']; Prism.languages.insertBefore('tt2', 'number', { operator: /=[>=]?|!=?|<=?|>=?|&&|\|\|?|\b(?:and|or|not)\b/, variable: { @@ -18,7 +16,6 @@ } }); - delete Prism.languages.tt2['delimiter']; Prism.languages.insertBefore('tt2', 'keyword', { 'delimiter': { pattern: /^(?:\[%|%%)-?|-?%]$/, diff --git a/components/prism-tt2.min.js b/components/prism-tt2.min.js index f817316510..34aaad2c6d 100644 --- a/components/prism-tt2.min.js +++ b/components/prism-tt2.min.js @@ -1 +1 @@ -!function(e){e.languages.tt2=e.languages.extend("clike",{comment:{pattern:/#.*|\[%#[\s\S]*?%\]/,lookbehind:!0},keyword:/\b(?:BLOCK|CALL|CASE|CATCH|CLEAR|DEBUG|DEFAULT|ELSE|ELSIF|END|FILTER|FINAL|FOREACH|GET|IF|IN|INCLUDE|INSERT|LAST|MACRO|META|NEXT|PERL|PROCESS|RAWPERL|RETURN|SET|STOP|TAGS|THROW|TRY|SWITCH|UNLESS|USE|WHILE|WRAPPER)\b/,punctuation:/[[\]{},()]/}),delete e.languages.tt2.operator,delete e.languages.tt2.variable,e.languages.insertBefore("tt2","number",{operator:/=[>=]?|!=?|<=?|>=?|&&|\|\|?|\b(?:and|or|not)\b/,variable:{pattern:/[a-z]\w*(?:\s*\.\s*(?:\d+|\$?[a-z]\w*))*/i}}),delete e.languages.tt2.delimiter,e.languages.insertBefore("tt2","keyword",{delimiter:{pattern:/^(?:\[%|%%)-?|-?%]$/,alias:"punctuation"}}),e.languages.insertBefore("tt2","string",{"single-quoted-string":{pattern:/'[^\\']*(?:\\[\s\S][^\\']*)*'/,greedy:!0,alias:"string"},"double-quoted-string":{pattern:/"[^\\"]*(?:\\[\s\S][^\\"]*)*"/,greedy:!0,alias:"string",inside:{variable:{pattern:/\$(?:[a-z]\w*(?:\.(?:\d+|\$?[a-z]\w*))*)/i}}}}),delete e.languages.tt2.string,e.hooks.add("before-tokenize",function(t){var a=/\[%[\s\S]+?%\]/g;e.languages["markup-templating"].buildPlaceholders(t,"tt2",a)}),e.hooks.add("after-tokenize",function(t){e.languages["markup-templating"].tokenizePlaceholders(t,"tt2")})}(Prism); \ No newline at end of file +!function(e){e.languages.tt2=e.languages.extend("clike",{comment:{pattern:/#.*|\[%#[\s\S]*?%\]/,lookbehind:!0},keyword:/\b(?:BLOCK|CALL|CASE|CATCH|CLEAR|DEBUG|DEFAULT|ELSE|ELSIF|END|FILTER|FINAL|FOREACH|GET|IF|IN|INCLUDE|INSERT|LAST|MACRO|META|NEXT|PERL|PROCESS|RAWPERL|RETURN|SET|STOP|TAGS|THROW|TRY|SWITCH|UNLESS|USE|WHILE|WRAPPER)\b/,punctuation:/[[\]{},()]/}),e.languages.insertBefore("tt2","number",{operator:/=[>=]?|!=?|<=?|>=?|&&|\|\|?|\b(?:and|or|not)\b/,variable:{pattern:/[a-z]\w*(?:\s*\.\s*(?:\d+|\$?[a-z]\w*))*/i}}),e.languages.insertBefore("tt2","keyword",{delimiter:{pattern:/^(?:\[%|%%)-?|-?%]$/,alias:"punctuation"}}),e.languages.insertBefore("tt2","string",{"single-quoted-string":{pattern:/'[^\\']*(?:\\[\s\S][^\\']*)*'/,greedy:!0,alias:"string"},"double-quoted-string":{pattern:/"[^\\"]*(?:\\[\s\S][^\\"]*)*"/,greedy:!0,alias:"string",inside:{variable:{pattern:/\$(?:[a-z]\w*(?:\.(?:\d+|\$?[a-z]\w*))*)/i}}}}),delete e.languages.tt2.string,e.hooks.add("before-tokenize",function(t){var a=/\[%[\s\S]+?%\]/g;e.languages["markup-templating"].buildPlaceholders(t,"tt2",a)}),e.hooks.add("after-tokenize",function(t){e.languages["markup-templating"].tokenizePlaceholders(t,"tt2")})}(Prism); \ No newline at end of file diff --git a/prism.js b/prism.js index 88c331e50f..9e8aa53833 100644 --- a/prism.js +++ b/prism.js @@ -101,7 +101,7 @@ var _ = _self.Prism = { /** * Insert a token before another token in a language literal * As this needs to recreate the object (we cannot actually insert before keys in object literals), - * we cannot just provide an object, we need anobject and a key. + * we cannot just provide an object, we need an object and a key. * @param inside The key (or language id) of the parent * @param before The key to insert before. * @param insert Object with the key/value pairs to insert @@ -113,20 +113,20 @@ var _ = _self.Prism = { var ret = {}; for (var token in grammar) { - if (grammar.hasOwnProperty(token)) { if (token == before) { - for (var newToken in insert) { - if (insert.hasOwnProperty(newToken)) { ret[newToken] = insert[newToken]; } } } - ret[token] = grammar[token]; + // Do not insert token which also occur in insert. See #1525 + if (!insert.hasOwnProperty(token)) { + ret[token] = grammar[token]; + } } } From 2577b6e6eabc847b5b170fde78d6f2c85f4d40b2 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Sun, 2 Dec 2018 00:07:24 +0100 Subject: [PATCH 0115/1100] Add decorator support to Python (#1639) Add support for Python decorators, implementing #1635 using the solution proposed by @spectras. Also add 2 aliases: `annotation` to be like Java and `punctuation` to change the actual color (like Java). This resolves #1635. --- components/prism-python.js | 10 ++++++- components/prism-python.min.js | 2 +- tests/languages/python/decorator_feature.test | 28 +++++++++++++++++++ 3 files changed, 38 insertions(+), 2 deletions(-) create mode 100644 tests/languages/python/decorator_feature.test diff --git a/components/prism-python.js b/components/prism-python.js index df8374f6fd..b326a5ceb2 100644 --- a/components/prism-python.js +++ b/components/prism-python.js @@ -20,8 +20,16 @@ Prism.languages.python = { pattern: /(\bclass\s+)\w+/i, lookbehind: true }, + 'decorator': { + pattern: /(^\s*)@\w+(?:\.\w+)*/i, + lookbehind: true, + alias: ['annotation', 'punctuation'], + inside: { + 'punctuation': /\./ + } + }, 'keyword': /\b(?:and|as|assert|async|await|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/, - 'builtin':/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/, + 'builtin': /\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/, 'boolean': /\b(?:True|False|None)\b/, 'number': /(?:\b(?=\d)|\B(?=\.))(?:0[bo])?(?:(?:\d|0x[\da-f])[\da-f]*\.?\d*|\.\d+)(?:e[+-]?\d+)?j?\b/i, 'operator': /[-+%=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/, diff --git a/components/prism-python.min.js b/components/prism-python.min.js index f4e17fe81e..8956dae5b4 100644 --- a/components/prism-python.min.js +++ b/components/prism-python.min.js @@ -1 +1 @@ -Prism.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0},"triple-quoted-string":{pattern:/("""|''')[\s\S]+?\1/,greedy:!0,alias:"string"},string:{pattern:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0},"function":{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},keyword:/\b(?:and|as|assert|async|await|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,"boolean":/\b(?:True|False|None)\b/,number:/(?:\b(?=\d)|\B(?=\.))(?:0[bo])?(?:(?:\d|0x[\da-f])[\da-f]*\.?\d*|\.\d+)(?:e[+-]?\d+)?j?\b/i,operator:/[-+%=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/}; \ No newline at end of file +Prism.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0},"triple-quoted-string":{pattern:/("""|''')[\s\S]+?\1/,greedy:!0,alias:"string"},string:{pattern:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0},"function":{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^\s*)@\w+(?:\.\w+)*/i,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:and|as|assert|async|await|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,"boolean":/\b(?:True|False|None)\b/,number:/(?:\b(?=\d)|\B(?=\.))(?:0[bo])?(?:(?:\d|0x[\da-f])[\da-f]*\.?\d*|\.\d+)(?:e[+-]?\d+)?j?\b/i,operator:/[-+%=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/}; \ No newline at end of file diff --git a/tests/languages/python/decorator_feature.test b/tests/languages/python/decorator_feature.test new file mode 100644 index 0000000000..c04d642837 --- /dev/null +++ b/tests/languages/python/decorator_feature.test @@ -0,0 +1,28 @@ +@some.decorator(foobar) +def foo(bar): + pass + +---------------------------------------------------- + +[ + ["decorator", [ + "@some", + ["punctuation", "."], + "decorator"] + ], + ["punctuation", "("], + "foobar", + ["punctuation", ")"], + + ["keyword", "def"], + ["function", "foo"], + ["punctuation", "("], + "bar", + ["punctuation", ")"], + ["punctuation", ":"], + ["keyword", "pass"] +] + +---------------------------------------------------- + +Checks for decorators. From 5b6ad70d394f0e2c2f08f5e29118079543fcea45 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Sun, 2 Dec 2018 16:44:21 +0100 Subject: [PATCH 0116/1100] Add TOML support (#1488) Add support for [Tom's Obvious, Minimal Language](https://github.com/toml-lang/toml). Some simplifications: 1. The `.`s of dotted keys are not highlighted. This is because the `.` could be inside quotes and checking that isn't easy. 2. There is no distinction between table `[foo]` and array `[[foo]]`. `foo` will be highlighted as `table` in both cases. --- components.js | 2 +- components.json | 4 + components/prism-toml.js | 43 ++++++++++ components/prism-toml.min.js | 1 + plugins/show-language/prism-show-language.js | 2 +- .../show-language/prism-show-language.min.js | 2 +- tests/languages/toml/boolean_feature.test | 13 +++ tests/languages/toml/comment_feature.test | 11 +++ tests/languages/toml/date_feature.test | 33 ++++++++ tests/languages/toml/key_feature.test | 42 ++++++++++ tests/languages/toml/number_feature.test | 79 +++++++++++++++++++ tests/languages/toml/string_feature.test | 29 +++++++ tests/languages/toml/table_feature.test | 20 +++++ 13 files changed, 278 insertions(+), 3 deletions(-) create mode 100644 components/prism-toml.js create mode 100644 components/prism-toml.min.js create mode 100644 tests/languages/toml/boolean_feature.test create mode 100644 tests/languages/toml/comment_feature.test create mode 100644 tests/languages/toml/date_feature.test create mode 100644 tests/languages/toml/key_feature.test create mode 100644 tests/languages/toml/number_feature.test create mode 100644 tests/languages/toml/string_feature.test create mode 100644 tests/languages/toml/table_feature.test diff --git a/components.js b/components.js index 10c805f828..bf7df4486e 100644 --- a/components.js +++ b/components.js @@ -1,2 +1,2 @@ -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default","peerDependencies":"markup"},"clike":{"title":"C-like","option":"default","overrideExampleHeader":true},"javascript":{"title":"JavaScript","require":"clike","peerDependencies":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"actionscript":{"title":"ActionScript","require":"javascript","peerDependencies":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":"dotnet","owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","owner":"R-osey"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup","peerDependencies":["css","javascript"],"alias":"jinja2","owner":"romanvm"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","peerDependencies":["css","coffeescript","erb","javascript","less","markdown","ruby","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"http":{"title":"HTTP","peerDependencies":["javascript","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"json":{"title":"JSON","alias":"jsonp","aliasTitles":{"jsonp":"JSONP"},"owner":"CupOfTea696"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","owner":"japborst"},"less":{"title":"Less","require":"css","owner":"Golmote"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"n4js":{"title":"N4JS","require":"javascript","alias":"n4jsd","owner":"bsmith-n4"},"nasm":{"title":"NASM","owner":"rbmj"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"cpp","peerDependencies":["c","cpp"],"overrideExampleHeader":true,"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"php-extras":{"title":"PHP Extras","require":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":"javascript","peerDependencies":["coffeescript","ejs","handlebars","hogan","less","livescript","markdown","mustache","plates","scss","stylus","swig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","peerDependencies":["c","cpp","fortran","ats","dsp"],"owner":"Golmote"},"python":{"title":"Python","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"ruby":{"title":"Ruby","require":"clike","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sql":{"title":"SQL","owner":"multipetros"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","peerDependencies":"css","owner":"Golmote"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","alias":"ts","owner":"vkbansal"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","owner":"hason"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":"Line Highlight","line-numbers":{"title":"Line Numbers","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","after":["autolinker","data-uri-highlight"]},"autolinker":"Autolinker","wpd":"WebPlatform Docs","custom-class":{"title":"Custom Class","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","noCSS":true},"show-language":{"title":"Show Language","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","owner":"Golmote","noCSS":true},"previewers":{"title":"Previewers","owner":"Golmote"},"autoloader":{"title":"Autoloader","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","owner":"Golmote","after":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","owner":"chriswells0"},"unescaped-markup":"Unescaped Markup","normalize-whitespace":{"title":"Normalize Whitespace","owner":"zeitgeist87","after":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","owner":"mAAdhaTTah","require":"toolbar","noCSS":true}}}; +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default","peerDependencies":"markup"},"clike":{"title":"C-like","option":"default","overrideExampleHeader":true},"javascript":{"title":"JavaScript","require":"clike","peerDependencies":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"actionscript":{"title":"ActionScript","require":"javascript","peerDependencies":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":"dotnet","owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","owner":"R-osey"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup","peerDependencies":["css","javascript"],"alias":"jinja2","owner":"romanvm"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","peerDependencies":["css","coffeescript","erb","javascript","less","markdown","ruby","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"http":{"title":"HTTP","peerDependencies":["javascript","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"json":{"title":"JSON","alias":"jsonp","aliasTitles":{"jsonp":"JSONP"},"owner":"CupOfTea696"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","owner":"japborst"},"less":{"title":"Less","require":"css","owner":"Golmote"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"n4js":{"title":"N4JS","require":"javascript","alias":"n4jsd","owner":"bsmith-n4"},"nasm":{"title":"NASM","owner":"rbmj"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"cpp","peerDependencies":["c","cpp"],"overrideExampleHeader":true,"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"php-extras":{"title":"PHP Extras","require":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":"javascript","peerDependencies":["coffeescript","ejs","handlebars","hogan","less","livescript","markdown","mustache","plates","scss","stylus","swig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","peerDependencies":["c","cpp","fortran","ats","dsp"],"owner":"Golmote"},"python":{"title":"Python","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"ruby":{"title":"Ruby","require":"clike","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sql":{"title":"SQL","owner":"multipetros"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","peerDependencies":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","alias":"ts","owner":"vkbansal"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","owner":"hason"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":"Line Highlight","line-numbers":{"title":"Line Numbers","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","after":["autolinker","data-uri-highlight"]},"autolinker":"Autolinker","wpd":"WebPlatform Docs","custom-class":{"title":"Custom Class","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","noCSS":true},"show-language":{"title":"Show Language","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","owner":"Golmote","noCSS":true},"previewers":{"title":"Previewers","owner":"Golmote"},"autoloader":{"title":"Autoloader","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","owner":"Golmote","after":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","owner":"chriswells0"},"unescaped-markup":"Unescaped Markup","normalize-whitespace":{"title":"Normalize Whitespace","owner":"zeitgeist87","after":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","owner":"mAAdhaTTah","require":"toolbar","noCSS":true}}}; if (typeof module !== 'undefined' && module.exports) { module.exports = components; } \ No newline at end of file diff --git a/components.json b/components.json index 29312867de..672f87ce79 100644 --- a/components.json +++ b/components.json @@ -731,6 +731,10 @@ "peerDependencies": "css", "owner": "Golmote" }, + "toml": { + "title": "TOML", + "owner": "RunDevelopment" + }, "tt2": { "title": "Template Toolkit 2", "require": ["clike", "markup-templating"], diff --git a/components/prism-toml.js b/components/prism-toml.js new file mode 100644 index 0000000000..200fbdd0c3 --- /dev/null +++ b/components/prism-toml.js @@ -0,0 +1,43 @@ +(function (Prism) { + + // pattern: /(?:[\w-]+|'[^'\n\r]*'|"(?:\.|[^\\"\r\n])*")/ + var key = "(?:[\\w-]+|'[^'\n\r]*'|\"(?:\\.|[^\\\\\"\r\n])*\")"; + + Prism.languages.toml = { + 'comment': { + pattern: /#.*/, + greedy: true + }, + 'table': { + pattern: RegExp("(\\[\\s*)" + key + "(?:\\s*\\.\\s*" + key + ")*(?=\\s*\\])"), + lookbehind: true, + greedy: true, + alias: 'class-name' + }, + 'key': { + pattern: RegExp("(^\\s*|[{,]\\s*)" + key + "(?:\\s*\\.\\s*" + key + ")*(?=\\s*=)", "m"), + lookbehind: true, + greedy: true, + alias: 'property' + }, + 'string': { + pattern: /"""(?:\\[\s\S]|[^\\])*?"""|'''[\s\S]*?'''|'[^'\n\r]*'|"(?:\\.|[^\\"\r\n])*"/, + greedy: true + }, + 'date': [ + { + // Offset Date-Time, Local Date-Time, Local Date + pattern: /\d{4}-\d{2}-\d{2}(?:[T\s]\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|[+-]\d{2}:\d{2})?)?/i, + alias: 'number' + }, + { + // Local Time + pattern: /\d{2}:\d{2}:\d{2}(?:\.\d+)?/i, + alias: 'number' + } + ], + 'number': /(?:\b0(?:x[\da-zA-Z]+(?:_[\da-zA-Z]+)*|o[0-7]+(?:_[0-7]+)*|b[10]+(?:_[10]+)*))\b|[-+]?\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?\b|[-+]?(?:inf|nan)\b/, + 'boolean': /\b(?:true|false)\b/, + 'punctuation': /[.,=[\]{}]/ + }; +}(Prism)); diff --git a/components/prism-toml.min.js b/components/prism-toml.min.js new file mode 100644 index 0000000000..b92197f40b --- /dev/null +++ b/components/prism-toml.min.js @@ -0,0 +1 @@ +!function(e){var d="(?:[\\w-]+|'[^'\n\r]*'|\"(?:\\.|[^\\\\\"\r\n])*\")";e.languages.toml={comment:{pattern:/#.*/,greedy:!0},table:{pattern:RegExp("(\\[\\s*)"+d+"(?:\\s*\\.\\s*"+d+")*(?=\\s*\\])"),lookbehind:!0,greedy:!0,alias:"class-name"},key:{pattern:RegExp("(^\\s*|[{,]\\s*)"+d+"(?:\\s*\\.\\s*"+d+")*(?=\\s*=)","m"),lookbehind:!0,greedy:!0,alias:"property"},string:{pattern:/"""(?:\\[\s\S]|[^\\])*?"""|'''[\s\S]*?'''|'[^'\n\r]*'|"(?:\\.|[^\\"\r\n])*"/,greedy:!0},date:[{pattern:/\d{4}-\d{2}-\d{2}(?:[T\s]\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|[+-]\d{2}:\d{2})?)?/i,alias:"number"},{pattern:/\d{2}:\d{2}:\d{2}(?:\.\d+)?/i,alias:"number"}],number:/(?:\b0(?:x[\da-zA-Z]+(?:_[\da-zA-Z]+)*|o[0-7]+(?:_[0-7]+)*|b[10]+(?:_[10]+)*))\b|[-+]?\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?\b|[-+]?(?:inf|nan)\b/,"boolean":/\b(?:true|false)\b/,punctuation:/[.,=[\]{}]/}}(Prism); \ No newline at end of file diff --git a/plugins/show-language/prism-show-language.js b/plugins/show-language/prism-show-language.js index b1798c559a..cd18f207f7 100644 --- a/plugins/show-language/prism-show-language.js +++ b/plugins/show-language/prism-show-language.js @@ -11,7 +11,7 @@ if (!Prism.plugins.toolbar) { } // The languages map is built automatically with gulp -var Languages = /*languages_placeholder[*/{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","css":"CSS","clike":"C-like","javascript":"JavaScript","abap":"ABAP","actionscript":"ActionScript","apacheconf":"Apache Configuration","apl":"APL","applescript":"AppleScript","arff":"ARFF","asciidoc":"AsciiDoc","asm6502":"6502 Assembly","aspnet":"ASP.NET (C#)","autohotkey":"AutoHotkey","autoit":"AutoIt","shell":"Shell","basic":"BASIC","csharp":"C#","cpp":"C++","cil":"CIL","coffeescript":"CoffeeScript","csp":"Content-Security-Policy","css-extras":"CSS Extras","django":"Django/Jinja2","erb":"ERB","fsharp":"F#","gcode":"G-code","gedcom":"GEDCOM","glsl":"GLSL","gml":"GameMaker Language","graphql":"GraphQL","http":"HTTP","hpkp":"HTTP Public-Key-Pins","hsts":"HTTP Strict-Transport-Security","ichigojam":"IchigoJam","inform7":"Inform 7","json":"JSON","jsonp":"JSONP","latex":"LaTeX","livescript":"LiveScript","lolcode":"LOLCODE","markup-templating":"Markup templating","matlab":"MATLAB","mel":"MEL","n4js":"N4JS","nasm":"NASM","nginx":"nginx","nsis":"NSIS","objectivec":"Objective-C","ocaml":"OCaml","opencl":"OpenCL","parigp":"PARI/GP","objectpascal":"Object Pascal","php":"PHP","php-extras":"PHP Extras","plsql":"PL/SQL","powershell":"PowerShell","properties":".properties","protobuf":"Protocol Buffers","q":"Q (kdb+ database)","jsx":"React JSX","tsx":"React TSX","renpy":"Ren'py","rest":"reST (reStructuredText)","sas":"SAS","sass":"Sass (Sass)","scss":"Sass (Scss)","sql":"SQL","soy":"Soy (Closure Template)","tap":"TAP","tt2":"Template Toolkit 2","typescript":"TypeScript","vbnet":"VB.Net","vhdl":"VHDL","vim":"vim","visual-basic":"Visual Basic","wasm":"WebAssembly","wiki":"Wiki markup","xeoracube":"XeoraCube","xojo":"Xojo (REALbasic)","xquery":"XQuery","yaml":"YAML"}/*]*/; +var Languages = /*languages_placeholder[*/{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","css":"CSS","clike":"C-like","javascript":"JavaScript","abap":"ABAP","actionscript":"ActionScript","apacheconf":"Apache Configuration","apl":"APL","applescript":"AppleScript","arff":"ARFF","asciidoc":"AsciiDoc","asm6502":"6502 Assembly","aspnet":"ASP.NET (C#)","autohotkey":"AutoHotkey","autoit":"AutoIt","shell":"Shell","basic":"BASIC","csharp":"C#","cpp":"C++","cil":"CIL","coffeescript":"CoffeeScript","csp":"Content-Security-Policy","css-extras":"CSS Extras","django":"Django/Jinja2","erb":"ERB","fsharp":"F#","gcode":"G-code","gedcom":"GEDCOM","glsl":"GLSL","gml":"GameMaker Language","graphql":"GraphQL","http":"HTTP","hpkp":"HTTP Public-Key-Pins","hsts":"HTTP Strict-Transport-Security","ichigojam":"IchigoJam","inform7":"Inform 7","json":"JSON","jsonp":"JSONP","latex":"LaTeX","livescript":"LiveScript","lolcode":"LOLCODE","markup-templating":"Markup templating","matlab":"MATLAB","mel":"MEL","n4js":"N4JS","nasm":"NASM","nginx":"nginx","nsis":"NSIS","objectivec":"Objective-C","ocaml":"OCaml","opencl":"OpenCL","parigp":"PARI/GP","objectpascal":"Object Pascal","php":"PHP","php-extras":"PHP Extras","plsql":"PL/SQL","powershell":"PowerShell","properties":".properties","protobuf":"Protocol Buffers","q":"Q (kdb+ database)","jsx":"React JSX","tsx":"React TSX","renpy":"Ren'py","rest":"reST (reStructuredText)","sas":"SAS","sass":"Sass (Sass)","scss":"Sass (Scss)","sql":"SQL","soy":"Soy (Closure Template)","tap":"TAP","toml":"TOML","tt2":"Template Toolkit 2","typescript":"TypeScript","vbnet":"VB.Net","vhdl":"VHDL","vim":"vim","visual-basic":"Visual Basic","wasm":"WebAssembly","wiki":"Wiki markup","xeoracube":"XeoraCube","xojo":"Xojo (REALbasic)","xquery":"XQuery","yaml":"YAML"}/*]*/; Prism.plugins.toolbar.registerButton('show-language', function(env) { var pre = env.element.parentNode; if (!pre || !/pre/i.test(pre.nodeName)) { diff --git a/plugins/show-language/prism-show-language.min.js b/plugins/show-language/prism-show-language.min.js index e930afc1c5..945cbdf174 100644 --- a/plugins/show-language/prism-show-language.min.js +++ b/plugins/show-language/prism-show-language.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof self&&self.Prism&&self.document){if(!Prism.plugins.toolbar)return console.warn("Show Languages plugin loaded before Toolbar plugin."),void 0;var e={html:"HTML",xml:"XML",svg:"SVG",mathml:"MathML",css:"CSS",clike:"C-like",javascript:"JavaScript",abap:"ABAP",actionscript:"ActionScript",apacheconf:"Apache Configuration",apl:"APL",applescript:"AppleScript",arff:"ARFF",asciidoc:"AsciiDoc",asm6502:"6502 Assembly",aspnet:"ASP.NET (C#)",autohotkey:"AutoHotkey",autoit:"AutoIt",shell:"Shell",basic:"BASIC",csharp:"C#",cpp:"C++",cil:"CIL",coffeescript:"CoffeeScript",csp:"Content-Security-Policy","css-extras":"CSS Extras",django:"Django/Jinja2",erb:"ERB",fsharp:"F#",gcode:"G-code",gedcom:"GEDCOM",glsl:"GLSL",gml:"GameMaker Language",graphql:"GraphQL",http:"HTTP",hpkp:"HTTP Public-Key-Pins",hsts:"HTTP Strict-Transport-Security",ichigojam:"IchigoJam",inform7:"Inform 7",json:"JSON",jsonp:"JSONP",latex:"LaTeX",livescript:"LiveScript",lolcode:"LOLCODE","markup-templating":"Markup templating",matlab:"MATLAB",mel:"MEL",n4js:"N4JS",nasm:"NASM",nginx:"nginx",nsis:"NSIS",objectivec:"Objective-C",ocaml:"OCaml",opencl:"OpenCL",parigp:"PARI/GP",objectpascal:"Object Pascal",php:"PHP","php-extras":"PHP Extras",plsql:"PL/SQL",powershell:"PowerShell",properties:".properties",protobuf:"Protocol Buffers",q:"Q (kdb+ database)",jsx:"React JSX",tsx:"React TSX",renpy:"Ren'py",rest:"reST (reStructuredText)",sas:"SAS",sass:"Sass (Sass)",scss:"Sass (Scss)",sql:"SQL",soy:"Soy (Closure Template)",tap:"TAP",tt2:"Template Toolkit 2",typescript:"TypeScript",vbnet:"VB.Net",vhdl:"VHDL",vim:"vim","visual-basic":"Visual Basic",wasm:"WebAssembly",wiki:"Wiki markup",xeoracube:"XeoraCube",xojo:"Xojo (REALbasic)",xquery:"XQuery",yaml:"YAML"};Prism.plugins.toolbar.registerButton("show-language",function(a){var t=a.element.parentNode;if(t&&/pre/i.test(t.nodeName)){var s=t.getAttribute("data-language")||e[a.language]||a.language&&a.language.substring(0,1).toUpperCase()+a.language.substring(1);if(s){var i=document.createElement("span");return i.textContent=s,i}}})}}(); \ No newline at end of file +!function(){if("undefined"!=typeof self&&self.Prism&&self.document){if(!Prism.plugins.toolbar)return console.warn("Show Languages plugin loaded before Toolbar plugin."),void 0;var e={html:"HTML",xml:"XML",svg:"SVG",mathml:"MathML",css:"CSS",clike:"C-like",javascript:"JavaScript",abap:"ABAP",actionscript:"ActionScript",apacheconf:"Apache Configuration",apl:"APL",applescript:"AppleScript",arff:"ARFF",asciidoc:"AsciiDoc",asm6502:"6502 Assembly",aspnet:"ASP.NET (C#)",autohotkey:"AutoHotkey",autoit:"AutoIt",shell:"Shell",basic:"BASIC",csharp:"C#",cpp:"C++",cil:"CIL",coffeescript:"CoffeeScript",csp:"Content-Security-Policy","css-extras":"CSS Extras",django:"Django/Jinja2",erb:"ERB",fsharp:"F#",gcode:"G-code",gedcom:"GEDCOM",glsl:"GLSL",gml:"GameMaker Language",graphql:"GraphQL",http:"HTTP",hpkp:"HTTP Public-Key-Pins",hsts:"HTTP Strict-Transport-Security",ichigojam:"IchigoJam",inform7:"Inform 7",json:"JSON",jsonp:"JSONP",latex:"LaTeX",livescript:"LiveScript",lolcode:"LOLCODE","markup-templating":"Markup templating",matlab:"MATLAB",mel:"MEL",n4js:"N4JS",nasm:"NASM",nginx:"nginx",nsis:"NSIS",objectivec:"Objective-C",ocaml:"OCaml",opencl:"OpenCL",parigp:"PARI/GP",objectpascal:"Object Pascal",php:"PHP","php-extras":"PHP Extras",plsql:"PL/SQL",powershell:"PowerShell",properties:".properties",protobuf:"Protocol Buffers",q:"Q (kdb+ database)",jsx:"React JSX",tsx:"React TSX",renpy:"Ren'py",rest:"reST (reStructuredText)",sas:"SAS",sass:"Sass (Sass)",scss:"Sass (Scss)",sql:"SQL",soy:"Soy (Closure Template)",tap:"TAP",toml:"TOML",tt2:"Template Toolkit 2",typescript:"TypeScript",vbnet:"VB.Net",vhdl:"VHDL",vim:"vim","visual-basic":"Visual Basic",wasm:"WebAssembly",wiki:"Wiki markup",xeoracube:"XeoraCube",xojo:"Xojo (REALbasic)",xquery:"XQuery",yaml:"YAML"};Prism.plugins.toolbar.registerButton("show-language",function(a){var t=a.element.parentNode;if(t&&/pre/i.test(t.nodeName)){var s=t.getAttribute("data-language")||e[a.language]||a.language&&a.language.substring(0,1).toUpperCase()+a.language.substring(1);if(s){var i=document.createElement("span");return i.textContent=s,i}}})}}(); \ No newline at end of file diff --git a/tests/languages/toml/boolean_feature.test b/tests/languages/toml/boolean_feature.test new file mode 100644 index 0000000000..ca34f1814d --- /dev/null +++ b/tests/languages/toml/boolean_feature.test @@ -0,0 +1,13 @@ +true +false + +---------------------------------------------------- + +[ + ["boolean", "true"], + ["boolean", "false"] +] + +---------------------------------------------------- + +Checks for booleans. diff --git a/tests/languages/toml/comment_feature.test b/tests/languages/toml/comment_feature.test new file mode 100644 index 0000000000..190fa48b4f --- /dev/null +++ b/tests/languages/toml/comment_feature.test @@ -0,0 +1,11 @@ +# I'm a comment, you're not. + +---------------------------------------------------- + +[ + ["comment", "# I'm a comment, you're not."] +] + +---------------------------------------------------- + +Checks for comments. diff --git a/tests/languages/toml/date_feature.test b/tests/languages/toml/date_feature.test new file mode 100644 index 0000000000..2956efd873 --- /dev/null +++ b/tests/languages/toml/date_feature.test @@ -0,0 +1,33 @@ +1979-05-27T07:32:00Z +1979-05-27T00:32:00-07:00 +1979-05-27T00:32:00.999999-07:00 +1979-05-27 07:32:00Z + +1979-05-27T07:32:00 +1979-05-27T00:32:00.999999 + +1979-05-27 + +07:32:00 +00:32:00.999999 + +---------------------------------------------------- + +[ + ["date", "1979-05-27T07:32:00Z"], + ["date", "1979-05-27T00:32:00-07:00"], + ["date", "1979-05-27T00:32:00.999999-07:00"], + ["date", "1979-05-27 07:32:00Z"], + + ["date", "1979-05-27T07:32:00"], + ["date", "1979-05-27T00:32:00.999999"], + + ["date", "1979-05-27"], + + ["date", "07:32:00"], + ["date", "00:32:00.999999"] +] + +---------------------------------------------------- + +Checks for dates. diff --git a/tests/languages/toml/key_feature.test b/tests/languages/toml/key_feature.test new file mode 100644 index 0000000000..a03e11d288 --- /dev/null +++ b/tests/languages/toml/key_feature.test @@ -0,0 +1,42 @@ +abc = "abc" +"abc" = "abc" +"abc".'a"b"c'.abc = "abc" + a . b . c = "abc" + +a = { b = "b", c = "c" } + +---------------------------------------------------- + +[ + ["key", "abc"], + ["punctuation", "="], + ["string", "\"abc\""], + + ["key", "\"abc\""], + ["punctuation", "="], + ["string", "\"abc\""], + + ["key", "\"abc\".'a\"b\"c'.abc"], + ["punctuation", "="], + ["string", "\"abc\""], + + ["key", "a . b . c"], + ["punctuation", "="], + ["string", "\"abc\""], + + ["key", "a"], + ["punctuation", "="], + ["punctuation", "{"], + ["key", "b"], + ["punctuation", "="], + ["string", "\"b\""], + ["punctuation", ","], + ["key", "c"], + ["punctuation", "="], + ["string", "\"c\""], + ["punctuation", "}"] +] + +---------------------------------------------------- + +Checks for keys. diff --git a/tests/languages/toml/number_feature.test b/tests/languages/toml/number_feature.test new file mode 100644 index 0000000000..a94fb4cb8f --- /dev/null +++ b/tests/languages/toml/number_feature.test @@ -0,0 +1,79 @@ +42 +0 ++0 +-0 ++99 +-17 + +1_000 +5_349_221 + +0xDEADBEEF +0xdeadbeef +0xdead_beef + +0o0123_4567 +0o755 + +0b1101_0110 + ++1.0 +3.1415 +-0.01 +5e+22 +1e6 +1e1_000 +-2E-2 +6.626e-34 +9_224_617.445_991_228_313 + +inf ++inf +-inf +nan ++nan +-nan + +---------------------------------------------------- + +[ + ["number", "42"], + ["number", "0"], + ["number", "+0"], + ["number", "-0"], + ["number", "+99"], + ["number", "-17"], + + ["number", "1_000"], + ["number", "5_349_221"], + + ["number", "0xDEADBEEF"], + ["number", "0xdeadbeef"], + ["number", "0xdead_beef"], + + ["number", "0o0123_4567"], + ["number", "0o755"], + + ["number", "0b1101_0110"], + + ["number", "+1.0"], + ["number", "3.1415"], + ["number", "-0.01"], + ["number", "5e+22"], + ["number", "1e6"], + ["number", "1e1_000"], + ["number", "-2E-2"], + ["number", "6.626e-34"], + ["number", "9_224_617.445_991_228_313"], + + ["number", "inf"], + ["number", "+inf"], + ["number", "-inf"], + ["number", "nan"], + ["number", "+nan"], + ["number", "-nan"] +] + +---------------------------------------------------- + +Checks for numbers. diff --git a/tests/languages/toml/string_feature.test b/tests/languages/toml/string_feature.test new file mode 100644 index 0000000000..fa87009b61 --- /dev/null +++ b/tests/languages/toml/string_feature.test @@ -0,0 +1,29 @@ +"" +"abc" +"\"" +'' +'#' +'"abc"' +""" + abc + """ +''' + abc + ''' + +---------------------------------------------------- + +[ + ["string", "\"\""], + ["string", "\"abc\""], + ["string", "\"\\\"\""], + ["string", "''"], + ["string", "'#'"], + ["string", "'\"abc\"'"], + ["string", "\"\"\"\n\tabc\n\t\"\"\""], + ["string", "'''\n\tabc\n\t'''"] +] + +---------------------------------------------------- + +Checks for strings. diff --git a/tests/languages/toml/table_feature.test b/tests/languages/toml/table_feature.test new file mode 100644 index 0000000000..c0be8b7e0b --- /dev/null +++ b/tests/languages/toml/table_feature.test @@ -0,0 +1,20 @@ +[table] +[[array]] + +---------------------------------------------------- + +[ + ["punctuation", "["], + ["table", "table"], + ["punctuation", "]"], + + ["punctuation", "["], + ["punctuation", "["], + ["table", "array"], + ["punctuation", "]"], + ["punctuation", "]"] +] + +---------------------------------------------------- + +Checks for tables. From a69c2b6259e80862c56f7ce13df052b6101ecac7 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Sun, 2 Dec 2018 16:48:53 +0100 Subject: [PATCH 0117/1100] Improvements to Python F-strings and string prefixes (#1642) This PR adds support for [string interpolation](https://www.python.org/dev/peps/pep-0498/) (aka. f-strings) and makes the [string prefixes](https://docs.python.org/3/reference/lexical_analysis.html#string-and-bytes-literals) part of the string. Resolves #1636. ### Known issues Assumes that strings inside the interpolation expression are 'nice'. So strings with unfortunate numbers of curley braces will cause incorrect highlighting: E.g.: `f"{'}'}"`. --- components/prism-python.js | 29 +++- components/prism-python.min.js | 2 +- examples/prism-python.html | 7 +- .../python/string-interpolation_feature.test | 147 ++++++++++++++++++ tests/languages/python/string_feature.test | 12 +- 5 files changed, 188 insertions(+), 9 deletions(-) create mode 100644 tests/languages/python/string-interpolation_feature.test diff --git a/components/prism-python.js b/components/prism-python.js index b326a5ceb2..ea1a51545a 100644 --- a/components/prism-python.js +++ b/components/prism-python.js @@ -3,13 +3,36 @@ Prism.languages.python = { pattern: /(^|[^\\])#.*/, lookbehind: true }, + 'string-interpolation': { + pattern: /(?:f|rf|fr)(?:("""|''')[\s\S]+?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i, + greedy: true, + inside: { + 'interpolation': { + // "{" "}" + pattern: /((?:^|[^{])(?:{{)*){(?!{)(?:[^{}]|{(?!{)(?:[^{}]|{(?!{)(?:[^{}])+})+})+}/, + lookbehind: true, + inside: { + 'format-spec': { + pattern: /(:)[^:(){}]+(?=}$)/, + lookbehind: true + }, + 'conversion-option': { + pattern: /![sra](?=[:}]$)/, + alias: 'punctuation' + }, + rest: null + } + }, + 'string': /[\s\S]+/ + } + }, 'triple-quoted-string': { - pattern: /("""|''')[\s\S]+?\1/, + pattern: /(?:[rub]|rb|br)?("""|''')[\s\S]+?\1/i, greedy: true, alias: 'string' }, 'string': { - pattern: /("|')(?:\\.|(?!\1)[^\\\r\n])*\1/, + pattern: /(?:[rub]|rb|br)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i, greedy: true }, 'function': { @@ -35,3 +58,5 @@ Prism.languages.python = { 'operator': /[-+%=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/, 'punctuation': /[{}[\];(),.:]/ }; + +Prism.languages.python['string-interpolation'].inside['interpolation'].inside.rest = Prism.languages.python; diff --git a/components/prism-python.min.js b/components/prism-python.min.js index 8956dae5b4..7f9ee42b2d 100644 --- a/components/prism-python.min.js +++ b/components/prism-python.min.js @@ -1 +1 @@ -Prism.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0},"triple-quoted-string":{pattern:/("""|''')[\s\S]+?\1/,greedy:!0,alias:"string"},string:{pattern:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0},"function":{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^\s*)@\w+(?:\.\w+)*/i,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:and|as|assert|async|await|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,"boolean":/\b(?:True|False|None)\b/,number:/(?:\b(?=\d)|\B(?=\.))(?:0[bo])?(?:(?:\d|0x[\da-f])[\da-f]*\.?\d*|\.\d+)(?:e[+-]?\d+)?j?\b/i,operator:/[-+%=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/}; \ No newline at end of file +Prism.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0},"string-interpolation":{pattern:/(?:f|rf|fr)(?:("""|''')[\s\S]+?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:{{)*){(?!{)(?:[^{}]|{(?!{)(?:[^{}]|{(?!{)(?:[^{}])+})+})+}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|rb|br)?("""|''')[\s\S]+?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|rb|br)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},"function":{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^\s*)@\w+(?:\.\w+)*/i,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:and|as|assert|async|await|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,"boolean":/\b(?:True|False|None)\b/,number:/(?:\b(?=\d)|\B(?=\.))(?:0[bo])?(?:(?:\d|0x[\da-f])[\da-f]*\.?\d*|\.\d+)(?:e[+-]?\d+)?j?\b/i,operator:/[-+%=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},Prism.languages.python["string-interpolation"].inside.interpolation.inside.rest=Prism.languages.python; \ No newline at end of file diff --git a/examples/prism-python.html b/examples/prism-python.html index ca7a397e99..ce6efc00fb 100644 --- a/examples/prism-python.html +++ b/examples/prism-python.html @@ -57,8 +57,5 @@

      Known failures

      If a failure is listed here, it doesn’t mean it will never be fixed. This is more of a “known bugs” list, just with a certain type of bug.

      -

      Triple-quoted strings with what look like strings inside

      -
      def antique(string):
      -    """Replace anachronistic Latin "j" with "i"."""
      -    return string.replace("j", "i").replace("J", "I")
      -    
      +

      Interpolation expressions containing strings with { or }

      +
      f"{'}'}"
      diff --git a/tests/languages/python/string-interpolation_feature.test b/tests/languages/python/string-interpolation_feature.test new file mode 100644 index 0000000000..789cb83243 --- /dev/null +++ b/tests/languages/python/string-interpolation_feature.test @@ -0,0 +1,147 @@ +f'The value is {value}.' + +f"The value is {'4'}." + +f'input={value!s:#06x}' + +f'{{{4*10}}}' + +fr'x={4*10}\n' + +f'''{x ++1}''' + +f'mapping is { {a:b for (a, b) in ((1, 2), (3, 4))} }' + +f'{(lambda x: x*2)(3)}' + +---------------------------------------------------- + +[ + ["string-interpolation", [ + ["string", "f'The value is "], + ["interpolation", [ + ["punctuation", "{"], + "value", + ["punctuation", "}"] + ]], + ["string", ".'"] + ]], + + ["string-interpolation", [ + ["string", "f\"The value is "], + ["interpolation", [ + ["punctuation", "{"], + ["string", "'4'"], + ["punctuation", "}"] + ]], + ["string", ".\""] + ]], + + ["string-interpolation", [ + ["string", "f'input="], + ["interpolation", [ + ["punctuation", "{"], + "value", + ["conversion-option", "!s"], + ["punctuation", ":"], + ["format-spec", "#06x"], + ["punctuation", "}"] + ]], + ["string", "'"] + ]], + + ["string-interpolation", [ + ["string", "f'{{"], + ["interpolation", [ + ["punctuation", "{"], + ["number", "4"], + ["operator", "*"], + ["number", "10"], + ["punctuation", "}"] + ]], + ["string", "}}'"] + ]], + + ["string-interpolation", [ + ["string", "fr'x="], + ["interpolation", [ + ["punctuation", "{"], + ["number", "4"], + ["operator", "*"], + ["number", "10"], + ["punctuation", "}"] + ]], + ["string", "\\n'"] + ]], + + ["string-interpolation", [ + ["string", "f'''"], + ["interpolation", [ + ["punctuation", "{"], + "x\r\n", + ["operator", "+"], + ["number", "1"], + ["punctuation", "}"] + ]], + ["string", "'''"] + ]], + + ["string-interpolation", [ + ["string", "f'mapping is "], + ["interpolation", [ + ["punctuation", "{"], + ["punctuation", "{"], + "a", + ["punctuation", ":"], + "b ", + ["keyword", "for"], + ["punctuation", "("], + "a", + ["punctuation", ","], + " b", + ["punctuation", ")"], + ["keyword", "in"], + ["punctuation", "("], + ["punctuation", "("], + ["number", "1"], + ["punctuation", ","], + ["number", "2"], + ["punctuation", ")"], + ["punctuation", ","], + ["punctuation", "("], + ["number", "3"], + ["punctuation", ","], + ["number", "4"], + ["punctuation", ")"], + ["punctuation", ")"], + ["punctuation", "}"], + ["punctuation", "}"] + ]], + ["string", "'"] + ]], + + ["string-interpolation", [ + ["string", "f'"], + ["interpolation", [ + ["punctuation", "{"], + ["punctuation", "("], + ["keyword", "lambda"], + " x", + ["punctuation", ":"], + " x", + ["operator", "*"], + ["number", "2"], + ["punctuation", ")"], + ["punctuation", "("], + ["number", "3"], + ["punctuation", ")"], + ["punctuation", "}"] + ]], + ["string", "'"] + ]] +] + +---------------------------------------------------- + +Checks for string interpolation. \ No newline at end of file diff --git a/tests/languages/python/string_feature.test b/tests/languages/python/string_feature.test index 9e21c4d340..0bb511985a 100644 --- a/tests/languages/python/string_feature.test +++ b/tests/languages/python/string_feature.test @@ -4,6 +4,11 @@ 'fo\'obar' "fo\" # comment obar" +r"\n" +b'foo' +rb"foo\n" +u"foo" + ---------------------------------------------------- [ @@ -11,7 +16,12 @@ ["string", "\"fo\\\"obar\""], ["string", "''"], ["string", "'fo\\'obar'"], - ["string", "\"fo\\\" # comment obar\""] + ["string", "\"fo\\\" # comment obar\""], + + ["string", "r\"\\n\""], + ["string", "b'foo'"], + ["string", "rb\"foo\\n\""], + ["string", "u\"foo\""] ] ---------------------------------------------------- From 4a8219a43d58b265b94ffb8d7762b3fac0fdb6d5 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Sun, 2 Dec 2018 19:25:05 +0100 Subject: [PATCH 0118/1100] Add support for Java stack traces (#1520) There are 3 main types of elements which are highlighted: 1. The summary. This is the head of the stack trace and includes the name of the exception and a message. `Exception in thread "main" java.lang.RuntimeException: A test exception` 2. Stack frames. These make up the actual stack trace and include the full name of the method and the source. `at com.stackify.stacktrace.StackTraceExample.methodB(StackTraceExample.java:13)` 3. Omitted frames. This is a simple message that some frames were omitted. `... 27 more` Everything besides these 3 element types will not be highlighted. --- components.js | 2 +- components.json | 4 + components/prism-javastacktrace.js | 93 +++++++++++ components/prism-javastacktrace.min.js | 1 + examples/prism-javastacktrace.html | 63 +++++++ plugins/show-language/prism-show-language.js | 2 +- .../show-language/prism-show-language.min.js | 2 +- .../javastacktrace/more_feature.test | 22 +++ .../javastacktrace/stack-frame_feature.test | 71 ++++++++ .../javastacktrace/summary_feature.test | 155 ++++++++++++++++++ 10 files changed, 412 insertions(+), 3 deletions(-) create mode 100644 components/prism-javastacktrace.js create mode 100644 components/prism-javastacktrace.min.js create mode 100644 examples/prism-javastacktrace.html create mode 100644 tests/languages/javastacktrace/more_feature.test create mode 100644 tests/languages/javastacktrace/stack-frame_feature.test create mode 100644 tests/languages/javastacktrace/summary_feature.test diff --git a/components.js b/components.js index bf7df4486e..04e3207f5e 100644 --- a/components.js +++ b/components.js @@ -1,2 +1,2 @@ -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default","peerDependencies":"markup"},"clike":{"title":"C-like","option":"default","overrideExampleHeader":true},"javascript":{"title":"JavaScript","require":"clike","peerDependencies":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"actionscript":{"title":"ActionScript","require":"javascript","peerDependencies":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":"dotnet","owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","owner":"R-osey"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup","peerDependencies":["css","javascript"],"alias":"jinja2","owner":"romanvm"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","peerDependencies":["css","coffeescript","erb","javascript","less","markdown","ruby","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"http":{"title":"HTTP","peerDependencies":["javascript","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"json":{"title":"JSON","alias":"jsonp","aliasTitles":{"jsonp":"JSONP"},"owner":"CupOfTea696"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","owner":"japborst"},"less":{"title":"Less","require":"css","owner":"Golmote"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"n4js":{"title":"N4JS","require":"javascript","alias":"n4jsd","owner":"bsmith-n4"},"nasm":{"title":"NASM","owner":"rbmj"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"cpp","peerDependencies":["c","cpp"],"overrideExampleHeader":true,"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"php-extras":{"title":"PHP Extras","require":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":"javascript","peerDependencies":["coffeescript","ejs","handlebars","hogan","less","livescript","markdown","mustache","plates","scss","stylus","swig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","peerDependencies":["c","cpp","fortran","ats","dsp"],"owner":"Golmote"},"python":{"title":"Python","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"ruby":{"title":"Ruby","require":"clike","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sql":{"title":"SQL","owner":"multipetros"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","peerDependencies":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","alias":"ts","owner":"vkbansal"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","owner":"hason"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":"Line Highlight","line-numbers":{"title":"Line Numbers","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","after":["autolinker","data-uri-highlight"]},"autolinker":"Autolinker","wpd":"WebPlatform Docs","custom-class":{"title":"Custom Class","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","noCSS":true},"show-language":{"title":"Show Language","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","owner":"Golmote","noCSS":true},"previewers":{"title":"Previewers","owner":"Golmote"},"autoloader":{"title":"Autoloader","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","owner":"Golmote","after":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","owner":"chriswells0"},"unescaped-markup":"Unescaped Markup","normalize-whitespace":{"title":"Normalize Whitespace","owner":"zeitgeist87","after":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","owner":"mAAdhaTTah","require":"toolbar","noCSS":true}}}; +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default","peerDependencies":"markup"},"clike":{"title":"C-like","option":"default","overrideExampleHeader":true},"javascript":{"title":"JavaScript","require":"clike","peerDependencies":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"actionscript":{"title":"ActionScript","require":"javascript","peerDependencies":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":"dotnet","owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","owner":"R-osey"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup","peerDependencies":["css","javascript"],"alias":"jinja2","owner":"romanvm"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","peerDependencies":["css","coffeescript","erb","javascript","less","markdown","ruby","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"http":{"title":"HTTP","peerDependencies":["javascript","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"json":{"title":"JSON","alias":"jsonp","aliasTitles":{"jsonp":"JSONP"},"owner":"CupOfTea696"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","owner":"japborst"},"less":{"title":"Less","require":"css","owner":"Golmote"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"n4js":{"title":"N4JS","require":"javascript","alias":"n4jsd","owner":"bsmith-n4"},"nasm":{"title":"NASM","owner":"rbmj"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"cpp","peerDependencies":["c","cpp"],"overrideExampleHeader":true,"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"php-extras":{"title":"PHP Extras","require":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":"javascript","peerDependencies":["coffeescript","ejs","handlebars","hogan","less","livescript","markdown","mustache","plates","scss","stylus","swig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","peerDependencies":["c","cpp","fortran","ats","dsp"],"owner":"Golmote"},"python":{"title":"Python","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"ruby":{"title":"Ruby","require":"clike","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sql":{"title":"SQL","owner":"multipetros"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","peerDependencies":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","alias":"ts","owner":"vkbansal"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","owner":"hason"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":"Line Highlight","line-numbers":{"title":"Line Numbers","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","after":["autolinker","data-uri-highlight"]},"autolinker":"Autolinker","wpd":"WebPlatform Docs","custom-class":{"title":"Custom Class","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","noCSS":true},"show-language":{"title":"Show Language","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","owner":"Golmote","noCSS":true},"previewers":{"title":"Previewers","owner":"Golmote"},"autoloader":{"title":"Autoloader","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","owner":"Golmote","after":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","owner":"chriswells0"},"unescaped-markup":"Unescaped Markup","normalize-whitespace":{"title":"Normalize Whitespace","owner":"zeitgeist87","after":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","owner":"mAAdhaTTah","require":"toolbar","noCSS":true}}}; if (typeof module !== 'undefined' && module.exports) { module.exports = components; } \ No newline at end of file diff --git a/components.json b/components.json index 672f87ce79..653ccc800b 100644 --- a/components.json +++ b/components.json @@ -382,6 +382,10 @@ "require": "clike", "owner": "sherblot" }, + "javastacktrace": { + "title": "Java stack trace", + "owner": "RunDevelopment" + }, "jolie": { "title": "Jolie", "require": "clike", diff --git a/components/prism-javastacktrace.js b/components/prism-javastacktrace.js new file mode 100644 index 0000000000..8c1b128ea1 --- /dev/null +++ b/components/prism-javastacktrace.js @@ -0,0 +1,93 @@ +Prism.languages.javastacktrace = { + + // java.sql.SQLException: Violation of unique constraint MY_ENTITY_UK_1: duplicate value(s) for column(s) MY_COLUMN in statement [...] + // Caused by: java.sql.SQLException: Violation of unique constraint MY_ENTITY_UK_1: duplicate value(s) for column(s) MY_COLUMN in statement [...] + // Caused by: com.example.myproject.MyProjectServletException + // Caused by: MidLevelException: LowLevelException + // Suppressed: Resource$CloseFailException: Resource ID = 0 + 'summary': { + pattern: /^[\t ]*(?:(?:Caused by:|Suppressed:|Exception in thread "[^"]*")[\t ]+)?[\w$.]+(?:\:.*)?$/m, + inside: { + 'keyword': { + pattern: /^(\s*)(?:(?:Caused by|Suppressed)(?=:)|Exception in thread)/m, + lookbehind: true + }, + + // the current thread if the summary starts with 'Exception in thread' + 'string': { + pattern: /^(\s*)"[^"]*"/, + lookbehind: true + }, + 'exceptions': { + pattern: /^(:?\s*)[\w$.]+(?=:|$)/, + lookbehind: true, + inside: { + 'class-name': /[\w$]+(?=$|:)/, + 'namespace': /[a-z]\w*/, + 'punctuation': /[.:]/ + } + }, + 'message': { + pattern: /(:\s*)\S.*/, + lookbehind: true, + alias: 'string' + }, + 'punctuation': /[:]/ + } + }, + + // at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1166) + // at org.hsqldb.jdbc.Util.throwError(Unknown Source) here could be some notes + // at Util.(Unknown Source) + 'stack-frame': { + pattern: /^[\t ]*at [\w$.]+(?:)?\([^()]*\)/m, + inside: { + 'keyword': { + pattern: /^(\s*)at/, + lookbehind: true + }, + 'source': [ + // (Main.java:15) + // (Main.scala:15) + { + pattern: /(\()\w+.\w+:\d+(?=\))/, + lookbehind: true, + inside: { + 'file': /^\w+\.\w+/, + 'punctuation': /:/, + 'line-number': { + pattern: /\d+/, + alias: 'number' + } + } + }, + // (Unknown Source) + // (Native Method) + // (...something...) + { + pattern: /(\()[^()]*(?=\))/, + lookbehind: true, + inside: { + 'keyword': /^(?:Unknown Source|Native Method)$/ + } + } + ], + 'class-name': /[\w$]+(?=\.(?:|[\w$]+)\()/, + 'function': /(?:|[\w$]+)(?=\()/, + 'namespace': /[a-z]\w*/, + 'punctuation': /[.()]/ + } + }, + + // ... 32 more + // ... 32 common frames omitted + 'more': { + pattern: /^[\t ]*\.{3} \d+ [a-z]+(?: [a-z]+)*/m, + inside: { + 'punctuation': /\.{3}/, + 'number': /\d+/, + 'keyword': /\b[a-z]+(?: [a-z]+)*\b/ + } + } + +}; diff --git a/components/prism-javastacktrace.min.js b/components/prism-javastacktrace.min.js new file mode 100644 index 0000000000..b601dfc47b --- /dev/null +++ b/components/prism-javastacktrace.min.js @@ -0,0 +1 @@ +Prism.languages.javastacktrace={summary:{pattern:/^[\t ]*(?:(?:Caused by:|Suppressed:|Exception in thread "[^"]*")[\t ]+)?[\w$.]+(?:\:.*)?$/m,inside:{keyword:{pattern:/^(\s*)(?:(?:Caused by|Suppressed)(?=:)|Exception in thread)/m,lookbehind:!0},string:{pattern:/^(\s*)"[^"]*"/,lookbehind:!0},exceptions:{pattern:/^(:?\s*)[\w$.]+(?=:|$)/,lookbehind:!0,inside:{"class-name":/[\w$]+(?=$|:)/,namespace:/[a-z]\w*/,punctuation:/[.:]/}},message:{pattern:/(:\s*)\S.*/,lookbehind:!0,alias:"string"},punctuation:/[:]/}},"stack-frame":{pattern:/^[\t ]*at [\w$.]+(?:)?\([^()]*\)/m,inside:{keyword:{pattern:/^(\s*)at/,lookbehind:!0},source:[{pattern:/(\()\w+.\w+:\d+(?=\))/,lookbehind:!0,inside:{file:/^\w+\.\w+/,punctuation:/:/,"line-number":{pattern:/\d+/,alias:"number"}}},{pattern:/(\()[^()]*(?=\))/,lookbehind:!0,inside:{keyword:/^(?:Unknown Source|Native Method)$/}}],"class-name":/[\w$]+(?=\.(?:|[\w$]+)\()/,"function":/(?:|[\w$]+)(?=\()/,namespace:/[a-z]\w*/,punctuation:/[.()]/}},more:{pattern:/^[\t ]*\.{3} \d+ [a-z]+(?: [a-z]+)*/m,inside:{punctuation:/\.{3}/,number:/\d+/,keyword:/\b[a-z]+(?: [a-z]+)*\b/}}}; \ No newline at end of file diff --git a/examples/prism-javastacktrace.html b/examples/prism-javastacktrace.html new file mode 100644 index 0000000000..3511aa6ae5 --- /dev/null +++ b/examples/prism-javastacktrace.html @@ -0,0 +1,63 @@ +

      Full example

      +
      javax.servlet.ServletException: Something bad happened
      +    at com.example.myproject.OpenSessionInViewFilter.doFilter(OpenSessionInViewFilter.java:60)
      +    at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
      +    at com.example.myproject.ExceptionHandlerFilter.doFilter(ExceptionHandlerFilter.java:28)
      +    at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
      +    at com.example.myproject.OutputBufferFilter.doFilter(OutputBufferFilter.java:33)
      +    at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
      +    at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388)
      +    at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
      +    at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
      +    at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
      +    at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)
      +    at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
      +    at org.mortbay.jetty.Server.handle(Server.java:326)
      +    at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
      +    at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:943)
      +    at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:756)
      +    at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218)
      +    at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
      +    at org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:228)
      +    at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
      +Caused by: com.example.myproject.MyProjectServletException
      +    at com.example.myproject.MyServlet.doPost(MyServlet.java:169)
      +    at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
      +    at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
      +    at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
      +    at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1166)
      +    at com.example.myproject.OpenSessionInViewFilter.doFilter(OpenSessionInViewFilter.java:30)
      +    ... 27 more
      +Suppressed: org.hibernate.exception.ConstraintViolationException: could not insert: [com.example.myproject.MyEntity]
      +    at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:96)
      +    at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
      +    at org.hibernate.id.insert.AbstractSelectingDelegate.performInsert(AbstractSelectingDelegate.java:64)
      +    at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2329)
      +    at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2822)
      +    at org.hibernate.action.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:71)
      +    at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:268)
      +    at org.hibernate.event.def.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:321)
      +    at org.hibernate.event.def.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:204)
      +    at org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:130)
      +    at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:210)
      +    at org.hibernate.event.def.DefaultSaveEventListener.saveWithGeneratedOrRequestedId(DefaultSaveEventListener.java:56)
      +    at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:195)
      +    at org.hibernate.event.def.DefaultSaveEventListener.performSaveOrUpdate(DefaultSaveEventListener.java:50)
      +    at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:93)
      +    at org.hibernate.impl.SessionImpl.fireSave(SessionImpl.java:705)
      +    at org.hibernate.impl.SessionImpl.save(SessionImpl.java:693)
      +    at org.hibernate.impl.SessionImpl.save(SessionImpl.java:689)
      +    at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
      +    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      +    at java.lang.reflect.Method.invoke(Method.java:597)
      +    at org.hibernate.context.ThreadLocalSessionContext$TransactionProtectionWrapper.invoke(ThreadLocalSessionContext.java:344)
      +    at $Proxy19.save(Unknown Source)
      +    at com.example.myproject.MyEntityService.save(MyEntityService.java:59) <-- relevant call (see notes below)
      +    at com.example.myproject.MyServlet.doPost(MyServlet.java:164)
      +    ... 32 more
      +Caused by: java.sql.SQLException: Violation of unique constraint MY_ENTITY_UK_1: duplicate value(s) for column(s) MY_COLUMN in statement [...]
      +    at org.hsqldb.jdbc.Util.throwError(Unknown Source)
      +    at org.hsqldb.jdbc.jdbcPreparedStatement.executeUpdate(Unknown Source)
      +    at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeUpdate(NewProxyPreparedStatement.java:105)
      +    at org.hibernate.id.insert.AbstractSelectingDelegate.performInsert(AbstractSelectingDelegate.java:57)
      +    ... 54 more
      diff --git a/plugins/show-language/prism-show-language.js b/plugins/show-language/prism-show-language.js index cd18f207f7..38675bb6b7 100644 --- a/plugins/show-language/prism-show-language.js +++ b/plugins/show-language/prism-show-language.js @@ -11,7 +11,7 @@ if (!Prism.plugins.toolbar) { } // The languages map is built automatically with gulp -var Languages = /*languages_placeholder[*/{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","css":"CSS","clike":"C-like","javascript":"JavaScript","abap":"ABAP","actionscript":"ActionScript","apacheconf":"Apache Configuration","apl":"APL","applescript":"AppleScript","arff":"ARFF","asciidoc":"AsciiDoc","asm6502":"6502 Assembly","aspnet":"ASP.NET (C#)","autohotkey":"AutoHotkey","autoit":"AutoIt","shell":"Shell","basic":"BASIC","csharp":"C#","cpp":"C++","cil":"CIL","coffeescript":"CoffeeScript","csp":"Content-Security-Policy","css-extras":"CSS Extras","django":"Django/Jinja2","erb":"ERB","fsharp":"F#","gcode":"G-code","gedcom":"GEDCOM","glsl":"GLSL","gml":"GameMaker Language","graphql":"GraphQL","http":"HTTP","hpkp":"HTTP Public-Key-Pins","hsts":"HTTP Strict-Transport-Security","ichigojam":"IchigoJam","inform7":"Inform 7","json":"JSON","jsonp":"JSONP","latex":"LaTeX","livescript":"LiveScript","lolcode":"LOLCODE","markup-templating":"Markup templating","matlab":"MATLAB","mel":"MEL","n4js":"N4JS","nasm":"NASM","nginx":"nginx","nsis":"NSIS","objectivec":"Objective-C","ocaml":"OCaml","opencl":"OpenCL","parigp":"PARI/GP","objectpascal":"Object Pascal","php":"PHP","php-extras":"PHP Extras","plsql":"PL/SQL","powershell":"PowerShell","properties":".properties","protobuf":"Protocol Buffers","q":"Q (kdb+ database)","jsx":"React JSX","tsx":"React TSX","renpy":"Ren'py","rest":"reST (reStructuredText)","sas":"SAS","sass":"Sass (Sass)","scss":"Sass (Scss)","sql":"SQL","soy":"Soy (Closure Template)","tap":"TAP","toml":"TOML","tt2":"Template Toolkit 2","typescript":"TypeScript","vbnet":"VB.Net","vhdl":"VHDL","vim":"vim","visual-basic":"Visual Basic","wasm":"WebAssembly","wiki":"Wiki markup","xeoracube":"XeoraCube","xojo":"Xojo (REALbasic)","xquery":"XQuery","yaml":"YAML"}/*]*/; +var Languages = /*languages_placeholder[*/{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","css":"CSS","clike":"C-like","javascript":"JavaScript","abap":"ABAP","actionscript":"ActionScript","apacheconf":"Apache Configuration","apl":"APL","applescript":"AppleScript","arff":"ARFF","asciidoc":"AsciiDoc","asm6502":"6502 Assembly","aspnet":"ASP.NET (C#)","autohotkey":"AutoHotkey","autoit":"AutoIt","shell":"Shell","basic":"BASIC","csharp":"C#","cpp":"C++","cil":"CIL","coffeescript":"CoffeeScript","csp":"Content-Security-Policy","css-extras":"CSS Extras","django":"Django/Jinja2","erb":"ERB","fsharp":"F#","gcode":"G-code","gedcom":"GEDCOM","glsl":"GLSL","gml":"GameMaker Language","graphql":"GraphQL","http":"HTTP","hpkp":"HTTP Public-Key-Pins","hsts":"HTTP Strict-Transport-Security","ichigojam":"IchigoJam","inform7":"Inform 7","javastacktrace":"Java stack trace","json":"JSON","jsonp":"JSONP","latex":"LaTeX","livescript":"LiveScript","lolcode":"LOLCODE","markup-templating":"Markup templating","matlab":"MATLAB","mel":"MEL","n4js":"N4JS","nasm":"NASM","nginx":"nginx","nsis":"NSIS","objectivec":"Objective-C","ocaml":"OCaml","opencl":"OpenCL","parigp":"PARI/GP","objectpascal":"Object Pascal","php":"PHP","php-extras":"PHP Extras","plsql":"PL/SQL","powershell":"PowerShell","properties":".properties","protobuf":"Protocol Buffers","q":"Q (kdb+ database)","jsx":"React JSX","tsx":"React TSX","renpy":"Ren'py","rest":"reST (reStructuredText)","sas":"SAS","sass":"Sass (Sass)","scss":"Sass (Scss)","sql":"SQL","soy":"Soy (Closure Template)","tap":"TAP","toml":"TOML","tt2":"Template Toolkit 2","typescript":"TypeScript","vbnet":"VB.Net","vhdl":"VHDL","vim":"vim","visual-basic":"Visual Basic","wasm":"WebAssembly","wiki":"Wiki markup","xeoracube":"XeoraCube","xojo":"Xojo (REALbasic)","xquery":"XQuery","yaml":"YAML"}/*]*/; Prism.plugins.toolbar.registerButton('show-language', function(env) { var pre = env.element.parentNode; if (!pre || !/pre/i.test(pre.nodeName)) { diff --git a/plugins/show-language/prism-show-language.min.js b/plugins/show-language/prism-show-language.min.js index 945cbdf174..7f4dd60fbf 100644 --- a/plugins/show-language/prism-show-language.min.js +++ b/plugins/show-language/prism-show-language.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof self&&self.Prism&&self.document){if(!Prism.plugins.toolbar)return console.warn("Show Languages plugin loaded before Toolbar plugin."),void 0;var e={html:"HTML",xml:"XML",svg:"SVG",mathml:"MathML",css:"CSS",clike:"C-like",javascript:"JavaScript",abap:"ABAP",actionscript:"ActionScript",apacheconf:"Apache Configuration",apl:"APL",applescript:"AppleScript",arff:"ARFF",asciidoc:"AsciiDoc",asm6502:"6502 Assembly",aspnet:"ASP.NET (C#)",autohotkey:"AutoHotkey",autoit:"AutoIt",shell:"Shell",basic:"BASIC",csharp:"C#",cpp:"C++",cil:"CIL",coffeescript:"CoffeeScript",csp:"Content-Security-Policy","css-extras":"CSS Extras",django:"Django/Jinja2",erb:"ERB",fsharp:"F#",gcode:"G-code",gedcom:"GEDCOM",glsl:"GLSL",gml:"GameMaker Language",graphql:"GraphQL",http:"HTTP",hpkp:"HTTP Public-Key-Pins",hsts:"HTTP Strict-Transport-Security",ichigojam:"IchigoJam",inform7:"Inform 7",json:"JSON",jsonp:"JSONP",latex:"LaTeX",livescript:"LiveScript",lolcode:"LOLCODE","markup-templating":"Markup templating",matlab:"MATLAB",mel:"MEL",n4js:"N4JS",nasm:"NASM",nginx:"nginx",nsis:"NSIS",objectivec:"Objective-C",ocaml:"OCaml",opencl:"OpenCL",parigp:"PARI/GP",objectpascal:"Object Pascal",php:"PHP","php-extras":"PHP Extras",plsql:"PL/SQL",powershell:"PowerShell",properties:".properties",protobuf:"Protocol Buffers",q:"Q (kdb+ database)",jsx:"React JSX",tsx:"React TSX",renpy:"Ren'py",rest:"reST (reStructuredText)",sas:"SAS",sass:"Sass (Sass)",scss:"Sass (Scss)",sql:"SQL",soy:"Soy (Closure Template)",tap:"TAP",toml:"TOML",tt2:"Template Toolkit 2",typescript:"TypeScript",vbnet:"VB.Net",vhdl:"VHDL",vim:"vim","visual-basic":"Visual Basic",wasm:"WebAssembly",wiki:"Wiki markup",xeoracube:"XeoraCube",xojo:"Xojo (REALbasic)",xquery:"XQuery",yaml:"YAML"};Prism.plugins.toolbar.registerButton("show-language",function(a){var t=a.element.parentNode;if(t&&/pre/i.test(t.nodeName)){var s=t.getAttribute("data-language")||e[a.language]||a.language&&a.language.substring(0,1).toUpperCase()+a.language.substring(1);if(s){var i=document.createElement("span");return i.textContent=s,i}}})}}(); \ No newline at end of file +!function(){if("undefined"!=typeof self&&self.Prism&&self.document){if(!Prism.plugins.toolbar)return console.warn("Show Languages plugin loaded before Toolbar plugin."),void 0;var e={html:"HTML",xml:"XML",svg:"SVG",mathml:"MathML",css:"CSS",clike:"C-like",javascript:"JavaScript",abap:"ABAP",actionscript:"ActionScript",apacheconf:"Apache Configuration",apl:"APL",applescript:"AppleScript",arff:"ARFF",asciidoc:"AsciiDoc",asm6502:"6502 Assembly",aspnet:"ASP.NET (C#)",autohotkey:"AutoHotkey",autoit:"AutoIt",shell:"Shell",basic:"BASIC",csharp:"C#",cpp:"C++",cil:"CIL",coffeescript:"CoffeeScript",csp:"Content-Security-Policy","css-extras":"CSS Extras",django:"Django/Jinja2",erb:"ERB",fsharp:"F#",gcode:"G-code",gedcom:"GEDCOM",glsl:"GLSL",gml:"GameMaker Language",graphql:"GraphQL",http:"HTTP",hpkp:"HTTP Public-Key-Pins",hsts:"HTTP Strict-Transport-Security",ichigojam:"IchigoJam",inform7:"Inform 7",javastacktrace:"Java stack trace",json:"JSON",jsonp:"JSONP",latex:"LaTeX",livescript:"LiveScript",lolcode:"LOLCODE","markup-templating":"Markup templating",matlab:"MATLAB",mel:"MEL",n4js:"N4JS",nasm:"NASM",nginx:"nginx",nsis:"NSIS",objectivec:"Objective-C",ocaml:"OCaml",opencl:"OpenCL",parigp:"PARI/GP",objectpascal:"Object Pascal",php:"PHP","php-extras":"PHP Extras",plsql:"PL/SQL",powershell:"PowerShell",properties:".properties",protobuf:"Protocol Buffers",q:"Q (kdb+ database)",jsx:"React JSX",tsx:"React TSX",renpy:"Ren'py",rest:"reST (reStructuredText)",sas:"SAS",sass:"Sass (Sass)",scss:"Sass (Scss)",sql:"SQL",soy:"Soy (Closure Template)",tap:"TAP",toml:"TOML",tt2:"Template Toolkit 2",typescript:"TypeScript",vbnet:"VB.Net",vhdl:"VHDL",vim:"vim","visual-basic":"Visual Basic",wasm:"WebAssembly",wiki:"Wiki markup",xeoracube:"XeoraCube",xojo:"Xojo (REALbasic)",xquery:"XQuery",yaml:"YAML"};Prism.plugins.toolbar.registerButton("show-language",function(a){var t=a.element.parentNode;if(t&&/pre/i.test(t.nodeName)){var s=t.getAttribute("data-language")||e[a.language]||a.language&&a.language.substring(0,1).toUpperCase()+a.language.substring(1);if(s){var r=document.createElement("span");return r.textContent=s,r}}})}}(); \ No newline at end of file diff --git a/tests/languages/javastacktrace/more_feature.test b/tests/languages/javastacktrace/more_feature.test new file mode 100644 index 0000000000..8f9dc6ae86 --- /dev/null +++ b/tests/languages/javastacktrace/more_feature.test @@ -0,0 +1,22 @@ +... 6 more + ... 6 common frames omitted + +---------------------------------------------------- + +[ + ["more", [ + ["punctuation", "..."], + ["number", "6"], + ["keyword", "more"] + ]], + + ["more", [ + ["punctuation", "..."], + ["number", "6"], + ["keyword", "common frames omitted"] + ]] +] + +---------------------------------------------------- + +Checks for the message that some frames were omitted. diff --git a/tests/languages/javastacktrace/stack-frame_feature.test b/tests/languages/javastacktrace/stack-frame_feature.test new file mode 100644 index 0000000000..b4c400e458 --- /dev/null +++ b/tests/languages/javastacktrace/stack-frame_feature.test @@ -0,0 +1,71 @@ +at Main.main(Main.java:13) +at Main.main(Main.java:13) Same but with some additional notes +at com.foo.bar.Main$FooBar.main(Native Method) +at Main$FooBar.(Unknown Source) + +---------------------------------------------------- + +[ + ["stack-frame", [ + ["keyword", "at"], + ["class-name", "Main"], + ["punctuation", "."], + ["function", "main"], + ["punctuation", "("], + ["source", [ + ["file", "Main.java"], + ["punctuation", ":"], + ["line-number", "13"] + ]], + ["punctuation", ")"] + ]], + + ["stack-frame", [ + ["keyword", "at"], + ["class-name", "Main"], + ["punctuation", "."], + ["function", "main"], + ["punctuation", "("], + ["source", [ + ["file", "Main.java"], + ["punctuation", ":"], + ["line-number", "13"] + ]], + ["punctuation", ")"] + ]], + " Same but with some additional notes\n", + + ["stack-frame", [ + ["keyword", "at"], + ["namespace", "com"], + ["punctuation", "."], + ["namespace", "foo"], + ["punctuation", "."], + ["namespace", "bar"], + ["punctuation", "."], + ["class-name", "Main$FooBar"], + ["punctuation", "."], + ["function", "main"], + ["punctuation", "("], + ["source", [ + ["keyword", "Native Method"] + ]], + ["punctuation", ")"] + ]], + + ["stack-frame", [ + ["keyword", "at"], + ["class-name", "Main$FooBar"], + ["punctuation", "."], + ["function", ""], + ["punctuation", "("], + ["source", [ + ["keyword", "Unknown Source"] + ]], + ["punctuation", ")"] + ]] +] + +---------------------------------------------------- + +Checks for stack frames. diff --git a/tests/languages/javastacktrace/summary_feature.test b/tests/languages/javastacktrace/summary_feature.test new file mode 100644 index 0000000000..01497f85fd --- /dev/null +++ b/tests/languages/javastacktrace/summary_feature.test @@ -0,0 +1,155 @@ +java.lang.NullPointerException +java.lang.NullPointerException: This is bad +HighLevelException: MidLevelException: LowLevelException +HighLevelException: MidLevelException: LowLevelException: This is bad + +Exception in thread "main" java.lang.RuntimeException: A test exception +Exception in thread "main" HighLevelException: MidLevelException: LowLevelException: This is bad + +Caused by: Exception: This also includes causes and suppressed exceptions +Caused by: MidLevelException: LowLevelException +Caused by: com.example.myproject.MyProjectServletException + +Suppressed: java.lang.RuntimeException: could not insert: [com.example.myproject.MyEntity] + +---------------------------------------------------- + +[ + ["summary", [ + ["exceptions", [ + ["namespace", "java"], + ["punctuation", "."], + ["namespace", "lang"], + ["punctuation", "."], + ["class-name", "NullPointerException"] + ]] + ]], + + ["summary", [ + ["exceptions", [ + ["namespace", "java"], + ["punctuation", "."], + ["namespace", "lang"], + ["punctuation", "."], + ["class-name", "NullPointerException"] + ]], + ["punctuation", ":"], + ["message", "This is bad"] + ]], + + ["summary", [ + ["exceptions", [ + ["class-name", "HighLevelException"] + ]], + ["punctuation", ":"], + ["exceptions", [ + ["class-name", "MidLevelException"] + ]], + ["punctuation", ":"], + ["exceptions", [ + ["class-name", "LowLevelException"] + ]] + ]], + + ["summary", [ + ["exceptions", [ + ["class-name", "HighLevelException"] + ]], + ["punctuation", ":"], + ["exceptions", [ + ["class-name", "MidLevelException"] + ]], + ["punctuation", ":"], + ["exceptions", [ + ["class-name", "LowLevelException"] + ]], + ["punctuation", ":"], + ["message", "This is bad"] + ]], + + ["summary", [ + ["keyword", "Exception in thread"], + ["string", "\"main\""], + ["exceptions", [ + ["namespace", "java"], + ["punctuation", "."], + ["namespace", "lang"], + ["punctuation", "."], + ["class-name", "RuntimeException"] + ]], + ["punctuation", ":"], + ["message", "A test exception"] + ]], + + ["summary", [ + ["keyword", "Exception in thread"], + ["string", "\"main\""], + ["exceptions", [ + ["class-name", "HighLevelException"] + ]], + ["punctuation", ":"], + ["exceptions", [ + ["class-name", "MidLevelException"] + ]], + ["punctuation", ":"], + ["exceptions", [ + ["class-name", "LowLevelException"] + ]], + ["punctuation", ":"], + ["message", "This is bad"] + ]], + + ["summary", [ + ["keyword", "Caused by"], + ["punctuation", ":"], + ["exceptions", [ + ["class-name", "Exception"] + ]], + ["punctuation", ":"], + ["message", "This also includes causes and suppressed exceptions"] + ]], + + ["summary", [ + ["keyword", "Caused by"], + ["punctuation", ":"], + ["exceptions", [ + ["class-name", "MidLevelException"] + ]], + ["punctuation", ":"], + ["exceptions", [ + ["class-name", "LowLevelException"] + ]] + ]], + + ["summary", [ + ["keyword", "Caused by"], + ["punctuation", ":"], + ["exceptions", [ + ["namespace", "com"], + ["punctuation", "."], + ["namespace", "example"], + ["punctuation", "."], + ["namespace", "myproject"], + ["punctuation", "."], + ["class-name", "MyProjectServletException"] + ]] + ]], + + ["summary", [ + ["keyword", "Suppressed"], + ["punctuation", ":"], + ["exceptions", [ + ["namespace", "java"], + ["punctuation", "."], + ["namespace", "lang"], + ["punctuation", "."], + ["class-name", "RuntimeException"] + ]], + ["punctuation", ":"], + ["message", "could not insert: [com.example.myproject.MyEntity]"] + ]] +] + +---------------------------------------------------- + +Checks for exception summaries. From 0c8f650446d1d97ce5a6bac381bafcf6d1e457ba Mon Sep 17 00:00:00 2001 From: Masafumi Koba <473530+ybiquitous@users.noreply.github.com> Date: Mon, 3 Dec 2018 04:37:20 -0800 Subject: [PATCH 0119/1100] Add file extensions support for major languages (#1478) This adds aliases for file extensions of some major languages. - `coffee` -> `coffeescript` - `md` -> `markdown` - `py` -> `python` - `rb` -> `ruby` - `yml` -> `yaml` --- components/prism-coffeescript.js | 1 + components/prism-coffeescript.min.js | 2 +- components/prism-markdown.js | 2 ++ components/prism-markdown.min.js | 2 +- components/prism-python.js | 2 ++ components/prism-python.min.js | 2 +- components/prism-ruby.js | 2 ++ components/prism-ruby.min.js | 2 +- components/prism-yaml.js | 2 ++ components/prism-yaml.min.js | 2 +- 10 files changed, 14 insertions(+), 5 deletions(-) diff --git a/components/prism-coffeescript.js b/components/prism-coffeescript.js index 8d7ef937d7..db6ad7ba03 100644 --- a/components/prism-coffeescript.js +++ b/components/prism-coffeescript.js @@ -88,4 +88,5 @@ Prism.languages.insertBefore('coffeescript', 'keyword', { delete Prism.languages.coffeescript['template-string']; +Prism.languages.coffee = Prism.languages.coffeescript; }(Prism)); \ No newline at end of file diff --git a/components/prism-coffeescript.min.js b/components/prism-coffeescript.min.js index 4e8930f924..95daa2a04d 100644 --- a/components/prism-coffeescript.min.js +++ b/components/prism-coffeescript.min.js @@ -1 +1 @@ -!function(e){var t=/#(?!\{).+/,n={pattern:/#\{[^}]+\}/,alias:"variable"};e.languages.coffeescript=e.languages.extend("javascript",{comment:t,string:[{pattern:/'(?:\\[\s\S]|[^\\'])*'/,greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,greedy:!0,inside:{interpolation:n}}],keyword:/\b(?:and|break|by|catch|class|continue|debugger|delete|do|each|else|extend|extends|false|finally|for|if|in|instanceof|is|isnt|let|loop|namespace|new|no|not|null|of|off|on|or|own|return|super|switch|then|this|throw|true|try|typeof|undefined|unless|until|when|while|window|with|yes|yield)\b/,"class-member":{pattern:/@(?!\d)\w+/,alias:"variable"}}),e.languages.insertBefore("coffeescript","comment",{"multiline-comment":{pattern:/###[\s\S]+?###/,alias:"comment"},"block-regex":{pattern:/\/{3}[\s\S]*?\/{3}/,alias:"regex",inside:{comment:t,interpolation:n}}}),e.languages.insertBefore("coffeescript","string",{"inline-javascript":{pattern:/`(?:\\[\s\S]|[^\\`])*`/,inside:{delimiter:{pattern:/^`|`$/,alias:"punctuation"},rest:e.languages.javascript}},"multiline-string":[{pattern:/'''[\s\S]*?'''/,greedy:!0,alias:"string"},{pattern:/"""[\s\S]*?"""/,greedy:!0,alias:"string",inside:{interpolation:n}}]}),e.languages.insertBefore("coffeescript","keyword",{property:/(?!\d)\w+(?=\s*:(?!:))/}),delete e.languages.coffeescript["template-string"]}(Prism); \ No newline at end of file +!function(e){var t=/#(?!\{).+/,n={pattern:/#\{[^}]+\}/,alias:"variable"};e.languages.coffeescript=e.languages.extend("javascript",{comment:t,string:[{pattern:/'(?:\\[\s\S]|[^\\'])*'/,greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,greedy:!0,inside:{interpolation:n}}],keyword:/\b(?:and|break|by|catch|class|continue|debugger|delete|do|each|else|extend|extends|false|finally|for|if|in|instanceof|is|isnt|let|loop|namespace|new|no|not|null|of|off|on|or|own|return|super|switch|then|this|throw|true|try|typeof|undefined|unless|until|when|while|window|with|yes|yield)\b/,"class-member":{pattern:/@(?!\d)\w+/,alias:"variable"}}),e.languages.insertBefore("coffeescript","comment",{"multiline-comment":{pattern:/###[\s\S]+?###/,alias:"comment"},"block-regex":{pattern:/\/{3}[\s\S]*?\/{3}/,alias:"regex",inside:{comment:t,interpolation:n}}}),e.languages.insertBefore("coffeescript","string",{"inline-javascript":{pattern:/`(?:\\[\s\S]|[^\\`])*`/,inside:{delimiter:{pattern:/^`|`$/,alias:"punctuation"},rest:e.languages.javascript}},"multiline-string":[{pattern:/'''[\s\S]*?'''/,greedy:!0,alias:"string"},{pattern:/"""[\s\S]*?"""/,greedy:!0,alias:"string",inside:{interpolation:n}}]}),e.languages.insertBefore("coffeescript","keyword",{property:/(?!\d)\w+(?=\s*:(?!:))/}),delete e.languages.coffeescript["template-string"],e.languages.coffee=e.languages.coffeescript}(Prism); \ No newline at end of file diff --git a/components/prism-markdown.js b/components/prism-markdown.js index 22c6a4b681..eba1af6556 100644 --- a/components/prism-markdown.js +++ b/components/prism-markdown.js @@ -225,3 +225,5 @@ Prism.hooks.add('wrap', function (env) { env.content = Prism.highlight(code, grammar, codeLang); }); + +Prism.languages.md = Prism.languages.markdown; \ No newline at end of file diff --git a/components/prism-markdown.min.js b/components/prism-markdown.min.js index b062e980f9..b93ac86ab8 100644 --- a/components/prism-markdown.min.js +++ b/components/prism-markdown.min.js @@ -1 +1 @@ -Prism.languages.markdown=Prism.languages.extend("markup",{}),Prism.languages.insertBefore("markdown","prolog",{blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},code:[{pattern:/^(?: {4}|\t).+/m,alias:"keyword"},{pattern:/``.+?``|`[^`\n]+`/,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\r?\n|\r))[\s\S]+?(?=(?:\r?\n|\r)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\r?\n|\r)(?:==+|--+)/,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#+.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:/(^|[^\\])(\*\*|__)(?:(?:\r?\n|\r)(?!\r?\n|\r)|.)+?\2/,lookbehind:!0,greedy:!0,inside:{punctuation:/^\*\*|^__|\*\*$|__$/}},italic:{pattern:/(^|[^\\])([*_])(?:(?:\r?\n|\r)(?!\r?\n|\r)|.)+?\2/,lookbehind:!0,greedy:!0,inside:{punctuation:/^[*_]|[*_]$/}},strike:{pattern:/(^|[^\\])(~~?)(?:(?:\r?\n|\r)(?!\r?\n|\r)|.)+?\2/,lookbehind:!0,greedy:!0,inside:{punctuation:/^~~?|~~?$/}},url:{pattern:/!?\[[^\]]+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)| ?\[[^\]\n]*\])/,inside:{variable:{pattern:/(!?\[)[^\]]+(?=\]$)/,lookbehind:!0},string:{pattern:/"(?:\\.|[^"\\])*"(?=\)$)/}}}}),Prism.languages.markdown.bold.inside.url=Prism.languages.markdown.url,Prism.languages.markdown.italic.inside.url=Prism.languages.markdown.url,Prism.languages.markdown.strike.inside.url=Prism.languages.markdown.url,Prism.languages.markdown.bold.inside.italic=Prism.languages.markdown.italic,Prism.languages.markdown.bold.inside.strike=Prism.languages.markdown.strike,Prism.languages.markdown.italic.inside.bold=Prism.languages.markdown.bold,Prism.languages.markdown.italic.inside.strike=Prism.languages.markdown.strike,Prism.languages.markdown.strike.inside.bold=Prism.languages.markdown.bold,Prism.languages.markdown.strike.inside.italic=Prism.languages.markdown.italic,Prism.hooks.add("after-tokenize",function(a){function n(a){if(a&&"string"!=typeof a)for(var e=0,i=a.length;i>e;e++){var r=a[e];if("code"===r.type){var t=r.content[1],s=r.content[3];if(t&&s&&"code-language"===t.type&&"code-block"===s.type&&"string"==typeof t.content){var o="language-"+t.content.trim().split(/\s+/)[0].toLowerCase();s.alias?"string"==typeof s.alias?s.alias=[s.alias,o]:s.alias.push(o):s.alias=[o]}}else n(r.content)}}"markdown"===a.language&&n(a.tokens)}),Prism.hooks.add("wrap",function(a){if("code-block"===a.type){for(var n="",e=0,i=a.classes.length;i>e;e++){var r=a.classes[e],t=/language-(\w+)/.exec(r);if(t){n=t[1];break}}var s=Prism.languages[n];if(s){var o=a.content.replace(/</g,"<").replace(/&/g,"&");a.content=Prism.highlight(o,s,n)}}}); \ No newline at end of file +Prism.languages.markdown=Prism.languages.extend("markup",{}),Prism.languages.insertBefore("markdown","prolog",{blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},code:[{pattern:/^(?: {4}|\t).+/m,alias:"keyword"},{pattern:/``.+?``|`[^`\n]+`/,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\r?\n|\r))[\s\S]+?(?=(?:\r?\n|\r)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\r?\n|\r)(?:==+|--+)/,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#+.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:/(^|[^\\])(\*\*|__)(?:(?:\r?\n|\r)(?!\r?\n|\r)|.)+?\2/,lookbehind:!0,greedy:!0,inside:{punctuation:/^\*\*|^__|\*\*$|__$/}},italic:{pattern:/(^|[^\\])([*_])(?:(?:\r?\n|\r)(?!\r?\n|\r)|.)+?\2/,lookbehind:!0,greedy:!0,inside:{punctuation:/^[*_]|[*_]$/}},strike:{pattern:/(^|[^\\])(~~?)(?:(?:\r?\n|\r)(?!\r?\n|\r)|.)+?\2/,lookbehind:!0,greedy:!0,inside:{punctuation:/^~~?|~~?$/}},url:{pattern:/!?\[[^\]]+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)| ?\[[^\]\n]*\])/,inside:{variable:{pattern:/(!?\[)[^\]]+(?=\]$)/,lookbehind:!0},string:{pattern:/"(?:\\.|[^"\\])*"(?=\)$)/}}}}),Prism.languages.markdown.bold.inside.url=Prism.languages.markdown.url,Prism.languages.markdown.italic.inside.url=Prism.languages.markdown.url,Prism.languages.markdown.strike.inside.url=Prism.languages.markdown.url,Prism.languages.markdown.bold.inside.italic=Prism.languages.markdown.italic,Prism.languages.markdown.bold.inside.strike=Prism.languages.markdown.strike,Prism.languages.markdown.italic.inside.bold=Prism.languages.markdown.bold,Prism.languages.markdown.italic.inside.strike=Prism.languages.markdown.strike,Prism.languages.markdown.strike.inside.bold=Prism.languages.markdown.bold,Prism.languages.markdown.strike.inside.italic=Prism.languages.markdown.italic,Prism.hooks.add("after-tokenize",function(a){function n(a){if(a&&"string"!=typeof a)for(var e=0,i=a.length;i>e;e++){var r=a[e];if("code"===r.type){var t=r.content[1],s=r.content[3];if(t&&s&&"code-language"===t.type&&"code-block"===s.type&&"string"==typeof t.content){var o="language-"+t.content.trim().split(/\s+/)[0].toLowerCase();s.alias?"string"==typeof s.alias?s.alias=[s.alias,o]:s.alias.push(o):s.alias=[o]}}else n(r.content)}}"markdown"===a.language&&n(a.tokens)}),Prism.hooks.add("wrap",function(a){if("code-block"===a.type){for(var n="",e=0,i=a.classes.length;i>e;e++){var r=a.classes[e],t=/language-(\w+)/.exec(r);if(t){n=t[1];break}}var s=Prism.languages[n];if(s){var o=a.content.replace(/</g,"<").replace(/&/g,"&");a.content=Prism.highlight(o,s,n)}}}),Prism.languages.md=Prism.languages.markdown; \ No newline at end of file diff --git a/components/prism-python.js b/components/prism-python.js index ea1a51545a..143c15b41e 100644 --- a/components/prism-python.js +++ b/components/prism-python.js @@ -60,3 +60,5 @@ Prism.languages.python = { }; Prism.languages.python['string-interpolation'].inside['interpolation'].inside.rest = Prism.languages.python; + +Prism.languages.py = Prism.languages.python; \ No newline at end of file diff --git a/components/prism-python.min.js b/components/prism-python.min.js index 7f9ee42b2d..46bfaa3882 100644 --- a/components/prism-python.min.js +++ b/components/prism-python.min.js @@ -1 +1 @@ -Prism.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0},"string-interpolation":{pattern:/(?:f|rf|fr)(?:("""|''')[\s\S]+?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:{{)*){(?!{)(?:[^{}]|{(?!{)(?:[^{}]|{(?!{)(?:[^{}])+})+})+}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|rb|br)?("""|''')[\s\S]+?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|rb|br)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},"function":{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^\s*)@\w+(?:\.\w+)*/i,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:and|as|assert|async|await|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,"boolean":/\b(?:True|False|None)\b/,number:/(?:\b(?=\d)|\B(?=\.))(?:0[bo])?(?:(?:\d|0x[\da-f])[\da-f]*\.?\d*|\.\d+)(?:e[+-]?\d+)?j?\b/i,operator:/[-+%=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},Prism.languages.python["string-interpolation"].inside.interpolation.inside.rest=Prism.languages.python; \ No newline at end of file +Prism.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0},"string-interpolation":{pattern:/(?:f|rf|fr)(?:("""|''')[\s\S]+?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:{{)*){(?!{)(?:[^{}]|{(?!{)(?:[^{}]|{(?!{)(?:[^{}])+})+})+}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|rb|br)?("""|''')[\s\S]+?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|rb|br)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},"function":{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^\s*)@\w+(?:\.\w+)*/i,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:and|as|assert|async|await|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,"boolean":/\b(?:True|False|None)\b/,number:/(?:\b(?=\d)|\B(?=\.))(?:0[bo])?(?:(?:\d|0x[\da-f])[\da-f]*\.?\d*|\.\d+)(?:e[+-]?\d+)?j?\b/i,operator:/[-+%=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},Prism.languages.python["string-interpolation"].inside.interpolation.inside.rest=Prism.languages.python,Prism.languages.py=Prism.languages.python; \ No newline at end of file diff --git a/components/prism-ruby.js b/components/prism-ruby.js index 72b5ebbade..13e43f1d61 100644 --- a/components/prism-ruby.js +++ b/components/prism-ruby.js @@ -138,4 +138,6 @@ } } ]; + + Prism.languages.rb = Prism.languages.ruby; }(Prism)); diff --git a/components/prism-ruby.min.js b/components/prism-ruby.min.js index 7720acc7d2..2976e90e9e 100644 --- a/components/prism-ruby.min.js +++ b/components/prism-ruby.min.js @@ -1 +1 @@ -!function(e){e.languages.ruby=e.languages.extend("clike",{comment:[/#.*/,{pattern:/^=begin(?:\r?\n|\r)(?:.*(?:\r?\n|\r))*?=end/m,greedy:!0}],keyword:/\b(?:alias|and|BEGIN|begin|break|case|class|def|define_method|defined|do|each|else|elsif|END|end|ensure|false|for|if|in|module|new|next|nil|not|or|protected|private|public|raise|redo|require|rescue|retry|return|self|super|then|throw|true|undef|unless|until|when|while|yield)\b/});var n={pattern:/#\{[^}]+\}/,inside:{delimiter:{pattern:/^#\{|\}$/,alias:"tag"},rest:e.languages.ruby}};delete e.languages.ruby.function,e.languages.insertBefore("ruby","keyword",{regex:[{pattern:/%r([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1[gim]{0,3}/,greedy:!0,inside:{interpolation:n}},{pattern:/%r\((?:[^()\\]|\\[\s\S])*\)[gim]{0,3}/,greedy:!0,inside:{interpolation:n}},{pattern:/%r\{(?:[^#{}\\]|#(?:\{[^}]+\})?|\\[\s\S])*\}[gim]{0,3}/,greedy:!0,inside:{interpolation:n}},{pattern:/%r\[(?:[^\[\]\\]|\\[\s\S])*\][gim]{0,3}/,greedy:!0,inside:{interpolation:n}},{pattern:/%r<(?:[^<>\\]|\\[\s\S])*>[gim]{0,3}/,greedy:!0,inside:{interpolation:n}},{pattern:/(^|[^\/])\/(?!\/)(\[.+?]|\\.|[^\/\\\r\n])+\/[gim]{0,3}(?=\s*($|[\r\n,.;})]))/,lookbehind:!0,greedy:!0}],variable:/[@$]+[a-zA-Z_]\w*(?:[?!]|\b)/,symbol:{pattern:/(^|[^:]):[a-zA-Z_]\w*(?:[?!]|\b)/,lookbehind:!0},"method-definition":{pattern:/(\bdef\s+)[\w.]+/,lookbehind:!0,inside:{"function":/\w+$/,rest:e.languages.ruby}}}),e.languages.insertBefore("ruby","number",{builtin:/\b(?:Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Stat|Fixnum|Float|Hash|Integer|IO|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|String|Struct|TMS|Symbol|ThreadGroup|Thread|Time|TrueClass)\b/,constant:/\b[A-Z]\w*(?:[?!]|\b)/}),e.languages.ruby.string=[{pattern:/%[qQiIwWxs]?([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1/,greedy:!0,inside:{interpolation:n}},{pattern:/%[qQiIwWxs]?\((?:[^()\\]|\\[\s\S])*\)/,greedy:!0,inside:{interpolation:n}},{pattern:/%[qQiIwWxs]?\{(?:[^#{}\\]|#(?:\{[^}]+\})?|\\[\s\S])*\}/,greedy:!0,inside:{interpolation:n}},{pattern:/%[qQiIwWxs]?\[(?:[^\[\]\\]|\\[\s\S])*\]/,greedy:!0,inside:{interpolation:n}},{pattern:/%[qQiIwWxs]?<(?:[^<>\\]|\\[\s\S])*>/,greedy:!0,inside:{interpolation:n}},{pattern:/("|')(?:#\{[^}]+\}|\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0,inside:{interpolation:n}}]}(Prism); \ No newline at end of file +!function(e){e.languages.ruby=e.languages.extend("clike",{comment:[/#.*/,{pattern:/^=begin(?:\r?\n|\r)(?:.*(?:\r?\n|\r))*?=end/m,greedy:!0}],keyword:/\b(?:alias|and|BEGIN|begin|break|case|class|def|define_method|defined|do|each|else|elsif|END|end|ensure|false|for|if|in|module|new|next|nil|not|or|protected|private|public|raise|redo|require|rescue|retry|return|self|super|then|throw|true|undef|unless|until|when|while|yield)\b/});var n={pattern:/#\{[^}]+\}/,inside:{delimiter:{pattern:/^#\{|\}$/,alias:"tag"},rest:e.languages.ruby}};delete e.languages.ruby.function,e.languages.insertBefore("ruby","keyword",{regex:[{pattern:/%r([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1[gim]{0,3}/,greedy:!0,inside:{interpolation:n}},{pattern:/%r\((?:[^()\\]|\\[\s\S])*\)[gim]{0,3}/,greedy:!0,inside:{interpolation:n}},{pattern:/%r\{(?:[^#{}\\]|#(?:\{[^}]+\})?|\\[\s\S])*\}[gim]{0,3}/,greedy:!0,inside:{interpolation:n}},{pattern:/%r\[(?:[^\[\]\\]|\\[\s\S])*\][gim]{0,3}/,greedy:!0,inside:{interpolation:n}},{pattern:/%r<(?:[^<>\\]|\\[\s\S])*>[gim]{0,3}/,greedy:!0,inside:{interpolation:n}},{pattern:/(^|[^\/])\/(?!\/)(\[.+?]|\\.|[^\/\\\r\n])+\/[gim]{0,3}(?=\s*($|[\r\n,.;})]))/,lookbehind:!0,greedy:!0}],variable:/[@$]+[a-zA-Z_]\w*(?:[?!]|\b)/,symbol:{pattern:/(^|[^:]):[a-zA-Z_]\w*(?:[?!]|\b)/,lookbehind:!0},"method-definition":{pattern:/(\bdef\s+)[\w.]+/,lookbehind:!0,inside:{"function":/\w+$/,rest:e.languages.ruby}}}),e.languages.insertBefore("ruby","number",{builtin:/\b(?:Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Stat|Fixnum|Float|Hash|Integer|IO|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|String|Struct|TMS|Symbol|ThreadGroup|Thread|Time|TrueClass)\b/,constant:/\b[A-Z]\w*(?:[?!]|\b)/}),e.languages.ruby.string=[{pattern:/%[qQiIwWxs]?([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1/,greedy:!0,inside:{interpolation:n}},{pattern:/%[qQiIwWxs]?\((?:[^()\\]|\\[\s\S])*\)/,greedy:!0,inside:{interpolation:n}},{pattern:/%[qQiIwWxs]?\{(?:[^#{}\\]|#(?:\{[^}]+\})?|\\[\s\S])*\}/,greedy:!0,inside:{interpolation:n}},{pattern:/%[qQiIwWxs]?\[(?:[^\[\]\\]|\\[\s\S])*\]/,greedy:!0,inside:{interpolation:n}},{pattern:/%[qQiIwWxs]?<(?:[^<>\\]|\\[\s\S])*>/,greedy:!0,inside:{interpolation:n}},{pattern:/("|')(?:#\{[^}]+\}|\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0,inside:{interpolation:n}}],e.languages.rb=e.languages.ruby}(Prism); \ No newline at end of file diff --git a/components/prism-yaml.js b/components/prism-yaml.js index 4846e41e60..abe2db9fc9 100644 --- a/components/prism-yaml.js +++ b/components/prism-yaml.js @@ -43,3 +43,5 @@ Prism.languages.yaml = { 'important': /[&*][\w]+/, 'punctuation': /---|[:[\]{}\-,|>?]|\.\.\./ }; + +Prism.languages.yml = Prism.languages.yaml; \ No newline at end of file diff --git a/components/prism-yaml.min.js b/components/prism-yaml.min.js index 5cc863451a..40b0e4308b 100644 --- a/components/prism-yaml.min.js +++ b/components/prism-yaml.min.js @@ -1 +1 @@ -Prism.languages.yaml={scalar:{pattern:/([\-:]\s*(?:![^\s]+)?[ \t]*[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)[^\r\n]+(?:\2[^\r\n]+)*)/,lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:/(\s*(?:^|[:\-,[{\r\n?])[ \t]*(?:![^\s]+)?[ \t]*)[^\r\n{[\]},#\s]+?(?=\s*:\s)/,lookbehind:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:/([:\-,[{]\s*(?:![^\s]+)?[ \t]*)(?:\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?)?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?)(?=[ \t]*(?:$|,|]|}))/m,lookbehind:!0,alias:"number"},"boolean":{pattern:/([:\-,[{]\s*(?:![^\s]+)?[ \t]*)(?:true|false)[ \t]*(?=$|,|]|})/im,lookbehind:!0,alias:"important"},"null":{pattern:/([:\-,[{]\s*(?:![^\s]+)?[ \t]*)(?:null|~)[ \t]*(?=$|,|]|})/im,lookbehind:!0,alias:"important"},string:{pattern:/([:\-,[{]\s*(?:![^\s]+)?[ \t]*)("|')(?:(?!\2)[^\\\r\n]|\\.)*\2(?=[ \t]*(?:$|,|]|}|\s*#))/m,lookbehind:!0,greedy:!0},number:{pattern:/([:\-,[{]\s*(?:![^\s]+)?[ \t]*)[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+\.?\d*|\.?\d+)(?:e[+-]?\d+)?|\.inf|\.nan)[ \t]*(?=$|,|]|})/im,lookbehind:!0},tag:/![^\s]+/,important:/[&*][\w]+/,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./}; \ No newline at end of file +Prism.languages.yaml={scalar:{pattern:/([\-:]\s*(?:![^\s]+)?[ \t]*[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)[^\r\n]+(?:\2[^\r\n]+)*)/,lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:/(\s*(?:^|[:\-,[{\r\n?])[ \t]*(?:![^\s]+)?[ \t]*)[^\r\n{[\]},#\s]+?(?=\s*:\s)/,lookbehind:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:/([:\-,[{]\s*(?:![^\s]+)?[ \t]*)(?:\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?)?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?)(?=[ \t]*(?:$|,|]|}))/m,lookbehind:!0,alias:"number"},"boolean":{pattern:/([:\-,[{]\s*(?:![^\s]+)?[ \t]*)(?:true|false)[ \t]*(?=$|,|]|})/im,lookbehind:!0,alias:"important"},"null":{pattern:/([:\-,[{]\s*(?:![^\s]+)?[ \t]*)(?:null|~)[ \t]*(?=$|,|]|})/im,lookbehind:!0,alias:"important"},string:{pattern:/([:\-,[{]\s*(?:![^\s]+)?[ \t]*)("|')(?:(?!\2)[^\\\r\n]|\\.)*\2(?=[ \t]*(?:$|,|]|}|\s*#))/m,lookbehind:!0,greedy:!0},number:{pattern:/([:\-,[{]\s*(?:![^\s]+)?[ \t]*)[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+\.?\d*|\.?\d+)(?:e[+-]?\d+)?|\.inf|\.nan)[ \t]*(?=$|,|]|})/im,lookbehind:!0},tag:/![^\s]+/,important:/[&*][\w]+/,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},Prism.languages.yml=Prism.languages.yaml; \ No newline at end of file From 0cc8c56ac122b50ae633d02328a47d51d4ce8317 Mon Sep 17 00:00:00 2001 From: Rex Zeng Date: Mon, 3 Dec 2018 20:52:13 +0800 Subject: [PATCH 0120/1100] Identify JavaScript function parameters (#1446) Support parameters for these types of functions: ```javascript // es6 class method foo(x, y) {} // es6 arrow function (x, y) => x x => x // es5 function function foo(x, y) {} // es5 anonymous function function (x, y) {} ``` --- components/prism-flow.js | 3 +- components/prism-flow.min.js | 2 +- components/prism-javascript.js | 23 +++- components/prism-javascript.min.js | 2 +- prism.js | 23 +++- .../javascript/class-method_feature.test | 59 ++++++++++ .../javascript/function-variable_feature.test | 107 +++++++++++++++--- .../javascript/function_feature.test | 4 +- tests/languages/javascript/issue1526.test | 70 ++++++------ tests/languages/jsx/issue1294.test | 6 +- tests/languages/jsx/issue1335.test | 4 +- tests/languages/jsx/issue1421.test | 2 +- 12 files changed, 245 insertions(+), 60 deletions(-) create mode 100644 tests/languages/javascript/class-method_feature.test diff --git a/components/prism-flow.js b/components/prism-flow.js index 4c239d2b3a..95d034084b 100644 --- a/components/prism-flow.js +++ b/components/prism-flow.js @@ -10,6 +10,7 @@ ] }); Prism.languages.flow['function-variable'].pattern = /[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*=\s*(?:function\b|(?:\([^()]*\)(?:\s*:\s*\w+)?|[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/i; + delete Prism.languages.flow['parameter']; Prism.languages.insertBefore('flow', 'operator', { 'flow-punctuation': { @@ -31,4 +32,4 @@ lookbehind: true } ); -}(Prism)); \ No newline at end of file +}(Prism)); diff --git a/components/prism-flow.min.js b/components/prism-flow.min.js index a2527bde41..a2c24633c7 100644 --- a/components/prism-flow.min.js +++ b/components/prism-flow.min.js @@ -1 +1 @@ -!function(a){a.languages.flow=a.languages.extend("javascript",{}),a.languages.insertBefore("flow","keyword",{type:[{pattern:/\b(?:[Nn]umber|[Ss]tring|[Bb]oolean|Function|any|mixed|null|void)\b/,alias:"tag"}]}),a.languages.flow["function-variable"].pattern=/[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*=\s*(?:function\b|(?:\([^()]*\)(?:\s*:\s*\w+)?|[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/i,a.languages.insertBefore("flow","operator",{"flow-punctuation":{pattern:/\{\||\|\}/,alias:"punctuation"}}),"Array"!==a.util.type(a.languages.flow.keyword)&&(a.languages.flow.keyword=[a.languages.flow.keyword]),a.languages.flow.keyword.unshift({pattern:/(^|[^$]\b)(?:type|opaque|declare|Class)\b(?!\$)/,lookbehind:!0},{pattern:/(^|[^$]\B)\$(?:await|Diff|Exact|Keys|ObjMap|PropertyType|Shape|Record|Supertype|Subtype|Enum)\b(?!\$)/,lookbehind:!0})}(Prism); \ No newline at end of file +!function(e){e.languages.flow=e.languages.extend("javascript",{}),e.languages.insertBefore("flow","keyword",{type:[{pattern:/\b(?:[Nn]umber|[Ss]tring|[Bb]oolean|Function|any|mixed|null|void)\b/,alias:"tag"}]}),e.languages.flow["function-variable"].pattern=/[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*=\s*(?:function\b|(?:\([^()]*\)(?:\s*:\s*\w+)?|[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/i,delete e.languages.flow.parameter,e.languages.insertBefore("flow","operator",{"flow-punctuation":{pattern:/\{\||\|\}/,alias:"punctuation"}}),"Array"!==e.util.type(e.languages.flow.keyword)&&(e.languages.flow.keyword=[e.languages.flow.keyword]),e.languages.flow.keyword.unshift({pattern:/(^|[^$]\b)(?:type|opaque|declare|Class)\b(?!\$)/,lookbehind:!0},{pattern:/(^|[^$]\B)\$(?:await|Diff|Exact|Keys|ObjMap|PropertyType|Shape|Record|Supertype|Subtype|Enum)\b(?!\$)/,lookbehind:!0})}(Prism); \ No newline at end of file diff --git a/components/prism-javascript.js b/components/prism-javascript.js index c2ffa36754..f2cb936581 100644 --- a/components/prism-javascript.js +++ b/components/prism-javascript.js @@ -29,9 +29,30 @@ Prism.languages.insertBefore('javascript', 'keyword', { }, // This must be declared before keyword because we use "function" inside the look-forward 'function-variable': { - pattern: /[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*[=:]\s*(?:function\b|(?:\([^()]*\)|[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/i, + pattern: /[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\([^()]*\)|[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/i, alias: 'function' }, + 'parameter': [ + { + pattern: /(function(?:\s+[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)?\s*\(\s*)[^\s()][^()]*?(?=\s*\))/, + lookbehind: true, + inside: Prism.languages.javascript + }, + { + pattern: /[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*=>)/, + inside: Prism.languages.javascript + }, + { + pattern: /(\(\s*)[^\s()][^()]*?(?=\s*\)\s*=>)/, + lookbehind: true, + inside: Prism.languages.javascript + }, + { + pattern: /((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*\s*)\(\s*)[^\s()][^()]*?(?=\s*\)\s*\{)/, + lookbehind: true, + inside: Prism.languages.javascript + } + ], 'constant': /\b[A-Z][A-Z\d_]*\b/ }); diff --git a/components/prism-javascript.min.js b/components/prism-javascript.min.js index a0042da32f..d111f5035b 100644 --- a/components/prism-javascript.min.js +++ b/components/prism-javascript.min.js @@ -1 +1 @@ -Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])[_$A-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\.(?:prototype|constructor))/,lookbehind:!0}],keyword:[{pattern:/((?:^|})\s*)(?:catch|finally)\b/,lookbehind:!0},/\b(?:as|async|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|var|void|while|with|yield)\b/],number:/\b(?:(?:0[xX][\dA-Fa-f]+|0[bB][01]+|0[oO][0-7]+)n?|\d+n|NaN|Infinity)\b|(?:\b\d+\.?\d*|\B\.\d+)(?:[Ee][+-]?\d+)?/,"function":/[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*\(|\.(?:apply|bind|call)\()/,operator:/-[-=]?|\+[+=]?|!=?=?|<>?>?=?|=(?:==?|>)?|&[&=]?|\|[|=]?|\*\*?=?|\/=?|~|\^=?|%=?|\?|\.{3}/}),Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/,Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s])\s*)\/(\[(?:[^\]\\\r\n]|\\.)*]|\\.|[^\/\\\[\r\n])+\/[gimyu]{0,5}(?=\s*($|[\r\n,.;})\]]))/,lookbehind:!0,greedy:!0},"function-variable":{pattern:/[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*[=:]\s*(?:function\b|(?:\([^()]*\)|[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/i,alias:"function"},constant:/\b[A-Z][A-Z\d_]*\b/}),Prism.languages.insertBefore("javascript","string",{"template-string":{pattern:/`(?:\\[\s\S]|\${[^}]+}|[^\\`])*`/,greedy:!0,inside:{interpolation:{pattern:/\${[^}]+}/,inside:{"interpolation-punctuation":{pattern:/^\${|}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}}}),Prism.languages.markup&&Prism.languages.insertBefore("markup","tag",{script:{pattern:/()[\s\S]*?(?=<\/script>)/i,lookbehind:!0,inside:Prism.languages.javascript,alias:"language-javascript",greedy:!0}}),Prism.languages.js=Prism.languages.javascript; \ No newline at end of file +Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])[_$A-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\.(?:prototype|constructor))/,lookbehind:!0}],keyword:[{pattern:/((?:^|})\s*)(?:catch|finally)\b/,lookbehind:!0},/\b(?:as|async|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|var|void|while|with|yield)\b/],number:/\b(?:(?:0[xX][\dA-Fa-f]+|0[bB][01]+|0[oO][0-7]+)n?|\d+n|NaN|Infinity)\b|(?:\b\d+\.?\d*|\B\.\d+)(?:[Ee][+-]?\d+)?/,"function":/[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*\(|\.(?:apply|bind|call)\()/,operator:/-[-=]?|\+[+=]?|!=?=?|<>?>?=?|=(?:==?|>)?|&[&=]?|\|[|=]?|\*\*?=?|\/=?|~|\^=?|%=?|\?|\.{3}/}),Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/,Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s])\s*)\/(\[(?:[^\]\\\r\n]|\\.)*]|\\.|[^\/\\\[\r\n])+\/[gimyu]{0,5}(?=\s*($|[\r\n,.;})\]]))/,lookbehind:!0,greedy:!0},"function-variable":{pattern:/[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\([^()]*\)|[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/i,alias:"function"},parameter:[{pattern:/(function(?:\s+[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)?\s*\(\s*)[^\s()][^()]*?(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*=>)/,inside:Prism.languages.javascript},{pattern:/(\(\s*)[^\s()][^()]*?(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*\s*)\(\s*)[^\s()][^()]*?(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z][A-Z\d_]*\b/}),Prism.languages.insertBefore("javascript","string",{"template-string":{pattern:/`(?:\\[\s\S]|\${[^}]+}|[^\\`])*`/,greedy:!0,inside:{interpolation:{pattern:/\${[^}]+}/,inside:{"interpolation-punctuation":{pattern:/^\${|}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}}}),Prism.languages.markup&&Prism.languages.insertBefore("markup","tag",{script:{pattern:/()[\s\S]*?(?=<\/script>)/i,lookbehind:!0,inside:Prism.languages.javascript,alias:"language-javascript",greedy:!0}}),Prism.languages.js=Prism.languages.javascript; \ No newline at end of file diff --git a/prism.js b/prism.js index 9e8aa53833..0acb158333 100644 --- a/prism.js +++ b/prism.js @@ -744,9 +744,30 @@ Prism.languages.insertBefore('javascript', 'keyword', { }, // This must be declared before keyword because we use "function" inside the look-forward 'function-variable': { - pattern: /[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*[=:]\s*(?:function\b|(?:\([^()]*\)|[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/i, + pattern: /[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\([^()]*\)|[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/i, alias: 'function' }, + 'parameter': [ + { + pattern: /(function(?:\s+[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)?\s*\(\s*)[^\s()][^()]*?(?=\s*\))/, + lookbehind: true, + inside: Prism.languages.javascript + }, + { + pattern: /[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*=>)/, + inside: Prism.languages.javascript + }, + { + pattern: /(\(\s*)[^\s()][^()]*?(?=\s*\)\s*=>)/, + lookbehind: true, + inside: Prism.languages.javascript + }, + { + pattern: /((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*\s*)\(\s*)[^\s()][^()]*?(?=\s*\)\s*\{)/, + lookbehind: true, + inside: Prism.languages.javascript + } + ], 'constant': /\b[A-Z][A-Z\d_]*\b/ }); diff --git a/tests/languages/javascript/class-method_feature.test b/tests/languages/javascript/class-method_feature.test new file mode 100644 index 0000000000..303f481f95 --- /dev/null +++ b/tests/languages/javascript/class-method_feature.test @@ -0,0 +1,59 @@ +class Test { + foo( x, y = 0) {} + async bar(x, y = 0 ) {} + $ ( ) {} + awaitFoo(){} +} + +---------------------------------------------------- + +[ + ["keyword", "class"], + ["class-name", ["Test"]], + ["punctuation", "{"], + + ["function", "foo"], + ["punctuation", "("], + ["parameter", [ + "x", + ["punctuation", ","], + " y ", + ["operator", "="], + ["number", "0"] + ]], + ["punctuation", ")"], + ["punctuation", "{"], + ["punctuation", "}"], + + ["keyword", "async"], + ["function", "bar"], + ["punctuation", "("], + ["parameter", [ + "x", + ["punctuation", ","], + " y ", + ["operator", "="], + ["number", "0"] + ]], + ["punctuation", ")"], + ["punctuation", "{"], + ["punctuation", "}"], + + ["function", "$"], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", "{"], + ["punctuation", "}"], + + ["function", "awaitFoo"], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", "{"], + ["punctuation", "}"], + + ["punctuation", "}"] +] + +---------------------------------------------------- + +Checks for class methods. diff --git a/tests/languages/javascript/function-variable_feature.test b/tests/languages/javascript/function-variable_feature.test index 689fb4e923..f3916f71cd 100644 --- a/tests/languages/javascript/function-variable_feature.test +++ b/tests/languages/javascript/function-variable_feature.test @@ -1,25 +1,102 @@ -foo = function () {} +foo = function ( x, y) {} {foo: function () {}} -bar = function baz () {} +bar = async function baz (x ) {} +baz = async(x) => x fooBar = x => x +fooBar = ( x, y ) => x ಠ_ಠ = () => {} -Ƞȡ_҇ = (ಠ, Ƞ = 2) => {} +Ƞȡ_҇ = async (ಠ, Ƞ = 2) => {} ---------------------------------------------------- [ - ["function-variable", "foo"], ["operator", "="], ["keyword", "function"], - ["punctuation", "("], ["punctuation", ")"], ["punctuation", "{"], ["punctuation", "}"], - ["punctuation", "{"], ["function-variable", "foo"], ["punctuation", ":"], ["keyword", "function"], - ["punctuation", "("], ["punctuation", ")"], ["punctuation", "{"],["punctuation","}"],["punctuation","}"], - ["function-variable", "bar"], ["operator", "="], ["keyword", "function"], ["function", "baz"], - ["punctuation", "("], ["punctuation", ")"], ["punctuation", "{"], ["punctuation", "}"], - ["function-variable", "fooBar"], ["operator", "="], " x ", ["operator", "=>"], " x\r\n", - ["function-variable", "ಠ_ಠ"], ["operator", "="], ["punctuation", "("], ["punctuation", ")"], - ["operator", "=>"], ["punctuation", "{"], ["punctuation", "}"], - ["function-variable", "Ƞȡ_҇"], ["operator", "="], - ["punctuation", "("], "ಠ", ["punctuation", ","], " Ƞ ", ["operator", "="], ["number", "2"], ["punctuation", ")"], - ["operator", "=>"], ["punctuation", "{"], ["punctuation", "}"] + ["function-variable", "foo"], + ["operator", "="], + ["keyword", "function"], + ["punctuation", "("], + ["parameter", [ + "x", + ["punctuation", ","], + " y" + ]], + ["punctuation", ")"], + ["punctuation", "{"], + ["punctuation", "}"], + + ["punctuation", "{"], + ["function-variable", "foo"], + ["punctuation", ":"], + ["keyword", "function"], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", "{"], + ["punctuation","}"], + ["punctuation","}"], + + ["function-variable", "bar"], + ["operator", "="], + ["keyword", "async"], + ["keyword", "function"], + ["function", "baz"], + ["punctuation", "("], + ["parameter", [ + "x" + ]], + ["punctuation", ")"], + ["punctuation", "{"], + ["punctuation", "}"], + + ["function-variable", "baz"], + ["operator", "="], + ["keyword", "async"], + ["punctuation", "("], + ["parameter", [ + "x" + ]], + ["punctuation", ")"], + ["operator", "=>"], " x\r\n", + + ["function-variable", "fooBar"], + ["operator", "="], + ["parameter", [ + "x" + ]], + ["operator", "=>"], " x\r\n", + + ["function-variable", "fooBar"], + ["operator", "="], + ["punctuation", "("], + ["parameter", [ + "x", + ["punctuation", ","], + " y" + ]], + ["punctuation", ")"], + ["operator", "=>"], " x\r\n", + + ["function-variable", "ಠ_ಠ"], + ["operator", "="], + ["punctuation", "("], + ["punctuation", ")"], + ["operator", "=>"], + ["punctuation", "{"], + ["punctuation", "}"], + + ["function-variable", "Ƞȡ_҇"], + ["operator", "="], + ["keyword", "async"], + ["punctuation", "("], + ["parameter", [ + "ಠ", + ["punctuation", ","], + " Ƞ ", + ["operator", "="], + ["number", "2"] + ]], + ["punctuation", ")"], + ["operator", "=>"], + ["punctuation", "{"], + ["punctuation", "}"] ] ---------------------------------------------------- diff --git a/tests/languages/javascript/function_feature.test b/tests/languages/javascript/function_feature.test index fb0df40ad8..35fa9e929a 100644 --- a/tests/languages/javascript/function_feature.test +++ b/tests/languages/javascript/function_feature.test @@ -7,6 +7,7 @@ _() $() ಠ_ಠ() Ƞȡ_҇() +if(notAFunction) ---------------------------------------------------- @@ -19,7 +20,8 @@ $() ["function", "_"], ["punctuation", "("], ["punctuation", ")"], ["function", "$"], ["punctuation", "("], ["punctuation", ")"], ["function", "ಠ_ಠ"], ["punctuation", "("], ["punctuation", ")"], - ["function", "Ƞȡ_҇"], ["punctuation", "("], ["punctuation", ")"] + ["function", "Ƞȡ_҇"], ["punctuation", "("], ["punctuation", ")"], + ["keyword", "if"], ["punctuation", "("], "notAFunction", ["punctuation", ")"] ] ---------------------------------------------------- diff --git a/tests/languages/javascript/issue1526.test b/tests/languages/javascript/issue1526.test index d361155e41..320219cbc9 100644 --- a/tests/languages/javascript/issue1526.test +++ b/tests/languages/javascript/issue1526.test @@ -1,35 +1,35 @@ -fetch('some-resource.json') - .then(response => response.json()) - .catch(console.error); - ----------------------------------------------------- - -[ - ["function", "fetch"], - ["punctuation", "("], - ["string", "'some-resource.json'"], - ["punctuation", ")"], - ["punctuation", "."], - ["function", "then"], - ["punctuation", "("], - "response ", - ["operator", "=>"], - " response", - ["punctuation", "."], - ["function", "json"], - ["punctuation", "("], - ["punctuation", ")"], - ["punctuation", ")"], - ["punctuation", "."], - ["function", "catch"], - ["punctuation", "("], - "console", - ["punctuation", "."], - "error", - ["punctuation", ")"], - ["punctuation", ";"] -] - ----------------------------------------------------- - -Checks for catch function which is not a keyword. See #1526 +fetch('some-resource.json') + .then(response => response.json()) + .catch(console.error); + +---------------------------------------------------- + +[ + ["function", "fetch"], + ["punctuation", "("], + ["string", "'some-resource.json'"], + ["punctuation", ")"], + ["punctuation", "."], + ["function", "then"], + ["punctuation", "("], + ["parameter", ["response"]], + ["operator", "=>"], + " response", + ["punctuation", "."], + ["function", "json"], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", ")"], + ["punctuation", "."], + ["function", "catch"], + ["punctuation", "("], + "console", + ["punctuation", "."], + "error", + ["punctuation", ")"], + ["punctuation", ";"] +] + +---------------------------------------------------- + +Checks for catch function which is not a keyword. See #1526 diff --git a/tests/languages/jsx/issue1294.test b/tests/languages/jsx/issue1294.test index 997f335124..4d167f146c 100644 --- a/tests/languages/jsx/issue1294.test +++ b/tests/languages/jsx/issue1294.test @@ -13,7 +13,9 @@ export default () => ( [ ["keyword", "export"], ["keyword", "default"], - ["punctuation", "("], ["punctuation", ")"], ["operator", "=>"], ["punctuation", "("], + ["punctuation", "("], + ["punctuation", ")"], + ["operator", "=>"], ["punctuation", "("], ["tag", [ ["tag", [ ["punctuation", "<"], @@ -66,4 +68,4 @@ export default () => ( ---------------------------------------------------- -See #1294. \ No newline at end of file +See #1294. diff --git a/tests/languages/jsx/issue1335.test b/tests/languages/jsx/issue1335.test index b34880d5af..35c2704ebf 100644 --- a/tests/languages/jsx/issue1335.test +++ b/tests/languages/jsx/issue1335.test @@ -21,7 +21,9 @@ ["script-punctuation", "="], ["punctuation", "{"], ["punctuation", "("], - "e", + ["parameter", [ + "e" + ]], ["punctuation", ")"], ["operator", "=>"], ["keyword", "this"], diff --git a/tests/languages/jsx/issue1421.test b/tests/languages/jsx/issue1421.test index f34147c94a..e74f14b002 100644 --- a/tests/languages/jsx/issue1421.test +++ b/tests/languages/jsx/issue1421.test @@ -55,4 +55,4 @@ class Columns extends React.Component { ] ---------------------------------------------------- -Checks for fragments short syntax. See #1421 \ No newline at end of file +Checks for fragments short syntax. See #1421 From 5fcee96675103f16fc4668501aee502194d449a2 Mon Sep 17 00:00:00 2001 From: Rex Zeng Date: Mon, 3 Dec 2018 20:55:22 +0800 Subject: [PATCH 0121/1100] Identify CSS units and variables (#1450) Assume CSS unit is a word or `%` after a number, CSS variable is a word inside `var()`. `%` is not recognized as a part of number, but the leading `-` is. When using minus operator in `calc` function, we must type a space in both sides of `-` (value like `calc(100%-5px)` is wrong), so if we met a pattern like `-[\d.]` in a CSS value (not in selector, rule or variable), it must be the start of a negative number. --- components/prism-css-extras.js | 14 +++- components/prism-css-extras.min.js | 2 +- .../css!+css-extras/number_feature.test | 8 +-- .../css!+css-extras/operator_feature.test | 71 +++++++++++++++++++ .../css!+css-extras/unit_feature.test | 21 ++++++ .../css!+css-extras/variable_feature.test | 34 +++++++++ 6 files changed, 144 insertions(+), 6 deletions(-) create mode 100644 tests/languages/css!+css-extras/operator_feature.test create mode 100644 tests/languages/css!+css-extras/unit_feature.test create mode 100644 tests/languages/css!+css-extras/variable_feature.test diff --git a/components/prism-css-extras.js b/components/prism-css-extras.js index 3b4261f76e..254688b4d0 100644 --- a/components/prism-css-extras.js +++ b/components/prism-css-extras.js @@ -10,7 +10,19 @@ Prism.languages.css.selector = { }; Prism.languages.insertBefore('css', 'function', { + 'variable': { + pattern: /(var\()[^)]+(?=\))/, + lookbehind: true + }, + 'operator': { + pattern: /(\s)[+\-*\/](?=\s)/, + lookbehind: true + }, 'hexcode': /#[\da-f]{3,8}/i, 'entity': /\\[\da-f]{1,8}/i, - 'number': /[\d%.]+/ + 'unit': { + pattern: /(\d)(?:%|[a-z]+)/, + lookbehind: true + }, + 'number': /-?[\d.]+/ }); diff --git a/components/prism-css-extras.min.js b/components/prism-css-extras.min.js index f3d252f762..34a2226c36 100644 --- a/components/prism-css-extras.min.js +++ b/components/prism-css-extras.min.js @@ -1 +1 @@ -Prism.languages.css.selector={pattern:Prism.languages.css.selector,inside:{"pseudo-element":/:(?:after|before|first-letter|first-line|selection)|::[-\w]+/,"pseudo-class":/:[-\w]+(?:\(.*\))?/,"class":/\.[-:.\w]+/,id:/#[-:.\w]+/,attribute:/\[[^\]]+\]/}},Prism.languages.insertBefore("css","function",{hexcode:/#[\da-f]{3,8}/i,entity:/\\[\da-f]{1,8}/i,number:/[\d%.]+/}); \ No newline at end of file +Prism.languages.css.selector={pattern:Prism.languages.css.selector,inside:{"pseudo-element":/:(?:after|before|first-letter|first-line|selection)|::[-\w]+/,"pseudo-class":/:[-\w]+(?:\(.*\))?/,"class":/\.[-:.\w]+/,id:/#[-:.\w]+/,attribute:/\[[^\]]+\]/}},Prism.languages.insertBefore("css","function",{variable:{pattern:/(var\()[^)]+(?=\))/,lookbehind:!0},operator:{pattern:/(\s)[+\-*\/](?=\s)/,lookbehind:!0},hexcode:/#[\da-f]{3,8}/i,entity:/\\[\da-f]{1,8}/i,unit:{pattern:/(\d)(?:%|[a-z]+)/,lookbehind:!0},number:/-?[\d.]+/}); \ No newline at end of file diff --git a/tests/languages/css!+css-extras/number_feature.test b/tests/languages/css!+css-extras/number_feature.test index 24ed5305e2..ef58e62036 100644 --- a/tests/languages/css!+css-extras/number_feature.test +++ b/tests/languages/css!+css-extras/number_feature.test @@ -1,15 +1,15 @@ 42 3.14159 -42% -3.14% +-42 +-3.14 ---------------------------------------------------- [ ["number", "42"], ["number", "3.14159"], - ["number", "42%"], - ["number", "3.14%"] + ["number", "-42"], + ["number", "-3.14"] ] ---------------------------------------------------- diff --git a/tests/languages/css!+css-extras/operator_feature.test b/tests/languages/css!+css-extras/operator_feature.test new file mode 100644 index 0000000000..0df7612b38 --- /dev/null +++ b/tests/languages/css!+css-extras/operator_feature.test @@ -0,0 +1,71 @@ +width: calc(100% + 20px); +width: calc(100% - 20px); +width: calc(5px * 2); +width: calc(10px / 2); +height: -20px; +content: 'this - is not an operator'; + +---------------------------------------------------- + +[ + ["property", "width"], + ["punctuation", ":"], + ["function", "calc"], + ["punctuation", "("], + ["number", "100"], + ["unit", "%"], + ["operator", "+"], + ["number", "20"], + ["unit", "px"], + ["punctuation", ")"], + ["punctuation", ";"], + + ["property", "width"], + ["punctuation", ":"], + ["function", "calc"], + ["punctuation", "("], + ["number", "100"], + ["unit", "%"], + ["operator", "-"], + ["number", "20"], + ["unit", "px"], + ["punctuation", ")"], + ["punctuation", ";"], + + ["property", "width"], + ["punctuation", ":"], + ["function", "calc"], + ["punctuation", "("], + ["number", "5"], + ["unit", "px"], + ["operator", "*"], + ["number", "2"], + ["punctuation", ")"], + ["punctuation", ";"], + + ["property", "width"], + ["punctuation", ":"], + ["function", "calc"], + ["punctuation", "("], + ["number", "10"], + ["unit", "px"], + ["operator", "/"], + ["number", "2"], + ["punctuation", ")"], + ["punctuation", ";"], + + ["property", "height"], + ["punctuation", ":"], + ["number", "-20"], + ["unit", "px"], + ["punctuation", ";"], + + ["property", "content"], + ["punctuation", ":"], + ["string", "'this - is not an operator'"], + ["punctuation", ";"] +] + +---------------------------------------------------- + +Checks for operators. diff --git a/tests/languages/css!+css-extras/unit_feature.test b/tests/languages/css!+css-extras/unit_feature.test new file mode 100644 index 0000000000..6d5c15c8e6 --- /dev/null +++ b/tests/languages/css!+css-extras/unit_feature.test @@ -0,0 +1,21 @@ +100% +1rem +500ms +.5s +-3px +-0.618vw + +---------------------------------------------------- + +[ + ["number", "100"], ["unit", "%"], + ["number", "1"], ["unit", "rem"], + ["number", "500"], ["unit", "ms"], + ["number", ".5"], ["unit", "s"], + ["number", "-3"], ["unit", "px"], + ["number", "-0.618"], ["unit", "vw"] +] + +---------------------------------------------------- + +Checks for units. diff --git a/tests/languages/css!+css-extras/variable_feature.test b/tests/languages/css!+css-extras/variable_feature.test new file mode 100644 index 0000000000..d17053aef3 --- /dev/null +++ b/tests/languages/css!+css-extras/variable_feature.test @@ -0,0 +1,34 @@ +var(--color-primary) +var(--level-3) +calc(100% - var(--margin-size) * 2) + +---------------------------------------------------- + +[ + ["function", "var"], + ["punctuation", "("], + ["variable", "--color-primary"], + ["punctuation", ")"], + + ["function", "var"], + ["punctuation", "("], + ["variable", "--level-3"], + ["punctuation", ")"], + + ["function", "calc"], + ["punctuation", "("], + ["number", "100"], + ["unit", "%"], + ["operator", "-"], + ["function", "var"], + ["punctuation", "("], + ["variable", "--margin-size"], + ["punctuation", ")"], + ["operator", "*"], + ["number", "2"], + ["punctuation", ")"] +] + +---------------------------------------------------- + +Checks for variables. From 9de47d3a39ae67722284d86905af58d241eff96b Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Mon, 3 Dec 2018 14:20:07 +0100 Subject: [PATCH 0122/1100] Fixed CSS extra variable (#1649) Details are described [here](https://github.com/PrismJS/prism/pull/1450#discussion_r238257002). I decided to go with the property variant, highlighting custom property declarations as `variable`. --- components/prism-css-extras.js | 9 ++++++--- components/prism-css-extras.min.js | 2 +- .../css!+css-extras/variable_feature.test | 20 +++++++++++++++++++ 3 files changed, 27 insertions(+), 4 deletions(-) diff --git a/components/prism-css-extras.js b/components/prism-css-extras.js index 254688b4d0..cf06b57a16 100644 --- a/components/prism-css-extras.js +++ b/components/prism-css-extras.js @@ -9,11 +9,14 @@ Prism.languages.css.selector = { } }; -Prism.languages.insertBefore('css', 'function', { +Prism.languages.insertBefore('css', 'property', { 'variable': { - pattern: /(var\()[^)]+(?=\))/, + pattern: /(^|[^-\w\xA0-\uFFFF])--[-_a-z\xA0-\uFFFF][-\w\xA0-\uFFFF]*/i, lookbehind: true - }, + } +}); + +Prism.languages.insertBefore('css', 'function', { 'operator': { pattern: /(\s)[+\-*\/](?=\s)/, lookbehind: true diff --git a/components/prism-css-extras.min.js b/components/prism-css-extras.min.js index 34a2226c36..d04698b231 100644 --- a/components/prism-css-extras.min.js +++ b/components/prism-css-extras.min.js @@ -1 +1 @@ -Prism.languages.css.selector={pattern:Prism.languages.css.selector,inside:{"pseudo-element":/:(?:after|before|first-letter|first-line|selection)|::[-\w]+/,"pseudo-class":/:[-\w]+(?:\(.*\))?/,"class":/\.[-:.\w]+/,id:/#[-:.\w]+/,attribute:/\[[^\]]+\]/}},Prism.languages.insertBefore("css","function",{variable:{pattern:/(var\()[^)]+(?=\))/,lookbehind:!0},operator:{pattern:/(\s)[+\-*\/](?=\s)/,lookbehind:!0},hexcode:/#[\da-f]{3,8}/i,entity:/\\[\da-f]{1,8}/i,unit:{pattern:/(\d)(?:%|[a-z]+)/,lookbehind:!0},number:/-?[\d.]+/}); \ No newline at end of file +Prism.languages.css.selector={pattern:Prism.languages.css.selector,inside:{"pseudo-element":/:(?:after|before|first-letter|first-line|selection)|::[-\w]+/,"pseudo-class":/:[-\w]+(?:\(.*\))?/,"class":/\.[-:.\w]+/,id:/#[-:.\w]+/,attribute:/\[[^\]]+\]/}},Prism.languages.insertBefore("css","property",{variable:{pattern:/(^|[^-\w\xA0-\uFFFF])--[-_a-z\xA0-\uFFFF][-\w\xA0-\uFFFF]*/i,lookbehind:!0}}),Prism.languages.insertBefore("css","function",{operator:{pattern:/(\s)[+\-*\/](?=\s)/,lookbehind:!0},hexcode:/#[\da-f]{3,8}/i,entity:/\\[\da-f]{1,8}/i,unit:{pattern:/(\d)(?:%|[a-z]+)/,lookbehind:!0},number:/-?[\d.]+/}); \ No newline at end of file diff --git a/tests/languages/css!+css-extras/variable_feature.test b/tests/languages/css!+css-extras/variable_feature.test index d17053aef3..dc089b5f11 100644 --- a/tests/languages/css!+css-extras/variable_feature.test +++ b/tests/languages/css!+css-extras/variable_feature.test @@ -1,10 +1,23 @@ +element { + --foo: green; +} + var(--color-primary) var(--level-3) +var(--foo, red) calc(100% - var(--margin-size) * 2) ---------------------------------------------------- [ + ["selector", ["element"]], + ["punctuation", "{"], + ["variable", "--foo"], + ["punctuation", ":"], + " green", + ["punctuation", ";"], + ["punctuation", "}"], + ["function", "var"], ["punctuation", "("], ["variable", "--color-primary"], @@ -15,6 +28,13 @@ calc(100% - var(--margin-size) * 2) ["variable", "--level-3"], ["punctuation", ")"], + ["function", "var"], + ["punctuation", "("], + ["variable", "--foo"], + ["punctuation", ","], + " red", + ["punctuation", ")"], + ["function", "calc"], ["punctuation", "("], ["number", "100"], From 8b1bb469c8f3ab5fac9ad8a13520b70ef09d2aa4 Mon Sep 17 00:00:00 2001 From: Gal Schlezinger Date: Mon, 3 Dec 2018 15:34:30 +0200 Subject: [PATCH 0123/1100] Added additional operators to Reason (#1648) This adds the `|>` and `->` operators to Reason. --- components/prism-reason.js | 2 +- components/prism-reason.min.js | 2 +- tests/languages/reason/operator_feature.test | 4 +++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/components/prism-reason.js b/components/prism-reason.js index 462f10e93d..ed420ec727 100644 --- a/components/prism-reason.js +++ b/components/prism-reason.js @@ -10,7 +10,7 @@ Prism.languages.reason = Prism.languages.extend('clike', { // 'class-name' must be matched *after* 'constructor' defined below 'class-name': /\b[A-Z]\w*/, 'keyword': /\b(?:and|as|assert|begin|class|constraint|do|done|downto|else|end|exception|external|for|fun|function|functor|if|in|include|inherit|initializer|lazy|let|method|module|mutable|new|nonrec|object|of|open|or|private|rec|sig|struct|switch|then|to|try|type|val|virtual|when|while|with)\b/, - 'operator': /\.{3}|:[:=]|=(?:==?|>)?|<=?|>=?|[|^?'#!~`]|[+\-*\/]\.?|\b(?:mod|land|lor|lxor|lsl|lsr|asr)\b/ + 'operator': /\.{3}|:[:=]|\|>|->|=(?:==?|>)?|<=?|>=?|[|^?'#!~`]|[+\-*\/]\.?|\b(?:mod|land|lor|lxor|lsl|lsr|asr)\b/ }); Prism.languages.insertBefore('reason', 'class-name', { 'character': { diff --git a/components/prism-reason.min.js b/components/prism-reason.min.js index fcdc91bfb9..4c67651f29 100644 --- a/components/prism-reason.min.js +++ b/components/prism-reason.min.js @@ -1 +1 @@ -Prism.languages.reason=Prism.languages.extend("clike",{comment:{pattern:/(^|[^\\])\/\*[\s\S]*?\*\//,lookbehind:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^\\\r\n"])*"/,greedy:!0},"class-name":/\b[A-Z]\w*/,keyword:/\b(?:and|as|assert|begin|class|constraint|do|done|downto|else|end|exception|external|for|fun|function|functor|if|in|include|inherit|initializer|lazy|let|method|module|mutable|new|nonrec|object|of|open|or|private|rec|sig|struct|switch|then|to|try|type|val|virtual|when|while|with)\b/,operator:/\.{3}|:[:=]|=(?:==?|>)?|<=?|>=?|[|^?'#!~`]|[+\-*\/]\.?|\b(?:mod|land|lor|lxor|lsl|lsr|asr)\b/}),Prism.languages.insertBefore("reason","class-name",{character:{pattern:/'(?:\\x[\da-f]{2}|\\o[0-3][0-7][0-7]|\\\d{3}|\\.|[^'\\\r\n])'/,alias:"string"},constructor:{pattern:/\b[A-Z]\w*\b(?!\s*\.)/,alias:"variable"},label:{pattern:/\b[a-z]\w*(?=::)/,alias:"symbol"}}),delete Prism.languages.reason.function; \ No newline at end of file +Prism.languages.reason=Prism.languages.extend("clike",{comment:{pattern:/(^|[^\\])\/\*[\s\S]*?\*\//,lookbehind:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^\\\r\n"])*"/,greedy:!0},"class-name":/\b[A-Z]\w*/,keyword:/\b(?:and|as|assert|begin|class|constraint|do|done|downto|else|end|exception|external|for|fun|function|functor|if|in|include|inherit|initializer|lazy|let|method|module|mutable|new|nonrec|object|of|open|or|private|rec|sig|struct|switch|then|to|try|type|val|virtual|when|while|with)\b/,operator:/\.{3}|:[:=]|\|>|->|=(?:==?|>)?|<=?|>=?|[|^?'#!~`]|[+\-*\/]\.?|\b(?:mod|land|lor|lxor|lsl|lsr|asr)\b/}),Prism.languages.insertBefore("reason","class-name",{character:{pattern:/'(?:\\x[\da-f]{2}|\\o[0-3][0-7][0-7]|\\\d{3}|\\.|[^'\\\r\n])'/,alias:"string"},constructor:{pattern:/\b[A-Z]\w*\b(?!\s*\.)/,alias:"variable"},label:{pattern:/\b[a-z]\w*(?=::)/,alias:"symbol"}}),delete Prism.languages.reason.function; \ No newline at end of file diff --git a/tests/languages/reason/operator_feature.test b/tests/languages/reason/operator_feature.test index 868aac43f1..2794f78663 100644 --- a/tests/languages/reason/operator_feature.test +++ b/tests/languages/reason/operator_feature.test @@ -8,6 +8,7 @@ +. -. *. /. mod land lor lxor lsl lsr asr +|> -> ---------------------------------------------------- @@ -21,7 +22,8 @@ lsl lsr asr ["operator", "+"], ["operator", "-"], ["operator", "*"], ["operator", "/"], ["operator", "+."], ["operator", "-."], ["operator", "*."], ["operator", "/."], ["operator", "mod"], ["operator", "land"], ["operator", "lor"], ["operator", "lxor"], - ["operator", "lsl"], ["operator", "lsr"], ["operator", "asr"] + ["operator", "lsl"], ["operator", "lsr"], ["operator", "asr"], + ["operator", "|>"], ["operator", "->"] ] ---------------------------------------------------- From 6e250a5f1799ee61e22328299adc6184e4ed26b3 Mon Sep 17 00:00:00 2001 From: anton-balaniuc Date: Thu, 6 Dec 2018 07:27:46 +0000 Subject: [PATCH 0124/1100] Added module keywords to Java. (#1655) This adds the in Java 9 introduced module keywords to Java. Namespaces following these keywords are also properly highlighted. --- components/prism-java.js | 4 +- components/prism-java.min.js | 2 +- tests/languages/java/keyword_feature.test | 8 +- tests/languages/java/module_feature.test | 158 ++++++++++++++++++++++ 4 files changed, 168 insertions(+), 4 deletions(-) create mode 100644 tests/languages/java/module_feature.test diff --git a/components/prism-java.js b/components/prism-java.js index fb138409bb..6433162652 100644 --- a/components/prism-java.js +++ b/components/prism-java.js @@ -1,6 +1,6 @@ (function (Prism) { - var keywords = /\b(?:abstract|continue|for|new|switch|assert|default|goto|package|synchronized|boolean|do|if|private|this|break|double|implements|protected|throw|byte|else|import|public|throws|case|enum|instanceof|return|transient|catch|extends|int|short|try|char|final|interface|static|void|class|finally|long|strictfp|volatile|const|float|native|super|while|var|null)\b/; + var keywords = /\b(?:abstract|continue|for|new|switch|assert|default|goto|package|synchronized|boolean|do|if|private|this|break|double|implements|protected|throw|byte|else|import|public|throws|case|enum|instanceof|return|transient|catch|extends|int|short|try|char|final|interface|static|void|class|finally|long|strictfp|volatile|const|float|native|super|while|var|null|exports|module|open|opens|provides|requires|to|transitive|uses|with)\b/; // based on the java naming conventions var className = /\b[A-Z](?:\w*[a-z]\w*)?\b/; @@ -35,7 +35,7 @@ lookbehind: true }, 'namespace': { - pattern: /\b(package\s+|import\s+(?:static\s+)?)[a-z]\w*(\.[a-z]\w*)+/, + pattern: /(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)[a-z]\w*(\.[a-z]\w*)+/, lookbehind: true, inside: { 'punctuation': /\./, diff --git a/components/prism-java.min.js b/components/prism-java.min.js index c71824743d..68d9937420 100644 --- a/components/prism-java.min.js +++ b/components/prism-java.min.js @@ -1 +1 @@ -!function(a){var e=/\b(?:abstract|continue|for|new|switch|assert|default|goto|package|synchronized|boolean|do|if|private|this|break|double|implements|protected|throw|byte|else|import|public|throws|case|enum|instanceof|return|transient|catch|extends|int|short|try|char|final|interface|static|void|class|finally|long|strictfp|volatile|const|float|native|super|while|var|null)\b/,t=/\b[A-Z](?:\w*[a-z]\w*)?\b/;a.languages.java=a.languages.extend("clike",{"class-name":[t,/\b[A-Z]\w*(?=\s+\w+\s*[;,=())])/],keyword:e,"function":[a.languages.clike.function,{pattern:/(\:\:)[a-z_]\w*/,lookbehind:!0}],number:/\b0b[01][01_]*L?\b|\b0x[\da-f_]*\.?[\da-f_p+-]+\b|(?:\b\d[\d_]*\.?[\d_]*|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|([-+&|])\2|[?:~]|[-+*\/%&|^!=<>]=?)/m,lookbehind:!0}}),a.languages.insertBefore("java","class-name",{annotation:{alias:"punctuation",pattern:/(^|[^.])@\w+/,lookbehind:!0},namespace:{pattern:/\b(package\s+|import\s+(?:static\s+)?)[a-z]\w*(\.[a-z]\w*)+/,lookbehind:!0,inside:{punctuation:/\./}},generics:{pattern:/<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<[\w\s,.&?]*>)*>)*>)*>/,inside:{"class-name":t,keyword:e,punctuation:/[<>(),.:]/,operator:/[?&|]/}}})}(Prism); \ No newline at end of file +!function(a){var e=/\b(?:abstract|continue|for|new|switch|assert|default|goto|package|synchronized|boolean|do|if|private|this|break|double|implements|protected|throw|byte|else|import|public|throws|case|enum|instanceof|return|transient|catch|extends|int|short|try|char|final|interface|static|void|class|finally|long|strictfp|volatile|const|float|native|super|while|var|null|exports|module|open|opens|provides|requires|to|transitive|uses|with)\b/,t=/\b[A-Z](?:\w*[a-z]\w*)?\b/;a.languages.java=a.languages.extend("clike",{"class-name":[t,/\b[A-Z]\w*(?=\s+\w+\s*[;,=())])/],keyword:e,"function":[a.languages.clike.function,{pattern:/(\:\:)[a-z_]\w*/,lookbehind:!0}],number:/\b0b[01][01_]*L?\b|\b0x[\da-f_]*\.?[\da-f_p+-]+\b|(?:\b\d[\d_]*\.?[\d_]*|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|([-+&|])\2|[?:~]|[-+*\/%&|^!=<>]=?)/m,lookbehind:!0}}),a.languages.insertBefore("java","class-name",{annotation:{alias:"punctuation",pattern:/(^|[^.])@\w+/,lookbehind:!0},namespace:{pattern:/(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)[a-z]\w*(\.[a-z]\w*)+/,lookbehind:!0,inside:{punctuation:/\./}},generics:{pattern:/<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<[\w\s,.&?]*>)*>)*>)*>/,inside:{"class-name":t,keyword:e,punctuation:/[<>(),.:]/,operator:/[?&|]/}}})}(Prism); \ No newline at end of file diff --git a/tests/languages/java/keyword_feature.test b/tests/languages/java/keyword_feature.test index e700d47f90..5e5604d1bb 100644 --- a/tests/languages/java/keyword_feature.test +++ b/tests/languages/java/keyword_feature.test @@ -20,6 +20,9 @@ finally long strictfp volatile const float native super while var null +module requires transitive +exports uses open +opens with to provides ---------------------------------------------------- @@ -45,7 +48,10 @@ var null ["keyword", "finally"], ["keyword", "long"], ["keyword", "strictfp"], ["keyword", "volatile"], ["keyword", "const"], ["keyword", "float"], ["keyword", "native"], ["keyword", "super"], ["keyword", "while"], - ["keyword", "var"], ["keyword", "null"] + ["keyword", "var"], ["keyword", "null"], + ["keyword", "module"], ["keyword", "requires"], ["keyword", "transitive"], + ["keyword", "exports"], ["keyword", "uses"], ["keyword", "open"], + ["keyword", "opens"], ["keyword", "with"], ["keyword", "to"], ["keyword","provides"] ] ---------------------------------------------------- diff --git a/tests/languages/java/module_feature.test b/tests/languages/java/module_feature.test new file mode 100644 index 0000000000..983f8ececb --- /dev/null +++ b/tests/languages/java/module_feature.test @@ -0,0 +1,158 @@ +module com.js.prism { + exports java.net.http; + exports jdk.internal.editor.spi to jdk.jshell; + + requires java.base; + requires transitive java.xml; + + uses java.net.ContentHandlerFactory; + + opens java.time.DateTime; + opens java.time.LocalDateTime to java.logging; + + provides com.modules.hello.HelloInterface with com.modules.hello.HelloModules; + +} + + +---------------------------------------------------- + [ + ["keyword", "module"], + ["namespace", + ["com", + ["punctuation", "."], + "js", + ["punctuation", "."], + "prism" + ] + ], + ["punctuation", "{"], + + ["keyword", "exports"], + ["namespace", + [ + "java", + ["punctuation", "."], + "net", + ["punctuation", "."], + "http" + ] + ], + ["punctuation", ";"], + + ["keyword", "exports"], + ["namespace", + [ + "jdk", + ["punctuation", "."], + "internal", + ["punctuation", "."], + "editor", + ["punctuation", "."], + "spi" + ] + ], + ["keyword", "to"], + ["namespace", + [ + "jdk", + ["punctuation", "."], + "jshell" + ] + ], + ["punctuation", ";"], + + ["keyword", "requires"], + ["namespace", + [ + "java", + ["punctuation", "."], + "base" + ] + ], + ["punctuation", ";"], + + ["keyword", "requires"], + ["keyword", "transitive"], + ["namespace", + [ + "java", + ["punctuation", "."], + "xml" + ] + ], + ["punctuation", ";"], + + ["keyword", "uses"], + ["namespace", + [ + "java", + ["punctuation", "."], + "net" + ] + ], + ["punctuation", "."], + ["class-name", "ContentHandlerFactory"], + ["punctuation", ";"], + + ["keyword", "opens"], + ["namespace", + [ + "java", + ["punctuation", "."], + "time" + ] + ], + ["punctuation", "."], + ["class-name", "DateTime"], + ["punctuation", ";"], + ["keyword", "opens"], + ["namespace", + [ + "java", + ["punctuation", "."], + "time" + ] + ], + ["punctuation", "."], + ["class-name", "LocalDateTime"], + ["keyword", "to"], + ["namespace", + [ + "java", + ["punctuation", "."], + "logging" + ] + ], + ["punctuation", ";"], + ["keyword", "provides"], + ["namespace", + [ + "com", + ["punctuation", "."], + "modules", + ["punctuation", "."], + "hello" + ] + ], + ["punctuation", "."], + ["class-name", "HelloInterface"], + ["keyword", "with"], + ["namespace", + [ + "com", + ["punctuation", "."], + "modules", + ["punctuation", "."], + "hello" + ] + ], + ["punctuation", "."], + ["class-name", "HelloModules"], + ["punctuation", ";"], + ["punctuation", "}"] +] + +---------------------------------------------------- + +Checks for module definition. From b48c012cd8fd429ba7c04003517438774b5c5b1b Mon Sep 17 00:00:00 2001 From: Volk Date: Sat, 15 Dec 2018 20:32:22 +0000 Subject: [PATCH 0125/1100] Added Vala language (#1658) Adds support for the Vala language. --- components.js | 2 +- components.json | 5 + components/prism-vala.js | 74 +++++++ components/prism-vala.min.js | 1 + examples/prism-vala.html | 33 +++ plugins/autoloader/prism-autoloader.js | 2 +- plugins/autoloader/prism-autoloader.min.js | 2 +- tests/languages/vala/class-name_feature.test | 37 ++++ tests/languages/vala/keyword_feature.test | 189 ++++++++++++++++++ tests/languages/vala/number_feature.test | 27 +++ tests/languages/vala/operator_feature.test | 63 ++++++ tests/languages/vala/punctuation_feature.test | 22 ++ tests/languages/vala/string_feature.test | 64 ++++++ 13 files changed, 518 insertions(+), 3 deletions(-) create mode 100644 components/prism-vala.js create mode 100644 components/prism-vala.min.js create mode 100644 examples/prism-vala.html create mode 100644 tests/languages/vala/class-name_feature.test create mode 100644 tests/languages/vala/keyword_feature.test create mode 100644 tests/languages/vala/number_feature.test create mode 100644 tests/languages/vala/operator_feature.test create mode 100644 tests/languages/vala/punctuation_feature.test create mode 100644 tests/languages/vala/string_feature.test diff --git a/components.js b/components.js index 04e3207f5e..9ce77ef3e5 100644 --- a/components.js +++ b/components.js @@ -1,2 +1,2 @@ -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default","peerDependencies":"markup"},"clike":{"title":"C-like","option":"default","overrideExampleHeader":true},"javascript":{"title":"JavaScript","require":"clike","peerDependencies":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"actionscript":{"title":"ActionScript","require":"javascript","peerDependencies":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":"dotnet","owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","owner":"R-osey"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup","peerDependencies":["css","javascript"],"alias":"jinja2","owner":"romanvm"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","peerDependencies":["css","coffeescript","erb","javascript","less","markdown","ruby","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"http":{"title":"HTTP","peerDependencies":["javascript","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"json":{"title":"JSON","alias":"jsonp","aliasTitles":{"jsonp":"JSONP"},"owner":"CupOfTea696"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","owner":"japborst"},"less":{"title":"Less","require":"css","owner":"Golmote"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"n4js":{"title":"N4JS","require":"javascript","alias":"n4jsd","owner":"bsmith-n4"},"nasm":{"title":"NASM","owner":"rbmj"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"cpp","peerDependencies":["c","cpp"],"overrideExampleHeader":true,"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"php-extras":{"title":"PHP Extras","require":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":"javascript","peerDependencies":["coffeescript","ejs","handlebars","hogan","less","livescript","markdown","mustache","plates","scss","stylus","swig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","peerDependencies":["c","cpp","fortran","ats","dsp"],"owner":"Golmote"},"python":{"title":"Python","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"ruby":{"title":"Ruby","require":"clike","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sql":{"title":"SQL","owner":"multipetros"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","peerDependencies":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","alias":"ts","owner":"vkbansal"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","owner":"hason"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":"Line Highlight","line-numbers":{"title":"Line Numbers","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","after":["autolinker","data-uri-highlight"]},"autolinker":"Autolinker","wpd":"WebPlatform Docs","custom-class":{"title":"Custom Class","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","noCSS":true},"show-language":{"title":"Show Language","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","owner":"Golmote","noCSS":true},"previewers":{"title":"Previewers","owner":"Golmote"},"autoloader":{"title":"Autoloader","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","owner":"Golmote","after":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","owner":"chriswells0"},"unescaped-markup":"Unescaped Markup","normalize-whitespace":{"title":"Normalize Whitespace","owner":"zeitgeist87","after":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","owner":"mAAdhaTTah","require":"toolbar","noCSS":true}}}; +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default","peerDependencies":"markup"},"clike":{"title":"C-like","option":"default","overrideExampleHeader":true},"javascript":{"title":"JavaScript","require":"clike","peerDependencies":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"actionscript":{"title":"ActionScript","require":"javascript","peerDependencies":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":"dotnet","owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","owner":"R-osey"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup","peerDependencies":["css","javascript"],"alias":"jinja2","owner":"romanvm"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","peerDependencies":["css","coffeescript","erb","javascript","less","markdown","ruby","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"http":{"title":"HTTP","peerDependencies":["javascript","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"json":{"title":"JSON","alias":"jsonp","aliasTitles":{"jsonp":"JSONP"},"owner":"CupOfTea696"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","owner":"japborst"},"less":{"title":"Less","require":"css","owner":"Golmote"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"n4js":{"title":"N4JS","require":"javascript","alias":"n4jsd","owner":"bsmith-n4"},"nasm":{"title":"NASM","owner":"rbmj"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"cpp","peerDependencies":["c","cpp"],"overrideExampleHeader":true,"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"php-extras":{"title":"PHP Extras","require":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":"javascript","peerDependencies":["coffeescript","ejs","handlebars","hogan","less","livescript","markdown","mustache","plates","scss","stylus","swig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","peerDependencies":["c","cpp","fortran","ats","dsp"],"owner":"Golmote"},"python":{"title":"Python","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"ruby":{"title":"Ruby","require":"clike","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sql":{"title":"SQL","owner":"multipetros"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","peerDependencies":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","alias":"ts","owner":"vkbansal"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","owner":"hason"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":"Line Highlight","line-numbers":{"title":"Line Numbers","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","after":["autolinker","data-uri-highlight"]},"autolinker":"Autolinker","wpd":"WebPlatform Docs","custom-class":{"title":"Custom Class","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","noCSS":true},"show-language":{"title":"Show Language","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","owner":"Golmote","noCSS":true},"previewers":{"title":"Previewers","owner":"Golmote"},"autoloader":{"title":"Autoloader","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","owner":"Golmote","after":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","owner":"chriswells0"},"unescaped-markup":"Unescaped Markup","normalize-whitespace":{"title":"Normalize Whitespace","owner":"zeitgeist87","after":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","owner":"mAAdhaTTah","require":"toolbar","noCSS":true}}}; if (typeof module !== 'undefined' && module.exports) { module.exports = components; } \ No newline at end of file diff --git a/components.json b/components.json index 653ccc800b..d175c6abb6 100644 --- a/components.json +++ b/components.json @@ -755,6 +755,11 @@ "alias": "ts", "owner": "vkbansal" }, + "vala": { + "title": "Vala", + "require": "clike", + "owner": "TemplarVolk" + }, "vbnet": { "title": "VB.Net", "require": "basic", diff --git a/components/prism-vala.js b/components/prism-vala.js new file mode 100644 index 0000000000..61d2e86038 --- /dev/null +++ b/components/prism-vala.js @@ -0,0 +1,74 @@ +Prism.languages.vala = Prism.languages.extend('clike', { + // Classes copied from prism-csharp + 'class-name': [ + { + // (Foo bar, Bar baz) + pattern: /\b[A-Z]\w*(?:\.\w+)*\b(?=(?:\?\s+|\*?\s+\*?)\w+)/, + inside: { + punctuation: /\./ + } + }, + { + // [Foo] + pattern: /(\[)[A-Z]\w*(?:\.\w+)*\b/, + lookbehind: true, + inside: { + punctuation: /\./ + } + }, + { + // class Foo : Bar + pattern: /(\b(?:class|interface)\s+[A-Z]\w*(?:\.\w+)*\s*:\s*)[A-Z]\w*(?:\.\w+)*\b/, + lookbehind: true, + inside: { + punctuation: /\./ + } + }, + { + // class Foo + pattern: /((?:\b(?:class|interface|new|struct|enum)\s+)|(?:catch\s+\())[A-Z]\w*(?:\.\w+)*\b/, + lookbehind: true, + inside: { + punctuation: /\./ + } + } + ], + 'constant': /\b[A-Z0-9_]+\b/, + 'function': /\w+(?=\s*\()/, + 'keyword': /\b(?:bool|char|double|float|null|size_t|ssize_t|string|unichar|void|int|int8|int16|int32|int64|long|short|uchar|uint|uint8|uint16|uint32|uint64|ulong|ushort|class|delegate|enum|errordomain|interface|namespace|struct|break|continue|do|for|foreach|return|while|else|if|switch|assert|case|default|abstract|const|dynamic|ensures|extern|inline|internal|override|private|protected|public|requires|signal|static|virtual|volatile|weak|async|owned|unowned|try|catch|finally|throw|as|base|construct|delete|get|in|is|lock|new|out|params|ref|sizeof|set|this|throws|typeof|using|value|var|yield)\b/i, + 'number': /(?:\b0x[\da-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?)(?:f|u?l?)?/i, + 'operator': /\+\+|--|&&|\|\||<<=?|>>=?|=>|->|~|[+\-*\/%&^|=!<>]=?|\?\??|\.\.\./, + 'punctuation': /[{}[\];(),.:]/ +}); + +Prism.languages.insertBefore('vala','string', { + 'raw-string': { + pattern: /"""[\s\S]*?"""/, + greedy: true, + alias: 'string' + }, + 'template-string': { + pattern: /@"[\s\S]*?"/, + greedy: true, + inside: { + 'interpolation': { + pattern: /\$(?:\([^)]*\)|[a-zA-Z]\w*)/, + inside: { + 'delimiter': { + pattern: /^\$\(?|\)$/, + alias: 'punctuation' + }, + rest: Prism.languages.vala + } + }, + 'string': /[\s\S]+/ + } + } +}); + +Prism.languages.insertBefore('vala', 'keyword', { + 'regex': { + pattern: /\/(\[(?:[^\]\\\r\n]|\\.)*]|\\.|[^/\\\[\r\n])+\/[imsx]{0,4}(?=\s*($|[\r\n,.;})\]]))/, + greedy: true + } +}); \ No newline at end of file diff --git a/components/prism-vala.min.js b/components/prism-vala.min.js new file mode 100644 index 0000000000..32a0b7c8df --- /dev/null +++ b/components/prism-vala.min.js @@ -0,0 +1 @@ +Prism.languages.vala=Prism.languages.extend("clike",{"class-name":[{pattern:/\b[A-Z]\w*(?:\.\w+)*\b(?=(?:\?\s+|\*?\s+\*?)\w+)/,inside:{punctuation:/\./}},{pattern:/(\[)[A-Z]\w*(?:\.\w+)*\b/,lookbehind:!0,inside:{punctuation:/\./}},{pattern:/(\b(?:class|interface)\s+[A-Z]\w*(?:\.\w+)*\s*:\s*)[A-Z]\w*(?:\.\w+)*\b/,lookbehind:!0,inside:{punctuation:/\./}},{pattern:/((?:\b(?:class|interface|new|struct|enum)\s+)|(?:catch\s+\())[A-Z]\w*(?:\.\w+)*\b/,lookbehind:!0,inside:{punctuation:/\./}}],constant:/\b[A-Z0-9_]+\b/,"function":/\w+(?=\s*\()/,keyword:/\b(?:bool|char|double|float|null|size_t|ssize_t|string|unichar|void|int|int8|int16|int32|int64|long|short|uchar|uint|uint8|uint16|uint32|uint64|ulong|ushort|class|delegate|enum|errordomain|interface|namespace|struct|break|continue|do|for|foreach|return|while|else|if|switch|assert|case|default|abstract|const|dynamic|ensures|extern|inline|internal|override|private|protected|public|requires|signal|static|virtual|volatile|weak|async|owned|unowned|try|catch|finally|throw|as|base|construct|delete|get|in|is|lock|new|out|params|ref|sizeof|set|this|throws|typeof|using|value|var|yield)\b/i,number:/(?:\b0x[\da-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?)(?:f|u?l?)?/i,operator:/\+\+|--|&&|\|\||<<=?|>>=?|=>|->|~|[+\-*\/%&^|=!<>]=?|\?\??|\.\.\./,punctuation:/[{}[\];(),.:]/}),Prism.languages.insertBefore("vala","string",{"raw-string":{pattern:/"""[\s\S]*?"""/,greedy:!0,alias:"string"},"template-string":{pattern:/@"[\s\S]*?"/,greedy:!0,inside:{interpolation:{pattern:/\$(?:\([^)]*\)|[a-zA-Z]\w*)/,inside:{delimiter:{pattern:/^\$\(?|\)$/,alias:"punctuation"},rest:Prism.languages.vala}},string:/[\s\S]+/}}}),Prism.languages.insertBefore("vala","keyword",{regex:{pattern:/\/(\[(?:[^\]\\\r\n]|\\.)*]|\\.|[^\/\\\[\r\n])+\/[imsx]{0,4}(?=\s*($|[\r\n,.;})\]]))/,greedy:!0}}); \ No newline at end of file diff --git a/examples/prism-vala.html b/examples/prism-vala.html new file mode 100644 index 0000000000..ef5e98a921 --- /dev/null +++ b/examples/prism-vala.html @@ -0,0 +1,33 @@ +

      Comments

      +
      // Single line comment
      +/** Multi-line
      +doc comment */
      + +

      Strings

      +
      "foo \"bar\" baz"
      +"Multi-line strings ending with a \
      +are supported too."
      +"""Verbatim strings
      +You can create
      +multi-line strings like this too."""
      +@"Template string with variables $var1 $(var2 * 2)"
      + +

      Regex

      +
      /foo?[ ]*bar/
      + +

      Full example

      +
      using Gtk;
      +
      +int main (string[] args) {
      +	Gtk.init(ref args);
      +
      +	var window = new Window();
      +
      +	var button = new Button.with_label("Click me!");
      +
      +	window.add(button);
      +	window.show_all();
      +
      +	Gtk.main();
      +	return 0;
      +}
      \ No newline at end of file diff --git a/plugins/autoloader/prism-autoloader.js b/plugins/autoloader/prism-autoloader.js index 4db91105b7..4d6a601450 100644 --- a/plugins/autoloader/prism-autoloader.js +++ b/plugins/autoloader/prism-autoloader.js @@ -4,7 +4,7 @@ } // The dependencies map is built automatically with gulp - var lang_dependencies = /*languages_placeholder[*/{"javascript":"clike","actionscript":"javascript","arduino":"cpp","aspnet":["markup","csharp"],"bison":"c","c":"clike","csharp":"clike","cpp":"c","coffeescript":"javascript","crystal":"ruby","css-extras":"css","d":"clike","dart":"clike","django":"markup","erb":["ruby","markup-templating"],"fsharp":"clike","flow":"javascript","glsl":"clike","gml":"clike","go":"clike","groovy":"clike","haml":"ruby","handlebars":"markup-templating","haxe":"clike","java":"clike","jolie":"clike","kotlin":"clike","less":"css","markdown":"markup","markup-templating":"markup","n4js":"javascript","nginx":"clike","objectivec":"c","opencl":"cpp","parser":"markup","php":["clike","markup-templating"],"php-extras":"php","plsql":"sql","processing":"clike","protobuf":"clike","pug":"javascript","qore":"clike","jsx":["markup","javascript"],"tsx":["jsx","typescript"],"reason":"clike","ruby":"clike","sass":"css","scss":"css","scala":"java","smarty":"markup-templating","soy":"markup-templating","swift":"clike","tap":"yaml","textile":"markup","tt2":["clike","markup-templating"],"twig":"markup","typescript":"javascript","vbnet":"basic","velocity":"markup","wiki":"markup","xeora":"markup","xquery":"markup"}/*]*/; + var lang_dependencies = /*languages_placeholder[*/{"javascript":"clike","actionscript":"javascript","arduino":"cpp","aspnet":["markup","csharp"],"bison":"c","c":"clike","csharp":"clike","cpp":"c","coffeescript":"javascript","crystal":"ruby","css-extras":"css","d":"clike","dart":"clike","django":"markup","erb":["ruby","markup-templating"],"fsharp":"clike","flow":"javascript","glsl":"clike","gml":"clike","go":"clike","groovy":"clike","haml":"ruby","handlebars":"markup-templating","haxe":"clike","java":"clike","jolie":"clike","kotlin":"clike","less":"css","markdown":"markup","markup-templating":"markup","n4js":"javascript","nginx":"clike","objectivec":"c","opencl":"cpp","parser":"markup","php":["clike","markup-templating"],"php-extras":"php","plsql":"sql","processing":"clike","protobuf":"clike","pug":"javascript","qore":"clike","jsx":["markup","javascript"],"tsx":["jsx","typescript"],"reason":"clike","ruby":"clike","sass":"css","scss":"css","scala":"java","smarty":"markup-templating","soy":"markup-templating","swift":"clike","tap":"yaml","textile":"markup","tt2":["clike","markup-templating"],"twig":"markup","typescript":"javascript","vala":"clike","vbnet":"basic","velocity":"markup","wiki":"markup","xeora":"markup","xquery":"markup"}/*]*/; var lang_data = {}; diff --git a/plugins/autoloader/prism-autoloader.min.js b/plugins/autoloader/prism-autoloader.min.js index c695e739f3..629f1b2bf0 100644 --- a/plugins/autoloader/prism-autoloader.min.js +++ b/plugins/autoloader/prism-autoloader.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof self&&self.Prism&&self.document&&document.createElement){var e={javascript:"clike",actionscript:"javascript",arduino:"cpp",aspnet:["markup","csharp"],bison:"c",c:"clike",csharp:"clike",cpp:"c",coffeescript:"javascript",crystal:"ruby","css-extras":"css",d:"clike",dart:"clike",django:"markup",erb:["ruby","markup-templating"],fsharp:"clike",flow:"javascript",glsl:"clike",gml:"clike",go:"clike",groovy:"clike",haml:"ruby",handlebars:"markup-templating",haxe:"clike",java:"clike",jolie:"clike",kotlin:"clike",less:"css",markdown:"markup","markup-templating":"markup",n4js:"javascript",nginx:"clike",objectivec:"c",opencl:"cpp",parser:"markup",php:["clike","markup-templating"],"php-extras":"php",plsql:"sql",processing:"clike",protobuf:"clike",pug:"javascript",qore:"clike",jsx:["markup","javascript"],tsx:["jsx","typescript"],reason:"clike",ruby:"clike",sass:"css",scss:"css",scala:"java",smarty:"markup-templating",soy:"markup-templating",swift:"clike",tap:"yaml",textile:"markup",tt2:["clike","markup-templating"],twig:"markup",typescript:"javascript",vbnet:"basic",velocity:"markup",wiki:"markup",xeora:"markup",xquery:"markup"},a={},c="none",t=document.getElementsByTagName("script");t=t[t.length-1];var r="components/";if(t.hasAttribute("data-autoloader-path")){var s=t.getAttribute("data-autoloader-path").trim();s.length>0&&!/^[a-z]+:\/\//i.test(t.src)&&(r=s.replace(/\/?$/,"/"))}else/[\w-]+\.js$/.test(t.src)&&(r=t.src.replace(/[\w-]+\.js$/,"components/"));var i=Prism.plugins.autoloader={languages_path:r,use_minified:!0},n=function(e,a,c){var t=document.createElement("script");t.src=e,t.async=!0,t.onload=function(){document.body.removeChild(t),a&&a()},t.onerror=function(){document.body.removeChild(t),c&&c()},document.body.appendChild(t)},l=function(e){return i.languages_path+"prism-"+e+(i.use_minified?".min":"")+".js"},o=function(e,c){var t=a[e];t||(t=a[e]={});var r=c.getAttribute("data-dependencies");!r&&c.parentNode&&"pre"===c.parentNode.tagName.toLowerCase()&&(r=c.parentNode.getAttribute("data-dependencies")),r=r?r.split(/\s*,\s*/g):[],p(r,function(){u(e,function(){Prism.highlightElement(c)})})},p=function(e,a,c){"string"==typeof e&&(e=[e]);var t=0,r=e.length,s=function(){r>t?u(e[t],function(){t++,s()},function(){c&&c(e[t])}):t===r&&a&&a(e)};s()},u=function(c,t,r){var s=function(){var e=!1;c.indexOf("!")>=0&&(e=!0,c=c.replace("!",""));var s=a[c];if(s||(s=a[c]={}),t&&(s.success_callbacks||(s.success_callbacks=[]),s.success_callbacks.push(t)),r&&(s.error_callbacks||(s.error_callbacks=[]),s.error_callbacks.push(r)),!e&&Prism.languages[c])m(c);else if(!e&&s.error)k(c);else if(e||!s.loading){s.loading=!0;var i=l(c);n(i,function(){s.loading=!1,m(c)},function(){s.loading=!1,s.error=!0,k(c)})}},i=e[c];i&&i.length?p(i,s):s()},m=function(e){a[e]&&a[e].success_callbacks&&a[e].success_callbacks.length&&a[e].success_callbacks.forEach(function(a){a(e)})},k=function(e){a[e]&&a[e].error_callbacks&&a[e].error_callbacks.length&&a[e].error_callbacks.forEach(function(a){a(e)})};Prism.hooks.add("complete",function(e){e.element&&e.language&&!e.grammar&&e.language!==c&&o(e.language,e.element)})}}(); \ No newline at end of file +!function(){if("undefined"!=typeof self&&self.Prism&&self.document&&document.createElement){var e={javascript:"clike",actionscript:"javascript",arduino:"cpp",aspnet:["markup","csharp"],bison:"c",c:"clike",csharp:"clike",cpp:"c",coffeescript:"javascript",crystal:"ruby","css-extras":"css",d:"clike",dart:"clike",django:"markup",erb:["ruby","markup-templating"],fsharp:"clike",flow:"javascript",glsl:"clike",gml:"clike",go:"clike",groovy:"clike",haml:"ruby",handlebars:"markup-templating",haxe:"clike",java:"clike",jolie:"clike",kotlin:"clike",less:"css",markdown:"markup","markup-templating":"markup",n4js:"javascript",nginx:"clike",objectivec:"c",opencl:"cpp",parser:"markup",php:["clike","markup-templating"],"php-extras":"php",plsql:"sql",processing:"clike",protobuf:"clike",pug:"javascript",qore:"clike",jsx:["markup","javascript"],tsx:["jsx","typescript"],reason:"clike",ruby:"clike",sass:"css",scss:"css",scala:"java",smarty:"markup-templating",soy:"markup-templating",swift:"clike",tap:"yaml",textile:"markup",tt2:["clike","markup-templating"],twig:"markup",typescript:"javascript",vala:"clike",vbnet:"basic",velocity:"markup",wiki:"markup",xeora:"markup",xquery:"markup"},a={},c="none",t=document.getElementsByTagName("script");t=t[t.length-1];var r="components/";if(t.hasAttribute("data-autoloader-path")){var s=t.getAttribute("data-autoloader-path").trim();s.length>0&&!/^[a-z]+:\/\//i.test(t.src)&&(r=s.replace(/\/?$/,"/"))}else/[\w-]+\.js$/.test(t.src)&&(r=t.src.replace(/[\w-]+\.js$/,"components/"));var i=Prism.plugins.autoloader={languages_path:r,use_minified:!0},n=function(e,a,c){var t=document.createElement("script");t.src=e,t.async=!0,t.onload=function(){document.body.removeChild(t),a&&a()},t.onerror=function(){document.body.removeChild(t),c&&c()},document.body.appendChild(t)},l=function(e){return i.languages_path+"prism-"+e+(i.use_minified?".min":"")+".js"},o=function(e,c){var t=a[e];t||(t=a[e]={});var r=c.getAttribute("data-dependencies");!r&&c.parentNode&&"pre"===c.parentNode.tagName.toLowerCase()&&(r=c.parentNode.getAttribute("data-dependencies")),r=r?r.split(/\s*,\s*/g):[],p(r,function(){u(e,function(){Prism.highlightElement(c)})})},p=function(e,a,c){"string"==typeof e&&(e=[e]);var t=0,r=e.length,s=function(){r>t?u(e[t],function(){t++,s()},function(){c&&c(e[t])}):t===r&&a&&a(e)};s()},u=function(c,t,r){var s=function(){var e=!1;c.indexOf("!")>=0&&(e=!0,c=c.replace("!",""));var s=a[c];if(s||(s=a[c]={}),t&&(s.success_callbacks||(s.success_callbacks=[]),s.success_callbacks.push(t)),r&&(s.error_callbacks||(s.error_callbacks=[]),s.error_callbacks.push(r)),!e&&Prism.languages[c])m(c);else if(!e&&s.error)k(c);else if(e||!s.loading){s.loading=!0;var i=l(c);n(i,function(){s.loading=!1,m(c)},function(){s.loading=!1,s.error=!0,k(c)})}},i=e[c];i&&i.length?p(i,s):s()},m=function(e){a[e]&&a[e].success_callbacks&&a[e].success_callbacks.length&&a[e].success_callbacks.forEach(function(a){a(e)})},k=function(e){a[e]&&a[e].error_callbacks&&a[e].error_callbacks.length&&a[e].error_callbacks.forEach(function(a){a(e)})};Prism.hooks.add("complete",function(e){e.element&&e.language&&!e.grammar&&e.language!==c&&o(e.language,e.element)})}}(); \ No newline at end of file diff --git a/tests/languages/vala/class-name_feature.test b/tests/languages/vala/class-name_feature.test new file mode 100644 index 0000000000..6ee97d9cef --- /dev/null +++ b/tests/languages/vala/class-name_feature.test @@ -0,0 +1,37 @@ +class Foo +enum Bar +interface BarBaz +class Foo : Bar +[Foobar] +void Foo(Bar bar, Baz baz) + +---------------------------------------------------- + +[ + ["keyword", "class"], + ["class-name", ["Foo"]], + ["keyword", "enum"], + ["class-name", ["Bar"]], + ["keyword", "interface"], + ["class-name", ["BarBaz"]], + ["keyword", "class"], + ["class-name", ["Foo"]], + ["punctuation", ":"], + ["class-name", ["Bar"]], + ["punctuation", "["], + ["class-name", ["Foobar"]], + ["punctuation", "]"], + ["keyword", "void"], + ["function", "Foo"], + ["punctuation", "("], + ["class-name", ["Bar"]], + " bar", + ["punctuation", ","], + ["class-name", ["Baz"]], + " baz", + ["punctuation", ")"] +] + +---------------------------------------------------- + +Checks for class names. \ No newline at end of file diff --git a/tests/languages/vala/keyword_feature.test b/tests/languages/vala/keyword_feature.test new file mode 100644 index 0000000000..f69ca59df5 --- /dev/null +++ b/tests/languages/vala/keyword_feature.test @@ -0,0 +1,189 @@ +bool +char +double +float +null +size_t +ssize_t +string +unichar +void +int +int8 +int16 +int32 +int64 +long +short +uchar +uint +uint8 +uint16 +uint32 +uint64 +ulong +ushort +class +delegate +enum +errordomain +interface +namespace +struct +break +continue +do +for +foreach +return +while +else +if +switch +assert +case +default +abstract +const +dynamic +ensures +extern +inline +internal +override +private +protected +public +requires +signal +static +virtual +volatile +weak +async +owned +unowned +try +catch +finally +throw +as +base +construct +delete +get +in +is +lock +new +out +params +ref +sizeof +set +this +throws +typeof +using +value +var +yield + +---------------------------------------------------- + +[ + ["keyword", "bool"], + ["keyword", "char"], + ["keyword", "double"], + ["keyword", "float"], + ["keyword", "null"], + ["keyword", "size_t"], + ["keyword", "ssize_t"], + ["keyword", "string"], + ["keyword", "unichar"], + ["keyword", "void"], + ["keyword", "int"], + ["keyword", "int8"], + ["keyword", "int16"], + ["keyword", "int32"], + ["keyword", "int64"], + ["keyword", "long"], + ["keyword", "short"], + ["keyword", "uchar"], + ["keyword", "uint"], + ["keyword", "uint8"], + ["keyword", "uint16"], + ["keyword", "uint32"], + ["keyword", "uint64"], + ["keyword", "ulong"], + ["keyword", "ushort"], + ["keyword", "class"], + ["keyword", "delegate"], + ["keyword", "enum"], + ["keyword", "errordomain"], + ["keyword", "interface"], + ["keyword", "namespace"], + ["keyword", "struct"], + ["keyword", "break"], + ["keyword", "continue"], + ["keyword", "do"], + ["keyword", "for"], + ["keyword", "foreach"], + ["keyword", "return"], + ["keyword", "while"], + ["keyword", "else"], + ["keyword", "if"], + ["keyword", "switch"], + ["keyword", "assert"], + ["keyword", "case"], + ["keyword", "default"], + ["keyword", "abstract"], + ["keyword", "const"], + ["keyword", "dynamic"], + ["keyword", "ensures"], + ["keyword", "extern"], + ["keyword", "inline"], + ["keyword", "internal"], + ["keyword", "override"], + ["keyword", "private"], + ["keyword", "protected"], + ["keyword", "public"], + ["keyword", "requires"], + ["keyword", "signal"], + ["keyword", "static"], + ["keyword", "virtual"], + ["keyword", "volatile"], + ["keyword", "weak"], + ["keyword", "async"], + ["keyword", "owned"], + ["keyword", "unowned"], + ["keyword", "try"], + ["keyword", "catch"], + ["keyword", "finally"], + ["keyword", "throw"], + ["keyword", "as"], + ["keyword", "base"], + ["keyword", "construct"], + ["keyword", "delete"], + ["keyword", "get"], + ["keyword", "in"], + ["keyword", "is"], + ["keyword", "lock"], + ["keyword", "new"], + ["keyword", "out"], + ["keyword", "params"], + ["keyword", "ref"], + ["keyword", "sizeof"], + ["keyword", "set"], + ["keyword", "this"], + ["keyword", "throws"], + ["keyword", "typeof"], + ["keyword", "using"], + ["keyword", "value"], + ["keyword", "var"], + ["keyword", "yield"] +] + +---------------------------------------------------- + +Checks for all keywords. \ No newline at end of file diff --git a/tests/languages/vala/number_feature.test b/tests/languages/vala/number_feature.test new file mode 100644 index 0000000000..dc88051097 --- /dev/null +++ b/tests/languages/vala/number_feature.test @@ -0,0 +1,27 @@ +42 +3.14159 +5ul +0.75f +4e10 +2.1e-10 +0.4e+2 +0xbabe +0xBABE + +---------------------------------------------------- + +[ + ["number", "42"], + ["number", "3.14159"], + ["number", "5ul"], + ["number", "0.75f"], + ["number", "4e10"], + ["number", "2.1e-10"], + ["number", "0.4e+2"], + ["number", "0xbabe"], + ["number", "0xBABE"] +] + +---------------------------------------------------- + +Checks for decimal numbers and hexadecimal numbers. \ No newline at end of file diff --git a/tests/languages/vala/operator_feature.test b/tests/languages/vala/operator_feature.test new file mode 100644 index 0000000000..ba0c4d7011 --- /dev/null +++ b/tests/languages/vala/operator_feature.test @@ -0,0 +1,63 @@ ++ - * / % -- ++ +>> << +~ & | ^ ++= -= *= /= %= >>= <<= &= |= ^= +! && || += == != < > <= >= => +? ?? +... +-> + +---------------------------------------------------- + +[ + ["operator", "+"], + ["operator", "-"], + ["operator", "*"], + ["operator", "/"], + ["operator", "%"], + ["operator", "--"], + ["operator", "++"], + + ["operator", ">>"], + ["operator", "<<"], + + ["operator", "~"], + ["operator", "&"], + ["operator", "|"], + ["operator", "^"], + + ["operator", "+="], + ["operator", "-="], + ["operator", "*="], + ["operator", "/="], + ["operator", "%="], + ["operator", ">>="], + ["operator", "<<="], + ["operator", "&="], + ["operator", "|="], + ["operator", "^="], + + ["operator", "!"], + ["operator", "&&"], + ["operator", "||"], + + ["operator", "="], + ["operator", "=="], + ["operator", "!="], + ["operator", "<"], + ["operator", ">"], + ["operator", "<="], + ["operator", ">="], + ["operator", "=>"], + + ["operator", "?"], + ["operator", "??"], + + ["operator", "..."], + ["operator", "->"] +] + +---------------------------------------------------- + +Checks for all operators. diff --git a/tests/languages/vala/punctuation_feature.test b/tests/languages/vala/punctuation_feature.test new file mode 100644 index 0000000000..4772f37dd1 --- /dev/null +++ b/tests/languages/vala/punctuation_feature.test @@ -0,0 +1,22 @@ +. , ; : +[ ] { } ( ) + +---------------------------------------------------- + +[ + ["punctuation", "."], + ["punctuation", ","], + ["punctuation", ";"], + ["punctuation", ":"], + + ["punctuation", "["], + ["punctuation", "]"], + ["punctuation", "{"], + ["punctuation", "}"], + ["punctuation", "("], + ["punctuation", ")"] +] + +---------------------------------------------------- + +Checks for punctuation. diff --git a/tests/languages/vala/string_feature.test b/tests/languages/vala/string_feature.test new file mode 100644 index 0000000000..cda10f8fd9 --- /dev/null +++ b/tests/languages/vala/string_feature.test @@ -0,0 +1,64 @@ +"" +"fo\"o" + +"""Multi line +string""" + +@"foo $bar" +@"foo $(bar)" + +'a' +'\'' +'\\' + +---------------------------------------------------- + +[ + ["string", "\"\""], + ["string", "\"fo\\\"o\""], + + ["raw-string", "\"\"\"Multi line\r\nstring\"\"\""], + ["template-string", + [ + ["string", "@\"foo "], + [ + "interpolation", + [ + [ + "delimiter", "$" + ], + "bar" + ] + ], + ["string", "\""] + ] + ], + ["template-string", + [ + ["string", "@\"foo "], + [ + "interpolation", + [ + [ + "delimiter", + "$(" + ], + "bar", + [ + "delimiter", + ")" + ] + ] + ], + ["string", "\""] + ] + ], + ["string", "'a'"], + ["string", "'\\''"], + ["string", "'\\\\'"] +] + +---------------------------------------------------- + +Checks for normal and verbatim strings. +Also checks for single quoted characters. \ No newline at end of file From 4f6f3c7d49b497bd240b00e13357e63cad95f42b Mon Sep 17 00:00:00 2001 From: Valtteri Laitinen Date: Mon, 24 Dec 2018 17:28:06 +0200 Subject: [PATCH 0126/1100] Allow multiline CSS at-rules (#1676) Allows for CSS at-rules containing line breaks. --- components/prism-css.js | 2 +- components/prism-css.min.js | 2 +- prism.js | 2 +- tests/languages/css/atrule_feature.test | 28 ++++++++++++++++++++----- 4 files changed, 26 insertions(+), 8 deletions(-) diff --git a/components/prism-css.js b/components/prism-css.js index 284e010682..c19692070c 100644 --- a/components/prism-css.js +++ b/components/prism-css.js @@ -1,7 +1,7 @@ Prism.languages.css = { 'comment': /\/\*[\s\S]*?\*\//, 'atrule': { - pattern: /@[\w-]+?.*?(?:;|(?=\s*\{))/i, + pattern: /@[\w-]+?[\s\S]*?(?:;|(?=\s*\{))/i, inside: { 'rule': /@[\w-]+/ // See rest below diff --git a/components/prism-css.min.js b/components/prism-css.min.js index a4798c615f..8e569afdbd 100644 --- a/components/prism-css.min.js +++ b/components/prism-css.min.js @@ -1 +1 @@ -Prism.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:/@[\w-]+?.*?(?:;|(?=\s*\{))/i,inside:{rule:/@[\w-]+/}},url:/url\((?:(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1|.*?)\)/i,selector:/[^{}\s][^{};]*?(?=\s*\{)/,string:{pattern:/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},property:/[-_a-z\xA0-\uFFFF][-\w\xA0-\uFFFF]*(?=\s*:)/i,important:/!important\b/i,"function":/[-a-z0-9]+(?=\()/i,punctuation:/[(){};:,]/},Prism.languages.css.atrule.inside.rest=Prism.languages.css,Prism.languages.markup&&(Prism.languages.insertBefore("markup","tag",{style:{pattern:/()[\s\S]*?(?=<\/style>)/i,lookbehind:!0,inside:Prism.languages.css,alias:"language-css",greedy:!0}}),Prism.languages.insertBefore("inside","attr-value",{"style-attr":{pattern:/\s*style=("|')(?:\\[\s\S]|(?!\1)[^\\])*\1/i,inside:{"attr-name":{pattern:/^\s*style/i,inside:Prism.languages.markup.tag.inside},punctuation:/^\s*=\s*['"]|['"]\s*$/,"attr-value":{pattern:/.+/i,inside:Prism.languages.css}},alias:"language-css"}},Prism.languages.markup.tag)); \ No newline at end of file +Prism.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:/@[\w-]+?[\s\S]*?(?:;|(?=\s*\{))/i,inside:{rule:/@[\w-]+/}},url:/url\((?:(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1|.*?)\)/i,selector:/[^{}\s][^{};]*?(?=\s*\{)/,string:{pattern:/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},property:/[-_a-z\xA0-\uFFFF][-\w\xA0-\uFFFF]*(?=\s*:)/i,important:/!important\b/i,"function":/[-a-z0-9]+(?=\()/i,punctuation:/[(){};:,]/},Prism.languages.css.atrule.inside.rest=Prism.languages.css,Prism.languages.markup&&(Prism.languages.insertBefore("markup","tag",{style:{pattern:/()[\s\S]*?(?=<\/style>)/i,lookbehind:!0,inside:Prism.languages.css,alias:"language-css",greedy:!0}}),Prism.languages.insertBefore("inside","attr-value",{"style-attr":{pattern:/\s*style=("|')(?:\\[\s\S]|(?!\1)[^\\])*\1/i,inside:{"attr-name":{pattern:/^\s*style/i,inside:Prism.languages.markup.tag.inside},punctuation:/^\s*=\s*['"]|['"]\s*$/,"attr-value":{pattern:/.+/i,inside:Prism.languages.css}},alias:"language-css"}},Prism.languages.markup.tag)); \ No newline at end of file diff --git a/prism.js b/prism.js index 0acb158333..4f177d0532 100644 --- a/prism.js +++ b/prism.js @@ -622,7 +622,7 @@ Prism.languages.svg = Prism.languages.markup; Prism.languages.css = { 'comment': /\/\*[\s\S]*?\*\//, 'atrule': { - pattern: /@[\w-]+?.*?(?:;|(?=\s*\{))/i, + pattern: /@[\w-]+?[\s\S]*?(?:;|(?=\s*\{))/i, inside: { 'rule': /@[\w-]+/ // See rest below diff --git a/tests/languages/css/atrule_feature.test b/tests/languages/css/atrule_feature.test index abc75def35..1bc84b0d97 100644 --- a/tests/languages/css/atrule_feature.test +++ b/tests/languages/css/atrule_feature.test @@ -1,6 +1,8 @@ @import url(foo.css); @media print {} @media (min-width: 640px) and (min-height: 1000px) {} +@supports (top: 50vmax) + or (top: 50vw) {} @main-color: red; ---------------------------------------------------- @@ -26,13 +28,29 @@ ["punctuation", ")"], " and ", ["punctuation", "("], - ["property", "min-height"], - ["punctuation", ":"], - " 1000px", - ["punctuation", ")"] + ["property", "min-height"], + ["punctuation", ":"], + " 1000px", + ["punctuation", ")"] ]], ["punctuation", "{"], - ["punctuation", "}"], + ["punctuation", "}"], + ["atrule", [ + ["rule", "@supports"], + ["punctuation", "("], + ["property", "top"], + ["punctuation", ":"], + " 50vmax", + ["punctuation", ")"], + "\r\n\tor ", + ["punctuation", "("], + ["property", "top"], + ["punctuation", ":"], + " 50vw", + ["punctuation", ")"] + ]], + ["punctuation", "{"], + ["punctuation", "}"], ["atrule", [ ["rule", "@main-color"], ["punctuation", ":"], From c939df8ed8e2dd9fa3a79ba148ab855e9de5dfb4 Mon Sep 17 00:00:00 2001 From: "JeongHoon Byun (aka Outsider)" Date: Thu, 27 Dec 2018 20:56:24 +0900 Subject: [PATCH 0127/1100] Added support for HCL (#1594) Adds support for HCL ([HashiCorp configuration language](https://github.com/hashicorp/hcl)). --- components.js | 2 +- components.json | 4 + components/prism-hcl.js | 65 ++++++ components/prism-hcl.min.js | 1 + examples/prism-hcl.html | 42 ++++ plugins/show-language/prism-show-language.js | 2 +- .../show-language/prism-show-language.min.js | 2 +- tests/languages/hcl/comment_feature.test | 17 ++ .../languages/hcl/interpolation_feature.test | 206 ++++++++++++++++++ tests/languages/hcl/keyword_feature.test | 32 +++ tests/languages/hcl/number_feature.test | 21 ++ tests/languages/hcl/property_feature.test | 27 +++ tests/languages/hcl/string_feature.test | 41 ++++ 13 files changed, 459 insertions(+), 3 deletions(-) create mode 100644 components/prism-hcl.js create mode 100644 components/prism-hcl.min.js create mode 100644 examples/prism-hcl.html create mode 100644 tests/languages/hcl/comment_feature.test create mode 100644 tests/languages/hcl/interpolation_feature.test create mode 100644 tests/languages/hcl/keyword_feature.test create mode 100644 tests/languages/hcl/number_feature.test create mode 100644 tests/languages/hcl/property_feature.test create mode 100644 tests/languages/hcl/string_feature.test diff --git a/components.js b/components.js index 9ce77ef3e5..703bb97f0d 100644 --- a/components.js +++ b/components.js @@ -1,2 +1,2 @@ -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default","peerDependencies":"markup"},"clike":{"title":"C-like","option":"default","overrideExampleHeader":true},"javascript":{"title":"JavaScript","require":"clike","peerDependencies":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"actionscript":{"title":"ActionScript","require":"javascript","peerDependencies":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":"dotnet","owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","owner":"R-osey"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup","peerDependencies":["css","javascript"],"alias":"jinja2","owner":"romanvm"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","peerDependencies":["css","coffeescript","erb","javascript","less","markdown","ruby","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"http":{"title":"HTTP","peerDependencies":["javascript","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"json":{"title":"JSON","alias":"jsonp","aliasTitles":{"jsonp":"JSONP"},"owner":"CupOfTea696"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","owner":"japborst"},"less":{"title":"Less","require":"css","owner":"Golmote"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"n4js":{"title":"N4JS","require":"javascript","alias":"n4jsd","owner":"bsmith-n4"},"nasm":{"title":"NASM","owner":"rbmj"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"cpp","peerDependencies":["c","cpp"],"overrideExampleHeader":true,"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"php-extras":{"title":"PHP Extras","require":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":"javascript","peerDependencies":["coffeescript","ejs","handlebars","hogan","less","livescript","markdown","mustache","plates","scss","stylus","swig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","peerDependencies":["c","cpp","fortran","ats","dsp"],"owner":"Golmote"},"python":{"title":"Python","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"ruby":{"title":"Ruby","require":"clike","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sql":{"title":"SQL","owner":"multipetros"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","peerDependencies":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","alias":"ts","owner":"vkbansal"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","owner":"hason"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":"Line Highlight","line-numbers":{"title":"Line Numbers","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","after":["autolinker","data-uri-highlight"]},"autolinker":"Autolinker","wpd":"WebPlatform Docs","custom-class":{"title":"Custom Class","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","noCSS":true},"show-language":{"title":"Show Language","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","owner":"Golmote","noCSS":true},"previewers":{"title":"Previewers","owner":"Golmote"},"autoloader":{"title":"Autoloader","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","owner":"Golmote","after":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","owner":"chriswells0"},"unescaped-markup":"Unescaped Markup","normalize-whitespace":{"title":"Normalize Whitespace","owner":"zeitgeist87","after":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","owner":"mAAdhaTTah","require":"toolbar","noCSS":true}}}; +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default","peerDependencies":"markup"},"clike":{"title":"C-like","option":"default","overrideExampleHeader":true},"javascript":{"title":"JavaScript","require":"clike","peerDependencies":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"actionscript":{"title":"ActionScript","require":"javascript","peerDependencies":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":"dotnet","owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","owner":"R-osey"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup","peerDependencies":["css","javascript"],"alias":"jinja2","owner":"romanvm"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","peerDependencies":["css","coffeescript","erb","javascript","less","markdown","ruby","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"http":{"title":"HTTP","peerDependencies":["javascript","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"json":{"title":"JSON","alias":"jsonp","aliasTitles":{"jsonp":"JSONP"},"owner":"CupOfTea696"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","owner":"japborst"},"less":{"title":"Less","require":"css","owner":"Golmote"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"n4js":{"title":"N4JS","require":"javascript","alias":"n4jsd","owner":"bsmith-n4"},"nasm":{"title":"NASM","owner":"rbmj"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"cpp","peerDependencies":["c","cpp"],"overrideExampleHeader":true,"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"php-extras":{"title":"PHP Extras","require":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":"javascript","peerDependencies":["coffeescript","ejs","handlebars","hogan","less","livescript","markdown","mustache","plates","scss","stylus","swig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","peerDependencies":["c","cpp","fortran","ats","dsp"],"owner":"Golmote"},"python":{"title":"Python","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"ruby":{"title":"Ruby","require":"clike","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sql":{"title":"SQL","owner":"multipetros"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","peerDependencies":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","alias":"ts","owner":"vkbansal"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","owner":"hason"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":"Line Highlight","line-numbers":{"title":"Line Numbers","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","after":["autolinker","data-uri-highlight"]},"autolinker":"Autolinker","wpd":"WebPlatform Docs","custom-class":{"title":"Custom Class","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","noCSS":true},"show-language":{"title":"Show Language","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","owner":"Golmote","noCSS":true},"previewers":{"title":"Previewers","owner":"Golmote"},"autoloader":{"title":"Autoloader","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","owner":"Golmote","after":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","owner":"chriswells0"},"unescaped-markup":"Unescaped Markup","normalize-whitespace":{"title":"Normalize Whitespace","owner":"zeitgeist87","after":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","owner":"mAAdhaTTah","require":"toolbar","noCSS":true}}}; if (typeof module !== 'undefined' && module.exports) { module.exports = components; } \ No newline at end of file diff --git a/components.json b/components.json index d175c6abb6..12bfd2f351 100644 --- a/components.json +++ b/components.json @@ -337,6 +337,10 @@ "require": "clike", "owner": "Golmote" }, + "hcl": { + "title": "HCL", + "owner": "outsideris" + }, "http": { "title": "HTTP", "peerDependencies": [ diff --git a/components/prism-hcl.js b/components/prism-hcl.js new file mode 100644 index 0000000000..89e873ea22 --- /dev/null +++ b/components/prism-hcl.js @@ -0,0 +1,65 @@ +Prism.languages.hcl = { + 'comment': /(?:\/\/|#).*|\/\*[\s\S]*?(?:\*\/|$)/, + 'heredoc': { + pattern: /<<-?(\w+)[\s\S]*?^\s*\1/m, + greedy: true, + alias: 'string' + }, + 'keyword': [ + { + pattern: /(?:resource|data)\s+(?:"(?:\\[\s\S]|[^\\"])*")(?=\s+"[\w-]+"\s+{)/i, + inside: { + 'type': { + pattern: /(resource|data|\s+)(?:"(?:\\[\s\S]|[^\\"])*")/i, + lookbehind: true, + alias: 'variable' + } + } + }, + { + pattern: /(?:provider|provisioner|variable|output|module|backend)\s+(?:[\w-]+|"(?:\\[\s\S]|[^\\"])*")\s+(?={)/i, + inside: { + 'type': { + pattern: /(provider|provisioner|variable|output|module|backend)\s+(?:[\w-]+|"(?:\\[\s\S]|[^\\"])*")\s+/i, + lookbehind: true, + alias: 'variable' + } + } + }, + { + pattern: /[\w-]+(?=\s+{)/ + } + ], + 'property': [ + /[\w-\.]+(?=\s*=(?!=))/, + /"(?:\\[\s\S]|[^\\"])+"(?=\s*[:=])/, + ], + 'string': { + pattern: /"(?:[^\\$"]|\\[\s\S]|\$(?:(?=")|\$+|[^"${])|\$\{(?:[^{}"]|"(?:[^\\"]|\\[\s\S])*")*\})*"/, + greedy: true, + inside: { + 'interpolation': { + pattern: /(^|[^$])\$\{(?:[^{}"]|"(?:[^\\"]|\\[\s\S])*")*\}/, + lookbehind: true, + inside: { + 'type': { + pattern: /(\b(?:terraform|var|self|count|module|path|data|local)\b\.)[\w\*]+/i, + lookbehind: true, + alias: 'variable' + }, + 'keyword': /\b(?:terraform|var|self|count|module|path|data|local)\b/i, + 'function': /\w+(?=\()/, + 'string': { + pattern: /"(?:\\[\s\S]|[^\\"])*"/, + greedy: true, + }, + 'number': /\b0x[\da-f]+|\d+\.?\d*(?:e[+-]?\d+)?/i, + 'punctuation': /[!\$#%&'()*+,.\/;<=>@\[\\\]^`{|}~?:]/, + } + }, + } + }, + 'number': /\b0x[\da-f]+|\d+\.?\d*(?:e[+-]?\d+)?/i, + 'boolean': /\b(?:true|false)\b/i, + 'punctuation': /[=\[\]{}]/, +}; diff --git a/components/prism-hcl.min.js b/components/prism-hcl.min.js new file mode 100644 index 0000000000..0404dda514 --- /dev/null +++ b/components/prism-hcl.min.js @@ -0,0 +1 @@ +Prism.languages.hcl={comment:/(?:\/\/|#).*|\/\*[\s\S]*?(?:\*\/|$)/,heredoc:{pattern:/<<-?(\w+)[\s\S]*?^\s*\1/m,greedy:!0,alias:"string"},keyword:[{pattern:/(?:resource|data)\s+(?:"(?:\\[\s\S]|[^\\"])*")(?=\s+"[\w-]+"\s+{)/i,inside:{type:{pattern:/(resource|data|\s+)(?:"(?:\\[\s\S]|[^\\"])*")/i,lookbehind:!0,alias:"variable"}}},{pattern:/(?:provider|provisioner|variable|output|module|backend)\s+(?:[\w-]+|"(?:\\[\s\S]|[^\\"])*")\s+(?={)/i,inside:{type:{pattern:/(provider|provisioner|variable|output|module|backend)\s+(?:[\w-]+|"(?:\\[\s\S]|[^\\"])*")\s+/i,lookbehind:!0,alias:"variable"}}},{pattern:/[\w-]+(?=\s+{)/}],property:[/[\w-\.]+(?=\s*=(?!=))/,/"(?:\\[\s\S]|[^\\"])+"(?=\s*[:=])/],string:{pattern:/"(?:[^\\$"]|\\[\s\S]|\$(?:(?=")|\$+|[^"${])|\$\{(?:[^{}"]|"(?:[^\\"]|\\[\s\S])*")*\})*"/,greedy:!0,inside:{interpolation:{pattern:/(^|[^$])\$\{(?:[^{}"]|"(?:[^\\"]|\\[\s\S])*")*\}/,lookbehind:!0,inside:{type:{pattern:/(\b(?:terraform|var|self|count|module|path|data|local)\b\.)[\w\*]+/i,lookbehind:!0,alias:"variable"},keyword:/\b(?:terraform|var|self|count|module|path|data|local)\b/i,"function":/\w+(?=\()/,string:{pattern:/"(?:\\[\s\S]|[^\\"])*"/,greedy:!0},number:/\b0x[\da-f]+|\d+\.?\d*(?:e[+-]?\d+)?/i,punctuation:/[!\$#%&'()*+,.\/;<=>@\[\\\]^`{|}~?:]/}}}},number:/\b0x[\da-f]+|\d+\.?\d*(?:e[+-]?\d+)?/i,"boolean":/\b(?:true|false)\b/i,punctuation:/[=\[\]{}]/}; \ No newline at end of file diff --git a/examples/prism-hcl.html b/examples/prism-hcl.html new file mode 100644 index 0000000000..5b15134ba5 --- /dev/null +++ b/examples/prism-hcl.html @@ -0,0 +1,42 @@ +

      Comments

      +
      # Configure the AWS Provider
      +// Configure the AWS Provider
      +
      + +

      Resources

      +
      resource "aws_instance" "web" {
      +  ami           = "${data.aws_ami.ubuntu.id}"
      +  instance_type = "t2.micro"
      +
      +  tags {
      +    Name = "HelloWorld"
      +  }
      +}
      + +

      Provider

      +
      provider "aws" {
      +  access_key = "${var.aws_access_key}"
      +  secret_key = "${var.aws_secret_key}"
      +  region     = "us-east-1"
      +}
      + +

      Variables

      +
      variable "images" {
      +  type = "map"
      +
      +  default = {
      +    us-east-1 = "image-1234"
      +    us-west-2 = "image-4567"
      +  }
      +}
      + +

      Outputs

      +
      output "address" {
      +  value = "${aws_instance.db.public_dns}"
      +}
      + +

      Modules

      +
      module "consul" {
      +  source  = "hashicorp/consul/aws"
      +  servers = 5
      +}
      diff --git a/plugins/show-language/prism-show-language.js b/plugins/show-language/prism-show-language.js index 38675bb6b7..0261021a7f 100644 --- a/plugins/show-language/prism-show-language.js +++ b/plugins/show-language/prism-show-language.js @@ -11,7 +11,7 @@ if (!Prism.plugins.toolbar) { } // The languages map is built automatically with gulp -var Languages = /*languages_placeholder[*/{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","css":"CSS","clike":"C-like","javascript":"JavaScript","abap":"ABAP","actionscript":"ActionScript","apacheconf":"Apache Configuration","apl":"APL","applescript":"AppleScript","arff":"ARFF","asciidoc":"AsciiDoc","asm6502":"6502 Assembly","aspnet":"ASP.NET (C#)","autohotkey":"AutoHotkey","autoit":"AutoIt","shell":"Shell","basic":"BASIC","csharp":"C#","cpp":"C++","cil":"CIL","coffeescript":"CoffeeScript","csp":"Content-Security-Policy","css-extras":"CSS Extras","django":"Django/Jinja2","erb":"ERB","fsharp":"F#","gcode":"G-code","gedcom":"GEDCOM","glsl":"GLSL","gml":"GameMaker Language","graphql":"GraphQL","http":"HTTP","hpkp":"HTTP Public-Key-Pins","hsts":"HTTP Strict-Transport-Security","ichigojam":"IchigoJam","inform7":"Inform 7","javastacktrace":"Java stack trace","json":"JSON","jsonp":"JSONP","latex":"LaTeX","livescript":"LiveScript","lolcode":"LOLCODE","markup-templating":"Markup templating","matlab":"MATLAB","mel":"MEL","n4js":"N4JS","nasm":"NASM","nginx":"nginx","nsis":"NSIS","objectivec":"Objective-C","ocaml":"OCaml","opencl":"OpenCL","parigp":"PARI/GP","objectpascal":"Object Pascal","php":"PHP","php-extras":"PHP Extras","plsql":"PL/SQL","powershell":"PowerShell","properties":".properties","protobuf":"Protocol Buffers","q":"Q (kdb+ database)","jsx":"React JSX","tsx":"React TSX","renpy":"Ren'py","rest":"reST (reStructuredText)","sas":"SAS","sass":"Sass (Sass)","scss":"Sass (Scss)","sql":"SQL","soy":"Soy (Closure Template)","tap":"TAP","toml":"TOML","tt2":"Template Toolkit 2","typescript":"TypeScript","vbnet":"VB.Net","vhdl":"VHDL","vim":"vim","visual-basic":"Visual Basic","wasm":"WebAssembly","wiki":"Wiki markup","xeoracube":"XeoraCube","xojo":"Xojo (REALbasic)","xquery":"XQuery","yaml":"YAML"}/*]*/; +var Languages = /*languages_placeholder[*/{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","css":"CSS","clike":"C-like","javascript":"JavaScript","abap":"ABAP","actionscript":"ActionScript","apacheconf":"Apache Configuration","apl":"APL","applescript":"AppleScript","arff":"ARFF","asciidoc":"AsciiDoc","asm6502":"6502 Assembly","aspnet":"ASP.NET (C#)","autohotkey":"AutoHotkey","autoit":"AutoIt","shell":"Shell","basic":"BASIC","csharp":"C#","cpp":"C++","cil":"CIL","coffeescript":"CoffeeScript","csp":"Content-Security-Policy","css-extras":"CSS Extras","django":"Django/Jinja2","erb":"ERB","fsharp":"F#","gcode":"G-code","gedcom":"GEDCOM","glsl":"GLSL","gml":"GameMaker Language","graphql":"GraphQL","hcl":"HCL","http":"HTTP","hpkp":"HTTP Public-Key-Pins","hsts":"HTTP Strict-Transport-Security","ichigojam":"IchigoJam","inform7":"Inform 7","javastacktrace":"Java stack trace","json":"JSON","jsonp":"JSONP","latex":"LaTeX","livescript":"LiveScript","lolcode":"LOLCODE","markup-templating":"Markup templating","matlab":"MATLAB","mel":"MEL","n4js":"N4JS","nasm":"NASM","nginx":"nginx","nsis":"NSIS","objectivec":"Objective-C","ocaml":"OCaml","opencl":"OpenCL","parigp":"PARI/GP","objectpascal":"Object Pascal","php":"PHP","php-extras":"PHP Extras","plsql":"PL/SQL","powershell":"PowerShell","properties":".properties","protobuf":"Protocol Buffers","q":"Q (kdb+ database)","jsx":"React JSX","tsx":"React TSX","renpy":"Ren'py","rest":"reST (reStructuredText)","sas":"SAS","sass":"Sass (Sass)","scss":"Sass (Scss)","sql":"SQL","soy":"Soy (Closure Template)","tap":"TAP","toml":"TOML","tt2":"Template Toolkit 2","typescript":"TypeScript","vbnet":"VB.Net","vhdl":"VHDL","vim":"vim","visual-basic":"Visual Basic","wasm":"WebAssembly","wiki":"Wiki markup","xeoracube":"XeoraCube","xojo":"Xojo (REALbasic)","xquery":"XQuery","yaml":"YAML"}/*]*/; Prism.plugins.toolbar.registerButton('show-language', function(env) { var pre = env.element.parentNode; if (!pre || !/pre/i.test(pre.nodeName)) { diff --git a/plugins/show-language/prism-show-language.min.js b/plugins/show-language/prism-show-language.min.js index 7f4dd60fbf..fa96e7c5f5 100644 --- a/plugins/show-language/prism-show-language.min.js +++ b/plugins/show-language/prism-show-language.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof self&&self.Prism&&self.document){if(!Prism.plugins.toolbar)return console.warn("Show Languages plugin loaded before Toolbar plugin."),void 0;var e={html:"HTML",xml:"XML",svg:"SVG",mathml:"MathML",css:"CSS",clike:"C-like",javascript:"JavaScript",abap:"ABAP",actionscript:"ActionScript",apacheconf:"Apache Configuration",apl:"APL",applescript:"AppleScript",arff:"ARFF",asciidoc:"AsciiDoc",asm6502:"6502 Assembly",aspnet:"ASP.NET (C#)",autohotkey:"AutoHotkey",autoit:"AutoIt",shell:"Shell",basic:"BASIC",csharp:"C#",cpp:"C++",cil:"CIL",coffeescript:"CoffeeScript",csp:"Content-Security-Policy","css-extras":"CSS Extras",django:"Django/Jinja2",erb:"ERB",fsharp:"F#",gcode:"G-code",gedcom:"GEDCOM",glsl:"GLSL",gml:"GameMaker Language",graphql:"GraphQL",http:"HTTP",hpkp:"HTTP Public-Key-Pins",hsts:"HTTP Strict-Transport-Security",ichigojam:"IchigoJam",inform7:"Inform 7",javastacktrace:"Java stack trace",json:"JSON",jsonp:"JSONP",latex:"LaTeX",livescript:"LiveScript",lolcode:"LOLCODE","markup-templating":"Markup templating",matlab:"MATLAB",mel:"MEL",n4js:"N4JS",nasm:"NASM",nginx:"nginx",nsis:"NSIS",objectivec:"Objective-C",ocaml:"OCaml",opencl:"OpenCL",parigp:"PARI/GP",objectpascal:"Object Pascal",php:"PHP","php-extras":"PHP Extras",plsql:"PL/SQL",powershell:"PowerShell",properties:".properties",protobuf:"Protocol Buffers",q:"Q (kdb+ database)",jsx:"React JSX",tsx:"React TSX",renpy:"Ren'py",rest:"reST (reStructuredText)",sas:"SAS",sass:"Sass (Sass)",scss:"Sass (Scss)",sql:"SQL",soy:"Soy (Closure Template)",tap:"TAP",toml:"TOML",tt2:"Template Toolkit 2",typescript:"TypeScript",vbnet:"VB.Net",vhdl:"VHDL",vim:"vim","visual-basic":"Visual Basic",wasm:"WebAssembly",wiki:"Wiki markup",xeoracube:"XeoraCube",xojo:"Xojo (REALbasic)",xquery:"XQuery",yaml:"YAML"};Prism.plugins.toolbar.registerButton("show-language",function(a){var t=a.element.parentNode;if(t&&/pre/i.test(t.nodeName)){var s=t.getAttribute("data-language")||e[a.language]||a.language&&a.language.substring(0,1).toUpperCase()+a.language.substring(1);if(s){var r=document.createElement("span");return r.textContent=s,r}}})}}(); \ No newline at end of file +!function(){if("undefined"!=typeof self&&self.Prism&&self.document){if(!Prism.plugins.toolbar)return console.warn("Show Languages plugin loaded before Toolbar plugin."),void 0;var e={html:"HTML",xml:"XML",svg:"SVG",mathml:"MathML",css:"CSS",clike:"C-like",javascript:"JavaScript",abap:"ABAP",actionscript:"ActionScript",apacheconf:"Apache Configuration",apl:"APL",applescript:"AppleScript",arff:"ARFF",asciidoc:"AsciiDoc",asm6502:"6502 Assembly",aspnet:"ASP.NET (C#)",autohotkey:"AutoHotkey",autoit:"AutoIt",shell:"Shell",basic:"BASIC",csharp:"C#",cpp:"C++",cil:"CIL",coffeescript:"CoffeeScript",csp:"Content-Security-Policy","css-extras":"CSS Extras",django:"Django/Jinja2",erb:"ERB",fsharp:"F#",gcode:"G-code",gedcom:"GEDCOM",glsl:"GLSL",gml:"GameMaker Language",graphql:"GraphQL",hcl:"HCL",http:"HTTP",hpkp:"HTTP Public-Key-Pins",hsts:"HTTP Strict-Transport-Security",ichigojam:"IchigoJam",inform7:"Inform 7",javastacktrace:"Java stack trace",json:"JSON",jsonp:"JSONP",latex:"LaTeX",livescript:"LiveScript",lolcode:"LOLCODE","markup-templating":"Markup templating",matlab:"MATLAB",mel:"MEL",n4js:"N4JS",nasm:"NASM",nginx:"nginx",nsis:"NSIS",objectivec:"Objective-C",ocaml:"OCaml",opencl:"OpenCL",parigp:"PARI/GP",objectpascal:"Object Pascal",php:"PHP","php-extras":"PHP Extras",plsql:"PL/SQL",powershell:"PowerShell",properties:".properties",protobuf:"Protocol Buffers",q:"Q (kdb+ database)",jsx:"React JSX",tsx:"React TSX",renpy:"Ren'py",rest:"reST (reStructuredText)",sas:"SAS",sass:"Sass (Sass)",scss:"Sass (Scss)",sql:"SQL",soy:"Soy (Closure Template)",tap:"TAP",toml:"TOML",tt2:"Template Toolkit 2",typescript:"TypeScript",vbnet:"VB.Net",vhdl:"VHDL",vim:"vim","visual-basic":"Visual Basic",wasm:"WebAssembly",wiki:"Wiki markup",xeoracube:"XeoraCube",xojo:"Xojo (REALbasic)",xquery:"XQuery",yaml:"YAML"};Prism.plugins.toolbar.registerButton("show-language",function(a){var t=a.element.parentNode;if(t&&/pre/i.test(t.nodeName)){var s=t.getAttribute("data-language")||e[a.language]||a.language&&a.language.substring(0,1).toUpperCase()+a.language.substring(1);if(s){var r=document.createElement("span");return r.textContent=s,r}}})}}(); \ No newline at end of file diff --git a/tests/languages/hcl/comment_feature.test b/tests/languages/hcl/comment_feature.test new file mode 100644 index 0000000000..16d790d7c9 --- /dev/null +++ b/tests/languages/hcl/comment_feature.test @@ -0,0 +1,17 @@ +# foo bar +// foo bar +/* + * multi line + */ + +---------------------------------------------------- + +[ + ["comment", "# foo bar"], + ["comment", "// foo bar"], + ["comment", "/*\r\n * multi line\r\n */"] +] + +---------------------------------------------------- + +Checks for comments. \ No newline at end of file diff --git a/tests/languages/hcl/interpolation_feature.test b/tests/languages/hcl/interpolation_feature.test new file mode 100644 index 0000000000..fc2b9b79f6 --- /dev/null +++ b/tests/languages/hcl/interpolation_feature.test @@ -0,0 +1,206 @@ +"${data.aws_availability_zones.available.names[0]}" +"${aws_db_subnet_group.default.id}" +"${var.something ? 1 : 0}" +"${var.num ? 1.02 : 0}" +"${length(var.hostnames)}" +"${format("web-%03d", count.index + 1)}" +"${file("templates/web_init.tpl")}" +"${replace(var.sub_domain, ".", "\\\\\\\\.")}" +"${filepath.foo}" + +---------------------------------------------------- + +[ + ["string", + [ + "\"", + [ + "interpolation", + [ + ["punctuation", "$"], + ["punctuation", "{"], + ["keyword", "data"], + ["punctuation", "."], + ["type", "aws_availability_zones"], + ["punctuation", "."], + "available", + ["punctuation", "."], + "names", + ["punctuation", "["], + ["number", "0"], + ["punctuation", "]"], + ["punctuation", "}"] + ] + ], + "\"" + ] + ], + ["string", + [ + "\"", + [ + "interpolation", + [ + ["punctuation", "$"], + ["punctuation", "{"], + "aws_db_subnet_group", + ["punctuation", "."], + "default", + ["punctuation", "."], + "id", + ["punctuation", "}"] + ] + ], + "\"" + ] + ], + ["string", + [ + "\"", + [ + "interpolation", + [ + ["punctuation", "$"], + ["punctuation", "{"], + ["keyword", "var"], + ["punctuation", "."], + ["type", "something"], + ["punctuation", "?"], + ["number", "1"], + ["punctuation", ":"], + ["number", "0"], + ["punctuation", "}"] + ] + ], + "\"" + ] + ], + ["string", + [ + "\"", + [ + "interpolation", + [ + ["punctuation", "$"], + ["punctuation", "{"], + ["keyword", "var"], + ["punctuation", "."], + ["type", "num"], + ["punctuation", "?"], + ["number", "1.02"], + ["punctuation", ":"], + ["number", "0"], + ["punctuation", "}"] + ] + ], + "\"" + ] + ], + ["string", + [ + "\"", + [ + "interpolation", + [ + ["punctuation", "$"], + ["punctuation", "{"], + ["function", "length"], + ["punctuation", "("], + ["keyword", "var"], + ["punctuation", "."], + ["type", "hostnames"], + ["punctuation", ")"], + ["punctuation", "}"] + ] + ], + "\"" + ] + ], + ["string", + [ + "\"", + [ + "interpolation", + [ + ["punctuation", "$"], + ["punctuation", "{"], + ["function", "format"], + ["punctuation", "("], + ["string", "\"web-%03d\""], + ["punctuation", ","], + ["keyword", "count"], + ["punctuation", "."], + ["type", "index"], + ["punctuation", "+"], + ["number", "1"], + ["punctuation", ")"], + ["punctuation", "}"] + ] + ], + "\"" + ] + ], + ["string", + [ + "\"", + [ + "interpolation", + [ + ["punctuation", "$"], + ["punctuation", "{"], + ["function", "file"], + ["punctuation", "("], + ["string", "\"templates/web_init.tpl\""], + ["punctuation", ")"], + ["punctuation", "}"] + ] + ], + "\"" + ] + ], + ["string", + [ + "\"", + [ + "interpolation", + [ + ["punctuation", "$"], + ["punctuation", "{"], + ["function", "replace"], + ["punctuation", "("], + ["keyword", "var"], + ["punctuation", "."], + ["type", "sub_domain"], + ["punctuation", ","], + ["string", "\".\""], + ["punctuation", ","], + ["string", "\"\\\\\\\\\\\\\\\\.\""], + ["punctuation", ")"], + ["punctuation", "}"] + ] + ], + "\"" + ] + ], + ["string", + [ + "\"", + [ + "interpolation", + [ + ["punctuation", "$"], + ["punctuation", "{"], + "filepath", + ["punctuation", "."], + "foo", + ["punctuation", "}"] + ] + ], + "\"" + ] + ] +] + +---------------------------------------------------- + +Checks for all interpolation. \ No newline at end of file diff --git a/tests/languages/hcl/keyword_feature.test b/tests/languages/hcl/keyword_feature.test new file mode 100644 index 0000000000..11d083bd37 --- /dev/null +++ b/tests/languages/hcl/keyword_feature.test @@ -0,0 +1,32 @@ +resource "aws_db_instance" "main" { +data "terraform_remote_state" "main" { +output "dev_vpc_id" { +config { +terraform { + +---------------------------------------------------- + +[ + ["keyword", + ["resource ", + ["type", "\"aws_db_instance\""]]], + ["string", ["\"main\""]], + ["punctuation", "{"], + ["keyword", + ["data ", + ["type", "\"terraform_remote_state\""]]], + ["string", ["\"main\""]], + ["punctuation", "{"], + ["keyword", + ["output", + ["type", " \"dev_vpc_id\" "]]], + ["punctuation", "{"], + ["keyword", "config"], + ["punctuation", "{"], + ["keyword", "terraform"], + ["punctuation", "{"] +] + +---------------------------------------------------- + +Checks for all keywords. \ No newline at end of file diff --git a/tests/languages/hcl/number_feature.test b/tests/languages/hcl/number_feature.test new file mode 100644 index 0000000000..ef716f9458 --- /dev/null +++ b/tests/languages/hcl/number_feature.test @@ -0,0 +1,21 @@ +42 +1.02 +0x1a +027 +1e10 +3.1e4 + +---------------------------------------------------- + +[ + ["number", "42"], + ["number", "1.02"], + ["number", "0x1a"], + ["number", "027"], + ["number", "1e10"], + ["number", "3.1e4"] +] + +---------------------------------------------------- + +Checks for numbers. \ No newline at end of file diff --git a/tests/languages/hcl/property_feature.test b/tests/languages/hcl/property_feature.test new file mode 100644 index 0000000000..060bdb1a16 --- /dev/null +++ b/tests/languages/hcl/property_feature.test @@ -0,0 +1,27 @@ +foo = "bar" +c = 1e10 +FOO = "bar" +"bool" = [false] + +---------------------------------------------------- + +[ + ["property", "foo"], + ["punctuation", "="], + ["string", ["\"bar\""]], + ["property", "c"], + ["punctuation", "="], + ["number", "1e10"], + ["property", "FOO"], + ["punctuation", "="], + ["string", ["\"bar\""]], + ["property", "\"bool\""], + ["punctuation", "="], + ["punctuation", "["], + ["boolean", "false"], + ["punctuation", "]"] +] + +---------------------------------------------------- + +Checks for all properties. \ No newline at end of file diff --git a/tests/languages/hcl/string_feature.test b/tests/languages/hcl/string_feature.test new file mode 100644 index 0000000000..ed286d9023 --- /dev/null +++ b/tests/languages/hcl/string_feature.test @@ -0,0 +1,41 @@ +"double quoted\"' % string" +"abc // what now?" +multiline_literal = "hello + world" +foo = < Date: Tue, 1 Jan 2019 15:52:38 +0100 Subject: [PATCH 0128/1100] Added `adoc` alias for AsciiDoc (#1685) This adds the `adoc` alias for the AsciiDoc language. --- components.js | 2 +- components.json | 1 + components/prism-asciidoc.js | 4 +++- components/prism-asciidoc.min.js | 2 +- 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/components.js b/components.js index 703bb97f0d..283aba774d 100644 --- a/components.js +++ b/components.js @@ -1,2 +1,2 @@ -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default","peerDependencies":"markup"},"clike":{"title":"C-like","option":"default","overrideExampleHeader":true},"javascript":{"title":"JavaScript","require":"clike","peerDependencies":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"actionscript":{"title":"ActionScript","require":"javascript","peerDependencies":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":"dotnet","owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","owner":"R-osey"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup","peerDependencies":["css","javascript"],"alias":"jinja2","owner":"romanvm"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","peerDependencies":["css","coffeescript","erb","javascript","less","markdown","ruby","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"http":{"title":"HTTP","peerDependencies":["javascript","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"json":{"title":"JSON","alias":"jsonp","aliasTitles":{"jsonp":"JSONP"},"owner":"CupOfTea696"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","owner":"japborst"},"less":{"title":"Less","require":"css","owner":"Golmote"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"n4js":{"title":"N4JS","require":"javascript","alias":"n4jsd","owner":"bsmith-n4"},"nasm":{"title":"NASM","owner":"rbmj"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"cpp","peerDependencies":["c","cpp"],"overrideExampleHeader":true,"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"php-extras":{"title":"PHP Extras","require":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":"javascript","peerDependencies":["coffeescript","ejs","handlebars","hogan","less","livescript","markdown","mustache","plates","scss","stylus","swig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","peerDependencies":["c","cpp","fortran","ats","dsp"],"owner":"Golmote"},"python":{"title":"Python","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"ruby":{"title":"Ruby","require":"clike","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sql":{"title":"SQL","owner":"multipetros"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","peerDependencies":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","alias":"ts","owner":"vkbansal"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","owner":"hason"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":"Line Highlight","line-numbers":{"title":"Line Numbers","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","after":["autolinker","data-uri-highlight"]},"autolinker":"Autolinker","wpd":"WebPlatform Docs","custom-class":{"title":"Custom Class","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","noCSS":true},"show-language":{"title":"Show Language","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","owner":"Golmote","noCSS":true},"previewers":{"title":"Previewers","owner":"Golmote"},"autoloader":{"title":"Autoloader","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","owner":"Golmote","after":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","owner":"chriswells0"},"unescaped-markup":"Unescaped Markup","normalize-whitespace":{"title":"Normalize Whitespace","owner":"zeitgeist87","after":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","owner":"mAAdhaTTah","require":"toolbar","noCSS":true}}}; +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default","peerDependencies":"markup"},"clike":{"title":"C-like","option":"default","overrideExampleHeader":true},"javascript":{"title":"JavaScript","require":"clike","peerDependencies":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"actionscript":{"title":"ActionScript","require":"javascript","peerDependencies":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":"dotnet","owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","owner":"R-osey"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup","peerDependencies":["css","javascript"],"alias":"jinja2","owner":"romanvm"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","peerDependencies":["css","coffeescript","erb","javascript","less","markdown","ruby","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"http":{"title":"HTTP","peerDependencies":["javascript","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"json":{"title":"JSON","alias":"jsonp","aliasTitles":{"jsonp":"JSONP"},"owner":"CupOfTea696"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","owner":"japborst"},"less":{"title":"Less","require":"css","owner":"Golmote"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"n4js":{"title":"N4JS","require":"javascript","alias":"n4jsd","owner":"bsmith-n4"},"nasm":{"title":"NASM","owner":"rbmj"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"cpp","peerDependencies":["c","cpp"],"overrideExampleHeader":true,"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"php-extras":{"title":"PHP Extras","require":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":"javascript","peerDependencies":["coffeescript","ejs","handlebars","hogan","less","livescript","markdown","mustache","plates","scss","stylus","swig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","peerDependencies":["c","cpp","fortran","ats","dsp"],"owner":"Golmote"},"python":{"title":"Python","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"ruby":{"title":"Ruby","require":"clike","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sql":{"title":"SQL","owner":"multipetros"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","peerDependencies":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","alias":"ts","owner":"vkbansal"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","owner":"hason"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":"Line Highlight","line-numbers":{"title":"Line Numbers","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","after":["autolinker","data-uri-highlight"]},"autolinker":"Autolinker","wpd":"WebPlatform Docs","custom-class":{"title":"Custom Class","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","noCSS":true},"show-language":{"title":"Show Language","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","owner":"Golmote","noCSS":true},"previewers":{"title":"Previewers","owner":"Golmote"},"autoloader":{"title":"Autoloader","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","owner":"Golmote","after":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","owner":"chriswells0"},"unescaped-markup":"Unescaped Markup","normalize-whitespace":{"title":"Normalize Whitespace","owner":"zeitgeist87","after":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","owner":"mAAdhaTTah","require":"toolbar","noCSS":true}}}; if (typeof module !== 'undefined' && module.exports) { module.exports = components; } \ No newline at end of file diff --git a/components.json b/components.json index 12bfd2f351..29f56e959c 100644 --- a/components.json +++ b/components.json @@ -110,6 +110,7 @@ "owner": "Golmote" }, "asciidoc": { + "alias": "adoc", "title": "AsciiDoc", "owner": "Golmote" }, diff --git a/components/prism-asciidoc.js b/components/prism-asciidoc.js index ec4eddcc5a..c96f6b0238 100644 --- a/components/prism-asciidoc.js +++ b/components/prism-asciidoc.js @@ -268,4 +268,6 @@ env.attributes['title'] = env.content.replace(/&/, '&'); } }); -}(Prism)); \ No newline at end of file + + Prism.languages.adoc = Prism.languages.asciidoc; +}(Prism)); diff --git a/components/prism-asciidoc.min.js b/components/prism-asciidoc.min.js index 011d167dcb..f8fc7371ea 100644 --- a/components/prism-asciidoc.min.js +++ b/components/prism-asciidoc.min.js @@ -1 +1 @@ -!function(a){var i={pattern:/(^[ \t]*)\[(?!\[)(?:(["'$`])(?:(?!\2)[^\\]|\\.)*\2|\[(?:[^\]\\]|\\.)*\]|[^\]\\]|\\.)*\]/m,lookbehind:!0,inside:{quoted:{pattern:/([$`])(?:(?!\1)[^\\]|\\.)*\1/,inside:{punctuation:/^[$`]|[$`]$/}},interpreted:{pattern:/'(?:[^'\\]|\\.)*'/,inside:{punctuation:/^'|'$/}},string:/"(?:[^"\\]|\\.)*"/,variable:/\w+(?==)/,punctuation:/^\[|\]$|,/,operator:/=/,"attr-value":/(?!^\s+$).+/}};a.languages.asciidoc={"comment-block":{pattern:/^(\/{4,})(?:\r?\n|\r)(?:[\s\S]*(?:\r?\n|\r))??\1/m,alias:"comment"},table:{pattern:/^\|={3,}(?:(?:\r?\n|\r).*)*?(?:\r?\n|\r)\|={3,}$/m,inside:{specifiers:{pattern:/(?!\|)(?:(?:(?:\d+(?:\.\d+)?|\.\d+)[+*])?(?:[<^>](?:\.[<^>])?|\.[<^>])?[a-z]*)(?=\|)/,alias:"attr-value"},punctuation:{pattern:/(^|[^\\])[|!]=*/,lookbehind:!0}}},"passthrough-block":{pattern:/^(\+{4,})(?:\r?\n|\r)(?:[\s\S]*(?:\r?\n|\r))??\1$/m,inside:{punctuation:/^\++|\++$/}},"literal-block":{pattern:/^(-{4,}|\.{4,})(?:\r?\n|\r)(?:[\s\S]*(?:\r?\n|\r))??\1$/m,inside:{punctuation:/^(?:-+|\.+)|(?:-+|\.+)$/}},"other-block":{pattern:/^(--|\*{4,}|_{4,}|={4,})(?:\r?\n|\r)(?:[\s\S]*(?:\r?\n|\r))??\1$/m,inside:{punctuation:/^(?:-+|\*+|_+|=+)|(?:-+|\*+|_+|=+)$/}},"list-punctuation":{pattern:/(^[ \t]*)(?:-|\*{1,5}|\.{1,5}|(?:[a-z]|\d+)\.|[xvi]+\))(?= )/im,lookbehind:!0,alias:"punctuation"},"list-label":{pattern:/(^[ \t]*)[a-z\d].+(?::{2,4}|;;)(?=\s)/im,lookbehind:!0,alias:"symbol"},"indented-block":{pattern:/((\r?\n|\r)\2)([ \t]+)\S.*(?:(?:\r?\n|\r)\3.+)*(?=\2{2}|$)/,lookbehind:!0},comment:/^\/\/.*/m,title:{pattern:/^.+(?:\r?\n|\r)(?:={3,}|-{3,}|~{3,}|\^{3,}|\+{3,})$|^={1,5} +.+|^\.(?![\s.]).*/m,alias:"important",inside:{punctuation:/^(?:\.|=+)|(?:=+|-+|~+|\^+|\++)$/}},"attribute-entry":{pattern:/^:[^:\r\n]+:(?: .*?(?: \+(?:\r?\n|\r).*?)*)?$/m,alias:"tag"},attributes:i,hr:{pattern:/^'{3,}$/m,alias:"punctuation"},"page-break":{pattern:/^<{3,}$/m,alias:"punctuation"},admonition:{pattern:/^(?:TIP|NOTE|IMPORTANT|WARNING|CAUTION):/m,alias:"keyword"},callout:[{pattern:/(^[ \t]*)/m,lookbehind:!0,alias:"symbol"},{pattern:/<\d+>/,alias:"symbol"}],macro:{pattern:/\b[a-z\d][a-z\d-]*::?(?:(?:\S+)??\[(?:[^\]\\"]|(["'])(?:(?!\1)[^\\]|\\.)*\1|\\.)*\])/,inside:{"function":/^[a-z\d-]+(?=:)/,punctuation:/^::?/,attributes:{pattern:/(?:\[(?:[^\]\\"]|(["'])(?:(?!\1)[^\\]|\\.)*\1|\\.)*\])/,inside:i.inside}}},inline:{pattern:/(^|[^\\])(?:(?:\B\[(?:[^\]\\"]|(["'])(?:(?!\2)[^\\]|\\.)*\2|\\.)*\])?(?:\b_(?!\s)(?: _|[^_\\\r\n]|\\.)+(?:(?:\r?\n|\r)(?: _|[^_\\\r\n]|\\.)+)*_\b|\B``(?!\s).+?(?:(?:\r?\n|\r).+?)*''\B|\B`(?!\s)(?: ['`]|.)+?(?:(?:\r?\n|\r)(?: ['`]|.)+?)*['`]\B|\B(['*+#])(?!\s)(?: \3|(?!\3)[^\\\r\n]|\\.)+(?:(?:\r?\n|\r)(?: \3|(?!\3)[^\\\r\n]|\\.)+)*\3\B)|(?:\[(?:[^\]\\"]|(["'])(?:(?!\4)[^\\]|\\.)*\4|\\.)*\])?(?:(__|\*\*|\+\+\+?|##|\$\$|[~^]).+?(?:(?:\r?\n|\r).+?)*\5|\{[^}\r\n]+\}|\[\[\[?.+?(?:(?:\r?\n|\r).+?)*\]?\]\]|<<.+?(?:(?:\r?\n|\r).+?)*>>|\(\(\(?.+?(?:(?:\r?\n|\r).+?)*\)?\)\)))/m,lookbehind:!0,inside:{attributes:i,url:{pattern:/^(?:\[\[\[?.+?\]?\]\]|<<.+?>>)$/,inside:{punctuation:/^(?:\[\[\[?|<<)|(?:\]\]\]?|>>)$/}},"attribute-ref":{pattern:/^\{.+\}$/,inside:{variable:{pattern:/(^\{)[a-z\d,+_-]+/,lookbehind:!0},operator:/^[=?!#%@$]|!(?=[:}])/,punctuation:/^\{|\}$|::?/}},italic:{pattern:/^(['_])[\s\S]+\1$/,inside:{punctuation:/^(?:''?|__?)|(?:''?|__?)$/}},bold:{pattern:/^\*[\s\S]+\*$/,inside:{punctuation:/^\*\*?|\*\*?$/}},punctuation:/^(?:``?|\+{1,3}|##?|\$\$|[~^]|\(\(\(?)|(?:''?|\+{1,3}|##?|\$\$|[~^`]|\)?\)\))$/}},replacement:{pattern:/\((?:C|TM|R)\)/,alias:"builtin"},entity:/&#?[\da-z]{1,8};/i,"line-continuation":{pattern:/(^| )\+$/m,lookbehind:!0,alias:"punctuation"}},i.inside.interpreted.inside.rest={macro:a.languages.asciidoc.macro,inline:a.languages.asciidoc.inline,replacement:a.languages.asciidoc.replacement,entity:a.languages.asciidoc.entity},a.languages.asciidoc["passthrough-block"].inside.rest={macro:a.languages.asciidoc.macro},a.languages.asciidoc["literal-block"].inside.rest={callout:a.languages.asciidoc.callout},a.languages.asciidoc.table.inside.rest={"comment-block":a.languages.asciidoc["comment-block"],"passthrough-block":a.languages.asciidoc["passthrough-block"],"literal-block":a.languages.asciidoc["literal-block"],"other-block":a.languages.asciidoc["other-block"],"list-punctuation":a.languages.asciidoc["list-punctuation"],"indented-block":a.languages.asciidoc["indented-block"],comment:a.languages.asciidoc.comment,title:a.languages.asciidoc.title,"attribute-entry":a.languages.asciidoc["attribute-entry"],attributes:a.languages.asciidoc.attributes,hr:a.languages.asciidoc.hr,"page-break":a.languages.asciidoc["page-break"],admonition:a.languages.asciidoc.admonition,"list-label":a.languages.asciidoc["list-label"],callout:a.languages.asciidoc.callout,macro:a.languages.asciidoc.macro,inline:a.languages.asciidoc.inline,replacement:a.languages.asciidoc.replacement,entity:a.languages.asciidoc.entity,"line-continuation":a.languages.asciidoc["line-continuation"]},a.languages.asciidoc["other-block"].inside.rest={table:a.languages.asciidoc.table,"list-punctuation":a.languages.asciidoc["list-punctuation"],"indented-block":a.languages.asciidoc["indented-block"],comment:a.languages.asciidoc.comment,"attribute-entry":a.languages.asciidoc["attribute-entry"],attributes:a.languages.asciidoc.attributes,hr:a.languages.asciidoc.hr,"page-break":a.languages.asciidoc["page-break"],admonition:a.languages.asciidoc.admonition,"list-label":a.languages.asciidoc["list-label"],macro:a.languages.asciidoc.macro,inline:a.languages.asciidoc.inline,replacement:a.languages.asciidoc.replacement,entity:a.languages.asciidoc.entity,"line-continuation":a.languages.asciidoc["line-continuation"]},a.languages.asciidoc.title.inside.rest={macro:a.languages.asciidoc.macro,inline:a.languages.asciidoc.inline,replacement:a.languages.asciidoc.replacement,entity:a.languages.asciidoc.entity},a.hooks.add("wrap",function(a){"entity"===a.type&&(a.attributes.title=a.content.replace(/&/,"&"))})}(Prism); \ No newline at end of file +!function(a){var i={pattern:/(^[ \t]*)\[(?!\[)(?:(["'$`])(?:(?!\2)[^\\]|\\.)*\2|\[(?:[^\]\\]|\\.)*\]|[^\]\\]|\\.)*\]/m,lookbehind:!0,inside:{quoted:{pattern:/([$`])(?:(?!\1)[^\\]|\\.)*\1/,inside:{punctuation:/^[$`]|[$`]$/}},interpreted:{pattern:/'(?:[^'\\]|\\.)*'/,inside:{punctuation:/^'|'$/}},string:/"(?:[^"\\]|\\.)*"/,variable:/\w+(?==)/,punctuation:/^\[|\]$|,/,operator:/=/,"attr-value":/(?!^\s+$).+/}};a.languages.asciidoc={"comment-block":{pattern:/^(\/{4,})(?:\r?\n|\r)(?:[\s\S]*(?:\r?\n|\r))??\1/m,alias:"comment"},table:{pattern:/^\|={3,}(?:(?:\r?\n|\r).*)*?(?:\r?\n|\r)\|={3,}$/m,inside:{specifiers:{pattern:/(?!\|)(?:(?:(?:\d+(?:\.\d+)?|\.\d+)[+*])?(?:[<^>](?:\.[<^>])?|\.[<^>])?[a-z]*)(?=\|)/,alias:"attr-value"},punctuation:{pattern:/(^|[^\\])[|!]=*/,lookbehind:!0}}},"passthrough-block":{pattern:/^(\+{4,})(?:\r?\n|\r)(?:[\s\S]*(?:\r?\n|\r))??\1$/m,inside:{punctuation:/^\++|\++$/}},"literal-block":{pattern:/^(-{4,}|\.{4,})(?:\r?\n|\r)(?:[\s\S]*(?:\r?\n|\r))??\1$/m,inside:{punctuation:/^(?:-+|\.+)|(?:-+|\.+)$/}},"other-block":{pattern:/^(--|\*{4,}|_{4,}|={4,})(?:\r?\n|\r)(?:[\s\S]*(?:\r?\n|\r))??\1$/m,inside:{punctuation:/^(?:-+|\*+|_+|=+)|(?:-+|\*+|_+|=+)$/}},"list-punctuation":{pattern:/(^[ \t]*)(?:-|\*{1,5}|\.{1,5}|(?:[a-z]|\d+)\.|[xvi]+\))(?= )/im,lookbehind:!0,alias:"punctuation"},"list-label":{pattern:/(^[ \t]*)[a-z\d].+(?::{2,4}|;;)(?=\s)/im,lookbehind:!0,alias:"symbol"},"indented-block":{pattern:/((\r?\n|\r)\2)([ \t]+)\S.*(?:(?:\r?\n|\r)\3.+)*(?=\2{2}|$)/,lookbehind:!0},comment:/^\/\/.*/m,title:{pattern:/^.+(?:\r?\n|\r)(?:={3,}|-{3,}|~{3,}|\^{3,}|\+{3,})$|^={1,5} +.+|^\.(?![\s.]).*/m,alias:"important",inside:{punctuation:/^(?:\.|=+)|(?:=+|-+|~+|\^+|\++)$/}},"attribute-entry":{pattern:/^:[^:\r\n]+:(?: .*?(?: \+(?:\r?\n|\r).*?)*)?$/m,alias:"tag"},attributes:i,hr:{pattern:/^'{3,}$/m,alias:"punctuation"},"page-break":{pattern:/^<{3,}$/m,alias:"punctuation"},admonition:{pattern:/^(?:TIP|NOTE|IMPORTANT|WARNING|CAUTION):/m,alias:"keyword"},callout:[{pattern:/(^[ \t]*)/m,lookbehind:!0,alias:"symbol"},{pattern:/<\d+>/,alias:"symbol"}],macro:{pattern:/\b[a-z\d][a-z\d-]*::?(?:(?:\S+)??\[(?:[^\]\\"]|(["'])(?:(?!\1)[^\\]|\\.)*\1|\\.)*\])/,inside:{"function":/^[a-z\d-]+(?=:)/,punctuation:/^::?/,attributes:{pattern:/(?:\[(?:[^\]\\"]|(["'])(?:(?!\1)[^\\]|\\.)*\1|\\.)*\])/,inside:i.inside}}},inline:{pattern:/(^|[^\\])(?:(?:\B\[(?:[^\]\\"]|(["'])(?:(?!\2)[^\\]|\\.)*\2|\\.)*\])?(?:\b_(?!\s)(?: _|[^_\\\r\n]|\\.)+(?:(?:\r?\n|\r)(?: _|[^_\\\r\n]|\\.)+)*_\b|\B``(?!\s).+?(?:(?:\r?\n|\r).+?)*''\B|\B`(?!\s)(?: ['`]|.)+?(?:(?:\r?\n|\r)(?: ['`]|.)+?)*['`]\B|\B(['*+#])(?!\s)(?: \3|(?!\3)[^\\\r\n]|\\.)+(?:(?:\r?\n|\r)(?: \3|(?!\3)[^\\\r\n]|\\.)+)*\3\B)|(?:\[(?:[^\]\\"]|(["'])(?:(?!\4)[^\\]|\\.)*\4|\\.)*\])?(?:(__|\*\*|\+\+\+?|##|\$\$|[~^]).+?(?:(?:\r?\n|\r).+?)*\5|\{[^}\r\n]+\}|\[\[\[?.+?(?:(?:\r?\n|\r).+?)*\]?\]\]|<<.+?(?:(?:\r?\n|\r).+?)*>>|\(\(\(?.+?(?:(?:\r?\n|\r).+?)*\)?\)\)))/m,lookbehind:!0,inside:{attributes:i,url:{pattern:/^(?:\[\[\[?.+?\]?\]\]|<<.+?>>)$/,inside:{punctuation:/^(?:\[\[\[?|<<)|(?:\]\]\]?|>>)$/}},"attribute-ref":{pattern:/^\{.+\}$/,inside:{variable:{pattern:/(^\{)[a-z\d,+_-]+/,lookbehind:!0},operator:/^[=?!#%@$]|!(?=[:}])/,punctuation:/^\{|\}$|::?/}},italic:{pattern:/^(['_])[\s\S]+\1$/,inside:{punctuation:/^(?:''?|__?)|(?:''?|__?)$/}},bold:{pattern:/^\*[\s\S]+\*$/,inside:{punctuation:/^\*\*?|\*\*?$/}},punctuation:/^(?:``?|\+{1,3}|##?|\$\$|[~^]|\(\(\(?)|(?:''?|\+{1,3}|##?|\$\$|[~^`]|\)?\)\))$/}},replacement:{pattern:/\((?:C|TM|R)\)/,alias:"builtin"},entity:/&#?[\da-z]{1,8};/i,"line-continuation":{pattern:/(^| )\+$/m,lookbehind:!0,alias:"punctuation"}},i.inside.interpreted.inside.rest={macro:a.languages.asciidoc.macro,inline:a.languages.asciidoc.inline,replacement:a.languages.asciidoc.replacement,entity:a.languages.asciidoc.entity},a.languages.asciidoc["passthrough-block"].inside.rest={macro:a.languages.asciidoc.macro},a.languages.asciidoc["literal-block"].inside.rest={callout:a.languages.asciidoc.callout},a.languages.asciidoc.table.inside.rest={"comment-block":a.languages.asciidoc["comment-block"],"passthrough-block":a.languages.asciidoc["passthrough-block"],"literal-block":a.languages.asciidoc["literal-block"],"other-block":a.languages.asciidoc["other-block"],"list-punctuation":a.languages.asciidoc["list-punctuation"],"indented-block":a.languages.asciidoc["indented-block"],comment:a.languages.asciidoc.comment,title:a.languages.asciidoc.title,"attribute-entry":a.languages.asciidoc["attribute-entry"],attributes:a.languages.asciidoc.attributes,hr:a.languages.asciidoc.hr,"page-break":a.languages.asciidoc["page-break"],admonition:a.languages.asciidoc.admonition,"list-label":a.languages.asciidoc["list-label"],callout:a.languages.asciidoc.callout,macro:a.languages.asciidoc.macro,inline:a.languages.asciidoc.inline,replacement:a.languages.asciidoc.replacement,entity:a.languages.asciidoc.entity,"line-continuation":a.languages.asciidoc["line-continuation"]},a.languages.asciidoc["other-block"].inside.rest={table:a.languages.asciidoc.table,"list-punctuation":a.languages.asciidoc["list-punctuation"],"indented-block":a.languages.asciidoc["indented-block"],comment:a.languages.asciidoc.comment,"attribute-entry":a.languages.asciidoc["attribute-entry"],attributes:a.languages.asciidoc.attributes,hr:a.languages.asciidoc.hr,"page-break":a.languages.asciidoc["page-break"],admonition:a.languages.asciidoc.admonition,"list-label":a.languages.asciidoc["list-label"],macro:a.languages.asciidoc.macro,inline:a.languages.asciidoc.inline,replacement:a.languages.asciidoc.replacement,entity:a.languages.asciidoc.entity,"line-continuation":a.languages.asciidoc["line-continuation"]},a.languages.asciidoc.title.inside.rest={macro:a.languages.asciidoc.macro,inline:a.languages.asciidoc.inline,replacement:a.languages.asciidoc.replacement,entity:a.languages.asciidoc.entity},a.hooks.add("wrap",function(a){"entity"===a.type&&(a.attributes.title=a.content.replace(/&/,"&"))}),a.languages.adoc=a.languages.asciidoc}(Prism); \ No newline at end of file From f1026b4bf0d254d2d533c7d567336d2442c93c97 Mon Sep 17 00:00:00 2001 From: volado Date: Thu, 3 Jan 2019 01:41:36 +0300 Subject: [PATCH 0129/1100] Improve recognition of constants in PHP (#1688) The pattern for PHP constants now have to be a valid identifier and recognizes single-letter names. --- components/prism-php.js | 2 +- components/prism-php.min.js | 2 +- tests/languages/php/constant_feature.test | 4 ++++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/components/prism-php.js b/components/prism-php.js index 36899f16af..dc89d561c2 100644 --- a/components/prism-php.js +++ b/components/prism-php.js @@ -13,7 +13,7 @@ (function (Prism) { 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/, + 'constant': /\b[A-Z_][A-Z0-9_]*\b/, 'comment': { pattern: /(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/, lookbehind: true diff --git a/components/prism-php.min.js b/components/prism-php.min.js index 03260d4808..373c168f79 100644 --- a/components/prism-php.min.js +++ b/components/prism-php.min.js @@ -1 +1 @@ -!function(e){e.languages.php=e.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:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0}}),e.languages.insertBefore("php","string",{"shell-comment":{pattern:/(^|[^\\])#.*/,lookbehind:!0,alias:"comment"}}),e.languages.insertBefore("php","keyword",{delimiter:{pattern:/\?>|<\?(?:php|=)?/i,alias:"important"},variable:/\$+(?:\w+\b|(?={))/i,"package":{pattern:/(\\|namespace\s+|use\s+)[\w\\]+/,lookbehind:!0,inside:{punctuation:/\\/}}}),e.languages.insertBefore("php","operator",{property:{pattern:/(->)[\w]+/,lookbehind:!0}});var n={pattern:/{\$(?:{(?:{[^{}]+}|[^{}]+)}|[^{}])+}|(^|[^\\{])\$+(?:\w+(?:\[.+?]|->\w+)*)/,lookbehind:!0,inside:{rest:e.languages.php}};e.languages.insertBefore("php","string",{"nowdoc-string":{pattern:/<<<'([^']+)'(?:\r\n?|\n)(?:.*(?:\r\n?|\n))*?\1;/,greedy:!0,alias:"string",inside:{delimiter:{pattern:/^<<<'[^']+'|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<'?|[';]$/}}}},"heredoc-string":{pattern:/<<<(?:"([^"]+)"(?:\r\n?|\n)(?:.*(?:\r\n?|\n))*?\1;|([a-z_]\w*)(?:\r\n?|\n)(?:.*(?:\r\n?|\n))*?\2;)/i,greedy:!0,alias:"string",inside:{delimiter:{pattern:/^<<<(?:"[^"]+"|[a-z_]\w*)|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<"?|[";]$/}},interpolation:n}},"single-quoted-string":{pattern:/'(?:\\[\s\S]|[^\\'])*'/,greedy:!0,alias:"string"},"double-quoted-string":{pattern:/"(?:\\[\s\S]|[^\\"])*"/,greedy:!0,alias:"string",inside:{interpolation:n}}}),delete e.languages.php.string,e.hooks.add("before-tokenize",function(n){if(/(?:<\?php|<\?)/gi.test(n.code)){var t=/(?:<\?php|<\?)[\s\S]*?(?:\?>|$)/gi;e.languages["markup-templating"].buildPlaceholders(n,"php",t)}}),e.hooks.add("after-tokenize",function(n){e.languages["markup-templating"].tokenizePlaceholders(n,"php")})}(Prism); \ No newline at end of file +!function(e){e.languages.php=e.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-Z_][A-Z0-9_]*\b/,comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0}}),e.languages.insertBefore("php","string",{"shell-comment":{pattern:/(^|[^\\])#.*/,lookbehind:!0,alias:"comment"}}),e.languages.insertBefore("php","keyword",{delimiter:{pattern:/\?>|<\?(?:php|=)?/i,alias:"important"},variable:/\$+(?:\w+\b|(?={))/i,"package":{pattern:/(\\|namespace\s+|use\s+)[\w\\]+/,lookbehind:!0,inside:{punctuation:/\\/}}}),e.languages.insertBefore("php","operator",{property:{pattern:/(->)[\w]+/,lookbehind:!0}});var n={pattern:/{\$(?:{(?:{[^{}]+}|[^{}]+)}|[^{}])+}|(^|[^\\{])\$+(?:\w+(?:\[.+?]|->\w+)*)/,lookbehind:!0,inside:{rest:e.languages.php}};e.languages.insertBefore("php","string",{"nowdoc-string":{pattern:/<<<'([^']+)'(?:\r\n?|\n)(?:.*(?:\r\n?|\n))*?\1;/,greedy:!0,alias:"string",inside:{delimiter:{pattern:/^<<<'[^']+'|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<'?|[';]$/}}}},"heredoc-string":{pattern:/<<<(?:"([^"]+)"(?:\r\n?|\n)(?:.*(?:\r\n?|\n))*?\1;|([a-z_]\w*)(?:\r\n?|\n)(?:.*(?:\r\n?|\n))*?\2;)/i,greedy:!0,alias:"string",inside:{delimiter:{pattern:/^<<<(?:"[^"]+"|[a-z_]\w*)|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<"?|[";]$/}},interpolation:n}},"single-quoted-string":{pattern:/'(?:\\[\s\S]|[^\\'])*'/,greedy:!0,alias:"string"},"double-quoted-string":{pattern:/"(?:\\[\s\S]|[^\\"])*"/,greedy:!0,alias:"string",inside:{interpolation:n}}}),delete e.languages.php.string,e.hooks.add("before-tokenize",function(n){if(/(?:<\?php|<\?)/gi.test(n.code)){var t=/(?:<\?php|<\?)[\s\S]*?(?:\?>|$)/gi;e.languages["markup-templating"].buildPlaceholders(n,"php",t)}}),e.hooks.add("after-tokenize",function(n){e.languages["markup-templating"].tokenizePlaceholders(n,"php")})}(Prism); \ No newline at end of file diff --git a/tests/languages/php/constant_feature.test b/tests/languages/php/constant_feature.test index c1c533064a..0002dfd224 100644 --- a/tests/languages/php/constant_feature.test +++ b/tests/languages/php/constant_feature.test @@ -1,3 +1,5 @@ +_ +X AZ PRISM FOOBAR_42 @@ -5,6 +7,8 @@ FOOBAR_42 ---------------------------------------------------- [ + ["constant", "_"], + ["constant", "X"], ["constant", "AZ"], ["constant", "PRISM"], ["constant", "FOOBAR_42"] From 55fb0f8e2efbd71b61158664387c246fe9fc1c2e Mon Sep 17 00:00:00 2001 From: volado Date: Thu, 3 Jan 2019 17:22:02 +0300 Subject: [PATCH 0130/1100] Update PHP keywords (#1690) This removes PHP 4 specific keywords and adds new PHP keywords. Keywords previously classified as functions are now classified as keywords. --- components/prism-php.js | 2 +- components/prism-php.min.js | 2 +- tests/languages/php/keyword_feature.test | 181 ++++++++++++++++------- 3 files changed, 128 insertions(+), 57 deletions(-) diff --git a/components/prism-php.js b/components/prism-php.js index dc89d561c2..5011ff3c62 100644 --- a/components/prism-php.js +++ b/components/prism-php.js @@ -12,7 +12,7 @@ */ (function (Prism) { 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, + 'keyword': /\b(?:__halt_compiler|abstract|and|array|as|break|callable|case|catch|class|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|eval|exit|extends|final|finally|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|namespace|new|null|or|parent|print|private|protected|public|require|require_once|return|static|switch|throw|trait|try|unset|use|var|while|xor|yield)\b/i, 'constant': /\b[A-Z_][A-Z0-9_]*\b/, 'comment': { pattern: /(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/, diff --git a/components/prism-php.min.js b/components/prism-php.min.js index 373c168f79..bfc3293376 100644 --- a/components/prism-php.min.js +++ b/components/prism-php.min.js @@ -1 +1 @@ -!function(e){e.languages.php=e.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-Z_][A-Z0-9_]*\b/,comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0}}),e.languages.insertBefore("php","string",{"shell-comment":{pattern:/(^|[^\\])#.*/,lookbehind:!0,alias:"comment"}}),e.languages.insertBefore("php","keyword",{delimiter:{pattern:/\?>|<\?(?:php|=)?/i,alias:"important"},variable:/\$+(?:\w+\b|(?={))/i,"package":{pattern:/(\\|namespace\s+|use\s+)[\w\\]+/,lookbehind:!0,inside:{punctuation:/\\/}}}),e.languages.insertBefore("php","operator",{property:{pattern:/(->)[\w]+/,lookbehind:!0}});var n={pattern:/{\$(?:{(?:{[^{}]+}|[^{}]+)}|[^{}])+}|(^|[^\\{])\$+(?:\w+(?:\[.+?]|->\w+)*)/,lookbehind:!0,inside:{rest:e.languages.php}};e.languages.insertBefore("php","string",{"nowdoc-string":{pattern:/<<<'([^']+)'(?:\r\n?|\n)(?:.*(?:\r\n?|\n))*?\1;/,greedy:!0,alias:"string",inside:{delimiter:{pattern:/^<<<'[^']+'|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<'?|[';]$/}}}},"heredoc-string":{pattern:/<<<(?:"([^"]+)"(?:\r\n?|\n)(?:.*(?:\r\n?|\n))*?\1;|([a-z_]\w*)(?:\r\n?|\n)(?:.*(?:\r\n?|\n))*?\2;)/i,greedy:!0,alias:"string",inside:{delimiter:{pattern:/^<<<(?:"[^"]+"|[a-z_]\w*)|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<"?|[";]$/}},interpolation:n}},"single-quoted-string":{pattern:/'(?:\\[\s\S]|[^\\'])*'/,greedy:!0,alias:"string"},"double-quoted-string":{pattern:/"(?:\\[\s\S]|[^\\"])*"/,greedy:!0,alias:"string",inside:{interpolation:n}}}),delete e.languages.php.string,e.hooks.add("before-tokenize",function(n){if(/(?:<\?php|<\?)/gi.test(n.code)){var t=/(?:<\?php|<\?)[\s\S]*?(?:\?>|$)/gi;e.languages["markup-templating"].buildPlaceholders(n,"php",t)}}),e.hooks.add("after-tokenize",function(n){e.languages["markup-templating"].tokenizePlaceholders(n,"php")})}(Prism); \ No newline at end of file +!function(e){e.languages.php=e.languages.extend("clike",{keyword:/\b(?:__halt_compiler|abstract|and|array|as|break|callable|case|catch|class|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|eval|exit|extends|final|finally|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|namespace|new|null|or|parent|print|private|protected|public|require|require_once|return|static|switch|throw|trait|try|unset|use|var|while|xor|yield)\b/i,constant:/\b[A-Z_][A-Z0-9_]*\b/,comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0}}),e.languages.insertBefore("php","string",{"shell-comment":{pattern:/(^|[^\\])#.*/,lookbehind:!0,alias:"comment"}}),e.languages.insertBefore("php","keyword",{delimiter:{pattern:/\?>|<\?(?:php|=)?/i,alias:"important"},variable:/\$+(?:\w+\b|(?={))/i,"package":{pattern:/(\\|namespace\s+|use\s+)[\w\\]+/,lookbehind:!0,inside:{punctuation:/\\/}}}),e.languages.insertBefore("php","operator",{property:{pattern:/(->)[\w]+/,lookbehind:!0}});var n={pattern:/{\$(?:{(?:{[^{}]+}|[^{}]+)}|[^{}])+}|(^|[^\\{])\$+(?:\w+(?:\[.+?]|->\w+)*)/,lookbehind:!0,inside:{rest:e.languages.php}};e.languages.insertBefore("php","string",{"nowdoc-string":{pattern:/<<<'([^']+)'(?:\r\n?|\n)(?:.*(?:\r\n?|\n))*?\1;/,greedy:!0,alias:"string",inside:{delimiter:{pattern:/^<<<'[^']+'|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<'?|[';]$/}}}},"heredoc-string":{pattern:/<<<(?:"([^"]+)"(?:\r\n?|\n)(?:.*(?:\r\n?|\n))*?\1;|([a-z_]\w*)(?:\r\n?|\n)(?:.*(?:\r\n?|\n))*?\2;)/i,greedy:!0,alias:"string",inside:{delimiter:{pattern:/^<<<(?:"[^"]+"|[a-z_]\w*)|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<"?|[";]$/}},interpolation:n}},"single-quoted-string":{pattern:/'(?:\\[\s\S]|[^\\'])*'/,greedy:!0,alias:"string"},"double-quoted-string":{pattern:/"(?:\\[\s\S]|[^\\"])*"/,greedy:!0,alias:"string",inside:{interpolation:n}}}),delete e.languages.php.string,e.hooks.add("before-tokenize",function(n){if(/(?:<\?php|<\?)/gi.test(n.code)){var t=/(?:<\?php|<\?)[\s\S]*?(?:\?>|$)/gi;e.languages["markup-templating"].buildPlaceholders(n,"php",t)}}),e.hooks.add("after-tokenize",function(n){e.languages["markup-templating"].tokenizePlaceholders(n,"php")})}(Prism); \ No newline at end of file diff --git a/tests/languages/php/keyword_feature.test b/tests/languages/php/keyword_feature.test index 9505114c77..1a8f47d974 100644 --- a/tests/languages/php/keyword_feature.test +++ b/tests/languages/php/keyword_feature.test @@ -1,74 +1,145 @@ -and or xor array -as break case -cfunction +__halt_compiler +abstract +and +array +as +break +callable +case +catch class; -const continue -declare default -die do else -elseif enddeclare -endfor endforeach -endif endswitch +clone +const +continue +declare +default +die +do +echo +else +elseif +empty +enddeclare +endfor +endforeach +endif +endswitch endwhile +eval +exit extends; -for foreach function -include include_once -global if +final +finally +for +foreach +function +global +goto +if +implements; +include +include_once +instanceof; +insteadof +interface; +isset +list +namespace; new; +null +or +parent +print +private +protected +public +require +require_once return -static switch +static +switch +throw +trait; +try +unset 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 +var +while +xor +yield ---------------------------------------------------- [ - ["keyword", "and"], ["keyword", "or"], ["keyword", "xor"], ["keyword", "array"], - ["keyword", "as"], ["keyword", "break"], ["keyword", "case"], - ["keyword", "cfunction"], + ["keyword", "__halt_compiler"], + ["keyword", "abstract"], + ["keyword", "and"], + ["keyword", "array"], + ["keyword", "as"], + ["keyword", "break"], + ["keyword", "callable"], + ["keyword", "case"], + ["keyword", "catch"], ["keyword", "class"], ["punctuation", ";"], - ["keyword", "const"], ["keyword", "continue"], - ["keyword", "declare"], ["keyword", "default"], - ["keyword", "die"], ["keyword", "do"], ["keyword", "else"], - ["keyword", "elseif"], ["keyword", "enddeclare"], - ["keyword", "endfor"], ["keyword", "endforeach"], - ["keyword", "endif"], ["keyword", "endswitch"], + ["keyword", "clone"], + ["keyword", "const"], + ["keyword", "continue"], + ["keyword", "declare"], + ["keyword", "default"], + ["keyword", "die"], + ["keyword", "do"], + ["keyword", "echo"], + ["keyword", "else"], + ["keyword", "elseif"], + ["keyword", "empty"], + ["keyword", "enddeclare"], + ["keyword", "endfor"], + ["keyword", "endforeach"], + ["keyword", "endif"], + ["keyword", "endswitch"], ["keyword", "endwhile"], + ["keyword", "eval"], + ["keyword", "exit"], ["keyword", "extends"], ["punctuation", ";"], - ["keyword", "for"], ["keyword", "foreach"], ["keyword", "function"], - ["keyword", "include"], ["keyword", "include_once"], - ["keyword", "global"], ["keyword", "if"], + ["keyword", "final"], + ["keyword", "finally"], + ["keyword", "for"], + ["keyword", "foreach"], + ["keyword", "function"], + ["keyword", "global"], + ["keyword", "goto"], + ["keyword", "if"], + ["keyword", "implements"], ["punctuation", ";"], + ["keyword", "include"], + ["keyword", "include_once"], + ["keyword", "instanceof"], ["punctuation", ";"], + ["keyword", "insteadof"], + ["keyword", "interface"], ["punctuation", ";"], + ["keyword", "isset"], + ["keyword", "list"], + ["keyword", "namespace"], ["punctuation", ";"], ["keyword", "new"], ["punctuation", ";"], + ["keyword", "null"], + ["keyword", "or"], + ["keyword", "parent"], + ["keyword", "print"], + ["keyword", "private"], + ["keyword", "protected"], + ["keyword", "public"], + ["keyword", "require"], + ["keyword", "require_once"], ["keyword", "return"], - ["keyword", "static"], ["keyword", "switch"], + ["keyword", "static"], + ["keyword", "switch"], + ["keyword", "throw"], + ["keyword", "trait"], ["punctuation", ";"], + ["keyword", "try"], + ["keyword", "unset"], ["keyword", "use"], ["punctuation", ";"], - ["keyword", "require"], ["keyword", "require_once"], - ["keyword", "var"], ["keyword", "while"], ["keyword", "abstract"], - ["keyword", "interface"], ["punctuation", ";"], - ["keyword", "public"], - ["keyword", "implements"], ["punctuation", ";"], - ["keyword", "private"], - ["keyword", "protected"], ["keyword", "parent"], - ["keyword", "throw"], ["keyword", "null"], ["keyword", "echo"], - ["keyword", "print"], - ["keyword", "trait"], ["punctuation", ";"], - ["keyword", "namespace"], ["punctuation", ";"], - ["keyword", "final"], ["keyword", "yield"], ["keyword", "goto"], - ["keyword", "instanceof"], ["punctuation", ";"], - ["keyword", "finally"], - ["keyword", "try"], ["keyword", "catch"] + ["keyword", "var"], + ["keyword", "while"], + ["keyword", "xor"], + ["keyword", "yield"] ] ---------------------------------------------------- From efdd96c31515a8d7ea54d5176e2e235403d1b55f Mon Sep 17 00:00:00 2001 From: Lukas Oppermann Date: Thu, 3 Jan 2019 19:28:49 +0100 Subject: [PATCH 0131/1100] Updated website table of contents styles (#1681) The TOC will now be located at the bottom left and be more friendly to smaller screens. --- faq.html | 4 ++-- style.css | 14 ++++++++++---- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/faq.html b/faq.html index ae32cb68e1..8d5da68472 100644 --- a/faq.html +++ b/faq.html @@ -13,7 +13,7 @@ position: static; max-width: 900px; font-size: 100%; - opacity: 1; + color: black; } @@ -179,4 +179,4 @@

      How can I use different highlighting for tokens with the same name in differ - \ No newline at end of file + diff --git a/style.css b/style.css index 80a674edb9..64f79af69e 100644 --- a/style.css +++ b/style.css @@ -332,10 +332,15 @@ footer { #toc { position: fixed; - left: 1%; - max-width: calc(48% - 450px); + bottom: 15px; + max-width: calc(50% - 450px - 40px); font-size: 80%; - opacity: .3; + z-index: 999; + background: white; + color: rgba(0,0,0,.5); + padding: 0 10px 10px; + border-radius: 0 3px 3px 0; + box-sizing: border-box; } @media (max-width: 1200px) { @@ -345,11 +350,12 @@ footer { } #toc:hover { - opacity: 1; + color: rgba(0,0,0,1); } #toc h1 { font-size: 180%; + margin-top: .75rem; } #toc li { From 7def8f5c30fda006b17a6ebbebfd9f10677047d9 Mon Sep 17 00:00:00 2001 From: Toby Wilds <34216527+TMWilds@users.noreply.github.com> Date: Thu, 3 Jan 2019 23:52:27 +0000 Subject: [PATCH 0132/1100] Added N1QL language support (#1620) Adds support for[N1QL](https://www.couchbase.com/products/n1ql) for Couchbase. --- components.js | 2 +- components.json | 4 + components/prism-n1ql.js | 18 + components/prism-n1ql.min.js | 1 + examples/prism-n1ql.html | 33 ++ plugins/show-language/prism-show-language.js | 2 +- .../show-language/prism-show-language.min.js | 2 +- tests/languages/n1ql/boolean_feature.test | 14 + tests/languages/n1ql/comment_feature.test | 14 + tests/languages/n1ql/function_feature.test | 359 ++++++++++++++++++ tests/languages/n1ql/identifier_feature.test | 19 + tests/languages/n1ql/keyword_feature.test | 311 +++++++++++++++ tests/languages/n1ql/number_feature.test | 19 + tests/languages/n1ql/operator_feature.test | 56 +++ tests/languages/n1ql/parameter_feature.test | 13 + tests/languages/n1ql/string_feature.test | 27 ++ 16 files changed, 891 insertions(+), 3 deletions(-) create mode 100644 components/prism-n1ql.js create mode 100644 components/prism-n1ql.min.js create mode 100644 examples/prism-n1ql.html create mode 100644 tests/languages/n1ql/boolean_feature.test create mode 100644 tests/languages/n1ql/comment_feature.test create mode 100644 tests/languages/n1ql/function_feature.test create mode 100644 tests/languages/n1ql/identifier_feature.test create mode 100644 tests/languages/n1ql/keyword_feature.test create mode 100644 tests/languages/n1ql/number_feature.test create mode 100644 tests/languages/n1ql/operator_feature.test create mode 100644 tests/languages/n1ql/parameter_feature.test create mode 100644 tests/languages/n1ql/string_feature.test diff --git a/components.js b/components.js index 283aba774d..f21c7ef78d 100644 --- a/components.js +++ b/components.js @@ -1,2 +1,2 @@ -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default","peerDependencies":"markup"},"clike":{"title":"C-like","option":"default","overrideExampleHeader":true},"javascript":{"title":"JavaScript","require":"clike","peerDependencies":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"actionscript":{"title":"ActionScript","require":"javascript","peerDependencies":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":"dotnet","owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","owner":"R-osey"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup","peerDependencies":["css","javascript"],"alias":"jinja2","owner":"romanvm"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","peerDependencies":["css","coffeescript","erb","javascript","less","markdown","ruby","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"http":{"title":"HTTP","peerDependencies":["javascript","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"json":{"title":"JSON","alias":"jsonp","aliasTitles":{"jsonp":"JSONP"},"owner":"CupOfTea696"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","owner":"japborst"},"less":{"title":"Less","require":"css","owner":"Golmote"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"n4js":{"title":"N4JS","require":"javascript","alias":"n4jsd","owner":"bsmith-n4"},"nasm":{"title":"NASM","owner":"rbmj"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"cpp","peerDependencies":["c","cpp"],"overrideExampleHeader":true,"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"php-extras":{"title":"PHP Extras","require":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":"javascript","peerDependencies":["coffeescript","ejs","handlebars","hogan","less","livescript","markdown","mustache","plates","scss","stylus","swig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","peerDependencies":["c","cpp","fortran","ats","dsp"],"owner":"Golmote"},"python":{"title":"Python","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"ruby":{"title":"Ruby","require":"clike","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sql":{"title":"SQL","owner":"multipetros"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","peerDependencies":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","alias":"ts","owner":"vkbansal"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","owner":"hason"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":"Line Highlight","line-numbers":{"title":"Line Numbers","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","after":["autolinker","data-uri-highlight"]},"autolinker":"Autolinker","wpd":"WebPlatform Docs","custom-class":{"title":"Custom Class","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","noCSS":true},"show-language":{"title":"Show Language","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","owner":"Golmote","noCSS":true},"previewers":{"title":"Previewers","owner":"Golmote"},"autoloader":{"title":"Autoloader","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","owner":"Golmote","after":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","owner":"chriswells0"},"unescaped-markup":"Unescaped Markup","normalize-whitespace":{"title":"Normalize Whitespace","owner":"zeitgeist87","after":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","owner":"mAAdhaTTah","require":"toolbar","noCSS":true}}}; +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default","peerDependencies":"markup"},"clike":{"title":"C-like","option":"default","overrideExampleHeader":true},"javascript":{"title":"JavaScript","require":"clike","peerDependencies":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"actionscript":{"title":"ActionScript","require":"javascript","peerDependencies":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":"dotnet","owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","owner":"R-osey"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup","peerDependencies":["css","javascript"],"alias":"jinja2","owner":"romanvm"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","peerDependencies":["css","coffeescript","erb","javascript","less","markdown","ruby","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"http":{"title":"HTTP","peerDependencies":["javascript","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"json":{"title":"JSON","alias":"jsonp","aliasTitles":{"jsonp":"JSONP"},"owner":"CupOfTea696"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","owner":"japborst"},"less":{"title":"Less","require":"css","owner":"Golmote"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","alias":"n4jsd","owner":"bsmith-n4"},"nasm":{"title":"NASM","owner":"rbmj"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"cpp","peerDependencies":["c","cpp"],"overrideExampleHeader":true,"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"php-extras":{"title":"PHP Extras","require":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":"javascript","peerDependencies":["coffeescript","ejs","handlebars","hogan","less","livescript","markdown","mustache","plates","scss","stylus","swig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","peerDependencies":["c","cpp","fortran","ats","dsp"],"owner":"Golmote"},"python":{"title":"Python","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"ruby":{"title":"Ruby","require":"clike","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sql":{"title":"SQL","owner":"multipetros"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","peerDependencies":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","alias":"ts","owner":"vkbansal"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","owner":"hason"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":"Line Highlight","line-numbers":{"title":"Line Numbers","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","after":["autolinker","data-uri-highlight"]},"autolinker":"Autolinker","wpd":"WebPlatform Docs","custom-class":{"title":"Custom Class","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","noCSS":true},"show-language":{"title":"Show Language","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","owner":"Golmote","noCSS":true},"previewers":{"title":"Previewers","owner":"Golmote"},"autoloader":{"title":"Autoloader","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","owner":"Golmote","after":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","owner":"chriswells0"},"unescaped-markup":"Unescaped Markup","normalize-whitespace":{"title":"Normalize Whitespace","owner":"zeitgeist87","after":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","owner":"mAAdhaTTah","require":"toolbar","noCSS":true}}}; if (typeof module !== 'undefined' && module.exports) { module.exports = components; } \ No newline at end of file diff --git a/components.json b/components.json index 29f56e959c..62caa50a31 100644 --- a/components.json +++ b/components.json @@ -477,6 +477,10 @@ "title": "Monkey", "owner": "Golmote" }, + "n1ql": { + "title": "N1QL", + "owner": "TMWilds" + }, "n4js": { "title": "N4JS", "require": "javascript", diff --git a/components/prism-n1ql.js b/components/prism-n1ql.js new file mode 100644 index 0000000000..59bb8e425b --- /dev/null +++ b/components/prism-n1ql.js @@ -0,0 +1,18 @@ +Prism.languages.n1ql = { + 'comment': /\/\*[\s\S]*?(?:$|\*\/)/, + 'parameter': /\$[\w.]+/, + 'string': { + pattern: /(["'])(?:\\[\s\S]|(?!\1)[^\\]|\1\1)*\1/, + greedy: true, + }, + 'identifier': { + pattern: /`(?:\\[\s\S]|[^\\`]|``)*`/, + greedy: true, + }, + 'function': /\b(?:ABS|ACOS|ARRAY_AGG|ARRAY_APPEND|ARRAY_AVG|ARRAY_CONCAT|ARRAY_CONTAINS|ARRAY_COUNT|ARRAY_DISTINCT|ARRAY_FLATTEN|ARRAY_IFNULL|ARRAY_INSERT|ARRAY_INTERSECT|ARRAY_LENGTH|ARRAY_MAX|ARRAY_MIN|ARRAY_POSITION|ARRAY_PREPEND|ARRAY_PUT|ARRAY_RANGE|ARRAY_REMOVE|ARRAY_REPEAT|ARRAY_REPLACE|ARRAY_REVERSE|ARRAY_SORT|ARRAY_STAR|ARRAY_SUM|ARRAY_SYMDIFF|ARRAY_SYMDIFFN|ARRAY_UNION|ASIN|ATAN|ATAN2|AVG|BASE64|BASE64_DECODE|BASE64_ENCODE|BITAND|BITCLEAR|BITNOT|BITOR|BITSET|BITSHIFT|BITTEST|BITXOR|CEIL|CLOCK_LOCAL|CLOCK_MILLIS|CLOCK_STR|CLOCK_TZ|CLOCK_UTC|CONTAINS|CONTAINS_TOKEN|CONTAINS_TOKEN_LIKE|CONTAINS_TOKEN_REGEXP|COS|COUNT|CURL|DATE_ADD_MILLIS|DATE_ADD_STR|DATE_DIFF_MILLIS|DATE_DIFF_STR|DATE_FORMAT_STR|DATE_PART_MILLIS|DATE_PART_STR|DATE_RANGE_MILLIS|DATE_RANGE_STR|DATE_TRUNC_MILLIS|DATE_TRUNC_STR|DECODE_JSON|DEGREES|DURATION_TO_STR|E|ENCODED_SIZE|ENCODE_JSON|EXP|FLOOR|GREATEST|HAS_TOKEN|IFINF|IFMISSING|IFMISSINGORNULL|IFNAN|IFNANORINF|IFNULL|INITCAP|ISARRAY|ISATOM|ISBOOLEAN|ISNUMBER|ISOBJECT|ISSTRING|IsBitSET|LEAST|LENGTH|LN|LOG|LOWER|LTRIM|MAX|META|MILLIS|MILLIS_TO_LOCAL|MILLIS_TO_STR|MILLIS_TO_TZ|MILLIS_TO_UTC|MILLIS_TO_ZONE_NAME|MIN|MISSINGIF|NANIF|NEGINFIF|NOW_LOCAL|NOW_MILLIS|NOW_STR|NOW_TZ|NOW_UTC|NULLIF|OBJECT_ADD|OBJECT_CONCAT|OBJECT_INNER_PAIRS|OBJECT_INNER_VALUES|OBJECT_LENGTH|OBJECT_NAMES|OBJECT_PAIRS|OBJECT_PUT|OBJECT_REMOVE|OBJECT_RENAME|OBJECT_REPLACE|OBJECT_UNWRAP|OBJECT_VALUES|PAIRS|PI|POLY_LENGTH|POSINFIF|POSITION|POWER|RADIANS|RANDOM|REGEXP_CONTAINS|REGEXP_LIKE|REGEXP_POSITION|REGEXP_REPLACE|REPEAT|REPLACE|REVERSE|ROUND|RTRIM|SIGN|SIN|SPLIT|SQRT|STR_TO_DURATION|STR_TO_MILLIS|STR_TO_TZ|STR_TO_UTC|STR_TO_ZONE_NAME|SUBSTR|SUFFIXES|SUM|TAN|TITLE|TOARRAY|TOATOM|TOBOOLEAN|TOKENS|TOKENS|TONUMBER|TOOBJECT|TOSTRING|TRIM|TRUNC|TYPE|UPPER|WEEKDAY_MILLIS|WEEKDAY_STR)(?=\s*\()/i, + 'keyword': /\b(?:ALL|ALTER|ANALYZE|AS|ASC|BEGIN|BINARY|BOOLEAN|BREAK|BUCKET|BUILD|BY|CALL|CAST|CLUSTER|COLLATE|COLLECTION|COMMIT|CONNECT|CONTINUE|CORRELATE|COVER|CREATE|DATABASE|DATASET|DATASTORE|DECLARE|DECREMENT|DELETE|DERIVED|DESC|DESCRIBE|DISTINCT|DO|DROP|EACH|ELEMENT|EXCEPT|EXCLUDE|EXECUTE|EXPLAIN|FETCH|FLATTEN|FOR|FORCE|FROM|FUNCTION|GRANT|GROUP|GSI|HAVING|IF|IGNORE|ILIKE|INCLUDE|INCREMENT|INDEX|INFER|INLINE|INNER|INSERT|INTERSECT|INTO|IS|JOIN|KEY|KEYS|KEYSPACE|KNOWN|LAST|LEFT|LET|LETTING|LIMIT|LSM|MAP|MAPPING|MATCHED|MATERIALIZED|MERGE|MINUS|MISSING|NAMESPACE|NEST|NULL|NUMBER|OBJECT|OFFSET|ON|OPTION|ORDER|OUTER|OVER|PARSE|PARTITION|PASSWORD|PATH|POOL|PREPARE|PRIMARY|PRIVATE|PRIVILEGE|PROCEDURE|PUBLIC|RAW|REALM|REDUCE|RENAME|RETURN|RETURNING|REVOKE|RIGHT|ROLE|ROLLBACK|SATISFIES|SCHEMA|SELECT|SELF|SEMI|SET|SHOW|SOME|START|STATISTICS|STRING|SYSTEM|TO|TRANSACTION|TRIGGER|TRUNCATE|UNDER|UNION|UNIQUE|UNKNOWN|UNNEST|UNSET|UPDATE|UPSERT|USE|USER|USING|VALIDATE|VALUE|VALUES|VIA|VIEW|WHERE|WHILE|WITH|WORK|XOR)\b/i, + 'boolean': /\b(?:TRUE|FALSE)\b/i, + 'number': /(?:\b\d+\.|\B\.)\d+e[+\-]?\d+\b|\b\d+\.?\d*|\B\.\d+\b/i, + 'operator': /[-+*\/=%]|!=|==?|\|\||<[>=]?|>=?|\b(?:AND|ANY|ARRAY|BETWEEN|CASE|ELSE|END|EVERY|EXISTS|FIRST|IN|LIKE|NOT|OR|THEN|VALUED|WHEN|WITHIN)\b/i, + 'punctuation': /[;[\](),.{}:]/ +}; \ No newline at end of file diff --git a/components/prism-n1ql.min.js b/components/prism-n1ql.min.js new file mode 100644 index 0000000000..cfe751b738 --- /dev/null +++ b/components/prism-n1ql.min.js @@ -0,0 +1 @@ +Prism.languages.n1ql={comment:/\/\*[\s\S]*?(?:$|\*\/)/,parameter:/\$[\w.]+/,string:{pattern:/(["'])(?:\\[\s\S]|(?!\1)[^\\]|\1\1)*\1/,greedy:!0},identifier:{pattern:/`(?:\\[\s\S]|[^\\`]|``)*`/,greedy:!0},"function":/\b(?:ABS|ACOS|ARRAY_AGG|ARRAY_APPEND|ARRAY_AVG|ARRAY_CONCAT|ARRAY_CONTAINS|ARRAY_COUNT|ARRAY_DISTINCT|ARRAY_FLATTEN|ARRAY_IFNULL|ARRAY_INSERT|ARRAY_INTERSECT|ARRAY_LENGTH|ARRAY_MAX|ARRAY_MIN|ARRAY_POSITION|ARRAY_PREPEND|ARRAY_PUT|ARRAY_RANGE|ARRAY_REMOVE|ARRAY_REPEAT|ARRAY_REPLACE|ARRAY_REVERSE|ARRAY_SORT|ARRAY_STAR|ARRAY_SUM|ARRAY_SYMDIFF|ARRAY_SYMDIFFN|ARRAY_UNION|ASIN|ATAN|ATAN2|AVG|BASE64|BASE64_DECODE|BASE64_ENCODE|BITAND|BITCLEAR|BITNOT|BITOR|BITSET|BITSHIFT|BITTEST|BITXOR|CEIL|CLOCK_LOCAL|CLOCK_MILLIS|CLOCK_STR|CLOCK_TZ|CLOCK_UTC|CONTAINS|CONTAINS_TOKEN|CONTAINS_TOKEN_LIKE|CONTAINS_TOKEN_REGEXP|COS|COUNT|CURL|DATE_ADD_MILLIS|DATE_ADD_STR|DATE_DIFF_MILLIS|DATE_DIFF_STR|DATE_FORMAT_STR|DATE_PART_MILLIS|DATE_PART_STR|DATE_RANGE_MILLIS|DATE_RANGE_STR|DATE_TRUNC_MILLIS|DATE_TRUNC_STR|DECODE_JSON|DEGREES|DURATION_TO_STR|E|ENCODED_SIZE|ENCODE_JSON|EXP|FLOOR|GREATEST|HAS_TOKEN|IFINF|IFMISSING|IFMISSINGORNULL|IFNAN|IFNANORINF|IFNULL|INITCAP|ISARRAY|ISATOM|ISBOOLEAN|ISNUMBER|ISOBJECT|ISSTRING|IsBitSET|LEAST|LENGTH|LN|LOG|LOWER|LTRIM|MAX|META|MILLIS|MILLIS_TO_LOCAL|MILLIS_TO_STR|MILLIS_TO_TZ|MILLIS_TO_UTC|MILLIS_TO_ZONE_NAME|MIN|MISSINGIF|NANIF|NEGINFIF|NOW_LOCAL|NOW_MILLIS|NOW_STR|NOW_TZ|NOW_UTC|NULLIF|OBJECT_ADD|OBJECT_CONCAT|OBJECT_INNER_PAIRS|OBJECT_INNER_VALUES|OBJECT_LENGTH|OBJECT_NAMES|OBJECT_PAIRS|OBJECT_PUT|OBJECT_REMOVE|OBJECT_RENAME|OBJECT_REPLACE|OBJECT_UNWRAP|OBJECT_VALUES|PAIRS|PI|POLY_LENGTH|POSINFIF|POSITION|POWER|RADIANS|RANDOM|REGEXP_CONTAINS|REGEXP_LIKE|REGEXP_POSITION|REGEXP_REPLACE|REPEAT|REPLACE|REVERSE|ROUND|RTRIM|SIGN|SIN|SPLIT|SQRT|STR_TO_DURATION|STR_TO_MILLIS|STR_TO_TZ|STR_TO_UTC|STR_TO_ZONE_NAME|SUBSTR|SUFFIXES|SUM|TAN|TITLE|TOARRAY|TOATOM|TOBOOLEAN|TOKENS|TOKENS|TONUMBER|TOOBJECT|TOSTRING|TRIM|TRUNC|TYPE|UPPER|WEEKDAY_MILLIS|WEEKDAY_STR)(?=\s*\()/i,keyword:/\b(?:ALL|ALTER|ANALYZE|AS|ASC|BEGIN|BINARY|BOOLEAN|BREAK|BUCKET|BUILD|BY|CALL|CAST|CLUSTER|COLLATE|COLLECTION|COMMIT|CONNECT|CONTINUE|CORRELATE|COVER|CREATE|DATABASE|DATASET|DATASTORE|DECLARE|DECREMENT|DELETE|DERIVED|DESC|DESCRIBE|DISTINCT|DO|DROP|EACH|ELEMENT|EXCEPT|EXCLUDE|EXECUTE|EXPLAIN|FETCH|FLATTEN|FOR|FORCE|FROM|FUNCTION|GRANT|GROUP|GSI|HAVING|IF|IGNORE|ILIKE|INCLUDE|INCREMENT|INDEX|INFER|INLINE|INNER|INSERT|INTERSECT|INTO|IS|JOIN|KEY|KEYS|KEYSPACE|KNOWN|LAST|LEFT|LET|LETTING|LIMIT|LSM|MAP|MAPPING|MATCHED|MATERIALIZED|MERGE|MINUS|MISSING|NAMESPACE|NEST|NULL|NUMBER|OBJECT|OFFSET|ON|OPTION|ORDER|OUTER|OVER|PARSE|PARTITION|PASSWORD|PATH|POOL|PREPARE|PRIMARY|PRIVATE|PRIVILEGE|PROCEDURE|PUBLIC|RAW|REALM|REDUCE|RENAME|RETURN|RETURNING|REVOKE|RIGHT|ROLE|ROLLBACK|SATISFIES|SCHEMA|SELECT|SELF|SEMI|SET|SHOW|SOME|START|STATISTICS|STRING|SYSTEM|TO|TRANSACTION|TRIGGER|TRUNCATE|UNDER|UNION|UNIQUE|UNKNOWN|UNNEST|UNSET|UPDATE|UPSERT|USE|USER|USING|VALIDATE|VALUE|VALUES|VIA|VIEW|WHERE|WHILE|WITH|WORK|XOR)\b/i,"boolean":/\b(?:TRUE|FALSE)\b/i,number:/(?:\b\d+\.|\B\.)\d+e[+\-]?\d+\b|\b\d+\.?\d*|\B\.\d+\b/i,operator:/[-+*\/=%]|!=|==?|\|\||<[>=]?|>=?|\b(?:AND|ANY|ARRAY|BETWEEN|CASE|ELSE|END|EVERY|EXISTS|FIRST|IN|LIKE|NOT|OR|THEN|VALUED|WHEN|WITHIN)\b/i,punctuation:/[;[\](),.{}:]/}; \ No newline at end of file diff --git a/examples/prism-n1ql.html b/examples/prism-n1ql.html new file mode 100644 index 0000000000..1f5866e0e7 --- /dev/null +++ b/examples/prism-n1ql.html @@ -0,0 +1,33 @@ +

      Comments

      +
      # /* Multi-line
      +comment */
      + +

      Strings

      +
      "foo \"bar\" baz"
      +'foo \'bar\' baz'
      +"Multi-line strings
      +are supported"
      +'Multi-line strings
      +are supported'
      + +

      Parameters

      +
       $1 $2 $3 
      + +

      Operators

      +
      SELECT 1 AND 1;
      +SELECT 1 OR NULL;
      +SELECT EXISTS 1;
      +SELECT 2 BETWEEN 1 AND 3;
      + +

      Functions and keywords

      +
      SELECT COUNT(*) AS total, MAX(foo) AS max_foo
      +FROM `my_bucket`
      +WHERE `foo` IS NOT NULL;
      +CREATE INDEX productName_index1 ON bucket_name(productName, ProductID)
      +WHERE type="product" USING GSI
      +WITH {"nodes":["node1:8091", "node2:8091", "node3:8091"]};
      + +

      Identifiers

      +
      SELECT *
      +FROM `my_bucket`;
      +
      \ No newline at end of file diff --git a/plugins/show-language/prism-show-language.js b/plugins/show-language/prism-show-language.js index 0261021a7f..72e03f986b 100644 --- a/plugins/show-language/prism-show-language.js +++ b/plugins/show-language/prism-show-language.js @@ -11,7 +11,7 @@ if (!Prism.plugins.toolbar) { } // The languages map is built automatically with gulp -var Languages = /*languages_placeholder[*/{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","css":"CSS","clike":"C-like","javascript":"JavaScript","abap":"ABAP","actionscript":"ActionScript","apacheconf":"Apache Configuration","apl":"APL","applescript":"AppleScript","arff":"ARFF","asciidoc":"AsciiDoc","asm6502":"6502 Assembly","aspnet":"ASP.NET (C#)","autohotkey":"AutoHotkey","autoit":"AutoIt","shell":"Shell","basic":"BASIC","csharp":"C#","cpp":"C++","cil":"CIL","coffeescript":"CoffeeScript","csp":"Content-Security-Policy","css-extras":"CSS Extras","django":"Django/Jinja2","erb":"ERB","fsharp":"F#","gcode":"G-code","gedcom":"GEDCOM","glsl":"GLSL","gml":"GameMaker Language","graphql":"GraphQL","hcl":"HCL","http":"HTTP","hpkp":"HTTP Public-Key-Pins","hsts":"HTTP Strict-Transport-Security","ichigojam":"IchigoJam","inform7":"Inform 7","javastacktrace":"Java stack trace","json":"JSON","jsonp":"JSONP","latex":"LaTeX","livescript":"LiveScript","lolcode":"LOLCODE","markup-templating":"Markup templating","matlab":"MATLAB","mel":"MEL","n4js":"N4JS","nasm":"NASM","nginx":"nginx","nsis":"NSIS","objectivec":"Objective-C","ocaml":"OCaml","opencl":"OpenCL","parigp":"PARI/GP","objectpascal":"Object Pascal","php":"PHP","php-extras":"PHP Extras","plsql":"PL/SQL","powershell":"PowerShell","properties":".properties","protobuf":"Protocol Buffers","q":"Q (kdb+ database)","jsx":"React JSX","tsx":"React TSX","renpy":"Ren'py","rest":"reST (reStructuredText)","sas":"SAS","sass":"Sass (Sass)","scss":"Sass (Scss)","sql":"SQL","soy":"Soy (Closure Template)","tap":"TAP","toml":"TOML","tt2":"Template Toolkit 2","typescript":"TypeScript","vbnet":"VB.Net","vhdl":"VHDL","vim":"vim","visual-basic":"Visual Basic","wasm":"WebAssembly","wiki":"Wiki markup","xeoracube":"XeoraCube","xojo":"Xojo (REALbasic)","xquery":"XQuery","yaml":"YAML"}/*]*/; +var Languages = /*languages_placeholder[*/{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","css":"CSS","clike":"C-like","javascript":"JavaScript","abap":"ABAP","actionscript":"ActionScript","apacheconf":"Apache Configuration","apl":"APL","applescript":"AppleScript","arff":"ARFF","asciidoc":"AsciiDoc","asm6502":"6502 Assembly","aspnet":"ASP.NET (C#)","autohotkey":"AutoHotkey","autoit":"AutoIt","shell":"Shell","basic":"BASIC","csharp":"C#","cpp":"C++","cil":"CIL","coffeescript":"CoffeeScript","csp":"Content-Security-Policy","css-extras":"CSS Extras","django":"Django/Jinja2","erb":"ERB","fsharp":"F#","gcode":"G-code","gedcom":"GEDCOM","glsl":"GLSL","gml":"GameMaker Language","graphql":"GraphQL","hcl":"HCL","http":"HTTP","hpkp":"HTTP Public-Key-Pins","hsts":"HTTP Strict-Transport-Security","ichigojam":"IchigoJam","inform7":"Inform 7","javastacktrace":"Java stack trace","json":"JSON","jsonp":"JSONP","latex":"LaTeX","livescript":"LiveScript","lolcode":"LOLCODE","markup-templating":"Markup templating","matlab":"MATLAB","mel":"MEL","n1ql":"N1QL","n4js":"N4JS","nasm":"NASM","nginx":"nginx","nsis":"NSIS","objectivec":"Objective-C","ocaml":"OCaml","opencl":"OpenCL","parigp":"PARI/GP","objectpascal":"Object Pascal","php":"PHP","php-extras":"PHP Extras","plsql":"PL/SQL","powershell":"PowerShell","properties":".properties","protobuf":"Protocol Buffers","q":"Q (kdb+ database)","jsx":"React JSX","tsx":"React TSX","renpy":"Ren'py","rest":"reST (reStructuredText)","sas":"SAS","sass":"Sass (Sass)","scss":"Sass (Scss)","sql":"SQL","soy":"Soy (Closure Template)","tap":"TAP","toml":"TOML","tt2":"Template Toolkit 2","typescript":"TypeScript","vbnet":"VB.Net","vhdl":"VHDL","vim":"vim","visual-basic":"Visual Basic","wasm":"WebAssembly","wiki":"Wiki markup","xeoracube":"XeoraCube","xojo":"Xojo (REALbasic)","xquery":"XQuery","yaml":"YAML"}/*]*/; Prism.plugins.toolbar.registerButton('show-language', function(env) { var pre = env.element.parentNode; if (!pre || !/pre/i.test(pre.nodeName)) { diff --git a/plugins/show-language/prism-show-language.min.js b/plugins/show-language/prism-show-language.min.js index fa96e7c5f5..c997a658cf 100644 --- a/plugins/show-language/prism-show-language.min.js +++ b/plugins/show-language/prism-show-language.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof self&&self.Prism&&self.document){if(!Prism.plugins.toolbar)return console.warn("Show Languages plugin loaded before Toolbar plugin."),void 0;var e={html:"HTML",xml:"XML",svg:"SVG",mathml:"MathML",css:"CSS",clike:"C-like",javascript:"JavaScript",abap:"ABAP",actionscript:"ActionScript",apacheconf:"Apache Configuration",apl:"APL",applescript:"AppleScript",arff:"ARFF",asciidoc:"AsciiDoc",asm6502:"6502 Assembly",aspnet:"ASP.NET (C#)",autohotkey:"AutoHotkey",autoit:"AutoIt",shell:"Shell",basic:"BASIC",csharp:"C#",cpp:"C++",cil:"CIL",coffeescript:"CoffeeScript",csp:"Content-Security-Policy","css-extras":"CSS Extras",django:"Django/Jinja2",erb:"ERB",fsharp:"F#",gcode:"G-code",gedcom:"GEDCOM",glsl:"GLSL",gml:"GameMaker Language",graphql:"GraphQL",hcl:"HCL",http:"HTTP",hpkp:"HTTP Public-Key-Pins",hsts:"HTTP Strict-Transport-Security",ichigojam:"IchigoJam",inform7:"Inform 7",javastacktrace:"Java stack trace",json:"JSON",jsonp:"JSONP",latex:"LaTeX",livescript:"LiveScript",lolcode:"LOLCODE","markup-templating":"Markup templating",matlab:"MATLAB",mel:"MEL",n4js:"N4JS",nasm:"NASM",nginx:"nginx",nsis:"NSIS",objectivec:"Objective-C",ocaml:"OCaml",opencl:"OpenCL",parigp:"PARI/GP",objectpascal:"Object Pascal",php:"PHP","php-extras":"PHP Extras",plsql:"PL/SQL",powershell:"PowerShell",properties:".properties",protobuf:"Protocol Buffers",q:"Q (kdb+ database)",jsx:"React JSX",tsx:"React TSX",renpy:"Ren'py",rest:"reST (reStructuredText)",sas:"SAS",sass:"Sass (Sass)",scss:"Sass (Scss)",sql:"SQL",soy:"Soy (Closure Template)",tap:"TAP",toml:"TOML",tt2:"Template Toolkit 2",typescript:"TypeScript",vbnet:"VB.Net",vhdl:"VHDL",vim:"vim","visual-basic":"Visual Basic",wasm:"WebAssembly",wiki:"Wiki markup",xeoracube:"XeoraCube",xojo:"Xojo (REALbasic)",xquery:"XQuery",yaml:"YAML"};Prism.plugins.toolbar.registerButton("show-language",function(a){var t=a.element.parentNode;if(t&&/pre/i.test(t.nodeName)){var s=t.getAttribute("data-language")||e[a.language]||a.language&&a.language.substring(0,1).toUpperCase()+a.language.substring(1);if(s){var r=document.createElement("span");return r.textContent=s,r}}})}}(); \ No newline at end of file +!function(){if("undefined"!=typeof self&&self.Prism&&self.document){if(!Prism.plugins.toolbar)return console.warn("Show Languages plugin loaded before Toolbar plugin."),void 0;var e={html:"HTML",xml:"XML",svg:"SVG",mathml:"MathML",css:"CSS",clike:"C-like",javascript:"JavaScript",abap:"ABAP",actionscript:"ActionScript",apacheconf:"Apache Configuration",apl:"APL",applescript:"AppleScript",arff:"ARFF",asciidoc:"AsciiDoc",asm6502:"6502 Assembly",aspnet:"ASP.NET (C#)",autohotkey:"AutoHotkey",autoit:"AutoIt",shell:"Shell",basic:"BASIC",csharp:"C#",cpp:"C++",cil:"CIL",coffeescript:"CoffeeScript",csp:"Content-Security-Policy","css-extras":"CSS Extras",django:"Django/Jinja2",erb:"ERB",fsharp:"F#",gcode:"G-code",gedcom:"GEDCOM",glsl:"GLSL",gml:"GameMaker Language",graphql:"GraphQL",hcl:"HCL",http:"HTTP",hpkp:"HTTP Public-Key-Pins",hsts:"HTTP Strict-Transport-Security",ichigojam:"IchigoJam",inform7:"Inform 7",javastacktrace:"Java stack trace",json:"JSON",jsonp:"JSONP",latex:"LaTeX",livescript:"LiveScript",lolcode:"LOLCODE","markup-templating":"Markup templating",matlab:"MATLAB",mel:"MEL",n1ql:"N1QL",n4js:"N4JS",nasm:"NASM",nginx:"nginx",nsis:"NSIS",objectivec:"Objective-C",ocaml:"OCaml",opencl:"OpenCL",parigp:"PARI/GP",objectpascal:"Object Pascal",php:"PHP","php-extras":"PHP Extras",plsql:"PL/SQL",powershell:"PowerShell",properties:".properties",protobuf:"Protocol Buffers",q:"Q (kdb+ database)",jsx:"React JSX",tsx:"React TSX",renpy:"Ren'py",rest:"reST (reStructuredText)",sas:"SAS",sass:"Sass (Sass)",scss:"Sass (Scss)",sql:"SQL",soy:"Soy (Closure Template)",tap:"TAP",toml:"TOML",tt2:"Template Toolkit 2",typescript:"TypeScript",vbnet:"VB.Net",vhdl:"VHDL",vim:"vim","visual-basic":"Visual Basic",wasm:"WebAssembly",wiki:"Wiki markup",xeoracube:"XeoraCube",xojo:"Xojo (REALbasic)",xquery:"XQuery",yaml:"YAML"};Prism.plugins.toolbar.registerButton("show-language",function(a){var t=a.element.parentNode;if(t&&/pre/i.test(t.nodeName)){var s=t.getAttribute("data-language")||e[a.language]||a.language&&a.language.substring(0,1).toUpperCase()+a.language.substring(1);if(s){var r=document.createElement("span");return r.textContent=s,r}}})}}(); \ No newline at end of file diff --git a/tests/languages/n1ql/boolean_feature.test b/tests/languages/n1ql/boolean_feature.test new file mode 100644 index 0000000000..0037fbbdd5 --- /dev/null +++ b/tests/languages/n1ql/boolean_feature.test @@ -0,0 +1,14 @@ +TRUE +FALSE + + +---------------------------------------------------- + +[ + ["boolean", "TRUE"], + ["boolean", "FALSE"] +] + +---------------------------------------------------- + +Checks for booleans. \ No newline at end of file diff --git a/tests/languages/n1ql/comment_feature.test b/tests/languages/n1ql/comment_feature.test new file mode 100644 index 0000000000..f8752fb7d9 --- /dev/null +++ b/tests/languages/n1ql/comment_feature.test @@ -0,0 +1,14 @@ +/**/ +/* foo +bar */ + +---------------------------------------------------- + +[ + ["comment", "/**/"], + ["comment", "/* foo\r\nbar */"] +] + +---------------------------------------------------- + +Checks for comments. \ No newline at end of file diff --git a/tests/languages/n1ql/function_feature.test b/tests/languages/n1ql/function_feature.test new file mode 100644 index 0000000000..35f65fd5cb --- /dev/null +++ b/tests/languages/n1ql/function_feature.test @@ -0,0 +1,359 @@ +ABS( +ACOS( +ARRAY_AGG( +ARRAY_APPEND( +ARRAY_AVG( +ARRAY_CONCAT( +ARRAY_CONTAINS( +ARRAY_COUNT( +ARRAY_DISTINCT( +ARRAY_FLATTEN( +ARRAY_IFNULL( +ARRAY_INSERT( +ARRAY_INTERSECT( +ARRAY_LENGTH( +ARRAY_MAX( +ARRAY_MIN( +ARRAY_POSITION( +ARRAY_PREPEND( +ARRAY_PUT( +ARRAY_RANGE( +ARRAY_REMOVE( +ARRAY_REPEAT( +ARRAY_REPLACE( +ARRAY_REVERSE( +ARRAY_SORT( +ARRAY_STAR( +ARRAY_SUM( +ARRAY_SYMDIFF( +ARRAY_SYMDIFFN( +ARRAY_UNION( +ASIN( +ATAN( +ATAN2( +AVG( +BASE64( +BASE64_DECODE( +BASE64_ENCODE( +BITAND( +BITCLEAR( +BITNOT( +BITOR( +BITSET( +BITSHIFT( +BITTEST( +BITXOR( +CEIL( +CLOCK_LOCAL( +CLOCK_MILLIS( +CLOCK_STR( +CLOCK_TZ( +CLOCK_UTC( +CONTAINS( +CONTAINS_TOKEN( +CONTAINS_TOKEN_LIKE( +CONTAINS_TOKEN_REGEXP( +COS( +COUNT( +CURL( +DATE_ADD_MILLIS( +DATE_ADD_STR( +DATE_DIFF_MILLIS( +DATE_DIFF_STR( +DATE_FORMAT_STR( +DATE_PART_MILLIS( +DATE_PART_STR( +DATE_RANGE_MILLIS( +DATE_RANGE_STR( +DATE_TRUNC_MILLIS( +DATE_TRUNC_STR( +DECODE_JSON( +DEGREES( +DURATION_TO_STR( +E( +ENCODED_SIZE( +ENCODE_JSON( +EXP( +FLOOR( +GREATEST( +HAS_TOKEN( +IFINF( +IFMISSING( +IFMISSINGORNULL( +IFNAN( +IFNANORINF( +IFNULL( +INITCAP( +ISARRAY( +ISATOM( +ISBOOLEAN( +ISNUMBER( +ISOBJECT( +ISSTRING( +IsBitSET( +LEAST( +LENGTH( +LN( +LOG( +LOWER( +LTRIM( +MAX( +META( +MILLIS( +MILLIS_TO_LOCAL( +MILLIS_TO_STR( +MILLIS_TO_TZ( +MILLIS_TO_UTC( +MILLIS_TO_ZONE_NAME( +MIN( +MISSINGIF( +NANIF( +NEGINFIF( +NOW_LOCAL( +NOW_MILLIS( +NOW_STR( +NOW_TZ( +NOW_UTC( +NULLIF( +OBJECT_ADD( +OBJECT_CONCAT( +OBJECT_INNER_PAIRS( +OBJECT_INNER_VALUES( +OBJECT_LENGTH( +OBJECT_NAMES( +OBJECT_PAIRS( +OBJECT_PUT( +OBJECT_REMOVE( +OBJECT_RENAME( +OBJECT_REPLACE( +OBJECT_UNWRAP( +OBJECT_VALUES( +PAIRS( +PI( +POLY_LENGTH( +POSINFIF( +POSITION( +POWER( +RADIANS( +RANDOM( +REGEXP_CONTAINS( +REGEXP_LIKE( +REGEXP_POSITION( +REGEXP_REPLACE( +REPEAT( +REPLACE( +REVERSE( +ROUND( +RTRIM( +SIGN( +SIN( +SPLIT( +SQRT( +STR_TO_DURATION( +STR_TO_MILLIS( +STR_TO_TZ( +STR_TO_UTC( +STR_TO_ZONE_NAME( +SUBSTR( +SUFFIXES( +SUM( +TAN( +TITLE( +TOARRAY( +TOATOM( +TOBOOLEAN( +TOKENS( +TOKENS( +TONUMBER( +TOOBJECT( +TOSTRING( +TRIM( +TRUNC( +TYPE( +UPPER( +WEEKDAY_MILLIS( +WEEKDAY_STR( + +---------------------------------------------------- + +[ + ["function", "ABS"], ["punctuation", "("], + ["function", "ACOS"], ["punctuation", "("], + ["function", "ARRAY_AGG"], ["punctuation", "("], + ["function", "ARRAY_APPEND"], ["punctuation", "("], + ["function", "ARRAY_AVG"], ["punctuation", "("], + ["function", "ARRAY_CONCAT"], ["punctuation", "("], + ["function", "ARRAY_CONTAINS"], ["punctuation", "("], + ["function", "ARRAY_COUNT"], ["punctuation", "("], + ["function", "ARRAY_DISTINCT"], ["punctuation", "("], + ["function", "ARRAY_FLATTEN"], ["punctuation", "("], + ["function", "ARRAY_IFNULL"], ["punctuation", "("], + ["function", "ARRAY_INSERT"], ["punctuation", "("], + ["function", "ARRAY_INTERSECT"], ["punctuation", "("], + ["function", "ARRAY_LENGTH"], ["punctuation", "("], + ["function", "ARRAY_MAX"], ["punctuation", "("], + ["function", "ARRAY_MIN"], ["punctuation", "("], + ["function", "ARRAY_POSITION"], ["punctuation", "("], + ["function", "ARRAY_PREPEND"], ["punctuation", "("], + ["function", "ARRAY_PUT"], ["punctuation", "("], + ["function", "ARRAY_RANGE"], ["punctuation", "("], + ["function", "ARRAY_REMOVE"], ["punctuation", "("], + ["function", "ARRAY_REPEAT"], ["punctuation", "("], + ["function", "ARRAY_REPLACE"], ["punctuation", "("], + ["function", "ARRAY_REVERSE"], ["punctuation", "("], + ["function", "ARRAY_SORT"], ["punctuation", "("], + ["function", "ARRAY_STAR"], ["punctuation", "("], + ["function", "ARRAY_SUM"], ["punctuation", "("], + ["function", "ARRAY_SYMDIFF"], ["punctuation", "("], + ["function", "ARRAY_SYMDIFFN"], ["punctuation", "("], + ["function", "ARRAY_UNION"], ["punctuation", "("], + ["function", "ASIN"], ["punctuation", "("], + ["function", "ATAN"], ["punctuation", "("], + ["function", "ATAN2"], ["punctuation", "("], + ["function", "AVG"], ["punctuation", "("], + ["function", "BASE64"], ["punctuation", "("], + ["function", "BASE64_DECODE"], ["punctuation", "("], + ["function", "BASE64_ENCODE"], ["punctuation", "("], + ["function", "BITAND"], ["punctuation", "("], + ["function", "BITCLEAR"], ["punctuation", "("], + ["function", "BITNOT"], ["punctuation", "("], + ["function", "BITOR"], ["punctuation", "("], + ["function", "BITSET"], ["punctuation", "("], + ["function", "BITSHIFT"], ["punctuation", "("], + ["function", "BITTEST"], ["punctuation", "("], + ["function", "BITXOR"], ["punctuation", "("], + ["function", "CEIL"], ["punctuation", "("], + ["function", "CLOCK_LOCAL"], ["punctuation", "("], + ["function", "CLOCK_MILLIS"], ["punctuation", "("], + ["function", "CLOCK_STR"], ["punctuation", "("], + ["function", "CLOCK_TZ"], ["punctuation", "("], + ["function", "CLOCK_UTC"], ["punctuation", "("], + ["function", "CONTAINS"], ["punctuation", "("], + ["function", "CONTAINS_TOKEN"], ["punctuation", "("], + ["function", "CONTAINS_TOKEN_LIKE"], ["punctuation", "("], + ["function", "CONTAINS_TOKEN_REGEXP"], ["punctuation", "("], + ["function", "COS"], ["punctuation", "("], + ["function", "COUNT"], ["punctuation", "("], + ["function", "CURL"], ["punctuation", "("], + ["function", "DATE_ADD_MILLIS"], ["punctuation", "("], + ["function", "DATE_ADD_STR"], ["punctuation", "("], + ["function", "DATE_DIFF_MILLIS"], ["punctuation", "("], + ["function", "DATE_DIFF_STR"], ["punctuation", "("], + ["function", "DATE_FORMAT_STR"], ["punctuation", "("], + ["function", "DATE_PART_MILLIS"], ["punctuation", "("], + ["function", "DATE_PART_STR"], ["punctuation", "("], + ["function", "DATE_RANGE_MILLIS"], ["punctuation", "("], + ["function", "DATE_RANGE_STR"], ["punctuation", "("], + ["function", "DATE_TRUNC_MILLIS"], ["punctuation", "("], + ["function", "DATE_TRUNC_STR"], ["punctuation", "("], + ["function", "DECODE_JSON"], ["punctuation", "("], + ["function", "DEGREES"], ["punctuation", "("], + ["function", "DURATION_TO_STR"], ["punctuation", "("], + ["function", "E"], ["punctuation", "("], + ["function", "ENCODED_SIZE"], ["punctuation", "("], + ["function", "ENCODE_JSON"], ["punctuation", "("], + ["function", "EXP"], ["punctuation", "("], + ["function", "FLOOR"], ["punctuation", "("], + ["function", "GREATEST"], ["punctuation", "("], + ["function", "HAS_TOKEN"], ["punctuation", "("], + ["function", "IFINF"], ["punctuation", "("], + ["function", "IFMISSING"], ["punctuation", "("], + ["function", "IFMISSINGORNULL"], ["punctuation", "("], + ["function", "IFNAN"], ["punctuation", "("], + ["function", "IFNANORINF"], ["punctuation", "("], + ["function", "IFNULL"], ["punctuation", "("], + ["function", "INITCAP"], ["punctuation", "("], + ["function", "ISARRAY"], ["punctuation", "("], + ["function", "ISATOM"], ["punctuation", "("], + ["function", "ISBOOLEAN"], ["punctuation", "("], + ["function", "ISNUMBER"], ["punctuation", "("], + ["function", "ISOBJECT"], ["punctuation", "("], + ["function", "ISSTRING"], ["punctuation", "("], + ["function", "IsBitSET"], ["punctuation", "("], + ["function", "LEAST"], ["punctuation", "("], + ["function", "LENGTH"], ["punctuation", "("], + ["function", "LN"], ["punctuation", "("], + ["function", "LOG"], ["punctuation", "("], + ["function", "LOWER"], ["punctuation", "("], + ["function", "LTRIM"], ["punctuation", "("], + ["function", "MAX"], ["punctuation", "("], + ["function", "META"], ["punctuation", "("], + ["function", "MILLIS"], ["punctuation", "("], + ["function", "MILLIS_TO_LOCAL"], ["punctuation", "("], + ["function", "MILLIS_TO_STR"], ["punctuation", "("], + ["function", "MILLIS_TO_TZ"], ["punctuation", "("], + ["function", "MILLIS_TO_UTC"], ["punctuation", "("], + ["function", "MILLIS_TO_ZONE_NAME"], ["punctuation", "("], + ["function", "MIN"], ["punctuation", "("], + ["function", "MISSINGIF"], ["punctuation", "("], + ["function", "NANIF"], ["punctuation", "("], + ["function", "NEGINFIF"], ["punctuation", "("], + ["function", "NOW_LOCAL"], ["punctuation", "("], + ["function", "NOW_MILLIS"], ["punctuation", "("], + ["function", "NOW_STR"], ["punctuation", "("], + ["function", "NOW_TZ"], ["punctuation", "("], + ["function", "NOW_UTC"], ["punctuation", "("], + ["function", "NULLIF"], ["punctuation", "("], + ["function", "OBJECT_ADD"], ["punctuation", "("], + ["function", "OBJECT_CONCAT"], ["punctuation", "("], + ["function", "OBJECT_INNER_PAIRS"], ["punctuation", "("], + ["function", "OBJECT_INNER_VALUES"], ["punctuation", "("], + ["function", "OBJECT_LENGTH"], ["punctuation", "("], + ["function", "OBJECT_NAMES"], ["punctuation", "("], + ["function", "OBJECT_PAIRS"], ["punctuation", "("], + ["function", "OBJECT_PUT"], ["punctuation", "("], + ["function", "OBJECT_REMOVE"], ["punctuation", "("], + ["function", "OBJECT_RENAME"], ["punctuation", "("], + ["function", "OBJECT_REPLACE"], ["punctuation", "("], + ["function", "OBJECT_UNWRAP"], ["punctuation", "("], + ["function", "OBJECT_VALUES"], ["punctuation", "("], + ["function", "PAIRS"], ["punctuation", "("], + ["function", "PI"], ["punctuation", "("], + ["function", "POLY_LENGTH"], ["punctuation", "("], + ["function", "POSINFIF"], ["punctuation", "("], + ["function", "POSITION"], ["punctuation", "("], + ["function", "POWER"], ["punctuation", "("], + ["function", "RADIANS"], ["punctuation", "("], + ["function", "RANDOM"], ["punctuation", "("], + ["function", "REGEXP_CONTAINS"], ["punctuation", "("], + ["function", "REGEXP_LIKE"], ["punctuation", "("], + ["function", "REGEXP_POSITION"], ["punctuation", "("], + ["function", "REGEXP_REPLACE"], ["punctuation", "("], + ["function", "REPEAT"], ["punctuation", "("], + ["function", "REPLACE"], ["punctuation", "("], + ["function", "REVERSE"], ["punctuation", "("], + ["function", "ROUND"], ["punctuation", "("], + ["function", "RTRIM"], ["punctuation", "("], + ["function", "SIGN"], ["punctuation", "("], + ["function", "SIN"], ["punctuation", "("], + ["function", "SPLIT"], ["punctuation", "("], + ["function", "SQRT"], ["punctuation", "("], + ["function", "STR_TO_DURATION"], ["punctuation", "("], + ["function", "STR_TO_MILLIS"], ["punctuation", "("], + ["function", "STR_TO_TZ"], ["punctuation", "("], + ["function", "STR_TO_UTC"], ["punctuation", "("], + ["function", "STR_TO_ZONE_NAME"], ["punctuation", "("], + ["function", "SUBSTR"], ["punctuation", "("], + ["function", "SUFFIXES"], ["punctuation", "("], + ["function", "SUM"], ["punctuation", "("], + ["function", "TAN"], ["punctuation", "("], + ["function", "TITLE"], ["punctuation", "("], + ["function", "TOARRAY"], ["punctuation", "("], + ["function", "TOATOM"], ["punctuation", "("], + ["function", "TOBOOLEAN"], ["punctuation", "("], + ["function", "TOKENS"], ["punctuation", "("], + ["function", "TOKENS"], ["punctuation", "("], + ["function", "TONUMBER"], ["punctuation", "("], + ["function", "TOOBJECT"], ["punctuation", "("], + ["function", "TOSTRING"], ["punctuation", "("], + ["function", "TRIM"], ["punctuation", "("], + ["function", "TRUNC"], ["punctuation", "("], + ["function", "TYPE"], ["punctuation", "("], + ["function", "UPPER"], ["punctuation", "("], + ["function", "WEEKDAY_MILLIS"], ["punctuation", "("], + ["function", "WEEKDAY_STR"], ["punctuation", "("] +] + +---------------------------------------------------- + +Checks for functions. \ No newline at end of file diff --git a/tests/languages/n1ql/identifier_feature.test b/tests/languages/n1ql/identifier_feature.test new file mode 100644 index 0000000000..b7cf071ed0 --- /dev/null +++ b/tests/languages/n1ql/identifier_feature.test @@ -0,0 +1,19 @@ +`` +`foo` +`foo bar` +`foo +bar` + + +---------------------------------------------------- + +[ + ["identifier", "``"], + ["identifier", "`foo`"], + ["identifier", "`foo bar`"], + ["identifier", "`foo\r\nbar`"] +] + +---------------------------------------------------- + +Checks for escaped identifiers. \ No newline at end of file diff --git a/tests/languages/n1ql/keyword_feature.test b/tests/languages/n1ql/keyword_feature.test new file mode 100644 index 0000000000..4e9aace092 --- /dev/null +++ b/tests/languages/n1ql/keyword_feature.test @@ -0,0 +1,311 @@ +ALL +ALTER +ANALYZE +AS +ASC +BEGIN +BINARY +BOOLEAN +BREAK +BUCKET +BUILD +BY +CALL +CAST +CLUSTER +COLLATE +COLLECTION +COMMIT +CONNECT +CONTINUE +CORRELATE +COVER +CREATE +DATABASE +DATASET +DATASTORE +DECLARE +DECREMENT +DELETE +DERIVED +DESC +DESCRIBE +DISTINCT +DO +DROP +EACH +ELEMENT +EXCEPT +EXCLUDE +EXECUTE +EXPLAIN +FETCH +FLATTEN +FOR +FORCE +FROM +FUNCTION +GRANT +GROUP +GSI +HAVING +IF +IGNORE +ILIKE +INCLUDE +INCREMENT +INDEX +INFER +INLINE +INNER +INSERT +INTERSECT +INTO +IS +JOIN +KEY +KEYS +KEYSPACE +KNOWN +LAST +LEFT +LET +LETTING +LIMIT +LSM +MAP +MAPPING +MATCHED +MATERIALIZED +MERGE +MINUS +MISSING +NAMESPACE +NEST +NULL +NUMBER +OBJECT +OFFSET +ON +OPTION +ORDER +OUTER +OVER +PARSE +PARTITION +PASSWORD +PATH +POOL +PREPARE +PRIMARY +PRIVATE +PRIVILEGE +PROCEDURE +PUBLIC +RAW +REALM +REDUCE +RENAME +RETURN +RETURNING +REVOKE +RIGHT +ROLE +ROLLBACK +SATISFIES +SCHEMA +SELECT +SELF +SEMI +SET +SHOW +SOME +START +STATISTICS +STRING +SYSTEM +TO +TRANSACTION +TRIGGER +TRUNCATE +UNDER +UNION +UNIQUE +UNKNOWN +UNNEST +UNSET +UPDATE +UPSERT +USE +USER +USING +VALIDATE +VALUE +VALUES +VIA +VIEW +WHERE +WHILE +WITH +WORK +XOR + +---------------------------------------------------- + +[ + ["keyword", "ALL"], + ["keyword", "ALTER"], + ["keyword", "ANALYZE"], + ["keyword", "AS"], + ["keyword", "ASC"], + ["keyword", "BEGIN"], + ["keyword", "BINARY"], + ["keyword", "BOOLEAN"], + ["keyword", "BREAK"], + ["keyword", "BUCKET"], + ["keyword", "BUILD"], + ["keyword", "BY"], + ["keyword", "CALL"], + ["keyword", "CAST"], + ["keyword", "CLUSTER"], + ["keyword", "COLLATE"], + ["keyword", "COLLECTION"], + ["keyword", "COMMIT"], + ["keyword", "CONNECT"], + ["keyword", "CONTINUE"], + ["keyword", "CORRELATE"], + ["keyword", "COVER"], + ["keyword", "CREATE"], + ["keyword", "DATABASE"], + ["keyword", "DATASET"], + ["keyword", "DATASTORE"], + ["keyword", "DECLARE"], + ["keyword", "DECREMENT"], + ["keyword", "DELETE"], + ["keyword", "DERIVED"], + ["keyword", "DESC"], + ["keyword", "DESCRIBE"], + ["keyword", "DISTINCT"], + ["keyword", "DO"], + ["keyword", "DROP"], + ["keyword", "EACH"], + ["keyword", "ELEMENT"], + ["keyword", "EXCEPT"], + ["keyword", "EXCLUDE"], + ["keyword", "EXECUTE"], + ["keyword", "EXPLAIN"], + ["keyword", "FETCH"], + ["keyword", "FLATTEN"], + ["keyword", "FOR"], + ["keyword", "FORCE"], + ["keyword", "FROM"], + ["keyword", "FUNCTION"], + ["keyword", "GRANT"], + ["keyword", "GROUP"], + ["keyword", "GSI"], + ["keyword", "HAVING"], + ["keyword", "IF"], + ["keyword", "IGNORE"], + ["keyword", "ILIKE"], + ["keyword", "INCLUDE"], + ["keyword", "INCREMENT"], + ["keyword", "INDEX"], + ["keyword", "INFER"], + ["keyword", "INLINE"], + ["keyword", "INNER"], + ["keyword", "INSERT"], + ["keyword", "INTERSECT"], + ["keyword", "INTO"], + ["keyword", "IS"], + ["keyword", "JOIN"], + ["keyword", "KEY"], + ["keyword", "KEYS"], + ["keyword", "KEYSPACE"], + ["keyword", "KNOWN"], + ["keyword", "LAST"], + ["keyword", "LEFT"], + ["keyword", "LET"], + ["keyword", "LETTING"], + ["keyword", "LIMIT"], + ["keyword", "LSM"], + ["keyword", "MAP"], + ["keyword", "MAPPING"], + ["keyword", "MATCHED"], + ["keyword", "MATERIALIZED"], + ["keyword", "MERGE"], + ["keyword", "MINUS"], + ["keyword", "MISSING"], + ["keyword", "NAMESPACE"], + ["keyword", "NEST"], + ["keyword", "NULL"], + ["keyword", "NUMBER"], + ["keyword", "OBJECT"], + ["keyword", "OFFSET"], + ["keyword", "ON"], + ["keyword", "OPTION"], + ["keyword", "ORDER"], + ["keyword", "OUTER"], + ["keyword", "OVER"], + ["keyword", "PARSE"], + ["keyword", "PARTITION"], + ["keyword", "PASSWORD"], + ["keyword", "PATH"], + ["keyword", "POOL"], + ["keyword", "PREPARE"], + ["keyword", "PRIMARY"], + ["keyword", "PRIVATE"], + ["keyword", "PRIVILEGE"], + ["keyword", "PROCEDURE"], + ["keyword", "PUBLIC"], + ["keyword", "RAW"], + ["keyword", "REALM"], + ["keyword", "REDUCE"], + ["keyword", "RENAME"], + ["keyword", "RETURN"], + ["keyword", "RETURNING"], + ["keyword", "REVOKE"], + ["keyword", "RIGHT"], + ["keyword", "ROLE"], + ["keyword", "ROLLBACK"], + ["keyword", "SATISFIES"], + ["keyword", "SCHEMA"], + ["keyword", "SELECT"], + ["keyword", "SELF"], + ["keyword", "SEMI"], + ["keyword", "SET"], + ["keyword", "SHOW"], + ["keyword", "SOME"], + ["keyword", "START"], + ["keyword", "STATISTICS"], + ["keyword", "STRING"], + ["keyword", "SYSTEM"], + ["keyword", "TO"], + ["keyword", "TRANSACTION"], + ["keyword", "TRIGGER"], + ["keyword", "TRUNCATE"], + ["keyword", "UNDER"], + ["keyword", "UNION"], + ["keyword", "UNIQUE"], + ["keyword", "UNKNOWN"], + ["keyword", "UNNEST"], + ["keyword", "UNSET"], + ["keyword", "UPDATE"], + ["keyword", "UPSERT"], + ["keyword", "USE"], + ["keyword", "USER"], + ["keyword", "USING"], + ["keyword", "VALIDATE"], + ["keyword", "VALUE"], + ["keyword", "VALUES"], + ["keyword", "VIA"], + ["keyword", "VIEW"], + ["keyword", "WHERE"], + ["keyword", "WHILE"], + ["keyword", "WITH"], + ["keyword", "WORK"], + ["keyword", "XOR"] +] + +---------------------------------------------------- + +Checks for all keywords. \ No newline at end of file diff --git a/tests/languages/n1ql/number_feature.test b/tests/languages/n1ql/number_feature.test new file mode 100644 index 0000000000..813e99c6e7 --- /dev/null +++ b/tests/languages/n1ql/number_feature.test @@ -0,0 +1,19 @@ +42 +0.154 +3.1E+7 +.02e2 +2. + +---------------------------------------------------- + +[ + ["number", "42"], + ["number", "0.154"], + ["number", "3.1E+7"], + ["number", ".02e2"], + ["number", "2."] +] + +---------------------------------------------------- + +Checks for integers, decimal and e-notation numbers. \ No newline at end of file diff --git a/tests/languages/n1ql/operator_feature.test b/tests/languages/n1ql/operator_feature.test new file mode 100644 index 0000000000..7162c02a7b --- /dev/null +++ b/tests/languages/n1ql/operator_feature.test @@ -0,0 +1,56 @@ ++ - * / += % || +!= +< <= <> +> >= + +AND +ANY +ARRAY +BETWEEN +CASE +ELSE +END +EVERY +EXISTS +FIRST +IN +LIKE +NOT +OR +THEN +VALUED +WHEN +WITHIN + +---------------------------------------------------- + +[ + ["operator", "+"], ["operator", "-"], ["operator", "*"], ["operator", "/"], + ["operator", "="], ["operator", "%"], ["operator", "||"], + ["operator", "!="], + ["operator", "<"], ["operator", "<="], ["operator", "<>"], + ["operator", ">"], ["operator", ">="], + ["operator", "AND"], + ["operator", "ANY"], + ["operator", "ARRAY"], + ["operator", "BETWEEN"], + ["operator", "CASE"], + ["operator", "ELSE"], + ["operator", "END"], + ["operator", "EVERY"], + ["operator", "EXISTS"], + ["operator", "FIRST"], + ["operator", "IN"], + ["operator", "LIKE"], + ["operator", "NOT"], + ["operator", "OR"], + ["operator", "THEN"], + ["operator", "VALUED"], + ["operator", "WHEN"], + ["operator", "WITHIN"] +] + +---------------------------------------------------- + +Checks for all operators. \ No newline at end of file diff --git a/tests/languages/n1ql/parameter_feature.test b/tests/languages/n1ql/parameter_feature.test new file mode 100644 index 0000000000..11e17edeb2 --- /dev/null +++ b/tests/languages/n1ql/parameter_feature.test @@ -0,0 +1,13 @@ +$1 +$named_parameter + +---------------------------------------------------- + +[ + ["parameter", "$1"], + ["parameter", "$named_parameter"] +] + +---------------------------------------------------- + +Checks for parameters. diff --git a/tests/languages/n1ql/string_feature.test b/tests/languages/n1ql/string_feature.test new file mode 100644 index 0000000000..3dfeb990a9 --- /dev/null +++ b/tests/languages/n1ql/string_feature.test @@ -0,0 +1,27 @@ +"" +"fo\"obar" +"foo +bar" +'' +'fo\'obar' +'foo +bar' +'foo''s bar' +"foo's ""bar""" + +---------------------------------------------------- + +[ + ["string", "\"\""], + ["string", "\"fo\\\"obar\""], + ["string", "\"foo\r\nbar\""], + ["string", "''"], + ["string", "'fo\\'obar'"], + ["string", "'foo\r\nbar'"], + ["string", "'foo''s bar'"], + ["string", "\"foo's \"\"bar\"\"\""] +] + +---------------------------------------------------- + +Checks for strings. From 439e3bd7e18350bbf5ef9169194cc83f50fe0dd3 Mon Sep 17 00:00:00 2001 From: volado Date: Fri, 11 Jan 2019 00:54:01 +0300 Subject: [PATCH 0133/1100] Made false, true, and null constants in PHP (#1694) - This adds the `constant` alias to `false` and `true`. - `null` is no longer `keyword` but a `constant`. --- components/prism-php.js | 11 +++++++++-- components/prism-php.min.js | 2 +- tests/languages/php/boolean_feature.test | 17 +++++++++++++++++ tests/languages/php/constant_feature.test | 2 ++ tests/languages/php/keyword_feature.test | 2 -- 5 files changed, 29 insertions(+), 5 deletions(-) create mode 100644 tests/languages/php/boolean_feature.test diff --git a/components/prism-php.js b/components/prism-php.js index 5011ff3c62..8f3498da69 100644 --- a/components/prism-php.js +++ b/components/prism-php.js @@ -12,8 +12,15 @@ */ (function (Prism) { Prism.languages.php = Prism.languages.extend('clike', { - 'keyword': /\b(?:__halt_compiler|abstract|and|array|as|break|callable|case|catch|class|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|eval|exit|extends|final|finally|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|namespace|new|null|or|parent|print|private|protected|public|require|require_once|return|static|switch|throw|trait|try|unset|use|var|while|xor|yield)\b/i, - 'constant': /\b[A-Z_][A-Z0-9_]*\b/, + 'keyword': /\b(?:__halt_compiler|abstract|and|array|as|break|callable|case|catch|class|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|eval|exit|extends|final|finally|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|namespace|new|or|parent|print|private|protected|public|require|require_once|return|static|switch|throw|trait|try|unset|use|var|while|xor|yield)\b/i, + 'boolean': { + pattern: /\b(?:false|true)\b/i, + alias: 'constant' + }, + 'constant': [ + /\b[A-Z_][A-Z0-9_]*\b/, + /\b(?:null)\b/i, + ], 'comment': { pattern: /(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/, lookbehind: true diff --git a/components/prism-php.min.js b/components/prism-php.min.js index bfc3293376..999111b65a 100644 --- a/components/prism-php.min.js +++ b/components/prism-php.min.js @@ -1 +1 @@ -!function(e){e.languages.php=e.languages.extend("clike",{keyword:/\b(?:__halt_compiler|abstract|and|array|as|break|callable|case|catch|class|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|eval|exit|extends|final|finally|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|namespace|new|null|or|parent|print|private|protected|public|require|require_once|return|static|switch|throw|trait|try|unset|use|var|while|xor|yield)\b/i,constant:/\b[A-Z_][A-Z0-9_]*\b/,comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0}}),e.languages.insertBefore("php","string",{"shell-comment":{pattern:/(^|[^\\])#.*/,lookbehind:!0,alias:"comment"}}),e.languages.insertBefore("php","keyword",{delimiter:{pattern:/\?>|<\?(?:php|=)?/i,alias:"important"},variable:/\$+(?:\w+\b|(?={))/i,"package":{pattern:/(\\|namespace\s+|use\s+)[\w\\]+/,lookbehind:!0,inside:{punctuation:/\\/}}}),e.languages.insertBefore("php","operator",{property:{pattern:/(->)[\w]+/,lookbehind:!0}});var n={pattern:/{\$(?:{(?:{[^{}]+}|[^{}]+)}|[^{}])+}|(^|[^\\{])\$+(?:\w+(?:\[.+?]|->\w+)*)/,lookbehind:!0,inside:{rest:e.languages.php}};e.languages.insertBefore("php","string",{"nowdoc-string":{pattern:/<<<'([^']+)'(?:\r\n?|\n)(?:.*(?:\r\n?|\n))*?\1;/,greedy:!0,alias:"string",inside:{delimiter:{pattern:/^<<<'[^']+'|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<'?|[';]$/}}}},"heredoc-string":{pattern:/<<<(?:"([^"]+)"(?:\r\n?|\n)(?:.*(?:\r\n?|\n))*?\1;|([a-z_]\w*)(?:\r\n?|\n)(?:.*(?:\r\n?|\n))*?\2;)/i,greedy:!0,alias:"string",inside:{delimiter:{pattern:/^<<<(?:"[^"]+"|[a-z_]\w*)|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<"?|[";]$/}},interpolation:n}},"single-quoted-string":{pattern:/'(?:\\[\s\S]|[^\\'])*'/,greedy:!0,alias:"string"},"double-quoted-string":{pattern:/"(?:\\[\s\S]|[^\\"])*"/,greedy:!0,alias:"string",inside:{interpolation:n}}}),delete e.languages.php.string,e.hooks.add("before-tokenize",function(n){if(/(?:<\?php|<\?)/gi.test(n.code)){var t=/(?:<\?php|<\?)[\s\S]*?(?:\?>|$)/gi;e.languages["markup-templating"].buildPlaceholders(n,"php",t)}}),e.hooks.add("after-tokenize",function(n){e.languages["markup-templating"].tokenizePlaceholders(n,"php")})}(Prism); \ No newline at end of file +!function(e){e.languages.php=e.languages.extend("clike",{keyword:/\b(?:__halt_compiler|abstract|and|array|as|break|callable|case|catch|class|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|eval|exit|extends|final|finally|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|namespace|new|or|parent|print|private|protected|public|require|require_once|return|static|switch|throw|trait|try|unset|use|var|while|xor|yield)\b/i,"boolean":{pattern:/\b(?:false|true)\b/i,alias:"constant"},constant:[/\b[A-Z_][A-Z0-9_]*\b/,/\b(?:null)\b/i],comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0}}),e.languages.insertBefore("php","string",{"shell-comment":{pattern:/(^|[^\\])#.*/,lookbehind:!0,alias:"comment"}}),e.languages.insertBefore("php","keyword",{delimiter:{pattern:/\?>|<\?(?:php|=)?/i,alias:"important"},variable:/\$+(?:\w+\b|(?={))/i,"package":{pattern:/(\\|namespace\s+|use\s+)[\w\\]+/,lookbehind:!0,inside:{punctuation:/\\/}}}),e.languages.insertBefore("php","operator",{property:{pattern:/(->)[\w]+/,lookbehind:!0}});var n={pattern:/{\$(?:{(?:{[^{}]+}|[^{}]+)}|[^{}])+}|(^|[^\\{])\$+(?:\w+(?:\[.+?]|->\w+)*)/,lookbehind:!0,inside:{rest:e.languages.php}};e.languages.insertBefore("php","string",{"nowdoc-string":{pattern:/<<<'([^']+)'(?:\r\n?|\n)(?:.*(?:\r\n?|\n))*?\1;/,greedy:!0,alias:"string",inside:{delimiter:{pattern:/^<<<'[^']+'|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<'?|[';]$/}}}},"heredoc-string":{pattern:/<<<(?:"([^"]+)"(?:\r\n?|\n)(?:.*(?:\r\n?|\n))*?\1;|([a-z_]\w*)(?:\r\n?|\n)(?:.*(?:\r\n?|\n))*?\2;)/i,greedy:!0,alias:"string",inside:{delimiter:{pattern:/^<<<(?:"[^"]+"|[a-z_]\w*)|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<"?|[";]$/}},interpolation:n}},"single-quoted-string":{pattern:/'(?:\\[\s\S]|[^\\'])*'/,greedy:!0,alias:"string"},"double-quoted-string":{pattern:/"(?:\\[\s\S]|[^\\"])*"/,greedy:!0,alias:"string",inside:{interpolation:n}}}),delete e.languages.php.string,e.hooks.add("before-tokenize",function(n){if(/(?:<\?php|<\?)/gi.test(n.code)){var t=/(?:<\?php|<\?)[\s\S]*?(?:\?>|$)/gi;e.languages["markup-templating"].buildPlaceholders(n,"php",t)}}),e.hooks.add("after-tokenize",function(n){e.languages["markup-templating"].tokenizePlaceholders(n,"php")})}(Prism); \ No newline at end of file diff --git a/tests/languages/php/boolean_feature.test b/tests/languages/php/boolean_feature.test new file mode 100644 index 0000000000..55c24bc993 --- /dev/null +++ b/tests/languages/php/boolean_feature.test @@ -0,0 +1,17 @@ +FALSE +false +TRUE +true + +---------------------------------------------------- + +[ + ["boolean", "FALSE"], + ["boolean", "false"], + ["boolean", "TRUE"], + ["boolean", "true"] +] + +---------------------------------------------------- + +Checks for booleans. \ No newline at end of file diff --git a/tests/languages/php/constant_feature.test b/tests/languages/php/constant_feature.test index 0002dfd224..32ecaf0197 100644 --- a/tests/languages/php/constant_feature.test +++ b/tests/languages/php/constant_feature.test @@ -1,3 +1,4 @@ +null _ X AZ @@ -7,6 +8,7 @@ FOOBAR_42 ---------------------------------------------------- [ + ["constant", "null"], ["constant", "_"], ["constant", "X"], ["constant", "AZ"], diff --git a/tests/languages/php/keyword_feature.test b/tests/languages/php/keyword_feature.test index 1a8f47d974..d40a24456e 100644 --- a/tests/languages/php/keyword_feature.test +++ b/tests/languages/php/keyword_feature.test @@ -46,7 +46,6 @@ isset list namespace; new; -null or parent print @@ -119,7 +118,6 @@ yield ["keyword", "list"], ["keyword", "namespace"], ["punctuation", ";"], ["keyword", "new"], ["punctuation", ";"], - ["keyword", "null"], ["keyword", "or"], ["keyword", "parent"], ["keyword", "print"], From ff9ccbe5934480424bd386e1e279c76e92458a0d Mon Sep 17 00:00:00 2001 From: Marcus Kazmierczak Date: Sat, 12 Jan 2019 12:56:49 -0800 Subject: [PATCH 0134/1100] Added new third-party tutorial for using Prism in Gutenberg (#1701) This adds a new third-party tutorial to the start page. --- index.html | 1 + 1 file changed, 1 insertion(+) diff --git a/index.html b/index.html index 50be230c2e..de85e25c13 100644 --- a/index.html +++ b/index.html @@ -239,6 +239,7 @@

      Third-party tutorials

    • Highlight your code syntax with Prism.js
    • A code snippet content element powered by Prism.js for TYPO3 CMS
    • Code syntax highlighting with Angular and Prism.js
    • +
    • Code syntax highlighting in Gutenberg, WordPress block editor

    Please note that the tutorials listed here are not verified to contain correct information. Read at your risk and always check the official documentation here if something doesn’t work :)

    From 66d2104a9c050f25575be757185f848ca5c9184f Mon Sep 17 00:00:00 2001 From: Guilherme Dellagustin Date: Sun, 13 Jan 2019 22:47:58 +0100 Subject: [PATCH 0135/1100] Fixed CHANGELOG.md (#1704) Fixes that swapped commit URLs of ABAP and Erlang for release 1.8.4 (2017-11-05). --- CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 14c64052d3..bc9f15b069 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -313,7 +313,7 @@ ### Updated components * __ABAP__: - * Regexp optimisation [[`7547f83`](https://github.com/PrismJS/prism/commit/7547f83)] + * Regexp optimisation [[`e7b411e`](https://github.com/PrismJS/prism/commit/e7b411e)] * __ActionScript__: * Fix XML regex + optimise [[`75d00d7`](https://github.com/PrismJS/prism/commit/75d00d7)] * __Ada__: @@ -363,7 +363,7 @@ * __Elixir__: * Regexp optimisation + uniform behavior between ~r and ~s [[`5d12e80`](https://github.com/PrismJS/prism/commit/5d12e80)] * __Erlang__: - * Regexp optimisation [[`e7b411e`](https://github.com/PrismJS/prism/commit/e7b411e)] + * Regexp optimisation [[`7547f83`](https://github.com/PrismJS/prism/commit/7547f83)] * __F#__: * Regexp optimisation + don't use captures if not needed [[`7753fc4`](https://github.com/PrismJS/prism/commit/7753fc4)] * __Gherkin__: From b1f8a65db38e3ac83bda51379818f8e59efa7643 Mon Sep 17 00:00:00 2001 From: ExE Boss <3889017+ExE-Boss@users.noreply.github.com> Date: Tue, 15 Jan 2019 12:43:43 +0100 Subject: [PATCH 0136/1100] =?UTF-8?q?Fixed=C2=A0CHANGELOG.md=20formatting?= =?UTF-8?q?=20(#1707)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This fixes some formatting issues in the changelog. --- CHANGELOG.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bc9f15b069..9f59d518aa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,7 +15,7 @@ * __Kotlin__ * Add keywords of Kotlin and modify it's number pattern. ([#1389](https://github.com/PrismJS/prism/issues/1389)) [[`1bf73b0`](https://github.com/PrismJS/prism/commit/1bf73b0)] * Add `typealias` keyword ([#1437](https://github.com/PrismJS/prism/issues/1437)) [[`a21fdee`](https://github.com/PrismJS/prism/commit/a21fdee)] -* __JavaScript +* __JavaScript__ * Improve Regexp pattern [[`5b043cf`](https://github.com/PrismJS/prism/commit/5b043cf)] * Add support for one level of nesting inside template strings. Fix [#1397](https://github.com/PrismJS/prism/issues/1397) [[`db2d0eb`](https://github.com/PrismJS/prism/commit/db2d0eb)] * __Elixir__ @@ -686,13 +686,13 @@ * Make CSS strings greedy. Fix [#1013](https://github.com/PrismJS/prism/issues/1013). [[`e57e26d`](https://github.com/PrismJS/prism/commit/e57e26d)] * __CSS Extras__: * Match attribute inside selectors [[`13fed76`](https://github.com/PrismJS/prism/commit/13fed76)] -* _Groovy__: +* __Groovy__: * Fix order of decoding entities in groovy. Fixes [#1049](https://github.com/PrismJS/prism/issues/1049) ([#1050](https://github.com/PrismJS/prism/issues/1050)) [[`d75da8e`](https://github.com/PrismJS/prism/commit/d75da8e)] * __Ini__: * Remove important token in ini definition ([#1047](https://github.com/PrismJS/prism/issues/1047)) [[`fe8ad8b`](https://github.com/PrismJS/prism/commit/fe8ad8b)] * __JavaScript__: * Add exponentiation & spread/rest operator ([#991](https://github.com/PrismJS/prism/issues/991)) [[`b2de65a`](https://github.com/PrismJS/prism/commit/b2de65a), [`268d01e`](https://github.com/PrismJS/prism/commit/268d01e)] -* __JSON_: +* __JSON__: * JSON: Fixed issues with properties and strings + added tests. Fix [#1025](https://github.com/PrismJS/prism/issues/1025) [[`25a541d`](https://github.com/PrismJS/prism/commit/25a541d)] * __Markup__: * Allow for dots in Markup tag names, but not in HTML tags included in Textile. Fixes [#888](https://github.com/PrismJS/prism/issues/888). [[`31ea66b`](https://github.com/PrismJS/prism/commit/31ea66b)] From b94b56c131089f827aaef1b7597f24e4e32f2c45 Mon Sep 17 00:00:00 2001 From: Stephan Max Date: Tue, 15 Jan 2019 15:54:35 +0100 Subject: [PATCH 0137/1100] Added the Nand2Tetris HDL language (#1710) This adds support for the [Nand2Tetris](https://www.nand2tetris.org/) HDL language. --- components.js | 2 +- components.json | 4 ++++ components/prism-hdl.min.js | 1 + components/prism-nand2tetris-hdl.js | 9 ++++++++ components/prism-nand2tetris-hdl.min.js | 1 + examples/prism-nand2tetris-hdl.html | 23 +++++++++++++++++++ plugins/show-language/prism-show-language.js | 2 +- .../show-language/prism-show-language.min.js | 2 +- .../nand2tetris-hdl/boolean_feature.test | 13 +++++++++++ .../nand2tetris-hdl/comment_feature.test | 20 ++++++++++++++++ .../nand2tetris-hdl/function_feature.test | 23 +++++++++++++++++++ .../nand2tetris-hdl/keyword_feature.test | 21 +++++++++++++++++ .../nand2tetris-hdl/number_feature.test | 15 ++++++++++++ .../nand2tetris-hdl/operator_feature.test | 13 +++++++++++ .../nand2tetris-hdl/punctuation_feature.test | 23 +++++++++++++++++++ 15 files changed, 169 insertions(+), 3 deletions(-) create mode 100644 components/prism-hdl.min.js create mode 100644 components/prism-nand2tetris-hdl.js create mode 100644 components/prism-nand2tetris-hdl.min.js create mode 100644 examples/prism-nand2tetris-hdl.html create mode 100644 tests/languages/nand2tetris-hdl/boolean_feature.test create mode 100644 tests/languages/nand2tetris-hdl/comment_feature.test create mode 100644 tests/languages/nand2tetris-hdl/function_feature.test create mode 100644 tests/languages/nand2tetris-hdl/keyword_feature.test create mode 100644 tests/languages/nand2tetris-hdl/number_feature.test create mode 100644 tests/languages/nand2tetris-hdl/operator_feature.test create mode 100644 tests/languages/nand2tetris-hdl/punctuation_feature.test diff --git a/components.js b/components.js index f21c7ef78d..4fce784910 100644 --- a/components.js +++ b/components.js @@ -1,2 +1,2 @@ -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default","peerDependencies":"markup"},"clike":{"title":"C-like","option":"default","overrideExampleHeader":true},"javascript":{"title":"JavaScript","require":"clike","peerDependencies":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"actionscript":{"title":"ActionScript","require":"javascript","peerDependencies":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":"dotnet","owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","owner":"R-osey"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup","peerDependencies":["css","javascript"],"alias":"jinja2","owner":"romanvm"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","peerDependencies":["css","coffeescript","erb","javascript","less","markdown","ruby","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"http":{"title":"HTTP","peerDependencies":["javascript","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"json":{"title":"JSON","alias":"jsonp","aliasTitles":{"jsonp":"JSONP"},"owner":"CupOfTea696"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","owner":"japborst"},"less":{"title":"Less","require":"css","owner":"Golmote"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","alias":"n4jsd","owner":"bsmith-n4"},"nasm":{"title":"NASM","owner":"rbmj"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"cpp","peerDependencies":["c","cpp"],"overrideExampleHeader":true,"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"php-extras":{"title":"PHP Extras","require":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":"javascript","peerDependencies":["coffeescript","ejs","handlebars","hogan","less","livescript","markdown","mustache","plates","scss","stylus","swig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","peerDependencies":["c","cpp","fortran","ats","dsp"],"owner":"Golmote"},"python":{"title":"Python","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"ruby":{"title":"Ruby","require":"clike","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sql":{"title":"SQL","owner":"multipetros"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","peerDependencies":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","alias":"ts","owner":"vkbansal"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","owner":"hason"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":"Line Highlight","line-numbers":{"title":"Line Numbers","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","after":["autolinker","data-uri-highlight"]},"autolinker":"Autolinker","wpd":"WebPlatform Docs","custom-class":{"title":"Custom Class","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","noCSS":true},"show-language":{"title":"Show Language","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","owner":"Golmote","noCSS":true},"previewers":{"title":"Previewers","owner":"Golmote"},"autoloader":{"title":"Autoloader","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","owner":"Golmote","after":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","owner":"chriswells0"},"unescaped-markup":"Unescaped Markup","normalize-whitespace":{"title":"Normalize Whitespace","owner":"zeitgeist87","after":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","owner":"mAAdhaTTah","require":"toolbar","noCSS":true}}}; +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default","peerDependencies":"markup"},"clike":{"title":"C-like","option":"default","overrideExampleHeader":true},"javascript":{"title":"JavaScript","require":"clike","peerDependencies":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"actionscript":{"title":"ActionScript","require":"javascript","peerDependencies":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":"dotnet","owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","owner":"R-osey"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup","peerDependencies":["css","javascript"],"alias":"jinja2","owner":"romanvm"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","peerDependencies":["css","coffeescript","erb","javascript","less","markdown","ruby","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"http":{"title":"HTTP","peerDependencies":["javascript","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"json":{"title":"JSON","alias":"jsonp","aliasTitles":{"jsonp":"JSONP"},"owner":"CupOfTea696"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","owner":"japborst"},"less":{"title":"Less","require":"css","owner":"Golmote"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"nasm":{"title":"NASM","owner":"rbmj"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"cpp","peerDependencies":["c","cpp"],"overrideExampleHeader":true,"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"php-extras":{"title":"PHP Extras","require":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":"javascript","peerDependencies":["coffeescript","ejs","handlebars","hogan","less","livescript","markdown","mustache","plates","scss","stylus","swig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","peerDependencies":["c","cpp","fortran","ats","dsp"],"owner":"Golmote"},"python":{"title":"Python","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"ruby":{"title":"Ruby","require":"clike","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sql":{"title":"SQL","owner":"multipetros"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","peerDependencies":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","alias":"ts","owner":"vkbansal"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","owner":"hason"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":"Line Highlight","line-numbers":{"title":"Line Numbers","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","after":["autolinker","data-uri-highlight"]},"autolinker":"Autolinker","wpd":"WebPlatform Docs","custom-class":{"title":"Custom Class","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","noCSS":true},"show-language":{"title":"Show Language","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","owner":"Golmote","noCSS":true},"previewers":{"title":"Previewers","owner":"Golmote"},"autoloader":{"title":"Autoloader","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","owner":"Golmote","after":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","owner":"chriswells0"},"unescaped-markup":"Unescaped Markup","normalize-whitespace":{"title":"Normalize Whitespace","owner":"zeitgeist87","after":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","owner":"mAAdhaTTah","require":"toolbar","noCSS":true}}}; if (typeof module !== 'undefined' && module.exports) { module.exports = components; } \ No newline at end of file diff --git a/components.json b/components.json index 62caa50a31..dc66aa6c2d 100644 --- a/components.json +++ b/components.json @@ -487,6 +487,10 @@ "alias": "n4jsd", "owner": "bsmith-n4" }, + "nand2tetris-hdl": { + "title": "Nand To Tetris HDL", + "owner": "stephanmax" + }, "nasm": { "title": "NASM", "owner": "rbmj" diff --git a/components/prism-hdl.min.js b/components/prism-hdl.min.js new file mode 100644 index 0000000000..20d2626c87 --- /dev/null +++ b/components/prism-hdl.min.js @@ -0,0 +1 @@ +Prism.languages.hdl={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],keyword:/\b(?:CHIP|IN|OUT|PARTS|BUILTIN|CLOCKED)\b/,"boolean":/\b(?:true|false)\b/,number:/\b\d+\b/i,operator:/=/,punctuation:/[{}[\];(),.:]/}; \ No newline at end of file diff --git a/components/prism-nand2tetris-hdl.js b/components/prism-nand2tetris-hdl.js new file mode 100644 index 0000000000..b2af921bf0 --- /dev/null +++ b/components/prism-nand2tetris-hdl.js @@ -0,0 +1,9 @@ +Prism.languages['nand2tetris-hdl'] = { + 'comment': /\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/, + 'keyword': /\b(?:CHIP|IN|OUT|PARTS|BUILTIN|CLOCKED)\b/, + 'boolean': /\b(?:true|false)\b/, + 'function': /[A-Za-z][A-Za-z0-9]*(?=\()/, + 'number': /\b\d+\b/, + 'operator': /=|\.\./, + 'punctuation': /[{}[\];(),:]/ +}; diff --git a/components/prism-nand2tetris-hdl.min.js b/components/prism-nand2tetris-hdl.min.js new file mode 100644 index 0000000000..34461f2d62 --- /dev/null +++ b/components/prism-nand2tetris-hdl.min.js @@ -0,0 +1 @@ +Prism.languages["nand2tetris-hdl"]={comment:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,keyword:/\b(?:CHIP|IN|OUT|PARTS|BUILTIN|CLOCKED)\b/,"boolean":/\b(?:true|false)\b/,"function":/[A-Za-z][A-Za-z0-9]*(?=\()/,number:/\b\d+\b/,operator:/=|\.\./,punctuation:/[{}[\];(),:]/}; \ No newline at end of file diff --git a/examples/prism-nand2tetris-hdl.html b/examples/prism-nand2tetris-hdl.html new file mode 100644 index 0000000000..318792e2b3 --- /dev/null +++ b/examples/prism-nand2tetris-hdl.html @@ -0,0 +1,23 @@ +

    Comments

    +
    // Single line comment
    +/* Multi-line
    +comment */
    + +

    Literal values

    +
    0
    +32
    +true
    +false
    + +

    Full example

    +
    /*
    + * Checks if two input bits are equal
    + */
    + 
    +CHIP Eq {
    +  IN a, b;
    +  OUT out; // True iff a=b
    +  PARTS:
    +    Xor(a=a, b=b, out=uneq);
    +    Not(in=uneq, out=out);
    +}
    diff --git a/plugins/show-language/prism-show-language.js b/plugins/show-language/prism-show-language.js index 72e03f986b..e9391247d8 100644 --- a/plugins/show-language/prism-show-language.js +++ b/plugins/show-language/prism-show-language.js @@ -11,7 +11,7 @@ if (!Prism.plugins.toolbar) { } // The languages map is built automatically with gulp -var Languages = /*languages_placeholder[*/{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","css":"CSS","clike":"C-like","javascript":"JavaScript","abap":"ABAP","actionscript":"ActionScript","apacheconf":"Apache Configuration","apl":"APL","applescript":"AppleScript","arff":"ARFF","asciidoc":"AsciiDoc","asm6502":"6502 Assembly","aspnet":"ASP.NET (C#)","autohotkey":"AutoHotkey","autoit":"AutoIt","shell":"Shell","basic":"BASIC","csharp":"C#","cpp":"C++","cil":"CIL","coffeescript":"CoffeeScript","csp":"Content-Security-Policy","css-extras":"CSS Extras","django":"Django/Jinja2","erb":"ERB","fsharp":"F#","gcode":"G-code","gedcom":"GEDCOM","glsl":"GLSL","gml":"GameMaker Language","graphql":"GraphQL","hcl":"HCL","http":"HTTP","hpkp":"HTTP Public-Key-Pins","hsts":"HTTP Strict-Transport-Security","ichigojam":"IchigoJam","inform7":"Inform 7","javastacktrace":"Java stack trace","json":"JSON","jsonp":"JSONP","latex":"LaTeX","livescript":"LiveScript","lolcode":"LOLCODE","markup-templating":"Markup templating","matlab":"MATLAB","mel":"MEL","n1ql":"N1QL","n4js":"N4JS","nasm":"NASM","nginx":"nginx","nsis":"NSIS","objectivec":"Objective-C","ocaml":"OCaml","opencl":"OpenCL","parigp":"PARI/GP","objectpascal":"Object Pascal","php":"PHP","php-extras":"PHP Extras","plsql":"PL/SQL","powershell":"PowerShell","properties":".properties","protobuf":"Protocol Buffers","q":"Q (kdb+ database)","jsx":"React JSX","tsx":"React TSX","renpy":"Ren'py","rest":"reST (reStructuredText)","sas":"SAS","sass":"Sass (Sass)","scss":"Sass (Scss)","sql":"SQL","soy":"Soy (Closure Template)","tap":"TAP","toml":"TOML","tt2":"Template Toolkit 2","typescript":"TypeScript","vbnet":"VB.Net","vhdl":"VHDL","vim":"vim","visual-basic":"Visual Basic","wasm":"WebAssembly","wiki":"Wiki markup","xeoracube":"XeoraCube","xojo":"Xojo (REALbasic)","xquery":"XQuery","yaml":"YAML"}/*]*/; +var Languages = /*languages_placeholder[*/{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","css":"CSS","clike":"C-like","javascript":"JavaScript","abap":"ABAP","actionscript":"ActionScript","apacheconf":"Apache Configuration","apl":"APL","applescript":"AppleScript","arff":"ARFF","asciidoc":"AsciiDoc","asm6502":"6502 Assembly","aspnet":"ASP.NET (C#)","autohotkey":"AutoHotkey","autoit":"AutoIt","shell":"Shell","basic":"BASIC","csharp":"C#","cpp":"C++","cil":"CIL","coffeescript":"CoffeeScript","csp":"Content-Security-Policy","css-extras":"CSS Extras","django":"Django/Jinja2","erb":"ERB","fsharp":"F#","gcode":"G-code","gedcom":"GEDCOM","glsl":"GLSL","gml":"GameMaker Language","graphql":"GraphQL","hcl":"HCL","http":"HTTP","hpkp":"HTTP Public-Key-Pins","hsts":"HTTP Strict-Transport-Security","ichigojam":"IchigoJam","inform7":"Inform 7","javastacktrace":"Java stack trace","json":"JSON","jsonp":"JSONP","latex":"LaTeX","livescript":"LiveScript","lolcode":"LOLCODE","markup-templating":"Markup templating","matlab":"MATLAB","mel":"MEL","n1ql":"N1QL","n4js":"N4JS","nand2tetris-hdl":"Nand To Tetris HDL","nasm":"NASM","nginx":"nginx","nsis":"NSIS","objectivec":"Objective-C","ocaml":"OCaml","opencl":"OpenCL","parigp":"PARI/GP","objectpascal":"Object Pascal","php":"PHP","php-extras":"PHP Extras","plsql":"PL/SQL","powershell":"PowerShell","properties":".properties","protobuf":"Protocol Buffers","q":"Q (kdb+ database)","jsx":"React JSX","tsx":"React TSX","renpy":"Ren'py","rest":"reST (reStructuredText)","sas":"SAS","sass":"Sass (Sass)","scss":"Sass (Scss)","sql":"SQL","soy":"Soy (Closure Template)","tap":"TAP","toml":"TOML","tt2":"Template Toolkit 2","typescript":"TypeScript","vbnet":"VB.Net","vhdl":"VHDL","vim":"vim","visual-basic":"Visual Basic","wasm":"WebAssembly","wiki":"Wiki markup","xeoracube":"XeoraCube","xojo":"Xojo (REALbasic)","xquery":"XQuery","yaml":"YAML"}/*]*/; Prism.plugins.toolbar.registerButton('show-language', function(env) { var pre = env.element.parentNode; if (!pre || !/pre/i.test(pre.nodeName)) { diff --git a/plugins/show-language/prism-show-language.min.js b/plugins/show-language/prism-show-language.min.js index c997a658cf..a577b16d0d 100644 --- a/plugins/show-language/prism-show-language.min.js +++ b/plugins/show-language/prism-show-language.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof self&&self.Prism&&self.document){if(!Prism.plugins.toolbar)return console.warn("Show Languages plugin loaded before Toolbar plugin."),void 0;var e={html:"HTML",xml:"XML",svg:"SVG",mathml:"MathML",css:"CSS",clike:"C-like",javascript:"JavaScript",abap:"ABAP",actionscript:"ActionScript",apacheconf:"Apache Configuration",apl:"APL",applescript:"AppleScript",arff:"ARFF",asciidoc:"AsciiDoc",asm6502:"6502 Assembly",aspnet:"ASP.NET (C#)",autohotkey:"AutoHotkey",autoit:"AutoIt",shell:"Shell",basic:"BASIC",csharp:"C#",cpp:"C++",cil:"CIL",coffeescript:"CoffeeScript",csp:"Content-Security-Policy","css-extras":"CSS Extras",django:"Django/Jinja2",erb:"ERB",fsharp:"F#",gcode:"G-code",gedcom:"GEDCOM",glsl:"GLSL",gml:"GameMaker Language",graphql:"GraphQL",hcl:"HCL",http:"HTTP",hpkp:"HTTP Public-Key-Pins",hsts:"HTTP Strict-Transport-Security",ichigojam:"IchigoJam",inform7:"Inform 7",javastacktrace:"Java stack trace",json:"JSON",jsonp:"JSONP",latex:"LaTeX",livescript:"LiveScript",lolcode:"LOLCODE","markup-templating":"Markup templating",matlab:"MATLAB",mel:"MEL",n1ql:"N1QL",n4js:"N4JS",nasm:"NASM",nginx:"nginx",nsis:"NSIS",objectivec:"Objective-C",ocaml:"OCaml",opencl:"OpenCL",parigp:"PARI/GP",objectpascal:"Object Pascal",php:"PHP","php-extras":"PHP Extras",plsql:"PL/SQL",powershell:"PowerShell",properties:".properties",protobuf:"Protocol Buffers",q:"Q (kdb+ database)",jsx:"React JSX",tsx:"React TSX",renpy:"Ren'py",rest:"reST (reStructuredText)",sas:"SAS",sass:"Sass (Sass)",scss:"Sass (Scss)",sql:"SQL",soy:"Soy (Closure Template)",tap:"TAP",toml:"TOML",tt2:"Template Toolkit 2",typescript:"TypeScript",vbnet:"VB.Net",vhdl:"VHDL",vim:"vim","visual-basic":"Visual Basic",wasm:"WebAssembly",wiki:"Wiki markup",xeoracube:"XeoraCube",xojo:"Xojo (REALbasic)",xquery:"XQuery",yaml:"YAML"};Prism.plugins.toolbar.registerButton("show-language",function(a){var t=a.element.parentNode;if(t&&/pre/i.test(t.nodeName)){var s=t.getAttribute("data-language")||e[a.language]||a.language&&a.language.substring(0,1).toUpperCase()+a.language.substring(1);if(s){var r=document.createElement("span");return r.textContent=s,r}}})}}(); \ No newline at end of file +!function(){if("undefined"!=typeof self&&self.Prism&&self.document){if(!Prism.plugins.toolbar)return console.warn("Show Languages plugin loaded before Toolbar plugin."),void 0;var e={html:"HTML",xml:"XML",svg:"SVG",mathml:"MathML",css:"CSS",clike:"C-like",javascript:"JavaScript",abap:"ABAP",actionscript:"ActionScript",apacheconf:"Apache Configuration",apl:"APL",applescript:"AppleScript",arff:"ARFF",asciidoc:"AsciiDoc",asm6502:"6502 Assembly",aspnet:"ASP.NET (C#)",autohotkey:"AutoHotkey",autoit:"AutoIt",shell:"Shell",basic:"BASIC",csharp:"C#",cpp:"C++",cil:"CIL",coffeescript:"CoffeeScript",csp:"Content-Security-Policy","css-extras":"CSS Extras",django:"Django/Jinja2",erb:"ERB",fsharp:"F#",gcode:"G-code",gedcom:"GEDCOM",glsl:"GLSL",gml:"GameMaker Language",graphql:"GraphQL",hcl:"HCL",http:"HTTP",hpkp:"HTTP Public-Key-Pins",hsts:"HTTP Strict-Transport-Security",ichigojam:"IchigoJam",inform7:"Inform 7",javastacktrace:"Java stack trace",json:"JSON",jsonp:"JSONP",latex:"LaTeX",livescript:"LiveScript",lolcode:"LOLCODE","markup-templating":"Markup templating",matlab:"MATLAB",mel:"MEL",n1ql:"N1QL",n4js:"N4JS","nand2tetris-hdl":"Nand To Tetris HDL",nasm:"NASM",nginx:"nginx",nsis:"NSIS",objectivec:"Objective-C",ocaml:"OCaml",opencl:"OpenCL",parigp:"PARI/GP",objectpascal:"Object Pascal",php:"PHP","php-extras":"PHP Extras",plsql:"PL/SQL",powershell:"PowerShell",properties:".properties",protobuf:"Protocol Buffers",q:"Q (kdb+ database)",jsx:"React JSX",tsx:"React TSX",renpy:"Ren'py",rest:"reST (reStructuredText)",sas:"SAS",sass:"Sass (Sass)",scss:"Sass (Scss)",sql:"SQL",soy:"Soy (Closure Template)",tap:"TAP",toml:"TOML",tt2:"Template Toolkit 2",typescript:"TypeScript",vbnet:"VB.Net",vhdl:"VHDL",vim:"vim","visual-basic":"Visual Basic",wasm:"WebAssembly",wiki:"Wiki markup",xeoracube:"XeoraCube",xojo:"Xojo (REALbasic)",xquery:"XQuery",yaml:"YAML"};Prism.plugins.toolbar.registerButton("show-language",function(a){var t=a.element.parentNode;if(t&&/pre/i.test(t.nodeName)){var s=t.getAttribute("data-language")||e[a.language]||a.language&&a.language.substring(0,1).toUpperCase()+a.language.substring(1);if(s){var r=document.createElement("span");return r.textContent=s,r}}})}}(); \ No newline at end of file diff --git a/tests/languages/nand2tetris-hdl/boolean_feature.test b/tests/languages/nand2tetris-hdl/boolean_feature.test new file mode 100644 index 0000000000..f1ddac690c --- /dev/null +++ b/tests/languages/nand2tetris-hdl/boolean_feature.test @@ -0,0 +1,13 @@ +true +false + +---------------------------------------------------- + +[ + ["boolean", "true"], + ["boolean", "false"] +] + +---------------------------------------------------- + +Checks for booleans. diff --git a/tests/languages/nand2tetris-hdl/comment_feature.test b/tests/languages/nand2tetris-hdl/comment_feature.test new file mode 100644 index 0000000000..d6ad93cf8e --- /dev/null +++ b/tests/languages/nand2tetris-hdl/comment_feature.test @@ -0,0 +1,20 @@ +// foobar +/**/ +/* foo +bar */ +/* + * foobar + */ + +---------------------------------------------------- + +[ + ["comment", "// foobar"], + ["comment", "/**/"], + ["comment", "/* foo\r\nbar */"], + ["comment", "/*\r\n * foobar\r\n */"] +] + +---------------------------------------------------- + +Checks for single-line and multi-line comments. diff --git a/tests/languages/nand2tetris-hdl/function_feature.test b/tests/languages/nand2tetris-hdl/function_feature.test new file mode 100644 index 0000000000..2b9bd2b0b1 --- /dev/null +++ b/tests/languages/nand2tetris-hdl/function_feature.test @@ -0,0 +1,23 @@ +And() +not() +mux16() + +---------------------------------------------------- + +[ + ["function", "And"], + ["punctuation", "("], + ["punctuation", ")"], + + ["function", "not"], + ["punctuation", "("], + ["punctuation", ")"], + + ["function", "mux16"], + ["punctuation", "("], + ["punctuation", ")"] +] + +---------------------------------------------------- + +Checks for functions. diff --git a/tests/languages/nand2tetris-hdl/keyword_feature.test b/tests/languages/nand2tetris-hdl/keyword_feature.test new file mode 100644 index 0000000000..509d1d913c --- /dev/null +++ b/tests/languages/nand2tetris-hdl/keyword_feature.test @@ -0,0 +1,21 @@ +CHIP +IN +OUT +PARTS +BUILTIN +CLOCKED + +---------------------------------------------------- + +[ + ["keyword", "CHIP"], + ["keyword", "IN"], + ["keyword", "OUT"], + ["keyword", "PARTS"], + ["keyword", "BUILTIN"], + ["keyword", "CLOCKED"] +] + +---------------------------------------------------- + +Checks for all keywords. diff --git a/tests/languages/nand2tetris-hdl/number_feature.test b/tests/languages/nand2tetris-hdl/number_feature.test new file mode 100644 index 0000000000..1817ffef5b --- /dev/null +++ b/tests/languages/nand2tetris-hdl/number_feature.test @@ -0,0 +1,15 @@ +0 +16 +32 + +---------------------------------------------------- + +[ + ["number", "0"], + ["number", "16"], + ["number", "32"] +] + +---------------------------------------------------- + +Checks for integer numbers. diff --git a/tests/languages/nand2tetris-hdl/operator_feature.test b/tests/languages/nand2tetris-hdl/operator_feature.test new file mode 100644 index 0000000000..50aa328451 --- /dev/null +++ b/tests/languages/nand2tetris-hdl/operator_feature.test @@ -0,0 +1,13 @@ += +.. + +---------------------------------------------------- + +[ + ["operator", "="], + ["operator", ".."] +] + +---------------------------------------------------- + +Checks for all operators. diff --git a/tests/languages/nand2tetris-hdl/punctuation_feature.test b/tests/languages/nand2tetris-hdl/punctuation_feature.test new file mode 100644 index 0000000000..a4941b7db6 --- /dev/null +++ b/tests/languages/nand2tetris-hdl/punctuation_feature.test @@ -0,0 +1,23 @@ +( ) +{ } +[ ] +, +; +: + +---------------------------------------------------- + +[ + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", "{"], + ["punctuation", "}"], + ["punctuation", "["], + ["punctuation", "]"], + ["punctuation", ","], + ["punctuation", ";"], + ["punctuation", ":"] +] +---------------------------------------------------- + +Checks for punctuation. From 44aeffb99cda38605c95a57258f96911d5346855 Mon Sep 17 00:00:00 2001 From: Kuldar Kalvik Date: Thu, 17 Jan 2019 17:52:02 +0100 Subject: [PATCH 0138/1100] Improved field highlighting for GraphQL (#1711) Adds highlighting for GraphQL fields with arguments. --- components/prism-graphql.js | 4 ++-- components/prism-graphql.min.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/components/prism-graphql.js b/components/prism-graphql.js index 62990585f5..5333ee39c5 100644 --- a/components/prism-graphql.js +++ b/components/prism-graphql.js @@ -11,7 +11,7 @@ Prism.languages.graphql = { pattern: /@[a-z_]\w*/i, alias: 'function' }, - 'attr-name': /[a-z_]\w*(?=\s*:)/i, + 'attr-name': /[a-z_]\w*(?=\s*(?:\([^()]*\))?:)/i, 'keyword': [ { pattern: /(fragment\s+(?!on)[a-z_]\w*\s+|\.{3}\s*)on\b/, @@ -21,4 +21,4 @@ Prism.languages.graphql = { ], 'operator': /!|=|\.{3}/, 'punctuation': /[!(){}\[\]:=,]/ -}; \ No newline at end of file +}; diff --git a/components/prism-graphql.min.js b/components/prism-graphql.min.js index d110e3e730..e02f4b1b6e 100644 --- a/components/prism-graphql.min.js +++ b/components/prism-graphql.min.js @@ -1 +1 @@ -Prism.languages.graphql={comment:/#.*/,string:{pattern:/"(?:\\.|[^\\"\r\n])*"/,greedy:!0},number:/(?:\B-|\b)\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,"boolean":/\b(?:true|false)\b/,variable:/\$[a-z_]\w*/i,directive:{pattern:/@[a-z_]\w*/i,alias:"function"},"attr-name":/[a-z_]\w*(?=\s*:)/i,keyword:[{pattern:/(fragment\s+(?!on)[a-z_]\w*\s+|\.{3}\s*)on\b/,lookbehind:!0},/\b(?:query|fragment|mutation)\b/],operator:/!|=|\.{3}/,punctuation:/[!(){}\[\]:=,]/}; \ No newline at end of file +Prism.languages.graphql={comment:/#.*/,string:{pattern:/"(?:\\.|[^\\"\r\n])*"/,greedy:!0},number:/(?:\B-|\b)\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,"boolean":/\b(?:true|false)\b/,variable:/\$[a-z_]\w*/i,directive:{pattern:/@[a-z_]\w*/i,alias:"function"},"attr-name":/[a-z_]\w*(?=\s*(?:\([^()]*\))?:)/i,keyword:[{pattern:/(fragment\s+(?!on)[a-z_]\w*\s+|\.{3}\s*)on\b/,lookbehind:!0},/\b(?:query|fragment|mutation)\b/],operator:/!|=|\.{3}/,punctuation:/[!(){}\[\]:=,]/}; \ No newline at end of file From 66f05ab0682eebd8dc12871ba2324e922097ccaf Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Thu, 17 Jan 2019 18:42:22 +0100 Subject: [PATCH 0139/1100] Deleted prism-hdl.min.js (#1712) This removes the extra prism-hdl.min.js. --- components/prism-hdl.min.js | 1 - 1 file changed, 1 deletion(-) delete mode 100644 components/prism-hdl.min.js diff --git a/components/prism-hdl.min.js b/components/prism-hdl.min.js deleted file mode 100644 index 20d2626c87..0000000000 --- a/components/prism-hdl.min.js +++ /dev/null @@ -1 +0,0 @@ -Prism.languages.hdl={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],keyword:/\b(?:CHIP|IN|OUT|PARTS|BUILTIN|CLOCKED)\b/,"boolean":/\b(?:true|false)\b/,number:/\b\d+\b/i,operator:/=/,punctuation:/[{}[\];(),.:]/}; \ No newline at end of file From e2d3bc7e335f567c9e1194109a76f36a6aaea86c Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Tue, 22 Jan 2019 00:39:55 +0100 Subject: [PATCH 0140/1100] Remove dead tutorial (#1702) This PR removes the [dead allblogtools.com tutorial][1]. [1]: http://www.allblogtools.com/tricks-and-hacks/beautify-source-codes-in-your-posts-with-prism-syntax-highlighter-for-blogger/ --- index.html | 1 - 1 file changed, 1 deletion(-) diff --git a/index.html b/index.html index de85e25c13..d6dbd01b5c 100644 --- a/index.html +++ b/index.html @@ -234,7 +234,6 @@

    Third-party tutorials

  • How To Implement Prism.js Syntax Highlighting Into Your WordPress Site
  • Adding a Syntax Highlighter Shortcode Using Prism.js | WPTuts+
  • Implement PrismJs Syntax Highlighting to your Blogger/BlogSpot
  • -
  • Beautify Source Codes In Your Posts With Prism Syntax Highlighter For Blogger
  • How To Re-Run Prism.js On AJAX Content
  • Highlight your code syntax with Prism.js
  • A code snippet content element powered by Prism.js for TYPO3 CMS
  • From 7eccea5c7d45d9039b576c28e2714bd4c843b9d3 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Tue, 22 Jan 2019 00:49:40 +0100 Subject: [PATCH 0141/1100] Improve C language (#1697) This PR adds support for [hexadecimal floating-point literals](http://www.cplusplus.com/doc/tutorial/structures/), and [`enum`](https://www.geeksforgeeks.org/enumeration-enum-c/) and [`struct`](https://www.tutorialspoint.com/cprogramming/c_structures.htm) class names. --- components/prism-c.js | 7 +- components/prism-c.min.js | 2 +- components/prism-cpp.js | 11 +- components/prism-cpp.min.js | 2 +- components/prism-objectivec.js | 2 + components/prism-objectivec.min.js | 2 +- tests/languages/c/class-name_feature.test | 17 + tests/languages/c/keyword_feature.test | 18 +- tests/languages/c/number_feature.test | 8 +- tests/languages/cpp/class-name_feature.test | 8 +- tests/languages/cpp/keyword_feature.test | 14 +- tests/languages/opencl/keyword_feature.test | 434 ++++++++++---------- 12 files changed, 281 insertions(+), 244 deletions(-) create mode 100644 tests/languages/c/class-name_feature.test diff --git a/components/prism-c.js b/components/prism-c.js index ea2452daaf..faa6c4981c 100644 --- a/components/prism-c.js +++ b/components/prism-c.js @@ -1,7 +1,11 @@ Prism.languages.c = Prism.languages.extend('clike', { + 'class-name': { + pattern: /(\b(?:enum|struct)\s+)\w+/, + lookbehind: true + }, 'keyword': /\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|asm|typeof|inline|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|union|unsigned|void|volatile|while)\b/, 'operator': />>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/, - 'number': /(?:\b0x[\da-f]+|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?)[ful]*/i + 'number': /(?:\b0x(?:[\da-f]+\.?[\da-f]*|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?)[ful]*/i }); Prism.languages.insertBefore('c', 'string', { @@ -29,5 +33,4 @@ Prism.languages.insertBefore('c', 'string', { 'constant': /\b(?:__FILE__|__LINE__|__DATE__|__TIME__|__TIMESTAMP__|__func__|EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|stdin|stdout|stderr)\b/ }); -delete Prism.languages.c['class-name']; delete Prism.languages.c['boolean']; diff --git a/components/prism-c.min.js b/components/prism-c.min.js index 78b49c98e8..2516c04747 100644 --- a/components/prism-c.min.js +++ b/components/prism-c.min.js @@ -1 +1 @@ -Prism.languages.c=Prism.languages.extend("clike",{keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|asm|typeof|inline|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|union|unsigned|void|volatile|while)\b/,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*\/%&|^!=<>]=?/,number:/(?:\b0x[\da-f]+|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?)[ful]*/i}),Prism.languages.insertBefore("c","string",{macro:{pattern:/(^\s*)#\s*[a-z]+(?:[^\r\n\\]|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,alias:"property",inside:{string:{pattern:/(#\s*include\s*)(?:<.+?>|("|')(?:\\?.)+?\2)/,lookbehind:!0},directive:{pattern:/(#\s*)\b(?:define|defined|elif|else|endif|error|ifdef|ifndef|if|import|include|line|pragma|undef|using)\b/,lookbehind:!0,alias:"keyword"}}},constant:/\b(?:__FILE__|__LINE__|__DATE__|__TIME__|__TIMESTAMP__|__func__|EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|stdin|stdout|stderr)\b/}),delete Prism.languages.c["class-name"],delete Prism.languages.c["boolean"]; \ No newline at end of file +Prism.languages.c=Prism.languages.extend("clike",{"class-name":{pattern:/(\b(?:enum|struct)\s+)\w+/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|asm|typeof|inline|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|union|unsigned|void|volatile|while)\b/,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*\/%&|^!=<>]=?/,number:/(?:\b0x(?:[\da-f]+\.?[\da-f]*|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?)[ful]*/i}),Prism.languages.insertBefore("c","string",{macro:{pattern:/(^\s*)#\s*[a-z]+(?:[^\r\n\\]|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,alias:"property",inside:{string:{pattern:/(#\s*include\s*)(?:<.+?>|("|')(?:\\?.)+?\2)/,lookbehind:!0},directive:{pattern:/(#\s*)\b(?:define|defined|elif|else|endif|error|ifdef|ifndef|if|import|include|line|pragma|undef|using)\b/,lookbehind:!0,alias:"keyword"}}},constant:/\b(?:__FILE__|__LINE__|__DATE__|__TIME__|__TIMESTAMP__|__func__|EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|stdin|stdout|stderr)\b/}),delete Prism.languages.c["boolean"]; \ No newline at end of file diff --git a/components/prism-cpp.js b/components/prism-cpp.js index 3d66ba252a..ba709be38e 100644 --- a/components/prism-cpp.js +++ b/components/prism-cpp.js @@ -1,16 +1,13 @@ Prism.languages.cpp = Prism.languages.extend('c', { + 'class-name': { + pattern: /(\b(?:class|enum|struct)\s+)\w+/, + lookbehind: true + }, 'keyword': /\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|class|compl|const|constexpr|const_cast|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|float|for|friend|goto|if|inline|int|int8_t|int16_t|int32_t|int64_t|uint8_t|uint16_t|uint32_t|uint64_t|long|mutable|namespace|new|noexcept|nullptr|operator|private|protected|public|register|reinterpret_cast|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/, 'boolean': /\b(?:true|false)\b/, 'operator': />>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/ }); -Prism.languages.insertBefore('cpp', 'keyword', { - 'class-name': { - pattern: /(class\s+)\w+/i, - lookbehind: true - } -}); - Prism.languages.insertBefore('cpp', 'string', { 'raw-string': { pattern: /R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/, diff --git a/components/prism-cpp.min.js b/components/prism-cpp.min.js index c0c6a0071c..3b7a981d9c 100644 --- a/components/prism-cpp.min.js +++ b/components/prism-cpp.min.js @@ -1 +1 @@ -Prism.languages.cpp=Prism.languages.extend("c",{keyword:/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|class|compl|const|constexpr|const_cast|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|float|for|friend|goto|if|inline|int|int8_t|int16_t|int32_t|int64_t|uint8_t|uint16_t|uint32_t|uint64_t|long|mutable|namespace|new|noexcept|nullptr|operator|private|protected|public|register|reinterpret_cast|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,"boolean":/\b(?:true|false)\b/,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*\/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/}),Prism.languages.insertBefore("cpp","keyword",{"class-name":{pattern:/(class\s+)\w+/i,lookbehind:!0}}),Prism.languages.insertBefore("cpp","string",{"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}); \ No newline at end of file +Prism.languages.cpp=Prism.languages.extend("c",{"class-name":{pattern:/(\b(?:class|enum|struct)\s+)\w+/,lookbehind:!0},keyword:/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|class|compl|const|constexpr|const_cast|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|float|for|friend|goto|if|inline|int|int8_t|int16_t|int32_t|int64_t|uint8_t|uint16_t|uint32_t|uint64_t|long|mutable|namespace|new|noexcept|nullptr|operator|private|protected|public|register|reinterpret_cast|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,"boolean":/\b(?:true|false)\b/,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*\/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/}),Prism.languages.insertBefore("cpp","string",{"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}); \ No newline at end of file diff --git a/components/prism-objectivec.js b/components/prism-objectivec.js index a9cf6980b4..b2ccb8775b 100644 --- a/components/prism-objectivec.js +++ b/components/prism-objectivec.js @@ -3,3 +3,5 @@ Prism.languages.objectivec = Prism.languages.extend('c', { 'string': /("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1|@"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/, 'operator': /-[->]?|\+\+?|!=?|<>?=?|==?|&&?|\|\|?|[~^%?*\/@]/ }); + +delete Prism.languages.objectivec['class-name']; diff --git a/components/prism-objectivec.min.js b/components/prism-objectivec.min.js index 4805fc9af1..d80cfb3dc0 100644 --- a/components/prism-objectivec.min.js +++ b/components/prism-objectivec.min.js @@ -1 +1 @@ -Prism.languages.objectivec=Prism.languages.extend("c",{keyword:/\b(?:asm|typeof|inline|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|union|unsigned|void|volatile|while|in|self|super)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/,string:/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1|@"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,operator:/-[->]?|\+\+?|!=?|<>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}); \ No newline at end of file +Prism.languages.objectivec=Prism.languages.extend("c",{keyword:/\b(?:asm|typeof|inline|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|union|unsigned|void|volatile|while|in|self|super)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/,string:/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1|@"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,operator:/-[->]?|\+\+?|!=?|<>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}),delete Prism.languages.objectivec["class-name"]; \ No newline at end of file diff --git a/tests/languages/c/class-name_feature.test b/tests/languages/c/class-name_feature.test new file mode 100644 index 0000000000..356fd0fd66 --- /dev/null +++ b/tests/languages/c/class-name_feature.test @@ -0,0 +1,17 @@ +struct foo +enum bar + +struct foo var; + +---------------------------------------------------- + +[ + ["keyword", "struct"], ["class-name", "foo"], + ["keyword", "enum"], ["class-name", "bar"], + + ["keyword", "struct"], ["class-name", "foo"], " var", ["punctuation", ";"] +] + +---------------------------------------------------- + +Checks for structs and enums. diff --git a/tests/languages/c/keyword_feature.test b/tests/languages/c/keyword_feature.test index feb9ff9377..29077e875a 100644 --- a/tests/languages/c/keyword_feature.test +++ b/tests/languages/c/keyword_feature.test @@ -3,27 +3,31 @@ _Complex _Generic _Imaginary _Noreturn _Static_assert _Thread_local asm typeof inline auto break case char const continue default -do double else enum extern +do double else enum; +extern float for goto if int long register return short signed -sizeof static struct switch typedef +sizeof static struct; +switch typedef union unsigned void volatile while ---------------------------------------------------- [ ["keyword", "_Alignas"], ["keyword", "_Alignof"], ["keyword", "_Atomic"], ["keyword", "_Bool"], - ["keyword", "_Complex"], ["keyword", "_Generic"], ["keyword", "_Imaginary"], - ["keyword", "_Noreturn"], ["keyword", "_Static_assert"], ["keyword", "_Thread_local"], + ["keyword", "_Complex"], ["keyword", "_Generic"], ["keyword", "_Imaginary"], + ["keyword", "_Noreturn"], ["keyword", "_Static_assert"], ["keyword", "_Thread_local"], ["keyword", "asm"], ["keyword", "typeof"], ["keyword", "inline"], ["keyword", "auto"], ["keyword", "break"], ["keyword", "case"], ["keyword", "char"], ["keyword", "const"], ["keyword", "continue"], ["keyword", "default"], - ["keyword", "do"], ["keyword", "double"], ["keyword", "else"], ["keyword", "enum"], ["keyword", "extern"], + ["keyword", "do"], ["keyword", "double"], ["keyword", "else"], ["keyword", "enum"], ["punctuation", ";"], + ["keyword", "extern"], ["keyword", "float"], ["keyword", "for"], ["keyword", "goto"], ["keyword", "if"], ["keyword", "int"], ["keyword", "long"], ["keyword", "register"], ["keyword", "return"], ["keyword", "short"], ["keyword", "signed"], - ["keyword", "sizeof"], ["keyword", "static"], ["keyword", "struct"], ["keyword", "switch"], ["keyword", "typedef"], + ["keyword", "sizeof"], ["keyword", "static"], ["keyword", "struct"], ["punctuation", ";"], + ["keyword", "switch"], ["keyword", "typedef"], ["keyword", "union"], ["keyword", "unsigned"], ["keyword", "void"], ["keyword", "volatile"], ["keyword", "while"] ] ---------------------------------------------------- -Checks for all keywords. \ No newline at end of file +Checks for all keywords. diff --git a/tests/languages/c/number_feature.test b/tests/languages/c/number_feature.test index 0542683404..c2975870c6 100644 --- a/tests/languages/c/number_feature.test +++ b/tests/languages/c/number_feature.test @@ -5,6 +5,9 @@ 0.4e+2 0xbabe 0xBABE +0x1.2 +0x0.3p-3 +0x0.3p4L 42f 42F 42u @@ -22,6 +25,9 @@ ["number", "0.4e+2"], ["number", "0xbabe"], ["number", "0xBABE"], + ["number", "0x1.2"], + ["number", "0x0.3p-3"], + ["number", "0x0.3p4L"], ["number", "42f"], ["number", "42F"], ["number", "42u"], @@ -32,4 +38,4 @@ ---------------------------------------------------- -Checks for decimal numbers and hexadecimal numbers. \ No newline at end of file +Checks for decimal numbers and hexadecimal numbers. diff --git a/tests/languages/cpp/class-name_feature.test b/tests/languages/cpp/class-name_feature.test index f3d5df5f63..e61733c3ce 100644 --- a/tests/languages/cpp/class-name_feature.test +++ b/tests/languages/cpp/class-name_feature.test @@ -1,13 +1,17 @@ class Foo class Foo_bar +struct foo +enum bar ---------------------------------------------------- [ ["keyword", "class"], ["class-name", "Foo"], - ["keyword", "class"], ["class-name", "Foo_bar"] + ["keyword", "class"], ["class-name", "Foo_bar"], + ["keyword", "struct"], ["class-name", "foo"], + ["keyword", "enum"], ["class-name", "bar"] ] ---------------------------------------------------- -Checks for class names. \ No newline at end of file +Checks for class names. diff --git a/tests/languages/cpp/keyword_feature.test b/tests/languages/cpp/keyword_feature.test index 180f68ef09..b782149ce7 100644 --- a/tests/languages/cpp/keyword_feature.test +++ b/tests/languages/cpp/keyword_feature.test @@ -4,14 +4,16 @@ class; compl const constexpr const_cast continue decltype default delete do double dynamic_cast -else enum explicit export extern +else enum; +explicit export extern float for friend goto if inline int long mutable namespace new noexcept nullptr operator private protected public register reinterpret_cast return short signed sizeof static static_assert -static_cast struct switch template +static_cast struct; +switch template this thread_local throw try typedef typeid typename union unsigned using virtual void @@ -28,14 +30,16 @@ uint8_t uint16_t uint32_t uint64_t ["keyword", "compl"], ["keyword", "const"], ["keyword", "constexpr"], ["keyword", "const_cast"], ["keyword", "continue"], ["keyword", "decltype"], ["keyword", "default"], ["keyword", "delete"], ["keyword", "do"], ["keyword", "double"], ["keyword", "dynamic_cast"], - ["keyword", "else"], ["keyword", "enum"], ["keyword", "explicit"], ["keyword", "export"], ["keyword", "extern"], + ["keyword", "else"], ["keyword", "enum"], ["punctuation", ";"], + ["keyword", "explicit"], ["keyword", "export"], ["keyword", "extern"], ["keyword", "float"], ["keyword", "for"], ["keyword", "friend"], ["keyword", "goto"], ["keyword", "if"], ["keyword", "inline"], ["keyword", "int"], ["keyword", "long"], ["keyword", "mutable"], ["keyword", "namespace"], ["keyword", "new"], ["keyword", "noexcept"], ["keyword", "nullptr"], ["keyword", "operator"], ["keyword", "private"], ["keyword", "protected"], ["keyword", "public"], ["keyword", "register"], ["keyword", "reinterpret_cast"], ["keyword", "return"], ["keyword", "short"], ["keyword", "signed"], ["keyword", "sizeof"], ["keyword", "static"], ["keyword", "static_assert"], - ["keyword", "static_cast"], ["keyword", "struct"], ["keyword", "switch"], ["keyword", "template"], + ["keyword", "static_cast"], ["keyword", "struct"], ["punctuation", ";"], + ["keyword", "switch"], ["keyword", "template"], ["keyword", "this"], ["keyword", "thread_local"], ["keyword", "throw"], ["keyword", "try"], ["keyword", "typedef"], ["keyword", "typeid"], ["keyword", "typename"], ["keyword", "union"], ["keyword", "unsigned"], ["keyword", "using"], ["keyword", "virtual"], ["keyword", "void"], @@ -46,4 +50,4 @@ uint8_t uint16_t uint32_t uint64_t ---------------------------------------------------- -Checks for all keywords \ No newline at end of file +Checks for all keywords. diff --git a/tests/languages/opencl/keyword_feature.test b/tests/languages/opencl/keyword_feature.test index 47613f7b00..b171c054e5 100644 --- a/tests/languages/opencl/keyword_feature.test +++ b/tests/languages/opencl/keyword_feature.test @@ -71,7 +71,7 @@ double8x2 double8x4 double8x8 else -enum +enum; event_t extern float @@ -168,7 +168,7 @@ short4 short8 size_t static -struct +struct; switch typedef uchar @@ -202,218 +202,218 @@ ushort8 void volatile while -write_only - ----------------------------------------------------- - -[ - ["keyword", "__attribute__"], - ["keyword", "__constant"], - ["keyword", "__global"], - ["keyword", "__kernel"], - ["keyword", "__local"], - ["keyword", "__private"], - ["keyword", "__read_only"], - ["keyword", "__read_write"], - ["keyword", "__write_only"], - ["keyword", "_cl_command_queue"], - ["keyword", "_cl_context"], - ["keyword", "_cl_device_id"], - ["keyword", "_cl_event"], - ["keyword", "_cl_kernel"], - ["keyword", "_cl_mem"], - ["keyword", "_cl_platform_id"], - ["keyword", "_cl_program"], - ["keyword", "_cl_sampler"], - ["keyword", "auto"], - ["keyword", "bool"], - ["keyword", "bool16"], - ["keyword", "bool2"], - ["keyword", "bool3"], - ["keyword", "bool4"], - ["keyword", "bool8"], - ["keyword", "break"], - ["keyword", "case"], - ["keyword", "char"], - ["keyword", "char16"], - ["keyword", "char2"], - ["keyword", "char3"], - ["keyword", "char4"], - ["keyword", "char8"], - ["keyword", "cl_image_format"], - ["keyword", "cl_mem_fence_flags"], - ["keyword", "clk_event_t"], - ["keyword", "complex"], - ["keyword", "const"], - ["keyword", "constant"], - ["keyword", "continue"], - ["keyword", "do"], - ["keyword", "double"], - ["keyword", "double16"], - ["keyword", "double16x1"], - ["keyword", "double16x16"], - ["keyword", "double16x2"], - ["keyword", "double16x4"], - ["keyword", "double16x8"], - ["keyword", "double1x1"], - ["keyword", "double1x16"], - ["keyword", "double1x2"], - ["keyword", "double1x4"], - ["keyword", "double1x8"], - ["keyword", "double2"], - ["keyword", "double2x1"], - ["keyword", "double2x16"], - ["keyword", "double2x2"], - ["keyword", "double2x4"], - ["keyword", "double2x8"], - ["keyword", "double3"], - ["keyword", "double4"], - ["keyword", "double4x1"], - ["keyword", "double4x16"], - ["keyword", "double4x2"], - ["keyword", "double4x4"], - ["keyword", "double4x8"], - ["keyword", "double8"], - ["keyword", "double8x1"], - ["keyword", "double8x16"], - ["keyword", "double8x2"], - ["keyword", "double8x4"], - ["keyword", "double8x8"], - ["keyword", "else"], - ["keyword", "enum"], - ["keyword", "event_t"], - ["keyword", "extern"], - ["keyword", "float"], - ["keyword", "float16"], - ["keyword", "float16x1"], - ["keyword", "float16x16"], - ["keyword", "float16x2"], - ["keyword", "float16x4"], - ["keyword", "float16x8"], - ["keyword", "float1x1"], - ["keyword", "float1x16"], - ["keyword", "float1x2"], - ["keyword", "float1x4"], - ["keyword", "float1x8"], - ["keyword", "float2"], - ["keyword", "float2x1"], - ["keyword", "float2x16"], - ["keyword", "float2x2"], - ["keyword", "float2x4"], - ["keyword", "float2x8"], - ["keyword", "float3"], - ["keyword", "float4"], - ["keyword", "float4x1"], - ["keyword", "float4x16"], - ["keyword", "float4x2"], - ["keyword", "float4x4"], - ["keyword", "float4x8"], - ["keyword", "float8"], - ["keyword", "float8x1"], - ["keyword", "float8x16"], - ["keyword", "float8x2"], - ["keyword", "float8x4"], - ["keyword", "float8x8"], - ["keyword", "for"], - ["keyword", "global"], - ["keyword", "half"], - ["keyword", "half16"], - ["keyword", "half2"], - ["keyword", "half3"], - ["keyword", "half4"], - ["keyword", "half8"], - ["keyword", "if"], - ["keyword", "image1d_array_t"], - ["keyword", "image1d_buffer_t"], - ["keyword", "image1d_t"], - ["keyword", "image2d_array_depth_t"], - ["keyword", "image2d_array_msaa_depth_t"], - ["keyword", "image2d_array_msaa_t"], - ["keyword", "image2d_array_t"], - ["keyword", "image2d_depth_t"], - ["keyword", "image2d_msaa_depth_t"], - ["keyword", "image2d_msaa_t"], - ["keyword", "image2d_t"], - ["keyword", "image3d_t"], - ["keyword", "imaginary"], - ["keyword", "int"], - ["keyword", "int16"], - ["keyword", "int2"], - ["keyword", "int3"], - ["keyword", "int4"], - ["keyword", "int8"], - ["keyword", "intptr_t"], - ["keyword", "kernel"], - ["keyword", "local"], - ["keyword", "long"], - ["keyword", "long16"], - ["keyword", "long2"], - ["keyword", "long3"], - ["keyword", "long4"], - ["keyword", "long8"], - ["keyword", "ndrange_t"], - ["keyword", "packed"], - ["keyword", "pipe"], - ["keyword", "private"], - ["keyword", "ptrdiff_t"], - ["keyword", "quad"], - ["keyword", "quad16"], - ["keyword", "quad2"], - ["keyword", "quad3"], - ["keyword", "quad4"], - ["keyword", "quad8"], - ["keyword", "queue_t"], - ["keyword", "read_only"], - ["keyword", "read_write"], - ["keyword", "register"], - ["keyword", "reserve_id_t"], - ["keyword", "restrict"], - ["keyword", "sampler_t"], - ["keyword", "short"], - ["keyword", "short16"], - ["keyword", "short2"], - ["keyword", "short3"], - ["keyword", "short4"], - ["keyword", "short8"], - ["keyword", "size_t"], - ["keyword", "static"], - ["keyword", "struct"], - ["keyword", "switch"], - ["keyword", "typedef"], - ["keyword", "uchar"], - ["keyword", "uchar16"], - ["keyword", "uchar2"], - ["keyword", "uchar3"], - ["keyword", "uchar4"], - ["keyword", "uchar8"], - ["keyword", "uint"], - ["keyword", "uint16"], - ["keyword", "uint2"], - ["keyword", "uint3"], - ["keyword", "uint4"], - ["keyword", "uint8"], - ["keyword", "uintptr_t"], - ["keyword", "ulong"], - ["keyword", "ulong16"], - ["keyword", "ulong2"], - ["keyword", "ulong3"], - ["keyword", "ulong4"], - ["keyword", "ulong8"], - ["keyword", "uniform"], - ["keyword", "union"], - ["keyword", "unsigned"], - ["keyword", "ushort"], - ["keyword", "ushort16"], - ["keyword", "ushort2"], - ["keyword", "ushort3"], - ["keyword", "ushort4"], - ["keyword", "ushort8"], - ["keyword", "void"], - ["keyword", "volatile"], - ["keyword", "while"], - ["keyword", "write_only"] -] - ----------------------------------------------------- - -Checks for all keywords in OpenCL kernel code. \ No newline at end of file +write_only + +---------------------------------------------------- + +[ + ["keyword", "__attribute__"], + ["keyword", "__constant"], + ["keyword", "__global"], + ["keyword", "__kernel"], + ["keyword", "__local"], + ["keyword", "__private"], + ["keyword", "__read_only"], + ["keyword", "__read_write"], + ["keyword", "__write_only"], + ["keyword", "_cl_command_queue"], + ["keyword", "_cl_context"], + ["keyword", "_cl_device_id"], + ["keyword", "_cl_event"], + ["keyword", "_cl_kernel"], + ["keyword", "_cl_mem"], + ["keyword", "_cl_platform_id"], + ["keyword", "_cl_program"], + ["keyword", "_cl_sampler"], + ["keyword", "auto"], + ["keyword", "bool"], + ["keyword", "bool16"], + ["keyword", "bool2"], + ["keyword", "bool3"], + ["keyword", "bool4"], + ["keyword", "bool8"], + ["keyword", "break"], + ["keyword", "case"], + ["keyword", "char"], + ["keyword", "char16"], + ["keyword", "char2"], + ["keyword", "char3"], + ["keyword", "char4"], + ["keyword", "char8"], + ["keyword", "cl_image_format"], + ["keyword", "cl_mem_fence_flags"], + ["keyword", "clk_event_t"], + ["keyword", "complex"], + ["keyword", "const"], + ["keyword", "constant"], + ["keyword", "continue"], + ["keyword", "do"], + ["keyword", "double"], + ["keyword", "double16"], + ["keyword", "double16x1"], + ["keyword", "double16x16"], + ["keyword", "double16x2"], + ["keyword", "double16x4"], + ["keyword", "double16x8"], + ["keyword", "double1x1"], + ["keyword", "double1x16"], + ["keyword", "double1x2"], + ["keyword", "double1x4"], + ["keyword", "double1x8"], + ["keyword", "double2"], + ["keyword", "double2x1"], + ["keyword", "double2x16"], + ["keyword", "double2x2"], + ["keyword", "double2x4"], + ["keyword", "double2x8"], + ["keyword", "double3"], + ["keyword", "double4"], + ["keyword", "double4x1"], + ["keyword", "double4x16"], + ["keyword", "double4x2"], + ["keyword", "double4x4"], + ["keyword", "double4x8"], + ["keyword", "double8"], + ["keyword", "double8x1"], + ["keyword", "double8x16"], + ["keyword", "double8x2"], + ["keyword", "double8x4"], + ["keyword", "double8x8"], + ["keyword", "else"], + ["keyword", "enum"], ["punctuation", ";"], + ["keyword", "event_t"], + ["keyword", "extern"], + ["keyword", "float"], + ["keyword", "float16"], + ["keyword", "float16x1"], + ["keyword", "float16x16"], + ["keyword", "float16x2"], + ["keyword", "float16x4"], + ["keyword", "float16x8"], + ["keyword", "float1x1"], + ["keyword", "float1x16"], + ["keyword", "float1x2"], + ["keyword", "float1x4"], + ["keyword", "float1x8"], + ["keyword", "float2"], + ["keyword", "float2x1"], + ["keyword", "float2x16"], + ["keyword", "float2x2"], + ["keyword", "float2x4"], + ["keyword", "float2x8"], + ["keyword", "float3"], + ["keyword", "float4"], + ["keyword", "float4x1"], + ["keyword", "float4x16"], + ["keyword", "float4x2"], + ["keyword", "float4x4"], + ["keyword", "float4x8"], + ["keyword", "float8"], + ["keyword", "float8x1"], + ["keyword", "float8x16"], + ["keyword", "float8x2"], + ["keyword", "float8x4"], + ["keyword", "float8x8"], + ["keyword", "for"], + ["keyword", "global"], + ["keyword", "half"], + ["keyword", "half16"], + ["keyword", "half2"], + ["keyword", "half3"], + ["keyword", "half4"], + ["keyword", "half8"], + ["keyword", "if"], + ["keyword", "image1d_array_t"], + ["keyword", "image1d_buffer_t"], + ["keyword", "image1d_t"], + ["keyword", "image2d_array_depth_t"], + ["keyword", "image2d_array_msaa_depth_t"], + ["keyword", "image2d_array_msaa_t"], + ["keyword", "image2d_array_t"], + ["keyword", "image2d_depth_t"], + ["keyword", "image2d_msaa_depth_t"], + ["keyword", "image2d_msaa_t"], + ["keyword", "image2d_t"], + ["keyword", "image3d_t"], + ["keyword", "imaginary"], + ["keyword", "int"], + ["keyword", "int16"], + ["keyword", "int2"], + ["keyword", "int3"], + ["keyword", "int4"], + ["keyword", "int8"], + ["keyword", "intptr_t"], + ["keyword", "kernel"], + ["keyword", "local"], + ["keyword", "long"], + ["keyword", "long16"], + ["keyword", "long2"], + ["keyword", "long3"], + ["keyword", "long4"], + ["keyword", "long8"], + ["keyword", "ndrange_t"], + ["keyword", "packed"], + ["keyword", "pipe"], + ["keyword", "private"], + ["keyword", "ptrdiff_t"], + ["keyword", "quad"], + ["keyword", "quad16"], + ["keyword", "quad2"], + ["keyword", "quad3"], + ["keyword", "quad4"], + ["keyword", "quad8"], + ["keyword", "queue_t"], + ["keyword", "read_only"], + ["keyword", "read_write"], + ["keyword", "register"], + ["keyword", "reserve_id_t"], + ["keyword", "restrict"], + ["keyword", "sampler_t"], + ["keyword", "short"], + ["keyword", "short16"], + ["keyword", "short2"], + ["keyword", "short3"], + ["keyword", "short4"], + ["keyword", "short8"], + ["keyword", "size_t"], + ["keyword", "static"], + ["keyword", "struct"], ["punctuation", ";"], + ["keyword", "switch"], + ["keyword", "typedef"], + ["keyword", "uchar"], + ["keyword", "uchar16"], + ["keyword", "uchar2"], + ["keyword", "uchar3"], + ["keyword", "uchar4"], + ["keyword", "uchar8"], + ["keyword", "uint"], + ["keyword", "uint16"], + ["keyword", "uint2"], + ["keyword", "uint3"], + ["keyword", "uint4"], + ["keyword", "uint8"], + ["keyword", "uintptr_t"], + ["keyword", "ulong"], + ["keyword", "ulong16"], + ["keyword", "ulong2"], + ["keyword", "ulong3"], + ["keyword", "ulong4"], + ["keyword", "ulong8"], + ["keyword", "uniform"], + ["keyword", "union"], + ["keyword", "unsigned"], + ["keyword", "ushort"], + ["keyword", "ushort16"], + ["keyword", "ushort2"], + ["keyword", "ushort3"], + ["keyword", "ushort4"], + ["keyword", "ushort8"], + ["keyword", "void"], + ["keyword", "volatile"], + ["keyword", "while"], + ["keyword", "write_only"] +] + +---------------------------------------------------- + +Checks for all keywords in OpenCL kernel code. From dbd3555e8893c4422f41605e69374d81d6bd832f Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Tue, 22 Jan 2019 00:53:23 +0100 Subject: [PATCH 0142/1100] Fix downloads page fetching from GitHub(#1684) This resolves #1624. Fixes the missing examples for newly added language in the [example page](https://prismjs.com/examples.html). --- download.js | 2 +- examples.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/download.js b/download.js index 054da79d33..c9f7696119 100644 --- a/download.js +++ b/download.js @@ -10,7 +10,7 @@ var minified = true; var dependencies = {}; -var treeURL = 'https://api.github.com/repos/PrismJS/prism/git/trees/gh-pages?recursive=1'; +var treeURL = 'https://api.github.com/repos/PrismJS/prism/git/trees/master?recursive=1'; var treePromise = new Promise(function(resolve) { $u.xhr({ url: treeURL, diff --git a/examples.js b/examples.js index ba275c5559..8006f246d9 100644 --- a/examples.js +++ b/examples.js @@ -6,7 +6,7 @@ var examples = {}; -var treeURL = 'https://api.github.com/repos/PrismJS/prism/git/trees/gh-pages?recursive=1'; +var treeURL = 'https://api.github.com/repos/PrismJS/prism/git/trees/master?recursive=1'; var treePromise = new Promise(function (resolve) { $u.xhr({ url: treeURL, From 28489698619a5ccc249a1ef386316523f67fe666 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Tue, 22 Jan 2019 01:17:50 +0100 Subject: [PATCH 0143/1100] Cleanup JSONP highlight code (#1674) Document, refactor and format the JSONP Highlighting plugin. --- .../jsonp-highlight/prism-jsonp-highlight.js | 155 +++++++++++------- .../prism-jsonp-highlight.min.js | 2 +- 2 files changed, 97 insertions(+), 60 deletions(-) diff --git a/plugins/jsonp-highlight/prism-jsonp-highlight.js b/plugins/jsonp-highlight/prism-jsonp-highlight.js index 4ce5ca5081..14ac205ad5 100644 --- a/plugins/jsonp-highlight/prism-jsonp-highlight.js +++ b/plugins/jsonp-highlight/prism-jsonp-highlight.js @@ -1,44 +1,67 @@ -(function() { - if ( !self.Prism || !self.document || !document.querySelectorAll || ![].filter) return; +(function () { + if (!self.Prism || !self.document || !document.querySelectorAll || ![].filter) return; + /** + * The list of adapter which will be used if `data-adapter` is not specified. + * + * @type {Array.<(response: any, pre?: HTMLPreElement) => string>} + */ var adapters = []; + + /** + * Adds a new function to the list of adapters. + * + * If the given adapter is already registered or not a function, nothing will happen. + * + * @param {(response: any, pre?: HTMLPreElement) => string} adapter The adapter to be registered. + */ function registerAdapter(adapter) { if (typeof adapter === "function" && !getAdapter(adapter)) { adapters.push(adapter); } } + /** + * Returns the given adapter itself, if registered, or a registered adapter with the given function name. + * + * If no fitting adapter is registered, `null` will be returned. + * + * @param {string|Function} adapter The adapter itself or the function name of an adapter. + * @returns {(response: any, pre?: HTMLPreElement) => string} A registered adapter or `null`. + */ function getAdapter(adapter) { if (typeof adapter === "function") { - return adapters.filter(function(fn) { return fn.valueOf() === adapter.valueOf()})[0]; + return adapters.filter(function (fn) { return fn.valueOf() === adapter.valueOf(); })[0]; } else if (typeof adapter === "string" && adapter.length > 0) { - return adapters.filter(function(fn) { return fn.name === adapter})[0]; + return adapters.filter(function (fn) { return fn.name === adapter; })[0]; } return null; } + /** + * Remove the given adapter or the first registered adapter with the given function name from the list of + * registered adapters. + * + * @param {string|Function} adapter The adapter itself or the function name of an adapter. + */ function removeAdapter(adapter) { - if (typeof adapter === "string") + if (typeof adapter === "string") { adapter = getAdapter(adapter); + } if (typeof adapter === "function") { var index = adapters.indexOf(adapter); - if (index >=0) { - adapters.splice(index,1); + if (index >= 0) { + adapters.splice(index, 1); } } } - Prism.plugins.jsonphighlight = { - registerAdapter: registerAdapter, - removeAdapter: removeAdapter, - highlight: highlight - }; registerAdapter(function github(rsp, el) { - if ( rsp && rsp.meta && rsp.data ) { - if ( rsp.meta.status && rsp.meta.status >= 400 ) { - return "Error: " + ( rsp.data.message || rsp.meta.status ); + if (rsp && rsp.meta && rsp.data) { + if (rsp.meta.status && rsp.meta.status >= 400) { + return "Error: " + (rsp.data.message || rsp.meta.status); } - else if ( typeof(rsp.data.content) === "string" ) { - return typeof(atob) === "function" + else if (typeof (rsp.data.content) === "string") { + return typeof (atob) === "function" ? atob(rsp.data.content.replace(/\s/g, "")) : "Your browser cannot decode base64"; } @@ -46,91 +69,99 @@ return null; }); registerAdapter(function gist(rsp, el) { - if ( rsp && rsp.meta && rsp.data && rsp.data.files ) { - if ( rsp.meta.status && rsp.meta.status >= 400 ) { - return "Error: " + ( rsp.data.message || rsp.meta.status ); + if (rsp && rsp.meta && rsp.data && rsp.data.files) { + if (rsp.meta.status && rsp.meta.status >= 400) { + return "Error: " + (rsp.data.message || rsp.meta.status); } - else { - var filename = el.getAttribute("data-filename"); - if (filename == null) { - // Maybe in the future we can somehow render all files - // But the standard - \ No newline at end of file + From 4362e42cd4c0271abd976145a85098092a51db80 Mon Sep 17 00:00:00 2001 From: Rex Zeng Date: Tue, 12 Feb 2019 23:30:14 +0800 Subject: [PATCH 0159/1100] Support JSX/TSX class-name with dot (#1725) Adds class-name highlighting for JSX/TSX tag names containing dots. --- components/prism-jsx.js | 2 +- components/prism-jsx.min.js | 2 +- tests/languages/jsx/tag_feature.test | 22 ++++++++++++++++++++++ tests/languages/tsx/tag_feature.test | 23 +++++++++++++++++++++++ 4 files changed, 47 insertions(+), 2 deletions(-) diff --git a/components/prism-jsx.js b/components/prism-jsx.js index 970acb7402..57e483eb90 100644 --- a/components/prism-jsx.js +++ b/components/prism-jsx.js @@ -7,7 +7,7 @@ Prism.languages.jsx.tag.pattern= /<\/?(?:[\w.:-]+\s*(?:\s+(?:[\w.:-]+(?:=(?:("|' Prism.languages.jsx.tag.inside['tag'].pattern = /^<\/?[^\s>\/]*/i; Prism.languages.jsx.tag.inside['attr-value'].pattern = /=(?!\{)(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s'">]+)/i; -Prism.languages.jsx.tag.inside['tag'].inside['class-name'] = /^[A-Z]\w*$/; +Prism.languages.jsx.tag.inside['tag'].inside['class-name'] = /^[A-Z]\w*(?:\.[A-Z]\w*)*$/; Prism.languages.insertBefore('inside', 'attr-name', { 'spread': { diff --git a/components/prism-jsx.min.js b/components/prism-jsx.min.js index 188971840c..6653a12283 100644 --- a/components/prism-jsx.min.js +++ b/components/prism-jsx.min.js @@ -1 +1 @@ -!function(t){var n=t.util.clone(t.languages.javascript);t.languages.jsx=t.languages.extend("markup",n),t.languages.jsx.tag.pattern=/<\/?(?:[\w.:-]+\s*(?:\s+(?:[\w.:-]+(?:=(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s{'">=]+|\{(?:\{(?:\{[^}]*\}|[^{}])*\}|[^{}])+\}))?|\{\.{3}[a-z_$][\w$]*(?:\.[a-z_$][\w$]*)*\}))*\s*\/?)?>/i,t.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/i,t.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s'">]+)/i,t.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*$/,t.languages.insertBefore("inside","attr-name",{spread:{pattern:/\{\.{3}[a-z_$][\w$]*(?:\.[a-z_$][\w$]*)*\}/,inside:{punctuation:/\.{3}|[{}.]/,"attr-value":/\w+/}}},t.languages.jsx.tag),t.languages.insertBefore("inside","attr-value",{script:{pattern:/=(\{(?:\{(?:\{[^}]*\}|[^}])*\}|[^}])+\})/i,inside:{"script-punctuation":{pattern:/^=(?={)/,alias:"punctuation"},rest:t.languages.jsx},alias:"language-javascript"}},t.languages.jsx.tag);var e=function(t){return t?"string"==typeof t?t:"string"==typeof t.content?t.content:t.content.map(e).join(""):""},a=function(n){for(var s=[],g=0;g0&&s[s.length-1].tagName===e(i.content[0].content[1])&&s.pop():"/>"===i.content[i.content.length-1].content||s.push({tagName:e(i.content[0].content[1]),openedBraces:0}):s.length>0&&"punctuation"===i.type&&"{"===i.content?s[s.length-1].openedBraces++:s.length>0&&s[s.length-1].openedBraces>0&&"punctuation"===i.type&&"}"===i.content?s[s.length-1].openedBraces--:o=!0),(o||"string"==typeof i)&&s.length>0&&0===s[s.length-1].openedBraces){var p=e(i);g0&&("string"==typeof n[g-1]||"plain-text"===n[g-1].type)&&(p=e(n[g-1])+p,n.splice(g-1,1),g--),n[g]=new t.Token("plain-text",p,null,p)}i.content&&"string"!=typeof i.content&&a(i.content)}};t.hooks.add("after-tokenize",function(t){("jsx"===t.language||"tsx"===t.language)&&a(t.tokens)})}(Prism); \ No newline at end of file +!function(t){var n=t.util.clone(t.languages.javascript);t.languages.jsx=t.languages.extend("markup",n),t.languages.jsx.tag.pattern=/<\/?(?:[\w.:-]+\s*(?:\s+(?:[\w.:-]+(?:=(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s{'">=]+|\{(?:\{(?:\{[^}]*\}|[^{}])*\}|[^{}])+\}))?|\{\.{3}[a-z_$][\w$]*(?:\.[a-z_$][\w$]*)*\}))*\s*\/?)?>/i,t.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/i,t.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s'">]+)/i,t.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,t.languages.insertBefore("inside","attr-name",{spread:{pattern:/\{\.{3}[a-z_$][\w$]*(?:\.[a-z_$][\w$]*)*\}/,inside:{punctuation:/\.{3}|[{}.]/,"attr-value":/\w+/}}},t.languages.jsx.tag),t.languages.insertBefore("inside","attr-value",{script:{pattern:/=(\{(?:\{(?:\{[^}]*\}|[^}])*\}|[^}])+\})/i,inside:{"script-punctuation":{pattern:/^=(?={)/,alias:"punctuation"},rest:t.languages.jsx},alias:"language-javascript"}},t.languages.jsx.tag);var e=function(t){return t?"string"==typeof t?t:"string"==typeof t.content?t.content:t.content.map(e).join(""):""},a=function(n){for(var s=[],g=0;g0&&s[s.length-1].tagName===e(i.content[0].content[1])&&s.pop():"/>"===i.content[i.content.length-1].content||s.push({tagName:e(i.content[0].content[1]),openedBraces:0}):s.length>0&&"punctuation"===i.type&&"{"===i.content?s[s.length-1].openedBraces++:s.length>0&&s[s.length-1].openedBraces>0&&"punctuation"===i.type&&"}"===i.content?s[s.length-1].openedBraces--:o=!0),(o||"string"==typeof i)&&s.length>0&&0===s[s.length-1].openedBraces){var p=e(i);g0&&("string"==typeof n[g-1]||"plain-text"===n[g-1].type)&&(p=e(n[g-1])+p,n.splice(g-1,1),g--),n[g]=new t.Token("plain-text",p,null,p)}i.content&&"string"!=typeof i.content&&a(i.content)}};t.hooks.add("after-tokenize",function(t){("jsx"===t.language||"tsx"===t.language)&&a(t.tokens)})}(Prism); \ No newline at end of file diff --git a/tests/languages/jsx/tag_feature.test b/tests/languages/jsx/tag_feature.test index 4bc5d101ac..9255ea1e44 100644 --- a/tests/languages/jsx/tag_feature.test +++ b/tests/languages/jsx/tag_feature.test @@ -2,6 +2,7 @@ var myDivElement =
    ; var myElement = ;
    <> + ---------------------------------------------------- @@ -75,6 +76,27 @@ var myElement = ; ["punctuation", ""] + ]], + ["tag", [ + ["tag", [ + ["punctuation", "<"], + ["class-name", "Tree.TreeNode.Item"] + ]], + ["attr-name", ["leaf"]], + ["script", [ + ["script-punctuation", "="], + ["punctuation", "{"], + ["boolean", "true"], + ["punctuation", "}"] + ]], + ["punctuation", ">"] + ]], + ["tag", [ + ["tag", [ + ["punctuation", ""] ]] ] diff --git a/tests/languages/tsx/tag_feature.test b/tests/languages/tsx/tag_feature.test index 3d5c0e9f96..97e8e7127a 100644 --- a/tests/languages/tsx/tag_feature.test +++ b/tests/languages/tsx/tag_feature.test @@ -1,6 +1,7 @@ var myDivElement =
    ; var myElement = ;
    + class Test extends Component { render() { return

    Hello world.

    ; @@ -61,6 +62,28 @@ class Test extends Component { ["punctuation", "/>"] ]], + ["tag", [ + ["tag", [ + ["punctuation", "<"], + ["class-name", "Tree.TreeNode.Item"] + ]], + ["attr-name", ["leaf"]], + ["script", [ + ["script-punctuation", "="], + ["punctuation", "{"], + ["boolean", "true"], + ["punctuation", "}"] + ]], + ["punctuation", ">"] + ]], + ["tag", [ + ["tag", [ + ["punctuation", ""] + ]], + ["keyword", "class"], ["class-name", ["Test"]], ["keyword", "extends"], From baf6bb0c2f6db49a1cf683dce36a210ed9efefd9 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Wed, 13 Feb 2019 20:31:50 +0100 Subject: [PATCH 0160/1100] Add support for # comments to INI language (#1730) This PR resolved #1729. Disclaimer: # comments are only supported by [some implementation](https://en.wikipedia.org/wiki/INI_file). --- components/prism-ini.js | 4 ++-- components/prism-ini.min.js | 2 +- tests/languages/ini/comment_feature.test | 6 ++++-- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/components/prism-ini.js b/components/prism-ini.js index 6747ad6c2a..c7b45a8ba4 100644 --- a/components/prism-ini.js +++ b/components/prism-ini.js @@ -1,5 +1,5 @@ Prism.languages.ini= { - 'comment': /^[ \t]*;.*$/m, + 'comment': /^[ \t]*[;#].*$/m, 'selector': /^[ \t]*\[.*?\]/m, 'constant': /^[ \t]*[^\s=]+?(?=[ \t]*=)/m, 'attr-value': { @@ -8,4 +8,4 @@ Prism.languages.ini= { 'punctuation': /^[=]/ } } -}; \ No newline at end of file +}; diff --git a/components/prism-ini.min.js b/components/prism-ini.min.js index bcc3c466ef..620cdb55b4 100644 --- a/components/prism-ini.min.js +++ b/components/prism-ini.min.js @@ -1 +1 @@ -Prism.languages.ini={comment:/^[ \t]*;.*$/m,selector:/^[ \t]*\[.*?\]/m,constant:/^[ \t]*[^\s=]+?(?=[ \t]*=)/m,"attr-value":{pattern:/=.*/,inside:{punctuation:/^[=]/}}}; \ No newline at end of file +Prism.languages.ini={comment:/^[ \t]*[;#].*$/m,selector:/^[ \t]*\[.*?\]/m,constant:/^[ \t]*[^\s=]+?(?=[ \t]*=)/m,"attr-value":{pattern:/=.*/,inside:{punctuation:/^[=]/}}}; \ No newline at end of file diff --git a/tests/languages/ini/comment_feature.test b/tests/languages/ini/comment_feature.test index 85faefe78b..30e373c63a 100644 --- a/tests/languages/ini/comment_feature.test +++ b/tests/languages/ini/comment_feature.test @@ -1,13 +1,15 @@ ; ; foobar +# foobar ---------------------------------------------------- [ ["comment", ";"], - ["comment", "; foobar"] + ["comment", "; foobar"], + ["comment", "# foobar"] ] ---------------------------------------------------- -Checks for comments. \ No newline at end of file +Checks for comments. From 3a32cb75edc3530406d17961ccae8a3f78836b0a Mon Sep 17 00:00:00 2001 From: Frankie Wittevrongel Date: Wed, 13 Feb 2019 22:33:38 +0000 Subject: [PATCH 0161/1100] Added `yarn add` to bash functions (#1731) Adds `yarn add` to bash functions. --- components/prism-bash.js | 4 ++-- components/prism-bash.min.js | 2 +- tests/languages/bash/function_feature.test | 10 +++++----- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/components/prism-bash.js b/components/prism-bash.js index 721c4bee1b..82e15c7cf5 100644 --- a/components/prism-bash.js +++ b/components/prism-bash.js @@ -57,7 +57,7 @@ 'variable': insideString.variable, // Originally based on http://ss64.com/bash/ 'function': { - pattern: /(^|[\s;|&])(?:alias|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|builtin|bzip2|cal|cat|cd|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|comm|command|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|du|egrep|eject|enable|env|ethtool|eval|exec|expand|expect|export|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|getopts|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|hash|head|help|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|jobs|join|kill|killall|less|link|ln|locate|logname|logout|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|popd|pr|printcap|printenv|printf|ps|pushd|pv|pwd|quota|quotacheck|quotactl|ram|rar|rcp|read|readarray|readonly|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|shift|shopt|shutdown|sleep|slocate|sort|source|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|tail|tar|tee|test|time|timeout|times|top|touch|tr|traceroute|trap|tsort|tty|type|ulimit|umask|umount|unalias|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yes|zip|zypper)(?=$|[\s;|&])/, + pattern: /(^|[\s;|&])(?:add|alias|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|builtin|bzip2|cal|cat|cd|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|comm|command|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|du|egrep|eject|enable|env|ethtool|eval|exec|expand|expect|export|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|getopts|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|hash|head|help|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|jobs|join|kill|killall|less|link|ln|locate|logname|logout|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|popd|pr|printcap|printenv|printf|ps|pushd|pv|pwd|quota|quotacheck|quotactl|ram|rar|rcp|read|readarray|readonly|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|shift|shopt|shutdown|sleep|slocate|sort|source|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|tail|tar|tee|test|time|timeout|times|top|touch|tr|traceroute|trap|tsort|tty|type|ulimit|umask|umount|unalias|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zip|zypper)(?=$|[\s;|&])/, lookbehind: true }, 'keyword': { @@ -79,6 +79,6 @@ inside['boolean'] = Prism.languages.bash['boolean']; inside.operator = Prism.languages.bash.operator; inside.punctuation = Prism.languages.bash.punctuation; - + Prism.languages.shell = Prism.languages.bash; })(Prism); diff --git a/components/prism-bash.min.js b/components/prism-bash.min.js index 49845568d1..dcbfbba3af 100644 --- a/components/prism-bash.min.js +++ b/components/prism-bash.min.js @@ -1 +1 @@ -!function(e){var t={variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--?|-=|\+\+?|\+=|!=?|~|\*\*?|\*=|\/=?|%=?|<<=?|>>=?|<=?|>=?|==?|&&?|&=|\^=?|\|\|?|\|=|\?|:/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\([^)]+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},/\$(?:[\w#?*!@]+|\{[^}]+\})/i]};e.languages.bash={shebang:{pattern:/^#!\s*\/bin\/bash|^#!\s*\/bin\/sh/,alias:"important"},comment:{pattern:/(^|[^"{\\])#.*/,lookbehind:!0},string:[{pattern:/((?:^|[^<])<<\s*)["']?(\w+?)["']?\s*\r?\n(?:[\s\S])*?\r?\n\2/,lookbehind:!0,greedy:!0,inside:t},{pattern:/(["'])(?:\\[\s\S]|\$\([^)]+\)|`[^`]+`|(?!\1)[^\\])*\1/,greedy:!0,inside:t}],variable:t.variable,"function":{pattern:/(^|[\s;|&])(?:alias|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|builtin|bzip2|cal|cat|cd|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|comm|command|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|du|egrep|eject|enable|env|ethtool|eval|exec|expand|expect|export|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|getopts|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|hash|head|help|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|jobs|join|kill|killall|less|link|ln|locate|logname|logout|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|popd|pr|printcap|printenv|printf|ps|pushd|pv|pwd|quota|quotacheck|quotactl|ram|rar|rcp|read|readarray|readonly|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|shift|shopt|shutdown|sleep|slocate|sort|source|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|tail|tar|tee|test|time|timeout|times|top|touch|tr|traceroute|trap|tsort|tty|type|ulimit|umask|umount|unalias|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yes|zip|zypper)(?=$|[\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&])(?:let|:|\.|if|then|else|elif|fi|for|break|continue|while|in|case|function|select|do|done|until|echo|exit|return|set|declare)(?=$|[\s;|&])/,lookbehind:!0},"boolean":{pattern:/(^|[\s;|&])(?:true|false)(?=$|[\s;|&])/,lookbehind:!0},operator:/&&?|\|\|?|==?|!=?|<<>|<=?|>=?|=~/,punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];]/};var a=t.variable[1].inside;a.string=e.languages.bash.string,a["function"]=e.languages.bash["function"],a.keyword=e.languages.bash.keyword,a["boolean"]=e.languages.bash["boolean"],a.operator=e.languages.bash.operator,a.punctuation=e.languages.bash.punctuation,e.languages.shell=e.languages.bash}(Prism); \ No newline at end of file +!function(e){var t={variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--?|-=|\+\+?|\+=|!=?|~|\*\*?|\*=|\/=?|%=?|<<=?|>>=?|<=?|>=?|==?|&&?|&=|\^=?|\|\|?|\|=|\?|:/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\([^)]+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},/\$(?:[\w#?*!@]+|\{[^}]+\})/i]};e.languages.bash={shebang:{pattern:/^#!\s*\/bin\/bash|^#!\s*\/bin\/sh/,alias:"important"},comment:{pattern:/(^|[^"{\\])#.*/,lookbehind:!0},string:[{pattern:/((?:^|[^<])<<\s*)["']?(\w+?)["']?\s*\r?\n(?:[\s\S])*?\r?\n\2/,lookbehind:!0,greedy:!0,inside:t},{pattern:/(["'])(?:\\[\s\S]|\$\([^)]+\)|`[^`]+`|(?!\1)[^\\])*\1/,greedy:!0,inside:t}],variable:t.variable,"function":{pattern:/(^|[\s;|&])(?:add|alias|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|builtin|bzip2|cal|cat|cd|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|comm|command|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|du|egrep|eject|enable|env|ethtool|eval|exec|expand|expect|export|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|getopts|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|hash|head|help|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|jobs|join|kill|killall|less|link|ln|locate|logname|logout|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|popd|pr|printcap|printenv|printf|ps|pushd|pv|pwd|quota|quotacheck|quotactl|ram|rar|rcp|read|readarray|readonly|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|shift|shopt|shutdown|sleep|slocate|sort|source|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|tail|tar|tee|test|time|timeout|times|top|touch|tr|traceroute|trap|tsort|tty|type|ulimit|umask|umount|unalias|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zip|zypper)(?=$|[\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&])(?:let|:|\.|if|then|else|elif|fi|for|break|continue|while|in|case|function|select|do|done|until|echo|exit|return|set|declare)(?=$|[\s;|&])/,lookbehind:!0},"boolean":{pattern:/(^|[\s;|&])(?:true|false)(?=$|[\s;|&])/,lookbehind:!0},operator:/&&?|\|\|?|==?|!=?|<<>|<=?|>=?|=~/,punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];]/};var a=t.variable[1].inside;a.string=e.languages.bash.string,a["function"]=e.languages.bash["function"],a.keyword=e.languages.bash.keyword,a["boolean"]=e.languages.bash["boolean"],a.operator=e.languages.bash.operator,a.punctuation=e.languages.bash.punctuation,e.languages.shell=e.languages.bash}(Prism); diff --git a/tests/languages/bash/function_feature.test b/tests/languages/bash/function_feature.test index f3fb71232b..9c2d41a8af 100644 --- a/tests/languages/bash/function_feature.test +++ b/tests/languages/bash/function_feature.test @@ -1,4 +1,4 @@ -alias apropos apt apt-cache apt-get aptitude aspell +add alias apropos apt apt-cache apt-get aptitude aspell automysqlbackup awk basename bash bc bconsole bg builtin bzip2 cal cat cd cfdisk chgrp chmod chown chroot @@ -43,12 +43,12 @@ units unrar unshar unzip update-grub uptime useradd userdel usermod users uuencode uudecode vdir vi vim virsh vmstat wait watch wc wget whereis which who whoami write -xargs xdg-open yes zip zypper +xargs xdg-open yarn yes zip zypper ---------------------------------------------------- [ - ["function", "alias"], ["function", "apropos"], ["function", "apt"], ["function", "apt-cache"], ["function", "apt-get"], ["function", "aptitude"], ["function", "aspell"], + ["function", "add"], ["function", "alias"], ["function", "apropos"], ["function", "apt"], ["function", "apt-cache"], ["function", "apt-get"], ["function", "aptitude"], ["function", "aspell"], ["function", "automysqlbackup"], ["function", "awk"], ["function", "basename"], ["function", "bash"], ["function", "bc"], ["function", "bconsole"], ["function", "bg"], ["function", "builtin"], ["function", "bzip2"], ["function", "cal"], ["function", "cat"], ["function", "cd"], ["function", "cfdisk"], ["function", "chgrp"], ["function", "chmod"], ["function", "chown"], ["function", "chroot"], @@ -93,9 +93,9 @@ xargs xdg-open yes zip zypper ["function", "useradd"], ["function", "userdel"], ["function", "usermod"], ["function", "users"], ["function", "uuencode"], ["function", "uudecode"], ["function", "vdir"], ["function", "vi"], ["function", "vim"], ["function", "virsh"], ["function", "vmstat"], ["function", "wait"], ["function", "watch"], ["function", "wc"], ["function", "wget"], ["function", "whereis"], ["function", "which"], ["function", "who"], ["function", "whoami"], ["function", "write"], - ["function", "xargs"], ["function", "xdg-open"], ["function", "yes"], ["function", "zip"], ["function", "zypper"] + ["function", "xargs"], ["function", "xdg-open"], ["function", "yarn"], ["function", "yes"], ["function", "zip"], ["function", "zypper"] ] ---------------------------------------------------- -Checks for all functions. \ No newline at end of file +Checks for all functions. From eee066499dfd622f80c325dbbf3c6276a920beca Mon Sep 17 00:00:00 2001 From: ExE Boss <3889017+ExE-Boss@users.noreply.github.com> Date: Thu, 14 Feb 2019 01:18:46 +0100 Subject: [PATCH 0162/1100] =?UTF-8?q?Added=20`keyword`=20alias=20to=20JSON?= =?UTF-8?q?'s=C2=A0`null`=20(#1733)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This adds the `keyword` alias to the `null` pattern in JSON. --- components/prism-json.js | 5 ++++- components/prism-json.min.js | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/components/prism-json.js b/components/prism-json.js index 6ae91b4c13..70f0622b8e 100644 --- a/components/prism-json.js +++ b/components/prism-json.js @@ -12,7 +12,10 @@ Prism.languages.json = { 'punctuation': /[{}[\],]/, 'operator': /:/, 'boolean': /\b(?:true|false)\b/, - 'null': /\bnull\b/ + 'null': { + pattern: /\bnull\b/, + alias: 'keyword' + } }; Prism.languages.jsonp = Prism.languages.json; diff --git a/components/prism-json.min.js b/components/prism-json.min.js index 4c3c1faab4..2dfd523497 100644 --- a/components/prism-json.min.js +++ b/components/prism-json.min.js @@ -1 +1 @@ -Prism.languages.json={comment:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,property:{pattern:/"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,greedy:!0},string:{pattern:/"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,greedy:!0},number:/-?\d+\.?\d*(e[+-]?\d+)?/i,punctuation:/[{}[\],]/,operator:/:/,"boolean":/\b(?:true|false)\b/,"null":/\bnull\b/},Prism.languages.jsonp=Prism.languages.json; \ No newline at end of file +Prism.languages.json={comment:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,property:{pattern:/"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,greedy:!0},string:{pattern:/"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,greedy:!0},number:/-?\d+\.?\d*(e[+-]?\d+)?/i,punctuation:/[{}[\],]/,operator:/:/,"boolean":/\b(?:true|false)\b/,"null":{pattern:/\bnull\b/,alias:"keyword"}},Prism.languages.jsonp=Prism.languages.json; \ No newline at end of file From fccfb98d40424518a4de2e8ba2e8ec9c1694e2df Mon Sep 17 00:00:00 2001 From: ExE Boss <3889017+ExE-Boss@users.noreply.github.com> Date: Thu, 14 Feb 2019 01:25:25 +0100 Subject: [PATCH 0163/1100] Added `pnpm` function to Bash (#1734) This adds `pnpm` to the list of supported functions in Bash. --- components/prism-bash.js | 2 +- components/prism-bash.min.js | 2 +- tests/languages/bash/function_feature.test | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/components/prism-bash.js b/components/prism-bash.js index 82e15c7cf5..534fbe6ac5 100644 --- a/components/prism-bash.js +++ b/components/prism-bash.js @@ -57,7 +57,7 @@ 'variable': insideString.variable, // Originally based on http://ss64.com/bash/ 'function': { - pattern: /(^|[\s;|&])(?:add|alias|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|builtin|bzip2|cal|cat|cd|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|comm|command|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|du|egrep|eject|enable|env|ethtool|eval|exec|expand|expect|export|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|getopts|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|hash|head|help|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|jobs|join|kill|killall|less|link|ln|locate|logname|logout|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|popd|pr|printcap|printenv|printf|ps|pushd|pv|pwd|quota|quotacheck|quotactl|ram|rar|rcp|read|readarray|readonly|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|shift|shopt|shutdown|sleep|slocate|sort|source|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|tail|tar|tee|test|time|timeout|times|top|touch|tr|traceroute|trap|tsort|tty|type|ulimit|umask|umount|unalias|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zip|zypper)(?=$|[\s;|&])/, + pattern: /(^|[\s;|&])(?:add|alias|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|builtin|bzip2|cal|cat|cd|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|comm|command|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|du|egrep|eject|enable|env|ethtool|eval|exec|expand|expect|export|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|getopts|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|hash|head|help|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|jobs|join|kill|killall|less|link|ln|locate|logname|logout|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|popd|pr|printcap|printenv|printf|ps|pushd|pv|pwd|quota|quotacheck|quotactl|ram|rar|rcp|read|readarray|readonly|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|shift|shopt|shutdown|sleep|slocate|sort|source|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|tail|tar|tee|test|time|timeout|times|top|touch|tr|traceroute|trap|tsort|tty|type|ulimit|umask|umount|unalias|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zip|zypper)(?=$|[\s;|&])/, lookbehind: true }, 'keyword': { diff --git a/components/prism-bash.min.js b/components/prism-bash.min.js index dcbfbba3af..e96d40e392 100644 --- a/components/prism-bash.min.js +++ b/components/prism-bash.min.js @@ -1 +1 @@ -!function(e){var t={variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--?|-=|\+\+?|\+=|!=?|~|\*\*?|\*=|\/=?|%=?|<<=?|>>=?|<=?|>=?|==?|&&?|&=|\^=?|\|\|?|\|=|\?|:/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\([^)]+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},/\$(?:[\w#?*!@]+|\{[^}]+\})/i]};e.languages.bash={shebang:{pattern:/^#!\s*\/bin\/bash|^#!\s*\/bin\/sh/,alias:"important"},comment:{pattern:/(^|[^"{\\])#.*/,lookbehind:!0},string:[{pattern:/((?:^|[^<])<<\s*)["']?(\w+?)["']?\s*\r?\n(?:[\s\S])*?\r?\n\2/,lookbehind:!0,greedy:!0,inside:t},{pattern:/(["'])(?:\\[\s\S]|\$\([^)]+\)|`[^`]+`|(?!\1)[^\\])*\1/,greedy:!0,inside:t}],variable:t.variable,"function":{pattern:/(^|[\s;|&])(?:add|alias|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|builtin|bzip2|cal|cat|cd|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|comm|command|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|du|egrep|eject|enable|env|ethtool|eval|exec|expand|expect|export|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|getopts|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|hash|head|help|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|jobs|join|kill|killall|less|link|ln|locate|logname|logout|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|popd|pr|printcap|printenv|printf|ps|pushd|pv|pwd|quota|quotacheck|quotactl|ram|rar|rcp|read|readarray|readonly|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|shift|shopt|shutdown|sleep|slocate|sort|source|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|tail|tar|tee|test|time|timeout|times|top|touch|tr|traceroute|trap|tsort|tty|type|ulimit|umask|umount|unalias|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zip|zypper)(?=$|[\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&])(?:let|:|\.|if|then|else|elif|fi|for|break|continue|while|in|case|function|select|do|done|until|echo|exit|return|set|declare)(?=$|[\s;|&])/,lookbehind:!0},"boolean":{pattern:/(^|[\s;|&])(?:true|false)(?=$|[\s;|&])/,lookbehind:!0},operator:/&&?|\|\|?|==?|!=?|<<>|<=?|>=?|=~/,punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];]/};var a=t.variable[1].inside;a.string=e.languages.bash.string,a["function"]=e.languages.bash["function"],a.keyword=e.languages.bash.keyword,a["boolean"]=e.languages.bash["boolean"],a.operator=e.languages.bash.operator,a.punctuation=e.languages.bash.punctuation,e.languages.shell=e.languages.bash}(Prism); +!function(e){var a={variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--?|-=|\+\+?|\+=|!=?|~|\*\*?|\*=|\/=?|%=?|<<=?|>>=?|<=?|>=?|==?|&&?|&=|\^=?|\|\|?|\|=|\?|:/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\([^)]+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},/\$(?:[\w#?*!@]+|\{[^}]+\})/i]};e.languages.bash={shebang:{pattern:/^#!\s*\/bin\/bash|^#!\s*\/bin\/sh/,alias:"important"},comment:{pattern:/(^|[^"{\\])#.*/,lookbehind:!0},string:[{pattern:/((?:^|[^<])<<\s*)["']?(\w+?)["']?\s*\r?\n(?:[\s\S])*?\r?\n\2/,lookbehind:!0,greedy:!0,inside:a},{pattern:/(["'])(?:\\[\s\S]|\$\([^)]+\)|`[^`]+`|(?!\1)[^\\])*\1/,greedy:!0,inside:a}],variable:a.variable,"function":{pattern:/(^|[\s;|&])(?:add|alias|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|builtin|bzip2|cal|cat|cd|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|comm|command|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|du|egrep|eject|enable|env|ethtool|eval|exec|expand|expect|export|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|getopts|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|hash|head|help|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|jobs|join|kill|killall|less|link|ln|locate|logname|logout|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|popd|pr|printcap|printenv|printf|ps|pushd|pv|pwd|quota|quotacheck|quotactl|ram|rar|rcp|read|readarray|readonly|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|shift|shopt|shutdown|sleep|slocate|sort|source|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|tail|tar|tee|test|time|timeout|times|top|touch|tr|traceroute|trap|tsort|tty|type|ulimit|umask|umount|unalias|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zip|zypper)(?=$|[\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&])(?:let|:|\.|if|then|else|elif|fi|for|break|continue|while|in|case|function|select|do|done|until|echo|exit|return|set|declare)(?=$|[\s;|&])/,lookbehind:!0},"boolean":{pattern:/(^|[\s;|&])(?:true|false)(?=$|[\s;|&])/,lookbehind:!0},operator:/&&?|\|\|?|==?|!=?|<<>|<=?|>=?|=~/,punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];]/};var t=a.variable[1].inside;t.string=e.languages.bash.string,t["function"]=e.languages.bash["function"],t.keyword=e.languages.bash.keyword,t["boolean"]=e.languages.bash["boolean"],t.operator=e.languages.bash.operator,t.punctuation=e.languages.bash.punctuation,e.languages.shell=e.languages.bash}(Prism); \ No newline at end of file diff --git a/tests/languages/bash/function_feature.test b/tests/languages/bash/function_feature.test index 9c2d41a8af..9f72f774f3 100644 --- a/tests/languages/bash/function_feature.test +++ b/tests/languages/bash/function_feature.test @@ -25,7 +25,7 @@ mkfs mkisofs mknod mkswap more most mount mtools mtr mutt mv mmv nano nc netstat nice nl nohup notify-send nslookup open parted op passwd paste pathchk ping -pkill popd pr printcap printenv +pkill pnpm popd pr printcap printenv printf ps pushd pv pwd quota quotacheck quotactl ram rar rcp read readarray readonly reboot @@ -75,7 +75,7 @@ xargs xdg-open yarn yes zip zypper ["function", "mtools"], ["function", "mtr"], ["function", "mutt"], ["function", "mv"], ["function", "mmv"], ["function", "nano"], ["function", "nc"], ["function", "netstat"], ["function", "nice"], ["function", "nl"], ["function", "nohup"], ["function", "notify-send"], ["function", "nslookup"], ["function", "open"], ["function", "parted"], ["function", "op"], ["function", "passwd"], ["function", "paste"], ["function", "pathchk"], ["function", "ping"], - ["function", "pkill"], ["function", "popd"], ["function", "pr"], ["function", "printcap"], ["function", "printenv"], + ["function", "pkill"], ["function", "pnpm"], ["function", "popd"], ["function", "pr"], ["function", "printcap"], ["function", "printenv"], ["function", "printf"], ["function", "ps"], ["function", "pushd"], ["function", "pv"], ["function", "pwd"], ["function", "quota"], ["function", "quotacheck"], ["function", "quotactl"], ["function", "ram"], ["function", "rar"], ["function", "rcp"], ["function", "read"], ["function", "readarray"], ["function", "readonly"], ["function", "reboot"], From bd0378f00176f4aa1ea10239f9fd6549b29cb4d6 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Thu, 14 Feb 2019 13:23:49 +0100 Subject: [PATCH 0164/1100] Add `keyword` alias for SCSS' `null` (#1735) Add the `keyword` alias to the `null` pattern for SCSS. This was the last `null` pattern without any aliases (#1727). --- components/prism-scss.js | 5 ++++- components/prism-scss.min.js | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/components/prism-scss.js b/components/prism-scss.js index 9dffd4b4f3..44ea484ba3 100644 --- a/components/prism-scss.js +++ b/components/prism-scss.js @@ -64,7 +64,10 @@ Prism.languages.insertBefore('scss', 'function', { alias: 'keyword' }, 'boolean': /\b(?:true|false)\b/, - 'null': /\bnull\b/, + 'null': { + pattern: /\bnull\b/, + alias: 'keyword' + }, 'operator': { pattern: /(\s)(?:[-+*\/%]|[=!]=|<=?|>=?|and|or|not)(?=\s)/, lookbehind: true diff --git a/components/prism-scss.min.js b/components/prism-scss.min.js index 668695bc87..ce2194c47c 100644 --- a/components/prism-scss.min.js +++ b/components/prism-scss.min.js @@ -1 +1 @@ -Prism.languages.scss=Prism.languages.extend("css",{comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0},atrule:{pattern:/@[\w-]+(?:\([^()]+\)|[^(])*?(?=\s+[{;])/,inside:{rule:/@[\w-]+/}},url:/(?:[-a-z]+-)*url(?=\()/i,selector:{pattern:/(?=\S)[^@;{}()]?(?:[^@;{}()]|#\{\$[-\w]+\})+(?=\s*\{(?:\}|\s|[^}]+[:{][^}]+))/m,inside:{parent:{pattern:/&/,alias:"important"},placeholder:/%[-\w]+/,variable:/\$[-\w]+|#\{\$[-\w]+\}/}},property:{pattern:/(?:[\w-]|\$[-\w]+|#\{\$[-\w]+\})+(?=\s*:)/,inside:{variable:/\$[-\w]+|#\{\$[-\w]+\}/}}}),Prism.languages.insertBefore("scss","atrule",{keyword:[/@(?:if|else(?: if)?|for|each|while|import|extend|debug|warn|mixin|include|function|return|content)/i,{pattern:/( +)(?:from|through)(?= )/,lookbehind:!0}]}),Prism.languages.insertBefore("scss","important",{variable:/\$[-\w]+|#\{\$[-\w]+\}/}),Prism.languages.insertBefore("scss","function",{placeholder:{pattern:/%[-\w]+/,alias:"selector"},statement:{pattern:/\B!(?:default|optional)\b/i,alias:"keyword"},"boolean":/\b(?:true|false)\b/,"null":/\bnull\b/,operator:{pattern:/(\s)(?:[-+*\/%]|[=!]=|<=?|>=?|and|or|not)(?=\s)/,lookbehind:!0}}),Prism.languages.scss.atrule.inside.rest=Prism.languages.scss; \ No newline at end of file +Prism.languages.scss=Prism.languages.extend("css",{comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0},atrule:{pattern:/@[\w-]+(?:\([^()]+\)|[^(])*?(?=\s+[{;])/,inside:{rule:/@[\w-]+/}},url:/(?:[-a-z]+-)*url(?=\()/i,selector:{pattern:/(?=\S)[^@;{}()]?(?:[^@;{}()]|#\{\$[-\w]+\})+(?=\s*\{(?:\}|\s|[^}]+[:{][^}]+))/m,inside:{parent:{pattern:/&/,alias:"important"},placeholder:/%[-\w]+/,variable:/\$[-\w]+|#\{\$[-\w]+\}/}},property:{pattern:/(?:[\w-]|\$[-\w]+|#\{\$[-\w]+\})+(?=\s*:)/,inside:{variable:/\$[-\w]+|#\{\$[-\w]+\}/}}}),Prism.languages.insertBefore("scss","atrule",{keyword:[/@(?:if|else(?: if)?|for|each|while|import|extend|debug|warn|mixin|include|function|return|content)/i,{pattern:/( +)(?:from|through)(?= )/,lookbehind:!0}]}),Prism.languages.insertBefore("scss","important",{variable:/\$[-\w]+|#\{\$[-\w]+\}/}),Prism.languages.insertBefore("scss","function",{placeholder:{pattern:/%[-\w]+/,alias:"selector"},statement:{pattern:/\B!(?:default|optional)\b/i,alias:"keyword"},"boolean":/\b(?:true|false)\b/,"null":{pattern:/\bnull\b/,alias:"keyword"},operator:{pattern:/(\s)(?:[-+*\/%]|[=!]=|<=?|>=?|and|or|not)(?=\s)/,lookbehind:!0}}),Prism.languages.scss.atrule.inside.rest=Prism.languages.scss; \ No newline at end of file From d9fa29a8b200bd7b4672be44ed9906b9eff7a516 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Fri, 15 Feb 2019 16:03:59 +0100 Subject: [PATCH 0165/1100] Make `undefined` a keyword in JS (#1740) --- components/prism-javascript.js | 4 ++-- components/prism-javascript.min.js | 2 +- prism.js | 4 ++-- tests/languages/javascript/keyword_feature.test | 3 ++- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/components/prism-javascript.js b/components/prism-javascript.js index 8f8686acfe..6ca956a40b 100644 --- a/components/prism-javascript.js +++ b/components/prism-javascript.js @@ -11,7 +11,7 @@ Prism.languages.javascript = Prism.languages.extend('clike', { pattern: /((?:^|})\s*)(?:catch|finally)\b/, lookbehind: true }, - /\b(?:as|async|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|var|void|while|with|yield)\b/ + /\b(?:as|async|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/ ], 'number': /\b(?:(?:0[xX][\dA-Fa-f]+|0[bB][01]+|0[oO][0-7]+)n?|\d+n|NaN|Infinity)\b|(?:\b\d+\.?\d*|\B\.\d+)(?:[Ee][+-]?\d+)?/, // Allow for all non-ASCII characters (See http://stackoverflow.com/a/2008444) @@ -48,7 +48,7 @@ Prism.languages.insertBefore('javascript', 'keyword', { inside: Prism.languages.javascript }, { - pattern: /((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*\s*)\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*\{)/, + pattern: /((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*\s*)\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*\{)/, lookbehind: true, inside: Prism.languages.javascript } diff --git a/components/prism-javascript.min.js b/components/prism-javascript.min.js index 583b64a609..f414648f0c 100644 --- a/components/prism-javascript.min.js +++ b/components/prism-javascript.min.js @@ -1 +1 @@ -Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])[_$A-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\.(?:prototype|constructor))/,lookbehind:!0}],keyword:[{pattern:/((?:^|})\s*)(?:catch|finally)\b/,lookbehind:!0},/\b(?:as|async|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|var|void|while|with|yield)\b/],number:/\b(?:(?:0[xX][\dA-Fa-f]+|0[bB][01]+|0[oO][0-7]+)n?|\d+n|NaN|Infinity)\b|(?:\b\d+\.?\d*|\B\.\d+)(?:[Ee][+-]?\d+)?/,"function":/[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*\(|\.(?:apply|bind|call)\()/,operator:/-[-=]?|\+[+=]?|!=?=?|<>?>?=?|=(?:==?|>)?|&[&=]?|\|[|=]?|\*\*?=?|\/=?|~|\^=?|%=?|\?|\.{3}/}),Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/,Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s])\s*)\/(\[(?:[^\]\\\r\n]|\\.)*]|\\.|[^\/\\\[\r\n])+\/[gimyu]{0,5}(?=\s*($|[\r\n,.;})\]]))/,lookbehind:!0,greedy:!0},"function-variable":{pattern:/[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/i,alias:"function"},parameter:[{pattern:/(function(?:\s+[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)?\s*\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*=>)/i,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*\s*)\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z][A-Z\d_]*\b/}),Prism.languages.insertBefore("javascript","string",{"template-string":{pattern:/`(?:\\[\s\S]|\${[^}]+}|[^\\`])*`/,greedy:!0,inside:{interpolation:{pattern:/\${[^}]+}/,inside:{"interpolation-punctuation":{pattern:/^\${|}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}}}),Prism.languages.markup&&Prism.languages.insertBefore("markup","tag",{script:{pattern:/()[\s\S]*?(?=<\/script>)/i,lookbehind:!0,inside:Prism.languages.javascript,alias:"language-javascript",greedy:!0}}),Prism.languages.js=Prism.languages.javascript; \ No newline at end of file +Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])[_$A-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\.(?:prototype|constructor))/,lookbehind:!0}],keyword:[{pattern:/((?:^|})\s*)(?:catch|finally)\b/,lookbehind:!0},/\b(?:as|async|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/],number:/\b(?:(?:0[xX][\dA-Fa-f]+|0[bB][01]+|0[oO][0-7]+)n?|\d+n|NaN|Infinity)\b|(?:\b\d+\.?\d*|\B\.\d+)(?:[Ee][+-]?\d+)?/,"function":/[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*\(|\.(?:apply|bind|call)\()/,operator:/-[-=]?|\+[+=]?|!=?=?|<>?>?=?|=(?:==?|>)?|&[&=]?|\|[|=]?|\*\*?=?|\/=?|~|\^=?|%=?|\?|\.{3}/}),Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/,Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s])\s*)\/(\[(?:[^\]\\\r\n]|\\.)*]|\\.|[^\/\\\[\r\n])+\/[gimyu]{0,5}(?=\s*($|[\r\n,.;})\]]))/,lookbehind:!0,greedy:!0},"function-variable":{pattern:/[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/i,alias:"function"},parameter:[{pattern:/(function(?:\s+[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)?\s*\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*=>)/i,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*\s*)\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z][A-Z\d_]*\b/}),Prism.languages.insertBefore("javascript","string",{"template-string":{pattern:/`(?:\\[\s\S]|\${[^}]+}|[^\\`])*`/,greedy:!0,inside:{interpolation:{pattern:/\${[^}]+}/,inside:{"interpolation-punctuation":{pattern:/^\${|}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}}}),Prism.languages.markup&&Prism.languages.insertBefore("markup","tag",{script:{pattern:/()[\s\S]*?(?=<\/script>)/i,lookbehind:!0,inside:Prism.languages.javascript,alias:"language-javascript",greedy:!0}}),Prism.languages.js=Prism.languages.javascript; \ No newline at end of file diff --git a/prism.js b/prism.js index 4bcaea2160..a69c642c34 100644 --- a/prism.js +++ b/prism.js @@ -720,7 +720,7 @@ Prism.languages.javascript = Prism.languages.extend('clike', { pattern: /((?:^|})\s*)(?:catch|finally)\b/, lookbehind: true }, - /\b(?:as|async|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|var|void|while|with|yield)\b/ + /\b(?:as|async|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/ ], 'number': /\b(?:(?:0[xX][\dA-Fa-f]+|0[bB][01]+|0[oO][0-7]+)n?|\d+n|NaN|Infinity)\b|(?:\b\d+\.?\d*|\B\.\d+)(?:[Ee][+-]?\d+)?/, // Allow for all non-ASCII characters (See http://stackoverflow.com/a/2008444) @@ -757,7 +757,7 @@ Prism.languages.insertBefore('javascript', 'keyword', { inside: Prism.languages.javascript }, { - pattern: /((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*\s*)\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*\{)/, + pattern: /((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*\s*)\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*\{)/, lookbehind: true, inside: Prism.languages.javascript } diff --git a/tests/languages/javascript/keyword_feature.test b/tests/languages/javascript/keyword_feature.test index 8053f2b1b3..ad6f720dc8 100644 --- a/tests/languages/javascript/keyword_feature.test +++ b/tests/languages/javascript/keyword_feature.test @@ -9,7 +9,7 @@ import; in; instanceof; interface; let; new; null; of; package; private; protected; public; return; set; static; super; switch; this; throw; try; -typeof; var; void; while; +typeof; undefined; var; void; while; with; yield; ---------------------------------------------------- @@ -61,6 +61,7 @@ with; yield; ["keyword", "throw"], ["punctuation", ";"], ["keyword", "try"], ["punctuation", ";"], ["keyword", "typeof"], ["punctuation", ";"], + ["keyword", "undefined"], ["punctuation", ";"], ["keyword", "var"], ["punctuation", ";"], ["keyword", "void"], ["punctuation", ";"], ["keyword", "while"], ["punctuation", ";"], From 671f4ca0541844dd1fd849f6e530e2a8eb979b69 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Fri, 15 Feb 2019 16:05:43 +0100 Subject: [PATCH 0166/1100] Improve gulp error messages with pump (#1741) --- gulpfile.js | 35 +++++++++++++++++++++++------------ package.json | 3 ++- 2 files changed, 25 insertions(+), 13 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index b026928a7d..9837f2bf18 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -4,6 +4,7 @@ var gulp = require('gulp'), header = require('gulp-header'), concat = require('gulp-concat'), replace = require('gulp-replace'), + pump = require('pump'), fs = require('fs'), paths = { @@ -52,12 +53,17 @@ var gulp = require('gulp'), ); }; -gulp.task('components', function() { - return gulp.src(paths.components) - .pipe(inlineRegexSource()) - .pipe(uglify()) - .pipe(rename({ suffix: '.min' })) - .pipe(gulp.dest('components')); +gulp.task('components', function(cb) { + pump( + [ + gulp.src(paths.components), + inlineRegexSource(), + uglify(), + rename({ suffix: '.min' }), + gulp.dest('components') + ], + cb + ); }); gulp.task('build', function() { @@ -69,12 +75,17 @@ gulp.task('build', function() { .pipe(gulp.dest('./')); }); -gulp.task('plugins', ['languages-plugins'], function() { - return gulp.src(paths.plugins) - .pipe(inlineRegexSource()) - .pipe(uglify()) - .pipe(rename({ suffix: '.min' })) - .pipe(gulp.dest('plugins')); +gulp.task('plugins', ['languages-plugins'], function(cb) { + pump( + [ + gulp.src(paths.plugins), + inlineRegexSource(), + uglify(), + rename({ suffix: '.min' }), + gulp.dest('plugins') + ], + cb + ); }); gulp.task('components-json', function (cb) { diff --git a/package.json b/package.json index cbffb02aab..9ef549d3d8 100755 --- a/package.json +++ b/package.json @@ -27,9 +27,10 @@ "gulp-concat": "^2.3.4", "gulp-header": "^1.0.5", "gulp-rename": "^1.2.0", - "gulp-uglify": "^0.3.1", "gulp-replace": "^0.5.4", + "gulp-uglify": "^0.3.1", "mocha": "^2.2.5", + "pump": "^3.0.0", "yargs": "^3.26.0" }, "jspm": { From bfbea4d65f7a9d4a86224ffd0b5057ef80b72d86 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Fri, 15 Feb 2019 16:51:54 +0100 Subject: [PATCH 0167/1100] Fix `function-variable` in JS (#1739) --- components/prism-javascript.js | 2 +- components/prism-javascript.min.js | 2 +- prism.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/components/prism-javascript.js b/components/prism-javascript.js index 6ca956a40b..a5a6aafae1 100644 --- a/components/prism-javascript.js +++ b/components/prism-javascript.js @@ -29,7 +29,7 @@ Prism.languages.insertBefore('javascript', 'keyword', { }, // This must be declared before keyword because we use "function" inside the look-forward 'function-variable': { - pattern: /[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/i, + pattern: /[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/, alias: 'function' }, 'parameter': [ diff --git a/components/prism-javascript.min.js b/components/prism-javascript.min.js index f414648f0c..7fa8267dd8 100644 --- a/components/prism-javascript.min.js +++ b/components/prism-javascript.min.js @@ -1 +1 @@ -Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])[_$A-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\.(?:prototype|constructor))/,lookbehind:!0}],keyword:[{pattern:/((?:^|})\s*)(?:catch|finally)\b/,lookbehind:!0},/\b(?:as|async|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/],number:/\b(?:(?:0[xX][\dA-Fa-f]+|0[bB][01]+|0[oO][0-7]+)n?|\d+n|NaN|Infinity)\b|(?:\b\d+\.?\d*|\B\.\d+)(?:[Ee][+-]?\d+)?/,"function":/[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*\(|\.(?:apply|bind|call)\()/,operator:/-[-=]?|\+[+=]?|!=?=?|<>?>?=?|=(?:==?|>)?|&[&=]?|\|[|=]?|\*\*?=?|\/=?|~|\^=?|%=?|\?|\.{3}/}),Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/,Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s])\s*)\/(\[(?:[^\]\\\r\n]|\\.)*]|\\.|[^\/\\\[\r\n])+\/[gimyu]{0,5}(?=\s*($|[\r\n,.;})\]]))/,lookbehind:!0,greedy:!0},"function-variable":{pattern:/[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/i,alias:"function"},parameter:[{pattern:/(function(?:\s+[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)?\s*\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*=>)/i,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*\s*)\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z][A-Z\d_]*\b/}),Prism.languages.insertBefore("javascript","string",{"template-string":{pattern:/`(?:\\[\s\S]|\${[^}]+}|[^\\`])*`/,greedy:!0,inside:{interpolation:{pattern:/\${[^}]+}/,inside:{"interpolation-punctuation":{pattern:/^\${|}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}}}),Prism.languages.markup&&Prism.languages.insertBefore("markup","tag",{script:{pattern:/()[\s\S]*?(?=<\/script>)/i,lookbehind:!0,inside:Prism.languages.javascript,alias:"language-javascript",greedy:!0}}),Prism.languages.js=Prism.languages.javascript; \ No newline at end of file +Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])[_$A-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\.(?:prototype|constructor))/,lookbehind:!0}],keyword:[{pattern:/((?:^|})\s*)(?:catch|finally)\b/,lookbehind:!0},/\b(?:as|async|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/],number:/\b(?:(?:0[xX][\dA-Fa-f]+|0[bB][01]+|0[oO][0-7]+)n?|\d+n|NaN|Infinity)\b|(?:\b\d+\.?\d*|\B\.\d+)(?:[Ee][+-]?\d+)?/,"function":/[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*\(|\.(?:apply|bind|call)\()/,operator:/-[-=]?|\+[+=]?|!=?=?|<>?>?=?|=(?:==?|>)?|&[&=]?|\|[|=]?|\*\*?=?|\/=?|~|\^=?|%=?|\?|\.{3}/}),Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/,Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s])\s*)\/(\[(?:[^\]\\\r\n]|\\.)*]|\\.|[^\/\\\[\r\n])+\/[gimyu]{0,5}(?=\s*($|[\r\n,.;})\]]))/,lookbehind:!0,greedy:!0},"function-variable":{pattern:/[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)?\s*\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*=>)/i,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*\s*)\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z][A-Z\d_]*\b/}),Prism.languages.insertBefore("javascript","string",{"template-string":{pattern:/`(?:\\[\s\S]|\${[^}]+}|[^\\`])*`/,greedy:!0,inside:{interpolation:{pattern:/\${[^}]+}/,inside:{"interpolation-punctuation":{pattern:/^\${|}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}}}),Prism.languages.markup&&Prism.languages.insertBefore("markup","tag",{script:{pattern:/()[\s\S]*?(?=<\/script>)/i,lookbehind:!0,inside:Prism.languages.javascript,alias:"language-javascript",greedy:!0}}),Prism.languages.js=Prism.languages.javascript; \ No newline at end of file diff --git a/prism.js b/prism.js index a69c642c34..17c82325b1 100644 --- a/prism.js +++ b/prism.js @@ -738,7 +738,7 @@ Prism.languages.insertBefore('javascript', 'keyword', { }, // This must be declared before keyword because we use "function" inside the look-forward 'function-variable': { - pattern: /[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/i, + pattern: /[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/, alias: 'function' }, 'parameter': [ From ce9616a0ce643a4be19abf5442f34712242df386 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Wed, 20 Feb 2019 16:12:00 +0100 Subject: [PATCH 0168/1100] Fix typo (#1755) --- plugins/file-highlight/prism-file-highlight.js | 2 +- prism.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/file-highlight/prism-file-highlight.js b/plugins/file-highlight/prism-file-highlight.js index 65efaf9f07..f3bc6ccf7b 100644 --- a/plugins/file-highlight/prism-file-highlight.js +++ b/plugins/file-highlight/prism-file-highlight.js @@ -98,7 +98,7 @@ }; document.addEventListener('DOMContentLoaded', function () { - // execute inside handler, for dropping Event as argumnet + // execute inside handler, for dropping Event as argument self.Prism.fileHighlight(); }); diff --git a/prism.js b/prism.js index 17c82325b1..2ac524897c 100644 --- a/prism.js +++ b/prism.js @@ -904,7 +904,7 @@ Prism.languages.js = Prism.languages.javascript; }; document.addEventListener('DOMContentLoaded', function () { - // execute inside handler, for dropping Event as argumnet + // execute inside handler, for dropping Event as argument self.Prism.fileHighlight(); }); From 5bd182c04172512616216d782d61a6c60b2ab045 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Tue, 26 Feb 2019 04:43:27 +0100 Subject: [PATCH 0169/1100] Fix Lisp exponential string pattern (#1763) This PR fixes #1762 by fixing the `string` pattern which sometimes fails in exponential time. --- components/prism-lisp.js | 2 +- components/prism-lisp.min.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/components/prism-lisp.js b/components/prism-lisp.js index 4c2dceb5db..948cf575fd 100644 --- a/components/prism-lisp.js +++ b/components/prism-lisp.js @@ -32,7 +32,7 @@ }, comment: /;.*/, string: { - pattern: /"(?:[^"\\]*|\\.)*"/, + pattern: /"(?:[^"\\]|\\.)*"/, greedy: true, inside: { argument: /[-A-Z]+(?=[.,\s])/, diff --git a/components/prism-lisp.min.js b/components/prism-lisp.min.js index 9fa2a4e1dd..d52c1bbe51 100644 --- a/components/prism-lisp.min.js +++ b/components/prism-lisp.min.js @@ -1 +1 @@ -!function(e){function n(e){return RegExp("(\\()"+e+"(?=[\\s\\)])")}function a(e){return RegExp("([\\s([])"+e+"(?=[\\s)])")}var t="[-+*/_~!@$%^=<>{}\\w]+",r="&"+t,i="(\\()",s="(?=\\))",o="(?=\\s)",l={heading:{pattern:/;;;.*/,alias:["comment","title"]},comment:/;.*/,string:{pattern:/"(?:[^"\\]*|\\.)*"/,greedy:!0,inside:{argument:/[-A-Z]+(?=[.,\s])/,symbol:RegExp("`"+t+"'")}},"quoted-symbol":{pattern:RegExp("#?'"+t),alias:["variable","symbol"]},"lisp-property":{pattern:RegExp(":"+t),alias:"property"},splice:{pattern:RegExp(",@?"+t),alias:["symbol","variable"]},keyword:[{pattern:RegExp(i+"(?:(?:lexical-)?let\\*?|(?:cl-)?letf|if|when|while|unless|cons|cl-loop|and|or|not|cond|setq|error|message|null|require|provide|use-package)"+o),lookbehind:!0},{pattern:RegExp(i+"(?:for|do|collect|return|finally|append|concat|in|by)"+o),lookbehind:!0}],declare:{pattern:n("declare"),lookbehind:!0,alias:"keyword"},interactive:{pattern:n("interactive"),lookbehind:!0,alias:"keyword"},"boolean":{pattern:a("(?:t|nil)"),lookbehind:!0},number:{pattern:a("[-+]?\\d+(?:\\.\\d*)?"),lookbehind:!0},defvar:{pattern:RegExp(i+"def(?:var|const|custom|group)\\s+"+t),lookbehind:!0,inside:{keyword:/^def[a-z]+/,variable:RegExp(t)}},defun:{pattern:RegExp(i+"(?:cl-)?(?:defun\\*?|defmacro)\\s+"+t+"\\s+\\([\\s\\S]*?\\)"),lookbehind:!0,inside:{keyword:/^(?:cl-)?def\S+/,arguments:null,"function":{pattern:RegExp("(^\\s)"+t),lookbehind:!0},punctuation:/[()]/}},lambda:{pattern:RegExp(i+"lambda\\s+\\((?:&?"+t+"\\s*)*\\)"),lookbehind:!0,inside:{keyword:/^lambda/,arguments:null,punctuation:/[()]/}},car:{pattern:RegExp(i+t),lookbehind:!0},punctuation:[/(['`,]?\(|[)\[\]])/,{pattern:/(\s)\.(?=\s)/,lookbehind:!0}]},p={"lisp-marker":RegExp(r),rest:{argument:{pattern:RegExp(t),alias:"variable"},varform:{pattern:RegExp(i+t+"\\s+\\S[\\s\\S]*"+s),lookbehind:!0,inside:{string:l.string,"boolean":l.boolean,number:l.number,symbol:l.symbol,punctuation:/[()]/}}}},d="\\S+(?:\\s+\\S+)*",u={pattern:RegExp(i+"[\\s\\S]*"+s),lookbehind:!0,inside:{"rest-vars":{pattern:RegExp("&(?:rest|body)\\s+"+d),inside:p},"other-marker-vars":{pattern:RegExp("&(?:optional|aux)\\s+"+d),inside:p},keys:{pattern:RegExp("&key\\s+"+d+"(?:\\s+&allow-other-keys)?"),inside:p},argument:{pattern:RegExp(t),alias:"variable"},punctuation:/[()]/}};l.lambda.inside.arguments=u,l.defun.inside.arguments=e.util.clone(u),l.defun.inside.arguments.inside.sublist=u,e.languages.lisp=l,e.languages.elisp=l,e.languages.emacs=l,e.languages["emacs-lisp"]=l}(Prism); \ No newline at end of file +!function(e){function n(e){return RegExp("(\\()"+e+"(?=[\\s\\)])")}function a(e){return RegExp("([\\s([])"+e+"(?=[\\s)])")}var t="[-+*/_~!@$%^=<>{}\\w]+",r="&"+t,i="(\\()",s="(?=\\))",o="(?=\\s)",l={heading:{pattern:/;;;.*/,alias:["comment","title"]},comment:/;.*/,string:{pattern:/"(?:[^"\\]|\\.)*"/,greedy:!0,inside:{argument:/[-A-Z]+(?=[.,\s])/,symbol:RegExp("`"+t+"'")}},"quoted-symbol":{pattern:RegExp("#?'"+t),alias:["variable","symbol"]},"lisp-property":{pattern:RegExp(":"+t),alias:"property"},splice:{pattern:RegExp(",@?"+t),alias:["symbol","variable"]},keyword:[{pattern:RegExp(i+"(?:(?:lexical-)?let\\*?|(?:cl-)?letf|if|when|while|unless|cons|cl-loop|and|or|not|cond|setq|error|message|null|require|provide|use-package)"+o),lookbehind:!0},{pattern:RegExp(i+"(?:for|do|collect|return|finally|append|concat|in|by)"+o),lookbehind:!0}],declare:{pattern:n("declare"),lookbehind:!0,alias:"keyword"},interactive:{pattern:n("interactive"),lookbehind:!0,alias:"keyword"},"boolean":{pattern:a("(?:t|nil)"),lookbehind:!0},number:{pattern:a("[-+]?\\d+(?:\\.\\d*)?"),lookbehind:!0},defvar:{pattern:RegExp(i+"def(?:var|const|custom|group)\\s+"+t),lookbehind:!0,inside:{keyword:/^def[a-z]+/,variable:RegExp(t)}},defun:{pattern:RegExp(i+"(?:cl-)?(?:defun\\*?|defmacro)\\s+"+t+"\\s+\\([\\s\\S]*?\\)"),lookbehind:!0,inside:{keyword:/^(?:cl-)?def\S+/,arguments:null,"function":{pattern:RegExp("(^\\s)"+t),lookbehind:!0},punctuation:/[()]/}},lambda:{pattern:RegExp(i+"lambda\\s+\\((?:&?"+t+"\\s*)*\\)"),lookbehind:!0,inside:{keyword:/^lambda/,arguments:null,punctuation:/[()]/}},car:{pattern:RegExp(i+t),lookbehind:!0},punctuation:[/(['`,]?\(|[)\[\]])/,{pattern:/(\s)\.(?=\s)/,lookbehind:!0}]},p={"lisp-marker":RegExp(r),rest:{argument:{pattern:RegExp(t),alias:"variable"},varform:{pattern:RegExp(i+t+"\\s+\\S[\\s\\S]*"+s),lookbehind:!0,inside:{string:l.string,"boolean":l.boolean,number:l.number,symbol:l.symbol,punctuation:/[()]/}}}},d="\\S+(?:\\s+\\S+)*",u={pattern:RegExp(i+"[\\s\\S]*"+s),lookbehind:!0,inside:{"rest-vars":{pattern:RegExp("&(?:rest|body)\\s+"+d),inside:p},"other-marker-vars":{pattern:RegExp("&(?:optional|aux)\\s+"+d),inside:p},keys:{pattern:RegExp("&key\\s+"+d+"(?:\\s+&allow-other-keys)?"),inside:p},argument:{pattern:RegExp(t),alias:"variable"},punctuation:/[()]/}};l.lambda.inside.arguments=u,l.defun.inside.arguments=e.util.clone(u),l.defun.inside.arguments.inside.sublist=u,e.languages.lisp=l,e.languages.elisp=l,e.languages.emacs=l,e.languages["emacs-lisp"]=l}(Prism); \ No newline at end of file From b5041cf9eaae6f4aefd918f0ef6e0e67ba7ee5bb Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Tue, 26 Feb 2019 05:41:01 +0100 Subject: [PATCH 0170/1100] Fix JSONP support (#1745) This PR fixes that JSON did not support [JSONP](https://en.wikipedia.org/wiki/JSONP) callback functions. I also added a JSON example page. --- components.js | 2 +- components.json | 9 +++---- components/prism-json.js | 2 -- components/prism-json.min.js | 2 +- components/prism-jsonp.js | 7 ++++++ components/prism-jsonp.min.js | 1 + examples/prism-json.html | 19 +++++++++++++++ plugins/autoloader/prism-autoloader.js | 2 +- plugins/autoloader/prism-autoloader.min.js | 2 +- tests/languages/json/punctuation_feature.test | 10 ++++---- tests/languages/jsonp/function_feature.test | 13 ++++++++++ .../languages/jsonp/punctuation_feature.test | 24 +++++++++++++++++++ 12 files changed, 78 insertions(+), 15 deletions(-) create mode 100644 components/prism-jsonp.js create mode 100644 components/prism-jsonp.min.js create mode 100644 examples/prism-json.html create mode 100644 tests/languages/jsonp/function_feature.test create mode 100644 tests/languages/jsonp/punctuation_feature.test diff --git a/components.js b/components.js index 4fce784910..22217602f2 100644 --- a/components.js +++ b/components.js @@ -1,2 +1,2 @@ -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default","peerDependencies":"markup"},"clike":{"title":"C-like","option":"default","overrideExampleHeader":true},"javascript":{"title":"JavaScript","require":"clike","peerDependencies":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"actionscript":{"title":"ActionScript","require":"javascript","peerDependencies":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":"dotnet","owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","owner":"R-osey"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup","peerDependencies":["css","javascript"],"alias":"jinja2","owner":"romanvm"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","peerDependencies":["css","coffeescript","erb","javascript","less","markdown","ruby","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"http":{"title":"HTTP","peerDependencies":["javascript","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"json":{"title":"JSON","alias":"jsonp","aliasTitles":{"jsonp":"JSONP"},"owner":"CupOfTea696"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","owner":"japborst"},"less":{"title":"Less","require":"css","owner":"Golmote"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"nasm":{"title":"NASM","owner":"rbmj"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"cpp","peerDependencies":["c","cpp"],"overrideExampleHeader":true,"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"php-extras":{"title":"PHP Extras","require":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":"javascript","peerDependencies":["coffeescript","ejs","handlebars","hogan","less","livescript","markdown","mustache","plates","scss","stylus","swig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","peerDependencies":["c","cpp","fortran","ats","dsp"],"owner":"Golmote"},"python":{"title":"Python","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"ruby":{"title":"Ruby","require":"clike","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sql":{"title":"SQL","owner":"multipetros"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","peerDependencies":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","alias":"ts","owner":"vkbansal"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","owner":"hason"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":"Line Highlight","line-numbers":{"title":"Line Numbers","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","after":["autolinker","data-uri-highlight"]},"autolinker":"Autolinker","wpd":"WebPlatform Docs","custom-class":{"title":"Custom Class","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","noCSS":true},"show-language":{"title":"Show Language","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","owner":"Golmote","noCSS":true},"previewers":{"title":"Previewers","owner":"Golmote"},"autoloader":{"title":"Autoloader","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","owner":"Golmote","after":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","owner":"chriswells0"},"unescaped-markup":"Unescaped Markup","normalize-whitespace":{"title":"Normalize Whitespace","owner":"zeitgeist87","after":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","owner":"mAAdhaTTah","require":"toolbar","noCSS":true}}}; +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default","peerDependencies":"markup"},"clike":{"title":"C-like","option":"default","overrideExampleHeader":true},"javascript":{"title":"JavaScript","require":"clike","peerDependencies":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"actionscript":{"title":"ActionScript","require":"javascript","peerDependencies":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":"dotnet","owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","owner":"R-osey"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup","peerDependencies":["css","javascript"],"alias":"jinja2","owner":"romanvm"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","peerDependencies":["css","coffeescript","erb","javascript","less","markdown","ruby","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"http":{"title":"HTTP","peerDependencies":["javascript","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"json":{"title":"JSON","owner":"CupOfTea696"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","owner":"japborst"},"less":{"title":"Less","require":"css","owner":"Golmote"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"nasm":{"title":"NASM","owner":"rbmj"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"cpp","peerDependencies":["c","cpp"],"overrideExampleHeader":true,"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"php-extras":{"title":"PHP Extras","require":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":"javascript","peerDependencies":["coffeescript","ejs","handlebars","hogan","less","livescript","markdown","mustache","plates","scss","stylus","swig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","peerDependencies":["c","cpp","fortran","ats","dsp"],"owner":"Golmote"},"python":{"title":"Python","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"ruby":{"title":"Ruby","require":"clike","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sql":{"title":"SQL","owner":"multipetros"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","peerDependencies":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","alias":"ts","owner":"vkbansal"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","owner":"hason"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":"Line Highlight","line-numbers":{"title":"Line Numbers","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","after":["autolinker","data-uri-highlight"]},"autolinker":"Autolinker","wpd":"WebPlatform Docs","custom-class":{"title":"Custom Class","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","noCSS":true},"show-language":{"title":"Show Language","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","owner":"Golmote","noCSS":true},"previewers":{"title":"Previewers","owner":"Golmote"},"autoloader":{"title":"Autoloader","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","owner":"Golmote","after":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","owner":"chriswells0"},"unescaped-markup":"Unescaped Markup","normalize-whitespace":{"title":"Normalize Whitespace","owner":"zeitgeist87","after":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","owner":"mAAdhaTTah","require":"toolbar","noCSS":true}}}; if (typeof module !== 'undefined' && module.exports) { module.exports = components; } \ No newline at end of file diff --git a/components.json b/components.json index dc66aa6c2d..518ccc3045 100644 --- a/components.json +++ b/components.json @@ -398,12 +398,13 @@ }, "json": { "title": "JSON", - "alias": "jsonp", - "aliasTitles": { - "jsonp": "JSONP" - }, "owner": "CupOfTea696" }, + "jsonp": { + "title": "JSONP", + "require": "json", + "owner": "RunDevelopment" + }, "julia": { "title": "Julia", "owner": "cdagnino" diff --git a/components/prism-json.js b/components/prism-json.js index 70f0622b8e..5f4017913d 100644 --- a/components/prism-json.js +++ b/components/prism-json.js @@ -17,5 +17,3 @@ Prism.languages.json = { alias: 'keyword' } }; - -Prism.languages.jsonp = Prism.languages.json; diff --git a/components/prism-json.min.js b/components/prism-json.min.js index 2dfd523497..c10cf4d48d 100644 --- a/components/prism-json.min.js +++ b/components/prism-json.min.js @@ -1 +1 @@ -Prism.languages.json={comment:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,property:{pattern:/"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,greedy:!0},string:{pattern:/"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,greedy:!0},number:/-?\d+\.?\d*(e[+-]?\d+)?/i,punctuation:/[{}[\],]/,operator:/:/,"boolean":/\b(?:true|false)\b/,"null":{pattern:/\bnull\b/,alias:"keyword"}},Prism.languages.jsonp=Prism.languages.json; \ No newline at end of file +Prism.languages.json={comment:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,property:{pattern:/"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,greedy:!0},string:{pattern:/"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,greedy:!0},number:/-?\d+\.?\d*(e[+-]?\d+)?/i,punctuation:/[{}[\],]/,operator:/:/,"boolean":/\b(?:true|false)\b/,"null":{pattern:/\bnull\b/,alias:"keyword"}}; \ No newline at end of file diff --git a/components/prism-jsonp.js b/components/prism-jsonp.js new file mode 100644 index 0000000000..c942015776 --- /dev/null +++ b/components/prism-jsonp.js @@ -0,0 +1,7 @@ +Prism.languages.jsonp = Prism.languages.extend('json', { + 'punctuation': /[{}[\]();,.]/ +}); + +Prism.languages.insertBefore('jsonp', 'punctuation', { + 'function': /[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*\()/ +}); diff --git a/components/prism-jsonp.min.js b/components/prism-jsonp.min.js new file mode 100644 index 0000000000..b22701c4e6 --- /dev/null +++ b/components/prism-jsonp.min.js @@ -0,0 +1 @@ +Prism.languages.jsonp=Prism.languages.extend("json",{punctuation:/[{}[\]();,.]/}),Prism.languages.insertBefore("jsonp","punctuation",{"function":/[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*\()/}); \ No newline at end of file diff --git a/examples/prism-json.html b/examples/prism-json.html new file mode 100644 index 0000000000..6bfc5746b1 --- /dev/null +++ b/examples/prism-json.html @@ -0,0 +1,19 @@ +

    Full example

    +
    {
    +    "data": {
    +        "labels": [
    +            "foo",
    +            "bar"
    +        ],
    +        "series": [
    +            [ 0, 1, 2, 3 ],
    +            [ 0, -4, -8, -12 ]
    +        ]
    +    },
    +    // we even support comments
    +    "error": null,
    +    "status": "Ok"
    +}
    + +

    JSONP

    +
    callback({ "data": null });
    diff --git a/plugins/autoloader/prism-autoloader.js b/plugins/autoloader/prism-autoloader.js index 4d6a601450..42faa57013 100644 --- a/plugins/autoloader/prism-autoloader.js +++ b/plugins/autoloader/prism-autoloader.js @@ -4,7 +4,7 @@ } // The dependencies map is built automatically with gulp - var lang_dependencies = /*languages_placeholder[*/{"javascript":"clike","actionscript":"javascript","arduino":"cpp","aspnet":["markup","csharp"],"bison":"c","c":"clike","csharp":"clike","cpp":"c","coffeescript":"javascript","crystal":"ruby","css-extras":"css","d":"clike","dart":"clike","django":"markup","erb":["ruby","markup-templating"],"fsharp":"clike","flow":"javascript","glsl":"clike","gml":"clike","go":"clike","groovy":"clike","haml":"ruby","handlebars":"markup-templating","haxe":"clike","java":"clike","jolie":"clike","kotlin":"clike","less":"css","markdown":"markup","markup-templating":"markup","n4js":"javascript","nginx":"clike","objectivec":"c","opencl":"cpp","parser":"markup","php":["clike","markup-templating"],"php-extras":"php","plsql":"sql","processing":"clike","protobuf":"clike","pug":"javascript","qore":"clike","jsx":["markup","javascript"],"tsx":["jsx","typescript"],"reason":"clike","ruby":"clike","sass":"css","scss":"css","scala":"java","smarty":"markup-templating","soy":"markup-templating","swift":"clike","tap":"yaml","textile":"markup","tt2":["clike","markup-templating"],"twig":"markup","typescript":"javascript","vala":"clike","vbnet":"basic","velocity":"markup","wiki":"markup","xeora":"markup","xquery":"markup"}/*]*/; + var lang_dependencies = /*languages_placeholder[*/{"javascript":"clike","actionscript":"javascript","arduino":"cpp","aspnet":["markup","csharp"],"bison":"c","c":"clike","csharp":"clike","cpp":"c","coffeescript":"javascript","crystal":"ruby","css-extras":"css","d":"clike","dart":"clike","django":"markup","erb":["ruby","markup-templating"],"fsharp":"clike","flow":"javascript","glsl":"clike","gml":"clike","go":"clike","groovy":"clike","haml":"ruby","handlebars":"markup-templating","haxe":"clike","java":"clike","jolie":"clike","jsonp":"json","kotlin":"clike","less":"css","markdown":"markup","markup-templating":"markup","n4js":"javascript","nginx":"clike","objectivec":"c","opencl":"cpp","parser":"markup","php":["clike","markup-templating"],"php-extras":"php","plsql":"sql","processing":"clike","protobuf":"clike","pug":"javascript","qore":"clike","jsx":["markup","javascript"],"tsx":["jsx","typescript"],"reason":"clike","ruby":"clike","sass":"css","scss":"css","scala":"java","smarty":"markup-templating","soy":"markup-templating","swift":"clike","tap":"yaml","textile":"markup","tt2":["clike","markup-templating"],"twig":"markup","typescript":"javascript","vala":"clike","vbnet":"basic","velocity":"markup","wiki":"markup","xeora":"markup","xquery":"markup"}/*]*/; var lang_data = {}; diff --git a/plugins/autoloader/prism-autoloader.min.js b/plugins/autoloader/prism-autoloader.min.js index 629f1b2bf0..15f504ccbd 100644 --- a/plugins/autoloader/prism-autoloader.min.js +++ b/plugins/autoloader/prism-autoloader.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof self&&self.Prism&&self.document&&document.createElement){var e={javascript:"clike",actionscript:"javascript",arduino:"cpp",aspnet:["markup","csharp"],bison:"c",c:"clike",csharp:"clike",cpp:"c",coffeescript:"javascript",crystal:"ruby","css-extras":"css",d:"clike",dart:"clike",django:"markup",erb:["ruby","markup-templating"],fsharp:"clike",flow:"javascript",glsl:"clike",gml:"clike",go:"clike",groovy:"clike",haml:"ruby",handlebars:"markup-templating",haxe:"clike",java:"clike",jolie:"clike",kotlin:"clike",less:"css",markdown:"markup","markup-templating":"markup",n4js:"javascript",nginx:"clike",objectivec:"c",opencl:"cpp",parser:"markup",php:["clike","markup-templating"],"php-extras":"php",plsql:"sql",processing:"clike",protobuf:"clike",pug:"javascript",qore:"clike",jsx:["markup","javascript"],tsx:["jsx","typescript"],reason:"clike",ruby:"clike",sass:"css",scss:"css",scala:"java",smarty:"markup-templating",soy:"markup-templating",swift:"clike",tap:"yaml",textile:"markup",tt2:["clike","markup-templating"],twig:"markup",typescript:"javascript",vala:"clike",vbnet:"basic",velocity:"markup",wiki:"markup",xeora:"markup",xquery:"markup"},a={},c="none",t=document.getElementsByTagName("script");t=t[t.length-1];var r="components/";if(t.hasAttribute("data-autoloader-path")){var s=t.getAttribute("data-autoloader-path").trim();s.length>0&&!/^[a-z]+:\/\//i.test(t.src)&&(r=s.replace(/\/?$/,"/"))}else/[\w-]+\.js$/.test(t.src)&&(r=t.src.replace(/[\w-]+\.js$/,"components/"));var i=Prism.plugins.autoloader={languages_path:r,use_minified:!0},n=function(e,a,c){var t=document.createElement("script");t.src=e,t.async=!0,t.onload=function(){document.body.removeChild(t),a&&a()},t.onerror=function(){document.body.removeChild(t),c&&c()},document.body.appendChild(t)},l=function(e){return i.languages_path+"prism-"+e+(i.use_minified?".min":"")+".js"},o=function(e,c){var t=a[e];t||(t=a[e]={});var r=c.getAttribute("data-dependencies");!r&&c.parentNode&&"pre"===c.parentNode.tagName.toLowerCase()&&(r=c.parentNode.getAttribute("data-dependencies")),r=r?r.split(/\s*,\s*/g):[],p(r,function(){u(e,function(){Prism.highlightElement(c)})})},p=function(e,a,c){"string"==typeof e&&(e=[e]);var t=0,r=e.length,s=function(){r>t?u(e[t],function(){t++,s()},function(){c&&c(e[t])}):t===r&&a&&a(e)};s()},u=function(c,t,r){var s=function(){var e=!1;c.indexOf("!")>=0&&(e=!0,c=c.replace("!",""));var s=a[c];if(s||(s=a[c]={}),t&&(s.success_callbacks||(s.success_callbacks=[]),s.success_callbacks.push(t)),r&&(s.error_callbacks||(s.error_callbacks=[]),s.error_callbacks.push(r)),!e&&Prism.languages[c])m(c);else if(!e&&s.error)k(c);else if(e||!s.loading){s.loading=!0;var i=l(c);n(i,function(){s.loading=!1,m(c)},function(){s.loading=!1,s.error=!0,k(c)})}},i=e[c];i&&i.length?p(i,s):s()},m=function(e){a[e]&&a[e].success_callbacks&&a[e].success_callbacks.length&&a[e].success_callbacks.forEach(function(a){a(e)})},k=function(e){a[e]&&a[e].error_callbacks&&a[e].error_callbacks.length&&a[e].error_callbacks.forEach(function(a){a(e)})};Prism.hooks.add("complete",function(e){e.element&&e.language&&!e.grammar&&e.language!==c&&o(e.language,e.element)})}}(); \ No newline at end of file +!function(){if("undefined"!=typeof self&&self.Prism&&self.document&&document.createElement){var e={javascript:"clike",actionscript:"javascript",arduino:"cpp",aspnet:["markup","csharp"],bison:"c",c:"clike",csharp:"clike",cpp:"c",coffeescript:"javascript",crystal:"ruby","css-extras":"css",d:"clike",dart:"clike",django:"markup",erb:["ruby","markup-templating"],fsharp:"clike",flow:"javascript",glsl:"clike",gml:"clike",go:"clike",groovy:"clike",haml:"ruby",handlebars:"markup-templating",haxe:"clike",java:"clike",jolie:"clike",jsonp:"json",kotlin:"clike",less:"css",markdown:"markup","markup-templating":"markup",n4js:"javascript",nginx:"clike",objectivec:"c",opencl:"cpp",parser:"markup",php:["clike","markup-templating"],"php-extras":"php",plsql:"sql",processing:"clike",protobuf:"clike",pug:"javascript",qore:"clike",jsx:["markup","javascript"],tsx:["jsx","typescript"],reason:"clike",ruby:"clike",sass:"css",scss:"css",scala:"java",smarty:"markup-templating",soy:"markup-templating",swift:"clike",tap:"yaml",textile:"markup",tt2:["clike","markup-templating"],twig:"markup",typescript:"javascript",vala:"clike",vbnet:"basic",velocity:"markup",wiki:"markup",xeora:"markup",xquery:"markup"},a={},c="none",t=document.getElementsByTagName("script");t=t[t.length-1];var r="components/";if(t.hasAttribute("data-autoloader-path")){var s=t.getAttribute("data-autoloader-path").trim();s.length>0&&!/^[a-z]+:\/\//i.test(t.src)&&(r=s.replace(/\/?$/,"/"))}else/[\w-]+\.js$/.test(t.src)&&(r=t.src.replace(/[\w-]+\.js$/,"components/"));var i=Prism.plugins.autoloader={languages_path:r,use_minified:!0},n=function(e,a,c){var t=document.createElement("script");t.src=e,t.async=!0,t.onload=function(){document.body.removeChild(t),a&&a()},t.onerror=function(){document.body.removeChild(t),c&&c()},document.body.appendChild(t)},l=function(e){return i.languages_path+"prism-"+e+(i.use_minified?".min":"")+".js"},o=function(e,c){var t=a[e];t||(t=a[e]={});var r=c.getAttribute("data-dependencies");!r&&c.parentNode&&"pre"===c.parentNode.tagName.toLowerCase()&&(r=c.parentNode.getAttribute("data-dependencies")),r=r?r.split(/\s*,\s*/g):[],p(r,function(){u(e,function(){Prism.highlightElement(c)})})},p=function(e,a,c){"string"==typeof e&&(e=[e]);var t=0,r=e.length,s=function(){r>t?u(e[t],function(){t++,s()},function(){c&&c(e[t])}):t===r&&a&&a(e)};s()},u=function(c,t,r){var s=function(){var e=!1;c.indexOf("!")>=0&&(e=!0,c=c.replace("!",""));var s=a[c];if(s||(s=a[c]={}),t&&(s.success_callbacks||(s.success_callbacks=[]),s.success_callbacks.push(t)),r&&(s.error_callbacks||(s.error_callbacks=[]),s.error_callbacks.push(r)),!e&&Prism.languages[c])m(c);else if(!e&&s.error)k(c);else if(e||!s.loading){s.loading=!0;var i=l(c);n(i,function(){s.loading=!1,m(c)},function(){s.loading=!1,s.error=!0,k(c)})}},i=e[c];i&&i.length?p(i,s):s()},m=function(e){a[e]&&a[e].success_callbacks&&a[e].success_callbacks.length&&a[e].success_callbacks.forEach(function(a){a(e)})},k=function(e){a[e]&&a[e].error_callbacks&&a[e].error_callbacks.length&&a[e].error_callbacks.forEach(function(a){a(e)})};Prism.hooks.add("complete",function(e){e.element&&e.language&&!e.grammar&&e.language!==c&&o(e.language,e.element)})}}(); \ No newline at end of file diff --git a/tests/languages/json/punctuation_feature.test b/tests/languages/json/punctuation_feature.test index b8e351cd8e..0194621ef5 100644 --- a/tests/languages/json/punctuation_feature.test +++ b/tests/languages/json/punctuation_feature.test @@ -8,11 +8,11 @@ ---------------------------------------------------- [ - ["punctuation", "{"], ["punctuation", "}"], - ["punctuation", "{"], ["punctuation", "}"], - ["punctuation", "["], ["punctuation", "]"], - ["punctuation", "]"], ["punctuation", ","], - ["punctuation", "}"], ["punctuation", ","], + ["punctuation", "{"], ["punctuation", "}"], + ["punctuation", "{"], ["punctuation", "}"], + ["punctuation", "["], ["punctuation", "]"], + ["punctuation", "]"], ["punctuation", ","], + ["punctuation", "}"], ["punctuation", ","], ["punctuation", ","] ] ---------------------------------------------------- diff --git a/tests/languages/jsonp/function_feature.test b/tests/languages/jsonp/function_feature.test new file mode 100644 index 0000000000..b881f928a5 --- /dev/null +++ b/tests/languages/jsonp/function_feature.test @@ -0,0 +1,13 @@ +callback(); + +---------------------------------------------------- + +[ + ["function", "callback"], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", ";"] +] +---------------------------------------------------- + +Checks for callback functions. diff --git a/tests/languages/jsonp/punctuation_feature.test b/tests/languages/jsonp/punctuation_feature.test new file mode 100644 index 0000000000..6b2184b42d --- /dev/null +++ b/tests/languages/jsonp/punctuation_feature.test @@ -0,0 +1,24 @@ +{} +{ } +[] +], +}, +, +; +() + +---------------------------------------------------- + +[ + ["punctuation", "{"], ["punctuation", "}"], + ["punctuation", "{"], ["punctuation", "}"], + ["punctuation", "["], ["punctuation", "]"], + ["punctuation", "]"], ["punctuation", ","], + ["punctuation", "}"], ["punctuation", ","], + ["punctuation", ","], + ["punctuation", ";"], + ["punctuation", "("], ["punctuation", ")"] +] +---------------------------------------------------- + +Checks for punctuation. From ae4842db84e12ba1a1728d4b5bb014469b89e4cd Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Wed, 27 Feb 2019 14:54:06 +0100 Subject: [PATCH 0171/1100] Fixed JSON/JSONP examples (#1765) This corrects my previous mistake where I forgot to adjust the example of JSON after changing the implementation of JSONP. --- examples/prism-json.html | 3 --- examples/prism-jsonp.html | 2 ++ 2 files changed, 2 insertions(+), 3 deletions(-) create mode 100644 examples/prism-jsonp.html diff --git a/examples/prism-json.html b/examples/prism-json.html index 6bfc5746b1..027f9310f7 100644 --- a/examples/prism-json.html +++ b/examples/prism-json.html @@ -14,6 +14,3 @@

    Full example

    "error": null, "status": "Ok" }
    - -

    JSONP

    -
    callback({ "data": null });
    diff --git a/examples/prism-jsonp.html b/examples/prism-jsonp.html new file mode 100644 index 0000000000..5de6ffa882 --- /dev/null +++ b/examples/prism-jsonp.html @@ -0,0 +1,2 @@ +

    Callbacks

    +
    callback({ "data": null });
    From 6d98f0e743f4139e11092cabd14c87e6df9d7386 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Thu, 28 Feb 2019 19:10:37 +0100 Subject: [PATCH 0172/1100] Added ANBF language (#1753) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This adds a new language: ANBF (Augmented Backus–Naur form). --- components.js | 2 +- components.json | 4 ++ components/prism-abnf.js | 54 +++++++++++++++++ components/prism-abnf.min.js | 1 + examples/prism-abnf.html | 60 +++++++++++++++++++ plugins/show-language/prism-show-language.js | 2 +- .../show-language/prism-show-language.min.js | 2 +- tests/languages/abnf/comment_feature.test | 13 ++++ tests/languages/abnf/core-rule_feature.test | 53 ++++++++++++++++ tests/languages/abnf/definition_feature.test | 22 +++++++ tests/languages/abnf/operator_feature.test | 13 ++++ tests/languages/abnf/punctuation_feature.test | 15 +++++ tests/languages/abnf/range_feature.test | 17 ++++++ tests/languages/abnf/repetition_feature.test | 19 ++++++ tests/languages/abnf/rule_feature.test | 19 ++++++ tests/languages/abnf/string_feature.test | 29 +++++++++ tests/languages/abnf/terminal_feature.test | 19 ++++++ 17 files changed, 341 insertions(+), 3 deletions(-) create mode 100644 components/prism-abnf.js create mode 100644 components/prism-abnf.min.js create mode 100644 examples/prism-abnf.html create mode 100644 tests/languages/abnf/comment_feature.test create mode 100644 tests/languages/abnf/core-rule_feature.test create mode 100644 tests/languages/abnf/definition_feature.test create mode 100644 tests/languages/abnf/operator_feature.test create mode 100644 tests/languages/abnf/punctuation_feature.test create mode 100644 tests/languages/abnf/range_feature.test create mode 100644 tests/languages/abnf/repetition_feature.test create mode 100644 tests/languages/abnf/rule_feature.test create mode 100644 tests/languages/abnf/string_feature.test create mode 100644 tests/languages/abnf/terminal_feature.test diff --git a/components.js b/components.js index 22217602f2..6b8a73f63c 100644 --- a/components.js +++ b/components.js @@ -1,2 +1,2 @@ -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default","peerDependencies":"markup"},"clike":{"title":"C-like","option":"default","overrideExampleHeader":true},"javascript":{"title":"JavaScript","require":"clike","peerDependencies":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"actionscript":{"title":"ActionScript","require":"javascript","peerDependencies":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":"dotnet","owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","owner":"R-osey"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup","peerDependencies":["css","javascript"],"alias":"jinja2","owner":"romanvm"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","peerDependencies":["css","coffeescript","erb","javascript","less","markdown","ruby","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"http":{"title":"HTTP","peerDependencies":["javascript","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"json":{"title":"JSON","owner":"CupOfTea696"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","owner":"japborst"},"less":{"title":"Less","require":"css","owner":"Golmote"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"nasm":{"title":"NASM","owner":"rbmj"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"cpp","peerDependencies":["c","cpp"],"overrideExampleHeader":true,"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"php-extras":{"title":"PHP Extras","require":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":"javascript","peerDependencies":["coffeescript","ejs","handlebars","hogan","less","livescript","markdown","mustache","plates","scss","stylus","swig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","peerDependencies":["c","cpp","fortran","ats","dsp"],"owner":"Golmote"},"python":{"title":"Python","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"ruby":{"title":"Ruby","require":"clike","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sql":{"title":"SQL","owner":"multipetros"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","peerDependencies":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","alias":"ts","owner":"vkbansal"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","owner":"hason"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":"Line Highlight","line-numbers":{"title":"Line Numbers","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","after":["autolinker","data-uri-highlight"]},"autolinker":"Autolinker","wpd":"WebPlatform Docs","custom-class":{"title":"Custom Class","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","noCSS":true},"show-language":{"title":"Show Language","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","owner":"Golmote","noCSS":true},"previewers":{"title":"Previewers","owner":"Golmote"},"autoloader":{"title":"Autoloader","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","owner":"Golmote","after":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","owner":"chriswells0"},"unescaped-markup":"Unescaped Markup","normalize-whitespace":{"title":"Normalize Whitespace","owner":"zeitgeist87","after":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","owner":"mAAdhaTTah","require":"toolbar","noCSS":true}}}; +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default","peerDependencies":"markup"},"clike":{"title":"C-like","option":"default","overrideExampleHeader":true},"javascript":{"title":"JavaScript","require":"clike","peerDependencies":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"Augmented Backus–Naur form","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","peerDependencies":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":"dotnet","owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","owner":"R-osey"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup","peerDependencies":["css","javascript"],"alias":"jinja2","owner":"romanvm"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","peerDependencies":["css","coffeescript","erb","javascript","less","markdown","ruby","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"http":{"title":"HTTP","peerDependencies":["javascript","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"json":{"title":"JSON","owner":"CupOfTea696"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","owner":"japborst"},"less":{"title":"Less","require":"css","owner":"Golmote"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"nasm":{"title":"NASM","owner":"rbmj"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"cpp","peerDependencies":["c","cpp"],"overrideExampleHeader":true,"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"php-extras":{"title":"PHP Extras","require":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":"javascript","peerDependencies":["coffeescript","ejs","handlebars","hogan","less","livescript","markdown","mustache","plates","scss","stylus","swig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","peerDependencies":["c","cpp","fortran","ats","dsp"],"owner":"Golmote"},"python":{"title":"Python","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"ruby":{"title":"Ruby","require":"clike","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sql":{"title":"SQL","owner":"multipetros"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","peerDependencies":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","alias":"ts","owner":"vkbansal"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","owner":"hason"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":"Line Highlight","line-numbers":{"title":"Line Numbers","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","after":["autolinker","data-uri-highlight"]},"autolinker":"Autolinker","wpd":"WebPlatform Docs","custom-class":{"title":"Custom Class","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","noCSS":true},"show-language":{"title":"Show Language","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","owner":"Golmote","noCSS":true},"previewers":{"title":"Previewers","owner":"Golmote"},"autoloader":{"title":"Autoloader","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","owner":"Golmote","after":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","owner":"chriswells0"},"unescaped-markup":"Unescaped Markup","normalize-whitespace":{"title":"Normalize Whitespace","owner":"zeitgeist87","after":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","owner":"mAAdhaTTah","require":"toolbar","noCSS":true}}}; if (typeof module !== 'undefined' && module.exports) { module.exports = components; } \ No newline at end of file diff --git a/components.json b/components.json index 518ccc3045..6369408eba 100644 --- a/components.json +++ b/components.json @@ -78,6 +78,10 @@ "title": "ABAP", "owner": "dellagustin" }, + "abnf": { + "title": "Augmented Backus–Naur form", + "owner": "RunDevelopment" + }, "actionscript": { "title": "ActionScript", "require": "javascript", diff --git a/components/prism-abnf.js b/components/prism-abnf.js new file mode 100644 index 0000000000..74b34392bd --- /dev/null +++ b/components/prism-abnf.js @@ -0,0 +1,54 @@ +(function (Prism) { + + var coreRules = '(?:ALPHA|BIT|CHAR|CR|CRLF|CTL|DIGIT|DQUOTE|HEXDIG|HTAB|LF|LWSP|OCTET|SP|VCHAR|WSP)'; + + Prism.languages.abnf = { + 'comment': /;.*/, + 'string': { + pattern: /(?:%[is])?"[^"\n\r]*"/, + greedy: true, + inside: { + 'punctuation': /^%[is]/ + } + }, + 'range': { + pattern: /%(?:b[01]+-[01]+|d\d+-\d+|x[A-F\d]+-[A-F\d]+)/i, + alias: 'number' + }, + 'terminal': { + pattern: /%(?:b[01]+(?:\.[01]+)*|d\d+(?:\.\d+)*|x[A-F\d]+(?:\.[A-F\d]+)*)/i, + alias: 'number' + }, + 'repetition': { + pattern: /(^|[^\w-])(?:\d*\*\d*|\d+)/, + lookbehind: true, + alias: 'operator' + }, + 'definition': { + pattern: /(^[ \t]*)(?:[a-z][\w-]*|<[^>\r\n]*>)(?=\s*=)/m, + lookbehind: true, + alias: 'keyword', + inside: { + 'punctuation': /<|>/ + } + }, + 'core-rule': { + pattern: RegExp('(?:(^|[^<\\w-])' + coreRules + '|<' + coreRules + '>)(?![\\w-])', 'i'), + lookbehind: true, + alias: ['rule', 'constant'], + inside: { + 'punctuation': /<|>/ + } + }, + 'rule': { + pattern: /(^|[^<\w-])[a-z][\w-]*|<[^>\r\n]*>/i, + lookbehind: true, + inside: { + 'punctuation': /<|>/ + } + }, + 'operator': /=\/?|\//, + 'punctuation': /[()\[\]]/ + }; + +})(Prism); diff --git a/components/prism-abnf.min.js b/components/prism-abnf.min.js new file mode 100644 index 0000000000..55a43a9b14 --- /dev/null +++ b/components/prism-abnf.min.js @@ -0,0 +1 @@ +!function(n){var i="(?:ALPHA|BIT|CHAR|CR|CRLF|CTL|DIGIT|DQUOTE|HEXDIG|HTAB|LF|LWSP|OCTET|SP|VCHAR|WSP)";n.languages.abnf={comment:/;.*/,string:{pattern:/(?:%[is])?"[^"\n\r]*"/,greedy:!0,inside:{punctuation:/^%[is]/}},range:{pattern:/%(?:b[01]+-[01]+|d\d+-\d+|x[A-F\d]+-[A-F\d]+)/i,alias:"number"},terminal:{pattern:/%(?:b[01]+(?:\.[01]+)*|d\d+(?:\.\d+)*|x[A-F\d]+(?:\.[A-F\d]+)*)/i,alias:"number"},repetition:{pattern:/(^|[^\w-])(?:\d*\*\d*|\d+)/,lookbehind:!0,alias:"operator"},definition:{pattern:/(^[ \t]*)(?:[a-z][\w-]*|<[^>\r\n]*>)(?=\s*=)/m,lookbehind:!0,alias:"keyword",inside:{punctuation:/<|>/}},"core-rule":{pattern:RegExp("(?:(^|[^<\\w-])"+i+"|<"+i+">)(?![\\w-])","i"),lookbehind:!0,alias:["rule","constant"],inside:{punctuation:/<|>/}},rule:{pattern:/(^|[^<\w-])[a-z][\w-]*|<[^>\r\n]*>/i,lookbehind:!0,inside:{punctuation:/<|>/}},operator:/=\/?|\//,punctuation:/[()\[\]]/}}(Prism); \ No newline at end of file diff --git a/examples/prism-abnf.html b/examples/prism-abnf.html new file mode 100644 index 0000000000..c983c985b8 --- /dev/null +++ b/examples/prism-abnf.html @@ -0,0 +1,60 @@ +

    Full example

    +
    rulelist       =  1*( rule / (*c-wsp c-nl) )
    +
    +rule           =  rulename defined-as elements c-nl
    +                       ; continues if next line starts
    +                       ;  with white space
    +
    +rulename       =  ALPHA *(ALPHA / DIGIT / "-")
    +
    +defined-as     =  *c-wsp ("=" / "=/") *c-wsp
    +                       ; basic rules definition and
    +                       ;  incremental alternatives
    +
    +elements       =  alternation *c-wsp
    +
    +c-wsp          =  WSP / (c-nl WSP)
    +
    +c-nl           =  comment / CRLF
    +                       ; comment or newline
    +
    +comment        =  ";" *(WSP / VCHAR) CRLF
    +
    +alternation    =  concatenation
    +                  *(*c-wsp "/" *c-wsp concatenation)
    +
    +concatenation  =  repetition *(1*c-wsp repetition)
    +
    +repetition     =  [repeat] element
    +
    +repeat         =  1*DIGIT / (*DIGIT "*" *DIGIT)
    +
    +element        =  rulename / group / option /
    +                  char-val / num-val / prose-val
    +
    +group          =  "(" *c-wsp alternation *c-wsp ")"
    +
    +option         =  "[" *c-wsp alternation *c-wsp "]"
    +
    +char-val       =  DQUOTE *(%x20-21 / %x23-7E) DQUOTE
    +                       ; quoted string of SP and VCHAR
    +                       ;  without DQUOTE
    +
    +num-val        =  "%" (bin-val / dec-val / hex-val)
    +
    +bin-val        =  "b" 1*BIT
    +                  [ 1*("." 1*BIT) / ("-" 1*BIT) ]
    +                       ; series of concatenated bit values
    +                       ;  or single ONEOF range
    +
    +dec-val        =  "d" 1*DIGIT
    +                  [ 1*("." 1*DIGIT) / ("-" 1*DIGIT) ]
    +
    +hex-val        =  "x" 1*HEXDIG
    +                  [ 1*("." 1*HEXDIG) / ("-" 1*HEXDIG) ]
    +
    +prose-val      =  "<" *(%x20-3D / %x3F-7E) ">"
    +                       ; bracketed string of SP and VCHAR
    +                       ;  without angles
    +                       ; prose description, to be used as
    +                       ;  last resort
    diff --git a/plugins/show-language/prism-show-language.js b/plugins/show-language/prism-show-language.js index 0d59ede5a4..2b8012b2af 100644 --- a/plugins/show-language/prism-show-language.js +++ b/plugins/show-language/prism-show-language.js @@ -11,7 +11,7 @@ if (!Prism.plugins.toolbar) { } // The languages map is built automatically with gulp -var Languages = /*languages_placeholder[*/{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","css":"CSS","clike":"C-like","js":"JavaScript","abap":"ABAP","apacheconf":"Apache Configuration","apl":"APL","arff":"ARFF","asciidoc":"AsciiDoc","adoc":"AsciiDoc","asm6502":"6502 Assembly","aspnet":"ASP.NET (C#)","autohotkey":"AutoHotkey","autoit":"AutoIt","shell":"Bash","basic":"BASIC","csharp":"C#","dotnet":"C#","cpp":"C++","cil":"CIL","csp":"Content-Security-Policy","css-extras":"CSS Extras","django":"Django/Jinja2","jinja2":"Django/Jinja2","dockerfile":"Docker","erb":"ERB","fsharp":"F#","gcode":"G-code","gedcom":"GEDCOM","glsl":"GLSL","gml":"GameMaker Language","gamemakerlanguage":"GameMaker Language","graphql":"GraphQL","hcl":"HCL","http":"HTTP","hpkp":"HTTP Public-Key-Pins","hsts":"HTTP Strict-Transport-Security","ichigojam":"IchigoJam","inform7":"Inform 7","javastacktrace":"Java stack trace","json":"JSON","jsonp":"JSONP","latex":"LaTeX","emacs":"Lisp","elisp":"Lisp","emacs-lisp":"Lisp","lolcode":"LOLCODE","markup-templating":"Markup templating","matlab":"MATLAB","mel":"MEL","n1ql":"N1QL","n4js":"N4JS","n4jsd":"N4JS","nand2tetris-hdl":"Nand To Tetris HDL","nasm":"NASM","nginx":"nginx","nsis":"NSIS","objectivec":"Objective-C","ocaml":"OCaml","opencl":"OpenCL","parigp":"PARI/GP","objectpascal":"Object Pascal","php":"PHP","php-extras":"PHP Extras","plsql":"PL/SQL","powershell":"PowerShell","properties":".properties","protobuf":"Protocol Buffers","q":"Q (kdb+ database)","jsx":"React JSX","tsx":"React TSX","renpy":"Ren'py","rest":"reST (reStructuredText)","sas":"SAS","sass":"Sass (Sass)","scss":"Sass (Scss)","sql":"SQL","soy":"Soy (Closure Template)","tap":"TAP","toml":"TOML","tt2":"Template Toolkit 2","ts":"TypeScript","vbnet":"VB.Net","vhdl":"VHDL","vim":"vim","visual-basic":"Visual Basic","vb":"Visual Basic","wasm":"WebAssembly","wiki":"Wiki markup","xeoracube":"XeoraCube","xojo":"Xojo (REALbasic)","xquery":"XQuery","yaml":"YAML"}/*]*/; +var Languages = /*languages_placeholder[*/{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","css":"CSS","clike":"C-like","js":"JavaScript","abap":"ABAP","abnf":"Augmented Backus–Naur form","apacheconf":"Apache Configuration","apl":"APL","arff":"ARFF","asciidoc":"AsciiDoc","adoc":"AsciiDoc","asm6502":"6502 Assembly","aspnet":"ASP.NET (C#)","autohotkey":"AutoHotkey","autoit":"AutoIt","shell":"Bash","basic":"BASIC","csharp":"C#","dotnet":"C#","cpp":"C++","cil":"CIL","csp":"Content-Security-Policy","css-extras":"CSS Extras","django":"Django/Jinja2","jinja2":"Django/Jinja2","dockerfile":"Docker","erb":"ERB","fsharp":"F#","gcode":"G-code","gedcom":"GEDCOM","glsl":"GLSL","gml":"GameMaker Language","gamemakerlanguage":"GameMaker Language","graphql":"GraphQL","hcl":"HCL","http":"HTTP","hpkp":"HTTP Public-Key-Pins","hsts":"HTTP Strict-Transport-Security","ichigojam":"IchigoJam","inform7":"Inform 7","javastacktrace":"Java stack trace","json":"JSON","jsonp":"JSONP","latex":"LaTeX","emacs":"Lisp","elisp":"Lisp","emacs-lisp":"Lisp","lolcode":"LOLCODE","markup-templating":"Markup templating","matlab":"MATLAB","mel":"MEL","n1ql":"N1QL","n4js":"N4JS","n4jsd":"N4JS","nand2tetris-hdl":"Nand To Tetris HDL","nasm":"NASM","nginx":"nginx","nsis":"NSIS","objectivec":"Objective-C","ocaml":"OCaml","opencl":"OpenCL","parigp":"PARI/GP","objectpascal":"Object Pascal","php":"PHP","php-extras":"PHP Extras","plsql":"PL/SQL","powershell":"PowerShell","properties":".properties","protobuf":"Protocol Buffers","q":"Q (kdb+ database)","jsx":"React JSX","tsx":"React TSX","renpy":"Ren'py","rest":"reST (reStructuredText)","sas":"SAS","sass":"Sass (Sass)","scss":"Sass (Scss)","sql":"SQL","soy":"Soy (Closure Template)","tap":"TAP","toml":"TOML","tt2":"Template Toolkit 2","ts":"TypeScript","vbnet":"VB.Net","vhdl":"VHDL","vim":"vim","visual-basic":"Visual Basic","vb":"Visual Basic","wasm":"WebAssembly","wiki":"Wiki markup","xeoracube":"XeoraCube","xojo":"Xojo (REALbasic)","xquery":"XQuery","yaml":"YAML"}/*]*/; Prism.plugins.toolbar.registerButton('show-language', function(env) { var pre = env.element.parentNode; diff --git a/plugins/show-language/prism-show-language.min.js b/plugins/show-language/prism-show-language.min.js index c04d429070..a453405418 100644 --- a/plugins/show-language/prism-show-language.min.js +++ b/plugins/show-language/prism-show-language.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof self&&self.Prism&&self.document){if(!Prism.plugins.toolbar)return console.warn("Show Languages plugin loaded before Toolbar plugin."),void 0;var e={html:"HTML",xml:"XML",svg:"SVG",mathml:"MathML",css:"CSS",clike:"C-like",js:"JavaScript",abap:"ABAP",apacheconf:"Apache Configuration",apl:"APL",arff:"ARFF",asciidoc:"AsciiDoc",adoc:"AsciiDoc",asm6502:"6502 Assembly",aspnet:"ASP.NET (C#)",autohotkey:"AutoHotkey",autoit:"AutoIt",shell:"Bash",basic:"BASIC",csharp:"C#",dotnet:"C#",cpp:"C++",cil:"CIL",csp:"Content-Security-Policy","css-extras":"CSS Extras",django:"Django/Jinja2",jinja2:"Django/Jinja2",dockerfile:"Docker",erb:"ERB",fsharp:"F#",gcode:"G-code",gedcom:"GEDCOM",glsl:"GLSL",gml:"GameMaker Language",gamemakerlanguage:"GameMaker Language",graphql:"GraphQL",hcl:"HCL",http:"HTTP",hpkp:"HTTP Public-Key-Pins",hsts:"HTTP Strict-Transport-Security",ichigojam:"IchigoJam",inform7:"Inform 7",javastacktrace:"Java stack trace",json:"JSON",jsonp:"JSONP",latex:"LaTeX",emacs:"Lisp",elisp:"Lisp","emacs-lisp":"Lisp",lolcode:"LOLCODE","markup-templating":"Markup templating",matlab:"MATLAB",mel:"MEL",n1ql:"N1QL",n4js:"N4JS",n4jsd:"N4JS","nand2tetris-hdl":"Nand To Tetris HDL",nasm:"NASM",nginx:"nginx",nsis:"NSIS",objectivec:"Objective-C",ocaml:"OCaml",opencl:"OpenCL",parigp:"PARI/GP",objectpascal:"Object Pascal",php:"PHP","php-extras":"PHP Extras",plsql:"PL/SQL",powershell:"PowerShell",properties:".properties",protobuf:"Protocol Buffers",q:"Q (kdb+ database)",jsx:"React JSX",tsx:"React TSX",renpy:"Ren'py",rest:"reST (reStructuredText)",sas:"SAS",sass:"Sass (Sass)",scss:"Sass (Scss)",sql:"SQL",soy:"Soy (Closure Template)",tap:"TAP",toml:"TOML",tt2:"Template Toolkit 2",ts:"TypeScript",vbnet:"VB.Net",vhdl:"VHDL",vim:"vim","visual-basic":"Visual Basic",vb:"Visual Basic",wasm:"WebAssembly",wiki:"Wiki markup",xeoracube:"XeoraCube",xojo:"Xojo (REALbasic)",xquery:"XQuery",yaml:"YAML"};Prism.plugins.toolbar.registerButton("show-language",function(a){function s(e){return e?(e.substring(0,1).toUpperCase()+e.substring(1)).replace(/s(?=cript)/,"S"):e}var t=a.element.parentNode;if(t&&/pre/i.test(t.nodeName)){var o=t.getAttribute("data-language")||e[a.language]||s(a.language);if(o){var i=document.createElement("span");return i.textContent=o,i}}})}}(); \ No newline at end of file +!function(){if("undefined"!=typeof self&&self.Prism&&self.document){if(!Prism.plugins.toolbar)return console.warn("Show Languages plugin loaded before Toolbar plugin."),void 0;var e={html:"HTML",xml:"XML",svg:"SVG",mathml:"MathML",css:"CSS",clike:"C-like",js:"JavaScript",abap:"ABAP",abnf:"Augmented Backus–Naur form",apacheconf:"Apache Configuration",apl:"APL",arff:"ARFF",asciidoc:"AsciiDoc",adoc:"AsciiDoc",asm6502:"6502 Assembly",aspnet:"ASP.NET (C#)",autohotkey:"AutoHotkey",autoit:"AutoIt",shell:"Bash",basic:"BASIC",csharp:"C#",dotnet:"C#",cpp:"C++",cil:"CIL",csp:"Content-Security-Policy","css-extras":"CSS Extras",django:"Django/Jinja2",jinja2:"Django/Jinja2",dockerfile:"Docker",erb:"ERB",fsharp:"F#",gcode:"G-code",gedcom:"GEDCOM",glsl:"GLSL",gml:"GameMaker Language",gamemakerlanguage:"GameMaker Language",graphql:"GraphQL",hcl:"HCL",http:"HTTP",hpkp:"HTTP Public-Key-Pins",hsts:"HTTP Strict-Transport-Security",ichigojam:"IchigoJam",inform7:"Inform 7",javastacktrace:"Java stack trace",json:"JSON",jsonp:"JSONP",latex:"LaTeX",emacs:"Lisp",elisp:"Lisp","emacs-lisp":"Lisp",lolcode:"LOLCODE","markup-templating":"Markup templating",matlab:"MATLAB",mel:"MEL",n1ql:"N1QL",n4js:"N4JS",n4jsd:"N4JS","nand2tetris-hdl":"Nand To Tetris HDL",nasm:"NASM",nginx:"nginx",nsis:"NSIS",objectivec:"Objective-C",ocaml:"OCaml",opencl:"OpenCL",parigp:"PARI/GP",objectpascal:"Object Pascal",php:"PHP","php-extras":"PHP Extras",plsql:"PL/SQL",powershell:"PowerShell",properties:".properties",protobuf:"Protocol Buffers",q:"Q (kdb+ database)",jsx:"React JSX",tsx:"React TSX",renpy:"Ren'py",rest:"reST (reStructuredText)",sas:"SAS",sass:"Sass (Sass)",scss:"Sass (Scss)",sql:"SQL",soy:"Soy (Closure Template)",tap:"TAP",toml:"TOML",tt2:"Template Toolkit 2",ts:"TypeScript",vbnet:"VB.Net",vhdl:"VHDL",vim:"vim","visual-basic":"Visual Basic",vb:"Visual Basic",wasm:"WebAssembly",wiki:"Wiki markup",xeoracube:"XeoraCube",xojo:"Xojo (REALbasic)",xquery:"XQuery",yaml:"YAML"};Prism.plugins.toolbar.registerButton("show-language",function(a){function s(e){return e?(e.substring(0,1).toUpperCase()+e.substring(1)).replace(/s(?=cript)/,"S"):e}var t=a.element.parentNode;if(t&&/pre/i.test(t.nodeName)){var o=t.getAttribute("data-language")||e[a.language]||s(a.language);if(o){var r=document.createElement("span");return r.textContent=o,r}}})}}(); \ No newline at end of file diff --git a/tests/languages/abnf/comment_feature.test b/tests/languages/abnf/comment_feature.test new file mode 100644 index 0000000000..1107b4ceaf --- /dev/null +++ b/tests/languages/abnf/comment_feature.test @@ -0,0 +1,13 @@ +; +; comment + +---------------------------------------------------- + +[ + ["comment", ";"], + ["comment", "; comment"] +] + +---------------------------------------------------- + +Checks for comments. diff --git a/tests/languages/abnf/core-rule_feature.test b/tests/languages/abnf/core-rule_feature.test new file mode 100644 index 0000000000..6b692e5ed5 --- /dev/null +++ b/tests/languages/abnf/core-rule_feature.test @@ -0,0 +1,53 @@ +ALPHA +BIT +CHAR +CR +CRLF +CTL +DIGIT +DQUOTE +HEXDIG +HTAB +LF +LWSP +OCTET +SP +VCHAR +WSP + +bit +biT + + +---------------------------------------------------- + +[ + ["core-rule", ["ALPHA"]], + ["core-rule", ["BIT"]], + ["core-rule", ["CHAR"]], + ["core-rule", ["CR"]], + ["core-rule", ["CRLF"]], + ["core-rule", ["CTL"]], + ["core-rule", ["DIGIT"]], + ["core-rule", ["DQUOTE"]], + ["core-rule", ["HEXDIG"]], + ["core-rule", ["HTAB"]], + ["core-rule", ["LF"]], + ["core-rule", ["LWSP"]], + ["core-rule", ["OCTET"]], + ["core-rule", ["SP"]], + ["core-rule", ["VCHAR"]], + ["core-rule", ["WSP"]], + + ["core-rule", ["bit"]], + ["core-rule", ["biT"]], + ["core-rule", [ + ["punctuation", "<"], + "bIt", + ["punctuation", ">"] + ]] +] + +---------------------------------------------------- + +Checks for core rules. diff --git a/tests/languages/abnf/definition_feature.test b/tests/languages/abnf/definition_feature.test new file mode 100644 index 0000000000..92166ce353 --- /dev/null +++ b/tests/languages/abnf/definition_feature.test @@ -0,0 +1,22 @@ +foo-bar = %x20 + =/ foo-bar + +---------------------------------------------------- + +[ + ["definition", ["foo-bar"]], + ["operator", "="], + ["terminal", "%x20"], + + ["definition", [ + ["punctuation", "<"], + "foo-foo", + ["punctuation", ">"] + ]], + ["operator", "=/"], + ["rule", ["foo-bar"]] +] + +---------------------------------------------------- + +Checks for definitions. diff --git a/tests/languages/abnf/operator_feature.test b/tests/languages/abnf/operator_feature.test new file mode 100644 index 0000000000..c5c5e4158f --- /dev/null +++ b/tests/languages/abnf/operator_feature.test @@ -0,0 +1,13 @@ += =/ / + +---------------------------------------------------- + +[ + ["operator", "="], + ["operator", "=/"], + ["operator", "/"] +] + +---------------------------------------------------- + +Checks for operators. diff --git a/tests/languages/abnf/punctuation_feature.test b/tests/languages/abnf/punctuation_feature.test new file mode 100644 index 0000000000..f1581e32dc --- /dev/null +++ b/tests/languages/abnf/punctuation_feature.test @@ -0,0 +1,15 @@ +() +[] + +---------------------------------------------------- + +[ + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", "["], + ["punctuation", "]"] +] + +---------------------------------------------------- + +Checks for punctuation. diff --git a/tests/languages/abnf/range_feature.test b/tests/languages/abnf/range_feature.test new file mode 100644 index 0000000000..b56bc1c9e3 --- /dev/null +++ b/tests/languages/abnf/range_feature.test @@ -0,0 +1,17 @@ +%b0-11111 +%d0-31 +%x0-1F +%x0-1f + +---------------------------------------------------- + +[ + ["range", "%b0-11111"], + ["range", "%d0-31"], + ["range", "%x0-1F"], + ["range", "%x0-1f"] +] + +---------------------------------------------------- + +Checks for ranges. diff --git a/tests/languages/abnf/repetition_feature.test b/tests/languages/abnf/repetition_feature.test new file mode 100644 index 0000000000..3f56e6d201 --- /dev/null +++ b/tests/languages/abnf/repetition_feature.test @@ -0,0 +1,19 @@ +*foo +2foo +*2foo +2*foo +2*3foo + +---------------------------------------------------- + +[ + ["repetition", "*"], ["rule", ["foo"]], + ["repetition", "2"], ["rule", ["foo"]], + ["repetition", "*2"], ["rule", ["foo"]], + ["repetition", "2*"], ["rule", ["foo"]], + ["repetition", "2*3"], ["rule", ["foo"]] +] + +---------------------------------------------------- + +Checks for repetitions. diff --git a/tests/languages/abnf/rule_feature.test b/tests/languages/abnf/rule_feature.test new file mode 100644 index 0000000000..9b75d334e7 --- /dev/null +++ b/tests/languages/abnf/rule_feature.test @@ -0,0 +1,19 @@ +foo +foo-Bar + + +---------------------------------------------------- + +[ + ["rule", ["foo"]], + ["rule", ["foo-Bar"]], + ["rule", [ + ["punctuation", "<"], + "foo-bar", + ["punctuation", ">"] + ]] +] + +---------------------------------------------------- + +Checks for rules. diff --git a/tests/languages/abnf/string_feature.test b/tests/languages/abnf/string_feature.test new file mode 100644 index 0000000000..213de24d82 --- /dev/null +++ b/tests/languages/abnf/string_feature.test @@ -0,0 +1,29 @@ +"" +"a" +"abc" +";" + +%s"abc" +%i"abc" + +---------------------------------------------------- + +[ + ["string", ["\"\""]], + ["string", ["\"a\""]], + ["string", ["\"abc\""]], + ["string", ["\";\""]], + + ["string", [ + ["punctuation", "%s"], + "\"abc\"" + ]], + ["string", [ + ["punctuation", "%i"], + "\"abc\"" + ]] +] + +---------------------------------------------------- + +Checks for strings. diff --git a/tests/languages/abnf/terminal_feature.test b/tests/languages/abnf/terminal_feature.test new file mode 100644 index 0000000000..8b55c01400 --- /dev/null +++ b/tests/languages/abnf/terminal_feature.test @@ -0,0 +1,19 @@ +%b1000001 +%d65 +%x41 +%d65.66.67 +%x41.42.43 + +---------------------------------------------------- + +[ + ["terminal", "%b1000001"], + ["terminal", "%d65"], + ["terminal", "%x41"], + ["terminal", "%d65.66.67"], + ["terminal", "%x41.42.43"] +] + +---------------------------------------------------- + +Checks for strings. From 1df96c55a988bdb01f967801399ea1e8200fd30c Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Thu, 28 Feb 2019 19:18:05 +0100 Subject: [PATCH 0173/1100] Added BNF and RBNF languages (#1754) This adds the BNF and RBNF languages. --- components.js | 2 +- components.json | 8 ++++++ components/prism-bnf.js | 21 ++++++++++++++ components/prism-bnf.min.js | 1 + examples/prism-bnf.html | 27 ++++++++++++++++++ plugins/show-language/prism-show-language.js | 2 +- .../show-language/prism-show-language.min.js | 2 +- tests/languages/bnf/definition_feature.test | 17 +++++++++++ tests/languages/bnf/operator_feature.test | 28 +++++++++++++++++++ tests/languages/bnf/rule_feature.test | 21 ++++++++++++++ tests/languages/bnf/string_featrue.test | 21 ++++++++++++++ 11 files changed, 147 insertions(+), 3 deletions(-) create mode 100644 components/prism-bnf.js create mode 100644 components/prism-bnf.min.js create mode 100644 examples/prism-bnf.html create mode 100644 tests/languages/bnf/definition_feature.test create mode 100644 tests/languages/bnf/operator_feature.test create mode 100644 tests/languages/bnf/rule_feature.test create mode 100644 tests/languages/bnf/string_featrue.test diff --git a/components.js b/components.js index 6b8a73f63c..3e9caa98eb 100644 --- a/components.js +++ b/components.js @@ -1,2 +1,2 @@ -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default","peerDependencies":"markup"},"clike":{"title":"C-like","option":"default","overrideExampleHeader":true},"javascript":{"title":"JavaScript","require":"clike","peerDependencies":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"Augmented Backus–Naur form","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","peerDependencies":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":"dotnet","owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","owner":"R-osey"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup","peerDependencies":["css","javascript"],"alias":"jinja2","owner":"romanvm"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","peerDependencies":["css","coffeescript","erb","javascript","less","markdown","ruby","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"http":{"title":"HTTP","peerDependencies":["javascript","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"json":{"title":"JSON","owner":"CupOfTea696"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","owner":"japborst"},"less":{"title":"Less","require":"css","owner":"Golmote"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"nasm":{"title":"NASM","owner":"rbmj"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"cpp","peerDependencies":["c","cpp"],"overrideExampleHeader":true,"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"php-extras":{"title":"PHP Extras","require":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":"javascript","peerDependencies":["coffeescript","ejs","handlebars","hogan","less","livescript","markdown","mustache","plates","scss","stylus","swig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","peerDependencies":["c","cpp","fortran","ats","dsp"],"owner":"Golmote"},"python":{"title":"Python","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"ruby":{"title":"Ruby","require":"clike","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sql":{"title":"SQL","owner":"multipetros"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","peerDependencies":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","alias":"ts","owner":"vkbansal"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","owner":"hason"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":"Line Highlight","line-numbers":{"title":"Line Numbers","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","after":["autolinker","data-uri-highlight"]},"autolinker":"Autolinker","wpd":"WebPlatform Docs","custom-class":{"title":"Custom Class","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","noCSS":true},"show-language":{"title":"Show Language","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","owner":"Golmote","noCSS":true},"previewers":{"title":"Previewers","owner":"Golmote"},"autoloader":{"title":"Autoloader","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","owner":"Golmote","after":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","owner":"chriswells0"},"unescaped-markup":"Unescaped Markup","normalize-whitespace":{"title":"Normalize Whitespace","owner":"zeitgeist87","after":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","owner":"mAAdhaTTah","require":"toolbar","noCSS":true}}}; +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default","peerDependencies":"markup"},"clike":{"title":"C-like","option":"default","overrideExampleHeader":true},"javascript":{"title":"JavaScript","require":"clike","peerDependencies":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"Augmented Backus–Naur form","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","peerDependencies":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"Backus–Naur form","alias":"rbfn","aliasTitles":{"rbfn":"Routing Backus–Naur form"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":"dotnet","owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","owner":"R-osey"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup","peerDependencies":["css","javascript"],"alias":"jinja2","owner":"romanvm"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","peerDependencies":["css","coffeescript","erb","javascript","less","markdown","ruby","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"http":{"title":"HTTP","peerDependencies":["javascript","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"json":{"title":"JSON","owner":"CupOfTea696"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","owner":"japborst"},"less":{"title":"Less","require":"css","owner":"Golmote"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"nasm":{"title":"NASM","owner":"rbmj"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"cpp","peerDependencies":["c","cpp"],"overrideExampleHeader":true,"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"php-extras":{"title":"PHP Extras","require":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":"javascript","peerDependencies":["coffeescript","ejs","handlebars","hogan","less","livescript","markdown","mustache","plates","scss","stylus","swig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","peerDependencies":["c","cpp","fortran","ats","dsp"],"owner":"Golmote"},"python":{"title":"Python","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"ruby":{"title":"Ruby","require":"clike","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sql":{"title":"SQL","owner":"multipetros"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","peerDependencies":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","alias":"ts","owner":"vkbansal"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","owner":"hason"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":"Line Highlight","line-numbers":{"title":"Line Numbers","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","after":["autolinker","data-uri-highlight"]},"autolinker":"Autolinker","wpd":"WebPlatform Docs","custom-class":{"title":"Custom Class","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","noCSS":true},"show-language":{"title":"Show Language","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","owner":"Golmote","noCSS":true},"previewers":{"title":"Previewers","owner":"Golmote"},"autoloader":{"title":"Autoloader","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","owner":"Golmote","after":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","owner":"chriswells0"},"unescaped-markup":"Unescaped Markup","normalize-whitespace":{"title":"Normalize Whitespace","owner":"zeitgeist87","after":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","owner":"mAAdhaTTah","require":"toolbar","noCSS":true}}}; if (typeof module !== 'undefined' && module.exports) { module.exports = components; } \ No newline at end of file diff --git a/components.json b/components.json index 6369408eba..034b9f70c3 100644 --- a/components.json +++ b/components.json @@ -156,6 +156,14 @@ "require": "c", "owner": "Golmote" }, + "bnf": { + "title": "Backus–Naur form", + "alias": "rbfn", + "aliasTitles": { + "rbfn": "Routing Backus–Naur form" + }, + "owner": "RunDevelopment" + }, "brainfuck": { "title": "Brainfuck", "owner": "Golmote" diff --git a/components/prism-bnf.js b/components/prism-bnf.js new file mode 100644 index 0000000000..dfbe3973a8 --- /dev/null +++ b/components/prism-bnf.js @@ -0,0 +1,21 @@ +Prism.languages.bnf = { + 'string': { + pattern: /"[^\r\n"]*"|'[^\r\n']*'/ + }, + 'definition': { + pattern: /<[^<>\r\n\t]+>(?=\s*::=)/, + alias: ['rule', 'keyword'], + inside: { + 'punctuation': /^<|>$/ + } + }, + 'rule': { + pattern: /<[^<>\r\n\t]+>/, + inside: { + 'punctuation': /^<|>$/ + } + }, + 'operator': /::=|[|()[\]{}*+?]|\.{3}/ +}; + +Prism.languages.rbnf = Prism.languages.bnf; diff --git a/components/prism-bnf.min.js b/components/prism-bnf.min.js new file mode 100644 index 0000000000..324ad09804 --- /dev/null +++ b/components/prism-bnf.min.js @@ -0,0 +1 @@ +Prism.languages.bnf={string:{pattern:/"[^\r\n"]*"|'[^\r\n']*'/},definition:{pattern:/<[^<>\r\n\t]+>(?=\s*::=)/,alias:["rule","keyword"],inside:{punctuation:/^<|>$/}},rule:{pattern:/<[^<>\r\n\t]+>/,inside:{punctuation:/^<|>$/}},operator:/::=|[|()[\]{}*+?]|\.{3}/},Prism.languages.rbnf=Prism.languages.bnf; \ No newline at end of file diff --git a/examples/prism-bnf.html b/examples/prism-bnf.html new file mode 100644 index 0000000000..bf30e1fe9d --- /dev/null +++ b/examples/prism-bnf.html @@ -0,0 +1,27 @@ +

    Full example

    +
    <number>   ::= "+" <unsigned> | "-" <unsigned> | <unsigned>
    +<unsigned> ::= "NaN" | "Infinity" | <decimal> | <decimal> <exponent>
    +<decimal>  ::= <integer> | "." <non-zero-integer> | <non-zero-integer> "." | <integer> "." <integer>
    +
    +<exponent>      ::= <exponent-char> <exponent-sign> <integer>
    +<exponent-char> ::= "e" | "E"
    +<exponent-sign> ::= "+" | "-" | ""
    +
    +<integer>          ::= "0" | <non-zero-integer>
    +<non-zero-integer> ::= <non-zero-digit> | <non-zero-digit> <digits>
    +
    +<digits>         ::= <digit> | <digit> <digits>
    +<digit>          ::= "0" | <non-zero-digit>
    +<non-zero-digit> ::= "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9"
    + +

    Routing Backus–Naur form

    +
    <number>   ::= [ "+" | "-" ] <unsigned>
    +<unsigned> ::= "NaN" | "Infinity" | <decimal> [ <exponent> ]
    +<decimal>  ::= <integer> [ "." <integer> ] | "." <non-zero-integer> | <non-zero-integer> "."
    +<exponent> ::= ( "e" | "E" ) [ "+" | "-" ] <integer>
    +
    +<integer>          ::= "0" | <non-zero-integer>
    +<non-zero-integer> ::= <non-zero-digit> [ <digit>... ]
    +
    +<digit>          ::= "0" | <non-zero-digit>
    +<non-zero-digit> ::= "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9"
    diff --git a/plugins/show-language/prism-show-language.js b/plugins/show-language/prism-show-language.js index 2b8012b2af..31e0dff6d9 100644 --- a/plugins/show-language/prism-show-language.js +++ b/plugins/show-language/prism-show-language.js @@ -11,7 +11,7 @@ if (!Prism.plugins.toolbar) { } // The languages map is built automatically with gulp -var Languages = /*languages_placeholder[*/{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","css":"CSS","clike":"C-like","js":"JavaScript","abap":"ABAP","abnf":"Augmented Backus–Naur form","apacheconf":"Apache Configuration","apl":"APL","arff":"ARFF","asciidoc":"AsciiDoc","adoc":"AsciiDoc","asm6502":"6502 Assembly","aspnet":"ASP.NET (C#)","autohotkey":"AutoHotkey","autoit":"AutoIt","shell":"Bash","basic":"BASIC","csharp":"C#","dotnet":"C#","cpp":"C++","cil":"CIL","csp":"Content-Security-Policy","css-extras":"CSS Extras","django":"Django/Jinja2","jinja2":"Django/Jinja2","dockerfile":"Docker","erb":"ERB","fsharp":"F#","gcode":"G-code","gedcom":"GEDCOM","glsl":"GLSL","gml":"GameMaker Language","gamemakerlanguage":"GameMaker Language","graphql":"GraphQL","hcl":"HCL","http":"HTTP","hpkp":"HTTP Public-Key-Pins","hsts":"HTTP Strict-Transport-Security","ichigojam":"IchigoJam","inform7":"Inform 7","javastacktrace":"Java stack trace","json":"JSON","jsonp":"JSONP","latex":"LaTeX","emacs":"Lisp","elisp":"Lisp","emacs-lisp":"Lisp","lolcode":"LOLCODE","markup-templating":"Markup templating","matlab":"MATLAB","mel":"MEL","n1ql":"N1QL","n4js":"N4JS","n4jsd":"N4JS","nand2tetris-hdl":"Nand To Tetris HDL","nasm":"NASM","nginx":"nginx","nsis":"NSIS","objectivec":"Objective-C","ocaml":"OCaml","opencl":"OpenCL","parigp":"PARI/GP","objectpascal":"Object Pascal","php":"PHP","php-extras":"PHP Extras","plsql":"PL/SQL","powershell":"PowerShell","properties":".properties","protobuf":"Protocol Buffers","q":"Q (kdb+ database)","jsx":"React JSX","tsx":"React TSX","renpy":"Ren'py","rest":"reST (reStructuredText)","sas":"SAS","sass":"Sass (Sass)","scss":"Sass (Scss)","sql":"SQL","soy":"Soy (Closure Template)","tap":"TAP","toml":"TOML","tt2":"Template Toolkit 2","ts":"TypeScript","vbnet":"VB.Net","vhdl":"VHDL","vim":"vim","visual-basic":"Visual Basic","vb":"Visual Basic","wasm":"WebAssembly","wiki":"Wiki markup","xeoracube":"XeoraCube","xojo":"Xojo (REALbasic)","xquery":"XQuery","yaml":"YAML"}/*]*/; +var Languages = /*languages_placeholder[*/{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","css":"CSS","clike":"C-like","js":"JavaScript","abap":"ABAP","abnf":"Augmented Backus–Naur form","apacheconf":"Apache Configuration","apl":"APL","arff":"ARFF","asciidoc":"AsciiDoc","adoc":"AsciiDoc","asm6502":"6502 Assembly","aspnet":"ASP.NET (C#)","autohotkey":"AutoHotkey","autoit":"AutoIt","shell":"Bash","basic":"BASIC","bnf":"Backus–Naur form","rbfn":"Routing Backus–Naur form","csharp":"C#","dotnet":"C#","cpp":"C++","cil":"CIL","csp":"Content-Security-Policy","css-extras":"CSS Extras","django":"Django/Jinja2","jinja2":"Django/Jinja2","dockerfile":"Docker","erb":"ERB","fsharp":"F#","gcode":"G-code","gedcom":"GEDCOM","glsl":"GLSL","gml":"GameMaker Language","gamemakerlanguage":"GameMaker Language","graphql":"GraphQL","hcl":"HCL","http":"HTTP","hpkp":"HTTP Public-Key-Pins","hsts":"HTTP Strict-Transport-Security","ichigojam":"IchigoJam","inform7":"Inform 7","javastacktrace":"Java stack trace","json":"JSON","jsonp":"JSONP","latex":"LaTeX","emacs":"Lisp","elisp":"Lisp","emacs-lisp":"Lisp","lolcode":"LOLCODE","markup-templating":"Markup templating","matlab":"MATLAB","mel":"MEL","n1ql":"N1QL","n4js":"N4JS","n4jsd":"N4JS","nand2tetris-hdl":"Nand To Tetris HDL","nasm":"NASM","nginx":"nginx","nsis":"NSIS","objectivec":"Objective-C","ocaml":"OCaml","opencl":"OpenCL","parigp":"PARI/GP","objectpascal":"Object Pascal","php":"PHP","php-extras":"PHP Extras","plsql":"PL/SQL","powershell":"PowerShell","properties":".properties","protobuf":"Protocol Buffers","q":"Q (kdb+ database)","jsx":"React JSX","tsx":"React TSX","renpy":"Ren'py","rest":"reST (reStructuredText)","sas":"SAS","sass":"Sass (Sass)","scss":"Sass (Scss)","sql":"SQL","soy":"Soy (Closure Template)","tap":"TAP","toml":"TOML","tt2":"Template Toolkit 2","ts":"TypeScript","vbnet":"VB.Net","vhdl":"VHDL","vim":"vim","visual-basic":"Visual Basic","vb":"Visual Basic","wasm":"WebAssembly","wiki":"Wiki markup","xeoracube":"XeoraCube","xojo":"Xojo (REALbasic)","xquery":"XQuery","yaml":"YAML"}/*]*/; Prism.plugins.toolbar.registerButton('show-language', function(env) { var pre = env.element.parentNode; diff --git a/plugins/show-language/prism-show-language.min.js b/plugins/show-language/prism-show-language.min.js index a453405418..172eb354d7 100644 --- a/plugins/show-language/prism-show-language.min.js +++ b/plugins/show-language/prism-show-language.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof self&&self.Prism&&self.document){if(!Prism.plugins.toolbar)return console.warn("Show Languages plugin loaded before Toolbar plugin."),void 0;var e={html:"HTML",xml:"XML",svg:"SVG",mathml:"MathML",css:"CSS",clike:"C-like",js:"JavaScript",abap:"ABAP",abnf:"Augmented Backus–Naur form",apacheconf:"Apache Configuration",apl:"APL",arff:"ARFF",asciidoc:"AsciiDoc",adoc:"AsciiDoc",asm6502:"6502 Assembly",aspnet:"ASP.NET (C#)",autohotkey:"AutoHotkey",autoit:"AutoIt",shell:"Bash",basic:"BASIC",csharp:"C#",dotnet:"C#",cpp:"C++",cil:"CIL",csp:"Content-Security-Policy","css-extras":"CSS Extras",django:"Django/Jinja2",jinja2:"Django/Jinja2",dockerfile:"Docker",erb:"ERB",fsharp:"F#",gcode:"G-code",gedcom:"GEDCOM",glsl:"GLSL",gml:"GameMaker Language",gamemakerlanguage:"GameMaker Language",graphql:"GraphQL",hcl:"HCL",http:"HTTP",hpkp:"HTTP Public-Key-Pins",hsts:"HTTP Strict-Transport-Security",ichigojam:"IchigoJam",inform7:"Inform 7",javastacktrace:"Java stack trace",json:"JSON",jsonp:"JSONP",latex:"LaTeX",emacs:"Lisp",elisp:"Lisp","emacs-lisp":"Lisp",lolcode:"LOLCODE","markup-templating":"Markup templating",matlab:"MATLAB",mel:"MEL",n1ql:"N1QL",n4js:"N4JS",n4jsd:"N4JS","nand2tetris-hdl":"Nand To Tetris HDL",nasm:"NASM",nginx:"nginx",nsis:"NSIS",objectivec:"Objective-C",ocaml:"OCaml",opencl:"OpenCL",parigp:"PARI/GP",objectpascal:"Object Pascal",php:"PHP","php-extras":"PHP Extras",plsql:"PL/SQL",powershell:"PowerShell",properties:".properties",protobuf:"Protocol Buffers",q:"Q (kdb+ database)",jsx:"React JSX",tsx:"React TSX",renpy:"Ren'py",rest:"reST (reStructuredText)",sas:"SAS",sass:"Sass (Sass)",scss:"Sass (Scss)",sql:"SQL",soy:"Soy (Closure Template)",tap:"TAP",toml:"TOML",tt2:"Template Toolkit 2",ts:"TypeScript",vbnet:"VB.Net",vhdl:"VHDL",vim:"vim","visual-basic":"Visual Basic",vb:"Visual Basic",wasm:"WebAssembly",wiki:"Wiki markup",xeoracube:"XeoraCube",xojo:"Xojo (REALbasic)",xquery:"XQuery",yaml:"YAML"};Prism.plugins.toolbar.registerButton("show-language",function(a){function s(e){return e?(e.substring(0,1).toUpperCase()+e.substring(1)).replace(/s(?=cript)/,"S"):e}var t=a.element.parentNode;if(t&&/pre/i.test(t.nodeName)){var o=t.getAttribute("data-language")||e[a.language]||s(a.language);if(o){var r=document.createElement("span");return r.textContent=o,r}}})}}(); \ No newline at end of file +!function(){if("undefined"!=typeof self&&self.Prism&&self.document){if(!Prism.plugins.toolbar)return console.warn("Show Languages plugin loaded before Toolbar plugin."),void 0;var a={html:"HTML",xml:"XML",svg:"SVG",mathml:"MathML",css:"CSS",clike:"C-like",js:"JavaScript",abap:"ABAP",abnf:"Augmented Backus–Naur form",apacheconf:"Apache Configuration",apl:"APL",arff:"ARFF",asciidoc:"AsciiDoc",adoc:"AsciiDoc",asm6502:"6502 Assembly",aspnet:"ASP.NET (C#)",autohotkey:"AutoHotkey",autoit:"AutoIt",shell:"Bash",basic:"BASIC",bnf:"Backus–Naur form",rbfn:"Routing Backus–Naur form",csharp:"C#",dotnet:"C#",cpp:"C++",cil:"CIL",csp:"Content-Security-Policy","css-extras":"CSS Extras",django:"Django/Jinja2",jinja2:"Django/Jinja2",dockerfile:"Docker",erb:"ERB",fsharp:"F#",gcode:"G-code",gedcom:"GEDCOM",glsl:"GLSL",gml:"GameMaker Language",gamemakerlanguage:"GameMaker Language",graphql:"GraphQL",hcl:"HCL",http:"HTTP",hpkp:"HTTP Public-Key-Pins",hsts:"HTTP Strict-Transport-Security",ichigojam:"IchigoJam",inform7:"Inform 7",javastacktrace:"Java stack trace",json:"JSON",jsonp:"JSONP",latex:"LaTeX",emacs:"Lisp",elisp:"Lisp","emacs-lisp":"Lisp",lolcode:"LOLCODE","markup-templating":"Markup templating",matlab:"MATLAB",mel:"MEL",n1ql:"N1QL",n4js:"N4JS",n4jsd:"N4JS","nand2tetris-hdl":"Nand To Tetris HDL",nasm:"NASM",nginx:"nginx",nsis:"NSIS",objectivec:"Objective-C",ocaml:"OCaml",opencl:"OpenCL",parigp:"PARI/GP",objectpascal:"Object Pascal",php:"PHP","php-extras":"PHP Extras",plsql:"PL/SQL",powershell:"PowerShell",properties:".properties",protobuf:"Protocol Buffers",q:"Q (kdb+ database)",jsx:"React JSX",tsx:"React TSX",renpy:"Ren'py",rest:"reST (reStructuredText)",sas:"SAS",sass:"Sass (Sass)",scss:"Sass (Scss)",sql:"SQL",soy:"Soy (Closure Template)",tap:"TAP",toml:"TOML",tt2:"Template Toolkit 2",ts:"TypeScript",vbnet:"VB.Net",vhdl:"VHDL",vim:"vim","visual-basic":"Visual Basic",vb:"Visual Basic",wasm:"WebAssembly",wiki:"Wiki markup",xeoracube:"XeoraCube",xojo:"Xojo (REALbasic)",xquery:"XQuery",yaml:"YAML"};Prism.plugins.toolbar.registerButton("show-language",function(e){function s(a){return a?(a.substring(0,1).toUpperCase()+a.substring(1)).replace(/s(?=cript)/,"S"):a}var t=e.element.parentNode;if(t&&/pre/i.test(t.nodeName)){var r=t.getAttribute("data-language")||a[e.language]||s(e.language);if(r){var o=document.createElement("span");return o.textContent=r,o}}})}}(); \ No newline at end of file diff --git a/tests/languages/bnf/definition_feature.test b/tests/languages/bnf/definition_feature.test new file mode 100644 index 0000000000..bf2aeadcfa --- /dev/null +++ b/tests/languages/bnf/definition_feature.test @@ -0,0 +1,17 @@ + ::= "a" + +---------------------------------------------------- + +[ + ["definition", [ + ["punctuation", "<"], + "foo", + ["punctuation", ">"] + ]], + ["operator", "::="], + ["string", "\"a\""] +] + +---------------------------------------------------- + +Checks for definitions. diff --git a/tests/languages/bnf/operator_feature.test b/tests/languages/bnf/operator_feature.test new file mode 100644 index 0000000000..92a7bc911e --- /dev/null +++ b/tests/languages/bnf/operator_feature.test @@ -0,0 +1,28 @@ +::= | +() [] {} +* + ? +... + +---------------------------------------------------- + +[ + ["operator", "::="], + ["operator", "|"], + + ["operator", "("], + ["operator", ")"], + ["operator", "["], + ["operator", "]"], + ["operator", "{"], + ["operator", "}"], + + ["operator", "*"], + ["operator", "+"], + ["operator", "?"], + + ["operator", "..."] +] + +---------------------------------------------------- + +Checks for operators. diff --git a/tests/languages/bnf/rule_feature.test b/tests/languages/bnf/rule_feature.test new file mode 100644 index 0000000000..40a0b8ef07 --- /dev/null +++ b/tests/languages/bnf/rule_feature.test @@ -0,0 +1,21 @@ + +<öäüß> + +---------------------------------------------------- + +[ + ["rule", [ + ["punctuation", "<"], + "foo-bar", + ["punctuation", ">"] + ]], + ["rule", [ + ["punctuation", "<"], + "öäüß", + ["punctuation", ">"] + ]] +] + +---------------------------------------------------- + +Checks for rules. diff --git a/tests/languages/bnf/string_featrue.test b/tests/languages/bnf/string_featrue.test new file mode 100644 index 0000000000..016e753f0d --- /dev/null +++ b/tests/languages/bnf/string_featrue.test @@ -0,0 +1,21 @@ +"" +'' +"'" +'"' +"foo" +'bar|::=()' + +---------------------------------------------------- + +[ + ["string", "\"\""], + ["string", "''"], + ["string", "\"'\""], + ["string", "'\"'"], + ["string", "\"foo\""], + ["string", "'bar|::=()'"] +] + +---------------------------------------------------- + +Checks for strings. From 13e1c97d27595efd20a9927d407a36ff031940dd Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Thu, 28 Feb 2019 19:23:25 +0100 Subject: [PATCH 0174/1100] Added EBNF language (#1756) This adds the EBNF language. --- components.js | 2 +- components.json | 4 ++ components/prism-ebnf.js | 22 +++++++ components/prism-ebnf.min.js | 1 + examples/prism-ebnf.html | 63 +++++++++++++++++++ plugins/show-language/prism-show-language.js | 2 +- .../show-language/prism-show-language.min.js | 2 +- tests/languages/ebnf/comment_feature.test | 11 ++++ tests/languages/ebnf/definition_feature.test | 14 +++++ tests/languages/ebnf/operator_feature.test | 19 ++++++ tests/languages/ebnf/punctuation_feature.test | 31 +++++++++ tests/languages/ebnf/rule_feature.test | 12 ++++ tests/languages/ebnf/special_feature.test | 11 ++++ tests/languages/ebnf/string_feature.test | 17 +++++ 14 files changed, 208 insertions(+), 3 deletions(-) create mode 100644 components/prism-ebnf.js create mode 100644 components/prism-ebnf.min.js create mode 100644 examples/prism-ebnf.html create mode 100644 tests/languages/ebnf/comment_feature.test create mode 100644 tests/languages/ebnf/definition_feature.test create mode 100644 tests/languages/ebnf/operator_feature.test create mode 100644 tests/languages/ebnf/punctuation_feature.test create mode 100644 tests/languages/ebnf/rule_feature.test create mode 100644 tests/languages/ebnf/special_feature.test create mode 100644 tests/languages/ebnf/string_feature.test diff --git a/components.js b/components.js index 3e9caa98eb..9ca17377a9 100644 --- a/components.js +++ b/components.js @@ -1,2 +1,2 @@ -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default","peerDependencies":"markup"},"clike":{"title":"C-like","option":"default","overrideExampleHeader":true},"javascript":{"title":"JavaScript","require":"clike","peerDependencies":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"Augmented Backus–Naur form","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","peerDependencies":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"Backus–Naur form","alias":"rbfn","aliasTitles":{"rbfn":"Routing Backus–Naur form"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":"dotnet","owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","owner":"R-osey"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup","peerDependencies":["css","javascript"],"alias":"jinja2","owner":"romanvm"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","peerDependencies":["css","coffeescript","erb","javascript","less","markdown","ruby","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"http":{"title":"HTTP","peerDependencies":["javascript","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"json":{"title":"JSON","owner":"CupOfTea696"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","owner":"japborst"},"less":{"title":"Less","require":"css","owner":"Golmote"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"nasm":{"title":"NASM","owner":"rbmj"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"cpp","peerDependencies":["c","cpp"],"overrideExampleHeader":true,"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"php-extras":{"title":"PHP Extras","require":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":"javascript","peerDependencies":["coffeescript","ejs","handlebars","hogan","less","livescript","markdown","mustache","plates","scss","stylus","swig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","peerDependencies":["c","cpp","fortran","ats","dsp"],"owner":"Golmote"},"python":{"title":"Python","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"ruby":{"title":"Ruby","require":"clike","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sql":{"title":"SQL","owner":"multipetros"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","peerDependencies":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","alias":"ts","owner":"vkbansal"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","owner":"hason"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":"Line Highlight","line-numbers":{"title":"Line Numbers","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","after":["autolinker","data-uri-highlight"]},"autolinker":"Autolinker","wpd":"WebPlatform Docs","custom-class":{"title":"Custom Class","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","noCSS":true},"show-language":{"title":"Show Language","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","owner":"Golmote","noCSS":true},"previewers":{"title":"Previewers","owner":"Golmote"},"autoloader":{"title":"Autoloader","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","owner":"Golmote","after":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","owner":"chriswells0"},"unescaped-markup":"Unescaped Markup","normalize-whitespace":{"title":"Normalize Whitespace","owner":"zeitgeist87","after":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","owner":"mAAdhaTTah","require":"toolbar","noCSS":true}}}; +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default","peerDependencies":"markup"},"clike":{"title":"C-like","option":"default","overrideExampleHeader":true},"javascript":{"title":"JavaScript","require":"clike","peerDependencies":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"Augmented Backus–Naur form","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","peerDependencies":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"Backus–Naur form","alias":"rbfn","aliasTitles":{"rbfn":"Routing Backus–Naur form"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":"dotnet","owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","owner":"R-osey"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup","peerDependencies":["css","javascript"],"alias":"jinja2","owner":"romanvm"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"Extended Backus–Naur form","owner":"RunDevelopment"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","peerDependencies":["css","coffeescript","erb","javascript","less","markdown","ruby","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"http":{"title":"HTTP","peerDependencies":["javascript","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"json":{"title":"JSON","owner":"CupOfTea696"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","owner":"japborst"},"less":{"title":"Less","require":"css","owner":"Golmote"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"nasm":{"title":"NASM","owner":"rbmj"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"cpp","peerDependencies":["c","cpp"],"overrideExampleHeader":true,"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"php-extras":{"title":"PHP Extras","require":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":"javascript","peerDependencies":["coffeescript","ejs","handlebars","hogan","less","livescript","markdown","mustache","plates","scss","stylus","swig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","peerDependencies":["c","cpp","fortran","ats","dsp"],"owner":"Golmote"},"python":{"title":"Python","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"ruby":{"title":"Ruby","require":"clike","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sql":{"title":"SQL","owner":"multipetros"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","peerDependencies":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","alias":"ts","owner":"vkbansal"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","owner":"hason"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":"Line Highlight","line-numbers":{"title":"Line Numbers","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","after":["autolinker","data-uri-highlight"]},"autolinker":"Autolinker","wpd":"WebPlatform Docs","custom-class":{"title":"Custom Class","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","noCSS":true},"show-language":{"title":"Show Language","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","owner":"Golmote","noCSS":true},"previewers":{"title":"Previewers","owner":"Golmote"},"autoloader":{"title":"Autoloader","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","owner":"Golmote","after":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","owner":"chriswells0"},"unescaped-markup":"Unescaped Markup","normalize-whitespace":{"title":"Normalize Whitespace","owner":"zeitgeist87","after":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","owner":"mAAdhaTTah","require":"toolbar","noCSS":true}}}; if (typeof module !== 'undefined' && module.exports) { module.exports = components; } \ No newline at end of file diff --git a/components.json b/components.json index 034b9f70c3..8ece1e758f 100644 --- a/components.json +++ b/components.json @@ -244,6 +244,10 @@ "alias": "dockerfile", "owner": "JustinBeckwith" }, + "ebnf": { + "title": "Extended Backus–Naur form", + "owner": "RunDevelopment" + }, "eiffel": { "title": "Eiffel", "owner": "Conaclos" diff --git a/components/prism-ebnf.js b/components/prism-ebnf.js new file mode 100644 index 0000000000..84609bc90e --- /dev/null +++ b/components/prism-ebnf.js @@ -0,0 +1,22 @@ +Prism.languages.ebnf = { + 'comment': /\(\*[\s\S]*?\*\)/, + 'string': { + pattern: /"[^"\r\n]*"|'[^'\r\n]*'/, + greedy: true + }, + 'special': { + pattern: /\?[^?\r\n]*\?/, + greedy: true, + alias: 'class-name' + }, + + 'definition': { + pattern: /^(\s*)[a-z]\w*(?:[ \t]+[a-z]\w*)*(?=\s*=)/im, + lookbehind: true, + alias: ['rule', 'keyword'] + }, + 'rule': /[a-z]\w*(?:[ \t]+[a-z]\w*)*/i, + + 'punctuation': /\([:/]|[:/]\)|[.,;()[\]{}]/, + 'operator': /[-=|*/!]/ +}; diff --git a/components/prism-ebnf.min.js b/components/prism-ebnf.min.js new file mode 100644 index 0000000000..3280df1f5f --- /dev/null +++ b/components/prism-ebnf.min.js @@ -0,0 +1 @@ +Prism.languages.ebnf={comment:/\(\*[\s\S]*?\*\)/,string:{pattern:/"[^"\r\n]*"|'[^'\r\n]*'/,greedy:!0},special:{pattern:/\?[^?\r\n]*\?/,greedy:!0,alias:"class-name"},definition:{pattern:/^(\s*)[a-z]\w*(?:[ \t]+[a-z]\w*)*(?=\s*=)/im,lookbehind:!0,alias:["rule","keyword"]},rule:/[a-z]\w*(?:[ \t]+[a-z]\w*)*/i,punctuation:/\([:\/]|[:\/]\)|[.,;()[\]{}]/,operator:/[-=|*\/!]/}; \ No newline at end of file diff --git a/examples/prism-ebnf.html b/examples/prism-ebnf.html new file mode 100644 index 0000000000..c787639066 --- /dev/null +++ b/examples/prism-ebnf.html @@ -0,0 +1,63 @@ +

    Full example

    +
    SYNTAX = SYNTAX RULE, { SYNTAX RULE } ;
    +SYNTAX RULE
    +  = META IDENTIFIER, '=', DEFINITIONS LIST, ' ;' ;
    +DEFINITIONS LIST
    +  = SINGLE DEFINITION,
    +    { '|', SINGLE DEFINITION } ;
    +SINGLE DEFINITION = TERM, { ',', TERM } ;
    +TERM = FACTOR, [ '-', EXCEPTION ] ;
    +EXCEPTION = FACTOR ;
    +FACTOR = [ INTEGER, '*' ], PRIMARY ;
    +PRIMARY
    +  = OPTIONAL SEQUENCE | REPEATED SEQUENCE
    +  | SPECIAL SEQUENCE | GROUPED SEQUENCE
    +  | META IDENTIFIER | TERMINAL | EMPTY ;
    +EMPTY = ;
    +OPTIONAL SEQUENCE = '[', DEFINITIONS LIST, ']' ;
    +REPEATED SEQUENCE = '{', DEFINITIONS LIST, '}' ;
    +GROUPED SEQUENCE = '(', DEFINITIONS LIST, ')' ;
    +TERMINAL
    +  = "'", CHARACTER - "'",
    +    { CHARACTER - "'" }, "'"
    +  | '"', CHARACTER - '"',
    +    { CHARACTER - '"' }, '"' ;
    +META IDENTIFIER = LETTER, { LETTER | DIGIT } ;
    +INTEGER = DIGIT, { DIGIT } ;
    +SPECIAL SEQUENCE = '?', { CHARACTER - '?' }, '?' ;
    +COMMENT = '(*', { COMMENT SYMBOL }, '*)' ;
    +COMMENT SYMBOL
    +  = COMMENT | TERMINAL | SPECIAL SEQUENCE
    +    | CHARACTER ;
    + +

    Full example with alternative syntax

    +
    SYNTAX = SYNTAX RULE, (: SYNTAX RULE :).
    +SYNTAX RULE
    +  = META IDENTIFIER, '=', DEFINITIONS LIST, '.'. (* '.' instead of ';' *)
    +DEFINITIONS LIST
    +  = SINGLE DEFINITION,
    +    (: '/', SINGLE DEFINITION :).
    +SINGLE DEFINITION = TERM, (: ',', TERM :).
    +TERM = FACTOR, (/ '-', EXCEPTION /).
    +EXCEPTION = FACTOR.
    +FACTOR = (/ INTEGER, '*' /), PRIMARY.
    +PRIMARY
    +  = OPTIONAL SEQUENCE / REPEATED SEQUENCE (* / is the same as | *)
    +  / SPECIAL SEQUENCE / GROUPED SEQUENCE
    +  / META IDENTIFIER / TERMINAL / EMPTY.
    +EMPTY = .
    +OPTIONAL SEQUENCE = '(/', DEFINITIONS LIST, '/)'.
    +REPEATED SEQUENCE = '(:', DEFINITIONS LIST, ':)'.
    +GROUPED SEQUENCE = '(', DEFINITIONS LIST, ')'.
    +TERMINAL
    +  = "'", CHARACTER - "'",
    +    (: CHARACTER - "'" :), "'"
    +  / '"', CHARACTER - '"',
    +    (: CHARACTER - '"' :), '"'.
    +META IDENTIFIER = LETTER, (: LETTER / DIGIT :).
    +INTEGER = DIGIT, (: DIGIT :).
    +SPECIAL SEQUENCE = '?', (: CHARACTER - '?' :), '?'.
    +COMMENT = '(*', (: COMMENT SYMBOL :), '*)'.
    +COMMENT SYMBOL
    +  = COMMENT / TERMINAL / SPECIAL SEQUENCE
    +    / CHARACTER.
    diff --git a/plugins/show-language/prism-show-language.js b/plugins/show-language/prism-show-language.js index 31e0dff6d9..2f216bbd26 100644 --- a/plugins/show-language/prism-show-language.js +++ b/plugins/show-language/prism-show-language.js @@ -11,7 +11,7 @@ if (!Prism.plugins.toolbar) { } // The languages map is built automatically with gulp -var Languages = /*languages_placeholder[*/{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","css":"CSS","clike":"C-like","js":"JavaScript","abap":"ABAP","abnf":"Augmented Backus–Naur form","apacheconf":"Apache Configuration","apl":"APL","arff":"ARFF","asciidoc":"AsciiDoc","adoc":"AsciiDoc","asm6502":"6502 Assembly","aspnet":"ASP.NET (C#)","autohotkey":"AutoHotkey","autoit":"AutoIt","shell":"Bash","basic":"BASIC","bnf":"Backus–Naur form","rbfn":"Routing Backus–Naur form","csharp":"C#","dotnet":"C#","cpp":"C++","cil":"CIL","csp":"Content-Security-Policy","css-extras":"CSS Extras","django":"Django/Jinja2","jinja2":"Django/Jinja2","dockerfile":"Docker","erb":"ERB","fsharp":"F#","gcode":"G-code","gedcom":"GEDCOM","glsl":"GLSL","gml":"GameMaker Language","gamemakerlanguage":"GameMaker Language","graphql":"GraphQL","hcl":"HCL","http":"HTTP","hpkp":"HTTP Public-Key-Pins","hsts":"HTTP Strict-Transport-Security","ichigojam":"IchigoJam","inform7":"Inform 7","javastacktrace":"Java stack trace","json":"JSON","jsonp":"JSONP","latex":"LaTeX","emacs":"Lisp","elisp":"Lisp","emacs-lisp":"Lisp","lolcode":"LOLCODE","markup-templating":"Markup templating","matlab":"MATLAB","mel":"MEL","n1ql":"N1QL","n4js":"N4JS","n4jsd":"N4JS","nand2tetris-hdl":"Nand To Tetris HDL","nasm":"NASM","nginx":"nginx","nsis":"NSIS","objectivec":"Objective-C","ocaml":"OCaml","opencl":"OpenCL","parigp":"PARI/GP","objectpascal":"Object Pascal","php":"PHP","php-extras":"PHP Extras","plsql":"PL/SQL","powershell":"PowerShell","properties":".properties","protobuf":"Protocol Buffers","q":"Q (kdb+ database)","jsx":"React JSX","tsx":"React TSX","renpy":"Ren'py","rest":"reST (reStructuredText)","sas":"SAS","sass":"Sass (Sass)","scss":"Sass (Scss)","sql":"SQL","soy":"Soy (Closure Template)","tap":"TAP","toml":"TOML","tt2":"Template Toolkit 2","ts":"TypeScript","vbnet":"VB.Net","vhdl":"VHDL","vim":"vim","visual-basic":"Visual Basic","vb":"Visual Basic","wasm":"WebAssembly","wiki":"Wiki markup","xeoracube":"XeoraCube","xojo":"Xojo (REALbasic)","xquery":"XQuery","yaml":"YAML"}/*]*/; +var Languages = /*languages_placeholder[*/{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","css":"CSS","clike":"C-like","js":"JavaScript","abap":"ABAP","abnf":"Augmented Backus–Naur form","apacheconf":"Apache Configuration","apl":"APL","arff":"ARFF","asciidoc":"AsciiDoc","adoc":"AsciiDoc","asm6502":"6502 Assembly","aspnet":"ASP.NET (C#)","autohotkey":"AutoHotkey","autoit":"AutoIt","shell":"Bash","basic":"BASIC","bnf":"Backus–Naur form","rbfn":"Routing Backus–Naur form","csharp":"C#","dotnet":"C#","cpp":"C++","cil":"CIL","csp":"Content-Security-Policy","css-extras":"CSS Extras","django":"Django/Jinja2","jinja2":"Django/Jinja2","dockerfile":"Docker","ebnf":"Extended Backus–Naur form","erb":"ERB","fsharp":"F#","gcode":"G-code","gedcom":"GEDCOM","glsl":"GLSL","gml":"GameMaker Language","gamemakerlanguage":"GameMaker Language","graphql":"GraphQL","hcl":"HCL","http":"HTTP","hpkp":"HTTP Public-Key-Pins","hsts":"HTTP Strict-Transport-Security","ichigojam":"IchigoJam","inform7":"Inform 7","javastacktrace":"Java stack trace","json":"JSON","jsonp":"JSONP","latex":"LaTeX","emacs":"Lisp","elisp":"Lisp","emacs-lisp":"Lisp","lolcode":"LOLCODE","markup-templating":"Markup templating","matlab":"MATLAB","mel":"MEL","n1ql":"N1QL","n4js":"N4JS","n4jsd":"N4JS","nand2tetris-hdl":"Nand To Tetris HDL","nasm":"NASM","nginx":"nginx","nsis":"NSIS","objectivec":"Objective-C","ocaml":"OCaml","opencl":"OpenCL","parigp":"PARI/GP","objectpascal":"Object Pascal","php":"PHP","php-extras":"PHP Extras","plsql":"PL/SQL","powershell":"PowerShell","properties":".properties","protobuf":"Protocol Buffers","q":"Q (kdb+ database)","jsx":"React JSX","tsx":"React TSX","renpy":"Ren'py","rest":"reST (reStructuredText)","sas":"SAS","sass":"Sass (Sass)","scss":"Sass (Scss)","sql":"SQL","soy":"Soy (Closure Template)","tap":"TAP","toml":"TOML","tt2":"Template Toolkit 2","ts":"TypeScript","vbnet":"VB.Net","vhdl":"VHDL","vim":"vim","visual-basic":"Visual Basic","vb":"Visual Basic","wasm":"WebAssembly","wiki":"Wiki markup","xeoracube":"XeoraCube","xojo":"Xojo (REALbasic)","xquery":"XQuery","yaml":"YAML"}/*]*/; Prism.plugins.toolbar.registerButton('show-language', function(env) { var pre = env.element.parentNode; diff --git a/plugins/show-language/prism-show-language.min.js b/plugins/show-language/prism-show-language.min.js index 172eb354d7..24f8c4d20a 100644 --- a/plugins/show-language/prism-show-language.min.js +++ b/plugins/show-language/prism-show-language.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof self&&self.Prism&&self.document){if(!Prism.plugins.toolbar)return console.warn("Show Languages plugin loaded before Toolbar plugin."),void 0;var a={html:"HTML",xml:"XML",svg:"SVG",mathml:"MathML",css:"CSS",clike:"C-like",js:"JavaScript",abap:"ABAP",abnf:"Augmented Backus–Naur form",apacheconf:"Apache Configuration",apl:"APL",arff:"ARFF",asciidoc:"AsciiDoc",adoc:"AsciiDoc",asm6502:"6502 Assembly",aspnet:"ASP.NET (C#)",autohotkey:"AutoHotkey",autoit:"AutoIt",shell:"Bash",basic:"BASIC",bnf:"Backus–Naur form",rbfn:"Routing Backus–Naur form",csharp:"C#",dotnet:"C#",cpp:"C++",cil:"CIL",csp:"Content-Security-Policy","css-extras":"CSS Extras",django:"Django/Jinja2",jinja2:"Django/Jinja2",dockerfile:"Docker",erb:"ERB",fsharp:"F#",gcode:"G-code",gedcom:"GEDCOM",glsl:"GLSL",gml:"GameMaker Language",gamemakerlanguage:"GameMaker Language",graphql:"GraphQL",hcl:"HCL",http:"HTTP",hpkp:"HTTP Public-Key-Pins",hsts:"HTTP Strict-Transport-Security",ichigojam:"IchigoJam",inform7:"Inform 7",javastacktrace:"Java stack trace",json:"JSON",jsonp:"JSONP",latex:"LaTeX",emacs:"Lisp",elisp:"Lisp","emacs-lisp":"Lisp",lolcode:"LOLCODE","markup-templating":"Markup templating",matlab:"MATLAB",mel:"MEL",n1ql:"N1QL",n4js:"N4JS",n4jsd:"N4JS","nand2tetris-hdl":"Nand To Tetris HDL",nasm:"NASM",nginx:"nginx",nsis:"NSIS",objectivec:"Objective-C",ocaml:"OCaml",opencl:"OpenCL",parigp:"PARI/GP",objectpascal:"Object Pascal",php:"PHP","php-extras":"PHP Extras",plsql:"PL/SQL",powershell:"PowerShell",properties:".properties",protobuf:"Protocol Buffers",q:"Q (kdb+ database)",jsx:"React JSX",tsx:"React TSX",renpy:"Ren'py",rest:"reST (reStructuredText)",sas:"SAS",sass:"Sass (Sass)",scss:"Sass (Scss)",sql:"SQL",soy:"Soy (Closure Template)",tap:"TAP",toml:"TOML",tt2:"Template Toolkit 2",ts:"TypeScript",vbnet:"VB.Net",vhdl:"VHDL",vim:"vim","visual-basic":"Visual Basic",vb:"Visual Basic",wasm:"WebAssembly",wiki:"Wiki markup",xeoracube:"XeoraCube",xojo:"Xojo (REALbasic)",xquery:"XQuery",yaml:"YAML"};Prism.plugins.toolbar.registerButton("show-language",function(e){function s(a){return a?(a.substring(0,1).toUpperCase()+a.substring(1)).replace(/s(?=cript)/,"S"):a}var t=e.element.parentNode;if(t&&/pre/i.test(t.nodeName)){var r=t.getAttribute("data-language")||a[e.language]||s(e.language);if(r){var o=document.createElement("span");return o.textContent=r,o}}})}}(); \ No newline at end of file +!function(){if("undefined"!=typeof self&&self.Prism&&self.document){if(!Prism.plugins.toolbar)return console.warn("Show Languages plugin loaded before Toolbar plugin."),void 0;var a={html:"HTML",xml:"XML",svg:"SVG",mathml:"MathML",css:"CSS",clike:"C-like",js:"JavaScript",abap:"ABAP",abnf:"Augmented Backus–Naur form",apacheconf:"Apache Configuration",apl:"APL",arff:"ARFF",asciidoc:"AsciiDoc",adoc:"AsciiDoc",asm6502:"6502 Assembly",aspnet:"ASP.NET (C#)",autohotkey:"AutoHotkey",autoit:"AutoIt",shell:"Bash",basic:"BASIC",bnf:"Backus–Naur form",rbfn:"Routing Backus–Naur form",csharp:"C#",dotnet:"C#",cpp:"C++",cil:"CIL",csp:"Content-Security-Policy","css-extras":"CSS Extras",django:"Django/Jinja2",jinja2:"Django/Jinja2",dockerfile:"Docker",ebnf:"Extended Backus–Naur form",erb:"ERB",fsharp:"F#",gcode:"G-code",gedcom:"GEDCOM",glsl:"GLSL",gml:"GameMaker Language",gamemakerlanguage:"GameMaker Language",graphql:"GraphQL",hcl:"HCL",http:"HTTP",hpkp:"HTTP Public-Key-Pins",hsts:"HTTP Strict-Transport-Security",ichigojam:"IchigoJam",inform7:"Inform 7",javastacktrace:"Java stack trace",json:"JSON",jsonp:"JSONP",latex:"LaTeX",emacs:"Lisp",elisp:"Lisp","emacs-lisp":"Lisp",lolcode:"LOLCODE","markup-templating":"Markup templating",matlab:"MATLAB",mel:"MEL",n1ql:"N1QL",n4js:"N4JS",n4jsd:"N4JS","nand2tetris-hdl":"Nand To Tetris HDL",nasm:"NASM",nginx:"nginx",nsis:"NSIS",objectivec:"Objective-C",ocaml:"OCaml",opencl:"OpenCL",parigp:"PARI/GP",objectpascal:"Object Pascal",php:"PHP","php-extras":"PHP Extras",plsql:"PL/SQL",powershell:"PowerShell",properties:".properties",protobuf:"Protocol Buffers",q:"Q (kdb+ database)",jsx:"React JSX",tsx:"React TSX",renpy:"Ren'py",rest:"reST (reStructuredText)",sas:"SAS",sass:"Sass (Sass)",scss:"Sass (Scss)",sql:"SQL",soy:"Soy (Closure Template)",tap:"TAP",toml:"TOML",tt2:"Template Toolkit 2",ts:"TypeScript",vbnet:"VB.Net",vhdl:"VHDL",vim:"vim","visual-basic":"Visual Basic",vb:"Visual Basic",wasm:"WebAssembly",wiki:"Wiki markup",xeoracube:"XeoraCube",xojo:"Xojo (REALbasic)",xquery:"XQuery",yaml:"YAML"};Prism.plugins.toolbar.registerButton("show-language",function(e){function s(a){return a?(a.substring(0,1).toUpperCase()+a.substring(1)).replace(/s(?=cript)/,"S"):a}var t=e.element.parentNode;if(t&&/pre/i.test(t.nodeName)){var r=t.getAttribute("data-language")||a[e.language]||s(e.language);if(r){var o=document.createElement("span");return o.textContent=r,o}}})}}(); \ No newline at end of file diff --git a/tests/languages/ebnf/comment_feature.test b/tests/languages/ebnf/comment_feature.test new file mode 100644 index 0000000000..020b51e861 --- /dev/null +++ b/tests/languages/ebnf/comment_feature.test @@ -0,0 +1,11 @@ +(* comment *) + +---------------------------------------------------- + +[ + ["comment", "(* comment *)"] +] + +---------------------------------------------------- + +Checks for comments. diff --git a/tests/languages/ebnf/definition_feature.test b/tests/languages/ebnf/definition_feature.test new file mode 100644 index 0000000000..582620e9e6 --- /dev/null +++ b/tests/languages/ebnf/definition_feature.test @@ -0,0 +1,14 @@ +foo bar = 'a' ; + +---------------------------------------------------- + +[ + ["definition", "foo bar"], + ["operator", "="], + ["string", "'a'"], + ["punctuation", ";"] +] + +---------------------------------------------------- + +Checks for rules. diff --git a/tests/languages/ebnf/operator_feature.test b/tests/languages/ebnf/operator_feature.test new file mode 100644 index 0000000000..6fd0dfcafb --- /dev/null +++ b/tests/languages/ebnf/operator_feature.test @@ -0,0 +1,19 @@ +| / ! +* +- += + +---------------------------------------------------- + +[ + ["operator", "|"], + ["operator", "/"], + ["operator", "!"], + ["operator", "*"], + ["operator", "-"], + ["operator", "="] +] + +---------------------------------------------------- + +Checks for operators. diff --git a/tests/languages/ebnf/punctuation_feature.test b/tests/languages/ebnf/punctuation_feature.test new file mode 100644 index 0000000000..c5ff102f83 --- /dev/null +++ b/tests/languages/ebnf/punctuation_feature.test @@ -0,0 +1,31 @@ +; . +, +() +[] (//) +{} (::) + +---------------------------------------------------- + +[ + ["punctuation", ";"], + ["punctuation", "."], + + ["punctuation", ","], + + ["punctuation", "("], + ["punctuation", ")"], + + ["punctuation", "["], + ["punctuation", "]"], + ["punctuation", "(/"], + ["punctuation", "/)"], + + ["punctuation", "{"], + ["punctuation", "}"], + ["punctuation", "(:"], + ["punctuation", ":)"] +] + +---------------------------------------------------- + +Checks for punctuation. diff --git a/tests/languages/ebnf/rule_feature.test b/tests/languages/ebnf/rule_feature.test new file mode 100644 index 0000000000..678cb48cf7 --- /dev/null +++ b/tests/languages/ebnf/rule_feature.test @@ -0,0 +1,12 @@ +foo bar; + +---------------------------------------------------- + +[ + ["rule", "foo bar"], + ["punctuation", ";"] +] + +---------------------------------------------------- + +Checks for rules. diff --git a/tests/languages/ebnf/special_feature.test b/tests/languages/ebnf/special_feature.test new file mode 100644 index 0000000000..759f0d3190 --- /dev/null +++ b/tests/languages/ebnf/special_feature.test @@ -0,0 +1,11 @@ +? special characters ? + +---------------------------------------------------- + +[ + ["special", "? special characters ?"] +] + +---------------------------------------------------- + +Checks for special sequences. diff --git a/tests/languages/ebnf/string_feature.test b/tests/languages/ebnf/string_feature.test new file mode 100644 index 0000000000..8ffbad647a --- /dev/null +++ b/tests/languages/ebnf/string_feature.test @@ -0,0 +1,17 @@ +"" +'' +"foo's" +'"bar;' + +---------------------------------------------------- + +[ + ["string", "\"\""], + ["string", "''"], + ["string", "\"foo's\""], + ["string", "'\"bar;'"] +] + +---------------------------------------------------- + +Checks for strings. From 64dc049d85260d8dadd6241023d29edb4cee7da8 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Thu, 28 Feb 2019 19:28:22 +0100 Subject: [PATCH 0175/1100] Added JSON5 language (#1744) This adds the JSON5 language to Prism. --- components.js | 2 +- components.json | 5 ++ components/prism-json5.js | 23 ++++++++ components/prism-json5.min.js | 1 + examples/prism-json5.html | 13 ++++ plugins/autoloader/prism-autoloader.js | 4 +- plugins/autoloader/prism-autoloader.min.js | 2 +- plugins/show-language/prism-show-language.js | 2 +- .../show-language/prism-show-language.min.js | 2 +- tests/languages/json5/number_feature.test | 59 +++++++++++++++++++ tests/languages/json5/property_feature.test | 48 +++++++++++++++ tests/languages/json5/string_feature.test | 36 +++++++++++ 12 files changed, 191 insertions(+), 6 deletions(-) create mode 100644 components/prism-json5.js create mode 100644 components/prism-json5.min.js create mode 100644 examples/prism-json5.html create mode 100644 tests/languages/json5/number_feature.test create mode 100644 tests/languages/json5/property_feature.test create mode 100644 tests/languages/json5/string_feature.test diff --git a/components.js b/components.js index 9ca17377a9..4c2a7c8e3e 100644 --- a/components.js +++ b/components.js @@ -1,2 +1,2 @@ -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default","peerDependencies":"markup"},"clike":{"title":"C-like","option":"default","overrideExampleHeader":true},"javascript":{"title":"JavaScript","require":"clike","peerDependencies":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"Augmented Backus–Naur form","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","peerDependencies":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"Backus–Naur form","alias":"rbfn","aliasTitles":{"rbfn":"Routing Backus–Naur form"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":"dotnet","owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","owner":"R-osey"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup","peerDependencies":["css","javascript"],"alias":"jinja2","owner":"romanvm"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"Extended Backus–Naur form","owner":"RunDevelopment"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","peerDependencies":["css","coffeescript","erb","javascript","less","markdown","ruby","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"http":{"title":"HTTP","peerDependencies":["javascript","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"json":{"title":"JSON","owner":"CupOfTea696"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","owner":"japborst"},"less":{"title":"Less","require":"css","owner":"Golmote"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"nasm":{"title":"NASM","owner":"rbmj"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"cpp","peerDependencies":["c","cpp"],"overrideExampleHeader":true,"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"php-extras":{"title":"PHP Extras","require":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":"javascript","peerDependencies":["coffeescript","ejs","handlebars","hogan","less","livescript","markdown","mustache","plates","scss","stylus","swig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","peerDependencies":["c","cpp","fortran","ats","dsp"],"owner":"Golmote"},"python":{"title":"Python","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"ruby":{"title":"Ruby","require":"clike","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sql":{"title":"SQL","owner":"multipetros"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","peerDependencies":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","alias":"ts","owner":"vkbansal"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","owner":"hason"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":"Line Highlight","line-numbers":{"title":"Line Numbers","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","after":["autolinker","data-uri-highlight"]},"autolinker":"Autolinker","wpd":"WebPlatform Docs","custom-class":{"title":"Custom Class","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","noCSS":true},"show-language":{"title":"Show Language","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","owner":"Golmote","noCSS":true},"previewers":{"title":"Previewers","owner":"Golmote"},"autoloader":{"title":"Autoloader","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","owner":"Golmote","after":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","owner":"chriswells0"},"unescaped-markup":"Unescaped Markup","normalize-whitespace":{"title":"Normalize Whitespace","owner":"zeitgeist87","after":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","owner":"mAAdhaTTah","require":"toolbar","noCSS":true}}}; +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default","peerDependencies":"markup"},"clike":{"title":"C-like","option":"default","overrideExampleHeader":true},"javascript":{"title":"JavaScript","require":"clike","peerDependencies":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"Augmented Backus–Naur form","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","peerDependencies":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"Backus–Naur form","alias":"rbfn","aliasTitles":{"rbfn":"Routing Backus–Naur form"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":"dotnet","owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","owner":"R-osey"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup","peerDependencies":["css","javascript"],"alias":"jinja2","owner":"romanvm"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"Extended Backus–Naur form","owner":"RunDevelopment"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","peerDependencies":["css","coffeescript","erb","javascript","less","markdown","ruby","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"http":{"title":"HTTP","peerDependencies":["javascript","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"json":{"title":"JSON","owner":"CupOfTea696"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","owner":"japborst"},"less":{"title":"Less","require":"css","owner":"Golmote"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"nasm":{"title":"NASM","owner":"rbmj"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"cpp","peerDependencies":["c","cpp"],"overrideExampleHeader":true,"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"php-extras":{"title":"PHP Extras","require":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":"javascript","peerDependencies":["coffeescript","ejs","handlebars","hogan","less","livescript","markdown","mustache","plates","scss","stylus","swig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","peerDependencies":["c","cpp","fortran","ats","dsp"],"owner":"Golmote"},"python":{"title":"Python","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"ruby":{"title":"Ruby","require":"clike","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sql":{"title":"SQL","owner":"multipetros"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","peerDependencies":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","alias":"ts","owner":"vkbansal"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","owner":"hason"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":"Line Highlight","line-numbers":{"title":"Line Numbers","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","after":["autolinker","data-uri-highlight"]},"autolinker":"Autolinker","wpd":"WebPlatform Docs","custom-class":{"title":"Custom Class","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","noCSS":true},"show-language":{"title":"Show Language","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","owner":"Golmote","noCSS":true},"previewers":{"title":"Previewers","owner":"Golmote"},"autoloader":{"title":"Autoloader","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","owner":"Golmote","after":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","owner":"chriswells0"},"unescaped-markup":"Unescaped Markup","normalize-whitespace":{"title":"Normalize Whitespace","owner":"zeitgeist87","after":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","owner":"mAAdhaTTah","require":"toolbar","noCSS":true}}}; if (typeof module !== 'undefined' && module.exports) { module.exports = components; } \ No newline at end of file diff --git a/components.json b/components.json index 8ece1e758f..a0ac673ea7 100644 --- a/components.json +++ b/components.json @@ -421,6 +421,11 @@ "require": "json", "owner": "RunDevelopment" }, + "json5": { + "title": "JSON5", + "require": "json", + "owner": "RunDevelopment" + }, "julia": { "title": "Julia", "owner": "cdagnino" diff --git a/components/prism-json5.js b/components/prism-json5.js new file mode 100644 index 0000000000..c64238d74a --- /dev/null +++ b/components/prism-json5.js @@ -0,0 +1,23 @@ +(function (Prism) { + + var string = /("|')(?:\\(?:\r\n?|\n|.)|(?!\1)[^\\\r\n])*\1/ + + Prism.languages.json5 = Prism.languages.extend('json', { + 'property': [ + { + pattern: RegExp(string.source + '(?=\\s*:)'), + greedy: true + }, + { + pattern: /[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*:)/, + alias: 'unquoted' + } + ], + 'string': { + pattern: string, + greedy: true + }, + 'number': /[+-]?(?:NaN|Infinity|0x[a-fA-F\d]+|(?:\d+\.?\d*|\.\d+)(?:[eE][+-]?\d+)?)/ + }); + +}(Prism)); diff --git a/components/prism-json5.min.js b/components/prism-json5.min.js new file mode 100644 index 0000000000..3abd8f392f --- /dev/null +++ b/components/prism-json5.min.js @@ -0,0 +1 @@ +!function(n){var e=/("|')(?:\\(?:\r\n?|\n|.)|(?!\1)[^\\\r\n])*\1/;n.languages.json5=n.languages.extend("json",{property:[{pattern:RegExp(e.source+"(?=\\s*:)"),greedy:!0},{pattern:/[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*:)/,alias:"unquoted"}],string:{pattern:e,greedy:!0},number:/[+-]?(?:NaN|Infinity|0x[a-fA-F\d]+|(?:\d+\.?\d*|\.\d+)(?:[eE][+-]?\d+)?)/})}(Prism); \ No newline at end of file diff --git a/examples/prism-json5.html b/examples/prism-json5.html new file mode 100644 index 0000000000..544e175043 --- /dev/null +++ b/examples/prism-json5.html @@ -0,0 +1,13 @@ +

    Full example

    +
    {
    +  // comments
    +  unquoted: 'and you can quote me on that',
    +  singleQuotes: 'I can use "double quotes" here',
    +  lineBreaks: "Look, Mom! \
    +No \\n's!",
    +  hexadecimal: 0xdecaf,
    +  leadingDecimalPoint: .8675309, andTrailing: 8675309.,
    +  positiveSign: +1,
    +  trailingComma: 'in objects', andIn: ['arrays',],
    +  "backwardsCompatible": "with JSON",
    +}
    diff --git a/plugins/autoloader/prism-autoloader.js b/plugins/autoloader/prism-autoloader.js index 42faa57013..1a4c1844e3 100644 --- a/plugins/autoloader/prism-autoloader.js +++ b/plugins/autoloader/prism-autoloader.js @@ -4,7 +4,7 @@ } // The dependencies map is built automatically with gulp - var lang_dependencies = /*languages_placeholder[*/{"javascript":"clike","actionscript":"javascript","arduino":"cpp","aspnet":["markup","csharp"],"bison":"c","c":"clike","csharp":"clike","cpp":"c","coffeescript":"javascript","crystal":"ruby","css-extras":"css","d":"clike","dart":"clike","django":"markup","erb":["ruby","markup-templating"],"fsharp":"clike","flow":"javascript","glsl":"clike","gml":"clike","go":"clike","groovy":"clike","haml":"ruby","handlebars":"markup-templating","haxe":"clike","java":"clike","jolie":"clike","jsonp":"json","kotlin":"clike","less":"css","markdown":"markup","markup-templating":"markup","n4js":"javascript","nginx":"clike","objectivec":"c","opencl":"cpp","parser":"markup","php":["clike","markup-templating"],"php-extras":"php","plsql":"sql","processing":"clike","protobuf":"clike","pug":"javascript","qore":"clike","jsx":["markup","javascript"],"tsx":["jsx","typescript"],"reason":"clike","ruby":"clike","sass":"css","scss":"css","scala":"java","smarty":"markup-templating","soy":"markup-templating","swift":"clike","tap":"yaml","textile":"markup","tt2":["clike","markup-templating"],"twig":"markup","typescript":"javascript","vala":"clike","vbnet":"basic","velocity":"markup","wiki":"markup","xeora":"markup","xquery":"markup"}/*]*/; + var lang_dependencies = /*languages_placeholder[*/{"javascript":"clike","actionscript":"javascript","arduino":"cpp","aspnet":["markup","csharp"],"bison":"c","c":"clike","csharp":"clike","cpp":"c","coffeescript":"javascript","crystal":"ruby","css-extras":"css","d":"clike","dart":"clike","django":"markup","erb":["ruby","markup-templating"],"fsharp":"clike","flow":"javascript","glsl":"clike","gml":"clike","go":"clike","groovy":"clike","haml":"ruby","handlebars":"markup-templating","haxe":"clike","java":"clike","jolie":"clike","jsonp":"json","json5":"json","kotlin":"clike","less":"css","markdown":"markup","markup-templating":"markup","n4js":"javascript","nginx":"clike","objectivec":"c","opencl":"cpp","parser":"markup","php":["clike","markup-templating"],"php-extras":"php","plsql":"sql","processing":"clike","protobuf":"clike","pug":"javascript","qore":"clike","jsx":["markup","javascript"],"tsx":["jsx","typescript"],"reason":"clike","ruby":"clike","sass":"css","scss":"css","scala":"java","smarty":"markup-templating","soy":"markup-templating","swift":"clike","tap":"yaml","textile":"markup","tt2":["clike","markup-templating"],"twig":"markup","typescript":"javascript","vala":"clike","vbnet":"basic","velocity":"markup","wiki":"markup","xeora":"markup","xquery":"markup"}/*]*/; var lang_data = {}; @@ -206,4 +206,4 @@ } }); -}()); \ No newline at end of file +}()); diff --git a/plugins/autoloader/prism-autoloader.min.js b/plugins/autoloader/prism-autoloader.min.js index 15f504ccbd..352393c690 100644 --- a/plugins/autoloader/prism-autoloader.min.js +++ b/plugins/autoloader/prism-autoloader.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof self&&self.Prism&&self.document&&document.createElement){var e={javascript:"clike",actionscript:"javascript",arduino:"cpp",aspnet:["markup","csharp"],bison:"c",c:"clike",csharp:"clike",cpp:"c",coffeescript:"javascript",crystal:"ruby","css-extras":"css",d:"clike",dart:"clike",django:"markup",erb:["ruby","markup-templating"],fsharp:"clike",flow:"javascript",glsl:"clike",gml:"clike",go:"clike",groovy:"clike",haml:"ruby",handlebars:"markup-templating",haxe:"clike",java:"clike",jolie:"clike",jsonp:"json",kotlin:"clike",less:"css",markdown:"markup","markup-templating":"markup",n4js:"javascript",nginx:"clike",objectivec:"c",opencl:"cpp",parser:"markup",php:["clike","markup-templating"],"php-extras":"php",plsql:"sql",processing:"clike",protobuf:"clike",pug:"javascript",qore:"clike",jsx:["markup","javascript"],tsx:["jsx","typescript"],reason:"clike",ruby:"clike",sass:"css",scss:"css",scala:"java",smarty:"markup-templating",soy:"markup-templating",swift:"clike",tap:"yaml",textile:"markup",tt2:["clike","markup-templating"],twig:"markup",typescript:"javascript",vala:"clike",vbnet:"basic",velocity:"markup",wiki:"markup",xeora:"markup",xquery:"markup"},a={},c="none",t=document.getElementsByTagName("script");t=t[t.length-1];var r="components/";if(t.hasAttribute("data-autoloader-path")){var s=t.getAttribute("data-autoloader-path").trim();s.length>0&&!/^[a-z]+:\/\//i.test(t.src)&&(r=s.replace(/\/?$/,"/"))}else/[\w-]+\.js$/.test(t.src)&&(r=t.src.replace(/[\w-]+\.js$/,"components/"));var i=Prism.plugins.autoloader={languages_path:r,use_minified:!0},n=function(e,a,c){var t=document.createElement("script");t.src=e,t.async=!0,t.onload=function(){document.body.removeChild(t),a&&a()},t.onerror=function(){document.body.removeChild(t),c&&c()},document.body.appendChild(t)},l=function(e){return i.languages_path+"prism-"+e+(i.use_minified?".min":"")+".js"},o=function(e,c){var t=a[e];t||(t=a[e]={});var r=c.getAttribute("data-dependencies");!r&&c.parentNode&&"pre"===c.parentNode.tagName.toLowerCase()&&(r=c.parentNode.getAttribute("data-dependencies")),r=r?r.split(/\s*,\s*/g):[],p(r,function(){u(e,function(){Prism.highlightElement(c)})})},p=function(e,a,c){"string"==typeof e&&(e=[e]);var t=0,r=e.length,s=function(){r>t?u(e[t],function(){t++,s()},function(){c&&c(e[t])}):t===r&&a&&a(e)};s()},u=function(c,t,r){var s=function(){var e=!1;c.indexOf("!")>=0&&(e=!0,c=c.replace("!",""));var s=a[c];if(s||(s=a[c]={}),t&&(s.success_callbacks||(s.success_callbacks=[]),s.success_callbacks.push(t)),r&&(s.error_callbacks||(s.error_callbacks=[]),s.error_callbacks.push(r)),!e&&Prism.languages[c])m(c);else if(!e&&s.error)k(c);else if(e||!s.loading){s.loading=!0;var i=l(c);n(i,function(){s.loading=!1,m(c)},function(){s.loading=!1,s.error=!0,k(c)})}},i=e[c];i&&i.length?p(i,s):s()},m=function(e){a[e]&&a[e].success_callbacks&&a[e].success_callbacks.length&&a[e].success_callbacks.forEach(function(a){a(e)})},k=function(e){a[e]&&a[e].error_callbacks&&a[e].error_callbacks.length&&a[e].error_callbacks.forEach(function(a){a(e)})};Prism.hooks.add("complete",function(e){e.element&&e.language&&!e.grammar&&e.language!==c&&o(e.language,e.element)})}}(); \ No newline at end of file +!function(){if("undefined"!=typeof self&&self.Prism&&self.document&&document.createElement){var e={javascript:"clike",actionscript:"javascript",arduino:"cpp",aspnet:["markup","csharp"],bison:"c",c:"clike",csharp:"clike",cpp:"c",coffeescript:"javascript",crystal:"ruby","css-extras":"css",d:"clike",dart:"clike",django:"markup",erb:["ruby","markup-templating"],fsharp:"clike",flow:"javascript",glsl:"clike",gml:"clike",go:"clike",groovy:"clike",haml:"ruby",handlebars:"markup-templating",haxe:"clike",java:"clike",jolie:"clike",jsonp:"json",json5:"json",kotlin:"clike",less:"css",markdown:"markup","markup-templating":"markup",n4js:"javascript",nginx:"clike",objectivec:"c",opencl:"cpp",parser:"markup",php:["clike","markup-templating"],"php-extras":"php",plsql:"sql",processing:"clike",protobuf:"clike",pug:"javascript",qore:"clike",jsx:["markup","javascript"],tsx:["jsx","typescript"],reason:"clike",ruby:"clike",sass:"css",scss:"css",scala:"java",smarty:"markup-templating",soy:"markup-templating",swift:"clike",tap:"yaml",textile:"markup",tt2:["clike","markup-templating"],twig:"markup",typescript:"javascript",vala:"clike",vbnet:"basic",velocity:"markup",wiki:"markup",xeora:"markup",xquery:"markup"},a={},c="none",t=document.getElementsByTagName("script");t=t[t.length-1];var r="components/";if(t.hasAttribute("data-autoloader-path")){var s=t.getAttribute("data-autoloader-path").trim();s.length>0&&!/^[a-z]+:\/\//i.test(t.src)&&(r=s.replace(/\/?$/,"/"))}else/[\w-]+\.js$/.test(t.src)&&(r=t.src.replace(/[\w-]+\.js$/,"components/"));var n=Prism.plugins.autoloader={languages_path:r,use_minified:!0},i=function(e,a,c){var t=document.createElement("script");t.src=e,t.async=!0,t.onload=function(){document.body.removeChild(t),a&&a()},t.onerror=function(){document.body.removeChild(t),c&&c()},document.body.appendChild(t)},l=function(e){return n.languages_path+"prism-"+e+(n.use_minified?".min":"")+".js"},o=function(e,c){var t=a[e];t||(t=a[e]={});var r=c.getAttribute("data-dependencies");!r&&c.parentNode&&"pre"===c.parentNode.tagName.toLowerCase()&&(r=c.parentNode.getAttribute("data-dependencies")),r=r?r.split(/\s*,\s*/g):[],p(r,function(){u(e,function(){Prism.highlightElement(c)})})},p=function(e,a,c){"string"==typeof e&&(e=[e]);var t=0,r=e.length,s=function(){r>t?u(e[t],function(){t++,s()},function(){c&&c(e[t])}):t===r&&a&&a(e)};s()},u=function(c,t,r){var s=function(){var e=!1;c.indexOf("!")>=0&&(e=!0,c=c.replace("!",""));var s=a[c];if(s||(s=a[c]={}),t&&(s.success_callbacks||(s.success_callbacks=[]),s.success_callbacks.push(t)),r&&(s.error_callbacks||(s.error_callbacks=[]),s.error_callbacks.push(r)),!e&&Prism.languages[c])m(c);else if(!e&&s.error)k(c);else if(e||!s.loading){s.loading=!0;var n=l(c);i(n,function(){s.loading=!1,m(c)},function(){s.loading=!1,s.error=!0,k(c)})}},n=e[c];n&&n.length?p(n,s):s()},m=function(e){a[e]&&a[e].success_callbacks&&a[e].success_callbacks.length&&a[e].success_callbacks.forEach(function(a){a(e)})},k=function(e){a[e]&&a[e].error_callbacks&&a[e].error_callbacks.length&&a[e].error_callbacks.forEach(function(a){a(e)})};Prism.hooks.add("complete",function(e){e.element&&e.language&&!e.grammar&&e.language!==c&&o(e.language,e.element)})}}(); \ No newline at end of file diff --git a/plugins/show-language/prism-show-language.js b/plugins/show-language/prism-show-language.js index 2f216bbd26..a3489b76bd 100644 --- a/plugins/show-language/prism-show-language.js +++ b/plugins/show-language/prism-show-language.js @@ -11,7 +11,7 @@ if (!Prism.plugins.toolbar) { } // The languages map is built automatically with gulp -var Languages = /*languages_placeholder[*/{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","css":"CSS","clike":"C-like","js":"JavaScript","abap":"ABAP","abnf":"Augmented Backus–Naur form","apacheconf":"Apache Configuration","apl":"APL","arff":"ARFF","asciidoc":"AsciiDoc","adoc":"AsciiDoc","asm6502":"6502 Assembly","aspnet":"ASP.NET (C#)","autohotkey":"AutoHotkey","autoit":"AutoIt","shell":"Bash","basic":"BASIC","bnf":"Backus–Naur form","rbfn":"Routing Backus–Naur form","csharp":"C#","dotnet":"C#","cpp":"C++","cil":"CIL","csp":"Content-Security-Policy","css-extras":"CSS Extras","django":"Django/Jinja2","jinja2":"Django/Jinja2","dockerfile":"Docker","ebnf":"Extended Backus–Naur form","erb":"ERB","fsharp":"F#","gcode":"G-code","gedcom":"GEDCOM","glsl":"GLSL","gml":"GameMaker Language","gamemakerlanguage":"GameMaker Language","graphql":"GraphQL","hcl":"HCL","http":"HTTP","hpkp":"HTTP Public-Key-Pins","hsts":"HTTP Strict-Transport-Security","ichigojam":"IchigoJam","inform7":"Inform 7","javastacktrace":"Java stack trace","json":"JSON","jsonp":"JSONP","latex":"LaTeX","emacs":"Lisp","elisp":"Lisp","emacs-lisp":"Lisp","lolcode":"LOLCODE","markup-templating":"Markup templating","matlab":"MATLAB","mel":"MEL","n1ql":"N1QL","n4js":"N4JS","n4jsd":"N4JS","nand2tetris-hdl":"Nand To Tetris HDL","nasm":"NASM","nginx":"nginx","nsis":"NSIS","objectivec":"Objective-C","ocaml":"OCaml","opencl":"OpenCL","parigp":"PARI/GP","objectpascal":"Object Pascal","php":"PHP","php-extras":"PHP Extras","plsql":"PL/SQL","powershell":"PowerShell","properties":".properties","protobuf":"Protocol Buffers","q":"Q (kdb+ database)","jsx":"React JSX","tsx":"React TSX","renpy":"Ren'py","rest":"reST (reStructuredText)","sas":"SAS","sass":"Sass (Sass)","scss":"Sass (Scss)","sql":"SQL","soy":"Soy (Closure Template)","tap":"TAP","toml":"TOML","tt2":"Template Toolkit 2","ts":"TypeScript","vbnet":"VB.Net","vhdl":"VHDL","vim":"vim","visual-basic":"Visual Basic","vb":"Visual Basic","wasm":"WebAssembly","wiki":"Wiki markup","xeoracube":"XeoraCube","xojo":"Xojo (REALbasic)","xquery":"XQuery","yaml":"YAML"}/*]*/; +var Languages = /*languages_placeholder[*/{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","css":"CSS","clike":"C-like","js":"JavaScript","abap":"ABAP","abnf":"Augmented Backus–Naur form","apacheconf":"Apache Configuration","apl":"APL","arff":"ARFF","asciidoc":"AsciiDoc","adoc":"AsciiDoc","asm6502":"6502 Assembly","aspnet":"ASP.NET (C#)","autohotkey":"AutoHotkey","autoit":"AutoIt","shell":"Bash","basic":"BASIC","bnf":"Backus–Naur form","rbfn":"Routing Backus–Naur form","csharp":"C#","dotnet":"C#","cpp":"C++","cil":"CIL","csp":"Content-Security-Policy","css-extras":"CSS Extras","django":"Django/Jinja2","jinja2":"Django/Jinja2","dockerfile":"Docker","ebnf":"Extended Backus–Naur form","erb":"ERB","fsharp":"F#","gcode":"G-code","gedcom":"GEDCOM","glsl":"GLSL","gml":"GameMaker Language","gamemakerlanguage":"GameMaker Language","graphql":"GraphQL","hcl":"HCL","http":"HTTP","hpkp":"HTTP Public-Key-Pins","hsts":"HTTP Strict-Transport-Security","ichigojam":"IchigoJam","inform7":"Inform 7","javastacktrace":"Java stack trace","json":"JSON","jsonp":"JSONP","json5":"JSON5","latex":"LaTeX","emacs":"Lisp","elisp":"Lisp","emacs-lisp":"Lisp","lolcode":"LOLCODE","markup-templating":"Markup templating","matlab":"MATLAB","mel":"MEL","n1ql":"N1QL","n4js":"N4JS","n4jsd":"N4JS","nand2tetris-hdl":"Nand To Tetris HDL","nasm":"NASM","nginx":"nginx","nsis":"NSIS","objectivec":"Objective-C","ocaml":"OCaml","opencl":"OpenCL","parigp":"PARI/GP","objectpascal":"Object Pascal","php":"PHP","php-extras":"PHP Extras","plsql":"PL/SQL","powershell":"PowerShell","properties":".properties","protobuf":"Protocol Buffers","q":"Q (kdb+ database)","jsx":"React JSX","tsx":"React TSX","renpy":"Ren'py","rest":"reST (reStructuredText)","sas":"SAS","sass":"Sass (Sass)","scss":"Sass (Scss)","sql":"SQL","soy":"Soy (Closure Template)","tap":"TAP","toml":"TOML","tt2":"Template Toolkit 2","ts":"TypeScript","vbnet":"VB.Net","vhdl":"VHDL","vim":"vim","visual-basic":"Visual Basic","vb":"Visual Basic","wasm":"WebAssembly","wiki":"Wiki markup","xeoracube":"XeoraCube","xojo":"Xojo (REALbasic)","xquery":"XQuery","yaml":"YAML"}/*]*/; Prism.plugins.toolbar.registerButton('show-language', function(env) { var pre = env.element.parentNode; diff --git a/plugins/show-language/prism-show-language.min.js b/plugins/show-language/prism-show-language.min.js index 24f8c4d20a..9cd9558a19 100644 --- a/plugins/show-language/prism-show-language.min.js +++ b/plugins/show-language/prism-show-language.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof self&&self.Prism&&self.document){if(!Prism.plugins.toolbar)return console.warn("Show Languages plugin loaded before Toolbar plugin."),void 0;var a={html:"HTML",xml:"XML",svg:"SVG",mathml:"MathML",css:"CSS",clike:"C-like",js:"JavaScript",abap:"ABAP",abnf:"Augmented Backus–Naur form",apacheconf:"Apache Configuration",apl:"APL",arff:"ARFF",asciidoc:"AsciiDoc",adoc:"AsciiDoc",asm6502:"6502 Assembly",aspnet:"ASP.NET (C#)",autohotkey:"AutoHotkey",autoit:"AutoIt",shell:"Bash",basic:"BASIC",bnf:"Backus–Naur form",rbfn:"Routing Backus–Naur form",csharp:"C#",dotnet:"C#",cpp:"C++",cil:"CIL",csp:"Content-Security-Policy","css-extras":"CSS Extras",django:"Django/Jinja2",jinja2:"Django/Jinja2",dockerfile:"Docker",ebnf:"Extended Backus–Naur form",erb:"ERB",fsharp:"F#",gcode:"G-code",gedcom:"GEDCOM",glsl:"GLSL",gml:"GameMaker Language",gamemakerlanguage:"GameMaker Language",graphql:"GraphQL",hcl:"HCL",http:"HTTP",hpkp:"HTTP Public-Key-Pins",hsts:"HTTP Strict-Transport-Security",ichigojam:"IchigoJam",inform7:"Inform 7",javastacktrace:"Java stack trace",json:"JSON",jsonp:"JSONP",latex:"LaTeX",emacs:"Lisp",elisp:"Lisp","emacs-lisp":"Lisp",lolcode:"LOLCODE","markup-templating":"Markup templating",matlab:"MATLAB",mel:"MEL",n1ql:"N1QL",n4js:"N4JS",n4jsd:"N4JS","nand2tetris-hdl":"Nand To Tetris HDL",nasm:"NASM",nginx:"nginx",nsis:"NSIS",objectivec:"Objective-C",ocaml:"OCaml",opencl:"OpenCL",parigp:"PARI/GP",objectpascal:"Object Pascal",php:"PHP","php-extras":"PHP Extras",plsql:"PL/SQL",powershell:"PowerShell",properties:".properties",protobuf:"Protocol Buffers",q:"Q (kdb+ database)",jsx:"React JSX",tsx:"React TSX",renpy:"Ren'py",rest:"reST (reStructuredText)",sas:"SAS",sass:"Sass (Sass)",scss:"Sass (Scss)",sql:"SQL",soy:"Soy (Closure Template)",tap:"TAP",toml:"TOML",tt2:"Template Toolkit 2",ts:"TypeScript",vbnet:"VB.Net",vhdl:"VHDL",vim:"vim","visual-basic":"Visual Basic",vb:"Visual Basic",wasm:"WebAssembly",wiki:"Wiki markup",xeoracube:"XeoraCube",xojo:"Xojo (REALbasic)",xquery:"XQuery",yaml:"YAML"};Prism.plugins.toolbar.registerButton("show-language",function(e){function s(a){return a?(a.substring(0,1).toUpperCase()+a.substring(1)).replace(/s(?=cript)/,"S"):a}var t=e.element.parentNode;if(t&&/pre/i.test(t.nodeName)){var r=t.getAttribute("data-language")||a[e.language]||s(e.language);if(r){var o=document.createElement("span");return o.textContent=r,o}}})}}(); \ No newline at end of file +!function(){if("undefined"!=typeof self&&self.Prism&&self.document){if(!Prism.plugins.toolbar)return console.warn("Show Languages plugin loaded before Toolbar plugin."),void 0;var a={html:"HTML",xml:"XML",svg:"SVG",mathml:"MathML",css:"CSS",clike:"C-like",js:"JavaScript",abap:"ABAP",abnf:"Augmented Backus–Naur form",apacheconf:"Apache Configuration",apl:"APL",arff:"ARFF",asciidoc:"AsciiDoc",adoc:"AsciiDoc",asm6502:"6502 Assembly",aspnet:"ASP.NET (C#)",autohotkey:"AutoHotkey",autoit:"AutoIt",shell:"Bash",basic:"BASIC",bnf:"Backus–Naur form",rbfn:"Routing Backus–Naur form",csharp:"C#",dotnet:"C#",cpp:"C++",cil:"CIL",csp:"Content-Security-Policy","css-extras":"CSS Extras",django:"Django/Jinja2",jinja2:"Django/Jinja2",dockerfile:"Docker",ebnf:"Extended Backus–Naur form",erb:"ERB",fsharp:"F#",gcode:"G-code",gedcom:"GEDCOM",glsl:"GLSL",gml:"GameMaker Language",gamemakerlanguage:"GameMaker Language",graphql:"GraphQL",hcl:"HCL",http:"HTTP",hpkp:"HTTP Public-Key-Pins",hsts:"HTTP Strict-Transport-Security",ichigojam:"IchigoJam",inform7:"Inform 7",javastacktrace:"Java stack trace",json:"JSON",jsonp:"JSONP",json5:"JSON5",latex:"LaTeX",emacs:"Lisp",elisp:"Lisp","emacs-lisp":"Lisp",lolcode:"LOLCODE","markup-templating":"Markup templating",matlab:"MATLAB",mel:"MEL",n1ql:"N1QL",n4js:"N4JS",n4jsd:"N4JS","nand2tetris-hdl":"Nand To Tetris HDL",nasm:"NASM",nginx:"nginx",nsis:"NSIS",objectivec:"Objective-C",ocaml:"OCaml",opencl:"OpenCL",parigp:"PARI/GP",objectpascal:"Object Pascal",php:"PHP","php-extras":"PHP Extras",plsql:"PL/SQL",powershell:"PowerShell",properties:".properties",protobuf:"Protocol Buffers",q:"Q (kdb+ database)",jsx:"React JSX",tsx:"React TSX",renpy:"Ren'py",rest:"reST (reStructuredText)",sas:"SAS",sass:"Sass (Sass)",scss:"Sass (Scss)",sql:"SQL",soy:"Soy (Closure Template)",tap:"TAP",toml:"TOML",tt2:"Template Toolkit 2",ts:"TypeScript",vbnet:"VB.Net",vhdl:"VHDL",vim:"vim","visual-basic":"Visual Basic",vb:"Visual Basic",wasm:"WebAssembly",wiki:"Wiki markup",xeoracube:"XeoraCube",xojo:"Xojo (REALbasic)",xquery:"XQuery",yaml:"YAML"};Prism.plugins.toolbar.registerButton("show-language",function(e){function s(a){return a?(a.substring(0,1).toUpperCase()+a.substring(1)).replace(/s(?=cript)/,"S"):a}var t=e.element.parentNode;if(t&&/pre/i.test(t.nodeName)){var r=t.getAttribute("data-language")||a[e.language]||s(e.language);if(r){var o=document.createElement("span");return o.textContent=r,o}}})}}(); \ No newline at end of file diff --git a/tests/languages/json5/number_feature.test b/tests/languages/json5/number_feature.test new file mode 100644 index 0000000000..3eea94c002 --- /dev/null +++ b/tests/languages/json5/number_feature.test @@ -0,0 +1,59 @@ +0 ++0 +-0 + +123 ++123 +-123 + +0xdeadBEEF ++0xdeadBEEF +-0xdeadBEEF + +NaN +Infinity ++Infinity +-Infinity + +3.14159 +5.0e8 +5.e8 +0.2E+2 +.2E+2 +47e-5 +-1.23 +-2.34E33 +-4.34E-33 ++4.34E+33 + +---------------------------------------------------- + +[ + ["number", "0"], + ["number", "+0"], + ["number", "-0"], + ["number", "123"], + ["number", "+123"], + ["number", "-123"], + ["number", "0xdeadBEEF"], + ["number", "+0xdeadBEEF"], + ["number", "-0xdeadBEEF"], + ["number", "NaN"], + ["number", "Infinity"], + ["number", "+Infinity"], + ["number", "-Infinity"], + ["number", "3.14159"], + ["number", "5.0e8"], + ["number", "5.e8"], + ["number", "0.2E+2"], + ["number", ".2E+2"], + ["number", "47e-5"], + ["number", "-1.23"], + ["number", "-2.34E33"], + ["number", "-4.34E-33"], + ["number", "+4.34E+33"] +] + +---------------------------------------------------- + +Checks for numbers. diff --git a/tests/languages/json5/property_feature.test b/tests/languages/json5/property_feature.test new file mode 100644 index 0000000000..c46f878bd1 --- /dev/null +++ b/tests/languages/json5/property_feature.test @@ -0,0 +1,48 @@ +{"foo\"bar\"baz":1,"foo":2} +{ + "foo": 1, + "b\"ar": 2, + 'foo': 3 + foo: 3, + '"':'"', +} + +---------------------------------------------------- + +[ + ["punctuation", "{"], + ["property", "\"foo\\\"bar\\\"baz\""], + ["operator", ":"], + ["number", "1"], + ["punctuation", ","], + ["property", "\"foo\""], + ["operator", ":"], + ["number", "2"], + ["punctuation", "}"], + + ["punctuation", "{"], + ["property", "\"foo\""], + ["operator", ":"], + ["number", "1"], + ["punctuation", ","], + ["property", "\"b\\\"ar\""], + ["operator", ":"], + ["number", "2"], + ["punctuation", ","], + ["property", "'foo'"], + ["operator", ":"], + ["number", "3"], + ["property", "foo"], + ["operator", ":"], + ["number", "3"], + ["punctuation", ","], + ["property", "'\"'"], + ["operator", ":"], + ["string", "'\"'"], + ["punctuation", ","], + ["punctuation", "}"] +] + +---------------------------------------------------- + +Checks for properties. diff --git a/tests/languages/json5/string_feature.test b/tests/languages/json5/string_feature.test new file mode 100644 index 0000000000..1e94df3608 --- /dev/null +++ b/tests/languages/json5/string_feature.test @@ -0,0 +1,36 @@ +"" +"foo" +"foo\"bar\"baz" +"\u2642\\ " +{"foo":"bar","baz":"\""} +'foo"bar"baz' +'\u0001' +"\ +newline" + +---------------------------------------------------- + +[ + ["string", "\"\""], + ["string", "\"foo\""], + ["string", "\"foo\\\"bar\\\"baz\""], + ["string", "\"\\u2642\\\\ \""], + + ["punctuation", "{"], + ["property", "\"foo\""], + ["operator", ":"], + ["string", "\"bar\""], + ["punctuation", ","], + ["property", "\"baz\""], + ["operator", ":"], + ["string", "\"\\\"\""], + ["punctuation", "}"], + + ["string", "'foo\"bar\"baz'"], + ["string", "'\\u0001'"], + ["string", "\"\\\nnewline\""] +] + +---------------------------------------------------- + +Checks for strings. From 8378ac83101a2b534e3f13724c8e9dcef14753b0 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Thu, 28 Feb 2019 19:33:50 +0100 Subject: [PATCH 0176/1100] Improved JS function pattern (#1736) Allows for spaces around the punctuations of function invocation via `apply`, `bind`, or `call`. --- components/prism-javascript.js | 2 +- components/prism-javascript.min.js | 2 +- prism.js | 2 +- tests/languages/javascript/function_feature.test | 2 ++ 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/components/prism-javascript.js b/components/prism-javascript.js index a5a6aafae1..1a568fdab9 100644 --- a/components/prism-javascript.js +++ b/components/prism-javascript.js @@ -15,7 +15,7 @@ Prism.languages.javascript = Prism.languages.extend('clike', { ], 'number': /\b(?:(?:0[xX][\dA-Fa-f]+|0[bB][01]+|0[oO][0-7]+)n?|\d+n|NaN|Infinity)\b|(?:\b\d+\.?\d*|\B\.\d+)(?:[Ee][+-]?\d+)?/, // Allow for all non-ASCII characters (See http://stackoverflow.com/a/2008444) - 'function': /[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*\(|\.(?:apply|bind|call)\()/, + 'function': /[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/, 'operator': /-[-=]?|\+[+=]?|!=?=?|<>?>?=?|=(?:==?|>)?|&[&=]?|\|[|=]?|\*\*?=?|\/=?|~|\^=?|%=?|\?|\.{3}/ }); diff --git a/components/prism-javascript.min.js b/components/prism-javascript.min.js index 7fa8267dd8..69c6a2ae2b 100644 --- a/components/prism-javascript.min.js +++ b/components/prism-javascript.min.js @@ -1 +1 @@ -Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])[_$A-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\.(?:prototype|constructor))/,lookbehind:!0}],keyword:[{pattern:/((?:^|})\s*)(?:catch|finally)\b/,lookbehind:!0},/\b(?:as|async|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/],number:/\b(?:(?:0[xX][\dA-Fa-f]+|0[bB][01]+|0[oO][0-7]+)n?|\d+n|NaN|Infinity)\b|(?:\b\d+\.?\d*|\B\.\d+)(?:[Ee][+-]?\d+)?/,"function":/[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*\(|\.(?:apply|bind|call)\()/,operator:/-[-=]?|\+[+=]?|!=?=?|<>?>?=?|=(?:==?|>)?|&[&=]?|\|[|=]?|\*\*?=?|\/=?|~|\^=?|%=?|\?|\.{3}/}),Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/,Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s])\s*)\/(\[(?:[^\]\\\r\n]|\\.)*]|\\.|[^\/\\\[\r\n])+\/[gimyu]{0,5}(?=\s*($|[\r\n,.;})\]]))/,lookbehind:!0,greedy:!0},"function-variable":{pattern:/[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)?\s*\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*=>)/i,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*\s*)\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z][A-Z\d_]*\b/}),Prism.languages.insertBefore("javascript","string",{"template-string":{pattern:/`(?:\\[\s\S]|\${[^}]+}|[^\\`])*`/,greedy:!0,inside:{interpolation:{pattern:/\${[^}]+}/,inside:{"interpolation-punctuation":{pattern:/^\${|}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}}}),Prism.languages.markup&&Prism.languages.insertBefore("markup","tag",{script:{pattern:/()[\s\S]*?(?=<\/script>)/i,lookbehind:!0,inside:Prism.languages.javascript,alias:"language-javascript",greedy:!0}}),Prism.languages.js=Prism.languages.javascript; \ No newline at end of file +Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])[_$A-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\.(?:prototype|constructor))/,lookbehind:!0}],keyword:[{pattern:/((?:^|})\s*)(?:catch|finally)\b/,lookbehind:!0},/\b(?:as|async|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/],number:/\b(?:(?:0[xX][\dA-Fa-f]+|0[bB][01]+|0[oO][0-7]+)n?|\d+n|NaN|Infinity)\b|(?:\b\d+\.?\d*|\B\.\d+)(?:[Ee][+-]?\d+)?/,"function":/[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,operator:/-[-=]?|\+[+=]?|!=?=?|<>?>?=?|=(?:==?|>)?|&[&=]?|\|[|=]?|\*\*?=?|\/=?|~|\^=?|%=?|\?|\.{3}/}),Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/,Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s])\s*)\/(\[(?:[^\]\\\r\n]|\\.)*]|\\.|[^\/\\\[\r\n])+\/[gimyu]{0,5}(?=\s*($|[\r\n,.;})\]]))/,lookbehind:!0,greedy:!0},"function-variable":{pattern:/[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)?\s*\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*=>)/i,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*\s*)\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z][A-Z\d_]*\b/}),Prism.languages.insertBefore("javascript","string",{"template-string":{pattern:/`(?:\\[\s\S]|\${[^}]+}|[^\\`])*`/,greedy:!0,inside:{interpolation:{pattern:/\${[^}]+}/,inside:{"interpolation-punctuation":{pattern:/^\${|}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}}}),Prism.languages.markup&&Prism.languages.insertBefore("markup","tag",{script:{pattern:/()[\s\S]*?(?=<\/script>)/i,lookbehind:!0,inside:Prism.languages.javascript,alias:"language-javascript",greedy:!0}}),Prism.languages.js=Prism.languages.javascript; \ No newline at end of file diff --git a/prism.js b/prism.js index 2ac524897c..ee82af4fcf 100644 --- a/prism.js +++ b/prism.js @@ -724,7 +724,7 @@ Prism.languages.javascript = Prism.languages.extend('clike', { ], 'number': /\b(?:(?:0[xX][\dA-Fa-f]+|0[bB][01]+|0[oO][0-7]+)n?|\d+n|NaN|Infinity)\b|(?:\b\d+\.?\d*|\B\.\d+)(?:[Ee][+-]?\d+)?/, // Allow for all non-ASCII characters (See http://stackoverflow.com/a/2008444) - 'function': /[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*\(|\.(?:apply|bind|call)\()/, + 'function': /[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/, 'operator': /-[-=]?|\+[+=]?|!=?=?|<>?>?=?|=(?:==?|>)?|&[&=]?|\|[|=]?|\*\*?=?|\/=?|~|\^=?|%=?|\?|\.{3}/ }); diff --git a/tests/languages/javascript/function_feature.test b/tests/languages/javascript/function_feature.test index 1cb242d5a6..f910b0a8a5 100644 --- a/tests/languages/javascript/function_feature.test +++ b/tests/languages/javascript/function_feature.test @@ -1,5 +1,6 @@ foo() foo () +foo . call () foo_bar() foo_bar ( ) f42() @@ -16,6 +17,7 @@ foo({ y: fun() }) [ ["function", "foo"], ["punctuation", "("], ["punctuation", ")"], ["function", "foo"], ["punctuation", "("], ["punctuation", ")"], + ["function", "foo"], ["punctuation", "."], ["function", "call"], ["punctuation", "("], ["punctuation", ")"], ["function", "foo_bar"], ["punctuation", "("], ["punctuation", ")"], ["function", "foo_bar"], ["punctuation", "("], ["punctuation", ")"], ["function", "f42"], ["punctuation", "("], ["punctuation", ")"], From 7bcec58460c7d635841058fc9722a13b9790016a Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Thu, 28 Feb 2019 19:41:00 +0100 Subject: [PATCH 0177/1100] Improved JS constant pattern (#1737) This changes the JS constant pattern so that all WebGL constants (like `FLOAT_MAT2x4`) are matched. --- components/prism-javascript.js | 2 +- components/prism-javascript.min.js | 2 +- prism.js | 2 +- .../javascript/constant_feature.test | 38 +++++++++---------- 4 files changed, 20 insertions(+), 24 deletions(-) diff --git a/components/prism-javascript.js b/components/prism-javascript.js index 1a568fdab9..0e6f02948d 100644 --- a/components/prism-javascript.js +++ b/components/prism-javascript.js @@ -53,7 +53,7 @@ Prism.languages.insertBefore('javascript', 'keyword', { inside: Prism.languages.javascript } ], - 'constant': /\b[A-Z][A-Z\d_]*\b/ + 'constant': /\b[A-Z](?:[A-Z_]|\dx?)*\b/ }); Prism.languages.insertBefore('javascript', 'string', { diff --git a/components/prism-javascript.min.js b/components/prism-javascript.min.js index 69c6a2ae2b..a9608e7c14 100644 --- a/components/prism-javascript.min.js +++ b/components/prism-javascript.min.js @@ -1 +1 @@ -Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])[_$A-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\.(?:prototype|constructor))/,lookbehind:!0}],keyword:[{pattern:/((?:^|})\s*)(?:catch|finally)\b/,lookbehind:!0},/\b(?:as|async|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/],number:/\b(?:(?:0[xX][\dA-Fa-f]+|0[bB][01]+|0[oO][0-7]+)n?|\d+n|NaN|Infinity)\b|(?:\b\d+\.?\d*|\B\.\d+)(?:[Ee][+-]?\d+)?/,"function":/[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,operator:/-[-=]?|\+[+=]?|!=?=?|<>?>?=?|=(?:==?|>)?|&[&=]?|\|[|=]?|\*\*?=?|\/=?|~|\^=?|%=?|\?|\.{3}/}),Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/,Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s])\s*)\/(\[(?:[^\]\\\r\n]|\\.)*]|\\.|[^\/\\\[\r\n])+\/[gimyu]{0,5}(?=\s*($|[\r\n,.;})\]]))/,lookbehind:!0,greedy:!0},"function-variable":{pattern:/[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)?\s*\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*=>)/i,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*\s*)\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z][A-Z\d_]*\b/}),Prism.languages.insertBefore("javascript","string",{"template-string":{pattern:/`(?:\\[\s\S]|\${[^}]+}|[^\\`])*`/,greedy:!0,inside:{interpolation:{pattern:/\${[^}]+}/,inside:{"interpolation-punctuation":{pattern:/^\${|}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}}}),Prism.languages.markup&&Prism.languages.insertBefore("markup","tag",{script:{pattern:/()[\s\S]*?(?=<\/script>)/i,lookbehind:!0,inside:Prism.languages.javascript,alias:"language-javascript",greedy:!0}}),Prism.languages.js=Prism.languages.javascript; \ No newline at end of file +Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])[_$A-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\.(?:prototype|constructor))/,lookbehind:!0}],keyword:[{pattern:/((?:^|})\s*)(?:catch|finally)\b/,lookbehind:!0},/\b(?:as|async|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/],number:/\b(?:(?:0[xX][\dA-Fa-f]+|0[bB][01]+|0[oO][0-7]+)n?|\d+n|NaN|Infinity)\b|(?:\b\d+\.?\d*|\B\.\d+)(?:[Ee][+-]?\d+)?/,"function":/[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,operator:/-[-=]?|\+[+=]?|!=?=?|<>?>?=?|=(?:==?|>)?|&[&=]?|\|[|=]?|\*\*?=?|\/=?|~|\^=?|%=?|\?|\.{3}/}),Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/,Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s])\s*)\/(\[(?:[^\]\\\r\n]|\\.)*]|\\.|[^\/\\\[\r\n])+\/[gimyu]{0,5}(?=\s*($|[\r\n,.;})\]]))/,lookbehind:!0,greedy:!0},"function-variable":{pattern:/[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)?\s*\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*=>)/i,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*\s*)\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),Prism.languages.insertBefore("javascript","string",{"template-string":{pattern:/`(?:\\[\s\S]|\${[^}]+}|[^\\`])*`/,greedy:!0,inside:{interpolation:{pattern:/\${[^}]+}/,inside:{"interpolation-punctuation":{pattern:/^\${|}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}}}),Prism.languages.markup&&Prism.languages.insertBefore("markup","tag",{script:{pattern:/()[\s\S]*?(?=<\/script>)/i,lookbehind:!0,inside:Prism.languages.javascript,alias:"language-javascript",greedy:!0}}),Prism.languages.js=Prism.languages.javascript; \ No newline at end of file diff --git a/prism.js b/prism.js index ee82af4fcf..125c4d416d 100644 --- a/prism.js +++ b/prism.js @@ -762,7 +762,7 @@ Prism.languages.insertBefore('javascript', 'keyword', { inside: Prism.languages.javascript } ], - 'constant': /\b[A-Z][A-Z\d_]*\b/ + 'constant': /\b[A-Z](?:[A-Z_]|\dx?)*\b/ }); Prism.languages.insertBefore('javascript', 'string', { diff --git a/tests/languages/javascript/constant_feature.test b/tests/languages/javascript/constant_feature.test index e17f2855ad..760d0f4f9e 100644 --- a/tests/languages/javascript/constant_feature.test +++ b/tests/languages/javascript/constant_feature.test @@ -1,21 +1,17 @@ -var FOO; -const FOO_BAR; -const BAZ42; - ----------------------------------------------------- - -[ - ["keyword", "var"], - ["constant", "FOO"], - ["punctuation", ";"], - ["keyword", "const"], - ["constant", "FOO_BAR"], - ["punctuation", ";"], - ["keyword", "const"], - ["constant", "BAZ42"], - ["punctuation", ";"] -] - ----------------------------------------------------- - -Checks for constants. \ No newline at end of file +var FOO; +const FOO_BAR; +const BAZ42; +gl.FLOAT_MAT2x4; + +---------------------------------------------------- + +[ + ["keyword", "var"], ["constant", "FOO"], ["punctuation", ";"], + ["keyword", "const"], ["constant", "FOO_BAR"], ["punctuation", ";"], + ["keyword", "const"], ["constant", "BAZ42"], ["punctuation", ";"], + "\ngl", ["punctuation", "."], ["constant", "FLOAT_MAT2x4"], ["punctuation", ";"] +] + +---------------------------------------------------- + +Checks for constants. From 5fd7577a78580e8247ff344e5518cafb7bb746f8 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Thu, 28 Feb 2019 19:52:06 +0100 Subject: [PATCH 0178/1100] Smalltalk: Allowed empty strings and comments (#1747) This fixes that empty strings and comments were not recognized in Smalltalk. --- components/prism-smalltalk.js | 6 +++--- components/prism-smalltalk.min.js | 2 +- tests/languages/smalltalk/comment_feature.test | 6 ++++-- tests/languages/smalltalk/string_feature.test | 6 ++++-- 4 files changed, 12 insertions(+), 8 deletions(-) diff --git a/components/prism-smalltalk.js b/components/prism-smalltalk.js index 77f80d3b60..f2075b196f 100644 --- a/components/prism-smalltalk.js +++ b/components/prism-smalltalk.js @@ -1,6 +1,6 @@ Prism.languages.smalltalk = { - 'comment': /"(?:""|[^"])+"/, - 'string': /'(?:''|[^'])+'/, + 'comment': /"(?:""|[^"])*"/, + 'string': /'(?:''|[^'])*'/, 'symbol': /#[\da-z]+|#(?:-|([+\/\\*~<>=@%|&?!])\1?)|#(?=\()/i, 'block-arguments': { pattern: /(\[\s*):[^\[|]*\|/, @@ -28,4 +28,4 @@ Prism.languages.smalltalk = { ], 'operator': /[<=]=?|:=|~[~=]|\/\/?|\\\\|>[>=]?|[!^+\-*&|,@]/, 'punctuation': /[.;:?\[\](){}]/ -}; \ No newline at end of file +}; diff --git a/components/prism-smalltalk.min.js b/components/prism-smalltalk.min.js index 43ebb819ce..71a0777b40 100644 --- a/components/prism-smalltalk.min.js +++ b/components/prism-smalltalk.min.js @@ -1 +1 @@ -Prism.languages.smalltalk={comment:/"(?:""|[^"])+"/,string:/'(?:''|[^'])+'/,symbol:/#[\da-z]+|#(?:-|([+\/\\*~<>=@%|&?!])\1?)|#(?=\()/i,"block-arguments":{pattern:/(\[\s*):[^\[|]*\|/,lookbehind:!0,inside:{variable:/:[\da-z]+/i,punctuation:/\|/}},"temporary-variables":{pattern:/\|[^|]+\|/,inside:{variable:/[\da-z]+/i,punctuation:/\|/}},keyword:/\b(?:nil|true|false|self|super|new)\b/,character:{pattern:/\$./,alias:"string"},number:[/\d+r-?[\dA-Z]+(?:\.[\dA-Z]+)?(?:e-?\d+)?/,/\b\d+(?:\.\d+)?(?:e-?\d+)?/],operator:/[<=]=?|:=|~[~=]|\/\/?|\\\\|>[>=]?|[!^+\-*&|,@]/,punctuation:/[.;:?\[\](){}]/}; \ No newline at end of file +Prism.languages.smalltalk={comment:/"(?:""|[^"])*"/,string:/'(?:''|[^'])*'/,symbol:/#[\da-z]+|#(?:-|([+\/\\*~<>=@%|&?!])\1?)|#(?=\()/i,"block-arguments":{pattern:/(\[\s*):[^\[|]*\|/,lookbehind:!0,inside:{variable:/:[\da-z]+/i,punctuation:/\|/}},"temporary-variables":{pattern:/\|[^|]+\|/,inside:{variable:/[\da-z]+/i,punctuation:/\|/}},keyword:/\b(?:nil|true|false|self|super|new)\b/,character:{pattern:/\$./,alias:"string"},number:[/\d+r-?[\dA-Z]+(?:\.[\dA-Z]+)?(?:e-?\d+)?/,/\b\d+(?:\.\d+)?(?:e-?\d+)?/],operator:/[<=]=?|:=|~[~=]|\/\/?|\\\\|>[>=]?|[!^+\-*&|,@]/,punctuation:/[.;:?\[\](){}]/}; \ No newline at end of file diff --git a/tests/languages/smalltalk/comment_feature.test b/tests/languages/smalltalk/comment_feature.test index 844e7ba3d1..4b0e1251f7 100644 --- a/tests/languages/smalltalk/comment_feature.test +++ b/tests/languages/smalltalk/comment_feature.test @@ -1,14 +1,16 @@ "foobar" "foo""bar baz" +"" ---------------------------------------------------- [ ["comment", "\"foobar\""], - ["comment", "\"foo\"\"bar\r\nbaz\""] + ["comment", "\"foo\"\"bar\r\nbaz\""], + ["comment", "\"\""] ] ---------------------------------------------------- -Checks for comments. \ No newline at end of file +Checks for comments. diff --git a/tests/languages/smalltalk/string_feature.test b/tests/languages/smalltalk/string_feature.test index cd832ddda1..8eaeba1434 100644 --- a/tests/languages/smalltalk/string_feature.test +++ b/tests/languages/smalltalk/string_feature.test @@ -1,14 +1,16 @@ 'foobar' 'foo''bar baz' +'' ---------------------------------------------------- [ ["string", "'foobar'"], - ["string", "'foo''bar\r\nbaz'"] + ["string", "'foo''bar\r\nbaz'"], + ["string", "''"] ] ---------------------------------------------------- -Checks for strings. \ No newline at end of file +Checks for strings. From c3862a24c26fe1f67c5b133323d0a23a8b14afa4 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Thu, 28 Feb 2019 19:55:24 +0100 Subject: [PATCH 0179/1100] Fix for markup attributes (#1752) This fixes some issues related to markup (XML/HTML) attributes. See the PR for more detail. --- components/prism-markup.js | 6 +-- components/prism-markup.min.js | 2 +- prism.js | 6 +-- .../markup/tag_attribute_feature.test | 46 ++++++++++++++----- 4 files changed, 42 insertions(+), 18 deletions(-) diff --git a/components/prism-markup.js b/components/prism-markup.js index 434bcb6a5c..39d456d9b9 100644 --- a/components/prism-markup.js +++ b/components/prism-markup.js @@ -4,7 +4,7 @@ Prism.languages.markup = { 'doctype': //i, 'cdata': //i, 'tag': { - pattern: /<\/?(?!\d)[^\s>\/=$<%]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s'">=]+))?)*\s*\/?>/i, + pattern: /<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/i, greedy: true, inside: { 'tag': { @@ -15,12 +15,12 @@ Prism.languages.markup = { } }, 'attr-value': { - pattern: /=(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s'">=]+)/i, + pattern: /=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/i, inside: { 'punctuation': [ /^=/, { - pattern: /(^|[^\\])["']/, + pattern: /^(\s*)["']|["']$/, lookbehind: true } ] diff --git a/components/prism-markup.min.js b/components/prism-markup.min.js index 1d434bed3f..53c6d217d1 100644 --- a/components/prism-markup.min.js +++ b/components/prism-markup.min.js @@ -1 +1 @@ -Prism.languages.markup={comment://,prolog:/<\?[\s\S]+?\?>/,doctype://i,cdata://i,tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s'">=]+))?)*\s*\/?>/i,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/i,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"attr-value":{pattern:/=(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s'">=]+)/i,inside:{punctuation:[/^=/,{pattern:/(^|[^\\])["']/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:/&#?[\da-z]{1,8};/i},Prism.languages.markup.tag.inside["attr-value"].inside.entity=Prism.languages.markup.entity,Prism.hooks.add("wrap",function(a){"entity"===a.type&&(a.attributes.title=a.content.replace(/&/,"&"))}),Prism.languages.xml=Prism.languages.extend("markup",{}),Prism.languages.html=Prism.languages.markup,Prism.languages.mathml=Prism.languages.markup,Prism.languages.svg=Prism.languages.markup; \ No newline at end of file +Prism.languages.markup={comment://,prolog:/<\?[\s\S]+?\?>/,doctype://i,cdata://i,tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s\/>])))+)?\s*\/?>/i,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/i,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/i,inside:{punctuation:[/^=/,{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:/&#?[\da-z]{1,8};/i},Prism.languages.markup.tag.inside["attr-value"].inside.entity=Prism.languages.markup.entity,Prism.hooks.add("wrap",function(a){"entity"===a.type&&(a.attributes.title=a.content.replace(/&/,"&"))}),Prism.languages.xml=Prism.languages.extend("markup",{}),Prism.languages.html=Prism.languages.markup,Prism.languages.mathml=Prism.languages.markup,Prism.languages.svg=Prism.languages.markup; \ No newline at end of file diff --git a/prism.js b/prism.js index 125c4d416d..ed7d0c92db 100644 --- a/prism.js +++ b/prism.js @@ -557,7 +557,7 @@ Prism.languages.markup = { 'doctype': //i, 'cdata': //i, 'tag': { - pattern: /<\/?(?!\d)[^\s>\/=$<%]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s'">=]+))?)*\s*\/?>/i, + pattern: /<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/i, greedy: true, inside: { 'tag': { @@ -568,12 +568,12 @@ Prism.languages.markup = { } }, 'attr-value': { - pattern: /=(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s'">=]+)/i, + pattern: /=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/i, inside: { 'punctuation': [ /^=/, { - pattern: /(^|[^\\])["']/, + pattern: /^(\s*)["']|["']$/, lookbehind: true } ] diff --git a/tests/languages/markup/tag_attribute_feature.test b/tests/languages/markup/tag_attribute_feature.test index 69751b4edd..fd42c4b30a 100644 --- a/tests/languages/markup/tag_attribute_feature.test +++ b/tests/languages/markup/tag_attribute_feature.test @@ -4,7 +4,8 @@ bar baz">
    -
    +
    +
    ---------------------------------------------------- @@ -61,12 +62,12 @@ baz"> ["attr-name", [ "class" ]], - ["attr-value", [ - ["punctuation", "="], - ["punctuation", "\""], - "foo\r\nbar\r\nbaz", - ["punctuation", "\""] - ]], + ["attr-value", [ + ["punctuation", "="], + ["punctuation", "\""], + "foo\r\nbar\r\nbaz", + ["punctuation", "\""] + ]], ["punctuation", ">"] ]], @@ -91,20 +92,43 @@ baz"> ["punctuation", "<"], "div" ]], - ["attr-name", [ - "foo" + ["attr-name", ["foo"]], + ["attr-value", [ + ["punctuation", "="], + " 42" ]], + ["attr-name", ["bar"]], ["attr-value", [ ["punctuation", "="], ["punctuation", "\""], - "=\\\"=", + "42", ["punctuation", "\""] ]], ["punctuation", ">"] + ]], + + ["tag", [ + ["tag", [ + ["punctuation", "<"], + "div" + ]], + ["attr-name", ["foo"]], + ["attr-value", [ + ["punctuation", "="], + ["punctuation", "\""], + "=\\", + ["punctuation", "\""] + ]], + ["attr-name", ["bar"]], + ["attr-value", [ + ["punctuation", "="], + "baz/" + ]], + ["punctuation", ">"] ]] ] ---------------------------------------------------- Checks for single-quoted, double-quoted and unquoted attributes, attributes without value and -namespaced attributes. \ No newline at end of file +namespaced attributes. From 3560c643400135bcf14609e21ae0419ef92d8119 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Thu, 28 Feb 2019 20:12:11 +0100 Subject: [PATCH 0180/1100] JS: Fixed variables named "async" (#1738) Fixes variables names "async" in JS. --- components/prism-javascript.js | 2 +- components/prism-javascript.min.js | 2 +- prism.js | 2 +- tests/languages/javascript/keyword_feature.test | 10 ++++++---- tests/languages/javascript/variable_feature.test | 15 +++++++++++++++ 5 files changed, 24 insertions(+), 7 deletions(-) create mode 100644 tests/languages/javascript/variable_feature.test diff --git a/components/prism-javascript.js b/components/prism-javascript.js index 0e6f02948d..a564895d9e 100644 --- a/components/prism-javascript.js +++ b/components/prism-javascript.js @@ -11,7 +11,7 @@ Prism.languages.javascript = Prism.languages.extend('clike', { pattern: /((?:^|})\s*)(?:catch|finally)\b/, lookbehind: true }, - /\b(?:as|async|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/ + /\b(?:as|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/ ], 'number': /\b(?:(?:0[xX][\dA-Fa-f]+|0[bB][01]+|0[oO][0-7]+)n?|\d+n|NaN|Infinity)\b|(?:\b\d+\.?\d*|\B\.\d+)(?:[Ee][+-]?\d+)?/, // Allow for all non-ASCII characters (See http://stackoverflow.com/a/2008444) diff --git a/components/prism-javascript.min.js b/components/prism-javascript.min.js index a9608e7c14..df9ba772b5 100644 --- a/components/prism-javascript.min.js +++ b/components/prism-javascript.min.js @@ -1 +1 @@ -Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])[_$A-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\.(?:prototype|constructor))/,lookbehind:!0}],keyword:[{pattern:/((?:^|})\s*)(?:catch|finally)\b/,lookbehind:!0},/\b(?:as|async|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/],number:/\b(?:(?:0[xX][\dA-Fa-f]+|0[bB][01]+|0[oO][0-7]+)n?|\d+n|NaN|Infinity)\b|(?:\b\d+\.?\d*|\B\.\d+)(?:[Ee][+-]?\d+)?/,"function":/[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,operator:/-[-=]?|\+[+=]?|!=?=?|<>?>?=?|=(?:==?|>)?|&[&=]?|\|[|=]?|\*\*?=?|\/=?|~|\^=?|%=?|\?|\.{3}/}),Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/,Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s])\s*)\/(\[(?:[^\]\\\r\n]|\\.)*]|\\.|[^\/\\\[\r\n])+\/[gimyu]{0,5}(?=\s*($|[\r\n,.;})\]]))/,lookbehind:!0,greedy:!0},"function-variable":{pattern:/[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)?\s*\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*=>)/i,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*\s*)\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),Prism.languages.insertBefore("javascript","string",{"template-string":{pattern:/`(?:\\[\s\S]|\${[^}]+}|[^\\`])*`/,greedy:!0,inside:{interpolation:{pattern:/\${[^}]+}/,inside:{"interpolation-punctuation":{pattern:/^\${|}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}}}),Prism.languages.markup&&Prism.languages.insertBefore("markup","tag",{script:{pattern:/()[\s\S]*?(?=<\/script>)/i,lookbehind:!0,inside:Prism.languages.javascript,alias:"language-javascript",greedy:!0}}),Prism.languages.js=Prism.languages.javascript; \ No newline at end of file +Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])[_$A-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\.(?:prototype|constructor))/,lookbehind:!0}],keyword:[{pattern:/((?:^|})\s*)(?:catch|finally)\b/,lookbehind:!0},/\b(?:as|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/],number:/\b(?:(?:0[xX][\dA-Fa-f]+|0[bB][01]+|0[oO][0-7]+)n?|\d+n|NaN|Infinity)\b|(?:\b\d+\.?\d*|\B\.\d+)(?:[Ee][+-]?\d+)?/,"function":/[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,operator:/-[-=]?|\+[+=]?|!=?=?|<>?>?=?|=(?:==?|>)?|&[&=]?|\|[|=]?|\*\*?=?|\/=?|~|\^=?|%=?|\?|\.{3}/}),Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/,Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s])\s*)\/(\[(?:[^\]\\\r\n]|\\.)*]|\\.|[^\/\\\[\r\n])+\/[gimyu]{0,5}(?=\s*($|[\r\n,.;})\]]))/,lookbehind:!0,greedy:!0},"function-variable":{pattern:/[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)?\s*\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*=>)/i,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*\s*)\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),Prism.languages.insertBefore("javascript","string",{"template-string":{pattern:/`(?:\\[\s\S]|\${[^}]+}|[^\\`])*`/,greedy:!0,inside:{interpolation:{pattern:/\${[^}]+}/,inside:{"interpolation-punctuation":{pattern:/^\${|}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}}}),Prism.languages.markup&&Prism.languages.insertBefore("markup","tag",{script:{pattern:/()[\s\S]*?(?=<\/script>)/i,lookbehind:!0,inside:Prism.languages.javascript,alias:"language-javascript",greedy:!0}}),Prism.languages.js=Prism.languages.javascript; \ No newline at end of file diff --git a/prism.js b/prism.js index ed7d0c92db..3bd82498ed 100644 --- a/prism.js +++ b/prism.js @@ -720,7 +720,7 @@ Prism.languages.javascript = Prism.languages.extend('clike', { pattern: /((?:^|})\s*)(?:catch|finally)\b/, lookbehind: true }, - /\b(?:as|async|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/ + /\b(?:as|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/ ], 'number': /\b(?:(?:0[xX][\dA-Fa-f]+|0[bB][01]+|0[oO][0-7]+)n?|\d+n|NaN|Infinity)\b|(?:\b\d+\.?\d*|\B\.\d+)(?:[Ee][+-]?\d+)?/, // Allow for all non-ASCII characters (See http://stackoverflow.com/a/2008444) diff --git a/tests/languages/javascript/keyword_feature.test b/tests/languages/javascript/keyword_feature.test index ad6f720dc8..b88d1bb9b1 100644 --- a/tests/languages/javascript/keyword_feature.test +++ b/tests/languages/javascript/keyword_feature.test @@ -1,10 +1,11 @@ catch finally; +async function; -as; async; await; break; case; +as; await; break; case; class; const; continue; debugger; default; delete; do; else; enum; export; extends; for; -from; function; get; if; implements; +from; get; if; implements; import; in; instanceof; interface; let; new; null; of; package; private; protected; public; return; set; static; @@ -18,8 +19,10 @@ with; yield; ["keyword", "catch"], ["keyword", "finally"], ["punctuation", ";"], + ["keyword", "async"], + ["keyword", "function"], ["punctuation", ";"], + ["keyword", "as"], ["punctuation", ";"], - ["keyword", "async"], ["punctuation", ";"], ["keyword", "await"], ["punctuation", ";"], ["keyword", "break"], ["punctuation", ";"], ["keyword", "case"], ["punctuation", ";"], @@ -36,7 +39,6 @@ with; yield; ["keyword", "extends"], ["punctuation", ";"], ["keyword", "for"], ["punctuation", ";"], ["keyword", "from"], ["punctuation", ";"], - ["keyword", "function"], ["punctuation", ";"], ["keyword", "get"], ["punctuation", ";"], ["keyword", "if"], ["punctuation", ";"], ["keyword", "implements"], ["punctuation", ";"], diff --git a/tests/languages/javascript/variable_feature.test b/tests/languages/javascript/variable_feature.test new file mode 100644 index 0000000000..f8ffc6bdf0 --- /dev/null +++ b/tests/languages/javascript/variable_feature.test @@ -0,0 +1,15 @@ +let async = true; + +---------------------------------------------------- + +[ + ["keyword", "let"], + " async ", + ["operator", "="], + ["boolean", "true"], + ["punctuation", ";"] +] + +---------------------------------------------------- + +Checks for variables with special names. From bb6286069d0f001841cf0953d664d5f4f9ad3421 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Thu, 28 Feb 2019 20:19:45 +0100 Subject: [PATCH 0181/1100] Added JS Extras (#1743) This adds JS Extras, a few additional features for the JS language. --- components.js | 2 +- components.json | 13 +++ components/prism-js-extras.js | 104 ++++++++++++++++++ components/prism-js-extras.min.js | 1 + plugins/autoloader/prism-autoloader.js | 2 +- plugins/autoloader/prism-autoloader.min.js | 2 +- plugins/show-language/prism-show-language.js | 2 +- .../show-language/prism-show-language.min.js | 2 +- .../javascript!+js-extras/arrow_feature.test | 22 ++++ .../console_feature.test | 12 ++ .../javascript!+js-extras/dom_feature.test | 23 ++++ .../known-class-name_feature.test | 89 +++++++++++++++ .../maybe-class-name_feature.test | 63 +++++++++++ .../method-variable_feature.test | 37 +++++++ .../javascript!+js-extras/method_feature.test | 32 ++++++ .../property-access_feature.test | 22 ++++ .../javascript!+js-extras/spread_feature.test | 11 ++ 17 files changed, 434 insertions(+), 5 deletions(-) create mode 100644 components/prism-js-extras.js create mode 100644 components/prism-js-extras.min.js create mode 100644 tests/languages/javascript!+js-extras/arrow_feature.test create mode 100644 tests/languages/javascript!+js-extras/console_feature.test create mode 100644 tests/languages/javascript!+js-extras/dom_feature.test create mode 100644 tests/languages/javascript!+js-extras/known-class-name_feature.test create mode 100644 tests/languages/javascript!+js-extras/maybe-class-name_feature.test create mode 100644 tests/languages/javascript!+js-extras/method-variable_feature.test create mode 100644 tests/languages/javascript!+js-extras/method_feature.test create mode 100644 tests/languages/javascript!+js-extras/property-access_feature.test create mode 100644 tests/languages/javascript!+js-extras/spread_feature.test diff --git a/components.js b/components.js index 4c2a7c8e3e..ce2dbb80f3 100644 --- a/components.js +++ b/components.js @@ -1,2 +1,2 @@ -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default","peerDependencies":"markup"},"clike":{"title":"C-like","option":"default","overrideExampleHeader":true},"javascript":{"title":"JavaScript","require":"clike","peerDependencies":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"Augmented Backus–Naur form","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","peerDependencies":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"Backus–Naur form","alias":"rbfn","aliasTitles":{"rbfn":"Routing Backus–Naur form"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":"dotnet","owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","owner":"R-osey"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup","peerDependencies":["css","javascript"],"alias":"jinja2","owner":"romanvm"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"Extended Backus–Naur form","owner":"RunDevelopment"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","peerDependencies":["css","coffeescript","erb","javascript","less","markdown","ruby","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"http":{"title":"HTTP","peerDependencies":["javascript","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"json":{"title":"JSON","owner":"CupOfTea696"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","owner":"japborst"},"less":{"title":"Less","require":"css","owner":"Golmote"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"nasm":{"title":"NASM","owner":"rbmj"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"cpp","peerDependencies":["c","cpp"],"overrideExampleHeader":true,"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"php-extras":{"title":"PHP Extras","require":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":"javascript","peerDependencies":["coffeescript","ejs","handlebars","hogan","less","livescript","markdown","mustache","plates","scss","stylus","swig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","peerDependencies":["c","cpp","fortran","ats","dsp"],"owner":"Golmote"},"python":{"title":"Python","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"ruby":{"title":"Ruby","require":"clike","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sql":{"title":"SQL","owner":"multipetros"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","peerDependencies":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","alias":"ts","owner":"vkbansal"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","owner":"hason"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":"Line Highlight","line-numbers":{"title":"Line Numbers","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","after":["autolinker","data-uri-highlight"]},"autolinker":"Autolinker","wpd":"WebPlatform Docs","custom-class":{"title":"Custom Class","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","noCSS":true},"show-language":{"title":"Show Language","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","owner":"Golmote","noCSS":true},"previewers":{"title":"Previewers","owner":"Golmote"},"autoloader":{"title":"Autoloader","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","owner":"Golmote","after":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","owner":"chriswells0"},"unescaped-markup":"Unescaped Markup","normalize-whitespace":{"title":"Normalize Whitespace","owner":"zeitgeist87","after":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","owner":"mAAdhaTTah","require":"toolbar","noCSS":true}}}; +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default","peerDependencies":"markup"},"clike":{"title":"C-like","option":"default","overrideExampleHeader":true},"javascript":{"title":"JavaScript","require":"clike","peerDependencies":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"Augmented Backus–Naur form","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","peerDependencies":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"Backus–Naur form","alias":"rbfn","aliasTitles":{"rbfn":"Routing Backus–Naur form"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":"dotnet","owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","owner":"R-osey"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup","peerDependencies":["css","javascript"],"alias":"jinja2","owner":"romanvm"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"Extended Backus–Naur form","owner":"RunDevelopment"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","peerDependencies":["css","coffeescript","erb","javascript","less","markdown","ruby","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"http":{"title":"HTTP","peerDependencies":["javascript","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"js-extras":{"title":"JS Extras","require":"javascript","peerDependencies":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","owner":"CupOfTea696"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","owner":"japborst"},"less":{"title":"Less","require":"css","owner":"Golmote"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"nasm":{"title":"NASM","owner":"rbmj"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"cpp","peerDependencies":["c","cpp"],"overrideExampleHeader":true,"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"php-extras":{"title":"PHP Extras","require":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":"javascript","peerDependencies":["coffeescript","ejs","handlebars","hogan","less","livescript","markdown","mustache","plates","scss","stylus","swig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","peerDependencies":["c","cpp","fortran","ats","dsp"],"owner":"Golmote"},"python":{"title":"Python","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"peerDependencies":"js-extras","owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"ruby":{"title":"Ruby","require":"clike","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sql":{"title":"SQL","owner":"multipetros"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","peerDependencies":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","alias":"ts","owner":"vkbansal"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","owner":"hason"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":"Line Highlight","line-numbers":{"title":"Line Numbers","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","after":["autolinker","data-uri-highlight"]},"autolinker":"Autolinker","wpd":"WebPlatform Docs","custom-class":{"title":"Custom Class","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","noCSS":true},"show-language":{"title":"Show Language","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","owner":"Golmote","noCSS":true},"previewers":{"title":"Previewers","owner":"Golmote"},"autoloader":{"title":"Autoloader","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","owner":"Golmote","after":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","owner":"chriswells0"},"unescaped-markup":"Unescaped Markup","normalize-whitespace":{"title":"Normalize Whitespace","owner":"zeitgeist87","after":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","owner":"mAAdhaTTah","require":"toolbar","noCSS":true}}}; if (typeof module !== 'undefined' && module.exports) { module.exports = components; } \ No newline at end of file diff --git a/components.json b/components.json index a0ac673ea7..242ba82b7e 100644 --- a/components.json +++ b/components.json @@ -412,6 +412,18 @@ "require": "clike", "owner": "thesave" }, + "js-extras": { + "title": "JS Extras", + "require": "javascript", + "peerDependencies": [ + "actionscript", + "coffeescript", + "flow", + "n4js", + "typescript" + ], + "owner": "RunDevelopment" + }, "json": { "title": "JSON", "owner": "CupOfTea696" @@ -669,6 +681,7 @@ "jsx": { "title": "React JSX", "require": ["markup", "javascript"], + "peerDependencies": "js-extras", "owner": "vkbansal" }, "tsx": { diff --git a/components/prism-js-extras.js b/components/prism-js-extras.js new file mode 100644 index 0000000000..80034cfdc3 --- /dev/null +++ b/components/prism-js-extras.js @@ -0,0 +1,104 @@ +(function (Prism) { + + Prism.languages.insertBefore('javascript', 'function-variable', { + 'method-variable': { + pattern: RegExp('(\\.\\s*)' + Prism.languages.javascript['function-variable'].pattern.source), + lookbehind: true, + alias: ['function-variable', 'method', 'function', 'property-access'] + } + }); + + Prism.languages.insertBefore('javascript', 'function', { + 'method': { + pattern: RegExp('(\\.\\s*)' + Prism.languages.javascript['function'].source), + lookbehind: true, + alias: ['function', 'property-access'] + } + }); + + Prism.languages.insertBefore('javascript', 'constant', { + 'known-class-name': [ + { + // standard built-ins + // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects + pattern: /\b(?:(?:(?:Uint|Int)(?:8|16|32)|Uint8Clamped|Float(?:32|64))?Array|ArrayBuffer|BigInt|Boolean|DataView|Date|Error|Function|Intl|JSON|Math|Number|Object|Promise|Proxy|Reflect|RegExp|String|Symbol|(?:Weak)?(?:Set|Map)|WebAssembly)\b/, + alias: 'class-name' + }, + { + // errors + pattern: /\b(?:[A-Z]\w*)Error\b/, + alias: 'class-name' + } + ] + }); + + Prism.languages.javascript['keyword'].unshift( + { + pattern: /\b(?:as|default|export|from|import)\b/, + alias: 'module' + }, + { + pattern: /\bnull\b/, + alias: ['null', 'nil'] + }, + { + pattern: /\bundefined\b/, + alias: 'nil' + } + ); + + Prism.languages.insertBefore('javascript', 'operator', { + 'spread': { + pattern: /\.{3}/, + alias: 'operator' + }, + 'arrow': { + pattern: /=>/, + alias: 'operator' + } + }); + + Prism.languages.insertBefore('javascript', 'punctuation', { + 'property-access': { + pattern: /(\.\s*)[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*/, + lookbehind: true + }, + 'maybe-class-name': { + pattern: /(^|[^$\w\xA0-\uFFFF])[A-Z][$\w\xA0-\uFFFF]+/, + lookbehind: true + }, + 'dom': { + // this contains only a few commonly used DOM variables + pattern: /\b(?:document|location|navigator|performance|(?:local|session)Storage|window)\b/, + alias: 'variable' + }, + 'console': { + pattern: /\bconsole(?=\s*\.)/, + alias: 'class-name' + } + }); + + + // add 'maybe-class-name' to tokens which might be a class name + var maybeClassNameTokens = ['function', 'function-variable', 'method', 'method-variable', 'property-access']; + + for (var i = 0; i < maybeClassNameTokens.length; i++) { + var token = maybeClassNameTokens[i]; + var value = Prism.languages.javascript[token]; + + // convert regex to object + if (Prism.util.type(value) === 'RegExp') { + value = Prism.languages.javascript[token] = { + pattern: value + }; + } + + // keep in mind that we don't support arrays + + var inside = value.inside || {}; + value.inside = inside; + + inside['maybe-class-name'] = /^[A-Z][\s\S]*/; + } + +}(Prism)); diff --git a/components/prism-js-extras.min.js b/components/prism-js-extras.min.js new file mode 100644 index 0000000000..9d913d47a9 --- /dev/null +++ b/components/prism-js-extras.min.js @@ -0,0 +1 @@ +!function(a){a.languages.insertBefore("javascript","function-variable",{"method-variable":{pattern:RegExp("(\\.\\s*)"+a.languages.javascript["function-variable"].pattern.source),lookbehind:!0,alias:["function-variable","method","function","property-access"]}}),a.languages.insertBefore("javascript","function",{method:{pattern:RegExp("(\\.\\s*)"+a.languages.javascript["function"].source),lookbehind:!0,alias:["function","property-access"]}}),a.languages.insertBefore("javascript","constant",{"known-class-name":[{pattern:/\b(?:(?:(?:Uint|Int)(?:8|16|32)|Uint8Clamped|Float(?:32|64))?Array|ArrayBuffer|BigInt|Boolean|DataView|Date|Error|Function|Intl|JSON|Math|Number|Object|Promise|Proxy|Reflect|RegExp|String|Symbol|(?:Weak)?(?:Set|Map)|WebAssembly)\b/,alias:"class-name"},{pattern:/\b(?:[A-Z]\w*)Error\b/,alias:"class-name"}]}),a.languages.javascript.keyword.unshift({pattern:/\b(?:as|default|export|from|import)\b/,alias:"module"},{pattern:/\bnull\b/,alias:["null","nil"]},{pattern:/\bundefined\b/,alias:"nil"}),a.languages.insertBefore("javascript","operator",{spread:{pattern:/\.{3}/,alias:"operator"},arrow:{pattern:/=>/,alias:"operator"}}),a.languages.insertBefore("javascript","punctuation",{"property-access":{pattern:/(\.\s*)[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*/,lookbehind:!0},"maybe-class-name":{pattern:/(^|[^$\w\xA0-\uFFFF])[A-Z][$\w\xA0-\uFFFF]+/,lookbehind:!0},dom:{pattern:/\b(?:document|location|navigator|performance|(?:local|session)Storage|window)\b/,alias:"variable"},console:{pattern:/\bconsole(?=\s*\.)/,alias:"class-name"}});for(var e=["function","function-variable","method","method-variable","property-access"],t=0;t0&&!/^[a-z]+:\/\//i.test(t.src)&&(r=s.replace(/\/?$/,"/"))}else/[\w-]+\.js$/.test(t.src)&&(r=t.src.replace(/[\w-]+\.js$/,"components/"));var n=Prism.plugins.autoloader={languages_path:r,use_minified:!0},i=function(e,a,c){var t=document.createElement("script");t.src=e,t.async=!0,t.onload=function(){document.body.removeChild(t),a&&a()},t.onerror=function(){document.body.removeChild(t),c&&c()},document.body.appendChild(t)},l=function(e){return n.languages_path+"prism-"+e+(n.use_minified?".min":"")+".js"},o=function(e,c){var t=a[e];t||(t=a[e]={});var r=c.getAttribute("data-dependencies");!r&&c.parentNode&&"pre"===c.parentNode.tagName.toLowerCase()&&(r=c.parentNode.getAttribute("data-dependencies")),r=r?r.split(/\s*,\s*/g):[],p(r,function(){u(e,function(){Prism.highlightElement(c)})})},p=function(e,a,c){"string"==typeof e&&(e=[e]);var t=0,r=e.length,s=function(){r>t?u(e[t],function(){t++,s()},function(){c&&c(e[t])}):t===r&&a&&a(e)};s()},u=function(c,t,r){var s=function(){var e=!1;c.indexOf("!")>=0&&(e=!0,c=c.replace("!",""));var s=a[c];if(s||(s=a[c]={}),t&&(s.success_callbacks||(s.success_callbacks=[]),s.success_callbacks.push(t)),r&&(s.error_callbacks||(s.error_callbacks=[]),s.error_callbacks.push(r)),!e&&Prism.languages[c])m(c);else if(!e&&s.error)k(c);else if(e||!s.loading){s.loading=!0;var n=l(c);i(n,function(){s.loading=!1,m(c)},function(){s.loading=!1,s.error=!0,k(c)})}},n=e[c];n&&n.length?p(n,s):s()},m=function(e){a[e]&&a[e].success_callbacks&&a[e].success_callbacks.length&&a[e].success_callbacks.forEach(function(a){a(e)})},k=function(e){a[e]&&a[e].error_callbacks&&a[e].error_callbacks.length&&a[e].error_callbacks.forEach(function(a){a(e)})};Prism.hooks.add("complete",function(e){e.element&&e.language&&!e.grammar&&e.language!==c&&o(e.language,e.element)})}}(); \ No newline at end of file +!function(){if("undefined"!=typeof self&&self.Prism&&self.document&&document.createElement){var e={javascript:"clike",actionscript:"javascript",arduino:"cpp",aspnet:["markup","csharp"],bison:"c",c:"clike",csharp:"clike",cpp:"c",coffeescript:"javascript",crystal:"ruby","css-extras":"css",d:"clike",dart:"clike",django:"markup",erb:["ruby","markup-templating"],fsharp:"clike",flow:"javascript",glsl:"clike",gml:"clike",go:"clike",groovy:"clike",haml:"ruby",handlebars:"markup-templating",haxe:"clike",java:"clike",jolie:"clike","js-extras":"javascript",jsonp:"json",json5:"json",kotlin:"clike",less:"css",markdown:"markup","markup-templating":"markup",n4js:"javascript",nginx:"clike",objectivec:"c",opencl:"cpp",parser:"markup",php:["clike","markup-templating"],"php-extras":"php",plsql:"sql",processing:"clike",protobuf:"clike",pug:"javascript",qore:"clike",jsx:["markup","javascript"],tsx:["jsx","typescript"],reason:"clike",ruby:"clike",sass:"css",scss:"css",scala:"java",smarty:"markup-templating",soy:"markup-templating",swift:"clike",tap:"yaml",textile:"markup",tt2:["clike","markup-templating"],twig:"markup",typescript:"javascript",vala:"clike",vbnet:"basic",velocity:"markup",wiki:"markup",xeora:"markup",xquery:"markup"},a={},c="none",t=document.getElementsByTagName("script");t=t[t.length-1];var r="components/";if(t.hasAttribute("data-autoloader-path")){var s=t.getAttribute("data-autoloader-path").trim();s.length>0&&!/^[a-z]+:\/\//i.test(t.src)&&(r=s.replace(/\/?$/,"/"))}else/[\w-]+\.js$/.test(t.src)&&(r=t.src.replace(/[\w-]+\.js$/,"components/"));var n=Prism.plugins.autoloader={languages_path:r,use_minified:!0},i=function(e,a,c){var t=document.createElement("script");t.src=e,t.async=!0,t.onload=function(){document.body.removeChild(t),a&&a()},t.onerror=function(){document.body.removeChild(t),c&&c()},document.body.appendChild(t)},l=function(e){return n.languages_path+"prism-"+e+(n.use_minified?".min":"")+".js"},o=function(e,c){var t=a[e];t||(t=a[e]={});var r=c.getAttribute("data-dependencies");!r&&c.parentNode&&"pre"===c.parentNode.tagName.toLowerCase()&&(r=c.parentNode.getAttribute("data-dependencies")),r=r?r.split(/\s*,\s*/g):[],p(r,function(){u(e,function(){Prism.highlightElement(c)})})},p=function(e,a,c){"string"==typeof e&&(e=[e]);var t=0,r=e.length,s=function(){r>t?u(e[t],function(){t++,s()},function(){c&&c(e[t])}):t===r&&a&&a(e)};s()},u=function(c,t,r){var s=function(){var e=!1;c.indexOf("!")>=0&&(e=!0,c=c.replace("!",""));var s=a[c];if(s||(s=a[c]={}),t&&(s.success_callbacks||(s.success_callbacks=[]),s.success_callbacks.push(t)),r&&(s.error_callbacks||(s.error_callbacks=[]),s.error_callbacks.push(r)),!e&&Prism.languages[c])m(c);else if(!e&&s.error)k(c);else if(e||!s.loading){s.loading=!0;var n=l(c);i(n,function(){s.loading=!1,m(c)},function(){s.loading=!1,s.error=!0,k(c)})}},n=e[c];n&&n.length?p(n,s):s()},m=function(e){a[e]&&a[e].success_callbacks&&a[e].success_callbacks.length&&a[e].success_callbacks.forEach(function(a){a(e)})},k=function(e){a[e]&&a[e].error_callbacks&&a[e].error_callbacks.length&&a[e].error_callbacks.forEach(function(a){a(e)})};Prism.hooks.add("complete",function(e){e.element&&e.language&&!e.grammar&&e.language!==c&&o(e.language,e.element)})}}(); \ No newline at end of file diff --git a/plugins/show-language/prism-show-language.js b/plugins/show-language/prism-show-language.js index a3489b76bd..7eded07f08 100644 --- a/plugins/show-language/prism-show-language.js +++ b/plugins/show-language/prism-show-language.js @@ -11,7 +11,7 @@ if (!Prism.plugins.toolbar) { } // The languages map is built automatically with gulp -var Languages = /*languages_placeholder[*/{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","css":"CSS","clike":"C-like","js":"JavaScript","abap":"ABAP","abnf":"Augmented Backus–Naur form","apacheconf":"Apache Configuration","apl":"APL","arff":"ARFF","asciidoc":"AsciiDoc","adoc":"AsciiDoc","asm6502":"6502 Assembly","aspnet":"ASP.NET (C#)","autohotkey":"AutoHotkey","autoit":"AutoIt","shell":"Bash","basic":"BASIC","bnf":"Backus–Naur form","rbfn":"Routing Backus–Naur form","csharp":"C#","dotnet":"C#","cpp":"C++","cil":"CIL","csp":"Content-Security-Policy","css-extras":"CSS Extras","django":"Django/Jinja2","jinja2":"Django/Jinja2","dockerfile":"Docker","ebnf":"Extended Backus–Naur form","erb":"ERB","fsharp":"F#","gcode":"G-code","gedcom":"GEDCOM","glsl":"GLSL","gml":"GameMaker Language","gamemakerlanguage":"GameMaker Language","graphql":"GraphQL","hcl":"HCL","http":"HTTP","hpkp":"HTTP Public-Key-Pins","hsts":"HTTP Strict-Transport-Security","ichigojam":"IchigoJam","inform7":"Inform 7","javastacktrace":"Java stack trace","json":"JSON","jsonp":"JSONP","json5":"JSON5","latex":"LaTeX","emacs":"Lisp","elisp":"Lisp","emacs-lisp":"Lisp","lolcode":"LOLCODE","markup-templating":"Markup templating","matlab":"MATLAB","mel":"MEL","n1ql":"N1QL","n4js":"N4JS","n4jsd":"N4JS","nand2tetris-hdl":"Nand To Tetris HDL","nasm":"NASM","nginx":"nginx","nsis":"NSIS","objectivec":"Objective-C","ocaml":"OCaml","opencl":"OpenCL","parigp":"PARI/GP","objectpascal":"Object Pascal","php":"PHP","php-extras":"PHP Extras","plsql":"PL/SQL","powershell":"PowerShell","properties":".properties","protobuf":"Protocol Buffers","q":"Q (kdb+ database)","jsx":"React JSX","tsx":"React TSX","renpy":"Ren'py","rest":"reST (reStructuredText)","sas":"SAS","sass":"Sass (Sass)","scss":"Sass (Scss)","sql":"SQL","soy":"Soy (Closure Template)","tap":"TAP","toml":"TOML","tt2":"Template Toolkit 2","ts":"TypeScript","vbnet":"VB.Net","vhdl":"VHDL","vim":"vim","visual-basic":"Visual Basic","vb":"Visual Basic","wasm":"WebAssembly","wiki":"Wiki markup","xeoracube":"XeoraCube","xojo":"Xojo (REALbasic)","xquery":"XQuery","yaml":"YAML"}/*]*/; +var Languages = /*languages_placeholder[*/{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","css":"CSS","clike":"C-like","js":"JavaScript","abap":"ABAP","abnf":"Augmented Backus–Naur form","apacheconf":"Apache Configuration","apl":"APL","arff":"ARFF","asciidoc":"AsciiDoc","adoc":"AsciiDoc","asm6502":"6502 Assembly","aspnet":"ASP.NET (C#)","autohotkey":"AutoHotkey","autoit":"AutoIt","shell":"Bash","basic":"BASIC","bnf":"Backus–Naur form","rbfn":"Routing Backus–Naur form","csharp":"C#","dotnet":"C#","cpp":"C++","cil":"CIL","csp":"Content-Security-Policy","css-extras":"CSS Extras","django":"Django/Jinja2","jinja2":"Django/Jinja2","dockerfile":"Docker","ebnf":"Extended Backus–Naur form","erb":"ERB","fsharp":"F#","gcode":"G-code","gedcom":"GEDCOM","glsl":"GLSL","gml":"GameMaker Language","gamemakerlanguage":"GameMaker Language","graphql":"GraphQL","hcl":"HCL","http":"HTTP","hpkp":"HTTP Public-Key-Pins","hsts":"HTTP Strict-Transport-Security","ichigojam":"IchigoJam","inform7":"Inform 7","javastacktrace":"Java stack trace","js-extras":"JS Extras","json":"JSON","jsonp":"JSONP","json5":"JSON5","latex":"LaTeX","emacs":"Lisp","elisp":"Lisp","emacs-lisp":"Lisp","lolcode":"LOLCODE","markup-templating":"Markup templating","matlab":"MATLAB","mel":"MEL","n1ql":"N1QL","n4js":"N4JS","n4jsd":"N4JS","nand2tetris-hdl":"Nand To Tetris HDL","nasm":"NASM","nginx":"nginx","nsis":"NSIS","objectivec":"Objective-C","ocaml":"OCaml","opencl":"OpenCL","parigp":"PARI/GP","objectpascal":"Object Pascal","php":"PHP","php-extras":"PHP Extras","plsql":"PL/SQL","powershell":"PowerShell","properties":".properties","protobuf":"Protocol Buffers","q":"Q (kdb+ database)","jsx":"React JSX","tsx":"React TSX","renpy":"Ren'py","rest":"reST (reStructuredText)","sas":"SAS","sass":"Sass (Sass)","scss":"Sass (Scss)","sql":"SQL","soy":"Soy (Closure Template)","tap":"TAP","toml":"TOML","tt2":"Template Toolkit 2","ts":"TypeScript","vbnet":"VB.Net","vhdl":"VHDL","vim":"vim","visual-basic":"Visual Basic","vb":"Visual Basic","wasm":"WebAssembly","wiki":"Wiki markup","xeoracube":"XeoraCube","xojo":"Xojo (REALbasic)","xquery":"XQuery","yaml":"YAML"}/*]*/; Prism.plugins.toolbar.registerButton('show-language', function(env) { var pre = env.element.parentNode; diff --git a/plugins/show-language/prism-show-language.min.js b/plugins/show-language/prism-show-language.min.js index 9cd9558a19..8c5a39f55d 100644 --- a/plugins/show-language/prism-show-language.min.js +++ b/plugins/show-language/prism-show-language.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof self&&self.Prism&&self.document){if(!Prism.plugins.toolbar)return console.warn("Show Languages plugin loaded before Toolbar plugin."),void 0;var a={html:"HTML",xml:"XML",svg:"SVG",mathml:"MathML",css:"CSS",clike:"C-like",js:"JavaScript",abap:"ABAP",abnf:"Augmented Backus–Naur form",apacheconf:"Apache Configuration",apl:"APL",arff:"ARFF",asciidoc:"AsciiDoc",adoc:"AsciiDoc",asm6502:"6502 Assembly",aspnet:"ASP.NET (C#)",autohotkey:"AutoHotkey",autoit:"AutoIt",shell:"Bash",basic:"BASIC",bnf:"Backus–Naur form",rbfn:"Routing Backus–Naur form",csharp:"C#",dotnet:"C#",cpp:"C++",cil:"CIL",csp:"Content-Security-Policy","css-extras":"CSS Extras",django:"Django/Jinja2",jinja2:"Django/Jinja2",dockerfile:"Docker",ebnf:"Extended Backus–Naur form",erb:"ERB",fsharp:"F#",gcode:"G-code",gedcom:"GEDCOM",glsl:"GLSL",gml:"GameMaker Language",gamemakerlanguage:"GameMaker Language",graphql:"GraphQL",hcl:"HCL",http:"HTTP",hpkp:"HTTP Public-Key-Pins",hsts:"HTTP Strict-Transport-Security",ichigojam:"IchigoJam",inform7:"Inform 7",javastacktrace:"Java stack trace",json:"JSON",jsonp:"JSONP",json5:"JSON5",latex:"LaTeX",emacs:"Lisp",elisp:"Lisp","emacs-lisp":"Lisp",lolcode:"LOLCODE","markup-templating":"Markup templating",matlab:"MATLAB",mel:"MEL",n1ql:"N1QL",n4js:"N4JS",n4jsd:"N4JS","nand2tetris-hdl":"Nand To Tetris HDL",nasm:"NASM",nginx:"nginx",nsis:"NSIS",objectivec:"Objective-C",ocaml:"OCaml",opencl:"OpenCL",parigp:"PARI/GP",objectpascal:"Object Pascal",php:"PHP","php-extras":"PHP Extras",plsql:"PL/SQL",powershell:"PowerShell",properties:".properties",protobuf:"Protocol Buffers",q:"Q (kdb+ database)",jsx:"React JSX",tsx:"React TSX",renpy:"Ren'py",rest:"reST (reStructuredText)",sas:"SAS",sass:"Sass (Sass)",scss:"Sass (Scss)",sql:"SQL",soy:"Soy (Closure Template)",tap:"TAP",toml:"TOML",tt2:"Template Toolkit 2",ts:"TypeScript",vbnet:"VB.Net",vhdl:"VHDL",vim:"vim","visual-basic":"Visual Basic",vb:"Visual Basic",wasm:"WebAssembly",wiki:"Wiki markup",xeoracube:"XeoraCube",xojo:"Xojo (REALbasic)",xquery:"XQuery",yaml:"YAML"};Prism.plugins.toolbar.registerButton("show-language",function(e){function s(a){return a?(a.substring(0,1).toUpperCase()+a.substring(1)).replace(/s(?=cript)/,"S"):a}var t=e.element.parentNode;if(t&&/pre/i.test(t.nodeName)){var r=t.getAttribute("data-language")||a[e.language]||s(e.language);if(r){var o=document.createElement("span");return o.textContent=r,o}}})}}(); \ No newline at end of file +!function(){if("undefined"!=typeof self&&self.Prism&&self.document){if(!Prism.plugins.toolbar)return console.warn("Show Languages plugin loaded before Toolbar plugin."),void 0;var a={html:"HTML",xml:"XML",svg:"SVG",mathml:"MathML",css:"CSS",clike:"C-like",js:"JavaScript",abap:"ABAP",abnf:"Augmented Backus–Naur form",apacheconf:"Apache Configuration",apl:"APL",arff:"ARFF",asciidoc:"AsciiDoc",adoc:"AsciiDoc",asm6502:"6502 Assembly",aspnet:"ASP.NET (C#)",autohotkey:"AutoHotkey",autoit:"AutoIt",shell:"Bash",basic:"BASIC",bnf:"Backus–Naur form",rbfn:"Routing Backus–Naur form",csharp:"C#",dotnet:"C#",cpp:"C++",cil:"CIL",csp:"Content-Security-Policy","css-extras":"CSS Extras",django:"Django/Jinja2",jinja2:"Django/Jinja2",dockerfile:"Docker",ebnf:"Extended Backus–Naur form",erb:"ERB",fsharp:"F#",gcode:"G-code",gedcom:"GEDCOM",glsl:"GLSL",gml:"GameMaker Language",gamemakerlanguage:"GameMaker Language",graphql:"GraphQL",hcl:"HCL",http:"HTTP",hpkp:"HTTP Public-Key-Pins",hsts:"HTTP Strict-Transport-Security",ichigojam:"IchigoJam",inform7:"Inform 7",javastacktrace:"Java stack trace","js-extras":"JS Extras",json:"JSON",jsonp:"JSONP",json5:"JSON5",latex:"LaTeX",emacs:"Lisp",elisp:"Lisp","emacs-lisp":"Lisp",lolcode:"LOLCODE","markup-templating":"Markup templating",matlab:"MATLAB",mel:"MEL",n1ql:"N1QL",n4js:"N4JS",n4jsd:"N4JS","nand2tetris-hdl":"Nand To Tetris HDL",nasm:"NASM",nginx:"nginx",nsis:"NSIS",objectivec:"Objective-C",ocaml:"OCaml",opencl:"OpenCL",parigp:"PARI/GP",objectpascal:"Object Pascal",php:"PHP","php-extras":"PHP Extras",plsql:"PL/SQL",powershell:"PowerShell",properties:".properties",protobuf:"Protocol Buffers",q:"Q (kdb+ database)",jsx:"React JSX",tsx:"React TSX",renpy:"Ren'py",rest:"reST (reStructuredText)",sas:"SAS",sass:"Sass (Sass)",scss:"Sass (Scss)",sql:"SQL",soy:"Soy (Closure Template)",tap:"TAP",toml:"TOML",tt2:"Template Toolkit 2",ts:"TypeScript",vbnet:"VB.Net",vhdl:"VHDL",vim:"vim","visual-basic":"Visual Basic",vb:"Visual Basic",wasm:"WebAssembly",wiki:"Wiki markup",xeoracube:"XeoraCube",xojo:"Xojo (REALbasic)",xquery:"XQuery",yaml:"YAML"};Prism.plugins.toolbar.registerButton("show-language",function(e){function s(a){return a?(a.substring(0,1).toUpperCase()+a.substring(1)).replace(/s(?=cript)/,"S"):a}var t=e.element.parentNode;if(t&&/pre/i.test(t.nodeName)){var r=t.getAttribute("data-language")||a[e.language]||s(e.language);if(r){var o=document.createElement("span");return o.textContent=r,o}}})}}(); \ No newline at end of file diff --git a/tests/languages/javascript!+js-extras/arrow_feature.test b/tests/languages/javascript!+js-extras/arrow_feature.test new file mode 100644 index 0000000000..39d1d7acf1 --- /dev/null +++ b/tests/languages/javascript!+js-extras/arrow_feature.test @@ -0,0 +1,22 @@ +() => {}; +a => a; + +---------------------------------------------------- + +[ + ["punctuation", "("], + ["punctuation", ")"], + ["arrow", "=>"], + ["punctuation", "{"], + ["punctuation", "}"], + ["punctuation", ";"], + + ["parameter", ["a"]], + ["arrow", "=>"], + " a", + ["punctuation", ";"] +] + +---------------------------------------------------- + +Checks for function arrows. diff --git a/tests/languages/javascript!+js-extras/console_feature.test b/tests/languages/javascript!+js-extras/console_feature.test new file mode 100644 index 0000000000..4c2e6f5419 --- /dev/null +++ b/tests/languages/javascript!+js-extras/console_feature.test @@ -0,0 +1,12 @@ +console. + +---------------------------------------------------- + +[ + ["console", "console"], + ["punctuation", "."] +] + +---------------------------------------------------- + +Checks for the console variable being used. diff --git a/tests/languages/javascript!+js-extras/dom_feature.test b/tests/languages/javascript!+js-extras/dom_feature.test new file mode 100644 index 0000000000..ca2ad5bb38 --- /dev/null +++ b/tests/languages/javascript!+js-extras/dom_feature.test @@ -0,0 +1,23 @@ +document +location +navigator +performance +localStorage +sessionStorage +window + +---------------------------------------------------- + +[ + ["dom", "document"], + ["dom", "location"], + ["dom", "navigator"], + ["dom", "performance"], + ["dom", "localStorage"], + ["dom", "sessionStorage"], + ["dom", "window"] +] + +---------------------------------------------------- + +Checks for the important DOM variables being used. diff --git a/tests/languages/javascript!+js-extras/known-class-name_feature.test b/tests/languages/javascript!+js-extras/known-class-name_feature.test new file mode 100644 index 0000000000..bb3791a408 --- /dev/null +++ b/tests/languages/javascript!+js-extras/known-class-name_feature.test @@ -0,0 +1,89 @@ +Int8Array +Int16Array +Int32Array +Uint8Array +Uint16Array +Uint32Array +Uint8ClampedArray +Float32Array +Float64Array +Array +ArrayBuffer +BigInt +Boolean +DataView +Date +Error +Function +Intl +JSON +Math +Number +Object +Promise +Proxy +Reflect +RegExp +String +Symbol +Set +Map +WeakSet +WeakMap +WebAssembly + +InternalError +RangeError +ReferenceError +SyntaxError +TypeError +URIError + +---------------------------------------------------- + +[ + ["known-class-name", "Int8Array"], + ["known-class-name", "Int16Array"], + ["known-class-name", "Int32Array"], + ["known-class-name", "Uint8Array"], + ["known-class-name", "Uint16Array"], + ["known-class-name", "Uint32Array"], + ["known-class-name", "Uint8ClampedArray"], + ["known-class-name", "Float32Array"], + ["known-class-name", "Float64Array"], + ["known-class-name", "Array"], + ["known-class-name", "ArrayBuffer"], + ["known-class-name", "BigInt"], + ["known-class-name", "Boolean"], + ["known-class-name", "DataView"], + ["known-class-name", "Date"], + ["known-class-name", "Error"], + ["known-class-name", "Function"], + ["known-class-name", "Intl"], + ["known-class-name", "JSON"], + ["known-class-name", "Math"], + ["known-class-name", "Number"], + ["known-class-name", "Object"], + ["known-class-name", "Promise"], + ["known-class-name", "Proxy"], + ["known-class-name", "Reflect"], + ["known-class-name", "RegExp"], + ["known-class-name", "String"], + ["known-class-name", "Symbol"], + ["known-class-name", "Set"], + ["known-class-name", "Map"], + ["known-class-name", "WeakSet"], + ["known-class-name", "WeakMap"], + ["known-class-name", "WebAssembly"], + + ["known-class-name", "InternalError"], + ["known-class-name", "RangeError"], + ["known-class-name", "ReferenceError"], + ["known-class-name", "SyntaxError"], + ["known-class-name", "TypeError"], + ["known-class-name", "URIError"] +] + +---------------------------------------------------- + +Checks for known class names. diff --git a/tests/languages/javascript!+js-extras/maybe-class-name_feature.test b/tests/languages/javascript!+js-extras/maybe-class-name_feature.test new file mode 100644 index 0000000000..061164b981 --- /dev/null +++ b/tests/languages/javascript!+js-extras/maybe-class-name_feature.test @@ -0,0 +1,63 @@ +Foo.Bar; +Foo.Bar(); +Baz.foo(); +var Foo = function() {}; +foo.Bar = function() {}; + +---------------------------------------------------- + +[ + ["maybe-class-name", "Foo"], + ["punctuation", "."], + ["property-access", [ + ["maybe-class-name", "Bar"] + ]], + ["punctuation", ";"], + + ["maybe-class-name", "Foo"], + ["punctuation", "."], + ["method", [ + ["maybe-class-name", "Bar"] + ]], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", ";"], + + ["maybe-class-name", "Baz"], + ["punctuation", "."], + ["method", [ + "foo" + ]], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", ";"], + + ["keyword", "var"], + ["function-variable", [ + ["maybe-class-name", "Foo"] + ]], + ["operator", "="], + ["keyword", "function"], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", "{"], + ["punctuation", "}"], + ["punctuation", ";"], + + "\nfoo", + ["punctuation", "."], + ["method-variable", [ + ["maybe-class-name", "Bar"] + ]], + ["operator", "="], + ["keyword", "function"], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", "{"], + ["punctuation", "}"], + ["punctuation", ";"] +] + +---------------------------------------------------- + +Checks for names which may be class names. diff --git a/tests/languages/javascript!+js-extras/method-variable_feature.test b/tests/languages/javascript!+js-extras/method-variable_feature.test new file mode 100644 index 0000000000..1d075b4de9 --- /dev/null +++ b/tests/languages/javascript!+js-extras/method-variable_feature.test @@ -0,0 +1,37 @@ +foo.bar = function() {}; +foo.bar = async () => {}; + +---------------------------------------------------- + +[ + "foo", + ["punctuation", "."], + ["method-variable", [ + "bar" + ]], + ["operator", "="], + ["keyword", "function"], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", "{"], + ["punctuation", "}"], + ["punctuation", ";"], + + "\nfoo", + ["punctuation", "."], + ["method-variable", [ + "bar" + ]], + ["operator", "="], + ["keyword", "async"], + ["punctuation", "("], + ["punctuation", ")"], + ["arrow", "=>"], + ["punctuation", "{"], + ["punctuation", "}"], + ["punctuation", ";"] +] + +---------------------------------------------------- + +Checks for method variables. diff --git a/tests/languages/javascript!+js-extras/method_feature.test b/tests/languages/javascript!+js-extras/method_feature.test new file mode 100644 index 0000000000..1d0b4db4ef --- /dev/null +++ b/tests/languages/javascript!+js-extras/method_feature.test @@ -0,0 +1,32 @@ +foo.bar(); +foo.bar.call(); + +---------------------------------------------------- + +[ + "foo", + ["punctuation", "."], + ["method", [ + "bar" + ]], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", ";"], + + "\nfoo", + ["punctuation", "."], + ["method", [ + "bar" + ]], + ["punctuation", "."], + ["method", [ + "call" + ]], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", ";"] +] + +---------------------------------------------------- + +Checks for methods. diff --git a/tests/languages/javascript!+js-extras/property-access_feature.test b/tests/languages/javascript!+js-extras/property-access_feature.test new file mode 100644 index 0000000000..c5171e1f86 --- /dev/null +++ b/tests/languages/javascript!+js-extras/property-access_feature.test @@ -0,0 +1,22 @@ +foo.bar.baz = 0; + +---------------------------------------------------- + +[ + "foo", + ["punctuation", "."], + ["property-access", [ + "bar" + ]], + ["punctuation", "."], + ["property-access", [ + "baz" + ]], + ["operator", "="], + ["number", "0"], + ["punctuation", ";"] +] + +---------------------------------------------------- + +Checks for property access. diff --git a/tests/languages/javascript!+js-extras/spread_feature.test b/tests/languages/javascript!+js-extras/spread_feature.test new file mode 100644 index 0000000000..ea89eff088 --- /dev/null +++ b/tests/languages/javascript!+js-extras/spread_feature.test @@ -0,0 +1,11 @@ +...foo + +---------------------------------------------------- + +[ + ["spread", "..."], "foo" +] + +---------------------------------------------------- + +Checks for spread operators. From 493d19ef48adfbefffadf81c665e7d598bed3ea5 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Thu, 28 Feb 2019 21:01:31 +0100 Subject: [PATCH 0182/1100] Added doc comment highlighting (#1541) This adds support for JavaDoc, JSDoc, TSDoc, and PHPDoc. --- components.js | 2 +- components.json | 39 +++- components/prism-javadoc.js | 54 ++++++ components/prism-javadoc.min.js | 1 + components/prism-javadoclike.js | 86 +++++++++ components/prism-javadoclike.min.js | 1 + components/prism-jsdoc.js | 73 +++++++ components/prism-jsdoc.min.js | 1 + components/prism-phpdoc.js | 27 +++ components/prism-phpdoc.min.js | 1 + plugins/autoloader/prism-autoloader.js | 2 +- plugins/autoloader/prism-autoloader.min.js | 2 +- plugins/show-language/prism-show-language.js | 2 +- .../show-language/prism-show-language.min.js | 2 +- .../javadoc+java/javadoc_inclusion.test | 11 ++ .../languages/javadoc/class-name_feature.test | 40 ++++ tests/languages/javadoc/code_feature.test | 135 +++++++++++++ tests/languages/javadoc/keyword_feature.test | 69 +++++++ .../languages/javadoc/parameter_feature.test | 20 ++ tests/languages/javadoc/tag_feature.test | 117 +++++++++++ .../jsdoc+javascript/jsdoc_inclusion.test | 11 ++ tests/languages/jsdoc/class-name_feature.test | 75 ++++++++ tests/languages/jsdoc/example_feature.test | 35 ++++ tests/languages/jsdoc/keyword_feature.test | 182 ++++++++++++++++++ tests/languages/jsdoc/parameter_feature.test | 86 +++++++++ .../phpdoc+php/phpdoc_inclusion.test | 11 ++ .../languages/phpdoc/class-name_feature.test | 45 +++++ tests/languages/phpdoc/keyword_feature.test | 99 ++++++++++ tests/languages/phpdoc/parameter_feature.test | 23 +++ 29 files changed, 1246 insertions(+), 6 deletions(-) create mode 100644 components/prism-javadoc.js create mode 100644 components/prism-javadoc.min.js create mode 100644 components/prism-javadoclike.js create mode 100644 components/prism-javadoclike.min.js create mode 100644 components/prism-jsdoc.js create mode 100644 components/prism-jsdoc.min.js create mode 100644 components/prism-phpdoc.js create mode 100644 components/prism-phpdoc.min.js create mode 100644 tests/languages/javadoc+java/javadoc_inclusion.test create mode 100644 tests/languages/javadoc/class-name_feature.test create mode 100644 tests/languages/javadoc/code_feature.test create mode 100644 tests/languages/javadoc/keyword_feature.test create mode 100644 tests/languages/javadoc/parameter_feature.test create mode 100644 tests/languages/javadoc/tag_feature.test create mode 100644 tests/languages/jsdoc+javascript/jsdoc_inclusion.test create mode 100644 tests/languages/jsdoc/class-name_feature.test create mode 100644 tests/languages/jsdoc/example_feature.test create mode 100644 tests/languages/jsdoc/keyword_feature.test create mode 100644 tests/languages/jsdoc/parameter_feature.test create mode 100644 tests/languages/phpdoc+php/phpdoc_inclusion.test create mode 100644 tests/languages/phpdoc/class-name_feature.test create mode 100644 tests/languages/phpdoc/keyword_feature.test create mode 100644 tests/languages/phpdoc/parameter_feature.test diff --git a/components.js b/components.js index ce2dbb80f3..e37cfa4eaa 100644 --- a/components.js +++ b/components.js @@ -1,2 +1,2 @@ -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default","peerDependencies":"markup"},"clike":{"title":"C-like","option":"default","overrideExampleHeader":true},"javascript":{"title":"JavaScript","require":"clike","peerDependencies":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"Augmented Backus–Naur form","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","peerDependencies":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"Backus–Naur form","alias":"rbfn","aliasTitles":{"rbfn":"Routing Backus–Naur form"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":"dotnet","owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","owner":"R-osey"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup","peerDependencies":["css","javascript"],"alias":"jinja2","owner":"romanvm"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"Extended Backus–Naur form","owner":"RunDevelopment"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","peerDependencies":["css","coffeescript","erb","javascript","less","markdown","ruby","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"http":{"title":"HTTP","peerDependencies":["javascript","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"js-extras":{"title":"JS Extras","require":"javascript","peerDependencies":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","owner":"CupOfTea696"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","owner":"japborst"},"less":{"title":"Less","require":"css","owner":"Golmote"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"nasm":{"title":"NASM","owner":"rbmj"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"cpp","peerDependencies":["c","cpp"],"overrideExampleHeader":true,"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"php-extras":{"title":"PHP Extras","require":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":"javascript","peerDependencies":["coffeescript","ejs","handlebars","hogan","less","livescript","markdown","mustache","plates","scss","stylus","swig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","peerDependencies":["c","cpp","fortran","ats","dsp"],"owner":"Golmote"},"python":{"title":"Python","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"peerDependencies":"js-extras","owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"ruby":{"title":"Ruby","require":"clike","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sql":{"title":"SQL","owner":"multipetros"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","peerDependencies":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","alias":"ts","owner":"vkbansal"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","owner":"hason"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":"Line Highlight","line-numbers":{"title":"Line Numbers","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","after":["autolinker","data-uri-highlight"]},"autolinker":"Autolinker","wpd":"WebPlatform Docs","custom-class":{"title":"Custom Class","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","noCSS":true},"show-language":{"title":"Show Language","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","owner":"Golmote","noCSS":true},"previewers":{"title":"Previewers","owner":"Golmote"},"autoloader":{"title":"Autoloader","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","owner":"Golmote","after":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","owner":"chriswells0"},"unescaped-markup":"Unescaped Markup","normalize-whitespace":{"title":"Normalize Whitespace","owner":"zeitgeist87","after":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","owner":"mAAdhaTTah","require":"toolbar","noCSS":true}}}; +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default","peerDependencies":"markup"},"clike":{"title":"C-like","option":"default","overrideExampleHeader":true},"javascript":{"title":"JavaScript","require":"clike","peerDependencies":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"Augmented Backus–Naur form","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","peerDependencies":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"Backus–Naur form","alias":"rbfn","aliasTitles":{"rbfn":"Routing Backus–Naur form"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":"dotnet","owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","owner":"R-osey"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup","peerDependencies":["css","javascript"],"alias":"jinja2","owner":"romanvm"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"Extended Backus–Naur form","owner":"RunDevelopment"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","peerDependencies":["css","coffeescript","erb","javascript","less","markdown","ruby","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"http":{"title":"HTTP","peerDependencies":["javascript","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"peerDependencies":["scala"],"owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","peerDependencies":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike"],"peerDependencies":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","peerDependencies":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","owner":"CupOfTea696"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","owner":"japborst"},"less":{"title":"Less","require":"css","owner":"Golmote"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","peerDependencies":["jsdoc"],"alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"nasm":{"title":"NASM","owner":"rbmj"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"cpp","peerDependencies":["c","cpp"],"overrideExampleHeader":true,"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":"javascript","peerDependencies":["coffeescript","ejs","handlebars","hogan","less","livescript","markdown","mustache","plates","scss","stylus","swig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","peerDependencies":["c","cpp","fortran","ats","dsp"],"owner":"Golmote"},"python":{"title":"Python","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"peerDependencies":["jsdoc","js-extras"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"ruby":{"title":"Ruby","require":"clike","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sql":{"title":"SQL","owner":"multipetros"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","peerDependencies":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","alias":"ts","owner":"vkbansal"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","owner":"hason"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":"Line Highlight","line-numbers":{"title":"Line Numbers","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","after":["autolinker","data-uri-highlight"]},"autolinker":"Autolinker","wpd":"WebPlatform Docs","custom-class":{"title":"Custom Class","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","noCSS":true},"show-language":{"title":"Show Language","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","owner":"Golmote","noCSS":true},"previewers":{"title":"Previewers","owner":"Golmote"},"autoloader":{"title":"Autoloader","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","owner":"Golmote","after":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","owner":"chriswells0"},"unescaped-markup":"Unescaped Markup","normalize-whitespace":{"title":"Normalize Whitespace","owner":"zeitgeist87","after":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","owner":"mAAdhaTTah","require":"toolbar","noCSS":true}}}; if (typeof module !== 'undefined' && module.exports) { module.exports = components; } \ No newline at end of file diff --git a/components.json b/components.json index 242ba82b7e..323ad7530c 100644 --- a/components.json +++ b/components.json @@ -403,6 +403,23 @@ "require": "clike", "owner": "sherblot" }, + "javadoc": { + "title": "JavaDoc", + "require": ["markup", "java", "javadoclike"], + "peerDependencies": [ + "scala" + ], + "owner": "RunDevelopment" + }, + "javadoclike": { + "title": "JavaDoc-like", + "peerDependencies": [ + "java", + "javascript", + "php" + ], + "owner": "RunDevelopment" + }, "javastacktrace": { "title": "Java stack trace", "owner": "RunDevelopment" @@ -412,6 +429,15 @@ "require": "clike", "owner": "thesave" }, + "jsdoc": { + "title": "JSDoc", + "require": ["javascript", "javadoclike"], + "peerDependencies": [ + "actionscript", + "coffeescript" + ], + "owner": "RunDevelopment" + }, "js-extras": { "title": "JS Extras", "require": "javascript", @@ -518,6 +544,9 @@ "n4js": { "title": "N4JS", "require": "javascript", + "peerDependencies": [ + "jsdoc" + ], "alias": "n4jsd", "owner": "bsmith-n4" }, @@ -595,6 +624,11 @@ "require": ["clike", "markup-templating"], "owner": "milesj" }, + "phpdoc": { + "title": "PHPDoc", + "require": ["php", "javadoclike"], + "owner": "RunDevelopment" + }, "php-extras": { "title": "PHP Extras", "require": "php", @@ -681,7 +715,10 @@ "jsx": { "title": "React JSX", "require": ["markup", "javascript"], - "peerDependencies": "js-extras", + "peerDependencies": [ + "jsdoc", + "js-extras" + ], "owner": "vkbansal" }, "tsx": { diff --git a/components/prism-javadoc.js b/components/prism-javadoc.js new file mode 100644 index 0000000000..86d0dc1a89 --- /dev/null +++ b/components/prism-javadoc.js @@ -0,0 +1,54 @@ +(function (Prism) { + + var codeLines = { + 'code': { + pattern: /(^(\s*(?:\*\s*)*)).*[^*\s].+$/m, + lookbehind: true, + inside: Prism.languages.java, + alias: 'language-java' + } + }; + + Prism.languages.javadoc = Prism.languages.extend('javadoclike', {}); + Prism.languages.insertBefore('javadoc', 'keyword', { + 'class-name': [ + { + pattern: /(@(?:exception|throws|see|link|linkplain|value)\s+(?:[a-z\d]+\.)*)[A-Z](?:\w*[a-z]\w*)?(?:\.[A-Z](?:\w*[a-z]\w*)?)*/, + lookbehind: true, + inside: { + 'punctuation': /\./ + } + }, + { + // @param the first generic type parameter + pattern: /(@param\s+)<[A-Z]\w*>/, + lookbehind: true, + inside: { + 'punctuation': /[.<>]/ + } + } + ], + 'namespace': { + pattern: /(@(?:exception|throws|see|link|linkplain)\s+)(?:[a-z\d]+\.)+/, + lookbehind: true, + inside: { + 'punctuation': /\./ + } + }, + 'code-section': [ + { + pattern: /(\{@code\s+)(?:[^{}]|\{[^{}]*\})+?(?=\s*\})/, + lookbehind: true, + inside: codeLines + }, + { + pattern: /(<(code|tt)>\s*)[\s\S]+?(?=\s*<\/\2>)/, + lookbehind: true, + inside: codeLines + } + ], + 'tag': Prism.languages.markup.tag, + }); + + Prism.languages.javadoclike.addSupport('java', Prism.languages.javadoc); +}(Prism)); diff --git a/components/prism-javadoc.min.js b/components/prism-javadoc.min.js new file mode 100644 index 0000000000..760867af3f --- /dev/null +++ b/components/prism-javadoc.min.js @@ -0,0 +1 @@ +!function(a){var e={code:{pattern:/(^(\s*(?:\*\s*)*)).*[^*\s].+$/m,lookbehind:!0,inside:a.languages.java,alias:"language-java"}};a.languages.javadoc=a.languages.extend("javadoclike",{}),a.languages.insertBefore("javadoc","keyword",{"class-name":[{pattern:/(@(?:exception|throws|see|link|linkplain|value)\s+(?:[a-z\d]+\.)*)[A-Z](?:\w*[a-z]\w*)?(?:\.[A-Z](?:\w*[a-z]\w*)?)*/,lookbehind:!0,inside:{punctuation:/\./}},{pattern:/(@param\s+)<[A-Z]\w*>/,lookbehind:!0,inside:{punctuation:/[.<>]/}}],namespace:{pattern:/(@(?:exception|throws|see|link|linkplain)\s+)(?:[a-z\d]+\.)+/,lookbehind:!0,inside:{punctuation:/\./}},"code-section":[{pattern:/(\{@code\s+)(?:[^{}]|\{[^{}]*\})+?(?=\s*\})/,lookbehind:!0,inside:e},{pattern:/(<(code|tt)>\s*)[\s\S]+?(?=\s*<\/\2>)/,lookbehind:!0,inside:e}],tag:a.languages.markup.tag}),a.languages.javadoclike.addSupport("java",a.languages.javadoc)}(Prism); \ No newline at end of file diff --git a/components/prism-javadoclike.js b/components/prism-javadoclike.js new file mode 100644 index 0000000000..10dc2e3388 --- /dev/null +++ b/components/prism-javadoclike.js @@ -0,0 +1,86 @@ +(function (Prism) { + + var javaDocLike = Prism.languages.javadoclike = { + 'parameter': { + pattern: /(^\s*(?:\/{3}|\*|\/\*\*)\s*@(?:param|arg|arguments)\s+)\w+/m, + lookbehind: true + }, + 'keyword': { + // keywords are the first word in a line preceded be an `@` or surrounded by curly braces. + // @word, {@word} + pattern: /(^\s*(?:\/{3}|\*|\/\*\*)\s*|\{)@[a-z][a-zA-Z-]+\b/m, + lookbehind: true + }, + 'punctuation': /[{}]/ + }; + + + /** + * Adds doc comment support to the given language and calls a given callback on each doc comment pattern. + * + * @param {string} lang the language add doc comment support to. + * @param {(pattern: {inside: {rest: undefined}}) => void} callback the function called with each doc comment pattern as argument. + */ + function docCommentSupport(lang, callback) { + var tokenName = 'doc-comment'; + + var grammar = Prism.languages[lang]; + if (!grammar) { + return; + } + var token = grammar[tokenName]; + + if (!token) { + // add doc comment: /** */ + var definition = {}; + definition[tokenName] = { + pattern: /(^|[^\\])\/\*\*[^/][\s\S]*?(?:\*\/|$)/, + alias: 'comment' + }; + + grammar = Prism.languages.insertBefore(lang, 'comment', definition); + token = grammar[tokenName]; + } + + if (token instanceof RegExp) { // convert regex to object + token = grammar[tokenName] = { pattern: token }; + } + + if (Prism.util.type(token) === 'Array') { + for (var i = 0, l = token.length; i < l; i++) { + if (token[i] instanceof RegExp) { + token[i] = { pattern: token[i] }; + } + callback(token[i]); + } + } else { + callback(token); + } + } + + /** + * Adds doc-comment support to the given languages for the given documentation language. + * + * @param {string[]|string} languages + * @param {Object} docLanguage + */ + function addSupport(languages, docLanguage) { + if (typeof languages === 'string') { + languages = [languages]; + } + + languages.forEach(function (lang) { + docCommentSupport(lang, function (pattern) { + if (!pattern.inside) { + pattern.inside = {}; + } + pattern.inside.rest = docLanguage; + }); + }); + } + + Object.defineProperty(javaDocLike, 'addSupport', { value: addSupport }); + + javaDocLike.addSupport(['java', 'javascript', 'php'], javaDocLike); + +}(Prism)); diff --git a/components/prism-javadoclike.min.js b/components/prism-javadoclike.min.js new file mode 100644 index 0000000000..f647d912cf --- /dev/null +++ b/components/prism-javadoclike.min.js @@ -0,0 +1 @@ +!function(a){function e(e,n){var t="doc-comment",r=a.languages[e];if(r){var i=r[t];if(!i){var o={};o[t]={pattern:/(^|[^\\])\/\*\*[^\/][\s\S]*?(?:\*\/|$)/,alias:"comment"},r=a.languages.insertBefore(e,"comment",o),i=r[t]}if(i instanceof RegExp&&(i=r[t]={pattern:i}),"Array"===a.util.type(i))for(var s=0,p=i.length;p>s;s++)i[s]instanceof RegExp&&(i[s]={pattern:i[s]}),n(i[s]);else n(i)}}function n(a,n){"string"==typeof a&&(a=[a]),a.forEach(function(a){e(a,function(a){a.inside||(a.inside={}),a.inside.rest=n})})}var t=a.languages.javadoclike={parameter:{pattern:/(^\s*(?:\/{3}|\*|\/\*\*)\s*@(?:param|arg|arguments)\s+)\w+/m,lookbehind:!0},keyword:{pattern:/(^\s*(?:\/{3}|\*|\/\*\*)\s*|\{)@[a-z][a-zA-Z-]+\b/m,lookbehind:!0},punctuation:/[{}]/};Object.defineProperty(t,"addSupport",{value:n}),t.addSupport(["java","javascript","php"],t)}(Prism); \ No newline at end of file diff --git a/components/prism-jsdoc.js b/components/prism-jsdoc.js new file mode 100644 index 0000000000..161f77c699 --- /dev/null +++ b/components/prism-jsdoc.js @@ -0,0 +1,73 @@ +(function (Prism) { + + var javascript = Prism.languages.javascript; + + var type = /{(?:[^{}]|{(?:[^{}]|{[^{}]*})*})+}/.source; + var parameterPrefix = '(@(?:param|arg|argument|property)\\s+(?:' + type + '\\s+)?)'; + + Prism.languages.jsdoc = Prism.languages.extend('javadoclike', { + 'parameter': { + // @param {string} foo - foo bar + pattern: RegExp(parameterPrefix + /[$\w\xA0-\uFFFF.]+(?=\s|$)/.source), + lookbehind: true, + inside: { + 'punctuation': /\./ + } + } + }); + + Prism.languages.insertBefore('jsdoc', 'keyword', { + 'optional-parameter': { + // @param {string} [baz.foo="bar"] foo bar + pattern: RegExp(parameterPrefix + /\[[$\w\xA0-\uFFFF.]+(?:=[^[\]]+)?\](?=\s|$)/.source), + lookbehind: true, + inside: { + 'parameter': { + pattern: /(^\[)[$\w\xA0-\uFFFF\.]+/, + lookbehind: true, + inside: { + 'punctuation': /\./ + } + }, + 'code': { + pattern: /(=)[\s\S]*(?=\]$)/, + lookbehind: true, + inside: javascript, + alias: 'language-javascript' + }, + 'punctuation': /[=[\]]/ + } + }, + 'class-name': [ + { + pattern: RegExp('(@[a-z]+\\s+)' + type), + lookbehind: true, + inside: { + 'punctuation': /[.,:?=<>|{}()[\]]/ + } + }, + { + pattern: /(@(?:augments|extends|class|interface|memberof!?|this)\s+)[A-Z]\w*(?:\.[A-Z]\w*)*/, + lookbehind: true, + inside: { + 'punctuation': /\./ + } + } + ], + 'example': { + pattern: /(@example\s+)[^@]+?(?=\s*(?:\*\s*)?(?:@\w|\*\/))/, + lookbehind: true, + inside: { + 'code': { + pattern: /^(\s*(?:\*\s*)?).+$/m, + lookbehind: true, + inside: javascript, + alias: 'language-javascript' + } + } + } + }); + + Prism.languages.javadoclike.addSupport('javascript', Prism.languages.jsdoc); + +}(Prism)); diff --git a/components/prism-jsdoc.min.js b/components/prism-jsdoc.min.js new file mode 100644 index 0000000000..8418eb0b42 --- /dev/null +++ b/components/prism-jsdoc.min.js @@ -0,0 +1 @@ +!function(a){var e=a.languages.javascript,n="{(?:[^{}]|{(?:[^{}]|{[^{}]*})*})+}",s="(@(?:param|arg|argument|property)\\s+(?:"+n+"\\s+)?)";a.languages.jsdoc=a.languages.extend("javadoclike",{parameter:{pattern:RegExp(s+"[$\\w\\xA0-\\uFFFF.]+(?=\\s|$)"),lookbehind:!0,inside:{punctuation:/\./}}}),a.languages.insertBefore("jsdoc","keyword",{"optional-parameter":{pattern:RegExp(s+"\\[[$\\w\\xA0-\\uFFFF.]+(?:=[^[\\]]+)?\\](?=\\s|$)"),lookbehind:!0,inside:{parameter:{pattern:/(^\[)[$\w\xA0-\uFFFF\.]+/,lookbehind:!0,inside:{punctuation:/\./}},code:{pattern:/(=)[\s\S]*(?=\]$)/,lookbehind:!0,inside:e,alias:"language-javascript"},punctuation:/[=[\]]/}},"class-name":[{pattern:RegExp("(@[a-z]+\\s+)"+n),lookbehind:!0,inside:{punctuation:/[.,:?=<>|{}()[\]]/}},{pattern:/(@(?:augments|extends|class|interface|memberof!?|this)\s+)[A-Z]\w*(?:\.[A-Z]\w*)*/,lookbehind:!0,inside:{punctuation:/\./}}],example:{pattern:/(@example\s+)[^@]+?(?=\s*(?:\*\s*)?(?:@\w|\*\/))/,lookbehind:!0,inside:{code:{pattern:/^(\s*(?:\*\s*)?).+$/m,lookbehind:!0,inside:e,alias:"language-javascript"}}}}),a.languages.javadoclike.addSupport("javascript",a.languages.jsdoc)}(Prism); \ No newline at end of file diff --git a/components/prism-phpdoc.js b/components/prism-phpdoc.js new file mode 100644 index 0000000000..c3913ddb66 --- /dev/null +++ b/components/prism-phpdoc.js @@ -0,0 +1,27 @@ +(function (Prism) { + + var typeExpression = /(?:[a-zA-Z]\w*|[|\\[\]])+/.source; + + Prism.languages.phpdoc = Prism.languages.extend('javadoclike', { + 'parameter': { + pattern: RegExp('(@(?:global|param|property(?:-read|-write)?|var)\\s+(?:' + typeExpression + '\\s+)?)\\$\\w+'), + lookbehind: true + } + }); + + Prism.languages.insertBefore('phpdoc', 'keyword', { + 'class-name': [ + { + pattern: RegExp('(@(?:global|package|param|property(?:-read|-write)?|return|subpackage|throws|var)\\s+)' + typeExpression), + lookbehind: true, + inside: { + 'keyword': /\b(?:callback|resource|boolean|integer|double|object|string|array|false|float|mixed|bool|null|self|true|void|int)\b/, + 'punctuation': /[|\\[\]()]/ + } + } + ], + }); + + Prism.languages.javadoclike.addSupport('php', Prism.languages.phpdoc); + +}(Prism)); diff --git a/components/prism-phpdoc.min.js b/components/prism-phpdoc.min.js new file mode 100644 index 0000000000..99d7d3aa4c --- /dev/null +++ b/components/prism-phpdoc.min.js @@ -0,0 +1 @@ +!function(a){var e="(?:[a-zA-Z]\\w*|[|\\\\[\\]])+";a.languages.phpdoc=a.languages.extend("javadoclike",{parameter:{pattern:RegExp("(@(?:global|param|property(?:-read|-write)?|var)\\s+(?:"+e+"\\s+)?)\\$\\w+"),lookbehind:!0}}),a.languages.insertBefore("phpdoc","keyword",{"class-name":[{pattern:RegExp("(@(?:global|package|param|property(?:-read|-write)?|return|subpackage|throws|var)\\s+)"+e),lookbehind:!0,inside:{keyword:/\b(?:callback|resource|boolean|integer|double|object|string|array|false|float|mixed|bool|null|self|true|void|int)\b/,punctuation:/[|\\[\]()]/}}]}),a.languages.javadoclike.addSupport("php",a.languages.phpdoc)}(Prism); \ No newline at end of file diff --git a/plugins/autoloader/prism-autoloader.js b/plugins/autoloader/prism-autoloader.js index e8a65dd4b9..400ad858c0 100644 --- a/plugins/autoloader/prism-autoloader.js +++ b/plugins/autoloader/prism-autoloader.js @@ -4,7 +4,7 @@ } // The dependencies map is built automatically with gulp - var lang_dependencies = /*languages_placeholder[*/{"javascript":"clike","actionscript":"javascript","arduino":"cpp","aspnet":["markup","csharp"],"bison":"c","c":"clike","csharp":"clike","cpp":"c","coffeescript":"javascript","crystal":"ruby","css-extras":"css","d":"clike","dart":"clike","django":"markup","erb":["ruby","markup-templating"],"fsharp":"clike","flow":"javascript","glsl":"clike","gml":"clike","go":"clike","groovy":"clike","haml":"ruby","handlebars":"markup-templating","haxe":"clike","java":"clike","jolie":"clike","js-extras":"javascript","jsonp":"json","json5":"json","kotlin":"clike","less":"css","markdown":"markup","markup-templating":"markup","n4js":"javascript","nginx":"clike","objectivec":"c","opencl":"cpp","parser":"markup","php":["clike","markup-templating"],"php-extras":"php","plsql":"sql","processing":"clike","protobuf":"clike","pug":"javascript","qore":"clike","jsx":["markup","javascript"],"tsx":["jsx","typescript"],"reason":"clike","ruby":"clike","sass":"css","scss":"css","scala":"java","smarty":"markup-templating","soy":"markup-templating","swift":"clike","tap":"yaml","textile":"markup","tt2":["clike","markup-templating"],"twig":"markup","typescript":"javascript","vala":"clike","vbnet":"basic","velocity":"markup","wiki":"markup","xeora":"markup","xquery":"markup"}/*]*/; + var lang_dependencies = /*languages_placeholder[*/{"javascript":"clike","actionscript":"javascript","arduino":"cpp","aspnet":["markup","csharp"],"bison":"c","c":"clike","csharp":"clike","cpp":"c","coffeescript":"javascript","crystal":"ruby","css-extras":"css","d":"clike","dart":"clike","django":"markup","erb":["ruby","markup-templating"],"fsharp":"clike","flow":"javascript","glsl":"clike","gml":"clike","go":"clike","groovy":"clike","haml":"ruby","handlebars":"markup-templating","haxe":"clike","java":"clike","javadoc":["markup","java","javadoclike"],"jolie":"clike","jsdoc":["javascript","javadoclike"],"js-extras":"javascript","jsonp":"json","json5":"json","kotlin":"clike","less":"css","markdown":"markup","markup-templating":"markup","n4js":"javascript","nginx":"clike","objectivec":"c","opencl":"cpp","parser":"markup","php":["clike","markup-templating"],"phpdoc":["php","javadoclike"],"php-extras":"php","plsql":"sql","processing":"clike","protobuf":"clike","pug":"javascript","qore":"clike","jsx":["markup","javascript"],"tsx":["jsx","typescript"],"reason":"clike","ruby":"clike","sass":"css","scss":"css","scala":"java","smarty":"markup-templating","soy":"markup-templating","swift":"clike","tap":"yaml","textile":"markup","tt2":["clike","markup-templating"],"twig":"markup","typescript":"javascript","vala":"clike","vbnet":"basic","velocity":"markup","wiki":"markup","xeora":"markup","xquery":"markup"}/*]*/; var lang_data = {}; diff --git a/plugins/autoloader/prism-autoloader.min.js b/plugins/autoloader/prism-autoloader.min.js index 1ad61675d7..c92eef223d 100644 --- a/plugins/autoloader/prism-autoloader.min.js +++ b/plugins/autoloader/prism-autoloader.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof self&&self.Prism&&self.document&&document.createElement){var e={javascript:"clike",actionscript:"javascript",arduino:"cpp",aspnet:["markup","csharp"],bison:"c",c:"clike",csharp:"clike",cpp:"c",coffeescript:"javascript",crystal:"ruby","css-extras":"css",d:"clike",dart:"clike",django:"markup",erb:["ruby","markup-templating"],fsharp:"clike",flow:"javascript",glsl:"clike",gml:"clike",go:"clike",groovy:"clike",haml:"ruby",handlebars:"markup-templating",haxe:"clike",java:"clike",jolie:"clike","js-extras":"javascript",jsonp:"json",json5:"json",kotlin:"clike",less:"css",markdown:"markup","markup-templating":"markup",n4js:"javascript",nginx:"clike",objectivec:"c",opencl:"cpp",parser:"markup",php:["clike","markup-templating"],"php-extras":"php",plsql:"sql",processing:"clike",protobuf:"clike",pug:"javascript",qore:"clike",jsx:["markup","javascript"],tsx:["jsx","typescript"],reason:"clike",ruby:"clike",sass:"css",scss:"css",scala:"java",smarty:"markup-templating",soy:"markup-templating",swift:"clike",tap:"yaml",textile:"markup",tt2:["clike","markup-templating"],twig:"markup",typescript:"javascript",vala:"clike",vbnet:"basic",velocity:"markup",wiki:"markup",xeora:"markup",xquery:"markup"},a={},c="none",t=document.getElementsByTagName("script");t=t[t.length-1];var r="components/";if(t.hasAttribute("data-autoloader-path")){var s=t.getAttribute("data-autoloader-path").trim();s.length>0&&!/^[a-z]+:\/\//i.test(t.src)&&(r=s.replace(/\/?$/,"/"))}else/[\w-]+\.js$/.test(t.src)&&(r=t.src.replace(/[\w-]+\.js$/,"components/"));var n=Prism.plugins.autoloader={languages_path:r,use_minified:!0},i=function(e,a,c){var t=document.createElement("script");t.src=e,t.async=!0,t.onload=function(){document.body.removeChild(t),a&&a()},t.onerror=function(){document.body.removeChild(t),c&&c()},document.body.appendChild(t)},l=function(e){return n.languages_path+"prism-"+e+(n.use_minified?".min":"")+".js"},o=function(e,c){var t=a[e];t||(t=a[e]={});var r=c.getAttribute("data-dependencies");!r&&c.parentNode&&"pre"===c.parentNode.tagName.toLowerCase()&&(r=c.parentNode.getAttribute("data-dependencies")),r=r?r.split(/\s*,\s*/g):[],p(r,function(){u(e,function(){Prism.highlightElement(c)})})},p=function(e,a,c){"string"==typeof e&&(e=[e]);var t=0,r=e.length,s=function(){r>t?u(e[t],function(){t++,s()},function(){c&&c(e[t])}):t===r&&a&&a(e)};s()},u=function(c,t,r){var s=function(){var e=!1;c.indexOf("!")>=0&&(e=!0,c=c.replace("!",""));var s=a[c];if(s||(s=a[c]={}),t&&(s.success_callbacks||(s.success_callbacks=[]),s.success_callbacks.push(t)),r&&(s.error_callbacks||(s.error_callbacks=[]),s.error_callbacks.push(r)),!e&&Prism.languages[c])m(c);else if(!e&&s.error)k(c);else if(e||!s.loading){s.loading=!0;var n=l(c);i(n,function(){s.loading=!1,m(c)},function(){s.loading=!1,s.error=!0,k(c)})}},n=e[c];n&&n.length?p(n,s):s()},m=function(e){a[e]&&a[e].success_callbacks&&a[e].success_callbacks.length&&a[e].success_callbacks.forEach(function(a){a(e)})},k=function(e){a[e]&&a[e].error_callbacks&&a[e].error_callbacks.length&&a[e].error_callbacks.forEach(function(a){a(e)})};Prism.hooks.add("complete",function(e){e.element&&e.language&&!e.grammar&&e.language!==c&&o(e.language,e.element)})}}(); \ No newline at end of file +!function(){if("undefined"!=typeof self&&self.Prism&&self.document&&document.createElement){var a={javascript:"clike",actionscript:"javascript",arduino:"cpp",aspnet:["markup","csharp"],bison:"c",c:"clike",csharp:"clike",cpp:"c",coffeescript:"javascript",crystal:"ruby","css-extras":"css",d:"clike",dart:"clike",django:"markup",erb:["ruby","markup-templating"],fsharp:"clike",flow:"javascript",glsl:"clike",gml:"clike",go:"clike",groovy:"clike",haml:"ruby",handlebars:"markup-templating",haxe:"clike",java:"clike",javadoc:["markup","java","javadoclike"],jolie:"clike",jsdoc:["javascript","javadoclike"],"js-extras":"javascript",jsonp:"json",json5:"json",kotlin:"clike",less:"css",markdown:"markup","markup-templating":"markup",n4js:"javascript",nginx:"clike",objectivec:"c",opencl:"cpp",parser:"markup",php:["clike","markup-templating"],phpdoc:["php","javadoclike"],"php-extras":"php",plsql:"sql",processing:"clike",protobuf:"clike",pug:"javascript",qore:"clike",jsx:["markup","javascript"],tsx:["jsx","typescript"],reason:"clike",ruby:"clike",sass:"css",scss:"css",scala:"java",smarty:"markup-templating",soy:"markup-templating",swift:"clike",tap:"yaml",textile:"markup",tt2:["clike","markup-templating"],twig:"markup",typescript:"javascript",vala:"clike",vbnet:"basic",velocity:"markup",wiki:"markup",xeora:"markup",xquery:"markup"},e={},c="none",t=document.getElementsByTagName("script");t=t[t.length-1];var r="components/";if(t.hasAttribute("data-autoloader-path")){var s=t.getAttribute("data-autoloader-path").trim();s.length>0&&!/^[a-z]+:\/\//i.test(t.src)&&(r=s.replace(/\/?$/,"/"))}else/[\w-]+\.js$/.test(t.src)&&(r=t.src.replace(/[\w-]+\.js$/,"components/"));var i=Prism.plugins.autoloader={languages_path:r,use_minified:!0},n=function(a,e,c){var t=document.createElement("script");t.src=a,t.async=!0,t.onload=function(){document.body.removeChild(t),e&&e()},t.onerror=function(){document.body.removeChild(t),c&&c()},document.body.appendChild(t)},l=function(a){return i.languages_path+"prism-"+a+(i.use_minified?".min":"")+".js"},o=function(a,c){var t=e[a];t||(t=e[a]={});var r=c.getAttribute("data-dependencies");!r&&c.parentNode&&"pre"===c.parentNode.tagName.toLowerCase()&&(r=c.parentNode.getAttribute("data-dependencies")),r=r?r.split(/\s*,\s*/g):[],p(r,function(){u(a,function(){Prism.highlightElement(c)})})},p=function(a,e,c){"string"==typeof a&&(a=[a]);var t=0,r=a.length,s=function(){r>t?u(a[t],function(){t++,s()},function(){c&&c(a[t])}):t===r&&e&&e(a)};s()},u=function(c,t,r){var s=function(){var a=!1;c.indexOf("!")>=0&&(a=!0,c=c.replace("!",""));var s=e[c];if(s||(s=e[c]={}),t&&(s.success_callbacks||(s.success_callbacks=[]),s.success_callbacks.push(t)),r&&(s.error_callbacks||(s.error_callbacks=[]),s.error_callbacks.push(r)),!a&&Prism.languages[c])m(c);else if(!a&&s.error)k(c);else if(a||!s.loading){s.loading=!0;var i=l(c);n(i,function(){s.loading=!1,m(c)},function(){s.loading=!1,s.error=!0,k(c)})}},i=a[c];i&&i.length?p(i,s):s()},m=function(a){e[a]&&e[a].success_callbacks&&e[a].success_callbacks.length&&e[a].success_callbacks.forEach(function(e){e(a)})},k=function(a){e[a]&&e[a].error_callbacks&&e[a].error_callbacks.length&&e[a].error_callbacks.forEach(function(e){e(a)})};Prism.hooks.add("complete",function(a){a.element&&a.language&&!a.grammar&&a.language!==c&&o(a.language,a.element)})}}(); \ No newline at end of file diff --git a/plugins/show-language/prism-show-language.js b/plugins/show-language/prism-show-language.js index 7eded07f08..9f3125e10f 100644 --- a/plugins/show-language/prism-show-language.js +++ b/plugins/show-language/prism-show-language.js @@ -11,7 +11,7 @@ if (!Prism.plugins.toolbar) { } // The languages map is built automatically with gulp -var Languages = /*languages_placeholder[*/{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","css":"CSS","clike":"C-like","js":"JavaScript","abap":"ABAP","abnf":"Augmented Backus–Naur form","apacheconf":"Apache Configuration","apl":"APL","arff":"ARFF","asciidoc":"AsciiDoc","adoc":"AsciiDoc","asm6502":"6502 Assembly","aspnet":"ASP.NET (C#)","autohotkey":"AutoHotkey","autoit":"AutoIt","shell":"Bash","basic":"BASIC","bnf":"Backus–Naur form","rbfn":"Routing Backus–Naur form","csharp":"C#","dotnet":"C#","cpp":"C++","cil":"CIL","csp":"Content-Security-Policy","css-extras":"CSS Extras","django":"Django/Jinja2","jinja2":"Django/Jinja2","dockerfile":"Docker","ebnf":"Extended Backus–Naur form","erb":"ERB","fsharp":"F#","gcode":"G-code","gedcom":"GEDCOM","glsl":"GLSL","gml":"GameMaker Language","gamemakerlanguage":"GameMaker Language","graphql":"GraphQL","hcl":"HCL","http":"HTTP","hpkp":"HTTP Public-Key-Pins","hsts":"HTTP Strict-Transport-Security","ichigojam":"IchigoJam","inform7":"Inform 7","javastacktrace":"Java stack trace","js-extras":"JS Extras","json":"JSON","jsonp":"JSONP","json5":"JSON5","latex":"LaTeX","emacs":"Lisp","elisp":"Lisp","emacs-lisp":"Lisp","lolcode":"LOLCODE","markup-templating":"Markup templating","matlab":"MATLAB","mel":"MEL","n1ql":"N1QL","n4js":"N4JS","n4jsd":"N4JS","nand2tetris-hdl":"Nand To Tetris HDL","nasm":"NASM","nginx":"nginx","nsis":"NSIS","objectivec":"Objective-C","ocaml":"OCaml","opencl":"OpenCL","parigp":"PARI/GP","objectpascal":"Object Pascal","php":"PHP","php-extras":"PHP Extras","plsql":"PL/SQL","powershell":"PowerShell","properties":".properties","protobuf":"Protocol Buffers","q":"Q (kdb+ database)","jsx":"React JSX","tsx":"React TSX","renpy":"Ren'py","rest":"reST (reStructuredText)","sas":"SAS","sass":"Sass (Sass)","scss":"Sass (Scss)","sql":"SQL","soy":"Soy (Closure Template)","tap":"TAP","toml":"TOML","tt2":"Template Toolkit 2","ts":"TypeScript","vbnet":"VB.Net","vhdl":"VHDL","vim":"vim","visual-basic":"Visual Basic","vb":"Visual Basic","wasm":"WebAssembly","wiki":"Wiki markup","xeoracube":"XeoraCube","xojo":"Xojo (REALbasic)","xquery":"XQuery","yaml":"YAML"}/*]*/; +var Languages = /*languages_placeholder[*/{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","css":"CSS","clike":"C-like","js":"JavaScript","abap":"ABAP","abnf":"Augmented Backus–Naur form","apacheconf":"Apache Configuration","apl":"APL","arff":"ARFF","asciidoc":"AsciiDoc","adoc":"AsciiDoc","asm6502":"6502 Assembly","aspnet":"ASP.NET (C#)","autohotkey":"AutoHotkey","autoit":"AutoIt","shell":"Bash","basic":"BASIC","bnf":"Backus–Naur form","rbfn":"Routing Backus–Naur form","csharp":"C#","dotnet":"C#","cpp":"C++","cil":"CIL","csp":"Content-Security-Policy","css-extras":"CSS Extras","django":"Django/Jinja2","jinja2":"Django/Jinja2","dockerfile":"Docker","ebnf":"Extended Backus–Naur form","erb":"ERB","fsharp":"F#","gcode":"G-code","gedcom":"GEDCOM","glsl":"GLSL","gml":"GameMaker Language","gamemakerlanguage":"GameMaker Language","graphql":"GraphQL","hcl":"HCL","http":"HTTP","hpkp":"HTTP Public-Key-Pins","hsts":"HTTP Strict-Transport-Security","ichigojam":"IchigoJam","inform7":"Inform 7","javadoc":"JavaDoc","javadoclike":"JavaDoc-like","javastacktrace":"Java stack trace","jsdoc":"JSDoc","js-extras":"JS Extras","json":"JSON","jsonp":"JSONP","json5":"JSON5","latex":"LaTeX","emacs":"Lisp","elisp":"Lisp","emacs-lisp":"Lisp","lolcode":"LOLCODE","markup-templating":"Markup templating","matlab":"MATLAB","mel":"MEL","n1ql":"N1QL","n4js":"N4JS","n4jsd":"N4JS","nand2tetris-hdl":"Nand To Tetris HDL","nasm":"NASM","nginx":"nginx","nsis":"NSIS","objectivec":"Objective-C","ocaml":"OCaml","opencl":"OpenCL","parigp":"PARI/GP","objectpascal":"Object Pascal","php":"PHP","phpdoc":"PHPDoc","php-extras":"PHP Extras","plsql":"PL/SQL","powershell":"PowerShell","properties":".properties","protobuf":"Protocol Buffers","q":"Q (kdb+ database)","jsx":"React JSX","tsx":"React TSX","renpy":"Ren'py","rest":"reST (reStructuredText)","sas":"SAS","sass":"Sass (Sass)","scss":"Sass (Scss)","sql":"SQL","soy":"Soy (Closure Template)","tap":"TAP","toml":"TOML","tt2":"Template Toolkit 2","ts":"TypeScript","vbnet":"VB.Net","vhdl":"VHDL","vim":"vim","visual-basic":"Visual Basic","vb":"Visual Basic","wasm":"WebAssembly","wiki":"Wiki markup","xeoracube":"XeoraCube","xojo":"Xojo (REALbasic)","xquery":"XQuery","yaml":"YAML"}/*]*/; Prism.plugins.toolbar.registerButton('show-language', function(env) { var pre = env.element.parentNode; diff --git a/plugins/show-language/prism-show-language.min.js b/plugins/show-language/prism-show-language.min.js index 8c5a39f55d..119152f151 100644 --- a/plugins/show-language/prism-show-language.min.js +++ b/plugins/show-language/prism-show-language.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof self&&self.Prism&&self.document){if(!Prism.plugins.toolbar)return console.warn("Show Languages plugin loaded before Toolbar plugin."),void 0;var a={html:"HTML",xml:"XML",svg:"SVG",mathml:"MathML",css:"CSS",clike:"C-like",js:"JavaScript",abap:"ABAP",abnf:"Augmented Backus–Naur form",apacheconf:"Apache Configuration",apl:"APL",arff:"ARFF",asciidoc:"AsciiDoc",adoc:"AsciiDoc",asm6502:"6502 Assembly",aspnet:"ASP.NET (C#)",autohotkey:"AutoHotkey",autoit:"AutoIt",shell:"Bash",basic:"BASIC",bnf:"Backus–Naur form",rbfn:"Routing Backus–Naur form",csharp:"C#",dotnet:"C#",cpp:"C++",cil:"CIL",csp:"Content-Security-Policy","css-extras":"CSS Extras",django:"Django/Jinja2",jinja2:"Django/Jinja2",dockerfile:"Docker",ebnf:"Extended Backus–Naur form",erb:"ERB",fsharp:"F#",gcode:"G-code",gedcom:"GEDCOM",glsl:"GLSL",gml:"GameMaker Language",gamemakerlanguage:"GameMaker Language",graphql:"GraphQL",hcl:"HCL",http:"HTTP",hpkp:"HTTP Public-Key-Pins",hsts:"HTTP Strict-Transport-Security",ichigojam:"IchigoJam",inform7:"Inform 7",javastacktrace:"Java stack trace","js-extras":"JS Extras",json:"JSON",jsonp:"JSONP",json5:"JSON5",latex:"LaTeX",emacs:"Lisp",elisp:"Lisp","emacs-lisp":"Lisp",lolcode:"LOLCODE","markup-templating":"Markup templating",matlab:"MATLAB",mel:"MEL",n1ql:"N1QL",n4js:"N4JS",n4jsd:"N4JS","nand2tetris-hdl":"Nand To Tetris HDL",nasm:"NASM",nginx:"nginx",nsis:"NSIS",objectivec:"Objective-C",ocaml:"OCaml",opencl:"OpenCL",parigp:"PARI/GP",objectpascal:"Object Pascal",php:"PHP","php-extras":"PHP Extras",plsql:"PL/SQL",powershell:"PowerShell",properties:".properties",protobuf:"Protocol Buffers",q:"Q (kdb+ database)",jsx:"React JSX",tsx:"React TSX",renpy:"Ren'py",rest:"reST (reStructuredText)",sas:"SAS",sass:"Sass (Sass)",scss:"Sass (Scss)",sql:"SQL",soy:"Soy (Closure Template)",tap:"TAP",toml:"TOML",tt2:"Template Toolkit 2",ts:"TypeScript",vbnet:"VB.Net",vhdl:"VHDL",vim:"vim","visual-basic":"Visual Basic",vb:"Visual Basic",wasm:"WebAssembly",wiki:"Wiki markup",xeoracube:"XeoraCube",xojo:"Xojo (REALbasic)",xquery:"XQuery",yaml:"YAML"};Prism.plugins.toolbar.registerButton("show-language",function(e){function s(a){return a?(a.substring(0,1).toUpperCase()+a.substring(1)).replace(/s(?=cript)/,"S"):a}var t=e.element.parentNode;if(t&&/pre/i.test(t.nodeName)){var r=t.getAttribute("data-language")||a[e.language]||s(e.language);if(r){var o=document.createElement("span");return o.textContent=r,o}}})}}(); \ No newline at end of file +!function(){if("undefined"!=typeof self&&self.Prism&&self.document){if(!Prism.plugins.toolbar)return console.warn("Show Languages plugin loaded before Toolbar plugin."),void 0;var a={html:"HTML",xml:"XML",svg:"SVG",mathml:"MathML",css:"CSS",clike:"C-like",js:"JavaScript",abap:"ABAP",abnf:"Augmented Backus–Naur form",apacheconf:"Apache Configuration",apl:"APL",arff:"ARFF",asciidoc:"AsciiDoc",adoc:"AsciiDoc",asm6502:"6502 Assembly",aspnet:"ASP.NET (C#)",autohotkey:"AutoHotkey",autoit:"AutoIt",shell:"Bash",basic:"BASIC",bnf:"Backus–Naur form",rbfn:"Routing Backus–Naur form",csharp:"C#",dotnet:"C#",cpp:"C++",cil:"CIL",csp:"Content-Security-Policy","css-extras":"CSS Extras",django:"Django/Jinja2",jinja2:"Django/Jinja2",dockerfile:"Docker",ebnf:"Extended Backus–Naur form",erb:"ERB",fsharp:"F#",gcode:"G-code",gedcom:"GEDCOM",glsl:"GLSL",gml:"GameMaker Language",gamemakerlanguage:"GameMaker Language",graphql:"GraphQL",hcl:"HCL",http:"HTTP",hpkp:"HTTP Public-Key-Pins",hsts:"HTTP Strict-Transport-Security",ichigojam:"IchigoJam",inform7:"Inform 7",javadoc:"JavaDoc",javadoclike:"JavaDoc-like",javastacktrace:"Java stack trace",jsdoc:"JSDoc","js-extras":"JS Extras",json:"JSON",jsonp:"JSONP",json5:"JSON5",latex:"LaTeX",emacs:"Lisp",elisp:"Lisp","emacs-lisp":"Lisp",lolcode:"LOLCODE","markup-templating":"Markup templating",matlab:"MATLAB",mel:"MEL",n1ql:"N1QL",n4js:"N4JS",n4jsd:"N4JS","nand2tetris-hdl":"Nand To Tetris HDL",nasm:"NASM",nginx:"nginx",nsis:"NSIS",objectivec:"Objective-C",ocaml:"OCaml",opencl:"OpenCL",parigp:"PARI/GP",objectpascal:"Object Pascal",php:"PHP",phpdoc:"PHPDoc","php-extras":"PHP Extras",plsql:"PL/SQL",powershell:"PowerShell",properties:".properties",protobuf:"Protocol Buffers",q:"Q (kdb+ database)",jsx:"React JSX",tsx:"React TSX",renpy:"Ren'py",rest:"reST (reStructuredText)",sas:"SAS",sass:"Sass (Sass)",scss:"Sass (Scss)",sql:"SQL",soy:"Soy (Closure Template)",tap:"TAP",toml:"TOML",tt2:"Template Toolkit 2",ts:"TypeScript",vbnet:"VB.Net",vhdl:"VHDL",vim:"vim","visual-basic":"Visual Basic",vb:"Visual Basic",wasm:"WebAssembly",wiki:"Wiki markup",xeoracube:"XeoraCube",xojo:"Xojo (REALbasic)",xquery:"XQuery",yaml:"YAML"};Prism.plugins.toolbar.registerButton("show-language",function(e){function s(a){return a?(a.substring(0,1).toUpperCase()+a.substring(1)).replace(/s(?=cript)/,"S"):a}var t=e.element.parentNode;if(t&&/pre/i.test(t.nodeName)){var o=t.getAttribute("data-language")||a[e.language]||s(e.language);if(o){var r=document.createElement("span");return r.textContent=o,r}}})}}(); \ No newline at end of file diff --git a/tests/languages/javadoc+java/javadoc_inclusion.test b/tests/languages/javadoc+java/javadoc_inclusion.test new file mode 100644 index 0000000000..9dd0329444 --- /dev/null +++ b/tests/languages/javadoc+java/javadoc_inclusion.test @@ -0,0 +1,11 @@ +/** Description. */ + +---------------------------------------------------- + +[ + ["doc-comment", ["/** Description. */"]] +] + +---------------------------------------------------- + +Checks for JavaDoc doc comments in Java. diff --git a/tests/languages/javadoc/class-name_feature.test b/tests/languages/javadoc/class-name_feature.test new file mode 100644 index 0000000000..20ac38ebd8 --- /dev/null +++ b/tests/languages/javadoc/class-name_feature.test @@ -0,0 +1,40 @@ +/** + * @throws IllegalArgumentException if the argument is negative. + * @see org.my.company.InfoClass for more information. + * @param the first generic argument. + */ + +---------------------------------------------------- + +[ + "/**\n * ", + ["keyword", "@throws"], + ["class-name", [ + "IllegalArgumentException" + ]], + " if the argument is negative.\n * ", + ["keyword", "@see"], + ["namespace", [ + "org", + ["punctuation", "."], + "my", + ["punctuation", "."], + "company", + ["punctuation", "."] + ]], + ["class-name", [ + "InfoClass" + ]], + " for more information.\n * ", + ["keyword", "@param"], + ["class-name", [ + ["punctuation", "<"], + "T", + ["punctuation", ">"] + ]], + " the first generic argument.\n */" +] + +---------------------------------------------------- + +Checks for class names. diff --git a/tests/languages/javadoc/code_feature.test b/tests/languages/javadoc/code_feature.test new file mode 100644 index 0000000000..c9e52394c3 --- /dev/null +++ b/tests/languages/javadoc/code_feature.test @@ -0,0 +1,135 @@ +/** + * {@code this.foo} is never {@code null}. + * Foo.bar(null) + *
    
    + * for (int i = 0; i < array.length; i++) {
    + *     array[i] += 1;
    + * }
    + * return array;
    + * 
    + */ + +---------------------------------------------------- + +[ + "/**\n * ", + ["punctuation", "{"], + ["keyword", "@code"], + ["code-section", [ + ["code", [ + ["keyword", "this"], + ["punctuation", "."], + "foo" + ]] + ]], + ["punctuation", "}"], + " is never ", + ["punctuation", "{"], + ["keyword", "@code"], + ["code-section", [ + ["code", [ + ["keyword", "null"] + ]] + ]], + ["punctuation", "}"], + ".\n * ", + + ["tag", [ + ["tag", [ + ["punctuation", "<"], + "code" + ]], + ["punctuation", ">"] + ]], + ["code-section", [ + ["code", [ + ["class-name", "Foo"], + ["punctuation", "."], + ["function", "bar"], + ["punctuation", "("], + ["keyword", "null"], + ["punctuation", ")"] + ]] + ]], + ["tag", [ + ["tag", [ + ["punctuation", ""] + ]], + "\n * ", + + ["tag", [ + ["tag", [ + ["punctuation", "<"], + "pre" + ]], + ["punctuation", ">"] + ]], + ["tag", [ + ["tag", [ + ["punctuation", "<"], + "code" + ]], + ["punctuation", ">"] + ]], + ["code-section", [ + "* ", + ["code", [ + ["keyword", "for"], + ["punctuation", "("], + ["keyword", "int"], + " i ", + ["operator", "="], + ["number", "0"], + ["punctuation", ";"], + " i ", + ["operator", "<"], + " array", + ["punctuation", "."], + "length", + ["punctuation", ";"], + " i", + ["operator", "++"], + ["punctuation", ")"], + ["punctuation", "{"] + ]], + "\n * ", + ["code", [ + "array", + ["punctuation", "["], + "i", + ["punctuation", "]"], + ["operator", "+="], + ["number", "1"], + ["punctuation", ";"] + ]], + "\n * }\n * ", + ["code", [ + ["keyword", "return"], + " array", + ["punctuation", ";"] + ]], + "\n *" + ]], + ["tag", [ + ["tag", [ + ["punctuation", ""] + ]], + ["tag", [ + ["tag", [ + ["punctuation", ""] + ]], + "\n */" +] + +---------------------------------------------------- + +Checks for code. diff --git a/tests/languages/javadoc/keyword_feature.test b/tests/languages/javadoc/keyword_feature.test new file mode 100644 index 0000000000..db56bb42b1 --- /dev/null +++ b/tests/languages/javadoc/keyword_feature.test @@ -0,0 +1,69 @@ +/** + * @author + * @deprecated + * @exception + * @param + * @return + * @see + * @serial + * @serialData + * @serialField + * @since + * @throws + * @version + * {@code} + * {@docRoot} + * {@inheritDoc} + * {@link} + * {@linkplain} + * {@literal} + * {@value} + */ + +---------------------------------------------------- + +[ + "/**\n * ", + ["keyword", "@author"], + "\n * ", + ["keyword", "@deprecated"], + "\n * ", + ["keyword", "@exception"], + "\n * ", + ["keyword", "@param"], + "\n * ", + ["keyword", "@return"], + "\n * ", + ["keyword", "@see"], + "\n * ", + ["keyword", "@serial"], + "\n * ", + ["keyword", "@serialData"], + "\n * ", + ["keyword", "@serialField"], + "\n * ", + ["keyword", "@since"], + "\n * ", + ["keyword", "@throws"], + "\n * ", + ["keyword", "@version"], + "\n * ", + ["punctuation", "{"], ["keyword", "@code"], ["punctuation", "}"], + "\n * ", + ["punctuation", "{"], ["keyword", "@docRoot"], ["punctuation", "}"], + "\n * ", + ["punctuation", "{"], ["keyword", "@inheritDoc"], ["punctuation", "}"], + "\n * ", + ["punctuation", "{"], ["keyword", "@link"], ["punctuation", "}"], + "\n * ", + ["punctuation", "{"], ["keyword", "@linkplain"], ["punctuation", "}"], + "\n * ", + ["punctuation", "{"], ["keyword", "@literal"], ["punctuation", "}"], + "\n * ", + ["punctuation", "{"], ["keyword", "@value"], ["punctuation", "}"], + "\n */" +] + +---------------------------------------------------- + +Checks for all keywords. diff --git a/tests/languages/javadoc/parameter_feature.test b/tests/languages/javadoc/parameter_feature.test new file mode 100644 index 0000000000..98e12ed902 --- /dev/null +++ b/tests/languages/javadoc/parameter_feature.test @@ -0,0 +1,20 @@ +/** + * @param foo an argument. + * @param bar another argument. + */ + +---------------------------------------------------- + +[ + "/**\n * ", + ["keyword", "@param"], + ["parameter", "foo"], + " an argument.\n * ", + ["keyword", "@param"], + ["parameter", "bar"], + " another argument.\n */" +] + +---------------------------------------------------- + +Checks for parameters. diff --git a/tests/languages/javadoc/tag_feature.test b/tests/languages/javadoc/tag_feature.test new file mode 100644 index 0000000000..81b49a51f5 --- /dev/null +++ b/tests/languages/javadoc/tag_feature.test @@ -0,0 +1,117 @@ +/** + *

    + * + * + * + * + * + *
    + * foo + * + * bar + *
    + * some link + */ + +---------------------------------------------------- + +[ + "/**\n * ", + ["tag", [ + ["tag", [ + ["punctuation", "<"], + "p" + ]], + ["punctuation", ">"] + ]], + "\n * ", + ["tag", [ + ["tag", [ + ["punctuation", "<"], + "table" + ]], + ["punctuation", ">"] + ]], + "\n * ", + ["tag", [ + ["tag", [ + ["punctuation", "<"], + "tr" + ]], + ["punctuation", ">"] + ]], + "\n * ", + ["tag", [ + ["tag", [ + ["punctuation", "<"], + "td" + ]], + ["punctuation", ">"] + ]], + "\n * foo\n * ", + ["tag", [ + ["tag", [ + ["punctuation", ""] + ]], + "\n * ", + ["tag", [ + ["tag", [ + ["punctuation", "<"], + "td" + ]], + ["punctuation", ">"] + ]], + "\n * bar\n * ", + ["tag", [ + ["tag", [ + ["punctuation", ""] + ]], + "\n * ", + ["tag", [ + ["tag", [ + ["punctuation", ""] + ]], + "\n * ", + ["tag", [ + ["tag", [ + ["punctuation", ""] + ]], + "\n * ", + ["tag", [ + ["tag", [ + ["punctuation", "<"], "a"]], + ["attr-name", ["href"]], + ["attr-value", [ + ["punctuation", "="], + ["punctuation", "\""], + "example.com", + ["punctuation", "\""] + ]], + ["punctuation", ">"] + ]], + "some link", + ["tag", [ + ["tag", [ + ["punctuation", ""] + ]], + "\n */" +] + +---------------------------------------------------- + +Checks for HTML tags inside doc comments. diff --git a/tests/languages/jsdoc+javascript/jsdoc_inclusion.test b/tests/languages/jsdoc+javascript/jsdoc_inclusion.test new file mode 100644 index 0000000000..c418f9d89c --- /dev/null +++ b/tests/languages/jsdoc+javascript/jsdoc_inclusion.test @@ -0,0 +1,11 @@ +/** Description. */ + +---------------------------------------------------- + +[ + ["doc-comment", ["/** Description. */"]] +] + +---------------------------------------------------- + +Checks for JSDoc doc comments in JavaScript. diff --git a/tests/languages/jsdoc/class-name_feature.test b/tests/languages/jsdoc/class-name_feature.test new file mode 100644 index 0000000000..90debeeaea --- /dev/null +++ b/tests/languages/jsdoc/class-name_feature.test @@ -0,0 +1,75 @@ +/** + * @param {number} + * @param {number | string} + * @param {Array. | Object.} + * @param {{[x: string]: {start: number, end?: number}}} + */ + +---------------------------------------------------- + +[ + "/**\n * ", + ["keyword", "@param"], + ["class-name", [ + ["punctuation", "{"], + "number", + ["punctuation", "}"] + ]], + "\n * ", + ["keyword", "@param"], + ["class-name", [ + ["punctuation", "{"], + "number ", + ["punctuation", "|"], + " string", + ["punctuation", "}"] + ]], + "\n * ", + ["keyword", "@param"], + ["class-name", [ + ["punctuation", "{"], + "Array", + ["punctuation", "."], + ["punctuation", "<"], + "number", + ["punctuation", ">"], + ["punctuation", "|"], + " Object", + ["punctuation", "."], + ["punctuation", "<"], + "string", + ["punctuation", ","], + " number", + ["punctuation", ">"], + ["punctuation", "}"] + ]], + "\n * ", + ["keyword", "@param"], + ["class-name", [ + ["punctuation", "{"], + ["punctuation", "{"], + ["punctuation", "["], + "x", + ["punctuation", ":"], + " string", + ["punctuation", "]"], + ["punctuation", ":"], + ["punctuation", "{"], + "start", + ["punctuation", ":"], + " number", + ["punctuation", ","], + " end", + ["punctuation", "?"], + ["punctuation", ":"], + " number", + ["punctuation", "}"], + ["punctuation", "}"], + ["punctuation", "}"] + ]], + "\n */" +] + +---------------------------------------------------- + +Checks for class names. diff --git a/tests/languages/jsdoc/example_feature.test b/tests/languages/jsdoc/example_feature.test new file mode 100644 index 0000000000..61febb2092 --- /dev/null +++ b/tests/languages/jsdoc/example_feature.test @@ -0,0 +1,35 @@ +/** + * @example + * // returns 3 + * globalNS.method(5, 15); + */ + +---------------------------------------------------- + +[ + "/**\n * ", + ["keyword", "@example"], + ["example", [ + "* ", + ["code", [ + ["comment", "// returns 3"] + ]], + "\n * ", + ["code", [ + "globalNS", + ["punctuation", "."], + ["function", "method"], + ["punctuation", "("], + ["number", "5"], + ["punctuation", ","], + ["number", "15"], + ["punctuation", ")"], + ["punctuation", ";"] + ]] + ]], + "\n */" +] + +---------------------------------------------------- + +Checks for examples. diff --git a/tests/languages/jsdoc/keyword_feature.test b/tests/languages/jsdoc/keyword_feature.test new file mode 100644 index 0000000000..6a74fc7cba --- /dev/null +++ b/tests/languages/jsdoc/keyword_feature.test @@ -0,0 +1,182 @@ +/** + * @abstract + * @virtual + * @access + * @alias + * @async + * @augments + * @extends + * @author + * @borrows + * @callback + * @class + * @constructor + * @hideconstructor + * @classdesc + * @constant + * @const + * @constructs + * @copyright + * @default + * @defaultValue + * @deprecated + * @description + * @desc + * @enum + * @event + * @exports + * @external + * @host + * @file + * @overview + * @fileoverview + * @fires + * @emits + * @function + * @func + * @method + * @generator + * @global + * @ignore + * @implements + * @inheritdoc + * @inner + * @instance + * @interface + * @kind + * @lends + * @license + * @listens + * @member + * @var + * @memberof + * @mixes + * @mixin + * @module + * @name + * @namespace + * @override + * @package + * @param + * @arg + * @argument + * @private + * @property + * @prop + * @protected + * @public + * @readonly + * @requires + * @return + * @returns + * @see + * @since + * @static + * @summary + * @this + * @throws + * @exception + * @todo + * @tutorial + * @type + * @typedef + * @variation + * @version + * @yield + * @yields + */ + +---------------------------------------------------- + +[ + "/**\n * ", ["keyword", "@abstract"], + "\n * ", ["keyword", "@virtual"], + "\n * ", ["keyword", "@access"], + "\n * ", ["keyword", "@alias"], + "\n * ", ["keyword", "@async"], + "\n * ", ["keyword", "@augments"], + "\n * ", ["keyword", "@extends"], + "\n * ", ["keyword", "@author"], + "\n * ", ["keyword", "@borrows"], + "\n * ", ["keyword", "@callback"], + "\n * ", ["keyword", "@class"], + "\n * ", ["keyword", "@constructor"], + "\n * ", ["keyword", "@hideconstructor"], + "\n * ", ["keyword", "@classdesc"], + "\n * ", ["keyword", "@constant"], + "\n * ", ["keyword", "@const"], + "\n * ", ["keyword", "@constructs"], + "\n * ", ["keyword", "@copyright"], + "\n * ", ["keyword", "@default"], + "\n * ", ["keyword", "@defaultValue"], + "\n * ", ["keyword", "@deprecated"], + "\n * ", ["keyword", "@description"], + "\n * ", ["keyword", "@desc"], + "\n * ", ["keyword", "@enum"], + "\n * ", ["keyword", "@event"], + "\n * ", ["keyword", "@exports"], + "\n * ", ["keyword", "@external"], + "\n * ", ["keyword", "@host"], + "\n * ", ["keyword", "@file"], + "\n * ", ["keyword", "@overview"], + "\n * ", ["keyword", "@fileoverview"], + "\n * ", ["keyword", "@fires"], + "\n * ", ["keyword", "@emits"], + "\n * ", ["keyword", "@function"], + "\n * ", ["keyword", "@func"], + "\n * ", ["keyword", "@method"], + "\n * ", ["keyword", "@generator"], + "\n * ", ["keyword", "@global"], + "\n * ", ["keyword", "@ignore"], + "\n * ", ["keyword", "@implements"], + "\n * ", ["keyword", "@inheritdoc"], + "\n * ", ["keyword", "@inner"], + "\n * ", ["keyword", "@instance"], + "\n * ", ["keyword", "@interface"], + "\n * ", ["keyword", "@kind"], + "\n * ", ["keyword", "@lends"], + "\n * ", ["keyword", "@license"], + "\n * ", ["keyword", "@listens"], + "\n * ", ["keyword", "@member"], + "\n * ", ["keyword", "@var"], + "\n * ", ["keyword", "@memberof"], + "\n * ", ["keyword", "@mixes"], + "\n * ", ["keyword", "@mixin"], + "\n * ", ["keyword", "@module"], + "\n * ", ["keyword", "@name"], + "\n * ", ["keyword", "@namespace"], + "\n * ", ["keyword", "@override"], + "\n * ", ["keyword", "@package"], + "\n * ", ["keyword", "@param"], + "\n * ", ["keyword", "@arg"], + "\n * ", ["keyword", "@argument"], + "\n * ", ["keyword", "@private"], + "\n * ", ["keyword", "@property"], + "\n * ", ["keyword", "@prop"], + "\n * ", ["keyword", "@protected"], + "\n * ", ["keyword", "@public"], + "\n * ", ["keyword", "@readonly"], + "\n * ", ["keyword", "@requires"], + "\n * ", ["keyword", "@return"], + "\n * ", ["keyword", "@returns"], + "\n * ", ["keyword", "@see"], + "\n * ", ["keyword", "@since"], + "\n * ", ["keyword", "@static"], + "\n * ", ["keyword", "@summary"], + "\n * ", ["keyword", "@this"], + "\n * ", ["keyword", "@throws"], + "\n * ", ["keyword", "@exception"], + "\n * ", ["keyword", "@todo"], + "\n * ", ["keyword", "@tutorial"], + "\n * ", ["keyword", "@type"], + "\n * ", ["keyword", "@typedef"], + "\n * ", ["keyword", "@variation"], + "\n * ", ["keyword", "@version"], + "\n * ", ["keyword", "@yield"], + "\n * ", ["keyword", "@yields"], + "\n */" +] + +---------------------------------------------------- + +Checks for keywords. diff --git a/tests/languages/jsdoc/parameter_feature.test b/tests/languages/jsdoc/parameter_feature.test new file mode 100644 index 0000000000..80747a3753 --- /dev/null +++ b/tests/languages/jsdoc/parameter_feature.test @@ -0,0 +1,86 @@ +/** + * @param n - A number. + * @param [n] - A number. + * @param [n=1+2] - A number. + * @param {number} n - A number. + * @param {{[x: string]: {start: number, end?: number}}} map + * @param {any} foo.bar + */ + +---------------------------------------------------- + +[ + "/**\n * ", + ["keyword", "@param"], + ["parameter", ["n"]], + " - A number.\n * ", + ["keyword", "@param"], + ["optional-parameter", [ + ["punctuation", "["], + ["parameter", ["n"]], + ["punctuation", "]"] + ]], + " - A number.\n * ", + ["keyword", "@param"], + ["optional-parameter", [ + ["punctuation", "["], + ["parameter", ["n"]], + ["punctuation", "="], + ["code", [ + ["number", "1"], + ["operator", "+"], + ["number", "2"] + ]], + ["punctuation", "]"] + ]], + " - A number.\n * ", + ["keyword", "@param"], + ["class-name", [ + ["punctuation", "{"], + "number", + ["punctuation", "}"] + ]], + ["parameter", ["n"]], + " - A number.\n * ", + ["keyword", "@param"], + ["class-name", [ + ["punctuation", "{"], + ["punctuation", "{"], + ["punctuation", "["], + "x", + ["punctuation", ":"], + " string", + ["punctuation", "]"], + ["punctuation", ":"], + ["punctuation", "{"], + "start", + ["punctuation", ":"], + " number", + ["punctuation", ","], + " end", + ["punctuation", "?"], + ["punctuation", ":"], + " number", + ["punctuation", "}"], + ["punctuation", "}"], + ["punctuation", "}"] + ]], + ["parameter", ["map"]], + "\n * ", + ["keyword", "@param"], + ["class-name", [ + ["punctuation", "{"], + "any", + ["punctuation", "}"] + ]], + ["parameter", [ + "foo", + ["punctuation", "."], + "bar" + ]], + "\n */" +] + +---------------------------------------------------- + +Checks for parameters. diff --git a/tests/languages/phpdoc+php/phpdoc_inclusion.test b/tests/languages/phpdoc+php/phpdoc_inclusion.test new file mode 100644 index 0000000000..fb5e3f6181 --- /dev/null +++ b/tests/languages/phpdoc+php/phpdoc_inclusion.test @@ -0,0 +1,11 @@ +/** Description. */ + +---------------------------------------------------- + +[ + ["doc-comment", ["/** Description. */"]] +] + +---------------------------------------------------- + +Checks for PHPDoc doc comments in PHP. diff --git a/tests/languages/phpdoc/class-name_feature.test b/tests/languages/phpdoc/class-name_feature.test new file mode 100644 index 0000000000..b55784be3a --- /dev/null +++ b/tests/languages/phpdoc/class-name_feature.test @@ -0,0 +1,45 @@ +/** + * @param string|null $parameter a parameter + * @return self + * @var MyClass[int] + * @throws \foo\MyException if something bad happens + */ + +---------------------------------------------------- + +[ + "/**\n * ", + ["keyword", "@param"], + ["class-name", [ + ["keyword", "string"], + ["punctuation", "|"], + ["keyword", "null"] + ]], + ["parameter", "$parameter"], + " a parameter\n * ", + ["keyword", "@return"], + ["class-name", [ + ["keyword", "self"] + ]], + "\n * ", + ["keyword", "@var"], + ["class-name", [ + "MyClass", + ["punctuation", "["], + ["keyword", "int"], + ["punctuation", "]"] + ]], + "\n * ", + ["keyword", "@throws"], + ["class-name", [ + ["punctuation", "\\"], + "foo", + ["punctuation", "\\"], + "MyException" + ]], + " if something bad happens\n */" +] + +---------------------------------------------------- + +Checks for class names. diff --git a/tests/languages/phpdoc/keyword_feature.test b/tests/languages/phpdoc/keyword_feature.test new file mode 100644 index 0000000000..2681efd1e2 --- /dev/null +++ b/tests/languages/phpdoc/keyword_feature.test @@ -0,0 +1,99 @@ +/** + * @api + * @author + * @category + * @copyright + * @deprecated + * @example + * @filesource + * @global + * @ignore + * @internal + * @license + * @link + * @method + * @package + * @param + * @property + * @property-read + * @property-write + * @return + * @see + * @since + * @source + * @subpackage + * @throws + * @todo + * @uses + * @used-by + * @var + * @version + */ + +---------------------------------------------------- + +[ + "/**\n * ", + ["keyword", "@api"], + "\n * ", + ["keyword", "@author"], + "\n * ", + ["keyword", "@category"], + "\n * ", + ["keyword", "@copyright"], + "\n * ", + ["keyword", "@deprecated"], + "\n * ", + ["keyword", "@example"], + "\n * ", + ["keyword", "@filesource"], + "\n * ", + ["keyword", "@global"], + "\n * ", + ["keyword", "@ignore"], + "\n * ", + ["keyword", "@internal"], + "\n * ", + ["keyword", "@license"], + "\n * ", + ["keyword", "@link"], + "\n * ", + ["keyword", "@method"], + "\n * ", + ["keyword", "@package"], + "\n * ", + ["keyword", "@param"], + "\n * ", + ["keyword", "@property"], + "\n * ", + ["keyword", "@property-read"], + "\n * ", + ["keyword", "@property-write"], + "\n * ", + ["keyword", "@return"], + "\n * ", + ["keyword", "@see"], + "\n * ", + ["keyword", "@since"], + "\n * ", + ["keyword", "@source"], + "\n * ", + ["keyword", "@subpackage"], + "\n * ", + ["keyword", "@throws"], + "\n * ", + ["keyword", "@todo"], + "\n * ", + ["keyword", "@uses"], + "\n * ", + ["keyword", "@used-by"], + "\n * ", + ["keyword", "@var"], + "\n * ", + ["keyword", "@version"], + "\n */" +] + +---------------------------------------------------- + +Checks for keywords. diff --git a/tests/languages/phpdoc/parameter_feature.test b/tests/languages/phpdoc/parameter_feature.test new file mode 100644 index 0000000000..68aa3e2ce3 --- /dev/null +++ b/tests/languages/phpdoc/parameter_feature.test @@ -0,0 +1,23 @@ +/** + * @param string $parameter a parameter + * @param $arg2 a second parameter + */ + +---------------------------------------------------- + +[ + "/**\n * ", + ["keyword", "@param"], + ["class-name", [ + ["keyword", "string"] + ]], + ["parameter", "$parameter"], + " a parameter\n * ", + ["keyword", "@param"], + ["parameter", "$arg2"], + " a second parameter\n */" +] + +---------------------------------------------------- + +Checks for parameters. From 152a68ef4860ee2a66a21395c9a60a1b140f2613 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Thu, 28 Feb 2019 21:36:57 +0100 Subject: [PATCH 0183/1100] Improved languages.DFS and util.clone (#1506) Minor improvements for the two functions. --- components/prism-core.js | 40 +++++++++++++++++++++--------------- components/prism-core.min.js | 2 +- prism.js | 40 +++++++++++++++++++++--------------- 3 files changed, 49 insertions(+), 33 deletions(-) diff --git a/components/prism-core.js b/components/prism-core.js index 453dbe24f0..006a26f699 100644 --- a/components/prism-core.js +++ b/components/prism-core.js @@ -44,35 +44,37 @@ var _ = _self.Prism = { }, // Deep clone a language definition (e.g. to extend it) - clone: function (o, visited) { + clone: function deepClone(o, visited) { var type = _.util.type(o); visited = visited || {}; switch (type) { case 'Object': - if (visited[_.util.objId(o)]) { - return visited[_.util.objId(o)]; + var id = _.util.objId(o); + if (visited[id]) { + return visited[id]; } var clone = {}; - visited[_.util.objId(o)] = clone; + visited[id] = clone; for (var key in o) { if (o.hasOwnProperty(key)) { - clone[key] = _.util.clone(o[key], visited); + clone[key] = deepClone(o[key], visited); } } return clone; case 'Array': - if (visited[_.util.objId(o)]) { - return visited[_.util.objId(o)]; + var id = _.util.objId(o); + if (visited[id]) { + return visited[id]; } var clone = []; - visited[_.util.objId(o)] = clone; + visited[id] = clone; o.forEach(function (v, i) { - clone[i] = _.util.clone(v, visited); + clone[i] = deepClone(v, visited); }); return clone; @@ -139,19 +141,25 @@ var _ = _self.Prism = { }, // Traverse a language definition with Depth First Search - DFS: function(o, callback, type, visited) { + DFS: function DFS(o, callback, type, visited) { visited = visited || {}; + + var objId = _.util.objId; + for (var i in o) { if (o.hasOwnProperty(i)) { callback.call(o, i, o[i], type || i); - if (_.util.type(o[i]) === 'Object' && !visited[_.util.objId(o[i])]) { - visited[_.util.objId(o[i])] = true; - _.languages.DFS(o[i], callback, null, visited); + var property = o[i], + propertyType = _.util.type(property); + + if (propertyType === 'Object' && !visited[objId(property)]) { + visited[objId(property)] = true; + DFS(property, callback, null, visited); } - else if (_.util.type(o[i]) === 'Array' && !visited[_.util.objId(o[i])]) { - visited[_.util.objId(o[i])] = true; - _.languages.DFS(o[i], callback, i, visited); + else if (propertyType === 'Array' && !visited[objId(property)]) { + visited[objId(property)] = true; + DFS(property, callback, i, visited); } } } diff --git a/components/prism-core.min.js b/components/prism-core.min.js index bde09e05e4..6bd6cf488b 100644 --- a/components/prism-core.min.js +++ b/components/prism-core.min.js @@ -1 +1 @@ -var _self="undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{},Prism=function(){var e=/\blang(?:uage)?-([\w-]+)\b/i,t=0,n=_self.Prism={manual:_self.Prism&&_self.Prism.manual,disableWorkerMessageHandler:_self.Prism&&_self.Prism.disableWorkerMessageHandler,util:{encode:function(e){return e instanceof a?new a(e.type,n.util.encode(e.content),e.alias):"Array"===n.util.type(e)?e.map(n.util.encode):e.replace(/&/g,"&").replace(/e.length)return;if(!(w instanceof s)){if(m&&b!=t.length-1){f.lastIndex=k;var _=f.exec(e);if(!_)break;for(var j=_.index+(d?_[1].length:0),P=_.index+_[0].length,A=b,O=k,x=t.length;x>A&&(P>O||!t[A].type&&!t[A-1].greedy);++A)O+=t[A].length,j>=O&&(++b,k=O);if(t[b]instanceof s)continue;I=A-b,w=e.slice(k,O),_.index-=k}else{f.lastIndex=0;var _=f.exec(w),I=1}if(_){d&&(p=_[1]?_[1].length:0);var j=_.index+p,_=_[0].slice(p),P=j+_.length,N=w.slice(0,j),S=w.slice(P),E=[b,I];N&&(++b,k+=N.length,E.push(N));var C=new s(u,h?n.tokenize(_,h):_,y,_,m);if(E.push(C),S&&E.push(S),Array.prototype.splice.apply(t,E),1!=I&&n.matchGrammar(e,t,a,b,k,!0,u),i)break}else if(i)break}}}}},tokenize:function(e,t){var a=[e],r=t.rest;if(r){for(var l in r)t[l]=r[l];delete t.rest}return n.matchGrammar(e,a,t,0,0,!1),a},hooks:{all:{},add:function(e,t){var a=n.hooks.all;a[e]=a[e]||[],a[e].push(t)},run:function(e,t){var a=n.hooks.all[e];if(a&&a.length)for(var r,l=0;r=a[l++];)r(t)}}},a=n.Token=function(e,t,n,a,r){this.type=e,this.content=t,this.alias=n,this.length=0|(a||"").length,this.greedy=!!r};if(a.stringify=function(e,t,r){if("string"==typeof e)return e;if("Array"===n.util.type(e))return e.map(function(n){return a.stringify(n,t,e)}).join("");var l={type:e.type,content:a.stringify(e.content,t,r),tag:"span",classes:["token",e.type],attributes:{},language:t,parent:r};if(e.alias){var i="Array"===n.util.type(e.alias)?e.alias:[e.alias];Array.prototype.push.apply(l.classes,i)}n.hooks.run("wrap",l);var o=Object.keys(l.attributes).map(function(e){return e+'="'+(l.attributes[e]||"").replace(/"/g,""")+'"'}).join(" ");return"<"+l.tag+' class="'+l.classes.join(" ")+'"'+(o?" "+o:"")+">"+l.content+""},!_self.document)return _self.addEventListener?(n.disableWorkerMessageHandler||_self.addEventListener("message",function(e){var t=JSON.parse(e.data),a=t.language,r=t.code,l=t.immediateClose;_self.postMessage(n.highlight(r,n.languages[a],a)),l&&_self.close()},!1),_self.Prism):_self.Prism;var r=document.currentScript||[].slice.call(document.getElementsByTagName("script")).pop();return r&&(n.filename=r.src,n.manual||r.hasAttribute("data-manual")||("loading"!==document.readyState?window.requestAnimationFrame?window.requestAnimationFrame(n.highlightAll):window.setTimeout(n.highlightAll,16):document.addEventListener("DOMContentLoaded",n.highlightAll))),_self.Prism}();"undefined"!=typeof module&&module.exports&&(module.exports=Prism),"undefined"!=typeof global&&(global.Prism=Prism); \ No newline at end of file +var _self="undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{},Prism=function(){var e=/\blang(?:uage)?-([\w-]+)\b/i,t=0,a=_self.Prism={manual:_self.Prism&&_self.Prism.manual,disableWorkerMessageHandler:_self.Prism&&_self.Prism.disableWorkerMessageHandler,util:{encode:function(e){return e instanceof r?new r(e.type,a.util.encode(e.content),e.alias):"Array"===a.util.type(e)?e.map(a.util.encode):e.replace(/&/g,"&").replace(/e.length)return;if(!(w instanceof s)){if(m&&k!=t.length-1){f.lastIndex=b;var _=f.exec(e);if(!_)break;for(var P=_.index+(d?_[1].length:0),A=_.index+_[0].length,O=k,x=b,N=t.length;N>O&&(A>x||!t[O].type&&!t[O-1].greedy);++O)x+=t[O].length,P>=x&&(++k,b=x);if(t[k]instanceof s)continue;j=O-k,w=e.slice(b,x),_.index-=b}else{f.lastIndex=0;var _=f.exec(w),j=1}if(_){d&&(p=_[1]?_[1].length:0);var P=_.index+p,_=_[0].slice(p),A=P+_.length,S=w.slice(0,P),E=w.slice(A),C=[k,j];S&&(++k,b+=S.length,C.push(S));var M=new s(u,h?a.tokenize(_,h):_,v,_,m);if(C.push(M),E&&C.push(E),Array.prototype.splice.apply(t,C),1!=j&&a.matchGrammar(e,t,r,k,b,!0,u),l)break}else if(l)break}}}}},tokenize:function(e,t){var r=[e],n=t.rest;if(n){for(var i in n)t[i]=n[i];delete t.rest}return a.matchGrammar(e,r,t,0,0,!1),r},hooks:{all:{},add:function(e,t){var r=a.hooks.all;r[e]=r[e]||[],r[e].push(t)},run:function(e,t){var r=a.hooks.all[e];if(r&&r.length)for(var n,i=0;n=r[i++];)n(t)}}},r=a.Token=function(e,t,a,r,n){this.type=e,this.content=t,this.alias=a,this.length=0|(r||"").length,this.greedy=!!n};if(r.stringify=function(e,t,n){if("string"==typeof e)return e;if("Array"===a.util.type(e))return e.map(function(a){return r.stringify(a,t,e)}).join("");var i={type:e.type,content:r.stringify(e.content,t,n),tag:"span",classes:["token",e.type],attributes:{},language:t,parent:n};if(e.alias){var l="Array"===a.util.type(e.alias)?e.alias:[e.alias];Array.prototype.push.apply(i.classes,l)}a.hooks.run("wrap",i);var o=Object.keys(i.attributes).map(function(e){return e+'="'+(i.attributes[e]||"").replace(/"/g,""")+'"'}).join(" ");return"<"+i.tag+' class="'+i.classes.join(" ")+'"'+(o?" "+o:"")+">"+i.content+""},!_self.document)return _self.addEventListener?(a.disableWorkerMessageHandler||_self.addEventListener("message",function(e){var t=JSON.parse(e.data),r=t.language,n=t.code,i=t.immediateClose;_self.postMessage(a.highlight(n,a.languages[r],r)),i&&_self.close()},!1),_self.Prism):_self.Prism;var n=document.currentScript||[].slice.call(document.getElementsByTagName("script")).pop();return n&&(a.filename=n.src,a.manual||n.hasAttribute("data-manual")||("loading"!==document.readyState?window.requestAnimationFrame?window.requestAnimationFrame(a.highlightAll):window.setTimeout(a.highlightAll,16):document.addEventListener("DOMContentLoaded",a.highlightAll))),_self.Prism}();"undefined"!=typeof module&&module.exports&&(module.exports=Prism),"undefined"!=typeof global&&(global.Prism=Prism); \ No newline at end of file diff --git a/prism.js b/prism.js index 3bd82498ed..b21ba6c936 100644 --- a/prism.js +++ b/prism.js @@ -49,35 +49,37 @@ var _ = _self.Prism = { }, // Deep clone a language definition (e.g. to extend it) - clone: function (o, visited) { + clone: function deepClone(o, visited) { var type = _.util.type(o); visited = visited || {}; switch (type) { case 'Object': - if (visited[_.util.objId(o)]) { - return visited[_.util.objId(o)]; + var id = _.util.objId(o); + if (visited[id]) { + return visited[id]; } var clone = {}; - visited[_.util.objId(o)] = clone; + visited[id] = clone; for (var key in o) { if (o.hasOwnProperty(key)) { - clone[key] = _.util.clone(o[key], visited); + clone[key] = deepClone(o[key], visited); } } return clone; case 'Array': - if (visited[_.util.objId(o)]) { - return visited[_.util.objId(o)]; + var id = _.util.objId(o); + if (visited[id]) { + return visited[id]; } var clone = []; - visited[_.util.objId(o)] = clone; + visited[id] = clone; o.forEach(function (v, i) { - clone[i] = _.util.clone(v, visited); + clone[i] = deepClone(v, visited); }); return clone; @@ -144,19 +146,25 @@ var _ = _self.Prism = { }, // Traverse a language definition with Depth First Search - DFS: function(o, callback, type, visited) { + DFS: function DFS(o, callback, type, visited) { visited = visited || {}; + + var objId = _.util.objId; + for (var i in o) { if (o.hasOwnProperty(i)) { callback.call(o, i, o[i], type || i); - if (_.util.type(o[i]) === 'Object' && !visited[_.util.objId(o[i])]) { - visited[_.util.objId(o[i])] = true; - _.languages.DFS(o[i], callback, null, visited); + var property = o[i], + propertyType = _.util.type(property); + + if (propertyType === 'Object' && !visited[objId(property)]) { + visited[objId(property)] = true; + DFS(property, callback, null, visited); } - else if (_.util.type(o[i]) === 'Array' && !visited[_.util.objId(o[i])]) { - visited[_.util.objId(o[i])] = true; - _.languages.DFS(o[i], callback, i, visited); + else if (propertyType === 'Array' && !visited[objId(property)]) { + visited[objId(property)] = true; + DFS(property, callback, i, visited); } } } From 289ddd9b3b34a63899edad8f523376295b758aa8 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Thu, 28 Feb 2019 21:56:01 +0100 Subject: [PATCH 0184/1100] PHP: Fixed closing tag issue (#1652) This fixes that PHP's closing tag (`?>`) was detected inside strings and comments. --- components/prism-php.js | 15 ++++--- components/prism-php.min.js | 2 +- tests/languages/markup+php/issue1582.test | 23 ++++++++++ ...hp_with_closing_tag_in_markup_feature.test | 44 +++++++++++++++++++ tests/languages/php/delimiter_feature.test | 5 ++- 5 files changed, 80 insertions(+), 9 deletions(-) create mode 100644 tests/languages/markup+php/issue1582.test create mode 100644 tests/languages/markup+php/php_with_closing_tag_in_markup_feature.test diff --git a/components/prism-php.js b/components/prism-php.js index 8f3498da69..fc10e3661e 100644 --- a/components/prism-php.js +++ b/components/prism-php.js @@ -35,11 +35,14 @@ } }); - Prism.languages.insertBefore('php', 'keyword', { + Prism.languages.insertBefore('php', 'comment', { 'delimiter': { - pattern: /\?>|<\?(?:php|=)?/i, + pattern: /\?>$|^<\?(?:php(?=\s)|=)?/i, alias: 'important' - }, + } + }); + + Prism.languages.insertBefore('php', 'keyword', { 'variable': /\$+(?:\w+\b|(?={))/i, 'package': { pattern: /(\\|namespace\s+|use\s+)[\w\\]+/, @@ -114,11 +117,11 @@ delete Prism.languages.php['string']; Prism.hooks.add('before-tokenize', function(env) { - if (!/(?:<\?php|<\?)/ig.test(env.code)) { + if (!/<\?/.test(env.code)) { return; } - var phpPattern = /(?:<\?php|<\?)[\s\S]*?(?:\?>|$)/ig; + var phpPattern = /<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#)(?:[^?\n\r]|\?(?!>))*|\/\*[\s\S]*?(?:\*\/|$))*?(?:\?>|$)/ig; Prism.languages['markup-templating'].buildPlaceholders(env, 'php', phpPattern); }); @@ -126,4 +129,4 @@ Prism.languages['markup-templating'].tokenizePlaceholders(env, 'php'); }); -}(Prism)); \ No newline at end of file +}(Prism)); diff --git a/components/prism-php.min.js b/components/prism-php.min.js index 999111b65a..cb0060e4f1 100644 --- a/components/prism-php.min.js +++ b/components/prism-php.min.js @@ -1 +1 @@ -!function(e){e.languages.php=e.languages.extend("clike",{keyword:/\b(?:__halt_compiler|abstract|and|array|as|break|callable|case|catch|class|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|eval|exit|extends|final|finally|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|namespace|new|or|parent|print|private|protected|public|require|require_once|return|static|switch|throw|trait|try|unset|use|var|while|xor|yield)\b/i,"boolean":{pattern:/\b(?:false|true)\b/i,alias:"constant"},constant:[/\b[A-Z_][A-Z0-9_]*\b/,/\b(?:null)\b/i],comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0}}),e.languages.insertBefore("php","string",{"shell-comment":{pattern:/(^|[^\\])#.*/,lookbehind:!0,alias:"comment"}}),e.languages.insertBefore("php","keyword",{delimiter:{pattern:/\?>|<\?(?:php|=)?/i,alias:"important"},variable:/\$+(?:\w+\b|(?={))/i,"package":{pattern:/(\\|namespace\s+|use\s+)[\w\\]+/,lookbehind:!0,inside:{punctuation:/\\/}}}),e.languages.insertBefore("php","operator",{property:{pattern:/(->)[\w]+/,lookbehind:!0}});var n={pattern:/{\$(?:{(?:{[^{}]+}|[^{}]+)}|[^{}])+}|(^|[^\\{])\$+(?:\w+(?:\[.+?]|->\w+)*)/,lookbehind:!0,inside:{rest:e.languages.php}};e.languages.insertBefore("php","string",{"nowdoc-string":{pattern:/<<<'([^']+)'(?:\r\n?|\n)(?:.*(?:\r\n?|\n))*?\1;/,greedy:!0,alias:"string",inside:{delimiter:{pattern:/^<<<'[^']+'|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<'?|[';]$/}}}},"heredoc-string":{pattern:/<<<(?:"([^"]+)"(?:\r\n?|\n)(?:.*(?:\r\n?|\n))*?\1;|([a-z_]\w*)(?:\r\n?|\n)(?:.*(?:\r\n?|\n))*?\2;)/i,greedy:!0,alias:"string",inside:{delimiter:{pattern:/^<<<(?:"[^"]+"|[a-z_]\w*)|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<"?|[";]$/}},interpolation:n}},"single-quoted-string":{pattern:/'(?:\\[\s\S]|[^\\'])*'/,greedy:!0,alias:"string"},"double-quoted-string":{pattern:/"(?:\\[\s\S]|[^\\"])*"/,greedy:!0,alias:"string",inside:{interpolation:n}}}),delete e.languages.php.string,e.hooks.add("before-tokenize",function(n){if(/(?:<\?php|<\?)/gi.test(n.code)){var t=/(?:<\?php|<\?)[\s\S]*?(?:\?>|$)/gi;e.languages["markup-templating"].buildPlaceholders(n,"php",t)}}),e.hooks.add("after-tokenize",function(n){e.languages["markup-templating"].tokenizePlaceholders(n,"php")})}(Prism); \ No newline at end of file +!function(e){e.languages.php=e.languages.extend("clike",{keyword:/\b(?:__halt_compiler|abstract|and|array|as|break|callable|case|catch|class|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|eval|exit|extends|final|finally|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|namespace|new|or|parent|print|private|protected|public|require|require_once|return|static|switch|throw|trait|try|unset|use|var|while|xor|yield)\b/i,"boolean":{pattern:/\b(?:false|true)\b/i,alias:"constant"},constant:[/\b[A-Z_][A-Z0-9_]*\b/,/\b(?:null)\b/i],comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0}}),e.languages.insertBefore("php","string",{"shell-comment":{pattern:/(^|[^\\])#.*/,lookbehind:!0,alias:"comment"}}),e.languages.insertBefore("php","comment",{delimiter:{pattern:/\?>$|^<\?(?:php(?=\s)|=)?/i,alias:"important"}}),e.languages.insertBefore("php","keyword",{variable:/\$+(?:\w+\b|(?={))/i,"package":{pattern:/(\\|namespace\s+|use\s+)[\w\\]+/,lookbehind:!0,inside:{punctuation:/\\/}}}),e.languages.insertBefore("php","operator",{property:{pattern:/(->)[\w]+/,lookbehind:!0}});var n={pattern:/{\$(?:{(?:{[^{}]+}|[^{}]+)}|[^{}])+}|(^|[^\\{])\$+(?:\w+(?:\[.+?]|->\w+)*)/,lookbehind:!0,inside:{rest:e.languages.php}};e.languages.insertBefore("php","string",{"nowdoc-string":{pattern:/<<<'([^']+)'(?:\r\n?|\n)(?:.*(?:\r\n?|\n))*?\1;/,greedy:!0,alias:"string",inside:{delimiter:{pattern:/^<<<'[^']+'|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<'?|[';]$/}}}},"heredoc-string":{pattern:/<<<(?:"([^"]+)"(?:\r\n?|\n)(?:.*(?:\r\n?|\n))*?\1;|([a-z_]\w*)(?:\r\n?|\n)(?:.*(?:\r\n?|\n))*?\2;)/i,greedy:!0,alias:"string",inside:{delimiter:{pattern:/^<<<(?:"[^"]+"|[a-z_]\w*)|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<"?|[";]$/}},interpolation:n}},"single-quoted-string":{pattern:/'(?:\\[\s\S]|[^\\'])*'/,greedy:!0,alias:"string"},"double-quoted-string":{pattern:/"(?:\\[\s\S]|[^\\"])*"/,greedy:!0,alias:"string",inside:{interpolation:n}}}),delete e.languages.php.string,e.hooks.add("before-tokenize",function(n){if(/<\?/.test(n.code)){var t=/<\?(?:[^"'\/#]|\/(?![*\/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#)(?:[^?\n\r]|\?(?!>))*|\/\*[\s\S]*?(?:\*\/|$))*?(?:\?>|$)/gi;e.languages["markup-templating"].buildPlaceholders(n,"php",t)}}),e.hooks.add("after-tokenize",function(n){e.languages["markup-templating"].tokenizePlaceholders(n,"php")})}(Prism); \ No newline at end of file diff --git a/tests/languages/markup+php/issue1582.test b/tests/languages/markup+php/issue1582.test new file mode 100644 index 0000000000..255f97e74e --- /dev/null +++ b/tests/languages/markup+php/issue1582.test @@ -0,0 +1,23 @@ +'; + echo PHP_EOL; + +---------------------------------------------------- + +[ + ["php", [ + ["delimiter", "'"], + ["punctuation", ";"], + ["keyword", "echo"], + ["constant", "PHP_EOL"], + ["punctuation", ";"] + ]] +] + +---------------------------------------------------- + +Checks for PHP closing tags '?>' inside of strings. +See #1582 for details. diff --git a/tests/languages/markup+php/php_with_closing_tag_in_markup_feature.test b/tests/languages/markup+php/php_with_closing_tag_in_markup_feature.test new file mode 100644 index 0000000000..8067d7c0b4 --- /dev/null +++ b/tests/languages/markup+php/php_with_closing_tag_in_markup_feature.test @@ -0,0 +1,44 @@ +' + "?>"; /* ?> */ + echo PHP_EOL; + // */ + // ?> + + + +---------------------------------------------------- + +[ + ["php", [ + ["delimiter", "'"], + ["operator", "+"], + ["double-quoted-string", ["\"?>\""]], + ["punctuation", ";"], + ["comment", "/* ?> */"], + ["keyword", "echo"], + ["constant", "PHP_EOL"], + ["punctuation", ";"], + ["comment", "// */"], + ["comment", "// "], + ["delimiter", "?>"] + ]], + + ["php", [ + ["delimiter", ""] + ]] +] + +---------------------------------------------------- + +Checks for PHP closing tags '?>' inside of strings and comments. diff --git a/tests/languages/php/delimiter_feature.test b/tests/languages/php/delimiter_feature.test index 15bd9a81de..f7bd684679 100644 --- a/tests/languages/php/delimiter_feature.test +++ b/tests/languages/php/delimiter_feature.test @@ -1,6 +1,6 @@ - + ---------------------------------------------------- @@ -15,10 +15,11 @@ ]], ["php", [ ["delimiter", ""] ]] ] ---------------------------------------------------- -Checks for delimiters. \ No newline at end of file +Checks for delimiters. From b06f532f1c7b0f4022b0b0cc2f283878d6a9064d Mon Sep 17 00:00:00 2001 From: ExE Boss <3889017+ExE-Boss@users.noreply.github.com> Date: Fri, 1 Mar 2019 01:19:29 +0100 Subject: [PATCH 0185/1100] Core: Avoid redeclaring variables in util.clone (#1778) This changes util.clone to be more readable and to avoid redeclaring the `clone` and `id` variables. --- components/prism-core.js | 15 ++++++++------- components/prism-core.min.js | 2 +- prism.js | 15 ++++++++------- 3 files changed, 17 insertions(+), 15 deletions(-) diff --git a/components/prism-core.js b/components/prism-core.js index 006a26f699..c68962b277 100644 --- a/components/prism-core.js +++ b/components/prism-core.js @@ -45,16 +45,16 @@ var _ = _self.Prism = { // Deep clone a language definition (e.g. to extend it) clone: function deepClone(o, visited) { - var type = _.util.type(o); + var clone, id, type = _.util.type(o); visited = visited || {}; switch (type) { case 'Object': - var id = _.util.objId(o); + id = _.util.objId(o); if (visited[id]) { return visited[id]; } - var clone = {}; + clone = {}; visited[id] = clone; for (var key in o) { @@ -66,11 +66,11 @@ var _ = _self.Prism = { return clone; case 'Array': - var id = _.util.objId(o); + id = _.util.objId(o); if (visited[id]) { return visited[id]; } - var clone = []; + clone = []; visited[id] = clone; o.forEach(function (v, i) { @@ -78,9 +78,10 @@ var _ = _self.Prism = { }); return clone; - } - return o; + default: + return o; + } } }, diff --git a/components/prism-core.min.js b/components/prism-core.min.js index 6bd6cf488b..6e073465a8 100644 --- a/components/prism-core.min.js +++ b/components/prism-core.min.js @@ -1 +1 @@ -var _self="undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{},Prism=function(){var e=/\blang(?:uage)?-([\w-]+)\b/i,t=0,a=_self.Prism={manual:_self.Prism&&_self.Prism.manual,disableWorkerMessageHandler:_self.Prism&&_self.Prism.disableWorkerMessageHandler,util:{encode:function(e){return e instanceof r?new r(e.type,a.util.encode(e.content),e.alias):"Array"===a.util.type(e)?e.map(a.util.encode):e.replace(/&/g,"&").replace(/e.length)return;if(!(w instanceof s)){if(m&&k!=t.length-1){f.lastIndex=b;var _=f.exec(e);if(!_)break;for(var P=_.index+(d?_[1].length:0),A=_.index+_[0].length,O=k,x=b,N=t.length;N>O&&(A>x||!t[O].type&&!t[O-1].greedy);++O)x+=t[O].length,P>=x&&(++k,b=x);if(t[k]instanceof s)continue;j=O-k,w=e.slice(b,x),_.index-=b}else{f.lastIndex=0;var _=f.exec(w),j=1}if(_){d&&(p=_[1]?_[1].length:0);var P=_.index+p,_=_[0].slice(p),A=P+_.length,S=w.slice(0,P),E=w.slice(A),C=[k,j];S&&(++k,b+=S.length,C.push(S));var M=new s(u,h?a.tokenize(_,h):_,v,_,m);if(C.push(M),E&&C.push(E),Array.prototype.splice.apply(t,C),1!=j&&a.matchGrammar(e,t,r,k,b,!0,u),l)break}else if(l)break}}}}},tokenize:function(e,t){var r=[e],n=t.rest;if(n){for(var i in n)t[i]=n[i];delete t.rest}return a.matchGrammar(e,r,t,0,0,!1),r},hooks:{all:{},add:function(e,t){var r=a.hooks.all;r[e]=r[e]||[],r[e].push(t)},run:function(e,t){var r=a.hooks.all[e];if(r&&r.length)for(var n,i=0;n=r[i++];)n(t)}}},r=a.Token=function(e,t,a,r,n){this.type=e,this.content=t,this.alias=a,this.length=0|(r||"").length,this.greedy=!!n};if(r.stringify=function(e,t,n){if("string"==typeof e)return e;if("Array"===a.util.type(e))return e.map(function(a){return r.stringify(a,t,e)}).join("");var i={type:e.type,content:r.stringify(e.content,t,n),tag:"span",classes:["token",e.type],attributes:{},language:t,parent:n};if(e.alias){var l="Array"===a.util.type(e.alias)?e.alias:[e.alias];Array.prototype.push.apply(i.classes,l)}a.hooks.run("wrap",i);var o=Object.keys(i.attributes).map(function(e){return e+'="'+(i.attributes[e]||"").replace(/"/g,""")+'"'}).join(" ");return"<"+i.tag+' class="'+i.classes.join(" ")+'"'+(o?" "+o:"")+">"+i.content+""},!_self.document)return _self.addEventListener?(a.disableWorkerMessageHandler||_self.addEventListener("message",function(e){var t=JSON.parse(e.data),r=t.language,n=t.code,i=t.immediateClose;_self.postMessage(a.highlight(n,a.languages[r],r)),i&&_self.close()},!1),_self.Prism):_self.Prism;var n=document.currentScript||[].slice.call(document.getElementsByTagName("script")).pop();return n&&(a.filename=n.src,a.manual||n.hasAttribute("data-manual")||("loading"!==document.readyState?window.requestAnimationFrame?window.requestAnimationFrame(a.highlightAll):window.setTimeout(a.highlightAll,16):document.addEventListener("DOMContentLoaded",a.highlightAll))),_self.Prism}();"undefined"!=typeof module&&module.exports&&(module.exports=Prism),"undefined"!=typeof global&&(global.Prism=Prism); \ No newline at end of file +var _self="undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{},Prism=function(){var e=/\blang(?:uage)?-([\w-]+)\b/i,t=0,a=_self.Prism={manual:_self.Prism&&_self.Prism.manual,disableWorkerMessageHandler:_self.Prism&&_self.Prism.disableWorkerMessageHandler,util:{encode:function(e){return e instanceof n?new n(e.type,a.util.encode(e.content),e.alias):"Array"===a.util.type(e)?e.map(a.util.encode):e.replace(/&/g,"&").replace(/e.length)return;if(!(w instanceof s)){if(m&&k!=t.length-1){f.lastIndex=b;var _=f.exec(e);if(!_)break;for(var P=_.index+(d?_[1].length:0),A=_.index+_[0].length,O=k,x=b,N=t.length;N>O&&(A>x||!t[O].type&&!t[O-1].greedy);++O)x+=t[O].length,P>=x&&(++k,b=x);if(t[k]instanceof s)continue;j=O-k,w=e.slice(b,x),_.index-=b}else{f.lastIndex=0;var _=f.exec(w),j=1}if(_){d&&(p=_[1]?_[1].length:0);var P=_.index+p,_=_[0].slice(p),A=P+_.length,S=w.slice(0,P),E=w.slice(A),C=[k,j];S&&(++k,b+=S.length,C.push(S));var M=new s(u,h?a.tokenize(_,h):_,y,_,m);if(C.push(M),E&&C.push(E),Array.prototype.splice.apply(t,C),1!=j&&a.matchGrammar(e,t,n,k,b,!0,u),l)break}else if(l)break}}}}},tokenize:function(e,t){var n=[e],r=t.rest;if(r){for(var i in r)t[i]=r[i];delete t.rest}return a.matchGrammar(e,n,t,0,0,!1),n},hooks:{all:{},add:function(e,t){var n=a.hooks.all;n[e]=n[e]||[],n[e].push(t)},run:function(e,t){var n=a.hooks.all[e];if(n&&n.length)for(var r,i=0;r=n[i++];)r(t)}}},n=a.Token=function(e,t,a,n,r){this.type=e,this.content=t,this.alias=a,this.length=0|(n||"").length,this.greedy=!!r};if(n.stringify=function(e,t,r){if("string"==typeof e)return e;if("Array"===a.util.type(e))return e.map(function(a){return n.stringify(a,t,e)}).join("");var i={type:e.type,content:n.stringify(e.content,t,r),tag:"span",classes:["token",e.type],attributes:{},language:t,parent:r};if(e.alias){var l="Array"===a.util.type(e.alias)?e.alias:[e.alias];Array.prototype.push.apply(i.classes,l)}a.hooks.run("wrap",i);var o=Object.keys(i.attributes).map(function(e){return e+'="'+(i.attributes[e]||"").replace(/"/g,""")+'"'}).join(" ");return"<"+i.tag+' class="'+i.classes.join(" ")+'"'+(o?" "+o:"")+">"+i.content+""},!_self.document)return _self.addEventListener?(a.disableWorkerMessageHandler||_self.addEventListener("message",function(e){var t=JSON.parse(e.data),n=t.language,r=t.code,i=t.immediateClose;_self.postMessage(a.highlight(r,a.languages[n],n)),i&&_self.close()},!1),_self.Prism):_self.Prism;var r=document.currentScript||[].slice.call(document.getElementsByTagName("script")).pop();return r&&(a.filename=r.src,a.manual||r.hasAttribute("data-manual")||("loading"!==document.readyState?window.requestAnimationFrame?window.requestAnimationFrame(a.highlightAll):window.setTimeout(a.highlightAll,16):document.addEventListener("DOMContentLoaded",a.highlightAll))),_self.Prism}();"undefined"!=typeof module&&module.exports&&(module.exports=Prism),"undefined"!=typeof global&&(global.Prism=Prism); \ No newline at end of file diff --git a/prism.js b/prism.js index b21ba6c936..220fc30524 100644 --- a/prism.js +++ b/prism.js @@ -50,16 +50,16 @@ var _ = _self.Prism = { // Deep clone a language definition (e.g. to extend it) clone: function deepClone(o, visited) { - var type = _.util.type(o); + var clone, id, type = _.util.type(o); visited = visited || {}; switch (type) { case 'Object': - var id = _.util.objId(o); + id = _.util.objId(o); if (visited[id]) { return visited[id]; } - var clone = {}; + clone = {}; visited[id] = clone; for (var key in o) { @@ -71,11 +71,11 @@ var _ = _self.Prism = { return clone; case 'Array': - var id = _.util.objId(o); + id = _.util.objId(o); if (visited[id]) { return visited[id]; } - var clone = []; + clone = []; visited[id] = clone; o.forEach(function (v, i) { @@ -83,9 +83,10 @@ var _ = _self.Prism = { }); return clone; - } - return o; + default: + return o; + } } }, From 06627f6ac66584b61dfa3e3153564d16b3ca58c8 Mon Sep 17 00:00:00 2001 From: ExE Boss <3889017+ExE-Boss@users.noreply.github.com> Date: Fri, 1 Mar 2019 13:41:02 +0100 Subject: [PATCH 0186/1100] =?UTF-8?q?Update=20gulp=20to=C2=A0version=C2=A0?= =?UTF-8?q?4.0.0=20(#1779)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gulpfile.js | 12 +++++++----- package.json | 2 +- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index 9837f2bf18..6759e12fc6 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -75,7 +75,7 @@ gulp.task('build', function() { .pipe(gulp.dest('./')); }); -gulp.task('plugins', ['languages-plugins'], function(cb) { +function plugins(cb) { pump( [ gulp.src(paths.plugins), @@ -86,7 +86,7 @@ gulp.task('plugins', ['languages-plugins'], function(cb) { ], cb ); -}); +} gulp.task('components-json', function (cb) { componentsPromise.then(function (data) { @@ -97,8 +97,8 @@ gulp.task('components-json', function (cb) { }); gulp.task('watch', function() { - gulp.watch(paths.components, ['components', 'build']); - gulp.watch(paths.plugins, ['plugins', 'build']); + gulp.watch(paths.components, gulp.parallel('components', 'build')); + gulp.watch(paths.plugins, gulp.parallel('plugins', 'build')); }); gulp.task('languages-plugins', function (cb) { @@ -184,6 +184,8 @@ gulp.task('languages-plugins', function (cb) { }); }); +gulp.task('plugins', gulp.series('languages-plugins', plugins)); + gulp.task('changelog', function (cb) { return gulp.src(paths.changelog) .pipe(replace( @@ -199,4 +201,4 @@ gulp.task('changelog', function (cb) { .pipe(gulp.dest('.')); }); -gulp.task('default', ['components', 'components-json', 'plugins', 'build']); +gulp.task('default', gulp.parallel('components', 'components-json', 'plugins', 'build')); diff --git a/package.json b/package.json index 9ef549d3d8..e41b1caa91 100755 --- a/package.json +++ b/package.json @@ -23,7 +23,7 @@ }, "devDependencies": { "chai": "^2.3.0", - "gulp": "^3.8.6", + "gulp": "^4.0.0", "gulp-concat": "^2.3.4", "gulp-header": "^1.0.5", "gulp-rename": "^1.2.0", From 3b396ef51c9e9671639f16797de3b3f79bdf0530 Mon Sep 17 00:00:00 2001 From: wippysnib Date: Sat, 2 Mar 2019 04:09:06 -0600 Subject: [PATCH 0187/1100] Added new SAS keywords (#1784) This adds the SAS keywords libname, set, output, and options to the language definition. --- components/prism-sas.js | 2 +- components/prism-sas.min.js | 2 +- tests/languages/sas/keyword_feature.test | 6 ++++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/components/prism-sas.js b/components/prism-sas.js index cbaa034eec..607995c820 100644 --- a/components/prism-sas.js +++ b/components/prism-sas.js @@ -26,7 +26,7 @@ Prism.languages.sas = { pattern: /(["'])(?:\1\1|(?!\1)[\s\S])*\1/, greedy: true }, - 'keyword': /\b(?:data|else|format|if|input|proc\s\w+|quit|run|then)\b/i, + 'keyword': /\b(?:data|else|format|if|input|proc\s\w+|quit|run|then|libname|set|output|options)\b/i, // Decimal (1.2e23), hexadecimal (0c1x) 'number': /\b(?:[\da-f]+x|\d+(?:\.\d+)?(?:e[+-]?\d+)?)/i, 'operator': /\*\*?|\|\|?|!!?|¦¦?|<[>=]?|>[<=]?|[-+\/=&]|[~¬^]=?|\b(?:eq|ne|gt|lt|ge|le|in|not)\b/i, diff --git a/components/prism-sas.min.js b/components/prism-sas.min.js index 0ad62f2c51..b6ea705c9a 100644 --- a/components/prism-sas.min.js +++ b/components/prism-sas.min.js @@ -1 +1 @@ -Prism.languages.sas={datalines:{pattern:/^\s*(?:(?:data)?lines|cards);[\s\S]+?(?:\r?\n|\r);/im,alias:"string",inside:{keyword:{pattern:/^(\s*)(?:(?:data)?lines|cards)/i,lookbehind:!0},punctuation:/;/}},comment:[{pattern:/(^\s*|;\s*)\*.*;/m,lookbehind:!0},/\/\*[\s\S]+?\*\//],datetime:{pattern:/'[^']+'(?:dt?|t)\b/i,alias:"number"},string:{pattern:/(["'])(?:\1\1|(?!\1)[\s\S])*\1/,greedy:!0},keyword:/\b(?:data|else|format|if|input|proc\s\w+|quit|run|then)\b/i,number:/\b(?:[\da-f]+x|\d+(?:\.\d+)?(?:e[+-]?\d+)?)/i,operator:/\*\*?|\|\|?|!!?|¦¦?|<[>=]?|>[<=]?|[-+\/=&]|[~¬^]=?|\b(?:eq|ne|gt|lt|ge|le|in|not)\b/i,punctuation:/[$%@.(){}\[\];,\\]/}; \ No newline at end of file +Prism.languages.sas={datalines:{pattern:/^\s*(?:(?:data)?lines|cards);[\s\S]+?(?:\r?\n|\r);/im,alias:"string",inside:{keyword:{pattern:/^(\s*)(?:(?:data)?lines|cards)/i,lookbehind:!0},punctuation:/;/}},comment:[{pattern:/(^\s*|;\s*)\*.*;/m,lookbehind:!0},/\/\*[\s\S]+?\*\//],datetime:{pattern:/'[^']+'(?:dt?|t)\b/i,alias:"number"},string:{pattern:/(["'])(?:\1\1|(?!\1)[\s\S])*\1/,greedy:!0},keyword:/\b(?:data|else|format|if|input|proc\s\w+|quit|run|then|libname|set|output|options)\b/i,number:/\b(?:[\da-f]+x|\d+(?:\.\d+)?(?:e[+-]?\d+)?)/i,operator:/\*\*?|\|\|?|!!?|¦¦?|<[>=]?|>[<=]?|[-+\/=&]|[~¬^]=?|\b(?:eq|ne|gt|lt|ge|le|in|not)\b/i,punctuation:/[$%@.(){}\[\];,\\]/}; diff --git a/tests/languages/sas/keyword_feature.test b/tests/languages/sas/keyword_feature.test index 697a4120ec..90f86929aa 100644 --- a/tests/languages/sas/keyword_feature.test +++ b/tests/languages/sas/keyword_feature.test @@ -1,13 +1,15 @@ data else format if input proc run then +libname set output options ---------------------------------------------------- [ ["keyword", "data"], ["keyword", "else"], ["keyword", "format"], ["keyword", "if"], - ["keyword", "input"], ["keyword", "proc run"], ["keyword", "then"] + ["keyword", "input"], ["keyword", "proc run"], ["keyword", "then"], ["keyword", "libname"], + ["keyword", "set"], ["keyword", "output"], ["keyword", "options"] ] ---------------------------------------------------- -Checks for all keywords. \ No newline at end of file +Checks for all keywords. From bac09f0a437d3c48f5d169b10323f0fdaab843ec Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Sat, 2 Mar 2019 17:27:19 +0100 Subject: [PATCH 0188/1100] Made prism-core a little more editor friendly (#1776) This makes the structure of prism-core easier to understand for editors. --- components/prism-core.js | 24 +++++++++++++----------- components/prism-core.min.js | 2 +- components/prism-sas.min.js | 2 +- prism.js | 24 +++++++++++++----------- 4 files changed, 28 insertions(+), 24 deletions(-) diff --git a/components/prism-core.js b/components/prism-core.js index c68962b277..cd4805d6e6 100644 --- a/components/prism-core.js +++ b/components/prism-core.js @@ -12,13 +12,13 @@ var _self = (typeof window !== 'undefined') * @author Lea Verou http://lea.verou.me */ -var Prism = (function(){ +var Prism = (function (_self){ // Private helper vars var lang = /\blang(?:uage)?-([\w-]+)\b/i; var uniqueId = 0; -var _ = _self.Prism = { +var _ = { manual: _self.Prism && _self.Prism.manual, disableWorkerMessageHandler: _self.Prism && _self.Prism.disableWorkerMessageHandler, util: { @@ -278,8 +278,6 @@ var _ = _self.Prism = { }, matchGrammar: function (text, strarr, grammar, index, startPos, oneshot, target) { - var Token = _.Token; - for (var token in grammar) { if(!grammar.hasOwnProperty(token) || !grammar[token]) { continue; @@ -445,17 +443,21 @@ var _ = _self.Prism = { callback(env); } } - } + }, + + Token: Token }; -var Token = _.Token = function(type, content, alias, matchedStr, greedy) { +_self.Prism = _; + +function Token(type, content, alias, matchedStr, greedy) { this.type = type; this.content = content; this.alias = alias; // Copy of the full string this token was created from this.length = (matchedStr || "").length|0; this.greedy = !!greedy; -}; +} Token.stringify = function(o, language, parent) { if (typeof o == 'string') { @@ -496,7 +498,7 @@ Token.stringify = function(o, language, parent) { if (!_self.document) { if (!_self.addEventListener) { // in Node.js - return _self.Prism; + return _; } if (!_.disableWorkerMessageHandler) { @@ -514,7 +516,7 @@ if (!_self.document) { }, false); } - return _self.Prism; + return _; } //Get current script and highlight @@ -537,9 +539,9 @@ if (script) { } } -return _self.Prism; +return _; -})(); +})(_self); if (typeof module !== 'undefined' && module.exports) { module.exports = Prism; diff --git a/components/prism-core.min.js b/components/prism-core.min.js index 6e073465a8..b7ce314ab2 100644 --- a/components/prism-core.min.js +++ b/components/prism-core.min.js @@ -1 +1 @@ -var _self="undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{},Prism=function(){var e=/\blang(?:uage)?-([\w-]+)\b/i,t=0,a=_self.Prism={manual:_self.Prism&&_self.Prism.manual,disableWorkerMessageHandler:_self.Prism&&_self.Prism.disableWorkerMessageHandler,util:{encode:function(e){return e instanceof n?new n(e.type,a.util.encode(e.content),e.alias):"Array"===a.util.type(e)?e.map(a.util.encode):e.replace(/&/g,"&").replace(/e.length)return;if(!(w instanceof s)){if(m&&k!=t.length-1){f.lastIndex=b;var _=f.exec(e);if(!_)break;for(var P=_.index+(d?_[1].length:0),A=_.index+_[0].length,O=k,x=b,N=t.length;N>O&&(A>x||!t[O].type&&!t[O-1].greedy);++O)x+=t[O].length,P>=x&&(++k,b=x);if(t[k]instanceof s)continue;j=O-k,w=e.slice(b,x),_.index-=b}else{f.lastIndex=0;var _=f.exec(w),j=1}if(_){d&&(p=_[1]?_[1].length:0);var P=_.index+p,_=_[0].slice(p),A=P+_.length,S=w.slice(0,P),E=w.slice(A),C=[k,j];S&&(++k,b+=S.length,C.push(S));var M=new s(u,h?a.tokenize(_,h):_,y,_,m);if(C.push(M),E&&C.push(E),Array.prototype.splice.apply(t,C),1!=j&&a.matchGrammar(e,t,n,k,b,!0,u),l)break}else if(l)break}}}}},tokenize:function(e,t){var n=[e],r=t.rest;if(r){for(var i in r)t[i]=r[i];delete t.rest}return a.matchGrammar(e,n,t,0,0,!1),n},hooks:{all:{},add:function(e,t){var n=a.hooks.all;n[e]=n[e]||[],n[e].push(t)},run:function(e,t){var n=a.hooks.all[e];if(n&&n.length)for(var r,i=0;r=n[i++];)r(t)}}},n=a.Token=function(e,t,a,n,r){this.type=e,this.content=t,this.alias=a,this.length=0|(n||"").length,this.greedy=!!r};if(n.stringify=function(e,t,r){if("string"==typeof e)return e;if("Array"===a.util.type(e))return e.map(function(a){return n.stringify(a,t,e)}).join("");var i={type:e.type,content:n.stringify(e.content,t,r),tag:"span",classes:["token",e.type],attributes:{},language:t,parent:r};if(e.alias){var l="Array"===a.util.type(e.alias)?e.alias:[e.alias];Array.prototype.push.apply(i.classes,l)}a.hooks.run("wrap",i);var o=Object.keys(i.attributes).map(function(e){return e+'="'+(i.attributes[e]||"").replace(/"/g,""")+'"'}).join(" ");return"<"+i.tag+' class="'+i.classes.join(" ")+'"'+(o?" "+o:"")+">"+i.content+""},!_self.document)return _self.addEventListener?(a.disableWorkerMessageHandler||_self.addEventListener("message",function(e){var t=JSON.parse(e.data),n=t.language,r=t.code,i=t.immediateClose;_self.postMessage(a.highlight(r,a.languages[n],n)),i&&_self.close()},!1),_self.Prism):_self.Prism;var r=document.currentScript||[].slice.call(document.getElementsByTagName("script")).pop();return r&&(a.filename=r.src,a.manual||r.hasAttribute("data-manual")||("loading"!==document.readyState?window.requestAnimationFrame?window.requestAnimationFrame(a.highlightAll):window.setTimeout(a.highlightAll,16):document.addEventListener("DOMContentLoaded",a.highlightAll))),_self.Prism}();"undefined"!=typeof module&&module.exports&&(module.exports=Prism),"undefined"!=typeof global&&(global.Prism=Prism); \ No newline at end of file +var _self="undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{},Prism=function(e){function t(e,t,a,n,r){this.type=e,this.content=t,this.alias=a,this.length=0|(n||"").length,this.greedy=!!r}var a=/\blang(?:uage)?-([\w-]+)\b/i,n=0,r={manual:e.Prism&&e.Prism.manual,disableWorkerMessageHandler:e.Prism&&e.Prism.disableWorkerMessageHandler,util:{encode:function(e){return e instanceof t?new t(e.type,r.util.encode(e.content),e.alias):"Array"===r.util.type(e)?e.map(r.util.encode):e.replace(/&/g,"&").replace(/e.length)return;if(!(w instanceof t)){if(p&&k!=a.length-1){h.lastIndex=b;var A=h.exec(e);if(!A)break;for(var P=A.index+(f?A[1].length:0),O=A.index+A[0].length,x=k,N=b,j=a.length;j>x&&(O>N||!a[x].type&&!a[x-1].greedy);++x)N+=a[x].length,P>=N&&(++k,b=N);if(a[k]instanceof t)continue;S=x-k,w=e.slice(b,N),A.index-=b}else{h.lastIndex=0;var A=h.exec(w),S=1}if(A){f&&(m=A[1]?A[1].length:0);var P=A.index+m,A=A[0].slice(m),O=P+A.length,E=w.slice(0,P),_=w.slice(O),C=[k,S];E&&(++k,b+=E.length,C.push(E));var M=new t(u,d?r.tokenize(A,d):A,y,A,p);if(C.push(M),_&&C.push(_),Array.prototype.splice.apply(a,C),1!=S&&r.matchGrammar(e,a,n,k,b,!0,u),o)break}else if(o)break}}}}},tokenize:function(e,t){var a=[e],n=t.rest;if(n){for(var i in n)t[i]=n[i];delete t.rest}return r.matchGrammar(e,a,t,0,0,!1),a},hooks:{all:{},add:function(e,t){var a=r.hooks.all;a[e]=a[e]||[],a[e].push(t)},run:function(e,t){var a=r.hooks.all[e];if(a&&a.length)for(var n,i=0;n=a[i++];)n(t)}},Token:t};if(e.Prism=r,t.stringify=function(e,a,n){if("string"==typeof e)return e;if("Array"===r.util.type(e))return e.map(function(n){return t.stringify(n,a,e)}).join("");var i={type:e.type,content:t.stringify(e.content,a,n),tag:"span",classes:["token",e.type],attributes:{},language:a,parent:n};if(e.alias){var l="Array"===r.util.type(e.alias)?e.alias:[e.alias];Array.prototype.push.apply(i.classes,l)}r.hooks.run("wrap",i);var o=Object.keys(i.attributes).map(function(e){return e+'="'+(i.attributes[e]||"").replace(/"/g,""")+'"'}).join(" ");return"<"+i.tag+' class="'+i.classes.join(" ")+'"'+(o?" "+o:"")+">"+i.content+""},!e.document)return e.addEventListener?(r.disableWorkerMessageHandler||e.addEventListener("message",function(t){var a=JSON.parse(t.data),n=a.language,i=a.code,l=a.immediateClose;e.postMessage(r.highlight(i,r.languages[n],n)),l&&e.close()},!1),r):r;var i=document.currentScript||[].slice.call(document.getElementsByTagName("script")).pop();return i&&(r.filename=i.src,r.manual||i.hasAttribute("data-manual")||("loading"!==document.readyState?window.requestAnimationFrame?window.requestAnimationFrame(r.highlightAll):window.setTimeout(r.highlightAll,16):document.addEventListener("DOMContentLoaded",r.highlightAll))),r}(_self);"undefined"!=typeof module&&module.exports&&(module.exports=Prism),"undefined"!=typeof global&&(global.Prism=Prism); \ No newline at end of file diff --git a/components/prism-sas.min.js b/components/prism-sas.min.js index b6ea705c9a..e89383b616 100644 --- a/components/prism-sas.min.js +++ b/components/prism-sas.min.js @@ -1 +1 @@ -Prism.languages.sas={datalines:{pattern:/^\s*(?:(?:data)?lines|cards);[\s\S]+?(?:\r?\n|\r);/im,alias:"string",inside:{keyword:{pattern:/^(\s*)(?:(?:data)?lines|cards)/i,lookbehind:!0},punctuation:/;/}},comment:[{pattern:/(^\s*|;\s*)\*.*;/m,lookbehind:!0},/\/\*[\s\S]+?\*\//],datetime:{pattern:/'[^']+'(?:dt?|t)\b/i,alias:"number"},string:{pattern:/(["'])(?:\1\1|(?!\1)[\s\S])*\1/,greedy:!0},keyword:/\b(?:data|else|format|if|input|proc\s\w+|quit|run|then|libname|set|output|options)\b/i,number:/\b(?:[\da-f]+x|\d+(?:\.\d+)?(?:e[+-]?\d+)?)/i,operator:/\*\*?|\|\|?|!!?|¦¦?|<[>=]?|>[<=]?|[-+\/=&]|[~¬^]=?|\b(?:eq|ne|gt|lt|ge|le|in|not)\b/i,punctuation:/[$%@.(){}\[\];,\\]/}; +Prism.languages.sas={datalines:{pattern:/^\s*(?:(?:data)?lines|cards);[\s\S]+?(?:\r?\n|\r);/im,alias:"string",inside:{keyword:{pattern:/^(\s*)(?:(?:data)?lines|cards)/i,lookbehind:!0},punctuation:/;/}},comment:[{pattern:/(^\s*|;\s*)\*.*;/m,lookbehind:!0},/\/\*[\s\S]+?\*\//],datetime:{pattern:/'[^']+'(?:dt?|t)\b/i,alias:"number"},string:{pattern:/(["'])(?:\1\1|(?!\1)[\s\S])*\1/,greedy:!0},keyword:/\b(?:data|else|format|if|input|proc\s\w+|quit|run|then|libname|set|output|options)\b/i,number:/\b(?:[\da-f]+x|\d+(?:\.\d+)?(?:e[+-]?\d+)?)/i,operator:/\*\*?|\|\|?|!!?|¦¦?|<[>=]?|>[<=]?|[-+\/=&]|[~¬^]=?|\b(?:eq|ne|gt|lt|ge|le|in|not)\b/i,punctuation:/[$%@.(){}\[\];,\\]/}; \ No newline at end of file diff --git a/prism.js b/prism.js index 220fc30524..c638806b56 100644 --- a/prism.js +++ b/prism.js @@ -17,13 +17,13 @@ var _self = (typeof window !== 'undefined') * @author Lea Verou http://lea.verou.me */ -var Prism = (function(){ +var Prism = (function (_self){ // Private helper vars var lang = /\blang(?:uage)?-([\w-]+)\b/i; var uniqueId = 0; -var _ = _self.Prism = { +var _ = { manual: _self.Prism && _self.Prism.manual, disableWorkerMessageHandler: _self.Prism && _self.Prism.disableWorkerMessageHandler, util: { @@ -283,8 +283,6 @@ var _ = _self.Prism = { }, matchGrammar: function (text, strarr, grammar, index, startPos, oneshot, target) { - var Token = _.Token; - for (var token in grammar) { if(!grammar.hasOwnProperty(token) || !grammar[token]) { continue; @@ -450,17 +448,21 @@ var _ = _self.Prism = { callback(env); } } - } + }, + + Token: Token }; -var Token = _.Token = function(type, content, alias, matchedStr, greedy) { +_self.Prism = _; + +function Token(type, content, alias, matchedStr, greedy) { this.type = type; this.content = content; this.alias = alias; // Copy of the full string this token was created from this.length = (matchedStr || "").length|0; this.greedy = !!greedy; -}; +} Token.stringify = function(o, language, parent) { if (typeof o == 'string') { @@ -501,7 +503,7 @@ Token.stringify = function(o, language, parent) { if (!_self.document) { if (!_self.addEventListener) { // in Node.js - return _self.Prism; + return _; } if (!_.disableWorkerMessageHandler) { @@ -519,7 +521,7 @@ if (!_self.document) { }, false); } - return _self.Prism; + return _; } //Get current script and highlight @@ -542,9 +544,9 @@ if (script) { } } -return _self.Prism; +return _; -})(); +})(_self); if (typeof module !== 'undefined' && module.exports) { module.exports = Prism; From 6c9fe257e57e4279d395b0c9496b27ed2342a2d0 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Sat, 2 Mar 2019 17:43:23 +0100 Subject: [PATCH 0189/1100] gulp: Refactoring (#1780) Refactored gulpfile.js --- gulpfile.js | 253 +++++++++++++++++++++++++--------------------------- 1 file changed, 123 insertions(+), 130 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index 6759e12fc6..0e1a88e4bb 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -1,110 +1,99 @@ -var gulp = require('gulp'), - rename = require('gulp-rename'), - uglify = require('gulp-uglify'), - header = require('gulp-header'), - concat = require('gulp-concat'), - replace = require('gulp-replace'), - pump = require('pump'), - fs = require('fs'), - - paths = { - componentsFile: 'components.json', - componentsFileJS: 'components.js', - components: ['components/**/*.js', '!components/index.js', '!components/**/*.min.js'], - main: [ - 'components/prism-core.js', - 'components/prism-markup.js', - 'components/prism-css.js', - 'components/prism-clike.js', - 'components/prism-javascript.js', - 'plugins/file-highlight/prism-file-highlight.js' - ], - plugins: ['plugins/**/*.js', '!plugins/**/*.min.js'], - showLanguagePlugin: 'plugins/show-language/prism-show-language.js', - autoloaderPlugin: 'plugins/autoloader/prism-autoloader.js', - changelog: 'CHANGELOG.md' - }, - - componentsPromise = new Promise(function (resolve, reject) { - fs.readFile(paths.componentsFile, { - encoding: 'utf-8' - }, function (err, data) { - if (!err) { - resolve(JSON.parse(data)); - } else { - reject(err); - } - }); - }), - - inlineRegexSource = function () { - return replace( - /\/((?:[^\n\r[\\\/]|\\.|\[(?:[^\n\r\\\]]|\\.)*\])*)\/\.source\b/g, - function (m, source) { - // escape backslashes - source = source.replace(/\\/g, '\\\\'); - // escape single quotes - source = source.replace(/'/g, "\\'"); - // unescape characters like \\n and \\t to \n and \t - source = source.replace(/(^|[^\\])\\\\([nrt0])/g, '$1\\$2'); - // wrap source in single quotes - return "'" + source + "'"; - } - ); - }; - -gulp.task('components', function(cb) { - pump( - [ - gulp.src(paths.components), - inlineRegexSource(), - uglify(), - rename({ suffix: '.min' }), - gulp.dest('components') - ], - cb - ); -}); - -gulp.task('build', function() { - return gulp.src(paths.main) - .pipe(header('\n/* **********************************************\n' + - ' Begin <%= file.relative %>\n' + - '********************************************** */\n\n')) - .pipe(concat('prism.js')) - .pipe(gulp.dest('./')); +const { src, dest, series, parallel, watch } = require('gulp'); + +const rename = require('gulp-rename'); +const uglify = require('gulp-uglify'); +const header = require('gulp-header'); +const concat = require('gulp-concat'); +const replace = require('gulp-replace'); +const pump = require('pump'); +const fs = require('fs'); + +const paths = { + componentsFile: 'components.json', + componentsFileJS: 'components.js', + components: ['components/**/*.js', '!components/index.js', '!components/**/*.min.js'], + main: [ + 'components/prism-core.js', + 'components/prism-markup.js', + 'components/prism-css.js', + 'components/prism-clike.js', + 'components/prism-javascript.js', + 'plugins/file-highlight/prism-file-highlight.js' + ], + plugins: ['plugins/**/*.js', '!plugins/**/*.min.js'], + showLanguagePlugin: 'plugins/show-language/prism-show-language.js', + autoloaderPlugin: 'plugins/autoloader/prism-autoloader.js', + changelog: 'CHANGELOG.md' +}; + +const componentsPromise = new Promise((resolve, reject) => { + fs.readFile(paths.componentsFile, { + encoding: 'utf-8' + }, (err, data) => { + if (!err) { + resolve(JSON.parse(data)); + } else { + reject(err); + } + }); }); -function plugins(cb) { - pump( - [ - gulp.src(paths.plugins), - inlineRegexSource(), - uglify(), - rename({ suffix: '.min' }), - gulp.dest('plugins') - ], - cb +function inlineRegexSource() { + return replace( + /\/((?:[^\n\r[\\\/]|\\.|\[(?:[^\n\r\\\]]|\\.)*\])*)\/\.source\b/g, + (m, source) => { + // escape backslashes + source = source.replace(/\\/g, '\\\\'); + // escape single quotes + source = source.replace(/'/g, "\\'"); + // unescape characters like \\n and \\t to \n and \t + source = source.replace(/(^|[^\\])\\\\([nrt0])/g, '$1\\$2'); + // wrap source in single quotes + return "'" + source + "'"; + } ); } -gulp.task('components-json', function (cb) { - componentsPromise.then(function (data) { - data = 'var components = ' + JSON.stringify(data) + ';\n' + - 'if (typeof module !== \'undefined\' && module.exports) { module.exports = components; }'; - fs.writeFile(paths.componentsFileJS, data, cb); +function minifyJS() { + return [ + inlineRegexSource(), + uglify() + ]; +} + + +function minifyComponents(cb) { + pump([src(paths.components), ...minifyJS(), rename({ suffix: '.min' }), dest('components')], cb); +} +function minifyPlugins(cb) { + pump([src(paths.plugins), ...minifyJS(), rename({ suffix: '.min' }), dest('plugins')], cb); +} +function build(cb) { + pump([src(paths.main), header(` +/* ********************************************** + Begin <%= file.relative %> +********************************************** */ + +`), concat('prism.js'), dest('./')], cb); +} + +function componentsJsonToJs(cb) { + componentsPromise.then(data => { + const js = `var components = ${JSON.stringify(data)}; +if (typeof module !== 'undefined' && module.exports) { module.exports = components; }`; + fs.writeFile(paths.componentsFileJS, js, cb); }); -}); +} -gulp.task('watch', function() { - gulp.watch(paths.components, gulp.parallel('components', 'build')); - gulp.watch(paths.plugins, gulp.parallel('plugins', 'build')); -}); +function watchComponentsAndPlugins() { + watch(paths.components, parallel(minifyComponents, build)); + watch(paths.plugins, parallel(minifyPlugins, build)); +} -gulp.task('languages-plugins', function (cb) { - componentsPromise.then(function (data) { - var languagesMap = {}; - var dependenciesMap = {}; +function languagePlugins(cb) { + componentsPromise.then(data => { + const languagesMap = {}; + const dependenciesMap = {}; /** * Tries to guess the name of a language given its id. @@ -127,13 +116,13 @@ gulp.task('languages-plugins', function (cb) { } } - for (var p in data.languages) { + for (const p in data.languages) { if (p !== 'meta') { - var title = data.languages[p].displayTitle || data.languages[p].title; + const title = data.languages[p].displayTitle || data.languages[p].title; addLanguageTitle(p, title); - for (var name in data.languages[p].aliasTitles) { + for (const name in data.languages[p].aliasTitles) { addLanguageTitle(name, data.languages[p].aliasTitles[name]); } @@ -153,52 +142,56 @@ gulp.task('languages-plugins', function (cb) { } } - var jsonLanguagesMap = JSON.stringify(languagesMap); - var jsonDependenciesMap = JSON.stringify(dependenciesMap); + const jsonLanguagesMap = JSON.stringify(languagesMap); + const jsonDependenciesMap = JSON.stringify(dependenciesMap); - var tasks = [ - {plugin: paths.showLanguagePlugin, map: jsonLanguagesMap}, - {plugin: paths.autoloaderPlugin, map: jsonDependenciesMap} + const tasks = [ + { plugin: paths.showLanguagePlugin, map: jsonLanguagesMap }, + { plugin: paths.autoloaderPlugin, map: jsonDependenciesMap } ]; - var cpt = 0; - var l = tasks.length; - var done = function() { + let cpt = 0; + const l = tasks.length; + const done = () => { cpt++; - if(cpt === l) { + if (cpt === l) { cb && cb(); } }; - tasks.forEach(function(task) { - var stream = gulp.src(task.plugin) + for (const task of tasks) { + const stream = src(task.plugin) .pipe(replace( /\/\*languages_placeholder\[\*\/[\s\S]*?\/\*\]\*\//, '/*languages_placeholder[*/' + task.map + '/*]*/' )) - .pipe(gulp.dest(task.plugin.substring(0, task.plugin.lastIndexOf('/')))); + .pipe(dest(task.plugin.substring(0, task.plugin.lastIndexOf('/')))); stream.on('error', done); stream.on('end', done); - }); + } }); -}); - -gulp.task('plugins', gulp.series('languages-plugins', plugins)); +} -gulp.task('changelog', function (cb) { - return gulp.src(paths.changelog) - .pipe(replace( +function changelog(cb) { + return pump([ + src(paths.changelog), + replace( /#(\d+)(?![\d\]])/g, '[#$1](https://github.com/PrismJS/prism/issues/$1)' - )) - .pipe(replace( + ), + replace( /\[[\da-f]+(?:, *[\da-f]+)*\]/g, - function (match) { - return match.replace(/([\da-f]{7})[\da-f]*/g, '[`$1`](https://github.com/PrismJS/prism/commit/$1)'); - } - )) - .pipe(gulp.dest('.')); -}); + m => m.replace(/([\da-f]{7})[\da-f]*/g, '[`$1`](https://github.com/PrismJS/prism/commit/$1)') + ), + dest('.') + ], cb); +} + +const components = minifyComponents; +const plugins = series(languagePlugins, minifyPlugins); + -gulp.task('default', gulp.parallel('components', 'components-json', 'plugins', 'build')); +exports.watch = watchComponentsAndPlugins; +exports.default = parallel(components, plugins, componentsJsonToJs, build); +exports.changelog = changelog; From b62e282b582a641cbb3906cd4444f132317a7a26 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Sun, 3 Mar 2019 00:01:55 +0100 Subject: [PATCH 0190/1100] Markup-templating improvements (#1653) This makes minor improvements to markup-templating. --- components/prism-markup-templating.js | 178 +++++++++++++--------- components/prism-markup-templating.min.js | 2 +- 2 files changed, 107 insertions(+), 73 deletions(-) diff --git a/components/prism-markup-templating.js b/components/prism-markup-templating.js index 24dbc26fae..1c22f943b1 100644 --- a/components/prism-markup-templating.js +++ b/components/prism-markup-templating.js @@ -1,89 +1,123 @@ -Prism.languages['markup-templating'] = {}; - -Object.defineProperties(Prism.languages['markup-templating'], { - buildPlaceholders: { - // Tokenize all inline templating expressions matching placeholderPattern - // If the replaceFilter function is provided, it will be called with every match. - // If it returns false, the match will not be replaced. - value: function (env, language, placeholderPattern, replaceFilter) { - if (env.language !== language) { - return; - } +(function (Prism) { - env.tokenStack = []; + /** + * Returns the placeholder for the given language id and index. + * + * @param {string} language + * @param {string|number} index + * @returns {string} + */ + function getPlaceholder(language, index) { + return '___' + language.toUpperCase() + index + '___'; + } - env.code = env.code.replace(placeholderPattern, function(match) { - if (typeof replaceFilter === 'function' && !replaceFilter(match)) { - return match; + Object.defineProperties(Prism.languages['markup-templating'] = {}, { + buildPlaceholders: { + /** + * Tokenize all inline templating expressions matching `placeholderPattern`. + * + * If `replaceFilter` is provided, only matches of `placeholderPattern` for which `replaceFilter` returns + * `true` will be replaced. + * + * @param {object} env The environment of the `before-tokenize` hook. + * @param {string} language The language id. + * @param {RegExp} placeholderPattern The matches of this pattern will be replaced by placeholders. + * @param {(match: string) => boolean} [replaceFilter] + */ + value: function (env, language, placeholderPattern, replaceFilter) { + if (env.language !== language) { + return; } - var i = env.tokenStack.length; - // Check for existing strings - while (env.code.indexOf('___' + language.toUpperCase() + i + '___') !== -1) - ++i; - // Create a sparse array - env.tokenStack[i] = match; + var tokenStack = env.tokenStack = []; - return '___' + language.toUpperCase() + i + '___'; - }); + env.code = env.code.replace(placeholderPattern, function (match) { + if (typeof replaceFilter === 'function' && !replaceFilter(match)) { + return match; + } + var i = tokenStack.length; + var placeholder; - // Switch the grammar to markup - env.grammar = Prism.languages.markup; - } - }, - tokenizePlaceholders: { - // Replace placeholders with proper tokens after tokenizing - value: function (env, language) { - if (env.language !== language || !env.tokenStack) { - return; - } + // Check for existing strings + while (env.code.indexOf(placeholder = getPlaceholder(language, i)) !== -1) + ++i; - // Switch the grammar back - env.grammar = Prism.languages[language]; + // Create a sparse array + tokenStack[i] = match; - var j = 0; - var keys = Object.keys(env.tokenStack); - var walkTokens = function (tokens) { - if (j >= keys.length) { + return placeholder; + }); + + // Switch the grammar to markup + env.grammar = Prism.languages.markup; + } + }, + tokenizePlaceholders: { + /** + * Replace placeholders with proper tokens after tokenizing. + * + * @param {object} env The environment of the `after-tokenize` hook. + * @param {string} language The language id. + */ + value: function (env, language) { + if (env.language !== language || !env.tokenStack) { return; } - for (var i = 0; i < tokens.length; i++) { - var token = tokens[i]; - if (typeof token === 'string' || (token.content && typeof token.content === 'string')) { - var k = keys[j]; - var t = env.tokenStack[k]; - var s = typeof token === 'string' ? token : token.content; - - var index = s.indexOf('___' + language.toUpperCase() + k + '___'); - if (index > -1) { - ++j; - var before = s.substring(0, index); - var middle = new Prism.Token(language, Prism.tokenize(t, env.grammar, language), 'language-' + language, t); - var after = s.substring(index + ('___' + language.toUpperCase() + k + '___').length); - var replacement; - if (before || after) { - replacement = [before, middle, after].filter(function (v) { return !!v; }); - walkTokens(replacement); - } else { - replacement = middle; - } - if (typeof token === 'string') { - Array.prototype.splice.apply(tokens, [i, 1].concat(replacement)); - } else { - token.content = replacement; - } - if (j >= keys.length) { - break; + // Switch the grammar back + env.grammar = Prism.languages[language]; + + var j = 0; + var keys = Object.keys(env.tokenStack); + + function walkTokens(tokens) { + for (var i = 0; i < tokens.length; i++) { + // all placeholders are replaced already + if (j >= keys.length) { + break; + } + + var token = tokens[i]; + if (typeof token === 'string' || (token.content && typeof token.content === 'string')) { + var k = keys[j]; + var t = env.tokenStack[k]; + var s = typeof token === 'string' ? token : token.content; + var placeholder = getPlaceholder(language, k); + + var index = s.indexOf(placeholder); + if (index > -1) { + ++j; + + var before = s.substring(0, index); + var middle = new Prism.Token(language, Prism.tokenize(t, env.grammar), 'language-' + language, t); + var after = s.substring(index + placeholder.length); + + var replacement = []; + if (before) { + replacement.push.apply(replacement, walkTokens([before])); + } + replacement.push(middle); + if (after) { + replacement.push.apply(replacement, walkTokens([after])); + } + + if (typeof token === 'string') { + tokens.splice.apply(tokens, [i, 1].concat(replacement)); + } else { + token.content = replacement; + } } + } else if (token.content /* && typeof token.content !== 'string' */) { + walkTokens(token.content); } - } else if (token.content && typeof token.content !== 'string') { - walkTokens(token.content); } + + return tokens; } - }; - walkTokens(env.tokens); + walkTokens(env.tokens); + } } - } -}); \ No newline at end of file + }); + +}(Prism)); diff --git a/components/prism-markup-templating.min.js b/components/prism-markup-templating.min.js index 6e7b30de03..daef928f57 100644 --- a/components/prism-markup-templating.min.js +++ b/components/prism-markup-templating.min.js @@ -1 +1 @@ -Prism.languages["markup-templating"]={},Object.defineProperties(Prism.languages["markup-templating"],{buildPlaceholders:{value:function(e,t,n,a){e.language===t&&(e.tokenStack=[],e.code=e.code.replace(n,function(n){if("function"==typeof a&&!a(n))return n;for(var r=e.tokenStack.length;-1!==e.code.indexOf("___"+t.toUpperCase()+r+"___");)++r;return e.tokenStack[r]=n,"___"+t.toUpperCase()+r+"___"}),e.grammar=Prism.languages.markup)}},tokenizePlaceholders:{value:function(e,t){if(e.language===t&&e.tokenStack){e.grammar=Prism.languages[t];var n=0,a=Object.keys(e.tokenStack),r=function(o){if(!(n>=a.length))for(var i=0;i-1){++n;var f,u=l.substring(0,p),_=new Prism.Token(t,Prism.tokenize(s,e.grammar,t),"language-"+t,s),k=l.substring(p+("___"+t.toUpperCase()+c+"___").length);if(u||k?(f=[u,_,k].filter(function(e){return!!e}),r(f)):f=_,"string"==typeof g?Array.prototype.splice.apply(o,[i,1].concat(f)):g.content=f,n>=a.length)break}}else g.content&&"string"!=typeof g.content&&r(g.content)}};r(e.tokens)}}}}); \ No newline at end of file +!function(e){function n(e,n){return"___"+e.toUpperCase()+n+"___"}Object.defineProperties(e.languages["markup-templating"]={},{buildPlaceholders:{value:function(t,a,r,o){if(t.language===a){var c=t.tokenStack=[];t.code=t.code.replace(r,function(e){if("function"==typeof o&&!o(e))return e;for(var r,i=c.length;-1!==t.code.indexOf(r=n(a,i));)++i;return c[i]=e,r}),t.grammar=e.languages.markup}}},tokenizePlaceholders:{value:function(t,a){function r(i){for(var u=0;u=c.length);u++){var g=i[u];if("string"==typeof g||g.content&&"string"==typeof g.content){var l=c[o],s=t.tokenStack[l],f="string"==typeof g?g:g.content,p=n(a,l),k=f.indexOf(p);if(k>-1){++o;var m=f.substring(0,k),d=new e.Token(a,e.tokenize(s,t.grammar),"language-"+a,s),h=f.substring(k+p.length),v=[];m&&v.push.apply(v,r([m])),v.push(d),h&&v.push.apply(v,r([h])),"string"==typeof g?i.splice.apply(i,[u,1].concat(v)):g.content=v}}else g.content&&r(g.content)}return i}if(t.language===a&&t.tokenStack){t.grammar=e.languages[a];var o=0,c=Object.keys(t.tokenStack);r(t.tokens)}}}})}(Prism); \ No newline at end of file From f8c8add27217e7f2fd38c51736c1ab790eb051fe Mon Sep 17 00:00:00 2001 From: "Jakub T. Jankiewicz" Date: Sun, 3 Mar 2019 14:10:47 +0100 Subject: [PATCH 0191/1100] Fixed operator-like functions in Scheme (#1467) This fixes operator-like functions in Scheme. --- components/prism-scheme.js | 10 +++++----- components/prism-scheme.min.js | 2 +- tests/languages/scheme/function_feature.test | 6 ++++++ 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/components/prism-scheme.js b/components/prism-scheme.js index f4024474eb..4a5bc3bd3a 100644 --- a/components/prism-scheme.js +++ b/components/prism-scheme.js @@ -22,12 +22,12 @@ Prism.languages.scheme = { }, 'boolean': /#[tf]/, 'operator': { - pattern: /(\()(?:[-+*%\/]|[<>]=?|=>?)/, + pattern: /(\()(?:[-+*%\/]|[<>]=?|=>?)(?=\s|$)/, lookbehind: true }, - 'function': { - pattern: /(\()[^()#'\s]+(?=[()\s)])/, - lookbehind: true + 'function' : { + pattern : /(\()[^()'\s]+(?=[()\s)]|$)/, + lookbehind : true }, - 'punctuation': /[()']/ + 'punctuation' : /[()']/ }; diff --git a/components/prism-scheme.min.js b/components/prism-scheme.min.js index 9b41709b9e..b509bfc4ac 100644 --- a/components/prism-scheme.min.js +++ b/components/prism-scheme.min.js @@ -1 +1 @@ -Prism.languages.scheme={comment:/;.*/,string:{pattern:/"(?:[^"\\\r\n]|\\.)*"|'[^()#'\s]+/,greedy:!0},character:{pattern:/#\\(?:u[a-fA-F\d]{4}|[a-zA-Z]+|\S)/,alias:"string"},keyword:{pattern:/(\()(?:define(?:-syntax|-library|-values)?|(?:case-)?lambda|let(?:\*|rec)?(?:-values)?|else|if|cond|begin|delay(?:-force)?|parameterize|guard|set!|(?:quasi-)?quote|syntax-rules)(?=[()\s])/,lookbehind:!0},builtin:{pattern:/(\()(?:(?:cons|car|cdr|list|call-with-current-continuation|call\/cc|append|abs|apply|eval)\b|null\?|pair\?|boolean\?|eof-object\?|char\?|procedure\?|number\?|port\?|string\?|vector\?|symbol\?|bytevector\?)(?=[()\s])/,lookbehind:!0},number:{pattern:/(\s|[()])[-+]?\d*\.?\d+(?:\s*[-+]\s*\d*\.?\d+i)?\b/,lookbehind:!0},"boolean":/#[tf]/,operator:{pattern:/(\()(?:[-+*%\/]|[<>]=?|=>?)/,lookbehind:!0},"function":{pattern:/(\()[^()#'\s]+(?=[()\s)])/,lookbehind:!0},punctuation:/[()']/}; \ No newline at end of file +Prism.languages.scheme={comment:/;.*/,string:{pattern:/"(?:[^"\\\r\n]|\\.)*"|'[^()#'\s]+/,greedy:!0},character:{pattern:/#\\(?:u[a-fA-F\d]{4}|[a-zA-Z]+|\S)/,alias:"string"},keyword:{pattern:/(\()(?:define(?:-syntax|-library|-values)?|(?:case-)?lambda|let(?:\*|rec)?(?:-values)?|else|if|cond|begin|delay(?:-force)?|parameterize|guard|set!|(?:quasi-)?quote|syntax-rules)(?=[()\s])/,lookbehind:!0},builtin:{pattern:/(\()(?:(?:cons|car|cdr|list|call-with-current-continuation|call\/cc|append|abs|apply|eval)\b|null\?|pair\?|boolean\?|eof-object\?|char\?|procedure\?|number\?|port\?|string\?|vector\?|symbol\?|bytevector\?)(?=[()\s])/,lookbehind:!0},number:{pattern:/(\s|[()])[-+]?\d*\.?\d+(?:\s*[-+]\s*\d*\.?\d+i)?\b/,lookbehind:!0},"boolean":/#[tf]/,operator:{pattern:/(\()(?:[-+*%\/]|[<>]=?|=>?)(?=\s|$)/,lookbehind:!0},"function":{pattern:/(\()[^()'\s]+(?=[()\s)]|$)/,lookbehind:!0},punctuation:/[()']/}; \ No newline at end of file diff --git a/tests/languages/scheme/function_feature.test b/tests/languages/scheme/function_feature.test index f7c6547b58..699ca063f4 100644 --- a/tests/languages/scheme/function_feature.test +++ b/tests/languages/scheme/function_feature.test @@ -3,6 +3,9 @@ (exact? 2) (inexact->exact 3) (!fact) +(** 10) +(exact? +(** (defined foo) ---------------------------------------------------- @@ -13,6 +16,9 @@ ["punctuation", "("], ["function", "exact?"], ["number", "2"], ["punctuation", ")"], ["punctuation", "("], ["function", "inexact->exact"], ["number", "3"], ["punctuation", ")"], ["punctuation", "("], ["function", "!fact"], ["punctuation", ")"], + ["punctuation", "("], ["function", "**"], ["number", "10"], ["punctuation", ")"], + ["punctuation", "("], ["function", "exact?"], + ["punctuation", "("], ["function", "**"], ["punctuation", "("], ["function", "defined"], " foo", ["punctuation", ")"] ] From 245b59d4863d6138cddda626f5a7d902e4f1260d Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Mon, 4 Mar 2019 22:17:23 +0100 Subject: [PATCH 0192/1100] CSS: Highlight attribute selector (#1671) This adds highlighting for CSS attributes selectors in CSS Extras --- components/prism-css-extras.js | 32 ++- components/prism-css-extras.min.js | 2 +- .../selector_attribute_feature.test | 269 ++++++++++++++++++ .../css!+css-extras/selector_feature.test | 7 - 4 files changed, 301 insertions(+), 9 deletions(-) create mode 100644 tests/languages/css!+css-extras/selector_attribute_feature.test diff --git a/components/prism-css-extras.js b/components/prism-css-extras.js index cf06b57a16..6000210d59 100644 --- a/components/prism-css-extras.js +++ b/components/prism-css-extras.js @@ -5,7 +5,37 @@ Prism.languages.css.selector = { 'pseudo-class': /:[-\w]+(?:\(.*\))?/, 'class': /\.[-:.\w]+/, 'id': /#[-:.\w]+/, - 'attribute': /\[[^\]]+\]/ + 'attribute': { + pattern: /\[(?:[^[\]"']|("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1)*\]/, + greedy: true, + inside: { + 'punctuation': /^\[|\]$/, + 'case-sensitivity': { + pattern: /(\s)[si]$/i, + lookbehind: true, + alias: 'keyword' + }, + 'namespace': { + pattern: /^(\s*)[-*\w\xA0-\uFFFF]*\|(?!=)/, + lookbehind: true, + inside: { + 'punctuation': /\|$/ + } + }, + 'attribute': { + pattern: /^(\s*)[-\w\xA0-\uFFFF]+/, + lookbehind: true + }, + 'value': [ + /("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/, + { + pattern: /(=\s*)[-\w\xA0-\uFFFF]+(?=\s*$)/, + lookbehind: true + } + ], + 'operator': /[|~*^$]?=/ + } + } } }; diff --git a/components/prism-css-extras.min.js b/components/prism-css-extras.min.js index d04698b231..436e552744 100644 --- a/components/prism-css-extras.min.js +++ b/components/prism-css-extras.min.js @@ -1 +1 @@ -Prism.languages.css.selector={pattern:Prism.languages.css.selector,inside:{"pseudo-element":/:(?:after|before|first-letter|first-line|selection)|::[-\w]+/,"pseudo-class":/:[-\w]+(?:\(.*\))?/,"class":/\.[-:.\w]+/,id:/#[-:.\w]+/,attribute:/\[[^\]]+\]/}},Prism.languages.insertBefore("css","property",{variable:{pattern:/(^|[^-\w\xA0-\uFFFF])--[-_a-z\xA0-\uFFFF][-\w\xA0-\uFFFF]*/i,lookbehind:!0}}),Prism.languages.insertBefore("css","function",{operator:{pattern:/(\s)[+\-*\/](?=\s)/,lookbehind:!0},hexcode:/#[\da-f]{3,8}/i,entity:/\\[\da-f]{1,8}/i,unit:{pattern:/(\d)(?:%|[a-z]+)/,lookbehind:!0},number:/-?[\d.]+/}); \ No newline at end of file +Prism.languages.css.selector={pattern:Prism.languages.css.selector,inside:{"pseudo-element":/:(?:after|before|first-letter|first-line|selection)|::[-\w]+/,"pseudo-class":/:[-\w]+(?:\(.*\))?/,"class":/\.[-:.\w]+/,id:/#[-:.\w]+/,attribute:{pattern:/\[(?:[^[\]"']|("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1)*\]/,greedy:!0,inside:{punctuation:/^\[|\]$/,"case-sensitivity":{pattern:/(\s)[si]$/i,lookbehind:!0,alias:"keyword"},namespace:{pattern:/^(\s*)[-*\w\xA0-\uFFFF]*\|(?!=)/,lookbehind:!0,inside:{punctuation:/\|$/}},attribute:{pattern:/^(\s*)[-\w\xA0-\uFFFF]+/,lookbehind:!0},value:[/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,{pattern:/(=\s*)[-\w\xA0-\uFFFF]+(?=\s*$)/,lookbehind:!0}],operator:/[|~*^$]?=/}}}},Prism.languages.insertBefore("css","property",{variable:{pattern:/(^|[^-\w\xA0-\uFFFF])--[-_a-z\xA0-\uFFFF][-\w\xA0-\uFFFF]*/i,lookbehind:!0}}),Prism.languages.insertBefore("css","function",{operator:{pattern:/(\s)[+\-*\/](?=\s)/,lookbehind:!0},hexcode:/#[\da-f]{3,8}/i,entity:/\\[\da-f]{1,8}/i,unit:{pattern:/(\d)(?:%|[a-z]+)/,lookbehind:!0},number:/-?[\d.]+/}); \ No newline at end of file diff --git a/tests/languages/css!+css-extras/selector_attribute_feature.test b/tests/languages/css!+css-extras/selector_attribute_feature.test new file mode 100644 index 0000000000..25d1259f2b --- /dev/null +++ b/tests/languages/css!+css-extras/selector_attribute_feature.test @@ -0,0 +1,269 @@ +[attr] {} + +[attr=val] {} +[attr="val"] {} +[attr='val'] {} +[attr|=val] {} +[attr~=val] {} +[attr|=val] {} +[attr^=val] {} +[attr$=val] {} +[attr*=val] {} + +[foo|attr][*|attr][|attr] {} +[foo|attr|=val] {} + +[attr=val i] {} +[attr="val" S] {} + +[ attr ] {} +[ attr = val ] {} +[ attr = val i] {} + +[attr="i#m :not(a.class)"] {} + +---------------------------------------------------- + +[ + ["selector", [ + ["attribute", [ + ["punctuation", "["], + ["attribute", "attr"], + ["punctuation", "]"] + ]] + ]], + ["punctuation", "{"], + ["punctuation", "}"], + + ["selector", [ + ["attribute", [ + ["punctuation", "["], + ["attribute", "attr"], + ["operator", "="], + ["value", "val"], + ["punctuation", "]"] + ]] + ]], + ["punctuation", "{"], + ["punctuation", "}"], + + ["selector", [ + ["attribute", [ + ["punctuation", "["], + ["attribute", "attr"], + ["operator", "="], + ["value", "\"val\""], + ["punctuation", "]"] + ]] + ]], + ["punctuation", "{"], + ["punctuation", "}"], + + ["selector", [ + ["attribute", [ + ["punctuation", "["], + ["attribute", "attr"], + ["operator", "="], + ["value", "'val'"], + ["punctuation", "]"] + ]] + ]], + ["punctuation", "{"], + ["punctuation", "}"], + + ["selector", [ + ["attribute", [ + ["punctuation", "["], + ["attribute", "attr"], + ["operator", "|="], + ["value", "val"], + ["punctuation", "]"] + ]] + ]], + ["punctuation", "{"], + ["punctuation", "}"], + + ["selector", [ + ["attribute", [ + ["punctuation", "["], + ["attribute", "attr"], + ["operator", "~="], + ["value", "val"], + ["punctuation", "]"] + ]] + ]], + ["punctuation", "{"], + ["punctuation", "}"], + + ["selector", [ + ["attribute", [ + ["punctuation", "["], + ["attribute", "attr"], + ["operator", "|="], + ["value", "val"], + ["punctuation", "]"] + ]] + ]], + ["punctuation", "{"], + ["punctuation", "}"], + + ["selector", [ + ["attribute", [ + ["punctuation", "["], + ["attribute", "attr"], + ["operator", "^="], + ["value", "val"], + ["punctuation", "]"] + ]] + ]], + ["punctuation", "{"], + ["punctuation", "}"], + + ["selector", [ + ["attribute", [ + ["punctuation", "["], + ["attribute", "attr"], + ["operator", "$="], + ["value", "val"], + ["punctuation", "]"] + ]] + ]], + ["punctuation", "{"], + ["punctuation", "}"], + + ["selector", [ + ["attribute", [ + ["punctuation", "["], + ["attribute", "attr"], + ["operator", "*="], + ["value", "val"], + ["punctuation", "]"] + ]] + ]], + ["punctuation", "{"], + ["punctuation", "}"], + + ["selector", [ + ["attribute", [ + ["punctuation", "["], + ["namespace", [ + "foo", + ["punctuation", "|"] + ]], + ["attribute", "attr"], + ["punctuation", "]"] + ]], + ["attribute", [ + ["punctuation", "["], + ["namespace", [ + "*", + ["punctuation", "|"] + ]], + ["attribute", "attr"], + ["punctuation", "]"] + ]], + ["attribute", [ + ["punctuation", "["], + ["namespace", [ + ["punctuation", "|"] + ]], + ["attribute", "attr"], + ["punctuation", "]"] + ]] + ]], + ["punctuation", "{"], + ["punctuation", "}"], + + ["selector", [ + ["attribute", [ + ["punctuation", "["], + ["namespace", [ + "foo", + ["punctuation", "|"] + ]], + ["attribute", "attr"], + ["operator", "|="], + ["value", "val"], + ["punctuation", "]"] + ]] + ]], + ["punctuation", "{"], + ["punctuation", "}"], + + ["selector", [ + ["attribute", [ + ["punctuation", "["], + ["attribute", "attr"], + ["operator", "="], + ["value", "val"], + ["case-sensitivity", "i"], + ["punctuation", "]"] + ]] + ]], + ["punctuation", "{"], + ["punctuation", "}"], + + ["selector", [ + ["attribute", [ + ["punctuation", "["], + ["attribute", "attr"], + ["operator", "="], + ["value", "\"val\""], + ["case-sensitivity", "S"], + ["punctuation", "]"] + ]] + ]], + ["punctuation", "{"], + ["punctuation", "}"], + + ["selector", [ + ["attribute", [ + ["punctuation", "["], + ["attribute", "attr"], + ["punctuation", "]"] + ]] + ]], + ["punctuation", "{"], + ["punctuation", "}"], + + ["selector", [ + ["attribute", [ + ["punctuation", "["], + ["attribute", "attr"], + ["operator", "="], + ["value", "val"], + ["punctuation", "]"] + ]] + ]], + ["punctuation", "{"], + ["punctuation", "}"], + + ["selector", [ + ["attribute", [ + ["punctuation", "["], + ["attribute", "attr"], + ["operator", "="], + ["value", "val"], + ["case-sensitivity", "i"], + ["punctuation", "]"] + ]] + ]], + ["punctuation", "{"], + ["punctuation", "}"], + + ["selector", [ + ["attribute", [ + ["punctuation", "["], + ["attribute", "attr"], + ["operator", "="], + ["value", "\"i#m :not(a.class)\""], + ["punctuation", "]"] + ]] + ]], + ["punctuation", "{"], + ["punctuation", "}"] +] + +---------------------------------------------------- + +Checks for attributes inside selectors. \ No newline at end of file diff --git a/tests/languages/css!+css-extras/selector_feature.test b/tests/languages/css!+css-extras/selector_feature.test index 3931a66334..475ed1b7c4 100644 --- a/tests/languages/css!+css-extras/selector_feature.test +++ b/tests/languages/css!+css-extras/selector_feature.test @@ -9,8 +9,6 @@ foo#bar { #foo > .bar:not(baz):after { -div[foo="bar"] { - ---------------------------------------------------- [ @@ -45,11 +43,6 @@ div[foo="bar"] { ["class", ".bar"], ["pseudo-class", ":not(baz)"], ["pseudo-element", ":after"] - ]], ["punctuation", "{"], - - ["selector", [ - "div", - ["attribute", "[foo=\"bar\"]"] ]], ["punctuation", "{"] ] From 16f2ad061ab7d9caa330281ac697a422c0961172 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Mon, 4 Mar 2019 22:59:24 +0100 Subject: [PATCH 0193/1100] Added T4 Text Templates (#1699) This adds T4 Text Templates in both the C# and VB language variants. --- components.js | 2 +- components.json | 15 ++ components/prism-t4-cs.js | 1 + components/prism-t4-cs.min.js | 1 + components/prism-t4-templating.js | 49 ++++++ components/prism-t4-templating.min.js | 1 + components/prism-t4-vb.js | 1 + components/prism-t4-vb.min.js | 1 + plugins/autoloader/prism-autoloader.js | 2 +- plugins/autoloader/prism-autoloader.min.js | 2 +- plugins/show-language/prism-show-language.js | 2 +- .../show-language/prism-show-language.min.js | 2 +- .../t4-cs/block_class-feature_feature.test | 27 ++++ .../t4-cs/block_directive_feature.test | 149 ++++++++++++++++++ .../t4-cs/block_expression_feature.test | 48 ++++++ .../t4-cs/block_standard_feature.test | 73 +++++++++ tests/languages/t4-vb/block_feature.test | 118 ++++++++++++++ 17 files changed, 489 insertions(+), 5 deletions(-) create mode 100644 components/prism-t4-cs.js create mode 100644 components/prism-t4-cs.min.js create mode 100644 components/prism-t4-templating.js create mode 100644 components/prism-t4-templating.min.js create mode 100644 components/prism-t4-vb.js create mode 100644 components/prism-t4-vb.min.js create mode 100644 tests/languages/t4-cs/block_class-feature_feature.test create mode 100644 tests/languages/t4-cs/block_directive_feature.test create mode 100644 tests/languages/t4-cs/block_expression_feature.test create mode 100644 tests/languages/t4-cs/block_standard_feature.test create mode 100644 tests/languages/t4-vb/block_feature.test diff --git a/components.js b/components.js index e37cfa4eaa..f09f8cc5f6 100644 --- a/components.js +++ b/components.js @@ -1,2 +1,2 @@ -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default","peerDependencies":"markup"},"clike":{"title":"C-like","option":"default","overrideExampleHeader":true},"javascript":{"title":"JavaScript","require":"clike","peerDependencies":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"Augmented Backus–Naur form","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","peerDependencies":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"Backus–Naur form","alias":"rbfn","aliasTitles":{"rbfn":"Routing Backus–Naur form"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":"dotnet","owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","owner":"R-osey"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup","peerDependencies":["css","javascript"],"alias":"jinja2","owner":"romanvm"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"Extended Backus–Naur form","owner":"RunDevelopment"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","peerDependencies":["css","coffeescript","erb","javascript","less","markdown","ruby","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"http":{"title":"HTTP","peerDependencies":["javascript","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"peerDependencies":["scala"],"owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","peerDependencies":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike"],"peerDependencies":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","peerDependencies":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","owner":"CupOfTea696"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","owner":"japborst"},"less":{"title":"Less","require":"css","owner":"Golmote"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","peerDependencies":["jsdoc"],"alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"nasm":{"title":"NASM","owner":"rbmj"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"cpp","peerDependencies":["c","cpp"],"overrideExampleHeader":true,"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":"javascript","peerDependencies":["coffeescript","ejs","handlebars","hogan","less","livescript","markdown","mustache","plates","scss","stylus","swig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","peerDependencies":["c","cpp","fortran","ats","dsp"],"owner":"Golmote"},"python":{"title":"Python","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"peerDependencies":["jsdoc","js-extras"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"ruby":{"title":"Ruby","require":"clike","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sql":{"title":"SQL","owner":"multipetros"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","peerDependencies":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","alias":"ts","owner":"vkbansal"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","owner":"hason"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":"Line Highlight","line-numbers":{"title":"Line Numbers","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","after":["autolinker","data-uri-highlight"]},"autolinker":"Autolinker","wpd":"WebPlatform Docs","custom-class":{"title":"Custom Class","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","noCSS":true},"show-language":{"title":"Show Language","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","owner":"Golmote","noCSS":true},"previewers":{"title":"Previewers","owner":"Golmote"},"autoloader":{"title":"Autoloader","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","owner":"Golmote","after":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","owner":"chriswells0"},"unescaped-markup":"Unescaped Markup","normalize-whitespace":{"title":"Normalize Whitespace","owner":"zeitgeist87","after":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","owner":"mAAdhaTTah","require":"toolbar","noCSS":true}}}; +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default","peerDependencies":"markup"},"clike":{"title":"C-like","option":"default","overrideExampleHeader":true},"javascript":{"title":"JavaScript","require":"clike","peerDependencies":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"Augmented Backus–Naur form","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","peerDependencies":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"Backus–Naur form","alias":"rbfn","aliasTitles":{"rbfn":"Routing Backus–Naur form"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":"dotnet","owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","owner":"R-osey"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup","peerDependencies":["css","javascript"],"alias":"jinja2","owner":"romanvm"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"Extended Backus–Naur form","owner":"RunDevelopment"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","peerDependencies":["css","coffeescript","erb","javascript","less","markdown","ruby","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"http":{"title":"HTTP","peerDependencies":["javascript","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"peerDependencies":["scala"],"owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","peerDependencies":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike"],"peerDependencies":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","peerDependencies":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","owner":"CupOfTea696"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","owner":"japborst"},"less":{"title":"Less","require":"css","owner":"Golmote"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","peerDependencies":["jsdoc"],"alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"nasm":{"title":"NASM","owner":"rbmj"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"cpp","peerDependencies":["c","cpp"],"overrideExampleHeader":true,"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":"javascript","peerDependencies":["coffeescript","ejs","handlebars","hogan","less","livescript","markdown","mustache","plates","scss","stylus","swig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","peerDependencies":["c","cpp","fortran","ats","dsp"],"owner":"Golmote"},"python":{"title":"Python","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"peerDependencies":["jsdoc","js-extras"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"ruby":{"title":"Ruby","require":"clike","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sql":{"title":"SQL","owner":"multipetros"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","peerDependencies":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","alias":"ts","owner":"vkbansal"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","visual-basic"],"owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","owner":"hason"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":"Line Highlight","line-numbers":{"title":"Line Numbers","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","after":["autolinker","data-uri-highlight"]},"autolinker":"Autolinker","wpd":"WebPlatform Docs","custom-class":{"title":"Custom Class","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","noCSS":true},"show-language":{"title":"Show Language","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","owner":"Golmote","noCSS":true},"previewers":{"title":"Previewers","owner":"Golmote"},"autoloader":{"title":"Autoloader","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","owner":"Golmote","after":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","owner":"chriswells0"},"unescaped-markup":"Unescaped Markup","normalize-whitespace":{"title":"Normalize Whitespace","owner":"zeitgeist87","after":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","owner":"mAAdhaTTah","require":"toolbar","noCSS":true}}}; if (typeof module !== 'undefined' && module.exports) { module.exports = components; } \ No newline at end of file diff --git a/components.json b/components.json index 323ad7530c..94849a0baf 100644 --- a/components.json +++ b/components.json @@ -840,6 +840,21 @@ "alias": "ts", "owner": "vkbansal" }, + "t4-cs": { + "title": "T4 Text Templates (C#)", + "require": ["t4-templating", "csharp"], + "alias": "t4", + "owner": "RunDevelopment" + }, + "t4-vb": { + "title": "T4 Text Templates (VB)", + "require": ["t4-templating", "visual-basic"], + "owner": "RunDevelopment" + }, + "t4-templating": { + "title": "T4 templating", + "owner": "RunDevelopment" + }, "vala": { "title": "Vala", "require": "clike", diff --git a/components/prism-t4-cs.js b/components/prism-t4-cs.js new file mode 100644 index 0000000000..17e1bf9863 --- /dev/null +++ b/components/prism-t4-cs.js @@ -0,0 +1 @@ +Prism.languages.t4 = Prism.languages['t4-cs'] = Prism.languages['t4-templating'].createT4('csharp'); diff --git a/components/prism-t4-cs.min.js b/components/prism-t4-cs.min.js new file mode 100644 index 0000000000..fe276ebf9a --- /dev/null +++ b/components/prism-t4-cs.min.js @@ -0,0 +1 @@ +Prism.languages.t4=Prism.languages["t4-cs"]=Prism.languages["t4-templating"].createT4("csharp"); \ No newline at end of file diff --git a/components/prism-t4-templating.js b/components/prism-t4-templating.js new file mode 100644 index 0000000000..15e55a5bb3 --- /dev/null +++ b/components/prism-t4-templating.js @@ -0,0 +1,49 @@ +(function (Prism) { + + function createBlock(prefix, inside, contentAlias) { + return { + pattern: RegExp('<#' + prefix + '[\\s\\S]*?#>'), + alias: 'block', + inside: { + 'delimiter': { + pattern: RegExp('^<#' + prefix + '|#>$'), + alias: 'important' + }, + 'content': { + pattern: /[\s\S]+/, + inside: inside, + alias: contentAlias + } + } + }; + } + + function createT4(insideLang) { + var grammar = Prism.languages[insideLang]; + var className = 'language-' + insideLang; + + return { + 'block': { + pattern: /<#[\s\S]+?#>/, + inside: { + 'directive': createBlock('@', { + 'attr-value': { + pattern: /=(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s'">=]+)/, + inside: { + 'punctuation': /^=|^["']|["']$/ + } + }, + 'keyword': /\w+(?=\s)/, + 'attr-name': /\w+/ + }), + 'expression': createBlock('=', grammar, className), + 'class-feature': createBlock('\\+', grammar, className), + 'standard': createBlock('', grammar, className) + } + } + }; + } + + Prism.languages['t4-templating'] = Object.defineProperty({}, 'createT4', { value: createT4 }); + +}(Prism)); diff --git a/components/prism-t4-templating.min.js b/components/prism-t4-templating.min.js new file mode 100644 index 0000000000..aeb96d51e1 --- /dev/null +++ b/components/prism-t4-templating.min.js @@ -0,0 +1 @@ +!function(e){function t(e,t,a){return{pattern:RegExp("<#"+e+"[\\s\\S]*?#>"),alias:"block",inside:{delimiter:{pattern:RegExp("^<#"+e+"|#>$"),alias:"important"},content:{pattern:/[\s\S]+/,inside:t,alias:a}}}}function a(a){var n=e.languages[a],i="language-"+a;return{block:{pattern:/<#[\s\S]+?#>/,inside:{directive:t("@",{"attr-value":{pattern:/=(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s'">=]+)/,inside:{punctuation:/^=|^["']|["']$/}},keyword:/\w+(?=\s)/,"attr-name":/\w+/}),expression:t("=",n,i),"class-feature":t("\\+",n,i),standard:t("",n,i)}}}}e.languages["t4-templating"]=Object.defineProperty({},"createT4",{value:a})}(Prism); \ No newline at end of file diff --git a/components/prism-t4-vb.js b/components/prism-t4-vb.js new file mode 100644 index 0000000000..321991dbc6 --- /dev/null +++ b/components/prism-t4-vb.js @@ -0,0 +1 @@ +Prism.languages['t4-vb'] = Prism.languages['t4-templating'].createT4('visual-basic'); diff --git a/components/prism-t4-vb.min.js b/components/prism-t4-vb.min.js new file mode 100644 index 0000000000..5c4f55015c --- /dev/null +++ b/components/prism-t4-vb.min.js @@ -0,0 +1 @@ +Prism.languages["t4-vb"]=Prism.languages["t4-templating"].createT4("visual-basic"); \ No newline at end of file diff --git a/plugins/autoloader/prism-autoloader.js b/plugins/autoloader/prism-autoloader.js index 400ad858c0..2f386f83ea 100644 --- a/plugins/autoloader/prism-autoloader.js +++ b/plugins/autoloader/prism-autoloader.js @@ -4,7 +4,7 @@ } // The dependencies map is built automatically with gulp - var lang_dependencies = /*languages_placeholder[*/{"javascript":"clike","actionscript":"javascript","arduino":"cpp","aspnet":["markup","csharp"],"bison":"c","c":"clike","csharp":"clike","cpp":"c","coffeescript":"javascript","crystal":"ruby","css-extras":"css","d":"clike","dart":"clike","django":"markup","erb":["ruby","markup-templating"],"fsharp":"clike","flow":"javascript","glsl":"clike","gml":"clike","go":"clike","groovy":"clike","haml":"ruby","handlebars":"markup-templating","haxe":"clike","java":"clike","javadoc":["markup","java","javadoclike"],"jolie":"clike","jsdoc":["javascript","javadoclike"],"js-extras":"javascript","jsonp":"json","json5":"json","kotlin":"clike","less":"css","markdown":"markup","markup-templating":"markup","n4js":"javascript","nginx":"clike","objectivec":"c","opencl":"cpp","parser":"markup","php":["clike","markup-templating"],"phpdoc":["php","javadoclike"],"php-extras":"php","plsql":"sql","processing":"clike","protobuf":"clike","pug":"javascript","qore":"clike","jsx":["markup","javascript"],"tsx":["jsx","typescript"],"reason":"clike","ruby":"clike","sass":"css","scss":"css","scala":"java","smarty":"markup-templating","soy":"markup-templating","swift":"clike","tap":"yaml","textile":"markup","tt2":["clike","markup-templating"],"twig":"markup","typescript":"javascript","vala":"clike","vbnet":"basic","velocity":"markup","wiki":"markup","xeora":"markup","xquery":"markup"}/*]*/; + var lang_dependencies = /*languages_placeholder[*/{"javascript":"clike","actionscript":"javascript","arduino":"cpp","aspnet":["markup","csharp"],"bison":"c","c":"clike","csharp":"clike","cpp":"c","coffeescript":"javascript","crystal":"ruby","css-extras":"css","d":"clike","dart":"clike","django":"markup","erb":["ruby","markup-templating"],"fsharp":"clike","flow":"javascript","glsl":"clike","gml":"clike","go":"clike","groovy":"clike","haml":"ruby","handlebars":"markup-templating","haxe":"clike","java":"clike","javadoc":["markup","java","javadoclike"],"jolie":"clike","jsdoc":["javascript","javadoclike"],"js-extras":"javascript","jsonp":"json","json5":"json","kotlin":"clike","less":"css","markdown":"markup","markup-templating":"markup","n4js":"javascript","nginx":"clike","objectivec":"c","opencl":"cpp","parser":"markup","php":["clike","markup-templating"],"phpdoc":["php","javadoclike"],"php-extras":"php","plsql":"sql","processing":"clike","protobuf":"clike","pug":"javascript","qore":"clike","jsx":["markup","javascript"],"tsx":["jsx","typescript"],"reason":"clike","ruby":"clike","sass":"css","scss":"css","scala":"java","smarty":"markup-templating","soy":"markup-templating","swift":"clike","tap":"yaml","textile":"markup","tt2":["clike","markup-templating"],"twig":"markup","typescript":"javascript","t4-cs":["t4-templating","csharp"],"t4-vb":["t4-templating","visual-basic"],"vala":"clike","vbnet":"basic","velocity":"markup","wiki":"markup","xeora":"markup","xquery":"markup"}/*]*/; var lang_data = {}; diff --git a/plugins/autoloader/prism-autoloader.min.js b/plugins/autoloader/prism-autoloader.min.js index c92eef223d..9ba7133ac6 100644 --- a/plugins/autoloader/prism-autoloader.min.js +++ b/plugins/autoloader/prism-autoloader.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof self&&self.Prism&&self.document&&document.createElement){var a={javascript:"clike",actionscript:"javascript",arduino:"cpp",aspnet:["markup","csharp"],bison:"c",c:"clike",csharp:"clike",cpp:"c",coffeescript:"javascript",crystal:"ruby","css-extras":"css",d:"clike",dart:"clike",django:"markup",erb:["ruby","markup-templating"],fsharp:"clike",flow:"javascript",glsl:"clike",gml:"clike",go:"clike",groovy:"clike",haml:"ruby",handlebars:"markup-templating",haxe:"clike",java:"clike",javadoc:["markup","java","javadoclike"],jolie:"clike",jsdoc:["javascript","javadoclike"],"js-extras":"javascript",jsonp:"json",json5:"json",kotlin:"clike",less:"css",markdown:"markup","markup-templating":"markup",n4js:"javascript",nginx:"clike",objectivec:"c",opencl:"cpp",parser:"markup",php:["clike","markup-templating"],phpdoc:["php","javadoclike"],"php-extras":"php",plsql:"sql",processing:"clike",protobuf:"clike",pug:"javascript",qore:"clike",jsx:["markup","javascript"],tsx:["jsx","typescript"],reason:"clike",ruby:"clike",sass:"css",scss:"css",scala:"java",smarty:"markup-templating",soy:"markup-templating",swift:"clike",tap:"yaml",textile:"markup",tt2:["clike","markup-templating"],twig:"markup",typescript:"javascript",vala:"clike",vbnet:"basic",velocity:"markup",wiki:"markup",xeora:"markup",xquery:"markup"},e={},c="none",t=document.getElementsByTagName("script");t=t[t.length-1];var r="components/";if(t.hasAttribute("data-autoloader-path")){var s=t.getAttribute("data-autoloader-path").trim();s.length>0&&!/^[a-z]+:\/\//i.test(t.src)&&(r=s.replace(/\/?$/,"/"))}else/[\w-]+\.js$/.test(t.src)&&(r=t.src.replace(/[\w-]+\.js$/,"components/"));var i=Prism.plugins.autoloader={languages_path:r,use_minified:!0},n=function(a,e,c){var t=document.createElement("script");t.src=a,t.async=!0,t.onload=function(){document.body.removeChild(t),e&&e()},t.onerror=function(){document.body.removeChild(t),c&&c()},document.body.appendChild(t)},l=function(a){return i.languages_path+"prism-"+a+(i.use_minified?".min":"")+".js"},o=function(a,c){var t=e[a];t||(t=e[a]={});var r=c.getAttribute("data-dependencies");!r&&c.parentNode&&"pre"===c.parentNode.tagName.toLowerCase()&&(r=c.parentNode.getAttribute("data-dependencies")),r=r?r.split(/\s*,\s*/g):[],p(r,function(){u(a,function(){Prism.highlightElement(c)})})},p=function(a,e,c){"string"==typeof a&&(a=[a]);var t=0,r=a.length,s=function(){r>t?u(a[t],function(){t++,s()},function(){c&&c(a[t])}):t===r&&e&&e(a)};s()},u=function(c,t,r){var s=function(){var a=!1;c.indexOf("!")>=0&&(a=!0,c=c.replace("!",""));var s=e[c];if(s||(s=e[c]={}),t&&(s.success_callbacks||(s.success_callbacks=[]),s.success_callbacks.push(t)),r&&(s.error_callbacks||(s.error_callbacks=[]),s.error_callbacks.push(r)),!a&&Prism.languages[c])m(c);else if(!a&&s.error)k(c);else if(a||!s.loading){s.loading=!0;var i=l(c);n(i,function(){s.loading=!1,m(c)},function(){s.loading=!1,s.error=!0,k(c)})}},i=a[c];i&&i.length?p(i,s):s()},m=function(a){e[a]&&e[a].success_callbacks&&e[a].success_callbacks.length&&e[a].success_callbacks.forEach(function(e){e(a)})},k=function(a){e[a]&&e[a].error_callbacks&&e[a].error_callbacks.length&&e[a].error_callbacks.forEach(function(e){e(a)})};Prism.hooks.add("complete",function(a){a.element&&a.language&&!a.grammar&&a.language!==c&&o(a.language,a.element)})}}(); \ No newline at end of file +!function(){if("undefined"!=typeof self&&self.Prism&&self.document&&document.createElement){var a={javascript:"clike",actionscript:"javascript",arduino:"cpp",aspnet:["markup","csharp"],bison:"c",c:"clike",csharp:"clike",cpp:"c",coffeescript:"javascript",crystal:"ruby","css-extras":"css",d:"clike",dart:"clike",django:"markup",erb:["ruby","markup-templating"],fsharp:"clike",flow:"javascript",glsl:"clike",gml:"clike",go:"clike",groovy:"clike",haml:"ruby",handlebars:"markup-templating",haxe:"clike",java:"clike",javadoc:["markup","java","javadoclike"],jolie:"clike",jsdoc:["javascript","javadoclike"],"js-extras":"javascript",jsonp:"json",json5:"json",kotlin:"clike",less:"css",markdown:"markup","markup-templating":"markup",n4js:"javascript",nginx:"clike",objectivec:"c",opencl:"cpp",parser:"markup",php:["clike","markup-templating"],phpdoc:["php","javadoclike"],"php-extras":"php",plsql:"sql",processing:"clike",protobuf:"clike",pug:"javascript",qore:"clike",jsx:["markup","javascript"],tsx:["jsx","typescript"],reason:"clike",ruby:"clike",sass:"css",scss:"css",scala:"java",smarty:"markup-templating",soy:"markup-templating",swift:"clike",tap:"yaml",textile:"markup",tt2:["clike","markup-templating"],twig:"markup",typescript:"javascript","t4-cs":["t4-templating","csharp"],"t4-vb":["t4-templating","visual-basic"],vala:"clike",vbnet:"basic",velocity:"markup",wiki:"markup",xeora:"markup",xquery:"markup"},e={},c="none",t=document.getElementsByTagName("script");t=t[t.length-1];var s="components/";if(t.hasAttribute("data-autoloader-path")){var r=t.getAttribute("data-autoloader-path").trim();r.length>0&&!/^[a-z]+:\/\//i.test(t.src)&&(s=r.replace(/\/?$/,"/"))}else/[\w-]+\.js$/.test(t.src)&&(s=t.src.replace(/[\w-]+\.js$/,"components/"));var i=Prism.plugins.autoloader={languages_path:s,use_minified:!0},n=function(a,e,c){var t=document.createElement("script");t.src=a,t.async=!0,t.onload=function(){document.body.removeChild(t),e&&e()},t.onerror=function(){document.body.removeChild(t),c&&c()},document.body.appendChild(t)},l=function(a){return i.languages_path+"prism-"+a+(i.use_minified?".min":"")+".js"},o=function(a,c){var t=e[a];t||(t=e[a]={});var s=c.getAttribute("data-dependencies");!s&&c.parentNode&&"pre"===c.parentNode.tagName.toLowerCase()&&(s=c.parentNode.getAttribute("data-dependencies")),s=s?s.split(/\s*,\s*/g):[],p(s,function(){u(a,function(){Prism.highlightElement(c)})})},p=function(a,e,c){"string"==typeof a&&(a=[a]);var t=0,s=a.length,r=function(){s>t?u(a[t],function(){t++,r()},function(){c&&c(a[t])}):t===s&&e&&e(a)};r()},u=function(c,t,s){var r=function(){var a=!1;c.indexOf("!")>=0&&(a=!0,c=c.replace("!",""));var r=e[c];if(r||(r=e[c]={}),t&&(r.success_callbacks||(r.success_callbacks=[]),r.success_callbacks.push(t)),s&&(r.error_callbacks||(r.error_callbacks=[]),r.error_callbacks.push(s)),!a&&Prism.languages[c])m(c);else if(!a&&r.error)k(c);else if(a||!r.loading){r.loading=!0;var i=l(c);n(i,function(){r.loading=!1,m(c)},function(){r.loading=!1,r.error=!0,k(c)})}},i=a[c];i&&i.length?p(i,r):r()},m=function(a){e[a]&&e[a].success_callbacks&&e[a].success_callbacks.length&&e[a].success_callbacks.forEach(function(e){e(a)})},k=function(a){e[a]&&e[a].error_callbacks&&e[a].error_callbacks.length&&e[a].error_callbacks.forEach(function(e){e(a)})};Prism.hooks.add("complete",function(a){a.element&&a.language&&!a.grammar&&a.language!==c&&o(a.language,a.element)})}}(); \ No newline at end of file diff --git a/plugins/show-language/prism-show-language.js b/plugins/show-language/prism-show-language.js index 9f3125e10f..64b5785bec 100644 --- a/plugins/show-language/prism-show-language.js +++ b/plugins/show-language/prism-show-language.js @@ -11,7 +11,7 @@ if (!Prism.plugins.toolbar) { } // The languages map is built automatically with gulp -var Languages = /*languages_placeholder[*/{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","css":"CSS","clike":"C-like","js":"JavaScript","abap":"ABAP","abnf":"Augmented Backus–Naur form","apacheconf":"Apache Configuration","apl":"APL","arff":"ARFF","asciidoc":"AsciiDoc","adoc":"AsciiDoc","asm6502":"6502 Assembly","aspnet":"ASP.NET (C#)","autohotkey":"AutoHotkey","autoit":"AutoIt","shell":"Bash","basic":"BASIC","bnf":"Backus–Naur form","rbfn":"Routing Backus–Naur form","csharp":"C#","dotnet":"C#","cpp":"C++","cil":"CIL","csp":"Content-Security-Policy","css-extras":"CSS Extras","django":"Django/Jinja2","jinja2":"Django/Jinja2","dockerfile":"Docker","ebnf":"Extended Backus–Naur form","erb":"ERB","fsharp":"F#","gcode":"G-code","gedcom":"GEDCOM","glsl":"GLSL","gml":"GameMaker Language","gamemakerlanguage":"GameMaker Language","graphql":"GraphQL","hcl":"HCL","http":"HTTP","hpkp":"HTTP Public-Key-Pins","hsts":"HTTP Strict-Transport-Security","ichigojam":"IchigoJam","inform7":"Inform 7","javadoc":"JavaDoc","javadoclike":"JavaDoc-like","javastacktrace":"Java stack trace","jsdoc":"JSDoc","js-extras":"JS Extras","json":"JSON","jsonp":"JSONP","json5":"JSON5","latex":"LaTeX","emacs":"Lisp","elisp":"Lisp","emacs-lisp":"Lisp","lolcode":"LOLCODE","markup-templating":"Markup templating","matlab":"MATLAB","mel":"MEL","n1ql":"N1QL","n4js":"N4JS","n4jsd":"N4JS","nand2tetris-hdl":"Nand To Tetris HDL","nasm":"NASM","nginx":"nginx","nsis":"NSIS","objectivec":"Objective-C","ocaml":"OCaml","opencl":"OpenCL","parigp":"PARI/GP","objectpascal":"Object Pascal","php":"PHP","phpdoc":"PHPDoc","php-extras":"PHP Extras","plsql":"PL/SQL","powershell":"PowerShell","properties":".properties","protobuf":"Protocol Buffers","q":"Q (kdb+ database)","jsx":"React JSX","tsx":"React TSX","renpy":"Ren'py","rest":"reST (reStructuredText)","sas":"SAS","sass":"Sass (Sass)","scss":"Sass (Scss)","sql":"SQL","soy":"Soy (Closure Template)","tap":"TAP","toml":"TOML","tt2":"Template Toolkit 2","ts":"TypeScript","vbnet":"VB.Net","vhdl":"VHDL","vim":"vim","visual-basic":"Visual Basic","vb":"Visual Basic","wasm":"WebAssembly","wiki":"Wiki markup","xeoracube":"XeoraCube","xojo":"Xojo (REALbasic)","xquery":"XQuery","yaml":"YAML"}/*]*/; +var Languages = /*languages_placeholder[*/{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","css":"CSS","clike":"C-like","js":"JavaScript","abap":"ABAP","abnf":"Augmented Backus–Naur form","apacheconf":"Apache Configuration","apl":"APL","arff":"ARFF","asciidoc":"AsciiDoc","adoc":"AsciiDoc","asm6502":"6502 Assembly","aspnet":"ASP.NET (C#)","autohotkey":"AutoHotkey","autoit":"AutoIt","shell":"Bash","basic":"BASIC","bnf":"Backus–Naur form","rbfn":"Routing Backus–Naur form","csharp":"C#","dotnet":"C#","cpp":"C++","cil":"CIL","csp":"Content-Security-Policy","css-extras":"CSS Extras","django":"Django/Jinja2","jinja2":"Django/Jinja2","dockerfile":"Docker","ebnf":"Extended Backus–Naur form","erb":"ERB","fsharp":"F#","gcode":"G-code","gedcom":"GEDCOM","glsl":"GLSL","gml":"GameMaker Language","gamemakerlanguage":"GameMaker Language","graphql":"GraphQL","hcl":"HCL","http":"HTTP","hpkp":"HTTP Public-Key-Pins","hsts":"HTTP Strict-Transport-Security","ichigojam":"IchigoJam","inform7":"Inform 7","javadoc":"JavaDoc","javadoclike":"JavaDoc-like","javastacktrace":"Java stack trace","jsdoc":"JSDoc","js-extras":"JS Extras","json":"JSON","jsonp":"JSONP","json5":"JSON5","latex":"LaTeX","emacs":"Lisp","elisp":"Lisp","emacs-lisp":"Lisp","lolcode":"LOLCODE","markup-templating":"Markup templating","matlab":"MATLAB","mel":"MEL","n1ql":"N1QL","n4js":"N4JS","n4jsd":"N4JS","nand2tetris-hdl":"Nand To Tetris HDL","nasm":"NASM","nginx":"nginx","nsis":"NSIS","objectivec":"Objective-C","ocaml":"OCaml","opencl":"OpenCL","parigp":"PARI/GP","objectpascal":"Object Pascal","php":"PHP","phpdoc":"PHPDoc","php-extras":"PHP Extras","plsql":"PL/SQL","powershell":"PowerShell","properties":".properties","protobuf":"Protocol Buffers","q":"Q (kdb+ database)","jsx":"React JSX","tsx":"React TSX","renpy":"Ren'py","rest":"reST (reStructuredText)","sas":"SAS","sass":"Sass (Sass)","scss":"Sass (Scss)","sql":"SQL","soy":"Soy (Closure Template)","tap":"TAP","toml":"TOML","tt2":"Template Toolkit 2","ts":"TypeScript","t4-cs":"T4 Text Templates (C#)","t4":"T4 Text Templates (C#)","t4-vb":"T4 Text Templates (VB)","t4-templating":"T4 templating","vbnet":"VB.Net","vhdl":"VHDL","vim":"vim","visual-basic":"Visual Basic","vb":"Visual Basic","wasm":"WebAssembly","wiki":"Wiki markup","xeoracube":"XeoraCube","xojo":"Xojo (REALbasic)","xquery":"XQuery","yaml":"YAML"}/*]*/; Prism.plugins.toolbar.registerButton('show-language', function(env) { var pre = env.element.parentNode; diff --git a/plugins/show-language/prism-show-language.min.js b/plugins/show-language/prism-show-language.min.js index 119152f151..007610c140 100644 --- a/plugins/show-language/prism-show-language.min.js +++ b/plugins/show-language/prism-show-language.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof self&&self.Prism&&self.document){if(!Prism.plugins.toolbar)return console.warn("Show Languages plugin loaded before Toolbar plugin."),void 0;var a={html:"HTML",xml:"XML",svg:"SVG",mathml:"MathML",css:"CSS",clike:"C-like",js:"JavaScript",abap:"ABAP",abnf:"Augmented Backus–Naur form",apacheconf:"Apache Configuration",apl:"APL",arff:"ARFF",asciidoc:"AsciiDoc",adoc:"AsciiDoc",asm6502:"6502 Assembly",aspnet:"ASP.NET (C#)",autohotkey:"AutoHotkey",autoit:"AutoIt",shell:"Bash",basic:"BASIC",bnf:"Backus–Naur form",rbfn:"Routing Backus–Naur form",csharp:"C#",dotnet:"C#",cpp:"C++",cil:"CIL",csp:"Content-Security-Policy","css-extras":"CSS Extras",django:"Django/Jinja2",jinja2:"Django/Jinja2",dockerfile:"Docker",ebnf:"Extended Backus–Naur form",erb:"ERB",fsharp:"F#",gcode:"G-code",gedcom:"GEDCOM",glsl:"GLSL",gml:"GameMaker Language",gamemakerlanguage:"GameMaker Language",graphql:"GraphQL",hcl:"HCL",http:"HTTP",hpkp:"HTTP Public-Key-Pins",hsts:"HTTP Strict-Transport-Security",ichigojam:"IchigoJam",inform7:"Inform 7",javadoc:"JavaDoc",javadoclike:"JavaDoc-like",javastacktrace:"Java stack trace",jsdoc:"JSDoc","js-extras":"JS Extras",json:"JSON",jsonp:"JSONP",json5:"JSON5",latex:"LaTeX",emacs:"Lisp",elisp:"Lisp","emacs-lisp":"Lisp",lolcode:"LOLCODE","markup-templating":"Markup templating",matlab:"MATLAB",mel:"MEL",n1ql:"N1QL",n4js:"N4JS",n4jsd:"N4JS","nand2tetris-hdl":"Nand To Tetris HDL",nasm:"NASM",nginx:"nginx",nsis:"NSIS",objectivec:"Objective-C",ocaml:"OCaml",opencl:"OpenCL",parigp:"PARI/GP",objectpascal:"Object Pascal",php:"PHP",phpdoc:"PHPDoc","php-extras":"PHP Extras",plsql:"PL/SQL",powershell:"PowerShell",properties:".properties",protobuf:"Protocol Buffers",q:"Q (kdb+ database)",jsx:"React JSX",tsx:"React TSX",renpy:"Ren'py",rest:"reST (reStructuredText)",sas:"SAS",sass:"Sass (Sass)",scss:"Sass (Scss)",sql:"SQL",soy:"Soy (Closure Template)",tap:"TAP",toml:"TOML",tt2:"Template Toolkit 2",ts:"TypeScript",vbnet:"VB.Net",vhdl:"VHDL",vim:"vim","visual-basic":"Visual Basic",vb:"Visual Basic",wasm:"WebAssembly",wiki:"Wiki markup",xeoracube:"XeoraCube",xojo:"Xojo (REALbasic)",xquery:"XQuery",yaml:"YAML"};Prism.plugins.toolbar.registerButton("show-language",function(e){function s(a){return a?(a.substring(0,1).toUpperCase()+a.substring(1)).replace(/s(?=cript)/,"S"):a}var t=e.element.parentNode;if(t&&/pre/i.test(t.nodeName)){var o=t.getAttribute("data-language")||a[e.language]||s(e.language);if(o){var r=document.createElement("span");return r.textContent=o,r}}})}}(); \ No newline at end of file +!function(){if("undefined"!=typeof self&&self.Prism&&self.document){if(!Prism.plugins.toolbar)return console.warn("Show Languages plugin loaded before Toolbar plugin."),void 0;var a={html:"HTML",xml:"XML",svg:"SVG",mathml:"MathML",css:"CSS",clike:"C-like",js:"JavaScript",abap:"ABAP",abnf:"Augmented Backus–Naur form",apacheconf:"Apache Configuration",apl:"APL",arff:"ARFF",asciidoc:"AsciiDoc",adoc:"AsciiDoc",asm6502:"6502 Assembly",aspnet:"ASP.NET (C#)",autohotkey:"AutoHotkey",autoit:"AutoIt",shell:"Bash",basic:"BASIC",bnf:"Backus–Naur form",rbfn:"Routing Backus–Naur form",csharp:"C#",dotnet:"C#",cpp:"C++",cil:"CIL",csp:"Content-Security-Policy","css-extras":"CSS Extras",django:"Django/Jinja2",jinja2:"Django/Jinja2",dockerfile:"Docker",ebnf:"Extended Backus–Naur form",erb:"ERB",fsharp:"F#",gcode:"G-code",gedcom:"GEDCOM",glsl:"GLSL",gml:"GameMaker Language",gamemakerlanguage:"GameMaker Language",graphql:"GraphQL",hcl:"HCL",http:"HTTP",hpkp:"HTTP Public-Key-Pins",hsts:"HTTP Strict-Transport-Security",ichigojam:"IchigoJam",inform7:"Inform 7",javadoc:"JavaDoc",javadoclike:"JavaDoc-like",javastacktrace:"Java stack trace",jsdoc:"JSDoc","js-extras":"JS Extras",json:"JSON",jsonp:"JSONP",json5:"JSON5",latex:"LaTeX",emacs:"Lisp",elisp:"Lisp","emacs-lisp":"Lisp",lolcode:"LOLCODE","markup-templating":"Markup templating",matlab:"MATLAB",mel:"MEL",n1ql:"N1QL",n4js:"N4JS",n4jsd:"N4JS","nand2tetris-hdl":"Nand To Tetris HDL",nasm:"NASM",nginx:"nginx",nsis:"NSIS",objectivec:"Objective-C",ocaml:"OCaml",opencl:"OpenCL",parigp:"PARI/GP",objectpascal:"Object Pascal",php:"PHP",phpdoc:"PHPDoc","php-extras":"PHP Extras",plsql:"PL/SQL",powershell:"PowerShell",properties:".properties",protobuf:"Protocol Buffers",q:"Q (kdb+ database)",jsx:"React JSX",tsx:"React TSX",renpy:"Ren'py",rest:"reST (reStructuredText)",sas:"SAS",sass:"Sass (Sass)",scss:"Sass (Scss)",sql:"SQL",soy:"Soy (Closure Template)",tap:"TAP",toml:"TOML",tt2:"Template Toolkit 2",ts:"TypeScript","t4-cs":"T4 Text Templates (C#)",t4:"T4 Text Templates (C#)","t4-vb":"T4 Text Templates (VB)","t4-templating":"T4 templating",vbnet:"VB.Net",vhdl:"VHDL",vim:"vim","visual-basic":"Visual Basic",vb:"Visual Basic",wasm:"WebAssembly",wiki:"Wiki markup",xeoracube:"XeoraCube",xojo:"Xojo (REALbasic)",xquery:"XQuery",yaml:"YAML"};Prism.plugins.toolbar.registerButton("show-language",function(e){function t(a){return a?(a.substring(0,1).toUpperCase()+a.substring(1)).replace(/s(?=cript)/,"S"):a}var s=e.element.parentNode;if(s&&/pre/i.test(s.nodeName)){var o=s.getAttribute("data-language")||a[e.language]||t(e.language);if(o){var r=document.createElement("span");return r.textContent=o,r}}})}}(); \ No newline at end of file diff --git a/tests/languages/t4-cs/block_class-feature_feature.test b/tests/languages/t4-cs/block_class-feature_feature.test new file mode 100644 index 0000000000..2bb03b5ad3 --- /dev/null +++ b/tests/languages/t4-cs/block_class-feature_feature.test @@ -0,0 +1,27 @@ +Foo +<#+ +public class Bar {} +#> + +---------------------------------------------------- + +[ + "Foo\n", + ["block", [ + ["class-feature", [ + ["delimiter", "<#+"], + ["content", [ + ["keyword", "public"], + ["keyword", "class"], + ["class-name", ["Bar"]], + ["punctuation", "{"], + ["punctuation", "}"] + ]], + ["delimiter", "#>"] + ]] + ]] +] + +---------------------------------------------------- + +Checks for class feature control blocks. diff --git a/tests/languages/t4-cs/block_directive_feature.test b/tests/languages/t4-cs/block_directive_feature.test new file mode 100644 index 0000000000..f2c6a5a899 --- /dev/null +++ b/tests/languages/t4-cs/block_directive_feature.test @@ -0,0 +1,149 @@ +<#@ template debug="false" hostspecific="false" language="C#" #> +<#@ assembly name="System" #> +<#@ assembly name="System.Core" #> +<#@ import namespace="System.Linq" #> +<#@ output extension=".cs" #> +<#@ include file="Foo.t4" #> +<#@ CleanupBehavior processor="T4VSHost" CleanupAfterProcessingtemplate="true" #> + +---------------------------------------------------- + +[ + ["block", [ + ["directive", [ + ["delimiter", "<#@"], + ["content", [ + ["keyword", "template"], + ["attr-name", "debug"], + ["attr-value", [ + ["punctuation", "="], + ["punctuation", "\""], + "false", + ["punctuation", "\""] + ]], + ["attr-name", "hostspecific"], + ["attr-value", [ + ["punctuation", "="], + ["punctuation", "\""], + "false", + ["punctuation", "\""] + ]], + ["attr-name", "language"], + ["attr-value", [ + ["punctuation", "="], + ["punctuation", "\""], + "C#", + ["punctuation", "\""] + ]] + ]], + ["delimiter", "#>"] + ]] + ]], + ["block", [ + ["directive", [ + ["delimiter", "<#@"], + ["content", [ + ["keyword", "assembly"], + ["attr-name", "name"], + ["attr-value", [ + ["punctuation", "="], + ["punctuation", "\""], + "System", + ["punctuation", "\""] + ]] + ]], + ["delimiter", "#>"] + ]] + ]], + ["block", [ + ["directive", [ + ["delimiter", "<#@"], + ["content", [ + ["keyword", "assembly"], + ["attr-name", "name"], + ["attr-value", [ + ["punctuation", "="], + ["punctuation", "\""], + "System.Core", + ["punctuation", "\""] + ]] + ]], + ["delimiter", "#>"] + ]] + ]], + ["block", [ + ["directive", [ + ["delimiter", "<#@"], + ["content", [ + ["keyword", "import"], + ["attr-name", "namespace"], + ["attr-value", [ + ["punctuation", "="], + ["punctuation", "\""], + "System.Linq", + ["punctuation", "\""] + ]] + ]], + ["delimiter", "#>"] + ]] + ]], + ["block", [ + ["directive", [ + ["delimiter", "<#@"], + ["content", [ + ["keyword", "output"], + ["attr-name", "extension"], + ["attr-value", [ + ["punctuation", "="], + ["punctuation", "\""], + ".cs", + ["punctuation", "\""] + ]] + ]], + ["delimiter", "#>"] + ]] + ]], + ["block", [ + ["directive", [ + ["delimiter", "<#@"], + ["content", [ + ["keyword", "include"], + ["attr-name", "file"], + ["attr-value", [ + ["punctuation", "="], + ["punctuation", "\""], + "Foo.t4", + ["punctuation", "\""] + ]] + ]], + ["delimiter", "#>"] + ]] + ]], + ["block", [ + ["directive", [ + ["delimiter", "<#@"], + ["content", [ + ["keyword", "CleanupBehavior"], + ["attr-name", "processor"], + ["attr-value", [ + ["punctuation", "="], + ["punctuation", "\""], + "T4VSHost", + ["punctuation", "\""] + ]], + ["attr-name", "CleanupAfterProcessingtemplate"], + ["attr-value", [ + ["punctuation", "="], + ["punctuation", "\""], + "true", + ["punctuation", "\""] + ]] + ]], + ["delimiter", "#>"] + ]] + ]] +] + +---------------------------------------------------- + +Checks for text template directives. diff --git a/tests/languages/t4-cs/block_expression_feature.test b/tests/languages/t4-cs/block_expression_feature.test new file mode 100644 index 0000000000..d1c241d820 --- /dev/null +++ b/tests/languages/t4-cs/block_expression_feature.test @@ -0,0 +1,48 @@ +var a = <#= name + "abc" #>; +var b = new int[] { <#= + String.Join(", ", number.Select(Transformation)) + #> }; + +---------------------------------------------------- + +[ + "var a = ", + ["block", [ + ["expression", [ + ["delimiter", "<#="], + ["content", [ + " name ", + ["operator", "+"], + ["string", "\"abc\""] + ]], + ["delimiter", "#>"] + ]] + ]], + ";\nvar b = new int[] { ", + ["block", [ + ["expression", [ + ["delimiter", "<#="], + ["content", [ + "\n\tString", + ["punctuation", "."], + ["function", "Join"], + ["punctuation", "("], + ["string", "\", \""], + ["punctuation", ","], + " number", + ["punctuation", "."], + ["function", "Select"], + ["punctuation", "("], + "Transformation", + ["punctuation", ")"], + ["punctuation", ")"] + ]], + ["delimiter", "#>"] + ]] + ]], + " };" +] + +---------------------------------------------------- + +Checks for expression control blocks. diff --git a/tests/languages/t4-cs/block_standard_feature.test b/tests/languages/t4-cs/block_standard_feature.test new file mode 100644 index 0000000000..1b9a761221 --- /dev/null +++ b/tests/languages/t4-cs/block_standard_feature.test @@ -0,0 +1,73 @@ +<# + for (var i = 0; i < 10; i++) + { + if (i % 2 == 0) + { +#> +The number <#= i #> is even. +<# + } + } +#> + +---------------------------------------------------- + +[ + ["block", [ + ["standard", [ + ["delimiter", "<#"], + ["content", [ + ["keyword", "for"], + ["punctuation", "("], + ["keyword", "var"], + " i ", + ["operator", "="], + ["number", "0"], + ["punctuation", ";"], + " i ", + ["operator", "<"], + ["number", "10"], + ["punctuation", ";"], + " i", + ["operator", "++"], + ["punctuation", ")"], + ["punctuation", "{"], + ["keyword", "if"], + ["punctuation", "("], + "i ", + ["operator", "%"], + ["number", "2"], + ["operator", "=="], + ["number", "0"], + ["punctuation", ")"], + ["punctuation", "{"] + ]], + ["delimiter", "#>"] + ]] + ]], + + "\nThe number ", + ["block", [ + ["expression", [ + ["delimiter", "<#="], + ["content", [" i "]], + ["delimiter", "#>"] + ]] + ]], + " is even.\n", + + ["block", [ + ["standard", [ + ["delimiter", "<#"], + ["content", [ + ["punctuation", "}"], + ["punctuation", "}"] + ]], + ["delimiter", "#>"] + ]] + ]] +] + +---------------------------------------------------- + +Checks for standard control blocks. diff --git a/tests/languages/t4-vb/block_feature.test b/tests/languages/t4-vb/block_feature.test new file mode 100644 index 0000000000..8222b79880 --- /dev/null +++ b/tests/languages/t4-vb/block_feature.test @@ -0,0 +1,118 @@ +<#@ template debug="false" hostspecific="false" language="VB" #> + +<#+ +Public Class Bar +End Class +#> + +<# + For i As Integer = 0 To 9 + If i Mod 2 = 0 Then +#> +The number <#= i #> is even. +<# + End If + Next i +#> + +---------------------------------------------------- + +[ + ["block", [ + ["directive", [ + ["delimiter", "<#@"], + ["content", [ + ["keyword", "template"], + ["attr-name", "debug"], + ["attr-value", [ + ["punctuation", "="], + ["punctuation", "\""], + "false", + ["punctuation", "\""] + ]], + ["attr-name", "hostspecific"], + ["attr-value", [ + ["punctuation", "="], + ["punctuation", "\""], + "false", + ["punctuation", "\""] + ]], + ["attr-name", "language"], + ["attr-value", [ + ["punctuation", "="], + ["punctuation", "\""], + "VB", + ["punctuation", "\""] + ]] + ]], + ["delimiter", "#>"] + ]] + ]], + + ["block", [ + ["class-feature", [ + ["delimiter", "<#+"], + ["content", [ + ["keyword", "Public"], + ["keyword", "Class"], + " Bar\n", + ["keyword", "End"], + ["keyword", "Class"] + ]], + ["delimiter", "#>"] + ]] + ]], + + ["block", [ + ["standard", [ + ["delimiter", "<#"], + ["content", [ + ["keyword", "For"], + " i ", + ["keyword", "As"], + ["keyword", "Integer"], + ["operator", "="], + ["number", "0"], + ["keyword", "To"], + ["number", "9"], + ["keyword", "If"], + " i ", + ["keyword", "Mod"], + ["number", "2"], + ["operator", "="], + ["number", "0"], + ["keyword", "Then"] + ]], + ["delimiter", "#>"] + ]] + ]], + + "\nThe number ", + ["block", [ + ["expression", [ + ["delimiter", "<#="], + ["content", [ + " i " + ]], + ["delimiter", "#>"] + ]] + ]], + " is even.\n", + + ["block", [ + ["standard", [ + ["delimiter", "<#"], + ["content", [ + ["keyword", "End"], + ["keyword", "If"], + ["keyword", "Next"], + " i\n" + ]], + ["delimiter", "#>"] + ]] + ]] +] + +---------------------------------------------------- + +Checks for standard control blocks. From 57127701e43efa99b1c70818efeeb6265f9b7c3d Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Mon, 4 Mar 2019 23:12:46 +0100 Subject: [PATCH 0194/1100] Markup: Added support for CSS and JS inside of CDATAs (#1660) This adds support for CSS/JS inside of (any number of) CDATAs. --- components/prism-css.js | 10 +-- components/prism-css.min.js | 2 +- components/prism-javascript.js | 10 +-- components/prism-javascript.min.js | 2 +- components/prism-markup.js | 44 +++++++++++ components/prism-markup.min.js | 2 +- prism.js | 64 ++++++++++----- .../markup!+css+javascript/issue1240.test | 17 ++-- .../languages/markup!+css/css_inclusion.test | 78 +++++++++++++++---- .../javascript_inclusion.test | 75 +++++++++++++++--- .../script_feature.test | 6 +- 11 files changed, 239 insertions(+), 71 deletions(-) diff --git a/components/prism-css.js b/components/prism-css.js index c19692070c..4570d8f2f4 100644 --- a/components/prism-css.js +++ b/components/prism-css.js @@ -22,15 +22,7 @@ Prism.languages.css = { Prism.languages.css['atrule'].inside.rest = Prism.languages.css; if (Prism.languages.markup) { - Prism.languages.insertBefore('markup', 'tag', { - 'style': { - pattern: /()[\s\S]*?(?=<\/style>)/i, - lookbehind: true, - inside: Prism.languages.css, - alias: 'language-css', - greedy: true - } - }); + Prism.languages.markup.tag.addInlined('style', 'css'); Prism.languages.insertBefore('inside', 'attr-value', { 'style-attr': { diff --git a/components/prism-css.min.js b/components/prism-css.min.js index 8e569afdbd..56b69ee0fc 100644 --- a/components/prism-css.min.js +++ b/components/prism-css.min.js @@ -1 +1 @@ -Prism.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:/@[\w-]+?[\s\S]*?(?:;|(?=\s*\{))/i,inside:{rule:/@[\w-]+/}},url:/url\((?:(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1|.*?)\)/i,selector:/[^{}\s][^{};]*?(?=\s*\{)/,string:{pattern:/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},property:/[-_a-z\xA0-\uFFFF][-\w\xA0-\uFFFF]*(?=\s*:)/i,important:/!important\b/i,"function":/[-a-z0-9]+(?=\()/i,punctuation:/[(){};:,]/},Prism.languages.css.atrule.inside.rest=Prism.languages.css,Prism.languages.markup&&(Prism.languages.insertBefore("markup","tag",{style:{pattern:/()[\s\S]*?(?=<\/style>)/i,lookbehind:!0,inside:Prism.languages.css,alias:"language-css",greedy:!0}}),Prism.languages.insertBefore("inside","attr-value",{"style-attr":{pattern:/\s*style=("|')(?:\\[\s\S]|(?!\1)[^\\])*\1/i,inside:{"attr-name":{pattern:/^\s*style/i,inside:Prism.languages.markup.tag.inside},punctuation:/^\s*=\s*['"]|['"]\s*$/,"attr-value":{pattern:/.+/i,inside:Prism.languages.css}},alias:"language-css"}},Prism.languages.markup.tag)); \ No newline at end of file +Prism.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:/@[\w-]+?[\s\S]*?(?:;|(?=\s*\{))/i,inside:{rule:/@[\w-]+/}},url:/url\((?:(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1|.*?)\)/i,selector:/[^{}\s][^{};]*?(?=\s*\{)/,string:{pattern:/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},property:/[-_a-z\xA0-\uFFFF][-\w\xA0-\uFFFF]*(?=\s*:)/i,important:/!important\b/i,"function":/[-a-z0-9]+(?=\()/i,punctuation:/[(){};:,]/},Prism.languages.css.atrule.inside.rest=Prism.languages.css,Prism.languages.markup&&(Prism.languages.markup.tag.addInlined("style","css"),Prism.languages.insertBefore("inside","attr-value",{"style-attr":{pattern:/\s*style=("|')(?:\\[\s\S]|(?!\1)[^\\])*\1/i,inside:{"attr-name":{pattern:/^\s*style/i,inside:Prism.languages.markup.tag.inside},punctuation:/^\s*=\s*['"]|['"]\s*$/,"attr-value":{pattern:/.+/i,inside:Prism.languages.css}},alias:"language-css"}},Prism.languages.markup.tag)); \ No newline at end of file diff --git a/components/prism-javascript.js b/components/prism-javascript.js index a564895d9e..4b389e612d 100644 --- a/components/prism-javascript.js +++ b/components/prism-javascript.js @@ -77,15 +77,7 @@ Prism.languages.insertBefore('javascript', 'string', { }); if (Prism.languages.markup) { - Prism.languages.insertBefore('markup', 'tag', { - 'script': { - pattern: /()[\s\S]*?(?=<\/script>)/i, - lookbehind: true, - inside: Prism.languages.javascript, - alias: 'language-javascript', - greedy: true - } - }); + Prism.languages.markup.tag.addInlined('script', 'javascript'); } Prism.languages.js = Prism.languages.javascript; diff --git a/components/prism-javascript.min.js b/components/prism-javascript.min.js index df9ba772b5..912c02569e 100644 --- a/components/prism-javascript.min.js +++ b/components/prism-javascript.min.js @@ -1 +1 @@ -Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])[_$A-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\.(?:prototype|constructor))/,lookbehind:!0}],keyword:[{pattern:/((?:^|})\s*)(?:catch|finally)\b/,lookbehind:!0},/\b(?:as|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/],number:/\b(?:(?:0[xX][\dA-Fa-f]+|0[bB][01]+|0[oO][0-7]+)n?|\d+n|NaN|Infinity)\b|(?:\b\d+\.?\d*|\B\.\d+)(?:[Ee][+-]?\d+)?/,"function":/[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,operator:/-[-=]?|\+[+=]?|!=?=?|<>?>?=?|=(?:==?|>)?|&[&=]?|\|[|=]?|\*\*?=?|\/=?|~|\^=?|%=?|\?|\.{3}/}),Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/,Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s])\s*)\/(\[(?:[^\]\\\r\n]|\\.)*]|\\.|[^\/\\\[\r\n])+\/[gimyu]{0,5}(?=\s*($|[\r\n,.;})\]]))/,lookbehind:!0,greedy:!0},"function-variable":{pattern:/[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)?\s*\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*=>)/i,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*\s*)\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),Prism.languages.insertBefore("javascript","string",{"template-string":{pattern:/`(?:\\[\s\S]|\${[^}]+}|[^\\`])*`/,greedy:!0,inside:{interpolation:{pattern:/\${[^}]+}/,inside:{"interpolation-punctuation":{pattern:/^\${|}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}}}),Prism.languages.markup&&Prism.languages.insertBefore("markup","tag",{script:{pattern:/()[\s\S]*?(?=<\/script>)/i,lookbehind:!0,inside:Prism.languages.javascript,alias:"language-javascript",greedy:!0}}),Prism.languages.js=Prism.languages.javascript; \ No newline at end of file +Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])[_$A-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\.(?:prototype|constructor))/,lookbehind:!0}],keyword:[{pattern:/((?:^|})\s*)(?:catch|finally)\b/,lookbehind:!0},/\b(?:as|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/],number:/\b(?:(?:0[xX][\dA-Fa-f]+|0[bB][01]+|0[oO][0-7]+)n?|\d+n|NaN|Infinity)\b|(?:\b\d+\.?\d*|\B\.\d+)(?:[Ee][+-]?\d+)?/,"function":/[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,operator:/-[-=]?|\+[+=]?|!=?=?|<>?>?=?|=(?:==?|>)?|&[&=]?|\|[|=]?|\*\*?=?|\/=?|~|\^=?|%=?|\?|\.{3}/}),Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/,Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s])\s*)\/(\[(?:[^\]\\\r\n]|\\.)*]|\\.|[^\/\\\[\r\n])+\/[gimyu]{0,5}(?=\s*($|[\r\n,.;})\]]))/,lookbehind:!0,greedy:!0},"function-variable":{pattern:/[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)?\s*\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*=>)/i,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*\s*)\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),Prism.languages.insertBefore("javascript","string",{"template-string":{pattern:/`(?:\\[\s\S]|\${[^}]+}|[^\\`])*`/,greedy:!0,inside:{interpolation:{pattern:/\${[^}]+}/,inside:{"interpolation-punctuation":{pattern:/^\${|}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}}}),Prism.languages.markup&&Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.js=Prism.languages.javascript; \ No newline at end of file diff --git a/components/prism-markup.js b/components/prism-markup.js index 39d456d9b9..ca365e2786 100644 --- a/components/prism-markup.js +++ b/components/prism-markup.js @@ -50,6 +50,50 @@ Prism.hooks.add('wrap', function(env) { } }); +Object.defineProperty(Prism.languages.markup.tag, 'addInlined', { + /** + * Adds an inlined language to markup. + * + * An example of an inlined language is CSS with `\r\n\t`"]]], - ["punctuation", ";"] + ["language-javascript", [ + ["keyword", "let"], + " str ", + ["operator", "="], + ["template-string", [ + ["string", "`\r\n\t\t\r\n\t`"] + ]], + ["punctuation", ";"] + ]] ]], ["tag", [ ["tag", [ @@ -35,4 +38,4 @@ ---------------------------------------------------- -Checks for Javascript usage inside Markup, using + +'; +]]> +"foo" + + ---------------------------------------------------- [ - ["tag", [ ["tag", [ ["punctuation", "<"], "script" ]], - ["attr-name", [ - "type" - ]], + ["attr-name", ["type"]], ["attr-value", [ ["punctuation", "="], ["punctuation", "\""], @@ -24,9 +30,11 @@ ["punctuation", ">"] ]], ["script", [ - ["function", "foo"], - ["punctuation", "("], - ["punctuation", ")"] + ["language-javascript", [ + ["function", "foo"], + ["punctuation", "("], + ["punctuation", ")"] + ]] ]], ["tag", [ ["tag", [ @@ -44,7 +52,56 @@ ["punctuation", ">"] ]], ["script", [ - ["string", "\"foo bar\""] + ["language-javascript", [ + ["string", "\"foo bar\""] + ]] + ]], + ["tag", [ + ["tag", [ + ["punctuation", ""] + ]], + + ["tag", [ + ["tag", [ + ["punctuation", "<"], + "script" + ]], + ["attr-name", ["type"]], + ["attr-value", [ + ["punctuation", "="], + ["punctuation", "\""], + "application/javascript", + ["punctuation", "\""] + ]], + ["punctuation", ">"] + ]], + ["script", [ + ["language-javascript", [ + ["keyword", "var"], + " a ", + ["operator", "="], + ["number", "0"], + ["punctuation", ";"] + ]], + ["included-cdata", [ + ["cdata", "'"], + ["punctuation", ";"] + ]] + ]], + ["cdata", "]]>"] + ]], + ["language-javascript", [ + ["string", "\"foo\""] + ]] ]], ["tag", [ ["tag", [ @@ -57,4 +114,4 @@ ---------------------------------------------------- -Checks for Javascript usage inside Markup, using "),t.textContent=e.code,n.appendChild(t),e.element.parentNode.replaceChild(n,e.element),e.element=t,void 0}var n=e.element.parentNode;!e.code&&n&&"pre"==n.nodeName.toLowerCase()&&e.element.childNodes.length&&"#comment"==e.element.childNodes[0].nodeName&&(e.element.textContent=e.code=e.element.childNodes[0].textContent)}))}(); \ No newline at end of file +"undefined"!=typeof self&&self.Prism&&self.document&&Prism.languages.markup&&(Prism.plugins.UnescapedMarkup=!0,Prism.hooks.add("before-highlightall",function(e){e.selector+=", [class*='lang-'] script[type='text/plain'], [class*='language-'] script[type='text/plain'], script[type='text/plain'][class*='lang-'], script[type='text/plain'][class*='language-']"}),Prism.hooks.add("before-sanity-check",function(t){if((t.element.matches||t.element.msMatchesSelector).call(t.element,"script[type='text/plain']")){var e=document.createElement("code");return(a=document.createElement("pre")).className=e.className=t.element.className,t.element.dataset&&Object.keys(t.element.dataset).forEach(function(e){Object.prototype.hasOwnProperty.call(t.element.dataset,e)&&(a.dataset[e]=t.element.dataset[e])}),t.code=t.code.replace(/<\/script(>|>)/gi,"<\/script>"),e.textContent=t.code,a.appendChild(e),t.element.parentNode.replaceChild(a,t.element),void(t.element=e)}var a=t.element.parentNode;!t.code&&a&&"pre"==a.nodeName.toLowerCase()&&t.element.childNodes.length&&"#comment"==t.element.childNodes[0].nodeName&&(t.element.textContent=t.code=t.element.childNodes[0].textContent)})); \ No newline at end of file diff --git a/plugins/wpd/prism-wpd.min.js b/plugins/wpd/prism-wpd.min.js index 86bad36272..878572db19 100644 --- a/plugins/wpd/prism-wpd.min.js +++ b/plugins/wpd/prism-wpd.min.js @@ -1 +1 @@ -!function(){function e(e){var n=e.toLowerCase();if(t.HTML[n])return"html";if(t.SVG[e])return"svg";if(t.MathML[e])return"mathml";if(0!==t.HTML[n]&&"undefined"!=typeof document){var a=(document.createElement(e).toString().match(/\[object HTML(.+)Element\]/)||[])[1];if(a&&"Unknown"!=a)return t.HTML[n]=1,"html"}if(t.HTML[n]=0,0!==t.SVG[e]&&"undefined"!=typeof document){var s=(document.createElementNS("http://www.w3.org/2000/svg",e).toString().match(/\[object SVG(.+)Element\]/)||[])[1];if(s&&"Unknown"!=s)return t.SVG[e]=1,"svg"}return t.SVG[e]=0,0!==t.MathML[e]&&0===e.indexOf("m")?(t.MathML[e]=1,"mathml"):(t.MathML[e]=0,null)}if(("undefined"==typeof self||self.Prism)&&("undefined"==typeof global||global.Prism)){if(Prism.languages.css&&(Prism.languages.css.selector.pattern?(Prism.languages.css.selector.inside["pseudo-class"]=/:[\w-]+/,Prism.languages.css.selector.inside["pseudo-element"]=/::[\w-]+/):Prism.languages.css.selector={pattern:Prism.languages.css.selector,inside:{"pseudo-class":/:[\w-]+/,"pseudo-element":/::[\w-]+/}}),Prism.languages.markup){Prism.languages.markup.tag.inside.tag.inside["tag-id"]=/[\w-]+/;var t={HTML:{a:1,abbr:1,acronym:1,b:1,basefont:1,bdo:1,big:1,blink:1,cite:1,code:1,dfn:1,em:1,kbd:1,i:1,rp:1,rt:1,ruby:1,s:1,samp:1,small:1,spacer:1,strike:1,strong:1,sub:1,sup:1,time:1,tt:1,u:1,"var":1,wbr:1,noframes:1,summary:1,command:1,dt:1,dd:1,figure:1,figcaption:1,center:1,section:1,nav:1,article:1,aside:1,hgroup:1,header:1,footer:1,address:1,noscript:1,isIndex:1,main:1,mark:1,marquee:1,meter:1,menu:1},SVG:{animateColor:1,animateMotion:1,animateTransform:1,glyph:1,feBlend:1,feColorMatrix:1,feComponentTransfer:1,feFuncR:1,feFuncG:1,feFuncB:1,feFuncA:1,feComposite:1,feConvolveMatrix:1,feDiffuseLighting:1,feDisplacementMap:1,feFlood:1,feGaussianBlur:1,feImage:1,feMerge:1,feMergeNode:1,feMorphology:1,feOffset:1,feSpecularLighting:1,feTile:1,feTurbulence:1,feDistantLight:1,fePointLight:1,feSpotLight:1,linearGradient:1,radialGradient:1,altGlyph:1,textPath:1,tref:1,altglyph:1,textpath:1,altglyphdef:1,altglyphitem:1,clipPath:1,"color-profile":1,cursor:1,"font-face":1,"font-face-format":1,"font-face-name":1,"font-face-src":1,"font-face-uri":1,foreignObject:1,glyphRef:1,hkern:1,vkern:1},MathML:{}}}var n;Prism.hooks.add("wrap",function(t){if(("tag-id"==t.type||"property"==t.type&&0!=t.content.indexOf("-")||"rule"==t.type&&0!=t.content.indexOf("@-")||"pseudo-class"==t.type&&0!=t.content.indexOf(":-")||"pseudo-element"==t.type&&0!=t.content.indexOf("::-")||"attr-name"==t.type&&0!=t.content.indexOf("data-"))&&-1===t.content.indexOf("<")&&("css"==t.language||"scss"==t.language||"markup"==t.language)){var a="https://webplatform.github.io/docs/",s=t.content;if("css"==t.language||"scss"==t.language)a+="css/","property"==t.type?a+="properties/":"rule"==t.type?(a+="atrules/",s=s.substring(1)):"pseudo-class"==t.type?(a+="selectors/pseudo-classes/",s=s.substring(1)):"pseudo-element"==t.type&&(a+="selectors/pseudo-elements/",s=s.substring(2));else if("markup"==t.language)if("tag-id"==t.type){if(n=e(t.content)||n,!n)return;a+=n+"/elements/"}else if("attr-name"==t.type){if(!n)return;a+=n+"/attributes/"}a+=s,t.tag="a",t.attributes.href=a,t.attributes.target="_blank"}})}}(); \ No newline at end of file +!function(){if(("undefined"==typeof self||self.Prism)&&("undefined"==typeof global||global.Prism)){if(Prism.languages.css&&(Prism.languages.css.selector.pattern?(Prism.languages.css.selector.inside["pseudo-class"]=/:[\w-]+/,Prism.languages.css.selector.inside["pseudo-element"]=/::[\w-]+/):Prism.languages.css.selector={pattern:Prism.languages.css.selector,inside:{"pseudo-class":/:[\w-]+/,"pseudo-element":/::[\w-]+/}}),Prism.languages.markup){Prism.languages.markup.tag.inside.tag.inside["tag-id"]=/[\w-]+/;var s={HTML:{a:1,abbr:1,acronym:1,b:1,basefont:1,bdo:1,big:1,blink:1,cite:1,code:1,dfn:1,em:1,kbd:1,i:1,rp:1,rt:1,ruby:1,s:1,samp:1,small:1,spacer:1,strike:1,strong:1,sub:1,sup:1,time:1,tt:1,u:1,var:1,wbr:1,noframes:1,summary:1,command:1,dt:1,dd:1,figure:1,figcaption:1,center:1,section:1,nav:1,article:1,aside:1,hgroup:1,header:1,footer:1,address:1,noscript:1,isIndex:1,main:1,mark:1,marquee:1,meter:1,menu:1},SVG:{animateColor:1,animateMotion:1,animateTransform:1,glyph:1,feBlend:1,feColorMatrix:1,feComponentTransfer:1,feFuncR:1,feFuncG:1,feFuncB:1,feFuncA:1,feComposite:1,feConvolveMatrix:1,feDiffuseLighting:1,feDisplacementMap:1,feFlood:1,feGaussianBlur:1,feImage:1,feMerge:1,feMergeNode:1,feMorphology:1,feOffset:1,feSpecularLighting:1,feTile:1,feTurbulence:1,feDistantLight:1,fePointLight:1,feSpotLight:1,linearGradient:1,radialGradient:1,altGlyph:1,textPath:1,tref:1,altglyph:1,textpath:1,altglyphdef:1,altglyphitem:1,clipPath:1,"color-profile":1,cursor:1,"font-face":1,"font-face-format":1,"font-face-name":1,"font-face-src":1,"font-face-uri":1,foreignObject:1,glyphRef:1,hkern:1,vkern:1},MathML:{}}}var a;Prism.hooks.add("wrap",function(e){if(("tag-id"==e.type||"property"==e.type&&0!=e.content.indexOf("-")||"rule"==e.type&&0!=e.content.indexOf("@-")||"pseudo-class"==e.type&&0!=e.content.indexOf(":-")||"pseudo-element"==e.type&&0!=e.content.indexOf("::-")||"attr-name"==e.type&&0!=e.content.indexOf("data-"))&&-1===e.content.indexOf("<")&&("css"==e.language||"scss"==e.language||"markup"==e.language)){var t="https://webplatform.github.io/docs/",n=e.content;if("css"==e.language||"scss"==e.language)t+="css/","property"==e.type?t+="properties/":"rule"==e.type?(t+="atrules/",n=n.substring(1)):"pseudo-class"==e.type?(t+="selectors/pseudo-classes/",n=n.substring(1)):"pseudo-element"==e.type&&(t+="selectors/pseudo-elements/",n=n.substring(2));else if("markup"==e.language)if("tag-id"==e.type){if(!(a=function(e){var t=e.toLowerCase();{if(s.HTML[t])return"html";if(s.SVG[e])return"svg";if(s.MathML[e])return"mathml"}if(0!==s.HTML[t]&&"undefined"!=typeof document){var n=(document.createElement(e).toString().match(/\[object HTML(.+)Element\]/)||[])[1];if(n&&"Unknown"!=n)return s.HTML[t]=1,"html"}if((s.HTML[t]=0)!==s.SVG[e]&&"undefined"!=typeof document){var a=(document.createElementNS("http://www.w3.org/2000/svg",e).toString().match(/\[object SVG(.+)Element\]/)||[])[1];if(a&&"Unknown"!=a)return s.SVG[e]=1,"svg"}if((s.SVG[e]=0)!==s.MathML[e]&&0===e.indexOf("m"))return s.MathML[e]=1,"mathml";return s.MathML[e]=0,null}(e.content)||a))return;t+=a+"/elements/"}else if("attr-name"==e.type){if(!a)return;t+=a+"/attributes/"}t+=n,e.tag="a",e.attributes.href=t,e.attributes.target="_blank"}})}}(); \ No newline at end of file From b2298b12245bf947e932ddfa91ce276133f12451 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Sun, 10 Mar 2019 15:45:40 +0100 Subject: [PATCH 0207/1100] Added GraphQL improvements and tests (#1788) This makes some improvements to GraphQL and expands the existing tests. --- components/prism-graphql.js | 27 +++++++---- components/prism-graphql.min.js | 2 +- .../languages/graphql/attr-name_feature.test | 24 ++++++++++ .../languages/graphql/class-name_feature.test | 48 +++++++++++++++++++ tests/languages/graphql/constant_feature.test | 39 +++++++++++++++ tests/languages/graphql/fragment_feature.test | 29 +++++++++++ tests/languages/graphql/keyword_feature.test | 33 ++++++++----- tests/languages/graphql/operator_feature.test | 15 ++++++ 8 files changed, 194 insertions(+), 23 deletions(-) create mode 100644 tests/languages/graphql/class-name_feature.test create mode 100644 tests/languages/graphql/constant_feature.test create mode 100644 tests/languages/graphql/fragment_feature.test create mode 100644 tests/languages/graphql/operator_feature.test diff --git a/components/prism-graphql.js b/components/prism-graphql.js index 5333ee39c5..22107ad412 100644 --- a/components/prism-graphql.js +++ b/components/prism-graphql.js @@ -11,14 +11,21 @@ Prism.languages.graphql = { pattern: /@[a-z_]\w*/i, alias: 'function' }, - 'attr-name': /[a-z_]\w*(?=\s*(?:\([^()]*\))?:)/i, - 'keyword': [ - { - pattern: /(fragment\s+(?!on)[a-z_]\w*\s+|\.{3}\s*)on\b/, - lookbehind: true - }, - /\b(?:query|fragment|mutation)\b/ - ], - 'operator': /!|=|\.{3}/, - 'punctuation': /[!(){}\[\]:=,]/ + 'attr-name': { + pattern: /[a-z_]\w*(?=\s*(?:\((?:[^()"]|"(?:\\.|[^\\"\r\n])*")*\))?:)/i, + greedy: true + }, + 'class-name': { + pattern: /(\b(?:enum|implements|interface|on|scalar|type|union)\s+)[a-zA-Z_]\w*/, + lookbehind: true + }, + 'fragment': { + pattern: /(\bfragment\s+|\.{3}\s*(?!on\b))[a-zA-Z_]\w*/, + lookbehind: true, + alias: 'function' + }, + 'keyword': /\b(?:enum|fragment|implements|input|interface|mutation|on|query|scalar|schema|type|union)\b/, + 'operator': /[!=|]|\.{3}/, + 'punctuation': /[!(){}\[\]:=,]/, + 'constant': /\b(?!ID\b)[A-Z][A-Z_\d]*\b/ }; diff --git a/components/prism-graphql.min.js b/components/prism-graphql.min.js index eae1e6884c..3db10bad0a 100644 --- a/components/prism-graphql.min.js +++ b/components/prism-graphql.min.js @@ -1 +1 @@ -Prism.languages.graphql={comment:/#.*/,string:{pattern:/"(?:\\.|[^\\"\r\n])*"/,greedy:!0},number:/(?:\B-|\b)\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,boolean:/\b(?:true|false)\b/,variable:/\$[a-z_]\w*/i,directive:{pattern:/@[a-z_]\w*/i,alias:"function"},"attr-name":/[a-z_]\w*(?=\s*(?:\([^()]*\))?:)/i,keyword:[{pattern:/(fragment\s+(?!on)[a-z_]\w*\s+|\.{3}\s*)on\b/,lookbehind:!0},/\b(?:query|fragment|mutation)\b/],operator:/!|=|\.{3}/,punctuation:/[!(){}\[\]:=,]/}; \ No newline at end of file +Prism.languages.graphql={comment:/#.*/,string:{pattern:/"(?:\\.|[^\\"\r\n])*"/,greedy:!0},number:/(?:\B-|\b)\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,boolean:/\b(?:true|false)\b/,variable:/\$[a-z_]\w*/i,directive:{pattern:/@[a-z_]\w*/i,alias:"function"},"attr-name":{pattern:/[a-z_]\w*(?=\s*(?:\((?:[^()"]|"(?:\\.|[^\\"\r\n])*")*\))?:)/i,greedy:!0},"class-name":{pattern:/(\b(?:enum|implements|interface|on|scalar|type|union)\s+)[a-zA-Z_]\w*/,lookbehind:!0},fragment:{pattern:/(\bfragment\s+|\.{3}\s*(?!on\b))[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},keyword:/\b(?:enum|fragment|implements|input|interface|mutation|on|query|scalar|schema|type|union)\b/,operator:/[!=|]|\.{3}/,punctuation:/[!(){}\[\]:=,]/,constant:/\b(?!ID\b)[A-Z][A-Z_\d]*\b/}; \ No newline at end of file diff --git a/tests/languages/graphql/attr-name_feature.test b/tests/languages/graphql/attr-name_feature.test index 7f976e6d50..8f95fc25c6 100644 --- a/tests/languages/graphql/attr-name_feature.test +++ b/tests/languages/graphql/attr-name_feature.test @@ -2,12 +2,14 @@ zuck: user(id: 4) { name } + foo(bar: Int = 0, baz: String = "("): [Int!]! } ---------------------------------------------------- [ ["punctuation", "{"], + ["attr-name", "zuck"], ["punctuation", ":"], " user", @@ -19,6 +21,28 @@ ["punctuation", "{"], "\r\n\t\tname\r\n\t", ["punctuation", "}"], + + ["attr-name", "foo"], + ["punctuation", "("], + ["attr-name", "bar"], + ["punctuation", ":"], + " Int ", + ["operator", "="], + ["number", "0"], + ["punctuation", ","], + ["attr-name", "baz"], + ["punctuation", ":"], + " String ", + ["operator", "="], + ["string", "\"(\""], + ["punctuation", ")"], + ["punctuation", ":"], + ["punctuation", "["], + "Int", + ["operator", "!"], + ["punctuation", "]"], + ["operator", "!"], + ["punctuation", "}"] ] diff --git a/tests/languages/graphql/class-name_feature.test b/tests/languages/graphql/class-name_feature.test new file mode 100644 index 0000000000..6ac1e29933 --- /dev/null +++ b/tests/languages/graphql/class-name_feature.test @@ -0,0 +1,48 @@ +interface Foo {} +type Foo {} +type Foo implements Bar {} +enum Foo {} +scalar Foo +union Foo +on Foo {} + +---------------------------------------------------- + +[ + ["keyword", "interface"], + ["class-name", "Foo"], + ["punctuation", "{"], + ["punctuation", "}"], + + ["keyword", "type"], + ["class-name", "Foo"], + ["punctuation", "{"], + ["punctuation", "}"], + + ["keyword", "type"], + ["class-name", "Foo"], + ["keyword", "implements"], + ["class-name", "Bar"], + ["punctuation", "{"], + ["punctuation", "}"], + + ["keyword", "enum"], + ["class-name", "Foo"], + ["punctuation", "{"], + ["punctuation", "}"], + + ["keyword", "scalar"], + ["class-name", "Foo"], + + ["keyword", "union"], + ["class-name", "Foo"], + + ["keyword", "on"], + ["class-name", "Foo"], + ["punctuation", "{"], + ["punctuation", "}"] +] + +---------------------------------------------------- + +Checks for class names. \ No newline at end of file diff --git a/tests/languages/graphql/constant_feature.test b/tests/languages/graphql/constant_feature.test new file mode 100644 index 0000000000..b6ad2e7651 --- /dev/null +++ b/tests/languages/graphql/constant_feature.test @@ -0,0 +1,39 @@ +enum Color { + RED + GREEN + BLUE +} + +{ + foo(bar: RED) { + baz + } +} + +---------------------------------------------------- + +[ + ["keyword", "enum"], + ["class-name", "Color"], + ["punctuation", "{"], + ["constant", "RED"], + ["constant", "GREEN"], + ["constant", "BLUE"], + ["punctuation", "}"], + + ["punctuation", "{"], + "\n\tfoo", + ["punctuation", "("], + ["attr-name", "bar"], + ["punctuation", ":"], + ["constant", "RED"], + ["punctuation", ")"], + ["punctuation", "{"], + "\n\t\tbaz\n\t", + ["punctuation", "}"], + ["punctuation", "}"] +] + +---------------------------------------------------- + +Checks for constants. \ No newline at end of file diff --git a/tests/languages/graphql/fragment_feature.test b/tests/languages/graphql/fragment_feature.test new file mode 100644 index 0000000000..7fdcc7f953 --- /dev/null +++ b/tests/languages/graphql/fragment_feature.test @@ -0,0 +1,29 @@ +{ + ...frag +} + +fragment frag on FooBar { + foo + bar +} + +---------------------------------------------------- + +[ + ["punctuation", "{"], + ["operator", "..."], + ["fragment", "frag"], + ["punctuation", "}"], + + ["keyword", "fragment"], + ["fragment", "frag"], + ["keyword", "on"], + ["class-name", "FooBar"], + ["punctuation", "{"], + "\r\n\tfoo\r\n\tbar\r\n", + ["punctuation", "}"] +] + +---------------------------------------------------- + +Checks for fragments. \ No newline at end of file diff --git a/tests/languages/graphql/keyword_feature.test b/tests/languages/graphql/keyword_feature.test index 06d16f2abf..9d30f88dfa 100644 --- a/tests/languages/graphql/keyword_feature.test +++ b/tests/languages/graphql/keyword_feature.test @@ -1,22 +1,31 @@ -query +enum fragment +implements +input +interface mutation -fragment foo on Bar -... on Foo +on +query +scalar +schema +type +union ---------------------------------------------------- [ - ["keyword", "query"], - ["keyword", "fragment"], - ["keyword", "mutation"], - ["keyword", "fragment"], - " foo ", - ["keyword", "on"], - " Bar\r\n", - ["operator", "..."], + ["keyword", "enum"], + ["class-name", "fragment"], + ["keyword", "implements"], + ["class-name", "input"], + ["keyword", "interface"], + ["class-name", "mutation"], ["keyword", "on"], - " Foo" + ["class-name", "query"], + ["keyword", "scalar"], + ["class-name", "schema"], + ["keyword", "type"], + ["class-name", "union"] ] ---------------------------------------------------- diff --git a/tests/languages/graphql/operator_feature.test b/tests/languages/graphql/operator_feature.test new file mode 100644 index 0000000000..c19fe7393e --- /dev/null +++ b/tests/languages/graphql/operator_feature.test @@ -0,0 +1,15 @@ += ! | +... + +---------------------------------------------------- + +[ + ["operator", "="], + ["operator", "!"], + ["operator", "|"], + ["operator", "..."] +] + +---------------------------------------------------- + +Checks for operators. \ No newline at end of file From af67c32e25ac28dbbc52f30ddd483b7c59e18ef0 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Sun, 10 Mar 2019 18:44:30 +0100 Subject: [PATCH 0208/1100] Markup `addInline` improvements (#1798) This makes some minor improvements to the new `addInline` function of markup. --- components/prism-markup.js | 30 +++++++++---------- components/prism-markup.min.js | 2 +- prism.js | 30 +++++++++---------- .../languages/markup!+css/css_inclusion.test | 18 +++++------ .../javascript_inclusion.test | 14 ++++----- 5 files changed, 45 insertions(+), 49 deletions(-) diff --git a/components/prism-markup.js b/components/prism-markup.js index ca365e2786..c288778fd2 100644 --- a/components/prism-markup.js +++ b/components/prism-markup.js @@ -63,7 +63,20 @@ Object.defineProperty(Prism.languages.markup.tag, 'addInlined', { * addInlined('style', 'css'); */ value: function addInlined(tagName, lang) { - var inside = {}; + var includedCdataInside = {}; + includedCdataInside['language-' + lang] = { + pattern: /(^$)/i, + lookbehind: true, + inside: Prism.languages[lang] + }; + includedCdataInside['cdata'] = /^$/i; + + var inside = { + 'included-cdata': { + pattern: //i, + inside: includedCdataInside + } + }; inside['language-' + lang] = { pattern: /[\s\S]+/, inside: Prism.languages[lang] @@ -74,20 +87,7 @@ Object.defineProperty(Prism.languages.markup.tag, 'addInlined', { pattern: RegExp(/(<__[\s\S]*?>)(?:\s*|[\s\S])*?(?=<\/__>)/.source.replace(/__/g, tagName), 'i'), lookbehind: true, greedy: true, - inside: { - 'included-cdata': { - pattern: //i, - inside: { - 'content': { - pattern: /(^$)/i, - lookbehind: true, - inside: inside - }, - 'cdata': /^$/i - } - }, - rest: inside - } + inside: inside }; Prism.languages.insertBefore('markup', 'cdata', def); diff --git a/components/prism-markup.min.js b/components/prism-markup.min.js index 0a72db1221..925bc87b27 100644 --- a/components/prism-markup.min.js +++ b/components/prism-markup.min.js @@ -1 +1 @@ -Prism.languages.markup={comment://,prolog:/<\?[\s\S]+?\?>/,doctype://i,cdata://i,tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/i,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/i,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/i,inside:{punctuation:[/^=/,{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:/&#?[\da-z]{1,8};/i},Prism.languages.markup.tag.inside["attr-value"].inside.entity=Prism.languages.markup.entity,Prism.hooks.add("wrap",function(a){"entity"===a.type&&(a.attributes.title=a.content.replace(/&/,"&"))}),Object.defineProperty(Prism.languages.markup.tag,"addInlined",{value:function(a,e){var s={};s["language-"+e]={pattern:/[\s\S]+/,inside:Prism.languages[e]};var t={};t[a]={pattern:RegExp("(<__[\\s\\S]*?>)(?:\\s*|[\\s\\S])*?(?=<\\/__>)".replace(/__/g,a),"i"),lookbehind:!0,greedy:!0,inside:{"included-cdata":{pattern://i,inside:{content:{pattern:/(^$)/i,lookbehind:!0,inside:s},cdata:/^$/i}},rest:s}},Prism.languages.insertBefore("markup","cdata",t)}}),Prism.languages.xml=Prism.languages.extend("markup",{}),Prism.languages.html=Prism.languages.markup,Prism.languages.mathml=Prism.languages.markup,Prism.languages.svg=Prism.languages.markup; \ No newline at end of file +Prism.languages.markup={comment://,prolog:/<\?[\s\S]+?\?>/,doctype://i,cdata://i,tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/i,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/i,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/i,inside:{punctuation:[/^=/,{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:/&#?[\da-z]{1,8};/i},Prism.languages.markup.tag.inside["attr-value"].inside.entity=Prism.languages.markup.entity,Prism.hooks.add("wrap",function(a){"entity"===a.type&&(a.attributes.title=a.content.replace(/&/,"&"))}),Object.defineProperty(Prism.languages.markup.tag,"addInlined",{value:function(a,e){var s={};s["language-"+e]={pattern:/(^$)/i,lookbehind:!0,inside:Prism.languages[e]},s.cdata=/^$/i;var n={"included-cdata":{pattern://i,inside:s}};n["language-"+e]={pattern:/[\s\S]+/,inside:Prism.languages[e]};var i={};i[a]={pattern:RegExp("(<__[\\s\\S]*?>)(?:\\s*|[\\s\\S])*?(?=<\\/__>)".replace(/__/g,a),"i"),lookbehind:!0,greedy:!0,inside:n},Prism.languages.insertBefore("markup","cdata",i)}}),Prism.languages.xml=Prism.languages.extend("markup",{}),Prism.languages.html=Prism.languages.markup,Prism.languages.mathml=Prism.languages.markup,Prism.languages.svg=Prism.languages.markup; \ No newline at end of file diff --git a/prism.js b/prism.js index d96b24990c..78d014a92f 100644 --- a/prism.js +++ b/prism.js @@ -627,7 +627,20 @@ Object.defineProperty(Prism.languages.markup.tag, 'addInlined', { * addInlined('style', 'css'); */ value: function addInlined(tagName, lang) { - var inside = {}; + var includedCdataInside = {}; + includedCdataInside['language-' + lang] = { + pattern: /(^$)/i, + lookbehind: true, + inside: Prism.languages[lang] + }; + includedCdataInside['cdata'] = /^$/i; + + var inside = { + 'included-cdata': { + pattern: //i, + inside: includedCdataInside + } + }; inside['language-' + lang] = { pattern: /[\s\S]+/, inside: Prism.languages[lang] @@ -638,20 +651,7 @@ Object.defineProperty(Prism.languages.markup.tag, 'addInlined', { pattern: RegExp(/(<__[\s\S]*?>)(?:\s*|[\s\S])*?(?=<\/__>)/.source.replace(/__/g, tagName), 'i'), lookbehind: true, greedy: true, - inside: { - 'included-cdata': { - pattern: //i, - inside: { - 'content': { - pattern: /(^$)/i, - lookbehind: true, - inside: inside - }, - 'cdata': /^$/i - } - }, - rest: inside - } + inside: inside }; Prism.languages.insertBefore('markup', 'cdata', def); diff --git a/tests/languages/markup!+css/css_inclusion.test b/tests/languages/markup!+css/css_inclusion.test index b47556716d..69264dbc4e 100644 --- a/tests/languages/markup!+css/css_inclusion.test +++ b/tests/languages/markup!+css/css_inclusion.test @@ -67,16 +67,14 @@ foo { ]], ["included-cdata", [ ["cdata", ""] ]], diff --git a/tests/languages/markup!+javascript/javascript_inclusion.test b/tests/languages/markup!+javascript/javascript_inclusion.test index ab674390a9..098e8c1e61 100644 --- a/tests/languages/markup!+javascript/javascript_inclusion.test +++ b/tests/languages/markup!+javascript/javascript_inclusion.test @@ -88,14 +88,12 @@ let foo = ''; ]], ["included-cdata", [ ["cdata", "'"], - ["punctuation", ";"] - ]] + ["language-javascript", [ + ["keyword", "let"], + " foo ", + ["operator", "="], + ["string", "''"], + ["punctuation", ";"] ]], ["cdata", "]]>"] ]], From f2467488e14bea7707ae3bc7e88c876b1985f111 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Sun, 10 Mar 2019 18:53:08 +0100 Subject: [PATCH 0209/1100] Django/Jinja2 improvements (#1800) This completely rewrites the Django language definition. It's now based on markup-templating. --- components.js | 2 +- components.json | 6 +- components/prism-django.js | 89 +++++++----- components/prism-django.min.js | 2 +- plugins/autoloader/prism-autoloader.js | 2 +- plugins/autoloader/prism-autoloader.min.js | 2 +- tests/languages/django!+css/inclusion.test | 56 ++++++++ .../django!+javascript/inclusion.test | 52 +++++++ tests/languages/django/boolean_feature.test | 20 +++ tests/languages/django/comment_feature.test | 16 ++- tests/languages/django/delimiter_feature.test | 24 ++++ tests/languages/django/filter_feature.test | 130 ++++++++++++++++++ tests/languages/django/for-loop_feature.test | 96 +++++++++++++ tests/languages/django/function_feature.test | 73 ++++++++++ tests/languages/django/keyword_feature.test | 50 +++++++ tests/languages/django/property_feature.test | 64 --------- tests/languages/django/tag_feature.test | 36 +++++ tests/languages/django/test_feature.test | 23 ++++ tests/languages/django/variable_feature.test | 20 +++ 19 files changed, 652 insertions(+), 111 deletions(-) create mode 100644 tests/languages/django!+css/inclusion.test create mode 100644 tests/languages/django!+javascript/inclusion.test create mode 100644 tests/languages/django/boolean_feature.test create mode 100644 tests/languages/django/delimiter_feature.test create mode 100644 tests/languages/django/filter_feature.test create mode 100644 tests/languages/django/for-loop_feature.test create mode 100644 tests/languages/django/function_feature.test create mode 100644 tests/languages/django/keyword_feature.test delete mode 100644 tests/languages/django/property_feature.test create mode 100644 tests/languages/django/tag_feature.test create mode 100644 tests/languages/django/test_feature.test create mode 100644 tests/languages/django/variable_feature.test diff --git a/components.js b/components.js index 715c3c1674..edd81a214f 100644 --- a/components.js +++ b/components.js @@ -1,2 +1,2 @@ -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default","peerDependencies":"markup"},"clike":{"title":"C-like","option":"default","overrideExampleHeader":true},"javascript":{"title":"JavaScript","require":"clike","peerDependencies":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"Augmented Backus–Naur form","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","peerDependencies":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"Backus–Naur form","alias":"rbfn","aliasTitles":{"rbfn":"Routing Backus–Naur form"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":"dotnet","owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","owner":"R-osey"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup","peerDependencies":["css","javascript"],"alias":"jinja2","owner":"romanvm"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"Extended Backus–Naur form","owner":"RunDevelopment"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment"},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","peerDependencies":["css","coffeescript","erb","javascript","less","markdown","ruby","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"http":{"title":"HTTP","peerDependencies":["javascript","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"peerDependencies":["scala"],"owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","peerDependencies":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike"],"peerDependencies":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","peerDependencies":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","owner":"CupOfTea696"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","owner":"japborst"},"less":{"title":"Less","require":"css","owner":"Golmote"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","peerDependencies":["jsdoc"],"alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"nasm":{"title":"NASM","owner":"rbmj"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"cpp","peerDependencies":["c","cpp"],"overrideExampleHeader":true,"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"peerDependencies":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","peerDependencies":["c","cpp","fortran"],"owner":"Golmote"},"python":{"title":"Python","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"peerDependencies":["jsdoc","js-extras"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","peerDependencies":["actionscript","coffeescript","flow","javascript","typescript","vala"],"owner":"RunDevelopment"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"ruby":{"title":"Ruby","require":"clike","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sql":{"title":"SQL","owner":"multipetros"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","peerDependencies":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","alias":"ts","owner":"vkbansal"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","visual-basic"],"owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","owner":"hason"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":"Line Highlight","line-numbers":{"title":"Line Numbers","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","after":["autolinker","data-uri-highlight"]},"autolinker":"Autolinker","wpd":"WebPlatform Docs","custom-class":{"title":"Custom Class","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","noCSS":true},"show-language":{"title":"Show Language","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","owner":"Golmote","noCSS":true},"previewers":{"title":"Previewers","owner":"Golmote"},"autoloader":{"title":"Autoloader","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","owner":"Golmote","after":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","owner":"chriswells0"},"unescaped-markup":"Unescaped Markup","normalize-whitespace":{"title":"Normalize Whitespace","owner":"zeitgeist87","after":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","owner":"mAAdhaTTah","require":"toolbar","noCSS":true}}}; +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default","peerDependencies":"markup"},"clike":{"title":"C-like","option":"default","overrideExampleHeader":true},"javascript":{"title":"JavaScript","require":"clike","peerDependencies":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"Augmented Backus–Naur form","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","peerDependencies":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"Backus–Naur form","alias":"rbfn","aliasTitles":{"rbfn":"Routing Backus–Naur form"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":"dotnet","owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","owner":"R-osey"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"Extended Backus–Naur form","owner":"RunDevelopment"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment"},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","peerDependencies":["css","coffeescript","erb","javascript","less","markdown","ruby","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"http":{"title":"HTTP","peerDependencies":["javascript","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"peerDependencies":["scala"],"owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","peerDependencies":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike"],"peerDependencies":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","peerDependencies":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","owner":"CupOfTea696"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","owner":"japborst"},"less":{"title":"Less","require":"css","owner":"Golmote"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","peerDependencies":["jsdoc"],"alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"nasm":{"title":"NASM","owner":"rbmj"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"cpp","peerDependencies":["c","cpp"],"overrideExampleHeader":true,"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"peerDependencies":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","peerDependencies":["c","cpp","fortran"],"owner":"Golmote"},"python":{"title":"Python","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"peerDependencies":["jsdoc","js-extras"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","peerDependencies":["actionscript","coffeescript","flow","javascript","typescript","vala"],"owner":"RunDevelopment"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"ruby":{"title":"Ruby","require":"clike","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sql":{"title":"SQL","owner":"multipetros"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","peerDependencies":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","alias":"ts","owner":"vkbansal"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","visual-basic"],"owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","owner":"hason"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":"Line Highlight","line-numbers":{"title":"Line Numbers","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","after":["autolinker","data-uri-highlight"]},"autolinker":"Autolinker","wpd":"WebPlatform Docs","custom-class":{"title":"Custom Class","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","noCSS":true},"show-language":{"title":"Show Language","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","owner":"Golmote","noCSS":true},"previewers":{"title":"Previewers","owner":"Golmote"},"autoloader":{"title":"Autoloader","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","owner":"Golmote","after":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","owner":"chriswells0"},"unescaped-markup":"Unescaped Markup","normalize-whitespace":{"title":"Normalize Whitespace","owner":"zeitgeist87","after":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","owner":"mAAdhaTTah","require":"toolbar","noCSS":true}}}; if (typeof module !== 'undefined' && module.exports) { module.exports = components; } \ No newline at end of file diff --git a/components.json b/components.json index e470bec9f5..126ea5853f 100644 --- a/components.json +++ b/components.json @@ -231,11 +231,7 @@ }, "django": { "title": "Django/Jinja2", - "require": "markup", - "peerDependencies": [ - "css", - "javascript" - ], + "require": "markup-templating", "alias": "jinja2", "owner": "romanvm" }, diff --git a/components/prism-django.js b/components/prism-django.js index f6b3a5238d..460999fc81 100644 --- a/components/prism-django.js +++ b/components/prism-django.js @@ -1,41 +1,60 @@ // Django/Jinja2 syntax definition for Prism.js syntax highlighter. // Mostly it works OK but can paint code incorrectly on complex html/template tag combinations. -var _django_template = { - 'property': { - pattern: /(?:{{|{%)[\s\S]*?(?:%}|}})/g, - greedy: true, - inside: { - 'string': { - pattern: /("|')(?:\\.|(?!\1)[^\\\r\n])*\1/, - greedy: true - }, - 'keyword': /\b(?:\||load|verbatim|widthratio|ssi|firstof|for|url|ifchanged|csrf_token|lorem|ifnotequal|autoescape|now|templatetag|debug|cycle|ifequal|regroup|comment|filter|endfilter|if|spaceless|with|extends|block|include|else|empty|endif|endfor|as|endblock|endautoescape|endverbatim|trans|endtrans|[Tt]rue|[Ff]alse|[Nn]one|in|is|static|macro|endmacro|call|endcall|set|endset|raw|endraw)\b/, - 'operator' : /[-+=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]|\b(?:or|and|not)\b/, - 'function': /\b(?:_|abs|add|addslashes|attr|batch|callable|capfirst|capitalize|center|count|cut|d|date|default|default_if_none|defined|dictsort|dictsortreversed|divisibleby|e|equalto|escape|escaped|escapejs|even|filesizeformat|first|float|floatformat|force_escape|forceescape|format|get_digit|groupby|indent|int|iriencode|iterable|join|last|length|length_is|linebreaks|linebreaksbr|linenumbers|list|ljust|lower|make_list|map|mapping|number|odd|phone2numeric|pluralize|pprint|random|reject|rejectattr|removetags|replace|reverse|rjust|round|safe|safeseq|sameas|select|selectattr|sequence|slice|slugify|sort|string|stringformat|striptags|sum|time|timesince|timeuntil|title|trim|truncate|truncatechars|truncatechars_html|truncatewords|truncatewords_html|undefined|unordered_list|upper|urlencode|urlize|urlizetrunc|wordcount|wordwrap|xmlattr|yesno)\b/, - 'important': /\b-?\d+(?:\.\d+)?\b/, - 'variable': /\b\w+?\b/, - 'punctuation' : /[[\];(),.:]/ - } - } -}; +(function (Prism) { -Prism.languages.django = Prism.languages.extend('markup', {'comment': /(?:)/}); -// Updated html tag pattern to allow template tags inside html tags -Prism.languages.django.tag.pattern = /<\/?(?!\d)[^\s>\/=$<]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^>=]+))?)*\s*\/?>/i; -Prism.languages.insertBefore('django', 'entity', _django_template); -Prism.languages.insertBefore('inside', 'tag', _django_template, Prism.languages.django.tag); + Prism.languages.django = { + 'comment': /^{#[\s\S]*?#}$/, + 'tag': { + pattern: /(^{%[+-]?\s*)\w+/, + lookbehind: true, + alias: 'keyword' + }, + 'delimiter': { + pattern: /^{[{%][+-]?|[+-]?[}%]}$/, + alias: 'punctuation' + }, + 'string': { + pattern: /("|')(?:\\.|(?!\1)[^\\\r\n])*\1/, + greedy: true + }, + 'filter': { + pattern: /(\|)\w+/, + lookbehind: true, + alias: 'function' + }, + 'test': { + pattern: /(\bis\s+(?:not\s+)?)(?!not\b)\w+/, + lookbehind: true, + alias: 'function' + }, + 'function': /\b[a-z_]\w+(?=\s*\()/i, + 'keyword': /\b(?:and|as|by|else|for|if|import|in|is|loop|not|or|recursive|with|without)\b/, + 'operator': /[-+*/%=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/, + 'number': /\b\d+(?:\.\d+)?\b/, + 'boolean': /[Tt]rue|[Ff]alse|[Nn]one/, + 'variable': /\b\w+?\b/, + 'punctuation': /[{}[\](),.:;]/ + }; -if (Prism.languages.javascript) { - // Combine js code and template tags painting inside + +---------------------------------------------------- + +[ + ["tag", [ + ["tag", [ + ["punctuation", "<"], + "script" + ]], + ["punctuation", ">"] + ]], + ["script", [ + ["language-javascript", [ + ["django", [ + ["delimiter", "{%"], + ["tag", "if"], + ["variable", "foo"], + ["delimiter", "%}"] + ]], + ["keyword", "var"], + " foo ", + ["operator", "="], + ["django", [ + ["delimiter", "{{"], + ["variable", "bar"], + ["delimiter", "}}"] + ]], + ["punctuation", ";"], + ["django", [ + ["delimiter", "{%"], + ["tag", "endif"], + ["delimiter", "%}"] + ]] + ]] + ]], + ["tag", [ + ["tag", [ + ["punctuation", ""] + ]] +] + +---------------------------------------------------- + +Checks for Django/Jinja2 code inside @@ -75,6 +115,9 @@

    Test drive

    Result:

    +

    + +

    Language:

    @@ -195,6 +238,16 @@

    Test drive

    highlightCode(); }).call(textarea); +$('#option-show-tokens').onchange = function () { + var cls = 'show-tokens'; + if (this.checked) { + $('pre').classList.add(cls); + } else { + $('pre').classList.remove(cls); + } +}; +$('#option-show-tokens').onchange(); + })(); From 832a96432ef0852e0412c886ad8f48fbc831475f Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Sun, 10 Mar 2019 21:30:58 +0100 Subject: [PATCH 0214/1100] Refactored tests (#1795) This refactors all test related JS files. --- tests/helper/prism-loader.js | 41 ++-- tests/helper/test-case.js | 75 +++---- tests/helper/test-discovery.js | 75 +++---- tests/helper/token-stream-transformer.js | 19 +- tests/run.js | 53 +++-- tests/testrunner-tests.js | 239 ++++++++++------------- 6 files changed, 234 insertions(+), 268 deletions(-) diff --git a/tests/helper/prism-loader.js b/tests/helper/prism-loader.js index 3257485a5f..cb7780d243 100644 --- a/tests/helper/prism-loader.js +++ b/tests/helper/prism-loader.js @@ -1,9 +1,9 @@ "use strict"; -var fs = require("fs"); -var vm = require("vm"); -var components = require("../../components"); -var languagesCatalog = components.languages; +const fs = require("fs"); +const vm = require("vm"); +const components = require("../../components"); +const languagesCatalog = components.languages; module.exports = { @@ -14,8 +14,8 @@ module.exports = { * @param {string|string[]} languages * @returns {Prism} */ - createInstance: function (languages) { - var context = { + createInstance(languages) { + let context = { loadedLanguages: [], Prism: this.createEmptyPrism() }; @@ -33,16 +33,14 @@ module.exports = { * @param {{loadedLanguages: string[], Prism: Prism}} context * @returns {{loadedLanguages: string[], Prism: Prism}} */ - loadLanguages: function (languages, context) { + loadLanguages(languages, context) { if (typeof languages === 'string') { languages = [languages]; } - var self = this; - - languages.forEach(function (language) { - context = self.loadLanguage(language, context); - }); + for (const language of languages) { + context = this.loadLanguage(language, context); + } return context; }, @@ -56,7 +54,7 @@ module.exports = { * @param {{loadedLanguages: string[], Prism: Prism}} context * @returns {{loadedLanguages: string[], Prism: Prism}} */ - loadLanguage: function (language, context) { + loadLanguage(language, context) { if (!languagesCatalog[language]) { throw new Error("Language '" + language + "' not found."); } @@ -72,8 +70,8 @@ module.exports = { } // load the language itself - var languageSource = this.loadFileSource(language); - context.Prism = this.runFileWithContext(languageSource, {Prism: context.Prism}).Prism; + const languageSource = this.loadFileSource(language); + context.Prism = this.runFileWithContext(languageSource, { Prism: context.Prism }).Prism; context.loadedLanguages.push(language); return context; @@ -86,9 +84,9 @@ module.exports = { * @private * @returns {Prism} */ - createEmptyPrism: function () { - var coreSource = this.loadFileSource("core"); - var context = this.runFileWithContext(coreSource); + createEmptyPrism() { + const coreSource = this.loadFileSource("core"); + const context = this.runFileWithContext(coreSource); return context.Prism; }, @@ -109,7 +107,7 @@ module.exports = { * @param {string} name * @returns {string} */ - loadFileSource: function (name) { + loadFileSource(name) { return this.fileSourceCache[name] = this.fileSourceCache[name] || fs.readFileSync(__dirname + "/../../components/prism-" + name + ".js", "utf8"); }, @@ -119,12 +117,11 @@ module.exports = { * * @private * @param {string} fileSource - * @param {*} [context] + * @param {*} [context={}] * * @returns {*} */ - runFileWithContext: function (fileSource, context) { - context = context || {}; + runFileWithContext(fileSource, context = {}) { vm.runInNewContext(fileSource, context); return context; } diff --git a/tests/helper/test-case.js b/tests/helper/test-case.js index e4e5739941..8ba4dc60fc 100644 --- a/tests/helper/test-case.js +++ b/tests/helper/test-case.js @@ -1,9 +1,9 @@ "use strict"; -var fs = require("fs"); -var assert = require("chai").assert; -var PrismLoader = require("./prism-loader"); -var TokenStreamTransformer = require("./token-stream-transformer"); +const fs = require("fs"); +const { assert } = require("chai"); +const PrismLoader = require("./prism-loader"); +const TokenStreamTransformer = require("./token-stream-transformer"); /** * Handles parsing of a test case file. @@ -32,7 +32,6 @@ var TokenStreamTransformer = require("./token-stream-transformer"); * the test case will later be marked as failed. * * - * @type {{runTestCase: Function, transformCompiledTokenStream: Function, parseTestCaseFile: Function}} */ module.exports = { @@ -52,18 +51,18 @@ module.exports = { * @param {string} filePath * @param {boolean} [pretty=false] */ - runTestCase: function (languageIdentifier, filePath, pretty) { - var testCase = this.parseTestCaseFile(filePath); - var usedLanguages = this.parseLanguageNames(languageIdentifier); + runTestCase(languageIdentifier, filePath, pretty = false) { + const testCase = this.parseTestCaseFile(filePath); + const usedLanguages = this.parseLanguageNames(languageIdentifier); if (null === testCase) { throw new Error("Test case file has invalid format (or the provided token stream is invalid JSON), please read the docs."); } - var Prism = PrismLoader.createInstance(usedLanguages.languages); + const Prism = PrismLoader.createInstance(usedLanguages.languages); // the first language is the main language to highlight - var mainLanguageGrammar = Prism.languages[usedLanguages.mainLanguage]; - var env = { + const mainLanguageGrammar = Prism.languages[usedLanguages.mainLanguage]; + const env = { code: testCase.testSource, grammar: mainLanguageGrammar, language: usedLanguages.mainLanguage @@ -71,22 +70,30 @@ module.exports = { Prism.hooks.run('before-tokenize', env); env.tokens = Prism.tokenize(env.code, env.grammar); Prism.hooks.run('after-tokenize', env); - var compiledTokenStream = env.tokens; - - var simplifiedTokenStream = TokenStreamTransformer.simplify(compiledTokenStream); - - var tzd = JSON.stringify(simplifiedTokenStream); - var exp = JSON.stringify(testCase.expectedTokenStream); - var i = 0; var j = 0; var diff = ""; - while (j < tzd.length) { if (exp[i] != tzd[j] || i == exp.length) diff += tzd[j]; else i++; j++; } + const compiledTokenStream = env.tokens; + + const simplifiedTokenStream = TokenStreamTransformer.simplify(compiledTokenStream); + + const tzd = JSON.stringify(simplifiedTokenStream); + const exp = JSON.stringify(testCase.expectedTokenStream); + let i = 0; + let j = 0; + let diff = ""; + while (j < tzd.length) { + if (exp[i] != tzd[j] || i == exp.length) + diff += tzd[j]; + else + i++; + j++; + } const tokenStreamStr = pretty ? TokenStreamTransformer.prettyprint(simplifiedTokenStream) : tzd; - var message = "\nToken Stream: \n" + tokenStreamStr + + const message = "\nToken Stream: \n" + tokenStreamStr + "\n-----------------------------------------\n" + "Expected Token Stream: \n" + exp + "\n-----------------------------------------\n" + diff; - var result = assert.deepEqual(simplifiedTokenStream, testCase.expectedTokenStream, testCase.comment + message); + const result = assert.deepEqual(simplifiedTokenStream, testCase.expectedTokenStream, testCase.comment + message); }, @@ -100,13 +107,13 @@ module.exports = { * * @returns {{languages: string[], mainLanguage: string}} */ - parseLanguageNames: function (languageIdentifier) { - var languages = languageIdentifier.split("+"); - var mainLanguage = null; + parseLanguageNames(languageIdentifier) { + let languages = languageIdentifier.split("+"); + let mainLanguage = null; languages = languages.map( function (language) { - var pos = language.indexOf("!"); + const pos = language.indexOf("!"); if (-1 < pos) { if (mainLanguage) { @@ -139,12 +146,12 @@ module.exports = { * @param {string} filePath * @returns {{testSource: string, expectedTokenStream: Array.>, comment:string?}|null} */ - parseTestCaseFile: function (filePath) { - var testCaseSource = fs.readFileSync(filePath, "utf8"); - var testCaseParts = testCaseSource.split(/^-{10,}\w*$/m); + parseTestCaseFile(filePath) { + const testCaseSource = fs.readFileSync(filePath, "utf8"); + const testCaseParts = testCaseSource.split(/^-{10,}\w*$/m); try { - var testCase = { + const testCase = { testSource: testCaseParts[0].trim(), expectedTokenStream: JSON.parse(testCaseParts[1]), comment: null @@ -172,14 +179,14 @@ module.exports = { * @param {string} languageIdentifier * @param {object} codes */ - runTestsWithHooks: function (languageIdentifier, codes) { - var usedLanguages = this.parseLanguageNames(languageIdentifier); - var Prism = PrismLoader.createInstance(usedLanguages.languages); + runTestsWithHooks(languageIdentifier, codes) { + const usedLanguages = this.parseLanguageNames(languageIdentifier); + const Prism = PrismLoader.createInstance(usedLanguages.languages); // the first language is the main language to highlight - for (var code in codes) { + for (const code in codes) { if (codes.hasOwnProperty(code)) { - var env = { + const env = { element: {}, language: usedLanguages.mainLanguage, grammar: Prism.languages[usedLanguages.mainLanguage], diff --git a/tests/helper/test-discovery.js b/tests/helper/test-discovery.js index b2aade1ad5..b13f902103 100644 --- a/tests/helper/test-discovery.js +++ b/tests/helper/test-discovery.js @@ -1,7 +1,7 @@ "use strict"; -var fs = require("fs"); -var path = require("path"); +const fs = require("fs"); +const path = require("path"); module.exports = { @@ -12,15 +12,13 @@ module.exports = { * @param {string} rootDir * @returns {Object.} */ - loadAllTests: function (rootDir) { - var testSuite = {}; - var self = this; + loadAllTests(rootDir) { + /** @type {Object.} */ + const testSuite = {}; - this.getAllDirectories(rootDir).forEach( - function (language) { - testSuite[language] = self.getAllFiles(path.join(rootDir, language)); - } - ); + for (const language of this.getAllDirectories(rootDir)) { + testSuite[language] = this.getAllFiles(path.join(rootDir, language)); + } return testSuite; }, @@ -32,15 +30,13 @@ module.exports = { * @param {string|string[]} languages * @returns {Object.} */ - loadSomeTests: function (rootDir, languages) { - var testSuite = {}; - var self = this; + loadSomeTests(rootDir, languages) { + /** @type {Object.} */ + const testSuite = {}; - this.getSomeDirectories(rootDir, languages).forEach( - function (language) { - testSuite[language] = self.getAllFiles(path.join(rootDir, language)); - } - ); + for (const language of this.getSomeDirectories(rootDir, languages)) { + testSuite[language] = this.getAllFiles(path.join(rootDir, language)); + } return testSuite; }, @@ -53,12 +49,10 @@ module.exports = { * @param {string} src * @returns {Array.} */ - getAllDirectories: function (src) { - return fs.readdirSync(src).filter( - function (file) { - return fs.statSync(path.join(src, file)).isDirectory(); - } - ); + getAllDirectories(src) { + return fs.readdirSync(src).filter(file => { + return fs.statSync(path.join(src, file)).isDirectory(); + }); }, /** @@ -69,13 +63,10 @@ module.exports = { * @param {string|string[]} languages * @returns {Array.} */ - getSomeDirectories: function (src, languages) { - var self = this; - return fs.readdirSync(src).filter( - function (file) { - return fs.statSync(path.join(src, file)).isDirectory() && self.directoryMatches(file, languages); - } - ); + getSomeDirectories(src, languages) { + return fs.readdirSync(src).filter(file => { + return fs.statSync(path.join(src, file)).isDirectory() && this.directoryMatches(file, languages); + }); }, /** @@ -83,14 +74,12 @@ module.exports = { * @param {string} directory * @param {string|string[]} languages */ - directoryMatches: function (directory, languages) { + directoryMatches(directory, languages) { if (!Array.isArray(languages)) { languages = [languages]; } - var dirLanguages = directory.split(/!?\+!?/); - return dirLanguages.some(function (lang) { - return languages.indexOf(lang) >= 0; - }); + const dirLanguages = directory.split(/!?\+!?/); + return dirLanguages.some(lang => languages.indexOf(lang) >= 0); }, @@ -101,15 +90,13 @@ module.exports = { * @param {string} src * @returns {Array.} */ - getAllFiles: function (src) { - return fs.readdirSync(src).filter( - function (fileName) { + getAllFiles(src) { + return fs.readdirSync(src) + .filter(fileName => { return fs.statSync(path.join(src, fileName)).isFile(); - } - ).map( - function (fileName) { + }) + .map(fileName => { return path.join(src, fileName); - } - ); + }); } }; diff --git a/tests/helper/token-stream-transformer.js b/tests/helper/token-stream-transformer.js index 36c2c25e88..35ee96cafc 100644 --- a/tests/helper/token-stream-transformer.js +++ b/tests/helper/token-stream-transformer.js @@ -2,6 +2,12 @@ module.exports = { + /** + * @typedef TokenStreamItem + * @property {string} type + * @property {string | TokenStreamItem | Array} content + */ + /** * Simplifies the token stream to ease the matching with the expected token stream. * @@ -9,15 +15,14 @@ module.exports = { * * In arrays each value is transformed individually * * Values that are empty (empty arrays or strings only containing whitespace) * - * - * @param {Array} tokenStream - * @returns {Array} + * @param {string | TokenStreamItem | Array} tokenStream + * @returns {Array>} */ - simplify: function (tokenStream) { + simplify(tokenStream) { if (Array.isArray(tokenStream)) { return tokenStream - .map(this.simplify.bind(this)) - .filter(function (value) { + .map(value => this.simplify(value)) + .filter(value => { return !(Array.isArray(value) && !value.length) && !(typeof value === "string" && !value.trim().length); }); } @@ -31,7 +36,7 @@ module.exports = { /** * - * @param {ReadonlyArray} tokenStream + * @param {ReadonlyArray>} tokenStream * @param {number} [indentationLevel=0] */ prettyprint(tokenStream, indentationLevel = 1) { diff --git a/tests/run.js b/tests/run.js index 11b6dbed85..11c036d956 100644 --- a/tests/run.js +++ b/tests/run.js @@ -1,21 +1,20 @@ +// @ts-check "use strict"; -var TestDiscovery = require("./helper/test-discovery"); -var TestCase = require("./helper/test-case"); -var path = require("path"); -var argv = require("yargs").argv; +const TestDiscovery = require("./helper/test-discovery"); +const TestCase = require("./helper/test-case"); +const path = require("path"); +const { argv } = require("yargs"); -var testSuite; -if (argv.language) { - testSuite = TestDiscovery.loadSomeTests(__dirname + "/languages", argv.language); -} else { - // load complete test suite - testSuite = TestDiscovery.loadAllTests(__dirname + "/languages"); -} +const testSuite = + (argv.language) + ? TestDiscovery.loadSomeTests(__dirname + "/languages", argv.language) + // load complete test suite + : TestDiscovery.loadAllTests(__dirname + "/languages"); const pretty = 'pretty' in argv; // define tests for all tests in all languages in the test suite -for (var language in testSuite) { +for (const language in testSuite) { if (!testSuite.hasOwnProperty(language)) { continue; } @@ -24,23 +23,17 @@ for (var language in testSuite) { describe("Testing language '" + language + "'", function () { this.timeout(10000); - testFiles.forEach( - function (filePath) { - var fileName = path.basename(filePath, path.extname(filePath)); - - it("– should pass test case '" + fileName + "'", - function () { - - if (path.extname(filePath) === '.test') { - TestCase.runTestCase(language, filePath, pretty); - } else { - TestCase.runTestsWithHooks(language, require(filePath)); - } - - } - ); - } - ); + for (const filePath of testFiles) { + const fileName = path.basename(filePath, path.extname(filePath)); + + it("– should pass test case '" + fileName + "'", function () { + if (path.extname(filePath) === '.test') { + TestCase.runTestCase(language, filePath, pretty); + } else { + TestCase.runTestsWithHooks(language, require(filePath)); + } + }); + } }); })(language, testSuite[language]); -} \ No newline at end of file +} diff --git a/tests/testrunner-tests.js b/tests/testrunner-tests.js index 24ad32cd8a..03e6fc53a0 100644 --- a/tests/testrunner-tests.js +++ b/tests/testrunner-tests.js @@ -1,166 +1,143 @@ "use strict"; -var assert = require("chai").assert; -var TokenStreamTransformer = require("./helper/token-stream-transformer"); -var TestCase = require("./helper/test-case"); - - -//region Token Stream Transformer -describe("The token stream transformer", - function () { - it("should handle all kinds of simple transformations", - function () { - var tokens = [ - {type: "type", content: "content"}, - "string" - ]; - - var expected = [ - ["type", "content"], - "string" - ]; - - assert.deepEqual(TokenStreamTransformer.simplify(tokens), expected); - } - ); +const { assert } = require("chai"); +const TokenStreamTransformer = require("./helper/token-stream-transformer"); +const TestCase = require("./helper/test-case"); + + +describe("The token stream transformer", function () { + + it("should handle all kinds of simple transformations", function () { + const tokens = [ + { type: "type", content: "content" }, + "string" + ]; + + const expected = [ + ["type", "content"], + "string" + ]; + + assert.deepEqual(TokenStreamTransformer.simplify(tokens), expected); + }); - it("should handle nested structures", - function () { - var tokens = [ + it("should handle nested structures", function () { + const tokens = [ + { + type: "type", + content: [ { - type: "type", + type: "insideType", content: [ - { - type: "insideType", content: - [ - {type: "insideInsideType", content: "content"} - ] - } + { type: "insideInsideType", content: "content" } ] } - ]; + ] + } + ]; - var expected = [ - ["type", [ - ["insideType", [ - ["insideInsideType", "content"] - ]] - ]] - ]; + const expected = [ + ["type", [ + ["insideType", [ + ["insideInsideType", "content"] + ]] + ]] + ]; - assert.deepEqual(TokenStreamTransformer.simplify(tokens), expected); - } - ); + assert.deepEqual(TokenStreamTransformer.simplify(tokens), expected); + }); - it("should strip empty tokens", - function () { - var tokenStream = [ - "", - "\r\n", - "\t", - " " - ]; + it("should strip empty tokens", function () { + const tokenStream = [ + "", + "\r\n", + "\t", + " " + ]; - var expectedSimplified = []; + const expectedSimplified = []; - assert.deepEqual(TokenStreamTransformer.simplify(tokenStream), expectedSimplified); - } - ); + assert.deepEqual(TokenStreamTransformer.simplify(tokenStream), expectedSimplified); + }); - it("should strip empty token tree branches", - function () { - var tokenStream = [ - { - type: "type", - content: [ - ["", ""], - "", - {type: "nested", content: [""]} - ] - }, - [[[[[[[""]]]]]]] - ]; + it("should strip empty token tree branches", function () { + const tokenStream = [ + { + type: "type", + content: [ + ["", ""], + "", + { type: "nested", content: [""] } + ] + }, + [[[[[[[""]]]]]]] + ]; - var expectedSimplified = [ - ["type", [ - ["nested", []] - ]] - ]; + const expectedSimplified = [ + ["type", [ + ["nested", []] + ]] + ]; - assert.deepEqual(TokenStreamTransformer.simplify(tokenStream), expectedSimplified); - } - ); + assert.deepEqual(TokenStreamTransformer.simplify(tokenStream), expectedSimplified); + }); + + + it("should ignore all properties in tokens except value and content", function () { + const tokenStream = [ + { type: "type", content: "content", alias: "alias" } + ]; - it("should ignore all properties in tokens except value and content", - function () { + const expectedSimplified = [ + ["type", "content"] + ]; - var tokenStream = [ - {type: "type", content: "content", alias: "alias"} - ]; + assert.deepEqual(TokenStreamTransformer.simplify(tokenStream), expectedSimplified); + }); +}); - var expectedSimplified = [ - ["type", "content"] - ]; +describe("The language name parsing", function () { - assert.deepEqual(TokenStreamTransformer.simplify(tokenStream), expectedSimplified); + it("should use the last language as the main language if no language is specified", function () { + assert.deepEqual( + TestCase.parseLanguageNames("a"), + { + languages: ["a"], + mainLanguage: "a" } ); - } -); -//endregion - - -//region Language name parsing -describe("The language name parsing", - function () { - it("should use the last language as the main language if no language is specified", - function () { - assert.deepEqual( - TestCase.parseLanguageNames("a"), - { - languages: ["a"], - mainLanguage: "a" - } - ); - assert.deepEqual( - TestCase.parseLanguageNames("a+b+c"), - { - languages: ["a", "b", "c"], - mainLanguage: "c" - } - ); + assert.deepEqual( + TestCase.parseLanguageNames("a+b+c"), + { + languages: ["a", "b", "c"], + mainLanguage: "c" } ); + }); - it("should use the specified language as main language", - function () { - assert.deepEqual( - TestCase.parseLanguageNames("a+b!+c"), - { - languages: ["a", "b", "c"], - mainLanguage: "b" - } - ); + it("should use the specified language as main language", function () { + assert.deepEqual( + TestCase.parseLanguageNames("a+b!+c"), + { + languages: ["a", "b", "c"], + mainLanguage: "b" } ); + }); - it("should throw an error if there are multiple main languages", - function () { - assert.throw( - function () { - TestCase.parseLanguageNames("a+b!+c!"); - }, - "There are multiple main languages defined." - ); - } + it("should throw an error if there are multiple main languages", function () { + assert.throw( + () => { + TestCase.parseLanguageNames("a+b!+c!"); + }, + "There are multiple main languages defined." ); - } -); -//endregion + }); +}); From 18f2921d9cad01bf14630e6c554786266787b32c Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Sun, 10 Mar 2019 21:40:02 +0100 Subject: [PATCH 0215/1100] Docs: Added missing parameter (#1774) This adds a missing parameter to the `Prism.highlight` documentation. --- extending.html | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/extending.html b/extending.html index 59101b6ff9..6abebd39bc 100644 --- a/extending.html +++ b/extending.html @@ -202,9 +202,9 @@

    Parameters

    -

    Prism.highlight(text, grammar)

    +

    Prism.highlight(text, grammar, language)

    Low-level function, only use if you know what you’re doing. - It accepts a string of text as input and the language definitions to use, and returns a string with the HTML produced.

    + It accepts a string of text as input, the language definitions to use, and the name of the language, and returns a string with the HTML produced.

    Parameters

    @@ -212,6 +212,8 @@

    Parameters

    A string with the code to be highlighted.
    grammar
    An object containing the tokens to use. Usually a language definition like Prism.languages.markup
    +
    language
    +
    The name of the language definition passed to grammar. E.g. markup or javascript

    Returns

    From 70a404147cbccb46702dc02c5f50ef4473718e7b Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Sun, 10 Mar 2019 22:15:10 +0100 Subject: [PATCH 0216/1100] CSS extras: Highlighting for pseudo class arguments (#1650) This adds highlighting for pseudo class arguments, selector punctuation, and n-th expressions. --- components/prism-css-extras.js | 13 +++- components/prism-css-extras.min.js | 2 +- .../css!+css-extras/selector_feature.test | 13 +--- .../selector_n-th_feature.test | 62 +++++++++++++++++++ .../selector_pseudo-class_feature.test | 59 ++++++++++++++++++ 5 files changed, 136 insertions(+), 13 deletions(-) create mode 100644 tests/languages/css!+css-extras/selector_n-th_feature.test create mode 100644 tests/languages/css!+css-extras/selector_pseudo-class_feature.test diff --git a/components/prism-css-extras.js b/components/prism-css-extras.js index 6000210d59..0ffad78c3b 100644 --- a/components/prism-css-extras.js +++ b/components/prism-css-extras.js @@ -2,7 +2,7 @@ Prism.languages.css.selector = { pattern: Prism.languages.css.selector, inside: { 'pseudo-element': /:(?:after|before|first-letter|first-line|selection)|::[-\w]+/, - 'pseudo-class': /:[-\w]+(?:\(.*\))?/, + 'pseudo-class': /:[-\w]+/, 'class': /\.[-:.\w]+/, 'id': /#[-:.\w]+/, 'attribute': { @@ -35,7 +35,16 @@ Prism.languages.css.selector = { ], 'operator': /[|~*^$]?=/ } - } + }, + 'n-th': { + pattern: /(\(\s*)[+-]?\d*[\dn](?:\s*[+-]\s*\d+)?(?=\s*\))/, + lookbehind: true, + inside: { + 'number': /[\dn]+/, + 'operator': /[+-]/ + } + }, + 'punctuation': /[()]/ } }; diff --git a/components/prism-css-extras.min.js b/components/prism-css-extras.min.js index e51f261c17..d1cf1ee5f1 100644 --- a/components/prism-css-extras.min.js +++ b/components/prism-css-extras.min.js @@ -1 +1 @@ -Prism.languages.css.selector={pattern:Prism.languages.css.selector,inside:{"pseudo-element":/:(?:after|before|first-letter|first-line|selection)|::[-\w]+/,"pseudo-class":/:[-\w]+(?:\(.*\))?/,class:/\.[-:.\w]+/,id:/#[-:.\w]+/,attribute:{pattern:/\[(?:[^[\]"']|("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1)*\]/,greedy:!0,inside:{punctuation:/^\[|\]$/,"case-sensitivity":{pattern:/(\s)[si]$/i,lookbehind:!0,alias:"keyword"},namespace:{pattern:/^(\s*)[-*\w\xA0-\uFFFF]*\|(?!=)/,lookbehind:!0,inside:{punctuation:/\|$/}},attribute:{pattern:/^(\s*)[-\w\xA0-\uFFFF]+/,lookbehind:!0},value:[/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,{pattern:/(=\s*)[-\w\xA0-\uFFFF]+(?=\s*$)/,lookbehind:!0}],operator:/[|~*^$]?=/}}}},Prism.languages.insertBefore("css","property",{variable:{pattern:/(^|[^-\w\xA0-\uFFFF])--[-_a-z\xA0-\uFFFF][-\w\xA0-\uFFFF]*/i,lookbehind:!0}}),Prism.languages.insertBefore("css","function",{operator:{pattern:/(\s)[+\-*\/](?=\s)/,lookbehind:!0},hexcode:/#[\da-f]{3,8}/i,entity:/\\[\da-f]{1,8}/i,unit:{pattern:/(\d)(?:%|[a-z]+)/,lookbehind:!0},number:/-?[\d.]+/}); \ No newline at end of file +Prism.languages.css.selector={pattern:Prism.languages.css.selector,inside:{"pseudo-element":/:(?:after|before|first-letter|first-line|selection)|::[-\w]+/,"pseudo-class":/:[-\w]+/,class:/\.[-:.\w]+/,id:/#[-:.\w]+/,attribute:{pattern:/\[(?:[^[\]"']|("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1)*\]/,greedy:!0,inside:{punctuation:/^\[|\]$/,"case-sensitivity":{pattern:/(\s)[si]$/i,lookbehind:!0,alias:"keyword"},namespace:{pattern:/^(\s*)[-*\w\xA0-\uFFFF]*\|(?!=)/,lookbehind:!0,inside:{punctuation:/\|$/}},attribute:{pattern:/^(\s*)[-\w\xA0-\uFFFF]+/,lookbehind:!0},value:[/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,{pattern:/(=\s*)[-\w\xA0-\uFFFF]+(?=\s*$)/,lookbehind:!0}],operator:/[|~*^$]?=/}},"n-th":{pattern:/(\(\s*)[+-]?\d*[\dn](?:\s*[+-]\s*\d+)?(?=\s*\))/,lookbehind:!0,inside:{number:/[\dn]+/,operator:/[+-]/}},punctuation:/[()]/}},Prism.languages.insertBefore("css","property",{variable:{pattern:/(^|[^-\w\xA0-\uFFFF])--[-_a-z\xA0-\uFFFF][-\w\xA0-\uFFFF]*/i,lookbehind:!0}}),Prism.languages.insertBefore("css","function",{operator:{pattern:/(\s)[+\-*\/](?=\s)/,lookbehind:!0},hexcode:/#[\da-f]{3,8}/i,entity:/\\[\da-f]{1,8}/i,unit:{pattern:/(\d)(?:%|[a-z]+)/,lookbehind:!0},number:/-?[\d.]+/}); \ No newline at end of file diff --git a/tests/languages/css!+css-extras/selector_feature.test b/tests/languages/css!+css-extras/selector_feature.test index 475ed1b7c4..d42ec7faa6 100644 --- a/tests/languages/css!+css-extras/selector_feature.test +++ b/tests/languages/css!+css-extras/selector_feature.test @@ -1,13 +1,11 @@ foo:after { foo::first-letter { -foo:nth-child(2n+1) { - foo.bar { foo#bar { -#foo > .bar:not(baz):after { +#foo > .bar:hover:after { ---------------------------------------------------- @@ -22,11 +20,6 @@ foo#bar { ["pseudo-element", "::first-letter"] ]], ["punctuation", "{"], - ["selector", [ - "foo", - ["pseudo-class", ":nth-child(2n+1)"] - ]], ["punctuation", "{"], - ["selector", [ "foo", ["class", ".bar"] @@ -41,11 +34,11 @@ foo#bar { ["id", "#foo"], " > ", ["class", ".bar"], - ["pseudo-class", ":not(baz)"], + ["pseudo-class", ":hover"], ["pseudo-element", ":after"] ]], ["punctuation", "{"] ] ---------------------------------------------------- -Checks for pseudo-elements, pseudo-classes, classes and ids inside selectors. \ No newline at end of file +Checks for pseudo-elements, pseudo-classes, classes and ids inside selectors. diff --git a/tests/languages/css!+css-extras/selector_n-th_feature.test b/tests/languages/css!+css-extras/selector_n-th_feature.test new file mode 100644 index 0000000000..0e9dc7b6c2 --- /dev/null +++ b/tests/languages/css!+css-extras/selector_n-th_feature.test @@ -0,0 +1,62 @@ +:nth-child(2n+1) {} +:nth-child(+2n - 1) {} +:nth-child(2n) {} +:nth-child(+5) {} + +---------------------------------------------------- + +[ + ["selector", [ + ["pseudo-class", ":nth-child"], + ["punctuation", "("], + ["n-th", [ + ["number", "2n"], + ["operator", "+"], + ["number", "1"] + ]], + ["punctuation", ")"] + ]], + ["punctuation", "{"], + ["punctuation", "}"], + + ["selector", [ + ["pseudo-class", ":nth-child"], + ["punctuation", "("], + ["n-th", [ + ["operator", "+"], + ["number", "2n"], + ["operator", "-"], + ["number", "1"] + ]], + ["punctuation", ")"] + ]], + ["punctuation", "{"], + ["punctuation", "}"], + + ["selector", [ + ["pseudo-class", ":nth-child"], + ["punctuation", "("], + ["n-th", [ + ["number", "2n"] + ]], + ["punctuation", ")"] + ]], + ["punctuation", "{"], + ["punctuation", "}"], + + ["selector", [ + ["pseudo-class", ":nth-child"], + ["punctuation", "("], + ["n-th", [ + ["operator", "+"], + ["number", "5"] + ]], + ["punctuation", ")"] + ]], + ["punctuation", "{"], + ["punctuation", "}"] +] + +---------------------------------------------------- + +Checks for n-th expressions. diff --git a/tests/languages/css!+css-extras/selector_pseudo-class_feature.test b/tests/languages/css!+css-extras/selector_pseudo-class_feature.test new file mode 100644 index 0000000000..e4dfe15183 --- /dev/null +++ b/tests/languages/css!+css-extras/selector_pseudo-class_feature.test @@ -0,0 +1,59 @@ +foo:hover {} + +:lang(en) {} + +.bar:not(baz:hover):not(.foo) {} + +:where(p:not(.class)) {} + +---------------------------------------------------- + +[ + ["selector", [ + "foo", + ["pseudo-class", ":hover"] + ]], + ["punctuation", "{"], + ["punctuation", "}"], + + ["selector", [ + ["pseudo-class", ":lang"], + ["punctuation", "("], + "en", + ["punctuation", ")"] + ]], + ["punctuation", "{"], + ["punctuation", "}"], + + ["selector", [ + ["class", ".bar"], + ["pseudo-class", ":not"], + ["punctuation", "("], + "baz", + ["pseudo-class", ":hover"], + ["punctuation", ")"], + ["pseudo-class", ":not"], + ["punctuation", "("], + ["class", ".foo"], + ["punctuation", ")"] + ]], + ["punctuation", "{"], + ["punctuation", "}"], + + ["selector", [ + ["pseudo-class", ":where"], + ["punctuation", "("], + "p", + ["pseudo-class", ":not"], + ["punctuation", "("], + ["class", ".class"], + ["punctuation", ")"], + ["punctuation", ")"] + ]], + ["punctuation", "{"], + ["punctuation", "}"] +] + +---------------------------------------------------- + +Checks for pseudo-classes inside selectors. From bc53e09364b08384569d6895a2f4de95d6e841e9 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Mon, 11 Mar 2019 00:20:18 +0100 Subject: [PATCH 0217/1100] More variables for better code compression (#1489) This introduces more variables for better code compression in a few languages. --- components/prism-asciidoc.js | 81 +++++------------ components/prism-asciidoc.min.js | 2 +- components/prism-parser.js | 136 +++++++++++++++-------------- components/prism-parser.min.js | 2 +- components/prism-plsql.js | 42 +++++---- components/prism-plsql.min.js | 2 +- components/prism-powershell.js | 107 ++++++++++++----------- components/prism-powershell.min.js | 2 +- components/prism-textile.js | 45 +++++----- components/prism-textile.min.js | 2 +- 10 files changed, 201 insertions(+), 220 deletions(-) diff --git a/components/prism-asciidoc.js b/components/prism-asciidoc.js index c96f6b0238..954f0c9ac5 100644 --- a/components/prism-asciidoc.js +++ b/components/prism-asciidoc.js @@ -25,7 +25,8 @@ 'attr-value': /(?!^\s+$).+/ } }; - Prism.languages.asciidoc = { + + var asciidoc = Prism.languages.asciidoc = { 'comment-block': { pattern: /^(\/{4,})(?:\r?\n|\r)(?:[\s\S]*(?:\r?\n|\r))??\1/m, alias: 'comment' @@ -199,75 +200,35 @@ // Allow some nesting. There is no recursion though, so cloning should not be needed. - attributes.inside['interpreted'].inside.rest = { - 'macro': Prism.languages.asciidoc['macro'], - 'inline': Prism.languages.asciidoc['inline'], - 'replacement': Prism.languages.asciidoc['replacement'], - 'entity': Prism.languages.asciidoc['entity'] - }; + function copyFromAsciiDoc(keys) { + keys = keys.split(' '); - Prism.languages.asciidoc['passthrough-block'].inside.rest = { - 'macro': Prism.languages.asciidoc['macro'] - }; + var o = {}; + for (var i = 0, l = keys.length; i < l; i++) { + o[keys[i]] = asciidoc[keys[i]]; + } + return o; + } - Prism.languages.asciidoc['literal-block'].inside.rest = { - 'callout': Prism.languages.asciidoc['callout'] - }; + attributes.inside['interpreted'].inside.rest = copyFromAsciiDoc('macro inline replacement entity'); - Prism.languages.asciidoc['table'].inside.rest = { - 'comment-block': Prism.languages.asciidoc['comment-block'], - 'passthrough-block': Prism.languages.asciidoc['passthrough-block'], - 'literal-block': Prism.languages.asciidoc['literal-block'], - 'other-block': Prism.languages.asciidoc['other-block'], - 'list-punctuation': Prism.languages.asciidoc['list-punctuation'], - 'indented-block': Prism.languages.asciidoc['indented-block'], - 'comment': Prism.languages.asciidoc['comment'], - 'title': Prism.languages.asciidoc['title'], - 'attribute-entry': Prism.languages.asciidoc['attribute-entry'], - 'attributes': Prism.languages.asciidoc['attributes'], - 'hr': Prism.languages.asciidoc['hr'], - 'page-break': Prism.languages.asciidoc['page-break'], - 'admonition': Prism.languages.asciidoc['admonition'], - 'list-label': Prism.languages.asciidoc['list-label'], - 'callout': Prism.languages.asciidoc['callout'], - 'macro': Prism.languages.asciidoc['macro'], - 'inline': Prism.languages.asciidoc['inline'], - 'replacement': Prism.languages.asciidoc['replacement'], - 'entity': Prism.languages.asciidoc['entity'], - 'line-continuation': Prism.languages.asciidoc['line-continuation'] - }; + asciidoc['passthrough-block'].inside.rest = copyFromAsciiDoc('macro'); - Prism.languages.asciidoc['other-block'].inside.rest = { - 'table': Prism.languages.asciidoc['table'], - 'list-punctuation': Prism.languages.asciidoc['list-punctuation'], - 'indented-block': Prism.languages.asciidoc['indented-block'], - 'comment': Prism.languages.asciidoc['comment'], - 'attribute-entry': Prism.languages.asciidoc['attribute-entry'], - 'attributes': Prism.languages.asciidoc['attributes'], - 'hr': Prism.languages.asciidoc['hr'], - 'page-break': Prism.languages.asciidoc['page-break'], - 'admonition': Prism.languages.asciidoc['admonition'], - 'list-label': Prism.languages.asciidoc['list-label'], - 'macro': Prism.languages.asciidoc['macro'], - 'inline': Prism.languages.asciidoc['inline'], - 'replacement': Prism.languages.asciidoc['replacement'], - 'entity': Prism.languages.asciidoc['entity'], - 'line-continuation': Prism.languages.asciidoc['line-continuation'] - }; + asciidoc['literal-block'].inside.rest = copyFromAsciiDoc('callout'); + + asciidoc['table'].inside.rest = copyFromAsciiDoc('comment-block passthrough-block literal-block other-block list-punctuation indented-block comment title attribute-entry attributes hr page-break admonition list-label callout macro inline replacement entity line-continuation'); + + asciidoc['other-block'].inside.rest = copyFromAsciiDoc('table list-punctuation indented-block comment attribute-entry attributes hr page-break admonition list-label macro inline replacement entity line-continuation'); + + asciidoc['title'].inside.rest = copyFromAsciiDoc('macro inline replacement entity'); - Prism.languages.asciidoc['title'].inside.rest = { - 'macro': Prism.languages.asciidoc['macro'], - 'inline': Prism.languages.asciidoc['inline'], - 'replacement': Prism.languages.asciidoc['replacement'], - 'entity': Prism.languages.asciidoc['entity'] - }; // Plugin to make entity title show the real entity, idea by Roman Komarov - Prism.hooks.add('wrap', function(env) { + Prism.hooks.add('wrap', function (env) { if (env.type === 'entity') { env.attributes['title'] = env.content.replace(/&/, '&'); } }); - + Prism.languages.adoc = Prism.languages.asciidoc; }(Prism)); diff --git a/components/prism-asciidoc.min.js b/components/prism-asciidoc.min.js index b6ef0fdde2..4c5e76af64 100644 --- a/components/prism-asciidoc.min.js +++ b/components/prism-asciidoc.min.js @@ -1 +1 @@ -!function(a){var i={pattern:/(^[ \t]*)\[(?!\[)(?:(["'$`])(?:(?!\2)[^\\]|\\.)*\2|\[(?:[^\]\\]|\\.)*\]|[^\]\\]|\\.)*\]/m,lookbehind:!0,inside:{quoted:{pattern:/([$`])(?:(?!\1)[^\\]|\\.)*\1/,inside:{punctuation:/^[$`]|[$`]$/}},interpreted:{pattern:/'(?:[^'\\]|\\.)*'/,inside:{punctuation:/^'|'$/}},string:/"(?:[^"\\]|\\.)*"/,variable:/\w+(?==)/,punctuation:/^\[|\]$|,/,operator:/=/,"attr-value":/(?!^\s+$).+/}};a.languages.asciidoc={"comment-block":{pattern:/^(\/{4,})(?:\r?\n|\r)(?:[\s\S]*(?:\r?\n|\r))??\1/m,alias:"comment"},table:{pattern:/^\|={3,}(?:(?:\r?\n|\r).*)*?(?:\r?\n|\r)\|={3,}$/m,inside:{specifiers:{pattern:/(?!\|)(?:(?:(?:\d+(?:\.\d+)?|\.\d+)[+*])?(?:[<^>](?:\.[<^>])?|\.[<^>])?[a-z]*)(?=\|)/,alias:"attr-value"},punctuation:{pattern:/(^|[^\\])[|!]=*/,lookbehind:!0}}},"passthrough-block":{pattern:/^(\+{4,})(?:\r?\n|\r)(?:[\s\S]*(?:\r?\n|\r))??\1$/m,inside:{punctuation:/^\++|\++$/}},"literal-block":{pattern:/^(-{4,}|\.{4,})(?:\r?\n|\r)(?:[\s\S]*(?:\r?\n|\r))??\1$/m,inside:{punctuation:/^(?:-+|\.+)|(?:-+|\.+)$/}},"other-block":{pattern:/^(--|\*{4,}|_{4,}|={4,})(?:\r?\n|\r)(?:[\s\S]*(?:\r?\n|\r))??\1$/m,inside:{punctuation:/^(?:-+|\*+|_+|=+)|(?:-+|\*+|_+|=+)$/}},"list-punctuation":{pattern:/(^[ \t]*)(?:-|\*{1,5}|\.{1,5}|(?:[a-z]|\d+)\.|[xvi]+\))(?= )/im,lookbehind:!0,alias:"punctuation"},"list-label":{pattern:/(^[ \t]*)[a-z\d].+(?::{2,4}|;;)(?=\s)/im,lookbehind:!0,alias:"symbol"},"indented-block":{pattern:/((\r?\n|\r)\2)([ \t]+)\S.*(?:(?:\r?\n|\r)\3.+)*(?=\2{2}|$)/,lookbehind:!0},comment:/^\/\/.*/m,title:{pattern:/^.+(?:\r?\n|\r)(?:={3,}|-{3,}|~{3,}|\^{3,}|\+{3,})$|^={1,5} +.+|^\.(?![\s.]).*/m,alias:"important",inside:{punctuation:/^(?:\.|=+)|(?:=+|-+|~+|\^+|\++)$/}},"attribute-entry":{pattern:/^:[^:\r\n]+:(?: .*?(?: \+(?:\r?\n|\r).*?)*)?$/m,alias:"tag"},attributes:i,hr:{pattern:/^'{3,}$/m,alias:"punctuation"},"page-break":{pattern:/^<{3,}$/m,alias:"punctuation"},admonition:{pattern:/^(?:TIP|NOTE|IMPORTANT|WARNING|CAUTION):/m,alias:"keyword"},callout:[{pattern:/(^[ \t]*)/m,lookbehind:!0,alias:"symbol"},{pattern:/<\d+>/,alias:"symbol"}],macro:{pattern:/\b[a-z\d][a-z\d-]*::?(?:(?:\S+)??\[(?:[^\]\\"]|(["'])(?:(?!\1)[^\\]|\\.)*\1|\\.)*\])/,inside:{function:/^[a-z\d-]+(?=:)/,punctuation:/^::?/,attributes:{pattern:/(?:\[(?:[^\]\\"]|(["'])(?:(?!\1)[^\\]|\\.)*\1|\\.)*\])/,inside:i.inside}}},inline:{pattern:/(^|[^\\])(?:(?:\B\[(?:[^\]\\"]|(["'])(?:(?!\2)[^\\]|\\.)*\2|\\.)*\])?(?:\b_(?!\s)(?: _|[^_\\\r\n]|\\.)+(?:(?:\r?\n|\r)(?: _|[^_\\\r\n]|\\.)+)*_\b|\B``(?!\s).+?(?:(?:\r?\n|\r).+?)*''\B|\B`(?!\s)(?: ['`]|.)+?(?:(?:\r?\n|\r)(?: ['`]|.)+?)*['`]\B|\B(['*+#])(?!\s)(?: \3|(?!\3)[^\\\r\n]|\\.)+(?:(?:\r?\n|\r)(?: \3|(?!\3)[^\\\r\n]|\\.)+)*\3\B)|(?:\[(?:[^\]\\"]|(["'])(?:(?!\4)[^\\]|\\.)*\4|\\.)*\])?(?:(__|\*\*|\+\+\+?|##|\$\$|[~^]).+?(?:(?:\r?\n|\r).+?)*\5|\{[^}\r\n]+\}|\[\[\[?.+?(?:(?:\r?\n|\r).+?)*\]?\]\]|<<.+?(?:(?:\r?\n|\r).+?)*>>|\(\(\(?.+?(?:(?:\r?\n|\r).+?)*\)?\)\)))/m,lookbehind:!0,inside:{attributes:i,url:{pattern:/^(?:\[\[\[?.+?\]?\]\]|<<.+?>>)$/,inside:{punctuation:/^(?:\[\[\[?|<<)|(?:\]\]\]?|>>)$/}},"attribute-ref":{pattern:/^\{.+\}$/,inside:{variable:{pattern:/(^\{)[a-z\d,+_-]+/,lookbehind:!0},operator:/^[=?!#%@$]|!(?=[:}])/,punctuation:/^\{|\}$|::?/}},italic:{pattern:/^(['_])[\s\S]+\1$/,inside:{punctuation:/^(?:''?|__?)|(?:''?|__?)$/}},bold:{pattern:/^\*[\s\S]+\*$/,inside:{punctuation:/^\*\*?|\*\*?$/}},punctuation:/^(?:``?|\+{1,3}|##?|\$\$|[~^]|\(\(\(?)|(?:''?|\+{1,3}|##?|\$\$|[~^`]|\)?\)\))$/}},replacement:{pattern:/\((?:C|TM|R)\)/,alias:"builtin"},entity:/&#?[\da-z]{1,8};/i,"line-continuation":{pattern:/(^| )\+$/m,lookbehind:!0,alias:"punctuation"}},i.inside.interpreted.inside.rest={macro:a.languages.asciidoc.macro,inline:a.languages.asciidoc.inline,replacement:a.languages.asciidoc.replacement,entity:a.languages.asciidoc.entity},a.languages.asciidoc["passthrough-block"].inside.rest={macro:a.languages.asciidoc.macro},a.languages.asciidoc["literal-block"].inside.rest={callout:a.languages.asciidoc.callout},a.languages.asciidoc.table.inside.rest={"comment-block":a.languages.asciidoc["comment-block"],"passthrough-block":a.languages.asciidoc["passthrough-block"],"literal-block":a.languages.asciidoc["literal-block"],"other-block":a.languages.asciidoc["other-block"],"list-punctuation":a.languages.asciidoc["list-punctuation"],"indented-block":a.languages.asciidoc["indented-block"],comment:a.languages.asciidoc.comment,title:a.languages.asciidoc.title,"attribute-entry":a.languages.asciidoc["attribute-entry"],attributes:a.languages.asciidoc.attributes,hr:a.languages.asciidoc.hr,"page-break":a.languages.asciidoc["page-break"],admonition:a.languages.asciidoc.admonition,"list-label":a.languages.asciidoc["list-label"],callout:a.languages.asciidoc.callout,macro:a.languages.asciidoc.macro,inline:a.languages.asciidoc.inline,replacement:a.languages.asciidoc.replacement,entity:a.languages.asciidoc.entity,"line-continuation":a.languages.asciidoc["line-continuation"]},a.languages.asciidoc["other-block"].inside.rest={table:a.languages.asciidoc.table,"list-punctuation":a.languages.asciidoc["list-punctuation"],"indented-block":a.languages.asciidoc["indented-block"],comment:a.languages.asciidoc.comment,"attribute-entry":a.languages.asciidoc["attribute-entry"],attributes:a.languages.asciidoc.attributes,hr:a.languages.asciidoc.hr,"page-break":a.languages.asciidoc["page-break"],admonition:a.languages.asciidoc.admonition,"list-label":a.languages.asciidoc["list-label"],macro:a.languages.asciidoc.macro,inline:a.languages.asciidoc.inline,replacement:a.languages.asciidoc.replacement,entity:a.languages.asciidoc.entity,"line-continuation":a.languages.asciidoc["line-continuation"]},a.languages.asciidoc.title.inside.rest={macro:a.languages.asciidoc.macro,inline:a.languages.asciidoc.inline,replacement:a.languages.asciidoc.replacement,entity:a.languages.asciidoc.entity},a.hooks.add("wrap",function(a){"entity"===a.type&&(a.attributes.title=a.content.replace(/&/,"&"))}),a.languages.adoc=a.languages.asciidoc}(Prism); \ No newline at end of file +!function(t){var n={pattern:/(^[ \t]*)\[(?!\[)(?:(["'$`])(?:(?!\2)[^\\]|\\.)*\2|\[(?:[^\]\\]|\\.)*\]|[^\]\\]|\\.)*\]/m,lookbehind:!0,inside:{quoted:{pattern:/([$`])(?:(?!\1)[^\\]|\\.)*\1/,inside:{punctuation:/^[$`]|[$`]$/}},interpreted:{pattern:/'(?:[^'\\]|\\.)*'/,inside:{punctuation:/^'|'$/}},string:/"(?:[^"\\]|\\.)*"/,variable:/\w+(?==)/,punctuation:/^\[|\]$|,/,operator:/=/,"attr-value":/(?!^\s+$).+/}},a=t.languages.asciidoc={"comment-block":{pattern:/^(\/{4,})(?:\r?\n|\r)(?:[\s\S]*(?:\r?\n|\r))??\1/m,alias:"comment"},table:{pattern:/^\|={3,}(?:(?:\r?\n|\r).*)*?(?:\r?\n|\r)\|={3,}$/m,inside:{specifiers:{pattern:/(?!\|)(?:(?:(?:\d+(?:\.\d+)?|\.\d+)[+*])?(?:[<^>](?:\.[<^>])?|\.[<^>])?[a-z]*)(?=\|)/,alias:"attr-value"},punctuation:{pattern:/(^|[^\\])[|!]=*/,lookbehind:!0}}},"passthrough-block":{pattern:/^(\+{4,})(?:\r?\n|\r)(?:[\s\S]*(?:\r?\n|\r))??\1$/m,inside:{punctuation:/^\++|\++$/}},"literal-block":{pattern:/^(-{4,}|\.{4,})(?:\r?\n|\r)(?:[\s\S]*(?:\r?\n|\r))??\1$/m,inside:{punctuation:/^(?:-+|\.+)|(?:-+|\.+)$/}},"other-block":{pattern:/^(--|\*{4,}|_{4,}|={4,})(?:\r?\n|\r)(?:[\s\S]*(?:\r?\n|\r))??\1$/m,inside:{punctuation:/^(?:-+|\*+|_+|=+)|(?:-+|\*+|_+|=+)$/}},"list-punctuation":{pattern:/(^[ \t]*)(?:-|\*{1,5}|\.{1,5}|(?:[a-z]|\d+)\.|[xvi]+\))(?= )/im,lookbehind:!0,alias:"punctuation"},"list-label":{pattern:/(^[ \t]*)[a-z\d].+(?::{2,4}|;;)(?=\s)/im,lookbehind:!0,alias:"symbol"},"indented-block":{pattern:/((\r?\n|\r)\2)([ \t]+)\S.*(?:(?:\r?\n|\r)\3.+)*(?=\2{2}|$)/,lookbehind:!0},comment:/^\/\/.*/m,title:{pattern:/^.+(?:\r?\n|\r)(?:={3,}|-{3,}|~{3,}|\^{3,}|\+{3,})$|^={1,5} +.+|^\.(?![\s.]).*/m,alias:"important",inside:{punctuation:/^(?:\.|=+)|(?:=+|-+|~+|\^+|\++)$/}},"attribute-entry":{pattern:/^:[^:\r\n]+:(?: .*?(?: \+(?:\r?\n|\r).*?)*)?$/m,alias:"tag"},attributes:n,hr:{pattern:/^'{3,}$/m,alias:"punctuation"},"page-break":{pattern:/^<{3,}$/m,alias:"punctuation"},admonition:{pattern:/^(?:TIP|NOTE|IMPORTANT|WARNING|CAUTION):/m,alias:"keyword"},callout:[{pattern:/(^[ \t]*)/m,lookbehind:!0,alias:"symbol"},{pattern:/<\d+>/,alias:"symbol"}],macro:{pattern:/\b[a-z\d][a-z\d-]*::?(?:(?:\S+)??\[(?:[^\]\\"]|(["'])(?:(?!\1)[^\\]|\\.)*\1|\\.)*\])/,inside:{function:/^[a-z\d-]+(?=:)/,punctuation:/^::?/,attributes:{pattern:/(?:\[(?:[^\]\\"]|(["'])(?:(?!\1)[^\\]|\\.)*\1|\\.)*\])/,inside:n.inside}}},inline:{pattern:/(^|[^\\])(?:(?:\B\[(?:[^\]\\"]|(["'])(?:(?!\2)[^\\]|\\.)*\2|\\.)*\])?(?:\b_(?!\s)(?: _|[^_\\\r\n]|\\.)+(?:(?:\r?\n|\r)(?: _|[^_\\\r\n]|\\.)+)*_\b|\B``(?!\s).+?(?:(?:\r?\n|\r).+?)*''\B|\B`(?!\s)(?: ['`]|.)+?(?:(?:\r?\n|\r)(?: ['`]|.)+?)*['`]\B|\B(['*+#])(?!\s)(?: \3|(?!\3)[^\\\r\n]|\\.)+(?:(?:\r?\n|\r)(?: \3|(?!\3)[^\\\r\n]|\\.)+)*\3\B)|(?:\[(?:[^\]\\"]|(["'])(?:(?!\4)[^\\]|\\.)*\4|\\.)*\])?(?:(__|\*\*|\+\+\+?|##|\$\$|[~^]).+?(?:(?:\r?\n|\r).+?)*\5|\{[^}\r\n]+\}|\[\[\[?.+?(?:(?:\r?\n|\r).+?)*\]?\]\]|<<.+?(?:(?:\r?\n|\r).+?)*>>|\(\(\(?.+?(?:(?:\r?\n|\r).+?)*\)?\)\)))/m,lookbehind:!0,inside:{attributes:n,url:{pattern:/^(?:\[\[\[?.+?\]?\]\]|<<.+?>>)$/,inside:{punctuation:/^(?:\[\[\[?|<<)|(?:\]\]\]?|>>)$/}},"attribute-ref":{pattern:/^\{.+\}$/,inside:{variable:{pattern:/(^\{)[a-z\d,+_-]+/,lookbehind:!0},operator:/^[=?!#%@$]|!(?=[:}])/,punctuation:/^\{|\}$|::?/}},italic:{pattern:/^(['_])[\s\S]+\1$/,inside:{punctuation:/^(?:''?|__?)|(?:''?|__?)$/}},bold:{pattern:/^\*[\s\S]+\*$/,inside:{punctuation:/^\*\*?|\*\*?$/}},punctuation:/^(?:``?|\+{1,3}|##?|\$\$|[~^]|\(\(\(?)|(?:''?|\+{1,3}|##?|\$\$|[~^`]|\)?\)\))$/}},replacement:{pattern:/\((?:C|TM|R)\)/,alias:"builtin"},entity:/&#?[\da-z]{1,8};/i,"line-continuation":{pattern:/(^| )\+$/m,lookbehind:!0,alias:"punctuation"}};function i(t){for(var n={},i=0,e=(t=t.split(" ")).length;i[>=]?|-[fd]?|\b(?:def|eq|ge|gt|in|is|le|lt|ne)\b/, + 'punctuation': parser.punctuation + } } - }, - 'function': { - pattern: /(^|[^^])\B[@^]\w+(?:(?:\.|::?)\w+)*(?:\.|::?)?/, - lookbehind: true, - inside: { - 'keyword': { - pattern: /(^@)(?:GET_|SET_)/, - lookbehind: true - }, - 'punctuation': /\.|:+/ + }); + + parser = Prism.languages.insertBefore('inside', 'punctuation', { + 'expression': parser.expression, + 'keyword': parser.keyword, + 'variable': parser.variable, + 'function': parser.function, + 'escape': parser.escape, + 'parser-punctuation': { + pattern: parser.punctuation, + alias: 'punctuation' } - }, - 'escape': { - pattern: /\^(?:[$^;@()\[\]{}"':]|#[a-f\d]*)/i, - alias: 'builtin' - }, - 'punctuation': /[\[\](){};]/ -}); -Prism.languages.insertBefore('parser', 'keyword', { - 'parser-comment': { - pattern: /(\s)#.*/, - lookbehind: true, - alias: 'comment' - }, - 'expression': { - // Allow for 3 levels of depth - pattern: /(^|[^^])\((?:[^()]|\((?:[^()]|\((?:[^()])*\))*\))*\)/, - greedy: true, - lookbehind: true, - inside: { - 'string': { - pattern: /(^|[^^])(["'])(?:(?!\2)[^^]|\^[\s\S])*\2/, - lookbehind: true - }, - 'keyword': Prism.languages.parser.keyword, - 'variable': Prism.languages.parser.variable, - 'function': Prism.languages.parser.function, - 'boolean': /\b(?:true|false)\b/, - 'number': /\b(?:0x[a-f\d]+|\d+\.?\d*(?:e[+-]?\d+)?)\b/i, - 'escape': Prism.languages.parser.escape, - 'operator': /[~+*\/\\%]|!(?:\|\|?|=)?|&&?|\|\|?|==|<[<=]?|>[>=]?|-[fd]?|\b(?:def|eq|ge|gt|in|is|le|lt|ne)\b/, - 'punctuation': Prism.languages.parser.punctuation - } - } -}); -Prism.languages.insertBefore('inside', 'punctuation', { - 'expression': Prism.languages.parser.expression, - 'keyword': Prism.languages.parser.keyword, - 'variable': Prism.languages.parser.variable, - 'function': Prism.languages.parser.function, - 'escape': Prism.languages.parser.escape, - 'parser-punctuation': { - pattern: Prism.languages.parser.punctuation, - alias: 'punctuation' - } -}, Prism.languages.parser['tag'].inside['attr-value']); \ No newline at end of file + }, parser['tag'].inside['attr-value']); + +}(Prism)); diff --git a/components/prism-parser.min.js b/components/prism-parser.min.js index aa54a06c51..e7b91ccda0 100644 --- a/components/prism-parser.min.js +++ b/components/prism-parser.min.js @@ -1 +1 @@ -Prism.languages.parser=Prism.languages.extend("markup",{keyword:{pattern:/(^|[^^])(?:\^(?:case|eval|for|if|switch|throw)\b|@(?:BASE|CLASS|GET(?:_DEFAULT)?|OPTIONS|SET_DEFAULT|USE)\b)/,lookbehind:!0},variable:{pattern:/(^|[^^])\B\$(?:\w+|(?=[.{]))(?:(?:\.|::?)\w+)*(?:\.|::?)?/,lookbehind:!0,inside:{punctuation:/\.|:+/}},function:{pattern:/(^|[^^])\B[@^]\w+(?:(?:\.|::?)\w+)*(?:\.|::?)?/,lookbehind:!0,inside:{keyword:{pattern:/(^@)(?:GET_|SET_)/,lookbehind:!0},punctuation:/\.|:+/}},escape:{pattern:/\^(?:[$^;@()\[\]{}"':]|#[a-f\d]*)/i,alias:"builtin"},punctuation:/[\[\](){};]/}),Prism.languages.insertBefore("parser","keyword",{"parser-comment":{pattern:/(\s)#.*/,lookbehind:!0,alias:"comment"},expression:{pattern:/(^|[^^])\((?:[^()]|\((?:[^()]|\((?:[^()])*\))*\))*\)/,greedy:!0,lookbehind:!0,inside:{string:{pattern:/(^|[^^])(["'])(?:(?!\2)[^^]|\^[\s\S])*\2/,lookbehind:!0},keyword:Prism.languages.parser.keyword,variable:Prism.languages.parser.variable,function:Prism.languages.parser.function,boolean:/\b(?:true|false)\b/,number:/\b(?:0x[a-f\d]+|\d+\.?\d*(?:e[+-]?\d+)?)\b/i,escape:Prism.languages.parser.escape,operator:/[~+*\/\\%]|!(?:\|\|?|=)?|&&?|\|\|?|==|<[<=]?|>[>=]?|-[fd]?|\b(?:def|eq|ge|gt|in|is|le|lt|ne)\b/,punctuation:Prism.languages.parser.punctuation}}}),Prism.languages.insertBefore("inside","punctuation",{expression:Prism.languages.parser.expression,keyword:Prism.languages.parser.keyword,variable:Prism.languages.parser.variable,function:Prism.languages.parser.function,escape:Prism.languages.parser.escape,"parser-punctuation":{pattern:Prism.languages.parser.punctuation,alias:"punctuation"}},Prism.languages.parser.tag.inside["attr-value"]); \ No newline at end of file +!function(e){var n=e.languages.parser=e.languages.extend("markup",{keyword:{pattern:/(^|[^^])(?:\^(?:case|eval|for|if|switch|throw)\b|@(?:BASE|CLASS|GET(?:_DEFAULT)?|OPTIONS|SET_DEFAULT|USE)\b)/,lookbehind:!0},variable:{pattern:/(^|[^^])\B\$(?:\w+|(?=[.{]))(?:(?:\.|::?)\w+)*(?:\.|::?)?/,lookbehind:!0,inside:{punctuation:/\.|:+/}},function:{pattern:/(^|[^^])\B[@^]\w+(?:(?:\.|::?)\w+)*(?:\.|::?)?/,lookbehind:!0,inside:{keyword:{pattern:/(^@)(?:GET_|SET_)/,lookbehind:!0},punctuation:/\.|:+/}},escape:{pattern:/\^(?:[$^;@()\[\]{}"':]|#[a-f\d]*)/i,alias:"builtin"},punctuation:/[\[\](){};]/});n=e.languages.insertBefore("parser","keyword",{"parser-comment":{pattern:/(\s)#.*/,lookbehind:!0,alias:"comment"},expression:{pattern:/(^|[^^])\((?:[^()]|\((?:[^()]|\((?:[^()])*\))*\))*\)/,greedy:!0,lookbehind:!0,inside:{string:{pattern:/(^|[^^])(["'])(?:(?!\2)[^^]|\^[\s\S])*\2/,lookbehind:!0},keyword:n.keyword,variable:n.variable,function:n.function,boolean:/\b(?:true|false)\b/,number:/\b(?:0x[a-f\d]+|\d+\.?\d*(?:e[+-]?\d+)?)\b/i,escape:n.escape,operator:/[~+*\/\\%]|!(?:\|\|?|=)?|&&?|\|\|?|==|<[<=]?|>[>=]?|-[fd]?|\b(?:def|eq|ge|gt|in|is|le|lt|ne)\b/,punctuation:n.punctuation}}}),n=e.languages.insertBefore("inside","punctuation",{expression:n.expression,keyword:n.keyword,variable:n.variable,function:n.function,escape:n.escape,"parser-punctuation":{pattern:n.punctuation,alias:"punctuation"}},n.tag.inside["attr-value"])}(Prism); \ No newline at end of file diff --git a/components/prism-plsql.js b/components/prism-plsql.js index cc9b792491..34181eede4 100644 --- a/components/prism-plsql.js +++ b/components/prism-plsql.js @@ -1,20 +1,26 @@ -Prism.languages.plsql = Prism.languages.extend('sql', { - 'comment': [ - /\/\*[\s\S]*?\*\//, - /--.*/ - ] -}); +(function (Prism) { -if (Prism.util.type(Prism.languages.plsql['keyword']) !== 'Array') { - Prism.languages.plsql['keyword'] = [Prism.languages.plsql['keyword']]; -} -Prism.languages.plsql['keyword'].unshift( - /\b(?:ACCESS|AGENT|AGGREGATE|ARRAY|ARROW|AT|ATTRIBUTE|AUDIT|AUTHID|BFILE_BASE|BLOB_BASE|BLOCK|BODY|BOTH|BOUND|BYTE|CALLING|CHAR_BASE|CHARSET(?:FORM|ID)|CLOB_BASE|COLAUTH|COLLECT|CLUSTERS?|COMPILED|COMPRESS|CONSTANT|CONSTRUCTOR|CONTEXT|CRASH|CUSTOMDATUM|DANGLING|DATE_BASE|DEFINE|DETERMINISTIC|DURATION|ELEMENT|EMPTY|EXCEPTIONS?|EXCLUSIVE|EXTERNAL|FINAL|FORALL|FORM|FOUND|GENERAL|HEAP|HIDDEN|IDENTIFIED|IMMEDIATE|INCLUDING|INCREMENT|INDICATOR|INDEXES|INDICES|INFINITE|INITIAL|ISOPEN|INSTANTIABLE|INTERFACE|INVALIDATE|JAVA|LARGE|LEADING|LENGTH|LIBRARY|LIKE[24C]|LIMITED|LONG|LOOP|MAP|MAXEXTENTS|MAXLEN|MEMBER|MINUS|MLSLABEL|MULTISET|NAME|NAN|NATIVE|NEW|NOAUDIT|NOCOMPRESS|NOCOPY|NOTFOUND|NOWAIT|NUMBER(?:_BASE)?|OBJECT|OCI(?:COLL|DATE|DATETIME|DURATION|INTERVAL|LOBLOCATOR|NUMBER|RAW|REF|REFCURSOR|ROWID|STRING|TYPE)|OFFLINE|ONLINE|ONLY|OPAQUE|OPERATOR|ORACLE|ORADATA|ORGANIZATION|ORL(?:ANY|VARY)|OTHERS|OVERLAPS|OVERRIDING|PACKAGE|PARALLEL_ENABLE|PARAMETERS?|PASCAL|PCTFREE|PIPE(?:LINED)?|PRAGMA|PRIOR|PRIVATE|RAISE|RANGE|RAW|RECORD|REF|REFERENCE|REM|REMAINDER|RESULT|RESOURCE|RETURNING|REVERSE|ROW(?:ID|NUM|TYPE)|SAMPLE|SB[124]|SEGMENT|SELF|SEPARATE|SEQUENCE|SHORT|SIZE(?:_T)?|SPARSE|SQL(?:CODE|DATA|NAME|STATE)|STANDARD|STATIC|STDDEV|STORED|STRING|STRUCT|STYLE|SUBMULTISET|SUBPARTITION|SUBSTITUTABLE|SUBTYPE|SUCCESSFUL|SYNONYM|SYSDATE|TABAUTH|TDO|THE|TIMEZONE_(?:ABBR|HOUR|MINUTE|REGION)|TRAILING|TRANSAC(?:TIONAL)?|TRUSTED|UB[124]|UID|UNDER|UNTRUSTED|VALIDATE|VALIST|VARCHAR2|VARIABLE|VARIANCE|VARRAY|VIEWS|VOID|WHENEVER|WRAPPED|ZONE)\b/i -); + var plsql = Prism.languages.plsql = Prism.languages.extend('sql', { + 'comment': [ + /\/\*[\s\S]*?\*\//, + /--.*/ + ] + }); -if (Prism.util.type(Prism.languages.plsql['operator']) !== 'Array') { - Prism.languages.plsql['operator'] = [Prism.languages.plsql['operator']]; -} -Prism.languages.plsql['operator'].unshift( - /:=/ -); \ No newline at end of file + var keyword = plsql['keyword']; + if (Prism.util.type(keyword) !== 'Array') { + keyword = plsql['keyword'] = [keyword]; + } + keyword.unshift( + /\b(?:ACCESS|AGENT|AGGREGATE|ARRAY|ARROW|AT|ATTRIBUTE|AUDIT|AUTHID|BFILE_BASE|BLOB_BASE|BLOCK|BODY|BOTH|BOUND|BYTE|CALLING|CHAR_BASE|CHARSET(?:FORM|ID)|CLOB_BASE|COLAUTH|COLLECT|CLUSTERS?|COMPILED|COMPRESS|CONSTANT|CONSTRUCTOR|CONTEXT|CRASH|CUSTOMDATUM|DANGLING|DATE_BASE|DEFINE|DETERMINISTIC|DURATION|ELEMENT|EMPTY|EXCEPTIONS?|EXCLUSIVE|EXTERNAL|FINAL|FORALL|FORM|FOUND|GENERAL|HEAP|HIDDEN|IDENTIFIED|IMMEDIATE|INCLUDING|INCREMENT|INDICATOR|INDEXES|INDICES|INFINITE|INITIAL|ISOPEN|INSTANTIABLE|INTERFACE|INVALIDATE|JAVA|LARGE|LEADING|LENGTH|LIBRARY|LIKE[24C]|LIMITED|LONG|LOOP|MAP|MAXEXTENTS|MAXLEN|MEMBER|MINUS|MLSLABEL|MULTISET|NAME|NAN|NATIVE|NEW|NOAUDIT|NOCOMPRESS|NOCOPY|NOTFOUND|NOWAIT|NUMBER(?:_BASE)?|OBJECT|OCI(?:COLL|DATE|DATETIME|DURATION|INTERVAL|LOBLOCATOR|NUMBER|RAW|REF|REFCURSOR|ROWID|STRING|TYPE)|OFFLINE|ONLINE|ONLY|OPAQUE|OPERATOR|ORACLE|ORADATA|ORGANIZATION|ORL(?:ANY|VARY)|OTHERS|OVERLAPS|OVERRIDING|PACKAGE|PARALLEL_ENABLE|PARAMETERS?|PASCAL|PCTFREE|PIPE(?:LINED)?|PRAGMA|PRIOR|PRIVATE|RAISE|RANGE|RAW|RECORD|REF|REFERENCE|REM|REMAINDER|RESULT|RESOURCE|RETURNING|REVERSE|ROW(?:ID|NUM|TYPE)|SAMPLE|SB[124]|SEGMENT|SELF|SEPARATE|SEQUENCE|SHORT|SIZE(?:_T)?|SPARSE|SQL(?:CODE|DATA|NAME|STATE)|STANDARD|STATIC|STDDEV|STORED|STRING|STRUCT|STYLE|SUBMULTISET|SUBPARTITION|SUBSTITUTABLE|SUBTYPE|SUCCESSFUL|SYNONYM|SYSDATE|TABAUTH|TDO|THE|TIMEZONE_(?:ABBR|HOUR|MINUTE|REGION)|TRAILING|TRANSAC(?:TIONAL)?|TRUSTED|UB[124]|UID|UNDER|UNTRUSTED|VALIDATE|VALIST|VARCHAR2|VARIABLE|VARIANCE|VARRAY|VIEWS|VOID|WHENEVER|WRAPPED|ZONE)\b/i + ); + + var operator = plsql['operator']; + if (Prism.util.type(operator) !== 'Array') { + operator = plsql['operator'] = [operator]; + } + operator.unshift( + /:=/ + ); + +}(Prism)); diff --git a/components/prism-plsql.min.js b/components/prism-plsql.min.js index 3f75845110..a38f2af9d8 100644 --- a/components/prism-plsql.min.js +++ b/components/prism-plsql.min.js @@ -1 +1 @@ -Prism.languages.plsql=Prism.languages.extend("sql",{comment:[/\/\*[\s\S]*?\*\//,/--.*/]}),"Array"!==Prism.util.type(Prism.languages.plsql.keyword)&&(Prism.languages.plsql.keyword=[Prism.languages.plsql.keyword]),Prism.languages.plsql.keyword.unshift(/\b(?:ACCESS|AGENT|AGGREGATE|ARRAY|ARROW|AT|ATTRIBUTE|AUDIT|AUTHID|BFILE_BASE|BLOB_BASE|BLOCK|BODY|BOTH|BOUND|BYTE|CALLING|CHAR_BASE|CHARSET(?:FORM|ID)|CLOB_BASE|COLAUTH|COLLECT|CLUSTERS?|COMPILED|COMPRESS|CONSTANT|CONSTRUCTOR|CONTEXT|CRASH|CUSTOMDATUM|DANGLING|DATE_BASE|DEFINE|DETERMINISTIC|DURATION|ELEMENT|EMPTY|EXCEPTIONS?|EXCLUSIVE|EXTERNAL|FINAL|FORALL|FORM|FOUND|GENERAL|HEAP|HIDDEN|IDENTIFIED|IMMEDIATE|INCLUDING|INCREMENT|INDICATOR|INDEXES|INDICES|INFINITE|INITIAL|ISOPEN|INSTANTIABLE|INTERFACE|INVALIDATE|JAVA|LARGE|LEADING|LENGTH|LIBRARY|LIKE[24C]|LIMITED|LONG|LOOP|MAP|MAXEXTENTS|MAXLEN|MEMBER|MINUS|MLSLABEL|MULTISET|NAME|NAN|NATIVE|NEW|NOAUDIT|NOCOMPRESS|NOCOPY|NOTFOUND|NOWAIT|NUMBER(?:_BASE)?|OBJECT|OCI(?:COLL|DATE|DATETIME|DURATION|INTERVAL|LOBLOCATOR|NUMBER|RAW|REF|REFCURSOR|ROWID|STRING|TYPE)|OFFLINE|ONLINE|ONLY|OPAQUE|OPERATOR|ORACLE|ORADATA|ORGANIZATION|ORL(?:ANY|VARY)|OTHERS|OVERLAPS|OVERRIDING|PACKAGE|PARALLEL_ENABLE|PARAMETERS?|PASCAL|PCTFREE|PIPE(?:LINED)?|PRAGMA|PRIOR|PRIVATE|RAISE|RANGE|RAW|RECORD|REF|REFERENCE|REM|REMAINDER|RESULT|RESOURCE|RETURNING|REVERSE|ROW(?:ID|NUM|TYPE)|SAMPLE|SB[124]|SEGMENT|SELF|SEPARATE|SEQUENCE|SHORT|SIZE(?:_T)?|SPARSE|SQL(?:CODE|DATA|NAME|STATE)|STANDARD|STATIC|STDDEV|STORED|STRING|STRUCT|STYLE|SUBMULTISET|SUBPARTITION|SUBSTITUTABLE|SUBTYPE|SUCCESSFUL|SYNONYM|SYSDATE|TABAUTH|TDO|THE|TIMEZONE_(?:ABBR|HOUR|MINUTE|REGION)|TRAILING|TRANSAC(?:TIONAL)?|TRUSTED|UB[124]|UID|UNDER|UNTRUSTED|VALIDATE|VALIST|VARCHAR2|VARIABLE|VARIANCE|VARRAY|VIEWS|VOID|WHENEVER|WRAPPED|ZONE)\b/i),"Array"!==Prism.util.type(Prism.languages.plsql.operator)&&(Prism.languages.plsql.operator=[Prism.languages.plsql.operator]),Prism.languages.plsql.operator.unshift(/:=/); \ No newline at end of file +!function(E){var A=E.languages.plsql=E.languages.extend("sql",{comment:[/\/\*[\s\S]*?\*\//,/--.*/]}),T=A.keyword;"Array"!==E.util.type(T)&&(T=A.keyword=[T]),T.unshift(/\b(?:ACCESS|AGENT|AGGREGATE|ARRAY|ARROW|AT|ATTRIBUTE|AUDIT|AUTHID|BFILE_BASE|BLOB_BASE|BLOCK|BODY|BOTH|BOUND|BYTE|CALLING|CHAR_BASE|CHARSET(?:FORM|ID)|CLOB_BASE|COLAUTH|COLLECT|CLUSTERS?|COMPILED|COMPRESS|CONSTANT|CONSTRUCTOR|CONTEXT|CRASH|CUSTOMDATUM|DANGLING|DATE_BASE|DEFINE|DETERMINISTIC|DURATION|ELEMENT|EMPTY|EXCEPTIONS?|EXCLUSIVE|EXTERNAL|FINAL|FORALL|FORM|FOUND|GENERAL|HEAP|HIDDEN|IDENTIFIED|IMMEDIATE|INCLUDING|INCREMENT|INDICATOR|INDEXES|INDICES|INFINITE|INITIAL|ISOPEN|INSTANTIABLE|INTERFACE|INVALIDATE|JAVA|LARGE|LEADING|LENGTH|LIBRARY|LIKE[24C]|LIMITED|LONG|LOOP|MAP|MAXEXTENTS|MAXLEN|MEMBER|MINUS|MLSLABEL|MULTISET|NAME|NAN|NATIVE|NEW|NOAUDIT|NOCOMPRESS|NOCOPY|NOTFOUND|NOWAIT|NUMBER(?:_BASE)?|OBJECT|OCI(?:COLL|DATE|DATETIME|DURATION|INTERVAL|LOBLOCATOR|NUMBER|RAW|REF|REFCURSOR|ROWID|STRING|TYPE)|OFFLINE|ONLINE|ONLY|OPAQUE|OPERATOR|ORACLE|ORADATA|ORGANIZATION|ORL(?:ANY|VARY)|OTHERS|OVERLAPS|OVERRIDING|PACKAGE|PARALLEL_ENABLE|PARAMETERS?|PASCAL|PCTFREE|PIPE(?:LINED)?|PRAGMA|PRIOR|PRIVATE|RAISE|RANGE|RAW|RECORD|REF|REFERENCE|REM|REMAINDER|RESULT|RESOURCE|RETURNING|REVERSE|ROW(?:ID|NUM|TYPE)|SAMPLE|SB[124]|SEGMENT|SELF|SEPARATE|SEQUENCE|SHORT|SIZE(?:_T)?|SPARSE|SQL(?:CODE|DATA|NAME|STATE)|STANDARD|STATIC|STDDEV|STORED|STRING|STRUCT|STYLE|SUBMULTISET|SUBPARTITION|SUBSTITUTABLE|SUBTYPE|SUCCESSFUL|SYNONYM|SYSDATE|TABAUTH|TDO|THE|TIMEZONE_(?:ABBR|HOUR|MINUTE|REGION)|TRAILING|TRANSAC(?:TIONAL)?|TRUSTED|UB[124]|UID|UNDER|UNTRUSTED|VALIDATE|VALIST|VARCHAR2|VARIABLE|VARIANCE|VARRAY|VIEWS|VOID|WHENEVER|WRAPPED|ZONE)\b/i);var R=A.operator;"Array"!==E.util.type(R)&&(R=A.operator=[R]),R.unshift(/:=/)}(Prism); \ No newline at end of file diff --git a/components/prism-powershell.js b/components/prism-powershell.js index 90afbaae62..0baf343ca0 100644 --- a/components/prism-powershell.js +++ b/components/prism-powershell.js @@ -1,55 +1,60 @@ -Prism.languages.powershell = { - 'comment': [ - { - pattern: /(^|[^`])<#[\s\S]*?#>/, - lookbehind: true - }, - { - pattern: /(^|[^`])#.*/, - lookbehind: true - } - ], - 'string': [ - { - pattern: /"(?:`[\s\S]|[^`"])*"/, - greedy: true, - inside: { - 'function': { - // Allow for one level of nesting - pattern: /(^|[^`])\$\((?:\$\(.*?\)|(?!\$\()[^\r\n)])*\)/, - lookbehind: true, - // Populated at end of file - inside: {} +(function (Prism) { + + var powershell = Prism.languages.powershell = { + 'comment': [ + { + pattern: /(^|[^`])<#[\s\S]*?#>/, + lookbehind: true + }, + { + pattern: /(^|[^`])#.*/, + lookbehind: true + } + ], + 'string': [ + { + pattern: /"(?:`[\s\S]|[^`"])*"/, + greedy: true, + inside: { + 'function': { + // Allow for one level of nesting + pattern: /(^|[^`])\$\((?:\$\(.*?\)|(?!\$\()[^\r\n)])*\)/, + lookbehind: true, + // Populated at end of file + inside: {} + } } + }, + { + pattern: /'(?:[^']|'')*'/, + greedy: true } + ], + // Matches name spaces as well as casts, attribute decorators. Force starting with letter to avoid matching array indices + // Supports two levels of nested brackets (e.g. `[OutputType([System.Collections.Generic.List[int]])]`) + 'namespace': /\[[a-z](?:\[(?:\[[^\]]*]|[^\[\]])*]|[^\[\]])*]/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 + // Get-Command | ?{ $_.ModuleName -match "Microsoft.PowerShell.(Util|Core|Management)" } + // Get-Alias | ?{ $_.ReferencedCommand.Module.Name -match "Microsoft.PowerShell.(Util|Core|Management)" } + 'function': [ + /\b(?:Add-(?:Computer|Content|History|Member|PSSnapin|Type)|Checkpoint-Computer|Clear-(?:Content|EventLog|History|Item|ItemProperty|Variable)|Compare-Object|Complete-Transaction|Connect-PSSession|ConvertFrom-(?:Csv|Json|StringData)|Convert-Path|ConvertTo-(?:Csv|Html|Json|Xml)|Copy-(?:Item|ItemProperty)|Debug-Process|Disable-(?:ComputerRestore|PSBreakpoint|PSRemoting|PSSessionConfiguration)|Disconnect-PSSession|Enable-(?:ComputerRestore|PSBreakpoint|PSRemoting|PSSessionConfiguration)|Enter-PSSession|Exit-PSSession|Export-(?:Alias|Clixml|Console|Csv|FormatData|ModuleMember|PSSession)|ForEach-Object|Format-(?:Custom|List|Table|Wide)|Get-(?:Alias|ChildItem|Command|ComputerRestorePoint|Content|ControlPanelItem|Culture|Date|Event|EventLog|EventSubscriber|FormatData|Help|History|Host|HotFix|Item|ItemProperty|Job|Location|Member|Module|Process|PSBreakpoint|PSCallStack|PSDrive|PSProvider|PSSession|PSSessionConfiguration|PSSnapin|Random|Service|TraceSource|Transaction|TypeData|UICulture|Unique|Variable|WmiObject)|Group-Object|Import-(?:Alias|Clixml|Csv|LocalizedData|Module|PSSession)|Invoke-(?:Command|Expression|History|Item|RestMethod|WebRequest|WmiMethod)|Join-Path|Limit-EventLog|Measure-(?:Command|Object)|Move-(?:Item|ItemProperty)|New-(?:Alias|Event|EventLog|Item|ItemProperty|Module|ModuleManifest|Object|PSDrive|PSSession|PSSessionConfigurationFile|PSSessionOption|PSTransportOption|Service|TimeSpan|Variable|WebServiceProxy)|Out-(?:Default|File|GridView|Host|Null|Printer|String)|Pop-Location|Push-Location|Read-Host|Receive-(?:Job|PSSession)|Register-(?:EngineEvent|ObjectEvent|PSSessionConfiguration|WmiEvent)|Remove-(?:Computer|Event|EventLog|Item|ItemProperty|Job|Module|PSBreakpoint|PSDrive|PSSession|PSSnapin|TypeData|Variable|WmiObject)|Rename-(?:Computer|Item|ItemProperty)|Reset-ComputerMachinePassword|Resolve-Path|Restart-(?:Computer|Service)|Restore-Computer|Resume-(?:Job|Service)|Save-Help|Select-(?:Object|String|Xml)|Send-MailMessage|Set-(?:Alias|Content|Date|Item|ItemProperty|Location|PSBreakpoint|PSDebug|PSSessionConfiguration|Service|StrictMode|TraceSource|Variable|WmiInstance)|Show-(?:Command|ControlPanelItem|EventLog)|Sort-Object|Split-Path|Start-(?:Job|Process|Service|Sleep|Transaction)|Stop-(?:Computer|Job|Process|Service)|Suspend-(?:Job|Service)|Tee-Object|Test-(?:ComputerSecureChannel|Connection|ModuleManifest|Path|PSSessionConfigurationFile)|Trace-Command|Unblock-File|Undo-Transaction|Unregister-(?:Event|PSSessionConfiguration)|Update-(?:FormatData|Help|List|TypeData)|Use-Transaction|Wait-(?:Event|Job|Process)|Where-Object|Write-(?:Debug|Error|EventLog|Host|Output|Progress|Verbose|Warning))\b/i, + /\b(?:ac|cat|chdir|clc|cli|clp|clv|compare|copy|cp|cpi|cpp|cvpa|dbp|del|diff|dir|ebp|echo|epal|epcsv|epsn|erase|fc|fl|ft|fw|gal|gbp|gc|gci|gcs|gdr|gi|gl|gm|gp|gps|group|gsv|gu|gv|gwmi|iex|ii|ipal|ipcsv|ipsn|irm|iwmi|iwr|kill|lp|ls|measure|mi|mount|move|mp|mv|nal|ndr|ni|nv|ogv|popd|ps|pushd|pwd|rbp|rd|rdr|ren|ri|rm|rmdir|rni|rnp|rp|rv|rvpa|rwmi|sal|saps|sasv|sbp|sc|select|set|shcm|si|sl|sleep|sls|sort|sp|spps|spsv|start|sv|swmi|tee|trcm|type|write)\b/i + ], + // per http://technet.microsoft.com/en-us/library/hh847744.aspx + 'keyword': /\b(?:Begin|Break|Catch|Class|Continue|Data|Define|Do|DynamicParam|Else|ElseIf|End|Exit|Filter|Finally|For|ForEach|From|Function|If|InlineScript|Parallel|Param|Process|Return|Sequence|Switch|Throw|Trap|Try|Until|Using|Var|While|Workflow)\b/i, + 'operator': { + pattern: /(\W?)(?:!|-(eq|ne|gt|ge|lt|le|sh[lr]|not|b?(?:and|x?or)|(?:Not)?(?:Like|Match|Contains|In)|Replace|Join|is(?:Not)?|as)\b|-[-=]?|\+[+=]?|[*\/%]=?)/i, + lookbehind: true }, - { - pattern: /'(?:[^']|'')*'/, - greedy: true - } - ], - // Matches name spaces as well as casts, attribute decorators. Force starting with letter to avoid matching array indices - // Supports two levels of nested brackets (e.g. `[OutputType([System.Collections.Generic.List[int]])]`) - 'namespace': /\[[a-z](?:\[(?:\[[^\]]*]|[^\[\]])*]|[^\[\]])*]/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 - // Get-Command | ?{ $_.ModuleName -match "Microsoft.PowerShell.(Util|Core|Management)" } - // Get-Alias | ?{ $_.ReferencedCommand.Module.Name -match "Microsoft.PowerShell.(Util|Core|Management)" } - 'function': [ - /\b(?:Add-(?:Computer|Content|History|Member|PSSnapin|Type)|Checkpoint-Computer|Clear-(?:Content|EventLog|History|Item|ItemProperty|Variable)|Compare-Object|Complete-Transaction|Connect-PSSession|ConvertFrom-(?:Csv|Json|StringData)|Convert-Path|ConvertTo-(?:Csv|Html|Json|Xml)|Copy-(?:Item|ItemProperty)|Debug-Process|Disable-(?:ComputerRestore|PSBreakpoint|PSRemoting|PSSessionConfiguration)|Disconnect-PSSession|Enable-(?:ComputerRestore|PSBreakpoint|PSRemoting|PSSessionConfiguration)|Enter-PSSession|Exit-PSSession|Export-(?:Alias|Clixml|Console|Csv|FormatData|ModuleMember|PSSession)|ForEach-Object|Format-(?:Custom|List|Table|Wide)|Get-(?:Alias|ChildItem|Command|ComputerRestorePoint|Content|ControlPanelItem|Culture|Date|Event|EventLog|EventSubscriber|FormatData|Help|History|Host|HotFix|Item|ItemProperty|Job|Location|Member|Module|Process|PSBreakpoint|PSCallStack|PSDrive|PSProvider|PSSession|PSSessionConfiguration|PSSnapin|Random|Service|TraceSource|Transaction|TypeData|UICulture|Unique|Variable|WmiObject)|Group-Object|Import-(?:Alias|Clixml|Csv|LocalizedData|Module|PSSession)|Invoke-(?:Command|Expression|History|Item|RestMethod|WebRequest|WmiMethod)|Join-Path|Limit-EventLog|Measure-(?:Command|Object)|Move-(?:Item|ItemProperty)|New-(?:Alias|Event|EventLog|Item|ItemProperty|Module|ModuleManifest|Object|PSDrive|PSSession|PSSessionConfigurationFile|PSSessionOption|PSTransportOption|Service|TimeSpan|Variable|WebServiceProxy)|Out-(?:Default|File|GridView|Host|Null|Printer|String)|Pop-Location|Push-Location|Read-Host|Receive-(?:Job|PSSession)|Register-(?:EngineEvent|ObjectEvent|PSSessionConfiguration|WmiEvent)|Remove-(?:Computer|Event|EventLog|Item|ItemProperty|Job|Module|PSBreakpoint|PSDrive|PSSession|PSSnapin|TypeData|Variable|WmiObject)|Rename-(?:Computer|Item|ItemProperty)|Reset-ComputerMachinePassword|Resolve-Path|Restart-(?:Computer|Service)|Restore-Computer|Resume-(?:Job|Service)|Save-Help|Select-(?:Object|String|Xml)|Send-MailMessage|Set-(?:Alias|Content|Date|Item|ItemProperty|Location|PSBreakpoint|PSDebug|PSSessionConfiguration|Service|StrictMode|TraceSource|Variable|WmiInstance)|Show-(?:Command|ControlPanelItem|EventLog)|Sort-Object|Split-Path|Start-(?:Job|Process|Service|Sleep|Transaction)|Stop-(?:Computer|Job|Process|Service)|Suspend-(?:Job|Service)|Tee-Object|Test-(?:ComputerSecureChannel|Connection|ModuleManifest|Path|PSSessionConfigurationFile)|Trace-Command|Unblock-File|Undo-Transaction|Unregister-(?:Event|PSSessionConfiguration)|Update-(?:FormatData|Help|List|TypeData)|Use-Transaction|Wait-(?:Event|Job|Process)|Where-Object|Write-(?:Debug|Error|EventLog|Host|Output|Progress|Verbose|Warning))\b/i, - /\b(?:ac|cat|chdir|clc|cli|clp|clv|compare|copy|cp|cpi|cpp|cvpa|dbp|del|diff|dir|ebp|echo|epal|epcsv|epsn|erase|fc|fl|ft|fw|gal|gbp|gc|gci|gcs|gdr|gi|gl|gm|gp|gps|group|gsv|gu|gv|gwmi|iex|ii|ipal|ipcsv|ipsn|irm|iwmi|iwr|kill|lp|ls|measure|mi|mount|move|mp|mv|nal|ndr|ni|nv|ogv|popd|ps|pushd|pwd|rbp|rd|rdr|ren|ri|rm|rmdir|rni|rnp|rp|rv|rvpa|rwmi|sal|saps|sasv|sbp|sc|select|set|shcm|si|sl|sleep|sls|sort|sp|spps|spsv|start|sv|swmi|tee|trcm|type|write)\b/i - ], - // per http://technet.microsoft.com/en-us/library/hh847744.aspx - 'keyword': /\b(?:Begin|Break|Catch|Class|Continue|Data|Define|Do|DynamicParam|Else|ElseIf|End|Exit|Filter|Finally|For|ForEach|From|Function|If|InlineScript|Parallel|Param|Process|Return|Sequence|Switch|Throw|Trap|Try|Until|Using|Var|While|Workflow)\b/i, - 'operator': { - pattern: /(\W?)(?:!|-(eq|ne|gt|ge|lt|le|sh[lr]|not|b?(?:and|x?or)|(?:Not)?(?:Like|Match|Contains|In)|Replace|Join|is(?:Not)?|as)\b|-[-=]?|\+[+=]?|[*\/%]=?)/i, - lookbehind: true - }, - 'punctuation': /[|{}[\];(),.]/ -}; + 'punctuation': /[|{}[\];(),.]/ + }; + + // Variable interpolation inside strings, and nested expressions + var stringInside = powershell.string[0].inside; + stringInside.boolean = powershell.boolean; + stringInside.variable = powershell.variable; + stringInside.function.inside = powershell; -// Variable interpolation inside strings, and nested expressions -Prism.languages.powershell.string[0].inside.boolean = Prism.languages.powershell.boolean; -Prism.languages.powershell.string[0].inside.variable = Prism.languages.powershell.variable; -Prism.languages.powershell.string[0].inside.function.inside = Prism.languages.powershell; +}(Prism)); diff --git a/components/prism-powershell.min.js b/components/prism-powershell.min.js index 170bb8a4ae..95dfb34447 100644 --- a/components/prism-powershell.min.js +++ b/components/prism-powershell.min.js @@ -1 +1 @@ -Prism.languages.powershell={comment:[{pattern:/(^|[^`])<#[\s\S]*?#>/,lookbehind:!0},{pattern:/(^|[^`])#.*/,lookbehind:!0}],string:[{pattern:/"(?:`[\s\S]|[^`"])*"/,greedy:!0,inside:{function:{pattern:/(^|[^`])\$\((?:\$\(.*?\)|(?!\$\()[^\r\n)])*\)/,lookbehind:!0,inside:{}}}},{pattern:/'(?:[^']|'')*'/,greedy:!0}],namespace:/\[[a-z](?:\[(?:\[[^\]]*]|[^\[\]])*]|[^\[\]])*]/i,boolean:/\$(?:true|false)\b/i,variable:/\$\w+\b/i,function:[/\b(?:Add-(?:Computer|Content|History|Member|PSSnapin|Type)|Checkpoint-Computer|Clear-(?:Content|EventLog|History|Item|ItemProperty|Variable)|Compare-Object|Complete-Transaction|Connect-PSSession|ConvertFrom-(?:Csv|Json|StringData)|Convert-Path|ConvertTo-(?:Csv|Html|Json|Xml)|Copy-(?:Item|ItemProperty)|Debug-Process|Disable-(?:ComputerRestore|PSBreakpoint|PSRemoting|PSSessionConfiguration)|Disconnect-PSSession|Enable-(?:ComputerRestore|PSBreakpoint|PSRemoting|PSSessionConfiguration)|Enter-PSSession|Exit-PSSession|Export-(?:Alias|Clixml|Console|Csv|FormatData|ModuleMember|PSSession)|ForEach-Object|Format-(?:Custom|List|Table|Wide)|Get-(?:Alias|ChildItem|Command|ComputerRestorePoint|Content|ControlPanelItem|Culture|Date|Event|EventLog|EventSubscriber|FormatData|Help|History|Host|HotFix|Item|ItemProperty|Job|Location|Member|Module|Process|PSBreakpoint|PSCallStack|PSDrive|PSProvider|PSSession|PSSessionConfiguration|PSSnapin|Random|Service|TraceSource|Transaction|TypeData|UICulture|Unique|Variable|WmiObject)|Group-Object|Import-(?:Alias|Clixml|Csv|LocalizedData|Module|PSSession)|Invoke-(?:Command|Expression|History|Item|RestMethod|WebRequest|WmiMethod)|Join-Path|Limit-EventLog|Measure-(?:Command|Object)|Move-(?:Item|ItemProperty)|New-(?:Alias|Event|EventLog|Item|ItemProperty|Module|ModuleManifest|Object|PSDrive|PSSession|PSSessionConfigurationFile|PSSessionOption|PSTransportOption|Service|TimeSpan|Variable|WebServiceProxy)|Out-(?:Default|File|GridView|Host|Null|Printer|String)|Pop-Location|Push-Location|Read-Host|Receive-(?:Job|PSSession)|Register-(?:EngineEvent|ObjectEvent|PSSessionConfiguration|WmiEvent)|Remove-(?:Computer|Event|EventLog|Item|ItemProperty|Job|Module|PSBreakpoint|PSDrive|PSSession|PSSnapin|TypeData|Variable|WmiObject)|Rename-(?:Computer|Item|ItemProperty)|Reset-ComputerMachinePassword|Resolve-Path|Restart-(?:Computer|Service)|Restore-Computer|Resume-(?:Job|Service)|Save-Help|Select-(?:Object|String|Xml)|Send-MailMessage|Set-(?:Alias|Content|Date|Item|ItemProperty|Location|PSBreakpoint|PSDebug|PSSessionConfiguration|Service|StrictMode|TraceSource|Variable|WmiInstance)|Show-(?:Command|ControlPanelItem|EventLog)|Sort-Object|Split-Path|Start-(?:Job|Process|Service|Sleep|Transaction)|Stop-(?:Computer|Job|Process|Service)|Suspend-(?:Job|Service)|Tee-Object|Test-(?:ComputerSecureChannel|Connection|ModuleManifest|Path|PSSessionConfigurationFile)|Trace-Command|Unblock-File|Undo-Transaction|Unregister-(?:Event|PSSessionConfiguration)|Update-(?:FormatData|Help|List|TypeData)|Use-Transaction|Wait-(?:Event|Job|Process)|Where-Object|Write-(?:Debug|Error|EventLog|Host|Output|Progress|Verbose|Warning))\b/i,/\b(?:ac|cat|chdir|clc|cli|clp|clv|compare|copy|cp|cpi|cpp|cvpa|dbp|del|diff|dir|ebp|echo|epal|epcsv|epsn|erase|fc|fl|ft|fw|gal|gbp|gc|gci|gcs|gdr|gi|gl|gm|gp|gps|group|gsv|gu|gv|gwmi|iex|ii|ipal|ipcsv|ipsn|irm|iwmi|iwr|kill|lp|ls|measure|mi|mount|move|mp|mv|nal|ndr|ni|nv|ogv|popd|ps|pushd|pwd|rbp|rd|rdr|ren|ri|rm|rmdir|rni|rnp|rp|rv|rvpa|rwmi|sal|saps|sasv|sbp|sc|select|set|shcm|si|sl|sleep|sls|sort|sp|spps|spsv|start|sv|swmi|tee|trcm|type|write)\b/i],keyword:/\b(?:Begin|Break|Catch|Class|Continue|Data|Define|Do|DynamicParam|Else|ElseIf|End|Exit|Filter|Finally|For|ForEach|From|Function|If|InlineScript|Parallel|Param|Process|Return|Sequence|Switch|Throw|Trap|Try|Until|Using|Var|While|Workflow)\b/i,operator:{pattern:/(\W?)(?:!|-(eq|ne|gt|ge|lt|le|sh[lr]|not|b?(?:and|x?or)|(?:Not)?(?:Like|Match|Contains|In)|Replace|Join|is(?:Not)?|as)\b|-[-=]?|\+[+=]?|[*\/%]=?)/i,lookbehind:!0},punctuation:/[|{}[\];(),.]/},Prism.languages.powershell.string[0].inside.boolean=Prism.languages.powershell.boolean,Prism.languages.powershell.string[0].inside.variable=Prism.languages.powershell.variable,Prism.languages.powershell.string[0].inside.function.inside=Prism.languages.powershell; \ No newline at end of file +!function(e){var t=Prism.languages.powershell={comment:[{pattern:/(^|[^`])<#[\s\S]*?#>/,lookbehind:!0},{pattern:/(^|[^`])#.*/,lookbehind:!0}],string:[{pattern:/"(?:`[\s\S]|[^`"])*"/,greedy:!0,inside:{function:{pattern:/(^|[^`])\$\((?:\$\(.*?\)|(?!\$\()[^\r\n)])*\)/,lookbehind:!0,inside:{}}}},{pattern:/'(?:[^']|'')*'/,greedy:!0}],namespace:/\[[a-z](?:\[(?:\[[^\]]*]|[^\[\]])*]|[^\[\]])*]/i,boolean:/\$(?:true|false)\b/i,variable:/\$\w+\b/i,function:[/\b(?:Add-(?:Computer|Content|History|Member|PSSnapin|Type)|Checkpoint-Computer|Clear-(?:Content|EventLog|History|Item|ItemProperty|Variable)|Compare-Object|Complete-Transaction|Connect-PSSession|ConvertFrom-(?:Csv|Json|StringData)|Convert-Path|ConvertTo-(?:Csv|Html|Json|Xml)|Copy-(?:Item|ItemProperty)|Debug-Process|Disable-(?:ComputerRestore|PSBreakpoint|PSRemoting|PSSessionConfiguration)|Disconnect-PSSession|Enable-(?:ComputerRestore|PSBreakpoint|PSRemoting|PSSessionConfiguration)|Enter-PSSession|Exit-PSSession|Export-(?:Alias|Clixml|Console|Csv|FormatData|ModuleMember|PSSession)|ForEach-Object|Format-(?:Custom|List|Table|Wide)|Get-(?:Alias|ChildItem|Command|ComputerRestorePoint|Content|ControlPanelItem|Culture|Date|Event|EventLog|EventSubscriber|FormatData|Help|History|Host|HotFix|Item|ItemProperty|Job|Location|Member|Module|Process|PSBreakpoint|PSCallStack|PSDrive|PSProvider|PSSession|PSSessionConfiguration|PSSnapin|Random|Service|TraceSource|Transaction|TypeData|UICulture|Unique|Variable|WmiObject)|Group-Object|Import-(?:Alias|Clixml|Csv|LocalizedData|Module|PSSession)|Invoke-(?:Command|Expression|History|Item|RestMethod|WebRequest|WmiMethod)|Join-Path|Limit-EventLog|Measure-(?:Command|Object)|Move-(?:Item|ItemProperty)|New-(?:Alias|Event|EventLog|Item|ItemProperty|Module|ModuleManifest|Object|PSDrive|PSSession|PSSessionConfigurationFile|PSSessionOption|PSTransportOption|Service|TimeSpan|Variable|WebServiceProxy)|Out-(?:Default|File|GridView|Host|Null|Printer|String)|Pop-Location|Push-Location|Read-Host|Receive-(?:Job|PSSession)|Register-(?:EngineEvent|ObjectEvent|PSSessionConfiguration|WmiEvent)|Remove-(?:Computer|Event|EventLog|Item|ItemProperty|Job|Module|PSBreakpoint|PSDrive|PSSession|PSSnapin|TypeData|Variable|WmiObject)|Rename-(?:Computer|Item|ItemProperty)|Reset-ComputerMachinePassword|Resolve-Path|Restart-(?:Computer|Service)|Restore-Computer|Resume-(?:Job|Service)|Save-Help|Select-(?:Object|String|Xml)|Send-MailMessage|Set-(?:Alias|Content|Date|Item|ItemProperty|Location|PSBreakpoint|PSDebug|PSSessionConfiguration|Service|StrictMode|TraceSource|Variable|WmiInstance)|Show-(?:Command|ControlPanelItem|EventLog)|Sort-Object|Split-Path|Start-(?:Job|Process|Service|Sleep|Transaction)|Stop-(?:Computer|Job|Process|Service)|Suspend-(?:Job|Service)|Tee-Object|Test-(?:ComputerSecureChannel|Connection|ModuleManifest|Path|PSSessionConfigurationFile)|Trace-Command|Unblock-File|Undo-Transaction|Unregister-(?:Event|PSSessionConfiguration)|Update-(?:FormatData|Help|List|TypeData)|Use-Transaction|Wait-(?:Event|Job|Process)|Where-Object|Write-(?:Debug|Error|EventLog|Host|Output|Progress|Verbose|Warning))\b/i,/\b(?:ac|cat|chdir|clc|cli|clp|clv|compare|copy|cp|cpi|cpp|cvpa|dbp|del|diff|dir|ebp|echo|epal|epcsv|epsn|erase|fc|fl|ft|fw|gal|gbp|gc|gci|gcs|gdr|gi|gl|gm|gp|gps|group|gsv|gu|gv|gwmi|iex|ii|ipal|ipcsv|ipsn|irm|iwmi|iwr|kill|lp|ls|measure|mi|mount|move|mp|mv|nal|ndr|ni|nv|ogv|popd|ps|pushd|pwd|rbp|rd|rdr|ren|ri|rm|rmdir|rni|rnp|rp|rv|rvpa|rwmi|sal|saps|sasv|sbp|sc|select|set|shcm|si|sl|sleep|sls|sort|sp|spps|spsv|start|sv|swmi|tee|trcm|type|write)\b/i],keyword:/\b(?:Begin|Break|Catch|Class|Continue|Data|Define|Do|DynamicParam|Else|ElseIf|End|Exit|Filter|Finally|For|ForEach|From|Function|If|InlineScript|Parallel|Param|Process|Return|Sequence|Switch|Throw|Trap|Try|Until|Using|Var|While|Workflow)\b/i,operator:{pattern:/(\W?)(?:!|-(eq|ne|gt|ge|lt|le|sh[lr]|not|b?(?:and|x?or)|(?:Not)?(?:Like|Match|Contains|In)|Replace|Join|is(?:Not)?|as)\b|-[-=]?|\+[+=]?|[*\/%]=?)/i,lookbehind:!0},punctuation:/[|{}[\];(),.]/},o=t.string[0].inside;o.boolean=t.boolean,o.variable=t.variable,o.function.inside=t}(); \ No newline at end of file diff --git a/components/prism-textile.js b/components/prism-textile.js index 599ccd1c3b..c801995382 100644 --- a/components/prism-textile.js +++ b/components/prism-textile.js @@ -1,4 +1,4 @@ -(function(Prism) { +(function (Prism) { // We don't allow for pipes inside parentheses // to not break table pattern |(. foo |). bar | var modifierRegex = /(?:\([^|)]+\)|\[[^\]]+\]|\{[^}]+\})+/.source; @@ -24,7 +24,7 @@ }; - Prism.languages.textile = Prism.languages.extend('markup', { + var textile = Prism.languages.textile = Prism.languages.extend('markup', { 'phrase': { pattern: /(^|\r|\n)\S[\s\S]*?(?=$|\r?\n\r?\n|\r\r)/, lookbehind: true, @@ -220,38 +220,41 @@ pattern: /\b\((?:TM|R|C)\)/, alias: 'comment', inside: { - 'punctuation':/[()]/ + 'punctuation': /[()]/ } } } } }); + var phraseInside = textile['phrase'].inside; var nestedPatterns = { - 'inline': Prism.languages.textile['phrase'].inside['inline'], - 'link': Prism.languages.textile['phrase'].inside['link'], - 'image': Prism.languages.textile['phrase'].inside['image'], - 'footnote': Prism.languages.textile['phrase'].inside['footnote'], - 'acronym': Prism.languages.textile['phrase'].inside['acronym'], - 'mark': Prism.languages.textile['phrase'].inside['mark'] + 'inline': phraseInside['inline'], + 'link': phraseInside['link'], + 'image': phraseInside['image'], + 'footnote': phraseInside['footnote'], + 'acronym': phraseInside['acronym'], + 'mark': phraseInside['mark'] }; // Only allow alpha-numeric HTML tags, not XML tags - Prism.languages.textile.tag.pattern = /<\/?(?!\d)[a-z0-9]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s'">=]+))?)*\s*\/?>/i; + textile.tag.pattern = /<\/?(?!\d)[a-z0-9]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s'">=]+))?)*\s*\/?>/i; // Allow some nesting - Prism.languages.textile['phrase'].inside['inline'].inside['bold'].inside = nestedPatterns; - Prism.languages.textile['phrase'].inside['inline'].inside['italic'].inside = nestedPatterns; - Prism.languages.textile['phrase'].inside['inline'].inside['inserted'].inside = nestedPatterns; - Prism.languages.textile['phrase'].inside['inline'].inside['deleted'].inside = nestedPatterns; - Prism.languages.textile['phrase'].inside['inline'].inside['span'].inside = nestedPatterns; + var phraseInlineInside = phraseInside['inline'].inside; + phraseInlineInside['bold'].inside = nestedPatterns; + phraseInlineInside['italic'].inside = nestedPatterns; + phraseInlineInside['inserted'].inside = nestedPatterns; + phraseInlineInside['deleted'].inside = nestedPatterns; + phraseInlineInside['span'].inside = nestedPatterns; // Allow some styles inside table cells - Prism.languages.textile['phrase'].inside['table'].inside['inline'] = nestedPatterns['inline']; - Prism.languages.textile['phrase'].inside['table'].inside['link'] = nestedPatterns['link']; - Prism.languages.textile['phrase'].inside['table'].inside['image'] = nestedPatterns['image']; - Prism.languages.textile['phrase'].inside['table'].inside['footnote'] = nestedPatterns['footnote']; - Prism.languages.textile['phrase'].inside['table'].inside['acronym'] = nestedPatterns['acronym']; - Prism.languages.textile['phrase'].inside['table'].inside['mark'] = nestedPatterns['mark']; + var phraseTableInside = phraseInside['table'].inside; + phraseTableInside['inline'] = nestedPatterns['inline']; + phraseTableInside['link'] = nestedPatterns['link']; + phraseTableInside['image'] = nestedPatterns['image']; + phraseTableInside['footnote'] = nestedPatterns['footnote']; + phraseTableInside['acronym'] = nestedPatterns['acronym']; + phraseTableInside['mark'] = nestedPatterns['mark']; }(Prism)); diff --git a/components/prism-textile.min.js b/components/prism-textile.min.js index 5a023dfd5d..025150e245 100644 --- a/components/prism-textile.min.js +++ b/components/prism-textile.min.js @@ -1 +1 @@ -!function(e){var i="(?:\\([^|)]+\\)|\\[[^\\]]+\\]|\\{[^}]+\\})+",n={css:{pattern:/\{[^}]+\}/,inside:{rest:e.languages.css}},"class-id":{pattern:/(\()[^)]+(?=\))/,lookbehind:!0,alias:"attr-value"},lang:{pattern:/(\[)[^\]]+(?=\])/,lookbehind:!0,alias:"attr-value"},punctuation:/[\\\/]\d+|\S/};e.languages.textile=e.languages.extend("markup",{phrase:{pattern:/(^|\r|\n)\S[\s\S]*?(?=$|\r?\n\r?\n|\r\r)/,lookbehind:!0,inside:{"block-tag":{pattern:RegExp("^[a-z]\\w*(?:"+i+"|[<>=()])*\\."),inside:{modifier:{pattern:RegExp("(^[a-z]\\w*)(?:"+i+"|[<>=()])+(?=\\.)"),lookbehind:!0,inside:n},tag:/^[a-z]\w*/,punctuation:/\.$/}},list:{pattern:RegExp("^[*#]+(?:"+i+")?\\s+.+","m"),inside:{modifier:{pattern:RegExp("(^[*#]+)"+i),lookbehind:!0,inside:n},punctuation:/^[*#]+/}},table:{pattern:RegExp("^(?:(?:"+i+"|[<>=()^~])+\\.\\s*)?(?:\\|(?:(?:"+i+"|[<>=()^~_]|[\\\\/]\\d+)+\\.)?[^|]*)+\\|","m"),inside:{modifier:{pattern:RegExp("(^|\\|(?:\\r?\\n|\\r)?)(?:"+i+"|[<>=()^~_]|[\\\\/]\\d+)+(?=\\.)"),lookbehind:!0,inside:n},punctuation:/\||^\./}},inline:{pattern:RegExp("(\\*\\*|__|\\?\\?|[*_%@+\\-^~])(?:"+i+")?.+?\\1"),inside:{bold:{pattern:RegExp("(^(\\*\\*?)(?:"+i+")?).+?(?=\\2)"),lookbehind:!0},italic:{pattern:RegExp("(^(__?)(?:"+i+")?).+?(?=\\2)"),lookbehind:!0},cite:{pattern:RegExp("(^\\?\\?(?:"+i+")?).+?(?=\\?\\?)"),lookbehind:!0,alias:"string"},code:{pattern:RegExp("(^@(?:"+i+")?).+?(?=@)"),lookbehind:!0,alias:"keyword"},inserted:{pattern:RegExp("(^\\+(?:"+i+")?).+?(?=\\+)"),lookbehind:!0},deleted:{pattern:RegExp("(^-(?:"+i+")?).+?(?=-)"),lookbehind:!0},span:{pattern:RegExp("(^%(?:"+i+")?).+?(?=%)"),lookbehind:!0},modifier:{pattern:RegExp("(^\\*\\*|__|\\?\\?|[*_%@+\\-^~])"+i),lookbehind:!0,inside:n},punctuation:/[*_%?@+\-^~]+/}},"link-ref":{pattern:/^\[[^\]]+\]\S+$/m,inside:{string:{pattern:/(\[)[^\]]+(?=\])/,lookbehind:!0},url:{pattern:/(\])\S+$/,lookbehind:!0},punctuation:/[\[\]]/}},link:{pattern:RegExp('"(?:'+i+')?[^"]+":.+?(?=[^\\w/]?(?:\\s|$))'),inside:{text:{pattern:RegExp('(^"(?:'+i+')?)[^"]+(?=")'),lookbehind:!0},modifier:{pattern:RegExp('(^")'+i),lookbehind:!0,inside:n},url:{pattern:/(:).+/,lookbehind:!0},punctuation:/[":]/}},image:{pattern:RegExp("!(?:"+i+"|[<>=()])*[^!\\s()]+(?:\\([^)]+\\))?!(?::.+?(?=[^\\w/]?(?:\\s|$)))?"),inside:{source:{pattern:RegExp("(^!(?:"+i+"|[<>=()])*)[^!\\s()]+(?:\\([^)]+\\))?(?=!)"),lookbehind:!0,alias:"url"},modifier:{pattern:RegExp("(^!)(?:"+i+"|[<>=()])+"),lookbehind:!0,inside:n},url:{pattern:/(:).+/,lookbehind:!0},punctuation:/[!:]/}},footnote:{pattern:/\b\[\d+\]/,alias:"comment",inside:{punctuation:/\[|\]/}},acronym:{pattern:/\b[A-Z\d]+\([^)]+\)/,inside:{comment:{pattern:/(\()[^)]+(?=\))/,lookbehind:!0},punctuation:/[()]/}},mark:{pattern:/\b\((?:TM|R|C)\)/,alias:"comment",inside:{punctuation:/[()]/}}}}});var t={inline:e.languages.textile.phrase.inside.inline,link:e.languages.textile.phrase.inside.link,image:e.languages.textile.phrase.inside.image,footnote:e.languages.textile.phrase.inside.footnote,acronym:e.languages.textile.phrase.inside.acronym,mark:e.languages.textile.phrase.inside.mark};e.languages.textile.tag.pattern=/<\/?(?!\d)[a-z0-9]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s'">=]+))?)*\s*\/?>/i,e.languages.textile.phrase.inside.inline.inside.bold.inside=t,e.languages.textile.phrase.inside.inline.inside.italic.inside=t,e.languages.textile.phrase.inside.inline.inside.inserted.inside=t,e.languages.textile.phrase.inside.inline.inside.deleted.inside=t,e.languages.textile.phrase.inside.inline.inside.span.inside=t,e.languages.textile.phrase.inside.table.inside.inline=t.inline,e.languages.textile.phrase.inside.table.inside.link=t.link,e.languages.textile.phrase.inside.table.inside.image=t.image,e.languages.textile.phrase.inside.table.inside.footnote=t.footnote,e.languages.textile.phrase.inside.table.inside.acronym=t.acronym,e.languages.textile.phrase.inside.table.inside.mark=t.mark}(Prism); \ No newline at end of file +!function(e){var n="(?:\\([^|)]+\\)|\\[[^\\]]+\\]|\\{[^}]+\\})+",i={css:{pattern:/\{[^}]+\}/,inside:{rest:e.languages.css}},"class-id":{pattern:/(\()[^)]+(?=\))/,lookbehind:!0,alias:"attr-value"},lang:{pattern:/(\[)[^\]]+(?=\])/,lookbehind:!0,alias:"attr-value"},punctuation:/[\\\/]\d+|\S/},t=e.languages.textile=e.languages.extend("markup",{phrase:{pattern:/(^|\r|\n)\S[\s\S]*?(?=$|\r?\n\r?\n|\r\r)/,lookbehind:!0,inside:{"block-tag":{pattern:RegExp("^[a-z]\\w*(?:"+n+"|[<>=()])*\\."),inside:{modifier:{pattern:RegExp("(^[a-z]\\w*)(?:"+n+"|[<>=()])+(?=\\.)"),lookbehind:!0,inside:i},tag:/^[a-z]\w*/,punctuation:/\.$/}},list:{pattern:RegExp("^[*#]+(?:"+n+")?\\s+.+","m"),inside:{modifier:{pattern:RegExp("(^[*#]+)"+n),lookbehind:!0,inside:i},punctuation:/^[*#]+/}},table:{pattern:RegExp("^(?:(?:"+n+"|[<>=()^~])+\\.\\s*)?(?:\\|(?:(?:"+n+"|[<>=()^~_]|[\\\\/]\\d+)+\\.)?[^|]*)+\\|","m"),inside:{modifier:{pattern:RegExp("(^|\\|(?:\\r?\\n|\\r)?)(?:"+n+"|[<>=()^~_]|[\\\\/]\\d+)+(?=\\.)"),lookbehind:!0,inside:i},punctuation:/\||^\./}},inline:{pattern:RegExp("(\\*\\*|__|\\?\\?|[*_%@+\\-^~])(?:"+n+")?.+?\\1"),inside:{bold:{pattern:RegExp("(^(\\*\\*?)(?:"+n+")?).+?(?=\\2)"),lookbehind:!0},italic:{pattern:RegExp("(^(__?)(?:"+n+")?).+?(?=\\2)"),lookbehind:!0},cite:{pattern:RegExp("(^\\?\\?(?:"+n+")?).+?(?=\\?\\?)"),lookbehind:!0,alias:"string"},code:{pattern:RegExp("(^@(?:"+n+")?).+?(?=@)"),lookbehind:!0,alias:"keyword"},inserted:{pattern:RegExp("(^\\+(?:"+n+")?).+?(?=\\+)"),lookbehind:!0},deleted:{pattern:RegExp("(^-(?:"+n+")?).+?(?=-)"),lookbehind:!0},span:{pattern:RegExp("(^%(?:"+n+")?).+?(?=%)"),lookbehind:!0},modifier:{pattern:RegExp("(^\\*\\*|__|\\?\\?|[*_%@+\\-^~])"+n),lookbehind:!0,inside:i},punctuation:/[*_%?@+\-^~]+/}},"link-ref":{pattern:/^\[[^\]]+\]\S+$/m,inside:{string:{pattern:/(\[)[^\]]+(?=\])/,lookbehind:!0},url:{pattern:/(\])\S+$/,lookbehind:!0},punctuation:/[\[\]]/}},link:{pattern:RegExp('"(?:'+n+')?[^"]+":.+?(?=[^\\w/]?(?:\\s|$))'),inside:{text:{pattern:RegExp('(^"(?:'+n+')?)[^"]+(?=")'),lookbehind:!0},modifier:{pattern:RegExp('(^")'+n),lookbehind:!0,inside:i},url:{pattern:/(:).+/,lookbehind:!0},punctuation:/[":]/}},image:{pattern:RegExp("!(?:"+n+"|[<>=()])*[^!\\s()]+(?:\\([^)]+\\))?!(?::.+?(?=[^\\w/]?(?:\\s|$)))?"),inside:{source:{pattern:RegExp("(^!(?:"+n+"|[<>=()])*)[^!\\s()]+(?:\\([^)]+\\))?(?=!)"),lookbehind:!0,alias:"url"},modifier:{pattern:RegExp("(^!)(?:"+n+"|[<>=()])+"),lookbehind:!0,inside:i},url:{pattern:/(:).+/,lookbehind:!0},punctuation:/[!:]/}},footnote:{pattern:/\b\[\d+\]/,alias:"comment",inside:{punctuation:/\[|\]/}},acronym:{pattern:/\b[A-Z\d]+\([^)]+\)/,inside:{comment:{pattern:/(\()[^)]+(?=\))/,lookbehind:!0},punctuation:/[()]/}},mark:{pattern:/\b\((?:TM|R|C)\)/,alias:"comment",inside:{punctuation:/[()]/}}}}}),a=t.phrase.inside,o={inline:a.inline,link:a.link,image:a.image,footnote:a.footnote,acronym:a.acronym,mark:a.mark};t.tag.pattern=/<\/?(?!\d)[a-z0-9]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s'">=]+))?)*\s*\/?>/i;var r=a.inline.inside;r.bold.inside=o,r.italic.inside=o,r.inserted.inside=o,r.deleted.inside=o,r.span.inside=o;var d=a.table.inside;d.inline=o.inline,d.link=o.link,d.image=o.image,d.footnote=o.footnote,d.acronym=o.acronym,d.mark=o.mark}(Prism); \ No newline at end of file From 3100fa3178bf7cb48bb2b636dc72cad4c6014e73 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Mon, 11 Mar 2019 00:21:16 +0100 Subject: [PATCH 0218/1100] More persistent test page (#1529) The test page will now remember the language and code last tested. --- test.html | 57 ++++++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 52 insertions(+), 5 deletions(-) diff --git a/test.html b/test.html index dbe992f2e9..063a8ea172 100644 --- a/test.html +++ b/test.html @@ -138,6 +138,28 @@

    Test drive

    languages = components.languages, highlightCode = function() { Prism.highlightElement(code); }; + +function updateHashLanguage(lang) { + location.hash = lang ? 'language=' + lang : ''; +} +function getHashLanguage() { + var match = /[#&]language=([^&]+)/.exec(location.hash); + return match ? match[1] : null; +} +function getRadio(lang) { + return $('input[name=language][value="' + lang + '"]'); +} + +window.onhashchange = function () { + var input = getRadio(getHashLanguage()); + + if (input && !input.checked) { + input.checked = true; + input.onclick(); + } +} + + for (var id in languages) { if (id == 'meta') { continue; @@ -160,6 +182,7 @@

    Test drive

    var lang = this.value; code.className = 'language-' + lang; code.textContent = code.textContent; + updateHashLanguage(lang); // loadLanguage() returns a promise, so we use highlightCode() // as resolve callback. The promise will be immediately @@ -228,15 +251,39 @@

    Test drive

    var radios = $$('input[name=language]'); -radios[0].checked = true; -radios[0].onclick(); +var selectedRadio = radios[0]; + +var lastLanguageRadio = getRadio(getHashLanguage()); +if (lastLanguageRadio) { + selectedRadio = lastLanguageRadio; +} + +selectedRadio.checked = true; +selectedRadio.onclick(); var textarea = $('textarea', form); -(textarea.oninput = function() { - code.textContent = this.value || ''; +try { + var lastCode = sessionStorage.getItem('test-code'); + if (lastCode) { + textarea.value = lastCode; + } +} catch (e) { + // ignore sessionStorage errors +} + +textarea.oninput = function() { + var codeText = this.value || ''; + code.textContent = codeText; highlightCode(); -}).call(textarea); + + try { + sessionStorage.setItem('test-code', codeText); + } catch (error) { + // ignore sessionStorage errors + } +} +textarea.oninput(); $('#option-show-tokens').onchange = function () { var cls = 'show-tokens'; From 439ea1ee9abdb63fb90a1cb61bea5860488f80ae Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Mon, 11 Mar 2019 00:32:45 +0100 Subject: [PATCH 0219/1100] Added scripts directory (#1781) This adds a new `scripts` directory for all scripts used exclusively by the prismjs.com website. --- download.html | 10 +++--- examples.html | 10 +++--- extending.html | 6 ++-- faq.html | 36 +++++++++---------- index.html | 6 ++-- plugins/autolinker/index.html | 8 ++--- plugins/autoloader/index.html | 6 ++-- plugins/command-line/index.html | 8 ++--- plugins/copy-to-clipboard/index.html | 8 ++--- plugins/custom-class/index.html | 8 ++--- plugins/data-uri-highlight/index.html | 10 +++--- plugins/file-highlight/index.html | 18 +++++----- plugins/highlight-keywords/index.html | 6 ++-- plugins/index.html | 8 ++--- plugins/jsonp-highlight/index.html | 8 ++--- plugins/keep-markup/index.html | 8 ++--- plugins/line-highlight/index.html | 36 +++++++++---------- plugins/line-numbers/index.html | 8 ++--- plugins/normalize-whitespace/index.html | 6 ++-- plugins/previewers/index.html | 8 ++--- plugins/remove-initial-line-feed/index.html | 8 ++--- plugins/show-invisibles/index.html | 12 +++---- plugins/show-language/index.html | 8 ++--- plugins/toolbar/index.html | 6 ++-- plugins/unescaped-markup/index.html | 18 +++++----- plugins/wpd/index.html | 8 ++--- code.js => scripts/code.js | 0 download.js => scripts/download.js | 0 examples.js => scripts/examples.js | 0 .../prefixfree.min.js | 0 utopia.js => scripts/utopia.js | 0 {vendor => scripts/vendor}/FileSaver.min.js | 0 {vendor => scripts/vendor}/jszip.min.js | 0 {vendor => scripts/vendor}/promise.js | 0 test-suite.html | 6 ++-- test.html | 8 ++--- 36 files changed, 148 insertions(+), 148 deletions(-) rename code.js => scripts/code.js (100%) rename download.js => scripts/download.js (100%) rename examples.js => scripts/examples.js (100%) rename prefixfree.min.js => scripts/prefixfree.min.js (100%) rename utopia.js => scripts/utopia.js (100%) rename {vendor => scripts/vendor}/FileSaver.min.js (100%) rename {vendor => scripts/vendor}/jszip.min.js (100%) rename {vendor => scripts/vendor}/promise.js (100%) diff --git a/download.html b/download.html index 3c55072b1c..9b802edd7c 100644 --- a/download.html +++ b/download.html @@ -121,7 +121,7 @@ border-bottom-left-radius: 0; } - + @@ -169,12 +169,12 @@

    Customize your download

    + - - - - + + + diff --git a/examples.html b/examples.html index b7dce551ce..e60984c4d7 100644 --- a/examples.html +++ b/examples.html @@ -43,7 +43,7 @@ padding-left: 40px; } - + @@ -99,12 +99,12 @@

    Per language examples

    + - - - - + + + diff --git a/extending.html b/extending.html index 6abebd39bc..7b12a07b82 100644 --- a/extending.html +++ b/extending.html @@ -7,7 +7,7 @@ Extending Prism ▲ Prism - + @@ -240,10 +240,10 @@

    Returns

    + - - + diff --git a/faq.html b/faq.html index 8d5da68472..1e8d0f513e 100644 --- a/faq.html +++ b/faq.html @@ -16,7 +16,7 @@ color: black; } - + @@ -25,33 +25,33 @@
    - +

    FAQ

    Frequently Asked Questions, with a few Questions I want people to Frequently Ask.

    This page doesn’t work in Opera!

    - +

    Prism works fine in Opera. However, this page might sometimes appear to not be working in Opera, due to the theme switcher triggering an Opera bug. This will be fixed soon.

    Isn’t it bad to do syntax highlighting with regular expressions?

    - -

    It is true that to correctly handle every possible case of syntax found in the wild, one would need to write a full-blown parser. + +

    It is true that to correctly handle every possible case of syntax found in the wild, one would need to write a full-blown parser. However, in most web applications and websites a small error margin is usually acceptable and a rare highlighting failure is not the end of the world. A syntax highlighter based on regular expressions might only be accurate 99% of the time (the actual percentage is just a guess), but in exchange for the small error margin, it offers some very important benefits: - +

    • Smaller filesize. Proper parsers are very big.
    • -
    • Extensibility. Authors can define new languages simply by knowing how to code regular expressions. +
    • Extensibility. Authors can define new languages simply by knowing how to code regular expressions. Writing a correct, unambiguous BNF grammar is a task at least an order of magnitude harder.
    • Graceful error recovery. Parsers fail on incorrect syntax, where regular expressions keep matching.
    - +

    For this reason, most syntax highlighters on the web and on desktop, are powered by regular expressions. This includes the internal syntax highlighters used by popular native applications like Espresso and Sublime Text, at the time of writing. Of course, not every regex-powered syntax highlighter is created equal. The number and type of failures can be vastly different, depending on @@ -60,12 +60,12 @@

    Isn’t it bad to do syntax highlighting with regular expressions?

    Why is asynchronous highlighting disabled by default?

    - +

    Web Workers are good for preventing syntax highlighting of really large code blocks from blocking the main UI thread. In most cases, you will want to highlight reasonably sized chunks of code, and this will not be needed. Furthermore, using Web Workers is actually slower than synchronously highlighting, due to the overhead of creating and terminating the Worker. It just appears faster in these cases because it doesn’t block the main thread. - In addition, since Web Workers operate on files instead of objects, plugins that hook on core parts of Prism (e.g. modify language definitions) + In addition, since Web Workers operate on files instead of objects, plugins that hook on core parts of Prism (e.g. modify language definitions) will not work unless included in the same file (using the builder in the Download page will protect you from this pitfall). Lastly, Web Workers cannot interact with the DOM and most other APIs (e.g. the console), so they are notoriously hard to debug.

    @@ -73,14 +73,14 @@

    Why is asynchronous highlighting disabled by default?

    Why is pre-existing HTML stripped off?

    - -

    Because it would complicate the code a lot, although it’s not a crucial feature for most people. + +

    Because it would complicate the code a lot, although it’s not a crucial feature for most people. If it’s very important to you, you can use the Keep Markup plugin.

    If pre-existing HTML is stripped off, how can I highlight certain parts of the code?

    - +

    There is a number of ways around it. You can always break the block of code into multiple parts, and wrap the HTML around it (or just use a .highlight class). You can see an example of this in action at the “Basic usage” section of the homepage.

    Another way around the limitation is to use the Line Highlght plugin, to highlight and link to specific lines and/or line ranges. @@ -88,7 +88,7 @@

    If pre-existing HTML is stripped off, how can I highlight certain parts of t

    How do I know which tokens I can style for every language?

    - +

    Every token that is highlighted gets two classes: token and a class with the token type (e.g. comment). You can find the different types of tokens either by looking at the keys of the object defining the language or by running this snippet in the console:

    function printTokens(o, prefix) { for (var i in o) { console.log((prefix? prefix + ' > ' : '') + i); if (o[i].inside) printTokens(o[i].inside, (prefix? prefix + ' > ' : '') + i); } };
    @@ -135,7 +135,7 @@

    How do I know which tokens I can style for every language?

    How can I use different highlighting for tokens with the same name in different languages?

    -

    Just use a descendant selector, that includes the language class. The default prism.css does this, to have different colors for +

    Just use a descendant selector, that includes the language class. The default prism.css does this, to have different colors for JavaScript strings (which are very common) and CSS strings (which are relatively rare). Here’s that code, simplified to illustrate the technique:

    
     .token.string {
    @@ -159,8 +159,9 @@ 

    How can I use different highlighting for tokens with the same name in differ
    + - + - - + diff --git a/index.html b/index.html index c65de9d9bf..10f9fb7430 100644 --- a/index.html +++ b/index.html @@ -11,7 +11,7 @@ Prism - + @@ -261,10 +261,10 @@

    Credits

    + - - + + @@ -61,10 +61,10 @@

    HTML

    - + - + - \ No newline at end of file + diff --git a/plugins/autoloader/index.html b/plugins/autoloader/index.html index 3e5357e06b..dd7a55429f 100644 --- a/plugins/autoloader/index.html +++ b/plugins/autoloader/index.html @@ -22,7 +22,7 @@ content: ' [Generating... ' attr(data-progress) '%]'; } - + @@ -121,9 +121,9 @@

    Examples

    - + - + diff --git a/plugins/command-line/index.html b/plugins/command-line/index.html index 109138b671..9ab9dfb47e 100644 --- a/plugins/command-line/index.html +++ b/plugins/command-line/index.html @@ -9,7 +9,7 @@ - + @@ -101,11 +101,11 @@

    Windows PowerShell With Output

    - + - + - \ No newline at end of file + diff --git a/plugins/copy-to-clipboard/index.html b/plugins/copy-to-clipboard/index.html index c42a52620c..32056a0086 100644 --- a/plugins/copy-to-clipboard/index.html +++ b/plugins/copy-to-clipboard/index.html @@ -9,7 +9,7 @@ - + @@ -40,9 +40,9 @@

    How to use

    - + - + - \ No newline at end of file + diff --git a/plugins/custom-class/index.html b/plugins/custom-class/index.html index ee4fade718..1d5de4fa5d 100644 --- a/plugins/custom-class/index.html +++ b/plugins/custom-class/index.html @@ -8,7 +8,7 @@ - + @@ -18,7 +18,7 @@

    Custom Class

    -

    This plugin allows you to prefix Prism default classes (.comment will become .namespace--comment) or replace them with your defined ones (like .editor__comment or .comment_7sh3a).

    +

    This plugin allows you to prefix Prism default classes (.comment will become .namespace--comment) or replace them with your defined ones (like .editor__comment or .comment_7sh3a).

    @@ -125,9 +125,9 @@

    Todo

    - + - + diff --git a/plugins/data-uri-highlight/index.html b/plugins/data-uri-highlight/index.html index 380be2d67e..4b37d91a6c 100644 --- a/plugins/data-uri-highlight/index.html +++ b/plugins/data-uri-highlight/index.html @@ -9,7 +9,7 @@ - + @@ -31,7 +31,7 @@

    How to use

    Example

    - +
    div {
         border: 40px solid transparent;
         border-image: 33.334% url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="30" height="30"> \
    @@ -51,10 +51,10 @@ 

    Example

    - + - + - \ No newline at end of file + diff --git a/plugins/file-highlight/index.html b/plugins/file-highlight/index.html index e66b9897ee..f1a8b7fb0a 100644 --- a/plugins/file-highlight/index.html +++ b/plugins/file-highlight/index.html @@ -9,7 +9,7 @@ - + @@ -25,14 +25,14 @@

    File Highlight

    How to use

    - +

    Use the data-src attribute on empty <pre> elements, like so:

    - +
    <pre data-src="myfile.js"></pre>
    - +

    You don’t need to specify the language, it’s automatically determined by the file extension. If, however, the language cannot be determined from the file extension or the file extension is incorrect, you may specify a language as well (with the usual class name way).

    - +

    Please note that the files are fetched with XMLHttpRequest. This means that if the file is on a different origin, fetching it will fail, unless CORS is enabled on that website.

    @@ -48,7 +48,7 @@

    Examples

    The plugin’s JS code:

    
    -	
    +
     	

    This page:

    
     
    @@ -66,10 +66,10 @@ 

    Examples

    - + - + - \ No newline at end of file + diff --git a/plugins/highlight-keywords/index.html b/plugins/highlight-keywords/index.html index 466587346b..c18e319545 100644 --- a/plugins/highlight-keywords/index.html +++ b/plugins/highlight-keywords/index.html @@ -8,7 +8,7 @@ - + - + @@ -72,9 +72,9 @@

    Examples

    - + - + - \ No newline at end of file + diff --git a/plugins/line-highlight/index.html b/plugins/line-highlight/index.html index f3b58b4b41..4fc59d93f1 100644 --- a/plugins/line-highlight/index.html +++ b/plugins/line-highlight/index.html @@ -9,7 +9,7 @@ - + @@ -25,9 +25,9 @@

    Line highlight

    How to use

    - +

    Obviously, this only works on code blocks (<pre><code>) and not for inline code. - +

    You specify the lines to be highlighted through the data-line attribute on the <pre> element, in the following simple format:

    • A single number refers to the line with that number
    • @@ -35,44 +35,44 @@

      How to use

    • Multiple line numbers or ranges are separated by commas.
    • Whitespace is allowed anywhere and will be stripped off.
    - +

    Examples:

    5
    The 5th line
    - +
    1-5
    Lines 1 through 5
    - +
    1,4
    Line 1 and line 4
    - +
    1-2, 5, 9-20
    Lines 1 through 2, line 5, lines 9 through 20
    - +

    In case you want the line numbering to be offset by a certain number (for example, you want the 1st line to be number 41 instead of 1, which is an offset of 40), you can additionally use the data-line-offset attribute. - -

    You can also link to specific lines on any code snippet, by using the following as a url hash: #{element-id}.{lines} where + +

    You can also link to specific lines on any code snippet, by using the following as a url hash: #{element-id}.{lines} where {element-id} is the id of the <pre> element and {lines} is one or more lines or line ranges that follow the format outlined above. For example, if there is an element with id="play" on the page, you can link to lines 5-6 by linking to #play.5-6

    Examples

    - +

    Line 2

    
    -	
    +
     	

    Lines 15-25

    
    -	
    +
     	

    Line 1 and lines 3-4 and line 42

    
    -	
    +
     	

    Line 43, starting from line 41

    
    -	
    +
     	

    Linking example

    @@ -80,9 +80,9 @@

    Line 43, starting from line 41

    - + - + - \ No newline at end of file + diff --git a/plugins/line-numbers/index.html b/plugins/line-numbers/index.html index ac00d3c2d4..9091fa21f4 100644 --- a/plugins/line-numbers/index.html +++ b/plugins/line-numbers/index.html @@ -9,7 +9,7 @@ - + @@ -62,10 +62,10 @@

    Soft wrap support

    - + - + - \ No newline at end of file + diff --git a/plugins/normalize-whitespace/index.html b/plugins/normalize-whitespace/index.html index e1469de650..6cfa276aea 100644 --- a/plugins/normalize-whitespace/index.html +++ b/plugins/normalize-whitespace/index.html @@ -21,7 +21,7 @@ } - + @@ -172,9 +172,9 @@

    Examples

    - + - + diff --git a/plugins/previewers/index.html b/plugins/previewers/index.html index 55370a3314..d817d689c0 100644 --- a/plugins/previewers/index.html +++ b/plugins/previewers/index.html @@ -9,7 +9,7 @@ - + @@ -224,10 +224,10 @@

    new Prism.plugins.Previewer(type, updater, - + - + - \ No newline at end of file + diff --git a/plugins/remove-initial-line-feed/index.html b/plugins/remove-initial-line-feed/index.html index 8eb942fa67..c914a67768 100644 --- a/plugins/remove-initial-line-feed/index.html +++ b/plugins/remove-initial-line-feed/index.html @@ -8,7 +8,7 @@ - + @@ -50,10 +50,10 @@

    With the class added

    - + - + - \ No newline at end of file + diff --git a/plugins/show-invisibles/index.html b/plugins/show-invisibles/index.html index cb0ad436a4..2079998cd6 100644 --- a/plugins/show-invisibles/index.html +++ b/plugins/show-invisibles/index.html @@ -9,7 +9,7 @@ - + @@ -25,11 +25,11 @@

    Show Invisibles

    Examples

    - +
    
    -	
    +
     	
    
    -	
    +
     	
    
     
    @@ -37,9 +37,9 @@

    Examples

    - + - + diff --git a/plugins/show-language/index.html b/plugins/show-language/index.html index e79b1ccf9f..5118501946 100644 --- a/plugins/show-language/index.html +++ b/plugins/show-language/index.html @@ -9,7 +9,7 @@ - + @@ -45,10 +45,10 @@

    SVG

    - + - + - \ No newline at end of file + diff --git a/plugins/toolbar/index.html b/plugins/toolbar/index.html index 5d8d63a1e7..fd908038cc 100644 --- a/plugins/toolbar/index.html +++ b/plugins/toolbar/index.html @@ -9,7 +9,7 @@ - + @@ -95,7 +95,7 @@

    How to use

    - + - + diff --git a/plugins/unescaped-markup/index.html b/plugins/unescaped-markup/index.html index 442ef2aa9f..3568e1c049 100644 --- a/plugins/unescaped-markup/index.html +++ b/plugins/unescaped-markup/index.html @@ -10,7 +10,7 @@ - + @@ -57,7 +57,7 @@

    Examples

    - @@ -119,7 +119,7 @@

    FAQ

    - + @@ -161,9 +161,9 @@

    FAQ

    - + - + -->

    @@ -187,9 +187,9 @@

    FAQ

    - + - + diff --git a/plugins/wpd/index.html b/plugins/wpd/index.html index 9157a483f0..b0d4621dab 100644 --- a/plugins/wpd/index.html +++ b/plugins/wpd/index.html @@ -9,7 +9,7 @@ - + @@ -60,9 +60,9 @@

    SVG

    - + - + - \ No newline at end of file + diff --git a/code.js b/scripts/code.js similarity index 100% rename from code.js rename to scripts/code.js diff --git a/download.js b/scripts/download.js similarity index 100% rename from download.js rename to scripts/download.js diff --git a/examples.js b/scripts/examples.js similarity index 100% rename from examples.js rename to scripts/examples.js diff --git a/prefixfree.min.js b/scripts/prefixfree.min.js similarity index 100% rename from prefixfree.min.js rename to scripts/prefixfree.min.js diff --git a/utopia.js b/scripts/utopia.js similarity index 100% rename from utopia.js rename to scripts/utopia.js diff --git a/vendor/FileSaver.min.js b/scripts/vendor/FileSaver.min.js similarity index 100% rename from vendor/FileSaver.min.js rename to scripts/vendor/FileSaver.min.js diff --git a/vendor/jszip.min.js b/scripts/vendor/jszip.min.js similarity index 100% rename from vendor/jszip.min.js rename to scripts/vendor/jszip.min.js diff --git a/vendor/promise.js b/scripts/vendor/promise.js similarity index 100% rename from vendor/promise.js rename to scripts/vendor/promise.js diff --git a/test-suite.html b/test-suite.html index 936ed1aa68..97dd15e497 100644 --- a/test-suite.html +++ b/test-suite.html @@ -7,7 +7,7 @@ Running the test suite ▲ Prism - + @@ -159,11 +159,11 @@

    Internal structure

    + - - + diff --git a/test.html b/test.html index 063a8ea172..55afc53878 100644 --- a/test.html +++ b/test.html @@ -92,7 +92,7 @@ } - + @@ -126,11 +126,11 @@

    Test drive

    + - - - + + + diff --git a/scripts/download.js b/scripts/download.js index 9c56c891e6..7be6834b74 100644 --- a/scripts/download.js +++ b/scripts/download.js @@ -547,12 +547,20 @@ function generateCode(){ var versionComment = "/* PrismJS " + version + "\n" + redownloadUrl + " */"; for (var type in code) { - var codeElement = $('#download-' + type + ' code'); + (function (type) { + var text = versionComment + "\n" + code[type]; + var fileName = 'prism.' + type; - codeElement.textContent = versionComment + "\n" + code[type]; - Prism.highlightElement(codeElement, true); + var codeElement = $('#download-' + type + ' code'); - $('#download-' + type + ' .download-button').href = 'data:application/octet-stream;charset=utf-8,' + encodeURIComponent(versionComment + "\n" + code[type]); + codeElement.textContent = text; + Prism.highlightElement(codeElement, true); + + + $('#download-' + type + ' .download-button').onclick = function () { + saveAs(new Blob([text], { type: "application/octet-stream;charset=utf-8" }), fileName); + }; + })(type); } }); } From fd4c764f30a7277d93db15eeee565c8fc18de0d5 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Sun, 24 Mar 2019 18:43:31 +0100 Subject: [PATCH 0230/1100] Autoloader: Fixed the directory of scripts (#1828) This fixes some incorrect script paths. --- plugins/autoloader/index.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/autoloader/index.html b/plugins/autoloader/index.html index dd7a55429f..4889388222 100644 --- a/plugins/autoloader/index.html +++ b/plugins/autoloader/index.html @@ -125,9 +125,9 @@

    Examples

    - - - + + + diff --git a/plugins/custom-class/prism-custom-class.js b/plugins/custom-class/prism-custom-class.js index bb5bd6a6eb..3b5e6c129b 100644 --- a/plugins/custom-class/prism-custom-class.js +++ b/plugins/custom-class/prism-custom-class.js @@ -7,24 +7,61 @@ if ( return; } +/** + * @callback ClassMapper + * @param {string} className + * @param {string} language + * @returns {string} + */ +/** + * @typedef CustomClassOptions + * @property {ClassMapper} classMap + * @property {string} prefixString + */ + +/** @type {ClassMapper} */ +var defaultClassMap = function (className) { return className; }; + +/** @type {CustomClassOptions} */ var options = { - classMap: {} + classMap: defaultClassMap, + prefixString: '' }; + Prism.plugins.customClass = { - map: function map(cm) { - options.classMap = cm; + /** + * Maps all class names using the given object or map function. + * + * This does not affect the prefix. + * + * @param {Object | ClassMapper} classMap + */ + map: function map(classMap) { + if (typeof classMap === 'function') { + options.classMap = classMap; + } else { + options.classMap = function (className) { + return classMap[className] || className; + }; + } }, + /** + * Adds the given prefix to all class names. + * + * @param {string} string + */ prefix: function prefix(string) { options.prefixString = string; } } Prism.hooks.add('wrap', function (env) { - if (!options.classMap && !options.prefixString) { + if (options.classMap === defaultClassMap && !options.prefixString) { return; } - env.classes = env.classes.map(function(c) { - return (options.prefixString || '') + (options.classMap[c] || c); + + env.classes = env.classes.map(function (c) { + return options.prefixString + options.classMap(c, env.language); }); }); diff --git a/plugins/custom-class/prism-custom-class.min.js b/plugins/custom-class/prism-custom-class.min.js index eee4b3ef02..a087f0ef4b 100644 --- a/plugins/custom-class/prism-custom-class.min.js +++ b/plugins/custom-class/prism-custom-class.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof self&&self.Prism||"undefined"!=typeof global&&global.Prism){var i={classMap:{}};Prism.plugins.customClass={map:function(s){i.classMap=s},prefix:function(s){i.prefixString=s}},Prism.hooks.add("wrap",function(s){(i.classMap||i.prefixString)&&(s.classes=s.classes.map(function(s){return(i.prefixString||"")+(i.classMap[s]||s)}))})}}(); \ No newline at end of file +!function(){if("undefined"!=typeof self&&self.Prism||"undefined"!=typeof global&&global.Prism){var n=function(n){return n},s={classMap:n,prefixString:""};Prism.plugins.customClass={map:function(i){s.classMap="function"==typeof i?i:function(n){return i[n]||n}},prefix:function(n){s.prefixString=n}},Prism.hooks.add("wrap",function(i){(s.classMap!==n||s.prefixString)&&(i.classes=i.classes.map(function(n){return s.prefixString+s.classMap(n,i.language)}))})}}(); \ No newline at end of file From f8ae465d2a2c871afb4a8e5ec3bdced97a493b29 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Sun, 12 May 2019 14:07:58 +0200 Subject: [PATCH 0261/1100] JSONP Highlight: Fixed examples (#1877) This fixes an example on the JSONP Highlight page. --- plugins/jsonp-highlight/index.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/jsonp-highlight/index.html b/plugins/jsonp-highlight/index.html index 5214b01ce8..a9d1475f13 100644 --- a/plugins/jsonp-highlight/index.html +++ b/plugins/jsonp-highlight/index.html @@ -152,11 +152,11 @@

    Examples

    Bitbucket API:

    
     
    -	

    Custom adapter (JSON.stringify showing GitHub status):

    -
    
    +	

    Custom adapter (JSON.stringify showing the GitHub REST API for Prism's repository):

    +
    
     
     	

    Registered adapter (as above, but without explicitly declaring the data-adapter attribute):

    -
    
    +	
    
     
    From 74050c68d3ab7421e26154a63f248e514cb30e45 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Sun, 12 May 2019 14:10:17 +0200 Subject: [PATCH 0262/1100] CSS: Removed useless flag and modifier (#1875) This cleans up CSS' at-rule pattern. --- components/prism-css.js | 2 +- components/prism-css.min.js | 2 +- prism.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/components/prism-css.js b/components/prism-css.js index 7a44e1688f..149a1fb721 100644 --- a/components/prism-css.js +++ b/components/prism-css.js @@ -5,7 +5,7 @@ Prism.languages.css = { 'comment': /\/\*[\s\S]*?\*\//, 'atrule': { - pattern: /@[\w-]+?[\s\S]*?(?:;|(?=\s*\{))/i, + pattern: /@[\w-]+[\s\S]*?(?:;|(?=\s*\{))/, inside: { 'rule': /@[\w-]+/ // See rest below diff --git a/components/prism-css.min.js b/components/prism-css.min.js index 9c2efe072b..d4cecf41f9 100644 --- a/components/prism-css.min.js +++ b/components/prism-css.min.js @@ -1 +1 @@ -!function(s){var e=/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/;s.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:/@[\w-]+?[\s\S]*?(?:;|(?=\s*\{))/i,inside:{rule:/@[\w-]+/}},url:RegExp("url\\((?:"+e.source+"|.*?)\\)","i"),selector:RegExp("[^{}\\s](?:[^{};\"']|"+e.source+")*?(?=\\s*\\{)"),string:{pattern:e,greedy:!0},property:/[-_a-z\xA0-\uFFFF][-\w\xA0-\uFFFF]*(?=\s*:)/i,important:/!important\b/i,function:/[-a-z0-9]+(?=\()/i,punctuation:/[(){};:,]/},s.languages.css.atrule.inside.rest=s.languages.css;var a=s.languages.markup;a&&(a.tag.addInlined("style","css"),s.languages.insertBefore("inside","attr-value",{"style-attr":{pattern:/\s*style=("|')(?:\\[\s\S]|(?!\1)[^\\])*\1/i,inside:{"attr-name":{pattern:/^\s*style/i,inside:a.tag.inside},punctuation:/^\s*=\s*['"]|['"]\s*$/,"attr-value":{pattern:/.+/i,inside:s.languages.css}},alias:"language-css"}},a.tag))}(Prism); \ No newline at end of file +!function(s){var e=/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/;s.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:/@[\w-]+[\s\S]*?(?:;|(?=\s*\{))/,inside:{rule:/@[\w-]+/}},url:RegExp("url\\((?:"+e.source+"|.*?)\\)","i"),selector:RegExp("[^{}\\s](?:[^{};\"']|"+e.source+")*?(?=\\s*\\{)"),string:{pattern:e,greedy:!0},property:/[-_a-z\xA0-\uFFFF][-\w\xA0-\uFFFF]*(?=\s*:)/i,important:/!important\b/i,function:/[-a-z0-9]+(?=\()/i,punctuation:/[(){};:,]/},s.languages.css.atrule.inside.rest=s.languages.css;var a=s.languages.markup;a&&(a.tag.addInlined("style","css"),s.languages.insertBefore("inside","attr-value",{"style-attr":{pattern:/\s*style=("|')(?:\\[\s\S]|(?!\1)[^\\])*\1/i,inside:{"attr-name":{pattern:/^\s*style/i,inside:a.tag.inside},punctuation:/^\s*=\s*['"]|['"]\s*$/,"attr-value":{pattern:/.+/i,inside:s.languages.css}},alias:"language-css"}},a.tag))}(Prism); \ No newline at end of file diff --git a/prism.js b/prism.js index e856e494cc..fa4b418829 100644 --- a/prism.js +++ b/prism.js @@ -673,7 +673,7 @@ Prism.languages.svg = Prism.languages.markup; Prism.languages.css = { 'comment': /\/\*[\s\S]*?\*\//, 'atrule': { - pattern: /@[\w-]+?[\s\S]*?(?:;|(?=\s*\{))/i, + pattern: /@[\w-]+[\s\S]*?(?:;|(?=\s*\{))/, inside: { 'rule': /@[\w-]+/ // See rest below From 5e5a3e005c38dfd515b5d608260b786abe2ffff9 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Sun, 12 May 2019 14:14:03 +0200 Subject: [PATCH 0263/1100] CSS-Extras: Added `even` & `odd` keywords to `n-th` pattern (#1872) `even` and `odd` are keywords which are also an `n-th` value. This adds it to the pattern which previously only captured values of the form `an+b`. --- components/prism-css-extras.js | 20 ++++++++++++------- components/prism-css-extras.min.js | 2 +- .../selector_n-th_feature.test | 20 +++++++++++++++++++ 3 files changed, 34 insertions(+), 8 deletions(-) diff --git a/components/prism-css-extras.js b/components/prism-css-extras.js index 0ffad78c3b..e0c7ef297d 100644 --- a/components/prism-css-extras.js +++ b/components/prism-css-extras.js @@ -36,14 +36,20 @@ Prism.languages.css.selector = { 'operator': /[|~*^$]?=/ } }, - 'n-th': { - pattern: /(\(\s*)[+-]?\d*[\dn](?:\s*[+-]\s*\d+)?(?=\s*\))/, - lookbehind: true, - inside: { - 'number': /[\dn]+/, - 'operator': /[+-]/ + 'n-th': [ + { + pattern: /(\(\s*)[+-]?\d*[\dn](?:\s*[+-]\s*\d+)?(?=\s*\))/, + lookbehind: true, + inside: { + 'number': /[\dn]+/, + 'operator': /[+-]/ + } + }, + { + pattern: /(\(\s*)(?:even|odd)(?=\s*\))/i, + lookbehind: true } - }, + ], 'punctuation': /[()]/ } }; diff --git a/components/prism-css-extras.min.js b/components/prism-css-extras.min.js index d1cf1ee5f1..0576f5d6f0 100644 --- a/components/prism-css-extras.min.js +++ b/components/prism-css-extras.min.js @@ -1 +1 @@ -Prism.languages.css.selector={pattern:Prism.languages.css.selector,inside:{"pseudo-element":/:(?:after|before|first-letter|first-line|selection)|::[-\w]+/,"pseudo-class":/:[-\w]+/,class:/\.[-:.\w]+/,id:/#[-:.\w]+/,attribute:{pattern:/\[(?:[^[\]"']|("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1)*\]/,greedy:!0,inside:{punctuation:/^\[|\]$/,"case-sensitivity":{pattern:/(\s)[si]$/i,lookbehind:!0,alias:"keyword"},namespace:{pattern:/^(\s*)[-*\w\xA0-\uFFFF]*\|(?!=)/,lookbehind:!0,inside:{punctuation:/\|$/}},attribute:{pattern:/^(\s*)[-\w\xA0-\uFFFF]+/,lookbehind:!0},value:[/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,{pattern:/(=\s*)[-\w\xA0-\uFFFF]+(?=\s*$)/,lookbehind:!0}],operator:/[|~*^$]?=/}},"n-th":{pattern:/(\(\s*)[+-]?\d*[\dn](?:\s*[+-]\s*\d+)?(?=\s*\))/,lookbehind:!0,inside:{number:/[\dn]+/,operator:/[+-]/}},punctuation:/[()]/}},Prism.languages.insertBefore("css","property",{variable:{pattern:/(^|[^-\w\xA0-\uFFFF])--[-_a-z\xA0-\uFFFF][-\w\xA0-\uFFFF]*/i,lookbehind:!0}}),Prism.languages.insertBefore("css","function",{operator:{pattern:/(\s)[+\-*\/](?=\s)/,lookbehind:!0},hexcode:/#[\da-f]{3,8}/i,entity:/\\[\da-f]{1,8}/i,unit:{pattern:/(\d)(?:%|[a-z]+)/,lookbehind:!0},number:/-?[\d.]+/}); \ No newline at end of file +Prism.languages.css.selector={pattern:Prism.languages.css.selector,inside:{"pseudo-element":/:(?:after|before|first-letter|first-line|selection)|::[-\w]+/,"pseudo-class":/:[-\w]+/,class:/\.[-:.\w]+/,id:/#[-:.\w]+/,attribute:{pattern:/\[(?:[^[\]"']|("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1)*\]/,greedy:!0,inside:{punctuation:/^\[|\]$/,"case-sensitivity":{pattern:/(\s)[si]$/i,lookbehind:!0,alias:"keyword"},namespace:{pattern:/^(\s*)[-*\w\xA0-\uFFFF]*\|(?!=)/,lookbehind:!0,inside:{punctuation:/\|$/}},attribute:{pattern:/^(\s*)[-\w\xA0-\uFFFF]+/,lookbehind:!0},value:[/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,{pattern:/(=\s*)[-\w\xA0-\uFFFF]+(?=\s*$)/,lookbehind:!0}],operator:/[|~*^$]?=/}},"n-th":[{pattern:/(\(\s*)[+-]?\d*[\dn](?:\s*[+-]\s*\d+)?(?=\s*\))/,lookbehind:!0,inside:{number:/[\dn]+/,operator:/[+-]/}},{pattern:/(\(\s*)(?:even|odd)(?=\s*\))/i,lookbehind:!0}],punctuation:/[()]/}},Prism.languages.insertBefore("css","property",{variable:{pattern:/(^|[^-\w\xA0-\uFFFF])--[-_a-z\xA0-\uFFFF][-\w\xA0-\uFFFF]*/i,lookbehind:!0}}),Prism.languages.insertBefore("css","function",{operator:{pattern:/(\s)[+\-*\/](?=\s)/,lookbehind:!0},hexcode:/#[\da-f]{3,8}/i,entity:/\\[\da-f]{1,8}/i,unit:{pattern:/(\d)(?:%|[a-z]+)/,lookbehind:!0},number:/-?[\d.]+/}); \ No newline at end of file diff --git a/tests/languages/css!+css-extras/selector_n-th_feature.test b/tests/languages/css!+css-extras/selector_n-th_feature.test index 0e9dc7b6c2..64e5aa7bb5 100644 --- a/tests/languages/css!+css-extras/selector_n-th_feature.test +++ b/tests/languages/css!+css-extras/selector_n-th_feature.test @@ -2,6 +2,8 @@ :nth-child(+2n - 1) {} :nth-child(2n) {} :nth-child(+5) {} +:nth-child(even) {} +:nth-child(odd) {} ---------------------------------------------------- @@ -54,6 +56,24 @@ ["punctuation", ")"] ]], ["punctuation", "{"], + ["punctuation", "}"], + + ["selector", [ + ["pseudo-class", ":nth-child"], + ["punctuation", "("], + ["n-th", "even"], + ["punctuation", ")"] + ]], + ["punctuation", "{"], + ["punctuation", "}"], + + ["selector", [ + ["pseudo-class", ":nth-child"], + ["punctuation", "("], + ["n-th", "odd"], + ["punctuation", ")"] + ]], + ["punctuation", "{"], ["punctuation", "}"] ] From f0a10669acd07ddcd88eccef2675f488068c98e9 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Wed, 15 May 2019 13:41:05 +0200 Subject: [PATCH 0264/1100] CSS: Extended `url` inside (#1874) This extends the highlighting of the CSS `url` pattern adding highlighting for punctuation and the `url` function. --- components/prism-css.js | 8 +++++- components/prism-css.min.js | 2 +- prism.js | 8 +++++- tests/languages/css/atrule_feature.test | 9 ++++-- tests/languages/css/url_feature.test | 37 +++++++++++++++++++++---- 5 files changed, 53 insertions(+), 11 deletions(-) diff --git a/components/prism-css.js b/components/prism-css.js index 149a1fb721..77d049e7ba 100644 --- a/components/prism-css.js +++ b/components/prism-css.js @@ -11,7 +11,13 @@ // See rest below } }, - 'url': RegExp('url\\((?:' + string.source + '|.*?)\\)', 'i'), + 'url': { + pattern: RegExp('url\\((?:' + string.source + '|[^\n\r()]*)\\)', 'i'), + inside: { + 'function': /^url/i, + 'punctuation': /^\(|\)$/ + } + }, 'selector': RegExp('[^{}\\s](?:[^{};"\']|' + string.source + ')*?(?=\\s*\\{)'), 'string': { pattern: string, diff --git a/components/prism-css.min.js b/components/prism-css.min.js index d4cecf41f9..eb99ee4265 100644 --- a/components/prism-css.min.js +++ b/components/prism-css.min.js @@ -1 +1 @@ -!function(s){var e=/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/;s.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:/@[\w-]+[\s\S]*?(?:;|(?=\s*\{))/,inside:{rule:/@[\w-]+/}},url:RegExp("url\\((?:"+e.source+"|.*?)\\)","i"),selector:RegExp("[^{}\\s](?:[^{};\"']|"+e.source+")*?(?=\\s*\\{)"),string:{pattern:e,greedy:!0},property:/[-_a-z\xA0-\uFFFF][-\w\xA0-\uFFFF]*(?=\s*:)/i,important:/!important\b/i,function:/[-a-z0-9]+(?=\()/i,punctuation:/[(){};:,]/},s.languages.css.atrule.inside.rest=s.languages.css;var a=s.languages.markup;a&&(a.tag.addInlined("style","css"),s.languages.insertBefore("inside","attr-value",{"style-attr":{pattern:/\s*style=("|')(?:\\[\s\S]|(?!\1)[^\\])*\1/i,inside:{"attr-name":{pattern:/^\s*style/i,inside:a.tag.inside},punctuation:/^\s*=\s*['"]|['"]\s*$/,"attr-value":{pattern:/.+/i,inside:s.languages.css}},alias:"language-css"}},a.tag))}(Prism); \ No newline at end of file +!function(s){var t=/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/;s.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:/@[\w-]+[\s\S]*?(?:;|(?=\s*\{))/,inside:{rule:/@[\w-]+/}},url:{pattern:RegExp("url\\((?:"+t.source+"|[^\n\r()]*)\\)","i"),inside:{function:/^url/i,punctuation:/^\(|\)$/}},selector:RegExp("[^{}\\s](?:[^{};\"']|"+t.source+")*?(?=\\s*\\{)"),string:{pattern:t,greedy:!0},property:/[-_a-z\xA0-\uFFFF][-\w\xA0-\uFFFF]*(?=\s*:)/i,important:/!important\b/i,function:/[-a-z0-9]+(?=\()/i,punctuation:/[(){};:,]/},s.languages.css.atrule.inside.rest=s.languages.css;var e=s.languages.markup;e&&(e.tag.addInlined("style","css"),s.languages.insertBefore("inside","attr-value",{"style-attr":{pattern:/\s*style=("|')(?:\\[\s\S]|(?!\1)[^\\])*\1/i,inside:{"attr-name":{pattern:/^\s*style/i,inside:e.tag.inside},punctuation:/^\s*=\s*['"]|['"]\s*$/,"attr-value":{pattern:/.+/i,inside:s.languages.css}},alias:"language-css"}},e.tag))}(Prism); \ No newline at end of file diff --git a/prism.js b/prism.js index fa4b418829..ef74c24e92 100644 --- a/prism.js +++ b/prism.js @@ -679,7 +679,13 @@ Prism.languages.svg = Prism.languages.markup; // See rest below } }, - 'url': RegExp('url\\((?:' + string.source + '|.*?)\\)', 'i'), + 'url': { + pattern: RegExp('url\\((?:' + string.source + '|[^\n\r()]*)\\)', 'i'), + inside: { + 'function': /^url/i, + 'punctuation': /^\(|\)$/ + } + }, 'selector': RegExp('[^{}\\s](?:[^{};"\']|' + string.source + ')*?(?=\\s*\\{)'), 'string': { pattern: string, diff --git a/tests/languages/css/atrule_feature.test b/tests/languages/css/atrule_feature.test index 1bc84b0d97..2634bf3acc 100644 --- a/tests/languages/css/atrule_feature.test +++ b/tests/languages/css/atrule_feature.test @@ -10,7 +10,12 @@ [ ["atrule", [ ["rule", "@import"], - ["url", "url(foo.css)"], + ["url", [ + ["function", "url"], + ["punctuation", "("], + "foo.css", + ["punctuation", ")"] + ]], ["punctuation", ";"] ]], ["atrule", [ @@ -62,4 +67,4 @@ ---------------------------------------------------- Checks for at-rules. -Also checks for LESS variables. \ No newline at end of file +Also checks for LESS variables. diff --git a/tests/languages/css/url_feature.test b/tests/languages/css/url_feature.test index 05ce8f9f74..690ec4a707 100644 --- a/tests/languages/css/url_feature.test +++ b/tests/languages/css/url_feature.test @@ -9,13 +9,38 @@ bar.png") ---------------------------------------------------- [ - ["url", "url(foo.png)"], - ["url", "url('foo.png')"], - ["url", "url(\"foo.png\")"], - ["url", "url('foo\\\r\nbar.png')"], - ["url", "url(\"foo\\\r\nbar.png\")"] + ["url", [ + ["function", "url"], + ["punctuation", "("], + "foo.png", + ["punctuation", ")"] + ]], + ["url", [ + ["function", "url"], + ["punctuation", "("], + "'foo.png'", + ["punctuation", ")"] + ]], + ["url", [ + ["function", "url"], + ["punctuation", "("], + "\"foo.png\"", + ["punctuation", ")"] + ]], + ["url", [ + ["function", "url"], + ["punctuation", "("], + "'foo\\\r\nbar.png'", + ["punctuation", ")"] + ]], + ["url", [ + ["function", "url"], + ["punctuation", "("], + "\"foo\\\r\nbar.png\"", + ["punctuation", ")"] + ]] ] ---------------------------------------------------- -Checks for url(), unquoted, single-quoted and double-quoted. \ No newline at end of file +Checks for url(), unquoted, single-quoted and double-quoted. From 9604497909321170b20cf13a61a7496c58ba6698 Mon Sep 17 00:00:00 2001 From: RunDevelopment Date: Wed, 15 May 2019 21:06:59 +0200 Subject: [PATCH 0265/1100] Added shell session language --- components.js | 2 +- components.json | 5 +++ components/prism-bash.js | 2 +- components/prism-bash.min.js | 2 +- components/prism-shell-session.js | 21 ++++++++++++ components/prism-shell-session.min.js | 1 + examples/prism-shell-session.html | 10 ++++++ plugins/autoloader/prism-autoloader.js | 2 +- plugins/autoloader/prism-autoloader.min.js | 2 +- plugins/show-language/prism-show-language.js | 2 +- .../show-language/prism-show-language.min.js | 2 +- tests/languages/scss/atrule_feature.test | 4 +-- .../shell-session/command_feature.test | 31 ++++++++++++++++++ .../shell-session/command_string_feature.test | 32 +++++++++++++++++++ 14 files changed, 109 insertions(+), 9 deletions(-) create mode 100644 components/prism-shell-session.js create mode 100644 components/prism-shell-session.min.js create mode 100644 examples/prism-shell-session.html create mode 100644 tests/languages/shell-session/command_feature.test create mode 100644 tests/languages/shell-session/command_string_feature.test diff --git a/components.js b/components.js index 7ae94c3509..a35ab4a3f3 100644 --- a/components.js +++ b/components.js @@ -1,2 +1,2 @@ -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default","peerDependencies":"markup"},"clike":{"title":"C-like","option":"default","overrideExampleHeader":true},"javascript":{"title":"JavaScript","require":"clike","peerDependencies":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"Augmented Backus–Naur form","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","peerDependencies":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"Backus–Naur form","alias":"rbnf","aliasTitles":{"rbnf":"Routing Backus–Naur form"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":"dotnet","owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"Extended Backus–Naur form","owner":"RunDevelopment"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment"},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","peerDependencies":["css","coffeescript","erb","javascript","less","markdown","ruby","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"http":{"title":"HTTP","peerDependencies":["javascript","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"peerDependencies":["scala"],"owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","peerDependencies":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike"],"peerDependencies":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","peerDependencies":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","owner":"CupOfTea696"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","owner":"japborst"},"less":{"title":"Less","require":"css","owner":"Golmote"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","peerDependencies":["jsdoc"],"alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"nasm":{"title":"NASM","owner":"rbmj"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"cpp","peerDependencies":["c","cpp"],"overrideExampleHeader":true,"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"peerDependencies":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","peerDependencies":["c","cpp","fortran"],"owner":"Golmote"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"peerDependencies":["jsdoc","js-extras"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","peerDependencies":["actionscript","coffeescript","flow","javascript","typescript","vala"],"owner":"RunDevelopment"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sql":{"title":"SQL","owner":"multipetros"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","peerDependencies":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","alias":"ts","owner":"vkbansal"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","visual-basic"],"owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":"Line Highlight","line-numbers":{"title":"Line Numbers","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","after":["autolinker","data-uri-highlight"]},"autolinker":"Autolinker","wpd":"WebPlatform Docs","custom-class":{"title":"Custom Class","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","noCSS":true},"show-language":{"title":"Show Language","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","owner":"Golmote","noCSS":true},"previewers":{"title":"Previewers","owner":"Golmote"},"autoloader":{"title":"Autoloader","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","owner":"Golmote","after":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","owner":"chriswells0"},"unescaped-markup":"Unescaped Markup","normalize-whitespace":{"title":"Normalize Whitespace","owner":"zeitgeist87","after":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","owner":"mAAdhaTTah","require":"toolbar","noCSS":true}}}; +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default","peerDependencies":"markup"},"clike":{"title":"C-like","option":"default","overrideExampleHeader":true},"javascript":{"title":"JavaScript","require":"clike","peerDependencies":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"Augmented Backus–Naur form","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","peerDependencies":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"Backus–Naur form","alias":"rbnf","aliasTitles":{"rbnf":"Routing Backus–Naur form"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":"dotnet","owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"Extended Backus–Naur form","owner":"RunDevelopment"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment"},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","peerDependencies":["css","coffeescript","erb","javascript","less","markdown","ruby","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"http":{"title":"HTTP","peerDependencies":["javascript","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"peerDependencies":["scala"],"owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","peerDependencies":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike"],"peerDependencies":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","peerDependencies":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","owner":"CupOfTea696"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","owner":"japborst"},"less":{"title":"Less","require":"css","owner":"Golmote"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","peerDependencies":["jsdoc"],"alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"nasm":{"title":"NASM","owner":"rbmj"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"cpp","peerDependencies":["c","cpp"],"overrideExampleHeader":true,"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"peerDependencies":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","peerDependencies":["c","cpp","fortran"],"owner":"Golmote"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"peerDependencies":["jsdoc","js-extras"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","peerDependencies":["actionscript","coffeescript","flow","javascript","typescript","vala"],"owner":"RunDevelopment"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sql":{"title":"SQL","owner":"multipetros"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","peerDependencies":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","alias":"ts","owner":"vkbansal"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","visual-basic"],"owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":"Line Highlight","line-numbers":{"title":"Line Numbers","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","after":["autolinker","data-uri-highlight"]},"autolinker":"Autolinker","wpd":"WebPlatform Docs","custom-class":{"title":"Custom Class","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","noCSS":true},"show-language":{"title":"Show Language","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","owner":"Golmote","noCSS":true},"previewers":{"title":"Previewers","owner":"Golmote"},"autoloader":{"title":"Autoloader","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","owner":"Golmote","after":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","owner":"chriswells0"},"unescaped-markup":"Unescaped Markup","normalize-whitespace":{"title":"Normalize Whitespace","owner":"zeitgeist87","after":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","owner":"mAAdhaTTah","require":"toolbar","noCSS":true}}}; if (typeof module !== 'undefined' && module.exports) { module.exports = components; } \ No newline at end of file diff --git a/components.json b/components.json index 70f6ec8da0..bdf0fd3be9 100644 --- a/components.json +++ b/components.json @@ -795,6 +795,11 @@ "title": "Scheme", "owner": "bacchus123" }, + "shell-session": { + "title": "Shell session", + "require": "bash", + "owner": "RunDevelopment" + }, "smalltalk": { "title": "Smalltalk", "owner": "Golmote" diff --git a/components/prism-bash.js b/components/prism-bash.js index 534fbe6ac5..71f53b8aa8 100644 --- a/components/prism-bash.js +++ b/components/prism-bash.js @@ -43,7 +43,7 @@ 'string': [ //Support for Here-Documents https://en.wikipedia.org/wiki/Here_document { - pattern: /((?:^|[^<])<<\s*)["']?(\w+?)["']?\s*\r?\n(?:[\s\S])*?\r?\n\2/, + pattern: /((?:^|[^<])<<\s*)["']?(\w+?)["']?\s*(?:\r\n?|\n)(?:[\s\S])*?(?:\r\n?|\n)\2/, lookbehind: true, greedy: true, inside: insideString diff --git a/components/prism-bash.min.js b/components/prism-bash.min.js index bb6819656b..609a34b118 100644 --- a/components/prism-bash.min.js +++ b/components/prism-bash.min.js @@ -1 +1 @@ -!function(e){var a={variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--?|-=|\+\+?|\+=|!=?|~|\*\*?|\*=|\/=?|%=?|<<=?|>>=?|<=?|>=?|==?|&&?|&=|\^=?|\|\|?|\|=|\?|:/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\([^)]+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},/\$(?:[\w#?*!@]+|\{[^}]+\})/i]};e.languages.bash={shebang:{pattern:/^#!\s*\/bin\/bash|^#!\s*\/bin\/sh/,alias:"important"},comment:{pattern:/(^|[^"{\\])#.*/,lookbehind:!0},string:[{pattern:/((?:^|[^<])<<\s*)["']?(\w+?)["']?\s*\r?\n(?:[\s\S])*?\r?\n\2/,lookbehind:!0,greedy:!0,inside:a},{pattern:/(["'])(?:\\[\s\S]|\$\([^)]+\)|`[^`]+`|(?!\1)[^\\])*\1/,greedy:!0,inside:a}],variable:a.variable,function:{pattern:/(^|[\s;|&])(?:add|alias|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|builtin|bzip2|cal|cat|cd|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|comm|command|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|du|egrep|eject|enable|env|ethtool|eval|exec|expand|expect|export|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|getopts|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|hash|head|help|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|jobs|join|kill|killall|less|link|ln|locate|logname|logout|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|popd|pr|printcap|printenv|printf|ps|pushd|pv|pwd|quota|quotacheck|quotactl|ram|rar|rcp|read|readarray|readonly|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|shift|shopt|shutdown|sleep|slocate|sort|source|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|tail|tar|tee|test|time|timeout|times|top|touch|tr|traceroute|trap|tsort|tty|type|ulimit|umask|umount|unalias|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zip|zypper)(?=$|[\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&])(?:let|:|\.|if|then|else|elif|fi|for|break|continue|while|in|case|function|select|do|done|until|echo|exit|return|set|declare)(?=$|[\s;|&])/,lookbehind:!0},boolean:{pattern:/(^|[\s;|&])(?:true|false)(?=$|[\s;|&])/,lookbehind:!0},operator:/&&?|\|\|?|==?|!=?|<<>|<=?|>=?|=~/,punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];]/};var t=a.variable[1].inside;t.string=e.languages.bash.string,t.function=e.languages.bash.function,t.keyword=e.languages.bash.keyword,t.boolean=e.languages.bash.boolean,t.operator=e.languages.bash.operator,t.punctuation=e.languages.bash.punctuation,e.languages.shell=e.languages.bash}(Prism); \ No newline at end of file +!function(e){var a={variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--?|-=|\+\+?|\+=|!=?|~|\*\*?|\*=|\/=?|%=?|<<=?|>>=?|<=?|>=?|==?|&&?|&=|\^=?|\|\|?|\|=|\?|:/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\([^)]+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},/\$(?:[\w#?*!@]+|\{[^}]+\})/i]};e.languages.bash={shebang:{pattern:/^#!\s*\/bin\/bash|^#!\s*\/bin\/sh/,alias:"important"},comment:{pattern:/(^|[^"{\\])#.*/,lookbehind:!0},string:[{pattern:/((?:^|[^<])<<\s*)["']?(\w+?)["']?\s*(?:\r\n?|\n)(?:[\s\S])*?(?:\r\n?|\n)\2/,lookbehind:!0,greedy:!0,inside:a},{pattern:/(["'])(?:\\[\s\S]|\$\([^)]+\)|`[^`]+`|(?!\1)[^\\])*\1/,greedy:!0,inside:a}],variable:a.variable,function:{pattern:/(^|[\s;|&])(?:add|alias|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|builtin|bzip2|cal|cat|cd|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|comm|command|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|du|egrep|eject|enable|env|ethtool|eval|exec|expand|expect|export|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|getopts|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|hash|head|help|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|jobs|join|kill|killall|less|link|ln|locate|logname|logout|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|popd|pr|printcap|printenv|printf|ps|pushd|pv|pwd|quota|quotacheck|quotactl|ram|rar|rcp|read|readarray|readonly|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|shift|shopt|shutdown|sleep|slocate|sort|source|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|tail|tar|tee|test|time|timeout|times|top|touch|tr|traceroute|trap|tsort|tty|type|ulimit|umask|umount|unalias|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zip|zypper)(?=$|[\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&])(?:let|:|\.|if|then|else|elif|fi|for|break|continue|while|in|case|function|select|do|done|until|echo|exit|return|set|declare)(?=$|[\s;|&])/,lookbehind:!0},boolean:{pattern:/(^|[\s;|&])(?:true|false)(?=$|[\s;|&])/,lookbehind:!0},operator:/&&?|\|\|?|==?|!=?|<<>|<=?|>=?|=~/,punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];]/};var t=a.variable[1].inside;t.string=e.languages.bash.string,t.function=e.languages.bash.function,t.keyword=e.languages.bash.keyword,t.boolean=e.languages.bash.boolean,t.operator=e.languages.bash.operator,t.punctuation=e.languages.bash.punctuation,e.languages.shell=e.languages.bash}(Prism); \ No newline at end of file diff --git a/components/prism-shell-session.js b/components/prism-shell-session.js new file mode 100644 index 0000000000..d4a8a7c6e7 --- /dev/null +++ b/components/prism-shell-session.js @@ -0,0 +1,21 @@ +Prism.languages['shell-session'] = { + 'command': { + pattern: /\$(?:[^\r\n'"<]|(["'])(?:\\[\s\S]|\$\([^)]+\)|`[^`]+`|(?!\1)[^\\])*\1|((?:^|[^<])<<\s*)["']?(\w+?)["']?\s*(?:\r\n?|\n)(?:[\s\S])*?(?:\r\n?|\n)\3)+/, + inside: { + 'bash': { + pattern: /(\$\s*)[\s\S]+/, + lookbehind: true, + alias: 'language-bash', + inside: Prism.languages.bash + }, + 'sh': { + pattern: /^\$/, + alias: 'important' + } + } + }, + 'output': { + pattern: /.(?:.*(?:\r\n?|\n|.$))*/ + // output highlighting? + } +} diff --git a/components/prism-shell-session.min.js b/components/prism-shell-session.min.js new file mode 100644 index 0000000000..717dc6852b --- /dev/null +++ b/components/prism-shell-session.min.js @@ -0,0 +1 @@ +Prism.languages["shell-session"]={command:{pattern:/\$(?:[^\r\n'"<]|(["'])(?:\\[\s\S]|\$\([^)]+\)|`[^`]+`|(?!\1)[^\\])*\1|((?:^|[^<])<<\s*)["']?(\w+?)["']?\s*(?:\r\n?|\n)(?:[\s\S])*?(?:\r\n?|\n)\3)+/,inside:{bash:{pattern:/(\$\s*)[\s\S]+/,lookbehind:!0,alias:"language-bash",inside:Prism.languages.bash},sh:{pattern:/^\$/,alias:"important"}}},output:{pattern:/.(?:.*(?:\r\n?|\n|.$))*/}}; \ No newline at end of file diff --git a/examples/prism-shell-session.html b/examples/prism-shell-session.html new file mode 100644 index 0000000000..35501fe646 --- /dev/null +++ b/examples/prism-shell-session.html @@ -0,0 +1,10 @@ +

    Full example

    +
    $ git checkout master
    +Switched to branch 'master'
    +Your branch is up-to-date with 'origin/master'.
    +$ git push
    +Everything up-to-date
    +$ echo "Foo
    +> Bar"
    +Foo
    +Bar
    diff --git a/plugins/autoloader/prism-autoloader.js b/plugins/autoloader/prism-autoloader.js index 3d2b689eeb..000941abbf 100644 --- a/plugins/autoloader/prism-autoloader.js +++ b/plugins/autoloader/prism-autoloader.js @@ -4,7 +4,7 @@ } // The dependencies map is built automatically with gulp - var lang_dependencies = /*dependencies_placeholder[*/{"javascript":"clike","actionscript":"javascript","arduino":"cpp","aspnet":["markup","csharp"],"bison":"c","c":"clike","csharp":"clike","cpp":"c","coffeescript":"javascript","crystal":"ruby","css-extras":"css","d":"clike","dart":"clike","django":"markup-templating","ejs":["javascript","markup-templating"],"erb":["ruby","markup-templating"],"fsharp":"clike","flow":"javascript","glsl":"clike","gml":"clike","go":"clike","groovy":"clike","haml":"ruby","handlebars":"markup-templating","haxe":"clike","java":"clike","javadoc":["markup","java","javadoclike"],"jolie":"clike","jsdoc":["javascript","javadoclike"],"js-extras":"javascript","jsonp":"json","json5":"json","kotlin":"clike","less":"css","markdown":"markup","markup-templating":"markup","n4js":"javascript","nginx":"clike","objectivec":"c","opencl":"cpp","parser":"markup","php":["clike","markup-templating"],"phpdoc":["php","javadoclike"],"php-extras":"php","plsql":"sql","processing":"clike","protobuf":"clike","pug":["markup","javascript"],"qore":"clike","jsx":["markup","javascript"],"tsx":["jsx","typescript"],"reason":"clike","ruby":"clike","sass":"css","scss":"css","scala":"java","smarty":"markup-templating","soy":"markup-templating","swift":"clike","tap":"yaml","textile":"markup","tt2":["clike","markup-templating"],"twig":"markup","typescript":"javascript","t4-cs":["t4-templating","csharp"],"t4-vb":["t4-templating","visual-basic"],"vala":"clike","vbnet":"basic","velocity":"markup","wiki":"markup","xeora":"markup","xquery":"markup"}/*]*/; + var lang_dependencies = /*dependencies_placeholder[*/{"javascript":"clike","actionscript":"javascript","arduino":"cpp","aspnet":["markup","csharp"],"bison":"c","c":"clike","csharp":"clike","cpp":"c","coffeescript":"javascript","crystal":"ruby","css-extras":"css","d":"clike","dart":"clike","django":"markup-templating","ejs":["javascript","markup-templating"],"erb":["ruby","markup-templating"],"fsharp":"clike","flow":"javascript","glsl":"clike","gml":"clike","go":"clike","groovy":"clike","haml":"ruby","handlebars":"markup-templating","haxe":"clike","java":"clike","javadoc":["markup","java","javadoclike"],"jolie":"clike","jsdoc":["javascript","javadoclike"],"js-extras":"javascript","jsonp":"json","json5":"json","kotlin":"clike","less":"css","markdown":"markup","markup-templating":"markup","n4js":"javascript","nginx":"clike","objectivec":"c","opencl":"cpp","parser":"markup","php":["clike","markup-templating"],"phpdoc":["php","javadoclike"],"php-extras":"php","plsql":"sql","processing":"clike","protobuf":"clike","pug":["markup","javascript"],"qore":"clike","jsx":["markup","javascript"],"tsx":["jsx","typescript"],"reason":"clike","ruby":"clike","sass":"css","scss":"css","scala":"java","shell-session":"bash","smarty":"markup-templating","soy":"markup-templating","swift":"clike","tap":"yaml","textile":"markup","tt2":["clike","markup-templating"],"twig":"markup","typescript":"javascript","t4-cs":["t4-templating","csharp"],"t4-vb":["t4-templating","visual-basic"],"vala":"clike","vbnet":"basic","velocity":"markup","wiki":"markup","xeora":"markup","xquery":"markup"}/*]*/; var lang_aliases = /*aliases_placeholder[*/{"html":"markup","xml":"markup","svg":"markup","mathml":"markup","js":"javascript","adoc":"asciidoc","shell":"bash","rbnf":"bnf","dotnet":"csharp","coffee":"coffeescript","jinja2":"django","dockerfile":"docker","gamemakerlanguage":"gml","hs":"haskell","emacs":"lisp","elisp":"lisp","emacs-lisp":"lisp","md":"markdown","n4jsd":"n4js","objectpascal":"pascal","py":"python","rb":"ruby","ts":"typescript","t4":"t4-cs","vb":"visual-basic","xeoracube":"xeora","yml":"yaml"}/*]*/; diff --git a/plugins/autoloader/prism-autoloader.min.js b/plugins/autoloader/prism-autoloader.min.js index 830276b393..4155208663 100644 --- a/plugins/autoloader/prism-autoloader.min.js +++ b/plugins/autoloader/prism-autoloader.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof self&&self.Prism&&self.document&&document.createElement){var i={javascript:"clike",actionscript:"javascript",arduino:"cpp",aspnet:["markup","csharp"],bison:"c",c:"clike",csharp:"clike",cpp:"c",coffeescript:"javascript",crystal:"ruby","css-extras":"css",d:"clike",dart:"clike",django:"markup-templating",ejs:["javascript","markup-templating"],erb:["ruby","markup-templating"],fsharp:"clike",flow:"javascript",glsl:"clike",gml:"clike",go:"clike",groovy:"clike",haml:"ruby",handlebars:"markup-templating",haxe:"clike",java:"clike",javadoc:["markup","java","javadoclike"],jolie:"clike",jsdoc:["javascript","javadoclike"],"js-extras":"javascript",jsonp:"json",json5:"json",kotlin:"clike",less:"css",markdown:"markup","markup-templating":"markup",n4js:"javascript",nginx:"clike",objectivec:"c",opencl:"cpp",parser:"markup",php:["clike","markup-templating"],phpdoc:["php","javadoclike"],"php-extras":"php",plsql:"sql",processing:"clike",protobuf:"clike",pug:["markup","javascript"],qore:"clike",jsx:["markup","javascript"],tsx:["jsx","typescript"],reason:"clike",ruby:"clike",sass:"css",scss:"css",scala:"java",smarty:"markup-templating",soy:"markup-templating",swift:"clike",tap:"yaml",textile:"markup",tt2:["clike","markup-templating"],twig:"markup",typescript:"javascript","t4-cs":["t4-templating","csharp"],"t4-vb":["t4-templating","visual-basic"],vala:"clike",vbnet:"basic",velocity:"markup",wiki:"markup",xeora:"markup",xquery:"markup"},l={html:"markup",xml:"markup",svg:"markup",mathml:"markup",js:"javascript",adoc:"asciidoc",shell:"bash",rbnf:"bnf",dotnet:"csharp",coffee:"coffeescript",jinja2:"django",dockerfile:"docker",gamemakerlanguage:"gml",hs:"haskell",emacs:"lisp",elisp:"lisp","emacs-lisp":"lisp",md:"markdown",n4jsd:"n4js",objectpascal:"pascal",py:"python",rb:"ruby",ts:"typescript",t4:"t4-cs",vb:"visual-basic",xeoracube:"xeora",yml:"yaml"},n={},a=document.getElementsByTagName("script"),e="components/";if((a=a[a.length-1]).hasAttribute("data-autoloader-path")){var c=a.getAttribute("data-autoloader-path").trim();0 Bar' +$ echo "Foo +> Bar" + +---------------------------------------------------- + +[ + ["command", [ + ["sh", "$"], + ["bash", [ + ["keyword", "echo"], + ["string", [ + "'Foo\n> Bar'" + ]] + ]] + ]], + + ["command", [ + ["sh", "$"], + ["bash", [ + ["keyword", "echo"], + ["string", [ + "\"Foo\n> Bar\"" + ]] + ]] + ]] +] + +---------------------------------------------------- + +Checks for multi-line strings inside commands. From 6068bf18e53222a1ee712b073a9864413fefeef3 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Sat, 18 May 2019 17:57:47 +0200 Subject: [PATCH 0266/1100] JS: Added support for numeric separators (#1895) This adds support for JavaScript's new numeric separators. E.g. `123_456`. --- components/prism-javascript.js | 2 +- components/prism-javascript.min.js | 2 +- prism.js | 2 +- .../languages/javascript/number_feature.test | 21 ++++++++++++++++++- 4 files changed, 23 insertions(+), 4 deletions(-) diff --git a/components/prism-javascript.js b/components/prism-javascript.js index 3067395a99..9f19f34aad 100644 --- a/components/prism-javascript.js +++ b/components/prism-javascript.js @@ -16,7 +16,7 @@ Prism.languages.javascript = Prism.languages.extend('clike', { lookbehind: true }, ], - 'number': /\b(?:(?:0[xX][\dA-Fa-f]+|0[bB][01]+|0[oO][0-7]+)n?|\d+n|NaN|Infinity)\b|(?:\b\d+\.?\d*|\B\.\d+)(?:[Ee][+-]?\d+)?/, + 'number': /\b(?:(?:0[xX](?:[\dA-Fa-f](?:_[\dA-Fa-f])?)+|0[bB](?:[01](?:_[01])?)+|0[oO](?:[0-7](?:_[0-7])?)+)n?|(?:\d(?:_\d)?)+n|NaN|Infinity)\b|(?:\b(?:\d(?:_\d)?)+\.?(?:\d(?:_\d)?)*|\B\.(?:\d(?:_\d)?)+)(?:[Ee][+-]?(?:\d(?:_\d)?)+)?/, // Allow for all non-ASCII characters (See http://stackoverflow.com/a/2008444) 'function': /[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/, 'operator': /-[-=]?|\+[+=]?|!=?=?|<>?>?=?|=(?:==?|>)?|&[&=]?|\|[|=]?|\*\*?=?|\/=?|~|\^=?|%=?|\?|\.{3}/ diff --git a/components/prism-javascript.min.js b/components/prism-javascript.min.js index e252f361fd..f25037d382 100644 --- a/components/prism-javascript.min.js +++ b/components/prism-javascript.min.js @@ -1 +1 @@ -Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])[_$A-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\.(?:prototype|constructor))/,lookbehind:!0}],keyword:[{pattern:/((?:^|})\s*)(?:catch|finally)\b/,lookbehind:!0},{pattern:/(^|[^.])\b(?:as|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],number:/\b(?:(?:0[xX][\dA-Fa-f]+|0[bB][01]+|0[oO][0-7]+)n?|\d+n|NaN|Infinity)\b|(?:\b\d+\.?\d*|\B\.\d+)(?:[Ee][+-]?\d+)?/,function:/[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,operator:/-[-=]?|\+[+=]?|!=?=?|<>?>?=?|=(?:==?|>)?|&[&=]?|\|[|=]?|\*\*?=?|\/=?|~|\^=?|%=?|\?|\.{3}/}),Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/,Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s])\s*)\/(\[(?:[^\]\\\r\n]|\\.)*]|\\.|[^/\\\[\r\n])+\/[gimyus]{0,6}(?=\s*($|[\r\n,.;})\]]))/,lookbehind:!0,greedy:!0},"function-variable":{pattern:/[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)?\s*\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*=>)/i,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*\s*)\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),Prism.languages.insertBefore("javascript","string",{"template-string":{pattern:/`(?:\\[\s\S]|\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}|[^\\`])*`/,greedy:!0,inside:{interpolation:{pattern:/\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}/,inside:{"interpolation-punctuation":{pattern:/^\${|}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}}}),Prism.languages.markup&&Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.js=Prism.languages.javascript; \ No newline at end of file +Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])[_$A-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\.(?:prototype|constructor))/,lookbehind:!0}],keyword:[{pattern:/((?:^|})\s*)(?:catch|finally)\b/,lookbehind:!0},{pattern:/(^|[^.])\b(?:as|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],number:/\b(?:(?:0[xX](?:[\dA-Fa-f](?:_[\dA-Fa-f])?)+|0[bB](?:[01](?:_[01])?)+|0[oO](?:[0-7](?:_[0-7])?)+)n?|(?:\d(?:_\d)?)+n|NaN|Infinity)\b|(?:\b(?:\d(?:_\d)?)+\.?(?:\d(?:_\d)?)*|\B\.(?:\d(?:_\d)?)+)(?:[Ee][+-]?(?:\d(?:_\d)?)+)?/,function:/[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,operator:/-[-=]?|\+[+=]?|!=?=?|<>?>?=?|=(?:==?|>)?|&[&=]?|\|[|=]?|\*\*?=?|\/=?|~|\^=?|%=?|\?|\.{3}/}),Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/,Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s])\s*)\/(\[(?:[^\]\\\r\n]|\\.)*]|\\.|[^/\\\[\r\n])+\/[gimyus]{0,6}(?=\s*($|[\r\n,.;})\]]))/,lookbehind:!0,greedy:!0},"function-variable":{pattern:/[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)?\s*\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*=>)/i,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*\s*)\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),Prism.languages.insertBefore("javascript","string",{"template-string":{pattern:/`(?:\\[\s\S]|\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}|[^\\`])*`/,greedy:!0,inside:{interpolation:{pattern:/\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}/,inside:{"interpolation-punctuation":{pattern:/^\${|}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}}}),Prism.languages.markup&&Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.js=Prism.languages.javascript; \ No newline at end of file diff --git a/prism.js b/prism.js index ef74c24e92..38340f28e4 100644 --- a/prism.js +++ b/prism.js @@ -783,7 +783,7 @@ Prism.languages.javascript = Prism.languages.extend('clike', { lookbehind: true }, ], - 'number': /\b(?:(?:0[xX][\dA-Fa-f]+|0[bB][01]+|0[oO][0-7]+)n?|\d+n|NaN|Infinity)\b|(?:\b\d+\.?\d*|\B\.\d+)(?:[Ee][+-]?\d+)?/, + 'number': /\b(?:(?:0[xX](?:[\dA-Fa-f](?:_[\dA-Fa-f])?)+|0[bB](?:[01](?:_[01])?)+|0[oO](?:[0-7](?:_[0-7])?)+)n?|(?:\d(?:_\d)?)+n|NaN|Infinity)\b|(?:\b(?:\d(?:_\d)?)+\.?(?:\d(?:_\d)?)*|\B\.(?:\d(?:_\d)?)+)(?:[Ee][+-]?(?:\d(?:_\d)?)+)?/, // Allow for all non-ASCII characters (See http://stackoverflow.com/a/2008444) 'function': /[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/, 'operator': /-[-=]?|\+[+=]?|!=?=?|<>?>?=?|=(?:==?|>)?|&[&=]?|\|[|=]?|\*\*?=?|\/=?|~|\^=?|%=?|\?|\.{3}/ diff --git a/tests/languages/javascript/number_feature.test b/tests/languages/javascript/number_feature.test index 16f0e5fdf3..817a7b0d68 100644 --- a/tests/languages/javascript/number_feature.test +++ b/tests/languages/javascript/number_feature.test @@ -7,11 +7,22 @@ 0o571 0xbabe 0xBABE + NaN Infinity + 123n 0x123n +1_000_000_000_000 +1_000_000.220_720 +0b0101_0110_0011_1000 +0o12_34_56 +0x40_76_38_6A_73 +4_642_473_943_484_686_707n +0.000_001 +1e10_000 + ---------------------------------------------------- [ @@ -27,7 +38,15 @@ Infinity ["number", "NaN"], ["number", "Infinity"], ["number", "123n"], - ["number", "0x123n"] + ["number", "0x123n"], + ["number", "1_000_000_000_000"], + ["number", "1_000_000.220_720"], + ["number", "0b0101_0110_0011_1000"], + ["number", "0o12_34_56"], + ["number", "0x40_76_38_6A_73"], + ["number", "4_642_473_943_484_686_707n"], + ["number", "0.000_001"], + ["number", "1e10_000"] ] ---------------------------------------------------- From 03cf85b024244137776e05129d9072127cf4a2b6 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Sat, 18 May 2019 20:56:47 +0200 Subject: [PATCH 0267/1100] Added support for nested bold and italic tokens --- components/prism-markdown.js | 405 +++++++++--------- components/prism-markdown.min.js | 2 +- tests/languages/markdown/bold_feature.test | 73 ++-- tests/languages/markdown/italic_feature.test | 27 +- .../markdown/nested_bold_italic_feature.test | 162 +++++++ tests/languages/markdown/strike_feature.test | 57 ++- 6 files changed, 479 insertions(+), 247 deletions(-) create mode 100644 tests/languages/markdown/nested_bold_italic_feature.test diff --git a/components/prism-markdown.js b/components/prism-markdown.js index 18a5154cb1..bd5008a8d9 100644 --- a/components/prism-markdown.js +++ b/components/prism-markdown.js @@ -1,227 +1,250 @@ -Prism.languages.markdown = Prism.languages.extend('markup', {}); -Prism.languages.insertBefore('markdown', 'prolog', { - 'blockquote': { - // > ... - pattern: /^>(?:[\t ]*>)*/m, - alias: 'punctuation' - }, - 'code': [ - { - // Prefixed by 4 spaces or 1 tab - pattern: /^(?: {4}|\t).+/m, - alias: 'keyword' +(function (Prism) { + + // Allow only one line break + var inner = /\\.|[^\\\n\r_]|(?:\r?\n|\r)(?!\r?\n|\r)/.source; + + // both bold and italic allow one nested instance of the other + var bold_ = /__(?:|_(?:)+_)+__/.source.replace(//g, inner); + var italic_ = /_(?:|__(?:)+__)+_/.source.replace(//g, inner); + + Prism.languages.markdown = Prism.languages.extend('markup', {}); + Prism.languages.insertBefore('markdown', 'prolog', { + 'blockquote': { + // > ... + pattern: /^>(?:[\t ]*>)*/m, + alias: 'punctuation' }, - { - // `code` - // ``code`` - pattern: /``.+?``|`[^`\n]+`/, - alias: 'keyword' + 'code': [ + { + // Prefixed by 4 spaces or 1 tab + pattern: /^(?: {4}|\t).+/m, + alias: 'keyword' + }, + { + // `code` + // ``code`` + pattern: /``.+?``|`[^`\n]+`/, + alias: 'keyword' + }, + { + // ```optional language + // code block + // ``` + pattern: /^```[\s\S]*?^```$/m, + greedy: true, + inside: { + 'code-block': { + pattern: /^(```.*(?:\r?\n|\r))[\s\S]+?(?=(?:\r?\n|\r)^```$)/m, + lookbehind: true + }, + 'code-language': { + pattern: /^(```).+/, + lookbehind: true + }, + 'punctuation': /```/ + } + } + ], + 'title': [ + { + // title 1 + // ======= + + // title 2 + // ------- + pattern: /\S.*(?:\r?\n|\r)(?:==+|--+)/, + alias: 'important', + inside: { + punctuation: /==+$|--+$/ + } + }, + { + // # title 1 + // ###### title 6 + pattern: /(^\s*)#+.+/m, + lookbehind: true, + alias: 'important', + inside: { + punctuation: /^#+|#+$/ + } + } + ], + 'hr': { + // *** + // --- + // * * * + // ----------- + pattern: /(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m, + lookbehind: true, + alias: 'punctuation' }, - { - // ```optional language - // code block - // ``` - pattern: /^```[\s\S]*?^```$/m, - greedy: true, + 'list': { + // * item + // + item + // - item + // 1. item + pattern: /(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m, + lookbehind: true, + alias: 'punctuation' + }, + 'url-reference': { + // [id]: http://example.com "Optional title" + // [id]: http://example.com 'Optional title' + // [id]: http://example.com (Optional title) + // [id]: "Optional title" + pattern: /!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/, inside: { - 'code-block': { - pattern: /^(```.*(?:\r?\n|\r))[\s\S]+?(?=(?:\r?\n|\r)^```$)/m, + 'variable': { + pattern: /^(!?\[)[^\]]+/, lookbehind: true }, - 'code-language': { - pattern: /^(```).+/, - lookbehind: true + 'string': /(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/, + 'punctuation': /^[\[\]!:]|[<>]/ + }, + alias: 'url' + }, + 'bold': { + // **strong** + // __strong__ + + pattern: RegExp('((?:^|[^\\\\])(?:\\\\{2})*)(?:' + bold_ + '|' + bold_.replace(/_/g, '\\*') + ')'), + lookbehind: true, + greedy: true, + inside: { + 'content': { + pattern: /(^..)[\s\S]+(?=..$)/, + lookbehind: true, + inside: {} // see below }, - 'punctuation': /```/ + 'punctuation': /\*\*|__/ } - } - ], - 'title': [ - { - // title 1 - // ======= - - // title 2 - // ------- - pattern: /\S.*(?:\r?\n|\r)(?:==+|--+)/, - alias: 'important', + }, + 'italic': { + // *em* + // _em_ + + pattern: RegExp('((?:^|[^\\\\])(?:\\\\{2})*)(?:' + italic_ + '|' + italic_.replace(/_/g, '\\*') + ')'), + lookbehind: true, + greedy: true, inside: { - punctuation: /==+$|--+$/ + 'content': { + pattern: /(^.)[\s\S]+(?=.$)/, + lookbehind: true, + inside: {} // see below + }, + 'punctuation': /[*_]/ } }, - { - // # title 1 - // ###### title 6 - pattern: /(^\s*)#+.+/m, + 'strike': { + // ~~strike through~~ + // ~strike~ + + pattern: RegExp(/((?:^|[^\\])(?:\\{2})*)(~~?)(?:|_)+?\2/.source.replace(//g, inner)), lookbehind: true, - alias: 'important', + greedy: true, inside: { - punctuation: /^#+|#+$/ + 'content': { + pattern: /(^~~?)[\s\S]+(?=\1$)/, + lookbehind: true, + inside: {} // see below + }, + 'punctuation': /~~?/ } - } - ], - 'hr': { - // *** - // --- - // * * * - // ----------- - pattern: /(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m, - lookbehind: true, - alias: 'punctuation' - }, - 'list': { - // * item - // + item - // - item - // 1. item - pattern: /(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m, - lookbehind: true, - alias: 'punctuation' - }, - 'url-reference': { - // [id]: http://example.com "Optional title" - // [id]: http://example.com 'Optional title' - // [id]: http://example.com (Optional title) - // [id]: "Optional title" - pattern: /!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/, - inside: { - 'variable': { - pattern: /^(!?\[)[^\]]+/, - lookbehind: true - }, - 'string': /(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/, - 'punctuation': /^[\[\]!:]|[<>]/ }, - alias: 'url' - }, - 'bold': { - // **strong** - // __strong__ - - // Allow only one line break - pattern: /(^|[^\\])(\*\*|__)(?:(?:\r?\n|\r)(?!\r?\n|\r)|.)+?\2/, - lookbehind: true, - greedy: true, - inside: { - 'punctuation': /^\*\*|^__|\*\*$|__$/ - } - }, - 'italic': { - // *em* - // _em_ - - // Allow only one line break - pattern: /(^|[^\\])([*_])(?:(?:\r?\n|\r)(?!\r?\n|\r)|.)+?\2/, - lookbehind: true, - greedy: true, - inside: { - 'punctuation': /^[*_]|[*_]$/ - } - }, - 'strike': { - // ~~strike through~~ - // ~strike~ - - // Allow only one line break - pattern: /(^|[^\\])(~~?)(?:(?:\r?\n|\r)(?!\r?\n|\r)|.)+?\2/, - lookbehind: true, - greedy: true, - inside: { - 'punctuation': /^~~?|~~?$/ - } - }, - 'url': { - // [example](http://example.com "Optional title") - // [example] [id] - pattern: /!?\[[^\]]+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)| ?\[[^\]\n]*\])/, - inside: { - 'variable': { - pattern: /(!?\[)[^\]]+(?=\]$)/, - lookbehind: true - }, - 'string': { - pattern: /"(?:\\.|[^"\\])*"(?=\)$)/ + 'url': { + // [example](http://example.com "Optional title") + // [example] [id] + pattern: /!?\[[^\]]+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)| ?\[[^\]\n]*\])/, + inside: { + 'variable': { + pattern: /(!?\[)[^\]]+(?=\]$)/, + lookbehind: true + }, + 'string': { + pattern: /"(?:\\.|[^"\\])*"(?=\)$)/ + } } } - } -}); - -['bold', 'italic', 'strike'].forEach(function (token) { - ['url', 'bold', 'italic', 'strike'].forEach(function (inside) { - if (token !== inside) { - Prism.languages.markdown[token].inside[inside] = Prism.languages.markdown[inside]; - } }); -}); -Prism.hooks.add('after-tokenize', function (env) { - if (env.language !== 'markdown' && env.language !== 'md') { - return; - } + ['bold', 'italic', 'strike'].forEach(function (token) { + ['url', 'bold', 'italic', 'strike'].forEach(function (inside) { + if (token !== inside) { + Prism.languages.markdown[token].inside.content.inside[inside] = Prism.languages.markdown[inside]; + } + }); + }); - function walkTokens(tokens) { - if (!tokens || typeof tokens === 'string') { + Prism.hooks.add('after-tokenize', function (env) { + if (env.language !== 'markdown' && env.language !== 'md') { return; } - for (var i = 0, l = tokens.length; i < l; i++) { - var token = tokens[i]; - - if (token.type !== 'code') { - walkTokens(token.content); - continue; + function walkTokens(tokens) { + if (!tokens || typeof tokens === 'string') { + return; } - var codeLang = token.content[1]; - var codeBlock = token.content[3]; + for (var i = 0, l = tokens.length; i < l; i++) { + var token = tokens[i]; + + if (token.type !== 'code') { + walkTokens(token.content); + continue; + } + + var codeLang = token.content[1]; + var codeBlock = token.content[3]; - if (codeLang && codeBlock && - codeLang.type === 'code-language' && codeBlock.type === 'code-block' && - typeof codeLang.content === 'string') { + if (codeLang && codeBlock && + codeLang.type === 'code-language' && codeBlock.type === 'code-block' && + typeof codeLang.content === 'string') { - // this might be a language that Prism does not support - var alias = 'language-' + codeLang.content.trim().split(/\s+/)[0].toLowerCase(); + // this might be a language that Prism does not support + var alias = 'language-' + codeLang.content.trim().split(/\s+/)[0].toLowerCase(); - // add alias - if (!codeBlock.alias) { - codeBlock.alias = [alias]; - } else if (typeof codeBlock.alias === 'string') { - codeBlock.alias = [codeBlock.alias, alias]; - } else { - codeBlock.alias.push(alias); + // add alias + if (!codeBlock.alias) { + codeBlock.alias = [alias]; + } else if (typeof codeBlock.alias === 'string') { + codeBlock.alias = [codeBlock.alias, alias]; + } else { + codeBlock.alias.push(alias); + } } } } - } - - walkTokens(env.tokens); -}); - -Prism.hooks.add('wrap', function (env) { - if (env.type !== 'code-block') { - return; - } - - var codeLang = ''; - for (var i = 0, l = env.classes.length; i < l; i++) { - var cls = env.classes[i]; - var match = /language-(.+)/.exec(cls); - if (match) { - codeLang = match[1]; - break; + + walkTokens(env.tokens); + }); + + Prism.hooks.add('wrap', function (env) { + if (env.type !== 'code-block') { + return; } - } - var grammar = Prism.languages[codeLang]; + var codeLang = ''; + for (var i = 0, l = env.classes.length; i < l; i++) { + var cls = env.classes[i]; + var match = /language-(.+)/.exec(cls); + if (match) { + codeLang = match[1]; + break; + } + } - if (!grammar) { - return; - } + var grammar = Prism.languages[codeLang]; - // reverse Prism.util.encode - var code = env.content.replace(/</g, '<').replace(/&/g, '&'); + if (!grammar) { + return; + } + + // reverse Prism.util.encode + var code = env.content.replace(/</g, '<').replace(/&/g, '&'); + + env.content = Prism.highlight(code, grammar, codeLang); + }); - env.content = Prism.highlight(code, grammar, codeLang); -}); + Prism.languages.md = Prism.languages.markdown; -Prism.languages.md = Prism.languages.markdown; +}(Prism)); diff --git a/components/prism-markdown.min.js b/components/prism-markdown.min.js index b42f979300..95596fd6d8 100644 --- a/components/prism-markdown.min.js +++ b/components/prism-markdown.min.js @@ -1 +1 @@ -Prism.languages.markdown=Prism.languages.extend("markup",{}),Prism.languages.insertBefore("markdown","prolog",{blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},code:[{pattern:/^(?: {4}|\t).+/m,alias:"keyword"},{pattern:/``.+?``|`[^`\n]+`/,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\r?\n|\r))[\s\S]+?(?=(?:\r?\n|\r)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\r?\n|\r)(?:==+|--+)/,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#+.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:/(^|[^\\])(\*\*|__)(?:(?:\r?\n|\r)(?!\r?\n|\r)|.)+?\2/,lookbehind:!0,greedy:!0,inside:{punctuation:/^\*\*|^__|\*\*$|__$/}},italic:{pattern:/(^|[^\\])([*_])(?:(?:\r?\n|\r)(?!\r?\n|\r)|.)+?\2/,lookbehind:!0,greedy:!0,inside:{punctuation:/^[*_]|[*_]$/}},strike:{pattern:/(^|[^\\])(~~?)(?:(?:\r?\n|\r)(?!\r?\n|\r)|.)+?\2/,lookbehind:!0,greedy:!0,inside:{punctuation:/^~~?|~~?$/}},url:{pattern:/!?\[[^\]]+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)| ?\[[^\]\n]*\])/,inside:{variable:{pattern:/(!?\[)[^\]]+(?=\]$)/,lookbehind:!0},string:{pattern:/"(?:\\.|[^"\\])*"(?=\)$)/}}}}),["bold","italic","strike"].forEach(function(a){["url","bold","italic","strike"].forEach(function(n){a!==n&&(Prism.languages.markdown[a].inside[n]=Prism.languages.markdown[n])})}),Prism.hooks.add("after-tokenize",function(n){"markdown"!==n.language&&"md"!==n.language||!function n(a){if(a&&"string"!=typeof a)for(var t=0,e=a.length;t/g,n),t="_(?:|__(?:)+__)+_".replace(//g,n);s.languages.markdown=s.languages.extend("markup",{}),s.languages.insertBefore("markdown","prolog",{blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},code:[{pattern:/^(?: {4}|\t).+/m,alias:"keyword"},{pattern:/``.+?``|`[^`\n]+`/,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\r?\n|\r))[\s\S]+?(?=(?:\r?\n|\r)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\r?\n|\r)(?:==+|--+)/,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#+.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:RegExp("((?:^|[^\\\\])(?:\\\\{2})*)(?:"+e+"|"+e.replace(/_/g,"\\*")+")"),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:RegExp("((?:^|[^\\\\])(?:\\\\{2})*)(?:"+t+"|"+t.replace(/_/g,"\\*")+")"),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:RegExp("((?:^|[^\\\\])(?:\\\\{2})*)(~~?)(?:|_)+?\\2".replace(//g,n)),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},url:{pattern:/!?\[[^\]]+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)| ?\[[^\]\n]*\])/,inside:{variable:{pattern:/(!?\[)[^\]]+(?=\]$)/,lookbehind:!0},string:{pattern:/"(?:\\.|[^"\\])*"(?=\)$)/}}}}),["bold","italic","strike"].forEach(function(e){["url","bold","italic","strike"].forEach(function(n){e!==n&&(s.languages.markdown[e].inside.content.inside[n]=s.languages.markdown[n])})}),s.hooks.add("after-tokenize",function(n){"markdown"!==n.language&&"md"!==n.language||!function n(e){if(e&&"string"!=typeof e)for(var t=0,a=e.length;t Date: Tue, 28 May 2019 14:14:05 +0200 Subject: [PATCH 0268/1100] Added support for $$ equations --- components/prism-latex.js | 4 ++-- components/prism-latex.min.js | 2 +- tests/languages/latex/equation_feature.test | 13 ++++++++++++- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/components/prism-latex.js b/components/prism-latex.js index 695317325b..239be55623 100644 --- a/components/prism-latex.js +++ b/components/prism-latex.js @@ -15,12 +15,12 @@ lookbehind: true }, /* - * equations can be between $ $ or \( \) or \[ \] + * equations can be between $$ $$ or $ $ or \( \) or \[ \] * (all are multiline) */ 'equation': [ { - pattern: /\$(?:\\[\s\S]|[^\\$])*\$|\\\([\s\S]*?\\\)|\\\[[\s\S]*?\\\]/, + pattern: /\$\$(?:\\[\s\S]|[^\\$])+\$\$|\$(?:\\[\s\S]|[^\\$])+\$|\\\([\s\S]*?\\\)|\\\[[\s\S]*?\\\]/, inside: insideEqu, alias: 'string' }, diff --git a/components/prism-latex.min.js b/components/prism-latex.min.js index fa943e9f74..9cbc3ff477 100644 --- a/components/prism-latex.min.js +++ b/components/prism-latex.min.js @@ -1 +1 @@ -!function(a){var e=/\\(?:[^a-z()[\]]|[a-z*]+)/i,n={"equation-command":{pattern:e,alias:"regex"}};Prism.languages.latex={comment:/%.*/m,cdata:{pattern:/(\\begin\{((?:verbatim|lstlisting)\*?)\})[\s\S]*?(?=\\end\{\2\})/,lookbehind:!0},equation:[{pattern:/\$(?:\\[\s\S]|[^\\$])*\$|\\\([\s\S]*?\\\)|\\\[[\s\S]*?\\\]/,inside:n,alias:"string"},{pattern:/(\\begin\{((?:equation|math|eqnarray|align|multline|gather)\*?)\})[\s\S]*?(?=\\end\{\2\})/,lookbehind:!0,inside:n,alias:"string"}],keyword:{pattern:/(\\(?:begin|end|ref|cite|label|usepackage|documentclass)(?:\[[^\]]+\])?\{)[^}]+(?=\})/,lookbehind:!0},url:{pattern:/(\\url\{)[^}]+(?=\})/,lookbehind:!0},headline:{pattern:/(\\(?:part|chapter|section|subsection|frametitle|subsubsection|paragraph|subparagraph|subsubparagraph|subsubsubparagraph)\*?(?:\[[^\]]+\])?\{)[^}]+(?=\}(?:\[[^\]]+\])?)/,lookbehind:!0,alias:"class-name"},function:{pattern:e,alias:"selector"},punctuation:/[[\]{}&]/}}(); \ No newline at end of file +!function(a){var e=/\\(?:[^a-z()[\]]|[a-z*]+)/i,n={"equation-command":{pattern:e,alias:"regex"}};Prism.languages.latex={comment:/%.*/m,cdata:{pattern:/(\\begin\{((?:verbatim|lstlisting)\*?)\})[\s\S]*?(?=\\end\{\2\})/,lookbehind:!0},equation:[{pattern:/\$\$(?:\\[\s\S]|[^\\$])+\$\$|\$(?:\\[\s\S]|[^\\$])+\$|\\\([\s\S]*?\\\)|\\\[[\s\S]*?\\\]/,inside:n,alias:"string"},{pattern:/(\\begin\{((?:equation|math|eqnarray|align|multline|gather)\*?)\})[\s\S]*?(?=\\end\{\2\})/,lookbehind:!0,inside:n,alias:"string"}],keyword:{pattern:/(\\(?:begin|end|ref|cite|label|usepackage|documentclass)(?:\[[^\]]+\])?\{)[^}]+(?=\})/,lookbehind:!0},url:{pattern:/(\\url\{)[^}]+(?=\})/,lookbehind:!0},headline:{pattern:/(\\(?:part|chapter|section|subsection|frametitle|subsubsection|paragraph|subparagraph|subsubparagraph|subsubsubparagraph)\*?(?:\[[^\]]+\])?\{)[^}]+(?=\}(?:\[[^\]]+\])?)/,lookbehind:!0,alias:"class-name"},function:{pattern:e,alias:"selector"},punctuation:/[[\]{}&]/}}(); \ No newline at end of file diff --git a/tests/languages/latex/equation_feature.test b/tests/languages/latex/equation_feature.test index 40caeebe89..60191b3f20 100644 --- a/tests/languages/latex/equation_feature.test +++ b/tests/languages/latex/equation_feature.test @@ -1,6 +1,9 @@ $foo$ $a \dots b$ +$$foo$$ +$$a \dots +b$$ \(foo\) \(a \dots b\) @@ -36,6 +39,14 @@ b\end{gather} ["equation-command", "\\dots"], "\r\nb$" ]], + ["equation", [ + "$$foo$$" + ]], + ["equation", [ + "$$a ", + ["equation-command", "\\dots"], + "\r\nb$$" + ]], ["equation", ["\\(foo\\)"]], ["equation", [ "\\(a ", @@ -118,4 +129,4 @@ b\end{gather} ---------------------------------------------------- -Checks for equations. \ No newline at end of file +Checks for equations. From 3de29e725cee53a082713452f65ace14d46e9866 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Tue, 28 May 2019 14:23:02 +0200 Subject: [PATCH 0269/1100] C++: Fixed C++ number pattern (#1887) --- components/prism-cpp.js | 8 +++- components/prism-cpp.min.js | 2 +- tests/languages/cpp/number_feature.test | 64 +++++++++++++++++++++++++ 3 files changed, 71 insertions(+), 3 deletions(-) create mode 100644 tests/languages/cpp/number_feature.test diff --git a/components/prism-cpp.js b/components/prism-cpp.js index ba709be38e..412d65e444 100644 --- a/components/prism-cpp.js +++ b/components/prism-cpp.js @@ -4,8 +4,12 @@ Prism.languages.cpp = Prism.languages.extend('c', { lookbehind: true }, 'keyword': /\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|class|compl|const|constexpr|const_cast|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|float|for|friend|goto|if|inline|int|int8_t|int16_t|int32_t|int64_t|uint8_t|uint16_t|uint32_t|uint64_t|long|mutable|namespace|new|noexcept|nullptr|operator|private|protected|public|register|reinterpret_cast|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/, - 'boolean': /\b(?:true|false)\b/, - 'operator': />>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/ + 'number': { + pattern: /(?:\b0b[01']+|\b0x(?:[\da-f']+\.?[\da-f']*|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+\.?[\d']*|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]*/i, + greedy: true + }, + 'operator': />>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/, + 'boolean': /\b(?:true|false)\b/ }); Prism.languages.insertBefore('cpp', 'string', { diff --git a/components/prism-cpp.min.js b/components/prism-cpp.min.js index ddd3bda895..6e8c5dd6eb 100644 --- a/components/prism-cpp.min.js +++ b/components/prism-cpp.min.js @@ -1 +1 @@ -Prism.languages.cpp=Prism.languages.extend("c",{"class-name":{pattern:/(\b(?:class|enum|struct)\s+)\w+/,lookbehind:!0},keyword:/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|class|compl|const|constexpr|const_cast|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|float|for|friend|goto|if|inline|int|int8_t|int16_t|int32_t|int64_t|uint8_t|uint16_t|uint32_t|uint64_t|long|mutable|namespace|new|noexcept|nullptr|operator|private|protected|public|register|reinterpret_cast|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,boolean:/\b(?:true|false)\b/,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/}),Prism.languages.insertBefore("cpp","string",{"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}); \ No newline at end of file +Prism.languages.cpp=Prism.languages.extend("c",{"class-name":{pattern:/(\b(?:class|enum|struct)\s+)\w+/,lookbehind:!0},keyword:/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|class|compl|const|constexpr|const_cast|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|float|for|friend|goto|if|inline|int|int8_t|int16_t|int32_t|int64_t|uint8_t|uint16_t|uint32_t|uint64_t|long|mutable|namespace|new|noexcept|nullptr|operator|private|protected|public|register|reinterpret_cast|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+\.?[\da-f']*|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+\.?[\d']*|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]*/i,greedy:!0},operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:true|false)\b/}),Prism.languages.insertBefore("cpp","string",{"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}); \ No newline at end of file diff --git a/tests/languages/cpp/number_feature.test b/tests/languages/cpp/number_feature.test new file mode 100644 index 0000000000..47d15d9a61 --- /dev/null +++ b/tests/languages/cpp/number_feature.test @@ -0,0 +1,64 @@ +42 +3.14159 +4e10 +2.1e-10 +0.4e+2 +0xbabe +0xBABE +0x1.2 +0x0.3p-3 +0x0.3p4L +42f +42F +42u +42U +42l +42L +0b0101 +0B0101 + +18446744073709550592ull +18'446'744'073'709'550'592llu +1844'6744'0737'0955'0592uLL +184467'440737'0'95505'92LLU +1'048'576 +0x10'0000 +0'004'000'000 +1.602'176'565e-19 +0b010'01010 + +---------------------------------------------------- + +[ + ["number", "42"], + ["number", "3.14159"], + ["number", "4e10"], + ["number", "2.1e-10"], + ["number", "0.4e+2"], + ["number", "0xbabe"], + ["number", "0xBABE"], + ["number", "0x1.2"], + ["number", "0x0.3p-3"], + ["number", "0x0.3p4L"], + ["number", "42f"], + ["number", "42F"], + ["number", "42u"], + ["number", "42U"], + ["number", "42l"], + ["number", "42L"], + ["number", "0b0101"], + ["number", "0B0101"], + ["number", "18446744073709550592ull"], + ["number", "18'446'744'073'709'550'592llu"], + ["number", "1844'6744'0737'0955'0592uLL"], + ["number", "184467'440737'0'95505'92LLU"], + ["number", "1'048'576"], + ["number", "0x10'0000"], + ["number", "0'004'000'000"], + ["number", "1.602'176'565e-19"], + ["number", "0b010'01010"] +] + +---------------------------------------------------- + +Checks for binary, decimal, and hexadecimal numbers. From 5ad58a75f118d6b1e5f5a33515512817802de177 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Tue, 28 May 2019 18:25:04 +0200 Subject: [PATCH 0270/1100] LaTeX: Added TeX and ConTeXt alias (#1915) Added TeX and ConTeXt alias. Some minor formatting. --- components.js | 2 +- components.json | 5 +++++ components/prism-latex.js | 21 +++++++++++-------- components/prism-latex.min.js | 2 +- plugins/autoloader/prism-autoloader.js | 2 +- plugins/autoloader/prism-autoloader.min.js | 2 +- plugins/show-language/prism-show-language.js | 2 +- .../show-language/prism-show-language.min.js | 2 +- 8 files changed, 23 insertions(+), 15 deletions(-) diff --git a/components.js b/components.js index 7ae94c3509..5d1aa11200 100644 --- a/components.js +++ b/components.js @@ -1,2 +1,2 @@ -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default","peerDependencies":"markup"},"clike":{"title":"C-like","option":"default","overrideExampleHeader":true},"javascript":{"title":"JavaScript","require":"clike","peerDependencies":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"Augmented Backus–Naur form","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","peerDependencies":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"Backus–Naur form","alias":"rbnf","aliasTitles":{"rbnf":"Routing Backus–Naur form"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":"dotnet","owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"Extended Backus–Naur form","owner":"RunDevelopment"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment"},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","peerDependencies":["css","coffeescript","erb","javascript","less","markdown","ruby","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"http":{"title":"HTTP","peerDependencies":["javascript","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"peerDependencies":["scala"],"owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","peerDependencies":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike"],"peerDependencies":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","peerDependencies":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","owner":"CupOfTea696"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","owner":"japborst"},"less":{"title":"Less","require":"css","owner":"Golmote"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","peerDependencies":["jsdoc"],"alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"nasm":{"title":"NASM","owner":"rbmj"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"cpp","peerDependencies":["c","cpp"],"overrideExampleHeader":true,"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"peerDependencies":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","peerDependencies":["c","cpp","fortran"],"owner":"Golmote"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"peerDependencies":["jsdoc","js-extras"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","peerDependencies":["actionscript","coffeescript","flow","javascript","typescript","vala"],"owner":"RunDevelopment"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sql":{"title":"SQL","owner":"multipetros"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","peerDependencies":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","alias":"ts","owner":"vkbansal"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","visual-basic"],"owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":"Line Highlight","line-numbers":{"title":"Line Numbers","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","after":["autolinker","data-uri-highlight"]},"autolinker":"Autolinker","wpd":"WebPlatform Docs","custom-class":{"title":"Custom Class","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","noCSS":true},"show-language":{"title":"Show Language","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","owner":"Golmote","noCSS":true},"previewers":{"title":"Previewers","owner":"Golmote"},"autoloader":{"title":"Autoloader","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","owner":"Golmote","after":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","owner":"chriswells0"},"unescaped-markup":"Unescaped Markup","normalize-whitespace":{"title":"Normalize Whitespace","owner":"zeitgeist87","after":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","owner":"mAAdhaTTah","require":"toolbar","noCSS":true}}}; +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default","peerDependencies":"markup"},"clike":{"title":"C-like","option":"default","overrideExampleHeader":true},"javascript":{"title":"JavaScript","require":"clike","peerDependencies":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"Augmented Backus–Naur form","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","peerDependencies":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"Backus–Naur form","alias":"rbnf","aliasTitles":{"rbnf":"Routing Backus–Naur form"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":"dotnet","owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"Extended Backus–Naur form","owner":"RunDevelopment"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment"},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","peerDependencies":["css","coffeescript","erb","javascript","less","markdown","ruby","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"http":{"title":"HTTP","peerDependencies":["javascript","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"peerDependencies":["scala"],"owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","peerDependencies":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike"],"peerDependencies":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","peerDependencies":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","owner":"CupOfTea696"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"less":{"title":"Less","require":"css","owner":"Golmote"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","peerDependencies":["jsdoc"],"alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"nasm":{"title":"NASM","owner":"rbmj"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"cpp","peerDependencies":["c","cpp"],"overrideExampleHeader":true,"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"peerDependencies":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","peerDependencies":["c","cpp","fortran"],"owner":"Golmote"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"peerDependencies":["jsdoc","js-extras"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","peerDependencies":["actionscript","coffeescript","flow","javascript","typescript","vala"],"owner":"RunDevelopment"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sql":{"title":"SQL","owner":"multipetros"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","peerDependencies":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","alias":"ts","owner":"vkbansal"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","visual-basic"],"owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":"Line Highlight","line-numbers":{"title":"Line Numbers","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","after":["autolinker","data-uri-highlight"]},"autolinker":"Autolinker","wpd":"WebPlatform Docs","custom-class":{"title":"Custom Class","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","noCSS":true},"show-language":{"title":"Show Language","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","owner":"Golmote","noCSS":true},"previewers":{"title":"Previewers","owner":"Golmote"},"autoloader":{"title":"Autoloader","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","owner":"Golmote","after":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","owner":"chriswells0"},"unescaped-markup":"Unescaped Markup","normalize-whitespace":{"title":"Normalize Whitespace","owner":"zeitgeist87","after":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","owner":"mAAdhaTTah","require":"toolbar","noCSS":true}}}; if (typeof module !== 'undefined' && module.exports) { module.exports = components; } \ No newline at end of file diff --git a/components.json b/components.json index 70f6ec8da0..7c21f9ebcd 100644 --- a/components.json +++ b/components.json @@ -486,6 +486,11 @@ }, "latex": { "title": "LaTeX", + "alias": ["tex", "context"], + "aliasTitles": { + "tex": "TeX", + "context": "ConTeXt" + }, "owner": "japborst" }, "less": { diff --git a/components/prism-latex.js b/components/prism-latex.js index 695317325b..4ccbd72298 100644 --- a/components/prism-latex.js +++ b/components/prism-latex.js @@ -1,16 +1,16 @@ -(function(Prism) { - var funcPattern = /\\(?:[^a-z()[\]]|[a-z*]+)/i, - insideEqu = { - 'equation-command': { - pattern: funcPattern, - alias: 'regex' - } - }; +(function (Prism) { + var funcPattern = /\\(?:[^a-z()[\]]|[a-z*]+)/i; + var insideEqu = { + 'equation-command': { + pattern: funcPattern, + alias: 'regex' + } + }; Prism.languages.latex = { 'comment': /%.*/m, // the verbatim environment prints whitespace to the document - 'cdata': { + 'cdata': { pattern: /(\\begin\{((?:verbatim|lstlisting)\*?)\})[\s\S]*?(?=\\end\{\2\})/, lookbehind: true }, @@ -58,4 +58,7 @@ }, 'punctuation': /[[\]{}&]/ }; + + Prism.languages.tex = Prism.languages.latex; + Prism.languages.context = Prism.languages.latex; })(Prism); diff --git a/components/prism-latex.min.js b/components/prism-latex.min.js index fa943e9f74..bab30c2e91 100644 --- a/components/prism-latex.min.js +++ b/components/prism-latex.min.js @@ -1 +1 @@ -!function(a){var e=/\\(?:[^a-z()[\]]|[a-z*]+)/i,n={"equation-command":{pattern:e,alias:"regex"}};Prism.languages.latex={comment:/%.*/m,cdata:{pattern:/(\\begin\{((?:verbatim|lstlisting)\*?)\})[\s\S]*?(?=\\end\{\2\})/,lookbehind:!0},equation:[{pattern:/\$(?:\\[\s\S]|[^\\$])*\$|\\\([\s\S]*?\\\)|\\\[[\s\S]*?\\\]/,inside:n,alias:"string"},{pattern:/(\\begin\{((?:equation|math|eqnarray|align|multline|gather)\*?)\})[\s\S]*?(?=\\end\{\2\})/,lookbehind:!0,inside:n,alias:"string"}],keyword:{pattern:/(\\(?:begin|end|ref|cite|label|usepackage|documentclass)(?:\[[^\]]+\])?\{)[^}]+(?=\})/,lookbehind:!0},url:{pattern:/(\\url\{)[^}]+(?=\})/,lookbehind:!0},headline:{pattern:/(\\(?:part|chapter|section|subsection|frametitle|subsubsection|paragraph|subparagraph|subsubparagraph|subsubsubparagraph)\*?(?:\[[^\]]+\])?\{)[^}]+(?=\}(?:\[[^\]]+\])?)/,lookbehind:!0,alias:"class-name"},function:{pattern:e,alias:"selector"},punctuation:/[[\]{}&]/}}(); \ No newline at end of file +!function(a){var e=/\\(?:[^a-z()[\]]|[a-z*]+)/i,n={"equation-command":{pattern:e,alias:"regex"}};a.languages.latex={comment:/%.*/m,cdata:{pattern:/(\\begin\{((?:verbatim|lstlisting)\*?)\})[\s\S]*?(?=\\end\{\2\})/,lookbehind:!0},equation:[{pattern:/\$(?:\\[\s\S]|[^\\$])*\$|\\\([\s\S]*?\\\)|\\\[[\s\S]*?\\\]/,inside:n,alias:"string"},{pattern:/(\\begin\{((?:equation|math|eqnarray|align|multline|gather)\*?)\})[\s\S]*?(?=\\end\{\2\})/,lookbehind:!0,inside:n,alias:"string"}],keyword:{pattern:/(\\(?:begin|end|ref|cite|label|usepackage|documentclass)(?:\[[^\]]+\])?\{)[^}]+(?=\})/,lookbehind:!0},url:{pattern:/(\\url\{)[^}]+(?=\})/,lookbehind:!0},headline:{pattern:/(\\(?:part|chapter|section|subsection|frametitle|subsubsection|paragraph|subparagraph|subsubparagraph|subsubsubparagraph)\*?(?:\[[^\]]+\])?\{)[^}]+(?=\}(?:\[[^\]]+\])?)/,lookbehind:!0,alias:"class-name"},function:{pattern:e,alias:"selector"},punctuation:/[[\]{}&]/},a.languages.tex=a.languages.latex,a.languages.context=a.languages.latex}(Prism); \ No newline at end of file diff --git a/plugins/autoloader/prism-autoloader.js b/plugins/autoloader/prism-autoloader.js index 3d2b689eeb..034eeadc8f 100644 --- a/plugins/autoloader/prism-autoloader.js +++ b/plugins/autoloader/prism-autoloader.js @@ -6,7 +6,7 @@ // The dependencies map is built automatically with gulp var lang_dependencies = /*dependencies_placeholder[*/{"javascript":"clike","actionscript":"javascript","arduino":"cpp","aspnet":["markup","csharp"],"bison":"c","c":"clike","csharp":"clike","cpp":"c","coffeescript":"javascript","crystal":"ruby","css-extras":"css","d":"clike","dart":"clike","django":"markup-templating","ejs":["javascript","markup-templating"],"erb":["ruby","markup-templating"],"fsharp":"clike","flow":"javascript","glsl":"clike","gml":"clike","go":"clike","groovy":"clike","haml":"ruby","handlebars":"markup-templating","haxe":"clike","java":"clike","javadoc":["markup","java","javadoclike"],"jolie":"clike","jsdoc":["javascript","javadoclike"],"js-extras":"javascript","jsonp":"json","json5":"json","kotlin":"clike","less":"css","markdown":"markup","markup-templating":"markup","n4js":"javascript","nginx":"clike","objectivec":"c","opencl":"cpp","parser":"markup","php":["clike","markup-templating"],"phpdoc":["php","javadoclike"],"php-extras":"php","plsql":"sql","processing":"clike","protobuf":"clike","pug":["markup","javascript"],"qore":"clike","jsx":["markup","javascript"],"tsx":["jsx","typescript"],"reason":"clike","ruby":"clike","sass":"css","scss":"css","scala":"java","smarty":"markup-templating","soy":"markup-templating","swift":"clike","tap":"yaml","textile":"markup","tt2":["clike","markup-templating"],"twig":"markup","typescript":"javascript","t4-cs":["t4-templating","csharp"],"t4-vb":["t4-templating","visual-basic"],"vala":"clike","vbnet":"basic","velocity":"markup","wiki":"markup","xeora":"markup","xquery":"markup"}/*]*/; - var lang_aliases = /*aliases_placeholder[*/{"html":"markup","xml":"markup","svg":"markup","mathml":"markup","js":"javascript","adoc":"asciidoc","shell":"bash","rbnf":"bnf","dotnet":"csharp","coffee":"coffeescript","jinja2":"django","dockerfile":"docker","gamemakerlanguage":"gml","hs":"haskell","emacs":"lisp","elisp":"lisp","emacs-lisp":"lisp","md":"markdown","n4jsd":"n4js","objectpascal":"pascal","py":"python","rb":"ruby","ts":"typescript","t4":"t4-cs","vb":"visual-basic","xeoracube":"xeora","yml":"yaml"}/*]*/; + var lang_aliases = /*aliases_placeholder[*/{"html":"markup","xml":"markup","svg":"markup","mathml":"markup","js":"javascript","adoc":"asciidoc","shell":"bash","rbnf":"bnf","dotnet":"csharp","coffee":"coffeescript","jinja2":"django","dockerfile":"docker","gamemakerlanguage":"gml","hs":"haskell","tex":"latex","context":"latex","emacs":"lisp","elisp":"lisp","emacs-lisp":"lisp","md":"markdown","n4jsd":"n4js","objectpascal":"pascal","py":"python","rb":"ruby","ts":"typescript","t4":"t4-cs","vb":"visual-basic","xeoracube":"xeora","yml":"yaml"}/*]*/; var lang_data = {}; diff --git a/plugins/autoloader/prism-autoloader.min.js b/plugins/autoloader/prism-autoloader.min.js index 830276b393..c13f55ee7f 100644 --- a/plugins/autoloader/prism-autoloader.min.js +++ b/plugins/autoloader/prism-autoloader.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof self&&self.Prism&&self.document&&document.createElement){var i={javascript:"clike",actionscript:"javascript",arduino:"cpp",aspnet:["markup","csharp"],bison:"c",c:"clike",csharp:"clike",cpp:"c",coffeescript:"javascript",crystal:"ruby","css-extras":"css",d:"clike",dart:"clike",django:"markup-templating",ejs:["javascript","markup-templating"],erb:["ruby","markup-templating"],fsharp:"clike",flow:"javascript",glsl:"clike",gml:"clike",go:"clike",groovy:"clike",haml:"ruby",handlebars:"markup-templating",haxe:"clike",java:"clike",javadoc:["markup","java","javadoclike"],jolie:"clike",jsdoc:["javascript","javadoclike"],"js-extras":"javascript",jsonp:"json",json5:"json",kotlin:"clike",less:"css",markdown:"markup","markup-templating":"markup",n4js:"javascript",nginx:"clike",objectivec:"c",opencl:"cpp",parser:"markup",php:["clike","markup-templating"],phpdoc:["php","javadoclike"],"php-extras":"php",plsql:"sql",processing:"clike",protobuf:"clike",pug:["markup","javascript"],qore:"clike",jsx:["markup","javascript"],tsx:["jsx","typescript"],reason:"clike",ruby:"clike",sass:"css",scss:"css",scala:"java",smarty:"markup-templating",soy:"markup-templating",swift:"clike",tap:"yaml",textile:"markup",tt2:["clike","markup-templating"],twig:"markup",typescript:"javascript","t4-cs":["t4-templating","csharp"],"t4-vb":["t4-templating","visual-basic"],vala:"clike",vbnet:"basic",velocity:"markup",wiki:"markup",xeora:"markup",xquery:"markup"},l={html:"markup",xml:"markup",svg:"markup",mathml:"markup",js:"javascript",adoc:"asciidoc",shell:"bash",rbnf:"bnf",dotnet:"csharp",coffee:"coffeescript",jinja2:"django",dockerfile:"docker",gamemakerlanguage:"gml",hs:"haskell",emacs:"lisp",elisp:"lisp","emacs-lisp":"lisp",md:"markdown",n4jsd:"n4js",objectpascal:"pascal",py:"python",rb:"ruby",ts:"typescript",t4:"t4-cs",vb:"visual-basic",xeoracube:"xeora",yml:"yaml"},n={},a=document.getElementsByTagName("script"),e="components/";if((a=a[a.length-1]).hasAttribute("data-autoloader-path")){var c=a.getAttribute("data-autoloader-path").trim();0 Date: Tue, 28 May 2019 21:38:42 +0200 Subject: [PATCH 0271/1100] =?UTF-8?q?Julia:=20Add=20the=20=E2=80=99in?= =?UTF-8?q?=E2=80=99=20keyword=20(#1918)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Added the missing `in` keyword. --- components/prism-julia.js | 4 ++-- components/prism-julia.min.js | 2 +- tests/languages/julia/keyword_feature.test | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/components/prism-julia.js b/components/prism-julia.js index 07c37bea71..079fe0e338 100644 --- a/components/prism-julia.js +++ b/components/prism-julia.js @@ -4,9 +4,9 @@ Prism.languages.julia= { lookbehind: true }, 'string': /("""|''')[\s\S]+?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2/, - 'keyword' : /\b(?:abstract|baremodule|begin|bitstype|break|catch|ccall|const|continue|do|else|elseif|end|export|finally|for|function|global|if|immutable|import|importall|let|local|macro|module|print|println|quote|return|try|type|typealias|using|while)\b/, + 'keyword' : /\b(?:abstract|baremodule|begin|bitstype|break|catch|ccall|const|continue|do|else|elseif|end|export|finally|for|function|global|if|immutable|import|importall|in|let|local|macro|module|print|println|quote|return|try|type|typealias|using|while)\b/, 'boolean' : /\b(?:true|false)\b/, 'number' : /(?:\b(?=\d)|\B(?=\.))(?:0[box])?(?:[\da-f]+\.?\d*|\.\d+)(?:[efp][+-]?\d+)?j?/i, 'operator': /[-+*^%÷&$\\]=?|\/[\/=]?|!=?=?|\|[=>]?|<(?:<=?|[=:])?|>(?:=|>>?=?)?|==?=?|[~≠≤≥]/, 'punctuation' : /[{}[\];(),.:]/ -}; \ No newline at end of file +}; diff --git a/components/prism-julia.min.js b/components/prism-julia.min.js index bc24ab3d8c..95e1f8d838 100644 --- a/components/prism-julia.min.js +++ b/components/prism-julia.min.js @@ -1 +1 @@ -Prism.languages.julia={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0},string:/("""|''')[\s\S]+?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2/,keyword:/\b(?:abstract|baremodule|begin|bitstype|break|catch|ccall|const|continue|do|else|elseif|end|export|finally|for|function|global|if|immutable|import|importall|let|local|macro|module|print|println|quote|return|try|type|typealias|using|while)\b/,boolean:/\b(?:true|false)\b/,number:/(?:\b(?=\d)|\B(?=\.))(?:0[box])?(?:[\da-f]+\.?\d*|\.\d+)(?:[efp][+-]?\d+)?j?/i,operator:/[-+*^%÷&$\\]=?|\/[\/=]?|!=?=?|\|[=>]?|<(?:<=?|[=:])?|>(?:=|>>?=?)?|==?=?|[~≠≤≥]/,punctuation:/[{}[\];(),.:]/}; \ No newline at end of file +Prism.languages.julia={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0},string:/("""|''')[\s\S]+?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2/,keyword:/\b(?:abstract|baremodule|begin|bitstype|break|catch|ccall|const|continue|do|else|elseif|end|export|finally|for|function|global|if|immutable|import|importall|in|let|local|macro|module|print|println|quote|return|try|type|typealias|using|while)\b/,boolean:/\b(?:true|false)\b/,number:/(?:\b(?=\d)|\B(?=\.))(?:0[box])?(?:[\da-f]+\.?\d*|\.\d+)(?:[efp][+-]?\d+)?j?/i,operator:/[-+*^%÷&$\\]=?|\/[\/=]?|!=?=?|\|[=>]?|<(?:<=?|[=:])?|>(?:=|>>?=?)?|==?=?|[~≠≤≥]/,punctuation:/[{}[\];(),.:]/}; \ No newline at end of file diff --git a/tests/languages/julia/keyword_feature.test b/tests/languages/julia/keyword_feature.test index e2cfa8c88f..701a91d44f 100644 --- a/tests/languages/julia/keyword_feature.test +++ b/tests/languages/julia/keyword_feature.test @@ -4,7 +4,7 @@ ccall const continue do else elseif end export finally for function global if -immutable import importall +immutable import importall in let local macro module print println quote return try type @@ -19,7 +19,7 @@ typealias using while ["keyword", "do"], ["keyword", "else"], ["keyword", "elseif"], ["keyword", "end"], ["keyword", "export"], ["keyword", "finally"], ["keyword", "for"], ["keyword", "function"], ["keyword", "global"], ["keyword", "if"], - ["keyword", "immutable"], ["keyword", "import"], ["keyword", "importall"], + ["keyword", "immutable"], ["keyword", "import"], ["keyword", "importall"], ["keyword", "in"], ["keyword", "let"], ["keyword", "local"], ["keyword", "macro"], ["keyword", "module"], ["keyword", "print"], ["keyword", "println"], ["keyword", "quote"], ["keyword", "return"], ["keyword", "try"], ["keyword", "type"], From 2141129f4db62cc251a3182edad80a170acb19be Mon Sep 17 00:00:00 2001 From: dvdhansen Date: Tue, 28 May 2019 23:07:39 +0200 Subject: [PATCH 0272/1100] =?UTF-8?q?Julia:=20Highlight=20=E2=80=98Inf?= =?UTF-8?q?=E2=80=99=20and=20=E2=80=98NaN=E2=80=99=20as=20constants=20(#19?= =?UTF-8?q?21)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This highlight `Inf`, `NaN` and all of their variants as constants. --- components/prism-julia.js | 3 ++- components/prism-julia.min.js | 2 +- tests/languages/julia/constant_feature.test | 19 +++++++++++++++++++ 3 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 tests/languages/julia/constant_feature.test diff --git a/components/prism-julia.js b/components/prism-julia.js index 079fe0e338..b11b6284a9 100644 --- a/components/prism-julia.js +++ b/components/prism-julia.js @@ -8,5 +8,6 @@ Prism.languages.julia= { 'boolean' : /\b(?:true|false)\b/, 'number' : /(?:\b(?=\d)|\B(?=\.))(?:0[box])?(?:[\da-f]+\.?\d*|\.\d+)(?:[efp][+-]?\d+)?j?/i, 'operator': /[-+*^%÷&$\\]=?|\/[\/=]?|!=?=?|\|[=>]?|<(?:<=?|[=:])?|>(?:=|>>?=?)?|==?=?|[~≠≤≥]/, - 'punctuation' : /[{}[\];(),.:]/ + 'punctuation' : /[{}[\];(),.:]/, + 'constant': /\b(?:(?:NaN|Inf)(?:16|32|64)?)\b/ }; diff --git a/components/prism-julia.min.js b/components/prism-julia.min.js index 95e1f8d838..5af9a7b928 100644 --- a/components/prism-julia.min.js +++ b/components/prism-julia.min.js @@ -1 +1 @@ -Prism.languages.julia={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0},string:/("""|''')[\s\S]+?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2/,keyword:/\b(?:abstract|baremodule|begin|bitstype|break|catch|ccall|const|continue|do|else|elseif|end|export|finally|for|function|global|if|immutable|import|importall|in|let|local|macro|module|print|println|quote|return|try|type|typealias|using|while)\b/,boolean:/\b(?:true|false)\b/,number:/(?:\b(?=\d)|\B(?=\.))(?:0[box])?(?:[\da-f]+\.?\d*|\.\d+)(?:[efp][+-]?\d+)?j?/i,operator:/[-+*^%÷&$\\]=?|\/[\/=]?|!=?=?|\|[=>]?|<(?:<=?|[=:])?|>(?:=|>>?=?)?|==?=?|[~≠≤≥]/,punctuation:/[{}[\];(),.:]/}; \ No newline at end of file +Prism.languages.julia={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0},string:/("""|''')[\s\S]+?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2/,keyword:/\b(?:abstract|baremodule|begin|bitstype|break|catch|ccall|const|continue|do|else|elseif|end|export|finally|for|function|global|if|immutable|import|importall|in|let|local|macro|module|print|println|quote|return|try|type|typealias|using|while)\b/,boolean:/\b(?:true|false)\b/,number:/(?:\b(?=\d)|\B(?=\.))(?:0[box])?(?:[\da-f]+\.?\d*|\.\d+)(?:[efp][+-]?\d+)?j?/i,operator:/[-+*^%÷&$\\]=?|\/[\/=]?|!=?=?|\|[=>]?|<(?:<=?|[=:])?|>(?:=|>>?=?)?|==?=?|[~≠≤≥]/,punctuation:/[{}[\];(),.:]/,constant:/\b(?:(?:NaN|Inf)(?:16|32|64)?)\b/}; \ No newline at end of file diff --git a/tests/languages/julia/constant_feature.test b/tests/languages/julia/constant_feature.test new file mode 100644 index 0000000000..402418ad3f --- /dev/null +++ b/tests/languages/julia/constant_feature.test @@ -0,0 +1,19 @@ +NaN NaN16 NaN32 NaN64 +Inf Inf16 Inf32 Inf64 + +---------------------------------------------------- + +[ + ["constant", "NaN"], + ["constant", "NaN16"], + ["constant", "NaN32"], + ["constant", "NaN64"], + ["constant", "Inf"], + ["constant", "Inf16"], + ["constant", "Inf32"], + ["constant", "Inf64"] +] + +---------------------------------------------------- + +Checks for all constants. \ No newline at end of file From ddf8123369da7804f7058b4a891ebc05da8178f2 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Sat, 1 Jun 2019 17:05:27 +0200 Subject: [PATCH 0273/1100] Docs: Added "Creating a new language definition" section (#1925) This adds a new "Creating a new language definition" section explaining the workflow of creating a new lang. def.. --- extending.html | 93 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 93 insertions(+) diff --git a/extending.html b/extending.html index 7b12a07b82..1051a31ffb 100644 --- a/extending.html +++ b/extending.html @@ -8,6 +8,12 @@ + @@ -124,6 +130,93 @@

    Parameters

    +
    +

    Creating a new language definition

    + +
      +
    1. +

      Create a new file components/prism-lang-id.js.

      +
    2. +
    3. +

      Edit components.json to register the new language by adding it to the languages object. (Please note that all language entries are sorted alphabetically by title.)
      + Your new entry will look like this:

      + +
      "lang-id": {
      +	"title": "Language Title",
      +	"owner": "Your GitHub name"
      +}
      + +

      If your language definition depends any other languages, you have to specify this here as well by adding a "require" property. E.g. "require": "clike", or "require" : ["markup", "css"].

      + +

      Note: Any changes made to components.json require a rebuild (see step 3).

      +
    4. +
    5. +

      Rebuild Prism by running npx gulp.

      + +

      This will make your language available to the test page, or more precise: your local version of it. You can open you local test.html page in any browser, select your language, and see how your language definition highlights the given code.

      + +

      Note: You have to reload the page to apply changes made to prism-lang-id.js.

      +
    6. +
    7. +

      Write the language definition.

      + +

      The above section already explains the makeup of language definitions.

      +
    8. +
    9. +

      Add some tests.

      + +

      Create a folder tests/languages/lang-id/. This is where your test files will live. The test format and how to run tests is described here. A good example are the tests of the JavaScript language.

      + +

      You should add a test for every major feature of your language. Test files should test the common case and certain edge cases (if any).
      + You can use this template for new .test files:

      + +
      The code to test.
      +
      +----------------------------------------------------
      +
      +[ "JSON of the simplified token stream. We will add this later." ]
      +
      +----------------------------------------------------
      +
      +Brief description.
      + +

      For every test file:

      + +
        +
      1. +

        Add the code to test and a brief description.

        +
      2. +
      3. +

        Verify that your language definition correctly highlights the test code. This can be done using the test page.
        + Note: Using the Show tokens options, you see the token stream your language definition created.

        +
      4. +
      5. +

        Once you carefully checked that the test case is handled correctly (i.e. by using the test page), run the following command:

        + npm run test:languages -- --language=lang-id --pretty +

        This command will check only your test files. The new test will fail because the specified JSON is incorrect but the error message of the failed test will also include the JSON of the simplified token stream Prism created. This is what we're after. Replace the current incorrect JSON with the output labeled Token Stream. (Please also adjust the indentation. We use tabs.)

        +
      6. +
      7. +

        Carefully check that the token stream JSON you just inserted is what you expect.

        +
      8. +
      9. Re-run npm run test:languages -- --language=lang-id --pretty to verify that the test passes.
      10. +
      +
    10. +
    11. +

      Run npm test to check that all tests pass, not just your language tests.
      + This will usually pass without problems. If you can't get all the tests to pass, skip this step.

      +
    12. +
    13. +

      Add an example page.

      + +

      Create a new file examples/prism-lang-id.html. This will be the template containing the example markup. Just look at other examples to see how these files are structured.
      + We don't have any rules as to what counts as an example, so a single Full example section where you present the highlighting of the major features of the language is enough.

      +
    14. +
    15. +

      Run npx gulp again.

      +
    16. +
    +
    +

    Writing plugins

    From 79880197a1f6a90a5f82e2f6b9e81e85b4239919 Mon Sep 17 00:00:00 2001 From: James DiGioia Date: Sat, 1 Jun 2019 17:08:39 -0400 Subject: [PATCH 0274/1100] Copy to clipboard: Switch anchor to button (#1926) This changes the anchor element into a button which fixes that the element is not tabbable. --- plugins/copy-to-clipboard/prism-copy-to-clipboard.js | 2 +- plugins/copy-to-clipboard/prism-copy-to-clipboard.min.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/copy-to-clipboard/prism-copy-to-clipboard.js b/plugins/copy-to-clipboard/prism-copy-to-clipboard.js index 0b185f4734..ac73efebca 100644 --- a/plugins/copy-to-clipboard/prism-copy-to-clipboard.js +++ b/plugins/copy-to-clipboard/prism-copy-to-clipboard.js @@ -36,7 +36,7 @@ } Prism.plugins.toolbar.registerButton('copy-to-clipboard', function (env) { - var linkCopy = document.createElement('a'); + var linkCopy = document.createElement('button'); linkCopy.textContent = 'Copy'; if (!ClipboardJS) { diff --git a/plugins/copy-to-clipboard/prism-copy-to-clipboard.min.js b/plugins/copy-to-clipboard/prism-copy-to-clipboard.min.js index 645fd94943..199b42549d 100644 --- a/plugins/copy-to-clipboard/prism-copy-to-clipboard.min.js +++ b/plugins/copy-to-clipboard/prism-copy-to-clipboard.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof self&&self.Prism&&self.document)if(Prism.plugins.toolbar){var r=window.ClipboardJS||void 0;r||"function"!=typeof require||(r=require("clipboard"));var i=[];if(!r){var o=document.createElement("script"),e=document.querySelector("head");o.onload=function(){if(r=window.ClipboardJS)for(;i.length;)i.pop()()},o.src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.0/clipboard.min.js",e.appendChild(o)}Prism.plugins.toolbar.registerButton("copy-to-clipboard",function(e){var t=document.createElement("a");return t.textContent="Copy",r?o():i.push(o),t;function o(){var o=new r(t,{text:function(){return e.code}});o.on("success",function(){t.textContent="Copied!",n()}),o.on("error",function(){t.textContent="Press Ctrl+C to copy",n()})}function n(){setTimeout(function(){t.textContent="Copy"},5e3)}})}else console.warn("Copy to Clipboard plugin loaded before Toolbar plugin.")}(); \ No newline at end of file +!function(){if("undefined"!=typeof self&&self.Prism&&self.document)if(Prism.plugins.toolbar){var r=window.ClipboardJS||void 0;r||"function"!=typeof require||(r=require("clipboard"));var i=[];if(!r){var o=document.createElement("script"),e=document.querySelector("head");o.onload=function(){if(r=window.ClipboardJS)for(;i.length;)i.pop()()},o.src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.0/clipboard.min.js",e.appendChild(o)}Prism.plugins.toolbar.registerButton("copy-to-clipboard",function(e){var t=document.createElement("button");return t.textContent="Copy",r?o():i.push(o),t;function o(){var o=new r(t,{text:function(){return e.code}});o.on("success",function(){t.textContent="Copied!",n()}),o.on("error",function(){t.textContent="Press Ctrl+C to copy",n()})}function n(){setTimeout(function(){t.textContent="Copy"},5e3)}})}else console.warn("Copy to Clipboard plugin loaded before Toolbar plugin.")}(); \ No newline at end of file From 0b1662dde37090d25e78a85d67b99dd66240135e Mon Sep 17 00:00:00 2001 From: James DiGioia Date: Sat, 1 Jun 2019 18:24:44 -0400 Subject: [PATCH 0275/1100] Toolbar: Set opacity to 1 when focus is within (#1927) This ensures interacting with the toolbar with the keyboard makes it visible to the user. --- plugins/toolbar/prism-toolbar.css | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/plugins/toolbar/prism-toolbar.css b/plugins/toolbar/prism-toolbar.css index 2b234e19f0..2d0857178f 100644 --- a/plugins/toolbar/prism-toolbar.css +++ b/plugins/toolbar/prism-toolbar.css @@ -14,6 +14,12 @@ div.code-toolbar:hover > .toolbar { opacity: 1; } +/* Separate line b/c rules are thrown out if selector is invalid. + IE11 and old Edge versions don't support :focus-within. */ +div.code-toolbar:focus-within > .toolbar { + opacity: 1; +} + div.code-toolbar > .toolbar .toolbar-item { display: inline-block; } From a8164559e977fca818dbec9347256eff54966c75 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Sun, 2 Jun 2019 14:36:05 +0200 Subject: [PATCH 0276/1100] C#: Added `cs` alias (#1899) --- components.js | 2 +- components.json | 2 +- components/prism-csharp.js | 2 +- components/prism-csharp.min.js | 2 +- plugins/autoloader/prism-autoloader.js | 2 +- plugins/autoloader/prism-autoloader.min.js | 2 +- plugins/show-language/prism-show-language.js | 2 +- plugins/show-language/prism-show-language.min.js | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/components.js b/components.js index 5d1aa11200..8de8b147e7 100644 --- a/components.js +++ b/components.js @@ -1,2 +1,2 @@ -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default","peerDependencies":"markup"},"clike":{"title":"C-like","option":"default","overrideExampleHeader":true},"javascript":{"title":"JavaScript","require":"clike","peerDependencies":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"Augmented Backus–Naur form","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","peerDependencies":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"Backus–Naur form","alias":"rbnf","aliasTitles":{"rbnf":"Routing Backus–Naur form"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":"dotnet","owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"Extended Backus–Naur form","owner":"RunDevelopment"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment"},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","peerDependencies":["css","coffeescript","erb","javascript","less","markdown","ruby","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"http":{"title":"HTTP","peerDependencies":["javascript","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"peerDependencies":["scala"],"owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","peerDependencies":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike"],"peerDependencies":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","peerDependencies":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","owner":"CupOfTea696"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"less":{"title":"Less","require":"css","owner":"Golmote"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","peerDependencies":["jsdoc"],"alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"nasm":{"title":"NASM","owner":"rbmj"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"cpp","peerDependencies":["c","cpp"],"overrideExampleHeader":true,"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"peerDependencies":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","peerDependencies":["c","cpp","fortran"],"owner":"Golmote"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"peerDependencies":["jsdoc","js-extras"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","peerDependencies":["actionscript","coffeescript","flow","javascript","typescript","vala"],"owner":"RunDevelopment"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sql":{"title":"SQL","owner":"multipetros"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","peerDependencies":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","alias":"ts","owner":"vkbansal"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","visual-basic"],"owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":"Line Highlight","line-numbers":{"title":"Line Numbers","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","after":["autolinker","data-uri-highlight"]},"autolinker":"Autolinker","wpd":"WebPlatform Docs","custom-class":{"title":"Custom Class","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","noCSS":true},"show-language":{"title":"Show Language","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","owner":"Golmote","noCSS":true},"previewers":{"title":"Previewers","owner":"Golmote"},"autoloader":{"title":"Autoloader","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","owner":"Golmote","after":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","owner":"chriswells0"},"unescaped-markup":"Unescaped Markup","normalize-whitespace":{"title":"Normalize Whitespace","owner":"zeitgeist87","after":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","owner":"mAAdhaTTah","require":"toolbar","noCSS":true}}}; +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default","peerDependencies":"markup"},"clike":{"title":"C-like","option":"default","overrideExampleHeader":true},"javascript":{"title":"JavaScript","require":"clike","peerDependencies":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"Augmented Backus–Naur form","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","peerDependencies":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"Backus–Naur form","alias":"rbnf","aliasTitles":{"rbnf":"Routing Backus–Naur form"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"Extended Backus–Naur form","owner":"RunDevelopment"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment"},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","peerDependencies":["css","coffeescript","erb","javascript","less","markdown","ruby","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"http":{"title":"HTTP","peerDependencies":["javascript","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"peerDependencies":["scala"],"owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","peerDependencies":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike"],"peerDependencies":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","peerDependencies":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","owner":"CupOfTea696"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"less":{"title":"Less","require":"css","owner":"Golmote"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","peerDependencies":["jsdoc"],"alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"nasm":{"title":"NASM","owner":"rbmj"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"cpp","peerDependencies":["c","cpp"],"overrideExampleHeader":true,"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"peerDependencies":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","peerDependencies":["c","cpp","fortran"],"owner":"Golmote"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"peerDependencies":["jsdoc","js-extras"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","peerDependencies":["actionscript","coffeescript","flow","javascript","typescript","vala"],"owner":"RunDevelopment"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sql":{"title":"SQL","owner":"multipetros"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","peerDependencies":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","alias":"ts","owner":"vkbansal"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","visual-basic"],"owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":"Line Highlight","line-numbers":{"title":"Line Numbers","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","after":["autolinker","data-uri-highlight"]},"autolinker":"Autolinker","wpd":"WebPlatform Docs","custom-class":{"title":"Custom Class","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","noCSS":true},"show-language":{"title":"Show Language","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","owner":"Golmote","noCSS":true},"previewers":{"title":"Previewers","owner":"Golmote"},"autoloader":{"title":"Autoloader","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","owner":"Golmote","after":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","owner":"chriswells0"},"unescaped-markup":"Unescaped Markup","normalize-whitespace":{"title":"Normalize Whitespace","owner":"zeitgeist87","after":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","owner":"mAAdhaTTah","require":"toolbar","noCSS":true}}}; if (typeof module !== 'undefined' && module.exports) { module.exports = components; } \ No newline at end of file diff --git a/components.json b/components.json index 7c21f9ebcd..7db5c626b8 100644 --- a/components.json +++ b/components.json @@ -180,7 +180,7 @@ "csharp": { "title": "C#", "require": "clike", - "alias": "dotnet", + "alias": ["cs", "dotnet"], "owner": "mvalipour" }, "cpp": { diff --git a/components/prism-csharp.js b/components/prism-csharp.js index 6747ea3e2a..8ff4e00932 100644 --- a/components/prism-csharp.js +++ b/components/prism-csharp.js @@ -78,4 +78,4 @@ Prism.languages.insertBefore('csharp', 'class-name', { } }); -Prism.languages.dotnet = Prism.languages.csharp; +Prism.languages.dotnet = Prism.languages.cs = Prism.languages.csharp; diff --git a/components/prism-csharp.min.js b/components/prism-csharp.min.js index 3a084e7fcb..3c5dac2434 100644 --- a/components/prism-csharp.min.js +++ b/components/prism-csharp.min.js @@ -1 +1 @@ -Prism.languages.csharp=Prism.languages.extend("clike",{keyword:/\b(?:abstract|add|alias|as|ascending|async|await|base|bool|break|byte|case|catch|char|checked|class|const|continue|decimal|default|delegate|descending|do|double|dynamic|else|enum|event|explicit|extern|false|finally|fixed|float|for|foreach|from|get|global|goto|group|if|implicit|in|int|interface|internal|into|is|join|let|lock|long|namespace|new|null|object|operator|orderby|out|override|params|partial|private|protected|public|readonly|ref|remove|return|sbyte|sealed|select|set|short|sizeof|stackalloc|static|string|struct|switch|this|throw|true|try|typeof|uint|ulong|unchecked|unsafe|ushort|using|value|var|virtual|void|volatile|where|while|yield)\b/,string:[{pattern:/@("|')(?:\1\1|\\[\s\S]|(?!\1)[^\\])*\1/,greedy:!0},{pattern:/("|')(?:\\.|(?!\1)[^\\\r\n])*?\1/,greedy:!0}],"class-name":[{pattern:/\b[A-Z]\w*(?:\.\w+)*\b(?=\s+\w+)/,inside:{punctuation:/\./}},{pattern:/(\[)[A-Z]\w*(?:\.\w+)*\b/,lookbehind:!0,inside:{punctuation:/\./}},{pattern:/(\b(?:class|interface)\s+[A-Z]\w*(?:\.\w+)*\s*:\s*)[A-Z]\w*(?:\.\w+)*\b/,lookbehind:!0,inside:{punctuation:/\./}},{pattern:/((?:\b(?:class|interface|new)\s+)|(?:catch\s+\())[A-Z]\w*(?:\.\w+)*\b/,lookbehind:!0,inside:{punctuation:/\./}}],number:/\b0x[\da-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)f?/i,operator:/>>=?|<<=?|[-=]>|([-+&|?])\1|~|[-+*/%&|^!=<>]=?/,punctuation:/\?\.?|::|[{}[\];(),.:]/}),Prism.languages.insertBefore("csharp","class-name",{"generic-method":{pattern:/\w+\s*<[^>\r\n]+?>\s*(?=\()/,inside:{function:/^\w+/,"class-name":{pattern:/\b[A-Z]\w*(?:\.\w+)*\b/,inside:{punctuation:/\./}},keyword:Prism.languages.csharp.keyword,punctuation:/[<>(),.:]/}},preprocessor:{pattern:/(^\s*)#.*/m,lookbehind:!0,alias:"property",inside:{directive:{pattern:/(\s*#)\b(?:define|elif|else|endif|endregion|error|if|line|pragma|region|undef|warning)\b/,lookbehind:!0,alias:"keyword"}}}}),Prism.languages.dotnet=Prism.languages.csharp; \ No newline at end of file +Prism.languages.csharp=Prism.languages.extend("clike",{keyword:/\b(?:abstract|add|alias|as|ascending|async|await|base|bool|break|byte|case|catch|char|checked|class|const|continue|decimal|default|delegate|descending|do|double|dynamic|else|enum|event|explicit|extern|false|finally|fixed|float|for|foreach|from|get|global|goto|group|if|implicit|in|int|interface|internal|into|is|join|let|lock|long|namespace|new|null|object|operator|orderby|out|override|params|partial|private|protected|public|readonly|ref|remove|return|sbyte|sealed|select|set|short|sizeof|stackalloc|static|string|struct|switch|this|throw|true|try|typeof|uint|ulong|unchecked|unsafe|ushort|using|value|var|virtual|void|volatile|where|while|yield)\b/,string:[{pattern:/@("|')(?:\1\1|\\[\s\S]|(?!\1)[^\\])*\1/,greedy:!0},{pattern:/("|')(?:\\.|(?!\1)[^\\\r\n])*?\1/,greedy:!0}],"class-name":[{pattern:/\b[A-Z]\w*(?:\.\w+)*\b(?=\s+\w+)/,inside:{punctuation:/\./}},{pattern:/(\[)[A-Z]\w*(?:\.\w+)*\b/,lookbehind:!0,inside:{punctuation:/\./}},{pattern:/(\b(?:class|interface)\s+[A-Z]\w*(?:\.\w+)*\s*:\s*)[A-Z]\w*(?:\.\w+)*\b/,lookbehind:!0,inside:{punctuation:/\./}},{pattern:/((?:\b(?:class|interface|new)\s+)|(?:catch\s+\())[A-Z]\w*(?:\.\w+)*\b/,lookbehind:!0,inside:{punctuation:/\./}}],number:/\b0x[\da-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)f?/i,operator:/>>=?|<<=?|[-=]>|([-+&|?])\1|~|[-+*/%&|^!=<>]=?/,punctuation:/\?\.?|::|[{}[\];(),.:]/}),Prism.languages.insertBefore("csharp","class-name",{"generic-method":{pattern:/\w+\s*<[^>\r\n]+?>\s*(?=\()/,inside:{function:/^\w+/,"class-name":{pattern:/\b[A-Z]\w*(?:\.\w+)*\b/,inside:{punctuation:/\./}},keyword:Prism.languages.csharp.keyword,punctuation:/[<>(),.:]/}},preprocessor:{pattern:/(^\s*)#.*/m,lookbehind:!0,alias:"property",inside:{directive:{pattern:/(\s*#)\b(?:define|elif|else|endif|endregion|error|if|line|pragma|region|undef|warning)\b/,lookbehind:!0,alias:"keyword"}}}}),Prism.languages.dotnet=Prism.languages.cs=Prism.languages.csharp; \ No newline at end of file diff --git a/plugins/autoloader/prism-autoloader.js b/plugins/autoloader/prism-autoloader.js index 034eeadc8f..cd1e82e958 100644 --- a/plugins/autoloader/prism-autoloader.js +++ b/plugins/autoloader/prism-autoloader.js @@ -6,7 +6,7 @@ // The dependencies map is built automatically with gulp var lang_dependencies = /*dependencies_placeholder[*/{"javascript":"clike","actionscript":"javascript","arduino":"cpp","aspnet":["markup","csharp"],"bison":"c","c":"clike","csharp":"clike","cpp":"c","coffeescript":"javascript","crystal":"ruby","css-extras":"css","d":"clike","dart":"clike","django":"markup-templating","ejs":["javascript","markup-templating"],"erb":["ruby","markup-templating"],"fsharp":"clike","flow":"javascript","glsl":"clike","gml":"clike","go":"clike","groovy":"clike","haml":"ruby","handlebars":"markup-templating","haxe":"clike","java":"clike","javadoc":["markup","java","javadoclike"],"jolie":"clike","jsdoc":["javascript","javadoclike"],"js-extras":"javascript","jsonp":"json","json5":"json","kotlin":"clike","less":"css","markdown":"markup","markup-templating":"markup","n4js":"javascript","nginx":"clike","objectivec":"c","opencl":"cpp","parser":"markup","php":["clike","markup-templating"],"phpdoc":["php","javadoclike"],"php-extras":"php","plsql":"sql","processing":"clike","protobuf":"clike","pug":["markup","javascript"],"qore":"clike","jsx":["markup","javascript"],"tsx":["jsx","typescript"],"reason":"clike","ruby":"clike","sass":"css","scss":"css","scala":"java","smarty":"markup-templating","soy":"markup-templating","swift":"clike","tap":"yaml","textile":"markup","tt2":["clike","markup-templating"],"twig":"markup","typescript":"javascript","t4-cs":["t4-templating","csharp"],"t4-vb":["t4-templating","visual-basic"],"vala":"clike","vbnet":"basic","velocity":"markup","wiki":"markup","xeora":"markup","xquery":"markup"}/*]*/; - var lang_aliases = /*aliases_placeholder[*/{"html":"markup","xml":"markup","svg":"markup","mathml":"markup","js":"javascript","adoc":"asciidoc","shell":"bash","rbnf":"bnf","dotnet":"csharp","coffee":"coffeescript","jinja2":"django","dockerfile":"docker","gamemakerlanguage":"gml","hs":"haskell","tex":"latex","context":"latex","emacs":"lisp","elisp":"lisp","emacs-lisp":"lisp","md":"markdown","n4jsd":"n4js","objectpascal":"pascal","py":"python","rb":"ruby","ts":"typescript","t4":"t4-cs","vb":"visual-basic","xeoracube":"xeora","yml":"yaml"}/*]*/; + var lang_aliases = /*aliases_placeholder[*/{"html":"markup","xml":"markup","svg":"markup","mathml":"markup","js":"javascript","adoc":"asciidoc","shell":"bash","rbnf":"bnf","cs":"csharp","dotnet":"csharp","coffee":"coffeescript","jinja2":"django","dockerfile":"docker","gamemakerlanguage":"gml","hs":"haskell","tex":"latex","context":"latex","emacs":"lisp","elisp":"lisp","emacs-lisp":"lisp","md":"markdown","n4jsd":"n4js","objectpascal":"pascal","py":"python","rb":"ruby","ts":"typescript","t4":"t4-cs","vb":"visual-basic","xeoracube":"xeora","yml":"yaml"}/*]*/; var lang_data = {}; diff --git a/plugins/autoloader/prism-autoloader.min.js b/plugins/autoloader/prism-autoloader.min.js index c13f55ee7f..1cff879874 100644 --- a/plugins/autoloader/prism-autoloader.min.js +++ b/plugins/autoloader/prism-autoloader.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof self&&self.Prism&&self.document&&document.createElement){var i={javascript:"clike",actionscript:"javascript",arduino:"cpp",aspnet:["markup","csharp"],bison:"c",c:"clike",csharp:"clike",cpp:"c",coffeescript:"javascript",crystal:"ruby","css-extras":"css",d:"clike",dart:"clike",django:"markup-templating",ejs:["javascript","markup-templating"],erb:["ruby","markup-templating"],fsharp:"clike",flow:"javascript",glsl:"clike",gml:"clike",go:"clike",groovy:"clike",haml:"ruby",handlebars:"markup-templating",haxe:"clike",java:"clike",javadoc:["markup","java","javadoclike"],jolie:"clike",jsdoc:["javascript","javadoclike"],"js-extras":"javascript",jsonp:"json",json5:"json",kotlin:"clike",less:"css",markdown:"markup","markup-templating":"markup",n4js:"javascript",nginx:"clike",objectivec:"c",opencl:"cpp",parser:"markup",php:["clike","markup-templating"],phpdoc:["php","javadoclike"],"php-extras":"php",plsql:"sql",processing:"clike",protobuf:"clike",pug:["markup","javascript"],qore:"clike",jsx:["markup","javascript"],tsx:["jsx","typescript"],reason:"clike",ruby:"clike",sass:"css",scss:"css",scala:"java",smarty:"markup-templating",soy:"markup-templating",swift:"clike",tap:"yaml",textile:"markup",tt2:["clike","markup-templating"],twig:"markup",typescript:"javascript","t4-cs":["t4-templating","csharp"],"t4-vb":["t4-templating","visual-basic"],vala:"clike",vbnet:"basic",velocity:"markup",wiki:"markup",xeora:"markup",xquery:"markup"},l={html:"markup",xml:"markup",svg:"markup",mathml:"markup",js:"javascript",adoc:"asciidoc",shell:"bash",rbnf:"bnf",dotnet:"csharp",coffee:"coffeescript",jinja2:"django",dockerfile:"docker",gamemakerlanguage:"gml",hs:"haskell",tex:"latex",context:"latex",emacs:"lisp",elisp:"lisp","emacs-lisp":"lisp",md:"markdown",n4jsd:"n4js",objectpascal:"pascal",py:"python",rb:"ruby",ts:"typescript",t4:"t4-cs",vb:"visual-basic",xeoracube:"xeora",yml:"yaml"},n={},a=document.getElementsByTagName("script"),e="components/";if((a=a[a.length-1]).hasAttribute("data-autoloader-path")){var c=a.getAttribute("data-autoloader-path").trim();0 Date: Sun, 2 Jun 2019 15:08:24 +0200 Subject: [PATCH 0277/1100] Tests: `lookbehind` test for patterns (#1890) This adds a test which whether `lookbehind` (if set to `true`) is necessary for a given pattern. --- components/prism-elixir.js | 6 +--- components/prism-elixir.min.js | 2 +- components/prism-tt2.js | 15 ++++------ components/prism-tt2.min.js | 2 +- tests/regex-tests.js | 51 ++++++++++++++++++++++++++++++---- 5 files changed, 54 insertions(+), 22 deletions(-) diff --git a/components/prism-elixir.js b/components/prism-elixir.js index c8ba959846..0f912754ba 100644 --- a/components/prism-elixir.js +++ b/components/prism-elixir.js @@ -1,8 +1,5 @@ Prism.languages.elixir = { - 'comment': { - pattern: /#.*/m, - lookbehind: true - }, + 'comment': /#.*/m, // ~r"""foo""" (multi-line), ~r'''foo''' (multi-line), ~r/foo/, ~r|foo|, ~r"foo", ~r'foo', ~r(foo), ~r[foo], ~r{foo}, ~r 'regex': { pattern: /~[rR](?:("""|''')(?:\\[\s\S]|(?!\1)[^\\])+\1|([\/|"'])(?:\\.|(?!\2)[^\\\r\n])+\2|\((?:\\.|[^\\)\r\n])+\)|\[(?:\\.|[^\\\]\r\n])+\]|\{(?:\\.|[^\\}\r\n])+\}|<(?:\\.|[^\\>\r\n])+>)[uismxfr]*/, @@ -90,4 +87,3 @@ Prism.languages.elixir.string.forEach(function(o) { } }; }); - diff --git a/components/prism-elixir.min.js b/components/prism-elixir.min.js index 57a69a5021..577e882ed0 100644 --- a/components/prism-elixir.min.js +++ b/components/prism-elixir.min.js @@ -1 +1 @@ -Prism.languages.elixir={comment:{pattern:/#.*/m,lookbehind:!0},regex:{pattern:/~[rR](?:("""|''')(?:\\[\s\S]|(?!\1)[^\\])+\1|([\/|"'])(?:\\.|(?!\2)[^\\\r\n])+\2|\((?:\\.|[^\\)\r\n])+\)|\[(?:\\.|[^\\\]\r\n])+\]|\{(?:\\.|[^\\}\r\n])+\}|<(?:\\.|[^\\>\r\n])+>)[uismxfr]*/,greedy:!0},string:[{pattern:/~[cCsSwW](?:("""|''')(?:\\[\s\S]|(?!\1)[^\\])+\1|([\/|"'])(?:\\.|(?!\2)[^\\\r\n])+\2|\((?:\\.|[^\\)\r\n])+\)|\[(?:\\.|[^\\\]\r\n])+\]|\{(?:\\.|#\{[^}]+\}|[^\\}\r\n])+\}|<(?:\\.|[^\\>\r\n])+>)[csa]?/,greedy:!0,inside:{}},{pattern:/("""|''')[\s\S]*?\1/,greedy:!0,inside:{}},{pattern:/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0,inside:{}}],atom:{pattern:/(^|[^:]):\w+/,lookbehind:!0,alias:"symbol"},"attr-name":/\w+:(?!:)/,capture:{pattern:/(^|[^&])&(?:[^&\s\d()][^\s()]*|(?=\())/,lookbehind:!0,alias:"function"},argument:{pattern:/(^|[^&])&\d+/,lookbehind:!0,alias:"variable"},attribute:{pattern:/@\w+/,alias:"variable"},number:/\b(?:0[box][a-f\d_]+|\d[\d_]*)(?:\.[\d_]+)?(?:e[+-]?[\d_]+)?\b/i,keyword:/\b(?:after|alias|and|case|catch|cond|def(?:callback|exception|impl|module|p|protocol|struct)?|do|else|end|fn|for|if|import|not|or|require|rescue|try|unless|use|when)\b/,boolean:/\b(?:true|false|nil)\b/,operator:[/\bin\b|&&?|\|[|>]?|\\\\|::|\.\.\.?|\+\+?|-[->]?|<[-=>]|>=|!==?|\B!|=(?:==?|[>~])?|[*\/^]/,{pattern:/([^<])<(?!<)/,lookbehind:!0},{pattern:/([^>])>(?!>)/,lookbehind:!0}],punctuation:/<<|>>|[.,%\[\]{}()]/},Prism.languages.elixir.string.forEach(function(e){e.inside={interpolation:{pattern:/#\{[^}]+\}/,inside:{delimiter:{pattern:/^#\{|\}$/,alias:"punctuation"},rest:Prism.languages.elixir}}}}); \ No newline at end of file +Prism.languages.elixir={comment:/#.*/m,regex:{pattern:/~[rR](?:("""|''')(?:\\[\s\S]|(?!\1)[^\\])+\1|([\/|"'])(?:\\.|(?!\2)[^\\\r\n])+\2|\((?:\\.|[^\\)\r\n])+\)|\[(?:\\.|[^\\\]\r\n])+\]|\{(?:\\.|[^\\}\r\n])+\}|<(?:\\.|[^\\>\r\n])+>)[uismxfr]*/,greedy:!0},string:[{pattern:/~[cCsSwW](?:("""|''')(?:\\[\s\S]|(?!\1)[^\\])+\1|([\/|"'])(?:\\.|(?!\2)[^\\\r\n])+\2|\((?:\\.|[^\\)\r\n])+\)|\[(?:\\.|[^\\\]\r\n])+\]|\{(?:\\.|#\{[^}]+\}|[^\\}\r\n])+\}|<(?:\\.|[^\\>\r\n])+>)[csa]?/,greedy:!0,inside:{}},{pattern:/("""|''')[\s\S]*?\1/,greedy:!0,inside:{}},{pattern:/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0,inside:{}}],atom:{pattern:/(^|[^:]):\w+/,lookbehind:!0,alias:"symbol"},"attr-name":/\w+:(?!:)/,capture:{pattern:/(^|[^&])&(?:[^&\s\d()][^\s()]*|(?=\())/,lookbehind:!0,alias:"function"},argument:{pattern:/(^|[^&])&\d+/,lookbehind:!0,alias:"variable"},attribute:{pattern:/@\w+/,alias:"variable"},number:/\b(?:0[box][a-f\d_]+|\d[\d_]*)(?:\.[\d_]+)?(?:e[+-]?[\d_]+)?\b/i,keyword:/\b(?:after|alias|and|case|catch|cond|def(?:callback|exception|impl|module|p|protocol|struct)?|do|else|end|fn|for|if|import|not|or|require|rescue|try|unless|use|when)\b/,boolean:/\b(?:true|false|nil)\b/,operator:[/\bin\b|&&?|\|[|>]?|\\\\|::|\.\.\.?|\+\+?|-[->]?|<[-=>]|>=|!==?|\B!|=(?:==?|[>~])?|[*\/^]/,{pattern:/([^<])<(?!<)/,lookbehind:!0},{pattern:/([^>])>(?!>)/,lookbehind:!0}],punctuation:/<<|>>|[.,%\[\]{}()]/},Prism.languages.elixir.string.forEach(function(e){e.inside={interpolation:{pattern:/#\{[^}]+\}/,inside:{delimiter:{pattern:/^#\{|\}$/,alias:"punctuation"},rest:Prism.languages.elixir}}}}); \ No newline at end of file diff --git a/components/prism-tt2.js b/components/prism-tt2.js index ef943201cd..df49a9eaab 100644 --- a/components/prism-tt2.js +++ b/components/prism-tt2.js @@ -1,17 +1,14 @@ (function(Prism) { Prism.languages.tt2 = Prism.languages.extend('clike', { - comment: { - pattern: /#.*|\[%#[\s\S]*?%\]/, - lookbehind: true - }, - keyword: /\b(?:BLOCK|CALL|CASE|CATCH|CLEAR|DEBUG|DEFAULT|ELSE|ELSIF|END|FILTER|FINAL|FOREACH|GET|IF|IN|INCLUDE|INSERT|LAST|MACRO|META|NEXT|PERL|PROCESS|RAWPERL|RETURN|SET|STOP|TAGS|THROW|TRY|SWITCH|UNLESS|USE|WHILE|WRAPPER)\b/, - punctuation: /[[\]{},()]/ + 'comment': /#.*|\[%#[\s\S]*?%\]/, + 'keyword': /\b(?:BLOCK|CALL|CASE|CATCH|CLEAR|DEBUG|DEFAULT|ELSE|ELSIF|END|FILTER|FINAL|FOREACH|GET|IF|IN|INCLUDE|INSERT|LAST|MACRO|META|NEXT|PERL|PROCESS|RAWPERL|RETURN|SET|STOP|TAGS|THROW|TRY|SWITCH|UNLESS|USE|WHILE|WRAPPER)\b/, + 'punctuation': /[[\]{},()]/ }); Prism.languages.insertBefore('tt2', 'number', { - operator: /=[>=]?|!=?|<=?|>=?|&&|\|\|?|\b(?:and|or|not)\b/, - variable: { + 'operator': /=[>=]?|!=?|<=?|>=?|&&|\|\|?|\b(?:and|or|not)\b/, + 'variable': { pattern: /[a-z]\w*(?:\s*\.\s*(?:\d+|\$?[a-z]\w*))*/i } }); @@ -34,7 +31,7 @@ greedy: true, alias: 'string', inside: { - variable: { + 'variable': { pattern: /\$(?:[a-z]\w*(?:\.(?:\d+|\$?[a-z]\w*))*)/i } } diff --git a/components/prism-tt2.min.js b/components/prism-tt2.min.js index 994f34ab92..5de0617e8b 100644 --- a/components/prism-tt2.min.js +++ b/components/prism-tt2.min.js @@ -1 +1 @@ -!function(t){t.languages.tt2=t.languages.extend("clike",{comment:{pattern:/#.*|\[%#[\s\S]*?%\]/,lookbehind:!0},keyword:/\b(?:BLOCK|CALL|CASE|CATCH|CLEAR|DEBUG|DEFAULT|ELSE|ELSIF|END|FILTER|FINAL|FOREACH|GET|IF|IN|INCLUDE|INSERT|LAST|MACRO|META|NEXT|PERL|PROCESS|RAWPERL|RETURN|SET|STOP|TAGS|THROW|TRY|SWITCH|UNLESS|USE|WHILE|WRAPPER)\b/,punctuation:/[[\]{},()]/}),t.languages.insertBefore("tt2","number",{operator:/=[>=]?|!=?|<=?|>=?|&&|\|\|?|\b(?:and|or|not)\b/,variable:{pattern:/[a-z]\w*(?:\s*\.\s*(?:\d+|\$?[a-z]\w*))*/i}}),t.languages.insertBefore("tt2","keyword",{delimiter:{pattern:/^(?:\[%|%%)-?|-?%]$/,alias:"punctuation"}}),t.languages.insertBefore("tt2","string",{"single-quoted-string":{pattern:/'[^\\']*(?:\\[\s\S][^\\']*)*'/,greedy:!0,alias:"string"},"double-quoted-string":{pattern:/"[^\\"]*(?:\\[\s\S][^\\"]*)*"/,greedy:!0,alias:"string",inside:{variable:{pattern:/\$(?:[a-z]\w*(?:\.(?:\d+|\$?[a-z]\w*))*)/i}}}}),delete t.languages.tt2.string,t.hooks.add("before-tokenize",function(e){t.languages["markup-templating"].buildPlaceholders(e,"tt2",/\[%[\s\S]+?%\]/g)}),t.hooks.add("after-tokenize",function(e){t.languages["markup-templating"].tokenizePlaceholders(e,"tt2")})}(Prism); \ No newline at end of file +!function(t){t.languages.tt2=t.languages.extend("clike",{comment:/#.*|\[%#[\s\S]*?%\]/,keyword:/\b(?:BLOCK|CALL|CASE|CATCH|CLEAR|DEBUG|DEFAULT|ELSE|ELSIF|END|FILTER|FINAL|FOREACH|GET|IF|IN|INCLUDE|INSERT|LAST|MACRO|META|NEXT|PERL|PROCESS|RAWPERL|RETURN|SET|STOP|TAGS|THROW|TRY|SWITCH|UNLESS|USE|WHILE|WRAPPER)\b/,punctuation:/[[\]{},()]/}),t.languages.insertBefore("tt2","number",{operator:/=[>=]?|!=?|<=?|>=?|&&|\|\|?|\b(?:and|or|not)\b/,variable:{pattern:/[a-z]\w*(?:\s*\.\s*(?:\d+|\$?[a-z]\w*))*/i}}),t.languages.insertBefore("tt2","keyword",{delimiter:{pattern:/^(?:\[%|%%)-?|-?%]$/,alias:"punctuation"}}),t.languages.insertBefore("tt2","string",{"single-quoted-string":{pattern:/'[^\\']*(?:\\[\s\S][^\\']*)*'/,greedy:!0,alias:"string"},"double-quoted-string":{pattern:/"[^\\"]*(?:\\[\s\S][^\\"]*)*"/,greedy:!0,alias:"string",inside:{variable:{pattern:/\$(?:[a-z]\w*(?:\.(?:\d+|\$?[a-z]\w*))*)/i}}}}),delete t.languages.tt2.string,t.hooks.add("before-tokenize",function(e){t.languages["markup-templating"].buildPlaceholders(e,"tt2",/\[%[\s\S]+?%\]/g)}),t.hooks.add("after-tokenize",function(e){t.languages["markup-templating"].tokenizePlaceholders(e,"tt2")})}(Prism); \ No newline at end of file diff --git a/tests/regex-tests.js b/tests/regex-tests.js index 0b30ad82e6..d2d3650648 100644 --- a/tests/regex-tests.js +++ b/tests/regex-tests.js @@ -1,9 +1,10 @@ "use strict"; -const { assert } = require("chai"); +const { assert } = require('chai'); const PrismLoader = require('./helper/prism-loader'); const { languages } = require('../components'); + for (const lang in languages) { if (lang === 'meta') { continue; @@ -13,19 +14,57 @@ for (const lang in languages) { const Prism = PrismLoader.createInstance(lang); - it('- should not match the empty string', function () { - let lastToken = ''; + /** + * Invokes the given function on every pattern in `Prism.languages`. + * + * @param {(values: { pattern: RegExp, tokenName: string, name: string, parent: any }) => void} callback + */ + function forEachPattern(callback) { + /** @type {Map} */ + const nameMap = new Map(); Prism.languages.DFS(Prism.languages, function (name, value) { - if (typeof this === 'object' && !Array.isArray(this) && name !== 'pattern') { - lastToken = name; + let path = nameMap.get(this) || ''; + if (/^\d+$/.test(name)) { + path += `[${name}]`; + } else if (/^[a-z]\w*$/i.test(name)) { + path += `.${name}`; + } else { + path += `[${JSON.stringify(name)}]`; + } + if (Array.isArray(value) || Prism.util.type(value) === 'Object') { + nameMap.set(value, path); } if (Prism.util.type(value) === 'RegExp') { - assert.notMatch('', value, `Token '${lastToken}': ${value} should not match the empty string.`); + callback({ + pattern: value, + tokenName: path, + name, + parent: this, + }); } }); + } + + it('- should not match the empty string', function () { + forEachPattern(({ pattern, tokenName }) => { + // test for empty string + assert.notMatch('', pattern, `Token ${tokenName}: ${pattern} should not match the empty string.`); + }); + }); + + it('- should have a capturing group if lookbehind is set to true', function () { + forEachPattern(({ pattern, tokenName, name, parent }) => { + if (name === 'pattern' && parent.lookbehind) { + const simplifiedSource = pattern.source.replace(/\\\D/g, '_').replace(/\[[^\]]*\]/g, '_'); + + if (!/\((?!\?)/.test(simplifiedSource)) { + assert.fail(`Token ${tokenName}: The pattern is set to 'lookbehind: true' but does not have a capturing group.`); + } + } + }); }); }); } From 0853e69494b22dd658f95a4756f5048f977eee3a Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Sat, 8 Jun 2019 20:09:17 +0200 Subject: [PATCH 0278/1100] The test page now uses prism-core.js instead of prism.js (#1908) Instead of `prism.js`, the test page will now use `prism-core.js`. This means that Markup, CSS, C like, and JS are not included by default which will cause them to behave like any other language. --- test.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test.html b/test.html index 55afc53878..d0c47718f2 100644 --- a/test.html +++ b/test.html @@ -127,7 +127,7 @@

    Test drive

    - + From 73d964be5d3d6dbdcc006da4cc3c8610034f0f0c Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Sat, 8 Jun 2019 20:15:08 +0200 Subject: [PATCH 0279/1100] Added support for JQ language (#1896) This adds support for the JQ language. --- components.js | 2 +- components.json | 4 ++ components/prism-jq.js | 67 +++++++++++++++++++ components/prism-jq.min.js | 1 + examples/prism-jq.html | 11 +++ plugins/show-language/prism-show-language.js | 2 +- .../show-language/prism-show-language.min.js | 2 +- tests/languages/jq/boolean_feature.test | 13 ++++ tests/languages/jq/comment_feature.test | 13 ++++ tests/languages/jq/dot_feature.test | 11 +++ tests/languages/jq/function_feature.test | 31 +++++++++ tests/languages/jq/keyword_feature.test | 47 +++++++++++++ tests/languages/jq/operator_feature.test | 46 +++++++++++++ tests/languages/jq/property_feature.test | 45 +++++++++++++ tests/languages/jq/punctuation_feature.test | 33 +++++++++ tests/languages/jq/string_feature.test | 42 ++++++++++++ tests/languages/jq/variable_feature.test | 13 ++++ 17 files changed, 380 insertions(+), 3 deletions(-) create mode 100644 components/prism-jq.js create mode 100644 components/prism-jq.min.js create mode 100644 examples/prism-jq.html create mode 100644 tests/languages/jq/boolean_feature.test create mode 100644 tests/languages/jq/comment_feature.test create mode 100644 tests/languages/jq/dot_feature.test create mode 100644 tests/languages/jq/function_feature.test create mode 100644 tests/languages/jq/keyword_feature.test create mode 100644 tests/languages/jq/operator_feature.test create mode 100644 tests/languages/jq/property_feature.test create mode 100644 tests/languages/jq/punctuation_feature.test create mode 100644 tests/languages/jq/string_feature.test create mode 100644 tests/languages/jq/variable_feature.test diff --git a/components.js b/components.js index 8de8b147e7..fc5863fb17 100644 --- a/components.js +++ b/components.js @@ -1,2 +1,2 @@ -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default","peerDependencies":"markup"},"clike":{"title":"C-like","option":"default","overrideExampleHeader":true},"javascript":{"title":"JavaScript","require":"clike","peerDependencies":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"Augmented Backus–Naur form","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","peerDependencies":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"Backus–Naur form","alias":"rbnf","aliasTitles":{"rbnf":"Routing Backus–Naur form"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"Extended Backus–Naur form","owner":"RunDevelopment"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment"},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","peerDependencies":["css","coffeescript","erb","javascript","less","markdown","ruby","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"http":{"title":"HTTP","peerDependencies":["javascript","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"peerDependencies":["scala"],"owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","peerDependencies":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike"],"peerDependencies":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","peerDependencies":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","owner":"CupOfTea696"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"less":{"title":"Less","require":"css","owner":"Golmote"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","peerDependencies":["jsdoc"],"alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"nasm":{"title":"NASM","owner":"rbmj"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"cpp","peerDependencies":["c","cpp"],"overrideExampleHeader":true,"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"peerDependencies":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","peerDependencies":["c","cpp","fortran"],"owner":"Golmote"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"peerDependencies":["jsdoc","js-extras"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","peerDependencies":["actionscript","coffeescript","flow","javascript","typescript","vala"],"owner":"RunDevelopment"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sql":{"title":"SQL","owner":"multipetros"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","peerDependencies":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","alias":"ts","owner":"vkbansal"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","visual-basic"],"owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":"Line Highlight","line-numbers":{"title":"Line Numbers","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","after":["autolinker","data-uri-highlight"]},"autolinker":"Autolinker","wpd":"WebPlatform Docs","custom-class":{"title":"Custom Class","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","noCSS":true},"show-language":{"title":"Show Language","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","owner":"Golmote","noCSS":true},"previewers":{"title":"Previewers","owner":"Golmote"},"autoloader":{"title":"Autoloader","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","owner":"Golmote","after":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","owner":"chriswells0"},"unescaped-markup":"Unescaped Markup","normalize-whitespace":{"title":"Normalize Whitespace","owner":"zeitgeist87","after":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","owner":"mAAdhaTTah","require":"toolbar","noCSS":true}}}; +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default","peerDependencies":"markup"},"clike":{"title":"C-like","option":"default","overrideExampleHeader":true},"javascript":{"title":"JavaScript","require":"clike","peerDependencies":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"Augmented Backus–Naur form","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","peerDependencies":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"Backus–Naur form","alias":"rbnf","aliasTitles":{"rbnf":"Routing Backus–Naur form"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"Extended Backus–Naur form","owner":"RunDevelopment"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment"},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","peerDependencies":["css","coffeescript","erb","javascript","less","markdown","ruby","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"http":{"title":"HTTP","peerDependencies":["javascript","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"peerDependencies":["scala"],"owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","peerDependencies":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike"],"peerDependencies":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","peerDependencies":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","owner":"CupOfTea696"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"less":{"title":"Less","require":"css","owner":"Golmote"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","peerDependencies":["jsdoc"],"alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"nasm":{"title":"NASM","owner":"rbmj"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"cpp","peerDependencies":["c","cpp"],"overrideExampleHeader":true,"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"peerDependencies":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","peerDependencies":["c","cpp","fortran"],"owner":"Golmote"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"peerDependencies":["jsdoc","js-extras"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","peerDependencies":["actionscript","coffeescript","flow","javascript","typescript","vala"],"owner":"RunDevelopment"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sql":{"title":"SQL","owner":"multipetros"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","peerDependencies":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","alias":"ts","owner":"vkbansal"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","visual-basic"],"owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":"Line Highlight","line-numbers":{"title":"Line Numbers","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","after":["autolinker","data-uri-highlight"]},"autolinker":"Autolinker","wpd":"WebPlatform Docs","custom-class":{"title":"Custom Class","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","noCSS":true},"show-language":{"title":"Show Language","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","owner":"Golmote","noCSS":true},"previewers":{"title":"Previewers","owner":"Golmote"},"autoloader":{"title":"Autoloader","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","owner":"Golmote","after":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","owner":"chriswells0"},"unescaped-markup":"Unescaped Markup","normalize-whitespace":{"title":"Normalize Whitespace","owner":"zeitgeist87","after":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","owner":"mAAdhaTTah","require":"toolbar","noCSS":true}}}; if (typeof module !== 'undefined' && module.exports) { module.exports = components; } \ No newline at end of file diff --git a/components.json b/components.json index 7db5c626b8..371e684213 100644 --- a/components.json +++ b/components.json @@ -436,6 +436,10 @@ "require": "clike", "owner": "thesave" }, + "jq": { + "title": "JQ", + "owner": "RunDevelopment" + }, "jsdoc": { "title": "JSDoc", "require": ["javascript", "javadoclike"], diff --git a/components/prism-jq.js b/components/prism-jq.js new file mode 100644 index 0000000000..a8a23ef5df --- /dev/null +++ b/components/prism-jq.js @@ -0,0 +1,67 @@ +(function (Prism) { + + var interpolation = /\\\((?:[^()]|\([^()]*\))*\)/.source; + var string = RegExp(/"(?:[^"\r\n\\]|\\[^\r\n(]|__)*"/.source.replace(/__/g, interpolation)); + var stringInterpolation = { + 'interpolation': { + pattern: RegExp(/((?:^|[^\\])(?:\\{2})*)/.source + interpolation), + lookbehind: true, + inside: { + 'content': { + pattern: /^(\\\()[\s\S]+(?=\)$)/, + lookbehind: true, + inside: null // see below + }, + 'punctuation': /^\\\(|\)$/ + } + } + }; + + var jq = Prism.languages.jq = { + 'comment': /#.*/, + 'property': { + pattern: RegExp(string.source + /(?=\s*:(?!:))/.source), + greedy: true, + inside: stringInterpolation + }, + 'string': { + pattern: string, + greedy: true, + inside: stringInterpolation + }, + + 'function': { + pattern: /(\bdef\s+)[a-z_]\w+/i, + lookbehind: true + }, + + 'variable': /\B\$\w+/, + 'property-literal': { + pattern: /[a-z_]\w*(?=\s*:(?!:))/i, + alias: 'property' + }, + 'keyword': /\b(?:as|break|catch|def|elif|else|end|foreach|if|import|include|label|module|modulemeta|null|reduce|then|try|while)\b/, + 'boolean': /\b(?:true|false)\b/, + 'number': /(?:\b\d+\.|\B\.)?\d+(?:[eE][+-]?\d+)?\b/, + + 'operator': [ + { + pattern: /\|=?/, + alias: 'pipe' + }, + /\.\.|[!=<>]?=|\?\/\/|\/\/=?|[-+*/%]=?|[<>?]|\b(?:and|or|not)\b/ + ], + 'c-style-function': { + pattern: /\b[a-z_]\w*(?=\s*\()/i, + alias: 'function' + }, + 'punctuation': /::|[()\[\]{},:;]|\.(?=\s*[\[\w$])/, + 'dot': { + pattern: /\./, + alias: 'important' + } + } + + stringInterpolation.interpolation.inside.content.inside = jq; + +}(Prism)); diff --git a/components/prism-jq.min.js b/components/prism-jq.min.js new file mode 100644 index 0000000000..5c187172a9 --- /dev/null +++ b/components/prism-jq.min.js @@ -0,0 +1 @@ +!function(e){var n="\\\\\\((?:[^()]|\\([^()]*\\))*\\)",t=RegExp('"(?:[^"\r\\n\\\\]|\\\\[^\r\\n(]|__)*"'.replace(/__/g,n)),i={interpolation:{pattern:RegExp("((?:^|[^\\\\])(?:\\\\{2})*)"+n),lookbehind:!0,inside:{content:{pattern:/^(\\\()[\s\S]+(?=\)$)/,lookbehind:!0,inside:null},punctuation:/^\\\(|\)$/}}},a=e.languages.jq={comment:/#.*/,property:{pattern:RegExp(t.source+"(?=\\s*:(?!:))"),greedy:!0,inside:i},string:{pattern:t,greedy:!0,inside:i},function:{pattern:/(\bdef\s+)[a-z_]\w+/i,lookbehind:!0},variable:/\B\$\w+/,"property-literal":{pattern:/[a-z_]\w*(?=\s*:(?!:))/i,alias:"property"},keyword:/\b(?:as|break|catch|def|elif|else|end|foreach|if|import|include|label|module|modulemeta|null|reduce|then|try|while)\b/,boolean:/\b(?:true|false)\b/,number:/(?:\b\d+\.|\B\.)?\d+(?:[eE][+-]?\d+)?\b/,operator:[{pattern:/\|=?/,alias:"pipe"},/\.\.|[!=<>]?=|\?\/\/|\/\/=?|[-+*/%]=?|[<>?]|\b(?:and|or|not)\b/],"c-style-function":{pattern:/\b[a-z_]\w*(?=\s*\()/i,alias:"function"},punctuation:/::|[()\[\]{},:;]|\.(?=\s*[\[\w$])/,dot:{pattern:/\./,alias:"important"}};i.interpolation.inside.content.inside=a}(Prism); \ No newline at end of file diff --git a/examples/prism-jq.html b/examples/prism-jq.html new file mode 100644 index 0000000000..53aead9b7a --- /dev/null +++ b/examples/prism-jq.html @@ -0,0 +1,11 @@ +

    Full example

    +
    # comment
    +def some_method:
    +	to_entries | sort_by(.foo) |
    +	map(.foo) as $keys |
    +	map(.bar) | transpose |
    +	map(
    +		[$keys, .] | transpose |
    +		map({foo: .[0], bar: .[1], "foo-bar": "foo\("-" + "bar")"}) | from_entries
    +	)
    +;
    diff --git a/plugins/show-language/prism-show-language.js b/plugins/show-language/prism-show-language.js index 5a2ea5a9dc..1aa6f6beda 100644 --- a/plugins/show-language/prism-show-language.js +++ b/plugins/show-language/prism-show-language.js @@ -11,7 +11,7 @@ if (!Prism.plugins.toolbar) { } // The languages map is built automatically with gulp -var Languages = /*languages_placeholder[*/{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","css":"CSS","clike":"C-like","js":"JavaScript","abap":"ABAP","abnf":"Augmented Backus–Naur form","apacheconf":"Apache Configuration","apl":"APL","arff":"ARFF","asciidoc":"AsciiDoc","adoc":"AsciiDoc","asm6502":"6502 Assembly","aspnet":"ASP.NET (C#)","autohotkey":"AutoHotkey","autoit":"AutoIt","shell":"Bash","basic":"BASIC","bnf":"Backus–Naur form","rbnf":"Routing Backus–Naur form","csharp":"C#","cs":"C#","dotnet":"C#","cpp":"C++","cil":"CIL","coffee":"CoffeeScript","cmake":"CMake","csp":"Content-Security-Policy","css-extras":"CSS Extras","django":"Django/Jinja2","jinja2":"Django/Jinja2","dockerfile":"Docker","ebnf":"Extended Backus–Naur form","ejs":"EJS","erb":"ERB","fsharp":"F#","gcode":"G-code","gedcom":"GEDCOM","glsl":"GLSL","gml":"GameMaker Language","gamemakerlanguage":"GameMaker Language","graphql":"GraphQL","hs":"Haskell","hcl":"HCL","http":"HTTP","hpkp":"HTTP Public-Key-Pins","hsts":"HTTP Strict-Transport-Security","ichigojam":"IchigoJam","inform7":"Inform 7","javadoc":"JavaDoc","javadoclike":"JavaDoc-like","javastacktrace":"Java stack trace","jsdoc":"JSDoc","js-extras":"JS Extras","json":"JSON","jsonp":"JSONP","json5":"JSON5","latex":"LaTeX","tex":"TeX","context":"ConTeXt","emacs":"Lisp","elisp":"Lisp","emacs-lisp":"Lisp","lolcode":"LOLCODE","md":"Markdown","markup-templating":"Markup templating","matlab":"MATLAB","mel":"MEL","n1ql":"N1QL","n4js":"N4JS","n4jsd":"N4JS","nand2tetris-hdl":"Nand To Tetris HDL","nasm":"NASM","nginx":"nginx","nsis":"NSIS","objectivec":"Objective-C","ocaml":"OCaml","opencl":"OpenCL","parigp":"PARI/GP","objectpascal":"Object Pascal","php":"PHP","phpdoc":"PHPDoc","php-extras":"PHP Extras","plsql":"PL/SQL","powershell":"PowerShell","properties":".properties","protobuf":"Protocol Buffers","py":"Python","q":"Q (kdb+ database)","jsx":"React JSX","tsx":"React TSX","renpy":"Ren'py","rest":"reST (reStructuredText)","rb":"Ruby","sas":"SAS","sass":"Sass (Sass)","scss":"Sass (Scss)","sql":"SQL","soy":"Soy (Closure Template)","tap":"TAP","toml":"TOML","tt2":"Template Toolkit 2","ts":"TypeScript","t4-cs":"T4 Text Templates (C#)","t4":"T4 Text Templates (C#)","t4-vb":"T4 Text Templates (VB)","t4-templating":"T4 templating","vbnet":"VB.Net","vhdl":"VHDL","vim":"vim","visual-basic":"Visual Basic","vb":"Visual Basic","wasm":"WebAssembly","wiki":"Wiki markup","xeoracube":"XeoraCube","xojo":"Xojo (REALbasic)","xquery":"XQuery","yaml":"YAML","yml":"YAML"}/*]*/; +var Languages = /*languages_placeholder[*/{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","css":"CSS","clike":"C-like","js":"JavaScript","abap":"ABAP","abnf":"Augmented Backus–Naur form","apacheconf":"Apache Configuration","apl":"APL","arff":"ARFF","asciidoc":"AsciiDoc","adoc":"AsciiDoc","asm6502":"6502 Assembly","aspnet":"ASP.NET (C#)","autohotkey":"AutoHotkey","autoit":"AutoIt","shell":"Bash","basic":"BASIC","bnf":"Backus–Naur form","rbnf":"Routing Backus–Naur form","csharp":"C#","cs":"C#","dotnet":"C#","cpp":"C++","cil":"CIL","coffee":"CoffeeScript","cmake":"CMake","csp":"Content-Security-Policy","css-extras":"CSS Extras","django":"Django/Jinja2","jinja2":"Django/Jinja2","dockerfile":"Docker","ebnf":"Extended Backus–Naur form","ejs":"EJS","erb":"ERB","fsharp":"F#","gcode":"G-code","gedcom":"GEDCOM","glsl":"GLSL","gml":"GameMaker Language","gamemakerlanguage":"GameMaker Language","graphql":"GraphQL","hs":"Haskell","hcl":"HCL","http":"HTTP","hpkp":"HTTP Public-Key-Pins","hsts":"HTTP Strict-Transport-Security","ichigojam":"IchigoJam","inform7":"Inform 7","javadoc":"JavaDoc","javadoclike":"JavaDoc-like","javastacktrace":"Java stack trace","jq":"JQ","jsdoc":"JSDoc","js-extras":"JS Extras","json":"JSON","jsonp":"JSONP","json5":"JSON5","latex":"LaTeX","tex":"TeX","context":"ConTeXt","emacs":"Lisp","elisp":"Lisp","emacs-lisp":"Lisp","lolcode":"LOLCODE","md":"Markdown","markup-templating":"Markup templating","matlab":"MATLAB","mel":"MEL","n1ql":"N1QL","n4js":"N4JS","n4jsd":"N4JS","nand2tetris-hdl":"Nand To Tetris HDL","nasm":"NASM","nginx":"nginx","nsis":"NSIS","objectivec":"Objective-C","ocaml":"OCaml","opencl":"OpenCL","parigp":"PARI/GP","objectpascal":"Object Pascal","php":"PHP","phpdoc":"PHPDoc","php-extras":"PHP Extras","plsql":"PL/SQL","powershell":"PowerShell","properties":".properties","protobuf":"Protocol Buffers","py":"Python","q":"Q (kdb+ database)","jsx":"React JSX","tsx":"React TSX","renpy":"Ren'py","rest":"reST (reStructuredText)","rb":"Ruby","sas":"SAS","sass":"Sass (Sass)","scss":"Sass (Scss)","sql":"SQL","soy":"Soy (Closure Template)","tap":"TAP","toml":"TOML","tt2":"Template Toolkit 2","ts":"TypeScript","t4-cs":"T4 Text Templates (C#)","t4":"T4 Text Templates (C#)","t4-vb":"T4 Text Templates (VB)","t4-templating":"T4 templating","vbnet":"VB.Net","vhdl":"VHDL","vim":"vim","visual-basic":"Visual Basic","vb":"Visual Basic","wasm":"WebAssembly","wiki":"Wiki markup","xeoracube":"XeoraCube","xojo":"Xojo (REALbasic)","xquery":"XQuery","yaml":"YAML","yml":"YAML"}/*]*/; Prism.plugins.toolbar.registerButton('show-language', function(env) { var pre = env.element.parentNode; diff --git a/plugins/show-language/prism-show-language.min.js b/plugins/show-language/prism-show-language.min.js index 893deac992..a79e18cfe1 100644 --- a/plugins/show-language/prism-show-language.min.js +++ b/plugins/show-language/prism-show-language.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof self&&self.Prism&&self.document)if(Prism.plugins.toolbar){var r={html:"HTML",xml:"XML",svg:"SVG",mathml:"MathML",css:"CSS",clike:"C-like",js:"JavaScript",abap:"ABAP",abnf:"Augmented Backus–Naur form",apacheconf:"Apache Configuration",apl:"APL",arff:"ARFF",asciidoc:"AsciiDoc",adoc:"AsciiDoc",asm6502:"6502 Assembly",aspnet:"ASP.NET (C#)",autohotkey:"AutoHotkey",autoit:"AutoIt",shell:"Bash",basic:"BASIC",bnf:"Backus–Naur form",rbnf:"Routing Backus–Naur form",csharp:"C#",cs:"C#",dotnet:"C#",cpp:"C++",cil:"CIL",coffee:"CoffeeScript",cmake:"CMake",csp:"Content-Security-Policy","css-extras":"CSS Extras",django:"Django/Jinja2",jinja2:"Django/Jinja2",dockerfile:"Docker",ebnf:"Extended Backus–Naur form",ejs:"EJS",erb:"ERB",fsharp:"F#",gcode:"G-code",gedcom:"GEDCOM",glsl:"GLSL",gml:"GameMaker Language",gamemakerlanguage:"GameMaker Language",graphql:"GraphQL",hs:"Haskell",hcl:"HCL",http:"HTTP",hpkp:"HTTP Public-Key-Pins",hsts:"HTTP Strict-Transport-Security",ichigojam:"IchigoJam",inform7:"Inform 7",javadoc:"JavaDoc",javadoclike:"JavaDoc-like",javastacktrace:"Java stack trace",jsdoc:"JSDoc","js-extras":"JS Extras",json:"JSON",jsonp:"JSONP",json5:"JSON5",latex:"LaTeX",tex:"TeX",context:"ConTeXt",emacs:"Lisp",elisp:"Lisp","emacs-lisp":"Lisp",lolcode:"LOLCODE",md:"Markdown","markup-templating":"Markup templating",matlab:"MATLAB",mel:"MEL",n1ql:"N1QL",n4js:"N4JS",n4jsd:"N4JS","nand2tetris-hdl":"Nand To Tetris HDL",nasm:"NASM",nginx:"nginx",nsis:"NSIS",objectivec:"Objective-C",ocaml:"OCaml",opencl:"OpenCL",parigp:"PARI/GP",objectpascal:"Object Pascal",php:"PHP",phpdoc:"PHPDoc","php-extras":"PHP Extras",plsql:"PL/SQL",powershell:"PowerShell",properties:".properties",protobuf:"Protocol Buffers",py:"Python",q:"Q (kdb+ database)",jsx:"React JSX",tsx:"React TSX",renpy:"Ren'py",rest:"reST (reStructuredText)",rb:"Ruby",sas:"SAS",sass:"Sass (Sass)",scss:"Sass (Scss)",sql:"SQL",soy:"Soy (Closure Template)",tap:"TAP",toml:"TOML",tt2:"Template Toolkit 2",ts:"TypeScript","t4-cs":"T4 Text Templates (C#)",t4:"T4 Text Templates (C#)","t4-vb":"T4 Text Templates (VB)","t4-templating":"T4 templating",vbnet:"VB.Net",vhdl:"VHDL",vim:"vim","visual-basic":"Visual Basic",vb:"Visual Basic",wasm:"WebAssembly",wiki:"Wiki markup",xeoracube:"XeoraCube",xojo:"Xojo (REALbasic)",xquery:"XQuery",yaml:"YAML",yml:"YAML"};Prism.plugins.toolbar.registerButton("show-language",function(e){var a=e.element.parentNode;if(a&&/pre/i.test(a.nodeName)){var s,t=a.getAttribute("data-language")||r[e.language]||((s=e.language)?(s.substring(0,1).toUpperCase()+s.substring(1)).replace(/s(?=cript)/,"S"):s);if(t){var o=document.createElement("span");return o.textContent=t,o}}})}else console.warn("Show Languages plugin loaded before Toolbar plugin.")}(); \ No newline at end of file +!function(){if("undefined"!=typeof self&&self.Prism&&self.document)if(Prism.plugins.toolbar){var r={html:"HTML",xml:"XML",svg:"SVG",mathml:"MathML",css:"CSS",clike:"C-like",js:"JavaScript",abap:"ABAP",abnf:"Augmented Backus–Naur form",apacheconf:"Apache Configuration",apl:"APL",arff:"ARFF",asciidoc:"AsciiDoc",adoc:"AsciiDoc",asm6502:"6502 Assembly",aspnet:"ASP.NET (C#)",autohotkey:"AutoHotkey",autoit:"AutoIt",shell:"Bash",basic:"BASIC",bnf:"Backus–Naur form",rbnf:"Routing Backus–Naur form",csharp:"C#",cs:"C#",dotnet:"C#",cpp:"C++",cil:"CIL",coffee:"CoffeeScript",cmake:"CMake",csp:"Content-Security-Policy","css-extras":"CSS Extras",django:"Django/Jinja2",jinja2:"Django/Jinja2",dockerfile:"Docker",ebnf:"Extended Backus–Naur form",ejs:"EJS",erb:"ERB",fsharp:"F#",gcode:"G-code",gedcom:"GEDCOM",glsl:"GLSL",gml:"GameMaker Language",gamemakerlanguage:"GameMaker Language",graphql:"GraphQL",hs:"Haskell",hcl:"HCL",http:"HTTP",hpkp:"HTTP Public-Key-Pins",hsts:"HTTP Strict-Transport-Security",ichigojam:"IchigoJam",inform7:"Inform 7",javadoc:"JavaDoc",javadoclike:"JavaDoc-like",javastacktrace:"Java stack trace",jq:"JQ",jsdoc:"JSDoc","js-extras":"JS Extras",json:"JSON",jsonp:"JSONP",json5:"JSON5",latex:"LaTeX",tex:"TeX",context:"ConTeXt",emacs:"Lisp",elisp:"Lisp","emacs-lisp":"Lisp",lolcode:"LOLCODE",md:"Markdown","markup-templating":"Markup templating",matlab:"MATLAB",mel:"MEL",n1ql:"N1QL",n4js:"N4JS",n4jsd:"N4JS","nand2tetris-hdl":"Nand To Tetris HDL",nasm:"NASM",nginx:"nginx",nsis:"NSIS",objectivec:"Objective-C",ocaml:"OCaml",opencl:"OpenCL",parigp:"PARI/GP",objectpascal:"Object Pascal",php:"PHP",phpdoc:"PHPDoc","php-extras":"PHP Extras",plsql:"PL/SQL",powershell:"PowerShell",properties:".properties",protobuf:"Protocol Buffers",py:"Python",q:"Q (kdb+ database)",jsx:"React JSX",tsx:"React TSX",renpy:"Ren'py",rest:"reST (reStructuredText)",rb:"Ruby",sas:"SAS",sass:"Sass (Sass)",scss:"Sass (Scss)",sql:"SQL",soy:"Soy (Closure Template)",tap:"TAP",toml:"TOML",tt2:"Template Toolkit 2",ts:"TypeScript","t4-cs":"T4 Text Templates (C#)",t4:"T4 Text Templates (C#)","t4-vb":"T4 Text Templates (VB)","t4-templating":"T4 templating",vbnet:"VB.Net",vhdl:"VHDL",vim:"vim","visual-basic":"Visual Basic",vb:"Visual Basic",wasm:"WebAssembly",wiki:"Wiki markup",xeoracube:"XeoraCube",xojo:"Xojo (REALbasic)",xquery:"XQuery",yaml:"YAML",yml:"YAML"};Prism.plugins.toolbar.registerButton("show-language",function(e){var a=e.element.parentNode;if(a&&/pre/i.test(a.nodeName)){var s,t=a.getAttribute("data-language")||r[e.language]||((s=e.language)?(s.substring(0,1).toUpperCase()+s.substring(1)).replace(/s(?=cript)/,"S"):s);if(t){var o=document.createElement("span");return o.textContent=t,o}}})}else console.warn("Show Languages plugin loaded before Toolbar plugin.")}(); \ No newline at end of file diff --git a/tests/languages/jq/boolean_feature.test b/tests/languages/jq/boolean_feature.test new file mode 100644 index 0000000000..f1ddac690c --- /dev/null +++ b/tests/languages/jq/boolean_feature.test @@ -0,0 +1,13 @@ +true +false + +---------------------------------------------------- + +[ + ["boolean", "true"], + ["boolean", "false"] +] + +---------------------------------------------------- + +Checks for booleans. diff --git a/tests/languages/jq/comment_feature.test b/tests/languages/jq/comment_feature.test new file mode 100644 index 0000000000..d7772b59fc --- /dev/null +++ b/tests/languages/jq/comment_feature.test @@ -0,0 +1,13 @@ +# foo +# + +---------------------------------------------------- + +[ + ["comment", "# foo"], + ["comment", "#"] +] + +---------------------------------------------------- + +Checks for comments. diff --git a/tests/languages/jq/dot_feature.test b/tests/languages/jq/dot_feature.test new file mode 100644 index 0000000000..6d9b361f78 --- /dev/null +++ b/tests/languages/jq/dot_feature.test @@ -0,0 +1,11 @@ +. + +---------------------------------------------------- + +[ + ["dot", "."] +] + +---------------------------------------------------- + +Checks for the dot. diff --git a/tests/languages/jq/function_feature.test b/tests/languages/jq/function_feature.test new file mode 100644 index 0000000000..39ee920d8b --- /dev/null +++ b/tests/languages/jq/function_feature.test @@ -0,0 +1,31 @@ +def foo: +def bar(x,y,z): + fooBar(x) + +---------------------------------------------------- + +[ + ["keyword", "def"], + ["function", "foo"], + ["punctuation", ":"], + + ["keyword", "def"], + ["function", "bar"], + ["punctuation", "("], + "x", + ["punctuation", ","], + "y", + ["punctuation", ","], + "z", + ["punctuation", ")"], + ["punctuation", ":"], + + ["c-style-function", "fooBar"], + ["punctuation", "("], + "x", + ["punctuation", ")"] +] + +---------------------------------------------------- + +Checks for functions. diff --git a/tests/languages/jq/keyword_feature.test b/tests/languages/jq/keyword_feature.test new file mode 100644 index 0000000000..a999f27d6d --- /dev/null +++ b/tests/languages/jq/keyword_feature.test @@ -0,0 +1,47 @@ +as +break +catch +def; +elif +else +end +foreach +if +import +include +label +module +modulemeta +null +reduce +then +try +while + +---------------------------------------------------- + +[ + ["keyword", "as"], + ["keyword", "break"], + ["keyword", "catch"], + ["keyword", "def"], ["punctuation", ";"], + ["keyword", "elif"], + ["keyword", "else"], + ["keyword", "end"], + ["keyword", "foreach"], + ["keyword", "if"], + ["keyword", "import"], + ["keyword", "include"], + ["keyword", "label"], + ["keyword", "module"], + ["keyword", "modulemeta"], + ["keyword", "null"], + ["keyword", "reduce"], + ["keyword", "then"], + ["keyword", "try"], + ["keyword", "while"] +] + +---------------------------------------------------- + +Checks for keywords. diff --git a/tests/languages/jq/operator_feature.test b/tests/languages/jq/operator_feature.test new file mode 100644 index 0000000000..91753ed45d --- /dev/null +++ b/tests/languages/jq/operator_feature.test @@ -0,0 +1,46 @@ +.. +== != >= <= < > += ? +?// //= ++ - * / % | += -= *= /= %= |= +and or not + +---------------------------------------------------- + +[ + ["operator", ".."], + + ["operator", "=="], + ["operator", "!="], + ["operator", ">="], + ["operator", "<="], + ["operator", "<"], + ["operator", ">"], + + ["operator", "="], + ["operator", "?"], + + ["operator", "?//"], + ["operator", "//="], + + ["operator", "+"], + ["operator", "-"], + ["operator", "*"], + ["operator", "/"], + ["operator", "%"], + ["operator", "|"], + ["operator", "+="], + ["operator", "-="], + ["operator", "*="], + ["operator", "/="], + ["operator", "%="], + ["operator", "|="], + + ["operator", "and"], + ["operator", "or"], + ["operator", "not"] +] + +---------------------------------------------------- + +Checks for operators. diff --git a/tests/languages/jq/property_feature.test b/tests/languages/jq/property_feature.test new file mode 100644 index 0000000000..440b53c157 --- /dev/null +++ b/tests/languages/jq/property_feature.test @@ -0,0 +1,45 @@ +{ foo: 1, "bar": 2, "foo\("Bar")": 3 } + +# not a property +foo::bar + +---------------------------------------------------- + +[ + ["punctuation", "{"], + ["property-literal", "foo"], + ["punctuation", ":"], + ["number", "1"], + ["punctuation", ","], + ["property", [ + "\"bar\"" + ]], + ["punctuation", ":"], + ["number", "2"], + ["punctuation", ","], + ["property", [ + "\"foo", + ["interpolation", [ + ["punctuation", "\\("], + ["content", [ + ["string", [ + "\"Bar\"" + ]] + ]], + ["punctuation", ")"] + ]], + "\"" + ]], + ["punctuation", ":"], + ["number", "3"], + ["punctuation", "}"], + + ["comment", "# not a property"], + "\r\nfoo", + ["punctuation", "::"], + "bar" +] + +---------------------------------------------------- + +Checks for properties. diff --git a/tests/languages/jq/punctuation_feature.test b/tests/languages/jq/punctuation_feature.test new file mode 100644 index 0000000000..150fb49e5c --- /dev/null +++ b/tests/languages/jq/punctuation_feature.test @@ -0,0 +1,33 @@ +() [] {} +, : ; +:: +.foo +.[] + +---------------------------------------------------- + +[ + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", "["], + ["punctuation", "]"], + ["punctuation", "{"], + ["punctuation", "}"], + + ["punctuation", ","], + ["punctuation", ":"], + ["punctuation", ";"], + + ["punctuation", "::"], + + ["punctuation", "."], + "foo\r\n", + + ["punctuation", "."], + ["punctuation", "["], + ["punctuation", "]"] +] + +---------------------------------------------------- + +Checks for punctuation. diff --git a/tests/languages/jq/string_feature.test b/tests/languages/jq/string_feature.test new file mode 100644 index 0000000000..bcb6fd056b --- /dev/null +++ b/tests/languages/jq/string_feature.test @@ -0,0 +1,42 @@ +"foo" +"\"" +"Aa\r\n\t\b\f\u03bc" +"inter\("pol" + "ation")" + +---------------------------------------------------- + +[ + ["string", [ + "\"foo\"" + ]], + + ["string", [ + "\"\\\"\"" + ]], + + ["string", [ + "\"Aa\\r\\n\\t\\b\\f\\u03bc\"" + ]], + + ["string", [ + "\"inter", + ["interpolation", [ + ["punctuation", "\\("], + ["content", [ + ["string", [ + "\"pol\"" + ]], + ["operator", "+"], + ["string", [ + "\"ation\"" + ]] + ]], + ["punctuation", ")"] + ]], + "\"" + ]] +] + +---------------------------------------------------- + +Checks for strings and string interpolation. diff --git a/tests/languages/jq/variable_feature.test b/tests/languages/jq/variable_feature.test new file mode 100644 index 0000000000..6a79b34fe6 --- /dev/null +++ b/tests/languages/jq/variable_feature.test @@ -0,0 +1,13 @@ +$foo +$_bar123 + +---------------------------------------------------- + +[ + ["variable", "$foo"], + ["variable", "$_bar123"] +] + +---------------------------------------------------- + +Checks for variables. From d4373f3a282f4c09e4fb4dcbd8885c7848b61073 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Sat, 8 Jun 2019 23:50:11 +0200 Subject: [PATCH 0280/1100] gulp: JSON formatting for partly generated files (#1933) This introduces better formatting for the generated JSON objects in the Autoloader and Show language plugins. --- gulpfile.js | 10 +- plugins/autoloader/prism-autoloader.js | 148 +++++++++++++- plugins/show-language/prism-show-language.js | 191 +++++++++++++++---- 3 files changed, 310 insertions(+), 39 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index 0b5752e421..0c6f8a2333 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -148,9 +148,13 @@ function languagePlugins(cb) { } } - const jsonLanguagesMap = JSON.stringify(languagesMap); - const jsonDependenciesMap = JSON.stringify(dependenciesMap); - const jsonAliasMap = JSON.stringify(aliasMap); + function formattedStringify(json) { + return JSON.stringify(json, null, '\t').replace(/\n/g, '\n\t'); + } + + const jsonLanguagesMap = formattedStringify(languagesMap); + const jsonDependenciesMap = formattedStringify(dependenciesMap); + const jsonAliasMap = formattedStringify(aliasMap); const tasks = [ { diff --git a/plugins/autoloader/prism-autoloader.js b/plugins/autoloader/prism-autoloader.js index cd1e82e958..93fd13c588 100644 --- a/plugins/autoloader/prism-autoloader.js +++ b/plugins/autoloader/prism-autoloader.js @@ -4,9 +4,153 @@ } // The dependencies map is built automatically with gulp - var lang_dependencies = /*dependencies_placeholder[*/{"javascript":"clike","actionscript":"javascript","arduino":"cpp","aspnet":["markup","csharp"],"bison":"c","c":"clike","csharp":"clike","cpp":"c","coffeescript":"javascript","crystal":"ruby","css-extras":"css","d":"clike","dart":"clike","django":"markup-templating","ejs":["javascript","markup-templating"],"erb":["ruby","markup-templating"],"fsharp":"clike","flow":"javascript","glsl":"clike","gml":"clike","go":"clike","groovy":"clike","haml":"ruby","handlebars":"markup-templating","haxe":"clike","java":"clike","javadoc":["markup","java","javadoclike"],"jolie":"clike","jsdoc":["javascript","javadoclike"],"js-extras":"javascript","jsonp":"json","json5":"json","kotlin":"clike","less":"css","markdown":"markup","markup-templating":"markup","n4js":"javascript","nginx":"clike","objectivec":"c","opencl":"cpp","parser":"markup","php":["clike","markup-templating"],"phpdoc":["php","javadoclike"],"php-extras":"php","plsql":"sql","processing":"clike","protobuf":"clike","pug":["markup","javascript"],"qore":"clike","jsx":["markup","javascript"],"tsx":["jsx","typescript"],"reason":"clike","ruby":"clike","sass":"css","scss":"css","scala":"java","smarty":"markup-templating","soy":"markup-templating","swift":"clike","tap":"yaml","textile":"markup","tt2":["clike","markup-templating"],"twig":"markup","typescript":"javascript","t4-cs":["t4-templating","csharp"],"t4-vb":["t4-templating","visual-basic"],"vala":"clike","vbnet":"basic","velocity":"markup","wiki":"markup","xeora":"markup","xquery":"markup"}/*]*/; + var lang_dependencies = /*dependencies_placeholder[*/{ + "javascript": "clike", + "actionscript": "javascript", + "arduino": "cpp", + "aspnet": [ + "markup", + "csharp" + ], + "bison": "c", + "c": "clike", + "csharp": "clike", + "cpp": "c", + "coffeescript": "javascript", + "crystal": "ruby", + "css-extras": "css", + "d": "clike", + "dart": "clike", + "django": "markup-templating", + "ejs": [ + "javascript", + "markup-templating" + ], + "erb": [ + "ruby", + "markup-templating" + ], + "fsharp": "clike", + "flow": "javascript", + "glsl": "clike", + "gml": "clike", + "go": "clike", + "groovy": "clike", + "haml": "ruby", + "handlebars": "markup-templating", + "haxe": "clike", + "java": "clike", + "javadoc": [ + "markup", + "java", + "javadoclike" + ], + "jolie": "clike", + "jsdoc": [ + "javascript", + "javadoclike" + ], + "js-extras": "javascript", + "jsonp": "json", + "json5": "json", + "kotlin": "clike", + "less": "css", + "markdown": "markup", + "markup-templating": "markup", + "n4js": "javascript", + "nginx": "clike", + "objectivec": "c", + "opencl": "cpp", + "parser": "markup", + "php": [ + "clike", + "markup-templating" + ], + "phpdoc": [ + "php", + "javadoclike" + ], + "php-extras": "php", + "plsql": "sql", + "processing": "clike", + "protobuf": "clike", + "pug": [ + "markup", + "javascript" + ], + "qore": "clike", + "jsx": [ + "markup", + "javascript" + ], + "tsx": [ + "jsx", + "typescript" + ], + "reason": "clike", + "ruby": "clike", + "sass": "css", + "scss": "css", + "scala": "java", + "smarty": "markup-templating", + "soy": "markup-templating", + "swift": "clike", + "tap": "yaml", + "textile": "markup", + "tt2": [ + "clike", + "markup-templating" + ], + "twig": "markup", + "typescript": "javascript", + "t4-cs": [ + "t4-templating", + "csharp" + ], + "t4-vb": [ + "t4-templating", + "visual-basic" + ], + "vala": "clike", + "vbnet": "basic", + "velocity": "markup", + "wiki": "markup", + "xeora": "markup", + "xquery": "markup" + }/*]*/; - var lang_aliases = /*aliases_placeholder[*/{"html":"markup","xml":"markup","svg":"markup","mathml":"markup","js":"javascript","adoc":"asciidoc","shell":"bash","rbnf":"bnf","cs":"csharp","dotnet":"csharp","coffee":"coffeescript","jinja2":"django","dockerfile":"docker","gamemakerlanguage":"gml","hs":"haskell","tex":"latex","context":"latex","emacs":"lisp","elisp":"lisp","emacs-lisp":"lisp","md":"markdown","n4jsd":"n4js","objectpascal":"pascal","py":"python","rb":"ruby","ts":"typescript","t4":"t4-cs","vb":"visual-basic","xeoracube":"xeora","yml":"yaml"}/*]*/; + var lang_aliases = /*aliases_placeholder[*/{ + "html": "markup", + "xml": "markup", + "svg": "markup", + "mathml": "markup", + "js": "javascript", + "adoc": "asciidoc", + "shell": "bash", + "rbnf": "bnf", + "cs": "csharp", + "dotnet": "csharp", + "coffee": "coffeescript", + "jinja2": "django", + "dockerfile": "docker", + "gamemakerlanguage": "gml", + "hs": "haskell", + "tex": "latex", + "context": "latex", + "emacs": "lisp", + "elisp": "lisp", + "emacs-lisp": "lisp", + "md": "markdown", + "n4jsd": "n4js", + "objectpascal": "pascal", + "py": "python", + "rb": "ruby", + "ts": "typescript", + "t4": "t4-cs", + "vb": "visual-basic", + "xeoracube": "xeora", + "yml": "yaml" + }/*]*/; var lang_data = {}; diff --git a/plugins/show-language/prism-show-language.js b/plugins/show-language/prism-show-language.js index 1aa6f6beda..841918dec8 100644 --- a/plugins/show-language/prism-show-language.js +++ b/plugins/show-language/prism-show-language.js @@ -1,46 +1,169 @@ -(function(){ +(function () { -if (typeof self === 'undefined' || !self.Prism || !self.document) { - return; -} - -if (!Prism.plugins.toolbar) { - console.warn('Show Languages plugin loaded before Toolbar plugin.'); - - return; -} + if (typeof self === 'undefined' || !self.Prism || !self.document) { + return; + } -// The languages map is built automatically with gulp -var Languages = /*languages_placeholder[*/{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","css":"CSS","clike":"C-like","js":"JavaScript","abap":"ABAP","abnf":"Augmented Backus–Naur form","apacheconf":"Apache Configuration","apl":"APL","arff":"ARFF","asciidoc":"AsciiDoc","adoc":"AsciiDoc","asm6502":"6502 Assembly","aspnet":"ASP.NET (C#)","autohotkey":"AutoHotkey","autoit":"AutoIt","shell":"Bash","basic":"BASIC","bnf":"Backus–Naur form","rbnf":"Routing Backus–Naur form","csharp":"C#","cs":"C#","dotnet":"C#","cpp":"C++","cil":"CIL","coffee":"CoffeeScript","cmake":"CMake","csp":"Content-Security-Policy","css-extras":"CSS Extras","django":"Django/Jinja2","jinja2":"Django/Jinja2","dockerfile":"Docker","ebnf":"Extended Backus–Naur form","ejs":"EJS","erb":"ERB","fsharp":"F#","gcode":"G-code","gedcom":"GEDCOM","glsl":"GLSL","gml":"GameMaker Language","gamemakerlanguage":"GameMaker Language","graphql":"GraphQL","hs":"Haskell","hcl":"HCL","http":"HTTP","hpkp":"HTTP Public-Key-Pins","hsts":"HTTP Strict-Transport-Security","ichigojam":"IchigoJam","inform7":"Inform 7","javadoc":"JavaDoc","javadoclike":"JavaDoc-like","javastacktrace":"Java stack trace","jq":"JQ","jsdoc":"JSDoc","js-extras":"JS Extras","json":"JSON","jsonp":"JSONP","json5":"JSON5","latex":"LaTeX","tex":"TeX","context":"ConTeXt","emacs":"Lisp","elisp":"Lisp","emacs-lisp":"Lisp","lolcode":"LOLCODE","md":"Markdown","markup-templating":"Markup templating","matlab":"MATLAB","mel":"MEL","n1ql":"N1QL","n4js":"N4JS","n4jsd":"N4JS","nand2tetris-hdl":"Nand To Tetris HDL","nasm":"NASM","nginx":"nginx","nsis":"NSIS","objectivec":"Objective-C","ocaml":"OCaml","opencl":"OpenCL","parigp":"PARI/GP","objectpascal":"Object Pascal","php":"PHP","phpdoc":"PHPDoc","php-extras":"PHP Extras","plsql":"PL/SQL","powershell":"PowerShell","properties":".properties","protobuf":"Protocol Buffers","py":"Python","q":"Q (kdb+ database)","jsx":"React JSX","tsx":"React TSX","renpy":"Ren'py","rest":"reST (reStructuredText)","rb":"Ruby","sas":"SAS","sass":"Sass (Sass)","scss":"Sass (Scss)","sql":"SQL","soy":"Soy (Closure Template)","tap":"TAP","toml":"TOML","tt2":"Template Toolkit 2","ts":"TypeScript","t4-cs":"T4 Text Templates (C#)","t4":"T4 Text Templates (C#)","t4-vb":"T4 Text Templates (VB)","t4-templating":"T4 templating","vbnet":"VB.Net","vhdl":"VHDL","vim":"vim","visual-basic":"Visual Basic","vb":"Visual Basic","wasm":"WebAssembly","wiki":"Wiki markup","xeoracube":"XeoraCube","xojo":"Xojo (REALbasic)","xquery":"XQuery","yaml":"YAML","yml":"YAML"}/*]*/; + if (!Prism.plugins.toolbar) { + console.warn('Show Languages plugin loaded before Toolbar plugin.'); -Prism.plugins.toolbar.registerButton('show-language', function(env) { - var pre = env.element.parentNode; - if (!pre || !/pre/i.test(pre.nodeName)) { return; } - /** - * Tries to guess the name of a language given its id. - * - * @param {string} id The language id. - * @returns {string} - */ - function guessTitle(id) { - if (!id) { - return id; + // The languages map is built automatically with gulp + var Languages = /*languages_placeholder[*/{ + "html": "HTML", + "xml": "XML", + "svg": "SVG", + "mathml": "MathML", + "css": "CSS", + "clike": "C-like", + "js": "JavaScript", + "abap": "ABAP", + "abnf": "Augmented Backus–Naur form", + "apacheconf": "Apache Configuration", + "apl": "APL", + "arff": "ARFF", + "asciidoc": "AsciiDoc", + "adoc": "AsciiDoc", + "asm6502": "6502 Assembly", + "aspnet": "ASP.NET (C#)", + "autohotkey": "AutoHotkey", + "autoit": "AutoIt", + "shell": "Bash", + "basic": "BASIC", + "bnf": "Backus–Naur form", + "rbnf": "Routing Backus–Naur form", + "csharp": "C#", + "cs": "C#", + "dotnet": "C#", + "cpp": "C++", + "cil": "CIL", + "coffee": "CoffeeScript", + "cmake": "CMake", + "csp": "Content-Security-Policy", + "css-extras": "CSS Extras", + "django": "Django/Jinja2", + "jinja2": "Django/Jinja2", + "dockerfile": "Docker", + "ebnf": "Extended Backus–Naur form", + "ejs": "EJS", + "erb": "ERB", + "fsharp": "F#", + "gcode": "G-code", + "gedcom": "GEDCOM", + "glsl": "GLSL", + "gml": "GameMaker Language", + "gamemakerlanguage": "GameMaker Language", + "graphql": "GraphQL", + "hs": "Haskell", + "hcl": "HCL", + "http": "HTTP", + "hpkp": "HTTP Public-Key-Pins", + "hsts": "HTTP Strict-Transport-Security", + "ichigojam": "IchigoJam", + "inform7": "Inform 7", + "javadoc": "JavaDoc", + "javadoclike": "JavaDoc-like", + "javastacktrace": "Java stack trace", + "jq": "JQ", + "jsdoc": "JSDoc", + "js-extras": "JS Extras", + "json": "JSON", + "jsonp": "JSONP", + "json5": "JSON5", + "latex": "LaTeX", + "tex": "TeX", + "context": "ConTeXt", + "emacs": "Lisp", + "elisp": "Lisp", + "emacs-lisp": "Lisp", + "lolcode": "LOLCODE", + "md": "Markdown", + "markup-templating": "Markup templating", + "matlab": "MATLAB", + "mel": "MEL", + "n1ql": "N1QL", + "n4js": "N4JS", + "n4jsd": "N4JS", + "nand2tetris-hdl": "Nand To Tetris HDL", + "nasm": "NASM", + "nginx": "nginx", + "nsis": "NSIS", + "objectivec": "Objective-C", + "ocaml": "OCaml", + "opencl": "OpenCL", + "parigp": "PARI/GP", + "objectpascal": "Object Pascal", + "php": "PHP", + "phpdoc": "PHPDoc", + "php-extras": "PHP Extras", + "plsql": "PL/SQL", + "powershell": "PowerShell", + "properties": ".properties", + "protobuf": "Protocol Buffers", + "py": "Python", + "q": "Q (kdb+ database)", + "jsx": "React JSX", + "tsx": "React TSX", + "renpy": "Ren'py", + "rest": "reST (reStructuredText)", + "rb": "Ruby", + "sas": "SAS", + "sass": "Sass (Sass)", + "scss": "Sass (Scss)", + "sql": "SQL", + "soy": "Soy (Closure Template)", + "tap": "TAP", + "toml": "TOML", + "tt2": "Template Toolkit 2", + "ts": "TypeScript", + "t4-cs": "T4 Text Templates (C#)", + "t4": "T4 Text Templates (C#)", + "t4-vb": "T4 Text Templates (VB)", + "t4-templating": "T4 templating", + "vbnet": "VB.Net", + "vhdl": "VHDL", + "vim": "vim", + "visual-basic": "Visual Basic", + "vb": "Visual Basic", + "wasm": "WebAssembly", + "wiki": "Wiki markup", + "xeoracube": "XeoraCube", + "xojo": "Xojo (REALbasic)", + "xquery": "XQuery", + "yaml": "YAML", + "yml": "YAML" + }/*]*/; + + Prism.plugins.toolbar.registerButton('show-language', function (env) { + var pre = env.element.parentNode; + if (!pre || !/pre/i.test(pre.nodeName)) { + return; } - return (id.substring(0, 1).toUpperCase() + id.substring(1)).replace(/s(?=cript)/, 'S'); - } - var language = pre.getAttribute('data-language') || Languages[env.language] || guessTitle(env.language); + /** + * Tries to guess the name of a language given its id. + * + * @param {string} id The language id. + * @returns {string} + */ + function guessTitle(id) { + if (!id) { + return id; + } + return (id.substring(0, 1).toUpperCase() + id.substring(1)).replace(/s(?=cript)/, 'S'); + } - if(!language) { - return; - } - var element = document.createElement('span'); - element.textContent = language; + var language = pre.getAttribute('data-language') || Languages[env.language] || guessTitle(env.language); + + if (!language) { + return; + } + var element = document.createElement('span'); + element.textContent = language; - return element; -}); + return element; + }); })(); From 363281b347b9acfc8fbff3013102c243011a55e3 Mon Sep 17 00:00:00 2001 From: Alice M <40308596+alice-mm@users.noreply.github.com> Date: Mon, 10 Jun 2019 13:29:03 +0200 Subject: [PATCH 0281/1100] Bash improvements (#1443) A bunch for improvements for Bash. --- components/prism-bash.js | 169 +++++-- components/prism-bash.min.js | 2 +- .../bash/arithmetic_environment_feature.test | 2 +- tests/languages/bash/assign-left_feature.test | 23 + tests/languages/bash/builtin_feature.test | 95 ++++ .../bash/command_substitution_feature.test | 10 +- tests/languages/bash/comment_feature.test | 14 +- .../bash/entities_in_strings_feature.test | 28 ++ tests/languages/bash/environment_feature.test | 247 ++++++++++ .../languages/bash/for-or-select_feature.test | 25 + .../languages/bash/function-name_feature.test | 41 ++ tests/languages/bash/function_feature.test | 441 ++++++++++++++---- tests/languages/bash/keyword_feature.test | 43 +- tests/languages/bash/operator_feature.test | 68 +++ tests/languages/bash/shebang_feature.test | 8 +- tests/languages/bash/string_feature.test | 26 +- tests/languages/bash/variable_feature.test | 21 +- 17 files changed, 1095 insertions(+), 168 deletions(-) create mode 100644 tests/languages/bash/assign-left_feature.test create mode 100644 tests/languages/bash/builtin_feature.test create mode 100644 tests/languages/bash/entities_in_strings_feature.test create mode 100644 tests/languages/bash/environment_feature.test create mode 100644 tests/languages/bash/for-or-select_feature.test create mode 100644 tests/languages/bash/function-name_feature.test create mode 100644 tests/languages/bash/operator_feature.test diff --git a/components/prism-bash.js b/components/prism-bash.js index 534fbe6ac5..2fac80997c 100644 --- a/components/prism-bash.js +++ b/components/prism-bash.js @@ -1,84 +1,197 @@ (function(Prism) { + // $ set | grep '^[A-Z][^[:space:]]*=' | cut -d= -f1 | tr '\n' '|' + // + LC_ALL, RANDOM, REPLY, SECONDS. + // + make sure PS1..4 are here as they are not always set, + // - some useless things. + var envVars = '\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b'; var insideString = { - variable: [ - // Arithmetic Environment + 'environment': { + pattern: RegExp("\\$" + envVars), + alias: 'constant' + }, + 'variable': [ + // [0]: Arithmetic Environment { pattern: /\$?\(\([\s\S]+?\)\)/, + greedy: true, inside: { // If there is a $ sign at the beginning highlight $(( and )) as variable - variable: [{ + 'variable': [ + { pattern: /(^\$\(\([\s\S]+)\)\)/, lookbehind: true }, /^\$\(\(/ ], - number: /\b0x[\dA-Fa-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:[Ee]-?\d+)?/, + 'number': /\b0x[\dA-Fa-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:[Ee]-?\d+)?/, // Operators according to https://www.gnu.org/software/bash/manual/bashref.html#Shell-Arithmetic - operator: /--?|-=|\+\+?|\+=|!=?|~|\*\*?|\*=|\/=?|%=?|<<=?|>>=?|<=?|>=?|==?|&&?|&=|\^=?|\|\|?|\|=|\?|:/, + 'operator': /--?|-=|\+\+?|\+=|!=?|~|\*\*?|\*=|\/=?|%=?|<<=?|>>=?|<=?|>=?|==?|&&?|&=|\^=?|\|\|?|\|=|\?|:/, // If there is no $ sign at the beginning highlight (( and )) as punctuation - punctuation: /\(\(?|\)\)?|,|;/ + 'punctuation': /\(\(?|\)\)?|,|;/ + } + }, + // [1]: Command Substitution + { + pattern: /\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/, + greedy: true, + inside: { + 'variable': /^\$\(|^`|\)$|`$/ } }, - // Command Substitution + // [2]: Brace expansion { - pattern: /\$\([^)]+\)|`[^`]+`/, + pattern: /\$\{[^}]+\}/, greedy: true, inside: { - variable: /^\$\(|^`|\)$|`$/ + 'operator': /:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/, + 'punctuation': /[\[\]]/, + 'environment': { + pattern: RegExp("(\\{)" + envVars), + lookbehind: true, + alias: 'constant' + } } }, - /\$(?:[\w#?*!@]+|\{[^}]+\})/i - ] + /\$(?:\w+|[#?*!@$])/ + ], + // Escape sequences from echo and printf's manuals, and escaped quotes. + 'entity': /\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|x[0-9a-fA-F]{1,2}|u[0-9a-fA-F]{4}|U[0-9a-fA-F]{8})/ }; Prism.languages.bash = { 'shebang': { - pattern: /^#!\s*\/bin\/bash|^#!\s*\/bin\/sh/, + pattern: /^#!\s*\/.*/, alias: 'important' }, 'comment': { - pattern: /(^|[^"{\\])#.*/, + pattern: /(^|[^"{\\$])#.*/, + lookbehind: true + }, + 'function-name': [ + // a) function foo { + // b) foo() { + // c) function foo() { + // but not “foo {” + { + // a) and c) + pattern: /(\bfunction\s+)\w+(?=(?:\s*\(?:\s*\))?\s*\{)/, + lookbehind: true, + alias: 'function' + }, + { + // b) + pattern: /\b\w+(?=\s*\(\s*\)\s*\{)/, + alias: 'function' + } + ], + // Highlight variable names as variables in for and select beginnings. + 'for-or-select': { + pattern: /(\b(?:for|select)\s+)\w+(?=\s+in\s)/, + alias: 'variable', + lookbehind: true + }, + // Highlight variable names as variables in the left-hand part + // of assignments (“=” and “+=”). + 'assign-left': { + pattern: /(^|[\s;|&]|[<>]\()\w+(?=\+?=)/, + inside: { + 'environment': { + pattern: RegExp("(^|[\\s;|&]|[<>]\\()" + envVars), + lookbehind: true, + alias: 'constant' + } + }, + alias: 'variable', lookbehind: true }, 'string': [ - //Support for Here-Documents https://en.wikipedia.org/wiki/Here_document + // Support for Here-documents https://en.wikipedia.org/wiki/Here_document { - pattern: /((?:^|[^<])<<\s*)["']?(\w+?)["']?\s*\r?\n(?:[\s\S])*?\r?\n\2/, + pattern: /((?:^|[^<])<<-?\s*)(\w+?)\s*(?:\r?\n|\r)(?:[\s\S])*?(?:\r?\n|\r)\2/, lookbehind: true, greedy: true, inside: insideString }, + // Here-document with quotes around the tag + // → No expansion (so no “inside”). + { + pattern: /((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s*(?:\r?\n|\r)(?:[\s\S])*?(?:\r?\n|\r)\3/, + lookbehind: true, + greedy: true + }, + // “Normal” string { pattern: /(["'])(?:\\[\s\S]|\$\([^)]+\)|`[^`]+`|(?!\1)[^\\])*\1/, greedy: true, inside: insideString } ], + 'environment': { + pattern: RegExp("\\$?" + envVars), + alias: 'constant' + }, 'variable': insideString.variable, - // Originally based on http://ss64.com/bash/ 'function': { - pattern: /(^|[\s;|&])(?:add|alias|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|builtin|bzip2|cal|cat|cd|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|comm|command|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|du|egrep|eject|enable|env|ethtool|eval|exec|expand|expect|export|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|getopts|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|hash|head|help|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|jobs|join|kill|killall|less|link|ln|locate|logname|logout|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|popd|pr|printcap|printenv|printf|ps|pushd|pv|pwd|quota|quotacheck|quotactl|ram|rar|rcp|read|readarray|readonly|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|shift|shopt|shutdown|sleep|slocate|sort|source|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|tail|tar|tee|test|time|timeout|times|top|touch|tr|traceroute|trap|tsort|tty|type|ulimit|umask|umount|unalias|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zip|zypper)(?=$|[\s;|&])/, + pattern: /(^|[\s;|&]|[<>]\()(?:add|apropos|apt|aptitude|apt-cache|apt-get|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/, lookbehind: true }, 'keyword': { - pattern: /(^|[\s;|&])(?:let|:|\.|if|then|else|elif|fi|for|break|continue|while|in|case|function|select|do|done|until|echo|exit|return|set|declare)(?=$|[\s;|&])/, + pattern: /(^|[\s;|&]|[<>]\()(?:if|then|else|elif|fi|for|while|in|case|esac|function|select|do|done|until)(?=$|[)\s;|&])/, lookbehind: true }, + // https://www.gnu.org/software/bash/manual/html_node/Shell-Builtin-Commands.html + 'builtin': { + pattern: /(^|[\s;|&]|[<>]\()(?:\.|:|break|cd|continue|eval|exec|exit|export|getopts|hash|pwd|readonly|return|shift|test|times|trap|umask|unset|alias|bind|builtin|caller|command|declare|echo|enable|help|let|local|logout|mapfile|printf|read|readarray|source|type|typeset|ulimit|unalias|set|shopt)(?=$|[)\s;|&])/, + lookbehind: true, + // Alias added to make those easier to distinguish from strings. + alias: 'class-name' + }, 'boolean': { - pattern: /(^|[\s;|&])(?:true|false)(?=$|[\s;|&])/, + pattern: /(^|[\s;|&]|[<>]\()(?:true|false)(?=$|[)\s;|&])/, lookbehind: true }, - 'operator': /&&?|\|\|?|==?|!=?|<<>|<=?|>=?|=~/, - 'punctuation': /\$?\(\(?|\)\)?|\.\.|[{}[\];]/ + 'file-descriptor': { + pattern: /\B&\d\b/, + alias: 'important' + }, + 'operator': { + // Lots of redirections here, but not just that. + pattern: /\d?<>|>\||\+=|==?|!=?|=~|<<[<-]?|[&\d]?>>|\d?[<>]&?|&[>&]?|\|[&|]?|<=?|>=?/, + inside: { + 'file-descriptor': { + pattern: /^\d/, + alias: 'important' + } + } + }, + 'punctuation': /\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/, + 'number': { + pattern: /(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/, + lookbehind: true + } }; + /* Patterns in command substitution. */ + var toBeCopied = [ + 'comment', + 'function-name', + 'for-or-select', + 'assign-left', + 'string', + 'environment', + 'function', + 'keyword', + 'builtin', + 'boolean', + 'file-descriptor', + 'operator', + 'punctuation', + 'number' + ]; var inside = insideString.variable[1].inside; - inside.string = Prism.languages.bash.string; - inside['function'] = Prism.languages.bash['function']; - inside.keyword = Prism.languages.bash.keyword; - inside['boolean'] = Prism.languages.bash['boolean']; - inside.operator = Prism.languages.bash.operator; - inside.punctuation = Prism.languages.bash.punctuation; - + for(var i = 0; i < toBeCopied.length; i++) { + inside[toBeCopied[i]] = Prism.languages.bash[toBeCopied[i]]; + } + Prism.languages.shell = Prism.languages.bash; })(Prism); diff --git a/components/prism-bash.min.js b/components/prism-bash.min.js index bb6819656b..5cde45fc37 100644 --- a/components/prism-bash.min.js +++ b/components/prism-bash.min.js @@ -1 +1 @@ -!function(e){var a={variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--?|-=|\+\+?|\+=|!=?|~|\*\*?|\*=|\/=?|%=?|<<=?|>>=?|<=?|>=?|==?|&&?|&=|\^=?|\|\|?|\|=|\?|:/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\([^)]+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},/\$(?:[\w#?*!@]+|\{[^}]+\})/i]};e.languages.bash={shebang:{pattern:/^#!\s*\/bin\/bash|^#!\s*\/bin\/sh/,alias:"important"},comment:{pattern:/(^|[^"{\\])#.*/,lookbehind:!0},string:[{pattern:/((?:^|[^<])<<\s*)["']?(\w+?)["']?\s*\r?\n(?:[\s\S])*?\r?\n\2/,lookbehind:!0,greedy:!0,inside:a},{pattern:/(["'])(?:\\[\s\S]|\$\([^)]+\)|`[^`]+`|(?!\1)[^\\])*\1/,greedy:!0,inside:a}],variable:a.variable,function:{pattern:/(^|[\s;|&])(?:add|alias|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|builtin|bzip2|cal|cat|cd|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|comm|command|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|du|egrep|eject|enable|env|ethtool|eval|exec|expand|expect|export|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|getopts|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|hash|head|help|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|jobs|join|kill|killall|less|link|ln|locate|logname|logout|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|popd|pr|printcap|printenv|printf|ps|pushd|pv|pwd|quota|quotacheck|quotactl|ram|rar|rcp|read|readarray|readonly|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|shift|shopt|shutdown|sleep|slocate|sort|source|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|tail|tar|tee|test|time|timeout|times|top|touch|tr|traceroute|trap|tsort|tty|type|ulimit|umask|umount|unalias|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zip|zypper)(?=$|[\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&])(?:let|:|\.|if|then|else|elif|fi|for|break|continue|while|in|case|function|select|do|done|until|echo|exit|return|set|declare)(?=$|[\s;|&])/,lookbehind:!0},boolean:{pattern:/(^|[\s;|&])(?:true|false)(?=$|[\s;|&])/,lookbehind:!0},operator:/&&?|\|\|?|==?|!=?|<<>|<=?|>=?|=~/,punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];]/};var t=a.variable[1].inside;t.string=e.languages.bash.string,t.function=e.languages.bash.function,t.keyword=e.languages.bash.keyword,t.boolean=e.languages.bash.boolean,t.operator=e.languages.bash.operator,t.punctuation=e.languages.bash.punctuation,e.languages.shell=e.languages.bash}(Prism); \ No newline at end of file +!function(e){var t="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",n={environment:{pattern:RegExp("\\$"+t),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--?|-=|\+\+?|\+=|!=?|~|\*\*?|\*=|\/=?|%=?|<<=?|>>=?|<=?|>=?|==?|&&?|&=|\^=?|\|\|?|\|=|\?|:/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+t),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|x[0-9a-fA-F]{1,2}|u[0-9a-fA-F]{4}|U[0-9a-fA-F]{8})/};e.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)\w+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b\w+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+t),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+?)\s*(?:\r?\n|\r)(?:[\s\S])*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:n},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s*(?:\r?\n|\r)(?:[\s\S])*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0},{pattern:/(["'])(?:\\[\s\S]|\$\([^)]+\)|`[^`]+`|(?!\1)[^\\])*\1/,greedy:!0,inside:n}],environment:{pattern:RegExp("\\$?"+t),alias:"constant"},variable:n.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|aptitude|apt-cache|apt-get|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:if|then|else|elif|fi|for|while|in|case|esac|function|select|do|done|until)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|break|cd|continue|eval|exec|exit|export|getopts|hash|pwd|readonly|return|shift|test|times|trap|umask|unset|alias|bind|builtin|caller|command|declare|echo|enable|help|let|local|logout|mapfile|printf|read|readarray|source|type|typeset|ulimit|unalias|set|shopt)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:true|false)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|==?|!=?|=~|<<[<-]?|[&\d]?>>|\d?[<>]&?|&[>&]?|\|[&|]?|<=?|>=?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}};for(var a=["comment","function-name","for-or-select","assign-left","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],r=n.variable[1].inside,s=0;s c +a >&2 +a 2<& +a <> b +a &>> b +a && b || c + +<(yes) <(if true; then :; fi) <(echo) <(true) +<(for x in a b; do :; done) +<(select x in a b; do :; done) +>(yes) >(if true; then :; fi) >(echo) >(true) +>(for x in a b; do :; done) +>(select x in a b; do :; done) + +${x:1:2} ${x:-a} ${x:=a} ${x:?a} ${x:+a} +${!x} ${x/a/b} +${x#*a} ${x##*a} ${x%a*} ${x%%a*} +${x^a} ${x^^a} ${x,a} ${x,,a} + +---------------------------------------------------- + +[ + "a ", ["operator", ["|&"]], " b ", ["operator", ["&>"]], " c\r\na ", + ["operator", [">"]], ["file-descriptor", "&2"], "\r\na ", + ["operator", [ + ["file-descriptor", "2"], "<&" + ]], + "\r\na ", ["operator", ["<>"]], " b\r\na ", + ["operator", ["&>>"]], " b\r\na ", + ["operator", ["&&"]], " b ", ["operator", ["||"]], " c\r\n\r\n", + ["operator", ["<"]], ["punctuation", "("], ["function", "yes"], ["punctuation", ")"], + ["operator", ["<"]], ["punctuation", "("], ["keyword", "if"], ["boolean", "true"], ["punctuation", ";"], + ["keyword", "then"], ["builtin", ":"], ["punctuation", ";"], ["keyword", "fi"], ["punctuation", ")"], + ["operator", ["<"]], ["punctuation", "("], ["builtin", "echo"], ["punctuation", ")"], + ["operator", ["<"]], ["punctuation", "("], ["boolean", "true"], ["punctuation", ")"], + ["operator", ["<"]], ["punctuation", "("], ["keyword", "for"], ["for-or-select", "x"], ["keyword", "in"], " a b", ["punctuation", ";"], + ["keyword", "do"], ["builtin", ":"], ["punctuation", ";"], ["keyword", "done"], ["punctuation", ")"], + ["operator", ["<"]], ["punctuation", "("], ["keyword", "select"], ["for-or-select", "x"], ["keyword", "in"], " a b", ["punctuation", ";"], + ["keyword", "do"], ["builtin", ":"], ["punctuation", ";"], ["keyword", "done"], ["punctuation", ")"], + ["operator", [">"]], ["punctuation", "("], ["function", "yes"], ["punctuation", ")"], + ["operator", [">"]], ["punctuation", "("], ["keyword", "if"], ["boolean", "true"], ["punctuation", ";"], + ["keyword", "then"], ["builtin", ":"], ["punctuation", ";"], ["keyword", "fi"], ["punctuation", ")"], + ["operator", [">"]], ["punctuation", "("], ["builtin", "echo"], ["punctuation", ")"], + ["operator", [">"]], ["punctuation", "("], ["boolean", "true"], ["punctuation", ")"], + ["operator", [">"]], ["punctuation", "("], ["keyword", "for"], ["for-or-select", "x"], ["keyword", "in"], " a b", ["punctuation", ";"], + ["keyword", "do"], ["builtin", ":"], ["punctuation", ";"], ["keyword", "done"], ["punctuation", ")"], + ["operator", [">"]], ["punctuation", "("], ["keyword", "select"], ["for-or-select", "x"], ["keyword", "in"], " a b", ["punctuation", ";"], + ["keyword", "do"], ["builtin", ":"], ["punctuation", ";"], ["keyword", "done"], ["punctuation", ")"], + ["variable", ["${x", ["operator", ":"], "1", ["operator", ":"], "2}"]], + ["variable", ["${x", ["operator", ":-"], "a}"]], + ["variable", ["${x", ["operator", ":="], "a}"]], + ["variable", ["${x", ["operator", ":?"], "a}"]], + ["variable", ["${x", ["operator", ":+"], "a}"]], + ["variable", ["${", ["operator", "!"], "x}"]], + ["variable", ["${x", ["operator", "/"], "a", ["operator", "/"], "b}"]], + ["variable", ["${x", ["operator", "#"], "*a}"]], + ["variable", ["${x", ["operator", "##"], "*a}"]], + ["variable", ["${x", ["operator", "%"], "a*}"]], + ["variable", ["${x", ["operator", "%%"], "a*}"]], + ["variable", ["${x", ["operator", "^"], "a}"]], + ["variable", ["${x", ["operator", "^^"], "a}"]], + ["variable", ["${x", ["operator", ","], "a}"]], + ["variable", ["${x", ["operator", ",,"], "a}"]] +] + +---------------------------------------------------- + +Checks for operators. diff --git a/tests/languages/bash/shebang_feature.test b/tests/languages/bash/shebang_feature.test index c41860d026..f113bc0176 100644 --- a/tests/languages/bash/shebang_feature.test +++ b/tests/languages/bash/shebang_feature.test @@ -1,11 +1,13 @@ -#!/bin/bash +#! /usr/bin/env bash +#/bin/bash ---------------------------------------------------- [ - ["shebang", "#!/bin/bash"] + ["shebang", "#! /usr/bin/env bash"], + ["comment", "#/bin/bash"] ] ---------------------------------------------------- -Checks for shebang. \ No newline at end of file +Checks for shebang. diff --git a/tests/languages/bash/string_feature.test b/tests/languages/bash/string_feature.test index fd2a30317d..d43fdcc704 100644 --- a/tests/languages/bash/string_feature.test +++ b/tests/languages/bash/string_feature.test @@ -14,6 +14,10 @@ bar' foo bar STRING_END +<<- STRING_END +foo +bar +STRING_END << EOF foo $@ bar @@ -24,7 +28,7 @@ EOF EOF << "EOF" foo -bar +$bar EOF << STRING_END # comment @@ -46,17 +50,19 @@ STRING_END "\"", ["variable", "$@"], "\"" ]], ["string", [ - "\"", ["variable", "${foo}"], "\"" + "\"", ["variable", ["${foo}"]], "\"" ]], - ["operator", "<<"], + ["operator", ["<<"]], + ["string", ["STRING_END\r\nfoo\r\nbar\r\nSTRING_END"]], + ["operator", ["<<-"]], ["string", ["STRING_END\r\nfoo\r\nbar\r\nSTRING_END"]], - ["operator", "<<"], + ["operator", ["<<"]], ["string", ["EOF\r\nfoo ", ["variable", "$@"], "\r\nbar\r\nEOF"]], - ["operator", "<<"], - ["string", ["'EOF'\r\n'single quoted string'\r\n\"double quoted string\"\r\nEOF"]], - ["operator", "<<"], - ["string", ["\"EOF\"\r\nfoo\r\nbar\r\nEOF"]], - ["operator", "<<"], + ["operator", ["<<"]], + ["string", "'EOF'\r\n'single quoted string'\r\n\"double quoted string\"\r\nEOF"], + ["operator", ["<<"]], + ["string", "\"EOF\"\r\nfoo\r\n$bar\r\nEOF"], + ["operator", ["<<"]], ["string", ["STRING_END\r\n# comment\r\nSTRING_END"]], ["string", ["\" # comment \""]] ] @@ -64,4 +70,4 @@ STRING_END ---------------------------------------------------- Checks for single-quoted and double-quoted strings. -Also checks for variables in strings. \ No newline at end of file +Also checks for variables in strings. diff --git a/tests/languages/bash/variable_feature.test b/tests/languages/bash/variable_feature.test index 16b7448aa3..546631e156 100644 --- a/tests/languages/bash/variable_feature.test +++ b/tests/languages/bash/variable_feature.test @@ -1,15 +1,28 @@ $foo -$@ -${foo bar} +$* $@ $# $? $$ $! $0 +${foo} +$!!!! $???? ---------------------------------------------------- [ ["variable", "$foo"], + ["variable", "$*"], ["variable", "$@"], - ["variable", "${foo bar}"] + ["variable", "$#"], + ["variable", "$?"], + ["variable", "$$"], + ["variable", "$!"], + ["variable", "$0"], + ["variable", ["${foo}"]], + ["variable", "$!"], + ["operator", ["!"]], + ["operator", ["!"]], + ["operator", ["!"]], + ["variable", "$?"], + "???" ] ---------------------------------------------------- -Checks for variables. \ No newline at end of file +Checks for variables. From feb1b6f5708695fd3ba9a423d463f14629912d9b Mon Sep 17 00:00:00 2001 From: dovisutu <40313014+dovisutu@users.noreply.github.com> Date: Wed, 12 Jun 2019 19:34:29 +0800 Subject: [PATCH 0282/1100] Add the 'struct' keyword to Julia (#1941) Added to the key word list and updated tests. --- components/prism-julia.js | 2 +- components/prism-julia.min.js | 2 +- tests/languages/julia/keyword_feature.test | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/components/prism-julia.js b/components/prism-julia.js index b11b6284a9..8fa770f3b1 100644 --- a/components/prism-julia.js +++ b/components/prism-julia.js @@ -4,7 +4,7 @@ Prism.languages.julia= { lookbehind: true }, 'string': /("""|''')[\s\S]+?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2/, - 'keyword' : /\b(?:abstract|baremodule|begin|bitstype|break|catch|ccall|const|continue|do|else|elseif|end|export|finally|for|function|global|if|immutable|import|importall|in|let|local|macro|module|print|println|quote|return|try|type|typealias|using|while)\b/, + 'keyword' : /\b(?:abstract|baremodule|begin|bitstype|break|catch|ccall|const|continue|do|else|elseif|end|export|finally|for|function|global|if|immutable|import|importall|in|let|local|macro|module|print|println|quote|return|struct|try|type|typealias|using|while)\b/, 'boolean' : /\b(?:true|false)\b/, 'number' : /(?:\b(?=\d)|\B(?=\.))(?:0[box])?(?:[\da-f]+\.?\d*|\.\d+)(?:[efp][+-]?\d+)?j?/i, 'operator': /[-+*^%÷&$\\]=?|\/[\/=]?|!=?=?|\|[=>]?|<(?:<=?|[=:])?|>(?:=|>>?=?)?|==?=?|[~≠≤≥]/, diff --git a/components/prism-julia.min.js b/components/prism-julia.min.js index 5af9a7b928..b47d12c34a 100644 --- a/components/prism-julia.min.js +++ b/components/prism-julia.min.js @@ -1 +1 @@ -Prism.languages.julia={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0},string:/("""|''')[\s\S]+?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2/,keyword:/\b(?:abstract|baremodule|begin|bitstype|break|catch|ccall|const|continue|do|else|elseif|end|export|finally|for|function|global|if|immutable|import|importall|in|let|local|macro|module|print|println|quote|return|try|type|typealias|using|while)\b/,boolean:/\b(?:true|false)\b/,number:/(?:\b(?=\d)|\B(?=\.))(?:0[box])?(?:[\da-f]+\.?\d*|\.\d+)(?:[efp][+-]?\d+)?j?/i,operator:/[-+*^%÷&$\\]=?|\/[\/=]?|!=?=?|\|[=>]?|<(?:<=?|[=:])?|>(?:=|>>?=?)?|==?=?|[~≠≤≥]/,punctuation:/[{}[\];(),.:]/,constant:/\b(?:(?:NaN|Inf)(?:16|32|64)?)\b/}; \ No newline at end of file +Prism.languages.julia={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0},string:/("""|''')[\s\S]+?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2/,keyword:/\b(?:abstract|baremodule|begin|bitstype|break|catch|ccall|const|continue|do|else|elseif|end|export|finally|for|function|global|if|immutable|import|importall|in|let|local|macro|module|print|println|quote|return|struct|try|type|typealias|using|while)\b/,boolean:/\b(?:true|false)\b/,number:/(?:\b(?=\d)|\B(?=\.))(?:0[box])?(?:[\da-f]+\.?\d*|\.\d+)(?:[efp][+-]?\d+)?j?/i,operator:/[-+*^%÷&$\\]=?|\/[\/=]?|!=?=?|\|[=>]?|<(?:<=?|[=:])?|>(?:=|>>?=?)?|==?=?|[~≠≤≥]/,punctuation:/[{}[\];(),.:]/,constant:/\b(?:(?:NaN|Inf)(?:16|32|64)?)\b/}; \ No newline at end of file diff --git a/tests/languages/julia/keyword_feature.test b/tests/languages/julia/keyword_feature.test index 701a91d44f..546d94749b 100644 --- a/tests/languages/julia/keyword_feature.test +++ b/tests/languages/julia/keyword_feature.test @@ -8,6 +8,7 @@ immutable import importall in let local macro module print println quote return try type +struct typealias using while ---------------------------------------------------- @@ -23,6 +24,7 @@ typealias using while ["keyword", "let"], ["keyword", "local"], ["keyword", "macro"], ["keyword", "module"], ["keyword", "print"], ["keyword", "println"], ["keyword", "quote"], ["keyword", "return"], ["keyword", "try"], ["keyword", "type"], + ["keyword", "struct"], ["keyword", "typealias"], ["keyword", "using"], ["keyword", "while"] ] From 4b6b6e8b5f11736b74bfcc3cb2378ccf7ad55fea Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Wed, 12 Jun 2019 15:21:10 +0200 Subject: [PATCH 0283/1100] SCSS: Fixed exponential time failing of url pattern (#1938) The url pattern used to fail in exponential time for some input strings. This fixes this issue. --- components/prism-scss.js | 2 +- components/prism-scss.min.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/components/prism-scss.js b/components/prism-scss.js index 44ea484ba3..b284b1fbfa 100644 --- a/components/prism-scss.js +++ b/components/prism-scss.js @@ -11,7 +11,7 @@ Prism.languages.scss = Prism.languages.extend('css', { } }, // url, compassified - 'url': /(?:[-a-z]+-)*url(?=\()/i, + 'url': /(?:[-a-z]+-)?url(?=\()/i, // CSS selector regex is not appropriate for Sass // since there can be lot more things (var, @ directive, nesting..) // a selector must start at the end of a property or after a brace (end of other rules or nesting) diff --git a/components/prism-scss.min.js b/components/prism-scss.min.js index 3ef50a2095..48d430c97d 100644 --- a/components/prism-scss.min.js +++ b/components/prism-scss.min.js @@ -1 +1 @@ -Prism.languages.scss=Prism.languages.extend("css",{comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0},atrule:{pattern:/@[\w-]+(?:\([^()]+\)|[^(])*?(?=\s+[{;])/,inside:{rule:/@[\w-]+/}},url:/(?:[-a-z]+-)*url(?=\()/i,selector:{pattern:/(?=\S)[^@;{}()]?(?:[^@;{}()]|#\{\$[-\w]+\})+(?=\s*\{(?:\}|\s|[^}]+[:{][^}]+))/m,inside:{parent:{pattern:/&/,alias:"important"},placeholder:/%[-\w]+/,variable:/\$[-\w]+|#\{\$[-\w]+\}/}},property:{pattern:/(?:[\w-]|\$[-\w]+|#\{\$[-\w]+\})+(?=\s*:)/,inside:{variable:/\$[-\w]+|#\{\$[-\w]+\}/}}}),Prism.languages.insertBefore("scss","atrule",{keyword:[/@(?:if|else(?: if)?|for|each|while|import|extend|debug|warn|mixin|include|function|return|content)/i,{pattern:/( +)(?:from|through)(?= )/,lookbehind:!0}]}),Prism.languages.insertBefore("scss","important",{variable:/\$[-\w]+|#\{\$[-\w]+\}/}),Prism.languages.insertBefore("scss","function",{placeholder:{pattern:/%[-\w]+/,alias:"selector"},statement:{pattern:/\B!(?:default|optional)\b/i,alias:"keyword"},boolean:/\b(?:true|false)\b/,null:{pattern:/\bnull\b/,alias:"keyword"},operator:{pattern:/(\s)(?:[-+*\/%]|[=!]=|<=?|>=?|and|or|not)(?=\s)/,lookbehind:!0}}),Prism.languages.scss.atrule.inside.rest=Prism.languages.scss; \ No newline at end of file +Prism.languages.scss=Prism.languages.extend("css",{comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0},atrule:{pattern:/@[\w-]+(?:\([^()]+\)|[^(])*?(?=\s+[{;])/,inside:{rule:/@[\w-]+/}},url:/(?:[-a-z]+-)?url(?=\()/i,selector:{pattern:/(?=\S)[^@;{}()]?(?:[^@;{}()]|#\{\$[-\w]+\})+(?=\s*\{(?:\}|\s|[^}]+[:{][^}]+))/m,inside:{parent:{pattern:/&/,alias:"important"},placeholder:/%[-\w]+/,variable:/\$[-\w]+|#\{\$[-\w]+\}/}},property:{pattern:/(?:[\w-]|\$[-\w]+|#\{\$[-\w]+\})+(?=\s*:)/,inside:{variable:/\$[-\w]+|#\{\$[-\w]+\}/}}}),Prism.languages.insertBefore("scss","atrule",{keyword:[/@(?:if|else(?: if)?|for|each|while|import|extend|debug|warn|mixin|include|function|return|content)/i,{pattern:/( +)(?:from|through)(?= )/,lookbehind:!0}]}),Prism.languages.insertBefore("scss","important",{variable:/\$[-\w]+|#\{\$[-\w]+\}/}),Prism.languages.insertBefore("scss","function",{placeholder:{pattern:/%[-\w]+/,alias:"selector"},statement:{pattern:/\B!(?:default|optional)\b/i,alias:"keyword"},boolean:/\b(?:true|false)\b/,null:{pattern:/\bnull\b/,alias:"keyword"},operator:{pattern:/(\s)(?:[-+*\/%]|[=!]=|<=?|>=?|and|or|not)(?=\s)/,lookbehind:!0}}),Prism.languages.scss.atrule.inside.rest=Prism.languages.scss; \ No newline at end of file From 3e1812416dd4906cb03820af27e42fa2c4bcef1d Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Wed, 12 Jun 2019 15:28:44 +0200 Subject: [PATCH 0284/1100] Added more examples & small TOML improvement (#1917) This adds some of the missing examples and makes a small improvement to TOML. --- components/prism-toml.js | 2 +- components/prism-toml.min.js | 2 +- examples/prism-javadoc.html | 29 +++++++++++++++++++++++++ examples/prism-jsdoc.html | 21 ++++++++++++++++++ examples/prism-phpdoc.html | 15 +++++++++++++ examples/prism-t4-cs.html | 16 ++++++++++++++ examples/prism-t4-vb.html | 16 ++++++++++++++ examples/prism-toml.html | 28 ++++++++++++++++++++++++ tests/languages/toml/table_feature.test | 11 ++++++++++ 9 files changed, 138 insertions(+), 2 deletions(-) create mode 100644 examples/prism-javadoc.html create mode 100644 examples/prism-jsdoc.html create mode 100644 examples/prism-phpdoc.html create mode 100644 examples/prism-t4-cs.html create mode 100644 examples/prism-t4-vb.html create mode 100644 examples/prism-toml.html diff --git a/components/prism-toml.js b/components/prism-toml.js index 200fbdd0c3..e911d89ee3 100644 --- a/components/prism-toml.js +++ b/components/prism-toml.js @@ -9,7 +9,7 @@ greedy: true }, 'table': { - pattern: RegExp("(\\[\\s*)" + key + "(?:\\s*\\.\\s*" + key + ")*(?=\\s*\\])"), + pattern: RegExp("(^\\s*\\[\\s*(?:\\[\\s*)?)" + key + "(?:\\s*\\.\\s*" + key + ")*(?=\\s*\\])", "m"), lookbehind: true, greedy: true, alias: 'class-name' diff --git a/components/prism-toml.min.js b/components/prism-toml.min.js index 2ce58e9f67..f0ffbd4c82 100644 --- a/components/prism-toml.min.js +++ b/components/prism-toml.min.js @@ -1 +1 @@ -!function(e){var d="(?:[\\w-]+|'[^'\n\r]*'|\"(?:\\.|[^\\\\\"\r\n])*\")";Prism.languages.toml={comment:{pattern:/#.*/,greedy:!0},table:{pattern:RegExp("(\\[\\s*)"+d+"(?:\\s*\\.\\s*"+d+")*(?=\\s*\\])"),lookbehind:!0,greedy:!0,alias:"class-name"},key:{pattern:RegExp("(^\\s*|[{,]\\s*)"+d+"(?:\\s*\\.\\s*"+d+")*(?=\\s*=)","m"),lookbehind:!0,greedy:!0,alias:"property"},string:{pattern:/"""(?:\\[\s\S]|[^\\])*?"""|'''[\s\S]*?'''|'[^'\n\r]*'|"(?:\\.|[^\\"\r\n])*"/,greedy:!0},date:[{pattern:/\d{4}-\d{2}-\d{2}(?:[T\s]\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|[+-]\d{2}:\d{2})?)?/i,alias:"number"},{pattern:/\d{2}:\d{2}:\d{2}(?:\.\d+)?/i,alias:"number"}],number:/(?:\b0(?:x[\da-zA-Z]+(?:_[\da-zA-Z]+)*|o[0-7]+(?:_[0-7]+)*|b[10]+(?:_[10]+)*))\b|[-+]?\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?\b|[-+]?(?:inf|nan)\b/,boolean:/\b(?:true|false)\b/,punctuation:/[.,=[\]{}]/}}(); \ No newline at end of file +!function(e){var d="(?:[\\w-]+|'[^'\n\r]*'|\"(?:\\.|[^\\\\\"\r\n])*\")";Prism.languages.toml={comment:{pattern:/#.*/,greedy:!0},table:{pattern:RegExp("(^\\s*\\[\\s*(?:\\[\\s*)?)"+d+"(?:\\s*\\.\\s*"+d+")*(?=\\s*\\])","m"),lookbehind:!0,greedy:!0,alias:"class-name"},key:{pattern:RegExp("(^\\s*|[{,]\\s*)"+d+"(?:\\s*\\.\\s*"+d+")*(?=\\s*=)","m"),lookbehind:!0,greedy:!0,alias:"property"},string:{pattern:/"""(?:\\[\s\S]|[^\\])*?"""|'''[\s\S]*?'''|'[^'\n\r]*'|"(?:\\.|[^\\"\r\n])*"/,greedy:!0},date:[{pattern:/\d{4}-\d{2}-\d{2}(?:[T\s]\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|[+-]\d{2}:\d{2})?)?/i,alias:"number"},{pattern:/\d{2}:\d{2}:\d{2}(?:\.\d+)?/i,alias:"number"}],number:/(?:\b0(?:x[\da-zA-Z]+(?:_[\da-zA-Z]+)*|o[0-7]+(?:_[0-7]+)*|b[10]+(?:_[10]+)*))\b|[-+]?\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?\b|[-+]?(?:inf|nan)\b/,boolean:/\b(?:true|false)\b/,punctuation:/[.,=[\]{}]/}}(); \ No newline at end of file diff --git a/examples/prism-javadoc.html b/examples/prism-javadoc.html new file mode 100644 index 0000000000..4e809797bd --- /dev/null +++ b/examples/prism-javadoc.html @@ -0,0 +1,29 @@ +

    Full example

    +
    /**
    + * Returns the value to which the specified key is mapped,
    + * or {@code null} if this map contains no mapping for the key.
    + *
    + * <p>More formally, if this map contains a mapping from a key
    + * {@code k} to a value {@code v} such that {@code (key==null ? k==null :
    + * key.equals(k))}, then this method returns {@code v}; otherwise
    + * it returns {@code null}.  (There can be at most one such mapping.)
    + *
    + * <p>If this map permits null values, then a return value of
    + * {@code null} does not <i>necessarily</i> indicate that the map
    + * contains no mapping for the key; it's also possible that the map
    + * explicitly maps the key to {@code null}.  The {@link #containsKey
    + * containsKey} operation may be used to distinguish these two cases.
    + *
    + * @param key the key whose associated value is to be returned
    + * @return the value to which the specified key is mapped, or
    + *         {@code null} if this map contains no mapping for the key
    + * @throws ClassCastException if the key is of an inappropriate type for
    + *         this map
    + * (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
    + * @throws NullPointerException if the specified key is null and this map
    + *         does not permit null keys
    + * (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
    + */
    +V get(Object key);
    +
    +// Source: Java 1.8, Map#get(Object)
    diff --git a/examples/prism-jsdoc.html b/examples/prism-jsdoc.html new file mode 100644 index 0000000000..85a7442972 --- /dev/null +++ b/examples/prism-jsdoc.html @@ -0,0 +1,21 @@ +

    Full example

    +
    /**
    + * @typedef {object} Foo
    + * @property {string} bar
    + * @memberof Baz
    + */
    +
    +/**
    + * Trims the given string.
    + *
    + * @param {string} [str=""] the string.
    + * @returns {string} the trimmed string.
    + * @throws {TypeError} if the argument is not a string.
    + * @example trim(" hello ")
    + */
    +function trim(str = "") {
    +	if (typeof str != "string") {
    +		throw new TypeError("str has to be a string");
    +	}
    +	return str.trim();
    +}
    diff --git a/examples/prism-phpdoc.html b/examples/prism-phpdoc.html new file mode 100644 index 0000000000..5b2f9075fa --- /dev/null +++ b/examples/prism-phpdoc.html @@ -0,0 +1,15 @@ +

    Full example

    +
    <?php
    +
    +/** @var \DateTime[] An array of DateTime objects. */
    +/** @var string[] An array of string objects. */
    +/** @var callable[] An array of with callable functions or methods. */
    +
    +/** @var \ArrayObject|\DateTime[] */
    +$dates = array()
    +
    +/**
    + * @param bool|\DateTime $foo the first argument
    + * @return string|null
    + */
    +function bar($foo) { ... }
    diff --git a/examples/prism-t4-cs.html b/examples/prism-t4-cs.html new file mode 100644 index 0000000000..e3651c7708 --- /dev/null +++ b/examples/prism-t4-cs.html @@ -0,0 +1,16 @@ +

    Full example

    +
    <#@ template hostspecific="false" language="C#" #>
    +<#@ assembly name="System.Core.dll" #>
    +<#@ output extension=".txt" #>
    +<#
    +    using System.Collections.Generic;
    +
    +    var numbers = new List<int> { 0, 1, 2, 3, 4, 5, 6, /* 7, */ 8, 9, 10  };
    +
    +    foreach (var i in numbers)
    +    {
    +#>
    +The square of <#= i #> is <#= i * i #>
    +<#
    +    }
    +#>
    diff --git a/examples/prism-t4-vb.html b/examples/prism-t4-vb.html new file mode 100644 index 0000000000..04c999693d --- /dev/null +++ b/examples/prism-t4-vb.html @@ -0,0 +1,16 @@ +

    Full example

    +
    <#@ template hostspecific="false" language="VB" #>
    +<#@ assembly name="System.Core.dll" #>
    +<#@ output extension=".txt" #>
    +<#
    +    Imports System.Collections.Generic
    +
    +    Dim numbers() As Integer = { 0, 1, 2, 3, 4, 5, 6, 8, 9, 10  }
    +    ' not including 7
    +
    +    For Each i In numbers
    +#>
    +The square of <#= i #> is <#= i * i #>
    +<#
    +    Next
    +#>
    diff --git a/examples/prism-toml.html b/examples/prism-toml.html new file mode 100644 index 0000000000..7f68c8ef9b --- /dev/null +++ b/examples/prism-toml.html @@ -0,0 +1,28 @@ +

    Full example

    +
    # This is a comment
    +
    +key = "value"
    +paths.home = 'c:\foo\'
    +
    +[database.prod]
    +server = "192.168.1.1"
    +ports = [ 8001, 8001, 8002 ]
    +connection_max = 5000
    +enabled = true
    +
    +
    +[[users]]
    +name = "John"
    +bday = 1995-09-22
    +bio = ""
    +interests = [ "biking", "fishing" ]
    +
    +[[users]]
    +name = "Jane"
    +bday = 1989-05-09
    +bio = """\
    +Hi!
    +
    +I love programming!\
    +"""
    +interests = [ "programming" ]
    diff --git a/tests/languages/toml/table_feature.test b/tests/languages/toml/table_feature.test index c0be8b7e0b..4fbce4e88a 100644 --- a/tests/languages/toml/table_feature.test +++ b/tests/languages/toml/table_feature.test @@ -1,6 +1,9 @@ [table] [[array]] +# not a table +foo = [ "bar" ] + ---------------------------------------------------- [ @@ -12,6 +15,14 @@ ["punctuation", "["], ["table", "array"], ["punctuation", "]"], + ["punctuation", "]"], + + ["comment", "# not a table"], + + ["key", "foo"], + ["punctuation", "="], + ["punctuation", "["], + ["string", "\"bar\""], ["punctuation", "]"] ] From 2f39de974b76fa86ff33460ddbbdad00a0943271 Mon Sep 17 00:00:00 2001 From: "Paul \"LeoNerd\" Evans" Date: Fri, 14 Jun 2019 15:38:43 +0100 Subject: [PATCH 0285/1100] Add 'return' to recognised keywords --- components/prism-perl.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/prism-perl.js b/components/prism-perl.js index 8e55a3205c..5ad2eea007 100644 --- a/components/prism-perl.js +++ b/components/prism-perl.js @@ -184,7 +184,7 @@ Prism.languages.perl = { keyword: /sub/ } }, - 'keyword': /\b(?:any|break|continue|default|delete|die|do|else|elsif|eval|for|foreach|given|goto|if|last|local|my|next|our|package|print|redo|require|say|state|sub|switch|undef|unless|until|use|when|while)\b/, + 'keyword': /\b(?:any|break|continue|default|delete|die|do|else|elsif|eval|for|foreach|given|goto|if|last|local|my|next|our|package|print|redo|require|return|say|state|sub|switch|undef|unless|until|use|when|while)\b/, 'number': /\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0b[01](?:_?[01])*|(?:\d(?:_?\d)*)?\.?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)\b/, 'operator': /-[rwxoRWXOezsfdlpSbctugkTBMAC]\b|\+[+=]?|-[-=>]?|\*\*?=?|\/\/?=?|=[=~>]?|~[~=]?|\|\|?=?|&&?=?|<(?:=>?|<=?)?|>>?=?|![~=]?|[%^]=?|\.(?:=|\.\.?)?|[\\?]|\bx(?:=|\b)|\b(?:lt|gt|le|ge|eq|ne|cmp|not|and|or|xor)\b/, 'punctuation': /[{}[\];(),:]/ From 4a0ed18d1e808b34b028f5103fd2640ca1efd34c Mon Sep 17 00:00:00 2001 From: "Paul \"LeoNerd\" Evans" Date: Fri, 14 Jun 2019 16:13:46 +0100 Subject: [PATCH 0286/1100] Add new keyword to the keyword test file --- tests/languages/perl/keyword_feature.test | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/languages/perl/keyword_feature.test b/tests/languages/perl/keyword_feature.test index 82bab2bc15..c716eba5f1 100644 --- a/tests/languages/perl/keyword_feature.test +++ b/tests/languages/perl/keyword_feature.test @@ -5,7 +5,7 @@ for foreach given goto if last local my next our package print redo require -say state sub +return say state sub switch undef unless until use when while @@ -19,11 +19,11 @@ until use when while ["keyword", "goto"], ["keyword", "if"], ["keyword", "last"], ["keyword", "local"], ["keyword", "my"], ["keyword", "next"], ["keyword", "our"], ["keyword", "package"], ["keyword", "print"], ["keyword", "redo"], ["keyword", "require"], - ["keyword", "say"], ["keyword", "state"], ["keyword", "sub"], + ["keyword", "return"], ["keyword", "say"], ["keyword", "state"], ["keyword", "sub"], ["keyword", "switch"], ["keyword", "undef"], ["keyword", "unless"], ["keyword", "until"], ["keyword", "use"], ["keyword", "when"], ["keyword", "while"] ] ---------------------------------------------------- -Checks for all keywords. \ No newline at end of file +Checks for all keywords. From b52a16b491dd91bb5fcc2011fb2edc3076c639bb Mon Sep 17 00:00:00 2001 From: "Paul \"LeoNerd\" Evans" Date: Fri, 14 Jun 2019 16:30:13 +0100 Subject: [PATCH 0287/1100] Rebuild prism-perl.min.js --- components/prism-perl.min.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/prism-perl.min.js b/components/prism-perl.min.js index 74d5666865..51f08ea9ab 100644 --- a/components/prism-perl.min.js +++ b/components/prism-perl.min.js @@ -1 +1 @@ -Prism.languages.perl={comment:[{pattern:/(^\s*)=\w+[\s\S]*?=cut.*/m,lookbehind:!0},{pattern:/(^|[^\\$])#.*/,lookbehind:!0}],string:[{pattern:/\b(?:q|qq|qx|qw)\s*([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1/,greedy:!0},{pattern:/\b(?:q|qq|qx|qw)\s+([a-zA-Z0-9])(?:(?!\1)[^\\]|\\[\s\S])*\1/,greedy:!0},{pattern:/\b(?:q|qq|qx|qw)\s*\((?:[^()\\]|\\[\s\S])*\)/,greedy:!0},{pattern:/\b(?:q|qq|qx|qw)\s*\{(?:[^{}\\]|\\[\s\S])*\}/,greedy:!0},{pattern:/\b(?:q|qq|qx|qw)\s*\[(?:[^[\]\\]|\\[\s\S])*\]/,greedy:!0},{pattern:/\b(?:q|qq|qx|qw)\s*<(?:[^<>\\]|\\[\s\S])*>/,greedy:!0},{pattern:/("|`)(?:(?!\1)[^\\]|\\[\s\S])*\1/,greedy:!0},{pattern:/'(?:[^'\\\r\n]|\\.)*'/,greedy:!0}],regex:[{pattern:/\b(?:m|qr)\s*([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1[msixpodualngc]*/,greedy:!0},{pattern:/\b(?:m|qr)\s+([a-zA-Z0-9])(?:(?!\1)[^\\]|\\[\s\S])*\1[msixpodualngc]*/,greedy:!0},{pattern:/\b(?:m|qr)\s*\((?:[^()\\]|\\[\s\S])*\)[msixpodualngc]*/,greedy:!0},{pattern:/\b(?:m|qr)\s*\{(?:[^{}\\]|\\[\s\S])*\}[msixpodualngc]*/,greedy:!0},{pattern:/\b(?:m|qr)\s*\[(?:[^[\]\\]|\\[\s\S])*\][msixpodualngc]*/,greedy:!0},{pattern:/\b(?:m|qr)\s*<(?:[^<>\\]|\\[\s\S])*>[msixpodualngc]*/,greedy:!0},{pattern:/(^|[^-]\b)(?:s|tr|y)\s*([^a-zA-Z0-9\s{(\[<])(?:(?!\2)[^\\]|\\[\s\S])*\2(?:(?!\2)[^\\]|\\[\s\S])*\2[msixpodualngcer]*/,lookbehind:!0,greedy:!0},{pattern:/(^|[^-]\b)(?:s|tr|y)\s+([a-zA-Z0-9])(?:(?!\2)[^\\]|\\[\s\S])*\2(?:(?!\2)[^\\]|\\[\s\S])*\2[msixpodualngcer]*/,lookbehind:!0,greedy:!0},{pattern:/(^|[^-]\b)(?:s|tr|y)\s*\((?:[^()\\]|\\[\s\S])*\)\s*\((?:[^()\\]|\\[\s\S])*\)[msixpodualngcer]*/,lookbehind:!0,greedy:!0},{pattern:/(^|[^-]\b)(?:s|tr|y)\s*\{(?:[^{}\\]|\\[\s\S])*\}\s*\{(?:[^{}\\]|\\[\s\S])*\}[msixpodualngcer]*/,lookbehind:!0,greedy:!0},{pattern:/(^|[^-]\b)(?:s|tr|y)\s*\[(?:[^[\]\\]|\\[\s\S])*\]\s*\[(?:[^[\]\\]|\\[\s\S])*\][msixpodualngcer]*/,lookbehind:!0,greedy:!0},{pattern:/(^|[^-]\b)(?:s|tr|y)\s*<(?:[^<>\\]|\\[\s\S])*>\s*<(?:[^<>\\]|\\[\s\S])*>[msixpodualngcer]*/,lookbehind:!0,greedy:!0},{pattern:/\/(?:[^\/\\\r\n]|\\.)*\/[msixpodualngc]*(?=\s*(?:$|[\r\n,.;})&|\-+*~<>!?^]|(lt|gt|le|ge|eq|ne|cmp|not|and|or|xor|x)\b))/,greedy:!0}],variable:[/[&*$@%]\{\^[A-Z]+\}/,/[&*$@%]\^[A-Z_]/,/[&*$@%]#?(?=\{)/,/[&*$@%]#?(?:(?:::)*'?(?!\d)[\w$]+)+(?:::)*/i,/[&*$@%]\d+/,/(?!%=)[$@%][!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~]/],filehandle:{pattern:/<(?![<=])\S*>|\b_\b/,alias:"symbol"},vstring:{pattern:/v\d+(?:\.\d+)*|\d+(?:\.\d+){2,}/,alias:"string"},function:{pattern:/sub [a-z0-9_]+/i,inside:{keyword:/sub/}},keyword:/\b(?:any|break|continue|default|delete|die|do|else|elsif|eval|for|foreach|given|goto|if|last|local|my|next|our|package|print|redo|require|say|state|sub|switch|undef|unless|until|use|when|while)\b/,number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0b[01](?:_?[01])*|(?:\d(?:_?\d)*)?\.?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)\b/,operator:/-[rwxoRWXOezsfdlpSbctugkTBMAC]\b|\+[+=]?|-[-=>]?|\*\*?=?|\/\/?=?|=[=~>]?|~[~=]?|\|\|?=?|&&?=?|<(?:=>?|<=?)?|>>?=?|![~=]?|[%^]=?|\.(?:=|\.\.?)?|[\\?]|\bx(?:=|\b)|\b(?:lt|gt|le|ge|eq|ne|cmp|not|and|or|xor)\b/,punctuation:/[{}[\];(),:]/}; \ No newline at end of file +Prism.languages.perl={comment:[{pattern:/(^\s*)=\w+[\s\S]*?=cut.*/m,lookbehind:!0},{pattern:/(^|[^\\$])#.*/,lookbehind:!0}],string:[{pattern:/\b(?:q|qq|qx|qw)\s*([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1/,greedy:!0},{pattern:/\b(?:q|qq|qx|qw)\s+([a-zA-Z0-9])(?:(?!\1)[^\\]|\\[\s\S])*\1/,greedy:!0},{pattern:/\b(?:q|qq|qx|qw)\s*\((?:[^()\\]|\\[\s\S])*\)/,greedy:!0},{pattern:/\b(?:q|qq|qx|qw)\s*\{(?:[^{}\\]|\\[\s\S])*\}/,greedy:!0},{pattern:/\b(?:q|qq|qx|qw)\s*\[(?:[^[\]\\]|\\[\s\S])*\]/,greedy:!0},{pattern:/\b(?:q|qq|qx|qw)\s*<(?:[^<>\\]|\\[\s\S])*>/,greedy:!0},{pattern:/("|`)(?:(?!\1)[^\\]|\\[\s\S])*\1/,greedy:!0},{pattern:/'(?:[^'\\\r\n]|\\.)*'/,greedy:!0}],regex:[{pattern:/\b(?:m|qr)\s*([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1[msixpodualngc]*/,greedy:!0},{pattern:/\b(?:m|qr)\s+([a-zA-Z0-9])(?:(?!\1)[^\\]|\\[\s\S])*\1[msixpodualngc]*/,greedy:!0},{pattern:/\b(?:m|qr)\s*\((?:[^()\\]|\\[\s\S])*\)[msixpodualngc]*/,greedy:!0},{pattern:/\b(?:m|qr)\s*\{(?:[^{}\\]|\\[\s\S])*\}[msixpodualngc]*/,greedy:!0},{pattern:/\b(?:m|qr)\s*\[(?:[^[\]\\]|\\[\s\S])*\][msixpodualngc]*/,greedy:!0},{pattern:/\b(?:m|qr)\s*<(?:[^<>\\]|\\[\s\S])*>[msixpodualngc]*/,greedy:!0},{pattern:/(^|[^-]\b)(?:s|tr|y)\s*([^a-zA-Z0-9\s{(\[<])(?:(?!\2)[^\\]|\\[\s\S])*\2(?:(?!\2)[^\\]|\\[\s\S])*\2[msixpodualngcer]*/,lookbehind:!0,greedy:!0},{pattern:/(^|[^-]\b)(?:s|tr|y)\s+([a-zA-Z0-9])(?:(?!\2)[^\\]|\\[\s\S])*\2(?:(?!\2)[^\\]|\\[\s\S])*\2[msixpodualngcer]*/,lookbehind:!0,greedy:!0},{pattern:/(^|[^-]\b)(?:s|tr|y)\s*\((?:[^()\\]|\\[\s\S])*\)\s*\((?:[^()\\]|\\[\s\S])*\)[msixpodualngcer]*/,lookbehind:!0,greedy:!0},{pattern:/(^|[^-]\b)(?:s|tr|y)\s*\{(?:[^{}\\]|\\[\s\S])*\}\s*\{(?:[^{}\\]|\\[\s\S])*\}[msixpodualngcer]*/,lookbehind:!0,greedy:!0},{pattern:/(^|[^-]\b)(?:s|tr|y)\s*\[(?:[^[\]\\]|\\[\s\S])*\]\s*\[(?:[^[\]\\]|\\[\s\S])*\][msixpodualngcer]*/,lookbehind:!0,greedy:!0},{pattern:/(^|[^-]\b)(?:s|tr|y)\s*<(?:[^<>\\]|\\[\s\S])*>\s*<(?:[^<>\\]|\\[\s\S])*>[msixpodualngcer]*/,lookbehind:!0,greedy:!0},{pattern:/\/(?:[^\/\\\r\n]|\\.)*\/[msixpodualngc]*(?=\s*(?:$|[\r\n,.;})&|\-+*~<>!?^]|(lt|gt|le|ge|eq|ne|cmp|not|and|or|xor|x)\b))/,greedy:!0}],variable:[/[&*$@%]\{\^[A-Z]+\}/,/[&*$@%]\^[A-Z_]/,/[&*$@%]#?(?=\{)/,/[&*$@%]#?(?:(?:::)*'?(?!\d)[\w$]+)+(?:::)*/i,/[&*$@%]\d+/,/(?!%=)[$@%][!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~]/],filehandle:{pattern:/<(?![<=])\S*>|\b_\b/,alias:"symbol"},vstring:{pattern:/v\d+(?:\.\d+)*|\d+(?:\.\d+){2,}/,alias:"string"},function:{pattern:/sub [a-z0-9_]+/i,inside:{keyword:/sub/}},keyword:/\b(?:any|break|continue|default|delete|die|do|else|elsif|eval|for|foreach|given|goto|if|last|local|my|next|our|package|print|redo|require|return|say|state|sub|switch|undef|unless|until|use|when|while)\b/,number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0b[01](?:_?[01])*|(?:\d(?:_?\d)*)?\.?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)\b/,operator:/-[rwxoRWXOezsfdlpSbctugkTBMAC]\b|\+[+=]?|-[-=>]?|\*\*?=?|\/\/?=?|=[=~>]?|~[~=]?|\|\|?=?|&&?=?|<(?:=>?|<=?)?|>>?=?|![~=]?|[%^]=?|\.(?:=|\.\.?)?|[\\?]|\bx(?:=|\b)|\b(?:lt|gt|le|ge|eq|ne|cmp|not|and|or|xor)\b/,punctuation:/[{}[\];(),:]/}; \ No newline at end of file From 235fce74a8f3a18f2d0e919074475d7b9ee70eee Mon Sep 17 00:00:00 2001 From: RunDevelopment Date: Mon, 24 Jun 2019 14:47:41 +0200 Subject: [PATCH 0288/1100] Improved tests --- tests/languages/markdown/bold_feature.test | 92 ++++++++++++ tests/languages/markdown/italic_feature.test | 140 +++++++++++++++++++ 2 files changed, 232 insertions(+) diff --git a/tests/languages/markdown/bold_feature.test b/tests/languages/markdown/bold_feature.test index 26dc52687f..db915b9131 100644 --- a/tests/languages/markdown/bold_feature.test +++ b/tests/languages/markdown/bold_feature.test @@ -8,8 +8,15 @@ bar__ __foo*bar*baz__ __foo_bar_baz__ __foo~bar~baz__ +__foo~~bar~~baz__ __foo[bar](baz)__ +**foo*bar*baz** +**foo_bar_baz** +**foo~bar~baz** +**foo~~bar~~baz** +**foo[bar](baz)** + ---------------------------------------------------- [ @@ -86,6 +93,21 @@ __foo[bar](baz)__ ]], ["punctuation", "__"] ]], + ["bold", [ + ["punctuation", "__"], + ["content", [ + "foo", + ["strike", [ + ["punctuation", "~~"], + ["content", [ + "bar" + ]], + ["punctuation", "~~"] + ]], + "baz" + ]], + ["punctuation", "__"] + ]], ["bold", [ ["punctuation", "__"], ["content", [ @@ -95,6 +117,76 @@ __foo[bar](baz)__ ]] ]], ["punctuation", "__"] + ]], + ["bold", [ + ["punctuation", "**"], + ["content", [ + "foo", + ["italic", [ + ["punctuation", "*"], + ["content", [ + "bar" + ]], + ["punctuation", "*"] + ]], + "baz" + ]], + ["punctuation", "**"] + ]], + ["bold", [ + ["punctuation", "**"], + ["content", [ + "foo", + ["italic", [ + ["punctuation", "_"], + ["content", [ + "bar" + ]], + ["punctuation", "_"] + ]], + "baz" + ]], + ["punctuation", "**"] + ]], + ["bold", [ + ["punctuation", "**"], + ["content", [ + "foo", + ["strike", [ + ["punctuation", "~"], + ["content", [ + "bar" + ]], + ["punctuation", "~"] + ]], + "baz" + ]], + ["punctuation", "**"] + ]], + ["bold", [ + ["punctuation", "**"], + ["content", [ + "foo", + ["strike", [ + ["punctuation", "~~"], + ["content", [ + "bar" + ]], + ["punctuation", "~~"] + ]], + "baz" + ]], + ["punctuation", "**"] + ]], + ["bold", [ + ["punctuation", "**"], + ["content", [ + "foo", + ["url", [ + "[bar](baz)" + ]] + ]], + ["punctuation", "**"] ]] ] diff --git a/tests/languages/markdown/italic_feature.test b/tests/languages/markdown/italic_feature.test index 2003864227..fc9c6c858e 100644 --- a/tests/languages/markdown/italic_feature.test +++ b/tests/languages/markdown/italic_feature.test @@ -5,8 +5,18 @@ _foobar_ _foo bar_ +_foo__bar__baz_ +_foo**bar**baz_ +_foo~bar~baz_ +_foo~~bar~~baz_ _foo[bar](baz)_ +*foo__bar__baz* +*foo**bar**baz* +*foo~bar~baz* +*foo~~bar~~baz* +*foo[bar](baz)* + ---------------------------------------------------- [ @@ -38,6 +48,66 @@ _foo[bar](baz)_ ]], ["punctuation", "_"] ]], + ["italic", [ + ["punctuation", "_"], + ["content", [ + "foo", + ["bold", [ + ["punctuation", "__"], + ["content", [ + "bar" + ]], + ["punctuation", "__"] + ]], + "baz" + ]], + ["punctuation", "_"] + ]], + ["italic", [ + ["punctuation", "_"], + ["content", [ + "foo", + ["bold", [ + ["punctuation", "**"], + ["content", [ + "bar" + ]], + ["punctuation", "**"] + ]], + "baz" + ]], + ["punctuation", "_"] + ]], + ["italic", [ + ["punctuation", "_"], + ["content", [ + "foo", + ["strike", [ + ["punctuation", "~"], + ["content", [ + "bar" + ]], + ["punctuation", "~"] + ]], + "baz" + ]], + ["punctuation", "_"] + ]], + ["italic", [ + ["punctuation", "_"], + ["content", [ + "foo", + ["strike", [ + ["punctuation", "~~"], + ["content", [ + "bar" + ]], + ["punctuation", "~~"] + ]], + "baz" + ]], + ["punctuation", "_"] + ]], ["italic", [ ["punctuation", "_"], ["content", [ @@ -47,6 +117,76 @@ _foo[bar](baz)_ ]] ]], ["punctuation", "_"] + ]], + ["italic", [ + ["punctuation", "*"], + ["content", [ + "foo", + ["bold", [ + ["punctuation", "__"], + ["content", [ + "bar" + ]], + ["punctuation", "__"] + ]], + "baz" + ]], + ["punctuation", "*"] + ]], + ["italic", [ + ["punctuation", "*"], + ["content", [ + "foo", + ["bold", [ + ["punctuation", "**"], + ["content", [ + "bar" + ]], + ["punctuation", "**"] + ]], + "baz" + ]], + ["punctuation", "*"] + ]], + ["italic", [ + ["punctuation", "*"], + ["content", [ + "foo", + ["strike", [ + ["punctuation", "~"], + ["content", [ + "bar" + ]], + ["punctuation", "~"] + ]], + "baz" + ]], + ["punctuation", "*"] + ]], + ["italic", [ + ["punctuation", "*"], + ["content", [ + "foo", + ["strike", [ + ["punctuation", "~~"], + ["content", [ + "bar" + ]], + ["punctuation", "~~"] + ]], + "baz" + ]], + ["punctuation", "*"] + ]], + ["italic", [ + ["punctuation", "*"], + ["content", [ + "foo", + ["url", [ + "[bar](baz)" + ]] + ]], + ["punctuation", "*"] ]] ] From 986c9de0b55fcf71cc82606d9d5bcb8e59c0c079 Mon Sep 17 00:00:00 2001 From: RunDevelopment Date: Mon, 24 Jun 2019 15:43:49 +0200 Subject: [PATCH 0289/1100] More strike tests --- tests/languages/markdown/strike_feature.test | 108 +++++++++++++++++++ 1 file changed, 108 insertions(+) diff --git a/tests/languages/markdown/strike_feature.test b/tests/languages/markdown/strike_feature.test index 11809351dd..414fb8bdc0 100644 --- a/tests/languages/markdown/strike_feature.test +++ b/tests/languages/markdown/strike_feature.test @@ -6,9 +6,17 @@ bar~~ bar~ ~foo*bar*baz~ +~foo_bar_baz~ +~foo**bar**baz~ ~foo__bar__baz~ ~foo[bar](baz)~ +~~foo*bar*baz~~ +~~foo_bar_baz~~ +~~foo**bar**baz~~ +~~foo__bar__baz~~ +~~foo[bar](baz)~~ + ---------------------------------------------------- [ @@ -55,6 +63,36 @@ bar~ ]], ["punctuation", "~"] ]], + ["strike", [ + ["punctuation", "~"], + ["content", [ + "foo", + ["italic", [ + ["punctuation", "_"], + ["content", [ + "bar" + ]], + ["punctuation", "_"] + ]], + "baz" + ]], + ["punctuation", "~"] + ]], + ["strike", [ + ["punctuation", "~"], + ["content", [ + "foo", + ["bold", [ + ["punctuation", "**"], + ["content", [ + "bar" + ]], + ["punctuation", "**"] + ]], + "baz" + ]], + ["punctuation", "~"] + ]], ["strike", [ ["punctuation", "~"], ["content", [ @@ -79,6 +117,76 @@ bar~ ]] ]], ["punctuation", "~"] + ]], + ["strike", [ + ["punctuation", "~~"], + ["content", [ + "foo", + ["italic", [ + ["punctuation", "*"], + ["content", [ + "bar" + ]], + ["punctuation", "*"] + ]], + "baz" + ]], + ["punctuation", "~~"] + ]], + ["strike", [ + ["punctuation", "~~"], + ["content", [ + "foo", + ["italic", [ + ["punctuation", "_"], + ["content", [ + "bar" + ]], + ["punctuation", "_"] + ]], + "baz" + ]], + ["punctuation", "~~"] + ]], + ["strike", [ + ["punctuation", "~~"], + ["content", [ + "foo", + ["bold", [ + ["punctuation", "**"], + ["content", [ + "bar" + ]], + ["punctuation", "**"] + ]], + "baz" + ]], + ["punctuation", "~~"] + ]], + ["strike", [ + ["punctuation", "~~"], + ["content", [ + "foo", + ["bold", [ + ["punctuation", "__"], + ["content", [ + "bar" + ]], + ["punctuation", "__"] + ]], + "baz" + ]], + ["punctuation", "~~"] + ]], + ["strike", [ + ["punctuation", "~~"], + ["content", [ + "foo", + ["url", [ + "[bar](baz)" + ]] + ]], + ["punctuation", "~~"] ]] ] From 9c75843a59b496b9a7dc5b154473cbeac2b02a22 Mon Sep 17 00:00:00 2001 From: RunDevelopment Date: Mon, 24 Jun 2019 15:48:11 +0200 Subject: [PATCH 0290/1100] Improved inline pattern creation + more comments --- components/prism-markdown.js | 45 +++++++++++++++++++++++++++----- components/prism-markdown.min.js | 2 +- 2 files changed, 40 insertions(+), 7 deletions(-) diff --git a/components/prism-markdown.js b/components/prism-markdown.js index bd5008a8d9..94adc834b1 100644 --- a/components/prism-markdown.js +++ b/components/prism-markdown.js @@ -3,9 +3,25 @@ // Allow only one line break var inner = /\\.|[^\\\n\r_]|(?:\r?\n|\r)(?!\r?\n|\r)/.source; - // both bold and italic allow one nested instance of the other - var bold_ = /__(?:|_(?:)+_)+__/.source.replace(//g, inner); - var italic_ = /_(?:|__(?:)+__)+_/.source.replace(//g, inner); + /** + * This function is intended for the creation of the bold or italic pattern. + * + * This also adds a lookbehind group to the given pattern to ensure that the pattern is not backslash-escaped. + * + * _Note:_ Keep in mind that this adds a capturing group. + * + * @param {string} pattern + * @param {boolean} starAlternative Whether to also add an alternative where all `_`s are replaced with `*`s. + * @returns {RegExp} + */ + function createInline(pattern, starAlternative) { + pattern = pattern.replace(//g, inner); + if (starAlternative) { + pattern = pattern + '|' + pattern.replace(/_/g, '\\*'); + } + return RegExp(/((?:^|[^\\])(?:\\{2})*)/.source + '(?:' + pattern + ')'); + } + Prism.languages.markdown = Prism.languages.extend('markup', {}); Prism.languages.insertBefore('markdown', 'prolog', { @@ -107,7 +123,8 @@ // **strong** // __strong__ - pattern: RegExp('((?:^|[^\\\\])(?:\\\\{2})*)(?:' + bold_ + '|' + bold_.replace(/_/g, '\\*') + ')'), + // allow one nested instance of italic text using the same delimiter + pattern: createInline(/__(?:|_(?:)+_)+__/.source, true), lookbehind: true, greedy: true, inside: { @@ -123,7 +140,8 @@ // *em* // _em_ - pattern: RegExp('((?:^|[^\\\\])(?:\\\\{2})*)(?:' + italic_ + '|' + italic_.replace(/_/g, '\\*') + ')'), + // allow one nested instance of bold text using the same delimiter + pattern: createInline(/_(?:|__(?:)+__)+_/.source, true), lookbehind: true, greedy: true, inside: { @@ -139,7 +157,8 @@ // ~~strike through~~ // ~strike~ - pattern: RegExp(/((?:^|[^\\])(?:\\{2})*)(~~?)(?:|_)+?\2/.source.replace(//g, inner)), + // extra _ is because the inner pattern intentionally doesn't include it because of bold and italic + pattern: createInline(/(~~?)(?:|_)+?\2/.source, false), lookbehind: true, greedy: true, inside: { @@ -193,6 +212,20 @@ continue; } + /* + * Add the correct `language-xxxx` class to this code block. Keep in mind that the `code-language` token + * is optional. But the grammar is defined so that there is only one case we have to handle: + * + * token.content = [ + * ```, + * xxxx, + * '\n', // exactly one new lines (\r or \n or \r\n) + * ..., + * '\n', // exactly one new lines again + * ``` + * ]; + */ + var codeLang = token.content[1]; var codeBlock = token.content[3]; diff --git a/components/prism-markdown.min.js b/components/prism-markdown.min.js index 95596fd6d8..22eba7ada9 100644 --- a/components/prism-markdown.min.js +++ b/components/prism-markdown.min.js @@ -1 +1 @@ -!function(s){var n="\\\\.|[^\\\\\\n\r_]|(?:\r?\n|\r)(?!\r?\n|\r)",e="__(?:|_(?:)+_)+__".replace(//g,n),t="_(?:|__(?:)+__)+_".replace(//g,n);s.languages.markdown=s.languages.extend("markup",{}),s.languages.insertBefore("markdown","prolog",{blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},code:[{pattern:/^(?: {4}|\t).+/m,alias:"keyword"},{pattern:/``.+?``|`[^`\n]+`/,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\r?\n|\r))[\s\S]+?(?=(?:\r?\n|\r)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\r?\n|\r)(?:==+|--+)/,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#+.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:RegExp("((?:^|[^\\\\])(?:\\\\{2})*)(?:"+e+"|"+e.replace(/_/g,"\\*")+")"),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:RegExp("((?:^|[^\\\\])(?:\\\\{2})*)(?:"+t+"|"+t.replace(/_/g,"\\*")+")"),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:RegExp("((?:^|[^\\\\])(?:\\\\{2})*)(~~?)(?:|_)+?\\2".replace(//g,n)),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},url:{pattern:/!?\[[^\]]+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)| ?\[[^\]\n]*\])/,inside:{variable:{pattern:/(!?\[)[^\]]+(?=\]$)/,lookbehind:!0},string:{pattern:/"(?:\\.|[^"\\])*"(?=\)$)/}}}}),["bold","italic","strike"].forEach(function(e){["url","bold","italic","strike"].forEach(function(n){e!==n&&(s.languages.markdown[e].inside.content.inside[n]=s.languages.markdown[n])})}),s.hooks.add("after-tokenize",function(n){"markdown"!==n.language&&"md"!==n.language||!function n(e){if(e&&"string"!=typeof e)for(var t=0,a=e.length;t/g,"\\\\.|[^\\\\\\n\r_]|(?:\r?\n|\r)(?!\r?\n|\r)"),e&&(n=n+"|"+n.replace(/_/g,"\\*")),RegExp("((?:^|[^\\\\])(?:\\\\{2})*)(?:"+n+")")}s.languages.markdown=s.languages.extend("markup",{}),s.languages.insertBefore("markdown","prolog",{blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},code:[{pattern:/^(?: {4}|\t).+/m,alias:"keyword"},{pattern:/``.+?``|`[^`\n]+`/,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\r?\n|\r))[\s\S]+?(?=(?:\r?\n|\r)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\r?\n|\r)(?:==+|--+)/,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#+.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n("__(?:|_(?:)+_)+__",!0),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n("_(?:|__(?:)+__)+_",!0),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n("(~~?)(?:|_)+?\\2"),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},url:{pattern:/!?\[[^\]]+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)| ?\[[^\]\n]*\])/,inside:{variable:{pattern:/(!?\[)[^\]]+(?=\]$)/,lookbehind:!0},string:{pattern:/"(?:\\.|[^"\\])*"(?=\)$)/}}}}),["bold","italic","strike"].forEach(function(e){["url","bold","italic","strike"].forEach(function(n){e!==n&&(s.languages.markdown[e].inside.content.inside[n]=s.languages.markdown[n])})}),s.hooks.add("after-tokenize",function(n){"markdown"!==n.language&&"md"!==n.language||!function n(e){if(e&&"string"!=typeof e)for(var t=0,a=e.length;t Date: Mon, 24 Jun 2019 15:51:46 +0200 Subject: [PATCH 0291/1100] Rebuilt Prism --- components/prism-markdown.min.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/prism-markdown.min.js b/components/prism-markdown.min.js index 22eba7ada9..fd5615fdf5 100644 --- a/components/prism-markdown.min.js +++ b/components/prism-markdown.min.js @@ -1 +1 @@ -!function(s){function n(n,e){return n=n.replace(//g,"\\\\.|[^\\\\\\n\r_]|(?:\r?\n|\r)(?!\r?\n|\r)"),e&&(n=n+"|"+n.replace(/_/g,"\\*")),RegExp("((?:^|[^\\\\])(?:\\\\{2})*)(?:"+n+")")}s.languages.markdown=s.languages.extend("markup",{}),s.languages.insertBefore("markdown","prolog",{blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},code:[{pattern:/^(?: {4}|\t).+/m,alias:"keyword"},{pattern:/``.+?``|`[^`\n]+`/,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\r?\n|\r))[\s\S]+?(?=(?:\r?\n|\r)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\r?\n|\r)(?:==+|--+)/,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#+.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n("__(?:|_(?:)+_)+__",!0),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n("_(?:|__(?:)+__)+_",!0),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n("(~~?)(?:|_)+?\\2"),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},url:{pattern:/!?\[[^\]]+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)| ?\[[^\]\n]*\])/,inside:{variable:{pattern:/(!?\[)[^\]]+(?=\]$)/,lookbehind:!0},string:{pattern:/"(?:\\.|[^"\\])*"(?=\)$)/}}}}),["bold","italic","strike"].forEach(function(e){["url","bold","italic","strike"].forEach(function(n){e!==n&&(s.languages.markdown[e].inside.content.inside[n]=s.languages.markdown[n])})}),s.hooks.add("after-tokenize",function(n){"markdown"!==n.language&&"md"!==n.language||!function n(e){if(e&&"string"!=typeof e)for(var t=0,a=e.length;t/g,"\\\\.|[^\\\\\\n\r_]|(?:\r?\n|\r)(?!\r?\n|\r)"),e&&(n=n+"|"+n.replace(/_/g,"\\*")),RegExp("((?:^|[^\\\\])(?:\\\\{2})*)(?:"+n+")")}s.languages.markdown=s.languages.extend("markup",{}),s.languages.insertBefore("markdown","prolog",{blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},code:[{pattern:/^(?: {4}|\t).+/m,alias:"keyword"},{pattern:/``.+?``|`[^`\n]+`/,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\r?\n|\r))[\s\S]+?(?=(?:\r?\n|\r)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\r?\n|\r)(?:==+|--+)/,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#+.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n("__(?:|_(?:)+_)+__",!0),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n("_(?:|__(?:)+__)+_",!0),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n("(~~?)(?:|_)+?\\2",!1),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},url:{pattern:/!?\[[^\]]+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)| ?\[[^\]\n]*\])/,inside:{variable:{pattern:/(!?\[)[^\]]+(?=\]$)/,lookbehind:!0},string:{pattern:/"(?:\\.|[^"\\])*"(?=\)$)/}}}}),["bold","italic","strike"].forEach(function(e){["url","bold","italic","strike"].forEach(function(n){e!==n&&(s.languages.markdown[e].inside.content.inside[n]=s.languages.markdown[n])})}),s.hooks.add("after-tokenize",function(n){"markdown"!==n.language&&"md"!==n.language||!function n(e){if(e&&"string"!=typeof e)for(var t=0,a=e.length;t Date: Tue, 25 Jun 2019 03:08:02 +0200 Subject: [PATCH 0292/1100] Download page: Fixed Edge's word wrap (#1920) This makes the word break behavior consistent in all browsers. --- download.html | 1 - 1 file changed, 1 deletion(-) diff --git a/download.html b/download.html index abd58cabac..c8e0bf9af5 100644 --- a/download.html +++ b/download.html @@ -107,7 +107,6 @@ } #download pre { height: 20em; - word-wrap: break-word; } #download .download-button { cursor: pointer; From 6b4b2d2b87c873cd96671eb4d9fe6a0151aa2166 Mon Sep 17 00:00:00 2001 From: RunDevelopment Date: Tue, 25 Jun 2019 03:13:29 +0200 Subject: [PATCH 0293/1100] Removed unnecessary `lookbehind: true` --- components/prism-markdown.js | 1 - components/prism-markdown.min.js | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/components/prism-markdown.js b/components/prism-markdown.js index 5f40e5e925..6fc2da7f48 100644 --- a/components/prism-markdown.js +++ b/components/prism-markdown.js @@ -44,7 +44,6 @@ inside: { 'table-data': { pattern: RegExp(tableCell), - lookbehind: true, inside: Prism.languages.markdown }, 'punctuation': /\|/ diff --git a/components/prism-markdown.min.js b/components/prism-markdown.min.js index 4060f03394..95ea27f9b1 100644 --- a/components/prism-markdown.min.js +++ b/components/prism-markdown.min.js @@ -1 +1 @@ -!function(s){function n(n,e){return n=n.replace(//g,"\\\\.|[^\\\\\\n\r_]|(?:\r?\n|\r)(?!\r?\n|\r)"),e&&(n=n+"|"+n.replace(/_/g,"\\*")),RegExp("((?:^|[^\\\\])(?:\\\\{2})*)(?:"+n+")")}var e="(?:\\\\.|``.+?``|`[^`\r\\n]+`|[^\\\\|\r\\n`])+",t="\\|?__(?:\\|__)+\\|?(?:(?:\r?\n|\r)|$)".replace(/__/g,e),a="\\|?[ \t]*:?-{3,}:?[ \t]*(?:\\|[ \t]*:?-{3,}:?[ \t]*)+\\|?(?:\r?\n|\r)";s.languages.markdown=s.languages.extend("markup",{}),s.languages.insertBefore("markdown","prolog",{blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+t+a+"(?:"+t+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+t+a+")(?:"+t+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(e),lookbehind:!0,inside:s.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+t+")"+a+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+t+"$"),inside:{"table-header":{pattern:RegExp(e),alias:"important",inside:s.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/(^[ \t]*(?:\r?\n|\r))(?: {4}|\t).+(?:(?:\r?\n|\r)(?: {4}|\t).+)*/m,lookbehind:!0,alias:"keyword"},{pattern:/``.+?``|`[^`\r\n]+`/,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\r?\n|\r))[\s\S]+?(?=(?:\r?\n|\r)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\r?\n|\r)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#+.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n("__(?:|_(?:)+_)+__",!0),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n("_(?:|__(?:)+__)+_",!0),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n("(~~?)(?:|_)+?\\2",!1),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},url:{pattern:/!?\[[^\]]+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)| ?\[[^\]\n]*\])/,inside:{variable:{pattern:/(!?\[)[^\]]+(?=\]$)/,lookbehind:!0},string:{pattern:/"(?:\\.|[^"\\])*"(?=\)$)/}}}}),["bold","italic","strike"].forEach(function(e){["url","bold","italic","strike"].forEach(function(n){e!==n&&(s.languages.markdown[e].inside.content.inside[n]=s.languages.markdown[n])})}),s.hooks.add("after-tokenize",function(n){"markdown"!==n.language&&"md"!==n.language||!function n(e){if(e&&"string"!=typeof e)for(var t=0,a=e.length;t/g,"\\\\.|[^\\\\\\n\r_]|(?:\r?\n|\r)(?!\r?\n|\r)"),e&&(n=n+"|"+n.replace(/_/g,"\\*")),RegExp("((?:^|[^\\\\])(?:\\\\{2})*)(?:"+n+")")}var e="(?:\\\\.|``.+?``|`[^`\r\\n]+`|[^\\\\|\r\\n`])+",t="\\|?__(?:\\|__)+\\|?(?:(?:\r?\n|\r)|$)".replace(/__/g,e),a="\\|?[ \t]*:?-{3,}:?[ \t]*(?:\\|[ \t]*:?-{3,}:?[ \t]*)+\\|?(?:\r?\n|\r)";s.languages.markdown=s.languages.extend("markup",{}),s.languages.insertBefore("markdown","prolog",{blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+t+a+"(?:"+t+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+t+a+")(?:"+t+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(e),inside:s.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+t+")"+a+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+t+"$"),inside:{"table-header":{pattern:RegExp(e),alias:"important",inside:s.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/(^[ \t]*(?:\r?\n|\r))(?: {4}|\t).+(?:(?:\r?\n|\r)(?: {4}|\t).+)*/m,lookbehind:!0,alias:"keyword"},{pattern:/``.+?``|`[^`\r\n]+`/,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\r?\n|\r))[\s\S]+?(?=(?:\r?\n|\r)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\r?\n|\r)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#+.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n("__(?:|_(?:)+_)+__",!0),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n("_(?:|__(?:)+__)+_",!0),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n("(~~?)(?:|_)+?\\2",!1),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},url:{pattern:/!?\[[^\]]+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)| ?\[[^\]\n]*\])/,inside:{variable:{pattern:/(!?\[)[^\]]+(?=\]$)/,lookbehind:!0},string:{pattern:/"(?:\\.|[^"\\])*"(?=\)$)/}}}}),["bold","italic","strike"].forEach(function(e){["url","bold","italic","strike"].forEach(function(n){e!==n&&(s.languages.markdown[e].inside.content.inside[n]=s.languages.markdown[n])})}),s.hooks.add("after-tokenize",function(n){"markdown"!==n.language&&"md"!==n.language||!function n(e){if(e&&"string"!=typeof e)for(var t=0,a=e.length;t Date: Tue, 25 Jun 2019 12:29:20 -0700 Subject: [PATCH 0294/1100] Add className option for toolbar items (#1951) Allows for passing in a className when registering a toolbar button to allow to target via CSS. An example: ```js Prism.plugins.toolbar.registerButton( 'my-button', { text: 'My Button', className: 'my-button', }); ``` This will add the span element `My Button` . --- plugins/toolbar/prism-toolbar.js | 5 +++++ plugins/toolbar/prism-toolbar.min.js | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/plugins/toolbar/prism-toolbar.js b/plugins/toolbar/prism-toolbar.js index bc79a59958..893bded2bb 100644 --- a/plugins/toolbar/prism-toolbar.js +++ b/plugins/toolbar/prism-toolbar.js @@ -14,6 +14,7 @@ * @property {string} text The text displayed. * @property {string} [url] The URL of the link which will be created. * @property {Function} [onClick] The event listener for the `click` event of the created button. + * @property {string} [className] The class attribute to include with element. */ /** @@ -44,6 +45,10 @@ element = document.createElement('span'); } + if (opts.className) { + element.classList.add(opts.className); + } + element.textContent = opts.text; return element; diff --git a/plugins/toolbar/prism-toolbar.min.js b/plugins/toolbar/prism-toolbar.min.js index d582be6110..3b9f082913 100644 --- a/plugins/toolbar/prism-toolbar.min.js +++ b/plugins/toolbar/prism-toolbar.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof self&&self.Prism&&self.document){var r=[],i={},n=function(){};Prism.plugins.toolbar={};var t=Prism.plugins.toolbar.registerButton=function(t,n){var e;e="function"==typeof n?n:function(t){var e;return"function"==typeof n.onClick?((e=document.createElement("button")).type="button",e.addEventListener("click",function(){n.onClick.call(this,t)})):"string"==typeof n.url?(e=document.createElement("a")).href=n.url:e=document.createElement("span"),e.textContent=n.text,e},t in i?console.warn('There is a button with the key "'+t+'" registered already.'):r.push(i[t]=e)},e=Prism.plugins.toolbar.hook=function(a){var t=a.element.parentNode;if(t&&/pre/i.test(t.nodeName)&&!t.parentNode.classList.contains("code-toolbar")){var e=document.createElement("div");e.classList.add("code-toolbar"),t.parentNode.insertBefore(e,t),e.appendChild(t);var o=document.createElement("div");o.classList.add("toolbar"),document.body.hasAttribute("data-toolbar-order")&&(r=document.body.getAttribute("data-toolbar-order").split(",").map(function(t){return i[t]||n})),r.forEach(function(t){var e=t(a);if(e){var n=document.createElement("div");n.classList.add("toolbar-item"),n.appendChild(e),o.appendChild(n)}}),e.appendChild(o)}};t("label",function(t){var e=t.element.parentNode;if(e&&/pre/i.test(e.nodeName)&&e.hasAttribute("data-label")){var n,a,o=e.getAttribute("data-label");try{a=document.querySelector("template#"+o)}catch(t){}return a?n=a.content:(e.hasAttribute("data-url")?(n=document.createElement("a")).href=e.getAttribute("data-url"):n=document.createElement("span"),n.textContent=o),n}}),Prism.hooks.add("complete",e)}}(); \ No newline at end of file +!function(){if("undefined"!=typeof self&&self.Prism&&self.document){var r=[],i={},a=function(){};Prism.plugins.toolbar={};var t=Prism.plugins.toolbar.registerButton=function(t,a){var e;e="function"==typeof a?a:function(t){var e;return"function"==typeof a.onClick?((e=document.createElement("button")).type="button",e.addEventListener("click",function(){a.onClick.call(this,t)})):"string"==typeof a.url?(e=document.createElement("a")).href=a.url:e=document.createElement("span"),a.className&&e.classList.add(a.className),e.textContent=a.text,e},t in i?console.warn('There is a button with the key "'+t+'" registered already.'):r.push(i[t]=e)},e=Prism.plugins.toolbar.hook=function(n){var t=n.element.parentNode;if(t&&/pre/i.test(t.nodeName)&&!t.parentNode.classList.contains("code-toolbar")){var e=document.createElement("div");e.classList.add("code-toolbar"),t.parentNode.insertBefore(e,t),e.appendChild(t);var o=document.createElement("div");o.classList.add("toolbar"),document.body.hasAttribute("data-toolbar-order")&&(r=document.body.getAttribute("data-toolbar-order").split(",").map(function(t){return i[t]||a})),r.forEach(function(t){var e=t(n);if(e){var a=document.createElement("div");a.classList.add("toolbar-item"),a.appendChild(e),o.appendChild(a)}}),e.appendChild(o)}};t("label",function(t){var e=t.element.parentNode;if(e&&/pre/i.test(e.nodeName)&&e.hasAttribute("data-label")){var a,n,o=e.getAttribute("data-label");try{n=document.querySelector("template#"+o)}catch(t){}return n?a=n.content:(e.hasAttribute("data-url")?(a=document.createElement("a")).href=e.getAttribute("data-url"):a=document.createElement("span"),a.textContent=o),a}}),Prism.hooks.add("complete",e)}}(); \ No newline at end of file From b65438539d1f63464f8cc2db06fd741d6c221f07 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Sun, 30 Jun 2019 00:00:14 +0200 Subject: [PATCH 0295/1100] Update website page styles to not interfere with themes (#1952) This changes the `style.css` to not interfere with themes. The problem was that `* { ...; font-weight: normal; }` caused markdowns bold text to not be rendered as bold.
    Style inheritance ![image](https://user-images.githubusercontent.com/20878432/60092675-e90e2000-9747-11e9-8b16-73bf3e219001.png)
    The fix is quite simple: I just removed the `font-weight: normal;` line. The only elements (besides the bold tokens) that changed were `h2`s, so they get a new rule. In a side-to-side comparison, I wasn't able to spot any other differences. Result: ![image](https://user-images.githubusercontent.com/20878432/60092899-5e79f080-9748-11e9-955c-bd3645fc018e.png) --- style.css | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/style.css b/style.css index 64f79af69e..221b6cd728 100644 --- a/style.css +++ b/style.css @@ -24,7 +24,6 @@ footer p { * { margin: 0; padding: 0; - font-weight: normal; } body { @@ -77,6 +76,10 @@ h2 { margin: 1em 0 .3em; } +h2 { + font-weight: normal; +} + dt { margin: 1em 0 0 0; font-size: 130%; From 24c8e71754c4441b509defa04d4db07e293e4f9e Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Sun, 30 Jun 2019 00:11:14 +0200 Subject: [PATCH 0296/1100] Extending page: Fixed typo + new alias section (#1949) --- extending.html | 66 +++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 54 insertions(+), 12 deletions(-) diff --git a/extending.html b/extending.html index 1051a31ffb..dfc3f1a329 100644 --- a/extending.html +++ b/extending.html @@ -133,16 +133,22 @@

    Parameters

    Creating a new language definition

    +

    This section will explain the usual workflow of creating a new language definition.

    + +

    As an example, we will create the language definition of the fictional Foo's Binary, Artistic Robots™ language or just Foo Bar for short.

    +
    1. -

      Create a new file components/prism-lang-id.js.

      +

      Create a new file components/prism-foo-bar.js.

      + +

      In this example, we choose foo-bar as the id of the new language. The language id has to be unique and should work well with the language-xxxx CSS class name Prism uses to refer to language definitions. Your language id should ideally match the regular expression /^[a-z][a-z\d]*(?:-[a-z][a-z\d]*)*$/.

    2. Edit components.json to register the new language by adding it to the languages object. (Please note that all language entries are sorted alphabetically by title.)
      - Your new entry will look like this:

      + Our new entry for this example will look like this:

      -
      "lang-id": {
      -	"title": "Language Title",
      +			
      "foo-bar": {
      +	"title": "Foo Bar",
       	"owner": "Your GitHub name"
       }
      @@ -153,22 +159,58 @@

      Creating a new language definition

    3. Rebuild Prism by running npx gulp.

      -

      This will make your language available to the test page, or more precise: your local version of it. You can open you local test.html page in any browser, select your language, and see how your language definition highlights the given code.

      +

      This will make your language available to the test page, or more precise: your local version of it. You can open your local test.html page in any browser, select your language, and see how your language definition highlights any code you input.

      -

      Note: You have to reload the page to apply changes made to prism-lang-id.js.

      +

      Note: You have to reload the test page to apply changes made to prism-foo-bar.js.

    4. Write the language definition.

      The above section already explains the makeup of language definitions.

    5. +
    6. +

      Adding aliases.

      + +

      Aliases for are useful if your language is known under more than just one name or there are very common abbreviations for your language (e.g. JS for JavaScript). Keep in mind that aliases are very similar to language ids in that they also have to be unique (i.e. there cannot be an alias which is the same as another alias of language id) and work as CSS class names.

      + +

      In this example, we will register the alias foo for foo-bar because Foo Bar code is stored in .foo files.

      + +

      To add the alias, we add this line at the end of prism-foo-bar.js:

      + +
      Prism.languages.foo = Prism.language['foo-bar'];
      + +

      Aliases also have to be registered in components.json by adding the alias property to the language entry. In this example, the updated entry will look like this:

      + +
      "foo-bar": {
      +	"title": "Foo Bar",
      +	"alias": "foo",
      +	"owner": "Your GitHub name"
      +}
      + +

      Note: alias can also be a string array if you need to register multiple aliases.

      + +

      Using aliasTitles, it's also possible to give aliases specific titles. In this example, this won't be necessary but a good example as to where this is useful is the markup language:

      + +
      "markup": {
      +	"title": "Markup",
      +	"alias": ["html", "xml", "svg", "mathml"],
      +	"aliasTitles": {
      +		"html": "HTML",
      +		"xml": "XML",
      +		"svg": "SVG",
      +		"mathml": "MathML"
      +	},
      +	"option": "default"
      +}
      +
    7. Add some tests.

      -

      Create a folder tests/languages/lang-id/. This is where your test files will live. The test format and how to run tests is described here. A good example are the tests of the JavaScript language.

      +

      Create a folder tests/languages/foo-bar/. This is where your test files will live. The test format and how to run tests is described here.

      + +

      You should add a test for every major feature of your language. Test files should test the common case and certain edge cases (if any). Good examples are the tests of the JavaScript language.

      -

      You should add a test for every major feature of your language. Test files should test the common case and certain edge cases (if any).
      - You can use this template for new .test files:

      +

      You can use this template for new .test files:

      The code to test.
       
      @@ -192,13 +234,13 @@ 

      Creating a new language definition

    8. Once you carefully checked that the test case is handled correctly (i.e. by using the test page), run the following command:

      - npm run test:languages -- --language=lang-id --pretty + npm run test:languages -- --language=foo-bar --pretty

      This command will check only your test files. The new test will fail because the specified JSON is incorrect but the error message of the failed test will also include the JSON of the simplified token stream Prism created. This is what we're after. Replace the current incorrect JSON with the output labeled Token Stream. (Please also adjust the indentation. We use tabs.)

    9. Carefully check that the token stream JSON you just inserted is what you expect.

    10. -
    11. Re-run npm run test:languages -- --language=lang-id --pretty to verify that the test passes.
    12. +
    13. Re-run npm run test:languages -- --language=foo-bar --pretty to verify that the test passes.
  • @@ -208,7 +250,7 @@

    Creating a new language definition

  • Add an example page.

    -

    Create a new file examples/prism-lang-id.html. This will be the template containing the example markup. Just look at other examples to see how these files are structured.
    +

    Create a new file examples/prism-foo-bar.html. This will be the template containing the example markup. Just look at other examples to see how these files are structured.
    We don't have any rules as to what counts as an example, so a single Full example section where you present the highlighting of the major features of the language is enough.

  • From b19f512fd3feb294f30fa918f6acad2fa6369d5b Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Sun, 30 Jun 2019 03:20:40 +0200 Subject: [PATCH 0297/1100] Autoloader: Fixed and improved callbacks (#1935) This PR fixes and improves the internal Autoloader callbacks. ### Bug Callbacks were stored in `success_callbacks` and `error_callbacks` and not removed after execution meaning once added, a callback was executed every time the language for which the callback was added for was requested (either directly or as a dependency). This bug wasn't very visible because of how the Autoloader is usually used. Usually, the Autoloader is used to load the languages for the static code in a page. This means that the Autoloader gets asked for a bunch of languages, loads them asynchronously and then executes the callbacks with this [line](https://github.com/PrismJS/prism/blob/d4373f3a282f4c09e4fb4dcbd8885c7848b61073/plugins/autoloader/prism-autoloader.js#L187) (`success` is [this](https://github.com/PrismJS/prism/blob/d4373f3a282f4c09e4fb4dcbd8885c7848b61073/plugins/autoloader/prism-autoloader.js#L306) function). Because it takes a little while until the language is loaded (certainly until the next tick), all callbacks will be registered before the `onload` of the script is called meaning that [this](https://github.com/PrismJS/prism/blob/d4373f3a282f4c09e4fb4dcbd8885c7848b61073/plugins/autoloader/prism-autoloader.js#L300) never gets executed. Thus the bug doesn't show up. (And even if it does, the success callback is usually just a `Prism.highlightElement` call.) I discovered this bug when I used Autoloader to highlight C like code and then after that was done (some ticks later), I used Autoloader to highlight JavaScript code. What followed was that the synchronously called callbacks caused a stack overflow. Just a bit of good ol' infinite recursion. I could have also fixed it by deferring callbacks to the next tick but I decided to rework the callback structure because this change of behavior might break some code. Autoloader invokes the callbacks of already loaded languages (and failed ones) synchronously while all other callbacks are called asynchronously. This fix keeps this behavior. (It's another question as to whether we should call all callbacks asynchronously. Yes, we should IMO.) ### Improvements 1. [This](https://github.com/PrismJS/prism/blob/d4373f3a282f4c09e4fb4dcbd8885c7848b61073/plugins/autoloader/prism-autoloader.js#L218) declaration and usage of `data` is completely unnecessary and was removed. 1. Typings for `lang_data`. --- plugins/autoloader/prism-autoloader.js | 56 ++++++++++++---------- plugins/autoloader/prism-autoloader.min.js | 2 +- 2 files changed, 31 insertions(+), 27 deletions(-) diff --git a/plugins/autoloader/prism-autoloader.js b/plugins/autoloader/prism-autoloader.js index c1415b08c0..e5189ab7a8 100644 --- a/plugins/autoloader/prism-autoloader.js +++ b/plugins/autoloader/prism-autoloader.js @@ -153,6 +153,13 @@ "yml": "yaml" }/*]*/; + /** + * @typedef LangDataItem + * @property {{ success?: function, error?: function }[]} callbacks + * @property {boolean} [error] + * @property {boolean} [loading] + */ + /** @type {Object} */ var lang_data = {}; var ignored_language = 'none'; @@ -216,11 +223,6 @@ lang = lang_aliases[lang]; } - var data = lang_data[lang]; - if (!data) { - data = lang_data[lang] = {}; - } - // Look for additional dependencies defined on the or
     tags
     		var deps = elt.getAttribute('data-dependencies');
     		if (!deps && elt.parentNode && elt.parentNode.tagName.toLowerCase() === 'pre') {
    @@ -282,20 +284,14 @@
     		var load = function () {
     			var data = lang_data[lang];
     			if (!data) {
    -				data = lang_data[lang] = {};
    -			}
    -			if (success) {
    -				if (!data.success_callbacks) {
    -					data.success_callbacks = [];
    -				}
    -				data.success_callbacks.push(success);
    -			}
    -			if (error) {
    -				if (!data.error_callbacks) {
    -					data.error_callbacks = [];
    -				}
    -				data.error_callbacks.push(error);
    +				data = lang_data[lang] = {
    +					callbacks: []
    +				};
     			}
    +			data.callbacks.push({
    +				success: success,
    +				error: error
    +			});
     
     			if (!force && Prism.languages[lang]) {
     				languageSuccess(lang);
    @@ -329,10 +325,14 @@
     	 * @param {string} lang
     	 */
     	var languageSuccess = function (lang) {
    -		if (lang_data[lang] && lang_data[lang].success_callbacks && lang_data[lang].success_callbacks.length) {
    -			lang_data[lang].success_callbacks.forEach(function (f) {
    -				f(lang);
    -			});
    +		if (lang_data[lang] ) {
    +			var callbacks = lang_data[lang].callbacks;
    +			while (callbacks.length) {
    +				var callback = callbacks.shift().success;
    +				if (callback) {
    +					callback();
    +				}
    +			}
     		}
     	};
     
    @@ -341,10 +341,14 @@
     	 * @param {string} lang
     	 */
     	var languageError = function (lang) {
    -		if (lang_data[lang] && lang_data[lang].error_callbacks && lang_data[lang].error_callbacks.length) {
    -			lang_data[lang].error_callbacks.forEach(function (f) {
    -				f(lang);
    -			});
    +		if (lang_data[lang]) {
    +			var callbacks = lang_data[lang].callbacks;
    +			while (callbacks.length) {
    +				var callback = callbacks.shift().error;
    +				if (callback) {
    +					callback();
    +				}
    +			}
     		}
     	};
     
    diff --git a/plugins/autoloader/prism-autoloader.min.js b/plugins/autoloader/prism-autoloader.min.js
    index 319b6f3459..8b32438ad1 100644
    --- a/plugins/autoloader/prism-autoloader.min.js
    +++ b/plugins/autoloader/prism-autoloader.min.js
    @@ -1 +1 @@
    -!function(){if("undefined"!=typeof self&&self.Prism&&self.document&&document.createElement){var i={javascript:"clike",actionscript:"javascript",arduino:"cpp",aspnet:["markup","csharp"],bison:"c",c:"clike",csharp:"clike",cpp:"c",coffeescript:"javascript",crystal:"ruby","css-extras":"css",d:"clike",dart:"clike",django:"markup-templating",ejs:["javascript","markup-templating"],erb:["ruby","markup-templating"],fsharp:"clike",flow:"javascript",glsl:"clike",gml:"clike",go:"clike",groovy:"clike",haml:"ruby",handlebars:"markup-templating",haxe:"clike",java:"clike",javadoc:["markup","java","javadoclike"],jolie:"clike",jsdoc:["javascript","javadoclike"],"js-extras":"javascript",jsonp:"json",json5:"json",kotlin:"clike",less:"css",markdown:"markup","markup-templating":"markup",n4js:"javascript",nginx:"clike",objectivec:"c",opencl:"cpp",parser:"markup",php:["clike","markup-templating"],phpdoc:["php","javadoclike"],"php-extras":"php",plsql:"sql",processing:"clike",protobuf:"clike",pug:["markup","javascript"],qore:"clike",jsx:["markup","javascript"],tsx:["jsx","typescript"],reason:"clike",ruby:"clike",sass:"css",scss:"css",scala:"java","shell-session":"bash",smarty:"markup-templating",soy:"markup-templating",swift:"clike",tap:"yaml",textile:"markup",tt2:["clike","markup-templating"],twig:"markup",typescript:"javascript","t4-cs":["t4-templating","csharp"],"t4-vb":["t4-templating","visual-basic"],vala:"clike",vbnet:"basic",velocity:"markup",wiki:"markup",xeora:"markup",xquery:"markup"},l={html:"markup",xml:"markup",svg:"markup",mathml:"markup",js:"javascript",adoc:"asciidoc",shell:"bash",rbnf:"bnf",cs:"csharp",dotnet:"csharp",coffee:"coffeescript",jinja2:"django",dockerfile:"docker",gamemakerlanguage:"gml",hs:"haskell",tex:"latex",context:"latex",emacs:"lisp",elisp:"lisp","emacs-lisp":"lisp",md:"markdown",n4jsd:"n4js",objectpascal:"pascal",py:"python",rb:"ruby",ts:"typescript",t4:"t4-cs",vb:"visual-basic",xeoracube:"xeora",yml:"yaml"},n={},a=document.getElementsByTagName("script"),e="components/";if((a=a[a.length-1]).hasAttribute("data-autoloader-path")){var c=a.getAttribute("data-autoloader-path").trim();0
    Date: Sun, 30 Jun 2019 03:42:07 +0200
    Subject: [PATCH 0298/1100] README: Added npm downloads badge (#1934)
    
    This adds an npm downloads/week badge to Prism's readme which also links our npm page for a little extra promotion.
    ---
     README.md | 1 +
     1 file changed, 1 insertion(+)
    
    diff --git a/README.md b/README.md
    index 6afe7eced0..08a80871a5 100644
    --- a/README.md
    +++ b/README.md
    @@ -1,6 +1,7 @@
     # [Prism](http://prismjs.com/)
     
     [![Build Status](https://travis-ci.org/PrismJS/prism.svg?branch=master)](https://travis-ci.org/PrismJS/prism)
    +[![npm](https://img.shields.io/npm/dw/prismjs.svg)](https://www.npmjs.com/package/prismjs)
     
     Prism is a lightweight, robust, elegant syntax highlighting library. It's a spin-off project from [Dabblet](http://dabblet.com/).
     
    
    From 922ec555408a4631ef69c0cd1206d995edfee6f2 Mon Sep 17 00:00:00 2001
    From: Michael Schmidt 
    Date: Sun, 30 Jun 2019 03:54:26 +0200
    Subject: [PATCH 0299/1100] Website: Added basic usage for CDNs (#1924)
    
    Per [suggestion](https://github.com/PrismJS/prism/issues/1922#issuecomment-497681398) by @foxycode, I added an example for the usage of Prism with CDNs.
    ---
     index.html | 21 +++++++++++++++++++++
     1 file changed, 21 insertions(+)
    
    diff --git a/index.html b/index.html
    index ae717859ee..fef21c9757 100644
    --- a/index.html
    +++ b/index.html
    @@ -152,6 +152,27 @@ 

    Basic usage

    If you want to prevent any elements from being automatically highlighted, you can use the attribute data-manual on the <script> element you used for prism and use the API. Example:

    <script src="prism.js" data-manual></script>
    +

    Usage with CDNs

    + +

    In combination with CDNs, we recommend using the Autoloader plugin which automatically loads languages when necessary.

    + +

    The setup of the Autoloader, will look like the following. You can also your own themes of course.

    + +
    <!DOCTYPE html>
    +<html>
    +<head>
    +	...
    +	<link href="https://myCDN.com/prism@v1.x/themes/prism.css" rel="stylesheet" />
    +</head>
    +<body>
    +	...
    +	<script src="https://myCDN.com/prism@v1.x/components/prism-core.min.js"></script>
    +	<script src="https://myCDN.com/prism@v1.x/plugins/autoloader/prism-autoloader.min.js"></script>
    +	<script>Prism.plugins.autoloader.languages_path = 'https://myCDN.com/prism@v1.x/components/'</script>
    +</body>
    +</html>
    + +

    CDNs which provide PrismJS are e.g. cdnjs and jsDelivr.

    Usage with Webpack, Browserify, & Other Bundlers

    From a16d4a25131df711aa8ba4ee07e5e0a7ef468f94 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Sun, 30 Jun 2019 03:59:48 +0200 Subject: [PATCH 0300/1100] Examples improvements (#1919) This PR makes some improvements to the examples website: 1. `fileExists` will now also check local files, so that newly added examples can be viewed. (Requires localhost) 1. `update` now uses `Prism.highlightAllUnder` instead of the self-constructed copy of it. 1. Some formatting. --- scripts/examples.js | 130 ++++++++++++++++++++++---------------------- 1 file changed, 64 insertions(+), 66 deletions(-) diff --git a/scripts/examples.js b/scripts/examples.js index 5c96907601..f226f45b85 100644 --- a/scripts/examples.js +++ b/scripts/examples.js @@ -20,63 +20,62 @@ var treePromise = new Promise(function (resolve) { var languages = components.languages; -for (var id in languages) { - if (id === 'meta') { - continue; - } - - (function (id) { - var language = languages[id]; - var checked = false; - - if (language.option === 'default') { - checked = true; - } +Promise.all(Object.keys(languages).filter(function (id) { return id !== 'meta'; }).map(function (id) { + var language = languages[id]; - language.enabled = checked; - language.path = languages.meta.path.replace(/\{id}/g, id) + '.js'; - language.examplesPath = languages.meta.examplesPath.replace(/\{id}/g, id) + '.html'; + language.enabled = language.option === 'default'; + language.path = languages.meta.path.replace(/\{id}/g, id) + '.js'; + language.examplesPath = languages.meta.examplesPath.replace(/\{id}/g, id) + '.html'; - fileExists(language.examplesPath).then(function (exists) { - $u.element.create('label', { - attributes: { - 'data-id': id, - 'title': !exists ? 'No examples are available for this language.' : '' - }, - className: !exists ? 'unavailable' : '', - contents: [ - { - tag: 'input', - properties: { - type: 'checkbox', - name: 'language', - value: id, - checked: checked && exists, - disabled: !exists, - onclick: function () { - $$('input[name="' + this.name + '"]').forEach(function (input) { - languages[input.value].enabled = input.checked; - }); - - update(id); - } + return fileExists(language.examplesPath).then(function (exists) { + return { id: id, exists: exists }; + }); +})).then(function (values) { + values.forEach(function (result) { + var id = result.id; + var exists = result.exists; + var language = languages[id]; + var checked = language.enabled; + + $u.element.create('label', { + attributes: { + 'data-id': id, + 'title': !exists ? 'No examples are available for this language.' : '' + }, + className: !exists ? 'unavailable' : '', + contents: [ + { + tag: 'input', + properties: { + type: 'checkbox', + name: 'language', + value: id, + checked: checked && exists, + disabled: !exists, + onclick: function () { + $$('input[name="' + this.name + '"]').forEach(function (input) { + languages[input.value].enabled = input.checked; + }); + + update(id); } - }, - language.title - ], - inside: '#languages' - }); - examples[id] = $u.element.create('section', { - 'id': 'language-' + id, - 'className': 'language-' + id, - inside: '#examples' - }); - if (checked) { - update(id); - } + } + }, + language.title + ], + inside: '#languages' }); - }(id)); -} + examples[id] = $u.element.create('section', { + 'id': 'language-' + id, + 'className': 'language-' + id, + inside: '#examples' + }); + if (checked) { + update(id); + } + }); +}); + function fileExists(filepath) { return treePromise.then(function (tree) { @@ -85,6 +84,12 @@ function fileExists(filepath) { return true; } } + + // on localhost: The missing example might be for a new language + if (location.hostname === 'localhost' || location.hostname === '127.0.0.1') { + return getFileContents(filepath).then(function () { return true; }, function () { return false; }); + } + return false; }); } @@ -150,11 +155,7 @@ function update(id) { examples[id].innerHTML = buildContentsHeader(id) + contents; loadLanguage(id).then(function () { - var elements = examples[id].querySelectorAll('code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'); - - for (var i=0, element; element = elements[i++];) { - Prism.highlightElement(element); - } + Prism.highlightAllUnder(examples[id]); }); }); } else { @@ -166,10 +167,9 @@ function update(id) { * Loads a language, including all dependencies * * @param {string} lang the language to load - * @type {Promise} the promise which resolves as soon as everything is loaded + * @returns {Promise} the promise which resolves as soon as everything is loaded */ -function loadLanguage (lang) -{ +function loadLanguage(lang) { // at first we need to fetch all dependencies for the main language // Note: we need to do this, even if the main language already is loaded (just to be sure..) // @@ -200,12 +200,10 @@ function loadLanguage (lang) * Returns all dependencies (as identifiers) of a specific language * * @param {string} lang - * @returns {Array.} the list of dependencies. Empty if the language has none. + * @returns {Array} the list of dependencies. Empty if the language has none. */ -function getDependenciesOfLanguage (lang) -{ - if (!components.languages[lang] || !components.languages[lang].require) - { +function getDependenciesOfLanguage(lang) { + if (!components.languages[lang] || !components.languages[lang].require) { return []; } From 36a5fa0eb8bd68d90bba1bf1be0acee0061ed8d8 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Sun, 30 Jun 2019 04:19:54 +0200 Subject: [PATCH 0301/1100] Known failure page (#1876) This PR adds a known failures page. This resolves #1750. The known failures are moved from the example pages. (I also updated all example pages with invalid HTML.) Some known failures were actually fixed in the meantime but never updated, so I removed a few. Those were: - Handlebars - Markdown's nested bold-italic - Smarty - Textile's "Nested styles are only partially supported" ### Screenshot
    ![image](https://user-images.githubusercontent.com/20878432/56849438-7eca3200-68f4-11e9-9dc3-bf0256be8d1e.png)
    --- examples/prism-actionscript.html | 4 +- examples/prism-applescript.html | 15 -- examples/prism-arduino.html | 4 +- examples/prism-asciidoc.html | 4 +- examples/prism-aspnet.html | 38 +-- examples/prism-autohotkey.html | 6 +- examples/prism-autoit.html | 14 -- examples/prism-bash.html | 4 +- examples/prism-basic.html | 4 +- examples/prism-bison.html | 22 +- examples/prism-brainfuck.html | 12 +- examples/prism-bro.html | 16 +- examples/prism-c.html | 4 +- examples/prism-clojure.html | 10 +- examples/prism-cpp.html | 10 +- examples/prism-d.html | 13 -- examples/prism-elixir.html | 10 - examples/prism-gml.html | 2 +- examples/prism-go.html | 8 +- examples/prism-groovy.html | 10 - examples/prism-haml.html | 4 +- examples/prism-handlebars.html | 10 - examples/prism-haskell.html | 12 +- examples/prism-inform7.html | 10 - examples/prism-j.html | 4 +- examples/prism-java.html | 4 +- examples/prism-javascript.html | 14 -- examples/prism-jolie.html | 18 +- examples/prism-less.html | 20 -- examples/prism-lua.html | 10 - examples/prism-makefile.html | 4 +- examples/prism-markdown.html | 17 -- examples/prism-matlab.html | 4 +- examples/prism-mel.html | 22 +- examples/prism-mizar.html | 12 +- examples/prism-nasm.html | 15 -- examples/prism-nim.html | 4 +- examples/prism-ocaml.html | 6 +- examples/prism-opencl.html | 4 +- examples/prism-parser.html | 20 +- examples/prism-perl.html | 6 +- examples/prism-php.html | 4 +- examples/prism-powershell.html | 4 +- examples/prism-prolog.html | 21 -- examples/prism-pug.html | 2 +- examples/prism-puppet.html | 21 +- examples/prism-pure.html | 8 +- examples/prism-python.html | 10 - examples/prism-q.html | 10 - examples/prism-rest.html | 19 -- examples/prism-rust.html | 16 -- examples/prism-sas.html | 4 +- examples/prism-sass.html | 19 -- examples/prism-scala.html | 13 -- examples/prism-smarty.html | 10 - examples/prism-swift.html | 31 +-- examples/prism-textile.html | 20 -- examples/prism-twig.html | 10 - examples/prism-vbnet.html | 4 +- examples/prism-vhdl.html | 14 +- examples/prism-wiki.html | 20 -- examples/prism-xojo.html | 4 +- examples/prism-yaml.html | 2 +- index.html | 2 +- known-failures.html | 384 +++++++++++++++++++++++++++++++ 65 files changed, 539 insertions(+), 543 deletions(-) create mode 100644 known-failures.html diff --git a/examples/prism-actionscript.html b/examples/prism-actionscript.html index abb5804dbb..9ef3987ead 100644 --- a/examples/prism-actionscript.html +++ b/examples/prism-actionscript.html @@ -93,7 +93,7 @@

    Full example

    var gradientBmp:BitmapData = new BitmapData(256, 10, false, 0); gradientBmp.draw(gradient); RLUT = new Array(); GLUT = new Array(); BLUT = new Array(); - for (var i:int = 0; i < 256; i++) { + for (var i:int = 0; i < 256; i++) { var pixelColor:uint = gradientBmp.getPixel(i, 0); //I drew the gradient backwards, so sue me RLUT[256-i] = pixelColor & 0xff0000; @@ -130,4 +130,4 @@

    Full example

    colorBmp.paletteMap(sourceBmp, sourceBmp.rect, O, RLUT, GLUT, BLUT, null); } } -}
    \ No newline at end of file +}
    diff --git a/examples/prism-applescript.html b/examples/prism-applescript.html index c88390e819..9567b87148 100644 --- a/examples/prism-applescript.html +++ b/examples/prism-applescript.html @@ -24,18 +24,3 @@

    Classes and units

    set averageTemp to 63 as degrees Fahrenheit set circleArea to (pi * 7 * 7) as square yards
    - -

    Known failures

    -

    There are certain edge cases where Prism will fail. - There are always such cases in every regex-based syntax highlighter. - However, Prism dares to be open and honest about them. - If a failure is listed here, it doesn’t mean it will never be fixed. This is more of a “known bugs” list, just with a certain type of bug. -

    - -

    Comments only support one level of nesting

    -
    (* Nested block
    -	(* comments
    -		(* on more than
    -		2 levels *)
    -	are *)
    -not supported *)
    \ No newline at end of file diff --git a/examples/prism-arduino.html b/examples/prism-arduino.html index 915f700f48..cc96f2657e 100644 --- a/examples/prism-arduino.html +++ b/examples/prism-arduino.html @@ -14,7 +14,7 @@

    Booleans

    false;

    Operators

    -
    a < b;
    +
    a < b;
     c && d;

    Full example

    @@ -28,7 +28,7 @@

    Full example

    * runs once before everyhing else */ void setup() { - pinMode(piezo, OUTPUT); + pinMode(piezo, OUTPUT); } /** diff --git a/examples/prism-asciidoc.html b/examples/prism-asciidoc.html index d6df3021b5..bd2aedfc84 100644 --- a/examples/prism-asciidoc.html +++ b/examples/prism-asciidoc.html @@ -88,7 +88,7 @@

    Tables

    [cols="e,m,^,>s",width="25%"]
     |============================
     |1 >s|2 |3 |4
    -^|5 2.2+^.^|6 .3+<.>m|7
    +^|5 2.2+^.^|6 .3+<.>m|7
     ^|8
     |9 2+>|10
     |============================
    @@ -101,4 +101,4 @@

    Inline styles

    Attribute entries

    :Author Initials: JB
     {authorinitials}
    -:Author Initials!:
    \ No newline at end of file +:Author Initials!:
    diff --git a/examples/prism-aspnet.html b/examples/prism-aspnet.html index d9c30fcf96..d65a84d85e 100644 --- a/examples/prism-aspnet.html +++ b/examples/prism-aspnet.html @@ -1,17 +1,17 @@

    Comments

    -
    <%-- This is a comment --%>
    -<%-- This is a
    +
    <%-- This is a comment --%>
    +<%-- This is a
     multi-line comment --%>

    Page directives

    -
    <%@ Page Title="Products" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"  CodeBehind="ProductList.aspx.cs" Inherits="WingtipToys.ProductList" %>
    +
    <%@ Page Title="Products" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"  CodeBehind="ProductList.aspx.cs" Inherits="WingtipToys.ProductList" %>
     

    Directive tag

    -
    <%: Page.Title %>
    -<a href="ProductDetails.aspx?productID=<%#:Item.ProductID%>">
    +
    <%: Page.Title %>
    +<a href="ProductDetails.aspx?productID=<%#:Item.ProductID%>">
     <span>
    -    <%#:Item.ProductName%>
    +	<%#:Item.ProductName%>
     </span>

    Highlighted C# inside scripts

    @@ -19,18 +19,18 @@

    Highlighted C# inside scripts

    On this page, check C# before checking ASP.NET should make the example below work properly.

    <script runat="server">
    -    // The following variables are visible to all procedures
    -    // within the script block.
    -    String str;
    -    int i;
    -    int i2;
    +	// The following variables are visible to all procedures
    +	// within the script block.
    +	String str;
    +	int i;
    +	int i2;
     
    -    int DoubleIt(int inpt)
    -    {
    -        // The following variable is visible only within
    -        // the DoubleIt procedure.
    -        int factor = 2;
    +	int DoubleIt(int inpt)
    +	{
    +		// The following variable is visible only within
    +		// the DoubleIt procedure.
    +		int factor = 2;
     
    -        return inpt * factor;
    -    }
    -</script>
    \ No newline at end of file + return inpt * factor; + } +</script>
    diff --git a/examples/prism-autohotkey.html b/examples/prism-autohotkey.html index 620edb2eab..3e7ced7064 100644 --- a/examples/prism-autohotkey.html +++ b/examples/prism-autohotkey.html @@ -19,7 +19,7 @@

    Full example

    return if f_class = #32770 ; It's a dialog. { - if f_Edit1Pos <> ; And it has an Edit1 control. + if f_Edit1Pos <> ; And it has an Edit1 control. { ; Activate the window so that if the user is middle-clicking ; outside the dialog, subsequent clicks will also work: @@ -37,7 +37,7 @@

    Full example

    } else if f_class in ExploreWClass,CabinetWClass ; In Explorer, switch folders. { - if f_Edit1Pos <> ; And it has an Edit1 control. + if f_Edit1Pos <> ; And it has an Edit1 control. { ControlSetText, Edit1, %f_path%, ahk_id %f_window_id% ; Tekl reported the following: "If I want to change to Folder L:\folder @@ -65,4 +65,4 @@

    Full example

    ; 2) It's a supported type but it lacks an Edit1 control to facilitate the custom ; action, so instead do the default action below. Run, Explorer %f_path% ; Might work on more systems without double quotes. -return
    \ No newline at end of file +return
    diff --git a/examples/prism-autoit.html b/examples/prism-autoit.html index 51220b421c..be283a4473 100644 --- a/examples/prism-autoit.html +++ b/examples/prism-autoit.html @@ -36,17 +36,3 @@

    Keywords and variables

    EndIf MsgBox($MB_SYSTEMMODAL, "", "The value of $i is: " & $i) Next
    - -

    Known failures

    -

    There are certain edge cases where Prism will fail. - There are always such cases in every regex-based syntax highlighter. - However, Prism dares to be open and honest about them. - If a failure is listed here, it doesn’t mean it will never be fixed. This is more of a “known bugs” list, just with a certain type of bug. -

    - -

    Nested block comments

    -
    #cs
    -	#cs
    -		foo()
    -	#ce
    -#ce
    \ No newline at end of file diff --git a/examples/prism-bash.html b/examples/prism-bash.html index 3e0febfaba..5cf56d1b59 100644 --- a/examples/prism-bash.html +++ b/examples/prism-bash.html @@ -21,7 +21,7 @@

    Variables

    echo ${args[0]} ${args[1]} ${args[2]}

    Keywords

    -
    for (( i=0;i<$ELEMENTS;i++)); do
    +
    for (( i=0;i<$ELEMENTS;i++)); do
     	echo ${ARRAY[${i}]}
     done
     while read LINE; do
    @@ -46,4 +46,4 @@ 

    Some well-known commands

    git pull origin master -sudo gpg --refresh-keys; sudo apt-key update; sudo rm -rf /var/lib/apt/{lists,lists.old}; sudo mkdir -p /var/lib/apt/lists/partial; sudo apt-get clean all; sudo apt-get update
    \ No newline at end of file +sudo gpg --refresh-keys; sudo apt-key update; sudo rm -rf /var/lib/apt/{lists,lists.old}; sudo mkdir -p /var/lib/apt/lists/partial; sudo apt-get clean all; sudo apt-get update
    diff --git a/examples/prism-basic.html b/examples/prism-basic.html index 3630a8a2c0..241a0571aa 100644 --- a/examples/prism-basic.html +++ b/examples/prism-basic.html @@ -57,7 +57,7 @@

    QuickBASIC example

    CALL PrintSomeStars(NumStars) DO INPUT "Do you want more stars? ", Answer$ - LOOP UNTIL Answer$ <> "" + LOOP UNTIL Answer$ <> "" Answer$ = LEFT$(Answer$, 1) LOOP WHILE UCASE$(Answer$) = "Y" PRINT "Goodbye "; UserName$ @@ -66,4 +66,4 @@

    QuickBASIC example

    REM This procedure uses a local variable called Stars$ Stars$ = STRING$(StarCount, "*") PRINT Stars$ -END SUB \ No newline at end of file +END SUB diff --git a/examples/prism-bison.html b/examples/prism-bison.html index 9c7edeb8da..a4ccf8dd64 100644 --- a/examples/prism-bison.html +++ b/examples/prism-bison.html @@ -50,7 +50,7 @@

    Full example

    string* op_val; } -%start input +%start input %token <int_val> INTEGER_LITERAL %type <int_val> exp @@ -74,7 +74,7 @@

    Full example

    { extern int yylineno; // defined and maintained in lex.c extern char *yytext; // defined and maintained in lex.c - + cerr << "ERROR: " << s << " at symbol \"" << yytext; cerr << "\" on line " << yylineno << endl; exit(1); @@ -84,21 +84,3 @@

    Full example

    { return yyerror(string(s)); } - -

    Known failures

    -

    There are certain edge cases where Prism will fail. - There are always such cases in every regex-based syntax highlighter. - However, Prism dares to be open and honest about them. - If a failure is listed here, it doesn’t mean it will never be fixed. This is more of a “known bugs” list, just with a certain type of bug. -

    - -

    Two levels of nesting inside C section

    -
    {
    -	if($1) {
    -		if($2) {
    -
    -		}
    -	}
    -} // <- Broken
    -%%
    -%%
    \ No newline at end of file diff --git a/examples/prism-brainfuck.html b/examples/prism-brainfuck.html index 89a435c92f..d47a974406 100644 --- a/examples/prism-brainfuck.html +++ b/examples/prism-brainfuck.html @@ -7,15 +7,15 @@

    Full example

    >+++ Add 3 to Cell #3 >+++ Add 3 to Cell #4 >+ Add 1 to Cell #5 - <<<<- Decrement the loop counter in Cell #1 + <<<<- Decrement the loop counter in Cell #1 ] Loop till Cell #1 is zero; number of iterations is 4 >+ Add 1 to Cell #2 >+ Add 1 to Cell #3 >- Subtract 1 from Cell #4 >>+ Add 1 to Cell #6 - [<] Move back to the first zero cell you find; this will + [<] Move back to the first zero cell you find; this will be Cell #1 which was cleared by the previous loop - <- Decrement the loop Counter in Cell #0 + <- Decrement the loop Counter in Cell #0 ] Loop till Cell #0 is zero; number of iterations is 8 The result of this is: @@ -27,11 +27,11 @@

    Full example

    >---. Subtract 3 from Cell #3 to get 101 which is 'e' +++++++..+++. Likewise for 'llo' from Cell #3 >>. Cell #5 is 32 for the space -<-. Subtract 1 from Cell #4 for 87 to give a 'W' -<. Cell #3 was set to 'o' from the end of 'Hello' +<-. Subtract 1 from Cell #4 for 87 to give a 'W' +<. Cell #3 was set to 'o' from the end of 'Hello' +++.------.--------. Cell #3 for 'rl' and 'd' >>+. Add 1 to Cell #5 gives us an exclamation point >++. And finally a newline from Cell #6

    One-line example

    -
    ++++++++[>++++[>++>+++>+++>+<<<<-]>+>+>->>+[<]<-]>>.>---.+++++++..+++.>>.<-.<.+++.------.--------.>>+.>++.
    +
    ++++++++[>++++[>++>+++>+++>+<<<<-]>+>+>->>+[<]<-]>>.>---.+++++++..+++.>>.<-.<.+++.------.--------.>>+.>++.
    diff --git a/examples/prism-bro.html b/examples/prism-bro.html index 83d6374e67..d7645c6db5 100644 --- a/examples/prism-bro.html +++ b/examples/prism-bro.html @@ -300,7 +300,7 @@

    Full example

    # because c might not correspond to an active connection (which # causes the function to fail). if ( suppress_UDP_scan_checks && - service >= 0/udp && service <= 65535/udp ) + service >= 0/udp && service <= 65535/udp ) return F; if ( service in skip_services && ! outbound ) @@ -343,8 +343,8 @@

    Full example

    empty_bs_table; } - if ( ++distinct_backscatter_peers[orig][resp] <= 2 && - # The test is <= 2 because we get two check_scan() + if ( ++distinct_backscatter_peers[orig][resp] <= 2 && + # The test is <= 2 because we get two check_scan() # calls, once on connection attempt and once on # tear-down. @@ -380,7 +380,7 @@

    Full example

    pre_distinct_peers[orig] = set(); add pre_distinct_peers[orig][resp]; - if ( |pre_distinct_peers[orig]| < addr_scan_trigger ) + if ( |pre_distinct_peers[orig]| < addr_scan_trigger ) ignore = T; } @@ -462,7 +462,7 @@

    Full example

    } # Check for low ports. - if ( activate_priv_port_check && ! outbound && service < 1024/tcp && + if ( activate_priv_port_check && ! outbound && service < 1024/tcp && service !in troll_skip_service ) { if ( orig !in distinct_low_ports || @@ -559,7 +559,7 @@

    Full example

    return F; } - if ( idx[orig] <= |v| && n >= v[idx[orig]] ) + if ( idx[orig] <= |v| && n >= v[idx[orig]] ) { ++idx[orig]; return T; @@ -578,7 +578,7 @@

    Full example

    return F; } - if ( idx[orig,resp] <= |v| && n >= v[idx[orig, resp]] ) + if ( idx[orig,resp] <= |v| && n >= v[idx[orig, resp]] ) { ++idx[orig,resp]; return T; @@ -642,4 +642,4 @@

    Full example

    for ( orig in distinct_low_ports ) lowport_summary(distinct_low_ports, orig); } - \ No newline at end of file + diff --git a/examples/prism-c.html b/examples/prism-c.html index aee1c06a87..635b01fd5d 100644 --- a/examples/prism-c.html +++ b/examples/prism-c.html @@ -16,7 +16,7 @@

    Full example

    { int c; printf("Number of command line arguments passed: %d\n", argc); - for ( c = 0 ; c < argc ; c++) + for ( c = 0 ; c < argc ; c++) printf("%d. Command line argument passed is %s\n", c+1, argv[c]); return 0; -} \ No newline at end of file +} diff --git a/examples/prism-clojure.html b/examples/prism-clojure.html index abc50194b3..4dd511816f 100644 --- a/examples/prism-clojure.html +++ b/examples/prism-clojure.html @@ -255,8 +255,8 @@

    Full example

    ; The "Thread-first" macro (->) inserts into each form the result of ; the previous, as the first argument (second item) -(-> - {:a 1 :b 2} +(-> + {:a 1 :b 2} (assoc :c 3) ;=> (assoc {:a 1 :b 2} :c 3) (dissoc :b)) ;=> (dissoc (assoc {:a 1 :b 2} :c 3) :b) @@ -275,7 +275,7 @@

    Full example

    ; Result: [1 3 5 7 9] ; When you are in a situation where you want more freedom as where to -; put the result of previous data transformations in an +; put the result of previous data transformations in an ; expression, you can use the as-> macro. With it, you can assign a ; specific name to transformations' output and use it as a ; placeholder in your chained expressions: @@ -365,7 +365,7 @@

    Full example

    (swap! my-atom assoc :b 2) ; Sets my-atom to the result of (assoc {:a 1} :b 2) ; Use '@' to dereference the atom and get the value -my-atom ;=> Atom<#...> (Returns the Atom object) +my-atom ;=> Atom<#...> (Returns the Atom object) @my-atom ; => {:a 1 :b 2} ; Here's a simple counter using an atom @@ -383,4 +383,4 @@

    Full example

    ; Other STM constructs are refs and agents. ; Refs: http://clojure.org/refs -; Agents: http://clojure.org/agents \ No newline at end of file +; Agents: http://clojure.org/agents diff --git a/examples/prism-cpp.html b/examples/prism-cpp.html index 32bdcbda56..f0fa1d3d20 100644 --- a/examples/prism-cpp.html +++ b/examples/prism-cpp.html @@ -32,7 +32,7 @@

    Full example

    vector<int> left, vector<int> right ){ - if( (left[5]) < (right[5]) ){ + if( (left[5]) < (right[5]) ){ return( right ); }; // else @@ -40,18 +40,18 @@

    Full example

    } int vector_demo(void){ - cout << "vector demo" << endl; + cout << "vector demo" << endl; vector<int> left(7); vector<int> right(7); left[5] = 7; right[5] = 8; - cout << left[5] << endl; - cout << right[5] << endl; + cout << left[5] << endl; + cout << right[5] << endl; vector<int> biggest( pick_vector_with_biggest_fifth_element( left, right ) ); - cout << biggest[5] << endl; + cout << biggest[5] << endl; return 0; } diff --git a/examples/prism-d.html b/examples/prism-d.html index d4bf34cc8c..9ef1d6c78a 100644 --- a/examples/prism-d.html +++ b/examples/prism-d.html @@ -252,16 +252,3 @@

    Full example

    assert(_totalc >= _argc); } } - -

    Known failures

    -

    There are certain edge cases where Prism will fail. - There are always such cases in every regex-based syntax highlighter. - However, Prism dares to be open and honest about them. - If a failure is listed here, it doesn’t mean it will never be fixed. This is more of a “known bugs” list, just with a certain type of bug. -

    - -

    Comments only support one level of nesting

    -
    /+ /+ /+ this does not work +/ +/ +/
    - -

    Token strings only support one level of nesting

    -
    q{ q{ q{ this does not work } } }
    \ No newline at end of file diff --git a/examples/prism-elixir.html b/examples/prism-elixir.html index 7112fbca5b..df4426be74 100644 --- a/examples/prism-elixir.html +++ b/examples/prism-elixir.html @@ -450,13 +450,3 @@

    Full example

    # The shell is also a process, you can use `self` to get the current pid self() #=> #PID<0.27.0> - -

    Known failures

    -

    There are certain edge cases where Prism will fail. - There are always such cases in every regex-based syntax highlighter. - However, Prism dares to be open and honest about them. - If a failure is listed here, it doesn’t mean it will never be fixed. This is more of a “known bugs” list, just with a certain type of bug. -

    - -

    String interpolation in single-quoted strings

    -
    '#{:atom} <- this should not be highligted'
    \ No newline at end of file diff --git a/examples/prism-gml.html b/examples/prism-gml.html index a1649f6b68..5526c5cd3a 100644 --- a/examples/prism-gml.html +++ b/examples/prism-gml.html @@ -8,7 +8,7 @@

    Functions

    Full example

    if(instance_exists(_inst) || _inst==global){
    -	if(_delay<=0){
    +	if(_delay<=0){
     		_time+=1;
     		if(_time<_duration){
     			event_user(0);
    diff --git a/examples/prism-go.html b/examples/prism-go.html
    index 205a1a7e29..da2bc7f931 100644
    --- a/examples/prism-go.html
    +++ b/examples/prism-go.html
    @@ -41,7 +41,7 @@ 

    Runes and strings

    string"

    Functions

    -
    func(a, b int, z float64) bool { return a*b < int(z) }
    +
    func(a, b int, z float64) bool { return a*b < int(z) }

    Full example

    package main
    @@ -52,7 +52,7 @@ 

    Full example

    for _, v := range a { sum += v } - c <- sum // send sum to c + c <- sum // send sum to c } func main() { @@ -61,8 +61,8 @@

    Full example

    c := make(chan int) go sum(a[:len(a)/2], c) go sum(a[len(a)/2:], c) - x, y := <-c, <-c // receive from c + x, y := <-c, <-c // receive from c fmt.Println(x, y, x+y) } -
    \ No newline at end of file + diff --git a/examples/prism-groovy.html b/examples/prism-groovy.html index 3ec1d6d39b..ac36cf7e53 100644 --- a/examples/prism-groovy.html +++ b/examples/prism-groovy.html @@ -81,13 +81,3 @@

    Full example

    assert 4 / 2 == 2 } } - -

    Known failures

    -

    There are certain edge cases where Prism will fail. - There are always such cases in every regex-based syntax highlighter. - However, Prism dares to be open and honest about them. - If a failure is listed here, it doesn’t mean it will never be fixed. This is more of a “known bugs” list, just with a certain type of bug. -

    - -

    Two divisions on the same line

    -
    2 / 3 / 4
    \ No newline at end of file diff --git a/examples/prism-haml.html b/examples/prism-haml.html index c2cc670c32..364595ad01 100644 --- a/examples/prism-haml.html +++ b/examples/prism-haml.html @@ -21,7 +21,7 @@

    Tags

    %html{html_attrs('fr-fr')} %div[@user, :greeting] %img -%pre>< +%pre>< foo bar %img @@ -76,4 +76,4 @@

    Filters

    the example below work properly.

    %script
       :coffee
    -    console.log 'This is coffee script'
    \ No newline at end of file + console.log 'This is coffee script' diff --git a/examples/prism-handlebars.html b/examples/prism-handlebars.html index c39c8b742d..8e07329166 100644 --- a/examples/prism-handlebars.html +++ b/examples/prism-handlebars.html @@ -29,13 +29,3 @@

    Block helpers

    This should probably work... {{/block-with-hyphens}} - -

    Known failures

    -

    There are certain edge cases where Prism will fail. - There are always such cases in every regex-based syntax highlighter. - However, Prism dares to be open and honest about them. - If a failure is listed here, it doesn’t mean it will never be fixed. This is more of a “known bugs” list, just with a certain type of bug. -

    - -

    Handlebars tag in the middle of an HTML tag

    -
    <div{{#if test}} class="test"{{/if}}></div>
    diff --git a/examples/prism-haskell.html b/examples/prism-haskell.html index de58eb79bf..799bbdfa79 100644 --- a/examples/prism-haskell.html +++ b/examples/prism-haskell.html @@ -28,7 +28,7 @@

    Full example

    wantReadableHandle_ "Data.ByteString.hGetLine" h $ \ h_@Handle__{haByteBuffer} -> do flushCharReadBuffer h_ - buf <- readIORef haByteBuffer + buf <- readIORef haByteBuffer if isEmptyBuffer buf then fill h_ buf 0 [] else haveBuf h_ buf 0 [] @@ -36,7 +36,7 @@

    Full example

    fill h_@Handle__{haByteBuffer,haDevice} buf len xss = len `seq` do - (r,buf') <- Buffered.fillReadBuffer haDevice buf + (r,buf') <- Buffered.fillReadBuffer haDevice buf if r == 0 then do writeIORef haByteBuffer buf{ bufR=0, bufL=0 } if len > 0 @@ -48,9 +48,9 @@

    Full example

    buf@Buffer{ bufRaw=raw, bufR=w, bufL=r } len xss = do - off <- findEOL r w raw + off <- findEOL r w raw let new_len = len + off - r - xs <- mkPS raw r off + xs <- mkPS raw r off -- if eol == True, then off is the offset of the '\n' -- otherwise off == w and the buffer is now empty. @@ -66,7 +66,7 @@

    Full example

    findEOL r w raw | r == w = return w | otherwise = do - c <- readWord8Buf raw r + c <- readWord8Buf raw r if c == fromIntegral (ord '\n') then return r -- NB. not r+1: don't include the '\n' else findEOL (r+1) w raw @@ -77,4 +77,4 @@

    Full example

    withRawBuffer buf $ \pbuf -> do copyBytes p (pbuf `plusPtr` start) len where - len = end - start \ No newline at end of file + len = end - start diff --git a/examples/prism-inform7.html b/examples/prism-inform7.html index 9e2214f01d..d4c3b746e1 100644 --- a/examples/prism-inform7.html +++ b/examples/prism-inform7.html @@ -159,13 +159,3 @@

    Full example

    Instead of taking off the outfit: say "What odd ideas come into your head sometimes!" Test me with "fill glass / empty absinthe into lake / fill glass / swim / drink lake / drink / x water / x lake". - -

    Known failures

    -

    There are certain edge cases where Prism will fail. - There are always such cases in every regex-based syntax highlighter. - However, Prism dares to be open and honest about them. - If a failure is listed here, it doesn’t mean it will never be fixed. This is more of a “known bugs” list, just with a certain type of bug. -

    - -

    Names starting with a number

    -
    The box 1A is a container
    \ No newline at end of file diff --git a/examples/prism-j.html b/examples/prism-j.html index cf4c109afa..0227e31fd0 100644 --- a/examples/prism-j.html +++ b/examples/prism-j.html @@ -34,7 +34,7 @@

    Examples

    NB. multiply a row by a constant, NB. and add a multiple of one row to another: -E1=: <@] C. [ +E1=: <@] C. [ E2=: f`g`[} E3=: F`g`[} f=: {:@] * {.@] { [ @@ -56,4 +56,4 @@

    Examples

    NB. Implementation of quicksort (tacit programming)
     
    -quicksort=: (($:@(<#[), (=#[), $:@(>#[)) ({~ ?@#)) ^: (1<#)
    \ No newline at end of file +quicksort=: (($:@(<#[), (=#[), $:@(>#[)) ({~ ?@#)) ^: (1<#) diff --git a/examples/prism-java.html b/examples/prism-java.html index 691a6b10ec..277a1ab12b 100644 --- a/examples/prism-java.html +++ b/examples/prism-java.html @@ -39,8 +39,8 @@

    Full example

    public static boolean[][] gen(){ boolean[][] grid = new boolean[10][10]; - for(int r = 0; r < 10; r++) - for(int c = 0; c < 10; c++) + for(int r = 0; r < 10; r++) + for(int c = 0; c < 10; c++) if( Math.random() > 0.7 ) grid[r][c] = true; return grid; diff --git a/examples/prism-javascript.html b/examples/prism-javascript.html index 35ccf7d0bb..f073b65de0 100644 --- a/examples/prism-javascript.html +++ b/examples/prism-javascript.html @@ -64,17 +64,3 @@

    ES6 features

    multiple lines.` `40 + 2 = ${ 40 + 2 }` `The squares of the first 3 natural integers are ${[for (x of [1,2,3]) x*x].join(', ')}` - -

    Known failures

    -

    There are certain edge cases where Prism will fail. - There are always such cases in every regex-based syntax highlighter. - However, Prism dares to be open and honest about them. - If a failure is listed here, it doesn’t mean it will never be fixed. This is more of a “known bugs” list, just with a certain type of bug. -

    - -

    String interpolation containing a closing brace

    -
    `${ /* } */ a + b }`
    -`${ '}' }`
    - -

    String interpolation with deeply nested braces

    -
    `${foo({ a: { b: { c: true } } })}`
    diff --git a/examples/prism-jolie.html b/examples/prism-jolie.html index 8d23d995ab..9a35b009e1 100644 --- a/examples/prism-jolie.html +++ b/examples/prism-jolie.html @@ -60,7 +60,7 @@

    Full example

    OneWay: *(AuthenticationData) } -service SubService +service SubService { Interfaces: NetInterface @@ -92,9 +92,9 @@

    Full example

    .debug.showContent = true } Interfaces: NetInterface - Aggregates: SubService, + Aggregates: SubService, LoggerService - Redirects: A => SubService, + Redirects: A => SubService, B => SubService } @@ -105,11 +105,11 @@

    Full example

    execution{ concurrent } define netmodule { - if( request.load == 0 || request.load < 1 && - request.load <= 2 || request.load >= 3 && + if( request.load == 0 || request.load < 1 && + request.load <= 2 || request.load >= 3 && request.load > 4 || request.load%4 == 2 ) { - scope( scopeName ) { + scope( scopeName ) { // inline comment install( MyFault => println@Console( "Something \"Went\" Wrong" + ' but it\'s ok' )() ); /* @@ -127,9 +127,9 @@

    Full example

    with( node ){ while( .load != 100 ) { .load++ - } + } } - } + } } } @@ -159,4 +159,4 @@

    Full example

    } until [ quit() ]{ exit } -} \ No newline at end of file +} diff --git a/examples/prism-less.html b/examples/prism-less.html index db8a5e6411..56f0562177 100644 --- a/examples/prism-less.html +++ b/examples/prism-less.html @@ -48,23 +48,3 @@

    Interpolation

    @{property}: #0ee; background-@{property}: #999; } - -

    Known failures

    -

    There are certain edge cases where Prism will fail. - There are always such cases in every regex-based syntax highlighter. - However, Prism dares to be open and honest about them. - If a failure is listed here, it doesn’t mean it will never be fixed. This is more of a “known bugs” list, just with a certain type of bug. -

    - -

    At-rules looking like variables

    -
    @import "some file.less";
    - -

    At-rules containing interpolation

    -
    @import "@{themes}/tidal-wave.less";
    - -

    extend is not highlighted consistently

    -
    nav ul {
    -  &:extend(.inline);
    -  background: blue;
    -}
    -.a:extend(.b) {}
    \ No newline at end of file diff --git a/examples/prism-lua.html b/examples/prism-lua.html index 288b7675a4..9c18b9d068 100644 --- a/examples/prism-lua.html +++ b/examples/prism-lua.html @@ -77,13 +77,3 @@

    Full example

    io.write(line1(i), line2(i), line3(i - 1), "\n") end end - -

    Known failures

    -

    There are certain edge cases where Prism will fail. - There are always such cases in every regex-based syntax highlighter. - However, Prism dares to be open and honest about them. - If a failure is listed here, it doesn’t mean it will never be fixed. This is more of a “known bugs” list, just with a certain type of bug. -

    - -

    Functions with a single string parameter not using parentheses are not highlighted

    -
    foobar"param";
    diff --git a/examples/prism-makefile.html b/examples/prism-makefile.html index 45f6f420ff..fd74713a89 100644 --- a/examples/prism-makefile.html +++ b/examples/prism-makefile.html @@ -19,7 +19,7 @@

    Variables

    $(objects) : defs.h -%oo: $$< $$^ $$+ $$* +%oo: $$< $$^ $$+ $$* foo : bar/lose cd $(@D) && gobble $(@F) > ../$@ @@ -260,4 +260,4 @@

    Complete example

    > tmp.dir/$$X ; done cd tmp.dir ; zoo aM ../tar.zoo * -rm -rf tmp.dir - \ No newline at end of file + diff --git a/examples/prism-markdown.html b/examples/prism-markdown.html index a57eaeafc3..ea44fea4a6 100644 --- a/examples/prism-markdown.html +++ b/examples/prism-markdown.html @@ -67,20 +67,3 @@

    Raw HTML

    > Containing <strong>raw HTML</strong> <p>*Italic text inside HTML tag*</p> - -

    Known failures

    -

    There are certain edge cases where Prism will fail. - There are always such cases in every regex-based syntax highlighter. - However, Prism dares to be open and honest about them. - If a failure is listed here, it doesn’t mean it will never be fixed. This is more of a “known bugs” list, just with a certain type of bug. -

    - -

    Nesting of elements is not fully supported

    -
    _ **bold** inside italic DOESN'T work _
    -__ but *italic* inside bold DOES work __
    -
    -[Link partially *italic* DOESN'T work](http://example.com)
    -_ [But link inside italic DOES work](http://example.com) _
    -
    -[Link partially **bold** DOESN'T work](http://example.com)
    -__ [But link inside bold DOES work](http://example.com) __
    \ No newline at end of file diff --git a/examples/prism-matlab.html b/examples/prism-matlab.html index e78abe3612..790d71c125 100644 --- a/examples/prism-matlab.html +++ b/examples/prism-matlab.html @@ -40,7 +40,7 @@

    Control flow

    end n = 1; nFactorial = 1; -while nFactorial < 1e100 +while nFactorial < 1e100 n = n + 1; nFactorial = nFactorial * n; end @@ -49,4 +49,4 @@

    Functions

    q = integral(sqr,0,1);
     y = parabola(x)
     mygrid = @(x,y) ndgrid((-x:x/c:x),(-y:y/c:y));
    -[x,y] = mygrid(pi,2*pi);
    \ No newline at end of file +[x,y] = mygrid(pi,2*pi); diff --git a/examples/prism-mel.html b/examples/prism-mel.html index e887975657..eaf3ba517f 100644 --- a/examples/prism-mel.html +++ b/examples/prism-mel.html @@ -28,14 +28,14 @@

    Arrays, vectors and matrices

    print($array[1]); // Prints "second\n" print($array[2]); // Prints "third\n" -vector $roger = <<3.0, 7.7, 9.1>>; -vector $more = <<4.5, 6.789, 9.12356>>; +vector $roger = <<3.0, 7.7, 9.1>>; +vector $more = <<4.5, 6.789, 9.12356>>; // Assign a vector to variable $test: -vector $test = <<3.0, 7.7, 9.1>>; -$test = <<$test.x, 5.5, $test.z>> -// $test is now <<3.0, 5.5, 9.1>> +vector $test = <<3.0, 7.7, 9.1>>; +$test = <<$test.x, 5.5, $test.z>> +// $test is now <<3.0, 5.5, 9.1>> -matrix $a3[3][4] = <<2.5, 4.5, 3.25, 8.05; +matrix $a3[3][4] = <<2.5, 4.5, 3.25, 8.05; 1.12, 1.3, 9.5, 5.2; 7.23, 6.006, 2.34, 4.67>> @@ -82,7 +82,7 @@

    Full example

    // Check for negative $frames. This indicates // $silent mode. // - if ($frames < 0) + if ($frames < 0) { $silent = 1; $frames = -$frames; @@ -102,7 +102,7 @@

    Full example

    $startTime = `timerX`; // play -wait; int $i; - for ($i = 1; $i < $frames; $i++ ) + for ($i = 1; $i < $frames; $i++ ) { // Set time // @@ -110,7 +110,7 @@

    Full example

    int $obj; // Request count for every particle object. // - for ($obj = 0; $obj < $particleCount; $obj++) + for ($obj = 0; $obj < $particleCount; $obj++) { string $cmd = "getAttr " + $particleObjects[$obj]+".count"; eval( $cmd ); @@ -118,7 +118,7 @@

    Full example

    // Request position for every transform // (includes every rigid body). // - for ($obj = 0; $obj < $trCount; $obj++) + for ($obj = 0; $obj < $trCount; $obj++) { string $cmd = "getAttr " + $transforms[$obj]+".translate"; eval ($cmd); @@ -134,4 +134,4 @@

    Full example

    print( "Playback $rate: " + $rate + " $frames/sec\n" ); } return ( $rate ); -} // timePlayback // \ No newline at end of file +} // timePlayback // diff --git a/examples/prism-mizar.html b/examples/prism-mizar.html index 98d626c02f..044c5c3fe9 100644 --- a/examples/prism-mizar.html +++ b/examples/prism-mizar.html @@ -11,14 +11,14 @@

    Full example

    begin P: for k being Nat - st for n being Nat st n < k holds Fib (n+1) ≥ n + st for n being Nat st n < k holds Fib (n+1) ≥ n holds Fib (k+1) ≥ k proof let k be Nat; assume -IH: for n being Nat st n < k holds Fib (n+1) ≥ n; +IH: for n being Nat st n < k holds Fib (n+1) ≥ n; per cases; suppose k ≤ 1; then k = 0 or k = 0+1 by CQC_THE1:2; hence Fib (k+1) ≥ k by PRE_FF:1; - suppose 1 < k; then + suppose 1 < k; then 1+1 ≤ k by NAT_1:38; then consider m being Nat such that A: k = 1+1+m by NAT_1:28; @@ -33,8 +33,8 @@

    Full example

    m ≥ 1 by NAT_1:38; then B: m+(m+1) ≥ m+1+1 by REAL_1:49; C: k = m+1+1 by A, AXIOMS:13; - m < m+1 & m+1 < m+1+1 by REAL_1:69; then - m < k & m+1 < k by C, AXIOMS:22; then + m < m+1 & m+1 < m+1+1 by REAL_1:69; then + m < k & m+1 < k by C, AXIOMS:22; then D: Fib (m+1) ≥ m & Fib (m+1+1) ≥ m+1 by IH; Fib (m+1+1+1) = Fib (m+1) + Fib (m+1+1) by PRE_FF:1; then Fib (m+1+1+1) ≥ m+(m+1) by D, REAL_1:55; @@ -42,4 +42,4 @@

    Full example

    end; end; -for n being Nat holds Fib(n+1) ≥ n from Comp_Ind(P); \ No newline at end of file +for n being Nat holds Fib(n+1) ≥ n from Comp_Ind(P); diff --git a/examples/prism-nasm.html b/examples/prism-nasm.html index c1b7c926e3..e76146dfb7 100644 --- a/examples/prism-nasm.html +++ b/examples/prism-nasm.html @@ -57,18 +57,3 @@

    Numbers

    dt 3.141592653589793238462 ; pi do 1.e+4000 ; IEEE 754r quad precision - -

    Known failures

    -

    There are certain edge cases where Prism will fail. - There are always such cases in every regex-based syntax highlighter. - However, Prism dares to be open and honest about them. - If a failure is listed here, it doesn’t mean it will never be fixed. This is more of a “known bugs” list, just with a certain type of bug. -

    - -

    Numbers with underscores

    -
    mov     ax,1100_1000b
    -mov     ax,1100_1000y
    -mov     ax,0b1100_1000
    -mov     ax,0y1100_1000
    -
    -dd    1.222_222_222
    \ No newline at end of file diff --git a/examples/prism-nim.html b/examples/prism-nim.html index c661125918..80296fb6ad 100644 --- a/examples/prism-nim.html +++ b/examples/prism-nim.html @@ -176,7 +176,7 @@

    Full example

    # Empty # OfInherit # Ident !"RootObj" - # Empty <= We want to replace this + # Empty <= We want to replace this # MethodDef # ... @@ -219,4 +219,4 @@

    Full example

    for a in animals: echo a.vocalize() - echo a.age_human_yrs() \ No newline at end of file + echo a.age_human_yrs() diff --git a/examples/prism-ocaml.html b/examples/prism-ocaml.html index 0534b1d165..46ee6dc831 100644 --- a/examples/prism-ocaml.html +++ b/examples/prism-ocaml.html @@ -44,16 +44,16 @@

    Full example

    match t with | Empty -> false | Interval (l,h) -> - Endpoint.compare x l >= 0 && Endpoint.compare x h <= 0 + Endpoint.compare x l >= 0 && Endpoint.compare x h <= 0 (** [intersect t1 t2] returns the intersection of the two input intervals *) let intersect t1 t2 = - let min x y = if Endpoint.compare x y <= 0 then x else y in + let min x y = if Endpoint.compare x y <= 0 then x else y in let max x y = if Endpoint.compare x y >= 0 then x else y in match t1,t2 with | Empty, _ | _, Empty -> Empty | Interval (l1,h1), Interval (l2,h2) -> create (max l1 l2) (min h1 h2) - end ;; \ No newline at end of file + end ;; diff --git a/examples/prism-opencl.html b/examples/prism-opencl.html index f901230bba..8431fb9d8d 100644 --- a/examples/prism-opencl.html +++ b/examples/prism-opencl.html @@ -52,11 +52,11 @@

    OpenCL kernel code

    // Image patch is row-wise accessed // Filter kernel is centred in the middle #pragma unroll - for (int y = -ROWS_HALF_3x3; y <= ROWS_HALF_3x3; ++y) // Start at the top left corner of the filter + for (int y = -ROWS_HALF_3x3; y <= ROWS_HALF_3x3; ++y) // Start at the top left corner of the filter { coordCurrent.y = coordBase.y + y; #pragma unroll - for (int x = -COLS_HALF_3x3; x <= COLS_HALF_3x3; ++x) // And end at the bottom right corner + for (int x = -COLS_HALF_3x3; x <= COLS_HALF_3x3; ++x) // And end at the bottom right corner { coordCurrent.x = coordBase.x + x; coordBorder = borderCoordinate(coordCurrent, rows, cols, border); diff --git a/examples/prism-parser.html b/examples/prism-parser.html index 4b4e9c0d81..c2fc79e570 100644 --- a/examples/prism-parser.html +++ b/examples/prism-parser.html @@ -67,22 +67,4 @@

    Full example

    # new functionality @remove[iOffset;iLimit] $iLimit(^iLimit.int(0)) -$t[^t.select(^t.offset[]<$iOffset || ^t.offset[]>=$iOffset+$iLimit)] - -

    Known failures

    -

    There are certain edge cases where Prism will fail. - There are always such cases in every regex-based syntax highlighter. - However, Prism dares to be open and honest about them. - If a failure is listed here, it doesn’t mean it will never be fixed. This is more of a “known bugs” list, just with a certain type of bug. -

    - -

    Code block starting with a comment

    -
    # Doesn't work
    -# Does work
    -
     # Does work when prefixed with a space
    - -

    Comments inside expressions break literals and operators

    -
    ^if(
    -    $age>=4  # not too young
    -    && $age<=80  # and not too old
    -)
    \ No newline at end of file +$t[^t.select(^t.offset[]<$iOffset || ^t.offset[]>=$iOffset+$iLimit)] diff --git a/examples/prism-perl.html b/examples/prism-perl.html index 85c3681521..80a0874818 100644 --- a/examples/prism-perl.html +++ b/examples/prism-perl.html @@ -54,10 +54,10 @@

    Full example

    $conf{user} = delete $conf{username} unless $conf{user}; } else { # Process .pause manually - open my $pauserc, '<', $filename + open my $pauserc, '<', $filename or die "can't open $filename for reading: $!"; - while (<$pauserc>) { + while (<$pauserc>) { chomp; next unless $_ and $_ !~ /^\s*#/; @@ -68,4 +68,4 @@

    Full example

    } return \%conf; -} \ No newline at end of file +} diff --git a/examples/prism-php.html b/examples/prism-php.html index 1a25589c7c..23d4bae604 100644 --- a/examples/prism-php.html +++ b/examples/prism-php.html @@ -41,7 +41,7 @@

    PHP 5.3+ support

    function getReturnDescription() { /*2*/ } } function gen_one_to_three() { - for ($i = 1; $i <= 3; $i++) { + for ($i = 1; $i <= 3; $i++) { // Note that $i is preserved between yields. yield $i; } @@ -64,4 +64,4 @@

    String interpolation

    FOO; $b = <<<"FOOBAR" Interpolation inside Heredoc strings {$obj->values[3]->name} -FOOBAR; \ No newline at end of file +FOOBAR; diff --git a/examples/prism-powershell.html b/examples/prism-powershell.html index e5dba2e025..7028084a78 100644 --- a/examples/prism-powershell.html +++ b/examples/prism-powershell.html @@ -1,6 +1,6 @@

    Comments

    # This is a comment
    -<# This is a
    +<# This is a
     multi-line comment #>

    Variable Interpolation

    @@ -16,4 +16,4 @@

    Full Example

    $Names | ForEach { SayHello $_ } - \ No newline at end of file + diff --git a/examples/prism-prolog.html b/examples/prism-prolog.html index b231bcae7c..a0df67e5bf 100644 --- a/examples/prism-prolog.html +++ b/examples/prism-prolog.html @@ -21,24 +21,3 @@

    Example

    N >= 2, N1 is N - 1, N2 is N - 2, fibo(N1, F1), fibo(N2, F2), F is F1 + F2, assert(fibo(N,F):-!). % assert as first clause - -

    Known failures

    -

    There are certain edge cases where Prism will fail. - There are always such cases in every regex-based syntax highlighter. - However, Prism dares to be open and honest about them. - If a failure is listed here, it doesn’t mean it will never be fixed. This is more of a “known bugs” list, just with a certain type of bug. -

    - -

    Null-ary predicates are not highlighted

    -
    halt.
    -trace.
    -
    -:- if(test1).
    -section_1.
    -:- elif(test2).
    -section_2.
    -:- elif(test3).
    -section_3.
    -:- else.
    -section_else.
    -:- endif.
    diff --git a/examples/prism-pug.html b/examples/prism-pug.html index d37de5caba..ee46c8b0ec 100644 --- a/examples/prism-pug.html +++ b/examples/prism-pug.html @@ -52,7 +52,7 @@

    Inline JavaScript

    alert('foo'); alert('bar'); - var classes = ['foo', 'bar', 'baz'] -- for (var x = 0; x < 3; x++) +- for (var x = 0; x < 3; x++) li item diff --git a/examples/prism-puppet.html b/examples/prism-puppet.html index 4892ab8972..ff73e81fe4 100644 --- a/examples/prism-puppet.html +++ b/examples/prism-puppet.html @@ -30,7 +30,7 @@

    Variables

    Functions

    require apache
     template('apache/vhost-default.conf.erb')
    -[1,20,3].filter |$value| { $value < 10 }
    +[1,20,3].filter |$value| { $value < 10 }

    All-in-one example

    file {'ntp.conf':
    @@ -114,10 +114,10 @@ 

    All-in-one example

    default => 'root', } -User <| groups == 'admin' |> -Concat::Fragment <<| tag == "bacula-storage-dir-${bacula_director}" |>> +User <| groups == 'admin' |> +Concat::Fragment <<| tag == "bacula-storage-dir-${bacula_director}" |>> -Exec <| title == 'update_migrations' |> { +Exec <| title == 'update_migrations' |> { environment => 'RUBYLIB=/usr/lib/ruby/site_ruby/1.8/', } @@ -137,16 +137,3 @@

    All-in-one example

    target => '/etc/nagios3/conf.d/nagios_service.cfg', notify => Service[$nagios::params::nagios_service], }
    - -

    Known failures

    -

    There are certain edge cases where Prism will fail. - There are always such cases in every regex-based syntax highlighter. - However, Prism dares to be open and honest about them. - If a failure is listed here, it doesn’t mean it will never be fixed. This is more of a “known bugs” list, just with a certain type of bug. -

    - -

    More than one level of nested braces inside interpolation

    -
    "Foobar ${foo({
    -    bar => {baz => 42}
    -    baz => 42
    -})} <- broken"
    \ No newline at end of file diff --git a/examples/prism-pure.html b/examples/prism-pure.html index d7a0129b12..9bcac74185 100644 --- a/examples/prism-pure.html +++ b/examples/prism-pure.html @@ -24,7 +24,7 @@

    Inline code

    Inline code requires the desired language to be loaded. On this page, check C, C++ and Fortran before checking Pure should make the examples below work properly.

    -
    %<
    +
    %<
     int mygcd(int x, int y)
     {
       if (y == 0)
    @@ -34,7 +34,7 @@ 

    Inline code

    } %> -%< -*- Fortran90 -*- +%< -*- Fortran90 -*- function fact(n) result(p) integer n, p p = 1 @@ -44,7 +44,7 @@

    Inline code

    end function fact %> -%< -*- C++ -*- +%< -*- C++ -*- #include <pure/runtime.h> #include <string> @@ -112,4 +112,4 @@

    Example

    safe (i,j) p = ~any (check (i,j)) p; check (i1,j1) (i2,j2) = i1==i2 || j1==j2 || i1+j1==i2+j2 || i1-j1==i2-j2; -end;
    \ No newline at end of file +end;
    diff --git a/examples/prism-python.html b/examples/prism-python.html index ce6efc00fb..3a63e8bc40 100644 --- a/examples/prism-python.html +++ b/examples/prism-python.html @@ -49,13 +49,3 @@

    Full example

    if __name__ == '__main__': import doctest doctest.testmod() - -

    Known failures

    -

    There are certain edge cases where Prism will fail. - There are always such cases in every regex-based syntax highlighter. - However, Prism dares to be open and honest about them. - If a failure is listed here, it doesn’t mean it will never be fixed. This is more of a “known bugs” list, just with a certain type of bug. -

    - -

    Interpolation expressions containing strings with { or }

    -
    f"{'}'}"
    diff --git a/examples/prism-q.html b/examples/prism-q.html index 58d674f478..9d7d5c6226 100644 --- a/examples/prism-q.html +++ b/examples/prism-q.html @@ -100,13 +100,3 @@

    Example

    getCAs exec distinct caType from ca adjust[t;`dividend] / adjust trades for dividends only - -

    Known failures

    -

    There are certain edge cases where Prism will fail. - There are always such cases in every regex-based syntax highlighter. - However, Prism dares to be open and honest about them. - If a failure is listed here, it doesn’t mean it will never be fixed. This is more of a “known bugs” list, just with a certain type of bug. -

    - -

    The global context is highlighted as a verb

    -
    \d .
    \ No newline at end of file diff --git a/examples/prism-rest.html b/examples/prism-rest.html index 511e87c9e1..a7288a38b8 100644 --- a/examples/prism-rest.html +++ b/examples/prism-rest.html @@ -308,22 +308,3 @@

    Inline markup

    See the `Python home page <http://www.python.org>`_ for info. Oh yes, the _`Norwegian Blue`. What's, um, what's wrong with it? - -

    Known failures

    -

    There are certain edge cases where Prism will fail. - There are always such cases in every regex-based syntax highlighter. - However, Prism dares to be open and honest about them. - If a failure is listed here, it doesn’t mean it will never be fixed. This is more of a “known bugs” list, just with a certain type of bug. -

    - -

    Nothing is highlighted inside table cells

    -
    +---------------+----------+
    -| column 1     | column 2  |
    -+--------------+-----------+
    -| **bold**?    | *italic*? |
    -+--------------+-----------+
    - -

    The inline markup recognition rules are not as strict as they are in the spec

    -

    No inline markup should be highlighted in the following code.

    -
    2 * x a ** b (* BOM32_* ` `` _ __ |
    -"*" '|' (*) [*] {*} <*> ‘*’ ‚*‘ ‘*‚ ’*’ ‚*’ “*” „*“ “*„ ”*” „*” »*« ›*‹ «*» »*» ›*›
    \ No newline at end of file diff --git a/examples/prism-rust.html b/examples/prism-rust.html index d447968423..3f56a91b6f 100644 --- a/examples/prism-rust.html +++ b/examples/prism-rust.html @@ -50,19 +50,3 @@

    Closure parameters and bitwise OR

    let add_one = |x: int| -> int { 1i + x }; let printer = || { println!("x is: {}", x); }; - -

    Known failures

    -

    There are certain edge cases where Prism will fail. - There are always such cases in every regex-based syntax highlighter. - However, Prism dares to be open and honest about them. - If a failure is listed here, it doesn’t mean it will never be fixed. This is more of a “known bugs” list, just with a certain type of bug. -

    - -

    Nested block comments

    -
    /* Nested block
    -	/* comments
    -	are */
    -not supported */
    - -

    Delimiters of parameters for closures that don't use braces

    -
    |x| x + 1i;
    \ No newline at end of file diff --git a/examples/prism-sas.html b/examples/prism-sas.html index 8932ebb036..546404bf1d 100644 --- a/examples/prism-sas.html +++ b/examples/prism-sas.html @@ -23,7 +23,7 @@

    Operators

    A**B;
     'foo'||'bar'!!'baz'¦¦'test';
     A<>B><C;
    -A~=B¬=C^=D>=E<=F;
    +A~=B¬=C^=D>=E<=F;
     a*b/c+d-e<f>g&h|i!j¦k;
     ~a;¬b;^c;
     (a eq b) ne (c gt d) lt e ge f le h;
    @@ -155,4 +155,4 @@ 

    More examples

    JD03 switch 383 09jan2013 13.99 BV1E timer 26 03aug2013 34.50 ; -run;
    \ No newline at end of file +run; diff --git a/examples/prism-sass.html b/examples/prism-sass.html index 7200e789cc..a2f0673a2b 100644 --- a/examples/prism-sass.html +++ b/examples/prism-sass.html @@ -26,22 +26,3 @@

    Variables

    #main width: $width - -

    Known failures

    -

    There are certain edge cases where Prism will fail. - There are always such cases in every regex-based syntax highlighter. - However, Prism dares to be open and honest about them. - If a failure is listed here, it doesn’t mean it will never be fixed. This is more of a “known bugs” list, just with a certain type of bug. -

    - -

    Deprecated Sass syntax is not supported

    -
    .page
    -  color = 5px + 9px
    -
    -!width = 13px
    -.icon
    -  width = !width
    - -

    Selectors with pseudo classes are highlighted as property/value pairs

    -
    a:hover
    -  text-decoration: underline
    \ No newline at end of file diff --git a/examples/prism-scala.html b/examples/prism-scala.html index 1dc56f8714..b9ed1f1b65 100644 --- a/examples/prism-scala.html +++ b/examples/prism-scala.html @@ -85,16 +85,3 @@

    Full example

    println("sl2 = " + sl2) } } - -

    Known failures

    -

    There are certain edge cases where Prism will fail. - There are always such cases in every regex-based syntax highlighter. - However, Prism dares to be open and honest about them. - If a failure is listed here, it doesn’t mean it will never be fixed. This is more of a “known bugs” list, just with a certain type of bug. -

    - -

    Nested block comments

    -
    /* Nested block
    -	/* comments
    -	are */
    -not supported */
    \ No newline at end of file diff --git a/examples/prism-smarty.html b/examples/prism-smarty.html index 5e57922fa4..650e6fc1d4 100644 --- a/examples/prism-smarty.html +++ b/examples/prism-smarty.html @@ -69,13 +69,3 @@

    Literal section

    } {/literal} </style> - -

    Known failures

    -

    There are certain edge cases where Prism will fail. - There are always such cases in every regex-based syntax highlighter. - However, Prism dares to be open and honest about them. - If a failure is listed here, it doesn’t mean it will never be fixed. This is more of a “known bugs” list, just with a certain type of bug. -

    - -

    Smarty tag in the middle of an HTML tag

    -
    <div{if $test} class="test"{/if}></div>
    \ No newline at end of file diff --git a/examples/prism-swift.html b/examples/prism-swift.html index 98d6eb55e2..e49a0d4a74 100644 --- a/examples/prism-swift.html +++ b/examples/prism-swift.html @@ -29,12 +29,12 @@

    Control flow

    for _ in 1...power { answer *= base } -while square < finalSquare { +while square < finalSquare { // roll the dice if ++diceRoll == 7 { diceRoll = 1 } // move by the rolled amount square += diceRoll - if square < board.count { + if square < board.count { // if we're still on the board, move up or down for a snake or a ladder square += board[square] } @@ -52,29 +52,16 @@

    Control flow

    Classes and attributes

    class MyViewController: UIViewController {
    -    @IBOutlet weak var button: UIButton!
    -    @IBOutlet var textFields: [UITextField]!
    -    @IBAction func buttonTapped(AnyObject) {
    -	    println("button tapped!")
    +	@IBOutlet weak var button: UIButton!
    +	@IBOutlet var textFields: [UITextField]!
    +	@IBAction func buttonTapped(AnyObject) {
    +		println("button tapped!")
     	}
     }
     
     @IBDesignable
     class MyCustomView: UIView {
    -    @IBInspectable var textColor: UIColor
    -    @IBInspectable var iconHeight: CGFloat
    -    /* ... */
    +	@IBInspectable var textColor: UIColor
    +	@IBInspectable var iconHeight: CGFloat
    +	/* ... */
     }
    - -

    Known failures

    -

    There are certain edge cases where Prism will fail. - There are always such cases in every regex-based syntax highlighter. - However, Prism dares to be open and honest about them. - If a failure is listed here, it doesn’t mean it will never be fixed. This is more of a “known bugs” list, just with a certain type of bug. -

    - -

    Nested block comments

    -
    /* Nested block
    -	/* comments
    -	are */
    -not supported */
    \ No newline at end of file diff --git a/examples/prism-textile.html b/examples/prism-textile.html index 4ff4d12798..f195e9673b 100644 --- a/examples/prism-textile.html +++ b/examples/prism-textile.html @@ -156,23 +156,3 @@

    Tables

    |This|is|a|row| {background:#ddd}. |This|is|grey|row| - -

    Known failures

    -

    There are certain edge cases where Prism will fail. - There are always such cases in every regex-based syntax highlighter. - However, Prism dares to be open and honest about them. - If a failure is listed here, it doesn’t mean it will never be fixed. This is more of a “known bugs” list, just with a certain type of bug. -

    - -

    Nested styles are only partially supported

    - -

    Only one level of nesting is supported.

    - -
    *A bold paragraph %containing a span with broken _italic_ inside%!*
    - -

    HTML inside Textile is not supported

    - -

    But Textile inside HTML should be just fine.

    - -
    <strong>This _should_ work properly.</strong>
    -*But this is <em>definitely</em> broken.*
    \ No newline at end of file diff --git a/examples/prism-twig.html b/examples/prism-twig.html index 0a7078151d..167ffadd95 100644 --- a/examples/prism-twig.html +++ b/examples/prism-twig.html @@ -23,13 +23,3 @@

    Twig embedded in HTML

    {% else %} <p>Not foo...</p> {% endif %} - -

    Known failures

    -

    There are certain edge cases where Prism will fail. - There are always such cases in every regex-based syntax highlighter. - However, Prism dares to be open and honest about them. - If a failure is listed here, it doesn’t mean it will never be fixed. This is more of a “known bugs” list, just with a certain type of bug. -

    - -

    Tag containing Twig is not highlighted

    -
    <div{% if foo %} class="bar"{% endif %}></div>
    \ No newline at end of file diff --git a/examples/prism-vbnet.html b/examples/prism-vbnet.html index bc2a376b2e..b5e3081284 100644 --- a/examples/prism-vbnet.html +++ b/examples/prism-vbnet.html @@ -7,10 +7,10 @@

    Example

    Public Function findValue(ByVal arr() As Double,
         ByVal searchValue As Double) As Double
         Dim i As Integer = 0
    -    While i <= UBound(arr) AndAlso arr(i) <> searchValue
    +    While i <= UBound(arr) AndAlso arr(i) <> searchValue
             ' If i is greater than UBound(arr), searchValue is not checked.
             i += 1
         End While
         If i > UBound(arr) Then i = -1
         Return i
    -End Function
    \ No newline at end of file +End Function diff --git a/examples/prism-vhdl.html b/examples/prism-vhdl.html index b495085155..0d3b56f6b9 100644 --- a/examples/prism-vhdl.html +++ b/examples/prism-vhdl.html @@ -5,8 +5,8 @@

    Comments

    Literals

    constant FREEZE : integer := 32;
     constant TEMP : real := 32.0;
    -A_INT <= 16#FF#;
    -B_INT <= 2#1010_1010#;
    +A_INT <= 16#FF#;
    +B_INT <= 2#1010_1010#;
     MONEY := 1_000_000.0;
     FACTOR := 2.2E-6;
     constant DEL1 :time := 10 ns;
    @@ -17,9 +17,9 @@ 

    Literals

    signal STATE : T_STATE := IDLE; constant FLAG :bit_vector(0 to 7) := "11111111"; constant MSG : string := "Hello"; -BIT_8_BUS <= B"1111_1111"; -BIT_9_BUS <= O"353"; -BIT_16_BUS <= X"AA55"; +BIT_8_BUS <= B"1111_1111"; +BIT_9_BUS <= O"353"; +BIT_16_BUS <= X"AA55"; constant TWO_LINE_MSG : string := "Hello" & CR & "World";

    Full example

    @@ -37,8 +37,8 @@

    Full example

    architecture circuits of fadd is -- full adder stage, body begin -- circuits of fadd - s <= a xor b xor cin after 1 ns; - cout <= (a and b) or (a and cin) or (b and cin) after 1 ns; + s <= a xor b xor cin after 1 ns; + cout <= (a and b) or (a and cin) or (b and cin) after 1 ns; end architecture circuits; -- of fadd library IEEE; diff --git a/examples/prism-wiki.html b/examples/prism-wiki.html index 295eb3f812..99dbd0c618 100644 --- a/examples/prism-wiki.html +++ b/examples/prism-wiki.html @@ -143,23 +143,3 @@

    Tables

    | |15.00 |} - -

    Known failures

    -

    There are certain edge cases where Prism will fail. - There are always such cases in every regex-based syntax highlighter. - However, Prism dares to be open and honest about them. - If a failure is listed here, it doesn’t mean it will never be fixed. This is more of a “known bugs” list, just with a certain type of bug. -

    - -

    Nested magic words are not supported

    - -
    {{#switch:{{PAGENAME}}
    -| L'Aquila = No translation
    -| L = Not OK
    -| L'Aquila = Entity escaping
    -| L'Aquila = Numeric char encoding
    -}}
    - -

    Nesting of bold and italic is not supported

    -
    ''Italic with '''bold''' inside''
    - diff --git a/examples/prism-xojo.html b/examples/prism-xojo.html index 35480744dd..5dd8fc85e5 100644 --- a/examples/prism-xojo.html +++ b/examples/prism-xojo.html @@ -21,8 +21,8 @@

    Example

    Dim g As Graphics
     Dim yOffSet As Integer
     g = OpenPrinterDialog()
    -If g <> Nil Then
    -  If MainDishMenu.ListIndex <> -1 Then
    +If g <> Nil Then
    +  If MainDishMenu.ListIndex <> -1 Then
         g.Bold = True
         g.DrawString("Main Dish:",20,20)
         g.Bold = False
    diff --git a/examples/prism-yaml.html b/examples/prism-yaml.html
    index bea52f8651..58b78f60cc 100644
    --- a/examples/prism-yaml.html
    +++ b/examples/prism-yaml.html
    @@ -89,7 +89,7 @@ 

    Full example

    state : MI postal : 48046 ship-to: - <<: *id001 + <<: *id001 product: - sku : BL394D quantity : 4 diff --git a/index.html b/index.html index fef21c9757..0bb0d68d9b 100644 --- a/index.html +++ b/index.html @@ -115,7 +115,7 @@

    Full list of features

    Limitations

    • Any pre-existing HTML in the code will be stripped off. There are ways around it though.
    • -
    • Regex-based so it *will* fail on certain edge cases, which are documented in the Examples section.
    • +
    • Regex-based so it *will* fail on certain edge cases, which are documented in the known failues page.
    • No IE 6-8 support. If someone can read code, they are probably in the 85% of the population with a modern browser.
  • diff --git a/known-failures.html b/known-failures.html new file mode 100644 index 0000000000..ebd401e27d --- /dev/null +++ b/known-failures.html @@ -0,0 +1,384 @@ + + + + + + +Known failures ▲ Prism + + + + + + + + + + +
    +
    + +

    Known failures

    +

    A list of rare edge cases where Prism highlights code incorrectly.

    +
    + +
    +

    There are certain edge cases where Prism will fail. There are always such cases in every regex-based syntax highlighter.
    + However, Prism dares to be open and honest about them. If a failure is listed here, it doesn’t mean it will never be fixed. This is more of a “known bugs” list, just with a certain type of bug.

    +
    + + +
    + +

    Comments only support one level of nesting

    +
    (* Nested block
    +	(* comments
    +		(* on more than
    +		2 levels *)
    +	are *)
    +not supported *)
    + +
    + + +
    + +

    Nested block comments

    +
    #cs
    +	#cs
    +		foo()
    +	#ce
    +#ce
    + +
    + + +
    + +

    Two levels of nesting inside C section

    +
    {
    +	if($1) {
    +		if($2) {
    +
    +		}
    +	}
    +} // <- Broken
    +%%
    +%%
    + +
    + + +
    + +

    Comments only support one level of nesting

    +
    /+ /+ /+ this does not work +/ +/ +/
    + +

    Token strings only support one level of nesting

    +
    q{ q{ q{ this does not work } } }
    + +
    + + +
    + +

    String interpolation in single-quoted strings

    +
    '#{:atom} <- this should not be highligted'
    + +
    + + +
    + +

    Two divisions on the same line

    +
    2 / 3 / 4
    + +
    + + +
    + +

    Names starting with a number

    +
    The box 1A is a container
    + +
    + + +
    + +

    String interpolation containing a closing brace

    +
    `${ /* } */ a + b }`
    +`${ '}' }`
    + +

    String interpolation with deeply nested braces

    +
    `${foo({ a: { b: { c: true } } })}`
    + +
    + + +
    + +

    At-rules looking like variables

    +
    @import "some file.less";
    + +

    At-rules containing interpolation

    +
    @import "@{themes}/tidal-wave.less";
    + +

    extend is not highlighted consistently

    +
    nav ul {
    +  &:extend(.inline);
    +  background: blue;
    +}
    +.a:extend(.b) {}
    + +
    + + +
    + +

    Functions with a single string parameter not using parentheses are not highlighted

    +
    foobar"param";
    + +
    + + +
    + +

    Nesting of elements is not fully supported

    +
    [Link partially *italic* DOESN'T work](http://example.com)
    +_ [But link inside italic DOES work](http://example.com) _
    +
    +[Link partially **bold** DOESN'T work](http://example.com)
    +__ [But link inside bold DOES work](http://example.com) __
    + +
    + + +
    + +

    Numbers with underscores

    +
    mov     ax,1100_1000b
    +mov     ax,1100_1000y
    +mov     ax,0b1100_1000
    +mov     ax,0y1100_1000
    +
    +dd    1.222_222_222
    + +
    + + +
    + +

    Code block starting with a comment

    +
    # Doesn't work
    +# Does work
    +
     # Does work when prefixed with a space
    + +

    Comments inside expressions break literals and operators

    +
    ^if(
    +    $age>=4  # not too young
    +    && $age<=80  # and not too old
    +)
    + +
    + + +
    + +

    Null-ary predicates are not highlighted

    +
    halt.
    +trace.
    +
    +:- if(test1).
    +section_1.
    +:- elif(test2).
    +section_2.
    +:- elif(test3).
    +section_3.
    +:- else.
    +section_else.
    +:- endif.
    + +
    + + +
    + +

    More than one level of nested braces inside interpolation

    +
    "Foobar ${foo({
    +    bar => {baz => 42}
    +    baz => 42
    +})} <- broken"
    + +
    + + +
    + +

    Interpolation expressions containing strings with { or }

    +
    f"{'}'}"
    + +
    + + +
    + +

    The global context is highlighted as a verb

    +
    \d .
    + +
    + + +
    + +

    Nothing is highlighted inside table cells

    +
    +---------------+----------+
    +| column 1     | column 2  |
    ++--------------+-----------+
    +| **bold**?    | *italic*? |
    ++--------------+-----------+
    + +

    The inline markup recognition rules are not as strict as they are in the spec

    +

    No inline markup should be highlighted in the following code.

    +
    2 * x a ** b (* BOM32_* ` `` _ __ |
    +"*" '|' (*) [*] {*} <*> ‘*’ ‚*‘ ‘*‚ ’*’ ‚*’ “*” „*“ “*„ ”*” „*” »*« ›*‹ «*» »*» ›*›
    + +
    + + +
    + +

    Nested block comments

    +
    /* Nested block
    +	/* comments
    +	are */
    +not supported */
    + +

    Delimiters of parameters for closures that don't use braces

    +
    |x| x + 1i;
    + +
    + + +
    + +

    Deprecated Sass syntax is not supported

    +
    .page
    +  color = 5px + 9px
    +
    +!width = 13px
    +.icon
    +  width = !width
    + +

    Selectors with pseudo classes are highlighted as property/value pairs

    +
    a:hover
    +  text-decoration: underline
    + +
    + + +
    + +

    Nested block comments

    +
    /* Nested block
    +	/* comments
    +	are */
    +not supported */
    + +
    + + +
    + +

    Nested block comments

    +
    /* Nested block
    +	/* comments
    +	are */
    +not supported */
    + +
    + + +
    + +

    HTML inside Textile is not supported

    + +

    But Textile inside HTML should be just fine.

    + +
    <strong>This _should_ work properly.</strong>
    +*But this is <em>definitely</em> broken.*
    + +
    + + +
    + +

    Tag containing Twig is not highlighted

    +
    <div{% if foo %} class="bar"{% endif %}></div>
    + +
    + + +
    + +

    Nested magic words are not supported

    + +
    {{#switch:{{PAGENAME}}
    +| L'Aquila = No translation
    +| L = Not OK
    +| L'Aquila = Entity escaping
    +| L'Aquila = Numeric char encoding
    +}}
    + +

    Nesting of bold and italic is not supported

    +
    ''Italic with '''bold''' inside''
    + +
    + + +
    + + + + + + + + + + From de10bd1d85c8012b6f9c07866c6fb2a18f5cb567 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Mon, 1 Jul 2019 19:55:12 +0200 Subject: [PATCH 0302/1100] Protobuf improvements (#1948) This makes numerous improvements to the Protobuf grammar adding (almost) full support for PB2 and PB3 syntax. --- components/prism-protobuf.js | 44 ++++++-- components/prism-protobuf.min.js | 2 +- examples/prism-protobuf.html | 25 +++++ .../protobuf/annotation_feature.test | 20 ++++ tests/languages/protobuf/builtin_feature.test | 39 +++++++ .../protobuf/class-name_feature.test | 102 ++++++++++++++++++ tests/languages/protobuf/keyword_feature.test | 63 +++++------ tests/languages/protobuf/map_feature.test | 23 ++++ tests/languages/protobuf/string_feature.test | 2 +- 9 files changed, 279 insertions(+), 41 deletions(-) create mode 100644 examples/prism-protobuf.html create mode 100644 tests/languages/protobuf/annotation_feature.test create mode 100644 tests/languages/protobuf/builtin_feature.test create mode 100644 tests/languages/protobuf/class-name_feature.test create mode 100644 tests/languages/protobuf/map_feature.test diff --git a/components/prism-protobuf.js b/components/prism-protobuf.js index 44e6cd5cad..4e369f84e9 100644 --- a/components/prism-protobuf.js +++ b/components/prism-protobuf.js @@ -1,8 +1,36 @@ -Prism.languages.protobuf = Prism.languages.extend('clike', { - keyword: /\b(?:package|import|message|enum)\b/, - builtin: /\b(?:required|repeated|optional|reserved)\b/, - primitive: { - pattern: /\b(?:double|float|int32|int64|uint32|uint64|sint32|sint64|fixed32|fixed64|sfixed32|sfixed64|bool|string|bytes)\b/, - alias: 'symbol' - } -}); +(function (Prism) { + + var builtinTypes = /\b(?:double|float|[su]?int(?:32|64)|s?fixed(?:32|64)|bool|string|bytes)\b/; + + Prism.languages.protobuf = Prism.languages.extend('clike', { + 'class-name': { + pattern: /(\b(?:enum|extend|message|service)\s+)[A-Za-z_]\w*(?=\s*\{)/, + lookbehind: true + }, + 'keyword': /\b(?:enum|extend|extensions|import|message|oneof|option|optional|package|public|repeated|required|reserved|service|syntax|to)\b/ + }); + + Prism.languages.insertBefore('protobuf', 'operator', { + 'map': { + pattern: /\bmap<\s*[\w.]+\s*,\s*[\w.]+\s*>(?=\s+[A-Za-z_]\w*\s*[=;])/, + alias: 'class-name', + inside: { + 'punctuation': /[<>.,]/, + 'builtin': builtinTypes + } + }, + 'builtin': builtinTypes, + 'positional-class-name': { + pattern: /(?:\b|\B\.)[A-Za-z_]\w*(?:\.[A-Za-z_]\w*)*(?=\s+[A-Za-z_]\w*\s*[=;])/, + alias: 'class-name', + inside: { + 'punctuation': /\./ + } + }, + 'annotation': { + pattern: /(\[\s*)[A-Za-z_]\w*(?=\s*=)/, + lookbehind: true + } + }); + +}(Prism)); diff --git a/components/prism-protobuf.min.js b/components/prism-protobuf.min.js index a55dbe2702..ffbdaee557 100644 --- a/components/prism-protobuf.min.js +++ b/components/prism-protobuf.min.js @@ -1 +1 @@ -Prism.languages.protobuf=Prism.languages.extend("clike",{keyword:/\b(?:package|import|message|enum)\b/,builtin:/\b(?:required|repeated|optional|reserved)\b/,primitive:{pattern:/\b(?:double|float|int32|int64|uint32|uint64|sint32|sint64|fixed32|fixed64|sfixed32|sfixed64|bool|string|bytes)\b/,alias:"symbol"}}); \ No newline at end of file +!function(e){var a=/\b(?:double|float|[su]?int(?:32|64)|s?fixed(?:32|64)|bool|string|bytes)\b/;e.languages.protobuf=e.languages.extend("clike",{"class-name":{pattern:/(\b(?:enum|extend|message|service)\s+)[A-Za-z_]\w*(?=\s*\{)/,lookbehind:!0},keyword:/\b(?:enum|extend|extensions|import|message|oneof|option|optional|package|public|repeated|required|reserved|service|syntax|to)\b/}),e.languages.insertBefore("protobuf","operator",{map:{pattern:/\bmap<\s*[\w.]+\s*,\s*[\w.]+\s*>(?=\s+[A-Za-z_]\w*\s*[=;])/,alias:"class-name",inside:{punctuation:/[<>.,]/,builtin:a}},builtin:a,"positional-class-name":{pattern:/(?:\b|\B\.)[A-Za-z_]\w*(?:\.[A-Za-z_]\w*)*(?=\s+[A-Za-z_]\w*\s*[=;])/,alias:"class-name",inside:{punctuation:/\./}},annotation:{pattern:/(\[\s*)[A-Za-z_]\w*(?=\s*=)/,lookbehind:!0}})}(Prism); \ No newline at end of file diff --git a/examples/prism-protobuf.html b/examples/prism-protobuf.html new file mode 100644 index 0000000000..7174552d71 --- /dev/null +++ b/examples/prism-protobuf.html @@ -0,0 +1,25 @@ +

    Full example

    +
    syntax = "proto3";
    +
    +package foo.generated;
    +option java_package = "org.foo.generated";
    +option optimize_for = SPEED;
    +
    +// What's up with all the foo?
    +message Foo {
    +
    +  message Bar {
    +
    +    optional string key   = 1;
    +    optional Foo value = 2;
    +    optional string value_raw = 3 [deprecated=true];
    +  }
    +
    +  enum Level {
    +    INFO  = 0;
    +    WARN  = 1;
    +    ERROR = 2;
    +  }
    +
    +  repeated Property property = 1;
    +}
    diff --git a/tests/languages/protobuf/annotation_feature.test b/tests/languages/protobuf/annotation_feature.test new file mode 100644 index 0000000000..ec68a55802 --- /dev/null +++ b/tests/languages/protobuf/annotation_feature.test @@ -0,0 +1,20 @@ +int32 foo = 1 [deprecated=true]; + +---------------------------------------------------- + +[ + ["builtin", "int32"], + " foo ", + ["operator", "="], + ["number", "1"], + ["punctuation", "["], + ["annotation", "deprecated"], + ["operator", "="], + ["boolean", "true"], + ["punctuation", "]"], + ["punctuation", ";"] +] + +---------------------------------------------------- + +Check for annotations. diff --git a/tests/languages/protobuf/builtin_feature.test b/tests/languages/protobuf/builtin_feature.test new file mode 100644 index 0000000000..bf170b9737 --- /dev/null +++ b/tests/languages/protobuf/builtin_feature.test @@ -0,0 +1,39 @@ +double +float +int32 +int64 +uint32 +uint64 +sint32 +sint64 +fixed32 +fixed64 +sfixed32 +sfixed64 +bool +string +bytes + +---------------------------------------------------- + +[ + ["builtin", "double"], + ["builtin", "float"], + ["builtin", "int32"], + ["builtin", "int64"], + ["builtin", "uint32"], + ["builtin", "uint64"], + ["builtin", "sint32"], + ["builtin", "sint64"], + ["builtin", "fixed32"], + ["builtin", "fixed64"], + ["builtin", "sfixed32"], + ["builtin", "sfixed64"], + ["builtin", "bool"], + ["builtin", "string"], + ["builtin", "bytes"] +] + +---------------------------------------------------- + +Check for builtin types. diff --git a/tests/languages/protobuf/class-name_feature.test b/tests/languages/protobuf/class-name_feature.test new file mode 100644 index 0000000000..5f0ffb7351 --- /dev/null +++ b/tests/languages/protobuf/class-name_feature.test @@ -0,0 +1,102 @@ +syntax = "proto2"; +syntax = "proto3"; + +option java_multiple_files = true; + +import public "new.proto"; +import "other.proto"; + +enum Foo {} +extend Foo {} +service Foo {} +message Foo { + Bar Bar = 0; + foo.Bar Bar2 = 0; + .baz.Bar Bar3 = 0; +} + +---------------------------------------------------- + +[ + ["keyword", "syntax"], + ["operator", "="], + ["string", "\"proto2\""], + ["punctuation", ";"], + + ["keyword", "syntax"], + ["operator", "="], + ["string", "\"proto3\""], + ["punctuation", ";"], + + + ["keyword", "option"], + " java_multiple_files ", + ["operator", "="], + ["boolean", "true"], + ["punctuation", ";"], + + + ["keyword", "import"], + ["keyword", "public"], + ["string", "\"new.proto\""], + ["punctuation", ";"], + + ["keyword", "import"], + ["string", "\"other.proto\""], + ["punctuation", ";"], + + + ["keyword", "enum"], + ["class-name", "Foo"], + ["punctuation", "{"], + ["punctuation", "}"], + + ["keyword", "extend"], + ["class-name", "Foo"], + ["punctuation", "{"], + ["punctuation", "}"], + + ["keyword", "service"], + ["class-name", "Foo"], + ["punctuation", "{"], + ["punctuation", "}"], + + ["keyword", "message"], + ["class-name", "Foo"], + ["punctuation", "{"], + + ["positional-class-name", [ + "Bar" + ]], + " Bar ", + ["operator", "="], + ["number", "0"], + ["punctuation", ";"], + + ["positional-class-name", [ + "foo", + ["punctuation", "."], + "Bar" + ]], + " Bar2 ", + ["operator", "="], + ["number", "0"], + ["punctuation", ";"], + + ["positional-class-name", [ + ["punctuation", "."], + "baz", + ["punctuation", "."], + "Bar" + ]], + " Bar3 ", + ["operator", "="], + ["number", "0"], + ["punctuation", ";"], + + ["punctuation", "}"] +] + +---------------------------------------------------- + +Check for class names diff --git a/tests/languages/protobuf/keyword_feature.test b/tests/languages/protobuf/keyword_feature.test index eabe71e619..1272833b68 100644 --- a/tests/languages/protobuf/keyword_feature.test +++ b/tests/languages/protobuf/keyword_feature.test @@ -1,40 +1,41 @@ -message Point { - required int32 x = 1; - required int32 y = 2; - optional string label = 3; -} +enum +extend +extensions +import +message +oneof +option +optional +package +public +repeated +required +reserved +service +syntax +to ---------------------------------------------------- [ + ["keyword", "enum"], + ["keyword", "extend"], + ["keyword", "extensions"], + ["keyword", "import"], ["keyword", "message"], - " Point ", - ["punctuation", "{"], - - ["builtin", "required"], - ["primitive", "int32"], - " x ", - ["operator", "="], - ["number", "1"], - ["punctuation", ";"], - - ["builtin", "required"], - ["primitive", "int32"], - " y ", - ["operator", "="], - ["number", "2"], - ["punctuation", ";"], - - ["builtin", "optional"], - ["primitive", "string"], - " label ", - ["operator", "="], - ["number", "3"], - ["punctuation", ";"], - - ["punctuation", "}"] + ["keyword", "oneof"], + ["keyword", "option"], + ["keyword", "optional"], + ["keyword", "package"], + ["keyword", "public"], + ["keyword", "repeated"], + ["keyword", "required"], + ["keyword", "reserved"], + ["keyword", "service"], + ["keyword", "syntax"], + ["keyword", "to"] ] ---------------------------------------------------- -Check for keywords and builtins \ No newline at end of file +Check for keywords diff --git a/tests/languages/protobuf/map_feature.test b/tests/languages/protobuf/map_feature.test new file mode 100644 index 0000000000..94a54f6cc4 --- /dev/null +++ b/tests/languages/protobuf/map_feature.test @@ -0,0 +1,23 @@ +map bar; + +---------------------------------------------------- + +[ + ["map", [ + "map", + ["punctuation", "<"], + ["builtin", "string"], + ["punctuation", ","], + ["punctuation", "."], + "foo", + ["punctuation", "."], + "Foo", + ["punctuation", ">"] + ]], + " bar", + ["punctuation", ";"] +] + +---------------------------------------------------- + +Check for maps. diff --git a/tests/languages/protobuf/string_feature.test b/tests/languages/protobuf/string_feature.test index 3d2b45cb24..8929696962 100644 --- a/tests/languages/protobuf/string_feature.test +++ b/tests/languages/protobuf/string_feature.test @@ -20,4 +20,4 @@ ---------------------------------------------------- -Checks for single-quoted and double-quoted strings. \ No newline at end of file +Checks for single-quoted and double-quoted strings. From 473f7fbd0dd82343d937cb27f9bc2ffcc683c35c Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Wed, 3 Jul 2019 12:34:20 +0200 Subject: [PATCH 0303/1100] Added support for PC-Axis file format (#1940) This adds a new language for the PC-Axis file format. --- components.js | 2 +- components.json | 5 ++ components/prism-pcaxis.js | 53 +++++++++++++ components/prism-pcaxis.min.js | 1 + examples/prism-pcaxis.html | 35 +++++++++ plugins/autoloader/prism-autoloader.js | 1 + plugins/autoloader/prism-autoloader.min.js | 2 +- plugins/show-language/prism-show-language.js | 2 + .../show-language/prism-show-language.min.js | 2 +- tests/languages/pcaxis/boolean_feature.test | 13 ++++ tests/languages/pcaxis/keyword_feature.test | 76 +++++++++++++++++++ tests/languages/pcaxis/number_feature.test | 17 +++++ tests/languages/pcaxis/string_feature.test | 13 ++++ tests/languages/pcaxis/tlist_feature.test | 72 ++++++++++++++++++ 14 files changed, 291 insertions(+), 3 deletions(-) create mode 100644 components/prism-pcaxis.js create mode 100644 components/prism-pcaxis.min.js create mode 100644 examples/prism-pcaxis.html create mode 100644 tests/languages/pcaxis/boolean_feature.test create mode 100644 tests/languages/pcaxis/keyword_feature.test create mode 100644 tests/languages/pcaxis/number_feature.test create mode 100644 tests/languages/pcaxis/string_feature.test create mode 100644 tests/languages/pcaxis/tlist_feature.test diff --git a/components.js b/components.js index 04b6666693..cddd646c67 100644 --- a/components.js +++ b/components.js @@ -1,2 +1,2 @@ -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default","peerDependencies":"markup"},"clike":{"title":"C-like","option":"default","overrideExampleHeader":true},"javascript":{"title":"JavaScript","require":"clike","peerDependencies":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"Augmented Backus–Naur form","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","peerDependencies":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"Backus–Naur form","alias":"rbnf","aliasTitles":{"rbnf":"Routing Backus–Naur form"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"Extended Backus–Naur form","owner":"RunDevelopment"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment"},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","peerDependencies":["css","coffeescript","erb","javascript","less","markdown","ruby","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"http":{"title":"HTTP","peerDependencies":["javascript","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"peerDependencies":["scala"],"owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","peerDependencies":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike"],"peerDependencies":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","peerDependencies":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","owner":"CupOfTea696"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"less":{"title":"Less","require":"css","owner":"Golmote"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","peerDependencies":["jsdoc"],"alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"nasm":{"title":"NASM","owner":"rbmj"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"cpp","peerDependencies":["c","cpp"],"overrideExampleHeader":true,"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"peerDependencies":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","peerDependencies":["c","cpp","fortran"],"owner":"Golmote"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"peerDependencies":["jsdoc","js-extras"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","peerDependencies":["actionscript","coffeescript","flow","javascript","typescript","vala"],"owner":"RunDevelopment"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sql":{"title":"SQL","owner":"multipetros"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","peerDependencies":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","alias":"ts","owner":"vkbansal"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","visual-basic"],"owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":"Line Highlight","line-numbers":{"title":"Line Numbers","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","after":["autolinker","data-uri-highlight"]},"autolinker":"Autolinker","wpd":"WebPlatform Docs","custom-class":{"title":"Custom Class","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","noCSS":true},"show-language":{"title":"Show Language","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","owner":"Golmote","noCSS":true},"previewers":{"title":"Previewers","owner":"Golmote"},"autoloader":{"title":"Autoloader","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","owner":"Golmote","after":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","owner":"chriswells0"},"unescaped-markup":"Unescaped Markup","normalize-whitespace":{"title":"Normalize Whitespace","owner":"zeitgeist87","after":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","owner":"mAAdhaTTah","require":"toolbar","noCSS":true}}}; +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default","peerDependencies":"markup"},"clike":{"title":"C-like","option":"default","overrideExampleHeader":true},"javascript":{"title":"JavaScript","require":"clike","peerDependencies":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"Augmented Backus–Naur form","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","peerDependencies":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"Backus–Naur form","alias":"rbnf","aliasTitles":{"rbnf":"Routing Backus–Naur form"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"Extended Backus–Naur form","owner":"RunDevelopment"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment"},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","peerDependencies":["css","coffeescript","erb","javascript","less","markdown","ruby","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"http":{"title":"HTTP","peerDependencies":["javascript","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"peerDependencies":["scala"],"owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","peerDependencies":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike"],"peerDependencies":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","peerDependencies":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","owner":"CupOfTea696"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"less":{"title":"Less","require":"css","owner":"Golmote"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","peerDependencies":["jsdoc"],"alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"nasm":{"title":"NASM","owner":"rbmj"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"cpp","peerDependencies":["c","cpp"],"overrideExampleHeader":true,"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"peerDependencies":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","peerDependencies":["c","cpp","fortran"],"owner":"Golmote"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"peerDependencies":["jsdoc","js-extras"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","peerDependencies":["actionscript","coffeescript","flow","javascript","typescript","vala"],"owner":"RunDevelopment"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sql":{"title":"SQL","owner":"multipetros"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","peerDependencies":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","alias":"ts","owner":"vkbansal"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","visual-basic"],"owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":"Line Highlight","line-numbers":{"title":"Line Numbers","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","after":["autolinker","data-uri-highlight"]},"autolinker":"Autolinker","wpd":"WebPlatform Docs","custom-class":{"title":"Custom Class","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","noCSS":true},"show-language":{"title":"Show Language","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","owner":"Golmote","noCSS":true},"previewers":{"title":"Previewers","owner":"Golmote"},"autoloader":{"title":"Autoloader","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","owner":"Golmote","after":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","owner":"chriswells0"},"unescaped-markup":"Unescaped Markup","normalize-whitespace":{"title":"Normalize Whitespace","owner":"zeitgeist87","after":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","owner":"mAAdhaTTah","require":"toolbar","noCSS":true}}}; if (typeof module !== 'undefined' && module.exports) { module.exports = components; } \ No newline at end of file diff --git a/components.json b/components.json index 2f8c5a6080..37fa5139c5 100644 --- a/components.json +++ b/components.json @@ -632,6 +632,11 @@ }, "owner": "Golmote" }, + "pcaxis": { + "title": "PC-Axis", + "alias": "px", + "owner": "RunDevelopment" + }, "perl": { "title": "Perl", "owner": "Golmote" diff --git a/components/prism-pcaxis.js b/components/prism-pcaxis.js new file mode 100644 index 0000000000..1ce0ba1043 --- /dev/null +++ b/components/prism-pcaxis.js @@ -0,0 +1,53 @@ +Prism.languages.pcaxis = { + 'string': /"[^"]*"/, + 'keyword': { + pattern: /((?:^|;)\s*)[-A-Z\d]+(?:\s*\[[-\w]+\])?(?:\s*\("[^"]*"(?:,\s*"[^"]*")*\))?(?=\s*=)/, + lookbehind: true, + greedy: true, + inside: { + 'keyword': /^[-A-Z\d]+/, + 'language': { + pattern: /^(\s*)\[[-\w]+\]/, + lookbehind: true, + inside: { + 'punctuation': /^\[|\]$/, + 'property': /[-\w]+/ + } + }, + 'sub-key': { + pattern: /^(\s*)[\s\S]+/, + lookbehind: true, + inside: { + 'parameter': { + pattern: /"[^"]*"/, + alias: 'property' + }, + 'punctuation': /^\(|\)$|,/ + } + } + } + }, + 'operator': /=/, + 'tlist': { + pattern: /TLIST\s*\(\s*\w+(?:(?:\s*,\s*"[^"]*")+|\s*,\s*"[^"]*"-"[^"]*")?\s*\)/, + greedy: true, + inside: { + 'function': /^TLIST/, + 'property': { + pattern: /^(\s*\(\s*)\w+/, + lookbehind: true + }, + 'string': /"[^"]*"/, + 'punctuation': /[(),]/, + 'operator': /-/ + } + }, + 'punctuation': /[;,]/, + 'number': { + pattern: /(^|\s)\d+(?:\.\d+)?(?!\S)/, + lookbehind: true + }, + 'boolean': /YES|NO/, +}; + +Prism.languages.px = Prism.languages.pcaxis; diff --git a/components/prism-pcaxis.min.js b/components/prism-pcaxis.min.js new file mode 100644 index 0000000000..89ef4484f6 --- /dev/null +++ b/components/prism-pcaxis.min.js @@ -0,0 +1 @@ +Prism.languages.pcaxis={string:/"[^"]*"/,keyword:{pattern:/((?:^|;)\s*)[-A-Z\d]+(?:\s*\[[-\w]+\])?(?:\s*\("[^"]*"(?:,\s*"[^"]*")*\))?(?=\s*=)/,lookbehind:!0,greedy:!0,inside:{keyword:/^[-A-Z\d]+/,language:{pattern:/^(\s*)\[[-\w]+\]/,lookbehind:!0,inside:{punctuation:/^\[|\]$/,property:/[-\w]+/}},"sub-key":{pattern:/^(\s*)[\s\S]+/,lookbehind:!0,inside:{parameter:{pattern:/"[^"]*"/,alias:"property"},punctuation:/^\(|\)$|,/}}}},operator:/=/,tlist:{pattern:/TLIST\s*\(\s*\w+(?:(?:\s*,\s*"[^"]*")+|\s*,\s*"[^"]*"-"[^"]*")?\s*\)/,greedy:!0,inside:{function:/^TLIST/,property:{pattern:/^(\s*\(\s*)\w+/,lookbehind:!0},string:/"[^"]*"/,punctuation:/[(),]/,operator:/-/}},punctuation:/[;,]/,number:{pattern:/(^|\s)\d+(?:\.\d+)?(?!\S)/,lookbehind:!0},boolean:/YES|NO/},Prism.languages.px=Prism.languages.pcaxis; \ No newline at end of file diff --git a/examples/prism-pcaxis.html b/examples/prism-pcaxis.html new file mode 100644 index 0000000000..59ab31141d --- /dev/null +++ b/examples/prism-pcaxis.html @@ -0,0 +1,35 @@ +

    Full example

    +
    CHARSET="ANSI";
    +AXIS-VERSION="2000";
    +LANGUAGE="en";
    +CREATION-DATE="20170406 11:08";
    +TIMEVAL("time")=TLIST(A1, "1994"-"1996");
    +SUBJECT-AREA="";
    +UNITS="Number";
    +
    +STUB="County","Sex";
    +VALUES("County")="State","Carlow","Dublin","Kildare","Kilkenny","Laois","Longford","Louth","Meath","Offaly","Westmeath","Wexford",
    +"Wicklow","Clare","Cork","Kerry","Limerick","Tipperary","Waterford","Galway","Leitrim","Mayo","Roscommon","Sligo","Cavan",
    +"Donegal","Monaghan";
    +VALUES("Sex")="Both sexes","Male","Female";
    +VALUES[de]("Sex")="Beide Geschlechter","Mann","Frau";
    +CODES("County")="-","01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26";
    +CODES("Sex")="-","1","2";
    +
    +DATA=
    +47163 87913 70192 84531 93120 343 5911 47038 51126 47870 95976 5643 66043 38987 63125 46882
    +57422 89992 11661 35817 92686 21781 37230 80669 14129 56688 81300 20184 88680 52135 17148 28192
    +92218 99175 76054 79907 90207 50547 31522 4244 91079 58776 83402 54109 21254 42946 83519 31242
    +10925 37377 45279 19704 96633 51732 34458 9746 91761 42687 51681 54409 61058 74227 70802 34546
    +64862 12022 29896 23616 50371 89808 57186 63895 94767 76388 66475 56716 50133 6604 52853 40763
    +70558 74672 58190 40909 6869 49937 9271 28067 99656 25674 69442 20608 28046 73287 60416 77515
    +51639 15516 40968 95524 6694 12956 83150 77099 45687 27241 6492 94966 36856 60693 720 74671
    +17309 4831 69376 67757 67499 69029 5209 50738 86947 77747 10996 9167 69176 98856 29531 5865
    +27654 52277 62293 30179 85049 76961 92772 65142 16252 6768 55784 20556 26088 97219 97245 44060
    +64577 91018 75157 42780 96186 62948 73288 74597 2145 16047 1671 2690 2275 45398 71478 53720
    +94832 91800 10398 84830 6009 9024 53132 97850 63832 13269 45376 38564 60343 85293 9330 16810
    +24898 76675 32778 26905 40945 37569 43532 38650 38316 75398 60829 91004 97946 49080 93534 78275
    +20002 87183 80802 56487 12666 18416 91632 74573 70729 97984 48479 93014 10281 90382 28497 15366
    +29720 25646 98513 47065 37662 94058 17383 47234 87293 37849 32087 98641 62012 12584 35492 87090
    +85157 90539 31005 67590 13627 44803 46789 8026 86877 18429 8935 78118 41728 67025 69312 52172
    +49224 68064 93025 1195 64873 684 90039 86065 67324 66534 1110 22354 36867 27479 76286 8539
    diff --git a/plugins/autoloader/prism-autoloader.js b/plugins/autoloader/prism-autoloader.js index e5189ab7a8..185e2406f5 100644 --- a/plugins/autoloader/prism-autoloader.js +++ b/plugins/autoloader/prism-autoloader.js @@ -144,6 +144,7 @@ "md": "markdown", "n4jsd": "n4js", "objectpascal": "pascal", + "px": "pcaxis", "py": "python", "rb": "ruby", "ts": "typescript", diff --git a/plugins/autoloader/prism-autoloader.min.js b/plugins/autoloader/prism-autoloader.min.js index 8b32438ad1..4aac440bf7 100644 --- a/plugins/autoloader/prism-autoloader.min.js +++ b/plugins/autoloader/prism-autoloader.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof self&&self.Prism&&self.document&&document.createElement){var r={javascript:"clike",actionscript:"javascript",arduino:"cpp",aspnet:["markup","csharp"],bison:"c",c:"clike",csharp:"clike",cpp:"c",coffeescript:"javascript",crystal:"ruby","css-extras":"css",d:"clike",dart:"clike",django:"markup-templating",ejs:["javascript","markup-templating"],erb:["ruby","markup-templating"],fsharp:"clike",flow:"javascript",glsl:"clike",gml:"clike",go:"clike",groovy:"clike",haml:"ruby",handlebars:"markup-templating",haxe:"clike",java:"clike",javadoc:["markup","java","javadoclike"],jolie:"clike",jsdoc:["javascript","javadoclike"],"js-extras":"javascript",jsonp:"json",json5:"json",kotlin:"clike",less:"css",markdown:"markup","markup-templating":"markup",n4js:"javascript",nginx:"clike",objectivec:"c",opencl:"cpp",parser:"markup",php:["clike","markup-templating"],phpdoc:["php","javadoclike"],"php-extras":"php",plsql:"sql",processing:"clike",protobuf:"clike",pug:["markup","javascript"],qore:"clike",jsx:["markup","javascript"],tsx:["jsx","typescript"],reason:"clike",ruby:"clike",sass:"css",scss:"css",scala:"java","shell-session":"bash",smarty:"markup-templating",soy:"markup-templating",swift:"clike",tap:"yaml",textile:"markup",tt2:["clike","markup-templating"],twig:"markup",typescript:"javascript","t4-cs":["t4-templating","csharp"],"t4-vb":["t4-templating","visual-basic"],vala:"clike",vbnet:"basic",velocity:"markup",wiki:"markup",xeora:"markup",xquery:"markup"},n={html:"markup",xml:"markup",svg:"markup",mathml:"markup",js:"javascript",adoc:"asciidoc",shell:"bash",rbnf:"bnf",cs:"csharp",dotnet:"csharp",coffee:"coffeescript",jinja2:"django",dockerfile:"docker",gamemakerlanguage:"gml",hs:"haskell",tex:"latex",context:"latex",emacs:"lisp",elisp:"lisp","emacs-lisp":"lisp",md:"markdown",n4jsd:"n4js",objectpascal:"pascal",py:"python",rb:"ruby",ts:"typescript",t4:"t4-cs",vb:"visual-basic",xeoracube:"xeora",yml:"yaml"},l={},a=document.getElementsByTagName("script"),e="components/";if((a=a[a.length-1]).hasAttribute("data-autoloader-path")){var t=a.getAttribute("data-autoloader-path").trim();0 Date: Wed, 10 Jul 2019 21:45:22 -0400 Subject: [PATCH 0304/1100] Added support for PascaLIGO (#1947) This adds support for the [PascaLIGO language](http://ligolang.org). --- components.js | 2 +- components.json | 4 ++ components/prism-pascaligo.js | 62 ++++++++++++++++++ components/prism-pascaligo.min.js | 1 + examples/prism-pascaligo.html | 63 +++++++++++++++++++ package-lock.json | 41 ++++++++---- .../languages/pascaligo/boolean_feature.test | 11 ++++ .../languages/pascaligo/builtin_feature.test | 15 +++++ .../languages/pascaligo/comment_feature.test | 18 ++++++ .../languages/pascaligo/function_feature.test | 23 +++++++ .../languages/pascaligo/keyword_feature.test | 29 +++++++++ tests/languages/pascaligo/number_feature.test | 31 +++++++++ .../languages/pascaligo/operator_feature.test | 25 ++++++++ tests/languages/pascaligo/string_feature.test | 28 +++++++++ 14 files changed, 341 insertions(+), 12 deletions(-) create mode 100644 components/prism-pascaligo.js create mode 100644 components/prism-pascaligo.min.js create mode 100644 examples/prism-pascaligo.html create mode 100644 tests/languages/pascaligo/boolean_feature.test create mode 100644 tests/languages/pascaligo/builtin_feature.test create mode 100644 tests/languages/pascaligo/comment_feature.test create mode 100644 tests/languages/pascaligo/function_feature.test create mode 100644 tests/languages/pascaligo/keyword_feature.test create mode 100644 tests/languages/pascaligo/number_feature.test create mode 100644 tests/languages/pascaligo/operator_feature.test create mode 100644 tests/languages/pascaligo/string_feature.test diff --git a/components.js b/components.js index cddd646c67..53f3dee378 100644 --- a/components.js +++ b/components.js @@ -1,2 +1,2 @@ -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default","peerDependencies":"markup"},"clike":{"title":"C-like","option":"default","overrideExampleHeader":true},"javascript":{"title":"JavaScript","require":"clike","peerDependencies":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"Augmented Backus–Naur form","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","peerDependencies":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"Backus–Naur form","alias":"rbnf","aliasTitles":{"rbnf":"Routing Backus–Naur form"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"Extended Backus–Naur form","owner":"RunDevelopment"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment"},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","peerDependencies":["css","coffeescript","erb","javascript","less","markdown","ruby","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"http":{"title":"HTTP","peerDependencies":["javascript","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"peerDependencies":["scala"],"owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","peerDependencies":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike"],"peerDependencies":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","peerDependencies":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","owner":"CupOfTea696"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"less":{"title":"Less","require":"css","owner":"Golmote"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","peerDependencies":["jsdoc"],"alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"nasm":{"title":"NASM","owner":"rbmj"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"cpp","peerDependencies":["c","cpp"],"overrideExampleHeader":true,"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"peerDependencies":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","peerDependencies":["c","cpp","fortran"],"owner":"Golmote"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"peerDependencies":["jsdoc","js-extras"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","peerDependencies":["actionscript","coffeescript","flow","javascript","typescript","vala"],"owner":"RunDevelopment"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sql":{"title":"SQL","owner":"multipetros"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","peerDependencies":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","alias":"ts","owner":"vkbansal"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","visual-basic"],"owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":"Line Highlight","line-numbers":{"title":"Line Numbers","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","after":["autolinker","data-uri-highlight"]},"autolinker":"Autolinker","wpd":"WebPlatform Docs","custom-class":{"title":"Custom Class","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","noCSS":true},"show-language":{"title":"Show Language","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","owner":"Golmote","noCSS":true},"previewers":{"title":"Previewers","owner":"Golmote"},"autoloader":{"title":"Autoloader","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","owner":"Golmote","after":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","owner":"chriswells0"},"unescaped-markup":"Unescaped Markup","normalize-whitespace":{"title":"Normalize Whitespace","owner":"zeitgeist87","after":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","owner":"mAAdhaTTah","require":"toolbar","noCSS":true}}}; +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default","peerDependencies":"markup"},"clike":{"title":"C-like","option":"default","overrideExampleHeader":true},"javascript":{"title":"JavaScript","require":"clike","peerDependencies":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"Augmented Backus–Naur form","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","peerDependencies":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"Backus–Naur form","alias":"rbnf","aliasTitles":{"rbnf":"Routing Backus–Naur form"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"Extended Backus–Naur form","owner":"RunDevelopment"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment"},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","peerDependencies":["css","coffeescript","erb","javascript","less","markdown","ruby","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"http":{"title":"HTTP","peerDependencies":["javascript","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"peerDependencies":["scala"],"owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","peerDependencies":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike"],"peerDependencies":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","peerDependencies":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","owner":"CupOfTea696"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"less":{"title":"Less","require":"css","owner":"Golmote"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","peerDependencies":["jsdoc"],"alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"nasm":{"title":"NASM","owner":"rbmj"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"cpp","peerDependencies":["c","cpp"],"overrideExampleHeader":true,"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"peerDependencies":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","peerDependencies":["c","cpp","fortran"],"owner":"Golmote"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"peerDependencies":["jsdoc","js-extras"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","peerDependencies":["actionscript","coffeescript","flow","javascript","typescript","vala"],"owner":"RunDevelopment"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sql":{"title":"SQL","owner":"multipetros"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","peerDependencies":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","alias":"ts","owner":"vkbansal"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","visual-basic"],"owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":"Line Highlight","line-numbers":{"title":"Line Numbers","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","after":["autolinker","data-uri-highlight"]},"autolinker":"Autolinker","wpd":"WebPlatform Docs","custom-class":{"title":"Custom Class","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","noCSS":true},"show-language":{"title":"Show Language","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","owner":"Golmote","noCSS":true},"previewers":{"title":"Previewers","owner":"Golmote"},"autoloader":{"title":"Autoloader","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","owner":"Golmote","after":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","owner":"chriswells0"},"unescaped-markup":"Unescaped Markup","normalize-whitespace":{"title":"Normalize Whitespace","owner":"zeitgeist87","after":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","owner":"mAAdhaTTah","require":"toolbar","noCSS":true}}}; if (typeof module !== 'undefined' && module.exports) { module.exports = components; } \ No newline at end of file diff --git a/components.json b/components.json index 37fa5139c5..22cfbc0df5 100644 --- a/components.json +++ b/components.json @@ -632,6 +632,10 @@ }, "owner": "Golmote" }, + "pascaligo": { + "title": "Pascaligo", + "owner": "DefinitelyNotAGoat" + }, "pcaxis": { "title": "PC-Axis", "alias": "px", diff --git a/components/prism-pascaligo.js b/components/prism-pascaligo.js new file mode 100644 index 0000000000..689743b93c --- /dev/null +++ b/components/prism-pascaligo.js @@ -0,0 +1,62 @@ +(function (Prism) { + + // Pascaligo is a layer 2 smart contract language for the tezos blockchain + + var braces = /\((?:[^()]|\((?:[^()]|\([^()]*\))*\))*\)/.source; + var type = /(?:\w+(?:)?|)/.source.replace(//g, braces); + + var pascaligo = Prism.languages.pascaligo = { + 'comment': /\(\*[\s\S]+?\*\)|\/\/.*/, + 'string': { + pattern: /(["'`])(\\[\s\S]|(?!\1)[^\\])*\1|\^[a-z]/i, + greedy: true + }, + 'class-name': [ + { + pattern: RegExp(/(\btype\s+\w+\s+is\s+)/.source.replace(//g, type), 'i'), + lookbehind: true, + inside: null // see below + }, + { + pattern: RegExp(/(?=\s+is\b)/.source.replace(//g, type), 'i'), + inside: null // see below + }, + { + pattern: RegExp(/(:\s*)/.source.replace(//g, type)), + lookbehind: true, + inside: null // see below + } + ], + 'keyword': { + pattern: /(^|[^&])\b(?:begin|block|case|const|else|end|fail|for|from|function|if|is|nil|of|remove|return|skip|then|type|var|while|with)\b/i, + lookbehind: true + }, + 'boolean': { + pattern: /(^|[^&])\b(?:True|False)\b/i, + lookbehind: true + }, + 'builtin': { + pattern: /(^|[^&])\b(?:bool|int|list|map|nat|record|string|unit)\b/i, + lookbehind: true + }, + 'function': /\w+(?=\s*\()/i, + 'number': [ + // Hexadecimal, octal and binary + /%[01]+|&[0-7]+|\$[a-f\d]+/i, + // Decimal + /\b\d+(?:\.\d+)?(?:e[+-]?\d+)?(?:mtz|n)?/i + ], + 'operator': /->|=\/=|\.\.|\*\*|:=|<[<=>]?|>[>=]?|[+\-*\/]=?|[@^=|]|\b(?:and|mod|or)\b/, + 'punctuation': /\(\.|\.\)|[()\[\]:;,.{}]/ + }; + + var classNameInside = ['comment', 'keyword', 'builtin', 'operator', 'punctuation'].reduce(function (accum, key) { + accum[key] = pascaligo[key]; + return accum; + }, {}); + + pascaligo["class-name"].forEach(function (p) { + p.inside = classNameInside; + }); + +}(Prism)); diff --git a/components/prism-pascaligo.min.js b/components/prism-pascaligo.min.js new file mode 100644 index 0000000000..cea982fe39 --- /dev/null +++ b/components/prism-pascaligo.min.js @@ -0,0 +1 @@ +!function(e){var n="(?:\\w+(?:)?|)".replace(//g,"\\((?:[^()]|\\((?:[^()]|\\([^()]*\\))*\\))*\\)"),i=e.languages.pascaligo={comment:/\(\*[\s\S]+?\*\)|\/\/.*/,string:{pattern:/(["'`])(\\[\s\S]|(?!\1)[^\\])*\1|\^[a-z]/i,greedy:!0},"class-name":[{pattern:RegExp("(\\btype\\s+\\w+\\s+is\\s+)".replace(//g,n),"i"),lookbehind:!0,inside:null},{pattern:RegExp("(?=\\s+is\\b)".replace(//g,n),"i"),inside:null},{pattern:RegExp("(:\\s*)".replace(//g,n)),lookbehind:!0,inside:null}],keyword:{pattern:/(^|[^&])\b(?:begin|block|case|const|else|end|fail|for|from|function|if|is|nil|of|remove|return|skip|then|type|var|while|with)\b/i,lookbehind:!0},boolean:{pattern:/(^|[^&])\b(?:True|False)\b/i,lookbehind:!0},builtin:{pattern:/(^|[^&])\b(?:bool|int|list|map|nat|record|string|unit)\b/i,lookbehind:!0},function:/\w+(?=\s*\()/i,number:[/%[01]+|&[0-7]+|\$[a-f\d]+/i,/\b\d+(?:\.\d+)?(?:e[+-]?\d+)?(?:mtz|n)?/i],operator:/->|=\/=|\.\.|\*\*|:=|<[<=>]?|>[>=]?|[+\-*\/]=?|[@^=|]|\b(?:and|mod|or)\b/,punctuation:/\(\.|\.\)|[()\[\]:;,.{}]/},t=["comment","keyword","builtin","operator","punctuation"].reduce(function(e,n){return e[n]=i[n],e},{});i["class-name"].forEach(function(e){e.inside=t})}(Prism); \ No newline at end of file diff --git a/examples/prism-pascaligo.html b/examples/prism-pascaligo.html new file mode 100644 index 0000000000..4562c5082e --- /dev/null +++ b/examples/prism-pascaligo.html @@ -0,0 +1,63 @@ +

    Comments

    +
    // Single line comment
    +(* Multi-line
    +comment *)
    + +

    Strings

    +
    "foo \"bar\" baz";
    +'foo \'bar\' baz';
    + +

    Numbers

    +
    123
    +123.456
    +-123.456
    +1e-23
    +123.456E789
    +0xaf
    +0xAF
    +
    + +

    Functions

    +
    foo()
    +Bar()
    +_456()
    +
    + +

    Full Example

    +
    
    +function pop (const h : heap) : (heap * heap_element * nat) is
    +	begin
    +		const result : heap_element = get_top (h) ;
    +		var s : nat := size(h) ;
    +		const last : heap_element = get_force(s, h) ;
    +		remove s from map h ;
    +		h[1n] := last ;
    +		s := size(h) ;
    +		var i : nat := 0n ;
    +		var largest : nat := 1n ;
    +		var left : nat := 0n ;
    +		var right : nat := 0n ;
    +		var c : nat := 0n ;
    +		while (largest =/= i) block {
    +			c := c + 1n ;
    +			i := largest ;
    +			left := 2n * i ;
    +			right := left + 1n ;
    +			if (left <= s) then begin
    +				if (heap_element_lt(get_force(left , h) , get_force(i , h))) then begin
    +					largest := left ;
    +					const tmp : heap_element = get_force(i , h) ;
    +					h[i] := get_force(left , h) ;
    +					h[left] := tmp ;
    +				end else skip ;
    +			end else if (right <= s) then begin
    +				if (heap_element_lt(get_force(right , h) , get_force(i , h))) then begin
    +					largest := right ;
    +					const tmp : heap_element = get_force(i , h) ;
    +					h[i] := get_force(right , h) ;
    +					h[left] := tmp ;
    +				end else skip ;
    +			end else skip ;
    +		}
    +	end with (h , result , c)
    +
    diff --git a/package-lock.json b/package-lock.json index 5c95d8c3e6..bb2538c3fc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1535,7 +1535,8 @@ "ansi-regex": { "version": "2.1.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "aproba": { "version": "1.2.0", @@ -1556,12 +1557,14 @@ "balanced-match": { "version": "1.0.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, "dev": true, + "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -1576,17 +1579,20 @@ "code-point-at": { "version": "1.1.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "concat-map": { "version": "0.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "console-control-strings": { "version": "1.1.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "core-util-is": { "version": "1.0.2", @@ -1703,7 +1709,8 @@ "inherits": { "version": "2.0.3", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "ini": { "version": "1.3.5", @@ -1715,6 +1722,7 @@ "version": "1.0.0", "bundled": true, "dev": true, + "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -1729,6 +1737,7 @@ "version": "3.0.4", "bundled": true, "dev": true, + "optional": true, "requires": { "brace-expansion": "^1.1.7" } @@ -1736,12 +1745,14 @@ "minimist": { "version": "0.0.8", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "minipass": { "version": "2.3.5", "bundled": true, "dev": true, + "optional": true, "requires": { "safe-buffer": "^5.1.2", "yallist": "^3.0.0" @@ -1760,6 +1771,7 @@ "version": "0.5.1", "bundled": true, "dev": true, + "optional": true, "requires": { "minimist": "0.0.8" } @@ -1840,7 +1852,8 @@ "number-is-nan": { "version": "1.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "object-assign": { "version": "4.1.1", @@ -1852,6 +1865,7 @@ "version": "1.4.0", "bundled": true, "dev": true, + "optional": true, "requires": { "wrappy": "1" } @@ -1937,7 +1951,8 @@ "safe-buffer": { "version": "5.1.2", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "safer-buffer": { "version": "2.1.2", @@ -1973,6 +1988,7 @@ "version": "1.0.2", "bundled": true, "dev": true, + "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -1992,6 +2008,7 @@ "version": "3.0.1", "bundled": true, "dev": true, + "optional": true, "requires": { "ansi-regex": "^2.0.0" } @@ -2035,12 +2052,14 @@ "wrappy": { "version": "1.0.2", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "yallist": { "version": "3.0.3", "bundled": true, - "dev": true + "dev": true, + "optional": true } } }, diff --git a/tests/languages/pascaligo/boolean_feature.test b/tests/languages/pascaligo/boolean_feature.test new file mode 100644 index 0000000000..d68fb38346 --- /dev/null +++ b/tests/languages/pascaligo/boolean_feature.test @@ -0,0 +1,11 @@ +True False + +---------------------------------------------------- + +[ + ["boolean", "True"], ["boolean", "False"] +] + +---------------------------------------------------- + +Checks for all booleans. diff --git a/tests/languages/pascaligo/builtin_feature.test b/tests/languages/pascaligo/builtin_feature.test new file mode 100644 index 0000000000..900b14f650 --- /dev/null +++ b/tests/languages/pascaligo/builtin_feature.test @@ -0,0 +1,15 @@ +int unit +string nat map +list record bool + +---------------------------------------------------- + +[ + ["builtin", "int"], ["builtin", "unit"], + ["builtin", "string"], ["builtin", "nat"], ["builtin", "map"], + ["builtin", "list"], ["builtin", "record"], ["builtin", "bool"] +] + +---------------------------------------------------- + +Checks for builtins. diff --git a/tests/languages/pascaligo/comment_feature.test b/tests/languages/pascaligo/comment_feature.test new file mode 100644 index 0000000000..830e26a675 --- /dev/null +++ b/tests/languages/pascaligo/comment_feature.test @@ -0,0 +1,18 @@ +(* foo *) +(* foo +bar *) +// +// foobar + +---------------------------------------------------- + +[ + ["comment", "(* foo *)"], + ["comment", "(* foo\r\nbar *)"], + ["comment", "//"], + ["comment", "// foobar"] +] + +---------------------------------------------------- + +Checks for comments. \ No newline at end of file diff --git a/tests/languages/pascaligo/function_feature.test b/tests/languages/pascaligo/function_feature.test new file mode 100644 index 0000000000..0d134c703e --- /dev/null +++ b/tests/languages/pascaligo/function_feature.test @@ -0,0 +1,23 @@ +somefunc() +some_func() +somefunc42() + +---------------------------------------------------- + +[ + ["function", "somefunc"], + ["punctuation", "("], + ["punctuation", ")"], + + ["function", "some_func"], + ["punctuation", "("], + ["punctuation", ")"], + + ["function", "somefunc42"], + ["punctuation", "("], + ["punctuation", ")"] +] + +---------------------------------------------------- + +Checks for functions. \ No newline at end of file diff --git a/tests/languages/pascaligo/keyword_feature.test b/tests/languages/pascaligo/keyword_feature.test new file mode 100644 index 0000000000..55f4ecf57f --- /dev/null +++ b/tests/languages/pascaligo/keyword_feature.test @@ -0,0 +1,29 @@ +if while for +return nil +remove +from else +then skip +with; is function +var +const type +end begin block +case of + +---------------------------------------------------- + +[ + ["keyword", "if"], ["keyword", "while"], ["keyword", "for"], + ["keyword", "return"], ["keyword", "nil"], + ["keyword", "remove"], + ["keyword", "from"], ["keyword", "else"], + ["keyword", "then"], ["keyword", "skip"], + ["keyword", "with"], ["punctuation", ";"], ["keyword", "is"], ["keyword", "function"], + ["keyword", "var"], + ["keyword", "const"], ["keyword", "type"], + ["keyword", "end"], ["keyword", "begin"], ["keyword", "block"], + ["keyword", "case"], ["keyword", "of"] +] + +---------------------------------------------------- + +Checks for all keywords. diff --git a/tests/languages/pascaligo/number_feature.test b/tests/languages/pascaligo/number_feature.test new file mode 100644 index 0000000000..458cb14fcd --- /dev/null +++ b/tests/languages/pascaligo/number_feature.test @@ -0,0 +1,31 @@ +42 +3.14159 +2.1e4 +1.0e-1 +3.8e+24 +$7aff +&17 +%11110101 + +123n +123mtz + +---------------------------------------------------- + +[ + ["number", "42"], + ["number", "3.14159"], + ["number", "2.1e4"], + ["number", "1.0e-1"], + ["number", "3.8e+24"], + ["number", "$7aff"], + ["number", "&17"], + ["number", "%11110101"], + + ["number", "123n"], + ["number", "123mtz"] +] + +---------------------------------------------------- + +Checks for decimal, hexadecimal, octal and binary numbers. diff --git a/tests/languages/pascaligo/operator_feature.test b/tests/languages/pascaligo/operator_feature.test new file mode 100644 index 0000000000..3b97c04de1 --- /dev/null +++ b/tests/languages/pascaligo/operator_feature.test @@ -0,0 +1,25 @@ +.. ** := +< << <= > >> >= ++ - * / ++= -= *= /= +@ ^ = =/= +-> | + +mod and or + +---------------------------------------------------- + +[ + ["operator", ".."], ["operator", "**"], ["operator", ":="], + ["operator", "<"], ["operator", "<<"], ["operator", "<="], ["operator", ">"], ["operator", ">>"], ["operator", ">="], + ["operator", "+"], ["operator", "-"], ["operator", "*"], ["operator", "/"], + ["operator", "+="], ["operator", "-="], ["operator", "*="], ["operator", "/="], + ["operator", "@"], ["operator", "^"], ["operator", "="], ["operator", "=/="], + ["operator", "->"], ["operator", "|"], + + ["operator", "mod"], ["operator", "and"], ["operator", "or"] +] + +---------------------------------------------------- + +Checks for operators. diff --git a/tests/languages/pascaligo/string_feature.test b/tests/languages/pascaligo/string_feature.test new file mode 100644 index 0000000000..fc394d05b8 --- /dev/null +++ b/tests/languages/pascaligo/string_feature.test @@ -0,0 +1,28 @@ +'a' +'ä' +'本' +'\t' +'\xff' +'\u12e4' + +"日本語" +"\xff\u00FF" + +---------------------------------------------------- + +[ + ["string", "'a'"], + ["string", "'ä'"], + ["string", "'本'"], + ["string", "'\\t'"], + ["string", "'\\xff'"], + ["string", "'\\u12e4'"], + + + ["string", "\"日本語\""], + ["string", "\"\\xff\\u00FF\""] +] + +---------------------------------------------------- + +Checks for runes and strings. From 4a2c90c1c16797bed94ca9035fc22a13b3b52d7d Mon Sep 17 00:00:00 2001 From: dovisutu <40313014+dovisutu@users.noreply.github.com> Date: Thu, 11 Jul 2019 22:05:49 +0800 Subject: [PATCH 0305/1100] Visual Basic: Added support for interpolation strings (#1971) This makes string like `$"Foo bar"` highlight with `$`. --- components/prism-visual-basic.js | 2 +- components/prism-visual-basic.min.js | 2 +- tests/languages/visual-basic/string_feature.test | 4 +++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/components/prism-visual-basic.js b/components/prism-visual-basic.js index f58ccec013..0c4cd61c7e 100644 --- a/components/prism-visual-basic.js +++ b/components/prism-visual-basic.js @@ -11,7 +11,7 @@ Prism.languages['visual-basic'] = { greedy: true }, 'string': { - pattern: /["“”](?:["“”]{2}|[^"“”])*["“”]C?/i, + pattern: /\$?["“”](?:["“”]{2}|[^"“”])*["“”]C?/i, greedy: true }, 'date': { diff --git a/components/prism-visual-basic.min.js b/components/prism-visual-basic.min.js index fd07466352..3518d8ca5e 100644 --- a/components/prism-visual-basic.min.js +++ b/components/prism-visual-basic.min.js @@ -1 +1 @@ -Prism.languages["visual-basic"]={comment:{pattern:/(?:['‘’]|REM\b).*/i,inside:{keyword:/^REM/i}},directive:{pattern:/#(?:Const|Else|ElseIf|End|ExternalChecksum|ExternalSource|If|Region)(?:[^\S\r\n]_[^\S\r\n]*(?:\r\n?|\n)|.)+/i,alias:"comment",greedy:!0},string:{pattern:/["“”](?:["“”]{2}|[^"“”])*["“”]C?/i,greedy:!0},date:{pattern:/#[^\S\r\n]*(?:\d+([/-])\d+\1\d+(?:[^\S\r\n]+(?:\d+[^\S\r\n]*(?:AM|PM)|\d+:\d+(?::\d+)?(?:[^\S\r\n]*(?:AM|PM))?))?|(?:\d+[^\S\r\n]*(?:AM|PM)|\d+:\d+(?::\d+)?(?:[^\S\r\n]*(?:AM|PM))?))[^\S\r\n]*#/i,alias:"builtin"},number:/(?:(?:\b\d+(?:\.\d+)?|\.\d+)(?:E[+-]?\d+)?|&[HO][\dA-F]+)(?:U?[ILS]|[FRD])?/i,boolean:/\b(?:True|False|Nothing)\b/i,keyword:/\b(?:AddHandler|AddressOf|Alias|And(?:Also)?|As|Boolean|ByRef|Byte|ByVal|Call|Case|Catch|C(?:Bool|Byte|Char|Date|Dbl|Dec|Int|Lng|Obj|SByte|Short|Sng|Str|Type|UInt|ULng|UShort)|Char|Class|Const|Continue|Date|Decimal|Declare|Default|Delegate|Dim|DirectCast|Do|Double|Each|Else(?:If)?|End(?:If)?|Enum|Erase|Error|Event|Exit|Finally|For|Friend|Function|Get(?:Type|XMLNamespace)?|Global|GoSub|GoTo|Handles|If|Implements|Imports|In|Inherits|Integer|Interface|Is|IsNot|Let|Lib|Like|Long|Loop|Me|Mod|Module|Must(?:Inherit|Override)|My(?:Base|Class)|Namespace|Narrowing|New|Next|Not(?:Inheritable|Overridable)?|Object|Of|On|Operator|Option(?:al)?|Or(?:Else)?|Out|Overloads|Overridable|Overrides|ParamArray|Partial|Private|Property|Protected|Public|RaiseEvent|ReadOnly|ReDim|RemoveHandler|Resume|Return|SByte|Select|Set|Shadows|Shared|short|Single|Static|Step|Stop|String|Structure|Sub|SyncLock|Then|Throw|To|Try|TryCast|TypeOf|U(?:Integer|Long|Short)|Using|Variant|Wend|When|While|Widening|With(?:Events)?|WriteOnly|Xor)\b/i,operator:[/[+\-*/\\^<=>&#@$%!]/,{pattern:/([^\S\r\n])_(?=[^\S\r\n]*[\r\n])/,lookbehind:!0}],punctuation:/[{}().,:?]/},Prism.languages.vb=Prism.languages["visual-basic"]; \ No newline at end of file +Prism.languages["visual-basic"]={comment:{pattern:/(?:['‘’]|REM\b).*/i,inside:{keyword:/^REM/i}},directive:{pattern:/#(?:Const|Else|ElseIf|End|ExternalChecksum|ExternalSource|If|Region)(?:[^\S\r\n]_[^\S\r\n]*(?:\r\n?|\n)|.)+/i,alias:"comment",greedy:!0},string:{pattern:/\$?["“”](?:["“”]{2}|[^"“”])*["“”]C?/i,greedy:!0},date:{pattern:/#[^\S\r\n]*(?:\d+([/-])\d+\1\d+(?:[^\S\r\n]+(?:\d+[^\S\r\n]*(?:AM|PM)|\d+:\d+(?::\d+)?(?:[^\S\r\n]*(?:AM|PM))?))?|(?:\d+[^\S\r\n]*(?:AM|PM)|\d+:\d+(?::\d+)?(?:[^\S\r\n]*(?:AM|PM))?))[^\S\r\n]*#/i,alias:"builtin"},number:/(?:(?:\b\d+(?:\.\d+)?|\.\d+)(?:E[+-]?\d+)?|&[HO][\dA-F]+)(?:U?[ILS]|[FRD])?/i,boolean:/\b(?:True|False|Nothing)\b/i,keyword:/\b(?:AddHandler|AddressOf|Alias|And(?:Also)?|As|Boolean|ByRef|Byte|ByVal|Call|Case|Catch|C(?:Bool|Byte|Char|Date|Dbl|Dec|Int|Lng|Obj|SByte|Short|Sng|Str|Type|UInt|ULng|UShort)|Char|Class|Const|Continue|Date|Decimal|Declare|Default|Delegate|Dim|DirectCast|Do|Double|Each|Else(?:If)?|End(?:If)?|Enum|Erase|Error|Event|Exit|Finally|For|Friend|Function|Get(?:Type|XMLNamespace)?|Global|GoSub|GoTo|Handles|If|Implements|Imports|In|Inherits|Integer|Interface|Is|IsNot|Let|Lib|Like|Long|Loop|Me|Mod|Module|Must(?:Inherit|Override)|My(?:Base|Class)|Namespace|Narrowing|New|Next|Not(?:Inheritable|Overridable)?|Object|Of|On|Operator|Option(?:al)?|Or(?:Else)?|Out|Overloads|Overridable|Overrides|ParamArray|Partial|Private|Property|Protected|Public|RaiseEvent|ReadOnly|ReDim|RemoveHandler|Resume|Return|SByte|Select|Set|Shadows|Shared|short|Single|Static|Step|Stop|String|Structure|Sub|SyncLock|Then|Throw|To|Try|TryCast|TypeOf|U(?:Integer|Long|Short)|Using|Variant|Wend|When|While|Widening|With(?:Events)?|WriteOnly|Xor)\b/i,operator:[/[+\-*/\\^<=>&#@$%!]/,{pattern:/([^\S\r\n])_(?=[^\S\r\n]*[\r\n])/,lookbehind:!0}],punctuation:/[{}().,:?]/},Prism.languages.vb=Prism.languages["visual-basic"]; \ No newline at end of file diff --git a/tests/languages/visual-basic/string_feature.test b/tests/languages/visual-basic/string_feature.test index 8d2a91b766..011d435ea4 100644 --- a/tests/languages/visual-basic/string_feature.test +++ b/tests/languages/visual-basic/string_feature.test @@ -12,6 +12,7 @@ bar” "Foo”“ba r" "a"c +$"Foobar" ---------------------------------------------------- @@ -27,7 +28,8 @@ r" ["string", "”“"], ["string", "“\""], ["string", "\"Foo”“ba\r\nr\""], - ["string", "\"a\"c"] + ["string", "\"a\"c"], + ["string", "$\"Foobar\""] ] ---------------------------------------------------- From 9d9e2ca47e9461f0b3a5b69e94c1f9a5f3d167e6 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Thu, 11 Jul 2019 16:28:49 +0200 Subject: [PATCH 0306/1100] Removed env.elements in 'before-highlightall' hook (#1968) This removes the `env.elements` property from the environment of the `before-highlightall` hook. **Why?** - There is no plugin that is using it. - It is inherently incompatible with `env.selector`. Even if a plugin using `elements` wanted to respect `selector` it would not be able to because 1) there might be plugins after it (in `before-highlightall`) extending the selector and 2) the plugin has no access to the current `container`. **Isn't this a breaking change?** Yes, but I don't think that this will have any impact for the above reasons and because from a user perspective, it's hard to use than just iteration over your elements and calling `Prism.highlightElement` yourself. --- components/prism-core.js | 4 ++-- components/prism-core.min.js | 2 +- prism.js | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/components/prism-core.js b/components/prism-core.js index 18961e7180..d4566d5530 100644 --- a/components/prism-core.js +++ b/components/prism-core.js @@ -178,9 +178,9 @@ var _ = { selector: 'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code' }; - _.hooks.run("before-highlightall", env); + _.hooks.run('before-highlightall', env); - var elements = env.elements || container.querySelectorAll(env.selector); + var elements = container.querySelectorAll(env.selector); for (var i=0, element; element = elements[i++];) { _.highlightElement(element, async === true, env.callback); diff --git a/components/prism-core.min.js b/components/prism-core.min.js index 3cb415ebf0..9b65d451cb 100644 --- a/components/prism-core.min.js +++ b/components/prism-core.min.js @@ -1 +1 @@ -var _self="undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{},Prism=function(g){var c=/\blang(?:uage)?-([\w-]+)\b/i,a=0,C={manual:g.Prism&&g.Prism.manual,disableWorkerMessageHandler:g.Prism&&g.Prism.disableWorkerMessageHandler,util:{encode:function(e){return e instanceof M?new M(e.type,C.util.encode(e.content),e.alias):Array.isArray(e)?e.map(C.util.encode):e.replace(/&/g,"&").replace(/e.length)return;if(!(k instanceof M)){if(f&&y!=a.length-1){if(c.lastIndex=v,!(x=c.exec(e)))break;for(var b=x.index+(h?x[1].length:0),w=x.index+x[0].length,A=y,P=v,O=a.length;A"+n.content+""},!g.document)return g.addEventListener&&(C.disableWorkerMessageHandler||g.addEventListener("message",function(e){var a=JSON.parse(e.data),n=a.language,t=a.code,r=a.immediateClose;g.postMessage(C.highlight(t,C.languages[n],n)),r&&g.close()},!1)),C;var e=document.currentScript||[].slice.call(document.getElementsByTagName("script")).pop();return e&&(C.filename=e.src,C.manual||e.hasAttribute("data-manual")||("loading"!==document.readyState?window.requestAnimationFrame?window.requestAnimationFrame(C.highlightAll):window.setTimeout(C.highlightAll,16):document.addEventListener("DOMContentLoaded",C.highlightAll))),C}(_self);"undefined"!=typeof module&&module.exports&&(module.exports=Prism),"undefined"!=typeof global&&(global.Prism=Prism); \ No newline at end of file +var _self="undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{},Prism=function(g){var c=/\blang(?:uage)?-([\w-]+)\b/i,a=0,C={manual:g.Prism&&g.Prism.manual,disableWorkerMessageHandler:g.Prism&&g.Prism.disableWorkerMessageHandler,util:{encode:function(e){return e instanceof M?new M(e.type,C.util.encode(e.content),e.alias):Array.isArray(e)?e.map(C.util.encode):e.replace(/&/g,"&").replace(/e.length)return;if(!(k instanceof M)){if(f&&y!=a.length-1){if(c.lastIndex=v,!(x=c.exec(e)))break;for(var b=x.index+(h?x[1].length:0),w=x.index+x[0].length,A=y,P=v,O=a.length;A"+n.content+""},!g.document)return g.addEventListener&&(C.disableWorkerMessageHandler||g.addEventListener("message",function(e){var a=JSON.parse(e.data),n=a.language,t=a.code,r=a.immediateClose;g.postMessage(C.highlight(t,C.languages[n],n)),r&&g.close()},!1)),C;var e=document.currentScript||[].slice.call(document.getElementsByTagName("script")).pop();return e&&(C.filename=e.src,C.manual||e.hasAttribute("data-manual")||("loading"!==document.readyState?window.requestAnimationFrame?window.requestAnimationFrame(C.highlightAll):window.setTimeout(C.highlightAll,16):document.addEventListener("DOMContentLoaded",C.highlightAll))),C}(_self);"undefined"!=typeof module&&module.exports&&(module.exports=Prism),"undefined"!=typeof global&&(global.Prism=Prism); \ No newline at end of file diff --git a/prism.js b/prism.js index 38340f28e4..05286e2f9c 100644 --- a/prism.js +++ b/prism.js @@ -183,9 +183,9 @@ var _ = { selector: 'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code' }; - _.hooks.run("before-highlightall", env); + _.hooks.run('before-highlightall', env); - var elements = env.elements || container.querySelectorAll(env.selector); + var elements = container.querySelectorAll(env.selector); for (var i=0, element; element = elements[i++];) { _.highlightElement(element, async === true, env.callback); From 7bd08327ab7235bfd7ebeb7f93f2a12ee28e8d85 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Sat, 13 Jul 2019 13:42:13 +0200 Subject: [PATCH 0307/1100] JavaScript: Private fields (#1950) This adds support for private fields in both JS and JS Extras. [Proposal](https://github.com/tc39/proposal-class-fields#private-fields). --- components/prism-javascript.js | 4 +- components/prism-javascript.min.js | 2 +- components/prism-js-extras.js | 2 +- components/prism-js-extras.min.js | 2 +- prism.js | 4 +- .../method-variable_feature.test | 14 +++++ .../javascript!+js-extras/method_feature.test | 10 ++++ .../property-access_feature.test | 9 +++ .../javascript/private_fields_feature.test | 58 +++++++++++++++++++ 9 files changed, 98 insertions(+), 7 deletions(-) create mode 100644 tests/languages/javascript/private_fields_feature.test diff --git a/components/prism-javascript.js b/components/prism-javascript.js index 9f19f34aad..9880c4af27 100644 --- a/components/prism-javascript.js +++ b/components/prism-javascript.js @@ -18,7 +18,7 @@ Prism.languages.javascript = Prism.languages.extend('clike', { ], 'number': /\b(?:(?:0[xX](?:[\dA-Fa-f](?:_[\dA-Fa-f])?)+|0[bB](?:[01](?:_[01])?)+|0[oO](?:[0-7](?:_[0-7])?)+)n?|(?:\d(?:_\d)?)+n|NaN|Infinity)\b|(?:\b(?:\d(?:_\d)?)+\.?(?:\d(?:_\d)?)*|\B\.(?:\d(?:_\d)?)+)(?:[Ee][+-]?(?:\d(?:_\d)?)+)?/, // Allow for all non-ASCII characters (See http://stackoverflow.com/a/2008444) - 'function': /[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/, + 'function': /#?[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/, 'operator': /-[-=]?|\+[+=]?|!=?=?|<>?>?=?|=(?:==?|>)?|&[&=]?|\|[|=]?|\*\*?=?|\/=?|~|\^=?|%=?|\?|\.{3}/ }); @@ -32,7 +32,7 @@ Prism.languages.insertBefore('javascript', 'keyword', { }, // This must be declared before keyword because we use "function" inside the look-forward 'function-variable': { - pattern: /[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/, + pattern: /#?[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/, alias: 'function' }, 'parameter': [ diff --git a/components/prism-javascript.min.js b/components/prism-javascript.min.js index f25037d382..ca3012a9fc 100644 --- a/components/prism-javascript.min.js +++ b/components/prism-javascript.min.js @@ -1 +1 @@ -Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])[_$A-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\.(?:prototype|constructor))/,lookbehind:!0}],keyword:[{pattern:/((?:^|})\s*)(?:catch|finally)\b/,lookbehind:!0},{pattern:/(^|[^.])\b(?:as|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],number:/\b(?:(?:0[xX](?:[\dA-Fa-f](?:_[\dA-Fa-f])?)+|0[bB](?:[01](?:_[01])?)+|0[oO](?:[0-7](?:_[0-7])?)+)n?|(?:\d(?:_\d)?)+n|NaN|Infinity)\b|(?:\b(?:\d(?:_\d)?)+\.?(?:\d(?:_\d)?)*|\B\.(?:\d(?:_\d)?)+)(?:[Ee][+-]?(?:\d(?:_\d)?)+)?/,function:/[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,operator:/-[-=]?|\+[+=]?|!=?=?|<>?>?=?|=(?:==?|>)?|&[&=]?|\|[|=]?|\*\*?=?|\/=?|~|\^=?|%=?|\?|\.{3}/}),Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/,Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s])\s*)\/(\[(?:[^\]\\\r\n]|\\.)*]|\\.|[^/\\\[\r\n])+\/[gimyus]{0,6}(?=\s*($|[\r\n,.;})\]]))/,lookbehind:!0,greedy:!0},"function-variable":{pattern:/[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)?\s*\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*=>)/i,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*\s*)\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),Prism.languages.insertBefore("javascript","string",{"template-string":{pattern:/`(?:\\[\s\S]|\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}|[^\\`])*`/,greedy:!0,inside:{interpolation:{pattern:/\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}/,inside:{"interpolation-punctuation":{pattern:/^\${|}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}}}),Prism.languages.markup&&Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.js=Prism.languages.javascript; \ No newline at end of file +Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])[_$A-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\.(?:prototype|constructor))/,lookbehind:!0}],keyword:[{pattern:/((?:^|})\s*)(?:catch|finally)\b/,lookbehind:!0},{pattern:/(^|[^.])\b(?:as|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],number:/\b(?:(?:0[xX](?:[\dA-Fa-f](?:_[\dA-Fa-f])?)+|0[bB](?:[01](?:_[01])?)+|0[oO](?:[0-7](?:_[0-7])?)+)n?|(?:\d(?:_\d)?)+n|NaN|Infinity)\b|(?:\b(?:\d(?:_\d)?)+\.?(?:\d(?:_\d)?)*|\B\.(?:\d(?:_\d)?)+)(?:[Ee][+-]?(?:\d(?:_\d)?)+)?/,function:/#?[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,operator:/-[-=]?|\+[+=]?|!=?=?|<>?>?=?|=(?:==?|>)?|&[&=]?|\|[|=]?|\*\*?=?|\/=?|~|\^=?|%=?|\?|\.{3}/}),Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/,Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s])\s*)\/(\[(?:[^\]\\\r\n]|\\.)*]|\\.|[^/\\\[\r\n])+\/[gimyus]{0,6}(?=\s*($|[\r\n,.;})\]]))/,lookbehind:!0,greedy:!0},"function-variable":{pattern:/#?[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)?\s*\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*=>)/i,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*\s*)\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),Prism.languages.insertBefore("javascript","string",{"template-string":{pattern:/`(?:\\[\s\S]|\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}|[^\\`])*`/,greedy:!0,inside:{interpolation:{pattern:/\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}/,inside:{"interpolation-punctuation":{pattern:/^\${|}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}}}),Prism.languages.markup&&Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.js=Prism.languages.javascript; \ No newline at end of file diff --git a/components/prism-js-extras.js b/components/prism-js-extras.js index 80034cfdc3..2b8a77eae9 100644 --- a/components/prism-js-extras.js +++ b/components/prism-js-extras.js @@ -60,7 +60,7 @@ Prism.languages.insertBefore('javascript', 'punctuation', { 'property-access': { - pattern: /(\.\s*)[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*/, + pattern: /(\.\s*)#?[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*/, lookbehind: true }, 'maybe-class-name': { diff --git a/components/prism-js-extras.min.js b/components/prism-js-extras.min.js index 1174f06e7a..7a5aa0fce6 100644 --- a/components/prism-js-extras.min.js +++ b/components/prism-js-extras.min.js @@ -1 +1 @@ -!function(a){a.languages.insertBefore("javascript","function-variable",{"method-variable":{pattern:RegExp("(\\.\\s*)"+a.languages.javascript["function-variable"].pattern.source),lookbehind:!0,alias:["function-variable","method","function","property-access"]}}),a.languages.insertBefore("javascript","function",{method:{pattern:RegExp("(\\.\\s*)"+a.languages.javascript.function.source),lookbehind:!0,alias:["function","property-access"]}}),a.languages.insertBefore("javascript","constant",{"known-class-name":[{pattern:/\b(?:(?:(?:Uint|Int)(?:8|16|32)|Uint8Clamped|Float(?:32|64))?Array|ArrayBuffer|BigInt|Boolean|DataView|Date|Error|Function|Intl|JSON|Math|Number|Object|Promise|Proxy|Reflect|RegExp|String|Symbol|(?:Weak)?(?:Set|Map)|WebAssembly)\b/,alias:"class-name"},{pattern:/\b(?:[A-Z]\w*)Error\b/,alias:"class-name"}]}),a.languages.javascript.keyword.unshift({pattern:/\b(?:as|default|export|from|import)\b/,alias:"module"},{pattern:/\bnull\b/,alias:["null","nil"]},{pattern:/\bundefined\b/,alias:"nil"}),a.languages.insertBefore("javascript","operator",{spread:{pattern:/\.{3}/,alias:"operator"},arrow:{pattern:/=>/,alias:"operator"}}),a.languages.insertBefore("javascript","punctuation",{"property-access":{pattern:/(\.\s*)[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*/,lookbehind:!0},"maybe-class-name":{pattern:/(^|[^$\w\xA0-\uFFFF])[A-Z][$\w\xA0-\uFFFF]+/,lookbehind:!0},dom:{pattern:/\b(?:document|location|navigator|performance|(?:local|session)Storage|window)\b/,alias:"variable"},console:{pattern:/\bconsole(?=\s*\.)/,alias:"class-name"}});for(var e=["function","function-variable","method","method-variable","property-access"],t=0;t/,alias:"operator"}}),a.languages.insertBefore("javascript","punctuation",{"property-access":{pattern:/(\.\s*)#?[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*/,lookbehind:!0},"maybe-class-name":{pattern:/(^|[^$\w\xA0-\uFFFF])[A-Z][$\w\xA0-\uFFFF]+/,lookbehind:!0},dom:{pattern:/\b(?:document|location|navigator|performance|(?:local|session)Storage|window)\b/,alias:"variable"},console:{pattern:/\bconsole(?=\s*\.)/,alias:"class-name"}});for(var e=["function","function-variable","method","method-variable","property-access"],t=0;t>?>?=?|=(?:==?|>)?|&[&=]?|\|[|=]?|\*\*?=?|\/=?|~|\^=?|%=?|\?|\.{3}/ }); @@ -799,7 +799,7 @@ Prism.languages.insertBefore('javascript', 'keyword', { }, // This must be declared before keyword because we use "function" inside the look-forward 'function-variable': { - pattern: /[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/, + pattern: /#?[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/, alias: 'function' }, 'parameter': [ diff --git a/tests/languages/javascript!+js-extras/method-variable_feature.test b/tests/languages/javascript!+js-extras/method-variable_feature.test index 1d075b4de9..2ceaf13abe 100644 --- a/tests/languages/javascript!+js-extras/method-variable_feature.test +++ b/tests/languages/javascript!+js-extras/method-variable_feature.test @@ -1,5 +1,6 @@ foo.bar = function() {}; foo.bar = async () => {}; +this.bar = () => {}; ---------------------------------------------------- @@ -29,6 +30,19 @@ foo.bar = async () => {}; ["arrow", "=>"], ["punctuation", "{"], ["punctuation", "}"], + ["punctuation", ";"], + + ["keyword", "this"], + ["punctuation", "."], + ["method-variable", [ + "bar" + ]], + ["operator", "="], + ["punctuation", "("], + ["punctuation", ")"], + ["arrow", "=>"], + ["punctuation", "{"], + ["punctuation", "}"], ["punctuation", ";"] ] diff --git a/tests/languages/javascript!+js-extras/method_feature.test b/tests/languages/javascript!+js-extras/method_feature.test index 1d0b4db4ef..9e79a635d7 100644 --- a/tests/languages/javascript!+js-extras/method_feature.test +++ b/tests/languages/javascript!+js-extras/method_feature.test @@ -1,5 +1,6 @@ foo.bar(); foo.bar.call(); +this.#bar(); ---------------------------------------------------- @@ -24,6 +25,15 @@ foo.bar.call(); ]], ["punctuation", "("], ["punctuation", ")"], + ["punctuation", ";"], + + ["keyword", "this"], + ["punctuation", "."], + ["method", [ + "#bar" + ]], + ["punctuation", "("], + ["punctuation", ")"], ["punctuation", ";"] ] diff --git a/tests/languages/javascript!+js-extras/property-access_feature.test b/tests/languages/javascript!+js-extras/property-access_feature.test index c5171e1f86..a0e43307b2 100644 --- a/tests/languages/javascript!+js-extras/property-access_feature.test +++ b/tests/languages/javascript!+js-extras/property-access_feature.test @@ -1,5 +1,7 @@ foo.bar.baz = 0; +this.#foo; + ---------------------------------------------------- [ @@ -14,6 +16,13 @@ foo.bar.baz = 0; ]], ["operator", "="], ["number", "0"], + ["punctuation", ";"], + + ["keyword", "this"], + ["punctuation", "."], + ["property-access", [ + "#foo" + ]], ["punctuation", ";"] ] diff --git a/tests/languages/javascript/private_fields_feature.test b/tests/languages/javascript/private_fields_feature.test new file mode 100644 index 0000000000..f5ce923d28 --- /dev/null +++ b/tests/languages/javascript/private_fields_feature.test @@ -0,0 +1,58 @@ +class Foo { + #foo = function () { + return this.#bar; + } + #bar = 9; + + get value() { + return this.#foo(); + } +} + +---------------------------------------------------- + +[ + ["keyword", "class"], + ["class-name", [ + "Foo" + ]], + ["punctuation", "{"], + + ["function-variable", "#foo"], + ["operator", "="], + ["keyword", "function"], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", "{"], + ["keyword", "return"], + ["keyword", "this"], + ["punctuation", "."], + "#bar", + ["punctuation", ";"], + ["punctuation", "}"], + + "\r\n\t#bar ", + ["operator", "="], + ["number", "9"], + ["punctuation", ";"], + + ["keyword", "get"], + ["function", "value"], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", "{"], + ["keyword", "return"], + ["keyword", "this"], + ["punctuation", "."], + ["function", "#foo"], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", ";"], + ["punctuation", "}"], + + ["punctuation", "}"] +] + +---------------------------------------------------- + +Checks for the private field syntax. From 11f18e369726fb5db5a861b09a911ecabd0ea9fc Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Sat, 13 Jul 2019 15:06:09 +0200 Subject: [PATCH 0308/1100] Download page: Improved performance for Chromium-based browsers (#1907) This significantly reduces the time it takes to highlight the code of Prism on the download page in Chromium-based browsers. It does this by creating a new DOM node and highlighting the code in this detached node which seemingly helps Chromium to optimize its layout recalculations. --- scripts/download.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/scripts/download.js b/scripts/download.js index 7be6834b74..b6ed649cf7 100644 --- a/scripts/download.js +++ b/scripts/download.js @@ -552,9 +552,15 @@ function generateCode(){ var fileName = 'prism.' + type; var codeElement = $('#download-' + type + ' code'); + var pre = codeElement.parentElement; - codeElement.textContent = text; - Prism.highlightElement(codeElement, true); + var newCode = document.createElement('CODE'); + newCode.className = codeElement.className; + newCode.textContent = text; + + Prism.highlightElement(newCode, true, function () { + pre.replaceChild(newCode, codeElement); + }); $('#download-' + type + ' .download-button').onclick = function () { From d58d2aeba0d888867ac265a8c5d20110a98449fc Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Sat, 13 Jul 2019 15:41:07 +0200 Subject: [PATCH 0309/1100] F#: Improved character literals (#1956) This adds support for all F# character escapes which should result in all characters being highlighted as such. The problem was that character literals with escape sequences longer than two characters were not recognized. --- components/prism-fsharp.js | 2 +- components/prism-fsharp.min.js | 2 +- examples/prism-fsharp.html | 29 +++++++++++----------- tests/languages/fsharp/string_feature.test | 12 +++++++-- 4 files changed, 26 insertions(+), 19 deletions(-) diff --git a/components/prism-fsharp.js b/components/prism-fsharp.js index f6bce8dd15..42156225b0 100644 --- a/components/prism-fsharp.js +++ b/components/prism-fsharp.js @@ -10,7 +10,7 @@ Prism.languages.fsharp = Prism.languages.extend('clike', { } ], 'string': { - pattern: /(?:"""[\s\S]*?"""|@"(?:""|[^"])*"|"(?:\\[\s\S]|[^\\"])*")B?|'(?:[^\\']|\\.)'B?/, + pattern: /(?:"""[\s\S]*?"""|@"(?:""|[^"])*"|"(?:\\[\s\S]|[^\\"])*")B?|'(?:[^\\']|\\(?:.|\d{3}|x[a-fA-F\d]{2}|u[a-fA-F\d]{4}|U[a-fA-F\d]{8}))'B?/, greedy: true }, 'class-name': { diff --git a/components/prism-fsharp.min.js b/components/prism-fsharp.min.js index f4ea280782..144653e6cf 100644 --- a/components/prism-fsharp.min.js +++ b/components/prism-fsharp.min.js @@ -1 +1 @@ -Prism.languages.fsharp=Prism.languages.extend("clike",{comment:[{pattern:/(^|[^\\])\(\*[\s\S]*?\*\)/,lookbehind:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0}],string:{pattern:/(?:"""[\s\S]*?"""|@"(?:""|[^"])*"|"(?:\\[\s\S]|[^\\"])*")B?|'(?:[^\\']|\\.)'B?/,greedy:!0},"class-name":{pattern:/(\b(?:exception|inherit|interface|new|of|type)\s+|\w\s*:\s*|\s:\??>\s*)[.\w]+\b(?:\s*(?:->|\*)\s*[.\w]+\b)*(?!\s*[:.])/,lookbehind:!0,inside:{operator:/->|\*/,punctuation:/\./}},keyword:/\b(?:let|return|use|yield)(?:!\B|\b)|\b(abstract|and|as|assert|base|begin|class|default|delegate|do|done|downcast|downto|elif|else|end|exception|extern|false|finally|for|fun|function|global|if|in|inherit|inline|interface|internal|lazy|match|member|module|mutable|namespace|new|not|null|of|open|or|override|private|public|rec|select|static|struct|then|to|true|try|type|upcast|val|void|when|while|with|asr|land|lor|lsl|lsr|lxor|mod|sig|atomic|break|checked|component|const|constraint|constructor|continue|eager|event|external|fixed|functor|include|method|mixin|object|parallel|process|protected|pure|sealed|tailcall|trait|virtual|volatile)\b/,number:[/\b0x[\da-fA-F]+(?:un|lf|LF)?\b/,/\b0b[01]+(?:y|uy)?\b/,/(?:\b\d+\.?\d*|\B\.\d+)(?:[fm]|e[+-]?\d+)?\b/i,/\b\d+(?:[IlLsy]|u[lsy]?|UL)?\b/],operator:/([<>~&^])\1\1|([*.:<>&])\2|<-|->|[!=:]=|?|\??(?:<=|>=|<>|[-+*/%=<>])\??|[!?^&]|~[+~-]|:>|:\?>?/}),Prism.languages.insertBefore("fsharp","keyword",{preprocessor:{pattern:/^[^\r\n\S]*#.*/m,alias:"property",inside:{directive:{pattern:/(\s*#)\b(?:else|endif|if|light|line|nowarn)\b/,lookbehind:!0,alias:"keyword"}}}}),Prism.languages.insertBefore("fsharp","punctuation",{"computation-expression":{pattern:/[_a-z]\w*(?=\s*\{)/i,alias:"keyword"}}),Prism.languages.insertBefore("fsharp","string",{annotation:{pattern:/\[<.+?>\]/,inside:{punctuation:/^\[<|>\]$/,"class-name":{pattern:/^\w+$|(^|;\s*)[A-Z]\w*(?=\()/,lookbehind:!0},"annotation-content":{pattern:/[\s\S]+/,inside:Prism.languages.fsharp}}}}); \ No newline at end of file +Prism.languages.fsharp=Prism.languages.extend("clike",{comment:[{pattern:/(^|[^\\])\(\*[\s\S]*?\*\)/,lookbehind:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0}],string:{pattern:/(?:"""[\s\S]*?"""|@"(?:""|[^"])*"|"(?:\\[\s\S]|[^\\"])*")B?|'(?:[^\\']|\\(?:.|\d{3}|x[a-fA-F\d]{2}|u[a-fA-F\d]{4}|U[a-fA-F\d]{8}))'B?/,greedy:!0},"class-name":{pattern:/(\b(?:exception|inherit|interface|new|of|type)\s+|\w\s*:\s*|\s:\??>\s*)[.\w]+\b(?:\s*(?:->|\*)\s*[.\w]+\b)*(?!\s*[:.])/,lookbehind:!0,inside:{operator:/->|\*/,punctuation:/\./}},keyword:/\b(?:let|return|use|yield)(?:!\B|\b)|\b(abstract|and|as|assert|base|begin|class|default|delegate|do|done|downcast|downto|elif|else|end|exception|extern|false|finally|for|fun|function|global|if|in|inherit|inline|interface|internal|lazy|match|member|module|mutable|namespace|new|not|null|of|open|or|override|private|public|rec|select|static|struct|then|to|true|try|type|upcast|val|void|when|while|with|asr|land|lor|lsl|lsr|lxor|mod|sig|atomic|break|checked|component|const|constraint|constructor|continue|eager|event|external|fixed|functor|include|method|mixin|object|parallel|process|protected|pure|sealed|tailcall|trait|virtual|volatile)\b/,number:[/\b0x[\da-fA-F]+(?:un|lf|LF)?\b/,/\b0b[01]+(?:y|uy)?\b/,/(?:\b\d+\.?\d*|\B\.\d+)(?:[fm]|e[+-]?\d+)?\b/i,/\b\d+(?:[IlLsy]|u[lsy]?|UL)?\b/],operator:/([<>~&^])\1\1|([*.:<>&])\2|<-|->|[!=:]=|?|\??(?:<=|>=|<>|[-+*/%=<>])\??|[!?^&]|~[+~-]|:>|:\?>?/}),Prism.languages.insertBefore("fsharp","keyword",{preprocessor:{pattern:/^[^\r\n\S]*#.*/m,alias:"property",inside:{directive:{pattern:/(\s*#)\b(?:else|endif|if|light|line|nowarn)\b/,lookbehind:!0,alias:"keyword"}}}}),Prism.languages.insertBefore("fsharp","punctuation",{"computation-expression":{pattern:/[_a-z]\w*(?=\s*\{)/i,alias:"keyword"}}),Prism.languages.insertBefore("fsharp","string",{annotation:{pattern:/\[<.+?>\]/,inside:{punctuation:/^\[<|>\]$/,"class-name":{pattern:/^\w+$|(^|;\s*)[A-Z]\w*(?=\()/,lookbehind:!0},"annotation-content":{pattern:/[\s\S]+/,inside:Prism.languages.fsharp}}}}); \ No newline at end of file diff --git a/examples/prism-fsharp.html b/examples/prism-fsharp.html index 6a4330b652..c0b9921710 100644 --- a/examples/prism-fsharp.html +++ b/examples/prism-fsharp.html @@ -5,7 +5,6 @@

    Comments

    Strings

    "foo \"bar\" baz"
    -'foo \'bar\' baz'
     @"Verbatim strings"
     """Alternate "verbatim" strings"""
     
    @@ -58,32 +57,32 @@

    Numbers

    Full example

    -
    // The declaration creates a constructor that takes two values, name and age. 
    +
    // The declaration creates a constructor that takes two values, name and age.
     type Person(name:string, age:int) =
    -    // A Person object's age can be changed. The mutable keyword in the 
    -    // declaration makes that possible. 
    +    // A Person object's age can be changed. The mutable keyword in the
    +    // declaration makes that possible.
         let mutable internalAge = age
     
    -    // Declare a second constructor that takes only one argument, a name. 
    -    // This constructor calls the constructor that requires two arguments, 
    -    // sending 0 as the value for age. 
    +    // Declare a second constructor that takes only one argument, a name.
    +    // This constructor calls the constructor that requires two arguments,
    +    // sending 0 as the value for age.
         new(name:string) = Person(name, 0)
     
    -    // A read-only property. 
    +    // A read-only property.
         member this.Name = name
    -    // A read/write property. 
    +    // A read/write property.
         member this.Age
             with get() = internalAge
             and set(value) = internalAge <- value
     
    -    // Instance methods. 
    -    // Increment the person's age. 
    +    // Instance methods.
    +    // Increment the person's age.
         member this.HasABirthday () = internalAge <- internalAge + 1
     
    -    // Check current age against some threshold. 
    +    // Check current age against some threshold.
         member this.IsOfAge targetAge = internalAge >= targetAge
     
    -    // Display the person's name and age. 
    -    override this.ToString () = 
    +    // Display the person's name and age.
    +    override this.ToString () =
             "Name:  " + name + "\n" + "Age:   " + (string)internalAge
    -
    \ No newline at end of file +
    diff --git a/tests/languages/fsharp/string_feature.test b/tests/languages/fsharp/string_feature.test index 3c984a8c65..c6310d851b 100644 --- a/tests/languages/fsharp/string_feature.test +++ b/tests/languages/fsharp/string_feature.test @@ -18,6 +18,10 @@ bar""" 'a'B '\'' '\\' +'\231' +'\x41' +'\u0041' +'\U0001F47D' ---------------------------------------------------- @@ -39,9 +43,13 @@ bar""" ["string", "'a'"], ["string", "'a'B"], ["string", "'\\''"], - ["string", "'\\\\'"] + ["string", "'\\\\'"], + ["string", "'\\231'"], + ["string", "'\\x41'"], + ["string", "'\\u0041'"], + ["string", "'\\U0001F47D'"] ] ---------------------------------------------------- -Checks for normal strings, verbatim strings, triple-quoted strings and character literals. \ No newline at end of file +Checks for normal strings, verbatim strings, triple-quoted strings and character literals. From b9ec6fd8d1477ddea4a93e4e85c2af410f0d2ac3 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Sat, 13 Jul 2019 15:52:36 +0200 Subject: [PATCH 0310/1100] Markdown: Improved URLs (#1955) This fixes the known issue that inline styles (bold, italic, strike) break URLs. Inline styles are now properly highlighted inside URLs. --- components/prism-markdown.js | 24 ++-- components/prism-markdown.min.js | 2 +- known-failures.html | 12 -- tests/languages/markdown/bold_feature.test | 12 +- tests/languages/markdown/italic_feature.test | 12 +- tests/languages/markdown/strike_feature.test | 12 +- tests/languages/markdown/url_feature.test | 137 ++++++++++++++++++- 7 files changed, 179 insertions(+), 32 deletions(-) diff --git a/components/prism-markdown.js b/components/prism-markdown.js index 94adc834b1..00567f73ce 100644 --- a/components/prism-markdown.js +++ b/components/prism-markdown.js @@ -1,7 +1,7 @@ (function (Prism) { // Allow only one line break - var inner = /\\.|[^\\\n\r_]|(?:\r?\n|\r)(?!\r?\n|\r)/.source; + var inner = /(?:\\.|[^\\\n\r]|(?:\r?\n|\r)(?!\r?\n|\r))/.source; /** * This function is intended for the creation of the bold or italic pattern. @@ -124,7 +124,7 @@ // __strong__ // allow one nested instance of italic text using the same delimiter - pattern: createInline(/__(?:|_(?:)+_)+__/.source, true), + pattern: createInline(/__(?:(?!_)|_(?:(?!_))+_)+__/.source, true), lookbehind: true, greedy: true, inside: { @@ -141,7 +141,7 @@ // _em_ // allow one nested instance of bold text using the same delimiter - pattern: createInline(/_(?:|__(?:)+__)+_/.source, true), + pattern: createInline(/_(?:(?!_)|__(?:(?!_))+__)+_/.source, true), lookbehind: true, greedy: true, inside: { @@ -156,9 +156,7 @@ 'strike': { // ~~strike through~~ // ~strike~ - - // extra _ is because the inner pattern intentionally doesn't include it because of bold and italic - pattern: createInline(/(~~?)(?:|_)+?\2/.source, false), + pattern: createInline(/(~~?)(?:(?!~))+?\2/.source, false), lookbehind: true, greedy: true, inside: { @@ -172,13 +170,21 @@ }, 'url': { // [example](http://example.com "Optional title") + // [example][id] // [example] [id] - pattern: /!?\[[^\]]+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)| ?\[[^\]\n]*\])/, + pattern: createInline(/!?\[(?:(?!\]))+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)| ?\[(?:(?!\]))+\])/.source, false), + lookbehind: true, + greedy: true, inside: { 'variable': { - pattern: /(!?\[)[^\]]+(?=\]$)/, + pattern: /(\[)[^\]]+(?=\]$)/, lookbehind: true }, + 'content': { + pattern: /(^!?\[)[^\]]+(?=\])/, + lookbehind: true, + inside: {} // see below + }, 'string': { pattern: /"(?:\\.|[^"\\])*"(?=\)$)/ } @@ -186,7 +192,7 @@ } }); - ['bold', 'italic', 'strike'].forEach(function (token) { + ['url', 'bold', 'italic', 'strike'].forEach(function (token) { ['url', 'bold', 'italic', 'strike'].forEach(function (inside) { if (token !== inside) { Prism.languages.markdown[token].inside.content.inside[inside] = Prism.languages.markdown[inside]; diff --git a/components/prism-markdown.min.js b/components/prism-markdown.min.js index fd5615fdf5..64693b9c40 100644 --- a/components/prism-markdown.min.js +++ b/components/prism-markdown.min.js @@ -1 +1 @@ -!function(s){function n(n,e){return n=n.replace(//g,"\\\\.|[^\\\\\\n\r_]|(?:\r?\n|\r)(?!\r?\n|\r)"),e&&(n=n+"|"+n.replace(/_/g,"\\*")),RegExp("((?:^|[^\\\\])(?:\\\\{2})*)(?:"+n+")")}s.languages.markdown=s.languages.extend("markup",{}),s.languages.insertBefore("markdown","prolog",{blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},code:[{pattern:/^(?: {4}|\t).+/m,alias:"keyword"},{pattern:/``.+?``|`[^`\n]+`/,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\r?\n|\r))[\s\S]+?(?=(?:\r?\n|\r)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\r?\n|\r)(?:==+|--+)/,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#+.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n("__(?:|_(?:)+_)+__",!0),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n("_(?:|__(?:)+__)+_",!0),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n("(~~?)(?:|_)+?\\2",!1),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},url:{pattern:/!?\[[^\]]+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)| ?\[[^\]\n]*\])/,inside:{variable:{pattern:/(!?\[)[^\]]+(?=\]$)/,lookbehind:!0},string:{pattern:/"(?:\\.|[^"\\])*"(?=\)$)/}}}}),["bold","italic","strike"].forEach(function(e){["url","bold","italic","strike"].forEach(function(n){e!==n&&(s.languages.markdown[e].inside.content.inside[n]=s.languages.markdown[n])})}),s.hooks.add("after-tokenize",function(n){"markdown"!==n.language&&"md"!==n.language||!function n(e){if(e&&"string"!=typeof e)for(var t=0,a=e.length;t/g,"(?:\\\\.|[^\\\\\\n\r]|(?:\r?\n|\r)(?!\r?\n|\r))"),e&&(n=n+"|"+n.replace(/_/g,"\\*")),RegExp("((?:^|[^\\\\])(?:\\\\{2})*)(?:"+n+")")}s.languages.markdown=s.languages.extend("markup",{}),s.languages.insertBefore("markdown","prolog",{blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},code:[{pattern:/^(?: {4}|\t).+/m,alias:"keyword"},{pattern:/``.+?``|`[^`\n]+`/,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\r?\n|\r))[\s\S]+?(?=(?:\r?\n|\r)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\r?\n|\r)(?:==+|--+)/,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#+.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n("__(?:(?!_)|_(?:(?!_))+_)+__",!0),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n("_(?:(?!_)|__(?:(?!_))+__)+_",!0),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n("(~~?)(?:(?!~))+?\\2",!1),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},url:{pattern:n('!?\\[(?:(?!\\]))+\\](?:\\([^\\s)]+(?:[\t ]+"(?:\\\\.|[^"\\\\])*")?\\)| ?\\[(?:(?!\\]))+\\])',!1),lookbehind:!0,greedy:!0,inside:{variable:{pattern:/(\[)[^\]]+(?=\]$)/,lookbehind:!0},content:{pattern:/(^!?\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},string:{pattern:/"(?:\\.|[^"\\])*"(?=\)$)/}}}}),["url","bold","italic","strike"].forEach(function(e){["url","bold","italic","strike"].forEach(function(n){e!==n&&(s.languages.markdown[e].inside.content.inside[n]=s.languages.markdown[n])})}),s.hooks.add("after-tokenize",function(n){"markdown"!==n.language&&"md"!==n.language||!function n(e){if(e&&"string"!=typeof e)for(var t=0,a=e.length;tFunctions with a single string parameter not using parentheses are not highl
    -
    - -

    Nesting of elements is not fully supported

    -
    [Link partially *italic* DOESN'T work](http://example.com)
    -_ [But link inside italic DOES work](http://example.com) _
    -
    -[Link partially **bold** DOESN'T work](http://example.com)
    -__ [But link inside bold DOES work](http://example.com) __
    - -
    - -

    Numbers with underscores

    diff --git a/tests/languages/markdown/bold_feature.test b/tests/languages/markdown/bold_feature.test index db915b9131..39217ab775 100644 --- a/tests/languages/markdown/bold_feature.test +++ b/tests/languages/markdown/bold_feature.test @@ -113,7 +113,11 @@ __foo[bar](baz)__ ["content", [ "foo", ["url", [ - "[bar](baz)" + "[", + ["content", [ + "bar" + ]], + "](baz)" ]] ]], ["punctuation", "__"] @@ -183,7 +187,11 @@ __foo[bar](baz)__ ["content", [ "foo", ["url", [ - "[bar](baz)" + "[", + ["content", [ + "bar" + ]], + "](baz)" ]] ]], ["punctuation", "**"] diff --git a/tests/languages/markdown/italic_feature.test b/tests/languages/markdown/italic_feature.test index fc9c6c858e..f090260853 100644 --- a/tests/languages/markdown/italic_feature.test +++ b/tests/languages/markdown/italic_feature.test @@ -113,7 +113,11 @@ _foo[bar](baz)_ ["content", [ "foo", ["url", [ - "[bar](baz)" + "[", + ["content", [ + "bar" + ]], + "](baz)" ]] ]], ["punctuation", "_"] @@ -183,7 +187,11 @@ _foo[bar](baz)_ ["content", [ "foo", ["url", [ - "[bar](baz)" + "[", + ["content", [ + "bar" + ]], + "](baz)" ]] ]], ["punctuation", "*"] diff --git a/tests/languages/markdown/strike_feature.test b/tests/languages/markdown/strike_feature.test index 414fb8bdc0..9cb9b70adf 100644 --- a/tests/languages/markdown/strike_feature.test +++ b/tests/languages/markdown/strike_feature.test @@ -113,7 +113,11 @@ bar~ ["content", [ "foo", ["url", [ - "[bar](baz)" + "[", + ["content", [ + "bar" + ]], + "](baz)" ]] ]], ["punctuation", "~"] @@ -183,7 +187,11 @@ bar~ ["content", [ "foo", ["url", [ - "[bar](baz)" + "[", + ["content", [ + "bar" + ]], + "](baz)" ]] ]], ["punctuation", "~~"] diff --git a/tests/languages/markdown/url_feature.test b/tests/languages/markdown/url_feature.test index ca8b9cff72..455009f0dd 100644 --- a/tests/languages/markdown/url_feature.test +++ b/tests/languages/markdown/url_feature.test @@ -1,25 +1,154 @@ [foo](http://prismjs.com) ![foo](http://prismjs.com "Foo\"bar") +[foo][bar] [foo] [bar] +[foo +bar](http://prismjs.com) + +[foo *bar* baz](http://prismjs.com) +[foo _bar_ baz](http://prismjs.com) +[foo **bar** baz](http://prismjs.com) +[foo __bar__ baz](http://prismjs.com) +[foo ~bar~ baz](http://prismjs.com) +[foo ~~bar~~ baz](http://prismjs.com) + ---------------------------------------------------- [ ["url", [ - "[foo](http://prismjs.com)" + "[", + ["content", [ + "foo" + ]], + "](http://prismjs.com)" ]], ["url", [ - "![foo](http://prismjs.com ", + "![", + ["content", [ + "foo" + ]], + "](http://prismjs.com ", ["string", "\"Foo\\\"bar\""], ")" ]], ["url", [ - "[foo] [", + "[", + ["content", [ + "foo" + ]], + "][", + ["variable", "bar"], + "]" + ]], + ["url", [ + "[", + ["content", [ + "foo" + ]], + "] [", ["variable", "bar"], "]" + ]], + ["url", [ + "[", + ["content", [ + "foo\r\nbar" + ]], + "](http://prismjs.com)" + ]], + ["url", [ + "[", + ["content", [ + "foo ", + ["italic", [ + ["punctuation", "*"], + ["content", [ + "bar" + ]], + ["punctuation", "*"] + ]], + " baz" + ]], + "](http://prismjs.com)" + ]], + ["url", [ + "[", + ["content", [ + "foo ", + ["italic", [ + ["punctuation", "_"], + ["content", [ + "bar" + ]], + ["punctuation", "_"] + ]], + " baz" + ]], + "](http://prismjs.com)" + ]], + ["url", [ + "[", + ["content", [ + "foo ", + ["bold", [ + ["punctuation", "**"], + ["content", [ + "bar" + ]], + ["punctuation", "**"] + ]], + " baz" + ]], + "](http://prismjs.com)" + ]], + ["url", [ + "[", + ["content", [ + "foo ", + ["bold", [ + ["punctuation", "__"], + ["content", [ + "bar" + ]], + ["punctuation", "__"] + ]], + " baz" + ]], + "](http://prismjs.com)" + ]], + ["url", [ + "[", + ["content", [ + "foo ", + ["strike", [ + ["punctuation", "~"], + ["content", [ + "bar" + ]], + ["punctuation", "~"] + ]], + " baz" + ]], + "](http://prismjs.com)" + ]], + ["url", [ + "[", + ["content", [ + "foo ", + ["strike", [ + ["punctuation", "~~"], + ["content", [ + "bar" + ]], + ["punctuation", "~~"] + ]], + " baz" + ]], + "](http://prismjs.com)" ]] ] ---------------------------------------------------- -Checks for URLs. \ No newline at end of file +Checks for URLs. From 7d0565915765fd1887029960c78a787dccfe80d6 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Mon, 15 Jul 2019 22:59:33 +0200 Subject: [PATCH 0311/1100] Fixed typo in Funky theme (#1960) The `.toke.variable` selector has been fixed to be `.token.variable`. --- themes/prism-funky.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/themes/prism-funky.css b/themes/prism-funky.css index 2eda0b00c1..55b32551e5 100644 --- a/themes/prism-funky.css +++ b/themes/prism-funky.css @@ -84,7 +84,7 @@ code[class*="language-"] { .token.entity, .token.url, .language-css .token.string, -.toke.variable, +.token.variable, .token.inserted { color: yellowgreen; } From bb84f98cc847c582b1484abbbae915fcbd03f5f5 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Mon, 15 Jul 2019 23:22:20 +0200 Subject: [PATCH 0312/1100] Added support for DNS zone files (#1961) This adds support for DNS zone files. The highlighting is quite simple as every type and class is highlighted as `keyword`. This is intentional as other token names (e.g. `class-name`, `function`, `builtin`, ...) are not highlighted by every theme resulting in large portions of unstyled text for some themes. --- components.js | 2 +- components.json | 5 + components/prism-dns-zone-file.js | 33 ++++ components/prism-dns-zone-file.min.js | 1 + examples/prism-dns-zone-file.html | 14 ++ plugins/autoloader/prism-autoloader.js | 1 + plugins/autoloader/prism-autoloader.min.js | 2 +- plugins/show-language/prism-show-language.js | 2 + .../show-language/prism-show-language.min.js | 2 +- .../dns-zone-file/class_feature.test | 17 ++ .../dns-zone-file/comment_feature.test | 11 ++ .../dns-zone-file/string_feature.test | 13 ++ .../languages/dns-zone-file/type_featrue.test | 155 ++++++++++++++++++ .../dns-zone-file/variable_feature.test | 14 ++ 14 files changed, 269 insertions(+), 3 deletions(-) create mode 100644 components/prism-dns-zone-file.js create mode 100644 components/prism-dns-zone-file.min.js create mode 100644 examples/prism-dns-zone-file.html create mode 100644 tests/languages/dns-zone-file/class_feature.test create mode 100644 tests/languages/dns-zone-file/comment_feature.test create mode 100644 tests/languages/dns-zone-file/string_feature.test create mode 100644 tests/languages/dns-zone-file/type_featrue.test create mode 100644 tests/languages/dns-zone-file/variable_feature.test diff --git a/components.js b/components.js index 53f3dee378..9f3e20de4d 100644 --- a/components.js +++ b/components.js @@ -1,2 +1,2 @@ -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default","peerDependencies":"markup"},"clike":{"title":"C-like","option":"default","overrideExampleHeader":true},"javascript":{"title":"JavaScript","require":"clike","peerDependencies":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"Augmented Backus–Naur form","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","peerDependencies":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"Backus–Naur form","alias":"rbnf","aliasTitles":{"rbnf":"Routing Backus–Naur form"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"Extended Backus–Naur form","owner":"RunDevelopment"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment"},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","peerDependencies":["css","coffeescript","erb","javascript","less","markdown","ruby","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"http":{"title":"HTTP","peerDependencies":["javascript","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"peerDependencies":["scala"],"owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","peerDependencies":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike"],"peerDependencies":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","peerDependencies":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","owner":"CupOfTea696"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"less":{"title":"Less","require":"css","owner":"Golmote"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","peerDependencies":["jsdoc"],"alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"nasm":{"title":"NASM","owner":"rbmj"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"cpp","peerDependencies":["c","cpp"],"overrideExampleHeader":true,"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"peerDependencies":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","peerDependencies":["c","cpp","fortran"],"owner":"Golmote"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"peerDependencies":["jsdoc","js-extras"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","peerDependencies":["actionscript","coffeescript","flow","javascript","typescript","vala"],"owner":"RunDevelopment"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sql":{"title":"SQL","owner":"multipetros"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","peerDependencies":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","alias":"ts","owner":"vkbansal"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","visual-basic"],"owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":"Line Highlight","line-numbers":{"title":"Line Numbers","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","after":["autolinker","data-uri-highlight"]},"autolinker":"Autolinker","wpd":"WebPlatform Docs","custom-class":{"title":"Custom Class","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","noCSS":true},"show-language":{"title":"Show Language","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","owner":"Golmote","noCSS":true},"previewers":{"title":"Previewers","owner":"Golmote"},"autoloader":{"title":"Autoloader","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","owner":"Golmote","after":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","owner":"chriswells0"},"unescaped-markup":"Unescaped Markup","normalize-whitespace":{"title":"Normalize Whitespace","owner":"zeitgeist87","after":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","owner":"mAAdhaTTah","require":"toolbar","noCSS":true}}}; +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default","peerDependencies":"markup"},"clike":{"title":"C-like","option":"default","overrideExampleHeader":true},"javascript":{"title":"JavaScript","require":"clike","peerDependencies":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"Augmented Backus–Naur form","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","peerDependencies":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"Backus–Naur form","alias":"rbnf","aliasTitles":{"rbnf":"Routing Backus–Naur form"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"Extended Backus–Naur form","owner":"RunDevelopment"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment"},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","peerDependencies":["css","coffeescript","erb","javascript","less","markdown","ruby","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"http":{"title":"HTTP","peerDependencies":["javascript","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"peerDependencies":["scala"],"owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","peerDependencies":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike"],"peerDependencies":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","peerDependencies":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","owner":"CupOfTea696"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"less":{"title":"Less","require":"css","owner":"Golmote"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","peerDependencies":["jsdoc"],"alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"nasm":{"title":"NASM","owner":"rbmj"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"cpp","peerDependencies":["c","cpp"],"overrideExampleHeader":true,"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"peerDependencies":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","peerDependencies":["c","cpp","fortran"],"owner":"Golmote"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"peerDependencies":["jsdoc","js-extras"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","peerDependencies":["actionscript","coffeescript","flow","javascript","typescript","vala"],"owner":"RunDevelopment"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sql":{"title":"SQL","owner":"multipetros"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","peerDependencies":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","alias":"ts","owner":"vkbansal"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","visual-basic"],"owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":"Line Highlight","line-numbers":{"title":"Line Numbers","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","after":["autolinker","data-uri-highlight"]},"autolinker":"Autolinker","wpd":"WebPlatform Docs","custom-class":{"title":"Custom Class","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","noCSS":true},"show-language":{"title":"Show Language","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","owner":"Golmote","noCSS":true},"previewers":{"title":"Previewers","owner":"Golmote"},"autoloader":{"title":"Autoloader","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","owner":"Golmote","after":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","owner":"chriswells0"},"unescaped-markup":"Unescaped Markup","normalize-whitespace":{"title":"Normalize Whitespace","owner":"zeitgeist87","after":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","owner":"mAAdhaTTah","require":"toolbar","noCSS":true}}}; if (typeof module !== 'undefined' && module.exports) { module.exports = components; } \ No newline at end of file diff --git a/components.json b/components.json index 22cfbc0df5..f78a1c1a76 100644 --- a/components.json +++ b/components.json @@ -240,6 +240,11 @@ "alias": "jinja2", "owner": "romanvm" }, + "dns-zone-file": { + "title": "DNS zone file", + "owner": "RunDevelopment", + "alias": "dns-zone" + }, "docker": { "title": "Docker", "alias": "dockerfile", diff --git a/components/prism-dns-zone-file.js b/components/prism-dns-zone-file.js new file mode 100644 index 0000000000..e2518ca320 --- /dev/null +++ b/components/prism-dns-zone-file.js @@ -0,0 +1,33 @@ +Prism.languages['dns-zone-file'] = { + 'comment': /;.*/, + 'string': { + pattern: /"(?:\\.|[^"\\\r\n])*"/, + greedy: true + }, + 'variable': [ + { + pattern: /(^\$ORIGIN[ \t]+)\S+/m, + lookbehind: true, + }, + { + pattern: /(^|\s)@(?=\s|$)/, + lookbehind: true, + } + ], + 'keyword': /^\$(?:ORIGIN|INCLUDE|TTL)(?=\s|$)/m, + 'class': { + // https://tools.ietf.org/html/rfc1035#page-13 + pattern: /(^|\s)(?:IN|CH|CS|HS)(?=\s|$)/, + lookbehind: true, + alias: 'keyword' + }, + 'type': { + // https://en.wikipedia.org/wiki/List_of_DNS_record_types + pattern: /(^|\s)(?:A|A6|AAAA|AFSDB|APL|ATMA|CAA|CDNSKEY|CDS|CERT|CNAME|DHCID|DLV|DNAME|DNSKEY|DS|EID|GID|GPOS|HINFO|HIP|IPSECKEY|ISDN|KEY|KX|LOC|MAILA|MAILB|MB|MD|MF|MG|MINFO|MR|MX|NAPTR|NB|NBSTAT|NIMLOC|NINFO|NS|NSAP|NSAP-PTR|NSEC|NSEC3|NSEC3PARAM|NULL|NXT|OPENPGPKEY|PTR|PX|RKEY|RP|RRSIG|RT|SIG|SINK|SMIMEA|SOA|SPF|SRV|SSHFP|TA|TKEY|TLSA|TSIG|TXT|UID|UINFO|UNSPEC|URI|WKS|X25)(?=\s|$)/, + lookbehind: true, + alias: 'keyword' + }, + 'punctuation': /[()]/ +}; + +Prism.languages['dns-zone'] = Prism.languages['dns-zone-file'] diff --git a/components/prism-dns-zone-file.min.js b/components/prism-dns-zone-file.min.js new file mode 100644 index 0000000000..434c1f699f --- /dev/null +++ b/components/prism-dns-zone-file.min.js @@ -0,0 +1 @@ +Prism.languages["dns-zone-file"]={comment:/;.*/,string:{pattern:/"(?:\\.|[^"\\\r\n])*"/,greedy:!0},variable:[{pattern:/(^\$ORIGIN[ \t]+)\S+/m,lookbehind:!0},{pattern:/(^|\s)@(?=\s|$)/,lookbehind:!0}],keyword:/^\$(?:ORIGIN|INCLUDE|TTL)(?=\s|$)/m,class:{pattern:/(^|\s)(?:IN|CH|CS|HS)(?=\s|$)/,lookbehind:!0,alias:"keyword"},type:{pattern:/(^|\s)(?:A|A6|AAAA|AFSDB|APL|ATMA|CAA|CDNSKEY|CDS|CERT|CNAME|DHCID|DLV|DNAME|DNSKEY|DS|EID|GID|GPOS|HINFO|HIP|IPSECKEY|ISDN|KEY|KX|LOC|MAILA|MAILB|MB|MD|MF|MG|MINFO|MR|MX|NAPTR|NB|NBSTAT|NIMLOC|NINFO|NS|NSAP|NSAP-PTR|NSEC|NSEC3|NSEC3PARAM|NULL|NXT|OPENPGPKEY|PTR|PX|RKEY|RP|RRSIG|RT|SIG|SINK|SMIMEA|SOA|SPF|SRV|SSHFP|TA|TKEY|TLSA|TSIG|TXT|UID|UINFO|UNSPEC|URI|WKS|X25)(?=\s|$)/,lookbehind:!0,alias:"keyword"},punctuation:/[()]/},Prism.languages["dns-zone"]=Prism.languages["dns-zone-file"]; \ No newline at end of file diff --git a/examples/prism-dns-zone-file.html b/examples/prism-dns-zone-file.html new file mode 100644 index 0000000000..00f5a04322 --- /dev/null +++ b/examples/prism-dns-zone-file.html @@ -0,0 +1,14 @@ +

    Full example

    +
    $TTL 3d
    +@ IN SOA root.localhost. root.sneaky.net. (
    +    2015050503 ; serial
    +    12h        ; refresh
    +    15m        ; retry
    +    3w         ; expire
    +    3h         ; negative response TTL
    +  )
    +  IN NS root.localhost.
    +  IN NS localhost. ; secondary name server is preferably externally maintained
    +
    +www IN A 3.141.59.26
    +ww1 IN CNAME www
    diff --git a/plugins/autoloader/prism-autoloader.js b/plugins/autoloader/prism-autoloader.js index 185e2406f5..3a85fc16b0 100644 --- a/plugins/autoloader/prism-autoloader.js +++ b/plugins/autoloader/prism-autoloader.js @@ -133,6 +133,7 @@ "dotnet": "csharp", "coffee": "coffeescript", "jinja2": "django", + "dns-zone": "dns-zone-file", "dockerfile": "docker", "gamemakerlanguage": "gml", "hs": "haskell", diff --git a/plugins/autoloader/prism-autoloader.min.js b/plugins/autoloader/prism-autoloader.min.js index 4aac440bf7..28fd865cf0 100644 --- a/plugins/autoloader/prism-autoloader.min.js +++ b/plugins/autoloader/prism-autoloader.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof self&&self.Prism&&self.document&&document.createElement){var r={javascript:"clike",actionscript:"javascript",arduino:"cpp",aspnet:["markup","csharp"],bison:"c",c:"clike",csharp:"clike",cpp:"c",coffeescript:"javascript",crystal:"ruby","css-extras":"css",d:"clike",dart:"clike",django:"markup-templating",ejs:["javascript","markup-templating"],erb:["ruby","markup-templating"],fsharp:"clike",flow:"javascript",glsl:"clike",gml:"clike",go:"clike",groovy:"clike",haml:"ruby",handlebars:"markup-templating",haxe:"clike",java:"clike",javadoc:["markup","java","javadoclike"],jolie:"clike",jsdoc:["javascript","javadoclike"],"js-extras":"javascript",jsonp:"json",json5:"json",kotlin:"clike",less:"css",markdown:"markup","markup-templating":"markup",n4js:"javascript",nginx:"clike",objectivec:"c",opencl:"cpp",parser:"markup",php:["clike","markup-templating"],phpdoc:["php","javadoclike"],"php-extras":"php",plsql:"sql",processing:"clike",protobuf:"clike",pug:["markup","javascript"],qore:"clike",jsx:["markup","javascript"],tsx:["jsx","typescript"],reason:"clike",ruby:"clike",sass:"css",scss:"css",scala:"java","shell-session":"bash",smarty:"markup-templating",soy:"markup-templating",swift:"clike",tap:"yaml",textile:"markup",tt2:["clike","markup-templating"],twig:"markup",typescript:"javascript","t4-cs":["t4-templating","csharp"],"t4-vb":["t4-templating","visual-basic"],vala:"clike",vbnet:"basic",velocity:"markup",wiki:"markup",xeora:"markup",xquery:"markup"},n={html:"markup",xml:"markup",svg:"markup",mathml:"markup",js:"javascript",adoc:"asciidoc",shell:"bash",rbnf:"bnf",cs:"csharp",dotnet:"csharp",coffee:"coffeescript",jinja2:"django",dockerfile:"docker",gamemakerlanguage:"gml",hs:"haskell",tex:"latex",context:"latex",emacs:"lisp",elisp:"lisp","emacs-lisp":"lisp",md:"markdown",n4jsd:"n4js",objectpascal:"pascal",px:"pcaxis",py:"python",rb:"ruby",ts:"typescript",t4:"t4-cs",vb:"visual-basic",xeoracube:"xeora",yml:"yaml"},l={},a=document.getElementsByTagName("script"),e="components/";if((a=a[a.length-1]).hasAttribute("data-autoloader-path")){var t=a.getAttribute("data-autoloader-path").trim();0 Date: Tue, 16 Jul 2019 18:39:45 +0900 Subject: [PATCH 0313/1100] Update footer's GitHub repository URL and capitalisation of "GitHub" (#1983) This updates the Prism repository linked to in the footer and corrects the capitalization of the name "GitHub". --- templates/footer.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/footer.html b/templates/footer.html index b0e306a505..98be749aa7 100644 --- a/templates/footer.html +++ b/templates/footer.html @@ -9,7 +9,7 @@
  • FAQ
  • Test drive
  • API docs
  • -
  • Fork Prism on Github
  • +
  • Fork Prism on GitHub
  • Follow Prism on Twitter
  • From 0dd44d539381c0dc85f289d28bf8658a1439111f Mon Sep 17 00:00:00 2001 From: ExE Boss <3889017+ExE-Boss@users.noreply.github.com> Date: Wed, 17 Jul 2019 21:22:24 +0200 Subject: [PATCH 0314/1100] gulp: Use `async` functions & drop testing on Node v6 (#1783) This refactors the `gulpfile.js` to use async/await for clearer code. It also drops testing for all NodeJS versions before NodeJS v8 because they don't support async/await. --- .travis.yml | 1 - gulpfile.js | 181 ++++++++++++++++++++++++++-------------------------- 2 files changed, 92 insertions(+), 90 deletions(-) diff --git a/.travis.yml b/.travis.yml index 47adfc5fc7..8dbeab59c8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,5 @@ language: node_js node_js: -- '6' - '8' - '10' - 'node' diff --git a/gulpfile.js b/gulpfile.js index 0c6f8a2333..9c09a766eb 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -6,6 +6,7 @@ const header = require('gulp-header'); const concat = require('gulp-concat'); const replace = require('gulp-replace'); const pump = require('pump'); +const util = require('util'); const fs = require('fs'); const simpleGit = require('simple-git'); const shelljs = require('shelljs'); @@ -79,12 +80,11 @@ function build(cb) { `), concat('prism.js'), dest('./')], cb); } -function componentsJsonToJs(cb) { - componentsPromise.then(data => { - const js = `var components = ${JSON.stringify(data)}; +async function componentsJsonToJs() { + const data = await componentsPromise; + const js = `var components = ${JSON.stringify(data)}; if (typeof module !== 'undefined' && module.exports) { module.exports = components; }`; - fs.writeFile(paths.componentsFileJS, js, cb); - }); + return util.promisify(fs.writeFile)(paths.componentsFileJS, js); } function watchComponentsAndPlugins() { @@ -92,102 +92,105 @@ function watchComponentsAndPlugins() { watch(paths.plugins, parallel(minifyPlugins, build)); } -function languagePlugins(cb) { - componentsPromise.then(data => { - const languagesMap = {}; - const dependenciesMap = {}; - const aliasMap = {}; - - /** - * Tries to guess the name of a language given its id. - * - * From `prism-show-language.js`. - * - * @param {string} id The language id. - * @returns {string} - */ - function guessTitle(id) { - if (!id) { - return id; - } - return (id.substring(0, 1).toUpperCase() + id.substring(1)).replace(/s(?=cript)/, 'S'); +async function languagePlugins() { + const data = await componentsPromise; + const languagesMap = {}; + const dependenciesMap = {}; + const aliasMap = {}; + + /** + * Tries to guess the name of a language given its id. + * + * From `prism-show-language.js`. + * + * @param {string} id The language id. + * @returns {string} + */ + function guessTitle(id) { + if (!id) { + return id; } - - function addLanguageTitle(key, title) { - if (!languagesMap[key] && guessTitle(key) !== title) { - languagesMap[key] = title; - } + return (id.substring(0, 1).toUpperCase() + id.substring(1)).replace(/s(?=cript)/, 'S'); + } + + /** + * @param {string} key + * @param {string} title + */ + function addLanguageTitle(key, title) { + if (!languagesMap[key] && guessTitle(key) !== title) { + languagesMap[key] = title; } + } - for (const id in data.languages) { - if (id !== 'meta') { - const language = data.languages[id]; - const title = language.displayTitle || language.title; + for (const id in data.languages) { + if (id !== 'meta') { + const language = data.languages[id]; + const title = language.displayTitle || language.title; - addLanguageTitle(id, title); + addLanguageTitle(id, title); - for (const name in language.aliasTitles) { - addLanguageTitle(name, language.aliasTitles[name]); - } + for (const name in language.aliasTitles) { + addLanguageTitle(name, language.aliasTitles[name]); + } - if (language.alias) { - if (typeof language.alias === 'string') { - aliasMap[language.alias] = id; - addLanguageTitle(language.alias, title); - } else { - language.alias.forEach(function (alias) { - aliasMap[alias] = id; - addLanguageTitle(alias, title); - }); - } + if (language.alias) { + if (typeof language.alias === 'string') { + aliasMap[language.alias] = id; + addLanguageTitle(language.alias, title); + } else { + language.alias.forEach(function (alias) { + aliasMap[alias] = id; + addLanguageTitle(alias, title); + }); } + } - if (language.require) { - dependenciesMap[id] = language.require; - } + if (language.require) { + dependenciesMap[id] = language.require; } } - - function formattedStringify(json) { - return JSON.stringify(json, null, '\t').replace(/\n/g, '\n\t'); + } + + function formattedStringify(json) { + return JSON.stringify(json, null, '\t').replace(/\n/g, '\n\t'); + } + + const jsonLanguagesMap = formattedStringify(languagesMap); + const jsonDependenciesMap = formattedStringify(dependenciesMap); + const jsonAliasMap = formattedStringify(aliasMap); + + const tasks = [ + { + plugin: paths.showLanguagePlugin, + maps: { languages: jsonLanguagesMap} + }, + { + plugin: paths.autoloaderPlugin, + maps: { aliases: jsonAliasMap, dependencies: jsonDependenciesMap } } + ]; - const jsonLanguagesMap = formattedStringify(languagesMap); - const jsonDependenciesMap = formattedStringify(dependenciesMap); - const jsonAliasMap = formattedStringify(aliasMap); - - const tasks = [ - { - plugin: paths.showLanguagePlugin, - maps: { languages: jsonLanguagesMap} - }, - { - plugin: paths.autoloaderPlugin, - maps: { aliases: jsonAliasMap, dependencies: jsonDependenciesMap } - } - ]; - - let cpt = 0; - const l = tasks.length; - const done = () => { - cpt++; - if (cpt === l) { - cb && cb(); - } - }; - - for (const task of tasks) { - const stream = src(task.plugin) - .pipe(replace( - /\/\*(\w+)_placeholder\[\*\/[\s\S]*?\/\*\]\*\//g, - (m, mapName) => `/*${mapName}_placeholder[*/${task.maps[mapName]}/*]*/` - )) - .pipe(dest(task.plugin.substring(0, task.plugin.lastIndexOf('/')))); - - stream.on('error', done); - stream.on('end', done); - } - }); + // TODO: Use `Promise.allSettled` (https://github.com/tc39/proposal-promise-allSettled) + const taskResults = await Promise.all(tasks.map(task => new Promise((resolve, reject) => { + const stream = src(task.plugin) + .pipe(replace( + /\/\*(\w+)_placeholder\[\*\/[\s\S]*?\/\*\]\*\//g, + (m, mapName) => `/*${mapName}_placeholder[*/${task.maps[mapName]}/*]*/` + )) + .pipe(dest(task.plugin.substring(0, task.plugin.lastIndexOf('/')))); + + stream.on('error', reject); + stream.on('end', resolve); + }).then( + /** @type {(value: T) => {status: 'fulfilled', value: T}} */ value => ({status: 'fulfilled', value}), + /** @type {(error: T) => {status: 'rejected', reason: T}} */ error => ({status: 'rejected', reason: error}), + ))); + + const rejectedTasks = taskResults.filter(/** @return {r is {status: 'rejected', reason: any}} */ r => r.status === 'rejected'); + if (rejectedTasks.length > 0) { + throw rejectedTasks.map(r => r.reason); + } } const ISSUE_RE = /#(\d+)(?![\d\]])/g; From 033c5ad868e33e9f655dfc6c3934774cefbefb6e Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Fri, 19 Jul 2019 16:20:45 +0200 Subject: [PATCH 0315/1100] gulp: Split gulpfile.js and expanded `changes` task (#1835) This splits the `gulpfile.js` files into multiple files and expands the `changes` tasks to generate a commit-based changelog. --- gulpfile.js/changelog.js | 381 ++++++++++++++++++++++++++++ gulpfile.js => gulpfile.js/index.js | 139 +++------- gulpfile.js/paths.js | 19 ++ gulpfile.js/premerge.js | 18 ++ package-lock.json | 11 - package.json | 1 - 6 files changed, 450 insertions(+), 119 deletions(-) create mode 100644 gulpfile.js/changelog.js rename gulpfile.js => gulpfile.js/index.js (58%) create mode 100644 gulpfile.js/paths.js create mode 100644 gulpfile.js/premerge.js diff --git a/gulpfile.js/changelog.js b/gulpfile.js/changelog.js new file mode 100644 index 0000000000..1fb9fe12c9 --- /dev/null +++ b/gulpfile.js/changelog.js @@ -0,0 +1,381 @@ +"use strict"; + +const { src, dest } = require('gulp'); + +const replace = require('gulp-replace'); +const pump = require('pump'); +const git = require('simple-git/promise')(__dirname); + +const { changelog } = require('./paths'); + + +const ISSUE_RE = /#(\d+)(?![\d\]])/g; +const ISSUE_SUB = '[#$1](https://github.com/PrismJS/prism/issues/$1)'; + +function linkify(cb) { + return pump([ + src(changelog), + replace(ISSUE_RE, ISSUE_SUB), + replace( + /\[[\da-f]+(?:, *[\da-f]+)*\]/g, + m => m.replace(/([\da-f]{7})[\da-f]*/g, '[`$1`](https://github.com/PrismJS/prism/commit/$1)') + ), + dest('.') + ], cb); +} + +/** + * Creates an array which iterates its items in the order given by `compareFn`. + * + * The array may not be sorted at all times. + * + * @param {(a: T, b: T) => number} compareFn + * @returns {T[]} + * @template T + */ +function createSortedArray(compareFn) { + /** @type {T[]} */ + const a = []; + + a['sort'] = function () { + return Array.prototype.sort.call(this, compareFn); + }; + a[Symbol.iterator] = function () { + return this.slice().sort(compareFn)[Symbol.iterator](); + }; + + return a; +} + +/** + * Parses the given log line and adds the list of the changed files to the output. + * + * @param {string} line A one-liner log line consisting of the commit hash and the commit message. + * @returns {Promise} + * + * @typedef {{ message: string, hash: string, changes: CommitChange[] }} CommitInfo + * @typedef {{ file: string, mode: ChangeMode }} CommitChange + * @typedef {"A" | "C" | "D" | "M" | "R" | "T" | "U" | "X" | "B"} ChangeMode + */ +async function getCommitInfo(line) { + const [, hash, message] = /^([a-f\d]+)\s+(.*)$/i.exec(line); + + /* The output looks like this: + * + * M components.js + * M components.json + * + * or nothing for e.g. reverts. + */ + const output = await git.raw(['diff-tree', '--no-commit-id', '--name-status', '-r', hash]); + + const changes = !output ? [] : output.trim().split(/\n/g).map(line => { + const [, mode, file] = /(\w)\s+(.+)/.exec(line); + return { mode: /** @type {ChangeMode} */ (mode), file }; + }); + + return { hash, message, changes }; +} + +/** + * Parses the output of `git log` with the given revision range. + * + * @param {string | Promise} range The revision range in which the log will be parsed. + * @returns {Promise} + */ +async function getLog(range) { + /* The output looks like this: + * + * bfbe4464 Invoke `callback` after `after-highlight` hook (#1588) + * b41fb8f1 Fixes regex for JS examples (#1591) + */ + const output = await git.raw(['log', await Promise.resolve(range), '--oneline']); + + if (output) { + const commits = output.trim().split(/\n/g); + return Promise.all(commits.map(getCommitInfo)); + } else { + return []; + } +} + +const revisionRanges = { + nextRelease: git.raw(['describe', '--abbrev=0', '--tags']).then(res => `${res.trim()}..HEAD`) +}; +const strCompare = (a, b) => a.localeCompare(b, 'en'); + +async function changes() { + const { languages, plugins } = require('../components'); + + const infos = await getLog(revisionRanges.nextRelease); + + const entries = { + 'TODO:': {}, + 'New components': { + ['']: createSortedArray(strCompare) + }, + 'Updated components': {}, + 'Updated plugins': {}, + 'Updated themes': {}, + 'Other': {}, + }; + /** + * + * @param {string} category + * @param {string | { message: string, hash: string }} info + */ + function addEntry(category, info) { + const path = category.split(/\s*>>\s*/g); + if (path[path.length - 1] !== '') { + path.push(''); + } + + let current = entries; + for (const key of path) { + if (key) { + current = current[key] = current[key] || {}; + } else { + (current[key] = current[key] || []).push(info); + } + } + } + + + /** @param {CommitChange} change */ + function notGenerated(change) { + return !change.file.endsWith('.min.js') && ['prism.js', 'components.js', 'package-lock.json'].indexOf(change.file) === -1; + } + /** @param {CommitChange} change */ + function notPartlyGenerated(change) { + return change.file !== 'plugins/autoloader/prism-autoloader.js' && + change.file !== 'plugins/show-language/prism-show-language.js'; + } + /** @param {CommitChange} change */ + function notTests(change) { + return !/^tests\//.test(change.file); + } + /** @param {CommitChange} change */ + function notExamples(change) { + return !/^examples\//.test(change.file); + } + /** @param {CommitChange} change */ + function notFailures(change) { + return !/^known-failures.html$/.test(change.file); + } + /** @param {CommitChange} change */ + function notComponentsJSON(change) { + return change.file !== 'components.json'; + } + + /** + * @param {((e: T, index: number) => boolean)[]} filters + * @returns {(e: T, index: number) => boolean} + * @template T + */ + function and(...filters) { + return (e, index) => { + for (let i = 0, l = filters.length; i < l; i++) { + if (!filters[i](e, index)) { + return false; + } + } + return true; + }; + } + + /** + * Some commit message have the format `component changed: actual message`. + * This function can be used to remove this prefix. + * + * @param {string} prefix + * @param {CommitInfo} info + * @returns {{ message: string, hash: string }} + */ + function removeMessagePrefix(prefix, info) { + const source = String.raw`^${prefix.replace(/([^-\w\s])/g, '\\$1').replace(/[-\s]/g, '[-\\s]')}:\s*`; + const patter = RegExp(source, 'i'); + return { + message: info.message.replace(patter, ''), + hash: info.hash + }; + } + + + /** + * @type {((info: CommitInfo) => boolean)[]} + */ + const commitSorters = [ + + function rebuild(info) { + if (info.changes.length > 0 && info.changes.filter(notGenerated).length === 0) { + console.log('Rebuild found: ' + info.message); + return true; + } + }, + + function addedComponent(info) { + let relevantChanges = info.changes.filter(and(notGenerated, notTests, notExamples, notFailures)); + + // `components.json` has to be modified + if (relevantChanges.some(c => c.file === 'components.json')) { + relevantChanges = relevantChanges.filter(and(notComponentsJSON, notPartlyGenerated)); + + // now, only the newly added JS should be left + if (relevantChanges.length === 1) { + const change = relevantChanges[0]; + if (change.mode === 'A' && change.file.startsWith('components/prism-')) { + const lang = change.file.match(/prism-([\w-]+)\.js$/)[1]; + const titles = [languages[lang].title]; + if (languages[lang].aliasTitles) { + titles.push(...Object.values(languages[lang].aliasTitles)); + } + addEntry('New components', `__${titles.join('__ & __')}__: ${infoToString(info)}`); + return true; + } + } + } + }, + + function changedComponentOrCore(info) { + let relevantChanges = info.changes.filter(and(notGenerated, notTests, notExamples, notFailures)); + + // if `components.json` changed, then autoloader and show-language also change + if (relevantChanges.some(c => c.file === 'components.json')) { + relevantChanges = relevantChanges.filter(and(notComponentsJSON, notPartlyGenerated)); + } + + if (relevantChanges.length === 1) { + const change = relevantChanges[0]; + if (change.mode === 'M' && change.file.startsWith('components/prism-')) { + const lang = change.file.match(/prism-([\w-]+)\.js$/)[1]; + if (lang === 'core') { + addEntry('Other >> Core', removeMessagePrefix('Core', info)); + } else { + const title = languages[lang].title; + addEntry('Updated components >> ' + title, removeMessagePrefix(title, info)); + } + return true; + } + } + }, + + function changedPlugin(info) { + let relevantChanges = info.changes.filter(and(notGenerated, notTests, notExamples, c => !/\.(?:html|css)$/.test(c.file))); + + if (relevantChanges.length > 0 && + relevantChanges.every(c => c.mode === 'M' && /^plugins\/.*\.js$/.test(c.file))) { + + if (relevantChanges.length === 1) { + const change = relevantChanges[0]; + const id = change.file.match(/\/prism-([\w-]+)\.js/)[1]; + const title = plugins[id].title || plugins[id]; + addEntry('Updated plugins >> ' + title, removeMessagePrefix(title, info)); + } else { + addEntry('Updated plugins', info); + } + return true; + } + }, + + function changedTheme(info) { + if (info.changes.length > 0 && info.changes.every(c => { + return /themes\/.*\.css/.test(c.file) && c.mode === 'M'; + })) { + if (info.changes.length === 1) { + const change = info.changes[0]; + let name = (change.file.match(/prism-(\w+)\.css$/) || [, 'Default'])[1]; + name = name[0].toUpperCase() + name.substr(1); + addEntry('Updated themes >> ' + name, removeMessagePrefix(name, info)); + } else { + addEntry('Updated themes', info); + } + return true; + } + }, + + function changedInfrastructure(info) { + if (info.changes.length > 0 && info.changes.every(c => { + if (c.file.startsWith('gulpfile.js')) { + return true; + } + if (/^\.[\w.]+$/.test(c.file)) { + return true; + } + return ['CNAME', 'composer.json', 'package.json', 'package-lock.json'].indexOf(c.file) >= 0; + })) { + addEntry('Other >> Infrastructure', info); + return true; + } + }, + + function changedWebsite(info) { + if (info.changes.length > 0 && info.changes.every(c => { + if (/[\w-]+\.(?:html|svg)$/.test(c.file)) { + return true; + } + if (/^scripts(?:\/[\w-]+)*\/[\w-]+\.js$/.test(c.file)) { + return true; + } + return ['style.css'].indexOf(c.file) >= 0; + })) { + addEntry('Other >> Website', info); + return true; + } + }, + + function otherChanges(info) { + // detect changes of the Github setup + // This assumes that .md files are related to GitHub + if (info.changes.length > 0 && info.changes.every(c => /\.md$/i.test(c.file))) { + addEntry('Other', info); + return true; + } + }, + + ]; + + for (const info of infos) { + if (!commitSorters.some(sorter => sorter(info))) { + addEntry('TODO:', info); + } + } + + + /** + * Stringifies the given commit info. + * + * @param {string | CommitInfo} info + * @returns {string} + */ + function infoToString(info) { + if (typeof info === 'string') { + return info; + } + return `${info.message} [\`${info.hash}\`](https://github.com/PrismJS/prism/commit/${info.hash})`; + } + function printCategory(category, indentation = '') { + for (const subCategory of Object.keys(category).sort(strCompare)) { + if (subCategory) { + md += `${indentation}* __${subCategory}__\n`; + printCategory(category[subCategory], indentation + ' ') + } else { + for (const info of category['']) { + md += `${indentation}* ${infoToString(info)}\n`; + } + } + } + } + + let md = ''; + for (const category of Object.keys(entries)) { + md += `\n### ${category}\n\n`; + printCategory(entries[category]); + } + console.log(md); +} + + +module.exports = { + linkify, + changes +}; diff --git a/gulpfile.js b/gulpfile.js/index.js similarity index 58% rename from gulpfile.js rename to gulpfile.js/index.js index 9c09a766eb..14e8a19dc3 100644 --- a/gulpfile.js +++ b/gulpfile.js/index.js @@ -1,3 +1,5 @@ +"use strict"; + const { src, dest, series, parallel, watch } = require('gulp'); const rename = require('gulp-rename'); @@ -8,26 +10,11 @@ const replace = require('gulp-replace'); const pump = require('pump'); const util = require('util'); const fs = require('fs'); -const simpleGit = require('simple-git'); -const shelljs = require('shelljs'); -const paths = { - componentsFile: 'components.json', - componentsFileJS: 'components.js', - components: ['components/**/*.js', '!components/index.js', '!components/**/*.min.js'], - main: [ - 'components/prism-core.js', - 'components/prism-markup.js', - 'components/prism-css.js', - 'components/prism-clike.js', - 'components/prism-javascript.js', - 'plugins/file-highlight/prism-file-highlight.js' - ], - plugins: ['plugins/**/*.js', '!plugins/**/*.min.js'], - showLanguagePlugin: 'plugins/show-language/prism-show-language.js', - autoloaderPlugin: 'plugins/autoloader/prism-autoloader.js', - changelog: 'CHANGELOG.md' -}; +const paths = require('./paths'); +const { premerge } = require('./premerge'); +const { changes, linkify } = require('./changelog'); + const componentsPromise = new Promise((resolve, reject) => { fs.readFile(paths.componentsFile, { @@ -163,7 +150,7 @@ async function languagePlugins() { const tasks = [ { plugin: paths.showLanguagePlugin, - maps: { languages: jsonLanguagesMap} + maps: { languages: jsonLanguagesMap } }, { plugin: paths.autoloaderPlugin, @@ -172,20 +159,24 @@ async function languagePlugins() { ]; // TODO: Use `Promise.allSettled` (https://github.com/tc39/proposal-promise-allSettled) - const taskResults = await Promise.all(tasks.map(task => new Promise((resolve, reject) => { - const stream = src(task.plugin) - .pipe(replace( - /\/\*(\w+)_placeholder\[\*\/[\s\S]*?\/\*\]\*\//g, - (m, mapName) => `/*${mapName}_placeholder[*/${task.maps[mapName]}/*]*/` - )) - .pipe(dest(task.plugin.substring(0, task.plugin.lastIndexOf('/')))); - - stream.on('error', reject); - stream.on('end', resolve); - }).then( - /** @type {(value: T) => {status: 'fulfilled', value: T}} */ value => ({status: 'fulfilled', value}), - /** @type {(error: T) => {status: 'rejected', reason: T}} */ error => ({status: 'rejected', reason: error}), - ))); + const taskResults = await Promise.all(tasks.map(async task => { + try { + const value = await new Promise((resolve, reject) => { + const stream = src(task.plugin) + .pipe(replace( + /\/\*(\w+)_placeholder\[\*\/[\s\S]*?\/\*\]\*\//g, + (m, mapName) => `/*${mapName}_placeholder[*/${task.maps[mapName]}/*]*/` + )) + .pipe(dest(task.plugin.substring(0, task.plugin.lastIndexOf('/')))); + + stream.on('error', reject); + stream.on('end', resolve); + }); + return { status: 'fulfilled', value }; + } catch (error) { + return { status: 'rejected', reason: error }; + } + })); const rejectedTasks = taskResults.filter(/** @return {r is {status: 'rejected', reason: any}} */ r => r.status === 'rejected'); if (rejectedTasks.length > 0) { @@ -193,80 +184,14 @@ async function languagePlugins() { } } -const ISSUE_RE = /#(\d+)(?![\d\]])/g; -const ISSUE_SUB = '[#$1](https://github.com/PrismJS/prism/issues/$1)'; - -function linkify(cb) { - return pump([ - src(paths.changelog), - replace(ISSUE_RE, ISSUE_SUB), - replace( - /\[[\da-f]+(?:, *[\da-f]+)*\]/g, - m => m.replace(/([\da-f]{7})[\da-f]*/g, '[`$1`](https://github.com/PrismJS/prism/commit/$1)') - ), - dest('.') - ], cb); -} - -const COMMIT_RE = /^([\da-z]{8})\s(.*)/; - -function changes(cb) { - const tag = shelljs.exec('git describe --abbrev=0 --tags', { silent: true }).stdout; - const commits = shelljs - .exec( - `git log ${tag.trim()}..HEAD --oneline`, - { silent: true } - ) - .stdout.split('\n') - .map(line => line.trim()) - .filter(line => line !== '') - .map(line => { - const [,hash, msg] = COMMIT_RE.exec(line); - return `* ${msg.replace(ISSUE_RE, ISSUE_SUB)} [\`${hash}\`](https://github.com/PrismJS/prism/commit/${hash})` - }) - .join('\n'); - - const changes = `## Unreleased - -${commits} - -### New components - -### Updated components - -### Updated plugins - -### Updated themes - -### Other changes - -* __Website__`; - - console.log(changes); - cb(); -} - const components = minifyComponents; const plugins = series(languagePlugins, minifyPlugins); -function gitChanges(cb) { - const git = simpleGit(__dirname); - git.status((err, res) => { - if (err) { - cb(new Error(`Something went wrong!\n${err}`)); - } else if (res.files.length > 0) { - console.log(res); - cb(new Error('There are changes in the file system. Did you forget to run gulp?')); - } else { - cb(); - } - }); -} - - -exports.watch = watchComponentsAndPlugins; -exports.default = parallel(components, plugins, componentsJsonToJs, build); -exports.premerge = gitChanges; -exports.linkify = linkify; -exports.changes = changes; +module.exports = { + watch: watchComponentsAndPlugins, + default: parallel(components, plugins, componentsJsonToJs, build), + premerge, + linkify, + changes +}; diff --git a/gulpfile.js/paths.js b/gulpfile.js/paths.js new file mode 100644 index 0000000000..1d5b7a3f38 --- /dev/null +++ b/gulpfile.js/paths.js @@ -0,0 +1,19 @@ +"use strict"; + +module.exports = { + componentsFile: 'components.json', + componentsFileJS: 'components.js', + components: ['components/**/*.js', '!components/index.js', '!components/**/*.min.js'], + main: [ + 'components/prism-core.js', + 'components/prism-markup.js', + 'components/prism-css.js', + 'components/prism-clike.js', + 'components/prism-javascript.js', + 'plugins/file-highlight/prism-file-highlight.js' + ], + plugins: ['plugins/**/*.js', '!plugins/**/*.min.js'], + showLanguagePlugin: 'plugins/show-language/prism-show-language.js', + autoloaderPlugin: 'plugins/autoloader/prism-autoloader.js', + changelog: 'CHANGELOG.md' +}; diff --git a/gulpfile.js/premerge.js b/gulpfile.js/premerge.js new file mode 100644 index 0000000000..a78c21b691 --- /dev/null +++ b/gulpfile.js/premerge.js @@ -0,0 +1,18 @@ +"use strict"; + +const git = require('simple-git/promise')(__dirname); + + +function gitChanges() { + return git.status().then(res => { + if (res.files.length > 0) { + console.log(res); + throw new Error('There are changes in the file system. Did you forget to run gulp?'); + } + }); +} + + +module.exports = { + premerge: gitChanges +}; diff --git a/package-lock.json b/package-lock.json index bb2538c3fc..2f042d7890 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4252,17 +4252,6 @@ "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", "dev": true }, - "shelljs": { - "version": "0.8.3", - "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.3.tgz", - "integrity": "sha512-fc0BKlAWiLpwZljmOvAOTE/gXawtCoNrP5oaY7KIaQbbyHeQVg01pSEuEGvGh3HEdBU4baCD7wQBwADmM/7f7A==", - "dev": true, - "requires": { - "glob": "^7.0.0", - "interpret": "^1.0.0", - "rechoir": "^0.6.2" - } - }, "signal-exit": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", diff --git a/package.json b/package.json index 1a3fcb6637..ddb65e3dca 100755 --- a/package.json +++ b/package.json @@ -37,7 +37,6 @@ "jsdom": "^13.0.0", "mocha": "^6.0.0", "pump": "^3.0.0", - "shelljs": "^0.8.3", "simple-git": "^1.107.0", "yargs": "^13.2.2" }, From e8811d22275c295cd0452b6c9508e15cfbc308b5 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Sat, 20 Jul 2019 03:18:01 +0200 Subject: [PATCH 0316/1100] Scheme: Added support for rational number literals (#1964) This adds support for rational numbers like `2/3`. --- components/prism-scheme.js | 2 +- components/prism-scheme.min.js | 2 +- tests/languages/scheme/number_feature.test | 4 +++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/components/prism-scheme.js b/components/prism-scheme.js index da12d761b9..13a0f6d59b 100644 --- a/components/prism-scheme.js +++ b/components/prism-scheme.js @@ -17,7 +17,7 @@ Prism.languages.scheme = { lookbehind: true }, 'number': { - pattern: /([\s()])[-+]?\d*\.?\d+(?:\s*[-+]\s*\d*\.?\d+i)?\b/, + pattern: /([\s()])[-+]?(?:\d+\/\d+|\d*\.?\d+(?:\s*[-+]\s*\d*\.?\d+i)?)\b/, lookbehind: true }, 'boolean': /#[tf]/, diff --git a/components/prism-scheme.min.js b/components/prism-scheme.min.js index b27a920dd5..04bc6c1943 100644 --- a/components/prism-scheme.min.js +++ b/components/prism-scheme.min.js @@ -1 +1 @@ -Prism.languages.scheme={comment:/;.*/,string:{pattern:/"(?:[^"\\]|\\.)*"|'[^()#'\s]+/,greedy:!0},character:{pattern:/#\\(?:[ux][a-fA-F\d]+|[a-zA-Z]+|\S)/,alias:"string"},keyword:{pattern:/(\()(?:define(?:-syntax|-library|-values)?|(?:case-)?lambda|let(?:\*|rec)?(?:-values)?|else|if|cond|begin|delay(?:-force)?|parameterize|guard|set!|(?:quasi-)?quote|syntax-rules)(?=[()\s])/,lookbehind:!0},builtin:{pattern:/(\()(?:(?:cons|car|cdr|list|call-with-current-continuation|call\/cc|append|abs|apply|eval)\b|null\?|pair\?|boolean\?|eof-object\?|char\?|procedure\?|number\?|port\?|string\?|vector\?|symbol\?|bytevector\?)(?=[()\s])/,lookbehind:!0},number:{pattern:/([\s()])[-+]?\d*\.?\d+(?:\s*[-+]\s*\d*\.?\d+i)?\b/,lookbehind:!0},boolean:/#[tf]/,operator:{pattern:/(\()(?:[-+*%\/]|[<>]=?|=>?)(?=\s|$)/,lookbehind:!0},function:{pattern:/(\()[^()'\s]+(?=[()\s)]|$)/,lookbehind:!0},punctuation:/[()']/}; \ No newline at end of file +Prism.languages.scheme={comment:/;.*/,string:{pattern:/"(?:[^"\\]|\\.)*"|'[^()#'\s]+/,greedy:!0},character:{pattern:/#\\(?:[ux][a-fA-F\d]+|[a-zA-Z]+|\S)/,alias:"string"},keyword:{pattern:/(\()(?:define(?:-syntax|-library|-values)?|(?:case-)?lambda|let(?:\*|rec)?(?:-values)?|else|if|cond|begin|delay(?:-force)?|parameterize|guard|set!|(?:quasi-)?quote|syntax-rules)(?=[()\s])/,lookbehind:!0},builtin:{pattern:/(\()(?:(?:cons|car|cdr|list|call-with-current-continuation|call\/cc|append|abs|apply|eval)\b|null\?|pair\?|boolean\?|eof-object\?|char\?|procedure\?|number\?|port\?|string\?|vector\?|symbol\?|bytevector\?)(?=[()\s])/,lookbehind:!0},number:{pattern:/([\s()])[-+]?(?:\d+\/\d+|\d*\.?\d+(?:\s*[-+]\s*\d*\.?\d+i)?)\b/,lookbehind:!0},boolean:/#[tf]/,operator:{pattern:/(\()(?:[-+*%\/]|[<>]=?|=>?)(?=\s|$)/,lookbehind:!0},function:{pattern:/(\()[^()'\s]+(?=[()\s)]|$)/,lookbehind:!0},punctuation:/[()']/}; \ No newline at end of file diff --git a/tests/languages/scheme/number_feature.test b/tests/languages/scheme/number_feature.test index dfd7dcc8cf..bdd2af45a5 100644 --- a/tests/languages/scheme/number_feature.test +++ b/tests/languages/scheme/number_feature.test @@ -1,5 +1,6 @@ (foo 42) (foo 3.14159) +(foo 8/3) (foo 3+4i) (foo 2.5+0.0i) (foo 3+0i) @@ -9,6 +10,7 @@ [ ["punctuation", "("], ["function", "foo"], ["number", "42"], ["punctuation", ")"], ["punctuation", "("], ["function", "foo"], ["number", "3.14159"], ["punctuation", ")"], + ["punctuation", "("], ["function", "foo"], ["number", "8/3"], ["punctuation", ")"], ["punctuation", "("], ["function", "foo"], ["number", "3+4i"], ["punctuation", ")"], ["punctuation", "("], ["function", "foo"], ["number", "2.5+0.0i"], ["punctuation", ")"], ["punctuation", "("], ["function", "foo"], ["number", "3+0i"], ["punctuation", ")"] @@ -16,4 +18,4 @@ ---------------------------------------------------- -Checks for numbers and complex numbers. \ No newline at end of file +Checks for numbers, rational numbers, and complex numbers. From c93c066bcea7f7e9addb1e194803330708e9fd78 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Sat, 20 Jul 2019 12:35:15 +0200 Subject: [PATCH 0317/1100] Added support for Splunk SPL (#1962) This adds support for Splunk SPL and corrects the position of the SQL in `components.json`. --- components.js | 2 +- components.json | 12 +- components/prism-splunk-spl.js | 24 ++ components/prism-splunk-spl.min.js | 1 + examples/prism-splunk-spl.html | 7 + plugins/show-language/prism-show-language.js | 3 +- .../show-language/prism-show-language.min.js | 2 +- .../languages/splunk-spl/comment_feature.test | 16 + tests/languages/splunk-spl/date_feature.test | 13 + .../languages/splunk-spl/keyword_feature.test | 303 ++++++++++++++++++ .../languages/splunk-spl/number_feature.test | 13 + .../splunk-spl/operator_feature.test | 44 +++ .../languages/splunk-spl/string_feature.test | 13 + 13 files changed, 446 insertions(+), 7 deletions(-) create mode 100644 components/prism-splunk-spl.js create mode 100644 components/prism-splunk-spl.min.js create mode 100644 examples/prism-splunk-spl.html create mode 100644 tests/languages/splunk-spl/comment_feature.test create mode 100644 tests/languages/splunk-spl/date_feature.test create mode 100644 tests/languages/splunk-spl/keyword_feature.test create mode 100644 tests/languages/splunk-spl/number_feature.test create mode 100644 tests/languages/splunk-spl/operator_feature.test create mode 100644 tests/languages/splunk-spl/string_feature.test diff --git a/components.js b/components.js index 9f3e20de4d..135fe1ab1f 100644 --- a/components.js +++ b/components.js @@ -1,2 +1,2 @@ -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default","peerDependencies":"markup"},"clike":{"title":"C-like","option":"default","overrideExampleHeader":true},"javascript":{"title":"JavaScript","require":"clike","peerDependencies":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"Augmented Backus–Naur form","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","peerDependencies":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"Backus–Naur form","alias":"rbnf","aliasTitles":{"rbnf":"Routing Backus–Naur form"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"Extended Backus–Naur form","owner":"RunDevelopment"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment"},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","peerDependencies":["css","coffeescript","erb","javascript","less","markdown","ruby","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"http":{"title":"HTTP","peerDependencies":["javascript","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"peerDependencies":["scala"],"owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","peerDependencies":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike"],"peerDependencies":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","peerDependencies":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","owner":"CupOfTea696"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"less":{"title":"Less","require":"css","owner":"Golmote"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","peerDependencies":["jsdoc"],"alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"nasm":{"title":"NASM","owner":"rbmj"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"cpp","peerDependencies":["c","cpp"],"overrideExampleHeader":true,"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"peerDependencies":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","peerDependencies":["c","cpp","fortran"],"owner":"Golmote"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"peerDependencies":["jsdoc","js-extras"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","peerDependencies":["actionscript","coffeescript","flow","javascript","typescript","vala"],"owner":"RunDevelopment"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sql":{"title":"SQL","owner":"multipetros"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","peerDependencies":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","alias":"ts","owner":"vkbansal"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","visual-basic"],"owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":"Line Highlight","line-numbers":{"title":"Line Numbers","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","after":["autolinker","data-uri-highlight"]},"autolinker":"Autolinker","wpd":"WebPlatform Docs","custom-class":{"title":"Custom Class","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","noCSS":true},"show-language":{"title":"Show Language","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","owner":"Golmote","noCSS":true},"previewers":{"title":"Previewers","owner":"Golmote"},"autoloader":{"title":"Autoloader","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","owner":"Golmote","after":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","owner":"chriswells0"},"unescaped-markup":"Unescaped Markup","normalize-whitespace":{"title":"Normalize Whitespace","owner":"zeitgeist87","after":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","owner":"mAAdhaTTah","require":"toolbar","noCSS":true}}}; +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default","peerDependencies":"markup"},"clike":{"title":"C-like","option":"default","overrideExampleHeader":true},"javascript":{"title":"JavaScript","require":"clike","peerDependencies":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"Augmented Backus–Naur form","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","peerDependencies":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"Backus–Naur form","alias":"rbnf","aliasTitles":{"rbnf":"Routing Backus–Naur form"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"Extended Backus–Naur form","owner":"RunDevelopment"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment"},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","peerDependencies":["css","coffeescript","erb","javascript","less","markdown","ruby","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"http":{"title":"HTTP","peerDependencies":["javascript","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"peerDependencies":["scala"],"owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","peerDependencies":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike"],"peerDependencies":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","peerDependencies":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","owner":"CupOfTea696"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"less":{"title":"Less","require":"css","owner":"Golmote"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","peerDependencies":["jsdoc"],"alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"nasm":{"title":"NASM","owner":"rbmj"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"cpp","peerDependencies":["c","cpp"],"overrideExampleHeader":true,"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"peerDependencies":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","peerDependencies":["c","cpp","fortran"],"owner":"Golmote"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"peerDependencies":["jsdoc","js-extras"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","peerDependencies":["actionscript","coffeescript","flow","javascript","typescript","vala"],"owner":"RunDevelopment"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","peerDependencies":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","alias":"ts","owner":"vkbansal"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","visual-basic"],"owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":"Line Highlight","line-numbers":{"title":"Line Numbers","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","after":["autolinker","data-uri-highlight"]},"autolinker":"Autolinker","wpd":"WebPlatform Docs","custom-class":{"title":"Custom Class","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","noCSS":true},"show-language":{"title":"Show Language","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","owner":"Golmote","noCSS":true},"previewers":{"title":"Previewers","owner":"Golmote"},"autoloader":{"title":"Autoloader","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","owner":"Golmote","after":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","owner":"chriswells0"},"unescaped-markup":"Unescaped Markup","normalize-whitespace":{"title":"Normalize Whitespace","owner":"zeitgeist87","after":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","owner":"mAAdhaTTah","require":"toolbar","noCSS":true}}}; if (typeof module !== 'undefined' && module.exports) { module.exports = components; } \ No newline at end of file diff --git a/components.json b/components.json index f78a1c1a76..a67923dcdc 100644 --- a/components.json +++ b/components.json @@ -832,15 +832,19 @@ "require": "markup-templating", "owner": "Golmote" }, - "sql": { - "title": "SQL", - "owner": "multipetros" - }, "soy": { "title": "Soy (Closure Template)", "require": "markup-templating", "owner": "Golmote" }, + "splunk-spl": { + "title": "Splunk SPL", + "owner": "RunDevelopment" + }, + "sql": { + "title": "SQL", + "owner": "multipetros" + }, "stylus": { "title": "Stylus", "owner": "vkbansal" diff --git a/components/prism-splunk-spl.js b/components/prism-splunk-spl.js new file mode 100644 index 0000000000..b9ec3fc85f --- /dev/null +++ b/components/prism-splunk-spl.js @@ -0,0 +1,24 @@ +Prism.languages['splunk-spl'] = { + 'comment': /`comment\("(?:\\.|[^\\"])*"\)`/, + 'string': { + pattern: /"(?:\\.|[^\\"])*"/, + greedy: true + }, + // https://docs.splunk.com/Documentation/Splunk/7.3.0/SearchReference/ListOfSearchCommands + 'keyword': /\b(?:abstract|accum|addcoltotals|addinfo|addtotals|analyzefields|anomalies|anomalousvalue|anomalydetection|append|appendcols|appendcsv|appendlookup|appendpipe|arules|associate|audit|autoregress|bin|bucket|bucketdir|chart|cluster|cofilter|collect|concurrency|contingency|convert|correlate|datamodel|dbinspect|dedup|delete|delta|diff|erex|eval|eventcount|eventstats|extract|fieldformat|fields|fieldsummary|filldown|fillnull|findtypes|folderize|foreach|format|from|gauge|gentimes|geom|geomfilter|geostats|head|highlight|history|iconify|input|inputcsv|inputlookup|iplocation|join|kmeans|kv|kvform|loadjob|localize|localop|lookup|makecontinuous|makemv|makeresults|map|mcollect|metadata|metasearch|meventcollect|mstats|multikv|multisearch|mvcombine|mvexpand|nomv|outlier|outputcsv|outputlookup|outputtext|overlap|pivot|predict|rangemap|rare|regex|relevancy|reltime|rename|replace|rest|return|reverse|rex|rtorder|run|savedsearch|script|scrub|search|searchtxn|selfjoin|sendemail|set|setfields|sichart|sirare|sistats|sitimechart|sitop|sort|spath|stats|strcat|streamstats|table|tags|tail|timechart|timewrap|top|transaction|transpose|trendline|tscollect|tstats|typeahead|typelearner|typer|union|uniq|untable|where|x11|xmlkv|xmlunescape|xpath|xyseries)\b/i, + 'operator-word': { + pattern: /\b(?:and|as|by|not|or|xor)\b/i, + alias: 'operator' + }, + 'function': /\w+(?=\s*\()/, + 'property': /\w+(?=\s*=(?!=))/, + 'date': { + // MM/DD/YYYY(:HH:MM:SS)? + pattern: /\b\d{1,2}\/\d{1,2}\/\d{1,4}(?:(?::\d{1,2}){3})?\b/, + alias: 'number' + }, + 'number': /\b\d+(?:\.\d+)?\b/, + 'boolean': /\b(?:f|false|t|true)\b/i, + 'operator': /[<>=]=?|[-+*/%|]/, + 'punctuation': /[()[\],]/ +} diff --git a/components/prism-splunk-spl.min.js b/components/prism-splunk-spl.min.js new file mode 100644 index 0000000000..35c43b81ee --- /dev/null +++ b/components/prism-splunk-spl.min.js @@ -0,0 +1 @@ +Prism.languages["splunk-spl"]={comment:/`comment\("(?:\\.|[^\\"])*"\)`/,string:{pattern:/"(?:\\.|[^\\"])*"/,greedy:!0},keyword:/\b(?:abstract|accum|addcoltotals|addinfo|addtotals|analyzefields|anomalies|anomalousvalue|anomalydetection|append|appendcols|appendcsv|appendlookup|appendpipe|arules|associate|audit|autoregress|bin|bucket|bucketdir|chart|cluster|cofilter|collect|concurrency|contingency|convert|correlate|datamodel|dbinspect|dedup|delete|delta|diff|erex|eval|eventcount|eventstats|extract|fieldformat|fields|fieldsummary|filldown|fillnull|findtypes|folderize|foreach|format|from|gauge|gentimes|geom|geomfilter|geostats|head|highlight|history|iconify|input|inputcsv|inputlookup|iplocation|join|kmeans|kv|kvform|loadjob|localize|localop|lookup|makecontinuous|makemv|makeresults|map|mcollect|metadata|metasearch|meventcollect|mstats|multikv|multisearch|mvcombine|mvexpand|nomv|outlier|outputcsv|outputlookup|outputtext|overlap|pivot|predict|rangemap|rare|regex|relevancy|reltime|rename|replace|rest|return|reverse|rex|rtorder|run|savedsearch|script|scrub|search|searchtxn|selfjoin|sendemail|set|setfields|sichart|sirare|sistats|sitimechart|sitop|sort|spath|stats|strcat|streamstats|table|tags|tail|timechart|timewrap|top|transaction|transpose|trendline|tscollect|tstats|typeahead|typelearner|typer|union|uniq|untable|where|x11|xmlkv|xmlunescape|xpath|xyseries)\b/i,"operator-word":{pattern:/\b(?:and|as|by|not|or|xor)\b/i,alias:"operator"},function:/\w+(?=\s*\()/,property:/\w+(?=\s*=(?!=))/,date:{pattern:/\b\d{1,2}\/\d{1,2}\/\d{1,4}(?:(?::\d{1,2}){3})?\b/,alias:"number"},number:/\b\d+(?:\.\d+)?\b/,boolean:/\b(?:f|false|t|true)\b/i,operator:/[<>=]=?|[-+*/%|]/,punctuation:/[()[\],]/}; \ No newline at end of file diff --git a/examples/prism-splunk-spl.html b/examples/prism-splunk-spl.html new file mode 100644 index 0000000000..8675476323 --- /dev/null +++ b/examples/prism-splunk-spl.html @@ -0,0 +1,7 @@ +

    Full example

    +
    source=monthly_data.csv
    +| rename remote_ip AS ip
    +| eval isLocal=if(cidrmatch("123.132.32.0/25",ip), "local", "not local")
    +| eval error=case(status == 200, "OK", status == 404, "Not found", true(), "Other")
    +  `comment("TODO: Add support for more status codes")`
    +| sort amount
    diff --git a/plugins/show-language/prism-show-language.js b/plugins/show-language/prism-show-language.js index b8496df821..8edcd65060 100644 --- a/plugins/show-language/prism-show-language.js +++ b/plugins/show-language/prism-show-language.js @@ -117,8 +117,9 @@ "sass": "Sass (Sass)", "scss": "Sass (Scss)", "shell-session": "Shell session", - "sql": "SQL", "soy": "Soy (Closure Template)", + "splunk-spl": "Splunk SPL", + "sql": "SQL", "tap": "TAP", "toml": "TOML", "tt2": "Template Toolkit 2", diff --git a/plugins/show-language/prism-show-language.min.js b/plugins/show-language/prism-show-language.min.js index 712baa1608..f639df6976 100644 --- a/plugins/show-language/prism-show-language.min.js +++ b/plugins/show-language/prism-show-language.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof self&&self.Prism&&self.document)if(Prism.plugins.toolbar){var i={html:"HTML",xml:"XML",svg:"SVG",mathml:"MathML",css:"CSS",clike:"C-like",js:"JavaScript",abap:"ABAP",abnf:"Augmented Backus–Naur form",apacheconf:"Apache Configuration",apl:"APL",arff:"ARFF",asciidoc:"AsciiDoc",adoc:"AsciiDoc",asm6502:"6502 Assembly",aspnet:"ASP.NET (C#)",autohotkey:"AutoHotkey",autoit:"AutoIt",shell:"Bash",basic:"BASIC",bnf:"Backus–Naur form",rbnf:"Routing Backus–Naur form",csharp:"C#",cs:"C#",dotnet:"C#",cpp:"C++",cil:"CIL",coffee:"CoffeeScript",cmake:"CMake",csp:"Content-Security-Policy","css-extras":"CSS Extras",django:"Django/Jinja2",jinja2:"Django/Jinja2","dns-zone-file":"DNS zone file","dns-zone":"DNS zone file",dockerfile:"Docker",ebnf:"Extended Backus–Naur form",ejs:"EJS",erb:"ERB",fsharp:"F#",gcode:"G-code",gedcom:"GEDCOM",glsl:"GLSL",gml:"GameMaker Language",gamemakerlanguage:"GameMaker Language",graphql:"GraphQL",hs:"Haskell",hcl:"HCL",http:"HTTP",hpkp:"HTTP Public-Key-Pins",hsts:"HTTP Strict-Transport-Security",ichigojam:"IchigoJam",inform7:"Inform 7",javadoc:"JavaDoc",javadoclike:"JavaDoc-like",javastacktrace:"Java stack trace",jq:"JQ",jsdoc:"JSDoc","js-extras":"JS Extras",json:"JSON",jsonp:"JSONP",json5:"JSON5",latex:"LaTeX",tex:"TeX",context:"ConTeXt",emacs:"Lisp",elisp:"Lisp","emacs-lisp":"Lisp",lolcode:"LOLCODE",md:"Markdown","markup-templating":"Markup templating",matlab:"MATLAB",mel:"MEL",n1ql:"N1QL",n4js:"N4JS",n4jsd:"N4JS","nand2tetris-hdl":"Nand To Tetris HDL",nasm:"NASM",nginx:"nginx",nsis:"NSIS",objectivec:"Objective-C",ocaml:"OCaml",opencl:"OpenCL",parigp:"PARI/GP",objectpascal:"Object Pascal",pcaxis:"PC-Axis",px:"PC-Axis",php:"PHP",phpdoc:"PHPDoc","php-extras":"PHP Extras",plsql:"PL/SQL",powershell:"PowerShell",properties:".properties",protobuf:"Protocol Buffers",py:"Python",q:"Q (kdb+ database)",jsx:"React JSX",tsx:"React TSX",renpy:"Ren'py",rest:"reST (reStructuredText)",rb:"Ruby",sas:"SAS",sass:"Sass (Sass)",scss:"Sass (Scss)","shell-session":"Shell session",sql:"SQL",soy:"Soy (Closure Template)",tap:"TAP",toml:"TOML",tt2:"Template Toolkit 2",ts:"TypeScript","t4-cs":"T4 Text Templates (C#)",t4:"T4 Text Templates (C#)","t4-vb":"T4 Text Templates (VB)","t4-templating":"T4 templating",vbnet:"VB.Net",vhdl:"VHDL",vim:"vim","visual-basic":"Visual Basic",vb:"Visual Basic",wasm:"WebAssembly",wiki:"Wiki markup",xeoracube:"XeoraCube",xojo:"Xojo (REALbasic)",xquery:"XQuery",yaml:"YAML",yml:"YAML"};Prism.plugins.toolbar.registerButton("show-language",function(e){var a=e.element.parentNode;if(a&&/pre/i.test(a.nodeName)){var s,t=a.getAttribute("data-language")||i[e.language]||((s=e.language)?(s.substring(0,1).toUpperCase()+s.substring(1)).replace(/s(?=cript)/,"S"):s);if(t){var o=document.createElement("span");return o.textContent=t,o}}})}else console.warn("Show Languages plugin loaded before Toolbar plugin.")}(); \ No newline at end of file +!function(){if("undefined"!=typeof self&&self.Prism&&self.document)if(Prism.plugins.toolbar){var n={html:"HTML",xml:"XML",svg:"SVG",mathml:"MathML",css:"CSS",clike:"C-like",js:"JavaScript",abap:"ABAP",abnf:"Augmented Backus–Naur form",apacheconf:"Apache Configuration",apl:"APL",arff:"ARFF",asciidoc:"AsciiDoc",adoc:"AsciiDoc",asm6502:"6502 Assembly",aspnet:"ASP.NET (C#)",autohotkey:"AutoHotkey",autoit:"AutoIt",shell:"Bash",basic:"BASIC",bnf:"Backus–Naur form",rbnf:"Routing Backus–Naur form",csharp:"C#",cs:"C#",dotnet:"C#",cpp:"C++",cil:"CIL",coffee:"CoffeeScript",cmake:"CMake",csp:"Content-Security-Policy","css-extras":"CSS Extras",django:"Django/Jinja2",jinja2:"Django/Jinja2","dns-zone-file":"DNS zone file","dns-zone":"DNS zone file",dockerfile:"Docker",ebnf:"Extended Backus–Naur form",ejs:"EJS",erb:"ERB",fsharp:"F#",gcode:"G-code",gedcom:"GEDCOM",glsl:"GLSL",gml:"GameMaker Language",gamemakerlanguage:"GameMaker Language",graphql:"GraphQL",hs:"Haskell",hcl:"HCL",http:"HTTP",hpkp:"HTTP Public-Key-Pins",hsts:"HTTP Strict-Transport-Security",ichigojam:"IchigoJam",inform7:"Inform 7",javadoc:"JavaDoc",javadoclike:"JavaDoc-like",javastacktrace:"Java stack trace",jq:"JQ",jsdoc:"JSDoc","js-extras":"JS Extras",json:"JSON",jsonp:"JSONP",json5:"JSON5",latex:"LaTeX",tex:"TeX",context:"ConTeXt",emacs:"Lisp",elisp:"Lisp","emacs-lisp":"Lisp",lolcode:"LOLCODE",md:"Markdown","markup-templating":"Markup templating",matlab:"MATLAB",mel:"MEL",n1ql:"N1QL",n4js:"N4JS",n4jsd:"N4JS","nand2tetris-hdl":"Nand To Tetris HDL",nasm:"NASM",nginx:"nginx",nsis:"NSIS",objectivec:"Objective-C",ocaml:"OCaml",opencl:"OpenCL",parigp:"PARI/GP",objectpascal:"Object Pascal",pcaxis:"PC-Axis",px:"PC-Axis",php:"PHP",phpdoc:"PHPDoc","php-extras":"PHP Extras",plsql:"PL/SQL",powershell:"PowerShell",properties:".properties",protobuf:"Protocol Buffers",py:"Python",q:"Q (kdb+ database)",jsx:"React JSX",tsx:"React TSX",renpy:"Ren'py",rest:"reST (reStructuredText)",rb:"Ruby",sas:"SAS",sass:"Sass (Sass)",scss:"Sass (Scss)","shell-session":"Shell session",soy:"Soy (Closure Template)","splunk-spl":"Splunk SPL",sql:"SQL",tap:"TAP",toml:"TOML",tt2:"Template Toolkit 2",ts:"TypeScript","t4-cs":"T4 Text Templates (C#)",t4:"T4 Text Templates (C#)","t4-vb":"T4 Text Templates (VB)","t4-templating":"T4 templating",vbnet:"VB.Net",vhdl:"VHDL",vim:"vim","visual-basic":"Visual Basic",vb:"Visual Basic",wasm:"WebAssembly",wiki:"Wiki markup",xeoracube:"XeoraCube",xojo:"Xojo (REALbasic)",xquery:"XQuery",yaml:"YAML",yml:"YAML"};Prism.plugins.toolbar.registerButton("show-language",function(e){var a=e.element.parentNode;if(a&&/pre/i.test(a.nodeName)){var s,t=a.getAttribute("data-language")||n[e.language]||((s=e.language)?(s.substring(0,1).toUpperCase()+s.substring(1)).replace(/s(?=cript)/,"S"):s);if(t){var o=document.createElement("span");return o.textContent=t,o}}})}else console.warn("Show Languages plugin loaded before Toolbar plugin.")}(); \ No newline at end of file diff --git a/tests/languages/splunk-spl/comment_feature.test b/tests/languages/splunk-spl/comment_feature.test new file mode 100644 index 0000000000..f4688d148c --- /dev/null +++ b/tests/languages/splunk-spl/comment_feature.test @@ -0,0 +1,16 @@ +`comment("This is a comment")` +`comment("This is too +but on more than one line")` +`comment("| stats sum(b) BY index")` + +---------------------------------------------------- + +[ + ["comment", "`comment(\"This is a comment\")`"], + ["comment", "`comment(\"This is too\r\nbut on more than one line\")`"], + ["comment", "`comment(\"| stats sum(b) BY index\")`"] +] + +---------------------------------------------------- + +Checks for comments. diff --git a/tests/languages/splunk-spl/date_feature.test b/tests/languages/splunk-spl/date_feature.test new file mode 100644 index 0000000000..1f46852067 --- /dev/null +++ b/tests/languages/splunk-spl/date_feature.test @@ -0,0 +1,13 @@ +1/1/1970 +12/31/1999:23:59:59 + +---------------------------------------------------- + +[ + ["date", "1/1/1970"], + ["date", "12/31/1999:23:59:59"] +] + +---------------------------------------------------- + +Checks for dates. diff --git a/tests/languages/splunk-spl/keyword_feature.test b/tests/languages/splunk-spl/keyword_feature.test new file mode 100644 index 0000000000..ad8f326b54 --- /dev/null +++ b/tests/languages/splunk-spl/keyword_feature.test @@ -0,0 +1,303 @@ +abstract +accum +addcoltotals +addinfo +addtotals +analyzefields +anomalies +anomalousvalue +anomalydetection +append +appendcols +appendcsv +appendlookup +appendpipe +arules +associate +audit +autoregress +bin +bucket +bucketdir +chart +cluster +cofilter +collect +concurrency +contingency +convert +correlate +datamodel +dbinspect +dedup +delete +delta +diff +erex +eval +eventcount +eventstats +extract +fieldformat +fields +fieldsummary +filldown +fillnull +findtypes +folderize +foreach +format +from +gauge +gentimes +geom +geomfilter +geostats +head +highlight +history +iconify +input +inputcsv +inputlookup +iplocation +join +kmeans +kv +kvform +loadjob +localize +localop +lookup +makecontinuous +makemv +makeresults +map +mcollect +metadata +metasearch +meventcollect +mstats +multikv +multisearch +mvcombine +mvexpand +nomv +outlier +outputcsv +outputlookup +outputtext +overlap +pivot +predict +rangemap +rare +regex +relevancy +reltime +rename +replace +rest +return +reverse +rex +rtorder +run +savedsearch +script +scrub +search +searchtxn +selfjoin +sendemail +set +setfields +sichart +sirare +sistats +sitimechart +sitop +sort +spath +stats +strcat +streamstats +table +tags +tail +timechart +timewrap +top +transaction +transpose +trendline +tscollect +tstats +typeahead +typelearner +typer +union +uniq +untable +where +x11 +xmlkv +xmlunescape +xpath +xyseries + +---------------------------------------------------- + +[ + ["keyword", "abstract"], + ["keyword", "accum"], + ["keyword", "addcoltotals"], + ["keyword", "addinfo"], + ["keyword", "addtotals"], + ["keyword", "analyzefields"], + ["keyword", "anomalies"], + ["keyword", "anomalousvalue"], + ["keyword", "anomalydetection"], + ["keyword", "append"], + ["keyword", "appendcols"], + ["keyword", "appendcsv"], + ["keyword", "appendlookup"], + ["keyword", "appendpipe"], + ["keyword", "arules"], + ["keyword", "associate"], + ["keyword", "audit"], + ["keyword", "autoregress"], + ["keyword", "bin"], + ["keyword", "bucket"], + ["keyword", "bucketdir"], + ["keyword", "chart"], + ["keyword", "cluster"], + ["keyword", "cofilter"], + ["keyword", "collect"], + ["keyword", "concurrency"], + ["keyword", "contingency"], + ["keyword", "convert"], + ["keyword", "correlate"], + ["keyword", "datamodel"], + ["keyword", "dbinspect"], + ["keyword", "dedup"], + ["keyword", "delete"], + ["keyword", "delta"], + ["keyword", "diff"], + ["keyword", "erex"], + ["keyword", "eval"], + ["keyword", "eventcount"], + ["keyword", "eventstats"], + ["keyword", "extract"], + ["keyword", "fieldformat"], + ["keyword", "fields"], + ["keyword", "fieldsummary"], + ["keyword", "filldown"], + ["keyword", "fillnull"], + ["keyword", "findtypes"], + ["keyword", "folderize"], + ["keyword", "foreach"], + ["keyword", "format"], + ["keyword", "from"], + ["keyword", "gauge"], + ["keyword", "gentimes"], + ["keyword", "geom"], + ["keyword", "geomfilter"], + ["keyword", "geostats"], + ["keyword", "head"], + ["keyword", "highlight"], + ["keyword", "history"], + ["keyword", "iconify"], + ["keyword", "input"], + ["keyword", "inputcsv"], + ["keyword", "inputlookup"], + ["keyword", "iplocation"], + ["keyword", "join"], + ["keyword", "kmeans"], + ["keyword", "kv"], + ["keyword", "kvform"], + ["keyword", "loadjob"], + ["keyword", "localize"], + ["keyword", "localop"], + ["keyword", "lookup"], + ["keyword", "makecontinuous"], + ["keyword", "makemv"], + ["keyword", "makeresults"], + ["keyword", "map"], + ["keyword", "mcollect"], + ["keyword", "metadata"], + ["keyword", "metasearch"], + ["keyword", "meventcollect"], + ["keyword", "mstats"], + ["keyword", "multikv"], + ["keyword", "multisearch"], + ["keyword", "mvcombine"], + ["keyword", "mvexpand"], + ["keyword", "nomv"], + ["keyword", "outlier"], + ["keyword", "outputcsv"], + ["keyword", "outputlookup"], + ["keyword", "outputtext"], + ["keyword", "overlap"], + ["keyword", "pivot"], + ["keyword", "predict"], + ["keyword", "rangemap"], + ["keyword", "rare"], + ["keyword", "regex"], + ["keyword", "relevancy"], + ["keyword", "reltime"], + ["keyword", "rename"], + ["keyword", "replace"], + ["keyword", "rest"], + ["keyword", "return"], + ["keyword", "reverse"], + ["keyword", "rex"], + ["keyword", "rtorder"], + ["keyword", "run"], + ["keyword", "savedsearch"], + ["keyword", "script"], + ["keyword", "scrub"], + ["keyword", "search"], + ["keyword", "searchtxn"], + ["keyword", "selfjoin"], + ["keyword", "sendemail"], + ["keyword", "set"], + ["keyword", "setfields"], + ["keyword", "sichart"], + ["keyword", "sirare"], + ["keyword", "sistats"], + ["keyword", "sitimechart"], + ["keyword", "sitop"], + ["keyword", "sort"], + ["keyword", "spath"], + ["keyword", "stats"], + ["keyword", "strcat"], + ["keyword", "streamstats"], + ["keyword", "table"], + ["keyword", "tags"], + ["keyword", "tail"], + ["keyword", "timechart"], + ["keyword", "timewrap"], + ["keyword", "top"], + ["keyword", "transaction"], + ["keyword", "transpose"], + ["keyword", "trendline"], + ["keyword", "tscollect"], + ["keyword", "tstats"], + ["keyword", "typeahead"], + ["keyword", "typelearner"], + ["keyword", "typer"], + ["keyword", "union"], + ["keyword", "uniq"], + ["keyword", "untable"], + ["keyword", "where"], + ["keyword", "x11"], + ["keyword", "xmlkv"], + ["keyword", "xmlunescape"], + ["keyword", "xpath"], + ["keyword", "xyseries"] +] + +---------------------------------------------------- + +Checks for keywords. diff --git a/tests/languages/splunk-spl/number_feature.test b/tests/languages/splunk-spl/number_feature.test new file mode 100644 index 0000000000..395693cc92 --- /dev/null +++ b/tests/languages/splunk-spl/number_feature.test @@ -0,0 +1,13 @@ +123 +123.456 + +---------------------------------------------------- + +[ + ["number", "123"], + ["number", "123.456"] +] + +---------------------------------------------------- + +Checks for numbers. diff --git a/tests/languages/splunk-spl/operator_feature.test b/tests/languages/splunk-spl/operator_feature.test new file mode 100644 index 0000000000..51274247d4 --- /dev/null +++ b/tests/languages/splunk-spl/operator_feature.test @@ -0,0 +1,44 @@ += +== >= <= > < ++ - * / % +| + +and not or xor AND NOT OR XOR +as by AS BY + +---------------------------------------------------- + +[ + ["operator", "="], + + ["operator", "=="], + ["operator", ">="], + ["operator", "<="], + ["operator", ">"], + ["operator", "<"], + + ["operator", "+"], + ["operator", "-"], + ["operator", "*"], + ["operator", "/"], + ["operator", "%"], + ["operator", "|"], + + ["operator-word", "and"], + ["operator-word", "not"], + ["operator-word", "or"], + ["operator-word", "xor"], + ["operator-word", "AND"], + ["operator-word", "NOT"], + ["operator-word", "OR"], + ["operator-word", "XOR"], + + ["operator-word", "as"], + ["operator-word", "by"], + ["operator-word", "AS"], + ["operator-word", "BY"] +] + +---------------------------------------------------- + +Checks for operators. diff --git a/tests/languages/splunk-spl/string_feature.test b/tests/languages/splunk-spl/string_feature.test new file mode 100644 index 0000000000..10ab3aaee6 --- /dev/null +++ b/tests/languages/splunk-spl/string_feature.test @@ -0,0 +1,13 @@ +"foo" +"\"foo\"" + +---------------------------------------------------- + +[ + ["string", "\"foo\""], + ["string", "\"\\\"foo\\\"\""] +] + +---------------------------------------------------- + +Checks for strings. From 5d992fc5b3f500018fa14c953baa428b5bc3551c Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Sat, 20 Jul 2019 12:52:48 +0200 Subject: [PATCH 0318/1100] Added basic support for LilyPond (#1967) This adds very basic support for LilyPond. More advanced features weren't implemented because the author (me) has no idea about music. --- components.js | 2 +- components.json | 6 ++ components/prism-lilypond.js | 69 +++++++++++++++ components/prism-lilypond.min.js | 1 + plugins/autoloader/prism-autoloader.js | 2 + plugins/autoloader/prism-autoloader.min.js | 2 +- plugins/show-language/prism-show-language.js | 2 + .../show-language/prism-show-language.min.js | 2 +- tests/languages/lilypond/comment_feature.test | 16 ++++ .../lilypond/embedded-scheme_feature.test | 86 +++++++++++++++++++ tests/languages/lilypond/keyword_feature.test | 35 ++++++++ tests/languages/lilypond/number_feature.test | 13 +++ tests/languages/lilypond/string_feature.test | 14 +++ 13 files changed, 247 insertions(+), 3 deletions(-) create mode 100644 components/prism-lilypond.js create mode 100644 components/prism-lilypond.min.js create mode 100644 tests/languages/lilypond/comment_feature.test create mode 100644 tests/languages/lilypond/embedded-scheme_feature.test create mode 100644 tests/languages/lilypond/keyword_feature.test create mode 100644 tests/languages/lilypond/number_feature.test create mode 100644 tests/languages/lilypond/string_feature.test diff --git a/components.js b/components.js index 135fe1ab1f..3a5e71c68e 100644 --- a/components.js +++ b/components.js @@ -1,2 +1,2 @@ -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default","peerDependencies":"markup"},"clike":{"title":"C-like","option":"default","overrideExampleHeader":true},"javascript":{"title":"JavaScript","require":"clike","peerDependencies":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"Augmented Backus–Naur form","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","peerDependencies":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"Backus–Naur form","alias":"rbnf","aliasTitles":{"rbnf":"Routing Backus–Naur form"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"Extended Backus–Naur form","owner":"RunDevelopment"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment"},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","peerDependencies":["css","coffeescript","erb","javascript","less","markdown","ruby","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"http":{"title":"HTTP","peerDependencies":["javascript","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"peerDependencies":["scala"],"owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","peerDependencies":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike"],"peerDependencies":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","peerDependencies":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","owner":"CupOfTea696"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"less":{"title":"Less","require":"css","owner":"Golmote"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","peerDependencies":["jsdoc"],"alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"nasm":{"title":"NASM","owner":"rbmj"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"cpp","peerDependencies":["c","cpp"],"overrideExampleHeader":true,"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"peerDependencies":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","peerDependencies":["c","cpp","fortran"],"owner":"Golmote"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"peerDependencies":["jsdoc","js-extras"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","peerDependencies":["actionscript","coffeescript","flow","javascript","typescript","vala"],"owner":"RunDevelopment"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","peerDependencies":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","alias":"ts","owner":"vkbansal"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","visual-basic"],"owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":"Line Highlight","line-numbers":{"title":"Line Numbers","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","after":["autolinker","data-uri-highlight"]},"autolinker":"Autolinker","wpd":"WebPlatform Docs","custom-class":{"title":"Custom Class","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","noCSS":true},"show-language":{"title":"Show Language","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","owner":"Golmote","noCSS":true},"previewers":{"title":"Previewers","owner":"Golmote"},"autoloader":{"title":"Autoloader","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","owner":"Golmote","after":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","owner":"chriswells0"},"unescaped-markup":"Unescaped Markup","normalize-whitespace":{"title":"Normalize Whitespace","owner":"zeitgeist87","after":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","owner":"mAAdhaTTah","require":"toolbar","noCSS":true}}}; +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default","peerDependencies":"markup"},"clike":{"title":"C-like","option":"default","overrideExampleHeader":true},"javascript":{"title":"JavaScript","require":"clike","peerDependencies":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"Augmented Backus–Naur form","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","peerDependencies":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"Backus–Naur form","alias":"rbnf","aliasTitles":{"rbnf":"Routing Backus–Naur form"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"Extended Backus–Naur form","owner":"RunDevelopment"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment"},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","peerDependencies":["css","coffeescript","erb","javascript","less","markdown","ruby","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"http":{"title":"HTTP","peerDependencies":["javascript","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"peerDependencies":["scala"],"owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","peerDependencies":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike"],"peerDependencies":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","peerDependencies":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","owner":"CupOfTea696"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"less":{"title":"Less","require":"css","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","peerDependencies":["jsdoc"],"alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"nasm":{"title":"NASM","owner":"rbmj"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"cpp","peerDependencies":["c","cpp"],"overrideExampleHeader":true,"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"peerDependencies":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","peerDependencies":["c","cpp","fortran"],"owner":"Golmote"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"peerDependencies":["jsdoc","js-extras"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","peerDependencies":["actionscript","coffeescript","flow","javascript","typescript","vala"],"owner":"RunDevelopment"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","peerDependencies":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","alias":"ts","owner":"vkbansal"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","visual-basic"],"owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":"Line Highlight","line-numbers":{"title":"Line Numbers","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","after":["autolinker","data-uri-highlight"]},"autolinker":"Autolinker","wpd":"WebPlatform Docs","custom-class":{"title":"Custom Class","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","noCSS":true},"show-language":{"title":"Show Language","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","owner":"Golmote","noCSS":true},"previewers":{"title":"Previewers","owner":"Golmote"},"autoloader":{"title":"Autoloader","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","owner":"Golmote","after":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","owner":"chriswells0"},"unescaped-markup":"Unescaped Markup","normalize-whitespace":{"title":"Normalize Whitespace","owner":"zeitgeist87","after":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","owner":"mAAdhaTTah","require":"toolbar","noCSS":true}}}; if (typeof module !== 'undefined' && module.exports) { module.exports = components; } \ No newline at end of file diff --git a/components.json b/components.json index a67923dcdc..13df40a858 100644 --- a/components.json +++ b/components.json @@ -507,6 +507,12 @@ "require": "css", "owner": "Golmote" }, + "lilypond": { + "title": "LilyPond", + "require": "scheme", + "alias": "ly", + "owner": "RunDevelopment" + }, "liquid": { "title": "Liquid", "owner": "cinhtau" diff --git a/components/prism-lilypond.js b/components/prism-lilypond.js new file mode 100644 index 0000000000..0e02fd0e9d --- /dev/null +++ b/components/prism-lilypond.js @@ -0,0 +1,69 @@ +(function (Prism) { + + var schemeExpression = /\((?:[^();"#\\]|\\[\s\S]|;.*|"(?:[^"\\]|\\.)*"|#(?:\{(?:(?!#\})[\s\S])*#\}|[^{])|)*\)/.source; + // allow for up to pow(2, recursivenessLog2) many levels of recursive brace expressions + // For some reason, this can't be 4 + var recursivenessLog2 = 5; + for (var i = 0; i < recursivenessLog2; i++) { + schemeExpression = schemeExpression.replace(//g, schemeExpression); + } + schemeExpression = schemeExpression.replace(//g, /[^\s\S]/.source); + + + var lilypond = Prism.languages.lilypond = { + 'comment': /%(?:(?!\{).*|\{[\s\S]*?%\})/, + 'embedded-scheme': { + pattern: RegExp(/(^|[=\s])#(?:"(?:[^"\\]|\\.)*"|[^\s()"]*(?:[^\s()]|))/.source.replace(//g, schemeExpression), 'm'), + lookbehind: true, + greedy: true, + inside: { + 'scheme': { + pattern: /^(#)[\s\S]+$/, + lookbehind: true, + alias: 'language-scheme', + inside: { + 'embedded-lilypond': { + pattern: /#\{[\s\S]*?#\}/, + greedy: true, + inside: { + 'punctuation': /^#\{|#\}$/, + 'lilypond': { + pattern: /[\s\S]+/, + alias: 'language-lilypond', + inside: null // see below + } + } + }, + rest: Prism.languages.scheme + } + }, + 'punctuation': /#/ + } + }, + 'string': { + pattern: /"(?:[^"\\]|\\.)*"/, + greedy: true + }, + 'class-name': { + pattern: /(\\new\s+)[\w-]+/, + lookbehind: true + }, + 'keyword': { + pattern: /\\[a-z][-\w]*/i, + inside: { + 'punctuation': /^\\/ + } + }, + 'operator': /[=|]|<<|>>/, + 'punctuation': { + pattern: /(^|[a-z\d])(?:'+|,+|[_^]?-[_^]?(?:[-+^!>._]|(?=\d))|[_^]\.?|[.!])|[{}()[\]<>^~]|\\[()[\]<>\\!]|--|__/, + lookbehind: true + }, + 'number': /\b\d+(?:\/\d+)?\b/ + }; + + lilypond['embedded-scheme'].inside['scheme'].inside['embedded-lilypond'].inside['lilypond'].inside = lilypond; + + Prism.languages.ly = lilypond; + +}(Prism)); diff --git a/components/prism-lilypond.min.js b/components/prism-lilypond.min.js new file mode 100644 index 0000000000..72bb5baf83 --- /dev/null +++ b/components/prism-lilypond.min.js @@ -0,0 +1 @@ +!function(e){for(var n='\\((?:[^();"#\\\\]|\\\\[\\s\\S]|;.*|"(?:[^"\\\\]|\\\\.)*"|#(?:\\{(?:(?!#\\})[\\s\\S])*#\\}|[^{])|)*\\)',d=0;d<5;d++)n=n.replace(//g,n);n=n.replace(//g,"[^\\s\\S]");var i=e.languages.lilypond={comment:/%(?:(?!\{).*|\{[\s\S]*?%\})/,"embedded-scheme":{pattern:RegExp('(^|[=\\s])#(?:"(?:[^"\\\\]|\\\\.)*"|[^\\s()"]*(?:[^\\s()]|))'.replace(//g,n),"m"),lookbehind:!0,greedy:!0,inside:{scheme:{pattern:/^(#)[\s\S]+$/,lookbehind:!0,alias:"language-scheme",inside:{"embedded-lilypond":{pattern:/#\{[\s\S]*?#\}/,greedy:!0,inside:{punctuation:/^#\{|#\}$/,lilypond:{pattern:/[\s\S]+/,alias:"language-lilypond",inside:null}}},rest:e.languages.scheme}},punctuation:/#/}},string:{pattern:/"(?:[^"\\]|\\.)*"/,greedy:!0},"class-name":{pattern:/(\\new\s+)[\w-]+/,lookbehind:!0},keyword:{pattern:/\\[a-z][-\w]*/i,inside:{punctuation:/^\\/}},operator:/[=|]|<<|>>/,punctuation:{pattern:/(^|[a-z\d])(?:'+|,+|[_^]?-[_^]?(?:[-+^!>._]|(?=\d))|[_^]\.?|[.!])|[{}()[\]<>^~]|\\[()[\]<>\\!]|--|__/,lookbehind:!0},number:/\b\d+(?:\/\d+)?\b/};i["embedded-scheme"].inside.scheme.inside["embedded-lilypond"].inside.lilypond.inside=i,e.languages.ly=i}(Prism); \ No newline at end of file diff --git a/plugins/autoloader/prism-autoloader.js b/plugins/autoloader/prism-autoloader.js index 3a85fc16b0..a7db119771 100644 --- a/plugins/autoloader/prism-autoloader.js +++ b/plugins/autoloader/prism-autoloader.js @@ -55,6 +55,7 @@ "json5": "json", "kotlin": "clike", "less": "css", + "lilypond": "scheme", "markdown": "markup", "markup-templating": "markup", "n4js": "javascript", @@ -139,6 +140,7 @@ "hs": "haskell", "tex": "latex", "context": "latex", + "ly": "lilypond", "emacs": "lisp", "elisp": "lisp", "emacs-lisp": "lisp", diff --git a/plugins/autoloader/prism-autoloader.min.js b/plugins/autoloader/prism-autoloader.min.js index 28fd865cf0..3bb07d0510 100644 --- a/plugins/autoloader/prism-autoloader.min.js +++ b/plugins/autoloader/prism-autoloader.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof self&&self.Prism&&self.document&&document.createElement){var r={javascript:"clike",actionscript:"javascript",arduino:"cpp",aspnet:["markup","csharp"],bison:"c",c:"clike",csharp:"clike",cpp:"c",coffeescript:"javascript",crystal:"ruby","css-extras":"css",d:"clike",dart:"clike",django:"markup-templating",ejs:["javascript","markup-templating"],erb:["ruby","markup-templating"],fsharp:"clike",flow:"javascript",glsl:"clike",gml:"clike",go:"clike",groovy:"clike",haml:"ruby",handlebars:"markup-templating",haxe:"clike",java:"clike",javadoc:["markup","java","javadoclike"],jolie:"clike",jsdoc:["javascript","javadoclike"],"js-extras":"javascript",jsonp:"json",json5:"json",kotlin:"clike",less:"css",markdown:"markup","markup-templating":"markup",n4js:"javascript",nginx:"clike",objectivec:"c",opencl:"cpp",parser:"markup",php:["clike","markup-templating"],phpdoc:["php","javadoclike"],"php-extras":"php",plsql:"sql",processing:"clike",protobuf:"clike",pug:["markup","javascript"],qore:"clike",jsx:["markup","javascript"],tsx:["jsx","typescript"],reason:"clike",ruby:"clike",sass:"css",scss:"css",scala:"java","shell-session":"bash",smarty:"markup-templating",soy:"markup-templating",swift:"clike",tap:"yaml",textile:"markup",tt2:["clike","markup-templating"],twig:"markup",typescript:"javascript","t4-cs":["t4-templating","csharp"],"t4-vb":["t4-templating","visual-basic"],vala:"clike",vbnet:"basic",velocity:"markup",wiki:"markup",xeora:"markup",xquery:"markup"},n={html:"markup",xml:"markup",svg:"markup",mathml:"markup",js:"javascript",adoc:"asciidoc",shell:"bash",rbnf:"bnf",cs:"csharp",dotnet:"csharp",coffee:"coffeescript",jinja2:"django","dns-zone":"dns-zone-file",dockerfile:"docker",gamemakerlanguage:"gml",hs:"haskell",tex:"latex",context:"latex",emacs:"lisp",elisp:"lisp","emacs-lisp":"lisp",md:"markdown",n4jsd:"n4js",objectpascal:"pascal",px:"pcaxis",py:"python",rb:"ruby",ts:"typescript",t4:"t4-cs",vb:"visual-basic",xeoracube:"xeora",yml:"yaml"},l={},a=document.getElementsByTagName("script"),e="components/";if((a=a[a.length-1]).hasAttribute("data-autoloader-path")){var t=a.getAttribute("data-autoloader-path").trim();0 Date: Sat, 20 Jul 2019 12:54:25 +0200 Subject: [PATCH 0319/1100] reST: Fixed exponential pattern (#1986) This fixes the exponential backtracking of the second `link` pattern. --- components/prism-rest.js | 4 ++-- components/prism-rest.min.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/components/prism-rest.js b/components/prism-rest.js index 645de66c1b..d49d11f366 100644 --- a/components/prism-rest.js +++ b/components/prism-rest.js @@ -186,7 +186,7 @@ Prism.languages.rest = { } }, { - pattern: /(?:\b[a-z\d](?:[_.:+]?[a-z\d]+)*_?_|`[^`]+`_?_|_`[^`]+`)(?=[\s\-.,:;!?\\\/'")\]}]|$)/i, + pattern: /(?:\b[a-z\d]+(?:[_.:+][a-z\d]+)*_?_|`[^`]+`_?_|_`[^`]+`)(?=[\s\-.,:;!?\\\/'")\]}]|$)/i, alias: 'string', inside: { 'punctuation': /^_?`|`$|`?_?_$/ @@ -202,4 +202,4 @@ Prism.languages.rest = { pattern: /(^\s*)(?:\|(?= |$)|(?:---?|—|\.\.|__)(?= )|\.\.$)/m, lookbehind: true } -}; \ No newline at end of file +}; diff --git a/components/prism-rest.min.js b/components/prism-rest.min.js index 92b620f2cf..4052f5a3bf 100644 --- a/components/prism-rest.min.js +++ b/components/prism-rest.min.js @@ -1 +1 @@ -Prism.languages.rest={table:[{pattern:/(\s*)(?:\+[=-]+)+\+(?:\r?\n|\r)(?:\1(?:[+|].+)+[+|](?:\r?\n|\r))+\1(?:\+[=-]+)+\+/,lookbehind:!0,inside:{punctuation:/\||(?:\+[=-]+)+\+/}},{pattern:/(\s*)(?:=+ +)+=+(?:(?:\r?\n|\r)\1.+)+(?:\r?\n|\r)\1(?:=+ +)+=+(?=(?:\r?\n|\r){2}|\s*$)/,lookbehind:!0,inside:{punctuation:/[=-]+/}}],"substitution-def":{pattern:/(^\s*\.\. )\|(?:[^|\s](?:[^|]*[^|\s])?)\| [^:]+::/m,lookbehind:!0,inside:{substitution:{pattern:/^\|(?:[^|\s]|[^|\s][^|]*[^|\s])\|/,alias:"attr-value",inside:{punctuation:/^\||\|$/}},directive:{pattern:/( +)[^:]+::/,lookbehind:!0,alias:"function",inside:{punctuation:/::$/}}}},"link-target":[{pattern:/(^\s*\.\. )\[[^\]]+\]/m,lookbehind:!0,alias:"string",inside:{punctuation:/^\[|\]$/}},{pattern:/(^\s*\.\. )_(?:`[^`]+`|(?:[^:\\]|\\.)+):/m,lookbehind:!0,alias:"string",inside:{punctuation:/^_|:$/}}],directive:{pattern:/(^\s*\.\. )[^:]+::/m,lookbehind:!0,alias:"function",inside:{punctuation:/::$/}},comment:{pattern:/(^\s*\.\.)(?:(?: .+)?(?:(?:\r?\n|\r).+)+| .+)(?=(?:\r?\n|\r){2}|$)/m,lookbehind:!0},title:[{pattern:/^(([!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~])\2+)(?:\r?\n|\r).+(?:\r?\n|\r)\1$/m,inside:{punctuation:/^[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~]+|[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~]+$/,important:/.+/}},{pattern:/(^|(?:\r?\n|\r){2}).+(?:\r?\n|\r)([!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~])\2+(?=\r?\n|\r|$)/,lookbehind:!0,inside:{punctuation:/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~]+$/,important:/.+/}}],hr:{pattern:/((?:\r?\n|\r){2})([!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~])\2{3,}(?=(?:\r?\n|\r){2})/,lookbehind:!0,alias:"punctuation"},field:{pattern:/(^\s*):[^:\r\n]+:(?= )/m,lookbehind:!0,alias:"attr-name"},"command-line-option":{pattern:/(^\s*)(?:[+-][a-z\d]|(?:--|\/)[a-z\d-]+)(?:[ =](?:[a-z][\w-]*|<[^<>]+>))?(?:, (?:[+-][a-z\d]|(?:--|\/)[a-z\d-]+)(?:[ =](?:[a-z][\w-]*|<[^<>]+>))?)*(?=(?:\r?\n|\r)? {2,}\S)/im,lookbehind:!0,alias:"symbol"},"literal-block":{pattern:/::(?:\r?\n|\r){2}([ \t]+).+(?:(?:\r?\n|\r)\1.+)*/,inside:{"literal-block-punctuation":{pattern:/^::/,alias:"punctuation"}}},"quoted-literal-block":{pattern:/::(?:\r?\n|\r){2}([!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~]).*(?:(?:\r?\n|\r)\1.*)*/,inside:{"literal-block-punctuation":{pattern:/^(?:::|([!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~])\1*)/m,alias:"punctuation"}}},"list-bullet":{pattern:/(^\s*)(?:[*+\-•‣⁃]|\(?(?:\d+|[a-z]|[ivxdclm]+)\)|(?:\d+|[a-z]|[ivxdclm]+)\.)(?= )/im,lookbehind:!0,alias:"punctuation"},"doctest-block":{pattern:/(^\s*)>>> .+(?:(?:\r?\n|\r).+)*/m,lookbehind:!0,inside:{punctuation:/^>>>/}},inline:[{pattern:/(^|[\s\-:\/'"<(\[{])(?::[^:]+:`.*?`|`.*?`:[^:]+:|(\*\*?|``?|\|)(?!\s).*?[^\s]\2(?=[\s\-.,:;!?\\\/'")\]}]|$))/m,lookbehind:!0,inside:{bold:{pattern:/(^\*\*).+(?=\*\*$)/,lookbehind:!0},italic:{pattern:/(^\*).+(?=\*$)/,lookbehind:!0},"inline-literal":{pattern:/(^``).+(?=``$)/,lookbehind:!0,alias:"symbol"},role:{pattern:/^:[^:]+:|:[^:]+:$/,alias:"function",inside:{punctuation:/^:|:$/}},"interpreted-text":{pattern:/(^`).+(?=`$)/,lookbehind:!0,alias:"attr-value"},substitution:{pattern:/(^\|).+(?=\|$)/,lookbehind:!0,alias:"attr-value"},punctuation:/\*\*?|``?|\|/}}],link:[{pattern:/\[[^\]]+\]_(?=[\s\-.,:;!?\\\/'")\]}]|$)/,alias:"string",inside:{punctuation:/^\[|\]_$/}},{pattern:/(?:\b[a-z\d](?:[_.:+]?[a-z\d]+)*_?_|`[^`]+`_?_|_`[^`]+`)(?=[\s\-.,:;!?\\\/'")\]}]|$)/i,alias:"string",inside:{punctuation:/^_?`|`$|`?_?_$/}}],punctuation:{pattern:/(^\s*)(?:\|(?= |$)|(?:---?|—|\.\.|__)(?= )|\.\.$)/m,lookbehind:!0}}; \ No newline at end of file +Prism.languages.rest={table:[{pattern:/(\s*)(?:\+[=-]+)+\+(?:\r?\n|\r)(?:\1(?:[+|].+)+[+|](?:\r?\n|\r))+\1(?:\+[=-]+)+\+/,lookbehind:!0,inside:{punctuation:/\||(?:\+[=-]+)+\+/}},{pattern:/(\s*)(?:=+ +)+=+(?:(?:\r?\n|\r)\1.+)+(?:\r?\n|\r)\1(?:=+ +)+=+(?=(?:\r?\n|\r){2}|\s*$)/,lookbehind:!0,inside:{punctuation:/[=-]+/}}],"substitution-def":{pattern:/(^\s*\.\. )\|(?:[^|\s](?:[^|]*[^|\s])?)\| [^:]+::/m,lookbehind:!0,inside:{substitution:{pattern:/^\|(?:[^|\s]|[^|\s][^|]*[^|\s])\|/,alias:"attr-value",inside:{punctuation:/^\||\|$/}},directive:{pattern:/( +)[^:]+::/,lookbehind:!0,alias:"function",inside:{punctuation:/::$/}}}},"link-target":[{pattern:/(^\s*\.\. )\[[^\]]+\]/m,lookbehind:!0,alias:"string",inside:{punctuation:/^\[|\]$/}},{pattern:/(^\s*\.\. )_(?:`[^`]+`|(?:[^:\\]|\\.)+):/m,lookbehind:!0,alias:"string",inside:{punctuation:/^_|:$/}}],directive:{pattern:/(^\s*\.\. )[^:]+::/m,lookbehind:!0,alias:"function",inside:{punctuation:/::$/}},comment:{pattern:/(^\s*\.\.)(?:(?: .+)?(?:(?:\r?\n|\r).+)+| .+)(?=(?:\r?\n|\r){2}|$)/m,lookbehind:!0},title:[{pattern:/^(([!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~])\2+)(?:\r?\n|\r).+(?:\r?\n|\r)\1$/m,inside:{punctuation:/^[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~]+|[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~]+$/,important:/.+/}},{pattern:/(^|(?:\r?\n|\r){2}).+(?:\r?\n|\r)([!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~])\2+(?=\r?\n|\r|$)/,lookbehind:!0,inside:{punctuation:/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~]+$/,important:/.+/}}],hr:{pattern:/((?:\r?\n|\r){2})([!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~])\2{3,}(?=(?:\r?\n|\r){2})/,lookbehind:!0,alias:"punctuation"},field:{pattern:/(^\s*):[^:\r\n]+:(?= )/m,lookbehind:!0,alias:"attr-name"},"command-line-option":{pattern:/(^\s*)(?:[+-][a-z\d]|(?:--|\/)[a-z\d-]+)(?:[ =](?:[a-z][\w-]*|<[^<>]+>))?(?:, (?:[+-][a-z\d]|(?:--|\/)[a-z\d-]+)(?:[ =](?:[a-z][\w-]*|<[^<>]+>))?)*(?=(?:\r?\n|\r)? {2,}\S)/im,lookbehind:!0,alias:"symbol"},"literal-block":{pattern:/::(?:\r?\n|\r){2}([ \t]+).+(?:(?:\r?\n|\r)\1.+)*/,inside:{"literal-block-punctuation":{pattern:/^::/,alias:"punctuation"}}},"quoted-literal-block":{pattern:/::(?:\r?\n|\r){2}([!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~]).*(?:(?:\r?\n|\r)\1.*)*/,inside:{"literal-block-punctuation":{pattern:/^(?:::|([!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~])\1*)/m,alias:"punctuation"}}},"list-bullet":{pattern:/(^\s*)(?:[*+\-•‣⁃]|\(?(?:\d+|[a-z]|[ivxdclm]+)\)|(?:\d+|[a-z]|[ivxdclm]+)\.)(?= )/im,lookbehind:!0,alias:"punctuation"},"doctest-block":{pattern:/(^\s*)>>> .+(?:(?:\r?\n|\r).+)*/m,lookbehind:!0,inside:{punctuation:/^>>>/}},inline:[{pattern:/(^|[\s\-:\/'"<(\[{])(?::[^:]+:`.*?`|`.*?`:[^:]+:|(\*\*?|``?|\|)(?!\s).*?[^\s]\2(?=[\s\-.,:;!?\\\/'")\]}]|$))/m,lookbehind:!0,inside:{bold:{pattern:/(^\*\*).+(?=\*\*$)/,lookbehind:!0},italic:{pattern:/(^\*).+(?=\*$)/,lookbehind:!0},"inline-literal":{pattern:/(^``).+(?=``$)/,lookbehind:!0,alias:"symbol"},role:{pattern:/^:[^:]+:|:[^:]+:$/,alias:"function",inside:{punctuation:/^:|:$/}},"interpreted-text":{pattern:/(^`).+(?=`$)/,lookbehind:!0,alias:"attr-value"},substitution:{pattern:/(^\|).+(?=\|$)/,lookbehind:!0,alias:"attr-value"},punctuation:/\*\*?|``?|\|/}}],link:[{pattern:/\[[^\]]+\]_(?=[\s\-.,:;!?\\\/'")\]}]|$)/,alias:"string",inside:{punctuation:/^\[|\]_$/}},{pattern:/(?:\b[a-z\d]+(?:[_.:+][a-z\d]+)*_?_|`[^`]+`_?_|_`[^`]+`)(?=[\s\-.,:;!?\\\/'")\]}]|$)/i,alias:"string",inside:{punctuation:/^_?`|`$|`?_?_$/}}],punctuation:{pattern:/(^\s*)(?:\|(?= |$)|(?:---?|—|\.\.|__)(?= )|\.\.$)/m,lookbehind:!0}}; \ No newline at end of file From f1e16c7b463b826a53e795837284bdd53959935f Mon Sep 17 00:00:00 2001 From: realfresh Date: Sun, 21 Jul 2019 00:00:18 +0800 Subject: [PATCH 0320/1100] Added tutorial for using Prism.js with React (#1979) --- index.html | 1 + 1 file changed, 1 insertion(+) diff --git a/index.html b/index.html index 0bb0d68d9b..1691012192 100644 --- a/index.html +++ b/index.html @@ -263,6 +263,7 @@

    Third-party tutorials

  • Code syntax highlighting with Angular and Prism.js
  • Code syntax highlighting in Gutenberg, WordPress block editor
  • Code Highlighting with Prism.js in Drupal
  • +
  • Code highlighting in React using Prism.js
  • Please note that the tutorials listed here are not verified to contain correct information. Read at your risk and always check the official documentation here if something doesn’t work :)

    From 452d5c7da14797c8151632302b31c0b1563f6857 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Sun, 21 Jul 2019 20:06:02 +0200 Subject: [PATCH 0321/1100] Autoloader: Improved component path guessing (#1928) This changes the behavior of how the Autoloader handles `data-autoloader-path` attributes and guesses the components path. The CDN example on the front page was also updated. --- index.html | 3 +-- plugins/autoloader/index.html | 2 +- plugins/autoloader/prism-autoloader.js | 31 +++++++++++++++------- plugins/autoloader/prism-autoloader.min.js | 2 +- 4 files changed, 24 insertions(+), 14 deletions(-) diff --git a/index.html b/index.html index 1691012192..62797b18d0 100644 --- a/index.html +++ b/index.html @@ -167,8 +167,7 @@

    Usage with CDNs

    <body> ... <script src="https://myCDN.com/prism@v1.x/components/prism-core.min.js"></script> - <script src="https://myCDN.com/prism@v1.x/plugins/autoloader/prism-autoloader.min.js"></script> - <script>Prism.plugins.autoloader.languages_path = 'https://myCDN.com/prism@v1.x/components/'</script> + <script src="https://myCDN.com/prism@v1.x/plugins/autoloader/prism-autoloader.min.js"></script> </body> </html> diff --git a/plugins/autoloader/index.html b/plugins/autoloader/index.html index c45ea87d09..3e6331ed7f 100644 --- a/plugins/autoloader/index.html +++ b/plugins/autoloader/index.html @@ -123,7 +123,7 @@

    Examples

    - + diff --git a/plugins/autoloader/prism-autoloader.js b/plugins/autoloader/prism-autoloader.js index a7db119771..2618c19dd5 100644 --- a/plugins/autoloader/prism-autoloader.js +++ b/plugins/autoloader/prism-autoloader.js @@ -168,17 +168,27 @@ var ignored_language = 'none'; - var script = document.getElementsByTagName('script'); - script = script[script.length - 1]; + var scripts = document.getElementsByTagName('script'); + var script = scripts[scripts.length - 1]; var languages_path = 'components/'; - if(script.hasAttribute('data-autoloader-path')) { - var path = script.getAttribute('data-autoloader-path').trim(); - if(path.length > 0 && !/^[a-z]+:\/\//i.test(script.src)) { - languages_path = path.replace(/\/?$/, '/'); + + var autoloaderFile = /\bplugins\/autoloader\/prism-autoloader\.(?:min\.)js$/i; + var prismFile = /[\w-]+\.(?:min\.)js$/i; + + if (script.hasAttribute('data-autoloader-path')) { + // data-autoloader-path is set, so just use it + languages_path = script.getAttribute('data-autoloader-path').trim().replace(/\/?$/, '/'); + } else { + var src = script.src; + if (autoloaderFile.test(src)) { + // the script is the original autoloader script in the usual Prism project structure + languages_path = src.replace(autoloaderFile, 'components/'); + } else if (prismFile.test(src)) { + // the script is part of a bundle like a custom prism.js from the download page + languages_path = src.replace(prismFile, 'components/'); } - } else if (/[\w-]+\.js$/.test(script.src)) { - languages_path = script.src.replace(/[\w-]+\.js$/, 'components/'); } + var config = Prism.plugins.autoloader = { languages_path: languages_path, use_minified: true @@ -229,8 +239,9 @@ // Look for additional dependencies defined on the or
     tags
     		var deps = elt.getAttribute('data-dependencies');
    -		if (!deps && elt.parentNode && elt.parentNode.tagName.toLowerCase() === 'pre') {
    -			deps = elt.parentNode.getAttribute('data-dependencies');
    +		var parent = elt.parentElement;
    +		if (!deps && parent && parent.tagName.toLowerCase() === 'pre') {
    +			deps = parent.getAttribute('data-dependencies');
     		}
     
     		if (deps) {
    diff --git a/plugins/autoloader/prism-autoloader.min.js b/plugins/autoloader/prism-autoloader.min.js
    index 3bb07d0510..28f928bf87 100644
    --- a/plugins/autoloader/prism-autoloader.min.js
    +++ b/plugins/autoloader/prism-autoloader.min.js
    @@ -1 +1 @@
    -!function(){if("undefined"!=typeof self&&self.Prism&&self.document&&document.createElement){var r={javascript:"clike",actionscript:"javascript",arduino:"cpp",aspnet:["markup","csharp"],bison:"c",c:"clike",csharp:"clike",cpp:"c",coffeescript:"javascript",crystal:"ruby","css-extras":"css",d:"clike",dart:"clike",django:"markup-templating",ejs:["javascript","markup-templating"],erb:["ruby","markup-templating"],fsharp:"clike",flow:"javascript",glsl:"clike",gml:"clike",go:"clike",groovy:"clike",haml:"ruby",handlebars:"markup-templating",haxe:"clike",java:"clike",javadoc:["markup","java","javadoclike"],jolie:"clike",jsdoc:["javascript","javadoclike"],"js-extras":"javascript",jsonp:"json",json5:"json",kotlin:"clike",less:"css",lilypond:"scheme",markdown:"markup","markup-templating":"markup",n4js:"javascript",nginx:"clike",objectivec:"c",opencl:"cpp",parser:"markup",php:["clike","markup-templating"],phpdoc:["php","javadoclike"],"php-extras":"php",plsql:"sql",processing:"clike",protobuf:"clike",pug:["markup","javascript"],qore:"clike",jsx:["markup","javascript"],tsx:["jsx","typescript"],reason:"clike",ruby:"clike",sass:"css",scss:"css",scala:"java","shell-session":"bash",smarty:"markup-templating",soy:"markup-templating",swift:"clike",tap:"yaml",textile:"markup",tt2:["clike","markup-templating"],twig:"markup",typescript:"javascript","t4-cs":["t4-templating","csharp"],"t4-vb":["t4-templating","visual-basic"],vala:"clike",vbnet:"basic",velocity:"markup",wiki:"markup",xeora:"markup",xquery:"markup"},n={html:"markup",xml:"markup",svg:"markup",mathml:"markup",js:"javascript",adoc:"asciidoc",shell:"bash",rbnf:"bnf",cs:"csharp",dotnet:"csharp",coffee:"coffeescript",jinja2:"django","dns-zone":"dns-zone-file",dockerfile:"docker",gamemakerlanguage:"gml",hs:"haskell",tex:"latex",context:"latex",ly:"lilypond",emacs:"lisp",elisp:"lisp","emacs-lisp":"lisp",md:"markdown",n4jsd:"n4js",objectpascal:"pascal",px:"pcaxis",py:"python",rb:"ruby",ts:"typescript",t4:"t4-cs",vb:"visual-basic",xeoracube:"xeora",yml:"yaml"},l={},a=document.getElementsByTagName("script"),e="components/";if((a=a[a.length-1]).hasAttribute("data-autoloader-path")){var t=a.getAttribute("data-autoloader-path").trim();0
    Date: Sun, 21 Jul 2019 22:59:46 +0200
    Subject: [PATCH 0322/1100] Highlight JS tagged template literals (#1931)
    
    This adds support for highlighting embedded languages in JavaScript tagged template literals.
    ---
     components.js                                 |   2 +-
     components.json                               |  16 +-
     components/prism-javascript.js                |   9 +-
     components/prism-javascript.min.js            |   2 +-
     components/prism-js-templates.js              | 346 ++++++++++++++++++
     components/prism-js-templates.min.js          |   1 +
     examples/prism-js-templates.html              |  25 ++
     plugins/autoloader/prism-autoloader.js        |   1 +
     plugins/autoloader/prism-autoloader.min.js    |   2 +-
     plugins/show-language/prism-show-language.js  |   1 +
     .../show-language/prism-show-language.min.js  |   2 +-
     prism.js                                      |   9 +-
     .../css_inclusion.test                        | 157 ++++++++
     .../graphql_inclusion.test                    |  44 +++
     .../markdown_inclusion.test                   |  35 ++
     .../markup_inclusion.test                     | 192 ++++++++++
     tests/languages/javascript/issue1397.test     |  10 +-
     .../javascript/template-string_feature.test   |  44 ++-
     tests/languages/jsx/issue1335.test            |  29 +-
     tests/languages/jsx/issue1408.test            |  11 +-
     .../markup!+css+javascript/issue1240.test     |   4 +-
     21 files changed, 901 insertions(+), 41 deletions(-)
     create mode 100644 components/prism-js-templates.js
     create mode 100644 components/prism-js-templates.min.js
     create mode 100644 examples/prism-js-templates.html
     create mode 100644 tests/languages/javascript!+css+js-templates/css_inclusion.test
     create mode 100644 tests/languages/javascript!+graphql+js-templates/graphql_inclusion.test
     create mode 100644 tests/languages/javascript!+markdown+js-templates/markdown_inclusion.test
     create mode 100644 tests/languages/javascript!+markup+js-templates/markup_inclusion.test
    
    diff --git a/components.js b/components.js
    index 3a5e71c68e..c743c6da60 100644
    --- a/components.js
    +++ b/components.js
    @@ -1,2 +1,2 @@
    -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default","peerDependencies":"markup"},"clike":{"title":"C-like","option":"default","overrideExampleHeader":true},"javascript":{"title":"JavaScript","require":"clike","peerDependencies":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"Augmented Backus–Naur form","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","peerDependencies":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"Backus–Naur form","alias":"rbnf","aliasTitles":{"rbnf":"Routing Backus–Naur form"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"Extended Backus–Naur form","owner":"RunDevelopment"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment"},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","peerDependencies":["css","coffeescript","erb","javascript","less","markdown","ruby","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"http":{"title":"HTTP","peerDependencies":["javascript","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"peerDependencies":["scala"],"owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","peerDependencies":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike"],"peerDependencies":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","peerDependencies":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","owner":"CupOfTea696"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"less":{"title":"Less","require":"css","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","peerDependencies":["jsdoc"],"alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"nasm":{"title":"NASM","owner":"rbmj"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"cpp","peerDependencies":["c","cpp"],"overrideExampleHeader":true,"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"peerDependencies":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","peerDependencies":["c","cpp","fortran"],"owner":"Golmote"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"peerDependencies":["jsdoc","js-extras"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","peerDependencies":["actionscript","coffeescript","flow","javascript","typescript","vala"],"owner":"RunDevelopment"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","peerDependencies":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","alias":"ts","owner":"vkbansal"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","visual-basic"],"owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":"Line Highlight","line-numbers":{"title":"Line Numbers","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","after":["autolinker","data-uri-highlight"]},"autolinker":"Autolinker","wpd":"WebPlatform Docs","custom-class":{"title":"Custom Class","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","noCSS":true},"show-language":{"title":"Show Language","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","owner":"Golmote","noCSS":true},"previewers":{"title":"Previewers","owner":"Golmote"},"autoloader":{"title":"Autoloader","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","owner":"Golmote","after":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","owner":"chriswells0"},"unescaped-markup":"Unescaped Markup","normalize-whitespace":{"title":"Normalize Whitespace","owner":"zeitgeist87","after":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","owner":"mAAdhaTTah","require":"toolbar","noCSS":true}}};
    +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default","peerDependencies":"markup"},"clike":{"title":"C-like","option":"default","overrideExampleHeader":true},"javascript":{"title":"JavaScript","require":"clike","peerDependencies":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"Augmented Backus–Naur form","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","peerDependencies":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"Backus–Naur form","alias":"rbnf","aliasTitles":{"rbnf":"Routing Backus–Naur form"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"Extended Backus–Naur form","owner":"RunDevelopment"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment"},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","peerDependencies":["css","coffeescript","erb","javascript","less","markdown","ruby","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"http":{"title":"HTTP","peerDependencies":["javascript","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"peerDependencies":["scala"],"owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","peerDependencies":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike"],"peerDependencies":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","peerDependencies":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"js-templates":{"title":"JS Templates","require":"javascript","peerDependencies":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"json":{"title":"JSON","owner":"CupOfTea696"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"less":{"title":"Less","require":"css","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","peerDependencies":["jsdoc"],"alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"nasm":{"title":"NASM","owner":"rbmj"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"cpp","peerDependencies":["c","cpp"],"overrideExampleHeader":true,"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"peerDependencies":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","peerDependencies":["c","cpp","fortran"],"owner":"Golmote"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"peerDependencies":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","peerDependencies":["actionscript","coffeescript","flow","javascript","typescript","vala"],"owner":"RunDevelopment"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","peerDependencies":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","peerDependencies":"js-templates","alias":"ts","owner":"vkbansal"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","visual-basic"],"owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":"Line Highlight","line-numbers":{"title":"Line Numbers","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","after":["autolinker","data-uri-highlight"]},"autolinker":"Autolinker","wpd":"WebPlatform Docs","custom-class":{"title":"Custom Class","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","noCSS":true},"show-language":{"title":"Show Language","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","owner":"Golmote","noCSS":true},"previewers":{"title":"Previewers","owner":"Golmote"},"autoloader":{"title":"Autoloader","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","owner":"Golmote","after":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","owner":"chriswells0"},"unescaped-markup":"Unescaped Markup","normalize-whitespace":{"title":"Normalize Whitespace","owner":"zeitgeist87","after":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","owner":"mAAdhaTTah","require":"toolbar","noCSS":true}}};
     if (typeof module !== 'undefined' && module.exports) { module.exports = components; }
    \ No newline at end of file
    diff --git a/components.json b/components.json
    index 13df40a858..2ce8d47b60 100644
    --- a/components.json
    +++ b/components.json
    @@ -466,6 +466,18 @@
     			],
     			"owner": "RunDevelopment"
     		},
    +		"js-templates": {
    +			"title": "JS Templates",
    +			"require": "javascript",
    +			"peerDependencies": [
    +				"css",
    +				"css-extras",
    +				"graphql",
    +				"markdown",
    +				"markup"
    +			],
    +			"owner": "RunDevelopment"
    +		},
     		"json": {
     			"title": "JSON",
     			"owner": "CupOfTea696"
    @@ -750,7 +762,8 @@
     			"require": ["markup", "javascript"],
     			"peerDependencies": [
     				"jsdoc",
    -				"js-extras"
    +				"js-extras",
    +				"js-templates"
     			],
     			"owner": "vkbansal"
     		},
    @@ -892,6 +905,7 @@
     		"typescript": {
     			"title": "TypeScript",
     			"require": "javascript",
    +			"peerDependencies": "js-templates",
     			"alias": "ts",
     			"owner": "vkbansal"
     		},
    diff --git a/components/prism-javascript.js b/components/prism-javascript.js
    index 9880c4af27..c33438665d 100644
    --- a/components/prism-javascript.js
    +++ b/components/prism-javascript.js
    @@ -61,11 +61,16 @@ Prism.languages.insertBefore('javascript', 'keyword', {
     
     Prism.languages.insertBefore('javascript', 'string', {
     	'template-string': {
    -		pattern: /`(?:\\[\s\S]|\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}|[^\\`])*`/,
    +		pattern: /`(?:\\[\s\S]|\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}|(?!\${)[^\\`])*`/,
     		greedy: true,
     		inside: {
    +			'template-punctuation': {
    +				pattern: /^`|`$/,
    +				alias: 'string'
    +			},
     			'interpolation': {
    -				pattern: /\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}/,
    +				pattern: /((?:^|[^\\])(?:\\{2})*)\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}/,
    +				lookbehind: true,
     				inside: {
     					'interpolation-punctuation': {
     						pattern: /^\${|}$/,
    diff --git a/components/prism-javascript.min.js b/components/prism-javascript.min.js
    index ca3012a9fc..e912acdc26 100644
    --- a/components/prism-javascript.min.js
    +++ b/components/prism-javascript.min.js
    @@ -1 +1 @@
    -Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])[_$A-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\.(?:prototype|constructor))/,lookbehind:!0}],keyword:[{pattern:/((?:^|})\s*)(?:catch|finally)\b/,lookbehind:!0},{pattern:/(^|[^.])\b(?:as|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],number:/\b(?:(?:0[xX](?:[\dA-Fa-f](?:_[\dA-Fa-f])?)+|0[bB](?:[01](?:_[01])?)+|0[oO](?:[0-7](?:_[0-7])?)+)n?|(?:\d(?:_\d)?)+n|NaN|Infinity)\b|(?:\b(?:\d(?:_\d)?)+\.?(?:\d(?:_\d)?)*|\B\.(?:\d(?:_\d)?)+)(?:[Ee][+-]?(?:\d(?:_\d)?)+)?/,function:/#?[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,operator:/-[-=]?|\+[+=]?|!=?=?|<>?>?=?|=(?:==?|>)?|&[&=]?|\|[|=]?|\*\*?=?|\/=?|~|\^=?|%=?|\?|\.{3}/}),Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/,Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s])\s*)\/(\[(?:[^\]\\\r\n]|\\.)*]|\\.|[^/\\\[\r\n])+\/[gimyus]{0,6}(?=\s*($|[\r\n,.;})\]]))/,lookbehind:!0,greedy:!0},"function-variable":{pattern:/#?[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)?\s*\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*=>)/i,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*\s*)\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),Prism.languages.insertBefore("javascript","string",{"template-string":{pattern:/`(?:\\[\s\S]|\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}|[^\\`])*`/,greedy:!0,inside:{interpolation:{pattern:/\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}/,inside:{"interpolation-punctuation":{pattern:/^\${|}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}}}),Prism.languages.markup&&Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.js=Prism.languages.javascript;
    \ No newline at end of file
    +Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])[_$A-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\.(?:prototype|constructor))/,lookbehind:!0}],keyword:[{pattern:/((?:^|})\s*)(?:catch|finally)\b/,lookbehind:!0},{pattern:/(^|[^.])\b(?:as|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],number:/\b(?:(?:0[xX](?:[\dA-Fa-f](?:_[\dA-Fa-f])?)+|0[bB](?:[01](?:_[01])?)+|0[oO](?:[0-7](?:_[0-7])?)+)n?|(?:\d(?:_\d)?)+n|NaN|Infinity)\b|(?:\b(?:\d(?:_\d)?)+\.?(?:\d(?:_\d)?)*|\B\.(?:\d(?:_\d)?)+)(?:[Ee][+-]?(?:\d(?:_\d)?)+)?/,function:/#?[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,operator:/-[-=]?|\+[+=]?|!=?=?|<>?>?=?|=(?:==?|>)?|&[&=]?|\|[|=]?|\*\*?=?|\/=?|~|\^=?|%=?|\?|\.{3}/}),Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/,Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s])\s*)\/(\[(?:[^\]\\\r\n]|\\.)*]|\\.|[^/\\\[\r\n])+\/[gimyus]{0,6}(?=\s*($|[\r\n,.;})\]]))/,lookbehind:!0,greedy:!0},"function-variable":{pattern:/#?[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)?\s*\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*=>)/i,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*\s*)\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),Prism.languages.insertBefore("javascript","string",{"template-string":{pattern:/`(?:\\[\s\S]|\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}|(?!\${)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\${|}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}}}),Prism.languages.markup&&Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.js=Prism.languages.javascript;
    \ No newline at end of file
    diff --git a/components/prism-js-templates.js b/components/prism-js-templates.js
    new file mode 100644
    index 0000000000..d4b9f69b75
    --- /dev/null
    +++ b/components/prism-js-templates.js
    @@ -0,0 +1,346 @@
    +(function (Prism) {
    +
    +	var templateString = Prism.languages.javascript['template-string'];
    +
    +	// see the pattern in prism-javascript.js
    +	var templateLiteralPattern = templateString.pattern.source;
    +	var interpolationObject = templateString.inside['interpolation'];
    +	var interpolationPunctuationObject = interpolationObject.inside['interpolation-punctuation'];
    +	var interpolationPattern = interpolationObject.pattern.source;
    +
    +
    +	/**
    +	 * Creates a new pattern to match a template string with a special tag.
    +	 *
    +	 * This will return `undefined` if there is no grammar with the given language id.
    +	 *
    +	 * @param {string} language The language id of the embedded language. E.g. `markdown`.
    +	 * @param {string} tag The regex pattern to match the tag.
    +	 * @returns {object | undefined}
    +	 * @example
    +	 * createTemplate('css', /\bcss/.source);
    +	 */
    +	function createTemplate(language, tag) {
    +		if (!Prism.languages[language]) {
    +			return undefined;
    +		}
    +
    +		return {
    +			pattern: RegExp('((?:' + tag + ')\\s*)' + templateLiteralPattern),
    +			lookbehind: true,
    +			greedy: true,
    +			inside: {
    +				'template-punctuation': {
    +					pattern: /^`|`$/,
    +					alias: 'string'
    +				},
    +				'embedded-code': {
    +					pattern: /[\s\S]+/,
    +					alias: language
    +				}
    +			}
    +		};
    +	}
    +
    +
    +	Prism.languages.javascript['template-string'] = [
    +		// styled-jsx:
    +		//   css`a { color: #25F; }`
    +		// styled-components:
    +		//   styled.h1`color: red;`
    +		createTemplate('css', /\b(?:styled(?:\([^)]*\))?(?:\s*\.\s*\w+(?:\([^)]*\))*)*|css(?:\s*\.\s*(?:global|resolve))?|createGlobalStyle|keyframes)/.source),
    +
    +		// html`

    ` + // div.innerHTML = `

    ` + createTemplate('html', /\bhtml|\.\s*(?:inner|outer)HTML\s*\+?=/.source), + + // svg`` + createTemplate('svg', /\bsvg/.source), + + // md`# h1`, markdown`## h2` + createTemplate('markdown', /\b(?:md|markdown)/.source), + + // gql`...`, graphql`...`, graphql.experimental`...` + createTemplate('graphql', /\b(?:gql|graphql(?:\s*\.\s*experimental)?)/.source), + + // vanilla template string + templateString + ].filter(Boolean); + + + /** + * Returns a specific placeholder literal for the given language. + * + * @param {number} counter + * @param {string} language + * @returns {string} + */ + function getPlaceholder(counter, language) { + return '___' + language.toUpperCase() + '_' + counter + '___'; + } + + /** + * Returns the tokens of `Prism.tokenize` but also runs the `before-tokenize` and `after-tokenize` hooks. + * + * @param {string} code + * @param {any} grammar + * @param {string} language + * @returns {(string|Token)[]} + */ + function tokenizeWithHooks(code, grammar, language) { + var env = { + code: code, + grammar: grammar, + language: language + }; + Prism.hooks.run('before-tokenize', env); + env.tokens = Prism.tokenize(env.code, env.grammar); + Prism.hooks.run('after-tokenize', env); + return env.tokens; + } + + /** + * Returns the token of the given JavaScript interpolation expression. + * + * @param {string} expression The code of the expression. E.g. `"${42}"` + * @returns {Token} + */ + function tokenizeInterpolationExpression(expression) { + var tempGrammar = {}; + tempGrammar['interpolation-punctuation'] = interpolationPunctuationObject; + + /** @type {Array} */ + var tokens = Prism.tokenize(expression, tempGrammar); + if (tokens.length === 3) { + /** + * The token array will look like this + * [ + * ["interpolation-punctuation", "${"] + * "..." // JavaScript expression of the interpolation + * ["interpolation-punctuation", "}"] + * ] + */ + + var args = [1, 1]; + args.push.apply(args, tokenizeWithHooks(tokens[1], Prism.languages.javascript, 'javascript')); + + tokens.splice.apply(tokens, args); + } + + return new Prism.Token('interpolation', tokens, interpolationObject.alias, expression); + } + + /** + * Tokenizes the given code with support for JavaScript interpolation expressions mixed in. + * + * This function has 3 phases: + * + * 1. Replace all JavaScript interpolation expression with a placeholder. + * The placeholder will have the syntax of a identify of the target language. + * 2. Tokenize the code with placeholders. + * 3. Tokenize the interpolation expressions and re-insert them into the tokenize code. + * The insertion only works if a placeholder hasn't been "ripped apart" meaning that the placeholder has been + * tokenized as two tokens by the grammar of the embedded language. + * + * @param {string} code + * @param {object} grammar + * @param {string} language + * @returns {Token} + */ + function tokenizeEmbedded(code, grammar, language) { + // 1. First filter out all interpolations + + // because they might be escaped, we need a lookbehind, so we use Prism + /** @type {(Token|string)[]} */ + var _tokens = Prism.tokenize(code, { + 'interpolation': { + pattern: RegExp(interpolationPattern), + lookbehind: true + } + }); + + // replace all interpolations with a placeholder which is not in the code already + var placeholderCounter = 0; + /** @type {Object} */ + var placeholderMap = {}; + var embeddedCode = _tokens.map(function (token) { + if (typeof token === 'string') { + return token; + } else { + var interpolationExpression = token.content; + + var placeholder; + while (code.indexOf(placeholder = getPlaceholder(placeholderCounter++, language)) !== -1) { } + placeholderMap[placeholder] = interpolationExpression; + return placeholder; + } + }).join(''); + + + // 2. Tokenize the embedded code + + var embeddedTokens = tokenizeWithHooks(embeddedCode, grammar, language); + + + // 3. Re-insert the interpolation + + var placeholders = Object.keys(placeholderMap); + placeholderCounter = 0; + + /** + * + * @param {(Token|string)[]} tokens + * @returns {void} + */ + function walkTokens(tokens) { + for (var i = 0; i < tokens.length; i++) { + if (placeholderCounter >= placeholders.length) { + return; + } + + var token = tokens[i]; + + if (typeof token === 'string' || typeof token.content === 'string') { + var placeholder = placeholders[placeholderCounter]; + var s = typeof token === 'string' ? token : /** @type {string} */ (token.content); + + var index = s.indexOf(placeholder); + if (index !== -1) { + ++placeholderCounter; + + var before = s.substring(0, index); + var middle = tokenizeInterpolationExpression(placeholderMap[placeholder]); + var after = s.substring(index + placeholder.length); + + var replacement = []; + if (before) { + replacement.push(before); + } + replacement.push(middle); + if (after) { + var afterTokens = [after]; + walkTokens(afterTokens); + replacement.push.apply(replacement, afterTokens); + } + + if (typeof token === 'string') { + tokens.splice.apply(tokens, [i, 1].concat(replacement)); + i += replacement.length - 1; + } else { + token.content = replacement; + } + } + } else { + var content = token.content; + if (Array.isArray(content)) { + walkTokens(content); + } else { + walkTokens([content]); + } + } + } + } + walkTokens(embeddedTokens); + + return new Prism.Token(language, embeddedTokens, 'language-' + language, code); + } + + /** + * The languages for which JS templating will handle tagged template literals. + * + * JS templating isn't active for only JavaScript but also related languages like TypeScript, JSX, and TSX. + */ + var supportedLanguages = { + 'javascript': true, + 'js': true, + 'typescript': true, + 'ts': true, + 'jsx': true, + 'tsx': true, + }; + Prism.hooks.add('after-tokenize', function (env) { + if (!(env.language in supportedLanguages)) { + return; + } + + /** + * Finds and tokenizes all template strings with an embedded languages. + * + * @param {(Token | string)[]} tokens + * @returns {void} + */ + function findTemplateStrings(tokens) { + for (var i = 0, l = tokens.length; i < l; i++) { + var token = tokens[i]; + + if (typeof token === 'string') { + continue; + } + + var content = token.content; + if (!Array.isArray(content)) { + if (typeof content !== 'string') { + findTemplateStrings([content]); + } + continue; + } + + if (token.type === 'template-string') { + /** + * A JavaScript template-string token will look like this: + * + * ["template-string", [ + * ["template-punctuation", "`"], + * ( + * An array of "string" and "interpolation" tokens. This is the simple string case. + * or + * ["embedded-code", "..."] This is the token containing the embedded code. + * It also has an alias which is the language of the embedded code. + * ), + * ["template-punctuation", "`"] + * ]] + */ + + var embedded = content[1]; + if (content.length === 3 && typeof embedded !== 'string' && embedded.type === 'embedded-code') { + // get string content + var code = stringContent(embedded); + + var alias = embedded.alias; + var language = Array.isArray(alias) ? alias[0] : alias; + + var grammar = Prism.languages[language]; + if (!grammar) { + // the embedded language isn't registered. + continue; + } + + content[1] = tokenizeEmbedded(code, grammar, language); + } + } else { + findTemplateStrings(content); + } + } + } + + findTemplateStrings(env.tokens); + }); + + + /** + * Returns the string content of a token or token stream. + * + * @param {string | Token | (string | Token)[]} value + * @returns {string} + */ + function stringContent(value) { + if (typeof value === 'string') { + return value; + } else if (Array.isArray(value)) { + return value.map(stringContent).join(''); + } else { + return stringContent(value.content); + } + } + +}(Prism)); diff --git a/components/prism-js-templates.min.js b/components/prism-js-templates.min.js new file mode 100644 index 0000000000..ddeecd82fd --- /dev/null +++ b/components/prism-js-templates.min.js @@ -0,0 +1 @@ +!function(u){var e=u.languages.javascript["template-string"],n=e.pattern.source,a=e.inside.interpolation,i=a.inside["interpolation-punctuation"],r=a.pattern.source;function t(e,t){if(u.languages[e])return{pattern:RegExp("((?:"+t+")\\s*)"+n),lookbehind:!0,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},"embedded-code":{pattern:/[\s\S]+/,alias:e}}}}function o(e,t,n){var r={code:e,grammar:t,language:n};return u.hooks.run("before-tokenize",r),r.tokens=u.tokenize(r.code,r.grammar),u.hooks.run("after-tokenize",r),r.tokens}function d(e){var t={};t["interpolation-punctuation"]=i;var n=u.tokenize(e,t);if(3===n.length){var r=[1,1];r.push.apply(r,o(n[1],u.languages.javascript,"javascript")),n.splice.apply(n,r)}return new u.Token("interpolation",n,a.alias,e)}function c(a,e,i){var t=u.tokenize(a,{interpolation:{pattern:RegExp(r),lookbehind:!0}}),f=0,y={},n=o(t.map(function(e){if("string"==typeof e)return e;for(var t,n=e.content;-1!==a.indexOf((r=f++,t="___"+i.toUpperCase()+"_"+r+"___")););return y[t]=n,t;var r}).join(""),e,i),v=Object.keys(y);return f=0,function e(t){for(var n=0;n=v.length)return;var r=t[n];if("string"==typeof r||"string"==typeof r.content){var a=v[f],i="string"==typeof r?r:r.content,o=i.indexOf(a);if(-1!==o){++f;var s=i.substring(0,o),p=d(y[a]),l=i.substring(o+a.length),g=[];if(s&&g.push(s),g.push(p),l){var u=[l];e(u),g.push.apply(g,u)}"string"==typeof r?(t.splice.apply(t,[n,1].concat(g)),n+=g.length-1):r.content=g}}else{var c=r.content;Array.isArray(c)?e(c):e([c])}}}(n),new u.Token(i,n,"language-"+i,a)}u.languages.javascript["template-string"]=[t("css","\\b(?:styled(?:\\([^)]*\\))?(?:\\s*\\.\\s*\\w+(?:\\([^)]*\\))*)*|css(?:\\s*\\.\\s*(?:global|resolve))?|createGlobalStyle|keyframes)"),t("html","\\bhtml|\\.\\s*(?:inner|outer)HTML\\s*\\+?="),t("svg","\\bsvg"),t("markdown","\\b(?:md|markdown)"),t("graphql","\\b(?:gql|graphql(?:\\s*\\.\\s*experimental)?)"),e].filter(Boolean);var s={javascript:!0,js:!0,typescript:!0,ts:!0,jsx:!0,tsx:!0};function f(e){return"string"==typeof e?e:Array.isArray(e)?e.map(f).join(""):f(e.content)}u.hooks.add("after-tokenize",function(e){e.language in s&&!function e(t){for(var n=0,r=t.length;nHTML template literals

    +
    html`
    +<p>
    +	Foo.
    +</p>`;
    + +

    JS DOM

    +
    div.innerHTML = `<p></p>`;
    +div.outerHTML = `<p></p>`;
    + +

    styled-jsx CSS template literals

    +
    css`a:hover { color: blue; }`;
    + +

    styled-components CSS template literals

    +
    const Button = styled.button`
    +	color: blue;
    +	background: red;
    +`;
    + +

    Markdown template literals

    +
    markdown`# My title`;
    + +

    GraphQL template literals

    +
    gql`{ foo }`;
    +graphql`{ foo }`;
    diff --git a/plugins/autoloader/prism-autoloader.js b/plugins/autoloader/prism-autoloader.js index 2618c19dd5..000fbd9d79 100644 --- a/plugins/autoloader/prism-autoloader.js +++ b/plugins/autoloader/prism-autoloader.js @@ -51,6 +51,7 @@ "javadoclike" ], "js-extras": "javascript", + "js-templates": "javascript", "jsonp": "json", "json5": "json", "kotlin": "clike", diff --git a/plugins/autoloader/prism-autoloader.min.js b/plugins/autoloader/prism-autoloader.min.js index 28f928bf87..27070fde6e 100644 --- a/plugins/autoloader/prism-autoloader.min.js +++ b/plugins/autoloader/prism-autoloader.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof self&&self.Prism&&self.document&&document.createElement){var r={javascript:"clike",actionscript:"javascript",arduino:"cpp",aspnet:["markup","csharp"],bison:"c",c:"clike",csharp:"clike",cpp:"c",coffeescript:"javascript",crystal:"ruby","css-extras":"css",d:"clike",dart:"clike",django:"markup-templating",ejs:["javascript","markup-templating"],erb:["ruby","markup-templating"],fsharp:"clike",flow:"javascript",glsl:"clike",gml:"clike",go:"clike",groovy:"clike",haml:"ruby",handlebars:"markup-templating",haxe:"clike",java:"clike",javadoc:["markup","java","javadoclike"],jolie:"clike",jsdoc:["javascript","javadoclike"],"js-extras":"javascript",jsonp:"json",json5:"json",kotlin:"clike",less:"css",lilypond:"scheme",markdown:"markup","markup-templating":"markup",n4js:"javascript",nginx:"clike",objectivec:"c",opencl:"cpp",parser:"markup",php:["clike","markup-templating"],phpdoc:["php","javadoclike"],"php-extras":"php",plsql:"sql",processing:"clike",protobuf:"clike",pug:["markup","javascript"],qore:"clike",jsx:["markup","javascript"],tsx:["jsx","typescript"],reason:"clike",ruby:"clike",sass:"css",scss:"css",scala:"java","shell-session":"bash",smarty:"markup-templating",soy:"markup-templating",swift:"clike",tap:"yaml",textile:"markup",tt2:["clike","markup-templating"],twig:"markup",typescript:"javascript","t4-cs":["t4-templating","csharp"],"t4-vb":["t4-templating","visual-basic"],vala:"clike",vbnet:"basic",velocity:"markup",wiki:"markup",xeora:"markup",xquery:"markup"},n={html:"markup",xml:"markup",svg:"markup",mathml:"markup",js:"javascript",adoc:"asciidoc",shell:"bash",rbnf:"bnf",cs:"csharp",dotnet:"csharp",coffee:"coffeescript",jinja2:"django","dns-zone":"dns-zone-file",dockerfile:"docker",gamemakerlanguage:"gml",hs:"haskell",tex:"latex",context:"latex",ly:"lilypond",emacs:"lisp",elisp:"lisp","emacs-lisp":"lisp",md:"markdown",n4jsd:"n4js",objectpascal:"pascal",px:"pcaxis",py:"python",rb:"ruby",ts:"typescript",t4:"t4-cs",vb:"visual-basic",xeoracube:"xeora",yml:"yaml"},l={},a=document.getElementsByTagName("script"),e=a[a.length-1],t="components/",s=/\bplugins\/autoloader\/prism-autoloader\.(?:min\.)js$/i,i=/[\w-]+\.(?:min\.)js$/i;if(e.hasAttribute("data-autoloader-path"))t=e.getAttribute("data-autoloader-path").trim().replace(/\/?$/,"/");else{var c=e.src;s.test(c)?t=c.replace(s,"components/"):i.test(c)&&(t=c.replace(i,"components/"))}var p=Prism.plugins.autoloader={languages_path:t,use_minified:!0},o=function(a,e,t){"string"==typeof a&&(a=[a]);var s=0,i=a.length,c=function(){s + Foo. +

    `; + +div.innerHTML = `

    `; +div.outerHTML = `

    `; +div.innerHTML += `

    `; + +svg`` + +html`\${foo}` + +---------------------------------------------------- + +[ + "html", + ["template-string", [ + ["template-punctuation", "`"], + ["html", [ + ["tag", [ + ["tag", [ + ["punctuation", "<"], + "p" + ]], + ["punctuation", ">"] + ]], + "\r\n\tFoo.\r\n", + ["tag", [ + ["tag", [ + ["punctuation", ""] + ]] + ]], + ["template-punctuation", "`"] + ]], + ["punctuation", ";"], + "\r\n\r\ndiv", + ["punctuation", "."], + "innerHTML ", + ["operator", "="], + ["template-string", [ + ["template-punctuation", "`"], + ["html", [ + ["tag", [ + ["tag", [ + ["punctuation", "<"], + "p" + ]], + ["punctuation", ">"] + ]], + ["tag", [ + ["tag", [ + ["punctuation", ""] + ]] + ]], + ["template-punctuation", "`"] + ]], + ["punctuation", ";"], + "\r\ndiv", + ["punctuation", "."], + "outerHTML ", + ["operator", "="], + ["template-string", [ + ["template-punctuation", "`"], + ["html", [ + ["tag", [ + ["tag", [ + ["punctuation", "<"], + "p" + ]], + ["punctuation", ">"] + ]], + ["tag", [ + ["tag", [ + ["punctuation", ""] + ]] + ]], + ["template-punctuation", "`"] + ]], + ["punctuation", ";"], + "\r\ndiv", + ["punctuation", "."], + "innerHTML ", + ["operator", "+="], + ["template-string", [ + ["template-punctuation", "`"], + ["html", [ + ["tag", [ + ["tag", [ + ["punctuation", "<"], + "p" + ]], + ["punctuation", ">"] + ]], + ["tag", [ + ["tag", [ + ["punctuation", ""] + ]] + ]], + ["template-punctuation", "`"] + ]], + ["punctuation", ";"], + "\r\n\r\nsvg", + ["template-string", [ + ["template-punctuation", "`"], + ["svg", [ + ["tag", [ + ["tag", [ + ["punctuation", "<"], + "path" + ]], + ["attr-name", [ + "fill" + ]], + ["attr-value", [ + ["punctuation", "="], + ["punctuation", "\""], + "#fff", + ["punctuation", "\""] + ]], + ["attr-name", [ + "d" + ]], + ["attr-value", [ + ["punctuation", "="], + ["punctuation", "\""], + "M55.37 ...", + ["punctuation", "\""] + ]], + ["punctuation", "/>"] + ]] + ]], + ["template-punctuation", "`"] + ]], + "\r\n\r\nhtml", + ["template-string", [ + ["template-punctuation", "`"], + ["html", [ + ["tag", [ + ["tag", [ + ["punctuation", "<"], + "img" + ]], + ["attr-name", [ + "src" + ]], + ["attr-value", [ + ["punctuation", "="], + ["punctuation", "\""], + ["interpolation", [ + ["interpolation-punctuation", "${"], + "host", + ["interpolation-punctuation", "}"] + ]], + ["interpolation", [ + ["interpolation-punctuation", "${"], + "path", + ["interpolation-punctuation", "}"] + ]], + ["punctuation", "\""] + ]], + ["attr-name", [ + "alt" + ]], + ["attr-value", [ + ["punctuation", "="], + ["punctuation", "\""], + "\\${foo}", + ["punctuation", "\""] + ]], + ["punctuation", "/>"] + ]] + ]], + ["template-punctuation", "`"] + ]] +] + +---------------------------------------------------- + +Checks for tagged template literals containing HTML/XML code. diff --git a/tests/languages/javascript/issue1397.test b/tests/languages/javascript/issue1397.test index 6f9b5fb21e..88d3aaacab 100644 --- a/tests/languages/javascript/issue1397.test +++ b/tests/languages/javascript/issue1397.test @@ -4,18 +4,20 @@ [ ["template-string", [ - ["string", "`"], + ["template-punctuation", "`"], ["interpolation", [ ["interpolation-punctuation", "${"], ["template-string", [ - ["string", "`a string`"] + ["template-punctuation", "`"], + ["string", "a string"], + ["template-punctuation", "`"] ]], ["interpolation-punctuation", "}"] ]], - ["string", "`"] + ["template-punctuation", "`"] ]] ] ---------------------------------------------------- -Checks for nested template strings. See #1397 \ No newline at end of file +Checks for nested template strings. See #1397 diff --git a/tests/languages/javascript/template-string_feature.test b/tests/languages/javascript/template-string_feature.test index 233bbb4fa8..27c454ece1 100644 --- a/tests/languages/javascript/template-string_feature.test +++ b/tests/languages/javascript/template-string_feature.test @@ -3,6 +3,7 @@ bar` `40+2=${40+2}` `${foo()}` +`\${foo}${bar}` "foo `a` `b` `c` `d` bar" "test // test" `template` @@ -13,13 +14,18 @@ console.log(`This is ${it.with({ type: false })}!`) [ ["template-string", [ - ["string", "`foo bar`"] + ["template-punctuation", "`"], + ["string", "foo bar"], + ["template-punctuation", "`"] ]], ["template-string", [ - ["string", "`foo\r\nbar`"] + ["template-punctuation", "`"], + ["string", "foo\r\nbar"], + ["template-punctuation", "`"] ]], ["template-string", [ - ["string", "`40+2="], + ["template-punctuation", "`"], + ["string", "40+2="], ["interpolation", [ ["interpolation-punctuation", "${"], ["number", "40"], @@ -27,10 +33,10 @@ console.log(`This is ${it.with({ type: false })}!`) ["number", "2"], ["interpolation-punctuation", "}"] ]], - ["string", "`"] + ["template-punctuation", "`"] ]], ["template-string", [ - ["string", "`"], + ["template-punctuation", "`"], ["interpolation", [ ["interpolation-punctuation", "${"], ["function", "foo"], @@ -38,20 +44,32 @@ console.log(`This is ${it.with({ type: false })}!`) ["punctuation", ")"], ["interpolation-punctuation", "}"] ]], - ["string", "`"] + ["template-punctuation", "`"] + ]], + ["template-string", [ + ["template-punctuation", "`"], + ["string", "\\${foo}"], + ["interpolation", [ + ["interpolation-punctuation", "${"], + "bar", + ["interpolation-punctuation", "}"] + ]], + ["template-punctuation", "`"] ]], ["string", "\"foo `a` `b` `c` `d` bar\""], ["string", "\"test // test\""], ["template-string", [ - ["string", "`template`"] + ["template-punctuation", "`"], + ["string", "template"], + ["template-punctuation", "`"] ]], - "\r\n\r\nconsole", ["punctuation", "."], ["function", "log"], ["punctuation", "("], ["template-string", [ - ["string", "`This is "], + ["template-punctuation", "`"], + ["string", "This is "], ["interpolation", [ ["interpolation-punctuation", "${"], "it", @@ -66,12 +84,12 @@ console.log(`This is ${it.with({ type: false })}!`) ["punctuation", ")"], ["interpolation-punctuation", "}"] ]], - ["string", "!`"] + ["string", "!"], + ["template-punctuation", "`"] ]], ["punctuation", ")"], - ["template-string", [ - ["string", "`"], + ["template-punctuation", "`"], ["interpolation", [ ["interpolation-punctuation", "${"], ["punctuation", "{"], @@ -83,7 +101,7 @@ console.log(`This is ${it.with({ type: false })}!`) "foo ", ["interpolation-punctuation", "}"] ]], - ["string", "`"] + ["template-punctuation", "`"] ]] ] diff --git a/tests/languages/jsx/issue1335.test b/tests/languages/jsx/issue1335.test index 35c2704ebf..a5683ab90e 100644 --- a/tests/languages/jsx/issue1335.test +++ b/tests/languages/jsx/issue1335.test @@ -1,8 +1,8 @@
    +
    +

    Markdown

    + +

    Markdown will use the Autoloader to automatically load missing languages.

    +
    The C# code will be highlighted __after__ the rest of this document.
    +
    +```csharp
    +public class Foo : IBar<int> {
    +	public string Baz { get; set; } = "foo";
    +}
    +```
    +
    +The CSS code will be highlighted with this document because CSS has already been loaded.
    +
    +```css
    +a:hover {
    +	color: green !important;
    +}
    +```
    + +
    +
    diff --git a/plugins/autoloader/prism-autoloader.js b/plugins/autoloader/prism-autoloader.js index 000fbd9d79..2bd90ad71e 100644 --- a/plugins/autoloader/prism-autoloader.js +++ b/plugins/autoloader/prism-autoloader.js @@ -160,7 +160,7 @@ /** * @typedef LangDataItem - * @property {{ success?: function, error?: function }[]} callbacks + * @property {{ success?: () => void, error?: () => void }[]} callbacks * @property {boolean} [error] * @property {boolean} [loading] */ @@ -192,48 +192,52 @@ var config = Prism.plugins.autoloader = { languages_path: languages_path, - use_minified: true + use_minified: true, + loadLanguages: loadLanguages }; + /** - * Lazy loads an external script + * Lazily loads an external script. + * * @param {string} src - * @param {function=} success - * @param {function=} error + * @param {() => void} [success] + * @param {() => void} [error] */ - var addScript = function (src, success, error) { + function addScript(src, success, error) { var s = document.createElement('script'); s.src = src; s.async = true; - s.onload = function() { + s.onload = function () { document.body.removeChild(s); success && success(); }; - s.onerror = function() { + s.onerror = function () { document.body.removeChild(s); error && error(); }; document.body.appendChild(s); - }; + } /** * Returns the path to a grammar, using the language_path and use_minified config keys. + * * @param {string} lang * @returns {string} */ - var getLanguagePath = function (lang) { + function getLanguagePath(lang) { return config.languages_path + 'prism-' + lang + (config.use_minified ? '.min' : '') + '.js' - }; + } /** - * Tries to load a grammar and - * highlight again the given element once loaded. + * Tries to load the grammar(s) and once loaded, highlights the given element again. + * * @param {string} lang * @param {HTMLElement} elt */ - var registerElement = function (lang, elt) { + function registerElement(lang, elt) { if (lang in lang_aliases) { lang = lang_aliases[lang]; } @@ -256,42 +260,60 @@ Prism.highlightElement(elt); }); }); - }; + } /** - * Sequentially loads an array of grammars. - * @param {string[]|string} langs - * @param {function=} success - * @param {function=} error + * Loads all given grammars concurrently. + * + * @param {string[]|string} languages + * @param {(languages: string[]) => void} [success] + * @param {(language: string) => void} [error] This callback will be invoked on the first language to fail. */ - var loadLanguages = function (langs, success, error) { - if (typeof langs === 'string') { - langs = [langs]; + function loadLanguages(languages, success, error) { + if (typeof languages === 'string') { + languages = [languages]; } - var i = 0; - var l = langs.length; - var f = function () { - if (i < l) { - loadLanguage(langs[i], function () { - i++; - f(); - }, function () { - error && error(langs[i]); - }); - } else if (i === l) { - success && success(langs); + + var total = languages.length; + var completed = 0; + var failed = false; + + if (total === 0) { + if (success) { + setTimeout(success, 0); } - }; - f(); - }; + return; + } + + function successCallback() { + if (failed) { + return; + } + completed++; + if (completed === total) { + success && success(languages); + } + } + + languages.forEach(function (lang) { + loadLanguage(lang, successCallback, function () { + if (failed) { + return; + } + failed = true; + error && error(lang); + }); + }); + } /** - * Load a grammar with its dependencies + * Loads a grammar with its dependencies. + * * @param {string} lang - * @param {function=} success - * @param {function=} error + * @param {() => void} [success] + * @param {() => void} [error] */ - var loadLanguage = function (lang, success, error) { + function loadLanguage(lang, success, error) { var force = lang.indexOf('!') >= 0; lang = lang.replace('!', ''); @@ -310,63 +332,50 @@ }); if (!force && Prism.languages[lang]) { - languageSuccess(lang); + languageCallback(lang, "success"); } else if (!force && data.error) { - languageError(lang); + languageCallback(lang, "error"); } else if (force || !data.loading) { data.loading = true; var src = getLanguagePath(lang); addScript(src, function () { data.loading = false; - languageSuccess(lang); + languageCallback(lang, "success"); }, function () { data.loading = false; data.error = true; - languageError(lang); + languageCallback(lang, "error"); }); } }; var dependencies = lang_dependencies[lang]; - if(dependencies && dependencies.length) { - loadLanguages(dependencies, load); + if (dependencies && dependencies.length) { + loadLanguages(dependencies, load, error); } else { load(); } - }; - - /** - * Runs all success callbacks for this language. - * @param {string} lang - */ - var languageSuccess = function (lang) { - if (lang_data[lang] ) { - var callbacks = lang_data[lang].callbacks; - while (callbacks.length) { - var callback = callbacks.shift().success; - if (callback) { - callback(); - } - } - } - }; + } /** - * Runs all error callbacks for this language. + * Runs all callbacks of the given type for the given language. + * * @param {string} lang + * @param {"success" | "error"} type */ - var languageError = function (lang) { + function languageCallback(lang, type) { if (lang_data[lang]) { var callbacks = lang_data[lang].callbacks; - while (callbacks.length) { - var callback = callbacks.shift().error; + for (var i = 0, l = callbacks.length; i < l; i++) { + var callback = callbacks[i][type]; if (callback) { - callback(); + setTimeout(callback, 0); } } + callbacks.length = 0; } - }; + } Prism.hooks.add('complete', function (env) { if (env.element && env.language && !env.grammar) { diff --git a/plugins/autoloader/prism-autoloader.min.js b/plugins/autoloader/prism-autoloader.min.js index 27070fde6e..058a7290ad 100644 --- a/plugins/autoloader/prism-autoloader.min.js +++ b/plugins/autoloader/prism-autoloader.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof self&&self.Prism&&self.document&&document.createElement){var r={javascript:"clike",actionscript:"javascript",arduino:"cpp",aspnet:["markup","csharp"],bison:"c",c:"clike",csharp:"clike",cpp:"c",coffeescript:"javascript",crystal:"ruby","css-extras":"css",d:"clike",dart:"clike",django:"markup-templating",ejs:["javascript","markup-templating"],erb:["ruby","markup-templating"],fsharp:"clike",flow:"javascript",glsl:"clike",gml:"clike",go:"clike",groovy:"clike",haml:"ruby",handlebars:"markup-templating",haxe:"clike",java:"clike",javadoc:["markup","java","javadoclike"],jolie:"clike",jsdoc:["javascript","javadoclike"],"js-extras":"javascript","js-templates":"javascript",jsonp:"json",json5:"json",kotlin:"clike",less:"css",lilypond:"scheme",markdown:"markup","markup-templating":"markup",n4js:"javascript",nginx:"clike",objectivec:"c",opencl:"cpp",parser:"markup",php:["clike","markup-templating"],phpdoc:["php","javadoclike"],"php-extras":"php",plsql:"sql",processing:"clike",protobuf:"clike",pug:["markup","javascript"],qore:"clike",jsx:["markup","javascript"],tsx:["jsx","typescript"],reason:"clike",ruby:"clike",sass:"css",scss:"css",scala:"java","shell-session":"bash",smarty:"markup-templating",soy:"markup-templating",swift:"clike",tap:"yaml",textile:"markup",tt2:["clike","markup-templating"],twig:"markup",typescript:"javascript","t4-cs":["t4-templating","csharp"],"t4-vb":["t4-templating","visual-basic"],vala:"clike",vbnet:"basic",velocity:"markup",wiki:"markup",xeora:"markup",xquery:"markup"},n={html:"markup",xml:"markup",svg:"markup",mathml:"markup",js:"javascript",adoc:"asciidoc",shell:"bash",rbnf:"bnf",cs:"csharp",dotnet:"csharp",coffee:"coffeescript",jinja2:"django","dns-zone":"dns-zone-file",dockerfile:"docker",gamemakerlanguage:"gml",hs:"haskell",tex:"latex",context:"latex",ly:"lilypond",emacs:"lisp",elisp:"lisp","emacs-lisp":"lisp",md:"markdown",n4jsd:"n4js",objectpascal:"pascal",px:"pcaxis",py:"python",rb:"ruby",ts:"typescript",t4:"t4-cs",vb:"visual-basic",xeoracube:"xeora",yml:"yaml"},l={},a=document.getElementsByTagName("script"),e=a[a.length-1],t="components/",s=/\bplugins\/autoloader\/prism-autoloader\.(?:min\.)js$/i,i=/[\w-]+\.(?:min\.)js$/i;if(e.hasAttribute("data-autoloader-path"))t=e.getAttribute("data-autoloader-path").trim().replace(/\/?$/,"/");else{var c=e.src;s.test(c)?t=c.replace(s,"components/"):i.test(c)&&(t=c.replace(i,"components/"))}var p=Prism.plugins.autoloader={languages_path:t,use_minified:!0},o=function(a,e,t){"string"==typeof a&&(a=[a]);var s=0,i=a.length,c=function(){s Date: Mon, 22 Jul 2019 04:01:07 +0200 Subject: [PATCH 0325/1100] Changelog for 1.17.0 (#1989) --- CHANGELOG.md | 128 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 128 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 69d27cfeb4..b3fd6e61c8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,133 @@ # Prism Changelog +## 1.17.0 (TBD) + +### New components + +* __DNS zone file__ ([#1961](https://github.com/PrismJS/prism/issues/1961)) [`bb84f98c`](https://github.com/PrismJS/prism/commit/bb84f98c) +* __JQ__ ([#1896](https://github.com/PrismJS/prism/issues/1896)) [`73d964be`](https://github.com/PrismJS/prism/commit/73d964be) +* __JS Templates__: Syntax highlighting inside tagged template literals ([#1931](https://github.com/PrismJS/prism/issues/1931)) [`c8844286`](https://github.com/PrismJS/prism/commit/c8844286) +* __LilyPond__ ([#1967](https://github.com/PrismJS/prism/issues/1967)) [`5d992fc5`](https://github.com/PrismJS/prism/commit/5d992fc5) +* __PascaLIGO__ ([#1947](https://github.com/PrismJS/prism/issues/1947)) [`858201c7`](https://github.com/PrismJS/prism/commit/858201c7) +* __PC-Axis__ ([#1940](https://github.com/PrismJS/prism/issues/1940)) [`473f7fbd`](https://github.com/PrismJS/prism/commit/473f7fbd) +* __Shell session__ ([#1892](https://github.com/PrismJS/prism/issues/1892)) [`96044979`](https://github.com/PrismJS/prism/commit/96044979) +* __Splunk SPL__ ([#1962](https://github.com/PrismJS/prism/issues/1962)) [`c93c066b`](https://github.com/PrismJS/prism/commit/c93c066b) + +### New plugins + +* __Diff Highlight__: Syntax highlighting inside diff blocks ([#1889](https://github.com/PrismJS/prism/issues/1889)) [`e7702ae1`](https://github.com/PrismJS/prism/commit/e7702ae1) + +### Updated components + +* __Bash__ + * Major improvements ([#1443](https://github.com/PrismJS/prism/issues/1443)) [`363281b3`](https://github.com/PrismJS/prism/commit/363281b3) +* __C#__ + * Added `cs` alias ([#1899](https://github.com/PrismJS/prism/issues/1899)) [`a8164559`](https://github.com/PrismJS/prism/commit/a8164559) +* __C++__ + * Fixed number pattern ([#1887](https://github.com/PrismJS/prism/issues/1887)) [`3de29e72`](https://github.com/PrismJS/prism/commit/3de29e72) +* __CSS__ + * Extended `url` inside ([#1874](https://github.com/PrismJS/prism/issues/1874)) [`f0a10669`](https://github.com/PrismJS/prism/commit/f0a10669) + * Removed unnecessary flag and modifier ([#1875](https://github.com/PrismJS/prism/issues/1875)) [`74050c68`](https://github.com/PrismJS/prism/commit/74050c68) +* __CSS Extras__ + * Added `even` & `odd` keywords to `n-th` pattern ([#1872](https://github.com/PrismJS/prism/issues/1872)) [`5e5a3e00`](https://github.com/PrismJS/prism/commit/5e5a3e00) +* __F#__ + * Improved character literals ([#1956](https://github.com/PrismJS/prism/issues/1956)) [`d58d2aeb`](https://github.com/PrismJS/prism/commit/d58d2aeb) +* __JavaScript__ + * Fixed escaped template interpolation ([#1931](https://github.com/PrismJS/prism/issues/1931)) [`c8844286`](https://github.com/PrismJS/prism/commit/c8844286) + * Added support for private fields ([#1950](https://github.com/PrismJS/prism/issues/1950)) [`7bd08327`](https://github.com/PrismJS/prism/commit/7bd08327) + * Added support for numeric separators ([#1895](https://github.com/PrismJS/prism/issues/1895)) [`6068bf18`](https://github.com/PrismJS/prism/commit/6068bf18) + * Increased bracket count of interpolation expressions in template strings ([#1845](https://github.com/PrismJS/prism/issues/1845)) [`c13d6e7d`](https://github.com/PrismJS/prism/commit/c13d6e7d) + * Added support for the `s` regex flag ([#1846](https://github.com/PrismJS/prism/issues/1846)) [`9e164935`](https://github.com/PrismJS/prism/commit/9e164935) + * Formatting: Added missing semicolon ([#1856](https://github.com/PrismJS/prism/issues/1856)) [`e2683959`](https://github.com/PrismJS/prism/commit/e2683959) +* __JSON__ + * Kinda fixed comment issue ([#1853](https://github.com/PrismJS/prism/issues/1853)) [`cbe05ec3`](https://github.com/PrismJS/prism/commit/cbe05ec3) +* __Julia__ + * Added `struct` keyword ([#1941](https://github.com/PrismJS/prism/issues/1941)) [`feb1b6f5`](https://github.com/PrismJS/prism/commit/feb1b6f5) + * Highlight `Inf` and `NaN` as constants ([#1921](https://github.com/PrismJS/prism/issues/1921)) [`2141129f`](https://github.com/PrismJS/prism/commit/2141129f) + * Added `in` keyword ([#1918](https://github.com/PrismJS/prism/issues/1918)) [`feb3187f`](https://github.com/PrismJS/prism/commit/feb3187f) +* __LaTeX__ + * Added TeX and ConTeXt alias ([#1915](https://github.com/PrismJS/prism/issues/1915)) [`5ad58a75`](https://github.com/PrismJS/prism/commit/5ad58a75) + * Added support for $$ equations [`6f53f749`](https://github.com/PrismJS/prism/commit/6f53f749) +* __Markdown__ + * Markdown: Added support for auto-loading code block languages ([#1898](https://github.com/PrismJS/prism/issues/1898)) [`05823e88`](https://github.com/PrismJS/prism/commit/05823e88) + * Improved URLs ([#1955](https://github.com/PrismJS/prism/issues/1955)) [`b9ec6fd8`](https://github.com/PrismJS/prism/commit/b9ec6fd8) + * Added support for nested bold and italic expressions ([#1897](https://github.com/PrismJS/prism/issues/1897)) [`11903721`](https://github.com/PrismJS/prism/commit/11903721) + * Added support for tables ([#1848](https://github.com/PrismJS/prism/issues/1848)) [`cedb8e84`](https://github.com/PrismJS/prism/commit/cedb8e84) +* __Perl__ + * Added `return` keyword ([#1943](https://github.com/PrismJS/prism/issues/1943)) [`2f39de97`](https://github.com/PrismJS/prism/commit/2f39de97) +* __Protocol Buffers__ + * Full support for PB2 and PB3 syntax + numerous other improvements ([#1948](https://github.com/PrismJS/prism/issues/1948)) [`de10bd1d`](https://github.com/PrismJS/prism/commit/de10bd1d) +* __reST (reStructuredText)__ + * Fixed exponentially backtracking pattern ([#1986](https://github.com/PrismJS/prism/issues/1986)) [`8b5d67a3`](https://github.com/PrismJS/prism/commit/8b5d67a3) +* __Rust__ + * Added `async` and `await` keywords. ([#1882](https://github.com/PrismJS/prism/issues/1882)) [`4faa3314`](https://github.com/PrismJS/prism/commit/4faa3314) + * Improved punctuation and operators ([#1839](https://github.com/PrismJS/prism/issues/1839)) [`a42b1557`](https://github.com/PrismJS/prism/commit/a42b1557) +* __Sass (Scss)__ + * Fixed exponential url pattern ([#1938](https://github.com/PrismJS/prism/issues/1938)) [`4b6b6e8b`](https://github.com/PrismJS/prism/commit/4b6b6e8b) +* __Scheme__ + * Added support for rational number literals ([#1964](https://github.com/PrismJS/prism/issues/1964)) [`e8811d22`](https://github.com/PrismJS/prism/commit/e8811d22) +* __TOML__ + * Minor improvements ([#1917](https://github.com/PrismJS/prism/issues/1917)) [`3e181241`](https://github.com/PrismJS/prism/commit/3e181241) +* __Visual Basic__ + * Added support for interpolation strings ([#1971](https://github.com/PrismJS/prism/issues/1971)) [`4a2c90c1`](https://github.com/PrismJS/prism/commit/4a2c90c1) + +### Updated plugins + +* __Autolinker__ + * Improved component path guessing ([#1928](https://github.com/PrismJS/prism/issues/1928)) [`452d5c7d`](https://github.com/PrismJS/prism/commit/452d5c7d) + * Improved URL regex ([#1842](https://github.com/PrismJS/prism/issues/1842)) [`eb28b62b`](https://github.com/PrismJS/prism/commit/eb28b62b) +* __Autoloader__ + * Fixed and improved callbacks ([#1935](https://github.com/PrismJS/prism/issues/1935)) [`b19f512f`](https://github.com/PrismJS/prism/commit/b19f512f) +* __Command Line__ + * Fix for uncaught errors for empty 'commandLine' object. ([#1862](https://github.com/PrismJS/prism/issues/1862)) [`c24831b5`](https://github.com/PrismJS/prism/commit/c24831b5) +* __Copy to Clipboard Button__ + * Switch anchor to button ([#1926](https://github.com/PrismJS/prism/issues/1926)) [`79880197`](https://github.com/PrismJS/prism/commit/79880197) +* __Custom Class__ + * Added mapper functions for language specific transformations ([#1873](https://github.com/PrismJS/prism/issues/1873)) [`acceb3b5`](https://github.com/PrismJS/prism/commit/acceb3b5) +* __Line Highlight__ + * Batching DOM read/writes to avoid reflows ([#1865](https://github.com/PrismJS/prism/issues/1865)) [`632ce00c`](https://github.com/PrismJS/prism/commit/632ce00c) +* __Toolbar__ + * Added `className` option for toolbar items ([#1951](https://github.com/PrismJS/prism/issues/1951)) [`5ab28bbe`](https://github.com/PrismJS/prism/commit/5ab28bbe) + * Set opacity to 1 when focus is within ([#1927](https://github.com/PrismJS/prism/issues/1927)) [`0b1662dd`](https://github.com/PrismJS/prism/commit/0b1662dd) + +### Updated themes + +* __Funky__ + * Fixed typo ([#1960](https://github.com/PrismJS/prism/issues/1960)) [`7d056591`](https://github.com/PrismJS/prism/commit/7d056591) + +### Other + +* README: Added npm downloads badge ([#1934](https://github.com/PrismJS/prism/issues/1934)) [`d673d701`](https://github.com/PrismJS/prism/commit/d673d701) +* README: Minor changes ([#1857](https://github.com/PrismJS/prism/issues/1857)) [`77e403cb`](https://github.com/PrismJS/prism/commit/77e403cb) +* Clearer description for the highlighting bug report template ([#1850](https://github.com/PrismJS/prism/issues/1850)) [`2f9c9261`](https://github.com/PrismJS/prism/commit/2f9c9261) +* More language examples ([#1917](https://github.com/PrismJS/prism/issues/1917)) [`3e181241`](https://github.com/PrismJS/prism/commit/3e181241) +* __Core__ + * Removed `env.elements` from `before-highlightall` hook ([#1968](https://github.com/PrismJS/prism/issues/1968)) [`9d9e2ca4`](https://github.com/PrismJS/prism/commit/9d9e2ca4) + * Made `language-none` the default language ([#1858](https://github.com/PrismJS/prism/issues/1858)) [`fd691c52`](https://github.com/PrismJS/prism/commit/fd691c52) + * Removed `parent` from the `wrap` hook's environment ([#1837](https://github.com/PrismJS/prism/issues/1837)) [`65a4e894`](https://github.com/PrismJS/prism/commit/65a4e894) +* __Infrastructure__ + * gulp: Split `gulpfile.js` and expanded `changes` task ([#1835](https://github.com/PrismJS/prism/issues/1835)) [`033c5ad8`](https://github.com/PrismJS/prism/commit/033c5ad8) + * gulp: JSON formatting for partly generated files ([#1933](https://github.com/PrismJS/prism/issues/1933)) [`d4373f3a`](https://github.com/PrismJS/prism/commit/d4373f3a) + * gulp: Use `async` functions & drop testing on Node v6 ([#1783](https://github.com/PrismJS/prism/issues/1783)) [`0dd44d53`](https://github.com/PrismJS/prism/commit/0dd44d53) + * Tests: `lookbehind` test for patterns ([#1890](https://github.com/PrismJS/prism/issues/1890)) [`3ba786cd`](https://github.com/PrismJS/prism/commit/3ba786cd) + * Tests: Added test for empty regexes ([#1847](https://github.com/PrismJS/prism/issues/1847)) [`c1e6a7fd`](https://github.com/PrismJS/prism/commit/c1e6a7fd) +* __Website__ + * Added tutorial for using PrismJS with React ([#1979](https://github.com/PrismJS/prism/issues/1979)) [`f1e16c7b`](https://github.com/PrismJS/prism/commit/f1e16c7b) + * Update footer's GitHub repository URL and capitalisation of "GitHub" ([#1983](https://github.com/PrismJS/prism/issues/1983)) [`bab744a6`](https://github.com/PrismJS/prism/commit/bab744a6) + * Added known failures page ([#1876](https://github.com/PrismJS/prism/issues/1876)) [`36a5fa0e`](https://github.com/PrismJS/prism/commit/36a5fa0e) + * Added basic usage for CDNs ([#1924](https://github.com/PrismJS/prism/issues/1924)) [`922ec555`](https://github.com/PrismJS/prism/commit/922ec555) + * New tutorial for Drupal ([#1859](https://github.com/PrismJS/prism/issues/1859)) [`d2089d83`](https://github.com/PrismJS/prism/commit/d2089d83) + * Updated website page styles to not interfere with themes ([#1952](https://github.com/PrismJS/prism/issues/1952)) [`b6543853`](https://github.com/PrismJS/prism/commit/b6543853) + * Download page: Improved performance for Chromium-based browsers ([#1907](https://github.com/PrismJS/prism/issues/1907)) [`11f18e36`](https://github.com/PrismJS/prism/commit/11f18e36) + * Download page: Fixed Edge's word wrap ([#1920](https://github.com/PrismJS/prism/issues/1920)) [`5d191b92`](https://github.com/PrismJS/prism/commit/5d191b92) + * Examples page: Minor improvements ([#1919](https://github.com/PrismJS/prism/issues/1919)) [`a16d4a25`](https://github.com/PrismJS/prism/commit/a16d4a25) + * Extending page: Fixed typo + new alias section ([#1949](https://github.com/PrismJS/prism/issues/1949)) [`24c8e717`](https://github.com/PrismJS/prism/commit/24c8e717) + * Extending page: Added "Creating a new language definition" section ([#1925](https://github.com/PrismJS/prism/issues/1925)) [`ddf81233`](https://github.com/PrismJS/prism/commit/ddf81233) + * Test page: Use `prism-core.js` instead of `prism.js` ([#1908](https://github.com/PrismJS/prism/issues/1908)) [`0853e694`](https://github.com/PrismJS/prism/commit/0853e694) + * Copy to clipboard: Fixed typo ([#1869](https://github.com/PrismJS/prism/issues/1869)) [`59d4323f`](https://github.com/PrismJS/prism/commit/59d4323f) + * JSONP Highlight: Fixed examples ([#1877](https://github.com/PrismJS/prism/issues/1877)) [`f8ae465d`](https://github.com/PrismJS/prism/commit/f8ae465d) + * Line numbers: Fixed typo on webpage ([#1838](https://github.com/PrismJS/prism/issues/1838)) [`0f16eb87`](https://github.com/PrismJS/prism/commit/0f16eb87) + ## 1.16.0 (2019-03-24) ### New components From fee59060651585aa035e188068dc4546ef2d28d1 Mon Sep 17 00:00:00 2001 From: mAAdhaTTah Date: Sun, 21 Jul 2019 22:05:42 -0400 Subject: [PATCH 0326/1100] Add date to CHANGELOG --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b3fd6e61c8..625ba879ad 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Prism Changelog -## 1.17.0 (TBD) +## 1.17.0 (2019-07-21) ### New components From a70302771078958106f4a2408e5ee8678e8bae63 Mon Sep 17 00:00:00 2001 From: mAAdhaTTah Date: Sun, 21 Jul 2019 22:05:51 -0400 Subject: [PATCH 0327/1100] 1.17.0 --- package-lock.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index 2f042d7890..306221c679 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "prismjs", - "version": "1.16.0", + "version": "1.17.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index ddb65e3dca..7c98b2b7d3 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "prismjs", - "version": "1.16.0", + "version": "1.17.0", "description": "Lightweight, robust, elegant syntax highlighting. A spin-off project from Dabblet.", "main": "prism.js", "style": "themes/prism.css", From c2229ec2d2a719d059c547343c5daa90f680200d Mon Sep 17 00:00:00 2001 From: mAAdhaTTah Date: Sun, 21 Jul 2019 22:07:17 -0400 Subject: [PATCH 0328/1100] Add .DS_Store to npmignore Keeps these from being published. --- .npmignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.npmignore b/.npmignore index 55864ea9ef..2aca0ca922 100644 --- a/.npmignore +++ b/.npmignore @@ -2,7 +2,7 @@ *.iml hide-*.js - +.DS_Store CNAME examples/ img/ From a09ca1bb00d06fe1a6fa352a4456d539adcda511 Mon Sep 17 00:00:00 2001 From: mAAdhaTTah Date: Sun, 21 Jul 2019 22:08:11 -0400 Subject: [PATCH 0329/1100] Update CHANGELOG --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 625ba879ad..2566bd372a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Prism Changelog +## 1.17.1 (2019-07-21) + +### Other + +* __Infrastructure__ + * Add .DS_Store to npmignore [`c2229ec2`](https://github.com/PrismJS/prism/commit/c2229ec2) + ## 1.17.0 (2019-07-21) ### New components From aba55105897299e61815e873f8fcce7063227927 Mon Sep 17 00:00:00 2001 From: mAAdhaTTah Date: Sun, 21 Jul 2019 22:08:30 -0400 Subject: [PATCH 0330/1100] 1.17.1 --- package-lock.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index 306221c679..f3fb658bfb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "prismjs", - "version": "1.17.0", + "version": "1.17.1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 7c98b2b7d3..773f38d555 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "prismjs", - "version": "1.17.0", + "version": "1.17.1", "description": "Lightweight, robust, elegant syntax highlighting. A spin-off project from Dabblet.", "main": "prism.js", "style": "themes/prism.css", From 3af5d744fd7359086c4a1fc5ac4b66fe4001c935 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Wed, 24 Jul 2019 22:12:06 +0200 Subject: [PATCH 0331/1100] npm: Updated dependencies to fix 122 vulnerabilities (#1997) This updates mocha and its dependencies to fix 122 vulnerabilities. --- package-lock.json | 241 +++++++++++----------------------------------- package.json | 2 +- 2 files changed, 58 insertions(+), 185 deletions(-) diff --git a/package-lock.json b/package-lock.json index f3fb658bfb..eee2dbf03e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1535,8 +1535,7 @@ "ansi-regex": { "version": "2.1.1", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "aproba": { "version": "1.2.0", @@ -1557,14 +1556,12 @@ "balanced-match": { "version": "1.0.0", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, "dev": true, - "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -1579,20 +1576,17 @@ "code-point-at": { "version": "1.1.0", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "concat-map": { "version": "0.0.1", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "console-control-strings": { "version": "1.1.0", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "core-util-is": { "version": "1.0.2", @@ -1709,8 +1703,7 @@ "inherits": { "version": "2.0.3", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "ini": { "version": "1.3.5", @@ -1722,7 +1715,6 @@ "version": "1.0.0", "bundled": true, "dev": true, - "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -1737,7 +1729,6 @@ "version": "3.0.4", "bundled": true, "dev": true, - "optional": true, "requires": { "brace-expansion": "^1.1.7" } @@ -1745,14 +1736,12 @@ "minimist": { "version": "0.0.8", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "minipass": { "version": "2.3.5", "bundled": true, "dev": true, - "optional": true, "requires": { "safe-buffer": "^5.1.2", "yallist": "^3.0.0" @@ -1771,7 +1760,6 @@ "version": "0.5.1", "bundled": true, "dev": true, - "optional": true, "requires": { "minimist": "0.0.8" } @@ -1852,8 +1840,7 @@ "number-is-nan": { "version": "1.0.1", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "object-assign": { "version": "4.1.1", @@ -1865,7 +1852,6 @@ "version": "1.4.0", "bundled": true, "dev": true, - "optional": true, "requires": { "wrappy": "1" } @@ -1951,8 +1937,7 @@ "safe-buffer": { "version": "5.1.2", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "safer-buffer": { "version": "2.1.2", @@ -1988,7 +1973,6 @@ "version": "1.0.2", "bundled": true, "dev": true, - "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -2008,7 +1992,6 @@ "version": "3.0.1", "bundled": true, "dev": true, - "optional": true, "requires": { "ansi-regex": "^2.0.0" } @@ -2052,14 +2035,12 @@ "wrappy": { "version": "1.0.2", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "yallist": { "version": "3.0.3", "bundled": true, - "dev": true, - "optional": true + "dev": true } } }, @@ -2785,9 +2766,9 @@ } }, "js-yaml": { - "version": "3.12.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.12.0.tgz", - "integrity": "sha512-PIt2cnwmPfL4hKNwqeiuz4bKfnzHTBv6HyVgjahA6mPLwPDzjDWrplJBMjHUFxku/N3FlmrbyPclad+I+4mJ3A==", + "version": "3.13.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", + "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", "dev": true, "requires": { "argparse": "^1.0.7", @@ -2985,9 +2966,9 @@ } }, "lodash": { - "version": "4.17.11", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz", - "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==", + "version": "4.17.15", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", + "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==", "dev": true }, "lodash._reinterpolate": { @@ -3165,9 +3146,9 @@ "dev": true }, "mixin-deep": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.1.tgz", - "integrity": "sha512-8ZItLHeEgaqEvd5lYBXfm4EZSFCX29Jb9K+lAHhDKzReKBQKj3R+7NOF6tjqYi9t4oI8VUfaWITJQm86wnXGNQ==", + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.2.tgz", + "integrity": "sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA==", "dev": true, "requires": { "for-in": "^1.0.2", @@ -3195,9 +3176,9 @@ } }, "mocha": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-6.0.2.tgz", - "integrity": "sha512-RtTJsmmToGyeTznSOMoM6TPEk1A84FQaHIciKrRqARZx+B5ccJ5tXlmJzEKGBxZdqk9UjpRsesZTUkZmR5YnuQ==", + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-6.2.0.tgz", + "integrity": "sha512-qwfFgY+7EKAAUAdv7VYMZQknI7YJSGesxHyhn6qD52DV8UcSZs5XwCifcZGMVIE4a5fbmhvbotxC0DLQ0oKohQ==", "dev": true, "requires": { "ansi-colors": "3.2.3", @@ -3205,23 +3186,23 @@ "debug": "3.2.6", "diff": "3.5.0", "escape-string-regexp": "1.0.5", - "findup-sync": "2.0.0", + "find-up": "3.0.0", "glob": "7.1.3", "growl": "1.10.5", "he": "1.2.0", - "js-yaml": "3.12.0", + "js-yaml": "3.13.1", "log-symbols": "2.2.0", "minimatch": "3.0.4", "mkdirp": "0.5.1", "ms": "2.1.1", - "node-environment-flags": "1.0.4", + "node-environment-flags": "1.0.5", "object.assign": "4.1.0", "strip-json-comments": "2.0.1", "supports-color": "6.0.0", "which": "1.3.1", "wide-align": "1.1.3", - "yargs": "12.0.5", - "yargs-parser": "11.1.1", + "yargs": "13.2.2", + "yargs-parser": "13.0.0", "yargs-unparser": "1.5.0" }, "dependencies": { @@ -3231,29 +3212,12 @@ "integrity": "sha512-LEHHyuhlPY3TmuUYMh2oz89lTShfvgbmzaBcxve9t/9Wuy7Dwf4yoAKcND7KFT1HAQfqZ12qtc+DUrBMeKF9nw==", "dev": true }, - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true - }, "camelcase": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.2.0.tgz", - "integrity": "sha512-IXFsBS2pC+X0j0N/GE7Dm7j3bsEBp+oTpb7F50dwEVX7rf3IgwO9XatnegTsDtniKCUtEJH4fSU6Asw7uoVLfQ==", + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", "dev": true }, - "cliui": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz", - "integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==", - "dev": true, - "requires": { - "string-width": "^2.1.1", - "strip-ansi": "^4.0.0", - "wrap-ansi": "^2.0.0" - } - }, "debug": { "version": "3.2.6", "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", @@ -3272,93 +3236,16 @@ "locate-path": "^3.0.0" } }, - "invert-kv": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-2.0.0.tgz", - "integrity": "sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA==", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", - "dev": true - }, - "lcid": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/lcid/-/lcid-2.0.0.tgz", - "integrity": "sha512-avPEb8P8EGnwXKClwsNUgryVjllcRqtMYa49NTsbQagYuT1DcXnl1915oxWjoyGrXR6zH/Y0Zc96xWsPcoDKeA==", - "dev": true, - "requires": { - "invert-kv": "^2.0.0" - } - }, "ms": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", "dev": true }, - "os-locale": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-3.1.0.tgz", - "integrity": "sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q==", - "dev": true, - "requires": { - "execa": "^1.0.0", - "lcid": "^2.0.0", - "mem": "^4.0.0" - } - }, - "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", - "dev": true, - "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" - } - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } - }, - "which-module": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", - "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", - "dev": true - }, - "yargs": { - "version": "12.0.5", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-12.0.5.tgz", - "integrity": "sha512-Lhz8TLaYnxq/2ObqHDql8dX8CJi97oHxrjUcYtzKbbykPtVW9WB+poxI+NM2UIzsMgNCZTIf0AQwsjK5yMAqZw==", - "dev": true, - "requires": { - "cliui": "^4.0.0", - "decamelize": "^1.2.0", - "find-up": "^3.0.0", - "get-caller-file": "^1.0.1", - "os-locale": "^3.0.0", - "require-directory": "^2.1.1", - "require-main-filename": "^1.0.1", - "set-blocking": "^2.0.0", - "string-width": "^2.0.0", - "which-module": "^2.0.0", - "y18n": "^3.2.1 || ^4.0.0", - "yargs-parser": "^11.1.1" - } - }, "yargs-parser": { - "version": "11.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-11.1.1.tgz", - "integrity": "sha512-C6kB/WJDiaxONLJQnF8ccx9SEeoTTLek8RVbaOIsrAUS8VrBEXfmeSnCZxygc+XC2sNMBIwOOnfcxiynjHsVSQ==", + "version": "13.0.0", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.0.0.tgz", + "integrity": "sha512-w2LXjoL8oRdRQN+hOyppuXs+V/fVAYtpcrRxZuF7Kt/Oc+Jr2uAcVntaUTNT6w5ihoWfFDpNY8CPx1QskxZ/pw==", "dev": true, "requires": { "camelcase": "^5.0.0", @@ -3418,12 +3305,21 @@ "dev": true }, "node-environment-flags": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/node-environment-flags/-/node-environment-flags-1.0.4.tgz", - "integrity": "sha512-M9rwCnWVLW7PX+NUWe3ejEdiLYinRpsEre9hMkU/6NS4h+EEulYaDH1gCEZ2gyXsmw+RXYDaV2JkkTNcsPDJ0Q==", + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/node-environment-flags/-/node-environment-flags-1.0.5.tgz", + "integrity": "sha512-VNYPRfGfmZLx0Ye20jWzHUjyTW/c+6Wq+iLhDzUI4XmhrDd9l/FozXV3F2xOaXjvp0co0+v1YSR3CMP6g+VvLQ==", "dev": true, "requires": { - "object.getownpropertydescriptors": "^2.0.3" + "object.getownpropertydescriptors": "^2.0.3", + "semver": "^5.7.0" + }, + "dependencies": { + "semver": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz", + "integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==", + "dev": true + } } }, "normalize-package-data": { @@ -4215,9 +4111,9 @@ "dev": true }, "set-value": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.0.tgz", - "integrity": "sha512-hw0yxk9GT/Hr5yJEYnHNKYXkIA8mVJgd9ditYZCe16ZczcaELYYcfvaXesNACk2O8O0nTiPQcQhGUQj8JLzeeg==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.1.tgz", + "integrity": "sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw==", "dev": true, "requires": { "extend-shallow": "^2.0.1", @@ -4808,38 +4704,15 @@ "dev": true }, "union-value": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.0.tgz", - "integrity": "sha1-XHHDTLW61dzr4+oM0IIHulqhrqQ=", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz", + "integrity": "sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg==", "dev": true, "requires": { "arr-union": "^3.1.0", "get-value": "^2.0.6", "is-extendable": "^0.1.1", - "set-value": "^0.4.3" - }, - "dependencies": { - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true, - "requires": { - "is-extendable": "^0.1.0" - } - }, - "set-value": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/set-value/-/set-value-0.4.3.tgz", - "integrity": "sha1-fbCPnT0i3H945Trzw79GZuzfzPE=", - "dev": true, - "requires": { - "extend-shallow": "^2.0.1", - "is-extendable": "^0.1.1", - "is-plain-object": "^2.0.1", - "to-object-path": "^0.3.0" - } - } + "set-value": "^2.0.1" } }, "unique-stream": { @@ -5356,9 +5229,9 @@ "dev": true }, "camelcase": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.2.0.tgz", - "integrity": "sha512-IXFsBS2pC+X0j0N/GE7Dm7j3bsEBp+oTpb7F50dwEVX7rf3IgwO9XatnegTsDtniKCUtEJH4fSU6Asw7uoVLfQ==", + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", "dev": true }, "cliui": { diff --git a/package.json b/package.json index 773f38d555..a2bf957c32 100755 --- a/package.json +++ b/package.json @@ -35,7 +35,7 @@ "gulp-replace": "^1.0.0", "gulp-uglify": "^3.0.1", "jsdom": "^13.0.0", - "mocha": "^6.0.0", + "mocha": "^6.2.0", "pump": "^3.0.0", "simple-git": "^1.107.0", "yargs": "^13.2.2" From 7cb65eeca5b109c868a88a3b9843382fd9acd481 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Kl=C3=ADmek?= Date: Mon, 5 Aug 2019 13:16:32 +0200 Subject: [PATCH 0332/1100] Fixed alias example in extending page (#2011) This fixes the example on how to add a language alias to a language definition. --- extending.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extending.html b/extending.html index dfc3f1a329..ed0d2f1c0b 100644 --- a/extending.html +++ b/extending.html @@ -177,7 +177,7 @@

    Creating a new language definition

    To add the alias, we add this line at the end of prism-foo-bar.js:

    -
    Prism.languages.foo = Prism.language['foo-bar'];
    +
    Prism.languages.foo = Prism.languages['foo-bar'];

    Aliases also have to be registered in components.json by adding the alias property to the language entry. In this example, the updated entry will look like this:

    From 508d57ac342cfa7e1b91d9a523298f7280cba461 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Kl=C3=ADmek?= Date: Tue, 6 Aug 2019 15:30:24 +0200 Subject: [PATCH 0333/1100] Added RDF Turtle/TriG language (#2012) This adds support for the RDF Turtle/TriG language. --- components.js | 2 +- components.json | 8 + components/prism-turtle.js | 54 +++++ components/prism-turtle.min.js | 1 + examples/prism-turtle.html | 18 ++ plugins/autoloader/prism-autoloader.js | 1 + plugins/autoloader/prism-autoloader.min.js | 2 +- plugins/show-language/prism-show-language.js | 1 + .../show-language/prism-show-language.min.js | 2 +- .../languages/turtle/blank-node_feature.test | 75 +++++++ tests/languages/turtle/keyword_feature.test | 87 ++++++++ .../turtle/language-tag_feature.test | 63 ++++++ .../local-name-with-colons_feature.test | 16 ++ tests/languages/turtle/number_feature.test | 143 +++++++++++++ .../languages/turtle/punctuation_feature.test | 122 +++++++++++ tests/languages/turtle/string_feature.test | 189 ++++++++++++++++++ 16 files changed, 781 insertions(+), 3 deletions(-) create mode 100644 components/prism-turtle.js create mode 100644 components/prism-turtle.min.js create mode 100644 examples/prism-turtle.html create mode 100644 tests/languages/turtle/blank-node_feature.test create mode 100644 tests/languages/turtle/keyword_feature.test create mode 100644 tests/languages/turtle/language-tag_feature.test create mode 100644 tests/languages/turtle/local-name-with-colons_feature.test create mode 100644 tests/languages/turtle/number_feature.test create mode 100644 tests/languages/turtle/punctuation_feature.test create mode 100644 tests/languages/turtle/string_feature.test diff --git a/components.js b/components.js index deccecc9a7..1276ee12f5 100644 --- a/components.js +++ b/components.js @@ -1,2 +1,2 @@ -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default","peerDependencies":"markup"},"clike":{"title":"C-like","option":"default","overrideExampleHeader":true},"javascript":{"title":"JavaScript","require":"clike","peerDependencies":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"Augmented Backus–Naur form","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","peerDependencies":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"Backus–Naur form","alias":"rbnf","aliasTitles":{"rbnf":"Routing Backus–Naur form"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"Extended Backus–Naur form","owner":"RunDevelopment"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment"},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","peerDependencies":["css","coffeescript","erb","javascript","less","markdown","ruby","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"http":{"title":"HTTP","peerDependencies":["javascript","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"peerDependencies":["scala"],"owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","peerDependencies":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike"],"peerDependencies":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","peerDependencies":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"js-templates":{"title":"JS Templates","require":"javascript","peerDependencies":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"json":{"title":"JSON","owner":"CupOfTea696"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"less":{"title":"Less","require":"css","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","peerDependencies":["jsdoc"],"alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"nasm":{"title":"NASM","owner":"rbmj"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"cpp","peerDependencies":["c","cpp"],"overrideExampleHeader":true,"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"peerDependencies":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","peerDependencies":["c","cpp","fortran"],"owner":"Golmote"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"peerDependencies":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","peerDependencies":["actionscript","coffeescript","flow","javascript","typescript","vala"],"owner":"RunDevelopment"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","peerDependencies":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","peerDependencies":"js-templates","alias":"ts","owner":"vkbansal"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","visual-basic"],"owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":"Line Highlight","line-numbers":{"title":"Line Numbers","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","after":["autolinker","data-uri-highlight"]},"autolinker":"Autolinker","wpd":"WebPlatform Docs","custom-class":{"title":"Custom Class","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","noCSS":true},"show-language":{"title":"Show Language","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","owner":"Golmote","noCSS":true},"previewers":{"title":"Previewers","owner":"Golmote"},"autoloader":{"title":"Autoloader","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","owner":"Golmote","after":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","owner":"chriswells0"},"unescaped-markup":"Unescaped Markup","normalize-whitespace":{"title":"Normalize Whitespace","owner":"zeitgeist87","after":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"diff-highlight":{"title":"Diff Highlight","owner":"RunDevelopment","require":"diff"}}}; +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default","peerDependencies":"markup"},"clike":{"title":"C-like","option":"default","overrideExampleHeader":true},"javascript":{"title":"JavaScript","require":"clike","peerDependencies":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"Augmented Backus–Naur form","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","peerDependencies":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"Backus–Naur form","alias":"rbnf","aliasTitles":{"rbnf":"Routing Backus–Naur form"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"Extended Backus–Naur form","owner":"RunDevelopment"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment"},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","peerDependencies":["css","coffeescript","erb","javascript","less","markdown","ruby","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"http":{"title":"HTTP","peerDependencies":["javascript","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"peerDependencies":["scala"],"owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","peerDependencies":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike"],"peerDependencies":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","peerDependencies":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"js-templates":{"title":"JS Templates","require":"javascript","peerDependencies":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"json":{"title":"JSON","owner":"CupOfTea696"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"less":{"title":"Less","require":"css","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","peerDependencies":["jsdoc"],"alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"nasm":{"title":"NASM","owner":"rbmj"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"cpp","peerDependencies":["c","cpp"],"overrideExampleHeader":true,"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"peerDependencies":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","peerDependencies":["c","cpp","fortran"],"owner":"Golmote"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"peerDependencies":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","peerDependencies":["actionscript","coffeescript","flow","javascript","typescript","vala"],"owner":"RunDevelopment"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","peerDependencies":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"turtle":{"title":"Turtle","alias":["trig"],"aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","peerDependencies":"js-templates","alias":"ts","owner":"vkbansal"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","visual-basic"],"owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":"Line Highlight","line-numbers":{"title":"Line Numbers","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","after":["autolinker","data-uri-highlight"]},"autolinker":"Autolinker","wpd":"WebPlatform Docs","custom-class":{"title":"Custom Class","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","noCSS":true},"show-language":{"title":"Show Language","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","owner":"Golmote","noCSS":true},"previewers":{"title":"Previewers","owner":"Golmote"},"autoloader":{"title":"Autoloader","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","owner":"Golmote","after":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","owner":"chriswells0"},"unescaped-markup":"Unescaped Markup","normalize-whitespace":{"title":"Normalize Whitespace","owner":"zeitgeist87","after":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"diff-highlight":{"title":"Diff Highlight","owner":"RunDevelopment","require":"diff"}}}; if (typeof module !== 'undefined' && module.exports) { module.exports = components; } \ No newline at end of file diff --git a/components.json b/components.json index c46dd5d936..c72e920c46 100644 --- a/components.json +++ b/components.json @@ -897,6 +897,14 @@ "require": ["clike", "markup-templating"], "owner": "gflohr" }, + "turtle": { + "title": "Turtle", + "alias": ["trig"], + "aliasTitles": { + "trig": "TriG" + }, + "owner": "jakubklimek" + }, "twig": { "title": "Twig", "require": "markup", diff --git a/components/prism-turtle.js b/components/prism-turtle.js new file mode 100644 index 0000000000..d2caa873a8 --- /dev/null +++ b/components/prism-turtle.js @@ -0,0 +1,54 @@ +Prism.languages.turtle = { + 'comment': { + pattern: /#.*/, + greedy: true + }, + 'multiline-string': { + pattern: /"""(?:[^"]"?"?)*"""|'''(?:[^']'?'?)*'''/, + greedy: true, + alias: 'string', + inside: { + 'comment': /#.*/ + } + }, + 'string': { + pattern: /"(?:[^\\"\r\n]|\\.)*"|'(?:[^\\'\r\n]|\\.)*'/, + greedy: true + }, + 'url': { + pattern: /<[^\s<>]*>/, + greedy: true, + inside: { + 'punctuation': /[<>]/ + } + }, + 'function': { + pattern: /(?:(?![-.\d\xB7])[-.\w\xB7\xC0-\uFFFD]+)?:(?:(?![-.])(?:[-.:\w\xC0-\uFFFD]|%[\da-f]{2}|\\.)+)?/i, + inside: { + 'local-name': { + pattern: /([^:]*:)[\s\S]+/, + lookbehind: true + }, + 'prefix': { + pattern: /[\s\S]+/, + inside: { + 'punctuation': /:/ + } + } + } + }, + 'number': /[+-]?\b\d+\.?\d*(?:e[+-]?\d+)?/i, + 'punctuation': /[{}.,;()[\]]|\^\^/, + 'boolean': /\b(?:true|false)\b/, + 'keyword': [ + /(?:\ba|@prefix|@base)\b|=/, + /\b(?:graph|base|prefix)\b|=/i + ], + 'tag': { + 'pattern': /@[a-z]+(?:-[a-z\d]+)*/i, + inside: { + 'punctuation': /@/ + } + } +}; +Prism.languages.trig = Prism.languages['turtle']; diff --git a/components/prism-turtle.min.js b/components/prism-turtle.min.js new file mode 100644 index 0000000000..1160bbcd97 --- /dev/null +++ b/components/prism-turtle.min.js @@ -0,0 +1 @@ +Prism.languages.turtle={comment:{pattern:/#.*/,greedy:!0},"multiline-string":{pattern:/"""(?:[^"]"?"?)*"""|'''(?:[^']'?'?)*'''/,greedy:!0,alias:"string",inside:{comment:/#.*/}},string:{pattern:/"(?:[^\\"\r\n]|\\.)*"|'(?:[^\\'\r\n]|\\.)*'/,greedy:!0},url:{pattern:/<[^\s<>]*>/,greedy:!0,inside:{punctuation:/[<>]/}},function:{pattern:/(?:(?![-.\d\xB7])[-.\w\xB7\xC0-\uFFFD]+)?:(?:(?![-.])(?:[-.:\w\xC0-\uFFFD]|%[\da-f]{2}|\\.)+)?/i,inside:{"local-name":{pattern:/([^:]*:)[\s\S]+/,lookbehind:!0},prefix:{pattern:/[\s\S]+/,inside:{punctuation:/:/}}}},number:/[+-]?\b\d+\.?\d*(?:e[+-]?\d+)?/i,punctuation:/[{}.,;()[\]]|\^\^/,boolean:/\b(?:true|false)\b/,keyword:[/(?:\ba|@prefix|@base)\b|=/,/\b(?:graph|base|prefix)\b|=/i],tag:{pattern:/@[a-z]+(?:-[a-z\d]+)*/i,inside:{punctuation:/@/}}},Prism.languages.trig=Prism.languages.turtle; \ No newline at end of file diff --git a/examples/prism-turtle.html b/examples/prism-turtle.html new file mode 100644 index 0000000000..a64a2a5779 --- /dev/null +++ b/examples/prism-turtle.html @@ -0,0 +1,18 @@ +

    Full example

    +
    @base <http://example.org/> .
    +@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
    +@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
    +@prefix foaf: <http://xmlns.com/foaf/0.1/> .
    +@prefix rel: <http://www.perceive.net/schemas/relationship/> .
    +
    +GRAPH <urn:myGraph> {
    +<#green-goblin>
    +    rel:enemyOf <#spiderman> ;
    +    a foaf:Person ;    # in the context of the Marvel universe
    +    foaf:name "Green Goblin" .
    +
    +<#spiderman>
    +    rel:enemyOf <#green-goblin> ;
    +    a foaf:Person ;
    +    foaf:name "Spiderman", "Человек-паук"@ru .
    +}
    diff --git a/plugins/autoloader/prism-autoloader.js b/plugins/autoloader/prism-autoloader.js index 2bd90ad71e..33db06a722 100644 --- a/plugins/autoloader/prism-autoloader.js +++ b/plugins/autoloader/prism-autoloader.js @@ -151,6 +151,7 @@ "px": "pcaxis", "py": "python", "rb": "ruby", + "trig": "turtle", "ts": "typescript", "t4": "t4-cs", "vb": "visual-basic", diff --git a/plugins/autoloader/prism-autoloader.min.js b/plugins/autoloader/prism-autoloader.min.js index 058a7290ad..08ffabf0e5 100644 --- a/plugins/autoloader/prism-autoloader.min.js +++ b/plugins/autoloader/prism-autoloader.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof self&&self.Prism&&self.document&&document.createElement){var r={javascript:"clike",actionscript:"javascript",arduino:"cpp",aspnet:["markup","csharp"],bison:"c",c:"clike",csharp:"clike",cpp:"c",coffeescript:"javascript",crystal:"ruby","css-extras":"css",d:"clike",dart:"clike",django:"markup-templating",ejs:["javascript","markup-templating"],erb:["ruby","markup-templating"],fsharp:"clike",flow:"javascript",glsl:"clike",gml:"clike",go:"clike",groovy:"clike",haml:"ruby",handlebars:"markup-templating",haxe:"clike",java:"clike",javadoc:["markup","java","javadoclike"],jolie:"clike",jsdoc:["javascript","javadoclike"],"js-extras":"javascript","js-templates":"javascript",jsonp:"json",json5:"json",kotlin:"clike",less:"css",lilypond:"scheme",markdown:"markup","markup-templating":"markup",n4js:"javascript",nginx:"clike",objectivec:"c",opencl:"cpp",parser:"markup",php:["clike","markup-templating"],phpdoc:["php","javadoclike"],"php-extras":"php",plsql:"sql",processing:"clike",protobuf:"clike",pug:["markup","javascript"],qore:"clike",jsx:["markup","javascript"],tsx:["jsx","typescript"],reason:"clike",ruby:"clike",sass:"css",scss:"css",scala:"java","shell-session":"bash",smarty:"markup-templating",soy:"markup-templating",swift:"clike",tap:"yaml",textile:"markup",tt2:["clike","markup-templating"],twig:"markup",typescript:"javascript","t4-cs":["t4-templating","csharp"],"t4-vb":["t4-templating","visual-basic"],vala:"clike",vbnet:"basic",velocity:"markup",wiki:"markup",xeora:"markup",xquery:"markup"},n={html:"markup",xml:"markup",svg:"markup",mathml:"markup",js:"javascript",adoc:"asciidoc",shell:"bash",rbnf:"bnf",cs:"csharp",dotnet:"csharp",coffee:"coffeescript",jinja2:"django","dns-zone":"dns-zone-file",dockerfile:"docker",gamemakerlanguage:"gml",hs:"haskell",tex:"latex",context:"latex",ly:"lilypond",emacs:"lisp",elisp:"lisp","emacs-lisp":"lisp",md:"markdown",n4jsd:"n4js",objectpascal:"pascal",px:"pcaxis",py:"python",rb:"ruby",ts:"typescript",t4:"t4-cs",vb:"visual-basic",xeoracube:"xeora",yml:"yaml"},l={},e=document.getElementsByTagName("script"),a=e[e.length-1],t="components/",s=/\bplugins\/autoloader\/prism-autoloader\.(?:min\.)js$/i,i=/[\w-]+\.(?:min\.)js$/i;if(a.hasAttribute("data-autoloader-path"))t=a.getAttribute("data-autoloader-path").trim().replace(/\/?$/,"/");else{var c=a.src;s.test(c)?t=c.replace(s,"components/"):i.test(c)&&(t=c.replace(i,"components/"))}var p=Prism.plugins.autoloader={languages_path:t,use_minified:!0,loadLanguages:o};Prism.hooks.add("complete",function(e){e.element&&e.language&&!e.grammar&&"none"!==e.language&&function(e,a){e in n&&(e=n[e]);var t=a.getAttribute("data-dependencies"),s=a.parentElement;!t&&s&&"pre"===s.tagName.toLowerCase()&&(t=s.getAttribute("data-dependencies")),o(t=t?t.split(/\s*,\s*/g):[],function(){m(e,function(){Prism.highlightElement(a)})})}(e.language,e.element)})}function o(e,a,t){"string"==typeof e&&(e=[e]);var s=e.length,i=0,c=!1;function r(){c||++i===s&&a&&a(e)}0!==s?e.forEach(function(e){m(e,r,function(){c||(c=!0,t&&t(e))})}):a&&setTimeout(a,0)}function m(a,t,s){var i=0<=a.indexOf("!");a=a.replace("!",""),a=n[a]||a;var e=function(){var e=l[a];if(e||(e=l[a]={callbacks:[]}),e.callbacks.push({success:t,error:s}),!i&&Prism.languages[a])u(a,"success");else if(!i&&e.error)u(a,"error");else if(i||!e.loading){e.loading=!0,function(e,a,t){var s=document.createElement("script");s.src=e,s.async=!0,s.onload=function(){document.body.removeChild(s),a&&a()},s.onerror=function(){document.body.removeChild(s),t&&t()},document.body.appendChild(s)}(function(e){return p.languages_path+"prism-"+e+(p.use_minified?".min":"")+".js"}(a),function(){e.loading=!1,u(a,"success")},function(){e.loading=!1,e.error=!0,u(a,"error")})}},c=r[a];c&&c.length?o(c,e,s):e()}function u(e,a){if(l[e]){for(var t=l[e].callbacks,s=0,i=t.length;s "RDF/XML Syntax Specification (Revised)" . + _:bnode . + _:bnode "Dave Beckett" . + _:bnode . + +---------------------------------------------------- + +[ + ["url", [ + ["punctuation", "<"], + "http://www.w3.org/TR/rdf-syntax-grammar", + ["punctuation", ">"] + ]], + ["url", [ + ["punctuation", "<"], + "http://purl.org/dc/elements/1.1/title", + ["punctuation", ">"] + ]], + ["string", "\"RDF/XML Syntax Specification (Revised)\""], + ["punctuation", "."], + ["url", [ + ["punctuation", "<"], + "http://www.w3.org/TR/rdf-syntax-grammar", + ["punctuation", ">"] + ]], + ["url", [ + ["punctuation", "<"], + "http://example.org/stuff/1.0/editor", + ["punctuation", ">"] + ]], + ["function", [ + ["prefix", [ + "_", + ["punctuation", ":"] + ]], + ["local-name", "bnode"] + ]], + ["punctuation", "."], + ["function", [ + ["prefix", [ + "_", + ["punctuation", ":"] + ]], + ["local-name", "bnode"] + ]], + ["url", [ + ["punctuation", "<"], + "http://example.org/stuff/1.0/fullname", + ["punctuation", ">"] + ]], + ["string", "\"Dave Beckett\""], + ["punctuation", "."], + ["function", [ + ["prefix", [ + "_", + ["punctuation", ":"] + ]], + ["local-name", "bnode"] + ]], + ["url", [ + ["punctuation", "<"], + "http://example.org/stuff/1.0/homePage", + ["punctuation", ">"] + ]], + ["url", [ + ["punctuation", "<"], + "http://purl.org/net/dajobe/", + ["punctuation", ">"] + ]], + ["punctuation", "."] +] + +---------------------------------------------------- + +Checks blank node underscore prefixes. \ No newline at end of file diff --git a/tests/languages/turtle/keyword_feature.test b/tests/languages/turtle/keyword_feature.test new file mode 100644 index 0000000000..d1dfc80bc3 --- /dev/null +++ b/tests/languages/turtle/keyword_feature.test @@ -0,0 +1,87 @@ +@base . +BASE . +@prefix rdf: . +PREFIX rdfs: . + +GRAPH { + a rdfs:Class ; + = . +} + +---------------------------------------------------- + +[ + ["keyword", "@base"], + ["url", [ + ["punctuation", "<"], + "http://example.org/", + ["punctuation", ">"] + ]], + ["punctuation", "."], + ["keyword", "BASE"], + ["url", [ + ["punctuation", "<"], + "http://example.org/", + ["punctuation", ">"] + ]], + ["punctuation", "."], + ["keyword", "@prefix"], + ["function", [ + ["prefix", [ + "rdf", + ["punctuation", ":"] + ]] + ]], + ["url", [ + ["punctuation", "<"], + "http://www.w3.org/1999/02/22-rdf-syntax-ns#", + ["punctuation", ">"] + ]], + ["punctuation", "."], + ["keyword", "PREFIX"], + ["function", [ + ["prefix", [ + "rdfs", + ["punctuation", ":"] + ]] + ]], + ["url", [ + ["punctuation", "<"], + "http://www.w3.org/2000/01/rdf-schema#", + ["punctuation", ">"] + ]], + ["punctuation", "."], + ["keyword", "GRAPH"], + ["url", [ + ["punctuation", "<"], + "urn:newGraph", + ["punctuation", ">"] + ]], + ["punctuation", "{"], + ["url", [ + ["punctuation", "<"], + "urn:myClass", + ["punctuation", ">"] + ]], + ["keyword", "a"], + ["function", [ + ["prefix", [ + "rdfs", + ["punctuation", ":"] + ]], + ["local-name", "Class"] + ]], + ["punctuation", ";"], + ["keyword", "="], + ["url", [ + ["punctuation", "<"], + "urn:equivalentClass", + ["punctuation", ">"] + ]], + ["punctuation", "."], + ["punctuation", "}"] +] + +---------------------------------------------------- + +Checks for all keywords. \ No newline at end of file diff --git a/tests/languages/turtle/language-tag_feature.test b/tests/languages/turtle/language-tag_feature.test new file mode 100644 index 0000000000..bbf4c82752 --- /dev/null +++ b/tests/languages/turtle/language-tag_feature.test @@ -0,0 +1,63 @@ +show:218 show:localName "That Seventies Show"@en, "test"@en-t-es-t0-abcd . +show:218 show:localName 'Cette Série des Années Soixante-dix'@fr, "Cette Série des Années Septante"@fr-be . + +---------------------------------------------------- + +[ + ["function", [ + ["prefix", [ + "show", + ["punctuation", ":"] + ]], + ["local-name", "218"] + ]], + ["function", [ + ["prefix", [ + "show", + ["punctuation", ":"] + ]], + ["local-name", "localName"] + ]], + ["string", "\"That Seventies Show\""], + ["tag", [ + ["punctuation", "@"], + "en" + ]], + ["punctuation", ","], + ["string", "\"test\""], + ["tag", [ + ["punctuation", "@"], + "en-t-es-t0-abcd" + ]], + ["punctuation", "."], + ["function", [ + ["prefix", [ + "show", + ["punctuation", ":"] + ]], + ["local-name", "218"] + ]], + ["function", [ + ["prefix", [ + "show", + ["punctuation", ":"] + ]], + ["local-name", "localName"] + ]], + ["string", "'Cette Série des Années Soixante-dix'"], + ["tag", [ + ["punctuation", "@"], + "fr" + ]], + ["punctuation", ","], + ["string", "\"Cette Série des Années Septante\""], + ["tag", [ + ["punctuation", "@"], + "fr-be" + ]], + ["punctuation", "."] +] + +---------------------------------------------------- + +Checks language tags. \ No newline at end of file diff --git a/tests/languages/turtle/local-name-with-colons_feature.test b/tests/languages/turtle/local-name-with-colons_feature.test new file mode 100644 index 0000000000..30720374bc --- /dev/null +++ b/tests/languages/turtle/local-name-with-colons_feature.test @@ -0,0 +1,16 @@ +:foo:bar:baz + +---------------------------------------------------- + +[ + ["function", [ + ["prefix", [ + ["punctuation", ":"] + ]], + ["local-name", "foo:bar:baz"] + ]] +] + +---------------------------------------------------- + +Checks that local name containing colons is parsed correctly. \ No newline at end of file diff --git a/tests/languages/turtle/number_feature.test b/tests/languages/turtle/number_feature.test new file mode 100644 index 0000000000..3a3dccfdbb --- /dev/null +++ b/tests/languages/turtle/number_feature.test @@ -0,0 +1,143 @@ +<1.1> rdf:value 1 . +<1.2> rdf:value +1 . +<1.3> rdf:value -1 . +<2.1> rdf:value 1.13 . +<2.2> rdf:value +1.13 . +<2.3> rdf:value -1.13 . +<3.1> rdf:value 1e3 . +<3.2> rdf:value +1e3 . +<3.3> rdf:value -1e3 . + +---------------------------------------------------- + +[ + ["url", [ + ["punctuation", "<"], + "1.1", + ["punctuation", ">"] + ]], + ["function", [ + ["prefix", [ + "rdf", + ["punctuation", ":"] + ]], + ["local-name", "value"] + ]], + ["number", "1"], + ["punctuation", "."], + ["url", [ + ["punctuation", "<"], + "1.2", + ["punctuation", ">"] + ]], + ["function", [ + ["prefix", [ + "rdf", + ["punctuation", ":"] + ]], + ["local-name", "value"] + ]], + ["number", "+1"], + ["punctuation", "."], + ["url", [ + ["punctuation", "<"], + "1.3", + ["punctuation", ">"] + ]], + ["function", [ + ["prefix", [ + "rdf", + ["punctuation", ":"] + ]], + ["local-name", "value"] + ]], + ["number", "-1"], + ["punctuation", "."], + ["url", [ + ["punctuation", "<"], + "2.1", + ["punctuation", ">"] + ]], + ["function", [ + ["prefix", [ + "rdf", + ["punctuation", ":"] + ]], + ["local-name", "value"] + ]], + ["number", "1.13"], + ["punctuation", "."], + ["url", [ + ["punctuation", "<"], + "2.2", + ["punctuation", ">"] + ]], + ["function", [ + ["prefix", [ + "rdf", + ["punctuation", ":"] + ]], + ["local-name", "value"] + ]], + ["number", "+1.13"], + ["punctuation", "."], + ["url", [ + ["punctuation", "<"], + "2.3", + ["punctuation", ">"] + ]], + ["function", [ + ["prefix", [ + "rdf", + ["punctuation", ":"] + ]], + ["local-name", "value"] + ]], + ["number", "-1.13"], + ["punctuation", "."], + ["url", [ + ["punctuation", "<"], + "3.1", + ["punctuation", ">"] + ]], + ["function", [ + ["prefix", [ + "rdf", + ["punctuation", ":"] + ]], + ["local-name", "value"] + ]], + ["number", "1e3"], + ["punctuation", "."], + ["url", [ + ["punctuation", "<"], + "3.2", + ["punctuation", ">"] + ]], + ["function", [ + ["prefix", [ + "rdf", + ["punctuation", ":"] + ]], + ["local-name", "value"] + ]], + ["number", "+1e3"], + ["punctuation", "."], + ["url", [ + ["punctuation", "<"], + "3.3", + ["punctuation", ">"] + ]], + ["function", [ + ["prefix", [ + "rdf", + ["punctuation", ":"] + ]], + ["local-name", "value"] + ]], + ["number", "-1e3"], + ["punctuation", "."] +] +---------------------------------------------------- + +Checks for supported numbers. \ No newline at end of file diff --git a/tests/languages/turtle/punctuation_feature.test b/tests/languages/turtle/punctuation_feature.test new file mode 100644 index 0000000000..6425fa88fa --- /dev/null +++ b/tests/languages/turtle/punctuation_feature.test @@ -0,0 +1,122 @@ +@base . + +GRAPH { + a rdfs:Class, ; + = . + a rdf:List ; + rdf:value [ a ; + rdf:value ( () [] ) + ] ; + . +} + +---------------------------------------------------- + +[ + ["keyword", "@base"], + ["url", [ + ["punctuation", "<"], + "http://example.org/", + ["punctuation", ">"] + ]], + ["punctuation", "."], + ["keyword", "GRAPH"], + ["url", [ + ["punctuation", "<"], + "urn:newGraph", + ["punctuation", ">"] + ]], + ["punctuation", "{"], + ["url", [ + ["punctuation", "<"], + "urn:myClass", + ["punctuation", ">"] + ]], + ["keyword", "a"], + ["function", [ + ["prefix", [ + "rdfs", + ["punctuation", ":"] + ]], + ["local-name", "Class"] + ]], + ["punctuation", ","], + ["url", [ + ["punctuation", "<"], + "other-class", + ["punctuation", ">"] + ]], + ["punctuation", ";"], + ["keyword", "="], + ["url", [ + ["punctuation", "<"], + "urn:equivalentClass", + ["punctuation", ">"] + ]], + ["punctuation", "."], + ["url", [ + ["punctuation", "<"], + "urn:myList", + ["punctuation", ">"] + ]], + ["keyword", "a"], + ["function", [ + ["prefix", [ + "rdf", + ["punctuation", ":"] + ]], + ["local-name", "List"] + ]], + ["punctuation", ";"], + ["function", [ + ["prefix", [ + "rdf", + ["punctuation", ":"] + ]], + ["local-name", "value"] + ]], + ["punctuation", "["], + ["keyword", "a"], + ["url", [ + ["punctuation", "<"], + "blankNode", + ["punctuation", ">"] + ]], + ["punctuation", ";"], + ["function", [ + ["prefix", [ + "rdf", + ["punctuation", ":"] + ]], + ["local-name", "value"] + ]], + ["punctuation", "("], + ["url", [ + ["punctuation", "<"], + "list", + ["punctuation", ">"] + ]], + ["url", [ + ["punctuation", "<"], + "of", + ["punctuation", ">"] + ]], + ["url", [ + ["punctuation", "<"], + "things", + ["punctuation", ">"] + ]], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", "["], + ["punctuation", "]"], + ["punctuation", ")"], + ["punctuation", "]"], + ["punctuation", ";"], + ["punctuation", "."], + ["punctuation", "}"] +] + +---------------------------------------------------- + +Checks for all types of punctuation. \ No newline at end of file diff --git a/tests/languages/turtle/string_feature.test b/tests/languages/turtle/string_feature.test new file mode 100644 index 0000000000..8f2f4650a8 --- /dev/null +++ b/tests/languages/turtle/string_feature.test @@ -0,0 +1,189 @@ +show:218 rdfs:label "That Seventies Show"^^xsd:string . # literal with XML Schema string datatype +show:218 rdfs:label "That Seventies Show"^^ . # same as above +show:218 rdfs:label "That Seventies Show" . # same again +show:218 show:localName "That Seventies Show"@en . # literal with a language tag +show:218 show:localName 'Cette Série des Années Soixante-dix'@fr . # literal delimited by single quote +show:218 show:localName "Cette Série des Années Septante"@fr-be . # literal with a region subtag +show:218 show:blurb '''This is a multi-line # literal with embedded new lines and quotes +literal with many quotes (""""") +and up to two sequential apostrophes ('').''' . +show:218 show:blurb """This is a multi-line # literal with embedded new lines and apostrophes +literal with many apostrophes (''''') +and up to two sequential quotes ("").""" . + +---------------------------------------------------- + +[ + ["function", [ + ["prefix", [ + "show", + ["punctuation", ":"] + ]], + ["local-name", "218"] + ]], + ["function", [ + ["prefix", [ + "rdfs", + ["punctuation", ":"] + ]], + ["local-name", "label"] + ]], + ["string", "\"That Seventies Show\""], + ["punctuation", "^^"], + ["function", [ + ["prefix", [ + "xsd", + ["punctuation", ":"] + ]], + ["local-name", "string"] + ]], + ["punctuation", "."], + ["comment", "# literal with XML Schema string datatype"], + ["function", [ + ["prefix", [ + "show", + ["punctuation", ":"] + ]], + ["local-name", "218"] + ]], + ["function", [ + ["prefix", [ + "rdfs", + ["punctuation", ":"] + ]], + ["local-name", "label"] + ]], + ["string", "\"That Seventies Show\""], + ["punctuation", "^^"], + ["url", [ + ["punctuation", "<"], + "http://www.w3.org/2001/XMLSchema#string", + ["punctuation", ">"] + ]], + ["punctuation", "."], + ["comment", "# same as above"], + ["function", [ + ["prefix", [ + "show", + ["punctuation", ":"] + ]], + ["local-name", "218"] + ]], + ["function", [ + ["prefix", [ + "rdfs", + ["punctuation", ":"] + ]], + ["local-name", "label"] + ]], + ["string", "\"That Seventies Show\""], + ["punctuation", "."], + ["comment", "# same again"], + ["function", [ + ["prefix", [ + "show", + ["punctuation", ":"] + ]], + ["local-name", "218"] + ]], + ["function", [ + ["prefix", [ + "show", + ["punctuation", ":"] + ]], + ["local-name", "localName"] + ]], + ["string", "\"That Seventies Show\""], + ["tag", [ + ["punctuation", "@"], + "en" + ]], + ["punctuation", "."], + ["comment", "# literal with a language tag"], + ["function", [ + ["prefix", [ + "show", + ["punctuation", ":"] + ]], + ["local-name", "218"] + ]], + ["function", [ + ["prefix", [ + "show", + ["punctuation", ":"] + ]], + ["local-name", "localName"] + ]], + ["string", "'Cette Série des Années Soixante-dix'"], + ["tag", [ + ["punctuation", "@"], + "fr" + ]], + ["punctuation", "."], + ["comment", "# literal delimited by single quote"], + ["function", [ + ["prefix", [ + "show", + ["punctuation", ":"] + ]], + ["local-name", "218"] + ]], + ["function", [ + ["prefix", [ + "show", + ["punctuation", ":"] + ]], + ["local-name", "localName"] + ]], + ["string", "\"Cette Série des Années Septante\""], + ["tag", [ + ["punctuation", "@"], + "fr-be" + ]], + ["punctuation", "."], + ["comment", "# literal with a region subtag"], + ["function", [ + ["prefix", [ + "show", + ["punctuation", ":"] + ]], + ["local-name", "218"] + ]], + ["function", [ + ["prefix", [ + "show", + ["punctuation", ":"] + ]], + ["local-name", "blurb"] + ]], + ["multiline-string", [ + "'''This is a multi-line ", + ["comment", "# literal with embedded new lines and quotes"], + "\r\nliteral with many quotes (\"\"\"\"\")\r\nand up to two sequential apostrophes ('').'''" + ]], + ["punctuation", "."], + ["function", [ + ["prefix", [ + "show", + ["punctuation", ":"] + ]], + ["local-name", "218"] + ]], + ["function", [ + ["prefix", [ + "show", + ["punctuation", ":"] + ]], + ["local-name", "blurb"] + ]], + ["multiline-string", [ + "\"\"\"This is a multi-line ", + ["comment", "# literal with embedded new lines and apostrophes"], + "\r\nliteral with many apostrophes (''''')\r\nand up to two sequential quotes (\"\").\"\"\"" + ]], + ["punctuation", "."] +] + +---------------------------------------------------- + +Checks for all keywords. \ No newline at end of file From 076f615548b6378ec1fac285f1e9ddb991856086 Mon Sep 17 00:00:00 2001 From: cedporter Date: Thu, 8 Aug 2019 15:16:31 -0400 Subject: [PATCH 0334/1100] SAS: Major improvements (#1981) This makes various improvements to the SAS language definition such as adding support for embedded SQL, missing keyword and language elements, more granular tokenizing, and many more. --- components.js | 2 +- components.json | 1 + components/prism-sas.js | 208 +++++++++++++--- components/prism-sas.min.js | 2 +- examples/prism-sas.html | 5 +- plugins/autoloader/prism-autoloader.js | 1 + plugins/autoloader/prism-autoloader.min.js | 2 +- tests/languages/sas/datalines_feature.test | 2 +- tests/languages/sas/datetime_feature.test | 13 +- tests/languages/sas/format_feature.test | 36 +++ tests/languages/sas/function_feature.test | 21 ++ tests/languages/sas/input_feature.test | 42 ++++ tests/languages/sas/keyword_feature.test | 39 ++- tests/languages/sas/macro_feature.test | 23 ++ .../sas/macrodefinition_feature.test | 131 ++++++++++ tests/languages/sas/macrokeyword_feature.test | 39 +++ tests/languages/sas/number_feature.test | 8 +- tests/languages/sas/operator_feature.test | 7 +- tests/languages/sas/options_feature.test | 50 ++++ tests/languages/sas/proc-sql_feature.test | 233 ++++++++++++++++++ tests/languages/sas/step_feature.test | 30 +++ tests/languages/sas/string_feature.test | 2 +- 22 files changed, 847 insertions(+), 50 deletions(-) create mode 100644 tests/languages/sas/format_feature.test create mode 100644 tests/languages/sas/function_feature.test create mode 100644 tests/languages/sas/input_feature.test create mode 100644 tests/languages/sas/macro_feature.test create mode 100644 tests/languages/sas/macrodefinition_feature.test create mode 100644 tests/languages/sas/macrokeyword_feature.test create mode 100644 tests/languages/sas/options_feature.test create mode 100644 tests/languages/sas/proc-sql_feature.test create mode 100644 tests/languages/sas/step_feature.test diff --git a/components.js b/components.js index 1276ee12f5..4ebf63403e 100644 --- a/components.js +++ b/components.js @@ -1,2 +1,2 @@ -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default","peerDependencies":"markup"},"clike":{"title":"C-like","option":"default","overrideExampleHeader":true},"javascript":{"title":"JavaScript","require":"clike","peerDependencies":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"Augmented Backus–Naur form","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","peerDependencies":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"Backus–Naur form","alias":"rbnf","aliasTitles":{"rbnf":"Routing Backus–Naur form"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"Extended Backus–Naur form","owner":"RunDevelopment"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment"},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","peerDependencies":["css","coffeescript","erb","javascript","less","markdown","ruby","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"http":{"title":"HTTP","peerDependencies":["javascript","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"peerDependencies":["scala"],"owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","peerDependencies":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike"],"peerDependencies":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","peerDependencies":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"js-templates":{"title":"JS Templates","require":"javascript","peerDependencies":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"json":{"title":"JSON","owner":"CupOfTea696"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"less":{"title":"Less","require":"css","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","peerDependencies":["jsdoc"],"alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"nasm":{"title":"NASM","owner":"rbmj"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"cpp","peerDependencies":["c","cpp"],"overrideExampleHeader":true,"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"peerDependencies":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","peerDependencies":["c","cpp","fortran"],"owner":"Golmote"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"peerDependencies":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","peerDependencies":["actionscript","coffeescript","flow","javascript","typescript","vala"],"owner":"RunDevelopment"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","peerDependencies":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"turtle":{"title":"Turtle","alias":["trig"],"aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","peerDependencies":"js-templates","alias":"ts","owner":"vkbansal"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","visual-basic"],"owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":"Line Highlight","line-numbers":{"title":"Line Numbers","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","after":["autolinker","data-uri-highlight"]},"autolinker":"Autolinker","wpd":"WebPlatform Docs","custom-class":{"title":"Custom Class","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","noCSS":true},"show-language":{"title":"Show Language","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","owner":"Golmote","noCSS":true},"previewers":{"title":"Previewers","owner":"Golmote"},"autoloader":{"title":"Autoloader","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","owner":"Golmote","after":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","owner":"chriswells0"},"unescaped-markup":"Unescaped Markup","normalize-whitespace":{"title":"Normalize Whitespace","owner":"zeitgeist87","after":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"diff-highlight":{"title":"Diff Highlight","owner":"RunDevelopment","require":"diff"}}}; +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default","peerDependencies":"markup"},"clike":{"title":"C-like","option":"default","overrideExampleHeader":true},"javascript":{"title":"JavaScript","require":"clike","peerDependencies":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"Augmented Backus–Naur form","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","peerDependencies":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"Backus–Naur form","alias":"rbnf","aliasTitles":{"rbnf":"Routing Backus–Naur form"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"Extended Backus–Naur form","owner":"RunDevelopment"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment"},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","peerDependencies":["css","coffeescript","erb","javascript","less","markdown","ruby","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"http":{"title":"HTTP","peerDependencies":["javascript","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"peerDependencies":["scala"],"owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","peerDependencies":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike"],"peerDependencies":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","peerDependencies":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"js-templates":{"title":"JS Templates","require":"javascript","peerDependencies":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"json":{"title":"JSON","owner":"CupOfTea696"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"less":{"title":"Less","require":"css","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","peerDependencies":["jsdoc"],"alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"nasm":{"title":"NASM","owner":"rbmj"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"cpp","peerDependencies":["c","cpp"],"overrideExampleHeader":true,"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"peerDependencies":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","peerDependencies":["c","cpp","fortran"],"owner":"Golmote"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"peerDependencies":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","peerDependencies":["actionscript","coffeescript","flow","javascript","typescript","vala"],"owner":"RunDevelopment"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","require":"sql","owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","peerDependencies":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"turtle":{"title":"Turtle","alias":["trig"],"aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","peerDependencies":"js-templates","alias":"ts","owner":"vkbansal"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","visual-basic"],"owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":"Line Highlight","line-numbers":{"title":"Line Numbers","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","after":["autolinker","data-uri-highlight"]},"autolinker":"Autolinker","wpd":"WebPlatform Docs","custom-class":{"title":"Custom Class","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","noCSS":true},"show-language":{"title":"Show Language","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","owner":"Golmote","noCSS":true},"previewers":{"title":"Previewers","owner":"Golmote"},"autoloader":{"title":"Autoloader","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","owner":"Golmote","after":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","owner":"chriswells0"},"unescaped-markup":"Unescaped Markup","normalize-whitespace":{"title":"Normalize Whitespace","owner":"zeitgeist87","after":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"diff-highlight":{"title":"Diff Highlight","owner":"RunDevelopment","require":"diff"}}}; if (typeof module !== 'undefined' && module.exports) { module.exports = components; } \ No newline at end of file diff --git a/components.json b/components.json index c72e920c46..c9131d8c8a 100644 --- a/components.json +++ b/components.json @@ -816,6 +816,7 @@ }, "sas": { "title": "SAS", + "require": "sql", "owner": "Golmote" }, "sass": { diff --git a/components/prism-sas.js b/components/prism-sas.js index 607995c820..1dcc5a6b71 100644 --- a/components/prism-sas.js +++ b/components/prism-sas.js @@ -1,34 +1,184 @@ -Prism.languages.sas = { - 'datalines': { - pattern: /^\s*(?:(?:data)?lines|cards);[\s\S]+?(?:\r?\n|\r);/im, - alias: 'string', - inside: { - 'keyword': { - pattern: /^(\s*)(?:(?:data)?lines|cards)/i, - lookbehind: true - }, - 'punctuation': /;/ - } - }, - 'comment': [ +(function (Prism) { + + var stringPattern = /(["'])(?:\1\1|(?!\1)[\s\S])*\1(?!\1)/.source; + + var number = /\b(?:\d[\da-f]*x|\d+(?:\.\d+)?(?:e[+-]?\d+)?)\b/i; + var numericConstant = { + pattern: RegExp(stringPattern + '[bx]'), + alias: 'number' + }; + + var step = { + pattern: /(^|\s+)(?:proc\s+\w+|quit|run|data(?!\=))\b/i, + alias: 'keyword', + lookbehind: true + }; + + var comment = [ { - pattern: /(^\s*|;\s*)\*.*;/m, + pattern: /(^\s*|;\s*)\*[^;]*;/m, lookbehind: true }, /\/\*[\s\S]+?\*\// - ], - 'datetime': { - // '1jan2013'd, '9:25:19pm't, '18jan2003:9:27:05am'dt - pattern: /'[^']+'(?:dt?|t)\b/i, - alias: 'number' - }, - 'string': { - pattern: /(["'])(?:\1\1|(?!\1)[\s\S])*\1/, + ]; + + var string = { + pattern: RegExp(stringPattern), greedy: true - }, - 'keyword': /\b(?:data|else|format|if|input|proc\s\w+|quit|run|then|libname|set|output|options)\b/i, - // Decimal (1.2e23), hexadecimal (0c1x) - 'number': /\b(?:[\da-f]+x|\d+(?:\.\d+)?(?:e[+-]?\d+)?)/i, - 'operator': /\*\*?|\|\|?|!!?|¦¦?|<[>=]?|>[<=]?|[-+\/=&]|[~¬^]=?|\b(?:eq|ne|gt|lt|ge|le|in|not)\b/i, - 'punctuation': /[$%@.(){}\[\];,\\]/ -}; + }; + + var punctuation = /[$%@.(){}\[\];,\\]/; + + var args = { + 'arg-value': { + pattern: /(=)[A-Z]+/i, + lookbehind: true + }, + 'operator': /=/, + 'arg': { + pattern: /[A-Z]+/i, + alias: 'keyword' + }, + 'number': number, + 'numeric-constant': numericConstant, + 'punctuation': punctuation, + 'string': string + }; + + var globalStatements = { + pattern: /((?:^|[\s])=?)(?:catname|checkpoint execute_always|dm|endsas|filename|footnote|%include|libname|%list|lock|missing|options|page|resetline|%run|sasfile|skip|sysecho|title\d?)\b/i, + lookbehind: true, + alias: 'keyword' + }; + + Prism.languages.sas = { + 'datalines': { + pattern: /^(\s*)(?:(?:data)?lines|cards);[\s\S]+?^;/im, + lookbehind: true, + alias: 'string', + inside: { + 'keyword': { + pattern: /^(?:(?:data)?lines|cards)/i + }, + 'punctuation': /;/ + } + }, + + 'proc-sql': { + pattern: /(^proc\s+(?:fed)?sql(?:\s+[\w|=]+)?;)[\s\S]+?(?=^(?:proc\s+\w+|quit|run|data);|(?![\s\S]))/im, + lookbehind: true, + inside: { + 'sql': { + pattern: RegExp(/^[ \t]*(?:select|alter\s+table|(?:create|describe|drop)\s+(?:index|table(?:\s+constraints)?|view)|create\s+unique\s+index|insert\s+into|update)(?:|[^;"'])+;/.source.replace(//g, stringPattern), 'im'), + alias: 'language-sql', + inside: Prism.languages.sql + }, + 'global-statements': globalStatements, + 'sql-statements': { + pattern: /(^|\s)(?:disconnect\s+from|exec(?:ute)?|begin|commit|rollback|reset|validate)\b/i, + lookbehind: true, + alias: 'keyword' + }, + 'number': number, + 'numeric-constant': numericConstant, + 'punctuation': punctuation, + 'string': string + } + }, + + 'proc-args': { + pattern: RegExp(/(^proc\s+\w+\s+)(?!\s)(?:[^;"']|)+;/.source.replace(//g, stringPattern), 'im'), + lookbehind: true, + inside: args + }, + + /*Special keywords within macros*/ + 'macro-keyword': { + pattern: /((?:^|\s)=?)%(?:ABORT|BQUOTE|BY|CMS|COPY|DISPLAY|DO|ELSE|END|EVAL|GLOBAL|GO|GOTO|IF|INC|INCLUDE|INDEX|INPUT|KTRIM|LENGTH|LET|LIST|LOCAL|NRBQUOTE|NRQUOTE|NRSTR|PUT|QKTRIM|QSCAN|QSUBSTR|QSYSFUNC|QUOTE|QUPCASE|RETURN|RUN|SCAN|STR|SUBSTR|SUPERQ|SYMDEL|SYMGLOBL|SYMLOCAL|SYMEXIST|SYSCALL|SYSEVALF|SYSEXEC|SYSFUNC|SYSGET|SYSRPUT|THEN|TO|TSO|UNQUOTE|UNTIL|UPCASE|WHILE|WINDOW)\b/i, + lookbehind: true, + alias: 'keyword' + }, + 'macro-declaration': { + pattern: /^%macro[^;]+(?=;)/im, + inside: { + 'keyword': /%macro/i, + } + }, + 'macro-end': { + pattern: /^%mend[^;]+(?=;)/im, + inside: { + 'keyword': /%mend/i, + } + }, + /*%_zscore(headcir, _lhc, _mhc, _shc, headcz, headcpct, _Fheadcz); */ + 'macro': { + pattern: /%_\w+(?=\()/, + alias: 'keyword' + }, + 'input': { + pattern: /\binput\s+[-\w\s/*.$&]+;/i, + inside: { + 'input': { + alias: 'keyword', + pattern: /^input/i, + }, + 'comment': comment, + 'number': number, + 'numeric-constant': numericConstant + } + }, + 'comment': comment, + 'options-args': { + pattern: /(^options)[-'"|/\\<>*+=:()\w\s]*(?=;)/im, + lookbehind: true, + inside: args + }, + 'function': { + pattern: /%?\w+(?=\()/, + alias: 'keyword' + }, + 'format': { + pattern: /\b(?:format|put)\b=?[\w'$.]+/im, + inside: { + 'keyword': /^(?:format|put)(?=\=)/i, + 'equals': /=/, + 'format': { + pattern: /(?:\w|\$\d)+\.\d?/i, + alias: 'number' + } + } + }, + 'altformat': { + pattern: /\b(?:format|put)\s+[\w']+(?:\s+[$.\w]+)+(?=;)/i, + inside: { + 'keyword': /^(?:format|put)/i, + 'format': { + pattern: /[\w$]+\.\d?/, + alias: 'number' + } + } + }, + 'numeric-constant': numericConstant, + 'datetime': { + // '1jan2013'd, '9:25:19pm't, '18jan2003:9:27:05am'dt + pattern: RegExp(stringPattern + '(?:dt?|t)'), + alias: 'number' + }, + 'string': string, + 'step': step, + 'keyword': { + pattern: /((?:^|\s)=?)(?:action|after|analysis|and|array|barchart|barwidth|begingraph|by|cas|cbarline|cfill|close|column|computed?|contains|data(?=\=)|define|document|do\s+over|do|dol|drop|dul|end|entryTitle|else|endcomp|fill(?:attrs)?|filename|group(?:by)?|headline|headskip|histogram|if|infile|keep|label|layout|legendlabel|length|libname|merge|midpoints|name|noobs|nowd|ods|options|or|out(?:put)?|overlay|plot|ranexp|rannor|rbreak|retain|set|session|sessref|statgraph|sum|summarize|table|temp|then\sdo|then|title\d?|to|var|where|xaxisopts|yaxisopts|y2axisopts)\b/i, + lookbehind: true, + }, + // In SAS Studio syntax highlighting, these operators are styled like keywords + 'operator-keyword': { + pattern: /\b(?:eq|ne|gt|lt|ge|le|in|not)\b/i, + alias: 'operator' + }, + // Decimal (1.2e23), hexadecimal (0c1x) + 'number': number, + 'operator': /\*\*?|\|\|?|!!?|¦¦?|<[>=]?|>[<=]?|[-+\/=&]|[~¬^]=?/i, + 'punctuation': punctuation + }; + +}(Prism)); diff --git a/components/prism-sas.min.js b/components/prism-sas.min.js index e89383b616..e8c47ccacb 100644 --- a/components/prism-sas.min.js +++ b/components/prism-sas.min.js @@ -1 +1 @@ -Prism.languages.sas={datalines:{pattern:/^\s*(?:(?:data)?lines|cards);[\s\S]+?(?:\r?\n|\r);/im,alias:"string",inside:{keyword:{pattern:/^(\s*)(?:(?:data)?lines|cards)/i,lookbehind:!0},punctuation:/;/}},comment:[{pattern:/(^\s*|;\s*)\*.*;/m,lookbehind:!0},/\/\*[\s\S]+?\*\//],datetime:{pattern:/'[^']+'(?:dt?|t)\b/i,alias:"number"},string:{pattern:/(["'])(?:\1\1|(?!\1)[\s\S])*\1/,greedy:!0},keyword:/\b(?:data|else|format|if|input|proc\s\w+|quit|run|then|libname|set|output|options)\b/i,number:/\b(?:[\da-f]+x|\d+(?:\.\d+)?(?:e[+-]?\d+)?)/i,operator:/\*\*?|\|\|?|!!?|¦¦?|<[>=]?|>[<=]?|[-+\/=&]|[~¬^]=?|\b(?:eq|ne|gt|lt|ge|le|in|not)\b/i,punctuation:/[$%@.(){}\[\];,\\]/}; \ No newline at end of file +!function(e){var t="([\"'])(?:\\1\\1|(?!\\1)[\\s\\S])*\\1(?!\\1)",a=/\b(?:\d[\da-f]*x|\d+(?:\.\d+)?(?:e[+-]?\d+)?)\b/i,n={pattern:RegExp(t+"[bx]"),alias:"number"},i=[{pattern:/(^\s*|;\s*)\*[^;]*;/m,lookbehind:!0},/\/\*[\s\S]+?\*\//],r={pattern:RegExp(t),greedy:!0},s=/[$%@.(){}\[\];,\\]/,o={"arg-value":{pattern:/(=)[A-Z]+/i,lookbehind:!0},operator:/=/,arg:{pattern:/[A-Z]+/i,alias:"keyword"},number:a,"numeric-constant":n,punctuation:s,string:r};e.languages.sas={datalines:{pattern:/^(\s*)(?:(?:data)?lines|cards);[\s\S]+?^;/im,lookbehind:!0,alias:"string",inside:{keyword:{pattern:/^(?:(?:data)?lines|cards)/i},punctuation:/;/}},"proc-sql":{pattern:/(^proc\s+(?:fed)?sql(?:\s+[\w|=]+)?;)[\s\S]+?(?=^(?:proc\s+\w+|quit|run|data);|(?![\s\S]))/im,lookbehind:!0,inside:{sql:{pattern:RegExp("^[ \t]*(?:select|alter\\s+table|(?:create|describe|drop)\\s+(?:index|table(?:\\s+constraints)?|view)|create\\s+unique\\s+index|insert\\s+into|update)(?:|[^;\"'])+;".replace(//g,t),"im"),alias:"language-sql",inside:e.languages.sql},"global-statements":{pattern:/((?:^|[\s])=?)(?:catname|checkpoint execute_always|dm|endsas|filename|footnote|%include|libname|%list|lock|missing|options|page|resetline|%run|sasfile|skip|sysecho|title\d?)\b/i,lookbehind:!0,alias:"keyword"},"sql-statements":{pattern:/(^|\s)(?:disconnect\s+from|exec(?:ute)?|begin|commit|rollback|reset|validate)\b/i,lookbehind:!0,alias:"keyword"},number:a,"numeric-constant":n,punctuation:s,string:r}},"proc-args":{pattern:RegExp("(^proc\\s+\\w+\\s+)(?!\\s)(?:[^;\"']|)+;".replace(//g,t),"im"),lookbehind:!0,inside:o},"macro-keyword":{pattern:/((?:^|\s)=?)%(?:ABORT|BQUOTE|BY|CMS|COPY|DISPLAY|DO|ELSE|END|EVAL|GLOBAL|GO|GOTO|IF|INC|INCLUDE|INDEX|INPUT|KTRIM|LENGTH|LET|LIST|LOCAL|NRBQUOTE|NRQUOTE|NRSTR|PUT|QKTRIM|QSCAN|QSUBSTR|QSYSFUNC|QUOTE|QUPCASE|RETURN|RUN|SCAN|STR|SUBSTR|SUPERQ|SYMDEL|SYMGLOBL|SYMLOCAL|SYMEXIST|SYSCALL|SYSEVALF|SYSEXEC|SYSFUNC|SYSGET|SYSRPUT|THEN|TO|TSO|UNQUOTE|UNTIL|UPCASE|WHILE|WINDOW)\b/i,lookbehind:!0,alias:"keyword"},"macro-declaration":{pattern:/^%macro[^;]+(?=;)/im,inside:{keyword:/%macro/i}},"macro-end":{pattern:/^%mend[^;]+(?=;)/im,inside:{keyword:/%mend/i}},macro:{pattern:/%_\w+(?=\()/,alias:"keyword"},input:{pattern:/\binput\s+[-\w\s/*.$&]+;/i,inside:{input:{alias:"keyword",pattern:/^input/i},comment:i,number:a,"numeric-constant":n}},comment:i,"options-args":{pattern:/(^options)[-'"|/\\<>*+=:()\w\s]*(?=;)/im,lookbehind:!0,inside:o},function:{pattern:/%?\w+(?=\()/,alias:"keyword"},format:{pattern:/\b(?:format|put)\b=?[\w'$.]+/im,inside:{keyword:/^(?:format|put)(?=\=)/i,equals:/=/,format:{pattern:/(?:\w|\$\d)+\.\d?/i,alias:"number"}}},altformat:{pattern:/\b(?:format|put)\s+[\w']+(?:\s+[$.\w]+)+(?=;)/i,inside:{keyword:/^(?:format|put)/i,format:{pattern:/[\w$]+\.\d?/,alias:"number"}}},"numeric-constant":n,datetime:{pattern:RegExp(t+"(?:dt?|t)"),alias:"number"},string:r,step:{pattern:/(^|\s+)(?:proc\s+\w+|quit|run|data(?!\=))\b/i,alias:"keyword",lookbehind:!0},keyword:{pattern:/((?:^|\s)=?)(?:action|after|analysis|and|array|barchart|barwidth|begingraph|by|cas|cbarline|cfill|close|column|computed?|contains|data(?=\=)|define|document|do\s+over|do|dol|drop|dul|end|entryTitle|else|endcomp|fill(?:attrs)?|filename|group(?:by)?|headline|headskip|histogram|if|infile|keep|label|layout|legendlabel|length|libname|merge|midpoints|name|noobs|nowd|ods|options|or|out(?:put)?|overlay|plot|ranexp|rannor|rbreak|retain|set|session|sessref|statgraph|sum|summarize|table|temp|then\sdo|then|title\d?|to|var|where|xaxisopts|yaxisopts|y2axisopts)\b/i,lookbehind:!0},"operator-keyword":{pattern:/\b(?:eq|ne|gt|lt|ge|le|in|not)\b/i,alias:"operator"},number:a,operator:/\*\*?|\|\|?|!!?|¦¦?|<[>=]?|>[<=]?|[-+\/=&]|[~¬^]=?/i,punctuation:s}}(Prism); \ No newline at end of file diff --git a/examples/prism-sas.html b/examples/prism-sas.html index 546404bf1d..da2a8b52b8 100644 --- a/examples/prism-sas.html +++ b/examples/prism-sas.html @@ -6,7 +6,7 @@

    Comments

    Numbers, dates and times

    42; 4.5; 4.5e-10; -3; -3.5e2; -4.2e-23;
    -0afx; 0123x; abcdefx;
    +0afx; 0123x;
     '1jan2013'd; '01jan09'd;
     '9:25't; '9:25:19pm't;
     '01may12:9:30:00'dt; '18jan2003:9:27:05am'dt;
    @@ -31,7 +31,8 @@ 

    Operators

    not a;

    More examples

    -
    /* Some examples adapted from the documentation (http://support.sas.com/documentation/cdl/en/basess/64003/PDF/default/basess.pdf) */
    +
    /* Some examples adapted from the documentation
    +   http://support.sas.com/documentation/cdl/en/basess/64003/PDF/default/basess.pdf */
     
     data city; * another inline comment;
     
    diff --git a/plugins/autoloader/prism-autoloader.js b/plugins/autoloader/prism-autoloader.js
    index 33db06a722..5f43ff5d2e 100644
    --- a/plugins/autoloader/prism-autoloader.js
    +++ b/plugins/autoloader/prism-autoloader.js
    @@ -91,6 +91,7 @@
     		],
     		"reason": "clike",
     		"ruby": "clike",
    +		"sas": "sql",
     		"sass": "css",
     		"scss": "css",
     		"scala": "java",
    diff --git a/plugins/autoloader/prism-autoloader.min.js b/plugins/autoloader/prism-autoloader.min.js
    index 08ffabf0e5..af20027810 100644
    --- a/plugins/autoloader/prism-autoloader.min.js
    +++ b/plugins/autoloader/prism-autoloader.min.js
    @@ -1 +1 @@
    -!function(){if("undefined"!=typeof self&&self.Prism&&self.document&&document.createElement){var r={javascript:"clike",actionscript:"javascript",arduino:"cpp",aspnet:["markup","csharp"],bison:"c",c:"clike",csharp:"clike",cpp:"c",coffeescript:"javascript",crystal:"ruby","css-extras":"css",d:"clike",dart:"clike",django:"markup-templating",ejs:["javascript","markup-templating"],erb:["ruby","markup-templating"],fsharp:"clike",flow:"javascript",glsl:"clike",gml:"clike",go:"clike",groovy:"clike",haml:"ruby",handlebars:"markup-templating",haxe:"clike",java:"clike",javadoc:["markup","java","javadoclike"],jolie:"clike",jsdoc:["javascript","javadoclike"],"js-extras":"javascript","js-templates":"javascript",jsonp:"json",json5:"json",kotlin:"clike",less:"css",lilypond:"scheme",markdown:"markup","markup-templating":"markup",n4js:"javascript",nginx:"clike",objectivec:"c",opencl:"cpp",parser:"markup",php:["clike","markup-templating"],phpdoc:["php","javadoclike"],"php-extras":"php",plsql:"sql",processing:"clike",protobuf:"clike",pug:["markup","javascript"],qore:"clike",jsx:["markup","javascript"],tsx:["jsx","typescript"],reason:"clike",ruby:"clike",sass:"css",scss:"css",scala:"java","shell-session":"bash",smarty:"markup-templating",soy:"markup-templating",swift:"clike",tap:"yaml",textile:"markup",tt2:["clike","markup-templating"],twig:"markup",typescript:"javascript","t4-cs":["t4-templating","csharp"],"t4-vb":["t4-templating","visual-basic"],vala:"clike",vbnet:"basic",velocity:"markup",wiki:"markup",xeora:"markup",xquery:"markup"},n={html:"markup",xml:"markup",svg:"markup",mathml:"markup",js:"javascript",adoc:"asciidoc",shell:"bash",rbnf:"bnf",cs:"csharp",dotnet:"csharp",coffee:"coffeescript",jinja2:"django","dns-zone":"dns-zone-file",dockerfile:"docker",gamemakerlanguage:"gml",hs:"haskell",tex:"latex",context:"latex",ly:"lilypond",emacs:"lisp",elisp:"lisp","emacs-lisp":"lisp",md:"markdown",n4jsd:"n4js",objectpascal:"pascal",px:"pcaxis",py:"python",rb:"ruby",trig:"turtle",ts:"typescript",t4:"t4-cs",vb:"visual-basic",xeoracube:"xeora",yml:"yaml"},l={},e=document.getElementsByTagName("script"),a=e[e.length-1],t="components/",s=/\bplugins\/autoloader\/prism-autoloader\.(?:min\.)js$/i,i=/[\w-]+\.(?:min\.)js$/i;if(a.hasAttribute("data-autoloader-path"))t=a.getAttribute("data-autoloader-path").trim().replace(/\/?$/,"/");else{var c=a.src;s.test(c)?t=c.replace(s,"components/"):i.test(c)&&(t=c.replace(i,"components/"))}var p=Prism.plugins.autoloader={languages_path:t,use_minified:!0,loadLanguages:o};Prism.hooks.add("complete",function(e){e.element&&e.language&&!e.grammar&&"none"!==e.language&&function(e,a){e in n&&(e=n[e]);var t=a.getAttribute("data-dependencies"),s=a.parentElement;!t&&s&&"pre"===s.tagName.toLowerCase()&&(t=s.getAttribute("data-dependencies")),o(t=t?t.split(/\s*,\s*/g):[],function(){m(e,function(){Prism.highlightElement(a)})})}(e.language,e.element)})}function o(e,a,t){"string"==typeof e&&(e=[e]);var s=e.length,i=0,c=!1;function r(){c||++i===s&&a&&a(e)}0!==s?e.forEach(function(e){m(e,r,function(){c||(c=!0,t&&t(e))})}):a&&setTimeout(a,0)}function m(a,t,s){var i=0<=a.indexOf("!");a=a.replace("!",""),a=n[a]||a;var e=function(){var e=l[a];if(e||(e=l[a]={callbacks:[]}),e.callbacks.push({success:t,error:s}),!i&&Prism.languages[a])u(a,"success");else if(!i&&e.error)u(a,"error");else if(i||!e.loading){e.loading=!0,function(e,a,t){var s=document.createElement("script");s.src=e,s.async=!0,s.onload=function(){document.body.removeChild(s),a&&a()},s.onerror=function(){document.body.removeChild(s),t&&t()},document.body.appendChild(s)}(function(e){return p.languages_path+"prism-"+e+(p.use_minified?".min":"")+".js"}(a),function(){e.loading=!1,u(a,"success")},function(){e.loading=!1,e.error=!0,u(a,"error")})}},c=r[a];c&&c.length?o(c,e,s):e()}function u(e,a){if(l[e]){for(var t=l[e].callbacks,s=0,i=t.length;s
    Date: Thu, 8 Aug 2019 21:41:28 +0200
    Subject: [PATCH 0335/1100] SAS: Fixed `proc-args` token by removing
     backreferences from string pattern (#2013)
    
    Because the `proc-args` pattern has a lookbehind capturing group, the `\1` in the string pattern will refer to the lookbehind group. This PR fixes this bug by replacing the old string pattern with old that doesn't use backreferences.
    ---
     components/prism-sas.js     | 2 +-
     components/prism-sas.min.js | 2 +-
     2 files changed, 2 insertions(+), 2 deletions(-)
    
    diff --git a/components/prism-sas.js b/components/prism-sas.js
    index 1dcc5a6b71..27b28558fc 100644
    --- a/components/prism-sas.js
    +++ b/components/prism-sas.js
    @@ -1,6 +1,6 @@
     (function (Prism) {
     
    -	var stringPattern = /(["'])(?:\1\1|(?!\1)[\s\S])*\1(?!\1)/.source;
    +	var stringPattern = /(?:"(?:""|[^"])*"(?!")|'(?:''|[^'])*'(?!'))/.source;
     
     	var number = /\b(?:\d[\da-f]*x|\d+(?:\.\d+)?(?:e[+-]?\d+)?)\b/i;
     	var numericConstant = {
    diff --git a/components/prism-sas.min.js b/components/prism-sas.min.js
    index e8c47ccacb..b354cee990 100644
    --- a/components/prism-sas.min.js
    +++ b/components/prism-sas.min.js
    @@ -1 +1 @@
    -!function(e){var t="([\"'])(?:\\1\\1|(?!\\1)[\\s\\S])*\\1(?!\\1)",a=/\b(?:\d[\da-f]*x|\d+(?:\.\d+)?(?:e[+-]?\d+)?)\b/i,n={pattern:RegExp(t+"[bx]"),alias:"number"},i=[{pattern:/(^\s*|;\s*)\*[^;]*;/m,lookbehind:!0},/\/\*[\s\S]+?\*\//],r={pattern:RegExp(t),greedy:!0},s=/[$%@.(){}\[\];,\\]/,o={"arg-value":{pattern:/(=)[A-Z]+/i,lookbehind:!0},operator:/=/,arg:{pattern:/[A-Z]+/i,alias:"keyword"},number:a,"numeric-constant":n,punctuation:s,string:r};e.languages.sas={datalines:{pattern:/^(\s*)(?:(?:data)?lines|cards);[\s\S]+?^;/im,lookbehind:!0,alias:"string",inside:{keyword:{pattern:/^(?:(?:data)?lines|cards)/i},punctuation:/;/}},"proc-sql":{pattern:/(^proc\s+(?:fed)?sql(?:\s+[\w|=]+)?;)[\s\S]+?(?=^(?:proc\s+\w+|quit|run|data);|(?![\s\S]))/im,lookbehind:!0,inside:{sql:{pattern:RegExp("^[ \t]*(?:select|alter\\s+table|(?:create|describe|drop)\\s+(?:index|table(?:\\s+constraints)?|view)|create\\s+unique\\s+index|insert\\s+into|update)(?:|[^;\"'])+;".replace(//g,t),"im"),alias:"language-sql",inside:e.languages.sql},"global-statements":{pattern:/((?:^|[\s])=?)(?:catname|checkpoint execute_always|dm|endsas|filename|footnote|%include|libname|%list|lock|missing|options|page|resetline|%run|sasfile|skip|sysecho|title\d?)\b/i,lookbehind:!0,alias:"keyword"},"sql-statements":{pattern:/(^|\s)(?:disconnect\s+from|exec(?:ute)?|begin|commit|rollback|reset|validate)\b/i,lookbehind:!0,alias:"keyword"},number:a,"numeric-constant":n,punctuation:s,string:r}},"proc-args":{pattern:RegExp("(^proc\\s+\\w+\\s+)(?!\\s)(?:[^;\"']|)+;".replace(//g,t),"im"),lookbehind:!0,inside:o},"macro-keyword":{pattern:/((?:^|\s)=?)%(?:ABORT|BQUOTE|BY|CMS|COPY|DISPLAY|DO|ELSE|END|EVAL|GLOBAL|GO|GOTO|IF|INC|INCLUDE|INDEX|INPUT|KTRIM|LENGTH|LET|LIST|LOCAL|NRBQUOTE|NRQUOTE|NRSTR|PUT|QKTRIM|QSCAN|QSUBSTR|QSYSFUNC|QUOTE|QUPCASE|RETURN|RUN|SCAN|STR|SUBSTR|SUPERQ|SYMDEL|SYMGLOBL|SYMLOCAL|SYMEXIST|SYSCALL|SYSEVALF|SYSEXEC|SYSFUNC|SYSGET|SYSRPUT|THEN|TO|TSO|UNQUOTE|UNTIL|UPCASE|WHILE|WINDOW)\b/i,lookbehind:!0,alias:"keyword"},"macro-declaration":{pattern:/^%macro[^;]+(?=;)/im,inside:{keyword:/%macro/i}},"macro-end":{pattern:/^%mend[^;]+(?=;)/im,inside:{keyword:/%mend/i}},macro:{pattern:/%_\w+(?=\()/,alias:"keyword"},input:{pattern:/\binput\s+[-\w\s/*.$&]+;/i,inside:{input:{alias:"keyword",pattern:/^input/i},comment:i,number:a,"numeric-constant":n}},comment:i,"options-args":{pattern:/(^options)[-'"|/\\<>*+=:()\w\s]*(?=;)/im,lookbehind:!0,inside:o},function:{pattern:/%?\w+(?=\()/,alias:"keyword"},format:{pattern:/\b(?:format|put)\b=?[\w'$.]+/im,inside:{keyword:/^(?:format|put)(?=\=)/i,equals:/=/,format:{pattern:/(?:\w|\$\d)+\.\d?/i,alias:"number"}}},altformat:{pattern:/\b(?:format|put)\s+[\w']+(?:\s+[$.\w]+)+(?=;)/i,inside:{keyword:/^(?:format|put)/i,format:{pattern:/[\w$]+\.\d?/,alias:"number"}}},"numeric-constant":n,datetime:{pattern:RegExp(t+"(?:dt?|t)"),alias:"number"},string:r,step:{pattern:/(^|\s+)(?:proc\s+\w+|quit|run|data(?!\=))\b/i,alias:"keyword",lookbehind:!0},keyword:{pattern:/((?:^|\s)=?)(?:action|after|analysis|and|array|barchart|barwidth|begingraph|by|cas|cbarline|cfill|close|column|computed?|contains|data(?=\=)|define|document|do\s+over|do|dol|drop|dul|end|entryTitle|else|endcomp|fill(?:attrs)?|filename|group(?:by)?|headline|headskip|histogram|if|infile|keep|label|layout|legendlabel|length|libname|merge|midpoints|name|noobs|nowd|ods|options|or|out(?:put)?|overlay|plot|ranexp|rannor|rbreak|retain|set|session|sessref|statgraph|sum|summarize|table|temp|then\sdo|then|title\d?|to|var|where|xaxisopts|yaxisopts|y2axisopts)\b/i,lookbehind:!0},"operator-keyword":{pattern:/\b(?:eq|ne|gt|lt|ge|le|in|not)\b/i,alias:"operator"},number:a,operator:/\*\*?|\|\|?|!!?|¦¦?|<[>=]?|>[<=]?|[-+\/=&]|[~¬^]=?/i,punctuation:s}}(Prism);
    \ No newline at end of file
    +!function(e){var t="(?:\"(?:\"\"|[^\"])*\"(?!\")|'(?:''|[^'])*'(?!'))",a=/\b(?:\d[\da-f]*x|\d+(?:\.\d+)?(?:e[+-]?\d+)?)\b/i,n={pattern:RegExp(t+"[bx]"),alias:"number"},i=[{pattern:/(^\s*|;\s*)\*[^;]*;/m,lookbehind:!0},/\/\*[\s\S]+?\*\//],r={pattern:RegExp(t),greedy:!0},s=/[$%@.(){}\[\];,\\]/,o={"arg-value":{pattern:/(=)[A-Z]+/i,lookbehind:!0},operator:/=/,arg:{pattern:/[A-Z]+/i,alias:"keyword"},number:a,"numeric-constant":n,punctuation:s,string:r};e.languages.sas={datalines:{pattern:/^(\s*)(?:(?:data)?lines|cards);[\s\S]+?^;/im,lookbehind:!0,alias:"string",inside:{keyword:{pattern:/^(?:(?:data)?lines|cards)/i},punctuation:/;/}},"proc-sql":{pattern:/(^proc\s+(?:fed)?sql(?:\s+[\w|=]+)?;)[\s\S]+?(?=^(?:proc\s+\w+|quit|run|data);|(?![\s\S]))/im,lookbehind:!0,inside:{sql:{pattern:RegExp("^[ \t]*(?:select|alter\\s+table|(?:create|describe|drop)\\s+(?:index|table(?:\\s+constraints)?|view)|create\\s+unique\\s+index|insert\\s+into|update)(?:|[^;\"'])+;".replace(//g,t),"im"),alias:"language-sql",inside:e.languages.sql},"global-statements":{pattern:/((?:^|[\s])=?)(?:catname|checkpoint execute_always|dm|endsas|filename|footnote|%include|libname|%list|lock|missing|options|page|resetline|%run|sasfile|skip|sysecho|title\d?)\b/i,lookbehind:!0,alias:"keyword"},"sql-statements":{pattern:/(^|\s)(?:disconnect\s+from|exec(?:ute)?|begin|commit|rollback|reset|validate)\b/i,lookbehind:!0,alias:"keyword"},number:a,"numeric-constant":n,punctuation:s,string:r}},"proc-args":{pattern:RegExp("(^proc\\s+\\w+\\s+)(?!\\s)(?:[^;\"']|)+;".replace(//g,t),"im"),lookbehind:!0,inside:o},"macro-keyword":{pattern:/((?:^|\s)=?)%(?:ABORT|BQUOTE|BY|CMS|COPY|DISPLAY|DO|ELSE|END|EVAL|GLOBAL|GO|GOTO|IF|INC|INCLUDE|INDEX|INPUT|KTRIM|LENGTH|LET|LIST|LOCAL|NRBQUOTE|NRQUOTE|NRSTR|PUT|QKTRIM|QSCAN|QSUBSTR|QSYSFUNC|QUOTE|QUPCASE|RETURN|RUN|SCAN|STR|SUBSTR|SUPERQ|SYMDEL|SYMGLOBL|SYMLOCAL|SYMEXIST|SYSCALL|SYSEVALF|SYSEXEC|SYSFUNC|SYSGET|SYSRPUT|THEN|TO|TSO|UNQUOTE|UNTIL|UPCASE|WHILE|WINDOW)\b/i,lookbehind:!0,alias:"keyword"},"macro-declaration":{pattern:/^%macro[^;]+(?=;)/im,inside:{keyword:/%macro/i}},"macro-end":{pattern:/^%mend[^;]+(?=;)/im,inside:{keyword:/%mend/i}},macro:{pattern:/%_\w+(?=\()/,alias:"keyword"},input:{pattern:/\binput\s+[-\w\s/*.$&]+;/i,inside:{input:{alias:"keyword",pattern:/^input/i},comment:i,number:a,"numeric-constant":n}},comment:i,"options-args":{pattern:/(^options)[-'"|/\\<>*+=:()\w\s]*(?=;)/im,lookbehind:!0,inside:o},function:{pattern:/%?\w+(?=\()/,alias:"keyword"},format:{pattern:/\b(?:format|put)\b=?[\w'$.]+/im,inside:{keyword:/^(?:format|put)(?=\=)/i,equals:/=/,format:{pattern:/(?:\w|\$\d)+\.\d?/i,alias:"number"}}},altformat:{pattern:/\b(?:format|put)\s+[\w']+(?:\s+[$.\w]+)+(?=;)/i,inside:{keyword:/^(?:format|put)/i,format:{pattern:/[\w$]+\.\d?/,alias:"number"}}},"numeric-constant":n,datetime:{pattern:RegExp(t+"(?:dt?|t)"),alias:"number"},string:r,step:{pattern:/(^|\s+)(?:proc\s+\w+|quit|run|data(?!\=))\b/i,alias:"keyword",lookbehind:!0},keyword:{pattern:/((?:^|\s)=?)(?:action|after|analysis|and|array|barchart|barwidth|begingraph|by|cas|cbarline|cfill|close|column|computed?|contains|data(?=\=)|define|document|do\s+over|do|dol|drop|dul|end|entryTitle|else|endcomp|fill(?:attrs)?|filename|group(?:by)?|headline|headskip|histogram|if|infile|keep|label|layout|legendlabel|length|libname|merge|midpoints|name|noobs|nowd|ods|options|or|out(?:put)?|overlay|plot|ranexp|rannor|rbreak|retain|set|session|sessref|statgraph|sum|summarize|table|temp|then\sdo|then|title\d?|to|var|where|xaxisopts|yaxisopts|y2axisopts)\b/i,lookbehind:!0},"operator-keyword":{pattern:/\b(?:eq|ne|gt|lt|ge|le|in|not)\b/i,alias:"operator"},number:a,operator:/\*\*?|\|\|?|!!?|¦¦?|<[>=]?|>[<=]?|[-+\/=&]|[~¬^]=?/i,punctuation:s}}(Prism);
    \ No newline at end of file
    
    From e2b99f403dceff087e257bd7f4ab178e11ebae4b Mon Sep 17 00:00:00 2001
    From: Michael Schmidt 
    Date: Wed, 14 Aug 2019 11:40:43 +0200
    Subject: [PATCH 0336/1100] Added support for GDScript (#2006)
    
    This adds support for the GDScript language.
    ---
     components.js                                 |  2 +-
     components.json                               |  4 +
     components/prism-gdscript.js                  | 27 ++++++
     components/prism-gdscript.min.js              |  1 +
     examples/prism-gdscript.html                  | 66 ++++++++++++++
     plugins/show-language/prism-show-language.js  |  1 +
     .../show-language/prism-show-language.min.js  |  2 +-
     .../gdscript/class-name_feature.test          | 79 ++++++++++++++++
     tests/languages/gdscript/keyword_feature.test | 91 +++++++++++++++++++
     tests/languages/gdscript/number_feature.test  | 34 +++++++
     .../languages/gdscript/operator_feature.test  | 46 ++++++++++
     .../gdscript/punctuation_feature.test         | 20 ++++
     tests/languages/gdscript/string_feature.test  | 29 ++++++
     13 files changed, 400 insertions(+), 2 deletions(-)
     create mode 100644 components/prism-gdscript.js
     create mode 100644 components/prism-gdscript.min.js
     create mode 100644 examples/prism-gdscript.html
     create mode 100644 tests/languages/gdscript/class-name_feature.test
     create mode 100644 tests/languages/gdscript/keyword_feature.test
     create mode 100644 tests/languages/gdscript/number_feature.test
     create mode 100644 tests/languages/gdscript/operator_feature.test
     create mode 100644 tests/languages/gdscript/punctuation_feature.test
     create mode 100644 tests/languages/gdscript/string_feature.test
    
    diff --git a/components.js b/components.js
    index 4ebf63403e..1a0a15648a 100644
    --- a/components.js
    +++ b/components.js
    @@ -1,2 +1,2 @@
    -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default","peerDependencies":"markup"},"clike":{"title":"C-like","option":"default","overrideExampleHeader":true},"javascript":{"title":"JavaScript","require":"clike","peerDependencies":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"Augmented Backus–Naur form","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","peerDependencies":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"Backus–Naur form","alias":"rbnf","aliasTitles":{"rbnf":"Routing Backus–Naur form"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"Extended Backus–Naur form","owner":"RunDevelopment"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment"},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","peerDependencies":["css","coffeescript","erb","javascript","less","markdown","ruby","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"http":{"title":"HTTP","peerDependencies":["javascript","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"peerDependencies":["scala"],"owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","peerDependencies":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike"],"peerDependencies":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","peerDependencies":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"js-templates":{"title":"JS Templates","require":"javascript","peerDependencies":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"json":{"title":"JSON","owner":"CupOfTea696"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"less":{"title":"Less","require":"css","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","peerDependencies":["jsdoc"],"alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"nasm":{"title":"NASM","owner":"rbmj"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"cpp","peerDependencies":["c","cpp"],"overrideExampleHeader":true,"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"peerDependencies":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","peerDependencies":["c","cpp","fortran"],"owner":"Golmote"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"peerDependencies":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","peerDependencies":["actionscript","coffeescript","flow","javascript","typescript","vala"],"owner":"RunDevelopment"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","require":"sql","owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","peerDependencies":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"turtle":{"title":"Turtle","alias":["trig"],"aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","peerDependencies":"js-templates","alias":"ts","owner":"vkbansal"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","visual-basic"],"owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":"Line Highlight","line-numbers":{"title":"Line Numbers","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","after":["autolinker","data-uri-highlight"]},"autolinker":"Autolinker","wpd":"WebPlatform Docs","custom-class":{"title":"Custom Class","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","noCSS":true},"show-language":{"title":"Show Language","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","owner":"Golmote","noCSS":true},"previewers":{"title":"Previewers","owner":"Golmote"},"autoloader":{"title":"Autoloader","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","owner":"Golmote","after":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","owner":"chriswells0"},"unescaped-markup":"Unescaped Markup","normalize-whitespace":{"title":"Normalize Whitespace","owner":"zeitgeist87","after":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"diff-highlight":{"title":"Diff Highlight","owner":"RunDevelopment","require":"diff"}}};
    +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default","peerDependencies":"markup"},"clike":{"title":"C-like","option":"default","overrideExampleHeader":true},"javascript":{"title":"JavaScript","require":"clike","peerDependencies":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"Augmented Backus–Naur form","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","peerDependencies":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"Backus–Naur form","alias":"rbnf","aliasTitles":{"rbnf":"Routing Backus–Naur form"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"Extended Backus–Naur form","owner":"RunDevelopment"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment"},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","peerDependencies":["css","coffeescript","erb","javascript","less","markdown","ruby","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"http":{"title":"HTTP","peerDependencies":["javascript","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"peerDependencies":["scala"],"owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","peerDependencies":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike"],"peerDependencies":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","peerDependencies":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"js-templates":{"title":"JS Templates","require":"javascript","peerDependencies":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"json":{"title":"JSON","owner":"CupOfTea696"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"less":{"title":"Less","require":"css","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","peerDependencies":["jsdoc"],"alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"nasm":{"title":"NASM","owner":"rbmj"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"cpp","peerDependencies":["c","cpp"],"overrideExampleHeader":true,"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"peerDependencies":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","peerDependencies":["c","cpp","fortran"],"owner":"Golmote"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"peerDependencies":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","peerDependencies":["actionscript","coffeescript","flow","javascript","typescript","vala"],"owner":"RunDevelopment"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","require":"sql","owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","peerDependencies":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"turtle":{"title":"Turtle","alias":["trig"],"aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","peerDependencies":"js-templates","alias":"ts","owner":"vkbansal"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","visual-basic"],"owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":"Line Highlight","line-numbers":{"title":"Line Numbers","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","after":["autolinker","data-uri-highlight"]},"autolinker":"Autolinker","wpd":"WebPlatform Docs","custom-class":{"title":"Custom Class","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","noCSS":true},"show-language":{"title":"Show Language","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","owner":"Golmote","noCSS":true},"previewers":{"title":"Previewers","owner":"Golmote"},"autoloader":{"title":"Autoloader","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","owner":"Golmote","after":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","owner":"chriswells0"},"unescaped-markup":"Unescaped Markup","normalize-whitespace":{"title":"Normalize Whitespace","owner":"zeitgeist87","after":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"diff-highlight":{"title":"Diff Highlight","owner":"RunDevelopment","require":"diff"}}};
     if (typeof module !== 'undefined' && module.exports) { module.exports = components; }
    \ No newline at end of file
    diff --git a/components.json b/components.json
    index c9131d8c8a..2342a41d89 100644
    --- a/components.json
    +++ b/components.json
    @@ -298,6 +298,10 @@
     			"title": "G-code",
     			"owner": "RunDevelopment"
     		},
    +		"gdscript": {
    +			"title": "GDScript",
    +			"owner": "RunDevelopment"
    +		},
     		"gedcom": {
     			"title": "GEDCOM",
     			"owner": "Golmote"
    diff --git a/components/prism-gdscript.js b/components/prism-gdscript.js
    new file mode 100644
    index 0000000000..3db862f29e
    --- /dev/null
    +++ b/components/prism-gdscript.js
    @@ -0,0 +1,27 @@
    +Prism.languages.gdscript = {
    +	'comment': /#.*/,
    +	'string': {
    +		pattern: /@?(?:("|')(?:(?!\1)[^\n\\]|\\[\s\S])*\1(?!"|')|"""(?:[^\\]|\\[\s\S])*?""")/,
    +		greedy: true
    +	},
    +	'class-name': {
    +		// class_name Foo, extends Bar, class InnerClass
    +		// export(int) var baz, export(int, 0) var i
    +		// as Node
    +		// const FOO: int = 9, var bar: bool = true
    +		// func add(reference: Item, amount: int) -> Item:
    +		pattern: /(^(?:class_name|class|extends)[ \t]+|^export\([ \t]*|\bas[ \t]+|(?:\b(?:const|var)[ \t]|[,(])[ \t]*\w+[ \t]*:[ \t]*|->[ \t]*)[a-zA-Z_]\w*/m,
    +		lookbehind: true
    +	},
    +	'keyword': /\b(?:and|as|assert|break|breakpoint|class|class_name|const|continue|elif|else|enum|export|extends|for|func|if|in|is|master|mastersync|match|not|null|onready|or|pass|preload|puppet|puppetsync|remote|remotesync|return|self|setget|signal|static|tool|var|while|yield)\b/,
    +	'function': /[a-z_]\w*(?=[ \t]*\()/i,
    +	'variable': /\$\w+/,
    +	'number': [
    +		/\b0b[01_]+\b|\b0x[\da-fA-F_]+\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.[\d_]+)(?:e[+-]?[\d_]+)?\b/,
    +		/\b(?:INF|NAN|PI|TAU)\b/
    +	],
    +	'constant': /\b[A-Z][A-Z_\d]*\b/,
    +	'boolean': /\b(?:false|true)\b/,
    +	'operator': /->|:=|&&|\|\||<<|>>|[-+*/%&|!<>=]=?|[~^]/,
    +	'punctuation': /[.:,;()[\]{}]/
    +};
    diff --git a/components/prism-gdscript.min.js b/components/prism-gdscript.min.js
    new file mode 100644
    index 0000000000..5746fed602
    --- /dev/null
    +++ b/components/prism-gdscript.min.js
    @@ -0,0 +1 @@
    +Prism.languages.gdscript={comment:/#.*/,string:{pattern:/@?(?:("|')(?:(?!\1)[^\n\\]|\\[\s\S])*\1(?!"|')|"""(?:[^\\]|\\[\s\S])*?""")/,greedy:!0},"class-name":{pattern:/(^(?:class_name|class|extends)[ \t]+|^export\([ \t]*|\bas[ \t]+|(?:\b(?:const|var)[ \t]|[,(])[ \t]*\w+[ \t]*:[ \t]*|->[ \t]*)[a-zA-Z_]\w*/m,lookbehind:!0},keyword:/\b(?:and|as|assert|break|breakpoint|class|class_name|const|continue|elif|else|enum|export|extends|for|func|if|in|is|master|mastersync|match|not|null|onready|or|pass|preload|puppet|puppetsync|remote|remotesync|return|self|setget|signal|static|tool|var|while|yield)\b/,function:/[a-z_]\w*(?=[ \t]*\()/i,variable:/\$\w+/,number:[/\b0b[01_]+\b|\b0x[\da-fA-F_]+\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.[\d_]+)(?:e[+-]?[\d_]+)?\b/,/\b(?:INF|NAN|PI|TAU)\b/],constant:/\b[A-Z][A-Z_\d]*\b/,boolean:/\b(?:false|true)\b/,operator:/->|:=|&&|\|\||<<|>>|[-+*/%&|!<>=]=?|[~^]/,punctuation:/[.:,;()[\]{}]/};
    \ No newline at end of file
    diff --git a/examples/prism-gdscript.html b/examples/prism-gdscript.html
    new file mode 100644
    index 0000000000..16b510656a
    --- /dev/null
    +++ b/examples/prism-gdscript.html
    @@ -0,0 +1,66 @@
    +

    Full example

    +
    extends BaseClass
    +class_name MyClass, "res://path/to/optional/icon.svg"
    +
    +# Member Variables
    +
    +var a = 5
    +var s = "Hello"
    +var arr = [1, 2, 3]
    +var dict = {"key": "value", 2:3}
    +var typed_var: int
    +var inferred_type := "String"
    +
    +# Constants
    +
    +const ANSWER = 42
    +const THE_NAME = "Charly"
    +
    +# Enums
    +
    +enum {UNIT_NEUTRAL, UNIT_ENEMY, UNIT_ALLY}
    +enum Named {THING_1, THING_2, ANOTHER_THING = -1}
    +
    +# Built-in Vector Types
    +
    +var v2 = Vector2(1, 2)
    +var v3 = Vector3(1, 2, 3)
    +
    +# Function
    +
    +func some_function(param1, param2):
    +	var local_var = 5
    +
    +	if param1 < local_var:
    +		print(param1)
    +	elif param2 > 5:
    +		print(param2)
    +	else:
    +		print("Fail!")
    +
    +	for i in range(20):
    +		print(i)
    +
    +	while param2 != 0:
    +		param2 -= 1
    +
    +	var local_var2 = param1 + 3
    +	return local_var2
    +
    +# Functions override functions with the same name on the base/parent class.
    +# If you still want to call them, use '.' (like 'super' in other languages).
    +
    +func something(p1, p2):
    +	.something(p1, p2)
    +
    +# Inner Class
    +
    +class Something:
    +	var a = 10
    +
    +# Constructor
    +
    +func _init():
    +	print("Constructed!")
    +	var lv = Something.new()
    +	print(lv.a)
    diff --git a/plugins/show-language/prism-show-language.js b/plugins/show-language/prism-show-language.js index 811b1a84b6..a7794836d1 100644 --- a/plugins/show-language/prism-show-language.js +++ b/plugins/show-language/prism-show-language.js @@ -53,6 +53,7 @@ "erb": "ERB", "fsharp": "F#", "gcode": "G-code", + "gdscript": "GDScript", "gedcom": "GEDCOM", "glsl": "GLSL", "gml": "GameMaker Language", diff --git a/plugins/show-language/prism-show-language.min.js b/plugins/show-language/prism-show-language.min.js index 6f3c91e060..60d244ce94 100644 --- a/plugins/show-language/prism-show-language.min.js +++ b/plugins/show-language/prism-show-language.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof self&&self.Prism&&self.document)if(Prism.plugins.toolbar){var l={html:"HTML",xml:"XML",svg:"SVG",mathml:"MathML",css:"CSS",clike:"C-like",js:"JavaScript",abap:"ABAP",abnf:"Augmented Backus–Naur form",apacheconf:"Apache Configuration",apl:"APL",arff:"ARFF",asciidoc:"AsciiDoc",adoc:"AsciiDoc",asm6502:"6502 Assembly",aspnet:"ASP.NET (C#)",autohotkey:"AutoHotkey",autoit:"AutoIt",shell:"Bash",basic:"BASIC",bnf:"Backus–Naur form",rbnf:"Routing Backus–Naur form",csharp:"C#",cs:"C#",dotnet:"C#",cpp:"C++",cil:"CIL",coffee:"CoffeeScript",cmake:"CMake",csp:"Content-Security-Policy","css-extras":"CSS Extras",django:"Django/Jinja2",jinja2:"Django/Jinja2","dns-zone-file":"DNS zone file","dns-zone":"DNS zone file",dockerfile:"Docker",ebnf:"Extended Backus–Naur form",ejs:"EJS",erb:"ERB",fsharp:"F#",gcode:"G-code",gedcom:"GEDCOM",glsl:"GLSL",gml:"GameMaker Language",gamemakerlanguage:"GameMaker Language",graphql:"GraphQL",hs:"Haskell",hcl:"HCL",http:"HTTP",hpkp:"HTTP Public-Key-Pins",hsts:"HTTP Strict-Transport-Security",ichigojam:"IchigoJam",inform7:"Inform 7",javadoc:"JavaDoc",javadoclike:"JavaDoc-like",javastacktrace:"Java stack trace",jq:"JQ",jsdoc:"JSDoc","js-extras":"JS Extras","js-templates":"JS Templates",json:"JSON",jsonp:"JSONP",json5:"JSON5",latex:"LaTeX",tex:"TeX",context:"ConTeXt",lilypond:"LilyPond",ly:"LilyPond",emacs:"Lisp",elisp:"Lisp","emacs-lisp":"Lisp",lolcode:"LOLCODE",md:"Markdown","markup-templating":"Markup templating",matlab:"MATLAB",mel:"MEL",n1ql:"N1QL",n4js:"N4JS",n4jsd:"N4JS","nand2tetris-hdl":"Nand To Tetris HDL",nasm:"NASM",nginx:"nginx",nsis:"NSIS",objectivec:"Objective-C",ocaml:"OCaml",opencl:"OpenCL",parigp:"PARI/GP",objectpascal:"Object Pascal",pcaxis:"PC-Axis",px:"PC-Axis",php:"PHP",phpdoc:"PHPDoc","php-extras":"PHP Extras",plsql:"PL/SQL",powershell:"PowerShell",properties:".properties",protobuf:"Protocol Buffers",py:"Python",q:"Q (kdb+ database)",jsx:"React JSX",tsx:"React TSX",renpy:"Ren'py",rest:"reST (reStructuredText)",rb:"Ruby",sas:"SAS",sass:"Sass (Sass)",scss:"Sass (Scss)","shell-session":"Shell session",soy:"Soy (Closure Template)","splunk-spl":"Splunk SPL",sql:"SQL",tap:"TAP",toml:"TOML",tt2:"Template Toolkit 2",trig:"TriG",ts:"TypeScript","t4-cs":"T4 Text Templates (C#)",t4:"T4 Text Templates (C#)","t4-vb":"T4 Text Templates (VB)","t4-templating":"T4 templating",vbnet:"VB.Net",vhdl:"VHDL",vim:"vim","visual-basic":"Visual Basic",vb:"Visual Basic",wasm:"WebAssembly",wiki:"Wiki markup",xeoracube:"XeoraCube",xojo:"Xojo (REALbasic)",xquery:"XQuery",yaml:"YAML",yml:"YAML"};Prism.plugins.toolbar.registerButton("show-language",function(e){var a=e.element.parentNode;if(a&&/pre/i.test(a.nodeName)){var s,t=a.getAttribute("data-language")||l[e.language]||((s=e.language)?(s.substring(0,1).toUpperCase()+s.substring(1)).replace(/s(?=cript)/,"S"):s);if(t){var o=document.createElement("span");return o.textContent=t,o}}})}else console.warn("Show Languages plugin loaded before Toolbar plugin.")}(); \ No newline at end of file +!function(){if("undefined"!=typeof self&&self.Prism&&self.document)if(Prism.plugins.toolbar){var i={html:"HTML",xml:"XML",svg:"SVG",mathml:"MathML",css:"CSS",clike:"C-like",js:"JavaScript",abap:"ABAP",abnf:"Augmented Backus–Naur form",apacheconf:"Apache Configuration",apl:"APL",arff:"ARFF",asciidoc:"AsciiDoc",adoc:"AsciiDoc",asm6502:"6502 Assembly",aspnet:"ASP.NET (C#)",autohotkey:"AutoHotkey",autoit:"AutoIt",shell:"Bash",basic:"BASIC",bnf:"Backus–Naur form",rbnf:"Routing Backus–Naur form",csharp:"C#",cs:"C#",dotnet:"C#",cpp:"C++",cil:"CIL",coffee:"CoffeeScript",cmake:"CMake",csp:"Content-Security-Policy","css-extras":"CSS Extras",django:"Django/Jinja2",jinja2:"Django/Jinja2","dns-zone-file":"DNS zone file","dns-zone":"DNS zone file",dockerfile:"Docker",ebnf:"Extended Backus–Naur form",ejs:"EJS",erb:"ERB",fsharp:"F#",gcode:"G-code",gdscript:"GDScript",gedcom:"GEDCOM",glsl:"GLSL",gml:"GameMaker Language",gamemakerlanguage:"GameMaker Language",graphql:"GraphQL",hs:"Haskell",hcl:"HCL",http:"HTTP",hpkp:"HTTP Public-Key-Pins",hsts:"HTTP Strict-Transport-Security",ichigojam:"IchigoJam",inform7:"Inform 7",javadoc:"JavaDoc",javadoclike:"JavaDoc-like",javastacktrace:"Java stack trace",jq:"JQ",jsdoc:"JSDoc","js-extras":"JS Extras","js-templates":"JS Templates",json:"JSON",jsonp:"JSONP",json5:"JSON5",latex:"LaTeX",tex:"TeX",context:"ConTeXt",lilypond:"LilyPond",ly:"LilyPond",emacs:"Lisp",elisp:"Lisp","emacs-lisp":"Lisp",lolcode:"LOLCODE",md:"Markdown","markup-templating":"Markup templating",matlab:"MATLAB",mel:"MEL",n1ql:"N1QL",n4js:"N4JS",n4jsd:"N4JS","nand2tetris-hdl":"Nand To Tetris HDL",nasm:"NASM",nginx:"nginx",nsis:"NSIS",objectivec:"Objective-C",ocaml:"OCaml",opencl:"OpenCL",parigp:"PARI/GP",objectpascal:"Object Pascal",pcaxis:"PC-Axis",px:"PC-Axis",php:"PHP",phpdoc:"PHPDoc","php-extras":"PHP Extras",plsql:"PL/SQL",powershell:"PowerShell",properties:".properties",protobuf:"Protocol Buffers",py:"Python",q:"Q (kdb+ database)",jsx:"React JSX",tsx:"React TSX",renpy:"Ren'py",rest:"reST (reStructuredText)",rb:"Ruby",sas:"SAS",sass:"Sass (Sass)",scss:"Sass (Scss)","shell-session":"Shell session",soy:"Soy (Closure Template)","splunk-spl":"Splunk SPL",sql:"SQL",tap:"TAP",toml:"TOML",tt2:"Template Toolkit 2",trig:"TriG",ts:"TypeScript","t4-cs":"T4 Text Templates (C#)",t4:"T4 Text Templates (C#)","t4-vb":"T4 Text Templates (VB)","t4-templating":"T4 templating",vbnet:"VB.Net",vhdl:"VHDL",vim:"vim","visual-basic":"Visual Basic",vb:"Visual Basic",wasm:"WebAssembly",wiki:"Wiki markup",xeoracube:"XeoraCube",xojo:"Xojo (REALbasic)",xquery:"XQuery",yaml:"YAML",yml:"YAML"};Prism.plugins.toolbar.registerButton("show-language",function(e){var a=e.element.parentNode;if(a&&/pre/i.test(a.nodeName)){var s,t=a.getAttribute("data-language")||i[e.language]||((s=e.language)?(s.substring(0,1).toUpperCase()+s.substring(1)).replace(/s(?=cript)/,"S"):s);if(t){var o=document.createElement("span");return o.textContent=t,o}}})}else console.warn("Show Languages plugin loaded before Toolbar plugin.")}(); \ No newline at end of file diff --git a/tests/languages/gdscript/class-name_feature.test b/tests/languages/gdscript/class-name_feature.test new file mode 100644 index 0000000000..02001c2641 --- /dev/null +++ b/tests/languages/gdscript/class-name_feature.test @@ -0,0 +1,79 @@ +class_name Foo +extends Bar + +class InnerClass: + +export(int) var baz +export(int, 0) var i + +return foo as Node + +const FOO: int = 9 +var bar: bool = true + +func add(reference: Item, amount: int) -> Item: + +---------------------------------------------------- + +[ + ["keyword", "class_name"], + ["class-name", "Foo"], + ["keyword", "extends"], + ["class-name", "Bar"], + + ["keyword", "class"], + ["class-name", "InnerClass"], + ["punctuation", ":"], + + ["keyword", "export"], + ["punctuation", "("], + ["class-name", "int"], + ["punctuation", ")"], + ["keyword", "var"], + " baz\n", + ["keyword", "export"], + ["punctuation", "("], + ["class-name", "int"], + ["punctuation", ","], + ["number", "0"], + ["punctuation", ")"], + ["keyword", "var"], + " i\n\n", + + ["keyword", "return"], + " foo ", + ["keyword", "as"], + ["class-name", "Node"], + + ["keyword", "const"], + ["constant", "FOO"], + ["punctuation", ":"], + ["class-name", "int"], + ["operator", "="], + ["number", "9"], + ["keyword", "var"], + " bar", + ["punctuation", ":"], + ["class-name", "bool"], + ["operator", "="], + ["boolean", "true"], + + ["keyword", "func"], + ["function", "add"], + ["punctuation", "("], + "reference", + ["punctuation", ":"], + ["class-name", "Item"], + ["punctuation", ","], + " amount", + ["punctuation", ":"], + ["class-name", "int"], + ["punctuation", ")"], + ["operator", "->"], + ["class-name", "Item"], + ["punctuation", ":"] +] + +---------------------------------------------------- + +Checks for class names. diff --git a/tests/languages/gdscript/keyword_feature.test b/tests/languages/gdscript/keyword_feature.test new file mode 100644 index 0000000000..bd4824b4fc --- /dev/null +++ b/tests/languages/gdscript/keyword_feature.test @@ -0,0 +1,91 @@ +and +as +assert +break +breakpoint +class +class_name +const +continue +elif +else +enum +export +extends +for +func +if +in +is +master +mastersync +match +not +null +onready +or +pass +preload +puppet +puppetsync +remote +remotesync +return +self +setget +signal +static +tool +var +while +yield + +---------------------------------------------------- + +[ + ["keyword", "and"], + ["keyword", "as"], + ["keyword", "assert"], + ["keyword", "break"], + ["keyword", "breakpoint"], + ["keyword", "class"], + ["keyword", "class_name"], + ["keyword", "const"], + ["keyword", "continue"], + ["keyword", "elif"], + ["keyword", "else"], + ["keyword", "enum"], + ["keyword", "export"], + ["keyword", "extends"], + ["keyword", "for"], + ["keyword", "func"], + ["keyword", "if"], + ["keyword", "in"], + ["keyword", "is"], + ["keyword", "master"], + ["keyword", "mastersync"], + ["keyword", "match"], + ["keyword", "not"], + ["keyword", "null"], + ["keyword", "onready"], + ["keyword", "or"], + ["keyword", "pass"], + ["keyword", "preload"], + ["keyword", "puppet"], + ["keyword", "puppetsync"], + ["keyword", "remote"], + ["keyword", "remotesync"], + ["keyword", "return"], + ["keyword", "self"], + ["keyword", "setget"], + ["keyword", "signal"], + ["keyword", "static"], + ["keyword", "tool"], + ["keyword", "var"], + ["keyword", "while"], + ["keyword", "yield"] +] + +---------------------------------------------------- + +Checks for keywords. diff --git a/tests/languages/gdscript/number_feature.test b/tests/languages/gdscript/number_feature.test new file mode 100644 index 0000000000..00ad250b01 --- /dev/null +++ b/tests/languages/gdscript/number_feature.test @@ -0,0 +1,34 @@ +123 +-123 +123.456 +.5 +1.2e-34 + +0xBadFace +0b01010101 + +1_000_000_000_000 +0xBAD_FACE +0b_0010_0010_0100_0100 + +---------------------------------------------------- + +[ + ["number", "123"], + ["operator", "-"], + ["number", "123"], + ["number", "123.456"], + ["number", ".5"], + ["number", "1.2e-34"], + + ["number", "0xBadFace"], + ["number", "0b01010101"], + + ["number", "1_000_000_000_000"], + ["number", "0xBAD_FACE"], + ["number", "0b_0010_0010_0100_0100"] +] + +---------------------------------------------------- + +Checks for numbers. diff --git a/tests/languages/gdscript/operator_feature.test b/tests/languages/gdscript/operator_feature.test new file mode 100644 index 0000000000..29f34aadee --- /dev/null +++ b/tests/languages/gdscript/operator_feature.test @@ -0,0 +1,46 @@ ++ - * / % +& | ~ ^ >> << +&& || ! +> < = == != >= <= +:= +-> ++= -= *= /= %= &= |= + +---------------------------------------------------- + +[ + ["operator", "+"], + ["operator", "-"], + ["operator", "*"], + ["operator", "/"], + ["operator", "%"], + ["operator", "&"], + ["operator", "|"], + ["operator", "~"], + ["operator", "^"], + ["operator", ">>"], + ["operator", "<<"], + ["operator", "&&"], + ["operator", "||"], + ["operator", "!"], + ["operator", ">"], + ["operator", "<"], + ["operator", "="], + ["operator", "=="], + ["operator", "!="], + ["operator", ">="], + ["operator", "<="], + ["operator", ":="], + ["operator", "->"], + ["operator", "+="], + ["operator", "-="], + ["operator", "*="], + ["operator", "/="], + ["operator", "%="], + ["operator", "&="], + ["operator", "|="] +] + +---------------------------------------------------- + +Checks for operators. diff --git a/tests/languages/gdscript/punctuation_feature.test b/tests/languages/gdscript/punctuation_feature.test new file mode 100644 index 0000000000..a389e1f8ea --- /dev/null +++ b/tests/languages/gdscript/punctuation_feature.test @@ -0,0 +1,20 @@ +. : , ; [] () {} + +---------------------------------------------------- + +[ + ["punctuation", "."], + ["punctuation", ":"], + ["punctuation", ","], + ["punctuation", ";"], + ["punctuation", "["], + ["punctuation", "]"], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", "{"], + ["punctuation", "}"] +] + +---------------------------------------------------- + +Checks for punctuation. diff --git a/tests/languages/gdscript/string_feature.test b/tests/languages/gdscript/string_feature.test new file mode 100644 index 0000000000..ac938df0d3 --- /dev/null +++ b/tests/languages/gdscript/string_feature.test @@ -0,0 +1,29 @@ +"foo" +'bar' +"\"'foo'\"" +'"\'bar\'"' + +""" +"baz" +""" + +@"foo" +@'bar' +@"""baz""" + +---------------------------------------------------- + +[ + ["string", "\"foo\""], + ["string", "'bar'"], + ["string", "\"\\\"'foo'\\\"\""], + ["string", "'\"\\'bar\\'\"'"], + ["string", "\"\"\"\n\"baz\"\n\"\"\""], + ["string", "@\"foo\""], + ["string", "@'bar'"], + ["string", "@\"\"\"baz\"\"\""] +] + +---------------------------------------------------- + +Checks for strings. From ebe363f4267cab2ac8c26f1b0920a24fc99267cf Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Sat, 17 Aug 2019 14:31:41 +0200 Subject: [PATCH 0337/1100] CSS Extras & PHP: Fixed too greedy number token (#2009) This fixes the too greedy number tokenization of CSS Extras which cause the placeholders of PHP (via markup templating) to be partly tokenized. The CSS extras number pattern was adjusted to solve the issue. --- components/prism-css-extras.js | 6 +- components/prism-css-extras.min.js | 2 +- .../css!+css-extras/number_feature.test | 55 ++++++++++++++++++- .../languages/php!+css-extras/issue2008.test | 44 +++++++++++++++ 4 files changed, 103 insertions(+), 4 deletions(-) create mode 100644 tests/languages/php!+css-extras/issue2008.test diff --git a/components/prism-css-extras.js b/components/prism-css-extras.js index e0c7ef297d..85d280cb3d 100644 --- a/components/prism-css-extras.js +++ b/components/prism-css-extras.js @@ -72,5 +72,9 @@ Prism.languages.insertBefore('css', 'function', { pattern: /(\d)(?:%|[a-z]+)/, lookbehind: true }, - 'number': /-?[\d.]+/ + 'number': { + // 123 -123 .123 -.123 12.3 -12.3 + pattern: /(^|[^\w.-])-?\d*\.?\d+/, + lookbehind: true + } }); diff --git a/components/prism-css-extras.min.js b/components/prism-css-extras.min.js index 0576f5d6f0..079e931f37 100644 --- a/components/prism-css-extras.min.js +++ b/components/prism-css-extras.min.js @@ -1 +1 @@ -Prism.languages.css.selector={pattern:Prism.languages.css.selector,inside:{"pseudo-element":/:(?:after|before|first-letter|first-line|selection)|::[-\w]+/,"pseudo-class":/:[-\w]+/,class:/\.[-:.\w]+/,id:/#[-:.\w]+/,attribute:{pattern:/\[(?:[^[\]"']|("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1)*\]/,greedy:!0,inside:{punctuation:/^\[|\]$/,"case-sensitivity":{pattern:/(\s)[si]$/i,lookbehind:!0,alias:"keyword"},namespace:{pattern:/^(\s*)[-*\w\xA0-\uFFFF]*\|(?!=)/,lookbehind:!0,inside:{punctuation:/\|$/}},attribute:{pattern:/^(\s*)[-\w\xA0-\uFFFF]+/,lookbehind:!0},value:[/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,{pattern:/(=\s*)[-\w\xA0-\uFFFF]+(?=\s*$)/,lookbehind:!0}],operator:/[|~*^$]?=/}},"n-th":[{pattern:/(\(\s*)[+-]?\d*[\dn](?:\s*[+-]\s*\d+)?(?=\s*\))/,lookbehind:!0,inside:{number:/[\dn]+/,operator:/[+-]/}},{pattern:/(\(\s*)(?:even|odd)(?=\s*\))/i,lookbehind:!0}],punctuation:/[()]/}},Prism.languages.insertBefore("css","property",{variable:{pattern:/(^|[^-\w\xA0-\uFFFF])--[-_a-z\xA0-\uFFFF][-\w\xA0-\uFFFF]*/i,lookbehind:!0}}),Prism.languages.insertBefore("css","function",{operator:{pattern:/(\s)[+\-*\/](?=\s)/,lookbehind:!0},hexcode:/#[\da-f]{3,8}/i,entity:/\\[\da-f]{1,8}/i,unit:{pattern:/(\d)(?:%|[a-z]+)/,lookbehind:!0},number:/-?[\d.]+/}); \ No newline at end of file +Prism.languages.css.selector={pattern:Prism.languages.css.selector,inside:{"pseudo-element":/:(?:after|before|first-letter|first-line|selection)|::[-\w]+/,"pseudo-class":/:[-\w]+/,class:/\.[-:.\w]+/,id:/#[-:.\w]+/,attribute:{pattern:/\[(?:[^[\]"']|("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1)*\]/,greedy:!0,inside:{punctuation:/^\[|\]$/,"case-sensitivity":{pattern:/(\s)[si]$/i,lookbehind:!0,alias:"keyword"},namespace:{pattern:/^(\s*)[-*\w\xA0-\uFFFF]*\|(?!=)/,lookbehind:!0,inside:{punctuation:/\|$/}},attribute:{pattern:/^(\s*)[-\w\xA0-\uFFFF]+/,lookbehind:!0},value:[/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,{pattern:/(=\s*)[-\w\xA0-\uFFFF]+(?=\s*$)/,lookbehind:!0}],operator:/[|~*^$]?=/}},"n-th":[{pattern:/(\(\s*)[+-]?\d*[\dn](?:\s*[+-]\s*\d+)?(?=\s*\))/,lookbehind:!0,inside:{number:/[\dn]+/,operator:/[+-]/}},{pattern:/(\(\s*)(?:even|odd)(?=\s*\))/i,lookbehind:!0}],punctuation:/[()]/}},Prism.languages.insertBefore("css","property",{variable:{pattern:/(^|[^-\w\xA0-\uFFFF])--[-_a-z\xA0-\uFFFF][-\w\xA0-\uFFFF]*/i,lookbehind:!0}}),Prism.languages.insertBefore("css","function",{operator:{pattern:/(\s)[+\-*\/](?=\s)/,lookbehind:!0},hexcode:/#[\da-f]{3,8}/i,entity:/\\[\da-f]{1,8}/i,unit:{pattern:/(\d)(?:%|[a-z]+)/,lookbehind:!0},number:{pattern:/(^|[^\w.-])-?\d*\.?\d+/,lookbehind:!0}}); \ No newline at end of file diff --git a/tests/languages/css!+css-extras/number_feature.test b/tests/languages/css!+css-extras/number_feature.test index ef58e62036..1ac34b99ca 100644 --- a/tests/languages/css!+css-extras/number_feature.test +++ b/tests/languages/css!+css-extras/number_feature.test @@ -1,7 +1,16 @@ 42 3.14159 -42 --3.14 +-3.14159 +.5 +-.5 + +/* complex example */ +foo { + foo: 0 1em 2ch; + bar:-0px 3px; + baz:calc(100% - 5px - -4em); +} ---------------------------------------------------- @@ -9,7 +18,49 @@ ["number", "42"], ["number", "3.14159"], ["number", "-42"], - ["number", "-3.14"] + ["number", "-3.14159"], + ["number", ".5"], + ["number", "-.5"], + + ["comment", "/* complex example */"], + ["selector", [ + "foo" + ]], + ["punctuation", "{"], + + ["property", "foo"], + ["punctuation", ":"], + ["number", "0"], + ["number", "1"], + ["unit", "em"], + ["number", "2"], + ["unit", "ch"], + ["punctuation", ";"], + + ["property", "bar"], + ["punctuation", ":"], + ["number", "-0"], + ["unit", "px"], + ["number", "3"], + ["unit", "px"], + ["punctuation", ";"], + + ["property", "baz"], + ["punctuation", ":"], + ["function", "calc"], + ["punctuation", "("], + ["number", "100"], + ["unit", "%"], + ["operator", "-"], + ["number", "5"], + ["unit", "px"], + ["operator", "-"], + ["number", "-4"], + ["unit", "em"], + ["punctuation", ")"], + ["punctuation", ";"], + + ["punctuation", "}"] ] ---------------------------------------------------- diff --git a/tests/languages/php!+css-extras/issue2008.test b/tests/languages/php!+css-extras/issue2008.test new file mode 100644 index 0000000000..4710e4ae46 --- /dev/null +++ b/tests/languages/php!+css-extras/issue2008.test @@ -0,0 +1,44 @@ + + +---------------------------------------------------- + +[ + ["tag", [ + ["tag", [ + ["punctuation", "<"], + "img" + ]], + ["style-attr", [ + ["attr-name", [ + ["attr-name", [ + "style" + ]] + ]], + ["punctuation", "=\""], + ["attr-value", [ + ["property", "width"], + ["punctuation", ":"], + ["php", [ + ["delimiter", ""] + ]], + "%" + ]], + ["punctuation", "\""] + ]], + ["punctuation", "/>"] + ]] +] + +---------------------------------------------------- + +Checks for #2008 where a part of markup templating's placeholder was tokenized as `number` by CSS Extras. From 9f7225864143369ef7f092f657d148318a7a151c Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Sat, 17 Aug 2019 14:36:50 +0200 Subject: [PATCH 0338/1100] Added support for Firestore security rules (#2010) This adds support for Google Cloud Firestore security rules. --- components.js | 2 +- components.json | 5 + components/prism-firestore-security-rules.js | 35 +++++++ .../prism-firestore-security-rules.min.js | 1 + examples/prism-firestore-security-rules.html | 37 +++++++ plugins/autoloader/prism-autoloader.js | 1 + plugins/autoloader/prism-autoloader.min.js | 2 +- plugins/show-language/prism-show-language.js | 1 + .../show-language/prism-show-language.min.js | 2 +- tests/languages/erlang/atom_feature.test | 4 +- .../comment_feature.test | 11 +++ .../keyword_feature.test | 25 +++++ .../method_feature.test | 38 +++++++ .../number_feature.test | 13 +++ .../operator_feature.test | 31 ++++++ .../path_feature.test | 99 +++++++++++++++++++ .../punctuation_feature.test | 29 ++++++ .../string_feature.test | 17 ++++ 18 files changed, 348 insertions(+), 5 deletions(-) create mode 100644 components/prism-firestore-security-rules.js create mode 100644 components/prism-firestore-security-rules.min.js create mode 100644 examples/prism-firestore-security-rules.html create mode 100644 tests/languages/firestore-security-rules/comment_feature.test create mode 100644 tests/languages/firestore-security-rules/keyword_feature.test create mode 100644 tests/languages/firestore-security-rules/method_feature.test create mode 100644 tests/languages/firestore-security-rules/number_feature.test create mode 100644 tests/languages/firestore-security-rules/operator_feature.test create mode 100644 tests/languages/firestore-security-rules/path_feature.test create mode 100644 tests/languages/firestore-security-rules/punctuation_feature.test create mode 100644 tests/languages/firestore-security-rules/string_feature.test diff --git a/components.js b/components.js index 1a0a15648a..05cdf006c6 100644 --- a/components.js +++ b/components.js @@ -1,2 +1,2 @@ -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default","peerDependencies":"markup"},"clike":{"title":"C-like","option":"default","overrideExampleHeader":true},"javascript":{"title":"JavaScript","require":"clike","peerDependencies":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"Augmented Backus–Naur form","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","peerDependencies":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"Backus–Naur form","alias":"rbnf","aliasTitles":{"rbnf":"Routing Backus–Naur form"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"Extended Backus–Naur form","owner":"RunDevelopment"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment"},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","peerDependencies":["css","coffeescript","erb","javascript","less","markdown","ruby","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"http":{"title":"HTTP","peerDependencies":["javascript","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"peerDependencies":["scala"],"owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","peerDependencies":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike"],"peerDependencies":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","peerDependencies":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"js-templates":{"title":"JS Templates","require":"javascript","peerDependencies":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"json":{"title":"JSON","owner":"CupOfTea696"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"less":{"title":"Less","require":"css","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","peerDependencies":["jsdoc"],"alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"nasm":{"title":"NASM","owner":"rbmj"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"cpp","peerDependencies":["c","cpp"],"overrideExampleHeader":true,"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"peerDependencies":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","peerDependencies":["c","cpp","fortran"],"owner":"Golmote"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"peerDependencies":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","peerDependencies":["actionscript","coffeescript","flow","javascript","typescript","vala"],"owner":"RunDevelopment"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","require":"sql","owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","peerDependencies":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"turtle":{"title":"Turtle","alias":["trig"],"aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","peerDependencies":"js-templates","alias":"ts","owner":"vkbansal"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","visual-basic"],"owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":"Line Highlight","line-numbers":{"title":"Line Numbers","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","after":["autolinker","data-uri-highlight"]},"autolinker":"Autolinker","wpd":"WebPlatform Docs","custom-class":{"title":"Custom Class","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","noCSS":true},"show-language":{"title":"Show Language","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","owner":"Golmote","noCSS":true},"previewers":{"title":"Previewers","owner":"Golmote"},"autoloader":{"title":"Autoloader","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","owner":"Golmote","after":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","owner":"chriswells0"},"unescaped-markup":"Unescaped Markup","normalize-whitespace":{"title":"Normalize Whitespace","owner":"zeitgeist87","after":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"diff-highlight":{"title":"Diff Highlight","owner":"RunDevelopment","require":"diff"}}}; +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default","peerDependencies":"markup"},"clike":{"title":"C-like","option":"default","overrideExampleHeader":true},"javascript":{"title":"JavaScript","require":"clike","peerDependencies":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"Augmented Backus–Naur form","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","peerDependencies":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"Backus–Naur form","alias":"rbnf","aliasTitles":{"rbnf":"Routing Backus–Naur form"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"Extended Backus–Naur form","owner":"RunDevelopment"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment"},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","peerDependencies":["css","coffeescript","erb","javascript","less","markdown","ruby","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"http":{"title":"HTTP","peerDependencies":["javascript","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"peerDependencies":["scala"],"owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","peerDependencies":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike"],"peerDependencies":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","peerDependencies":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"js-templates":{"title":"JS Templates","require":"javascript","peerDependencies":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"json":{"title":"JSON","owner":"CupOfTea696"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"less":{"title":"Less","require":"css","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","peerDependencies":["jsdoc"],"alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"nasm":{"title":"NASM","owner":"rbmj"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"cpp","peerDependencies":["c","cpp"],"overrideExampleHeader":true,"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"peerDependencies":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","peerDependencies":["c","cpp","fortran"],"owner":"Golmote"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"peerDependencies":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","peerDependencies":["actionscript","coffeescript","flow","javascript","typescript","vala"],"owner":"RunDevelopment"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","require":"sql","owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","peerDependencies":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"turtle":{"title":"Turtle","alias":["trig"],"aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","peerDependencies":"js-templates","alias":"ts","owner":"vkbansal"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","visual-basic"],"owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":"Line Highlight","line-numbers":{"title":"Line Numbers","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","after":["autolinker","data-uri-highlight"]},"autolinker":"Autolinker","wpd":"WebPlatform Docs","custom-class":{"title":"Custom Class","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","noCSS":true},"show-language":{"title":"Show Language","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","owner":"Golmote","noCSS":true},"previewers":{"title":"Previewers","owner":"Golmote"},"autoloader":{"title":"Autoloader","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","owner":"Golmote","after":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","owner":"chriswells0"},"unescaped-markup":"Unescaped Markup","normalize-whitespace":{"title":"Normalize Whitespace","owner":"zeitgeist87","after":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"diff-highlight":{"title":"Diff Highlight","owner":"RunDevelopment","require":"diff"}}}; if (typeof module !== 'undefined' && module.exports) { module.exports = components; } \ No newline at end of file diff --git a/components.json b/components.json index 2342a41d89..5d3ec55902 100644 --- a/components.json +++ b/components.json @@ -285,6 +285,11 @@ "require": "clike", "owner": "simonreynolds7" }, + "firestore-security-rules": { + "title": "Firestore security rules", + "require": "clike", + "owner": "RunDevelopment" + }, "flow": { "title": "Flow", "require": "javascript", diff --git a/components/prism-firestore-security-rules.js b/components/prism-firestore-security-rules.js new file mode 100644 index 0000000000..c08d926a6e --- /dev/null +++ b/components/prism-firestore-security-rules.js @@ -0,0 +1,35 @@ +Prism.languages['firestore-security-rules'] = Prism.languages.extend('clike', { + 'comment': /\/\/.*/, + 'keyword': /\b(?:allow|function|if|match|null|return|rules_version|service)\b/, + 'operator': /&&|\|\||[<>!=]=?|[-+*/%=]|\b(?:in|is)\b/, +}); + +delete Prism.languages['firestore-security-rules']['class-name']; + +Prism.languages.insertBefore('firestore-security-rules', 'keyword', { + 'path': { + pattern: /(^|[\s(),])(?:\/(?:[\w\xA0-\uFFFF]+|\{[\w\xA0-\uFFFF]+(?:=\*\*)?\}|\$\([\w\xA0-\uFFFF.]+\)))+/, + lookbehind: true, + greedy: true, + inside: { + 'variable': { + pattern: /\{[\w\xA0-\uFFFF]+(?:=\*\*)?\}|\$\([\w\xA0-\uFFFF.]+\)/, + inside: { + 'operator': /=/, + 'keyword': /\*\*/, + 'punctuation': /[.$(){}]/ + } + }, + 'punctuation': /[/]/ + } + }, + 'method': { + // to make the pattern shorter, the actual method names are omitted + pattern: /(\ballow\s+)[a-z]+(?:\s*,\s*[a-z]+)*(?=\s*[:;])/, + lookbehind: true, + alias: 'builtin', + inside: { + 'punctuation': /,/ + } + }, +}); diff --git a/components/prism-firestore-security-rules.min.js b/components/prism-firestore-security-rules.min.js new file mode 100644 index 0000000000..e9171f42ae --- /dev/null +++ b/components/prism-firestore-security-rules.min.js @@ -0,0 +1 @@ +Prism.languages["firestore-security-rules"]=Prism.languages.extend("clike",{comment:/\/\/.*/,keyword:/\b(?:allow|function|if|match|null|return|rules_version|service)\b/,operator:/&&|\|\||[<>!=]=?|[-+*/%=]|\b(?:in|is)\b/}),delete Prism.languages["firestore-security-rules"]["class-name"],Prism.languages.insertBefore("firestore-security-rules","keyword",{path:{pattern:/(^|[\s(),])(?:\/(?:[\w\xA0-\uFFFF]+|\{[\w\xA0-\uFFFF]+(?:=\*\*)?\}|\$\([\w\xA0-\uFFFF.]+\)))+/,lookbehind:!0,greedy:!0,inside:{variable:{pattern:/\{[\w\xA0-\uFFFF]+(?:=\*\*)?\}|\$\([\w\xA0-\uFFFF.]+\)/,inside:{operator:/=/,keyword:/\*\*/,punctuation:/[.$(){}]/}},punctuation:/[/]/}},method:{pattern:/(\ballow\s+)[a-z]+(?:\s*,\s*[a-z]+)*(?=\s*[:;])/,lookbehind:!0,alias:"builtin",inside:{punctuation:/,/}}}); \ No newline at end of file diff --git a/examples/prism-firestore-security-rules.html b/examples/prism-firestore-security-rules.html new file mode 100644 index 0000000000..08b0cc486c --- /dev/null +++ b/examples/prism-firestore-security-rules.html @@ -0,0 +1,37 @@ +

    Full example

    +
    rules_version = '2';
    +service cloud.firestore {
    +
    +  match /databases/{database}/documents {
    +
    +    // Returns `true` if the requested post is 'published'
    +    // or the user authored the post
    +    function authorOrPublished() {
    +      return resource.data.published == true || request.auth.uid == resource.data.author;
    +    }
    +
    +    match /{path=**}/posts/{post} {
    +
    +      // Anyone can query published posts
    +      // Authors can query their unpublished posts
    +      allow list: if authorOrPublished();
    +
    +      // Anyone can retrieve a published post
    +      // Authors can retrieve an unpublished post
    +      allow get: if authorOrPublished();
    +    }
    +
    +    match /forums/{forumid}/posts/{postid} {
    +      // Only a post's author can write to a post
    +      allow write: if request.auth.uid == resource.data.author;
    +    }
    +  }
    +
    +  match /databases/{database}/reviews {
    +    // Assign roles to all users and refine access based on user roles
    +    match /some_collection/{document} {
    +      allow read: if get(/databases/$(database)/reviews/users/$(request.auth.uid)).data.role == "Reader"
    +      allow write: if get(/databases/$(database)/reviews/users/$(request.auth.uid)).data.role == "Writer"
    +    }
    +  }
    +}
    diff --git a/plugins/autoloader/prism-autoloader.js b/plugins/autoloader/prism-autoloader.js index 5f43ff5d2e..07ee30ce8b 100644 --- a/plugins/autoloader/prism-autoloader.js +++ b/plugins/autoloader/prism-autoloader.js @@ -31,6 +31,7 @@ "markup-templating" ], "fsharp": "clike", + "firestore-security-rules": "clike", "flow": "javascript", "glsl": "clike", "gml": "clike", diff --git a/plugins/autoloader/prism-autoloader.min.js b/plugins/autoloader/prism-autoloader.min.js index af20027810..cce31396d8 100644 --- a/plugins/autoloader/prism-autoloader.min.js +++ b/plugins/autoloader/prism-autoloader.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof self&&self.Prism&&self.document&&document.createElement){var r={javascript:"clike",actionscript:"javascript",arduino:"cpp",aspnet:["markup","csharp"],bison:"c",c:"clike",csharp:"clike",cpp:"c",coffeescript:"javascript",crystal:"ruby","css-extras":"css",d:"clike",dart:"clike",django:"markup-templating",ejs:["javascript","markup-templating"],erb:["ruby","markup-templating"],fsharp:"clike",flow:"javascript",glsl:"clike",gml:"clike",go:"clike",groovy:"clike",haml:"ruby",handlebars:"markup-templating",haxe:"clike",java:"clike",javadoc:["markup","java","javadoclike"],jolie:"clike",jsdoc:["javascript","javadoclike"],"js-extras":"javascript","js-templates":"javascript",jsonp:"json",json5:"json",kotlin:"clike",less:"css",lilypond:"scheme",markdown:"markup","markup-templating":"markup",n4js:"javascript",nginx:"clike",objectivec:"c",opencl:"cpp",parser:"markup",php:["clike","markup-templating"],phpdoc:["php","javadoclike"],"php-extras":"php",plsql:"sql",processing:"clike",protobuf:"clike",pug:["markup","javascript"],qore:"clike",jsx:["markup","javascript"],tsx:["jsx","typescript"],reason:"clike",ruby:"clike",sas:"sql",sass:"css",scss:"css",scala:"java","shell-session":"bash",smarty:"markup-templating",soy:"markup-templating",swift:"clike",tap:"yaml",textile:"markup",tt2:["clike","markup-templating"],twig:"markup",typescript:"javascript","t4-cs":["t4-templating","csharp"],"t4-vb":["t4-templating","visual-basic"],vala:"clike",vbnet:"basic",velocity:"markup",wiki:"markup",xeora:"markup",xquery:"markup"},l={html:"markup",xml:"markup",svg:"markup",mathml:"markup",js:"javascript",adoc:"asciidoc",shell:"bash",rbnf:"bnf",cs:"csharp",dotnet:"csharp",coffee:"coffeescript",jinja2:"django","dns-zone":"dns-zone-file",dockerfile:"docker",gamemakerlanguage:"gml",hs:"haskell",tex:"latex",context:"latex",ly:"lilypond",emacs:"lisp",elisp:"lisp","emacs-lisp":"lisp",md:"markdown",n4jsd:"n4js",objectpascal:"pascal",px:"pcaxis",py:"python",rb:"ruby",trig:"turtle",ts:"typescript",t4:"t4-cs",vb:"visual-basic",xeoracube:"xeora",yml:"yaml"},n={},e=document.getElementsByTagName("script"),a=e[e.length-1],t="components/",s=/\bplugins\/autoloader\/prism-autoloader\.(?:min\.)js$/i,i=/[\w-]+\.(?:min\.)js$/i;if(a.hasAttribute("data-autoloader-path"))t=a.getAttribute("data-autoloader-path").trim().replace(/\/?$/,"/");else{var c=a.src;s.test(c)?t=c.replace(s,"components/"):i.test(c)&&(t=c.replace(i,"components/"))}var p=Prism.plugins.autoloader={languages_path:t,use_minified:!0,loadLanguages:o};Prism.hooks.add("complete",function(e){e.element&&e.language&&!e.grammar&&"none"!==e.language&&function(e,a){e in l&&(e=l[e]);var t=a.getAttribute("data-dependencies"),s=a.parentElement;!t&&s&&"pre"===s.tagName.toLowerCase()&&(t=s.getAttribute("data-dependencies")),o(t=t?t.split(/\s*,\s*/g):[],function(){m(e,function(){Prism.highlightElement(a)})})}(e.language,e.element)})}function o(e,a,t){"string"==typeof e&&(e=[e]);var s=e.length,i=0,c=!1;function r(){c||++i===s&&a&&a(e)}0!==s?e.forEach(function(e){m(e,r,function(){c||(c=!0,t&&t(e))})}):a&&setTimeout(a,0)}function m(a,t,s){var i=0<=a.indexOf("!");a=a.replace("!",""),a=l[a]||a;var e=function(){var e=n[a];if(e||(e=n[a]={callbacks:[]}),e.callbacks.push({success:t,error:s}),!i&&Prism.languages[a])u(a,"success");else if(!i&&e.error)u(a,"error");else if(i||!e.loading){e.loading=!0,function(e,a,t){var s=document.createElement("script");s.src=e,s.async=!0,s.onload=function(){document.body.removeChild(s),a&&a()},s.onerror=function(){document.body.removeChild(s),t&&t()},document.body.appendChild(s)}(function(e){return p.languages_path+"prism-"+e+(p.use_minified?".min":"")+".js"}(a),function(){e.loading=!1,u(a,"success")},function(){e.loading=!1,e.error=!0,u(a,"error")})}},c=r[a];c&&c.length?o(c,e,s):e()}function u(e,a){if(n[e]){for(var t=n[e].callbacks,s=0,i=t.length;s <= >= != == +! && || + +in is + +---------------------------------------------------- + +[ + ["operator", "+"], + ["operator", "-"], + ["operator", "*"], + ["operator", "/"], + ["operator", "%"], + ["operator", "<"], + ["operator", ">"], + ["operator", "<="], + ["operator", ">="], + ["operator", "!="], + ["operator", "=="], + ["operator", "!"], + ["operator", "&&"], + ["operator", "||"], + + ["operator", "in"], + ["operator", "is"] +] + +---------------------------------------------------- + +Checks for operators. diff --git a/tests/languages/firestore-security-rules/path_feature.test b/tests/languages/firestore-security-rules/path_feature.test new file mode 100644 index 0000000000..1ff01e6dc6 --- /dev/null +++ b/tests/languages/firestore-security-rules/path_feature.test @@ -0,0 +1,99 @@ +/databases/foo + +/foo/{wildcard} +/foo/{wildcard}/bar +/foo/{x}/{y}/{z}/bar + +/foo/$(x)/$(y)/bar/$(request.auth.uid) + +---------------------------------------------------- + +[ + ["path", [ + ["punctuation", "/"], + "databases", + ["punctuation", "/"], + "foo" + ]], + ["path", [ + ["punctuation", "/"], + "foo", + ["punctuation", "/"], + ["variable", [ + ["punctuation", "{"], + "wildcard", + ["punctuation", "}"] + ]] + ]], + ["path", [ + ["punctuation", "/"], + "foo", + ["punctuation", "/"], + ["variable", [ + ["punctuation", "{"], + "wildcard", + ["punctuation", "}"] + ]], + ["punctuation", "/"], + "bar" + ]], + ["path", [ + ["punctuation", "/"], + "foo", + ["punctuation", "/"], + ["variable", [ + ["punctuation", "{"], + "x", + ["punctuation", "}"] + ]], + ["punctuation", "/"], + ["variable", [ + ["punctuation", "{"], + "y", + ["punctuation", "}"] + ]], + ["punctuation", "/"], + ["variable", [ + ["punctuation", "{"], + "z", + ["punctuation", "}"] + ]], + ["punctuation", "/"], + "bar" + ]], + ["path", [ + ["punctuation", "/"], + "foo", + ["punctuation", "/"], + ["variable", [ + ["punctuation", "$"], + ["punctuation", "("], + "x", + ["punctuation", ")"] + ]], + ["punctuation", "/"], + ["variable", [ + ["punctuation", "$"], + ["punctuation", "("], + "y", + ["punctuation", ")"] + ]], + ["punctuation", "/"], + "bar", + ["punctuation", "/"], + ["variable", [ + ["punctuation", "$"], + ["punctuation", "("], + "request", + ["punctuation", "."], + "auth", + ["punctuation", "."], + "uid", + ["punctuation", ")"] + ]] + ]] +] + +---------------------------------------------------- + +Checks for paths. diff --git a/tests/languages/firestore-security-rules/punctuation_feature.test b/tests/languages/firestore-security-rules/punctuation_feature.test new file mode 100644 index 0000000000..8777b000b4 --- /dev/null +++ b/tests/languages/firestore-security-rules/punctuation_feature.test @@ -0,0 +1,29 @@ +. : , ; +[ ] ( ) { } + +[0:2] + +---------------------------------------------------- + +[ + ["punctuation", "."], + ["punctuation", ":"], + ["punctuation", ","], + ["punctuation", ";"], + ["punctuation", "["], + ["punctuation", "]"], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", "{"], + ["punctuation", "}"], + ["punctuation", "["], + + ["number", "0"], + ["punctuation", ":"], + ["number", "2"], + ["punctuation", "]"] +] + +---------------------------------------------------- + +Checks for punctuation. diff --git a/tests/languages/firestore-security-rules/string_feature.test b/tests/languages/firestore-security-rules/string_feature.test new file mode 100644 index 0000000000..b785685c3f --- /dev/null +++ b/tests/languages/firestore-security-rules/string_feature.test @@ -0,0 +1,17 @@ +'' +'foo' +"" +"foo" + +---------------------------------------------------- + +[ + ["string", "''"], + ["string", "'foo'"], + ["string", "\"\""], + ["string", "\"foo\""] +] + +---------------------------------------------------- + +Checks for strings. From 5b8a16d9671f640ee85be854acb552bf4f63d875 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Thu, 29 Aug 2019 16:15:05 +0200 Subject: [PATCH 0339/1100] Python: Fixed decorators (#2018) This adds a missing multiline flag to support more than one decorator. --- components/prism-python.js | 4 +-- components/prism-python.min.js | 2 +- tests/languages/python/decorator_feature.test | 35 +++++++++++++++++-- 3 files changed, 35 insertions(+), 6 deletions(-) diff --git a/components/prism-python.js b/components/prism-python.js index 143c15b41e..8619ed7a0a 100644 --- a/components/prism-python.js +++ b/components/prism-python.js @@ -44,7 +44,7 @@ Prism.languages.python = { lookbehind: true }, 'decorator': { - pattern: /(^\s*)@\w+(?:\.\w+)*/i, + pattern: /(^\s*)@\w+(?:\.\w+)*/im, lookbehind: true, alias: ['annotation', 'punctuation'], inside: { @@ -61,4 +61,4 @@ Prism.languages.python = { Prism.languages.python['string-interpolation'].inside['interpolation'].inside.rest = Prism.languages.python; -Prism.languages.py = Prism.languages.python; \ No newline at end of file +Prism.languages.py = Prism.languages.python; diff --git a/components/prism-python.min.js b/components/prism-python.min.js index d3e0e7483a..35336af28c 100644 --- a/components/prism-python.min.js +++ b/components/prism-python.min.js @@ -1 +1 @@ -Prism.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0},"string-interpolation":{pattern:/(?:f|rf|fr)(?:("""|''')[\s\S]+?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:{{)*){(?!{)(?:[^{}]|{(?!{)(?:[^{}]|{(?!{)(?:[^{}])+})+})+}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|rb|br)?("""|''')[\s\S]+?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|rb|br)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^\s*)@\w+(?:\.\w+)*/i,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:and|as|assert|async|await|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:True|False|None)\b/,number:/(?:\b(?=\d)|\B(?=\.))(?:0[bo])?(?:(?:\d|0x[\da-f])[\da-f]*\.?\d*|\.\d+)(?:e[+-]?\d+)?j?\b/i,operator:/[-+%=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},Prism.languages.python["string-interpolation"].inside.interpolation.inside.rest=Prism.languages.python,Prism.languages.py=Prism.languages.python; \ No newline at end of file +Prism.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0},"string-interpolation":{pattern:/(?:f|rf|fr)(?:("""|''')[\s\S]+?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:{{)*){(?!{)(?:[^{}]|{(?!{)(?:[^{}]|{(?!{)(?:[^{}])+})+})+}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|rb|br)?("""|''')[\s\S]+?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|rb|br)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^\s*)@\w+(?:\.\w+)*/im,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:and|as|assert|async|await|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:True|False|None)\b/,number:/(?:\b(?=\d)|\B(?=\.))(?:0[bo])?(?:(?:\d|0x[\da-f])[\da-f]*\.?\d*|\.\d+)(?:e[+-]?\d+)?j?\b/i,operator:/[-+%=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},Prism.languages.python["string-interpolation"].inside.interpolation.inside.rest=Prism.languages.python,Prism.languages.py=Prism.languages.python; \ No newline at end of file diff --git a/tests/languages/python/decorator_feature.test b/tests/languages/python/decorator_feature.test index c04d642837..4ea22c353c 100644 --- a/tests/languages/python/decorator_feature.test +++ b/tests/languages/python/decorator_feature.test @@ -1,6 +1,14 @@ @some.decorator(foobar) def foo(bar): - pass + pass + +@decorator +def foo(bar): + pass + +@decorator +def foo(bar): + pass ---------------------------------------------------- @@ -8,12 +16,33 @@ def foo(bar): ["decorator", [ "@some", ["punctuation", "."], - "decorator"] - ], + "decorator" + ]], ["punctuation", "("], "foobar", ["punctuation", ")"], + ["keyword", "def"], + ["function", "foo"], + ["punctuation", "("], + "bar", + ["punctuation", ")"], + ["punctuation", ":"], + ["keyword", "pass"], + ["decorator", [ + "@decorator" + ]], + ["keyword", "def"], + ["function", "foo"], + ["punctuation", "("], + "bar", + ["punctuation", ")"], + ["punctuation", ":"], + ["keyword", "pass"], + + ["decorator", [ + "@decorator" + ]], ["keyword", "def"], ["function", "foo"], ["punctuation", "("], From d03d19b440fd83272dd9e51e3a6de9472afe31e4 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Thu, 29 Aug 2019 16:22:03 +0200 Subject: [PATCH 0340/1100] Less: Fixed exponential backtracking (#2016) This fixes the exponential backtracking in 2 of Less' patterns. --- components/prism-less.js | 4 ++-- components/prism-less.min.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/components/prism-less.js b/components/prism-less.js index 4762062db8..0521d2c9b7 100644 --- a/components/prism-less.js +++ b/components/prism-less.js @@ -15,14 +15,14 @@ Prism.languages.less = Prism.languages.extend('css', { } ], 'atrule': { - pattern: /@[\w-]+?(?:\([^{}]+\)|[^(){};])*?(?=\s*\{)/i, + pattern: /@[\w-]+?(?:\((?:[^(){}]|\([^(){}]*\))*\)|[^(){};])*?(?=\s*\{)/, inside: { 'punctuation': /[:()]/ } }, // selectors and mixins are considered the same 'selector': { - pattern: /(?:@\{[\w-]+\}|[^{};\s@])(?:@\{[\w-]+\}|\([^{}]*\)|[^{};@])*?(?=\s*\{)/, + pattern: /(?:@\{[\w-]+\}|[^{};\s@])(?:@\{[\w-]+\}|\((?:[^(){}]|\([^(){}]*\))*\)|[^(){};@])*?(?=\s*\{)/, inside: { // mixin parameters 'variable': /@+[\w-]+/ diff --git a/components/prism-less.min.js b/components/prism-less.min.js index 9ecfedf7ae..5c3aa7d58d 100644 --- a/components/prism-less.min.js +++ b/components/prism-less.min.js @@ -1 +1 @@ -Prism.languages.less=Prism.languages.extend("css",{comment:[/\/\*[\s\S]*?\*\//,{pattern:/(^|[^\\])\/\/.*/,lookbehind:!0}],atrule:{pattern:/@[\w-]+?(?:\([^{}]+\)|[^(){};])*?(?=\s*\{)/i,inside:{punctuation:/[:()]/}},selector:{pattern:/(?:@\{[\w-]+\}|[^{};\s@])(?:@\{[\w-]+\}|\([^{}]*\)|[^{};@])*?(?=\s*\{)/,inside:{variable:/@+[\w-]+/}},property:/(?:@\{[\w-]+\}|[\w-])+(?:\+_?)?(?=\s*:)/i,operator:/[+\-*\/]/}),Prism.languages.insertBefore("less","property",{variable:[{pattern:/@[\w-]+\s*:/,inside:{punctuation:/:/}},/@@?[\w-]+/],"mixin-usage":{pattern:/([{;]\s*)[.#](?!\d)[\w-]+.*?(?=[(;])/,lookbehind:!0,alias:"function"}}); \ No newline at end of file +Prism.languages.less=Prism.languages.extend("css",{comment:[/\/\*[\s\S]*?\*\//,{pattern:/(^|[^\\])\/\/.*/,lookbehind:!0}],atrule:{pattern:/@[\w-]+?(?:\((?:[^(){}]|\([^(){}]*\))*\)|[^(){};])*?(?=\s*\{)/,inside:{punctuation:/[:()]/}},selector:{pattern:/(?:@\{[\w-]+\}|[^{};\s@])(?:@\{[\w-]+\}|\((?:[^(){}]|\([^(){}]*\))*\)|[^(){};@])*?(?=\s*\{)/,inside:{variable:/@+[\w-]+/}},property:/(?:@\{[\w-]+\}|[\w-])+(?:\+_?)?(?=\s*:)/i,operator:/[+\-*\/]/}),Prism.languages.insertBefore("less","property",{variable:[{pattern:/@[\w-]+\s*:/,inside:{punctuation:/:/}},/@@?[\w-]+/],"mixin-usage":{pattern:/([{;]\s*)[.#](?!\d)[\w-]+.*?(?=[(;])/,lookbehind:!0,alias:"function"}}); \ No newline at end of file From a7cf56b7a34128441e5fcc32faf8e83f8075185e Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Thu, 29 Aug 2019 16:25:02 +0200 Subject: [PATCH 0341/1100] Added suppprt for Zig (#2019) This adds support for the Zig language. https://ziglang.org/ --- components.js | 2 +- components.json | 4 + components/prism-zig.js | 97 ++++ components/prism-zig.min.js | 1 + examples/prism-zig.html | 46 ++ .../languages/zig/builtin-types_feature.test | 75 +++ tests/languages/zig/builtin_feature.test | 417 +++++++++++++++ tests/languages/zig/class-name_feature.test | 504 ++++++++++++++++++ tests/languages/zig/keyword_feature.test | 105 ++++ tests/languages/zig/label_feature.test | 75 +++ tests/languages/zig/number_feature.test | 22 + tests/languages/zig/operator_feature.test | 73 +++ tests/languages/zig/punctuation_feature.test | 21 + 13 files changed, 1441 insertions(+), 1 deletion(-) create mode 100644 components/prism-zig.js create mode 100644 components/prism-zig.min.js create mode 100644 examples/prism-zig.html create mode 100644 tests/languages/zig/builtin-types_feature.test create mode 100644 tests/languages/zig/builtin_feature.test create mode 100644 tests/languages/zig/class-name_feature.test create mode 100644 tests/languages/zig/keyword_feature.test create mode 100644 tests/languages/zig/label_feature.test create mode 100644 tests/languages/zig/number_feature.test create mode 100644 tests/languages/zig/operator_feature.test create mode 100644 tests/languages/zig/punctuation_feature.test diff --git a/components.js b/components.js index 05cdf006c6..64edbb207b 100644 --- a/components.js +++ b/components.js @@ -1,2 +1,2 @@ -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default","peerDependencies":"markup"},"clike":{"title":"C-like","option":"default","overrideExampleHeader":true},"javascript":{"title":"JavaScript","require":"clike","peerDependencies":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"Augmented Backus–Naur form","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","peerDependencies":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"Backus–Naur form","alias":"rbnf","aliasTitles":{"rbnf":"Routing Backus–Naur form"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"Extended Backus–Naur form","owner":"RunDevelopment"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment"},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","peerDependencies":["css","coffeescript","erb","javascript","less","markdown","ruby","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"http":{"title":"HTTP","peerDependencies":["javascript","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"peerDependencies":["scala"],"owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","peerDependencies":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike"],"peerDependencies":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","peerDependencies":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"js-templates":{"title":"JS Templates","require":"javascript","peerDependencies":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"json":{"title":"JSON","owner":"CupOfTea696"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"less":{"title":"Less","require":"css","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","peerDependencies":["jsdoc"],"alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"nasm":{"title":"NASM","owner":"rbmj"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"cpp","peerDependencies":["c","cpp"],"overrideExampleHeader":true,"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"peerDependencies":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","peerDependencies":["c","cpp","fortran"],"owner":"Golmote"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"peerDependencies":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","peerDependencies":["actionscript","coffeescript","flow","javascript","typescript","vala"],"owner":"RunDevelopment"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","require":"sql","owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","peerDependencies":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"turtle":{"title":"Turtle","alias":["trig"],"aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","peerDependencies":"js-templates","alias":"ts","owner":"vkbansal"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","visual-basic"],"owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":"Line Highlight","line-numbers":{"title":"Line Numbers","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","after":["autolinker","data-uri-highlight"]},"autolinker":"Autolinker","wpd":"WebPlatform Docs","custom-class":{"title":"Custom Class","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","noCSS":true},"show-language":{"title":"Show Language","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","owner":"Golmote","noCSS":true},"previewers":{"title":"Previewers","owner":"Golmote"},"autoloader":{"title":"Autoloader","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","owner":"Golmote","after":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","owner":"chriswells0"},"unescaped-markup":"Unescaped Markup","normalize-whitespace":{"title":"Normalize Whitespace","owner":"zeitgeist87","after":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"diff-highlight":{"title":"Diff Highlight","owner":"RunDevelopment","require":"diff"}}}; +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default","peerDependencies":"markup"},"clike":{"title":"C-like","option":"default","overrideExampleHeader":true},"javascript":{"title":"JavaScript","require":"clike","peerDependencies":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"Augmented Backus–Naur form","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","peerDependencies":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"Backus–Naur form","alias":"rbnf","aliasTitles":{"rbnf":"Routing Backus–Naur form"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"Extended Backus–Naur form","owner":"RunDevelopment"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment"},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","peerDependencies":["css","coffeescript","erb","javascript","less","markdown","ruby","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"http":{"title":"HTTP","peerDependencies":["javascript","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"peerDependencies":["scala"],"owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","peerDependencies":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike"],"peerDependencies":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","peerDependencies":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"js-templates":{"title":"JS Templates","require":"javascript","peerDependencies":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"json":{"title":"JSON","owner":"CupOfTea696"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"less":{"title":"Less","require":"css","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","peerDependencies":["jsdoc"],"alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"nasm":{"title":"NASM","owner":"rbmj"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"cpp","peerDependencies":["c","cpp"],"overrideExampleHeader":true,"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"peerDependencies":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","peerDependencies":["c","cpp","fortran"],"owner":"Golmote"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"peerDependencies":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","peerDependencies":["actionscript","coffeescript","flow","javascript","typescript","vala"],"owner":"RunDevelopment"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","require":"sql","owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","peerDependencies":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"turtle":{"title":"Turtle","alias":["trig"],"aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","peerDependencies":"js-templates","alias":"ts","owner":"vkbansal"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","visual-basic"],"owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":"Line Highlight","line-numbers":{"title":"Line Numbers","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","after":["autolinker","data-uri-highlight"]},"autolinker":"Autolinker","wpd":"WebPlatform Docs","custom-class":{"title":"Custom Class","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","noCSS":true},"show-language":{"title":"Show Language","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","owner":"Golmote","noCSS":true},"previewers":{"title":"Previewers","owner":"Golmote"},"autoloader":{"title":"Autoloader","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","owner":"Golmote","after":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","owner":"chriswells0"},"unescaped-markup":"Unescaped Markup","normalize-whitespace":{"title":"Normalize Whitespace","owner":"zeitgeist87","after":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"diff-highlight":{"title":"Diff Highlight","owner":"RunDevelopment","require":"diff"}}}; if (typeof module !== 'undefined' && module.exports) { module.exports = components; } \ No newline at end of file diff --git a/components.json b/components.json index 5d3ec55902..8fecd06e62 100644 --- a/components.json +++ b/components.json @@ -1005,6 +1005,10 @@ "title": "YAML", "alias": "yml", "owner": "hason" + }, + "zig": { + "title": "Zig", + "owner": "RunDevelopment" } }, "plugins": { diff --git a/components/prism-zig.js b/components/prism-zig.js new file mode 100644 index 0000000000..64f1bdc24a --- /dev/null +++ b/components/prism-zig.js @@ -0,0 +1,97 @@ +(function (Prism) { + + var keyword = /\b(?:align|allowzero|and|asm|async|await|break|cancel|catch|comptime|const|continue|defer|else|enum|errdefer|error|export|extern|fn|for|if|inline|linksection|nakedcc|noalias|null|or|orelse|packed|promise|pub|resume|return|stdcallcc|struct|suspend|switch|test|threadlocal|try|undefined|union|unreachable|usingnamespace|var|volatile|while)\b/; + + var IDENTIFIER = '\\b(?!' + keyword.source + ')(?!\\d)\\w+\\b'; + var ALIGN = /align\s*\((?:[^()]|\([^()]*\))*\)/.source; + var PREFIX_TYPE_OP = /(?:\?|\bpromise->|(?:\[[^[\]]*\]|\*(?!\*)|\*\*)(?:\s*|\s*const\b|\s*volatile\b|\s*allowzero\b)*)/.source.replace(//g, ALIGN); + var SUFFIX_EXPR = /(?:\bpromise\b|(?:\berror\.)?(?:\.)*(?!\s+))/.source.replace(//g, IDENTIFIER); + var TYPE = '(?!\\s)(?:!?\\s*(?:' + PREFIX_TYPE_OP + '\\s*)*' + SUFFIX_EXPR + ')+'; + + /* + * A simplified grammar for Zig compile time type literals: + * + * TypeExpr = ( "!"? PREFIX_TYPE_OP* SUFFIX_EXPR )+ + * + * SUFFIX_EXPR = ( \b "promise" \b | ( \b "error" "." )? IDENTIFIER ( "." IDENTIFIER )* (?! \s+ IDENTIFIER ) ) + * + * PREFIX_TYPE_OP = "?" + * | \b "promise" "->" + * | ( "[" [^\[\]]* "]" | "*" | "**" ) ( ALIGN | "const" \b | "volatile" \b | "allowzero" \b )* + * + * ALIGN = "align" "(" ( [^()] | "(" [^()]* ")" )* ")" + * + * IDENTIFIER = \b (?! KEYWORD ) [a-zA-Z_] \w* \b + * + */ + + Prism.languages.zig = { + 'comment': [ + { + pattern: /\/{3}.*/, + alias: 'doc-comment' + }, + /\/{2}.*/ + ], + 'string': [ + { + // "string" and c"string" + pattern: /(^|[^\\@])c?"(?:[^"\\\r\n]|\\.)*"/, + lookbehind: true, + greedy: true + }, + { + // multiline strings and c-strings + pattern: /([\r\n])([ \t]+c?\\{2}).*(?:(?:\r\n?|\n)\2.*)*/, + lookbehind: true, + greedy: true + }, + { + // characters 'a', '\n', '\xFF', '\u{10FFFF}' + pattern: /(^|[^\\])'(?:[^'\\\r\n]|\\(?:.|x[a-fA-F\d]{2}|u\{[a-fA-F\d]{1,6}\}))'/, + lookbehind: true, + greedy: true + } + ], + 'builtin': /\B@(?!\d)\w+(?=\s*\()/, + 'label': { + pattern: /(\b(?:break|continue)\s*:\s*)\w+\b|\b(?!\d)\w+\b(?=\s*:\s*(?:\{|while\b))/, + lookbehind: true + }, + 'class-name': [ + // const Foo = struct {}; + /\b(?!\d)\w+(?=\s*=\s*(?:(?:extern|packed)\s+)?(?:enum|struct|union)\s*[({])/, + { + // const x: i32 = 9; + // var x: Bar; + // fn foo(x: bool, y: f32) void {} + pattern: RegExp(/(:\s*)(?=\s*(?:\s*)?[=;,)])|(?=\s*(?:\s*)?\{)/.source.replace(//g, TYPE).replace(//g, ALIGN)), + lookbehind: true, + inside: null // see below + }, + { + // extern fn foo(x: f64) f64; (optional alignment) + pattern: RegExp(/(\)\s*)(?=\s*(?:\s*)?;)/.source.replace(//g, TYPE).replace(//g, ALIGN)), + lookbehind: true, + inside: null // see below + } + ], + 'builtin-types': { + pattern: /\b(?:anyerror|bool|c_u?(?:short|int|long|longlong)|c_longdouble|c_void|comptime_(?:float|int)|[iu](?:8|16|32|64|128|size)|f(?:16|32|64|128)|noreturn|type|void)\b/, + alias: 'keyword' + }, + 'keyword': keyword, + 'function': /\b(?!\d)\w+(?=\s*\()/, + 'number': /\b(?:0b[01]+|0o[0-7]+|0x[a-fA-F\d]+\.?[a-fA-F\d]*(?:[pP][+-]?[a-fA-F\d]+)?|\d+\.?\d*(?:[eE][+-]?\d+)?)\b/, + 'boolean': /\b(?:false|true)\b/, + 'operator': /\.[*?]|\.{2,3}|[-=]>|\*\*|\+\+|\|\||(?:<<|>>|[-+*]%|[-+*/%^&|<>!=])=?|[?~]/, + 'punctuation': /[.:,;(){}[\]]/ + }; + + Prism.languages.zig['class-name'].forEach(function (obj) { + if (obj.inside === null) { + obj.inside = Prism.languages.zig; + } + }); + +}(Prism)); diff --git a/components/prism-zig.min.js b/components/prism-zig.min.js new file mode 100644 index 0000000000..968859607d --- /dev/null +++ b/components/prism-zig.min.js @@ -0,0 +1 @@ +!function(n){var e=/\b(?:align|allowzero|and|asm|async|await|break|cancel|catch|comptime|const|continue|defer|else|enum|errdefer|error|export|extern|fn|for|if|inline|linksection|nakedcc|noalias|null|or|orelse|packed|promise|pub|resume|return|stdcallcc|struct|suspend|switch|test|threadlocal|try|undefined|union|unreachable|usingnamespace|var|volatile|while)\b/,a="\\b(?!"+e.source+")(?!\\d)\\w+\\b",r="align\\s*\\((?:[^()]|\\([^()]*\\))*\\)",s="(?!\\s)(?:!?\\s*(?:"+"(?:\\?|\\bpromise->|(?:\\[[^[\\]]*\\]|\\*(?!\\*)|\\*\\*)(?:\\s*|\\s*const\\b|\\s*volatile\\b|\\s*allowzero\\b)*)".replace(//g,r)+"\\s*)*"+"(?:\\bpromise\\b|(?:\\berror\\.)?(?:\\.)*(?!\\s+))".replace(//g,a)+")+";n.languages.zig={comment:[{pattern:/\/{3}.*/,alias:"doc-comment"},/\/{2}.*/],string:[{pattern:/(^|[^\\@])c?"(?:[^"\\\r\n]|\\.)*"/,lookbehind:!0,greedy:!0},{pattern:/([\r\n])([ \t]+c?\\{2}).*(?:(?:\r\n?|\n)\2.*)*/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\])'(?:[^'\\\r\n]|\\(?:.|x[a-fA-F\d]{2}|u\{[a-fA-F\d]{1,6}\}))'/,lookbehind:!0,greedy:!0}],builtin:/\B@(?!\d)\w+(?=\s*\()/,label:{pattern:/(\b(?:break|continue)\s*:\s*)\w+\b|\b(?!\d)\w+\b(?=\s*:\s*(?:\{|while\b))/,lookbehind:!0},"class-name":[/\b(?!\d)\w+(?=\s*=\s*(?:(?:extern|packed)\s+)?(?:enum|struct|union)\s*[({])/,{pattern:RegExp("(:\\s*)(?=\\s*(?:\\s*)?[=;,)])|(?=\\s*(?:\\s*)?\\{)".replace(//g,s).replace(//g,r)),lookbehind:!0,inside:null},{pattern:RegExp("(\\)\\s*)(?=\\s*(?:\\s*)?;)".replace(//g,s).replace(//g,r)),lookbehind:!0,inside:null}],"builtin-types":{pattern:/\b(?:anyerror|bool|c_u?(?:short|int|long|longlong)|c_longdouble|c_void|comptime_(?:float|int)|[iu](?:8|16|32|64|128|size)|f(?:16|32|64|128)|noreturn|type|void)\b/,alias:"keyword"},keyword:e,function:/\b(?!\d)\w+(?=\s*\()/,number:/\b(?:0b[01]+|0o[0-7]+|0x[a-fA-F\d]+\.?[a-fA-F\d]*(?:[pP][+-]?[a-fA-F\d]+)?|\d+\.?\d*(?:[eE][+-]?\d+)?)\b/,boolean:/\b(?:false|true)\b/,operator:/\.[*?]|\.{2,3}|[-=]>|\*\*|\+\+|\|\||(?:<<|>>|[-+*]%|[-+*/%^&|<>!=])=?|[?~]/,punctuation:/[.:,;(){}[\]]/},n.languages.zig["class-name"].forEach(function(e){null===e.inside&&(e.inside=n.languages.zig)})}(Prism); \ No newline at end of file diff --git a/examples/prism-zig.html b/examples/prism-zig.html new file mode 100644 index 0000000000..67bf148cd3 --- /dev/null +++ b/examples/prism-zig.html @@ -0,0 +1,46 @@ +

    Full example

    +
    const std = @import("std");
    +
    +pub fn main() !void {
    +    // If this program is run without stdout attached, exit with an error.
    +    const stdout_file = try std.io.getStdOut();
    +    // If this program encounters pipe failure when printing to stdout, exit
    +    // with an error.
    +    try stdout_file.write("Hello, world!\n");
    +}
    +
    +const warn = @import("std").debug.warn;
    +
    +pub fn main() void {
    +    warn("Hello, world!\n");
    +}
    +
    +const assert = @import("std").debug.assert;
    +
    +test "comments" {
    +    // Comments in Zig start with "//" and end at the next LF byte (end of line).
    +    // The below line is a comment, and won't be executed.
    +
    +    //assert(false);
    +
    +    const x = true;  // another comment
    +    assert(x);
    +}
    +
    +/// A structure for storing a timestamp, with nanosecond precision (this is a
    +/// multiline doc comment).
    +const Timestamp = struct {
    +    /// The number of seconds since the epoch (this is also a doc comment).
    +    seconds: i64,  // signed so we can represent pre-1970 (not a doc comment)
    +    /// The number of nanoseconds past the second (doc comment again).
    +    nanos: u32,
    +
    +    /// Returns a `Timestamp` struct representing the Unix epoch; that is, the
    +    /// moment of 1970 Jan 1 00:00:00 UTC (this is a doc comment too).
    +    pub fn unixEpoch() Timestamp {
    +        return Timestamp{
    +            .seconds = 0,
    +            .nanos = 0,
    +        };
    +    }
    +};
    diff --git a/tests/languages/zig/builtin-types_feature.test b/tests/languages/zig/builtin-types_feature.test new file mode 100644 index 0000000000..7af60750a9 --- /dev/null +++ b/tests/languages/zig/builtin-types_feature.test @@ -0,0 +1,75 @@ +i8 +u8 +i16 +u16 +i32 +u32 +i64 +u64 +i128 +u128 +isize +usize +c_short +c_ushort +c_int +c_uint +c_long +c_ulong +c_longlong +c_ulonglong +c_longdouble +c_void +f16 +f32 +f64 +f128 +bool +void +noreturn +type +anyerror +comptime_int +comptime_float + +---------------------------------------------------- + +[ + ["builtin-types", "i8"], + ["builtin-types", "u8"], + ["builtin-types", "i16"], + ["builtin-types", "u16"], + ["builtin-types", "i32"], + ["builtin-types", "u32"], + ["builtin-types", "i64"], + ["builtin-types", "u64"], + ["builtin-types", "i128"], + ["builtin-types", "u128"], + ["builtin-types", "isize"], + ["builtin-types", "usize"], + ["builtin-types", "c_short"], + ["builtin-types", "c_ushort"], + ["builtin-types", "c_int"], + ["builtin-types", "c_uint"], + ["builtin-types", "c_long"], + ["builtin-types", "c_ulong"], + ["builtin-types", "c_longlong"], + ["builtin-types", "c_ulonglong"], + ["builtin-types", "c_longdouble"], + ["builtin-types", "c_void"], + ["builtin-types", "f16"], + ["builtin-types", "f32"], + ["builtin-types", "f64"], + ["builtin-types", "f128"], + ["builtin-types", "bool"], + ["builtin-types", "void"], + ["builtin-types", "noreturn"], + ["builtin-types", "type"], + ["builtin-types", "anyerror"], + ["builtin-types", "comptime_int"], + ["builtin-types", "comptime_float"] +] + +---------------------------------------------------- + +Checks for builtin types. diff --git a/tests/languages/zig/builtin_feature.test b/tests/languages/zig/builtin_feature.test new file mode 100644 index 0000000000..e152c64be7 --- /dev/null +++ b/tests/languages/zig/builtin_feature.test @@ -0,0 +1,417 @@ +@addWithOverflow() +@alignCast() +@alignOf() +@ArgType() +@atomicLoad() +@atomicRmw() +@bitCast() +@bitOffsetOf() +@boolToInt() +@breakpoint() +@mulAdd() +@byteSwap() +@bitReverse() +@byteOffsetOf() +@bytesToSlice() +@cDefine() +@cImport() +@cInclude() +@clz() +@cmpxchgStrong() +@cmpxchgWeak() +@compileError() +@compileLog() +@ctz() +@cUndef() +@divExact() +@divFloor() +@divTrunc() +@embedFile() +@enumToInt() +@errorName() +@errorReturnTrace() +@errorToInt() +@errSetCast() +@export() +@fence() +@field() +@fieldParentPtr() +@floatCast() +@floatToInt() +@frameAddress() +@handle() +@hasDecl() +@hasField() +@import() +@inlineCall() +@intCast() +@intToEnum() +@intToError() +@intToFloat() +@intToPtr() +@IntType() +@memberCount() +@memberName() +@memberType() +@memcpy() +@memset() +@mod() +@mulWithOverflow() +@newStackCall() +@noInlineCall() +@OpaqueType() +@panic() +@popCount() +@ptrCast() +@ptrToInt() +@rem() +@returnAddress() +@setAlignStack() +@setCold() +@setEvalBranchQuota() +@setFloatMode() +@setRuntimeSafety() +@shlExact() +@shlWithOverflow() +@shrExact() +@sizeOf() +@sliceToBytes() +@sqrt() +@sin() +@cos() +@exp() +@exp2() +@ln() +@log2() +@log10() +@fabs() +@floor() +@ceil() +@trunc() +@round() +@subWithOverflow() +@tagName() +@TagType() +@This() +@truncate() +@typeId() +@typeInfo() +@typeName() +@typeOf() +@unionInit() +@Vector() + +---------------------------------------------------- + +[ + ["builtin", "@addWithOverflow"], + ["punctuation", "("], + ["punctuation", ")"], + ["builtin", "@alignCast"], + ["punctuation", "("], + ["punctuation", ")"], + ["builtin", "@alignOf"], + ["punctuation", "("], + ["punctuation", ")"], + ["builtin", "@ArgType"], + ["punctuation", "("], + ["punctuation", ")"], + ["builtin", "@atomicLoad"], + ["punctuation", "("], + ["punctuation", ")"], + ["builtin", "@atomicRmw"], + ["punctuation", "("], + ["punctuation", ")"], + ["builtin", "@bitCast"], + ["punctuation", "("], + ["punctuation", ")"], + ["builtin", "@bitOffsetOf"], + ["punctuation", "("], + ["punctuation", ")"], + ["builtin", "@boolToInt"], + ["punctuation", "("], + ["punctuation", ")"], + ["builtin", "@breakpoint"], + ["punctuation", "("], + ["punctuation", ")"], + ["builtin", "@mulAdd"], + ["punctuation", "("], + ["punctuation", ")"], + ["builtin", "@byteSwap"], + ["punctuation", "("], + ["punctuation", ")"], + ["builtin", "@bitReverse"], + ["punctuation", "("], + ["punctuation", ")"], + ["builtin", "@byteOffsetOf"], + ["punctuation", "("], + ["punctuation", ")"], + ["builtin", "@bytesToSlice"], + ["punctuation", "("], + ["punctuation", ")"], + ["builtin", "@cDefine"], + ["punctuation", "("], + ["punctuation", ")"], + ["builtin", "@cImport"], + ["punctuation", "("], + ["punctuation", ")"], + ["builtin", "@cInclude"], + ["punctuation", "("], + ["punctuation", ")"], + ["builtin", "@clz"], + ["punctuation", "("], + ["punctuation", ")"], + ["builtin", "@cmpxchgStrong"], + ["punctuation", "("], + ["punctuation", ")"], + ["builtin", "@cmpxchgWeak"], + ["punctuation", "("], + ["punctuation", ")"], + ["builtin", "@compileError"], + ["punctuation", "("], + ["punctuation", ")"], + ["builtin", "@compileLog"], + ["punctuation", "("], + ["punctuation", ")"], + ["builtin", "@ctz"], + ["punctuation", "("], + ["punctuation", ")"], + ["builtin", "@cUndef"], + ["punctuation", "("], + ["punctuation", ")"], + ["builtin", "@divExact"], + ["punctuation", "("], + ["punctuation", ")"], + ["builtin", "@divFloor"], + ["punctuation", "("], + ["punctuation", ")"], + ["builtin", "@divTrunc"], + ["punctuation", "("], + ["punctuation", ")"], + ["builtin", "@embedFile"], + ["punctuation", "("], + ["punctuation", ")"], + ["builtin", "@enumToInt"], + ["punctuation", "("], + ["punctuation", ")"], + ["builtin", "@errorName"], + ["punctuation", "("], + ["punctuation", ")"], + ["builtin", "@errorReturnTrace"], + ["punctuation", "("], + ["punctuation", ")"], + ["builtin", "@errorToInt"], + ["punctuation", "("], + ["punctuation", ")"], + ["builtin", "@errSetCast"], + ["punctuation", "("], + ["punctuation", ")"], + ["builtin", "@export"], + ["punctuation", "("], + ["punctuation", ")"], + ["builtin", "@fence"], + ["punctuation", "("], + ["punctuation", ")"], + ["builtin", "@field"], + ["punctuation", "("], + ["punctuation", ")"], + ["builtin", "@fieldParentPtr"], + ["punctuation", "("], + ["punctuation", ")"], + ["builtin", "@floatCast"], + ["punctuation", "("], + ["punctuation", ")"], + ["builtin", "@floatToInt"], + ["punctuation", "("], + ["punctuation", ")"], + ["builtin", "@frameAddress"], + ["punctuation", "("], + ["punctuation", ")"], + ["builtin", "@handle"], + ["punctuation", "("], + ["punctuation", ")"], + ["builtin", "@hasDecl"], + ["punctuation", "("], + ["punctuation", ")"], + ["builtin", "@hasField"], + ["punctuation", "("], + ["punctuation", ")"], + ["builtin", "@import"], + ["punctuation", "("], + ["punctuation", ")"], + ["builtin", "@inlineCall"], + ["punctuation", "("], + ["punctuation", ")"], + ["builtin", "@intCast"], + ["punctuation", "("], + ["punctuation", ")"], + ["builtin", "@intToEnum"], + ["punctuation", "("], + ["punctuation", ")"], + ["builtin", "@intToError"], + ["punctuation", "("], + ["punctuation", ")"], + ["builtin", "@intToFloat"], + ["punctuation", "("], + ["punctuation", ")"], + ["builtin", "@intToPtr"], + ["punctuation", "("], + ["punctuation", ")"], + ["builtin", "@IntType"], + ["punctuation", "("], + ["punctuation", ")"], + ["builtin", "@memberCount"], + ["punctuation", "("], + ["punctuation", ")"], + ["builtin", "@memberName"], + ["punctuation", "("], + ["punctuation", ")"], + ["builtin", "@memberType"], + ["punctuation", "("], + ["punctuation", ")"], + ["builtin", "@memcpy"], + ["punctuation", "("], + ["punctuation", ")"], + ["builtin", "@memset"], + ["punctuation", "("], + ["punctuation", ")"], + ["builtin", "@mod"], + ["punctuation", "("], + ["punctuation", ")"], + ["builtin", "@mulWithOverflow"], + ["punctuation", "("], + ["punctuation", ")"], + ["builtin", "@newStackCall"], + ["punctuation", "("], + ["punctuation", ")"], + ["builtin", "@noInlineCall"], + ["punctuation", "("], + ["punctuation", ")"], + ["builtin", "@OpaqueType"], + ["punctuation", "("], + ["punctuation", ")"], + ["builtin", "@panic"], + ["punctuation", "("], + ["punctuation", ")"], + ["builtin", "@popCount"], + ["punctuation", "("], + ["punctuation", ")"], + ["builtin", "@ptrCast"], + ["punctuation", "("], + ["punctuation", ")"], + ["builtin", "@ptrToInt"], + ["punctuation", "("], + ["punctuation", ")"], + ["builtin", "@rem"], + ["punctuation", "("], + ["punctuation", ")"], + ["builtin", "@returnAddress"], + ["punctuation", "("], + ["punctuation", ")"], + ["builtin", "@setAlignStack"], + ["punctuation", "("], + ["punctuation", ")"], + ["builtin", "@setCold"], + ["punctuation", "("], + ["punctuation", ")"], + ["builtin", "@setEvalBranchQuota"], + ["punctuation", "("], + ["punctuation", ")"], + ["builtin", "@setFloatMode"], + ["punctuation", "("], + ["punctuation", ")"], + ["builtin", "@setRuntimeSafety"], + ["punctuation", "("], + ["punctuation", ")"], + ["builtin", "@shlExact"], + ["punctuation", "("], + ["punctuation", ")"], + ["builtin", "@shlWithOverflow"], + ["punctuation", "("], + ["punctuation", ")"], + ["builtin", "@shrExact"], + ["punctuation", "("], + ["punctuation", ")"], + ["builtin", "@sizeOf"], + ["punctuation", "("], + ["punctuation", ")"], + ["builtin", "@sliceToBytes"], + ["punctuation", "("], + ["punctuation", ")"], + ["builtin", "@sqrt"], + ["punctuation", "("], + ["punctuation", ")"], + ["builtin", "@sin"], + ["punctuation", "("], + ["punctuation", ")"], + ["builtin", "@cos"], + ["punctuation", "("], + ["punctuation", ")"], + ["builtin", "@exp"], + ["punctuation", "("], + ["punctuation", ")"], + ["builtin", "@exp2"], + ["punctuation", "("], + ["punctuation", ")"], + ["builtin", "@ln"], + ["punctuation", "("], + ["punctuation", ")"], + ["builtin", "@log2"], + ["punctuation", "("], + ["punctuation", ")"], + ["builtin", "@log10"], + ["punctuation", "("], + ["punctuation", ")"], + ["builtin", "@fabs"], + ["punctuation", "("], + ["punctuation", ")"], + ["builtin", "@floor"], + ["punctuation", "("], + ["punctuation", ")"], + ["builtin", "@ceil"], + ["punctuation", "("], + ["punctuation", ")"], + ["builtin", "@trunc"], + ["punctuation", "("], + ["punctuation", ")"], + ["builtin", "@round"], + ["punctuation", "("], + ["punctuation", ")"], + ["builtin", "@subWithOverflow"], + ["punctuation", "("], + ["punctuation", ")"], + ["builtin", "@tagName"], + ["punctuation", "("], + ["punctuation", ")"], + ["builtin", "@TagType"], + ["punctuation", "("], + ["punctuation", ")"], + ["builtin", "@This"], + ["punctuation", "("], + ["punctuation", ")"], + ["builtin", "@truncate"], + ["punctuation", "("], + ["punctuation", ")"], + ["builtin", "@typeId"], + ["punctuation", "("], + ["punctuation", ")"], + ["builtin", "@typeInfo"], + ["punctuation", "("], + ["punctuation", ")"], + ["builtin", "@typeName"], + ["punctuation", "("], + ["punctuation", ")"], + ["builtin", "@typeOf"], + ["punctuation", "("], + ["punctuation", ")"], + ["builtin", "@unionInit"], + ["punctuation", "("], + ["punctuation", ")"], + ["builtin", "@Vector"], + ["punctuation", "("], + ["punctuation", ")"] +] + +---------------------------------------------------- + +Checks for builtin functions. diff --git a/tests/languages/zig/class-name_feature.test b/tests/languages/zig/class-name_feature.test new file mode 100644 index 0000000000..9b0d92caf0 --- /dev/null +++ b/tests/languages/zig/class-name_feature.test @@ -0,0 +1,504 @@ +const Timestamp = struct { + seconds: i64, + nanos: u32, + pub fn unixEpoch() Timestamp { + return Timestamp{ + .seconds = 0, + .nanos = 0, + }; + } +}; + +const one_plus_one: i32 = 1 + 1; +var x: i32; +const value: ?u32 = null; +var optional_value: ?[]const u8 = null; +var number_or_error: anyerror!i32 = error.ArgNotFound; +const array1 = [_]u32{1,2}; +var foo: S align(4) = undefined; + +fn add(a: i32, b: i32) i32 { + return a + b; +} +extern fn foo(x: f64) f64; +fn noop4() align(4) void {} +fn derp() align(@sizeOf(usize) * 2) i32 { return 1234; } + +fn eventuallyNullSequence() ?u32 { + return if (numbers_left == 0) null else blk: { + numbers_left -= 1; + break :blk numbers_left; + }; +} + +const message = [_]u8{ 'h', 'e', 'l', 'l', 'o' }; + +const mat4x4 = [4][4]f32{ + [_]f32{ 1.0, 0.0, 0.0, 0.0 }, + [_]f32{ 0.0, 1.0, 0.0, 1.0 }, + [_]f32{ 0.0, 0.0, 1.0, 0.0 }, + [_]f32{ 0.0, 0.0, 0.0, 1.0 }, +}; + +const Point = struct {}; +const Point2 = packed struct {}; +const Type = enum {}; +const Value = enum(u2) {}; +const Number = packed enum(u8) {}; +const Foo = extern enum { A, B, C }; +const Foo = extern enum { A, B, C }; +const Payload = union {}; +const ComplexType = union(ComplexTypeTag) {}; + +var node = ListOfInts.Node {}; +var list2 = LinkedList(i32) {}; + +---------------------------------------------------- + +[ + ["keyword", "const"], + ["class-name", "Timestamp"], + ["operator", "="], + ["keyword", "struct"], + ["punctuation", "{"], + "\r\n\tseconds", + ["punctuation", ":"], + ["class-name", [ + ["builtin-types", "i64"] + ]], + ["punctuation", ","], + "\r\n\tnanos", + ["punctuation", ":"], + ["class-name", [ + ["builtin-types", "u32"] + ]], + ["punctuation", ","], + ["keyword", "pub"], + ["keyword", "fn"], + ["function", "unixEpoch"], + ["punctuation", "("], + ["punctuation", ")"], + ["class-name", [ + "Timestamp" + ]], + ["punctuation", "{"], + ["keyword", "return"], + ["class-name", [ + "Timestamp" + ]], + ["punctuation", "{"], + ["punctuation", "."], + "seconds ", + ["operator", "="], + ["number", "0"], + ["punctuation", ","], + ["punctuation", "."], + "nanos ", + ["operator", "="], + ["number", "0"], + ["punctuation", ","], + ["punctuation", "}"], + ["punctuation", ";"], + ["punctuation", "}"], + ["punctuation", "}"], + ["punctuation", ";"], + ["keyword", "const"], + " one_plus_one", + ["punctuation", ":"], + ["class-name", [ + ["builtin-types", "i32"] + ]], + ["operator", "="], + ["number", "1"], + ["operator", "+"], + ["number", "1"], + ["punctuation", ";"], + ["keyword", "var"], + " x", + ["punctuation", ":"], + ["class-name", [ + ["builtin-types", "i32"] + ]], + ["punctuation", ";"], + ["keyword", "const"], + " value", + ["punctuation", ":"], + ["class-name", [ + ["operator", "?"], + ["builtin-types", "u32"] + ]], + ["operator", "="], + ["keyword", "null"], + ["punctuation", ";"], + ["keyword", "var"], + " optional_value", + ["punctuation", ":"], + ["class-name", [ + ["operator", "?"], + ["punctuation", "["], + ["punctuation", "]"], + ["keyword", "const"], + ["builtin-types", "u8"] + ]], + ["operator", "="], + ["keyword", "null"], + ["punctuation", ";"], + ["keyword", "var"], + " number_or_error", + ["punctuation", ":"], + ["class-name", [ + ["builtin-types", "anyerror"], + ["operator", "!"], + ["builtin-types", "i32"] + ]], + ["operator", "="], + ["keyword", "error"], + ["punctuation", "."], + "ArgNotFound", + ["punctuation", ";"], + ["keyword", "const"], + " array1 ", + ["operator", "="], + ["class-name", [ + ["punctuation", "["], + "_", + ["punctuation", "]"], + ["builtin-types", "u32"] + ]], + ["punctuation", "{"], + ["number", "1"], + ["punctuation", ","], + ["number", "2"], + ["punctuation", "}"], + ["punctuation", ";"], + ["keyword", "var"], + " foo", + ["punctuation", ":"], + ["class-name", [ + "S" + ]], + ["keyword", "align"], + ["punctuation", "("], + ["number", "4"], + ["punctuation", ")"], + ["operator", "="], + ["keyword", "undefined"], + ["punctuation", ";"], + ["keyword", "fn"], + ["function", "add"], + ["punctuation", "("], + "a", + ["punctuation", ":"], + ["class-name", [ + ["builtin-types", "i32"] + ]], + ["punctuation", ","], + " b", + ["punctuation", ":"], + ["class-name", [ + ["builtin-types", "i32"] + ]], + ["punctuation", ")"], + ["class-name", [ + ["builtin-types", "i32"] + ]], + ["punctuation", "{"], + ["keyword", "return"], + " a ", + ["operator", "+"], + " b", + ["punctuation", ";"], + ["punctuation", "}"], + ["keyword", "extern"], + ["keyword", "fn"], + ["function", "foo"], + ["punctuation", "("], + "x", + ["punctuation", ":"], + ["class-name", [ + ["builtin-types", "f64"] + ]], + ["punctuation", ")"], + ["class-name", [ + ["builtin-types", "f64"] + ]], + ["punctuation", ";"], + ["keyword", "fn"], + ["function", "noop4"], + ["punctuation", "("], + ["punctuation", ")"], + ["keyword", "align"], + ["punctuation", "("], + ["number", "4"], + ["punctuation", ")"], + ["class-name", [ + ["builtin-types", "void"] + ]], + ["punctuation", "{"], + ["punctuation", "}"], + ["keyword", "fn"], + ["function", "derp"], + ["punctuation", "("], + ["punctuation", ")"], + ["keyword", "align"], + ["punctuation", "("], + ["builtin", "@sizeOf"], + ["punctuation", "("], + ["builtin-types", "usize"], + ["punctuation", ")"], + ["operator", "*"], + ["number", "2"], + ["punctuation", ")"], + ["class-name", [ + ["builtin-types", "i32"] + ]], + ["punctuation", "{"], + ["keyword", "return"], + ["number", "1234"], + ["punctuation", ";"], + ["punctuation", "}"], + ["keyword", "fn"], + ["function", "eventuallyNullSequence"], + ["punctuation", "("], + ["punctuation", ")"], + ["class-name", [ + ["operator", "?"], + ["builtin-types", "u32"] + ]], + ["punctuation", "{"], + ["keyword", "return"], + ["keyword", "if"], + ["punctuation", "("], + "numbers_left ", + ["operator", "=="], + ["number", "0"], + ["punctuation", ")"], + ["keyword", "null"], + ["keyword", "else"], + ["label", "blk"], + ["punctuation", ":"], + ["punctuation", "{"], + "\r\n\t\tnumbers_left ", + ["operator", "-="], + ["number", "1"], + ["punctuation", ";"], + ["keyword", "break"], + ["punctuation", ":"], + ["label", "blk"], + " numbers_left", + ["punctuation", ";"], + ["punctuation", "}"], + ["punctuation", ";"], + ["punctuation", "}"], + ["keyword", "const"], + " message ", + ["operator", "="], + ["class-name", [ + ["punctuation", "["], + "_", + ["punctuation", "]"], + ["builtin-types", "u8"] + ]], + ["punctuation", "{"], + ["string", "'h'"], + ["punctuation", ","], + ["string", "'e'"], + ["punctuation", ","], + ["string", "'l'"], + ["punctuation", ","], + ["string", "'l'"], + ["punctuation", ","], + ["string", "'o'"], + ["punctuation", "}"], + ["punctuation", ";"], + ["keyword", "const"], + " mat4x4 ", + ["operator", "="], + ["class-name", [ + ["punctuation", "["], + ["number", "4"], + ["punctuation", "]"], + ["punctuation", "["], + ["number", "4"], + ["punctuation", "]"], + ["builtin-types", "f32"] + ]], + ["punctuation", "{"], + ["class-name", [ + ["punctuation", "["], + "_", + ["punctuation", "]"], + ["builtin-types", "f32"] + ]], + ["punctuation", "{"], + ["number", "1.0"], + ["punctuation", ","], + ["number", "0.0"], + ["punctuation", ","], + ["number", "0.0"], + ["punctuation", ","], + ["number", "0.0"], + ["punctuation", "}"], + ["punctuation", ","], + ["class-name", [ + ["punctuation", "["], + "_", + ["punctuation", "]"], + ["builtin-types", "f32"] + ]], + ["punctuation", "{"], + ["number", "0.0"], + ["punctuation", ","], + ["number", "1.0"], + ["punctuation", ","], + ["number", "0.0"], + ["punctuation", ","], + ["number", "1.0"], + ["punctuation", "}"], + ["punctuation", ","], + ["class-name", [ + ["punctuation", "["], + "_", + ["punctuation", "]"], + ["builtin-types", "f32"] + ]], + ["punctuation", "{"], + ["number", "0.0"], + ["punctuation", ","], + ["number", "0.0"], + ["punctuation", ","], + ["number", "1.0"], + ["punctuation", ","], + ["number", "0.0"], + ["punctuation", "}"], + ["punctuation", ","], + ["class-name", [ + ["punctuation", "["], + "_", + ["punctuation", "]"], + ["builtin-types", "f32"] + ]], + ["punctuation", "{"], + ["number", "0.0"], + ["punctuation", ","], + ["number", "0.0"], + ["punctuation", ","], + ["number", "0.0"], + ["punctuation", ","], + ["number", "1.0"], + ["punctuation", "}"], + ["punctuation", ","], + ["punctuation", "}"], + ["punctuation", ";"], + ["keyword", "const"], + ["class-name", "Point"], + ["operator", "="], + ["keyword", "struct"], + ["punctuation", "{"], + ["punctuation", "}"], + ["punctuation", ";"], + ["keyword", "const"], + ["class-name", "Point2"], + ["operator", "="], + ["keyword", "packed"], + ["keyword", "struct"], + ["punctuation", "{"], + ["punctuation", "}"], + ["punctuation", ";"], + ["keyword", "const"], + ["class-name", "Type"], + ["operator", "="], + ["keyword", "enum"], + ["punctuation", "{"], + ["punctuation", "}"], + ["punctuation", ";"], + ["keyword", "const"], + ["class-name", "Value"], + ["operator", "="], + ["keyword", "enum"], + ["punctuation", "("], + "u2", + ["punctuation", ")"], + ["punctuation", "{"], + ["punctuation", "}"], + ["punctuation", ";"], + ["keyword", "const"], + ["class-name", "Number"], + ["operator", "="], + ["keyword", "packed"], + ["keyword", "enum"], + ["punctuation", "("], + ["builtin-types", "u8"], + ["punctuation", ")"], + ["punctuation", "{"], + ["punctuation", "}"], + ["punctuation", ";"], + ["keyword", "const"], + ["class-name", "Foo"], + ["operator", "="], + ["keyword", "extern"], + ["keyword", "enum"], + ["punctuation", "{"], + " A", + ["punctuation", ","], + " B", + ["punctuation", ","], + " C ", + ["punctuation", "}"], + ["punctuation", ";"], + ["keyword", "const"], + ["class-name", "Foo"], + ["operator", "="], + ["keyword", "extern"], + ["keyword", "enum"], + ["punctuation", "{"], + " A", + ["punctuation", ","], + " B", + ["punctuation", ","], + " C ", + ["punctuation", "}"], + ["punctuation", ";"], + ["keyword", "const"], + ["class-name", "Payload"], + ["operator", "="], + ["keyword", "union"], + ["punctuation", "{"], + ["punctuation", "}"], + ["punctuation", ";"], + ["keyword", "const"], + ["class-name", "ComplexType"], + ["operator", "="], + ["keyword", "union"], + ["punctuation", "("], + "ComplexTypeTag", + ["punctuation", ")"], + ["punctuation", "{"], + ["punctuation", "}"], + ["punctuation", ";"], + ["keyword", "var"], + " node ", + ["operator", "="], + ["class-name", [ + "ListOfInts", + ["punctuation", "."], + "Node" + ]], + ["punctuation", "{"], + ["punctuation", "}"], + ["punctuation", ";"], + ["keyword", "var"], + " list2 ", + ["operator", "="], + ["function", "LinkedList"], + ["punctuation", "("], + ["builtin-types", "i32"], + ["punctuation", ")"], + ["punctuation", "{"], + ["punctuation", "}"], + ["punctuation", ";"] +] + +---------------------------------------------------- + +Checks for class names. diff --git a/tests/languages/zig/keyword_feature.test b/tests/languages/zig/keyword_feature.test new file mode 100644 index 0000000000..4143eec83d --- /dev/null +++ b/tests/languages/zig/keyword_feature.test @@ -0,0 +1,105 @@ +align +allowzero +and +asm +async +await +break +cancel +catch +comptime +const +continue +defer +else +enum +errdefer +error +export +extern +fn +for +if +inline +linksection +nakedcc +noalias +null +or +orelse +packed +promise +pub +resume +return +stdcallcc +struct +suspend +switch +test +threadlocal +try +undefined +union +unreachable +usingnamespace +var +volatile +while + +---------------------------------------------------- + +[ + ["keyword", "align"], + ["keyword", "allowzero"], + ["keyword", "and"], + ["keyword", "asm"], + ["keyword", "async"], + ["keyword", "await"], + ["keyword", "break"], + ["keyword", "cancel"], + ["keyword", "catch"], + ["keyword", "comptime"], + ["keyword", "const"], + ["keyword", "continue"], + ["keyword", "defer"], + ["keyword", "else"], + ["keyword", "enum"], + ["keyword", "errdefer"], + ["keyword", "error"], + ["keyword", "export"], + ["keyword", "extern"], + ["keyword", "fn"], + ["keyword", "for"], + ["keyword", "if"], + ["keyword", "inline"], + ["keyword", "linksection"], + ["keyword", "nakedcc"], + ["keyword", "noalias"], + ["keyword", "null"], + ["keyword", "or"], + ["keyword", "orelse"], + ["keyword", "packed"], + ["keyword", "promise"], + ["keyword", "pub"], + ["keyword", "resume"], + ["keyword", "return"], + ["keyword", "stdcallcc"], + ["keyword", "struct"], + ["keyword", "suspend"], + ["keyword", "switch"], + ["keyword", "test"], + ["keyword", "threadlocal"], + ["keyword", "try"], + ["keyword", "undefined"], + ["keyword", "union"], + ["keyword", "unreachable"], + ["keyword", "usingnamespace"], + ["keyword", "var"], + ["keyword", "volatile"], + ["keyword", "while"] +] + +---------------------------------------------------- + +Checks for keywords. diff --git a/tests/languages/zig/label_feature.test b/tests/languages/zig/label_feature.test new file mode 100644 index 0000000000..e402699099 --- /dev/null +++ b/tests/languages/zig/label_feature.test @@ -0,0 +1,75 @@ +outer: while (true) { + while (true) { + break :outer; + } +} + +fn eventuallyErrorSequence() anyerror!u32 { + return if (numbers_left == 0) error.ReachedZero else blk: { + numbers_left -= 1; + break :blk numbers_left; + }; +} + +---------------------------------------------------- + +[ + ["label", "outer"], + ["punctuation", ":"], + ["keyword", "while"], + ["punctuation", "("], + ["boolean", "true"], + ["punctuation", ")"], + ["punctuation", "{"], + ["keyword", "while"], + ["punctuation", "("], + ["boolean", "true"], + ["punctuation", ")"], + ["punctuation", "{"], + ["keyword", "break"], + ["punctuation", ":"], + ["label", "outer"], + ["punctuation", ";"], + ["punctuation", "}"], + ["punctuation", "}"], + ["keyword", "fn"], + ["function", "eventuallyErrorSequence"], + ["punctuation", "("], + ["punctuation", ")"], + ["class-name", [ + ["builtin-types", "anyerror"], + ["operator", "!"], + ["builtin-types", "u32"] + ]], + ["punctuation", "{"], + ["keyword", "return"], + ["keyword", "if"], + ["punctuation", "("], + "numbers_left ", + ["operator", "=="], + ["number", "0"], + ["punctuation", ")"], + ["keyword", "error"], + ["punctuation", "."], + "ReachedZero ", + ["keyword", "else"], + ["label", "blk"], + ["punctuation", ":"], + ["punctuation", "{"], + "\r\n\t\tnumbers_left ", + ["operator", "-="], + ["number", "1"], + ["punctuation", ";"], + ["keyword", "break"], + ["punctuation", ":"], + ["label", "blk"], + " numbers_left", + ["punctuation", ";"], + ["punctuation", "}"], + ["punctuation", ";"], + ["punctuation", "}"] +] + +---------------------------------------------------- + +Checks for labels. diff --git a/tests/languages/zig/number_feature.test b/tests/languages/zig/number_feature.test new file mode 100644 index 0000000000..ce257a0ee6 --- /dev/null +++ b/tests/languages/zig/number_feature.test @@ -0,0 +1,22 @@ +123 +123.456e-7 + +0xBadFace +0xBAD.FACEp+F + +0b1001 +0o377 +---------------------------------------------------- + +[ + ["number", "123"], + ["number", "123.456e-7"], + ["number", "0xBadFace"], + ["number", "0xBAD.FACEp+F"], + ["number", "0b1001"], + ["number", "0o377"] +] + +---------------------------------------------------- + +Checks for numbers. diff --git a/tests/languages/zig/operator_feature.test b/tests/languages/zig/operator_feature.test new file mode 100644 index 0000000000..4ae1cc403b --- /dev/null +++ b/tests/languages/zig/operator_feature.test @@ -0,0 +1,73 @@ ++ - * / % ++= -= *= /= %= + +& | ^ +&= |= ^= + ++% -% *% ++%= -%= *%= + +** ++ + +< > <= >= ! != == = +~ << <<= >> >>= + +.* .? +.. ... + +=> -> +? +|| + +---------------------------------------------------- +[ + ["operator", "+"], + ["operator", "-"], + ["operator", "*"], + ["operator", "/"], + ["operator", "%"], + ["operator", "+="], + ["operator", "-="], + ["operator", "*="], + ["operator", "/="], + ["operator", "%="], + ["operator", "&"], + ["operator", "|"], + ["operator", "^"], + ["operator", "&="], + ["operator", "|="], + ["operator", "^="], + ["operator", "+%"], + ["operator", "-%"], + ["operator", "*%"], + ["operator", "+%="], + ["operator", "-%="], + ["operator", "*%="], + ["operator", "**"], + ["operator", "++"], + ["operator", "<"], + ["operator", ">"], + ["operator", "<="], + ["operator", ">="], + ["operator", "!"], + ["operator", "!="], + ["operator", "=="], + ["operator", "="], + ["operator", "~"], + ["operator", "<<"], + ["operator", "<<="], + ["operator", ">>"], + ["operator", ">>="], + ["operator", ".*"], + ["operator", ".?"], + ["operator", ".."], + ["operator", "..."], + ["operator", "=>"], + ["operator", "->"], + ["operator", "?"], + ["operator", "||"] +] + +---------------------------------------------------- + +Checks for operators. diff --git a/tests/languages/zig/punctuation_feature.test b/tests/languages/zig/punctuation_feature.test new file mode 100644 index 0000000000..189df1cfea --- /dev/null +++ b/tests/languages/zig/punctuation_feature.test @@ -0,0 +1,21 @@ +. : , ; +( ) { } [ ] + +---------------------------------------------------- + +[ + ["punctuation", "."], + ["punctuation", ":"], + ["punctuation", ","], + ["punctuation", ";"], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", "{"], + ["punctuation", "}"], + ["punctuation", "["], + ["punctuation", "]"] +] + +---------------------------------------------------- + +Checks for punctuation. From 3509f3e5c6caf9b5805f99db6326dbc0ac34e2ef Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Thu, 29 Aug 2019 16:37:13 +0200 Subject: [PATCH 0342/1100] Improved test page performance for Chromium (#2020) This improves the performance of the test page for large chunks of text in Chromium-based browsers. --- test.html | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/test.html b/test.html index d0c47718f2..8180554d16 100644 --- a/test.html +++ b/test.html @@ -134,9 +134,22 @@

    Test drive

    + + + + + + +
    +
    + +

    Download Button

    +

    A button in the toolbar of a code block adding a convenient way to download a code file.

    +
    + +
    +

    How to use

    + +

    Use the data-src and data-download-link attribute on a <pre> elements similar to Autoloader, like so:

    + +
    <pre data-src="myfile.js" data-download-link></pre>
    + +

    Optionally, the text of the button can also be customized by using a data-download-link-label attribute.

    +
    <pre data-src="myfile.js" data-download-link data-download-link-label="Download this file"></pre>
    +
    + +
    +

    Examples

    + +

    The plugin’s JS code:

    +
    
    +
    +	

    This page:

    +
    
    +
    + +
    + + + + + + + + + + + diff --git a/plugins/download-button/prism-download-button.js b/plugins/download-button/prism-download-button.js new file mode 100644 index 0000000000..55d8ec67a2 --- /dev/null +++ b/plugins/download-button/prism-download-button.js @@ -0,0 +1,19 @@ +(function () { + if (typeof self === 'undefined' || !self.Prism || !self.document || !document.querySelector) { + return; + } + + Prism.plugins.toolbar.registerButton('download-file', function (env) { + var pre = env.element.parentNode; + if (!pre || !/pre/i.test(pre.nodeName) || !pre.hasAttribute('data-src') || !pre.hasAttribute('data-download-link')) { + return; + } + var src = pre.getAttribute('data-src'); + var a = document.createElement('a'); + a.textContent = pre.getAttribute('data-download-link-label') || 'Download'; + a.setAttribute('download', ''); + a.href = src; + return a; + }); + +})(); diff --git a/plugins/download-button/prism-download-button.min.js b/plugins/download-button/prism-download-button.min.js new file mode 100644 index 0000000000..00f667306c --- /dev/null +++ b/plugins/download-button/prism-download-button.min.js @@ -0,0 +1 @@ +"undefined"!=typeof self&&self.Prism&&self.document&&document.querySelector&&Prism.plugins.toolbar.registerButton("download-file",function(t){var e=t.element.parentNode;if(e&&/pre/i.test(e.nodeName)&&e.hasAttribute("data-src")&&e.hasAttribute("data-download-link")){var a=e.getAttribute("data-src"),n=document.createElement("a");return n.textContent=e.getAttribute("data-download-link-label")||"Download",n.setAttribute("download",""),n.href=a,n}}); \ No newline at end of file diff --git a/plugins/file-highlight/index.html b/plugins/file-highlight/index.html index f1a8b7fb0a..438138fa7c 100644 --- a/plugins/file-highlight/index.html +++ b/plugins/file-highlight/index.html @@ -8,7 +8,6 @@ - @@ -34,13 +33,6 @@

    How to use

    If, however, the language cannot be determined from the file extension or the file extension is incorrect, you may specify a language as well (with the usual class name way).

    Please note that the files are fetched with XMLHttpRequest. This means that if the file is on a different origin, fetching it will fail, unless CORS is enabled on that website.

    - -

    - When used in conjunction with the Toolbar plugin, this plugin can also display a button to download the file. - To use it, add a data-download-link attribute on the <pre> element.
    - Optionally, the text can also be customized by using a data-download-link-label attribute. -

    -
    <pre data-src="myfile.js" data-download-link data-download-link-label="Download this file"></pre>
    @@ -55,9 +47,6 @@

    Examples

    File that doesn’t exist:

    
     
    -	

    With a download button:

    -
    
    -
     	

    For more examples, browse around the Prism website. Most large code samples are actually files fetched with this plugin.

    @@ -65,7 +54,6 @@

    Examples

    - diff --git a/plugins/file-highlight/prism-file-highlight.js b/plugins/file-highlight/prism-file-highlight.js index f3bc6ccf7b..47f2278603 100644 --- a/plugins/file-highlight/prism-file-highlight.js +++ b/plugins/file-highlight/prism-file-highlight.js @@ -79,22 +79,6 @@ xhr.send(null); }); - - if (Prism.plugins.toolbar) { - Prism.plugins.toolbar.registerButton('download-file', function (env) { - var pre = env.element.parentNode; - if (!pre || !/pre/i.test(pre.nodeName) || !pre.hasAttribute('data-src') || !pre.hasAttribute('data-download-link')) { - return; - } - var src = pre.getAttribute('data-src'); - var a = document.createElement('a'); - a.textContent = pre.getAttribute('data-download-link-label') || 'Download'; - a.setAttribute('download', ''); - a.href = src; - return a; - }); - } - }; document.addEventListener('DOMContentLoaded', function () { diff --git a/plugins/file-highlight/prism-file-highlight.min.js b/plugins/file-highlight/prism-file-highlight.min.js index f212f9da97..fae37e1575 100644 --- a/plugins/file-highlight/prism-file-highlight.min.js +++ b/plugins/file-highlight/prism-file-highlight.min.js @@ -1 +1 @@ -"undefined"!=typeof self&&self.Prism&&self.document&&document.querySelector&&(self.Prism.fileHighlight=function(t){t=t||document;var i={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"};Array.prototype.slice.call(t.querySelectorAll("pre[data-src]")).forEach(function(t){if(!t.hasAttribute("data-src-loaded")){for(var e,a=t.getAttribute("data-src"),n=t,r=/\blang(?:uage)?-([\w-]+)\b/i;n&&!r.test(n.className);)n=n.parentNode;if(n&&(e=(t.className.match(r)||[,""])[1]),!e){var s=(a.match(/\.(\w+)$/)||[,""])[1];e=i[s]||s}var o=document.createElement("code");o.className="language-"+e,t.textContent="",o.textContent="Loading…",t.appendChild(o);var l=new XMLHttpRequest;l.open("GET",a,!0),l.onreadystatechange=function(){4==l.readyState&&(l.status<400&&l.responseText?(o.textContent=l.responseText,Prism.highlightElement(o),t.setAttribute("data-src-loaded","")):400<=l.status?o.textContent="✖ Error "+l.status+" while fetching file: "+l.statusText:o.textContent="✖ Error: File does not exist or is empty")},l.send(null)}}),Prism.plugins.toolbar&&Prism.plugins.toolbar.registerButton("download-file",function(t){var e=t.element.parentNode;if(e&&/pre/i.test(e.nodeName)&&e.hasAttribute("data-src")&&e.hasAttribute("data-download-link")){var a=e.getAttribute("data-src"),n=document.createElement("a");return n.textContent=e.getAttribute("data-download-link-label")||"Download",n.setAttribute("download",""),n.href=a,n}})},document.addEventListener("DOMContentLoaded",function(){self.Prism.fileHighlight()})); \ No newline at end of file +"undefined"!=typeof self&&self.Prism&&self.document&&document.querySelector&&(self.Prism.fileHighlight=function(e){e=e||document;var i={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"};Array.prototype.slice.call(e.querySelectorAll("pre[data-src]")).forEach(function(e){if(!e.hasAttribute("data-src-loaded")){for(var t,a=e.getAttribute("data-src"),s=e,n=/\blang(?:uage)?-([\w-]+)\b/i;s&&!n.test(s.className);)s=s.parentNode;if(s&&(t=(e.className.match(n)||[,""])[1]),!t){var r=(a.match(/\.(\w+)$/)||[,""])[1];t=i[r]||r}var o=document.createElement("code");o.className="language-"+t,e.textContent="",o.textContent="Loading…",e.appendChild(o);var l=new XMLHttpRequest;l.open("GET",a,!0),l.onreadystatechange=function(){4==l.readyState&&(l.status<400&&l.responseText?(o.textContent=l.responseText,Prism.highlightElement(o),e.setAttribute("data-src-loaded","")):400<=l.status?o.textContent="✖ Error "+l.status+" while fetching file: "+l.statusText:o.textContent="✖ Error: File does not exist or is empty")},l.send(null)}})},document.addEventListener("DOMContentLoaded",function(){self.Prism.fileHighlight()})); \ No newline at end of file diff --git a/prism.js b/prism.js index 6a77215d44..2a60ab6f12 100644 --- a/prism.js +++ b/prism.js @@ -962,22 +962,6 @@ Prism.languages.js = Prism.languages.javascript; xhr.send(null); }); - - if (Prism.plugins.toolbar) { - Prism.plugins.toolbar.registerButton('download-file', function (env) { - var pre = env.element.parentNode; - if (!pre || !/pre/i.test(pre.nodeName) || !pre.hasAttribute('data-src') || !pre.hasAttribute('data-download-link')) { - return; - } - var src = pre.getAttribute('data-src'); - var a = document.createElement('a'); - a.textContent = pre.getAttribute('data-download-link-label') || 'Download'; - a.setAttribute('download', ''); - a.href = src; - return a; - }); - } - }; document.addEventListener('DOMContentLoaded', function () { From 8a572af56701b7d691799269710159c22f679891 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Tue, 3 Sep 2019 17:43:51 +0200 Subject: [PATCH 0355/1100] Website: FAQ update (#1977) This removes the little script to show all tokens of a language and replaces it with a little UI to do the task on the Prism website. --- faq.html | 139 ++++++++++++++++++++++++++++++++++++++----------------- 1 file changed, 96 insertions(+), 43 deletions(-) diff --git a/faq.html b/faq.html index 1e8d0f513e..d8b70e2716 100644 --- a/faq.html +++ b/faq.html @@ -55,7 +55,7 @@

    Isn’t it bad to do syntax highlighting with regular expressions?

    For this reason, most syntax highlighters on the web and on desktop, are powered by regular expressions. This includes the internal syntax highlighters used by popular native applications like Espresso and Sublime Text, at the time of writing. Of course, not every regex-powered syntax highlighter is created equal. The number and type of failures can be vastly different, depending on - the exact algorithm used. Prism’s known failures are documented in the Examples section.

    + the exact algorithm used. Prism’s known failures are documented on this page..

    @@ -89,48 +89,12 @@

    If pre-existing HTML is stripped off, how can I highlight certain parts of t

    How do I know which tokens I can style for every language?

    -

    Every token that is highlighted gets two classes: token and a class with the token type (e.g. comment). - You can find the different types of tokens either by looking at the keys of the object defining the language or by running this snippet in the console: -

    function printTokens(o, prefix) { for (var i in o) { console.log((prefix? prefix + ' > ' : '') + i); if (o[i].inside) printTokens(o[i].inside, (prefix? prefix + ' > ' : '') + i); } };
    -

    Then you can use the function for every language you want to examine. For example, markup:

    -
    printTokens(Prism.languages.markup);
    -

    which outputs:

    -
    comment
    -prolog
    -doctype
    -script
    -script > tag
    -script > tag > tag
    -script > tag > tag > punctuation
    -script > tag > tag > namespace
    -script > tag > attr-value
    -script > tag > attr-value > punctuation
    -script > tag > punctuation
    -script > tag > attr-name
    -script > tag > attr-name > namespace
    -script > rest
    -style
    -style > tag
    -style > tag > tag
    -style > tag > tag > punctuation
    -style > tag > tag > namespace
    -style > tag > attr-value
    -style > tag > attr-value > punctuation
    -style > tag > punctuation
    -style > tag > attr-name
    -style > tag > attr-name > namespace
    -style > rest
    -cdata
    -tag
    -tag > tag
    -tag > tag > punctuation
    -tag > tag > namespace
    -tag > attr-value
    -tag > attr-value > punctuation
    -tag > punctuation
    -tag > attr-name
    -tag > attr-name > namespace
    -entity
    +

    Every token that is highlighted gets at least two classes: token and a class with the token type (e.g. comment) plus any number of aliases. + Aliases can be seen as additional token types and are used to give specialized tokens a more common class for easier styling. + You can find the different types of tokens either by looking at the keys of the object defining the language or by using the below interface.

    + +

    Language:

    +
    @@ -161,8 +125,13 @@

    How can I use different highlighting for tokens with the same name in differ + + From 010a0157b8976ec544b4931f09dd06c1daa89c45 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Tue, 3 Sep 2019 17:45:53 +0200 Subject: [PATCH 0356/1100] D: Fixed strings (#2029) * Fixed D strings * Rebuilt --- components/prism-d.js | 83 ++++++++++++--------- components/prism-d.min.js | 2 +- tests/languages/d/comment_feature.test | 8 +- tests/languages/d/issue2027.test | 47 ++++++++++++ tests/languages/d/string_feature.test | 34 +++++++-- tests/languages/d/token-string_feature.test | 13 ---- 6 files changed, 130 insertions(+), 57 deletions(-) create mode 100644 tests/languages/d/issue2027.test delete mode 100644 tests/languages/d/token-string_feature.test diff --git a/components/prism-d.js b/components/prism-d.js index 7f85fa8f4c..898a1e296e 100644 --- a/components/prism-d.js +++ b/components/prism-d.js @@ -1,19 +1,54 @@ Prism.languages.d = Prism.languages.extend('clike', { + 'comment': [ + { + // Shebang + pattern: /^\s*#!.+/, + greedy: true + }, + { + pattern: RegExp(/(^|[^\\])/.source + '(?:' + [ + // /+ comment +/ + // Allow one level of nesting + /\/\+(?:\/\+[\s\S]*?\+\/|(?!\/\+)[\s\S])*?\+\//.source, + // // comment + /\/\/.*/.source, + // /* comment */ + /\/\*[\s\S]*?\*\//.source + ].join('|') + ')'), + lookbehind: true, + greedy: true + } + ], 'string': [ - // r"", x"" - /\b[rx]"(?:\\[\s\S]|[^\\"])*"[cwd]?/, - // q"[]", q"()", q"<>", q"{}" - /\bq"(?:\[[\s\S]*?\]|\([\s\S]*?\)|<[\s\S]*?>|\{[\s\S]*?\})"/, - // q"IDENT - // ... - // IDENT" - /\bq"([_a-zA-Z][_a-zA-Z\d]*)(?:\r?\n|\r)[\s\S]*?(?:\r?\n|\r)\1"/, - // q"//", q"||", etc. - /\bq"(.)[\s\S]*?\1"/, - // Characters - /'(?:\\'|\\?[^']+)'/, + { + pattern: RegExp([ + // r"", x"" + /\b[rx]"(?:\\[\s\S]|[^\\"])*"[cwd]?/.source, + + // q"[]", q"()", q"<>", q"{}" + /\bq"(?:\[[\s\S]*?\]|\([\s\S]*?\)|<[\s\S]*?>|\{[\s\S]*?\})"/.source, + + // q"IDENT + // ... + // IDENT" + /\bq"((?!\d)\w+)$[\s\S]*?^\1"/.source, + + // q"//", q"||", etc. + /\bq"(.)[\s\S]*?\2"/.source, + + // Characters + // 'a', '\\', '\n', '\xFF', '\377', '\uFFFF', '\U0010FFFF', '\quot' + /'(?:\\(?:\W|\w+)|[^\\])'/.source, - /(["`])(?:\\[\s\S]|(?!\1)[^\\])*\1[cwd]?/ + /(["`])(?:\\[\s\S]|(?!\3)[^\\])*\3[cwd]?/.source + ].join('|'), 'm'), + greedy: true + }, + { + pattern: /\bq\{(?:\{[^{}]*\}|[^{}])*\}/, + greedy: true, + alias: 'token-string' + } ], 'number': [ @@ -31,26 +66,6 @@ Prism.languages.d = Prism.languages.extend('clike', { 'operator': /\|[|=]?|&[&=]?|\+[+=]?|-[-=]?|\.?\.\.|=[>=]?|!(?:i[ns]\b|<>?=?|>=?|=)?|\bi[ns]\b|(?:<[<>]?|>>?>?|\^\^|[*\/%^~])=?/ }); - -Prism.languages.d.comment = [ - // Shebang - /^\s*#!.+/, - // /+ +/ - { - // Allow one level of nesting - pattern: /(^|[^\\])\/\+(?:\/\+[\s\S]*?\+\/|[\s\S])*?\+\//, - lookbehind: true - } -].concat(Prism.languages.d.comment); - -Prism.languages.insertBefore('d', 'comment', { - 'token-string': { - // Allow one level of nesting - pattern: /\bq\{(?:\{[^}]*\}|[^}])*\}/, - alias: 'string' - } -}); - Prism.languages.insertBefore('d', 'keyword', { 'property': /\B@\w*/ }); @@ -61,4 +76,4 @@ Prism.languages.insertBefore('d', 'function', { pattern: /\b(?:[ABCD][LHX]|E[ABCD]X|E?(?:BP|SP|DI|SI)|[ECSDGF]S|CR[0234]|DR[012367]|TR[3-7]|X?MM[0-7]|R[ABCD]X|[BS]PL|R[BS]P|[DS]IL|R[DS]I|R(?:[89]|1[0-5])[BWD]?|XMM(?:[89]|1[0-5])|YMM(?:1[0-5]|\d))\b|\bST(?:\([0-7]\)|\b)/, alias: 'variable' } -}); \ No newline at end of file +}); diff --git a/components/prism-d.min.js b/components/prism-d.min.js index 2927f38ec5..782340f502 100644 --- a/components/prism-d.min.js +++ b/components/prism-d.min.js @@ -1 +1 @@ -Prism.languages.d=Prism.languages.extend("clike",{string:[/\b[rx]"(?:\\[\s\S]|[^\\"])*"[cwd]?/,/\bq"(?:\[[\s\S]*?\]|\([\s\S]*?\)|<[\s\S]*?>|\{[\s\S]*?\})"/,/\bq"([_a-zA-Z][_a-zA-Z\d]*)(?:\r?\n|\r)[\s\S]*?(?:\r?\n|\r)\1"/,/\bq"(.)[\s\S]*?\1"/,/'(?:\\'|\\?[^']+)'/,/(["`])(?:\\[\s\S]|(?!\1)[^\\])*\1[cwd]?/],number:[/\b0x\.?[a-f\d_]+(?:(?!\.\.)\.[a-f\d_]*)?(?:p[+-]?[a-f\d_]+)?[ulfi]*/i,{pattern:/((?:\.\.)?)(?:\b0b\.?|\b|\.)\d[\d_]*(?:(?!\.\.)\.[\d_]*)?(?:e[+-]?\d[\d_]*)?[ulfi]*/i,lookbehind:!0}],keyword:/\$|\b(?:abstract|alias|align|asm|assert|auto|body|bool|break|byte|case|cast|catch|cdouble|cent|cfloat|char|class|const|continue|creal|dchar|debug|default|delegate|delete|deprecated|do|double|else|enum|export|extern|false|final|finally|float|for|foreach|foreach_reverse|function|goto|idouble|if|ifloat|immutable|import|inout|int|interface|invariant|ireal|lazy|long|macro|mixin|module|new|nothrow|null|out|override|package|pragma|private|protected|public|pure|real|ref|return|scope|shared|short|static|struct|super|switch|synchronized|template|this|throw|true|try|typedef|typeid|typeof|ubyte|ucent|uint|ulong|union|unittest|ushort|version|void|volatile|wchar|while|with|__(?:(?:FILE|MODULE|LINE|FUNCTION|PRETTY_FUNCTION|DATE|EOF|TIME|TIMESTAMP|VENDOR|VERSION)__|gshared|traits|vector|parameters)|string|wstring|dstring|size_t|ptrdiff_t)\b/,operator:/\|[|=]?|&[&=]?|\+[+=]?|-[-=]?|\.?\.\.|=[>=]?|!(?:i[ns]\b|<>?=?|>=?|=)?|\bi[ns]\b|(?:<[<>]?|>>?>?|\^\^|[*\/%^~])=?/}),Prism.languages.d.comment=[/^\s*#!.+/,{pattern:/(^|[^\\])\/\+(?:\/\+[\s\S]*?\+\/|[\s\S])*?\+\//,lookbehind:!0}].concat(Prism.languages.d.comment),Prism.languages.insertBefore("d","comment",{"token-string":{pattern:/\bq\{(?:\{[^}]*\}|[^}])*\}/,alias:"string"}}),Prism.languages.insertBefore("d","keyword",{property:/\B@\w*/}),Prism.languages.insertBefore("d","function",{register:{pattern:/\b(?:[ABCD][LHX]|E[ABCD]X|E?(?:BP|SP|DI|SI)|[ECSDGF]S|CR[0234]|DR[012367]|TR[3-7]|X?MM[0-7]|R[ABCD]X|[BS]PL|R[BS]P|[DS]IL|R[DS]I|R(?:[89]|1[0-5])[BWD]?|XMM(?:[89]|1[0-5])|YMM(?:1[0-5]|\d))\b|\bST(?:\([0-7]\)|\b)/,alias:"variable"}}); \ No newline at end of file +Prism.languages.d=Prism.languages.extend("clike",{comment:[{pattern:/^\s*#!.+/,greedy:!0},{pattern:RegExp("(^|[^\\\\])(?:"+["\\/\\+(?:\\/\\+[\\s\\S]*?\\+\\/|(?!\\/\\+)[\\s\\S])*?\\+\\/","\\/\\/.*","\\/\\*[\\s\\S]*?\\*\\/"].join("|")+")"),lookbehind:!0,greedy:!0}],string:[{pattern:RegExp(['\\b[rx]"(?:\\\\[\\s\\S]|[^\\\\"])*"[cwd]?','\\bq"(?:\\[[\\s\\S]*?\\]|\\([\\s\\S]*?\\)|<[\\s\\S]*?>|\\{[\\s\\S]*?\\})"','\\bq"((?!\\d)\\w+)$[\\s\\S]*?^\\1"','\\bq"(.)[\\s\\S]*?\\2"',"'(?:\\\\(?:\\W|\\w+)|[^\\\\])'",'(["`])(?:\\\\[\\s\\S]|(?!\\3)[^\\\\])*\\3[cwd]?'].join("|"),"m"),greedy:!0},{pattern:/\bq\{(?:\{[^{}]*\}|[^{}])*\}/,greedy:!0,alias:"token-string"}],number:[/\b0x\.?[a-f\d_]+(?:(?!\.\.)\.[a-f\d_]*)?(?:p[+-]?[a-f\d_]+)?[ulfi]*/i,{pattern:/((?:\.\.)?)(?:\b0b\.?|\b|\.)\d[\d_]*(?:(?!\.\.)\.[\d_]*)?(?:e[+-]?\d[\d_]*)?[ulfi]*/i,lookbehind:!0}],keyword:/\$|\b(?:abstract|alias|align|asm|assert|auto|body|bool|break|byte|case|cast|catch|cdouble|cent|cfloat|char|class|const|continue|creal|dchar|debug|default|delegate|delete|deprecated|do|double|else|enum|export|extern|false|final|finally|float|for|foreach|foreach_reverse|function|goto|idouble|if|ifloat|immutable|import|inout|int|interface|invariant|ireal|lazy|long|macro|mixin|module|new|nothrow|null|out|override|package|pragma|private|protected|public|pure|real|ref|return|scope|shared|short|static|struct|super|switch|synchronized|template|this|throw|true|try|typedef|typeid|typeof|ubyte|ucent|uint|ulong|union|unittest|ushort|version|void|volatile|wchar|while|with|__(?:(?:FILE|MODULE|LINE|FUNCTION|PRETTY_FUNCTION|DATE|EOF|TIME|TIMESTAMP|VENDOR|VERSION)__|gshared|traits|vector|parameters)|string|wstring|dstring|size_t|ptrdiff_t)\b/,operator:/\|[|=]?|&[&=]?|\+[+=]?|-[-=]?|\.?\.\.|=[>=]?|!(?:i[ns]\b|<>?=?|>=?|=)?|\bi[ns]\b|(?:<[<>]?|>>?>?|\^\^|[*\/%^~])=?/}),Prism.languages.insertBefore("d","keyword",{property:/\B@\w*/}),Prism.languages.insertBefore("d","function",{register:{pattern:/\b(?:[ABCD][LHX]|E[ABCD]X|E?(?:BP|SP|DI|SI)|[ECSDGF]S|CR[0234]|DR[012367]|TR[3-7]|X?MM[0-7]|R[ABCD]X|[BS]PL|R[BS]P|[DS]IL|R[DS]I|R(?:[89]|1[0-5])[BWD]?|XMM(?:[89]|1[0-5])|YMM(?:1[0-5]|\d))\b|\bST(?:\([0-7]\)|\b)/,alias:"variable"}}); \ No newline at end of file diff --git a/tests/languages/d/comment_feature.test b/tests/languages/d/comment_feature.test index ed1f86036b..06e3074ea6 100644 --- a/tests/languages/d/comment_feature.test +++ b/tests/languages/d/comment_feature.test @@ -9,6 +9,9 @@ bar +/ baz +/ // This q{is} a comment // This /* is a */ comment +/* +comment +*/ ---------------------------------------------------- @@ -18,10 +21,11 @@ baz +/ ["comment", "/+ foo\r\nbar +/"], ["comment", "/+ foo\r\n\t/+\r\n\tbar +/\r\nbaz +/"], ["comment", "// This q{is} a comment"], - ["comment", "// This /* is a */ comment"] + ["comment", "// This /* is a */ comment"], + ["comment", "/*\r\ncomment\r\n*/"] ] ---------------------------------------------------- Checks for shebang and nestable multi-line comments. -Other comments are tested in clike. \ No newline at end of file +Other comments are tested in clike. diff --git a/tests/languages/d/issue2027.test b/tests/languages/d/issue2027.test new file mode 100644 index 0000000000..4f3cc7448a --- /dev/null +++ b/tests/languages/d/issue2027.test @@ -0,0 +1,47 @@ +string foo = "It's"; +foo = "It's"; +foo = "It's"; + +string bar = `It's`; +bar = `It's`; +bar = `It's`; +bar = `It's`; + +---------------------------------------------------- + +[ + ["keyword", "string"], + " foo ", + ["operator", "="], + ["string", "\"It's\""], + ["punctuation", ";"], + "\r\nfoo ", + ["operator", "="], + ["string", "\"It's\""], + ["punctuation", ";"], + "\r\nfoo ", + ["operator", "="], + ["string", "\"It's\""], + ["punctuation", ";"], + ["keyword", "string"], + " bar ", + ["operator", "="], + ["string", "`It's`"], + ["punctuation", ";"], + "\r\nbar ", + ["operator", "="], + ["string", "`It's`"], + ["punctuation", ";"], + "\r\nbar ", + ["operator", "="], + ["string", "`It's`"], + ["punctuation", ";"], + "\r\nbar ", + ["operator", "="], + ["string", "`It's`"], + ["punctuation", ";"] +] + +---------------------------------------------------- + +Checks for issue #2027 which was about strings not being matched correctly. diff --git a/tests/languages/d/string_feature.test b/tests/languages/d/string_feature.test index fc501b11d4..ad01114554 100644 --- a/tests/languages/d/string_feature.test +++ b/tests/languages/d/string_feature.test @@ -19,7 +19,7 @@ bar/" q"|fo"o bar|" -'a' '\'' '\u000A' +'a' '\'' '\\' '\n' '\xFF' '\377' '\uFFFF' '\U0010FFFF' '\quot' "" "foo"c "bar"w "baz"d @@ -27,11 +27,18 @@ bar|" bar" `foo` +q{foo} +q{ q{bar} } + ---------------------------------------------------- [ - ["string", "r\"\""], ["string", "x\"\""], - ["string", "r\"fo\\\"o\"c"], ["string", "x\"00 FBCD\"w"], ["string", "r\"baz\"d"], + ["string", "r\"\""], + ["string", "x\"\""], + + ["string", "r\"fo\\\"o\"c"], + ["string", "x\"00 FBCD\"w"], + ["string", "r\"baz\"d"], ["string", "q\"[fo\"o\r\nbar]\""], ["string", "q\"(fo\"o\r\nbar)\""], @@ -43,14 +50,27 @@ bar" ["string", "q\"/fo\"o\r\nbar/\""], ["string", "q\"|fo\"o\r\nbar|\""], - ["string", "'a'"], ["string", "'\\''"], ["string", "'\\u000A'"], + ["string", "'a'"], + ["string", "'\\''"], + ["string", "'\\\\'"], + ["string", "'\\n'"], + ["string", "'\\xFF'"], + ["string", "'\\377'"], + ["string", "'\\uFFFF'"], + ["string", "'\\U0010FFFF'"], + ["string", "'\\quot'"], ["string", "\"\""], - ["string", "\"foo\"c"], ["string", "\"bar\"w"], ["string", "\"baz\"d"], + ["string", "\"foo\"c"], + ["string", "\"bar\"w"], + ["string", "\"baz\"d"], ["string", "\"fo\\\"o\r\nbar\""], - ["string", "`foo`"] + ["string", "`foo`"], + + ["string", "q{foo}"], + ["string", "q{ q{bar} }"] ] ---------------------------------------------------- -Checks for strings. \ No newline at end of file +Checks for strings and token strings. diff --git a/tests/languages/d/token-string_feature.test b/tests/languages/d/token-string_feature.test deleted file mode 100644 index 01627c4a85..0000000000 --- a/tests/languages/d/token-string_feature.test +++ /dev/null @@ -1,13 +0,0 @@ -q{foo} -q{ q{bar} } - ----------------------------------------------------- - -[ - ["token-string", "q{foo}"], - ["token-string", "q{ q{bar} }"] -] - ----------------------------------------------------- - -Checks for token strings. \ No newline at end of file From 8403e4537b2fdc23435b7235ad082df1f6e6c6e4 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Tue, 3 Sep 2019 19:06:15 +0200 Subject: [PATCH 0357/1100] Added Inline color plugin (#2007) This adds a new plugin to display an inline preview of CSS colors as most IDEs do. --- components.js | 2 +- components.json | 9 + components/prism-css-extras.js | 160 ++++++++++-------- components/prism-css-extras.min.js | 2 +- plugins/inline-color/index.html | 79 +++++++++ plugins/inline-color/prism-inline-color.css | 9 + plugins/inline-color/prism-inline-color.js | 88 ++++++++++ .../inline-color/prism-inline-color.min.js | 1 + plugins/previewers/index.html | 1 + plugins/previewers/prism-previewers.js | 13 +- plugins/previewers/prism-previewers.min.js | 2 +- .../css!+css-extras/variable_feature.test | 4 +- 12 files changed, 288 insertions(+), 82 deletions(-) create mode 100644 plugins/inline-color/index.html create mode 100644 plugins/inline-color/prism-inline-color.css create mode 100644 plugins/inline-color/prism-inline-color.js create mode 100644 plugins/inline-color/prism-inline-color.min.js diff --git a/components.js b/components.js index 8d4877692f..34fd5d980e 100644 --- a/components.js +++ b/components.js @@ -1,2 +1,2 @@ -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default","peerDependencies":"markup"},"clike":{"title":"C-like","option":"default","overrideExampleHeader":true},"javascript":{"title":"JavaScript","require":"clike","peerDependencies":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"Augmented Backus–Naur form","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","peerDependencies":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"Backus–Naur form","alias":"rbnf","aliasTitles":{"rbnf":"Routing Backus–Naur form"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"Extended Backus–Naur form","owner":"RunDevelopment"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment"},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","peerDependencies":["css","coffeescript","erb","javascript","less","markdown","ruby","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"http":{"title":"HTTP","peerDependencies":["javascript","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"peerDependencies":["scala"],"owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","peerDependencies":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike"],"peerDependencies":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","peerDependencies":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"js-templates":{"title":"JS Templates","require":"javascript","peerDependencies":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"json":{"title":"JSON","owner":"CupOfTea696"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"less":{"title":"Less","require":"css","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","peerDependencies":["jsdoc"],"alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"nasm":{"title":"NASM","owner":"rbmj"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"cpp","peerDependencies":["c","cpp"],"overrideExampleHeader":true,"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"peerDependencies":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","peerDependencies":["c","cpp","fortran"],"owner":"Golmote"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"peerDependencies":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","peerDependencies":["actionscript","coffeescript","flow","javascript","typescript","vala"],"owner":"RunDevelopment"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robot-framework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","require":"sql","owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"solidity":{"title":"Solidity (Ethereum)","require":"clike","owner":"glachaud"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","peerDependencies":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"turtle":{"title":"Turtle","alias":["trig"],"aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","peerDependencies":"js-templates","alias":"ts","owner":"vkbansal"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","visual-basic"],"owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":"Line Highlight","line-numbers":{"title":"Line Numbers","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","after":["autolinker","data-uri-highlight"]},"autolinker":"Autolinker","wpd":"WebPlatform Docs","custom-class":{"title":"Custom Class","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","noCSS":true},"show-language":{"title":"Show Language","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","owner":"Golmote","noCSS":true},"previewers":{"title":"Previewers","owner":"Golmote"},"autoloader":{"title":"Autoloader","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","owner":"Golmote","after":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","owner":"chriswells0"},"unescaped-markup":"Unescaped Markup","normalize-whitespace":{"title":"Normalize Whitespace","owner":"zeitgeist87","after":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","owner":"Golmote","require":"toolbar","noCSS":true},"diff-highlight":{"title":"Diff Highlight","owner":"RunDevelopment","require":"diff"}}}; +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default","peerDependencies":"markup"},"clike":{"title":"C-like","option":"default","overrideExampleHeader":true},"javascript":{"title":"JavaScript","require":"clike","peerDependencies":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"Augmented Backus–Naur form","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","peerDependencies":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"Backus–Naur form","alias":"rbnf","aliasTitles":{"rbnf":"Routing Backus–Naur form"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"Extended Backus–Naur form","owner":"RunDevelopment"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment"},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","peerDependencies":["css","css-extras","coffeescript","erb","javascript","less","markdown","ruby","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"http":{"title":"HTTP","peerDependencies":["javascript","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"peerDependencies":["scala"],"owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","peerDependencies":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike"],"peerDependencies":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","peerDependencies":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"js-templates":{"title":"JS Templates","require":"javascript","peerDependencies":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"json":{"title":"JSON","owner":"CupOfTea696"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"less":{"title":"Less","require":"css","peerDependencies":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","peerDependencies":["jsdoc"],"alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"nasm":{"title":"NASM","owner":"rbmj"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"cpp","peerDependencies":["c","cpp"],"overrideExampleHeader":true,"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"peerDependencies":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","peerDependencies":["c","cpp","fortran"],"owner":"Golmote"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"peerDependencies":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","peerDependencies":["actionscript","coffeescript","flow","javascript","typescript","vala"],"owner":"RunDevelopment"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robot-framework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","require":"sql","owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","peerDependencies":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"solidity":{"title":"Solidity (Ethereum)","require":"clike","owner":"glachaud"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","peerDependencies":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"turtle":{"title":"Turtle","alias":["trig"],"aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","peerDependencies":"js-templates","alias":"ts","owner":"vkbansal"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","visual-basic"],"owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":"Line Highlight","line-numbers":{"title":"Line Numbers","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","after":["autolinker","data-uri-highlight"]},"autolinker":"Autolinker","wpd":"WebPlatform Docs","custom-class":{"title":"Custom Class","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","noCSS":true},"show-language":{"title":"Show Language","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","owner":"Golmote","after":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","owner":"chriswells0"},"unescaped-markup":"Unescaped Markup","normalize-whitespace":{"title":"Normalize Whitespace","owner":"zeitgeist87","after":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","owner":"Golmote","require":"toolbar","noCSS":true},"diff-highlight":{"title":"Diff Highlight","owner":"RunDevelopment","require":"diff"}}}; if (typeof module !== 'undefined' && module.exports) { module.exports = components; } \ No newline at end of file diff --git a/components.json b/components.json index 942d7221e4..ee5575ac0c 100644 --- a/components.json +++ b/components.json @@ -353,6 +353,7 @@ "require": "ruby", "peerDependencies": [ "css", + "css-extras", "coffeescript", "erb", "javascript", @@ -530,6 +531,7 @@ "less": { "title": "Less", "require": "css", + "peerDependencies": "css-extras", "owner": "Golmote" }, "lilypond": { @@ -845,6 +847,7 @@ "scss": { "title": "Sass (Scss)", "require": "css", + "peerDependencies": "css-extras", "owner": "MoOx" }, "scala": { @@ -1074,8 +1077,14 @@ "owner": "Golmote", "noCSS": true }, + "inline-color": { + "title": "Inline color", + "require": "css-extras", + "owner": "RunDevelopment" + }, "previewers": { "title": "Previewers", + "require": "css-extras", "owner": "Golmote" }, "autoloader": { diff --git a/components/prism-css-extras.js b/components/prism-css-extras.js index 85d280cb3d..3eced0f8ed 100644 --- a/components/prism-css-extras.js +++ b/components/prism-css-extras.js @@ -1,80 +1,104 @@ -Prism.languages.css.selector = { - pattern: Prism.languages.css.selector, - inside: { - 'pseudo-element': /:(?:after|before|first-letter|first-line|selection)|::[-\w]+/, - 'pseudo-class': /:[-\w]+/, - 'class': /\.[-:.\w]+/, - 'id': /#[-:.\w]+/, - 'attribute': { - pattern: /\[(?:[^[\]"']|("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1)*\]/, - greedy: true, - inside: { - 'punctuation': /^\[|\]$/, - 'case-sensitivity': { - pattern: /(\s)[si]$/i, - lookbehind: true, - alias: 'keyword' - }, - 'namespace': { - pattern: /^(\s*)[-*\w\xA0-\uFFFF]*\|(?!=)/, +(function (Prism) { + + Prism.languages.css.selector = { + pattern: Prism.languages.css.selector, + inside: { + 'pseudo-element': /:(?:after|before|first-letter|first-line|selection)|::[-\w]+/, + 'pseudo-class': /:[-\w]+/, + 'class': /\.[-:.\w]+/, + 'id': /#[-:.\w]+/, + 'attribute': { + pattern: /\[(?:[^[\]"']|("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1)*\]/, + greedy: true, + inside: { + 'punctuation': /^\[|\]$/, + 'case-sensitivity': { + pattern: /(\s)[si]$/i, + lookbehind: true, + alias: 'keyword' + }, + 'namespace': { + pattern: /^(\s*)[-*\w\xA0-\uFFFF]*\|(?!=)/, + lookbehind: true, + inside: { + 'punctuation': /\|$/ + } + }, + 'attribute': { + pattern: /^(\s*)[-\w\xA0-\uFFFF]+/, + lookbehind: true + }, + 'value': [ + /("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/, + { + pattern: /(=\s*)[-\w\xA0-\uFFFF]+(?=\s*$)/, + lookbehind: true + } + ], + 'operator': /[|~*^$]?=/ + } + }, + 'n-th': [ + { + pattern: /(\(\s*)[+-]?\d*[\dn](?:\s*[+-]\s*\d+)?(?=\s*\))/, lookbehind: true, inside: { - 'punctuation': /\|$/ + 'number': /[\dn]+/, + 'operator': /[+-]/ } }, - 'attribute': { - pattern: /^(\s*)[-\w\xA0-\uFFFF]+/, + { + pattern: /(\(\s*)(?:even|odd)(?=\s*\))/i, lookbehind: true - }, - 'value': [ - /("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/, - { - pattern: /(=\s*)[-\w\xA0-\uFFFF]+(?=\s*$)/, - lookbehind: true - } - ], - 'operator': /[|~*^$]?=/ - } - }, - 'n-th': [ - { - pattern: /(\(\s*)[+-]?\d*[\dn](?:\s*[+-]\s*\d+)?(?=\s*\))/, - lookbehind: true, - inside: { - 'number': /[\dn]+/, - 'operator': /[+-]/ } - }, - { - pattern: /(\(\s*)(?:even|odd)(?=\s*\))/i, - lookbehind: true - } - ], - 'punctuation': /[()]/ - } -}; + ], + 'punctuation': /[()]/ + } + }; -Prism.languages.insertBefore('css', 'property', { - 'variable': { - pattern: /(^|[^-\w\xA0-\uFFFF])--[-_a-z\xA0-\uFFFF][-\w\xA0-\uFFFF]*/i, - lookbehind: true - } -}); + Prism.languages.insertBefore('css', 'property', { + 'variable': { + pattern: /(^|[^-\w\xA0-\uFFFF])--[-_a-z\xA0-\uFFFF][-\w\xA0-\uFFFF]*/i, + lookbehind: true + } + }); -Prism.languages.insertBefore('css', 'function', { - 'operator': { - pattern: /(\s)[+\-*\/](?=\s)/, - lookbehind: true - }, - 'hexcode': /#[\da-f]{3,8}/i, - 'entity': /\\[\da-f]{1,8}/i, - 'unit': { + var unit = { pattern: /(\d)(?:%|[a-z]+)/, lookbehind: true - }, - 'number': { - // 123 -123 .123 -.123 12.3 -12.3 + }; + // 123 -123 .123 -.123 12.3 -12.3 + var number = { pattern: /(^|[^\w.-])-?\d*\.?\d+/, lookbehind: true - } -}); + }; + + Prism.languages.insertBefore('css', 'function', { + 'operator': { + pattern: /(\s)[+\-*\/](?=\s)/, + lookbehind: true + }, + // CAREFUL! + // Previewers and Inline color use hexcode and color. + 'hexcode': { + pattern: /\B#(?:[\da-f]{1,2}){3,4}\b/i, + alias: 'color' + }, + 'color': [ + /\b(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)\b/i, + { + pattern: /\b(?:rgb|hsl)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:rgb|hsl)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i, + inside: { + 'unit': unit, + 'number': number, + 'function': /[\w-]+(?=\()/, + 'punctuation': /[(),]/ + } + } + ], + 'entity': /\\[\da-f]{1,8}/i, + 'unit': unit, + 'number': number + }); + +})(Prism); diff --git a/components/prism-css-extras.min.js b/components/prism-css-extras.min.js index 079e931f37..97b7604058 100644 --- a/components/prism-css-extras.min.js +++ b/components/prism-css-extras.min.js @@ -1 +1 @@ -Prism.languages.css.selector={pattern:Prism.languages.css.selector,inside:{"pseudo-element":/:(?:after|before|first-letter|first-line|selection)|::[-\w]+/,"pseudo-class":/:[-\w]+/,class:/\.[-:.\w]+/,id:/#[-:.\w]+/,attribute:{pattern:/\[(?:[^[\]"']|("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1)*\]/,greedy:!0,inside:{punctuation:/^\[|\]$/,"case-sensitivity":{pattern:/(\s)[si]$/i,lookbehind:!0,alias:"keyword"},namespace:{pattern:/^(\s*)[-*\w\xA0-\uFFFF]*\|(?!=)/,lookbehind:!0,inside:{punctuation:/\|$/}},attribute:{pattern:/^(\s*)[-\w\xA0-\uFFFF]+/,lookbehind:!0},value:[/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,{pattern:/(=\s*)[-\w\xA0-\uFFFF]+(?=\s*$)/,lookbehind:!0}],operator:/[|~*^$]?=/}},"n-th":[{pattern:/(\(\s*)[+-]?\d*[\dn](?:\s*[+-]\s*\d+)?(?=\s*\))/,lookbehind:!0,inside:{number:/[\dn]+/,operator:/[+-]/}},{pattern:/(\(\s*)(?:even|odd)(?=\s*\))/i,lookbehind:!0}],punctuation:/[()]/}},Prism.languages.insertBefore("css","property",{variable:{pattern:/(^|[^-\w\xA0-\uFFFF])--[-_a-z\xA0-\uFFFF][-\w\xA0-\uFFFF]*/i,lookbehind:!0}}),Prism.languages.insertBefore("css","function",{operator:{pattern:/(\s)[+\-*\/](?=\s)/,lookbehind:!0},hexcode:/#[\da-f]{3,8}/i,entity:/\\[\da-f]{1,8}/i,unit:{pattern:/(\d)(?:%|[a-z]+)/,lookbehind:!0},number:{pattern:/(^|[^\w.-])-?\d*\.?\d+/,lookbehind:!0}}); \ No newline at end of file +!function(e){e.languages.css.selector={pattern:e.languages.css.selector,inside:{"pseudo-element":/:(?:after|before|first-letter|first-line|selection)|::[-\w]+/,"pseudo-class":/:[-\w]+/,class:/\.[-:.\w]+/,id:/#[-:.\w]+/,attribute:{pattern:/\[(?:[^[\]"']|("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1)*\]/,greedy:!0,inside:{punctuation:/^\[|\]$/,"case-sensitivity":{pattern:/(\s)[si]$/i,lookbehind:!0,alias:"keyword"},namespace:{pattern:/^(\s*)[-*\w\xA0-\uFFFF]*\|(?!=)/,lookbehind:!0,inside:{punctuation:/\|$/}},attribute:{pattern:/^(\s*)[-\w\xA0-\uFFFF]+/,lookbehind:!0},value:[/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,{pattern:/(=\s*)[-\w\xA0-\uFFFF]+(?=\s*$)/,lookbehind:!0}],operator:/[|~*^$]?=/}},"n-th":[{pattern:/(\(\s*)[+-]?\d*[\dn](?:\s*[+-]\s*\d+)?(?=\s*\))/,lookbehind:!0,inside:{number:/[\dn]+/,operator:/[+-]/}},{pattern:/(\(\s*)(?:even|odd)(?=\s*\))/i,lookbehind:!0}],punctuation:/[()]/}},e.languages.insertBefore("css","property",{variable:{pattern:/(^|[^-\w\xA0-\uFFFF])--[-_a-z\xA0-\uFFFF][-\w\xA0-\uFFFF]*/i,lookbehind:!0}});var a={pattern:/(\d)(?:%|[a-z]+)/,lookbehind:!0},n={pattern:/(^|[^\w.-])-?\d*\.?\d+/,lookbehind:!0};e.languages.insertBefore("css","function",{operator:{pattern:/(\s)[+\-*\/](?=\s)/,lookbehind:!0},hexcode:{pattern:/\B#(?:[\da-f]{1,2}){3,4}\b/i,alias:"color"},color:[/\b(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)\b/i,{pattern:/\b(?:rgb|hsl)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:rgb|hsl)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,inside:{unit:a,number:n,function:/[\w-]+(?=\()/,punctuation:/[(),]/}}],entity:/\\[\da-f]{1,8}/i,unit:a,number:n})}(Prism); \ No newline at end of file diff --git a/plugins/inline-color/index.html b/plugins/inline-color/index.html new file mode 100644 index 0000000000..1bd47758a0 --- /dev/null +++ b/plugins/inline-color/index.html @@ -0,0 +1,79 @@ + + + + + + +Inline color ▲ Prism plugins + + + + + + + + + + + + + +
    +
    + +

    Inline color

    +

    This plugin adds a small inline preview for colors in style sheets.

    +
    + +
    +

    Examples

    + +

    CSS

    +
    span.foo {
    +	background-color: navy;
    +	color: #BFD;
    +}
    +
    +span.bar {
    +	background: rgba(105, 0, 12, .62);
    +	color: hsl(30, 100%, 50%);
    +}
    + +
    
    +
    +	

    HTML (Markup)

    +
    <!DOCTYPE html>
    +<html lang="en">
    +<head>
    +
    +<meta charset="utf-8" />
    +<title>Example</title>
    +<style>
    +/* Also works here */
    +a.not-a-class {
    +	color: red;
    +}
    +</style>
    +<body style="color: black">
    +
    +</body>
    +</html>
    + +
    +
    + + + + + + + + + + + diff --git a/plugins/inline-color/prism-inline-color.css b/plugins/inline-color/prism-inline-color.css new file mode 100644 index 0000000000..a0d06b5726 --- /dev/null +++ b/plugins/inline-color/prism-inline-color.css @@ -0,0 +1,9 @@ +span.inline-color { + display: inline-block; + height: 1.333ch; + width: 1.333ch; + margin: 0 .333ch; + box-sizing: border-box; + border: 1px solid white; + outline: 1px solid black; +} diff --git a/plugins/inline-color/prism-inline-color.js b/plugins/inline-color/prism-inline-color.js new file mode 100644 index 0000000000..dc64189743 --- /dev/null +++ b/plugins/inline-color/prism-inline-color.js @@ -0,0 +1,88 @@ +(function () { + + if (typeof self === 'undefined' || typeof Prism === 'undefined' || typeof document === 'undefined') { + return; + } + + // Copied from the markup language definition + var HTML_TAG = /<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/g; + + // the regex explained: In first lookahead we check whether the string is valid and then we use the + // capturing groups to split the string into its components. + var HEX_COLOR = /^#?(?=(?:[\da-f]{1,2}){3,4}$)([\da-f][\da-f]?)([\da-f][\da-f]?)([\da-f][\da-f]?)([\da-f][\da-f]?)?$/i; + + /** + * Parses the given hexadecimal representation and returns the parsed RGBA color. + * + * If the format of the given string is invalid, `undefined` will be returned. + * Valid formats are: `RGB`, `RGBA`, `RRGGBB`, and `RRGGBBAA`. + * + * @param {string} hex + * @returns {string | undefined} + */ + function parseHexColor(hex) { + var match = HEX_COLOR.exec(hex); + if (!match) { + return undefined; + } + + // This is used to scale normalize 4bit and 8bit values + var scale = hex.length <= 4 ? 1 / 15 : 1 / 255; + + var rgb = match.slice(1, 4).map(function (c) { + return String(Math.round(parseInt(c, 16) * scale * 255)); + }).join(','); + + var alpha = match[4] === undefined ? '1' : (parseInt(match[4], 16) * scale).toFixed(3); + + return 'rgba(' + rgb + ',' + alpha + ')'; + } + + /** + * Validates the given Color using the current browser's internal implementation. + * + * @param {string} color + * @returns {string | undefined} + */ + function validateColor(color) { + var s = new Option().style; + s.color = color; + return s.color ? color : undefined; + } + + /** + * An array of function which parse a given string representation of a color. + * + * These parser serve as validators and as a layer of compatibility to support color formats which the browser + * might not support natively. + * + * @type {((value: string) => (string|undefined))[]} + */ + var parsers = [ + parseHexColor, + validateColor + ]; + + + Prism.hooks.add('wrap', function (env) { + if (env.type === 'color' || env.type === 'hexcode') { + var content = env.content; + + // remove all HTML tags inside + var rawText = content.split(HTML_TAG).join(''); + + var color; + for (var i = 0, l = parsers.length; i < l && !color; i++) { + color = parsers[i](rawText); + } + + if (!color) { + return; + } + + var previewElement = ''; + env.content = previewElement + content; + } + }); + +}()); diff --git a/plugins/inline-color/prism-inline-color.min.js b/plugins/inline-color/prism-inline-color.min.js new file mode 100644 index 0000000000..1fb9e39c4d --- /dev/null +++ b/plugins/inline-color/prism-inline-color.min.js @@ -0,0 +1 @@ +!function(){if("undefined"!=typeof self&&"undefined"!=typeof Prism&&"undefined"!=typeof document){var i=/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/g,t=/^#?(?=(?:[\da-f]{1,2}){3,4}$)([\da-f][\da-f]?)([\da-f][\da-f]?)([\da-f][\da-f]?)([\da-f][\da-f]?)?$/i,d=[function(n){var e=t.exec(n);if(e){var o=n.length<=4?1/15:1/255;return"rgba("+e.slice(1,4).map(function(n){return String(Math.round(parseInt(n,16)*o*255))}).join(",")+","+(void 0===e[4]?"1":(parseInt(e[4],16)*o).toFixed(3))+")"}},function(n){var e=(new Option).style;return e.color=n,e.color?n:void 0}];Prism.hooks.add("wrap",function(n){if("color"===n.type||"hexcode"===n.type){for(var e,o=n.content,t=o.split(i).join(""),r=0,a=d.length;r';n.content=f+o}})}}(); \ No newline at end of file diff --git a/plugins/previewers/index.html b/plugins/previewers/index.html index d817d689c0..40b2293ef7 100644 --- a/plugins/previewers/index.html +++ b/plugins/previewers/index.html @@ -219,6 +219,7 @@

    new Prism.plugins.Previewer(type, updater,
    + diff --git a/plugins/previewers/prism-previewers.js b/plugins/previewers/prism-previewers.js index 292c3a37a8..188361c281 100644 --- a/plugins/previewers/prism-previewers.js +++ b/plugins/previewers/prism-previewers.js @@ -274,16 +274,11 @@ }); }, tokens: { - 'color': { - pattern: /\B#(?:[0-9a-f]{3}){1,2}\b|\b(?:rgb|hsl)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:rgb|hsl)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B|\b(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGray|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGray|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGray|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gray|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGray|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGray|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGray|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)\b/i, - inside: { - 'function': /[\w-]+(?=\()/, - 'punctuation': /[(),]/ - } - } + 'color': [Prism.languages.css['hexcode']].concat(Prism.languages.css['color']) }, languages: { - 'css': true, + // CSS extras is required, so css and scss are not necessary + 'css': false, 'less': true, 'markup': { lang: 'markup', @@ -304,7 +299,7 @@ root: Prism.languages.sass && Prism.languages.sass['property-line'] } ], - 'scss': true, + 'scss': false, 'stylus': [ { lang: 'stylus', diff --git a/plugins/previewers/prism-previewers.min.js b/plugins/previewers/prism-previewers.min.js index 3b4dbf2c42..cd7e06edd8 100644 --- a/plugins/previewers/prism-previewers.min.js +++ b/plugins/previewers/prism-previewers.min.js @@ -1 +1 @@ -!function(){if(("undefined"==typeof self||self.Prism)&&self.document&&Function.prototype.bind){var r,s,o={gradient:{create:(r={},s=function(e){if(r[e])return r[e];var s=e.match(/^(\b|\B-[a-z]{1,10}-)((?:repeating-)?(?:linear|radial)-gradient)/),i=s&&s[1],t=s&&s[2],a=e.replace(/^(?:\b|\B-[a-z]{1,10}-)(?:repeating-)?(?:linear|radial)-gradient\(|\)$/g,"").split(/\s*,\s*/);return 0<=t.indexOf("linear")?r[e]=function(e,s,i){var t="180deg";return/^(?:-?\d*\.?\d+(?:deg|rad)|to\b|top|right|bottom|left)/.test(i[0])&&(t=i.shift()).indexOf("to ")<0&&(0<=t.indexOf("top")?t=0<=t.indexOf("left")?"to bottom right":0<=t.indexOf("right")?"to bottom left":"to bottom":0<=t.indexOf("bottom")?t=0<=t.indexOf("left")?"to top right":0<=t.indexOf("right")?"to top left":"to top":0<=t.indexOf("left")?t="to right":0<=t.indexOf("right")?t="to left":e&&(0<=t.indexOf("deg")?t=90-parseFloat(t)+"deg":0<=t.indexOf("rad")&&(t=Math.PI/2-parseFloat(t)+"rad"))),s+"("+t+","+i.join(",")+")"}(i,t,a):0<=t.indexOf("radial")?r[e]=function(e,s,i){if(i[0].indexOf("at")<0){var t="center",a="ellipse",r="farthest-corner";if(/\bcenter|top|right|bottom|left\b|^\d+/.test(i[0])&&(t=i.shift().replace(/\s*-?\d+(?:rad|deg)\s*/,"")),/\bcircle|ellipse|closest|farthest|contain|cover\b/.test(i[0])){var n=i.shift().split(/\s+/);!n[0]||"circle"!==n[0]&&"ellipse"!==n[0]||(a=n.shift()),n[0]&&(r=n.shift()),"cover"===r?r="farthest-corner":"contain"===r&&(r="clothest-side")}return s+"("+a+" "+r+" at "+t+","+i.join(",")+")"}return s+"("+i.join(",")+")"}(0,t,a):r[e]=t+"("+a.join(",")+")"},function(){new Prism.plugins.Previewer("gradient",function(e){return this.firstChild.style.backgroundImage="",this.firstChild.style.backgroundImage=s(e),!!this.firstChild.style.backgroundImage},"*",function(){this._elt.innerHTML="
    "})}),tokens:{gradient:{pattern:/(?:\b|\B-[a-z]{1,10}-)(?:repeating-)?(?:linear|radial)-gradient\((?:(?:rgb|hsl)a?\(.+?\)|[^\)])+\)/gi,inside:{function:/[\w-]+(?=\()/,punctuation:/[(),]/}}},languages:{css:!0,less:!0,sass:[{lang:"sass",before:"punctuation",inside:"inside",root:Prism.languages.sass&&Prism.languages.sass["variable-line"]},{lang:"sass",before:"punctuation",inside:"inside",root:Prism.languages.sass&&Prism.languages.sass["property-line"]}],scss:!0,stylus:[{lang:"stylus",before:"func",inside:"rest",root:Prism.languages.stylus&&Prism.languages.stylus["property-declaration"].inside},{lang:"stylus",before:"func",inside:"rest",root:Prism.languages.stylus&&Prism.languages.stylus["variable-declaration"].inside}]}},angle:{create:function(){new Prism.plugins.Previewer("angle",function(e){var s,i,t=parseFloat(e),a=e.match(/[a-z]+$/i);if(!t||!a)return!1;switch(a=a[0]){case"deg":s=360;break;case"grad":s=400;break;case"rad":s=2*Math.PI;break;case"turn":s=1}return i=100*t/s,i%=100,this[(t<0?"set":"remove")+"Attribute"]("data-negative",""),this.querySelector("circle").style.strokeDasharray=Math.abs(i)+",500",!0},"*",function(){this._elt.innerHTML=''})},tokens:{angle:/(?:\b|\B-|(?=\B\.))\d*\.?\d+(?:deg|g?rad|turn)\b/i},languages:{css:!0,less:!0,markup:{lang:"markup",before:"punctuation",inside:"inside",root:Prism.languages.markup&&Prism.languages.markup.tag.inside["attr-value"]},sass:[{lang:"sass",inside:"inside",root:Prism.languages.sass&&Prism.languages.sass["property-line"]},{lang:"sass",before:"operator",inside:"inside",root:Prism.languages.sass&&Prism.languages.sass["variable-line"]}],scss:!0,stylus:[{lang:"stylus",before:"func",inside:"rest",root:Prism.languages.stylus&&Prism.languages.stylus["property-declaration"].inside},{lang:"stylus",before:"func",inside:"rest",root:Prism.languages.stylus&&Prism.languages.stylus["variable-declaration"].inside}]}},color:{create:function(){new Prism.plugins.Previewer("color",function(e){return this.style.backgroundColor="",this.style.backgroundColor=e,!!this.style.backgroundColor})},tokens:{color:{pattern:/\B#(?:[0-9a-f]{3}){1,2}\b|\b(?:rgb|hsl)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:rgb|hsl)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B|\b(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGray|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGray|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGray|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gray|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGray|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGray|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGray|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)\b/i,inside:{function:/[\w-]+(?=\()/,punctuation:/[(),]/}}},languages:{css:!0,less:!0,markup:{lang:"markup",before:"punctuation",inside:"inside",root:Prism.languages.markup&&Prism.languages.markup.tag.inside["attr-value"]},sass:[{lang:"sass",before:"punctuation",inside:"inside",root:Prism.languages.sass&&Prism.languages.sass["variable-line"]},{lang:"sass",inside:"inside",root:Prism.languages.sass&&Prism.languages.sass["property-line"]}],scss:!0,stylus:[{lang:"stylus",before:"hexcode",inside:"rest",root:Prism.languages.stylus&&Prism.languages.stylus["property-declaration"].inside},{lang:"stylus",before:"hexcode",inside:"rest",root:Prism.languages.stylus&&Prism.languages.stylus["variable-declaration"].inside}]}},easing:{create:function(){new Prism.plugins.Previewer("easing",function(e){var s=(e={linear:"0,0,1,1",ease:".25,.1,.25,1","ease-in":".42,0,1,1","ease-out":"0,0,.58,1","ease-in-out":".42,0,.58,1"}[e]||e).match(/-?\d*\.?\d+/g);if(4!==s.length)return!1;s=s.map(function(e,s){return 100*(s%2?1-e:e)}),this.querySelector("path").setAttribute("d","M0,100 C"+s[0]+","+s[1]+", "+s[2]+","+s[3]+", 100,0");var i=this.querySelectorAll("line");return i[0].setAttribute("x2",s[0]),i[0].setAttribute("y2",s[1]),i[1].setAttribute("x2",s[2]),i[1].setAttribute("y2",s[3]),!0},"*",function(){this._elt.innerHTML=''})},tokens:{easing:{pattern:/\bcubic-bezier\((?:-?\d*\.?\d+,\s*){3}-?\d*\.?\d+\)\B|\b(?:linear|ease(?:-in)?(?:-out)?)(?=\s|[;}]|$)/i,inside:{function:/[\w-]+(?=\()/,punctuation:/[(),]/}}},languages:{css:!0,less:!0,sass:[{lang:"sass",inside:"inside",before:"punctuation",root:Prism.languages.sass&&Prism.languages.sass["variable-line"]},{lang:"sass",inside:"inside",root:Prism.languages.sass&&Prism.languages.sass["property-line"]}],scss:!0,stylus:[{lang:"stylus",before:"hexcode",inside:"rest",root:Prism.languages.stylus&&Prism.languages.stylus["property-declaration"].inside},{lang:"stylus",before:"hexcode",inside:"rest",root:Prism.languages.stylus&&Prism.languages.stylus["variable-declaration"].inside}]}},time:{create:function(){new Prism.plugins.Previewer("time",function(e){var s=parseFloat(e),i=e.match(/[a-z]+$/i);return!(!s||!i)&&(i=i[0],this.querySelector("circle").style.animationDuration=2*s+i,!0)},"*",function(){this._elt.innerHTML=''})},tokens:{time:/(?:\b|\B-|(?=\B\.))\d*\.?\d+m?s\b/i},languages:{css:!0,less:!0,markup:{lang:"markup",before:"punctuation",inside:"inside",root:Prism.languages.markup&&Prism.languages.markup.tag.inside["attr-value"]},sass:[{lang:"sass",inside:"inside",root:Prism.languages.sass&&Prism.languages.sass["property-line"]},{lang:"sass",before:"operator",inside:"inside",root:Prism.languages.sass&&Prism.languages.sass["variable-line"]}],scss:!0,stylus:[{lang:"stylus",before:"hexcode",inside:"rest",root:Prism.languages.stylus&&Prism.languages.stylus["property-declaration"].inside},{lang:"stylus",before:"hexcode",inside:"rest",root:Prism.languages.stylus&&Prism.languages.stylus["variable-declaration"].inside}]}}},i=/(?:^|\s)token(?=$|\s)/,e=/(?:^|\s)active(?=$|\s)/g,t=/(?:^|\s)flipped(?=$|\s)/g,n=function(e,s,i,t){this._elt=null,this._type=e,this._clsRegexp=RegExp("(?:^|\\s)"+e+"(?=$|\\s)"),this._token=null,this.updater=s,this._mouseout=this.mouseout.bind(this),this.initializer=t;var a=this;i||(i=["*"]),Array.isArray(i)||(i=[i]),i.forEach(function(e){"string"!=typeof e&&(e=e.lang),n.byLanguages[e]||(n.byLanguages[e]=[]),n.byLanguages[e].indexOf(a)<0&&n.byLanguages[e].push(a)}),n.byType[e]=this};for(var a in n.prototype.init=function(){this._elt||(this._elt=document.createElement("div"),this._elt.className="prism-previewer prism-previewer-"+this._type,document.body.appendChild(this._elt),this.initializer&&this.initializer())},n.prototype.isDisabled=function(e){do{if(e.hasAttribute&&e.hasAttribute("data-previewers"))return-1===(e.getAttribute("data-previewers")||"").split(/\s+/).indexOf(this._type)}while(e=e.parentNode);return!1},n.prototype.check=function(e){if(!i.test(e.className)||!this.isDisabled(e)){do{if(i.test(e.className)&&this._clsRegexp.test(e.className))break}while(e=e.parentNode);e&&e!==this._token&&(this._token=e,this.show())}},n.prototype.mouseout=function(){this._token.removeEventListener("mouseout",this._mouseout,!1),this._token=null,this.hide()},n.prototype.show=function(){if(this._elt||this.init(),this._token)if(this.updater.call(this._elt,this._token.textContent)){this._token.addEventListener("mouseout",this._mouseout,!1);var e=function(e){var s=e.getBoundingClientRect(),i=s.left,t=s.top,a=document.documentElement.getBoundingClientRect();return i-=a.left,{top:t-=a.top,right:innerWidth-i-s.width,bottom:innerHeight-t-s.height,left:i,width:s.width,height:s.height}}(this._token);this._elt.className+=" active",0"})}),tokens:{gradient:{pattern:/(?:\b|\B-[a-z]{1,10}-)(?:repeating-)?(?:linear|radial)-gradient\((?:(?:rgb|hsl)a?\(.+?\)|[^\)])+\)/gi,inside:{function:/[\w-]+(?=\()/,punctuation:/[(),]/}}},languages:{css:!0,less:!0,sass:[{lang:"sass",before:"punctuation",inside:"inside",root:Prism.languages.sass&&Prism.languages.sass["variable-line"]},{lang:"sass",before:"punctuation",inside:"inside",root:Prism.languages.sass&&Prism.languages.sass["property-line"]}],scss:!0,stylus:[{lang:"stylus",before:"func",inside:"rest",root:Prism.languages.stylus&&Prism.languages.stylus["property-declaration"].inside},{lang:"stylus",before:"func",inside:"rest",root:Prism.languages.stylus&&Prism.languages.stylus["variable-declaration"].inside}]}},angle:{create:function(){new Prism.plugins.Previewer("angle",function(e){var s,t,i=parseFloat(e),a=e.match(/[a-z]+$/i);if(!i||!a)return!1;switch(a=a[0]){case"deg":s=360;break;case"grad":s=400;break;case"rad":s=2*Math.PI;break;case"turn":s=1}return t=100*i/s,t%=100,this[(i<0?"set":"remove")+"Attribute"]("data-negative",""),this.querySelector("circle").style.strokeDasharray=Math.abs(t)+",500",!0},"*",function(){this._elt.innerHTML=''})},tokens:{angle:/(?:\b|\B-|(?=\B\.))\d*\.?\d+(?:deg|g?rad|turn)\b/i},languages:{css:!0,less:!0,markup:{lang:"markup",before:"punctuation",inside:"inside",root:Prism.languages.markup&&Prism.languages.markup.tag.inside["attr-value"]},sass:[{lang:"sass",inside:"inside",root:Prism.languages.sass&&Prism.languages.sass["property-line"]},{lang:"sass",before:"operator",inside:"inside",root:Prism.languages.sass&&Prism.languages.sass["variable-line"]}],scss:!0,stylus:[{lang:"stylus",before:"func",inside:"rest",root:Prism.languages.stylus&&Prism.languages.stylus["property-declaration"].inside},{lang:"stylus",before:"func",inside:"rest",root:Prism.languages.stylus&&Prism.languages.stylus["variable-declaration"].inside}]}},color:{create:function(){new Prism.plugins.Previewer("color",function(e){return this.style.backgroundColor="",this.style.backgroundColor=e,!!this.style.backgroundColor})},tokens:{color:[Prism.languages.css.hexcode].concat(Prism.languages.css.color)},languages:{css:!1,less:!0,markup:{lang:"markup",before:"punctuation",inside:"inside",root:Prism.languages.markup&&Prism.languages.markup.tag.inside["attr-value"]},sass:[{lang:"sass",before:"punctuation",inside:"inside",root:Prism.languages.sass&&Prism.languages.sass["variable-line"]},{lang:"sass",inside:"inside",root:Prism.languages.sass&&Prism.languages.sass["property-line"]}],scss:!1,stylus:[{lang:"stylus",before:"hexcode",inside:"rest",root:Prism.languages.stylus&&Prism.languages.stylus["property-declaration"].inside},{lang:"stylus",before:"hexcode",inside:"rest",root:Prism.languages.stylus&&Prism.languages.stylus["variable-declaration"].inside}]}},easing:{create:function(){new Prism.plugins.Previewer("easing",function(e){var s=(e={linear:"0,0,1,1",ease:".25,.1,.25,1","ease-in":".42,0,1,1","ease-out":"0,0,.58,1","ease-in-out":".42,0,.58,1"}[e]||e).match(/-?\d*\.?\d+/g);if(4!==s.length)return!1;s=s.map(function(e,s){return 100*(s%2?1-e:e)}),this.querySelector("path").setAttribute("d","M0,100 C"+s[0]+","+s[1]+", "+s[2]+","+s[3]+", 100,0");var t=this.querySelectorAll("line");return t[0].setAttribute("x2",s[0]),t[0].setAttribute("y2",s[1]),t[1].setAttribute("x2",s[2]),t[1].setAttribute("y2",s[3]),!0},"*",function(){this._elt.innerHTML=''})},tokens:{easing:{pattern:/\bcubic-bezier\((?:-?\d*\.?\d+,\s*){3}-?\d*\.?\d+\)\B|\b(?:linear|ease(?:-in)?(?:-out)?)(?=\s|[;}]|$)/i,inside:{function:/[\w-]+(?=\()/,punctuation:/[(),]/}}},languages:{css:!0,less:!0,sass:[{lang:"sass",inside:"inside",before:"punctuation",root:Prism.languages.sass&&Prism.languages.sass["variable-line"]},{lang:"sass",inside:"inside",root:Prism.languages.sass&&Prism.languages.sass["property-line"]}],scss:!0,stylus:[{lang:"stylus",before:"hexcode",inside:"rest",root:Prism.languages.stylus&&Prism.languages.stylus["property-declaration"].inside},{lang:"stylus",before:"hexcode",inside:"rest",root:Prism.languages.stylus&&Prism.languages.stylus["variable-declaration"].inside}]}},time:{create:function(){new Prism.plugins.Previewer("time",function(e){var s=parseFloat(e),t=e.match(/[a-z]+$/i);return!(!s||!t)&&(t=t[0],this.querySelector("circle").style.animationDuration=2*s+t,!0)},"*",function(){this._elt.innerHTML=''})},tokens:{time:/(?:\b|\B-|(?=\B\.))\d*\.?\d+m?s\b/i},languages:{css:!0,less:!0,markup:{lang:"markup",before:"punctuation",inside:"inside",root:Prism.languages.markup&&Prism.languages.markup.tag.inside["attr-value"]},sass:[{lang:"sass",inside:"inside",root:Prism.languages.sass&&Prism.languages.sass["property-line"]},{lang:"sass",before:"operator",inside:"inside",root:Prism.languages.sass&&Prism.languages.sass["variable-line"]}],scss:!0,stylus:[{lang:"stylus",before:"hexcode",inside:"rest",root:Prism.languages.stylus&&Prism.languages.stylus["property-declaration"].inside},{lang:"stylus",before:"hexcode",inside:"rest",root:Prism.languages.stylus&&Prism.languages.stylus["variable-declaration"].inside}]}}},t=/(?:^|\s)token(?=$|\s)/,e=/(?:^|\s)active(?=$|\s)/g,i=/(?:^|\s)flipped(?=$|\s)/g,n=function(e,s,t,i){this._elt=null,this._type=e,this._clsRegexp=RegExp("(?:^|\\s)"+e+"(?=$|\\s)"),this._token=null,this.updater=s,this._mouseout=this.mouseout.bind(this),this.initializer=i;var a=this;t||(t=["*"]),Array.isArray(t)||(t=[t]),t.forEach(function(e){"string"!=typeof e&&(e=e.lang),n.byLanguages[e]||(n.byLanguages[e]=[]),n.byLanguages[e].indexOf(a)<0&&n.byLanguages[e].push(a)}),n.byType[e]=this};for(var a in n.prototype.init=function(){this._elt||(this._elt=document.createElement("div"),this._elt.className="prism-previewer prism-previewer-"+this._type,document.body.appendChild(this._elt),this.initializer&&this.initializer())},n.prototype.isDisabled=function(e){do{if(e.hasAttribute&&e.hasAttribute("data-previewers"))return-1===(e.getAttribute("data-previewers")||"").split(/\s+/).indexOf(this._type)}while(e=e.parentNode);return!1},n.prototype.check=function(e){if(!t.test(e.className)||!this.isDisabled(e)){do{if(t.test(e.className)&&this._clsRegexp.test(e.className))break}while(e=e.parentNode);e&&e!==this._token&&(this._token=e,this.show())}},n.prototype.mouseout=function(){this._token.removeEventListener("mouseout",this._mouseout,!1),this._token=null,this.hide()},n.prototype.show=function(){if(this._elt||this.init(),this._token)if(this.updater.call(this._elt,this._token.textContent)){this._token.addEventListener("mouseout",this._mouseout,!1);var e=function(e){var s=e.getBoundingClientRect(),t=s.left,i=s.top,a=document.documentElement.getBoundingClientRect();return t-=a.left,{top:i-=a.top,right:innerWidth-t-s.width,bottom:innerHeight-i-s.height,left:t,width:s.width,height:s.height}}(this._token);this._elt.className+=" active",0 Date: Tue, 3 Sep 2019 20:52:15 +0200 Subject: [PATCH 0358/1100] Website: Fixed the Toolbar plusing's overflow issue (#1966) This fixes the overflow issue of all Toolbar related plugins where some button were hidden behind the theme selection. --- scripts/code.js | 23 +++++++++++++++++++++++ style.css | 9 +++++++++ 2 files changed, 32 insertions(+) diff --git a/scripts/code.js b/scripts/code.js index 69ac0b97d2..a4847e7174 100644 --- a/scripts/code.js +++ b/scripts/code.js @@ -210,4 +210,27 @@ function listPlugins(ul) { $$('.plugin-list').forEach(listPlugins); +// small polyfill for Element#matches +if (!Element.prototype.matches) { + Element.prototype.matches = Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector; +} + +Prism && Prism.hooks.add('complete', function (env) { + var element = env.element; + + requestAnimationFrame(function () { + if (!element.matches('div.code-toolbar > pre > code')) { + return; + } + + var pre = element.parentElement; + var wrapper = pre.parentElement; + + // transfer margin of pre to wrapper + wrapper.style.margin = window.getComputedStyle(pre).margin; + pre.style.margin = "0"; + + }); +}); + })(); diff --git a/style.css b/style.css index 221b6cd728..4f31839fac 100644 --- a/style.css +++ b/style.css @@ -414,3 +414,12 @@ label a.owner:not(:hover) { margin-bottom: 1em; margin-right: 1em; } + +/* + * Fix for Toolbar's overflow issue + */ + +div.code-toolbar { + display: block; + overflow: auto; +} From 365faade715bf746d9312d476075f095d4873960 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Wed, 4 Sep 2019 16:53:47 +0200 Subject: [PATCH 0359/1100] New Match Braces plugin (#1944) This adds a new plugin to highlight matching braces in highlighted code. --- components.js | 2 +- components.json | 4 + plugins/match-braces/index.html | 75 +++++++ plugins/match-braces/prism-match-braces.css | 29 +++ plugins/match-braces/prism-match-braces.js | 184 ++++++++++++++++++ .../match-braces/prism-match-braces.min.js | 1 + 6 files changed, 294 insertions(+), 1 deletion(-) create mode 100644 plugins/match-braces/index.html create mode 100644 plugins/match-braces/prism-match-braces.css create mode 100644 plugins/match-braces/prism-match-braces.js create mode 100644 plugins/match-braces/prism-match-braces.min.js diff --git a/components.js b/components.js index 34fd5d980e..e07fbace3e 100644 --- a/components.js +++ b/components.js @@ -1,2 +1,2 @@ -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default","peerDependencies":"markup"},"clike":{"title":"C-like","option":"default","overrideExampleHeader":true},"javascript":{"title":"JavaScript","require":"clike","peerDependencies":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"Augmented Backus–Naur form","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","peerDependencies":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"Backus–Naur form","alias":"rbnf","aliasTitles":{"rbnf":"Routing Backus–Naur form"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"Extended Backus–Naur form","owner":"RunDevelopment"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment"},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","peerDependencies":["css","css-extras","coffeescript","erb","javascript","less","markdown","ruby","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"http":{"title":"HTTP","peerDependencies":["javascript","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"peerDependencies":["scala"],"owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","peerDependencies":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike"],"peerDependencies":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","peerDependencies":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"js-templates":{"title":"JS Templates","require":"javascript","peerDependencies":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"json":{"title":"JSON","owner":"CupOfTea696"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"less":{"title":"Less","require":"css","peerDependencies":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","peerDependencies":["jsdoc"],"alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"nasm":{"title":"NASM","owner":"rbmj"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"cpp","peerDependencies":["c","cpp"],"overrideExampleHeader":true,"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"peerDependencies":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","peerDependencies":["c","cpp","fortran"],"owner":"Golmote"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"peerDependencies":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","peerDependencies":["actionscript","coffeescript","flow","javascript","typescript","vala"],"owner":"RunDevelopment"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robot-framework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","require":"sql","owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","peerDependencies":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"solidity":{"title":"Solidity (Ethereum)","require":"clike","owner":"glachaud"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","peerDependencies":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"turtle":{"title":"Turtle","alias":["trig"],"aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","peerDependencies":"js-templates","alias":"ts","owner":"vkbansal"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","visual-basic"],"owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":"Line Highlight","line-numbers":{"title":"Line Numbers","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","after":["autolinker","data-uri-highlight"]},"autolinker":"Autolinker","wpd":"WebPlatform Docs","custom-class":{"title":"Custom Class","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","noCSS":true},"show-language":{"title":"Show Language","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","owner":"Golmote","after":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","owner":"chriswells0"},"unescaped-markup":"Unescaped Markup","normalize-whitespace":{"title":"Normalize Whitespace","owner":"zeitgeist87","after":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","owner":"Golmote","require":"toolbar","noCSS":true},"diff-highlight":{"title":"Diff Highlight","owner":"RunDevelopment","require":"diff"}}}; +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default","peerDependencies":"markup"},"clike":{"title":"C-like","option":"default","overrideExampleHeader":true},"javascript":{"title":"JavaScript","require":"clike","peerDependencies":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"Augmented Backus–Naur form","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","peerDependencies":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"Backus–Naur form","alias":"rbnf","aliasTitles":{"rbnf":"Routing Backus–Naur form"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"Extended Backus–Naur form","owner":"RunDevelopment"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment"},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","peerDependencies":["css","css-extras","coffeescript","erb","javascript","less","markdown","ruby","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"http":{"title":"HTTP","peerDependencies":["javascript","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"peerDependencies":["scala"],"owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","peerDependencies":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike"],"peerDependencies":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","peerDependencies":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"js-templates":{"title":"JS Templates","require":"javascript","peerDependencies":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"json":{"title":"JSON","owner":"CupOfTea696"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"less":{"title":"Less","require":"css","peerDependencies":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","peerDependencies":["jsdoc"],"alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"nasm":{"title":"NASM","owner":"rbmj"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"cpp","peerDependencies":["c","cpp"],"overrideExampleHeader":true,"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"peerDependencies":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","peerDependencies":["c","cpp","fortran"],"owner":"Golmote"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"peerDependencies":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","peerDependencies":["actionscript","coffeescript","flow","javascript","typescript","vala"],"owner":"RunDevelopment"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robot-framework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","require":"sql","owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","peerDependencies":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"solidity":{"title":"Solidity (Ethereum)","require":"clike","owner":"glachaud"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","peerDependencies":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"turtle":{"title":"Turtle","alias":["trig"],"aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","peerDependencies":"js-templates","alias":"ts","owner":"vkbansal"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","visual-basic"],"owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":"Line Highlight","line-numbers":{"title":"Line Numbers","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","after":["autolinker","data-uri-highlight"]},"autolinker":"Autolinker","wpd":"WebPlatform Docs","custom-class":{"title":"Custom Class","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","noCSS":true},"show-language":{"title":"Show Language","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","owner":"Golmote","after":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","owner":"chriswells0"},"unescaped-markup":"Unescaped Markup","normalize-whitespace":{"title":"Normalize Whitespace","owner":"zeitgeist87","after":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","owner":"RunDevelopment","require":"diff"}}}; if (typeof module !== 'undefined' && module.exports) { module.exports = components; } \ No newline at end of file diff --git a/components.json b/components.json index ee5575ac0c..e5ebcc0647 100644 --- a/components.json +++ b/components.json @@ -1130,6 +1130,10 @@ "require": "toolbar", "noCSS": true }, + "match-braces": { + "title": "Match braces", + "owner": "RunDevelopment" + }, "diff-highlight": { "title": "Diff Highlight", "owner": "RunDevelopment", diff --git a/plugins/match-braces/index.html b/plugins/match-braces/index.html new file mode 100644 index 0000000000..ac6a79a1ef --- /dev/null +++ b/plugins/match-braces/index.html @@ -0,0 +1,75 @@ + + + + + + +Match braces ▲ Prism plugins + + + + + + + + + + + +
    +
    + +

    Match braces

    +

    Highlights matching braces.

    +
    + +
    +

    How to use

    + +

    To enable this plugin add the match-braces class to a code block:

    + +
    <pre><code class="language-xxxx match-braces">...</pre></code>
    + +

    Just like language-xxxx, the match-braces class is inherited, so you can add the class to the <body> to enable the plugin for the whole page.

    + +

    The plugin will highlight brace pairs when the cursor hovers over one of the braces. The highlighting effect will disappear as soon as the cursor leaves the brace pair.
    + The hover effect can be disabled by adding the no-brace-hover to the code block. This class can also be inherited.

    + +

    You can also click on a brace to select the brace pair. To deselect the pair, click anywhere within the code block or select another pair.
    + The selection effect can be disabled by adding the no-brace-select to the code block. This class can also be + inherited.

    + +

    Rainbow braces 🌈

    + +

    To enable rainbow braces, simply add the rainbow-braces class to a code block. This class can also get inherited.

    +
    + +
    +

    Examples

    + +

    JavaScript

    +
    
    +
    +	

    Lisp

    +
    (defun factorial (n)
    +	(if (= n 0) 1
    +		(* n (factorial (- n 1)))))
    + +

    Lisp with rainbow braces 🌈 but without hover

    +
    (defun factorial (n)
    +	(if (= n 0) 1
    +		(* n (factorial (- n 1)))))
    +
    + +
    + + + + + + + + + + + diff --git a/plugins/match-braces/prism-match-braces.css b/plugins/match-braces/prism-match-braces.css new file mode 100644 index 0000000000..9ca6981da3 --- /dev/null +++ b/plugins/match-braces/prism-match-braces.css @@ -0,0 +1,29 @@ +.token.punctuation.brace-hover, +.token.punctuation.brace-selected { + outline: solid 1px; +} + +.rainbow-braces .token.punctuation.brace-level-1, +.rainbow-braces .token.punctuation.brace-level-5, +.rainbow-braces .token.punctuation.brace-level-9 { + color: #E50; + opacity: 1; +} +.rainbow-braces .token.punctuation.brace-level-2, +.rainbow-braces .token.punctuation.brace-level-6, +.rainbow-braces .token.punctuation.brace-level-10 { + color: #0B3; + opacity: 1; +} +.rainbow-braces .token.punctuation.brace-level-3, +.rainbow-braces .token.punctuation.brace-level-7, +.rainbow-braces .token.punctuation.brace-level-11 { + color: #26F; + opacity: 1; +} +.rainbow-braces .token.punctuation.brace-level-4, +.rainbow-braces .token.punctuation.brace-level-8, +.rainbow-braces .token.punctuation.brace-level-12 { + color: #E0E; + opacity: 1; +} diff --git a/plugins/match-braces/prism-match-braces.js b/plugins/match-braces/prism-match-braces.js new file mode 100644 index 0000000000..2488e34bce --- /dev/null +++ b/plugins/match-braces/prism-match-braces.js @@ -0,0 +1,184 @@ +(function () { + + if (typeof self === 'undefined' || !self.Prism || !self.document) { + return; + } + + var MATCH_ALL_CLASS = /(?:^|\s)match-braces(?:\s|$)/; + + var BRACE_HOVER_CLASS = /(?:^|\s)brace-hover(?:\s|$)/; + var BRACE_SELECTED_CLASS = /(?:^|\s)brace-selected(?:\s|$)/; + + var NO_BRACE_HOVER_CLASS = /(?:^|\s)no-brace-hover(?:\s|$)/; + var NO_BRACE_SELECT_CLASS = /(?:^|\s)no-brace-select(?:\s|$)/; + + var PARTNER = { + '(': ')', + '[': ']', + '{': '}', + }; + + var NAMES = { + '(': 'brace-round', + '[': 'brace-square', + '{': 'brace-curly', + }; + + var LEVEL_WARP = 12; + + var pairIdCounter = 0; + + var BRACE_ID_PATTERN = /^(pair-\d+-)(open|close)$/; + + /** + * Returns the brace partner given one brace of a brace pair. + * + * @param {HTMLElement} brace + * @returns {HTMLElement} + */ + function getPartnerBrace(brace) { + var match = BRACE_ID_PATTERN.exec(brace.id); + return document.querySelector('#' + match[1] + (match[2] == 'open' ? 'close' : 'open')); + } + + /** + * @this {HTMLElement} + */ + function hoverBrace() { + for (var parent = this.parentElement; parent; parent = parent.parentElement) { + if (NO_BRACE_HOVER_CLASS.test(parent.className)) { + return; + } + } + + [this, getPartnerBrace(this)].forEach(function (ele) { + ele.className = (ele.className.replace(BRACE_HOVER_CLASS, ' ') + ' brace-hover').replace(/\s+/g, ' '); + }); + } + /** + * @this {HTMLElement} + */ + function leaveBrace() { + [this, getPartnerBrace(this)].forEach(function (ele) { + ele.className = ele.className.replace(BRACE_HOVER_CLASS, ' '); + }); + } + /** + * @this {HTMLElement} + */ + function clickBrace() { + for (var parent = this.parentElement; parent; parent = parent.parentElement) { + if (NO_BRACE_SELECT_CLASS.test(parent.className)) { + return; + } + } + + [this, getPartnerBrace(this)].forEach(function (ele) { + ele.className = (ele.className.replace(BRACE_SELECTED_CLASS, ' ') + ' brace-selected').replace(/\s+/g, ' '); + }); + } + + Prism.hooks.add('complete', function (env) { + + /** @type {HTMLElement} */ + var code = env.element; + var pre = code.parentElement; + + if (!pre || pre.tagName != 'PRE') { + return; + } + + // find the braces to match + /** @type {string[]} */ + var toMatch = []; + for (var ele = code; ele; ele = ele.parentElement) { + if (MATCH_ALL_CLASS.test(ele.className)) { + toMatch.push('(', '[', '{'); + break; + } + } + + if (toMatch.length == 0) { + // nothing to match + return; + } + + if (!pre.__listenerAdded) { + // code blocks might be highlighted more than once + pre.addEventListener('mousedown', function removeBraceSelected() { + // the code element might have been replaced + var code = pre.querySelector('code'); + Array.prototype.slice.call(code.querySelectorAll('.brace-selected')).forEach(function (element) { + element.className = element.className.replace(BRACE_SELECTED_CLASS, ' '); + }); + }); + Object.defineProperty(pre, '__listenerAdded', { value: true }); + } + + /** @type {HTMLSpanElement[]} */ + var punctuation = Array.prototype.slice.call(code.querySelectorAll('span.token.punctuation')); + + /** @type {{ index: number, open: boolean, element: HTMLElement }[]} */ + var allBraces = []; + + toMatch.forEach(function (open) { + var close = PARTNER[open]; + var name = NAMES[open]; + + /** @type {[number, number][]} */ + var pairs = []; + /** @type {number[]} */ + var openStack = []; + + for (var i = 0; i < punctuation.length; i++) { + var element = punctuation[i]; + if (element.childElementCount == 0) { + var text = element.textContent; + if (text === open) { + allBraces.push({ index: i, open: true, element: element }); + element.className += ' ' + name; + element.className += ' brace-open'; + openStack.push(i); + } else if (text === close) { + allBraces.push({ index: i, open: false, element: element }); + element.className += ' ' + name; + element.className += ' brace-close'; + if (openStack.length) { + pairs.push([i, openStack.pop()]); + } + } + } + } + + pairs.forEach(function (pair) { + var pairId = 'pair-' + (pairIdCounter++) + '-'; + + var openEle = punctuation[pair[0]]; + var closeEle = punctuation[pair[1]]; + + openEle.id = pairId + 'open'; + closeEle.id = pairId + 'close'; + + [openEle, closeEle].forEach(function (ele) { + ele.addEventListener('mouseenter', hoverBrace); + ele.addEventListener('mouseleave', leaveBrace); + ele.addEventListener('click', clickBrace); + }); + }); + }); + + var level = 0; + allBraces.sort(function (a, b) { return a.index - b.index; }); + allBraces.forEach(function (brace) { + if (brace.open) { + brace.element.className += ' brace-level-' + (level % LEVEL_WARP + 1); + level++; + } else { + level = Math.max(0, level - 1); + brace.element.className += ' brace-level-' + (level % LEVEL_WARP + 1); + } + }); + + }); + +}()); diff --git a/plugins/match-braces/prism-match-braces.min.js b/plugins/match-braces/prism-match-braces.min.js new file mode 100644 index 0000000000..4ae2953dba --- /dev/null +++ b/plugins/match-braces/prism-match-braces.min.js @@ -0,0 +1 @@ +!function(){if("undefined"!=typeof self&&self.Prism&&self.document){var c=/(?:^|\s)match-braces(?:\s|$)/,a=/(?:^|\s)brace-hover(?:\s|$)/,l=/(?:^|\s)brace-selected(?:\s|$)/,n=/(?:^|\s)no-brace-hover(?:\s|$)/,t=/(?:^|\s)no-brace-select(?:\s|$)/,u={"(":")","[":"]","{":"}"},f={"(":"brace-round","[":"brace-square","{":"brace-curly"},m=0,r=/^(pair-\d+-)(open|close)$/;Prism.hooks.add("complete",function(e){var a=e.element,n=a.parentElement;if(n&&"PRE"==n.tagName){for(var t=[],r=a;r;r=r.parentElement)if(c.test(r.className)){t.push("(","[","{");break}if(0!=t.length){n.__listenerAdded||(n.addEventListener("mousedown",function(){var e=n.querySelector("code");Array.prototype.slice.call(e.querySelectorAll(".brace-selected")).forEach(function(e){e.className=e.className.replace(l," ")})}),Object.defineProperty(n,"__listenerAdded",{value:!0}));var o=Array.prototype.slice.call(a.querySelectorAll("span.token.punctuation")),i=[];t.forEach(function(e){for(var a=u[e],n=f[e],t=[],r=[],s=0;s Date: Thu, 5 Sep 2019 00:10:59 +0800 Subject: [PATCH 0360/1100] Smalltalk: Fixed single quote character literal (#2041) This fixes the incorrect tokenization of the character literals of single quotes which were recognized as string delimiters. --- components/prism-smalltalk.js | 8 ++++---- components/prism-smalltalk.min.js | 2 +- .../smalltalk/string_character_feature.test | 13 +++++++++++++ 3 files changed, 18 insertions(+), 5 deletions(-) create mode 100644 tests/languages/smalltalk/string_character_feature.test diff --git a/components/prism-smalltalk.js b/components/prism-smalltalk.js index f2075b196f..84ef05bfc1 100644 --- a/components/prism-smalltalk.js +++ b/components/prism-smalltalk.js @@ -1,5 +1,9 @@ Prism.languages.smalltalk = { 'comment': /"(?:""|[^"])*"/, + 'character': { + pattern: /\$./, + alias: 'string' + }, 'string': /'(?:''|[^'])*'/, 'symbol': /#[\da-z]+|#(?:-|([+\/\\*~<>=@%|&?!])\1?)|#(?=\()/i, 'block-arguments': { @@ -18,10 +22,6 @@ Prism.languages.smalltalk = { } }, 'keyword': /\b(?:nil|true|false|self|super|new)\b/, - 'character': { - pattern: /\$./, - alias: 'string' - }, 'number': [ /\d+r-?[\dA-Z]+(?:\.[\dA-Z]+)?(?:e-?\d+)?/, /\b\d+(?:\.\d+)?(?:e-?\d+)?/ diff --git a/components/prism-smalltalk.min.js b/components/prism-smalltalk.min.js index 71a0777b40..a8ff98badb 100644 --- a/components/prism-smalltalk.min.js +++ b/components/prism-smalltalk.min.js @@ -1 +1 @@ -Prism.languages.smalltalk={comment:/"(?:""|[^"])*"/,string:/'(?:''|[^'])*'/,symbol:/#[\da-z]+|#(?:-|([+\/\\*~<>=@%|&?!])\1?)|#(?=\()/i,"block-arguments":{pattern:/(\[\s*):[^\[|]*\|/,lookbehind:!0,inside:{variable:/:[\da-z]+/i,punctuation:/\|/}},"temporary-variables":{pattern:/\|[^|]+\|/,inside:{variable:/[\da-z]+/i,punctuation:/\|/}},keyword:/\b(?:nil|true|false|self|super|new)\b/,character:{pattern:/\$./,alias:"string"},number:[/\d+r-?[\dA-Z]+(?:\.[\dA-Z]+)?(?:e-?\d+)?/,/\b\d+(?:\.\d+)?(?:e-?\d+)?/],operator:/[<=]=?|:=|~[~=]|\/\/?|\\\\|>[>=]?|[!^+\-*&|,@]/,punctuation:/[.;:?\[\](){}]/}; \ No newline at end of file +Prism.languages.smalltalk={comment:/"(?:""|[^"])*"/,character:{pattern:/\$./,alias:"string"},string:/'(?:''|[^'])*'/,symbol:/#[\da-z]+|#(?:-|([+\/\\*~<>=@%|&?!])\1?)|#(?=\()/i,"block-arguments":{pattern:/(\[\s*):[^\[|]*\|/,lookbehind:!0,inside:{variable:/:[\da-z]+/i,punctuation:/\|/}},"temporary-variables":{pattern:/\|[^|]+\|/,inside:{variable:/[\da-z]+/i,punctuation:/\|/}},keyword:/\b(?:nil|true|false|self|super|new)\b/,number:[/\d+r-?[\dA-Z]+(?:\.[\dA-Z]+)?(?:e-?\d+)?/,/\b\d+(?:\.\d+)?(?:e-?\d+)?/],operator:/[<=]=?|:=|~[~=]|\/\/?|\\\\|>[>=]?|[!^+\-*&|,@]/,punctuation:/[.;:?\[\](){}]/}; \ No newline at end of file diff --git a/tests/languages/smalltalk/string_character_feature.test b/tests/languages/smalltalk/string_character_feature.test new file mode 100644 index 0000000000..83e057c464 --- /dev/null +++ b/tests/languages/smalltalk/string_character_feature.test @@ -0,0 +1,13 @@ +$' +'foobar' + +---------------------------------------------------- + +[ + ["character", "$'"], + ["string", "'foobar'"] +] + +---------------------------------------------------- + +Checks a single-quote-character doesn't confuse string parsing. From c42f877dbc3fb86dc81e165a99923cc6abb90e1b Mon Sep 17 00:00:00 2001 From: thomasdegroot18 Date: Thu, 5 Sep 2019 17:28:28 +0200 Subject: [PATCH 0361/1100] Added support for SPARQL language (#2033) This adds support for the SPARQL language. https://www.w3.org/TR/sparql11-query/ --- components.js | 2 +- components.json | 8 +- components/prism-sparql.js | 18 ++ components/prism-sparql.min.js | 1 + examples/prism-sparql.html | 303 ++++++++++++++++++ plugins/autoloader/prism-autoloader.js | 2 + plugins/autoloader/prism-autoloader.min.js | 2 +- plugins/show-language/prism-show-language.js | 2 + .../show-language/prism-show-language.min.js | 2 +- tests/languages/sparql/boolean_feature.test | 14 + tests/languages/sparql/comment_feature.test | 13 + tests/languages/sparql/function_feature.test | 87 +++++ tests/languages/sparql/keyword_feature.test | 271 ++++++++++++++++ tests/languages/sparql/number_feature.test | 31 ++ tests/languages/sparql/string_feature.test | 40 +++ tests/languages/sparql/tag_feature.test | 42 +++ tests/languages/sparql/url_feature.test | 234 ++++++++++++++ tests/languages/sparql/variable_feature.test | 18 ++ 18 files changed, 1086 insertions(+), 4 deletions(-) create mode 100644 components/prism-sparql.js create mode 100644 components/prism-sparql.min.js create mode 100644 examples/prism-sparql.html create mode 100644 tests/languages/sparql/boolean_feature.test create mode 100644 tests/languages/sparql/comment_feature.test create mode 100644 tests/languages/sparql/function_feature.test create mode 100644 tests/languages/sparql/keyword_feature.test create mode 100644 tests/languages/sparql/number_feature.test create mode 100644 tests/languages/sparql/string_feature.test create mode 100644 tests/languages/sparql/tag_feature.test create mode 100644 tests/languages/sparql/url_feature.test create mode 100644 tests/languages/sparql/variable_feature.test diff --git a/components.js b/components.js index e07fbace3e..f61069d3d7 100644 --- a/components.js +++ b/components.js @@ -1,2 +1,2 @@ -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default","peerDependencies":"markup"},"clike":{"title":"C-like","option":"default","overrideExampleHeader":true},"javascript":{"title":"JavaScript","require":"clike","peerDependencies":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"Augmented Backus–Naur form","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","peerDependencies":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"Backus–Naur form","alias":"rbnf","aliasTitles":{"rbnf":"Routing Backus–Naur form"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"Extended Backus–Naur form","owner":"RunDevelopment"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment"},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","peerDependencies":["css","css-extras","coffeescript","erb","javascript","less","markdown","ruby","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"http":{"title":"HTTP","peerDependencies":["javascript","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"peerDependencies":["scala"],"owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","peerDependencies":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike"],"peerDependencies":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","peerDependencies":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"js-templates":{"title":"JS Templates","require":"javascript","peerDependencies":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"json":{"title":"JSON","owner":"CupOfTea696"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"less":{"title":"Less","require":"css","peerDependencies":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","peerDependencies":["jsdoc"],"alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"nasm":{"title":"NASM","owner":"rbmj"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"cpp","peerDependencies":["c","cpp"],"overrideExampleHeader":true,"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"peerDependencies":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","peerDependencies":["c","cpp","fortran"],"owner":"Golmote"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"peerDependencies":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","peerDependencies":["actionscript","coffeescript","flow","javascript","typescript","vala"],"owner":"RunDevelopment"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robot-framework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","require":"sql","owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","peerDependencies":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"solidity":{"title":"Solidity (Ethereum)","require":"clike","owner":"glachaud"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","peerDependencies":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"turtle":{"title":"Turtle","alias":["trig"],"aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","peerDependencies":"js-templates","alias":"ts","owner":"vkbansal"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","visual-basic"],"owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":"Line Highlight","line-numbers":{"title":"Line Numbers","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","after":["autolinker","data-uri-highlight"]},"autolinker":"Autolinker","wpd":"WebPlatform Docs","custom-class":{"title":"Custom Class","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","noCSS":true},"show-language":{"title":"Show Language","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","owner":"Golmote","after":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","owner":"chriswells0"},"unescaped-markup":"Unescaped Markup","normalize-whitespace":{"title":"Normalize Whitespace","owner":"zeitgeist87","after":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","owner":"RunDevelopment","require":"diff"}}}; +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default","peerDependencies":"markup"},"clike":{"title":"C-like","option":"default","overrideExampleHeader":true},"javascript":{"title":"JavaScript","require":"clike","peerDependencies":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"Augmented Backus–Naur form","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","peerDependencies":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"Backus–Naur form","alias":"rbnf","aliasTitles":{"rbnf":"Routing Backus–Naur form"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"Extended Backus–Naur form","owner":"RunDevelopment"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment"},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","peerDependencies":["css","css-extras","coffeescript","erb","javascript","less","markdown","ruby","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"http":{"title":"HTTP","peerDependencies":["javascript","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"peerDependencies":["scala"],"owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","peerDependencies":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike"],"peerDependencies":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","peerDependencies":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"js-templates":{"title":"JS Templates","require":"javascript","peerDependencies":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"json":{"title":"JSON","owner":"CupOfTea696"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"less":{"title":"Less","require":"css","peerDependencies":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","peerDependencies":["jsdoc"],"alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"nasm":{"title":"NASM","owner":"rbmj"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"cpp","peerDependencies":["c","cpp"],"overrideExampleHeader":true,"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"peerDependencies":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","peerDependencies":["c","cpp","fortran"],"owner":"Golmote"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"peerDependencies":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","peerDependencies":["actionscript","coffeescript","flow","javascript","typescript","vala"],"owner":"RunDevelopment"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robot-framework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","require":"sql","owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","peerDependencies":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"solidity":{"title":"Solidity (Ethereum)","require":"clike","owner":"glachaud"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","peerDependencies":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"turtle":{"title":"Turtle","alias":["trig"],"aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","peerDependencies":"js-templates","alias":"ts","owner":"vkbansal"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","visual-basic"],"owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":"Line Highlight","line-numbers":{"title":"Line Numbers","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","after":["autolinker","data-uri-highlight"]},"autolinker":"Autolinker","wpd":"WebPlatform Docs","custom-class":{"title":"Custom Class","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","noCSS":true},"show-language":{"title":"Show Language","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","owner":"Golmote","after":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","owner":"chriswells0"},"unescaped-markup":"Unescaped Markup","normalize-whitespace":{"title":"Normalize Whitespace","owner":"zeitgeist87","after":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","owner":"RunDevelopment","require":"diff"}}}; if (typeof module !== 'undefined' && module.exports) { module.exports = components; } \ No newline at end of file diff --git a/components.json b/components.json index e5ebcc0647..bd431b8e50 100644 --- a/components.json +++ b/components.json @@ -118,7 +118,7 @@ "owner": "Golmote" }, "asciidoc": { - "alias": "adoc", + "alias": "adoc", "title": "AsciiDoc", "owner": "Golmote" }, @@ -883,6 +883,12 @@ "require": "markup-templating", "owner": "Golmote" }, + "sparql": { + "title": "SPARQL", + "require": "turtle", + "owner": "Triply-Dev", + "alias": "rq" + }, "splunk-spl": { "title": "Splunk SPL", "owner": "RunDevelopment" diff --git a/components/prism-sparql.js b/components/prism-sparql.js new file mode 100644 index 0000000000..4f1c30137b --- /dev/null +++ b/components/prism-sparql.js @@ -0,0 +1,18 @@ +Prism.languages.sparql = Prism.languages.extend('turtle', { + 'variable': { + pattern: /[?$]\w+/, + greedy: true + }, + 'boolean': /\b(?:true|false)\b/i, + } +); + +Prism.languages.insertBefore('sparql', 'punctuation', { + 'keyword': [ + /\b(?:A|ADD|ALL|AS|ASC|ASK|BNODE|BY|CLEAR|CONSTRUCT|COPY|CREATE|DATA|DEFAULT|DELETE|DESC|DESCRIBE|DISTINCT|DROP|EXISTS|FILTER|FROM|GROUP|HAVING|INSERT|INTO|LIMIT|LOAD|MINUS|MOVE|NAMED|NOT|NOW|OFFSET|OPTIONAL|ORDER|RAND|REDUCED|SELECT|SEPARATOR|SERVICE|SILENT|STRUUID|UNION|USING|UUID|VALUES|WHERE)\b/i, + /\b(?:ABS|AVG|BIND|BOUND|CEIL|COALESCE|CONCAT|CONTAINS|COUNT|DATATYPE|DAY|ENCODE_FOR_URI|FLOOR|GROUP_CONCAT|HOURS|IF|IRI|isBLANK|isIRI|isLITERAL|isNUMERIC|isURI|LANG|LANGMATCHES|LCASE|MAX|MD5|MIN|MINUTES|MONTH|ROUND|REGEX|REPLACE|sameTerm|SAMPLE|SECONDS|SHA1|SHA256|SHA384|SHA512|STR|STRAFTER|STRBEFORE|STRDT|STRENDS|STRLANG|STRLEN|STRSTARTS|SUBSTR|SUM|TIMEZONE|TZ|UCASE|URI|YEAR)\b(?=\s*\()/i, + /\b(?:GRAPH|BASE|PREFIX)\b/i + ] +}); + +Prism.languages.rq = Prism.languages.sparql; diff --git a/components/prism-sparql.min.js b/components/prism-sparql.min.js new file mode 100644 index 0000000000..72e157f5da --- /dev/null +++ b/components/prism-sparql.min.js @@ -0,0 +1 @@ +Prism.languages.sparql=Prism.languages.extend("turtle",{variable:{pattern:/[?$]\w+/,greedy:!0},boolean:/\b(?:true|false)\b/i}),Prism.languages.insertBefore("sparql","punctuation",{keyword:[/\b(?:A|ADD|ALL|AS|ASC|ASK|BNODE|BY|CLEAR|CONSTRUCT|COPY|CREATE|DATA|DEFAULT|DELETE|DESC|DESCRIBE|DISTINCT|DROP|EXISTS|FILTER|FROM|GROUP|HAVING|INSERT|INTO|LIMIT|LOAD|MINUS|MOVE|NAMED|NOT|NOW|OFFSET|OPTIONAL|ORDER|RAND|REDUCED|SELECT|SEPARATOR|SERVICE|SILENT|STRUUID|UNION|USING|UUID|VALUES|WHERE)\b/i,/\b(?:ABS|AVG|BIND|BOUND|CEIL|COALESCE|CONCAT|CONTAINS|COUNT|DATATYPE|DAY|ENCODE_FOR_URI|FLOOR|GROUP_CONCAT|HOURS|IF|IRI|isBLANK|isIRI|isLITERAL|isNUMERIC|isURI|LANG|LANGMATCHES|LCASE|MAX|MD5|MIN|MINUTES|MONTH|ROUND|REGEX|REPLACE|sameTerm|SAMPLE|SECONDS|SHA1|SHA256|SHA384|SHA512|STR|STRAFTER|STRBEFORE|STRDT|STRENDS|STRLANG|STRLEN|STRSTARTS|SUBSTR|SUM|TIMEZONE|TZ|UCASE|URI|YEAR)\b(?=\s*\()/i,/\b(?:GRAPH|BASE|PREFIX)\b/i]}),Prism.languages.rq=Prism.languages.sparql; \ No newline at end of file diff --git a/examples/prism-sparql.html b/examples/prism-sparql.html new file mode 100644 index 0000000000..5dbcdf233b --- /dev/null +++ b/examples/prism-sparql.html @@ -0,0 +1,303 @@ +

    Introduction

    +The queries shown here can be found in the SPARQL specifications: +https://www.w3.org/TR/sparql11-query/ + +

    query 2.1.6 Examples of Query Syntax

    + +
    PREFIX  dc: <http://purl.org/dc/elements/1.1/>
    +	SELECT  ?title
    +	WHERE   { <http://example.org/book/book1> dc:title ?title }
    +
    + +

    query 2.1.6-q1 Examples of Query Syntax

    + +
    PREFIX  dc: <http://purl.org/dc/elements/1.1/>
    +PREFIX  : <http://example.org/book/>
    +SELECT  $title
    +WHERE   { :book1  dc:title  $title }
    +
    + +

    query 2.1.6-q2 Examples of Query Syntax

    + +
    BASE    <http://example.org/book/>
    +PREFIX  dc: <http://purl.org/dc/elements/1.1/>
    +SELECT  $title
    +WHERE   { <book1>  dc:title  ?title }
    +
    + +

    query 2.5.3 Example of Basic Graph Pattern Matching

    + +
    PREFIX foaf:   <http://xmlns.com/foaf/0.1/>
    +SELECT ?mbox
    +WHERE
    +	{ ?x foaf:name "Johnny Lee Outlaw" .
    +		?x foaf:mbox ?mbox }
    +
    + +

    query 3.1.1 Matching Integers

    + +
    SELECT ?v WHERE { ?v ?p 42 }
    + +

    query 3.1.2 Matching Arbitrary Datatypes

    + +
    SELECT ?v WHERE { ?v ?p "abc"^^<http://example.org/datatype#specialDatatype> }
    + +

    query 3.1.3-q1 Matching Language Tags

    + +
    SELECT ?x WHERE { ?x ?p "cat"@en }
    + +

    query 3.2 Value Constraints

    + +
    PREFIX  dc:  <http://purl.org/dc/elements/1.1/>
    +PREFIX  ns:  <http://example.org/ns#>
    +SELECT  ?title ?price
    +WHERE   { ?x ns:price ?price .
    +					FILTER (?price < 30) .
    +					?x dc:title ?title . }
    +
    + +

    query 5.5 Nested Optional Graph Patterns

    + +
    PREFIX foaf: <http://xmlns.com/foaf/0.1/>
    +PREFIX vcard: <http://www.w3.org/2001/vcard-rdf/3.0#>
    +SELECT ?foafName ?mbox ?gname ?fname
    +WHERE
    +	{  ?x foaf:name ?foafName .
    +		 OPTIONAL { ?x foaf:mbox ?mbox } .
    +		 OPTIONAL {  ?x vcard:N ?vc .
    +								 ?vc vcard:Given ?gname .
    +								 OPTIONAL { ?vc vcard:Family ?fname }
    +							}
    +	}
    +
    + +

    query 6.1-q2 Joining Patterns with UNION

    + +
    PREFIX dc10:  <http://purl.org/dc/elements/1.1/>
    +PREFIX dc11:  <http://purl.org/dc/elements/1.0/>
    +
    +SELECT ?title ?author
    +WHERE  { { ?book dc10:title ?title .  ?book dc10:creator ?author }
    +				 UNION
    +				 { ?book dc11:title ?title .  ?book dc11:creator ?author }
    +			 }
    +
    +
    + +

    query 8.3 Restricting by Bound Variables

    + +
    PREFIX  data:  <http://example.org/foaf/>
    +PREFIX  foaf:  <http://xmlns.com/foaf/0.1/>
    +PREFIX  rdfs:  <http://www.w3.org/2000/01/rdf-schema#>
    +
    +SELECT ?mbox ?nick ?ppd
    +WHERE
    +{
    +	GRAPH data:aliceFoaf
    +	{
    +		?alice foaf:mbox <mailto:alice@work.example> ;
    +					 foaf:knows ?whom .
    +		?whom  foaf:mbox ?mbox ;
    +					 rdfs:seeAlso ?ppd .
    +		?ppd  a foaf:PersonalProfileDocument .
    +	} .
    +	GRAPH ?ppd
    +	{
    +			?w foaf:mbox ?mbox ;
    +				 foaf:nick ?nick
    +	}
    +}
    +
    + +

    query 9.3 Combining FROM and FROM NAMED

    + +
    PREFIX foaf: <http://xmlns.com/foaf/0.1/>
    +PREFIX dc: <http://purl.org/dc/elements/1.1/>
    +
    +SELECT ?who ?g ?mbox
    +FROM <http://example.org/dft.ttl>
    +FROM NAMED <http://example.org/alice>
    +FROM NAMED <http://example.org/bob>
    +WHERE
    +{
    +	 ?g dc:publisher ?who .
    +	 GRAPH ?g { ?x foaf:mbox ?mbox }
    +}
    +
    + +

    query 10.1.2 DISTINCT

    + +
    
    +	PREFIX foaf:    <http://xmlns.com/foaf/0.1//>
    +SELECT DISTINCT ?name WHERE { ?x foaf:name ?name }
    +
    + +

    query 10.1.3-q2 ORDER BY

    + +
    PREFIX foaf:    <http://xmlns.com/foaf/0.1/>
    +
    +SELECT ?name
    +WHERE { ?x foaf:name ?name ; :empId ?emp }
    +ORDER BY ?name DESC(?emp)
    +
    + +

    query 10.1.5 OFFSET

    + +
    PREFIX foaf:    <http://xmlns.com/foaf/0.1/>
    +
    +SELECT  ?name
    +WHERE   { ?x foaf:name ?name }
    +ORDER BY ?name
    +LIMIT   5
    +OFFSET  10
    +
    + +

    query 10.3.1 Templates with Blank Nodes

    + +
    PREFIX foaf:    <http://xmlns.com/foaf/0.1/>
    +PREFIX vcard:   <http://www.w3.org/2001/vcard-rdf/3.0#>
    +
    +CONSTRUCT { ?x  vcard:N _:v .
    +						_:v vcard:givenName ?gname .
    +						_:v vcard:familyName ?fname }
    +WHERE
    + {
    +		{ ?x foaf:firstname ?gname } UNION  { ?x foaf:givenname   ?gname } .
    +		{ ?x foaf:surname   ?fname } UNION  { ?x foaf:family_name ?fname } .
    + }
    +
    + +

    query 10.3.3 Solution Modifiers and CONSTRUCT

    + +
    PREFIX foaf: <http://xmlns.com/foaf/0.1/>
    +PREFIX site: <http://example.org/stats#>
    +
    +CONSTRUCT { [] foaf:name ?name }
    +WHERE
    +{ [] foaf:name ?name ;
    +		 site:hits ?hits .
    +}
    +ORDER BY desc(?hits)
    +LIMIT 2
    + +

    query 10.4.3 Descriptions of Resources

    + +
    PREFIX ent:  <http://org.example.com/employees#>
    +DESCRIBE ?x WHERE { ?x ent:employeeId "1234" }
    +
    + +

    query 10.5-q1 Asking "yes or no" questions

    + +
    PREFIX foaf:    <http://xmlns.com/foaf/0.1/>
    +ASK  { ?x foaf:name  "Alice" ;
    +					foaf:mbox  <mailto:alice@work.example> }
    +
    + +

    query 11.4.1 bound

    + +
    PREFIX foaf: <http://xmlns.com/foaf/0.1/>
    +PREFIX dc:   <http://purl.org/dc/elements/1.1/>
    +PREFIX xsd:   <http://www.w3.org/2001/XMLSchema#>
    +SELECT ?name
    + WHERE { ?x foaf:givenName  ?givenName .
    +				 OPTIONAL { ?x dc:date ?date } .
    +				 FILTER ( bound(?date) ) }
    + +

    query 11.4.3 isBlank

    + +
    
    +PREFIX a:      <http://www.w3.org/2000/10/annotation-ns#>
    +PREFIX dc:     <http://purl.org/dc/elements/1.1/>
    +PREFIX foaf:   <http://xmlns.com/foaf/0.1/>
    +
    +SELECT ?given ?family
    +WHERE { ?annot  a:annotates  <http://www.w3.org/TR/rdf-sparql-query/> .
    +?annot  dc:creator   ?c .
    +OPTIONAL { ?c  foaf:given   ?given ; foaf:family  ?family } .
    +FILTER isBlank(?c)
    +}
    + +

    query 11.4.5 str

    + +
    
    +	PREFIX foaf: <http://xmlns.com/foaf/0.1/>
    +	SELECT ?name ?mbox
    +	 WHERE { ?x foaf:name  ?name ;
    +							foaf:mbox  ?mbox .
    +FILTER regex(str(?mbox), "@work.example") }
    +
    + +

    query 11.4.7 datatype

    + +
    
    +	PREFIX foaf: <http://xmlns.com/foaf/0.1/>
    +	PREFIX xsd:  <http://www.w3.org/2001/XMLSchema#>
    +	PREFIX eg:   <http://biometrics.example/ns#>
    +	SELECT ?name ?shoeSize
    +	 WHERE { ?x foaf:name  ?name ; eg:shoeSize  ?shoeSize .
    +					 FILTER ( datatype(?shoeSize) = xsd:integer ) }
    +
    + +

    query 11.4.10-q1 RDFterm-equal

    + +
    
    +	PREFIX a:      <http://www.w3.org/2000/10/annotation-ns#>
    +	PREFIX dc:     <http://purl.org/dc/elements/1.1/>
    +	PREFIX xsd:    <http://www.w3.org/2001/XMLSchema#>
    +
    +	SELECT ?annotates
    +	WHERE { ?annot  a:annotates  ?annotates .
    +					?annot  dc:date      ?date .
    +					FILTER ( ?date = xsd:dateTime("2004-01-01T00:00:00Z") || ?date = xsd:dateTime("2005-01-01T00:00:00Z") ) }
    +
    + +

    query 11.6-q1 Extensible Value Testing

    + +
    
    +	PREFIX aGeo: <http://example.org/geo#>
    +
    +	SELECT ?neighbor
    +	WHERE { ?a aGeo:placeName "Grenoble" .
    +					?a aGeo:location ?axLoc .
    +					?a aGeo:location ?ayLoc .
    +
    +					?b aGeo:placeName ?neighbor .
    +					?b aGeo:location ?bxLoc .
    +					?b aGeo:location ?byLoc .
    +
    +					FILTER ( aGeo:distance(?axLoc, ?ayLoc, ?bxLoc, ?byLoc) < 10 ) .
    +				}
    +
    + +The final example query is not based on the SPARQL 1.1 queries. + +

    Full Example query

    + +
    
    +	base <http://example.org/geo#>
    +	prefix geo: <http://www.opengis.net/ont/geosparql#>
    +	prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>
    +	select ?shape ?shapeColor ?shapeHeight ?shapeName (sample(?shapeLabel) as ?shapeLabel)  {
    +		{
    +			select * {
    +				values (?placeName ?streetName) {
    +					"Grenoble" "Paul Mistral"
    +				}
    +				?place geo:NamePlace ?placeName.
    +				?pand geo:hasGeometry/geo:asWKT ?shape;
    +			}
    +
    +		}
    +		?pand geo:measuredHeight ?shapeHeight.
    +		# Only retrieve buildings larger then 10 meters.
    +		FILTER ( ?shapeHeight < 10 ) .
    +		BIND(IF(!bound(?EindGeldigheid5), "#22b14c", "#ed1c24" ) AS?tColor)
    +		# tekst label
    +		bind(concat(str(?streetName),' ',str(?houseNumber),', ',str(?PlaceName)) as ?shapeName)
    +		bind("""Multi-line
    +		String Element
    +		""" as ?shapeLabel)
    +	}
    +	group by ?shape ?shapeColor ?shapeHeight ?shapeName
    +	limit 10
    +
    diff --git a/plugins/autoloader/prism-autoloader.js b/plugins/autoloader/prism-autoloader.js index 4c626db829..e99824fbe6 100644 --- a/plugins/autoloader/prism-autoloader.js +++ b/plugins/autoloader/prism-autoloader.js @@ -100,6 +100,7 @@ "smarty": "markup-templating", "solidity": "clike", "soy": "markup-templating", + "sparql": "turtle", "swift": "clike", "tap": "yaml", "textile": "markup", @@ -155,6 +156,7 @@ "py": "python", "robot": "robot-framework", "rb": "ruby", + "rq": "sparql", "trig": "turtle", "ts": "typescript", "t4": "t4-cs", diff --git a/plugins/autoloader/prism-autoloader.min.js b/plugins/autoloader/prism-autoloader.min.js index 2b19601910..c8399269e7 100644 --- a/plugins/autoloader/prism-autoloader.min.js +++ b/plugins/autoloader/prism-autoloader.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof self&&self.Prism&&self.document&&document.createElement){var c={javascript:"clike",actionscript:"javascript",arduino:"cpp",aspnet:["markup","csharp"],bison:"c",c:"clike",csharp:"clike",cpp:"c",coffeescript:"javascript",crystal:"ruby","css-extras":"css",d:"clike",dart:"clike",django:"markup-templating",ejs:["javascript","markup-templating"],erb:["ruby","markup-templating"],fsharp:"clike","firestore-security-rules":"clike",flow:"javascript",glsl:"clike",gml:"clike",go:"clike",groovy:"clike",haml:"ruby",handlebars:"markup-templating",haxe:"clike",java:"clike",javadoc:["markup","java","javadoclike"],jolie:"clike",jsdoc:["javascript","javadoclike"],"js-extras":"javascript","js-templates":"javascript",jsonp:"json",json5:"json",kotlin:"clike",less:"css",lilypond:"scheme",markdown:"markup","markup-templating":"markup",n4js:"javascript",nginx:"clike",objectivec:"c",opencl:"cpp",parser:"markup",php:["clike","markup-templating"],phpdoc:["php","javadoclike"],"php-extras":"php",plsql:"sql",processing:"clike",protobuf:"clike",pug:["markup","javascript"],qore:"clike",jsx:["markup","javascript"],tsx:["jsx","typescript"],reason:"clike",ruby:"clike",sas:"sql",sass:"css",scss:"css",scala:"java","shell-session":"bash",smarty:"markup-templating",solidity:"clike",soy:"markup-templating",swift:"clike",tap:"yaml",textile:"markup",tt2:["clike","markup-templating"],twig:"markup",typescript:"javascript","t4-cs":["t4-templating","csharp"],"t4-vb":["t4-templating","visual-basic"],vala:"clike",vbnet:"basic",velocity:"markup",wiki:"markup",xeora:"markup",xquery:"markup"},l={html:"markup",xml:"markup",svg:"markup",mathml:"markup",js:"javascript",adoc:"asciidoc",shell:"bash",rbnf:"bnf",cs:"csharp",dotnet:"csharp",coffee:"coffeescript",jinja2:"django","dns-zone":"dns-zone-file",dockerfile:"docker",gamemakerlanguage:"gml",hs:"haskell",tex:"latex",context:"latex",ly:"lilypond",emacs:"lisp",elisp:"lisp","emacs-lisp":"lisp",md:"markdown",n4jsd:"n4js",objectpascal:"pascal",px:"pcaxis",py:"python",robot:"robot-framework",rb:"ruby",trig:"turtle",ts:"typescript",t4:"t4-cs",vb:"visual-basic",xeoracube:"xeora",yml:"yaml"},n={},e=document.getElementsByTagName("script"),a=e[e.length-1],t="components/",s=/\bplugins\/autoloader\/prism-autoloader\.(?:min\.)js$/i,i=/[\w-]+\.(?:min\.)js$/i;if(a.hasAttribute("data-autoloader-path"))t=a.getAttribute("data-autoloader-path").trim().replace(/\/?$/,"/");else{var r=a.src;s.test(r)?t=r.replace(s,"components/"):i.test(r)&&(t=r.replace(i,"components/"))}var p=Prism.plugins.autoloader={languages_path:t,use_minified:!0,loadLanguages:o};Prism.hooks.add("complete",function(e){e.element&&e.language&&!e.grammar&&"none"!==e.language&&function(e,a){e in l&&(e=l[e]);var t=a.getAttribute("data-dependencies"),s=a.parentElement;!t&&s&&"pre"===s.tagName.toLowerCase()&&(t=s.getAttribute("data-dependencies")),o(t=t?t.split(/\s*,\s*/g):[],function(){m(e,function(){Prism.highlightElement(a)})})}(e.language,e.element)})}function o(e,a,t){"string"==typeof e&&(e=[e]);var s=e.length,i=0,r=!1;function c(){r||++i===s&&a&&a(e)}0!==s?e.forEach(function(e){m(e,c,function(){r||(r=!0,t&&t(e))})}):a&&setTimeout(a,0)}function m(a,t,s){var i=0<=a.indexOf("!");a=a.replace("!",""),a=l[a]||a;var e=function(){var e=n[a];if(e||(e=n[a]={callbacks:[]}),e.callbacks.push({success:t,error:s}),!i&&Prism.languages[a])u(a,"success");else if(!i&&e.error)u(a,"error");else if(i||!e.loading){e.loading=!0,function(e,a,t){var s=document.createElement("script");s.src=e,s.async=!0,s.onload=function(){document.body.removeChild(s),a&&a()},s.onerror=function(){document.body.removeChild(s),t&&t()},document.body.appendChild(s)}(function(e){return p.languages_path+"prism-"+e+(p.use_minified?".min":"")+".js"}(a),function(){e.loading=!1,u(a,"success")},function(){e.loading=!1,e.error=!0,u(a,"error")})}},r=c[a];r&&r.length?o(r,e,s):e()}function u(e,a){if(n[e]){for(var t=n[e].callbacks,s=0,i=t.length;s + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +---------------------------------------------------- + +[ + ["url", [ + ["punctuation", "<"], + "http://foo.com/blah_blah", + ["punctuation", ">"] + ]], + ["url", [ + ["punctuation", "<"], + "http://foo.com/blah_blah/", + ["punctuation", ">"] + ]], + ["url", [ + ["punctuation", "<"], + "http://foo.com/blah_blah_(wikipedia)", + ["punctuation", ">"] + ]], + ["url", [ + ["punctuation", "<"], + "http://foo.com/blah_blah_(wikipedia)_(again)", + ["punctuation", ">"] + ]], + ["url", [ + ["punctuation", "<"], + "http://www.example.com/wpstyle/?p=364", + ["punctuation", ">"] + ]], + ["url", [ + ["punctuation", "<"], + "https://www.example.com/foo/?bar=baz&inga=42&quux", + ["punctuation", ">"] + ]], + ["url", [ + ["punctuation", "<"], + "http://✪df.ws/123", + ["punctuation", ">"] + ]], + ["url", [ + ["punctuation", "<"], + "http://userid:password@example.com:8080", + ["punctuation", ">"] + ]], + ["url", [ + ["punctuation", "<"], + "http://userid:password@example.com:8080/", + ["punctuation", ">"] + ]], + ["url", [ + ["punctuation", "<"], + "http://userid@example.com", + ["punctuation", ">"] + ]], + ["url", [ + ["punctuation", "<"], + "http://userid@example.com/", + ["punctuation", ">"] + ]], + ["url", [ + ["punctuation", "<"], + "http://userid@example.com:8080", + ["punctuation", ">"] + ]], + ["url", [ + ["punctuation", "<"], + "http://userid@example.com:8080/", + ["punctuation", ">"] + ]], + ["url", [ + ["punctuation", "<"], + "http://userid:password@example.com", + ["punctuation", ">"] + ]], + ["url", [ + ["punctuation", "<"], + "http://userid:password@example.com/", + ["punctuation", ">"] + ]], + ["url", [ + ["punctuation", "<"], + "http://142.42.1.1/", + ["punctuation", ">"] + ]], + ["url", [ + ["punctuation", "<"], + "http://142.42.1.1:8080/", + ["punctuation", ">"] + ]], + ["url", [ + ["punctuation", "<"], + "http://➡.ws/䨹", + ["punctuation", ">"] + ]], + ["url", [ + ["punctuation", "<"], + "http://⌘.ws", + ["punctuation", ">"] + ]], + ["url", [ + ["punctuation", "<"], + "http://⌘.ws/", + ["punctuation", ">"] + ]], + ["url", [ + ["punctuation", "<"], + "http://foo.com/blah_(wikipedia)#cite-1", + ["punctuation", ">"] + ]], + ["url", [ + ["punctuation", "<"], + "http://foo.com/blah_(wikipedia)_blah#cite-1", + ["punctuation", ">"] + ]], + ["url", [ + ["punctuation", "<"], + "http://foo.com/unicode_(✪)_in_parens", + ["punctuation", ">"] + ]], + ["url", [ + ["punctuation", "<"], + "http://foo.com/(something)?after=parens", + ["punctuation", ">"] + ]], + ["url", [ + ["punctuation", "<"], + "http://☺.damowmow.com/", + ["punctuation", ">"] + ]], + ["url", [ + ["punctuation", "<"], + "http://code.google.com/events/#&product=browser", + ["punctuation", ">"] + ]], + ["url", [ + ["punctuation", "<"], + "http://j.mp", + ["punctuation", ">"] + ]], + ["url", [ + ["punctuation", "<"], + "ftp://foo.bar/baz", + ["punctuation", ">"] + ]], + ["url", [ + ["punctuation", "<"], + "http://foo.bar/?q=Test%20URL-encoded%20stuff", + ["punctuation", ">"] + ]], + ["url", [ + ["punctuation", "<"], + "http://مثال.إختبار", + ["punctuation", ">"] + ]], + ["url", [ + ["punctuation", "<"], + "http://例子.测试", + ["punctuation", ">"] + ]], + ["url", [ + ["punctuation", "<"], + "http://उदाहरण.परीक्षा", + ["punctuation", ">"] + ]], + ["url", [ + ["punctuation", "<"], + "http://-.~_!$&'()*+,;=:%40:80%2f::::::@example.com", + ["punctuation", ">"] + ]], + ["url", [ + ["punctuation", "<"], + "http://1337.net", + ["punctuation", ">"] + ]], + ["url", [ + ["punctuation", "<"], + "http://a.b-c.de", + ["punctuation", ">"] + ]], + ["url", [ + ["punctuation", "<"], + "http://223.255.255.254", + ["punctuation", ">"] + ]], + ["url", [ + ["punctuation", "<"], + "https://foo_bar.example.com/", + ["punctuation", ">"] + ]] +] + + +---------------------------------------------------- + +Checks for IRI's. diff --git a/tests/languages/sparql/variable_feature.test b/tests/languages/sparql/variable_feature.test new file mode 100644 index 0000000000..cacb326520 --- /dev/null +++ b/tests/languages/sparql/variable_feature.test @@ -0,0 +1,18 @@ +?name +$name +?name0 +$name0 + + +---------------------------------------------------- + +[ + ["variable", "?name"], + ["variable", "$name"], + ["variable", "?name0"], + ["variable", "$name0"] +] + +---------------------------------------------------- + +Checks for variables. From 8bcc1b853b8612b493340f7cd2f7b9549001953c Mon Sep 17 00:00:00 2001 From: Christian Oliff Date: Fri, 6 Sep 2019 00:31:20 +0900 Subject: [PATCH 0362/1100] Website: Use HTTPS link to alistapart.com (#2044) This changes the link to alistapart.com to use HTTPS. --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index eceb7e55fa..226e832fe5 100644 --- a/index.html +++ b/index.html @@ -58,7 +58,7 @@

    Used By

    Smashing Magazine - A List Apart + A List Apart Mozilla Developer Network (MDN) CSS-Tricks SitePoint From 6cd0738a99310c4213de82a129bba666814580a4 Mon Sep 17 00:00:00 2001 From: Christian Oliff Date: Fri, 6 Sep 2019 01:19:56 +0900 Subject: [PATCH 0363/1100] Readme: Links now use HTTPS if available (#2045) This changes some link of our README to use HTTPS wherever possible. --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 08a80871a5..b09d6eb81f 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,9 @@ -# [Prism](http://prismjs.com/) +# [Prism](https://prismjs.com/) [![Build Status](https://travis-ci.org/PrismJS/prism.svg?branch=master)](https://travis-ci.org/PrismJS/prism) [![npm](https://img.shields.io/npm/dw/prismjs.svg)](https://www.npmjs.com/package/prismjs) -Prism is a lightweight, robust, elegant syntax highlighting library. It's a spin-off project from [Dabblet](http://dabblet.com/). +Prism is a lightweight, robust, elegant syntax highlighting library. It's a spin-off project from [Dabblet](https://dabblet.com/). You can learn more on [prismjs.com](https://prismjs.com/). @@ -28,4 +28,4 @@ Thank you so much for contributing!! ## Translations -* [![中文说明](http://awesomes.oss-cn-beijing.aliyuncs.com/readme.png)](http://www.awesomes.cn/repo/PrismJS/prism) +* [![中文说明](http://awesomes.oss-cn-beijing.aliyuncs.com/readme.png)](https://www.awesomes.cn/repo/PrismJS/prism) From 1af89e06752327c42f5b57c098b01b108d60b689 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Tue, 10 Sep 2019 13:38:22 +0200 Subject: [PATCH 0364/1100] Added .github folder to npm ignore (#2052) This adds the `.github` folder to `.npmignore` to exclude the directory from future releases. --- .npmignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.npmignore b/.npmignore index 2aca0ca922..a76b964aba 100644 --- a/.npmignore +++ b/.npmignore @@ -4,6 +4,7 @@ hide-*.js .DS_Store CNAME +.github/ examples/ img/ templates/ From 32a4c422a15895be034b9533d9d4e0e98c4bc122 Mon Sep 17 00:00:00 2001 From: Simran Date: Thu, 12 Sep 2019 21:40:54 +0200 Subject: [PATCH 0365/1100] AQL: Added missing keyword + minor improvements (#2047) This adds 5 missing keywords, fixes the operator pattern to support the array concatenation operator properly, and makes the number pattern stricter. --- components/prism-aql.js | 17 ++++- components/prism-aql.min.js | 2 +- tests/languages/aql/keyword_feature.test | 87 +++++++++++++++++++++++ tests/languages/aql/operator_feature.test | 8 ++- tests/languages/aql/property_feature.test | 45 ++++++++++-- 5 files changed, 147 insertions(+), 12 deletions(-) create mode 100644 tests/languages/aql/keyword_feature.test diff --git a/components/prism-aql.js b/components/prism-aql.js index d301928d5b..2947e7365f 100644 --- a/components/prism-aql.js +++ b/components/prism-aql.js @@ -10,14 +10,25 @@ Prism.languages.aql = { greedy: true }, 'variable': /@@?\w+/, - 'keyword': /\b(?:AGGREGATE|ALL|AND|ANY|ASC|COLLECT|DESC|DISTINCT|FILTER|FOR|GRAPH|IN|INBOUND|INSERT|INTO|LET|LIKE|LIMIT|NONE|NOT|NULL|OR|OUTBOUND|REMOVE|REPLACE|RETURN|SHORTEST_PATH|SORT|UPDATE|UPSERT|WITH)\b/i, + 'keyword': [ + /\b(?:AGGREGATE|ALL|AND|ANY|ASC|COLLECT|DESC|DISTINCT|FILTER|FOR|GRAPH|IN|INBOUND|INSERT|INTO|K_SHORTEST_PATHS|LET|LIKE|LIMIT|NONE|NOT|NULL|OR|OUTBOUND|REMOVE|REPLACE|RETURN|SHORTEST_PATH|SORT|UPDATE|UPSERT|WITH)\b/i, + // pseudo keywords get a lookbehind to avoid false positives + { + pattern: /(^|[^\w.[])(?:OPTIONS|SEARCH|TO)\b/i, + lookbehind: true + }, + { + pattern: /(^|[^\w.[])(?:NEW|OLD)\b/, + lookbehind: true + }, + ], 'function': /(?!\d)\w+(?=\s*\()/, 'boolean': /(?:true|false)/i, 'range': { pattern: /\.\./, alias: 'operator' }, - 'number': /(?:\B\.\d+|\b\d+(?:\.\d+)?)(?:e[+-]?\d+)?/i, - 'operator': /\*\*|[=!]~|[!=<>]=?|&&|\|\||[-+*/%]/, + 'number': /(?:\B\.\d+|\b(?:0|[1-9]\d*)(?:\.\d+)?)(?:e[+-]?\d+)?/i, + 'operator': /\*{2,}|[=!]~|[!=<>]=?|&&|\|\||[-+*/%]/, 'punctuation': /::|[?.:,;()[\]{}]/ }; diff --git a/components/prism-aql.min.js b/components/prism-aql.min.js index 038b1d7413..4994fd7177 100644 --- a/components/prism-aql.min.js +++ b/components/prism-aql.min.js @@ -1 +1 @@ -Prism.languages.aql={comment:/\/\/.*|\/\*[\s\S]*?\*\//,property:{pattern:/([{,]\s*)(?:(?!\d)\w+|(["'´`])(?:(?!\2)[^\\\r\n]|\\.)*\2)(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(["'´`])(?:(?!\1)[^\\\r\n]|\\.)*\1/,greedy:!0},variable:/@@?\w+/,keyword:/\b(?:AGGREGATE|ALL|AND|ANY|ASC|COLLECT|DESC|DISTINCT|FILTER|FOR|GRAPH|IN|INBOUND|INSERT|INTO|LET|LIKE|LIMIT|NONE|NOT|NULL|OR|OUTBOUND|REMOVE|REPLACE|RETURN|SHORTEST_PATH|SORT|UPDATE|UPSERT|WITH)\b/i,function:/(?!\d)\w+(?=\s*\()/,boolean:/(?:true|false)/i,range:{pattern:/\.\./,alias:"operator"},number:/(?:\B\.\d+|\b\d+(?:\.\d+)?)(?:e[+-]?\d+)?/i,operator:/\*\*|[=!]~|[!=<>]=?|&&|\|\||[-+*/%]/,punctuation:/::|[?.:,;()[\]{}]/}; \ No newline at end of file +Prism.languages.aql={comment:/\/\/.*|\/\*[\s\S]*?\*\//,property:{pattern:/([{,]\s*)(?:(?!\d)\w+|(["'´`])(?:(?!\2)[^\\\r\n]|\\.)*\2)(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(["'´`])(?:(?!\1)[^\\\r\n]|\\.)*\1/,greedy:!0},variable:/@@?\w+/,keyword:[/\b(?:AGGREGATE|ALL|AND|ANY|ASC|COLLECT|DESC|DISTINCT|FILTER|FOR|GRAPH|IN|INBOUND|INSERT|INTO|K_SHORTEST_PATHS|LET|LIKE|LIMIT|NONE|NOT|NULL|OR|OUTBOUND|REMOVE|REPLACE|RETURN|SHORTEST_PATH|SORT|UPDATE|UPSERT|WITH)\b/i,{pattern:/(^|[^\w.[])(?:OPTIONS|SEARCH|TO)\b/i,lookbehind:!0},{pattern:/(^|[^\w.[])(?:NEW|OLD)\b/,lookbehind:!0}],function:/(?!\d)\w+(?=\s*\()/,boolean:/(?:true|false)/i,range:{pattern:/\.\./,alias:"operator"},number:/(?:\B\.\d+|\b(?:0|[1-9]\d*)(?:\.\d+)?)(?:e[+-]?\d+)?/i,operator:/\*{2,}|[=!]~|[!=<>]=?|&&|\|\||[-+*/%]/,punctuation:/::|[?.:,;()[\]{}]/}; \ No newline at end of file diff --git a/tests/languages/aql/keyword_feature.test b/tests/languages/aql/keyword_feature.test new file mode 100644 index 0000000000..99645e09d4 --- /dev/null +++ b/tests/languages/aql/keyword_feature.test @@ -0,0 +1,87 @@ +AGGREGATE +ALL +AND +ANY +ASC +COLLECT +DESC +DISTINCT +FILTER +FOR +GRAPH +IN +INBOUND +INSERT +INTO +K_SHORTEST_PATHS +LET +LIKE +LIMIT +NONE +NOT +NULL +OR +OUTBOUND +REMOVE +REPLACE +RETURN +SHORTEST_PATH +SORT +UPDATE +UPSERT +WITH + +OPTIONS +SEARCH +TO + +OLD +NEW + +---------------------------------------------------- + +[ + ["keyword", "AGGREGATE"], + ["keyword", "ALL"], + ["keyword", "AND"], + ["keyword", "ANY"], + ["keyword", "ASC"], + ["keyword", "COLLECT"], + ["keyword", "DESC"], + ["keyword", "DISTINCT"], + ["keyword", "FILTER"], + ["keyword", "FOR"], + ["keyword", "GRAPH"], + ["keyword", "IN"], + ["keyword", "INBOUND"], + ["keyword", "INSERT"], + ["keyword", "INTO"], + ["keyword", "K_SHORTEST_PATHS"], + ["keyword", "LET"], + ["keyword", "LIKE"], + ["keyword", "LIMIT"], + ["keyword", "NONE"], + ["keyword", "NOT"], + ["keyword", "NULL"], + ["keyword", "OR"], + ["keyword", "OUTBOUND"], + ["keyword", "REMOVE"], + ["keyword", "REPLACE"], + ["keyword", "RETURN"], + ["keyword", "SHORTEST_PATH"], + ["keyword", "SORT"], + ["keyword", "UPDATE"], + ["keyword", "UPSERT"], + ["keyword", "WITH"], + + ["keyword", "OPTIONS"], + ["keyword", "SEARCH"], + ["keyword", "TO"], + + ["keyword", "OLD"], + ["keyword", "NEW"] +] + +---------------------------------------------------- + +Checks for keywords. diff --git a/tests/languages/aql/operator_feature.test b/tests/languages/aql/operator_feature.test index 21872c3fe9..9b0d1313b3 100644 --- a/tests/languages/aql/operator_feature.test +++ b/tests/languages/aql/operator_feature.test @@ -4,7 +4,7 @@ ! && || -[**] +[**] [***] [****] .. 1..100 @@ -36,6 +36,12 @@ ["punctuation", "["], ["operator", "**"], ["punctuation", "]"], + ["punctuation", "["], + ["operator", "***"], + ["punctuation", "]"], + ["punctuation", "["], + ["operator", "****"], + ["punctuation", "]"], ["range", ".."], diff --git a/tests/languages/aql/property_feature.test b/tests/languages/aql/property_feature.test index ed06c7c463..6c9c468b18 100644 --- a/tests/languages/aql/property_feature.test +++ b/tests/languages/aql/property_feature.test @@ -7,6 +7,9 @@ // not a property LET opType = IS_NULL(OLD) ? "insert" : "update" +LET foo = { to: 5, search: 6, options: 7 } +LET bar = foo.search + foo[options] + foo["to"] + ---------------------------------------------------- [ @@ -15,25 +18,21 @@ LET opType = IS_NULL(OLD) ? "insert" : "update" ["punctuation", ":"], " … ", ["punctuation", "}"], - ["punctuation", "{"], ["property", "'foo'"], ["punctuation", ":"], " … ", ["punctuation", "}"], - ["punctuation", "{"], ["property", "\"foo\""], ["punctuation", ":"], " … ", ["punctuation", "}"], - ["punctuation", "{"], ["property", "`foo`"], ["punctuation", ":"], " … ", ["punctuation", "}"], - ["punctuation", "{"], ["property", "´foo´"], ["punctuation", ":"], @@ -41,18 +40,50 @@ LET opType = IS_NULL(OLD) ? "insert" : "update" ["punctuation", "}"], ["comment", "// not a property"], - ["keyword", "LET"], " opType ", ["operator", "="], ["function", "IS_NULL"], ["punctuation", "("], - "OLD", + ["keyword", "OLD"], ["punctuation", ")"], ["punctuation", "?"], ["string", "\"insert\""], ["punctuation", ":"], - ["string", "\"update\""] + ["string", "\"update\""], + + ["keyword", "LET"], + " foo ", + ["operator", "="], + ["punctuation", "{"], + ["property", "to"], + ["punctuation", ":"], + ["number", "5"], + ["punctuation", ","], + ["property", "search"], + ["punctuation", ":"], + ["number", "6"], + ["punctuation", ","], + ["property", "options"], + ["punctuation", ":"], + ["number", "7"], + ["punctuation", "}"], + ["keyword", "LET"], + " bar ", + ["operator", "="], + " foo", + ["punctuation", "."], + "search ", + ["operator", "+"], + " foo", + ["punctuation", "["], + "options", + ["punctuation", "]"], + ["operator", "+"], + " foo", + ["punctuation", "["], + ["string", "\"to\""], + ["punctuation", "]"] ] ---------------------------------------------------- From 899574eb25b9f23843e85f6d421ce529a2adf894 Mon Sep 17 00:00:00 2001 From: Simran Date: Mon, 16 Sep 2019 18:12:48 +0200 Subject: [PATCH 0366/1100] AQL: More pseudo keywords (#2055) This adds `COUNT`, `CURRENT`, `KEEP`, and `PRUNE` to the list of keywords such that false positives are (mostly) avoided. --- components/prism-aql.js | 11 ++++- components/prism-aql.min.js | 2 +- tests/languages/aql/keyword_feature.test | 28 +++++++++-- tests/languages/aql/property_feature.test | 59 ++++++++++++++++++++--- 4 files changed, 85 insertions(+), 15 deletions(-) diff --git a/components/prism-aql.js b/components/prism-aql.js index 2947e7365f..2de15228c3 100644 --- a/components/prism-aql.js +++ b/components/prism-aql.js @@ -11,16 +11,23 @@ Prism.languages.aql = { }, 'variable': /@@?\w+/, 'keyword': [ + { + pattern: /(\bWITH\s+)COUNT(?=\s+INTO\b)/i, + lookbehind: true + }, /\b(?:AGGREGATE|ALL|AND|ANY|ASC|COLLECT|DESC|DISTINCT|FILTER|FOR|GRAPH|IN|INBOUND|INSERT|INTO|K_SHORTEST_PATHS|LET|LIKE|LIMIT|NONE|NOT|NULL|OR|OUTBOUND|REMOVE|REPLACE|RETURN|SHORTEST_PATH|SORT|UPDATE|UPSERT|WITH)\b/i, // pseudo keywords get a lookbehind to avoid false positives { - pattern: /(^|[^\w.[])(?:OPTIONS|SEARCH|TO)\b/i, + pattern: /(^|[^\w.[])(?:KEEP|PRUNE|SEARCH|TO)\b/i, lookbehind: true }, { - pattern: /(^|[^\w.[])(?:NEW|OLD)\b/, + pattern: /(^|[^\w.[])(?:CURRENT|NEW|OLD)\b/, lookbehind: true }, + { + pattern: /\bOPTIONS(?=\s*{)/i + } ], 'function': /(?!\d)\w+(?=\s*\()/, 'boolean': /(?:true|false)/i, diff --git a/components/prism-aql.min.js b/components/prism-aql.min.js index 4994fd7177..5fa9a63cd0 100644 --- a/components/prism-aql.min.js +++ b/components/prism-aql.min.js @@ -1 +1 @@ -Prism.languages.aql={comment:/\/\/.*|\/\*[\s\S]*?\*\//,property:{pattern:/([{,]\s*)(?:(?!\d)\w+|(["'´`])(?:(?!\2)[^\\\r\n]|\\.)*\2)(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(["'´`])(?:(?!\1)[^\\\r\n]|\\.)*\1/,greedy:!0},variable:/@@?\w+/,keyword:[/\b(?:AGGREGATE|ALL|AND|ANY|ASC|COLLECT|DESC|DISTINCT|FILTER|FOR|GRAPH|IN|INBOUND|INSERT|INTO|K_SHORTEST_PATHS|LET|LIKE|LIMIT|NONE|NOT|NULL|OR|OUTBOUND|REMOVE|REPLACE|RETURN|SHORTEST_PATH|SORT|UPDATE|UPSERT|WITH)\b/i,{pattern:/(^|[^\w.[])(?:OPTIONS|SEARCH|TO)\b/i,lookbehind:!0},{pattern:/(^|[^\w.[])(?:NEW|OLD)\b/,lookbehind:!0}],function:/(?!\d)\w+(?=\s*\()/,boolean:/(?:true|false)/i,range:{pattern:/\.\./,alias:"operator"},number:/(?:\B\.\d+|\b(?:0|[1-9]\d*)(?:\.\d+)?)(?:e[+-]?\d+)?/i,operator:/\*{2,}|[=!]~|[!=<>]=?|&&|\|\||[-+*/%]/,punctuation:/::|[?.:,;()[\]{}]/}; \ No newline at end of file +Prism.languages.aql={comment:/\/\/.*|\/\*[\s\S]*?\*\//,property:{pattern:/([{,]\s*)(?:(?!\d)\w+|(["'´`])(?:(?!\2)[^\\\r\n]|\\.)*\2)(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(["'´`])(?:(?!\1)[^\\\r\n]|\\.)*\1/,greedy:!0},variable:/@@?\w+/,keyword:[{pattern:/(\bWITH\s+)COUNT(?=\s+INTO\b)/i,lookbehind:!0},/\b(?:AGGREGATE|ALL|AND|ANY|ASC|COLLECT|DESC|DISTINCT|FILTER|FOR|GRAPH|IN|INBOUND|INSERT|INTO|K_SHORTEST_PATHS|LET|LIKE|LIMIT|NONE|NOT|NULL|OR|OUTBOUND|REMOVE|REPLACE|RETURN|SHORTEST_PATH|SORT|UPDATE|UPSERT|WITH)\b/i,{pattern:/(^|[^\w.[])(?:KEEP|PRUNE|SEARCH|TO)\b/i,lookbehind:!0},{pattern:/(^|[^\w.[])(?:CURRENT|NEW|OLD)\b/,lookbehind:!0},{pattern:/\bOPTIONS(?=\s*{)/i}],function:/(?!\d)\w+(?=\s*\()/,boolean:/(?:true|false)/i,range:{pattern:/\.\./,alias:"operator"},number:/(?:\B\.\d+|\b(?:0|[1-9]\d*)(?:\.\d+)?)(?:e[+-]?\d+)?/i,operator:/\*{2,}|[=!]~|[!=<>]=?|&&|\|\||[-+*/%]/,punctuation:/::|[?.:,;()[\]{}]/}; \ No newline at end of file diff --git a/tests/languages/aql/keyword_feature.test b/tests/languages/aql/keyword_feature.test index 99645e09d4..204d45785e 100644 --- a/tests/languages/aql/keyword_feature.test +++ b/tests/languages/aql/keyword_feature.test @@ -1,3 +1,6 @@ +WITH COUNT INTO +COUNT + AGGREGATE ALL AND @@ -31,16 +34,26 @@ UPDATE UPSERT WITH -OPTIONS +KEEP +PRUNE SEARCH TO -OLD +CURRENT NEW +OLD + +OPTIONS {} +OPTIONS ---------------------------------------------------- [ + ["keyword", "WITH"], + ["keyword", "COUNT"], + ["keyword", "INTO"], + "\r\nCOUNT\r\n\r\n", + ["keyword", "AGGREGATE"], ["keyword", "ALL"], ["keyword", "AND"], @@ -74,12 +87,19 @@ NEW ["keyword", "UPSERT"], ["keyword", "WITH"], - ["keyword", "OPTIONS"], + ["keyword", "KEEP"], + ["keyword", "PRUNE"], ["keyword", "SEARCH"], ["keyword", "TO"], + ["keyword", "CURRENT"], + ["keyword", "NEW"], ["keyword", "OLD"], - ["keyword", "NEW"] + + ["keyword", "OPTIONS"], + ["punctuation", "{"], + ["punctuation", "}"], + "\r\nOPTIONS" ] ---------------------------------------------------- diff --git a/tests/languages/aql/property_feature.test b/tests/languages/aql/property_feature.test index 6c9c468b18..9783aa3d24 100644 --- a/tests/languages/aql/property_feature.test +++ b/tests/languages/aql/property_feature.test @@ -7,8 +7,8 @@ // not a property LET opType = IS_NULL(OLD) ? "insert" : "update" -LET foo = { to: 5, search: 6, options: 7 } -LET bar = foo.search + foo[options] + foo["to"] +LET foo = { CURRENT: 1, keep: 2, NEW: 3, OLD: 4, options: 5, prune: 6, search: 7, to: 8 } +LET bar = foo[CURRENT] + foo.NEW + foo["OLD"] + foo[keep] + foo.options + foo["prune"] + foo.search + foo[to] ---------------------------------------------------- @@ -56,33 +56,76 @@ LET bar = foo.search + foo[options] + foo["to"] " foo ", ["operator", "="], ["punctuation", "{"], - ["property", "to"], + ["property", "CURRENT"], + ["punctuation", ":"], + ["number", "1"], + ["punctuation", ","], + ["property", "keep"], + ["punctuation", ":"], + ["number", "2"], + ["punctuation", ","], + ["property", "NEW"], + ["punctuation", ":"], + ["number", "3"], + ["punctuation", ","], + ["property", "OLD"], + ["punctuation", ":"], + ["number", "4"], + ["punctuation", ","], + ["property", "options"], ["punctuation", ":"], ["number", "5"], ["punctuation", ","], - ["property", "search"], + ["property", "prune"], ["punctuation", ":"], ["number", "6"], ["punctuation", ","], - ["property", "options"], + ["property", "search"], ["punctuation", ":"], ["number", "7"], + ["punctuation", ","], + ["property", "to"], + ["punctuation", ":"], + ["number", "8"], ["punctuation", "}"], ["keyword", "LET"], " bar ", ["operator", "="], " foo", + ["punctuation", "["], + "CURRENT", + ["punctuation", "]"], + ["operator", "+"], + " foo", ["punctuation", "."], - "search ", + "NEW ", + ["operator", "+"], + " foo", + ["punctuation", "["], + ["string", "\"OLD\""], + ["punctuation", "]"], + ["operator", "+"], + " foo", + ["punctuation", "["], + "keep", + ["punctuation", "]"], + ["operator", "+"], + " foo", + ["punctuation", "."], + "options ", ["operator", "+"], " foo", ["punctuation", "["], - "options", + ["string", "\"prune\""], ["punctuation", "]"], ["operator", "+"], " foo", + ["punctuation", "."], + "search ", + ["operator", "+"], + " foo", ["punctuation", "["], - ["string", "\"to\""], + "to", ["punctuation", "]"] ] From f3c6ba590345b140a2306903a5396e28187466eb Mon Sep 17 00:00:00 2001 From: Simran Date: Wed, 18 Sep 2019 14:57:34 +0200 Subject: [PATCH 0367/1100] AQL: Allow unclosed multi-line comments (#2058) AQL does not require multi-line comments to be closed. ArangoDB simply treats everything until the end of the query string as a comment in that case. This PR adjusts Prism to highlight such comments correctly. --- components/prism-aql.js | 2 +- components/prism-aql.min.js | 2 +- tests/languages/aql/comment_feature.test | 5 ++++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/components/prism-aql.js b/components/prism-aql.js index 2de15228c3..3ee8a02dce 100644 --- a/components/prism-aql.js +++ b/components/prism-aql.js @@ -1,5 +1,5 @@ Prism.languages.aql = { - 'comment': /\/\/.*|\/\*[\s\S]*?\*\//, + 'comment': /\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/, 'property': { pattern: /([{,]\s*)(?:(?!\d)\w+|(["'´`])(?:(?!\2)[^\\\r\n]|\\.)*\2)(?=\s*:)/, lookbehind: true, diff --git a/components/prism-aql.min.js b/components/prism-aql.min.js index 5fa9a63cd0..c7bd24848e 100644 --- a/components/prism-aql.min.js +++ b/components/prism-aql.min.js @@ -1 +1 @@ -Prism.languages.aql={comment:/\/\/.*|\/\*[\s\S]*?\*\//,property:{pattern:/([{,]\s*)(?:(?!\d)\w+|(["'´`])(?:(?!\2)[^\\\r\n]|\\.)*\2)(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(["'´`])(?:(?!\1)[^\\\r\n]|\\.)*\1/,greedy:!0},variable:/@@?\w+/,keyword:[{pattern:/(\bWITH\s+)COUNT(?=\s+INTO\b)/i,lookbehind:!0},/\b(?:AGGREGATE|ALL|AND|ANY|ASC|COLLECT|DESC|DISTINCT|FILTER|FOR|GRAPH|IN|INBOUND|INSERT|INTO|K_SHORTEST_PATHS|LET|LIKE|LIMIT|NONE|NOT|NULL|OR|OUTBOUND|REMOVE|REPLACE|RETURN|SHORTEST_PATH|SORT|UPDATE|UPSERT|WITH)\b/i,{pattern:/(^|[^\w.[])(?:KEEP|PRUNE|SEARCH|TO)\b/i,lookbehind:!0},{pattern:/(^|[^\w.[])(?:CURRENT|NEW|OLD)\b/,lookbehind:!0},{pattern:/\bOPTIONS(?=\s*{)/i}],function:/(?!\d)\w+(?=\s*\()/,boolean:/(?:true|false)/i,range:{pattern:/\.\./,alias:"operator"},number:/(?:\B\.\d+|\b(?:0|[1-9]\d*)(?:\.\d+)?)(?:e[+-]?\d+)?/i,operator:/\*{2,}|[=!]~|[!=<>]=?|&&|\|\||[-+*/%]/,punctuation:/::|[?.:,;()[\]{}]/}; \ No newline at end of file +Prism.languages.aql={comment:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,property:{pattern:/([{,]\s*)(?:(?!\d)\w+|(["'´`])(?:(?!\2)[^\\\r\n]|\\.)*\2)(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(["'´`])(?:(?!\1)[^\\\r\n]|\\.)*\1/,greedy:!0},variable:/@@?\w+/,keyword:[{pattern:/(\bWITH\s+)COUNT(?=\s+INTO\b)/i,lookbehind:!0},/\b(?:AGGREGATE|ALL|AND|ANY|ASC|COLLECT|DESC|DISTINCT|FILTER|FOR|GRAPH|IN|INBOUND|INSERT|INTO|K_SHORTEST_PATHS|LET|LIKE|LIMIT|NONE|NOT|NULL|OR|OUTBOUND|REMOVE|REPLACE|RETURN|SHORTEST_PATH|SORT|UPDATE|UPSERT|WITH)\b/i,{pattern:/(^|[^\w.[])(?:KEEP|PRUNE|SEARCH|TO)\b/i,lookbehind:!0},{pattern:/(^|[^\w.[])(?:CURRENT|NEW|OLD)\b/,lookbehind:!0},{pattern:/\bOPTIONS(?=\s*{)/i}],function:/(?!\d)\w+(?=\s*\()/,boolean:/(?:true|false)/i,range:{pattern:/\.\./,alias:"operator"},number:/(?:\B\.\d+|\b(?:0|[1-9]\d*)(?:\.\d+)?)(?:e[+-]?\d+)?/i,operator:/\*{2,}|[=!]~|[!=<>]=?|&&|\|\||[-+*/%]/,punctuation:/::|[?.:,;()[\]{}]/}; \ No newline at end of file diff --git a/tests/languages/aql/comment_feature.test b/tests/languages/aql/comment_feature.test index ea3f62ae31..3de3149229 100644 --- a/tests/languages/aql/comment_feature.test +++ b/tests/languages/aql/comment_feature.test @@ -3,12 +3,15 @@ multi line */ +/* unclosed multi-line comments are allowed +RETURN 1 ---------------------------------------------------- [ ["comment", "// single line"], - ["comment", "/*\r\n multi\r\n line\r\n */"] + ["comment", "/*\r\n multi\r\n line\r\n */"], + ["comment", "/* unclosed multi-line comments are allowed\r\nRETURN 1"] ] ---------------------------------------------------- From 007c9af4b664fb34d4f9e77a4245aa10bab81aff Mon Sep 17 00:00:00 2001 From: Simran Date: Wed, 18 Sep 2019 18:32:47 +0200 Subject: [PATCH 0368/1100] Tests: Simplified error message format (#2056) The error messages will now only contain the actual token stream the failed test and a full path of the test file plus the line and column number of the position of the first difference between the expected token stream and the actual token stream. --- tests/helper/test-case.js | 87 ++++++++++++++++++++++++++++++++------- 1 file changed, 71 insertions(+), 16 deletions(-) diff --git a/tests/helper/test-case.js b/tests/helper/test-case.js index 4f14cee08a..7fe1062afb 100644 --- a/tests/helper/test-case.js +++ b/tests/helper/test-case.js @@ -64,24 +64,27 @@ module.exports = { // the first language is the main language to highlight const simplifiedTokenStream = this.simpleTokenize(Prism, testCase.testSource, usedLanguages.mainLanguage); - const tzd = JSON.stringify(simplifiedTokenStream); - const exp = JSON.stringify(testCase.expectedTokenStream); - let i = 0; - let j = 0; - let diff = ""; - while (j < tzd.length) { - if (exp[i] != tzd[j] || i == exp.length) - diff += tzd[j]; - else - i++; - j++; + const actual = JSON.stringify(simplifiedTokenStream); + const expected = JSON.stringify(testCase.expectedTokenStream); + + if (actual === expected) { + // no difference + return; } - const tokenStreamStr = pretty ? TokenStreamTransformer.prettyprint(simplifiedTokenStream) : tzd; - const message = "\nToken Stream: \n" + tokenStreamStr + + // The index of the first difference between the expected token stream and the actual token stream. + // The index is in the raw expected token stream JSON of the test case. + const diffIndex = translateIndexIgnoreSpaces(testCase.expectedJson, expected, firstDiff(expected, actual)); + const expectedJsonLines = testCase.expectedJson.substr(0, diffIndex).split(/\r\n?|\n/g); + const columnNumber = expectedJsonLines.pop().length + 1; + const lineNumber = testCase.expectedLineOffset + expectedJsonLines.length; + + const tokenStreamStr = pretty ? TokenStreamTransformer.prettyprint(simplifiedTokenStream) : actual; + const message = "\n\nActual Token Stream:" + + "\n-----------------------------------------\n" + + tokenStreamStr + "\n-----------------------------------------\n" + - "Expected Token Stream: \n" + exp + - "\n-----------------------------------------\n" + diff; + "File: " + filePath + ":" + lineNumber + ":" + columnNumber + "\n\n"; assert.deepEqual(simplifiedTokenStream, testCase.expectedTokenStream, testCase.comment + message); }, @@ -158,7 +161,6 @@ module.exports = { * * @private * @param {string} filePath - * @returns {{testSource: string, expectedTokenStream: Array.>, comment:string?}|null} */ parseTestCaseFile(filePath) { const testCaseSource = fs.readFileSync(filePath, "utf8"); @@ -167,6 +169,8 @@ module.exports = { try { const testCase = { testSource: testCaseParts[0].trim(), + expectedJson: testCaseParts[1], + expectedLineOffset: testCaseParts[0].split(/\r\n?|\n/g).length, expectedTokenStream: JSON.parse(testCaseParts[1]), comment: null }; @@ -217,3 +221,54 @@ module.exports = { } } }; + +/** + * Returns the index at which the given expected string differs from the given actual string. + * + * This will returns `undefined` if the strings are equal. + * + * @param {string} expected + * @param {string} actual + * @returns {number | undefined} + */ +function firstDiff(expected, actual) { + let i = 0; + let j = 0; + while (i < expected.length && j < actual.length) { + if (expected[i] !== actual[j]) { + return i; + } + i++; j++; + } + + if (i == expected.length && j == actual.length) { + return undefined; + } + return i; +} + +/** + * Translates an index within a string (`withoutSpaces`) to the index of another string (`spacey`) where the only + * difference between the two strings is that the other string can have any number of additional white spaces at any + * position. + * + * In out use case, the `withoutSpaces` string is an unformatted JSON string and the `spacey` string is a formatted JSON + * string. + * + * @param {string} spacey + * @param {string} withoutSpaces + * @param {number} withoutSpaceIndex + * @returns {number | undefined} + */ +function translateIndexIgnoreSpaces(spacey, withoutSpaces, withoutSpaceIndex) { + let i = 0; + let j = 0; + while (i < spacey.length && j < withoutSpaces.length) { + while (spacey[i] !== withoutSpaces[j]) i++; + if (j === withoutSpaceIndex) { + return i; + } + i++; j++; + } + return undefined; +} From a7b95dd3aafd8967d594e67c2e4e7f95b4140a67 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Tue, 24 Sep 2019 17:38:09 +0200 Subject: [PATCH 0369/1100] Added support for syntax in Java 13 (#2060) This adds support for the new `yield` keyword and text blocks (triple quoted strings) which are both introduced in Java 13. --- components/prism-java.js | 11 ++++- components/prism-java.min.js | 2 +- components/prism-scala.js | 19 ++++----- components/prism-scala.min.js | 2 +- tests/languages/java/keyword_feature.test | 4 +- tests/languages/java/string_feature.test | 50 +++++++++++++++++++++++ tests/languages/scala/string_feature.test | 6 +-- 7 files changed, 77 insertions(+), 17 deletions(-) create mode 100644 tests/languages/java/string_feature.test diff --git a/components/prism-java.js b/components/prism-java.js index 6433162652..4704d25e21 100644 --- a/components/prism-java.js +++ b/components/prism-java.js @@ -1,6 +1,6 @@ (function (Prism) { - var keywords = /\b(?:abstract|continue|for|new|switch|assert|default|goto|package|synchronized|boolean|do|if|private|this|break|double|implements|protected|throw|byte|else|import|public|throws|case|enum|instanceof|return|transient|catch|extends|int|short|try|char|final|interface|static|void|class|finally|long|strictfp|volatile|const|float|native|super|while|var|null|exports|module|open|opens|provides|requires|to|transitive|uses|with)\b/; + var keywords = /\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|null|open|opens|package|private|protected|provides|public|requires|return|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/; // based on the java naming conventions var className = /\b[A-Z](?:\w*[a-z]\w*)?\b/; @@ -28,6 +28,15 @@ } }); + Prism.languages.insertBefore('java', 'string', { + 'triple-quoted-string': { + // http://openjdk.java.net/jeps/355#Description + pattern: /"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/, + greedy: true, + alias: 'string' + } + }); + Prism.languages.insertBefore('java', 'class-name', { 'annotation': { alias: 'punctuation', diff --git a/components/prism-java.min.js b/components/prism-java.min.js index 7c3aa01b3d..20a2d47569 100644 --- a/components/prism-java.min.js +++ b/components/prism-java.min.js @@ -1 +1 @@ -!function(e){var t=/\b(?:abstract|continue|for|new|switch|assert|default|goto|package|synchronized|boolean|do|if|private|this|break|double|implements|protected|throw|byte|else|import|public|throws|case|enum|instanceof|return|transient|catch|extends|int|short|try|char|final|interface|static|void|class|finally|long|strictfp|volatile|const|float|native|super|while|var|null|exports|module|open|opens|provides|requires|to|transitive|uses|with)\b/,a=/\b[A-Z](?:\w*[a-z]\w*)?\b/;e.languages.java=e.languages.extend("clike",{"class-name":[a,/\b[A-Z]\w*(?=\s+\w+\s*[;,=())])/],keyword:t,function:[e.languages.clike.function,{pattern:/(\:\:)[a-z_]\w*/,lookbehind:!0}],number:/\b0b[01][01_]*L?\b|\b0x[\da-f_]*\.?[\da-f_p+-]+\b|(?:\b\d[\d_]*\.?[\d_]*|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|([-+&|])\2|[?:~]|[-+*/%&|^!=<>]=?)/m,lookbehind:!0}}),e.languages.insertBefore("java","class-name",{annotation:{alias:"punctuation",pattern:/(^|[^.])@\w+/,lookbehind:!0},namespace:{pattern:/(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)[a-z]\w*(\.[a-z]\w*)+/,lookbehind:!0,inside:{punctuation:/\./}},generics:{pattern:/<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<[\w\s,.&?]*>)*>)*>)*>/,inside:{"class-name":a,keyword:t,punctuation:/[<>(),.:]/,operator:/[?&|]/}}})}(Prism); \ No newline at end of file +!function(e){var t=/\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|null|open|opens|package|private|protected|provides|public|requires|return|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/,a=/\b[A-Z](?:\w*[a-z]\w*)?\b/;e.languages.java=e.languages.extend("clike",{"class-name":[a,/\b[A-Z]\w*(?=\s+\w+\s*[;,=())])/],keyword:t,function:[e.languages.clike.function,{pattern:/(\:\:)[a-z_]\w*/,lookbehind:!0}],number:/\b0b[01][01_]*L?\b|\b0x[\da-f_]*\.?[\da-f_p+-]+\b|(?:\b\d[\d_]*\.?[\d_]*|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|([-+&|])\2|[?:~]|[-+*/%&|^!=<>]=?)/m,lookbehind:!0}}),e.languages.insertBefore("java","string",{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:"string"}}),e.languages.insertBefore("java","class-name",{annotation:{alias:"punctuation",pattern:/(^|[^.])@\w+/,lookbehind:!0},namespace:{pattern:/(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)[a-z]\w*(\.[a-z]\w*)+/,lookbehind:!0,inside:{punctuation:/\./}},generics:{pattern:/<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<[\w\s,.&?]*>)*>)*>)*>/,inside:{"class-name":a,keyword:t,punctuation:/[<>(),.:]/,operator:/[?&|]/}}})}(Prism); \ No newline at end of file diff --git a/components/prism-scala.js b/components/prism-scala.js index 8a7ef7e492..0ea3e99e29 100644 --- a/components/prism-scala.js +++ b/components/prism-scala.js @@ -1,15 +1,14 @@ Prism.languages.scala = Prism.languages.extend('java', { 'keyword': /<-|=>|\b(?:abstract|case|catch|class|def|do|else|extends|final|finally|for|forSome|if|implicit|import|lazy|match|new|null|object|override|package|private|protected|return|sealed|self|super|this|throw|trait|try|type|val|var|while|with|yield)\b/, - 'string': [ - { - pattern: /"""[\s\S]*?"""/, - greedy: true - }, - { - pattern: /("|')(?:\\.|(?!\1)[^\\\r\n])*\1/, - greedy: true - } - ], + 'triple-quoted-string': { + pattern: /"""[\s\S]*?"""/, + greedy: true, + alias: 'string' + }, + 'string': { + pattern: /("|')(?:\\.|(?!\1)[^\\\r\n])*\1/, + greedy: true + }, 'builtin': /\b(?:String|Int|Long|Short|Byte|Boolean|Double|Float|Char|Any|AnyRef|AnyVal|Unit|Nothing)\b/, 'number': /\b0x[\da-f]*\.?[\da-f]+|(?:\b\d+\.?\d*|\B\.\d+)(?:e\d+)?[dfl]?/i, 'symbol': /'[^\d\s\\]\w*/ diff --git a/components/prism-scala.min.js b/components/prism-scala.min.js index a21496f892..6ec5866945 100644 --- a/components/prism-scala.min.js +++ b/components/prism-scala.min.js @@ -1 +1 @@ -Prism.languages.scala=Prism.languages.extend("java",{keyword:/<-|=>|\b(?:abstract|case|catch|class|def|do|else|extends|final|finally|for|forSome|if|implicit|import|lazy|match|new|null|object|override|package|private|protected|return|sealed|self|super|this|throw|trait|try|type|val|var|while|with|yield)\b/,string:[{pattern:/"""[\s\S]*?"""/,greedy:!0},{pattern:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0}],builtin:/\b(?:String|Int|Long|Short|Byte|Boolean|Double|Float|Char|Any|AnyRef|AnyVal|Unit|Nothing)\b/,number:/\b0x[\da-f]*\.?[\da-f]+|(?:\b\d+\.?\d*|\B\.\d+)(?:e\d+)?[dfl]?/i,symbol:/'[^\d\s\\]\w*/}),delete Prism.languages.scala["class-name"],delete Prism.languages.scala.function; \ No newline at end of file +Prism.languages.scala=Prism.languages.extend("java",{keyword:/<-|=>|\b(?:abstract|case|catch|class|def|do|else|extends|final|finally|for|forSome|if|implicit|import|lazy|match|new|null|object|override|package|private|protected|return|sealed|self|super|this|throw|trait|try|type|val|var|while|with|yield)\b/,"triple-quoted-string":{pattern:/"""[\s\S]*?"""/,greedy:!0,alias:"string"},string:{pattern:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0},builtin:/\b(?:String|Int|Long|Short|Byte|Boolean|Double|Float|Char|Any|AnyRef|AnyVal|Unit|Nothing)\b/,number:/\b0x[\da-f]*\.?[\da-f]+|(?:\b\d+\.?\d*|\B\.\d+)(?:e\d+)?[dfl]?/i,symbol:/'[^\d\s\\]\w*/}),delete Prism.languages.scala["class-name"],delete Prism.languages.scala.function; \ No newline at end of file diff --git a/tests/languages/java/keyword_feature.test b/tests/languages/java/keyword_feature.test index 5e5604d1bb..1b4bc160e5 100644 --- a/tests/languages/java/keyword_feature.test +++ b/tests/languages/java/keyword_feature.test @@ -23,6 +23,7 @@ var null module requires transitive exports uses open opens with to provides +yield ---------------------------------------------------- @@ -51,7 +52,8 @@ opens with to provides ["keyword", "var"], ["keyword", "null"], ["keyword", "module"], ["keyword", "requires"], ["keyword", "transitive"], ["keyword", "exports"], ["keyword", "uses"], ["keyword", "open"], - ["keyword", "opens"], ["keyword", "with"], ["keyword", "to"], ["keyword","provides"] + ["keyword", "opens"], ["keyword", "with"], ["keyword", "to"], ["keyword", "provides"], + ["keyword", "yield"] ] ---------------------------------------------------- diff --git a/tests/languages/java/string_feature.test b/tests/languages/java/string_feature.test new file mode 100644 index 0000000000..7c580e6f1b --- /dev/null +++ b/tests/languages/java/string_feature.test @@ -0,0 +1,50 @@ +"foo" +"\"foo\"" + +""" +foo +""" + +var a = """ +\""" +foo"""; + +""" +The quick brown fox""" + " \n" + """ +jumps over the lazy dog +""" + +String empty = """ +"""; + + +---------------------------------------------------- + +[ + ["string", "\"foo\""], + ["string", "\"\\\"foo\\\"\""], + + ["triple-quoted-string", "\"\"\"\nfoo\n\"\"\""], + + ["keyword", "var"], + " a ", + ["operator", "="], + ["triple-quoted-string", "\"\"\"\n\\\"\"\"\nfoo\"\"\""], + ["punctuation", ";"], + + ["triple-quoted-string", "\"\"\"\nThe quick brown fox\"\"\""], + ["operator", "+"], + ["string", "\" \\n\""], + ["operator", "+"], + ["triple-quoted-string", "\"\"\"\njumps over the lazy dog\n\"\"\""], + + ["class-name", "String"], + " empty ", + ["operator", "="], + ["triple-quoted-string", "\"\"\"\n\"\"\""], + ["punctuation", ";"] +] + +---------------------------------------------------- + +Checks for strings. diff --git a/tests/languages/scala/string_feature.test b/tests/languages/scala/string_feature.test index 978b1c2063..502625d593 100644 --- a/tests/languages/scala/string_feature.test +++ b/tests/languages/scala/string_feature.test @@ -23,12 +23,12 @@ bar""" ["string", "'\\t'"], ["string", "\"\""], ["string", "\"fo\\\"obar\""], - ["string", "\"\"\"fo\"o\r\nbar\"\"\""], - ["string", "\"\"\"fo\"o\r\n// comment\r\nbar\"\"\""], + ["triple-quoted-string", "\"\"\"fo\"o\r\nbar\"\"\""], + ["triple-quoted-string", "\"\"\"fo\"o\r\n// comment\r\nbar\"\"\""], ["string", "\"foo /* comment */ bar\""], ["string", "'foo // bar'"] ] ---------------------------------------------------- -Checks for characters and strings. \ No newline at end of file +Checks for characters and strings. From 8ea685b8ca9f73784832f901f07cab25821f2eb0 Mon Sep 17 00:00:00 2001 From: Sooheon Kim Date: Wed, 25 Sep 2019 18:52:28 +0900 Subject: [PATCH 0370/1100] Clojure: Added multiline strings (lisp style) (#2061) This adds support for linebreaks in Clojure strings. --- components/prism-clojure.js | 5 ++++- components/prism-clojure.min.js | 2 +- tests/languages/clojure/string_feature.test | 7 +++++-- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/components/prism-clojure.js b/components/prism-clojure.js index 89c63941d3..e4559f27e3 100644 --- a/components/prism-clojure.js +++ b/components/prism-clojure.js @@ -1,7 +1,10 @@ // Copied from https://github.com/jeluard/prism-clojure Prism.languages.clojure = { comment: /;+.*/, - string: /"(?:\\.|[^\\"\r\n])*"/, + string: { + pattern: /"(?:[^"\\]|\\.)*"/, + greedy: true + }, operator: /(?:::|[:|'])\b[a-z][\w*+!?-]*\b/i, //used for symbols and keywords keyword: { pattern: /([^\w+*'?-])(?:def|if|do|let|\.\.|quote|var|->>|->|fn|loop|recur|throw|try|monitor-enter|\.|new|set!|def\-|defn|defn\-|defmacro|defmulti|defmethod|defstruct|defonce|declare|definline|definterface|defprotocol|==|defrecord|>=|deftype|<=|defproject|ns|\*|\+|\-|\/|<|=|>|accessor|agent|agent-errors|aget|alength|all-ns|alter|and|append-child|apply|array-map|aset|aset-boolean|aset-byte|aset-char|aset-double|aset-float|aset-int|aset-long|aset-short|assert|assoc|await|await-for|bean|binding|bit-and|bit-not|bit-or|bit-shift-left|bit-shift-right|bit-xor|boolean|branch\?|butlast|byte|cast|char|children|class|clear-agent-errors|comment|commute|comp|comparator|complement|concat|conj|cons|constantly|cond|if-not|construct-proxy|contains\?|count|create-ns|create-struct|cycle|dec|deref|difference|disj|dissoc|distinct|doall|doc|dorun|doseq|dosync|dotimes|doto|double|down|drop|drop-while|edit|end\?|ensure|eval|every\?|false\?|ffirst|file-seq|filter|find|find-doc|find-ns|find-var|first|float|flush|for|fnseq|frest|gensym|get-proxy-class|get|hash-map|hash-set|identical\?|identity|if-let|import|in-ns|inc|index|insert-child|insert-left|insert-right|inspect-table|inspect-tree|instance\?|int|interleave|intersection|into|into-array|iterate|join|key|keys|keyword|keyword\?|last|lazy-cat|lazy-cons|left|lefts|line-seq|list\*|list|load|load-file|locking|long|loop|macroexpand|macroexpand-1|make-array|make-node|map|map-invert|map\?|mapcat|max|max-key|memfn|merge|merge-with|meta|min|min-key|name|namespace|neg\?|new|newline|next|nil\?|node|not|not-any\?|not-every\?|not=|ns-imports|ns-interns|ns-map|ns-name|ns-publics|ns-refers|ns-resolve|ns-unmap|nth|nthrest|or|parse|partial|path|peek|pop|pos\?|pr|pr-str|print|print-str|println|println-str|prn|prn-str|project|proxy|proxy-mappings|quot|rand|rand-int|range|re-find|re-groups|re-matcher|re-matches|re-pattern|re-seq|read|read-line|reduce|ref|ref-set|refer|rem|remove|remove-method|remove-ns|rename|rename-keys|repeat|replace|replicate|resolve|rest|resultset-seq|reverse|rfirst|right|rights|root|rrest|rseq|second|select|select-keys|send|send-off|seq|seq-zip|seq\?|set|short|slurp|some|sort|sort-by|sorted-map|sorted-map-by|sorted-set|special-symbol\?|split-at|split-with|str|string\?|struct|struct-map|subs|subvec|symbol|symbol\?|sync|take|take-nth|take-while|test|time|to-array|to-array-2d|tree-seq|true\?|union|up|update-proxy|val|vals|var-get|var-set|var\?|vector|vector-zip|vector\?|when|when-first|when-let|when-not|with-local-vars|with-meta|with-open|with-out-str|xml-seq|xml-zip|zero\?|zipmap|zipper)(?=[^\w+*'?-])/, diff --git a/components/prism-clojure.min.js b/components/prism-clojure.min.js index e81e507f1a..08d61c365b 100644 --- a/components/prism-clojure.min.js +++ b/components/prism-clojure.min.js @@ -1 +1 @@ -Prism.languages.clojure={comment:/;+.*/,string:/"(?:\\.|[^\\"\r\n])*"/,operator:/(?:::|[:|'])\b[a-z][\w*+!?-]*\b/i,keyword:{pattern:/([^\w+*'?-])(?:def|if|do|let|\.\.|quote|var|->>|->|fn|loop|recur|throw|try|monitor-enter|\.|new|set!|def\-|defn|defn\-|defmacro|defmulti|defmethod|defstruct|defonce|declare|definline|definterface|defprotocol|==|defrecord|>=|deftype|<=|defproject|ns|\*|\+|\-|\/|<|=|>|accessor|agent|agent-errors|aget|alength|all-ns|alter|and|append-child|apply|array-map|aset|aset-boolean|aset-byte|aset-char|aset-double|aset-float|aset-int|aset-long|aset-short|assert|assoc|await|await-for|bean|binding|bit-and|bit-not|bit-or|bit-shift-left|bit-shift-right|bit-xor|boolean|branch\?|butlast|byte|cast|char|children|class|clear-agent-errors|comment|commute|comp|comparator|complement|concat|conj|cons|constantly|cond|if-not|construct-proxy|contains\?|count|create-ns|create-struct|cycle|dec|deref|difference|disj|dissoc|distinct|doall|doc|dorun|doseq|dosync|dotimes|doto|double|down|drop|drop-while|edit|end\?|ensure|eval|every\?|false\?|ffirst|file-seq|filter|find|find-doc|find-ns|find-var|first|float|flush|for|fnseq|frest|gensym|get-proxy-class|get|hash-map|hash-set|identical\?|identity|if-let|import|in-ns|inc|index|insert-child|insert-left|insert-right|inspect-table|inspect-tree|instance\?|int|interleave|intersection|into|into-array|iterate|join|key|keys|keyword|keyword\?|last|lazy-cat|lazy-cons|left|lefts|line-seq|list\*|list|load|load-file|locking|long|loop|macroexpand|macroexpand-1|make-array|make-node|map|map-invert|map\?|mapcat|max|max-key|memfn|merge|merge-with|meta|min|min-key|name|namespace|neg\?|new|newline|next|nil\?|node|not|not-any\?|not-every\?|not=|ns-imports|ns-interns|ns-map|ns-name|ns-publics|ns-refers|ns-resolve|ns-unmap|nth|nthrest|or|parse|partial|path|peek|pop|pos\?|pr|pr-str|print|print-str|println|println-str|prn|prn-str|project|proxy|proxy-mappings|quot|rand|rand-int|range|re-find|re-groups|re-matcher|re-matches|re-pattern|re-seq|read|read-line|reduce|ref|ref-set|refer|rem|remove|remove-method|remove-ns|rename|rename-keys|repeat|replace|replicate|resolve|rest|resultset-seq|reverse|rfirst|right|rights|root|rrest|rseq|second|select|select-keys|send|send-off|seq|seq-zip|seq\?|set|short|slurp|some|sort|sort-by|sorted-map|sorted-map-by|sorted-set|special-symbol\?|split-at|split-with|str|string\?|struct|struct-map|subs|subvec|symbol|symbol\?|sync|take|take-nth|take-while|test|time|to-array|to-array-2d|tree-seq|true\?|union|up|update-proxy|val|vals|var-get|var-set|var\?|vector|vector-zip|vector\?|when|when-first|when-let|when-not|with-local-vars|with-meta|with-open|with-out-str|xml-seq|xml-zip|zero\?|zipmap|zipper)(?=[^\w+*'?-])/,lookbehind:!0},boolean:/\b(?:true|false|nil)\b/,number:/\b[0-9A-Fa-f]+\b/,punctuation:/[{}\[\](),]/}; \ No newline at end of file +Prism.languages.clojure={comment:/;+.*/,string:{pattern:/"(?:[^"\\]|\\.)*"/,greedy:!0},operator:/(?:::|[:|'])\b[a-z][\w*+!?-]*\b/i,keyword:{pattern:/([^\w+*'?-])(?:def|if|do|let|\.\.|quote|var|->>|->|fn|loop|recur|throw|try|monitor-enter|\.|new|set!|def\-|defn|defn\-|defmacro|defmulti|defmethod|defstruct|defonce|declare|definline|definterface|defprotocol|==|defrecord|>=|deftype|<=|defproject|ns|\*|\+|\-|\/|<|=|>|accessor|agent|agent-errors|aget|alength|all-ns|alter|and|append-child|apply|array-map|aset|aset-boolean|aset-byte|aset-char|aset-double|aset-float|aset-int|aset-long|aset-short|assert|assoc|await|await-for|bean|binding|bit-and|bit-not|bit-or|bit-shift-left|bit-shift-right|bit-xor|boolean|branch\?|butlast|byte|cast|char|children|class|clear-agent-errors|comment|commute|comp|comparator|complement|concat|conj|cons|constantly|cond|if-not|construct-proxy|contains\?|count|create-ns|create-struct|cycle|dec|deref|difference|disj|dissoc|distinct|doall|doc|dorun|doseq|dosync|dotimes|doto|double|down|drop|drop-while|edit|end\?|ensure|eval|every\?|false\?|ffirst|file-seq|filter|find|find-doc|find-ns|find-var|first|float|flush|for|fnseq|frest|gensym|get-proxy-class|get|hash-map|hash-set|identical\?|identity|if-let|import|in-ns|inc|index|insert-child|insert-left|insert-right|inspect-table|inspect-tree|instance\?|int|interleave|intersection|into|into-array|iterate|join|key|keys|keyword|keyword\?|last|lazy-cat|lazy-cons|left|lefts|line-seq|list\*|list|load|load-file|locking|long|loop|macroexpand|macroexpand-1|make-array|make-node|map|map-invert|map\?|mapcat|max|max-key|memfn|merge|merge-with|meta|min|min-key|name|namespace|neg\?|new|newline|next|nil\?|node|not|not-any\?|not-every\?|not=|ns-imports|ns-interns|ns-map|ns-name|ns-publics|ns-refers|ns-resolve|ns-unmap|nth|nthrest|or|parse|partial|path|peek|pop|pos\?|pr|pr-str|print|print-str|println|println-str|prn|prn-str|project|proxy|proxy-mappings|quot|rand|rand-int|range|re-find|re-groups|re-matcher|re-matches|re-pattern|re-seq|read|read-line|reduce|ref|ref-set|refer|rem|remove|remove-method|remove-ns|rename|rename-keys|repeat|replace|replicate|resolve|rest|resultset-seq|reverse|rfirst|right|rights|root|rrest|rseq|second|select|select-keys|send|send-off|seq|seq-zip|seq\?|set|short|slurp|some|sort|sort-by|sorted-map|sorted-map-by|sorted-set|special-symbol\?|split-at|split-with|str|string\?|struct|struct-map|subs|subvec|symbol|symbol\?|sync|take|take-nth|take-while|test|time|to-array|to-array-2d|tree-seq|true\?|union|up|update-proxy|val|vals|var-get|var-set|var\?|vector|vector-zip|vector\?|when|when-first|when-let|when-not|with-local-vars|with-meta|with-open|with-out-str|xml-seq|xml-zip|zero\?|zipmap|zipper)(?=[^\w+*'?-])/,lookbehind:!0},boolean:/\b(?:true|false|nil)\b/,number:/\b[0-9A-Fa-f]+\b/,punctuation:/[{}\[\](),]/}; \ No newline at end of file diff --git a/tests/languages/clojure/string_feature.test b/tests/languages/clojure/string_feature.test index 13a966cf7e..4ac9059227 100644 --- a/tests/languages/clojure/string_feature.test +++ b/tests/languages/clojure/string_feature.test @@ -1,13 +1,16 @@ "" "Fo\"obar" +"multi-line +string" ---------------------------------------------------- [ ["string", "\"\""], - ["string", "\"Fo\\\"obar\""] + ["string", "\"Fo\\\"obar\""], + ["string", "\"multi-line\nstring\""] ] ---------------------------------------------------- -Checks for strings. \ No newline at end of file +Checks for strings. From 53f07b1b29b05c06110d9343e37b3b305e568227 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Thu, 26 Sep 2019 16:46:43 +0200 Subject: [PATCH 0371/1100] Issue template improvements (#2069) This fixes a typo in the issue templates and comments out some instruction to make them invisible in the issue. --- .github/ISSUE_TEMPLATE/bug_report.md | 3 +++ .github/ISSUE_TEMPLATE/highlighting-bug-report.md | 5 ++++- .github/ISSUE_TEMPLATE/new-language-request.md | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 2c6234d7ec..556c3df877 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -9,11 +9,14 @@ assignees: '' **Information:** - Prism version: [e.g. 1.14, latest from the download page, etc.] +- Plugins: [a list of plugins you are using or 'none'] - Environment: [e.g. Browser, Node, Webpack] + **Description** A clear and concise description of what the bug is and how to reproduce it. diff --git a/.github/ISSUE_TEMPLATE/highlighting-bug-report.md b/.github/ISSUE_TEMPLATE/highlighting-bug-report.md index 86a4897701..7ca00dc6b3 100644 --- a/.github/ISSUE_TEMPLATE/highlighting-bug-report.md +++ b/.github/ISSUE_TEMPLATE/highlighting-bug-report.md @@ -12,7 +12,10 @@ assignees: '' - Language: [e.g. C++, JavaScript, YAML, etc.] - Plugins: [a list of plugins you are using or 'none'] -Does the problem still occur in the latest version of Prism? You can check using the [test page](https://prismjs.com/test.html) or get the latest version at the [download page](https://prismjs.com/download.html). + **Description** A clear and concise description of what is being highlighted incorrectly and how it should be highlighted instead. Add screenshots to illustrate the problem. diff --git a/.github/ISSUE_TEMPLATE/new-language-request.md b/.github/ISSUE_TEMPLATE/new-language-request.md index 5f1760b8fc..8b9b8ff70d 100644 --- a/.github/ISSUE_TEMPLATE/new-language-request.md +++ b/.github/ISSUE_TEMPLATE/new-language-request.md @@ -2,7 +2,7 @@ name: New language request about: Suggest a new language Prism should support. title: '' -labels: language-definitions, new langauge +labels: language-definitions, new language assignees: '' --- From cdfa60acbdb43e3c958dee4dd8f1bad0c5d5eb03 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Mon, 30 Sep 2019 19:43:33 +0200 Subject: [PATCH 0372/1100] Added plugin descriptions to plugin list (#2076) This adds plugin descriptions to the plugin lists on the website. --- components.js | 2 +- components.json | 40 ++++++++++++++++++--- index.html | 4 +-- plugins/autolinker/index.html | 11 ++---- plugins/autoloader/index.html | 7 +--- plugins/command-line/index.html | 7 +--- plugins/copy-to-clipboard/index.html | 7 +--- plugins/custom-class/index.html | 7 +--- plugins/data-uri-highlight/index.html | 7 +--- plugins/diff-highlight/index.html | 7 +--- plugins/download-button/index.html | 7 +--- plugins/file-highlight/index.html | 7 +--- plugins/highlight-keywords/index.html | 7 +--- plugins/inline-color/index.html | 7 +--- plugins/jsonp-highlight/index.html | 7 +--- plugins/keep-markup/index.html | 7 +--- plugins/line-highlight/index.html | 7 +--- plugins/line-numbers/index.html | 7 +--- plugins/match-braces/index.html | 7 +--- plugins/normalize-whitespace/index.html | 7 +--- plugins/previewers/index.html | 7 +--- plugins/remove-initial-line-feed/index.html | 7 +--- plugins/show-invisibles/index.html | 7 +--- plugins/show-language/index.html | 7 +--- plugins/toolbar/index.html | 7 +--- plugins/unescaped-markup/index.html | 7 +--- plugins/wpd/index.html | 7 +--- scripts/code.js | 31 +++++++++++----- style.css | 14 ++++++++ 29 files changed, 102 insertions(+), 161 deletions(-) diff --git a/components.js b/components.js index f61069d3d7..4e85cc2be8 100644 --- a/components.js +++ b/components.js @@ -1,2 +1,2 @@ -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default","peerDependencies":"markup"},"clike":{"title":"C-like","option":"default","overrideExampleHeader":true},"javascript":{"title":"JavaScript","require":"clike","peerDependencies":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"Augmented Backus–Naur form","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","peerDependencies":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"Backus–Naur form","alias":"rbnf","aliasTitles":{"rbnf":"Routing Backus–Naur form"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"Extended Backus–Naur form","owner":"RunDevelopment"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment"},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","peerDependencies":["css","css-extras","coffeescript","erb","javascript","less","markdown","ruby","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"http":{"title":"HTTP","peerDependencies":["javascript","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"peerDependencies":["scala"],"owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","peerDependencies":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike"],"peerDependencies":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","peerDependencies":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"js-templates":{"title":"JS Templates","require":"javascript","peerDependencies":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"json":{"title":"JSON","owner":"CupOfTea696"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"less":{"title":"Less","require":"css","peerDependencies":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","peerDependencies":["jsdoc"],"alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"nasm":{"title":"NASM","owner":"rbmj"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"cpp","peerDependencies":["c","cpp"],"overrideExampleHeader":true,"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"peerDependencies":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","peerDependencies":["c","cpp","fortran"],"owner":"Golmote"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"peerDependencies":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","peerDependencies":["actionscript","coffeescript","flow","javascript","typescript","vala"],"owner":"RunDevelopment"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robot-framework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","require":"sql","owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","peerDependencies":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"solidity":{"title":"Solidity (Ethereum)","require":"clike","owner":"glachaud"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","peerDependencies":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"turtle":{"title":"Turtle","alias":["trig"],"aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","peerDependencies":"js-templates","alias":"ts","owner":"vkbansal"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","visual-basic"],"owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":"Line Highlight","line-numbers":{"title":"Line Numbers","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","after":["autolinker","data-uri-highlight"]},"autolinker":"Autolinker","wpd":"WebPlatform Docs","custom-class":{"title":"Custom Class","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","noCSS":true},"show-language":{"title":"Show Language","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","owner":"Golmote","after":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","owner":"chriswells0"},"unescaped-markup":"Unescaped Markup","normalize-whitespace":{"title":"Normalize Whitespace","owner":"zeitgeist87","after":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","owner":"RunDevelopment","require":"diff"}}}; +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default","peerDependencies":"markup"},"clike":{"title":"C-like","option":"default","overrideExampleHeader":true},"javascript":{"title":"JavaScript","require":"clike","peerDependencies":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"Augmented Backus–Naur form","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","peerDependencies":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"Backus–Naur form","alias":"rbnf","aliasTitles":{"rbnf":"Routing Backus–Naur form"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"Extended Backus–Naur form","owner":"RunDevelopment"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment"},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","peerDependencies":["css","css-extras","coffeescript","erb","javascript","less","markdown","ruby","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"http":{"title":"HTTP","peerDependencies":["javascript","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"peerDependencies":["scala"],"owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","peerDependencies":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike"],"peerDependencies":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","peerDependencies":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"js-templates":{"title":"JS Templates","require":"javascript","peerDependencies":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"json":{"title":"JSON","owner":"CupOfTea696"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"less":{"title":"Less","require":"css","peerDependencies":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","peerDependencies":["jsdoc"],"alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"nasm":{"title":"NASM","owner":"rbmj"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"cpp","peerDependencies":["c","cpp"],"overrideExampleHeader":true,"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"peerDependencies":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","peerDependencies":["c","cpp","fortran"],"owner":"Golmote"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"peerDependencies":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","peerDependencies":["actionscript","coffeescript","flow","javascript","typescript","vala"],"owner":"RunDevelopment"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robot-framework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","require":"sql","owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","peerDependencies":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"solidity":{"title":"Solidity (Ethereum)","require":"clike","owner":"glachaud"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","peerDependencies":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"turtle":{"title":"Turtle","alias":["trig"],"aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","peerDependencies":"js-templates","alias":"ts","owner":"vkbansal"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","visual-basic"],"owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","after":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"Allows you to prefix Prism default classes (e.g. .comment will become .namespace--comment) or replace them with your defined ones (like .editor__comment or .comment_7sh3a).","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","after":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","after":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"}}}; if (typeof module !== 'undefined' && module.exports) { module.exports = components; } \ No newline at end of file diff --git a/components.json b/components.json index bd431b8e50..ce115d3037 100644 --- a/components.json +++ b/components.json @@ -1039,109 +1039,141 @@ "path": "plugins/{id}/prism-{id}", "link": "plugins/{id}/" }, - "line-highlight": "Line Highlight", + "line-highlight": { + "title": "Line Highlight", + "description": "Highlights specific lines and/or line ranges." + }, "line-numbers": { "title": "Line Numbers", + "description": "Line number at the beginning of code lines.", "owner": "kuba-kubula" }, "show-invisibles": { "title": "Show Invisibles", + "description": "Show hidden characters such as tabs and line breaks.", "after": [ "autolinker", "data-uri-highlight" ] }, - "autolinker": "Autolinker", - "wpd": "WebPlatform Docs", + "autolinker": { + "title": "Autolinker", + "description": "Converts URLs and emails in code to clickable links. Parses Markdown links in comments." + }, + "wpd": { + "title": "WebPlatform Docs", + "description": "Makes tokens link to WebPlatform.org documentation. The links open in a new tab." + }, "custom-class": { "title": "Custom Class", + "description": "Allows you to prefix Prism default classes (e.g. .comment will become .namespace--comment) or replace them with your defined ones (like .editor__comment or .comment_7sh3a).", "owner": "dvkndn", "noCSS": true }, "file-highlight": { "title": "File Highlight", + "description": "Fetch external files and highlight them with Prism. Used on the Prism website itself.", "noCSS": true }, "show-language": { "title": "Show Language", + "description": "Display the highlighted language in code blocks (inline code does not show the label).", "owner": "nauzilus", "noCSS": true, "require": "toolbar" }, "jsonp-highlight": { "title": "JSONP Highlight", + "description": "Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).", "noCSS": true, "owner": "nauzilus" }, "highlight-keywords": { "title": "Highlight Keywords", + "description": "Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.", "owner": "vkbansal", "noCSS": true }, "remove-initial-line-feed": { "title": "Remove initial line feed", + "description": "Removes the initial line feed in code blocks.", "owner": "Golmote", "noCSS": true }, "inline-color": { "title": "Inline color", + "description": "Adds a small inline preview for colors in style sheets.", "require": "css-extras", "owner": "RunDevelopment" }, "previewers": { "title": "Previewers", + "description": "Previewers for angles, colors, gradients, easing and time.", "require": "css-extras", "owner": "Golmote" }, "autoloader": { "title": "Autoloader", + "description": "Automatically loads the needed languages to highlight the code blocks.", "owner": "Golmote", "noCSS": true }, "keep-markup": { "title": "Keep Markup", + "description": "Prevents custom markup from being dropped out during highlighting.", "owner": "Golmote", "after": "normalize-whitespace", "noCSS": true }, "command-line": { "title": "Command Line", + "description": "Display a command line with a prompt and, optionally, the output/response from the commands.", "owner": "chriswells0" }, - "unescaped-markup": "Unescaped Markup", + "unescaped-markup": { + "title": "Unescaped Markup", + "description": "Write markup without having to escape anything." + }, "normalize-whitespace": { "title": "Normalize Whitespace", + "description": "Supports multiple operations to normalize whitespace in code blocks.", "owner": "zeitgeist87", "after": "unescaped-markup", "noCSS": true }, "data-uri-highlight": { "title": "Data-URI Highlight", + "description": "Highlights data-URI contents.", "owner": "Golmote", "noCSS": true }, "toolbar": { "title": "Toolbar", + "description": "Attach a toolbar for plugins to easily register buttons on the top of a code block.", "owner": "mAAdhaTTah" }, "copy-to-clipboard": { "title": "Copy to Clipboard Button", + "description": "Add a button that copies the code block to the clipboard when clicked.", "owner": "mAAdhaTTah", "require": "toolbar", "noCSS": true }, "download-button": { "title": "Download Button", + "description": "A button in the toolbar of a code block adding a convenient way to download a code file.", "owner": "Golmote", "require": "toolbar", "noCSS": true }, "match-braces": { "title": "Match braces", + "description": "Highlights matching braces.", "owner": "RunDevelopment" }, "diff-highlight": { "title": "Diff Highlight", + "description": "Highlights the code inside diff blocks.", "owner": "RunDevelopment", "require": "diff" } diff --git a/index.html b/index.html index 226e832fe5..1f61bac473 100644 --- a/index.html +++ b/index.html @@ -158,7 +158,7 @@

    Basic usage

    window.Prism.manual = true; </script> <script src="prism.js"></script>
    - +

    Usage with CDNs

    In combination with CDNs, we recommend using the Autoloader plugin which automatically loads languages when necessary.

    @@ -239,7 +239,7 @@

    Supported languages

    Plugins

    Plugins are additional scripts (and CSS code) that extend Prism’s functionality. Many of the following plugins are official, but are released as plugins to keep the Prism Core small for those who don’t need the extra functionality.

    -
      +

        No assembly required to use them. Just select them in the download page.

        It’s very easy to write your own Prism plugins. Did you write a plugin for Prism that you want added to this list? Send a pull request!

        diff --git a/plugins/autolinker/index.html b/plugins/autolinker/index.html index 286532d444..592b8d3ba2 100644 --- a/plugins/autolinker/index.html +++ b/plugins/autolinker/index.html @@ -16,12 +16,7 @@ -
        -
        - -

        Autolinker

        -

        Converts URLs and emails in code to clickable links. Parses Markdown links in comments.

        -
        +

        How to use

        @@ -44,8 +39,8 @@

        JavaScript

        var foo = 5; // And a single line comment http://google.com -

        CSS

        -
        @font-face {
        +	

        CSS

        +
        @font-face {
         	src: url(http://lea.verou.me/logo.otf);
         	font-family: 'LeaVerou';
         }
        diff --git a/plugins/autoloader/index.html b/plugins/autoloader/index.html index 115e8b146d..2d7f7ca8e0 100644 --- a/plugins/autoloader/index.html +++ b/plugins/autoloader/index.html @@ -29,12 +29,7 @@ -
        -
        - -

        Autoloader

        -

        Automatically loads the needed languages to highlight the code blocks.

        -
        +

        How to use

        diff --git a/plugins/command-line/index.html b/plugins/command-line/index.html index 9ab9dfb47e..b9df54a0f3 100644 --- a/plugins/command-line/index.html +++ b/plugins/command-line/index.html @@ -16,12 +16,7 @@ -
        -
        - -

        Command Line

        -

        Display a command line with a prompt and, optionally, the output/response from the commands.

        -
        +

        How to use

        diff --git a/plugins/copy-to-clipboard/index.html b/plugins/copy-to-clipboard/index.html index 30f38598f3..5faca153fa 100644 --- a/plugins/copy-to-clipboard/index.html +++ b/plugins/copy-to-clipboard/index.html @@ -16,12 +16,7 @@ -
        -
        - -

        Copy to Clipboard

        -

        Add a button that copies the code block to the clipboard when clicked.

        -
        +

        How to use

        diff --git a/plugins/custom-class/index.html b/plugins/custom-class/index.html index 2b56f21d5f..0546430e28 100644 --- a/plugins/custom-class/index.html +++ b/plugins/custom-class/index.html @@ -14,12 +14,7 @@ -
        -
        - -

        Custom Class

        -

        This plugin allows you to prefix Prism default classes (.comment will become .namespace--comment) or replace them with your defined ones (like .editor__comment or .comment_7sh3a).

        -
        +

        Motivation

        diff --git a/plugins/data-uri-highlight/index.html b/plugins/data-uri-highlight/index.html index 4b37d91a6c..bcab5bdb8d 100644 --- a/plugins/data-uri-highlight/index.html +++ b/plugins/data-uri-highlight/index.html @@ -16,12 +16,7 @@ -
        -
        - -

        Data-URI Highlight

        -

        Highlights data-URI contents.

        -
        +

        How to use

        diff --git a/plugins/diff-highlight/index.html b/plugins/diff-highlight/index.html index 20c45e8601..921296445c 100644 --- a/plugins/diff-highlight/index.html +++ b/plugins/diff-highlight/index.html @@ -17,12 +17,7 @@ -
        -
        - -

        Diff Highlight

        -

        Highlights the code inside diff blocks.

        -
        +

        How to use

        diff --git a/plugins/download-button/index.html b/plugins/download-button/index.html index 77094260ff..8e29099fec 100644 --- a/plugins/download-button/index.html +++ b/plugins/download-button/index.html @@ -16,12 +16,7 @@ -
        -
        - -

        Download Button

        -

        A button in the toolbar of a code block adding a convenient way to download a code file.

        -
        +

        How to use

        diff --git a/plugins/file-highlight/index.html b/plugins/file-highlight/index.html index 438138fa7c..ff0231112c 100644 --- a/plugins/file-highlight/index.html +++ b/plugins/file-highlight/index.html @@ -15,12 +15,7 @@ -
        -
        - -

        File Highlight

        -

        Fetch external files and highlight them with Prism. Used on the Prism website itself.

        -
        +

        How to use

        diff --git a/plugins/highlight-keywords/index.html b/plugins/highlight-keywords/index.html index c18e319545..d3e30fcc1a 100644 --- a/plugins/highlight-keywords/index.html +++ b/plugins/highlight-keywords/index.html @@ -22,12 +22,7 @@ -
        -
        - -

        Highlight Keywords

        -

        This plugin adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.

        -
        +

        Examples

        diff --git a/plugins/inline-color/index.html b/plugins/inline-color/index.html index 1bd47758a0..31037a6f2b 100644 --- a/plugins/inline-color/index.html +++ b/plugins/inline-color/index.html @@ -23,12 +23,7 @@ -
        -
        - -

        Inline color

        -

        This plugin adds a small inline preview for colors in style sheets.

        -
        +

        Examples

        diff --git a/plugins/jsonp-highlight/index.html b/plugins/jsonp-highlight/index.html index a9d1475f13..d520dd74d3 100644 --- a/plugins/jsonp-highlight/index.html +++ b/plugins/jsonp-highlight/index.html @@ -15,12 +15,7 @@ -
        -
        - -

        JSONP Highlight

        -

        Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).

        -
        +

        How to use

        diff --git a/plugins/keep-markup/index.html b/plugins/keep-markup/index.html index c717da2690..c3ade50836 100644 --- a/plugins/keep-markup/index.html +++ b/plugins/keep-markup/index.html @@ -29,12 +29,7 @@ -
        -
        - -

        Keep markup

        -

        Prevents custom markup from being dropped out during highlighting.

        -
        +
        diff --git a/plugins/line-highlight/index.html b/plugins/line-highlight/index.html index 4fc59d93f1..5c37fb7eb4 100644 --- a/plugins/line-highlight/index.html +++ b/plugins/line-highlight/index.html @@ -16,12 +16,7 @@ -
        -
        - -

        Line highlight

        -

        Highlights specific lines and/or line ranges.

        -
        +

        How to use

        diff --git a/plugins/line-numbers/index.html b/plugins/line-numbers/index.html index 05850b0fbc..e135379e93 100644 --- a/plugins/line-numbers/index.html +++ b/plugins/line-numbers/index.html @@ -16,12 +16,7 @@ -
        -
        - -

        Line Numbers

        -

        Line number at the beginning of code lines.

        -
        +

        How to use

        diff --git a/plugins/match-braces/index.html b/plugins/match-braces/index.html index ac6a79a1ef..fdf2fa8d1d 100644 --- a/plugins/match-braces/index.html +++ b/plugins/match-braces/index.html @@ -16,12 +16,7 @@ -
        -
        - -

        Match braces

        -

        Highlights matching braces.

        -
        +

        How to use

        diff --git a/plugins/normalize-whitespace/index.html b/plugins/normalize-whitespace/index.html index 6cfa276aea..a35d3e6a6f 100644 --- a/plugins/normalize-whitespace/index.html +++ b/plugins/normalize-whitespace/index.html @@ -28,12 +28,7 @@ -
        -
        - -

        Normalize Whitespace

        -

        Supports multiple operations to normalize whitespace in code blocks.

        -
        +

        How to use

        diff --git a/plugins/previewers/index.html b/plugins/previewers/index.html index 40b2293ef7..6fc0ef84a7 100644 --- a/plugins/previewers/index.html +++ b/plugins/previewers/index.html @@ -16,12 +16,7 @@ -
        -
        - -

        Previewers

        -

        Previewers for angles, colors, gradients, easing and time.

        -
        +

        How to use

        diff --git a/plugins/remove-initial-line-feed/index.html b/plugins/remove-initial-line-feed/index.html index c914a67768..9a5a4211c1 100644 --- a/plugins/remove-initial-line-feed/index.html +++ b/plugins/remove-initial-line-feed/index.html @@ -15,12 +15,7 @@ -
        -
        - -

        Remove initial line feed

        -

        Removes the initial line feed in code blocks.

        -
        +

        How to use (DEPRECATED)

        diff --git a/plugins/show-invisibles/index.html b/plugins/show-invisibles/index.html index 2079998cd6..baa3904d43 100644 --- a/plugins/show-invisibles/index.html +++ b/plugins/show-invisibles/index.html @@ -16,12 +16,7 @@ -
        -
        - -

        Show Invisibles

        -

        Show hidden characters such as tabs and line breaks.

        -
        +

        Examples

        diff --git a/plugins/show-language/index.html b/plugins/show-language/index.html index 5118501946..1f98153418 100644 --- a/plugins/show-language/index.html +++ b/plugins/show-language/index.html @@ -16,12 +16,7 @@ -
        -
        - -

        Show Language

        -

        Display the highlighted language in code blocks (inline code does not show the label).

        -
        +

        Examples

        diff --git a/plugins/toolbar/index.html b/plugins/toolbar/index.html index 74cba7b185..720a04c11f 100644 --- a/plugins/toolbar/index.html +++ b/plugins/toolbar/index.html @@ -16,12 +16,7 @@ -
        -
        - -

        Toolbar

        -

        Attach a toolbar for plugins to easily register buttons on the top of a code block.

        -
        +

        How to use

        diff --git a/plugins/unescaped-markup/index.html b/plugins/unescaped-markup/index.html index 3568e1c049..43d39c8646 100644 --- a/plugins/unescaped-markup/index.html +++ b/plugins/unescaped-markup/index.html @@ -17,12 +17,7 @@ -
        -
        - -

        Unescaped markup

        -

        Write markup without having to escape anything.

        -
        +

        How to use

        diff --git a/plugins/wpd/index.html b/plugins/wpd/index.html index b0d4621dab..596b49119c 100644 --- a/plugins/wpd/index.html +++ b/plugins/wpd/index.html @@ -16,12 +16,7 @@ -
        -
        - -

        WebPlatform Docs

        -

        Makes tokens link to WebPlatform.org documentation. The links open in a new tab.

        -
        +

        How to use

        diff --git a/scripts/code.js b/scripts/code.js index a4847e7174..e6aad049ae 100644 --- a/scripts/code.js +++ b/scripts/code.js @@ -4,10 +4,16 @@ if(!document.body.addEventListener) { return; } +$$('[data-plugin-header]').forEach(function (element) { + var plugin = components.plugins[element.getAttribute('data-plugin-header')]; + element.innerHTML = '
        \n' + + '

        ' + plugin.title + '

        \n

        ' + plugin.description + '

        '; +}); + $$('[data-src][data-type="text/html"]').forEach(function(element) { var src = element.getAttribute('data-src'), html = element.getAttribute('data-type') === 'text/html', - contentProperty = html? 'innerHTML' : 'textContent'; + contentProperty = html ? 'innerHTML' : 'textContent'; $u.xhr({ url: src, @@ -195,16 +201,25 @@ function listPlugins(ul) { var plugin = components.plugins[id]; - $u.element.create('li', { - contents: { - tag: 'a', - prop: { - href: 'plugins/' + id + var li = $u.element.create('li', { + contents: [ + { + tag: 'a', + prop: { + href: 'plugins/' + id + }, + contents: plugin.title || plugin }, - contents: plugin.title || plugin - }, + { + tag: 'br' + } + ], inside: ul }); + + var desc = document.createElement('div'); + desc.innerHTML = plugin.description; + li.appendChild(desc); } } diff --git a/style.css b/style.css index 4f31839fac..00be1070a3 100644 --- a/style.css +++ b/style.css @@ -415,6 +415,20 @@ label a.owner:not(:hover) { margin-right: 1em; } +ul.plugin-list { + column-count: 2; +} + ul.plugin-list > li { + break-inside: avoid; + page-break-inside: avoid; + } + ul.plugin-list > li > a { + font-size: 110%; + } + ul.plugin-list > li > div { + margin-bottom: .5em; + } + /* * Fix for Toolbar's overflow issue */ From 0e5c48d1bfa358eecb1918b45cdfeb2adef7c69f Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Mon, 30 Sep 2019 21:09:34 +0200 Subject: [PATCH 0373/1100] JS: Tokenize `:` as an operator (#2073) This changes the JS tokenization of `:` (colon) to `operator`. --- components/prism-javascript.js | 2 +- components/prism-javascript.min.js | 2 +- prism.js | 2 +- tests/languages/coffeescript/property_feature.test | 6 +++--- tests/languages/flow/flow-punctuation_feature.test | 4 ++-- tests/languages/flow/function-variable_feature.test | 8 ++++---- tests/languages/javascript/class-method_feature.test | 4 ++-- .../javascript/function-variable_feature.test | 6 +++--- tests/languages/javascript/function_feature.test | 2 +- tests/languages/javascript/operator_feature.test | 6 +++--- .../languages/javascript/template-string_feature.test | 4 ++-- tests/languages/jsx/issue1235.test | 2 +- tests/languages/jsx/issue1335.test | 10 +++++----- tests/languages/jsx/issue1408.test | 2 +- tests/languages/jsx/plain-text_feature.test | 4 ++-- tests/languages/pug/tag_feature.test | 8 ++++---- 16 files changed, 36 insertions(+), 36 deletions(-) diff --git a/components/prism-javascript.js b/components/prism-javascript.js index c33438665d..ac8c52daf7 100644 --- a/components/prism-javascript.js +++ b/components/prism-javascript.js @@ -19,7 +19,7 @@ Prism.languages.javascript = Prism.languages.extend('clike', { 'number': /\b(?:(?:0[xX](?:[\dA-Fa-f](?:_[\dA-Fa-f])?)+|0[bB](?:[01](?:_[01])?)+|0[oO](?:[0-7](?:_[0-7])?)+)n?|(?:\d(?:_\d)?)+n|NaN|Infinity)\b|(?:\b(?:\d(?:_\d)?)+\.?(?:\d(?:_\d)?)*|\B\.(?:\d(?:_\d)?)+)(?:[Ee][+-]?(?:\d(?:_\d)?)+)?/, // Allow for all non-ASCII characters (See http://stackoverflow.com/a/2008444) 'function': /#?[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/, - 'operator': /-[-=]?|\+[+=]?|!=?=?|<>?>?=?|=(?:==?|>)?|&[&=]?|\|[|=]?|\*\*?=?|\/=?|~|\^=?|%=?|\?|\.{3}/ + 'operator': /--|\+\+|\*\*=?|=>|&&|\|\||[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|[~?:]/ }); Prism.languages.javascript['class-name'][0].pattern = /(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/; diff --git a/components/prism-javascript.min.js b/components/prism-javascript.min.js index e912acdc26..51f7139592 100644 --- a/components/prism-javascript.min.js +++ b/components/prism-javascript.min.js @@ -1 +1 @@ -Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])[_$A-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\.(?:prototype|constructor))/,lookbehind:!0}],keyword:[{pattern:/((?:^|})\s*)(?:catch|finally)\b/,lookbehind:!0},{pattern:/(^|[^.])\b(?:as|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],number:/\b(?:(?:0[xX](?:[\dA-Fa-f](?:_[\dA-Fa-f])?)+|0[bB](?:[01](?:_[01])?)+|0[oO](?:[0-7](?:_[0-7])?)+)n?|(?:\d(?:_\d)?)+n|NaN|Infinity)\b|(?:\b(?:\d(?:_\d)?)+\.?(?:\d(?:_\d)?)*|\B\.(?:\d(?:_\d)?)+)(?:[Ee][+-]?(?:\d(?:_\d)?)+)?/,function:/#?[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,operator:/-[-=]?|\+[+=]?|!=?=?|<>?>?=?|=(?:==?|>)?|&[&=]?|\|[|=]?|\*\*?=?|\/=?|~|\^=?|%=?|\?|\.{3}/}),Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/,Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s])\s*)\/(\[(?:[^\]\\\r\n]|\\.)*]|\\.|[^/\\\[\r\n])+\/[gimyus]{0,6}(?=\s*($|[\r\n,.;})\]]))/,lookbehind:!0,greedy:!0},"function-variable":{pattern:/#?[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)?\s*\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*=>)/i,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*\s*)\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),Prism.languages.insertBefore("javascript","string",{"template-string":{pattern:/`(?:\\[\s\S]|\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}|(?!\${)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\${|}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}}}),Prism.languages.markup&&Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.js=Prism.languages.javascript; \ No newline at end of file +Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])[_$A-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\.(?:prototype|constructor))/,lookbehind:!0}],keyword:[{pattern:/((?:^|})\s*)(?:catch|finally)\b/,lookbehind:!0},{pattern:/(^|[^.])\b(?:as|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],number:/\b(?:(?:0[xX](?:[\dA-Fa-f](?:_[\dA-Fa-f])?)+|0[bB](?:[01](?:_[01])?)+|0[oO](?:[0-7](?:_[0-7])?)+)n?|(?:\d(?:_\d)?)+n|NaN|Infinity)\b|(?:\b(?:\d(?:_\d)?)+\.?(?:\d(?:_\d)?)*|\B\.(?:\d(?:_\d)?)+)(?:[Ee][+-]?(?:\d(?:_\d)?)+)?/,function:/#?[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,operator:/--|\+\+|\*\*=?|=>|&&|\|\||[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|[~?:]/}),Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/,Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s])\s*)\/(\[(?:[^\]\\\r\n]|\\.)*]|\\.|[^/\\\[\r\n])+\/[gimyus]{0,6}(?=\s*($|[\r\n,.;})\]]))/,lookbehind:!0,greedy:!0},"function-variable":{pattern:/#?[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)?\s*\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*=>)/i,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*\s*)\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),Prism.languages.insertBefore("javascript","string",{"template-string":{pattern:/`(?:\\[\s\S]|\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}|(?!\${)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\${|}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}}}),Prism.languages.markup&&Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.js=Prism.languages.javascript; \ No newline at end of file diff --git a/prism.js b/prism.js index 2a60ab6f12..1a17dffd12 100644 --- a/prism.js +++ b/prism.js @@ -805,7 +805,7 @@ Prism.languages.javascript = Prism.languages.extend('clike', { 'number': /\b(?:(?:0[xX](?:[\dA-Fa-f](?:_[\dA-Fa-f])?)+|0[bB](?:[01](?:_[01])?)+|0[oO](?:[0-7](?:_[0-7])?)+)n?|(?:\d(?:_\d)?)+n|NaN|Infinity)\b|(?:\b(?:\d(?:_\d)?)+\.?(?:\d(?:_\d)?)*|\B\.(?:\d(?:_\d)?)+)(?:[Ee][+-]?(?:\d(?:_\d)?)+)?/, // Allow for all non-ASCII characters (See http://stackoverflow.com/a/2008444) 'function': /#?[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/, - 'operator': /-[-=]?|\+[+=]?|!=?=?|<>?>?=?|=(?:==?|>)?|&[&=]?|\|[|=]?|\*\*?=?|\/=?|~|\^=?|%=?|\?|\.{3}/ + 'operator': /--|\+\+|\*\*=?|=>|&&|\|\||[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|[~?:]/ }); Prism.languages.javascript['class-name'][0].pattern = /(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/; diff --git a/tests/languages/coffeescript/property_feature.test b/tests/languages/coffeescript/property_feature.test index 0f25679876..985ce7d7bf 100644 --- a/tests/languages/coffeescript/property_feature.test +++ b/tests/languages/coffeescript/property_feature.test @@ -5,11 +5,11 @@ foo_bar : [ ["property", "foo"], - ["punctuation", ":"], + ["operator", ":"], ["property", "foo_bar"], - ["punctuation", ":"] + ["operator", ":"] ] ---------------------------------------------------- -Checks for object properties. \ No newline at end of file +Checks for object properties. diff --git a/tests/languages/flow/flow-punctuation_feature.test b/tests/languages/flow/flow-punctuation_feature.test index ba0c900515..50e2099392 100644 --- a/tests/languages/flow/flow-punctuation_feature.test +++ b/tests/languages/flow/flow-punctuation_feature.test @@ -3,10 +3,10 @@ ---------------------------------------------------- [ - ["flow-punctuation", "{|"], " foo ", ["punctuation", ":"], + ["flow-punctuation", "{|"], " foo ", ["operator", ":"], ["type", "string"], ["flow-punctuation", "|}"] ] ---------------------------------------------------- -Checks for Flow specific punctuation. \ No newline at end of file +Checks for Flow specific punctuation. diff --git a/tests/languages/flow/function-variable_feature.test b/tests/languages/flow/function-variable_feature.test index cda25c97bf..aa763f1a44 100644 --- a/tests/languages/flow/function-variable_feature.test +++ b/tests/languages/flow/function-variable_feature.test @@ -5,16 +5,16 @@ bar = () : string => {} [ ["function-variable", "foo"], ["operator", "="], - ["punctuation", "("], "a", ["punctuation", ":"], + ["punctuation", "("], "a", ["operator", ":"], ["type", "number"], ["punctuation", ")"], - ["punctuation", ":"], ["type", "number"], + ["operator", ":"], ["type", "number"], ["operator", "=>"], ["punctuation", "{"], ["punctuation", "}"], ["function-variable", "bar"], ["operator", "="], ["punctuation", "("], ["punctuation", ")"], - ["punctuation", ":"], ["type", "string"], + ["operator", ":"], ["type", "string"], ["operator", "=>"], ["punctuation", "{"], ["punctuation", "}"] ] ---------------------------------------------------- -Checks for function variables containing types. \ No newline at end of file +Checks for function variables containing types. diff --git a/tests/languages/javascript/class-method_feature.test b/tests/languages/javascript/class-method_feature.test index 63919fa8ba..f2f1e2dedf 100644 --- a/tests/languages/javascript/class-method_feature.test +++ b/tests/languages/javascript/class-method_feature.test @@ -58,10 +58,10 @@ class Test { ["parameter", [ ["punctuation", "{"], " props", - ["punctuation", ":"], + ["operator", ":"], ["punctuation", "{"], " a", - ["punctuation", ":"], + ["operator", ":"], " _A", ["punctuation", ","], " b", diff --git a/tests/languages/javascript/function-variable_feature.test b/tests/languages/javascript/function-variable_feature.test index 53e9a3df51..37d08f9c18 100644 --- a/tests/languages/javascript/function-variable_feature.test +++ b/tests/languages/javascript/function-variable_feature.test @@ -38,7 +38,7 @@ a = function () {}, b = () => {} ["punctuation", "{"], ["function-variable", "foo"], - ["punctuation", ":"], + ["operator", ":"], ["keyword", "function"], ["punctuation", "("], ["punctuation", ")"], @@ -119,10 +119,10 @@ a = function () {}, b = () => {} ["parameter", [ ["punctuation", "{"], " props", - ["punctuation", ":"], + ["operator", ":"], ["punctuation", "{"], " a", - ["punctuation", ":"], + ["operator", ":"], " _A", ["punctuation", ","], " b", diff --git a/tests/languages/javascript/function_feature.test b/tests/languages/javascript/function_feature.test index f910b0a8a5..3665f673c1 100644 --- a/tests/languages/javascript/function_feature.test +++ b/tests/languages/javascript/function_feature.test @@ -27,7 +27,7 @@ foo({ y: fun() }) ["function", "Ƞȡ_҇"], ["punctuation", "("], ["punctuation", ")"], ["keyword", "if"], ["punctuation", "("], "notAFunction", ["punctuation", ")"], ["function", "foo"], ["punctuation", "("], ["punctuation", "{"], " x ", ["punctuation", "}"], ["punctuation", ")"], - ["function", "foo"], ["punctuation", "("], ["punctuation", "{"], " y", ["punctuation", ":"], ["function", "fun"], ["punctuation", "("], ["punctuation", ")"], ["punctuation", "}"], ["punctuation", ")"] + ["function", "foo"], ["punctuation", "("], ["punctuation", "{"], " y", ["operator", ":"], ["function", "fun"], ["punctuation", "("], ["punctuation", ")"], ["punctuation", "}"], ["punctuation", ")"] ] ---------------------------------------------------- diff --git a/tests/languages/javascript/operator_feature.test b/tests/languages/javascript/operator_feature.test index eb46bc4993..258a1665d0 100644 --- a/tests/languages/javascript/operator_feature.test +++ b/tests/languages/javascript/operator_feature.test @@ -9,7 +9,7 @@ * ** *= **= / /= ~ ^ ^= % %= -? ... +? : ... ---------------------------------------------------- @@ -25,9 +25,9 @@ ["operator", "*"], ["operator", "**"], ["operator", "*="], ["operator", "**="], ["operator", "/"], ["operator", "/="], ["operator", "~"], ["operator", "^"], ["operator", "^="], ["operator", "%"], ["operator", "%="], - ["operator", "?"], ["operator", "..."] + ["operator", "?"], ["operator", ":"], ["operator", "..."] ] ---------------------------------------------------- -Checks for all operators. \ No newline at end of file +Checks for all operators. diff --git a/tests/languages/javascript/template-string_feature.test b/tests/languages/javascript/template-string_feature.test index 27c454ece1..97e7d0e396 100644 --- a/tests/languages/javascript/template-string_feature.test +++ b/tests/languages/javascript/template-string_feature.test @@ -78,7 +78,7 @@ console.log(`This is ${it.with({ type: false })}!`) ["punctuation", "("], ["punctuation", "{"], " type", - ["punctuation", ":"], + ["operator", ":"], ["boolean", "false"], ["punctuation", "}"], ["punctuation", ")"], @@ -94,7 +94,7 @@ console.log(`This is ${it.with({ type: false })}!`) ["interpolation-punctuation", "${"], ["punctuation", "{"], "foo", - ["punctuation", ":"], + ["operator", ":"], ["string", "'bar'"], ["punctuation", "}"], ["punctuation", "."], diff --git a/tests/languages/jsx/issue1235.test b/tests/languages/jsx/issue1235.test index d28d61ffc4..97c5178683 100644 --- a/tests/languages/jsx/issue1235.test +++ b/tests/languages/jsx/issue1235.test @@ -14,7 +14,7 @@ ["punctuation", "{"], ["punctuation", "{"], " track", - ["punctuation", ":"], + ["operator", ":"], ["boolean", "true"], ["punctuation", "}"], ["punctuation", "}"] diff --git a/tests/languages/jsx/issue1335.test b/tests/languages/jsx/issue1335.test index a5683ab90e..c7863f27b8 100644 --- a/tests/languages/jsx/issue1335.test +++ b/tests/languages/jsx/issue1335.test @@ -34,7 +34,7 @@ ["punctuation", "("], ["punctuation", "{"], "clicked", - ["punctuation", ":"], + ["operator", ":"], ["boolean", "true"], ["punctuation", "}"], ["punctuation", ")"], @@ -56,21 +56,21 @@ ["punctuation", "["], ["punctuation", "{"], "id", - ["punctuation", ":"], + ["operator", ":"], ["number", "0"], ["punctuation", ","], " name", - ["punctuation", ":"], + ["operator", ":"], ["string", "'Joe'"], ["punctuation", "}"], ["punctuation", ","], ["punctuation", "{"], "id", - ["punctuation", ":"], + ["operator", ":"], ["number", "1"], ["punctuation", ","], " name", - ["punctuation", ":"], + ["operator", ":"], ["string", "'Sue'"], ["punctuation", "}"], ["punctuation", ","], diff --git a/tests/languages/jsx/issue1408.test b/tests/languages/jsx/issue1408.test index a73e8afb5d..395f1dd317 100644 --- a/tests/languages/jsx/issue1408.test +++ b/tests/languages/jsx/issue1408.test @@ -16,7 +16,7 @@ ["punctuation", "{"], ["punctuation", "{"], " marginLeft", - ["punctuation", ":"], + ["operator", ":"], ["template-string", [ ["template-punctuation", "`"], ["interpolation", [ diff --git a/tests/languages/jsx/plain-text_feature.test b/tests/languages/jsx/plain-text_feature.test index 6c942066c7..3a0fe59d97 100644 --- a/tests/languages/jsx/plain-text_feature.test +++ b/tests/languages/jsx/plain-text_feature.test @@ -39,7 +39,7 @@ ["number", "0"], ["operator", "?"], ["number", "42"], - ["punctuation", ":"], + ["operator", ":"], ["number", "0"], ["punctuation", "}"], ["plain-text", "}\r\n"], @@ -54,4 +54,4 @@ ---------------------------------------------------- -Checks that plain text inside tags is unmatched. \ No newline at end of file +Checks that plain text inside tags is unmatched. diff --git a/tests/languages/pug/tag_feature.test b/tests/languages/pug/tag_feature.test index 415f8bd9b1..b4dbf0348d 100644 --- a/tests/languages/pug/tag_feature.test +++ b/tests/languages/pug/tag_feature.test @@ -27,7 +27,7 @@ a: span ["punctuation", "("], ["punctuation", "{"], ["string", "'data-foo'"], - ["punctuation", ":"], + ["operator", ":"], ["string", "'bar'"], ["punctuation", "}"], ["punctuation", ")"] @@ -60,11 +60,11 @@ a: span ["attr-value", [ ["punctuation", "{"], "color", - ["punctuation", ":"], + ["operator", ":"], ["string", "'red'"], ["punctuation", ","], " background", - ["punctuation", ":"], + ["operator", ":"], ["string", "'green'"], ["punctuation", "}"] ]], @@ -94,4 +94,4 @@ a: span ---------------------------------------------------- -Checks for tags and attributes. \ No newline at end of file +Checks for tags and attributes. From 5d07aa7c3f0e9a796fa9db1b4395afcaa1b2aeb2 Mon Sep 17 00:00:00 2001 From: Golmote Date: Sat, 5 Oct 2019 13:53:01 +0200 Subject: [PATCH 0374/1100] Added @mAAdhaTTah and @RunDevelopment to credits and footer --- index.html | 2 +- templates/footer.html | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index 1f61bac473..f8451860b4 100644 --- a/index.html +++ b/index.html @@ -280,7 +280,7 @@

        Third-party tutorials

        Credits

          -
        • Special thanks to Golmote and Jannik Zschiesche for their contributions and for being amazing maintainers. Prism would not have been able to keep up without their help.
        • +
        • Special thanks to Michael Schmidt, James DiGioia, Golmote and Jannik Zschiesche for their contributions and for being amazing maintainers. Prism would not have been able to keep up without their help.
        • To Roman Komarov for his contributions, feedback and testing.
        • To Zachary Forrest for coming up with the name “Prism”
        • To stellarr for the spectrum background used on this page
        • diff --git a/templates/footer.html b/templates/footer.html index 98be749aa7..006ce4bd28 100644 --- a/templates/footer.html +++ b/templates/footer.html @@ -1,5 +1,6 @@ -

          Handcrafted with ♥, by Lea Verou, Golmote +

          Handcrafted with ♥, by Lea Verou, Golmote, +James DiGioia, Michael Schmidt & all these awesome people

        -

        Features

        - -

        This plugin currently provides 2 features:

        +
        +

        How to use

        -

        1. Prefix all Prism classes with a string

        +

        Prefix all Prism classes

        - Prism.plugins.customClass.prefix('prism--') +
        Prism.plugins.customClass.prefix('prism--')
        -

        2. Replace some Prism classes with your defined ones via an object

        +

        Replace some Prism classes with ones you defined

        Prism.plugins.customClass.map({
         	keyword: 'special-keyword',
        @@ -49,11 +52,11 @@ 

        2. Replace some Prism classes with your defined ones via an object

        comment: 'comment_93jsa' });
        -

        Object's keys are the tokens you want to replace (eg: comment), with their values being the classes you want to use (eg: my-comment). Tokens which are not specified will stay the same.

        +

        Object's keys are the classes you want to replace (eg: comment), with their values being the classes you want to use (eg: my-comment). Classes which are not specified will stay as they are.

        Alternatively you can also pass a function that takes the original class and returns the mapped class. This function can also be used implement language specific mapped classes.
        Example:

        -
        Prism.plugins.customClass.map(function (className, language) {
        +	
        Prism.plugins.customClass.map((className, language) => {
         	if (language === 'css') {
         		return cssSpecificMap[className] || className;
         	} else {
        @@ -61,6 +64,21 @@ 

        2. Replace some Prism classes with your defined ones via an object

        } });
        +

        Add new classes

        + +

        You can add new classes with per-token and per-language precision.

        + +
        Prism.plugins.customClass.add(({content, type, language}) => {
        +	if (content === 'content' && type === 'property' && language === 'css') {
        +		return 'content-property';
        +	}
        +});
        + +

        Note: The given content is the inner HTML of the current token. All < and & characters are escaped and it might contain the HTML code of nested tokens.

        + +
        + +

        Notes

          @@ -96,19 +114,21 @@

          CSS Modules Usage:

          Example

          -

          Input

          +

          Prefix and map classes

          + +

          Input

          <pre class="language-javascript"><code>
           	var foo = 'bar';
           </code></pre>
          -

          Options

          +

          Options

          Prism.plugins.customClass.map({
           	keyword: 'special-keyword',
           	string: 'my-string'
           });
           Prism.plugins.customClass.prefix('pr-');
          -

          Output

          +

          Output

          <pre class="language-javascript"><code>
           	<span class="pr-token pr-special-keyword">var</span>
           	foo
          @@ -116,6 +136,39 @@ 

          Output

          <span class="pr-my-string">'bar'</span> <span class="pr-token pr-punctuation">;</span> </code></pre>
          + +

          Add new classes

          + +

          Input

          +
          <pre class="language-css"><code>
          +a::after {
          +	content: '\2b00 ';
          +	opacity: .7;
          +}
          +</code></pre>
          + +

          Options

          +
          Prism.plugins.customClass.add(({language, type, content}) => {
          +	if (content === 'content' && type === 'property' && language === 'css') {
          +		return 'content-property';
          +	}
          +});
          + +

          Output

          +
          <pre class=" language-css"><code class=" language-css">
          +<span class="token selector">a::after</span>
          +<span class="token punctuation">{</span>
          +	<span class="token property content-property">content</span>
          +	<span class="token punctuation">:</span>
          +	<span class="token string">'\2b00 '</span>
          +	<span class="token punctuation">;</span>
          +	<span class="token property">opacity</span>
          +	<span class="token punctuation">:</span>
          +	 .7
          +	<span class="token punctuation">;</span>
          +<span class="token punctuation">}</span>
          +</code></pre>
          +
          diff --git a/plugins/custom-class/prism-custom-class.js b/plugins/custom-class/prism-custom-class.js index 3b5e6c129b..24f56549e7 100644 --- a/plugins/custom-class/prism-custom-class.js +++ b/plugins/custom-class/prism-custom-class.js @@ -1,68 +1,95 @@ -(function(){ +(function () { -if ( - (typeof self === 'undefined' || !self.Prism) && - (typeof global === 'undefined' || !global.Prism) -) { - return; -} - -/** - * @callback ClassMapper - * @param {string} className - * @param {string} language - * @returns {string} - */ -/** - * @typedef CustomClassOptions - * @property {ClassMapper} classMap - * @property {string} prefixString - */ - -/** @type {ClassMapper} */ -var defaultClassMap = function (className) { return className; }; - -/** @type {CustomClassOptions} */ -var options = { - classMap: defaultClassMap, - prefixString: '' -}; + if ( + (typeof self === 'undefined' || !self.Prism) && + (typeof global === 'undefined' || !global.Prism) + ) { + return; + } -Prism.plugins.customClass = { /** - * Maps all class names using the given object or map function. + * @callback ClassMapper + * @param {string} className + * @param {string} language + * @returns {string} * - * This does not affect the prefix. + * @callback ClassAdder + * @param {ClassAdderEnvironment} env + * @returns {undefined | string | string[]} * - * @param {Object | ClassMapper} classMap + * @typedef ClassAdderEnvironment + * @property {string} language + * @property {string} type + * @property {string} content */ - map: function map(classMap) { - if (typeof classMap === 'function') { - options.classMap = classMap; - } else { - options.classMap = function (className) { - return classMap[className] || className; - }; + + // options + + /** @type {ClassAdder | undefined} */ + var adder; + /** @type {ClassMapper | undefined} */ + var mapper; + /** @type {string} */ + var prefixString = ''; + + + Prism.plugins.customClass = { + /** + * Sets the function which can be used to add custom aliases to any token. + * + * @param {ClassAdder} classAdder + */ + add: function (classAdder) { + adder = classAdder; + }, + /** + * Maps all class names using the given object or map function. + * + * This does not affect the prefix. + * + * @param {Object | ClassMapper} classMapper + */ + map: function map(classMapper) { + if (typeof classMapper === 'function') { + mapper = classMapper; + } else { + mapper = function (className) { + return classMapper[className] || className; + }; + } + }, + /** + * Adds the given prefix to all class names. + * + * @param {string} string + */ + prefix: function prefix(string) { + prefixString = string || ''; } - }, - /** - * Adds the given prefix to all class names. - * - * @param {string} string - */ - prefix: function prefix(string) { - options.prefixString = string; } -} -Prism.hooks.add('wrap', function (env) { - if (options.classMap === defaultClassMap && !options.prefixString) { - return; - } + Prism.hooks.add('wrap', function (env) { + if (adder) { + var result = adder({ + content: env.content, + type: env.type, + language: env.language + }); + + if (Array.isArray(result)) { + env.classes.push.apply(env.classes, result); + } else if (result) { + env.classes.push(result); + } + } + + if (!mapper && !prefixString) { + return; + } - env.classes = env.classes.map(function (c) { - return options.prefixString + options.classMap(c, env.language); + env.classes = env.classes.map(function (c) { + return prefixString + mapper ? mapper(c, env.language) : c; + }); }); -}); })(); diff --git a/plugins/custom-class/prism-custom-class.min.js b/plugins/custom-class/prism-custom-class.min.js index a087f0ef4b..da639b6707 100644 --- a/plugins/custom-class/prism-custom-class.min.js +++ b/plugins/custom-class/prism-custom-class.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof self&&self.Prism||"undefined"!=typeof global&&global.Prism){var n=function(n){return n},s={classMap:n,prefixString:""};Prism.plugins.customClass={map:function(i){s.classMap="function"==typeof i?i:function(n){return i[n]||n}},prefix:function(n){s.prefixString=n}},Prism.hooks.add("wrap",function(i){(s.classMap!==n||s.prefixString)&&(i.classes=i.classes.map(function(n){return s.prefixString+s.classMap(n,i.language)}))})}}(); \ No newline at end of file +!function(){if("undefined"!=typeof self&&self.Prism||"undefined"!=typeof global&&global.Prism){var a,e,t="";Prism.plugins.customClass={add:function(n){a=n},map:function(s){e="function"==typeof s?s:function(n){return s[n]||n}},prefix:function(n){t=n||""}},Prism.hooks.add("wrap",function(s){if(a){var n=a({content:s.content,type:s.type,language:s.language});Array.isArray(n)?s.classes.push.apply(s.classes,n):n&&s.classes.push(n)}(e||t)&&(s.classes=s.classes.map(function(n){return t+e?e(n,s.language):n}))})}}(); \ No newline at end of file From 9908ca69e770fc4f2a137d334a4128782f03d829 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Mon, 2 Dec 2019 01:43:42 +0100 Subject: [PATCH 0399/1100] Robotframework: Renamed example file (#2126) This renames the example for the Robotframework language to match its id. --- .../{prism-robot-framework.html => prism-robotframework.html} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename examples/{prism-robot-framework.html => prism-robotframework.html} (100%) diff --git a/examples/prism-robot-framework.html b/examples/prism-robotframework.html similarity index 100% rename from examples/prism-robot-framework.html rename to examples/prism-robotframework.html From a7f700901947150cfd347342fbd26fe9f3e4ee83 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Mon, 2 Dec 2019 14:10:53 +0100 Subject: [PATCH 0400/1100] Added new Filter highlightAll plugin (#2074) This adds a new plugin to Prism which allows users to filter which elements will be highlighted by the `highlightAll` and `highlightAllUnder` methods. --- components.js | 2 +- components.json | 6 + components/prism-core.js | 45 +++--- components/prism-core.min.js | 2 +- plugins/filter-highlight-all/index.html | 146 ++++++++++++++++++ .../prism-filter-highlight-all.js | 125 +++++++++++++++ .../prism-filter-highlight-all.min.js | 1 + prism.js | 45 +++--- 8 files changed, 328 insertions(+), 44 deletions(-) create mode 100644 plugins/filter-highlight-all/index.html create mode 100644 plugins/filter-highlight-all/prism-filter-highlight-all.js create mode 100644 plugins/filter-highlight-all/prism-filter-highlight-all.min.js diff --git a/components.js b/components.js index f11d68a3a3..39985e8b2e 100644 --- a/components.js +++ b/components.js @@ -1,2 +1,2 @@ -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default","peerDependencies":"markup"},"clike":{"title":"C-like","option":"default","overrideExampleHeader":true},"javascript":{"title":"JavaScript","require":"clike","peerDependencies":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"Augmented Backus–Naur form","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","peerDependencies":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","owner":"RunDevelopment"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"Backus–Naur form","alias":"rbnf","aliasTitles":{"rbnf":"Routing Backus–Naur form"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"Extended Backus–Naur form","owner":"RunDevelopment"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment"},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","peerDependencies":["css","css-extras","coffeescript","erb","javascript","less","markdown","ruby","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"http":{"title":"HTTP","peerDependencies":["javascript","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"peerDependencies":["scala"],"owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","peerDependencies":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike"],"peerDependencies":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","peerDependencies":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"js-templates":{"title":"JS Templates","require":"javascript","peerDependencies":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"json":{"title":"JSON","owner":"CupOfTea696"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"less":{"title":"Less","require":"css","peerDependencies":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","peerDependencies":["jsdoc"],"alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"nasm":{"title":"NASM","owner":"rbmj"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"cpp","peerDependencies":["c","cpp"],"overrideExampleHeader":true,"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"peerDependencies":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","peerDependencies":["c","cpp","fortran"],"owner":"Golmote"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"peerDependencies":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","peerDependencies":["actionscript","coffeescript","flow","javascript","typescript","vala"],"owner":"RunDevelopment"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","peerDependencies":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","peerDependencies":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"solidity":{"title":"Solidity (Ethereum)","require":"clike","owner":"glachaud"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","peerDependencies":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"turtle":{"title":"Turtle","alias":["trig"],"aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","peerDependencies":"js-templates","alias":"ts","owner":"vkbansal"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","visual-basic"],"owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","after":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","after":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","after":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"}}}; +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default","peerDependencies":"markup"},"clike":{"title":"C-like","option":"default","overrideExampleHeader":true},"javascript":{"title":"JavaScript","require":"clike","peerDependencies":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"Augmented Backus–Naur form","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","peerDependencies":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","owner":"RunDevelopment"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"Backus–Naur form","alias":"rbnf","aliasTitles":{"rbnf":"Routing Backus–Naur form"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"Extended Backus–Naur form","owner":"RunDevelopment"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment"},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","peerDependencies":["css","css-extras","coffeescript","erb","javascript","less","markdown","ruby","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"http":{"title":"HTTP","peerDependencies":["javascript","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"peerDependencies":["scala"],"owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","peerDependencies":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike"],"peerDependencies":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","peerDependencies":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"js-templates":{"title":"JS Templates","require":"javascript","peerDependencies":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"json":{"title":"JSON","owner":"CupOfTea696"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"less":{"title":"Less","require":"css","peerDependencies":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","peerDependencies":["jsdoc"],"alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"nasm":{"title":"NASM","owner":"rbmj"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"cpp","peerDependencies":["c","cpp"],"overrideExampleHeader":true,"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"peerDependencies":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","peerDependencies":["c","cpp","fortran"],"owner":"Golmote"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"peerDependencies":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","peerDependencies":["actionscript","coffeescript","flow","javascript","typescript","vala"],"owner":"RunDevelopment"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","peerDependencies":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","peerDependencies":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"solidity":{"title":"Solidity (Ethereum)","require":"clike","owner":"glachaud"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","peerDependencies":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"turtle":{"title":"Turtle","alias":["trig"],"aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","peerDependencies":"js-templates","alias":"ts","owner":"vkbansal"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","visual-basic"],"owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","after":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","after":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","after":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true}}}; if (typeof module !== 'undefined' && module.exports) { module.exports = components; } \ No newline at end of file diff --git a/components.json b/components.json index ea7897f1a5..bc0dbe33dc 100644 --- a/components.json +++ b/components.json @@ -1209,6 +1209,12 @@ "description": "Highlights the code inside diff blocks.", "owner": "RunDevelopment", "require": "diff" + }, + "filter-highlight-all": { + "title": "Filter highlightAll", + "description": "Filters the elements the highlightAll and highlightAllUnder methods actually highlight.", + "owner": "RunDevelopment", + "noCSS": true } } } diff --git a/components/prism-core.js b/components/prism-core.js index bac6b866c3..7726f349ec 100644 --- a/components/prism-core.js +++ b/components/prism-core.js @@ -18,24 +18,6 @@ var Prism = (function (_self){ var lang = /\blang(?:uage)?-([\w-]+)\b/i; var uniqueId = 0; -/** - * Returns the Prism language of the given element set by a `language-xxxx` or `lang-xxxx` class. - * - * If no language is set for the element or the element is `null` or `undefined`, `none` will be returned. - * - * @param {Element} element - * @returns {string} - */ -function getLanguage(element) { - while (element && !lang.test(element.className)) { - element = element.parentNode; - } - if (element) { - return (element.className.match(lang) || [, 'none'])[1].toLowerCase(); - } - return 'none'; -} - var _ = { manual: _self.Prism && _self.Prism.manual, @@ -103,6 +85,24 @@ var _ = { } }, + /** + * Returns the Prism language of the given element set by a `language-xxxx` or `lang-xxxx` class. + * + * If no language is set for the element or the element is `null` or `undefined`, `none` will be returned. + * + * @param {Element} element + * @returns {string} + */ + getLanguage: function (element) { + while (element && !lang.test(element.className)) { + element = element.parentElement; + } + if (element) { + return (element.className.match(lang) || [, 'none'])[1].toLowerCase(); + } + return 'none'; + }, + /** * Returns the script element that is currently executing. * @@ -236,21 +236,24 @@ var _ = { highlightAllUnder: function(container, async, callback) { var env = { callback: callback, + container: container, selector: 'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code' }; _.hooks.run('before-highlightall', env); - var elements = container.querySelectorAll(env.selector); + env.elements = Array.prototype.slice.apply(env.container.querySelectorAll(env.selector)); + + _.hooks.run('before-all-elements-highlight', env); - for (var i=0, element; element = elements[i++];) { + for (var i = 0, element; element = env.elements[i++];) { _.highlightElement(element, async === true, env.callback); } }, highlightElement: function(element, async, callback) { // Find language - var language = getLanguage(element); + var language = _.util.getLanguage(element); var grammar = _.languages[language]; // Set language on the element, if not present diff --git a/components/prism-core.min.js b/components/prism-core.min.js index 5a2d26a1ac..4f15a09411 100644 --- a/components/prism-core.min.js +++ b/components/prism-core.min.js @@ -1 +1 @@ -var _self="undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{},Prism=function(u){var c=/\blang(?:uage)?-([\w-]+)\b/i,r=0;var _={manual:u.Prism&&u.Prism.manual,disableWorkerMessageHandler:u.Prism&&u.Prism.disableWorkerMessageHandler,util:{encode:function(e){return e instanceof L?new L(e.type,_.util.encode(e.content),e.alias):Array.isArray(e)?e.map(_.util.encode):e.replace(/&/g,"&").replace(/e.length)return;if(!(k instanceof L)){if(d&&y!=r.length-1){if(c.lastIndex=v,!(O=c.exec(e)))break;for(var b=O.index+(f&&O[1]?O[1].length:0),w=O.index+O[0].length,A=y,P=v,x=r.length;A"+n.content+""},!u.document)return u.addEventListener&&(_.disableWorkerMessageHandler||u.addEventListener("message",function(e){var r=JSON.parse(e.data),n=r.language,t=r.code,a=r.immediateClose;u.postMessage(_.highlight(t,_.languages[n],n)),a&&u.close()},!1)),_;var e=_.util.currentScript();if(e&&(_.filename=e.src,e.hasAttribute("data-manual")&&(_.manual=!0)),!_.manual){function n(){_.manual||_.highlightAll()}var t=document.readyState;"loading"===t||"interactive"===t&&e&&e.defer?document.addEventListener("DOMContentLoaded",n):window.requestAnimationFrame?window.requestAnimationFrame(n):window.setTimeout(n,16)}return _}(_self);"undefined"!=typeof module&&module.exports&&(module.exports=Prism),"undefined"!=typeof global&&(global.Prism=Prism); \ No newline at end of file +var _self="undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{},Prism=function(u){var c=/\blang(?:uage)?-([\w-]+)\b/i,n=0,C={manual:u.Prism&&u.Prism.manual,disableWorkerMessageHandler:u.Prism&&u.Prism.disableWorkerMessageHandler,util:{encode:function(e){return e instanceof _?new _(e.type,C.util.encode(e.content),e.alias):Array.isArray(e)?e.map(C.util.encode):e.replace(/&/g,"&").replace(/e.length)return;if(!(k instanceof _)){if(h&&y!=n.length-1){if(c.lastIndex=v,!(O=c.exec(e)))break;for(var b=O.index+(f&&O[1]?O[1].length:0),w=O.index+O[0].length,A=y,P=v,x=n.length;A"+r.content+""},!u.document)return u.addEventListener&&(C.disableWorkerMessageHandler||u.addEventListener("message",function(e){var n=JSON.parse(e.data),r=n.language,t=n.code,a=n.immediateClose;u.postMessage(C.highlight(t,C.languages[r],r)),a&&u.close()},!1)),C;var e=C.util.currentScript();if(e&&(C.filename=e.src,e.hasAttribute("data-manual")&&(C.manual=!0)),!C.manual){function r(){C.manual||C.highlightAll()}var t=document.readyState;"loading"===t||"interactive"===t&&e&&e.defer?document.addEventListener("DOMContentLoaded",r):window.requestAnimationFrame?window.requestAnimationFrame(r):window.setTimeout(r,16)}return C}(_self);"undefined"!=typeof module&&module.exports&&(module.exports=Prism),"undefined"!=typeof global&&(global.Prism=Prism); \ No newline at end of file diff --git a/plugins/filter-highlight-all/index.html b/plugins/filter-highlight-all/index.html new file mode 100644 index 0000000000..53f9439568 --- /dev/null +++ b/plugins/filter-highlight-all/index.html @@ -0,0 +1,146 @@ + + + + + + + Filter highlightAll ▲ Prism plugins + + + + + + + + + + + +
          + +
          +

          How to use

          + +

          Filter highlightAll provides you with ways to filter the element the highlightAll and highlightAllUnder methods actually highlight. This can be very useful when you use Prism's automatic highlighting when loading the page but want to exclude certain code blocks.

          +
          + +
          +

          API

          + +

          In Prism.plugins.filterHighlightAll you can find the following:

          + +
          +
          add(condition: (value: { element, language: string }) => boolean): void
          +
          + Adds a new filter which will only allow an element to be highlighted if the given function returns true for that element.
          + This can be used to define a custom language filter. +
          + +
          addSelector(selector: string): void
          +
          + Adds a new filter which will only allow an element to be highlighted if the element matches the given CSS selector. +
          + +
          reject.add(condition: (value: { element, language: string }) => boolean): void
          +
          + Same as add, but only elements which do not fulfill the condition will be highlighted. +
          + +
          reject.addSelector(selector: string): void
          +
          + Same as addSelector, but only elements which do not match the selector will be highlighted. +
          + +
          filterKnown: boolean = false
          +
          + Set this to true to only allow known languages. + Code blocks without a set language or an unknown language will not be highlighted. +
          +
          + +

          An element will only be highlighted by the highlightAll and highlightAllUnder methods if all of the above accept the element.

          + +

          Attributes

          + +

          You can also add the following data-* attributes to the script which contains the Filter highlightAll plugin.

          + +
          +
          <script src="..." data-filter-selector="<css selector>">
          +
          + This attribute is a shorthand for Prism.plugins.filterHighlightAll.addSelector. + The value of the attribute will be passed as is to the addSelector function. +
          + +
          <script src="..." data-reject-selector="<css selector>">
          +
          + This attribute is a shorthand for Prism.plugins.filterHighlightAll.reject.addSelector. + The value of the attribute will be passed as is to the rejectSelector function. +
          + +
          <script src="..." data-filter-known>
          +
          + This attribute can be used to set the value of Prism.plugins.filterHighlightAll.filterKnown. + filterKnown will be set to true if the attribute is present, false otherwise. +
          +
          + +
          + +
          +

          Examples

          + +

          The following code is used to define a filter on this page.

          + +
          // <code> elements with a .no-highlight class will be ignored
          +Prism.plugins.filterHighlightAll.reject.addSelector('code.no-highlight');
          +Prism.plugins.filterHighlightAll.reject.addSelector('pre.no-highlight > code');
          +
          +// don't highlight CSS code
          +Prism.plugins.filterHighlightAll.add(function (env) {
          +	return env.language !== 'css';
          +});
          + +

          The results:

          + +
          let foo = "I'm not being highlighted";
          + +
          a.link::after {
          +	content: 'also not being highlighted';
          +	color: #F00;
          +}
          + +

          Prism will ignore these blocks, so you can even define your own static highlighting which Prism would normally remove.

          + +
          a.link::before {
          +	content: 'I just do my own highlighted';
          +	color: #F00;
          +}
          + +
          + +
          + + + + + + + + + + + + diff --git a/plugins/filter-highlight-all/prism-filter-highlight-all.js b/plugins/filter-highlight-all/prism-filter-highlight-all.js new file mode 100644 index 0000000000..6bfec21384 --- /dev/null +++ b/plugins/filter-highlight-all/prism-filter-highlight-all.js @@ -0,0 +1,125 @@ +(function () { + + if (typeof self !== 'undefined' && !self.Prism) { + return; + } + + // https://developer.mozilla.org/en-US/docs/Web/API/Element/matches#Polyfill + if (!Element.prototype.matches) { + Element.prototype.matches = Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector; + } + + var script = Prism.util.currentScript(); + + + /** + * @type {Array<(element: HTMLElement) => boolean>} + */ + var filters = []; + + var config = Prism.plugins.filterHighlightAll = { + + /** + * Adds a new filter for the elements of `highlightAll` and `highlightAllUnder` such that only elements for + * which the given function returns `true` will be highlighted. + * + * @param {(value: { element: HTMLElement, language: string }) => boolean} condition + */ + add: function (condition) { + filters.push(function (element) { + return condition({ + element: element, + language: Prism.util.getLanguage(element) + }); + }); + }, + + /** + * Adds a new filter for the elements of `highlightAll` and `highlightAllUnder` such that only elements that + * match the given CSS selection will be highlighted. + * + * @param {string} selector + */ + addSelector: function (selector) { + filters.push(function (element) { + return element.matches(selector); + }); + }, + + reject: { + + /** + * Adds a new filter for the elements of `highlightAll` and `highlightAllUnder` such that only elements for + * which the given function returns `false` will be highlighted. + * + * @param {(value: { element: HTMLElement, language: string }) => boolean} condition + */ + add: function (condition) { + filters.push(function (element) { + return !condition({ + element: element, + language: Prism.util.getLanguage(element) + }); + }); + }, + + /** + * Adds a new filter for the elements of `highlightAll` and `highlightAllUnder` such that only elements that do + * not match the given CSS selection will be highlighted. + * + * @param {string} selector + */ + addSelector: function (selector) { + filters.push(function (element) { + return !element.matches(selector); + }); + }, + + }, + + /** + * Filters the elements of `highlightAll` and `highlightAllUnder` such that only elements with a known language + * will be highlighted. All elements with an unset or unknown language will be ignored. + * + * __Note:__ This will effectively disable the AutoLoader plugin. + * + * @type {boolean} + */ + filterKnown: !!script && script.hasAttribute('data-filter-known') + }; + + config.add(function filterKnown(env) { + return !config.filterKnown || typeof Prism.languages[env.language] === 'object'; + }); + + if (script) { + var attr; + if (attr = script.getAttribute('data-filter-selector')) { + config.addSelector(attr); + } + if (attr = script.getAttribute('data-reject-selector')) { + config.reject.addSelector(attr); + } + } + + /** + * Applies all filters to the given element and returns true if and only if every filter returned true on the + * given element. + * + * @param {HTMLElement} element + * @returns {boolean} + */ + function combinedFilter(element) { + for (var i = 0, l = filters.length; i < l; i++) { + if (!filters[i](element)) { + return false; + } + } + return true; + } + + Prism.hooks.add('before-all-elements-highlight', function (env) { + env.elements = env.elements.filter(combinedFilter); + }); + +}()); diff --git a/plugins/filter-highlight-all/prism-filter-highlight-all.min.js b/plugins/filter-highlight-all/prism-filter-highlight-all.min.js new file mode 100644 index 0000000000..8e5a143591 --- /dev/null +++ b/plugins/filter-highlight-all/prism-filter-highlight-all.min.js @@ -0,0 +1 @@ +!function(){if("undefined"==typeof self||self.Prism){Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var e,t=Prism.util.currentScript(),r=[],n=Prism.plugins.filterHighlightAll={add:function(t){r.push(function(e){return t({element:e,language:Prism.util.getLanguage(e)})})},addSelector:function(t){r.push(function(e){return e.matches(t)})},reject:{add:function(t){r.push(function(e){return!t({element:e,language:Prism.util.getLanguage(e)})})},addSelector:function(t){r.push(function(e){return!e.matches(t)})}},filterKnown:!!t&&t.hasAttribute("data-filter-known")};if(n.add(function(e){return!n.filterKnown||"object"==typeof Prism.languages[e.language]}),t)(e=t.getAttribute("data-filter-selector"))&&n.addSelector(e),(e=t.getAttribute("data-reject-selector"))&&n.reject.addSelector(e);Prism.hooks.add("before-all-elements-highlight",function(e){e.elements=e.elements.filter(i)})}function i(e){for(var t=0,n=r.length;t Date: Mon, 16 Dec 2019 12:49:21 +0100 Subject: [PATCH 0401/1100] Standardized dependency logic implementation (#1998) This adds a standard logic for handling dependencies between Prism components. Right now, the download page, the `loadLanguages` function, and the test suite use the new dependency system. --- components.js | 2 +- components.json | 57 +++-- components/index.js | 107 +++------ dependencies.js | 431 +++++++++++++++++++++++++++++++++++ download.html | 1 + package.json | 3 +- scripts/download.js | 142 ++++++------ tests/dependencies-test.js | 257 +++++++++++++++++++++ tests/helper/prism-loader.js | 57 ++--- 9 files changed, 860 insertions(+), 197 deletions(-) create mode 100644 dependencies.js create mode 100644 tests/dependencies-test.js diff --git a/components.js b/components.js index 39985e8b2e..dd554dcde9 100644 --- a/components.js +++ b/components.js @@ -1,2 +1,2 @@ -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default","peerDependencies":"markup"},"clike":{"title":"C-like","option":"default","overrideExampleHeader":true},"javascript":{"title":"JavaScript","require":"clike","peerDependencies":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"Augmented Backus–Naur form","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","peerDependencies":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","owner":"RunDevelopment"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"Backus–Naur form","alias":"rbnf","aliasTitles":{"rbnf":"Routing Backus–Naur form"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"Extended Backus–Naur form","owner":"RunDevelopment"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment"},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","peerDependencies":["css","css-extras","coffeescript","erb","javascript","less","markdown","ruby","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"http":{"title":"HTTP","peerDependencies":["javascript","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"peerDependencies":["scala"],"owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","peerDependencies":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike"],"peerDependencies":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","peerDependencies":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"js-templates":{"title":"JS Templates","require":"javascript","peerDependencies":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"json":{"title":"JSON","owner":"CupOfTea696"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"less":{"title":"Less","require":"css","peerDependencies":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","peerDependencies":["jsdoc"],"alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"nasm":{"title":"NASM","owner":"rbmj"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"cpp","peerDependencies":["c","cpp"],"overrideExampleHeader":true,"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"peerDependencies":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","peerDependencies":["c","cpp","fortran"],"owner":"Golmote"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"peerDependencies":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","peerDependencies":["actionscript","coffeescript","flow","javascript","typescript","vala"],"owner":"RunDevelopment"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","peerDependencies":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","peerDependencies":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"solidity":{"title":"Solidity (Ethereum)","require":"clike","owner":"glachaud"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","peerDependencies":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"turtle":{"title":"Turtle","alias":["trig"],"aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","peerDependencies":"js-templates","alias":"ts","owner":"vkbansal"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","visual-basic"],"owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","after":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","after":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","after":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true}}}; +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default","overrideExampleHeader":true},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"Augmented Backus–Naur form","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","owner":"RunDevelopment"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"Backus–Naur form","alias":"rbnf","aliasTitles":{"rbnf":"Routing Backus–Naur form"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"Extended Backus–Naur form","owner":"RunDevelopment"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment"},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","ruby","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"http":{"title":"HTTP","optional":["css","javascript","json","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":["java"],"optional":["scala"],"owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"json":{"title":"JSON","owner":"CupOfTea696"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":["jsdoc"],"alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"nasm":{"title":"NASM","owner":"rbmj"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"cpp","modify":["c","cpp"],"overrideExampleHeader":true,"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","modify":["actionscript","coffeescript","flow","javascript","typescript","vala"],"owner":"RunDevelopment"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","peerDependencies":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"solidity":{"title":"Solidity (Ethereum)","require":"clike","owner":"glachaud"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"turtle":{"title":"Turtle","alias":["trig"],"aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","visual-basic"],"owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true}}}; if (typeof module !== 'undefined' && module.exports) { module.exports = components; } \ No newline at end of file diff --git a/components.json b/components.json index bc0dbe33dc..9292842699 100644 --- a/components.json +++ b/components.json @@ -60,7 +60,7 @@ "css": { "title": "CSS", "option": "default", - "peerDependencies": "markup" + "modify": "markup" }, "clike": { "title": "C-like", @@ -70,7 +70,7 @@ "javascript": { "title": "JavaScript", "require": "clike", - "peerDependencies": "markup", + "modify": "markup", "alias": "js", "option": "default" }, @@ -85,7 +85,7 @@ "actionscript": { "title": "ActionScript", "require": "javascript", - "peerDependencies": "markup", + "modify": "markup", "owner": "Golmote" }, "ada": { @@ -235,6 +235,7 @@ "css-extras": { "title": "CSS Extras", "require": "css", + "modify": "css", "owner": "milesj" }, "d": { @@ -374,7 +375,7 @@ "haml": { "title": "Haml", "require": "ruby", - "peerDependencies": [ + "optional": [ "css", "css-extras", "coffeescript", @@ -409,8 +410,10 @@ }, "http": { "title": "HTTP", - "peerDependencies": [ + "optional": [ + "css", "javascript", + "json", "markup" ], "owner": "danielgtaylor" @@ -455,14 +458,17 @@ "javadoc": { "title": "JavaDoc", "require": ["markup", "java", "javadoclike"], - "peerDependencies": [ + "modify": [ + "java" + ], + "optional": [ "scala" ], "owner": "RunDevelopment" }, "javadoclike": { "title": "JavaDoc-like", - "peerDependencies": [ + "modify": [ "java", "javascript", "php" @@ -485,7 +491,8 @@ "jsdoc": { "title": "JSDoc", "require": ["javascript", "javadoclike"], - "peerDependencies": [ + "modify": "javascript", + "optional": [ "actionscript", "coffeescript" ], @@ -494,7 +501,8 @@ "js-extras": { "title": "JS Extras", "require": "javascript", - "peerDependencies": [ + "modify": "javascript", + "optional": [ "actionscript", "coffeescript", "flow", @@ -506,7 +514,8 @@ "js-templates": { "title": "JS Templates", "require": "javascript", - "peerDependencies": [ + "modify": "javascript", + "optional": [ "css", "css-extras", "graphql", @@ -554,7 +563,7 @@ "less": { "title": "Less", "require": "css", - "peerDependencies": "css-extras", + "optional": "css-extras", "owner": "Golmote" }, "lilypond": { @@ -627,7 +636,7 @@ "n4js": { "title": "N4JS", "require": "javascript", - "peerDependencies": [ + "optional": [ "jsdoc" ], "alias": "n4jsd", @@ -670,7 +679,7 @@ "opencl": { "title": "OpenCL", "require": "cpp", - "peerDependencies": [ + "modify": [ "c", "cpp" ], @@ -719,11 +728,13 @@ "phpdoc": { "title": "PHPDoc", "require": ["php", "javadoclike"], + "modify": "php", "owner": "RunDevelopment" }, "php-extras": { "title": "PHP Extras", "require": "php", + "modify": "php", "owner": "milesj" }, "plsql": { @@ -756,7 +767,7 @@ "pug": { "title": "Pug", "require": ["markup", "javascript"], - "peerDependencies": [ + "optional": [ "coffeescript", "ejs", "handlebars", @@ -775,7 +786,7 @@ }, "pure": { "title": "Pure", - "peerDependencies": [ + "optional": [ "c", "cpp", "fortran" @@ -803,7 +814,7 @@ "jsx": { "title": "React JSX", "require": ["markup", "javascript"], - "peerDependencies": [ + "optional": [ "jsdoc", "js-extras", "js-templates" @@ -825,7 +836,7 @@ }, "regex": { "title": "Regex", - "peerDependencies": [ + "modify": [ "actionscript", "coffeescript", "flow", @@ -875,7 +886,7 @@ "scss": { "title": "Sass (Scss)", "require": "css", - "peerDependencies": "css-extras", + "optional": "css-extras", "owner": "MoOx" }, "scala": { @@ -951,7 +962,7 @@ "textile": { "title": "Textile", "require": "markup", - "peerDependencies": "css", + "optional": "css", "owner": "Golmote" }, "toml": { @@ -979,7 +990,7 @@ "typescript": { "title": "TypeScript", "require": "javascript", - "peerDependencies": "js-templates", + "optional": "js-templates", "alias": "ts", "owner": "vkbansal" }, @@ -1084,7 +1095,7 @@ "show-invisibles": { "title": "Show Invisibles", "description": "Show hidden characters such as tabs and line breaks.", - "after": [ + "optional": [ "autolinker", "data-uri-highlight" ] @@ -1155,7 +1166,7 @@ "title": "Keep Markup", "description": "Prevents custom markup from being dropped out during highlighting.", "owner": "Golmote", - "after": "normalize-whitespace", + "optional": "normalize-whitespace", "noCSS": true }, "command-line": { @@ -1171,7 +1182,7 @@ "title": "Normalize Whitespace", "description": "Supports multiple operations to normalize whitespace in code blocks.", "owner": "zeitgeist87", - "after": "unescaped-markup", + "optional": "unescaped-markup", "noCSS": true }, "data-uri-highlight": { diff --git a/components/index.js b/components/index.js index fe5940ae1c..450810a7a2 100644 --- a/components/index.js +++ b/components/index.js @@ -1,82 +1,49 @@ -var components = require('../components.js'); -var peerDependentsMap = null; - -function getPeerDependentsMap() { - var peerDependentsMap = {}; - Object.keys(components.languages).forEach(function (language) { - if (language === 'meta') { - return false; - } - if (components.languages[language].peerDependencies) { - var peerDependencies = components.languages[language].peerDependencies; - if (!Array.isArray(peerDependencies)) { - peerDependencies = [peerDependencies]; - } - peerDependencies.forEach(function (peerDependency) { - if (!peerDependentsMap[peerDependency]) { - peerDependentsMap[peerDependency] = []; - } - peerDependentsMap[peerDependency].push(language); - }); - } - }); - return peerDependentsMap; -} - -function getPeerDependents(mainLanguage) { - if (!peerDependentsMap) { - peerDependentsMap = getPeerDependentsMap(); +const components = require('../components.js'); +const getLoader = require('../dependencies'); + + +/** + * The set of all languages which have been loaded using the below function. + * + * @type {Set} + */ +const loadedLanguages = new Set(); + +/** + * Loads the given languages and adds them to the current Prism instance. + * + * If no languages are provided, __all__ Prism languages will be loaded. + * + * @param {string|string[]} [languages] + * @returns {void} + */ +function loadLanguages(languages) { + if (languages === undefined) { + languages = Object.keys(components.languages).filter(l => l != 'meta'); + } else if (!Array.isArray(languages)) { + languages = [languages]; } - return peerDependentsMap[mainLanguage] || []; -} -function loadLanguages(arr, withoutDependencies) { - // If no argument is passed, load all components - if (!arr) { - arr = Object.keys(components.languages).filter(function (language) { - return language !== 'meta'; - }); - } - if (arr && !arr.length) { - return; - } - - if (!Array.isArray(arr)) { - arr = [arr]; - } + // the user might have loaded languages via some other way or used `prism.js` which already includes some + // we don't need to validate the ids because `getLoader` will ignore invalid ones + const loaded = [...loadedLanguages, ...Object.keys(Prism.languages)]; - arr.forEach(function (language) { - if (!components.languages[language]) { - console.warn('Language does not exist ' + language); + getLoader(components, languages, loaded).load(lang => { + if (!(lang in components.languages)) { + console.warn('Language does not exist: ' + lang); return; } - // Load dependencies first - if (!withoutDependencies && components.languages[language].require) { - loadLanguages(components.languages[language].require); - } - var pathToLanguage = './prism-' + language; + const pathToLanguage = './prism-' + lang; + + // remove from require cache and from Prism delete require.cache[require.resolve(pathToLanguage)]; - delete Prism.languages[language]; + delete Prism.languages[lang]; + require(pathToLanguage); - // Reload dependents - var dependents = getPeerDependents(language).filter(function (dependent) { - // If dependent language was already loaded, - // we want to reload it. - if (Prism.languages[dependent]) { - delete Prism.languages[dependent]; - return true; - } - return false; - }); - if (dependents.length) { - loadLanguages(dependents, true); - } + loadedLanguages.add(lang); }); } -module.exports = function (arr) { - // Don't expose withoutDependencies - loadLanguages(arr); -}; \ No newline at end of file +module.exports = loadLanguages; diff --git a/dependencies.js b/dependencies.js new file mode 100644 index 0000000000..f301cd4d74 --- /dev/null +++ b/dependencies.js @@ -0,0 +1,431 @@ +"use strict"; + +/** + * @typedef {Object} Components + * @typedef {Object} ComponentCategory + * + * @typedef ComponentEntry + * @property {string} [title] The title of the component. + * @property {string} [owner] The GitHub user name of the owner. + * @property {boolean} [noCSS=false] Whether the component doesn't have style sheets which should also be loaded. + * @property {string | string[]} [alias] An optional list of aliases for the id of the component. + * @property {Object} [aliasTitles] An optional map from an alias to its title. + * + * Aliases which are not in this map will the get title of the component. + * @property {string | string[]} [optional] + * @property {string | string[]} [require] + * @property {string | string[]} [modify] + */ + +var getLoader = (function () { + + /** + * A function which does absolutely nothing. + * + * @type {any} + */ + var noop = function () { }; + + /** + * Converts the given value to an array. + * + * If the given value is already an array, the value itself will be returned. + * `null` and `undefined` will return an empty array. + * For every other value a new array with the given value as its only element will be created. + * + * @param {null | undefined | T | T[]} value + * @returns {T[]} + * @template T + */ + function toArray(value) { + if (Array.isArray(value)) { + return value; + } else { + return value == null ? [] : [value]; + } + } + + /** + * Returns a new set for the given string array. + * + * @param {string[]} array + * @returns {StringSet} + * + * @typedef {Object} StringSet + */ + function toSet(array) { + /** @type {StringSet} */ + var set = {}; + for (var i = 0, l = array.length; i < l; i++) { + set[array[i]] = true; + } + return set; + } + + /** + * Creates a map of every components id to its entry. + * + * @param {Components} components + * @returns {EntryMap} + * + * @typedef {{ [id: string]: Readonly | undefined }} EntryMap + */ + function createEntryMap(components) { + /** @type {EntryMap} */ + var map = {}; + + for (var categoryName in components) { + var category = components[categoryName]; + for (var id in category) { + if (id != 'meta') { + /** @type {ComponentEntry | string} */ + var entry = category[id]; + map[id] = typeof entry == 'string' ? { title: entry } : entry; + } + } + } + + return map; + } + + /** + * Creates a full dependencies map which includes all types of dependencies and their transitive dependencies. + * + * @param {EntryMap} entryMap + * @returns {DependencyMap} + * + * @typedef {Object} DependencyMap + */ + function createDependencyMap(entryMap) { + /** @type {DependencyMap} */ + var map = {}; + + /** + * Adds the dependencies of the given component to the dependency map. + * + * @param {string} id + * @param {string[]} stack + */ + function addToMap(id, stack) { + if (id in map) { + return; + } + + stack.push(id); + + // check for circular dependencies + var firstIndex = stack.indexOf(id); + if (firstIndex < stack.length - 1) { + throw new Error('Circular dependency: ' + stack.slice(firstIndex).join(' -> ')); + } + + /** @type {StringSet} */ + var dependencies = {}; + + var entry = entryMap[id]; + if (entry) { + /** @type {string[]} */ + var deps = [].concat(entry.require, entry.modify, entry.optional).filter(Boolean); + deps.forEach(function (depId) { + if (!(depId in entryMap)) { + throw new Error(id + ' depends on an unknown component ' + depId); + } + + addToMap(depId, stack); + dependencies[depId] = true; + for (var transitiveDepId in map[depId]) { + dependencies[transitiveDepId] = true; + } + }); + } + + map[id] = dependencies; + + stack.pop(); + } + + for (var id in entryMap) { + addToMap(id, []); + } + + return map; + } + + /** + * Returns a function which resolves the aliases of its given id of alias. + * + * @param {EntryMap} entryMap + * @returns {(idOrAlias: string) => string} + */ + function createAliasResolver(entryMap) { + /** @type {Object} */ + var map = {}; + + for (var id in entryMap) { + var entry = entryMap[id]; + var aliases = toArray(entry && entry.alias); + aliases.forEach(function (alias) { + if (alias in map) { + throw new Error(alias + ' cannot be alias for both ' + id + ' and ' + map[alias]); + } + if (alias in entryMap) { + throw new Error(alias + ' cannot be alias of ' + id + ' because it is a component.'); + } + map[alias] = id; + }); + } + + return function (idOrAlias) { + return map[idOrAlias] || idOrAlias; + }; + } + + /** + * @typedef LoadChainer + * @property {(before: T, after: () => T) => T} series + * @property {(values: T[]) => T} parallel + * @template T + */ + + /** + * Creates an implicit DAG from the given components and dependencies and call the given `loadComponent` for each + * component in topological order. + * + * @param {DependencyMap} dependencyMap + * @param {StringSet} ids + * @param {(id: string) => T} loadComponent + * @param {LoadChainer} [chainer] + * @returns {T} + * @template T + */ + function loadComponentsInOrder(dependencyMap, ids, loadComponent, chainer) { + const series = chainer ? chainer.series : undefined; + const parallel = chainer ? chainer.parallel : noop; + + /** @type {Object} */ + var cache = {}; + + /** + * A set of ids of nodes which are not depended upon by any other node in the graph. + * @type {StringSet} + */ + var ends = {}; + + /** + * Loads the given component and its dependencies or returns the cached value. + * + * @param {string} id + * @returns {T} + */ + function handleId(id) { + if (id in cache) { + return cache[id]; + } + + // assume that it's an end + // if it isn't, it will be removed later + ends[id] = true; + + // all dependencies of the component in the given ids + var dependsOn = []; + for (var depId in dependencyMap[id]) { + if (depId in ids) { + dependsOn.push(depId); + } + } + + /** + * The value to be returned. + * @type {T} + */ + var value; + + if (dependsOn.length === 0) { + value = loadComponent(id); + } else { + var depsValue = parallel(dependsOn.map(function (depId) { + var value = handleId(depId); + // none of the dependencies can be ends + delete ends[depId]; + return value; + })); + if (series) { + // the chainer will be responsibly for calling the function calling loadComponent + value = series(depsValue, function () { return loadComponent(id); }); + } else { + // we don't have a chainer, so we call loadComponent ourselves + loadComponent(id); + } + } + + // cache and return + return cache[id] = value; + } + + for (var id in ids) { + handleId(id); + } + + /** @type {T[]} */ + var endValues = []; + for (var endId in ends) { + endValues.push(cache[endId]); + } + return parallel(endValues); + } + + /** + * Returns whether the given object has any keys. + * + * @param {object} obj + */ + function hasKeys(obj) { + for (var key in obj) { + return true; + } + return false; + } + + /** + * Returns an object which provides methods to get the ids of the components which have to be loaded (`getIds`) and + * a way to efficiently load them in synchronously and asynchronous contexts (`load`). + * + * The set of ids to be loaded is a superset of `load`. If some of these ids are in `loaded`, the corresponding + * components will have to reloaded. + * + * The ids in `load` and `loaded` may be in any order and can contain duplicates. + * + * @param {Components} components + * @param {string[]} load + * @param {string[]} [loaded=[]] A list of already loaded components. + * + * If a component is in this list, then all of its requirements will also be assumed to be in the list. + * @returns {Loader} + * + * @typedef Loader + * @property {() => string[]} getIds A function to get all ids of the components to load. + * + * The returned ids will be duplicate-free, alias-free and in load order. + * @property {LoadFunction} load A functional interface to load components. + * + * @typedef { (loadComponent: (id: string) => T, chainer?: LoadChainer) => T} LoadFunction + * A functional interface to load components. + * + * The `loadComponent` function will be called for every component in the order in which they have to be loaded. + * + * The `chainer` is useful for asynchronous loading and its `series` and `parallel` functions can be thought of as + * `Promise#then` and `Promise.all`. + * + * @example + * load(id => { loadComponent(id); }); // returns undefined + * + * await load( + * id => loadComponentAsync(id), // returns a Promise for each id + * { + * series: async (before, after) => { + * await before; + * await after(); + * }, + * parallel: async (values) => { + * await Promise.all(values); + * } + * } + * ); + */ + function getLoader(components, load, loaded) { + var entryMap = createEntryMap(components); + var resolveAlias = createAliasResolver(entryMap); + + load = load.map(resolveAlias); + loaded = (loaded || []).map(resolveAlias); + + var loadSet = toSet(load); + var loadedSet = toSet(loaded); + + // add requirements + + load.forEach(addRequirements); + function addRequirements(id) { + var entry = entryMap[id]; + if (entry) { + var require = toArray(entry.require); + require.forEach(function (reqId) { + if (!(reqId in loadedSet)) { + loadSet[reqId] = true; + addRequirements(reqId); + } + }); + } + } + + // add components to reload + + // A component x in `loaded` has to be reloaded if + // 1) a component in `load` modifies x. + // 2) x depends on a component in `load`. + // The above two condition have to be applied until nothing changes anymore. + + var dependencyMap = createDependencyMap(entryMap); + + /** @type {StringSet} */ + var loadAdditions = loadSet; + /** @type {StringSet} */ + var newIds; + while (hasKeys(loadAdditions)) { + newIds = {}; + + // condition 1) + for (var loadId in loadAdditions) { + var entry = entryMap[loadId]; + if (entry) { + var modify = toArray(entry.modify); + modify.forEach(function (modId) { + if (modId in loadedSet) { + newIds[modId] = true; + } + }); + } + } + + // condition 2) + for (var loadedId in loadedSet) { + if (!(loadedId in loadSet)) { + for (var depId in dependencyMap[loadedId]) { + if (depId in loadSet) { + newIds[loadedId] = true; + break; + } + } + } + } + + loadAdditions = newIds; + for (var newId in loadAdditions) { + loadSet[newId] = true; + } + } + + /** @type {Loader} */ + var loader = { + getIds: function () { + var ids = []; + loader.load(function (id) { + ids.push(id); + }); + return ids; + }, + load: function (loadComponent, chainer) { + return loadComponentsInOrder(dependencyMap, loadSet, loadComponent, chainer); + } + }; + + return loader; + } + + return getLoader; + +}()); + +if (typeof module !== 'undefined') { + module.exports = getLoader; +} diff --git a/download.html b/download.html index c8e0bf9af5..71f0e93f19 100644 --- a/download.html +++ b/download.html @@ -175,6 +175,7 @@

          Customize your download

          + diff --git a/package.json b/package.json index 9d975990e6..da17b2c706 100755 --- a/package.json +++ b/package.json @@ -7,11 +7,12 @@ "scripts": { "test:aliases": "mocha tests/aliases-test.js", "test:core": "mocha tests/core/**/*.js", + "test:dependencies": "mocha tests/dependencies-test.js", "test:languages": "mocha tests/run.js", "test:patterns": "mocha tests/pattern-tests.js", "test:plugins": "mocha tests/plugins/**/*.js", "test:runner": "mocha tests/testrunner-tests.js", - "test": "npm run test:runner && npm run test:core && npm run test:languages && npm run test:plugins && npm run test:aliases && npm run test:patterns" + "test": "npm run test:runner && npm run test:core && npm run test:dependencies && npm run test:languages && npm run test:plugins && npm run test:aliases && npm run test:patterns" }, "repository": { "type": "git", diff --git a/scripts/download.js b/scripts/download.js index b6ed649cf7..cfd1d16a05 100644 --- a/scripts/download.js +++ b/scripts/download.js @@ -22,6 +22,21 @@ var treePromise = new Promise(function(resolve) { }); }); +/** + * Converts the given value into an array. + * + * @param {T | T[] | null | undefined} value + * @returns {T[]} + * @template T + */ +function toArray(value) { + if (Array.isArray(value)) { + return value; + } else { + return value == null ? [] : [value]; + } +} + var hstr = window.location.hash.match(/(?:languages|plugins)=[-+\w]+|themes=[-\w]+/g); if (hstr) { hstr.forEach(function(str) { @@ -50,13 +65,8 @@ if (hstr) { } components[category][id].option = 'default'; } - if (components[category][id].require) { - var deps = components[category][id].require; - if (!Array.isArray(deps)) { - deps = [deps]; - } - deps.forEach(makeDefault); - } + + toArray(components[category][id].require).forEach(makeDefault); } } }; @@ -142,9 +152,9 @@ for (var category in components) { noCSS: all[id].noCSS || all.meta.noCSS, noJS: all[id].noJS || all.meta.noJS, enabled: checked, - require: $u.type(all[id].require) === 'string' ? [all[id].require] : all[id].require, - after: $u.type(all[id].after) === 'string' ? [all[id].after] : all[id].after, - peerDependencies: $u.type(all[id].peerDependencies) === 'string' ? [all[id].peerDependencies] : all[id].peerDependencies, + require: toArray(all[id].require), + after: toArray(all[id].after), + modify: toArray(all[id].modify), owner: all[id].owner, files: { minified: { @@ -158,11 +168,9 @@ for (var category in components) { } }; - if (info.require) { - info.require.forEach(function (v) { - dependencies[v] = (dependencies[v] || []).concat(id); - }); - } + info.require.forEach(function (v) { + dependencies[v] = (dependencies[v] || []).concat(id); + }); if (!all[id].noJS && !/\.css$/.test(filepath)) { info.files.minified.paths.push(filepath.replace(/(\.js)?$/, '.min.js')); @@ -446,72 +454,31 @@ function delayedGenerateCode(){ timerId = setTimeout(generateCode, 500); } -function getSortedComponents(components, requireName, sorted) { - if (!sorted) { - sorted = []; - for (var component in components) { - sorted.push(component); - } - } - - var i = 0; - while (i < sorted.length) { - var id = sorted[i]; - var indexOfRequirement = i; - var notNow = false; - for (var requirement in components[id][requireName]) { - indexOfRequirement = sorted.indexOf(components[id][requireName][requirement]); - if (indexOfRequirement > i) { - notNow = true; - break; - } - } - if (notNow) { - var tmp = sorted[i]; - sorted[i] = sorted[indexOfRequirement]; - sorted[indexOfRequirement] = tmp; - } - else { - i++; - } - } - return sorted; -} - -function getSortedComponentsByRequirements(components, afterName) { - var sorted = getSortedComponents(components, afterName); - return getSortedComponents(components, "require", sorted); -} - function generateCode(){ + /** @type {CodePromiseInfo[]} */ var promises = []; var redownload = {}; for (var category in components) { - var all = components[category]; - - // In case if one component requires other, required component should go first. - var sorted = getSortedComponentsByRequirements(all, category === 'languages' ? 'peerDependencies' : 'after'); - - for (var i = 0; i < sorted.length; i++) { - var id = sorted[i]; - - if(id === 'meta') { + for (var id in components[category]) { + if (id === 'meta') { continue; } - var info = all[id]; + var info = components[category][id]; if (info.enabled) { if (category !== 'core') { - redownload[category] = redownload[category] || []; + redownload[category] = redownload[category] || []; redownload[category].push(id); } - info.files[minified? 'minified' : 'dev'].paths.forEach(function (path) { + info.files[minified ? 'minified' : 'dev'].paths.forEach(function (path) { if (cache[path]) { var type = path.match(/\.(\w+)$/)[1]; promises.push({ contentsPromise: cache[path].contentsPromise, + id: id, + category: category, path: path, type: type }); @@ -531,7 +498,7 @@ function generateCode(){ var code = res.code; var errors = res.errors; - if(errors.length) { + if (errors.length) { error.style.display = 'block'; error.innerHTML = ''; $u.element.contents(error, errors); @@ -571,7 +538,49 @@ function generateCode(){ }); } +/** + * Returns a promise of the code of the Prism bundle. + * + * @param {CodePromiseInfo[]} promises + * @returns {Promise<{ code: { js: string, css: string }, errors: HTMLElement[] }>} + * + * @typedef CodePromiseInfo + * @property {Promise} contentsPromise + * @property {string} id + * @property {string} category + * @property {string} path + * @property {string} type + */ function buildCode(promises) { + // sort the promises + + /** @type {CodePromiseInfo[]} */ + var finalPromises = []; + /** @type {Object} */ + var toSortMap = {}; + + promises.forEach(function (p) { + if (p.category == "core" || p.category == "themes") { + finalPromises.push(p); + } else { + var infos = toSortMap[p.id]; + if (!infos) { + toSortMap[p.id] = infos = []; + } + infos.push(p); + } + }); + + // this assumes that the ids in `toSortMap` are complete under transitive requirements + getLoader(components, Object.keys(toSortMap)).getIds().forEach(function (id) { + if (!toSortMap[id]) { + console.error(id + " not found."); + } + finalPromises.push.apply(finalPromises, toSortMap[id]); + }); + promises = finalPromises; + + // build var i = 0, l = promises.length; var code = {js: '', css: ''}; @@ -603,6 +612,9 @@ function buildCode(promises) { return new Promise(f); } +/** + * @returns {Promise} + */ function getVersion() { return getFileContents('./package.json').then(function (jsonStr) { return JSON.parse(jsonStr).version; diff --git a/tests/dependencies-test.js b/tests/dependencies-test.js new file mode 100644 index 0000000000..2a9bdb2f3e --- /dev/null +++ b/tests/dependencies-test.js @@ -0,0 +1,257 @@ +const { assert } = require('chai'); +const getLoader = require('../dependencies'); +const components = require('../components'); + + +describe('Dependency logic', function () { + + /** @type {import("../dependencies").Components} */ + const components = { + languages: { + 'a': { + alias: 'a2' + }, + 'b': { + alias: 'b2' + }, + 'c': { + require: 'a', + optional: ['b', 'e'] + }, + 'd': { + require: ['c', 'b'], + alias: 'xyz' + }, + }, + pluginsOrSomething: { + 'e': { + modify: 'a' + }, + } + }; + + /** + * Returns the ids of `getLoader`. + * + * @param {string[]} load + * @param {string[]} [loaded] + * @returns {string[]} + */ + function getIds(load, loaded) { + return getLoader(components, load, loaded).getIds(); + } + + describe('Returned ids', function () { + + it('- should load requirements', function () { + assert.sameMembers(getIds(['d']), ['a', 'b', 'c', 'd']); + }); + + it('- should not load already loaded requirements if not necessary', function () { + assert.sameMembers(getIds(['d'], ['a', 'b']), ['c', 'd']); + }); + + it('- should load already loaded requirements if requested', function () { + assert.sameMembers(getIds(['a', 'd'], ['a', 'b']), ['a', 'c', 'd']); + }); + + it('- should reload modified components', function () { + assert.sameMembers(getIds(['e'], ['a', 'b', 'c', 'd']), ['a', 'c', 'd', 'e']); + }); + + it('- should work with empty load', function () { + assert.sameMembers(getIds([], ['a', 'b', 'c', 'd']), []); + }); + + it('- should return unknown ids as is', function () { + assert.sameMembers(getIds(['c', 'foo'], ['bar']), ['foo', 'c', 'a']); + }); + + it('- should throw on unknown dependencies', function () { + assert.throws(() => { + /** @type {import("../dependencies").Components} */ + const circular = { + languages: { + a: { + require: 'c' + }, + b: 'B' + } + }; + getLoader(circular, ['a']).getIds(); + }); + }); + + }); + + describe('Load order', function () { + + // Note: The order of a and b isn't defined, so don't add any test with both of them being loaded here + + it('- should load components in the correct order (require)', function () { + assert.deepStrictEqual(getIds(['c']), ['a', 'c']); + }); + + it('- should load components in the correct order (modify)', function () { + assert.deepStrictEqual(getIds(['e', 'a']), ['a', 'e']); + }); + + it('- should load components in the correct order (optional)', function () { + assert.deepStrictEqual(getIds(['c', 'b'], ['a']), ['b', 'c']); + }); + + it('- should load components in the correct order (require + optional)', function () { + assert.deepStrictEqual(getIds(['d'], ['a']), ['b', 'c', 'd']); + }); + + it('- should load components in the correct order (require + modify + optional)', function () { + assert.deepStrictEqual(getIds(['d', 'e'], ['b']), ['a', 'e', 'c', 'd']); + }); + + }); + + describe('Aliases', function () { + + it('- should resolve aliases in the list of components to load', function () { + assert.sameMembers(getIds(['xyz']), ['a', 'b', 'c', 'd']); + }); + + it('- should resolve aliases in the list of loaded components', function () { + assert.sameMembers(getIds(['d'], ['a', 'a2', 'b2']), ['c', 'd']); + }); + + it('- should throw on duplicate aliases', function () { + assert.throws(() => { + /** @type {import("../dependencies").Components} */ + const circular = { + languages: { + a: { + alias: 'c' + }, + b: { + alias: 'c' + } + } + }; + getLoader(circular, ['a']).getIds(); + }); + }); + + it('- should throw on aliases which are components', function () { + assert.throws(() => { + /** @type {import("../dependencies").Components} */ + const circular = { + languages: { + a: { + alias: 'b' + }, + b: 'B' + } + }; + getLoader(circular, ['a']).getIds(); + }); + }); + + }); + + describe('Circular dependencies', function () { + + it('- should throw on circular dependencies', function () { + assert.throws(() => { + /** @type {import("../dependencies").Components} */ + const circular = { + languages: { + a: { + require: 'b' + }, + b: { + optional: 'a' + } + } + }; + getLoader(circular, ['a']).getIds(); + }); + }); + + }); + + describe('Async loading', function () { + + it('- should load components in the correct order', async function () { + + /** @type {import("../dependencies").Components} */ + const localComponents = { + languages: { + 'a': {}, + 'b': { + require: 'a' + }, + 'c': { + require: 'b' + } + } + }; + + /** @type {string[]} */ + const actualLoadOrder = []; + /** @type {string[]} */ + const actualResolveOrder = []; + + /** + * + * @param {string} id + * @returns {Promise} + */ + function loadComp(id) { + actualLoadOrder.push(id); + + // the idea is that the components which have to be loaded first, take the longest, so if all were to + // start getting loaded at the same time, their order would be the reverse of the expected order. + let delay; + if (id === 'a') { + delay = 30; + } else if (id === 'b') { + delay = 20; + } else if (id === 'c') { + delay = 10; + } + + return new Promise((resolve) => { + setTimeout(() => { + actualResolveOrder.push(id); + resolve(); + }, delay); + }); + } + + const loader = getLoader(localComponents, ['c']); + + await loader.load(id => loadComp(id), { + series: async (before, after) => { + await before; + await after(); + }, + parallel: async (values) => { + await Promise.all(values); + } + }); + + assert.deepStrictEqual(actualLoadOrder, ['a', 'b', 'c'], 'actualLoadOrder:'); + assert.deepStrictEqual(actualResolveOrder, ['a', 'b', 'c'], 'actualResolveOrder:'); + }); + + }); + +}); + +describe('components.json', function () { + + it('- should be valid', function () { + try { + getLoader(components, Object.keys(components.languages).filter(k => k != 'meta')).getIds(); + } catch (error) { + assert.fail(error.toString()); + } + }); + +}); diff --git a/tests/helper/prism-loader.js b/tests/helper/prism-loader.js index 8ec06e3643..7bc07487c9 100644 --- a/tests/helper/prism-loader.js +++ b/tests/helper/prism-loader.js @@ -4,9 +4,16 @@ const fs = require("fs"); const vm = require("vm"); const { getAllFiles } = require("./test-discovery"); const components = require("../../components"); +const getLoader = require("../../dependencies"); const languagesCatalog = components.languages; +/** + * @typedef PrismLoaderContext + * @property {any} Prism The Prism instance. + * @property {Set} loaded A set of loaded components. + */ + module.exports = { /** @@ -17,7 +24,7 @@ module.exports = { */ createInstance(languages) { let context = { - loadedLanguages: [], + loaded: new Set(), Prism: this.createEmptyPrism() }; @@ -27,53 +34,29 @@ module.exports = { }, /** - * Loads the given languages and appends the config to the given Prism object + * Loads the given languages and appends the config to the given Prism object. * * @private * @param {string|string[]} languages - * @param {{loadedLanguages: string[], Prism: Prism}} context - * @returns {{loadedLanguages: string[], Prism: Prism}} + * @param {PrismLoaderContext} context + * @returns {PrismLoaderContext} */ loadLanguages(languages, context) { if (typeof languages === 'string') { languages = [languages]; } - for (const language of languages) { - context = this.loadLanguage(language, context); - } - - return context; - }, - - /** - * Loads the given language (including recursively loading the dependencies) and - * appends the config to the given Prism object - * - * @private - * @param {string} language - * @param {{loadedLanguages: string[], Prism: Prism}} context - * @returns {{loadedLanguages: string[], Prism: Prism}} - */ - loadLanguage(language, context) { - if (!languagesCatalog[language]) { - throw new Error("Language '" + language + "' not found."); - } - - // the given language was already loaded - if (-1 < context.loadedLanguages.indexOf(language)) { - return context; - } + getLoader(components, languages, [...context.loaded]).load(id => { + if (!languagesCatalog[id]) { + throw new Error(`Language '${id}' not found.`); + } - // if the language has a dependency -> load it first - if (languagesCatalog[language].require) { - context = this.loadLanguages(languagesCatalog[language].require, context); - } + // load the language itself + const languageSource = this.loadComponentSource(id); + context.Prism = this.runFileWithContext(languageSource, { Prism: context.Prism }).Prism; - // load the language itself - const languageSource = this.loadComponentSource(language); - context.Prism = this.runFileWithContext(languageSource, { Prism: context.Prism }).Prism; - context.loadedLanguages.push(language); + context.loaded.add(id); + }); return context; }, From 2f4959057a8ea8fb76709b8bb5da0a5c107481ca Mon Sep 17 00:00:00 2001 From: RunDevelopment Date: Wed, 18 Dec 2019 16:55:46 +0100 Subject: [PATCH 0402/1100] gulp: Fixed changes task This fixes an issue in the changes task where removed languages were causing a property access on `undefined`. --- gulpfile.js/changelog.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/gulpfile.js/changelog.js b/gulpfile.js/changelog.js index 1fb9fe12c9..62b70e4e7d 100644 --- a/gulpfile.js/changelog.js +++ b/gulpfile.js/changelog.js @@ -105,7 +105,7 @@ const revisionRanges = { const strCompare = (a, b) => a.localeCompare(b, 'en'); async function changes() { - const { languages, plugins } = require('../components'); + const { languages, plugins } = require('../components.js'); const infos = await getLog(revisionRanges.nextRelease); @@ -225,9 +225,12 @@ async function changes() { const change = relevantChanges[0]; if (change.mode === 'A' && change.file.startsWith('components/prism-')) { const lang = change.file.match(/prism-([\w-]+)\.js$/)[1]; - const titles = [languages[lang].title]; - if (languages[lang].aliasTitles) { - titles.push(...Object.values(languages[lang].aliasTitles)); + const entry = languages[lang] || { + title: "REMOVED LANGUAGE " + lang, + }; + const titles = [entry.title]; + if (entry.aliasTitles) { + titles.push(...Object.values(entry.aliasTitles)); } addEntry('New components', `__${titles.join('__ & __')}__: ${infoToString(info)}`); return true; From e20a2b711a0cd4ee7e6b49b07f7ce165df2a7980 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Fri, 20 Dec 2019 13:42:32 +0100 Subject: [PATCH 0403/1100] Create Changelog for 1.18.0 (#2136) --- CHANGELOG.md | 107 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 107 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2566bd372a..e0af640e2f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,112 @@ # Prism Changelog +## 1.18.0 (TBD) + +### New components + +* __ANTLR4__ ([#2063](https://github.com/PrismJS/prism/issues/2063)) [`aaaa29a8`](https://github.com/PrismJS/prism/commit/aaaa29a8) +* __AQL__ ([#2025](https://github.com/PrismJS/prism/issues/2025)) [`3fdb7d55`](https://github.com/PrismJS/prism/commit/3fdb7d55) +* __BBcode__ ([#2095](https://github.com/PrismJS/prism/issues/2095)) [`aaf13aa6`](https://github.com/PrismJS/prism/commit/aaf13aa6) +* __BrightScript__ ([#2096](https://github.com/PrismJS/prism/issues/2096)) [`631f1e34`](https://github.com/PrismJS/prism/commit/631f1e34) +* __Embedded Lua templating__ ([#2050](https://github.com/PrismJS/prism/issues/2050)) [`0b771c90`](https://github.com/PrismJS/prism/commit/0b771c90) +* __Firestore security rules__ ([#2010](https://github.com/PrismJS/prism/issues/2010)) [`9f722586`](https://github.com/PrismJS/prism/commit/9f722586) +* __FreeMarker Template Language__ ([#2080](https://github.com/PrismJS/prism/issues/2080)) [`2f3da7e8`](https://github.com/PrismJS/prism/commit/2f3da7e8) +* __GDScript__ ([#2006](https://github.com/PrismJS/prism/issues/2006)) [`e2b99f40`](https://github.com/PrismJS/prism/commit/e2b99f40) +* __MoonScript__ ([#2100](https://github.com/PrismJS/prism/issues/2100)) [`f31946b3`](https://github.com/PrismJS/prism/commit/f31946b3) +* __Robot Framework__ (only the plain text format) ([#2034](https://github.com/PrismJS/prism/issues/2034)) [`f7eaa618`](https://github.com/PrismJS/prism/commit/f7eaa618) +* __Solidity (Ethereum)__ ([#2031](https://github.com/PrismJS/prism/issues/2031)) [`cc2cf3f7`](https://github.com/PrismJS/prism/commit/cc2cf3f7) +* __SPARQL__ ([#2033](https://github.com/PrismJS/prism/issues/2033)) [`c42f877d`](https://github.com/PrismJS/prism/commit/c42f877d) +* __SQF: Status Quo Function (Arma 3)__ ([#2079](https://github.com/PrismJS/prism/issues/2079)) [`cfac94ec`](https://github.com/PrismJS/prism/commit/cfac94ec) +* __Turtle__ & __TriG__ ([#2012](https://github.com/PrismJS/prism/issues/2012)) [`508d57ac`](https://github.com/PrismJS/prism/commit/508d57ac) +* __Zig__ ([#2019](https://github.com/PrismJS/prism/issues/2019)) [`a7cf56b7`](https://github.com/PrismJS/prism/commit/a7cf56b7) + +### Updated components + +* Minor improvements for C-like and Clojure ([#2064](https://github.com/PrismJS/prism/issues/2064)) [`7db0cab3`](https://github.com/PrismJS/prism/commit/7db0cab3) +* Inlined some unnecessary rest properties ([#2082](https://github.com/PrismJS/prism/issues/2082)) [`ad3fa443`](https://github.com/PrismJS/prism/commit/ad3fa443) +* __AQL__ + * Disallow unclosed multiline comments again ([#2089](https://github.com/PrismJS/prism/issues/2089)) [`717ace02`](https://github.com/PrismJS/prism/commit/717ace02) + * Allow unclosed multi-line comments ([#2058](https://github.com/PrismJS/prism/issues/2058)) [`f3c6ba59`](https://github.com/PrismJS/prism/commit/f3c6ba59) + * More pseudo keywords ([#2055](https://github.com/PrismJS/prism/issues/2055)) [`899574eb`](https://github.com/PrismJS/prism/commit/899574eb) + * Added missing keyword + minor improvements ([#2047](https://github.com/PrismJS/prism/issues/2047)) [`32a4c422`](https://github.com/PrismJS/prism/commit/32a4c422) +* __Clojure__ + * Added multiline strings (lisp style) ([#2061](https://github.com/PrismJS/prism/issues/2061)) [`8ea685b8`](https://github.com/PrismJS/prism/commit/8ea685b8) +* __CSS Extras__ + * CSS Extras & PHP: Fixed too greedy number token ([#2009](https://github.com/PrismJS/prism/issues/2009)) [`ebe363f4`](https://github.com/PrismJS/prism/commit/ebe363f4) +* __D__ + * Fixed strings ([#2029](https://github.com/PrismJS/prism/issues/2029)) [`010a0157`](https://github.com/PrismJS/prism/commit/010a0157) +* __Groovy__ + * Minor improvements ([#2036](https://github.com/PrismJS/prism/issues/2036)) [`fb618331`](https://github.com/PrismJS/prism/commit/fb618331) +* __Java__ + * Added missing `::` operator ([#2101](https://github.com/PrismJS/prism/issues/2101)) [`ee7fdbee`](https://github.com/PrismJS/prism/commit/ee7fdbee) + * Added support for new Java 13 syntax ([#2060](https://github.com/PrismJS/prism/issues/2060)) [`a7b95dd3`](https://github.com/PrismJS/prism/commit/a7b95dd3) +* __JavaScript__ + * Added Optional Chaining and Nullish Coalescing ([#2084](https://github.com/PrismJS/prism/issues/2084)) [`fdb7de0d`](https://github.com/PrismJS/prism/commit/fdb7de0d) + * Tokenize `:` as an operator ([#2073](https://github.com/PrismJS/prism/issues/2073)) [`0e5c48d1`](https://github.com/PrismJS/prism/commit/0e5c48d1) +* __Less__ + * Fixed exponential backtracking ([#2016](https://github.com/PrismJS/prism/issues/2016)) [`d03d19b4`](https://github.com/PrismJS/prism/commit/d03d19b4) +* __Markup__ + * Improved doctype pattern ([#2094](https://github.com/PrismJS/prism/issues/2094)) [`99994c58`](https://github.com/PrismJS/prism/commit/99994c58) +* __Python__ + * Fixed decorators ([#2018](https://github.com/PrismJS/prism/issues/2018)) [`5b8a16d9`](https://github.com/PrismJS/prism/commit/5b8a16d9) +* __Robot Framework__ + * Rename "robot-framework" to "robotframework" ([#2113](https://github.com/PrismJS/prism/issues/2113)) [`baa78774`](https://github.com/PrismJS/prism/commit/baa78774) +* __Ruby__ + * Made `true` and `false` booleans ([#2098](https://github.com/PrismJS/prism/issues/2098)) [`68d1c472`](https://github.com/PrismJS/prism/commit/68d1c472) + * Added missing keywords ([#2097](https://github.com/PrismJS/prism/issues/2097)) [`f460eafc`](https://github.com/PrismJS/prism/commit/f460eafc) +* __SAS__ + * Added support for embedded Groovy and Lua code ([#2091](https://github.com/PrismJS/prism/issues/2091)) [`3640b3f2`](https://github.com/PrismJS/prism/commit/3640b3f2) + * Minor improvements ([#2085](https://github.com/PrismJS/prism/issues/2085)) [`07020c7a`](https://github.com/PrismJS/prism/commit/07020c7a) + * Fixed `proc-args` token by removing backreferences from string pattern ([#2013](https://github.com/PrismJS/prism/issues/2013)) [`af5a36ae`](https://github.com/PrismJS/prism/commit/af5a36ae) + * Major improvements ([#1981](https://github.com/PrismJS/prism/issues/1981)) [`076f6155`](https://github.com/PrismJS/prism/commit/076f6155) +* __Smalltalk__ + * Fixed single quote character literal ([#2041](https://github.com/PrismJS/prism/issues/2041)) [`1aabcd17`](https://github.com/PrismJS/prism/commit/1aabcd17) +* __Turtle__ + * Minor improvements ([#2038](https://github.com/PrismJS/prism/issues/2038)) [`8ccd258b`](https://github.com/PrismJS/prism/commit/8ccd258b) +* __TypeScript__ + * Added missing keyword `undefined` ([#2088](https://github.com/PrismJS/prism/issues/2088)) [`c8b48b9f`](https://github.com/PrismJS/prism/commit/c8b48b9f) + +### Updated plugins + +* New Match Braces plugin ([#1944](https://github.com/PrismJS/prism/issues/1944)) [`365faade`](https://github.com/PrismJS/prism/commit/365faade) +* New Inline color plugin ([#2007](https://github.com/PrismJS/prism/issues/2007)) [`8403e453`](https://github.com/PrismJS/prism/commit/8403e453) +* New Filter highlightAll plugin ([#2074](https://github.com/PrismJS/prism/issues/2074)) [`a7f70090`](https://github.com/PrismJS/prism/commit/a7f70090) +* __Custom Class__ + * New class adder feature ([#2075](https://github.com/PrismJS/prism/issues/2075)) [`dab7998e`](https://github.com/PrismJS/prism/commit/dab7998e) +* __File Highlight__ + * Made the download button its own plugin ([#1840](https://github.com/PrismJS/prism/issues/1840)) [`c6c62a69`](https://github.com/PrismJS/prism/commit/c6c62a69) + +### Other + +* Issue template improvements ([#2069](https://github.com/PrismJS/prism/issues/2069)) [`53f07b1b`](https://github.com/PrismJS/prism/commit/53f07b1b) +* Readme: Links now use HTTPS if available ([#2045](https://github.com/PrismJS/prism/issues/2045)) [`6cd0738a`](https://github.com/PrismJS/prism/commit/6cd0738a) +* __Core__ + * Fixed null reference ([#2106](https://github.com/PrismJS/prism/issues/2106)) [`0fd062d5`](https://github.com/PrismJS/prism/commit/0fd062d5) + * Fixed race condition caused by deferring the script ([#2103](https://github.com/PrismJS/prism/issues/2103)) [`a3785ec9`](https://github.com/PrismJS/prism/commit/a3785ec9) + * Minor improvements ([#1973](https://github.com/PrismJS/prism/issues/1973)) [`2d858e0a`](https://github.com/PrismJS/prism/commit/2d858e0a) + * Fixed greedy partial lookbehinds not working ([#2030](https://github.com/PrismJS/prism/issues/2030)) [`174ed103`](https://github.com/PrismJS/prism/commit/174ed103) + * Fixed greedy targeting bug ([#1932](https://github.com/PrismJS/prism/issues/1932)) [`e864d518`](https://github.com/PrismJS/prism/commit/e864d518) + * Doubly check the `manual` flag ([#1957](https://github.com/PrismJS/prism/issues/1957)) [`d49f0f26`](https://github.com/PrismJS/prism/commit/d49f0f26) + * IE11 workaround for `currentScript` ([#2104](https://github.com/PrismJS/prism/issues/2104)) [`2108c60f`](https://github.com/PrismJS/prism/commit/2108c60f) +* __Infrastructure__ + * gulp: Fixed changes task [`2f495905`](https://github.com/PrismJS/prism/commit/2f495905) + * npm: Added `.github` folder to npm ignore ([#2052](https://github.com/PrismJS/prism/issues/2052)) [`1af89e06`](https://github.com/PrismJS/prism/commit/1af89e06) + * npm: Updated dependencies to fix 122 vulnerabilities ([#1997](https://github.com/PrismJS/prism/issues/1997)) [`3af5d744`](https://github.com/PrismJS/prism/commit/3af5d744) + * Tests: New test for unused capturing groups ([#1996](https://github.com/PrismJS/prism/issues/1996)) [`c187e229`](https://github.com/PrismJS/prism/commit/c187e229) + * Tests: Simplified error message format ([#2056](https://github.com/PrismJS/prism/issues/2056)) [`007c9af4`](https://github.com/PrismJS/prism/commit/007c9af4) + * Tests: New test for nice names ([#1911](https://github.com/PrismJS/prism/issues/1911)) [`3fda5c95`](https://github.com/PrismJS/prism/commit/3fda5c95) + * Standardized dependency logic implementation ([#1998](https://github.com/PrismJS/prism/issues/1998)) [`7a4a0c7c`](https://github.com/PrismJS/prism/commit/7a4a0c7c) +* __Website__ + * Added @mAAdhaTTah and @RunDevelopment to credits and footer [`5d07aa7c`](https://github.com/PrismJS/prism/commit/5d07aa7c) + * Added plugin descriptions to plugin list ([#2076](https://github.com/PrismJS/prism/issues/2076)) [`cdfa60ac`](https://github.com/PrismJS/prism/commit/cdfa60ac) + * Use HTTPS link to alistapart.com ([#2044](https://github.com/PrismJS/prism/issues/2044)) [`8bcc1b85`](https://github.com/PrismJS/prism/commit/8bcc1b85) + * Fixed the Toolbar plugin's overflow issue ([#1966](https://github.com/PrismJS/prism/issues/1966)) [`56a8711c`](https://github.com/PrismJS/prism/commit/56a8711c) + * FAQ update ([#1977](https://github.com/PrismJS/prism/issues/1977)) [`8a572af5`](https://github.com/PrismJS/prism/commit/8a572af5) + * Use modern JavaScript in the NodeJS usage section ([#1942](https://github.com/PrismJS/prism/issues/1942)) [`5c68a556`](https://github.com/PrismJS/prism/commit/5c68a556) + * Improved test page performance for Chromium ([#2020](https://github.com/PrismJS/prism/issues/2020)) [`3509f3e5`](https://github.com/PrismJS/prism/commit/3509f3e5) + * Fixed alias example in extending page ([#2011](https://github.com/PrismJS/prism/issues/2011)) [`7cb65eec`](https://github.com/PrismJS/prism/commit/7cb65eec) + * Robot Framework: Renamed example file ([#2126](https://github.com/PrismJS/prism/issues/2126)) [`9908ca69`](https://github.com/PrismJS/prism/commit/9908ca69) + ## 1.17.1 (2019-07-21) ### Other From 3c1fd1c84afd5e1867a9eb76e9533c53d22c34e1 Mon Sep 17 00:00:00 2001 From: mAAdhaTTah Date: Fri, 20 Dec 2019 07:42:43 -0500 Subject: [PATCH 0404/1100] 1.18.0 --- package-lock.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index 044942bb69..70636cf048 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "prismjs", - "version": "1.17.1", + "version": "1.18.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index da17b2c706..7775daac72 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "prismjs", - "version": "1.17.1", + "version": "1.18.0", "description": "Lightweight, robust, elegant syntax highlighting. A spin-off project from Dabblet.", "main": "prism.js", "style": "themes/prism.css", From a23d8f84ab1ec6cf7a1b15cd56b6ef729fcf1402 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Sun, 5 Jan 2020 18:34:45 +0100 Subject: [PATCH 0405/1100] JS: Better regex detection (#2158) This improves the detection of regular expressions. --- components/prism-javascript.js | 2 +- components/prism-javascript.min.js | 2 +- prism.js | 2 +- tests/languages/javascript/regex_feature.test | 19 ++++++++++++++++++- 4 files changed, 21 insertions(+), 4 deletions(-) diff --git a/components/prism-javascript.js b/components/prism-javascript.js index 4ed689859a..3944090f2d 100644 --- a/components/prism-javascript.js +++ b/components/prism-javascript.js @@ -26,7 +26,7 @@ Prism.languages.javascript['class-name'][0].pattern = /(\b(?:class|interface|ext Prism.languages.insertBefore('javascript', 'keyword', { 'regex': { - pattern: /((?:^|[^$\w\xA0-\uFFFF."'\])\s])\s*)\/(?:\[(?:[^\]\\\r\n]|\\.)*]|\\.|[^/\\\[\r\n])+\/[gimyus]{0,6}(?=\s*(?:$|[\r\n,.;})\]]))/, + pattern: /((?:^|[^$\w\xA0-\uFFFF."'\])\s])\s*)\/(?:\[(?:[^\]\\\r\n]|\\.)*]|\\.|[^/\\\[\r\n])+\/[gimyus]{0,6}(?=(?:\s|\/\*[\s\S]*?\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/, lookbehind: true, greedy: true }, diff --git a/components/prism-javascript.min.js b/components/prism-javascript.min.js index 22c44e3c05..5178f04f41 100644 --- a/components/prism-javascript.min.js +++ b/components/prism-javascript.min.js @@ -1 +1 @@ -Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])[_$A-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\.(?:prototype|constructor))/,lookbehind:!0}],keyword:[{pattern:/((?:^|})\s*)(?:catch|finally)\b/,lookbehind:!0},{pattern:/(^|[^.])\b(?:as|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],number:/\b(?:(?:0[xX](?:[\dA-Fa-f](?:_[\dA-Fa-f])?)+|0[bB](?:[01](?:_[01])?)+|0[oO](?:[0-7](?:_[0-7])?)+)n?|(?:\d(?:_\d)?)+n|NaN|Infinity)\b|(?:\b(?:\d(?:_\d)?)+\.?(?:\d(?:_\d)?)*|\B\.(?:\d(?:_\d)?)+)(?:[Ee][+-]?(?:\d(?:_\d)?)+)?/,function:/#?[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,operator:/--|\+\+|\*\*=?|=>|&&|\|\||[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?[.?]?|[~:]/}),Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/,Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s])\s*)\/(?:\[(?:[^\]\\\r\n]|\\.)*]|\\.|[^/\\\[\r\n])+\/[gimyus]{0,6}(?=\s*(?:$|[\r\n,.;})\]]))/,lookbehind:!0,greedy:!0},"function-variable":{pattern:/#?[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)?\s*\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*=>)/i,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*\s*)\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),Prism.languages.insertBefore("javascript","string",{"template-string":{pattern:/`(?:\\[\s\S]|\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}|(?!\${)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\${|}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}}}),Prism.languages.markup&&Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.js=Prism.languages.javascript; \ No newline at end of file +Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])[_$A-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\.(?:prototype|constructor))/,lookbehind:!0}],keyword:[{pattern:/((?:^|})\s*)(?:catch|finally)\b/,lookbehind:!0},{pattern:/(^|[^.])\b(?:as|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],number:/\b(?:(?:0[xX](?:[\dA-Fa-f](?:_[\dA-Fa-f])?)+|0[bB](?:[01](?:_[01])?)+|0[oO](?:[0-7](?:_[0-7])?)+)n?|(?:\d(?:_\d)?)+n|NaN|Infinity)\b|(?:\b(?:\d(?:_\d)?)+\.?(?:\d(?:_\d)?)*|\B\.(?:\d(?:_\d)?)+)(?:[Ee][+-]?(?:\d(?:_\d)?)+)?/,function:/#?[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,operator:/--|\+\+|\*\*=?|=>|&&|\|\||[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?[.?]?|[~:]/}),Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/,Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s])\s*)\/(?:\[(?:[^\]\\\r\n]|\\.)*]|\\.|[^/\\\[\r\n])+\/[gimyus]{0,6}(?=(?:\s|\/\*[\s\S]*?\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/,lookbehind:!0,greedy:!0},"function-variable":{pattern:/#?[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)?\s*\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*=>)/i,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*\s*)\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),Prism.languages.insertBefore("javascript","string",{"template-string":{pattern:/`(?:\\[\s\S]|\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}|(?!\${)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\${|}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}}}),Prism.languages.markup&&Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.js=Prism.languages.javascript; \ No newline at end of file diff --git a/prism.js b/prism.js index da4da2dfc8..41c147cb6e 100644 --- a/prism.js +++ b/prism.js @@ -866,7 +866,7 @@ Prism.languages.javascript['class-name'][0].pattern = /(\b(?:class|interface|ext Prism.languages.insertBefore('javascript', 'keyword', { 'regex': { - pattern: /((?:^|[^$\w\xA0-\uFFFF."'\])\s])\s*)\/(?:\[(?:[^\]\\\r\n]|\\.)*]|\\.|[^/\\\[\r\n])+\/[gimyus]{0,6}(?=\s*(?:$|[\r\n,.;})\]]))/, + pattern: /((?:^|[^$\w\xA0-\uFFFF."'\])\s])\s*)\/(?:\[(?:[^\]\\\r\n]|\\.)*]|\\.|[^/\\\[\r\n])+\/[gimyus]{0,6}(?=(?:\s|\/\*[\s\S]*?\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/, lookbehind: true, greedy: true }, diff --git a/tests/languages/javascript/regex_feature.test b/tests/languages/javascript/regex_feature.test index a5f49317b5..5386e97812 100644 --- a/tests/languages/javascript/regex_feature.test +++ b/tests/languages/javascript/regex_feature.test @@ -9,6 +9,9 @@ / '1' '2' '3' '4' '5' / [/foo/] +let a = /regex/m // comment +let b = condition ? /regex/ : /another one/ + ---------------------------------------------------- [ @@ -21,7 +24,21 @@ ["regex", "/[\\]/]/"], ["punctuation", ";"], ["number", "1"], ["operator", "/"], ["number", "4"], ["operator", "+"], ["string", "\"/, not a regex\""], ["punctuation", ";"], ["regex", "/ '1' '2' '3' '4' '5' /"], - ["punctuation", "["], ["regex", "/foo/"], ["punctuation", "]"] + ["punctuation", "["], ["regex", "/foo/"], ["punctuation", "]"], + + ["keyword", "let"], + " a ", + ["operator", "="], + ["regex", "/regex/m"], + ["comment", "// comment"], + ["keyword", "let"], + " b ", + ["operator", "="], + " condition ", + ["operator", "?"], + ["regex", "/regex/"], + ["operator", ":"], + ["regex", "/another one/"] ] ---------------------------------------------------- From 199bdcae079477f2ebe23c0e199c3cfe343f1edc Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Sun, 5 Jan 2020 19:46:54 +0100 Subject: [PATCH 0406/1100] Dependencies: Improved `getLoader` (#2151) This removes many temporary arrays and introduces lazy dependency and alias resolving. --- dependencies.js | 147 +++++++++++++++++++++---------------- tests/dependencies-test.js | 13 +++- 2 files changed, 93 insertions(+), 67 deletions(-) diff --git a/dependencies.js b/dependencies.js index f301cd4d74..8b8a85c989 100644 --- a/dependencies.js +++ b/dependencies.js @@ -27,21 +27,22 @@ var getLoader = (function () { var noop = function () { }; /** - * Converts the given value to an array. + * Invokes the given callback for all elements of the given value. * - * If the given value is already an array, the value itself will be returned. - * `null` and `undefined` will return an empty array. - * For every other value a new array with the given value as its only element will be created. + * If the given value is an array, the callback will be invokes for all elements. If the given value is `null` or + * `undefined`, the callback will not be invoked. In all other cases, the callback will be invoked with the given + * value as parameter. * * @param {null | undefined | T | T[]} value - * @returns {T[]} + * @param {(value: T, index: number) => void} callbackFn + * @returns {void} * @template T */ - function toArray(value) { + function forEach(value, callbackFn) { if (Array.isArray(value)) { - return value; - } else { - return value == null ? [] : [value]; + value.forEach(callbackFn); + } else if (value != null) { + callbackFn(value, 0); } } @@ -68,10 +69,10 @@ var getLoader = (function () { * @param {Components} components * @returns {EntryMap} * - * @typedef {{ [id: string]: Readonly | undefined }} EntryMap + * @typedef {{ readonly [id: string]: Readonly | undefined }} EntryMap */ function createEntryMap(components) { - /** @type {EntryMap} */ + /** @type {Object>} */ var map = {}; for (var categoryName in components) { @@ -92,13 +93,14 @@ var getLoader = (function () { * Creates a full dependencies map which includes all types of dependencies and their transitive dependencies. * * @param {EntryMap} entryMap - * @returns {DependencyMap} + * @returns {DependencyResolver} * - * @typedef {Object} DependencyMap + * @typedef {(id: string) => StringSet} DependencyResolver */ - function createDependencyMap(entryMap) { - /** @type {DependencyMap} */ + function createDependencyResolver(entryMap) { + /** @type {Object} */ var map = {}; + var _stackArray = []; /** * Adds the dependencies of the given component to the dependency map. @@ -124,19 +126,32 @@ var getLoader = (function () { var entry = entryMap[id]; if (entry) { - /** @type {string[]} */ - var deps = [].concat(entry.require, entry.modify, entry.optional).filter(Boolean); - deps.forEach(function (depId) { + /** + * This will add the direct dependency and all of its transitive dependencies to the set of + * dependencies of `entry`. + * + * @param {string} depId + * @returns {void} + */ + function handleDirectDependency(depId) { if (!(depId in entryMap)) { throw new Error(id + ' depends on an unknown component ' + depId); } + if (depId in dependencies) { + // if the given dependency is already in the set of deps, then so are its transitive deps + return; + } addToMap(depId, stack); dependencies[depId] = true; for (var transitiveDepId in map[depId]) { dependencies[transitiveDepId] = true; } - }); + } + + forEach(entry.require, handleDirectDependency); + forEach(entry.optional, handleDirectDependency); + forEach(entry.modify, handleDirectDependency); } map[id] = dependencies; @@ -144,11 +159,14 @@ var getLoader = (function () { stack.pop(); } - for (var id in entryMap) { - addToMap(id, []); - } - - return map; + return function (id) { + var deps = map[id]; + if (!deps) { + addToMap(id, _stackArray); + deps = map[id]; + } + return deps; + }; } /** @@ -158,25 +176,32 @@ var getLoader = (function () { * @returns {(idOrAlias: string) => string} */ function createAliasResolver(entryMap) { - /** @type {Object} */ - var map = {}; - - for (var id in entryMap) { - var entry = entryMap[id]; - var aliases = toArray(entry && entry.alias); - aliases.forEach(function (alias) { - if (alias in map) { - throw new Error(alias + ' cannot be alias for both ' + id + ' and ' + map[alias]); - } - if (alias in entryMap) { - throw new Error(alias + ' cannot be alias of ' + id + ' because it is a component.'); - } - map[alias] = id; - }); - } + /** @type {Object | undefined} */ + var map; return function (idOrAlias) { - return map[idOrAlias] || idOrAlias; + if (idOrAlias in entryMap) { + return idOrAlias; + } else { + // only create the alias map if necessary + if (!map) { + map = {}; + + for (var id in entryMap) { + var entry = entryMap[id]; + forEach(entry && entry.alias, function (alias) { + if (alias in map) { + throw new Error(alias + ' cannot be alias for both ' + id + ' and ' + map[alias]); + } + if (alias in entryMap) { + throw new Error(alias + ' cannot be alias of ' + id + ' because it is a component.'); + } + map[alias] = id; + }); + } + } + return map[idOrAlias] || idOrAlias; + } }; } @@ -191,14 +216,14 @@ var getLoader = (function () { * Creates an implicit DAG from the given components and dependencies and call the given `loadComponent` for each * component in topological order. * - * @param {DependencyMap} dependencyMap + * @param {DependencyResolver} dependencyResolver * @param {StringSet} ids * @param {(id: string) => T} loadComponent * @param {LoadChainer} [chainer] * @returns {T} * @template T */ - function loadComponentsInOrder(dependencyMap, ids, loadComponent, chainer) { + function loadComponentsInOrder(dependencyResolver, ids, loadComponent, chainer) { const series = chainer ? chainer.series : undefined; const parallel = chainer ? chainer.parallel : noop; @@ -228,7 +253,7 @@ var getLoader = (function () { // all dependencies of the component in the given ids var dependsOn = []; - for (var depId in dependencyMap[id]) { + for (var depId in dependencyResolver(id)) { if (depId in ids) { dependsOn.push(depId); } @@ -347,15 +372,12 @@ var getLoader = (function () { load.forEach(addRequirements); function addRequirements(id) { var entry = entryMap[id]; - if (entry) { - var require = toArray(entry.require); - require.forEach(function (reqId) { - if (!(reqId in loadedSet)) { - loadSet[reqId] = true; - addRequirements(reqId); - } - }); - } + forEach(entry && entry.require, function (reqId) { + if (!(reqId in loadedSet)) { + loadSet[reqId] = true; + addRequirements(reqId); + } + }); } // add components to reload @@ -365,7 +387,7 @@ var getLoader = (function () { // 2) x depends on a component in `load`. // The above two condition have to be applied until nothing changes anymore. - var dependencyMap = createDependencyMap(entryMap); + var dependencyResolver = createDependencyResolver(entryMap); /** @type {StringSet} */ var loadAdditions = loadSet; @@ -377,20 +399,17 @@ var getLoader = (function () { // condition 1) for (var loadId in loadAdditions) { var entry = entryMap[loadId]; - if (entry) { - var modify = toArray(entry.modify); - modify.forEach(function (modId) { - if (modId in loadedSet) { - newIds[modId] = true; - } - }); - } + forEach(entry && entry.modify, function (modId) { + if (modId in loadedSet) { + newIds[modId] = true; + } + }); } // condition 2) for (var loadedId in loadedSet) { if (!(loadedId in loadSet)) { - for (var depId in dependencyMap[loadedId]) { + for (var depId in dependencyResolver(loadedId)) { if (depId in loadSet) { newIds[loadedId] = true; break; @@ -415,7 +434,7 @@ var getLoader = (function () { return ids; }, load: function (loadComponent, chainer) { - return loadComponentsInOrder(dependencyMap, loadSet, loadComponent, chainer); + return loadComponentsInOrder(dependencyResolver, loadSet, loadComponent, chainer); } }; diff --git a/tests/dependencies-test.js b/tests/dependencies-test.js index 2a9bdb2f3e..3f83cc0cc9 100644 --- a/tests/dependencies-test.js +++ b/tests/dependencies-test.js @@ -133,7 +133,7 @@ describe('Dependency logic', function () { } } }; - getLoader(circular, ['a']).getIds(); + getLoader(circular, ['a', 'foo' /* force the lazy alias resolver */]).getIds(); }); }); @@ -148,7 +148,7 @@ describe('Dependency logic', function () { b: 'B' } }; - getLoader(circular, ['a']).getIds(); + getLoader(circular, ['a', 'foo' /* force the lazy alias resolver */]).getIds(); }); }); @@ -248,7 +248,14 @@ describe('components.json', function () { it('- should be valid', function () { try { - getLoader(components, Object.keys(components.languages).filter(k => k != 'meta')).getIds(); + const allIds = []; + for (const category in components) { + Object.keys(components[category]).forEach(id => allIds.push(id)); + } + // and an alias, so we force the lazy alias resolver to check all aliases + allIds.push('js'); + + getLoader(components, allIds).getIds(); } catch (error) { assert.fail(error.toString()); } From 24c8f833256b2cb32f8f7d858a3f5745435e361e Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Sun, 5 Jan 2020 19:56:14 +0100 Subject: [PATCH 0407/1100] PHP: Fixed exponential runtime of a pattern (#2157) This fixes the exponential runtime of the pattern used to identify PHP code embedded in HTML. --- components/prism-php.js | 2 +- components/prism-php.min.js | 2 +- tests/languages/php/issue2156.test | 125 +++++++++++++++++++++++++++++ 3 files changed, 127 insertions(+), 2 deletions(-) create mode 100644 tests/languages/php/issue2156.test diff --git a/components/prism-php.js b/components/prism-php.js index 311210adcf..ded22a73e0 100644 --- a/components/prism-php.js +++ b/components/prism-php.js @@ -119,7 +119,7 @@ return; } - var phpPattern = /<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#)(?:[^?\n\r]|\?(?!>))*|\/\*[\s\S]*?(?:\*\/|$))*?(?:\?>|$)/ig; + var phpPattern = /<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#)(?:[^?\n\r]|\?(?!>))*(?=$|\?>|[\r\n])|\/\*[\s\S]*?(?:\*\/|$))*?(?:\?>|$)/ig; Prism.languages['markup-templating'].buildPlaceholders(env, 'php', phpPattern); }); diff --git a/components/prism-php.min.js b/components/prism-php.min.js index fa3f0a69e2..ea56b5eb80 100644 --- a/components/prism-php.min.js +++ b/components/prism-php.min.js @@ -1 +1 @@ -!function(n){n.languages.php=n.languages.extend("clike",{keyword:/\b(?:__halt_compiler|abstract|and|array|as|break|callable|case|catch|class|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|eval|exit|extends|final|finally|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|namespace|new|or|parent|print|private|protected|public|require|require_once|return|static|switch|throw|trait|try|unset|use|var|while|xor|yield)\b/i,boolean:{pattern:/\b(?:false|true)\b/i,alias:"constant"},constant:[/\b[A-Z_][A-Z0-9_]*\b/,/\b(?:null)\b/i],comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0}}),n.languages.insertBefore("php","string",{"shell-comment":{pattern:/(^|[^\\])#.*/,lookbehind:!0,alias:"comment"}}),n.languages.insertBefore("php","comment",{delimiter:{pattern:/\?>$|^<\?(?:php(?=\s)|=)?/i,alias:"important"}}),n.languages.insertBefore("php","keyword",{variable:/\$+(?:\w+\b|(?={))/i,package:{pattern:/(\\|namespace\s+|use\s+)[\w\\]+/,lookbehind:!0,inside:{punctuation:/\\/}}}),n.languages.insertBefore("php","operator",{property:{pattern:/(->)[\w]+/,lookbehind:!0}});var e={pattern:/{\$(?:{(?:{[^{}]+}|[^{}]+)}|[^{}])+}|(^|[^\\{])\$+(?:\w+(?:\[.+?]|->\w+)*)/,lookbehind:!0,inside:n.languages.php};n.languages.insertBefore("php","string",{"nowdoc-string":{pattern:/<<<'([^']+)'(?:\r\n?|\n)(?:.*(?:\r\n?|\n))*?\1;/,greedy:!0,alias:"string",inside:{delimiter:{pattern:/^<<<'[^']+'|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<'?|[';]$/}}}},"heredoc-string":{pattern:/<<<(?:"([^"]+)"(?:\r\n?|\n)(?:.*(?:\r\n?|\n))*?\1;|([a-z_]\w*)(?:\r\n?|\n)(?:.*(?:\r\n?|\n))*?\2;)/i,greedy:!0,alias:"string",inside:{delimiter:{pattern:/^<<<(?:"[^"]+"|[a-z_]\w*)|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<"?|[";]$/}},interpolation:e}},"single-quoted-string":{pattern:/'(?:\\[\s\S]|[^\\'])*'/,greedy:!0,alias:"string"},"double-quoted-string":{pattern:/"(?:\\[\s\S]|[^\\"])*"/,greedy:!0,alias:"string",inside:{interpolation:e}}}),delete n.languages.php.string,n.hooks.add("before-tokenize",function(e){if(/<\?/.test(e.code)){n.languages["markup-templating"].buildPlaceholders(e,"php",/<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#)(?:[^?\n\r]|\?(?!>))*|\/\*[\s\S]*?(?:\*\/|$))*?(?:\?>|$)/gi)}}),n.hooks.add("after-tokenize",function(e){n.languages["markup-templating"].tokenizePlaceholders(e,"php")})}(Prism); \ No newline at end of file +!function(n){n.languages.php=n.languages.extend("clike",{keyword:/\b(?:__halt_compiler|abstract|and|array|as|break|callable|case|catch|class|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|eval|exit|extends|final|finally|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|namespace|new|or|parent|print|private|protected|public|require|require_once|return|static|switch|throw|trait|try|unset|use|var|while|xor|yield)\b/i,boolean:{pattern:/\b(?:false|true)\b/i,alias:"constant"},constant:[/\b[A-Z_][A-Z0-9_]*\b/,/\b(?:null)\b/i],comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0}}),n.languages.insertBefore("php","string",{"shell-comment":{pattern:/(^|[^\\])#.*/,lookbehind:!0,alias:"comment"}}),n.languages.insertBefore("php","comment",{delimiter:{pattern:/\?>$|^<\?(?:php(?=\s)|=)?/i,alias:"important"}}),n.languages.insertBefore("php","keyword",{variable:/\$+(?:\w+\b|(?={))/i,package:{pattern:/(\\|namespace\s+|use\s+)[\w\\]+/,lookbehind:!0,inside:{punctuation:/\\/}}}),n.languages.insertBefore("php","operator",{property:{pattern:/(->)[\w]+/,lookbehind:!0}});var e={pattern:/{\$(?:{(?:{[^{}]+}|[^{}]+)}|[^{}])+}|(^|[^\\{])\$+(?:\w+(?:\[.+?]|->\w+)*)/,lookbehind:!0,inside:n.languages.php};n.languages.insertBefore("php","string",{"nowdoc-string":{pattern:/<<<'([^']+)'(?:\r\n?|\n)(?:.*(?:\r\n?|\n))*?\1;/,greedy:!0,alias:"string",inside:{delimiter:{pattern:/^<<<'[^']+'|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<'?|[';]$/}}}},"heredoc-string":{pattern:/<<<(?:"([^"]+)"(?:\r\n?|\n)(?:.*(?:\r\n?|\n))*?\1;|([a-z_]\w*)(?:\r\n?|\n)(?:.*(?:\r\n?|\n))*?\2;)/i,greedy:!0,alias:"string",inside:{delimiter:{pattern:/^<<<(?:"[^"]+"|[a-z_]\w*)|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<"?|[";]$/}},interpolation:e}},"single-quoted-string":{pattern:/'(?:\\[\s\S]|[^\\'])*'/,greedy:!0,alias:"string"},"double-quoted-string":{pattern:/"(?:\\[\s\S]|[^\\"])*"/,greedy:!0,alias:"string",inside:{interpolation:e}}}),delete n.languages.php.string,n.hooks.add("before-tokenize",function(e){if(/<\?/.test(e.code)){n.languages["markup-templating"].buildPlaceholders(e,"php",/<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#)(?:[^?\n\r]|\?(?!>))*(?=$|\?>|[\r\n])|\/\*[\s\S]*?(?:\*\/|$))*?(?:\?>|$)/gi)}}),n.hooks.add("after-tokenize",function(e){n.languages["markup-templating"].tokenizePlaceholders(e,"php")})}(Prism); \ No newline at end of file diff --git a/tests/languages/php/issue2156.test b/tests/languages/php/issue2156.test new file mode 100644 index 0000000000..4223d81829 --- /dev/null +++ b/tests/languages/php/issue2156.test @@ -0,0 +1,125 @@ +","",str_replace("'","",str_replace("[","",str_replace("]","",$_POST['txtCode']))))); + } + if (isset($_SESSION['CAPTCHA_RndText'])) { + $CAPTCHA_RandomText = $_SESSION['CAPTCHA_RndText']; + } + + // Eingabefelder abfragen + $_SESSION['company'] = $_POST['company']; + $_SESSION['name'] = $_POST['name']; + $_SESSION['address'] = $_POST['address']; + $_SESSION['zip_code'] = $_POST['zip_code']; + $_SESSION['city'] = $_POST['city']; + $_SESSION['county'] = $_POST['county']; + $_SESSION['country'] = $_POST['country']; + $_SESSION['phone'] = $_POST['phone']; + $_SESSION['fax'] = $_POST['fax']; + $_SESSION['email'] = $_POST['email']; + $_SESSION['nachricht'] = $_POST['nachricht']; + + $email_i = $_SESSION['email']; + + // Email Funktion + function pruefe_mail($email_i) { + if(strstr($email_i, "@")) { + $email_i = explode ("@", $email_i); + if(strstr($email_i[1], ".")) $ok = TRUE; + } + return $ok; + } + + // Eingaben prüfen + $fehler = ""; + if(!pruefe_mail($email_i) && !empty($email_i)) { + $fehler .= "
        • email
        • "; + } + if ($_SESSION['name'] == ""){ + $fehler .= "
        • name
        • "; + } + if ($_SESSION['city'] == ""){ + $fehler .= "
        • city
        • "; + } + if ($_SESSION['country'] == ""){ + $fehler .= "
        • country
        • "; + } + if ($_SESSION['phone'] == ""){ + $fehler .= "
        • phone
        • "; + } + if ($_SESSION['email'] == ""){ + $fehler .= "
        • email
        • "; + } + if ($_SESSION['message'] == ""){ + $fehler .= "
        • message
        • "; + } + if ($CAPTCHA_EnteredText == $CAPTCHA_RandomText and isset($_POST['txtCode']) == true and isset($_SESSION['CAPTCHA_RndText'])){ + $captcha = true; + } else { + $fehler .= "
        • code
        • "; + } + echo '
          '; + if ($fehler == ""){ + // Email zumsammensetzen + $email = "From: " . $_SESSION['email']; + + + $nachrichtfertig = + "Company: " . $_SESSION['company'] "n\" + "Name: " $_SESSION['name'] "n\" + "Address: " $_SESSION['address'] "n\" + "ZIP Code: " $_SESSION['zip_code'] "n\" + "City: " $_SESSION['city'] "n\" + "County: " $_SESSION['county'] "n\" + "Country: " $_SESSION['country'] "n\" + "Phone: " $_SESSION['phone'] "n\" + "Fax: " $_SESSION['fax'] "n\" + "eMail: " $_SESSION['email'] "n\n\" + "Message: " $_SESSION['message']; + + + $versand = mail($empfaenger, $betreff, $nachrichtfertig, $email); + if ($versand) { + echo '

          Thank you very much!

          +

          The message were send successfully

          '; + + // Sessionvariablen löschen + unset($_SESSION['company']); + unset($_SESSION['name']); + unset($_SESSION['address']); + unset($_SESSION['zip_code']); + unset($_SESSION['city']); + unset($_SESSION['county']); + unset($_SESSION['country']); + unset($_SESSION['phone']); + unset($_SESSION['fax']); + unset($_SESSION['email']); + unset($_SESSION['nachricht']); + } + + } else { + echo '

          Error

          '; + echo '

          Please fill in all the $fehler field. back

          '; + } + echo '
          '; + + // Session unset + unset($_SESSION['CAPTCHA_RndText']); + +?> + +---------------------------------------------------- + +[ + ["prolog", "\",\"\",str_replace(\"'\",\"\",str_replace(\"[\",\"\",str_replace(\"]\",\"\",$_POST['txtCode'])))));\n\t}\n\tif (isset($_SESSION['CAPTCHA_RndText'])) {\n\t$CAPTCHA_RandomText = $_SESSION['CAPTCHA_RndText'];\n\t}\n\n\t// Eingabefelder abfragen\n\t$_SESSION['company'] = $_POST['company'];\n\t$_SESSION['name'] = $_POST['name'];\n\t$_SESSION['address'] = $_POST['address'];\n\t$_SESSION['zip_code'] = $_POST['zip_code'];\n\t$_SESSION['city'] = $_POST['city'];\n\t$_SESSION['county'] = $_POST['county'];\n\t$_SESSION['country'] = $_POST['country'];\n\t$_SESSION['phone'] = $_POST['phone'];\n\t$_SESSION['fax'] = $_POST['fax'];\n\t$_SESSION['email'] = $_POST['email'];\n\t$_SESSION['nachricht'] = $_POST['nachricht'];\n\n\t$email_i = $_SESSION['email'];\n\n\t// Email Funktion\n\tfunction pruefe_mail($email_i) {\n\t\t if(strstr($email_i, \"@\")) {\n\t\t\t$email_i = explode (\"@\", $email_i);\n\t\t\tif(strstr($email_i[1], \".\")) $ok = TRUE;\n\t\t }\n\t\t return $ok;\n\t\t}\n\n\t// Eingaben prüfen\n\t$fehler = \"\";\n\tif(!pruefe_mail($email_i) && !empty($email_i)) {\n\t\t\t$fehler .= \"
        • email
        • \";\n\t\t\t}\n\t\t\tif ($_SESSION['name'] == \"\"){\n\t\t\t$fehler .= \"
        • name
        • \";\n\t\t\t}\n\t\t\tif ($_SESSION['city'] == \"\"){\n\t\t\t$fehler .= \"
        • city
        • \";\n\t\t\t}\n\t\t\tif ($_SESSION['country'] == \"\"){\n\t\t\t$fehler .= \"
        • country
        • \";\n\t\t\t}\n\t\t\tif ($_SESSION['phone'] == \"\"){\n\t\t\t$fehler .= \"
        • phone
        • \";\n\t\t\t}\n\t\t\tif ($_SESSION['email'] == \"\"){\n\t\t\t$fehler .= \"
        • email
        • \";\n\t\t\t}\n\t\t\tif ($_SESSION['message'] == \"\"){\n\t\t\t$fehler .= \"
        • message
        • \";\n\t\t\t}\n\t\t\tif ($CAPTCHA_EnteredText == $CAPTCHA_RandomText and isset($_POST['txtCode']) == true and isset($_SESSION['CAPTCHA_RndText'])){\n\t\t\t$captcha = true;\n\t\t\t} else {\n\t\t\t$fehler .= \"
        • code
        • \";\n\t\t\t}\n\techo '
          ';\n\tif ($fehler == \"\"){\n\t// Email zumsammensetzen\n\t$email = \"From: \" . $_SESSION['email'];\n\n\n\t$nachrichtfertig =\n\t\"Company: \" . $_SESSION['company'] \"n\\\"\n\t\"Name: \" $_SESSION['name'] \"n\\\"\n\t\"Address: \" $_SESSION['address'] \"n\\\"\n\t\"ZIP Code: \" $_SESSION['zip_code'] \"n\\\"\n\t\"City: \" $_SESSION['city'] \"n\\\"\n\t\"County: \" $_SESSION['county'] \"n\\\"\n\t\"Country: \" $_SESSION['country'] \"n\\\"\n\t\"Phone: \" $_SESSION['phone'] \"n\\\"\n\t\"Fax: \" $_SESSION['fax'] \"n\\\"\n\t\"eMail: \" $_SESSION['email'] \"n\\n\\\"\n\t\"Message: \" $_SESSION['message'];\n\n\n\t$versand = mail($empfaenger, $betreff, $nachrichtfertig, $email);\n\t\t\tif ($versand) {\n\t\t\techo '

          Thank you very much!

          \n\t\t\t\t

          The message were send successfully

          ';\n\n\t\t\t// Sessionvariablen löschen\n\t\t\tunset($_SESSION['company']);\n\t\t\tunset($_SESSION['name']);\n\t\t\tunset($_SESSION['address']);\n\t\t\tunset($_SESSION['zip_code']);\n\t\t\tunset($_SESSION['city']);\n\t\t\tunset($_SESSION['county']);\n\t\t\tunset($_SESSION['country']);\n\t\t\tunset($_SESSION['phone']);\n\t\t\tunset($_SESSION['fax']);\n\t\t\tunset($_SESSION['email']);\n\t\t\tunset($_SESSION['nachricht']);\n\t\t\t}\n\n\t} else {\n\techo '

          Error

          ';\n\techo '

          Please fill in all the $fehler field. back

          ';\n\t}\n\techo '
          ';\n\n\t// Session unset\n\tunset($_SESSION['CAPTCHA_RndText']);\n\n?>"] +] + +---------------------------------------------------- + +Checks for issue #2156. From 7f1c55b700731d43c89c8b921de9f0cbb19a739e Mon Sep 17 00:00:00 2001 From: Alex Fedoseev Date: Sun, 5 Jan 2020 21:57:33 +0300 Subject: [PATCH 0408/1100] ReasonML: Add support for single line comments (#2150) --- components/prism-reason.js | 6 +----- components/prism-reason.min.js | 2 +- tests/languages/reason/comment_feature.test | 4 +++- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/components/prism-reason.js b/components/prism-reason.js index ed420ec727..ff2db27900 100644 --- a/components/prism-reason.js +++ b/components/prism-reason.js @@ -1,8 +1,4 @@ Prism.languages.reason = Prism.languages.extend('clike', { - 'comment': { - pattern: /(^|[^\\])\/\*[\s\S]*?\*\//, - lookbehind: true - }, 'string': { pattern: /"(?:\\(?:\r\n|[\s\S])|[^\\\r\n"])*"/, greedy: true @@ -29,4 +25,4 @@ Prism.languages.insertBefore('reason', 'class-name', { }); // We can't match functions property, so let's not even try. -delete Prism.languages.reason.function; \ No newline at end of file +delete Prism.languages.reason.function; diff --git a/components/prism-reason.min.js b/components/prism-reason.min.js index 4c67651f29..0e46279a58 100644 --- a/components/prism-reason.min.js +++ b/components/prism-reason.min.js @@ -1 +1 @@ -Prism.languages.reason=Prism.languages.extend("clike",{comment:{pattern:/(^|[^\\])\/\*[\s\S]*?\*\//,lookbehind:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^\\\r\n"])*"/,greedy:!0},"class-name":/\b[A-Z]\w*/,keyword:/\b(?:and|as|assert|begin|class|constraint|do|done|downto|else|end|exception|external|for|fun|function|functor|if|in|include|inherit|initializer|lazy|let|method|module|mutable|new|nonrec|object|of|open|or|private|rec|sig|struct|switch|then|to|try|type|val|virtual|when|while|with)\b/,operator:/\.{3}|:[:=]|\|>|->|=(?:==?|>)?|<=?|>=?|[|^?'#!~`]|[+\-*\/]\.?|\b(?:mod|land|lor|lxor|lsl|lsr|asr)\b/}),Prism.languages.insertBefore("reason","class-name",{character:{pattern:/'(?:\\x[\da-f]{2}|\\o[0-3][0-7][0-7]|\\\d{3}|\\.|[^'\\\r\n])'/,alias:"string"},constructor:{pattern:/\b[A-Z]\w*\b(?!\s*\.)/,alias:"variable"},label:{pattern:/\b[a-z]\w*(?=::)/,alias:"symbol"}}),delete Prism.languages.reason.function; \ No newline at end of file +Prism.languages.reason=Prism.languages.extend("clike",{string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^\\\r\n"])*"/,greedy:!0},"class-name":/\b[A-Z]\w*/,keyword:/\b(?:and|as|assert|begin|class|constraint|do|done|downto|else|end|exception|external|for|fun|function|functor|if|in|include|inherit|initializer|lazy|let|method|module|mutable|new|nonrec|object|of|open|or|private|rec|sig|struct|switch|then|to|try|type|val|virtual|when|while|with)\b/,operator:/\.{3}|:[:=]|\|>|->|=(?:==?|>)?|<=?|>=?|[|^?'#!~`]|[+\-*\/]\.?|\b(?:mod|land|lor|lxor|lsl|lsr|asr)\b/}),Prism.languages.insertBefore("reason","class-name",{character:{pattern:/'(?:\\x[\da-f]{2}|\\o[0-3][0-7][0-7]|\\\d{3}|\\.|[^'\\\r\n])'/,alias:"string"},constructor:{pattern:/\b[A-Z]\w*\b(?!\s*\.)/,alias:"variable"},label:{pattern:/\b[a-z]\w*(?=::)/,alias:"symbol"}}),delete Prism.languages.reason.function; \ No newline at end of file diff --git a/tests/languages/reason/comment_feature.test b/tests/languages/reason/comment_feature.test index 5a420bac4e..13e5f5acfe 100644 --- a/tests/languages/reason/comment_feature.test +++ b/tests/languages/reason/comment_feature.test @@ -1,3 +1,4 @@ +// foobar /**/ /* Single line comment */ /* Multiline @@ -9,6 +10,7 @@ Doc comment ---------------------------------------------------- [ + ["comment", "// foobar"], ["comment", "/**/"], ["comment", "/* Single line comment */"], ["comment", "/* Multiline\r\ncomment */"], @@ -17,4 +19,4 @@ Doc comment ---------------------------------------------------- -Checks for comments. \ No newline at end of file +Checks for comments. From 401d4b026662293c53390724c012ea69ab3f5a0d Mon Sep 17 00:00:00 2001 From: Petrik de Heus Date: Sun, 5 Jan 2020 19:59:16 +0100 Subject: [PATCH 0409/1100] Ruby: Override 'class-name' definition (#2135) Unlike other C-like languages, in Ruby objects don't get initialized by using `new Object` but `Object.new`. So whatever comes after `new` probably isn't a classname. --- components/prism-ruby.js | 7 +++++++ components/prism-ruby.min.js | 2 +- tests/languages/ruby/method_definition_feature.test | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/components/prism-ruby.js b/components/prism-ruby.js index 51021b500a..0e4cce4fac 100644 --- a/components/prism-ruby.js +++ b/components/prism-ruby.js @@ -13,6 +13,13 @@ greedy: true } ], + 'class-name': { + pattern: /(\b(?:class)\s+|\bcatch\s+\()[\w.\\]+/i, + lookbehind: true, + inside: { + 'punctuation': /[.\\]/ + } + }, 'keyword': /\b(?:alias|and|BEGIN|begin|break|case|class|def|define_method|defined|do|each|else|elsif|END|end|ensure|extend|for|if|in|include|module|new|next|nil|not|or|prepend|protected|private|public|raise|redo|require|rescue|retry|return|self|super|then|throw|undef|unless|until|when|while|yield)\b/ }); diff --git a/components/prism-ruby.min.js b/components/prism-ruby.min.js index ef50729181..022abeb371 100644 --- a/components/prism-ruby.min.js +++ b/components/prism-ruby.min.js @@ -1 +1 @@ -!function(e){e.languages.ruby=e.languages.extend("clike",{comment:[/#.*/,{pattern:/^=begin\s[\s\S]*?^=end/m,greedy:!0}],keyword:/\b(?:alias|and|BEGIN|begin|break|case|class|def|define_method|defined|do|each|else|elsif|END|end|ensure|extend|for|if|in|include|module|new|next|nil|not|or|prepend|protected|private|public|raise|redo|require|rescue|retry|return|self|super|then|throw|undef|unless|until|when|while|yield)\b/});var n={pattern:/#\{[^}]+\}/,inside:{delimiter:{pattern:/^#\{|\}$/,alias:"tag"},rest:e.languages.ruby}};delete e.languages.ruby.function,e.languages.insertBefore("ruby","keyword",{regex:[{pattern:/%r([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1[gim]{0,3}/,greedy:!0,inside:{interpolation:n}},{pattern:/%r\((?:[^()\\]|\\[\s\S])*\)[gim]{0,3}/,greedy:!0,inside:{interpolation:n}},{pattern:/%r\{(?:[^#{}\\]|#(?:\{[^}]+\})?|\\[\s\S])*\}[gim]{0,3}/,greedy:!0,inside:{interpolation:n}},{pattern:/%r\[(?:[^\[\]\\]|\\[\s\S])*\][gim]{0,3}/,greedy:!0,inside:{interpolation:n}},{pattern:/%r<(?:[^<>\\]|\\[\s\S])*>[gim]{0,3}/,greedy:!0,inside:{interpolation:n}},{pattern:/(^|[^/])\/(?!\/)(?:\[.+?]|\\.|[^/\\\r\n])+\/[gim]{0,3}(?=\s*(?:$|[\r\n,.;})]))/,lookbehind:!0,greedy:!0}],variable:/[@$]+[a-zA-Z_]\w*(?:[?!]|\b)/,symbol:{pattern:/(^|[^:]):[a-zA-Z_]\w*(?:[?!]|\b)/,lookbehind:!0},"method-definition":{pattern:/(\bdef\s+)[\w.]+/,lookbehind:!0,inside:{function:/\w+$/,rest:e.languages.ruby}}}),e.languages.insertBefore("ruby","number",{builtin:/\b(?:Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Stat|Fixnum|Float|Hash|Integer|IO|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|String|Struct|TMS|Symbol|ThreadGroup|Thread|Time|TrueClass)\b/,constant:/\b[A-Z]\w*(?:[?!]|\b)/}),e.languages.ruby.string=[{pattern:/%[qQiIwWxs]?([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1/,greedy:!0,inside:{interpolation:n}},{pattern:/%[qQiIwWxs]?\((?:[^()\\]|\\[\s\S])*\)/,greedy:!0,inside:{interpolation:n}},{pattern:/%[qQiIwWxs]?\{(?:[^#{}\\]|#(?:\{[^}]+\})?|\\[\s\S])*\}/,greedy:!0,inside:{interpolation:n}},{pattern:/%[qQiIwWxs]?\[(?:[^\[\]\\]|\\[\s\S])*\]/,greedy:!0,inside:{interpolation:n}},{pattern:/%[qQiIwWxs]?<(?:[^<>\\]|\\[\s\S])*>/,greedy:!0,inside:{interpolation:n}},{pattern:/("|')(?:#\{[^}]+\}|\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0,inside:{interpolation:n}}],e.languages.rb=e.languages.ruby}(Prism); \ No newline at end of file +!function(e){e.languages.ruby=e.languages.extend("clike",{comment:[/#.*/,{pattern:/^=begin\s[\s\S]*?^=end/m,greedy:!0}],"class-name":{pattern:/(\b(?:class)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:alias|and|BEGIN|begin|break|case|class|def|define_method|defined|do|each|else|elsif|END|end|ensure|extend|for|if|in|include|module|new|next|nil|not|or|prepend|protected|private|public|raise|redo|require|rescue|retry|return|self|super|then|throw|undef|unless|until|when|while|yield)\b/});var n={pattern:/#\{[^}]+\}/,inside:{delimiter:{pattern:/^#\{|\}$/,alias:"tag"},rest:e.languages.ruby}};delete e.languages.ruby.function,e.languages.insertBefore("ruby","keyword",{regex:[{pattern:/%r([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1[gim]{0,3}/,greedy:!0,inside:{interpolation:n}},{pattern:/%r\((?:[^()\\]|\\[\s\S])*\)[gim]{0,3}/,greedy:!0,inside:{interpolation:n}},{pattern:/%r\{(?:[^#{}\\]|#(?:\{[^}]+\})?|\\[\s\S])*\}[gim]{0,3}/,greedy:!0,inside:{interpolation:n}},{pattern:/%r\[(?:[^\[\]\\]|\\[\s\S])*\][gim]{0,3}/,greedy:!0,inside:{interpolation:n}},{pattern:/%r<(?:[^<>\\]|\\[\s\S])*>[gim]{0,3}/,greedy:!0,inside:{interpolation:n}},{pattern:/(^|[^/])\/(?!\/)(?:\[.+?]|\\.|[^/\\\r\n])+\/[gim]{0,3}(?=\s*(?:$|[\r\n,.;})]))/,lookbehind:!0,greedy:!0}],variable:/[@$]+[a-zA-Z_]\w*(?:[?!]|\b)/,symbol:{pattern:/(^|[^:]):[a-zA-Z_]\w*(?:[?!]|\b)/,lookbehind:!0},"method-definition":{pattern:/(\bdef\s+)[\w.]+/,lookbehind:!0,inside:{function:/\w+$/,rest:e.languages.ruby}}}),e.languages.insertBefore("ruby","number",{builtin:/\b(?:Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Stat|Fixnum|Float|Hash|Integer|IO|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|String|Struct|TMS|Symbol|ThreadGroup|Thread|Time|TrueClass)\b/,constant:/\b[A-Z]\w*(?:[?!]|\b)/}),e.languages.ruby.string=[{pattern:/%[qQiIwWxs]?([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1/,greedy:!0,inside:{interpolation:n}},{pattern:/%[qQiIwWxs]?\((?:[^()\\]|\\[\s\S])*\)/,greedy:!0,inside:{interpolation:n}},{pattern:/%[qQiIwWxs]?\{(?:[^#{}\\]|#(?:\{[^}]+\})?|\\[\s\S])*\}/,greedy:!0,inside:{interpolation:n}},{pattern:/%[qQiIwWxs]?\[(?:[^\[\]\\]|\\[\s\S])*\]/,greedy:!0,inside:{interpolation:n}},{pattern:/%[qQiIwWxs]?<(?:[^<>\\]|\\[\s\S])*>/,greedy:!0,inside:{interpolation:n}},{pattern:/("|')(?:#\{[^}]+\}|\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0,inside:{interpolation:n}}],e.languages.rb=e.languages.ruby}(Prism); \ No newline at end of file diff --git a/tests/languages/ruby/method_definition_feature.test b/tests/languages/ruby/method_definition_feature.test index ee8b5ec530..087ce8bc21 100644 --- a/tests/languages/ruby/method_definition_feature.test +++ b/tests/languages/ruby/method_definition_feature.test @@ -32,7 +32,7 @@ end "diameter", ["punctuation", ")"], ["keyword", "new"], - ["class-name", ["diameter"]], + " diameter ", ["operator", "/"], ["number", "2"], ["keyword", "end"], From 694a81b817b26cc8f406c38866f06da6dac7b1e3 Mon Sep 17 00:00:00 2001 From: David Grudl Date: Sun, 5 Jan 2020 20:00:51 +0100 Subject: [PATCH 0410/1100] Added support for Latte & NEON (#2140) - Added support for templating system Latte https://latte.nette.org - Added support for NEON https://ne-on.org --- components.js | 2 +- components.json | 9 +++ components/prism-latte.js | 69 +++++++++++++++++++ components/prism-latte.min.js | 1 + components/prism-neon.js | 41 +++++++++++ components/prism-neon.min.js | 1 + plugins/autoloader/prism-autoloader.js | 5 ++ plugins/autoloader/prism-autoloader.min.js | 2 +- plugins/show-language/prism-show-language.js | 1 + .../show-language/prism-show-language.min.js | 2 +- tests/languages/latte/comment_feature.test | 16 +++++ tests/languages/latte/delimiter_feature.test | 32 +++++++++ tests/languages/latte/html_feature.test | 53 ++++++++++++++ tests/languages/latte/n-attr_feature.test | 37 ++++++++++ tests/languages/latte/php_feature.test | 34 +++++++++ tests/languages/neon/boolean_feature.test | 21 ++++++ tests/languages/neon/comment_feature.test | 13 ++++ tests/languages/neon/composite.test | 25 +++++++ tests/languages/neon/datetime_feature.test | 26 +++++++ tests/languages/neon/json_feature.test | 39 +++++++++++ tests/languages/neon/key_feature.test | 17 +++++ tests/languages/neon/literal_feature.test | 15 ++++ tests/languages/neon/null_feature.test | 12 ++++ tests/languages/neon/number_feature.test | 36 ++++++++++ tests/languages/neon/string_feature.test | 38 ++++++++++ 25 files changed, 544 insertions(+), 3 deletions(-) create mode 100644 components/prism-latte.js create mode 100644 components/prism-latte.min.js create mode 100644 components/prism-neon.js create mode 100644 components/prism-neon.min.js create mode 100644 tests/languages/latte/comment_feature.test create mode 100644 tests/languages/latte/delimiter_feature.test create mode 100644 tests/languages/latte/html_feature.test create mode 100644 tests/languages/latte/n-attr_feature.test create mode 100644 tests/languages/latte/php_feature.test create mode 100644 tests/languages/neon/boolean_feature.test create mode 100644 tests/languages/neon/comment_feature.test create mode 100644 tests/languages/neon/composite.test create mode 100644 tests/languages/neon/datetime_feature.test create mode 100644 tests/languages/neon/json_feature.test create mode 100644 tests/languages/neon/key_feature.test create mode 100644 tests/languages/neon/literal_feature.test create mode 100644 tests/languages/neon/null_feature.test create mode 100644 tests/languages/neon/number_feature.test create mode 100644 tests/languages/neon/string_feature.test diff --git a/components.js b/components.js index dd554dcde9..68b5cc4035 100644 --- a/components.js +++ b/components.js @@ -1,2 +1,2 @@ -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default","overrideExampleHeader":true},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"Augmented Backus–Naur form","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","owner":"RunDevelopment"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"Backus–Naur form","alias":"rbnf","aliasTitles":{"rbnf":"Routing Backus–Naur form"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"Extended Backus–Naur form","owner":"RunDevelopment"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment"},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","ruby","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"http":{"title":"HTTP","optional":["css","javascript","json","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":["java"],"optional":["scala"],"owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"json":{"title":"JSON","owner":"CupOfTea696"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":["jsdoc"],"alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"nasm":{"title":"NASM","owner":"rbmj"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"cpp","modify":["c","cpp"],"overrideExampleHeader":true,"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","modify":["actionscript","coffeescript","flow","javascript","typescript","vala"],"owner":"RunDevelopment"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","peerDependencies":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"solidity":{"title":"Solidity (Ethereum)","require":"clike","owner":"glachaud"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"turtle":{"title":"Turtle","alias":["trig"],"aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","visual-basic"],"owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true}}}; +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default","overrideExampleHeader":true},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"Augmented Backus–Naur form","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","owner":"RunDevelopment"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"Backus–Naur form","alias":"rbnf","aliasTitles":{"rbnf":"Routing Backus–Naur form"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"Extended Backus–Naur form","owner":"RunDevelopment"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment"},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","ruby","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"http":{"title":"HTTP","optional":["css","javascript","json","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":["java"],"optional":["scala"],"owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"json":{"title":"JSON","owner":"CupOfTea696"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":["jsdoc"],"alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"cpp","modify":["c","cpp"],"overrideExampleHeader":true,"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","modify":["actionscript","coffeescript","flow","javascript","typescript","vala"],"owner":"RunDevelopment"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","peerDependencies":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"solidity":{"title":"Solidity (Ethereum)","require":"clike","owner":"glachaud"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"turtle":{"title":"Turtle","alias":["trig"],"aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","visual-basic"],"owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true}}}; if (typeof module !== 'undefined' && module.exports) { module.exports = components; } \ No newline at end of file diff --git a/components.json b/components.json index 9292842699..9f3e2d33a1 100644 --- a/components.json +++ b/components.json @@ -560,6 +560,11 @@ }, "owner": "japborst" }, + "latte": { + "title": "Latte", + "require": ["clike", "markup-templating", "php"], + "owner": "nette" + }, "less": { "title": "Less", "require": "css", @@ -650,6 +655,10 @@ "title": "NASM", "owner": "rbmj" }, + "neon": { + "title": "NEON", + "owner": "nette" + }, "nginx": { "title": "nginx", "owner": "westonganger", diff --git a/components/prism-latte.js b/components/prism-latte.js new file mode 100644 index 0000000000..9bf1242c00 --- /dev/null +++ b/components/prism-latte.js @@ -0,0 +1,69 @@ +(function (Prism) { + Prism.languages.latte = { + 'comment': /^\{\*[\s\S]*/, + 'ld': { + pattern: /^\{(?:[=_]|\/?(?!\d|\w+\()\w+|)/, + inside: { + 'punctuation': /^\{\/?/, + 'tag': { + pattern: /.+/, + alias: 'important' + } + } + }, + 'rd': { + pattern: /\}$/, + inside: { + 'punctuation': /.+/ + } + }, + 'php': { + pattern: /\S(?:[\s\S]*\S)?/, + alias: 'language-php', + inside: Prism.languages.php + } + }; + + var markupLatte = Prism.languages.extend('markup', {}); + Prism.languages.insertBefore('inside', 'attr-value', { + 'n-attr': { + pattern: /n:[\w-]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+))?/, + inside: { + 'attr-name': { + pattern: /^[^\s=]+/, + alias: 'important' + }, + 'attr-value': { + pattern: /=[\s\S]+/, + inside: { + 'punctuation': [ + /^=/, + { + pattern: /^(\s*)["']|["']$/, + lookbehind: true + } + ], + 'php': { + pattern: /\S(?:[\s\S]*\S)?/, + inside: Prism.languages.php + } + } + }, + } + }, + }, markupLatte.tag); + + Prism.hooks.add('before-tokenize', function(env) { + if (env.language !== 'latte') { + return; + } + var lattePattern = /\{\*[\s\S]*?\*\}|\{[^'"\s{}*](?:[^"'/{}]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|\/\*[\s\S]*?\*\/)*?\}/g; + Prism.languages['markup-templating'].buildPlaceholders(env, 'latte', lattePattern); + env.grammar = markupLatte; + }); + + Prism.hooks.add('after-tokenize', function(env) { + Prism.languages['markup-templating'].tokenizePlaceholders(env, 'latte'); + }); + +}(Prism)); diff --git a/components/prism-latte.min.js b/components/prism-latte.min.js new file mode 100644 index 0000000000..11730622e1 --- /dev/null +++ b/components/prism-latte.min.js @@ -0,0 +1 @@ +!function(t){t.languages.latte={comment:/^\{\*[\s\S]*/,ld:{pattern:/^\{(?:[=_]|\/?(?!\d|\w+\()\w+|)/,inside:{punctuation:/^\{\/?/,tag:{pattern:/.+/,alias:"important"}}},rd:{pattern:/\}$/,inside:{punctuation:/.+/}},php:{pattern:/\S(?:[\s\S]*\S)?/,alias:"language-php",inside:t.languages.php}};var e=t.languages.extend("markup",{});t.languages.insertBefore("inside","attr-value",{"n-attr":{pattern:/n:[\w-]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+))?/,inside:{"attr-name":{pattern:/^[^\s=]+/,alias:"important"},"attr-value":{pattern:/=[\s\S]+/,inside:{punctuation:[/^=/,{pattern:/^(\s*)["']|["']$/,lookbehind:!0}],php:{pattern:/\S(?:[\s\S]*\S)?/,inside:t.languages.php}}}}}},e.tag),t.hooks.add("before-tokenize",function(a){if("latte"===a.language){t.languages["markup-templating"].buildPlaceholders(a,"latte",/\{\*[\s\S]*?\*\}|\{[^'"\s{}*](?:[^"'/{}]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|\/\*[\s\S]*?\*\/)*?\}/g),a.grammar=e}}),t.hooks.add("after-tokenize",function(a){t.languages["markup-templating"].tokenizePlaceholders(a,"latte")})}(Prism); \ No newline at end of file diff --git a/components/prism-neon.js b/components/prism-neon.js new file mode 100644 index 0000000000..3b70dcf378 --- /dev/null +++ b/components/prism-neon.js @@ -0,0 +1,41 @@ +Prism.languages.neon = { + 'comment': { + pattern: /#.*/, + greedy: true + }, + 'datetime': { + pattern: /(^|[[{(=:,\s])\d\d\d\d-\d\d?-\d\d?(?:(?:[Tt]| +)\d\d?:\d\d:\d\d(?:\.\d*)? *(?:Z|[-+]\d\d?(?::?\d\d)?)?)?(?=$|[\]}),\s])/, + lookbehind: true, + alias: 'number' + }, + 'key': { + pattern: /(^|[[{(,\s])[^,:=[\]{}()'"\s]+(?=\s*:(?:$|[\]}),\s])|\s*=)/, + lookbehind: true, + alias: 'atrule' + }, + 'number': { + pattern: /(^|[[{(=:,\s])[+-]?(?:0x[\da-fA-F]+|0o[0-7]+|0b[01]+|(?:\d+\.?\d*|\.?\d+)(?:[eE][+-]?\d+)?)(?=$|[\]}),:=\s])/, + lookbehind: true + }, + 'boolean': { + pattern: /(^|[[{(=:,\s])(?:true|false|yes|no)(?=$|[\]}),:=\s])/i, + lookbehind: true + }, + 'null': { + pattern: /(^|[[{(=:,\s])(?:null)(?=$|[\]}),:=\s])/i, + lookbehind: true, + alias: 'keyword' + }, + 'string': { + pattern: /(^|[[{(=:,\s])(?:('''|""")\r?\n(?:(?:[^\r\n]|\r?\n(?![\t ]*\2))*\r?\n)?[\t ]*\2|'[^'\r\n]*'|"(?:\\.|[^"\r\n])*")/, + lookbehind: true, + greedy: true + }, + 'literal': { + pattern: /(^|[[{(=:,\s])(?:[^#"\',:=[\]{}()\s`-]|[:-][^"\',=[\]{}()\s])(?:[^,:=\]})(\s]+|:(?![\s,\]})]|$)|[ \t]+[^#,:=\]})(\s])*/, + lookbehind: true, + alias: 'string', + }, + 'punctuation': /[,:=[\]{}()-]/, +}; + diff --git a/components/prism-neon.min.js b/components/prism-neon.min.js new file mode 100644 index 0000000000..0adabef6ab --- /dev/null +++ b/components/prism-neon.min.js @@ -0,0 +1 @@ +Prism.languages.neon={comment:{pattern:/#.*/,greedy:!0},datetime:{pattern:/(^|[[{(=:,\s])\d\d\d\d-\d\d?-\d\d?(?:(?:[Tt]| +)\d\d?:\d\d:\d\d(?:\.\d*)? *(?:Z|[-+]\d\d?(?::?\d\d)?)?)?(?=$|[\]}),\s])/,lookbehind:!0,alias:"number"},key:{pattern:/(^|[[{(,\s])[^,:=[\]{}()'"\s]+(?=\s*:(?:$|[\]}),\s])|\s*=)/,lookbehind:!0,alias:"atrule"},number:{pattern:/(^|[[{(=:,\s])[+-]?(?:0x[\da-fA-F]+|0o[0-7]+|0b[01]+|(?:\d+\.?\d*|\.?\d+)(?:[eE][+-]?\d+)?)(?=$|[\]}),:=\s])/,lookbehind:!0},boolean:{pattern:/(^|[[{(=:,\s])(?:true|false|yes|no)(?=$|[\]}),:=\s])/i,lookbehind:!0},null:{pattern:/(^|[[{(=:,\s])(?:null)(?=$|[\]}),:=\s])/i,lookbehind:!0,alias:"keyword"},string:{pattern:/(^|[[{(=:,\s])(?:('''|""")\r?\n(?:(?:[^\r\n]|\r?\n(?![\t ]*\2))*\r?\n)?[\t ]*\2|'[^'\r\n]*'|"(?:\\.|[^"\r\n])*")/,lookbehind:!0,greedy:!0},literal:{pattern:/(^|[[{(=:,\s])(?:[^#"\',:=[\]{}()\s`-]|[:-][^"\',=[\]{}()\s])(?:[^,:=\]})(\s]+|:(?![\s,\]})]|$)|[ \t]+[^#,:=\]})(\s])*/,lookbehind:!0,alias:"string"},punctuation:/[,:=[\]{}()-]/}; \ No newline at end of file diff --git a/plugins/autoloader/prism-autoloader.js b/plugins/autoloader/prism-autoloader.js index 050d8d9db5..d688a80dde 100644 --- a/plugins/autoloader/prism-autoloader.js +++ b/plugins/autoloader/prism-autoloader.js @@ -61,6 +61,11 @@ "jsonp": "json", "json5": "json", "kotlin": "clike", + "latte": [ + "clike", + "markup-templating", + "php" + ], "less": "css", "lilypond": "scheme", "markdown": "markup", diff --git a/plugins/autoloader/prism-autoloader.min.js b/plugins/autoloader/prism-autoloader.min.js index b55233e479..bc434051bb 100644 --- a/plugins/autoloader/prism-autoloader.min.js +++ b/plugins/autoloader/prism-autoloader.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof self&&self.Prism&&self.document&&document.createElement){var c={javascript:"clike",actionscript:"javascript",arduino:"cpp",aspnet:["markup","csharp"],bison:"c",c:"clike",csharp:"clike",cpp:"c",coffeescript:"javascript",crystal:"ruby","css-extras":"css",d:"clike",dart:"clike",django:"markup-templating",ejs:["javascript","markup-templating"],etlua:["lua","markup-templating"],erb:["ruby","markup-templating"],fsharp:"clike","firestore-security-rules":"clike",flow:"javascript",ftl:"markup-templating",glsl:"clike",gml:"clike",go:"clike",groovy:"clike",haml:"ruby",handlebars:"markup-templating",haxe:"clike",java:"clike",javadoc:["markup","java","javadoclike"],jolie:"clike",jsdoc:["javascript","javadoclike"],"js-extras":"javascript","js-templates":"javascript",jsonp:"json",json5:"json",kotlin:"clike",less:"css",lilypond:"scheme",markdown:"markup","markup-templating":"markup",n4js:"javascript",nginx:"clike",objectivec:"c",opencl:"cpp",parser:"markup",php:["clike","markup-templating"],phpdoc:["php","javadoclike"],"php-extras":"php",plsql:"sql",processing:"clike",protobuf:"clike",pug:["markup","javascript"],qore:"clike",jsx:["markup","javascript"],tsx:["jsx","typescript"],reason:"clike",ruby:"clike",sass:"css",scss:"css",scala:"java","shell-session":"bash",smarty:"markup-templating",solidity:"clike",soy:"markup-templating",sparql:"turtle",sqf:"clike",swift:"clike",tap:"yaml",textile:"markup",tt2:["clike","markup-templating"],twig:"markup",typescript:"javascript","t4-cs":["t4-templating","csharp"],"t4-vb":["t4-templating","visual-basic"],vala:"clike",vbnet:"basic",velocity:"markup",wiki:"markup",xeora:"markup",xquery:"markup"},l={html:"markup",xml:"markup",svg:"markup",mathml:"markup",js:"javascript",g4:"antlr4",adoc:"asciidoc",shell:"bash",rbnf:"bnf",cs:"csharp",dotnet:"csharp",coffee:"coffeescript",jinja2:"django","dns-zone":"dns-zone-file",dockerfile:"docker",gamemakerlanguage:"gml",hs:"haskell",tex:"latex",context:"latex",ly:"lilypond",emacs:"lisp",elisp:"lisp","emacs-lisp":"lisp",md:"markdown",moon:"moonscript",n4jsd:"n4js",objectpascal:"pascal",px:"pcaxis",py:"python",robot:"robotframework",rb:"ruby",rq:"sparql",trig:"turtle",ts:"typescript",t4:"t4-cs",vb:"visual-basic",xeoracube:"xeora",yml:"yaml"},n={},a="components/",e=Prism.util.currentScript();if(e){var t=/\bplugins\/autoloader\/prism-autoloader\.(?:min\.)js$/i,s=/[\w-]+\.(?:min\.)js$/i;if(e.hasAttribute("data-autoloader-path"))a=e.getAttribute("data-autoloader-path").trim().replace(/\/?$/,"/");else{var i=e.src;t.test(i)?a=i.replace(t,"components/"):s.test(i)&&(a=i.replace(s,"components/"))}}var p=Prism.plugins.autoloader={languages_path:a,use_minified:!0,loadLanguages:o};Prism.hooks.add("complete",function(a){a.element&&a.language&&!a.grammar&&"none"!==a.language&&function(a,e){a in l&&(a=l[a]);var t=e.getAttribute("data-dependencies"),s=e.parentElement;!t&&s&&"pre"===s.tagName.toLowerCase()&&(t=s.getAttribute("data-dependencies")),o(t=t?t.split(/\s*,\s*/g):[],function(){m(a,function(){Prism.highlightElement(e)})})}(a.language,a.element)})}function o(a,e,t){"string"==typeof a&&(a=[a]);var s=a.length,i=0,r=!1;function c(){r||++i===s&&e&&e(a)}0!==s?a.forEach(function(a){m(a,c,function(){r||(r=!0,t&&t(a))})}):e&&setTimeout(e,0)}function m(e,t,s){var i=0<=e.indexOf("!");e=e.replace("!",""),e=l[e]||e;var a=function(){var a=n[e];if(a||(a=n[e]={callbacks:[]}),a.callbacks.push({success:t,error:s}),!i&&Prism.languages[e])u(e,"success");else if(!i&&a.error)u(e,"error");else if(i||!a.loading){a.loading=!0,function(a,e,t){var s=document.createElement("script");s.src=a,s.async=!0,s.onload=function(){document.body.removeChild(s),e&&e()},s.onerror=function(){document.body.removeChild(s),t&&t()},document.body.appendChild(s)}(function(a){return p.languages_path+"prism-"+a+(p.use_minified?".min":"")+".js"}(e),function(){a.loading=!1,u(e,"success")},function(){a.loading=!1,a.error=!0,u(e,"error")})}},r=c[e];r&&r.length?o(r,a,s):a()}function u(a,e){if(n[a]){for(var t=n[a].callbacks,s=0,i=t.length;s{$post->title} +id}title="ahoj"{/if}>{$post->title} + +{tag $a = true ? 10 * 5} +
          +{php '' } +{php "" } +{php "ba\"r" } +{php 'ba\'z' } +{php /* " */ } + +---------------------------------------------------- + +[ + ["tag", [["tag", [["punctuation", "<"], "a"]], + ["attr-name", ["href"]], ["attr-value", [["punctuation", "="], ["punctuation", "\""], + ["latte", [["ld", [["punctuation", "{"], ["tag", "link"]]], + ["php", ["Post", ["punctuation", ":"], "show ", ["variable", "$post"], ["operator", "-"], ["operator", ">"], ["property", "id"]]], + ["rd", [["punctuation", "}"]]]]], + ["punctuation", "\""]]], ["punctuation", ">"]]], + ["latte", [["ld", [["punctuation", "{"]]], ["php", [["variable", "$post"], ["operator", "-"], ["operator", ">"], ["property", "title"]]], ["rd", [["punctuation", "}"]]]]], + ["tag", [["tag", [["punctuation", ""]]], + + ["tag", [["tag", [["punctuation", "<"], "a"]], + ["attr-name", + [["latte", [["ld", [["punctuation", "{"], ["tag", "if"]]], ["php", [["variable", "$post"], ["operator", "-"], ["operator", ">"], ["property", "id"]]], ["rd", [["punctuation", "}"]]]]], "title"] + ], + ["attr-value", [["punctuation", "="], ["punctuation", "\""], "ahoj", ["punctuation", "\""]]], + ["attr-name", [["latte", [["ld", [["punctuation", "{/"], ["tag", "if"]]], ["rd", [["punctuation", "}"]]]]]]], + ["punctuation", ">"]]], + ["latte", [["ld", [["punctuation", "{"]]], ["php", [["variable", "$post"], ["operator", "-"], ["operator", ">"], ["property", "title"]]], ["rd", [["punctuation", "}"]]]]], + ["tag", [["tag", [["punctuation", ""]]], + + ["latte", [["ld", [["punctuation", "{"], ["tag", "tag"]]], ["php", [["variable", "$a"], ["operator", "="], ["boolean", "true"], ["operator", "?"], ["number", "10"], ["operator", "*"], ["number", "5"]]], ["rd", [["punctuation", "}"]]]]], + + ["tag", [["tag", [["punctuation", "<"], "div"]], + ["n-attr", [["attr-name", "n:attr"], ["attr-value", [["punctuation", "="], ["punctuation", "\""], ["php", [["variable", "$a"], ["operator", "="], ["boolean", "true"], ["operator", "?"], ["number", "10"], ["operator", "*"], ["number", "5"]]], ["punctuation", "\""]]]]], + ["punctuation", ">"]]], + + ["latte", [["ld", [["punctuation", "{"], ["tag", "php"]]], ["php", [["single-quoted-string", "''"]]], ["rd", [["punctuation", "}"]]]]], + + ["latte", [["ld", [["punctuation", "{"], ["tag", "php"]]], ["php", [["double-quoted-string", ["\"\""]]]], ["rd", [["punctuation", "}"]]]]], + + ["latte", [["ld", [["punctuation", "{"], ["tag", "php"]]], ["php", [["double-quoted-string", ["\"ba\\\"r\""]]]], ["rd", [["punctuation", "}"]]]]], + + ["latte", [["ld", [["punctuation", "{"], ["tag", "php"]]], ["php", [["single-quoted-string", "'ba\\'z'"]]], ["rd", [["punctuation", "}"]]]]], + + ["latte", [["ld", [["punctuation", "{"], ["tag", "php"]]], ["php", [["comment", "/* \" */"]]], ["rd", [["punctuation", "}"]]]]] +] + +---------------------------------------------------- + +Checks for operators. \ No newline at end of file diff --git a/tests/languages/latte/n-attr_feature.test b/tests/languages/latte/n-attr_feature.test new file mode 100644 index 0000000000..678f5a4e87 --- /dev/null +++ b/tests/languages/latte/n-attr_feature.test @@ -0,0 +1,37 @@ +link +link +
          +
          + + +

          Note: You can declare a component as both require and modify

          + +

          Resolving dependencies

          + +

          We consider the dependencies of components an implementation detail, so they may change from release to release. Prism will usually resolve dependencies for you automatically. So you won't have to worry about dependency loading if you download a bundle or use the loadLanguages function in NodeJS, the AutoLoader, or our Babel plugin.

          + +

          If you have to resolve dependencies yourself, use the getLoader function exported by dependencies.js. Example:

          + +
          const getLoader = require('prismjs/dependencies');
          +const components = require('prismjs/components');
          +
          +const componentsToLoad = ['markup', 'css', 'php'];
          +const loadedComponents = ['clike', 'javascript'];
          +
          +const loader = getLoader(components, componentsToLoad, loadedComponents);
          +loader.load(id => {
          +	require(`prismjs/components/prism-${id}.min.js`);
          +});
          + +

          For more details on the getLoader API, check out the inline documentation.

          + +
        + +

        Writing plugins

        @@ -377,6 +494,8 @@

        Returns

        + + From a06aca06a5034111a52dcfdd6987c61b8cd2ff59 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Sun, 5 Jan 2020 20:09:24 +0100 Subject: [PATCH 0413/1100] Adds a check redundant dependency declarations (#2142) This adds a test redundant dependency declarations (e.g. `require` + `optional` for the same component). --- components.js | 2 +- components.json | 1 - tests/dependencies-test.js | 40 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 41 insertions(+), 2 deletions(-) diff --git a/components.js b/components.js index 68b5cc4035..e2ae8ab4f7 100644 --- a/components.js +++ b/components.js @@ -1,2 +1,2 @@ -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default","overrideExampleHeader":true},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"Augmented Backus–Naur form","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","owner":"RunDevelopment"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"Backus–Naur form","alias":"rbnf","aliasTitles":{"rbnf":"Routing Backus–Naur form"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"Extended Backus–Naur form","owner":"RunDevelopment"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment"},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","ruby","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"http":{"title":"HTTP","optional":["css","javascript","json","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":["java"],"optional":["scala"],"owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"json":{"title":"JSON","owner":"CupOfTea696"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":["jsdoc"],"alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"cpp","modify":["c","cpp"],"overrideExampleHeader":true,"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","modify":["actionscript","coffeescript","flow","javascript","typescript","vala"],"owner":"RunDevelopment"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","peerDependencies":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"solidity":{"title":"Solidity (Ethereum)","require":"clike","owner":"glachaud"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"turtle":{"title":"Turtle","alias":["trig"],"aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","visual-basic"],"owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true}}}; +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default","overrideExampleHeader":true},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"Augmented Backus–Naur form","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","owner":"RunDevelopment"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"Backus–Naur form","alias":"rbnf","aliasTitles":{"rbnf":"Routing Backus–Naur form"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"Extended Backus–Naur form","owner":"RunDevelopment"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment"},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"http":{"title":"HTTP","optional":["css","javascript","json","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":["java"],"optional":["scala"],"owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"json":{"title":"JSON","owner":"CupOfTea696"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":["jsdoc"],"alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"cpp","modify":["c","cpp"],"overrideExampleHeader":true,"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","modify":["actionscript","coffeescript","flow","javascript","typescript","vala"],"owner":"RunDevelopment"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","peerDependencies":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"solidity":{"title":"Solidity (Ethereum)","require":"clike","owner":"glachaud"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"turtle":{"title":"Turtle","alias":["trig"],"aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","visual-basic"],"owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true}}}; if (typeof module !== 'undefined' && module.exports) { module.exports = components; } \ No newline at end of file diff --git a/components.json b/components.json index 9f3e2d33a1..bbe1afa97f 100644 --- a/components.json +++ b/components.json @@ -383,7 +383,6 @@ "javascript", "less", "markdown", - "ruby", "scss", "textile" ], diff --git a/tests/dependencies-test.js b/tests/dependencies-test.js index 3f83cc0cc9..375147a12a 100644 --- a/tests/dependencies-test.js +++ b/tests/dependencies-test.js @@ -261,4 +261,44 @@ describe('components.json', function () { } }); + it('- should not have redundant optional dependencies', function () { + /** @type {Object} */ + const entries = {}; + + for (const category in components) { + for (const id in components[category]) { + const entry = components[category][id]; + if (id !== 'meta' && entry && typeof entry === 'object') { + entries[id] = entry; + } + } + } + + function toArray(value) { + if (Array.isArray(value)) { + return value; + } else if (value == undefined) { + return []; + } else { + return [value]; + } + } + + for (const id in entries) { + const entry = entries[id]; + const optional = new Set(toArray(entry.optional)); + + for (const modifyId of toArray(entry.modify)) { + if (optional.has(modifyId)) { + assert.fail(`The component "${id}" has declared "${modifyId}" as both optional and modify.`) + } + } + for (const requireId of toArray(entry.require)) { + if (optional.has(requireId)) { + assert.fail(`The component "${id}" has declared "${requireId}" as both optional and require.`) + } + } + } + }); + }); From 1f3f8929471ed7cb06fac60067e4a708d9cac8cd Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Sun, 5 Jan 2020 20:11:53 +0100 Subject: [PATCH 0414/1100] JS: Added support for keywords after a spread operator (#2148) This PR fixes that keywords after a spread operator weren't highlighted. This is mainly for the `await` and `new` keywords. --- components/prism-javascript.js | 2 +- components/prism-javascript.min.js | 2 +- prism.js | 2 +- .../spread_and_keyword_feature.test | 45 +++++++++++++++++++ 4 files changed, 48 insertions(+), 3 deletions(-) create mode 100644 tests/languages/javascript/spread_and_keyword_feature.test diff --git a/components/prism-javascript.js b/components/prism-javascript.js index 3944090f2d..f50e9e5570 100644 --- a/components/prism-javascript.js +++ b/components/prism-javascript.js @@ -12,7 +12,7 @@ Prism.languages.javascript = Prism.languages.extend('clike', { lookbehind: true }, { - pattern: /(^|[^.])\b(?:as|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/, + pattern: /(^|[^.]|\.\.\.\s*)\b(?:as|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/, lookbehind: true }, ], diff --git a/components/prism-javascript.min.js b/components/prism-javascript.min.js index 5178f04f41..a38f54f91b 100644 --- a/components/prism-javascript.min.js +++ b/components/prism-javascript.min.js @@ -1 +1 @@ -Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])[_$A-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\.(?:prototype|constructor))/,lookbehind:!0}],keyword:[{pattern:/((?:^|})\s*)(?:catch|finally)\b/,lookbehind:!0},{pattern:/(^|[^.])\b(?:as|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],number:/\b(?:(?:0[xX](?:[\dA-Fa-f](?:_[\dA-Fa-f])?)+|0[bB](?:[01](?:_[01])?)+|0[oO](?:[0-7](?:_[0-7])?)+)n?|(?:\d(?:_\d)?)+n|NaN|Infinity)\b|(?:\b(?:\d(?:_\d)?)+\.?(?:\d(?:_\d)?)*|\B\.(?:\d(?:_\d)?)+)(?:[Ee][+-]?(?:\d(?:_\d)?)+)?/,function:/#?[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,operator:/--|\+\+|\*\*=?|=>|&&|\|\||[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?[.?]?|[~:]/}),Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/,Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s])\s*)\/(?:\[(?:[^\]\\\r\n]|\\.)*]|\\.|[^/\\\[\r\n])+\/[gimyus]{0,6}(?=(?:\s|\/\*[\s\S]*?\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/,lookbehind:!0,greedy:!0},"function-variable":{pattern:/#?[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)?\s*\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*=>)/i,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*\s*)\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),Prism.languages.insertBefore("javascript","string",{"template-string":{pattern:/`(?:\\[\s\S]|\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}|(?!\${)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\${|}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}}}),Prism.languages.markup&&Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.js=Prism.languages.javascript; \ No newline at end of file +Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])[_$A-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\.(?:prototype|constructor))/,lookbehind:!0}],keyword:[{pattern:/((?:^|})\s*)(?:catch|finally)\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],number:/\b(?:(?:0[xX](?:[\dA-Fa-f](?:_[\dA-Fa-f])?)+|0[bB](?:[01](?:_[01])?)+|0[oO](?:[0-7](?:_[0-7])?)+)n?|(?:\d(?:_\d)?)+n|NaN|Infinity)\b|(?:\b(?:\d(?:_\d)?)+\.?(?:\d(?:_\d)?)*|\B\.(?:\d(?:_\d)?)+)(?:[Ee][+-]?(?:\d(?:_\d)?)+)?/,function:/#?[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,operator:/--|\+\+|\*\*=?|=>|&&|\|\||[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?[.?]?|[~:]/}),Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/,Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s])\s*)\/(?:\[(?:[^\]\\\r\n]|\\.)*]|\\.|[^/\\\[\r\n])+\/[gimyus]{0,6}(?=(?:\s|\/\*[\s\S]*?\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/,lookbehind:!0,greedy:!0},"function-variable":{pattern:/#?[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)?\s*\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*=>)/i,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*\s*)\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),Prism.languages.insertBefore("javascript","string",{"template-string":{pattern:/`(?:\\[\s\S]|\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}|(?!\${)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\${|}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}}}),Prism.languages.markup&&Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.js=Prism.languages.javascript; \ No newline at end of file diff --git a/prism.js b/prism.js index 41c147cb6e..915c7044eb 100644 --- a/prism.js +++ b/prism.js @@ -852,7 +852,7 @@ Prism.languages.javascript = Prism.languages.extend('clike', { lookbehind: true }, { - pattern: /(^|[^.])\b(?:as|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/, + pattern: /(^|[^.]|\.\.\.\s*)\b(?:as|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/, lookbehind: true }, ], diff --git a/tests/languages/javascript/spread_and_keyword_feature.test b/tests/languages/javascript/spread_and_keyword_feature.test new file mode 100644 index 0000000000..9cf99c4f6a --- /dev/null +++ b/tests/languages/javascript/spread_and_keyword_feature.test @@ -0,0 +1,45 @@ +async function bar() { + return [...await foo()] +} + +console.log([...new Set(numbers)]) + +---------------------------------------------------- + +[ + ["keyword", "async"], + ["keyword", "function"], + ["function", "bar"], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", "{"], + ["keyword", "return"], + ["punctuation", "["], + ["operator", "..."], + ["keyword", "await"], + ["function", "foo"], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", "]"], + ["punctuation", "}"], + + "\r\n\r\nconsole", + ["punctuation", "."], + ["function", "log"], + ["punctuation", "("], + ["punctuation", "["], + ["operator", "..."], + ["keyword", "new"], + ["class-name", [ + "Set" + ]], + ["punctuation", "("], + "numbers", + ["punctuation", ")"], + ["punctuation", "]"], + ["punctuation", ")"] +] + +---------------------------------------------------- + +Checks for the spread operator followed by a keyword. From 1fbac169cd4c2a8ff20b997945acaa8ed77e3f21 Mon Sep 17 00:00:00 2001 From: RunDevelopment Date: Sun, 5 Jan 2020 20:20:00 +0100 Subject: [PATCH 0415/1100] Changelog: Updated v1.18.0 release date --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e0af640e2f..3dc4286a12 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Prism Changelog -## 1.18.0 (TBD) +## 1.18.0 (2020-01-04) ### New components From 191b4116a9b9b264aa306cb5a46603fb1bd68ef8 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Mon, 6 Jan 2020 13:28:17 +0100 Subject: [PATCH 0416/1100] Added silent option to `loadLanguages` (#2147) This adds an option to `loadLanguages` which prevents all warning messages. --- components/index.js | 9 ++++++++- index.html | 2 ++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/components/index.js b/components/index.js index 450810a7a2..b2edcc2abc 100644 --- a/components/index.js +++ b/components/index.js @@ -30,7 +30,9 @@ function loadLanguages(languages) { getLoader(components, languages, loaded).load(lang => { if (!(lang in components.languages)) { - console.warn('Language does not exist: ' + lang); + if (!loadLanguages.silent) { + console.warn('Language does not exist: ' + lang); + } return; } @@ -46,4 +48,9 @@ function loadLanguages(languages) { }); } +/** + * Set this to `true` to prevent all warning messages `loadLanguages` logs. + */ +loadLanguages.silent = false; + module.exports = loadLanguages; diff --git a/index.html b/index.html index f8451860b4..ab2bfd0e57 100644 --- a/index.html +++ b/index.html @@ -226,6 +226,8 @@

        Usage with Node

        Note: Do not use loadLanguages() with Webpack or another bundler, as this will cause Webpack to include all languages and plugins. Use the babel plugin described above.

        +

        Note: loadLanguages() will ignore unknown languages and log warning messages to the console. You can prevent the warnings by setting loadLanguages.silent = true.

        +
        From d7ad48f9dc37423aa5c428b6a57ef80ef4e9037a Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Mon, 6 Jan 2020 13:50:17 +0100 Subject: [PATCH 0417/1100] Markdown: Better language detection for code blocks (#2114) This improves the language detection for code blocks by using only the first word instead of the whole expression and replacing some characters so languages like `c#` and `c++` are supported. --- components/prism-markdown.js | 7 ++++++- components/prism-markdown.min.js | 2 +- .../markdown/code_block_language_detection_feature.js | 11 +++++++++++ 3 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 tests/languages/markdown/code_block_language_detection_feature.js diff --git a/components/prism-markdown.js b/components/prism-markdown.js index 529e1ffdb1..386fd16759 100644 --- a/components/prism-markdown.js +++ b/components/prism-markdown.js @@ -280,7 +280,12 @@ typeof codeLang.content === 'string') { // this might be a language that Prism does not support - var alias = 'language-' + codeLang.content.trim().split(/\s+/)[0].toLowerCase(); + + // do some replacements to support C++, C#, and F# + var lang = codeLang.content.replace(/\b#/g, 'sharp').replace(/\b\+\+/g, 'pp') + // only use the first word + lang = (/[a-z][\w-]*/i.exec(lang) || [''])[0].toLowerCase(); + var alias = 'language-' + lang; // add alias if (!codeBlock.alias) { diff --git a/components/prism-markdown.min.js b/components/prism-markdown.min.js index baa2eaee34..fd30703509 100644 --- a/components/prism-markdown.min.js +++ b/components/prism-markdown.min.js @@ -1 +1 @@ -!function(d){function n(n,e){return n=n.replace(//g,"(?:\\\\.|[^\\\\\\n\r]|(?:\r?\n|\r)(?!\r?\n|\r))"),e&&(n=n+"|"+n.replace(/_/g,"\\*")),RegExp("((?:^|[^\\\\])(?:\\\\{2})*)(?:"+n+")")}var e="(?:\\\\.|``.+?``|`[^`\r\\n]+`|[^\\\\|\r\\n`])+",t="\\|?__(?:\\|__)+\\|?(?:(?:\r?\n|\r)|$)".replace(/__/g,e),a="\\|?[ \t]*:?-{3,}:?[ \t]*(?:\\|[ \t]*:?-{3,}:?[ \t]*)+\\|?(?:\r?\n|\r)";d.languages.markdown=d.languages.extend("markup",{}),d.languages.insertBefore("markdown","prolog",{blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+t+a+"(?:"+t+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+t+a+")(?:"+t+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(e),inside:d.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+t+")"+a+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+t+"$"),inside:{"table-header":{pattern:RegExp(e),alias:"important",inside:d.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/(^[ \t]*(?:\r?\n|\r))(?: {4}|\t).+(?:(?:\r?\n|\r)(?: {4}|\t).+)*/m,lookbehind:!0,alias:"keyword"},{pattern:/``.+?``|`[^`\r\n]+`/,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\r?\n|\r))[\s\S]+?(?=(?:\r?\n|\r)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\r?\n|\r)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#+.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n("__(?:(?!_)|_(?:(?!_))+_)+__",!0),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n("_(?:(?!_)|__(?:(?!_))+__)+_",!0),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n("(~~?)(?:(?!~))+?\\2",!1),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},url:{pattern:n('!?\\[(?:(?!\\]))+\\](?:\\([^\\s)]+(?:[\t ]+"(?:\\\\.|[^"\\\\])*")?\\)| ?\\[(?:(?!\\]))+\\])',!1),lookbehind:!0,greedy:!0,inside:{variable:{pattern:/(\[)[^\]]+(?=\]$)/,lookbehind:!0},content:{pattern:/(^!?\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},string:{pattern:/"(?:\\.|[^"\\])*"(?=\)$)/}}}}),["url","bold","italic","strike"].forEach(function(e){["url","bold","italic","strike"].forEach(function(n){e!==n&&(d.languages.markdown[e].inside.content.inside[n]=d.languages.markdown[n])})}),d.hooks.add("after-tokenize",function(n){"markdown"!==n.language&&"md"!==n.language||!function n(e){if(e&&"string"!=typeof e)for(var t=0,a=e.length;t/g,"(?:\\\\.|[^\\\\\\n\r]|(?:\r?\n|\r)(?!\r?\n|\r))"),e&&(n=n+"|"+n.replace(/_/g,"\\*")),RegExp("((?:^|[^\\\\])(?:\\\\{2})*)(?:"+n+")")}var e="(?:\\\\.|``.+?``|`[^`\r\\n]+`|[^\\\\|\r\\n`])+",t="\\|?__(?:\\|__)+\\|?(?:(?:\r?\n|\r)|$)".replace(/__/g,e),a="\\|?[ \t]*:?-{3,}:?[ \t]*(?:\\|[ \t]*:?-{3,}:?[ \t]*)+\\|?(?:\r?\n|\r)";d.languages.markdown=d.languages.extend("markup",{}),d.languages.insertBefore("markdown","prolog",{blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+t+a+"(?:"+t+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+t+a+")(?:"+t+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(e),inside:d.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+t+")"+a+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+t+"$"),inside:{"table-header":{pattern:RegExp(e),alias:"important",inside:d.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/(^[ \t]*(?:\r?\n|\r))(?: {4}|\t).+(?:(?:\r?\n|\r)(?: {4}|\t).+)*/m,lookbehind:!0,alias:"keyword"},{pattern:/``.+?``|`[^`\r\n]+`/,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\r?\n|\r))[\s\S]+?(?=(?:\r?\n|\r)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\r?\n|\r)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#+.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n("__(?:(?!_)|_(?:(?!_))+_)+__",!0),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n("_(?:(?!_)|__(?:(?!_))+__)+_",!0),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n("(~~?)(?:(?!~))+?\\2",!1),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},url:{pattern:n('!?\\[(?:(?!\\]))+\\](?:\\([^\\s)]+(?:[\t ]+"(?:\\\\.|[^"\\\\])*")?\\)| ?\\[(?:(?!\\]))+\\])',!1),lookbehind:!0,greedy:!0,inside:{variable:{pattern:/(\[)[^\]]+(?=\]$)/,lookbehind:!0},content:{pattern:/(^!?\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},string:{pattern:/"(?:\\.|[^"\\])*"(?=\)$)/}}}}),["url","bold","italic","strike"].forEach(function(e){["url","bold","italic","strike"].forEach(function(n){e!==n&&(d.languages.markdown[e].inside.content.inside[n]=d.languages.markdown[n])})}),d.hooks.add("after-tokenize",function(n){"markdown"!==n.language&&"md"!==n.language||!function n(e){if(e&&"string"!=typeof e)for(var t=0,a=e.length;t```js\nlet a = 0;\n```', + + '``` c++\nint a = 0;\n```': '``` c++\nint a = 0;\n```', + + '``` c#\nvar a = 0;\n```': '``` c#\nvar a = 0;\n```', + + '```{r pressure, echo=FALSE}\nplot(pressure)\n```': '```{r pressure, echo=FALSE}\nplot(pressure)\n```' + +}; From 0c2fe405738619b81c46db6bdc3c6f39b6a9e5c2 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Mon, 6 Jan 2020 14:38:47 +0100 Subject: [PATCH 0418/1100] Custom Class: Fixed examples (#2160) This adds a missing class to an example. --- plugins/custom-class/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/custom-class/index.html b/plugins/custom-class/index.html index ee9d8f6199..1690b80bbf 100644 --- a/plugins/custom-class/index.html +++ b/plugins/custom-class/index.html @@ -133,7 +133,7 @@

        Prefix and map classes

        <span class="pr-token pr-special-keyword">var</span> foo <span class="pr-token pr-operator">=</span> - <span class="pr-my-string">'bar'</span> + <span class="pr-token pr-my-string">'bar'</span> <span class="pr-token pr-punctuation">;</span> </code></pre>
        From 0b539136c3abb715c6b5efedba1955d57267540c Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Mon, 6 Jan 2020 14:39:45 +0100 Subject: [PATCH 0419/1100] Added checks for examples (#2128) This adds a check to `premerge` to detect missing and lone examples. All currently missing examples were added with some exceptions. --- examples/prism-antlr4.html | 75 ++++++++++++++++++++++++++++++++++ examples/prism-cil.html | 49 ++++++++++++++++++++++ examples/prism-css-extras.html | 28 +++++++++++++ examples/prism-js-extras.html | 20 +++++++++ examples/prism-latte.html | 16 ++++++++ examples/prism-lilypond.html | 60 +++++++++++++++++++++++++++ examples/prism-neon.html | 16 ++++++++ examples/prism-php-extras.html | 14 +++++++ examples/prism-tap.html | 7 ++++ gulpfile.js/premerge.js | 48 +++++++++++++++++++++- 10 files changed, 332 insertions(+), 1 deletion(-) create mode 100644 examples/prism-antlr4.html create mode 100644 examples/prism-cil.html create mode 100644 examples/prism-css-extras.html create mode 100644 examples/prism-js-extras.html create mode 100644 examples/prism-latte.html create mode 100644 examples/prism-lilypond.html create mode 100644 examples/prism-neon.html create mode 100644 examples/prism-php-extras.html create mode 100644 examples/prism-tap.html diff --git a/examples/prism-antlr4.html b/examples/prism-antlr4.html new file mode 100644 index 0000000000..2a4753e85d --- /dev/null +++ b/examples/prism-antlr4.html @@ -0,0 +1,75 @@ +

        Full example

        +
        // Source: https://github.com/antlr/grammars-v4/blob/master/json/JSON.g4
        +
        +/** Taken from "The Definitive ANTLR 4 Reference" by Terence Parr */
        +
        +// Derived from http://json.org
        +grammar JSON;
        +
        +json
        +   : value
        +   ;
        +
        +obj
        +   : '{' pair (',' pair)* '}'
        +   | '{' '}'
        +   ;
        +
        +pair
        +   : STRING ':' value
        +   ;
        +
        +array
        +   : '[' value (',' value)* ']'
        +   | '[' ']'
        +   ;
        +
        +value
        +   : STRING
        +   | NUMBER
        +   | obj
        +   | array
        +   | 'true'
        +   | 'false'
        +   | 'null'
        +   ;
        +
        +
        +STRING
        +   : '"' (ESC | SAFECODEPOINT)* '"'
        +   ;
        +
        +
        +fragment ESC
        +   : '\\' (["\\/bfnrt] | UNICODE)
        +   ;
        +fragment UNICODE
        +   : 'u' HEX HEX HEX HEX
        +   ;
        +fragment HEX
        +   : [0-9a-fA-F]
        +   ;
        +fragment SAFECODEPOINT
        +   : ~ ["\\\u0000-\u001F]
        +   ;
        +
        +
        +NUMBER
        +   : '-'? INT ('.' [0-9] +)? EXP?
        +   ;
        +
        +fragment INT
        +   : '0' | [1-9] [0-9]*
        +   ;
        +
        +// no leading zeros
        +
        +fragment EXP
        +   : [Ee] [+\-]? INT
        +   ;
        +
        +// \- since - means "range" inside [...]
        +
        +WS
        +   : [ \t\n\r] + -> skip
        +   ;
        diff --git a/examples/prism-cil.html b/examples/prism-cil.html new file mode 100644 index 0000000000..0d228d363a --- /dev/null +++ b/examples/prism-cil.html @@ -0,0 +1,49 @@ +

        Full example

        +
        // Metadata version: v4.0.30319
        +.assembly extern mscorlib
        +{
        +  .publickeytoken = (B7 7A 5C 56 19 34 E0 89 )                         // .z\V.4..
        +  .ver 4:0:0:0
        +}
        +.assembly i1ohgbkl
        +{
        +  .hash algorithm 0x00008004
        +  .ver 0:0:0:0
        +}
        +.module i1ohgbkl.dll
        +// MVID: {AC981AA1-16FE-413D-BBED-D83AE719F45C}
        +.imagebase 0x10000000
        +.file alignment 0x00000200
        +.stackreserve 0x00100000
        +.subsystem 0x0003       // WINDOWS_CUI
        +.corflags 0x00000001    //  ILONLY
        +// Image base: 0x017C0000
        +​
        +​
        +// =============== CLASS MEMBERS DECLARATION ===================
        +​
        +.class public auto ansi beforefieldinit Program
        +       extends [mscorlib]System.Object
        +{
        +  .method public hidebysig static void  Main() cil managed
        +  {
        +    //
        +    .maxstack  8
        +    IL_0000:  nop
        +    IL_0001:  ldstr      "Hello World"
        +    IL_0006:  call       void [mscorlib]System.Console::WriteLine(string)
        +    IL_000b:  nop
        +    IL_000c:  ret
        +  } // end of method Program::Main
        +​
        +  .method public hidebysig specialname rtspecialname
        +          instance void  .ctor() cil managed
        +  {
        +    //
        +    .maxstack  8
        +    IL_0000:  ldarg.0
        +    IL_0001:  call       instance void [mscorlib]System.Object::.ctor()
        +    IL_0006:  ret
        +  } // end of method Program::.ctor
        +​
        +} // end of class Program
        diff --git a/examples/prism-css-extras.html b/examples/prism-css-extras.html new file mode 100644 index 0000000000..c780d93536 --- /dev/null +++ b/examples/prism-css-extras.html @@ -0,0 +1,28 @@ +

        Selectors

        +
        a#id.class:hover {}
        +li:nth-child(2n+1) {}
        +span::before {}
        +a[title], a[href$=".pdf"] {}, a[href$=".jpg" i] {}
        +
        + +

        Some of added tokens aren't supported by Prism's default themes.

        + +

        Variables

        +
        :root {
        +	--foo: 12px;
        +}
        +a {
        +	font-size: var(--foo);
        +	padding: calc(var(--foo) + .5em);
        +}
        +
        + +

        Colors

        +
        span {
        +	background: rgba(0, 128, 255, .4);
        +	color: red;
        +	color: green;
        +	color: blue;
        +	border: 1px solid #FFF;
        +}
        +
        diff --git a/examples/prism-js-extras.html b/examples/prism-js-extras.html new file mode 100644 index 0000000000..fa3ea9b5a0 --- /dev/null +++ b/examples/prism-js-extras.html @@ -0,0 +1,20 @@ +

        Support built-in JS classes

        +
        Math.sin();
        +Number.isNaN();
        +Object.keys();
        +
        +// and many more
        + +

        DOM variables

        +
        document.querySelectorAll();
        +window.parent;
        +location.href;
        +performance.now();
        +
        +// and many more
        + +

        console

        +
        console.log();
        + +

        Invisible changes

        +

        The goal of JS Extras is to make the tokenization of JavaScript more granular to allow for more customization in your themes. To to do this, JS Extras adds many new tokens and given existing tokens new aliases. These new tokens and aliases can be used by your theme but aren't supported by Prism's default themes and therefore invisible.

        diff --git a/examples/prism-latte.html b/examples/prism-latte.html new file mode 100644 index 0000000000..684a693274 --- /dev/null +++ b/examples/prism-latte.html @@ -0,0 +1,16 @@ +

        Full example

        +
        <!DOCTYPE html>
        +<html>
        +	<head>
        +		<title>{$title|upper}</title>
        +	</head>
        +	<body>
        +		{if count($menu) > 1}
        +			<ul class="menu">
        +				{foreach $menu as $item}
        +				<li><a href="{$item->href}">{$item->caption}</a></li>
        +				{/foreach}
        +			</ul>
        +		{/if}
        +	</body>
        +</html>
        diff --git a/examples/prism-lilypond.html b/examples/prism-lilypond.html new file mode 100644 index 0000000000..d61d94ad2d --- /dev/null +++ b/examples/prism-lilypond.html @@ -0,0 +1,60 @@ +

        Full example

        +
        \version "2.16.0"
        +\include "example-header.ily"
        +
        +#(ly:set-option 'point-and-click #f)
        +#(set-global-staff-size 24)
        +
        +global = {
        +    \time 4/4
        +    \numericTimeSignature
        +    \key c \major
        +}
        +
        +cf = \relative c {
        +  \clef bass
        +  \global
        +  c4 c' b a |
        +  g a f d |
        +  e f g g, |
        +  c1
        +}
        +
        +upper = \relative c'' {
        +  \global
        +  r4 s4 s2 |
        +  s1*2 |
        +  s2 s4 s
        +  \bar "||"
        +}
        +
        +bassFigures = \figuremode {
        +  s1*2 | s4 <6> <6 4> <7> | s1
        +}
        +
        +\markup { "Exercise 3: Write 8th notes against the given bass line." }
        +
        +\score {
        +  \new PianoStaff <<
        +    \new Staff {
        +      \context Voice = "added voice" \with {
        +        \consists "Balloon_engraver"
        +      }
        +      \upper
        +    }
        +
        +    \new Staff = lower {
        +      <<
        +%      \context Voice = "cantus firmus" \with {
        +%        \consists "Balloon_engraver"
        +%      }
        +        \context Staff = lower \cf
        +        \new FiguredBass \bassFigures
        +      >>
        +    }
        +  >>
        +  \layout {}
        +  %{\midi {
        +    \tempo 4 = 120
        +  }%}
        +}
        diff --git a/examples/prism-neon.html b/examples/prism-neon.html new file mode 100644 index 0000000000..831697abfe --- /dev/null +++ b/examples/prism-neon.html @@ -0,0 +1,16 @@ +

        Full example

        +
        # my web application config
        +
        +php:
        +	date.timezone: Europe/Prague
        +	zlib.output_compression: true  # use gzip
        +
        +database:
        +	driver: mysql
        +	username: root
        +	password: beruska92
        +
        +users:
        +	- Dave
        +	- Kryten
        +	- Rimmer
        diff --git a/examples/prism-php-extras.html b/examples/prism-php-extras.html new file mode 100644 index 0000000000..cfe1214e32 --- /dev/null +++ b/examples/prism-php-extras.html @@ -0,0 +1,14 @@ +

        General

        +

        This adds new tokens to the PHP language to allow more customization in your theme.

        +

        Prism's default themes do not support the new tokens, so there will be no visible changes in the following examples.

        + +

        $this

        +
        $this->foo = 2;
        + +

        Global variables

        +
        $_SERVER;
        +$_GET;
        +$_POST;
        +$argc; $argv;
        +
        +// and many more
        diff --git a/examples/prism-tap.html b/examples/prism-tap.html new file mode 100644 index 0000000000..4ed15fa754 --- /dev/null +++ b/examples/prism-tap.html @@ -0,0 +1,7 @@ +

        Full example

        +
        1..48
        +ok 1 Description # Directive
        +# Diagnostic
        +....
        +ok 47 Description
        +ok 48 Description
        diff --git a/gulpfile.js/premerge.js b/gulpfile.js/premerge.js index a78c21b691..d674b2c5b2 100644 --- a/gulpfile.js/premerge.js +++ b/gulpfile.js/premerge.js @@ -1,8 +1,15 @@ "use strict"; +const { parallel } = require('gulp'); +const fs = require('fs'); const git = require('simple-git/promise')(__dirname); +// use the JSON file because this file is less susceptible to merge conflicts +const { languages } = require('../components.json'); +/** + * Checks that no files have been modified by the build process. + */ function gitChanges() { return git.status().then(res => { if (res.files.length > 0) { @@ -12,7 +19,46 @@ function gitChanges() { }); } +/** + * Checks that all languages have and example. + */ +async function hasExample() { + const exampleFiles = new Set(fs.readdirSync(__dirname + '/../examples')); + const ignore = new Set([ + // these are libraries and not languages + 'markup-templating', + 't4-templating', + // this does alter some languages but it's mainly a library + 'javadoclike', + // Regex doesn't have any classes supported by our themes and mainly extends other languages + 'regex' + ]); + + /** @type {string[]} */ + const missing = []; + for (const lang in languages) { + if (lang === 'meta') { + continue; + } + + if (!exampleFiles.delete(`prism-${lang}.html`)) { + if (!ignore.has(lang)) { + missing.push(lang); + } + } + } + + const errors = missing.map(id => `Missing example for ${id}.`); + for (const file of exampleFiles) { + errors.push(`The examples file "${file}" has no language associated with it.`); + } + + if (errors.length) { + throw new Error(errors.join('\n')); + } +} + module.exports = { - premerge: gitChanges + premerge: parallel(gitChanges, hasExample) }; From 867804573562ef0ac5acf470420b97e43488ccde Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Mon, 6 Jan 2020 20:09:40 +0100 Subject: [PATCH 0420/1100] Added missing `.token` selector (#2161) This fixes lone `.namespace` rules without the .token component selector some themes had. --- themes/prism-coy.css | 2 +- themes/prism-dark.css | 2 +- themes/prism-funky.css | 2 +- themes/prism-okaidia.css | 2 +- themes/prism-solarizedlight.css | 2 +- themes/prism-twilight.css | 2 +- themes/prism.css | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/themes/prism-coy.css b/themes/prism-coy.css index 5118dca158..2d873dced9 100644 --- a/themes/prism-coy.css +++ b/themes/prism-coy.css @@ -178,7 +178,7 @@ pre[class*="language-"]:after { cursor: help; } -.namespace { +.token.namespace { opacity: .7; } diff --git a/themes/prism-dark.css b/themes/prism-dark.css index 73387bfb11..ea98cd103e 100644 --- a/themes/prism-dark.css +++ b/themes/prism-dark.css @@ -70,7 +70,7 @@ pre[class*="language-"] { opacity: .7; } -.namespace { +.token.namespace { opacity: .7; } diff --git a/themes/prism-funky.css b/themes/prism-funky.css index d30d91255c..21a89410fc 100644 --- a/themes/prism-funky.css +++ b/themes/prism-funky.css @@ -59,7 +59,7 @@ code[class*="language-"] { color: #999; } -.namespace { +.token.namespace { opacity: .7; } diff --git a/themes/prism-okaidia.css b/themes/prism-okaidia.css index 767417b5dd..fcb5fc4e4b 100644 --- a/themes/prism-okaidia.css +++ b/themes/prism-okaidia.css @@ -59,7 +59,7 @@ pre[class*="language-"] { color: #f8f8f2; } -.namespace { +.token.namespace { opacity: .7; } diff --git a/themes/prism-solarizedlight.css b/themes/prism-solarizedlight.css index 6c4715ef28..65e4a65860 100644 --- a/themes/prism-solarizedlight.css +++ b/themes/prism-solarizedlight.css @@ -91,7 +91,7 @@ pre[class*="language-"] { color: #586e75; /* base01 */ } -.namespace { +.token.namespace { opacity: .7; } diff --git a/themes/prism-twilight.css b/themes/prism-twilight.css index 662df42e73..941d6d7f4d 100644 --- a/themes/prism-twilight.css +++ b/themes/prism-twilight.css @@ -85,7 +85,7 @@ code[class*="language-"]::selection, code[class*="language-"] ::selection { opacity: .7; } -.namespace { +.token.namespace { opacity: .7; } diff --git a/themes/prism.css b/themes/prism.css index ec469f01f3..618a4121e1 100644 --- a/themes/prism.css +++ b/themes/prism.css @@ -77,7 +77,7 @@ pre[class*="language-"] { color: #999; } -.namespace { +.token.namespace { opacity: .7; } From fd857e7bb44afffc163a200ae3384ca5b460ca38 Mon Sep 17 00:00:00 2001 From: 0xc14m1z <0xc14m1z@gmail.com> Date: Mon, 6 Jan 2020 19:12:49 +0000 Subject: [PATCH 0421/1100] JSX: Improved spread operator in tag attributes (#2159) This allows any number of spaces around JSX attribute spread expressions. --- components/prism-jsx.js | 4 +- components/prism-jsx.min.js | 2 +- tests/languages/jsx/spread_in_tags.test | 72 +++++++++++++++++++++++++ 3 files changed, 75 insertions(+), 3 deletions(-) create mode 100644 tests/languages/jsx/spread_in_tags.test diff --git a/components/prism-jsx.js b/components/prism-jsx.js index e3d29c5d2b..b8307f539d 100644 --- a/components/prism-jsx.js +++ b/components/prism-jsx.js @@ -3,7 +3,7 @@ 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.:$-]+(?:=(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s{'">=]+|\{(?:\{(?:\{[^}]*\}|[^{}])*\}|[^{}])+\}))?|\{\.{3}[a-z_$][\w$]*(?:\.[a-z_$][\w$]*)*\}))*\s*\/?)?>/i; +Prism.languages.jsx.tag.pattern= /<\/?(?:[\w.:-]+\s*(?:\s+(?:[\w.:$-]+(?:=(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s{'">=]+|\{(?:\{(?:\{[^}]*\}|[^{}])*\}|[^{}])+\}))?|\{\s*\.{3}\s*[a-z_$][\w$]*(?:\.[a-z_$][\w$]*)*\s*\}))*\s*\/?)?>/i; Prism.languages.jsx.tag.inside['tag'].pattern = /^<\/?[^\s>\/]*/i; Prism.languages.jsx.tag.inside['attr-value'].pattern = /=(?!\{)(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s'">]+)/i; @@ -11,7 +11,7 @@ Prism.languages.jsx.tag.inside['tag'].inside['class-name'] = /^[A-Z]\w*(?:\.[A-Z Prism.languages.insertBefore('inside', 'attr-name', { 'spread': { - pattern: /\{\.{3}[a-z_$][\w$]*(?:\.[a-z_$][\w$]*)*\}/, + pattern: /\{\s*\.{3}\s*[a-z_$][\w$]*(?:\.[a-z_$][\w$]*)*\s*\}/, inside: { 'punctuation': /\.{3}|[{}.]/, 'attr-value': /\w+/ diff --git a/components/prism-jsx.min.js b/components/prism-jsx.min.js index 16b20038ab..39aa611d66 100644 --- a/components/prism-jsx.min.js +++ b/components/prism-jsx.min.js @@ -1 +1 @@ -!function(i){var t=i.util.clone(i.languages.javascript);i.languages.jsx=i.languages.extend("markup",t),i.languages.jsx.tag.pattern=/<\/?(?:[\w.:-]+\s*(?:\s+(?:[\w.:$-]+(?:=(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s{'">=]+|\{(?:\{(?:\{[^}]*\}|[^{}])*\}|[^{}])+\}))?|\{\.{3}[a-z_$][\w$]*(?:\.[a-z_$][\w$]*)*\}))*\s*\/?)?>/i,i.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/i,i.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s'">]+)/i,i.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,i.languages.insertBefore("inside","attr-name",{spread:{pattern:/\{\.{3}[a-z_$][\w$]*(?:\.[a-z_$][\w$]*)*\}/,inside:{punctuation:/\.{3}|[{}.]/,"attr-value":/\w+/}}},i.languages.jsx.tag),i.languages.insertBefore("inside","attr-value",{script:{pattern:/=(?:\{(?:\{(?:\{[^}]*\}|[^}])*\}|[^}])+\})/i,inside:{"script-punctuation":{pattern:/^=(?={)/,alias:"punctuation"},rest:i.languages.jsx},alias:"language-javascript"}},i.languages.jsx.tag);var o=function(t){return t?"string"==typeof t?t:"string"==typeof t.content?t.content:t.content.map(o).join(""):""},p=function(t){for(var n=[],e=0;e"===a.content[a.content.length-1].content||n.push({tagName:o(a.content[0].content[1]),openedBraces:0}):0=]+|\{(?:\{(?:\{[^}]*\}|[^{}])*\}|[^{}])+\}))?|\{\s*\.{3}\s*[a-z_$][\w$]*(?:\.[a-z_$][\w$]*)*\s*\}))*\s*\/?)?>/i,i.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/i,i.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s'">]+)/i,i.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,i.languages.insertBefore("inside","attr-name",{spread:{pattern:/\{\s*\.{3}\s*[a-z_$][\w$]*(?:\.[a-z_$][\w$]*)*\s*\}/,inside:{punctuation:/\.{3}|[{}.]/,"attr-value":/\w+/}}},i.languages.jsx.tag),i.languages.insertBefore("inside","attr-value",{script:{pattern:/=(?:\{(?:\{(?:\{[^}]*\}|[^}])*\}|[^}])+\})/i,inside:{"script-punctuation":{pattern:/^=(?={)/,alias:"punctuation"},rest:i.languages.jsx},alias:"language-javascript"}},i.languages.jsx.tag);var o=function(t){return t?"string"==typeof t?t:"string"==typeof t.content?t.content:t.content.map(o).join(""):""},p=function(t){for(var n=[],e=0;e"===a.content[a.content.length-1].content||n.push({tagName:o(a.content[0].content[1]),openedBraces:0}):0
        +
        +
        + +---------------------------------------------------- + +[ + ["tag", [ + ["tag", [ + ["punctuation", "<"], + "div" + ]], + ["spread", [ + ["punctuation", "{"], + ["punctuation", "..."], + ["attr-value", "foo"], + ["punctuation", "}"] + ]], + ["punctuation", ">"] + ]], + ["tag", [ + ["tag", [ + ["punctuation", ""] + ]], + ["tag", [ + ["tag", [ + ["punctuation", "<"], + "div" + ]], + ["spread", [ + ["punctuation", "{"], + ["punctuation", "..."], + ["attr-value", "foo"], + ["punctuation", "}"] + ]], + ["punctuation", ">"] + ]], + ["tag", [ + ["tag", [ + ["punctuation", ""] + ]], + ["tag", [ + ["tag", [ + ["punctuation", "<"], + "div" + ]], + ["spread", [ + ["punctuation", "{"], + ["punctuation", "..."], + ["attr-value", "foo"], + ["punctuation", "}"] + ]], + ["punctuation", ">"] + ]], + ["tag", [ + ["tag", [ + ["punctuation", ""] + ]] +] + +---------------------------------------------------- + +Allow spaces in spread operator brackets in JSX tags. From 99d979a04610ecd023e0f8ce84ae0c97e085e438 Mon Sep 17 00:00:00 2001 From: cedporter Date: Tue, 7 Jan 2020 09:10:22 -0500 Subject: [PATCH 0422/1100] SAS: Added CASL support (#2112) This adds CASL support, a scripting language used within PROC CAS in SAS. https://go.documentation.sas.com/?cdcId=pgmsascdc&cdcVersion=9.4_3.4&docsetId=pgmdiff&docsetTarget=p06ibhzb2bklaon1a86ili3wpil9.htm&locale=en --- components/prism-sas.js | 136 +++++++++++++++++----- components/prism-sas.min.js | 2 +- tests/languages/sas/keyword_feature.test | 4 +- tests/languages/sas/proccas_feature.test | 141 +++++++++++++++++++++++ 4 files changed, 249 insertions(+), 34 deletions(-) create mode 100644 tests/languages/sas/proccas_feature.test diff --git a/components/prism-sas.js b/components/prism-sas.js index a3a48442ba..80ae9ed66a 100644 --- a/components/prism-sas.js +++ b/components/prism-sas.js @@ -29,12 +29,22 @@ var punctuation = /[$%@.(){}\[\];,\\]/; + var func = { + pattern: /%?\w+(?=\()/, + alias: 'keyword' + }; + var args = { + 'function' : func, 'arg-value': { - pattern: /(=)[A-Z]+/i, + pattern: /(\s*=\s*)[A-Z\.]+/i, lookbehind: true }, 'operator': /=/, + 'macro-variable': { + pattern: /&[^\.]*\./i, + alias: 'string' + }, 'arg': { pattern: /[A-Z]+/i, alias: 'keyword' @@ -45,6 +55,29 @@ 'string': string }; + var format = { + pattern: /\b(?:format|put)\b=?[\w'$.]+/im, + inside: { + 'keyword': /^(?:format|put)(?=\=)/i, + 'equals': /=/, + 'format': { + pattern: /(?:\w|\$\d)+\.\d?/i, + alias: 'number' + } + } + }; + + var altformat = { + pattern: /\b(?:format|put)\s+[\w']+(?:\s+[$.\w]+)+(?=;)/i, + inside: { + 'keyword': /^(?:format|put)/i, + 'format': { + pattern: /[\w$]+\.\d?/, + alias: 'number' + } + } + }; + var globalStatements = { pattern: /((?:^|[\s])=?)(?:catname|checkpoint execute_always|dm|endsas|filename|footnote|%include|libname|%list|lock|missing|options|page|resetline|%run|sasfile|skip|sysecho|title\d?)\b/i, lookbehind: true, @@ -57,6 +90,34 @@ alias: 'keyword' }; + var actionSets = 'accessControl|cdm|aggregation|aStore|ruleMining|audio|autotune|bayesianNetClassifier|bioMedImage|boolRule|builtins|cardinality|sccasl|clustering|copula|countreg|dataDiscovery|dataPreprocess|dataSciencePilot|dataStep|decisionTree|deepLearn|deepNeural|varReduce|simSystem|ds2|deduplication|ecm|entityRes|espCluster|explainModel|factmac|fastKnn|fcmpact|fedSql|freqTab|gam|gleam|graphSemiSupLearn|gVarCluster|hiddenMarkovModel|hyperGroup|image|iml|ica|kernalPca|langModel|ldaTopic|sparseML|mlTools|mixed|modelPublishing|mbc|network|optNetwork|neuralNet|nonlinear|nmf|nonParametricBayes|optimization|panel|pls|percentile|pca|phreg|qkb|qlim|quantreg|recommend|tsReconcile|deepRnn|regression|reinforcementLearn|robustPca|sampling|sparkEmbeddedProcess|search(?:Analytics)?|sentimentAnalysis|sequence|configuration|session(?:Prop)?|severity|simple|smartData|sandwich|spatialreg|stabilityMonitoring|spc|loadStreams|svDataDescription|svm|table|conditionalRandomFields|text(?:Rule(?:Develop|Score)|Mining|Parse|Topic|Util|Filters|Frequency)|tsInfo|timeData|transpose|uniTimeSeries'; + + var casActions = { + pattern: RegExp('(^|\\s)(?:action\\s+)?(?:)\\.[a-z]+\\b[^;]+'.replace(//g, actionSets), 'i'), + lookbehind: true, + inside: { + 'keyword': RegExp('(?:)\\.[a-z]+\\b'.replace(//g, actionSets), 'i'), + 'action': { + pattern: /(?:action)/i, + alias: 'keyword' + }, + 'function': func, + 'arg-value': args['arg-value'], + 'operator': args.operator, + 'comment': comment, + 'argument': args.arg, + 'number': number, + 'numeric-constant': numericConstant, + 'punctuation': punctuation, + 'string': string + } + }; + + var keywords = { + pattern: /((?:^|\s)=?)(?:after|analysis|and|array|barchart|barwidth|begingraph|by|call|cas|cbarline|cfill|class(?:lev)?|close|column|computed?|contains|continue|data(?=\=)|define|delete|describe|document|do\s+over|do|dol|drop|dul|end(?:source|comp)?|entryTitle|else|eval(?:uate)?|exec(?:ute)?|exit|fill(?:attrs)?|file(?:name)?|flist|fnc|function(?:list)?|goto|global|group(?:by)?|headline|headskip|histogram|if|infile|keep|keylabel|keyword|label|layout|leave|legendlabel|length|libname|loadactionset|merge|midpoints|name|noobs|nowd|_?null_|ods|options|or|otherwise|out(?:put)?|over(?:lay)?|plot|put|print|raise|ranexp|rannor|rbreak|retain|return|select|set|session|sessref|source|statgraph|sum|summarize|table|temp|terminate|then\s+do|then|title\d?|to|var|when|where|xaxisopts|yaxisopts|y2axisopts)\b/i, + lookbehind: true, + }; + Prism.languages.sas = { 'datalines': { pattern: /^(\s*)(?:(?:data)?lines|cards);[\s\S]+?^\s*;/im, @@ -130,6 +191,43 @@ } }, + 'proc-cas': { + pattern: /(^proc\s+cas(?:\s+[\w|=]+)?;)[\s\S]+?(?=^(?:proc\s+\w+|quit|data);|(?![\s\S]))/im, + lookbehind: true, + inside: { + 'statement-var': { + pattern: /((?:^|\s)=?)saveresult\s+[^;]+/im, + lookbehind: true, + inside: { + 'statement': { + pattern: /^saveresult\s+\S+/i, + inside: { + keyword: /^(?:saveresult)/i + } + }, + rest: args + } + }, + 'cas-actions': casActions, + 'statement': { + pattern: /((?:^|\s)=?)(?:default|(?:un)?set|on|output|upload)[^;]+/im, + lookbehind: true, + inside: args + }, + 'step': step, + 'keyword': keywords, + 'function': func, + 'comment': comment, + 'format': format, + 'altformat': altformat, + 'global-statements': globalStatements, + 'number': number, + 'numeric-constant': numericConstant, + 'punctuation': punctuation, + 'string': string + } + }, + 'proc-args': { pattern: RegExp(/(^proc\s+\w+\s+)(?!\s)(?:[^;"']|)+;/.source.replace(//g, stringPattern), 'im'), lookbehind: true, @@ -176,33 +274,12 @@ lookbehind: true, inside: args }, - 'function': { - pattern: /%?\w+(?=\()/, - alias: 'keyword' - }, - 'format': { - pattern: /\b(?:format|put)\b=?[\w'$.]+/im, - inside: { - 'keyword': /^(?:format|put)(?=\=)/i, - 'equals': /=/, - 'format': { - pattern: /(?:\w|\$\d)+\.\d?/i, - alias: 'number' - } - } - }, - 'altformat': { - pattern: /\b(?:format|put)\s+[\w']+(?:\s+[$.\w]+)+(?=;)/i, - inside: { - 'keyword': /^(?:format|put)/i, - 'format': { - pattern: /[\w$]+\.\d?/, - alias: 'number' - } - } - }, - 'numeric-constant': numericConstant, + 'cas-actions': casActions, 'comment': comment, + 'function': func, + 'format': format, + 'altformat': altformat, + 'numeric-constant': numericConstant, 'datetime': { // '1jan2013'd, '9:25:19pm't, '18jan2003:9:27:05am'dt pattern: RegExp(stringPattern + '(?:dt?|t)'), @@ -210,10 +287,7 @@ }, 'string': string, 'step': step, - 'keyword': { - pattern: /((?:^|\s)=?)(?:action|after|analysis|and|array|barchart|barwidth|begingraph|by|cas|cbarline|cfill|class(?:lev)?|close|column|computed?|contains|data(?=\=)|define|document|do\s+over|do|dol|drop|dul|end|entryTitle|else|endcomp|eval(?:uate)?|exec(?:ute)?|fill(?:attrs)?|filename|group(?:by)?|headline|headskip|histogram|if|infile|keep|keylabel|keyword|label|layout|legendlabel|length|libname|merge|midpoints|name|noobs|nowd|ods|options|or|out(?:put)?|overlay|plot|ranexp|rannor|rbreak|retain|set|session|sessref|statgraph|sum|summarize|table|temp|then\s+do|then|title\d?|to|var|where|xaxisopts|yaxisopts|y2axisopts)\b/i, - lookbehind: true, - }, + 'keyword': keywords, // In SAS Studio syntax highlighting, these operators are styled like keywords 'operator-keyword': { pattern: /\b(?:eq|ne|gt|lt|ge|le|in|not)\b/i, diff --git a/components/prism-sas.min.js b/components/prism-sas.min.js index 91ee6c00ce..bab73d6e50 100644 --- a/components/prism-sas.min.js +++ b/components/prism-sas.min.js @@ -1 +1 @@ -!function(e){var t="(?:\"(?:\"\"|[^\"])*\"(?!\")|'(?:''|[^'])*'(?!'))",a=/\b(?:\d[\da-f]*x|\d+(?:\.\d+)?(?:e[+-]?\d+)?)\b/i,n={pattern:RegExp(t+"[bx]"),alias:"number"},s=[/\/\*[\s\S]*?\*\//,{pattern:/(^\s*|;\s*)\*[^;]*;/m,lookbehind:!0}],i={pattern:RegExp(t),greedy:!0},r=/[$%@.(){}\[\];,\\]/,o={"arg-value":{pattern:/(=)[A-Z]+/i,lookbehind:!0},operator:/=/,arg:{pattern:/[A-Z]+/i,alias:"keyword"},number:a,"numeric-constant":n,punctuation:r,string:i},l={pattern:/((?:^|[\s])=?)(?:catname|checkpoint execute_always|dm|endsas|filename|footnote|%include|libname|%list|lock|missing|options|page|resetline|%run|sasfile|skip|sysecho|title\d?)\b/i,lookbehind:!0,alias:"keyword"},d={pattern:/(^|\s)(?:submit(?:\s+(?:load|parseonly|norun))?|endsubmit)\b/i,lookbehind:!0,alias:"keyword"};e.languages.sas={datalines:{pattern:/^(\s*)(?:(?:data)?lines|cards);[\s\S]+?^\s*;/im,lookbehind:!0,alias:"string",inside:{keyword:{pattern:/^(?:(?:data)?lines|cards)/i},punctuation:/;/}},"proc-sql":{pattern:/(^proc\s+(?:fed)?sql(?:\s+[\w|=]+)?;)[\s\S]+?(?=^(?:proc\s+\w+|quit|run|data);|(?![\s\S]))/im,lookbehind:!0,inside:{sql:{pattern:RegExp("^[ \t]*(?:select|alter\\s+table|(?:create|describe|drop)\\s+(?:index|table(?:\\s+constraints)?|view)|create\\s+unique\\s+index|insert\\s+into|update)(?:|[^;\"'])+;".replace(//g,t),"im"),alias:"language-sql",inside:e.languages.sql},"global-statements":l,"sql-statements":{pattern:/(^|\s)(?:disconnect\s+from|exec(?:ute)?|begin|commit|rollback|reset|validate)\b/i,lookbehind:!0,alias:"keyword"},number:a,"numeric-constant":n,punctuation:r,string:i}},"proc-groovy":{pattern:/(^proc\s+groovy(?:\s+[\w|=]+)?;)(?:\s*submit)[\s\S]+?(?=^(?:proc\s+\w+|quit|run|data);|(?![\s\S]))/im,lookbehind:!0,inside:{groovy:{pattern:RegExp("(^[ \t]*submit(?:\\s+(?:load|parseonly|norun))?)(?:|[^\"'])+?(?=endsubmit;)".replace(//g,t),"im"),lookbehind:!0,alias:"language-groovy",inside:e.languages.groovy},"submit-statement":d,"global-statements":l,number:a,"numeric-constant":n,punctuation:r,string:i}},"proc-lua":{pattern:/(^proc\s+lua(?:\s+[\w|=]+)?;)(?:\s*submit)[\s\S]+?(?=^(?:proc\s+\w+|quit|run|data);|(?![\s\S]))/im,lookbehind:!0,inside:{lua:{pattern:RegExp("(^[ \t]*submit(?:\\s+(?:load|parseonly|norun))?)(?:|[^\"'])+?(?=endsubmit;)".replace(//g,t),"im"),lookbehind:!0,alias:"language-lua",inside:e.languages.lua},"submit-statement":d,"global-statements":l,number:a,"numeric-constant":n,punctuation:r,string:i}},"proc-args":{pattern:RegExp("(^proc\\s+\\w+\\s+)(?!\\s)(?:[^;\"']|)+;".replace(//g,t),"im"),lookbehind:!0,inside:o},"macro-keyword":{pattern:/((?:^|\s)=?)%(?:ABORT|BQUOTE|BY|CMS|COPY|DISPLAY|DO|ELSE|END|EVAL|GLOBAL|GO|GOTO|IF|INC|INCLUDE|INDEX|INPUT|KTRIM|LENGTH|LET|LIST|LOCAL|NRBQUOTE|NRQUOTE|NRSTR|PUT|QKTRIM|QSCAN|QSUBSTR|QSYSFUNC|QUOTE|QUPCASE|RETURN|RUN|SCAN|STR|SUBSTR|SUPERQ|SYMDEL|SYMGLOBL|SYMLOCAL|SYMEXIST|SYSCALL|SYSEVALF|SYSEXEC|SYSFUNC|SYSGET|SYSRPUT|THEN|TO|TSO|UNQUOTE|UNTIL|UPCASE|WHILE|WINDOW)\b/i,lookbehind:!0,alias:"keyword"},"macro-declaration":{pattern:/^%macro[^;]+(?=;)/im,inside:{keyword:/%macro/i}},"macro-end":{pattern:/^%mend[^;]+(?=;)/im,inside:{keyword:/%mend/i}},macro:{pattern:/%_\w+(?=\()/,alias:"keyword"},input:{pattern:/\binput\s+[-\w\s/*.$&]+;/i,inside:{input:{alias:"keyword",pattern:/^input/i},comment:s,number:a,"numeric-constant":n}},"options-args":{pattern:/(^options)[-'"|/\\<>*+=:()\w\s]*(?=;)/im,lookbehind:!0,inside:o},function:{pattern:/%?\w+(?=\()/,alias:"keyword"},format:{pattern:/\b(?:format|put)\b=?[\w'$.]+/im,inside:{keyword:/^(?:format|put)(?=\=)/i,equals:/=/,format:{pattern:/(?:\w|\$\d)+\.\d?/i,alias:"number"}}},altformat:{pattern:/\b(?:format|put)\s+[\w']+(?:\s+[$.\w]+)+(?=;)/i,inside:{keyword:/^(?:format|put)/i,format:{pattern:/[\w$]+\.\d?/,alias:"number"}}},"numeric-constant":n,comment:s,datetime:{pattern:RegExp(t+"(?:dt?|t)"),alias:"number"},string:i,step:{pattern:/(^|\s+)(?:proc\s+\w+|quit|run|data(?!\=))\b/i,alias:"keyword",lookbehind:!0},keyword:{pattern:/((?:^|\s)=?)(?:action|after|analysis|and|array|barchart|barwidth|begingraph|by|cas|cbarline|cfill|class(?:lev)?|close|column|computed?|contains|data(?=\=)|define|document|do\s+over|do|dol|drop|dul|end|entryTitle|else|endcomp|eval(?:uate)?|exec(?:ute)?|fill(?:attrs)?|filename|group(?:by)?|headline|headskip|histogram|if|infile|keep|keylabel|keyword|label|layout|legendlabel|length|libname|merge|midpoints|name|noobs|nowd|ods|options|or|out(?:put)?|overlay|plot|ranexp|rannor|rbreak|retain|set|session|sessref|statgraph|sum|summarize|table|temp|then\s+do|then|title\d?|to|var|where|xaxisopts|yaxisopts|y2axisopts)\b/i,lookbehind:!0},"operator-keyword":{pattern:/\b(?:eq|ne|gt|lt|ge|le|in|not)\b/i,alias:"operator"},number:a,operator:/\*\*?|\|\|?|!!?|¦¦?|<[>=]?|>[<=]?|[-+\/=&]|[~¬^]=?/i,punctuation:r}}(Prism); \ No newline at end of file +!function(e){var t="(?:\"(?:\"\"|[^\"])*\"(?!\")|'(?:''|[^'])*'(?!'))",a=/\b(?:\d[\da-f]*x|\d+(?:\.\d+)?(?:e[+-]?\d+)?)\b/i,n={pattern:RegExp(t+"[bx]"),alias:"number"},i={pattern:/(^|\s+)(?:proc\s+\w+|quit|run|data(?!\=))\b/i,alias:"keyword",lookbehind:!0},s=[/\/\*[\s\S]*?\*\//,{pattern:/(^\s*|;\s*)\*[^;]*;/m,lookbehind:!0}],r={pattern:RegExp(t),greedy:!0},o=/[$%@.(){}\[\];,\\]/,l={pattern:/%?\w+(?=\()/,alias:"keyword"},d={function:l,"arg-value":{pattern:/(\s*=\s*)[A-Z\.]+/i,lookbehind:!0},operator:/=/,"macro-variable":{pattern:/&[^\.]*\./i,alias:"string"},arg:{pattern:/[A-Z]+/i,alias:"keyword"},number:a,"numeric-constant":n,punctuation:o,string:r},c={pattern:/\b(?:format|put)\b=?[\w'$.]+/im,inside:{keyword:/^(?:format|put)(?=\=)/i,equals:/=/,format:{pattern:/(?:\w|\$\d)+\.\d?/i,alias:"number"}}},p={pattern:/\b(?:format|put)\s+[\w']+(?:\s+[$.\w]+)+(?=;)/i,inside:{keyword:/^(?:format|put)/i,format:{pattern:/[\w$]+\.\d?/,alias:"number"}}},u={pattern:/((?:^|[\s])=?)(?:catname|checkpoint execute_always|dm|endsas|filename|footnote|%include|libname|%list|lock|missing|options|page|resetline|%run|sasfile|skip|sysecho|title\d?)\b/i,lookbehind:!0,alias:"keyword"},m={pattern:/(^|\s)(?:submit(?:\s+(?:load|parseonly|norun))?|endsubmit)\b/i,lookbehind:!0,alias:"keyword"},b="accessControl|cdm|aggregation|aStore|ruleMining|audio|autotune|bayesianNetClassifier|bioMedImage|boolRule|builtins|cardinality|sccasl|clustering|copula|countreg|dataDiscovery|dataPreprocess|dataSciencePilot|dataStep|decisionTree|deepLearn|deepNeural|varReduce|simSystem|ds2|deduplication|ecm|entityRes|espCluster|explainModel|factmac|fastKnn|fcmpact|fedSql|freqTab|gam|gleam|graphSemiSupLearn|gVarCluster|hiddenMarkovModel|hyperGroup|image|iml|ica|kernalPca|langModel|ldaTopic|sparseML|mlTools|mixed|modelPublishing|mbc|network|optNetwork|neuralNet|nonlinear|nmf|nonParametricBayes|optimization|panel|pls|percentile|pca|phreg|qkb|qlim|quantreg|recommend|tsReconcile|deepRnn|regression|reinforcementLearn|robustPca|sampling|sparkEmbeddedProcess|search(?:Analytics)?|sentimentAnalysis|sequence|configuration|session(?:Prop)?|severity|simple|smartData|sandwich|spatialreg|stabilityMonitoring|spc|loadStreams|svDataDescription|svm|table|conditionalRandomFields|text(?:Rule(?:Develop|Score)|Mining|Parse|Topic|Util|Filters|Frequency)|tsInfo|timeData|transpose|uniTimeSeries",g={pattern:RegExp("(^|\\s)(?:action\\s+)?(?:)\\.[a-z]+\\b[^;]+".replace(//g,b),"i"),lookbehind:!0,inside:{keyword:RegExp("(?:)\\.[a-z]+\\b".replace(//g,b),"i"),action:{pattern:/(?:action)/i,alias:"keyword"},function:l,"arg-value":d["arg-value"],operator:d.operator,comment:s,argument:d.arg,number:a,"numeric-constant":n,punctuation:o,string:r}},k={pattern:/((?:^|\s)=?)(?:after|analysis|and|array|barchart|barwidth|begingraph|by|call|cas|cbarline|cfill|class(?:lev)?|close|column|computed?|contains|continue|data(?=\=)|define|delete|describe|document|do\s+over|do|dol|drop|dul|end(?:source|comp)?|entryTitle|else|eval(?:uate)?|exec(?:ute)?|exit|fill(?:attrs)?|file(?:name)?|flist|fnc|function(?:list)?|goto|global|group(?:by)?|headline|headskip|histogram|if|infile|keep|keylabel|keyword|label|layout|leave|legendlabel|length|libname|loadactionset|merge|midpoints|name|noobs|nowd|_?null_|ods|options|or|otherwise|out(?:put)?|over(?:lay)?|plot|put|print|raise|ranexp|rannor|rbreak|retain|return|select|set|session|sessref|source|statgraph|sum|summarize|table|temp|terminate|then\s+do|then|title\d?|to|var|when|where|xaxisopts|yaxisopts|y2axisopts)\b/i,lookbehind:!0};e.languages.sas={datalines:{pattern:/^(\s*)(?:(?:data)?lines|cards);[\s\S]+?^\s*;/im,lookbehind:!0,alias:"string",inside:{keyword:{pattern:/^(?:(?:data)?lines|cards)/i},punctuation:/;/}},"proc-sql":{pattern:/(^proc\s+(?:fed)?sql(?:\s+[\w|=]+)?;)[\s\S]+?(?=^(?:proc\s+\w+|quit|run|data);|(?![\s\S]))/im,lookbehind:!0,inside:{sql:{pattern:RegExp("^[ \t]*(?:select|alter\\s+table|(?:create|describe|drop)\\s+(?:index|table(?:\\s+constraints)?|view)|create\\s+unique\\s+index|insert\\s+into|update)(?:|[^;\"'])+;".replace(//g,t),"im"),alias:"language-sql",inside:e.languages.sql},"global-statements":u,"sql-statements":{pattern:/(^|\s)(?:disconnect\s+from|exec(?:ute)?|begin|commit|rollback|reset|validate)\b/i,lookbehind:!0,alias:"keyword"},number:a,"numeric-constant":n,punctuation:o,string:r}},"proc-groovy":{pattern:/(^proc\s+groovy(?:\s+[\w|=]+)?;)(?:\s*submit)[\s\S]+?(?=^(?:proc\s+\w+|quit|run|data);|(?![\s\S]))/im,lookbehind:!0,inside:{groovy:{pattern:RegExp("(^[ \t]*submit(?:\\s+(?:load|parseonly|norun))?)(?:|[^\"'])+?(?=endsubmit;)".replace(//g,t),"im"),lookbehind:!0,alias:"language-groovy",inside:e.languages.groovy},"submit-statement":m,"global-statements":u,number:a,"numeric-constant":n,punctuation:o,string:r}},"proc-lua":{pattern:/(^proc\s+lua(?:\s+[\w|=]+)?;)(?:\s*submit)[\s\S]+?(?=^(?:proc\s+\w+|quit|run|data);|(?![\s\S]))/im,lookbehind:!0,inside:{lua:{pattern:RegExp("(^[ \t]*submit(?:\\s+(?:load|parseonly|norun))?)(?:|[^\"'])+?(?=endsubmit;)".replace(//g,t),"im"),lookbehind:!0,alias:"language-lua",inside:e.languages.lua},"submit-statement":m,"global-statements":u,number:a,"numeric-constant":n,punctuation:o,string:r}},"proc-cas":{pattern:/(^proc\s+cas(?:\s+[\w|=]+)?;)[\s\S]+?(?=^(?:proc\s+\w+|quit|data);|(?![\s\S]))/im,lookbehind:!0,inside:{"statement-var":{pattern:/((?:^|\s)=?)saveresult\s+[^;]+/im,lookbehind:!0,inside:{statement:{pattern:/^saveresult\s+\S+/i,inside:{keyword:/^(?:saveresult)/i}},rest:d}},"cas-actions":g,statement:{pattern:/((?:^|\s)=?)(?:default|(?:un)?set|on|output|upload)[^;]+/im,lookbehind:!0,inside:d},step:i,keyword:k,function:l,comment:s,format:c,altformat:p,"global-statements":u,number:a,"numeric-constant":n,punctuation:o,string:r}},"proc-args":{pattern:RegExp("(^proc\\s+\\w+\\s+)(?!\\s)(?:[^;\"']|)+;".replace(//g,t),"im"),lookbehind:!0,inside:d},"macro-keyword":{pattern:/((?:^|\s)=?)%(?:ABORT|BQUOTE|BY|CMS|COPY|DISPLAY|DO|ELSE|END|EVAL|GLOBAL|GO|GOTO|IF|INC|INCLUDE|INDEX|INPUT|KTRIM|LENGTH|LET|LIST|LOCAL|NRBQUOTE|NRQUOTE|NRSTR|PUT|QKTRIM|QSCAN|QSUBSTR|QSYSFUNC|QUOTE|QUPCASE|RETURN|RUN|SCAN|STR|SUBSTR|SUPERQ|SYMDEL|SYMGLOBL|SYMLOCAL|SYMEXIST|SYSCALL|SYSEVALF|SYSEXEC|SYSFUNC|SYSGET|SYSRPUT|THEN|TO|TSO|UNQUOTE|UNTIL|UPCASE|WHILE|WINDOW)\b/i,lookbehind:!0,alias:"keyword"},"macro-declaration":{pattern:/^%macro[^;]+(?=;)/im,inside:{keyword:/%macro/i}},"macro-end":{pattern:/^%mend[^;]+(?=;)/im,inside:{keyword:/%mend/i}},macro:{pattern:/%_\w+(?=\()/,alias:"keyword"},input:{pattern:/\binput\s+[-\w\s/*.$&]+;/i,inside:{input:{alias:"keyword",pattern:/^input/i},comment:s,number:a,"numeric-constant":n}},"options-args":{pattern:/(^options)[-'"|/\\<>*+=:()\w\s]*(?=;)/im,lookbehind:!0,inside:d},"cas-actions":g,comment:s,function:l,format:c,altformat:p,"numeric-constant":n,datetime:{pattern:RegExp(t+"(?:dt?|t)"),alias:"number"},string:r,step:i,keyword:k,"operator-keyword":{pattern:/\b(?:eq|ne|gt|lt|ge|le|in|not)\b/i,alias:"operator"},number:a,operator:/\*\*?|\|\|?|!!?|¦¦?|<[>=]?|>[<=]?|[-+\/=&]|[~¬^]=?/i,punctuation:o}}(Prism); \ No newline at end of file diff --git a/tests/languages/sas/keyword_feature.test b/tests/languages/sas/keyword_feature.test index 2b19e9ede4..b0fca4ceae 100644 --- a/tests/languages/sas/keyword_feature.test +++ b/tests/languages/sas/keyword_feature.test @@ -1,4 +1,4 @@ -action after analysis and array barchart barwidth begingraph by +after analysis and array barchart barwidth begingraph by cas cbarline cfill class classlev close column compute computed contains data= define document do do over dol drop dul end entryTitle else endcomp eval evaluate exec execute fill fillattrs filename group groupby headline headskip @@ -10,7 +10,7 @@ then do title to var where xaxisopts yaxisopts y2axisopts ---------------------------------------------------- [ - ["keyword", "action"], ["keyword", "after"], ["keyword", "analysis"], + ["keyword", "after"], ["keyword", "analysis"], ["keyword", "and"], ["keyword", "array"], ["keyword", "barchart"], ["keyword", "barwidth"], ["keyword", "begingraph"], ["keyword", "by"], ["keyword", "cas"], ["keyword", "cbarline"], ["keyword", "cfill"], diff --git a/tests/languages/sas/proccas_feature.test b/tests/languages/sas/proccas_feature.test new file mode 100644 index 0000000000..5bc03d3ad6 --- /dev/null +++ b/tests/languages/sas/proccas_feature.test @@ -0,0 +1,141 @@ +proc cas; + session casauto; + builtins.actionSetInfo result=results; + print results.setinfo[,{'actionset', 'label'}]; +run; +quit; + +proc cas; + session casauto; + output log; + table.loadTable / path="iris.sashdat"; + simple.summary result=iris / table={name="iris"}; + tableIris=findtable(iris); + saveresult tableIris csv="sum.csv"; +run; +quit; + +proc cas; + action table.fileinfo / path="%.csv"; +run; +quit; + +---------------------------------------------------- + +[ + ["step", "proc cas"], + ["punctuation", ";"], + ["proc-cas", + [ + ["keyword", "session"], + " casauto", + ["punctuation", ";"], + ["cas-actions", [ + ["keyword", "builtins.actionSetInfo"], + ["argument", "result"], + ["operator", "="], + ["arg-value", "results"] + ] + ], + ["punctuation", ";"], + ["keyword", "print"], + " results", + ["punctuation", "."], + "setinfo", + ["punctuation", "["], + ["punctuation", ","], + ["punctuation", "{"], + ["string", "'actionset'"], + ["punctuation", ","], + ["string", "'label'"], + ["punctuation", "}"], + ["punctuation", "]"], + ["punctuation", ";"], + ["step", "run"], + ["punctuation", ";"] + ] + ], + ["step", "quit"], + ["punctuation", ";"], + ["step", "proc cas"], + ["punctuation", ";"], + ["proc-cas", + [ + ["keyword", "session"], + " casauto", + ["punctuation", ";"], + ["statement", [ + ["arg", "output"], + ["arg", "log"] + ]], + ["punctuation", ";"], + ["cas-actions", [ + ["keyword", "table.loadTable"], + " / ", + ["argument", "path"], + ["operator", "="], + ["string", "\"iris.sashdat\""] + ] + ], + ["punctuation", ";"], + ["cas-actions", [ + ["keyword", "simple.summary"], + ["argument", "result"], + ["operator", "="], + ["arg-value", "iris"], + " / ", + ["argument", "table"], + ["operator", "="], + ["punctuation", "{"], + ["argument", "name"], + ["operator", "="], + ["string", "\"iris\""], + ["punctuation", "}"] + ] + ], + ["punctuation", ";"], + "\r\n tableIris=", + ["function", "findtable"], + ["punctuation", "("], + "iris", + ["punctuation", ")"], + ["punctuation", ";"], + ["statement-var", [ + [ "statement", [ + ["keyword", "saveresult"], + " tableIris" + ] + ], + ["arg", "csv"], + ["operator", "="], + ["string", "\"sum.csv\""] + ]], + ["punctuation", ";"], + ["step", "run"], + ["punctuation", ";"] + ] + ], + ["step", "quit"], + ["punctuation", ";"], + ["step", "proc cas"], + ["punctuation", ";"], + ["proc-cas", + [ + ["cas-actions", + [ + ["action", "action"], + ["keyword", "table.fileinfo"], + " / ", + ["argument", "path"], + ["operator", "="], + ["string", "\"%.csv\""] + ] + ], + ["punctuation", ";"], + ["step", "run"], + ["punctuation", ";"] + ] + ], + ["step", "quit"], + ["punctuation", ";"] +] From c40d96c641f263a7c395380453367d67f2b2e607 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Wed, 8 Jan 2020 15:57:52 +0100 Subject: [PATCH 0423/1100] Added QML (#2139) This adds support for QML (Qt Modeling Language), a user interface markup language. https://en.wikipedia.org/wiki/QML https://doc.qt.io/qt-5/qtqml-index.html --- components.js | 2 +- components.json | 5 + components/prism-qml.js | 58 +++++++ components/prism-qml.min.js | 1 + examples/prism-qml.html | 36 +++++ plugins/autoloader/prism-autoloader.js | 1 + plugins/autoloader/prism-autoloader.min.js | 2 +- plugins/show-language/prism-show-language.js | 1 + .../show-language/prism-show-language.min.js | 2 +- tests/languages/qml/class-name_feature.test | 55 +++++++ tests/languages/qml/comment_feature.test | 15 ++ tests/languages/qml/import_feature.test | 26 +++ .../qml/javascript-function_feature.test | 82 ++++++++++ tests/languages/qml/keyword_feature.test | 15 ++ tests/languages/qml/property_feature.test | 153 ++++++++++++++++++ tests/languages/qml/punctuation_feature.test | 17 ++ 16 files changed, 468 insertions(+), 3 deletions(-) create mode 100644 components/prism-qml.js create mode 100644 components/prism-qml.min.js create mode 100644 examples/prism-qml.html create mode 100644 tests/languages/qml/class-name_feature.test create mode 100644 tests/languages/qml/comment_feature.test create mode 100644 tests/languages/qml/import_feature.test create mode 100644 tests/languages/qml/javascript-function_feature.test create mode 100644 tests/languages/qml/keyword_feature.test create mode 100644 tests/languages/qml/property_feature.test create mode 100644 tests/languages/qml/punctuation_feature.test diff --git a/components.js b/components.js index e2ae8ab4f7..0b92157964 100644 --- a/components.js +++ b/components.js @@ -1,2 +1,2 @@ -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default","overrideExampleHeader":true},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"Augmented Backus–Naur form","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","owner":"RunDevelopment"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"Backus–Naur form","alias":"rbnf","aliasTitles":{"rbnf":"Routing Backus–Naur form"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"Extended Backus–Naur form","owner":"RunDevelopment"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment"},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"http":{"title":"HTTP","optional":["css","javascript","json","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":["java"],"optional":["scala"],"owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"json":{"title":"JSON","owner":"CupOfTea696"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":["jsdoc"],"alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"cpp","modify":["c","cpp"],"overrideExampleHeader":true,"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","modify":["actionscript","coffeescript","flow","javascript","typescript","vala"],"owner":"RunDevelopment"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","peerDependencies":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"solidity":{"title":"Solidity (Ethereum)","require":"clike","owner":"glachaud"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"turtle":{"title":"Turtle","alias":["trig"],"aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","visual-basic"],"owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true}}}; +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default","overrideExampleHeader":true},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"Augmented Backus–Naur form","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","owner":"RunDevelopment"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"Backus–Naur form","alias":"rbnf","aliasTitles":{"rbnf":"Routing Backus–Naur form"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"Extended Backus–Naur form","owner":"RunDevelopment"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment"},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"http":{"title":"HTTP","optional":["css","javascript","json","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":["java"],"optional":["scala"],"owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"json":{"title":"JSON","owner":"CupOfTea696"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":["jsdoc"],"alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"cpp","modify":["c","cpp"],"overrideExampleHeader":true,"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","modify":["actionscript","coffeescript","flow","javascript","typescript","vala"],"owner":"RunDevelopment"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","peerDependencies":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"solidity":{"title":"Solidity (Ethereum)","require":"clike","owner":"glachaud"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"turtle":{"title":"Turtle","alias":["trig"],"aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","visual-basic"],"owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true}}}; if (typeof module !== 'undefined' && module.exports) { module.exports = components; } \ No newline at end of file diff --git a/components.json b/components.json index bbe1afa97f..40b9920c95 100644 --- a/components.json +++ b/components.json @@ -810,6 +810,11 @@ "title": "Q (kdb+ database)", "owner": "Golmote" }, + "qml": { + "title": "QML", + "require": "javascript", + "owner": "RunDevelopment" + }, "qore": { "title": "Qore", "require": "clike", diff --git a/components/prism-qml.js b/components/prism-qml.js new file mode 100644 index 0000000000..c3855fedf5 --- /dev/null +++ b/components/prism-qml.js @@ -0,0 +1,58 @@ +(function (Prism) { + + var jsString = /"(?:\\.|[^\\"\r\n])*"|'(?:\\.|[^\\'\r\n])*'/.source; + var jsComment = /\/\/.*|\/\*(?:(?!\*\/)[\s\S])*\*\//.source; + + var jsExpr = /(?:[^\\()[\]{}"'/]||\/(?![*/])||\(*\)|\[*\]|\{*\}|\\[\s\S])/ + .source.replace(//g, jsString).replace(//g, jsComment); + + // the pattern will blow up, so only a few iterations + for (var i = 0; i < 2; i++) { + jsExpr = jsExpr.replace(//g, jsExpr); + } + jsExpr = jsExpr.replace(//g, '[^\\s\\S]'); + + + Prism.languages.qml = { + 'comment': { + pattern: /\/\/.*|\/\*[\s\S]*?\*\//, + greedy: true + }, + 'javascript-function': { + pattern: RegExp(/((?:^|;)[ \t]*)function\s+[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*\s*\(*\)\s*\{*\}/.source.replace(//g, jsExpr), 'm'), + lookbehind: true, + greedy: true, + alias: 'language-javascript', + inside: Prism.languages.javascript + }, + 'class-name': { + pattern: /((?:^|[:;])[ \t]*)(?!\d)\w+(?=[ \t]*\{|[ \t]+on\b)/m, + lookbehind: true + }, + 'property': [ + { + pattern: /((?:^|[;{])[ \t]*)(?!\d)\w+(?:\.\w+)*(?=[ \t]*:)/m, + lookbehind: true + }, + { + pattern: /((?:^|[;{])[ \t]*)property[ \t]+(?!\d)\w+(?:\.\w+)*[ \t]+(?!\d)\w+(?:\.\w+)*(?=[ \t]*:)/m, + lookbehind: true, + inside: { + 'keyword': /^property/, + 'property': /\w+(?:\.\w+)*/ + } + } + ], + 'javascript-expression': { + pattern: RegExp(/(:[ \t]*)(?![\s;}[])(?:(?!$|[;}]))+/.source.replace(//g, jsExpr), 'm'), + lookbehind: true, + greedy: true, + alias: 'language-javascript', + inside: Prism.languages.javascript + }, + 'string': /"(?:\\.|[^\\"\r\n])*"/, + 'keyword': /\b(?:as|import|on)\b/, + 'punctuation': /[{}[\]:;,]/ + }; + +}(Prism)); diff --git a/components/prism-qml.min.js b/components/prism-qml.min.js new file mode 100644 index 0000000000..b132137477 --- /dev/null +++ b/components/prism-qml.min.js @@ -0,0 +1 @@ +!function(e){for(var r=/(?:[^\\()[\]{}"'/]||\/(?![*/])||\(*\)|\[*\]|\{*\}|\\[\s\S])/.source.replace(//g,"\"(?:\\\\.|[^\\\\\"\r\\n])*\"|'(?:\\\\.|[^\\\\'\r\\n])*'").replace(//g,"\\/\\/.*|\\/\\*(?:(?!\\*\\/)[\\s\\S])*\\*\\/"),t=0;t<2;t++)r=r.replace(//g,r);r=r.replace(//g,"[^\\s\\S]"),e.languages.qml={comment:{pattern:/\/\/.*|\/\*[\s\S]*?\*\//,greedy:!0},"javascript-function":{pattern:RegExp("((?:^|;)[ \t]*)function\\s+[_$a-zA-Z\\xA0-\\uFFFF][$\\w\\xA0-\\uFFFF]*\\s*\\(*\\)\\s*\\{*\\}".replace(//g,r),"m"),lookbehind:!0,greedy:!0,alias:"language-javascript",inside:e.languages.javascript},"class-name":{pattern:/((?:^|[:;])[ \t]*)(?!\d)\w+(?=[ \t]*\{|[ \t]+on\b)/m,lookbehind:!0},property:[{pattern:/((?:^|[;{])[ \t]*)(?!\d)\w+(?:\.\w+)*(?=[ \t]*:)/m,lookbehind:!0},{pattern:/((?:^|[;{])[ \t]*)property[ \t]+(?!\d)\w+(?:\.\w+)*[ \t]+(?!\d)\w+(?:\.\w+)*(?=[ \t]*:)/m,lookbehind:!0,inside:{keyword:/^property/,property:/\w+(?:\.\w+)*/}}],"javascript-expression":{pattern:RegExp("(:[ \t]*)(?![\\s;}[])(?:(?!$|[;}]))+".replace(//g,r),"m"),lookbehind:!0,greedy:!0,alias:"language-javascript",inside:e.languages.javascript},string:/"(?:\\.|[^\\"\r\n])*"/,keyword:/\b(?:as|import|on)\b/,punctuation:/[{}[\]:;,]/}}(Prism); \ No newline at end of file diff --git a/examples/prism-qml.html b/examples/prism-qml.html new file mode 100644 index 0000000000..2069d838ed --- /dev/null +++ b/examples/prism-qml.html @@ -0,0 +1,36 @@ +

        Full example

        +
        // https://code.qt.io/cgit/qt/qtdeclarative.git/tree/examples/qml/referenceexamples/valuesource/example.qml?h=5.14
        +
        +import People 1.0
        +import QtQuick 2.0  // For QColor
        +
        +BirthdayParty {
        +	HappyBirthdaySong on announcement { name: "Bob Jones" }
        +
        +	onPartyStarted: console.log("This party started rockin' at " + time);
        +
        +
        +	host: Boy {
        +		name: "Bob Jones"
        +		shoe { size: 12; color: "white"; brand: "Nike"; price: 90.0 }
        +	}
        +
        +	Boy {
        +		name: "Leo Hodges"
        +		BirthdayParty.rsvp: "2009-07-06"
        +		shoe { size: 10; color: "black"; brand: "Reebok"; price: 59.95 }
        +	}
        +	Boy {
        +		name: "Jack Smith"
        +		shoe { size: 8; color: "blue"; brand: "Puma"; price: 19.95 }
        +	}
        +	Girl {
        +		name: "Anne Brown"
        +		BirthdayParty.rsvp: "2009-07-01"
        +		shoe.size: 7
        +		shoe.color: "red"
        +		shoe.brand: "Marc Jacobs"
        +		shoe.price: 699.99
        +	}
        +
        +}
        diff --git a/plugins/autoloader/prism-autoloader.js b/plugins/autoloader/prism-autoloader.js index d688a80dde..964e767c7e 100644 --- a/plugins/autoloader/prism-autoloader.js +++ b/plugins/autoloader/prism-autoloader.js @@ -91,6 +91,7 @@ "markup", "javascript" ], + "qml": "javascript", "qore": "clike", "jsx": [ "markup", diff --git a/plugins/autoloader/prism-autoloader.min.js b/plugins/autoloader/prism-autoloader.min.js index bc434051bb..90d4fe59ff 100644 --- a/plugins/autoloader/prism-autoloader.min.js +++ b/plugins/autoloader/prism-autoloader.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof self&&self.Prism&&self.document&&document.createElement){var c={javascript:"clike",actionscript:"javascript",arduino:"cpp",aspnet:["markup","csharp"],bison:"c",c:"clike",csharp:"clike",cpp:"c",coffeescript:"javascript",crystal:"ruby","css-extras":"css",d:"clike",dart:"clike",django:"markup-templating",ejs:["javascript","markup-templating"],etlua:["lua","markup-templating"],erb:["ruby","markup-templating"],fsharp:"clike","firestore-security-rules":"clike",flow:"javascript",ftl:"markup-templating",glsl:"clike",gml:"clike",go:"clike",groovy:"clike",haml:"ruby",handlebars:"markup-templating",haxe:"clike",java:"clike",javadoc:["markup","java","javadoclike"],jolie:"clike",jsdoc:["javascript","javadoclike"],"js-extras":"javascript","js-templates":"javascript",jsonp:"json",json5:"json",kotlin:"clike",latte:["clike","markup-templating","php"],less:"css",lilypond:"scheme",markdown:"markup","markup-templating":"markup",n4js:"javascript",nginx:"clike",objectivec:"c",opencl:"cpp",parser:"markup",php:["clike","markup-templating"],phpdoc:["php","javadoclike"],"php-extras":"php",plsql:"sql",processing:"clike",protobuf:"clike",pug:["markup","javascript"],qore:"clike",jsx:["markup","javascript"],tsx:["jsx","typescript"],reason:"clike",ruby:"clike",sass:"css",scss:"css",scala:"java","shell-session":"bash",smarty:"markup-templating",solidity:"clike",soy:"markup-templating",sparql:"turtle",sqf:"clike",swift:"clike",tap:"yaml",textile:"markup",tt2:["clike","markup-templating"],twig:"markup",typescript:"javascript","t4-cs":["t4-templating","csharp"],"t4-vb":["t4-templating","visual-basic"],vala:"clike",vbnet:"basic",velocity:"markup",wiki:"markup",xeora:"markup",xquery:"markup"},l={html:"markup",xml:"markup",svg:"markup",mathml:"markup",js:"javascript",g4:"antlr4",adoc:"asciidoc",shell:"bash",rbnf:"bnf",cs:"csharp",dotnet:"csharp",coffee:"coffeescript",jinja2:"django","dns-zone":"dns-zone-file",dockerfile:"docker",gamemakerlanguage:"gml",hs:"haskell",tex:"latex",context:"latex",ly:"lilypond",emacs:"lisp",elisp:"lisp","emacs-lisp":"lisp",md:"markdown",moon:"moonscript",n4jsd:"n4js",objectpascal:"pascal",px:"pcaxis",py:"python",robot:"robotframework",rb:"ruby",rq:"sparql",trig:"turtle",ts:"typescript",t4:"t4-cs",vb:"visual-basic",xeoracube:"xeora",yml:"yaml"},n={},a="components/",e=Prism.util.currentScript();if(e){var t=/\bplugins\/autoloader\/prism-autoloader\.(?:min\.)js$/i,s=/[\w-]+\.(?:min\.)js$/i;if(e.hasAttribute("data-autoloader-path"))a=e.getAttribute("data-autoloader-path").trim().replace(/\/?$/,"/");else{var i=e.src;t.test(i)?a=i.replace(t,"components/"):s.test(i)&&(a=i.replace(s,"components/"))}}var p=Prism.plugins.autoloader={languages_path:a,use_minified:!0,loadLanguages:o};Prism.hooks.add("complete",function(a){a.element&&a.language&&!a.grammar&&"none"!==a.language&&function(a,e){a in l&&(a=l[a]);var t=e.getAttribute("data-dependencies"),s=e.parentElement;!t&&s&&"pre"===s.tagName.toLowerCase()&&(t=s.getAttribute("data-dependencies")),o(t=t?t.split(/\s*,\s*/g):[],function(){m(a,function(){Prism.highlightElement(e)})})}(a.language,a.element)})}function o(a,e,t){"string"==typeof a&&(a=[a]);var s=a.length,i=0,r=!1;function c(){r||++i===s&&e&&e(a)}0!==s?a.forEach(function(a){m(a,c,function(){r||(r=!0,t&&t(a))})}):e&&setTimeout(e,0)}function m(e,t,s){var i=0<=e.indexOf("!");e=e.replace("!",""),e=l[e]||e;var a=function(){var a=n[e];if(a||(a=n[e]={callbacks:[]}),a.callbacks.push({success:t,error:s}),!i&&Prism.languages[e])u(e,"success");else if(!i&&a.error)u(e,"error");else if(i||!a.loading){a.loading=!0,function(a,e,t){var s=document.createElement("script");s.src=a,s.async=!0,s.onload=function(){document.body.removeChild(s),e&&e()},s.onerror=function(){document.body.removeChild(s),t&&t()},document.body.appendChild(s)}(function(a){return p.languages_path+"prism-"+a+(p.use_minified?".min":"")+".js"}(e),function(){a.loading=!1,u(e,"success")},function(){a.loading=!1,a.error=!0,u(e,"error")})}},r=c[e];r&&r.length?o(r,a,s):a()}function u(a,e){if(n[a]){for(var t=n[a].callbacks,s=0,i=t.length;s Date: Fri, 10 Jan 2020 16:08:22 +0530 Subject: [PATCH 0424/1100] Custom Class: Fixed TypeError when mapper is undefined (#2167) --- plugins/custom-class/prism-custom-class.js | 2 +- plugins/custom-class/prism-custom-class.min.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/custom-class/prism-custom-class.js b/plugins/custom-class/prism-custom-class.js index 24f56549e7..3eeb75f191 100644 --- a/plugins/custom-class/prism-custom-class.js +++ b/plugins/custom-class/prism-custom-class.js @@ -88,7 +88,7 @@ } env.classes = env.classes.map(function (c) { - return prefixString + mapper ? mapper(c, env.language) : c; + return prefixString + (mapper ? mapper(c, env.language) : c); }); }); diff --git a/plugins/custom-class/prism-custom-class.min.js b/plugins/custom-class/prism-custom-class.min.js index da639b6707..e579293526 100644 --- a/plugins/custom-class/prism-custom-class.min.js +++ b/plugins/custom-class/prism-custom-class.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof self&&self.Prism||"undefined"!=typeof global&&global.Prism){var a,e,t="";Prism.plugins.customClass={add:function(n){a=n},map:function(s){e="function"==typeof s?s:function(n){return s[n]||n}},prefix:function(n){t=n||""}},Prism.hooks.add("wrap",function(s){if(a){var n=a({content:s.content,type:s.type,language:s.language});Array.isArray(n)?s.classes.push.apply(s.classes,n):n&&s.classes.push(n)}(e||t)&&(s.classes=s.classes.map(function(n){return t+e?e(n,s.language):n}))})}}(); \ No newline at end of file +!function(){if("undefined"!=typeof self&&self.Prism||"undefined"!=typeof global&&global.Prism){var a,e,t="";Prism.plugins.customClass={add:function(n){a=n},map:function(s){e="function"==typeof s?s:function(n){return s[n]||n}},prefix:function(n){t=n||""}},Prism.hooks.add("wrap",function(s){if(a){var n=a({content:s.content,type:s.type,language:s.language});Array.isArray(n)?s.classes.push.apply(s.classes,n):n&&s.classes.push(n)}(e||t)&&(s.classes=s.classes.map(function(n){return t+(e?e(n,s.language):n)}))})}}(); \ No newline at end of file From ef4d29d9baf62e348967aa36c832b0fb3d844b83 Mon Sep 17 00:00:00 2001 From: Alex Kanunnikov Date: Sat, 11 Jan 2020 02:05:37 +0300 Subject: [PATCH 0425/1100] Handlebars: Added support for `:` and improved the `variable` pattern (#2172) This adds support for `:` as punctuation and removes the `.` from the list of allowed characters in the `variable` pattern as it is impossible to match because of the `punctuation` pattern. --- components/prism-handlebars.js | 4 +- components/prism-handlebars.min.js | 2 +- tests/languages/handlebars/block_feature.test | 31 +- .../handlebars_in_html_feature.test | 273 ++++++++++++++++++ .../handlebars/punctuation_feature.test | 31 ++ .../handlebars/variable_feature.test | 21 ++ 6 files changed, 347 insertions(+), 15 deletions(-) create mode 100644 tests/languages/handlebars/handlebars_in_html_feature.test create mode 100644 tests/languages/handlebars/punctuation_feature.test create mode 100644 tests/languages/handlebars/variable_feature.test diff --git a/components/prism-handlebars.js b/components/prism-handlebars.js index e23933d467..7a7f5a41b1 100644 --- a/components/prism-handlebars.js +++ b/components/prism-handlebars.js @@ -21,8 +21,8 @@ variable: /[\s\S]+/ } }, - 'punctuation': /[!"#%&'()*+,.\/;<=>@\[\\\]^`{|}~]/, - 'variable': /[^!"#%&'()*+,.\/;<=>@\[\\\]^`{|}~\s]+/ + 'punctuation': /[!"#%&':()*+,.\/;<=>@\[\\\]^`{|}~]/, + 'variable': /[^!"#%&'()*+,\/;<=>@\[\\\]^`{|}~\s]+/ }; Prism.hooks.add('before-tokenize', function(env) { diff --git a/components/prism-handlebars.min.js b/components/prism-handlebars.min.js index 7fbab5cc83..4c8151f3ba 100644 --- a/components/prism-handlebars.min.js +++ b/components/prism-handlebars.min.js @@ -1 +1 @@ -!function(e){e.languages.handlebars={comment:/\{\{![\s\S]*?\}\}/,delimiter:{pattern:/^\{\{\{?|\}\}\}?$/i,alias:"punctuation"},string:/(["'])(?:\\.|(?!\1)[^\\\r\n])*\1/,number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:[Ee][+-]?\d+)?/,boolean:/\b(?:true|false)\b/,block:{pattern:/^(\s*~?\s*)[#\/]\S+?(?=\s*~?\s*$|\s)/i,lookbehind:!0,alias:"keyword"},brackets:{pattern:/\[[^\]]+\]/,inside:{punctuation:/\[|\]/,variable:/[\s\S]+/}},punctuation:/[!"#%&'()*+,.\/;<=>@\[\\\]^`{|}~]/,variable:/[^!"#%&'()*+,.\/;<=>@\[\\\]^`{|}~\s]+/},e.hooks.add("before-tokenize",function(a){e.languages["markup-templating"].buildPlaceholders(a,"handlebars",/\{\{\{[\s\S]+?\}\}\}|\{\{[\s\S]+?\}\}/g)}),e.hooks.add("after-tokenize",function(a){e.languages["markup-templating"].tokenizePlaceholders(a,"handlebars")})}(Prism); \ No newline at end of file +!function(e){e.languages.handlebars={comment:/\{\{![\s\S]*?\}\}/,delimiter:{pattern:/^\{\{\{?|\}\}\}?$/i,alias:"punctuation"},string:/(["'])(?:\\.|(?!\1)[^\\\r\n])*\1/,number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:[Ee][+-]?\d+)?/,boolean:/\b(?:true|false)\b/,block:{pattern:/^(\s*~?\s*)[#\/]\S+?(?=\s*~?\s*$|\s)/i,lookbehind:!0,alias:"keyword"},brackets:{pattern:/\[[^\]]+\]/,inside:{punctuation:/\[|\]/,variable:/[\s\S]+/}},punctuation:/[!"#%&':()*+,.\/;<=>@\[\\\]^`{|}~]/,variable:/[^!"#%&'()*+,\/;<=>@\[\\\]^`{|}~\s]+/},e.hooks.add("before-tokenize",function(a){e.languages["markup-templating"].buildPlaceholders(a,"handlebars",/\{\{\{[\s\S]+?\}\}\}|\{\{[\s\S]+?\}\}/g)}),e.hooks.add("after-tokenize",function(a){e.languages["markup-templating"].tokenizePlaceholders(a,"handlebars")})}(Prism); \ No newline at end of file diff --git a/tests/languages/handlebars/block_feature.test b/tests/languages/handlebars/block_feature.test index dd2c74e9c7..46182ddd43 100644 --- a/tests/languages/handlebars/block_feature.test +++ b/tests/languages/handlebars/block_feature.test @@ -1,21 +1,28 @@ {{#each comments}}{{/each}} {{~#if isActive~}}{{~/if~}} +{{#let a as |b|}}{{/let}} ---------------------------------------------------- [ - ["handlebars", [ - ["delimiter", "{{"], ["block", "#each"], ["variable", "comments"], ["delimiter", "}}"] - ]], - ["handlebars", [ - ["delimiter", "{{"], ["block", "/each"], ["delimiter", "}}"] - ]], - ["handlebars", [ - ["delimiter", "{{"], ["punctuation", "~"], ["block", "#if"], ["variable", "isActive"], ["punctuation", "~"], ["delimiter", "}}"] - ]], - ["handlebars", [ - ["delimiter", "{{"], ["punctuation", "~"], ["block", "/if"], ["punctuation", "~"], ["delimiter", "}}"] - ]] + ["handlebars",[ + ["delimiter","{{"],["block","#each"],["variable","comments"],["delimiter","}}"]] + ], + ["handlebars",[ + ["delimiter","{{"],["block","/each"],["delimiter","}}"]] + ], + ["handlebars",[ + ["delimiter","{{"],["punctuation","~"],["block","#if"],["variable","isActive"],["punctuation","~"],["delimiter","}}"]] + ], + ["handlebars",[ + ["delimiter","{{"],["punctuation","~"],["block","/if"],["punctuation","~"],["delimiter","}}"]] + ], + ["handlebars",[ + ["delimiter","{{"],["block","#let"],["variable","a"],["variable","as"],["punctuation","|"],["variable","b"],["punctuation","|"],["delimiter","}}"]] + ], + ["handlebars",[ + ["delimiter","{{"],["block","/let"],["delimiter","}}"]] + ] ] ---------------------------------------------------- diff --git a/tests/languages/handlebars/handlebars_in_html_feature.test b/tests/languages/handlebars/handlebars_in_html_feature.test new file mode 100644 index 0000000000..1c2dafea96 --- /dev/null +++ b/tests/languages/handlebars/handlebars_in_html_feature.test @@ -0,0 +1,273 @@ +{{aUserModel.name}} +
        {{listOfUsers.firstObject.name}}
        +{{if name "I have a name" "I have no name"}} + +
        +---------------------------------------------------- + +[ + [ + "handlebars", + [ + [ + "delimiter", + "{{" + ], + [ + "variable", + "aUserModel" + ], + [ + "punctuation", + "." + ], + [ + "variable", + "name" + ], + [ + "delimiter", + "}}" + ] + ] + ], + [ + "tag", + [ + [ + "tag", + [ + [ + "punctuation", + "<" + ], + "div" + ] + ], + [ + "punctuation", + ">" + ] + ] + ], + [ + "handlebars", + [ + [ + "delimiter", + "{{" + ], + [ + "variable", + "listOfUsers" + ], + [ + "punctuation", + "." + ], + [ + "variable", + "firstObject" + ], + [ + "punctuation", + "." + ], + [ + "variable", + "name" + ], + [ + "delimiter", + "}}" + ] + ] + ], + [ + "tag", + [ + [ + "tag", + [ + [ + "punctuation", + "" + ] + ] + ], + [ + "handlebars", + [ + [ + "delimiter", + "{{" + ], + [ + "variable", + "if" + ], + [ + "variable", + "name" + ], + [ + "string", + "\"I have a name\"" + ], + [ + "string", + "\"I have no name\"" + ], + [ + "delimiter", + "}}" + ] + ] + ], + [ + "tag", + [ + [ + "tag", + [ + [ + "punctuation", + "<" + ], + "span" + ] + ], + [ + "attr-name", + [ + "data-has-name" + ] + ], + [ + "attr-value", + [ + [ + "punctuation", + "=" + ], + [ + "handlebars", + [ + [ + "delimiter", + "{{" + ], + [ + "variable", + "if" + ], + [ + "variable", + "name" + ], + [ + "boolean", + "true" + ], + [ + "delimiter", + "}}" + ] + ] + ] + ] + ], + [ + "punctuation", + ">" + ] + ] + ], + [ + "tag", + [ + [ + "tag", + [ + [ + "punctuation", + "" + ] + ] + ], + [ + "tag", + [ + [ + "tag", + [ + [ + "punctuation", + "<" + ], + "div" + ] + ], + [ + "attr-name", + [ + [ + "handlebars", + [ + [ + "delimiter", + "{{" + ], + [ + "variable", + "on" + ], + [ + "string", + "\"click\"" + ], + [ + "variable", + "this" + ], + [ + "punctuation", + "." + ], + [ + "variable", + "hello" + ], + [ + "delimiter", + "}}" + ] + ] + ] + ] + ], + [ + "punctuation", + "/>" + ] + ] + ] +] + +---------------------------------------------------- + +Checks for handlebars filter in Html. \ No newline at end of file diff --git a/tests/languages/handlebars/punctuation_feature.test b/tests/languages/handlebars/punctuation_feature.test new file mode 100644 index 0000000000..8276813b78 --- /dev/null +++ b/tests/languages/handlebars/punctuation_feature.test @@ -0,0 +1,31 @@ +{{~#if isActive~}}{{~/if~}} +{{:slot-name}} +---------------------------------------------------- + +[ + ["handlebars", [ + ["delimiter", "{{"], + ["punctuation", "~"], + ["block", "#if"], + ["variable", "isActive"], + ["punctuation", "~"], + ["delimiter", "}}"] + ]], + ["handlebars", [ + ["delimiter", "{{"], + ["punctuation", "~"], + ["block", "/if"], + ["punctuation", "~"], + ["delimiter", "}}"] + ]], + ["handlebars", [ + ["delimiter", "{{"], + ["punctuation", ":"], + ["variable", "slot-name"], + ["delimiter", "}}"] + ]] +] + +---------------------------------------------------- + +Checks for punctuation. \ No newline at end of file diff --git a/tests/languages/handlebars/variable_feature.test b/tests/languages/handlebars/variable_feature.test new file mode 100644 index 0000000000..31f94da80c --- /dev/null +++ b/tests/languages/handlebars/variable_feature.test @@ -0,0 +1,21 @@ +{{comments}} +{{@comments}} +{{this.comments}} + +---------------------------------------------------- + +[ + ["handlebars",[ + ["delimiter","{{"],["variable","comments"],["delimiter","}}"]] + ], + ["handlebars",[ + ["delimiter","{{"],["punctuation","@"],["variable","comments"],["delimiter","}}"]] + ], + ["handlebars",[ + ["delimiter","{{"],["variable","this"],["punctuation","."],["variable","comments"],["delimiter","}}"]] + ] +] + +---------------------------------------------------- + +Checks for variable. \ No newline at end of file From e5678a000fff28406b792f9fcf45af5cca8f6eec Mon Sep 17 00:00:00 2001 From: Saswat Padhi Date: Sun, 12 Jan 2020 02:13:05 -0800 Subject: [PATCH 0426/1100] Updated gulp to v4.0.2 (#2178) --- package-lock.json | 386 ++++++++++++++++++++++++++++------------------ package.json | 2 +- 2 files changed, 235 insertions(+), 153 deletions(-) diff --git a/package-lock.json b/package-lock.json index 70636cf048..5587386d34 100644 --- a/package-lock.json +++ b/package-lock.json @@ -259,21 +259,21 @@ "dev": true }, "async-done": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/async-done/-/async-done-1.3.1.tgz", - "integrity": "sha512-R1BaUeJ4PMoLNJuk+0tLJgjmEqVsdN118+Z8O+alhnQDQgy0kmD5Mqi0DNEmMx2LM0Ed5yekKu+ZXYvIHceicg==", + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/async-done/-/async-done-1.3.2.tgz", + "integrity": "sha512-uYkTP8dw2og1tu1nmza1n1CMW0qb8gWWlwqMmLb7MhBVs4BXrFziT6HXUd+/RlRA/i4H9AkofYloUbs1fwMqlw==", "dev": true, "requires": { "end-of-stream": "^1.1.0", "once": "^1.3.2", - "process-nextick-args": "^1.0.7", + "process-nextick-args": "^2.0.0", "stream-exhaust": "^1.0.1" } }, "async-each": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.2.tgz", - "integrity": "sha512-6xrbvN0MOBKSJDdonmSSz2OwFSgxRaVtBDes26mj9KIGtDo+g9xosFRSC+i1gQh2oAN/tQ62AI/pGZGQjVOiRg==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.3.tgz", + "integrity": "sha512-z/WhQ5FPySLdvREByI2vZiTWwCnF0moMJ1hK9YQwDTHKh6I7/uSckMetoRGb5UBZPC1z0jlw+n/XCgjeH7y1AQ==", "dev": true }, "async-limiter": { @@ -403,9 +403,9 @@ } }, "binary-extensions": { - "version": "1.13.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.13.0.tgz", - "integrity": "sha512-EgmjVLMn22z7eGGv3kcnHwSnJXmFHjISTY9E/S5lIcTD3Oxw05QTcBLNkJFzcb3cNueUdF/IN4U+d78V0zO8Hw==", + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.13.1.tgz", + "integrity": "sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw==", "dev": true }, "binaryextensions": { @@ -414,6 +414,16 @@ "integrity": "sha512-xVNN69YGDghOqCCtA6FI7avYrr02mTJjOgB0/f1VPD3pJC8QEvjTKWc4epDx8AqxxA75NI0QpVM2gPJXUbE4Tg==", "dev": true }, + "bindings": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", + "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", + "dev": true, + "optional": true, + "requires": { + "file-uri-to-path": "1.0.0" + } + }, "brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -549,9 +559,9 @@ "dev": true }, "chokidar": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.1.5.tgz", - "integrity": "sha512-i0TprVWp+Kj4WRPtInjexJ8Q+BqTE909VpH8xVhXrJkoc5QC8VO9TryGOqTr+2hljzc1sC62t22h5tZePodM/A==", + "version": "2.1.8", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.1.8.tgz", + "integrity": "sha512-ZmZUazfOzf0Nve7duiCKD23PFSCs4JPoYyccjUFF3aQkQadqBhfzhjkwBH2mNOG9cTBwhamM37EIsIkZw3nRgg==", "dev": true, "requires": { "anymatch": "^2.0.0", @@ -722,9 +732,9 @@ "dev": true }, "component-emitter": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz", - "integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY=", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz", + "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==", "dev": true }, "concat-map": { @@ -763,9 +773,9 @@ } }, "convert-source-map": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.6.0.tgz", - "integrity": "sha512-eFu7XigvxdZ1ETfbgPBohgyQ/Z++C0eEhTor0qRwBw9unw+L0/6V8wkSuGgzdThkiS5lSpdptOQPD8Ak40a+7A==", + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.7.0.tgz", + "integrity": "sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA==", "dev": true, "requires": { "safe-buffer": "~5.1.1" @@ -822,12 +832,13 @@ } }, "d": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/d/-/d-1.0.0.tgz", - "integrity": "sha1-dUu1v+VUUdpppYuU1F9MWwRi1Y8=", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/d/-/d-1.0.1.tgz", + "integrity": "sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==", "dev": true, "requires": { - "es5-ext": "^0.10.9" + "es5-ext": "^0.10.50", + "type": "^1.0.1" } }, "dashdash": { @@ -1080,14 +1091,14 @@ } }, "es5-ext": { - "version": "0.10.49", - "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.49.tgz", - "integrity": "sha512-3NMEhi57E31qdzmYp2jwRArIUsj1HI/RxbQ4bgnSB+AIKIxsAmTiK83bYMifIcpWvEc3P1X30DhUKOqEtF/kvg==", + "version": "0.10.53", + "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.53.tgz", + "integrity": "sha512-Xs2Stw6NiNHWypzRTY1MtaG/uJlwCk8kH81920ma8mvN8Xq1gsfhZvpkImLQArw8AHnv8MT2I45J3c0R8slE+Q==", "dev": true, "requires": { "es6-iterator": "~2.0.3", - "es6-symbol": "~3.1.1", - "next-tick": "^1.0.0" + "es6-symbol": "~3.1.3", + "next-tick": "~1.0.0" } }, "es6-iterator": { @@ -1102,24 +1113,24 @@ } }, "es6-symbol": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.1.tgz", - "integrity": "sha1-vwDvT9q2uhtG7Le2KbTH7VcVzHc=", + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.3.tgz", + "integrity": "sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA==", "dev": true, "requires": { - "d": "1", - "es5-ext": "~0.10.14" + "d": "^1.0.1", + "ext": "^1.1.2" } }, "es6-weak-map": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.2.tgz", - "integrity": "sha1-XjqzIlH/0VOKH45f+hNXdy+S2W8=", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.3.tgz", + "integrity": "sha512-p5um32HOTO1kP+w7PRnB+5lQ43Z6muuMuIMffvDN8ZB4GcnjLBV6zGStpbASIMk4DCAvEaamhe2zhyCb/QXXsA==", "dev": true, "requires": { "d": "1", - "es5-ext": "^0.10.14", - "es6-iterator": "^2.0.1", + "es5-ext": "^0.10.46", + "es6-iterator": "^2.0.3", "es6-symbol": "^3.1.1" } }, @@ -1228,6 +1239,23 @@ "homedir-polyfill": "^1.0.1" } }, + "ext": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/ext/-/ext-1.4.0.tgz", + "integrity": "sha512-Key5NIsUxdqKg3vIsdw9dSuXpPCQ297y6wBjL30edxwPgt2E44WcWBZey/ZvUc6sERLTxKdyCu4gZFmUbk1Q7A==", + "dev": true, + "requires": { + "type": "^2.0.0" + }, + "dependencies": { + "type": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/type/-/type-2.0.0.tgz", + "integrity": "sha512-KBt58xCHry4Cejnc2ISQAF7QY+ORngsWfxezO68+12hKV6lQY8P/psIkcbjeHWn7MqcgciWJyCCevFMJdIXpow==", + "dev": true + } + } + }, "extend": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", @@ -1356,6 +1384,13 @@ "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", "dev": true }, + "file-uri-to-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", + "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==", + "dev": true, + "optional": true + }, "fill-range": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", @@ -1390,32 +1425,21 @@ } }, "findup-sync": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-2.0.0.tgz", - "integrity": "sha1-kyaxSIwi0aYIhlCoaQGy2akKLLw=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-3.0.0.tgz", + "integrity": "sha512-YbffarhcicEhOrm4CtrwdKBdCuz576RLdhJDsIfvNtxUuhdRet1qZcsMjqbePtAseKdAnDyM/IyXbu7PRPRLYg==", "dev": true, "requires": { "detect-file": "^1.0.0", - "is-glob": "^3.1.0", + "is-glob": "^4.0.0", "micromatch": "^3.0.4", "resolve-dir": "^1.0.1" - }, - "dependencies": { - "is-glob": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", - "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", - "dev": true, - "requires": { - "is-extglob": "^2.1.0" - } - } } }, "fined": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/fined/-/fined-1.1.1.tgz", - "integrity": "sha512-jQp949ZmEbiYHk3gkbdtpJ0G1+kgtLQBNdP5edFP7Fh+WAYceLQz6yO1SBj72Xkg8GVyTB3bBzAYrHJVh5Xd5g==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/fined/-/fined-1.2.0.tgz", + "integrity": "sha512-ZYDqPLGxDkDhDZBjZBb+oD1+j0rA4E0pXY50eplAAOPg2N/gUBSSk5IM1/QhPfyVo19lJ+CvXpqfvk+b2p/8Ng==", "dev": true, "requires": { "expand-tilde": "^2.0.2", @@ -1516,14 +1540,15 @@ "dev": true }, "fsevents": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.7.tgz", - "integrity": "sha512-Pxm6sI2MeBD7RdD12RYsqaP0nMiwx8eZBXCa6z2L+mRHm2DYrOYwihmhjpkdjUHwQhslWQjRpEgNq4XvBmaAuw==", + "version": "1.2.11", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.11.tgz", + "integrity": "sha512-+ux3lx6peh0BpvY0JebGyZoiR4D+oYzdPZMKJwkZ+sFkNJzpL7tXc/wehS49gUAxg3tmMHPHZkA8JU2rhhgDHw==", "dev": true, "optional": true, "requires": { - "nan": "^2.9.2", - "node-pre-gyp": "^0.10.0" + "bindings": "^1.5.0", + "nan": "^2.12.1", + "node-pre-gyp": "*" }, "dependencies": { "abbrev": { @@ -1535,7 +1560,8 @@ "ansi-regex": { "version": "2.1.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "aproba": { "version": "1.2.0", @@ -1556,19 +1582,21 @@ "balanced-match": { "version": "1.0.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, "dev": true, + "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, "chownr": { - "version": "1.1.1", + "version": "1.1.3", "bundled": true, "dev": true, "optional": true @@ -1576,17 +1604,20 @@ "code-point-at": { "version": "1.1.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "concat-map": { "version": "0.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "console-control-strings": { "version": "1.1.0", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "core-util-is": { "version": "1.0.2", @@ -1595,12 +1626,12 @@ "optional": true }, "debug": { - "version": "2.6.9", + "version": "3.2.6", "bundled": true, "dev": true, "optional": true, "requires": { - "ms": "2.0.0" + "ms": "^2.1.1" } }, "deep-extend": { @@ -1622,12 +1653,12 @@ "optional": true }, "fs-minipass": { - "version": "1.2.5", + "version": "1.2.7", "bundled": true, "dev": true, "optional": true, "requires": { - "minipass": "^2.2.1" + "minipass": "^2.6.0" } }, "fs.realpath": { @@ -1653,7 +1684,7 @@ } }, "glob": { - "version": "7.1.3", + "version": "7.1.6", "bundled": true, "dev": true, "optional": true, @@ -1682,7 +1713,7 @@ } }, "ignore-walk": { - "version": "3.0.1", + "version": "3.0.3", "bundled": true, "dev": true, "optional": true, @@ -1701,9 +1732,10 @@ } }, "inherits": { - "version": "2.0.3", + "version": "2.0.4", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "ini": { "version": "1.3.5", @@ -1715,6 +1747,7 @@ "version": "1.0.0", "bundled": true, "dev": true, + "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -1729,6 +1762,7 @@ "version": "3.0.4", "bundled": true, "dev": true, + "optional": true, "requires": { "brace-expansion": "^1.1.7" } @@ -1736,53 +1770,56 @@ "minimist": { "version": "0.0.8", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "minipass": { - "version": "2.3.5", + "version": "2.9.0", "bundled": true, "dev": true, + "optional": true, "requires": { "safe-buffer": "^5.1.2", "yallist": "^3.0.0" } }, "minizlib": { - "version": "1.2.1", + "version": "1.3.3", "bundled": true, "dev": true, "optional": true, "requires": { - "minipass": "^2.2.1" + "minipass": "^2.9.0" } }, "mkdirp": { "version": "0.5.1", "bundled": true, "dev": true, + "optional": true, "requires": { "minimist": "0.0.8" } }, "ms": { - "version": "2.0.0", + "version": "2.1.2", "bundled": true, "dev": true, "optional": true }, "needle": { - "version": "2.2.4", + "version": "2.4.0", "bundled": true, "dev": true, "optional": true, "requires": { - "debug": "^2.1.2", + "debug": "^3.2.6", "iconv-lite": "^0.4.4", "sax": "^1.2.4" } }, "node-pre-gyp": { - "version": "0.10.3", + "version": "0.14.0", "bundled": true, "dev": true, "optional": true, @@ -1796,7 +1833,7 @@ "rc": "^1.2.7", "rimraf": "^2.6.1", "semver": "^5.3.0", - "tar": "^4" + "tar": "^4.4.2" } }, "nopt": { @@ -1810,13 +1847,22 @@ } }, "npm-bundled": { - "version": "1.0.5", + "version": "1.1.1", + "bundled": true, + "dev": true, + "optional": true, + "requires": { + "npm-normalize-package-bin": "^1.0.1" + } + }, + "npm-normalize-package-bin": { + "version": "1.0.1", "bundled": true, "dev": true, "optional": true }, "npm-packlist": { - "version": "1.2.0", + "version": "1.4.7", "bundled": true, "dev": true, "optional": true, @@ -1840,7 +1886,8 @@ "number-is-nan": { "version": "1.0.1", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "object-assign": { "version": "4.1.1", @@ -1852,6 +1899,7 @@ "version": "1.4.0", "bundled": true, "dev": true, + "optional": true, "requires": { "wrappy": "1" } @@ -1885,7 +1933,7 @@ "optional": true }, "process-nextick-args": { - "version": "2.0.0", + "version": "2.0.1", "bundled": true, "dev": true, "optional": true @@ -1926,7 +1974,7 @@ } }, "rimraf": { - "version": "2.6.3", + "version": "2.7.1", "bundled": true, "dev": true, "optional": true, @@ -1937,7 +1985,8 @@ "safe-buffer": { "version": "5.1.2", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "safer-buffer": { "version": "2.1.2", @@ -1952,7 +2001,7 @@ "optional": true }, "semver": { - "version": "5.6.0", + "version": "5.7.1", "bundled": true, "dev": true, "optional": true @@ -1973,6 +2022,7 @@ "version": "1.0.2", "bundled": true, "dev": true, + "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -1992,6 +2042,7 @@ "version": "3.0.1", "bundled": true, "dev": true, + "optional": true, "requires": { "ansi-regex": "^2.0.0" } @@ -2003,18 +2054,18 @@ "optional": true }, "tar": { - "version": "4.4.8", + "version": "4.4.13", "bundled": true, "dev": true, "optional": true, "requires": { "chownr": "^1.1.1", "fs-minipass": "^1.2.5", - "minipass": "^2.3.4", - "minizlib": "^1.1.1", + "minipass": "^2.8.6", + "minizlib": "^1.2.1", "mkdirp": "^0.5.0", "safe-buffer": "^5.1.2", - "yallist": "^3.0.2" + "yallist": "^3.0.3" } }, "util-deprecate": { @@ -2035,12 +2086,14 @@ "wrappy": { "version": "1.0.2", "bundled": true, - "dev": true + "dev": true, + "optional": true }, "yallist": { - "version": "3.0.3", + "version": "3.1.1", "bundled": true, - "dev": true + "dev": true, + "optional": true } } }, @@ -2196,9 +2249,9 @@ } }, "graceful-fs": { - "version": "4.1.15", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.15.tgz", - "integrity": "sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA==", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.3.tgz", + "integrity": "sha512-a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ==", "dev": true }, "growl": { @@ -2208,21 +2261,21 @@ "dev": true }, "gulp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/gulp/-/gulp-4.0.0.tgz", - "integrity": "sha1-lXZsYB2t5Kd+0+eyttwDiBtZY2Y=", + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/gulp/-/gulp-4.0.2.tgz", + "integrity": "sha512-dvEs27SCZt2ibF29xYgmnwwCYZxdxhQ/+LFWlbAW8y7jt68L/65402Lz3+CKy0Ov4rOs+NERmDq7YlZaDqUIfA==", "dev": true, "requires": { - "glob-watcher": "^5.0.0", - "gulp-cli": "^2.0.0", - "undertaker": "^1.0.0", + "glob-watcher": "^5.0.3", + "gulp-cli": "^2.2.0", + "undertaker": "^1.2.1", "vinyl-fs": "^3.0.0" }, "dependencies": { "gulp-cli": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/gulp-cli/-/gulp-cli-2.0.1.tgz", - "integrity": "sha512-RxujJJdN8/O6IW2nPugl7YazhmrIEjmiVfPKrWt68r71UCaLKS71Hp0gpKT+F6qOUFtr7KqtifDKaAJPRVvMYQ==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/gulp-cli/-/gulp-cli-2.2.0.tgz", + "integrity": "sha512-rGs3bVYHdyJpLqR0TUBnlcZ1O5O++Zs4bA0ajm+zr3WFCfiSLjGwoCBqFs18wzN+ZxahT9DkOK5nDf26iDsWjA==", "dev": true, "requires": { "ansi-colors": "^1.0.1", @@ -2235,7 +2288,7 @@ "gulplog": "^1.0.0", "interpret": "^1.1.0", "isobject": "^3.0.1", - "liftoff": "^2.5.0", + "liftoff": "^3.1.0", "matchdep": "^2.0.0", "mute-stdout": "^1.0.0", "pretty-hrtime": "^1.0.0", @@ -2429,9 +2482,9 @@ } }, "hosted-git-info": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.7.1.tgz", - "integrity": "sha512-7T/BxH19zbcCTa8XkMlbK5lTo1WtgkFi3GvdWEyNuc4Vex7/9Dqbnpsf4JMydcfj9HCg4zUWFTL3Za6lapg5/w==", + "version": "2.8.5", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.5.tgz", + "integrity": "sha512-kssjab8CvdXfcXMXVcvsXum4Hwdq9XGtRD3TteMEvEbq0LXyiNQr6AprqKqfeaDXze7SxWvRxdpwE6ku7ikLkg==", "dev": true }, "html-encoding-sniffer": { @@ -2621,9 +2674,9 @@ } }, "is-glob": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.0.tgz", - "integrity": "sha1-lSHHaEXMJhCoUgPd8ICpWML/q8A=", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", + "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", "dev": true, "requires": { "is-extglob": "^2.1.1" @@ -2919,13 +2972,13 @@ } }, "liftoff": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/liftoff/-/liftoff-2.5.0.tgz", - "integrity": "sha1-IAkpG7Mc6oYbvxCnwVooyvdcMew=", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/liftoff/-/liftoff-3.1.0.tgz", + "integrity": "sha512-DlIPlJUkCV0Ips2zf2pJP0unEoT1kwYhiiPUGF3s/jtxTCjziNLoiVVh+jqWOWeFi6mmwQ5fNxvAUyPad4Dfog==", "dev": true, "requires": { "extend": "^3.0.0", - "findup-sync": "^2.0.0", + "findup-sync": "^3.0.0", "fined": "^1.0.1", "flagged-respawn": "^1.0.0", "is-plain-object": "^2.0.4", @@ -3075,6 +3128,29 @@ "micromatch": "^3.0.4", "resolve": "^1.4.0", "stack-trace": "0.0.10" + }, + "dependencies": { + "findup-sync": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-2.0.0.tgz", + "integrity": "sha1-kyaxSIwi0aYIhlCoaQGy2akKLLw=", + "dev": true, + "requires": { + "detect-file": "^1.0.0", + "is-glob": "^3.1.0", + "micromatch": "^3.0.4", + "resolve-dir": "^1.0.1" + } + }, + "is-glob": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", + "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", + "dev": true, + "requires": { + "is-extglob": "^2.1.0" + } + } } }, "mem": { @@ -3267,9 +3343,9 @@ "dev": true }, "nan": { - "version": "2.13.2", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.13.2.tgz", - "integrity": "sha512-TghvYc72wlMGMVMluVo9WRJc0mB8KxxF/gZ4YYFy7V2ZQX9l7rgbPg7vjS9mt6U5HXODVFVI2bOduCzwOMv/lw==", + "version": "2.14.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.0.tgz", + "integrity": "sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg==", "dev": true, "optional": true }, @@ -3344,9 +3420,9 @@ } }, "now-and-later": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/now-and-later/-/now-and-later-2.0.0.tgz", - "integrity": "sha1-vGHLtFbXnLMiB85HygUTb/Ln1u4=", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/now-and-later/-/now-and-later-2.0.1.tgz", + "integrity": "sha512-KGvQ0cB70AQfg107Xvs/Fbu+dGmZoTRJp2TaPwcwQm3/7PteUyN2BCgk8KBMPGBUXZdVwyWS8fDCGFygBm19UQ==", "dev": true, "requires": { "once": "^1.3.2" @@ -3738,9 +3814,9 @@ "dev": true }, "process-nextick-args": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", - "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", "dev": true }, "psl": { @@ -4020,9 +4096,9 @@ "dev": true }, "resolve": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.10.0.tgz", - "integrity": "sha512-3sUr9aq5OfSg2S9pNtPA9hL1FVEAjvfOC4leW0SNf/mpnaakz2a9femSd6LqAww2RaFctwyf1lCqnTHuF1rxDg==", + "version": "1.14.2", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.14.2.tgz", + "integrity": "sha512-EjlOBLBO1kxsUxsKjLt7TAECyKW6fOh1VRkykQkKGzcBbjjPIxBqGh0jf7GJ3k/f5mxMqW3htMD3WdTUVtW8HQ==", "dev": true, "requires": { "path-parse": "^1.0.6" @@ -4300,12 +4376,12 @@ "dev": true }, "source-map-resolve": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.2.tgz", - "integrity": "sha512-MjqsvNwyz1s0k81Goz/9vRBe9SZdB09Bdw+/zYyO+3CuPk6fouTaxscHkgtE8jKvf01kVfl8riHzERQ/kefaSA==", + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.3.tgz", + "integrity": "sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw==", "dev": true, "requires": { - "atob": "^2.1.1", + "atob": "^2.1.2", "decode-uri-component": "^0.2.0", "resolve-url": "^0.2.1", "source-map-url": "^0.4.0", @@ -4351,9 +4427,9 @@ } }, "spdx-license-ids": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.3.tgz", - "integrity": "sha512-uBIcIl3Ih6Phe3XHK1NqboJLdGfwr1UN3k6wSD1dZpmPsIkb8AGNbZYJ1fOBk834+Gxy8rpfDxrS6XLEMZMY2g==", + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.5.tgz", + "integrity": "sha512-J+FWzZoynJEXGphVIS+XEh3kFSjZX/1i9gFBaWQcB+/tmpe2qUsSBABpcxqxnAxFdiUFEgAX1bjYGQvIZmoz9Q==", "dev": true }, "split-string": { @@ -4428,9 +4504,9 @@ "dev": true }, "stream-shift": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.0.tgz", - "integrity": "sha1-1cdSgl5TZ+eG944Y5EXqIjoVWVI=", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.1.tgz", + "integrity": "sha512-AiisoFqQ0vbGcZgQPY1cdP2I76glaVA/RauYR4G4thNFgkTqr90yXTo4LYX60Jl+sIlPNHHdGSwo01AvbKUSVQ==", "dev": true }, "string-width": { @@ -4641,6 +4717,12 @@ "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", "dev": true }, + "type": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/type/-/type-1.2.0.tgz", + "integrity": "sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg==", + "dev": true + }, "type-check": { "version": "0.3.2", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", @@ -4687,9 +4769,9 @@ "dev": true }, "undertaker": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/undertaker/-/undertaker-1.2.0.tgz", - "integrity": "sha1-M52kZGJS0ILcN45wgGcpl1DhG0k=", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/undertaker/-/undertaker-1.2.1.tgz", + "integrity": "sha512-71WxIzDkgYk9ZS+spIB8iZXchFhAdEo2YU8xYqBYJ39DIUIqziK78ftm26eecoIY49X0J2MLhG4hr18Yp6/CMA==", "dev": true, "requires": { "arr-flatten": "^1.0.1", @@ -4772,9 +4854,9 @@ } }, "upath": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/upath/-/upath-1.1.2.tgz", - "integrity": "sha512-kXpym8nmDmlCBr7nKdIx8P2jNBa+pBpIUFRnKJ4dr8htyYGJFokkr2ZvERRtUN+9SY+JqXouNgUPtv6JQva/2Q==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/upath/-/upath-1.2.0.tgz", + "integrity": "sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg==", "dev": true }, "uri-js": { @@ -4811,9 +4893,9 @@ "dev": true }, "v8flags": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/v8flags/-/v8flags-3.1.2.tgz", - "integrity": "sha512-MtivA7GF24yMPte9Rp/BWGCYQNaUj86zeYxV/x2RRJMKagImbbv3u8iJC57lNhWLPcGLJmHcHmFWkNsplbbLWw==", + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/v8flags/-/v8flags-3.1.3.tgz", + "integrity": "sha512-amh9CCg3ZxkzQ48Mhcb8iX7xpAfYJgePHxWMQCBWECpOSqJUXgY26ncA61UTV0BkPqfhcy6mzwCIoP4ygxpW8w==", "dev": true, "requires": { "homedir-polyfill": "^1.0.1" diff --git a/package.json b/package.json index 7775daac72..8438d2c5a8 100755 --- a/package.json +++ b/package.json @@ -30,7 +30,7 @@ }, "devDependencies": { "chai": "^4.2.0", - "gulp": "^4.0.0", + "gulp": "^4.0.2", "gulp-concat": "^2.3.4", "gulp-header": "^2.0.7", "gulp-rename": "^1.2.0", From 2a570fd49ffb0af98e419a6f3444570a5e1d564f Mon Sep 17 00:00:00 2001 From: Saswat Padhi Date: Sun, 12 Jan 2020 02:23:06 -0800 Subject: [PATCH 0427/1100] OCaml: Improvements (#2179) - Added some missing keywords - Added highlighting for modules, labels, and constructors - Split polymorphic variant types and type variables --- components/prism-ocaml.js | 26 ++++++++++++++----- components/prism-ocaml.min.js | 2 +- examples/prism-ocaml.html | 7 ++--- tests/languages/ocaml/keyword_feature.test | 10 ++++--- tests/languages/ocaml/label_feature.test | 13 ++++++++++ tests/languages/ocaml/module_feature.test | 15 +++++++++++ tests/languages/ocaml/number_feature.test | 4 +++ tests/languages/ocaml/operator_feature.test | 8 +++--- ...eature.test => type_variable_feature.test} | 10 +++---- tests/languages/ocaml/variant_feature.test | 15 +++++++++++ 10 files changed, 85 insertions(+), 25 deletions(-) create mode 100644 tests/languages/ocaml/label_feature.test create mode 100644 tests/languages/ocaml/module_feature.test rename tests/languages/ocaml/{type_feature.test => type_variable_feature.test} (50%) create mode 100644 tests/languages/ocaml/variant_feature.test diff --git a/components/prism-ocaml.js b/components/prism-ocaml.js index 09e13bb079..849c3af27b 100644 --- a/components/prism-ocaml.js +++ b/components/prism-ocaml.js @@ -11,17 +11,31 @@ Prism.languages.ocaml = { } ], 'number': /\b(?:0x[\da-f][\da-f_]+|(?:0[bo])?\d[\d_]*\.?[\d_]*(?:e[+-]?[\d_]+)?)/i, - 'type': { - pattern: /\B['`]\w*/, - alias: 'variable' - }, 'directive': { pattern: /\B#\w+/, + alias: 'important' + }, + 'label': { + pattern: /\B~\w+/, + alias: 'function' + }, + 'type_variable': { + pattern: /\B'\w+/, alias: 'function' }, - 'keyword': /\b(?:as|assert|begin|class|constraint|do|done|downto|else|end|exception|external|for|fun|function|functor|if|in|include|inherit|initializer|lazy|let|match|method|module|mutable|new|object|of|open|prefix|private|rec|then|sig|struct|to|try|type|val|value|virtual|where|while|with)\b/, + 'variant': { + pattern: /`\w+/, + alias: 'variable' + }, + 'module': { + pattern: /\b[A-Z]\w+/, + alias: 'variable' + }, + // For the list of keywords and operators, + // see: http://caml.inria.fr/pub/docs/manual-ocaml/lex.html#sec84 + 'keyword': /\b(?:as|assert|begin|class|constraint|do|done|downto|else|end|exception|external|for|fun|function|functor|if|in|include|inherit|initializer|lazy|let|match|method|module|mutable|new|nonrec|object|of|open|private|rec|sig|struct|then|to|try|type|val|value|virtual|when|where|while|with)\b/, 'boolean': /\b(?:false|true)\b/, // Custom operators are allowed - 'operator': /:=|[=<>@^|&+\-*\/$%!?~][!$%&*+\-.\/:<=>?@^|~]*|\b(?:and|asr|land|lor|lxor|lsl|lsr|mod|nor|or)\b/, + 'operator': /:=|[=<>@^|&+\-*\/$%!?~][!$%&*+\-.\/:<=>?@^|~]*|\b(?:and|asr|land|lor|lsl|lsr|lxor|mod|or)\b/, 'punctuation': /[(){}\[\]|_.,:;]/ }; \ No newline at end of file diff --git a/components/prism-ocaml.min.js b/components/prism-ocaml.min.js index 704dada207..25114ede1c 100644 --- a/components/prism-ocaml.min.js +++ b/components/prism-ocaml.min.js @@ -1 +1 @@ -Prism.languages.ocaml={comment:/\(\*[\s\S]*?\*\)/,string:[{pattern:/"(?:\\.|[^\\\r\n"])*"/,greedy:!0},{pattern:/(['`])(?:\\(?:\d+|x[\da-f]+|.)|(?!\1)[^\\\r\n])\1/i,greedy:!0}],number:/\b(?:0x[\da-f][\da-f_]+|(?:0[bo])?\d[\d_]*\.?[\d_]*(?:e[+-]?[\d_]+)?)/i,type:{pattern:/\B['`]\w*/,alias:"variable"},directive:{pattern:/\B#\w+/,alias:"function"},keyword:/\b(?:as|assert|begin|class|constraint|do|done|downto|else|end|exception|external|for|fun|function|functor|if|in|include|inherit|initializer|lazy|let|match|method|module|mutable|new|object|of|open|prefix|private|rec|then|sig|struct|to|try|type|val|value|virtual|where|while|with)\b/,boolean:/\b(?:false|true)\b/,operator:/:=|[=<>@^|&+\-*\/$%!?~][!$%&*+\-.\/:<=>?@^|~]*|\b(?:and|asr|land|lor|lxor|lsl|lsr|mod|nor|or)\b/,punctuation:/[(){}\[\]|_.,:;]/}; \ No newline at end of file +Prism.languages.ocaml={comment:/\(\*[\s\S]*?\*\)/,string:[{pattern:/"(?:\\.|[^\\\r\n"])*"/,greedy:!0},{pattern:/(['`])(?:\\(?:\d+|x[\da-f]+|.)|(?!\1)[^\\\r\n])\1/i,greedy:!0}],number:/\b(?:0x[\da-f][\da-f_]+|(?:0[bo])?\d[\d_]*\.?[\d_]*(?:e[+-]?[\d_]+)?)/i,directive:{pattern:/\B#\w+/,alias:"important"},label:{pattern:/\B~\w+/,alias:"function"},type_variable:{pattern:/\B'\w+/,alias:"function"},variant:{pattern:/`\w+/,alias:"variable"},module:{pattern:/\b[A-Z]\w+/,alias:"variable"},keyword:/\b(?:as|assert|begin|class|constraint|do|done|downto|else|end|exception|external|for|fun|function|functor|if|in|include|inherit|initializer|lazy|let|match|method|module|mutable|new|nonrec|object|of|open|private|rec|sig|struct|then|to|try|type|val|value|virtual|when|where|while|with)\b/,boolean:/\b(?:false|true)\b/,operator:/:=|[=<>@^|&+\-*\/$%!?~][!$%&*+\-.\/:<=>?@^|~]*|\b(?:and|asr|land|lor|lsl|lsr|lxor|mod|or)\b/,punctuation:/[(){}\[\]|_.,:;]/}; \ No newline at end of file diff --git a/examples/prism-ocaml.html b/examples/prism-ocaml.html index 46ee6dc831..85aa10750d 100644 --- a/examples/prism-ocaml.html +++ b/examples/prism-ocaml.html @@ -9,7 +9,8 @@

        Numbers

        42. 2.4E+2 10_452_102 -0xf4 0xff_10_41 +0xf4 +0xff_10_41 0o427 0b1100_1111_0000 @@ -29,7 +30,7 @@

        Full example

        (** [create low high] creates a new interval from [low] to [high]. If [low > high], then the interval is empty *) - let create low high = + let create ~low ~high = if Endpoint.compare low high > 0 then Empty else Interval (low,high) @@ -54,6 +55,6 @@

        Full example

        match t1,t2 with | Empty, _ | _, Empty -> Empty | Interval (l1,h1), Interval (l2,h2) -> - create (max l1 l2) (min h1 h2) + create ~low:(max l1 l2) ~high:(min h1 h2) end ;; diff --git a/tests/languages/ocaml/keyword_feature.test b/tests/languages/ocaml/keyword_feature.test index 2259da66b5..dd864806d9 100644 --- a/tests/languages/ocaml/keyword_feature.test +++ b/tests/languages/ocaml/keyword_feature.test @@ -26,21 +26,22 @@ method module mutable new +nonrec object of open -prefix private rec -then sig struct +then to try type val value virtual +when where while with @@ -76,21 +77,22 @@ with ["keyword", "module"], ["keyword", "mutable"], ["keyword", "new"], + ["keyword", "nonrec"], ["keyword", "object"], ["keyword", "of"], ["keyword", "open"], - ["keyword", "prefix"], ["keyword", "private"], ["keyword", "rec"], - ["keyword", "then"], ["keyword", "sig"], ["keyword", "struct"], + ["keyword", "then"], ["keyword", "to"], ["keyword", "try"], ["keyword", "type"], ["keyword", "val"], ["keyword", "value"], ["keyword", "virtual"], + ["keyword", "when"], ["keyword", "where"], ["keyword", "while"], ["keyword", "with"] diff --git a/tests/languages/ocaml/label_feature.test b/tests/languages/ocaml/label_feature.test new file mode 100644 index 0000000000..71b9bd4616 --- /dev/null +++ b/tests/languages/ocaml/label_feature.test @@ -0,0 +1,13 @@ +~foo +~bar_42 + +---------------------------------------------------- + +[ + ["label", "~foo"], + ["label", "~bar_42"] +] + +---------------------------------------------------- + +Checks for labels. \ No newline at end of file diff --git a/tests/languages/ocaml/module_feature.test b/tests/languages/ocaml/module_feature.test new file mode 100644 index 0000000000..006d259e48 --- /dev/null +++ b/tests/languages/ocaml/module_feature.test @@ -0,0 +1,15 @@ +Foo +Bar42 +Baz_42 + +---------------------------------------------------- + +[ + ["module", "Foo"], + ["module", "Bar42"], + ["module", "Baz_42"] +] + +---------------------------------------------------- + +Checks for modules. \ No newline at end of file diff --git a/tests/languages/ocaml/number_feature.test b/tests/languages/ocaml/number_feature.test index 2076a5cbe4..6ade2114e8 100644 --- a/tests/languages/ocaml/number_feature.test +++ b/tests/languages/ocaml/number_feature.test @@ -1,3 +1,5 @@ +1234 +32. 0xBad_Face 0o754_672 0b1010_1111 @@ -10,6 +12,8 @@ ---------------------------------------------------- [ + ["number", "1234"], + ["number", "32."], ["number", "0xBad_Face"], ["number", "0o754_672"], ["number", "0b1010_1111"], diff --git a/tests/languages/ocaml/operator_feature.test b/tests/languages/ocaml/operator_feature.test index 75c8f01848..50047fe8dc 100644 --- a/tests/languages/ocaml/operator_feature.test +++ b/tests/languages/ocaml/operator_feature.test @@ -1,6 +1,6 @@ and asr land -lor lxor lsl lsr -mod nor or +lor lsl lsr +lxor mod or := = < > @ @@ -14,8 +14,8 @@ $ % ! ? [ ["operator", "and"], ["operator", "asr"], ["operator", "land"], - ["operator", "lor"], ["operator", "lxor"], ["operator", "lsl"], ["operator", "lsr"], - ["operator", "mod"], ["operator", "nor"], ["operator", "or"], + ["operator", "lor"], ["operator", "lsl"], ["operator", "lsr"], + ["operator", "lxor"], ["operator", "mod"], ["operator", "or"], ["operator", ":="], ["operator", "="], ["operator", "<"], ["operator", ">"], ["operator", "@"], diff --git a/tests/languages/ocaml/type_feature.test b/tests/languages/ocaml/type_variable_feature.test similarity index 50% rename from tests/languages/ocaml/type_feature.test rename to tests/languages/ocaml/type_variable_feature.test index f6fdd68648..7f680e47fe 100644 --- a/tests/languages/ocaml/type_feature.test +++ b/tests/languages/ocaml/type_variable_feature.test @@ -1,17 +1,13 @@ 'Foo 'bar_42 -`Foo -`bar_42 ---------------------------------------------------- [ - ["type", "'Foo"], - ["type", "'bar_42"], - ["type", "`Foo"], - ["type", "`bar_42"] + ["type_variable", "'Foo"], + ["type_variable", "'bar_42"] ] ---------------------------------------------------- -Checks for types. \ No newline at end of file +Checks for type variables. \ No newline at end of file diff --git a/tests/languages/ocaml/variant_feature.test b/tests/languages/ocaml/variant_feature.test new file mode 100644 index 0000000000..5cc7242566 --- /dev/null +++ b/tests/languages/ocaml/variant_feature.test @@ -0,0 +1,15 @@ +`Foo +`bar32 +`Baz_42 + +---------------------------------------------------- + +[ + ["variant", "`Foo"], + ["variant", "`bar32"], + ["variant", "`Baz_42"] +] + +---------------------------------------------------- + +Checks for polymorphic variants. \ No newline at end of file From dc136fd37bda0ccde586aeee8ade5f32233d0ce6 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Mon, 13 Jan 2020 14:37:43 +0100 Subject: [PATCH 0428/1100] Updated changelog for 1.19.0 (#2169) This also includes a small update to the changelog generation to account for `dependencies.js`. --- CHANGELOG.md | 52 ++++++++++++++++++++++++++++++++++++++++ gulpfile.js/changelog.js | 7 ++++++ 2 files changed, 59 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3dc4286a12..12bfd09742 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,57 @@ # Prism Changelog +## 1.19.0 (2020-01-12) + +### New components + +* __Latte__ ([#2140](https://github.com/PrismJS/prism/issues/2140)) [`694a81b8`](https://github.com/PrismJS/prism/commit/694a81b8) +* __Neon__ ([#2140](https://github.com/PrismJS/prism/issues/2140)) [`694a81b8`](https://github.com/PrismJS/prism/commit/694a81b8) +* __QML__ ([#2139](https://github.com/PrismJS/prism/issues/2139)) [`c40d96c6`](https://github.com/PrismJS/prism/commit/c40d96c6) + +### Updated components + +* __Handlebars__ + * Added support for `:` and improved the `variable` pattern ([#2172](https://github.com/PrismJS/prism/issues/2172)) [`ef4d29d9`](https://github.com/PrismJS/prism/commit/ef4d29d9) +* __JavaScript__ + * Added support for keywords after a spread operator ([#2148](https://github.com/PrismJS/prism/issues/2148)) [`1f3f8929`](https://github.com/PrismJS/prism/commit/1f3f8929) + * Better regex detection ([#2158](https://github.com/PrismJS/prism/issues/2158)) [`a23d8f84`](https://github.com/PrismJS/prism/commit/a23d8f84) +* __Markdown__ + * Better language detection for code blocks ([#2114](https://github.com/PrismJS/prism/issues/2114)) [`d7ad48f9`](https://github.com/PrismJS/prism/commit/d7ad48f9) +* __OCaml__ + * Improvements ([#2179](https://github.com/PrismJS/prism/issues/2179)) [`2a570fd4`](https://github.com/PrismJS/prism/commit/2a570fd4) +* __PHP__ + * Fixed exponential runtime of a pattern ([#2157](https://github.com/PrismJS/prism/issues/2157)) [`24c8f833`](https://github.com/PrismJS/prism/commit/24c8f833) +* __React JSX__ + * Improved spread operator in tag attributes ([#2159](https://github.com/PrismJS/prism/issues/2159)) [`fd857e7b`](https://github.com/PrismJS/prism/commit/fd857e7b) + * Made `$` a valid character for attribute names ([#2144](https://github.com/PrismJS/prism/issues/2144)) [`f018cf04`](https://github.com/PrismJS/prism/commit/f018cf04) +* __Reason__ + * Added support for single line comments ([#2150](https://github.com/PrismJS/prism/issues/2150)) [`7f1c55b7`](https://github.com/PrismJS/prism/commit/7f1c55b7) +* __Ruby__ + * Override 'class-name' definition ([#2135](https://github.com/PrismJS/prism/issues/2135)) [`401d4b02`](https://github.com/PrismJS/prism/commit/401d4b02) +* __SAS__ + * Added CASL support ([#2112](https://github.com/PrismJS/prism/issues/2112)) [`99d979a0`](https://github.com/PrismJS/prism/commit/99d979a0) + +### Updated plugins + +* __Custom Class__ + * Fixed TypeError when mapper is undefined ([#2167](https://github.com/PrismJS/prism/issues/2167)) [`543f04d7`](https://github.com/PrismJS/prism/commit/543f04d7) + +### Updated themes + +* Added missing `.token` selector ([#2161](https://github.com/PrismJS/prism/issues/2161)) [`86780457`](https://github.com/PrismJS/prism/commit/86780457) + +### Other + +* Added a check for redundant dependency declarations ([#2142](https://github.com/PrismJS/prism/issues/2142)) [`a06aca06`](https://github.com/PrismJS/prism/commit/a06aca06) +* Added a check for examples ([#2128](https://github.com/PrismJS/prism/issues/2128)) [`0b539136`](https://github.com/PrismJS/prism/commit/0b539136) +* Added silent option to `loadLanguages` ([#2147](https://github.com/PrismJS/prism/issues/2147)) [`191b4116`](https://github.com/PrismJS/prism/commit/191b4116) +* __Infrastructure__ + * Dependencies: Improved `getLoader` ([#2151](https://github.com/PrismJS/prism/issues/2151)) [`199bdcae`](https://github.com/PrismJS/prism/commit/199bdcae) + * Updated gulp to v4.0.2 ([#2178](https://github.com/PrismJS/prism/issues/2178)) [`e5678a00`](https://github.com/PrismJS/prism/commit/e5678a00) +* __Website__ + * Custom Class: Fixed examples ([#2160](https://github.com/PrismJS/prism/issues/2160)) [`0c2fe405`](https://github.com/PrismJS/prism/commit/0c2fe405) + * Added documentation for new dependency API ([#2141](https://github.com/PrismJS/prism/issues/2141)) [`59068d67`](https://github.com/PrismJS/prism/commit/59068d67) + ## 1.18.0 (2020-01-04) ### New components diff --git a/gulpfile.js/changelog.js b/gulpfile.js/changelog.js index 62b70e4e7d..147344ee5c 100644 --- a/gulpfile.js/changelog.js +++ b/gulpfile.js/changelog.js @@ -309,6 +309,13 @@ async function changes() { addEntry('Other >> Infrastructure', info); return true; } + + // or dependencies.js + const excludeTests = info.changes.filter(notTests); + if (excludeTests.length === 1 && excludeTests[0].file === 'dependencies.js') { + addEntry('Other >> Infrastructure', info); + return true; + } }, function changedWebsite(info) { From 275366f72fd858ec90850430557a3662d340abfa Mon Sep 17 00:00:00 2001 From: mAAdhaTTah Date: Mon, 13 Jan 2020 08:39:18 -0500 Subject: [PATCH 0429/1100] Fix date in CHANGELOG --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 12bfd09742..cc4602278d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Prism Changelog -## 1.19.0 (2020-01-12) +## 1.19.0 (2020-01-13) ### New components From 6fd5c96b90a7724b8b1dbad1c44c0ee70068f4f3 Mon Sep 17 00:00:00 2001 From: mAAdhaTTah Date: Mon, 13 Jan 2020 08:39:40 -0500 Subject: [PATCH 0430/1100] 1.19.0 --- package-lock.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index 5587386d34..30f37582f7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "prismjs", - "version": "1.18.0", + "version": "1.19.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 8438d2c5a8..0a85c9499c 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "prismjs", - "version": "1.18.0", + "version": "1.19.0", "description": "Lightweight, robust, elegant syntax highlighting. A spin-off project from Dabblet.", "main": "prism.js", "style": "themes/prism.css", From 5450e24cc2a28257d6740ac4872a40aee8f81f7a Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Wed, 15 Jan 2020 15:04:09 +0100 Subject: [PATCH 0431/1100] Elixir: Added support for attributes names ending with `?` (#2182) --- components/prism-elixir.js | 2 +- components/prism-elixir.min.js | 2 +- tests/languages/elixir/attr-name_feature.test | 8 +++++--- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/components/prism-elixir.js b/components/prism-elixir.js index 0f912754ba..c96dd4c4fa 100644 --- a/components/prism-elixir.js +++ b/components/prism-elixir.js @@ -37,7 +37,7 @@ Prism.languages.elixir = { alias: 'symbol' }, // Look-ahead prevents bad highlighting of the :: operator - 'attr-name': /\w+:(?!:)/, + 'attr-name': /\w+\??:(?!:)/, 'capture': { // Look-behind prevents bad highlighting of the && operator pattern: /(^|[^&])&(?:[^&\s\d()][^\s()]*|(?=\())/, diff --git a/components/prism-elixir.min.js b/components/prism-elixir.min.js index 577e882ed0..25fd99f0dc 100644 --- a/components/prism-elixir.min.js +++ b/components/prism-elixir.min.js @@ -1 +1 @@ -Prism.languages.elixir={comment:/#.*/m,regex:{pattern:/~[rR](?:("""|''')(?:\\[\s\S]|(?!\1)[^\\])+\1|([\/|"'])(?:\\.|(?!\2)[^\\\r\n])+\2|\((?:\\.|[^\\)\r\n])+\)|\[(?:\\.|[^\\\]\r\n])+\]|\{(?:\\.|[^\\}\r\n])+\}|<(?:\\.|[^\\>\r\n])+>)[uismxfr]*/,greedy:!0},string:[{pattern:/~[cCsSwW](?:("""|''')(?:\\[\s\S]|(?!\1)[^\\])+\1|([\/|"'])(?:\\.|(?!\2)[^\\\r\n])+\2|\((?:\\.|[^\\)\r\n])+\)|\[(?:\\.|[^\\\]\r\n])+\]|\{(?:\\.|#\{[^}]+\}|[^\\}\r\n])+\}|<(?:\\.|[^\\>\r\n])+>)[csa]?/,greedy:!0,inside:{}},{pattern:/("""|''')[\s\S]*?\1/,greedy:!0,inside:{}},{pattern:/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0,inside:{}}],atom:{pattern:/(^|[^:]):\w+/,lookbehind:!0,alias:"symbol"},"attr-name":/\w+:(?!:)/,capture:{pattern:/(^|[^&])&(?:[^&\s\d()][^\s()]*|(?=\())/,lookbehind:!0,alias:"function"},argument:{pattern:/(^|[^&])&\d+/,lookbehind:!0,alias:"variable"},attribute:{pattern:/@\w+/,alias:"variable"},number:/\b(?:0[box][a-f\d_]+|\d[\d_]*)(?:\.[\d_]+)?(?:e[+-]?[\d_]+)?\b/i,keyword:/\b(?:after|alias|and|case|catch|cond|def(?:callback|exception|impl|module|p|protocol|struct)?|do|else|end|fn|for|if|import|not|or|require|rescue|try|unless|use|when)\b/,boolean:/\b(?:true|false|nil)\b/,operator:[/\bin\b|&&?|\|[|>]?|\\\\|::|\.\.\.?|\+\+?|-[->]?|<[-=>]|>=|!==?|\B!|=(?:==?|[>~])?|[*\/^]/,{pattern:/([^<])<(?!<)/,lookbehind:!0},{pattern:/([^>])>(?!>)/,lookbehind:!0}],punctuation:/<<|>>|[.,%\[\]{}()]/},Prism.languages.elixir.string.forEach(function(e){e.inside={interpolation:{pattern:/#\{[^}]+\}/,inside:{delimiter:{pattern:/^#\{|\}$/,alias:"punctuation"},rest:Prism.languages.elixir}}}}); \ No newline at end of file +Prism.languages.elixir={comment:/#.*/m,regex:{pattern:/~[rR](?:("""|''')(?:\\[\s\S]|(?!\1)[^\\])+\1|([\/|"'])(?:\\.|(?!\2)[^\\\r\n])+\2|\((?:\\.|[^\\)\r\n])+\)|\[(?:\\.|[^\\\]\r\n])+\]|\{(?:\\.|[^\\}\r\n])+\}|<(?:\\.|[^\\>\r\n])+>)[uismxfr]*/,greedy:!0},string:[{pattern:/~[cCsSwW](?:("""|''')(?:\\[\s\S]|(?!\1)[^\\])+\1|([\/|"'])(?:\\.|(?!\2)[^\\\r\n])+\2|\((?:\\.|[^\\)\r\n])+\)|\[(?:\\.|[^\\\]\r\n])+\]|\{(?:\\.|#\{[^}]+\}|[^\\}\r\n])+\}|<(?:\\.|[^\\>\r\n])+>)[csa]?/,greedy:!0,inside:{}},{pattern:/("""|''')[\s\S]*?\1/,greedy:!0,inside:{}},{pattern:/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0,inside:{}}],atom:{pattern:/(^|[^:]):\w+/,lookbehind:!0,alias:"symbol"},"attr-name":/\w+\??:(?!:)/,capture:{pattern:/(^|[^&])&(?:[^&\s\d()][^\s()]*|(?=\())/,lookbehind:!0,alias:"function"},argument:{pattern:/(^|[^&])&\d+/,lookbehind:!0,alias:"variable"},attribute:{pattern:/@\w+/,alias:"variable"},number:/\b(?:0[box][a-f\d_]+|\d[\d_]*)(?:\.[\d_]+)?(?:e[+-]?[\d_]+)?\b/i,keyword:/\b(?:after|alias|and|case|catch|cond|def(?:callback|exception|impl|module|p|protocol|struct)?|do|else|end|fn|for|if|import|not|or|require|rescue|try|unless|use|when)\b/,boolean:/\b(?:true|false|nil)\b/,operator:[/\bin\b|&&?|\|[|>]?|\\\\|::|\.\.\.?|\+\+?|-[->]?|<[-=>]|>=|!==?|\B!|=(?:==?|[>~])?|[*\/^]/,{pattern:/([^<])<(?!<)/,lookbehind:!0},{pattern:/([^>])>(?!>)/,lookbehind:!0}],punctuation:/<<|>>|[.,%\[\]{}()]/},Prism.languages.elixir.string.forEach(function(e){e.inside={interpolation:{pattern:/#\{[^}]+\}/,inside:{delimiter:{pattern:/^#\{|\}$/,alias:"punctuation"},rest:Prism.languages.elixir}}}}); \ No newline at end of file diff --git a/tests/languages/elixir/attr-name_feature.test b/tests/languages/elixir/attr-name_feature.test index de7cadc898..a6f9d8bfef 100644 --- a/tests/languages/elixir/attr-name_feature.test +++ b/tests/languages/elixir/attr-name_feature.test @@ -1,7 +1,8 @@ [a: 1, b: 2] do: :this, else: :that where: foo, -select: bar +select: bar, +attr?: a ---------------------------------------------------- @@ -16,9 +17,10 @@ select: bar ["punctuation", ","], ["attr-name", "else:"], ["atom", ":that"], ["attr-name", "where:"], " foo", ["punctuation", ","], - ["attr-name", "select:"], " bar" + ["attr-name", "select:"], " bar", ["punctuation", ","], + ["attr-name", "attr?:"], " a" ] ---------------------------------------------------- -Checks for keyword list keys. \ No newline at end of file +Checks for keyword list keys. From 81e1c3ddadda5451fb5b9743c5201b7452d1ae3e Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Sat, 18 Jan 2020 17:23:39 +0100 Subject: [PATCH 0432/1100] Tests: Added new pattern check for octal escapes (#2189) This adds a new pattern check to disallow octal character escapes (e.g. `\12`). --- components/prism-bash.js | 4 +- components/prism-bash.min.js | 2 +- components/prism-shell-session.js | 59 +++++++++++++------ components/prism-shell-session.min.js | 2 +- .../shell-session/command_string_feature.test | 34 +++++++++++ tests/pattern-tests.js | 12 ++++ 6 files changed, 90 insertions(+), 23 deletions(-) diff --git a/components/prism-bash.js b/components/prism-bash.js index 32cb1551cf..a68fab2aff 100644 --- a/components/prism-bash.js +++ b/components/prism-bash.js @@ -107,7 +107,7 @@ 'string': [ // Support for Here-documents https://en.wikipedia.org/wiki/Here_document { - pattern: /((?:^|[^<])<<-?\s*)(\w+?)\s*(?:\r?\n|\r)(?:[\s\S])*?(?:\r?\n|\r)\2/, + pattern: /((?:^|[^<])<<-?\s*)(\w+?)\s*(?:\r?\n|\r)[\s\S]*?(?:\r?\n|\r)\2/, lookbehind: true, greedy: true, inside: insideString @@ -115,7 +115,7 @@ // Here-document with quotes around the tag // → No expansion (so no “inside”). { - pattern: /((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s*(?:\r?\n|\r)(?:[\s\S])*?(?:\r?\n|\r)\3/, + pattern: /((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s*(?:\r?\n|\r)[\s\S]*?(?:\r?\n|\r)\3/, lookbehind: true, greedy: true }, diff --git a/components/prism-bash.min.js b/components/prism-bash.min.js index 5cde45fc37..d1b2a5d3d3 100644 --- a/components/prism-bash.min.js +++ b/components/prism-bash.min.js @@ -1 +1 @@ -!function(e){var t="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",n={environment:{pattern:RegExp("\\$"+t),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--?|-=|\+\+?|\+=|!=?|~|\*\*?|\*=|\/=?|%=?|<<=?|>>=?|<=?|>=?|==?|&&?|&=|\^=?|\|\|?|\|=|\?|:/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+t),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|x[0-9a-fA-F]{1,2}|u[0-9a-fA-F]{4}|U[0-9a-fA-F]{8})/};e.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)\w+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b\w+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+t),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+?)\s*(?:\r?\n|\r)(?:[\s\S])*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:n},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s*(?:\r?\n|\r)(?:[\s\S])*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0},{pattern:/(["'])(?:\\[\s\S]|\$\([^)]+\)|`[^`]+`|(?!\1)[^\\])*\1/,greedy:!0,inside:n}],environment:{pattern:RegExp("\\$?"+t),alias:"constant"},variable:n.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|aptitude|apt-cache|apt-get|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:if|then|else|elif|fi|for|while|in|case|esac|function|select|do|done|until)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|break|cd|continue|eval|exec|exit|export|getopts|hash|pwd|readonly|return|shift|test|times|trap|umask|unset|alias|bind|builtin|caller|command|declare|echo|enable|help|let|local|logout|mapfile|printf|read|readarray|source|type|typeset|ulimit|unalias|set|shopt)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:true|false)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|==?|!=?|=~|<<[<-]?|[&\d]?>>|\d?[<>]&?|&[>&]?|\|[&|]?|<=?|>=?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}};for(var a=["comment","function-name","for-or-select","assign-left","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],r=n.variable[1].inside,s=0;s>=?|<=?|>=?|==?|&&?|&=|\^=?|\|\|?|\|=|\?|:/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+t),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|x[0-9a-fA-F]{1,2}|u[0-9a-fA-F]{4}|U[0-9a-fA-F]{8})/};e.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)\w+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b\w+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+t),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+?)\s*(?:\r?\n|\r)[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:n},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s*(?:\r?\n|\r)[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0},{pattern:/(["'])(?:\\[\s\S]|\$\([^)]+\)|`[^`]+`|(?!\1)[^\\])*\1/,greedy:!0,inside:n}],environment:{pattern:RegExp("\\$?"+t),alias:"constant"},variable:n.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|aptitude|apt-cache|apt-get|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:if|then|else|elif|fi|for|while|in|case|esac|function|select|do|done|until)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|break|cd|continue|eval|exec|exit|export|getopts|hash|pwd|readonly|return|shift|test|times|trap|umask|unset|alias|bind|builtin|caller|command|declare|echo|enable|help|let|local|logout|mapfile|printf|read|readarray|source|type|typeset|ulimit|unalias|set|shopt)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:true|false)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|==?|!=?|=~|<<[<-]?|[&\d]?>>|\d?[<>]&?|&[>&]?|\|[&|]?|<=?|>=?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}};for(var a=["comment","function-name","for-or-select","assign-left","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],r=n.variable[1].inside,s=0;s>)+/.source.replace(/<>/g, strings)), + inside: { + 'bash': { + pattern: /(\$\s*)[\s\S]+/, + lookbehind: true, + alias: 'language-bash', + inside: Prism.languages.bash + }, + 'sh': { + pattern: /^\$/, + alias: 'important' + } } + }, + 'output': { + pattern: /.(?:.*(?:\r\n?|\n|.$))*/ + // output highlighting? } - }, - 'output': { - pattern: /.(?:.*(?:\r\n?|\n|.$))*/ - // output highlighting? - } -} + }; + +}(Prism)); diff --git a/components/prism-shell-session.min.js b/components/prism-shell-session.min.js index e67b6cefbb..f7b9129c80 100644 --- a/components/prism-shell-session.min.js +++ b/components/prism-shell-session.min.js @@ -1 +1 @@ -Prism.languages["shell-session"]={command:{pattern:/\$(?:[^\r\n'"<]|(["'])(?:\\[\s\S]|\$\([^)]+\)|`[^`]+`|(?!\1)[^\\])*\1|(?:^|[^<])<<\s*["']?(?:\w+?)["']?\s*(?:\r\n?|\n)(?:[\s\S])*?(?:\r\n?|\n)\3)+/,inside:{bash:{pattern:/(\$\s*)[\s\S]+/,lookbehind:!0,alias:"language-bash",inside:Prism.languages.bash},sh:{pattern:/^\$/,alias:"important"}}},output:{pattern:/.(?:.*(?:\r\n?|\n|.$))*/}}; \ No newline at end of file +!function(s){var n=["([\"'])(?:\\\\[\\s\\S]|\\$\\([^)]+\\)|`[^`]+`|(?!\\1)[^\\\\])*\\1","<<-?\\s*(\\w+?)\\s*(?:\r?\n|\r)[\\s\\S]*?(?:\r?\n|\r)\\2","<<-?\\s*([\"'])(\\w+)\\3\\s*(?:\r?\n|\r)[\\s\\S]*?(?:\r?\n|\r)\\4"].join("|");s.languages["shell-session"]={command:{pattern:RegExp("\\$(?:[^\r\\n'\"<]|<>)+".replace(/<>/g,n)),inside:{bash:{pattern:/(\$\s*)[\s\S]+/,lookbehind:!0,alias:"language-bash",inside:s.languages.bash},sh:{pattern:/^\$/,alias:"important"}}},output:{pattern:/.(?:.*(?:\r\n?|\n|.$))*/}}}(Prism); \ No newline at end of file diff --git a/tests/languages/shell-session/command_string_feature.test b/tests/languages/shell-session/command_string_feature.test index 2a80ec05da..d84afec018 100644 --- a/tests/languages/shell-session/command_string_feature.test +++ b/tests/languages/shell-session/command_string_feature.test @@ -3,6 +3,16 @@ $ echo 'Foo $ echo "Foo > Bar" +$ echo <<- STRING_END +foo +bar +STRING_END + +$ echo <<- "STRING_END" +foo +bar +STRING_END + ---------------------------------------------------- [ @@ -24,6 +34,30 @@ $ echo "Foo "\"Foo\n> Bar\"" ]] ]] + ]], + + ["command", [ + ["sh", "$"], + ["bash", [ + ["builtin", "echo"], + ["operator", [ + "<<-" + ]], + ["string", [ + "STRING_END\nfoo\nbar\nSTRING_END" + ]] + ]] + ]], + + ["command", [ + ["sh", "$"], + ["bash", [ + ["builtin", "echo"], + ["operator", [ + "<<-" + ]], + ["string", "\"STRING_END\"\nfoo\nbar\nSTRING_END"] + ]] ]] ] diff --git a/tests/pattern-tests.js b/tests/pattern-tests.js index f209d5d700..dad15acbc1 100644 --- a/tests/pattern-tests.js +++ b/tests/pattern-tests.js @@ -264,4 +264,16 @@ function testPatterns(Prism) { }); }); + it('- should not use octal escapes', function () { + forEachPattern(({ ast, tokenPath, reportError }) => { + visitRegExpAST(ast.pattern, { + onCharacterEnter(node) { + if (/^\\(?:[1-9]|\d{2,})$/.test(node.raw)) { + reportError(`Token ${tokenPath}: Octal escape ${node.raw}.`); + } + } + }); + }); + }); + } From 0bf73dc7813cdd1eadb15730d8c9f2d00f208df8 Mon Sep 17 00:00:00 2001 From: Taylor Buckner <32392635+tabuckner@users.noreply.github.com> Date: Wed, 22 Jan 2020 07:08:01 -0600 Subject: [PATCH 0433/1100] Added link to prism-liquibase Bash language extension. (#2191) In an effort to make some of our documentation easier to parse, Liquibase has published an extension to the Bash language to offer tokenization of Liquibase CLI commands. --- index.html | 1 + 1 file changed, 1 insertion(+) diff --git a/index.html b/index.html index ab2bfd0e57..fd19c187a2 100644 --- a/index.html +++ b/index.html @@ -252,6 +252,7 @@

        Third-party language definitions

        From 984e5d2e4a7a7fd98966b19f1a9ed07edfbad663 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Fri, 31 Jan 2020 22:50:59 +0100 Subject: [PATCH 0434/1100] Core: Fixed scope problem in script mode (#2184) A function in Core was defined inside an `if` which isn't allowed in JS strict mode. --- components/prism-core.js | 10 +++++----- components/prism-core.min.js | 2 +- prism.js | 10 +++++----- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/components/prism-core.js b/components/prism-core.js index 7726f349ec..302ff0a6b3 100644 --- a/components/prism-core.js +++ b/components/prism-core.js @@ -582,13 +582,13 @@ if (script) { } } -if (!_.manual) { - function highlightAutomaticallyCallback() { - if (!_.manual) { - _.highlightAll(); - } +function highlightAutomaticallyCallback() { + if (!_.manual) { + _.highlightAll(); } +} +if (!_.manual) { // If the document state is "loading", then we'll use DOMContentLoaded. // If the document state is "interactive" and the prism.js script is deferred, then we'll also use the // DOMContentLoaded event because there might be some plugins or languages which have also been deferred and they diff --git a/components/prism-core.min.js b/components/prism-core.min.js index 4f15a09411..559b1f6a95 100644 --- a/components/prism-core.min.js +++ b/components/prism-core.min.js @@ -1 +1 @@ -var _self="undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{},Prism=function(u){var c=/\blang(?:uage)?-([\w-]+)\b/i,n=0,C={manual:u.Prism&&u.Prism.manual,disableWorkerMessageHandler:u.Prism&&u.Prism.disableWorkerMessageHandler,util:{encode:function(e){return e instanceof _?new _(e.type,C.util.encode(e.content),e.alias):Array.isArray(e)?e.map(C.util.encode):e.replace(/&/g,"&").replace(/e.length)return;if(!(k instanceof _)){if(h&&y!=n.length-1){if(c.lastIndex=v,!(O=c.exec(e)))break;for(var b=O.index+(f&&O[1]?O[1].length:0),w=O.index+O[0].length,A=y,P=v,x=n.length;A"+r.content+""},!u.document)return u.addEventListener&&(C.disableWorkerMessageHandler||u.addEventListener("message",function(e){var n=JSON.parse(e.data),r=n.language,t=n.code,a=n.immediateClose;u.postMessage(C.highlight(t,C.languages[r],r)),a&&u.close()},!1)),C;var e=C.util.currentScript();if(e&&(C.filename=e.src,e.hasAttribute("data-manual")&&(C.manual=!0)),!C.manual){function r(){C.manual||C.highlightAll()}var t=document.readyState;"loading"===t||"interactive"===t&&e&&e.defer?document.addEventListener("DOMContentLoaded",r):window.requestAnimationFrame?window.requestAnimationFrame(r):window.setTimeout(r,16)}return C}(_self);"undefined"!=typeof module&&module.exports&&(module.exports=Prism),"undefined"!=typeof global&&(global.Prism=Prism); \ No newline at end of file +var _self="undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{},Prism=function(u){var c=/\blang(?:uage)?-([\w-]+)\b/i,n=0,C={manual:u.Prism&&u.Prism.manual,disableWorkerMessageHandler:u.Prism&&u.Prism.disableWorkerMessageHandler,util:{encode:function(e){return e instanceof _?new _(e.type,C.util.encode(e.content),e.alias):Array.isArray(e)?e.map(C.util.encode):e.replace(/&/g,"&").replace(/e.length)return;if(!(k instanceof _)){if(h&&y!=n.length-1){if(c.lastIndex=v,!(O=c.exec(e)))break;for(var b=O.index+(f&&O[1]?O[1].length:0),w=O.index+O[0].length,A=y,P=v,x=n.length;A"+r.content+""},!u.document)return u.addEventListener&&(C.disableWorkerMessageHandler||u.addEventListener("message",function(e){var n=JSON.parse(e.data),r=n.language,t=n.code,a=n.immediateClose;u.postMessage(C.highlight(t,C.languages[r],r)),a&&u.close()},!1)),C;var e=C.util.currentScript();function r(){C.manual||C.highlightAll()}if(e&&(C.filename=e.src,e.hasAttribute("data-manual")&&(C.manual=!0)),!C.manual){var t=document.readyState;"loading"===t||"interactive"===t&&e&&e.defer?document.addEventListener("DOMContentLoaded",r):window.requestAnimationFrame?window.requestAnimationFrame(r):window.setTimeout(r,16)}return C}(_self);"undefined"!=typeof module&&module.exports&&(module.exports=Prism),"undefined"!=typeof global&&(global.Prism=Prism); \ No newline at end of file diff --git a/prism.js b/prism.js index 915c7044eb..cd103029e4 100644 --- a/prism.js +++ b/prism.js @@ -587,13 +587,13 @@ if (script) { } } -if (!_.manual) { - function highlightAutomaticallyCallback() { - if (!_.manual) { - _.highlightAll(); - } +function highlightAutomaticallyCallback() { + if (!_.manual) { + _.highlightAll(); } +} +if (!_.manual) { // If the document state is "loading", then we'll use DOMContentLoaded. // If the document state is "interactive" and the prism.js script is deferred, then we'll also use the // DOMContentLoaded event because there might be some plugins or languages which have also been deferred and they From 3b42536ebfd9773e7cbe6dd9543099599adc2563 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Tue, 4 Feb 2020 13:47:56 +0100 Subject: [PATCH 0435/1100] PHPDoc: Fixed exponential backtracking (#2198) This fixed the exponential backtracking of the pattern which matched PHP classes. --- components/prism-phpdoc.js | 2 +- components/prism-phpdoc.min.js | 2 +- tests/languages/phpdoc/issue2197.test | 16 ++++++++++++++++ 3 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 tests/languages/phpdoc/issue2197.test diff --git a/components/prism-phpdoc.js b/components/prism-phpdoc.js index c3913ddb66..136f5988a4 100644 --- a/components/prism-phpdoc.js +++ b/components/prism-phpdoc.js @@ -1,6 +1,6 @@ (function (Prism) { - var typeExpression = /(?:[a-zA-Z]\w*|[|\\[\]])+/.source; + var typeExpression = /(?:\b[a-zA-Z]\w*|[|\\[\]])+/.source; Prism.languages.phpdoc = Prism.languages.extend('javadoclike', { 'parameter': { diff --git a/components/prism-phpdoc.min.js b/components/prism-phpdoc.min.js index 99d7d3aa4c..fe460a5d28 100644 --- a/components/prism-phpdoc.min.js +++ b/components/prism-phpdoc.min.js @@ -1 +1 @@ -!function(a){var e="(?:[a-zA-Z]\\w*|[|\\\\[\\]])+";a.languages.phpdoc=a.languages.extend("javadoclike",{parameter:{pattern:RegExp("(@(?:global|param|property(?:-read|-write)?|var)\\s+(?:"+e+"\\s+)?)\\$\\w+"),lookbehind:!0}}),a.languages.insertBefore("phpdoc","keyword",{"class-name":[{pattern:RegExp("(@(?:global|package|param|property(?:-read|-write)?|return|subpackage|throws|var)\\s+)"+e),lookbehind:!0,inside:{keyword:/\b(?:callback|resource|boolean|integer|double|object|string|array|false|float|mixed|bool|null|self|true|void|int)\b/,punctuation:/[|\\[\]()]/}}]}),a.languages.javadoclike.addSupport("php",a.languages.phpdoc)}(Prism); \ No newline at end of file +!function(a){var e="(?:\\b[a-zA-Z]\\w*|[|\\\\[\\]])+";a.languages.phpdoc=a.languages.extend("javadoclike",{parameter:{pattern:RegExp("(@(?:global|param|property(?:-read|-write)?|var)\\s+(?:"+e+"\\s+)?)\\$\\w+"),lookbehind:!0}}),a.languages.insertBefore("phpdoc","keyword",{"class-name":[{pattern:RegExp("(@(?:global|package|param|property(?:-read|-write)?|return|subpackage|throws|var)\\s+)"+e),lookbehind:!0,inside:{keyword:/\b(?:callback|resource|boolean|integer|double|object|string|array|false|float|mixed|bool|null|self|true|void|int)\b/,punctuation:/[|\\[\]()]/}}]}),a.languages.javadoclike.addSupport("php",a.languages.phpdoc)}(Prism); \ No newline at end of file diff --git a/tests/languages/phpdoc/issue2197.test b/tests/languages/phpdoc/issue2197.test new file mode 100644 index 0000000000..75034cc63f --- /dev/null +++ b/tests/languages/phpdoc/issue2197.test @@ -0,0 +1,16 @@ +/** @var Git_Driver_Gerrit_ProjectCreator_Factory */ + +---------------------------------------------------- + +[ + "/** ", + ["keyword", "@var"], + ["class-name", [ + "Git_Driver_Gerrit_ProjectCreator_Factory" + ]], + " */" +] + +---------------------------------------------------- + +Checks exponential backtracking for types. See #2197. From a7d67ca31be4c26c0a6e287769336c78e8e246cf Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Tue, 4 Feb 2020 15:17:11 +0100 Subject: [PATCH 0436/1100] VB: Added support for comments with line continuations (#2195) --- components/prism-visual-basic.js | 4 ++-- components/prism-visual-basic.min.js | 2 +- tests/languages/visual-basic/comment_feature.test | 8 ++++++-- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/components/prism-visual-basic.js b/components/prism-visual-basic.js index 0c4cd61c7e..4fd106556b 100644 --- a/components/prism-visual-basic.js +++ b/components/prism-visual-basic.js @@ -1,6 +1,6 @@ Prism.languages['visual-basic'] = { 'comment': { - pattern: /(?:['‘’]|REM\b).*/i, + pattern: /(?:['‘’]|REM\b)(?:[^\r\n_]|_(?:\r\n?|\n)?)*/i, inside: { 'keyword': /^REM/i } @@ -31,4 +31,4 @@ Prism.languages['visual-basic'] = { 'punctuation': /[{}().,:?]/ }; -Prism.languages.vb = Prism.languages['visual-basic']; \ No newline at end of file +Prism.languages.vb = Prism.languages['visual-basic']; diff --git a/components/prism-visual-basic.min.js b/components/prism-visual-basic.min.js index 3518d8ca5e..9681c6aa80 100644 --- a/components/prism-visual-basic.min.js +++ b/components/prism-visual-basic.min.js @@ -1 +1 @@ -Prism.languages["visual-basic"]={comment:{pattern:/(?:['‘’]|REM\b).*/i,inside:{keyword:/^REM/i}},directive:{pattern:/#(?:Const|Else|ElseIf|End|ExternalChecksum|ExternalSource|If|Region)(?:[^\S\r\n]_[^\S\r\n]*(?:\r\n?|\n)|.)+/i,alias:"comment",greedy:!0},string:{pattern:/\$?["“”](?:["“”]{2}|[^"“”])*["“”]C?/i,greedy:!0},date:{pattern:/#[^\S\r\n]*(?:\d+([/-])\d+\1\d+(?:[^\S\r\n]+(?:\d+[^\S\r\n]*(?:AM|PM)|\d+:\d+(?::\d+)?(?:[^\S\r\n]*(?:AM|PM))?))?|(?:\d+[^\S\r\n]*(?:AM|PM)|\d+:\d+(?::\d+)?(?:[^\S\r\n]*(?:AM|PM))?))[^\S\r\n]*#/i,alias:"builtin"},number:/(?:(?:\b\d+(?:\.\d+)?|\.\d+)(?:E[+-]?\d+)?|&[HO][\dA-F]+)(?:U?[ILS]|[FRD])?/i,boolean:/\b(?:True|False|Nothing)\b/i,keyword:/\b(?:AddHandler|AddressOf|Alias|And(?:Also)?|As|Boolean|ByRef|Byte|ByVal|Call|Case|Catch|C(?:Bool|Byte|Char|Date|Dbl|Dec|Int|Lng|Obj|SByte|Short|Sng|Str|Type|UInt|ULng|UShort)|Char|Class|Const|Continue|Date|Decimal|Declare|Default|Delegate|Dim|DirectCast|Do|Double|Each|Else(?:If)?|End(?:If)?|Enum|Erase|Error|Event|Exit|Finally|For|Friend|Function|Get(?:Type|XMLNamespace)?|Global|GoSub|GoTo|Handles|If|Implements|Imports|In|Inherits|Integer|Interface|Is|IsNot|Let|Lib|Like|Long|Loop|Me|Mod|Module|Must(?:Inherit|Override)|My(?:Base|Class)|Namespace|Narrowing|New|Next|Not(?:Inheritable|Overridable)?|Object|Of|On|Operator|Option(?:al)?|Or(?:Else)?|Out|Overloads|Overridable|Overrides|ParamArray|Partial|Private|Property|Protected|Public|RaiseEvent|ReadOnly|ReDim|RemoveHandler|Resume|Return|SByte|Select|Set|Shadows|Shared|short|Single|Static|Step|Stop|String|Structure|Sub|SyncLock|Then|Throw|To|Try|TryCast|TypeOf|U(?:Integer|Long|Short)|Using|Variant|Wend|When|While|Widening|With(?:Events)?|WriteOnly|Xor)\b/i,operator:[/[+\-*/\\^<=>&#@$%!]/,{pattern:/([^\S\r\n])_(?=[^\S\r\n]*[\r\n])/,lookbehind:!0}],punctuation:/[{}().,:?]/},Prism.languages.vb=Prism.languages["visual-basic"]; \ No newline at end of file +Prism.languages["visual-basic"]={comment:{pattern:/(?:['‘’]|REM\b)(?:[^\r\n_]|_(?:\r\n?|\n)?)*/i,inside:{keyword:/^REM/i}},directive:{pattern:/#(?:Const|Else|ElseIf|End|ExternalChecksum|ExternalSource|If|Region)(?:[^\S\r\n]_[^\S\r\n]*(?:\r\n?|\n)|.)+/i,alias:"comment",greedy:!0},string:{pattern:/\$?["“”](?:["“”]{2}|[^"“”])*["“”]C?/i,greedy:!0},date:{pattern:/#[^\S\r\n]*(?:\d+([/-])\d+\1\d+(?:[^\S\r\n]+(?:\d+[^\S\r\n]*(?:AM|PM)|\d+:\d+(?::\d+)?(?:[^\S\r\n]*(?:AM|PM))?))?|(?:\d+[^\S\r\n]*(?:AM|PM)|\d+:\d+(?::\d+)?(?:[^\S\r\n]*(?:AM|PM))?))[^\S\r\n]*#/i,alias:"builtin"},number:/(?:(?:\b\d+(?:\.\d+)?|\.\d+)(?:E[+-]?\d+)?|&[HO][\dA-F]+)(?:U?[ILS]|[FRD])?/i,boolean:/\b(?:True|False|Nothing)\b/i,keyword:/\b(?:AddHandler|AddressOf|Alias|And(?:Also)?|As|Boolean|ByRef|Byte|ByVal|Call|Case|Catch|C(?:Bool|Byte|Char|Date|Dbl|Dec|Int|Lng|Obj|SByte|Short|Sng|Str|Type|UInt|ULng|UShort)|Char|Class|Const|Continue|Date|Decimal|Declare|Default|Delegate|Dim|DirectCast|Do|Double|Each|Else(?:If)?|End(?:If)?|Enum|Erase|Error|Event|Exit|Finally|For|Friend|Function|Get(?:Type|XMLNamespace)?|Global|GoSub|GoTo|Handles|If|Implements|Imports|In|Inherits|Integer|Interface|Is|IsNot|Let|Lib|Like|Long|Loop|Me|Mod|Module|Must(?:Inherit|Override)|My(?:Base|Class)|Namespace|Narrowing|New|Next|Not(?:Inheritable|Overridable)?|Object|Of|On|Operator|Option(?:al)?|Or(?:Else)?|Out|Overloads|Overridable|Overrides|ParamArray|Partial|Private|Property|Protected|Public|RaiseEvent|ReadOnly|ReDim|RemoveHandler|Resume|Return|SByte|Select|Set|Shadows|Shared|short|Single|Static|Step|Stop|String|Structure|Sub|SyncLock|Then|Throw|To|Try|TryCast|TypeOf|U(?:Integer|Long|Short)|Using|Variant|Wend|When|While|Widening|With(?:Events)?|WriteOnly|Xor)\b/i,operator:[/[+\-*/\\^<=>&#@$%!]/,{pattern:/([^\S\r\n])_(?=[^\S\r\n]*[\r\n])/,lookbehind:!0}],punctuation:/[{}().,:?]/},Prism.languages.vb=Prism.languages["visual-basic"]; \ No newline at end of file diff --git a/tests/languages/visual-basic/comment_feature.test b/tests/languages/visual-basic/comment_feature.test index 41e14eaa1b..af3edcdb65 100644 --- a/tests/languages/visual-basic/comment_feature.test +++ b/tests/languages/visual-basic/comment_feature.test @@ -7,6 +7,9 @@ REM REM Foobar +' multi-line _ + comment + ---------------------------------------------------- [ @@ -17,9 +20,10 @@ REM Foobar ["comment", ["’"]], ["comment", ["’ Foobar"]], ["comment", [["keyword", "REM"]]], - ["comment", [["keyword", "REM"], " Foobar"]] + ["comment", [["keyword", "REM"], " Foobar"]], + ["comment", ["' multi-line _\r\n comment"]] ] ---------------------------------------------------- -Checks for comments. \ No newline at end of file +Checks for comments. From 2e0eff7670dd658aaa74458970e0030fec25db84 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Fri, 7 Feb 2020 16:44:48 +0100 Subject: [PATCH 0437/1100] CSS: Added support for the selector function (#2201) This adds support for CSS 4's selector function. The selectors passed to the function will now be highlighted as such. --- components/prism-css-extras.js | 11 +++++--- components/prism-css-extras.min.js | 2 +- components/prism-css.js | 7 ++++- components/prism-css.min.js | 2 +- prism.js | 7 ++++- ...le_selector-function-argument_feature.test | 26 +++++++++++++++++++ ...le_selector-function-argument_feature.test | 24 +++++++++++++++++ 7 files changed, 72 insertions(+), 7 deletions(-) create mode 100644 tests/languages/css!+css-extras/atrule_selector-function-argument_feature.test create mode 100644 tests/languages/css/atrule_selector-function-argument_feature.test diff --git a/components/prism-css-extras.js b/components/prism-css-extras.js index 3eced0f8ed..bc9458bcfd 100644 --- a/components/prism-css-extras.js +++ b/components/prism-css-extras.js @@ -1,14 +1,17 @@ (function (Prism) { + var string = /("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/; + var selectorInside; + Prism.languages.css.selector = { pattern: Prism.languages.css.selector, - inside: { + inside: selectorInside = { 'pseudo-element': /:(?:after|before|first-letter|first-line|selection)|::[-\w]+/, 'pseudo-class': /:[-\w]+/, 'class': /\.[-:.\w]+/, 'id': /#[-:.\w]+/, 'attribute': { - pattern: /\[(?:[^[\]"']|("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1)*\]/, + pattern: RegExp('\\[(?:[^[\\]"\']|' + string.source + ')*\\]'), greedy: true, inside: { 'punctuation': /^\[|\]$/, @@ -29,7 +32,7 @@ lookbehind: true }, 'value': [ - /("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/, + string, { pattern: /(=\s*)[-\w\xA0-\uFFFF]+(?=\s*$)/, lookbehind: true @@ -56,6 +59,8 @@ } }; + Prism.languages.css['atrule'].inside['selector-function-argument'].inside = selectorInside; + Prism.languages.insertBefore('css', 'property', { 'variable': { pattern: /(^|[^-\w\xA0-\uFFFF])--[-_a-z\xA0-\uFFFF][-\w\xA0-\uFFFF]*/i, diff --git a/components/prism-css-extras.min.js b/components/prism-css-extras.min.js index 97b7604058..ad8b1156cb 100644 --- a/components/prism-css-extras.min.js +++ b/components/prism-css-extras.min.js @@ -1 +1 @@ -!function(e){e.languages.css.selector={pattern:e.languages.css.selector,inside:{"pseudo-element":/:(?:after|before|first-letter|first-line|selection)|::[-\w]+/,"pseudo-class":/:[-\w]+/,class:/\.[-:.\w]+/,id:/#[-:.\w]+/,attribute:{pattern:/\[(?:[^[\]"']|("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1)*\]/,greedy:!0,inside:{punctuation:/^\[|\]$/,"case-sensitivity":{pattern:/(\s)[si]$/i,lookbehind:!0,alias:"keyword"},namespace:{pattern:/^(\s*)[-*\w\xA0-\uFFFF]*\|(?!=)/,lookbehind:!0,inside:{punctuation:/\|$/}},attribute:{pattern:/^(\s*)[-\w\xA0-\uFFFF]+/,lookbehind:!0},value:[/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,{pattern:/(=\s*)[-\w\xA0-\uFFFF]+(?=\s*$)/,lookbehind:!0}],operator:/[|~*^$]?=/}},"n-th":[{pattern:/(\(\s*)[+-]?\d*[\dn](?:\s*[+-]\s*\d+)?(?=\s*\))/,lookbehind:!0,inside:{number:/[\dn]+/,operator:/[+-]/}},{pattern:/(\(\s*)(?:even|odd)(?=\s*\))/i,lookbehind:!0}],punctuation:/[()]/}},e.languages.insertBefore("css","property",{variable:{pattern:/(^|[^-\w\xA0-\uFFFF])--[-_a-z\xA0-\uFFFF][-\w\xA0-\uFFFF]*/i,lookbehind:!0}});var a={pattern:/(\d)(?:%|[a-z]+)/,lookbehind:!0},n={pattern:/(^|[^\w.-])-?\d*\.?\d+/,lookbehind:!0};e.languages.insertBefore("css","function",{operator:{pattern:/(\s)[+\-*\/](?=\s)/,lookbehind:!0},hexcode:{pattern:/\B#(?:[\da-f]{1,2}){3,4}\b/i,alias:"color"},color:[/\b(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)\b/i,{pattern:/\b(?:rgb|hsl)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:rgb|hsl)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,inside:{unit:a,number:n,function:/[\w-]+(?=\()/,punctuation:/[(),]/}}],entity:/\\[\da-f]{1,8}/i,unit:a,number:n})}(Prism); \ No newline at end of file +!function(e){var a,n=/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/;e.languages.css.selector={pattern:e.languages.css.selector,inside:a={"pseudo-element":/:(?:after|before|first-letter|first-line|selection)|::[-\w]+/,"pseudo-class":/:[-\w]+/,class:/\.[-:.\w]+/,id:/#[-:.\w]+/,attribute:{pattern:RegExp("\\[(?:[^[\\]\"']|"+n.source+")*\\]"),greedy:!0,inside:{punctuation:/^\[|\]$/,"case-sensitivity":{pattern:/(\s)[si]$/i,lookbehind:!0,alias:"keyword"},namespace:{pattern:/^(\s*)[-*\w\xA0-\uFFFF]*\|(?!=)/,lookbehind:!0,inside:{punctuation:/\|$/}},attribute:{pattern:/^(\s*)[-\w\xA0-\uFFFF]+/,lookbehind:!0},value:[n,{pattern:/(=\s*)[-\w\xA0-\uFFFF]+(?=\s*$)/,lookbehind:!0}],operator:/[|~*^$]?=/}},"n-th":[{pattern:/(\(\s*)[+-]?\d*[\dn](?:\s*[+-]\s*\d+)?(?=\s*\))/,lookbehind:!0,inside:{number:/[\dn]+/,operator:/[+-]/}},{pattern:/(\(\s*)(?:even|odd)(?=\s*\))/i,lookbehind:!0}],punctuation:/[()]/}},e.languages.css.atrule.inside["selector-function-argument"].inside=a,e.languages.insertBefore("css","property",{variable:{pattern:/(^|[^-\w\xA0-\uFFFF])--[-_a-z\xA0-\uFFFF][-\w\xA0-\uFFFF]*/i,lookbehind:!0}});var r={pattern:/(\d)(?:%|[a-z]+)/,lookbehind:!0},i={pattern:/(^|[^\w.-])-?\d*\.?\d+/,lookbehind:!0};e.languages.insertBefore("css","function",{operator:{pattern:/(\s)[+\-*\/](?=\s)/,lookbehind:!0},hexcode:{pattern:/\B#(?:[\da-f]{1,2}){3,4}\b/i,alias:"color"},color:[/\b(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)\b/i,{pattern:/\b(?:rgb|hsl)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:rgb|hsl)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,inside:{unit:r,number:i,function:/[\w-]+(?=\()/,punctuation:/[(),]/}}],entity:/\\[\da-f]{1,8}/i,unit:r,number:i})}(Prism); \ No newline at end of file diff --git a/components/prism-css.js b/components/prism-css.js index 77d049e7ba..d236f31659 100644 --- a/components/prism-css.js +++ b/components/prism-css.js @@ -7,7 +7,12 @@ 'atrule': { pattern: /@[\w-]+[\s\S]*?(?:;|(?=\s*\{))/, inside: { - 'rule': /@[\w-]+/ + 'rule': /^@[\w-]+/, + 'selector-function-argument': { + pattern: /(\bselector\s*\((?!\s*\))\s*)(?:[^()]|\((?:[^()]|\([^()]*\))*\))+?(?=\s*\))/, + lookbehind: true, + alias: 'selector' + } // See rest below } }, diff --git a/components/prism-css.min.js b/components/prism-css.min.js index eb99ee4265..1f015cac26 100644 --- a/components/prism-css.min.js +++ b/components/prism-css.min.js @@ -1 +1 @@ -!function(s){var t=/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/;s.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:/@[\w-]+[\s\S]*?(?:;|(?=\s*\{))/,inside:{rule:/@[\w-]+/}},url:{pattern:RegExp("url\\((?:"+t.source+"|[^\n\r()]*)\\)","i"),inside:{function:/^url/i,punctuation:/^\(|\)$/}},selector:RegExp("[^{}\\s](?:[^{};\"']|"+t.source+")*?(?=\\s*\\{)"),string:{pattern:t,greedy:!0},property:/[-_a-z\xA0-\uFFFF][-\w\xA0-\uFFFF]*(?=\s*:)/i,important:/!important\b/i,function:/[-a-z0-9]+(?=\()/i,punctuation:/[(){};:,]/},s.languages.css.atrule.inside.rest=s.languages.css;var e=s.languages.markup;e&&(e.tag.addInlined("style","css"),s.languages.insertBefore("inside","attr-value",{"style-attr":{pattern:/\s*style=("|')(?:\\[\s\S]|(?!\1)[^\\])*\1/i,inside:{"attr-name":{pattern:/^\s*style/i,inside:e.tag.inside},punctuation:/^\s*=\s*['"]|['"]\s*$/,"attr-value":{pattern:/.+/i,inside:s.languages.css}},alias:"language-css"}},e.tag))}(Prism); \ No newline at end of file +!function(s){var e=/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/;s.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:/@[\w-]+[\s\S]*?(?:;|(?=\s*\{))/,inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\((?!\s*\))\s*)(?:[^()]|\((?:[^()]|\([^()]*\))*\))+?(?=\s*\))/,lookbehind:!0,alias:"selector"}}},url:{pattern:RegExp("url\\((?:"+e.source+"|[^\n\r()]*)\\)","i"),inside:{function:/^url/i,punctuation:/^\(|\)$/}},selector:RegExp("[^{}\\s](?:[^{};\"']|"+e.source+")*?(?=\\s*\\{)"),string:{pattern:e,greedy:!0},property:/[-_a-z\xA0-\uFFFF][-\w\xA0-\uFFFF]*(?=\s*:)/i,important:/!important\b/i,function:/[-a-z0-9]+(?=\()/i,punctuation:/[(){};:,]/},s.languages.css.atrule.inside.rest=s.languages.css;var t=s.languages.markup;t&&(t.tag.addInlined("style","css"),s.languages.insertBefore("inside","attr-value",{"style-attr":{pattern:/\s*style=("|')(?:\\[\s\S]|(?!\1)[^\\])*\1/i,inside:{"attr-name":{pattern:/^\s*style/i,inside:t.tag.inside},punctuation:/^\s*=\s*['"]|['"]\s*$/,"attr-value":{pattern:/.+/i,inside:s.languages.css}},alias:"language-css"}},t.tag))}(Prism); \ No newline at end of file diff --git a/prism.js b/prism.js index cd103029e4..5373ad4665 100644 --- a/prism.js +++ b/prism.js @@ -748,7 +748,12 @@ Prism.languages.svg = Prism.languages.markup; 'atrule': { pattern: /@[\w-]+[\s\S]*?(?:;|(?=\s*\{))/, inside: { - 'rule': /@[\w-]+/ + 'rule': /^@[\w-]+/, + 'selector-function-argument': { + pattern: /(\bselector\s*\((?!\s*\))\s*)(?:[^()]|\((?:[^()]|\([^()]*\))*\))+?(?=\s*\))/, + lookbehind: true, + alias: 'selector' + } // See rest below } }, diff --git a/tests/languages/css!+css-extras/atrule_selector-function-argument_feature.test b/tests/languages/css!+css-extras/atrule_selector-function-argument_feature.test new file mode 100644 index 0000000000..e361b23a64 --- /dev/null +++ b/tests/languages/css!+css-extras/atrule_selector-function-argument_feature.test @@ -0,0 +1,26 @@ +@supports selector(::-webkit-foo) { + /* style to apply when the `::-webkit-foo` selector is actually supported, + * instead of just being parsed as matching nothing because of Selectors 4 + * § Appendix B: https://drafts.csswg.org/selectors-4/#compat */ +} + +---------------------------------------------------- + +[ + ["atrule", [ + ["rule", "@supports"], + ["function", "selector"], + ["punctuation", "("], + ["selector-function-argument", [ + ["pseudo-element", "::-webkit-foo"] + ]], + ["punctuation", ")"] + ]], + ["punctuation", "{"], + ["comment", "/* style to apply when the `::-webkit-foo` selector is actually supported,\r\n\t * instead of just being parsed as matching nothing because of Selectors 4\r\n\t * § Appendix B: https://drafts.csswg.org/selectors-4/#compat */"], + ["punctuation", "}"] +] + +---------------------------------------------------- + +Checks for the selector function in @supports rules. diff --git a/tests/languages/css/atrule_selector-function-argument_feature.test b/tests/languages/css/atrule_selector-function-argument_feature.test new file mode 100644 index 0000000000..41b3480b65 --- /dev/null +++ b/tests/languages/css/atrule_selector-function-argument_feature.test @@ -0,0 +1,24 @@ +@supports selector(::-webkit-foo) { + /* style to apply when the `::-webkit-foo` selector is actually supported, + * instead of just being parsed as matching nothing because of Selectors 4 + * § Appendix B: https://drafts.csswg.org/selectors-4/#compat */ +} + +---------------------------------------------------- + +[ + ["atrule", [ + ["rule", "@supports"], + ["function", "selector"], + ["punctuation", "("], + ["selector-function-argument", "::-webkit-foo"], + ["punctuation", ")"] + ]], + ["punctuation", "{"], + ["comment", "/* style to apply when the `::-webkit-foo` selector is actually supported,\r\n\t * instead of just being parsed as matching nothing because of Selectors 4\r\n\t * § Appendix B: https://drafts.csswg.org/selectors-4/#compat */"], + ["punctuation", "}"] +] + +---------------------------------------------------- + +Checks for the selector function in @supports rules. From 238f1163b59c51e4984595382f717cc88dbc35b9 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Sat, 8 Feb 2020 17:07:33 +0100 Subject: [PATCH 0438/1100] Toolbar: `data-toolbar-order` is now inherited (#2205) The `data-toolbar-order` property is now inherited allowing for custom orderings/selections on an per-element basis. --- plugins/toolbar/index.html | 14 ++++++++++-- plugins/toolbar/prism-toolbar.js | 34 ++++++++++++++++++++++++---- plugins/toolbar/prism-toolbar.min.js | 2 +- 3 files changed, 42 insertions(+), 8 deletions(-) diff --git a/plugins/toolbar/index.html b/plugins/toolbar/index.html index 720a04c11f..31eb3e2871 100644 --- a/plugins/toolbar/index.html +++ b/plugins/toolbar/index.html @@ -35,6 +35,8 @@

        How to use

        <template id="my-label-button"><button onclick="console.log('This is an inline-handler');">My button</button></template>
        +

        Registering buttons

        +

        For more flexibility, the Toolbar exposes a JavaScript function that can be used to register new buttons or labels to the Toolbar, Prism.plugins.toolbar.registerButton.

        @@ -78,9 +80,17 @@

        How to use

        The above function creates the Select Code button you see, and when you click it, the code gets highlighted.

        +

        Ordering buttons

        +

        By default, the buttons will be added to the code snippet in the order they were registered. If more control over - the order is needed, an HTML attribute can be added to the body tag with a comma-separated string indicating the - order.

        + the order is needed, the data-toolbar-order attribute can be used. Given a comma-separated list of button names, it will ensure that these buttons will be displayed in the given order.
        + Buttons not listed will not be displayed. This means that buttons can be disabled using this technique.

        + +

        Example: The "Hello World!" button will appear before the "Select Code" button and the custom label button will not be displayed.

        + +
        <pre data-toolbar-order="hello-world,select-code" data-label="Hello World!"><code></code></pre>
        + +

        The data-toolbar-order attribute is inherited, so you can define the button order for the whole document by adding the attribute to the body of the page.

        <body data-toolbar-order="select-code,hello-world,label">

        diff --git a/plugins/toolbar/prism-toolbar.js b/plugins/toolbar/prism-toolbar.js index 893bded2bb..60be9ce4ba 100644 --- a/plugins/toolbar/prism-toolbar.js +++ b/plugins/toolbar/prism-toolbar.js @@ -63,6 +63,27 @@ callbacks.push(map[key] = callback); }; + /** + * Returns the callback order of the given element. + * + * @param {HTMLElement} element + * @returns {string[] | undefined} + */ + function getOrder(element) { + while (element) { + var order = element.getAttribute('data-toolbar-order'); + if (order != null) { + order = order.trim(); + if (order.length) { + return order.split(/\s*,\s*/g); + } else { + return []; + } + } + element = element.parentElement; + } + } + /** * Post-highlight Prism hook callback. * @@ -81,8 +102,8 @@ } // Create wrapper for
         to prevent scrolling toolbar with content
        -		var wrapper = document.createElement("div");
        -		wrapper.classList.add("code-toolbar");
        +		var wrapper = document.createElement('div');
        +		wrapper.classList.add('code-toolbar');
         		pre.parentNode.insertBefore(wrapper, pre);
         		wrapper.appendChild(pre);
         
        @@ -90,13 +111,16 @@
         		var toolbar = document.createElement('div');
         		toolbar.classList.add('toolbar');
         
        -		if (document.body.hasAttribute('data-toolbar-order')) {
        -			callbacks = document.body.getAttribute('data-toolbar-order').split(',').map(function(key) {
        +		// order callbacks
        +		var elementCallbacks = callbacks;
        +		var order = getOrder(env.element);
        +		if (order) {
        +			elementCallbacks = order.map(function (key) {
         				return map[key] || noop;
         			});
         		}
         
        -		callbacks.forEach(function(callback) {
        +		elementCallbacks.forEach(function(callback) {
         			var element = callback(env);
         
         			if (!element) {
        diff --git a/plugins/toolbar/prism-toolbar.min.js b/plugins/toolbar/prism-toolbar.min.js
        index 3b9f082913..e692394036 100644
        --- a/plugins/toolbar/prism-toolbar.min.js
        +++ b/plugins/toolbar/prism-toolbar.min.js
        @@ -1 +1 @@
        -!function(){if("undefined"!=typeof self&&self.Prism&&self.document){var r=[],i={},a=function(){};Prism.plugins.toolbar={};var t=Prism.plugins.toolbar.registerButton=function(t,a){var e;e="function"==typeof a?a:function(t){var e;return"function"==typeof a.onClick?((e=document.createElement("button")).type="button",e.addEventListener("click",function(){a.onClick.call(this,t)})):"string"==typeof a.url?(e=document.createElement("a")).href=a.url:e=document.createElement("span"),a.className&&e.classList.add(a.className),e.textContent=a.text,e},t in i?console.warn('There is a button with the key "'+t+'" registered already.'):r.push(i[t]=e)},e=Prism.plugins.toolbar.hook=function(n){var t=n.element.parentNode;if(t&&/pre/i.test(t.nodeName)&&!t.parentNode.classList.contains("code-toolbar")){var e=document.createElement("div");e.classList.add("code-toolbar"),t.parentNode.insertBefore(e,t),e.appendChild(t);var o=document.createElement("div");o.classList.add("toolbar"),document.body.hasAttribute("data-toolbar-order")&&(r=document.body.getAttribute("data-toolbar-order").split(",").map(function(t){return i[t]||a})),r.forEach(function(t){var e=t(n);if(e){var a=document.createElement("div");a.classList.add("toolbar-item"),a.appendChild(e),o.appendChild(a)}}),e.appendChild(o)}};t("label",function(t){var e=t.element.parentNode;if(e&&/pre/i.test(e.nodeName)&&e.hasAttribute("data-label")){var a,n,o=e.getAttribute("data-label");try{n=document.querySelector("template#"+o)}catch(t){}return n?a=n.content:(e.hasAttribute("data-url")?(a=document.createElement("a")).href=e.getAttribute("data-url"):a=document.createElement("span"),a.textContent=o),a}}),Prism.hooks.add("complete",e)}}();
        \ No newline at end of file
        +!function(){if("undefined"!=typeof self&&self.Prism&&self.document){var i=[],l={},c=function(){};Prism.plugins.toolbar={};var e=Prism.plugins.toolbar.registerButton=function(e,n){var t;t="function"==typeof n?n:function(e){var t;return"function"==typeof n.onClick?((t=document.createElement("button")).type="button",t.addEventListener("click",function(){n.onClick.call(this,e)})):"string"==typeof n.url?(t=document.createElement("a")).href=n.url:t=document.createElement("span"),n.className&&t.classList.add(n.className),t.textContent=n.text,t},e in l?console.warn('There is a button with the key "'+e+'" registered already.'):i.push(l[e]=t)},t=Prism.plugins.toolbar.hook=function(a){var e=a.element.parentNode;if(e&&/pre/i.test(e.nodeName)&&!e.parentNode.classList.contains("code-toolbar")){var t=document.createElement("div");t.classList.add("code-toolbar"),e.parentNode.insertBefore(t,e),t.appendChild(e);var r=document.createElement("div");r.classList.add("toolbar");var n=i,o=function(e){for(;e;){var t=e.getAttribute("data-toolbar-order");if(null!=t)return(t=t.trim()).length?t.split(/\s*,\s*/g):[];e=e.parentElement}}(a.element);o&&(n=o.map(function(e){return l[e]||c})),n.forEach(function(e){var t=e(a);if(t){var n=document.createElement("div");n.classList.add("toolbar-item"),n.appendChild(t),r.appendChild(n)}}),t.appendChild(r)}};e("label",function(e){var t=e.element.parentNode;if(t&&/pre/i.test(t.nodeName)&&t.hasAttribute("data-label")){var n,a,r=t.getAttribute("data-label");try{a=document.querySelector("template#"+r)}catch(e){}return a?n=a.content:(t.hasAttribute("data-url")?(n=document.createElement("a")).href=t.getAttribute("data-url"):n=document.createElement("span"),n.textContent=r),n}}),Prism.hooks.add("complete",t)}}();
        \ No newline at end of file
        
        From b24f7348df369e046f1ab96a216998895376f23d Mon Sep 17 00:00:00 2001
        From: Jason Tatton <43928310+jasontatton@users.noreply.github.com>
        Date: Fri, 14 Feb 2020 21:55:32 +0800
        Subject: [PATCH 0439/1100] Add Concurnas support (#2206)
        
        Concurnas is an open-source JVM programming language designed for building reliable, scalable, high performance concurrent, distributed and parallel systems. For more information please see: https://concurnas.com/
        ---
         components.js                                 |   2 +-
         components.json                               |   5 +
         components/prism-concurnas.js                 |  48 +++++
         components/prism-concurnas.min.js             |   1 +
         examples/prism-concurnas.html                 |  89 +++++++++
         package-lock.json                             |  12 +-
         plugins/autoloader/prism-autoloader.js        |   1 +
         plugins/autoloader/prism-autoloader.min.js    |   2 +-
         plugins/show-language/prism-show-language.js  |   1 +
         .../show-language/prism-show-language.min.js  |   2 +-
         .../concurnas/annotation_feature.test         |  18 ++
         .../languages/concurnas/function_feature.test |  13 ++
         .../languages/concurnas/keyword_feature.test  | 185 ++++++++++++++++++
         tests/languages/concurnas/number_feature.test |  45 +++++
         .../languages/concurnas/operator_feature.test |  33 ++++
         tests/languages/concurnas/string_feature.test |  23 +++
         16 files changed, 471 insertions(+), 9 deletions(-)
         create mode 100644 components/prism-concurnas.js
         create mode 100644 components/prism-concurnas.min.js
         create mode 100644 examples/prism-concurnas.html
         create mode 100644 tests/languages/concurnas/annotation_feature.test
         create mode 100644 tests/languages/concurnas/function_feature.test
         create mode 100644 tests/languages/concurnas/keyword_feature.test
         create mode 100644 tests/languages/concurnas/number_feature.test
         create mode 100644 tests/languages/concurnas/operator_feature.test
         create mode 100644 tests/languages/concurnas/string_feature.test
        
        diff --git a/components.js b/components.js
        index 0b92157964..9ebc950e1b 100644
        --- a/components.js
        +++ b/components.js
        @@ -1,2 +1,2 @@
        -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default","overrideExampleHeader":true},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"Augmented Backus–Naur form","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","owner":"RunDevelopment"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"Backus–Naur form","alias":"rbnf","aliasTitles":{"rbnf":"Routing Backus–Naur form"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"Extended Backus–Naur form","owner":"RunDevelopment"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment"},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"http":{"title":"HTTP","optional":["css","javascript","json","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":["java"],"optional":["scala"],"owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"json":{"title":"JSON","owner":"CupOfTea696"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":["jsdoc"],"alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"cpp","modify":["c","cpp"],"overrideExampleHeader":true,"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","modify":["actionscript","coffeescript","flow","javascript","typescript","vala"],"owner":"RunDevelopment"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","peerDependencies":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"solidity":{"title":"Solidity (Ethereum)","require":"clike","owner":"glachaud"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"turtle":{"title":"Turtle","alias":["trig"],"aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","visual-basic"],"owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true}}};
        +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default","overrideExampleHeader":true},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"Augmented Backus–Naur form","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","owner":"RunDevelopment"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"Backus–Naur form","alias":"rbnf","aliasTitles":{"rbnf":"Routing Backus–Naur form"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"Extended Backus–Naur form","owner":"RunDevelopment"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment"},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"http":{"title":"HTTP","optional":["css","javascript","json","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":["java"],"optional":["scala"],"owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"json":{"title":"JSON","owner":"CupOfTea696"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":["jsdoc"],"alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"cpp","modify":["c","cpp"],"overrideExampleHeader":true,"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","modify":["actionscript","coffeescript","flow","javascript","typescript","vala"],"owner":"RunDevelopment"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","peerDependencies":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"solidity":{"title":"Solidity (Ethereum)","require":"clike","owner":"glachaud"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"turtle":{"title":"Turtle","alias":["trig"],"aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","visual-basic"],"owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true}}};
         if (typeof module !== 'undefined' && module.exports) { module.exports = components; }
        \ No newline at end of file
        diff --git a/components.json b/components.json
        index 40b9920c95..9cc0825c4a 100644
        --- a/components.json
        +++ b/components.json
        @@ -194,6 +194,11 @@
         			"require": "clike",
         			"owner": "zeitgeist87"
         		},
        +		"concurnas": {
        +			"title": "Concurnas",
        +			"alias": "conc",
        +			"owner": "jasontatton"
        +		},
         		"csharp": {
         			"title": "C#",
         			"require": "clike",
        diff --git a/components/prism-concurnas.js b/components/prism-concurnas.js
        new file mode 100644
        index 0000000000..104031d05f
        --- /dev/null
        +++ b/components/prism-concurnas.js
        @@ -0,0 +1,48 @@
        +Prism.languages.concurnas = {
        +	'comment': [
        +		{
        +			pattern: /(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,
        +			lookbehind: true
        +		},
        +		{
        +			pattern: /(^|[^\\:])\/\/.*/,
        +			lookbehind: true,
        +			greedy: true
        +		}
        +	],
        +	'langext': {
        +		pattern: /\w+\s*\|\|[\s\S]+?\|\|/,
        +		greedy: true,
        +		alias: 'string'
        +	},
        +	'function': {
        +		pattern: /((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/,
        +		lookbehind: true
        +	},
        +	'keyword': /\b(?:abstract|actor|also|annotation|assert|async|await|bool|boolean|break|byte|case|catch|changed|char|class|closed|constant|continue|def|default|del|double|elif|else|enum|every|extends|false|finally|float|for|from|global|gpudef|gpukernel|if|import|in|init|inject|int|lambda|local|long|loop|match|new|nodefault|null|of|onchange|open|out|override|package|parfor|parforsync|post|pre|private|protected|provide|provider|public|return|shared|short|single|size_t|sizeof|super|sync|this|throw|trait|trans|transient|true|try|typedef|unchecked|using|val|var|void|while|with)\b/,
        +	'boolean': /\b(?:false|true)\b/,
        +	'number': /\b0b[01][01_]*L?\b|\b0x[\da-f_]*\.?[\da-f_p+-]+\b|(?:\b\d[\d_]*\.?[\d_]*|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfls]?/i,
        +	'punctuation': /[{}[\];(),.:]/,
        +	'operator': /<==|>==|=>|->|<-|<>|\^|&==|&<>|!|\?|\?:|\.\?|\+\+|--|[-+*/=<>]=?|\b(?:and|as|band|bor|bxor|comp|is|isnot|mod|or)\b=?/,
        +	'annotation': {
        +		pattern: /@(?:\w+:)?(?:\w*|\[[^\]]+\])/,
        +		alias: 'builtin'
        +	}
        +};
        +
        +Prism.languages.insertBefore('concurnas', 'langext', {
        +	'string': {
        +		pattern: /[rs]?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,
        +		greedy: true,
        +		inside: {
        +			'interpolation': {
        +				pattern: /((?:^|[^\\])(?:\\{2})*){(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}/,
        +				lookbehind: true,
        +				inside: Prism.languages.concurnas
        +			},
        +			'string': /[\s\S]+/
        +		}
        +	}
        +});
        +
        +Prism.languages.conc = Prism.languages.concurnas;
        \ No newline at end of file
        diff --git a/components/prism-concurnas.min.js b/components/prism-concurnas.min.js
        new file mode 100644
        index 0000000000..106df343bb
        --- /dev/null
        +++ b/components/prism-concurnas.min.js
        @@ -0,0 +1 @@
        +Prism.languages.concurnas={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],langext:{pattern:/\w+\s*\|\|[\s\S]+?\|\|/,greedy:!0,alias:"string"},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/,lookbehind:!0},keyword:/\b(?:abstract|actor|also|annotation|assert|async|await|bool|boolean|break|byte|case|catch|changed|char|class|closed|constant|continue|def|default|del|double|elif|else|enum|every|extends|false|finally|float|for|from|global|gpudef|gpukernel|if|import|in|init|inject|int|lambda|local|long|loop|match|new|nodefault|null|of|onchange|open|out|override|package|parfor|parforsync|post|pre|private|protected|provide|provider|public|return|shared|short|single|size_t|sizeof|super|sync|this|throw|trait|trans|transient|true|try|typedef|unchecked|using|val|var|void|while|with)\b/,boolean:/\b(?:false|true)\b/,number:/\b0b[01][01_]*L?\b|\b0x[\da-f_]*\.?[\da-f_p+-]+\b|(?:\b\d[\d_]*\.?[\d_]*|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfls]?/i,punctuation:/[{}[\];(),.:]/,operator:/<==|>==|=>|->|<-|<>|\^|&==|&<>|!|\?|\?:|\.\?|\+\+|--|[-+*/=<>]=?|\b(?:and|as|band|bor|bxor|comp|is|isnot|mod|or)\b=?/,annotation:{pattern:/@(?:\w+:)?(?:\w*|\[[^\]]+\])/,alias:"builtin"}},Prism.languages.insertBefore("concurnas","langext",{string:{pattern:/[rs]?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*){(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}/,lookbehind:!0,inside:Prism.languages.concurnas},string:/[\s\S]+/}}}),Prism.languages.conc=Prism.languages.concurnas;
        \ No newline at end of file
        diff --git a/examples/prism-concurnas.html b/examples/prism-concurnas.html
        new file mode 100644
        index 0000000000..82698f4416
        --- /dev/null
        +++ b/examples/prism-concurnas.html
        @@ -0,0 +1,89 @@
        +

        Comments

        +
        // This is a comment
        +/* This is a comment
        +on multiple lines */
        + +

        Numbers

        +
        12
        +12e5
        +12.f
        +12f
        +12d
        +12.d
        +12.0
        +12.0f
        +12.0d
        + +

        strings and language extensions

        +
        "hi"
        +'hi'
        +'c'
        +'what "yach"'
        +s'c'
        +"c"
        +r"[a-z|A-Z]+"
        + +

        Functions

        +
        def add(a int, b int) => a + b
        + +

        Language Extensions

        +
        dcalc = mylisp||(+ 1 2 (* 2 3))|| // == 9
        +
        +myFortran || program hello
        +          		print *, "Hello World!"
        +       		 end program hello|| //prints "Hello World!"
        +
        +lotto = myAPL || x[⍋x←6?40] || //6 unique random numbers from 1 to 40
        + +

        Full example

        +
        //an overloaded function
        +def adder(a int, b int) => a + b
        +def adder(a int, b float) => adder(a, b as int)
        +def adder(a int) => adder(a, 10)
        +
        +//a default value
        +def powerPlus(a int, raiseTo = 2, c int) => a ** raiseTo + c
        +
        +//call our function with a default value
        +res1 = powerPlus(4, 10)//second argument defaults to '2'
        +res2 = powerPlus(4, 3, 10)//second argument provided
        +
        +//calling a function with named parameters:
        +def powerAdder(a int, raiseATo = 2, b int, raiseBTo = 2) => a**raiseATo + b**raiseBTo
        +res3 = powerAdder(2, 4, raiseATo=3)//equivalent to: powerAdder(2, 3, 4, 2)
        +
        +//varargs:
        +def sum(elms int...) int {
        +  res = 0
        +  for(elm in elms){
        +    res += elm
        +  }
        +  res
        +}
        +
        +//call our function with a vararg
        +thesum = sum(1, 2, 3, 4, 5)
        +
        +//partially defined typedef
        +typedef NameMap = java.util.ArrayList>>
        +
        +//using typedefs...
        +nm NameMap= new NameMap()
        +
        +@Annotation
        +class MyClass(a int, b int, c String){
        +  override toString() => 'MyClass({a}, {b}, "{c}")'
        +}
        +
        +mc1 = MyClass(12, 14, "hi there")
        +mc2 = mc1@ //copy mc1
        +
        +assert mc1 == mc2//same values!
        +assert mc1 &<> mc2//different objects!
        +
        +mc3 = mc1@(a = 100)//copy mc1 but overwrite value of a
        +assert 'MyClass(100, 14, "hi there")' == mc3.toString()
        +
        +mc4 = mc1@()//copy mc1 but exclude a and b
        +assert 'MyClass(0, 0, "hi there")' == mc3.toString()
        +
        diff --git a/package-lock.json b/package-lock.json index 30f37582f7..e9671a6339 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2919,9 +2919,9 @@ "dev": true }, "kind-of": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", - "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", "dev": true }, "last-run": { @@ -4096,9 +4096,9 @@ "dev": true }, "resolve": { - "version": "1.14.2", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.14.2.tgz", - "integrity": "sha512-EjlOBLBO1kxsUxsKjLt7TAECyKW6fOh1VRkykQkKGzcBbjjPIxBqGh0jf7GJ3k/f5mxMqW3htMD3WdTUVtW8HQ==", + "version": "1.15.1", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.15.1.tgz", + "integrity": "sha512-84oo6ZTtoTUpjgNEr5SJyzQhzL72gaRodsSfyxC/AXRvwu0Yse9H8eF9IpGo7b8YetZhlI6v7ZQ6bKBFV/6S7w==", "dev": true, "requires": { "path-parse": "^1.0.6" diff --git a/plugins/autoloader/prism-autoloader.js b/plugins/autoloader/prism-autoloader.js index 964e767c7e..f64bbbba98 100644 --- a/plugins/autoloader/prism-autoloader.js +++ b/plugins/autoloader/prism-autoloader.js @@ -147,6 +147,7 @@ "adoc": "asciidoc", "shell": "bash", "rbnf": "bnf", + "conc": "concurnas", "cs": "csharp", "dotnet": "csharp", "coffee": "coffeescript", diff --git a/plugins/autoloader/prism-autoloader.min.js b/plugins/autoloader/prism-autoloader.min.js index 90d4fe59ff..3b6033f248 100644 --- a/plugins/autoloader/prism-autoloader.min.js +++ b/plugins/autoloader/prism-autoloader.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof self&&self.Prism&&self.document&&document.createElement){var c={javascript:"clike",actionscript:"javascript",arduino:"cpp",aspnet:["markup","csharp"],bison:"c",c:"clike",csharp:"clike",cpp:"c",coffeescript:"javascript",crystal:"ruby","css-extras":"css",d:"clike",dart:"clike",django:"markup-templating",ejs:["javascript","markup-templating"],etlua:["lua","markup-templating"],erb:["ruby","markup-templating"],fsharp:"clike","firestore-security-rules":"clike",flow:"javascript",ftl:"markup-templating",glsl:"clike",gml:"clike",go:"clike",groovy:"clike",haml:"ruby",handlebars:"markup-templating",haxe:"clike",java:"clike",javadoc:["markup","java","javadoclike"],jolie:"clike",jsdoc:["javascript","javadoclike"],"js-extras":"javascript","js-templates":"javascript",jsonp:"json",json5:"json",kotlin:"clike",latte:["clike","markup-templating","php"],less:"css",lilypond:"scheme",markdown:"markup","markup-templating":"markup",n4js:"javascript",nginx:"clike",objectivec:"c",opencl:"cpp",parser:"markup",php:["clike","markup-templating"],phpdoc:["php","javadoclike"],"php-extras":"php",plsql:"sql",processing:"clike",protobuf:"clike",pug:["markup","javascript"],qml:"javascript",qore:"clike",jsx:["markup","javascript"],tsx:["jsx","typescript"],reason:"clike",ruby:"clike",sass:"css",scss:"css",scala:"java","shell-session":"bash",smarty:"markup-templating",solidity:"clike",soy:"markup-templating",sparql:"turtle",sqf:"clike",swift:"clike",tap:"yaml",textile:"markup",tt2:["clike","markup-templating"],twig:"markup",typescript:"javascript","t4-cs":["t4-templating","csharp"],"t4-vb":["t4-templating","visual-basic"],vala:"clike",vbnet:"basic",velocity:"markup",wiki:"markup",xeora:"markup",xquery:"markup"},l={html:"markup",xml:"markup",svg:"markup",mathml:"markup",js:"javascript",g4:"antlr4",adoc:"asciidoc",shell:"bash",rbnf:"bnf",cs:"csharp",dotnet:"csharp",coffee:"coffeescript",jinja2:"django","dns-zone":"dns-zone-file",dockerfile:"docker",gamemakerlanguage:"gml",hs:"haskell",tex:"latex",context:"latex",ly:"lilypond",emacs:"lisp",elisp:"lisp","emacs-lisp":"lisp",md:"markdown",moon:"moonscript",n4jsd:"n4js",objectpascal:"pascal",px:"pcaxis",py:"python",robot:"robotframework",rb:"ruby",rq:"sparql",trig:"turtle",ts:"typescript",t4:"t4-cs",vb:"visual-basic",xeoracube:"xeora",yml:"yaml"},n={},a="components/",e=Prism.util.currentScript();if(e){var t=/\bplugins\/autoloader\/prism-autoloader\.(?:min\.)js$/i,s=/[\w-]+\.(?:min\.)js$/i;if(e.hasAttribute("data-autoloader-path"))a=e.getAttribute("data-autoloader-path").trim().replace(/\/?$/,"/");else{var i=e.src;t.test(i)?a=i.replace(t,"components/"):s.test(i)&&(a=i.replace(s,"components/"))}}var p=Prism.plugins.autoloader={languages_path:a,use_minified:!0,loadLanguages:o};Prism.hooks.add("complete",function(a){a.element&&a.language&&!a.grammar&&"none"!==a.language&&function(a,e){a in l&&(a=l[a]);var t=e.getAttribute("data-dependencies"),s=e.parentElement;!t&&s&&"pre"===s.tagName.toLowerCase()&&(t=s.getAttribute("data-dependencies")),o(t=t?t.split(/\s*,\s*/g):[],function(){m(a,function(){Prism.highlightElement(e)})})}(a.language,a.element)})}function o(a,e,t){"string"==typeof a&&(a=[a]);var s=a.length,i=0,r=!1;function c(){r||++i===s&&e&&e(a)}0!==s?a.forEach(function(a){m(a,c,function(){r||(r=!0,t&&t(a))})}):e&&setTimeout(e,0)}function m(e,t,s){var i=0<=e.indexOf("!");e=e.replace("!",""),e=l[e]||e;var a=function(){var a=n[e];if(a||(a=n[e]={callbacks:[]}),a.callbacks.push({success:t,error:s}),!i&&Prism.languages[e])u(e,"success");else if(!i&&a.error)u(e,"error");else if(i||!a.loading){a.loading=!0,function(a,e,t){var s=document.createElement("script");s.src=a,s.async=!0,s.onload=function(){document.body.removeChild(s),e&&e()},s.onerror=function(){document.body.removeChild(s),t&&t()},document.body.appendChild(s)}(function(a){return p.languages_path+"prism-"+a+(p.use_minified?".min":"")+".js"}(e),function(){a.loading=!1,u(e,"success")},function(){a.loading=!1,a.error=!0,u(e,"error")})}},r=c[e];r&&r.length?o(r,a,s):a()}function u(a,e){if(n[a]){for(var t=n[a].callbacks,s=0,i=t.length;s 12 +myfunc() + +---------------------------------------------------- + +[ + ["keyword", "def"], ["function", "myfunc"], ["punctuation", "("], ["punctuation", ")"], ["operator", "=>"], ["number", "12"], + "\r\nmyfunc" , ["punctuation", "("], ["punctuation", ")"] +] + +---------------------------------------------------- + +Checks for functions. \ No newline at end of file diff --git a/tests/languages/concurnas/keyword_feature.test b/tests/languages/concurnas/keyword_feature.test new file mode 100644 index 0000000000..cdf3fdb9d3 --- /dev/null +++ b/tests/languages/concurnas/keyword_feature.test @@ -0,0 +1,185 @@ +as +assert +async +await +band +bool +boolean +bor +break +bxor +byte +case +catch +changed +char +closed +comp +constant +continue +def +default +del +double +elif +else +every +extends +false +finally +float +for +from +global +gpudef +gpukernel +if +import +in +init +inject +int +is +isnot +lambda +local +long +loop +match +mod +new +nodefault +null +of +onchange +open +out +override +package +parfor +parforsync +post +pre +private +protected +provide +public +return +shared +short +single +size_t +sizeof +super +sync +this +throw +trans +transient +true +try +typedef +unchecked +using +val +var +void +while +with + +---------------------------------------------------- + +[ + ["operator", "as"], + ["keyword", "assert"], + ["keyword", "async"], + ["keyword", "await"], + ["operator", "band"], + ["keyword", "bool"], + ["keyword", "boolean"], + ["operator", "bor"], + ["keyword", "break"], + ["operator", "bxor"], + ["keyword", "byte"], + ["keyword", "case"], + ["keyword", "catch"], + ["keyword", "changed"], + ["keyword", "char"], + ["keyword", "closed"], + ["operator", "comp"], + ["keyword", "constant"], + ["keyword", "continue"], + ["keyword", "def"], + ["keyword", "default"], + ["keyword", "del"], + ["keyword", "double"], + ["keyword", "elif"], + ["keyword", "else"], + ["keyword", "every"], + ["keyword", "extends"], + ["keyword", "false"], + ["keyword", "finally"], + ["keyword", "float"], + ["keyword", "for"], + ["keyword", "from"], + ["keyword", "global"], + ["keyword", "gpudef"], + ["keyword", "gpukernel"], + ["keyword", "if"], + ["keyword", "import"], + ["keyword", "in"], + ["keyword", "init"], + ["keyword", "inject"], + ["keyword", "int"], + ["operator", "is"], + ["operator", "isnot"], + ["keyword", "lambda"], + ["keyword", "local"], + ["keyword", "long"], + ["keyword", "loop"], + ["keyword", "match"], + ["operator", "mod"], + ["keyword", "new"], + ["keyword", "nodefault"], + ["keyword", "null"], + ["keyword", "of"], + ["keyword", "onchange"], + ["keyword", "open"], + ["keyword", "out"], + ["keyword", "override"], + ["keyword", "package"], + ["keyword", "parfor"], + ["keyword", "parforsync"], + ["keyword", "post"], + ["keyword", "pre"], + ["keyword", "private"], + ["keyword", "protected"], + ["keyword", "provide"], + ["keyword", "public"], + ["keyword", "return"], + ["keyword", "shared"], + ["keyword", "short"], + ["keyword", "single"], + ["keyword", "size_t"], + ["keyword", "sizeof"], + ["keyword", "super"], + ["keyword", "sync"], + ["keyword", "this"], + ["keyword", "throw"], + ["keyword", "trans"], + ["keyword", "transient"], + ["keyword", "true"], + ["keyword", "try"], + ["keyword", "typedef"], + ["keyword", "unchecked"], + ["keyword", "using"], + ["keyword", "val"], + ["keyword", "var"], + ["keyword", "void"], + ["keyword", "while"], + ["keyword", "with"] +] + +---------------------------------------------------- + +Checks for keywords. \ No newline at end of file diff --git a/tests/languages/concurnas/number_feature.test b/tests/languages/concurnas/number_feature.test new file mode 100644 index 0000000000..4e52aabcd8 --- /dev/null +++ b/tests/languages/concurnas/number_feature.test @@ -0,0 +1,45 @@ +123 +123L +123l +12s +12S +0x0F +0b00001011 +123.5 +123.5e10 +123.5e-10 +123.5e+10 +123.5f +123.5F +123_456 +123_456L +0X01AB_23CD +0B1001_1101 +12E34_56 + +---------------------------------------------------- + +[ + ["number", "123"], + ["number", "123L"], + ["number", "123l"], + ["number", "12s"], + ["number", "12S"], + ["number", "0x0F"], + ["number", "0b00001011"], + ["number", "123.5"], + ["number", "123.5e10"], + ["number", "123.5e-10"], + ["number", "123.5e+10"], + ["number", "123.5f"], + ["number", "123.5F"], + ["number", "123_456"], + ["number", "123_456L"], + ["number", "0X01AB_23CD"], + ["number", "0B1001_1101"], + ["number", "12E34_56"] +] + +---------------------------------------------------- + +Checks for numbers. \ No newline at end of file diff --git a/tests/languages/concurnas/operator_feature.test b/tests/languages/concurnas/operator_feature.test new file mode 100644 index 0000000000..41e009a889 --- /dev/null +++ b/tests/languages/concurnas/operator_feature.test @@ -0,0 +1,33 @@ ++ ++ += +- -- -= += == <> +&== &<> +isnot +is as +/ /= * *= +mod mod= +< <== > >== +and or +bor bxor +^ + +---------------------------------------------------- + +[ + ["operator", "+"], ["operator", "++"], ["operator", "+="], + ["operator", "-"], ["operator", "--"], ["operator", "-="], + ["operator", "="], ["operator", "=="], ["operator", "<>"], + ["operator", "&=="], ["operator", "&<>"], + ["operator", "isnot"], + ["operator", "is"], ["operator", "as"], + ["operator", "/"], ["operator", "/="], ["operator", "*"], ["operator", "*="], + ["operator", "mod"], ["operator", "mod="], + ["operator", "<"], ["operator", "<=="], ["operator", ">"], ["operator", ">=="], + ["operator", "and"], ["operator", "or"], + ["operator", "bor"], ["operator", "bxor"], + ["operator", "^"] +] + +---------------------------------------------------- + +Checks for operators. \ No newline at end of file diff --git a/tests/languages/concurnas/string_feature.test b/tests/languages/concurnas/string_feature.test new file mode 100644 index 0000000000..609a5b38fb --- /dev/null +++ b/tests/languages/concurnas/string_feature.test @@ -0,0 +1,23 @@ +"hi" +'hi' +r'say' +r"hello" +'contains: "' +myAPL || x[⍋x←6?40] || + || invalid || + +---------------------------------------------------- + +[ + ["string", [["string", "\"hi\""]]], + ["string", [["string", "'hi'"]]], + ["string", [["string", "r'say'"]]], + ["string", [["string", "r\"hello\""]]], + ["string", [["string", "'contains: \"'"]]], + ["langext", "myAPL || x[⍋x←6?40] ||"], + "\r\n || invalid ||" +] + +---------------------------------------------------- + +Checks for raw strings. \ No newline at end of file From f941102ef59897052a1e60887f90b9818433fbb0 Mon Sep 17 00:00:00 2001 From: Cat Stevens Date: Sun, 16 Feb 2020 13:49:33 -0500 Subject: [PATCH 0440/1100] Added support for Factor (#2203) This adds support for the [Factor](https://factorcode.org) language. --- components.js | 2 +- components.json | 4 + components/prism-factor.js | 403 ++++++++++++++++++ components/prism-factor.min.js | 1 + examples/prism-factor.html | 128 ++++++ .../factor/builtin_words_feature.test | 15 + .../languages/factor/colon_words_feature.test | 47 ++ tests/languages/factor/comments_feature.test | 74 ++++ .../factor/constructors_feature.test | 18 + .../factor/normal_words_feature.test | 56 +++ tests/languages/factor/numbers_feature.test | 49 +++ .../other_builtin_parsing_words_feature.test | 29 ++ .../languages/factor/quotations_feature.test | 19 + tests/languages/factor/regexps_feature.test | 27 ++ tests/languages/factor/sequences_feature.test | 98 +++++ .../factor/stack_effects_feature.test | 74 ++++ tests/languages/factor/strings_feature.test | 127 ++++++ 17 files changed, 1170 insertions(+), 1 deletion(-) create mode 100644 components/prism-factor.js create mode 100644 components/prism-factor.min.js create mode 100644 examples/prism-factor.html create mode 100644 tests/languages/factor/builtin_words_feature.test create mode 100644 tests/languages/factor/colon_words_feature.test create mode 100644 tests/languages/factor/comments_feature.test create mode 100644 tests/languages/factor/constructors_feature.test create mode 100644 tests/languages/factor/normal_words_feature.test create mode 100644 tests/languages/factor/numbers_feature.test create mode 100644 tests/languages/factor/other_builtin_parsing_words_feature.test create mode 100644 tests/languages/factor/quotations_feature.test create mode 100644 tests/languages/factor/regexps_feature.test create mode 100644 tests/languages/factor/sequences_feature.test create mode 100644 tests/languages/factor/stack_effects_feature.test create mode 100644 tests/languages/factor/strings_feature.test diff --git a/components.js b/components.js index 9ebc950e1b..fc526d39aa 100644 --- a/components.js +++ b/components.js @@ -1,2 +1,2 @@ -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default","overrideExampleHeader":true},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"Augmented Backus–Naur form","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","owner":"RunDevelopment"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"Backus–Naur form","alias":"rbnf","aliasTitles":{"rbnf":"Routing Backus–Naur form"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"Extended Backus–Naur form","owner":"RunDevelopment"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment"},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"http":{"title":"HTTP","optional":["css","javascript","json","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":["java"],"optional":["scala"],"owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"json":{"title":"JSON","owner":"CupOfTea696"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":["jsdoc"],"alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"cpp","modify":["c","cpp"],"overrideExampleHeader":true,"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","modify":["actionscript","coffeescript","flow","javascript","typescript","vala"],"owner":"RunDevelopment"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","peerDependencies":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"solidity":{"title":"Solidity (Ethereum)","require":"clike","owner":"glachaud"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"turtle":{"title":"Turtle","alias":["trig"],"aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","visual-basic"],"owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true}}}; +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default","overrideExampleHeader":true},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"Augmented Backus–Naur form","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","owner":"RunDevelopment"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"Backus–Naur form","alias":"rbnf","aliasTitles":{"rbnf":"Routing Backus–Naur form"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"Extended Backus–Naur form","owner":"RunDevelopment"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment"},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"http":{"title":"HTTP","optional":["css","javascript","json","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":["java"],"optional":["scala"],"owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"json":{"title":"JSON","owner":"CupOfTea696"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":["jsdoc"],"alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"cpp","modify":["c","cpp"],"overrideExampleHeader":true,"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","modify":["actionscript","coffeescript","flow","javascript","typescript","vala"],"owner":"RunDevelopment"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","peerDependencies":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"solidity":{"title":"Solidity (Ethereum)","require":"clike","owner":"glachaud"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"turtle":{"title":"Turtle","alias":["trig"],"aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","visual-basic"],"owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true}}}; if (typeof module !== 'undefined' && module.exports) { module.exports = components; } \ No newline at end of file diff --git a/components.json b/components.json index 9cc0825c4a..37ed2ede74 100644 --- a/components.json +++ b/components.json @@ -313,6 +313,10 @@ "require": "clike", "owner": "simonreynolds7" }, + "factor": { + "title": "Factor", + "owner": "catb0t" + }, "firestore-security-rules": { "title": "Firestore security rules", "require": "clike", diff --git a/components/prism-factor.js b/components/prism-factor.js new file mode 100644 index 0000000000..3e555c1d8c --- /dev/null +++ b/components/prism-factor.js @@ -0,0 +1,403 @@ +(function (Prism) { + + var comment_inside = { + 'function': /\b(?:TODOS?|FIX(?:MES?)?|NOTES?|BUGS?|XX+|HACKS?|WARN(?:ING)?|\?{2,}|!{2,})\b/ + }; + var string_inside = { + 'number': /\\[^\s']|%\w/ + }; + + var factor = { + 'comment': [ + { + // ! single-line exclamation point comments with whitespace after/around the ! + pattern: /(^|\s)(?:! .*|!$)/, + lookbehind: true, + inside: comment_inside + }, + + /* from basis/multiline: */ + { + // /* comment */, /* comment*/ + pattern: /(^|\s)\/\*\s[\s\S]*?\*\/(?=\s|$)/, + lookbehind: true, + greedy: true, + inside: comment_inside + }, + { + // ![[ comment ]] , ![===[ comment]===] + pattern: /(^|\s)!\[(={0,6})\[\s[\s\S]*?\]\2\](?=\s|$)/, + lookbehind: true, + greedy: true, + inside: comment_inside + } + ], + + 'number': [ + { + // basic base 10 integers 9, -9 + pattern: /(^|\s)[+-]?\d+(?=\s|$)/, + lookbehind: true + }, + { + // base prefix integers 0b010 0o70 0xad 0d10 0XAD -0xa9 + pattern: /(^|\s)[+-]?0(?:b[01]+|o[0-7]+|d\d+|x[\dA-F]+)(?=\s|$)/i, + lookbehind: true + }, + { + // fractional ratios 1/5 -1/5 and the literal float approximations 1/5. -1/5. + pattern: /(^|\s)[+-]?\d+\/\d+\.?(?=\s|$)/, + lookbehind: true + }, + { + // positive mixed numbers 23+1/5 +23+1/5 + pattern: /(^|\s)\+?\d+\+\d+\/\d+(?=\s|$)/, + lookbehind: true + }, + { + // negative mixed numbers -23-1/5 + pattern: /(^|\s)-\d+-\d+\/\d+(?=\s|$)/, + lookbehind: true + }, + { + // basic decimal floats -0.01 0. .0 .1 -.1 -1. -12.13 +12.13 + // and scientific notation with base 10 exponents 3e4 3e-4 .3e-4 + pattern: /(^|\s)[+-]?(?:\d*\.\d+|\d+\.\d*|\d+)(?:e[+-]?\d+)?(?=\s|$)/i, + lookbehind: true + }, + { + // NAN literal syntax NAN: 80000deadbeef, NAN: a + pattern: /(^|\s)NAN:\s+[\da-fA-F]+(?=\s|$)/, + lookbehind: true + }, + { + /* + base prefix floats 0x1.0p3 (8.0) 0b1.010p2 (5.0) 0x1.p1 0b1.11111111p11111... + "The normalized hex form ±0x1.MMMMMMMMMMMMM[pP]±EEEE allows any floating-point number to be specified precisely. + The values of MMMMMMMMMMMMM and EEEE map directly to the mantissa and exponent fields of the binary IEEE 754 representation." + + */ + pattern: /(^|\s)[+-]?0(?:b1\.[01]*|o1\.[0-7]*|d1\.\d*|x1\.[\dA-F]*)p\d+(?=\s|$)/i, + lookbehind: true + } + ], + + // R/ regexp?\/\\/ + 'regexp': { + pattern: /(^|\s)R\/\s+(?:\\\S|[^\\/])*\/(?:[idmsr]*|[idmsr]+-[idmsr]+)(?=\s|$)/, + lookbehind: true, + alias: 'number', + inside: { + 'variable': /\\\S/, + 'keyword': /[+?*\[\]^$(){}.|]/, + 'operator': { + pattern: /(\/)[idmsr]+(?:-[idmsr]+)?/, + lookbehind: true + } + } + }, + + 'boolean': { + pattern: /(^|\s)[tf](?=\s|$)/, + lookbehind: true + }, + + // SBUF" asd", URL" ://...", P" /etc/" + 'custom-string': { + pattern: /(^|\s)[A-Z0-9\-]+"\s(?:\\\S|[^"\\])*"/, + lookbehind: true, + greedy: true, + alias: 'string', + inside: { + 'number': /\\\S|%\w|\// + } + }, + + 'multiline-string': [ + { + // STRING: name \n content \n ; -> CONSTANT: name "content" (symbol) + pattern: /(^|\s)STRING:\s+\S+(?:\n|\r\n).*(?:\n|\r\n)\s*;(?=\s|$)/, + lookbehind: true, + greedy: true, + alias: 'string', + inside: { + 'number': string_inside.number, + // trailing semicolon on its own line + 'semicolon-or-setlocal': { + pattern: /((?:\n|\r\n)\s*);(?=\s|$)/, + lookbehind: true, + alias: 'function' + } + } + }, + { + // HEREDOC: marker \n content \n marker ; -> "content" (immediate) + pattern: /(^|\s)HEREDOC:\s+\S+(?:\n|\r\n).*(?:\n|\r\n)\s*\S+(?=\s|$)/, + lookbehind: true, + greedy: true, + alias: 'string', + inside: string_inside + }, + { + // [[ string ]], [==[ string]==] + pattern: /(^|\s)\[(={0,6})\[\s[\s\S]*?\]\2\](?=\s|$)/, + lookbehind: true, + greedy: true, + alias: 'string', + inside: string_inside + } + ], + + 'special-using': { + pattern: /(^|\s)USING:(?:\s\S+)*(?=\s+;(?:\s|$))/, + lookbehind: true, + alias: 'function', + inside: { + // this is essentially a regex for vocab names, which i don't want to specify + // but the USING: gets picked up as a vocab name + 'string': { + pattern: /(\s)[^:\s]+/, + lookbehind: true + } + } + }, + + /* this description of stack effect literal syntax is not complete and not as specific as theoretically possible + trying to do better is more work and regex-computation-time than it's worth though. + - we'd like to have the "delimiter" parts of the stack effect [ (, --, and ) ] be a different (less-important or comment-like) colour to the stack effect contents + - we'd like if nested stack effects were treated as such rather than just appearing flat (with `inside`) + - we'd like if the following variable name conventions were recognised specifically: + special row variables = ..a b.. + type and stack effect annotations end with a colon = ( quot: ( a: ( -- ) -- b ) -- x ), ( x: number -- ) + word throws unconditional error = * + any other word-like variable name = a ? q' etc + + https://docs.factorcode.org/content/article-effects.html + + these are pretty complicated to highlight properly without a real parser, and therefore out of scope + the old pattern, which may be later useful, was: (^|\s)(?:call|execute|eval)?\((?:\s+[^"\r\n\t ]\S*)*?\s+--(?:\s+[^"\n\t ]\S*)*?\s+\)(?=\s|$) + */ + + // current solution is not great + 'stack-effect-delimiter': [ + { + // opening parenthesis + pattern: /(^|\s)(?:call|execute|eval)?\((?=\s)/, + lookbehind: true, + alias: 'operator' + }, + { + // middle -- + pattern: /(\s)--(?=\s)/, + lookbehind: true, + alias: 'operator' + }, + { + // closing parenthesis + pattern: /(\s)\)(?=\s|$)/, + lookbehind: true, + alias: 'operator' + } + ], + + 'combinators': { + pattern: null, + lookbehind: true, + alias: 'keyword' + }, + + 'kernel-builtin': { + pattern: null, + lookbehind: true, + alias: 'variable' + }, + + 'sequences-builtin': { + pattern: null, + lookbehind: true, + alias: 'variable' + }, + + 'math-builtin': { + pattern: null, + lookbehind: true, + alias: 'variable' + }, + + 'constructor-word': { + // but not <=> + pattern: /(^|\s)<(?!=+>|-+>)\S+>(?=\s|$)/, + lookbehind: true, + alias: 'keyword' + }, + + 'other-builtin-syntax': { + pattern: null, + lookbehind: true, + alias: 'operator' + }, + + /* + full list of supported word naming conventions: (the convention appears outside of the [brackets]) + set-[x] + change-[x] + with-[x] + new-[x] + >[string] + [base]> + [string]>[number] + +[symbol]+ + [boolean-word]? + ?[of] + [slot-reader]>> + >>[slot-setter] + [slot-writer]<< + ([implementation-detail]) + [mutater]! + [variant]* + [prettyprint]. + $[help-markup] + + , SYNTAX:, etc are supported by their own patterns. + + `with` and `new` from `kernel` are their own builtins. + + see + */ + 'conventionally-named-word': { + pattern: /(^|\s)(?!")(?:(?:set|change|with|new)-\S+|\$\S+|>[^>\s]+|[^:>\s]+>|[^>\s]+>[^>\s]+|\+[^+\s]+\+|[^?\s]+\?|\?[^?\s]+|[^>\s]+>>|>>[^>\s]+|[^<\s]+<<|\([^()\s]+\)|[^!\s]+!|[^*\s]\S*\*|[^.\s]\S*\.)(?=\s|$)/, + lookbehind: true, + alias: 'keyword' + }, + + 'colon-syntax': { + pattern: /(^|\s)(?:[A-Z0-9\-]+#?)?:{1,2}\s+(?:;\S+|(?!;)\S+)(?=\s|$)/, + lookbehind: true, + greedy: true, + alias: 'function' + }, + + 'semicolon-or-setlocal': { + pattern: /(\s)(?:;|:>)(?=\s|$)/, + lookbehind: true, + alias: 'function' + }, + + // do not highlight leading } or trailing X{ at the begin/end of the file as it's invalid syntax + 'curly-brace-literal-delimiter': [ + { + // opening + pattern: /(^|\s)[a-z]*\{(?=\s)/i, + lookbehind: true, + alias: 'operator' + }, + { + // closing + pattern: /(\s)\}(?=\s|$)/, + lookbehind: true, + alias: 'operator' + }, + + ], + + // do not highlight leading ] or trailing [ at the begin/end of the file as it's invalid syntax + 'quotation-delimiter': [ + { + // opening + pattern: /(^|\s)\[(?=\s)/, + lookbehind: true, + alias: 'operator' + }, + { + // closing + pattern: /(\s)\](?=\s|$)/, + lookbehind: true, + alias: 'operator' + }, + ], + + 'normal-word': { + pattern: /(^|\s)[^"\s]\S*(?=\s|$)/, + lookbehind: true + }, + + /* + basic first-class string "a" + with escaped double-quote "a\"" + escaped backslash "\\" + and general escapes since Factor has so many "\N" + + syntax that works in the reference implementation that isn't fully + supported because it's an implementation detail: + "string 1""string 2" -> 2 strings (works anyway) + "string"5 -> string, 5 + "string"[ ] -> string, quotation + { "a"} -> array + + the rest of those examples all properly recognise the string, but not + the other object (number, quotation, etc) + this is fine for a regex-only implementation. + */ + 'string': { + pattern: /"(?:\\\S|[^"\\])*"/, + greedy: true, + inside: string_inside + } + }; + + var escape = function (str) { + return (str+'').replace(/([.?*+\^$\[\]\\(){}|\-])/g, '\\$1'); + }; + + var arrToWordsRegExp = function (arr) { + return new RegExp( + '(^|\\s)(?:' + arr.map(escape).join('|') + ')(?=\\s|$)' + ); + }; + + var builtins = { + 'kernel-builtin': [ + 'or', '2nipd', '4drop', 'tuck', 'wrapper', 'nip', 'wrapper?', 'callstack>array', 'die', 'dupd', 'callstack', 'callstack?', '3dup', 'hashcode', 'pick', '4nip', 'build', '>boolean', 'nipd', 'clone', '5nip', 'eq?', '?', '=', 'swapd', '2over', 'clear', '2dup', 'get-retainstack', 'not', 'tuple?', 'dup', '3nipd', 'call', '-rotd', 'object', 'drop', 'assert=', 'assert?', '-rot', 'execute', 'boa', 'get-callstack', 'curried?', '3drop', 'pickd', 'overd', 'over', 'roll', '3nip', 'swap', 'and', '2nip', 'rotd', 'throw', '(clone)', 'hashcode*', 'spin', 'reach', '4dup', 'equal?', 'get-datastack', 'assert', '2drop', '', 'boolean?', 'identity-hashcode', 'identity-tuple?', 'null', 'composed?', 'new', '5drop', 'rot', '-roll', 'xor', 'identity-tuple', 'boolean' + ], + 'other-builtin-syntax': [ + // syntax + '=======', 'recursive', 'flushable', '>>', '<<<<<<', 'M\\', 'B', 'PRIVATE>', '\\', '======', 'final', 'inline', 'delimiter', 'deprecated', '>>>>>', '<<<<<<<', 'parse-complex', 'malformed-complex', 'read-only', '>>>>>>>', 'call-next-method', '<<', 'foldable', + // literals + '$', '$[', '${' + ], + 'sequences-builtin': [ + 'member-eq?', 'mismatch', 'append', 'assert-sequence=', 'longer', 'repetition', 'clone-like', '3sequence', 'assert-sequence?', 'last-index-from', 'reversed', 'index-from', 'cut*', 'pad-tail', 'join-as', 'remove-eq!', 'concat-as', 'but-last', 'snip', 'nths', 'nth', 'sequence', 'longest', 'slice?', '', 'remove-nth', 'tail-slice', 'empty?', 'tail*', 'member?', 'virtual-sequence?', 'set-length', 'drop-prefix', 'iota', 'unclip', 'bounds-error?', 'unclip-last-slice', 'non-negative-integer-expected', 'non-negative-integer-expected?', 'midpoint@', 'longer?', '?set-nth', '?first', 'rest-slice', 'prepend-as', 'prepend', 'fourth', 'sift', 'subseq-start', 'new-sequence', '?last', 'like', 'first4', '1sequence', 'reverse', 'slice', 'virtual@', 'repetition?', 'set-last', 'index', '4sequence', 'max-length', 'set-second', 'immutable-sequence', 'first2', 'first3', 'supremum', 'unclip-slice', 'suffix!', 'insert-nth', 'tail', '3append', 'short', 'suffix', 'concat', 'flip', 'immutable?', 'reverse!', '2sequence', 'sum', 'delete-all', 'indices', 'snip-slice', '', 'check-slice', 'sequence?', 'head', 'append-as', 'halves', 'sequence=', 'collapse-slice', '?second', 'slice-error?', 'product', 'bounds-check?', 'bounds-check', 'immutable', 'virtual-exemplar', 'harvest', 'remove', 'pad-head', 'last', 'set-fourth', 'cartesian-product', 'remove-eq', 'shorten', 'shorter', 'reversed?', 'shorter?', 'shortest', 'head-slice', 'pop*', 'tail-slice*', 'but-last-slice', 'iota?', 'append!', 'cut-slice', 'new-resizable', 'head-slice*', 'sequence-hashcode', 'pop', 'set-nth', '?nth', 'second', 'join', 'immutable-sequence?', '', '3append-as', 'virtual-sequence', 'subseq?', 'remove-nth!', 'length', 'last-index', 'lengthen', 'assert-sequence', 'copy', 'move', 'third', 'first', 'tail?', 'set-first', 'prefix', 'bounds-error', '', 'exchange', 'surround', 'cut', 'min-length', 'set-third', 'push-all', 'head?', 'subseq-start-from', 'delete-slice', 'rest', 'sum-lengths', 'head*', 'infimum', 'remove!', 'glue', 'slice-error', 'subseq', 'push', 'replace-slice', 'subseq-as', 'unclip-last' + ], + 'math-builtin': [ + 'number=', 'next-power-of-2', '?1+', 'fp-special?', 'imaginary-part', 'float>bits', 'number?', 'fp-infinity?', 'bignum?', 'fp-snan?', 'denominator', 'gcd', '*', '+', 'fp-bitwise=', '-', 'u>=', '/', '>=', 'bitand', 'power-of-2?', 'log2-expects-positive', 'neg?', '<', 'log2', '>', 'integer?', 'number', 'bits>double', '2/', 'zero?', 'bits>float', 'float?', 'shift', 'ratio?', 'rect>', 'even?', 'ratio', 'fp-sign', 'bitnot', '>fixnum', 'complex?', '/i', 'integer>fixnum', '/f', 'sgn', '>bignum', 'next-float', 'u<', 'u>', 'mod', 'recip', 'rational', '>float', '2^', 'integer', 'fixnum?', 'neg', 'fixnum', 'sq', 'bignum', '>rect', 'bit?', 'fp-qnan?', 'simple-gcd', 'complex', '', 'real', '>fraction', 'double>bits', 'bitor', 'rem', 'fp-nan-payload', 'real-part', 'log2-expects-positive?', 'prev-float', 'align', 'unordered?', 'float', 'fp-nan?', 'abs', 'bitxor', 'integer>fixnum-strict', 'u<=', 'odd?', '<=', '/mod', '>integer', 'real?', 'rational?', 'numerator' + ] + // that's all for now + }; + + Object.keys(builtins).forEach(function (k) { + factor[k].pattern = arrToWordsRegExp( builtins[k] ); + }); + + var combinators = [ + // kernel + '2bi', 'while', '2tri', 'bi*', '4dip', 'both?', 'same?', 'tri@', 'curry', 'prepose', '3bi', '?if', 'tri*', '2keep', '3keep', 'curried', '2keepd', 'when', '2bi*', '2tri*', '4keep', 'bi@', 'keepdd', 'do', 'unless*', 'tri-curry', 'if*', 'loop', 'bi-curry*', 'when*', '2bi@', '2tri@', 'with', '2with', 'either?', 'bi', 'until', '3dip', '3curry', 'tri-curry*', 'tri-curry@', 'bi-curry', 'keepd', 'compose', '2dip', 'if', '3tri', 'unless', 'tuple', 'keep', '2curry', 'tri', 'most', 'while*', 'dip', 'composed', 'bi-curry@', + // sequences + 'find-last-from', 'trim-head-slice', 'map-as', 'each-from', 'none?', 'trim-tail', 'partition', 'if-empty', 'accumulate*', 'reject!', 'find-from', 'accumulate-as', 'collector-for-as', 'reject', 'map', 'map-sum', 'accumulate!', '2each-from', 'follow', 'supremum-by', 'map!', 'unless-empty', 'collector', 'padding', 'reduce-index', 'replicate-as', 'infimum-by', 'trim-tail-slice', 'count', 'find-index', 'filter', 'accumulate*!', 'reject-as', 'map-integers', 'map-find', 'reduce', 'selector', 'interleave', '2map', 'filter-as', 'binary-reduce', 'map-index-as', 'find', 'produce', 'filter!', 'replicate', 'cartesian-map', 'cartesian-each', 'find-index-from', 'map-find-last', '3map-as', '3map', 'find-last', 'selector-as', '2map-as', '2map-reduce', 'accumulate', 'each', 'each-index', 'accumulate*-as', 'when-empty', 'all?', 'collector-as', 'push-either', 'new-like', 'collector-for', '2selector', 'push-if', '2all?', 'map-reduce', '3each', 'any?', 'trim-slice', '2reduce', 'change-nth', 'produce-as', '2each', 'trim', 'trim-head', 'cartesian-find', 'map-index', + // math + 'if-zero', 'each-integer', 'unless-zero', '(find-integer)', 'when-zero', 'find-last-integer', '(all-integers?)', 'times', '(each-integer)', 'find-integer', 'all-integers?', + // math.combinators + 'unless-negative', 'if-positive', 'when-positive', 'when-negative', 'unless-positive', 'if-negative', + // combinators + 'case', '2cleave', 'cond>quot', 'case>quot', '3cleave', 'wrong-values', 'to-fixed-point', 'alist>quot', 'cond', 'cleave', 'call-effect', 'recursive-hashcode', 'spread', 'deep-spread>quot', + // combinators.short-circuit + '2||', '0||', 'n||', '0&&', '2&&', '3||', '1||', '1&&', 'n&&', '3&&', + // combinators.smart + 'smart-unless*', 'keep-inputs', 'reduce-outputs', 'smart-when*', 'cleave>array', 'smart-with', 'smart-apply', 'smart-if', 'inputs/outputs', 'output>sequence-n', 'map-outputs', 'map-reduce-outputs', 'dropping', 'output>array', 'smart-map-reduce', 'smart-2map-reduce', 'output>array-n', 'nullary', 'inputsequence', + // tafn + ]; + + factor.combinators.pattern = arrToWordsRegExp(combinators); + + Prism.languages.factor = factor; + +})(Prism); diff --git a/components/prism-factor.min.js b/components/prism-factor.min.js new file mode 100644 index 0000000000..b8a948f6e5 --- /dev/null +++ b/components/prism-factor.min.js @@ -0,0 +1 @@ +!function(e){var t={function:/\b(?:TODOS?|FIX(?:MES?)?|NOTES?|BUGS?|XX+|HACKS?|WARN(?:ING)?|\?{2,}|!{2,})\b/},s={number:/\\[^\s']|%\w/},i={comment:[{pattern:/(^|\s)(?:! .*|!$)/,lookbehind:!0,inside:t},{pattern:/(^|\s)\/\*\s[\s\S]*?\*\/(?=\s|$)/,lookbehind:!0,greedy:!0,inside:t},{pattern:/(^|\s)!\[(={0,6})\[\s[\s\S]*?\]\2\](?=\s|$)/,lookbehind:!0,greedy:!0,inside:t}],number:[{pattern:/(^|\s)[+-]?\d+(?=\s|$)/,lookbehind:!0},{pattern:/(^|\s)[+-]?0(?:b[01]+|o[0-7]+|d\d+|x[\dA-F]+)(?=\s|$)/i,lookbehind:!0},{pattern:/(^|\s)[+-]?\d+\/\d+\.?(?=\s|$)/,lookbehind:!0},{pattern:/(^|\s)\+?\d+\+\d+\/\d+(?=\s|$)/,lookbehind:!0},{pattern:/(^|\s)-\d+-\d+\/\d+(?=\s|$)/,lookbehind:!0},{pattern:/(^|\s)[+-]?(?:\d*\.\d+|\d+\.\d*|\d+)(?:e[+-]?\d+)?(?=\s|$)/i,lookbehind:!0},{pattern:/(^|\s)NAN:\s+[\da-fA-F]+(?=\s|$)/,lookbehind:!0},{pattern:/(^|\s)[+-]?0(?:b1\.[01]*|o1\.[0-7]*|d1\.\d*|x1\.[\dA-F]*)p\d+(?=\s|$)/i,lookbehind:!0}],regexp:{pattern:/(^|\s)R\/\s+(?:\\\S|[^\\/])*\/(?:[idmsr]*|[idmsr]+-[idmsr]+)(?=\s|$)/,lookbehind:!0,alias:"number",inside:{variable:/\\\S/,keyword:/[+?*\[\]^$(){}.|]/,operator:{pattern:/(\/)[idmsr]+(?:-[idmsr]+)?/,lookbehind:!0}}},boolean:{pattern:/(^|\s)[tf](?=\s|$)/,lookbehind:!0},"custom-string":{pattern:/(^|\s)[A-Z0-9\-]+"\s(?:\\\S|[^"\\])*"/,lookbehind:!0,greedy:!0,alias:"string",inside:{number:/\\\S|%\w|\//}},"multiline-string":[{pattern:/(^|\s)STRING:\s+\S+(?:\n|\r\n).*(?:\n|\r\n)\s*;(?=\s|$)/,lookbehind:!0,greedy:!0,alias:"string",inside:{number:s.number,"semicolon-or-setlocal":{pattern:/((?:\n|\r\n)\s*);(?=\s|$)/,lookbehind:!0,alias:"function"}}},{pattern:/(^|\s)HEREDOC:\s+\S+(?:\n|\r\n).*(?:\n|\r\n)\s*\S+(?=\s|$)/,lookbehind:!0,greedy:!0,alias:"string",inside:s},{pattern:/(^|\s)\[(={0,6})\[\s[\s\S]*?\]\2\](?=\s|$)/,lookbehind:!0,greedy:!0,alias:"string",inside:s}],"special-using":{pattern:/(^|\s)USING:(?:\s\S+)*(?=\s+;(?:\s|$))/,lookbehind:!0,alias:"function",inside:{string:{pattern:/(\s)[^:\s]+/,lookbehind:!0}}},"stack-effect-delimiter":[{pattern:/(^|\s)(?:call|execute|eval)?\((?=\s)/,lookbehind:!0,alias:"operator"},{pattern:/(\s)--(?=\s)/,lookbehind:!0,alias:"operator"},{pattern:/(\s)\)(?=\s|$)/,lookbehind:!0,alias:"operator"}],combinators:{pattern:null,lookbehind:!0,alias:"keyword"},"kernel-builtin":{pattern:null,lookbehind:!0,alias:"variable"},"sequences-builtin":{pattern:null,lookbehind:!0,alias:"variable"},"math-builtin":{pattern:null,lookbehind:!0,alias:"variable"},"constructor-word":{pattern:/(^|\s)<(?!=+>|-+>)\S+>(?=\s|$)/,lookbehind:!0,alias:"keyword"},"other-builtin-syntax":{pattern:null,lookbehind:!0,alias:"operator"},"conventionally-named-word":{pattern:/(^|\s)(?!")(?:(?:set|change|with|new)-\S+|\$\S+|>[^>\s]+|[^:>\s]+>|[^>\s]+>[^>\s]+|\+[^+\s]+\+|[^?\s]+\?|\?[^?\s]+|[^>\s]+>>|>>[^>\s]+|[^<\s]+<<|\([^()\s]+\)|[^!\s]+!|[^*\s]\S*\*|[^.\s]\S*\.)(?=\s|$)/,lookbehind:!0,alias:"keyword"},"colon-syntax":{pattern:/(^|\s)(?:[A-Z0-9\-]+#?)?:{1,2}\s+(?:;\S+|(?!;)\S+)(?=\s|$)/,lookbehind:!0,greedy:!0,alias:"function"},"semicolon-or-setlocal":{pattern:/(\s)(?:;|:>)(?=\s|$)/,lookbehind:!0,alias:"function"},"curly-brace-literal-delimiter":[{pattern:/(^|\s)[a-z]*\{(?=\s)/i,lookbehind:!0,alias:"operator"},{pattern:/(\s)\}(?=\s|$)/,lookbehind:!0,alias:"operator"}],"quotation-delimiter":[{pattern:/(^|\s)\[(?=\s)/,lookbehind:!0,alias:"operator"},{pattern:/(\s)\](?=\s|$)/,lookbehind:!0,alias:"operator"}],"normal-word":{pattern:/(^|\s)[^"\s]\S*(?=\s|$)/,lookbehind:!0},string:{pattern:/"(?:\\\S|[^"\\])*"/,greedy:!0,inside:s}},n=function(e){return(e+"").replace(/([.?*+\^$\[\]\\(){}|\-])/g,"\\$1")},r=function(e){return new RegExp("(^|\\s)(?:"+e.map(n).join("|")+")(?=\\s|$)")},a={"kernel-builtin":["or","2nipd","4drop","tuck","wrapper","nip","wrapper?","callstack>array","die","dupd","callstack","callstack?","3dup","hashcode","pick","4nip","build",">boolean","nipd","clone","5nip","eq?","?","=","swapd","2over","clear","2dup","get-retainstack","not","tuple?","dup","3nipd","call","-rotd","object","drop","assert=","assert?","-rot","execute","boa","get-callstack","curried?","3drop","pickd","overd","over","roll","3nip","swap","and","2nip","rotd","throw","(clone)","hashcode*","spin","reach","4dup","equal?","get-datastack","assert","2drop","","boolean?","identity-hashcode","identity-tuple?","null","composed?","new","5drop","rot","-roll","xor","identity-tuple","boolean"],"other-builtin-syntax":["=======","recursive","flushable",">>","<<<<<<","M\\","B","PRIVATE>","\\","======","final","inline","delimiter","deprecated",">>>>>","<<<<<<<","parse-complex","malformed-complex","read-only",">>>>>>>","call-next-method","<<","foldable","$","$[","${"],"sequences-builtin":["member-eq?","mismatch","append","assert-sequence=","longer","repetition","clone-like","3sequence","assert-sequence?","last-index-from","reversed","index-from","cut*","pad-tail","join-as","remove-eq!","concat-as","but-last","snip","nths","nth","sequence","longest","slice?","","remove-nth","tail-slice","empty?","tail*","member?","virtual-sequence?","set-length","drop-prefix","iota","unclip","bounds-error?","unclip-last-slice","non-negative-integer-expected","non-negative-integer-expected?","midpoint@","longer?","?set-nth","?first","rest-slice","prepend-as","prepend","fourth","sift","subseq-start","new-sequence","?last","like","first4","1sequence","reverse","slice","virtual@","repetition?","set-last","index","4sequence","max-length","set-second","immutable-sequence","first2","first3","supremum","unclip-slice","suffix!","insert-nth","tail","3append","short","suffix","concat","flip","immutable?","reverse!","2sequence","sum","delete-all","indices","snip-slice","","check-slice","sequence?","head","append-as","halves","sequence=","collapse-slice","?second","slice-error?","product","bounds-check?","bounds-check","immutable","virtual-exemplar","harvest","remove","pad-head","last","set-fourth","cartesian-product","remove-eq","shorten","shorter","reversed?","shorter?","shortest","head-slice","pop*","tail-slice*","but-last-slice","iota?","append!","cut-slice","new-resizable","head-slice*","sequence-hashcode","pop","set-nth","?nth","second","join","immutable-sequence?","","3append-as","virtual-sequence","subseq?","remove-nth!","length","last-index","lengthen","assert-sequence","copy","move","third","first","tail?","set-first","prefix","bounds-error","","exchange","surround","cut","min-length","set-third","push-all","head?","subseq-start-from","delete-slice","rest","sum-lengths","head*","infimum","remove!","glue","slice-error","subseq","push","replace-slice","subseq-as","unclip-last"],"math-builtin":["number=","next-power-of-2","?1+","fp-special?","imaginary-part","float>bits","number?","fp-infinity?","bignum?","fp-snan?","denominator","gcd","*","+","fp-bitwise=","-","u>=","/",">=","bitand","power-of-2?","log2-expects-positive","neg?","<","log2",">","integer?","number","bits>double","2/","zero?","bits>float","float?","shift","ratio?","rect>","even?","ratio","fp-sign","bitnot",">fixnum","complex?","/i","integer>fixnum","/f","sgn",">bignum","next-float","u<","u>","mod","recip","rational",">float","2^","integer","fixnum?","neg","fixnum","sq","bignum",">rect","bit?","fp-qnan?","simple-gcd","complex","","real",">fraction","double>bits","bitor","rem","fp-nan-payload","real-part","log2-expects-positive?","prev-float","align","unordered?","float","fp-nan?","abs","bitxor","integer>fixnum-strict","u<=","odd?","<=","/mod",">integer","real?","rational?","numerator"]};Object.keys(a).forEach(function(e){i[e].pattern=r(a[e])});i.combinators.pattern=r(["2bi","while","2tri","bi*","4dip","both?","same?","tri@","curry","prepose","3bi","?if","tri*","2keep","3keep","curried","2keepd","when","2bi*","2tri*","4keep","bi@","keepdd","do","unless*","tri-curry","if*","loop","bi-curry*","when*","2bi@","2tri@","with","2with","either?","bi","until","3dip","3curry","tri-curry*","tri-curry@","bi-curry","keepd","compose","2dip","if","3tri","unless","tuple","keep","2curry","tri","most","while*","dip","composed","bi-curry@","find-last-from","trim-head-slice","map-as","each-from","none?","trim-tail","partition","if-empty","accumulate*","reject!","find-from","accumulate-as","collector-for-as","reject","map","map-sum","accumulate!","2each-from","follow","supremum-by","map!","unless-empty","collector","padding","reduce-index","replicate-as","infimum-by","trim-tail-slice","count","find-index","filter","accumulate*!","reject-as","map-integers","map-find","reduce","selector","interleave","2map","filter-as","binary-reduce","map-index-as","find","produce","filter!","replicate","cartesian-map","cartesian-each","find-index-from","map-find-last","3map-as","3map","find-last","selector-as","2map-as","2map-reduce","accumulate","each","each-index","accumulate*-as","when-empty","all?","collector-as","push-either","new-like","collector-for","2selector","push-if","2all?","map-reduce","3each","any?","trim-slice","2reduce","change-nth","produce-as","2each","trim","trim-head","cartesian-find","map-index","if-zero","each-integer","unless-zero","(find-integer)","when-zero","find-last-integer","(all-integers?)","times","(each-integer)","find-integer","all-integers?","unless-negative","if-positive","when-positive","when-negative","unless-positive","if-negative","case","2cleave","cond>quot","case>quot","3cleave","wrong-values","to-fixed-point","alist>quot","cond","cleave","call-effect","recursive-hashcode","spread","deep-spread>quot","2||","0||","n||","0&&","2&&","3||","1||","1&&","n&&","3&&","smart-unless*","keep-inputs","reduce-outputs","smart-when*","cleave>array","smart-with","smart-apply","smart-if","inputs/outputs","output>sequence-n","map-outputs","map-reduce-outputs","dropping","output>array","smart-map-reduce","smart-2map-reduce","output>array-n","nullary","inputsequence"]),e.languages.factor=i}(Prism); \ No newline at end of file diff --git a/examples/prism-factor.html b/examples/prism-factor.html new file mode 100644 index 0000000000..6bde0a221f --- /dev/null +++ b/examples/prism-factor.html @@ -0,0 +1,128 @@ +

        Comments

        +
        ! FIXME: a comment
        +
        +USE: multiline
        +
        +![[ comment ]]
        +/* comment */
        + +

        Strings

        +
        "a string" "\"" "\x8" "%s"
        +
        +SBUF" asbdef"
        +
        +USE: multiline
        +
        +STRING: name
        +content
        +;
        +
        +HEREDOC: marker
        +text
        +marker
        +
        +[==[
        +	str
        +	ing
        +]==]
        +
        + +

        Numbers

        +
        5 1/5 +9 -9 +1/5 -1/5 -1/5. 23+1/5 -23-1/5 23-1/5 ! NOTE: last one = word
        +
        ++12.13 0.01 0e0 3E4 3e-4 3E-4 030 0xd 0o30 0b1100
        +-12.13 -0 -0.01 -0e0 -3E4 -3E-4 -030 -0xd -0o30 -0b1100
        +
        +348756424956392657834385437598743583648756332457
        +-348756424956392657834385437598743583648756332457
        +
        +NAN: a
        +NAN: 80000deadbeef
        +
        +0b1.010p2 0x1.0p3 0x1.p1 0b1.111111p1111 ...
        + +

        Sequences

        +
        { 1 2 3 4 }
        +{ a b c d e t f }
        +{ "a" "b" "c" }
        +
        +{ { a b } { c d } }
        +H{ { a b } { c d } }
        +H{ { "a" "b" } { "c" "d" } }
        +V{ 1 2 3 4 }
        +V{ "1" "2" "3" "4" }
        +BV{ 1 2 3 4 }
        + +

        Regular Expressions

        +
        USE: regexp
        +R/ abcde?.*+\?\.\*\+\/\\\/idmsr-idmsr/idmsr-idmsr
        +
        + +

        Colon parsing words

        +
        : a ( -- ) ;
        +:: ; ! ; is not a word name
        +:: ;a ! ;a is a word name
        +USING: a b c ;
        +USE: a
        +IN: a.b
        +CHAR: a
        +GENERIC#: x 1 ( x: integer quot: ( x -- y ) -- )
        + +

        Special words (builtins, conventions)

        +
        and not with map filter
        +
        +new last-index + - neg
        +
        +<array> <=> SYNTAX: x $[ xyz ]
        +
        +set-x change-x with-variable ?of if* (gensym) hex. $description reader>> >>setter writer<<
        +
        +string>number >hex base> mutater!
        +
        + +

        Full example

        +
        USING: accessors arrays assocs combinators
        +combinators.short-circuit effects io kernel sequences
        +sequences.deep splitting strings vocabs words ;
        +IN: prism
        +
        +: make-prism-syntax ( syntax-vocab -- seq )
        + 	vocab-words [
        +		dup name>> ">>" = [ drop t ] [
        +			{
        +				[ "delimiter" word-prop ]
        +				[ name>> last { CHAR: : CHAR: { CHAR: [ CHAR: ( CHAR: ) CHAR: ? CHAR: " } member? ]
        +				[ name>> { "t" "f" } member? ]
        +			} 1|| not
        +		] if
        +	] filter ;
        +
        +: combinator? ( word -- ? )
        +	[ "declared-effect" word-prop in>> flatten
        +		[
        +			[ effect? ] [ { "quots" "quot" } member? ] bi or
        +		] any?
        +	] [
        +		"help" word-prop ?first flatten [ dup word? [ name>> ] when "quot" swap subseq? ] any?
        +	] bi or ;
        +
        +: classify ( vocab-spec -- seq )
        +	vocab-words [
        +		dup {
        +			{ [ dup combinator? ] [ drop "combinator" ] }
        +			{ [ dup "macro" word-prop ] [ drop "macro" ] }
        +			[ drop "ordinary" ]
        +		} cond 2array
        +	] map ;
        +
        +: print-strings ( strs -- )
        +	[ name>> "'" dup surround ] map ", " join print ; recursive ! WARN: not recursive
        +
        +: combinators. ( vocab-spec -- )
        +	classify [ nip "combinator" = ] assoc-filter keys print-strings ; flushable
        +
        +: ordinaries. ( vocab-spec -- )
        +	classify [ nip "ordinary" = ] assoc-filter keys print-strings ; foldable
        +
        +: macros. ( vocab-spec -- )
        +	classify [ nip "macro" = ] assoc-filter keys print-strings ; inline
        diff --git a/tests/languages/factor/builtin_words_feature.test b/tests/languages/factor/builtin_words_feature.test new file mode 100644 index 0000000000..4464d62210 --- /dev/null +++ b/tests/languages/factor/builtin_words_feature.test @@ -0,0 +1,15 @@ +and not with map filter + +---------------------------------------------------- + +[ + [ "kernel-builtin", "and" ], + [ "kernel-builtin", "not" ], + [ "combinators", "with" ], + [ "combinators", "map" ], + [ "combinators", "filter" ] +] + +---------------------------------------------------- + +some builtins diff --git a/tests/languages/factor/colon_words_feature.test b/tests/languages/factor/colon_words_feature.test new file mode 100644 index 0000000000..1a01652865 --- /dev/null +++ b/tests/languages/factor/colon_words_feature.test @@ -0,0 +1,47 @@ +: a ( -- ) ; +:: ; ! ; is not a word name +:: ;a ! ;a is a word name +USING: a b c ; +USE: a +IN: a.b +CHAR: a +#: a +GENERIC#: a + +---------------------------------------------------- + +[ + [ "colon-syntax", ": a" ], + + [ "stack-effect-delimiter", "(" ], + [ "stack-effect-delimiter", "--" ], + [ "stack-effect-delimiter", ")" ], + + [ "semicolon-or-setlocal", ";" ], + + [ "normal-word", "::" ], + [ "semicolon-or-setlocal", ";" ], + [ "comment", [ "! ; is not a word name" ] ], + + [ "colon-syntax", ":: ;a" ], + [ "comment", [ "! ;a is a word name" ] ], + + [ "special-using", + [ "USING: ", + [ "string", "a" ], + [ "string", "b" ], + [ "string", "c" ] + ] + ], + [ "semicolon-or-setlocal", ";" ], + [ "colon-syntax", "USE: a" ], + [ "colon-syntax", "IN: a.b" ], + [ "colon-syntax", "CHAR: a" ], + [ "normal-word", "#:" ], + [ "normal-word", "a" ], + [ "colon-syntax", "GENERIC#: a" ] +] + +---------------------------------------------------- + +colon-ended parsing words diff --git a/tests/languages/factor/comments_feature.test b/tests/languages/factor/comments_feature.test new file mode 100644 index 0000000000..5dc45765ea --- /dev/null +++ b/tests/languages/factor/comments_feature.test @@ -0,0 +1,74 @@ +a! ! word +!a ! word +! comment +! bad +! fine +! "also a comment" +! : ( -- ) ; +! ! leading comment-like token + ! whitespace before +words blah ! comment after code on a line + +![[ comment ]] +"![[ string ]]" +![[ "comment" ]] + +![[ comment]] +![==[ comment ]==] +![==[ comment]==] +![=[word ]=] +![=======[ words ]=======] + +/* com +ment */ +/* com +ment*/ +/*word */ + +/* "comment" */ +"/* "strings" */" + + +---------------------------------------------------- + +[ + [ "conventionally-named-word", "a!"], + [ "comment", [ "! word" ] ], + [ "normal-word", "!a"], + [ "comment", [ "! word" ] ], + [ "comment", [ "! comment" ] ], + + [ "normal-word", "!" ], [ "normal-word", "bad" ], + [ "comment", [ "! \tfine" ] ], + + [ "comment", [ "! \"also a comment\"" ] ], + [ "comment", [ "! : ( -- ) ;" ] ], + [ "comment", [ "! ! leading comment-like token" ] ], + [ "comment", [ "! whitespace before" ] ], + [ "normal-word", "words" ], + [ "normal-word", "blah" ], + [ "comment", [ "! comment after code on a line" ] ], + + [ "comment", [ "![[ comment ]]" ] ], + [ "string", [ "\"![[ string ]]\"" ] ], + [ "comment", [ "![[ \"comment\" ]]" ] ], + [ "comment", [ "![[ comment]]" ] ], + [ "comment", [ "![==[ comment ]==]" ] ], + [ "comment", [ "![==[ comment]==]" ] ], + + [ "normal-word", "![=[word" ], + [ "normal-word", "]=]" ], + [ "normal-word", "![=======[" ], + [ "normal-word", "words" ], + [ "normal-word", "]=======]" ], + [ "comment", [ "/* com\r\nment */" ] ], + [ "comment", [ "/* com\r\nment*/" ] ], + [ "normal-word", "/*word" ], + [ "normal-word", "*/" ], + [ "comment", ["/* \"comment\" */"] ], + [ "string", ["\"/* \""] ], + "strings", + [ "string", ["\" */\""] ] +] + +---------------------------------------------------- diff --git a/tests/languages/factor/constructors_feature.test b/tests/languages/factor/constructors_feature.test new file mode 100644 index 0000000000..375e870c8f --- /dev/null +++ b/tests/languages/factor/constructors_feature.test @@ -0,0 +1,18 @@ + + +<=> <--> + +---------------------------------------------------- + +[ + [ "constructor-word", "" ], + [ "constructor-word", "" ], + [ "constructor-word", "" ], + + [ "conventionally-named-word", "<=>" ], + [ "conventionally-named-word", "<-->" ] +] + +---------------------------------------------------- + +ctors diff --git a/tests/languages/factor/normal_words_feature.test b/tests/languages/factor/normal_words_feature.test new file mode 100644 index 0000000000..fc26561350 --- /dev/null +++ b/tests/languages/factor/normal_words_feature.test @@ -0,0 +1,56 @@ +commas, primes' +set-x +change-x +with-x +new-x +>string +base> +string>number ++symbol+ +que? +?of +?of* +reader>> +>>setter +writer<< +(detail) +mutater! +variant* +prettyprint. +$help + +"no + +---------------------------------------------------- + +[ + [ "normal-word", "commas," ], + [ "normal-word", "primes'" ], + [ "conventionally-named-word", "set-x" ], + [ "conventionally-named-word", "change-x" ], + [ "conventionally-named-word", "with-x" ], + [ "conventionally-named-word", "new-x" ], + [ "conventionally-named-word", ">string" ], + [ "conventionally-named-word", "base>" ], + [ "conventionally-named-word", "string>number" ], + [ "conventionally-named-word", "+symbol+" ], + [ "conventionally-named-word", "que?" ], + [ "conventionally-named-word", "?of" ], + [ "conventionally-named-word", "?of*" ], + [ "conventionally-named-word", "reader>>" ], + [ "conventionally-named-word", ">>setter" ], + [ "conventionally-named-word", "writer<<" ], + [ "conventionally-named-word", "(detail)" ], + [ "conventionally-named-word", "mutater!" ], + [ "conventionally-named-word", "variant*" ], + [ "conventionally-named-word", "prettyprint." ], + [ "conventionally-named-word", "$help" ], + "\r\n\r\n\"no" +] + +---------------------------------------------------- + +"Normal" words are not builtin well-known ones like "not", "and", "<=>", though they may be in the standard library or user-defined. +They may start with any character except `"` (double-quote), but may contain or end with double-quotes or any other non-whitespace character. + +Conventionally named words follow the conventions outlined in prism-factor.js. diff --git a/tests/languages/factor/numbers_feature.test b/tests/languages/factor/numbers_feature.test new file mode 100644 index 0000000000..3526183d87 --- /dev/null +++ b/tests/languages/factor/numbers_feature.test @@ -0,0 +1,49 @@ +5 1/5 +9 -9 +1/5 -1/5 23+1/5 -23-1/5 23-1/5 ! last one = word + +0.01 0e0 3E4 3e-4 3E-4 030 0xd 0o30 0b1100 +-0 -0.01 -0e0 -3E4 -3E-4 -030 -0xd -0o30 -0b1100 + +348756424956392657834385437598743583648756332457 +-348756424956392657834385437598743583648756332457 + +NAN: 80000deadbeef + +--------------------------------------------------- + +[ + [ "number", "5" ], + [ "number", "1/5" ], + [ "number", "+9" ], + [ "number", "-9" ], + [ "number", "+1/5" ], + [ "number", "-1/5" ], + [ "number", "23+1/5" ], + [ "number", "-23-1/5" ], + [ "normal-word", "23-1/5" ], + [ "comment", [ "! last one = word" ] ], + [ "number", "0.01" ], + [ "number", "0e0" ], + [ "number", "3E4" ], + [ "number", "3e-4" ], + [ "number", "3E-4" ], + [ "number", "030" ], + [ "number", "0xd" ], + [ "number", "0o30" ], + [ "number", "0b1100" ], + [ "number", "-0" ], + [ "number", "-0.01" ], + [ "number", "-0e0" ], + [ "number", "-3E4" ], + [ "number", "-3E-4" ], + [ "number", "-030" ], + [ "number", "-0xd" ], + [ "number", "-0o30" ], + [ "number", "-0b1100" ], + [ "number", "348756424956392657834385437598743583648756332457" ], + [ "number", "-348756424956392657834385437598743583648756332457" ], + [ "number", "NAN: 80000deadbeef" ] +] + +--------------------------------------------------- + +numbers diff --git a/tests/languages/factor/other_builtin_parsing_words_feature.test b/tests/languages/factor/other_builtin_parsing_words_feature.test new file mode 100644 index 0000000000..acaf41492d --- /dev/null +++ b/tests/languages/factor/other_builtin_parsing_words_feature.test @@ -0,0 +1,29 @@ + +PRIVATE> +$[ some code ] +<< some code >> +\ M\ + +-------------------------------------------------- + +[ + [ "other-builtin-syntax", "" ], + [ "other-builtin-syntax", "PRIVATE>" ], + [ "other-builtin-syntax", "$[" ], + [ "normal-word", "some" ], + [ "normal-word", "code" ], + [ "quotation-delimiter", "]" ], + [ "other-builtin-syntax", "<<" ], + [ "normal-word", "some" ], + [ "normal-word", "code" ], + [ "other-builtin-syntax", ">>" ], + [ "other-builtin-syntax", "\\" ], + [ "other-builtin-syntax", "M\\" ] +] + + +-------------------------------------------------- + +various builtin parsing words from the syntax and kernel vocabs diff --git a/tests/languages/factor/quotations_feature.test b/tests/languages/factor/quotations_feature.test new file mode 100644 index 0000000000..dfaeedae6a --- /dev/null +++ b/tests/languages/factor/quotations_feature.test @@ -0,0 +1,19 @@ +] [ x y z and ] [ + +---------------------------------------------------- + +[ + ["normal-word", "]"], + ["quotation-delimiter", "["], + ["normal-word", "x" ], + ["normal-word", "y"], + ["normal-word", "z"], + ["kernel-builtin", "and"], + ["quotation-delimiter", "]"], + ["normal-word", "["] +] + +---------------------------------------------------- + +quotation syntax +] at the beginning, and [ at the end of the file should not be highlighted as delimiters diff --git a/tests/languages/factor/regexps_feature.test b/tests/languages/factor/regexps_feature.test new file mode 100644 index 0000000000..2d79d09642 --- /dev/null +++ b/tests/languages/factor/regexps_feature.test @@ -0,0 +1,27 @@ +R/ abcde/i-r +R/ +abcde?.+\?\*\+/ +R/ \\/ +R/ \//idmsr +R/ \/idmsr/ + +----------------------------- + +[ + [ "regexp", [ "R/ abcde/", [ "operator", "i-r" ] ] ], + [ "regexp", [ + "R/\r\nabcde", + [ "keyword", "?" ], + [ "keyword", "." ], + [ "keyword", "+" ], + [ "variable", "\\?" ], + [ "variable", "\\*" ], + [ "variable", "\\+" ], + "/" + ] ], + [ "regexp", [ "R/ ", [ "variable", "\\\\"], "/"] ], + [ "regexp", [ "R/ ", [ "variable", "\\/" ], "/", [ "operator", "idmsr" ] ] ], + [ "regexp", [ "R/ ", [ "variable", "\\/" ], "idmsr/" ] ] +] + +----------------------------- diff --git a/tests/languages/factor/sequences_feature.test b/tests/languages/factor/sequences_feature.test new file mode 100644 index 0000000000..041dc78518 --- /dev/null +++ b/tests/languages/factor/sequences_feature.test @@ -0,0 +1,98 @@ +} +{ 1 2 3 4 } +{ a b c d e f } +{ "a" "b" "c" } + +{ { a b } { c d } } +H{ { a b } { c d } } +H{ { "a" "b" } { "c" "d" } } +V{ 1 2 3 4 } +V{ "1" "2" "3" "4" } +BV{ 1 2 3 4 } +{ + +---------------------------------------------------- + +[ + ["normal-word", "}"], + ["curly-brace-literal-delimiter", "{"], + ["number", "1"], + ["number", "2"], + ["number", "3"], + ["number", "4"], + ["curly-brace-literal-delimiter", "}"], + + ["curly-brace-literal-delimiter", "{"], + ["normal-word", "a"], + ["normal-word", "b"], + ["normal-word", "c"], + ["normal-word", "d"], + ["normal-word", "e"], + ["boolean", "f"], + ["curly-brace-literal-delimiter", "}"], + + ["curly-brace-literal-delimiter", "{"], + ["string", ["\"a\""] ], + ["string", ["\"b\""] ], + ["string", ["\"c\""] ], + ["curly-brace-literal-delimiter", "}"], + + ["curly-brace-literal-delimiter", "{"], + ["curly-brace-literal-delimiter", "{"], + ["normal-word", "a"], + ["normal-word", "b"], + ["curly-brace-literal-delimiter", "}"], + ["curly-brace-literal-delimiter", "{"], + ["normal-word", "c"], + ["normal-word", "d"], + ["curly-brace-literal-delimiter", "}"], + ["curly-brace-literal-delimiter", "}"], + + ["curly-brace-literal-delimiter", "H{"], + ["curly-brace-literal-delimiter", "{"], + ["normal-word", "a"], + ["normal-word", "b"], + ["curly-brace-literal-delimiter", "}"], + ["curly-brace-literal-delimiter", "{"], + ["normal-word", "c"], + ["normal-word", "d"], + ["curly-brace-literal-delimiter", "}"], + ["curly-brace-literal-delimiter", "}"], + + ["curly-brace-literal-delimiter", "H{"], + ["curly-brace-literal-delimiter", "{"], + ["string", ["\"a\""]], + ["string", ["\"b\""]], + ["curly-brace-literal-delimiter", "}"], + ["curly-brace-literal-delimiter", "{"], + ["string", ["\"c\""]], + ["string", ["\"d\""]], + ["curly-brace-literal-delimiter", "}"], + ["curly-brace-literal-delimiter", "}"], + + ["curly-brace-literal-delimiter", "V{"], + ["number", "1"], + ["number", "2"], + ["number", "3"], + ["number", "4"], + ["curly-brace-literal-delimiter", "}"], + + ["curly-brace-literal-delimiter", "V{"], + ["string", ["\"1\""]], + ["string", ["\"2\""]], + ["string", ["\"3\""]], + ["string", ["\"4\""]], + ["curly-brace-literal-delimiter", "}"], + + ["curly-brace-literal-delimiter", "BV{"], + ["number", "1"], + ["number", "2"], + ["number", "3"], + ["number", "4"], + ["curly-brace-literal-delimiter", "}"], + ["normal-word", "{"] +] + +---------------------------------------------------- + +} / { at the front / EOF are not delimiters diff --git a/tests/languages/factor/stack_effects_feature.test b/tests/languages/factor/stack_effects_feature.test new file mode 100644 index 0000000000..1513e2a5d2 --- /dev/null +++ b/tests/languages/factor/stack_effects_feature.test @@ -0,0 +1,74 @@ +( -- ) +( a b -- c ) +( a: integer b: string -- c: word ) +( x y quot: ( ..a -- ..a ) -- ..a ) +call( -- ) +call( x -- y ) +execute( x -- y ) +eval( x -- y ) + +---------------------------------------------------- + +[ + [ "stack-effect-delimiter", "(" ], + [ "stack-effect-delimiter", "--" ], + [ "stack-effect-delimiter", ")" ], + + [ "stack-effect-delimiter", "(" ], + [ "normal-word", "a" ], + [ "normal-word", "b" ], + [ "stack-effect-delimiter", "--" ], + [ "normal-word", "c" ], + [ "stack-effect-delimiter", ")" ], + + [ "stack-effect-delimiter", "(" ], + [ "normal-word", "a:" ], + [ "math-builtin", "integer" ], + [ "normal-word", "b:" ], + [ "normal-word", "string" ], + [ "stack-effect-delimiter", "--" ], + [ "normal-word", "c:" ], + [ "normal-word", "word" ], + [ "stack-effect-delimiter", ")" ], + + [ "stack-effect-delimiter", "(" ], + [ "normal-word", "x" ], + [ "normal-word", "y" ], + [ "normal-word", "quot:" ], + + [ "stack-effect-delimiter", "(" ], + [ "normal-word", "..a" ], + [ "stack-effect-delimiter", "--" ], + [ "normal-word", "..a" ], + [ "stack-effect-delimiter", ")" ], + + [ "stack-effect-delimiter", "--" ], + [ "normal-word", "..a" ], + [ "stack-effect-delimiter", ")" ], + + [ "stack-effect-delimiter", "call(" ], + [ "stack-effect-delimiter", "--" ], + [ "stack-effect-delimiter", ")" ], + + [ "stack-effect-delimiter", "call(" ], + [ "normal-word", "x" ], + [ "stack-effect-delimiter", "--" ], + [ "normal-word", "y" ], + [ "stack-effect-delimiter", ")" ], + + [ "stack-effect-delimiter", "execute(" ], + [ "normal-word", "x" ], + [ "stack-effect-delimiter", "--" ], + [ "normal-word", "y" ], + [ "stack-effect-delimiter", ")" ], + + [ "stack-effect-delimiter", "eval(" ], + [ "normal-word", "x" ], + [ "stack-effect-delimiter", "--" ], + [ "normal-word", "y" ], + [ "stack-effect-delimiter", ")" ] +] + +---------------------------------------------------- + +stack effect syntax diff --git a/tests/languages/factor/strings_feature.test b/tests/languages/factor/strings_feature.test new file mode 100644 index 0000000000..94e77b0c3f --- /dev/null +++ b/tests/languages/factor/strings_feature.test @@ -0,0 +1,127 @@ +"s" word"word" ! word: word"word" +"adjacent""strings" +" ! str not comment" ! comment +"!" +" ! " +"! " + +"\"" +"'" +"\n" +"\\" + +"str"5 +"str"[ ] +"str"{ } +{ "a"} +"5" +"1/5" +"+5" +"-5" + +HEREDOC: marker +text \n +marker + +STRING: name +text \n +; + +[[ string ]] +[[ string]] +[==[ string ]==] +[==[ string]==] + +[[word ]] + +URL" " URL"" +SBUF" " SBUF"" +P" " P"" + +P" as\\"" + +---------------------------------------------------------- + +[ + [ "string", ["\"s\""] ], + [ "normal-word", "word\"word\"" ], + [ "comment", ["! word: word\"word\""] ], + [ "string", ["\"adjacent\""] ], + [ "string", ["\"strings\""] ], + [ "string", ["\" ! str not comment\""] ], + [ "comment", ["! comment"] ], + + [ "string", ["\"!\""] ], + [ "string", ["\" ! \""] ], + [ "string", ["\"! \""] ], + + [ "string", [ + "\"", + [ "number", "\\\"" ], + "\"" + ] ], + [ "string", ["\"'\""] ], + [ "string", [ + "\"", + ["number", "\\n"], + "\"" + ] ], + [ "string", ["\"", ["number", "\\\\"], "\""] ], + + [ "string", ["\"str\""] ], + "5\r\n", + + ["string", ["\"str\""] ], + "[ ", + [ "quotation-delimiter", "]" ], + + [ "string", ["\"str\""] ], + "{ ", + [ "curly-brace-literal-delimiter", "}" ], + + [ "curly-brace-literal-delimiter", "{" ], + [ "string", ["\"a\""] ], + "}\r\n", + + [ "string", ["\"5\""] ], + [ "string", ["\"1/5\""] ], + [ "string", ["\"+5\""] ], + [ "string", ["\"-5\""] ], + + [ "multiline-string", [ + "HEREDOC: marker\r\ntext ", + [ "number", "\\n" ], + "\r\nmarker" + ] ], + + [ "multiline-string", [ + "STRING: name\r\ntext ", + [ "number", "\\n" ], + [ "semicolon-or-setlocal", ";" ] + ] ], + + [ "multiline-string", [ "[[ string ]]" ] ], + [ "multiline-string", [ "[[ string]]" ] ], + [ "multiline-string", [ "[==[ string ]==]" ] ], + [ "multiline-string", [ "[==[ string]==]" ] ], + [ "normal-word", "[[word" ], + [ "normal-word", "]]" ], + [ "custom-string", ["URL\" \""] ], + [ "normal-word", "URL\"\"" ], + + [ "custom-string", ["SBUF\" \""] ], + [ "normal-word", "SBUF\"\"" ], + + [ "custom-string", ["P\" \""] ], + [ "normal-word", "P\"\"" ], + [ "custom-string", [ + "P\" as", + [ "number", "\\\\" ], + "\"" + ] ], + "\"" +] + +---------------------------------------------------------- + +string kinds From 47910b5c375938da4a3eec0c233cf83f6d8cff18 Mon Sep 17 00:00:00 2001 From: Nicolai Parlog Date: Tue, 18 Feb 2020 21:45:03 +0100 Subject: [PATCH 0441/1100] Java: Added `record` keyword (#2185) This adds support for the new `record` keyword from Java 14. --- components/prism-java.js | 2 +- components/prism-java.min.js | 2 +- tests/languages/java/keyword_feature.test | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/components/prism-java.js b/components/prism-java.js index 0c8ac50d91..545239539f 100644 --- a/components/prism-java.js +++ b/components/prism-java.js @@ -1,6 +1,6 @@ (function (Prism) { - var keywords = /\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|null|open|opens|package|private|protected|provides|public|requires|return|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/; + var keywords = /\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|null|open|opens|package|private|protected|provides|public|record|requires|return|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/; // based on the java naming conventions var className = /\b[A-Z](?:\w*[a-z]\w*)?\b/; diff --git a/components/prism-java.min.js b/components/prism-java.min.js index c3a2cb0011..079c8d4e7d 100644 --- a/components/prism-java.min.js +++ b/components/prism-java.min.js @@ -1 +1 @@ -!function(e){var t=/\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|null|open|opens|package|private|protected|provides|public|requires|return|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/,a=/\b[A-Z](?:\w*[a-z]\w*)?\b/;e.languages.java=e.languages.extend("clike",{"class-name":[a,/\b[A-Z]\w*(?=\s+\w+\s*[;,=())])/],keyword:t,function:[e.languages.clike.function,{pattern:/(\:\:)[a-z_]\w*/,lookbehind:!0}],number:/\b0b[01][01_]*L?\b|\b0x[\da-f_]*\.?[\da-f_p+-]+\b|(?:\b\d[\d_]*\.?[\d_]*|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,lookbehind:!0}}),e.languages.insertBefore("java","string",{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:"string"}}),e.languages.insertBefore("java","class-name",{annotation:{alias:"punctuation",pattern:/(^|[^.])@\w+/,lookbehind:!0},namespace:{pattern:/(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)[a-z]\w*(?:\.[a-z]\w*)+/,lookbehind:!0,inside:{punctuation:/\./}},generics:{pattern:/<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<[\w\s,.&?]*>)*>)*>)*>/,inside:{"class-name":a,keyword:t,punctuation:/[<>(),.:]/,operator:/[?&|]/}}})}(Prism); \ No newline at end of file +!function(e){var t=/\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|null|open|opens|package|private|protected|provides|public|record|requires|return|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/,a=/\b[A-Z](?:\w*[a-z]\w*)?\b/;e.languages.java=e.languages.extend("clike",{"class-name":[a,/\b[A-Z]\w*(?=\s+\w+\s*[;,=())])/],keyword:t,function:[e.languages.clike.function,{pattern:/(\:\:)[a-z_]\w*/,lookbehind:!0}],number:/\b0b[01][01_]*L?\b|\b0x[\da-f_]*\.?[\da-f_p+-]+\b|(?:\b\d[\d_]*\.?[\d_]*|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,lookbehind:!0}}),e.languages.insertBefore("java","string",{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:"string"}}),e.languages.insertBefore("java","class-name",{annotation:{alias:"punctuation",pattern:/(^|[^.])@\w+/,lookbehind:!0},namespace:{pattern:/(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)[a-z]\w*(?:\.[a-z]\w*)+/,lookbehind:!0,inside:{punctuation:/\./}},generics:{pattern:/<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<[\w\s,.&?]*>)*>)*>)*>/,inside:{"class-name":a,keyword:t,punctuation:/[<>(),.:]/,operator:/[?&|]/}}})}(Prism); \ No newline at end of file diff --git a/tests/languages/java/keyword_feature.test b/tests/languages/java/keyword_feature.test index 1b4bc160e5..d4114e320f 100644 --- a/tests/languages/java/keyword_feature.test +++ b/tests/languages/java/keyword_feature.test @@ -9,7 +9,7 @@ protected throw byte else import public throws case enum instanceof -return transient catch +record return transient catch extends int short try char final @@ -39,7 +39,7 @@ yield ["keyword", "import"], ["keyword", "public"], ["keyword", "throws"], ["keyword", "case"], ["keyword", "enum"], ["keyword", "instanceof"], - ["keyword", "return"], ["keyword", "transient"], ["keyword", "catch"], + ["keyword", "record"], ["keyword", "return"], ["keyword", "transient"], ["keyword", "catch"], ["keyword", "extends"], ["keyword", "int"], ["keyword", "short"], ["keyword", "try"], ["keyword", "char"], ["keyword", "final"], From 674f4b3508931ccdcefa4ef31c7a5fcb8bf15283 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Tue, 18 Feb 2020 21:52:43 +0100 Subject: [PATCH 0442/1100] C/C++/OpenCL C: Improvements (#2196) This makes a few minor improvements to C and OpenCL C. Some of those improvements carry over to C++. For more details, see the pull request. --- components/prism-c.js | 5 +- components/prism-c.min.js | 2 +- components/prism-opencl.js | 15 +- components/prism-opencl.min.js | 2 +- tests/languages/c/class-name_feature.test | 32 +- tests/languages/c/function_feature.test | 24 + tests/languages/c/keyword_feature.test | 2 + tests/languages/opencl/boolean_feature.test | 13 + tests/languages/opencl/constant_feature.test | 106 +++- tests/languages/opencl/function_feature.test | 601 ------------------- tests/languages/opencl/number_feature.test | 53 ++ 11 files changed, 223 insertions(+), 632 deletions(-) create mode 100644 tests/languages/c/function_feature.test create mode 100644 tests/languages/opencl/boolean_feature.test delete mode 100644 tests/languages/opencl/function_feature.test create mode 100644 tests/languages/opencl/number_feature.test diff --git a/components/prism-c.js b/components/prism-c.js index faa6c4981c..0c058ffe92 100644 --- a/components/prism-c.js +++ b/components/prism-c.js @@ -1,9 +1,10 @@ Prism.languages.c = Prism.languages.extend('clike', { 'class-name': { - pattern: /(\b(?:enum|struct)\s+)\w+/, + pattern: /(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+/, lookbehind: true }, - 'keyword': /\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|asm|typeof|inline|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|union|unsigned|void|volatile|while)\b/, + 'keyword': /\b(?:__attribute__|_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|asm|typeof|inline|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|union|unsigned|void|volatile|while)\b/, + 'function': /[a-z_]\w*(?=\s*\()/i, 'operator': />>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/, 'number': /(?:\b0x(?:[\da-f]+\.?[\da-f]*|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?)[ful]*/i }); diff --git a/components/prism-c.min.js b/components/prism-c.min.js index 4ccc05ca16..aafd9fc599 100644 --- a/components/prism-c.min.js +++ b/components/prism-c.min.js @@ -1 +1 @@ -Prism.languages.c=Prism.languages.extend("clike",{"class-name":{pattern:/(\b(?:enum|struct)\s+)\w+/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|asm|typeof|inline|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|union|unsigned|void|volatile|while)\b/,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/,number:/(?:\b0x(?:[\da-f]+\.?[\da-f]*|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?)[ful]*/i}),Prism.languages.insertBefore("c","string",{macro:{pattern:/(^\s*)#\s*[a-z]+(?:[^\r\n\\]|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,alias:"property",inside:{string:{pattern:/(#\s*include\s*)(?:<.+?>|("|')(?:\\?.)+?\2)/,lookbehind:!0},directive:{pattern:/(#\s*)\b(?:define|defined|elif|else|endif|error|ifdef|ifndef|if|import|include|line|pragma|undef|using)\b/,lookbehind:!0,alias:"keyword"}}},constant:/\b(?:__FILE__|__LINE__|__DATE__|__TIME__|__TIMESTAMP__|__func__|EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|stdin|stdout|stderr)\b/}),delete Prism.languages.c.boolean; \ No newline at end of file +Prism.languages.c=Prism.languages.extend("clike",{"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+/,lookbehind:!0},keyword:/\b(?:__attribute__|_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|asm|typeof|inline|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|union|unsigned|void|volatile|while)\b/,function:/[a-z_]\w*(?=\s*\()/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/,number:/(?:\b0x(?:[\da-f]+\.?[\da-f]*|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?)[ful]*/i}),Prism.languages.insertBefore("c","string",{macro:{pattern:/(^\s*)#\s*[a-z]+(?:[^\r\n\\]|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,alias:"property",inside:{string:{pattern:/(#\s*include\s*)(?:<.+?>|("|')(?:\\?.)+?\2)/,lookbehind:!0},directive:{pattern:/(#\s*)\b(?:define|defined|elif|else|endif|error|ifdef|ifndef|if|import|include|line|pragma|undef|using)\b/,lookbehind:!0,alias:"keyword"}}},constant:/\b(?:__FILE__|__LINE__|__DATE__|__TIME__|__TIMESTAMP__|__func__|EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|stdin|stdout|stderr)\b/}),delete Prism.languages.c.boolean; \ No newline at end of file diff --git a/components/prism-opencl.js b/components/prism-opencl.js index e3cea025cd..f08629fdfa 100644 --- a/components/prism-opencl.js +++ b/components/prism-opencl.js @@ -2,17 +2,18 @@ /* OpenCL kernel language */ Prism.languages.opencl = Prism.languages.extend('c', { // Extracted from the official specs (2.0) and http://streamcomputing.eu/downloads/?opencl.lang (opencl-keywords, opencl-types) and http://sourceforge.net/tracker/?func=detail&aid=2957794&group_id=95717&atid=612384 (Words2, partly Words3) + // https://www.khronos.org/registry/OpenCL/sdk/2.1/docs/man/xhtml/scalarDataTypes.html + // https://www.khronos.org/registry/OpenCL/sdk/2.1/docs/man/xhtml/otherDataTypes.html 'keyword': /\b(?:__attribute__|(?:__)?(?:constant|global|kernel|local|private|read_only|read_write|write_only)|_cl_(?:command_queue|context|device_id|event|kernel|mem|platform_id|program|sampler)|auto|break|case|cl_(?:image_format|mem_fence_flags)|clk_event_t|complex|const|continue|default|do|(?:float|double)(?:16(?:x(?:1|16|2|4|8))?|1x(?:1|16|2|4|8)|2(?:x(?:1|16|2|4|8))?|3|4(?:x(?:1|16|2|4|8))?|8(?:x(?:1|16|2|4|8))?)?|else|enum|event_t|extern|for|goto|(?:u?(?:char|short|int|long)|half|quad|bool)(?:2|3|4|8|16)?|if|image(?:1d_(?:array_|buffer_)?t|2d_(?:array_(?:depth_|msaa_depth_|msaa_)?|depth_|msaa_depth_|msaa_)?t|3d_t)|imaginary|inline|intptr_t|ndrange_t|packed|pipe|ptrdiff_t|queue_t|register|reserve_id_t|restrict|return|sampler_t|signed|size_t|sizeof|static|struct|switch|typedef|uintptr_t|uniform|union|unsigned|void|volatile|while)\b/, - // Extracted from http://streamcomputing.eu/downloads/?opencl.lang (global-vars, opencl-dev) - 'function-opencl-kernel': { - pattern: /\b(?:abs(?:_diff)?|a?(?:cos|sin)(?:h|pi)?|add_sat|aligned|all|and|any|async(?:_work_group_copy|_work_group_strided_copy)?|atan(?:2?(?:pi)?|h)?|atom_(?:add|and|cmpxchg|dec|inc|max|min|or|sub|xchg|xor)|barrier|bitselect|cbrt|ceil|clamp|clz|copies|copysign|cross|degrees|distance|dot|endian|erf|erfc|exp(?:2|10)?|expm1|fabs|fast_(?:distance|length|normalize)|fdim|floor|fma|fmax|fmin|fract|frexp|fro|from|get_(?:global_(?:id|offset|size)|group_id|image_(?:channel_data_type|channel_order|depth|dim|height|width)|local(?:_id|_size)|num_groups|work_dim)|hadd|(?:half|native)_(?:cos|divide|exp(?:2|10)?|log(?:2|10)?|powr|recip|r?sqrt|sin|tan)|hypot|ilogb|is(?:equal|finite|greater(?:equal)?|inf|less(?:equal|greater)?|nan|normal|notequal|(?:un)?ordered)|ldexp|length|lgamma|lgamma_r|log(?:b|1p|2|10)?|mad(?:24|_hi|_sat)?|max|mem(?:_fence)?|min|mix|modf|mul24|mul_hi|nan|nextafter|normalize|pow[nr]?|prefetch|radians|read_(?:image)(?:f|h|u?i)|read_mem_fence|remainder|remquo|reqd_work_group_size|rhadd|rint|rootn|rotate|round|rsqrt|select|shuffle2?|sign|signbit|sincos|smoothstep|sqrt|step|sub_sat|tan|tanh|tanpi|tgamma|to|trunc|upsample|vec_(?:step|type_hint)|v(?:load|store)(?:_half)?(?:2|3|4|8|16)?|v(?:loada_half|storea?(?:_half)?)(?:2|3|4|8|16)?(?:_(?:rte|rtn|rtp|rtz))?|wait_group_events|work_group_size_hint|write_image(?:f|h|u?i)|write_mem_fence)\b/, - alias: 'function' - }, // Extracted from http://streamcomputing.eu/downloads/?opencl.lang (opencl-const) + // Math Constants: https://www.khronos.org/registry/OpenCL/sdk/2.1/docs/man/xhtml/mathConstants.html + // Macros and Limits: https://www.khronos.org/registry/OpenCL/sdk/2.1/docs/man/xhtml/macroLimits.html 'constant-opencl-kernel': { - pattern: /\b(?:CHAR_(?:BIT|MAX|MIN)|CLK_(?:ADDRESS_(?:CLAMP(?:_TO_EDGE)?|NONE|REPEAT)|FILTER_(?:LINEAR|NEAREST)|(?:LOCAL|GLOBAL)_MEM_FENCE|NORMALIZED_COORDS_(?:FALSE|TRUE))|CL_(?:BGRA|(?:HALF_)?FLOAT|INTENSITY|LUMINANCE|A?R?G?B?[Ax]?|(?:(?:UN)?SIGNED|[US]NORM)_(?:INT(?:8|16|32))|UNORM_(?:INT_101010|SHORT_(?:555|565)))|(?:DBL|FLT)_(?:DIG|EPSILON|MANT_DIG|(?:MIN|MAX)(?:(?:_10)?_EXP)?)|FLT_RADIX|HUGE_VALF|INFINITY|(?:INT|LONG|SCHAR|SHRT|UCHAR|UINT|ULONG)_(?:MAX|MIN)|MAXFLOAT|M_(?:[12]_PI|2_SQRTPI|E|LN(?:2|10)|LOG(?:10|2)E?|PI[24]?|SQRT(?:1_2|2))|NAN)\b/, + pattern: /\b(?:CHAR_(?:BIT|MAX|MIN)|CLK_(?:ADDRESS_(?:CLAMP(?:_TO_EDGE)?|NONE|REPEAT)|FILTER_(?:LINEAR|NEAREST)|(?:LOCAL|GLOBAL)_MEM_FENCE|NORMALIZED_COORDS_(?:FALSE|TRUE))|CL_(?:BGRA|(?:HALF_)?FLOAT|INTENSITY|LUMINANCE|A?R?G?B?[Ax]?|(?:(?:UN)?SIGNED|[US]NORM)_(?:INT(?:8|16|32))|UNORM_(?:INT_101010|SHORT_(?:555|565)))|(?:DBL|FLT|HALF)_(?:DIG|EPSILON|MANT_DIG|(?:MIN|MAX)(?:(?:_10)?_EXP)?)|FLT_RADIX|HUGE_VALF?|INFINITY|(?:INT|LONG|SCHAR|SHRT)_(?:MAX|MIN)|(?:UCHAR|USHRT|UINT|ULONG)_MAX|MAXFLOAT|M_(?:[12]_PI|2_SQRTPI|E|LN(?:2|10)|LOG(?:10|2)E?|PI(?:_[24])?|SQRT(?:1_2|2))(?:_F|_H)?|NAN)\b/, alias: 'constant' - } + }, + 'boolean': /\b(?:false|true)\b/, + 'number': /(?:\b0x(?:[\da-f]+\.?[\da-f]*|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?)[fuhl]*/i }); var attributes = { diff --git a/components/prism-opencl.min.js b/components/prism-opencl.min.js index 1810dfa6bf..7fc4bc1b3c 100644 --- a/components/prism-opencl.min.js +++ b/components/prism-opencl.min.js @@ -1 +1 @@ -!function(E){E.languages.opencl=E.languages.extend("c",{keyword:/\b(?:__attribute__|(?:__)?(?:constant|global|kernel|local|private|read_only|read_write|write_only)|_cl_(?:command_queue|context|device_id|event|kernel|mem|platform_id|program|sampler)|auto|break|case|cl_(?:image_format|mem_fence_flags)|clk_event_t|complex|const|continue|default|do|(?:float|double)(?:16(?:x(?:1|16|2|4|8))?|1x(?:1|16|2|4|8)|2(?:x(?:1|16|2|4|8))?|3|4(?:x(?:1|16|2|4|8))?|8(?:x(?:1|16|2|4|8))?)?|else|enum|event_t|extern|for|goto|(?:u?(?:char|short|int|long)|half|quad|bool)(?:2|3|4|8|16)?|if|image(?:1d_(?:array_|buffer_)?t|2d_(?:array_(?:depth_|msaa_depth_|msaa_)?|depth_|msaa_depth_|msaa_)?t|3d_t)|imaginary|inline|intptr_t|ndrange_t|packed|pipe|ptrdiff_t|queue_t|register|reserve_id_t|restrict|return|sampler_t|signed|size_t|sizeof|static|struct|switch|typedef|uintptr_t|uniform|union|unsigned|void|volatile|while)\b/,"function-opencl-kernel":{pattern:/\b(?:abs(?:_diff)?|a?(?:cos|sin)(?:h|pi)?|add_sat|aligned|all|and|any|async(?:_work_group_copy|_work_group_strided_copy)?|atan(?:2?(?:pi)?|h)?|atom_(?:add|and|cmpxchg|dec|inc|max|min|or|sub|xchg|xor)|barrier|bitselect|cbrt|ceil|clamp|clz|copies|copysign|cross|degrees|distance|dot|endian|erf|erfc|exp(?:2|10)?|expm1|fabs|fast_(?:distance|length|normalize)|fdim|floor|fma|fmax|fmin|fract|frexp|fro|from|get_(?:global_(?:id|offset|size)|group_id|image_(?:channel_data_type|channel_order|depth|dim|height|width)|local(?:_id|_size)|num_groups|work_dim)|hadd|(?:half|native)_(?:cos|divide|exp(?:2|10)?|log(?:2|10)?|powr|recip|r?sqrt|sin|tan)|hypot|ilogb|is(?:equal|finite|greater(?:equal)?|inf|less(?:equal|greater)?|nan|normal|notequal|(?:un)?ordered)|ldexp|length|lgamma|lgamma_r|log(?:b|1p|2|10)?|mad(?:24|_hi|_sat)?|max|mem(?:_fence)?|min|mix|modf|mul24|mul_hi|nan|nextafter|normalize|pow[nr]?|prefetch|radians|read_(?:image)(?:f|h|u?i)|read_mem_fence|remainder|remquo|reqd_work_group_size|rhadd|rint|rootn|rotate|round|rsqrt|select|shuffle2?|sign|signbit|sincos|smoothstep|sqrt|step|sub_sat|tan|tanh|tanpi|tgamma|to|trunc|upsample|vec_(?:step|type_hint)|v(?:load|store)(?:_half)?(?:2|3|4|8|16)?|v(?:loada_half|storea?(?:_half)?)(?:2|3|4|8|16)?(?:_(?:rte|rtn|rtp|rtz))?|wait_group_events|work_group_size_hint|write_image(?:f|h|u?i)|write_mem_fence)\b/,alias:"function"},"constant-opencl-kernel":{pattern:/\b(?:CHAR_(?:BIT|MAX|MIN)|CLK_(?:ADDRESS_(?:CLAMP(?:_TO_EDGE)?|NONE|REPEAT)|FILTER_(?:LINEAR|NEAREST)|(?:LOCAL|GLOBAL)_MEM_FENCE|NORMALIZED_COORDS_(?:FALSE|TRUE))|CL_(?:BGRA|(?:HALF_)?FLOAT|INTENSITY|LUMINANCE|A?R?G?B?[Ax]?|(?:(?:UN)?SIGNED|[US]NORM)_(?:INT(?:8|16|32))|UNORM_(?:INT_101010|SHORT_(?:555|565)))|(?:DBL|FLT)_(?:DIG|EPSILON|MANT_DIG|(?:MIN|MAX)(?:(?:_10)?_EXP)?)|FLT_RADIX|HUGE_VALF|INFINITY|(?:INT|LONG|SCHAR|SHRT|UCHAR|UINT|ULONG)_(?:MAX|MIN)|MAXFLOAT|M_(?:[12]_PI|2_SQRTPI|E|LN(?:2|10)|LOG(?:10|2)E?|PI[24]?|SQRT(?:1_2|2))|NAN)\b/,alias:"constant"}});var _={"type-opencl-host":{pattern:/\b(?:cl_(?:GLenum|GLint|GLuin|addressing_mode|bitfield|bool|buffer_create_type|build_status|channel_(?:order|type)|(?:u?(?:char|short|int|long)|float|double)(?:2|3|4|8|16)?|command_(?:queue(?:_info|_properties)?|type)|context(?:_info|_properties)?|device_(?:exec_capabilities|fp_config|id|info|local_mem_type|mem_cache_type|type)|(?:event|sampler)(?:_info)?|filter_mode|half|image_info|kernel(?:_info|_work_group_info)?|map_flags|mem(?:_flags|_info|_object_type)?|platform_(?:id|info)|profiling_info|program(?:_build_info|_info)?))\b/,alias:"keyword"},"boolean-opencl-host":{pattern:/\bCL_(?:TRUE|FALSE)\b/,alias:"boolean"},"constant-opencl-host":{pattern:/\bCL_(?:A|ABGR|ADDRESS_(?:CLAMP(?:_TO_EDGE)?|MIRRORED_REPEAT|NONE|REPEAT)|ARGB|BGRA|BLOCKING|BUFFER_CREATE_TYPE_REGION|BUILD_(?:ERROR|IN_PROGRESS|NONE|PROGRAM_FAILURE|SUCCESS)|COMMAND_(?:ACQUIRE_GL_OBJECTS|BARRIER|COPY_(?:BUFFER(?:_RECT|_TO_IMAGE)?|IMAGE(?:_TO_BUFFER)?)|FILL_(?:BUFFER|IMAGE)|MAP(?:_BUFFER|_IMAGE)|MARKER|MIGRATE(?:_SVM)?_MEM_OBJECTS|NATIVE_KERNEL|NDRANGE_KERNEL|READ_(?:BUFFER(?:_RECT)?|IMAGE)|RELEASE_GL_OBJECTS|SVM_(?:FREE|MAP|MEMCPY|MEMFILL|UNMAP)|TASK|UNMAP_MEM_OBJECT|USER|WRITE_(?:BUFFER(?:_RECT)?|IMAGE))|COMPILER_NOT_AVAILABLE|COMPILE_PROGRAM_FAILURE|COMPLETE|CONTEXT_(?:DEVICES|INTEROP_USER_SYNC|NUM_DEVICES|PLATFORM|PROPERTIES|REFERENCE_COUNT)|DEPTH(?:_STENCIL)?|DEVICE_(?:ADDRESS_BITS|AFFINITY_DOMAIN_(?:L[1-4]_CACHE|NEXT_PARTITIONABLE|NUMA)|AVAILABLE|BUILT_IN_KERNELS|COMPILER_AVAILABLE|DOUBLE_FP_CONFIG|ENDIAN_LITTLE|ERROR_CORRECTION_SUPPORT|EXECUTION_CAPABILITIES|EXTENSIONS|GLOBAL_(?:MEM_(?:CACHELINE_SIZE|CACHE_SIZE|CACHE_TYPE|SIZE)|VARIABLE_PREFERRED_TOTAL_SIZE)|HOST_UNIFIED_MEMORY|IL_VERSION|IMAGE(?:2D_MAX_(?:HEIGHT|WIDTH)|3D_MAX_(?:DEPTH|HEIGHT|WIDTH)|_BASE_ADDRESS_ALIGNMENT|_MAX_ARRAY_SIZE|_MAX_BUFFER_SIZE|_PITCH_ALIGNMENT|_SUPPORT)|LINKER_AVAILABLE|LOCAL_MEM_SIZE|LOCAL_MEM_TYPE|MAX_(?:CLOCK_FREQUENCY|COMPUTE_UNITS|CONSTANT_ARGS|CONSTANT_BUFFER_SIZE|GLOBAL_VARIABLE_SIZE|MEM_ALLOC_SIZE|NUM_SUB_GROUPS|ON_DEVICE_(?:EVENTS|QUEUES)|PARAMETER_SIZE|PIPE_ARGS|READ_IMAGE_ARGS|READ_WRITE_IMAGE_ARGS|SAMPLERS|WORK_GROUP_SIZE|WORK_ITEM_DIMENSIONS|WORK_ITEM_SIZES|WRITE_IMAGE_ARGS)|MEM_BASE_ADDR_ALIGN|MIN_DATA_TYPE_ALIGN_SIZE|NAME|NATIVE_VECTOR_WIDTH_(?:CHAR|DOUBLE|FLOAT|HALF|INT|LONG|SHORT)|NOT_(?:AVAILABLE|FOUND)|OPENCL_C_VERSION|PARENT_DEVICE|PARTITION_(?:AFFINITY_DOMAIN|BY_AFFINITY_DOMAIN|BY_COUNTS|BY_COUNTS_LIST_END|EQUALLY|FAILED|MAX_SUB_DEVICES|PROPERTIES|TYPE)|PIPE_MAX_(?:ACTIVE_RESERVATIONS|PACKET_SIZE)|PLATFORM|PREFERRED_(?:GLOBAL_ATOMIC_ALIGNMENT|INTEROP_USER_SYNC|LOCAL_ATOMIC_ALIGNMENT|PLATFORM_ATOMIC_ALIGNMENT|VECTOR_WIDTH_(?:CHAR|DOUBLE|FLOAT|HALF|INT|LONG|SHORT))|PRINTF_BUFFER_SIZE|PROFILE|PROFILING_TIMER_RESOLUTION|QUEUE_(?:ON_(?:DEVICE_(?:MAX_SIZE|PREFERRED_SIZE|PROPERTIES)|HOST_PROPERTIES)|PROPERTIES)|REFERENCE_COUNT|SINGLE_FP_CONFIG|SUB_GROUP_INDEPENDENT_FORWARD_PROGRESS|SVM_(?:ATOMICS|CAPABILITIES|COARSE_GRAIN_BUFFER|FINE_GRAIN_BUFFER|FINE_GRAIN_SYSTEM)|TYPE(?:_ACCELERATOR|_ALL|_CPU|_CUSTOM|_DEFAULT|_GPU)?|VENDOR(?:_ID)?|VERSION)|DRIVER_VERSION|EVENT_(?:COMMAND_(?:EXECUTION_STATUS|QUEUE|TYPE)|CONTEXT|REFERENCE_COUNT)|EXEC_(?:KERNEL|NATIVE_KERNEL|STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST)|FILTER_(?:LINEAR|NEAREST)|FLOAT|FP_(?:CORRECTLY_ROUNDED_DIVIDE_SQRT|DENORM|FMA|INF_NAN|ROUND_TO_INF|ROUND_TO_NEAREST|ROUND_TO_ZERO|SOFT_FLOAT)|GLOBAL|HALF_FLOAT|IMAGE_(?:ARRAY_SIZE|BUFFER|DEPTH|ELEMENT_SIZE|FORMAT|FORMAT_MISMATCH|FORMAT_NOT_SUPPORTED|HEIGHT|NUM_MIP_LEVELS|NUM_SAMPLES|ROW_PITCH|SLICE_PITCH|WIDTH)|INTENSITY|INVALID_(?:ARG_INDEX|ARG_SIZE|ARG_VALUE|BINARY|BUFFER_SIZE|BUILD_OPTIONS|COMMAND_QUEUE|COMPILER_OPTIONS|CONTEXT|DEVICE|DEVICE_PARTITION_COUNT|DEVICE_QUEUE|DEVICE_TYPE|EVENT|EVENT_WAIT_LIST|GLOBAL_OFFSET|GLOBAL_WORK_SIZE|GL_OBJECT|HOST_PTR|IMAGE_DESCRIPTOR|IMAGE_FORMAT_DESCRIPTOR|IMAGE_SIZE|KERNEL|KERNEL_ARGS|KERNEL_DEFINITION|KERNEL_NAME|LINKER_OPTIONS|MEM_OBJECT|MIP_LEVEL|OPERATION|PIPE_SIZE|PLATFORM|PROGRAM|PROGRAM_EXECUTABLE|PROPERTY|QUEUE_PROPERTIES|SAMPLER|VALUE|WORK_DIMENSION|WORK_GROUP_SIZE|WORK_ITEM_SIZE)|KERNEL_(?:ARG_(?:ACCESS_(?:NONE|QUALIFIER|READ_ONLY|READ_WRITE|WRITE_ONLY)|ADDRESS_(?:CONSTANT|GLOBAL|LOCAL|PRIVATE|QUALIFIER)|INFO_NOT_AVAILABLE|NAME|TYPE_(?:CONST|NAME|NONE|PIPE|QUALIFIER|RESTRICT|VOLATILE))|ATTRIBUTES|COMPILE_NUM_SUB_GROUPS|COMPILE_WORK_GROUP_SIZE|CONTEXT|EXEC_INFO_SVM_FINE_GRAIN_SYSTEM|EXEC_INFO_SVM_PTRS|FUNCTION_NAME|GLOBAL_WORK_SIZE|LOCAL_MEM_SIZE|LOCAL_SIZE_FOR_SUB_GROUP_COUNT|MAX_NUM_SUB_GROUPS|MAX_SUB_GROUP_SIZE_FOR_NDRANGE|NUM_ARGS|PREFERRED_WORK_GROUP_SIZE_MULTIPLE|PRIVATE_MEM_SIZE|PROGRAM|REFERENCE_COUNT|SUB_GROUP_COUNT_FOR_NDRANGE|WORK_GROUP_SIZE)|LINKER_NOT_AVAILABLE|LINK_PROGRAM_FAILURE|LOCAL|LUMINANCE|MAP_(?:FAILURE|READ|WRITE|WRITE_INVALIDATE_REGION)|MEM_(?:ALLOC_HOST_PTR|ASSOCIATED_MEMOBJECT|CONTEXT|COPY_HOST_PTR|COPY_OVERLAP|FLAGS|HOST_NO_ACCESS|HOST_PTR|HOST_READ_ONLY|HOST_WRITE_ONLY|KERNEL_READ_AND_WRITE|MAP_COUNT|OBJECT_(?:ALLOCATION_FAILURE|BUFFER|IMAGE1D|IMAGE1D_ARRAY|IMAGE1D_BUFFER|IMAGE2D|IMAGE2D_ARRAY|IMAGE3D|PIPE)|OFFSET|READ_ONLY|READ_WRITE|REFERENCE_COUNT|SIZE|SVM_ATOMICS|SVM_FINE_GRAIN_BUFFER|TYPE|USES_SVM_POINTER|USE_HOST_PTR|WRITE_ONLY)|MIGRATE_MEM_OBJECT_(?:CONTENT_UNDEFINED|HOST)|MISALIGNED_SUB_BUFFER_OFFSET|NONE|NON_BLOCKING|OUT_OF_(?:HOST_MEMORY|RESOURCES)|PIPE_(?:MAX_PACKETS|PACKET_SIZE)|PLATFORM_(?:EXTENSIONS|HOST_TIMER_RESOLUTION|NAME|PROFILE|VENDOR|VERSION)|PROFILING_(?:COMMAND_(?:COMPLETE|END|QUEUED|START|SUBMIT)|INFO_NOT_AVAILABLE)|PROGRAM_(?:BINARIES|BINARY_SIZES|BINARY_TYPE(?:_COMPILED_OBJECT|_EXECUTABLE|_LIBRARY|_NONE)?|BUILD_(?:GLOBAL_VARIABLE_TOTAL_SIZE|LOG|OPTIONS|STATUS)|CONTEXT|DEVICES|IL|KERNEL_NAMES|NUM_DEVICES|NUM_KERNELS|REFERENCE_COUNT|SOURCE)|QUEUED|QUEUE_(?:CONTEXT|DEVICE|DEVICE_DEFAULT|ON_DEVICE|ON_DEVICE_DEFAULT|OUT_OF_ORDER_EXEC_MODE_ENABLE|PROFILING_ENABLE|PROPERTIES|REFERENCE_COUNT|SIZE)|R|RA|READ_(?:ONLY|WRITE)_CACHE|RG|RGB|RGBA|RGBx|RGx|RUNNING|Rx|SAMPLER_(?:ADDRESSING_MODE|CONTEXT|FILTER_MODE|LOD_MAX|LOD_MIN|MIP_FILTER_MODE|NORMALIZED_COORDS|REFERENCE_COUNT)|(?:UN)?SIGNED_INT(?:8|16|32)|SNORM_INT(?:8|16)|SUBMITTED|SUCCESS|UNORM_INT(?:16|24|8|_101010|_101010_2)|UNORM_SHORT_(?:555|565)|VERSION_(?:1_0|1_1|1_2|2_0|2_1)|sBGRA|sRGB|sRGBA|sRGBx)\b/,alias:"constant"},"function-opencl-host":{pattern:/\bcl(?:BuildProgram|CloneKernel|CompileProgram|Create(?:Buffer|CommandQueue(?:WithProperties)?|Context|ContextFromType|Image|Image2D|Image3D|Kernel|KernelsInProgram|Pipe|ProgramWith(?:Binary|BuiltInKernels|IL|Source)|Sampler|SamplerWithProperties|SubBuffer|SubDevices|UserEvent)|Enqueue(?:(?:Barrier|Marker)(?:WithWaitList)?|Copy(?:Buffer(?:Rect|ToImage)?|Image(?:ToBuffer)?)|(?:Fill|Map)(?:Buffer|Image)|MigrateMemObjects|NDRangeKernel|NativeKernel|(?:Read|Write)(?:Buffer(?:Rect)?|Image)|SVM(?:Free|Map|MemFill|Memcpy|MigrateMem|Unmap)|Task|UnmapMemObject|WaitForEvents)|Finish|Flush|Get(?:CommandQueueInfo|ContextInfo|Device(?:AndHostTimer|IDs|Info)|Event(?:Profiling)?Info|ExtensionFunctionAddress(?:ForPlatform)?|HostTimer|ImageInfo|Kernel(?:ArgInfo|Info|SubGroupInfo|WorkGroupInfo)|MemObjectInfo|PipeInfo|Platform(?:IDs|Info)|Program(?:Build)?Info|SamplerInfo|SupportedImageFormats)|LinkProgram|(?:Release|Retain)(?:CommandQueue|Context|Device|Event|Kernel|MemObject|Program|Sampler)|SVM(?:Alloc|Free)|Set(?:CommandQueueProperty|DefaultDeviceCommandQueue|EventCallback|Kernel(?:Arg(?:SVMPointer)?|ExecInfo)|Kernel|MemObjectDestructorCallback|UserEventStatus)|Unload(?:Platform)?Compiler|WaitForEvents)\b/,alias:"function"}};E.languages.insertBefore("c","keyword",_),_["type-opencl-host-cpp"]={pattern:/\b(?:Buffer|BufferGL|BufferRenderGL|CommandQueue|Context|Device|DeviceCommandQueue|EnqueueArgs|Event|Image|Image1D|Image1DArray|Image1DBuffer|Image2D|Image2DArray|Image2DGL|Image3D|Image3DGL|ImageFormat|ImageGL|Kernel|KernelFunctor|LocalSpaceArg|Memory|NDRange|Pipe|Platform|Program|Sampler|SVMAllocator|SVMTraitAtomic|SVMTraitCoarse|SVMTraitFine|SVMTraitReadOnly|SVMTraitReadWrite|SVMTraitWriteOnly|UserEvent)\b/,alias:"keyword"},E.languages.insertBefore("cpp","keyword",_)}(Prism); \ No newline at end of file +!function(E){E.languages.opencl=E.languages.extend("c",{keyword:/\b(?:__attribute__|(?:__)?(?:constant|global|kernel|local|private|read_only|read_write|write_only)|_cl_(?:command_queue|context|device_id|event|kernel|mem|platform_id|program|sampler)|auto|break|case|cl_(?:image_format|mem_fence_flags)|clk_event_t|complex|const|continue|default|do|(?:float|double)(?:16(?:x(?:1|16|2|4|8))?|1x(?:1|16|2|4|8)|2(?:x(?:1|16|2|4|8))?|3|4(?:x(?:1|16|2|4|8))?|8(?:x(?:1|16|2|4|8))?)?|else|enum|event_t|extern|for|goto|(?:u?(?:char|short|int|long)|half|quad|bool)(?:2|3|4|8|16)?|if|image(?:1d_(?:array_|buffer_)?t|2d_(?:array_(?:depth_|msaa_depth_|msaa_)?|depth_|msaa_depth_|msaa_)?t|3d_t)|imaginary|inline|intptr_t|ndrange_t|packed|pipe|ptrdiff_t|queue_t|register|reserve_id_t|restrict|return|sampler_t|signed|size_t|sizeof|static|struct|switch|typedef|uintptr_t|uniform|union|unsigned|void|volatile|while)\b/,"constant-opencl-kernel":{pattern:/\b(?:CHAR_(?:BIT|MAX|MIN)|CLK_(?:ADDRESS_(?:CLAMP(?:_TO_EDGE)?|NONE|REPEAT)|FILTER_(?:LINEAR|NEAREST)|(?:LOCAL|GLOBAL)_MEM_FENCE|NORMALIZED_COORDS_(?:FALSE|TRUE))|CL_(?:BGRA|(?:HALF_)?FLOAT|INTENSITY|LUMINANCE|A?R?G?B?[Ax]?|(?:(?:UN)?SIGNED|[US]NORM)_(?:INT(?:8|16|32))|UNORM_(?:INT_101010|SHORT_(?:555|565)))|(?:DBL|FLT|HALF)_(?:DIG|EPSILON|MANT_DIG|(?:MIN|MAX)(?:(?:_10)?_EXP)?)|FLT_RADIX|HUGE_VALF?|INFINITY|(?:INT|LONG|SCHAR|SHRT)_(?:MAX|MIN)|(?:UCHAR|USHRT|UINT|ULONG)_MAX|MAXFLOAT|M_(?:[12]_PI|2_SQRTPI|E|LN(?:2|10)|LOG(?:10|2)E?|PI(?:_[24])?|SQRT(?:1_2|2))(?:_F|_H)?|NAN)\b/,alias:"constant"},boolean:/\b(?:false|true)\b/,number:/(?:\b0x(?:[\da-f]+\.?[\da-f]*|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?)[fuhl]*/i});var _={"type-opencl-host":{pattern:/\b(?:cl_(?:GLenum|GLint|GLuin|addressing_mode|bitfield|bool|buffer_create_type|build_status|channel_(?:order|type)|(?:u?(?:char|short|int|long)|float|double)(?:2|3|4|8|16)?|command_(?:queue(?:_info|_properties)?|type)|context(?:_info|_properties)?|device_(?:exec_capabilities|fp_config|id|info|local_mem_type|mem_cache_type|type)|(?:event|sampler)(?:_info)?|filter_mode|half|image_info|kernel(?:_info|_work_group_info)?|map_flags|mem(?:_flags|_info|_object_type)?|platform_(?:id|info)|profiling_info|program(?:_build_info|_info)?))\b/,alias:"keyword"},"boolean-opencl-host":{pattern:/\bCL_(?:TRUE|FALSE)\b/,alias:"boolean"},"constant-opencl-host":{pattern:/\bCL_(?:A|ABGR|ADDRESS_(?:CLAMP(?:_TO_EDGE)?|MIRRORED_REPEAT|NONE|REPEAT)|ARGB|BGRA|BLOCKING|BUFFER_CREATE_TYPE_REGION|BUILD_(?:ERROR|IN_PROGRESS|NONE|PROGRAM_FAILURE|SUCCESS)|COMMAND_(?:ACQUIRE_GL_OBJECTS|BARRIER|COPY_(?:BUFFER(?:_RECT|_TO_IMAGE)?|IMAGE(?:_TO_BUFFER)?)|FILL_(?:BUFFER|IMAGE)|MAP(?:_BUFFER|_IMAGE)|MARKER|MIGRATE(?:_SVM)?_MEM_OBJECTS|NATIVE_KERNEL|NDRANGE_KERNEL|READ_(?:BUFFER(?:_RECT)?|IMAGE)|RELEASE_GL_OBJECTS|SVM_(?:FREE|MAP|MEMCPY|MEMFILL|UNMAP)|TASK|UNMAP_MEM_OBJECT|USER|WRITE_(?:BUFFER(?:_RECT)?|IMAGE))|COMPILER_NOT_AVAILABLE|COMPILE_PROGRAM_FAILURE|COMPLETE|CONTEXT_(?:DEVICES|INTEROP_USER_SYNC|NUM_DEVICES|PLATFORM|PROPERTIES|REFERENCE_COUNT)|DEPTH(?:_STENCIL)?|DEVICE_(?:ADDRESS_BITS|AFFINITY_DOMAIN_(?:L[1-4]_CACHE|NEXT_PARTITIONABLE|NUMA)|AVAILABLE|BUILT_IN_KERNELS|COMPILER_AVAILABLE|DOUBLE_FP_CONFIG|ENDIAN_LITTLE|ERROR_CORRECTION_SUPPORT|EXECUTION_CAPABILITIES|EXTENSIONS|GLOBAL_(?:MEM_(?:CACHELINE_SIZE|CACHE_SIZE|CACHE_TYPE|SIZE)|VARIABLE_PREFERRED_TOTAL_SIZE)|HOST_UNIFIED_MEMORY|IL_VERSION|IMAGE(?:2D_MAX_(?:HEIGHT|WIDTH)|3D_MAX_(?:DEPTH|HEIGHT|WIDTH)|_BASE_ADDRESS_ALIGNMENT|_MAX_ARRAY_SIZE|_MAX_BUFFER_SIZE|_PITCH_ALIGNMENT|_SUPPORT)|LINKER_AVAILABLE|LOCAL_MEM_SIZE|LOCAL_MEM_TYPE|MAX_(?:CLOCK_FREQUENCY|COMPUTE_UNITS|CONSTANT_ARGS|CONSTANT_BUFFER_SIZE|GLOBAL_VARIABLE_SIZE|MEM_ALLOC_SIZE|NUM_SUB_GROUPS|ON_DEVICE_(?:EVENTS|QUEUES)|PARAMETER_SIZE|PIPE_ARGS|READ_IMAGE_ARGS|READ_WRITE_IMAGE_ARGS|SAMPLERS|WORK_GROUP_SIZE|WORK_ITEM_DIMENSIONS|WORK_ITEM_SIZES|WRITE_IMAGE_ARGS)|MEM_BASE_ADDR_ALIGN|MIN_DATA_TYPE_ALIGN_SIZE|NAME|NATIVE_VECTOR_WIDTH_(?:CHAR|DOUBLE|FLOAT|HALF|INT|LONG|SHORT)|NOT_(?:AVAILABLE|FOUND)|OPENCL_C_VERSION|PARENT_DEVICE|PARTITION_(?:AFFINITY_DOMAIN|BY_AFFINITY_DOMAIN|BY_COUNTS|BY_COUNTS_LIST_END|EQUALLY|FAILED|MAX_SUB_DEVICES|PROPERTIES|TYPE)|PIPE_MAX_(?:ACTIVE_RESERVATIONS|PACKET_SIZE)|PLATFORM|PREFERRED_(?:GLOBAL_ATOMIC_ALIGNMENT|INTEROP_USER_SYNC|LOCAL_ATOMIC_ALIGNMENT|PLATFORM_ATOMIC_ALIGNMENT|VECTOR_WIDTH_(?:CHAR|DOUBLE|FLOAT|HALF|INT|LONG|SHORT))|PRINTF_BUFFER_SIZE|PROFILE|PROFILING_TIMER_RESOLUTION|QUEUE_(?:ON_(?:DEVICE_(?:MAX_SIZE|PREFERRED_SIZE|PROPERTIES)|HOST_PROPERTIES)|PROPERTIES)|REFERENCE_COUNT|SINGLE_FP_CONFIG|SUB_GROUP_INDEPENDENT_FORWARD_PROGRESS|SVM_(?:ATOMICS|CAPABILITIES|COARSE_GRAIN_BUFFER|FINE_GRAIN_BUFFER|FINE_GRAIN_SYSTEM)|TYPE(?:_ACCELERATOR|_ALL|_CPU|_CUSTOM|_DEFAULT|_GPU)?|VENDOR(?:_ID)?|VERSION)|DRIVER_VERSION|EVENT_(?:COMMAND_(?:EXECUTION_STATUS|QUEUE|TYPE)|CONTEXT|REFERENCE_COUNT)|EXEC_(?:KERNEL|NATIVE_KERNEL|STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST)|FILTER_(?:LINEAR|NEAREST)|FLOAT|FP_(?:CORRECTLY_ROUNDED_DIVIDE_SQRT|DENORM|FMA|INF_NAN|ROUND_TO_INF|ROUND_TO_NEAREST|ROUND_TO_ZERO|SOFT_FLOAT)|GLOBAL|HALF_FLOAT|IMAGE_(?:ARRAY_SIZE|BUFFER|DEPTH|ELEMENT_SIZE|FORMAT|FORMAT_MISMATCH|FORMAT_NOT_SUPPORTED|HEIGHT|NUM_MIP_LEVELS|NUM_SAMPLES|ROW_PITCH|SLICE_PITCH|WIDTH)|INTENSITY|INVALID_(?:ARG_INDEX|ARG_SIZE|ARG_VALUE|BINARY|BUFFER_SIZE|BUILD_OPTIONS|COMMAND_QUEUE|COMPILER_OPTIONS|CONTEXT|DEVICE|DEVICE_PARTITION_COUNT|DEVICE_QUEUE|DEVICE_TYPE|EVENT|EVENT_WAIT_LIST|GLOBAL_OFFSET|GLOBAL_WORK_SIZE|GL_OBJECT|HOST_PTR|IMAGE_DESCRIPTOR|IMAGE_FORMAT_DESCRIPTOR|IMAGE_SIZE|KERNEL|KERNEL_ARGS|KERNEL_DEFINITION|KERNEL_NAME|LINKER_OPTIONS|MEM_OBJECT|MIP_LEVEL|OPERATION|PIPE_SIZE|PLATFORM|PROGRAM|PROGRAM_EXECUTABLE|PROPERTY|QUEUE_PROPERTIES|SAMPLER|VALUE|WORK_DIMENSION|WORK_GROUP_SIZE|WORK_ITEM_SIZE)|KERNEL_(?:ARG_(?:ACCESS_(?:NONE|QUALIFIER|READ_ONLY|READ_WRITE|WRITE_ONLY)|ADDRESS_(?:CONSTANT|GLOBAL|LOCAL|PRIVATE|QUALIFIER)|INFO_NOT_AVAILABLE|NAME|TYPE_(?:CONST|NAME|NONE|PIPE|QUALIFIER|RESTRICT|VOLATILE))|ATTRIBUTES|COMPILE_NUM_SUB_GROUPS|COMPILE_WORK_GROUP_SIZE|CONTEXT|EXEC_INFO_SVM_FINE_GRAIN_SYSTEM|EXEC_INFO_SVM_PTRS|FUNCTION_NAME|GLOBAL_WORK_SIZE|LOCAL_MEM_SIZE|LOCAL_SIZE_FOR_SUB_GROUP_COUNT|MAX_NUM_SUB_GROUPS|MAX_SUB_GROUP_SIZE_FOR_NDRANGE|NUM_ARGS|PREFERRED_WORK_GROUP_SIZE_MULTIPLE|PRIVATE_MEM_SIZE|PROGRAM|REFERENCE_COUNT|SUB_GROUP_COUNT_FOR_NDRANGE|WORK_GROUP_SIZE)|LINKER_NOT_AVAILABLE|LINK_PROGRAM_FAILURE|LOCAL|LUMINANCE|MAP_(?:FAILURE|READ|WRITE|WRITE_INVALIDATE_REGION)|MEM_(?:ALLOC_HOST_PTR|ASSOCIATED_MEMOBJECT|CONTEXT|COPY_HOST_PTR|COPY_OVERLAP|FLAGS|HOST_NO_ACCESS|HOST_PTR|HOST_READ_ONLY|HOST_WRITE_ONLY|KERNEL_READ_AND_WRITE|MAP_COUNT|OBJECT_(?:ALLOCATION_FAILURE|BUFFER|IMAGE1D|IMAGE1D_ARRAY|IMAGE1D_BUFFER|IMAGE2D|IMAGE2D_ARRAY|IMAGE3D|PIPE)|OFFSET|READ_ONLY|READ_WRITE|REFERENCE_COUNT|SIZE|SVM_ATOMICS|SVM_FINE_GRAIN_BUFFER|TYPE|USES_SVM_POINTER|USE_HOST_PTR|WRITE_ONLY)|MIGRATE_MEM_OBJECT_(?:CONTENT_UNDEFINED|HOST)|MISALIGNED_SUB_BUFFER_OFFSET|NONE|NON_BLOCKING|OUT_OF_(?:HOST_MEMORY|RESOURCES)|PIPE_(?:MAX_PACKETS|PACKET_SIZE)|PLATFORM_(?:EXTENSIONS|HOST_TIMER_RESOLUTION|NAME|PROFILE|VENDOR|VERSION)|PROFILING_(?:COMMAND_(?:COMPLETE|END|QUEUED|START|SUBMIT)|INFO_NOT_AVAILABLE)|PROGRAM_(?:BINARIES|BINARY_SIZES|BINARY_TYPE(?:_COMPILED_OBJECT|_EXECUTABLE|_LIBRARY|_NONE)?|BUILD_(?:GLOBAL_VARIABLE_TOTAL_SIZE|LOG|OPTIONS|STATUS)|CONTEXT|DEVICES|IL|KERNEL_NAMES|NUM_DEVICES|NUM_KERNELS|REFERENCE_COUNT|SOURCE)|QUEUED|QUEUE_(?:CONTEXT|DEVICE|DEVICE_DEFAULT|ON_DEVICE|ON_DEVICE_DEFAULT|OUT_OF_ORDER_EXEC_MODE_ENABLE|PROFILING_ENABLE|PROPERTIES|REFERENCE_COUNT|SIZE)|R|RA|READ_(?:ONLY|WRITE)_CACHE|RG|RGB|RGBA|RGBx|RGx|RUNNING|Rx|SAMPLER_(?:ADDRESSING_MODE|CONTEXT|FILTER_MODE|LOD_MAX|LOD_MIN|MIP_FILTER_MODE|NORMALIZED_COORDS|REFERENCE_COUNT)|(?:UN)?SIGNED_INT(?:8|16|32)|SNORM_INT(?:8|16)|SUBMITTED|SUCCESS|UNORM_INT(?:16|24|8|_101010|_101010_2)|UNORM_SHORT_(?:555|565)|VERSION_(?:1_0|1_1|1_2|2_0|2_1)|sBGRA|sRGB|sRGBA|sRGBx)\b/,alias:"constant"},"function-opencl-host":{pattern:/\bcl(?:BuildProgram|CloneKernel|CompileProgram|Create(?:Buffer|CommandQueue(?:WithProperties)?|Context|ContextFromType|Image|Image2D|Image3D|Kernel|KernelsInProgram|Pipe|ProgramWith(?:Binary|BuiltInKernels|IL|Source)|Sampler|SamplerWithProperties|SubBuffer|SubDevices|UserEvent)|Enqueue(?:(?:Barrier|Marker)(?:WithWaitList)?|Copy(?:Buffer(?:Rect|ToImage)?|Image(?:ToBuffer)?)|(?:Fill|Map)(?:Buffer|Image)|MigrateMemObjects|NDRangeKernel|NativeKernel|(?:Read|Write)(?:Buffer(?:Rect)?|Image)|SVM(?:Free|Map|MemFill|Memcpy|MigrateMem|Unmap)|Task|UnmapMemObject|WaitForEvents)|Finish|Flush|Get(?:CommandQueueInfo|ContextInfo|Device(?:AndHostTimer|IDs|Info)|Event(?:Profiling)?Info|ExtensionFunctionAddress(?:ForPlatform)?|HostTimer|ImageInfo|Kernel(?:ArgInfo|Info|SubGroupInfo|WorkGroupInfo)|MemObjectInfo|PipeInfo|Platform(?:IDs|Info)|Program(?:Build)?Info|SamplerInfo|SupportedImageFormats)|LinkProgram|(?:Release|Retain)(?:CommandQueue|Context|Device|Event|Kernel|MemObject|Program|Sampler)|SVM(?:Alloc|Free)|Set(?:CommandQueueProperty|DefaultDeviceCommandQueue|EventCallback|Kernel(?:Arg(?:SVMPointer)?|ExecInfo)|Kernel|MemObjectDestructorCallback|UserEventStatus)|Unload(?:Platform)?Compiler|WaitForEvents)\b/,alias:"function"}};E.languages.insertBefore("c","keyword",_),_["type-opencl-host-cpp"]={pattern:/\b(?:Buffer|BufferGL|BufferRenderGL|CommandQueue|Context|Device|DeviceCommandQueue|EnqueueArgs|Event|Image|Image1D|Image1DArray|Image1DBuffer|Image2D|Image2DArray|Image2DGL|Image3D|Image3DGL|ImageFormat|ImageGL|Kernel|KernelFunctor|LocalSpaceArg|Memory|NDRange|Pipe|Platform|Program|Sampler|SVMAllocator|SVMTraitAtomic|SVMTraitCoarse|SVMTraitFine|SVMTraitReadOnly|SVMTraitReadWrite|SVMTraitWriteOnly|UserEvent)\b/,alias:"keyword"},E.languages.insertBefore("cpp","keyword",_)}(Prism); \ No newline at end of file diff --git a/tests/languages/c/class-name_feature.test b/tests/languages/c/class-name_feature.test index 356fd0fd66..2c2e63f420 100644 --- a/tests/languages/c/class-name_feature.test +++ b/tests/languages/c/class-name_feature.test @@ -2,14 +2,40 @@ struct foo enum bar struct foo var; +struct __attribute__ ((aligned (8))) S { short f[3]; }; ---------------------------------------------------- [ - ["keyword", "struct"], ["class-name", "foo"], - ["keyword", "enum"], ["class-name", "bar"], + ["keyword", "struct"], + ["class-name", "foo"], + ["keyword", "enum"], + ["class-name", "bar"], - ["keyword", "struct"], ["class-name", "foo"], " var", ["punctuation", ";"] + ["keyword", "struct"], + ["class-name", "foo"], + " var", + ["punctuation", ";"], + ["keyword", "struct"], + ["keyword", "__attribute__"], + ["punctuation", "("], + ["punctuation", "("], + ["function", "aligned"], + ["punctuation", "("], + ["number", "8"], + ["punctuation", ")"], + ["punctuation", ")"], + ["punctuation", ")"], + ["class-name", "S"], + ["punctuation", "{"], + ["keyword", "short"], + " f", + ["punctuation", "["], + ["number", "3"], + ["punctuation", "]"], + ["punctuation", ";"], + ["punctuation", "}"], + ["punctuation", ";"] ] ---------------------------------------------------- diff --git a/tests/languages/c/function_feature.test b/tests/languages/c/function_feature.test new file mode 100644 index 0000000000..4f141a9a09 --- /dev/null +++ b/tests/languages/c/function_feature.test @@ -0,0 +1,24 @@ +foo(void); +bar +(1, 2); + +---------------------------------------------------- + +[ + ["function", "foo"], + ["punctuation", "("], + ["keyword", "void"], + ["punctuation", ")"], + ["punctuation", ";"], + ["function", "bar"], + ["punctuation", "("], + ["number", "1"], + ["punctuation", ","], + ["number", "2"], + ["punctuation", ")"], + ["punctuation", ";"] +] + +---------------------------------------------------- + +Checks for functions. diff --git a/tests/languages/c/keyword_feature.test b/tests/languages/c/keyword_feature.test index 29077e875a..0e00a72944 100644 --- a/tests/languages/c/keyword_feature.test +++ b/tests/languages/c/keyword_feature.test @@ -1,3 +1,4 @@ +__attribute__ _Alignas _Alignof _Atomic _Bool _Complex _Generic _Imaginary _Noreturn _Static_assert _Thread_local @@ -14,6 +15,7 @@ union unsigned void volatile while ---------------------------------------------------- [ + ["keyword", "__attribute__"], ["keyword", "_Alignas"], ["keyword", "_Alignof"], ["keyword", "_Atomic"], ["keyword", "_Bool"], ["keyword", "_Complex"], ["keyword", "_Generic"], ["keyword", "_Imaginary"], ["keyword", "_Noreturn"], ["keyword", "_Static_assert"], ["keyword", "_Thread_local"], diff --git a/tests/languages/opencl/boolean_feature.test b/tests/languages/opencl/boolean_feature.test new file mode 100644 index 0000000000..0657cc534d --- /dev/null +++ b/tests/languages/opencl/boolean_feature.test @@ -0,0 +1,13 @@ +false +true + +---------------------------------------------------- + +[ + ["boolean", "false"], + ["boolean", "true"] +] + +---------------------------------------------------- + +Checks for booleans in OpenCL kernel code. diff --git a/tests/languages/opencl/constant_feature.test b/tests/languages/opencl/constant_feature.test index 7f41b92168..84c9787311 100644 --- a/tests/languages/opencl/constant_feature.test +++ b/tests/languages/opencl/constant_feature.test @@ -57,7 +57,17 @@ FLT_MIN FLT_MIN_10_EXP FLT_MIN_EXP FLT_RADIX +HALF_DIG +HALF_EPSILON +HALF_MANT_DIG +HALF_MAX +HALF_MAX_10_EXP +HALF_MAX_EXP +HALF_MIN +HALF_MIN_10_EXP +HALF_MIN_EXP HUGE_VALF +HUGE_VAL INFINITY INT_MAX INT_MIN @@ -73,23 +83,49 @@ M_LN2 M_LOG10E M_LOG2E M_PI -M_PI2 -M_PI4 +M_PI_2 +M_PI_4 M_SQRT1_2 M_SQRT2 +M_1_PI_F +M_2_PI_F +M_2_SQRTPI_F +M_E_F +M_LN10_F +M_LN2_F +M_LOG10E_F +M_LOG2E_F +M_PI_F +M_PI_2_F +M_PI_4_F +M_SQRT1_2_F +M_SQRT2_F +M_1_PI_H +M_2_PI_H +M_2_SQRTPI_H +M_E_H +M_LN10_H +M_LN2_H +M_LOG10E_H +M_LOG2E_H +M_PI_H +M_PI_2_H +M_PI_4_H +M_SQRT1_2_H +M_SQRT2_H NAN SCHAR_MAX SCHAR_MIN SHRT_MAX SHRT_MIN UCHAR_MAX -UCHAR_MIN +USHRT_MAX UINT_MAX -ULONG_MAX - ----------------------------------------------------- - -[ +ULONG_MAX + +---------------------------------------------------- + +[ ["constant-opencl-kernel", "CHAR_BIT"], ["constant-opencl-kernel", "CHAR_MAX"], ["constant-opencl-kernel", "CHAR_MIN"], @@ -149,7 +185,17 @@ ULONG_MAX ["constant-opencl-kernel", "FLT_MIN_10_EXP"], ["constant-opencl-kernel", "FLT_MIN_EXP"], ["constant-opencl-kernel", "FLT_RADIX"], + ["constant-opencl-kernel", "HALF_DIG"], + ["constant-opencl-kernel", "HALF_EPSILON"], + ["constant-opencl-kernel", "HALF_MANT_DIG"], + ["constant-opencl-kernel", "HALF_MAX"], + ["constant-opencl-kernel", "HALF_MAX_10_EXP"], + ["constant-opencl-kernel", "HALF_MAX_EXP"], + ["constant-opencl-kernel", "HALF_MIN"], + ["constant-opencl-kernel", "HALF_MIN_10_EXP"], + ["constant-opencl-kernel", "HALF_MIN_EXP"], ["constant-opencl-kernel", "HUGE_VALF"], + ["constant-opencl-kernel", "HUGE_VAL"], ["constant-opencl-kernel", "INFINITY"], ["constant-opencl-kernel", "INT_MAX"], ["constant-opencl-kernel", "INT_MIN"], @@ -165,21 +211,47 @@ ULONG_MAX ["constant-opencl-kernel", "M_LOG10E"], ["constant-opencl-kernel", "M_LOG2E"], ["constant-opencl-kernel", "M_PI"], - ["constant-opencl-kernel", "M_PI2"], - ["constant-opencl-kernel", "M_PI4"], + ["constant-opencl-kernel", "M_PI_2"], + ["constant-opencl-kernel", "M_PI_4"], ["constant-opencl-kernel", "M_SQRT1_2"], ["constant-opencl-kernel", "M_SQRT2"], + ["constant-opencl-kernel", "M_1_PI_F"], + ["constant-opencl-kernel", "M_2_PI_F"], + ["constant-opencl-kernel", "M_2_SQRTPI_F"], + ["constant-opencl-kernel", "M_E_F"], + ["constant-opencl-kernel", "M_LN10_F"], + ["constant-opencl-kernel", "M_LN2_F"], + ["constant-opencl-kernel", "M_LOG10E_F"], + ["constant-opencl-kernel", "M_LOG2E_F"], + ["constant-opencl-kernel", "M_PI_F"], + ["constant-opencl-kernel", "M_PI_2_F"], + ["constant-opencl-kernel", "M_PI_4_F"], + ["constant-opencl-kernel", "M_SQRT1_2_F"], + ["constant-opencl-kernel", "M_SQRT2_F"], + ["constant-opencl-kernel", "M_1_PI_H"], + ["constant-opencl-kernel", "M_2_PI_H"], + ["constant-opencl-kernel", "M_2_SQRTPI_H"], + ["constant-opencl-kernel", "M_E_H"], + ["constant-opencl-kernel", "M_LN10_H"], + ["constant-opencl-kernel", "M_LN2_H"], + ["constant-opencl-kernel", "M_LOG10E_H"], + ["constant-opencl-kernel", "M_LOG2E_H"], + ["constant-opencl-kernel", "M_PI_H"], + ["constant-opencl-kernel", "M_PI_2_H"], + ["constant-opencl-kernel", "M_PI_4_H"], + ["constant-opencl-kernel", "M_SQRT1_2_H"], + ["constant-opencl-kernel", "M_SQRT2_H"], ["constant-opencl-kernel", "NAN"], ["constant-opencl-kernel", "SCHAR_MAX"], ["constant-opencl-kernel", "SCHAR_MIN"], ["constant-opencl-kernel", "SHRT_MAX"], ["constant-opencl-kernel", "SHRT_MIN"], ["constant-opencl-kernel", "UCHAR_MAX"], - ["constant-opencl-kernel", "UCHAR_MIN"], + ["constant-opencl-kernel", "USHRT_MAX"], ["constant-opencl-kernel", "UINT_MAX"], - ["constant-opencl-kernel", "ULONG_MAX"] -] - ----------------------------------------------------- - -Checks for all constant names in OpenCL kernel code. \ No newline at end of file + ["constant-opencl-kernel", "ULONG_MAX"] +] + +---------------------------------------------------- + +Checks for all constant names in OpenCL kernel code. diff --git a/tests/languages/opencl/function_feature.test b/tests/languages/opencl/function_feature.test deleted file mode 100644 index 89bcf7d19e..0000000000 --- a/tests/languages/opencl/function_feature.test +++ /dev/null @@ -1,601 +0,0 @@ -abs -abs_diff -acos -acosh -acospi -add_sat -aligned -all -and -any -asin -asinh -asinpi -async -async_work_group_copy -async_work_group_strided_copy -atan -atan2 -atan2pi -atanh -atanpi -atom_add -atom_and -atom_cmpxchg -atom_dec -atom_inc -atom_max -atom_min -atom_or -atom_sub -atom_xchg -atom_xor -barrier -bitselect -cbrt -ceil -clamp -clz -copies -copysign -cos -cosh -cospi -cross -degrees -distance -dot -endian -erf -erfc -exp -exp10 -exp2 -expm1 -fabs -fast_distance -fast_length -fast_normalize -fdim -floor -fma -fmax -fmin -fract -frexp -fro -from -get_global_id -get_global_offset -get_global_size -get_group_id -get_image_channel_data_type -get_image_channel_order -get_image_depth -get_image_dim -get_image_height -get_image_width -get_local_id -get_local_size -get_num_groups -get_work_dim -hadd -half_cos -half_divide -half_exp -half_exp10 -half_exp2 -half_log -half_log10 -half_log2 -half_powr -half_recip -half_rsqrt -half_sin -half_sqrt -half_tan -hypot -ilogb -isequal -isfinite -isgreater -isgreaterequal -isinf -isless -islessequal -islessgreater -isnan -isnormal -isnotequal -isordered -isunordered -ldexp -length -lgamma -lgamma_r -log -log10 -log1p -log2 -logb -mad -mad24 -mad_hi -mad_sat -max -mem -mem_fence -min -mix -modf -mul24 -mul_hi -nan -native_cos -native_divide -native_exp -native_exp10 -native_exp2 -native_log -native_log10 -native_log2 -native_powr -native_recip -native_rsqrt -native_sin -native_sqrt -native_tan -nextafter -normalize -pow -pown -powr -prefetch -radians -read_imagef -read_imageh -read_imagei -read_imageui -read_mem_fence -remainder -remquo -reqd_work_group_size -rhadd -rint -rootn -rotate -round -rsqrt -select -shuffle -shuffle2 -sign -signbit -sin -sincos -sinh -sinpi -smoothstep -sqrt -step -sub_sat -tan -tanh -tanpi -tgamma -to -trunc -upsample -vec_step -vec_type_hint -vload16 -vload2 -vload3 -vload4 -vload8 -vload_half -vload_half16 -vload_half2 -vload_half3 -vload_half4 -vload_half8 -vloada_half16 -vloada_half16_rte -vloada_half16_rtp -vloada_half16_rtz -vloada_half2 -vloada_half2_rte -vloada_half2_rtp -vloada_half2_rtz -vloada_half3 -vloada_half3_rte -vloada_half3_rtp -vloada_half3_rtz -vloada_half4 -vloada_half4_rte -vloada_half4_rtp -vloada_half4_rtz -vloada_half8 -vloada_half8_rte -vloada_half8_rtp -vloada_half8_rtz -vstore16 -vstore2 -vstore3 -vstore4 -vstore8 -vstore_half -vstore_half16 -vstore_half16_rte -vstore_half16_rtn -vstore_half16_rtp -vstore_half16_rtz -vstore_half2 -vstore_half2_rte -vstore_half2_rtn -vstore_half2_rtp -vstore_half2_rtz -vstore_half3 -vstore_half3_rte -vstore_half3_rtn -vstore_half3_rtp -vstore_half3_rtz -vstore_half4 -vstore_half4_rte -vstore_half4_rtn -vstore_half4_rtp -vstore_half4_rtz -vstore_half8 -vstore_half8_rte -vstore_half8_rtn -vstore_half8_rtp -vstore_half8_rtz -vstore_half_rte -vstore_half_rtn -vstore_half_rtp -vstore_half_rtz -vstore_rte -vstore_rtn -vstore_rtp -vstore_rtz -vstorea_half16 -vstorea_half16_rte -vstorea_half16_rtn -vstorea_half16_rtp -vstorea_half16_rtz -vstorea_half2 -vstorea_half2_rte -vstorea_half2_rtn -vstorea_half2_rtp -vstorea_half2_rtz -vstorea_half3 -vstorea_half3_rte -vstorea_half3_rtn -vstorea_half3_rtp -vstorea_half3_rtz -vstorea_half4 -vstorea_half4_rte -vstorea_half4_rtn -vstorea_half4_rtp -vstorea_half4_rtz -vstorea_half8 -vstorea_half8_rte -vstorea_half8_rtn -vstorea_half8_rtp -vstorea_half8_rtz -vstorea_half_rte -vstorea_half_rtn -vstorea_half_rtp -vstorea_half_rtz -wait_group_events -work_group_size_hint -write_imagef -write_imageh -write_imagei -write_imageui -write_mem_fence - ----------------------------------------------------- - -[ - ["function-opencl-kernel", "abs"], - ["function-opencl-kernel", "abs_diff"], - ["function-opencl-kernel", "acos"], - ["function-opencl-kernel", "acosh"], - ["function-opencl-kernel", "acospi"], - ["function-opencl-kernel", "add_sat"], - ["function-opencl-kernel", "aligned"], - ["function-opencl-kernel", "all"], - ["function-opencl-kernel", "and"], - ["function-opencl-kernel", "any"], - ["function-opencl-kernel", "asin"], - ["function-opencl-kernel", "asinh"], - ["function-opencl-kernel", "asinpi"], - ["function-opencl-kernel", "async"], - ["function-opencl-kernel", "async_work_group_copy"], - ["function-opencl-kernel", "async_work_group_strided_copy"], - ["function-opencl-kernel", "atan"], - ["function-opencl-kernel", "atan2"], - ["function-opencl-kernel", "atan2pi"], - ["function-opencl-kernel", "atanh"], - ["function-opencl-kernel", "atanpi"], - ["function-opencl-kernel", "atom_add"], - ["function-opencl-kernel", "atom_and"], - ["function-opencl-kernel", "atom_cmpxchg"], - ["function-opencl-kernel", "atom_dec"], - ["function-opencl-kernel", "atom_inc"], - ["function-opencl-kernel", "atom_max"], - ["function-opencl-kernel", "atom_min"], - ["function-opencl-kernel", "atom_or"], - ["function-opencl-kernel", "atom_sub"], - ["function-opencl-kernel", "atom_xchg"], - ["function-opencl-kernel", "atom_xor"], - ["function-opencl-kernel", "barrier"], - ["function-opencl-kernel", "bitselect"], - ["function-opencl-kernel", "cbrt"], - ["function-opencl-kernel", "ceil"], - ["function-opencl-kernel", "clamp"], - ["function-opencl-kernel", "clz"], - ["function-opencl-kernel", "copies"], - ["function-opencl-kernel", "copysign"], - ["function-opencl-kernel", "cos"], - ["function-opencl-kernel", "cosh"], - ["function-opencl-kernel", "cospi"], - ["function-opencl-kernel", "cross"], - ["function-opencl-kernel", "degrees"], - ["function-opencl-kernel", "distance"], - ["function-opencl-kernel", "dot"], - ["function-opencl-kernel", "endian"], - ["function-opencl-kernel", "erf"], - ["function-opencl-kernel", "erfc"], - ["function-opencl-kernel", "exp"], - ["function-opencl-kernel", "exp10"], - ["function-opencl-kernel", "exp2"], - ["function-opencl-kernel", "expm1"], - ["function-opencl-kernel", "fabs"], - ["function-opencl-kernel", "fast_distance"], - ["function-opencl-kernel", "fast_length"], - ["function-opencl-kernel", "fast_normalize"], - ["function-opencl-kernel", "fdim"], - ["function-opencl-kernel", "floor"], - ["function-opencl-kernel", "fma"], - ["function-opencl-kernel", "fmax"], - ["function-opencl-kernel", "fmin"], - ["function-opencl-kernel", "fract"], - ["function-opencl-kernel", "frexp"], - ["function-opencl-kernel", "fro"], - ["function-opencl-kernel", "from"], - ["function-opencl-kernel", "get_global_id"], - ["function-opencl-kernel", "get_global_offset"], - ["function-opencl-kernel", "get_global_size"], - ["function-opencl-kernel", "get_group_id"], - ["function-opencl-kernel", "get_image_channel_data_type"], - ["function-opencl-kernel", "get_image_channel_order"], - ["function-opencl-kernel", "get_image_depth"], - ["function-opencl-kernel", "get_image_dim"], - ["function-opencl-kernel", "get_image_height"], - ["function-opencl-kernel", "get_image_width"], - ["function-opencl-kernel", "get_local_id"], - ["function-opencl-kernel", "get_local_size"], - ["function-opencl-kernel", "get_num_groups"], - ["function-opencl-kernel", "get_work_dim"], - ["function-opencl-kernel", "hadd"], - ["function-opencl-kernel", "half_cos"], - ["function-opencl-kernel", "half_divide"], - ["function-opencl-kernel", "half_exp"], - ["function-opencl-kernel", "half_exp10"], - ["function-opencl-kernel", "half_exp2"], - ["function-opencl-kernel", "half_log"], - ["function-opencl-kernel", "half_log10"], - ["function-opencl-kernel", "half_log2"], - ["function-opencl-kernel", "half_powr"], - ["function-opencl-kernel", "half_recip"], - ["function-opencl-kernel", "half_rsqrt"], - ["function-opencl-kernel", "half_sin"], - ["function-opencl-kernel", "half_sqrt"], - ["function-opencl-kernel", "half_tan"], - ["function-opencl-kernel", "hypot"], - ["function-opencl-kernel", "ilogb"], - ["function-opencl-kernel", "isequal"], - ["function-opencl-kernel", "isfinite"], - ["function-opencl-kernel", "isgreater"], - ["function-opencl-kernel", "isgreaterequal"], - ["function-opencl-kernel", "isinf"], - ["function-opencl-kernel", "isless"], - ["function-opencl-kernel", "islessequal"], - ["function-opencl-kernel", "islessgreater"], - ["function-opencl-kernel", "isnan"], - ["function-opencl-kernel", "isnormal"], - ["function-opencl-kernel", "isnotequal"], - ["function-opencl-kernel", "isordered"], - ["function-opencl-kernel", "isunordered"], - ["function-opencl-kernel", "ldexp"], - ["function-opencl-kernel", "length"], - ["function-opencl-kernel", "lgamma"], - ["function-opencl-kernel", "lgamma_r"], - ["function-opencl-kernel", "log"], - ["function-opencl-kernel", "log10"], - ["function-opencl-kernel", "log1p"], - ["function-opencl-kernel", "log2"], - ["function-opencl-kernel", "logb"], - ["function-opencl-kernel", "mad"], - ["function-opencl-kernel", "mad24"], - ["function-opencl-kernel", "mad_hi"], - ["function-opencl-kernel", "mad_sat"], - ["function-opencl-kernel", "max"], - ["function-opencl-kernel", "mem"], - ["function-opencl-kernel", "mem_fence"], - ["function-opencl-kernel", "min"], - ["function-opencl-kernel", "mix"], - ["function-opencl-kernel", "modf"], - ["function-opencl-kernel", "mul24"], - ["function-opencl-kernel", "mul_hi"], - ["function-opencl-kernel", "nan"], - ["function-opencl-kernel", "native_cos"], - ["function-opencl-kernel", "native_divide"], - ["function-opencl-kernel", "native_exp"], - ["function-opencl-kernel", "native_exp10"], - ["function-opencl-kernel", "native_exp2"], - ["function-opencl-kernel", "native_log"], - ["function-opencl-kernel", "native_log10"], - ["function-opencl-kernel", "native_log2"], - ["function-opencl-kernel", "native_powr"], - ["function-opencl-kernel", "native_recip"], - ["function-opencl-kernel", "native_rsqrt"], - ["function-opencl-kernel", "native_sin"], - ["function-opencl-kernel", "native_sqrt"], - ["function-opencl-kernel", "native_tan"], - ["function-opencl-kernel", "nextafter"], - ["function-opencl-kernel", "normalize"], - ["function-opencl-kernel", "pow"], - ["function-opencl-kernel", "pown"], - ["function-opencl-kernel", "powr"], - ["function-opencl-kernel", "prefetch"], - ["function-opencl-kernel", "radians"], - ["function-opencl-kernel", "read_imagef"], - ["function-opencl-kernel", "read_imageh"], - ["function-opencl-kernel", "read_imagei"], - ["function-opencl-kernel", "read_imageui"], - ["function-opencl-kernel", "read_mem_fence"], - ["function-opencl-kernel", "remainder"], - ["function-opencl-kernel", "remquo"], - ["function-opencl-kernel", "reqd_work_group_size"], - ["function-opencl-kernel", "rhadd"], - ["function-opencl-kernel", "rint"], - ["function-opencl-kernel", "rootn"], - ["function-opencl-kernel", "rotate"], - ["function-opencl-kernel", "round"], - ["function-opencl-kernel", "rsqrt"], - ["function-opencl-kernel", "select"], - ["function-opencl-kernel", "shuffle"], - ["function-opencl-kernel", "shuffle2"], - ["function-opencl-kernel", "sign"], - ["function-opencl-kernel", "signbit"], - ["function-opencl-kernel", "sin"], - ["function-opencl-kernel", "sincos"], - ["function-opencl-kernel", "sinh"], - ["function-opencl-kernel", "sinpi"], - ["function-opencl-kernel", "smoothstep"], - ["function-opencl-kernel", "sqrt"], - ["function-opencl-kernel", "step"], - ["function-opencl-kernel", "sub_sat"], - ["function-opencl-kernel", "tan"], - ["function-opencl-kernel", "tanh"], - ["function-opencl-kernel", "tanpi"], - ["function-opencl-kernel", "tgamma"], - ["function-opencl-kernel", "to"], - ["function-opencl-kernel", "trunc"], - ["function-opencl-kernel", "upsample"], - ["function-opencl-kernel", "vec_step"], - ["function-opencl-kernel", "vec_type_hint"], - ["function-opencl-kernel", "vload16"], - ["function-opencl-kernel", "vload2"], - ["function-opencl-kernel", "vload3"], - ["function-opencl-kernel", "vload4"], - ["function-opencl-kernel", "vload8"], - ["function-opencl-kernel", "vload_half"], - ["function-opencl-kernel", "vload_half16"], - ["function-opencl-kernel", "vload_half2"], - ["function-opencl-kernel", "vload_half3"], - ["function-opencl-kernel", "vload_half4"], - ["function-opencl-kernel", "vload_half8"], - ["function-opencl-kernel", "vloada_half16"], - ["function-opencl-kernel", "vloada_half16_rte"], - ["function-opencl-kernel", "vloada_half16_rtp"], - ["function-opencl-kernel", "vloada_half16_rtz"], - ["function-opencl-kernel", "vloada_half2"], - ["function-opencl-kernel", "vloada_half2_rte"], - ["function-opencl-kernel", "vloada_half2_rtp"], - ["function-opencl-kernel", "vloada_half2_rtz"], - ["function-opencl-kernel", "vloada_half3"], - ["function-opencl-kernel", "vloada_half3_rte"], - ["function-opencl-kernel", "vloada_half3_rtp"], - ["function-opencl-kernel", "vloada_half3_rtz"], - ["function-opencl-kernel", "vloada_half4"], - ["function-opencl-kernel", "vloada_half4_rte"], - ["function-opencl-kernel", "vloada_half4_rtp"], - ["function-opencl-kernel", "vloada_half4_rtz"], - ["function-opencl-kernel", "vloada_half8"], - ["function-opencl-kernel", "vloada_half8_rte"], - ["function-opencl-kernel", "vloada_half8_rtp"], - ["function-opencl-kernel", "vloada_half8_rtz"], - ["function-opencl-kernel", "vstore16"], - ["function-opencl-kernel", "vstore2"], - ["function-opencl-kernel", "vstore3"], - ["function-opencl-kernel", "vstore4"], - ["function-opencl-kernel", "vstore8"], - ["function-opencl-kernel", "vstore_half"], - ["function-opencl-kernel", "vstore_half16"], - ["function-opencl-kernel", "vstore_half16_rte"], - ["function-opencl-kernel", "vstore_half16_rtn"], - ["function-opencl-kernel", "vstore_half16_rtp"], - ["function-opencl-kernel", "vstore_half16_rtz"], - ["function-opencl-kernel", "vstore_half2"], - ["function-opencl-kernel", "vstore_half2_rte"], - ["function-opencl-kernel", "vstore_half2_rtn"], - ["function-opencl-kernel", "vstore_half2_rtp"], - ["function-opencl-kernel", "vstore_half2_rtz"], - ["function-opencl-kernel", "vstore_half3"], - ["function-opencl-kernel", "vstore_half3_rte"], - ["function-opencl-kernel", "vstore_half3_rtn"], - ["function-opencl-kernel", "vstore_half3_rtp"], - ["function-opencl-kernel", "vstore_half3_rtz"], - ["function-opencl-kernel", "vstore_half4"], - ["function-opencl-kernel", "vstore_half4_rte"], - ["function-opencl-kernel", "vstore_half4_rtn"], - ["function-opencl-kernel", "vstore_half4_rtp"], - ["function-opencl-kernel", "vstore_half4_rtz"], - ["function-opencl-kernel", "vstore_half8"], - ["function-opencl-kernel", "vstore_half8_rte"], - ["function-opencl-kernel", "vstore_half8_rtn"], - ["function-opencl-kernel", "vstore_half8_rtp"], - ["function-opencl-kernel", "vstore_half8_rtz"], - ["function-opencl-kernel", "vstore_half_rte"], - ["function-opencl-kernel", "vstore_half_rtn"], - ["function-opencl-kernel", "vstore_half_rtp"], - ["function-opencl-kernel", "vstore_half_rtz"], - ["function-opencl-kernel", "vstore_rte"], - ["function-opencl-kernel", "vstore_rtn"], - ["function-opencl-kernel", "vstore_rtp"], - ["function-opencl-kernel", "vstore_rtz"], - ["function-opencl-kernel", "vstorea_half16"], - ["function-opencl-kernel", "vstorea_half16_rte"], - ["function-opencl-kernel", "vstorea_half16_rtn"], - ["function-opencl-kernel", "vstorea_half16_rtp"], - ["function-opencl-kernel", "vstorea_half16_rtz"], - ["function-opencl-kernel", "vstorea_half2"], - ["function-opencl-kernel", "vstorea_half2_rte"], - ["function-opencl-kernel", "vstorea_half2_rtn"], - ["function-opencl-kernel", "vstorea_half2_rtp"], - ["function-opencl-kernel", "vstorea_half2_rtz"], - ["function-opencl-kernel", "vstorea_half3"], - ["function-opencl-kernel", "vstorea_half3_rte"], - ["function-opencl-kernel", "vstorea_half3_rtn"], - ["function-opencl-kernel", "vstorea_half3_rtp"], - ["function-opencl-kernel", "vstorea_half3_rtz"], - ["function-opencl-kernel", "vstorea_half4"], - ["function-opencl-kernel", "vstorea_half4_rte"], - ["function-opencl-kernel", "vstorea_half4_rtn"], - ["function-opencl-kernel", "vstorea_half4_rtp"], - ["function-opencl-kernel", "vstorea_half4_rtz"], - ["function-opencl-kernel", "vstorea_half8"], - ["function-opencl-kernel", "vstorea_half8_rte"], - ["function-opencl-kernel", "vstorea_half8_rtn"], - ["function-opencl-kernel", "vstorea_half8_rtp"], - ["function-opencl-kernel", "vstorea_half8_rtz"], - ["function-opencl-kernel", "vstorea_half_rte"], - ["function-opencl-kernel", "vstorea_half_rtn"], - ["function-opencl-kernel", "vstorea_half_rtp"], - ["function-opencl-kernel", "vstorea_half_rtz"], - ["function-opencl-kernel", "wait_group_events"], - ["function-opencl-kernel", "work_group_size_hint"], - ["function-opencl-kernel", "write_imagef"], - ["function-opencl-kernel", "write_imageh"], - ["function-opencl-kernel", "write_imagei"], - ["function-opencl-kernel", "write_imageui"], - ["function-opencl-kernel", "write_mem_fence"] -] - ----------------------------------------------------- - -Checks for all reserved function names in OpenCL kernel code. \ No newline at end of file diff --git a/tests/languages/opencl/number_feature.test b/tests/languages/opencl/number_feature.test new file mode 100644 index 0000000000..3f66db5595 --- /dev/null +++ b/tests/languages/opencl/number_feature.test @@ -0,0 +1,53 @@ +42 +3.14159 +4e10 +2.1e-10 +2.1e-10f +2.1e-10h +0.4e+2 +0xbabe +0xBABE +0x1.2 +0x0.3p-3 +0x0.3p-3f +0x0.3p-3h +0x0.3p4L +42f +42F +42h +42H +42u +42U +42l +42L + +---------------------------------------------------- + +[ + ["number", "42"], + ["number", "3.14159"], + ["number", "4e10"], + ["number", "2.1e-10"], + ["number", "2.1e-10f"], + ["number", "2.1e-10h"], + ["number", "0.4e+2"], + ["number", "0xbabe"], + ["number", "0xBABE"], + ["number", "0x1.2"], + ["number", "0x0.3p-3"], + ["number", "0x0.3p-3f"], + ["number", "0x0.3p-3h"], + ["number", "0x0.3p4L"], + ["number", "42f"], + ["number", "42F"], + ["number", "42h"], + ["number", "42H"], + ["number", "42u"], + ["number", "42U"], + ["number", "42l"], + ["number", "42L"] +] + +---------------------------------------------------- + +Checks for numbers in OpenCL kernel code. From e9dab85e18b72f6f4dda8413108e3053401dc2a4 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Tue, 18 Feb 2020 22:17:05 +0100 Subject: [PATCH 0443/1100] Website: Added Coy bug to the known failures page. (#2170) --- img/failures/coy-overlap.png | Bin 0 -> 14789 bytes index.html | 5 +++-- known-failures.html | 25 ++++++++++++++++++++++++- 3 files changed, 27 insertions(+), 3 deletions(-) create mode 100644 img/failures/coy-overlap.png diff --git a/img/failures/coy-overlap.png b/img/failures/coy-overlap.png new file mode 100644 index 0000000000000000000000000000000000000000..ac3c79e09d600fad2fffbe551bc8edc29559e640 GIT binary patch literal 14789 zcmc(`V{|1^*EJe-td5;@(6MdXwr$()*tTsuC+OI=Z9BQ?=Xu{TzVZFJf9@Ff$Ei9s z3VYSuYwx|*nzO>>WJKYhv7mu~fZ)W%gcN{)fK$Hz4?==`Z_$~_kiK`ojtZgzK-H5t zC*KEPru@?UKtOddFz@<5zK@~o#MB*ufZ+T8{eXvTOO1el*fqq3_?6srF0!C9wUm>- zt}439pPXj1niBYskRhQYmlJD4`~v)1bE)c&{pj)u0s`=_dGB1YMYAwJDoO(bIoR%0 z`I7mC=)?s4Fp!43OXl9X=et!W+QvGZ&lW0*G79IEy}OmRTrb;>vR!q9-_G82x_pX? z=F9^K6f=6>PlBm4wq$-P9R0olD|1mSVU)q5Ds<5h{CF?YiBOz_?9^*F3nErGCm9g@ zBTYmD5mq!}mq|Q3FHQti*NgCru49)RBn>x6slnpUG)3onEDoUpv5Z)3ES=?nni>?8 z9s#q;Ze3iEhzK&%(Ky9!V*=BCXtg;5((e!bbl?DeV)!TycRafIafB5;U1=MIi(h3Z zVZ_5?L2d;GnRF&%XyGDH=Np_H3?R4%bh)THa^7EQ6^mZS&^uXP*DWyo#Y`z$K7;SU zFv7tT);9CZQ`ucsMH4&w(a?N2>4eHSC39^K2cs(urV;IZeZerK4MD)A29N@6mw#oa zQfGvyy?t1xG^d^VkmSjM$q^}vC#k|ktp^Fl=#COL0+VJ!pG7OG@D{h)v6oXzvIv*WIP*45ki3J^K>RE z8UmsDbcKU?8dyFZlnG^fIzGrmJeI~AW|aqCVdO3WK!i|!q*(2$sj)qp%nA$)&;LbciKNBM!&f3lteYLTVD3Bc)avV3zU@uwB%#6L8L|F4C53J#4OMJK_P^KXEqlf z?-gakMvZZZwogFWIBAb*$gNg3G5Rew(Y9wV7QVb*77&gaZ=jZN1h4_U^Vqi4` z+Z17d{`se2+9#2Pt-VUKx%Z`@)D+YoTi4sU^oT4+7hhOzFt%*+PL>B)@+VK(!MsY8 z8C|XQ85&|oBxMGUD1CjA>G%doEUE0#tmC7ztMytv2_obl5BOSSwK8kBS19=$uYX3Q zANf4t$JwbV0r9*wF#9dRA z)z7K1y}w?43M&1^EHxOOH$E$7_25_&78Y*H7g8ncBNhbxxa#a`>nYKk$E0xG*$mt~_&*Uty#}X%r z&+vUqEtSFghv@L5^%@5!r!a{tmSEP#p3H|qL5kny$=T)R+o2|CC<4jujFcsfL;{^N zf)&jD-Y`a!68%W8*1ZaBmJrqH85auIwTe|xHvC*NlFcqF(9QL&i|gx?HFEU`a5)A8 z>dV*|?Hv0^QTUWe?E?jMn{3*tMS>du;a7haF0SU*xg|Fu{10^kYb0#_liG5?kbKtf zW*%4#iU|v1y;27~B~f_1<%W|9IbDdD-2Ou-_aro7J#H|)$j*oQQYrYx#YGi;LNO8p zH$AlLSxH)JpEK&zC}x}8`UJHAo-O9M{3-jYr)i33V9@}n2E@=PFd`$@KWfwi<#9&g zJa)|4`3Woh!;vUAYU0*#P=&+(1olg;lNsEWulFa@7CV$dOy00o4AOy?y&1(*9@6!s z^|Pj30qKQiK*#vcJL_-)KxAz@zX}&6*5P007iZWeR>7d$cj>!EPcaBB25c?Q)#F}iA8o;$}G(y_M2P>0WU0c)C&=3+n%IW^NFd_t& zjK@l83t#Xky^xwFRl!!Kk|u4IAGAmd{~<;uo{6?=&tb|0%vheAR~xRb2OjU14)!w3`1#LBt+0C zI;%W&!#Kn9Zb@kUCgiJ|FSe}Daf%yVmRRV=ZwgfyZRYzZo8uxU>|vpiGFdSutc%O@ z zx2{xKVz51*u#Pys{~UGjQoAEanb2#NVGf19>wrr2k5FHic2v?eQ~nk}Q*VGhHHsT%&M0q@zB^$ER*BvS z`ertQwj72&`UEFg#s;IDgfLLQY9AL9*UZ*(t!*!hb<^u@g4M;ww`Fhpb7u09&sW#X zi3ta`?-Xj%@ugfkR;DCA%!n!-5~AQ!{z`94&($;6(zouu}4X7I^O3iDIUE=Z8Fd^|mv8VLZJS`Wt}PmlY$dFEeOs^SwQFjo-lDUYjcE z_k(hy##tU9nk~(wXlW4SXFaJ{jkx;C1JyCM;nHB{%F^KD+0vlZIqbZCkvIWQD)9_T z*)OB$V4W!}v4qxO9T>~TxHc7os06_nVE9@7q&f zxgBP=ZBdjOsw3Ek`z#Csf2|J7^|_y#c2nfX;J2a)7DH!zHizj_gS4t$D}X3}?!sAE z7KbS_Nb5DAGfLC3<&ARB0>RS%E}g+S9C;9jmFBB9U7uE>(xyPO-f9lh7()H-obp=t zI}?5S0j2$fj1-RiznYE%0>P{^gD?n-^cV4GiFk8v@JwY@jiaY8?fZA8(?n(z`e*^P z6ZM4d!AajS0|P&pcenh*luhIKK2tbI&8bZLM5D2sx4ZQm_<|lSvqWE3ni`r&g+-$U z<1wDF7Fu5o(_xUDLsq%y1=%|m)SF1(XV^!=EY7zJk^_>R(|8Sw8Rc}|W`4r6TP6Wr zi?;}I#a7bA4p8Mukeidaw`1$;|1K~ldCD-F<=kHjGgG}4D6F*B{R*#*M*dzp5_9jS z`Spzpe2B^9xYmOhSV#ANRkYzL*7r*#92J-m!_keAJxGE@{#+5%)`m7szi-CdJ-h)? zhAs2z+w3lVB@^PyiBc!^#bJl(V`tX7 z^=`g|3|fw%@N$pmC8;(@=N-vCzI;<2#jxS1$fpR1fp;LsqN?#t>(i79;^h4+f94IS zFqo z$?l%lrlM}F_|?baCK*_P%{(y0=CJQi0*$v6LoPoU3vJr!NIA~LZazmru5Ki2;gT(hd_S)-_gg7`+w z?mh6H)8~0Vlsr@F_g*j}ZANUX zVKhnN?W9=m6`Ee)4#b=A)9J=AA!01J;Ql;0GRU`(4Ki=wY!PTh!_ov-pVXI@DHgr|oWZU3Z&7GHesOjHsa~xQ>%$Bf3}hej5k?#YpvQ$G;TJtf6emQOTF-{Fn6@xr zToQQygUI@$psMRLIxiQU>1RN}PZ)84d@cPf|E!?+Z@nP>9$KW^XmD>(BESxx6H_KM z2^CAl50JewCNf1bEVvMXX&9~R?m+{3-cH`USX3?+Y@D17Vu77lR-77FHS7%)Y)>|I zG8sa0B$-&Vc(wSOBGas~tw$*E@2)l~4TtN@`cuR|*jc;#XONmv*37)T!m_lctfs2E z$~u*&K;L67@=!zc%WUA%jvbP!Q$#d0#_7H|BPHAYhM7`ESH~LLdZW>mF3pMKf+Yjj z#D_sRzN~P{(s9DPo|F?jG|(kw?Ebm*+g#CQRN5+SJKLBmX009eFxC44&~$8EI7 zZa91fQ%-UF9%lZ{&KBfEfES8KOPSMe(LgeXL-P=PppL*6Z?z=YvFm*U$HJ=0XwcK3 zm}O3NYSYRMuhR>)TheP~CmL)xI;$|Suu14PQFhbwAdI*SQstu{2ZO`?F@1?_(dRJk4 z-smoj(37jr@drY6Hd>Ua3;{o!=GPJH*1PT2xVkc)ESIoI;7+%{&)7@OS17hBvqfI* zQi{{O%92}OsP6NLs?SLlcSl(sjfhpAP^afeNwDULtmv{zLMVmkH?M`U7=f&=2 z%jeYAmyMGT5u}cj(}6Z``|@kakxzrZal_C_BO)axWZVuICOookqMOzJDCbpKSp{-n z8lN3?h!O+ng=PZaQYf=mW4y-P&S$=DZ=$EW{jw-U=e;J*-BR{k{b`zL%F1WY*0y`i zqDdYgHuwr*mEv=-GnN70^YGl#-1Q>!mEF=@z4l&hI!J=A#b~)T$JvROG6!|!SEfXP zlUwhVwB-;^gfsX4rnAf`2TDn#77=Bb6#LBq`yH$o5lC|sm15&2F`P- zXYuisa;?QhO-09jF@8JwVuN}vOIb#eI34Ga+D6^lyz2>u*W0+i{h_AH^JR+G29CPp z{uEWZ#%7}g-~cOwx>ML_3#i&^J5#EExWSd>Ny2mUbb5NNS|ggAt8Tp?zt8a9Fnnm` zAD^quws59y-(EMl9SG^VRN~-1ZGTV5v2uCEuF$%wUPEiNBu3+~eHfAnw|+_S|2#dk zz|L&GWgMl;l>aTx#D9*qYi^cF@7e5jMvB{h|TPJ4d#I6lT`EvSmi}z9CtWi0qwTc6L7icci zBv4T@0`1D{G3>D&VdFjt!TITto!0yKQxXf|^YWyh+yyvFWJXdumc?W8p&}*v+;cbd z3Kk&n7uZcJ&)*c!v%z^a{LJQVVDEmk9S@-pX~vEX2QpX$#DC_o=hNOdrz0;|dw5s< zS7fhm801GK0R}W6&CqP>iWL`rkvR)g-_Gp*R;Tl__-wMw)_W&L_NrdBjmt)~X^ft_ z{-&*D3sc==h1pc}r35&3!N%8HRMTv7_e>!2dN2a*?eX2mRQE1^Ov8-(oY&VqqN3r5 zmZoEZVyKt(-rFbxa9L?9okRB>8A<%cMSr3XGcUma;rY>)5-!^Ab8_Ck$?eN6MjPMn zyB#8K*%ZmsVeDILzBzJEB%B5Yn{jb~zH~7o({}UabDQv_?P}q6Hs$+Hk!b@c%l(s| zo@iq3`DnE~82pDtUc4#N#?8~W)P0lT1(+<g<%mVSgCVAG+3|nardr+~;lg2|*Of6gD5;HUa3j<;9$Jh1Nv0 zdh0GhxMv#IVu{)^0g=u<_2r%xM62v%;A?Y#fhw@p)b%VVuzk!|Ubs()olBl@cD-8J zccKe3f*8_ym7h&_brVziji&S+#EX;Ge|gmtSQVMDSJb5w8-CPE0UPTlXsx>-$|jVX zH|UYXf4EAZMO58v#uS8*)S6OH< zniW?=SSfbx6ZL$a6!3ms%Hn+t<-EV~^4wH3!9YA(Kf??o>p}n!1}u#h%Xod>LwP?| zVtj9pr+hz`YqH-a(CeEf+Rn5u7*@65gsqsv=-Xyto1f`E6PPgWI3Jn1;64RYC{ev{toF8 z;0$}Z-q3#+hRVzo==BqUq)a+C9{zL_xRZPl>e%2DO%-!7p&>))eDV<3&4%$ zy}Goc(r_-iLY6!fhQDy%xNvFdS>>3nKj%1NKbo*L!`}pJd+u*UP2?9Q`l&BXm25_c z8&;AVS&wAhNI9~240@cFTiV_~5RhX4I7h`(;lO!(^|tnoqNMH4ZSU&%vQyQyboI5A z-RhkV=uoAVzCT~NbW-Q%RpXihO4H*vY)(DrocNNk*r8Tjz@xe49+`dZ3<=|Ai7>FPPzmE>7O zgbY5}D5ruXv|^&#_P$M_<$2g|nBw|K;JuWf`g(3U5)#;f)V*A(RB1W80NuD5tms*1 zV`}Vau(j3vx_s>Z!2L*usnOY7Ug+vrJ*l0Gn=QyCO`2+PQKe6>YXPQoUMr zd4!)*cNjZ;ao%`yg(%~T2uvVr63XY#Zux=c`|j!Mx&a{|+TM(71|#$B?Y?ib?#!O7-L;s-EC?Yo zc88FZm=zOH9{i-NlAt8dClmQDC0x3JjmlY5Jr6E=Gf`U|PsIq!9PRKeO(f}4JvVQ< z99e{~OuX4CoyO^QQQ9f0dazS_6l z2&TxC{e?3ESxO?UKLGP0dK)v_&HjmP77UD-daFiH-H!$6EwGc_`w=l*Z?{u9?gyM( ztsk&&*(p9Z&(X0k#q?mH(-qC5I{_q-B|6$Oem%vbJ77H>oA5r#81L|ERUbE^w6-{z z4UZ9Dk4GuGUN1@b-barKxSq{lyEl(|DytNW8;8}QG~4zo7s(H_4kxuAhsB;1{Z11Z9f&iqkQOcOk&k3V=p@8%1C8m#%MzA*|7PHVl8m_B*^9E4V zaY5)Gi%sSW#8{-vHXbJ%NYV?;RGDiiHXCz}WJYzX$6JrJ2=~XVJ%G%nk~zlN6N?NL z)si0yt313=zyByou9Z3!XR#puRD-tgc{Jr{!b+jG~E z{70r_BiSj6JF9SO)5QPdui`!SelNmanu$1dc6NHhJF&IV(spdohN!NcjK$3HhRzLB z*N+_d^p8Qe@C{F3@|__8-eakS*!utu$s}!TcuU7~BYkRrXM(OXW+{=~`)XC&Af=U) zovp{FJ-aXR%E8vmK3+KL8Ig`%E9B$%Mn4MmJTOf+=U&4mb^YLjFeh-25H1;eK}^)z zad@WV@hKAZEcdjW58>bMf83xhK+Jcz=$G9Koreb}SDr_JG~#7a0)HorDEC5nj&P`LBw)sz z4}De>z}y92(L>Zk;?_!162SbZtvPh;1mC(#3kJ=yS`43GqTEIf>cRZ zHth(Ll@A{pYal0lI532V$IDB*@z(8vmW{`ivl=$j;*yGzmZcP2mUGv^42^Ot9iNgP zR0CdlVlB=-<9i@=L0Pl4LVX;bH<^Q18BJ#PcTl8KIlR7?`N-(qwj)quhYP}l1l5Q{ z@cy`wT={*ep(mKnlHez6Vc`GmTPbZF^h=yVO=}2F*7a>L?D!!h%Efi(FVmjKCdN5X zof>o_7~J$HS^@}EKckl=Y?gHvzQSxdArVZvz7J6<)GX3O1=o3`9{{SdaD zMlZ8Plr&v0XIs99x>r5<;XJZZT*HV8LVG2Z?K_W-o9IQPNpiA9{FB8spXVegx**_2 z4YeIzD%w69RlcrITU*{+T~EBXO`@MS*`7VOFCAB17mTc#2RGAa#@ES4_&_yf-Gmqd z59LmjJ;J|HI%z^&jMqlT#~5|XGMM>)3EWd`K?>&2Q{Ruk`vYcvp!+;rviB4D^8w96 z7=>SEZLSPL2%ac(&(hP0&^%k%|6u{z;9d*J zDJ%2A65*x1?|NNpZf9oQ^qIXL79+z6AW1cw6iw%WqsOY~a=5^J^!9z;bL{AI;jG*X z0O$>cY<<3$@cQgr*hw>t6k)gwH&Oh&afXA%J;h?1rk`HrMkyps@hTJb*I%x@cT^_r znu)+`er<&>Hy9l*8bM%uOAQAUxQmiK49MZRq9$B{`~7oi^|kXaJC+sV@R4nYztVL- z@i?B+LOUL!{FZVXHNM`@+XEMlw!V6WKjY+Wi7AvKU5=7L9_VZtoG;ha{kw5#0|xwp z{6SotT<~}t_HBK=Zp%z{P9VYfPRww~lqsaCm&(~CW$MSZ;?wIIEdbCJ!9F6;ybO6j zR!!xc3_L1v*^#`wT&X?SOggl}fClq{zn9HfZrfX_Q6y*hFyA5DVDqu>NvWZbIfw>K zy1s(OVvPQnff!`KBy)Ik)~;QvFI|mq@R^qSv*Vvtql=X`97Efro_`P7$kb(;*g2Uh zf>oK|WDeTDuFo|AMN7U9EJtRr$ztXoDq&hwSaq`yGO%C*@Dq4ACa!v&pADkjPE*`D zZ4Zl--7W55?Q@no-2|6ndv_kM6u*ZmQKx7i! z-Q8cWUoVJVdIiM5&um=G=knXg(Od;6wh*A!@T-{&&CH(EQq1}d3c=tbEM4mKcZ7z^ zq`tACJ~^>t3$N$2tdEUaA5}FflpYkZah)ZD1~;u+=V!lQRD9c9>}nfoZ0*d2^zv ztd&=u=T=&q8664{DNChzL$BgAvKw1z;xH~J=Qk<{Eo@W&@Ma0rVY^5h(&!yS_IL?H zho4gO+yU{h->@!1D9ObFO+TA$9Bz z;c(adG)(#g0e;1$Je&p+z%s=R4ZQ@t4!NDN=N84j2(Q0bxYP5H7iY}K#mvFe!!xt1 z!zSaStyHnpPU^Rw!BM`iL))%fu`(KS#9r+WQp06t%zXcaIIgQ}=!%%pP#nVjCkZ58 zY3}YlWUC6_F8g8S>**5M4U_5*SVhqT;q&uV6PCN?$2PDTd^=))uQT5 zn|@3JIJW(=IGxmE^sFdbuLT9v2J>qY@AQWFtn|4!QqzM5UD3sZIe^VxeHKmNYR6$t zbbroN!)=c^Q*0^zp3720(i}7$t>xRDrCej#n;S{eA4L>5!rIH9m|?Ft&y7z_0*%o) z@vVxd8pW2D3j0r-Ow}A$8xI^Cu~_qTXR@RQ6ABHN>lE&4L<%np|4*qmNwDM_+*>F=6cW9O+IY z#xgg{CO?PzPgJ(!qP%C&zH@11hWK;_zU6?=2e)C%=eC?y_H)B< zNb<`EQdO$4x+BgMjR z7u6^YWnf<4GCtD;x06}8rUG*=1Uhqykk#O|Z*nZ0sm_G#xI;03F9WE{q20esm`jJaIgoa5W^>A1PuWUU{ME4!eKSvz~&Ed(OAKBMFoFGZe)6-K@QgUGHX}*A$ z7pcTmW8gUp?fmiawY-v(I^LWiYr|Zg^s2G8fs z`*=d?s!VtE^~xmt7C3YtZsb5BDJ0^%vSo8;DZ7a^3W(;-CbkAO@`z0oY!MI!PT4lN{VA0YP-U%f6L+NWKr~ zo4l2v^V}iSPx8yGz#)g;BcO~~W>6B(7q&mv2n!vBXXl0~9JK~Pa2`z<0I8k1efkxs zW1a4s|35_O_WT_!i;TdJexVSH27ftw8Dlw8QOb#(j zFL_aJZHK>vKnDCDp4nm{t(sw;2ekTU z6HXOte$xaCL~Ch9jdX6>9#In@f}9gmRNj(#A(h8}Zffz(BgpFVS);~!LUHkO=TuM}+``gqc zq>6Hm8rF{JhA>1wM&i507f7G&@GpslsvN{_Lp~eCUCLBX-f_OXK1{=MvkLHYa z3O^c%d~OcLd2djUa=L4MtICSeRJEOxCMJ^&b7@`^(HIld9g?B%P1w>HGK0ggY>kV< zt&*hIhs*n7;urk@S!K7G9^^lNZ}F9#W5wD;Ybf{M<_8Jntyndg>h^05;eU6@sQoIY zDI_H}2YV5KG8}QZDD~b*|8hcd=2{9!t5^6|%8ST1o01tGd9ZT> z-=vV()V7wBX2&QRXELTp9M7wZnvM78G)Bglu5ei>%I9JKCen)u$5bm*xjo^t{(9Mf zdVM;^*vOI6nggsh2P)Q+QA3=<(OvCP5Lk^c9%}hk)3p`q_ZrG2Fj@{^eB8)0*yfWl zQG99CwNusjYSPmjxk;;0;1WQ;0Sb5cpl(sGRFU67)=6u@DPXjQC6k$f=i=iIn+TOE zI#lZJ0UZu16$RscAAHxNV+`CBqh~VC`{_26?EB7`&td-0HX74R&z~E9u*b4X3i>ug zZP{A&+0$x`f}cQhXs1E=E6KQt_WeKW!moQnRE>r3pj&dBHV6CCrT&4OqA0`ZDssmq zKf)A9mHXL zg^hiy6khJ|&YgDFgD?pQSt*h**($3gP;tQyd9Ju^ktXwOqbmKjwubvdRX)SWKWjNG zdEUvTzg}0Ue(sRit_?y}?lY&^sU8jd0ra9)C&^%+~63twurHd{9T%QDSwB zE|vPe4>2gyWzk(Sd8P;Yd)S{D^56!BT$5ymDY{~&Ll@j5+r>CRYd+j6h&GP`Kv#a{ zFYs;Z2_)0%`n&Cew9NVM?ZvnNbltx!WH=4J)j;x4+b zqLLBaeH2l=??a&GuvF^%78lYhog>$k!F}H>6g{#sE=bA>y;_w+WuA+_CA!o}3N4SW4b_OrA z8JexKU@08ATf$~8I8X>h3Y~n~y;xpRXieb1w6$%`&}5>?HB3>G*-(W#2!RO zK+@m5#fkt7zBq^vIBF?M3JP1BtgQsdj!<0$30w?yucw2}%yIfKv4b0rru{YAyg@_C zq&pwDkE$GcC6SFTJ1H4cGInp6(Du^{w?1uY)?oCi_wOmkv9Bp z_t&sd!L$XV*~tyT=%MKvzNOt-9<7qwvIV!<(@dw^5!MZ_hSEfY?*hO@c+1dK{9R2} z!!6;fx_@|?%zpNL9S4d#1fYGItd3kv17XIMm;=iLooiPLgWze>&#-elKcc$(QA3`V z^12?#*Gu}s^v8MF2dF-P5W>Is?chjA!@V)oU0BAK+qG^k=N!rn-`)I7; zaB@$8;HNSWzzj99JLFIyFB}+v*iVIQs>8Bo1U}2sh?l`%I0|*13q6=lsOg!sN z3Up0hY2xpVA)kA66g#RC?b^eB)+B&;RWRVpz)ZE%d!EgBp)IHDD6d%kwLTa+5K4=z zRbd}$BwsF)3j{MUOQ}j+(|l^|e#Mc;`ASf7ic58V4D)~D%QrH|g%TT0$H9er%|v1o zPR7^y1kM!-Z4*qszWR2fA-*a*TfE*3voZ*E+-#DHn$K;xmN1W(z@Y9Jy9zrm6PyYpWa~T!2`Pv=2e0~pam_*wQ|4*&) z=21vdThVjon`dzyN~!6*c|?}gkk?i;#DGvL62%BdG1f>+Qti11$0~|DT}>bSUU1t! zA7j>E4jg&iqDqQYm}G$)<(S}mnzyxk|8Wd&?VLlei35fM)vnDVtMJbr9vmM4I`Kh8 zqmYDgM`X*)Ai_dMnf3%?e#o!XUch7=l{rH~touTtK314{VFWjc{Rxi3-Y;>;1uAmO z1v3j3ht=JplB~&BT<_6c@-T(LXI{>)mhbEzx{fp^yzJR~vpEo=FOd6kT5k5}>5ULK z?^`#HDqDQ43tq@b!9pp0xS)vA`Df z`$w)`o?Z4{6?oAmjy=iW(#nVUI%?!cxeTs|1rr6M`M8TuALdSwyMBXE7=E**{aqL` za~$0ep}>)&|CEgQx)k^~y~aWRC-c4e#^QgSS}gc~hbR#${C@_Tbz$Fs=ZkNM{+C1e zzpkIIcKdGVd-_~Owf)a+pwov+<^T8f-y`n3{eQLP!L|RZng8SZ? zwhI@|0ifx){*II%8U%=l#nG?Hn48_}t_=g*Ah>rA6sM}7e^03pRdP?bv4lVPcErqw zDRMn-UxtkSyJw&ExzZQj^S}84O2U$q?XO6nqaXoG+ET_xN6P9)`7;q56?A3yl|&i# z{h-PqPE05jy4Y5|`)OvIw#asdro4pjnk`+*P)gGu$rE^;W}BRZZD}}a zT#P737poo`N;5*&H}9a1sFPoZ7x?ekU1_%0CrC&oNHBMiP&v4qgc>j?oij*qAW5#M!XRHc z-{8JOBu)Ra0PHply`Llo!D|Yr21OE5F=m_XsAu7QP%zP!VRrt;(EQkcL7i31g(8b3 z)lD#uG^eCn)M?W%VgkO}P$Xc;`BmWuNT97Z1CpCJq=Oa$dEqJt-Vd>FCALT16Zoqv zm8{hVhaNq_~C21ZX)rhwL0688h^x=TIcAIIFqAOpf zHvoBbpmLEnnC#Ox#7Z^4X1hH)`*zvc7Bln(MS@noA+Ii}kMg;Bni+M1O1`<&@5jMr z+lxvFssJw(yt0>v+y4TEMJlEl0Ger#N+m$$6p`xPj(Me#kWyo+y!THNiKg}K)&ch= z_l|Ih`~GB!&!6k%zkXKtI0{Eu1m$*>t;O3*0wsY+Uadl)sWoOal99U~*C~l9ze(Xj zmFma3uXdh4kQvB1@P4%`|rU1V5nFD@XNCyD{gOC*PvYC740J50~#!*V1(&!BkJ%GL@Sql z6G&>JyinG!ezz0`5ar6wG(X?&g6;?;WHdNRZ@uEUy|J8{6o9V8R=##&2_Lc?6GCqj zl!P25S&@%8f~ZI`da1#mIH+gc-T%|t|8|sbjJ`rip;g)Ik82DxO_T3b40!AUqW|NlYJ3I{YHfP`7n!>tMD-{)XN$aLh< zgEZlXOkzp=!=vc`3K9g-9c+i?%57)p-y&-M(Nz2Ktx-7|)bCULqu4L&-eCN(^Full list of features
      • Very easy to extend without modifying the code, due to Prism’s plugin architecture. Multiple hooks are scattered throughout the source.
      • Very easy to define new languages. Only thing you need is a good understanding of regular expressions
      • All styling is done through CSS, with sensible class names rather than ugly namespaced abbreviated nonsense.
      • -
      • Wide browser support: IE9+, Firefox, Chrome, Safari, Opera, most Mobile browsers
      • +
      • Wide browser support: IE11, Firefox, Chrome, Safari, Opera, most Mobile browsers
      • Highlights embedded languages (e.g. CSS inside HTML, JavaScript inside HTML)
      • Highlights inline code as well, not just code blocks
      • Highlights nested languages (CSS in HTML, JavaScript in HTML)
      • @@ -116,7 +116,8 @@

        Limitations

        • Any pre-existing HTML in the code will be stripped off. There are ways around it though.
        • Regex-based so it *will* fail on certain edge cases, which are documented in the known failues page.
        • -
        • No IE 6-8 support. If someone can read code, they are probably in the 85% of the population with a modern browser.
        • +
        • Some of our themes have problems with certain layouts. Known cases are documented here.
        • +
        • No IE 6-10 support. If someone can read code, they are probably in the 85% of the population with a modern browser.
        diff --git a/known-failures.html b/known-failures.html index e59e3684aa..b03f034aee 100644 --- a/known-failures.html +++ b/known-failures.html @@ -24,7 +24,7 @@ - +
        @@ -335,6 +335,29 @@

        Nesting of bold and italic is not supported

        +
        + +

        Themes

        + +

        Some of our themes are not compatible with certain layouts.

        + +

        Coy

        + +

        Coy's shadows and background might not wrap around the code correctly if combined with float of flexbox layouts.

        + + + +

        Workarounds

        + +

        There are 2 possible workarounds:

        + +

        The first workaround is setting display: flex-root; for the pre element. This will fix the issue but flex-root has limited browser support.

        + +

        The second is adding clear: both; to the style of the pre element. This will fix the issue but it will change the way code blocks behave when overlapping with other elements.

        + +
        + +
        From f683972e6817a436250fd7be4894faa1b374491e Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Wed, 19 Feb 2020 12:26:45 +0100 Subject: [PATCH 0444/1100] Core: Faster Token.stringify (#2171) This removes temporary arrays in `Token.stringify`. All these changes make `Prism.highlight` about 10~23% faster. --- components/prism-core.js | 38 +++++++++++++++++++++--------------- components/prism-core.min.js | 2 +- prism.js | 38 +++++++++++++++++++++--------------- 3 files changed, 45 insertions(+), 33 deletions(-) diff --git a/components/prism-core.js b/components/prism-core.js index 302ff0a6b3..10596f881c 100644 --- a/components/prism-core.js +++ b/components/prism-core.js @@ -23,11 +23,11 @@ var _ = { manual: _self.Prism && _self.Prism.manual, disableWorkerMessageHandler: _self.Prism && _self.Prism.disableWorkerMessageHandler, util: { - encode: function (tokens) { + encode: function encode(tokens) { if (tokens instanceof Token) { - return new Token(tokens.type, _.util.encode(tokens.content), tokens.alias); + return new Token(tokens.type, encode(tokens.content), tokens.alias); } else if (Array.isArray(tokens)) { - return tokens.map(_.util.encode); + return tokens.map(encode); } else { return tokens.replace(/&/g, '&').replace(/' + env.content + ''; + return '<' + env.tag + ' class="' + env.classes.join(' ') + '"' + attributes + '>' + env.content + ''; }; if (!_self.document) { diff --git a/components/prism-core.min.js b/components/prism-core.min.js index 559b1f6a95..91338d07e1 100644 --- a/components/prism-core.min.js +++ b/components/prism-core.min.js @@ -1 +1 @@ -var _self="undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{},Prism=function(u){var c=/\blang(?:uage)?-([\w-]+)\b/i,n=0,C={manual:u.Prism&&u.Prism.manual,disableWorkerMessageHandler:u.Prism&&u.Prism.disableWorkerMessageHandler,util:{encode:function(e){return e instanceof _?new _(e.type,C.util.encode(e.content),e.alias):Array.isArray(e)?e.map(C.util.encode):e.replace(/&/g,"&").replace(/e.length)return;if(!(k instanceof _)){if(h&&y!=n.length-1){if(c.lastIndex=v,!(O=c.exec(e)))break;for(var b=O.index+(f&&O[1]?O[1].length:0),w=O.index+O[0].length,A=y,P=v,x=n.length;A"+r.content+""},!u.document)return u.addEventListener&&(C.disableWorkerMessageHandler||u.addEventListener("message",function(e){var n=JSON.parse(e.data),r=n.language,t=n.code,a=n.immediateClose;u.postMessage(C.highlight(t,C.languages[r],r)),a&&u.close()},!1)),C;var e=C.util.currentScript();function r(){C.manual||C.highlightAll()}if(e&&(C.filename=e.src,e.hasAttribute("data-manual")&&(C.manual=!0)),!C.manual){var t=document.readyState;"loading"===t||"interactive"===t&&e&&e.defer?document.addEventListener("DOMContentLoaded",r):window.requestAnimationFrame?window.requestAnimationFrame(r):window.setTimeout(r,16)}return C}(_self);"undefined"!=typeof module&&module.exports&&(module.exports=Prism),"undefined"!=typeof global&&(global.Prism=Prism); \ No newline at end of file +var _self="undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{},Prism=function(u){var c=/\blang(?:uage)?-([\w-]+)\b/i,r=0,C={manual:u.Prism&&u.Prism.manual,disableWorkerMessageHandler:u.Prism&&u.Prism.disableWorkerMessageHandler,util:{encode:function e(r){return r instanceof _?new _(r.type,e(r.content),r.alias):Array.isArray(r)?r.map(e):r.replace(/&/g,"&").replace(/e.length)return;if(!(k instanceof _)){if(h&&y!=r.length-1){if(c.lastIndex=v,!(S=c.exec(e)))break;for(var b=S.index+(f&&S[1]?S[1].length:0),w=S.index+S[0].length,A=y,P=v,x=r.length;A"+a.content+""},!u.document)return u.addEventListener&&(C.disableWorkerMessageHandler||u.addEventListener("message",function(e){var r=JSON.parse(e.data),n=r.language,t=r.code,a=r.immediateClose;u.postMessage(C.highlight(t,C.languages[n],n)),a&&u.close()},!1)),C;var e=C.util.currentScript();function n(){C.manual||C.highlightAll()}if(e&&(C.filename=e.src,e.hasAttribute("data-manual")&&(C.manual=!0)),!C.manual){var t=document.readyState;"loading"===t||"interactive"===t&&e&&e.defer?document.addEventListener("DOMContentLoaded",n):window.requestAnimationFrame?window.requestAnimationFrame(n):window.setTimeout(n,16)}return C}(_self);"undefined"!=typeof module&&module.exports&&(module.exports=Prism),"undefined"!=typeof global&&(global.Prism=Prism); \ No newline at end of file diff --git a/prism.js b/prism.js index 5373ad4665..6b09145205 100644 --- a/prism.js +++ b/prism.js @@ -28,11 +28,11 @@ var _ = { manual: _self.Prism && _self.Prism.manual, disableWorkerMessageHandler: _self.Prism && _self.Prism.disableWorkerMessageHandler, util: { - encode: function (tokens) { + encode: function encode(tokens) { if (tokens instanceof Token) { - return new Token(tokens.type, _.util.encode(tokens.content), tokens.alias); + return new Token(tokens.type, encode(tokens.content), tokens.alias); } else if (Array.isArray(tokens)) { - return tokens.map(_.util.encode); + return tokens.map(encode); } else { return tokens.replace(/&/g, '&').replace(/' + env.content + ''; + return '<' + env.tag + ' class="' + env.classes.join(' ') + '"' + attributes + '>' + env.content + ''; }; if (!_self.document) { From 6124c97409e1f15f35f3aa5dcc4e6c817d9ddc43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tilo=20Pr=C3=BCtz?= Date: Wed, 19 Feb 2020 20:03:29 +0100 Subject: [PATCH 0445/1100] YAML: Fixed highlighting of anchors and aliases (#2217) --- components/prism-yaml.js | 16 +- components/prism-yaml.min.js | 2 +- .../yaml/anchor_and_alias_feature.test | 174 ++++++++++++++++++ 3 files changed, 183 insertions(+), 9 deletions(-) create mode 100644 tests/languages/yaml/anchor_and_alias_feature.test diff --git a/components/prism-yaml.js b/components/prism-yaml.js index abe2db9fc9..89a582297e 100644 --- a/components/prism-yaml.js +++ b/components/prism-yaml.js @@ -1,6 +1,6 @@ Prism.languages.yaml = { 'scalar': { - pattern: /([\-:]\s*(?:![^\s]+)?[ \t]*[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)[^\r\n]+(?:\2[^\r\n]+)*)/, + pattern: /([\-:]\s*(?:\s[!&*][^\s]+)*[ \t]*[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)[^\r\n]+(?:\2[^\r\n]+)*)/, lookbehind: true, alias: 'string' }, @@ -16,32 +16,32 @@ Prism.languages.yaml = { alias: 'important' }, 'datetime': { - pattern: /([:\-,[{]\s*(?:![^\s]+)?[ \t]*)(?:\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?)?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?)(?=[ \t]*(?:$|,|]|}))/m, + pattern: /([:\-,[{]\s*(?:\s[!&*][^\s]+)*[ \t]*)(?:\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?)?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?)(?=[ \t]*(?:$|,|]|}))/m, lookbehind: true, alias: 'number' }, 'boolean': { - pattern: /([:\-,[{]\s*(?:![^\s]+)?[ \t]*)(?:true|false)[ \t]*(?=$|,|]|})/im, + pattern: /([:\-,[{]\s*(?:\s[!&*][^\s]+)*[ \t]*)(?:true|false)[ \t]*(?=$|,|]|})/im, lookbehind: true, alias: 'important' }, 'null': { - pattern: /([:\-,[{]\s*(?:![^\s]+)?[ \t]*)(?:null|~)[ \t]*(?=$|,|]|})/im, + pattern: /([:\-,[{]\s*(?:\s[!&*][^\s]+)*[ \t]*)(?:null|~)[ \t]*(?=$|,|]|})/im, lookbehind: true, alias: 'important' }, 'string': { - pattern: /([:\-,[{]\s*(?:![^\s]+)?[ \t]*)("|')(?:(?!\2)[^\\\r\n]|\\.)*\2(?=[ \t]*(?:$|,|]|}|\s*#))/m, + pattern: /([:\-,[{]\s*(?:\s[!&*][^\s]+)*[ \t]*)("|')(?:(?!\2)[^\\\r\n]|\\.)*\2(?=[ \t]*(?:$|,|]|}|\s*#))/m, lookbehind: true, greedy: true }, 'number': { - pattern: /([:\-,[{]\s*(?:![^\s]+)?[ \t]*)[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+\.?\d*|\.?\d+)(?:e[+-]?\d+)?|\.inf|\.nan)[ \t]*(?=$|,|]|})/im, + pattern: /([:\-,[{]\s*(?:\s[!&*][^\s]+)*[ \t]*)[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+\.?\d*|\.?\d+)(?:e[+-]?\d+)?|\.inf|\.nan)[ \t]*(?=$|,|]|})/im, lookbehind: true }, 'tag': /![^\s]+/, - 'important': /[&*][\w]+/, + 'important': /[&*][^\s\[\]{},]+/, 'punctuation': /---|[:[\]{}\-,|>?]|\.\.\./ }; -Prism.languages.yml = Prism.languages.yaml; \ No newline at end of file +Prism.languages.yml = Prism.languages.yaml; diff --git a/components/prism-yaml.min.js b/components/prism-yaml.min.js index 1a6fb682ff..c831047ee3 100644 --- a/components/prism-yaml.min.js +++ b/components/prism-yaml.min.js @@ -1 +1 @@ -Prism.languages.yaml={scalar:{pattern:/([\-:]\s*(?:![^\s]+)?[ \t]*[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)[^\r\n]+(?:\2[^\r\n]+)*)/,lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:/(\s*(?:^|[:\-,[{\r\n?])[ \t]*(?:![^\s]+)?[ \t]*)[^\r\n{[\]},#\s]+?(?=\s*:\s)/,lookbehind:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:/([:\-,[{]\s*(?:![^\s]+)?[ \t]*)(?:\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?)?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?)(?=[ \t]*(?:$|,|]|}))/m,lookbehind:!0,alias:"number"},boolean:{pattern:/([:\-,[{]\s*(?:![^\s]+)?[ \t]*)(?:true|false)[ \t]*(?=$|,|]|})/im,lookbehind:!0,alias:"important"},null:{pattern:/([:\-,[{]\s*(?:![^\s]+)?[ \t]*)(?:null|~)[ \t]*(?=$|,|]|})/im,lookbehind:!0,alias:"important"},string:{pattern:/([:\-,[{]\s*(?:![^\s]+)?[ \t]*)("|')(?:(?!\2)[^\\\r\n]|\\.)*\2(?=[ \t]*(?:$|,|]|}|\s*#))/m,lookbehind:!0,greedy:!0},number:{pattern:/([:\-,[{]\s*(?:![^\s]+)?[ \t]*)[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+\.?\d*|\.?\d+)(?:e[+-]?\d+)?|\.inf|\.nan)[ \t]*(?=$|,|]|})/im,lookbehind:!0},tag:/![^\s]+/,important:/[&*][\w]+/,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},Prism.languages.yml=Prism.languages.yaml; \ No newline at end of file +Prism.languages.yaml={scalar:{pattern:/([\-:]\s*(?:\s[!&*][^\s]+)*[ \t]*[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)[^\r\n]+(?:\2[^\r\n]+)*)/,lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:/(\s*(?:^|[:\-,[{\r\n?])[ \t]*(?:![^\s]+)?[ \t]*)[^\r\n{[\]},#\s]+?(?=\s*:\s)/,lookbehind:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:/([:\-,[{]\s*(?:\s[!&*][^\s]+)*[ \t]*)(?:\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?)?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?)(?=[ \t]*(?:$|,|]|}))/m,lookbehind:!0,alias:"number"},boolean:{pattern:/([:\-,[{]\s*(?:\s[!&*][^\s]+)*[ \t]*)(?:true|false)[ \t]*(?=$|,|]|})/im,lookbehind:!0,alias:"important"},null:{pattern:/([:\-,[{]\s*(?:\s[!&*][^\s]+)*[ \t]*)(?:null|~)[ \t]*(?=$|,|]|})/im,lookbehind:!0,alias:"important"},string:{pattern:/([:\-,[{]\s*(?:\s[!&*][^\s]+)*[ \t]*)("|')(?:(?!\2)[^\\\r\n]|\\.)*\2(?=[ \t]*(?:$|,|]|}|\s*#))/m,lookbehind:!0,greedy:!0},number:{pattern:/([:\-,[{]\s*(?:\s[!&*][^\s]+)*[ \t]*)[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+\.?\d*|\.?\d+)(?:e[+-]?\d+)?|\.inf|\.nan)[ \t]*(?=$|,|]|})/im,lookbehind:!0},tag:/![^\s]+/,important:/[&*][^\s\[\]{},]+/,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},Prism.languages.yml=Prism.languages.yaml; \ No newline at end of file diff --git a/tests/languages/yaml/anchor_and_alias_feature.test b/tests/languages/yaml/anchor_and_alias_feature.test new file mode 100644 index 0000000000..06db5862b1 --- /dev/null +++ b/tests/languages/yaml/anchor_and_alias_feature.test @@ -0,0 +1,174 @@ +x-number: &num-ber 13 +x-string: &stri_ng "good" +x-null: &nu-ll null +x-boolean: &boo-lean true +x-datetime: &date-time 2001-12-15T02:59:43.1Z +x-scalar: &sca-lar | + foo + bar + +x-utf8: &アンカー "japanese anchor" + +x-tag-string: &tag-string !!tag-string "13" +x-tag-number: &tag-number !!tag-number 42 +x-tag-null: &tag-null !!tag-null null +x-tag-boolean: &tag-bool !!tag-bool true +x-tag-datetime: &tag-date !!tag-date 2001-12-15T02:59:43.1Z +x-tag-scalar: &tag-scalar !!tag-scalar | + foo + bar + +x-tag-string: !!tag-string &tag-string "13" +x-tag-number: !!tag-number &tag-number 42 +x-tag-null: !!tag-null &tag-null null +x-tag-boolean: !!tag-bool &tag-bool true +x-tag-datetime: !!tag-date &tag-date 2001-12-15T02:59:43.1Z +x-tag-scalar: !!tag-scalar &tag-scalar | + foo + bar + +foobar: *num-ber +fubar: *stri_ng +japanese: *アンカー +taga: *tag-a !!taga +tagb: !!tagb *tag-b + +---------------------------------------------------- + +[ + ["key", "x-number"], + ["punctuation", ":"], + ["important", "&num-ber"], + ["number", "13"], + + ["key", "x-string"], + ["punctuation", ":"], + ["important", "&stri_ng"], + ["string", "\"good\""], + + ["key", "x-null"], + ["punctuation", ":"], + ["important", "&nu-ll"], + ["null", "null"], + + ["key", "x-boolean"], + ["punctuation", ":"], + ["important", "&boo-lean"], + ["boolean", "true"], + + ["key", "x-datetime"], + ["punctuation", ":"], + ["important", "&date-time"], + ["datetime", "2001-12-15T02:59:43.1Z"], + + ["key", "x-scalar"], + ["punctuation", ":"], + ["important", "&sca-lar"], + ["punctuation", "|"], + ["scalar", "\n foo\n bar"], + + ["key", "x-utf8"], + ["punctuation", ":"], + ["important", "&アンカー"], + ["string", "\"japanese anchor\""], + + ["key", "x-tag-string"], + ["punctuation", ":"], + ["important", "&tag-string"], + ["tag", "!!tag-string"], + ["string", "\"13\""], + + ["key", "x-tag-number"], + ["punctuation", ":"], + ["important", "&tag-number"], + ["tag", "!!tag-number"], + ["number", "42"], + + ["key", "x-tag-null"], + ["punctuation", ":"], + ["important", "&tag-null"], + ["tag", "!!tag-null"], + ["null", "null"], + + ["key", "x-tag-boolean"], + ["punctuation", ":"], + ["important", "&tag-bool"], + ["tag", "!!tag-bool"], + ["boolean", "true"], + + ["key", "x-tag-datetime"], + ["punctuation", ":"], + ["important", "&tag-date"], + ["tag", "!!tag-date"], + ["datetime", "2001-12-15T02:59:43.1Z"], + + ["key", "x-tag-scalar"], + ["punctuation", ":"], + ["important", "&tag-scalar"], + ["tag", "!!tag-scalar"], + ["punctuation", "|"], + ["scalar", "\n foo\n bar"], + + ["key", "x-tag-string"], + ["punctuation", ":"], + ["tag", "!!tag-string"], + ["important", "&tag-string"], + ["string", "\"13\""], + + ["key", "x-tag-number"], + ["punctuation", ":"], + ["tag", "!!tag-number"], + ["important", "&tag-number"], + ["number", "42"], + + ["key", "x-tag-null"], + ["punctuation", ":"], + ["tag", "!!tag-null"], + ["important", "&tag-null"], + ["null", "null"], + + ["key", "x-tag-boolean"], + ["punctuation", ":"], + ["tag", "!!tag-bool"], + ["important", "&tag-bool"], + ["boolean", "true"], + + ["key", "x-tag-datetime"], + ["punctuation", ":"], + ["tag", "!!tag-date"], + ["important", "&tag-date"], + ["datetime", "2001-12-15T02:59:43.1Z"], + + ["key", "x-tag-scalar"], + ["punctuation", ":"], + ["tag", "!!tag-scalar"], + ["important", "&tag-scalar"], + ["punctuation", "|"], + ["scalar", "\n foo\n bar"], + + ["key", "foobar"], + ["punctuation", ":"], + ["important", "*num-ber"], + + ["key", "fubar"], + ["punctuation", ":"], + ["important", "*stri_ng"], + + ["key", "japanese"], + ["punctuation", ":"], + ["important", "*アンカー"], + + ["key", "taga"], + ["punctuation", ":"], + ["important", "*tag-a"], + ["tag", "!!taga"], + + ["key", "tagb"], + ["punctuation", ":"], + ["tag", "!!tagb"], + ["important", "*tag-b"] +] + +---------------------------------------------------- + +Checks for anchors and aliases. From c5de5aa86b27a77d7f66db5d9128f2f8f9fe8b25 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Fri, 21 Feb 2020 13:04:52 +0100 Subject: [PATCH 0446/1100] Ruby: Fixed exponential backtracking (#2225) This fixes the exponential backtracking in one of Ruby's regex patterns. --- components/prism-ruby.js | 20 ++++++++++---------- components/prism-ruby.min.js | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/components/prism-ruby.js b/components/prism-ruby.js index 0e4cce4fac..6311122afa 100644 --- a/components/prism-ruby.js +++ b/components/prism-ruby.js @@ -2,9 +2,9 @@ * Original by Samuel Flores * * Adds the following new token classes: - * constant, builtin, variable, symbol, regex + * constant, builtin, variable, symbol, regex */ -(function(Prism) { +(function (Prism) { Prism.languages.ruby = Prism.languages.extend('clike', { 'comment': [ /#.*/, @@ -13,13 +13,13 @@ greedy: true } ], - 'class-name': { - pattern: /(\b(?:class)\s+|\bcatch\s+\()[\w.\\]+/i, - lookbehind: true, - inside: { - 'punctuation': /[.\\]/ - } - }, + 'class-name': { + pattern: /(\b(?:class)\s+|\bcatch\s+\()[\w.\\]+/i, + lookbehind: true, + inside: { + 'punctuation': /[.\\]/ + } + }, 'keyword': /\b(?:alias|and|BEGIN|begin|break|case|class|def|define_method|defined|do|each|else|elsif|END|end|ensure|extend|for|if|in|include|module|new|next|nil|not|or|prepend|protected|private|public|raise|redo|require|rescue|retry|return|self|super|then|throw|undef|unless|until|when|while|yield)\b/ }); @@ -75,7 +75,7 @@ } }, { - pattern: /(^|[^/])\/(?!\/)(?:\[.+?]|\\.|[^/\\\r\n])+\/[gim]{0,3}(?=\s*(?:$|[\r\n,.;})]))/, + pattern: /(^|[^/])\/(?!\/)(?:\[[^\r\n\]]+\]|\\.|[^[/\\\r\n])+\/[gim]{0,3}(?=\s*(?:$|[\r\n,.;})]))/, lookbehind: true, greedy: true } diff --git a/components/prism-ruby.min.js b/components/prism-ruby.min.js index 022abeb371..8b2fcb8187 100644 --- a/components/prism-ruby.min.js +++ b/components/prism-ruby.min.js @@ -1 +1 @@ -!function(e){e.languages.ruby=e.languages.extend("clike",{comment:[/#.*/,{pattern:/^=begin\s[\s\S]*?^=end/m,greedy:!0}],"class-name":{pattern:/(\b(?:class)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:alias|and|BEGIN|begin|break|case|class|def|define_method|defined|do|each|else|elsif|END|end|ensure|extend|for|if|in|include|module|new|next|nil|not|or|prepend|protected|private|public|raise|redo|require|rescue|retry|return|self|super|then|throw|undef|unless|until|when|while|yield)\b/});var n={pattern:/#\{[^}]+\}/,inside:{delimiter:{pattern:/^#\{|\}$/,alias:"tag"},rest:e.languages.ruby}};delete e.languages.ruby.function,e.languages.insertBefore("ruby","keyword",{regex:[{pattern:/%r([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1[gim]{0,3}/,greedy:!0,inside:{interpolation:n}},{pattern:/%r\((?:[^()\\]|\\[\s\S])*\)[gim]{0,3}/,greedy:!0,inside:{interpolation:n}},{pattern:/%r\{(?:[^#{}\\]|#(?:\{[^}]+\})?|\\[\s\S])*\}[gim]{0,3}/,greedy:!0,inside:{interpolation:n}},{pattern:/%r\[(?:[^\[\]\\]|\\[\s\S])*\][gim]{0,3}/,greedy:!0,inside:{interpolation:n}},{pattern:/%r<(?:[^<>\\]|\\[\s\S])*>[gim]{0,3}/,greedy:!0,inside:{interpolation:n}},{pattern:/(^|[^/])\/(?!\/)(?:\[.+?]|\\.|[^/\\\r\n])+\/[gim]{0,3}(?=\s*(?:$|[\r\n,.;})]))/,lookbehind:!0,greedy:!0}],variable:/[@$]+[a-zA-Z_]\w*(?:[?!]|\b)/,symbol:{pattern:/(^|[^:]):[a-zA-Z_]\w*(?:[?!]|\b)/,lookbehind:!0},"method-definition":{pattern:/(\bdef\s+)[\w.]+/,lookbehind:!0,inside:{function:/\w+$/,rest:e.languages.ruby}}}),e.languages.insertBefore("ruby","number",{builtin:/\b(?:Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Stat|Fixnum|Float|Hash|Integer|IO|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|String|Struct|TMS|Symbol|ThreadGroup|Thread|Time|TrueClass)\b/,constant:/\b[A-Z]\w*(?:[?!]|\b)/}),e.languages.ruby.string=[{pattern:/%[qQiIwWxs]?([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1/,greedy:!0,inside:{interpolation:n}},{pattern:/%[qQiIwWxs]?\((?:[^()\\]|\\[\s\S])*\)/,greedy:!0,inside:{interpolation:n}},{pattern:/%[qQiIwWxs]?\{(?:[^#{}\\]|#(?:\{[^}]+\})?|\\[\s\S])*\}/,greedy:!0,inside:{interpolation:n}},{pattern:/%[qQiIwWxs]?\[(?:[^\[\]\\]|\\[\s\S])*\]/,greedy:!0,inside:{interpolation:n}},{pattern:/%[qQiIwWxs]?<(?:[^<>\\]|\\[\s\S])*>/,greedy:!0,inside:{interpolation:n}},{pattern:/("|')(?:#\{[^}]+\}|\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0,inside:{interpolation:n}}],e.languages.rb=e.languages.ruby}(Prism); \ No newline at end of file +!function(e){e.languages.ruby=e.languages.extend("clike",{comment:[/#.*/,{pattern:/^=begin\s[\s\S]*?^=end/m,greedy:!0}],"class-name":{pattern:/(\b(?:class)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:alias|and|BEGIN|begin|break|case|class|def|define_method|defined|do|each|else|elsif|END|end|ensure|extend|for|if|in|include|module|new|next|nil|not|or|prepend|protected|private|public|raise|redo|require|rescue|retry|return|self|super|then|throw|undef|unless|until|when|while|yield)\b/});var n={pattern:/#\{[^}]+\}/,inside:{delimiter:{pattern:/^#\{|\}$/,alias:"tag"},rest:e.languages.ruby}};delete e.languages.ruby.function,e.languages.insertBefore("ruby","keyword",{regex:[{pattern:/%r([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1[gim]{0,3}/,greedy:!0,inside:{interpolation:n}},{pattern:/%r\((?:[^()\\]|\\[\s\S])*\)[gim]{0,3}/,greedy:!0,inside:{interpolation:n}},{pattern:/%r\{(?:[^#{}\\]|#(?:\{[^}]+\})?|\\[\s\S])*\}[gim]{0,3}/,greedy:!0,inside:{interpolation:n}},{pattern:/%r\[(?:[^\[\]\\]|\\[\s\S])*\][gim]{0,3}/,greedy:!0,inside:{interpolation:n}},{pattern:/%r<(?:[^<>\\]|\\[\s\S])*>[gim]{0,3}/,greedy:!0,inside:{interpolation:n}},{pattern:/(^|[^/])\/(?!\/)(?:\[[^\r\n\]]+\]|\\.|[^[/\\\r\n])+\/[gim]{0,3}(?=\s*(?:$|[\r\n,.;})]))/,lookbehind:!0,greedy:!0}],variable:/[@$]+[a-zA-Z_]\w*(?:[?!]|\b)/,symbol:{pattern:/(^|[^:]):[a-zA-Z_]\w*(?:[?!]|\b)/,lookbehind:!0},"method-definition":{pattern:/(\bdef\s+)[\w.]+/,lookbehind:!0,inside:{function:/\w+$/,rest:e.languages.ruby}}}),e.languages.insertBefore("ruby","number",{builtin:/\b(?:Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Stat|Fixnum|Float|Hash|Integer|IO|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|String|Struct|TMS|Symbol|ThreadGroup|Thread|Time|TrueClass)\b/,constant:/\b[A-Z]\w*(?:[?!]|\b)/}),e.languages.ruby.string=[{pattern:/%[qQiIwWxs]?([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1/,greedy:!0,inside:{interpolation:n}},{pattern:/%[qQiIwWxs]?\((?:[^()\\]|\\[\s\S])*\)/,greedy:!0,inside:{interpolation:n}},{pattern:/%[qQiIwWxs]?\{(?:[^#{}\\]|#(?:\{[^}]+\})?|\\[\s\S])*\}/,greedy:!0,inside:{interpolation:n}},{pattern:/%[qQiIwWxs]?\[(?:[^\[\]\\]|\\[\s\S])*\]/,greedy:!0,inside:{interpolation:n}},{pattern:/%[qQiIwWxs]?<(?:[^<>\\]|\\[\s\S])*>/,greedy:!0,inside:{interpolation:n}},{pattern:/("|')(?:#\{[^}]+\}|\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0,inside:{interpolation:n}}],e.languages.rb=e.languages.ruby}(Prism); \ No newline at end of file From 5362ba16e93edf8d7dd3b3efc1dcd4529116cfa1 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Sun, 23 Feb 2020 14:06:24 +0100 Subject: [PATCH 0447/1100] YAML: Improvements (#2226) The patterns for tags, anchors, and aliases and their usage in other patterns are improved to match the YAML spec as close as possible. --- components/prism-yaml.js | 121 ++++++----- components/prism-yaml.min.js | 2 +- .../yaml/anchor_and_alias_feature.test | 195 ++++++++++-------- tests/languages/yaml/tag_feature.test | 81 +++++++- 4 files changed, 263 insertions(+), 136 deletions(-) diff --git a/components/prism-yaml.js b/components/prism-yaml.js index 89a582297e..ae66649118 100644 --- a/components/prism-yaml.js +++ b/components/prism-yaml.js @@ -1,47 +1,76 @@ -Prism.languages.yaml = { - 'scalar': { - pattern: /([\-:]\s*(?:\s[!&*][^\s]+)*[ \t]*[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)[^\r\n]+(?:\2[^\r\n]+)*)/, - lookbehind: true, - alias: 'string' - }, - 'comment': /#.*/, - 'key': { - pattern: /(\s*(?:^|[:\-,[{\r\n?])[ \t]*(?:![^\s]+)?[ \t]*)[^\r\n{[\]},#\s]+?(?=\s*:\s)/, - lookbehind: true, - alias: 'atrule' - }, - 'directive': { - pattern: /(^[ \t]*)%.+/m, - lookbehind: true, - alias: 'important' - }, - 'datetime': { - pattern: /([:\-,[{]\s*(?:\s[!&*][^\s]+)*[ \t]*)(?:\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?)?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?)(?=[ \t]*(?:$|,|]|}))/m, - lookbehind: true, - alias: 'number' - }, - 'boolean': { - pattern: /([:\-,[{]\s*(?:\s[!&*][^\s]+)*[ \t]*)(?:true|false)[ \t]*(?=$|,|]|})/im, - lookbehind: true, - alias: 'important' - }, - 'null': { - pattern: /([:\-,[{]\s*(?:\s[!&*][^\s]+)*[ \t]*)(?:null|~)[ \t]*(?=$|,|]|})/im, - lookbehind: true, - alias: 'important' - }, - 'string': { - pattern: /([:\-,[{]\s*(?:\s[!&*][^\s]+)*[ \t]*)("|')(?:(?!\2)[^\\\r\n]|\\.)*\2(?=[ \t]*(?:$|,|]|}|\s*#))/m, - lookbehind: true, - greedy: true - }, - 'number': { - pattern: /([:\-,[{]\s*(?:\s[!&*][^\s]+)*[ \t]*)[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+\.?\d*|\.?\d+)(?:e[+-]?\d+)?|\.inf|\.nan)[ \t]*(?=$|,|]|})/im, - lookbehind: true - }, - 'tag': /![^\s]+/, - 'important': /[&*][^\s\[\]{},]+/, - 'punctuation': /---|[:[\]{}\-,|>?]|\.\.\./ -}; +(function (Prism) { -Prism.languages.yml = Prism.languages.yaml; + // https://yaml.org/spec/1.2/spec.html#c-ns-anchor-property + // https://yaml.org/spec/1.2/spec.html#c-ns-alias-node + var anchorOrAlias = /[*&][^\s[\]{},]+/; + // https://yaml.org/spec/1.2/spec.html#c-ns-tag-property + var tag = /!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/; + // https://yaml.org/spec/1.2/spec.html#c-ns-properties(n,c) + var properties = '(?:' + tag.source + '(?:[ \t]+' + anchorOrAlias.source + ')?|' + + anchorOrAlias.source + '(?:[ \t]+' + tag.source + ')?)'; + + /** + * + * @param {string} value + * @param {string} [flags] + * @returns {RegExp} + */ + function createValuePattern(value, flags) { + flags = (flags || '').replace(/m/g, '') + 'm'; // add m flag + var pattern = /([:\-,[{]\s*(?:\s<>[ \t]+)?)(?:<>)(?=[ \t]*(?:$|,|]|}|\s*#))/.source + .replace(/<>/g, properties).replace(/<>/g, value); + return RegExp(pattern, flags) + } + + Prism.languages.yaml = { + 'scalar': { + pattern: RegExp(/([\-:]\s*(?:\s<>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)[^\r\n]+(?:\2[^\r\n]+)*)/.source + .replace(/<>/g, properties)), + lookbehind: true, + alias: 'string' + }, + 'comment': /#.*/, + 'key': { + pattern: RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<>[ \t]+)?)[^\r\n{[\]},#\s]+?(?=\s*:\s)/.source + .replace(/<>/g, properties)), + lookbehind: true, + alias: 'atrule' + }, + 'directive': { + pattern: /(^[ \t]*)%.+/m, + lookbehind: true, + alias: 'important' + }, + 'datetime': { + pattern: createValuePattern(/\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?)?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?/.source), + lookbehind: true, + alias: 'number' + }, + 'boolean': { + pattern: createValuePattern(/true|false/.source, 'i'), + lookbehind: true, + alias: 'important' + }, + 'null': { + pattern: createValuePattern(/null|~/.source, 'i'), + lookbehind: true, + alias: 'important' + }, + 'string': { + // \2 because of the lookbehind group + pattern: createValuePattern(/("|')(?:(?!\2)[^\\\r\n]|\\.)*\2/.source), + lookbehind: true, + greedy: true + }, + 'number': { + pattern: createValuePattern(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+\.?\d*|\.?\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source, 'i'), + lookbehind: true + }, + 'tag': tag, + 'important': anchorOrAlias, + 'punctuation': /---|[:[\]{}\-,|>?]|\.\.\./ + }; + + Prism.languages.yml = Prism.languages.yaml; + +}(Prism)); diff --git a/components/prism-yaml.min.js b/components/prism-yaml.min.js index c831047ee3..145f8f4424 100644 --- a/components/prism-yaml.min.js +++ b/components/prism-yaml.min.js @@ -1 +1 @@ -Prism.languages.yaml={scalar:{pattern:/([\-:]\s*(?:\s[!&*][^\s]+)*[ \t]*[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)[^\r\n]+(?:\2[^\r\n]+)*)/,lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:/(\s*(?:^|[:\-,[{\r\n?])[ \t]*(?:![^\s]+)?[ \t]*)[^\r\n{[\]},#\s]+?(?=\s*:\s)/,lookbehind:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:/([:\-,[{]\s*(?:\s[!&*][^\s]+)*[ \t]*)(?:\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?)?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?)(?=[ \t]*(?:$|,|]|}))/m,lookbehind:!0,alias:"number"},boolean:{pattern:/([:\-,[{]\s*(?:\s[!&*][^\s]+)*[ \t]*)(?:true|false)[ \t]*(?=$|,|]|})/im,lookbehind:!0,alias:"important"},null:{pattern:/([:\-,[{]\s*(?:\s[!&*][^\s]+)*[ \t]*)(?:null|~)[ \t]*(?=$|,|]|})/im,lookbehind:!0,alias:"important"},string:{pattern:/([:\-,[{]\s*(?:\s[!&*][^\s]+)*[ \t]*)("|')(?:(?!\2)[^\\\r\n]|\\.)*\2(?=[ \t]*(?:$|,|]|}|\s*#))/m,lookbehind:!0,greedy:!0},number:{pattern:/([:\-,[{]\s*(?:\s[!&*][^\s]+)*[ \t]*)[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+\.?\d*|\.?\d+)(?:e[+-]?\d+)?|\.inf|\.nan)[ \t]*(?=$|,|]|})/im,lookbehind:!0},tag:/![^\s]+/,important:/[&*][^\s\[\]{},]+/,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},Prism.languages.yml=Prism.languages.yaml; \ No newline at end of file +!function(e){var a=/[*&][^\s[\]{},]+/,t=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,r="(?:"+t.source+"(?:[ \t]+"+a.source+")?|"+a.source+"(?:[ \t]+"+t.source+")?)";function n(e,a){a=(a||"").replace(/m/g,"")+"m";var t="([:\\-,[{]\\s*(?:\\s<>[ \t]+)?)(?:<>)(?=[ \t]*(?:$|,|]|}|\\s*#))".replace(/<>/g,r).replace(/<>/g,e);return RegExp(t,a)}e.languages.yaml={scalar:{pattern:RegExp("([\\-:]\\s*(?:\\s<>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)[^\r\\n]+(?:\\2[^\r\\n]+)*)".replace(/<>/g,r)),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp("((?:^|[:\\-,[{\r\\n?])[ \t]*(?:<>[ \t]+)?)[^\r\\n{[\\]},#\\s]+?(?=\\s*:\\s)".replace(/<>/g,r)),lookbehind:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:n("\\d{4}-\\d\\d?-\\d\\d?(?:[tT]|[ \t]+)\\d\\d?:\\d{2}:\\d{2}(?:\\.\\d*)?[ \t]*(?:Z|[-+]\\d\\d?(?::\\d{2})?)?|\\d{4}-\\d{2}-\\d{2}|\\d\\d?:\\d{2}(?::\\d{2}(?:\\.\\d*)?)?"),lookbehind:!0,alias:"number"},boolean:{pattern:n("true|false","i"),lookbehind:!0,alias:"important"},null:{pattern:n("null|~","i"),lookbehind:!0,alias:"important"},string:{pattern:n("(\"|')(?:(?!\\2)[^\\\\\\r\n]|\\\\.)*\\2"),lookbehind:!0,greedy:!0},number:{pattern:n("[+-]?(?:0x[\\da-f]+|0o[0-7]+|(?:\\d+\\.?\\d*|\\.?\\d+)(?:e[+-]?\\d+)?|\\.inf|\\.nan)","i"),lookbehind:!0},tag:t,important:a,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},e.languages.yml=e.languages.yaml}(Prism); \ No newline at end of file diff --git a/tests/languages/yaml/anchor_and_alias_feature.test b/tests/languages/yaml/anchor_and_alias_feature.test index 06db5862b1..eb70cb9b88 100644 --- a/tests/languages/yaml/anchor_and_alias_feature.test +++ b/tests/languages/yaml/anchor_and_alias_feature.test @@ -4,8 +4,8 @@ x-null: &nu-ll null x-boolean: &boo-lean true x-datetime: &date-time 2001-12-15T02:59:43.1Z x-scalar: &sca-lar | - foo - bar + foo + bar x-utf8: &アンカー "japanese anchor" @@ -15,8 +15,8 @@ x-tag-null: &tag-null !!tag-null null x-tag-boolean: &tag-bool !!tag-bool true x-tag-datetime: &tag-date !!tag-date 2001-12-15T02:59:43.1Z x-tag-scalar: &tag-scalar !!tag-scalar | - foo - bar + foo + bar x-tag-string: !!tag-string &tag-string "13" x-tag-number: !!tag-number &tag-number 42 @@ -24,8 +24,8 @@ x-tag-null: !!tag-null &tag-null null x-tag-boolean: !!tag-bool &tag-bool true x-tag-datetime: !!tag-date &tag-date 2001-12-15T02:59:43.1Z x-tag-scalar: !!tag-scalar &tag-scalar | - foo - bar + foo + bar foobar: *num-ber fubar: *stri_ng @@ -33,140 +33,161 @@ japanese: *アンカー taga: *tag-a !!taga tagb: !!tagb *tag-b +# https://yaml.org/spec/1.2/spec.html#id2783797 + +!!str &a1 "foo": + !!str bar +&a2 baz : *a1 + ---------------------------------------------------- [ ["key", "x-number"], ["punctuation", ":"], ["important", "&num-ber"], - ["number", "13"], + ["number", "13"], ["key", "x-string"], ["punctuation", ":"], ["important", "&stri_ng"], - ["string", "\"good\""], + ["string", "\"good\""], - ["key", "x-null"], + ["key", "x-null"], ["punctuation", ":"], ["important", "&nu-ll"], - ["null", "null"], + ["null", "null"], - ["key", "x-boolean"], + ["key", "x-boolean"], ["punctuation", ":"], ["important", "&boo-lean"], - ["boolean", "true"], + ["boolean", "true"], - ["key", "x-datetime"], + ["key", "x-datetime"], ["punctuation", ":"], ["important", "&date-time"], - ["datetime", "2001-12-15T02:59:43.1Z"], + ["datetime", "2001-12-15T02:59:43.1Z"], - ["key", "x-scalar"], + ["key", "x-scalar"], ["punctuation", ":"], ["important", "&sca-lar"], - ["punctuation", "|"], - ["scalar", "\n foo\n bar"], + ["punctuation", "|"], + ["scalar", "\n\tfoo\n\tbar"], - ["key", "x-utf8"], + ["key", "x-utf8"], ["punctuation", ":"], ["important", "&アンカー"], - ["string", "\"japanese anchor\""], + ["string", "\"japanese anchor\""], - ["key", "x-tag-string"], - ["punctuation", ":"], - ["important", "&tag-string"], - ["tag", "!!tag-string"], - ["string", "\"13\""], + ["key", "x-tag-string"], + ["punctuation", ":"], + ["important", "&tag-string"], + ["tag", "!!tag-string"], + ["string", "\"13\""], - ["key", "x-tag-number"], - ["punctuation", ":"], - ["important", "&tag-number"], - ["tag", "!!tag-number"], - ["number", "42"], + ["key", "x-tag-number"], + ["punctuation", ":"], + ["important", "&tag-number"], + ["tag", "!!tag-number"], + ["number", "42"], - ["key", "x-tag-null"], + ["key", "x-tag-null"], ["punctuation", ":"], ["important", "&tag-null"], - ["tag", "!!tag-null"], - ["null", "null"], + ["tag", "!!tag-null"], + ["null", "null"], - ["key", "x-tag-boolean"], + ["key", "x-tag-boolean"], ["punctuation", ":"], ["important", "&tag-bool"], - ["tag", "!!tag-bool"], - ["boolean", "true"], + ["tag", "!!tag-bool"], + ["boolean", "true"], - ["key", "x-tag-datetime"], + ["key", "x-tag-datetime"], ["punctuation", ":"], ["important", "&tag-date"], - ["tag", "!!tag-date"], - ["datetime", "2001-12-15T02:59:43.1Z"], + ["tag", "!!tag-date"], + ["datetime", "2001-12-15T02:59:43.1Z"], - ["key", "x-tag-scalar"], + ["key", "x-tag-scalar"], ["punctuation", ":"], ["important", "&tag-scalar"], - ["tag", "!!tag-scalar"], - ["punctuation", "|"], - ["scalar", "\n foo\n bar"], + ["tag", "!!tag-scalar"], + ["punctuation", "|"], + ["scalar", "\n\tfoo\n\tbar"], - ["key", "x-tag-string"], - ["punctuation", ":"], - ["tag", "!!tag-string"], - ["important", "&tag-string"], - ["string", "\"13\""], + ["key", "x-tag-string"], + ["punctuation", ":"], + ["tag", "!!tag-string"], + ["important", "&tag-string"], + ["string", "\"13\""], - ["key", "x-tag-number"], - ["punctuation", ":"], - ["tag", "!!tag-number"], - ["important", "&tag-number"], - ["number", "42"], + ["key", "x-tag-number"], + ["punctuation", ":"], + ["tag", "!!tag-number"], + ["important", "&tag-number"], + ["number", "42"], - ["key", "x-tag-null"], + ["key", "x-tag-null"], ["punctuation", ":"], - ["tag", "!!tag-null"], + ["tag", "!!tag-null"], ["important", "&tag-null"], - ["null", "null"], + ["null", "null"], - ["key", "x-tag-boolean"], + ["key", "x-tag-boolean"], ["punctuation", ":"], - ["tag", "!!tag-bool"], + ["tag", "!!tag-bool"], ["important", "&tag-bool"], - ["boolean", "true"], + ["boolean", "true"], - ["key", "x-tag-datetime"], + ["key", "x-tag-datetime"], ["punctuation", ":"], - ["tag", "!!tag-date"], + ["tag", "!!tag-date"], ["important", "&tag-date"], - ["datetime", "2001-12-15T02:59:43.1Z"], + ["datetime", "2001-12-15T02:59:43.1Z"], - ["key", "x-tag-scalar"], + ["key", "x-tag-scalar"], ["punctuation", ":"], - ["tag", "!!tag-scalar"], + ["tag", "!!tag-scalar"], ["important", "&tag-scalar"], - ["punctuation", "|"], - ["scalar", "\n foo\n bar"], - - ["key", "foobar"], - ["punctuation", ":"], - ["important", "*num-ber"], - - ["key", "fubar"], - ["punctuation", ":"], - ["important", "*stri_ng"], - - ["key", "japanese"], - ["punctuation", ":"], - ["important", "*アンカー"], - - ["key", "taga"], - ["punctuation", ":"], - ["important", "*tag-a"], - ["tag", "!!taga"], - - ["key", "tagb"], - ["punctuation", ":"], - ["tag", "!!tagb"], - ["important", "*tag-b"] + ["punctuation", "|"], + ["scalar", "\n\tfoo\n\tbar"], + + ["key", "foobar"], + ["punctuation", ":"], + ["important", "*num-ber"], + + ["key", "fubar"], + ["punctuation", ":"], + ["important", "*stri_ng"], + + ["key", "japanese"], + ["punctuation", ":"], + ["important", "*アンカー"], + + ["key", "taga"], + ["punctuation", ":"], + ["important", "*tag-a"], + ["tag", "!!taga"], + + ["key", "tagb"], + ["punctuation", ":"], + ["tag", "!!tagb"], + ["important", "*tag-b"], + + ["comment", "# https://yaml.org/spec/1.2/spec.html#id2783797"], + + ["tag", "!!str"], + ["important", "&a1"], + ["key", "\"foo\""], + ["punctuation", ":"], + + ["tag", "!!str"], + " bar\n", + + ["important", "&a2"], + ["key", "baz"], + ["punctuation", ":"], + ["important", "*a1"] ] ---------------------------------------------------- diff --git a/tests/languages/yaml/tag_feature.test b/tests/languages/yaml/tag_feature.test index 8924b3a2d1..7c535790da 100644 --- a/tests/languages/yaml/tag_feature.test +++ b/tests/languages/yaml/tag_feature.test @@ -2,14 +2,91 @@ !!str !!seq +# https://yaml.org/spec/1.2/spec.html#c-ns-tag-property + +! foo : ! baz + +- !local foo +- !!str bar +- !e!tag%21 baz + +!!seq [ + ! "foo", + ! "bar", + ! "baz" +] + +# Assuming conventional resolution: +- "12" +- 12 +- ! 12 + +!!seq [ + ! "12", + ! "12", + ! "12", +] + ---------------------------------------------------- [ ["tag", "!!map"], ["tag", "!!str"], - ["tag", "!!seq"] + ["tag", "!!seq"], + + ["comment", "# https://yaml.org/spec/1.2/spec.html#c-ns-tag-property"], + + ["tag", "!"], + ["key", "foo"], + ["punctuation", ":"], + ["tag", "!"], + " baz\r\n\r\n", + + ["punctuation", "-"], + ["tag", "!local"], + " foo\r\n", + ["punctuation", "-"], + ["tag", "!!str"], + " bar\r\n", + ["punctuation", "-"], + ["tag", "!e!tag%21"], + " baz\r\n\r\n", + + ["tag", "!!seq"], + ["punctuation", "["], + ["tag", "!"], + ["string", "\"foo\""], + ["punctuation", ","], + ["tag", "!"], + ["string", "\"bar\""], + ["punctuation", ","], + ["tag", "!"], + ["string", "\"baz\""], + ["punctuation", "]"], + + ["comment", "# Assuming conventional resolution:"], + ["punctuation", "-"], + ["string", "\"12\""], + ["punctuation", "-"], + ["number", "12"], + ["punctuation", "-"], + ["tag", "!"], + ["number", "12"], + + ["tag", "!!seq"], + ["punctuation", "["], + ["tag", "!"], + ["string", "\"12\""], + ["punctuation", ","], + ["tag", "!"], + ["string", "\"12\""], + ["punctuation", ","], + ["tag", "!"], + ["string", "\"12\""], + ["punctuation", ","], + ["punctuation", "]"] ] ---------------------------------------------------- -Checks for tags \ No newline at end of file +Checks for tags From 15983d529793d948744e325c8072c7500f867609 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Sun, 23 Feb 2020 14:12:37 +0100 Subject: [PATCH 0448/1100] Added support for Solution (.sln) files (#2213) This adds support for VS Solution files. https://docs.microsoft.com/en-us/visualstudio/extensibility/internals/solution-dot-sln-file?view=vs-2019 --- components.js | 2 +- components.json | 5 + components/prism-solution-file.js | 51 +++++++++ components/prism-solution-file.min.js | 1 + examples/prism-solution-file.html | 28 +++++ plugins/autoloader/prism-autoloader.js | 1 + plugins/autoloader/prism-autoloader.min.js | 2 +- plugins/show-language/prism-show-language.js | 2 + .../show-language/prism-show-language.min.js | 2 +- .../solution-file/boolean_feature.test | 13 +++ .../solution-file/comment_feature.test | 11 ++ .../languages/solution-file/guid_feature.test | 63 +++++++++++ .../solution-file/object_feature.test | 101 ++++++++++++++++++ .../solution-file/property_feature.test | 32 ++++++ .../solution-file/string_feature.test | 17 +++ 15 files changed, 328 insertions(+), 3 deletions(-) create mode 100644 components/prism-solution-file.js create mode 100644 components/prism-solution-file.min.js create mode 100644 examples/prism-solution-file.html create mode 100644 tests/languages/solution-file/boolean_feature.test create mode 100644 tests/languages/solution-file/comment_feature.test create mode 100644 tests/languages/solution-file/guid_feature.test create mode 100644 tests/languages/solution-file/object_feature.test create mode 100644 tests/languages/solution-file/property_feature.test create mode 100644 tests/languages/solution-file/string_feature.test diff --git a/components.js b/components.js index fc526d39aa..b2023055b6 100644 --- a/components.js +++ b/components.js @@ -1,2 +1,2 @@ -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default","overrideExampleHeader":true},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"Augmented Backus–Naur form","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","owner":"RunDevelopment"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"Backus–Naur form","alias":"rbnf","aliasTitles":{"rbnf":"Routing Backus–Naur form"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"Extended Backus–Naur form","owner":"RunDevelopment"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment"},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"http":{"title":"HTTP","optional":["css","javascript","json","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":["java"],"optional":["scala"],"owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"json":{"title":"JSON","owner":"CupOfTea696"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":["jsdoc"],"alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"cpp","modify":["c","cpp"],"overrideExampleHeader":true,"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","modify":["actionscript","coffeescript","flow","javascript","typescript","vala"],"owner":"RunDevelopment"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","peerDependencies":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"solidity":{"title":"Solidity (Ethereum)","require":"clike","owner":"glachaud"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"turtle":{"title":"Turtle","alias":["trig"],"aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","visual-basic"],"owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true}}}; +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default","overrideExampleHeader":true},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"Augmented Backus–Naur form","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","owner":"RunDevelopment"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"Backus–Naur form","alias":"rbnf","aliasTitles":{"rbnf":"Routing Backus–Naur form"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"Extended Backus–Naur form","owner":"RunDevelopment"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment"},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"http":{"title":"HTTP","optional":["css","javascript","json","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":["java"],"optional":["scala"],"owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"json":{"title":"JSON","owner":"CupOfTea696"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":["jsdoc"],"alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"cpp","modify":["c","cpp"],"overrideExampleHeader":true,"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","modify":["actionscript","coffeescript","flow","javascript","typescript","vala"],"owner":"RunDevelopment"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","peerDependencies":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"solidity":{"title":"Solidity (Ethereum)","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"turtle":{"title":"Turtle","alias":["trig"],"aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","visual-basic"],"owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true}}}; if (typeof module !== 'undefined' && module.exports) { module.exports = components; } \ No newline at end of file diff --git a/components.json b/components.json index 37ed2ede74..b4e77b2bbf 100644 --- a/components.json +++ b/components.json @@ -939,6 +939,11 @@ "require": "clike", "owner": "glachaud" }, + "solution-file": { + "title": "Solution file", + "alias": "sln", + "owner": "RunDevelopment" + }, "soy": { "title": "Soy (Closure Template)", "require": "markup-templating", diff --git a/components/prism-solution-file.js b/components/prism-solution-file.js new file mode 100644 index 0000000000..8e79ab1e3f --- /dev/null +++ b/components/prism-solution-file.js @@ -0,0 +1,51 @@ +(function (Prism){ + + var guid = { + // https://en.wikipedia.org/wiki/Universally_unique_identifier#Format + pattern: /\{[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}\}/i, + alias: 'constant', + inside: { + 'punctuation': /[{}]/ + } + }; + + Prism.languages['solution-file'] = { + 'comment': { + pattern: /#.*/, + greedy: true + }, + 'string': { + pattern: /"[^"\r\n]*"|'[^'\r\n]*'/, + greedy: true, + inside: { + 'guid': guid + } + }, + 'object': { + // Foo + // Bar("abs") = 9 + // EndBar + // Prop = TRUE + // EndFoo + pattern: /^([ \t]*)(?:([A-Z]\w*)\b(?=.*(?:\r\n?|\n)(?:\1[ \t].*(?:\r\n?|\n))*\1End\2(?=[ \t]*$))|End[A-Z]\w*(?=[ \t]*$))/m, + lookbehind: true, + greedy: true, + alias: 'keyword' + }, + 'property': { + pattern: /^([ \t]*)[^\r\n"#=()]*[^\s"#=()](?=\s*=)/m, + lookbehind: true, + inside: { + 'guid': guid + } + }, + 'guid': guid, + 'number': /\b\d+(?:\.\d+)*\b/, + 'boolean': /\b(?:FALSE|TRUE)\b/, + 'operator': /=/, + 'punctuation': /[(),]/ + }; + + Prism.languages['sln'] = Prism.languages['solution-file']; + +}(Prism)); diff --git a/components/prism-solution-file.min.js b/components/prism-solution-file.min.js new file mode 100644 index 0000000000..9e7c248a51 --- /dev/null +++ b/components/prism-solution-file.min.js @@ -0,0 +1 @@ +!function(n){var t={pattern:/\{[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}\}/i,alias:"constant",inside:{punctuation:/[{}]/}};n.languages["solution-file"]={comment:{pattern:/#.*/,greedy:!0},string:{pattern:/"[^"\r\n]*"|'[^'\r\n]*'/,greedy:!0,inside:{guid:t}},object:{pattern:/^([ \t]*)(?:([A-Z]\w*)\b(?=.*(?:\r\n?|\n)(?:\1[ \t].*(?:\r\n?|\n))*\1End\2(?=[ \t]*$))|End[A-Z]\w*(?=[ \t]*$))/m,lookbehind:!0,greedy:!0,alias:"keyword"},property:{pattern:/^([ \t]*)[^\r\n"#=()]*[^\s"#=()](?=\s*=)/m,lookbehind:!0,inside:{guid:t}},guid:t,number:/\b\d+(?:\.\d+)*\b/,boolean:/\b(?:FALSE|TRUE)\b/,operator:/=/,punctuation:/[(),]/},n.languages.sln=n.languages["solution-file"]}(Prism); \ No newline at end of file diff --git a/examples/prism-solution-file.html b/examples/prism-solution-file.html new file mode 100644 index 0000000000..06de0aa8e7 --- /dev/null +++ b/examples/prism-solution-file.html @@ -0,0 +1,28 @@ +

        Full example

        +
        # https://docs.microsoft.com/en-us/visualstudio/extensibility/internals/solution-dot-sln-file?view=vs-2015&redirectedfrom=MSDN
        +Microsoft Visual Studio Solution File, Format Version 12.00
        +# Visual Studio Version 16
        +VisualStudioVersion = 16.0.29709.97
        +MinimumVisualStudioVersion = 10.0.40219.1
        +Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Project1", "Project1.vbproj", "{8CDD8387-B905-44A8-B5D5-07BB50E05BEA}"
        +EndProject
        +Global
        +	GlobalSection(SolutionNotes) = postSolution
        +	EndGlobalSection
        +	GlobalSection(SolutionConfiguration) = preSolution
        +		ConfigName.0 = Debug
        +		ConfigName.1 = Release
        +	EndGlobalSection
        +	GlobalSection(ProjectDependencies) = postSolution
        +	EndGlobalSection
        +	GlobalSection(ProjectConfiguration) = postSolution
        +		{8CDD8387-B905-44A8-B5D5-07BB50E05BEA}.Debug.ActiveCfg = Debug|x86
        +		{8CDD8387-B905-44A8-B5D5-07BB50E05BEA}.Debug.Build.0 = Debug|x86
        +		{8CDD8387-B905-44A8-B5D5-07BB50E05BEA}.Release.ActiveCfg = Release|x86
        +		{8CDD8387-B905-44A8-B5D5-07BB50E05BEA}.Release.Build.0 = Release|x86
        +	EndGlobalSection
        +	GlobalSection(ExtensibilityGlobals) = postSolution
        +	EndGlobalSection
        +	GlobalSection(ExtensibilityAddIns) = postSolution
        +	EndGlobalSection
        +EndGlobal
        diff --git a/plugins/autoloader/prism-autoloader.js b/plugins/autoloader/prism-autoloader.js index f64bbbba98..f852cce5e7 100644 --- a/plugins/autoloader/prism-autoloader.js +++ b/plugins/autoloader/prism-autoloader.js @@ -170,6 +170,7 @@ "py": "python", "robot": "robotframework", "rb": "ruby", + "sln": "solution-file", "rq": "sparql", "trig": "turtle", "ts": "typescript", diff --git a/plugins/autoloader/prism-autoloader.min.js b/plugins/autoloader/prism-autoloader.min.js index 3b6033f248..11e5487878 100644 --- a/plugins/autoloader/prism-autoloader.min.js +++ b/plugins/autoloader/prism-autoloader.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof self&&self.Prism&&self.document&&document.createElement){var c={javascript:"clike",actionscript:"javascript",arduino:"cpp",aspnet:["markup","csharp"],bison:"c",c:"clike",csharp:"clike",cpp:"c",coffeescript:"javascript",crystal:"ruby","css-extras":"css",d:"clike",dart:"clike",django:"markup-templating",ejs:["javascript","markup-templating"],etlua:["lua","markup-templating"],erb:["ruby","markup-templating"],fsharp:"clike","firestore-security-rules":"clike",flow:"javascript",ftl:"markup-templating",glsl:"clike",gml:"clike",go:"clike",groovy:"clike",haml:"ruby",handlebars:"markup-templating",haxe:"clike",java:"clike",javadoc:["markup","java","javadoclike"],jolie:"clike",jsdoc:["javascript","javadoclike"],"js-extras":"javascript","js-templates":"javascript",jsonp:"json",json5:"json",kotlin:"clike",latte:["clike","markup-templating","php"],less:"css",lilypond:"scheme",markdown:"markup","markup-templating":"markup",n4js:"javascript",nginx:"clike",objectivec:"c",opencl:"cpp",parser:"markup",php:["clike","markup-templating"],phpdoc:["php","javadoclike"],"php-extras":"php",plsql:"sql",processing:"clike",protobuf:"clike",pug:["markup","javascript"],qml:"javascript",qore:"clike",jsx:["markup","javascript"],tsx:["jsx","typescript"],reason:"clike",ruby:"clike",sass:"css",scss:"css",scala:"java","shell-session":"bash",smarty:"markup-templating",solidity:"clike",soy:"markup-templating",sparql:"turtle",sqf:"clike",swift:"clike",tap:"yaml",textile:"markup",tt2:["clike","markup-templating"],twig:"markup",typescript:"javascript","t4-cs":["t4-templating","csharp"],"t4-vb":["t4-templating","visual-basic"],vala:"clike",vbnet:"basic",velocity:"markup",wiki:"markup",xeora:"markup",xquery:"markup"},l={html:"markup",xml:"markup",svg:"markup",mathml:"markup",js:"javascript",g4:"antlr4",adoc:"asciidoc",shell:"bash",rbnf:"bnf",conc:"concurnas",cs:"csharp",dotnet:"csharp",coffee:"coffeescript",jinja2:"django","dns-zone":"dns-zone-file",dockerfile:"docker",gamemakerlanguage:"gml",hs:"haskell",tex:"latex",context:"latex",ly:"lilypond",emacs:"lisp",elisp:"lisp","emacs-lisp":"lisp",md:"markdown",moon:"moonscript",n4jsd:"n4js",objectpascal:"pascal",px:"pcaxis",py:"python",robot:"robotframework",rb:"ruby",rq:"sparql",trig:"turtle",ts:"typescript",t4:"t4-cs",vb:"visual-basic",xeoracube:"xeora",yml:"yaml"},n={},a="components/",e=Prism.util.currentScript();if(e){var t=/\bplugins\/autoloader\/prism-autoloader\.(?:min\.)js$/i,s=/[\w-]+\.(?:min\.)js$/i;if(e.hasAttribute("data-autoloader-path"))a=e.getAttribute("data-autoloader-path").trim().replace(/\/?$/,"/");else{var i=e.src;t.test(i)?a=i.replace(t,"components/"):s.test(i)&&(a=i.replace(s,"components/"))}}var p=Prism.plugins.autoloader={languages_path:a,use_minified:!0,loadLanguages:o};Prism.hooks.add("complete",function(a){a.element&&a.language&&!a.grammar&&"none"!==a.language&&function(a,e){a in l&&(a=l[a]);var t=e.getAttribute("data-dependencies"),s=e.parentElement;!t&&s&&"pre"===s.tagName.toLowerCase()&&(t=s.getAttribute("data-dependencies")),o(t=t?t.split(/\s*,\s*/g):[],function(){m(a,function(){Prism.highlightElement(e)})})}(a.language,a.element)})}function o(a,e,t){"string"==typeof a&&(a=[a]);var s=a.length,i=0,r=!1;function c(){r||++i===s&&e&&e(a)}0!==s?a.forEach(function(a){m(a,c,function(){r||(r=!0,t&&t(a))})}):e&&setTimeout(e,0)}function m(e,t,s){var i=0<=e.indexOf("!");e=e.replace("!",""),e=l[e]||e;var a=function(){var a=n[e];if(a||(a=n[e]={callbacks:[]}),a.callbacks.push({success:t,error:s}),!i&&Prism.languages[e])u(e,"success");else if(!i&&a.error)u(e,"error");else if(i||!a.loading){a.loading=!0,function(a,e,t){var s=document.createElement("script");s.src=a,s.async=!0,s.onload=function(){document.body.removeChild(s),e&&e()},s.onerror=function(){document.body.removeChild(s),t&&t()},document.body.appendChild(s)}(function(a){return p.languages_path+"prism-"+a+(p.use_minified?".min":"")+".js"}(e),function(){a.loading=!1,u(e,"success")},function(){a.loading=!1,a.error=!0,u(e,"error")})}},r=c[e];r&&r.length?o(r,a,s):a()}function u(a,e){if(n[a]){for(var t=n[a].callbacks,s=0,i=t.length;s Date: Mon, 24 Feb 2020 14:43:16 +0100 Subject: [PATCH 0449/1100] Shell-Session: Improvements (#2208) - Added support for elevated shells starting commands with `#` instead of `$`. - The user and cwd info `bash` and `sh` print before the interactive shell will now be highlighted. - Changed the line ends of test files to CRLF. --- components/prism-shell-session.js | 28 ++-- components/prism-shell-session.min.js | 2 +- examples/prism-shell-session.html | 8 ++ .../shell-session/command_feature.test | 75 ++++++---- .../shell-session/command_string_feature.test | 132 +++++++++--------- .../languages/shell-session/info_feature.test | 68 +++++++++ 6 files changed, 207 insertions(+), 106 deletions(-) create mode 100644 tests/languages/shell-session/info_feature.test diff --git a/components/prism-shell-session.js b/components/prism-shell-session.js index 893fdb26b4..8abbd62dd1 100644 --- a/components/prism-shell-session.js +++ b/components/prism-shell-session.js @@ -18,25 +18,37 @@ ].join('|'); Prism.languages['shell-session'] = { + 'info': { + // foo@bar:~/files$ exit + // foo@bar$ exit + pattern: /^(?:[^\r\n$#*!]+)(?=[$#])/m, + alias: 'punctuation', + inside: { + 'path': { + pattern: /(:)[\s\S]+/, + lookbehind: true + }, + 'user': /^[^\s@:$#*!/\\]+@[^\s@:$#*!/\\]+(?=:|$)/, + 'punctuation': /:/ + } + }, 'command': { - pattern: RegExp(/\$(?:[^\r\n'"<]|<>)+/.source.replace(/<>/g, strings)), + pattern: RegExp(/[$#](?:[^\r\n'"<]|<>)+/.source.replace(/<>/g, strings)), + greedy: true, inside: { 'bash': { - pattern: /(\$\s*)[\s\S]+/, + pattern: /(^[$#]\s*)[\s\S]+/, lookbehind: true, alias: 'language-bash', inside: Prism.languages.bash }, - 'sh': { - pattern: /^\$/, + 'shell-symbol': { + pattern: /^[$#]/, alias: 'important' } } }, - 'output': { - pattern: /.(?:.*(?:\r\n?|\n|.$))*/ - // output highlighting? - } + 'output': /.(?:.*(?:\r\n?|\n|.$))*/ }; }(Prism)); diff --git a/components/prism-shell-session.min.js b/components/prism-shell-session.min.js index f7b9129c80..9bf45bc05a 100644 --- a/components/prism-shell-session.min.js +++ b/components/prism-shell-session.min.js @@ -1 +1 @@ -!function(s){var n=["([\"'])(?:\\\\[\\s\\S]|\\$\\([^)]+\\)|`[^`]+`|(?!\\1)[^\\\\])*\\1","<<-?\\s*(\\w+?)\\s*(?:\r?\n|\r)[\\s\\S]*?(?:\r?\n|\r)\\2","<<-?\\s*([\"'])(\\w+)\\3\\s*(?:\r?\n|\r)[\\s\\S]*?(?:\r?\n|\r)\\4"].join("|");s.languages["shell-session"]={command:{pattern:RegExp("\\$(?:[^\r\\n'\"<]|<>)+".replace(/<>/g,n)),inside:{bash:{pattern:/(\$\s*)[\s\S]+/,lookbehind:!0,alias:"language-bash",inside:s.languages.bash},sh:{pattern:/^\$/,alias:"important"}}},output:{pattern:/.(?:.*(?:\r\n?|\n|.$))*/}}}(Prism); \ No newline at end of file +!function(s){var n=["([\"'])(?:\\\\[\\s\\S]|\\$\\([^)]+\\)|`[^`]+`|(?!\\1)[^\\\\])*\\1","<<-?\\s*(\\w+?)\\s*(?:\r?\n|\r)[\\s\\S]*?(?:\r?\n|\r)\\2","<<-?\\s*([\"'])(\\w+)\\3\\s*(?:\r?\n|\r)[\\s\\S]*?(?:\r?\n|\r)\\4"].join("|");s.languages["shell-session"]={info:{pattern:/^(?:[^\r\n$#*!]+)(?=[$#])/m,alias:"punctuation",inside:{path:{pattern:/(:)[\s\S]+/,lookbehind:!0},user:/^[^\s@:$#*!/\\]+@[^\s@:$#*!/\\]+(?=:|$)/,punctuation:/:/}},command:{pattern:RegExp("[$#](?:[^\r\\n'\"<]|<>)+".replace(/<>/g,n)),greedy:!0,inside:{bash:{pattern:/(^[$#]\s*)[\s\S]+/,lookbehind:!0,alias:"language-bash",inside:s.languages.bash},"shell-symbol":{pattern:/^[$#]/,alias:"important"}}},output:/.(?:.*(?:\r\n?|\n|.$))*/}}(Prism); \ No newline at end of file diff --git a/examples/prism-shell-session.html b/examples/prism-shell-session.html index 35501fe646..07c9ce4c3d 100644 --- a/examples/prism-shell-session.html +++ b/examples/prism-shell-session.html @@ -8,3 +8,11 @@

        Full example

        > Bar" Foo Bar + +

        bash and sh console sessions are fully supported.

        + +
        foo@bar:/$ cd ~
        +foo@bar:~$ sudo -i
        +[sudo] password for foo:
        +root@bar:~# echo "hello!"
        +hello!
        diff --git a/tests/languages/shell-session/command_feature.test b/tests/languages/shell-session/command_feature.test index 6a768e4f76..df721eeae8 100644 --- a/tests/languages/shell-session/command_feature.test +++ b/tests/languages/shell-session/command_feature.test @@ -1,31 +1,44 @@ -$ git checkout master -Switched to branch 'master' -Your branch is up-to-date with 'origin/master'. -$ git push -Everything up-to-date - ----------------------------------------------------- - -[ - ["command", [ - ["sh", "$"], - ["bash", [ - ["function", "git"], - " checkout master" - ]] - ]], - ["output", "Switched to branch 'master'\nYour branch is up-to-date with 'origin/master'.\n"], - - ["command", [ - ["sh", "$"], - ["bash", [ - ["function", "git"], - " push" - ]] - ]], - ["output", "Everything up-to-date"] -] - ----------------------------------------------------- - -Checks for commands. +$ git checkout master +Switched to branch 'master' +Your branch is up-to-date with 'origin/master'. +$ git push +Everything up-to-date +# echo "root" +root + +---------------------------------------------------- + +[ + ["command", [ + ["shell-symbol", "$"], + ["bash", [ + ["function", "git"], + " checkout master" + ]] + ]], + ["output", "Switched to branch 'master'\r\nYour branch is up-to-date with 'origin/master'.\r\n"], + + ["command", [ + ["shell-symbol", "$"], + ["bash", [ + ["function", "git"], + " push" + ]] + ]], + ["output", "Everything up-to-date\r\n"], + + ["command", [ + ["shell-symbol", "#"], + ["bash", [ + ["builtin", "echo"], + ["string", [ + "\"root\"" + ]] + ]] + ]], + ["output", "root"] +] + +---------------------------------------------------- + +Checks for commands. diff --git a/tests/languages/shell-session/command_string_feature.test b/tests/languages/shell-session/command_string_feature.test index d84afec018..95a12191e7 100644 --- a/tests/languages/shell-session/command_string_feature.test +++ b/tests/languages/shell-session/command_string_feature.test @@ -1,66 +1,66 @@ -$ echo 'Foo -> Bar' -$ echo "Foo -> Bar" - -$ echo <<- STRING_END -foo -bar -STRING_END - -$ echo <<- "STRING_END" -foo -bar -STRING_END - ----------------------------------------------------- - -[ - ["command", [ - ["sh", "$"], - ["bash", [ - ["builtin", "echo"], - ["string", [ - "'Foo\n> Bar'" - ]] - ]] - ]], - - ["command", [ - ["sh", "$"], - ["bash", [ - ["builtin", "echo"], - ["string", [ - "\"Foo\n> Bar\"" - ]] - ]] - ]], - - ["command", [ - ["sh", "$"], - ["bash", [ - ["builtin", "echo"], - ["operator", [ - "<<-" - ]], - ["string", [ - "STRING_END\nfoo\nbar\nSTRING_END" - ]] - ]] - ]], - - ["command", [ - ["sh", "$"], - ["bash", [ - ["builtin", "echo"], - ["operator", [ - "<<-" - ]], - ["string", "\"STRING_END\"\nfoo\nbar\nSTRING_END"] - ]] - ]] -] - ----------------------------------------------------- - -Checks for multi-line strings inside commands. +$ echo 'Foo +> Bar' +$ echo "Foo +> Bar" + +$ echo <<- STRING_END +foo +bar +STRING_END + +$ echo <<- "STRING_END" +foo +bar +STRING_END + +---------------------------------------------------- + +[ + ["command", [ + ["shell-symbol", "$"], + ["bash", [ + ["builtin", "echo"], + ["string", [ + "'Foo\r\n> Bar'" + ]] + ]] + ]], + + ["command", [ + ["shell-symbol", "$"], + ["bash", [ + ["builtin", "echo"], + ["string", [ + "\"Foo\r\n> Bar\"" + ]] + ]] + ]], + + ["command", [ + ["shell-symbol", "$"], + ["bash", [ + ["builtin", "echo"], + ["operator", [ + "<<-" + ]], + ["string", [ + "STRING_END\r\nfoo\r\nbar\r\nSTRING_END" + ]] + ]] + ]], + + ["command", [ + ["shell-symbol", "$"], + ["bash", [ + ["builtin", "echo"], + ["operator", [ + "<<-" + ]], + ["string", "\"STRING_END\"\r\nfoo\r\nbar\r\nSTRING_END"] + ]] + ]] +] + +---------------------------------------------------- + +Checks for multi-line strings inside commands. diff --git a/tests/languages/shell-session/info_feature.test b/tests/languages/shell-session/info_feature.test new file mode 100644 index 0000000000..446c8b3910 --- /dev/null +++ b/tests/languages/shell-session/info_feature.test @@ -0,0 +1,68 @@ +foo@bar:/var/local$ cd ~ +foo@bar:~$ sudo -i +[sudo] password for foo: +root@bar:~# echo "hello!" +hello! + +foo@bar$ exit + +---------------------------------------------------- + +[ + ["info", [ + ["user", "foo@bar"], + ["punctuation", ":"], + ["path", "/var/local"] + ]], + ["command", [ + ["shell-symbol", "$"], + ["bash", [ + ["builtin", "cd"], + " ~" + ]] + ]], + + ["info", [ + ["user", "foo@bar"], + ["punctuation", ":"], + ["path", "~"] + ]], + ["command", [ + ["shell-symbol", "$"], + ["bash", [ + ["function", "sudo"], + " -i" + ]] + ]], + ["output", "[sudo] password for foo:\r\n"], + + ["info", [ + ["user", "root@bar"], + ["punctuation", ":"], + ["path", "~"] + ]], + ["command", [ + ["shell-symbol", "#"], + ["bash", [ + ["builtin", "echo"], + ["string", [ + "\"hello!\"" + ]] + ]] + ]], + ["output", "hello!\r\n\r\n"], + + ["info", [ + ["user", "foo@bar"] + ]], + ["command", [ + ["shell-symbol", "$"], + ["bash", [ + ["builtin", "exit"] + ]] + ]] +] + +---------------------------------------------------- + +Checks for the info bash outputs. From 7d8ff7eab4604f9140ef1bfffec20ce50e215e3c Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Mon, 24 Feb 2020 18:13:35 +0100 Subject: [PATCH 0450/1100] Fixed SAS' "peerDependencies" (#2230) SAS had a `"peerDependencies"` property in `components.json`. This has been replaced with an `"optional"` dependency. --- components.js | 2 +- components.json | 16 +++++----------- 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/components.js b/components.js index b2023055b6..0a08de216d 100644 --- a/components.js +++ b/components.js @@ -1,2 +1,2 @@ -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default","overrideExampleHeader":true},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"Augmented Backus–Naur form","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","owner":"RunDevelopment"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"Backus–Naur form","alias":"rbnf","aliasTitles":{"rbnf":"Routing Backus–Naur form"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"Extended Backus–Naur form","owner":"RunDevelopment"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment"},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"http":{"title":"HTTP","optional":["css","javascript","json","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":["java"],"optional":["scala"],"owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"json":{"title":"JSON","owner":"CupOfTea696"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":["jsdoc"],"alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"cpp","modify":["c","cpp"],"overrideExampleHeader":true,"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","modify":["actionscript","coffeescript","flow","javascript","typescript","vala"],"owner":"RunDevelopment"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","peerDependencies":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"solidity":{"title":"Solidity (Ethereum)","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"turtle":{"title":"Turtle","alias":["trig"],"aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","visual-basic"],"owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true}}}; +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default","overrideExampleHeader":true},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"Augmented Backus–Naur form","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","owner":"RunDevelopment"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"Backus–Naur form","alias":"rbnf","aliasTitles":{"rbnf":"Routing Backus–Naur form"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"Extended Backus–Naur form","owner":"RunDevelopment"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment"},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"http":{"title":"HTTP","optional":["css","javascript","json","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"json":{"title":"JSON","owner":"CupOfTea696"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"cpp","modify":["c","cpp"],"overrideExampleHeader":true,"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","modify":["actionscript","coffeescript","flow","javascript","typescript","vala"],"owner":"RunDevelopment"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"solidity":{"title":"Solidity (Ethereum)","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","visual-basic"],"owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true}}}; if (typeof module !== 'undefined' && module.exports) { module.exports = components; } \ No newline at end of file diff --git a/components.json b/components.json index b4e77b2bbf..dff1d0711b 100644 --- a/components.json +++ b/components.json @@ -466,12 +466,8 @@ "javadoc": { "title": "JavaDoc", "require": ["markup", "java", "javadoclike"], - "modify": [ - "java" - ], - "optional": [ - "scala" - ], + "modify": "java", + "optional": "scala", "owner": "RunDevelopment" }, "javadoclike": { @@ -649,9 +645,7 @@ "n4js": { "title": "N4JS", "require": "javascript", - "optional": [ - "jsdoc" - ], + "optional": "jsdoc", "alias": "n4jsd", "owner": "bsmith-n4" }, @@ -897,7 +891,7 @@ }, "sas": { "title": "SAS", - "peerDependencies": ["groovy", "lua", "sql"], + "optional": ["groovy", "lua", "sql"], "owner": "Golmote" }, "sass": { @@ -1003,7 +997,7 @@ }, "turtle": { "title": "Turtle", - "alias": ["trig"], + "alias": "trig", "aliasTitles": { "trig": "TriG" }, From 73c8a376323fc591a6ad6964dfcd91d66fd0b89e Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Mon, 24 Feb 2020 23:56:07 +0100 Subject: [PATCH 0451/1100] Markdown: Added support for nested lists (#2228) This improves the support for nested lists by making the `code` pattern stricter. --- components/prism-markdown.js | 12 +++---- components/prism-markdown.min.js | 2 +- tests/languages/markdown/list_feature.test | 38 ++++++++++++++++++---- 3 files changed, 38 insertions(+), 14 deletions(-) diff --git a/components/prism-markdown.js b/components/prism-markdown.js index 386fd16759..f28ea9c404 100644 --- a/components/prism-markdown.js +++ b/components/prism-markdown.js @@ -1,7 +1,7 @@ (function (Prism) { // Allow only one line break - var inner = /(?:\\.|[^\\\n\r]|(?:\r?\n|\r)(?!\r?\n|\r))/.source; + var inner = /(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?!\n|\r\n?))/.source; /** * This function is intended for the creation of the bold or italic pattern. @@ -24,8 +24,8 @@ var tableCell = /(?:\\.|``.+?``|`[^`\r\n]+`|[^\\|\r\n`])+/.source; - var tableRow = /\|?__(?:\|__)+\|?(?:(?:\r?\n|\r)|$)/.source.replace(/__/g, tableCell); - var tableLine = /\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\r?\n|\r)/.source; + var tableRow = /\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|$)/.source.replace(/__/g, tableCell); + var tableLine = /\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source; Prism.languages.markdown = Prism.languages.extend('markup', {}); @@ -72,7 +72,7 @@ 'code': [ { // Prefixed by 4 spaces or 1 tab and preceded by an empty line - pattern: /(^[ \t]*(?:\r?\n|\r))(?: {4}|\t).+(?:(?:\r?\n|\r)(?: {4}|\t).+)*/m, + pattern: /((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/, lookbehind: true, alias: 'keyword' }, @@ -90,7 +90,7 @@ greedy: true, inside: { 'code-block': { - pattern: /^(```.*(?:\r?\n|\r))[\s\S]+?(?=(?:\r?\n|\r)^```$)/m, + pattern: /^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m, lookbehind: true }, 'code-language': { @@ -108,7 +108,7 @@ // title 2 // ------- - pattern: /\S.*(?:\r?\n|\r)(?:==+|--+)(?=[ \t]*$)/m, + pattern: /\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m, alias: 'important', inside: { punctuation: /==+$|--+$/ diff --git a/components/prism-markdown.min.js b/components/prism-markdown.min.js index fd30703509..86df531e79 100644 --- a/components/prism-markdown.min.js +++ b/components/prism-markdown.min.js @@ -1 +1 @@ -!function(d){function n(n,e){return n=n.replace(//g,"(?:\\\\.|[^\\\\\\n\r]|(?:\r?\n|\r)(?!\r?\n|\r))"),e&&(n=n+"|"+n.replace(/_/g,"\\*")),RegExp("((?:^|[^\\\\])(?:\\\\{2})*)(?:"+n+")")}var e="(?:\\\\.|``.+?``|`[^`\r\\n]+`|[^\\\\|\r\\n`])+",t="\\|?__(?:\\|__)+\\|?(?:(?:\r?\n|\r)|$)".replace(/__/g,e),a="\\|?[ \t]*:?-{3,}:?[ \t]*(?:\\|[ \t]*:?-{3,}:?[ \t]*)+\\|?(?:\r?\n|\r)";d.languages.markdown=d.languages.extend("markup",{}),d.languages.insertBefore("markdown","prolog",{blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+t+a+"(?:"+t+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+t+a+")(?:"+t+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(e),inside:d.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+t+")"+a+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+t+"$"),inside:{"table-header":{pattern:RegExp(e),alias:"important",inside:d.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/(^[ \t]*(?:\r?\n|\r))(?: {4}|\t).+(?:(?:\r?\n|\r)(?: {4}|\t).+)*/m,lookbehind:!0,alias:"keyword"},{pattern:/``.+?``|`[^`\r\n]+`/,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\r?\n|\r))[\s\S]+?(?=(?:\r?\n|\r)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\r?\n|\r)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#+.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n("__(?:(?!_)|_(?:(?!_))+_)+__",!0),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n("_(?:(?!_)|__(?:(?!_))+__)+_",!0),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n("(~~?)(?:(?!~))+?\\2",!1),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},url:{pattern:n('!?\\[(?:(?!\\]))+\\](?:\\([^\\s)]+(?:[\t ]+"(?:\\\\.|[^"\\\\])*")?\\)| ?\\[(?:(?!\\]))+\\])',!1),lookbehind:!0,greedy:!0,inside:{variable:{pattern:/(\[)[^\]]+(?=\]$)/,lookbehind:!0},content:{pattern:/(^!?\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},string:{pattern:/"(?:\\.|[^"\\])*"(?=\)$)/}}}}),["url","bold","italic","strike"].forEach(function(e){["url","bold","italic","strike"].forEach(function(n){e!==n&&(d.languages.markdown[e].inside.content.inside[n]=d.languages.markdown[n])})}),d.hooks.add("after-tokenize",function(n){"markdown"!==n.language&&"md"!==n.language||!function n(e){if(e&&"string"!=typeof e)for(var t=0,a=e.length;t/g,"(?:\\\\.|[^\\\\\\n\r]|(?:\n|\r\\n?)(?!\n|\r\\n?))"),e&&(n=n+"|"+n.replace(/_/g,"\\*")),RegExp("((?:^|[^\\\\])(?:\\\\{2})*)(?:"+n+")")}var e="(?:\\\\.|``.+?``|`[^`\r\\n]+`|[^\\\\|\r\\n`])+",t="\\|?__(?:\\|__)+\\|?(?:(?:\n|\r\\n?)|$)".replace(/__/g,e),a="\\|?[ \t]*:?-{3,}:?[ \t]*(?:\\|[ \t]*:?-{3,}:?[ \t]*)+\\|?(?:\n|\r\\n?)";d.languages.markdown=d.languages.extend("markup",{}),d.languages.insertBefore("markdown","prolog",{blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+t+a+"(?:"+t+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+t+a+")(?:"+t+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(e),inside:d.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+t+")"+a+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+t+"$"),inside:{"table-header":{pattern:RegExp(e),alias:"important",inside:d.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/``.+?``|`[^`\r\n]+`/,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#+.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n("__(?:(?!_)|_(?:(?!_))+_)+__",!0),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n("_(?:(?!_)|__(?:(?!_))+__)+_",!0),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n("(~~?)(?:(?!~))+?\\2",!1),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},url:{pattern:n('!?\\[(?:(?!\\]))+\\](?:\\([^\\s)]+(?:[\t ]+"(?:\\\\.|[^"\\\\])*")?\\)| ?\\[(?:(?!\\]))+\\])',!1),lookbehind:!0,greedy:!0,inside:{variable:{pattern:/(\[)[^\]]+(?=\]$)/,lookbehind:!0},content:{pattern:/(^!?\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},string:{pattern:/"(?:\\.|[^"\\])*"(?=\)$)/}}}}),["url","bold","italic","strike"].forEach(function(e){["url","bold","italic","strike"].forEach(function(n){e!==n&&(d.languages.markdown[e].inside.content.inside[n]=d.languages.markdown[n])})}),d.hooks.add("after-tokenize",function(n){"markdown"!==n.language&&"md"!==n.language||!function n(e){if(e&&"string"!=typeof e)for(var t=0,a=e.length;t Date: Mon, 24 Feb 2020 23:57:55 +0100 Subject: [PATCH 0452/1100] C/C++: Improvemed `comment` pattern (#2229) This improves the `comment` pattern by allowing backslash-escaped line breaks in single-line comments. --- components/prism-c.js | 4 +++ components/prism-c.min.js | 2 +- tests/languages/c/comment_feature.test | 26 +++++++++++++++++++ tests/languages/cpp/comment_feature.test | 26 +++++++++++++++++++ .../languages/objectivec/comment_feature.test | 26 +++++++++++++++++++ 5 files changed, 83 insertions(+), 1 deletion(-) create mode 100644 tests/languages/c/comment_feature.test create mode 100644 tests/languages/cpp/comment_feature.test create mode 100644 tests/languages/objectivec/comment_feature.test diff --git a/components/prism-c.js b/components/prism-c.js index 0c058ffe92..9c9971f022 100644 --- a/components/prism-c.js +++ b/components/prism-c.js @@ -1,4 +1,8 @@ Prism.languages.c = Prism.languages.extend('clike', { + 'comment': { + pattern: /\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/, + greedy: true + }, 'class-name': { pattern: /(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+/, lookbehind: true diff --git a/components/prism-c.min.js b/components/prism-c.min.js index aafd9fc599..9acdccc0e1 100644 --- a/components/prism-c.min.js +++ b/components/prism-c.min.js @@ -1 +1 @@ -Prism.languages.c=Prism.languages.extend("clike",{"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+/,lookbehind:!0},keyword:/\b(?:__attribute__|_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|asm|typeof|inline|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|union|unsigned|void|volatile|while)\b/,function:/[a-z_]\w*(?=\s*\()/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/,number:/(?:\b0x(?:[\da-f]+\.?[\da-f]*|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?)[ful]*/i}),Prism.languages.insertBefore("c","string",{macro:{pattern:/(^\s*)#\s*[a-z]+(?:[^\r\n\\]|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,alias:"property",inside:{string:{pattern:/(#\s*include\s*)(?:<.+?>|("|')(?:\\?.)+?\2)/,lookbehind:!0},directive:{pattern:/(#\s*)\b(?:define|defined|elif|else|endif|error|ifdef|ifndef|if|import|include|line|pragma|undef|using)\b/,lookbehind:!0,alias:"keyword"}}},constant:/\b(?:__FILE__|__LINE__|__DATE__|__TIME__|__TIMESTAMP__|__func__|EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|stdin|stdout|stderr)\b/}),delete Prism.languages.c.boolean; \ No newline at end of file +Prism.languages.c=Prism.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+/,lookbehind:!0},keyword:/\b(?:__attribute__|_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|asm|typeof|inline|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|union|unsigned|void|volatile|while)\b/,function:/[a-z_]\w*(?=\s*\()/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/,number:/(?:\b0x(?:[\da-f]+\.?[\da-f]*|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?)[ful]*/i}),Prism.languages.insertBefore("c","string",{macro:{pattern:/(^\s*)#\s*[a-z]+(?:[^\r\n\\]|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,alias:"property",inside:{string:{pattern:/(#\s*include\s*)(?:<.+?>|("|')(?:\\?.)+?\2)/,lookbehind:!0},directive:{pattern:/(#\s*)\b(?:define|defined|elif|else|endif|error|ifdef|ifndef|if|import|include|line|pragma|undef|using)\b/,lookbehind:!0,alias:"keyword"}}},constant:/\b(?:__FILE__|__LINE__|__DATE__|__TIME__|__TIMESTAMP__|__func__|EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|stdin|stdout|stderr)\b/}),delete Prism.languages.c.boolean; \ No newline at end of file diff --git a/tests/languages/c/comment_feature.test b/tests/languages/c/comment_feature.test new file mode 100644 index 0000000000..6370e5daba --- /dev/null +++ b/tests/languages/c/comment_feature.test @@ -0,0 +1,26 @@ +// +// comment +// the comment \ + continues! + +/**/ +/* + * comment + */ + +/* open-ended comment + +---------------------------------------------------- + +[ + ["comment", "//"], + ["comment", "// comment"], + ["comment", "// the comment \\\r\n continues!"], + ["comment", "/**/"], + ["comment", "/*\r\n * comment\r\n */"], + ["comment", "/* open-ended comment"] +] + +---------------------------------------------------- + +Checks for comments. diff --git a/tests/languages/cpp/comment_feature.test b/tests/languages/cpp/comment_feature.test new file mode 100644 index 0000000000..6370e5daba --- /dev/null +++ b/tests/languages/cpp/comment_feature.test @@ -0,0 +1,26 @@ +// +// comment +// the comment \ + continues! + +/**/ +/* + * comment + */ + +/* open-ended comment + +---------------------------------------------------- + +[ + ["comment", "//"], + ["comment", "// comment"], + ["comment", "// the comment \\\r\n continues!"], + ["comment", "/**/"], + ["comment", "/*\r\n * comment\r\n */"], + ["comment", "/* open-ended comment"] +] + +---------------------------------------------------- + +Checks for comments. diff --git a/tests/languages/objectivec/comment_feature.test b/tests/languages/objectivec/comment_feature.test new file mode 100644 index 0000000000..6370e5daba --- /dev/null +++ b/tests/languages/objectivec/comment_feature.test @@ -0,0 +1,26 @@ +// +// comment +// the comment \ + continues! + +/**/ +/* + * comment + */ + +/* open-ended comment + +---------------------------------------------------- + +[ + ["comment", "//"], + ["comment", "// comment"], + ["comment", "// the comment \\\r\n continues!"], + ["comment", "/**/"], + ["comment", "/*\r\n * comment\r\n */"], + ["comment", "/* open-ended comment"] +] + +---------------------------------------------------- + +Checks for comments. From a82770f8900fbd97d83931198140bae7ff39b8fc Mon Sep 17 00:00:00 2001 From: Sid Vishnoi Date: Wed, 26 Feb 2020 01:13:55 +0530 Subject: [PATCH 0453/1100] Website: Fixed Diff highlight plugin page title (#2233) The plugin page of Diff highlight had the wrong title. --- plugins/diff-highlight/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/diff-highlight/index.html b/plugins/diff-highlight/index.html index 921296445c..02e3e012df 100644 --- a/plugins/diff-highlight/index.html +++ b/plugins/diff-highlight/index.html @@ -4,7 +4,7 @@ - Data-URI Highlight ▲ Prism plugins + Diff Highlight ▲ Prism plugins From 6232878b46929c44fd16d310f0cc15f6329245a8 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Sat, 7 Mar 2020 11:37:11 +0100 Subject: [PATCH 0454/1100] Examples: Updated content header (#2232) This changes the automatically generated header of examples on Prism's example page. The `overrideExampleHeader` option in `components.json` is no longer supported. --- components.js | 2 +- components.json | 4 +-- examples/prism-clike.html | 7 ++--- examples/prism-opencl.html | 7 ++--- scripts/examples.js | 57 +++++++++++++++++++++++++++----------- 5 files changed, 49 insertions(+), 28 deletions(-) diff --git a/components.js b/components.js index 0a08de216d..9bf6abfa11 100644 --- a/components.js +++ b/components.js @@ -1,2 +1,2 @@ -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default","overrideExampleHeader":true},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"Augmented Backus–Naur form","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","owner":"RunDevelopment"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"Backus–Naur form","alias":"rbnf","aliasTitles":{"rbnf":"Routing Backus–Naur form"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"Extended Backus–Naur form","owner":"RunDevelopment"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment"},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"http":{"title":"HTTP","optional":["css","javascript","json","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"json":{"title":"JSON","owner":"CupOfTea696"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"cpp","modify":["c","cpp"],"overrideExampleHeader":true,"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","modify":["actionscript","coffeescript","flow","javascript","typescript","vala"],"owner":"RunDevelopment"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"solidity":{"title":"Solidity (Ethereum)","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","visual-basic"],"owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true}}}; +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"Augmented Backus–Naur form","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","owner":"RunDevelopment"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"Backus–Naur form","alias":"rbnf","aliasTitles":{"rbnf":"Routing Backus–Naur form"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"Extended Backus–Naur form","owner":"RunDevelopment"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment"},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"http":{"title":"HTTP","optional":["css","javascript","json","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"json":{"title":"JSON","owner":"CupOfTea696"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"cpp","modify":["c","cpp"],"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","modify":["actionscript","coffeescript","flow","javascript","typescript","vala"],"owner":"RunDevelopment"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"solidity":{"title":"Solidity (Ethereum)","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","visual-basic"],"owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true}}}; if (typeof module !== 'undefined' && module.exports) { module.exports = components; } \ No newline at end of file diff --git a/components.json b/components.json index dff1d0711b..df74e79669 100644 --- a/components.json +++ b/components.json @@ -64,8 +64,7 @@ }, "clike": { "title": "C-like", - "option": "default", - "overrideExampleHeader": true + "option": "default" }, "javascript": { "title": "JavaScript", @@ -694,7 +693,6 @@ "c", "cpp" ], - "overrideExampleHeader": true, "owner": "Milania1" }, "oz": { diff --git a/examples/prism-clike.html b/examples/prism-clike.html index 79a8076409..b5aab46540 100644 --- a/examples/prism-clike.html +++ b/examples/prism-clike.html @@ -1,6 +1,5 @@ -

        The C-like component is not really a language on its own, - it is the basis of many other components. To use it directly, however, - use the class "language-clike".

        +

        Note: The C-like component is not really a language on its own, + it is the basis of many other components.

        Comments

        // Single line comment
        @@ -25,4 +24,4 @@ 

        Functions

        foo();
         Bar();
         _456();
        -
        \ No newline at end of file +
        diff --git a/examples/prism-opencl.html b/examples/prism-opencl.html index 8431fb9d8d..92d54222e2 100644 --- a/examples/prism-opencl.html +++ b/examples/prism-opencl.html @@ -1,7 +1,6 @@ -

        - To use this language, use the class "language-opencl" for OpenCL kernel code. - Host code is automatically highlighted in "language-c" - respectively "language-cpp" classes. +

        Note: Use the class "language-opencl" for OpenCL kernel code. + Host code is automatically highlighted with the "language-c" + or "language-cpp" class.

        OpenCL host code

        diff --git a/scripts/examples.js b/scripts/examples.js index f226f45b85..b8e1ac644a 100644 --- a/scripts/examples.js +++ b/scripts/examples.js @@ -110,16 +110,21 @@ function getFileContents(filepath) { } function buildContentsHeader(id) { + function toArray(value) { + if (Array.isArray(value)) { + return value; + } else if (value != null) { + return [value]; + } else { + return []; + } + } + var language = languages[id]; var header = '

        ' + language.title + '

        '; - if (language.overrideExampleHeader) { - return header; - } + if (language.alias) { - var alias = language.alias; - if (!Array.isArray(alias)) { - alias = [alias]; - } + var alias = toArray(language.alias); header += '

        To use this language, use one of the following classes:

        '; header += '
        • "language-' + id + '"
        • '; @@ -130,18 +135,38 @@ function buildContentsHeader(id) { } else { header += '

          To use this language, use the class "language-' + id + '".

          '; } + + function wrapCode(text) { + return '' + text + ''; + } + + var deps = []; if (language.require) { - var require = language.require; - if (!Array.isArray(require)) { - require = [require]; + deps.push('requires ' + toArray(language.require).map(wrapCode).join(', ')); + } + if (language.optional) { + deps.push('optionally uses ' + toArray(language.optional).map(wrapCode).join(', ')); + } + if (language.modify) { + deps.push('modifies ' + toArray(language.modify).map(wrapCode).join(', ')); + } + if (deps.length) { + header += '

          '; + header += 'Dependencies:'; + header += ' This component'; + if (deps.length === 1) { + header += ' ' + deps[0] + '.'; + } else { + header += ':'; + header += '

            '; + deps.forEach(function (text) { + header += '
          • ' + text + '.
          • ' + }); + header += '
          '; } - - header += '

          Dependencies: The following dependencies need to be loaded before this component: '; - header += require.map(function (dep) { - return '' + dep + ''; - }).join(', '); - header += '.

          '; + header += '

          '; } + return header; } From 26626dedad95b91f765e3212941c7da201cbf4ce Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Sat, 7 Mar 2020 11:43:10 +0100 Subject: [PATCH 0455/1100] OpenCL: Require C (#2231) This changes the language requirement of OpenCL from C++ to C making C++ optional. --- components.js | 2 +- components.json | 2 +- components/prism-opencl.js | 16 ++++++++++------ components/prism-opencl.min.js | 2 +- plugins/autoloader/prism-autoloader.js | 2 +- plugins/autoloader/prism-autoloader.min.js | 2 +- 6 files changed, 15 insertions(+), 11 deletions(-) diff --git a/components.js b/components.js index 9bf6abfa11..a2b211dc7a 100644 --- a/components.js +++ b/components.js @@ -1,2 +1,2 @@ -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"Augmented Backus–Naur form","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","owner":"RunDevelopment"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"Backus–Naur form","alias":"rbnf","aliasTitles":{"rbnf":"Routing Backus–Naur form"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"Extended Backus–Naur form","owner":"RunDevelopment"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment"},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"http":{"title":"HTTP","optional":["css","javascript","json","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"json":{"title":"JSON","owner":"CupOfTea696"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"cpp","modify":["c","cpp"],"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","modify":["actionscript","coffeescript","flow","javascript","typescript","vala"],"owner":"RunDevelopment"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"solidity":{"title":"Solidity (Ethereum)","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","visual-basic"],"owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true}}}; +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"Augmented Backus–Naur form","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","owner":"RunDevelopment"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"Backus–Naur form","alias":"rbnf","aliasTitles":{"rbnf":"Routing Backus–Naur form"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"Extended Backus–Naur form","owner":"RunDevelopment"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment"},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"http":{"title":"HTTP","optional":["css","javascript","json","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"json":{"title":"JSON","owner":"CupOfTea696"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","modify":["actionscript","coffeescript","flow","javascript","typescript","vala"],"owner":"RunDevelopment"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"solidity":{"title":"Solidity (Ethereum)","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","visual-basic"],"owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true}}}; if (typeof module !== 'undefined' && module.exports) { module.exports = components; } \ No newline at end of file diff --git a/components.json b/components.json index df74e79669..153c08c06a 100644 --- a/components.json +++ b/components.json @@ -688,7 +688,7 @@ }, "opencl": { "title": "OpenCL", - "require": "cpp", + "require": "c", "modify": [ "c", "cpp" diff --git a/components/prism-opencl.js b/components/prism-opencl.js index f08629fdfa..b6247b20b1 100644 --- a/components/prism-opencl.js +++ b/components/prism-opencl.js @@ -40,11 +40,15 @@ /* OpenCL host API */ Prism.languages.insertBefore('c', 'keyword', attributes); - // Extracted from doxygen class list http://github.khronos.org/OpenCL-CLHPP/annotated.html - attributes['type-opencl-host-cpp'] = { - pattern: /\b(?:Buffer|BufferGL|BufferRenderGL|CommandQueue|Context|Device|DeviceCommandQueue|EnqueueArgs|Event|Image|Image1D|Image1DArray|Image1DBuffer|Image2D|Image2DArray|Image2DGL|Image3D|Image3DGL|ImageFormat|ImageGL|Kernel|KernelFunctor|LocalSpaceArg|Memory|NDRange|Pipe|Platform|Program|Sampler|SVMAllocator|SVMTraitAtomic|SVMTraitCoarse|SVMTraitFine|SVMTraitReadOnly|SVMTraitReadWrite|SVMTraitWriteOnly|UserEvent)\b/, - alias: 'keyword' - }; + // C++ includes everything from the OpenCL C host API plus the classes defined in cl2.h - Prism.languages.insertBefore('cpp', 'keyword', attributes); + if (Prism.languages.cpp) { + // Extracted from doxygen class list http://github.khronos.org/OpenCL-CLHPP/annotated.html + attributes['type-opencl-host-cpp'] = { + pattern: /\b(?:Buffer|BufferGL|BufferRenderGL|CommandQueue|Context|Device|DeviceCommandQueue|EnqueueArgs|Event|Image|Image1D|Image1DArray|Image1DBuffer|Image2D|Image2DArray|Image2DGL|Image3D|Image3DGL|ImageFormat|ImageGL|Kernel|KernelFunctor|LocalSpaceArg|Memory|NDRange|Pipe|Platform|Program|Sampler|SVMAllocator|SVMTraitAtomic|SVMTraitCoarse|SVMTraitFine|SVMTraitReadOnly|SVMTraitReadWrite|SVMTraitWriteOnly|UserEvent)\b/, + alias: 'keyword' + }; + + Prism.languages.insertBefore('cpp', 'keyword', attributes); + } }(Prism)); diff --git a/components/prism-opencl.min.js b/components/prism-opencl.min.js index 7fc4bc1b3c..f70d8615e5 100644 --- a/components/prism-opencl.min.js +++ b/components/prism-opencl.min.js @@ -1 +1 @@ -!function(E){E.languages.opencl=E.languages.extend("c",{keyword:/\b(?:__attribute__|(?:__)?(?:constant|global|kernel|local|private|read_only|read_write|write_only)|_cl_(?:command_queue|context|device_id|event|kernel|mem|platform_id|program|sampler)|auto|break|case|cl_(?:image_format|mem_fence_flags)|clk_event_t|complex|const|continue|default|do|(?:float|double)(?:16(?:x(?:1|16|2|4|8))?|1x(?:1|16|2|4|8)|2(?:x(?:1|16|2|4|8))?|3|4(?:x(?:1|16|2|4|8))?|8(?:x(?:1|16|2|4|8))?)?|else|enum|event_t|extern|for|goto|(?:u?(?:char|short|int|long)|half|quad|bool)(?:2|3|4|8|16)?|if|image(?:1d_(?:array_|buffer_)?t|2d_(?:array_(?:depth_|msaa_depth_|msaa_)?|depth_|msaa_depth_|msaa_)?t|3d_t)|imaginary|inline|intptr_t|ndrange_t|packed|pipe|ptrdiff_t|queue_t|register|reserve_id_t|restrict|return|sampler_t|signed|size_t|sizeof|static|struct|switch|typedef|uintptr_t|uniform|union|unsigned|void|volatile|while)\b/,"constant-opencl-kernel":{pattern:/\b(?:CHAR_(?:BIT|MAX|MIN)|CLK_(?:ADDRESS_(?:CLAMP(?:_TO_EDGE)?|NONE|REPEAT)|FILTER_(?:LINEAR|NEAREST)|(?:LOCAL|GLOBAL)_MEM_FENCE|NORMALIZED_COORDS_(?:FALSE|TRUE))|CL_(?:BGRA|(?:HALF_)?FLOAT|INTENSITY|LUMINANCE|A?R?G?B?[Ax]?|(?:(?:UN)?SIGNED|[US]NORM)_(?:INT(?:8|16|32))|UNORM_(?:INT_101010|SHORT_(?:555|565)))|(?:DBL|FLT|HALF)_(?:DIG|EPSILON|MANT_DIG|(?:MIN|MAX)(?:(?:_10)?_EXP)?)|FLT_RADIX|HUGE_VALF?|INFINITY|(?:INT|LONG|SCHAR|SHRT)_(?:MAX|MIN)|(?:UCHAR|USHRT|UINT|ULONG)_MAX|MAXFLOAT|M_(?:[12]_PI|2_SQRTPI|E|LN(?:2|10)|LOG(?:10|2)E?|PI(?:_[24])?|SQRT(?:1_2|2))(?:_F|_H)?|NAN)\b/,alias:"constant"},boolean:/\b(?:false|true)\b/,number:/(?:\b0x(?:[\da-f]+\.?[\da-f]*|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?)[fuhl]*/i});var _={"type-opencl-host":{pattern:/\b(?:cl_(?:GLenum|GLint|GLuin|addressing_mode|bitfield|bool|buffer_create_type|build_status|channel_(?:order|type)|(?:u?(?:char|short|int|long)|float|double)(?:2|3|4|8|16)?|command_(?:queue(?:_info|_properties)?|type)|context(?:_info|_properties)?|device_(?:exec_capabilities|fp_config|id|info|local_mem_type|mem_cache_type|type)|(?:event|sampler)(?:_info)?|filter_mode|half|image_info|kernel(?:_info|_work_group_info)?|map_flags|mem(?:_flags|_info|_object_type)?|platform_(?:id|info)|profiling_info|program(?:_build_info|_info)?))\b/,alias:"keyword"},"boolean-opencl-host":{pattern:/\bCL_(?:TRUE|FALSE)\b/,alias:"boolean"},"constant-opencl-host":{pattern:/\bCL_(?:A|ABGR|ADDRESS_(?:CLAMP(?:_TO_EDGE)?|MIRRORED_REPEAT|NONE|REPEAT)|ARGB|BGRA|BLOCKING|BUFFER_CREATE_TYPE_REGION|BUILD_(?:ERROR|IN_PROGRESS|NONE|PROGRAM_FAILURE|SUCCESS)|COMMAND_(?:ACQUIRE_GL_OBJECTS|BARRIER|COPY_(?:BUFFER(?:_RECT|_TO_IMAGE)?|IMAGE(?:_TO_BUFFER)?)|FILL_(?:BUFFER|IMAGE)|MAP(?:_BUFFER|_IMAGE)|MARKER|MIGRATE(?:_SVM)?_MEM_OBJECTS|NATIVE_KERNEL|NDRANGE_KERNEL|READ_(?:BUFFER(?:_RECT)?|IMAGE)|RELEASE_GL_OBJECTS|SVM_(?:FREE|MAP|MEMCPY|MEMFILL|UNMAP)|TASK|UNMAP_MEM_OBJECT|USER|WRITE_(?:BUFFER(?:_RECT)?|IMAGE))|COMPILER_NOT_AVAILABLE|COMPILE_PROGRAM_FAILURE|COMPLETE|CONTEXT_(?:DEVICES|INTEROP_USER_SYNC|NUM_DEVICES|PLATFORM|PROPERTIES|REFERENCE_COUNT)|DEPTH(?:_STENCIL)?|DEVICE_(?:ADDRESS_BITS|AFFINITY_DOMAIN_(?:L[1-4]_CACHE|NEXT_PARTITIONABLE|NUMA)|AVAILABLE|BUILT_IN_KERNELS|COMPILER_AVAILABLE|DOUBLE_FP_CONFIG|ENDIAN_LITTLE|ERROR_CORRECTION_SUPPORT|EXECUTION_CAPABILITIES|EXTENSIONS|GLOBAL_(?:MEM_(?:CACHELINE_SIZE|CACHE_SIZE|CACHE_TYPE|SIZE)|VARIABLE_PREFERRED_TOTAL_SIZE)|HOST_UNIFIED_MEMORY|IL_VERSION|IMAGE(?:2D_MAX_(?:HEIGHT|WIDTH)|3D_MAX_(?:DEPTH|HEIGHT|WIDTH)|_BASE_ADDRESS_ALIGNMENT|_MAX_ARRAY_SIZE|_MAX_BUFFER_SIZE|_PITCH_ALIGNMENT|_SUPPORT)|LINKER_AVAILABLE|LOCAL_MEM_SIZE|LOCAL_MEM_TYPE|MAX_(?:CLOCK_FREQUENCY|COMPUTE_UNITS|CONSTANT_ARGS|CONSTANT_BUFFER_SIZE|GLOBAL_VARIABLE_SIZE|MEM_ALLOC_SIZE|NUM_SUB_GROUPS|ON_DEVICE_(?:EVENTS|QUEUES)|PARAMETER_SIZE|PIPE_ARGS|READ_IMAGE_ARGS|READ_WRITE_IMAGE_ARGS|SAMPLERS|WORK_GROUP_SIZE|WORK_ITEM_DIMENSIONS|WORK_ITEM_SIZES|WRITE_IMAGE_ARGS)|MEM_BASE_ADDR_ALIGN|MIN_DATA_TYPE_ALIGN_SIZE|NAME|NATIVE_VECTOR_WIDTH_(?:CHAR|DOUBLE|FLOAT|HALF|INT|LONG|SHORT)|NOT_(?:AVAILABLE|FOUND)|OPENCL_C_VERSION|PARENT_DEVICE|PARTITION_(?:AFFINITY_DOMAIN|BY_AFFINITY_DOMAIN|BY_COUNTS|BY_COUNTS_LIST_END|EQUALLY|FAILED|MAX_SUB_DEVICES|PROPERTIES|TYPE)|PIPE_MAX_(?:ACTIVE_RESERVATIONS|PACKET_SIZE)|PLATFORM|PREFERRED_(?:GLOBAL_ATOMIC_ALIGNMENT|INTEROP_USER_SYNC|LOCAL_ATOMIC_ALIGNMENT|PLATFORM_ATOMIC_ALIGNMENT|VECTOR_WIDTH_(?:CHAR|DOUBLE|FLOAT|HALF|INT|LONG|SHORT))|PRINTF_BUFFER_SIZE|PROFILE|PROFILING_TIMER_RESOLUTION|QUEUE_(?:ON_(?:DEVICE_(?:MAX_SIZE|PREFERRED_SIZE|PROPERTIES)|HOST_PROPERTIES)|PROPERTIES)|REFERENCE_COUNT|SINGLE_FP_CONFIG|SUB_GROUP_INDEPENDENT_FORWARD_PROGRESS|SVM_(?:ATOMICS|CAPABILITIES|COARSE_GRAIN_BUFFER|FINE_GRAIN_BUFFER|FINE_GRAIN_SYSTEM)|TYPE(?:_ACCELERATOR|_ALL|_CPU|_CUSTOM|_DEFAULT|_GPU)?|VENDOR(?:_ID)?|VERSION)|DRIVER_VERSION|EVENT_(?:COMMAND_(?:EXECUTION_STATUS|QUEUE|TYPE)|CONTEXT|REFERENCE_COUNT)|EXEC_(?:KERNEL|NATIVE_KERNEL|STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST)|FILTER_(?:LINEAR|NEAREST)|FLOAT|FP_(?:CORRECTLY_ROUNDED_DIVIDE_SQRT|DENORM|FMA|INF_NAN|ROUND_TO_INF|ROUND_TO_NEAREST|ROUND_TO_ZERO|SOFT_FLOAT)|GLOBAL|HALF_FLOAT|IMAGE_(?:ARRAY_SIZE|BUFFER|DEPTH|ELEMENT_SIZE|FORMAT|FORMAT_MISMATCH|FORMAT_NOT_SUPPORTED|HEIGHT|NUM_MIP_LEVELS|NUM_SAMPLES|ROW_PITCH|SLICE_PITCH|WIDTH)|INTENSITY|INVALID_(?:ARG_INDEX|ARG_SIZE|ARG_VALUE|BINARY|BUFFER_SIZE|BUILD_OPTIONS|COMMAND_QUEUE|COMPILER_OPTIONS|CONTEXT|DEVICE|DEVICE_PARTITION_COUNT|DEVICE_QUEUE|DEVICE_TYPE|EVENT|EVENT_WAIT_LIST|GLOBAL_OFFSET|GLOBAL_WORK_SIZE|GL_OBJECT|HOST_PTR|IMAGE_DESCRIPTOR|IMAGE_FORMAT_DESCRIPTOR|IMAGE_SIZE|KERNEL|KERNEL_ARGS|KERNEL_DEFINITION|KERNEL_NAME|LINKER_OPTIONS|MEM_OBJECT|MIP_LEVEL|OPERATION|PIPE_SIZE|PLATFORM|PROGRAM|PROGRAM_EXECUTABLE|PROPERTY|QUEUE_PROPERTIES|SAMPLER|VALUE|WORK_DIMENSION|WORK_GROUP_SIZE|WORK_ITEM_SIZE)|KERNEL_(?:ARG_(?:ACCESS_(?:NONE|QUALIFIER|READ_ONLY|READ_WRITE|WRITE_ONLY)|ADDRESS_(?:CONSTANT|GLOBAL|LOCAL|PRIVATE|QUALIFIER)|INFO_NOT_AVAILABLE|NAME|TYPE_(?:CONST|NAME|NONE|PIPE|QUALIFIER|RESTRICT|VOLATILE))|ATTRIBUTES|COMPILE_NUM_SUB_GROUPS|COMPILE_WORK_GROUP_SIZE|CONTEXT|EXEC_INFO_SVM_FINE_GRAIN_SYSTEM|EXEC_INFO_SVM_PTRS|FUNCTION_NAME|GLOBAL_WORK_SIZE|LOCAL_MEM_SIZE|LOCAL_SIZE_FOR_SUB_GROUP_COUNT|MAX_NUM_SUB_GROUPS|MAX_SUB_GROUP_SIZE_FOR_NDRANGE|NUM_ARGS|PREFERRED_WORK_GROUP_SIZE_MULTIPLE|PRIVATE_MEM_SIZE|PROGRAM|REFERENCE_COUNT|SUB_GROUP_COUNT_FOR_NDRANGE|WORK_GROUP_SIZE)|LINKER_NOT_AVAILABLE|LINK_PROGRAM_FAILURE|LOCAL|LUMINANCE|MAP_(?:FAILURE|READ|WRITE|WRITE_INVALIDATE_REGION)|MEM_(?:ALLOC_HOST_PTR|ASSOCIATED_MEMOBJECT|CONTEXT|COPY_HOST_PTR|COPY_OVERLAP|FLAGS|HOST_NO_ACCESS|HOST_PTR|HOST_READ_ONLY|HOST_WRITE_ONLY|KERNEL_READ_AND_WRITE|MAP_COUNT|OBJECT_(?:ALLOCATION_FAILURE|BUFFER|IMAGE1D|IMAGE1D_ARRAY|IMAGE1D_BUFFER|IMAGE2D|IMAGE2D_ARRAY|IMAGE3D|PIPE)|OFFSET|READ_ONLY|READ_WRITE|REFERENCE_COUNT|SIZE|SVM_ATOMICS|SVM_FINE_GRAIN_BUFFER|TYPE|USES_SVM_POINTER|USE_HOST_PTR|WRITE_ONLY)|MIGRATE_MEM_OBJECT_(?:CONTENT_UNDEFINED|HOST)|MISALIGNED_SUB_BUFFER_OFFSET|NONE|NON_BLOCKING|OUT_OF_(?:HOST_MEMORY|RESOURCES)|PIPE_(?:MAX_PACKETS|PACKET_SIZE)|PLATFORM_(?:EXTENSIONS|HOST_TIMER_RESOLUTION|NAME|PROFILE|VENDOR|VERSION)|PROFILING_(?:COMMAND_(?:COMPLETE|END|QUEUED|START|SUBMIT)|INFO_NOT_AVAILABLE)|PROGRAM_(?:BINARIES|BINARY_SIZES|BINARY_TYPE(?:_COMPILED_OBJECT|_EXECUTABLE|_LIBRARY|_NONE)?|BUILD_(?:GLOBAL_VARIABLE_TOTAL_SIZE|LOG|OPTIONS|STATUS)|CONTEXT|DEVICES|IL|KERNEL_NAMES|NUM_DEVICES|NUM_KERNELS|REFERENCE_COUNT|SOURCE)|QUEUED|QUEUE_(?:CONTEXT|DEVICE|DEVICE_DEFAULT|ON_DEVICE|ON_DEVICE_DEFAULT|OUT_OF_ORDER_EXEC_MODE_ENABLE|PROFILING_ENABLE|PROPERTIES|REFERENCE_COUNT|SIZE)|R|RA|READ_(?:ONLY|WRITE)_CACHE|RG|RGB|RGBA|RGBx|RGx|RUNNING|Rx|SAMPLER_(?:ADDRESSING_MODE|CONTEXT|FILTER_MODE|LOD_MAX|LOD_MIN|MIP_FILTER_MODE|NORMALIZED_COORDS|REFERENCE_COUNT)|(?:UN)?SIGNED_INT(?:8|16|32)|SNORM_INT(?:8|16)|SUBMITTED|SUCCESS|UNORM_INT(?:16|24|8|_101010|_101010_2)|UNORM_SHORT_(?:555|565)|VERSION_(?:1_0|1_1|1_2|2_0|2_1)|sBGRA|sRGB|sRGBA|sRGBx)\b/,alias:"constant"},"function-opencl-host":{pattern:/\bcl(?:BuildProgram|CloneKernel|CompileProgram|Create(?:Buffer|CommandQueue(?:WithProperties)?|Context|ContextFromType|Image|Image2D|Image3D|Kernel|KernelsInProgram|Pipe|ProgramWith(?:Binary|BuiltInKernels|IL|Source)|Sampler|SamplerWithProperties|SubBuffer|SubDevices|UserEvent)|Enqueue(?:(?:Barrier|Marker)(?:WithWaitList)?|Copy(?:Buffer(?:Rect|ToImage)?|Image(?:ToBuffer)?)|(?:Fill|Map)(?:Buffer|Image)|MigrateMemObjects|NDRangeKernel|NativeKernel|(?:Read|Write)(?:Buffer(?:Rect)?|Image)|SVM(?:Free|Map|MemFill|Memcpy|MigrateMem|Unmap)|Task|UnmapMemObject|WaitForEvents)|Finish|Flush|Get(?:CommandQueueInfo|ContextInfo|Device(?:AndHostTimer|IDs|Info)|Event(?:Profiling)?Info|ExtensionFunctionAddress(?:ForPlatform)?|HostTimer|ImageInfo|Kernel(?:ArgInfo|Info|SubGroupInfo|WorkGroupInfo)|MemObjectInfo|PipeInfo|Platform(?:IDs|Info)|Program(?:Build)?Info|SamplerInfo|SupportedImageFormats)|LinkProgram|(?:Release|Retain)(?:CommandQueue|Context|Device|Event|Kernel|MemObject|Program|Sampler)|SVM(?:Alloc|Free)|Set(?:CommandQueueProperty|DefaultDeviceCommandQueue|EventCallback|Kernel(?:Arg(?:SVMPointer)?|ExecInfo)|Kernel|MemObjectDestructorCallback|UserEventStatus)|Unload(?:Platform)?Compiler|WaitForEvents)\b/,alias:"function"}};E.languages.insertBefore("c","keyword",_),_["type-opencl-host-cpp"]={pattern:/\b(?:Buffer|BufferGL|BufferRenderGL|CommandQueue|Context|Device|DeviceCommandQueue|EnqueueArgs|Event|Image|Image1D|Image1DArray|Image1DBuffer|Image2D|Image2DArray|Image2DGL|Image3D|Image3DGL|ImageFormat|ImageGL|Kernel|KernelFunctor|LocalSpaceArg|Memory|NDRange|Pipe|Platform|Program|Sampler|SVMAllocator|SVMTraitAtomic|SVMTraitCoarse|SVMTraitFine|SVMTraitReadOnly|SVMTraitReadWrite|SVMTraitWriteOnly|UserEvent)\b/,alias:"keyword"},E.languages.insertBefore("cpp","keyword",_)}(Prism); \ No newline at end of file +!function(E){E.languages.opencl=E.languages.extend("c",{keyword:/\b(?:__attribute__|(?:__)?(?:constant|global|kernel|local|private|read_only|read_write|write_only)|_cl_(?:command_queue|context|device_id|event|kernel|mem|platform_id|program|sampler)|auto|break|case|cl_(?:image_format|mem_fence_flags)|clk_event_t|complex|const|continue|default|do|(?:float|double)(?:16(?:x(?:1|16|2|4|8))?|1x(?:1|16|2|4|8)|2(?:x(?:1|16|2|4|8))?|3|4(?:x(?:1|16|2|4|8))?|8(?:x(?:1|16|2|4|8))?)?|else|enum|event_t|extern|for|goto|(?:u?(?:char|short|int|long)|half|quad|bool)(?:2|3|4|8|16)?|if|image(?:1d_(?:array_|buffer_)?t|2d_(?:array_(?:depth_|msaa_depth_|msaa_)?|depth_|msaa_depth_|msaa_)?t|3d_t)|imaginary|inline|intptr_t|ndrange_t|packed|pipe|ptrdiff_t|queue_t|register|reserve_id_t|restrict|return|sampler_t|signed|size_t|sizeof|static|struct|switch|typedef|uintptr_t|uniform|union|unsigned|void|volatile|while)\b/,"constant-opencl-kernel":{pattern:/\b(?:CHAR_(?:BIT|MAX|MIN)|CLK_(?:ADDRESS_(?:CLAMP(?:_TO_EDGE)?|NONE|REPEAT)|FILTER_(?:LINEAR|NEAREST)|(?:LOCAL|GLOBAL)_MEM_FENCE|NORMALIZED_COORDS_(?:FALSE|TRUE))|CL_(?:BGRA|(?:HALF_)?FLOAT|INTENSITY|LUMINANCE|A?R?G?B?[Ax]?|(?:(?:UN)?SIGNED|[US]NORM)_(?:INT(?:8|16|32))|UNORM_(?:INT_101010|SHORT_(?:555|565)))|(?:DBL|FLT|HALF)_(?:DIG|EPSILON|MANT_DIG|(?:MIN|MAX)(?:(?:_10)?_EXP)?)|FLT_RADIX|HUGE_VALF?|INFINITY|(?:INT|LONG|SCHAR|SHRT)_(?:MAX|MIN)|(?:UCHAR|USHRT|UINT|ULONG)_MAX|MAXFLOAT|M_(?:[12]_PI|2_SQRTPI|E|LN(?:2|10)|LOG(?:10|2)E?|PI(?:_[24])?|SQRT(?:1_2|2))(?:_F|_H)?|NAN)\b/,alias:"constant"},boolean:/\b(?:false|true)\b/,number:/(?:\b0x(?:[\da-f]+\.?[\da-f]*|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?)[fuhl]*/i});var _={"type-opencl-host":{pattern:/\b(?:cl_(?:GLenum|GLint|GLuin|addressing_mode|bitfield|bool|buffer_create_type|build_status|channel_(?:order|type)|(?:u?(?:char|short|int|long)|float|double)(?:2|3|4|8|16)?|command_(?:queue(?:_info|_properties)?|type)|context(?:_info|_properties)?|device_(?:exec_capabilities|fp_config|id|info|local_mem_type|mem_cache_type|type)|(?:event|sampler)(?:_info)?|filter_mode|half|image_info|kernel(?:_info|_work_group_info)?|map_flags|mem(?:_flags|_info|_object_type)?|platform_(?:id|info)|profiling_info|program(?:_build_info|_info)?))\b/,alias:"keyword"},"boolean-opencl-host":{pattern:/\bCL_(?:TRUE|FALSE)\b/,alias:"boolean"},"constant-opencl-host":{pattern:/\bCL_(?:A|ABGR|ADDRESS_(?:CLAMP(?:_TO_EDGE)?|MIRRORED_REPEAT|NONE|REPEAT)|ARGB|BGRA|BLOCKING|BUFFER_CREATE_TYPE_REGION|BUILD_(?:ERROR|IN_PROGRESS|NONE|PROGRAM_FAILURE|SUCCESS)|COMMAND_(?:ACQUIRE_GL_OBJECTS|BARRIER|COPY_(?:BUFFER(?:_RECT|_TO_IMAGE)?|IMAGE(?:_TO_BUFFER)?)|FILL_(?:BUFFER|IMAGE)|MAP(?:_BUFFER|_IMAGE)|MARKER|MIGRATE(?:_SVM)?_MEM_OBJECTS|NATIVE_KERNEL|NDRANGE_KERNEL|READ_(?:BUFFER(?:_RECT)?|IMAGE)|RELEASE_GL_OBJECTS|SVM_(?:FREE|MAP|MEMCPY|MEMFILL|UNMAP)|TASK|UNMAP_MEM_OBJECT|USER|WRITE_(?:BUFFER(?:_RECT)?|IMAGE))|COMPILER_NOT_AVAILABLE|COMPILE_PROGRAM_FAILURE|COMPLETE|CONTEXT_(?:DEVICES|INTEROP_USER_SYNC|NUM_DEVICES|PLATFORM|PROPERTIES|REFERENCE_COUNT)|DEPTH(?:_STENCIL)?|DEVICE_(?:ADDRESS_BITS|AFFINITY_DOMAIN_(?:L[1-4]_CACHE|NEXT_PARTITIONABLE|NUMA)|AVAILABLE|BUILT_IN_KERNELS|COMPILER_AVAILABLE|DOUBLE_FP_CONFIG|ENDIAN_LITTLE|ERROR_CORRECTION_SUPPORT|EXECUTION_CAPABILITIES|EXTENSIONS|GLOBAL_(?:MEM_(?:CACHELINE_SIZE|CACHE_SIZE|CACHE_TYPE|SIZE)|VARIABLE_PREFERRED_TOTAL_SIZE)|HOST_UNIFIED_MEMORY|IL_VERSION|IMAGE(?:2D_MAX_(?:HEIGHT|WIDTH)|3D_MAX_(?:DEPTH|HEIGHT|WIDTH)|_BASE_ADDRESS_ALIGNMENT|_MAX_ARRAY_SIZE|_MAX_BUFFER_SIZE|_PITCH_ALIGNMENT|_SUPPORT)|LINKER_AVAILABLE|LOCAL_MEM_SIZE|LOCAL_MEM_TYPE|MAX_(?:CLOCK_FREQUENCY|COMPUTE_UNITS|CONSTANT_ARGS|CONSTANT_BUFFER_SIZE|GLOBAL_VARIABLE_SIZE|MEM_ALLOC_SIZE|NUM_SUB_GROUPS|ON_DEVICE_(?:EVENTS|QUEUES)|PARAMETER_SIZE|PIPE_ARGS|READ_IMAGE_ARGS|READ_WRITE_IMAGE_ARGS|SAMPLERS|WORK_GROUP_SIZE|WORK_ITEM_DIMENSIONS|WORK_ITEM_SIZES|WRITE_IMAGE_ARGS)|MEM_BASE_ADDR_ALIGN|MIN_DATA_TYPE_ALIGN_SIZE|NAME|NATIVE_VECTOR_WIDTH_(?:CHAR|DOUBLE|FLOAT|HALF|INT|LONG|SHORT)|NOT_(?:AVAILABLE|FOUND)|OPENCL_C_VERSION|PARENT_DEVICE|PARTITION_(?:AFFINITY_DOMAIN|BY_AFFINITY_DOMAIN|BY_COUNTS|BY_COUNTS_LIST_END|EQUALLY|FAILED|MAX_SUB_DEVICES|PROPERTIES|TYPE)|PIPE_MAX_(?:ACTIVE_RESERVATIONS|PACKET_SIZE)|PLATFORM|PREFERRED_(?:GLOBAL_ATOMIC_ALIGNMENT|INTEROP_USER_SYNC|LOCAL_ATOMIC_ALIGNMENT|PLATFORM_ATOMIC_ALIGNMENT|VECTOR_WIDTH_(?:CHAR|DOUBLE|FLOAT|HALF|INT|LONG|SHORT))|PRINTF_BUFFER_SIZE|PROFILE|PROFILING_TIMER_RESOLUTION|QUEUE_(?:ON_(?:DEVICE_(?:MAX_SIZE|PREFERRED_SIZE|PROPERTIES)|HOST_PROPERTIES)|PROPERTIES)|REFERENCE_COUNT|SINGLE_FP_CONFIG|SUB_GROUP_INDEPENDENT_FORWARD_PROGRESS|SVM_(?:ATOMICS|CAPABILITIES|COARSE_GRAIN_BUFFER|FINE_GRAIN_BUFFER|FINE_GRAIN_SYSTEM)|TYPE(?:_ACCELERATOR|_ALL|_CPU|_CUSTOM|_DEFAULT|_GPU)?|VENDOR(?:_ID)?|VERSION)|DRIVER_VERSION|EVENT_(?:COMMAND_(?:EXECUTION_STATUS|QUEUE|TYPE)|CONTEXT|REFERENCE_COUNT)|EXEC_(?:KERNEL|NATIVE_KERNEL|STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST)|FILTER_(?:LINEAR|NEAREST)|FLOAT|FP_(?:CORRECTLY_ROUNDED_DIVIDE_SQRT|DENORM|FMA|INF_NAN|ROUND_TO_INF|ROUND_TO_NEAREST|ROUND_TO_ZERO|SOFT_FLOAT)|GLOBAL|HALF_FLOAT|IMAGE_(?:ARRAY_SIZE|BUFFER|DEPTH|ELEMENT_SIZE|FORMAT|FORMAT_MISMATCH|FORMAT_NOT_SUPPORTED|HEIGHT|NUM_MIP_LEVELS|NUM_SAMPLES|ROW_PITCH|SLICE_PITCH|WIDTH)|INTENSITY|INVALID_(?:ARG_INDEX|ARG_SIZE|ARG_VALUE|BINARY|BUFFER_SIZE|BUILD_OPTIONS|COMMAND_QUEUE|COMPILER_OPTIONS|CONTEXT|DEVICE|DEVICE_PARTITION_COUNT|DEVICE_QUEUE|DEVICE_TYPE|EVENT|EVENT_WAIT_LIST|GLOBAL_OFFSET|GLOBAL_WORK_SIZE|GL_OBJECT|HOST_PTR|IMAGE_DESCRIPTOR|IMAGE_FORMAT_DESCRIPTOR|IMAGE_SIZE|KERNEL|KERNEL_ARGS|KERNEL_DEFINITION|KERNEL_NAME|LINKER_OPTIONS|MEM_OBJECT|MIP_LEVEL|OPERATION|PIPE_SIZE|PLATFORM|PROGRAM|PROGRAM_EXECUTABLE|PROPERTY|QUEUE_PROPERTIES|SAMPLER|VALUE|WORK_DIMENSION|WORK_GROUP_SIZE|WORK_ITEM_SIZE)|KERNEL_(?:ARG_(?:ACCESS_(?:NONE|QUALIFIER|READ_ONLY|READ_WRITE|WRITE_ONLY)|ADDRESS_(?:CONSTANT|GLOBAL|LOCAL|PRIVATE|QUALIFIER)|INFO_NOT_AVAILABLE|NAME|TYPE_(?:CONST|NAME|NONE|PIPE|QUALIFIER|RESTRICT|VOLATILE))|ATTRIBUTES|COMPILE_NUM_SUB_GROUPS|COMPILE_WORK_GROUP_SIZE|CONTEXT|EXEC_INFO_SVM_FINE_GRAIN_SYSTEM|EXEC_INFO_SVM_PTRS|FUNCTION_NAME|GLOBAL_WORK_SIZE|LOCAL_MEM_SIZE|LOCAL_SIZE_FOR_SUB_GROUP_COUNT|MAX_NUM_SUB_GROUPS|MAX_SUB_GROUP_SIZE_FOR_NDRANGE|NUM_ARGS|PREFERRED_WORK_GROUP_SIZE_MULTIPLE|PRIVATE_MEM_SIZE|PROGRAM|REFERENCE_COUNT|SUB_GROUP_COUNT_FOR_NDRANGE|WORK_GROUP_SIZE)|LINKER_NOT_AVAILABLE|LINK_PROGRAM_FAILURE|LOCAL|LUMINANCE|MAP_(?:FAILURE|READ|WRITE|WRITE_INVALIDATE_REGION)|MEM_(?:ALLOC_HOST_PTR|ASSOCIATED_MEMOBJECT|CONTEXT|COPY_HOST_PTR|COPY_OVERLAP|FLAGS|HOST_NO_ACCESS|HOST_PTR|HOST_READ_ONLY|HOST_WRITE_ONLY|KERNEL_READ_AND_WRITE|MAP_COUNT|OBJECT_(?:ALLOCATION_FAILURE|BUFFER|IMAGE1D|IMAGE1D_ARRAY|IMAGE1D_BUFFER|IMAGE2D|IMAGE2D_ARRAY|IMAGE3D|PIPE)|OFFSET|READ_ONLY|READ_WRITE|REFERENCE_COUNT|SIZE|SVM_ATOMICS|SVM_FINE_GRAIN_BUFFER|TYPE|USES_SVM_POINTER|USE_HOST_PTR|WRITE_ONLY)|MIGRATE_MEM_OBJECT_(?:CONTENT_UNDEFINED|HOST)|MISALIGNED_SUB_BUFFER_OFFSET|NONE|NON_BLOCKING|OUT_OF_(?:HOST_MEMORY|RESOURCES)|PIPE_(?:MAX_PACKETS|PACKET_SIZE)|PLATFORM_(?:EXTENSIONS|HOST_TIMER_RESOLUTION|NAME|PROFILE|VENDOR|VERSION)|PROFILING_(?:COMMAND_(?:COMPLETE|END|QUEUED|START|SUBMIT)|INFO_NOT_AVAILABLE)|PROGRAM_(?:BINARIES|BINARY_SIZES|BINARY_TYPE(?:_COMPILED_OBJECT|_EXECUTABLE|_LIBRARY|_NONE)?|BUILD_(?:GLOBAL_VARIABLE_TOTAL_SIZE|LOG|OPTIONS|STATUS)|CONTEXT|DEVICES|IL|KERNEL_NAMES|NUM_DEVICES|NUM_KERNELS|REFERENCE_COUNT|SOURCE)|QUEUED|QUEUE_(?:CONTEXT|DEVICE|DEVICE_DEFAULT|ON_DEVICE|ON_DEVICE_DEFAULT|OUT_OF_ORDER_EXEC_MODE_ENABLE|PROFILING_ENABLE|PROPERTIES|REFERENCE_COUNT|SIZE)|R|RA|READ_(?:ONLY|WRITE)_CACHE|RG|RGB|RGBA|RGBx|RGx|RUNNING|Rx|SAMPLER_(?:ADDRESSING_MODE|CONTEXT|FILTER_MODE|LOD_MAX|LOD_MIN|MIP_FILTER_MODE|NORMALIZED_COORDS|REFERENCE_COUNT)|(?:UN)?SIGNED_INT(?:8|16|32)|SNORM_INT(?:8|16)|SUBMITTED|SUCCESS|UNORM_INT(?:16|24|8|_101010|_101010_2)|UNORM_SHORT_(?:555|565)|VERSION_(?:1_0|1_1|1_2|2_0|2_1)|sBGRA|sRGB|sRGBA|sRGBx)\b/,alias:"constant"},"function-opencl-host":{pattern:/\bcl(?:BuildProgram|CloneKernel|CompileProgram|Create(?:Buffer|CommandQueue(?:WithProperties)?|Context|ContextFromType|Image|Image2D|Image3D|Kernel|KernelsInProgram|Pipe|ProgramWith(?:Binary|BuiltInKernels|IL|Source)|Sampler|SamplerWithProperties|SubBuffer|SubDevices|UserEvent)|Enqueue(?:(?:Barrier|Marker)(?:WithWaitList)?|Copy(?:Buffer(?:Rect|ToImage)?|Image(?:ToBuffer)?)|(?:Fill|Map)(?:Buffer|Image)|MigrateMemObjects|NDRangeKernel|NativeKernel|(?:Read|Write)(?:Buffer(?:Rect)?|Image)|SVM(?:Free|Map|MemFill|Memcpy|MigrateMem|Unmap)|Task|UnmapMemObject|WaitForEvents)|Finish|Flush|Get(?:CommandQueueInfo|ContextInfo|Device(?:AndHostTimer|IDs|Info)|Event(?:Profiling)?Info|ExtensionFunctionAddress(?:ForPlatform)?|HostTimer|ImageInfo|Kernel(?:ArgInfo|Info|SubGroupInfo|WorkGroupInfo)|MemObjectInfo|PipeInfo|Platform(?:IDs|Info)|Program(?:Build)?Info|SamplerInfo|SupportedImageFormats)|LinkProgram|(?:Release|Retain)(?:CommandQueue|Context|Device|Event|Kernel|MemObject|Program|Sampler)|SVM(?:Alloc|Free)|Set(?:CommandQueueProperty|DefaultDeviceCommandQueue|EventCallback|Kernel(?:Arg(?:SVMPointer)?|ExecInfo)|Kernel|MemObjectDestructorCallback|UserEventStatus)|Unload(?:Platform)?Compiler|WaitForEvents)\b/,alias:"function"}};E.languages.insertBefore("c","keyword",_),E.languages.cpp&&(_["type-opencl-host-cpp"]={pattern:/\b(?:Buffer|BufferGL|BufferRenderGL|CommandQueue|Context|Device|DeviceCommandQueue|EnqueueArgs|Event|Image|Image1D|Image1DArray|Image1DBuffer|Image2D|Image2DArray|Image2DGL|Image3D|Image3DGL|ImageFormat|ImageGL|Kernel|KernelFunctor|LocalSpaceArg|Memory|NDRange|Pipe|Platform|Program|Sampler|SVMAllocator|SVMTraitAtomic|SVMTraitCoarse|SVMTraitFine|SVMTraitReadOnly|SVMTraitReadWrite|SVMTraitWriteOnly|UserEvent)\b/,alias:"keyword"},E.languages.insertBefore("cpp","keyword",_))}(Prism); \ No newline at end of file diff --git a/plugins/autoloader/prism-autoloader.js b/plugins/autoloader/prism-autoloader.js index f852cce5e7..b28c476918 100644 --- a/plugins/autoloader/prism-autoloader.js +++ b/plugins/autoloader/prism-autoloader.js @@ -73,7 +73,7 @@ "n4js": "javascript", "nginx": "clike", "objectivec": "c", - "opencl": "cpp", + "opencl": "c", "parser": "markup", "php": [ "clike", diff --git a/plugins/autoloader/prism-autoloader.min.js b/plugins/autoloader/prism-autoloader.min.js index 11e5487878..defe59f0da 100644 --- a/plugins/autoloader/prism-autoloader.min.js +++ b/plugins/autoloader/prism-autoloader.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof self&&self.Prism&&self.document&&document.createElement){var c={javascript:"clike",actionscript:"javascript",arduino:"cpp",aspnet:["markup","csharp"],bison:"c",c:"clike",csharp:"clike",cpp:"c",coffeescript:"javascript",crystal:"ruby","css-extras":"css",d:"clike",dart:"clike",django:"markup-templating",ejs:["javascript","markup-templating"],etlua:["lua","markup-templating"],erb:["ruby","markup-templating"],fsharp:"clike","firestore-security-rules":"clike",flow:"javascript",ftl:"markup-templating",glsl:"clike",gml:"clike",go:"clike",groovy:"clike",haml:"ruby",handlebars:"markup-templating",haxe:"clike",java:"clike",javadoc:["markup","java","javadoclike"],jolie:"clike",jsdoc:["javascript","javadoclike"],"js-extras":"javascript","js-templates":"javascript",jsonp:"json",json5:"json",kotlin:"clike",latte:["clike","markup-templating","php"],less:"css",lilypond:"scheme",markdown:"markup","markup-templating":"markup",n4js:"javascript",nginx:"clike",objectivec:"c",opencl:"cpp",parser:"markup",php:["clike","markup-templating"],phpdoc:["php","javadoclike"],"php-extras":"php",plsql:"sql",processing:"clike",protobuf:"clike",pug:["markup","javascript"],qml:"javascript",qore:"clike",jsx:["markup","javascript"],tsx:["jsx","typescript"],reason:"clike",ruby:"clike",sass:"css",scss:"css",scala:"java","shell-session":"bash",smarty:"markup-templating",solidity:"clike",soy:"markup-templating",sparql:"turtle",sqf:"clike",swift:"clike",tap:"yaml",textile:"markup",tt2:["clike","markup-templating"],twig:"markup",typescript:"javascript","t4-cs":["t4-templating","csharp"],"t4-vb":["t4-templating","visual-basic"],vala:"clike",vbnet:"basic",velocity:"markup",wiki:"markup",xeora:"markup",xquery:"markup"},l={html:"markup",xml:"markup",svg:"markup",mathml:"markup",js:"javascript",g4:"antlr4",adoc:"asciidoc",shell:"bash",rbnf:"bnf",conc:"concurnas",cs:"csharp",dotnet:"csharp",coffee:"coffeescript",jinja2:"django","dns-zone":"dns-zone-file",dockerfile:"docker",gamemakerlanguage:"gml",hs:"haskell",tex:"latex",context:"latex",ly:"lilypond",emacs:"lisp",elisp:"lisp","emacs-lisp":"lisp",md:"markdown",moon:"moonscript",n4jsd:"n4js",objectpascal:"pascal",px:"pcaxis",py:"python",robot:"robotframework",rb:"ruby",sln:"solution-file",rq:"sparql",trig:"turtle",ts:"typescript",t4:"t4-cs",vb:"visual-basic",xeoracube:"xeora",yml:"yaml"},n={},a="components/",e=Prism.util.currentScript();if(e){var t=/\bplugins\/autoloader\/prism-autoloader\.(?:min\.)js$/i,s=/[\w-]+\.(?:min\.)js$/i;if(e.hasAttribute("data-autoloader-path"))a=e.getAttribute("data-autoloader-path").trim().replace(/\/?$/,"/");else{var i=e.src;t.test(i)?a=i.replace(t,"components/"):s.test(i)&&(a=i.replace(s,"components/"))}}var p=Prism.plugins.autoloader={languages_path:a,use_minified:!0,loadLanguages:o};Prism.hooks.add("complete",function(a){a.element&&a.language&&!a.grammar&&"none"!==a.language&&function(a,e){a in l&&(a=l[a]);var t=e.getAttribute("data-dependencies"),s=e.parentElement;!t&&s&&"pre"===s.tagName.toLowerCase()&&(t=s.getAttribute("data-dependencies")),o(t=t?t.split(/\s*,\s*/g):[],function(){m(a,function(){Prism.highlightElement(e)})})}(a.language,a.element)})}function o(a,e,t){"string"==typeof a&&(a=[a]);var s=a.length,i=0,r=!1;function c(){r||++i===s&&e&&e(a)}0!==s?a.forEach(function(a){m(a,c,function(){r||(r=!0,t&&t(a))})}):e&&setTimeout(e,0)}function m(e,t,s){var i=0<=e.indexOf("!");e=e.replace("!",""),e=l[e]||e;var a=function(){var a=n[e];if(a||(a=n[e]={callbacks:[]}),a.callbacks.push({success:t,error:s}),!i&&Prism.languages[e])u(e,"success");else if(!i&&a.error)u(e,"error");else if(i||!a.loading){a.loading=!0,function(a,e,t){var s=document.createElement("script");s.src=a,s.async=!0,s.onload=function(){document.body.removeChild(s),e&&e()},s.onerror=function(){document.body.removeChild(s),t&&t()},document.body.appendChild(s)}(function(a){return p.languages_path+"prism-"+a+(p.use_minified?".min":"")+".js"}(e),function(){a.loading=!1,u(e,"success")},function(){a.loading=!1,a.error=!0,u(e,"error")})}},r=c[e];r&&r.length?o(r,a,s):a()}function u(a,e){if(n[a]){for(var t=n[a].callbacks,s=0,i=t.length;s Date: Sat, 7 Mar 2020 11:53:31 +0100 Subject: [PATCH 0456/1100] Added tests for examples (#2216) This adds a new test to validate the structure and syntax of all examples and moves the existing example test into the mocha test suite. --- examples/prism-abap.html | 10 +- examples/prism-bro.html | 96 ++++++++--------- examples/prism-clojure.html | 6 +- examples/prism-concurnas.html | 8 +- examples/prism-docker.html | 2 +- examples/prism-factor.html | 7 +- examples/prism-liquid.html | 12 +-- examples/prism-markup.html | 6 +- examples/prism-mel.html | 10 +- examples/prism-opencl.html | 10 +- examples/prism-q.html | 4 +- examples/prism-renpy.html | 30 ++---- examples/prism-soy.html | 4 +- examples/prism-sparql.html | 7 +- examples/prism-tap.html | 2 +- examples/prism-vala.html | 10 +- gulpfile.js/premerge.js | 46 +-------- package-lock.json | 54 ++++++++++ package.json | 4 +- tests/examples-test.js | 187 ++++++++++++++++++++++++++++++++++ 20 files changed, 352 insertions(+), 163 deletions(-) create mode 100644 tests/examples-test.js diff --git a/examples/prism-abap.html b/examples/prism-abap.html index dfda1f7f18..103a454d58 100644 --- a/examples/prism-abap.html +++ b/examples/prism-abap.html @@ -1,11 +1,11 @@

          Comments

          
           * Line Comments
          -" End of line comment used as line comment.
          -value = 1. " End of line comment
          +" End of line comment used as line comment.
          +value = 1. " End of line comment
           
           DATA:
          -  "! ABAPDoc comment
          +  "! ABAPDoc comment
             value TYPE i.
           
          @@ -16,7 +16,7 @@

          Strings

          my_string = 'String with an escaped '' inside'. my_string = |A string template: { nvalue } times|. my_string = |A string template: { nvalue } times|. -my_string = |Characters \|, \{, and \} have to be escaped by \\ in literal text.|. +my_string = |Characters \|, \{, and \} have to be escaped by \\ in literal text.|.

          Numbers and Operators

          @@ -62,4 +62,4 @@

          Structures and Classes

          CREATE OBJECT lo_instace. my_structure-component = lo_instace->my_method( ). - \ No newline at end of file + diff --git a/examples/prism-bro.html b/examples/prism-bro.html index d7645c6db5..86d3b3d9ea 100644 --- a/examples/prism-bro.html +++ b/examples/prism-bro.html @@ -55,100 +55,100 @@

          Full example

          # Whether to consider UDP "connections" for scan detection. # Can lead to false positives due to UDP fanout from some P2P apps. - const suppress_UDP_scan_checks = F &redef; + const suppress_UDP_scan_checks = F &redef; - const activate_priv_port_check = T &redef; - const activate_landmine_check = F &redef; - const landmine_thresh_trigger = 5 &redef; + const activate_priv_port_check = T &redef; + const activate_landmine_check = F &redef; + const landmine_thresh_trigger = 5 &redef; - const landmine_address: set[addr] &redef; + const landmine_address: set[addr] &redef; - const scan_summary_trigger = 25 &redef; - const port_summary_trigger = 20 &redef; - const lowport_summary_trigger = 10 &redef; + const scan_summary_trigger = 25 &redef; + const port_summary_trigger = 20 &redef; + const lowport_summary_trigger = 10 &redef; # Raise ShutdownThresh after this many failed attempts - const shut_down_thresh = 100 &redef; + const shut_down_thresh = 100 &redef; # Which services should be analyzed when detecting scanning # (not consulted if analyze_all_services is set). - const analyze_services: set[port] &redef; - const analyze_all_services = T &redef; + const analyze_services: set[port] &redef; + const analyze_all_services = T &redef; # Track address scaners only if at least these many hosts contacted. - const addr_scan_trigger = 0 &redef; + const addr_scan_trigger = 0 &redef; # Ignore address scanners for further scan detection after # scanning this many hosts. # 0 disables. - const ignore_scanners_threshold = 0 &redef; + const ignore_scanners_threshold = 0 &redef; # Report a scan of peers at each of these points. const report_peer_scan: vector of count = { 20, 100, 1000, 10000, 50000, 100000, 250000, 500000, 1000000, - } &redef; + } &redef; const report_outbound_peer_scan: vector of count = { 100, 1000, 10000, - } &redef; + } &redef; # Report a scan of ports at each of these points. const report_port_scan: vector of count = { 50, 250, 1000, 5000, 10000, 25000, 65000, - } &redef; + } &redef; # Once a source has scanned this many different ports (to however many # different remote hosts), start tracking its per-destination access. - const possible_port_scan_thresh = 20 &redef; + const possible_port_scan_thresh = 20 &redef; # Threshold for scanning privileged ports. - const priv_scan_trigger = 5 &redef; + const priv_scan_trigger = 5 &redef; const troll_skip_service = { 25/tcp, 21/tcp, 22/tcp, 20/tcp, 80/tcp, - } &redef; + } &redef; const report_accounts_tried: vector of count = { 20, 100, 1000, 10000, 100000, 1000000, - } &redef; + } &redef; const report_remote_accounts_tried: vector of count = { 100, 500, - } &redef; + } &redef; # Report a successful password guessing if the source attempted # at least this many. - const password_guessing_success_threshhold = 20 &redef; + const password_guessing_success_threshhold = 20 &redef; - const skip_accounts_tried: set[addr] &redef; + const skip_accounts_tried: set[addr] &redef; const addl_web = { 81/tcp, 443/tcp, 8000/tcp, 8001/tcp, 8080/tcp, } - &redef; + &redef; - const skip_services = { 113/tcp, } &redef; + const skip_services = { 113/tcp, } &redef; const skip_outbound_services = { 21/tcp, addl_web, } - &redef; + &redef; const skip_scan_sources = { 255.255.255.255, # who knows why we see these, but we do - } &redef; + } &redef; - const skip_scan_nets: set[subnet] = {} &redef; + const skip_scan_nets: set[subnet] = {} &redef; # List of well known local server/ports to exclude for scanning # purposes. - const skip_dest_server_ports: set[addr, port] = {} &redef; + const skip_dest_server_ports: set[addr, port] = {} &redef; # Reverse (SYN-ack) scans seen from these ports are considered # to reflect possible SYN-flooding backscatter, and not true # (stealth) scans. const backscatter_ports = { 80/tcp, 8080/tcp, 53/tcp, 53/udp, 179/tcp, 6666/tcp, 6667/tcp, - } &redef; + } &redef; const report_backscatter: vector of count = { 20, - } &redef; + } &redef; global check_scan: function(c: connection, established: bool, reverse: bool): bool; @@ -174,14 +174,14 @@

          Full example

          # Indexed by scanner address, yields # distinct peers scanned. # pre_distinct_peers tracks until addr_scan_trigger hosts first. global pre_distinct_peers: table[addr] of set[addr] - &read_expire = 15 mins &redef; + &read_expire = 15 mins &redef; global distinct_peers: table[addr] of set[addr] - &read_expire = 15 mins &expire_func=scan_summary &redef; + &read_expire = 15 mins &expire_func=scan_summary &redef; global distinct_ports: table[addr] of set[port] - &read_expire = 15 mins &expire_func=port_summary &redef; + &read_expire = 15 mins &expire_func=port_summary &redef; global distinct_low_ports: table[addr] of set[port] - &read_expire = 15 mins &expire_func=lowport_summary &redef; + &read_expire = 15 mins &expire_func=lowport_summary &redef; # Indexed by scanner address, yields a table with scanned hosts # (and ports). @@ -196,23 +196,23 @@

          Full example

          global accounts_tried: table[addr] of set[string, string] &read_expire = 1 days; - global ignored_scanners: set[addr] &create_expire = 1 day &redef; + global ignored_scanners: set[addr] &create_expire = 1 day &redef; # These tables track whether a threshold has been reached. # More precisely, the counter is the next index of threshold vector. global shut_down_thresh_reached: table[addr] of bool &default=F; global rb_idx: table[addr] of count - &default=1 &read_expire = 1 days &redef; + &default=1 &read_expire = 1 days &redef; global rps_idx: table[addr] of count - &default=1 &read_expire = 1 days &redef; + &default=1 &read_expire = 1 days &redef; global rops_idx: table[addr] of count - &default=1 &read_expire = 1 days &redef; + &default=1 &read_expire = 1 days &redef; global rpts_idx: table[addr,addr] of count - &default=1 &read_expire = 1 days &redef; + &default=1 &read_expire = 1 days &redef; global rat_idx: table[addr] of count - &default=1 &read_expire = 1 days &redef; + &default=1 &read_expire = 1 days &redef; global rrat_idx: table[addr] of count - &default=1 &read_expire = 1 days &redef; + &default=1 &read_expire = 1 days &redef; } global thresh_check: function(v: vector of count, idx: table[addr] of count, @@ -388,7 +388,7 @@

          Full example

          { # XXXXX if ( orig !in distinct_peers ) - distinct_peers[orig] = set() &mergeable; + distinct_peers[orig] = set() &mergeable; if ( resp !in distinct_peers[orig] ) add distinct_peers[orig][resp]; @@ -448,7 +448,7 @@

          Full example

          if ( orig !in distinct_ports || service !in distinct_ports[orig] ) { if ( orig !in distinct_ports ) - distinct_ports[orig] = set() &mergeable; + distinct_ports[orig] = set() &mergeable; if ( service !in distinct_ports[orig] ) add distinct_ports[orig][service]; @@ -456,7 +456,7 @@

          Full example

          if ( |distinct_ports[orig]| >= possible_port_scan_thresh && orig !in scan_triples ) { - scan_triples[orig] = table() &mergeable; + scan_triples[orig] = table() &mergeable; add possible_scan_sources[orig]; } } @@ -469,7 +469,7 @@

          Full example

          service !in distinct_low_ports[orig] ) { if ( orig !in distinct_low_ports ) - distinct_low_ports[orig] = set() &mergeable; + distinct_low_ports[orig] = set() &mergeable; add distinct_low_ports[orig][service]; @@ -494,10 +494,10 @@

          Full example

          if ( orig in possible_scan_sources ) { if ( orig !in scan_triples ) - scan_triples[orig] = table() &mergeable; + scan_triples[orig] = table() &mergeable; if ( resp !in scan_triples[orig] ) - scan_triples[orig][resp] = set() &mergeable; + scan_triples[orig][resp] = set() &mergeable; if ( service !in scan_triples[orig][resp] ) { diff --git a/examples/prism-clojure.html b/examples/prism-clojure.html index 4dd511816f..8e12fca893 100644 --- a/examples/prism-clojure.html +++ b/examples/prism-clojure.html @@ -334,14 +334,14 @@

          Full example

          java.util.Calendar)) ; Use the class name with a "." at the end to make a new instance -(Date.) ; +(Date.) ; <a date object> ; Use . to call methods. Or, use the ".method" shortcut -(. (Date.) getTime) ; +(. (Date.) getTime) ; <a timestamp> (.getTime (Date.)) ; exactly the same thing. ; Use / to call static methods -(System/currentTimeMillis) ; (system is always present) +(System/currentTimeMillis) ; <a timestamp> (system is always present) ; Use doto to make dealing with (mutable) classes more tolerable (import java.util.Calendar) diff --git a/examples/prism-concurnas.html b/examples/prism-concurnas.html index 82698f4416..87b9a4ce06 100644 --- a/examples/prism-concurnas.html +++ b/examples/prism-concurnas.html @@ -65,10 +65,10 @@

          Full example

          thesum = sum(1, 2, 3, 4, 5) //partially defined typedef -typedef NameMap = java.util.ArrayList>> +typedef NameMap<X> = java.util.ArrayList<java.util.HashMap<String, java.util.HashSet<X>>> //using typedefs... -nm NameMap= new NameMap() +nm NameMap<String>= new NameMap<String>() @Annotation class MyClass(a int, b int, c String){ @@ -79,11 +79,11 @@

          Full example

          mc2 = mc1@ //copy mc1 assert mc1 == mc2//same values! -assert mc1 &<> mc2//different objects! +assert mc1 &<> mc2//different objects! mc3 = mc1@(a = 100)//copy mc1 but overwrite value of a assert 'MyClass(100, 14, "hi there")' == mc3.toString() -mc4 = mc1@()//copy mc1 but exclude a and b +mc4 = mc1@(<a, b>)//copy mc1 but exclude a and b assert 'MyClass(0, 0, "hi there")' == mc3.toString() diff --git a/examples/prism-docker.html b/examples/prism-docker.html index 86511b3889..325d65035c 100644 --- a/examples/prism-docker.html +++ b/examples/prism-docker.html @@ -10,7 +10,7 @@

          Full example

          # VERSION 0.0.1 FROM ubuntu -MAINTAINER Victor Vieux +MAINTAINER Victor Vieux <victor@docker.com> LABEL Description="This image is used to start the foobar executable" Vendor="ACME Products" Version="1.0" RUN apt-get update && apt-get install -y inotify-tools nginx apache2 openssh-server diff --git a/examples/prism-factor.html b/examples/prism-factor.html index 6bde0a221f..90bb143025 100644 --- a/examples/prism-factor.html +++ b/examples/prism-factor.html @@ -55,8 +55,7 @@

          Sequences

          Regular Expressions

          USE: regexp
          -R/ abcde?.*+\?\.\*\+\/\\\/idmsr-idmsr/idmsr-idmsr
          -
          +R/ abcde?.*+\?\.\*\+\/\\\/idmsr-idmsr/idmsr-idmsr

          Colon parsing words

          : a ( -- ) ;
          @@ -73,9 +72,9 @@ 

          Special words (builtins, conventions)

          new last-index + - neg -<array> <=> SYNTAX: x $[ xyz ] +<array> <=> SYNTAX: x $[ xyz ] -set-x change-x with-variable ?of if* (gensym) hex. $description reader>> >>setter writer<< +set-x change-x with-variable ?of if* (gensym) hex. $description reader>> >>setter writer<< string>number >hex base> mutater!
          diff --git a/examples/prism-liquid.html b/examples/prism-liquid.html index 7497197558..55058a2651 100644 --- a/examples/prism-liquid.html +++ b/examples/prism-liquid.html @@ -3,7 +3,7 @@

          Comments

          Control Flow

          -Liquid provides multiple control flow statements. +

          Liquid provides multiple control flow statements.

          if

          
          @@ -18,7 +18,7 @@ 

          if

          unless

          -The opposite of if – executes a block of code only if a certain condition is not met. +

          The opposite of if – executes a block of code only if a certain condition is not met.

          
           {% unless product.title == 'Awesome Shoes' %}
          @@ -28,7 +28,7 @@ 

          unless

          case

          -Creates a switch statement to compare a variable with different values. case initializes the switch statement, and when compares its values. +

          Creates a switch statement to compare a variable with different values. case initializes the switch statement, and when compares its values.

          
           {% assign handle = 'cake' %}
          @@ -44,10 +44,10 @@ 

          case

          for

          -Repeatedly executes a block of code. +

          Repeatedly executes a block of code.

          -break = Causes the loop to stop iterating when it encounters the break tag. -continue = Causes the loop to skip the current iteration when it encounters the continue tag. +

          break = Causes the loop to stop iterating when it encounters the break tag.
          +continue = Causes the loop to skip the current iteration when it encounters the continue tag.

          
           {% for i in (1..10) %}
          diff --git a/examples/prism-markup.html b/examples/prism-markup.html
          index ac00e7f637..e99c2f71b4 100644
          --- a/examples/prism-markup.html
          +++ b/examples/prism-markup.html
          @@ -72,6 +72,6 @@ 

          Multi-line attribute values

          baz">

          XML tags with non-ASCII characters

          -
          <Läufer>foo</Läufer>
          -<tag läufer="läufer">bar</tag>
          -<läufer:tag>baz</läufer:tag>
          \ No newline at end of file +
          <Läufer>foo</Läufer>
          +<tag läufer="läufer">bar</tag>
          +<läufer:tag>baz</läufer:tag>
          diff --git a/examples/prism-mel.html b/examples/prism-mel.html index eaf3ba517f..a42cf884a1 100644 --- a/examples/prism-mel.html +++ b/examples/prism-mel.html @@ -28,14 +28,14 @@

          Arrays, vectors and matrices

          print($array[1]); // Prints "second\n" print($array[2]); // Prints "third\n" -vector $roger = <<3.0, 7.7, 9.1>>; -vector $more = <<4.5, 6.789, 9.12356>>; +vector $roger = <<3.0, 7.7, 9.1>>; +vector $more = <<4.5, 6.789, 9.12356>>; // Assign a vector to variable $test: -vector $test = <<3.0, 7.7, 9.1>>; +vector $test = <<3.0, 7.7, 9.1>>; $test = <<$test.x, 5.5, $test.z>> -// $test is now <<3.0, 5.5, 9.1>> +// $test is now <<3.0, 5.5, 9.1>> -matrix $a3[3][4] = <<2.5, 4.5, 3.25, 8.05; +matrix $a3[3][4] = <<2.5, 4.5, 3.25, 8.05; 1.12, 1.3, 9.5, 5.2; 7.23, 6.006, 2.34, 4.67>>
          diff --git a/examples/prism-opencl.html b/examples/prism-opencl.html index 92d54222e2..6bfb735703 100644 --- a/examples/prism-opencl.html +++ b/examples/prism-opencl.html @@ -7,14 +7,14 @@

          OpenCL host code

          // OpenCL functions, constants, etc. are also highlighted in OpenCL host code in the c or cpp language
           cl::Event KernelFilterImages::runSingle(const cl::Image2D& imgSrc, SPImage2D& imgDst)
           {
          -	const size_t rows = imgSrc.getImageInfo();
          -	const size_t cols = imgSrc.getImageInfo();
          +	const size_t rows = imgSrc.getImageInfo<CL_IMAGE_HEIGHT>();
          +	const size_t cols = imgSrc.getImageInfo<CL_IMAGE_WIDTH>();
           
           	ASSERT(rows > 0 && cols > 0, "The image object seems to be invalid, no rows/cols set");
          -	ASSERT(imgSrc.getImageInfo().image_channel_data_type == CL_FLOAT, "Only float type images are supported");
          -	ASSERT(imgSrc.getInfo() == CL_MEM_READ_ONLY || imgSrc.getInfo() == CL_MEM_READ_WRITE, "Can't read the input image");
          +	ASSERT(imgSrc.getImageInfo<CL_IMAGE_FORMAT>().image_channel_data_type == CL_FLOAT, "Only float type images are supported");
          +	ASSERT(imgSrc.getInfo<CL_MEM_FLAGS>() == CL_MEM_READ_ONLY || imgSrc.getInfo<CL_MEM_FLAGS>() == CL_MEM_READ_WRITE, "Can't read the input image");
           
          -	imgDst = std::make_shared(*context, CL_MEM_READ_WRITE, cl::ImageFormat(CL_R, CL_FLOAT), cols, rows);
          +	imgDst = std::make_shared<cl::Image2D>(*context, CL_MEM_READ_WRITE, cl::ImageFormat(CL_R, CL_FLOAT), cols, rows);
           
           	cl::Kernel kernel(*program, "filter_single");
           	kernel.setArg(0, imgSrc);
          diff --git a/examples/prism-q.html b/examples/prism-q.html
          index 9d7d5c6226..85673d3abc 100644
          --- a/examples/prism-q.html
          +++ b/examples/prism-q.html
          @@ -58,8 +58,8 @@ 

          Dates

          Verbs

          99+L
          -x<42|x>98
          -(x<42)|x>98
          +x<42|x>98
          +(x<42)|x>98
           42~(4 2;(1 0))
           (4 2)~(4; 2*1)
          diff --git a/examples/prism-renpy.html b/examples/prism-renpy.html index dffac07c4b..746d215b32 100644 --- a/examples/prism-renpy.html +++ b/examples/prism-renpy.html @@ -1,21 +1,16 @@

          Comments

          -
          -    # This is a comment
          -
          +
          # This is a comment

          Strings

          -
          -    "foo \"bar\" baz"
          +
          "foo \"bar\" baz"
           'foo \'bar\' baz'
           """ "Multi-line" strings
           are supported."""
           ''' 'Multi-line' strings
          -are supported.'''
          -
          +are supported.'''

          Python

          -
          -    class Dog:
          +
          class Dog:
           
               tricks = []             # mistaken use of a class variable
           
          @@ -23,19 +18,15 @@ 

          Python

          self.name = name def add_trick(self, trick): - self.tricks.append(trick)
          -
          + self.tricks.append(trick)

          Properties

          -
          -    style my_text is text:
          +
          style my_text is text:
               size 40
          -    font "gentium.ttf"
          -
          + font "gentium.ttf"

          Configuration

          -
          -    init -1:
          +
          init -1:
               python hide:
           
                   ## Should we enable the use of developer tools? This should be
          @@ -52,8 +43,7 @@ 

          Configuration

          ## This controls the title of the window, when Ren'Py is ## running in a window. - config.window_title = u"The Question"
          -
          + config.window_title = u"The Question"

          Full example

          @@ -120,4 +110,4 @@

          Full example

          "... to ask her later.": - jump later
          \ No newline at end of file + jump later
          diff --git a/examples/prism-soy.html b/examples/prism-soy.html index 648b8e5f91..9b43ceb75b 100644 --- a/examples/prism-soy.html +++ b/examples/prism-soy.html @@ -11,7 +11,7 @@

          Variable

          Commands

          {template .helloNames}
             // Greet the person.
          -  {call .helloName data="all" /}
          + {call .helloName data="all" /}<br> // Greet the additional people. {foreach $additionalName in $additionalNames} {call .helloName} @@ -33,4 +33,4 @@

          Functions and print directives

          Literal section

          {literal}
           This is not a {$variable}
          -{/literal}
          \ No newline at end of file +{/literal}
          diff --git a/examples/prism-sparql.html b/examples/prism-sparql.html index 5dbcdf233b..f416c8598c 100644 --- a/examples/prism-sparql.html +++ b/examples/prism-sparql.html @@ -1,6 +1,7 @@

          Introduction

          -The queries shown here can be found in the SPARQL specifications: -
          https://www.w3.org/TR/sparql11-query/ + +

          The queries shown here can be found in the SPARQL specifications: +https://www.w3.org/TR/sparql11-query/

          query 2.1.6 Examples of Query Syntax

          @@ -269,7 +270,7 @@

          query 11.6-q1 Extensible Value Testing

          }
          -The final example query is not based on the SPARQL 1.1 queries. +

          The final example query is not based on the SPARQL 1.1 queries.

          Full Example query

          diff --git a/examples/prism-tap.html b/examples/prism-tap.html index 4ed15fa754..d395678948 100644 --- a/examples/prism-tap.html +++ b/examples/prism-tap.html @@ -1,5 +1,5 @@

          Full example

          -
          1..48
          +
          1..48
           ok 1 Description # Directive
           # Diagnostic
           ....
          diff --git a/examples/prism-vala.html b/examples/prism-vala.html
          index ef5e98a921..456bdce2af 100644
          --- a/examples/prism-vala.html
          +++ b/examples/prism-vala.html
          @@ -1,10 +1,10 @@
           

          Comments

          -
          // Single line comment
          +
          // Single line comment
           /** Multi-line
           doc comment */

          Strings

          -
          "foo \"bar\" baz"
          +
          "foo \"bar\" baz"
           "Multi-line strings ending with a \
           are supported too."
           """Verbatim strings
          @@ -13,10 +13,10 @@ 

          Strings

          @"Template string with variables $var1 $(var2 * 2)"

          Regex

          -
          /foo?[ ]*bar/
          +
          /foo?[ ]*bar/

          Full example

          -
          using Gtk;
          +
          using Gtk;
           
           int main (string[] args) {
           	Gtk.init(ref args);
          @@ -30,4 +30,4 @@ 

          Full example

          Gtk.main(); return 0; -}
          \ No newline at end of file +}
          diff --git a/gulpfile.js/premerge.js b/gulpfile.js/premerge.js index d674b2c5b2..c83894b102 100644 --- a/gulpfile.js/premerge.js +++ b/gulpfile.js/premerge.js @@ -1,10 +1,6 @@ "use strict"; -const { parallel } = require('gulp'); -const fs = require('fs'); const git = require('simple-git/promise')(__dirname); -// use the JSON file because this file is less susceptible to merge conflicts -const { languages } = require('../components.json'); /** @@ -19,46 +15,6 @@ function gitChanges() { }); } -/** - * Checks that all languages have and example. - */ -async function hasExample() { - const exampleFiles = new Set(fs.readdirSync(__dirname + '/../examples')); - const ignore = new Set([ - // these are libraries and not languages - 'markup-templating', - 't4-templating', - // this does alter some languages but it's mainly a library - 'javadoclike', - // Regex doesn't have any classes supported by our themes and mainly extends other languages - 'regex' - ]); - - /** @type {string[]} */ - const missing = []; - for (const lang in languages) { - if (lang === 'meta') { - continue; - } - - if (!exampleFiles.delete(`prism-${lang}.html`)) { - if (!ignore.has(lang)) { - missing.push(lang); - } - } - } - - const errors = missing.map(id => `Missing example for ${id}.`); - for (const file of exampleFiles) { - errors.push(`The examples file "${file}" has no language associated with it.`); - } - - if (errors.length) { - throw new Error(errors.join('\n')); - } -} - - module.exports = { - premerge: parallel(gitChanges, hasExample) + premerge: gitChanges }; diff --git a/package-lock.json b/package-lock.json index e9671a6339..eade03c9a5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -994,6 +994,22 @@ "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", "dev": true }, + "dom-serializer": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.2.2.tgz", + "integrity": "sha512-2/xPb3ORsQ42nHYiSunXkDjPLBaEj/xTwUO4B7XCZQTRk7EBtTOPaygh10YAAh2OI1Qrp6NWfpAhzswj0ydt9g==", + "dev": true, + "requires": { + "domelementtype": "^2.0.1", + "entities": "^2.0.0" + } + }, + "domelementtype": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.0.1.tgz", + "integrity": "sha512-5HOHUDsYZWV8FGWN0Njbr/Rn7f/eWSQi1v7+HsUVwXgn8nWWlL64zKDkS0n8ZmQ3mlWOMuXOnR+7Nx/5tMO5AQ==", + "dev": true + }, "domexception": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/domexception/-/domexception-1.0.1.tgz", @@ -1003,6 +1019,26 @@ "webidl-conversions": "^4.0.2" } }, + "domhandler": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-3.0.0.tgz", + "integrity": "sha512-eKLdI5v9m67kbXQbJSNn1zjh0SDzvzWVWtX+qEI3eMjZw8daH9k8rlj1FZY9memPwjiskQFbe7vHVVJIAqoEhw==", + "dev": true, + "requires": { + "domelementtype": "^2.0.1" + } + }, + "domutils": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-2.0.0.tgz", + "integrity": "sha512-n5SelJ1axbO636c2yUtOGia/IcJtVtlhQbFiVDBZHKV5ReJO1ViX7sFEemtuyoAnBxk5meNSYgA8V4s0271efg==", + "dev": true, + "requires": { + "dom-serializer": "^0.2.1", + "domelementtype": "^2.0.1", + "domhandler": "^3.0.0" + } + }, "duplexify": { "version": "3.7.1", "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.7.1.tgz", @@ -1056,6 +1092,12 @@ "once": "^1.4.0" } }, + "entities": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-2.0.0.tgz", + "integrity": "sha512-D9f7V0JSRwIxlRI2mjMqufDrRDnx8p+eEOz7aUM9SuvF8gsBzra0/6tbjl1m8eQHrZlYj6PxqE00hZ1SAIKPLw==", + "dev": true + }, "error-ex": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", @@ -2496,6 +2538,18 @@ "whatwg-encoding": "^1.0.1" } }, + "htmlparser2": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-4.0.0.tgz", + "integrity": "sha512-cChwXn5Vam57fyXajDtPXL1wTYc8JtLbr2TN76FYu05itVVVealxLowe2B3IEznJG4p9HAYn/0tJaRlGuEglFQ==", + "dev": true, + "requires": { + "domelementtype": "^2.0.1", + "domhandler": "^3.0.0", + "domutils": "^2.0.0", + "entities": "^2.0.0" + } + }, "http-signature": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", diff --git a/package.json b/package.json index 0a85c9499c..399285cb3d 100755 --- a/package.json +++ b/package.json @@ -8,11 +8,12 @@ "test:aliases": "mocha tests/aliases-test.js", "test:core": "mocha tests/core/**/*.js", "test:dependencies": "mocha tests/dependencies-test.js", + "test:examples": "mocha tests/examples-test.js", "test:languages": "mocha tests/run.js", "test:patterns": "mocha tests/pattern-tests.js", "test:plugins": "mocha tests/plugins/**/*.js", "test:runner": "mocha tests/testrunner-tests.js", - "test": "npm run test:runner && npm run test:core && npm run test:dependencies && npm run test:languages && npm run test:plugins && npm run test:aliases && npm run test:patterns" + "test": "npm run test:runner && npm run test:core && npm run test:dependencies && npm run test:languages && npm run test:plugins && npm run test:aliases && npm run test:patterns && npm run test:examples" }, "repository": { "type": "git", @@ -36,6 +37,7 @@ "gulp-rename": "^1.2.0", "gulp-replace": "^1.0.0", "gulp-uglify": "^3.0.1", + "htmlparser2": "^4.0.0", "jsdom": "^13.0.0", "mocha": "^6.2.0", "pump": "^3.0.0", diff --git a/tests/examples-test.js b/tests/examples-test.js new file mode 100644 index 0000000000..b45c684917 --- /dev/null +++ b/tests/examples-test.js @@ -0,0 +1,187 @@ +const fs = require('fs'); +const { assert } = require('chai'); +const { Parser } = require('htmlparser2'); +// use the JSON file because this file is less susceptible to merge conflicts +const { languages } = require('../components.json'); + + +describe('Examples', function () { + + const exampleFiles = new Set(fs.readdirSync(__dirname + '/../examples')); + const ignore = new Set([ + // these are libraries and not languages + 'markup-templating', + 't4-templating', + // this does alter some languages but it's mainly a library + 'javadoclike', + // Regex doesn't have any classes supported by our themes and mainly extends other languages + 'regex' + ]); + const validFiles = new Set(); + + /** @type {string[]} */ + const missing = []; + for (const lang in languages) { + if (lang === 'meta') { + continue; + } + + const file = `prism-${lang}.html`; + if (!exampleFiles.has(file)) { + if (!ignore.has(lang)) { + missing.push(lang); + } + } else { + validFiles.add(file); + } + } + + const superfluous = [...exampleFiles].filter(f => !validFiles.has(f)); + + + it('- should be available for every language', function () { + assert.isEmpty(missing, 'Following languages do not have an example file in ./examples/\n' + + missing.join('\n')); + }); + + it('- should only be available for registered languages', function () { + assert.isEmpty(superfluous, 'Following files are not associated with any language\n' + + superfluous.map(f => `./examples/${f}`).join('\n')); + }); + + describe('Validate HTML templates', function () { + for (const file of validFiles) { + it('- ./examples/' + file, async function () { + const content = fs.readFileSync(__dirname + '/../examples/' + file, 'utf-8'); + await validateHTML(content); + }); + } + }); + +}); + + +/** + * Validates the given HTML string of an example file. + * + * @param {string} html + */ +async function validateHTML(html) { + const root = await parseHTML(html); + + /** + * @param {TagNode} node + */ + function checkCodeElements(node) { + if (node.tagName === 'code') { + assert.equal(node.children.length, 1, + 'A element is only allowed to contain text, no tags. ' + + 'Did you perhaps not escape all "<" characters?'); + + const child = node.children[0]; + if (child.type !== 'text') { + // throw to help TypeScript's flow analysis + throw assert.equal(child.type, 'text', 'The child of a element must be text only.'); + } + + const text = child.rawText; + + assert.notMatch(text, / { + if (n.type === 'tag') { + checkCodeElements(n); + } + }); + } + } + + for (const node of root.children) { + if (node.type === 'text') { + assert.isEmpty(node.rawText.trim(), 'All non-whitespace text has to be in

          tags.'); + } else { + // only known tags + assert.match(node.tagName, /^(?:h2|h3|p|pre|ul|ol)$/, 'Only some tags are allowed as top level tags.'); + + //

           elements must have only one child, a  element
          +			if (node.tagName === 'pre') {
          +				assert.equal(node.children.length, 1,
          +					'
           element must have one and only one child node, a  element.'
          +					+ ' This also means that spaces and line breaks around the  element are not allowed.');
          +
          +				const child = node.children[0];
          +				if (child.type !== 'tag') {
          +					// throw to help TypeScript's flow analysis
          +					throw assert.equal(child.type, 'tag', 'The child of a 
           element must be a  element.');
          +				}
          +				assert.equal(child.tagName, 'code', 'The child of a 
           element must be a  element.');
          +			}
          +
          +			checkCodeElements(node);
          +		}
          +	}
          +}
          +
          +/**
          + * Parses the given HTML fragment and returns a simple tree of the fragment.
          + *
          + * @param {string} html
          + * @returns {Promise}
          + *
          + * @typedef TagNode
          + * @property {"tag"} type
          + * @property {string | null} tagName
          + * @property {Object} attributes
          + * @property {(TagNode | TextNode)[]} children
          + *
          + * @typedef TextNode
          + * @property {"text"} type
          + * @property {string} rawText
          + */
          +function parseHTML(html) {
          +	return new Promise((resolve, reject) => {
          +		/** @type {TagNode} */
          +		const tree = {
          +			type: 'tag',
          +			tagName: null,
          +			attributes: {},
          +			children: []
          +		};
          +		/** @type {TagNode[]} */
          +		let stack = [tree];
          +
          +		const p = new Parser({
          +			onerror(err) {
          +				reject(err)
          +			},
          +			onend() {
          +				resolve(tree);
          +			},
          +
          +			ontext(data) {
          +				stack[stack.length - 1].children.push({
          +					type: 'text',
          +					rawText: data
          +				});
          +			},
          +
          +			onopentag(name, attrs) {
          +				/** @type {TagNode} */
          +				const newElement = {
          +					type: 'tag',
          +					tagName: name,
          +					attributes: attrs,
          +					children: []
          +				};
          +				stack[stack.length - 1].children.push(newElement);
          +				stack.push(newElement);
          +			},
          +			onclosetag() {
          +				stack.pop();
          +			}
          +
          +		}, { lowerCaseTags: false });
          +		p.end(html);
          +	});
          +}
          
          From 462ad57eb419b095c932afe446b521cdd145fedd Mon Sep 17 00:00:00 2001
          From: Simon 
          Date: Sat, 7 Mar 2020 14:32:58 +0100
          Subject: [PATCH 0457/1100] C++: Added C++20 keywords (#2236)
          
          This adds support for the ney keywords added in C++20.
          https://en.cppreference.com/w/cpp/keyword
          ---
           components/prism-cpp.js                  |   2 +-
           components/prism-cpp.min.js              |   2 +-
           tests/languages/cpp/keyword_feature.test | 216 ++++++++++++++++++-----
           3 files changed, 176 insertions(+), 44 deletions(-)
          
          diff --git a/components/prism-cpp.js b/components/prism-cpp.js
          index 412d65e444..08be199ca3 100644
          --- a/components/prism-cpp.js
          +++ b/components/prism-cpp.js
          @@ -3,7 +3,7 @@ Prism.languages.cpp = Prism.languages.extend('c', {
           		pattern: /(\b(?:class|enum|struct)\s+)\w+/,
           		lookbehind: true
           	},
          -	'keyword': /\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|class|compl|const|constexpr|const_cast|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|float|for|friend|goto|if|inline|int|int8_t|int16_t|int32_t|int64_t|uint8_t|uint16_t|uint32_t|uint64_t|long|mutable|namespace|new|noexcept|nullptr|operator|private|protected|public|register|reinterpret_cast|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,
          +	'keyword': /\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char8_t|char16_t|char32_t|class|compl|concept|const|consteval|constexpr|constinit|const_cast|continue|co_await|co_return|co_yield|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|float|for|friend|goto|if|inline|int|int8_t|int16_t|int32_t|int64_t|uint8_t|uint16_t|uint32_t|uint64_t|long|mutable|namespace|new|noexcept|nullptr|operator|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,
           	'number': {
           		pattern: /(?:\b0b[01']+|\b0x(?:[\da-f']+\.?[\da-f']*|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+\.?[\d']*|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]*/i,
           		greedy: true
          diff --git a/components/prism-cpp.min.js b/components/prism-cpp.min.js
          index 6e8c5dd6eb..819c1675f2 100644
          --- a/components/prism-cpp.min.js
          +++ b/components/prism-cpp.min.js
          @@ -1 +1 @@
          -Prism.languages.cpp=Prism.languages.extend("c",{"class-name":{pattern:/(\b(?:class|enum|struct)\s+)\w+/,lookbehind:!0},keyword:/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|class|compl|const|constexpr|const_cast|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|float|for|friend|goto|if|inline|int|int8_t|int16_t|int32_t|int64_t|uint8_t|uint16_t|uint32_t|uint64_t|long|mutable|namespace|new|noexcept|nullptr|operator|private|protected|public|register|reinterpret_cast|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+\.?[\da-f']*|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+\.?[\d']*|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]*/i,greedy:!0},operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:true|false)\b/}),Prism.languages.insertBefore("cpp","string",{"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}});
          \ No newline at end of file
          +Prism.languages.cpp=Prism.languages.extend("c",{"class-name":{pattern:/(\b(?:class|enum|struct)\s+)\w+/,lookbehind:!0},keyword:/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char8_t|char16_t|char32_t|class|compl|concept|const|consteval|constexpr|constinit|const_cast|continue|co_await|co_return|co_yield|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|float|for|friend|goto|if|inline|int|int8_t|int16_t|int32_t|int64_t|uint8_t|uint16_t|uint32_t|uint64_t|long|mutable|namespace|new|noexcept|nullptr|operator|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+\.?[\da-f']*|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+\.?[\d']*|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]*/i,greedy:!0},operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:true|false)\b/}),Prism.languages.insertBefore("cpp","string",{"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}});
          \ No newline at end of file
          diff --git a/tests/languages/cpp/keyword_feature.test b/tests/languages/cpp/keyword_feature.test
          index b782149ce7..ac72b6a31d 100644
          --- a/tests/languages/cpp/keyword_feature.test
          +++ b/tests/languages/cpp/keyword_feature.test
          @@ -1,51 +1,183 @@
          -alignas alignof asm auto bool
          -break case catch char char16_t char32_t
          +alignas
          +alignof
          +asm
          +auto
          +bool
          +break
          +case
          +catch
          +char
          +char8_t
          +char16_t
          +char32_t
           class;
          -compl const constexpr
          -const_cast continue decltype default
          -delete do double dynamic_cast
          -else enum;
          -explicit export extern
          -float for friend goto if
          -inline int long mutable namespace
          -new noexcept nullptr operator
          -private protected public register
          -reinterpret_cast return short
          -signed sizeof static static_assert
          -static_cast struct;
          -switch template
          -this thread_local throw try
          -typedef typeid typename union
          -unsigned using virtual void
          -volatile wchar_t while
          -int8_t int16_t int32_t int64_t
          -uint8_t uint16_t uint32_t uint64_t
          +compl
          +concept
          +const
          +consteval
          +constexpr
          +constinit
          +const_cast
          +continue
          +co_await
          +co_return
          +co_yield
          +decltype
          +default
          +delete
          +do
          +double
          +dynamic_cast
          +else
          +enum;
          +explicit
          +export
          +extern
          +float
          +for
          +friend
          +goto
          +if
          +inline
          +int
          +long
          +mutable
          +namespace
          +new
          +noexcept
          +nullptr
          +operator
          +private
          +protected
          +public
          +register
          +reinterpret_cast
          +requires
          +return
          +short
          +signed
          +sizeof
          +static
          +static_assert
          +static_cast
          +struct;
          +switch
          +template
          +this
          +thread_local
          +throw
          +try
          +typedef
          +typeid
          +typename
          +union
          +unsigned
          +using
          +virtual
          +void
          +volatile
          +wchar_t
          +while
          +int8_t
          +int16_t
          +int32_t
          +int64_t
          +uint8_t
          +uint16_t
          +uint32_t
          +uint64_t
           
           ----------------------------------------------------
           
           [
          -	["keyword", "alignas"], ["keyword", "alignof"], ["keyword", "asm"], ["keyword", "auto"], ["keyword", "bool"],
          -	["keyword", "break"], ["keyword", "case"], ["keyword", "catch"], ["keyword", "char"], ["keyword", "char16_t"], ["keyword", "char32_t"],
          +	["keyword", "alignas"],
          +	["keyword", "alignof"],
          +	["keyword", "asm"],
          +	["keyword", "auto"],
          +	["keyword", "bool"],
          +	["keyword", "break"],
          +	["keyword", "case"],
          +	["keyword", "catch"],
          +	["keyword", "char"],
          +	["keyword", "char8_t"],
          +	["keyword", "char16_t"],
          +	["keyword", "char32_t"],
           	["keyword", "class"], ["punctuation", ";"],
          -	["keyword", "compl"], ["keyword", "const"], ["keyword", "constexpr"],
          -	["keyword", "const_cast"], ["keyword", "continue"], ["keyword", "decltype"], ["keyword", "default"],
          -	["keyword", "delete"], ["keyword", "do"], ["keyword", "double"], ["keyword", "dynamic_cast"],
          -	["keyword", "else"], ["keyword", "enum"], ["punctuation", ";"],
          -	["keyword", "explicit"], ["keyword", "export"], ["keyword", "extern"],
          -	["keyword", "float"], ["keyword", "for"], ["keyword", "friend"], ["keyword", "goto"], ["keyword", "if"],
          -	["keyword", "inline"], ["keyword", "int"], ["keyword", "long"], ["keyword", "mutable"], ["keyword", "namespace"],
          -	["keyword", "new"], ["keyword", "noexcept"], ["keyword", "nullptr"], ["keyword", "operator"],
          -	["keyword", "private"], ["keyword", "protected"], ["keyword", "public"], ["keyword", "register"],
          -	["keyword", "reinterpret_cast"], ["keyword", "return"], ["keyword", "short"],
          -	["keyword", "signed"], ["keyword", "sizeof"], ["keyword", "static"], ["keyword", "static_assert"],
          -	["keyword", "static_cast"], ["keyword", "struct"], ["punctuation", ";"],
          -	["keyword", "switch"], ["keyword", "template"],
          -	["keyword", "this"], ["keyword", "thread_local"], ["keyword", "throw"], ["keyword", "try"],
          -	["keyword", "typedef"], ["keyword", "typeid"], ["keyword", "typename"], ["keyword", "union"],
          -	["keyword", "unsigned"], ["keyword", "using"], ["keyword", "virtual"], ["keyword", "void"],
          -	["keyword", "volatile"], ["keyword", "wchar_t"], ["keyword", "while"],
          -	["keyword", "int8_t"], ["keyword", "int16_t"], ["keyword", "int32_t"], ["keyword", "int64_t"],
          -	["keyword", "uint8_t"], ["keyword", "uint16_t"], ["keyword", "uint32_t"], ["keyword", "uint64_t"]
          +	["keyword", "compl"],
          +	["keyword", "concept"],
          +	["keyword", "const"],
          +	["keyword", "consteval"],
          +	["keyword", "constexpr"],
          +	["keyword", "constinit"],
          +	["keyword", "const_cast"],
          +	["keyword", "continue"],
          +	["keyword", "co_await"],
          +	["keyword", "co_return"],
          +	["keyword", "co_yield"],
          +	["keyword", "decltype"],
          +	["keyword", "default"],
          +	["keyword", "delete"],
          +	["keyword", "do"],
          +	["keyword", "double"],
          +	["keyword", "dynamic_cast"],
          +	["keyword", "else"],
          +	["keyword", "enum"], ["punctuation", ";"],
          +	["keyword", "explicit"],
          +	["keyword", "export"],
          +	["keyword", "extern"],
          +	["keyword", "float"],
          +	["keyword", "for"],
          +	["keyword", "friend"],
          +	["keyword", "goto"],
          +	["keyword", "if"],
          +	["keyword", "inline"],
          +	["keyword", "int"],
          +	["keyword", "long"],
          +	["keyword", "mutable"],
          +	["keyword", "namespace"],
          +	["keyword", "new"],
          +	["keyword", "noexcept"],
          +	["keyword", "nullptr"],
          +	["keyword", "operator"],
          +	["keyword", "private"],
          +	["keyword", "protected"],
          +	["keyword", "public"],
          +	["keyword", "register"],
          +	["keyword", "reinterpret_cast"],
          +	["keyword", "requires"],
          +	["keyword", "return"],
          +	["keyword", "short"],
          +	["keyword", "signed"],
          +	["keyword", "sizeof"],
          +	["keyword", "static"],
          +	["keyword", "static_assert"],
          +	["keyword", "static_cast"],
          +	["keyword", "struct"], ["punctuation", ";"],
          +	["keyword", "switch"],
          +	["keyword", "template"],
          +	["keyword", "this"],
          +	["keyword", "thread_local"],
          +	["keyword", "throw"],
          +	["keyword", "try"],
          +	["keyword", "typedef"],
          +	["keyword", "typeid"],
          +	["keyword", "typename"],
          +	["keyword", "union"],
          +	["keyword", "unsigned"],
          +	["keyword", "using"],
          +	["keyword", "virtual"],
          +	["keyword", "void"],
          +	["keyword", "volatile"],
          +	["keyword", "wchar_t"],
          +	["keyword", "while"],
          +	["keyword", "int8_t"],
          +	["keyword", "int16_t"],
          +	["keyword", "int32_t"],
          +	["keyword", "int64_t"],
          +	["keyword", "uint8_t"],
          +	["keyword", "uint16_t"],
          +	["keyword", "uint32_t"],
          +	["keyword", "uint64_t"]
           ]
           
           ----------------------------------------------------
          
          From 1e3070a2ae608ad4631f1e5d49cdaf761d292c9e Mon Sep 17 00:00:00 2001
          From: Michael Schmidt 
          Date: Sat, 7 Mar 2020 18:06:01 +0100
          Subject: [PATCH 0458/1100] Tests: Fixed optional dependencies in pattern tests
           (#2242)
          
          The pattern tests still used peer dependencies, so I updated them to use optional and modify dependencies instead.
          ---
           tests/pattern-tests.js | 29 +++++++++++++++++++++++------
           1 file changed, 23 insertions(+), 6 deletions(-)
          
          diff --git a/tests/pattern-tests.js b/tests/pattern-tests.js
          index dad15acbc1..a4d1ac2712 100644
          --- a/tests/pattern-tests.js
          +++ b/tests/pattern-tests.js
          @@ -17,13 +17,30 @@ for (const lang in languages) {
           		testPatterns(Prism);
           	});
           
          -	/** @type {undefined | string | string[]} */
          -	let peerDeps = languages[lang].peerDependencies;
          -	peerDeps = !peerDeps ? [] : (Array.isArray(peerDeps) ? peerDeps : [peerDeps]);
          +	function toArray(value) {
          +		if (Array.isArray(value)) {
          +			return value;
          +		} else if (value != null) {
          +			return [value];
          +		} else {
          +			return [];
          +		}
          +	}
          +
          +	let optional = toArray(languages[lang].optional);
          +	let modify = toArray(languages[lang].modify);
          +
          +	if (optional.length > 0 || modify.length > 0) {
          +		let name = `Patterns of '${lang}'`;
          +		if (optional.length > 0) {
          +			name += ` + optional dependencies '${optional.join("', '")}'`;
          +		}
          +		if (modify.length > 0) {
          +			name += ` + modify dependencies '${modify.join("', '")}'`;
          +		}
           
          -	if (peerDeps.length > 0) {
          -		describe(`Patterns of '${lang}' + peer dependencies '${peerDeps.join("', '")}'`, function () {
          -			const Prism = PrismLoader.createInstance([...peerDeps, lang]);
          +		describe(name, function () {
          +			const Prism = PrismLoader.createInstance([...optional, ...modify, lang]);
           			testPatterns(Prism);
           		});
           	}
          
          From bf4f7bfa2f0434b7bbc4dc89c9faada6f988c66d Mon Sep 17 00:00:00 2001
          From: Michael Schmidt 
          Date: Tue, 10 Mar 2020 14:59:46 +0100
          Subject: [PATCH 0459/1100] Added support for Excel formula (#2219)
          
          This adds support for Excel's formula terms.
          ---
           components.js                                 |   2 +-
           components.json                               |   5 +
           components/prism-excel-formula.js             |  66 +++++++++++
           components/prism-excel-formula.min.js         |   1 +
           examples/prism-excel-formula.html             |  10 ++
           plugins/autoloader/prism-autoloader.js        |   2 +
           plugins/autoloader/prism-autoloader.min.js    |   2 +-
           plugins/show-language/prism-show-language.js  |   3 +
           .../show-language/prism-show-language.min.js  |   2 +-
           .../languages/excel-formula/cell_feature.test |  27 +++++
           .../excel-formula/function_feature.test       |  17 +++
           .../excel-formula/number_feature.test         |  37 +++++++
           .../excel-formula/operator_feature.test       |  27 +++++
           .../excel-formula/punctuation_feature.test    |  17 +++
           .../excel-formula/range_feature.test          |  85 ++++++++++++++
           .../excel-formula/reference_feature.test      | 104 ++++++++++++++++++
           .../excel-formula/string_feature.test         |  18 +++
           17 files changed, 422 insertions(+), 3 deletions(-)
           create mode 100644 components/prism-excel-formula.js
           create mode 100644 components/prism-excel-formula.min.js
           create mode 100644 examples/prism-excel-formula.html
           create mode 100644 tests/languages/excel-formula/cell_feature.test
           create mode 100644 tests/languages/excel-formula/function_feature.test
           create mode 100644 tests/languages/excel-formula/number_feature.test
           create mode 100644 tests/languages/excel-formula/operator_feature.test
           create mode 100644 tests/languages/excel-formula/punctuation_feature.test
           create mode 100644 tests/languages/excel-formula/range_feature.test
           create mode 100644 tests/languages/excel-formula/reference_feature.test
           create mode 100644 tests/languages/excel-formula/string_feature.test
          
          diff --git a/components.js b/components.js
          index a2b211dc7a..22a0c3ecd4 100644
          --- a/components.js
          +++ b/components.js
          @@ -1,2 +1,2 @@
          -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"Augmented Backus–Naur form","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","owner":"RunDevelopment"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"Backus–Naur form","alias":"rbnf","aliasTitles":{"rbnf":"Routing Backus–Naur form"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"Extended Backus–Naur form","owner":"RunDevelopment"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment"},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"http":{"title":"HTTP","optional":["css","javascript","json","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"json":{"title":"JSON","owner":"CupOfTea696"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","modify":["actionscript","coffeescript","flow","javascript","typescript","vala"],"owner":"RunDevelopment"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"solidity":{"title":"Solidity (Ethereum)","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","visual-basic"],"owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true}}};
          +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"Augmented Backus–Naur form","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","owner":"RunDevelopment"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"Backus–Naur form","alias":"rbnf","aliasTitles":{"rbnf":"Routing Backus–Naur form"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"Extended Backus–Naur form","owner":"RunDevelopment"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment"},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"http":{"title":"HTTP","optional":["css","javascript","json","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"json":{"title":"JSON","owner":"CupOfTea696"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","modify":["actionscript","coffeescript","flow","javascript","typescript","vala"],"owner":"RunDevelopment"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"solidity":{"title":"Solidity (Ethereum)","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","visual-basic"],"owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true}}};
           if (typeof module !== 'undefined' && module.exports) { module.exports = components; }
          \ No newline at end of file
          diff --git a/components.json b/components.json
          index 153c08c06a..cddc9651b6 100644
          --- a/components.json
          +++ b/components.json
          @@ -307,6 +307,11 @@
           			"title": "Erlang",
           			"owner": "Golmote"
           		},
          +		"excel-formula": {
          +			"title": "Excel Formula",
          +			"alias": ["xlsx", "xls"],
          +			"owner": "RunDevelopment"
          +		},
           		"fsharp": {
           			"title": "F#",
           			"require": "clike",
          diff --git a/components/prism-excel-formula.js b/components/prism-excel-formula.js
          new file mode 100644
          index 0000000000..b81d673a48
          --- /dev/null
          +++ b/components/prism-excel-formula.js
          @@ -0,0 +1,66 @@
          +Prism.languages['excel-formula'] = {
          +	'comment': {
          +		pattern: /(\bN\(\s*)"(?:[^"]|"")*"(?=\s*\))/i,
          +		lookbehind: true,
          +		greedy: true
          +	},
          +	'string': {
          +		pattern: /"(?:[^"]|"")*"(?!")/,
          +		greedy: true
          +	},
          +	'reference': {
          +		// https://www.ablebits.com/office-addins-blog/2015/12/08/excel-reference-another-sheet-workbook/
          +
          +		// Sales!B2
          +		// 'Winter sales'!B2
          +		// [Sales.xlsx]Jan!B2:B5
          +		// D:\Reports\[Sales.xlsx]Jan!B2:B5
          +		// '[Sales.xlsx]Jan sales'!B2:B5
          +		// 'D:\Reports\[Sales.xlsx]Jan sales'!B2:B5
          +
          +		pattern: /(?:'[^']*'|(?:[^\s()[\]{}<>*?"';,$&]*\[[^^\s()[\]{}<>*?"']+\])?\w+)!/,
          +		greedy: true,
          +		alias: 'string',
          +		inside: {
          +			'operator': /!$/,
          +			'punctuation': /'/,
          +			'sheet': {
          +				pattern: /[^[\]]+$/,
          +				alias: 'function'
          +			},
          +			'file': {
          +				pattern: /\[[^[\]]+\]$/,
          +				inside: {
          +					'punctuation': /[[\]]/
          +				}
          +			},
          +			'path': /[\s\S]+/
          +		}
          +	},
          +	'function-name': {
          +		pattern: /[A-Z]\w*(?=\()/i,
          +		alias: 'keyword'
          +	},
          +	'range': {
          +		pattern: /\$?(?:[A-Z]+\$?\d+:\$?[A-Z]+\$?\d+|[A-Z]+:\$?[A-Z]+|\d+:\$?\d+)/i,
          +		alias: 'property',
          +		inside: {
          +			'operator': /:/,
          +			'cell': /\$?[A-Z]+\$?\d+/i,
          +			'column': /\$?[A-Z]+/i,
          +			'row': /\$?\d+/
          +		}
          +	},
          +	'cell': {
          +		// Excel is case insensitive, so the string "foo1" could be either a variable or a cell.
          +		// To combat this, we match cells case insensitive, if the contain at least one "$", and case sensitive otherwise.
          +		pattern: /[A-Z]+\d+|\$[A-Za-z]+\$?\d+|[A-Za-z]+\$\d+/,
          +		alias: 'property'
          +	},
          +	'number': /(?:\b\d+(?:\.\d+)?|\B\.\d+)(?:e[+-]?\d+)?\b/i,
          +	'boolean': /\b(?:TRUE|FALSE)\b/i,
          +	'operator': /[-+*/^%=&,]|<[=>]?|>=?/,
          +	'punctuation': /[[\]();{}|]/
          +};
          +
          +Prism.languages['xlsx'] = Prism.languages['xls'] = Prism.languages['excel-formula'];
          diff --git a/components/prism-excel-formula.min.js b/components/prism-excel-formula.min.js
          new file mode 100644
          index 0000000000..1c8affb9a5
          --- /dev/null
          +++ b/components/prism-excel-formula.min.js
          @@ -0,0 +1 @@
          +Prism.languages["excel-formula"]={comment:{pattern:/(\bN\(\s*)"(?:[^"]|"")*"(?=\s*\))/i,lookbehind:!0,greedy:!0},string:{pattern:/"(?:[^"]|"")*"(?!")/,greedy:!0},reference:{pattern:/(?:'[^']*'|(?:[^\s()[\]{}<>*?"';,$&]*\[[^^\s()[\]{}<>*?"']+\])?\w+)!/,greedy:!0,alias:"string",inside:{operator:/!$/,punctuation:/'/,sheet:{pattern:/[^[\]]+$/,alias:"function"},file:{pattern:/\[[^[\]]+\]$/,inside:{punctuation:/[[\]]/}},path:/[\s\S]+/}},"function-name":{pattern:/[A-Z]\w*(?=\()/i,alias:"keyword"},range:{pattern:/\$?(?:[A-Z]+\$?\d+:\$?[A-Z]+\$?\d+|[A-Z]+:\$?[A-Z]+|\d+:\$?\d+)/i,alias:"property",inside:{operator:/:/,cell:/\$?[A-Z]+\$?\d+/i,column:/\$?[A-Z]+/i,row:/\$?\d+/}},cell:{pattern:/[A-Z]+\d+|\$[A-Za-z]+\$?\d+|[A-Za-z]+\$\d+/,alias:"property"},number:/(?:\b\d+(?:\.\d+)?|\B\.\d+)(?:e[+-]?\d+)?\b/i,boolean:/\b(?:TRUE|FALSE)\b/i,operator:/[-+*/^%=&,]|<[=>]?|>=?/,punctuation:/[[\]();{}|]/},Prism.languages.xlsx=Prism.languages.xls=Prism.languages["excel-formula"];
          \ No newline at end of file
          diff --git a/examples/prism-excel-formula.html b/examples/prism-excel-formula.html
          new file mode 100644
          index 0000000000..ccce7aa984
          --- /dev/null
          +++ b/examples/prism-excel-formula.html
          @@ -0,0 +1,10 @@
          +

          Full example

          +
          =SUM(G7*9)
          +=INT(RAND()*999)
          +=AVERAGE(A4:A13)+N("Average user rating")
          +=CONCATENATE(F4, ",", " ", G4," ",H4)
          +=IF($A4>500, $A4, 0)
          +=AND($B4>=501,$C4<=500)
          +=SUBTOTAL(103,staff[Name])
          +=TRIMMEAN(staff[Salary],10%)
          +=SUM([Sales.xlsx]Jan!B2:B5)
          diff --git a/plugins/autoloader/prism-autoloader.js b/plugins/autoloader/prism-autoloader.js index b28c476918..85438ba111 100644 --- a/plugins/autoloader/prism-autoloader.js +++ b/plugins/autoloader/prism-autoloader.js @@ -154,6 +154,8 @@ "jinja2": "django", "dns-zone": "dns-zone-file", "dockerfile": "docker", + "xlsx": "excel-formula", + "xls": "excel-formula", "gamemakerlanguage": "gml", "hs": "haskell", "tex": "latex", diff --git a/plugins/autoloader/prism-autoloader.min.js b/plugins/autoloader/prism-autoloader.min.js index defe59f0da..46f82befcc 100644 --- a/plugins/autoloader/prism-autoloader.min.js +++ b/plugins/autoloader/prism-autoloader.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof self&&self.Prism&&self.document&&document.createElement){var c={javascript:"clike",actionscript:"javascript",arduino:"cpp",aspnet:["markup","csharp"],bison:"c",c:"clike",csharp:"clike",cpp:"c",coffeescript:"javascript",crystal:"ruby","css-extras":"css",d:"clike",dart:"clike",django:"markup-templating",ejs:["javascript","markup-templating"],etlua:["lua","markup-templating"],erb:["ruby","markup-templating"],fsharp:"clike","firestore-security-rules":"clike",flow:"javascript",ftl:"markup-templating",glsl:"clike",gml:"clike",go:"clike",groovy:"clike",haml:"ruby",handlebars:"markup-templating",haxe:"clike",java:"clike",javadoc:["markup","java","javadoclike"],jolie:"clike",jsdoc:["javascript","javadoclike"],"js-extras":"javascript","js-templates":"javascript",jsonp:"json",json5:"json",kotlin:"clike",latte:["clike","markup-templating","php"],less:"css",lilypond:"scheme",markdown:"markup","markup-templating":"markup",n4js:"javascript",nginx:"clike",objectivec:"c",opencl:"c",parser:"markup",php:["clike","markup-templating"],phpdoc:["php","javadoclike"],"php-extras":"php",plsql:"sql",processing:"clike",protobuf:"clike",pug:["markup","javascript"],qml:"javascript",qore:"clike",jsx:["markup","javascript"],tsx:["jsx","typescript"],reason:"clike",ruby:"clike",sass:"css",scss:"css",scala:"java","shell-session":"bash",smarty:"markup-templating",solidity:"clike",soy:"markup-templating",sparql:"turtle",sqf:"clike",swift:"clike",tap:"yaml",textile:"markup",tt2:["clike","markup-templating"],twig:"markup",typescript:"javascript","t4-cs":["t4-templating","csharp"],"t4-vb":["t4-templating","visual-basic"],vala:"clike",vbnet:"basic",velocity:"markup",wiki:"markup",xeora:"markup",xquery:"markup"},l={html:"markup",xml:"markup",svg:"markup",mathml:"markup",js:"javascript",g4:"antlr4",adoc:"asciidoc",shell:"bash",rbnf:"bnf",conc:"concurnas",cs:"csharp",dotnet:"csharp",coffee:"coffeescript",jinja2:"django","dns-zone":"dns-zone-file",dockerfile:"docker",gamemakerlanguage:"gml",hs:"haskell",tex:"latex",context:"latex",ly:"lilypond",emacs:"lisp",elisp:"lisp","emacs-lisp":"lisp",md:"markdown",moon:"moonscript",n4jsd:"n4js",objectpascal:"pascal",px:"pcaxis",py:"python",robot:"robotframework",rb:"ruby",sln:"solution-file",rq:"sparql",trig:"turtle",ts:"typescript",t4:"t4-cs",vb:"visual-basic",xeoracube:"xeora",yml:"yaml"},n={},a="components/",e=Prism.util.currentScript();if(e){var t=/\bplugins\/autoloader\/prism-autoloader\.(?:min\.)js$/i,s=/[\w-]+\.(?:min\.)js$/i;if(e.hasAttribute("data-autoloader-path"))a=e.getAttribute("data-autoloader-path").trim().replace(/\/?$/,"/");else{var i=e.src;t.test(i)?a=i.replace(t,"components/"):s.test(i)&&(a=i.replace(s,"components/"))}}var p=Prism.plugins.autoloader={languages_path:a,use_minified:!0,loadLanguages:o};Prism.hooks.add("complete",function(a){a.element&&a.language&&!a.grammar&&"none"!==a.language&&function(a,e){a in l&&(a=l[a]);var t=e.getAttribute("data-dependencies"),s=e.parentElement;!t&&s&&"pre"===s.tagName.toLowerCase()&&(t=s.getAttribute("data-dependencies")),o(t=t?t.split(/\s*,\s*/g):[],function(){m(a,function(){Prism.highlightElement(e)})})}(a.language,a.element)})}function o(a,e,t){"string"==typeof a&&(a=[a]);var s=a.length,i=0,r=!1;function c(){r||++i===s&&e&&e(a)}0!==s?a.forEach(function(a){m(a,c,function(){r||(r=!0,t&&t(a))})}):e&&setTimeout(e,0)}function m(e,t,s){var i=0<=e.indexOf("!");e=e.replace("!",""),e=l[e]||e;var a=function(){var a=n[e];if(a||(a=n[e]={callbacks:[]}),a.callbacks.push({success:t,error:s}),!i&&Prism.languages[e])u(e,"success");else if(!i&&a.error)u(e,"error");else if(i||!a.loading){a.loading=!0,function(a,e,t){var s=document.createElement("script");s.src=a,s.async=!0,s.onload=function(){document.body.removeChild(s),e&&e()},s.onerror=function(){document.body.removeChild(s),t&&t()},document.body.appendChild(s)}(function(a){return p.languages_path+"prism-"+a+(p.use_minified?".min":"")+".js"}(e),function(){a.loading=!1,u(e,"success")},function(){a.loading=!1,a.error=!0,u(e,"error")})}},r=c[e];r&&r.length?o(r,a,s):a()}function u(a,e){if(n[a]){for(var t=n[a].callbacks,s=0,i=t.length;s < <= > >= +& +, + +---------------------------------------------------- + +[ + ["operator", "+"], + ["operator", "-"], + ["operator", "*"], + ["operator", "/"], + ["operator", "^"], + ["operator", "%"], + ["operator", "="], + ["operator", "<>"], + ["operator", "<"], + ["operator", "<="], + ["operator", ">"], + ["operator", ">="], + ["operator", "&"], + ["operator", ","] +] + +---------------------------------------------------- + +Checks for operators. diff --git a/tests/languages/excel-formula/punctuation_feature.test b/tests/languages/excel-formula/punctuation_feature.test new file mode 100644 index 0000000000..e8a1ec5612 --- /dev/null +++ b/tests/languages/excel-formula/punctuation_feature.test @@ -0,0 +1,17 @@ +( ; ) +{ | } + +---------------------------------------------------- + +[ + ["punctuation", "("], + ["punctuation", ";"], + ["punctuation", ")"], + ["punctuation", "{"], + ["punctuation", "|"], + ["punctuation", "}"] +] + +---------------------------------------------------- + +Checks for punctuation. diff --git a/tests/languages/excel-formula/range_feature.test b/tests/languages/excel-formula/range_feature.test new file mode 100644 index 0000000000..55774170d2 --- /dev/null +++ b/tests/languages/excel-formula/range_feature.test @@ -0,0 +1,85 @@ +$B$2:$B$4 +$B2:B$4 +B$2:$B4 +B2:B4 + +$B:$B +$B:B +B:$B +B:B + +$2:$4 +$2:4 +2:$4 +2:4 + +---------------------------------------------------- + +[ + ["range", [ + ["cell", "$B$2"], + ["operator", ":"], + ["cell", "$B$4"] + ]], + ["range", [ + ["cell", "$B2"], + ["operator", ":"], + ["cell", "B$4"] + ]], + ["range", [ + ["cell", "B$2"], + ["operator", ":"], + ["cell", "$B4"] + ]], + ["range", [ + ["cell", "B2"], + ["operator", ":"], + ["cell", "B4"] + ]], + + ["range", [ + ["column", "$B"], + ["operator", ":"], + ["column", "$B"] + ]], + ["range", [ + ["column", "$B"], + ["operator", ":"], + ["column", "B"] + ]], + ["range", [ + ["column", "B"], + ["operator", ":"], + ["column", "$B"] + ]], + ["range", [ + ["column", "B"], + ["operator", ":"], + ["column", "B"] + ]], + + ["range", [ + ["row", "$2"], + ["operator", ":"], + ["row", "$4"] + ]], + ["range", [ + ["row", "$2"], + ["operator", ":"], + ["row", "4"] + ]], + ["range", [ + ["row", "2"], + ["operator", ":"], + ["row", "$4"] + ]], + ["range", [ + ["row", "2"], + ["operator", ":"], + ["row", "4"] + ]] +] + +---------------------------------------------------- + +Checks for ranges. diff --git a/tests/languages/excel-formula/reference_feature.test b/tests/languages/excel-formula/reference_feature.test new file mode 100644 index 0000000000..45ead1e154 --- /dev/null +++ b/tests/languages/excel-formula/reference_feature.test @@ -0,0 +1,104 @@ +Sales!B2 +'Winter sales'!B2 +[Sales.xlsx]Jan!B2:B5 +D:\Reports\[Sales.xlsx]Jan!B2:B5 +'[Sales.xlsx]Jan sales'!B2:B5 +'D:\Reports\[Sales.xlsx]Jan sales'!B2:B5 + +SUM([Sales.xlsx]Jan!Jan_sales) + +---------------------------------------------------- + +[ + ["reference", [ + ["sheet", "Sales"], + ["operator", "!"] + ]], + ["cell", "B2"], + ["reference", [ + ["punctuation", "'"], + ["sheet", "Winter sales"], + ["punctuation", "'"], + ["operator", "!"] + ]], + ["cell", "B2"], + ["reference", [ + ["file", [ + ["punctuation", "["], + "Sales.xlsx", + ["punctuation", "]"] + ]], + ["sheet", "Jan"], + ["operator", "!"] + ]], + ["range", [ + ["cell", "B2"], + ["operator", ":"], + ["cell", "B5"] + ]], + ["reference", [ + ["path", "D:\\Reports\\"], + ["file", [ + ["punctuation", "["], + "Sales.xlsx", + ["punctuation", "]"] + ]], + ["sheet", "Jan"], + ["operator", "!"] + ]], + ["range", [ + ["cell", "B2"], + ["operator", ":"], + ["cell", "B5"] + ]], + ["reference", [ + ["punctuation", "'"], + ["file", [ + ["punctuation", "["], + "Sales.xlsx", + ["punctuation", "]"] + ]], + ["sheet", "Jan sales"], + ["punctuation", "'"], + ["operator", "!"] + ]], + ["range", [ + ["cell", "B2"], + ["operator", ":"], + ["cell", "B5"] + ]], + ["reference", [ + ["punctuation", "'"], + ["path", "D:\\Reports\\"], + ["file", [ + ["punctuation", "["], + "Sales.xlsx", + ["punctuation", "]"] + ]], + ["sheet", "Jan sales"], + ["punctuation", "'"], + ["operator", "!"] + ]], + ["range", [ + ["cell", "B2"], + ["operator", ":"], + ["cell", "B5"] + ]], + ["function-name", "SUM"], + ["punctuation", "("], + ["reference", [ + ["file", [ + ["punctuation", "["], + "Sales.xlsx", + ["punctuation", "]"] + ]], + ["sheet", "Jan"], + ["operator", "!"] + ]], + "Jan_sales", + ["punctuation", ")"] +] + +---------------------------------------------------- + +Checks for references. diff --git a/tests/languages/excel-formula/string_feature.test b/tests/languages/excel-formula/string_feature.test new file mode 100644 index 0000000000..6fe7435de8 --- /dev/null +++ b/tests/languages/excel-formula/string_feature.test @@ -0,0 +1,18 @@ +"" +"foo" +"foo +bar" +"foo""bar" + +---------------------------------------------------- + +[ + ["string", "\"\""], + ["string", "\"foo\""], + ["string", "\"foo\r\nbar\""], + ["string", "\"foo\"\"bar\""] +] + +---------------------------------------------------- + +Checks for strings. From 8d2c5a3ee8c893711aff24329c62c1a9b44241a6 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Tue, 10 Mar 2020 15:11:13 +0100 Subject: [PATCH 0460/1100] Inline color: Support for (semi-)transparent colors and minor improvements (#2223) - This changes the inline preview to include a background image, so (semi-)transparent colors can be identified as such instead of blending with the background color of the current theme. - The black outline is now more transparent to better blend in with light themes. - The `transparent` color was added to CSS Extras. - This fixes the `parseHexColor` function. --- components/prism-css-extras.js | 2 +- components/prism-css-extras.min.js | 2 +- plugins/inline-color/index.html | 3 +- plugins/inline-color/prism-inline-color.css | 28 ++++++++++++- plugins/inline-color/prism-inline-color.js | 39 +++++++++++++------ .../inline-color/prism-inline-color.min.js | 2 +- 6 files changed, 59 insertions(+), 17 deletions(-) diff --git a/components/prism-css-extras.js b/components/prism-css-extras.js index bc9458bcfd..1b6ab8c027 100644 --- a/components/prism-css-extras.js +++ b/components/prism-css-extras.js @@ -90,7 +90,7 @@ alias: 'color' }, 'color': [ - /\b(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)\b/i, + /\b(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)\b/i, { pattern: /\b(?:rgb|hsl)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:rgb|hsl)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i, inside: { diff --git a/components/prism-css-extras.min.js b/components/prism-css-extras.min.js index ad8b1156cb..00ed486bf1 100644 --- a/components/prism-css-extras.min.js +++ b/components/prism-css-extras.min.js @@ -1 +1 @@ -!function(e){var a,n=/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/;e.languages.css.selector={pattern:e.languages.css.selector,inside:a={"pseudo-element":/:(?:after|before|first-letter|first-line|selection)|::[-\w]+/,"pseudo-class":/:[-\w]+/,class:/\.[-:.\w]+/,id:/#[-:.\w]+/,attribute:{pattern:RegExp("\\[(?:[^[\\]\"']|"+n.source+")*\\]"),greedy:!0,inside:{punctuation:/^\[|\]$/,"case-sensitivity":{pattern:/(\s)[si]$/i,lookbehind:!0,alias:"keyword"},namespace:{pattern:/^(\s*)[-*\w\xA0-\uFFFF]*\|(?!=)/,lookbehind:!0,inside:{punctuation:/\|$/}},attribute:{pattern:/^(\s*)[-\w\xA0-\uFFFF]+/,lookbehind:!0},value:[n,{pattern:/(=\s*)[-\w\xA0-\uFFFF]+(?=\s*$)/,lookbehind:!0}],operator:/[|~*^$]?=/}},"n-th":[{pattern:/(\(\s*)[+-]?\d*[\dn](?:\s*[+-]\s*\d+)?(?=\s*\))/,lookbehind:!0,inside:{number:/[\dn]+/,operator:/[+-]/}},{pattern:/(\(\s*)(?:even|odd)(?=\s*\))/i,lookbehind:!0}],punctuation:/[()]/}},e.languages.css.atrule.inside["selector-function-argument"].inside=a,e.languages.insertBefore("css","property",{variable:{pattern:/(^|[^-\w\xA0-\uFFFF])--[-_a-z\xA0-\uFFFF][-\w\xA0-\uFFFF]*/i,lookbehind:!0}});var r={pattern:/(\d)(?:%|[a-z]+)/,lookbehind:!0},i={pattern:/(^|[^\w.-])-?\d*\.?\d+/,lookbehind:!0};e.languages.insertBefore("css","function",{operator:{pattern:/(\s)[+\-*\/](?=\s)/,lookbehind:!0},hexcode:{pattern:/\B#(?:[\da-f]{1,2}){3,4}\b/i,alias:"color"},color:[/\b(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)\b/i,{pattern:/\b(?:rgb|hsl)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:rgb|hsl)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,inside:{unit:r,number:i,function:/[\w-]+(?=\()/,punctuation:/[(),]/}}],entity:/\\[\da-f]{1,8}/i,unit:r,number:i})}(Prism); \ No newline at end of file +!function(e){var a,n=/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/;e.languages.css.selector={pattern:e.languages.css.selector,inside:a={"pseudo-element":/:(?:after|before|first-letter|first-line|selection)|::[-\w]+/,"pseudo-class":/:[-\w]+/,class:/\.[-:.\w]+/,id:/#[-:.\w]+/,attribute:{pattern:RegExp("\\[(?:[^[\\]\"']|"+n.source+")*\\]"),greedy:!0,inside:{punctuation:/^\[|\]$/,"case-sensitivity":{pattern:/(\s)[si]$/i,lookbehind:!0,alias:"keyword"},namespace:{pattern:/^(\s*)[-*\w\xA0-\uFFFF]*\|(?!=)/,lookbehind:!0,inside:{punctuation:/\|$/}},attribute:{pattern:/^(\s*)[-\w\xA0-\uFFFF]+/,lookbehind:!0},value:[n,{pattern:/(=\s*)[-\w\xA0-\uFFFF]+(?=\s*$)/,lookbehind:!0}],operator:/[|~*^$]?=/}},"n-th":[{pattern:/(\(\s*)[+-]?\d*[\dn](?:\s*[+-]\s*\d+)?(?=\s*\))/,lookbehind:!0,inside:{number:/[\dn]+/,operator:/[+-]/}},{pattern:/(\(\s*)(?:even|odd)(?=\s*\))/i,lookbehind:!0}],punctuation:/[()]/}},e.languages.css.atrule.inside["selector-function-argument"].inside=a,e.languages.insertBefore("css","property",{variable:{pattern:/(^|[^-\w\xA0-\uFFFF])--[-_a-z\xA0-\uFFFF][-\w\xA0-\uFFFF]*/i,lookbehind:!0}});var r={pattern:/(\d)(?:%|[a-z]+)/,lookbehind:!0},i={pattern:/(^|[^\w.-])-?\d*\.?\d+/,lookbehind:!0};e.languages.insertBefore("css","function",{operator:{pattern:/(\s)[+\-*\/](?=\s)/,lookbehind:!0},hexcode:{pattern:/\B#(?:[\da-f]{1,2}){3,4}\b/i,alias:"color"},color:[/\b(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)\b/i,{pattern:/\b(?:rgb|hsl)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:rgb|hsl)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,inside:{unit:r,number:i,function:/[\w-]+(?=\()/,punctuation:/[(),]/}}],entity:/\\[\da-f]{1,8}/i,unit:r,number:i})}(Prism); \ No newline at end of file diff --git a/plugins/inline-color/index.html b/plugins/inline-color/index.html index 31037a6f2b..46aa4d5833 100644 --- a/plugins/inline-color/index.html +++ b/plugins/inline-color/index.html @@ -35,8 +35,9 @@

          CSS

          } span.bar { - background: rgba(105, 0, 12, .62); + background: rgba(105, 0, 12, .38); color: hsl(30, 100%, 50%); + border-color: transparent; }
          
          diff --git a/plugins/inline-color/prism-inline-color.css b/plugins/inline-color/prism-inline-color.css
          index a0d06b5726..d83787461e 100644
          --- a/plugins/inline-color/prism-inline-color.css
          +++ b/plugins/inline-color/prism-inline-color.css
          @@ -1,9 +1,33 @@
          -span.inline-color {
          +span.inline-color-wrapper {
          +	/*
          +	 * The background image is the following SVG inline in base 64:
          +	 *
          +	 * 
          +	 *     
          +	 *     
          +	 * 
          +	 *
          +	 * SVG-inlining explained:
          +	 * https://stackoverflow.com/a/21626701/7595472
          +	 */
          +	background: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyIDIiPjxwYXRoIGZpbGw9ImdyYXkiIGQ9Ik0wIDBoMnYySDB6Ii8+PHBhdGggZmlsbD0id2hpdGUiIGQ9Ik0wIDBoMXYxSDB6TTEgMWgxdjFIMXoiLz48L3N2Zz4=");
          +	/* This is to prevent visual glitches where one pixel from the repeating pattern could be seen. */
          +	background-position: center;
          +	background-size: 110%;
          +
           	display: inline-block;
           	height: 1.333ch;
           	width: 1.333ch;
           	margin: 0 .333ch;
           	box-sizing: border-box;
           	border: 1px solid white;
          -	outline: 1px solid black;
          +	outline: 1px solid rgba(0,0,0,.5);
          +	overflow: hidden;
          +}
          +
          +span.inline-color {
          +	display: block;
          +	/* To prevent visual glitches again */
          +	height: 120%;
          +	width: 120%;
           }
          diff --git a/plugins/inline-color/prism-inline-color.js b/plugins/inline-color/prism-inline-color.js
          index dc64189743..9d9eccbda1 100644
          --- a/plugins/inline-color/prism-inline-color.js
          +++ b/plugins/inline-color/prism-inline-color.js
          @@ -7,9 +7,8 @@
           	// Copied from the markup language definition
           	var HTML_TAG = /<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/g;
           
          -	// the regex explained: In first lookahead we check whether the string is valid and then we use the
          -	// capturing groups to split the string into its components.
          -	var HEX_COLOR = /^#?(?=(?:[\da-f]{1,2}){3,4}$)([\da-f][\da-f]?)([\da-f][\da-f]?)([\da-f][\da-f]?)([\da-f][\da-f]?)?$/i;
          +	// a regex to validate hexadecimal colors
          +	var HEX_COLOR = /^#?((?:[\da-f]){3,4}|(?:[\da-f]{2}){3,4})$/i;
           
           	/**
           	 * Parses the given hexadecimal representation and returns the parsed RGBA color.
          @@ -17,6 +16,9 @@
           	 * If the format of the given string is invalid, `undefined` will be returned.
           	 * Valid formats are: `RGB`, `RGBA`, `RRGGBB`, and `RRGGBBAA`.
           	 *
          +	 * Hexadecimal colors are parsed because they are not fully supported by older browsers, so converting them to
          +	 * `rgba` functions improves browser compatibility.
          +	 *
           	 * @param {string} hex
           	 * @returns {string | undefined}
           	 */
          @@ -25,15 +27,30 @@
           		if (!match) {
           			return undefined;
           		}
          +		hex = match[1]; // removes the leading "#"
           
          -		// This is used to scale normalize 4bit and 8bit values
          -		var scale = hex.length <= 4 ? 1 / 15 : 1 / 255;
          +		// the width and number of channels
          +		var channelWidth = hex.length >= 6 ? 2 : 1;
          +		var channelCount = hex.length / channelWidth;
           
          -		var rgb = match.slice(1, 4).map(function (c) {
          -			return String(Math.round(parseInt(c, 16) * scale * 255));
          -		}).join(',');
          +		// the scale used to normalize 4bit and 8bit values
          +		var scale = channelWidth == 1 ? 1 / 15 : 1 / 255;
          +
          +		// normalized RGBA channels
          +		var channels = [];
          +		for (var i = 0; i < channelCount; i++) {
          +			var int = parseInt(hex.substr(i * channelWidth, channelWidth), 16);
          +			channels.push(int * scale);
          +		}
          +		if (channelCount == 3) {
          +			channels.push(1); // add alpha of 100%
          +		}
           
          -		var alpha = match[4] === undefined ? '1' : (parseInt(match[4], 16) * scale).toFixed(3);
          +		// output
          +		var rgb = channels.slice(0, 3).map(function (x) {
          +			return String(Math.round(x * 255));
          +		}).join(',');
          +		var alpha = String(Number(channels[3].toFixed(3))); // easy way to round 3 decimal places
           
           		return 'rgba(' + rgb + ',' + alpha + ')';
           	}
          @@ -65,7 +82,7 @@
           
           
           	Prism.hooks.add('wrap', function (env) {
          -		if (env.type === 'color' || env.type === 'hexcode') {
          +		if (env.type === 'color' || env.classes.indexOf('color') >= 0) {
           			var content = env.content;
           
           			// remove all HTML tags inside
          @@ -80,7 +97,7 @@
           				return;
           			}
           
          -			var previewElement = '';
          +			var previewElement = '';
           			env.content = previewElement + content;
           		}
           	});
          diff --git a/plugins/inline-color/prism-inline-color.min.js b/plugins/inline-color/prism-inline-color.min.js
          index 1fb9e39c4d..cfb45f9694 100644
          --- a/plugins/inline-color/prism-inline-color.min.js
          +++ b/plugins/inline-color/prism-inline-color.min.js
          @@ -1 +1 @@
          -!function(){if("undefined"!=typeof self&&"undefined"!=typeof Prism&&"undefined"!=typeof document){var i=/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/g,t=/^#?(?=(?:[\da-f]{1,2}){3,4}$)([\da-f][\da-f]?)([\da-f][\da-f]?)([\da-f][\da-f]?)([\da-f][\da-f]?)?$/i,d=[function(n){var e=t.exec(n);if(e){var o=n.length<=4?1/15:1/255;return"rgba("+e.slice(1,4).map(function(n){return String(Math.round(parseInt(n,16)*o*255))}).join(",")+","+(void 0===e[4]?"1":(parseInt(e[4],16)*o).toFixed(3))+")"}},function(n){var e=(new Option).style;return e.color=n,e.color?n:void 0}];Prism.hooks.add("wrap",function(n){if("color"===n.type||"hexcode"===n.type){for(var e,o=n.content,t=o.split(i).join(""),r=0,a=d.length;r';n.content=f+o}})}}();
          \ No newline at end of file
          +!function(){if("undefined"!=typeof self&&"undefined"!=typeof Prism&&"undefined"!=typeof document){var a=/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/g,c=/^#?((?:[\da-f]){3,4}|(?:[\da-f]{2}){3,4})$/i,f=[function(n){var r=c.exec(n);if(r){for(var o=6<=(n=r[1]).length?2:1,e=n.length/o,s=1==o?1/15:1/255,t=[],i=0;i';n.content=i+o}})}}();
          \ No newline at end of file
          
          From 7d03ece4c8cd172cec3b7c5e340ee179d5100b38 Mon Sep 17 00:00:00 2001
          From: Michael Schmidt 
          Date: Tue, 10 Mar 2020 15:12:08 +0100
          Subject: [PATCH 0461/1100] Tests: Added test for zero-width lookbehinds
           (#2220)
          
          ---
           tests/pattern-tests.js | 87 +++++++++++++++++++++++++-----------------
           1 file changed, 53 insertions(+), 34 deletions(-)
          
          diff --git a/tests/pattern-tests.js b/tests/pattern-tests.js
          index a4d1ac2712..beb33c7b11 100644
          --- a/tests/pattern-tests.js
          +++ b/tests/pattern-tests.js
          @@ -147,6 +147,31 @@ function testPatterns(Prism) {
           		});
           	}
           
          +	/**
          +	 * Returns whether the given element will always have zero width meaning that it doesn't consume characters.
          +	 *
          +	 * @param {Element} element
          +	 * @returns {boolean}
          +	 */
          +	function isAlwaysZeroWidth(element) {
          +		switch (element.type) {
          +			case 'Assertion':
          +				// assertions == ^, $, \b, lookarounds
          +				return true;
          +			case 'Quantifier':
          +				return element.max === 0 || isAlwaysZeroWidth(element.element);
          +			case 'CapturingGroup':
          +			case 'Group':
          +				// every element in every alternative has to be of zero length
          +				return element.alternatives.every(alt => alt.elements.every(isAlwaysZeroWidth));
          +			case 'Backreference':
          +				// on if the group referred to is of zero length
          +				return isAlwaysZeroWidth(element.resolved);
          +			default:
          +				return false; // what's left are characters
          +		}
          +	}
          +
           
           	it('- should not match the empty string', function () {
           		forEachPattern(({ pattern, tokenPath }) => {
          @@ -168,32 +193,7 @@ function testPatterns(Prism) {
           		});
           	});
           
          -	it('- should not have lookbehind groups which can be preceded by other some characters', function () {
          -		/**
          -		 * Returns whether the given element will have zero length meaning that it doesn't extend the matched string.
          -		 *
          -		 * @param {Element} element
          -		 * @returns {boolean}
          -		 */
          -		function isZeroLength(element) {
          -			switch (element.type) {
          -				case 'Assertion':
          -					// assertions == ^, $, \b, lookarounds
          -					return true;
          -				case 'Quantifier':
          -					return element.max === 0 || isZeroLength(element.element);
          -				case 'CapturingGroup':
          -				case 'Group':
          -					// every element in every alternative has to be of zero length
          -					return element.alternatives.every(alt => alt.elements.every(isZeroLength));
          -				case 'Backreference':
          -					// on if the group referred to is of zero length
          -					return isZeroLength(element.resolved);
          -				default:
          -					return false; // what's left are characters
          -			}
          -		}
          -
          +	it('- should not have lookbehind groups that can be preceded by other some characters', function () {
           		/**
           		 * Returns whether the given element will always match the start of the string.
           		 *
          @@ -205,7 +205,7 @@ function testPatterns(Prism) {
           			switch (parent.type) {
           				case 'Alternative':
           					// all elements before this element have to of zero length
          -					if (!parent.elements.slice(0, parent.elements.indexOf(element)).every(isZeroLength)) {
          +					if (!parent.elements.slice(0, parent.elements.indexOf(element)).every(isAlwaysZeroWidth)) {
           						return false;
           					}
           					const grandParent = parent.parent;
          @@ -216,7 +216,7 @@ function testPatterns(Prism) {
           					}
           
           				case 'Quantifier':
          -					if (parent.max === null /* null == open ended */ || parent.max >= 2) {
          +					if (parent.max >= 2) {
           						return false;
           					} else {
           						return isFirstMatch(parent);
          @@ -228,13 +228,32 @@ function testPatterns(Prism) {
           		}
           
           		forEachPattern(({ ast, tokenPath, lookbehind }) => {
          -			if (lookbehind) {
          -				forEachCapturingGroup(ast.pattern, ({ group, number }) => {
          -					if (number === 1 && !isFirstMatch(group)) {
          -						assert.fail(`Token ${tokenPath}: The lookbehind group (if matched at all) always has to be at index 0 relative to the whole match.`);
          -					}
          -				});
          +			if (!lookbehind) {
          +				return;
           			}
          +			forEachCapturingGroup(ast.pattern, ({ group, number }) => {
          +				if (number === 1 && !isFirstMatch(group)) {
          +					assert.fail(`Token ${tokenPath}: `
          +						+ `The lookbehind group (if matched) always has to be at index 0 relative to the whole match.`);
          +				}
          +			});
          +		});
          +	});
          +
          +	it('- should not have lookbehind groups that only have zero-width alternatives', function () {
          +		forEachPattern(({ ast, tokenPath, lookbehind, reportError }) => {
          +			if (!lookbehind) {
          +				return;
          +			}
          +			forEachCapturingGroup(ast.pattern, ({ group, number }) => {
          +				if (number === 1 && isAlwaysZeroWidth(group)) {
          +					const groupContent = group.raw.substr(1, group.raw.length - 2);
          +					const replacement = group.alternatives.length === 1 ? groupContent : `(?:${groupContent})`;
          +					reportError(`Token ${tokenPath}: The lookbehind group ${group.raw} does not consume characters. `
          +						+ `Therefor it is not necessary to use a lookbehind group. `
          +						+ `Replacing the lookbehind group with: ${replacement}`);
          +				}
          +			});
           		});
           	});
           
          
          From 9227853f0df9d1f08a5a7755c1def45a645bd248 Mon Sep 17 00:00:00 2001
          From: Peter Budai 
          Date: Fri, 13 Mar 2020 21:52:26 +0100
          Subject: [PATCH 0462/1100] Added support for DAX (#2248)
          
          This adds support for DAX (Data Analysis Expressions).
          https://docs.microsoft.com/en-us/dax/
          ---
           components.js                                 |   2 +-
           components.json                               |   4 +
           components/prism-dax.js                       |  27 +
           components/prism-dax.min.js                   |   1 +
           examples/prism-dax.html                       |  39 ++
           plugins/show-language/prism-show-language.js  |   1 +
           .../show-language/prism-show-language.min.js  |   2 +-
           tests/languages/dax/boolean_feature.test      |  15 +
           tests/languages/dax/comment_feature.test      |  21 +
           tests/languages/dax/datafield_feature.test    |  29 +
           tests/languages/dax/function_feature.test     | 596 ++++++++++++++++++
           tests/languages/dax/keyword_feature.test      |  37 ++
           tests/languages/dax/measure_feature.test      |  15 +
           tests/languages/dax/number_feature.test       |  15 +
           tests/languages/dax/operator_feature.test     |  23 +
           tests/languages/dax/string_feature.test       |  18 +
           16 files changed, 843 insertions(+), 2 deletions(-)
           create mode 100644 components/prism-dax.js
           create mode 100644 components/prism-dax.min.js
           create mode 100644 examples/prism-dax.html
           create mode 100644 tests/languages/dax/boolean_feature.test
           create mode 100644 tests/languages/dax/comment_feature.test
           create mode 100644 tests/languages/dax/datafield_feature.test
           create mode 100644 tests/languages/dax/function_feature.test
           create mode 100644 tests/languages/dax/keyword_feature.test
           create mode 100644 tests/languages/dax/measure_feature.test
           create mode 100644 tests/languages/dax/number_feature.test
           create mode 100644 tests/languages/dax/operator_feature.test
           create mode 100644 tests/languages/dax/string_feature.test
          
          diff --git a/components.js b/components.js
          index 22a0c3ecd4..e42b822c7f 100644
          --- a/components.js
          +++ b/components.js
          @@ -1,2 +1,2 @@
          -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"Augmented Backus–Naur form","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","owner":"RunDevelopment"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"Backus–Naur form","alias":"rbnf","aliasTitles":{"rbnf":"Routing Backus–Naur form"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"Extended Backus–Naur form","owner":"RunDevelopment"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment"},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"http":{"title":"HTTP","optional":["css","javascript","json","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"json":{"title":"JSON","owner":"CupOfTea696"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","modify":["actionscript","coffeescript","flow","javascript","typescript","vala"],"owner":"RunDevelopment"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"solidity":{"title":"Solidity (Ethereum)","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","visual-basic"],"owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true}}};
          +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"Augmented Backus–Naur form","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","owner":"RunDevelopment"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"Backus–Naur form","alias":"rbnf","aliasTitles":{"rbnf":"Routing Backus–Naur form"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dax":{"title":"DAX","owner":"peterbud"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"Extended Backus–Naur form","owner":"RunDevelopment"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment"},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"http":{"title":"HTTP","optional":["css","javascript","json","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"json":{"title":"JSON","owner":"CupOfTea696"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","modify":["actionscript","coffeescript","flow","javascript","typescript","vala"],"owner":"RunDevelopment"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"solidity":{"title":"Solidity (Ethereum)","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","visual-basic"],"owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true}}};
           if (typeof module !== 'undefined' && module.exports) { module.exports = components; }
          \ No newline at end of file
          diff --git a/components.json b/components.json
          index cddc9651b6..84478decd6 100644
          --- a/components.json
          +++ b/components.json
          @@ -252,6 +252,10 @@
           			"require": "clike",
           			"owner": "Golmote"
           		},
          +		"dax": {
          +			"title": "DAX",
          +			"owner": "peterbud"
          +		},
           		"diff": {
           			"title": "Diff",
           			"owner": "uranusjr"
          diff --git a/components/prism-dax.js b/components/prism-dax.js
          new file mode 100644
          index 0000000000..3eced74b2e
          --- /dev/null
          +++ b/components/prism-dax.js
          @@ -0,0 +1,27 @@
          +Prism.languages.dax = {
          +    'comment': {
          +        pattern: /(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/).*)/,
          +        lookbehind: true
          +    },
          +    'data-field': {
          +        pattern: /'(?:[^']|'')*'(?!')(?:\[[ \w\xA0-\uFFFF]+\])?|\w+\[[ \w\xA0-\uFFFF]+\]/,
          +        alias: 'symbol'
          +    },
          +    'measure': {
          +        pattern: /\[[ \w\xA0-\uFFFF]+\]/,
          +        alias: 'constant'
          +    },
          +    'string': {
          +        pattern: /"(?:[^"]|"")*"(?!")/,
          +        greedy: true
          +    },    
          +    'function': /\b(?:ABS|ACOS|ACOSH|ACOT|ACOTH|ADDCOLUMNS|ADDMISSINGITEMS|ALL|ALLCROSSFILTERED|ALLEXCEPT|ALLNOBLANKROW|ALLSELECTED|AND|APPROXIMATEDISTINCTCOUNT|ASIN|ASINH|ATAN|ATANH|AVERAGE|AVERAGEA|AVERAGEX|BETA\.DIST|BETA\.INV|BLANK|CALCULATE|CALCULATETABLE|CALENDAR|CALENDARAUTO|CEILING|CHISQ\.DIST|CHISQ\.DIST\.RT|CHISQ\.INV|CHISQ\.INV\.RT|CLOSINGBALANCEMONTH|CLOSINGBALANCEQUARTER|CLOSINGBALANCEYEAR|COALESCE|COMBIN|COMBINA|COMBINEVALUES|CONCATENATE|CONCATENATEX|CONFIDENCE\.NORM|CONFIDENCE\.T|CONTAINS|CONTAINSROW|CONTAINSSTRING|CONTAINSSTRINGEXACT|CONVERT|COS|COSH|COT|COTH|COUNT|COUNTA|COUNTAX|COUNTBLANK|COUNTROWS|COUNTX|CROSSFILTER|CROSSJOIN|CURRENCY|CURRENTGROUP|CUSTOMDATA|DATATABLE|DATE|DATEADD|DATEDIFF|DATESBETWEEN|DATESINPERIOD|DATESMTD|DATESQTD|DATESYTD|DATEVALUE|DAY|DEGREES|DETAILROWS|DISTINCT|DISTINCTCOUNT|DISTINCTCOUNTNOBLANK|DIVIDE|EARLIER|EARLIEST|EDATE|ENDOFMONTH|ENDOFQUARTER|ENDOFYEAR|EOMONTH|ERROR|EVEN|EXACT|EXCEPT|EXP|EXPON\.DIST|FACT|FALSE|FILTER|FILTERS|FIND|FIRSTDATE|FIRSTNONBLANK|FIRSTNONBLANKVALUE|FIXED|FLOOR|FORMAT|GCD|GENERATE|GENERATEALL|GENERATESERIES|GEOMEAN|GEOMEANX|GROUPBY|HASONEFILTER|HASONEVALUE|HOUR|IF|IF\.EAGER|IFERROR|IGNORE|INT|INTERSECT|ISBLANK|ISCROSSFILTERED|ISEMPTY|ISERROR|ISEVEN|ISFILTERED|ISINSCOPE|ISLOGICAL|ISNONTEXT|ISNUMBER|ISO\.CEILING|ISODD|ISONORAFTER|ISSELECTEDMEASURE|ISSUBTOTAL|ISTEXT|KEEPFILTERS|KEYWORDMATCH|LASTDATE|LASTNONBLANK|LASTNONBLANKVALUE|LCM|LEFT|LEN|LN|LOG|LOG10|LOOKUPVALUE|LOWER|MAX|MAXA|MAXX|MEDIAN|MEDIANX|MID|MIN|MINA|MINUTE|MINX|MOD|MONTH|MROUND|NATURALINNERJOIN|NATURALLEFTOUTERJOIN|NEXTDAY|NEXTMONTH|NEXTQUARTER|NEXTYEAR|NONVISUAL|NORM\.DIST|NORM\.INV|NORM\.S\.DIST|NORM\.S\.INV|NOT|NOW|ODD|OPENINGBALANCEMONTH|OPENINGBALANCEQUARTER|OPENINGBALANCEYEAR|OR|PARALLELPERIOD|PATH|PATHCONTAINS|PATHITEM|PATHITEMREVERSE|PATHLENGTH|PERCENTILE\.EXC|PERCENTILE\.INC|PERCENTILEX\.EXC|PERCENTILEX\.INC|PERMUT|PI|POISSON\.DIST|POWER|PREVIOUSDAY|PREVIOUSMONTH|PREVIOUSQUARTER|PREVIOUSYEAR|PRODUCT|PRODUCTX|QUARTER|QUOTIENT|RADIANS|RAND|RANDBETWEEN|RANK\.EQ|RANKX|RELATED|RELATEDTABLE|REMOVEFILTERS|REPLACE|REPT|RIGHT|ROLLUP|ROLLUPADDISSUBTOTAL|ROLLUPGROUP|ROLLUPISSUBTOTAL|ROUND|ROUNDDOWN|ROUNDUP|ROW|SAMEPERIODLASTYEAR|SAMPLE|SEARCH|SECOND|SELECTCOLUMNS|SELECTEDMEASURE|SELECTEDMEASUREFORMATSTRING|SELECTEDMEASURENAME|SELECTEDVALUE|SIGN|SIN|SINH|SQRT|SQRTPI|STARTOFMONTH|STARTOFQUARTER|STARTOFYEAR|STDEV\.P|STDEV\.S|STDEVX\.P|STDEVX\.S|SUBSTITUTE|SUBSTITUTEWITHINDEX|SUM|SUMMARIZE|SUMMARIZECOLUMNS|SUMX|SWITCH|T\.DIST|T\.DIST\.2T|T\.DIST\.RT|T\.INV|T\.INV\.2T|TAN|TANH|TIME|TIMEVALUE|TODAY|TOPN|TOPNPERLEVEL|TOPNSKIP|TOTALMTD|TOTALQTD|TOTALYTD|TREATAS|TRIM|TRUE|TRUNC|UNICHAR|UNICODE|UNION|UPPER|USERELATIONSHIP|USERNAME|USEROBJECTID|USERPRINCIPALNAME|UTCNOW|UTCTODAY|VALUE|VALUES|VAR\.P|VAR\.S|VARX\.P|VARX\.S|WEEKDAY|WEEKNUM|XIRR|XNPV|YEAR|YEARFRAC)(?=\s*\()/i,
          +    'keyword': /\b(?:DEFINE|MEASURE|EVALUATE|ORDER\s+BY|RETURN|VAR|START\s+AT|ASC|DESC)\b/i,
          +    'boolean': {
          +        pattern: /\b(?:TRUE|FALSE|NULL)\b/i,
          +        alias: 'constant'
          +    },
          +    'number': /\b\d+\.?\d*|\B\.\d+\b/i,
          +    'operator': /:=|[-+*\/=^]|&&?|\|\||<(?:=>?|<|>)?|>[>=]?|\b(?:IN|NOT)\b/i,
          +    'punctuation': /[;\[\](){}`,.]/
          +};
          diff --git a/components/prism-dax.min.js b/components/prism-dax.min.js
          new file mode 100644
          index 0000000000..5fe9c5c38c
          --- /dev/null
          +++ b/components/prism-dax.min.js
          @@ -0,0 +1 @@
          +Prism.languages.dax={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/).*)/,lookbehind:!0},"data-field":{pattern:/'(?:[^']|'')*'(?!')(?:\[[ \w\xA0-\uFFFF]+\])?|\w+\[[ \w\xA0-\uFFFF]+\]/,alias:"symbol"},measure:{pattern:/\[[ \w\xA0-\uFFFF]+\]/,alias:"constant"},string:{pattern:/"(?:[^"]|"")*"(?!")/,greedy:!0},function:/\b(?:ABS|ACOS|ACOSH|ACOT|ACOTH|ADDCOLUMNS|ADDMISSINGITEMS|ALL|ALLCROSSFILTERED|ALLEXCEPT|ALLNOBLANKROW|ALLSELECTED|AND|APPROXIMATEDISTINCTCOUNT|ASIN|ASINH|ATAN|ATANH|AVERAGE|AVERAGEA|AVERAGEX|BETA\.DIST|BETA\.INV|BLANK|CALCULATE|CALCULATETABLE|CALENDAR|CALENDARAUTO|CEILING|CHISQ\.DIST|CHISQ\.DIST\.RT|CHISQ\.INV|CHISQ\.INV\.RT|CLOSINGBALANCEMONTH|CLOSINGBALANCEQUARTER|CLOSINGBALANCEYEAR|COALESCE|COMBIN|COMBINA|COMBINEVALUES|CONCATENATE|CONCATENATEX|CONFIDENCE\.NORM|CONFIDENCE\.T|CONTAINS|CONTAINSROW|CONTAINSSTRING|CONTAINSSTRINGEXACT|CONVERT|COS|COSH|COT|COTH|COUNT|COUNTA|COUNTAX|COUNTBLANK|COUNTROWS|COUNTX|CROSSFILTER|CROSSJOIN|CURRENCY|CURRENTGROUP|CUSTOMDATA|DATATABLE|DATE|DATEADD|DATEDIFF|DATESBETWEEN|DATESINPERIOD|DATESMTD|DATESQTD|DATESYTD|DATEVALUE|DAY|DEGREES|DETAILROWS|DISTINCT|DISTINCTCOUNT|DISTINCTCOUNTNOBLANK|DIVIDE|EARLIER|EARLIEST|EDATE|ENDOFMONTH|ENDOFQUARTER|ENDOFYEAR|EOMONTH|ERROR|EVEN|EXACT|EXCEPT|EXP|EXPON\.DIST|FACT|FALSE|FILTER|FILTERS|FIND|FIRSTDATE|FIRSTNONBLANK|FIRSTNONBLANKVALUE|FIXED|FLOOR|FORMAT|GCD|GENERATE|GENERATEALL|GENERATESERIES|GEOMEAN|GEOMEANX|GROUPBY|HASONEFILTER|HASONEVALUE|HOUR|IF|IF\.EAGER|IFERROR|IGNORE|INT|INTERSECT|ISBLANK|ISCROSSFILTERED|ISEMPTY|ISERROR|ISEVEN|ISFILTERED|ISINSCOPE|ISLOGICAL|ISNONTEXT|ISNUMBER|ISO\.CEILING|ISODD|ISONORAFTER|ISSELECTEDMEASURE|ISSUBTOTAL|ISTEXT|KEEPFILTERS|KEYWORDMATCH|LASTDATE|LASTNONBLANK|LASTNONBLANKVALUE|LCM|LEFT|LEN|LN|LOG|LOG10|LOOKUPVALUE|LOWER|MAX|MAXA|MAXX|MEDIAN|MEDIANX|MID|MIN|MINA|MINUTE|MINX|MOD|MONTH|MROUND|NATURALINNERJOIN|NATURALLEFTOUTERJOIN|NEXTDAY|NEXTMONTH|NEXTQUARTER|NEXTYEAR|NONVISUAL|NORM\.DIST|NORM\.INV|NORM\.S\.DIST|NORM\.S\.INV|NOT|NOW|ODD|OPENINGBALANCEMONTH|OPENINGBALANCEQUARTER|OPENINGBALANCEYEAR|OR|PARALLELPERIOD|PATH|PATHCONTAINS|PATHITEM|PATHITEMREVERSE|PATHLENGTH|PERCENTILE\.EXC|PERCENTILE\.INC|PERCENTILEX\.EXC|PERCENTILEX\.INC|PERMUT|PI|POISSON\.DIST|POWER|PREVIOUSDAY|PREVIOUSMONTH|PREVIOUSQUARTER|PREVIOUSYEAR|PRODUCT|PRODUCTX|QUARTER|QUOTIENT|RADIANS|RAND|RANDBETWEEN|RANK\.EQ|RANKX|RELATED|RELATEDTABLE|REMOVEFILTERS|REPLACE|REPT|RIGHT|ROLLUP|ROLLUPADDISSUBTOTAL|ROLLUPGROUP|ROLLUPISSUBTOTAL|ROUND|ROUNDDOWN|ROUNDUP|ROW|SAMEPERIODLASTYEAR|SAMPLE|SEARCH|SECOND|SELECTCOLUMNS|SELECTEDMEASURE|SELECTEDMEASUREFORMATSTRING|SELECTEDMEASURENAME|SELECTEDVALUE|SIGN|SIN|SINH|SQRT|SQRTPI|STARTOFMONTH|STARTOFQUARTER|STARTOFYEAR|STDEV\.P|STDEV\.S|STDEVX\.P|STDEVX\.S|SUBSTITUTE|SUBSTITUTEWITHINDEX|SUM|SUMMARIZE|SUMMARIZECOLUMNS|SUMX|SWITCH|T\.DIST|T\.DIST\.2T|T\.DIST\.RT|T\.INV|T\.INV\.2T|TAN|TANH|TIME|TIMEVALUE|TODAY|TOPN|TOPNPERLEVEL|TOPNSKIP|TOTALMTD|TOTALQTD|TOTALYTD|TREATAS|TRIM|TRUE|TRUNC|UNICHAR|UNICODE|UNION|UPPER|USERELATIONSHIP|USERNAME|USEROBJECTID|USERPRINCIPALNAME|UTCNOW|UTCTODAY|VALUE|VALUES|VAR\.P|VAR\.S|VARX\.P|VARX\.S|WEEKDAY|WEEKNUM|XIRR|XNPV|YEAR|YEARFRAC)(?=\s*\()/i,keyword:/\b(?:DEFINE|MEASURE|EVALUATE|ORDER\s+BY|RETURN|VAR|START\s+AT|ASC|DESC)\b/i,boolean:{pattern:/\b(?:TRUE|FALSE|NULL)\b/i,alias:"constant"},number:/\b\d+\.?\d*|\B\.\d+\b/i,operator:/:=|[-+*\/=^]|&&?|\|\||<(?:=>?|<|>)?|>[>=]?|\b(?:IN|NOT)\b/i,punctuation:/[;\[\](){}`,.]/};
          \ No newline at end of file
          diff --git a/examples/prism-dax.html b/examples/prism-dax.html
          new file mode 100644
          index 0000000000..1309c4a59e
          --- /dev/null
          +++ b/examples/prism-dax.html
          @@ -0,0 +1,39 @@
          +

          Comments

          +
          // This is a comment
          +

          Simple example

          +
          
          +Sales YTD := 
          +CALCULATE (
          +    [Sales Amount], 
          +    DATESYTD( 'Date'[Date] )
          +)
          +
          +

          Full example

          +
          
          +Burn Rate (Hours) = 
          +
          +// Only consider those projects which have been alread created
          +VAR filterDate = 
          +    FILTER (
          +        ALL ( 'Date'[Date] ),
          +        'Date'[Date] <= MAX('Date'[Date])
          +    )
          +
          +RETURN
          +IF (
          +    // Show blank for months before project start
          +    MAX ( 'Project'[Project Created Relative Months Pos] ) < SELECTEDVALUE ( 'Date'[Fiscal RelativeMonthPos] ),
          +    BLANK (),
          +    MIN(
          +        1,
          +        DIVIDE (
          +            // Add 0 to consider months with no hours
          +            [Hours Actual Billable] + 0,
          +            CALCULATE (
          +                [Planned Hours] + 0,
          +                filterDate
          +            )
          +        )
          +    )
          +)
          +
          diff --git a/plugins/show-language/prism-show-language.js b/plugins/show-language/prism-show-language.js index 31ab98c40c..815fd62d36 100644 --- a/plugins/show-language/prism-show-language.js +++ b/plugins/show-language/prism-show-language.js @@ -48,6 +48,7 @@ "cmake": "CMake", "csp": "Content-Security-Policy", "css-extras": "CSS Extras", + "dax": "DAX", "django": "Django/Jinja2", "jinja2": "Django/Jinja2", "dns-zone-file": "DNS zone file", diff --git a/plugins/show-language/prism-show-language.min.js b/plugins/show-language/prism-show-language.min.js index ed51c651e2..0e015d1ef7 100644 --- a/plugins/show-language/prism-show-language.min.js +++ b/plugins/show-language/prism-show-language.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof self&&self.Prism&&self.document)if(Prism.plugins.toolbar){var l={html:"HTML",xml:"XML",svg:"SVG",mathml:"MathML",css:"CSS",clike:"C-like",js:"JavaScript",abap:"ABAP",abnf:"Augmented Backus–Naur form",antlr4:"ANTLR4",g4:"ANTLR4",apacheconf:"Apache Configuration",apl:"APL",aql:"AQL",arff:"ARFF",asciidoc:"AsciiDoc",adoc:"AsciiDoc",asm6502:"6502 Assembly",aspnet:"ASP.NET (C#)",autohotkey:"AutoHotkey",autoit:"AutoIt",shell:"Bash",basic:"BASIC",bbcode:"BBcode",bnf:"Backus–Naur form",rbnf:"Routing Backus–Naur form",conc:"Concurnas",csharp:"C#",cs:"C#",dotnet:"C#",cpp:"C++",cil:"CIL",coffee:"CoffeeScript",cmake:"CMake",csp:"Content-Security-Policy","css-extras":"CSS Extras",django:"Django/Jinja2",jinja2:"Django/Jinja2","dns-zone-file":"DNS zone file","dns-zone":"DNS zone file",dockerfile:"Docker",ebnf:"Extended Backus–Naur form",ejs:"EJS",etlua:"Embedded Lua templating",erb:"ERB","excel-formula":"Excel Formula",xlsx:"Excel Formula",xls:"Excel Formula",fsharp:"F#","firestore-security-rules":"Firestore security rules",ftl:"FreeMarker Template Language",gcode:"G-code",gdscript:"GDScript",gedcom:"GEDCOM",glsl:"GLSL",gml:"GameMaker Language",gamemakerlanguage:"GameMaker Language",graphql:"GraphQL",hs:"Haskell",hcl:"HCL",http:"HTTP",hpkp:"HTTP Public-Key-Pins",hsts:"HTTP Strict-Transport-Security",ichigojam:"IchigoJam",inform7:"Inform 7",javadoc:"JavaDoc",javadoclike:"JavaDoc-like",javastacktrace:"Java stack trace",jq:"JQ",jsdoc:"JSDoc","js-extras":"JS Extras","js-templates":"JS Templates",json:"JSON",jsonp:"JSONP",json5:"JSON5",latex:"LaTeX",tex:"TeX",context:"ConTeXt",lilypond:"LilyPond",ly:"LilyPond",emacs:"Lisp",elisp:"Lisp","emacs-lisp":"Lisp",lolcode:"LOLCODE",md:"Markdown","markup-templating":"Markup templating",matlab:"MATLAB",mel:"MEL",moon:"MoonScript",n1ql:"N1QL",n4js:"N4JS",n4jsd:"N4JS","nand2tetris-hdl":"Nand To Tetris HDL",nasm:"NASM",neon:"NEON",nginx:"nginx",nsis:"NSIS",objectivec:"Objective-C",ocaml:"OCaml",opencl:"OpenCL",parigp:"PARI/GP",objectpascal:"Object Pascal",pcaxis:"PC-Axis",px:"PC-Axis",php:"PHP",phpdoc:"PHPDoc","php-extras":"PHP Extras",plsql:"PL/SQL",powershell:"PowerShell",properties:".properties",protobuf:"Protocol Buffers",py:"Python",q:"Q (kdb+ database)",qml:"QML",jsx:"React JSX",tsx:"React TSX",renpy:"Ren'py",rest:"reST (reStructuredText)",robotframework:"Robot Framework",robot:"Robot Framework",rb:"Ruby",sas:"SAS",sass:"Sass (Sass)",scss:"Sass (Scss)","shell-session":"Shell session",solidity:"Solidity (Ethereum)","solution-file":"Solution file",sln:"Solution file",soy:"Soy (Closure Template)",sparql:"SPARQL",rq:"SPARQL","splunk-spl":"Splunk SPL",sqf:"SQF: Status Quo Function (Arma 3)",sql:"SQL",tap:"TAP",toml:"TOML",tt2:"Template Toolkit 2",trig:"TriG",ts:"TypeScript","t4-cs":"T4 Text Templates (C#)",t4:"T4 Text Templates (C#)","t4-vb":"T4 Text Templates (VB)","t4-templating":"T4 templating",vbnet:"VB.Net",vhdl:"VHDL",vim:"vim","visual-basic":"Visual Basic",vb:"Visual Basic",wasm:"WebAssembly",wiki:"Wiki markup",xeoracube:"XeoraCube",xojo:"Xojo (REALbasic)",xquery:"XQuery",yaml:"YAML",yml:"YAML"};Prism.plugins.toolbar.registerButton("show-language",function(e){var a=e.element.parentNode;if(a&&/pre/i.test(a.nodeName)){var s,t=a.getAttribute("data-language")||l[e.language]||((s=e.language)?(s.substring(0,1).toUpperCase()+s.substring(1)).replace(/s(?=cript)/,"S"):s);if(t){var o=document.createElement("span");return o.textContent=t,o}}})}else console.warn("Show Languages plugin loaded before Toolbar plugin.")}(); \ No newline at end of file +!function(){if("undefined"!=typeof self&&self.Prism&&self.document)if(Prism.plugins.toolbar){var l={html:"HTML",xml:"XML",svg:"SVG",mathml:"MathML",css:"CSS",clike:"C-like",js:"JavaScript",abap:"ABAP",abnf:"Augmented Backus–Naur form",antlr4:"ANTLR4",g4:"ANTLR4",apacheconf:"Apache Configuration",apl:"APL",aql:"AQL",arff:"ARFF",asciidoc:"AsciiDoc",adoc:"AsciiDoc",asm6502:"6502 Assembly",aspnet:"ASP.NET (C#)",autohotkey:"AutoHotkey",autoit:"AutoIt",shell:"Bash",basic:"BASIC",bbcode:"BBcode",bnf:"Backus–Naur form",rbnf:"Routing Backus–Naur form",conc:"Concurnas",csharp:"C#",cs:"C#",dotnet:"C#",cpp:"C++",cil:"CIL",coffee:"CoffeeScript",cmake:"CMake",csp:"Content-Security-Policy","css-extras":"CSS Extras",dax:"DAX",django:"Django/Jinja2",jinja2:"Django/Jinja2","dns-zone-file":"DNS zone file","dns-zone":"DNS zone file",dockerfile:"Docker",ebnf:"Extended Backus–Naur form",ejs:"EJS",etlua:"Embedded Lua templating",erb:"ERB","excel-formula":"Excel Formula",xlsx:"Excel Formula",xls:"Excel Formula",fsharp:"F#","firestore-security-rules":"Firestore security rules",ftl:"FreeMarker Template Language",gcode:"G-code",gdscript:"GDScript",gedcom:"GEDCOM",glsl:"GLSL",gml:"GameMaker Language",gamemakerlanguage:"GameMaker Language",graphql:"GraphQL",hs:"Haskell",hcl:"HCL",http:"HTTP",hpkp:"HTTP Public-Key-Pins",hsts:"HTTP Strict-Transport-Security",ichigojam:"IchigoJam",inform7:"Inform 7",javadoc:"JavaDoc",javadoclike:"JavaDoc-like",javastacktrace:"Java stack trace",jq:"JQ",jsdoc:"JSDoc","js-extras":"JS Extras","js-templates":"JS Templates",json:"JSON",jsonp:"JSONP",json5:"JSON5",latex:"LaTeX",tex:"TeX",context:"ConTeXt",lilypond:"LilyPond",ly:"LilyPond",emacs:"Lisp",elisp:"Lisp","emacs-lisp":"Lisp",lolcode:"LOLCODE",md:"Markdown","markup-templating":"Markup templating",matlab:"MATLAB",mel:"MEL",moon:"MoonScript",n1ql:"N1QL",n4js:"N4JS",n4jsd:"N4JS","nand2tetris-hdl":"Nand To Tetris HDL",nasm:"NASM",neon:"NEON",nginx:"nginx",nsis:"NSIS",objectivec:"Objective-C",ocaml:"OCaml",opencl:"OpenCL",parigp:"PARI/GP",objectpascal:"Object Pascal",pcaxis:"PC-Axis",px:"PC-Axis",php:"PHP",phpdoc:"PHPDoc","php-extras":"PHP Extras",plsql:"PL/SQL",powershell:"PowerShell",properties:".properties",protobuf:"Protocol Buffers",py:"Python",q:"Q (kdb+ database)",qml:"QML",jsx:"React JSX",tsx:"React TSX",renpy:"Ren'py",rest:"reST (reStructuredText)",robotframework:"Robot Framework",robot:"Robot Framework",rb:"Ruby",sas:"SAS",sass:"Sass (Sass)",scss:"Sass (Scss)","shell-session":"Shell session",solidity:"Solidity (Ethereum)","solution-file":"Solution file",sln:"Solution file",soy:"Soy (Closure Template)",sparql:"SPARQL",rq:"SPARQL","splunk-spl":"Splunk SPL",sqf:"SQF: Status Quo Function (Arma 3)",sql:"SQL",tap:"TAP",toml:"TOML",tt2:"Template Toolkit 2",trig:"TriG",ts:"TypeScript","t4-cs":"T4 Text Templates (C#)",t4:"T4 Text Templates (C#)","t4-vb":"T4 Text Templates (VB)","t4-templating":"T4 templating",vbnet:"VB.Net",vhdl:"VHDL",vim:"vim","visual-basic":"Visual Basic",vb:"Visual Basic",wasm:"WebAssembly",wiki:"Wiki markup",xeoracube:"XeoraCube",xojo:"Xojo (REALbasic)",xquery:"XQuery",yaml:"YAML",yml:"YAML"};Prism.plugins.toolbar.registerButton("show-language",function(e){var a=e.element.parentNode;if(a&&/pre/i.test(a.nodeName)){var s,t=a.getAttribute("data-language")||l[e.language]||((s=e.language)?(s.substring(0,1).toUpperCase()+s.substring(1)).replace(/s(?=cript)/,"S"):s);if(t){var o=document.createElement("span");return o.textContent=t,o}}})}else console.warn("Show Languages plugin loaded before Toolbar plugin.")}(); \ No newline at end of file diff --git a/tests/languages/dax/boolean_feature.test b/tests/languages/dax/boolean_feature.test new file mode 100644 index 0000000000..cc6bb4fdd6 --- /dev/null +++ b/tests/languages/dax/boolean_feature.test @@ -0,0 +1,15 @@ +TRUE +FALSE +NULL + +---------------------------------------------------- + +[ + ["boolean", "TRUE"], + ["boolean", "FALSE"], + ["boolean", "NULL"] +] + +---------------------------------------------------- + +Checks for booleans. \ No newline at end of file diff --git a/tests/languages/dax/comment_feature.test b/tests/languages/dax/comment_feature.test new file mode 100644 index 0000000000..b43dfcb853 --- /dev/null +++ b/tests/languages/dax/comment_feature.test @@ -0,0 +1,21 @@ +/**/ +/* foo +bar */ +// +// foo +-- +-- foo +---------------------------------------------------- + +[ + ["comment", "/**/"], + ["comment", "/* foo\r\nbar */"], + ["comment", "//"], + ["comment", "// foo"], + ["comment", "--"], + ["comment", "-- foo"] +] + +---------------------------------------------------- + +Checks for comments. \ No newline at end of file diff --git a/tests/languages/dax/datafield_feature.test b/tests/languages/dax/datafield_feature.test new file mode 100644 index 0000000000..c5fbb8b541 --- /dev/null +++ b/tests/languages/dax/datafield_feature.test @@ -0,0 +1,29 @@ +'table'[field] +'table name'[field] +'ta""ble'[field] +'ta''ble'[field] +'table'[field name] +'table name'[field name] +table[field] +table[field name] +'table' +'こんにちは' + +---------------------------------------------------- + +[ + ["data-field", "'table'[field]"], + ["data-field", "'table name'[field]"], + ["data-field", "'ta\"\"ble'[field]"], + ["data-field", "'ta''ble'[field]"], + ["data-field", "'table'[field name]"], + ["data-field", "'table name'[field name]"], + ["data-field", "table[field]"], + ["data-field", "table[field name]"], + ["data-field", "'table'"], + ["data-field", "'こんにちは'"] +] + +---------------------------------------------------- + +Checks for datafield tokens. \ No newline at end of file diff --git a/tests/languages/dax/function_feature.test b/tests/languages/dax/function_feature.test new file mode 100644 index 0000000000..618ca41ef0 --- /dev/null +++ b/tests/languages/dax/function_feature.test @@ -0,0 +1,596 @@ +ABS ( +ABS( +ACOS( +ACOSH( +ACOT( +ACOTH( +ADDCOLUMNS( +ADDMISSINGITEMS( +ALL( +ALLCROSSFILTERED( +ALLEXCEPT( +ALLNOBLANKROW( +ALLSELECTED( +AND( +APPROXIMATEDISTINCTCOUNT( +ASIN( +ASINH( +ATAN( +ATANH( +AVERAGE( +AVERAGEA( +AVERAGEX( +BETA.DIST( +BETA.INV( +BLANK( +CALCULATE( +CALCULATETABLE( +CALENDAR( +CALENDARAUTO( +CEILING( +CHISQ.DIST( +CHISQ.DIST.RT( +CHISQ.INV( +CHISQ.INV.RT( +CLOSINGBALANCEMONTH( +CLOSINGBALANCEQUARTER( +CLOSINGBALANCEYEAR( +COALESCE( +COMBIN( +COMBINA( +COMBINEVALUES( +CONCATENATE( +CONCATENATEX( +CONFIDENCE.NORM( +CONFIDENCE.T( +CONTAINS( +CONTAINSROW( +CONTAINSSTRING( +CONTAINSSTRINGEXACT( +CONVERT( +COS( +COSH( +COT( +COTH( +COUNT( +COUNTA( +COUNTAX( +COUNTBLANK( +COUNTROWS( +COUNTX( +CROSSFILTER( +CROSSJOIN( +CURRENCY( +CURRENTGROUP( +CUSTOMDATA( +DATATABLE( +DATE( +DATEADD( +DATEDIFF( +DATESBETWEEN( +DATESINPERIOD( +DATESMTD( +DATESQTD( +DATESYTD( +DATEVALUE( +DAY( +DEGREES( +DETAILROWS( +DISTINCT( +DISTINCTCOUNT( +DISTINCTCOUNTNOBLANK( +DIVIDE( +EARLIER( +EARLIEST( +EDATE( +ENDOFMONTH( +ENDOFQUARTER( +ENDOFYEAR( +EOMONTH( +ERROR( +EVEN( +EXACT( +EXCEPT( +EXP( +EXPON.DIST( +FACT( +FALSE( +FILTER( +FILTERS( +FIND( +FIRSTDATE( +FIRSTNONBLANK( +FIRSTNONBLANKVALUE( +FIXED( +FLOOR( +FORMAT( +GCD( +GENERATE( +GENERATEALL( +GENERATESERIES( +GEOMEAN( +GEOMEANX( +GROUPBY( +HASONEFILTER( +HASONEVALUE( +HOUR( +IF( +IF.EAGER( +IFERROR( +IGNORE( +INT( +INTERSECT( +ISBLANK( +ISCROSSFILTERED( +ISEMPTY( +ISERROR( +ISEVEN( +ISFILTERED( +ISINSCOPE( +ISLOGICAL( +ISNONTEXT( +ISNUMBER( +ISO.CEILING( +ISODD( +ISONORAFTER( +ISSELECTEDMEASURE( +ISSUBTOTAL( +ISTEXT( +KEEPFILTERS( +KEYWORDMATCH( +LASTDATE( +LASTNONBLANK( +LASTNONBLANKVALUE( +LCM( +LEFT( +LEN( +LN( +LOG( +LOG10( +LOOKUPVALUE( +LOWER( +MAX( +MAXA( +MAXX( +MEDIAN( +MEDIANX( +MID( +MIN( +MINA( +MINUTE( +MINX( +MOD( +MONTH( +MROUND( +NATURALINNERJOIN( +NATURALLEFTOUTERJOIN( +NEXTDAY( +NEXTMONTH( +NEXTQUARTER( +NEXTYEAR( +NONVISUAL( +NORM.DIST( +NORM.INV( +NORM.S.DIST( +NORM.S.INV( +NOT( +NOW( +ODD( +OPENINGBALANCEMONTH( +OPENINGBALANCEQUARTER( +OPENINGBALANCEYEAR( +OR( +PARALLELPERIOD( +PATH( +PATHCONTAINS( +PATHITEM( +PATHITEMREVERSE( +PATHLENGTH( +PERCENTILE.EXC( +PERCENTILE.INC( +PERCENTILEX.EXC( +PERCENTILEX.INC( +PERMUT( +PI( +POISSON.DIST( +POWER( +PREVIOUSDAY( +PREVIOUSMONTH( +PREVIOUSQUARTER( +PREVIOUSYEAR( +PRODUCT( +PRODUCTX( +QUARTER( +QUOTIENT( +RADIANS( +RAND( +RANDBETWEEN( +RANK.EQ( +RANKX( +RELATED( +RELATEDTABLE( +REMOVEFILTERS( +REPLACE( +REPT( +RIGHT( +ROLLUP( +ROLLUPADDISSUBTOTAL( +ROLLUPGROUP( +ROLLUPISSUBTOTAL( +ROUND( +ROUNDDOWN( +ROUNDUP( +ROW( +SAMEPERIODLASTYEAR( +SAMPLE( +SEARCH( +SECOND( +SELECTCOLUMNS( +SELECTEDMEASURE( +SELECTEDMEASUREFORMATSTRING( +SELECTEDMEASURENAME( +SELECTEDVALUE( +SIGN( +SIN( +SINH( +SQRT( +SQRTPI( +STARTOFMONTH( +STARTOFQUARTER( +STARTOFYEAR( +STDEV.P( +STDEV.S( +STDEVX.P( +STDEVX.S( +SUBSTITUTE( +SUBSTITUTEWITHINDEX( +SUM( +SUMMARIZE( +SUMMARIZECOLUMNS( +SUMX( +SWITCH( +T.DIST( +T.DIST.2T( +T.DIST.RT( +T.INV( +T.INV.2T( +TAN( +TANH( +TIME( +TIMEVALUE( +TODAY( +TOPN( +TOPNPERLEVEL( +TOPNSKIP( +TOTALMTD( +TOTALQTD( +TOTALYTD( +TREATAS( +TRIM( +TRUE( +TRUNC( +UNICHAR( +UNICODE( +UNION( +UPPER( +USERELATIONSHIP( +USERNAME( +USEROBJECTID( +USERPRINCIPALNAME( +UTCNOW( +UTCTODAY( +VALUE( +VALUES( +VAR.P( +VAR.S( +VARX.P( +VARX.S( +WEEKDAY( +WEEKNUM( +XIRR( +XNPV( +YEAR( +YEARFRAC( + + +---------------------------------------------------- + +[ + ["function", "ABS"], ["punctuation", "("], + ["function", "ABS"], ["punctuation","("], + ["function", "ACOS"], ["punctuation","("], + ["function", "ACOSH"], ["punctuation","("], + ["function", "ACOT"], ["punctuation","("], + ["function", "ACOTH"], ["punctuation","("], + ["function", "ADDCOLUMNS"], ["punctuation","("], + ["function", "ADDMISSINGITEMS"], ["punctuation","("], + ["function", "ALL"], ["punctuation","("], + ["function", "ALLCROSSFILTERED"], ["punctuation","("], + ["function", "ALLEXCEPT"], ["punctuation","("], + ["function", "ALLNOBLANKROW"], ["punctuation","("], + ["function", "ALLSELECTED"], ["punctuation","("], + ["function", "AND"], ["punctuation","("], + ["function", "APPROXIMATEDISTINCTCOUNT"], ["punctuation","("], + ["function", "ASIN"], ["punctuation","("], + ["function", "ASINH"], ["punctuation","("], + ["function", "ATAN"], ["punctuation","("], + ["function", "ATANH"], ["punctuation","("], + ["function", "AVERAGE"], ["punctuation","("], + ["function", "AVERAGEA"], ["punctuation","("], + ["function", "AVERAGEX"], ["punctuation","("], + ["function", "BETA.DIST"], ["punctuation","("], + ["function", "BETA.INV"], ["punctuation","("], + ["function", "BLANK"], ["punctuation","("], + ["function", "CALCULATE"], ["punctuation","("], + ["function", "CALCULATETABLE"], ["punctuation","("], + ["function", "CALENDAR"], ["punctuation","("], + ["function", "CALENDARAUTO"], ["punctuation","("], + ["function", "CEILING"], ["punctuation","("], + ["function", "CHISQ.DIST"], ["punctuation","("], + ["function", "CHISQ.DIST.RT"], ["punctuation","("], + ["function", "CHISQ.INV"], ["punctuation","("], + ["function", "CHISQ.INV.RT"], ["punctuation","("], + ["function", "CLOSINGBALANCEMONTH"], ["punctuation","("], + ["function", "CLOSINGBALANCEQUARTER"], ["punctuation","("], + ["function", "CLOSINGBALANCEYEAR"], ["punctuation","("], + ["function", "COALESCE"], ["punctuation","("], + ["function", "COMBIN"], ["punctuation","("], + ["function", "COMBINA"], ["punctuation","("], + ["function", "COMBINEVALUES"], ["punctuation","("], + ["function", "CONCATENATE"], ["punctuation","("], + ["function", "CONCATENATEX"], ["punctuation","("], + ["function", "CONFIDENCE.NORM"], ["punctuation","("], + ["function", "CONFIDENCE.T"], ["punctuation","("], + ["function", "CONTAINS"], ["punctuation","("], + ["function", "CONTAINSROW"], ["punctuation","("], + ["function", "CONTAINSSTRING"], ["punctuation","("], + ["function", "CONTAINSSTRINGEXACT"], ["punctuation","("], + ["function", "CONVERT"], ["punctuation","("], + ["function", "COS"], ["punctuation","("], + ["function", "COSH"], ["punctuation","("], + ["function", "COT"], ["punctuation","("], + ["function", "COTH"], ["punctuation","("], + ["function", "COUNT"], ["punctuation","("], + ["function", "COUNTA"], ["punctuation","("], + ["function", "COUNTAX"], ["punctuation","("], + ["function", "COUNTBLANK"], ["punctuation","("], + ["function", "COUNTROWS"], ["punctuation","("], + ["function", "COUNTX"], ["punctuation","("], + ["function", "CROSSFILTER"], ["punctuation","("], + ["function", "CROSSJOIN"], ["punctuation","("], + ["function", "CURRENCY"], ["punctuation","("], + ["function", "CURRENTGROUP"], ["punctuation","("], + ["function", "CUSTOMDATA"], ["punctuation","("], + ["function", "DATATABLE"], ["punctuation","("], + ["function", "DATE"], ["punctuation","("], + ["function", "DATEADD"], ["punctuation","("], + ["function", "DATEDIFF"], ["punctuation","("], + ["function", "DATESBETWEEN"], ["punctuation","("], + ["function", "DATESINPERIOD"], ["punctuation","("], + ["function", "DATESMTD"], ["punctuation","("], + ["function", "DATESQTD"], ["punctuation","("], + ["function", "DATESYTD"], ["punctuation","("], + ["function", "DATEVALUE"], ["punctuation","("], + ["function", "DAY"], ["punctuation","("], + ["function", "DEGREES"], ["punctuation","("], + ["function", "DETAILROWS"], ["punctuation","("], + ["function", "DISTINCT"], ["punctuation","("], + ["function", "DISTINCTCOUNT"], ["punctuation","("], + ["function", "DISTINCTCOUNTNOBLANK"], ["punctuation","("], + ["function", "DIVIDE"], ["punctuation","("], + ["function", "EARLIER"], ["punctuation","("], + ["function", "EARLIEST"], ["punctuation","("], + ["function", "EDATE"], ["punctuation","("], + ["function", "ENDOFMONTH"], ["punctuation","("], + ["function", "ENDOFQUARTER"], ["punctuation","("], + ["function", "ENDOFYEAR"], ["punctuation","("], + ["function", "EOMONTH"], ["punctuation","("], + ["function", "ERROR"], ["punctuation","("], + ["function", "EVEN"], ["punctuation","("], + ["function", "EXACT"], ["punctuation","("], + ["function", "EXCEPT"], ["punctuation","("], + ["function", "EXP"], ["punctuation","("], + ["function", "EXPON.DIST"], ["punctuation","("], + ["function", "FACT"], ["punctuation","("], + ["function", "FALSE"], ["punctuation","("], + ["function", "FILTER"], ["punctuation","("], + ["function", "FILTERS"], ["punctuation","("], + ["function", "FIND"], ["punctuation","("], + ["function", "FIRSTDATE"], ["punctuation","("], + ["function", "FIRSTNONBLANK"], ["punctuation","("], + ["function", "FIRSTNONBLANKVALUE"], ["punctuation","("], + ["function", "FIXED"], ["punctuation","("], + ["function", "FLOOR"], ["punctuation","("], + ["function", "FORMAT"], ["punctuation","("], + ["function", "GCD"], ["punctuation","("], + ["function", "GENERATE"], ["punctuation","("], + ["function", "GENERATEALL"], ["punctuation","("], + ["function", "GENERATESERIES"], ["punctuation","("], + ["function", "GEOMEAN"], ["punctuation","("], + ["function", "GEOMEANX"], ["punctuation","("], + ["function", "GROUPBY"], ["punctuation","("], + ["function", "HASONEFILTER"], ["punctuation","("], + ["function", "HASONEVALUE"], ["punctuation","("], + ["function", "HOUR"], ["punctuation","("], + ["function", "IF"], ["punctuation","("], + ["function", "IF.EAGER"], ["punctuation","("], + ["function", "IFERROR"], ["punctuation","("], + ["function", "IGNORE"], ["punctuation","("], + ["function", "INT"], ["punctuation","("], + ["function", "INTERSECT"], ["punctuation","("], + ["function", "ISBLANK"], ["punctuation","("], + ["function", "ISCROSSFILTERED"], ["punctuation","("], + ["function", "ISEMPTY"], ["punctuation","("], + ["function", "ISERROR"], ["punctuation","("], + ["function", "ISEVEN"], ["punctuation","("], + ["function", "ISFILTERED"], ["punctuation","("], + ["function", "ISINSCOPE"], ["punctuation","("], + ["function", "ISLOGICAL"], ["punctuation","("], + ["function", "ISNONTEXT"], ["punctuation","("], + ["function", "ISNUMBER"], ["punctuation","("], + ["function", "ISO.CEILING"], ["punctuation","("], + ["function", "ISODD"], ["punctuation","("], + ["function", "ISONORAFTER"], ["punctuation","("], + ["function", "ISSELECTEDMEASURE"], ["punctuation","("], + ["function", "ISSUBTOTAL"], ["punctuation","("], + ["function", "ISTEXT"], ["punctuation","("], + ["function", "KEEPFILTERS"], ["punctuation","("], + ["function", "KEYWORDMATCH"], ["punctuation","("], + ["function", "LASTDATE"], ["punctuation","("], + ["function", "LASTNONBLANK"], ["punctuation","("], + ["function", "LASTNONBLANKVALUE"], ["punctuation","("], + ["function", "LCM"], ["punctuation","("], + ["function", "LEFT"], ["punctuation","("], + ["function", "LEN"], ["punctuation","("], + ["function", "LN"], ["punctuation","("], + ["function", "LOG"], ["punctuation","("], + ["function", "LOG10"], ["punctuation","("], + ["function", "LOOKUPVALUE"], ["punctuation","("], + ["function", "LOWER"], ["punctuation","("], + ["function", "MAX"], ["punctuation","("], + ["function", "MAXA"], ["punctuation","("], + ["function", "MAXX"], ["punctuation","("], + ["function", "MEDIAN"], ["punctuation","("], + ["function", "MEDIANX"], ["punctuation","("], + ["function", "MID"], ["punctuation","("], + ["function", "MIN"], ["punctuation","("], + ["function", "MINA"], ["punctuation","("], + ["function", "MINUTE"], ["punctuation","("], + ["function", "MINX"], ["punctuation","("], + ["function", "MOD"], ["punctuation","("], + ["function", "MONTH"], ["punctuation","("], + ["function", "MROUND"], ["punctuation","("], + ["function", "NATURALINNERJOIN"], ["punctuation","("], + ["function", "NATURALLEFTOUTERJOIN"], ["punctuation","("], + ["function", "NEXTDAY"], ["punctuation","("], + ["function", "NEXTMONTH"], ["punctuation","("], + ["function", "NEXTQUARTER"], ["punctuation","("], + ["function", "NEXTYEAR"], ["punctuation","("], + ["function", "NONVISUAL"], ["punctuation","("], + ["function", "NORM.DIST"], ["punctuation","("], + ["function", "NORM.INV"], ["punctuation","("], + ["function", "NORM.S.DIST"], ["punctuation","("], + ["function", "NORM.S.INV"], ["punctuation","("], + ["function", "NOT"], ["punctuation","("], + ["function", "NOW"], ["punctuation","("], + ["function", "ODD"], ["punctuation","("], + ["function", "OPENINGBALANCEMONTH"], ["punctuation","("], + ["function", "OPENINGBALANCEQUARTER"], ["punctuation","("], + ["function", "OPENINGBALANCEYEAR"], ["punctuation","("], + ["function", "OR"], ["punctuation","("], + ["function", "PARALLELPERIOD"], ["punctuation","("], + ["function", "PATH"], ["punctuation","("], + ["function", "PATHCONTAINS"], ["punctuation","("], + ["function", "PATHITEM"], ["punctuation","("], + ["function", "PATHITEMREVERSE"], ["punctuation","("], + ["function", "PATHLENGTH"], ["punctuation","("], + ["function", "PERCENTILE.EXC"], ["punctuation","("], + ["function", "PERCENTILE.INC"], ["punctuation","("], + ["function", "PERCENTILEX.EXC"], ["punctuation","("], + ["function", "PERCENTILEX.INC"], ["punctuation","("], + ["function", "PERMUT"], ["punctuation","("], + ["function", "PI"], ["punctuation","("], + ["function", "POISSON.DIST"], ["punctuation","("], + ["function", "POWER"], ["punctuation","("], + ["function", "PREVIOUSDAY"], ["punctuation","("], + ["function", "PREVIOUSMONTH"], ["punctuation","("], + ["function", "PREVIOUSQUARTER"], ["punctuation","("], + ["function", "PREVIOUSYEAR"], ["punctuation","("], + ["function", "PRODUCT"], ["punctuation","("], + ["function", "PRODUCTX"], ["punctuation","("], + ["function", "QUARTER"], ["punctuation","("], + ["function", "QUOTIENT"], ["punctuation","("], + ["function", "RADIANS"], ["punctuation","("], + ["function", "RAND"], ["punctuation","("], + ["function", "RANDBETWEEN"], ["punctuation","("], + ["function", "RANK.EQ"], ["punctuation","("], + ["function", "RANKX"], ["punctuation","("], + ["function", "RELATED"], ["punctuation","("], + ["function", "RELATEDTABLE"], ["punctuation","("], + ["function", "REMOVEFILTERS"], ["punctuation","("], + ["function", "REPLACE"], ["punctuation","("], + ["function", "REPT"], ["punctuation","("], + ["function", "RIGHT"], ["punctuation","("], + ["function", "ROLLUP"], ["punctuation","("], + ["function", "ROLLUPADDISSUBTOTAL"], ["punctuation","("], + ["function", "ROLLUPGROUP"], ["punctuation","("], + ["function", "ROLLUPISSUBTOTAL"], ["punctuation","("], + ["function", "ROUND"], ["punctuation","("], + ["function", "ROUNDDOWN"], ["punctuation","("], + ["function", "ROUNDUP"], ["punctuation","("], + ["function", "ROW"], ["punctuation","("], + ["function", "SAMEPERIODLASTYEAR"], ["punctuation","("], + ["function", "SAMPLE"], ["punctuation","("], + ["function", "SEARCH"], ["punctuation","("], + ["function", "SECOND"], ["punctuation","("], + ["function", "SELECTCOLUMNS"], ["punctuation","("], + ["function", "SELECTEDMEASURE"], ["punctuation","("], + ["function", "SELECTEDMEASUREFORMATSTRING"], ["punctuation","("], + ["function", "SELECTEDMEASURENAME"], ["punctuation","("], + ["function", "SELECTEDVALUE"], ["punctuation","("], + ["function", "SIGN"], ["punctuation","("], + ["function", "SIN"], ["punctuation","("], + ["function", "SINH"], ["punctuation","("], + ["function", "SQRT"], ["punctuation","("], + ["function", "SQRTPI"], ["punctuation","("], + ["function", "STARTOFMONTH"], ["punctuation","("], + ["function", "STARTOFQUARTER"], ["punctuation","("], + ["function", "STARTOFYEAR"], ["punctuation","("], + ["function", "STDEV.P"], ["punctuation","("], + ["function", "STDEV.S"], ["punctuation","("], + ["function", "STDEVX.P"], ["punctuation","("], + ["function", "STDEVX.S"], ["punctuation","("], + ["function", "SUBSTITUTE"], ["punctuation","("], + ["function", "SUBSTITUTEWITHINDEX"], ["punctuation","("], + ["function", "SUM"], ["punctuation","("], + ["function", "SUMMARIZE"], ["punctuation","("], + ["function", "SUMMARIZECOLUMNS"], ["punctuation","("], + ["function", "SUMX"], ["punctuation","("], + ["function", "SWITCH"], ["punctuation","("], + ["function", "T.DIST"], ["punctuation","("], + ["function", "T.DIST.2T"], ["punctuation","("], + ["function", "T.DIST.RT"], ["punctuation","("], + ["function", "T.INV"], ["punctuation","("], + ["function", "T.INV.2T"], ["punctuation","("], + ["function", "TAN"], ["punctuation","("], + ["function", "TANH"], ["punctuation","("], + ["function", "TIME"], ["punctuation","("], + ["function", "TIMEVALUE"], ["punctuation","("], + ["function", "TODAY"], ["punctuation","("], + ["function", "TOPN"], ["punctuation","("], + ["function", "TOPNPERLEVEL"], ["punctuation","("], + ["function", "TOPNSKIP"], ["punctuation","("], + ["function", "TOTALMTD"], ["punctuation","("], + ["function", "TOTALQTD"], ["punctuation","("], + ["function", "TOTALYTD"], ["punctuation","("], + ["function", "TREATAS"], ["punctuation","("], + ["function", "TRIM"], ["punctuation","("], + ["function", "TRUE"], ["punctuation","("], + ["function", "TRUNC"], ["punctuation","("], + ["function", "UNICHAR"], ["punctuation","("], + ["function", "UNICODE"], ["punctuation","("], + ["function", "UNION"], ["punctuation","("], + ["function", "UPPER"], ["punctuation","("], + ["function", "USERELATIONSHIP"], ["punctuation","("], + ["function", "USERNAME"], ["punctuation","("], + ["function", "USEROBJECTID"], ["punctuation","("], + ["function", "USERPRINCIPALNAME"], ["punctuation","("], + ["function", "UTCNOW"], ["punctuation","("], + ["function", "UTCTODAY"], ["punctuation","("], + ["function", "VALUE"], ["punctuation","("], + ["function", "VALUES"], ["punctuation","("], + ["function", "VAR.P"], ["punctuation","("], + ["function", "VAR.S"], ["punctuation","("], + ["function", "VARX.P"], ["punctuation","("], + ["function", "VARX.S"], ["punctuation","("], + ["function", "WEEKDAY"], ["punctuation","("], + ["function", "WEEKNUM"], ["punctuation","("], + ["function", "XIRR"], ["punctuation","("], + ["function", "XNPV"], ["punctuation","("], + ["function", "YEAR"], ["punctuation","("], + ["function", "YEARFRAC"], ["punctuation","("] +] + +---------------------------------------------------- + +Checks for functions. \ No newline at end of file diff --git a/tests/languages/dax/keyword_feature.test b/tests/languages/dax/keyword_feature.test new file mode 100644 index 0000000000..568511bce5 --- /dev/null +++ b/tests/languages/dax/keyword_feature.test @@ -0,0 +1,37 @@ +DEFINE +MEASURE +EVALUATE +ORDER BY +ORDER BY +ORDER +BY +RETURN +VAR +START AT +START AT +START +AT +ASC +DESC + +---------------------------------------------------- + +[ + ["keyword", "DEFINE"], + ["keyword", "MEASURE"], + ["keyword", "EVALUATE"], + ["keyword", "ORDER BY"], + ["keyword", "ORDER\tBY"], + ["keyword", "ORDER\r\nBY"], + ["keyword", "RETURN"], + ["keyword", "VAR"], + ["keyword", "START AT"], + ["keyword", "START\tAT"], + ["keyword", "START\r\nAT"], + ["keyword", "ASC"], + ["keyword", "DESC"] +] + +---------------------------------------------------- + +Checks for all keywords. \ No newline at end of file diff --git a/tests/languages/dax/measure_feature.test b/tests/languages/dax/measure_feature.test new file mode 100644 index 0000000000..a7a694cb9d --- /dev/null +++ b/tests/languages/dax/measure_feature.test @@ -0,0 +1,15 @@ +[measure] +[measure name] +[こんにちは] + +---------------------------------------------------- + +[ + ["measure", "[measure]"], + ["measure", "[measure name]"], + ["measure", "[こんにちは]"] +] + +---------------------------------------------------- + +Checks for measure tokens. \ No newline at end of file diff --git a/tests/languages/dax/number_feature.test b/tests/languages/dax/number_feature.test new file mode 100644 index 0000000000..fe81803e39 --- /dev/null +++ b/tests/languages/dax/number_feature.test @@ -0,0 +1,15 @@ +42 +0.154 +.123 + +---------------------------------------------------- + +[ + ["number", "42"], + ["number", "0.154"], + ["number", ".123"] +] + +---------------------------------------------------- + +Checks for decimal numbers. \ No newline at end of file diff --git a/tests/languages/dax/operator_feature.test b/tests/languages/dax/operator_feature.test new file mode 100644 index 0000000000..97c4016e96 --- /dev/null +++ b/tests/languages/dax/operator_feature.test @@ -0,0 +1,23 @@ ++ - * / ^ += > >= < <= <> +& && || +:= + +IN +NOT + +---------------------------------------------------- + +[ + ["operator", "+"], ["operator", "-"], ["operator", "*"], ["operator", "/"], ["operator", "^"], + ["operator", "="], ["operator", ">"], ["operator", ">="], ["operator", "<"], ["operator", "<="], ["operator", "<>"], + ["operator", "&"], ["operator", "&&"], ["operator", "||"], + ["operator", ":="], + + ["operator", "IN"], + ["operator", "NOT"] +] + +---------------------------------------------------- + +Checks for all operators. \ No newline at end of file diff --git a/tests/languages/dax/string_feature.test b/tests/languages/dax/string_feature.test new file mode 100644 index 0000000000..381c95b8f4 --- /dev/null +++ b/tests/languages/dax/string_feature.test @@ -0,0 +1,18 @@ +"" +"foo" +"foo +bar" +"foo""bar" + +---------------------------------------------------- + +[ + ["string", "\"\""], + ["string", "\"foo\""], + ["string", "\"foo\r\nbar\""], + ["string", "\"foo\"\"bar\""] +] + +---------------------------------------------------- + +Checks for strings. From 2d5082ae880374492ed09a754abb20b2bbfb03c0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 14 Mar 2020 16:11:59 +0100 Subject: [PATCH 0463/1100] Dependencies: Bump acorn from 6.1.1 to 6.4.1 (#2249) Bumps [acorn](https://github.com/acornjs/acorn) from 6.1.1 to 6.4.1. - [Release notes](https://github.com/acornjs/acorn/releases) - [Commits](https://github.com/acornjs/acorn/compare/6.1.1...6.4.1) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index eade03c9a5..49890655ef 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,9 +11,9 @@ "dev": true }, "acorn": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.1.1.tgz", - "integrity": "sha512-jPTiwtOxaHNaAPg/dmrJ/beuzLRnXtB0kQPQ8JpotKJgTB6rX6c8mlf315941pyjBSaPg8NHXS9fhP4u17DpGA==", + "version": "6.4.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.4.1.tgz", + "integrity": "sha512-ZVA9k326Nwrj3Cj9jlh3wGFutC2ZornPNARZwsNYqQYgN0EsV2d53w5RN/co65Ohn4sUAUtb1rSUAOD6XN9idA==", "dev": true }, "acorn-globals": { From 8119e57b7b921f97936ffdd2c7d0fa632f14dce2 Mon Sep 17 00:00:00 2001 From: Peter Budai Date: Mon, 16 Mar 2020 21:17:45 +0100 Subject: [PATCH 0464/1100] Added support for Power Query (#2250) This adds support for Power Query. https://docs.microsoft.com/en-us/powerquery-m/ --- components.js | 2 +- components.json | 5 + components/prism-powerquery.js | 55 ++++++ components/prism-powerquery.min.js | 1 + examples/prism-powerquery.html | 74 ++++++++ plugins/autoloader/prism-autoloader.js | 2 + plugins/autoloader/prism-autoloader.min.js | 2 +- plugins/show-language/prism-show-language.js | 3 + .../show-language/prism-show-language.min.js | 2 +- .../languages/powerquery/boolean_feature.test | 13 ++ .../languages/powerquery/comment_feature.test | 18 ++ .../powerquery/constant_feature.test | 163 ++++++++++++++++++ .../powerquery/datatype_feature.test | 41 +++++ .../powerquery/function_feature.test | 14 ++ .../languages/powerquery/keyword_feature.test | 67 +++++++ .../languages/powerquery/number_feature.test | 45 +++++ .../powerquery/operator_feature.test | 19 ++ .../powerquery/quoted_identifier_feature.test | 17 ++ .../languages/powerquery/string_feature.test | 15 ++ 19 files changed, 555 insertions(+), 3 deletions(-) create mode 100644 components/prism-powerquery.js create mode 100644 components/prism-powerquery.min.js create mode 100644 examples/prism-powerquery.html create mode 100644 tests/languages/powerquery/boolean_feature.test create mode 100644 tests/languages/powerquery/comment_feature.test create mode 100644 tests/languages/powerquery/constant_feature.test create mode 100644 tests/languages/powerquery/datatype_feature.test create mode 100644 tests/languages/powerquery/function_feature.test create mode 100644 tests/languages/powerquery/keyword_feature.test create mode 100644 tests/languages/powerquery/number_feature.test create mode 100644 tests/languages/powerquery/operator_feature.test create mode 100644 tests/languages/powerquery/quoted_identifier_feature.test create mode 100644 tests/languages/powerquery/string_feature.test diff --git a/components.js b/components.js index e42b822c7f..9d8ca0e43f 100644 --- a/components.js +++ b/components.js @@ -1,2 +1,2 @@ -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"Augmented Backus–Naur form","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","owner":"RunDevelopment"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"Backus–Naur form","alias":"rbnf","aliasTitles":{"rbnf":"Routing Backus–Naur form"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dax":{"title":"DAX","owner":"peterbud"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"Extended Backus–Naur form","owner":"RunDevelopment"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment"},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"http":{"title":"HTTP","optional":["css","javascript","json","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"json":{"title":"JSON","owner":"CupOfTea696"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","modify":["actionscript","coffeescript","flow","javascript","typescript","vala"],"owner":"RunDevelopment"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"solidity":{"title":"Solidity (Ethereum)","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","visual-basic"],"owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true}}}; +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"Augmented Backus–Naur form","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","owner":"RunDevelopment"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"Backus–Naur form","alias":"rbnf","aliasTitles":{"rbnf":"Routing Backus–Naur form"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dax":{"title":"DAX","owner":"peterbud"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"Extended Backus–Naur form","owner":"RunDevelopment"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment"},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"http":{"title":"HTTP","optional":["css","javascript","json","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"json":{"title":"JSON","owner":"CupOfTea696"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","modify":["actionscript","coffeescript","flow","javascript","typescript","vala"],"owner":"RunDevelopment"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"solidity":{"title":"Solidity (Ethereum)","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","visual-basic"],"owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true}}}; if (typeof module !== 'undefined' && module.exports) { module.exports = components; } \ No newline at end of file diff --git a/components.json b/components.json index 84478decd6..f8a2d1e8eb 100644 --- a/components.json +++ b/components.json @@ -760,6 +760,11 @@ "require": "sql", "owner": "Golmote" }, + "powerquery": { + "title": "PowerQuery", + "alias": ["pq", "mscript"], + "owner": "peterbud" + }, "powershell": { "title": "PowerShell", "owner": "nauzilus" diff --git a/components/prism-powerquery.js b/components/prism-powerquery.js new file mode 100644 index 0000000000..7abf0ad572 --- /dev/null +++ b/components/prism-powerquery.js @@ -0,0 +1,55 @@ +// https://docs.microsoft.com/en-us/powerquery-m/power-query-m-language-specification + +Prism.languages.powerquery = { + 'comment': { + pattern: /(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:\/\/).*)/, + lookbehind: true + }, + 'quoted-identifier': { + pattern: /#"(?:[^"\r\n]|"")*"(?!")/, + greedy: true, + alias: 'variable' + }, + 'string': { + pattern: /"(?:[^"\r\n]|"")*"(?!")/, + greedy: true + }, + 'constant': [ + /\bDay\.(?:Sunday|Monday|Tuesday|Wednesday|Thursday|Friday|Saturday)\b/, + /\bTraceLevel\.(?:Critical|Error|Information|Verbose|Warning)\b/, + /\bOccurrence\.(?:First|Last|All)\b/, + /\bOrder\.(?:Ascending|Descending)\b/, + /\bRoundingMode\.(?:AwayFromZero|Down|ToEven|TowardZero|Up)\b/, + /\bMissingField\.(?:Error|Ignore|UseNull)\b/, + /\bQuoteStyle\.(?:Csv|None)\b/, + /\bJoinKind\.(?:Inner|LeftOuter|RightOuter|FullOuter|LeftAnti|RightAnti)\b/, + /\bGroupKind\.(?:Global|Local)\b/, + /\bExtraValues\.(?:List|Ignore|Error)\b/, + /\bJoinAlgorithm\.(?:Dynamic|PairwiseHash|SortMerge|LeftHash|RightHash|LeftIndex|RightIndex)\b/, + /\bJoinSide\.(?:Left|Right)\b/, + /\bPrecision\.(?:Double|Decimal)\b/, + /\bRelativePosition\.From(?:End|Start)\b/, + /\bTextEncoding\.(?:Ascii|BigEndianUnicode|Unicode|Utf8|Utf16|Windows)\b/, + /\b(?:Any|Binary|Date|DateTime|DateTimeZone|Duration|Int8|Int16|Int32|Int64|Function|List|Logical|None|Number|Record|Table|Text|Time)\.Type\b/, + /\bnull\b/ + ], + 'boolean': /\b(?:true|false)\b/, + 'keyword': /\b(?:and|as|each|else|error|if|in|is|let|meta|not|nullable|optional|or|otherwise|section|shared|then|try|type)\b|#(?:binary|date|datetime|datetimezone|duration|infinity|nan|sections|shared|table|time)\b/, + 'function': { + pattern: /(^|[^#\w.])(?!\d)[\w.]+(?=\s*\()/, + lookbehind: true + }, + 'data-type': { + pattern: /\b(?:any|anynonnull|binary|date|datetime|datetimezone|duration|function|list|logical|none|number|record|table|text|time|type)\b/, + alias: 'variable' + }, + 'number': { + pattern: /\b0x[\da-f]+\b|(?:[+-]?(?:\b\d+\.)?\b\d+|[+-]\.\d+|(^|[^.])\B\.\d+)(?:e[+-]?\d+)?\b/i, + lookbehind: true + }, + 'operator': /[-+*\/&?@^]|<(?:=>?|>)?|>=?|=>?|\.\.\.?/, + 'punctuation': /[,;\[\](){}]/ +}; + +Prism.languages.pq = Prism.languages['powerquery']; +Prism.languages.mscript = Prism.languages['powerquery'] \ No newline at end of file diff --git a/components/prism-powerquery.min.js b/components/prism-powerquery.min.js new file mode 100644 index 0000000000..e6ef36d1c7 --- /dev/null +++ b/components/prism-powerquery.min.js @@ -0,0 +1 @@ +Prism.languages.powerquery={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:\/\/).*)/,lookbehind:!0},"quoted-identifier":{pattern:/#"(?:[^"\r\n]|"")*"(?!")/,greedy:!0,alias:"variable"},string:{pattern:/"(?:[^"\r\n]|"")*"(?!")/,greedy:!0},constant:[/\bDay\.(?:Sunday|Monday|Tuesday|Wednesday|Thursday|Friday|Saturday)\b/,/\bTraceLevel\.(?:Critical|Error|Information|Verbose|Warning)\b/,/\bOccurrence\.(?:First|Last|All)\b/,/\bOrder\.(?:Ascending|Descending)\b/,/\bRoundingMode\.(?:AwayFromZero|Down|ToEven|TowardZero|Up)\b/,/\bMissingField\.(?:Error|Ignore|UseNull)\b/,/\bQuoteStyle\.(?:Csv|None)\b/,/\bJoinKind\.(?:Inner|LeftOuter|RightOuter|FullOuter|LeftAnti|RightAnti)\b/,/\bGroupKind\.(?:Global|Local)\b/,/\bExtraValues\.(?:List|Ignore|Error)\b/,/\bJoinAlgorithm\.(?:Dynamic|PairwiseHash|SortMerge|LeftHash|RightHash|LeftIndex|RightIndex)\b/,/\bJoinSide\.(?:Left|Right)\b/,/\bPrecision\.(?:Double|Decimal)\b/,/\bRelativePosition\.From(?:End|Start)\b/,/\bTextEncoding\.(?:Ascii|BigEndianUnicode|Unicode|Utf8|Utf16|Windows)\b/,/\b(?:Any|Binary|Date|DateTime|DateTimeZone|Duration|Int8|Int16|Int32|Int64|Function|List|Logical|None|Number|Record|Table|Text|Time)\.Type\b/,/\bnull\b/],boolean:/\b(?:true|false)\b/,keyword:/\b(?:and|as|each|else|error|if|in|is|let|meta|not|nullable|optional|or|otherwise|section|shared|then|try|type)\b|#(?:binary|date|datetime|datetimezone|duration|infinity|nan|sections|shared|table|time)\b/,function:{pattern:/(^|[^#\w.])(?!\d)[\w.]+(?=\s*\()/,lookbehind:!0},"data-type":{pattern:/\b(?:any|anynonnull|binary|date|datetime|datetimezone|duration|function|list|logical|none|number|record|table|text|time|type)\b/,alias:"variable"},number:{pattern:/\b0x[\da-f]+\b|(?:[+-]?(?:\b\d+\.)?\b\d+|[+-]\.\d+|(^|[^.])\B\.\d+)(?:e[+-]?\d+)?\b/i,lookbehind:!0},operator:/[-+*\/&?@^]|<(?:=>?|>)?|>=?|=>?|\.\.\.?/,punctuation:/[,;\[\](){}]/},Prism.languages.pq=Prism.languages.powerquery,Prism.languages.mscript=Prism.languages.powerquery; \ No newline at end of file diff --git a/examples/prism-powerquery.html b/examples/prism-powerquery.html new file mode 100644 index 0000000000..4363c273f0 --- /dev/null +++ b/examples/prism-powerquery.html @@ -0,0 +1,74 @@ +

          Comments

          +
          // This is a comment
          +

          Simple example

          +
          
          +let
          +    x = 1 + 1,
          +    y = 2 + 2,
          +    z = y + 1
          +in
          +    x + y + z
          +
          +

          Another example

          +
          
          +let Orders = Table.FromRecords({  
          +    [OrderID = 1, CustomerID = 1, Item = "fishing rod", Price = 100.0],  
          +    [OrderID = 2, CustomerID = 1, Item = "1 lb. worms", Price = 5.0],  
          +    [OrderID = 3, CustomerID = 2, Item = "fishing net", Price = 25.0]}),  
          +    #"Capitalized Each Word" = Table.TransformColumns(Orders, {"Item", Text.Proper})  
          +in  
          +    #"Capitalized Each Word"
          +
          +

          Full example

          +
          
          +    let
          +    Source = Sales,
          +    LookupTable = #table(
          +    type table
          +        [
          +            #"FROM"=text,
          +            #"TO"=text
          +        ], 
          +        {
          +            {"CEE","Central & Eastern Europe"},
          +            {"WE","Western Europe"}  
          +        }
          +    ),
          +
          +    JT = Table.NestedJoin(
          +        Source, 
          +        {"Area"}, 
          +        LookupTable, 
          +        {"FROM"}, 
          +        "Map", 
          +        JoinKind.LeftOuter
          +    ),
          +
          +    #"Expanded Map" = Table.ExpandTableColumn(
          +        JT, 
          +        "Map", 
          +        {"TO"}, 
          +        {"TO"}
          +    ),
          +
          +    #"Replace non-matches with original value" = Table.AddColumn(
          +        #"Expanded Map", 
          +        "Replaced", 
          +        each 
          +            if [TO] = null then [Area] 
          +            else [TO]
          +    ),
          +
          +    #"Remove original column" = Table.RemoveColumns(
          +        #"Replace non-matches with original value",
          +        {"Area", "TO"}
          +    ),
          +
          +    #"Renamed replace column to original name" = Table.RenameColumns(
          +        #"Remove original column",
          +        {{"Replaced", "Area"}}
          +    )
          +
          +in
          +    #"Renamed replace column to original name"
          +
          diff --git a/plugins/autoloader/prism-autoloader.js b/plugins/autoloader/prism-autoloader.js index 85438ba111..5c028464d9 100644 --- a/plugins/autoloader/prism-autoloader.js +++ b/plugins/autoloader/prism-autoloader.js @@ -169,6 +169,8 @@ "n4jsd": "n4js", "objectpascal": "pascal", "px": "pcaxis", + "pq": "powerquery", + "mscript": "powerquery", "py": "python", "robot": "robotframework", "rb": "ruby", diff --git a/plugins/autoloader/prism-autoloader.min.js b/plugins/autoloader/prism-autoloader.min.js index 46f82befcc..8de97ebad6 100644 --- a/plugins/autoloader/prism-autoloader.min.js +++ b/plugins/autoloader/prism-autoloader.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof self&&self.Prism&&self.document&&document.createElement){var l={javascript:"clike",actionscript:"javascript",arduino:"cpp",aspnet:["markup","csharp"],bison:"c",c:"clike",csharp:"clike",cpp:"c",coffeescript:"javascript",crystal:"ruby","css-extras":"css",d:"clike",dart:"clike",django:"markup-templating",ejs:["javascript","markup-templating"],etlua:["lua","markup-templating"],erb:["ruby","markup-templating"],fsharp:"clike","firestore-security-rules":"clike",flow:"javascript",ftl:"markup-templating",glsl:"clike",gml:"clike",go:"clike",groovy:"clike",haml:"ruby",handlebars:"markup-templating",haxe:"clike",java:"clike",javadoc:["markup","java","javadoclike"],jolie:"clike",jsdoc:["javascript","javadoclike"],"js-extras":"javascript","js-templates":"javascript",jsonp:"json",json5:"json",kotlin:"clike",latte:["clike","markup-templating","php"],less:"css",lilypond:"scheme",markdown:"markup","markup-templating":"markup",n4js:"javascript",nginx:"clike",objectivec:"c",opencl:"c",parser:"markup",php:["clike","markup-templating"],phpdoc:["php","javadoclike"],"php-extras":"php",plsql:"sql",processing:"clike",protobuf:"clike",pug:["markup","javascript"],qml:"javascript",qore:"clike",jsx:["markup","javascript"],tsx:["jsx","typescript"],reason:"clike",ruby:"clike",sass:"css",scss:"css",scala:"java","shell-session":"bash",smarty:"markup-templating",solidity:"clike",soy:"markup-templating",sparql:"turtle",sqf:"clike",swift:"clike",tap:"yaml",textile:"markup",tt2:["clike","markup-templating"],twig:"markup",typescript:"javascript","t4-cs":["t4-templating","csharp"],"t4-vb":["t4-templating","visual-basic"],vala:"clike",vbnet:"basic",velocity:"markup",wiki:"markup",xeora:"markup",xquery:"markup"},c={html:"markup",xml:"markup",svg:"markup",mathml:"markup",js:"javascript",g4:"antlr4",adoc:"asciidoc",shell:"bash",rbnf:"bnf",conc:"concurnas",cs:"csharp",dotnet:"csharp",coffee:"coffeescript",jinja2:"django","dns-zone":"dns-zone-file",dockerfile:"docker",xlsx:"excel-formula",xls:"excel-formula",gamemakerlanguage:"gml",hs:"haskell",tex:"latex",context:"latex",ly:"lilypond",emacs:"lisp",elisp:"lisp","emacs-lisp":"lisp",md:"markdown",moon:"moonscript",n4jsd:"n4js",objectpascal:"pascal",px:"pcaxis",py:"python",robot:"robotframework",rb:"ruby",sln:"solution-file",rq:"sparql",trig:"turtle",ts:"typescript",t4:"t4-cs",vb:"visual-basic",xeoracube:"xeora",yml:"yaml"},n={},a="components/",e=Prism.util.currentScript();if(e){var t=/\bplugins\/autoloader\/prism-autoloader\.(?:min\.)js$/i,s=/[\w-]+\.(?:min\.)js$/i;if(e.hasAttribute("data-autoloader-path"))a=e.getAttribute("data-autoloader-path").trim().replace(/\/?$/,"/");else{var i=e.src;t.test(i)?a=i.replace(t,"components/"):s.test(i)&&(a=i.replace(s,"components/"))}}var p=Prism.plugins.autoloader={languages_path:a,use_minified:!0,loadLanguages:o};Prism.hooks.add("complete",function(a){a.element&&a.language&&!a.grammar&&"none"!==a.language&&function(a,e){a in c&&(a=c[a]);var t=e.getAttribute("data-dependencies"),s=e.parentElement;!t&&s&&"pre"===s.tagName.toLowerCase()&&(t=s.getAttribute("data-dependencies")),o(t=t?t.split(/\s*,\s*/g):[],function(){m(a,function(){Prism.highlightElement(e)})})}(a.language,a.element)})}function o(a,e,t){"string"==typeof a&&(a=[a]);var s=a.length,i=0,r=!1;function l(){r||++i===s&&e&&e(a)}0!==s?a.forEach(function(a){m(a,l,function(){r||(r=!0,t&&t(a))})}):e&&setTimeout(e,0)}function m(e,t,s){var i=0<=e.indexOf("!");e=e.replace("!",""),e=c[e]||e;var a=function(){var a=n[e];if(a||(a=n[e]={callbacks:[]}),a.callbacks.push({success:t,error:s}),!i&&Prism.languages[e])u(e,"success");else if(!i&&a.error)u(e,"error");else if(i||!a.loading){a.loading=!0,function(a,e,t){var s=document.createElement("script");s.src=a,s.async=!0,s.onload=function(){document.body.removeChild(s),e&&e()},s.onerror=function(){document.body.removeChild(s),t&&t()},document.body.appendChild(s)}(function(a){return p.languages_path+"prism-"+a+(p.use_minified?".min":"")+".js"}(e),function(){a.loading=!1,u(e,"success")},function(){a.loading=!1,a.error=!0,u(e,"error")})}},r=l[e];r&&r.length?o(r,a,s):a()}function u(a,e){if(n[a]){for(var t=n[a].callbacks,s=0,i=t.length;s >= < <= <> +& @ ? +=> +.. ... + +---------------------------------------------------- + +[ + ["operator", "+"], ["operator", "-"], ["operator", "*"], ["operator", "/"], ["operator", "^"], + ["operator", "="], ["operator", ">"], ["operator", ">="], ["operator", "<"], ["operator", "<="], ["operator", "<>"], + ["operator", "&"], ["operator", "@"], ["operator", "?"], + ["operator", "=>"], + ["operator", ".."], ["operator", "..."] +] + +---------------------------------------------------- + +Checks for all operators. \ No newline at end of file diff --git a/tests/languages/powerquery/quoted_identifier_feature.test b/tests/languages/powerquery/quoted_identifier_feature.test new file mode 100644 index 0000000000..a7af7eeb26 --- /dev/null +++ b/tests/languages/powerquery/quoted_identifier_feature.test @@ -0,0 +1,17 @@ +#"foo" +#"foo bar" +#"foo'bar" +#"foo""bar" + +---------------------------------------------------- + +[ + ["quoted-identifier", "#\"foo\""], + ["quoted-identifier", "#\"foo bar\""], + ["quoted-identifier", "#\"foo'bar\""], + ["quoted-identifier", "#\"foo\"\"bar\""] +] + +---------------------------------------------------- + +Checks for quoted-identifier. \ No newline at end of file diff --git a/tests/languages/powerquery/string_feature.test b/tests/languages/powerquery/string_feature.test new file mode 100644 index 0000000000..dc1606f8eb --- /dev/null +++ b/tests/languages/powerquery/string_feature.test @@ -0,0 +1,15 @@ +"" +"foo" +"foo""bar" + +---------------------------------------------------- + +[ + ["string", "\"\""], + ["string", "\"foo\""], + ["string", "\"foo\"\"bar\""] +] + +---------------------------------------------------- + +Checks for strings. \ No newline at end of file From 328d0e0edaa2a6b247f80337fe0b50443e6aa54d Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Sat, 21 Mar 2020 17:02:30 +0100 Subject: [PATCH 0465/1100] Bash: Added support for escaped quotes (#2256) Single and double quotes can be escaped via backslashes. Prism now supports these escapes. --- components/prism-bash.js | 3 +- components/prism-bash.min.js | 2 +- components/prism-shell-session.js | 4 +- components/prism-shell-session.min.js | 2 +- tests/languages/bash/string_feature.test | 113 ++++++++++++++---- .../shell-session/command_string_feature.test | 15 ++- 6 files changed, 108 insertions(+), 31 deletions(-) diff --git a/components/prism-bash.js b/components/prism-bash.js index a68fab2aff..cb16416772 100644 --- a/components/prism-bash.js +++ b/components/prism-bash.js @@ -121,7 +121,8 @@ }, // “Normal” string { - pattern: /(["'])(?:\\[\s\S]|\$\([^)]+\)|`[^`]+`|(?!\1)[^\\])*\1/, + pattern: /(^|[^\\](?:\\\\)*)(["'])(?:\\[\s\S]|\$\([^)]+\)|`[^`]+`|(?!\2)[^\\])*\2/, + lookbehind: true, greedy: true, inside: insideString } diff --git a/components/prism-bash.min.js b/components/prism-bash.min.js index d1b2a5d3d3..c9c3995f3e 100644 --- a/components/prism-bash.min.js +++ b/components/prism-bash.min.js @@ -1 +1 @@ -!function(e){var t="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",n={environment:{pattern:RegExp("\\$"+t),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--?|-=|\+\+?|\+=|!=?|~|\*\*?|\*=|\/=?|%=?|<<=?|>>=?|<=?|>=?|==?|&&?|&=|\^=?|\|\|?|\|=|\?|:/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+t),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|x[0-9a-fA-F]{1,2}|u[0-9a-fA-F]{4}|U[0-9a-fA-F]{8})/};e.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)\w+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b\w+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+t),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+?)\s*(?:\r?\n|\r)[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:n},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s*(?:\r?\n|\r)[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0},{pattern:/(["'])(?:\\[\s\S]|\$\([^)]+\)|`[^`]+`|(?!\1)[^\\])*\1/,greedy:!0,inside:n}],environment:{pattern:RegExp("\\$?"+t),alias:"constant"},variable:n.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|aptitude|apt-cache|apt-get|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:if|then|else|elif|fi|for|while|in|case|esac|function|select|do|done|until)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|break|cd|continue|eval|exec|exit|export|getopts|hash|pwd|readonly|return|shift|test|times|trap|umask|unset|alias|bind|builtin|caller|command|declare|echo|enable|help|let|local|logout|mapfile|printf|read|readarray|source|type|typeset|ulimit|unalias|set|shopt)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:true|false)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|==?|!=?|=~|<<[<-]?|[&\d]?>>|\d?[<>]&?|&[>&]?|\|[&|]?|<=?|>=?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}};for(var a=["comment","function-name","for-or-select","assign-left","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],r=n.variable[1].inside,s=0;s>=?|<=?|>=?|==?|&&?|&=|\^=?|\|\|?|\|=|\?|:/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+t),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|x[0-9a-fA-F]{1,2}|u[0-9a-fA-F]{4}|U[0-9a-fA-F]{8})/};e.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)\w+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b\w+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+t),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+?)\s*(?:\r?\n|\r)[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:n},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s*(?:\r?\n|\r)[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\](?:\\\\)*)(["'])(?:\\[\s\S]|\$\([^)]+\)|`[^`]+`|(?!\2)[^\\])*\2/,lookbehind:!0,greedy:!0,inside:n}],environment:{pattern:RegExp("\\$?"+t),alias:"constant"},variable:n.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|aptitude|apt-cache|apt-get|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:if|then|else|elif|fi|for|while|in|case|esac|function|select|do|done|until)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|break|cd|continue|eval|exec|exit|export|getopts|hash|pwd|readonly|return|shift|test|times|trap|umask|unset|alias|bind|builtin|caller|command|declare|echo|enable|help|let|local|logout|mapfile|printf|read|readarray|source|type|typeset|ulimit|unalias|set|shopt)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:true|false)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|==?|!=?|=~|<<[<-]?|[&\d]?>>|\d?[<>]&?|&[>&]?|\|[&|]?|<=?|>=?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}};for(var a=["comment","function-name","for-or-select","assign-left","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],r=n.variable[1].inside,s=0;s>)+/.source.replace(/<>/g, strings)), + pattern: RegExp(/[$#](?:[^\\\r\n'"<]|\\.|<>)+/.source.replace(/<>/g, strings)), greedy: true, inside: { 'bash': { diff --git a/components/prism-shell-session.min.js b/components/prism-shell-session.min.js index 9bf45bc05a..6bab26b94a 100644 --- a/components/prism-shell-session.min.js +++ b/components/prism-shell-session.min.js @@ -1 +1 @@ -!function(s){var n=["([\"'])(?:\\\\[\\s\\S]|\\$\\([^)]+\\)|`[^`]+`|(?!\\1)[^\\\\])*\\1","<<-?\\s*(\\w+?)\\s*(?:\r?\n|\r)[\\s\\S]*?(?:\r?\n|\r)\\2","<<-?\\s*([\"'])(\\w+)\\3\\s*(?:\r?\n|\r)[\\s\\S]*?(?:\r?\n|\r)\\4"].join("|");s.languages["shell-session"]={info:{pattern:/^(?:[^\r\n$#*!]+)(?=[$#])/m,alias:"punctuation",inside:{path:{pattern:/(:)[\s\S]+/,lookbehind:!0},user:/^[^\s@:$#*!/\\]+@[^\s@:$#*!/\\]+(?=:|$)/,punctuation:/:/}},command:{pattern:RegExp("[$#](?:[^\r\\n'\"<]|<>)+".replace(/<>/g,n)),greedy:!0,inside:{bash:{pattern:/(^[$#]\s*)[\s\S]+/,lookbehind:!0,alias:"language-bash",inside:s.languages.bash},"shell-symbol":{pattern:/^[$#]/,alias:"important"}}},output:/.(?:.*(?:\r\n?|\n|.$))*/}}(Prism); \ No newline at end of file +!function(s){var n=["([\"'])(?:\\\\[\\s\\S]|\\$\\([^)]+\\)|`[^`]+`|(?!\\1)[^\\\\])*\\1","<<-?\\s*(\\w+?)\\s*(?:\r?\n|\r)[\\s\\S]*?(?:\r?\n|\r)\\2","<<-?\\s*([\"'])(\\w+)\\3\\s*(?:\r?\n|\r)[\\s\\S]*?(?:\r?\n|\r)\\4"].join("|");s.languages["shell-session"]={info:{pattern:/^[^\r\n$#*!]+(?=[$#])/m,alias:"punctuation",inside:{path:{pattern:/(:)[\s\S]+/,lookbehind:!0},user:/^[^\s@:$#*!/\\]+@[^\s@:$#*!/\\]+(?=:|$)/,punctuation:/:/}},command:{pattern:RegExp("[$#](?:[^\\\\\\r\n'\"<]|\\\\.|<>)+".replace(/<>/g,n)),greedy:!0,inside:{bash:{pattern:/(^[$#]\s*)[\s\S]+/,lookbehind:!0,alias:"language-bash",inside:s.languages.bash},"shell-symbol":{pattern:/^[$#]/,alias:"important"}}},output:/.(?:.*(?:\r\n?|\n|.$))*/}}(Prism); \ No newline at end of file diff --git a/tests/languages/bash/string_feature.test b/tests/languages/bash/string_feature.test index d43fdcc704..533ce79ae9 100644 --- a/tests/languages/bash/string_feature.test +++ b/tests/languages/bash/string_feature.test @@ -10,61 +10,124 @@ bar' '"bar"' "$@" "${foo}" +\\"foo" +\'a # ' not a string + << STRING_END foo bar STRING_END + <<- STRING_END foo bar STRING_END + << EOF foo $@ bar EOF + << 'EOF' 'single quoted string' "double quoted string" EOF + << "EOF" foo $bar EOF + << STRING_END # comment STRING_END + " # comment " ---------------------------------------------------- [ - ["string", ["\"\""]], - ["string", ["''"]], - ["string", ["\"foo\""]], - ["string", ["'foo'"]], - ["string", ["\"foo\r\nbar\""]], - ["string", ["'foo\r\nbar'"]], - ["string", ["\"'foo'\""]], - ["string", ["'\"bar\"'"]], - ["string", [ - "\"", ["variable", "$@"], "\"" - ]], - ["string", [ - "\"", ["variable", ["${foo}"]], "\"" - ]], - ["operator", ["<<"]], - ["string", ["STRING_END\r\nfoo\r\nbar\r\nSTRING_END"]], - ["operator", ["<<-"]], - ["string", ["STRING_END\r\nfoo\r\nbar\r\nSTRING_END"]], - ["operator", ["<<"]], - ["string", ["EOF\r\nfoo ", ["variable", "$@"], "\r\nbar\r\nEOF"]], - ["operator", ["<<"]], + ["string", [ + "\"\"" + ]], + ["string", [ + "''" + ]], + ["string", [ + "\"foo\"" + ]], + ["string", [ + "'foo'" + ]], + ["string", [ + "\"foo\r\nbar\"" + ]], + ["string", [ + "'foo\r\nbar'" + ]], + ["string", [ + "\"'foo'\"" + ]], + ["string", [ + "'\"bar\"'" + ]], + ["string", [ + "\"", + ["variable", "$@"], + "\"" + ]], + ["string", [ + "\"", + ["variable", [ + "${foo}" + ]], + "\"" + ]], + ["punctuation", "\\"], + ["punctuation", "\\"], + ["string", [ + "\"foo\"" + ]], + ["punctuation", "\\"], + "'a ", + ["comment", "# ' not a string"], + ["operator", [ + "<<" + ]], + ["string", [ + "STRING_END\r\nfoo\r\nbar\r\nSTRING_END" + ]], + ["operator", [ + "<<-" + ]], + ["string", [ + "STRING_END\r\nfoo\r\nbar\r\nSTRING_END" + ]], + ["operator", [ + "<<" + ]], + ["string", [ + "EOF\r\nfoo ", + ["variable", "$@"], + "\r\nbar\r\nEOF" + ]], + ["operator", [ + "<<" + ]], ["string", "'EOF'\r\n'single quoted string'\r\n\"double quoted string\"\r\nEOF"], - ["operator", ["<<"]], + ["operator", [ + "<<" + ]], ["string", "\"EOF\"\r\nfoo\r\n$bar\r\nEOF"], - ["operator", ["<<"]], - ["string", ["STRING_END\r\n# comment\r\nSTRING_END"]], - ["string", ["\" # comment \""]] + ["operator", [ + "<<" + ]], + ["string", [ + "STRING_END\r\n# comment\r\nSTRING_END" + ]], + ["string", [ + "\" # comment \"" + ]] ] ---------------------------------------------------- diff --git a/tests/languages/shell-session/command_string_feature.test b/tests/languages/shell-session/command_string_feature.test index 95a12191e7..4833cb4de1 100644 --- a/tests/languages/shell-session/command_string_feature.test +++ b/tests/languages/shell-session/command_string_feature.test @@ -13,6 +13,8 @@ foo bar STRING_END +$ echo \'a # ' + ---------------------------------------------------- [ @@ -58,7 +60,18 @@ STRING_END ]], ["string", "\"STRING_END\"\r\nfoo\r\nbar\r\nSTRING_END"] ]] - ]] + ]], + + ["command", [ + ["shell-symbol", "$"], + ["bash", [ + ["builtin", "echo"], + ["punctuation", "\\"], + "'a ", + ["comment", "# "] + ]] + ]], + ["output", "'"] ] ---------------------------------------------------- From 3c043338154fc2a660fc3f6035a8589899f4a644 Mon Sep 17 00:00:00 2001 From: James DiGioia Date: Sat, 21 Mar 2020 12:29:18 -0400 Subject: [PATCH 0466/1100] Remove self & document from IIFE arguments (#2258) If self or document don't exist, they'll error instead of getting to the checks. Fixes #2257. --- plugins/keep-markup/prism-keep-markup.js | 4 ++-- plugins/keep-markup/prism-keep-markup.min.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/keep-markup/prism-keep-markup.js b/plugins/keep-markup/prism-keep-markup.js index 3f87089930..bc136c6720 100644 --- a/plugins/keep-markup/prism-keep-markup.js +++ b/plugins/keep-markup/prism-keep-markup.js @@ -1,4 +1,4 @@ -(function (self, document) { +(function () { if (typeof self === 'undefined' || !self.Prism || !self.document || !document.createRange) { return; @@ -96,4 +96,4 @@ env.highlightedCode = env.element.innerHTML; } }); -}(self, document)); +}()); diff --git a/plugins/keep-markup/prism-keep-markup.min.js b/plugins/keep-markup/prism-keep-markup.min.js index 92bbf46abd..5d072e920a 100644 --- a/plugins/keep-markup/prism-keep-markup.min.js +++ b/plugins/keep-markup/prism-keep-markup.min.js @@ -1 +1 @@ -!function(e,s){void 0!==e&&e.Prism&&e.document&&s.createRange&&(Prism.plugins.KeepMarkup=!0,Prism.hooks.add("before-highlight",function(e){if(e.element.children.length){var a=0,s=[],p=function(e,n){var o={};n||(o.clone=e.cloneNode(!1),o.posOpen=a,s.push(o));for(var t=0,d=e.childNodes.length;tn.node.posOpen&&(n.nodeStart=d,n.nodeStartPos=n.node.posOpen-n.pos),n.nodeStart&&n.pos+d.data.length>=n.node.posClose&&(n.nodeEnd=d,n.nodeEndPos=n.node.posClose-n.pos),n.pos+=d.data.length);if(n.nodeStart&&n.nodeEnd){var r=s.createRange();return r.setStart(n.nodeStart,n.nodeStartPos),r.setEnd(n.nodeEnd,n.nodeEndPos),n.node.clone.appendChild(r.extractContents()),r.insertNode(n.node.clone),r.detach(),!1}}return!0};n.keepMarkup.forEach(function(e){a(n.element,{node:e,pos:0})}),n.highlightedCode=n.element.innerHTML}}))}(self,document); \ No newline at end of file +"undefined"!=typeof self&&self.Prism&&self.document&&document.createRange&&(Prism.plugins.KeepMarkup=!0,Prism.hooks.add("before-highlight",function(e){if(e.element.children.length){var a=0,s=[],l=function(e,n){var o={};n||(o.clone=e.cloneNode(!1),o.posOpen=a,s.push(o));for(var t=0,d=e.childNodes.length;tn.node.posOpen&&(n.nodeStart=d,n.nodeStartPos=n.node.posOpen-n.pos),n.nodeStart&&n.pos+d.data.length>=n.node.posClose&&(n.nodeEnd=d,n.nodeEndPos=n.node.posClose-n.pos),n.pos+=d.data.length);if(n.nodeStart&&n.nodeEnd){var r=document.createRange();return r.setStart(n.nodeStart,n.nodeStartPos),r.setEnd(n.nodeEnd,n.nodeEndPos),n.node.clone.appendChild(r.extractContents()),r.insertNode(n.node.clone),r.detach(),!1}}return!0};n.keepMarkup.forEach(function(e){a(n.element,{node:e,pos:0})}),n.highlightedCode=n.element.innerHTML}})); \ No newline at end of file From e635260b080ac18d215da755be44130cde2d8062 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Sat, 21 Mar 2020 17:38:16 +0100 Subject: [PATCH 0467/1100] Travis: Updated NodeJS versions (#2246) --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 8dbeab59c8..4cbb749561 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,7 @@ language: node_js node_js: -- '8' - '10' +- '12' - 'node' # Build all branches branches: From 43efde2ee33310e5a6d8ddf432f0222734ec5928 Mon Sep 17 00:00:00 2001 From: Cassie Jones Date: Mon, 23 Mar 2020 17:44:09 -0400 Subject: [PATCH 0468/1100] Added support for LLVM IR (#2221) This adds support for LLVM's assembly language. https://llvm.org/docs/LangRef.html --- components.js | 2 +- components.json | 4 + components/prism-llvm.js | 19 +++ components/prism-llvm.min.js | 1 + examples/prism-llvm.html | 23 ++++ plugins/show-language/prism-show-language.js | 1 + .../show-language/prism-show-language.min.js | 2 +- tests/languages/llvm/attributes.test | 47 +++++++ tests/languages/llvm/example-iterative.test | 113 +++++++++++++++++ tests/languages/llvm/example-recursive.test | 87 +++++++++++++ .../llvm/langref-module-example.test | 115 ++++++++++++++++++ tests/languages/llvm/numbers.test | 45 +++++++ tests/languages/llvm/string.test | 22 ++++ 13 files changed, 479 insertions(+), 2 deletions(-) create mode 100644 components/prism-llvm.js create mode 100644 components/prism-llvm.min.js create mode 100644 examples/prism-llvm.html create mode 100644 tests/languages/llvm/attributes.test create mode 100644 tests/languages/llvm/example-iterative.test create mode 100644 tests/languages/llvm/example-recursive.test create mode 100644 tests/languages/llvm/langref-module-example.test create mode 100644 tests/languages/llvm/numbers.test create mode 100644 tests/languages/llvm/string.test diff --git a/components.js b/components.js index 9d8ca0e43f..4a5b2806e3 100644 --- a/components.js +++ b/components.js @@ -1,2 +1,2 @@ -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"Augmented Backus–Naur form","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","owner":"RunDevelopment"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"Backus–Naur form","alias":"rbnf","aliasTitles":{"rbnf":"Routing Backus–Naur form"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dax":{"title":"DAX","owner":"peterbud"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"Extended Backus–Naur form","owner":"RunDevelopment"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment"},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"http":{"title":"HTTP","optional":["css","javascript","json","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"json":{"title":"JSON","owner":"CupOfTea696"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","modify":["actionscript","coffeescript","flow","javascript","typescript","vala"],"owner":"RunDevelopment"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"solidity":{"title":"Solidity (Ethereum)","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","visual-basic"],"owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true}}}; +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"Augmented Backus–Naur form","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","owner":"RunDevelopment"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"Backus–Naur form","alias":"rbnf","aliasTitles":{"rbnf":"Routing Backus–Naur form"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dax":{"title":"DAX","owner":"peterbud"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"Extended Backus–Naur form","owner":"RunDevelopment"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment"},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"http":{"title":"HTTP","optional":["css","javascript","json","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"json":{"title":"JSON","owner":"CupOfTea696"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","modify":["actionscript","coffeescript","flow","javascript","typescript","vala"],"owner":"RunDevelopment"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"solidity":{"title":"Solidity (Ethereum)","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","visual-basic"],"owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true}}}; if (typeof module !== 'undefined' && module.exports) { module.exports = components; } \ No newline at end of file diff --git a/components.json b/components.json index f8a2d1e8eb..9d14518c4b 100644 --- a/components.json +++ b/components.json @@ -602,6 +602,10 @@ "title": "LiveScript", "owner": "Golmote" }, + "llvm": { + "title": "LLVM IR", + "owner": "porglezomp" + }, "lolcode": { "title": "LOLCODE", "owner": "Golmote" diff --git a/components/prism-llvm.js b/components/prism-llvm.js new file mode 100644 index 0000000000..36f85d37a7 --- /dev/null +++ b/components/prism-llvm.js @@ -0,0 +1,19 @@ +(function(Prism) { + Prism.languages.llvm = { + 'comment': /;.*/, + 'string': { + pattern: /"[^"]*"/, + greedy: true, + }, + 'boolean': /\b(?:true|false)\b/, + 'variable': /[%@!#](?:(?!\d)(?:[-$.\w]|\\[a-f\d]{2})+|\d+)/i, + 'label': /(?!\d)(?:[-$.\w]|\\[a-f\d]{2})+:/i, + 'type': { + pattern: /\b(?:double|float|fp128|half|i[1-9]\d*|label|metadata|ppc_fp128|token|void|x86_fp80|x86_mmx)\b/, + alias: 'class-name', + }, + 'keyword': /\b[a-z_][a-z_0-9]*\b/, + 'number': /[+-]?\b\d+(?:\.\d+)?(?:[eE][+-]?\d+)?\b|\b0x[\dA-Fa-f]+\b|\b0xK[\dA-Fa-f]{20}\b|\b0x[ML][\dA-Fa-f]{32}\b|\b0xH[\dA-Fa-f]{4}\b/, + 'punctuation': /[{}[\];(),.!*=<>]/, + }; +}(Prism)); diff --git a/components/prism-llvm.min.js b/components/prism-llvm.min.js new file mode 100644 index 0000000000..e0b0636b27 --- /dev/null +++ b/components/prism-llvm.min.js @@ -0,0 +1 @@ +Prism.languages.llvm={comment:/;.*/,string:{pattern:/"[^"]*"/,greedy:!0},boolean:/\b(?:true|false)\b/,variable:/[%@!#](?:(?!\d)(?:[-$.\w]|\\[a-f\d]{2})+|\d+)/i,label:/(?!\d)(?:[-$.\w]|\\[a-f\d]{2})+:/i,type:{pattern:/\b(?:double|float|fp128|half|i[1-9]\d*|label|metadata|ppc_fp128|token|void|x86_fp80|x86_mmx)\b/,alias:"class-name"},keyword:/\b[a-z_][a-z_0-9]*\b/,number:/[+-]?\b\d+(?:\.\d+)?(?:[eE][+-]?\d+)?\b|\b0x[\dA-Fa-f]+\b|\b0xK[\dA-Fa-f]{20}\b|\b0x[ML][\dA-Fa-f]{32}\b|\b0xH[\dA-Fa-f]{4}\b/,punctuation:/[{}[\];(),.!*=<>]/}; \ No newline at end of file diff --git a/examples/prism-llvm.html b/examples/prism-llvm.html new file mode 100644 index 0000000000..d6b39f0f35 --- /dev/null +++ b/examples/prism-llvm.html @@ -0,0 +1,23 @@ +

          Full Example

          +
          
          +; Declare the string constant as a global constant.
          +@.str = private unnamed_addr constant [13 x i8] c"hello world\0A\00"
          +
          +; External declaration of the puts function
          +declare i32 @puts(i8* nocapture) nounwind
          +
          +; Definition of main function
          +define i32 @main() {   ; i32()*
          +entry:
          +  ; Convert [13 x i8]* to i8*...
          +  %cast210 = getelementptr [13 x i8], [13 x i8]* @.str, i64 0, i64 0
          +
          +  ; Call puts function to write out the string to stdout.
          +  call i32 @puts(i8* %cast210)
          +  ret i32 0
          +}
          +
          +; Named metadata
          +!0 = !{i32 42, null, !"string"}
          +!foo = !{!0}
          +
          diff --git a/plugins/show-language/prism-show-language.js b/plugins/show-language/prism-show-language.js index 450361a7c8..d83dfa39d3 100644 --- a/plugins/show-language/prism-show-language.js +++ b/plugins/show-language/prism-show-language.js @@ -96,6 +96,7 @@ "emacs": "Lisp", "elisp": "Lisp", "emacs-lisp": "Lisp", + "llvm": "LLVM IR", "lolcode": "LOLCODE", "md": "Markdown", "markup-templating": "Markup templating", diff --git a/plugins/show-language/prism-show-language.min.js b/plugins/show-language/prism-show-language.min.js index d8e7e2ce56..2be04bbd5c 100644 --- a/plugins/show-language/prism-show-language.min.js +++ b/plugins/show-language/prism-show-language.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof self&&self.Prism&&self.document)if(Prism.plugins.toolbar){var r={html:"HTML",xml:"XML",svg:"SVG",mathml:"MathML",css:"CSS",clike:"C-like",js:"JavaScript",abap:"ABAP",abnf:"Augmented Backus–Naur form",antlr4:"ANTLR4",g4:"ANTLR4",apacheconf:"Apache Configuration",apl:"APL",aql:"AQL",arff:"ARFF",asciidoc:"AsciiDoc",adoc:"AsciiDoc",asm6502:"6502 Assembly",aspnet:"ASP.NET (C#)",autohotkey:"AutoHotkey",autoit:"AutoIt",shell:"Bash",basic:"BASIC",bbcode:"BBcode",bnf:"Backus–Naur form",rbnf:"Routing Backus–Naur form",conc:"Concurnas",csharp:"C#",cs:"C#",dotnet:"C#",cpp:"C++",cil:"CIL",coffee:"CoffeeScript",cmake:"CMake",csp:"Content-Security-Policy","css-extras":"CSS Extras",dax:"DAX",django:"Django/Jinja2",jinja2:"Django/Jinja2","dns-zone-file":"DNS zone file","dns-zone":"DNS zone file",dockerfile:"Docker",ebnf:"Extended Backus–Naur form",ejs:"EJS",etlua:"Embedded Lua templating",erb:"ERB","excel-formula":"Excel Formula",xlsx:"Excel Formula",xls:"Excel Formula",fsharp:"F#","firestore-security-rules":"Firestore security rules",ftl:"FreeMarker Template Language",gcode:"G-code",gdscript:"GDScript",gedcom:"GEDCOM",glsl:"GLSL",gml:"GameMaker Language",gamemakerlanguage:"GameMaker Language",graphql:"GraphQL",hs:"Haskell",hcl:"HCL",http:"HTTP",hpkp:"HTTP Public-Key-Pins",hsts:"HTTP Strict-Transport-Security",ichigojam:"IchigoJam",inform7:"Inform 7",javadoc:"JavaDoc",javadoclike:"JavaDoc-like",javastacktrace:"Java stack trace",jq:"JQ",jsdoc:"JSDoc","js-extras":"JS Extras","js-templates":"JS Templates",json:"JSON",jsonp:"JSONP",json5:"JSON5",latex:"LaTeX",tex:"TeX",context:"ConTeXt",lilypond:"LilyPond",ly:"LilyPond",emacs:"Lisp",elisp:"Lisp","emacs-lisp":"Lisp",lolcode:"LOLCODE",md:"Markdown","markup-templating":"Markup templating",matlab:"MATLAB",mel:"MEL",moon:"MoonScript",n1ql:"N1QL",n4js:"N4JS",n4jsd:"N4JS","nand2tetris-hdl":"Nand To Tetris HDL",nasm:"NASM",neon:"NEON",nginx:"nginx",nsis:"NSIS",objectivec:"Objective-C",ocaml:"OCaml",opencl:"OpenCL",parigp:"PARI/GP",objectpascal:"Object Pascal",pcaxis:"PC-Axis",px:"PC-Axis",php:"PHP",phpdoc:"PHPDoc","php-extras":"PHP Extras",plsql:"PL/SQL",powerquery:"PowerQuery",pq:"PowerQuery",mscript:"PowerQuery",powershell:"PowerShell",properties:".properties",protobuf:"Protocol Buffers",py:"Python",q:"Q (kdb+ database)",qml:"QML",jsx:"React JSX",tsx:"React TSX",renpy:"Ren'py",rest:"reST (reStructuredText)",robotframework:"Robot Framework",robot:"Robot Framework",rb:"Ruby",sas:"SAS",sass:"Sass (Sass)",scss:"Sass (Scss)","shell-session":"Shell session",solidity:"Solidity (Ethereum)","solution-file":"Solution file",sln:"Solution file",soy:"Soy (Closure Template)",sparql:"SPARQL",rq:"SPARQL","splunk-spl":"Splunk SPL",sqf:"SQF: Status Quo Function (Arma 3)",sql:"SQL",tap:"TAP",toml:"TOML",tt2:"Template Toolkit 2",trig:"TriG",ts:"TypeScript","t4-cs":"T4 Text Templates (C#)",t4:"T4 Text Templates (C#)","t4-vb":"T4 Text Templates (VB)","t4-templating":"T4 templating",vbnet:"VB.Net",vhdl:"VHDL",vim:"vim","visual-basic":"Visual Basic",vb:"Visual Basic",wasm:"WebAssembly",wiki:"Wiki markup",xeoracube:"XeoraCube",xojo:"Xojo (REALbasic)",xquery:"XQuery",yaml:"YAML",yml:"YAML"};Prism.plugins.toolbar.registerButton("show-language",function(e){var a=e.element.parentNode;if(a&&/pre/i.test(a.nodeName)){var s,t=a.getAttribute("data-language")||r[e.language]||((s=e.language)?(s.substring(0,1).toUpperCase()+s.substring(1)).replace(/s(?=cript)/,"S"):s);if(t){var o=document.createElement("span");return o.textContent=t,o}}})}else console.warn("Show Languages plugin loaded before Toolbar plugin.")}(); \ No newline at end of file +!function(){if("undefined"!=typeof self&&self.Prism&&self.document)if(Prism.plugins.toolbar){var r={html:"HTML",xml:"XML",svg:"SVG",mathml:"MathML",css:"CSS",clike:"C-like",js:"JavaScript",abap:"ABAP",abnf:"Augmented Backus–Naur form",antlr4:"ANTLR4",g4:"ANTLR4",apacheconf:"Apache Configuration",apl:"APL",aql:"AQL",arff:"ARFF",asciidoc:"AsciiDoc",adoc:"AsciiDoc",asm6502:"6502 Assembly",aspnet:"ASP.NET (C#)",autohotkey:"AutoHotkey",autoit:"AutoIt",shell:"Bash",basic:"BASIC",bbcode:"BBcode",bnf:"Backus–Naur form",rbnf:"Routing Backus–Naur form",conc:"Concurnas",csharp:"C#",cs:"C#",dotnet:"C#",cpp:"C++",cil:"CIL",coffee:"CoffeeScript",cmake:"CMake",csp:"Content-Security-Policy","css-extras":"CSS Extras",dax:"DAX",django:"Django/Jinja2",jinja2:"Django/Jinja2","dns-zone-file":"DNS zone file","dns-zone":"DNS zone file",dockerfile:"Docker",ebnf:"Extended Backus–Naur form",ejs:"EJS",etlua:"Embedded Lua templating",erb:"ERB","excel-formula":"Excel Formula",xlsx:"Excel Formula",xls:"Excel Formula",fsharp:"F#","firestore-security-rules":"Firestore security rules",ftl:"FreeMarker Template Language",gcode:"G-code",gdscript:"GDScript",gedcom:"GEDCOM",glsl:"GLSL",gml:"GameMaker Language",gamemakerlanguage:"GameMaker Language",graphql:"GraphQL",hs:"Haskell",hcl:"HCL",http:"HTTP",hpkp:"HTTP Public-Key-Pins",hsts:"HTTP Strict-Transport-Security",ichigojam:"IchigoJam",inform7:"Inform 7",javadoc:"JavaDoc",javadoclike:"JavaDoc-like",javastacktrace:"Java stack trace",jq:"JQ",jsdoc:"JSDoc","js-extras":"JS Extras","js-templates":"JS Templates",json:"JSON",jsonp:"JSONP",json5:"JSON5",latex:"LaTeX",tex:"TeX",context:"ConTeXt",lilypond:"LilyPond",ly:"LilyPond",emacs:"Lisp",elisp:"Lisp","emacs-lisp":"Lisp",llvm:"LLVM IR",lolcode:"LOLCODE",md:"Markdown","markup-templating":"Markup templating",matlab:"MATLAB",mel:"MEL",moon:"MoonScript",n1ql:"N1QL",n4js:"N4JS",n4jsd:"N4JS","nand2tetris-hdl":"Nand To Tetris HDL",nasm:"NASM",neon:"NEON",nginx:"nginx",nsis:"NSIS",objectivec:"Objective-C",ocaml:"OCaml",opencl:"OpenCL",parigp:"PARI/GP",objectpascal:"Object Pascal",pcaxis:"PC-Axis",px:"PC-Axis",php:"PHP",phpdoc:"PHPDoc","php-extras":"PHP Extras",plsql:"PL/SQL",powerquery:"PowerQuery",pq:"PowerQuery",mscript:"PowerQuery",powershell:"PowerShell",properties:".properties",protobuf:"Protocol Buffers",py:"Python",q:"Q (kdb+ database)",qml:"QML",jsx:"React JSX",tsx:"React TSX",renpy:"Ren'py",rest:"reST (reStructuredText)",robotframework:"Robot Framework",robot:"Robot Framework",rb:"Ruby",sas:"SAS",sass:"Sass (Sass)",scss:"Sass (Scss)","shell-session":"Shell session",solidity:"Solidity (Ethereum)","solution-file":"Solution file",sln:"Solution file",soy:"Soy (Closure Template)",sparql:"SPARQL",rq:"SPARQL","splunk-spl":"Splunk SPL",sqf:"SQF: Status Quo Function (Arma 3)",sql:"SQL",tap:"TAP",toml:"TOML",tt2:"Template Toolkit 2",trig:"TriG",ts:"TypeScript","t4-cs":"T4 Text Templates (C#)",t4:"T4 Text Templates (C#)","t4-vb":"T4 Text Templates (VB)","t4-templating":"T4 templating",vbnet:"VB.Net",vhdl:"VHDL",vim:"vim","visual-basic":"Visual Basic",vb:"Visual Basic",wasm:"WebAssembly",wiki:"Wiki markup",xeoracube:"XeoraCube",xojo:"Xojo (REALbasic)",xquery:"XQuery",yaml:"YAML",yml:"YAML"};Prism.plugins.toolbar.registerButton("show-language",function(e){var a=e.element.parentNode;if(a&&/pre/i.test(a.nodeName)){var s,t=a.getAttribute("data-language")||r[e.language]||((s=e.language)?(s.substring(0,1).toUpperCase()+s.substring(1)).replace(/s(?=cript)/,"S"):s);if(t){var o=document.createElement("span");return o.textContent=t,o}}})}else console.warn("Show Languages plugin loaded before Toolbar plugin.")}(); \ No newline at end of file diff --git a/tests/languages/llvm/attributes.test b/tests/languages/llvm/attributes.test new file mode 100644 index 0000000000..055167e1b1 --- /dev/null +++ b/tests/languages/llvm/attributes.test @@ -0,0 +1,47 @@ +; Target-independent attributes: +attributes #0 = { alwaysinline alignstack=4 } + +; Target-dependent attributes: +attributes #1 = { "no-sse" } + +; Function @f has attributes: alwaysinline, alignstack=4, and "no-sse". +define void @f() #0 #1 { ... } + +---------------------------------------------------- + +[ + ["comment", "; Target-independent attributes:"], + ["keyword", "attributes"], + ["variable", "#0"], + ["punctuation", "="], + ["punctuation", "{"], + ["keyword", "alwaysinline"], + ["keyword", "alignstack"], + ["punctuation", "="], + ["number", "4"], + ["punctuation", "}"], + ["comment", "; Target-dependent attributes:"], + ["keyword", "attributes"], + ["variable", "#1"], + ["punctuation", "="], + ["punctuation", "{"], + ["string", "\"no-sse\""], + ["punctuation", "}"], + ["comment", "; Function @f has attributes: alwaysinline, alignstack=4, and \"no-sse\"."], + ["keyword", "define"], + ["type", "void"], + ["variable", "@f"], + ["punctuation", "("], + ["punctuation", ")"], + ["variable", "#0"], + ["variable", "#1"], + ["punctuation", "{"], + ["punctuation", "."], + ["punctuation", "."], + ["punctuation", "."], + ["punctuation", "}"] +] + +---------------------------------------------------- + +Tests the attribute "#id" syntax. diff --git a/tests/languages/llvm/example-iterative.test b/tests/languages/llvm/example-iterative.test new file mode 100644 index 0000000000..da48891352 --- /dev/null +++ b/tests/languages/llvm/example-iterative.test @@ -0,0 +1,113 @@ +define i32 @add(i32 %a, i32 %b) { +entry: + br label %tailrecurse + +tailrecurse: + %a.tr = phi i32 [ %a, %entry ], [ %tmp2, %recurse ] + %b.tr = phi i32 [ %b, %entry ], [ %tmp3, %recurse ] + %tmp1 = icmp eq i32 %a.tr, 0 + br i1 %tmp1, label %done, label %recurse + +recurse: + %tmp2 = sub i32 %a.tr, 1 + %tmp3 = add i32 %b.tr, 1 + br label %tailrecurse + +done: + ret i32 %b.tr +} + +---------------------------------------------------- + +[ + ["keyword", "define"], + ["type", "i32"], + ["variable", "@add"], + ["punctuation", "("], + ["type", "i32"], + ["variable", "%a"], + ["punctuation", ","], + ["type", "i32"], + ["variable", "%b"], + ["punctuation", ")"], + ["punctuation", "{"], + ["label", "entry:"], + ["keyword", "br"], + ["type", "label"], + ["variable", "%tailrecurse"], + ["label", "tailrecurse:"], + ["variable", "%a.tr"], + ["punctuation", "="], + ["keyword", "phi"], + ["type", "i32"], + ["punctuation", "["], + ["variable", "%a"], + ["punctuation", ","], + ["variable", "%entry"], + ["punctuation", "]"], + ["punctuation", ","], + ["punctuation", "["], + ["variable", "%tmp2"], + ["punctuation", ","], + ["variable", "%recurse"], + ["punctuation", "]"], + ["variable", "%b.tr"], + ["punctuation", "="], + ["keyword", "phi"], + ["type", "i32"], + ["punctuation", "["], + ["variable", "%b"], + ["punctuation", ","], + ["variable", "%entry"], + ["punctuation", "]"], + ["punctuation", ","], + ["punctuation", "["], + ["variable", "%tmp3"], + ["punctuation", ","], + ["variable", "%recurse"], + ["punctuation", "]"], + ["variable", "%tmp1"], + ["punctuation", "="], + ["keyword", "icmp"], + ["keyword", "eq"], + ["type", "i32"], + ["variable", "%a.tr"], + ["punctuation", ","], + ["number", "0"], + ["keyword", "br"], + ["type", "i1"], + ["variable", "%tmp1"], + ["punctuation", ","], + ["type", "label"], + ["variable", "%done"], + ["punctuation", ","], + ["type", "label"], + ["variable", "%recurse"], + ["label", "recurse:"], + ["variable", "%tmp2"], + ["punctuation", "="], + ["keyword", "sub"], + ["type", "i32"], + ["variable", "%a.tr"], + ["punctuation", ","], + ["number", "1"], + ["variable", "%tmp3"], + ["punctuation", "="], + ["keyword", "add"], + ["type", "i32"], + ["variable", "%b.tr"], + ["punctuation", ","], + ["number", "1"], + ["keyword", "br"], + ["type", "label"], + ["variable", "%tailrecurse"], + ["label", "done:"], + ["keyword", "ret"], + ["type", "i32"], + ["variable", "%b.tr"], + ["punctuation", "}"] +] + +---------------------------------------------------- + +An iterative example program. diff --git a/tests/languages/llvm/example-recursive.test b/tests/languages/llvm/example-recursive.test new file mode 100644 index 0000000000..50b1573cde --- /dev/null +++ b/tests/languages/llvm/example-recursive.test @@ -0,0 +1,87 @@ +define i32 @add(i32 %a, i32 %b) { +entry: + %tmp1 = icmp eq i32 %a, 0 + br i1 %tmp1, label %done, label %recurse + +recurse: + %tmp2 = sub i32 %a, 1 + %tmp3 = add i32 %b, 1 + %tmp4 = call i32 @add(i32 %tmp2, i32 %tmp3) + ret i32 %tmp4 + +done: + ret i32 %b +} + +---------------------------------------------------- + +[ + ["keyword", "define"], + ["type", "i32"], + ["variable", "@add"], + ["punctuation", "("], + ["type", "i32"], + ["variable", "%a"], + ["punctuation", ","], + ["type", "i32"], + ["variable", "%b"], + ["punctuation", ")"], + ["punctuation", "{"], + ["label", "entry:"], + ["variable", "%tmp1"], + ["punctuation", "="], + ["keyword", "icmp"], + ["keyword", "eq"], + ["type", "i32"], + ["variable", "%a"], + ["punctuation", ","], + ["number", "0"], + ["keyword", "br"], + ["type", "i1"], + ["variable", "%tmp1"], + ["punctuation", ","], + ["type", "label"], + ["variable", "%done"], + ["punctuation", ","], + ["type", "label"], + ["variable", "%recurse"], + ["label", "recurse:"], + ["variable", "%tmp2"], + ["punctuation", "="], + ["keyword", "sub"], + ["type", "i32"], + ["variable", "%a"], + ["punctuation", ","], + ["number", "1"], + ["variable", "%tmp3"], + ["punctuation", "="], + ["keyword", "add"], + ["type", "i32"], + ["variable", "%b"], + ["punctuation", ","], + ["number", "1"], + ["variable", "%tmp4"], + ["punctuation", "="], + ["keyword", "call"], + ["type", "i32"], + ["variable", "@add"], + ["punctuation", "("], + ["type", "i32"], + ["variable", "%tmp2"], + ["punctuation", ","], + ["type", "i32"], + ["variable", "%tmp3"], + ["punctuation", ")"], + ["keyword", "ret"], + ["type", "i32"], + ["variable", "%tmp4"], + ["label", "done:"], + ["keyword", "ret"], + ["type", "i32"], + ["variable", "%b"], + ["punctuation", "}"] +] + +---------------------------------------------------- + +A recursive example program. diff --git a/tests/languages/llvm/langref-module-example.test b/tests/languages/llvm/langref-module-example.test new file mode 100644 index 0000000000..b9b5e9154a --- /dev/null +++ b/tests/languages/llvm/langref-module-example.test @@ -0,0 +1,115 @@ +; Declare the string constant as a global constant. +@.str = private unnamed_addr constant [13 x i8] c"hello world\0A\00" + +; External declaration of the puts function +declare i32 @puts(i8* nocapture) nounwind + +; Definition of main function +define i32 @main() { ; i32()* + ; Convert [13 x i8]* to i8*... + %cast210 = getelementptr [13 x i8], [13 x i8]* @.str, i64 0, i64 0 + + ; Call puts function to write out the string to stdout. + call i32 @puts(i8* %cast210) + ret i32 0 +} + +; Named metadata +!0 = !{i32 42, null, !"string"} +!foo = !{!0} + +---------------------------------------------------- + +[ + ["comment", "; Declare the string constant as a global constant."], + ["variable", "@.str"], + ["punctuation", "="], + ["keyword", "private"], + ["keyword", "unnamed_addr"], + ["keyword", "constant"], + ["punctuation", "["], + ["number", "13"], + ["keyword", "x"], + ["type", "i8"], + ["punctuation", "]"], + ["keyword", "c"], + ["string", "\"hello world\\0A\\00\""], + ["comment", "; External declaration of the puts function"], + ["keyword", "declare"], + ["type", "i32"], + ["variable", "@puts"], + ["punctuation", "("], + ["type", "i8"], + ["punctuation", "*"], + ["keyword", "nocapture"], + ["punctuation", ")"], + ["keyword", "nounwind"], + ["comment", "; Definition of main function"], + ["keyword", "define"], + ["type", "i32"], + ["variable", "@main"], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", "{"], + ["comment", "; i32()*"], + ["comment", "; Convert [13 x i8]* to i8*..."], + ["variable", "%cast210"], + ["punctuation", "="], + ["keyword", "getelementptr"], + ["punctuation", "["], + ["number", "13"], + ["keyword", "x"], + ["type", "i8"], + ["punctuation", "]"], + ["punctuation", ","], + ["punctuation", "["], + ["number", "13"], + ["keyword", "x"], + ["type", "i8"], + ["punctuation", "]"], + ["punctuation", "*"], + ["variable", "@.str"], + ["punctuation", ","], + ["type", "i64"], + ["number", "0"], + ["punctuation", ","], + ["type", "i64"], + ["number", "0"], + ["comment", "; Call puts function to write out the string to stdout."], + ["keyword", "call"], + ["type", "i32"], + ["variable", "@puts"], + ["punctuation", "("], + ["type", "i8"], + ["punctuation", "*"], + ["variable", "%cast210"], + ["punctuation", ")"], + ["keyword", "ret"], + ["type", "i32"], + ["number", "0"], + ["punctuation", "}"], + ["comment", "; Named metadata"], + ["variable", "!0"], + ["punctuation", "="], + ["punctuation", "!"], + ["punctuation", "{"], + ["type", "i32"], + ["number", "42"], + ["punctuation", ","], + ["keyword", "null"], + ["punctuation", ","], + ["punctuation", "!"], + ["string", "\"string\""], + ["punctuation", "}"], + ["variable", "!foo"], + ["punctuation", "="], + ["punctuation", "!"], + ["punctuation", "{"], + ["variable", "!0"], + ["punctuation", "}"] +] + +---------------------------------------------------- + +Tests the example included on the LangRef, at: +https://llvm.org/docs/LangRef.html#module-structure diff --git a/tests/languages/llvm/numbers.test b/tests/languages/llvm/numbers.test new file mode 100644 index 0000000000..2c700b1605 --- /dev/null +++ b/tests/languages/llvm/numbers.test @@ -0,0 +1,45 @@ +0 +1 ++1 +-1 + ++1.0 +2.7e3 +-1.0e+3 + +double 0x432ff973cafa8000 +double 4.5e+15 ; equivalent forms as mentioned in the LangRef + +0xK0123456789ABCDEFabcd ; x86_fp80 +0xM0123456789ABCDEF0123456789abcdef ; ppc_fp128 +0xL0123456789ABCDEF0123456789abcdef ; fp128 +0xHFACE ; half + +---------------------------------------------------- + +[ + ["number", "0"], + ["number", "1"], + ["number", "+1"], + ["number", "-1"], + ["number", "+1.0"], + ["number", "2.7e3"], + ["number", "-1.0e+3"], + ["type", "double"], + ["number", "0x432ff973cafa8000"], + ["type", "double"], + ["number", "4.5e+15"], + ["comment", "; equivalent forms as mentioned in the LangRef"], + ["number", "0xK0123456789ABCDEFabcd"], + ["comment", "; x86_fp80"], + ["number", "0xM0123456789ABCDEF0123456789abcdef"], + ["comment", "; ppc_fp128"], + ["number", "0xL0123456789ABCDEF0123456789abcdef"], + ["comment", "; fp128"], + ["number", "0xHFACE"], + ["comment", "; half"] +] + +---------------------------------------------------- + +Numeric literals. diff --git a/tests/languages/llvm/string.test b/tests/languages/llvm/string.test new file mode 100644 index 0000000000..dc083f356c --- /dev/null +++ b/tests/languages/llvm/string.test @@ -0,0 +1,22 @@ +" ; " +"" +"\00\FF" +"\22\5cI appreciate that LLVM strings only one kind of escaping" +"/some/path" +b"hello" + +---------------------------------------------------- + +[ + ["string", "\" ; \""], + ["string", "\"\""], + ["string", "\"\\00\\FF\""], + ["string", "\"\\22\\5cI appreciate that LLVM strings only one kind of escaping\""], + ["string", "\"/some/path\""], + ["keyword", "b"], + ["string", "\"hello\""] +] + +---------------------------------------------------- + +Different string literals. From 42b15463cb3e7cfb0362e7fc4f70a8dc6e6ec6af Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Tue, 24 Mar 2020 20:30:58 +0100 Subject: [PATCH 0469/1100] C# improvements (#1444) A complete rewrite of the C# language to support almost every feature of C# 8.0. --- components/prism-csharp.js | 394 +++++++++++++++--- components/prism-csharp.min.js | 2 +- tests/languages/csharp/attribute_feature.test | 258 ++++++++++++ .../class-name-declaration_feature.test | 110 +++++ ...ass-name-variables-parameters_feature.test | 121 ++++++ .../languages/csharp/class-name_feature.test | 34 -- .../constructor-invocation_feature.test | 86 ++++ tests/languages/csharp/for_feature.test | 33 ++ .../csharp/generic-constraint_feature.test | 119 ++++++ tests/languages/csharp/generic_feature.test | 30 +- .../csharp/interpolation-string_feature.test | 114 +++++ tests/languages/csharp/issue1365.test | 34 +- tests/languages/csharp/issue1371.test | 128 ++++-- tests/languages/csharp/keyword_feature.test | 42 +- .../csharp/named-parameter_feature.test | 21 + tests/languages/csharp/namespace_feature.test | 25 ++ tests/languages/csharp/number_feature.test | 42 +- tests/languages/csharp/operator_feature.test | 5 +- tests/languages/csharp/range_feature.test | 42 ++ .../languages/csharp/return-type_feature.test | 166 ++++++++ .../csharp/type-expression_feature.test | 63 +++ tests/languages/csharp/type-list_feature.test | 153 +++++++ .../csharp/using-directive_feature.test | 81 ++++ .../t4-cs/block_standard_feature.test | 8 +- 24 files changed, 1934 insertions(+), 177 deletions(-) create mode 100644 tests/languages/csharp/attribute_feature.test create mode 100644 tests/languages/csharp/class-name-declaration_feature.test create mode 100644 tests/languages/csharp/class-name-variables-parameters_feature.test delete mode 100644 tests/languages/csharp/class-name_feature.test create mode 100644 tests/languages/csharp/constructor-invocation_feature.test create mode 100644 tests/languages/csharp/for_feature.test create mode 100644 tests/languages/csharp/generic-constraint_feature.test create mode 100644 tests/languages/csharp/interpolation-string_feature.test create mode 100644 tests/languages/csharp/named-parameter_feature.test create mode 100644 tests/languages/csharp/namespace_feature.test create mode 100644 tests/languages/csharp/range_feature.test create mode 100644 tests/languages/csharp/return-type_feature.test create mode 100644 tests/languages/csharp/type-expression_feature.test create mode 100644 tests/languages/csharp/type-list_feature.test create mode 100644 tests/languages/csharp/using-directive_feature.test diff --git a/components/prism-csharp.js b/components/prism-csharp.js index 8ff4e00932..4cb35fc946 100644 --- a/components/prism-csharp.js +++ b/components/prism-csharp.js @@ -1,81 +1,359 @@ -Prism.languages.csharp = Prism.languages.extend('clike', { - 'keyword': /\b(?:abstract|add|alias|as|ascending|async|await|base|bool|break|byte|case|catch|char|checked|class|const|continue|decimal|default|delegate|descending|do|double|dynamic|else|enum|event|explicit|extern|false|finally|fixed|float|for|foreach|from|get|global|goto|group|if|implicit|in|int|interface|internal|into|is|join|let|lock|long|namespace|new|null|object|operator|orderby|out|override|params|partial|private|protected|public|readonly|ref|remove|return|sbyte|sealed|select|set|short|sizeof|stackalloc|static|string|struct|switch|this|throw|true|try|typeof|uint|ulong|unchecked|unsafe|ushort|using|value|var|virtual|void|volatile|where|while|yield)\b/, - 'string': [ - { - pattern: /@("|')(?:\1\1|\\[\s\S]|(?!\1)[^\\])*\1/, - greedy: true - }, - { - pattern: /("|')(?:\\.|(?!\1)[^\\\r\n])*?\1/, - greedy: true +(function (Prism) { + + /** + * Replaces all placeholders "<>" of given pattern with the n-th replacement (zero based). + * + * Note: This is a simple text based replacement. Be careful when using backreferences! + * + * @param {string} pattern the given pattern. + * @param {string[]} replacements a list of replacement which can be inserted into the given pattern. + * @returns {string} the pattern with all placeholders replaced with their corresponding replacements. + * @example replace(/a<<0>>a/.source, [/b+/.source]) === /a(?:b+)a/.source + */ + function replace(pattern, replacements) { + return pattern.replace(/<<(\d+)>>/g, function (m, index) { + return '(?:' + replacements[+index] + ')'; + }); + } + /** + * @param {string} pattern + * @param {string[]} replacements + * @param {string} [flags] + * @returns {RegExp} + */ + function re(pattern, replacements, flags) { + return RegExp(replace(pattern, replacements), flags || ''); + } + + /** + * Creates a nested pattern where all occurrences of the string `<>` are replaced with the pattern itself. + * + * @param {string} pattern + * @param {number} depthLog2 + * @returns {string} + */ + function nested(pattern, depthLog2) { + for (var i = 0; i < depthLog2; i++) { + pattern = pattern.replace(/<>/g, '(?:' + pattern + ')'); + } + return pattern.replace(/<>/g, '[^\\s\\S]'); + } + + // https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/ + var keywordKinds = { + // keywords which represent a return or variable type + type: 'bool byte char decimal double dynamic float int long object sbyte short string uint ulong ushort var void', + // keywords which are used to declare a type + typeDeclaration: 'class enum interface struct', + // contextual keywords + // ("var" and "dynamic" are missing because they are used like types) + contextual: 'add alias ascending async await by descending from get global group into join let nameof notnull on orderby partial remove select set unmanaged value when where where', + // all other keywords + other: 'abstract as base break case catch checked const continue default delegate do else event explicit extern finally fixed for foreach goto if implicit in internal is lock namespace new null operator out override params private protected public readonly ref return sealed sizeof stackalloc static switch this throw try typeof unchecked unsafe using virtual volatile while yield' + }; + + // keywords + function keywordsToPattern(words) { + return '\\b(?:' + words.trim().replace(/ /g, '|') + ')\\b'; + } + var typeDeclarationKeywords = keywordsToPattern(keywordKinds.typeDeclaration); + var keywords = RegExp(keywordsToPattern(keywordKinds.type + ' ' + keywordKinds.typeDeclaration + ' ' + keywordKinds.contextual + ' ' + keywordKinds.other)); + var nonTypeKeywords = keywordsToPattern(keywordKinds.typeDeclaration + ' ' + keywordKinds.contextual + ' ' + keywordKinds.other); + var nonContextualKeywords = keywordsToPattern(keywordKinds.type + ' ' + keywordKinds.typeDeclaration + ' ' + keywordKinds.other); + + // types + var generic = nested(/<(?:[^<>;=+\-*/%&|^]|<>)*>/.source, 2); // the idea behind the other forbidden characters is to prevent false positives. Same for tupleElement. + var nestedRound = nested(/\((?:[^()]|<>)*\)/.source, 2); + var name = /@?\b[A-Za-z_]\w*\b/.source; + var genericName = replace(/<<0>>(?:\s*<<1>>)?/.source, [name, generic]); + var identifier = replace(/(?!<<0>>)<<1>>(?:\s*\.\s*<<1>>)*/.source, [nonTypeKeywords, genericName]); + var array = /\[\s*(?:,\s*)*\]/.source; + var tupleElement = replace(/[^,()<>[\];=+\-*/%&|^]|<<0>>|<<1>>|<<2>>/.source, [generic, nestedRound, array]) + var tuple = replace(/\(<<0>>+(?:,<<0>>+)+\)/.source, [tupleElement]); + var typeExpression = replace(/(?:<<0>>|<<1>>)(?:\s*(?:\?\s*)?<<2>>)*(?:\s*\?)?/.source, [tuple, identifier, array]); + + var typeInside = { + 'keyword': keywords, + 'punctuation': /[<>()?,.:[\]]/ + }; + + // strings & characters + // https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/language-specification/lexical-structure#character-literals + // https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/language-specification/lexical-structure#string-literals + var character = /'(?:[^\r\n'\\]|\\.|\\[Uux][\da-fA-F]{1,8})'/.source; // simplified pattern + var regularString = /"(?:\\.|[^\\"\r\n])*"/.source; + var verbatimString = /@"(?:""|\\[\s\S]|[^\\"])*"(?!")/.source; + + + Prism.languages.csharp = Prism.languages.extend('clike', { + 'string': [ + { + pattern: re(/(^|[^$\\])<<0>>/.source, [verbatimString]), + lookbehind: true, + greedy: true + }, + { + pattern: re(/(^|[^@$\\])<<0>>/.source, [regularString]), + lookbehind: true, + greedy: true + }, + { + pattern: RegExp(character), + greedy: true, + alias: 'character' + } + ], + 'class-name': [ + { + // Using static + // using static System.Math; + pattern: re(/(\busing\s+static\s+)<<0>>(?=\s*;)/.source, [identifier]), + lookbehind: true, + inside: typeInside + }, + { + // Using alias (type) + // using Project = PC.MyCompany.Project; + pattern: re(/(\busing\s+<<0>>\s*=\s*)<<1>>(?=\s*;)/.source, [name, typeExpression]), + lookbehind: true, + inside: typeInside + }, + { + // Using alias (alias) + // using Project = PC.MyCompany.Project; + pattern: re(/(\busing\s+)<<0>>(?=\s*=)/.source, [name]), + lookbehind: true + }, + { + // Type declarations + // class Foo + // interface Foo + pattern: re(/(\b<<0>>\s+)<<1>>/.source, [typeDeclarationKeywords, genericName]), + lookbehind: true, + inside: typeInside + }, + { + // Single catch exception declaration + // catch(Foo) + // (things like catch(Foo e) is covered by variable declaration) + pattern: re(/(\bcatch\s*\(\s*)<<0>>/.source, [identifier]), + lookbehind: true, + inside: typeInside + }, + { + // Name of the type parameter of generic constraints + // where Foo : class + pattern: re(/(\bwhere\s+)<<0>>/.source, [name]), + lookbehind: true + }, + { + // Casts and checks via as and is. + // as Foo, is Bar + // (things like if(a is Foo b) is covered by variable declaration) + pattern: re(/(\b(?:is|as)\s+)<<0>>/.source, [typeExpression]), + lookbehind: true, + inside: typeInside + }, + { + // Variable, field and parameter declaration + // (Foo bar, Bar baz, Foo[,,] bay, Foo> bax) + pattern: re(/\b<<0>>(?=\s+(?!<<1>>)<<2>>(?:\s*[=,;:{)\]]|\s+in))/.source, [typeExpression, nonContextualKeywords, name]), + inside: typeInside + } + ], + 'keyword': keywords, + // https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/language-specification/lexical-structure#literals + 'number': /(?:\b0(?:x[\da-f_]*[\da-f]|b[01_]*[01])|(?:\B\.\d+(?:_+\d+)*|\b\d+(?:_+\d+)*(?:\.\d+(?:_+\d+)*)?)(?:e[-+]?\d+(?:_+\d+)*)?)(?:ul|lu|[dflmu])?\b/i, + 'operator': />>=?|<<=?|[-=]>|([-+&|])\1|~|\?\?=?|[-+*/%&|^!=<>]=?/, + 'punctuation': /\?\.?|::|[{}[\];(),.:]/ + }); + + Prism.languages.insertBefore('csharp', 'number', { + 'range': { + pattern: /\.\./, + alias: 'operator' + } + }); + + Prism.languages.insertBefore('csharp', 'punctuation', { + 'named-parameter': { + pattern: re(/([(,]\s*)<<0>>(?=\s*:)/.source, [name]), + lookbehind: true, + alias: 'punctuation' } - ], - 'class-name': [ - { - // (Foo bar, Bar baz) - pattern: /\b[A-Z]\w*(?:\.\w+)*\b(?=\s+\w+)/, + }); + + Prism.languages.insertBefore('csharp', 'class-name', { + 'namespace': { + // namespace Foo.Bar {} + // using Foo.Bar; + pattern: re(/(\b(?:namespace|using)\s+)<<0>>(?:\s*\.\s*<<0>>)*(?=\s*[;{])/.source, [name]), + lookbehind: true, inside: { - punctuation: /\./ + 'punctuation': /\./ } }, - { - // [Foo] - pattern: /(\[)[A-Z]\w*(?:\.\w+)*\b/, + 'type-expression': { + // default(Foo), typeof(Foo), sizeof(int) + pattern: re(/(\b(?:default|typeof|sizeof)\s*\(\s*)(?:[^()\s]|\s(?!\s*\))|<<0>>)*(?=\s*\))/.source, [nestedRound]), + lookbehind: true, + alias: 'class-name', + inside: typeInside + }, + 'return-type': { + // Foo ForBar(); Foo IFoo.Bar() => 0 + // int this[int index] => 0; T IReadOnlyList.this[int index] => this[index]; + // int Foo => 0; int Foo { get; set } = 0; + pattern: re(/<<0>>(?=\s+(?:<<1>>\s*(?:=>|[({]|\.\s*this\s*\[)|this\s*\[))/.source, [typeExpression, identifier]), + inside: typeInside, + alias: 'class-name' + }, + 'constructor-invocation': { + // new List> { } + pattern: re(/(\bnew\s+)<<0>>(?=\s*[[({])/.source, [typeExpression]), lookbehind: true, + inside: typeInside, + alias: 'class-name' + }, + /*'explicit-implementation': { + // int IFoo.Bar => 0; void IFoo>.Foo(); + pattern: replace(/\b<<0>>(?=\.<<1>>)/, className, methodOrPropertyDeclaration), + inside: classNameInside, + alias: 'class-name' + },*/ + 'generic-method': { + // foo() + pattern: re(/<<0>>\s*<<1>>(?=\s*\()/.source, [name, generic]), inside: { - punctuation: /\./ + 'function': re(/^<<0>>/.source, [name]), + 'generic': { + pattern: RegExp(generic), + alias: 'class-name', + inside: typeInside + } } }, - { - // class Foo : Bar - pattern: /(\b(?:class|interface)\s+[A-Z]\w*(?:\.\w+)*\s*:\s*)[A-Z]\w*(?:\.\w+)*\b/, + 'type-list': { + // The list of types inherited or of generic constraints + // class Foo : Bar, IList + // where F : Bar, IList + pattern: re( + /\b((?:<<0>>\s+<<1>>|where\s+<<2>>)\s*:\s*)(?:<<3>>|<<4>>)(?:\s*,\s*(?:<<3>>|<<4>>))*(?=\s*(?:where|[{;]|=>|$))/.source, + [typeDeclarationKeywords, genericName, name, typeExpression, keywords.source] + ), lookbehind: true, inside: { - punctuation: /\./ + 'keyword': keywords, + 'class-name': { + pattern: RegExp(typeExpression), + inside: typeInside + }, + 'punctuation': /,/ } }, - { - // class Foo - pattern: /((?:\b(?:class|interface|new)\s+)|(?:catch\s+\())[A-Z]\w*(?:\.\w+)*\b/, + 'preprocessor': { + pattern: /(^\s*)#.*/m, + lookbehind: true, + alias: 'property', + inside: { + // highlight preprocessor directives as keywords + 'directive': { + pattern: /(\s*#)\b(?:define|elif|else|endif|endregion|error|if|line|pragma|region|undef|warning)\b/, + lookbehind: true, + alias: 'keyword' + } + } + } + }); + + // attributes + var regularStringOrCharacter = regularString + '|' + character; + var regularStringCharacterOrComment = replace(/\/(?![*/])|\/\/[^\r\n]*[\r\n]|\/\*[\s\S]*?\*\/|<<0>>/.source, [regularStringOrCharacter]); + var roundExpression = nested(replace(/[^"'/()]|<<0>>|\(<>*\)/.source, [regularStringCharacterOrComment]), 2); + + // https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/concepts/attributes/#attribute-targets + var attrTarget = /\b(?:assembly|event|field|method|module|param|property|return|type)\b/.source; + var attr = replace(/<<0>>(?:\s*\(<<1>>*\))?/.source, [identifier, roundExpression]); + + Prism.languages.insertBefore('csharp', 'class-name', { + 'attribute': { + // Attributes + // [Foo], [Foo(1), Bar(2, Prop = "foo")], [return: Foo(1), Bar(2)], [assembly: Foo(Bar)] + pattern: re(/((?:^|[^\s\w>)?])\s*\[\s*)(?:<<0>>\s*:\s*)?<<1>>(?:\s*,\s*<<1>>)*(?=\s*\])/.source, [attrTarget, attr]), lookbehind: true, + greedy: true, inside: { - punctuation: /\./ + 'target': { + pattern: re(/^<<0>>(?=\s*:)/.source, [attrTarget]), + alias: 'keyword' + }, + 'attribute-arguments': { + pattern: re(/\(<<0>>*\)/.source, [roundExpression]), + inside: Prism.languages.csharp + }, + 'class-name': { + pattern: RegExp(identifier), + inside: { + 'punctuation': /\./ + } + }, + 'punctuation': /[:,]/ } } - ], - 'number': /\b0x[\da-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)f?/i, - 'operator': />>=?|<<=?|[-=]>|([-+&|?])\1|~|[-+*/%&|^!=<>]=?/, - 'punctuation': /\?\.?|::|[{}[\];(),.:]/ -}); - -Prism.languages.insertBefore('csharp', 'class-name', { - 'generic-method': { - pattern: /\w+\s*<[^>\r\n]+?>\s*(?=\()/, - inside: { - function: /^\w+/, - 'class-name': { - pattern: /\b[A-Z]\w*(?:\.\w+)*\b/, + }); + + + // string interpolation + var formatString = /:[^}\r\n]+/.source; + // multi line + var mInterpolationRound = nested(replace(/[^"'/()]|<<0>>|\(<>*\)/.source, [regularStringCharacterOrComment]), 2) + var mInterpolation = replace(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source, [mInterpolationRound, formatString]); + // single line + var sInterpolationRound = nested(replace(/[^"'/()]|\/(?!\*)|\/\*.*?\*\/|<<0>>|\(<>*\)/.source, [regularStringOrCharacter]), 2) + var sInterpolation = replace(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source, [sInterpolationRound, formatString]); + + function createInterpolationInside(interpolation, interpolationRound) { + return { + 'interpolation': { + pattern: re(/([^{](?:\{\{)*)<<0>>/.source, [interpolation]), + lookbehind: true, inside: { - punctuation: /\./ + 'format-string': { + pattern: re(/(^\{(?:(?![}:])<<0>>)*)<<1>>(?=\}$)/.source, [interpolationRound, formatString]), + lookbehind: true, + inside: { + 'punctuation': /^:/ + } + }, + 'punctuation': /^\{|\}$/, + 'expression': { + pattern: /[\s\S]+/, + alias: 'language-csharp', + inside: Prism.languages.csharp + } } }, - keyword: Prism.languages.csharp.keyword, - punctuation: /[<>(),.:]/ - } - }, - 'preprocessor': { - pattern: /(^\s*)#.*/m, - lookbehind: true, - alias: 'property', - inside: { - // highlight preprocessor directives as keywords - 'directive': { - pattern: /(\s*#)\b(?:define|elif|else|endif|endregion|error|if|line|pragma|region|undef|warning)\b/, + 'string': /[\s\S]+/ + }; + } + + Prism.languages.insertBefore('csharp', 'string', { + 'interpolation-string': [ + { + pattern: re(/(^|[^\\])(?:\$@|@\$)"(?:""|\\[\s\S]|\{\{|<<0>>|[^\\{"])*"/.source, [mInterpolation]), + lookbehind: true, + greedy: true, + inside: createInterpolationInside(mInterpolation, mInterpolationRound), + }, + { + pattern: re(/(^|[^@\\])\$"(?:\\.|\{\{|<<0>>|[^\\"{])*"/.source, [sInterpolation]), lookbehind: true, - alias: 'keyword' + greedy: true, + inside: createInterpolationInside(sInterpolation, sInterpolationRound), } - } - } -}); + ] + }); + +}(Prism)); Prism.languages.dotnet = Prism.languages.cs = Prism.languages.csharp; diff --git a/components/prism-csharp.min.js b/components/prism-csharp.min.js index 3c5dac2434..ddd0da7b2b 100644 --- a/components/prism-csharp.min.js +++ b/components/prism-csharp.min.js @@ -1 +1 @@ -Prism.languages.csharp=Prism.languages.extend("clike",{keyword:/\b(?:abstract|add|alias|as|ascending|async|await|base|bool|break|byte|case|catch|char|checked|class|const|continue|decimal|default|delegate|descending|do|double|dynamic|else|enum|event|explicit|extern|false|finally|fixed|float|for|foreach|from|get|global|goto|group|if|implicit|in|int|interface|internal|into|is|join|let|lock|long|namespace|new|null|object|operator|orderby|out|override|params|partial|private|protected|public|readonly|ref|remove|return|sbyte|sealed|select|set|short|sizeof|stackalloc|static|string|struct|switch|this|throw|true|try|typeof|uint|ulong|unchecked|unsafe|ushort|using|value|var|virtual|void|volatile|where|while|yield)\b/,string:[{pattern:/@("|')(?:\1\1|\\[\s\S]|(?!\1)[^\\])*\1/,greedy:!0},{pattern:/("|')(?:\\.|(?!\1)[^\\\r\n])*?\1/,greedy:!0}],"class-name":[{pattern:/\b[A-Z]\w*(?:\.\w+)*\b(?=\s+\w+)/,inside:{punctuation:/\./}},{pattern:/(\[)[A-Z]\w*(?:\.\w+)*\b/,lookbehind:!0,inside:{punctuation:/\./}},{pattern:/(\b(?:class|interface)\s+[A-Z]\w*(?:\.\w+)*\s*:\s*)[A-Z]\w*(?:\.\w+)*\b/,lookbehind:!0,inside:{punctuation:/\./}},{pattern:/((?:\b(?:class|interface|new)\s+)|(?:catch\s+\())[A-Z]\w*(?:\.\w+)*\b/,lookbehind:!0,inside:{punctuation:/\./}}],number:/\b0x[\da-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)f?/i,operator:/>>=?|<<=?|[-=]>|([-+&|?])\1|~|[-+*/%&|^!=<>]=?/,punctuation:/\?\.?|::|[{}[\];(),.:]/}),Prism.languages.insertBefore("csharp","class-name",{"generic-method":{pattern:/\w+\s*<[^>\r\n]+?>\s*(?=\()/,inside:{function:/^\w+/,"class-name":{pattern:/\b[A-Z]\w*(?:\.\w+)*\b/,inside:{punctuation:/\./}},keyword:Prism.languages.csharp.keyword,punctuation:/[<>(),.:]/}},preprocessor:{pattern:/(^\s*)#.*/m,lookbehind:!0,alias:"property",inside:{directive:{pattern:/(\s*#)\b(?:define|elif|else|endif|endregion|error|if|line|pragma|region|undef|warning)\b/,lookbehind:!0,alias:"keyword"}}}}),Prism.languages.dotnet=Prism.languages.cs=Prism.languages.csharp; \ No newline at end of file +!function(s){function a(e,s){return e.replace(/<<(\d+)>>/g,function(e,n){return"(?:"+s[+n]+")"})}function t(e,n,s){return RegExp(a(e,n),s||"")}function e(e,n){for(var s=0;s>/g,"(?:"+e+")");return e.replace(/<>/g,"[^\\s\\S]")}var n="bool byte char decimal double dynamic float int long object sbyte short string uint ulong ushort var void",i="class enum interface struct",r="add alias ascending async await by descending from get global group into join let nameof notnull on orderby partial remove select set unmanaged value when where where",o="abstract as base break case catch checked const continue default delegate do else event explicit extern finally fixed for foreach goto if implicit in internal is lock namespace new null operator out override params private protected public readonly ref return sealed sizeof stackalloc static switch this throw try typeof unchecked unsafe using virtual volatile while yield";function l(e){return"\\b(?:"+e.trim().replace(/ /g,"|")+")\\b"}var d=l(i),p=RegExp(l(n+" "+i+" "+r+" "+o)),c=l(i+" "+r+" "+o),u=l(n+" "+i+" "+o),g=e("<(?:[^<>;=+\\-*/%&|^]|<>)*>",2),b=e("\\((?:[^()]|<>)*\\)",2),h="@?\\b[A-Za-z_]\\w*\\b",f=a("<<0>>(?:\\s*<<1>>)?",[h,g]),m=a("(?!<<0>>)<<1>>(?:\\s*\\.\\s*<<1>>)*",[c,f]),k="\\[\\s*(?:,\\s*)*\\]",y=a("(?:<<0>>|<<1>>)(?:\\s*(?:\\?\\s*)?<<2>>)*(?:\\s*\\?)?",[a("\\(<<0>>+(?:,<<0>>+)+\\)",[a("[^,()<>[\\];=+\\-*/%&|^]|<<0>>|<<1>>|<<2>>",[g,b,k])]),m,k]),w={keyword:p,punctuation:/[<>()?,.:[\]]/},v="'(?:[^\r\\n'\\\\]|\\\\.|\\\\[Uux][\\da-fA-F]{1,8})'",x='"(?:\\\\.|[^\\\\"\r\\n])*"';s.languages.csharp=s.languages.extend("clike",{string:[{pattern:t("(^|[^$\\\\])<<0>>",['@"(?:""|\\\\[\\s\\S]|[^\\\\"])*"(?!")']),lookbehind:!0,greedy:!0},{pattern:t("(^|[^@$\\\\])<<0>>",[x]),lookbehind:!0,greedy:!0},{pattern:RegExp(v),greedy:!0,alias:"character"}],"class-name":[{pattern:t("(\\busing\\s+static\\s+)<<0>>(?=\\s*;)",[m]),lookbehind:!0,inside:w},{pattern:t("(\\busing\\s+<<0>>\\s*=\\s*)<<1>>(?=\\s*;)",[h,y]),lookbehind:!0,inside:w},{pattern:t("(\\busing\\s+)<<0>>(?=\\s*=)",[h]),lookbehind:!0},{pattern:t("(\\b<<0>>\\s+)<<1>>",[d,f]),lookbehind:!0,inside:w},{pattern:t("(\\bcatch\\s*\\(\\s*)<<0>>",[m]),lookbehind:!0,inside:w},{pattern:t("(\\bwhere\\s+)<<0>>",[h]),lookbehind:!0},{pattern:t("(\\b(?:is|as)\\s+)<<0>>",[y]),lookbehind:!0,inside:w},{pattern:t("\\b<<0>>(?=\\s+(?!<<1>>)<<2>>(?:\\s*[=,;:{)\\]]|\\s+in))",[y,u,h]),inside:w}],keyword:p,number:/(?:\b0(?:x[\da-f_]*[\da-f]|b[01_]*[01])|(?:\B\.\d+(?:_+\d+)*|\b\d+(?:_+\d+)*(?:\.\d+(?:_+\d+)*)?)(?:e[-+]?\d+(?:_+\d+)*)?)(?:ul|lu|[dflmu])?\b/i,operator:/>>=?|<<=?|[-=]>|([-+&|])\1|~|\?\?=?|[-+*/%&|^!=<>]=?/,punctuation:/\?\.?|::|[{}[\];(),.:]/}),s.languages.insertBefore("csharp","number",{range:{pattern:/\.\./,alias:"operator"}}),s.languages.insertBefore("csharp","punctuation",{"named-parameter":{pattern:t("([(,]\\s*)<<0>>(?=\\s*:)",[h]),lookbehind:!0,alias:"punctuation"}}),s.languages.insertBefore("csharp","class-name",{namespace:{pattern:t("(\\b(?:namespace|using)\\s+)<<0>>(?:\\s*\\.\\s*<<0>>)*(?=\\s*[;{])",[h]),lookbehind:!0,inside:{punctuation:/\./}},"type-expression":{pattern:t("(\\b(?:default|typeof|sizeof)\\s*\\(\\s*)(?:[^()\\s]|\\s(?!\\s*\\))|<<0>>)*(?=\\s*\\))",[b]),lookbehind:!0,alias:"class-name",inside:w},"return-type":{pattern:t("<<0>>(?=\\s+(?:<<1>>\\s*(?:=>|[({]|\\.\\s*this\\s*\\[)|this\\s*\\[))",[y,m]),inside:w,alias:"class-name"},"constructor-invocation":{pattern:t("(\\bnew\\s+)<<0>>(?=\\s*[[({])",[y]),lookbehind:!0,inside:w,alias:"class-name"},"generic-method":{pattern:t("<<0>>\\s*<<1>>(?=\\s*\\()",[h,g]),inside:{function:t("^<<0>>",[h]),generic:{pattern:RegExp(g),alias:"class-name",inside:w}}},"type-list":{pattern:t("\\b((?:<<0>>\\s+<<1>>|where\\s+<<2>>)\\s*:\\s*)(?:<<3>>|<<4>>)(?:\\s*,\\s*(?:<<3>>|<<4>>))*(?=\\s*(?:where|[{;]|=>|$))",[d,f,h,y,p.source]),lookbehind:!0,inside:{keyword:p,"class-name":{pattern:RegExp(y),inside:w},punctuation:/,/}},preprocessor:{pattern:/(^\s*)#.*/m,lookbehind:!0,alias:"property",inside:{directive:{pattern:/(\s*#)\b(?:define|elif|else|endif|endregion|error|if|line|pragma|region|undef|warning)\b/,lookbehind:!0,alias:"keyword"}}}});var $=x+"|"+v,_=a("\\/(?![*/])|\\/\\/[^\r\\n]*[\r\\n]|\\/\\*[\\s\\S]*?\\*\\/|<<0>>",[$]),B=e(a("[^\"'/()]|<<0>>|\\(<>*\\)",[_]),2),E="\\b(?:assembly|event|field|method|module|param|property|return|type)\\b",R=a("<<0>>(?:\\s*\\(<<1>>*\\))?",[m,B]);s.languages.insertBefore("csharp","class-name",{attribute:{pattern:t("((?:^|[^\\s\\w>)?])\\s*\\[\\s*)(?:<<0>>\\s*:\\s*)?<<1>>(?:\\s*,\\s*<<1>>)*(?=\\s*\\])",[E,R]),lookbehind:!0,greedy:!0,inside:{target:{pattern:t("^<<0>>(?=\\s*:)",[E]),alias:"keyword"},"attribute-arguments":{pattern:t("\\(<<0>>*\\)",[B]),inside:s.languages.csharp},"class-name":{pattern:RegExp(m),inside:{punctuation:/\./}},punctuation:/[:,]/}}});var S=":[^}\r\\n]+",P=e(a("[^\"'/()]|<<0>>|\\(<>*\\)",[_]),2),z=a("\\{(?!\\{)(?:(?![}:])<<0>>)*<<1>>?\\}",[P,S]),j=e(a("[^\"'/()]|\\/(?!\\*)|\\/\\*.*?\\*\\/|<<0>>|\\(<>*\\)",[$]),2),A=a("\\{(?!\\{)(?:(?![}:])<<0>>)*<<1>>?\\}",[j,S]);function F(e,n){return{interpolation:{pattern:t("([^{](?:\\{\\{)*)<<0>>",[e]),lookbehind:!0,inside:{"format-string":{pattern:t("(^\\{(?:(?![}:])<<0>>)*)<<1>>(?=\\}$)",[n,S]),lookbehind:!0,inside:{punctuation:/^:/}},punctuation:/^\{|\}$/,expression:{pattern:/[\s\S]+/,alias:"language-csharp",inside:s.languages.csharp}}},string:/[\s\S]+/}}s.languages.insertBefore("csharp","string",{"interpolation-string":[{pattern:t('(^|[^\\\\])(?:\\$@|@\\$)"(?:""|\\\\[\\s\\S]|\\{\\{|<<0>>|[^\\\\{"])*"',[z]),lookbehind:!0,greedy:!0,inside:F(z,P)},{pattern:t('(^|[^@\\\\])\\$"(?:\\\\.|\\{\\{|<<0>>|[^\\\\"{])*"',[A]),lookbehind:!0,greedy:!0,inside:F(A,j)}]})}(Prism),Prism.languages.dotnet=Prism.languages.cs=Prism.languages.csharp; \ No newline at end of file diff --git a/tests/languages/csharp/attribute_feature.test b/tests/languages/csharp/attribute_feature.test new file mode 100644 index 0000000000..a0647e291a --- /dev/null +++ b/tests/languages/csharp/attribute_feature.test @@ -0,0 +1,258 @@ +[Foo] +[Foo(1, 2)] +[Foo(1, 2, Name = "bar")] +[Foo, Bar] +[Foo("()"), Bar("[]"), Baz] + +[return: MaybeNull] +[assembly: InternalsVisibleTo("Tests")] + +[assembly: Foo] +[module: Foo] +[field: Foo] +[event: Foo] +[method: Foo] +[param: Foo] +[property: Foo] +[return: Foo] +[type: Foo] + +// not attributes + +var a = d +[Foo]; +var b = new Foo?[Count]; +var c = new (int, int)[Count]; + +---------------------------------------------------- + +[ + ["punctuation", "["], + ["attribute", [ + ["class-name", [ + "Foo" + ]] + ]], + ["punctuation", "]"], + ["punctuation", "["], + ["attribute", [ + ["class-name", [ + "Foo" + ]], + ["attribute-arguments", [ + ["punctuation", "("], + ["number", "1"], + ["punctuation", ","], + ["number", "2"], + ["punctuation", ")"] + ]] + ]], + ["punctuation", "]"], + ["punctuation", "["], + ["attribute", [ + ["class-name", [ + "Foo" + ]], + ["attribute-arguments", [ + ["punctuation", "("], + ["number", "1"], + ["punctuation", ","], + ["number", "2"], + ["punctuation", ","], + " Name ", + ["operator", "="], + ["string", "\"bar\""], + ["punctuation", ")"] + ]] + ]], + ["punctuation", "]"], + ["punctuation", "["], + ["attribute", [ + ["class-name", [ + "Foo" + ]], + ["punctuation", ","], + ["class-name", [ + "Bar" + ]] + ]], + ["punctuation", "]"], + ["punctuation", "["], + ["attribute", [ + ["class-name", [ + "Foo" + ]], + ["attribute-arguments", [ + ["punctuation", "("], + ["string", "\"()\""], + ["punctuation", ")"] + ]], + ["punctuation", ","], + ["class-name", [ + "Bar" + ]], + ["attribute-arguments", [ + ["punctuation", "("], + ["string", "\"[]\""], + ["punctuation", ")"] + ]], + ["punctuation", ","], + ["class-name", [ + "Baz" + ]] + ]], + ["punctuation", "]"], + ["punctuation", "["], + ["attribute", [ + ["target", "return"], + ["punctuation", ":"], + ["class-name", [ + "MaybeNull" + ]] + ]], + ["punctuation", "]"], + ["punctuation", "["], + ["attribute", [ + ["target", "assembly"], + ["punctuation", ":"], + ["class-name", [ + "InternalsVisibleTo" + ]], + ["attribute-arguments", [ + ["punctuation", "("], + ["string", "\"Tests\""], + ["punctuation", ")"] + ]] + ]], + ["punctuation", "]"], + ["punctuation", "["], + ["attribute", [ + ["target", "assembly"], + ["punctuation", ":"], + ["class-name", [ + "Foo" + ]] + ]], + ["punctuation", "]"], + ["punctuation", "["], + ["attribute", [ + ["target", "module"], + ["punctuation", ":"], + ["class-name", [ + "Foo" + ]] + ]], + ["punctuation", "]"], + ["punctuation", "["], + ["attribute", [ + ["target", "field"], + ["punctuation", ":"], + ["class-name", [ + "Foo" + ]] + ]], + ["punctuation", "]"], + ["punctuation", "["], + ["attribute", [ + ["target", "event"], + ["punctuation", ":"], + ["class-name", [ + "Foo" + ]] + ]], + ["punctuation", "]"], + ["punctuation", "["], + ["attribute", [ + ["target", "method"], + ["punctuation", ":"], + ["class-name", [ + "Foo" + ]] + ]], + ["punctuation", "]"], + ["punctuation", "["], + ["attribute", [ + ["target", "param"], + ["punctuation", ":"], + ["class-name", [ + "Foo" + ]] + ]], + ["punctuation", "]"], + ["punctuation", "["], + ["attribute", [ + ["target", "property"], + ["punctuation", ":"], + ["class-name", [ + "Foo" + ]] + ]], + ["punctuation", "]"], + ["punctuation", "["], + ["attribute", [ + ["target", "return"], + ["punctuation", ":"], + ["class-name", [ + "Foo" + ]] + ]], + ["punctuation", "]"], + ["punctuation", "["], + ["attribute", [ + ["target", "type"], + ["punctuation", ":"], + ["class-name", [ + "Foo" + ]] + ]], + ["punctuation", "]"], + ["comment", "// not attributes"], + ["class-name", [ + ["keyword", "var"] + ]], + " a ", + ["operator", "="], + " d\n", + ["punctuation", "["], + "Foo", + ["punctuation", "]"], + ["punctuation", ";"], + ["class-name", [ + ["keyword", "var"] + ]], + " b ", + ["operator", "="], + ["keyword", "new"], + ["constructor-invocation", [ + "Foo", + ["punctuation", "<"], + ["keyword", "int"], + ["punctuation", ">"], + ["punctuation", "?"] + ]], + ["punctuation", "["], + "Count", + ["punctuation", "]"], + ["punctuation", ";"], + ["class-name", [ + ["keyword", "var"] + ]], + " c ", + ["operator", "="], + ["keyword", "new"], + ["constructor-invocation", [ + ["punctuation", "("], + ["keyword", "int"], + ["punctuation", ","], + ["keyword", "int"], + ["punctuation", ")"] + ]], + ["punctuation", "["], + "Count", + ["punctuation", "]"], + ["punctuation", ";"] +] + +---------------------------------------------------- + +Checks for class names of attributes. diff --git a/tests/languages/csharp/class-name-declaration_feature.test b/tests/languages/csharp/class-name-declaration_feature.test new file mode 100644 index 0000000000..93410553eb --- /dev/null +++ b/tests/languages/csharp/class-name-declaration_feature.test @@ -0,0 +1,110 @@ +class Foo +interface BarBaz +struct Foo +enum Foo +class Foo +interface Bar + +// not variables +public static RGBColor FromRainbow(Rainbow colorBand) => + colorBand switch + { + Rainbow.Red => new RGBColor(0xFF, 0x00, 0x00), + _ => throw new ArgumentException(message: "invalid enum value", paramName: nameof(colorBand)), + }; + +---------------------------------------------------- + +[ + ["keyword", "class"], + ["class-name", ["Foo"]], + + ["keyword", "interface"], + ["class-name", ["BarBaz"]], + + ["keyword", "struct"], + ["class-name", ["Foo"]], + + ["keyword", "enum"], + ["class-name", ["Foo"]], + + ["keyword", "class"], + ["class-name", [ + "Foo", + ["punctuation", "<"], + "A", + ["punctuation", ","], + " B", + ["punctuation", ">"] + ]], + + ["keyword", "interface"], + ["class-name", [ + "Bar", + ["punctuation", "<"], + ["keyword", "out"], + " T", + ["punctuation", ">"] + ]], + + ["comment", "// not variables"], + + ["keyword", "public"], + ["keyword", "static"], + ["return-type", [ + "RGBColor" + ]], + ["function", "FromRainbow"], + ["punctuation", "("], + ["class-name", [ + "Rainbow" + ]], + " colorBand", + ["punctuation", ")"], + ["operator", "=>"], + "\n\tcolorBand ", + ["keyword", "switch"], + ["punctuation", "{"], + "\n\t\tRainbow", + ["punctuation", "."], + "Red ", + ["operator", "=>"], + ["keyword", "new"], + ["constructor-invocation", [ + "RGBColor" + ]], + ["punctuation", "("], + ["number", "0xFF"], + ["punctuation", ","], + ["number", "0x00"], + ["punctuation", ","], + ["number", "0x00"], + ["punctuation", ")"], + ["punctuation", ","], + "\n\t\t_ ", + ["operator", "=>"], + ["keyword", "throw"], + ["keyword", "new"], + ["constructor-invocation", [ + "ArgumentException" + ]], + ["punctuation", "("], + ["named-parameter", "message"], + ["punctuation", ":"], + ["string", "\"invalid enum value\""], + ["punctuation", ","], + ["named-parameter", "paramName"], + ["punctuation", ":"], + ["keyword", "nameof"], + ["punctuation", "("], + "colorBand", + ["punctuation", ")"], + ["punctuation", ")"], + ["punctuation", ","], + ["punctuation", "}"], + ["punctuation", ";"] +] + +---------------------------------------------------- + +Checks for class names at the class declaration. diff --git a/tests/languages/csharp/class-name-variables-parameters_feature.test b/tests/languages/csharp/class-name-variables-parameters_feature.test new file mode 100644 index 0000000000..9e1c0fc9ba --- /dev/null +++ b/tests/languages/csharp/class-name-variables-parameters_feature.test @@ -0,0 +1,121 @@ +int a; +Foo b; +Foo @new_var; +Foo c = null; +static Foo<(Bar, int)>[,,] d; +void Foo(Foo a, Bar b, Bar[, ] c, Foo<(int, int)> d); +Bar Abc => 0; +Bar.FooBar Abc; + +---------------------------------------------------- + +[ + ["class-name", [ + ["keyword", "int"] + ]], + " a", + ["punctuation", ";"], + ["class-name", [ + "Foo" + ]], + " b", + ["punctuation", ";"], + ["class-name", [ + "Foo" + ]], + " @new_var", + ["punctuation", ";"], + ["class-name", [ + "Foo", + ["punctuation", "<"], + "Bar", + ["punctuation", ">"] + ]], + " c ", + ["operator", "="], + ["keyword", "null"], + ["punctuation", ";"], + ["keyword", "static"], + ["class-name", [ + "Foo", + ["punctuation", "<"], + ["punctuation", "("], + "Bar", + ["punctuation", ","], + ["keyword", "int"], + ["punctuation", ")"], + ["punctuation", ">"], + ["punctuation", "["], + ["punctuation", ","], + ["punctuation", ","], + ["punctuation", "]"] + ]], + " d", + ["punctuation", ";"], + ["return-type", [ + ["keyword", "void"] + ]], + ["function", "Foo"], + ["punctuation", "("], + ["class-name", [ + "Foo" + ]], + " a", + ["punctuation", ","], + ["class-name", [ + "Bar", + ["punctuation", "<"], + "Foo", + ["punctuation", ">"] + ]], + " b", + ["punctuation", ","], + ["class-name", [ + "Bar", + ["punctuation", "["], + ["punctuation", ","], + ["punctuation", "]"] + ]], + " c", + ["punctuation", ","], + ["class-name", [ + "Foo", + ["punctuation", "<"], + ["punctuation", "("], + ["keyword", "int"], + ["punctuation", ","], + ["keyword", "int"], + ["punctuation", ")"], + ["punctuation", ">"] + ]], + " d", + ["punctuation", ")"], + ["punctuation", ";"], + ["return-type", [ + "Bar", + ["punctuation", "<"], + "Foo", + ["punctuation", ">"] + ]], + " Abc ", + ["operator", "=>"], + ["number", "0"], + ["punctuation", ";"], + ["class-name", [ + "Bar", + ["punctuation", "<"], + "Foo", + ["punctuation", ">"], + ["punctuation", "."], + "FooBar", + ["punctuation", "<"], + "IFoo", + ["punctuation", ">"] + ]], + " Abc", + ["punctuation", ";"] +] + +---------------------------------------------------- + +Checks for class names in variables and parameters. diff --git a/tests/languages/csharp/class-name_feature.test b/tests/languages/csharp/class-name_feature.test deleted file mode 100644 index 113982b6fe..0000000000 --- a/tests/languages/csharp/class-name_feature.test +++ /dev/null @@ -1,34 +0,0 @@ -class Foo -interface BarBaz -class Foo : Bar -[Foobar] -void Foo(Bar bar, Baz baz) - ----------------------------------------------------- - -[ - ["keyword", "class"], - ["class-name", ["Foo"]], - ["keyword", "interface"], - ["class-name", ["BarBaz"]], - ["keyword", "class"], - ["class-name", ["Foo"]], - ["punctuation", ":"], - ["class-name", ["Bar"]], - ["punctuation", "["], - ["class-name", ["Foobar"]], - ["punctuation", "]"], - ["keyword", "void"], - ["function", "Foo"], - ["punctuation", "("], - ["class-name", ["Bar"]], - " bar", - ["punctuation", ","], - ["class-name", ["Baz"]], - " baz", - ["punctuation", ")"] -] - ----------------------------------------------------- - -Checks for class names. \ No newline at end of file diff --git a/tests/languages/csharp/constructor-invocation_feature.test b/tests/languages/csharp/constructor-invocation_feature.test new file mode 100644 index 0000000000..eb29e46d07 --- /dev/null +++ b/tests/languages/csharp/constructor-invocation_feature.test @@ -0,0 +1,86 @@ +new Foo(); +new Foo>(); +new Foo>[0]; +new Foo>[] {}; +new Foo> {}; + +---------------------------------------------------- + +[ + ["keyword", "new"], + ["constructor-invocation", ["Foo"]], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", ";"], + + ["keyword", "new"], + ["constructor-invocation", [ + "Foo", + ["punctuation", "<"], + "A", + ["punctuation", ","], + " B", + ["punctuation", "<"], + "C", + ["punctuation", ">"], + ["punctuation", ">"] + ]], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", ";"], + + ["keyword", "new"], + ["constructor-invocation", [ + "Foo", + ["punctuation", "<"], + "A", + ["punctuation", ","], + " B", + ["punctuation", "<"], + "C", + ["punctuation", ">"], + ["punctuation", ">"] + ]], + ["punctuation", "["], + ["number", "0"], + ["punctuation", "]"], + ["punctuation", ";"], + + ["keyword", "new"], + ["constructor-invocation", [ + "Foo", + ["punctuation", "<"], + "A", + ["punctuation", ","], + " B", + ["punctuation", "<"], + "C", + ["punctuation", ">"], + ["punctuation", ">"], + ["punctuation", "["], + ["punctuation", "]"] + ]], + ["punctuation", "{"], + ["punctuation", "}"], + ["punctuation", ";"], + + ["keyword", "new"], + ["constructor-invocation", [ + "Foo", + ["punctuation", "<"], + "A", + ["punctuation", ","], + " B", + ["punctuation", "<"], + "C", + ["punctuation", ">"], + ["punctuation", ">"] + ]], + ["punctuation", "{"], + ["punctuation", "}"], + ["punctuation", ";"] +] + +---------------------------------------------------- + +Checks for different constructor invocations styles. diff --git a/tests/languages/csharp/for_feature.test b/tests/languages/csharp/for_feature.test new file mode 100644 index 0000000000..4cbc40b3b6 --- /dev/null +++ b/tests/languages/csharp/for_feature.test @@ -0,0 +1,33 @@ +for (Int32 i = 0; i < count; i++) +foreach (Foo e in Elements) + +---------------------------------------------------- + +[ + ["keyword", "for"], + ["punctuation", "("], + ["class-name", ["Int32"]], + " i ", + ["operator", "="], + ["number", "0"], + ["punctuation", ";"], + " i ", + ["operator", "<"], + " count", + ["punctuation", ";"], + " i", + ["operator", "++"], + ["punctuation", ")"], + ["keyword", "foreach"], + ["punctuation", "("], + ["class-name", ["Foo"]], + " e ", + ["keyword", "in"], + " Elements", + ["punctuation", ")"] +] + + +---------------------------------------------------- + +Checks for `for` and `foreach` loops. diff --git a/tests/languages/csharp/generic-constraint_feature.test b/tests/languages/csharp/generic-constraint_feature.test new file mode 100644 index 0000000000..883d279634 --- /dev/null +++ b/tests/languages/csharp/generic-constraint_feature.test @@ -0,0 +1,119 @@ +void abc() where U : struct, IFoo where V : IFoo {} +delegate void F(U u) where U : class, IFoo; +class Foo where T : IFoo {} +readonly struct Foo where T : unmanaged {} + +---------------------------------------------------- + +[ + ["return-type", [ + ["keyword", "void"] + ]], + ["generic-method", [ + ["function", "abc"], + ["generic", [ + ["punctuation", "<"], + "U", + ["punctuation", ","], + " V", + ["punctuation", ">"] + ]] + ]], + ["punctuation", "("], + ["punctuation", ")"], + ["keyword", "where"], + ["class-name", "U"], + ["punctuation", ":"], + ["type-list", [ + ["keyword", "struct"], + ["punctuation", ","], + ["class-name", [ + "IFoo" + ]] + ]], + ["keyword", "where"], + ["class-name", "V"], + ["punctuation", ":"], + ["type-list", [ + ["class-name", [ + "IFoo", + ["punctuation", "<"], + "U", + ["punctuation", ">"] + ]] + ]], + ["punctuation", "{"], + ["punctuation", "}"], + ["keyword", "delegate"], + ["return-type", [ + ["keyword", "void"] + ]], + ["generic-method", [ + ["function", "F"], + ["generic", [ + ["punctuation", "<"], + "U", + ["punctuation", ">"] + ]] + ]], + ["punctuation", "("], + ["class-name", [ + "U" + ]], + " u", + ["punctuation", ")"], + ["keyword", "where"], + ["class-name", "U"], + ["punctuation", ":"], + ["type-list", [ + ["keyword", "class"], + ["punctuation", ","], + ["class-name", [ + "IFoo", + ["punctuation", "<"], + "Bar", + ["punctuation", ">"] + ]] + ]], + ["punctuation", ";"], + ["keyword", "class"], + ["class-name", [ + "Foo", + ["punctuation", "<"], + "T", + ["punctuation", ">"] + ]], + ["keyword", "where"], + ["class-name", "T"], + ["punctuation", ":"], + ["type-list", [ + ["class-name", [ + "IFoo" + ]], + "<", + ["keyword", "int"], + ">" + ]], + ["punctuation", "{"], + ["punctuation", "}"], + ["keyword", "readonly"], + ["keyword", "struct"], + ["class-name", [ + "Foo", + ["punctuation", "<"], + "T", + ["punctuation", ">"] + ]], + ["keyword", "where"], + ["class-name", "T"], + ["punctuation", ":"], + ["type-list", [ + ["keyword", "unmanaged"] + ]], + ["punctuation", "{"], + ["punctuation", "}"] +] + +---------------------------------------------------- + +Checks for class names and keywords in generic constraints. diff --git a/tests/languages/csharp/generic_feature.test b/tests/languages/csharp/generic_feature.test index 05d3f589a9..32a69dcd87 100644 --- a/tests/languages/csharp/generic_feature.test +++ b/tests/languages/csharp/generic_feature.test @@ -4,25 +4,31 @@ method(); ---------------------------------------------------- [ - ["keyword", "void"], + ["return-type", [ + ["keyword", "void"] + ]], ["generic-method", [ ["function", "method"], - ["punctuation", "<"], - ["class-name", ["T"]], - ["punctuation", ","], - ["class-name", ["U"]], - ["punctuation", ">"] + ["generic", [ + ["punctuation", "<"], + "T", + ["punctuation", ","], + " U", + ["punctuation", ">"] + ]] ]], ["punctuation", "("], ["punctuation", ")"], ["punctuation", ";"], ["generic-method", [ ["function", "method"], - ["punctuation", "<"], - ["keyword", "int"], - ["punctuation", ","], - ["keyword", "char"], - ["punctuation", ">"] + ["generic", [ + ["punctuation", "<"], + ["keyword", "int"], + ["punctuation", ","], + ["keyword", "char"], + ["punctuation", ">"] + ]] ]], ["punctuation", "("], ["punctuation", ")"], @@ -31,4 +37,4 @@ method(); ---------------------------------------------------- -Checks for generic methods \ No newline at end of file +Checks for generic methods diff --git a/tests/languages/csharp/interpolation-string_feature.test b/tests/languages/csharp/interpolation-string_feature.test new file mode 100644 index 0000000000..9e3cdd2170 --- /dev/null +++ b/tests/languages/csharp/interpolation-string_feature.test @@ -0,0 +1,114 @@ +$"Hello, {{ {name} }}! Today is {date.DayOfWeek}, it's {date:HH:mm} now." +$"{a,5} and {b + "" /* foo ":} */:format} {h(a, b)}" + +@$" +" +$@" +" + +$@"{ + 1 + 2 // some comment ":}{} +}" + +---------------------------------------------------- + +[ + ["interpolation-string", [ + ["string", "$\"Hello, {{ "], + ["interpolation", [ + ["punctuation", "{"], + ["expression", [ + "name" + ]], + ["punctuation", "}"] + ]], + ["string", " }}! Today is "], + ["interpolation", [ + ["punctuation", "{"], + ["expression", [ + "date", + ["punctuation", "."], + "DayOfWeek" + ]], + ["punctuation", "}"] + ]], + ["string", ", it's "], + ["interpolation", [ + ["punctuation", "{"], + ["expression", [ + "date" + ]], + ["format-string", [ + ["punctuation", ":"], + "HH:mm" + ]], + ["punctuation", "}"] + ]], + ["string", " now.\""] + ]], + ["interpolation-string", [ + ["string", "$\""], + ["interpolation", [ + ["punctuation", "{"], + ["expression", [ + "a", + ["punctuation", ","], + ["number", "5"] + ]], + ["punctuation", "}"] + ]], + ["string", " and "], + ["interpolation", [ + ["punctuation", "{"], + ["expression", [ + "b ", + ["operator", "+"], + ["string", "\"\""], + ["comment", "/* foo \":} */"] + ]], + ["format-string", [ + ["punctuation", ":"], + "format" + ]], + ["punctuation", "}"] + ]], + ["string", " "], + ["interpolation", [ + ["punctuation", "{"], + ["expression", [ + ["function", "h"], + ["punctuation", "("], + "a", + ["punctuation", ","], + " b", + ["punctuation", ")"] + ]], + ["punctuation", "}"] + ]], + ["string", "\""] + ]], + ["interpolation-string", [ + ["string", "@$\"\n\""] + ]], + ["interpolation-string", [ + ["string", "$@\"\n\""] + ]], + ["interpolation-string", [ + ["string", "$@\""], + ["interpolation", [ + ["punctuation", "{"], + ["expression", [ + ["number", "1"], + ["operator", "+"], + ["number", "2"], + ["comment", "// some comment \":}{}"] + ]], + ["punctuation", "}"] + ]], + ["string", "\""] + ]] +] + +---------------------------------------------------- + +Checks for string interpolation. diff --git a/tests/languages/csharp/issue1365.test b/tests/languages/csharp/issue1365.test index 6aaf3c7169..7829c78002 100644 --- a/tests/languages/csharp/issue1365.test +++ b/tests/languages/csharp/issue1365.test @@ -1,5 +1,5 @@ interface ILogger { - void Init(SomeClass file); + void Init(SomeClass file); void LogInfo(string message); } public class SomeClass : BaseClass {} @@ -8,32 +8,48 @@ public class SomeClass : BaseClass {} [ ["keyword", "interface"], - ["class-name", ["ILogger"]], + ["class-name", [ + "ILogger" + ]], ["punctuation", "{"], - ["keyword", "void"], + ["return-type", [ + ["keyword", "void"] + ]], ["function", "Init"], ["punctuation", "("], - ["class-name", ["SomeClass"]], + ["class-name", [ + "SomeClass" + ]], " file", ["punctuation", ")"], ["punctuation", ";"], - ["keyword", "void"], + ["return-type", [ + ["keyword", "void"] + ]], ["function", "LogInfo"], ["punctuation", "("], - ["keyword", "string"], + ["class-name", [ + ["keyword", "string"] + ]], " message", ["punctuation", ")"], ["punctuation", ";"], ["punctuation", "}"], ["keyword", "public"], ["keyword", "class"], - ["class-name", ["SomeClass"]], + ["class-name", [ + "SomeClass" + ]], ["punctuation", ":"], - ["class-name", ["BaseClass"]], + ["type-list", [ + ["class-name", [ + "BaseClass" + ]] + ]], ["punctuation", "{"], ["punctuation", "}"] ] ---------------------------------------------------- -Checks for class names. See #1365 \ No newline at end of file +Checks for class names. See #1365 diff --git a/tests/languages/csharp/issue1371.test b/tests/languages/csharp/issue1371.test index 1fec4a0580..ddee898406 100644 --- a/tests/languages/csharp/issue1371.test +++ b/tests/languages/csharp/issue1371.test @@ -2,14 +2,14 @@ container.Register(); container.Register(); var container = new Container(f => { - f.For().Use(); + f.For().Use(); }); class LandAnimal { - public void Move() => Run(); } + public void Move() => Run(); } class Dog : LandAnimal { - public new void Move() => Run(); } + public new void Move() => Run(); } class Works : LandAnimal { - public override void Move() => Run(); } + public override void Move() => Run(); } [Required] [RequiredAttribute()] [Range(1, 10)] @@ -21,9 +21,11 @@ class Works : LandAnimal { ["punctuation", "."], ["generic-method", [ ["function", "Register"], - ["punctuation", "<"], - ["class-name", ["Car"]], - ["punctuation", ">"] + ["generic", [ + ["punctuation", "<"], + "Car", + ["punctuation", ">"] + ]] ]], ["punctuation", "("], ["punctuation", ")"], @@ -32,40 +34,50 @@ class Works : LandAnimal { ["punctuation", "."], ["generic-method", [ ["function", "Register"], - ["punctuation", "<"], - ["class-name", ["IJuice"]], - ["punctuation", ","], - ["class-name", ["Juice"]], - ["punctuation", ">"] + ["generic", [ + ["punctuation", "<"], + "IJuice", + ["punctuation", ","], + " Juice", + ["punctuation", ">"] + ]] ]], ["punctuation", "("], ["punctuation", ")"], ["punctuation", ";"], - ["keyword", "var"], + ["class-name", [ + ["keyword", "var"] + ]], " container ", ["operator", "="], ["keyword", "new"], - ["class-name", ["Container"]], + ["constructor-invocation", [ + "Container" + ]], ["punctuation", "("], "f ", ["operator", "=>"], ["punctuation", "{"], - "\r\n f", + "\r\n\tf", ["punctuation", "."], ["generic-method", [ ["function", "For"], - ["punctuation", "<"], - ["class-name", ["IFoo"]], - ["punctuation", ">"] + ["generic", [ + ["punctuation", "<"], + "IFoo", + ["punctuation", ">"] + ]] ]], ["punctuation", "("], ["punctuation", ")"], ["punctuation", "."], ["generic-method", [ ["function", "Use"], - ["punctuation", "<"], - ["class-name", ["Foo"]], - ["punctuation", ">"] + ["generic", [ + ["punctuation", "<"], + "Foo", + ["punctuation", ">"] + ]] ]], ["punctuation", "("], ["punctuation", ")"], @@ -74,10 +86,14 @@ class Works : LandAnimal { ["punctuation", ")"], ["punctuation", ";"], ["keyword", "class"], - ["class-name", ["LandAnimal"]], + ["class-name", [ + "LandAnimal" + ]], ["punctuation", "{"], ["keyword", "public"], - ["keyword", "void"], + ["return-type", [ + ["keyword", "void"] + ]], ["function", "Move"], ["punctuation", "("], ["punctuation", ")"], @@ -88,13 +104,21 @@ class Works : LandAnimal { ["punctuation", ";"], ["punctuation", "}"], ["keyword", "class"], - ["class-name", ["Dog"]], + ["class-name", [ + "Dog" + ]], ["punctuation", ":"], - ["class-name", ["LandAnimal"]], + ["type-list", [ + ["class-name", [ + "LandAnimal" + ]] + ]], ["punctuation", "{"], ["keyword", "public"], ["keyword", "new"], - ["keyword", "void"], + ["return-type", [ + ["keyword", "void"] + ]], ["function", "Move"], ["punctuation", "("], ["punctuation", ")"], @@ -105,13 +129,21 @@ class Works : LandAnimal { ["punctuation", ";"], ["punctuation", "}"], ["keyword", "class"], - ["class-name", ["Works"]], + ["class-name", [ + "Works" + ]], ["punctuation", ":"], - ["class-name", ["LandAnimal"]], + ["type-list", [ + ["class-name", [ + "LandAnimal" + ]] + ]], ["punctuation", "{"], ["keyword", "public"], ["keyword", "override"], - ["keyword", "void"], + ["return-type", [ + ["keyword", "void"] + ]], ["function", "Move"], ["punctuation", "("], ["punctuation", ")"], @@ -122,23 +154,39 @@ class Works : LandAnimal { ["punctuation", ";"], ["punctuation", "}"], ["punctuation", "["], - ["class-name", ["Required"]], + ["attribute", [ + ["class-name", [ + "Required" + ]] + ]], ["punctuation", "]"], ["punctuation", "["], - ["class-name", ["RequiredAttribute"]], - ["punctuation", "("], - ["punctuation", ")"], + ["attribute", [ + ["class-name", [ + "RequiredAttribute" + ]], + ["attribute-arguments", [ + ["punctuation", "("], + ["punctuation", ")"] + ]] + ]], ["punctuation", "]"], ["punctuation", "["], - ["class-name", ["Range"]], - ["punctuation", "("], - ["number", "1"], - ["punctuation", ","], - ["number", "10"], - ["punctuation", ")"], + ["attribute", [ + ["class-name", [ + "Range" + ]], + ["attribute-arguments", [ + ["punctuation", "("], + ["number", "1"], + ["punctuation", ","], + ["number", "10"], + ["punctuation", ")"] + ]] + ]], ["punctuation", "]"] ] ---------------------------------------------------- -Checks for various cases of class names. See #1371 \ No newline at end of file +Checks for various cases of class names. See #1371 diff --git a/tests/languages/csharp/keyword_feature.test b/tests/languages/csharp/keyword_feature.test index e1c37f0a08..75a9f6b695 100644 --- a/tests/languages/csharp/keyword_feature.test +++ b/tests/languages/csharp/keyword_feature.test @@ -8,6 +8,7 @@ await base bool break +by byte case catch @@ -24,11 +25,10 @@ do double dynamic else -enum +enum; event explicit extern -false finally fixed float @@ -42,7 +42,7 @@ group if implicit in -int +int; interface; internal into @@ -51,10 +51,13 @@ join let lock long -namespace +nameof +namespace; new; +notnull null object +on operator orderby out @@ -76,17 +79,17 @@ short sizeof stackalloc static -string -struct +string; +struct; switch this throw -true try typeof uint ulong unchecked +unmanaged unsafe ushort using @@ -95,7 +98,8 @@ var virtual void volatile -where +when +where; while yield @@ -112,6 +116,7 @@ yield ["keyword", "base"], ["keyword", "bool"], ["keyword", "break"], + ["keyword", "by"], ["keyword", "byte"], ["keyword", "case"], ["keyword", "catch"], @@ -128,11 +133,10 @@ yield ["keyword", "double"], ["keyword", "dynamic"], ["keyword", "else"], - ["keyword", "enum"], + ["keyword", "enum"], ["punctuation", ";"], ["keyword", "event"], ["keyword", "explicit"], ["keyword", "extern"], - ["keyword", "false"], ["keyword", "finally"], ["keyword", "fixed"], ["keyword", "float"], @@ -146,7 +150,7 @@ yield ["keyword", "if"], ["keyword", "implicit"], ["keyword", "in"], - ["keyword", "int"], + ["keyword", "int"], ["punctuation", ";"], ["keyword", "interface"], ["punctuation", ";"], ["keyword", "internal"], ["keyword", "into"], @@ -155,10 +159,13 @@ yield ["keyword", "let"], ["keyword", "lock"], ["keyword", "long"], - ["keyword", "namespace"], + ["keyword", "nameof"], + ["keyword", "namespace"], ["punctuation", ";"], ["keyword", "new"], ["punctuation", ";"], + ["keyword", "notnull"], ["keyword", "null"], ["keyword", "object"], + ["keyword", "on"], ["keyword", "operator"], ["keyword", "orderby"], ["keyword", "out"], @@ -180,17 +187,17 @@ yield ["keyword", "sizeof"], ["keyword", "stackalloc"], ["keyword", "static"], - ["keyword", "string"], - ["keyword", "struct"], + ["keyword", "string"], ["punctuation", ";"], + ["keyword", "struct"], ["punctuation", ";"], ["keyword", "switch"], ["keyword", "this"], ["keyword", "throw"], - ["keyword", "true"], ["keyword", "try"], ["keyword", "typeof"], ["keyword", "uint"], ["keyword", "ulong"], ["keyword", "unchecked"], + ["keyword", "unmanaged"], ["keyword", "unsafe"], ["keyword", "ushort"], ["keyword", "using"], @@ -199,11 +206,12 @@ yield ["keyword", "virtual"], ["keyword", "void"], ["keyword", "volatile"], - ["keyword", "where"], + ["keyword", "when"], + ["keyword", "where"], ["punctuation", ";"], ["keyword", "while"], ["keyword", "yield"] ] ---------------------------------------------------- -Checks for all keywords. \ No newline at end of file +Checks for all keywords. diff --git a/tests/languages/csharp/named-parameter_feature.test b/tests/languages/csharp/named-parameter_feature.test new file mode 100644 index 0000000000..7e7560b90f --- /dev/null +++ b/tests/languages/csharp/named-parameter_feature.test @@ -0,0 +1,21 @@ +Foo(abc: 4, xyz: 6); + +---------------------------------------------------- + +[ + ["function", "Foo"], + ["punctuation", "("], + ["named-parameter", "abc"], + ["punctuation", ":"], + ["number", "4"], + ["punctuation", ","], + ["named-parameter", "xyz"], + ["punctuation", ":"], + ["number", "6"], + ["punctuation", ")"], + ["punctuation", ";"] +] + +---------------------------------------------------- + +Checks for named method parameters. diff --git a/tests/languages/csharp/namespace_feature.test b/tests/languages/csharp/namespace_feature.test new file mode 100644 index 0000000000..d4c4906756 --- /dev/null +++ b/tests/languages/csharp/namespace_feature.test @@ -0,0 +1,25 @@ +namespace Foo {} +namespace Foo.Bar {} + +---------------------------------------------------- + +[ + ["keyword", "namespace"], + ["namespace", ["Foo"]], + ["punctuation", "{"], + ["punctuation", "}"], + + ["keyword", "namespace"], + ["namespace", [ + "Foo", + ["punctuation", "."], + "Bar" + ]], + ["punctuation", "{"], + ["punctuation", "}"] +] + + +---------------------------------------------------- + +Checks for namespace declarations. diff --git a/tests/languages/csharp/number_feature.test b/tests/languages/csharp/number_feature.test index 126808037b..4f4d262a4d 100644 --- a/tests/languages/csharp/number_feature.test +++ b/tests/languages/csharp/number_feature.test @@ -1,17 +1,55 @@ 42 3.14159 +3.14159f +3.14159e-23 +.1f +1234L +1234u +700000000000ul +700000000000Lu +0xFFFFFFFFFFFFFFFFul 0xbabe 0XBABE +1_000_000 +1_2_3_4.5_6e-7_8 +0X_BA_BE +0b_1_0000_0000_0000_0000_0000_0000_0000_0000 + +0.06m +0.06M +0.06f +0.06F +0.06d +0.06D ---------------------------------------------------- [ ["number", "42"], ["number", "3.14159"], + ["number", "3.14159f"], + ["number", "3.14159e-23"], + ["number", ".1f"], + ["number", "1234L"], + ["number", "1234u"], + ["number", "700000000000ul"], + ["number", "700000000000Lu"], + ["number", "0xFFFFFFFFFFFFFFFFul"], ["number", "0xbabe"], - ["number", "0XBABE"] + ["number", "0XBABE"], + ["number", "1_000_000"], + ["number", "1_2_3_4.5_6e-7_8"], + ["number", "0X_BA_BE"], + ["number", "0b_1_0000_0000_0000_0000_0000_0000_0000_0000"], + + ["number", "0.06m"], + ["number", "0.06M"], + ["number", "0.06f"], + ["number", "0.06F"], + ["number", "0.06d"], + ["number", "0.06D"] ] ---------------------------------------------------- -Checks for decimal and hexadecimal numbers. \ No newline at end of file +Checks for decimal and hexadecimal numbers. diff --git a/tests/languages/csharp/operator_feature.test b/tests/languages/csharp/operator_feature.test index 4749c38c75..7e74ca4571 100644 --- a/tests/languages/csharp/operator_feature.test +++ b/tests/languages/csharp/operator_feature.test @@ -5,7 +5,7 @@ ! && || -> => = == != < > <= >= -?? +?? ??= ---------------------------------------------------- @@ -52,7 +52,8 @@ ["operator", "<="], ["operator", ">="], - ["operator", "??"] + ["operator", "??"], + ["operator", "??="] ] ---------------------------------------------------- diff --git a/tests/languages/csharp/range_feature.test b/tests/languages/csharp/range_feature.test new file mode 100644 index 0000000000..805fd91b54 --- /dev/null +++ b/tests/languages/csharp/range_feature.test @@ -0,0 +1,42 @@ +list[2..^3]; +list[..^3]; +list[2..]; +list[..]; + +---------------------------------------------------- + +[ + "list", + ["punctuation", "["], + ["number", "2"], + ["range", ".."], + ["operator", "^"], + ["number", "3"], + ["punctuation", "]"], + ["punctuation", ";"], + + "\nlist", + ["punctuation", "["], + ["range", ".."], + ["operator", "^"], + ["number", "3"], + ["punctuation", "]"], + ["punctuation", ";"], + + "\nlist", + ["punctuation", "["], + ["number", "2"], + ["range", ".."], + ["punctuation", "]"], + ["punctuation", ";"], + + "\nlist", + ["punctuation", "["], + ["range", ".."], + ["punctuation", "]"], + ["punctuation", ";"] +] + +---------------------------------------------------- + +Checks for ranges. diff --git a/tests/languages/csharp/return-type_feature.test b/tests/languages/csharp/return-type_feature.test new file mode 100644 index 0000000000..9742e85159 --- /dev/null +++ b/tests/languages/csharp/return-type_feature.test @@ -0,0 +1,166 @@ +Foo Bar(); +Foo Bar(); +Foo[,] Bar(); +new Foo[,] Bar(); +(int, long)? Foo(); +(int, long)? Foo => null; +Baz?[,]? Foo { get; set } = null; +int[]? this[int index] => null; +int[]? IInterface.this[int index] => null; + +---------------------------------------------------- + +[ + ["return-type", [ + "Foo" + ]], + ["function", "Bar"], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", ";"], + ["return-type", [ + "Foo", + ["punctuation", "<"], + "IFoo", + ["punctuation", ">"] + ]], + ["generic-method", [ + ["function", "Bar"], + ["generic", [ + ["punctuation", "<"], + "A", + ["punctuation", ">"] + ]] + ]], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", ";"], + ["return-type", [ + "Foo", + ["punctuation", "<"], + "IFoo", + ["punctuation", ">"], + ["punctuation", "["], + ["punctuation", ","], + ["punctuation", "]"] + ]], + ["generic-method", [ + ["function", "Bar"], + ["generic", [ + ["punctuation", "<"], + "A", + ["punctuation", ">"] + ]] + ]], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", ";"], + ["keyword", "new"], + ["return-type", [ + "Foo", + ["punctuation", "<"], + "IFoo", + ["punctuation", ">"], + ["punctuation", "["], + ["punctuation", ","], + ["punctuation", "]"] + ]], + ["generic-method", [ + ["function", "Bar"], + ["generic", [ + ["punctuation", "<"], + "A", + ["punctuation", ">"] + ]] + ]], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", ";"], + ["return-type", [ + ["punctuation", "("], + ["keyword", "int"], + ["punctuation", ","], + ["keyword", "long"], + ["punctuation", ")"], + ["punctuation", "?"] + ]], + ["generic-method", [ + ["function", "Foo"], + ["generic", [ + ["punctuation", "<"], + ["keyword", "int"], + ["punctuation", ">"] + ]] + ]], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", ";"], + ["return-type", [ + ["punctuation", "("], + ["keyword", "int"], + ["punctuation", ","], + ["keyword", "long"], + ["punctuation", ")"], + ["punctuation", "?"] + ]], + " Foo ", + ["operator", "=>"], + ["keyword", "null"], + ["punctuation", ";"], + ["return-type", [ + "Baz", + ["punctuation", "?"], + ["punctuation", "["], + ["punctuation", ","], + ["punctuation", "]"], + ["punctuation", "?"] + ]], + " Foo ", + ["punctuation", "{"], + ["keyword", "get"], + ["punctuation", ";"], + ["keyword", "set"], + ["punctuation", "}"], + ["operator", "="], + ["keyword", "null"], + ["punctuation", ";"], + ["return-type", [ + ["keyword", "int"], + ["punctuation", "["], + ["punctuation", "]"], + ["punctuation", "?"] + ]], + ["keyword", "this"], + ["punctuation", "["], + ["class-name", [ + ["keyword", "int"] + ]], + " index", + ["punctuation", "]"], + ["operator", "=>"], + ["keyword", "null"], + ["punctuation", ";"], + ["return-type", [ + ["keyword", "int"], + ["punctuation", "["], + ["punctuation", "]"], + ["punctuation", "?"] + ]], + " IInterface", + ["punctuation", "."], + ["keyword", "this"], + ["punctuation", "["], + ["class-name", [ + ["keyword", "int"] + ]], + " index", + ["punctuation", "]"], + ["operator", "=>"], + ["keyword", "null"], + ["punctuation", ";"] +] + + +---------------------------------------------------- + +Checks for the return type. diff --git a/tests/languages/csharp/type-expression_feature.test b/tests/languages/csharp/type-expression_feature.test new file mode 100644 index 0000000000..1ef9e28e74 --- /dev/null +++ b/tests/languages/csharp/type-expression_feature.test @@ -0,0 +1,63 @@ +default(int) +default(Foo) +typeof(Foo) +typeof((int, long)) +default(Foo>) +sizeof(int) + +---------------------------------------------------- + +[ + ["keyword", "default"], + ["punctuation", "("], + ["type-expression", [ + ["keyword", "int"] + ]], + ["punctuation", ")"], + ["keyword", "default"], + ["punctuation", "("], + ["type-expression", [ + "Foo" + ]], + ["punctuation", ")"], + ["keyword", "typeof"], + ["punctuation", "("], + ["type-expression", [ + "Foo" + ]], + ["punctuation", ")"], + ["keyword", "typeof"], + ["punctuation", "("], + ["type-expression", [ + ["punctuation", "("], + ["keyword", "int"], + ["punctuation", ","], + ["keyword", "long"], + ["punctuation", ")"] + ]], + ["punctuation", ")"], + ["keyword", "default"], + ["punctuation", "("], + ["type-expression", [ + "Foo", + ["punctuation", "<"], + "Bar", + ["punctuation", ","], + " IFoo", + ["punctuation", "<"], + "Bar", + ["punctuation", ">"], + ["punctuation", ">"] + ]], + ["punctuation", ")"], + ["keyword", "sizeof"], + ["punctuation", "("], + ["type-expression", [ + ["keyword", "int"] + ]], + ["punctuation", ")"] +] + +---------------------------------------------------- + +Checks for class names of type expressions. diff --git a/tests/languages/csharp/type-list_feature.test b/tests/languages/csharp/type-list_feature.test new file mode 100644 index 0000000000..ca44d22ee7 --- /dev/null +++ b/tests/languages/csharp/type-list_feature.test @@ -0,0 +1,153 @@ +class Foo : Bar, T>, IBar, IFoo + where T : class, IBar, IFoo {} + +public delegate ErrorCode GetInfoMethod(H handle, A value, I paramName, + Size_t paramValueSize, IntPtr paramValue, out Size_t paramValueSizeRet) + where H : unmanaged, IInfoHandle where A : unmanaged where I : unmanaged, Enum; + +---------------------------------------------------- + +[ + ["keyword", "class"], + ["class-name", [ + "Foo", + ["punctuation", "<"], + "T", + ["punctuation", ">"] + ]], + ["punctuation", ":"], + ["type-list", [ + ["class-name", [ + "Bar", + ["punctuation", "<"], + "IList", + ["punctuation", "<"], + "Bar", + ["punctuation", ">"], + ["punctuation", ","], + " T", + ["punctuation", ">"] + ]], + ["punctuation", ","], + ["class-name", [ + "IBar", + ["punctuation", "<"], + "Bar", + ["punctuation", ","], + " T", + ["punctuation", ">"] + ]], + ["punctuation", ","], + ["class-name", [ + "IFoo" + ]] + ]], + ["keyword", "where"], + ["class-name", "T"], + ["punctuation", ":"], + ["type-list", [ + ["keyword", "class"], + ["punctuation", ","], + ["class-name", [ + "IBar", + ["punctuation", "<"], + "IFoo", + ["punctuation", ">"] + ]], + ["punctuation", ","], + ["class-name", [ + "IFoo", + ["punctuation", "<"], + "Bar", + ["punctuation", ">"] + ]] + ]], + ["punctuation", "{"], + ["punctuation", "}"], + + ["keyword", "public"], + ["keyword", "delegate"], + ["return-type", [ + "ErrorCode" + ]], + ["generic-method", [ + ["function", "GetInfoMethod"], + ["generic", [ + ["punctuation", "<"], + "H", + ["punctuation", ","], + " A", + ["punctuation", ","], + " I", + ["punctuation", ">"] + ]] + ]], + ["punctuation", "("], + ["class-name", [ + "H" + ]], + " handle", + ["punctuation", ","], + ["class-name", [ + "A" + ]], + ["keyword", "value"], + ["punctuation", ","], + ["class-name", [ + "I" + ]], + " paramName", + ["punctuation", ","], + ["class-name", [ + "Size_t" + ]], + " paramValueSize", + ["punctuation", ","], + ["class-name", [ + "IntPtr" + ]], + " paramValue", + ["punctuation", ","], + ["keyword", "out"], + ["class-name", [ + "Size_t" + ]], + " paramValueSizeRet", + ["punctuation", ")"], + ["keyword", "where"], + ["class-name", "H"], + ["punctuation", ":"], + ["type-list", [ + ["keyword", "unmanaged"], + ["punctuation", ","], + ["class-name", [ + "IInfoHandle", + ["punctuation", "<"], + "A", + ["punctuation", ","], + " I", + ["punctuation", ">"] + ]] + ]], + ["keyword", "where"], + ["class-name", "A"], + ["punctuation", ":"], + ["type-list", [ + ["keyword", "unmanaged"] + ]], + ["keyword", "where"], + ["class-name", "I"], + ["punctuation", ":"], + ["type-list", [ + ["keyword", "unmanaged"], + ["punctuation", ","], + ["class-name", [ + "Enum" + ]] + ]], + ["punctuation", ";"] +] + +---------------------------------------------------- + +Checks for type lists of inheritance or generic constraints. diff --git a/tests/languages/csharp/using-directive_feature.test b/tests/languages/csharp/using-directive_feature.test new file mode 100644 index 0000000000..aa0723e828 --- /dev/null +++ b/tests/languages/csharp/using-directive_feature.test @@ -0,0 +1,81 @@ +using System; +using System.IO; +using static System.Math; +using static Foo.Bar.FooBar; +using FooBar = Foo.Bar; +using FooBar = Foo.Bar.FooBar; + +---------------------------------------------------- + +[ + ["keyword", "using"], + ["namespace", ["System"]], + ["punctuation", ";"], + + ["keyword", "using"], + ["namespace", [ + "System", + ["punctuation", "."], + "IO" + ]], + ["punctuation", ";"], + + ["keyword", "using"], + ["keyword", "static"], + ["class-name", [ + "System", + ["punctuation", "."], + "Math" + ]], + ["punctuation", ";"], + + ["keyword", "using"], + ["keyword", "static"], + ["class-name", [ + "Foo", + ["punctuation", "."], + "Bar", + ["punctuation", "<"], + "IFoo", + ["punctuation", ">"], + ["punctuation", "."], + "FooBar", + ["punctuation", "<"], + "IFoo", + ["punctuation", ">"] + ]], + ["punctuation", ";"], + + ["keyword", "using"], + ["class-name", "FooBar"], + ["operator", "="], + ["class-name", [ + "Foo", + ["punctuation", "."], + "Bar" + ]], + ["punctuation", ";"], + + ["keyword", "using"], + ["class-name", "FooBar"], + ["operator", "="], + ["class-name", [ + "Foo", + ["punctuation", "."], + "Bar", + ["punctuation", "<"], + "IFoo", + ["punctuation", ">"], + ["punctuation", "."], + "FooBar", + ["punctuation", "<"], + "IFoo", + ["punctuation", ">"] + ]], + ["punctuation", ";"] +] + + +---------------------------------------------------- + +Checks for using directives. diff --git a/tests/languages/t4-cs/block_standard_feature.test b/tests/languages/t4-cs/block_standard_feature.test index 1b9a761221..1dc9bd8713 100644 --- a/tests/languages/t4-cs/block_standard_feature.test +++ b/tests/languages/t4-cs/block_standard_feature.test @@ -19,7 +19,9 @@ The number <#= i #> is even. ["content", [ ["keyword", "for"], ["punctuation", "("], - ["keyword", "var"], + ["class-name", [ + ["keyword", "var"] + ]], " i ", ["operator", "="], ["number", "0"], @@ -50,7 +52,9 @@ The number <#= i #> is even. ["block", [ ["expression", [ ["delimiter", "<#="], - ["content", [" i "]], + ["content", [ + " i " + ]], ["delimiter", "#>"] ]] ]], From c917a8ca04efcb8966fb5e800def742776a4e4e0 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Wed, 25 Mar 2020 11:44:33 +0100 Subject: [PATCH 0470/1100] C#: Removed invalid strings from example (#2266) C#'s example page contained some invalid strings. --- examples/prism-csharp.html | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/examples/prism-csharp.html b/examples/prism-csharp.html index c6d76c2b44..fc60c71076 100644 --- a/examples/prism-csharp.html +++ b/examples/prism-csharp.html @@ -5,12 +5,9 @@

          Comments

          Strings

          "foo \"bar\" baz"
          -'foo \'bar\' baz'
           @"Verbatim strings"
           @"Luis: ""Patrick, where did you get that overnight bag?""
               Patrick: ""Jean Paul Gaultier.""";
          -@'Luis: ''Patrick, where did you get that overnight bag?''
          -    Patrick: ''Jean Paul Gaultier.''';
           

          Full example

          @@ -57,4 +54,4 @@

          Full example

          DialogResult dialogResult = form.ShowDialog(); value = textBox.Text; return dialogResult; -}
          \ No newline at end of file +}
          From 2d4c94cd08e3c5fa29fe036556b6a4d44e57baa1 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Wed, 25 Mar 2020 13:12:42 +0100 Subject: [PATCH 0471/1100] Core: Linked list implementation for matchGrammar (#1909) The token streams in `matchGrammar` are now backed by a linked list instead of an array. This guarantees O(1) time for all operations. The `matchGrammar` is now private. --- components/prism-core.js | 360 ++++++++++++++++++++++------------- components/prism-core.min.js | 2 +- prism.js | 360 ++++++++++++++++++++++------------- 3 files changed, 459 insertions(+), 263 deletions(-) diff --git a/components/prism-core.js b/components/prism-core.js index 10596f881c..cd5cee1e81 100644 --- a/components/prism-core.js +++ b/components/prism-core.js @@ -331,137 +331,8 @@ var _ = { return Token.stringify(_.util.encode(env.tokens), env.language); }, - matchGrammar: function (text, strarr, grammar, index, startPos, oneshot, target) { - for (var token in grammar) { - if (!grammar.hasOwnProperty(token) || !grammar[token]) { - continue; - } - - var patterns = grammar[token]; - patterns = Array.isArray(patterns) ? patterns : [patterns]; - - for (var j = 0; j < patterns.length; ++j) { - if (target && target == token + ',' + j) { - return; - } - - var pattern = patterns[j], - inside = pattern.inside, - lookbehind = !!pattern.lookbehind, - greedy = !!pattern.greedy, - lookbehindLength = 0, - alias = pattern.alias; - - if (greedy && !pattern.pattern.global) { - // Without the global flag, lastIndex won't work - var flags = pattern.pattern.toString().match(/[imsuy]*$/)[0]; - pattern.pattern = RegExp(pattern.pattern.source, flags + 'g'); - } - - pattern = pattern.pattern || pattern; - - // Don’t cache length as it changes during the loop - for (var i = index, pos = startPos; i < strarr.length; pos += strarr[i].length, ++i) { - - var str = strarr[i]; - - if (strarr.length > text.length) { - // Something went terribly wrong, ABORT, ABORT! - return; - } - - if (str instanceof Token) { - continue; - } - - if (greedy && i != strarr.length - 1) { - pattern.lastIndex = pos; - var match = pattern.exec(text); - if (!match) { - break; - } - - var from = match.index + (lookbehind && match[1] ? match[1].length : 0), - to = match.index + match[0].length, - k = i, - p = pos; - - for (var len = strarr.length; k < len && (p < to || (!strarr[k].type && !strarr[k - 1].greedy)); ++k) { - p += strarr[k].length; - // Move the index i to the element in strarr that is closest to from - if (from >= p) { - ++i; - pos = p; - } - } - - // If strarr[i] is a Token, then the match starts inside another Token, which is invalid - if (strarr[i] instanceof Token) { - continue; - } - - // Number of tokens to delete and replace with the new match - delNum = k - i; - str = text.slice(pos, p); - match.index -= pos; - } else { - pattern.lastIndex = 0; - - var match = pattern.exec(str), - delNum = 1; - } - - if (!match) { - if (oneshot) { - break; - } - - continue; - } - - if(lookbehind) { - lookbehindLength = match[1] ? match[1].length : 0; - } - - var from = match.index + lookbehindLength, - match = match[0].slice(lookbehindLength), - to = from + match.length, - before = str.slice(0, from), - after = str.slice(to); - - var args = [i, delNum]; - - if (before) { - ++i; - pos += before.length; - args.push(before); - } - - var wrapped = new Token(token, inside? _.tokenize(match, inside) : match, alias, match, greedy); - - args.push(wrapped); - - if (after) { - args.push(after); - } - - Array.prototype.splice.apply(strarr, args); - - if (delNum != 1) - _.matchGrammar(text, strarr, grammar, i, pos, true, token + ',' + j); - - if (oneshot) - break; - } - } - } - }, - tokenize: function(text, grammar) { - var strarr = [text]; - var rest = grammar.rest; - if (rest) { for (var token in rest) { grammar[token] = rest[token]; @@ -470,9 +341,12 @@ var _ = { delete grammar.rest; } - _.matchGrammar(text, strarr, grammar, 0, 0, false); + var tokenList = new LinkedList(); + addAfter(tokenList, tokenList.head, text); - return strarr; + matchGrammar(text, tokenList, grammar, tokenList.head, 0); + + return toArray(tokenList); }, hooks: { @@ -553,6 +427,230 @@ Token.stringify = function stringify(o, language) { return '<' + env.tag + ' class="' + env.classes.join(' ') + '"' + attributes + '>' + env.content + ''; }; +/** + * @param {string} text + * @param {LinkedList} tokenList + * @param {any} grammar + * @param {LinkedListNode} startNode + * @param {number} startPos + * @param {boolean} [oneshot=false] + * @param {string} [target] + */ +function matchGrammar(text, tokenList, grammar, startNode, startPos, oneshot, target) { + for (var token in grammar) { + if (!grammar.hasOwnProperty(token) || !grammar[token]) { + continue; + } + + var patterns = grammar[token]; + patterns = Array.isArray(patterns) ? patterns : [patterns]; + + for (var j = 0; j < patterns.length; ++j) { + if (target && target == token + ',' + j) { + return; + } + + var pattern = patterns[j], + inside = pattern.inside, + lookbehind = !!pattern.lookbehind, + greedy = !!pattern.greedy, + lookbehindLength = 0, + alias = pattern.alias; + + if (greedy && !pattern.pattern.global) { + // Without the global flag, lastIndex won't work + var flags = pattern.pattern.toString().match(/[imsuy]*$/)[0]; + pattern.pattern = RegExp(pattern.pattern.source, flags + 'g'); + } + + pattern = pattern.pattern || pattern; + + for ( // iterate the token list and keep track of the current token/string position + var currentNode = startNode.next, pos = startPos; + currentNode !== tokenList.tail; + pos += currentNode.value.length, currentNode = currentNode.next + ) { + + var str = currentNode.value; + + if (tokenList.length > text.length) { + // Something went terribly wrong, ABORT, ABORT! + return; + } + + if (str instanceof Token) { + continue; + } + + var removeCount = 1; // this is the to parameter of removeBetween + + if (greedy && currentNode != tokenList.tail.prev) { + pattern.lastIndex = pos; + var match = pattern.exec(text); + if (!match) { + break; + } + + var from = match.index + (lookbehind && match[1] ? match[1].length : 0); + var to = match.index + match[0].length; + var p = pos; + + // find the node that contains the match + p += currentNode.value.length; + while (from >= p) { + currentNode = currentNode.next; + p += currentNode.value.length; + } + // adjust pos (and p) + p -= currentNode.value.length; + pos = p; + + // the current node is a Token, then the match starts inside another Token, which is invalid + if (currentNode.value instanceof Token) { + continue; + } + + // find the last node which is affected by this match + for ( + var k = currentNode; + k !== tokenList.tail && (p < to || (typeof k.value === 'string' && !k.prev.value.greedy)); + k = k.next + ) { + removeCount++; + p += k.value.length; + } + removeCount--; + + // replace with the new match + str = text.slice(pos, p); + match.index -= pos; + } else { + pattern.lastIndex = 0; + + var match = pattern.exec(str); + } + + if (!match) { + if (oneshot) { + break; + } + + continue; + } + + if (lookbehind) { + lookbehindLength = match[1] ? match[1].length : 0; + } + + var from = match.index + lookbehindLength, + match = match[0].slice(lookbehindLength), + to = from + match.length, + before = str.slice(0, from), + after = str.slice(to); + + var removeFrom = currentNode.prev; + + if (before) { + removeFrom = addAfter(tokenList, removeFrom, before); + pos += before.length; + } + + removeRange(tokenList, removeFrom, removeCount); + + var wrapped = new Token(token, inside ? _.tokenize(match, inside) : match, alias, match, greedy); + currentNode = addAfter(tokenList, removeFrom, wrapped); + + if (after) { + addAfter(tokenList, currentNode, after); + } + + + if (removeCount > 1) + matchGrammar(text, tokenList, grammar, currentNode.prev, pos, true, token + ',' + j); + + if (oneshot) + break; + } + } + } +} + +/** + * @typedef LinkedListNode + * @property {T} value + * @property {LinkedListNode | null} prev The previous node. + * @property {LinkedListNode | null} next The next node. + * @template T + */ + +/** + * @template T + */ +function LinkedList() { + /** @type {LinkedListNode} */ + var head = { value: null, prev: null, next: null }; + /** @type {LinkedListNode} */ + var tail = { value: null, prev: head, next: null }; + head.next = tail; + + /** @type {LinkedListNode} */ + this.head = head; + /** @type {LinkedListNode} */ + this.tail = tail; + this.length = 0; +} + +/** + * Adds a new node with the given value to the list. + * @param {LinkedList} list + * @param {LinkedListNode} node + * @param {T} value + * @returns {LinkedListNode} The added node. + * @template T + */ +function addAfter(list, node, value) { + // assumes that node != list.tail && values.length >= 0 + var next = node.next; + + var newNode = { value: value, prev: node, next: next }; + node.next = newNode; + next.prev = newNode; + list.length++; + + return newNode; +} +/** + * Removes `count` nodes after the given node. The given node will not be removed. + * @param {LinkedList} list + * @param {LinkedListNode} node + * @param {number} count + * @template T + */ +function removeRange(list, node, count) { + var next = node.next; + for (var i = 0; i < count && next !== list.tail; i++) { + next = next.next; + } + node.next = next; + next.prev = node; + list.length -= i; +} +/** + * @param {LinkedList} list + * @returns {T[]} + * @template T + */ +function toArray(list) { + var array = []; + var node = list.head.next; + while (node !== list.tail) { + array.push(node.value); + node = node.next; + } + return array; +} + + if (!_self.document) { if (!_self.addEventListener) { // in Node.js diff --git a/components/prism-core.min.js b/components/prism-core.min.js index 91338d07e1..698c572d7c 100644 --- a/components/prism-core.min.js +++ b/components/prism-core.min.js @@ -1 +1 @@ -var _self="undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{},Prism=function(u){var c=/\blang(?:uage)?-([\w-]+)\b/i,r=0,C={manual:u.Prism&&u.Prism.manual,disableWorkerMessageHandler:u.Prism&&u.Prism.disableWorkerMessageHandler,util:{encode:function e(r){return r instanceof _?new _(r.type,e(r.content),r.alias):Array.isArray(r)?r.map(e):r.replace(/&/g,"&").replace(/e.length)return;if(!(k instanceof _)){if(h&&y!=r.length-1){if(c.lastIndex=v,!(S=c.exec(e)))break;for(var b=S.index+(f&&S[1]?S[1].length:0),w=S.index+S[0].length,A=y,P=v,x=r.length;A"+a.content+""},!u.document)return u.addEventListener&&(C.disableWorkerMessageHandler||u.addEventListener("message",function(e){var r=JSON.parse(e.data),n=r.language,t=r.code,a=r.immediateClose;u.postMessage(C.highlight(t,C.languages[n],n)),a&&u.close()},!1)),C;var e=C.util.currentScript();function n(){C.manual||C.highlightAll()}if(e&&(C.filename=e.src,e.hasAttribute("data-manual")&&(C.manual=!0)),!C.manual){var t=document.readyState;"loading"===t||"interactive"===t&&e&&e.defer?document.addEventListener("DOMContentLoaded",n):window.requestAnimationFrame?window.requestAnimationFrame(n):window.setTimeout(n,16)}return C}(_self);"undefined"!=typeof module&&module.exports&&(module.exports=Prism),"undefined"!=typeof global&&(global.Prism=Prism); \ No newline at end of file +var _self="undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{},Prism=function(u){var c=/\blang(?:uage)?-([\w-]+)\b/i,n=0,C={manual:u.Prism&&u.Prism.manual,disableWorkerMessageHandler:u.Prism&&u.Prism.disableWorkerMessageHandler,util:{encode:function e(n){return n instanceof _?new _(n.type,e(n.content),n.alias):Array.isArray(n)?n.map(e):n.replace(/&/g,"&").replace(/n.length)return;if(!(b instanceof _)){var x=1;if(d&&y!=t.tail.prev){g.lastIndex=k;var w=g.exec(n);if(!w)break;var A=w.index+(h&&w[1]?w[1].length:0),P=w.index+w[0].length,S=k;for(S+=y.value.length;S<=A;)y=y.next,S+=y.value.length;if(S-=y.value.length,k=S,y.value instanceof _)continue;for(var O=y;O!==t.tail&&(S"+a.content+""},!u.document)return u.addEventListener&&(C.disableWorkerMessageHandler||u.addEventListener("message",function(e){var n=JSON.parse(e.data),t=n.language,r=n.code,a=n.immediateClose;u.postMessage(C.highlight(r,C.languages[t],t)),a&&u.close()},!1)),C;var e=C.util.currentScript();function t(){C.manual||C.highlightAll()}if(e&&(C.filename=e.src,e.hasAttribute("data-manual")&&(C.manual=!0)),!C.manual){var r=document.readyState;"loading"===r||"interactive"===r&&e&&e.defer?document.addEventListener("DOMContentLoaded",t):window.requestAnimationFrame?window.requestAnimationFrame(t):window.setTimeout(t,16)}return C}(_self);"undefined"!=typeof module&&module.exports&&(module.exports=Prism),"undefined"!=typeof global&&(global.Prism=Prism); \ No newline at end of file diff --git a/prism.js b/prism.js index 6b09145205..810031392c 100644 --- a/prism.js +++ b/prism.js @@ -336,137 +336,8 @@ var _ = { return Token.stringify(_.util.encode(env.tokens), env.language); }, - matchGrammar: function (text, strarr, grammar, index, startPos, oneshot, target) { - for (var token in grammar) { - if (!grammar.hasOwnProperty(token) || !grammar[token]) { - continue; - } - - var patterns = grammar[token]; - patterns = Array.isArray(patterns) ? patterns : [patterns]; - - for (var j = 0; j < patterns.length; ++j) { - if (target && target == token + ',' + j) { - return; - } - - var pattern = patterns[j], - inside = pattern.inside, - lookbehind = !!pattern.lookbehind, - greedy = !!pattern.greedy, - lookbehindLength = 0, - alias = pattern.alias; - - if (greedy && !pattern.pattern.global) { - // Without the global flag, lastIndex won't work - var flags = pattern.pattern.toString().match(/[imsuy]*$/)[0]; - pattern.pattern = RegExp(pattern.pattern.source, flags + 'g'); - } - - pattern = pattern.pattern || pattern; - - // Don’t cache length as it changes during the loop - for (var i = index, pos = startPos; i < strarr.length; pos += strarr[i].length, ++i) { - - var str = strarr[i]; - - if (strarr.length > text.length) { - // Something went terribly wrong, ABORT, ABORT! - return; - } - - if (str instanceof Token) { - continue; - } - - if (greedy && i != strarr.length - 1) { - pattern.lastIndex = pos; - var match = pattern.exec(text); - if (!match) { - break; - } - - var from = match.index + (lookbehind && match[1] ? match[1].length : 0), - to = match.index + match[0].length, - k = i, - p = pos; - - for (var len = strarr.length; k < len && (p < to || (!strarr[k].type && !strarr[k - 1].greedy)); ++k) { - p += strarr[k].length; - // Move the index i to the element in strarr that is closest to from - if (from >= p) { - ++i; - pos = p; - } - } - - // If strarr[i] is a Token, then the match starts inside another Token, which is invalid - if (strarr[i] instanceof Token) { - continue; - } - - // Number of tokens to delete and replace with the new match - delNum = k - i; - str = text.slice(pos, p); - match.index -= pos; - } else { - pattern.lastIndex = 0; - - var match = pattern.exec(str), - delNum = 1; - } - - if (!match) { - if (oneshot) { - break; - } - - continue; - } - - if(lookbehind) { - lookbehindLength = match[1] ? match[1].length : 0; - } - - var from = match.index + lookbehindLength, - match = match[0].slice(lookbehindLength), - to = from + match.length, - before = str.slice(0, from), - after = str.slice(to); - - var args = [i, delNum]; - - if (before) { - ++i; - pos += before.length; - args.push(before); - } - - var wrapped = new Token(token, inside? _.tokenize(match, inside) : match, alias, match, greedy); - - args.push(wrapped); - - if (after) { - args.push(after); - } - - Array.prototype.splice.apply(strarr, args); - - if (delNum != 1) - _.matchGrammar(text, strarr, grammar, i, pos, true, token + ',' + j); - - if (oneshot) - break; - } - } - } - }, - tokenize: function(text, grammar) { - var strarr = [text]; - var rest = grammar.rest; - if (rest) { for (var token in rest) { grammar[token] = rest[token]; @@ -475,9 +346,12 @@ var _ = { delete grammar.rest; } - _.matchGrammar(text, strarr, grammar, 0, 0, false); + var tokenList = new LinkedList(); + addAfter(tokenList, tokenList.head, text); - return strarr; + matchGrammar(text, tokenList, grammar, tokenList.head, 0); + + return toArray(tokenList); }, hooks: { @@ -558,6 +432,230 @@ Token.stringify = function stringify(o, language) { return '<' + env.tag + ' class="' + env.classes.join(' ') + '"' + attributes + '>' + env.content + ''; }; +/** + * @param {string} text + * @param {LinkedList} tokenList + * @param {any} grammar + * @param {LinkedListNode} startNode + * @param {number} startPos + * @param {boolean} [oneshot=false] + * @param {string} [target] + */ +function matchGrammar(text, tokenList, grammar, startNode, startPos, oneshot, target) { + for (var token in grammar) { + if (!grammar.hasOwnProperty(token) || !grammar[token]) { + continue; + } + + var patterns = grammar[token]; + patterns = Array.isArray(patterns) ? patterns : [patterns]; + + for (var j = 0; j < patterns.length; ++j) { + if (target && target == token + ',' + j) { + return; + } + + var pattern = patterns[j], + inside = pattern.inside, + lookbehind = !!pattern.lookbehind, + greedy = !!pattern.greedy, + lookbehindLength = 0, + alias = pattern.alias; + + if (greedy && !pattern.pattern.global) { + // Without the global flag, lastIndex won't work + var flags = pattern.pattern.toString().match(/[imsuy]*$/)[0]; + pattern.pattern = RegExp(pattern.pattern.source, flags + 'g'); + } + + pattern = pattern.pattern || pattern; + + for ( // iterate the token list and keep track of the current token/string position + var currentNode = startNode.next, pos = startPos; + currentNode !== tokenList.tail; + pos += currentNode.value.length, currentNode = currentNode.next + ) { + + var str = currentNode.value; + + if (tokenList.length > text.length) { + // Something went terribly wrong, ABORT, ABORT! + return; + } + + if (str instanceof Token) { + continue; + } + + var removeCount = 1; // this is the to parameter of removeBetween + + if (greedy && currentNode != tokenList.tail.prev) { + pattern.lastIndex = pos; + var match = pattern.exec(text); + if (!match) { + break; + } + + var from = match.index + (lookbehind && match[1] ? match[1].length : 0); + var to = match.index + match[0].length; + var p = pos; + + // find the node that contains the match + p += currentNode.value.length; + while (from >= p) { + currentNode = currentNode.next; + p += currentNode.value.length; + } + // adjust pos (and p) + p -= currentNode.value.length; + pos = p; + + // the current node is a Token, then the match starts inside another Token, which is invalid + if (currentNode.value instanceof Token) { + continue; + } + + // find the last node which is affected by this match + for ( + var k = currentNode; + k !== tokenList.tail && (p < to || (typeof k.value === 'string' && !k.prev.value.greedy)); + k = k.next + ) { + removeCount++; + p += k.value.length; + } + removeCount--; + + // replace with the new match + str = text.slice(pos, p); + match.index -= pos; + } else { + pattern.lastIndex = 0; + + var match = pattern.exec(str); + } + + if (!match) { + if (oneshot) { + break; + } + + continue; + } + + if (lookbehind) { + lookbehindLength = match[1] ? match[1].length : 0; + } + + var from = match.index + lookbehindLength, + match = match[0].slice(lookbehindLength), + to = from + match.length, + before = str.slice(0, from), + after = str.slice(to); + + var removeFrom = currentNode.prev; + + if (before) { + removeFrom = addAfter(tokenList, removeFrom, before); + pos += before.length; + } + + removeRange(tokenList, removeFrom, removeCount); + + var wrapped = new Token(token, inside ? _.tokenize(match, inside) : match, alias, match, greedy); + currentNode = addAfter(tokenList, removeFrom, wrapped); + + if (after) { + addAfter(tokenList, currentNode, after); + } + + + if (removeCount > 1) + matchGrammar(text, tokenList, grammar, currentNode.prev, pos, true, token + ',' + j); + + if (oneshot) + break; + } + } + } +} + +/** + * @typedef LinkedListNode + * @property {T} value + * @property {LinkedListNode | null} prev The previous node. + * @property {LinkedListNode | null} next The next node. + * @template T + */ + +/** + * @template T + */ +function LinkedList() { + /** @type {LinkedListNode} */ + var head = { value: null, prev: null, next: null }; + /** @type {LinkedListNode} */ + var tail = { value: null, prev: head, next: null }; + head.next = tail; + + /** @type {LinkedListNode} */ + this.head = head; + /** @type {LinkedListNode} */ + this.tail = tail; + this.length = 0; +} + +/** + * Adds a new node with the given value to the list. + * @param {LinkedList} list + * @param {LinkedListNode} node + * @param {T} value + * @returns {LinkedListNode} The added node. + * @template T + */ +function addAfter(list, node, value) { + // assumes that node != list.tail && values.length >= 0 + var next = node.next; + + var newNode = { value: value, prev: node, next: next }; + node.next = newNode; + next.prev = newNode; + list.length++; + + return newNode; +} +/** + * Removes `count` nodes after the given node. The given node will not be removed. + * @param {LinkedList} list + * @param {LinkedListNode} node + * @param {number} count + * @template T + */ +function removeRange(list, node, count) { + var next = node.next; + for (var i = 0; i < count && next !== list.tail; i++) { + next = next.next; + } + node.next = next; + next.prev = node; + list.length -= i; +} +/** + * @param {LinkedList} list + * @returns {T[]} + * @template T + */ +function toArray(list) { + var array = []; + var node = list.head.next; + while (node !== list.tail) { + array.push(node.value); + node = node.next; + } + return array; +} + + if (!_self.document) { if (!_self.addEventListener) { // in Node.js From 57eebcedc27ede86c4287693c5dda3c45ceb460e Mon Sep 17 00:00:00 2001 From: Christopher McComas Date: Thu, 26 Mar 2020 12:10:09 -0400 Subject: [PATCH 0472/1100] BBCode: Added "shortcode" alias (#2273) This adds a "shortcode" alias to BBCode to support Wordpress' ShortCode. --- components.js | 2 +- components.json | 4 ++++ components/prism-bbcode.js | 2 ++ components/prism-bbcode.min.js | 2 +- plugins/autoloader/prism-autoloader.js | 1 + plugins/autoloader/prism-autoloader.min.js | 2 +- plugins/show-language/prism-show-language.js | 1 + plugins/show-language/prism-show-language.min.js | 2 +- 8 files changed, 12 insertions(+), 4 deletions(-) diff --git a/components.js b/components.js index 4a5b2806e3..6f2dcf1d2e 100644 --- a/components.js +++ b/components.js @@ -1,2 +1,2 @@ -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"Augmented Backus–Naur form","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","owner":"RunDevelopment"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"Backus–Naur form","alias":"rbnf","aliasTitles":{"rbnf":"Routing Backus–Naur form"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dax":{"title":"DAX","owner":"peterbud"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"Extended Backus–Naur form","owner":"RunDevelopment"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment"},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"http":{"title":"HTTP","optional":["css","javascript","json","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"json":{"title":"JSON","owner":"CupOfTea696"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","modify":["actionscript","coffeescript","flow","javascript","typescript","vala"],"owner":"RunDevelopment"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"solidity":{"title":"Solidity (Ethereum)","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","visual-basic"],"owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true}}}; +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"Augmented Backus–Naur form","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"Backus–Naur form","alias":"rbnf","aliasTitles":{"rbnf":"Routing Backus–Naur form"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dax":{"title":"DAX","owner":"peterbud"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"Extended Backus–Naur form","owner":"RunDevelopment"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment"},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"http":{"title":"HTTP","optional":["css","javascript","json","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"json":{"title":"JSON","owner":"CupOfTea696"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","modify":["actionscript","coffeescript","flow","javascript","typescript","vala"],"owner":"RunDevelopment"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"solidity":{"title":"Solidity (Ethereum)","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","visual-basic"],"owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true}}}; if (typeof module !== 'undefined' && module.exports) { module.exports = components; } \ No newline at end of file diff --git a/components.json b/components.json index 9d14518c4b..3dcac11920 100644 --- a/components.json +++ b/components.json @@ -161,6 +161,10 @@ }, "bbcode": { "title": "BBcode", + "alias": "shortcode", + "aliasTitles": { + "shortcode": "Shortcode" + }, "owner": "RunDevelopment" }, "bison": { diff --git a/components/prism-bbcode.js b/components/prism-bbcode.js index 276acc3a0e..244c9cf235 100644 --- a/components/prism-bbcode.js +++ b/components/prism-bbcode.js @@ -25,3 +25,5 @@ Prism.languages.bbcode = { } } }; + +Prism.languages.shortcode = Prism.languages.bbcode; \ No newline at end of file diff --git a/components/prism-bbcode.min.js b/components/prism-bbcode.min.js index 8db1605065..b795a1fe95 100644 --- a/components/prism-bbcode.min.js +++ b/components/prism-bbcode.min.js @@ -1 +1 @@ -Prism.languages.bbcode={tag:{pattern:/\[\/?[^\s=\]]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'"\]=]+))?(?:\s+[^\s=\]]+\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'"\]=]+))*\s*\]/,inside:{tag:{pattern:/^\[\/?[^\s=\]]+/,inside:{punctuation:/^\[\/?/}},"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'"\]=]+)/i,inside:{punctuation:[/^=/,{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\]/,"attr-name":/[^\s=\]]+/}}}; \ No newline at end of file +Prism.languages.bbcode={tag:{pattern:/\[\/?[^\s=\]]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'"\]=]+))?(?:\s+[^\s=\]]+\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'"\]=]+))*\s*\]/,inside:{tag:{pattern:/^\[\/?[^\s=\]]+/,inside:{punctuation:/^\[\/?/}},"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'"\]=]+)/i,inside:{punctuation:[/^=/,{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\]/,"attr-name":/[^\s=\]]+/}}},Prism.languages.shortcode=Prism.languages.bbcode; \ No newline at end of file diff --git a/plugins/autoloader/prism-autoloader.js b/plugins/autoloader/prism-autoloader.js index 5c028464d9..277e2e6ad1 100644 --- a/plugins/autoloader/prism-autoloader.js +++ b/plugins/autoloader/prism-autoloader.js @@ -146,6 +146,7 @@ "g4": "antlr4", "adoc": "asciidoc", "shell": "bash", + "shortcode": "bbcode", "rbnf": "bnf", "conc": "concurnas", "cs": "csharp", diff --git a/plugins/autoloader/prism-autoloader.min.js b/plugins/autoloader/prism-autoloader.min.js index 8de97ebad6..3f067d42fa 100644 --- a/plugins/autoloader/prism-autoloader.min.js +++ b/plugins/autoloader/prism-autoloader.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof self&&self.Prism&&self.document&&document.createElement){var l={javascript:"clike",actionscript:"javascript",arduino:"cpp",aspnet:["markup","csharp"],bison:"c",c:"clike",csharp:"clike",cpp:"c",coffeescript:"javascript",crystal:"ruby","css-extras":"css",d:"clike",dart:"clike",django:"markup-templating",ejs:["javascript","markup-templating"],etlua:["lua","markup-templating"],erb:["ruby","markup-templating"],fsharp:"clike","firestore-security-rules":"clike",flow:"javascript",ftl:"markup-templating",glsl:"clike",gml:"clike",go:"clike",groovy:"clike",haml:"ruby",handlebars:"markup-templating",haxe:"clike",java:"clike",javadoc:["markup","java","javadoclike"],jolie:"clike",jsdoc:["javascript","javadoclike"],"js-extras":"javascript","js-templates":"javascript",jsonp:"json",json5:"json",kotlin:"clike",latte:["clike","markup-templating","php"],less:"css",lilypond:"scheme",markdown:"markup","markup-templating":"markup",n4js:"javascript",nginx:"clike",objectivec:"c",opencl:"c",parser:"markup",php:["clike","markup-templating"],phpdoc:["php","javadoclike"],"php-extras":"php",plsql:"sql",processing:"clike",protobuf:"clike",pug:["markup","javascript"],qml:"javascript",qore:"clike",jsx:["markup","javascript"],tsx:["jsx","typescript"],reason:"clike",ruby:"clike",sass:"css",scss:"css",scala:"java","shell-session":"bash",smarty:"markup-templating",solidity:"clike",soy:"markup-templating",sparql:"turtle",sqf:"clike",swift:"clike",tap:"yaml",textile:"markup",tt2:["clike","markup-templating"],twig:"markup",typescript:"javascript","t4-cs":["t4-templating","csharp"],"t4-vb":["t4-templating","visual-basic"],vala:"clike",vbnet:"basic",velocity:"markup",wiki:"markup",xeora:"markup",xquery:"markup"},c={html:"markup",xml:"markup",svg:"markup",mathml:"markup",js:"javascript",g4:"antlr4",adoc:"asciidoc",shell:"bash",rbnf:"bnf",conc:"concurnas",cs:"csharp",dotnet:"csharp",coffee:"coffeescript",jinja2:"django","dns-zone":"dns-zone-file",dockerfile:"docker",xlsx:"excel-formula",xls:"excel-formula",gamemakerlanguage:"gml",hs:"haskell",tex:"latex",context:"latex",ly:"lilypond",emacs:"lisp",elisp:"lisp","emacs-lisp":"lisp",md:"markdown",moon:"moonscript",n4jsd:"n4js",objectpascal:"pascal",px:"pcaxis",pq:"powerquery",mscript:"powerquery",py:"python",robot:"robotframework",rb:"ruby",sln:"solution-file",rq:"sparql",trig:"turtle",ts:"typescript",t4:"t4-cs",vb:"visual-basic",xeoracube:"xeora",yml:"yaml"},n={},e="components/",a=Prism.util.currentScript();if(a){var t=/\bplugins\/autoloader\/prism-autoloader\.(?:min\.)js$/i,r=/[\w-]+\.(?:min\.)js$/i;if(a.hasAttribute("data-autoloader-path"))e=a.getAttribute("data-autoloader-path").trim().replace(/\/?$/,"/");else{var s=a.src;t.test(s)?e=s.replace(t,"components/"):r.test(s)&&(e=s.replace(r,"components/"))}}var p=Prism.plugins.autoloader={languages_path:e,use_minified:!0,loadLanguages:o};Prism.hooks.add("complete",function(e){e.element&&e.language&&!e.grammar&&"none"!==e.language&&function(e,a){e in c&&(e=c[e]);var t=a.getAttribute("data-dependencies"),r=a.parentElement;!t&&r&&"pre"===r.tagName.toLowerCase()&&(t=r.getAttribute("data-dependencies")),o(t=t?t.split(/\s*,\s*/g):[],function(){u(e,function(){Prism.highlightElement(a)})})}(e.language,e.element)})}function o(e,a,t){"string"==typeof e&&(e=[e]);var r=e.length,s=0,i=!1;function l(){i||++s===r&&a&&a(e)}0!==r?e.forEach(function(e){u(e,l,function(){i||(i=!0,t&&t(e))})}):a&&setTimeout(a,0)}function u(a,t,r){var s=0<=a.indexOf("!");a=a.replace("!",""),a=c[a]||a;var e=function(){var e=n[a];if(e||(e=n[a]={callbacks:[]}),e.callbacks.push({success:t,error:r}),!s&&Prism.languages[a])m(a,"success");else if(!s&&e.error)m(a,"error");else if(s||!e.loading){e.loading=!0,function(e,a,t){var r=document.createElement("script");r.src=e,r.async=!0,r.onload=function(){document.body.removeChild(r),a&&a()},r.onerror=function(){document.body.removeChild(r),t&&t()},document.body.appendChild(r)}(function(e){return p.languages_path+"prism-"+e+(p.use_minified?".min":"")+".js"}(a),function(){e.loading=!1,m(a,"success")},function(){e.loading=!1,e.error=!0,m(a,"error")})}},i=l[a];i&&i.length?o(i,e,r):e()}function m(e,a){if(n[e]){for(var t=n[e].callbacks,r=0,s=t.length;r Date: Thu, 26 Mar 2020 23:18:33 +0100 Subject: [PATCH 0473/1100] CSS: Fixed url() containing "@" (#2272) This fixes URLs that contain the "@" character. --- components/prism-css.js | 1 + components/prism-css.min.js | 2 +- prism.js | 1 + tests/languages/css/url_feature.test | 23 +++++++++++++++++++++++ 4 files changed, 26 insertions(+), 1 deletion(-) diff --git a/components/prism-css.js b/components/prism-css.js index d236f31659..4d7e718fdc 100644 --- a/components/prism-css.js +++ b/components/prism-css.js @@ -18,6 +18,7 @@ }, 'url': { pattern: RegExp('url\\((?:' + string.source + '|[^\n\r()]*)\\)', 'i'), + greedy: true, inside: { 'function': /^url/i, 'punctuation': /^\(|\)$/ diff --git a/components/prism-css.min.js b/components/prism-css.min.js index 1f015cac26..c1a74079d1 100644 --- a/components/prism-css.min.js +++ b/components/prism-css.min.js @@ -1 +1 @@ -!function(s){var e=/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/;s.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:/@[\w-]+[\s\S]*?(?:;|(?=\s*\{))/,inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\((?!\s*\))\s*)(?:[^()]|\((?:[^()]|\([^()]*\))*\))+?(?=\s*\))/,lookbehind:!0,alias:"selector"}}},url:{pattern:RegExp("url\\((?:"+e.source+"|[^\n\r()]*)\\)","i"),inside:{function:/^url/i,punctuation:/^\(|\)$/}},selector:RegExp("[^{}\\s](?:[^{};\"']|"+e.source+")*?(?=\\s*\\{)"),string:{pattern:e,greedy:!0},property:/[-_a-z\xA0-\uFFFF][-\w\xA0-\uFFFF]*(?=\s*:)/i,important:/!important\b/i,function:/[-a-z0-9]+(?=\()/i,punctuation:/[(){};:,]/},s.languages.css.atrule.inside.rest=s.languages.css;var t=s.languages.markup;t&&(t.tag.addInlined("style","css"),s.languages.insertBefore("inside","attr-value",{"style-attr":{pattern:/\s*style=("|')(?:\\[\s\S]|(?!\1)[^\\])*\1/i,inside:{"attr-name":{pattern:/^\s*style/i,inside:t.tag.inside},punctuation:/^\s*=\s*['"]|['"]\s*$/,"attr-value":{pattern:/.+/i,inside:s.languages.css}},alias:"language-css"}},t.tag))}(Prism); \ No newline at end of file +!function(s){var e=/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/;s.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:/@[\w-]+[\s\S]*?(?:;|(?=\s*\{))/,inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\((?!\s*\))\s*)(?:[^()]|\((?:[^()]|\([^()]*\))*\))+?(?=\s*\))/,lookbehind:!0,alias:"selector"}}},url:{pattern:RegExp("url\\((?:"+e.source+"|[^\n\r()]*)\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/}},selector:RegExp("[^{}\\s](?:[^{};\"']|"+e.source+")*?(?=\\s*\\{)"),string:{pattern:e,greedy:!0},property:/[-_a-z\xA0-\uFFFF][-\w\xA0-\uFFFF]*(?=\s*:)/i,important:/!important\b/i,function:/[-a-z0-9]+(?=\()/i,punctuation:/[(){};:,]/},s.languages.css.atrule.inside.rest=s.languages.css;var t=s.languages.markup;t&&(t.tag.addInlined("style","css"),s.languages.insertBefore("inside","attr-value",{"style-attr":{pattern:/\s*style=("|')(?:\\[\s\S]|(?!\1)[^\\])*\1/i,inside:{"attr-name":{pattern:/^\s*style/i,inside:t.tag.inside},punctuation:/^\s*=\s*['"]|['"]\s*$/,"attr-value":{pattern:/.+/i,inside:s.languages.css}},alias:"language-css"}},t.tag))}(Prism); \ No newline at end of file diff --git a/prism.js b/prism.js index 810031392c..5102efcdb1 100644 --- a/prism.js +++ b/prism.js @@ -863,6 +863,7 @@ Prism.languages.svg = Prism.languages.markup; }, 'url': { pattern: RegExp('url\\((?:' + string.source + '|[^\n\r()]*)\\)', 'i'), + greedy: true, inside: { 'function': /^url/i, 'punctuation': /^\(|\)$/ diff --git a/tests/languages/css/url_feature.test b/tests/languages/css/url_feature.test index 690ec4a707..014404b2bc 100644 --- a/tests/languages/css/url_feature.test +++ b/tests/languages/css/url_feature.test @@ -6,6 +6,9 @@ bar.png') url("foo\ bar.png") +@import url("https://cdn.jsdelivr.net/npm/prismj1.19.0/themes/prism-dark.css"); +@import url("https://cdn.jsdelivr.net/npm/prismjs/themes/prism-dark.css"); + ---------------------------------------------------- [ @@ -38,6 +41,26 @@ bar.png") ["punctuation", "("], "\"foo\\\r\nbar.png\"", ["punctuation", ")"] + ]], + ["atrule", [ + ["rule", "@import"], + ["url", [ + ["function", "url"], + ["punctuation", "("], + "\"https://cdn.jsdelivr.net/npm/prismj1.19.0/themes/prism-dark.css\"", + ["punctuation", ")"] + ]], + ["punctuation", ";"] + ]], + ["atrule", [ + ["rule", "@import"], + ["url", [ + ["function", "url"], + ["punctuation", "("], + "\"https://cdn.jsdelivr.net/npm/prismjs/themes/prism-dark.css\"", + ["punctuation", ")"] + ]], + ["punctuation", ";"] ]] ] From 5d7aab56c20be735e9780886bf99725791d230ef Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Thu, 26 Mar 2020 23:30:29 +0100 Subject: [PATCH 0474/1100] Updated all String.propotype.replace calls for literal strings --- components/prism-csharp.js | 2 +- components/prism-csharp.min.js | 2 +- components/prism-ftl.js | 8 ++++---- components/prism-ftl.min.js | 2 +- components/prism-haml.js | 2 +- components/prism-haml.min.js | 2 +- components/prism-jq.js | 2 +- components/prism-jq.min.js | 2 +- components/prism-lilypond.js | 4 ++-- components/prism-lilypond.min.js | 2 +- components/prism-markdown.js | 4 ++-- components/prism-markdown.min.js | 2 +- components/prism-markup.js | 2 +- components/prism-markup.min.js | 2 +- components/prism-pascaligo.js | 8 ++++---- components/prism-pascaligo.min.js | 2 +- components/prism-pug.js | 2 +- components/prism-pug.min.js | 2 +- components/prism-qml.js | 8 ++++---- components/prism-qml.min.js | 2 +- components/prism-robotframework.js | 2 +- components/prism-robotframework.min.js | 2 +- components/prism-sas.js | 16 ++++++++-------- components/prism-sas.min.js | 2 +- components/prism-shell-session.js | 2 +- components/prism-shell-session.min.js | 2 +- components/prism-yaml.js | 6 +++--- components/prism-yaml.min.js | 2 +- components/prism-zig.js | 12 ++++++++---- components/prism-zig.min.js | 2 +- plugins/diff-highlight/prism-diff-highlight.js | 2 +- .../diff-highlight/prism-diff-highlight.min.js | 2 +- prism.js | 2 +- 33 files changed, 60 insertions(+), 56 deletions(-) diff --git a/components/prism-csharp.js b/components/prism-csharp.js index 4cb35fc946..ba511b3362 100644 --- a/components/prism-csharp.js +++ b/components/prism-csharp.js @@ -34,7 +34,7 @@ */ function nested(pattern, depthLog2) { for (var i = 0; i < depthLog2; i++) { - pattern = pattern.replace(/<>/g, '(?:' + pattern + ')'); + pattern = pattern.replace(/<>/g, function () { return '(?:' + pattern + ')'; }); } return pattern.replace(/<>/g, '[^\\s\\S]'); } diff --git a/components/prism-csharp.min.js b/components/prism-csharp.min.js index ddd0da7b2b..7efefd7c37 100644 --- a/components/prism-csharp.min.js +++ b/components/prism-csharp.min.js @@ -1 +1 @@ -!function(s){function a(e,s){return e.replace(/<<(\d+)>>/g,function(e,n){return"(?:"+s[+n]+")"})}function t(e,n,s){return RegExp(a(e,n),s||"")}function e(e,n){for(var s=0;s>/g,"(?:"+e+")");return e.replace(/<>/g,"[^\\s\\S]")}var n="bool byte char decimal double dynamic float int long object sbyte short string uint ulong ushort var void",i="class enum interface struct",r="add alias ascending async await by descending from get global group into join let nameof notnull on orderby partial remove select set unmanaged value when where where",o="abstract as base break case catch checked const continue default delegate do else event explicit extern finally fixed for foreach goto if implicit in internal is lock namespace new null operator out override params private protected public readonly ref return sealed sizeof stackalloc static switch this throw try typeof unchecked unsafe using virtual volatile while yield";function l(e){return"\\b(?:"+e.trim().replace(/ /g,"|")+")\\b"}var d=l(i),p=RegExp(l(n+" "+i+" "+r+" "+o)),c=l(i+" "+r+" "+o),u=l(n+" "+i+" "+o),g=e("<(?:[^<>;=+\\-*/%&|^]|<>)*>",2),b=e("\\((?:[^()]|<>)*\\)",2),h="@?\\b[A-Za-z_]\\w*\\b",f=a("<<0>>(?:\\s*<<1>>)?",[h,g]),m=a("(?!<<0>>)<<1>>(?:\\s*\\.\\s*<<1>>)*",[c,f]),k="\\[\\s*(?:,\\s*)*\\]",y=a("(?:<<0>>|<<1>>)(?:\\s*(?:\\?\\s*)?<<2>>)*(?:\\s*\\?)?",[a("\\(<<0>>+(?:,<<0>>+)+\\)",[a("[^,()<>[\\];=+\\-*/%&|^]|<<0>>|<<1>>|<<2>>",[g,b,k])]),m,k]),w={keyword:p,punctuation:/[<>()?,.:[\]]/},v="'(?:[^\r\\n'\\\\]|\\\\.|\\\\[Uux][\\da-fA-F]{1,8})'",x='"(?:\\\\.|[^\\\\"\r\\n])*"';s.languages.csharp=s.languages.extend("clike",{string:[{pattern:t("(^|[^$\\\\])<<0>>",['@"(?:""|\\\\[\\s\\S]|[^\\\\"])*"(?!")']),lookbehind:!0,greedy:!0},{pattern:t("(^|[^@$\\\\])<<0>>",[x]),lookbehind:!0,greedy:!0},{pattern:RegExp(v),greedy:!0,alias:"character"}],"class-name":[{pattern:t("(\\busing\\s+static\\s+)<<0>>(?=\\s*;)",[m]),lookbehind:!0,inside:w},{pattern:t("(\\busing\\s+<<0>>\\s*=\\s*)<<1>>(?=\\s*;)",[h,y]),lookbehind:!0,inside:w},{pattern:t("(\\busing\\s+)<<0>>(?=\\s*=)",[h]),lookbehind:!0},{pattern:t("(\\b<<0>>\\s+)<<1>>",[d,f]),lookbehind:!0,inside:w},{pattern:t("(\\bcatch\\s*\\(\\s*)<<0>>",[m]),lookbehind:!0,inside:w},{pattern:t("(\\bwhere\\s+)<<0>>",[h]),lookbehind:!0},{pattern:t("(\\b(?:is|as)\\s+)<<0>>",[y]),lookbehind:!0,inside:w},{pattern:t("\\b<<0>>(?=\\s+(?!<<1>>)<<2>>(?:\\s*[=,;:{)\\]]|\\s+in))",[y,u,h]),inside:w}],keyword:p,number:/(?:\b0(?:x[\da-f_]*[\da-f]|b[01_]*[01])|(?:\B\.\d+(?:_+\d+)*|\b\d+(?:_+\d+)*(?:\.\d+(?:_+\d+)*)?)(?:e[-+]?\d+(?:_+\d+)*)?)(?:ul|lu|[dflmu])?\b/i,operator:/>>=?|<<=?|[-=]>|([-+&|])\1|~|\?\?=?|[-+*/%&|^!=<>]=?/,punctuation:/\?\.?|::|[{}[\];(),.:]/}),s.languages.insertBefore("csharp","number",{range:{pattern:/\.\./,alias:"operator"}}),s.languages.insertBefore("csharp","punctuation",{"named-parameter":{pattern:t("([(,]\\s*)<<0>>(?=\\s*:)",[h]),lookbehind:!0,alias:"punctuation"}}),s.languages.insertBefore("csharp","class-name",{namespace:{pattern:t("(\\b(?:namespace|using)\\s+)<<0>>(?:\\s*\\.\\s*<<0>>)*(?=\\s*[;{])",[h]),lookbehind:!0,inside:{punctuation:/\./}},"type-expression":{pattern:t("(\\b(?:default|typeof|sizeof)\\s*\\(\\s*)(?:[^()\\s]|\\s(?!\\s*\\))|<<0>>)*(?=\\s*\\))",[b]),lookbehind:!0,alias:"class-name",inside:w},"return-type":{pattern:t("<<0>>(?=\\s+(?:<<1>>\\s*(?:=>|[({]|\\.\\s*this\\s*\\[)|this\\s*\\[))",[y,m]),inside:w,alias:"class-name"},"constructor-invocation":{pattern:t("(\\bnew\\s+)<<0>>(?=\\s*[[({])",[y]),lookbehind:!0,inside:w,alias:"class-name"},"generic-method":{pattern:t("<<0>>\\s*<<1>>(?=\\s*\\()",[h,g]),inside:{function:t("^<<0>>",[h]),generic:{pattern:RegExp(g),alias:"class-name",inside:w}}},"type-list":{pattern:t("\\b((?:<<0>>\\s+<<1>>|where\\s+<<2>>)\\s*:\\s*)(?:<<3>>|<<4>>)(?:\\s*,\\s*(?:<<3>>|<<4>>))*(?=\\s*(?:where|[{;]|=>|$))",[d,f,h,y,p.source]),lookbehind:!0,inside:{keyword:p,"class-name":{pattern:RegExp(y),inside:w},punctuation:/,/}},preprocessor:{pattern:/(^\s*)#.*/m,lookbehind:!0,alias:"property",inside:{directive:{pattern:/(\s*#)\b(?:define|elif|else|endif|endregion|error|if|line|pragma|region|undef|warning)\b/,lookbehind:!0,alias:"keyword"}}}});var $=x+"|"+v,_=a("\\/(?![*/])|\\/\\/[^\r\\n]*[\r\\n]|\\/\\*[\\s\\S]*?\\*\\/|<<0>>",[$]),B=e(a("[^\"'/()]|<<0>>|\\(<>*\\)",[_]),2),E="\\b(?:assembly|event|field|method|module|param|property|return|type)\\b",R=a("<<0>>(?:\\s*\\(<<1>>*\\))?",[m,B]);s.languages.insertBefore("csharp","class-name",{attribute:{pattern:t("((?:^|[^\\s\\w>)?])\\s*\\[\\s*)(?:<<0>>\\s*:\\s*)?<<1>>(?:\\s*,\\s*<<1>>)*(?=\\s*\\])",[E,R]),lookbehind:!0,greedy:!0,inside:{target:{pattern:t("^<<0>>(?=\\s*:)",[E]),alias:"keyword"},"attribute-arguments":{pattern:t("\\(<<0>>*\\)",[B]),inside:s.languages.csharp},"class-name":{pattern:RegExp(m),inside:{punctuation:/\./}},punctuation:/[:,]/}}});var S=":[^}\r\\n]+",P=e(a("[^\"'/()]|<<0>>|\\(<>*\\)",[_]),2),z=a("\\{(?!\\{)(?:(?![}:])<<0>>)*<<1>>?\\}",[P,S]),j=e(a("[^\"'/()]|\\/(?!\\*)|\\/\\*.*?\\*\\/|<<0>>|\\(<>*\\)",[$]),2),A=a("\\{(?!\\{)(?:(?![}:])<<0>>)*<<1>>?\\}",[j,S]);function F(e,n){return{interpolation:{pattern:t("([^{](?:\\{\\{)*)<<0>>",[e]),lookbehind:!0,inside:{"format-string":{pattern:t("(^\\{(?:(?![}:])<<0>>)*)<<1>>(?=\\}$)",[n,S]),lookbehind:!0,inside:{punctuation:/^:/}},punctuation:/^\{|\}$/,expression:{pattern:/[\s\S]+/,alias:"language-csharp",inside:s.languages.csharp}}},string:/[\s\S]+/}}s.languages.insertBefore("csharp","string",{"interpolation-string":[{pattern:t('(^|[^\\\\])(?:\\$@|@\\$)"(?:""|\\\\[\\s\\S]|\\{\\{|<<0>>|[^\\\\{"])*"',[z]),lookbehind:!0,greedy:!0,inside:F(z,P)},{pattern:t('(^|[^@\\\\])\\$"(?:\\\\.|\\{\\{|<<0>>|[^\\\\"{])*"',[A]),lookbehind:!0,greedy:!0,inside:F(A,j)}]})}(Prism),Prism.languages.dotnet=Prism.languages.cs=Prism.languages.csharp; \ No newline at end of file +!function(s){function a(e,s){return e.replace(/<<(\d+)>>/g,function(e,n){return"(?:"+s[+n]+")"})}function t(e,n,s){return RegExp(a(e,n),s||"")}function e(e,n){for(var s=0;s>/g,function(){return"(?:"+e+")"});return e.replace(/<>/g,"[^\\s\\S]")}var n="bool byte char decimal double dynamic float int long object sbyte short string uint ulong ushort var void",i="class enum interface struct",r="add alias ascending async await by descending from get global group into join let nameof notnull on orderby partial remove select set unmanaged value when where where",o="abstract as base break case catch checked const continue default delegate do else event explicit extern finally fixed for foreach goto if implicit in internal is lock namespace new null operator out override params private protected public readonly ref return sealed sizeof stackalloc static switch this throw try typeof unchecked unsafe using virtual volatile while yield";function l(e){return"\\b(?:"+e.trim().replace(/ /g,"|")+")\\b"}var d=l(i),p=RegExp(l(n+" "+i+" "+r+" "+o)),c=l(i+" "+r+" "+o),u=l(n+" "+i+" "+o),g=e("<(?:[^<>;=+\\-*/%&|^]|<>)*>",2),b=e("\\((?:[^()]|<>)*\\)",2),h="@?\\b[A-Za-z_]\\w*\\b",f=a("<<0>>(?:\\s*<<1>>)?",[h,g]),m=a("(?!<<0>>)<<1>>(?:\\s*\\.\\s*<<1>>)*",[c,f]),k="\\[\\s*(?:,\\s*)*\\]",y=a("(?:<<0>>|<<1>>)(?:\\s*(?:\\?\\s*)?<<2>>)*(?:\\s*\\?)?",[a("\\(<<0>>+(?:,<<0>>+)+\\)",[a("[^,()<>[\\];=+\\-*/%&|^]|<<0>>|<<1>>|<<2>>",[g,b,k])]),m,k]),w={keyword:p,punctuation:/[<>()?,.:[\]]/},v="'(?:[^\r\\n'\\\\]|\\\\.|\\\\[Uux][\\da-fA-F]{1,8})'",x='"(?:\\\\.|[^\\\\"\r\\n])*"';s.languages.csharp=s.languages.extend("clike",{string:[{pattern:t("(^|[^$\\\\])<<0>>",['@"(?:""|\\\\[\\s\\S]|[^\\\\"])*"(?!")']),lookbehind:!0,greedy:!0},{pattern:t("(^|[^@$\\\\])<<0>>",[x]),lookbehind:!0,greedy:!0},{pattern:RegExp(v),greedy:!0,alias:"character"}],"class-name":[{pattern:t("(\\busing\\s+static\\s+)<<0>>(?=\\s*;)",[m]),lookbehind:!0,inside:w},{pattern:t("(\\busing\\s+<<0>>\\s*=\\s*)<<1>>(?=\\s*;)",[h,y]),lookbehind:!0,inside:w},{pattern:t("(\\busing\\s+)<<0>>(?=\\s*=)",[h]),lookbehind:!0},{pattern:t("(\\b<<0>>\\s+)<<1>>",[d,f]),lookbehind:!0,inside:w},{pattern:t("(\\bcatch\\s*\\(\\s*)<<0>>",[m]),lookbehind:!0,inside:w},{pattern:t("(\\bwhere\\s+)<<0>>",[h]),lookbehind:!0},{pattern:t("(\\b(?:is|as)\\s+)<<0>>",[y]),lookbehind:!0,inside:w},{pattern:t("\\b<<0>>(?=\\s+(?!<<1>>)<<2>>(?:\\s*[=,;:{)\\]]|\\s+in))",[y,u,h]),inside:w}],keyword:p,number:/(?:\b0(?:x[\da-f_]*[\da-f]|b[01_]*[01])|(?:\B\.\d+(?:_+\d+)*|\b\d+(?:_+\d+)*(?:\.\d+(?:_+\d+)*)?)(?:e[-+]?\d+(?:_+\d+)*)?)(?:ul|lu|[dflmu])?\b/i,operator:/>>=?|<<=?|[-=]>|([-+&|])\1|~|\?\?=?|[-+*/%&|^!=<>]=?/,punctuation:/\?\.?|::|[{}[\];(),.:]/}),s.languages.insertBefore("csharp","number",{range:{pattern:/\.\./,alias:"operator"}}),s.languages.insertBefore("csharp","punctuation",{"named-parameter":{pattern:t("([(,]\\s*)<<0>>(?=\\s*:)",[h]),lookbehind:!0,alias:"punctuation"}}),s.languages.insertBefore("csharp","class-name",{namespace:{pattern:t("(\\b(?:namespace|using)\\s+)<<0>>(?:\\s*\\.\\s*<<0>>)*(?=\\s*[;{])",[h]),lookbehind:!0,inside:{punctuation:/\./}},"type-expression":{pattern:t("(\\b(?:default|typeof|sizeof)\\s*\\(\\s*)(?:[^()\\s]|\\s(?!\\s*\\))|<<0>>)*(?=\\s*\\))",[b]),lookbehind:!0,alias:"class-name",inside:w},"return-type":{pattern:t("<<0>>(?=\\s+(?:<<1>>\\s*(?:=>|[({]|\\.\\s*this\\s*\\[)|this\\s*\\[))",[y,m]),inside:w,alias:"class-name"},"constructor-invocation":{pattern:t("(\\bnew\\s+)<<0>>(?=\\s*[[({])",[y]),lookbehind:!0,inside:w,alias:"class-name"},"generic-method":{pattern:t("<<0>>\\s*<<1>>(?=\\s*\\()",[h,g]),inside:{function:t("^<<0>>",[h]),generic:{pattern:RegExp(g),alias:"class-name",inside:w}}},"type-list":{pattern:t("\\b((?:<<0>>\\s+<<1>>|where\\s+<<2>>)\\s*:\\s*)(?:<<3>>|<<4>>)(?:\\s*,\\s*(?:<<3>>|<<4>>))*(?=\\s*(?:where|[{;]|=>|$))",[d,f,h,y,p.source]),lookbehind:!0,inside:{keyword:p,"class-name":{pattern:RegExp(y),inside:w},punctuation:/,/}},preprocessor:{pattern:/(^\s*)#.*/m,lookbehind:!0,alias:"property",inside:{directive:{pattern:/(\s*#)\b(?:define|elif|else|endif|endregion|error|if|line|pragma|region|undef|warning)\b/,lookbehind:!0,alias:"keyword"}}}});var $=x+"|"+v,_=a("\\/(?![*/])|\\/\\/[^\r\\n]*[\r\\n]|\\/\\*[\\s\\S]*?\\*\\/|<<0>>",[$]),B=e(a("[^\"'/()]|<<0>>|\\(<>*\\)",[_]),2),E="\\b(?:assembly|event|field|method|module|param|property|return|type)\\b",R=a("<<0>>(?:\\s*\\(<<1>>*\\))?",[m,B]);s.languages.insertBefore("csharp","class-name",{attribute:{pattern:t("((?:^|[^\\s\\w>)?])\\s*\\[\\s*)(?:<<0>>\\s*:\\s*)?<<1>>(?:\\s*,\\s*<<1>>)*(?=\\s*\\])",[E,R]),lookbehind:!0,greedy:!0,inside:{target:{pattern:t("^<<0>>(?=\\s*:)",[E]),alias:"keyword"},"attribute-arguments":{pattern:t("\\(<<0>>*\\)",[B]),inside:s.languages.csharp},"class-name":{pattern:RegExp(m),inside:{punctuation:/\./}},punctuation:/[:,]/}}});var S=":[^}\r\\n]+",P=e(a("[^\"'/()]|<<0>>|\\(<>*\\)",[_]),2),z=a("\\{(?!\\{)(?:(?![}:])<<0>>)*<<1>>?\\}",[P,S]),j=e(a("[^\"'/()]|\\/(?!\\*)|\\/\\*.*?\\*\\/|<<0>>|\\(<>*\\)",[$]),2),A=a("\\{(?!\\{)(?:(?![}:])<<0>>)*<<1>>?\\}",[j,S]);function F(e,n){return{interpolation:{pattern:t("([^{](?:\\{\\{)*)<<0>>",[e]),lookbehind:!0,inside:{"format-string":{pattern:t("(^\\{(?:(?![}:])<<0>>)*)<<1>>(?=\\}$)",[n,S]),lookbehind:!0,inside:{punctuation:/^:/}},punctuation:/^\{|\}$/,expression:{pattern:/[\s\S]+/,alias:"language-csharp",inside:s.languages.csharp}}},string:/[\s\S]+/}}s.languages.insertBefore("csharp","string",{"interpolation-string":[{pattern:t('(^|[^\\\\])(?:\\$@|@\\$)"(?:""|\\\\[\\s\\S]|\\{\\{|<<0>>|[^\\\\{"])*"',[z]),lookbehind:!0,greedy:!0,inside:F(z,P)},{pattern:t('(^|[^@\\\\])\\$"(?:\\\\.|\\{\\{|<<0>>|[^\\\\"{])*"',[A]),lookbehind:!0,greedy:!0,inside:F(A,j)}]})}(Prism),Prism.languages.dotnet=Prism.languages.cs=Prism.languages.csharp; \ No newline at end of file diff --git a/components/prism-ftl.js b/components/prism-ftl.js index 67269eecbc..90958f1f09 100644 --- a/components/prism-ftl.js +++ b/components/prism-ftl.js @@ -5,7 +5,7 @@ // FTL expression with 4 levels of nesting supported var FTL_EXPR = /(?!<#--)[^()"']|\((?:)*\)|<#--[\s\S]*?-->|"(?:[^\\"]|\\.)*"|'(?:[^\\']|\\.)*'/.source; for (var i = 0; i < 2; i++) { - FTL_EXPR = FTL_EXPR.replace(//g, FTL_EXPR); + FTL_EXPR = FTL_EXPR.replace(//g, function () { return FTL_EXPR; }); } FTL_EXPR = FTL_EXPR.replace(//g, '[^\s\S]'); @@ -18,11 +18,11 @@ greedy: true }, { - pattern: RegExp(/("|')(?:(?!\1|\$\{)[^\\]|\\.|\$\{(?:)*?\})*\1/.source.replace(//g, FTL_EXPR)), + pattern: RegExp(/("|')(?:(?!\1|\$\{)[^\\]|\\.|\$\{(?:)*?\})*\1/.source.replace(//g, function () { return FTL_EXPR; })), greedy: true, inside: { 'interpolation': { - pattern: RegExp(/((?:^|[^\\])(?:\\\\)*)\$\{(?:)*?\}/.source.replace(//g, FTL_EXPR)), + pattern: RegExp(/((?:^|[^\\])(?:\\\\)*)\$\{(?:)*?\}/.source.replace(//g, function () { return FTL_EXPR; })), lookbehind: true, inside: { 'interpolation-punctuation': { @@ -86,7 +86,7 @@ }; Prism.hooks.add('before-tokenize', function (env) { - var pattern = RegExp(/<#--[\s\S]*?-->|<\/?[#@][a-zA-Z](?:)*?>|\$\{(?:)*?\}/.source.replace(//g, FTL_EXPR), 'gi'); + var pattern = RegExp(/<#--[\s\S]*?-->|<\/?[#@][a-zA-Z](?:)*?>|\$\{(?:)*?\}/.source.replace(//g, function () { return FTL_EXPR; }), 'gi'); Prism.languages['markup-templating'].buildPlaceholders(env, 'ftl', pattern); }); diff --git a/components/prism-ftl.min.js b/components/prism-ftl.min.js index 53324c7aaa..03c230757e 100644 --- a/components/prism-ftl.min.js +++ b/components/prism-ftl.min.js @@ -1 +1 @@ -!function(n){for(var a="(?!<#--)[^()\"']|\\((?:)*\\)|<#--[\\s\\S]*?--\x3e|\"(?:[^\\\\\"]|\\\\.)*\"|'(?:[^\\\\']|\\\\.)*'",e=0;e<2;e++)a=a.replace(//g,a);a=a.replace(//g,"[^sS]");var t={comment:/<#--[\s\S]*?-->/,string:[{pattern:/\br("|')(?:(?!\1)[^\\]|\\.)*\1/,greedy:!0},{pattern:RegExp("(\"|')(?:(?!\\1|\\$\\{)[^\\\\]|\\\\.|\\$\\{(?:)*?\\})*\\1".replace(//g,a)),greedy:!0,inside:{interpolation:{pattern:RegExp("((?:^|[^\\\\])(?:\\\\\\\\)*)\\$\\{(?:)*?\\}".replace(//g,a)),lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:null}}}}],keyword:/\b(?:as)\b/,boolean:/\b(?:true|false)\b/,"builtin-function":{pattern:/((?:^|[^?])\?\s*)\w+/,lookbehind:!0,alias:"function"},function:/\w+(?=\s*\()/,number:/\d+(?:\.\d+)?/,operator:/\.\.[<*!]?|->|--|\+\+|&&|\|\||\?{1,2}|[-+*/%!=<>]=?|\b(?:gt|gte|lt|lte)\b/,punctuation:/[,;.:()[\]{}]/};t.string[1].inside.interpolation.inside.rest=t,n.languages.ftl={"ftl-comment":{pattern:/^<#--[\s\S]*/,alias:"comment"},"ftl-directive":{pattern:/^<[\s\S]+>$/,inside:{directive:{pattern:/(^<\/?)[#@][a-z]\w*/i,lookbehind:!0,alias:"keyword"},punctuation:/^<\/?|\/?>$/,content:{pattern:/[\s\S]*\S[\s\S]*/,alias:"ftl",inside:t}}},"ftl-interpolation":{pattern:/^\$\{[\s\S]*\}$/,inside:{punctuation:/^\$\{|\}$/,content:{pattern:/[\s\S]*\S[\s\S]*/,alias:"ftl",inside:t}}}},n.hooks.add("before-tokenize",function(e){var t=RegExp("<#--[\\s\\S]*?--\x3e|<\\/?[#@][a-zA-Z](?:)*?>|\\$\\{(?:)*?\\}".replace(//g,a),"gi");n.languages["markup-templating"].buildPlaceholders(e,"ftl",t)}),n.hooks.add("after-tokenize",function(e){n.languages["markup-templating"].tokenizePlaceholders(e,"ftl")})}(Prism); \ No newline at end of file +!function(n){for(var i="(?!<#--)[^()\"']|\\((?:)*\\)|<#--[\\s\\S]*?--\x3e|\"(?:[^\\\\\"]|\\\\.)*\"|'(?:[^\\\\']|\\\\.)*'",e=0;e<2;e++)i=i.replace(//g,function(){return i});i=i.replace(//g,"[^sS]");var t={comment:/<#--[\s\S]*?-->/,string:[{pattern:/\br("|')(?:(?!\1)[^\\]|\\.)*\1/,greedy:!0},{pattern:RegExp("(\"|')(?:(?!\\1|\\$\\{)[^\\\\]|\\\\.|\\$\\{(?:)*?\\})*\\1".replace(//g,function(){return i})),greedy:!0,inside:{interpolation:{pattern:RegExp("((?:^|[^\\\\])(?:\\\\\\\\)*)\\$\\{(?:)*?\\}".replace(//g,function(){return i})),lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:null}}}}],keyword:/\b(?:as)\b/,boolean:/\b(?:true|false)\b/,"builtin-function":{pattern:/((?:^|[^?])\?\s*)\w+/,lookbehind:!0,alias:"function"},function:/\w+(?=\s*\()/,number:/\d+(?:\.\d+)?/,operator:/\.\.[<*!]?|->|--|\+\+|&&|\|\||\?{1,2}|[-+*/%!=<>]=?|\b(?:gt|gte|lt|lte)\b/,punctuation:/[,;.:()[\]{}]/};t.string[1].inside.interpolation.inside.rest=t,n.languages.ftl={"ftl-comment":{pattern:/^<#--[\s\S]*/,alias:"comment"},"ftl-directive":{pattern:/^<[\s\S]+>$/,inside:{directive:{pattern:/(^<\/?)[#@][a-z]\w*/i,lookbehind:!0,alias:"keyword"},punctuation:/^<\/?|\/?>$/,content:{pattern:/[\s\S]*\S[\s\S]*/,alias:"ftl",inside:t}}},"ftl-interpolation":{pattern:/^\$\{[\s\S]*\}$/,inside:{punctuation:/^\$\{|\}$/,content:{pattern:/[\s\S]*\S[\s\S]*/,alias:"ftl",inside:t}}}},n.hooks.add("before-tokenize",function(e){var t=RegExp("<#--[\\s\\S]*?--\x3e|<\\/?[#@][a-zA-Z](?:)*?>|\\$\\{(?:)*?\\}".replace(//g,function(){return i}),"gi");n.languages["markup-templating"].buildPlaceholders(e,"ftl",t)}),n.hooks.add("after-tokenize",function(e){n.languages["markup-templating"].tokenizePlaceholders(e,"ftl")})}(Prism); \ No newline at end of file diff --git a/components/prism-haml.js b/components/prism-haml.js index 822bca1e3d..8ac9900ade 100644 --- a/components/prism-haml.js +++ b/components/prism-haml.js @@ -124,7 +124,7 @@ filter = typeof filter === 'string' ? {filter: filter, language: filter} : filter; if (Prism.languages[filter.language]) { all_filters['filter-' + filter.filter] = { - pattern: RegExp(filter_pattern.replace('{{filter_name}}', filter.filter)), + pattern: RegExp(filter_pattern.replace('{{filter_name}}', function () { return filter.filter; })), lookbehind: true, inside: { 'filter-name': { diff --git a/components/prism-haml.min.js b/components/prism-haml.min.js index 727d0401f2..86a04dcc11 100644 --- a/components/prism-haml.min.js +++ b/components/prism-haml.min.js @@ -1 +1 @@ -!function(e){e.languages.haml={"multiline-comment":{pattern:/((?:^|\r?\n|\r)([\t ]*))(?:\/|-#).*(?:(?:\r?\n|\r)\2[\t ]+.+)*/,lookbehind:!0,alias:"comment"},"multiline-code":[{pattern:/((?:^|\r?\n|\r)([\t ]*)(?:[~-]|[&!]?=)).*,[\t ]*(?:(?:\r?\n|\r)\2[\t ]+.*,[\t ]*)*(?:(?:\r?\n|\r)\2[\t ]+.+)/,lookbehind:!0,inside:e.languages.ruby},{pattern:/((?:^|\r?\n|\r)([\t ]*)(?:[~-]|[&!]?=)).*\|[\t ]*(?:(?:\r?\n|\r)\2[\t ]+.*\|[\t ]*)*/,lookbehind:!0,inside:e.languages.ruby}],filter:{pattern:/((?:^|\r?\n|\r)([\t ]*)):[\w-]+(?:(?:\r?\n|\r)(?:\2[\t ]+.+|\s*?(?=\r?\n|\r)))+/,lookbehind:!0,inside:{"filter-name":{pattern:/^:[\w-]+/,alias:"variable"}}},markup:{pattern:/((?:^|\r?\n|\r)[\t ]*)<.+/,lookbehind:!0,inside:e.languages.markup},doctype:{pattern:/((?:^|\r?\n|\r)[\t ]*)!!!(?: .+)?/,lookbehind:!0},tag:{pattern:/((?:^|\r?\n|\r)[\t ]*)[%.#][\w\-#.]*[\w\-](?:\([^)]+\)|\{(?:\{[^}]+\}|[^}])+\}|\[[^\]]+\])*[\/<>]*/,lookbehind:!0,inside:{attributes:[{pattern:/(^|[^#])\{(?:\{[^}]+\}|[^}])+\}/,lookbehind:!0,inside:e.languages.ruby},{pattern:/\([^)]+\)/,inside:{"attr-value":{pattern:/(=\s*)(?:"(?:\\.|[^\\"\r\n])*"|[^)\s]+)/,lookbehind:!0},"attr-name":/[\w:-]+(?=\s*!?=|\s*[,)])/,punctuation:/[=(),]/}},{pattern:/\[[^\]]+\]/,inside:e.languages.ruby}],punctuation:/[<>]/}},code:{pattern:/((?:^|\r?\n|\r)[\t ]*(?:[~-]|[&!]?=)).+/,lookbehind:!0,inside:e.languages.ruby},interpolation:{pattern:/#\{[^}]+\}/,inside:{delimiter:{pattern:/^#\{|\}$/,alias:"punctuation"},rest:e.languages.ruby}},punctuation:{pattern:/((?:^|\r?\n|\r)[\t ]*)[~=\-&!]+/,lookbehind:!0}};for(var t=["css",{filter:"coffee",language:"coffeescript"},"erb","javascript","less","markdown","ruby","scss","textile"],n={},r=0,a=t.length;r]*/,lookbehind:!0,inside:{attributes:[{pattern:/(^|[^#])\{(?:\{[^}]+\}|[^}])+\}/,lookbehind:!0,inside:e.languages.ruby},{pattern:/\([^)]+\)/,inside:{"attr-value":{pattern:/(=\s*)(?:"(?:\\.|[^\\"\r\n])*"|[^)\s]+)/,lookbehind:!0},"attr-name":/[\w:-]+(?=\s*!?=|\s*[,)])/,punctuation:/[=(),]/}},{pattern:/\[[^\]]+\]/,inside:e.languages.ruby}],punctuation:/[<>]/}},code:{pattern:/((?:^|\r?\n|\r)[\t ]*(?:[~-]|[&!]?=)).+/,lookbehind:!0,inside:e.languages.ruby},interpolation:{pattern:/#\{[^}]+\}/,inside:{delimiter:{pattern:/^#\{|\}$/,alias:"punctuation"},rest:e.languages.ruby}},punctuation:{pattern:/((?:^|\r?\n|\r)[\t ]*)[~=\-&!]+/,lookbehind:!0}};for(var t=["css",{filter:"coffee",language:"coffeescript"},"erb","javascript","less","markdown","ruby","scss","textile"],n={},r=0,a=t.length;r]?=|\?\/\/|\/\/=?|[-+*/%]=?|[<>?]|\b(?:and|or|not)\b/],"c-style-function":{pattern:/\b[a-z_]\w*(?=\s*\()/i,alias:"function"},punctuation:/::|[()\[\]{},:;]|\.(?=\s*[\[\w$])/,dot:{pattern:/\./,alias:"important"}};i.interpolation.inside.content.inside=a}(Prism); \ No newline at end of file +!function(e){var n="\\\\\\((?:[^()]|\\([^()]*\\))*\\)",t=RegExp('"(?:[^"\r\\n\\\\]|\\\\[^\r\\n(]|__)*"'.replace(/__/g,function(){return n})),i={interpolation:{pattern:RegExp("((?:^|[^\\\\])(?:\\\\{2})*)"+n),lookbehind:!0,inside:{content:{pattern:/^(\\\()[\s\S]+(?=\)$)/,lookbehind:!0,inside:null},punctuation:/^\\\(|\)$/}}},a=e.languages.jq={comment:/#.*/,property:{pattern:RegExp(t.source+"(?=\\s*:(?!:))"),greedy:!0,inside:i},string:{pattern:t,greedy:!0,inside:i},function:{pattern:/(\bdef\s+)[a-z_]\w+/i,lookbehind:!0},variable:/\B\$\w+/,"property-literal":{pattern:/[a-z_]\w*(?=\s*:(?!:))/i,alias:"property"},keyword:/\b(?:as|break|catch|def|elif|else|end|foreach|if|import|include|label|module|modulemeta|null|reduce|then|try|while)\b/,boolean:/\b(?:true|false)\b/,number:/(?:\b\d+\.|\B\.)?\d+(?:[eE][+-]?\d+)?\b/,operator:[{pattern:/\|=?/,alias:"pipe"},/\.\.|[!=<>]?=|\?\/\/|\/\/=?|[-+*/%]=?|[<>?]|\b(?:and|or|not)\b/],"c-style-function":{pattern:/\b[a-z_]\w*(?=\s*\()/i,alias:"function"},punctuation:/::|[()\[\]{},:;]|\.(?=\s*[\[\w$])/,dot:{pattern:/\./,alias:"important"}};i.interpolation.inside.content.inside=a}(Prism); \ No newline at end of file diff --git a/components/prism-lilypond.js b/components/prism-lilypond.js index 0e02fd0e9d..0d587b75a6 100644 --- a/components/prism-lilypond.js +++ b/components/prism-lilypond.js @@ -5,7 +5,7 @@ // For some reason, this can't be 4 var recursivenessLog2 = 5; for (var i = 0; i < recursivenessLog2; i++) { - schemeExpression = schemeExpression.replace(//g, schemeExpression); + schemeExpression = schemeExpression.replace(//g, function () { return schemeExpression; }); } schemeExpression = schemeExpression.replace(//g, /[^\s\S]/.source); @@ -13,7 +13,7 @@ var lilypond = Prism.languages.lilypond = { 'comment': /%(?:(?!\{).*|\{[\s\S]*?%\})/, 'embedded-scheme': { - pattern: RegExp(/(^|[=\s])#(?:"(?:[^"\\]|\\.)*"|[^\s()"]*(?:[^\s()]|))/.source.replace(//g, schemeExpression), 'm'), + pattern: RegExp(/(^|[=\s])#(?:"(?:[^"\\]|\\.)*"|[^\s()"]*(?:[^\s()]|))/.source.replace(//g, function () { return schemeExpression; }), 'm'), lookbehind: true, greedy: true, inside: { diff --git a/components/prism-lilypond.min.js b/components/prism-lilypond.min.js index 72bb5baf83..2101047089 100644 --- a/components/prism-lilypond.min.js +++ b/components/prism-lilypond.min.js @@ -1 +1 @@ -!function(e){for(var n='\\((?:[^();"#\\\\]|\\\\[\\s\\S]|;.*|"(?:[^"\\\\]|\\\\.)*"|#(?:\\{(?:(?!#\\})[\\s\\S])*#\\}|[^{])|)*\\)',d=0;d<5;d++)n=n.replace(//g,n);n=n.replace(//g,"[^\\s\\S]");var i=e.languages.lilypond={comment:/%(?:(?!\{).*|\{[\s\S]*?%\})/,"embedded-scheme":{pattern:RegExp('(^|[=\\s])#(?:"(?:[^"\\\\]|\\\\.)*"|[^\\s()"]*(?:[^\\s()]|))'.replace(//g,n),"m"),lookbehind:!0,greedy:!0,inside:{scheme:{pattern:/^(#)[\s\S]+$/,lookbehind:!0,alias:"language-scheme",inside:{"embedded-lilypond":{pattern:/#\{[\s\S]*?#\}/,greedy:!0,inside:{punctuation:/^#\{|#\}$/,lilypond:{pattern:/[\s\S]+/,alias:"language-lilypond",inside:null}}},rest:e.languages.scheme}},punctuation:/#/}},string:{pattern:/"(?:[^"\\]|\\.)*"/,greedy:!0},"class-name":{pattern:/(\\new\s+)[\w-]+/,lookbehind:!0},keyword:{pattern:/\\[a-z][-\w]*/i,inside:{punctuation:/^\\/}},operator:/[=|]|<<|>>/,punctuation:{pattern:/(^|[a-z\d])(?:'+|,+|[_^]?-[_^]?(?:[-+^!>._]|(?=\d))|[_^]\.?|[.!])|[{}()[\]<>^~]|\\[()[\]<>\\!]|--|__/,lookbehind:!0},number:/\b\d+(?:\/\d+)?\b/};i["embedded-scheme"].inside.scheme.inside["embedded-lilypond"].inside.lilypond.inside=i,e.languages.ly=i}(Prism); \ No newline at end of file +!function(e){for(var n='\\((?:[^();"#\\\\]|\\\\[\\s\\S]|;.*|"(?:[^"\\\\]|\\\\.)*"|#(?:\\{(?:(?!#\\})[\\s\\S])*#\\}|[^{])|)*\\)',i=0;i<5;i++)n=n.replace(//g,function(){return n});n=n.replace(//g,"[^\\s\\S]");var d=e.languages.lilypond={comment:/%(?:(?!\{).*|\{[\s\S]*?%\})/,"embedded-scheme":{pattern:RegExp('(^|[=\\s])#(?:"(?:[^"\\\\]|\\\\.)*"|[^\\s()"]*(?:[^\\s()]|))'.replace(//g,function(){return n}),"m"),lookbehind:!0,greedy:!0,inside:{scheme:{pattern:/^(#)[\s\S]+$/,lookbehind:!0,alias:"language-scheme",inside:{"embedded-lilypond":{pattern:/#\{[\s\S]*?#\}/,greedy:!0,inside:{punctuation:/^#\{|#\}$/,lilypond:{pattern:/[\s\S]+/,alias:"language-lilypond",inside:null}}},rest:e.languages.scheme}},punctuation:/#/}},string:{pattern:/"(?:[^"\\]|\\.)*"/,greedy:!0},"class-name":{pattern:/(\\new\s+)[\w-]+/,lookbehind:!0},keyword:{pattern:/\\[a-z][-\w]*/i,inside:{punctuation:/^\\/}},operator:/[=|]|<<|>>/,punctuation:{pattern:/(^|[a-z\d])(?:'+|,+|[_^]?-[_^]?(?:[-+^!>._]|(?=\d))|[_^]\.?|[.!])|[{}()[\]<>^~]|\\[()[\]<>\\!]|--|__/,lookbehind:!0},number:/\b\d+(?:\/\d+)?\b/};d["embedded-scheme"].inside.scheme.inside["embedded-lilypond"].inside.lilypond.inside=d,e.languages.ly=d}(Prism); \ No newline at end of file diff --git a/components/prism-markdown.js b/components/prism-markdown.js index f28ea9c404..8259fd919e 100644 --- a/components/prism-markdown.js +++ b/components/prism-markdown.js @@ -15,7 +15,7 @@ * @returns {RegExp} */ function createInline(pattern, starAlternative) { - pattern = pattern.replace(//g, inner); + pattern = pattern.replace(//g, function () { return inner; }); if (starAlternative) { pattern = pattern + '|' + pattern.replace(/_/g, '\\*'); } @@ -24,7 +24,7 @@ var tableCell = /(?:\\.|``.+?``|`[^`\r\n]+`|[^\\|\r\n`])+/.source; - var tableRow = /\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|$)/.source.replace(/__/g, tableCell); + var tableRow = /\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|$)/.source.replace(/__/g, function () { return tableCell; }); var tableLine = /\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source; diff --git a/components/prism-markdown.min.js b/components/prism-markdown.min.js index 86df531e79..8540b3dc9f 100644 --- a/components/prism-markdown.min.js +++ b/components/prism-markdown.min.js @@ -1 +1 @@ -!function(d){function n(n,e){return n=n.replace(//g,"(?:\\\\.|[^\\\\\\n\r]|(?:\n|\r\\n?)(?!\n|\r\\n?))"),e&&(n=n+"|"+n.replace(/_/g,"\\*")),RegExp("((?:^|[^\\\\])(?:\\\\{2})*)(?:"+n+")")}var e="(?:\\\\.|``.+?``|`[^`\r\\n]+`|[^\\\\|\r\\n`])+",t="\\|?__(?:\\|__)+\\|?(?:(?:\n|\r\\n?)|$)".replace(/__/g,e),a="\\|?[ \t]*:?-{3,}:?[ \t]*(?:\\|[ \t]*:?-{3,}:?[ \t]*)+\\|?(?:\n|\r\\n?)";d.languages.markdown=d.languages.extend("markup",{}),d.languages.insertBefore("markdown","prolog",{blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+t+a+"(?:"+t+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+t+a+")(?:"+t+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(e),inside:d.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+t+")"+a+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+t+"$"),inside:{"table-header":{pattern:RegExp(e),alias:"important",inside:d.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/``.+?``|`[^`\r\n]+`/,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#+.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n("__(?:(?!_)|_(?:(?!_))+_)+__",!0),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n("_(?:(?!_)|__(?:(?!_))+__)+_",!0),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n("(~~?)(?:(?!~))+?\\2",!1),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},url:{pattern:n('!?\\[(?:(?!\\]))+\\](?:\\([^\\s)]+(?:[\t ]+"(?:\\\\.|[^"\\\\])*")?\\)| ?\\[(?:(?!\\]))+\\])',!1),lookbehind:!0,greedy:!0,inside:{variable:{pattern:/(\[)[^\]]+(?=\]$)/,lookbehind:!0},content:{pattern:/(^!?\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},string:{pattern:/"(?:\\.|[^"\\])*"(?=\)$)/}}}}),["url","bold","italic","strike"].forEach(function(e){["url","bold","italic","strike"].forEach(function(n){e!==n&&(d.languages.markdown[e].inside.content.inside[n]=d.languages.markdown[n])})}),d.hooks.add("after-tokenize",function(n){"markdown"!==n.language&&"md"!==n.language||!function n(e){if(e&&"string"!=typeof e)for(var t=0,a=e.length;t/g,function(){return"(?:\\\\.|[^\\\\\\n\r]|(?:\n|\r\\n?)(?!\n|\r\\n?))"}),e&&(n=n+"|"+n.replace(/_/g,"\\*")),RegExp("((?:^|[^\\\\])(?:\\\\{2})*)(?:"+n+")")}var e="(?:\\\\.|``.+?``|`[^`\r\\n]+`|[^\\\\|\r\\n`])+",t="\\|?__(?:\\|__)+\\|?(?:(?:\n|\r\\n?)|$)".replace(/__/g,function(){return e}),a="\\|?[ \t]*:?-{3,}:?[ \t]*(?:\\|[ \t]*:?-{3,}:?[ \t]*)+\\|?(?:\n|\r\\n?)";d.languages.markdown=d.languages.extend("markup",{}),d.languages.insertBefore("markdown","prolog",{blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+t+a+"(?:"+t+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+t+a+")(?:"+t+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(e),inside:d.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+t+")"+a+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+t+"$"),inside:{"table-header":{pattern:RegExp(e),alias:"important",inside:d.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/``.+?``|`[^`\r\n]+`/,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#+.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n("__(?:(?!_)|_(?:(?!_))+_)+__",!0),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n("_(?:(?!_)|__(?:(?!_))+__)+_",!0),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n("(~~?)(?:(?!~))+?\\2",!1),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},url:{pattern:n('!?\\[(?:(?!\\]))+\\](?:\\([^\\s)]+(?:[\t ]+"(?:\\\\.|[^"\\\\])*")?\\)| ?\\[(?:(?!\\]))+\\])',!1),lookbehind:!0,greedy:!0,inside:{variable:{pattern:/(\[)[^\]]+(?=\]$)/,lookbehind:!0},content:{pattern:/(^!?\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},string:{pattern:/"(?:\\.|[^"\\])*"(?=\)$)/}}}}),["url","bold","italic","strike"].forEach(function(e){["url","bold","italic","strike"].forEach(function(n){e!==n&&(d.languages.markdown[e].inside.content.inside[n]=d.languages.markdown[n])})}),d.hooks.add("after-tokenize",function(n){"markdown"!==n.language&&"md"!==n.language||!function n(e){if(e&&"string"!=typeof e)for(var t=0,a=e.length;t)(?:\s*|[\s\S])*?(?=<\/__>)/.source.replace(/__/g, tagName), 'i'), + pattern: RegExp(/(<__[\s\S]*?>)(?:\s*|[\s\S])*?(?=<\/__>)/.source.replace(/__/g, function () { return tagName; }), 'i'), lookbehind: true, greedy: true, inside: inside diff --git a/components/prism-markup.min.js b/components/prism-markup.min.js index 6a82a7306c..ac113b2d8a 100644 --- a/components/prism-markup.min.js +++ b/components/prism-markup.min.js @@ -1 +1 @@ -Prism.languages.markup={comment://,prolog:/<\?[\s\S]+?\?>/,doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:(?!)*\]\s*)?>/i,greedy:!0},cdata://i,tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/i,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/i,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/i,inside:{punctuation:[/^=/,{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:/&#?[\da-z]{1,8};/i},Prism.languages.markup.tag.inside["attr-value"].inside.entity=Prism.languages.markup.entity,Prism.hooks.add("wrap",function(a){"entity"===a.type&&(a.attributes.title=a.content.replace(/&/,"&"))}),Object.defineProperty(Prism.languages.markup.tag,"addInlined",{value:function(a,e){var s={};s["language-"+e]={pattern:/(^$)/i,lookbehind:!0,inside:Prism.languages[e]},s.cdata=/^$/i;var n={"included-cdata":{pattern://i,inside:s}};n["language-"+e]={pattern:/[\s\S]+/,inside:Prism.languages[e]};var t={};t[a]={pattern:RegExp("(<__[\\s\\S]*?>)(?:\\s*|[\\s\\S])*?(?=<\\/__>)".replace(/__/g,a),"i"),lookbehind:!0,greedy:!0,inside:n},Prism.languages.insertBefore("markup","cdata",t)}}),Prism.languages.xml=Prism.languages.extend("markup",{}),Prism.languages.html=Prism.languages.markup,Prism.languages.mathml=Prism.languages.markup,Prism.languages.svg=Prism.languages.markup; \ No newline at end of file +Prism.languages.markup={comment://,prolog:/<\?[\s\S]+?\?>/,doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:(?!)*\]\s*)?>/i,greedy:!0},cdata://i,tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/i,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/i,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/i,inside:{punctuation:[/^=/,{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:/&#?[\da-z]{1,8};/i},Prism.languages.markup.tag.inside["attr-value"].inside.entity=Prism.languages.markup.entity,Prism.hooks.add("wrap",function(a){"entity"===a.type&&(a.attributes.title=a.content.replace(/&/,"&"))}),Object.defineProperty(Prism.languages.markup.tag,"addInlined",{value:function(a,e){var s={};s["language-"+e]={pattern:/(^$)/i,lookbehind:!0,inside:Prism.languages[e]},s.cdata=/^$/i;var n={"included-cdata":{pattern://i,inside:s}};n["language-"+e]={pattern:/[\s\S]+/,inside:Prism.languages[e]};var t={};t[a]={pattern:RegExp("(<__[\\s\\S]*?>)(?:\\s*|[\\s\\S])*?(?=<\\/__>)".replace(/__/g,function(){return a}),"i"),lookbehind:!0,greedy:!0,inside:n},Prism.languages.insertBefore("markup","cdata",t)}}),Prism.languages.xml=Prism.languages.extend("markup",{}),Prism.languages.html=Prism.languages.markup,Prism.languages.mathml=Prism.languages.markup,Prism.languages.svg=Prism.languages.markup; \ No newline at end of file diff --git a/components/prism-pascaligo.js b/components/prism-pascaligo.js index af861526de..5e5eed033a 100644 --- a/components/prism-pascaligo.js +++ b/components/prism-pascaligo.js @@ -3,7 +3,7 @@ // Pascaligo is a layer 2 smart contract language for the tezos blockchain var braces = /\((?:[^()]|\((?:[^()]|\([^()]*\))*\))*\)/.source; - var type = /(?:\w+(?:)?|)/.source.replace(//g, braces); + var type = /(?:\w+(?:)?|)/.source.replace(//g, function () { return braces; }); var pascaligo = Prism.languages.pascaligo = { 'comment': /\(\*[\s\S]+?\*\)|\/\/.*/, @@ -13,16 +13,16 @@ }, 'class-name': [ { - pattern: RegExp(/(\btype\s+\w+\s+is\s+)/.source.replace(//g, type), 'i'), + pattern: RegExp(/(\btype\s+\w+\s+is\s+)/.source.replace(//g, function () { return type; }), 'i'), lookbehind: true, inside: null // see below }, { - pattern: RegExp(/(?=\s+is\b)/.source.replace(//g, type), 'i'), + pattern: RegExp(/(?=\s+is\b)/.source.replace(//g, function () { return type; }), 'i'), inside: null // see below }, { - pattern: RegExp(/(:\s*)/.source.replace(//g, type)), + pattern: RegExp(/(:\s*)/.source.replace(//g, function () { return type; })), lookbehind: true, inside: null // see below } diff --git a/components/prism-pascaligo.min.js b/components/prism-pascaligo.min.js index d7277c1d64..fb1b154ffe 100644 --- a/components/prism-pascaligo.min.js +++ b/components/prism-pascaligo.min.js @@ -1 +1 @@ -!function(e){var n="(?:\\w+(?:)?|)".replace(//g,"\\((?:[^()]|\\((?:[^()]|\\([^()]*\\))*\\))*\\)"),i=e.languages.pascaligo={comment:/\(\*[\s\S]+?\*\)|\/\/.*/,string:{pattern:/(["'`])(?:\\[\s\S]|(?!\1)[^\\])*\1|\^[a-z]/i,greedy:!0},"class-name":[{pattern:RegExp("(\\btype\\s+\\w+\\s+is\\s+)".replace(//g,n),"i"),lookbehind:!0,inside:null},{pattern:RegExp("(?=\\s+is\\b)".replace(//g,n),"i"),inside:null},{pattern:RegExp("(:\\s*)".replace(//g,n)),lookbehind:!0,inside:null}],keyword:{pattern:/(^|[^&])\b(?:begin|block|case|const|else|end|fail|for|from|function|if|is|nil|of|remove|return|skip|then|type|var|while|with)\b/i,lookbehind:!0},boolean:{pattern:/(^|[^&])\b(?:True|False)\b/i,lookbehind:!0},builtin:{pattern:/(^|[^&])\b(?:bool|int|list|map|nat|record|string|unit)\b/i,lookbehind:!0},function:/\w+(?=\s*\()/i,number:[/%[01]+|&[0-7]+|\$[a-f\d]+/i,/\b\d+(?:\.\d+)?(?:e[+-]?\d+)?(?:mtz|n)?/i],operator:/->|=\/=|\.\.|\*\*|:=|<[<=>]?|>[>=]?|[+\-*\/]=?|[@^=|]|\b(?:and|mod|or)\b/,punctuation:/\(\.|\.\)|[()\[\]:;,.{}]/},t=["comment","keyword","builtin","operator","punctuation"].reduce(function(e,n){return e[n]=i[n],e},{});i["class-name"].forEach(function(e){e.inside=t})}(Prism); \ No newline at end of file +!function(e){var n="(?:\\w+(?:)?|)".replace(//g,function(){return"\\((?:[^()]|\\((?:[^()]|\\([^()]*\\))*\\))*\\)"}),t=e.languages.pascaligo={comment:/\(\*[\s\S]+?\*\)|\/\/.*/,string:{pattern:/(["'`])(?:\\[\s\S]|(?!\1)[^\\])*\1|\^[a-z]/i,greedy:!0},"class-name":[{pattern:RegExp("(\\btype\\s+\\w+\\s+is\\s+)".replace(//g,function(){return n}),"i"),lookbehind:!0,inside:null},{pattern:RegExp("(?=\\s+is\\b)".replace(//g,function(){return n}),"i"),inside:null},{pattern:RegExp("(:\\s*)".replace(//g,function(){return n})),lookbehind:!0,inside:null}],keyword:{pattern:/(^|[^&])\b(?:begin|block|case|const|else|end|fail|for|from|function|if|is|nil|of|remove|return|skip|then|type|var|while|with)\b/i,lookbehind:!0},boolean:{pattern:/(^|[^&])\b(?:True|False)\b/i,lookbehind:!0},builtin:{pattern:/(^|[^&])\b(?:bool|int|list|map|nat|record|string|unit)\b/i,lookbehind:!0},function:/\w+(?=\s*\()/i,number:[/%[01]+|&[0-7]+|\$[a-f\d]+/i,/\b\d+(?:\.\d+)?(?:e[+-]?\d+)?(?:mtz|n)?/i],operator:/->|=\/=|\.\.|\*\*|:=|<[<=>]?|>[>=]?|[+\-*\/]=?|[@^=|]|\b(?:and|mod|or)\b/,punctuation:/\(\.|\.\)|[()\[\]:;,.{}]/},i=["comment","keyword","builtin","operator","punctuation"].reduce(function(e,n){return e[n]=t[n],e},{});t["class-name"].forEach(function(e){e.inside=i})}(Prism); \ No newline at end of file diff --git a/components/prism-pug.js b/components/prism-pug.js index c97008a18e..b1ecd942a3 100644 --- a/components/prism-pug.js +++ b/components/prism-pug.js @@ -163,7 +163,7 @@ filter = typeof filter === 'string' ? {filter: filter, language: filter} : filter; if (Prism.languages[filter.language]) { all_filters['filter-' + filter.filter] = { - pattern: RegExp(filter_pattern.replace('{{filter_name}}', filter.filter), 'm'), + pattern: RegExp(filter_pattern.replace('{{filter_name}}', function () { return filter.filter; }), 'm'), lookbehind: true, inside: { 'filter-name': { diff --git a/components/prism-pug.min.js b/components/prism-pug.min.js index 4960d627d5..b116e79089 100644 --- a/components/prism-pug.min.js +++ b/components/prism-pug.min.js @@ -1 +1 @@ -!function(e){e.languages.pug={comment:{pattern:/(^([\t ]*))\/\/.*(?:(?:\r?\n|\r)\2[\t ]+.+)*/m,lookbehind:!0},"multiline-script":{pattern:/(^([\t ]*)script\b.*\.[\t ]*)(?:(?:\r?\n|\r(?!\n))(?:\2[\t ]+.+|\s*?(?=\r?\n|\r)))+/m,lookbehind:!0,inside:e.languages.javascript},filter:{pattern:/(^([\t ]*)):.+(?:(?:\r?\n|\r(?!\n))(?:\2[\t ]+.+|\s*?(?=\r?\n|\r)))+/m,lookbehind:!0,inside:{"filter-name":{pattern:/^:[\w-]+/,alias:"variable"}}},"multiline-plain-text":{pattern:/(^([\t ]*)[\w\-#.]+\.[\t ]*)(?:(?:\r?\n|\r(?!\n))(?:\2[\t ]+.+|\s*?(?=\r?\n|\r)))+/m,lookbehind:!0},markup:{pattern:/(^[\t ]*)<.+/m,lookbehind:!0,inside:e.languages.markup},doctype:{pattern:/((?:^|\n)[\t ]*)doctype(?: .+)?/,lookbehind:!0},"flow-control":{pattern:/(^[\t ]*)(?:if|unless|else|case|when|default|each|while)\b(?: .+)?/m,lookbehind:!0,inside:{each:{pattern:/^each .+? in\b/,inside:{keyword:/\b(?:each|in)\b/,punctuation:/,/}},branch:{pattern:/^(?:if|unless|else|case|when|default|while)\b/,alias:"keyword"},rest:e.languages.javascript}},keyword:{pattern:/(^[\t ]*)(?:block|extends|include|append|prepend)\b.+/m,lookbehind:!0},mixin:[{pattern:/(^[\t ]*)mixin .+/m,lookbehind:!0,inside:{keyword:/^mixin/,function:/\w+(?=\s*\(|\s*$)/,punctuation:/[(),.]/}},{pattern:/(^[\t ]*)\+.+/m,lookbehind:!0,inside:{name:{pattern:/^\+\w+/,alias:"function"},rest:e.languages.javascript}}],script:{pattern:/(^[\t ]*script(?:(?:&[^(]+)?\([^)]+\))*[\t ]+).+/m,lookbehind:!0,inside:e.languages.javascript},"plain-text":{pattern:/(^[\t ]*(?!-)[\w\-#.]*[\w\-](?:(?:&[^(]+)?\([^)]+\))*\/?[\t ]+).+/m,lookbehind:!0},tag:{pattern:/(^[\t ]*)(?!-)[\w\-#.]*[\w\-](?:(?:&[^(]+)?\([^)]+\))*\/?:?/m,lookbehind:!0,inside:{attributes:[{pattern:/&[^(]+\([^)]+\)/,inside:e.languages.javascript},{pattern:/\([^)]+\)/,inside:{"attr-value":{pattern:/(=\s*)(?:\{[^}]*\}|[^,)\r\n]+)/,lookbehind:!0,inside:e.languages.javascript},"attr-name":/[\w-]+(?=\s*!?=|\s*[,)])/,punctuation:/[!=(),]+/}}],punctuation:/:/}},code:[{pattern:/(^[\t ]*(?:-|!?=)).+/m,lookbehind:!0,inside:e.languages.javascript}],punctuation:/[.\-!=|]+/};for(var t=[{filter:"atpl",language:"twig"},{filter:"coffee",language:"coffeescript"},"ejs","handlebars","less","livescript","markdown",{filter:"sass",language:"scss"},"stylus"],n={},a=0,i=t.length;a|\/(?![*/])||\(*\)|\[*\]|\{*\}|\\[\s\S])/ - .source.replace(//g, jsString).replace(//g, jsComment); + .source.replace(//g, function () { return jsString; }).replace(//g, function () { return jsComment; }); // the pattern will blow up, so only a few iterations for (var i = 0; i < 2; i++) { - jsExpr = jsExpr.replace(//g, jsExpr); + jsExpr = jsExpr.replace(//g, function () { return jsExpr; }); } jsExpr = jsExpr.replace(//g, '[^\\s\\S]'); @@ -19,7 +19,7 @@ greedy: true }, 'javascript-function': { - pattern: RegExp(/((?:^|;)[ \t]*)function\s+[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*\s*\(*\)\s*\{*\}/.source.replace(//g, jsExpr), 'm'), + pattern: RegExp(/((?:^|;)[ \t]*)function\s+[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*\s*\(*\)\s*\{*\}/.source.replace(//g, function () { return jsExpr; }), 'm'), lookbehind: true, greedy: true, alias: 'language-javascript', @@ -44,7 +44,7 @@ } ], 'javascript-expression': { - pattern: RegExp(/(:[ \t]*)(?![\s;}[])(?:(?!$|[;}]))+/.source.replace(//g, jsExpr), 'm'), + pattern: RegExp(/(:[ \t]*)(?![\s;}[])(?:(?!$|[;}]))+/.source.replace(//g, function () { return jsExpr; }), 'm'), lookbehind: true, greedy: true, alias: 'language-javascript', diff --git a/components/prism-qml.min.js b/components/prism-qml.min.js index b132137477..ac6e853e23 100644 --- a/components/prism-qml.min.js +++ b/components/prism-qml.min.js @@ -1 +1 @@ -!function(e){for(var r=/(?:[^\\()[\]{}"'/]||\/(?![*/])||\(*\)|\[*\]|\{*\}|\\[\s\S])/.source.replace(//g,"\"(?:\\\\.|[^\\\\\"\r\\n])*\"|'(?:\\\\.|[^\\\\'\r\\n])*'").replace(//g,"\\/\\/.*|\\/\\*(?:(?!\\*\\/)[\\s\\S])*\\*\\/"),t=0;t<2;t++)r=r.replace(//g,r);r=r.replace(//g,"[^\\s\\S]"),e.languages.qml={comment:{pattern:/\/\/.*|\/\*[\s\S]*?\*\//,greedy:!0},"javascript-function":{pattern:RegExp("((?:^|;)[ \t]*)function\\s+[_$a-zA-Z\\xA0-\\uFFFF][$\\w\\xA0-\\uFFFF]*\\s*\\(*\\)\\s*\\{*\\}".replace(//g,r),"m"),lookbehind:!0,greedy:!0,alias:"language-javascript",inside:e.languages.javascript},"class-name":{pattern:/((?:^|[:;])[ \t]*)(?!\d)\w+(?=[ \t]*\{|[ \t]+on\b)/m,lookbehind:!0},property:[{pattern:/((?:^|[;{])[ \t]*)(?!\d)\w+(?:\.\w+)*(?=[ \t]*:)/m,lookbehind:!0},{pattern:/((?:^|[;{])[ \t]*)property[ \t]+(?!\d)\w+(?:\.\w+)*[ \t]+(?!\d)\w+(?:\.\w+)*(?=[ \t]*:)/m,lookbehind:!0,inside:{keyword:/^property/,property:/\w+(?:\.\w+)*/}}],"javascript-expression":{pattern:RegExp("(:[ \t]*)(?![\\s;}[])(?:(?!$|[;}]))+".replace(//g,r),"m"),lookbehind:!0,greedy:!0,alias:"language-javascript",inside:e.languages.javascript},string:/"(?:\\.|[^\\"\r\n])*"/,keyword:/\b(?:as|import|on)\b/,punctuation:/[{}[\]:;,]/}}(Prism); \ No newline at end of file +!function(e){for(var r=/(?:[^\\()[\]{}"'/]||\/(?![*/])||\(*\)|\[*\]|\{*\}|\\[\s\S])/.source.replace(//g,function(){return"\"(?:\\\\.|[^\\\\\"\r\\n])*\"|'(?:\\\\.|[^\\\\'\r\\n])*'"}).replace(//g,function(){return"\\/\\/.*|\\/\\*(?:(?!\\*\\/)[\\s\\S])*\\*\\/"}),n=0;n<2;n++)r=r.replace(//g,function(){return r});r=r.replace(//g,"[^\\s\\S]"),e.languages.qml={comment:{pattern:/\/\/.*|\/\*[\s\S]*?\*\//,greedy:!0},"javascript-function":{pattern:RegExp("((?:^|;)[ \t]*)function\\s+[_$a-zA-Z\\xA0-\\uFFFF][$\\w\\xA0-\\uFFFF]*\\s*\\(*\\)\\s*\\{*\\}".replace(//g,function(){return r}),"m"),lookbehind:!0,greedy:!0,alias:"language-javascript",inside:e.languages.javascript},"class-name":{pattern:/((?:^|[:;])[ \t]*)(?!\d)\w+(?=[ \t]*\{|[ \t]+on\b)/m,lookbehind:!0},property:[{pattern:/((?:^|[;{])[ \t]*)(?!\d)\w+(?:\.\w+)*(?=[ \t]*:)/m,lookbehind:!0},{pattern:/((?:^|[;{])[ \t]*)property[ \t]+(?!\d)\w+(?:\.\w+)*[ \t]+(?!\d)\w+(?:\.\w+)*(?=[ \t]*:)/m,lookbehind:!0,inside:{keyword:/^property/,property:/\w+(?:\.\w+)*/}}],"javascript-expression":{pattern:RegExp("(:[ \t]*)(?![\\s;}[])(?:(?!$|[;}]))+".replace(//g,function(){return r}),"m"),lookbehind:!0,greedy:!0,alias:"language-javascript",inside:e.languages.javascript},string:/"(?:\\.|[^\\"\r\n])*"/,keyword:/\b(?:as|import|on)\b/,punctuation:/[{}[\]:;,]/}}(Prism); \ No newline at end of file diff --git a/components/prism-robotframework.js b/components/prism-robotframework.js index 439074fc20..ec0dd6a319 100644 --- a/components/prism-robotframework.js +++ b/components/prism-robotframework.js @@ -38,7 +38,7 @@ extendecInside['comment'] = comment; return { - pattern: RegExp(/^ ?\*{3}[ \t]*[ \t]*\*{3}(?:.|[\r\n](?!\*{3}))*/.source.replace(//g, name), 'im'), + pattern: RegExp(/^ ?\*{3}[ \t]*[ \t]*\*{3}(?:.|[\r\n](?!\*{3}))*/.source.replace(//g, function () { return name; }), 'im'), alias: 'section', inside: extendecInside }; diff --git a/components/prism-robotframework.min.js b/components/prism-robotframework.min.js index a5b4b2f480..6a91ae4b3a 100644 --- a/components/prism-robotframework.min.js +++ b/components/prism-robotframework.min.js @@ -1 +1 @@ -!function(t){var r={pattern:/(^[ \t]*| {2}|\t)#.*/m,lookbehind:!0,greedy:!0},o={pattern:/((?:^|[^\\])(?:\\{2})*)[$@&%]\{(?:[^{}\r\n]|\{[^{}\r\n]*\})*\}/,lookbehind:!0,inside:{punctuation:/^[$@&%]\{|\}$/}};function n(t,n){var e={"section-header":{pattern:/^ ?\*{3}.+?\*{3}/,alias:"keyword"}};for(var a in n)e[a]=n[a];return e.tag={pattern:/([\r\n](?: |\t)[ \t]*)\[[-\w]+\]/,lookbehind:!0,inside:{punctuation:/\[|\]/}},e.variable=o,e.comment=r,{pattern:RegExp("^ ?\\*{3}[ \t]*[ \t]*\\*{3}(?:.|[\r\\n](?!\\*{3}))*".replace(//g,t),"im"),alias:"section",inside:e}}var e={pattern:/(\[Documentation\](?: |\t)[ \t]*)(?![ \t]|#)(?:.|[ \t]*(?:\r\n?|\n)[ \t]*\.{3}[ \t]*)+/,lookbehind:!0,alias:"string"},a={pattern:/([\r\n] ?)(?!#)(?:\S(?:[ \t]\S)*)+/,lookbehind:!0,alias:"function",inside:{variable:o}},i={pattern:/([\r\n](?: |\t)[ \t]*)(?!\[|\.{3}|#)(?:\S(?:[ \t]\S)*)+/,lookbehind:!0,inside:{variable:o}};t.languages.robotframework={settings:n("Settings",{documentation:{pattern:/([\r\n] ?Documentation(?: |\t)[ \t]*)(?![ \t]|#)(?:.|[ \t]*(?:\r\n?|\n)[ \t]*\.{3}[ \t]*)+/,lookbehind:!0,alias:"string"},property:{pattern:/([\r\n] ?)(?!\.{3}|#)(?:\S(?:[ \t]\S)*)+/,lookbehind:!0}}),variables:n("Variables"),"test-cases":n("Test Cases",{"test-name":a,documentation:e,property:i}),keywords:n("Keywords",{"keyword-name":a,documentation:e,property:i}),tasks:n("Tasks",{"task-name":a,documentation:e,property:i}),comment:r},t.languages.robot=t.languages.robotframework}(Prism); \ No newline at end of file +!function(t){var r={pattern:/(^[ \t]*| {2}|\t)#.*/m,lookbehind:!0,greedy:!0},o={pattern:/((?:^|[^\\])(?:\\{2})*)[$@&%]\{(?:[^{}\r\n]|\{[^{}\r\n]*\})*\}/,lookbehind:!0,inside:{punctuation:/^[$@&%]\{|\}$/}};function n(t,n){var e={"section-header":{pattern:/^ ?\*{3}.+?\*{3}/,alias:"keyword"}};for(var a in n)e[a]=n[a];return e.tag={pattern:/([\r\n](?: |\t)[ \t]*)\[[-\w]+\]/,lookbehind:!0,inside:{punctuation:/\[|\]/}},e.variable=o,e.comment=r,{pattern:RegExp("^ ?\\*{3}[ \t]*[ \t]*\\*{3}(?:.|[\r\\n](?!\\*{3}))*".replace(//g,function(){return t}),"im"),alias:"section",inside:e}}var e={pattern:/(\[Documentation\](?: |\t)[ \t]*)(?![ \t]|#)(?:.|[ \t]*(?:\r\n?|\n)[ \t]*\.{3}[ \t]*)+/,lookbehind:!0,alias:"string"},a={pattern:/([\r\n] ?)(?!#)(?:\S(?:[ \t]\S)*)+/,lookbehind:!0,alias:"function",inside:{variable:o}},i={pattern:/([\r\n](?: |\t)[ \t]*)(?!\[|\.{3}|#)(?:\S(?:[ \t]\S)*)+/,lookbehind:!0,inside:{variable:o}};t.languages.robotframework={settings:n("Settings",{documentation:{pattern:/([\r\n] ?Documentation(?: |\t)[ \t]*)(?![ \t]|#)(?:.|[ \t]*(?:\r\n?|\n)[ \t]*\.{3}[ \t]*)+/,lookbehind:!0,alias:"string"},property:{pattern:/([\r\n] ?)(?!\.{3}|#)(?:\S(?:[ \t]\S)*)+/,lookbehind:!0}}),variables:n("Variables"),"test-cases":n("Test Cases",{"test-name":a,documentation:e,property:i}),keywords:n("Keywords",{"keyword-name":a,documentation:e,property:i}),tasks:n("Tasks",{"task-name":a,documentation:e,property:i}),comment:r},t.languages.robot=t.languages.robotframework}(Prism); \ No newline at end of file diff --git a/components/prism-sas.js b/components/prism-sas.js index 80ae9ed66a..c3479b0047 100644 --- a/components/prism-sas.js +++ b/components/prism-sas.js @@ -35,7 +35,7 @@ }; var args = { - 'function' : func, + 'function': func, 'arg-value': { pattern: /(\s*=\s*)[A-Z\.]+/i, lookbehind: true @@ -90,13 +90,13 @@ alias: 'keyword' }; - var actionSets = 'accessControl|cdm|aggregation|aStore|ruleMining|audio|autotune|bayesianNetClassifier|bioMedImage|boolRule|builtins|cardinality|sccasl|clustering|copula|countreg|dataDiscovery|dataPreprocess|dataSciencePilot|dataStep|decisionTree|deepLearn|deepNeural|varReduce|simSystem|ds2|deduplication|ecm|entityRes|espCluster|explainModel|factmac|fastKnn|fcmpact|fedSql|freqTab|gam|gleam|graphSemiSupLearn|gVarCluster|hiddenMarkovModel|hyperGroup|image|iml|ica|kernalPca|langModel|ldaTopic|sparseML|mlTools|mixed|modelPublishing|mbc|network|optNetwork|neuralNet|nonlinear|nmf|nonParametricBayes|optimization|panel|pls|percentile|pca|phreg|qkb|qlim|quantreg|recommend|tsReconcile|deepRnn|regression|reinforcementLearn|robustPca|sampling|sparkEmbeddedProcess|search(?:Analytics)?|sentimentAnalysis|sequence|configuration|session(?:Prop)?|severity|simple|smartData|sandwich|spatialreg|stabilityMonitoring|spc|loadStreams|svDataDescription|svm|table|conditionalRandomFields|text(?:Rule(?:Develop|Score)|Mining|Parse|Topic|Util|Filters|Frequency)|tsInfo|timeData|transpose|uniTimeSeries'; + var actionSets = /accessControl|cdm|aggregation|aStore|ruleMining|audio|autotune|bayesianNetClassifier|bioMedImage|boolRule|builtins|cardinality|sccasl|clustering|copula|countreg|dataDiscovery|dataPreprocess|dataSciencePilot|dataStep|decisionTree|deepLearn|deepNeural|varReduce|simSystem|ds2|deduplication|ecm|entityRes|espCluster|explainModel|factmac|fastKnn|fcmpact|fedSql|freqTab|gam|gleam|graphSemiSupLearn|gVarCluster|hiddenMarkovModel|hyperGroup|image|iml|ica|kernalPca|langModel|ldaTopic|sparseML|mlTools|mixed|modelPublishing|mbc|network|optNetwork|neuralNet|nonlinear|nmf|nonParametricBayes|optimization|panel|pls|percentile|pca|phreg|qkb|qlim|quantreg|recommend|tsReconcile|deepRnn|regression|reinforcementLearn|robustPca|sampling|sparkEmbeddedProcess|search(?:Analytics)?|sentimentAnalysis|sequence|configuration|session(?:Prop)?|severity|simple|smartData|sandwich|spatialreg|stabilityMonitoring|spc|loadStreams|svDataDescription|svm|table|conditionalRandomFields|text(?:Rule(?:Develop|Score)|Mining|Parse|Topic|Util|Filters|Frequency)|tsInfo|timeData|transpose|uniTimeSeries/.source; var casActions = { - pattern: RegExp('(^|\\s)(?:action\\s+)?(?:)\\.[a-z]+\\b[^;]+'.replace(//g, actionSets), 'i'), + pattern: RegExp(/(^|\s)(?:action\s+)?(?:)\.[a-z]+\b[^;]+/.source.replace(//g, function () { return actionSets; }), 'i'), lookbehind: true, inside: { - 'keyword': RegExp('(?:)\\.[a-z]+\\b'.replace(//g, actionSets), 'i'), + 'keyword': RegExp(/(?:)\.[a-z]+\b/.source.replace(//g, function () { return actionSets; }), 'i'), 'action': { pattern: /(?:action)/i, alias: 'keyword' @@ -136,7 +136,7 @@ lookbehind: true, inside: { 'sql': { - pattern: RegExp(/^[ \t]*(?:select|alter\s+table|(?:create|describe|drop)\s+(?:index|table(?:\s+constraints)?|view)|create\s+unique\s+index|insert\s+into|update)(?:|[^;"'])+;/.source.replace(//g, stringPattern), 'im'), + pattern: RegExp(/^[ \t]*(?:select|alter\s+table|(?:create|describe|drop)\s+(?:index|table(?:\s+constraints)?|view)|create\s+unique\s+index|insert\s+into|update)(?:|[^;"'])+;/.source.replace(//g, function () { return stringPattern; }), 'im'), alias: 'language-sql', inside: Prism.languages.sql }, @@ -158,7 +158,7 @@ lookbehind: true, inside: { 'groovy': { - pattern: RegExp(/(^[ \t]*submit(?:\s+(?:load|parseonly|norun))?)(?:|[^"'])+?(?=endsubmit;)/.source.replace(//g, stringPattern), 'im'), + pattern: RegExp(/(^[ \t]*submit(?:\s+(?:load|parseonly|norun))?)(?:|[^"'])+?(?=endsubmit;)/.source.replace(//g, function () { return stringPattern; }), 'im'), lookbehind: true, alias: 'language-groovy', inside: Prism.languages.groovy @@ -177,7 +177,7 @@ lookbehind: true, inside: { 'lua': { - pattern: RegExp(/(^[ \t]*submit(?:\s+(?:load|parseonly|norun))?)(?:|[^"'])+?(?=endsubmit;)/.source.replace(//g, stringPattern), 'im'), + pattern: RegExp(/(^[ \t]*submit(?:\s+(?:load|parseonly|norun))?)(?:|[^"'])+?(?=endsubmit;)/.source.replace(//g, function () { return stringPattern; }), 'im'), lookbehind: true, alias: 'language-lua', inside: Prism.languages.lua @@ -229,7 +229,7 @@ }, 'proc-args': { - pattern: RegExp(/(^proc\s+\w+\s+)(?!\s)(?:[^;"']|)+;/.source.replace(//g, stringPattern), 'im'), + pattern: RegExp(/(^proc\s+\w+\s+)(?!\s)(?:[^;"']|)+;/.source.replace(//g, function () { return stringPattern; }), 'im'), lookbehind: true, inside: args }, diff --git a/components/prism-sas.min.js b/components/prism-sas.min.js index bab73d6e50..2cf280aaca 100644 --- a/components/prism-sas.min.js +++ b/components/prism-sas.min.js @@ -1 +1 @@ -!function(e){var t="(?:\"(?:\"\"|[^\"])*\"(?!\")|'(?:''|[^'])*'(?!'))",a=/\b(?:\d[\da-f]*x|\d+(?:\.\d+)?(?:e[+-]?\d+)?)\b/i,n={pattern:RegExp(t+"[bx]"),alias:"number"},i={pattern:/(^|\s+)(?:proc\s+\w+|quit|run|data(?!\=))\b/i,alias:"keyword",lookbehind:!0},s=[/\/\*[\s\S]*?\*\//,{pattern:/(^\s*|;\s*)\*[^;]*;/m,lookbehind:!0}],r={pattern:RegExp(t),greedy:!0},o=/[$%@.(){}\[\];,\\]/,l={pattern:/%?\w+(?=\()/,alias:"keyword"},d={function:l,"arg-value":{pattern:/(\s*=\s*)[A-Z\.]+/i,lookbehind:!0},operator:/=/,"macro-variable":{pattern:/&[^\.]*\./i,alias:"string"},arg:{pattern:/[A-Z]+/i,alias:"keyword"},number:a,"numeric-constant":n,punctuation:o,string:r},c={pattern:/\b(?:format|put)\b=?[\w'$.]+/im,inside:{keyword:/^(?:format|put)(?=\=)/i,equals:/=/,format:{pattern:/(?:\w|\$\d)+\.\d?/i,alias:"number"}}},p={pattern:/\b(?:format|put)\s+[\w']+(?:\s+[$.\w]+)+(?=;)/i,inside:{keyword:/^(?:format|put)/i,format:{pattern:/[\w$]+\.\d?/,alias:"number"}}},u={pattern:/((?:^|[\s])=?)(?:catname|checkpoint execute_always|dm|endsas|filename|footnote|%include|libname|%list|lock|missing|options|page|resetline|%run|sasfile|skip|sysecho|title\d?)\b/i,lookbehind:!0,alias:"keyword"},m={pattern:/(^|\s)(?:submit(?:\s+(?:load|parseonly|norun))?|endsubmit)\b/i,lookbehind:!0,alias:"keyword"},b="accessControl|cdm|aggregation|aStore|ruleMining|audio|autotune|bayesianNetClassifier|bioMedImage|boolRule|builtins|cardinality|sccasl|clustering|copula|countreg|dataDiscovery|dataPreprocess|dataSciencePilot|dataStep|decisionTree|deepLearn|deepNeural|varReduce|simSystem|ds2|deduplication|ecm|entityRes|espCluster|explainModel|factmac|fastKnn|fcmpact|fedSql|freqTab|gam|gleam|graphSemiSupLearn|gVarCluster|hiddenMarkovModel|hyperGroup|image|iml|ica|kernalPca|langModel|ldaTopic|sparseML|mlTools|mixed|modelPublishing|mbc|network|optNetwork|neuralNet|nonlinear|nmf|nonParametricBayes|optimization|panel|pls|percentile|pca|phreg|qkb|qlim|quantreg|recommend|tsReconcile|deepRnn|regression|reinforcementLearn|robustPca|sampling|sparkEmbeddedProcess|search(?:Analytics)?|sentimentAnalysis|sequence|configuration|session(?:Prop)?|severity|simple|smartData|sandwich|spatialreg|stabilityMonitoring|spc|loadStreams|svDataDescription|svm|table|conditionalRandomFields|text(?:Rule(?:Develop|Score)|Mining|Parse|Topic|Util|Filters|Frequency)|tsInfo|timeData|transpose|uniTimeSeries",g={pattern:RegExp("(^|\\s)(?:action\\s+)?(?:)\\.[a-z]+\\b[^;]+".replace(//g,b),"i"),lookbehind:!0,inside:{keyword:RegExp("(?:)\\.[a-z]+\\b".replace(//g,b),"i"),action:{pattern:/(?:action)/i,alias:"keyword"},function:l,"arg-value":d["arg-value"],operator:d.operator,comment:s,argument:d.arg,number:a,"numeric-constant":n,punctuation:o,string:r}},k={pattern:/((?:^|\s)=?)(?:after|analysis|and|array|barchart|barwidth|begingraph|by|call|cas|cbarline|cfill|class(?:lev)?|close|column|computed?|contains|continue|data(?=\=)|define|delete|describe|document|do\s+over|do|dol|drop|dul|end(?:source|comp)?|entryTitle|else|eval(?:uate)?|exec(?:ute)?|exit|fill(?:attrs)?|file(?:name)?|flist|fnc|function(?:list)?|goto|global|group(?:by)?|headline|headskip|histogram|if|infile|keep|keylabel|keyword|label|layout|leave|legendlabel|length|libname|loadactionset|merge|midpoints|name|noobs|nowd|_?null_|ods|options|or|otherwise|out(?:put)?|over(?:lay)?|plot|put|print|raise|ranexp|rannor|rbreak|retain|return|select|set|session|sessref|source|statgraph|sum|summarize|table|temp|terminate|then\s+do|then|title\d?|to|var|when|where|xaxisopts|yaxisopts|y2axisopts)\b/i,lookbehind:!0};e.languages.sas={datalines:{pattern:/^(\s*)(?:(?:data)?lines|cards);[\s\S]+?^\s*;/im,lookbehind:!0,alias:"string",inside:{keyword:{pattern:/^(?:(?:data)?lines|cards)/i},punctuation:/;/}},"proc-sql":{pattern:/(^proc\s+(?:fed)?sql(?:\s+[\w|=]+)?;)[\s\S]+?(?=^(?:proc\s+\w+|quit|run|data);|(?![\s\S]))/im,lookbehind:!0,inside:{sql:{pattern:RegExp("^[ \t]*(?:select|alter\\s+table|(?:create|describe|drop)\\s+(?:index|table(?:\\s+constraints)?|view)|create\\s+unique\\s+index|insert\\s+into|update)(?:|[^;\"'])+;".replace(//g,t),"im"),alias:"language-sql",inside:e.languages.sql},"global-statements":u,"sql-statements":{pattern:/(^|\s)(?:disconnect\s+from|exec(?:ute)?|begin|commit|rollback|reset|validate)\b/i,lookbehind:!0,alias:"keyword"},number:a,"numeric-constant":n,punctuation:o,string:r}},"proc-groovy":{pattern:/(^proc\s+groovy(?:\s+[\w|=]+)?;)(?:\s*submit)[\s\S]+?(?=^(?:proc\s+\w+|quit|run|data);|(?![\s\S]))/im,lookbehind:!0,inside:{groovy:{pattern:RegExp("(^[ \t]*submit(?:\\s+(?:load|parseonly|norun))?)(?:|[^\"'])+?(?=endsubmit;)".replace(//g,t),"im"),lookbehind:!0,alias:"language-groovy",inside:e.languages.groovy},"submit-statement":m,"global-statements":u,number:a,"numeric-constant":n,punctuation:o,string:r}},"proc-lua":{pattern:/(^proc\s+lua(?:\s+[\w|=]+)?;)(?:\s*submit)[\s\S]+?(?=^(?:proc\s+\w+|quit|run|data);|(?![\s\S]))/im,lookbehind:!0,inside:{lua:{pattern:RegExp("(^[ \t]*submit(?:\\s+(?:load|parseonly|norun))?)(?:|[^\"'])+?(?=endsubmit;)".replace(//g,t),"im"),lookbehind:!0,alias:"language-lua",inside:e.languages.lua},"submit-statement":m,"global-statements":u,number:a,"numeric-constant":n,punctuation:o,string:r}},"proc-cas":{pattern:/(^proc\s+cas(?:\s+[\w|=]+)?;)[\s\S]+?(?=^(?:proc\s+\w+|quit|data);|(?![\s\S]))/im,lookbehind:!0,inside:{"statement-var":{pattern:/((?:^|\s)=?)saveresult\s+[^;]+/im,lookbehind:!0,inside:{statement:{pattern:/^saveresult\s+\S+/i,inside:{keyword:/^(?:saveresult)/i}},rest:d}},"cas-actions":g,statement:{pattern:/((?:^|\s)=?)(?:default|(?:un)?set|on|output|upload)[^;]+/im,lookbehind:!0,inside:d},step:i,keyword:k,function:l,comment:s,format:c,altformat:p,"global-statements":u,number:a,"numeric-constant":n,punctuation:o,string:r}},"proc-args":{pattern:RegExp("(^proc\\s+\\w+\\s+)(?!\\s)(?:[^;\"']|)+;".replace(//g,t),"im"),lookbehind:!0,inside:d},"macro-keyword":{pattern:/((?:^|\s)=?)%(?:ABORT|BQUOTE|BY|CMS|COPY|DISPLAY|DO|ELSE|END|EVAL|GLOBAL|GO|GOTO|IF|INC|INCLUDE|INDEX|INPUT|KTRIM|LENGTH|LET|LIST|LOCAL|NRBQUOTE|NRQUOTE|NRSTR|PUT|QKTRIM|QSCAN|QSUBSTR|QSYSFUNC|QUOTE|QUPCASE|RETURN|RUN|SCAN|STR|SUBSTR|SUPERQ|SYMDEL|SYMGLOBL|SYMLOCAL|SYMEXIST|SYSCALL|SYSEVALF|SYSEXEC|SYSFUNC|SYSGET|SYSRPUT|THEN|TO|TSO|UNQUOTE|UNTIL|UPCASE|WHILE|WINDOW)\b/i,lookbehind:!0,alias:"keyword"},"macro-declaration":{pattern:/^%macro[^;]+(?=;)/im,inside:{keyword:/%macro/i}},"macro-end":{pattern:/^%mend[^;]+(?=;)/im,inside:{keyword:/%mend/i}},macro:{pattern:/%_\w+(?=\()/,alias:"keyword"},input:{pattern:/\binput\s+[-\w\s/*.$&]+;/i,inside:{input:{alias:"keyword",pattern:/^input/i},comment:s,number:a,"numeric-constant":n}},"options-args":{pattern:/(^options)[-'"|/\\<>*+=:()\w\s]*(?=;)/im,lookbehind:!0,inside:d},"cas-actions":g,comment:s,function:l,format:c,altformat:p,"numeric-constant":n,datetime:{pattern:RegExp(t+"(?:dt?|t)"),alias:"number"},string:r,step:i,keyword:k,"operator-keyword":{pattern:/\b(?:eq|ne|gt|lt|ge|le|in|not)\b/i,alias:"operator"},number:a,operator:/\*\*?|\|\|?|!!?|¦¦?|<[>=]?|>[<=]?|[-+\/=&]|[~¬^]=?/i,punctuation:o}}(Prism); \ No newline at end of file +!function(e){var t="(?:\"(?:\"\"|[^\"])*\"(?!\")|'(?:''|[^'])*'(?!'))",a=/\b(?:\d[\da-f]*x|\d+(?:\.\d+)?(?:e[+-]?\d+)?)\b/i,n={pattern:RegExp(t+"[bx]"),alias:"number"},i={pattern:/(^|\s+)(?:proc\s+\w+|quit|run|data(?!\=))\b/i,alias:"keyword",lookbehind:!0},s=[/\/\*[\s\S]*?\*\//,{pattern:/(^\s*|;\s*)\*[^;]*;/m,lookbehind:!0}],r={pattern:RegExp(t),greedy:!0},o=/[$%@.(){}\[\];,\\]/,l={pattern:/%?\w+(?=\()/,alias:"keyword"},c={function:l,"arg-value":{pattern:/(\s*=\s*)[A-Z\.]+/i,lookbehind:!0},operator:/=/,"macro-variable":{pattern:/&[^\.]*\./i,alias:"string"},arg:{pattern:/[A-Z]+/i,alias:"keyword"},number:a,"numeric-constant":n,punctuation:o,string:r},d={pattern:/\b(?:format|put)\b=?[\w'$.]+/im,inside:{keyword:/^(?:format|put)(?=\=)/i,equals:/=/,format:{pattern:/(?:\w|\$\d)+\.\d?/i,alias:"number"}}},p={pattern:/\b(?:format|put)\s+[\w']+(?:\s+[$.\w]+)+(?=;)/i,inside:{keyword:/^(?:format|put)/i,format:{pattern:/[\w$]+\.\d?/,alias:"number"}}},u={pattern:/((?:^|[\s])=?)(?:catname|checkpoint execute_always|dm|endsas|filename|footnote|%include|libname|%list|lock|missing|options|page|resetline|%run|sasfile|skip|sysecho|title\d?)\b/i,lookbehind:!0,alias:"keyword"},m={pattern:/(^|\s)(?:submit(?:\s+(?:load|parseonly|norun))?|endsubmit)\b/i,lookbehind:!0,alias:"keyword"},b="accessControl|cdm|aggregation|aStore|ruleMining|audio|autotune|bayesianNetClassifier|bioMedImage|boolRule|builtins|cardinality|sccasl|clustering|copula|countreg|dataDiscovery|dataPreprocess|dataSciencePilot|dataStep|decisionTree|deepLearn|deepNeural|varReduce|simSystem|ds2|deduplication|ecm|entityRes|espCluster|explainModel|factmac|fastKnn|fcmpact|fedSql|freqTab|gam|gleam|graphSemiSupLearn|gVarCluster|hiddenMarkovModel|hyperGroup|image|iml|ica|kernalPca|langModel|ldaTopic|sparseML|mlTools|mixed|modelPublishing|mbc|network|optNetwork|neuralNet|nonlinear|nmf|nonParametricBayes|optimization|panel|pls|percentile|pca|phreg|qkb|qlim|quantreg|recommend|tsReconcile|deepRnn|regression|reinforcementLearn|robustPca|sampling|sparkEmbeddedProcess|search(?:Analytics)?|sentimentAnalysis|sequence|configuration|session(?:Prop)?|severity|simple|smartData|sandwich|spatialreg|stabilityMonitoring|spc|loadStreams|svDataDescription|svm|table|conditionalRandomFields|text(?:Rule(?:Develop|Score)|Mining|Parse|Topic|Util|Filters|Frequency)|tsInfo|timeData|transpose|uniTimeSeries",g={pattern:RegExp("(^|\\s)(?:action\\s+)?(?:)\\.[a-z]+\\b[^;]+".replace(//g,function(){return b}),"i"),lookbehind:!0,inside:{keyword:RegExp("(?:)\\.[a-z]+\\b".replace(//g,function(){return b}),"i"),action:{pattern:/(?:action)/i,alias:"keyword"},function:l,"arg-value":c["arg-value"],operator:c.operator,comment:s,argument:c.arg,number:a,"numeric-constant":n,punctuation:o,string:r}},k={pattern:/((?:^|\s)=?)(?:after|analysis|and|array|barchart|barwidth|begingraph|by|call|cas|cbarline|cfill|class(?:lev)?|close|column|computed?|contains|continue|data(?=\=)|define|delete|describe|document|do\s+over|do|dol|drop|dul|end(?:source|comp)?|entryTitle|else|eval(?:uate)?|exec(?:ute)?|exit|fill(?:attrs)?|file(?:name)?|flist|fnc|function(?:list)?|goto|global|group(?:by)?|headline|headskip|histogram|if|infile|keep|keylabel|keyword|label|layout|leave|legendlabel|length|libname|loadactionset|merge|midpoints|name|noobs|nowd|_?null_|ods|options|or|otherwise|out(?:put)?|over(?:lay)?|plot|put|print|raise|ranexp|rannor|rbreak|retain|return|select|set|session|sessref|source|statgraph|sum|summarize|table|temp|terminate|then\s+do|then|title\d?|to|var|when|where|xaxisopts|yaxisopts|y2axisopts)\b/i,lookbehind:!0};e.languages.sas={datalines:{pattern:/^(\s*)(?:(?:data)?lines|cards);[\s\S]+?^\s*;/im,lookbehind:!0,alias:"string",inside:{keyword:{pattern:/^(?:(?:data)?lines|cards)/i},punctuation:/;/}},"proc-sql":{pattern:/(^proc\s+(?:fed)?sql(?:\s+[\w|=]+)?;)[\s\S]+?(?=^(?:proc\s+\w+|quit|run|data);|(?![\s\S]))/im,lookbehind:!0,inside:{sql:{pattern:RegExp("^[ \t]*(?:select|alter\\s+table|(?:create|describe|drop)\\s+(?:index|table(?:\\s+constraints)?|view)|create\\s+unique\\s+index|insert\\s+into|update)(?:|[^;\"'])+;".replace(//g,function(){return t}),"im"),alias:"language-sql",inside:e.languages.sql},"global-statements":u,"sql-statements":{pattern:/(^|\s)(?:disconnect\s+from|exec(?:ute)?|begin|commit|rollback|reset|validate)\b/i,lookbehind:!0,alias:"keyword"},number:a,"numeric-constant":n,punctuation:o,string:r}},"proc-groovy":{pattern:/(^proc\s+groovy(?:\s+[\w|=]+)?;)(?:\s*submit)[\s\S]+?(?=^(?:proc\s+\w+|quit|run|data);|(?![\s\S]))/im,lookbehind:!0,inside:{groovy:{pattern:RegExp("(^[ \t]*submit(?:\\s+(?:load|parseonly|norun))?)(?:|[^\"'])+?(?=endsubmit;)".replace(//g,function(){return t}),"im"),lookbehind:!0,alias:"language-groovy",inside:e.languages.groovy},"submit-statement":m,"global-statements":u,number:a,"numeric-constant":n,punctuation:o,string:r}},"proc-lua":{pattern:/(^proc\s+lua(?:\s+[\w|=]+)?;)(?:\s*submit)[\s\S]+?(?=^(?:proc\s+\w+|quit|run|data);|(?![\s\S]))/im,lookbehind:!0,inside:{lua:{pattern:RegExp("(^[ \t]*submit(?:\\s+(?:load|parseonly|norun))?)(?:|[^\"'])+?(?=endsubmit;)".replace(//g,function(){return t}),"im"),lookbehind:!0,alias:"language-lua",inside:e.languages.lua},"submit-statement":m,"global-statements":u,number:a,"numeric-constant":n,punctuation:o,string:r}},"proc-cas":{pattern:/(^proc\s+cas(?:\s+[\w|=]+)?;)[\s\S]+?(?=^(?:proc\s+\w+|quit|data);|(?![\s\S]))/im,lookbehind:!0,inside:{"statement-var":{pattern:/((?:^|\s)=?)saveresult\s+[^;]+/im,lookbehind:!0,inside:{statement:{pattern:/^saveresult\s+\S+/i,inside:{keyword:/^(?:saveresult)/i}},rest:c}},"cas-actions":g,statement:{pattern:/((?:^|\s)=?)(?:default|(?:un)?set|on|output|upload)[^;]+/im,lookbehind:!0,inside:c},step:i,keyword:k,function:l,comment:s,format:d,altformat:p,"global-statements":u,number:a,"numeric-constant":n,punctuation:o,string:r}},"proc-args":{pattern:RegExp("(^proc\\s+\\w+\\s+)(?!\\s)(?:[^;\"']|)+;".replace(//g,function(){return t}),"im"),lookbehind:!0,inside:c},"macro-keyword":{pattern:/((?:^|\s)=?)%(?:ABORT|BQUOTE|BY|CMS|COPY|DISPLAY|DO|ELSE|END|EVAL|GLOBAL|GO|GOTO|IF|INC|INCLUDE|INDEX|INPUT|KTRIM|LENGTH|LET|LIST|LOCAL|NRBQUOTE|NRQUOTE|NRSTR|PUT|QKTRIM|QSCAN|QSUBSTR|QSYSFUNC|QUOTE|QUPCASE|RETURN|RUN|SCAN|STR|SUBSTR|SUPERQ|SYMDEL|SYMGLOBL|SYMLOCAL|SYMEXIST|SYSCALL|SYSEVALF|SYSEXEC|SYSFUNC|SYSGET|SYSRPUT|THEN|TO|TSO|UNQUOTE|UNTIL|UPCASE|WHILE|WINDOW)\b/i,lookbehind:!0,alias:"keyword"},"macro-declaration":{pattern:/^%macro[^;]+(?=;)/im,inside:{keyword:/%macro/i}},"macro-end":{pattern:/^%mend[^;]+(?=;)/im,inside:{keyword:/%mend/i}},macro:{pattern:/%_\w+(?=\()/,alias:"keyword"},input:{pattern:/\binput\s+[-\w\s/*.$&]+;/i,inside:{input:{alias:"keyword",pattern:/^input/i},comment:s,number:a,"numeric-constant":n}},"options-args":{pattern:/(^options)[-'"|/\\<>*+=:()\w\s]*(?=;)/im,lookbehind:!0,inside:c},"cas-actions":g,comment:s,function:l,format:d,altformat:p,"numeric-constant":n,datetime:{pattern:RegExp(t+"(?:dt?|t)"),alias:"number"},string:r,step:i,keyword:k,"operator-keyword":{pattern:/\b(?:eq|ne|gt|lt|ge|le|in|not)\b/i,alias:"operator"},number:a,operator:/\*\*?|\|\|?|!!?|¦¦?|<[>=]?|>[<=]?|[-+\/=&]|[~¬^]=?/i,punctuation:o}}(Prism); \ No newline at end of file diff --git a/components/prism-shell-session.js b/components/prism-shell-session.js index b89bb7bb42..953080ce68 100644 --- a/components/prism-shell-session.js +++ b/components/prism-shell-session.js @@ -33,7 +33,7 @@ } }, 'command': { - pattern: RegExp(/[$#](?:[^\\\r\n'"<]|\\.|<>)+/.source.replace(/<>/g, strings)), + pattern: RegExp(/[$#](?:[^\\\r\n'"<]|\\.|<>)+/.source.replace(/<>/g, function () { return strings; })), greedy: true, inside: { 'bash': { diff --git a/components/prism-shell-session.min.js b/components/prism-shell-session.min.js index 6bab26b94a..c296a38fa0 100644 --- a/components/prism-shell-session.min.js +++ b/components/prism-shell-session.min.js @@ -1 +1 @@ -!function(s){var n=["([\"'])(?:\\\\[\\s\\S]|\\$\\([^)]+\\)|`[^`]+`|(?!\\1)[^\\\\])*\\1","<<-?\\s*(\\w+?)\\s*(?:\r?\n|\r)[\\s\\S]*?(?:\r?\n|\r)\\2","<<-?\\s*([\"'])(\\w+)\\3\\s*(?:\r?\n|\r)[\\s\\S]*?(?:\r?\n|\r)\\4"].join("|");s.languages["shell-session"]={info:{pattern:/^[^\r\n$#*!]+(?=[$#])/m,alias:"punctuation",inside:{path:{pattern:/(:)[\s\S]+/,lookbehind:!0},user:/^[^\s@:$#*!/\\]+@[^\s@:$#*!/\\]+(?=:|$)/,punctuation:/:/}},command:{pattern:RegExp("[$#](?:[^\\\\\\r\n'\"<]|\\\\.|<>)+".replace(/<>/g,n)),greedy:!0,inside:{bash:{pattern:/(^[$#]\s*)[\s\S]+/,lookbehind:!0,alias:"language-bash",inside:s.languages.bash},"shell-symbol":{pattern:/^[$#]/,alias:"important"}}},output:/.(?:.*(?:\r\n?|\n|.$))*/}}(Prism); \ No newline at end of file +!function(n){var s=["([\"'])(?:\\\\[\\s\\S]|\\$\\([^)]+\\)|`[^`]+`|(?!\\1)[^\\\\])*\\1","<<-?\\s*(\\w+?)\\s*(?:\r?\n|\r)[\\s\\S]*?(?:\r?\n|\r)\\2","<<-?\\s*([\"'])(\\w+)\\3\\s*(?:\r?\n|\r)[\\s\\S]*?(?:\r?\n|\r)\\4"].join("|");n.languages["shell-session"]={info:{pattern:/^[^\r\n$#*!]+(?=[$#])/m,alias:"punctuation",inside:{path:{pattern:/(:)[\s\S]+/,lookbehind:!0},user:/^[^\s@:$#*!/\\]+@[^\s@:$#*!/\\]+(?=:|$)/,punctuation:/:/}},command:{pattern:RegExp("[$#](?:[^\\\\\\r\n'\"<]|\\\\.|<>)+".replace(/<>/g,function(){return s})),greedy:!0,inside:{bash:{pattern:/(^[$#]\s*)[\s\S]+/,lookbehind:!0,alias:"language-bash",inside:n.languages.bash},"shell-symbol":{pattern:/^[$#]/,alias:"important"}}},output:/.(?:.*(?:\r\n?|\n|.$))*/}}(Prism); \ No newline at end of file diff --git a/components/prism-yaml.js b/components/prism-yaml.js index ae66649118..3838926692 100644 --- a/components/prism-yaml.js +++ b/components/prism-yaml.js @@ -18,21 +18,21 @@ function createValuePattern(value, flags) { flags = (flags || '').replace(/m/g, '') + 'm'; // add m flag var pattern = /([:\-,[{]\s*(?:\s<>[ \t]+)?)(?:<>)(?=[ \t]*(?:$|,|]|}|\s*#))/.source - .replace(/<>/g, properties).replace(/<>/g, value); + .replace(/<>/g, function () { return properties; }).replace(/<>/g, function () { return value; }); return RegExp(pattern, flags) } Prism.languages.yaml = { 'scalar': { pattern: RegExp(/([\-:]\s*(?:\s<>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)[^\r\n]+(?:\2[^\r\n]+)*)/.source - .replace(/<>/g, properties)), + .replace(/<>/g, function () { return properties; })), lookbehind: true, alias: 'string' }, 'comment': /#.*/, 'key': { pattern: RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<>[ \t]+)?)[^\r\n{[\]},#\s]+?(?=\s*:\s)/.source - .replace(/<>/g, properties)), + .replace(/<>/g, function () { return properties; })), lookbehind: true, alias: 'atrule' }, diff --git a/components/prism-yaml.min.js b/components/prism-yaml.min.js index 145f8f4424..fa7cd59cfc 100644 --- a/components/prism-yaml.min.js +++ b/components/prism-yaml.min.js @@ -1 +1 @@ -!function(e){var a=/[*&][^\s[\]{},]+/,t=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,r="(?:"+t.source+"(?:[ \t]+"+a.source+")?|"+a.source+"(?:[ \t]+"+t.source+")?)";function n(e,a){a=(a||"").replace(/m/g,"")+"m";var t="([:\\-,[{]\\s*(?:\\s<>[ \t]+)?)(?:<>)(?=[ \t]*(?:$|,|]|}|\\s*#))".replace(/<>/g,r).replace(/<>/g,e);return RegExp(t,a)}e.languages.yaml={scalar:{pattern:RegExp("([\\-:]\\s*(?:\\s<>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)[^\r\\n]+(?:\\2[^\r\\n]+)*)".replace(/<>/g,r)),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp("((?:^|[:\\-,[{\r\\n?])[ \t]*(?:<>[ \t]+)?)[^\r\\n{[\\]},#\\s]+?(?=\\s*:\\s)".replace(/<>/g,r)),lookbehind:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:n("\\d{4}-\\d\\d?-\\d\\d?(?:[tT]|[ \t]+)\\d\\d?:\\d{2}:\\d{2}(?:\\.\\d*)?[ \t]*(?:Z|[-+]\\d\\d?(?::\\d{2})?)?|\\d{4}-\\d{2}-\\d{2}|\\d\\d?:\\d{2}(?::\\d{2}(?:\\.\\d*)?)?"),lookbehind:!0,alias:"number"},boolean:{pattern:n("true|false","i"),lookbehind:!0,alias:"important"},null:{pattern:n("null|~","i"),lookbehind:!0,alias:"important"},string:{pattern:n("(\"|')(?:(?!\\2)[^\\\\\\r\n]|\\\\.)*\\2"),lookbehind:!0,greedy:!0},number:{pattern:n("[+-]?(?:0x[\\da-f]+|0o[0-7]+|(?:\\d+\\.?\\d*|\\.?\\d+)(?:e[+-]?\\d+)?|\\.inf|\\.nan)","i"),lookbehind:!0},tag:t,important:a,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},e.languages.yml=e.languages.yaml}(Prism); \ No newline at end of file +!function(n){var t=/[*&][^\s[\]{},]+/,e=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,r="(?:"+e.source+"(?:[ \t]+"+t.source+")?|"+t.source+"(?:[ \t]+"+e.source+")?)";function a(n,t){t=(t||"").replace(/m/g,"")+"m";var e="([:\\-,[{]\\s*(?:\\s<>[ \t]+)?)(?:<>)(?=[ \t]*(?:$|,|]|}|\\s*#))".replace(/<>/g,function(){return r}).replace(/<>/g,function(){return n});return RegExp(e,t)}n.languages.yaml={scalar:{pattern:RegExp("([\\-:]\\s*(?:\\s<>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)[^\r\\n]+(?:\\2[^\r\\n]+)*)".replace(/<>/g,function(){return r})),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp("((?:^|[:\\-,[{\r\\n?])[ \t]*(?:<>[ \t]+)?)[^\r\\n{[\\]},#\\s]+?(?=\\s*:\\s)".replace(/<>/g,function(){return r})),lookbehind:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:a("\\d{4}-\\d\\d?-\\d\\d?(?:[tT]|[ \t]+)\\d\\d?:\\d{2}:\\d{2}(?:\\.\\d*)?[ \t]*(?:Z|[-+]\\d\\d?(?::\\d{2})?)?|\\d{4}-\\d{2}-\\d{2}|\\d\\d?:\\d{2}(?::\\d{2}(?:\\.\\d*)?)?"),lookbehind:!0,alias:"number"},boolean:{pattern:a("true|false","i"),lookbehind:!0,alias:"important"},null:{pattern:a("null|~","i"),lookbehind:!0,alias:"important"},string:{pattern:a("(\"|')(?:(?!\\2)[^\\\\\\r\n]|\\\\.)*\\2"),lookbehind:!0,greedy:!0},number:{pattern:a("[+-]?(?:0x[\\da-f]+|0o[0-7]+|(?:\\d+\\.?\\d*|\\.?\\d+)(?:e[+-]?\\d+)?|\\.inf|\\.nan)","i"),lookbehind:!0},tag:e,important:t,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},n.languages.yml=n.languages.yaml}(Prism); \ No newline at end of file diff --git a/components/prism-zig.js b/components/prism-zig.js index 64f1bdc24a..ead8b97f81 100644 --- a/components/prism-zig.js +++ b/components/prism-zig.js @@ -1,11 +1,15 @@ (function (Prism) { + function literal(str) { + return function () { return str; }; + } + var keyword = /\b(?:align|allowzero|and|asm|async|await|break|cancel|catch|comptime|const|continue|defer|else|enum|errdefer|error|export|extern|fn|for|if|inline|linksection|nakedcc|noalias|null|or|orelse|packed|promise|pub|resume|return|stdcallcc|struct|suspend|switch|test|threadlocal|try|undefined|union|unreachable|usingnamespace|var|volatile|while)\b/; var IDENTIFIER = '\\b(?!' + keyword.source + ')(?!\\d)\\w+\\b'; var ALIGN = /align\s*\((?:[^()]|\([^()]*\))*\)/.source; - var PREFIX_TYPE_OP = /(?:\?|\bpromise->|(?:\[[^[\]]*\]|\*(?!\*)|\*\*)(?:\s*|\s*const\b|\s*volatile\b|\s*allowzero\b)*)/.source.replace(//g, ALIGN); - var SUFFIX_EXPR = /(?:\bpromise\b|(?:\berror\.)?(?:\.)*(?!\s+))/.source.replace(//g, IDENTIFIER); + var PREFIX_TYPE_OP = /(?:\?|\bpromise->|(?:\[[^[\]]*\]|\*(?!\*)|\*\*)(?:\s*|\s*const\b|\s*volatile\b|\s*allowzero\b)*)/.source.replace(//g, literal(ALIGN)); + var SUFFIX_EXPR = /(?:\bpromise\b|(?:\berror\.)?(?:\.)*(?!\s+))/.source.replace(//g, literal(IDENTIFIER)); var TYPE = '(?!\\s)(?:!?\\s*(?:' + PREFIX_TYPE_OP + '\\s*)*' + SUFFIX_EXPR + ')+'; /* @@ -65,13 +69,13 @@ // const x: i32 = 9; // var x: Bar; // fn foo(x: bool, y: f32) void {} - pattern: RegExp(/(:\s*)(?=\s*(?:\s*)?[=;,)])|(?=\s*(?:\s*)?\{)/.source.replace(//g, TYPE).replace(//g, ALIGN)), + pattern: RegExp(/(:\s*)(?=\s*(?:\s*)?[=;,)])|(?=\s*(?:\s*)?\{)/.source.replace(//g, literal(TYPE)).replace(//g, literal(ALIGN))), lookbehind: true, inside: null // see below }, { // extern fn foo(x: f64) f64; (optional alignment) - pattern: RegExp(/(\)\s*)(?=\s*(?:\s*)?;)/.source.replace(//g, TYPE).replace(//g, ALIGN)), + pattern: RegExp(/(\)\s*)(?=\s*(?:\s*)?;)/.source.replace(//g, literal(TYPE)).replace(//g, literal(ALIGN))), lookbehind: true, inside: null // see below } diff --git a/components/prism-zig.min.js b/components/prism-zig.min.js index 968859607d..3d5a639668 100644 --- a/components/prism-zig.min.js +++ b/components/prism-zig.min.js @@ -1 +1 @@ -!function(n){var e=/\b(?:align|allowzero|and|asm|async|await|break|cancel|catch|comptime|const|continue|defer|else|enum|errdefer|error|export|extern|fn|for|if|inline|linksection|nakedcc|noalias|null|or|orelse|packed|promise|pub|resume|return|stdcallcc|struct|suspend|switch|test|threadlocal|try|undefined|union|unreachable|usingnamespace|var|volatile|while)\b/,a="\\b(?!"+e.source+")(?!\\d)\\w+\\b",r="align\\s*\\((?:[^()]|\\([^()]*\\))*\\)",s="(?!\\s)(?:!?\\s*(?:"+"(?:\\?|\\bpromise->|(?:\\[[^[\\]]*\\]|\\*(?!\\*)|\\*\\*)(?:\\s*|\\s*const\\b|\\s*volatile\\b|\\s*allowzero\\b)*)".replace(//g,r)+"\\s*)*"+"(?:\\bpromise\\b|(?:\\berror\\.)?(?:\\.)*(?!\\s+))".replace(//g,a)+")+";n.languages.zig={comment:[{pattern:/\/{3}.*/,alias:"doc-comment"},/\/{2}.*/],string:[{pattern:/(^|[^\\@])c?"(?:[^"\\\r\n]|\\.)*"/,lookbehind:!0,greedy:!0},{pattern:/([\r\n])([ \t]+c?\\{2}).*(?:(?:\r\n?|\n)\2.*)*/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\])'(?:[^'\\\r\n]|\\(?:.|x[a-fA-F\d]{2}|u\{[a-fA-F\d]{1,6}\}))'/,lookbehind:!0,greedy:!0}],builtin:/\B@(?!\d)\w+(?=\s*\()/,label:{pattern:/(\b(?:break|continue)\s*:\s*)\w+\b|\b(?!\d)\w+\b(?=\s*:\s*(?:\{|while\b))/,lookbehind:!0},"class-name":[/\b(?!\d)\w+(?=\s*=\s*(?:(?:extern|packed)\s+)?(?:enum|struct|union)\s*[({])/,{pattern:RegExp("(:\\s*)(?=\\s*(?:\\s*)?[=;,)])|(?=\\s*(?:\\s*)?\\{)".replace(//g,s).replace(//g,r)),lookbehind:!0,inside:null},{pattern:RegExp("(\\)\\s*)(?=\\s*(?:\\s*)?;)".replace(//g,s).replace(//g,r)),lookbehind:!0,inside:null}],"builtin-types":{pattern:/\b(?:anyerror|bool|c_u?(?:short|int|long|longlong)|c_longdouble|c_void|comptime_(?:float|int)|[iu](?:8|16|32|64|128|size)|f(?:16|32|64|128)|noreturn|type|void)\b/,alias:"keyword"},keyword:e,function:/\b(?!\d)\w+(?=\s*\()/,number:/\b(?:0b[01]+|0o[0-7]+|0x[a-fA-F\d]+\.?[a-fA-F\d]*(?:[pP][+-]?[a-fA-F\d]+)?|\d+\.?\d*(?:[eE][+-]?\d+)?)\b/,boolean:/\b(?:false|true)\b/,operator:/\.[*?]|\.{2,3}|[-=]>|\*\*|\+\+|\|\||(?:<<|>>|[-+*]%|[-+*/%^&|<>!=])=?|[?~]/,punctuation:/[.:,;(){}[\]]/},n.languages.zig["class-name"].forEach(function(e){null===e.inside&&(e.inside=n.languages.zig)})}(Prism); \ No newline at end of file +!function(n){function e(e){return function(){return e}}var r=/\b(?:align|allowzero|and|asm|async|await|break|cancel|catch|comptime|const|continue|defer|else|enum|errdefer|error|export|extern|fn|for|if|inline|linksection|nakedcc|noalias|null|or|orelse|packed|promise|pub|resume|return|stdcallcc|struct|suspend|switch|test|threadlocal|try|undefined|union|unreachable|usingnamespace|var|volatile|while)\b/,a="\\b(?!"+r.source+")(?!\\d)\\w+\\b",o="align\\s*\\((?:[^()]|\\([^()]*\\))*\\)",s="(?!\\s)(?:!?\\s*(?:"+"(?:\\?|\\bpromise->|(?:\\[[^[\\]]*\\]|\\*(?!\\*)|\\*\\*)(?:\\s*|\\s*const\\b|\\s*volatile\\b|\\s*allowzero\\b)*)".replace(//g,e(o))+"\\s*)*"+"(?:\\bpromise\\b|(?:\\berror\\.)?(?:\\.)*(?!\\s+))".replace(//g,e(a))+")+";n.languages.zig={comment:[{pattern:/\/{3}.*/,alias:"doc-comment"},/\/{2}.*/],string:[{pattern:/(^|[^\\@])c?"(?:[^"\\\r\n]|\\.)*"/,lookbehind:!0,greedy:!0},{pattern:/([\r\n])([ \t]+c?\\{2}).*(?:(?:\r\n?|\n)\2.*)*/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\])'(?:[^'\\\r\n]|\\(?:.|x[a-fA-F\d]{2}|u\{[a-fA-F\d]{1,6}\}))'/,lookbehind:!0,greedy:!0}],builtin:/\B@(?!\d)\w+(?=\s*\()/,label:{pattern:/(\b(?:break|continue)\s*:\s*)\w+\b|\b(?!\d)\w+\b(?=\s*:\s*(?:\{|while\b))/,lookbehind:!0},"class-name":[/\b(?!\d)\w+(?=\s*=\s*(?:(?:extern|packed)\s+)?(?:enum|struct|union)\s*[({])/,{pattern:RegExp("(:\\s*)(?=\\s*(?:\\s*)?[=;,)])|(?=\\s*(?:\\s*)?\\{)".replace(//g,e(s)).replace(//g,e(o))),lookbehind:!0,inside:null},{pattern:RegExp("(\\)\\s*)(?=\\s*(?:\\s*)?;)".replace(//g,e(s)).replace(//g,e(o))),lookbehind:!0,inside:null}],"builtin-types":{pattern:/\b(?:anyerror|bool|c_u?(?:short|int|long|longlong)|c_longdouble|c_void|comptime_(?:float|int)|[iu](?:8|16|32|64|128|size)|f(?:16|32|64|128)|noreturn|type|void)\b/,alias:"keyword"},keyword:r,function:/\b(?!\d)\w+(?=\s*\()/,number:/\b(?:0b[01]+|0o[0-7]+|0x[a-fA-F\d]+\.?[a-fA-F\d]*(?:[pP][+-]?[a-fA-F\d]+)?|\d+\.?\d*(?:[eE][+-]?\d+)?)\b/,boolean:/\b(?:false|true)\b/,operator:/\.[*?]|\.{2,3}|[-=]>|\*\*|\+\+|\|\||(?:<<|>>|[-+*]%|[-+*/%^&|<>!=])=?|[?~]/,punctuation:/[.:,;(){}[\]]/},n.languages.zig["class-name"].forEach(function(e){null===e.inside&&(e.inside=n.languages.zig)})}(Prism); \ No newline at end of file diff --git a/plugins/diff-highlight/prism-diff-highlight.js b/plugins/diff-highlight/prism-diff-highlight.js index 1eb62139ef..ae38fab6ab 100644 --- a/plugins/diff-highlight/prism-diff-highlight.js +++ b/plugins/diff-highlight/prism-diff-highlight.js @@ -8,7 +8,7 @@ var LANGUAGE_REGEX = /diff-([\w-]+)/i; var HTML_TAG = /<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/gi; //this will match a line plus the line break while ignoring the line breaks HTML tags may contain. - var HTML_LINE = RegExp(/(?:__|[^\r\n<])*(?:\r\n?|\n|(?:__|[^\r\n<])(?![^\r\n]))/.source.replace(/__/g, HTML_TAG.source), 'gi'); + var HTML_LINE = RegExp(/(?:__|[^\r\n<])*(?:\r\n?|\n|(?:__|[^\r\n<])(?![^\r\n]))/.source.replace(/__/g, function () { return HTML_TAG.source; }), 'gi'); var PREFIXES = Prism.languages.diff.PREFIXES; diff --git a/plugins/diff-highlight/prism-diff-highlight.min.js b/plugins/diff-highlight/prism-diff-highlight.min.js index d2950347a9..d3cba4d3ad 100644 --- a/plugins/diff-highlight/prism-diff-highlight.min.js +++ b/plugins/diff-highlight/prism-diff-highlight.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof Prism&&Prism.languages.diff){var o=/diff-([\w-]+)/i,m=/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/gi,c=RegExp("(?:__|[^\r\\n<])*(?:\r\\n?|\n|(?:__|[^\r\\n<])(?![^\r\\n]))".replace(/__/g,m.source),"gi"),d=Prism.languages.diff.PREFIXES;Prism.hooks.add("before-sanity-check",function(e){var a=e.language;o.test(a)&&!e.grammar&&(e.grammar=Prism.languages[a]=Prism.languages.diff)}),Prism.hooks.add("before-tokenize",function(e){var a=e.language;o.test(a)&&!Prism.languages[a]&&(Prism.languages[a]=Prism.languages.diff)}),Prism.hooks.add("wrap",function(e){var a,s;if("diff"!==e.language){var r=o.exec(e.language);if(!r)return;a=r[1],s=Prism.languages[a]}if(e.type in d){var n,i=e.content.replace(m,"").replace(/</g,"<").replace(/&/g,"&"),g=i.replace(/(^|[\r\n])./g,"$1");n=s?Prism.highlight(g,s,a):Prism.util.encode(g);var f,t=new Prism.Token("prefix",d[e.type],[/\w+/.exec(e.type)[0]]),u=Prism.Token.stringify(t,e.language),l=[];for(c.lastIndex=0;f=c.exec(n);)l.push(u+f[0]);/(?:^|[\r\n]).$/.test(i)&&l.push(u),e.content=l.join(""),s&&e.classes.push("language-"+a)}})}}(); \ No newline at end of file +!function(){if("undefined"!=typeof Prism&&Prism.languages.diff){var o=/diff-([\w-]+)/i,m=/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/gi,c=RegExp("(?:__|[^\r\\n<])*(?:\r\\n?|\n|(?:__|[^\r\\n<])(?![^\r\\n]))".replace(/__/g,function(){return m.source}),"gi"),d=Prism.languages.diff.PREFIXES;Prism.hooks.add("before-sanity-check",function(e){var a=e.language;o.test(a)&&!e.grammar&&(e.grammar=Prism.languages[a]=Prism.languages.diff)}),Prism.hooks.add("before-tokenize",function(e){var a=e.language;o.test(a)&&!Prism.languages[a]&&(Prism.languages[a]=Prism.languages.diff)}),Prism.hooks.add("wrap",function(e){var a,s;if("diff"!==e.language){var n=o.exec(e.language);if(!n)return;a=n[1],s=Prism.languages[a]}if(e.type in d){var r,i=e.content.replace(m,"").replace(/</g,"<").replace(/&/g,"&"),g=i.replace(/(^|[\r\n])./g,"$1");r=s?Prism.highlight(g,s,a):Prism.util.encode(g);var f,t=new Prism.Token("prefix",d[e.type],[/\w+/.exec(e.type)[0]]),u=Prism.Token.stringify(t,e.language),l=[];for(c.lastIndex=0;f=c.exec(r);)l.push(u+f[0]);/(?:^|[\r\n]).$/.test(i)&&l.push(u),e.content=l.join(""),s&&e.classes.push("language-"+a)}})}}(); \ No newline at end of file diff --git a/prism.js b/prism.js index 5102efcdb1..a5bdcbc77f 100644 --- a/prism.js +++ b/prism.js @@ -823,7 +823,7 @@ Object.defineProperty(Prism.languages.markup.tag, 'addInlined', { var def = {}; def[tagName] = { - pattern: RegExp(/(<__[\s\S]*?>)(?:\s*|[\s\S])*?(?=<\/__>)/.source.replace(/__/g, tagName), 'i'), + pattern: RegExp(/(<__[\s\S]*?>)(?:\s*|[\s\S])*?(?=<\/__>)/.source.replace(/__/g, function () { return tagName; }), 'i'), lookbehind: true, greedy: true, inside: inside From 67afc5adcdc5f1971bfee6436d51383507f5309b Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Fri, 27 Mar 2020 18:43:25 +0100 Subject: [PATCH 0475/1100] gulp: Inline regex source improvement (#2227) This removes more unnecessary escapes. --- components/prism-csharp.min.js | 2 +- components/prism-jq.min.js | 2 +- components/prism-markdown.min.js | 2 +- components/prism-qml.min.js | 2 +- components/prism-robotframework.min.js | 2 +- components/prism-shell-session.min.js | 2 +- components/prism-yaml.min.js | 2 +- gulpfile.js/index.js | 13 ++++++++++--- plugins/diff-highlight/prism-diff-highlight.min.js | 2 +- 9 files changed, 18 insertions(+), 11 deletions(-) diff --git a/components/prism-csharp.min.js b/components/prism-csharp.min.js index 7efefd7c37..381102ae56 100644 --- a/components/prism-csharp.min.js +++ b/components/prism-csharp.min.js @@ -1 +1 @@ -!function(s){function a(e,s){return e.replace(/<<(\d+)>>/g,function(e,n){return"(?:"+s[+n]+")"})}function t(e,n,s){return RegExp(a(e,n),s||"")}function e(e,n){for(var s=0;s>/g,function(){return"(?:"+e+")"});return e.replace(/<>/g,"[^\\s\\S]")}var n="bool byte char decimal double dynamic float int long object sbyte short string uint ulong ushort var void",i="class enum interface struct",r="add alias ascending async await by descending from get global group into join let nameof notnull on orderby partial remove select set unmanaged value when where where",o="abstract as base break case catch checked const continue default delegate do else event explicit extern finally fixed for foreach goto if implicit in internal is lock namespace new null operator out override params private protected public readonly ref return sealed sizeof stackalloc static switch this throw try typeof unchecked unsafe using virtual volatile while yield";function l(e){return"\\b(?:"+e.trim().replace(/ /g,"|")+")\\b"}var d=l(i),p=RegExp(l(n+" "+i+" "+r+" "+o)),c=l(i+" "+r+" "+o),u=l(n+" "+i+" "+o),g=e("<(?:[^<>;=+\\-*/%&|^]|<>)*>",2),b=e("\\((?:[^()]|<>)*\\)",2),h="@?\\b[A-Za-z_]\\w*\\b",f=a("<<0>>(?:\\s*<<1>>)?",[h,g]),m=a("(?!<<0>>)<<1>>(?:\\s*\\.\\s*<<1>>)*",[c,f]),k="\\[\\s*(?:,\\s*)*\\]",y=a("(?:<<0>>|<<1>>)(?:\\s*(?:\\?\\s*)?<<2>>)*(?:\\s*\\?)?",[a("\\(<<0>>+(?:,<<0>>+)+\\)",[a("[^,()<>[\\];=+\\-*/%&|^]|<<0>>|<<1>>|<<2>>",[g,b,k])]),m,k]),w={keyword:p,punctuation:/[<>()?,.:[\]]/},v="'(?:[^\r\\n'\\\\]|\\\\.|\\\\[Uux][\\da-fA-F]{1,8})'",x='"(?:\\\\.|[^\\\\"\r\\n])*"';s.languages.csharp=s.languages.extend("clike",{string:[{pattern:t("(^|[^$\\\\])<<0>>",['@"(?:""|\\\\[\\s\\S]|[^\\\\"])*"(?!")']),lookbehind:!0,greedy:!0},{pattern:t("(^|[^@$\\\\])<<0>>",[x]),lookbehind:!0,greedy:!0},{pattern:RegExp(v),greedy:!0,alias:"character"}],"class-name":[{pattern:t("(\\busing\\s+static\\s+)<<0>>(?=\\s*;)",[m]),lookbehind:!0,inside:w},{pattern:t("(\\busing\\s+<<0>>\\s*=\\s*)<<1>>(?=\\s*;)",[h,y]),lookbehind:!0,inside:w},{pattern:t("(\\busing\\s+)<<0>>(?=\\s*=)",[h]),lookbehind:!0},{pattern:t("(\\b<<0>>\\s+)<<1>>",[d,f]),lookbehind:!0,inside:w},{pattern:t("(\\bcatch\\s*\\(\\s*)<<0>>",[m]),lookbehind:!0,inside:w},{pattern:t("(\\bwhere\\s+)<<0>>",[h]),lookbehind:!0},{pattern:t("(\\b(?:is|as)\\s+)<<0>>",[y]),lookbehind:!0,inside:w},{pattern:t("\\b<<0>>(?=\\s+(?!<<1>>)<<2>>(?:\\s*[=,;:{)\\]]|\\s+in))",[y,u,h]),inside:w}],keyword:p,number:/(?:\b0(?:x[\da-f_]*[\da-f]|b[01_]*[01])|(?:\B\.\d+(?:_+\d+)*|\b\d+(?:_+\d+)*(?:\.\d+(?:_+\d+)*)?)(?:e[-+]?\d+(?:_+\d+)*)?)(?:ul|lu|[dflmu])?\b/i,operator:/>>=?|<<=?|[-=]>|([-+&|])\1|~|\?\?=?|[-+*/%&|^!=<>]=?/,punctuation:/\?\.?|::|[{}[\];(),.:]/}),s.languages.insertBefore("csharp","number",{range:{pattern:/\.\./,alias:"operator"}}),s.languages.insertBefore("csharp","punctuation",{"named-parameter":{pattern:t("([(,]\\s*)<<0>>(?=\\s*:)",[h]),lookbehind:!0,alias:"punctuation"}}),s.languages.insertBefore("csharp","class-name",{namespace:{pattern:t("(\\b(?:namespace|using)\\s+)<<0>>(?:\\s*\\.\\s*<<0>>)*(?=\\s*[;{])",[h]),lookbehind:!0,inside:{punctuation:/\./}},"type-expression":{pattern:t("(\\b(?:default|typeof|sizeof)\\s*\\(\\s*)(?:[^()\\s]|\\s(?!\\s*\\))|<<0>>)*(?=\\s*\\))",[b]),lookbehind:!0,alias:"class-name",inside:w},"return-type":{pattern:t("<<0>>(?=\\s+(?:<<1>>\\s*(?:=>|[({]|\\.\\s*this\\s*\\[)|this\\s*\\[))",[y,m]),inside:w,alias:"class-name"},"constructor-invocation":{pattern:t("(\\bnew\\s+)<<0>>(?=\\s*[[({])",[y]),lookbehind:!0,inside:w,alias:"class-name"},"generic-method":{pattern:t("<<0>>\\s*<<1>>(?=\\s*\\()",[h,g]),inside:{function:t("^<<0>>",[h]),generic:{pattern:RegExp(g),alias:"class-name",inside:w}}},"type-list":{pattern:t("\\b((?:<<0>>\\s+<<1>>|where\\s+<<2>>)\\s*:\\s*)(?:<<3>>|<<4>>)(?:\\s*,\\s*(?:<<3>>|<<4>>))*(?=\\s*(?:where|[{;]|=>|$))",[d,f,h,y,p.source]),lookbehind:!0,inside:{keyword:p,"class-name":{pattern:RegExp(y),inside:w},punctuation:/,/}},preprocessor:{pattern:/(^\s*)#.*/m,lookbehind:!0,alias:"property",inside:{directive:{pattern:/(\s*#)\b(?:define|elif|else|endif|endregion|error|if|line|pragma|region|undef|warning)\b/,lookbehind:!0,alias:"keyword"}}}});var $=x+"|"+v,_=a("\\/(?![*/])|\\/\\/[^\r\\n]*[\r\\n]|\\/\\*[\\s\\S]*?\\*\\/|<<0>>",[$]),B=e(a("[^\"'/()]|<<0>>|\\(<>*\\)",[_]),2),E="\\b(?:assembly|event|field|method|module|param|property|return|type)\\b",R=a("<<0>>(?:\\s*\\(<<1>>*\\))?",[m,B]);s.languages.insertBefore("csharp","class-name",{attribute:{pattern:t("((?:^|[^\\s\\w>)?])\\s*\\[\\s*)(?:<<0>>\\s*:\\s*)?<<1>>(?:\\s*,\\s*<<1>>)*(?=\\s*\\])",[E,R]),lookbehind:!0,greedy:!0,inside:{target:{pattern:t("^<<0>>(?=\\s*:)",[E]),alias:"keyword"},"attribute-arguments":{pattern:t("\\(<<0>>*\\)",[B]),inside:s.languages.csharp},"class-name":{pattern:RegExp(m),inside:{punctuation:/\./}},punctuation:/[:,]/}}});var S=":[^}\r\\n]+",P=e(a("[^\"'/()]|<<0>>|\\(<>*\\)",[_]),2),z=a("\\{(?!\\{)(?:(?![}:])<<0>>)*<<1>>?\\}",[P,S]),j=e(a("[^\"'/()]|\\/(?!\\*)|\\/\\*.*?\\*\\/|<<0>>|\\(<>*\\)",[$]),2),A=a("\\{(?!\\{)(?:(?![}:])<<0>>)*<<1>>?\\}",[j,S]);function F(e,n){return{interpolation:{pattern:t("([^{](?:\\{\\{)*)<<0>>",[e]),lookbehind:!0,inside:{"format-string":{pattern:t("(^\\{(?:(?![}:])<<0>>)*)<<1>>(?=\\}$)",[n,S]),lookbehind:!0,inside:{punctuation:/^:/}},punctuation:/^\{|\}$/,expression:{pattern:/[\s\S]+/,alias:"language-csharp",inside:s.languages.csharp}}},string:/[\s\S]+/}}s.languages.insertBefore("csharp","string",{"interpolation-string":[{pattern:t('(^|[^\\\\])(?:\\$@|@\\$)"(?:""|\\\\[\\s\\S]|\\{\\{|<<0>>|[^\\\\{"])*"',[z]),lookbehind:!0,greedy:!0,inside:F(z,P)},{pattern:t('(^|[^@\\\\])\\$"(?:\\\\.|\\{\\{|<<0>>|[^\\\\"{])*"',[A]),lookbehind:!0,greedy:!0,inside:F(A,j)}]})}(Prism),Prism.languages.dotnet=Prism.languages.cs=Prism.languages.csharp; \ No newline at end of file +!function(s){function a(e,s){return e.replace(/<<(\d+)>>/g,function(e,n){return"(?:"+s[+n]+")"})}function t(e,n,s){return RegExp(a(e,n),s||"")}function e(e,n){for(var s=0;s>/g,function(){return"(?:"+e+")"});return e.replace(/<>/g,"[^\\s\\S]")}var n="bool byte char decimal double dynamic float int long object sbyte short string uint ulong ushort var void",i="class enum interface struct",r="add alias ascending async await by descending from get global group into join let nameof notnull on orderby partial remove select set unmanaged value when where where",o="abstract as base break case catch checked const continue default delegate do else event explicit extern finally fixed for foreach goto if implicit in internal is lock namespace new null operator out override params private protected public readonly ref return sealed sizeof stackalloc static switch this throw try typeof unchecked unsafe using virtual volatile while yield";function l(e){return"\\b(?:"+e.trim().replace(/ /g,"|")+")\\b"}var d=l(i),p=RegExp(l(n+" "+i+" "+r+" "+o)),c=l(i+" "+r+" "+o),u=l(n+" "+i+" "+o),g=e("<(?:[^<>;=+\\-*/%&|^]|<>)*>",2),b=e("\\((?:[^()]|<>)*\\)",2),h="@?\\b[A-Za-z_]\\w*\\b",f=a("<<0>>(?:\\s*<<1>>)?",[h,g]),m=a("(?!<<0>>)<<1>>(?:\\s*\\.\\s*<<1>>)*",[c,f]),k="\\[\\s*(?:,\\s*)*\\]",y=a("(?:<<0>>|<<1>>)(?:\\s*(?:\\?\\s*)?<<2>>)*(?:\\s*\\?)?",[a("\\(<<0>>+(?:,<<0>>+)+\\)",[a("[^,()<>[\\];=+\\-*/%&|^]|<<0>>|<<1>>|<<2>>",[g,b,k])]),m,k]),w={keyword:p,punctuation:/[<>()?,.:[\]]/},v="'(?:[^\r\n'\\\\]|\\\\.|\\\\[Uux][\\da-fA-F]{1,8})'",x='"(?:\\\\.|[^\\\\"\r\n])*"';s.languages.csharp=s.languages.extend("clike",{string:[{pattern:t("(^|[^$\\\\])<<0>>",['@"(?:""|\\\\[\\s\\S]|[^\\\\"])*"(?!")']),lookbehind:!0,greedy:!0},{pattern:t("(^|[^@$\\\\])<<0>>",[x]),lookbehind:!0,greedy:!0},{pattern:RegExp(v),greedy:!0,alias:"character"}],"class-name":[{pattern:t("(\\busing\\s+static\\s+)<<0>>(?=\\s*;)",[m]),lookbehind:!0,inside:w},{pattern:t("(\\busing\\s+<<0>>\\s*=\\s*)<<1>>(?=\\s*;)",[h,y]),lookbehind:!0,inside:w},{pattern:t("(\\busing\\s+)<<0>>(?=\\s*=)",[h]),lookbehind:!0},{pattern:t("(\\b<<0>>\\s+)<<1>>",[d,f]),lookbehind:!0,inside:w},{pattern:t("(\\bcatch\\s*\\(\\s*)<<0>>",[m]),lookbehind:!0,inside:w},{pattern:t("(\\bwhere\\s+)<<0>>",[h]),lookbehind:!0},{pattern:t("(\\b(?:is|as)\\s+)<<0>>",[y]),lookbehind:!0,inside:w},{pattern:t("\\b<<0>>(?=\\s+(?!<<1>>)<<2>>(?:\\s*[=,;:{)\\]]|\\s+in))",[y,u,h]),inside:w}],keyword:p,number:/(?:\b0(?:x[\da-f_]*[\da-f]|b[01_]*[01])|(?:\B\.\d+(?:_+\d+)*|\b\d+(?:_+\d+)*(?:\.\d+(?:_+\d+)*)?)(?:e[-+]?\d+(?:_+\d+)*)?)(?:ul|lu|[dflmu])?\b/i,operator:/>>=?|<<=?|[-=]>|([-+&|])\1|~|\?\?=?|[-+*/%&|^!=<>]=?/,punctuation:/\?\.?|::|[{}[\];(),.:]/}),s.languages.insertBefore("csharp","number",{range:{pattern:/\.\./,alias:"operator"}}),s.languages.insertBefore("csharp","punctuation",{"named-parameter":{pattern:t("([(,]\\s*)<<0>>(?=\\s*:)",[h]),lookbehind:!0,alias:"punctuation"}}),s.languages.insertBefore("csharp","class-name",{namespace:{pattern:t("(\\b(?:namespace|using)\\s+)<<0>>(?:\\s*\\.\\s*<<0>>)*(?=\\s*[;{])",[h]),lookbehind:!0,inside:{punctuation:/\./}},"type-expression":{pattern:t("(\\b(?:default|typeof|sizeof)\\s*\\(\\s*)(?:[^()\\s]|\\s(?!\\s*\\))|<<0>>)*(?=\\s*\\))",[b]),lookbehind:!0,alias:"class-name",inside:w},"return-type":{pattern:t("<<0>>(?=\\s+(?:<<1>>\\s*(?:=>|[({]|\\.\\s*this\\s*\\[)|this\\s*\\[))",[y,m]),inside:w,alias:"class-name"},"constructor-invocation":{pattern:t("(\\bnew\\s+)<<0>>(?=\\s*[[({])",[y]),lookbehind:!0,inside:w,alias:"class-name"},"generic-method":{pattern:t("<<0>>\\s*<<1>>(?=\\s*\\()",[h,g]),inside:{function:t("^<<0>>",[h]),generic:{pattern:RegExp(g),alias:"class-name",inside:w}}},"type-list":{pattern:t("\\b((?:<<0>>\\s+<<1>>|where\\s+<<2>>)\\s*:\\s*)(?:<<3>>|<<4>>)(?:\\s*,\\s*(?:<<3>>|<<4>>))*(?=\\s*(?:where|[{;]|=>|$))",[d,f,h,y,p.source]),lookbehind:!0,inside:{keyword:p,"class-name":{pattern:RegExp(y),inside:w},punctuation:/,/}},preprocessor:{pattern:/(^\s*)#.*/m,lookbehind:!0,alias:"property",inside:{directive:{pattern:/(\s*#)\b(?:define|elif|else|endif|endregion|error|if|line|pragma|region|undef|warning)\b/,lookbehind:!0,alias:"keyword"}}}});var $=x+"|"+v,_=a("\\/(?![*/])|\\/\\/[^\r\n]*[\r\n]|\\/\\*[\\s\\S]*?\\*\\/|<<0>>",[$]),B=e(a("[^\"'/()]|<<0>>|\\(<>*\\)",[_]),2),E="\\b(?:assembly|event|field|method|module|param|property|return|type)\\b",R=a("<<0>>(?:\\s*\\(<<1>>*\\))?",[m,B]);s.languages.insertBefore("csharp","class-name",{attribute:{pattern:t("((?:^|[^\\s\\w>)?])\\s*\\[\\s*)(?:<<0>>\\s*:\\s*)?<<1>>(?:\\s*,\\s*<<1>>)*(?=\\s*\\])",[E,R]),lookbehind:!0,greedy:!0,inside:{target:{pattern:t("^<<0>>(?=\\s*:)",[E]),alias:"keyword"},"attribute-arguments":{pattern:t("\\(<<0>>*\\)",[B]),inside:s.languages.csharp},"class-name":{pattern:RegExp(m),inside:{punctuation:/\./}},punctuation:/[:,]/}}});var S=":[^}\r\n]+",P=e(a("[^\"'/()]|<<0>>|\\(<>*\\)",[_]),2),z=a("\\{(?!\\{)(?:(?![}:])<<0>>)*<<1>>?\\}",[P,S]),j=e(a("[^\"'/()]|\\/(?!\\*)|\\/\\*.*?\\*\\/|<<0>>|\\(<>*\\)",[$]),2),A=a("\\{(?!\\{)(?:(?![}:])<<0>>)*<<1>>?\\}",[j,S]);function F(e,n){return{interpolation:{pattern:t("([^{](?:\\{\\{)*)<<0>>",[e]),lookbehind:!0,inside:{"format-string":{pattern:t("(^\\{(?:(?![}:])<<0>>)*)<<1>>(?=\\}$)",[n,S]),lookbehind:!0,inside:{punctuation:/^:/}},punctuation:/^\{|\}$/,expression:{pattern:/[\s\S]+/,alias:"language-csharp",inside:s.languages.csharp}}},string:/[\s\S]+/}}s.languages.insertBefore("csharp","string",{"interpolation-string":[{pattern:t('(^|[^\\\\])(?:\\$@|@\\$)"(?:""|\\\\[\\s\\S]|\\{\\{|<<0>>|[^\\\\{"])*"',[z]),lookbehind:!0,greedy:!0,inside:F(z,P)},{pattern:t('(^|[^@\\\\])\\$"(?:\\\\.|\\{\\{|<<0>>|[^\\\\"{])*"',[A]),lookbehind:!0,greedy:!0,inside:F(A,j)}]})}(Prism),Prism.languages.dotnet=Prism.languages.cs=Prism.languages.csharp; \ No newline at end of file diff --git a/components/prism-jq.min.js b/components/prism-jq.min.js index efbd206548..03f544baa9 100644 --- a/components/prism-jq.min.js +++ b/components/prism-jq.min.js @@ -1 +1 @@ -!function(e){var n="\\\\\\((?:[^()]|\\([^()]*\\))*\\)",t=RegExp('"(?:[^"\r\\n\\\\]|\\\\[^\r\\n(]|__)*"'.replace(/__/g,function(){return n})),i={interpolation:{pattern:RegExp("((?:^|[^\\\\])(?:\\\\{2})*)"+n),lookbehind:!0,inside:{content:{pattern:/^(\\\()[\s\S]+(?=\)$)/,lookbehind:!0,inside:null},punctuation:/^\\\(|\)$/}}},a=e.languages.jq={comment:/#.*/,property:{pattern:RegExp(t.source+"(?=\\s*:(?!:))"),greedy:!0,inside:i},string:{pattern:t,greedy:!0,inside:i},function:{pattern:/(\bdef\s+)[a-z_]\w+/i,lookbehind:!0},variable:/\B\$\w+/,"property-literal":{pattern:/[a-z_]\w*(?=\s*:(?!:))/i,alias:"property"},keyword:/\b(?:as|break|catch|def|elif|else|end|foreach|if|import|include|label|module|modulemeta|null|reduce|then|try|while)\b/,boolean:/\b(?:true|false)\b/,number:/(?:\b\d+\.|\B\.)?\d+(?:[eE][+-]?\d+)?\b/,operator:[{pattern:/\|=?/,alias:"pipe"},/\.\.|[!=<>]?=|\?\/\/|\/\/=?|[-+*/%]=?|[<>?]|\b(?:and|or|not)\b/],"c-style-function":{pattern:/\b[a-z_]\w*(?=\s*\()/i,alias:"function"},punctuation:/::|[()\[\]{},:;]|\.(?=\s*[\[\w$])/,dot:{pattern:/\./,alias:"important"}};i.interpolation.inside.content.inside=a}(Prism); \ No newline at end of file +!function(e){var n="\\\\\\((?:[^()]|\\([^()]*\\))*\\)",t=RegExp('"(?:[^"\r\n\\\\]|\\\\[^\r\n(]|__)*"'.replace(/__/g,function(){return n})),i={interpolation:{pattern:RegExp("((?:^|[^\\\\])(?:\\\\{2})*)"+n),lookbehind:!0,inside:{content:{pattern:/^(\\\()[\s\S]+(?=\)$)/,lookbehind:!0,inside:null},punctuation:/^\\\(|\)$/}}},a=e.languages.jq={comment:/#.*/,property:{pattern:RegExp(t.source+"(?=\\s*:(?!:))"),greedy:!0,inside:i},string:{pattern:t,greedy:!0,inside:i},function:{pattern:/(\bdef\s+)[a-z_]\w+/i,lookbehind:!0},variable:/\B\$\w+/,"property-literal":{pattern:/[a-z_]\w*(?=\s*:(?!:))/i,alias:"property"},keyword:/\b(?:as|break|catch|def|elif|else|end|foreach|if|import|include|label|module|modulemeta|null|reduce|then|try|while)\b/,boolean:/\b(?:true|false)\b/,number:/(?:\b\d+\.|\B\.)?\d+(?:[eE][+-]?\d+)?\b/,operator:[{pattern:/\|=?/,alias:"pipe"},/\.\.|[!=<>]?=|\?\/\/|\/\/=?|[-+*/%]=?|[<>?]|\b(?:and|or|not)\b/],"c-style-function":{pattern:/\b[a-z_]\w*(?=\s*\()/i,alias:"function"},punctuation:/::|[()\[\]{},:;]|\.(?=\s*[\[\w$])/,dot:{pattern:/\./,alias:"important"}};i.interpolation.inside.content.inside=a}(Prism); \ No newline at end of file diff --git a/components/prism-markdown.min.js b/components/prism-markdown.min.js index 8540b3dc9f..2ce180d075 100644 --- a/components/prism-markdown.min.js +++ b/components/prism-markdown.min.js @@ -1 +1 @@ -!function(d){function n(n,e){return n=n.replace(//g,function(){return"(?:\\\\.|[^\\\\\\n\r]|(?:\n|\r\\n?)(?!\n|\r\\n?))"}),e&&(n=n+"|"+n.replace(/_/g,"\\*")),RegExp("((?:^|[^\\\\])(?:\\\\{2})*)(?:"+n+")")}var e="(?:\\\\.|``.+?``|`[^`\r\\n]+`|[^\\\\|\r\\n`])+",t="\\|?__(?:\\|__)+\\|?(?:(?:\n|\r\\n?)|$)".replace(/__/g,function(){return e}),a="\\|?[ \t]*:?-{3,}:?[ \t]*(?:\\|[ \t]*:?-{3,}:?[ \t]*)+\\|?(?:\n|\r\\n?)";d.languages.markdown=d.languages.extend("markup",{}),d.languages.insertBefore("markdown","prolog",{blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+t+a+"(?:"+t+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+t+a+")(?:"+t+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(e),inside:d.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+t+")"+a+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+t+"$"),inside:{"table-header":{pattern:RegExp(e),alias:"important",inside:d.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/``.+?``|`[^`\r\n]+`/,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#+.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n("__(?:(?!_)|_(?:(?!_))+_)+__",!0),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n("_(?:(?!_)|__(?:(?!_))+__)+_",!0),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n("(~~?)(?:(?!~))+?\\2",!1),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},url:{pattern:n('!?\\[(?:(?!\\]))+\\](?:\\([^\\s)]+(?:[\t ]+"(?:\\\\.|[^"\\\\])*")?\\)| ?\\[(?:(?!\\]))+\\])',!1),lookbehind:!0,greedy:!0,inside:{variable:{pattern:/(\[)[^\]]+(?=\]$)/,lookbehind:!0},content:{pattern:/(^!?\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},string:{pattern:/"(?:\\.|[^"\\])*"(?=\)$)/}}}}),["url","bold","italic","strike"].forEach(function(e){["url","bold","italic","strike"].forEach(function(n){e!==n&&(d.languages.markdown[e].inside.content.inside[n]=d.languages.markdown[n])})}),d.hooks.add("after-tokenize",function(n){"markdown"!==n.language&&"md"!==n.language||!function n(e){if(e&&"string"!=typeof e)for(var t=0,a=e.length;t/g,function(){return"(?:\\\\.|[^\\\\\n\r]|(?:\n|\r\n?)(?!\n|\r\n?))"}),e&&(n=n+"|"+n.replace(/_/g,"\\*")),RegExp("((?:^|[^\\\\])(?:\\\\{2})*)(?:"+n+")")}var e="(?:\\\\.|``.+?``|`[^`\r\n]+`|[^\\\\|\r\n`])+",t="\\|?__(?:\\|__)+\\|?(?:(?:\n|\r\n?)|$)".replace(/__/g,function(){return e}),a="\\|?[ \t]*:?-{3,}:?[ \t]*(?:\\|[ \t]*:?-{3,}:?[ \t]*)+\\|?(?:\n|\r\n?)";d.languages.markdown=d.languages.extend("markup",{}),d.languages.insertBefore("markdown","prolog",{blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+t+a+"(?:"+t+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+t+a+")(?:"+t+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(e),inside:d.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+t+")"+a+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+t+"$"),inside:{"table-header":{pattern:RegExp(e),alias:"important",inside:d.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/``.+?``|`[^`\r\n]+`/,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#+.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n("__(?:(?!_)|_(?:(?!_))+_)+__",!0),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n("_(?:(?!_)|__(?:(?!_))+__)+_",!0),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n("(~~?)(?:(?!~))+?\\2",!1),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},url:{pattern:n('!?\\[(?:(?!\\]))+\\](?:\\([^\\s)]+(?:[\t ]+"(?:\\\\.|[^"\\\\])*")?\\)| ?\\[(?:(?!\\]))+\\])',!1),lookbehind:!0,greedy:!0,inside:{variable:{pattern:/(\[)[^\]]+(?=\]$)/,lookbehind:!0},content:{pattern:/(^!?\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},string:{pattern:/"(?:\\.|[^"\\])*"(?=\)$)/}}}}),["url","bold","italic","strike"].forEach(function(e){["url","bold","italic","strike"].forEach(function(n){e!==n&&(d.languages.markdown[e].inside.content.inside[n]=d.languages.markdown[n])})}),d.hooks.add("after-tokenize",function(n){"markdown"!==n.language&&"md"!==n.language||!function n(e){if(e&&"string"!=typeof e)for(var t=0,a=e.length;t|\/(?![*/])||\(*\)|\[*\]|\{*\}|\\[\s\S])/.source.replace(//g,function(){return"\"(?:\\\\.|[^\\\\\"\r\\n])*\"|'(?:\\\\.|[^\\\\'\r\\n])*'"}).replace(//g,function(){return"\\/\\/.*|\\/\\*(?:(?!\\*\\/)[\\s\\S])*\\*\\/"}),n=0;n<2;n++)r=r.replace(//g,function(){return r});r=r.replace(//g,"[^\\s\\S]"),e.languages.qml={comment:{pattern:/\/\/.*|\/\*[\s\S]*?\*\//,greedy:!0},"javascript-function":{pattern:RegExp("((?:^|;)[ \t]*)function\\s+[_$a-zA-Z\\xA0-\\uFFFF][$\\w\\xA0-\\uFFFF]*\\s*\\(*\\)\\s*\\{*\\}".replace(//g,function(){return r}),"m"),lookbehind:!0,greedy:!0,alias:"language-javascript",inside:e.languages.javascript},"class-name":{pattern:/((?:^|[:;])[ \t]*)(?!\d)\w+(?=[ \t]*\{|[ \t]+on\b)/m,lookbehind:!0},property:[{pattern:/((?:^|[;{])[ \t]*)(?!\d)\w+(?:\.\w+)*(?=[ \t]*:)/m,lookbehind:!0},{pattern:/((?:^|[;{])[ \t]*)property[ \t]+(?!\d)\w+(?:\.\w+)*[ \t]+(?!\d)\w+(?:\.\w+)*(?=[ \t]*:)/m,lookbehind:!0,inside:{keyword:/^property/,property:/\w+(?:\.\w+)*/}}],"javascript-expression":{pattern:RegExp("(:[ \t]*)(?![\\s;}[])(?:(?!$|[;}]))+".replace(//g,function(){return r}),"m"),lookbehind:!0,greedy:!0,alias:"language-javascript",inside:e.languages.javascript},string:/"(?:\\.|[^\\"\r\n])*"/,keyword:/\b(?:as|import|on)\b/,punctuation:/[{}[\]:;,]/}}(Prism); \ No newline at end of file +!function(e){for(var r=/(?:[^\\()[\]{}"'/]||\/(?![*/])||\(*\)|\[*\]|\{*\}|\\[\s\S])/.source.replace(//g,function(){return"\"(?:\\\\.|[^\\\\\"\r\n])*\"|'(?:\\\\.|[^\\\\'\r\n])*'"}).replace(//g,function(){return"\\/\\/.*|\\/\\*(?:(?!\\*\\/)[\\s\\S])*\\*\\/"}),n=0;n<2;n++)r=r.replace(//g,function(){return r});r=r.replace(//g,"[^\\s\\S]"),e.languages.qml={comment:{pattern:/\/\/.*|\/\*[\s\S]*?\*\//,greedy:!0},"javascript-function":{pattern:RegExp("((?:^|;)[ \t]*)function\\s+[_$a-zA-Z\\xA0-\\uFFFF][$\\w\\xA0-\\uFFFF]*\\s*\\(*\\)\\s*\\{*\\}".replace(//g,function(){return r}),"m"),lookbehind:!0,greedy:!0,alias:"language-javascript",inside:e.languages.javascript},"class-name":{pattern:/((?:^|[:;])[ \t]*)(?!\d)\w+(?=[ \t]*\{|[ \t]+on\b)/m,lookbehind:!0},property:[{pattern:/((?:^|[;{])[ \t]*)(?!\d)\w+(?:\.\w+)*(?=[ \t]*:)/m,lookbehind:!0},{pattern:/((?:^|[;{])[ \t]*)property[ \t]+(?!\d)\w+(?:\.\w+)*[ \t]+(?!\d)\w+(?:\.\w+)*(?=[ \t]*:)/m,lookbehind:!0,inside:{keyword:/^property/,property:/\w+(?:\.\w+)*/}}],"javascript-expression":{pattern:RegExp("(:[ \t]*)(?![\\s;}[])(?:(?!$|[;}]))+".replace(//g,function(){return r}),"m"),lookbehind:!0,greedy:!0,alias:"language-javascript",inside:e.languages.javascript},string:/"(?:\\.|[^\\"\r\n])*"/,keyword:/\b(?:as|import|on)\b/,punctuation:/[{}[\]:;,]/}}(Prism); \ No newline at end of file diff --git a/components/prism-robotframework.min.js b/components/prism-robotframework.min.js index 6a91ae4b3a..842d9a330f 100644 --- a/components/prism-robotframework.min.js +++ b/components/prism-robotframework.min.js @@ -1 +1 @@ -!function(t){var r={pattern:/(^[ \t]*| {2}|\t)#.*/m,lookbehind:!0,greedy:!0},o={pattern:/((?:^|[^\\])(?:\\{2})*)[$@&%]\{(?:[^{}\r\n]|\{[^{}\r\n]*\})*\}/,lookbehind:!0,inside:{punctuation:/^[$@&%]\{|\}$/}};function n(t,n){var e={"section-header":{pattern:/^ ?\*{3}.+?\*{3}/,alias:"keyword"}};for(var a in n)e[a]=n[a];return e.tag={pattern:/([\r\n](?: |\t)[ \t]*)\[[-\w]+\]/,lookbehind:!0,inside:{punctuation:/\[|\]/}},e.variable=o,e.comment=r,{pattern:RegExp("^ ?\\*{3}[ \t]*[ \t]*\\*{3}(?:.|[\r\\n](?!\\*{3}))*".replace(//g,function(){return t}),"im"),alias:"section",inside:e}}var e={pattern:/(\[Documentation\](?: |\t)[ \t]*)(?![ \t]|#)(?:.|[ \t]*(?:\r\n?|\n)[ \t]*\.{3}[ \t]*)+/,lookbehind:!0,alias:"string"},a={pattern:/([\r\n] ?)(?!#)(?:\S(?:[ \t]\S)*)+/,lookbehind:!0,alias:"function",inside:{variable:o}},i={pattern:/([\r\n](?: |\t)[ \t]*)(?!\[|\.{3}|#)(?:\S(?:[ \t]\S)*)+/,lookbehind:!0,inside:{variable:o}};t.languages.robotframework={settings:n("Settings",{documentation:{pattern:/([\r\n] ?Documentation(?: |\t)[ \t]*)(?![ \t]|#)(?:.|[ \t]*(?:\r\n?|\n)[ \t]*\.{3}[ \t]*)+/,lookbehind:!0,alias:"string"},property:{pattern:/([\r\n] ?)(?!\.{3}|#)(?:\S(?:[ \t]\S)*)+/,lookbehind:!0}}),variables:n("Variables"),"test-cases":n("Test Cases",{"test-name":a,documentation:e,property:i}),keywords:n("Keywords",{"keyword-name":a,documentation:e,property:i}),tasks:n("Tasks",{"task-name":a,documentation:e,property:i}),comment:r},t.languages.robot=t.languages.robotframework}(Prism); \ No newline at end of file +!function(t){var r={pattern:/(^[ \t]*| {2}|\t)#.*/m,lookbehind:!0,greedy:!0},o={pattern:/((?:^|[^\\])(?:\\{2})*)[$@&%]\{(?:[^{}\r\n]|\{[^{}\r\n]*\})*\}/,lookbehind:!0,inside:{punctuation:/^[$@&%]\{|\}$/}};function n(t,n){var e={"section-header":{pattern:/^ ?\*{3}.+?\*{3}/,alias:"keyword"}};for(var a in n)e[a]=n[a];return e.tag={pattern:/([\r\n](?: |\t)[ \t]*)\[[-\w]+\]/,lookbehind:!0,inside:{punctuation:/\[|\]/}},e.variable=o,e.comment=r,{pattern:RegExp("^ ?\\*{3}[ \t]*[ \t]*\\*{3}(?:.|[\r\n](?!\\*{3}))*".replace(//g,function(){return t}),"im"),alias:"section",inside:e}}var e={pattern:/(\[Documentation\](?: |\t)[ \t]*)(?![ \t]|#)(?:.|[ \t]*(?:\r\n?|\n)[ \t]*\.{3}[ \t]*)+/,lookbehind:!0,alias:"string"},a={pattern:/([\r\n] ?)(?!#)(?:\S(?:[ \t]\S)*)+/,lookbehind:!0,alias:"function",inside:{variable:o}},i={pattern:/([\r\n](?: |\t)[ \t]*)(?!\[|\.{3}|#)(?:\S(?:[ \t]\S)*)+/,lookbehind:!0,inside:{variable:o}};t.languages.robotframework={settings:n("Settings",{documentation:{pattern:/([\r\n] ?Documentation(?: |\t)[ \t]*)(?![ \t]|#)(?:.|[ \t]*(?:\r\n?|\n)[ \t]*\.{3}[ \t]*)+/,lookbehind:!0,alias:"string"},property:{pattern:/([\r\n] ?)(?!\.{3}|#)(?:\S(?:[ \t]\S)*)+/,lookbehind:!0}}),variables:n("Variables"),"test-cases":n("Test Cases",{"test-name":a,documentation:e,property:i}),keywords:n("Keywords",{"keyword-name":a,documentation:e,property:i}),tasks:n("Tasks",{"task-name":a,documentation:e,property:i}),comment:r},t.languages.robot=t.languages.robotframework}(Prism); \ No newline at end of file diff --git a/components/prism-shell-session.min.js b/components/prism-shell-session.min.js index c296a38fa0..31d2e7f39d 100644 --- a/components/prism-shell-session.min.js +++ b/components/prism-shell-session.min.js @@ -1 +1 @@ -!function(n){var s=["([\"'])(?:\\\\[\\s\\S]|\\$\\([^)]+\\)|`[^`]+`|(?!\\1)[^\\\\])*\\1","<<-?\\s*(\\w+?)\\s*(?:\r?\n|\r)[\\s\\S]*?(?:\r?\n|\r)\\2","<<-?\\s*([\"'])(\\w+)\\3\\s*(?:\r?\n|\r)[\\s\\S]*?(?:\r?\n|\r)\\4"].join("|");n.languages["shell-session"]={info:{pattern:/^[^\r\n$#*!]+(?=[$#])/m,alias:"punctuation",inside:{path:{pattern:/(:)[\s\S]+/,lookbehind:!0},user:/^[^\s@:$#*!/\\]+@[^\s@:$#*!/\\]+(?=:|$)/,punctuation:/:/}},command:{pattern:RegExp("[$#](?:[^\\\\\\r\n'\"<]|\\\\.|<>)+".replace(/<>/g,function(){return s})),greedy:!0,inside:{bash:{pattern:/(^[$#]\s*)[\s\S]+/,lookbehind:!0,alias:"language-bash",inside:n.languages.bash},"shell-symbol":{pattern:/^[$#]/,alias:"important"}}},output:/.(?:.*(?:\r\n?|\n|.$))*/}}(Prism); \ No newline at end of file +!function(n){var s=["([\"'])(?:\\\\[\\s\\S]|\\$\\([^)]+\\)|`[^`]+`|(?!\\1)[^\\\\])*\\1","<<-?\\s*(\\w+?)\\s*(?:\r?\n|\r)[\\s\\S]*?(?:\r?\n|\r)\\2","<<-?\\s*([\"'])(\\w+)\\3\\s*(?:\r?\n|\r)[\\s\\S]*?(?:\r?\n|\r)\\4"].join("|");n.languages["shell-session"]={info:{pattern:/^[^\r\n$#*!]+(?=[$#])/m,alias:"punctuation",inside:{path:{pattern:/(:)[\s\S]+/,lookbehind:!0},user:/^[^\s@:$#*!/\\]+@[^\s@:$#*!/\\]+(?=:|$)/,punctuation:/:/}},command:{pattern:RegExp("[$#](?:[^\\\\\r\n'\"<]|\\\\.|<>)+".replace(/<>/g,function(){return s})),greedy:!0,inside:{bash:{pattern:/(^[$#]\s*)[\s\S]+/,lookbehind:!0,alias:"language-bash",inside:n.languages.bash},"shell-symbol":{pattern:/^[$#]/,alias:"important"}}},output:/.(?:.*(?:\r\n?|\n|.$))*/}}(Prism); \ No newline at end of file diff --git a/components/prism-yaml.min.js b/components/prism-yaml.min.js index fa7cd59cfc..f4be9e0b27 100644 --- a/components/prism-yaml.min.js +++ b/components/prism-yaml.min.js @@ -1 +1 @@ -!function(n){var t=/[*&][^\s[\]{},]+/,e=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,r="(?:"+e.source+"(?:[ \t]+"+t.source+")?|"+t.source+"(?:[ \t]+"+e.source+")?)";function a(n,t){t=(t||"").replace(/m/g,"")+"m";var e="([:\\-,[{]\\s*(?:\\s<>[ \t]+)?)(?:<>)(?=[ \t]*(?:$|,|]|}|\\s*#))".replace(/<>/g,function(){return r}).replace(/<>/g,function(){return n});return RegExp(e,t)}n.languages.yaml={scalar:{pattern:RegExp("([\\-:]\\s*(?:\\s<>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)[^\r\\n]+(?:\\2[^\r\\n]+)*)".replace(/<>/g,function(){return r})),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp("((?:^|[:\\-,[{\r\\n?])[ \t]*(?:<>[ \t]+)?)[^\r\\n{[\\]},#\\s]+?(?=\\s*:\\s)".replace(/<>/g,function(){return r})),lookbehind:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:a("\\d{4}-\\d\\d?-\\d\\d?(?:[tT]|[ \t]+)\\d\\d?:\\d{2}:\\d{2}(?:\\.\\d*)?[ \t]*(?:Z|[-+]\\d\\d?(?::\\d{2})?)?|\\d{4}-\\d{2}-\\d{2}|\\d\\d?:\\d{2}(?::\\d{2}(?:\\.\\d*)?)?"),lookbehind:!0,alias:"number"},boolean:{pattern:a("true|false","i"),lookbehind:!0,alias:"important"},null:{pattern:a("null|~","i"),lookbehind:!0,alias:"important"},string:{pattern:a("(\"|')(?:(?!\\2)[^\\\\\\r\n]|\\\\.)*\\2"),lookbehind:!0,greedy:!0},number:{pattern:a("[+-]?(?:0x[\\da-f]+|0o[0-7]+|(?:\\d+\\.?\\d*|\\.?\\d+)(?:e[+-]?\\d+)?|\\.inf|\\.nan)","i"),lookbehind:!0},tag:e,important:t,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},n.languages.yml=n.languages.yaml}(Prism); \ No newline at end of file +!function(n){var t=/[*&][^\s[\]{},]+/,e=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,r="(?:"+e.source+"(?:[ \t]+"+t.source+")?|"+t.source+"(?:[ \t]+"+e.source+")?)";function a(n,t){t=(t||"").replace(/m/g,"")+"m";var e="([:\\-,[{]\\s*(?:\\s<>[ \t]+)?)(?:<>)(?=[ \t]*(?:$|,|]|}|\\s*#))".replace(/<>/g,function(){return r}).replace(/<>/g,function(){return n});return RegExp(e,t)}n.languages.yaml={scalar:{pattern:RegExp("([\\-:]\\s*(?:\\s<>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)[^\r\n]+(?:\\2[^\r\n]+)*)".replace(/<>/g,function(){return r})),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp("((?:^|[:\\-,[{\r\n?])[ \t]*(?:<>[ \t]+)?)[^\r\n{[\\]},#\\s]+?(?=\\s*:\\s)".replace(/<>/g,function(){return r})),lookbehind:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:a("\\d{4}-\\d\\d?-\\d\\d?(?:[tT]|[ \t]+)\\d\\d?:\\d{2}:\\d{2}(?:\\.\\d*)?[ \t]*(?:Z|[-+]\\d\\d?(?::\\d{2})?)?|\\d{4}-\\d{2}-\\d{2}|\\d\\d?:\\d{2}(?::\\d{2}(?:\\.\\d*)?)?"),lookbehind:!0,alias:"number"},boolean:{pattern:a("true|false","i"),lookbehind:!0,alias:"important"},null:{pattern:a("null|~","i"),lookbehind:!0,alias:"important"},string:{pattern:a("(\"|')(?:(?!\\2)[^\\\\\r\n]|\\\\.)*\\2"),lookbehind:!0,greedy:!0},number:{pattern:a("[+-]?(?:0x[\\da-f]+|0o[0-7]+|(?:\\d+\\.?\\d*|\\.?\\d+)(?:e[+-]?\\d+)?|\\.inf|\\.nan)","i"),lookbehind:!0},tag:e,important:t,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},n.languages.yml=n.languages.yaml}(Prism); \ No newline at end of file diff --git a/gulpfile.js/index.js b/gulpfile.js/index.js index 14e8a19dc3..f944acfff4 100644 --- a/gulpfile.js/index.js +++ b/gulpfile.js/index.js @@ -33,11 +33,18 @@ function inlineRegexSource() { /\/((?:[^\n\r[\\\/]|\\.|\[(?:[^\n\r\\\]]|\\.)*\])*)\/\.source\b/g, (m, source) => { // escape backslashes - source = source.replace(/\\/g, '\\\\'); + source = source.replace(/\\(.)/g, function (m, g1) { + // characters like /\n/ can just be kept as "\n" instead of being escaped to "\\n" + if (/[nrt0]/.test(g1)) { + return m; + } + if ('\\' == g1) { + return '\\\\\\\\'; // escape using 4 backslashes + } + return '\\\\' + g1; + }); // escape single quotes source = source.replace(/'/g, "\\'"); - // unescape characters like \\n and \\t to \n and \t - source = source.replace(/(^|[^\\])\\\\([nrt0])/g, '$1\\$2'); // wrap source in single quotes return "'" + source + "'"; } diff --git a/plugins/diff-highlight/prism-diff-highlight.min.js b/plugins/diff-highlight/prism-diff-highlight.min.js index d3cba4d3ad..8d9aefb2cb 100644 --- a/plugins/diff-highlight/prism-diff-highlight.min.js +++ b/plugins/diff-highlight/prism-diff-highlight.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof Prism&&Prism.languages.diff){var o=/diff-([\w-]+)/i,m=/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/gi,c=RegExp("(?:__|[^\r\\n<])*(?:\r\\n?|\n|(?:__|[^\r\\n<])(?![^\r\\n]))".replace(/__/g,function(){return m.source}),"gi"),d=Prism.languages.diff.PREFIXES;Prism.hooks.add("before-sanity-check",function(e){var a=e.language;o.test(a)&&!e.grammar&&(e.grammar=Prism.languages[a]=Prism.languages.diff)}),Prism.hooks.add("before-tokenize",function(e){var a=e.language;o.test(a)&&!Prism.languages[a]&&(Prism.languages[a]=Prism.languages.diff)}),Prism.hooks.add("wrap",function(e){var a,s;if("diff"!==e.language){var n=o.exec(e.language);if(!n)return;a=n[1],s=Prism.languages[a]}if(e.type in d){var r,i=e.content.replace(m,"").replace(/</g,"<").replace(/&/g,"&"),g=i.replace(/(^|[\r\n])./g,"$1");r=s?Prism.highlight(g,s,a):Prism.util.encode(g);var f,t=new Prism.Token("prefix",d[e.type],[/\w+/.exec(e.type)[0]]),u=Prism.Token.stringify(t,e.language),l=[];for(c.lastIndex=0;f=c.exec(r);)l.push(u+f[0]);/(?:^|[\r\n]).$/.test(i)&&l.push(u),e.content=l.join(""),s&&e.classes.push("language-"+a)}})}}(); \ No newline at end of file +!function(){if("undefined"!=typeof Prism&&Prism.languages.diff){var o=/diff-([\w-]+)/i,m=/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/gi,c=RegExp("(?:__|[^\r\n<])*(?:\r\n?|\n|(?:__|[^\r\n<])(?![^\r\n]))".replace(/__/g,function(){return m.source}),"gi"),d=Prism.languages.diff.PREFIXES;Prism.hooks.add("before-sanity-check",function(e){var a=e.language;o.test(a)&&!e.grammar&&(e.grammar=Prism.languages[a]=Prism.languages.diff)}),Prism.hooks.add("before-tokenize",function(e){var a=e.language;o.test(a)&&!Prism.languages[a]&&(Prism.languages[a]=Prism.languages.diff)}),Prism.hooks.add("wrap",function(e){var a,s;if("diff"!==e.language){var n=o.exec(e.language);if(!n)return;a=n[1],s=Prism.languages[a]}if(e.type in d){var r,i=e.content.replace(m,"").replace(/</g,"<").replace(/&/g,"&"),g=i.replace(/(^|[\r\n])./g,"$1");r=s?Prism.highlight(g,s,a):Prism.util.encode(g);var f,t=new Prism.Token("prefix",d[e.type],[/\w+/.exec(e.type)[0]]),u=Prism.Token.stringify(t,e.language),l=[];for(c.lastIndex=0;f=c.exec(r);)l.push(u+f[0]);/(?:^|[\r\n]).$/.test(i)&&l.push(u),e.content=l.join(""),s&&e.classes.push("language-"+a)}})}}(); \ No newline at end of file From be909b18faa0afa899bb71ac1ab1f06c499277ce Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Sat, 28 Mar 2020 14:33:35 +0100 Subject: [PATCH 0476/1100] Added Treeview plugin (#2265) --- components.js | 2 +- components.json | 5 + plugins/treeview/index.html | 83 ++++++++++++++ plugins/treeview/prism-treeview.css | 146 +++++++++++++++++++++++++ plugins/treeview/prism-treeview.js | 63 +++++++++++ plugins/treeview/prism-treeview.min.js | 1 + 6 files changed, 299 insertions(+), 1 deletion(-) create mode 100644 plugins/treeview/index.html create mode 100644 plugins/treeview/prism-treeview.css create mode 100644 plugins/treeview/prism-treeview.js create mode 100644 plugins/treeview/prism-treeview.min.js diff --git a/components.js b/components.js index 6f2dcf1d2e..fd583fb412 100644 --- a/components.js +++ b/components.js @@ -1,2 +1,2 @@ -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"Augmented Backus–Naur form","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"Backus–Naur form","alias":"rbnf","aliasTitles":{"rbnf":"Routing Backus–Naur form"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dax":{"title":"DAX","owner":"peterbud"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"Extended Backus–Naur form","owner":"RunDevelopment"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment"},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"http":{"title":"HTTP","optional":["css","javascript","json","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"json":{"title":"JSON","owner":"CupOfTea696"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","modify":["actionscript","coffeescript","flow","javascript","typescript","vala"],"owner":"RunDevelopment"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"solidity":{"title":"Solidity (Ethereum)","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","visual-basic"],"owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true}}}; +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"Augmented Backus–Naur form","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"Backus–Naur form","alias":"rbnf","aliasTitles":{"rbnf":"Routing Backus–Naur form"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dax":{"title":"DAX","owner":"peterbud"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"Extended Backus–Naur form","owner":"RunDevelopment"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment"},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"http":{"title":"HTTP","optional":["css","javascript","json","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"json":{"title":"JSON","owner":"CupOfTea696"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","modify":["actionscript","coffeescript","flow","javascript","typescript","vala"],"owner":"RunDevelopment"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"solidity":{"title":"Solidity (Ethereum)","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","visual-basic"],"owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; if (typeof module !== 'undefined' && module.exports) { module.exports = components; } \ No newline at end of file diff --git a/components.json b/components.json index 3dcac11920..70eef9e16d 100644 --- a/components.json +++ b/components.json @@ -1267,6 +1267,11 @@ "description": "Filters the elements the highlightAll and highlightAllUnder methods actually highlight.", "owner": "RunDevelopment", "noCSS": true + }, + "treeview": { + "title": "Treeview", + "description": "A language with special styles to highlight file system tree structures.", + "owner": "Golmote" } } } diff --git a/plugins/treeview/index.html b/plugins/treeview/index.html new file mode 100644 index 0000000000..126edf2274 --- /dev/null +++ b/plugins/treeview/index.html @@ -0,0 +1,83 @@ + + + + + + + Treeview ▲ Prism plugins + + + + + + + + + + + +
          + +
          +

          How to use

          +

          You may use tree -F to get a compatible text structure.

          + +
          root_folder/
          +|-- a first folder/
          +|   |-- holidays.mov
          +|   |-- javascript-file.js
          +|   `-- some_picture.jpg
          +|-- documents/
          +|   |-- spreadsheet.xls
          +|   |-- manual.pdf
          +|   |-- document.docx
          +|   `-- presentation.ppt
          +|       `-- test
          +|-- empty_folder/
          +|-- going deeper/
          +|   |-- going deeper/
          +|   |   `-- going deeper/
          +|   |        `-- going deeper/
          +|   |            `-- .secret_file
          +|   |-- style.css
          +|   `-- index.html
          +|-- music and movies/
          +|   |-- great-song.mp3
          +|   |-- S01E02.new.episode.avi
          +|   |-- S01E02.new.episode.nfo
          +|   `-- track 1.cda
          +|-- .gitignore
          +|-- .htaccess
          +|-- .npmignore
          +|-- archive 1.zip
          +|-- archive 2.tar.gz
          +|-- logo.svg
          +`-- README.md
          + +

          You can also use the following box-drawing characters to represent the tree:

          + +
          root_folder/
          +├── a first folder/
          +|   ├── holidays.mov
          +|   ├── javascript-file.js
          +|   └── some_picture.jpg
          +├── documents/
          +|   ├── spreadsheet.xls
          +|   ├── manual.pdf
          +|   ├── document.docx
          +|   └── presentation.ppt
          +└── etc.
          +
          + +
          + +
          + + + + + + + + + diff --git a/plugins/treeview/prism-treeview.css b/plugins/treeview/prism-treeview.css new file mode 100644 index 0000000000..77957804a0 --- /dev/null +++ b/plugins/treeview/prism-treeview.css @@ -0,0 +1,146 @@ +.token.treeview-part .entry-line { + position: relative; + text-indent: -99em; + display: inline-block; + vertical-align: top; + width: 1.2em; +} +.token.treeview-part .entry-line:before, +.token.treeview-part .line-h:after { + content: ''; + position: absolute; + top: 0; + left: 50%; + width: 50%; + height: 100%; +} +.token.treeview-part .line-h:before, +.token.treeview-part .line-v:before { + border-left: 1px solid #ccc; +} +.token.treeview-part .line-v-last:before { + height: 50%; + border-left: 1px solid #ccc; + border-bottom: 1px solid #ccc; +} +.token.treeview-part .line-h:after { + height: 50%; + border-bottom: 1px solid #ccc; +} +.token.treeview-part .entry-name { + position: relative; + display: inline-block; + vertical-align: top; + padding: 0 0 0 1.5em; +} +.token.treeview-part .entry-name:before { + content: ''; + position: absolute; + top: 0; + left: 0.25em; + height: 100%; + width: 1em; + background: no-repeat 50% 50% / contain; +} + +.token.treeview-part .entry-name.dotfile { + opacity: 0.5; +} + +.token.treeview-part .entry-name:before { + background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/Pg0KPCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIiA+DQo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgaGVpZ2h0PSIxNzkuMiIgd2lkdGg9IjE3OS4yIj4NCgk8Zz4NCgkJPHBhdGggdHJhbnNmb3JtPSJzY2FsZSgwLjEsLTAuMSkgdHJhbnNsYXRlKDAsLTE1MzYpIiBkPSJNMTQ2OCAxMTU2cTI4IC0yOCA0OCAtNzZ0MjAgLTg4di0xMTUycTAgLTQwIC0yOCAtNjh0LTY4IC0yOGgtMTM0NHEtNDAgMCAtNjggMjh0LTI4IDY4djE2MDBxMCA0MCAyOCA2OHQ2OCAyOGg4OTZxNDAgMCA4OCAtMjB0NzYgLTQ4ek0xMDI0IDE0MDB2LTM3NmgzNzZxLTEwIDI5IC0yMiA0MWwtMzEzIDMxM3EtMTIgMTIgLTQxIDIyek0xNDA4IC0xMjh2MTAyNGgtNDE2cS00MCAwIC02OCAyOHQtMjggNjh2NDE2aC03Njh2LTE1MzZoMTI4MHogIiAvPg0KCTwvZz4NCjwvc3ZnPg=='); +} +.token.treeview-part .entry-name.dir:before { + background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/Pg0KPCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIiA+DQo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgaGVpZ2h0PSIxNzkuMiIgd2lkdGg9IjE3OS4yIj4NCgk8Zz4NCgkJPHBhdGggdHJhbnNmb3JtPSJzY2FsZSgwLjEsLTAuMSkgdHJhbnNsYXRlKDAsLTE1MzYpIiBkPSJNMTUzNiAyMjR2NzA0cTAgNDAgLTI4IDY4dC02OCAyOGgtNzA0cS00MCAwIC02OCAyOHQtMjggNjh2NjRxMCA0MCAtMjggNjh0LTY4IDI4aC0zMjBxLTQwIDAgLTY4IC0yOHQtMjggLTY4di05NjBxMCAtNDAgMjggLTY4dDY4IC0yOGgxMjE2cTQwIDAgNjggMjh0MjggNjh6TTE2NjQgOTI4di03MDRxMCAtOTIgLTY2IC0xNTh0LTE1OCAtNjZoLTEyMTZxLTkyIDAgLTE1OCA2NnQtNjYgMTU4djk2MHEwIDkyIDY2IDE1OHQxNTggNjZoMzIwIHE5MiAwIDE1OCAtNjZ0NjYgLTE1OHYtMzJoNjcycTkyIDAgMTU4IC02NnQ2NiAtMTU4eiIgLz4NCgk8L2c+DQo8L3N2Zz4='); + +} +.token.treeview-part .entry-name.ext-bmp:before, +.token.treeview-part .entry-name.ext-eps:before, +.token.treeview-part .entry-name.ext-gif:before, +.token.treeview-part .entry-name.ext-jpe:before, +.token.treeview-part .entry-name.ext-jpg:before, +.token.treeview-part .entry-name.ext-jpeg:before, +.token.treeview-part .entry-name.ext-png:before, +.token.treeview-part .entry-name.ext-svg:before, +.token.treeview-part .entry-name.ext-tiff:before { + background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/Pg0KPCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIiA+DQo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgaGVpZ2h0PSIxNzkuMiIgd2lkdGg9IjE3OS4yIj4NCgk8Zz4NCgkJPHBhdGggdHJhbnNmb3JtPSJzY2FsZSgwLjEsLTAuMSkgdHJhbnNsYXRlKDAsLTE1MzYpIiBkPSJNMTQ2OCAxMTU2cTI4IC0yOCA0OCAtNzZ0MjAgLTg4di0xMTUycTAgLTQwIC0yOCAtNjh0LTY4IC0yOGgtMTM0NHEtNDAgMCAtNjggMjh0LTI4IDY4djE2MDBxMCA0MCAyOCA2OHQ2OCAyOGg4OTZxNDAgMCA4OCAtMjB0NzYgLTQ4ek0xMDI0IDE0MDB2LTM3NmgzNzZxLTEwIDI5IC0yMiA0MWwtMzEzIDMxM3EtMTIgMTIgLTQxIDIyek0xNDA4IC0xMjh2MTAyNGgtNDE2cS00MCAwIC02OCAyOHQtMjggNjh2NDE2aC03Njh2LTE1MzZoMTI4MHogTTEyODAgMzIwdi0zMjBoLTEwMjR2MTkybDE5MiAxOTJsMTI4IC0xMjhsMzg0IDM4NHpNNDQ4IDUxMnEtODAgMCAtMTM2IDU2dC01NiAxMzZ0NTYgMTM2dDEzNiA1NnQxMzYgLTU2dDU2IC0xMzZ0LTU2IC0xMzZ0LTEzNiAtNTZ6IiAvPg0KCTwvZz4NCjwvc3ZnPg=='); +} +.token.treeview-part .entry-name.ext-cfg:before, +.token.treeview-part .entry-name.ext-conf:before, +.token.treeview-part .entry-name.ext-config:before, +.token.treeview-part .entry-name.ext-csv:before, +.token.treeview-part .entry-name.ext-ini:before, +.token.treeview-part .entry-name.ext-log:before, +.token.treeview-part .entry-name.ext-md:before, +.token.treeview-part .entry-name.ext-nfo:before, +.token.treeview-part .entry-name.ext-txt:before { + background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/Pg0KPCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIiA+DQo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgaGVpZ2h0PSIxNzkuMiIgd2lkdGg9IjE3OS4yIj4NCgk8Zz4NCgkJPHBhdGggdHJhbnNmb3JtPSJzY2FsZSgwLjEsLTAuMSkgdHJhbnNsYXRlKDAsLTE1MzYpIiBkPSJNMTQ2OCAxMTU2cTI4IC0yOCA0OCAtNzZ0MjAgLTg4di0xMTUycTAgLTQwIC0yOCAtNjh0LTY4IC0yOGgtMTM0NHEtNDAgMCAtNjggMjh0LTI4IDY4djE2MDBxMCA0MCAyOCA2OHQ2OCAyOGg4OTZxNDAgMCA4OCAtMjB0NzYgLTQ4ek0xMDI0IDE0MDB2LTM3NmgzNzZxLTEwIDI5IC0yMiA0MWwtMzEzIDMxM3EtMTIgMTIgLTQxIDIyek0xNDA4IC0xMjh2MTAyNGgtNDE2cS00MCAwIC02OCAyOHQtMjggNjh2NDE2aC03Njh2LTE1MzZoMTI4MHogTTM4NCA3MzZxMCAxNCA5IDIzdDIzIDloNzA0cTE0IDAgMjMgLTl0OSAtMjN2LTY0cTAgLTE0IC05IC0yM3QtMjMgLTloLTcwNHEtMTQgMCAtMjMgOXQtOSAyM3Y2NHpNMTEyMCA1MTJxMTQgMCAyMyAtOXQ5IC0yM3YtNjRxMCAtMTQgLTkgLTIzdC0yMyAtOWgtNzA0cS0xNCAwIC0yMyA5dC05IDIzdjY0cTAgMTQgOSAyM3QyMyA5aDcwNHpNMTEyMCAyNTZxMTQgMCAyMyAtOXQ5IC0yM3YtNjRxMCAtMTQgLTkgLTIzdC0yMyAtOWgtNzA0IHEtMTQgMCAtMjMgOXQtOSAyM3Y2NHEwIDE0IDkgMjN0MjMgOWg3MDR6IiAvPg0KCTwvZz4NCjwvc3ZnPg=='); +} +.token.treeview-part .entry-name.ext-asp:before, +.token.treeview-part .entry-name.ext-aspx:before, +.token.treeview-part .entry-name.ext-c:before, +.token.treeview-part .entry-name.ext-cc:before, +.token.treeview-part .entry-name.ext-cpp:before, +.token.treeview-part .entry-name.ext-cs:before, +.token.treeview-part .entry-name.ext-css:before, +.token.treeview-part .entry-name.ext-h:before, +.token.treeview-part .entry-name.ext-hh:before, +.token.treeview-part .entry-name.ext-htm:before, +.token.treeview-part .entry-name.ext-html:before, +.token.treeview-part .entry-name.ext-jav:before, +.token.treeview-part .entry-name.ext-java:before, +.token.treeview-part .entry-name.ext-js:before, +.token.treeview-part .entry-name.ext-php:before, +.token.treeview-part .entry-name.ext-rb:before, +.token.treeview-part .entry-name.ext-xml:before { + background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/Pg0KPCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIiA+DQo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgaGVpZ2h0PSIxNzkuMiIgd2lkdGg9IjE3OS4yIj4NCgk8Zz4NCgkJPHBhdGggdHJhbnNmb3JtPSJzY2FsZSgwLjEsLTAuMSkgdHJhbnNsYXRlKDAsLTE1MzYpIiBkPSJNMTQ2OCAxMTU2cTI4IC0yOCA0OCAtNzZ0MjAgLTg4di0xMTUycTAgLTQwIC0yOCAtNjh0LTY4IC0yOGgtMTM0NHEtNDAgMCAtNjggMjh0LTI4IDY4djE2MDBxMCA0MCAyOCA2OHQ2OCAyOGg4OTZxNDAgMCA4OCAtMjB0NzYgLTQ4ek0xMDI0IDE0MDB2LTM3NmgzNzZxLTEwIDI5IC0yMiA0MWwtMzEzIDMxM3EtMTIgMTIgLTQxIDIyek0xNDA4IC0xMjh2MTAyNGgtNDE2cS00MCAwIC02OCAyOHQtMjggNjh2NDE2aC03Njh2LTE1MzZoMTI4MHogTTQ4MCA3NjhxOCAxMSAyMSAxMi41dDI0IC02LjVsNTEgLTM4cTExIC04IDEyLjUgLTIxdC02LjUgLTI0bC0xODIgLTI0M2wxODIgLTI0M3E4IC0xMSA2LjUgLTI0dC0xMi41IC0yMWwtNTEgLTM4cS0xMSAtOCAtMjQgLTYuNXQtMjEgMTIuNWwtMjI2IDMwMXEtMTQgMTkgMCAzOHpNMTI4MiA0NjdxMTQgLTE5IDAgLTM4bC0yMjYgLTMwMXEtOCAtMTEgLTIxIC0xMi41dC0yNCA2LjVsLTUxIDM4cS0xMSA4IC0xMi41IDIxdDYuNSAyNGwxODIgMjQzIGwtMTgyIDI0M3EtOCAxMSAtNi41IDI0dDEyLjUgMjFsNTEgMzhxMTEgOCAyNCA2LjV0MjEgLTEyLjV6TTY2MiA2cS0xMyAyIC0yMC41IDEzdC01LjUgMjRsMTM4IDgzMXEyIDEzIDEzIDIwLjV0MjQgNS41bDYzIC0xMHExMyAtMiAyMC41IC0xM3Q1LjUgLTI0bC0xMzggLTgzMXEtMiAtMTMgLTEzIC0yMC41dC0yNCAtNS41eiIgLz4NCgk8L2c+DQo8L3N2Zz4='); +} +.token.treeview-part .entry-name.ext-7z:before, +.token.treeview-part .entry-name.ext-bz:before, +.token.treeview-part .entry-name.ext-bz2:before, +.token.treeview-part .entry-name.ext-gz:before, +.token.treeview-part .entry-name.ext-rar:before, +.token.treeview-part .entry-name.ext-tar:before, +.token.treeview-part .entry-name.ext-tgz:before, +.token.treeview-part .entry-name.ext-zip:before { + background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/Pg0KPCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIiA+DQo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgaGVpZ2h0PSIxNzkuMiIgd2lkdGg9IjE3OS4yIj4NCgk8Zz4NCgkJPHBhdGggdHJhbnNmb3JtPSJzY2FsZSgwLjEsLTAuMSkgdHJhbnNsYXRlKDAsLTE1MzYpIiBkPSJNNjQwIDExNTJ2MTI4aC0xMjh2LTEyOGgxMjh6TTc2OCAxMDI0djEyOGgtMTI4di0xMjhoMTI4ek02NDAgODk2djEyOGgtMTI4di0xMjhoMTI4ek03NjggNzY4djEyOGgtMTI4di0xMjhoMTI4ek0xNDY4IDExNTZxMjggLTI4IDQ4IC03NnQyMCAtODh2LTExNTJxMCAtNDAgLTI4IC02OHQtNjggLTI4aC0xMzQ0cS00MCAwIC02OCAyOHQtMjggNjh2MTYwMHEwIDQwIDI4IDY4dDY4IDI4aDg5NnE0MCAwIDg4IC0yMHQ3NiAtNDh6TTEwMjQgMTQwMCB2LTM3NmgzNzZxLTEwIDI5IC0yMiA0MWwtMzEzIDMxM3EtMTIgMTIgLTQxIDIyek0xNDA4IC0xMjh2MTAyNGgtNDE2cS00MCAwIC02OCAyOHQtMjggNjh2NDE2aC0xMjh2LTEyOGgtMTI4djEyOGgtNTEydi0xNTM2aDEyODB6TTc4MSA1OTNsMTA3IC0zNDlxOCAtMjcgOCAtNTJxMCAtODMgLTcyLjUgLTEzNy41dC0xODMuNSAtNTQuNXQtMTgzLjUgNTQuNXQtNzIuNSAxMzcuNXEwIDI1IDggNTJxMjEgNjMgMTIwIDM5NnYxMjhoMTI4di0xMjhoNzkgcTIyIDAgMzkgLTEzdDIzIC0zNHpNNjQwIDEyOHE1MyAwIDkwLjUgMTl0MzcuNSA0NXQtMzcuNSA0NXQtOTAuNSAxOXQtOTAuNSAtMTl0LTM3LjUgLTQ1dDM3LjUgLTQ1dDkwLjUgLTE5eiIgLz4NCgk8L2c+DQo8L3N2Zz4='); +} +.token.treeview-part .entry-name.ext-aac:before, +.token.treeview-part .entry-name.ext-au:before, +.token.treeview-part .entry-name.ext-cda:before, +.token.treeview-part .entry-name.ext-flac:before, +.token.treeview-part .entry-name.ext-mp3:before, +.token.treeview-part .entry-name.ext-oga:before, +.token.treeview-part .entry-name.ext-ogg:before, +.token.treeview-part .entry-name.ext-wav:before, +.token.treeview-part .entry-name.ext-wma:before { + background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/Pg0KPCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIiA+DQo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgaGVpZ2h0PSIxNzkuMiIgd2lkdGg9IjE3OS4yIj4NCgk8Zz4NCgkJPHBhdGggdHJhbnNmb3JtPSJzY2FsZSgwLjEsLTAuMSkgdHJhbnNsYXRlKDAsLTE1MzYpIiBkPSJNMTQ2OCAxMTU2cTI4IC0yOCA0OCAtNzZ0MjAgLTg4di0xMTUycTAgLTQwIC0yOCAtNjh0LTY4IC0yOGgtMTM0NHEtNDAgMCAtNjggMjh0LTI4IDY4djE2MDBxMCA0MCAyOCA2OHQ2OCAyOGg4OTZxNDAgMCA4OCAtMjB0NzYgLTQ4ek0xMDI0IDE0MDB2LTM3NmgzNzZxLTEwIDI5IC0yMiA0MWwtMzEzIDMxM3EtMTIgMTIgLTQxIDIyek0xNDA4IC0xMjh2MTAyNGgtNDE2cS00MCAwIC02OCAyOHQtMjggNjh2NDE2aC03Njh2LTE1MzZoMTI4MHogTTYyMCA2ODZxMjAgLTggMjAgLTMwdi01NDRxMCAtMjIgLTIwIC0zMHEtOCAtMiAtMTIgLTJxLTEyIDAgLTIzIDlsLTE2NiAxNjdoLTEzMXEtMTQgMCAtMjMgOXQtOSAyM3YxOTJxMCAxNCA5IDIzdDIzIDloMTMxbDE2NiAxNjdxMTYgMTUgMzUgN3pNMTAzNyAtM3EzMSAwIDUwIDI0cTEyOSAxNTkgMTI5IDM2M3QtMTI5IDM2M3EtMTYgMjEgLTQzIDI0dC00NyAtMTRxLTIxIC0xNyAtMjMuNSAtNDMuNXQxNC41IC00Ny41IHExMDAgLTEyMyAxMDAgLTI4MnQtMTAwIC0yODJxLTE3IC0yMSAtMTQuNSAtNDcuNXQyMy41IC00Mi41cTE4IC0xNSA0MCAtMTV6TTgyNiAxNDVxMjcgMCA0NyAyMHE4NyA5MyA4NyAyMTl0LTg3IDIxOXEtMTggMTkgLTQ1IDIwdC00NiAtMTd0LTIwIC00NC41dDE4IC00Ni41cTUyIC01NyA1MiAtMTMxdC01MiAtMTMxcS0xOSAtMjAgLTE4IC00Ni41dDIwIC00NC41cTIwIC0xNyA0NCAtMTd6IiAvPg0KCTwvZz4NCjwvc3ZnPg=='); +} +.token.treeview-part .entry-name.ext-avi:before, +.token.treeview-part .entry-name.ext-flv:before, +.token.treeview-part .entry-name.ext-mkv:before, +.token.treeview-part .entry-name.ext-mov:before, +.token.treeview-part .entry-name.ext-mp4:before, +.token.treeview-part .entry-name.ext-mpeg:before, +.token.treeview-part .entry-name.ext-mpg:before, +.token.treeview-part .entry-name.ext-ogv:before, +.token.treeview-part .entry-name.ext-webm:before { + background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/Pg0KPCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIiA+DQo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgaGVpZ2h0PSIxNzkuMiIgd2lkdGg9IjE3OS4yIj4NCgk8Zz4NCgkJPHBhdGggdHJhbnNmb3JtPSJzY2FsZSgwLjEsLTAuMSkgdHJhbnNsYXRlKDAsLTE1MzYpIiBkPSJNMTQ2OCAxMTU2cTI4IC0yOCA0OCAtNzZ0MjAgLTg4di0xMTUycTAgLTQwIC0yOCAtNjh0LTY4IC0yOGgtMTM0NHEtNDAgMCAtNjggMjh0LTI4IDY4djE2MDBxMCA0MCAyOCA2OHQ2OCAyOGg4OTZxNDAgMCA4OCAtMjB0NzYgLTQ4ek0xMDI0IDE0MDB2LTM3NmgzNzZxLTEwIDI5IC0yMiA0MWwtMzEzIDMxM3EtMTIgMTIgLTQxIDIyek0xNDA4IC0xMjh2MTAyNGgtNDE2cS00MCAwIC02OCAyOHQtMjggNjh2NDE2aC03Njh2LTE1MzZoMTI4MHogTTc2OCA3NjhxNTIgMCA5MCAtMzh0MzggLTkwdi0zODRxMCAtNTIgLTM4IC05MHQtOTAgLTM4aC0zODRxLTUyIDAgLTkwIDM4dC0zOCA5MHYzODRxMCA1MiAzOCA5MHQ5MCAzOGgzODR6TTEyNjAgNzY2cTIwIC04IDIwIC0zMHYtNTc2cTAgLTIyIC0yMCAtMzBxLTggLTIgLTEyIC0ycS0xNCAwIC0yMyA5bC0yNjUgMjY2djkwbDI2NSAyNjZxOSA5IDIzIDlxNCAwIDEyIC0yeiIgLz4NCgk8L2c+DQo8L3N2Zz4='); +} +.token.treeview-part .entry-name.ext-pdf:before { + background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/Pg0KPCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIiA+DQo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgaGVpZ2h0PSIxNzkuMiIgd2lkdGg9IjE3OS4yIj4NCgk8Zz4NCgkJPHBhdGggdHJhbnNmb3JtPSJzY2FsZSgwLjEsLTAuMSkgdHJhbnNsYXRlKDAsLTE1MzYpIiBkPSJNMTQ2OCAxMTU2cTI4IC0yOCA0OCAtNzZ0MjAgLTg4di0xMTUycTAgLTQwIC0yOCAtNjh0LTY4IC0yOGgtMTM0NHEtNDAgMCAtNjggMjh0LTI4IDY4djE2MDBxMCA0MCAyOCA2OHQ2OCAyOGg4OTZxNDAgMCA4OCAtMjB0NzYgLTQ4ek0xMDI0IDE0MDB2LTM3NmgzNzZxLTEwIDI5IC0yMiA0MWwtMzEzIDMxM3EtMTIgMTIgLTQxIDIyek0xNDA4IC0xMjh2MTAyNGgtNDE2cS00MCAwIC02OCAyOHQtMjggNjh2NDE2aC03Njh2LTE1MzZoMTI4MHogTTg5NCA0NjVxMzMgLTI2IDg0IC01NnE1OSA3IDExNyA3cTE0NyAwIDE3NyAtNDlxMTYgLTIyIDIgLTUycTAgLTEgLTEgLTJsLTIgLTJ2LTFxLTYgLTM4IC03MSAtMzhxLTQ4IDAgLTExNSAyMHQtMTMwIDUzcS0yMjEgLTI0IC0zOTIgLTgzcS0xNTMgLTI2MiAtMjQyIC0yNjJxLTE1IDAgLTI4IDdsLTI0IDEycS0xIDEgLTYgNXEtMTAgMTAgLTYgMzZxOSA0MCA1NiA5MS41dDEzMiA5Ni41cTE0IDkgMjMgLTZxMiAtMiAyIC00cTUyIDg1IDEwNyAxOTcgcTY4IDEzNiAxMDQgMjYycS0yNCA4MiAtMzAuNSAxNTkuNXQ2LjUgMTI3LjVxMTEgNDAgNDIgNDBoMjFoMXEyMyAwIDM1IC0xNXExOCAtMjEgOSAtNjhxLTIgLTYgLTQgLThxMSAtMyAxIC04di0zMHEtMiAtMTIzIC0xNCAtMTkycTU1IC0xNjQgMTQ2IC0yMzh6TTMxOCA1NHE1MiAyNCAxMzcgMTU4cS01MSAtNDAgLTg3LjUgLTg0dC00OS41IC03NHpNNzE2IDk3NHEtMTUgLTQyIC0yIC0xMzJxMSA3IDcgNDRxMCAzIDcgNDNxMSA0IDQgOCBxLTEgMSAtMSAydC0wLjUgMS41dC0wLjUgMS41cS0xIDIyIC0xMyAzNnEwIC0xIC0xIC0ydi0yek01OTIgMzEzcTEzNSA1NCAyODQgODFxLTIgMSAtMTMgOS41dC0xNiAxMy41cS03NiA2NyAtMTI3IDE3NnEtMjcgLTg2IC04MyAtMTk3cS0zMCAtNTYgLTQ1IC04M3pNMTIzOCAzMjlxLTI0IDI0IC0xNDAgMjRxNzYgLTI4IDEyNCAtMjhxMTQgMCAxOCAxcTAgMSAtMiAzeiIgLz4NCgk8L2c+DQo8L3N2Zz4='); +} +.token.treeview-part .entry-name.ext-xls:before, +.token.treeview-part .entry-name.ext-xlsx:before { + background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/Pg0KPCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIiA+DQo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgaGVpZ2h0PSIxNzkuMiIgd2lkdGg9IjE3OS4yIj4NCgk8Zz4NCgkJPHBhdGggdHJhbnNmb3JtPSJzY2FsZSgwLjEsLTAuMSkgdHJhbnNsYXRlKDAsLTE1MzYpIiBkPSJNMTQ2OCAxMTU2cTI4IC0yOCA0OCAtNzZ0MjAgLTg4di0xMTUycTAgLTQwIC0yOCAtNjh0LTY4IC0yOGgtMTM0NHEtNDAgMCAtNjggMjh0LTI4IDY4djE2MDBxMCA0MCAyOCA2OHQ2OCAyOGg4OTZxNDAgMCA4OCAtMjB0NzYgLTQ4ek0xMDI0IDE0MDB2LTM3NmgzNzZxLTEwIDI5IC0yMiA0MWwtMzEzIDMxM3EtMTIgMTIgLTQxIDIyek0xNDA4IC0xMjh2MTAyNGgtNDE2cS00MCAwIC02OCAyOHQtMjggNjh2NDE2aC03Njh2LTE1MzZoMTI4MHogTTQyOSAxMDZ2LTEwNmgyODF2MTA2aC03NWwxMDMgMTYxcTUgNyAxMCAxNi41dDcuNSAxMy41dDMuNSA0aDJxMSAtNCA1IC0xMHEyIC00IDQuNSAtNy41dDYgLTh0Ni41IC04LjVsMTA3IC0xNjFoLTc2di0xMDZoMjkxdjEwNmgtNjhsLTE5MiAyNzNsMTk1IDI4Mmg2N3YxMDdoLTI3OXYtMTA3aDc0bC0xMDMgLTE1OXEtNCAtNyAtMTAgLTE2LjV0LTkgLTEzLjVsLTIgLTNoLTJxLTEgNCAtNSAxMHEtNiAxMSAtMTcgMjNsLTEwNiAxNTloNzZ2MTA3IGgtMjkwdi0xMDdoNjhsMTg5IC0yNzJsLTE5NCAtMjgzaC02OHoiIC8+DQoJPC9nPg0KPC9zdmc+'); +} +.token.treeview-part .entry-name.ext-doc:before, +.token.treeview-part .entry-name.ext-docm:before, +.token.treeview-part .entry-name.ext-docx:before { + background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/Pg0KPCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIiA+DQo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgaGVpZ2h0PSIxNzkuMiIgd2lkdGg9IjE3OS4yIj4NCgk8Zz4NCgkJPHBhdGggdHJhbnNmb3JtPSJzY2FsZSgwLjEsLTAuMSkgdHJhbnNsYXRlKDAsLTE1MzYpIiBkPSJNMTQ2OCAxMTU2cTI4IC0yOCA0OCAtNzZ0MjAgLTg4di0xMTUycTAgLTQwIC0yOCAtNjh0LTY4IC0yOGgtMTM0NHEtNDAgMCAtNjggMjh0LTI4IDY4djE2MDBxMCA0MCAyOCA2OHQ2OCAyOGg4OTZxNDAgMCA4OCAtMjB0NzYgLTQ4ek0xMDI0IDE0MDB2LTM3NmgzNzZxLTEwIDI5IC0yMiA0MWwtMzEzIDMxM3EtMTIgMTIgLTQxIDIyek0xNDA4IC0xMjh2MTAyNGgtNDE2cS00MCAwIC02OCAyOHQtMjggNjh2NDE2aC03Njh2LTE1MzZoMTI4MHogTTIzMyA3Njh2LTEwN2g3MGwxNjQgLTY2MWgxNTlsMTI4IDQ4NXE3IDIwIDEwIDQ2cTIgMTYgMiAyNGg0bDMgLTI0cTEgLTMgMy41IC0yMHQ1LjUgLTI2bDEyOCAtNDg1aDE1OWwxNjQgNjYxaDcwdjEwN2gtMzAwdi0xMDdoOTBsLTk5IC00MzhxLTUgLTIwIC03IC00NmwtMiAtMjFoLTRsLTMgMjFxLTEgNSAtNCAyMXQtNSAyNWwtMTQ0IDU0NWgtMTE0bC0xNDQgLTU0NXEtMiAtOSAtNC41IC0yNC41dC0zLjUgLTIxLjVsLTQgLTIxaC00bC0yIDIxIHEtMiAyNiAtNyA0NmwtOTkgNDM4aDkwdjEwN2gtMzAweiIgLz4NCgk8L2c+DQo8L3N2Zz4='); +} +.token.treeview-part .entry-name.ext-pps:before, +.token.treeview-part .entry-name.ext-ppt:before, +.token.treeview-part .entry-name.ext-pptx:before { + background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/Pg0KPCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIiA+DQo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgaGVpZ2h0PSIxNzkuMiIgd2lkdGg9IjE3OS4yIj4NCgk8Zz4NCgkJPHBhdGggdHJhbnNmb3JtPSJzY2FsZSgwLjEsLTAuMSkgdHJhbnNsYXRlKDAsLTE1MzYpIiBkPSJNMTQ2OCAxMTU2cTI4IC0yOCA0OCAtNzZ0MjAgLTg4di0xMTUycTAgLTQwIC0yOCAtNjh0LTY4IC0yOGgtMTM0NHEtNDAgMCAtNjggMjh0LTI4IDY4djE2MDBxMCA0MCAyOCA2OHQ2OCAyOGg4OTZxNDAgMCA4OCAtMjB0NzYgLTQ4ek0xMDI0IDE0MDB2LTM3NmgzNzZxLTEwIDI5IC0yMiA0MWwtMzEzIDMxM3EtMTIgMTIgLTQxIDIyek0xNDA4IC0xMjh2MTAyNGgtNDE2cS00MCAwIC02OCAyOHQtMjggNjh2NDE2aC03Njh2LTE1MzZoMTI4MHogTTQxNiAxMDZ2LTEwNmgzMjd2MTA2aC05M3YxNjdoMTM3cTc2IDAgMTE4IDE1cTY3IDIzIDEwNi41IDg3dDM5LjUgMTQ2cTAgODEgLTM3IDE0MXQtMTAwIDg3cS00OCAxOSAtMTMwIDE5aC0zNjh2LTEwN2g5MnYtNTU1aC05MnpNNzY5IDM4NmgtMTE5djI2OGgxMjBxNTIgMCA4MyAtMThxNTYgLTMzIDU2IC0xMTVxMCAtODkgLTYyIC0xMjBxLTMxIC0xNSAtNzggLTE1eiIgLz4NCgk8L2c+DQo8L3N2Zz4='); +} diff --git a/plugins/treeview/prism-treeview.js b/plugins/treeview/prism-treeview.js new file mode 100644 index 0000000000..41fa83c89a --- /dev/null +++ b/plugins/treeview/prism-treeview.js @@ -0,0 +1,63 @@ +Prism.languages.treeview = { + 'treeview-part': { + pattern: /^.+/m, + inside: { + 'entry-line': [ + { + pattern: /\|-- |├── /, + alias: 'line-h' + }, + { + pattern: /\| |│ /, + alias: 'line-v' + }, + { + pattern: /`-- |└── /, + alias: 'line-v-last' + }, + { + pattern: / {4}/, + alias: 'line-v-gap' + } + ], + 'entry-name': { + pattern: /.*\S.*/, + inside: { + // symlink + 'operator': / -> /, + } + } + } + } +}; + +Prism.hooks.add('wrap', function (env) { + if (env.language === 'treeview' && env.type === 'entry-name') { + var classes = env.classes; + + var folderPattern = /(^|[^\\])\/\s*$/; + if (folderPattern.test(env.content)) { + // folder + + // remove trailing / + env.content = env.content.replace(folderPattern, '$1'); + classes.push('dir'); + } else { + // file + + // remove trailing file marker + env.content = env.content.replace(/(^|[^\\])[=*|]\s*$/, '$1'); + + var parts = env.content.toLowerCase().replace(/\s+/g, '').split('.'); + while (parts.length > 1) { + parts.shift(); + // Ex. 'foo.min.js' would become 'foo.min.js' + classes.push('ext-' + parts.join('-')); + } + } + + if (env.content[0] === '.') { + classes.push('dotfile'); + } + } +}); diff --git a/plugins/treeview/prism-treeview.min.js b/plugins/treeview/prism-treeview.min.js new file mode 100644 index 0000000000..8c2283ada1 --- /dev/null +++ b/plugins/treeview/prism-treeview.min.js @@ -0,0 +1 @@ +Prism.languages.treeview={"treeview-part":{pattern:/^.+/m,inside:{"entry-line":[{pattern:/\|-- |├── /,alias:"line-h"},{pattern:/\| |│ /,alias:"line-v"},{pattern:/`-- |└── /,alias:"line-v-last"},{pattern:/ {4}/,alias:"line-v-gap"}],"entry-name":{pattern:/.*\S.*/,inside:{operator:/ -> /}}}}},Prism.hooks.add("wrap",function(e){if("treeview"===e.language&&"entry-name"===e.type){var t=e.classes,n=/(^|[^\\])\/\s*$/;if(n.test(e.content))e.content=e.content.replace(n,"$1"),t.push("dir");else{e.content=e.content.replace(/(^|[^\\])[=*|]\s*$/,"$1");for(var a=e.content.toLowerCase().replace(/\s+/g,"").split(".");1 Date: Sun, 29 Mar 2020 18:30:31 +0200 Subject: [PATCH 0477/1100] C#: Fixed keywords in type lists blocking type names (#2277) --- components/prism-csharp.js | 1 + components/prism-csharp.min.js | 2 +- .../csharp/generic-constraint_feature.test | 13 +++++++----- .../csharp/preprocessor_feature.test | 20 +++++++++---------- tests/languages/csharp/type-list_feature.test | 19 ++++++++++++++++++ 5 files changed, 39 insertions(+), 16 deletions(-) diff --git a/components/prism-csharp.js b/components/prism-csharp.js index ba511b3362..2807b148ca 100644 --- a/components/prism-csharp.js +++ b/components/prism-csharp.js @@ -246,6 +246,7 @@ 'keyword': keywords, 'class-name': { pattern: RegExp(typeExpression), + greedy: true, inside: typeInside }, 'punctuation': /,/ diff --git a/components/prism-csharp.min.js b/components/prism-csharp.min.js index 381102ae56..66a31bf1bc 100644 --- a/components/prism-csharp.min.js +++ b/components/prism-csharp.min.js @@ -1 +1 @@ -!function(s){function a(e,s){return e.replace(/<<(\d+)>>/g,function(e,n){return"(?:"+s[+n]+")"})}function t(e,n,s){return RegExp(a(e,n),s||"")}function e(e,n){for(var s=0;s>/g,function(){return"(?:"+e+")"});return e.replace(/<>/g,"[^\\s\\S]")}var n="bool byte char decimal double dynamic float int long object sbyte short string uint ulong ushort var void",i="class enum interface struct",r="add alias ascending async await by descending from get global group into join let nameof notnull on orderby partial remove select set unmanaged value when where where",o="abstract as base break case catch checked const continue default delegate do else event explicit extern finally fixed for foreach goto if implicit in internal is lock namespace new null operator out override params private protected public readonly ref return sealed sizeof stackalloc static switch this throw try typeof unchecked unsafe using virtual volatile while yield";function l(e){return"\\b(?:"+e.trim().replace(/ /g,"|")+")\\b"}var d=l(i),p=RegExp(l(n+" "+i+" "+r+" "+o)),c=l(i+" "+r+" "+o),u=l(n+" "+i+" "+o),g=e("<(?:[^<>;=+\\-*/%&|^]|<>)*>",2),b=e("\\((?:[^()]|<>)*\\)",2),h="@?\\b[A-Za-z_]\\w*\\b",f=a("<<0>>(?:\\s*<<1>>)?",[h,g]),m=a("(?!<<0>>)<<1>>(?:\\s*\\.\\s*<<1>>)*",[c,f]),k="\\[\\s*(?:,\\s*)*\\]",y=a("(?:<<0>>|<<1>>)(?:\\s*(?:\\?\\s*)?<<2>>)*(?:\\s*\\?)?",[a("\\(<<0>>+(?:,<<0>>+)+\\)",[a("[^,()<>[\\];=+\\-*/%&|^]|<<0>>|<<1>>|<<2>>",[g,b,k])]),m,k]),w={keyword:p,punctuation:/[<>()?,.:[\]]/},v="'(?:[^\r\n'\\\\]|\\\\.|\\\\[Uux][\\da-fA-F]{1,8})'",x='"(?:\\\\.|[^\\\\"\r\n])*"';s.languages.csharp=s.languages.extend("clike",{string:[{pattern:t("(^|[^$\\\\])<<0>>",['@"(?:""|\\\\[\\s\\S]|[^\\\\"])*"(?!")']),lookbehind:!0,greedy:!0},{pattern:t("(^|[^@$\\\\])<<0>>",[x]),lookbehind:!0,greedy:!0},{pattern:RegExp(v),greedy:!0,alias:"character"}],"class-name":[{pattern:t("(\\busing\\s+static\\s+)<<0>>(?=\\s*;)",[m]),lookbehind:!0,inside:w},{pattern:t("(\\busing\\s+<<0>>\\s*=\\s*)<<1>>(?=\\s*;)",[h,y]),lookbehind:!0,inside:w},{pattern:t("(\\busing\\s+)<<0>>(?=\\s*=)",[h]),lookbehind:!0},{pattern:t("(\\b<<0>>\\s+)<<1>>",[d,f]),lookbehind:!0,inside:w},{pattern:t("(\\bcatch\\s*\\(\\s*)<<0>>",[m]),lookbehind:!0,inside:w},{pattern:t("(\\bwhere\\s+)<<0>>",[h]),lookbehind:!0},{pattern:t("(\\b(?:is|as)\\s+)<<0>>",[y]),lookbehind:!0,inside:w},{pattern:t("\\b<<0>>(?=\\s+(?!<<1>>)<<2>>(?:\\s*[=,;:{)\\]]|\\s+in))",[y,u,h]),inside:w}],keyword:p,number:/(?:\b0(?:x[\da-f_]*[\da-f]|b[01_]*[01])|(?:\B\.\d+(?:_+\d+)*|\b\d+(?:_+\d+)*(?:\.\d+(?:_+\d+)*)?)(?:e[-+]?\d+(?:_+\d+)*)?)(?:ul|lu|[dflmu])?\b/i,operator:/>>=?|<<=?|[-=]>|([-+&|])\1|~|\?\?=?|[-+*/%&|^!=<>]=?/,punctuation:/\?\.?|::|[{}[\];(),.:]/}),s.languages.insertBefore("csharp","number",{range:{pattern:/\.\./,alias:"operator"}}),s.languages.insertBefore("csharp","punctuation",{"named-parameter":{pattern:t("([(,]\\s*)<<0>>(?=\\s*:)",[h]),lookbehind:!0,alias:"punctuation"}}),s.languages.insertBefore("csharp","class-name",{namespace:{pattern:t("(\\b(?:namespace|using)\\s+)<<0>>(?:\\s*\\.\\s*<<0>>)*(?=\\s*[;{])",[h]),lookbehind:!0,inside:{punctuation:/\./}},"type-expression":{pattern:t("(\\b(?:default|typeof|sizeof)\\s*\\(\\s*)(?:[^()\\s]|\\s(?!\\s*\\))|<<0>>)*(?=\\s*\\))",[b]),lookbehind:!0,alias:"class-name",inside:w},"return-type":{pattern:t("<<0>>(?=\\s+(?:<<1>>\\s*(?:=>|[({]|\\.\\s*this\\s*\\[)|this\\s*\\[))",[y,m]),inside:w,alias:"class-name"},"constructor-invocation":{pattern:t("(\\bnew\\s+)<<0>>(?=\\s*[[({])",[y]),lookbehind:!0,inside:w,alias:"class-name"},"generic-method":{pattern:t("<<0>>\\s*<<1>>(?=\\s*\\()",[h,g]),inside:{function:t("^<<0>>",[h]),generic:{pattern:RegExp(g),alias:"class-name",inside:w}}},"type-list":{pattern:t("\\b((?:<<0>>\\s+<<1>>|where\\s+<<2>>)\\s*:\\s*)(?:<<3>>|<<4>>)(?:\\s*,\\s*(?:<<3>>|<<4>>))*(?=\\s*(?:where|[{;]|=>|$))",[d,f,h,y,p.source]),lookbehind:!0,inside:{keyword:p,"class-name":{pattern:RegExp(y),inside:w},punctuation:/,/}},preprocessor:{pattern:/(^\s*)#.*/m,lookbehind:!0,alias:"property",inside:{directive:{pattern:/(\s*#)\b(?:define|elif|else|endif|endregion|error|if|line|pragma|region|undef|warning)\b/,lookbehind:!0,alias:"keyword"}}}});var $=x+"|"+v,_=a("\\/(?![*/])|\\/\\/[^\r\n]*[\r\n]|\\/\\*[\\s\\S]*?\\*\\/|<<0>>",[$]),B=e(a("[^\"'/()]|<<0>>|\\(<>*\\)",[_]),2),E="\\b(?:assembly|event|field|method|module|param|property|return|type)\\b",R=a("<<0>>(?:\\s*\\(<<1>>*\\))?",[m,B]);s.languages.insertBefore("csharp","class-name",{attribute:{pattern:t("((?:^|[^\\s\\w>)?])\\s*\\[\\s*)(?:<<0>>\\s*:\\s*)?<<1>>(?:\\s*,\\s*<<1>>)*(?=\\s*\\])",[E,R]),lookbehind:!0,greedy:!0,inside:{target:{pattern:t("^<<0>>(?=\\s*:)",[E]),alias:"keyword"},"attribute-arguments":{pattern:t("\\(<<0>>*\\)",[B]),inside:s.languages.csharp},"class-name":{pattern:RegExp(m),inside:{punctuation:/\./}},punctuation:/[:,]/}}});var S=":[^}\r\n]+",P=e(a("[^\"'/()]|<<0>>|\\(<>*\\)",[_]),2),z=a("\\{(?!\\{)(?:(?![}:])<<0>>)*<<1>>?\\}",[P,S]),j=e(a("[^\"'/()]|\\/(?!\\*)|\\/\\*.*?\\*\\/|<<0>>|\\(<>*\\)",[$]),2),A=a("\\{(?!\\{)(?:(?![}:])<<0>>)*<<1>>?\\}",[j,S]);function F(e,n){return{interpolation:{pattern:t("([^{](?:\\{\\{)*)<<0>>",[e]),lookbehind:!0,inside:{"format-string":{pattern:t("(^\\{(?:(?![}:])<<0>>)*)<<1>>(?=\\}$)",[n,S]),lookbehind:!0,inside:{punctuation:/^:/}},punctuation:/^\{|\}$/,expression:{pattern:/[\s\S]+/,alias:"language-csharp",inside:s.languages.csharp}}},string:/[\s\S]+/}}s.languages.insertBefore("csharp","string",{"interpolation-string":[{pattern:t('(^|[^\\\\])(?:\\$@|@\\$)"(?:""|\\\\[\\s\\S]|\\{\\{|<<0>>|[^\\\\{"])*"',[z]),lookbehind:!0,greedy:!0,inside:F(z,P)},{pattern:t('(^|[^@\\\\])\\$"(?:\\\\.|\\{\\{|<<0>>|[^\\\\"{])*"',[A]),lookbehind:!0,greedy:!0,inside:F(A,j)}]})}(Prism),Prism.languages.dotnet=Prism.languages.cs=Prism.languages.csharp; \ No newline at end of file +!function(s){function a(e,s){return e.replace(/<<(\d+)>>/g,function(e,n){return"(?:"+s[+n]+")"})}function t(e,n,s){return RegExp(a(e,n),s||"")}function e(e,n){for(var s=0;s>/g,function(){return"(?:"+e+")"});return e.replace(/<>/g,"[^\\s\\S]")}var n="bool byte char decimal double dynamic float int long object sbyte short string uint ulong ushort var void",i="class enum interface struct",r="add alias ascending async await by descending from get global group into join let nameof notnull on orderby partial remove select set unmanaged value when where where",o="abstract as base break case catch checked const continue default delegate do else event explicit extern finally fixed for foreach goto if implicit in internal is lock namespace new null operator out override params private protected public readonly ref return sealed sizeof stackalloc static switch this throw try typeof unchecked unsafe using virtual volatile while yield";function l(e){return"\\b(?:"+e.trim().replace(/ /g,"|")+")\\b"}var d=l(i),p=RegExp(l(n+" "+i+" "+r+" "+o)),c=l(i+" "+r+" "+o),u=l(n+" "+i+" "+o),g=e("<(?:[^<>;=+\\-*/%&|^]|<>)*>",2),b=e("\\((?:[^()]|<>)*\\)",2),h="@?\\b[A-Za-z_]\\w*\\b",f=a("<<0>>(?:\\s*<<1>>)?",[h,g]),m=a("(?!<<0>>)<<1>>(?:\\s*\\.\\s*<<1>>)*",[c,f]),k="\\[\\s*(?:,\\s*)*\\]",y=a("(?:<<0>>|<<1>>)(?:\\s*(?:\\?\\s*)?<<2>>)*(?:\\s*\\?)?",[a("\\(<<0>>+(?:,<<0>>+)+\\)",[a("[^,()<>[\\];=+\\-*/%&|^]|<<0>>|<<1>>|<<2>>",[g,b,k])]),m,k]),w={keyword:p,punctuation:/[<>()?,.:[\]]/},v="'(?:[^\r\n'\\\\]|\\\\.|\\\\[Uux][\\da-fA-F]{1,8})'",x='"(?:\\\\.|[^\\\\"\r\n])*"';s.languages.csharp=s.languages.extend("clike",{string:[{pattern:t("(^|[^$\\\\])<<0>>",['@"(?:""|\\\\[\\s\\S]|[^\\\\"])*"(?!")']),lookbehind:!0,greedy:!0},{pattern:t("(^|[^@$\\\\])<<0>>",[x]),lookbehind:!0,greedy:!0},{pattern:RegExp(v),greedy:!0,alias:"character"}],"class-name":[{pattern:t("(\\busing\\s+static\\s+)<<0>>(?=\\s*;)",[m]),lookbehind:!0,inside:w},{pattern:t("(\\busing\\s+<<0>>\\s*=\\s*)<<1>>(?=\\s*;)",[h,y]),lookbehind:!0,inside:w},{pattern:t("(\\busing\\s+)<<0>>(?=\\s*=)",[h]),lookbehind:!0},{pattern:t("(\\b<<0>>\\s+)<<1>>",[d,f]),lookbehind:!0,inside:w},{pattern:t("(\\bcatch\\s*\\(\\s*)<<0>>",[m]),lookbehind:!0,inside:w},{pattern:t("(\\bwhere\\s+)<<0>>",[h]),lookbehind:!0},{pattern:t("(\\b(?:is|as)\\s+)<<0>>",[y]),lookbehind:!0,inside:w},{pattern:t("\\b<<0>>(?=\\s+(?!<<1>>)<<2>>(?:\\s*[=,;:{)\\]]|\\s+in))",[y,u,h]),inside:w}],keyword:p,number:/(?:\b0(?:x[\da-f_]*[\da-f]|b[01_]*[01])|(?:\B\.\d+(?:_+\d+)*|\b\d+(?:_+\d+)*(?:\.\d+(?:_+\d+)*)?)(?:e[-+]?\d+(?:_+\d+)*)?)(?:ul|lu|[dflmu])?\b/i,operator:/>>=?|<<=?|[-=]>|([-+&|])\1|~|\?\?=?|[-+*/%&|^!=<>]=?/,punctuation:/\?\.?|::|[{}[\];(),.:]/}),s.languages.insertBefore("csharp","number",{range:{pattern:/\.\./,alias:"operator"}}),s.languages.insertBefore("csharp","punctuation",{"named-parameter":{pattern:t("([(,]\\s*)<<0>>(?=\\s*:)",[h]),lookbehind:!0,alias:"punctuation"}}),s.languages.insertBefore("csharp","class-name",{namespace:{pattern:t("(\\b(?:namespace|using)\\s+)<<0>>(?:\\s*\\.\\s*<<0>>)*(?=\\s*[;{])",[h]),lookbehind:!0,inside:{punctuation:/\./}},"type-expression":{pattern:t("(\\b(?:default|typeof|sizeof)\\s*\\(\\s*)(?:[^()\\s]|\\s(?!\\s*\\))|<<0>>)*(?=\\s*\\))",[b]),lookbehind:!0,alias:"class-name",inside:w},"return-type":{pattern:t("<<0>>(?=\\s+(?:<<1>>\\s*(?:=>|[({]|\\.\\s*this\\s*\\[)|this\\s*\\[))",[y,m]),inside:w,alias:"class-name"},"constructor-invocation":{pattern:t("(\\bnew\\s+)<<0>>(?=\\s*[[({])",[y]),lookbehind:!0,inside:w,alias:"class-name"},"generic-method":{pattern:t("<<0>>\\s*<<1>>(?=\\s*\\()",[h,g]),inside:{function:t("^<<0>>",[h]),generic:{pattern:RegExp(g),alias:"class-name",inside:w}}},"type-list":{pattern:t("\\b((?:<<0>>\\s+<<1>>|where\\s+<<2>>)\\s*:\\s*)(?:<<3>>|<<4>>)(?:\\s*,\\s*(?:<<3>>|<<4>>))*(?=\\s*(?:where|[{;]|=>|$))",[d,f,h,y,p.source]),lookbehind:!0,inside:{keyword:p,"class-name":{pattern:RegExp(y),greedy:!0,inside:w},punctuation:/,/}},preprocessor:{pattern:/(^\s*)#.*/m,lookbehind:!0,alias:"property",inside:{directive:{pattern:/(\s*#)\b(?:define|elif|else|endif|endregion|error|if|line|pragma|region|undef|warning)\b/,lookbehind:!0,alias:"keyword"}}}});var $=x+"|"+v,_=a("\\/(?![*/])|\\/\\/[^\r\n]*[\r\n]|\\/\\*[\\s\\S]*?\\*\\/|<<0>>",[$]),B=e(a("[^\"'/()]|<<0>>|\\(<>*\\)",[_]),2),E="\\b(?:assembly|event|field|method|module|param|property|return|type)\\b",R=a("<<0>>(?:\\s*\\(<<1>>*\\))?",[m,B]);s.languages.insertBefore("csharp","class-name",{attribute:{pattern:t("((?:^|[^\\s\\w>)?])\\s*\\[\\s*)(?:<<0>>\\s*:\\s*)?<<1>>(?:\\s*,\\s*<<1>>)*(?=\\s*\\])",[E,R]),lookbehind:!0,greedy:!0,inside:{target:{pattern:t("^<<0>>(?=\\s*:)",[E]),alias:"keyword"},"attribute-arguments":{pattern:t("\\(<<0>>*\\)",[B]),inside:s.languages.csharp},"class-name":{pattern:RegExp(m),inside:{punctuation:/\./}},punctuation:/[:,]/}}});var S=":[^}\r\n]+",P=e(a("[^\"'/()]|<<0>>|\\(<>*\\)",[_]),2),z=a("\\{(?!\\{)(?:(?![}:])<<0>>)*<<1>>?\\}",[P,S]),j=e(a("[^\"'/()]|\\/(?!\\*)|\\/\\*.*?\\*\\/|<<0>>|\\(<>*\\)",[$]),2),A=a("\\{(?!\\{)(?:(?![}:])<<0>>)*<<1>>?\\}",[j,S]);function F(e,n){return{interpolation:{pattern:t("([^{](?:\\{\\{)*)<<0>>",[e]),lookbehind:!0,inside:{"format-string":{pattern:t("(^\\{(?:(?![}:])<<0>>)*)<<1>>(?=\\}$)",[n,S]),lookbehind:!0,inside:{punctuation:/^:/}},punctuation:/^\{|\}$/,expression:{pattern:/[\s\S]+/,alias:"language-csharp",inside:s.languages.csharp}}},string:/[\s\S]+/}}s.languages.insertBefore("csharp","string",{"interpolation-string":[{pattern:t('(^|[^\\\\])(?:\\$@|@\\$)"(?:""|\\\\[\\s\\S]|\\{\\{|<<0>>|[^\\\\{"])*"',[z]),lookbehind:!0,greedy:!0,inside:F(z,P)},{pattern:t('(^|[^@\\\\])\\$"(?:\\\\.|\\{\\{|<<0>>|[^\\\\"{])*"',[A]),lookbehind:!0,greedy:!0,inside:F(A,j)}]})}(Prism),Prism.languages.dotnet=Prism.languages.cs=Prism.languages.csharp; \ No newline at end of file diff --git a/tests/languages/csharp/generic-constraint_feature.test b/tests/languages/csharp/generic-constraint_feature.test index 883d279634..124104b7a4 100644 --- a/tests/languages/csharp/generic-constraint_feature.test +++ b/tests/languages/csharp/generic-constraint_feature.test @@ -44,6 +44,7 @@ readonly struct Foo where T : unmanaged {} ]], ["punctuation", "{"], ["punctuation", "}"], + ["keyword", "delegate"], ["return-type", [ ["keyword", "void"] @@ -76,6 +77,7 @@ readonly struct Foo where T : unmanaged {} ]] ]], ["punctuation", ";"], + ["keyword", "class"], ["class-name", [ "Foo", @@ -88,14 +90,15 @@ readonly struct Foo where T : unmanaged {} ["punctuation", ":"], ["type-list", [ ["class-name", [ - "IFoo" - ]], - "<", - ["keyword", "int"], - ">" + "IFoo", + ["punctuation", "<"], + ["keyword", "int"], + ["punctuation", ">"] + ]] ]], ["punctuation", "{"], ["punctuation", "}"], + ["keyword", "readonly"], ["keyword", "struct"], ["class-name", [ diff --git a/tests/languages/csharp/preprocessor_feature.test b/tests/languages/csharp/preprocessor_feature.test index 93ad4903ab..8f21683e74 100644 --- a/tests/languages/csharp/preprocessor_feature.test +++ b/tests/languages/csharp/preprocessor_feature.test @@ -18,18 +18,18 @@ ["preprocessor", ["#", ["directive", "define"], " DEBUG"]], ["preprocessor", ["#", ["directive", "if"], " DEBUG"]], ["preprocessor", ["#", ["directive", "endif"]]], - + ["preprocessor", ["#", ["directive", "elif"]]], - ["preprocessor", ["#", ["directive", "else"]]], - ["preprocessor", ["#", ["directive", "endregion"]]], - ["preprocessor", ["#", ["directive", "error"]]], - ["preprocessor", ["#", ["directive", "line"]]], - ["preprocessor", ["#", ["directive", "pragma"]]], - ["preprocessor", ["#", ["directive", "region"]]], - ["preprocessor", ["#", ["directive", "undef"]]], - ["preprocessor", ["#", ["directive", "warning"]]] + ["preprocessor", ["#", ["directive", "else"]]], + ["preprocessor", ["#", ["directive", "endregion"]]], + ["preprocessor", ["#", ["directive", "error"]]], + ["preprocessor", ["#", ["directive", "line"]]], + ["preprocessor", ["#", ["directive", "pragma"]]], + ["preprocessor", ["#", ["directive", "region"]]], + ["preprocessor", ["#", ["directive", "undef"]]], + ["preprocessor", ["#", ["directive", "warning"]]] ] ---------------------------------------------------- -Checks for preprocessor directives. \ No newline at end of file +Checks for preprocessor directives. diff --git a/tests/languages/csharp/type-list_feature.test b/tests/languages/csharp/type-list_feature.test index ca44d22ee7..04331c1b14 100644 --- a/tests/languages/csharp/type-list_feature.test +++ b/tests/languages/csharp/type-list_feature.test @@ -1,6 +1,8 @@ class Foo : Bar, T>, IBar, IFoo where T : class, IBar, IFoo {} +public class Foo : IBar {} + public delegate ErrorCode GetInfoMethod(H handle, A value, I paramName, Size_t paramValueSize, IntPtr paramValue, out Size_t paramValueSizeRet) where H : unmanaged, IInfoHandle where A : unmanaged where I : unmanaged, Enum; @@ -65,6 +67,23 @@ public delegate ErrorCode GetInfoMethod(H handle, A value, I paramName, ["punctuation", "{"], ["punctuation", "}"], + ["keyword", "public"], + ["keyword", "class"], + ["class-name", [ + "Foo" + ]], + ["punctuation", ":"], + ["type-list", [ + ["class-name", [ + "IBar", + ["punctuation", "<"], + ["keyword", "int"], + ["punctuation", ">"] + ]] + ]], + ["punctuation", "{"], + ["punctuation", "}"], + ["keyword", "public"], ["keyword", "delegate"], ["return-type", [ From 5b2a6cef48189090091af95affedc10c3abf1018 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Sat, 4 Apr 2020 03:04:25 +0200 Subject: [PATCH 0478/1100] Changelog for v1.20.0 (#2274) --- CHANGELOG.md | 87 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 87 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index cc4602278d..5a3d7d4781 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,92 @@ # Prism Changelog +## 1.20.0 (TBD) + +### New components + +* __Concurnas__ ([#2206](https://github.com/PrismJS/prism/issues/2206)) [`b24f7348`](https://github.com/PrismJS/prism/commit/b24f7348) +* __DAX__ ([#2248](https://github.com/PrismJS/prism/issues/2248)) [`9227853f`](https://github.com/PrismJS/prism/commit/9227853f) +* __Excel Formula__ ([#2219](https://github.com/PrismJS/prism/issues/2219)) [`bf4f7bfa`](https://github.com/PrismJS/prism/commit/bf4f7bfa) +* __Factor__ ([#2203](https://github.com/PrismJS/prism/issues/2203)) [`f941102e`](https://github.com/PrismJS/prism/commit/f941102e) +* __LLVM IR__ ([#2221](https://github.com/PrismJS/prism/issues/2221)) [`43efde2e`](https://github.com/PrismJS/prism/commit/43efde2e) +* __PowerQuery__ ([#2250](https://github.com/PrismJS/prism/issues/2250)) [`8119e57b`](https://github.com/PrismJS/prism/commit/8119e57b) +* __Solution file__ ([#2213](https://github.com/PrismJS/prism/issues/2213)) [`15983d52`](https://github.com/PrismJS/prism/commit/15983d52) + +### Updated components + +* __Bash__ + * Added support for escaped quotes ([#2256](https://github.com/PrismJS/prism/issues/2256)) [`328d0e0e`](https://github.com/PrismJS/prism/commit/328d0e0e) +* __BBcode__ + * Added "shortcode" alias ([#2273](https://github.com/PrismJS/prism/issues/2273)) [`57eebced`](https://github.com/PrismJS/prism/commit/57eebced) +* __C/C++/OpenCL C__ + * Improvements ([#2196](https://github.com/PrismJS/prism/issues/2196)) [`674f4b35`](https://github.com/PrismJS/prism/commit/674f4b35) +* __C__ + * Improvemed `comment` pattern ([#2229](https://github.com/PrismJS/prism/issues/2229)) [`fa630726`](https://github.com/PrismJS/prism/commit/fa630726) +* __C#__ + * Fixed keywords in type lists blocking type names ([#2277](https://github.com/PrismJS/prism/issues/2277)) [`947a55bd`](https://github.com/PrismJS/prism/commit/947a55bd) + * C# improvements ([#1444](https://github.com/PrismJS/prism/issues/1444)) [`42b15463`](https://github.com/PrismJS/prism/commit/42b15463) +* __C++__ + * Added C++20 keywords ([#2236](https://github.com/PrismJS/prism/issues/2236)) [`462ad57e`](https://github.com/PrismJS/prism/commit/462ad57e) +* __CSS__ + * Fixed `url()` containing "@" ([#2272](https://github.com/PrismJS/prism/issues/2272)) [`504a63ba`](https://github.com/PrismJS/prism/commit/504a63ba) +* __CSS Extras__ + * Added support for the selector function ([#2201](https://github.com/PrismJS/prism/issues/2201)) [`2e0eff76`](https://github.com/PrismJS/prism/commit/2e0eff76) +* __Elixir__ + * Added support for attributes names ending with `?` ([#2182](https://github.com/PrismJS/prism/issues/2182)) [`5450e24c`](https://github.com/PrismJS/prism/commit/5450e24c) +* __Java__ + * Added `record` keyword ([#2185](https://github.com/PrismJS/prism/issues/2185)) [`47910b5c`](https://github.com/PrismJS/prism/commit/47910b5c) +* __Markdown__ + * Added support for nested lists ([#2228](https://github.com/PrismJS/prism/issues/2228)) [`73c8a376`](https://github.com/PrismJS/prism/commit/73c8a376) +* __OpenCL__ + * Require C ([#2231](https://github.com/PrismJS/prism/issues/2231)) [`26626ded`](https://github.com/PrismJS/prism/commit/26626ded) +* __PHPDoc__ + * Fixed exponential backtracking ([#2198](https://github.com/PrismJS/prism/issues/2198)) [`3b42536e`](https://github.com/PrismJS/prism/commit/3b42536e) +* __Ruby__ + * Fixed exponential backtracking ([#2225](https://github.com/PrismJS/prism/issues/2225)) [`c5de5aa8`](https://github.com/PrismJS/prism/commit/c5de5aa8) +* __SAS__ + * Fixed SAS' "peerDependencies" ([#2230](https://github.com/PrismJS/prism/issues/2230)) [`7d8ff7ea`](https://github.com/PrismJS/prism/commit/7d8ff7ea) +* __Shell session__ + * Improvements ([#2208](https://github.com/PrismJS/prism/issues/2208)) [`bd16bd57`](https://github.com/PrismJS/prism/commit/bd16bd57) +* __Visual Basic__ + * Added support for comments with line continuations ([#2195](https://github.com/PrismJS/prism/issues/2195)) [`a7d67ca3`](https://github.com/PrismJS/prism/commit/a7d67ca3) +* __YAML__ + * Improvements ([#2226](https://github.com/PrismJS/prism/issues/2226)) [`5362ba16`](https://github.com/PrismJS/prism/commit/5362ba16) + * Fixed highlighting of anchors and aliases ([#2217](https://github.com/PrismJS/prism/issues/2217)) [`6124c974`](https://github.com/PrismJS/prism/commit/6124c974) + +### New plugins + +* __Treeview__ ([#2265](https://github.com/PrismJS/prism/issues/2265)) [`be909b18`](https://github.com/PrismJS/prism/commit/be909b18) + +### Updated plugins + +* __Inline Color__ + * Support for (semi-)transparent colors and minor improvements ([#2223](https://github.com/PrismJS/prism/issues/2223)) [`8d2c5a3e`](https://github.com/PrismJS/prism/commit/8d2c5a3e) +* __Keep Markup__ + * Remove self & document from IIFE arguments ([#2258](https://github.com/PrismJS/prism/issues/2258)) [`3c043338`](https://github.com/PrismJS/prism/commit/3c043338) +* __Toolbar__ + * `data-toolbar-order` is now inherited ([#2205](https://github.com/PrismJS/prism/issues/2205)) [`238f1163`](https://github.com/PrismJS/prism/commit/238f1163) + +### Other + +* Updated all `String.propotype.replace` calls for literal strings [`5d7aab56`](https://github.com/PrismJS/prism/commit/5d7aab56) +* __Core__ + * Linked list implementation for `matchGrammar` ([#1909](https://github.com/PrismJS/prism/issues/1909)) [`2d4c94cd`](https://github.com/PrismJS/prism/commit/2d4c94cd) + * Faster `Token.stringify` ([#2171](https://github.com/PrismJS/prism/issues/2171)) [`f683972e`](https://github.com/PrismJS/prism/commit/f683972e) + * Fixed scope problem in script mode ([#2184](https://github.com/PrismJS/prism/issues/2184)) [`984e5d2e`](https://github.com/PrismJS/prism/commit/984e5d2e) +* __Infrastructure__ + * Travis: Updated NodeJS versions ([#2246](https://github.com/PrismJS/prism/issues/2246)) [`e635260b`](https://github.com/PrismJS/prism/commit/e635260b) + * gulp: Inline regex source improvement ([#2227](https://github.com/PrismJS/prism/issues/2227)) [`67afc5ad`](https://github.com/PrismJS/prism/commit/67afc5ad) + * Tests: Added new pattern check for octal escapes ([#2189](https://github.com/PrismJS/prism/issues/2189)) [`81e1c3dd`](https://github.com/PrismJS/prism/commit/81e1c3dd) + * Tests: Fixed optional dependencies in pattern tests ([#2242](https://github.com/PrismJS/prism/issues/2242)) [`1e3070a2`](https://github.com/PrismJS/prism/commit/1e3070a2) + * Tests: Added test for zero-width lookbehinds ([#2220](https://github.com/PrismJS/prism/issues/2220)) [`7d03ece4`](https://github.com/PrismJS/prism/commit/7d03ece4) + * Added tests for examples ([#2216](https://github.com/PrismJS/prism/issues/2216)) [`1f7a245c`](https://github.com/PrismJS/prism/commit/1f7a245c) +* __Website__ + * Removed invalid strings from C# example ([#2266](https://github.com/PrismJS/prism/issues/2266)) [`c917a8ca`](https://github.com/PrismJS/prism/commit/c917a8ca) + * Fixed Diff highlight plugin page title ([#2233](https://github.com/PrismJS/prism/issues/2233)) [`a82770f8`](https://github.com/PrismJS/prism/commit/a82770f8) + * Added link to `prism-liquibase` Bash language extension. ([#2191](https://github.com/PrismJS/prism/issues/2191)) [`0bf73dc7`](https://github.com/PrismJS/prism/commit/0bf73dc7) + * Examples: Updated content header ([#2232](https://github.com/PrismJS/prism/issues/2232)) [`6232878b`](https://github.com/PrismJS/prism/commit/6232878b) + * Website: Added Coy bug to the known failures page. ([#2170](https://github.com/PrismJS/prism/issues/2170)) [`e9dab85e`](https://github.com/PrismJS/prism/commit/e9dab85e) + ## 1.19.0 (2020-01-13) ### New components From 81670053da263b0fe814d58de66213a43f439b98 Mon Sep 17 00:00:00 2001 From: mAAdhaTTah Date: Fri, 3 Apr 2020 21:04:41 -0400 Subject: [PATCH 0479/1100] 1.20.0 --- package-lock.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index 49890655ef..2664007e2d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "prismjs", - "version": "1.19.0", + "version": "1.20.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 399285cb3d..f8bb2a9fcf 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "prismjs", - "version": "1.19.0", + "version": "1.20.0", "description": "Lightweight, robust, elegant syntax highlighting. A spin-off project from Dabblet.", "main": "prism.js", "style": "themes/prism.css", From fd432a5b1d3b2ede9f3e4459b830b36c8e9ff019 Mon Sep 17 00:00:00 2001 From: Sam Chen Date: Sat, 4 Apr 2020 21:50:48 +0800 Subject: [PATCH 0480/1100] Diff: Added `prefix` token (#2281) This adds a token to match line prefixes. --- components/prism-diff.js | 14 ++++++++++++-- components/prism-diff.min.js | 2 +- tests/languages/diff/diff_feature.test | 12 ++++++------ 3 files changed, 19 insertions(+), 9 deletions(-) diff --git a/components/prism-diff.js b/components/prism-diff.js index 9dfc0e9153..2d824f7b76 100644 --- a/components/prism-diff.js +++ b/components/prism-diff.js @@ -40,10 +40,20 @@ } Prism.languages.diff[name] = { - // pattern: /^(?:[_].*(?:\r\n?|\n|(?![\s\S])))+/m pattern: RegExp('^(?:[' + prefix + '].*(?:\r\n?|\n|(?![\\s\\S])))+', 'm'), - alias: alias + alias: alias, + inside: { + 'line': { + pattern: /(.)(?=[\s\S]).*(?:\r\n?|\n)?/, + lookbehind: true + }, + 'prefix': { + pattern: /[\s\S]/, + alias: /\w+/.exec(name)[0] + } + } }; + }); // make prefixes available to Diff plugin diff --git a/components/prism-diff.min.js b/components/prism-diff.min.js index 708a5a1dbc..18896474fd 100644 --- a/components/prism-diff.min.js +++ b/components/prism-diff.min.js @@ -1 +1 @@ -!function(d){d.languages.diff={coord:[/^(?:\*{3}|-{3}|\+{3}).*$/m,/^@@.*@@$/m,/^\d+.*$/m]};var r={"deleted-sign":"-","deleted-arrow":"<","inserted-sign":"+","inserted-arrow":">",unchanged:" ",diff:"!"};Object.keys(r).forEach(function(e){var n=r[e],a=[];/^\w+$/.test(e)||a.push(/\w+/.exec(e)[0]),"diff"===e&&a.push("bold"),d.languages.diff[e]={pattern:RegExp("^(?:["+n+"].*(?:\r\n?|\n|(?![\\s\\S])))+","m"),alias:a}}),Object.defineProperty(d.languages.diff,"PREFIXES",{value:r})}(Prism); \ No newline at end of file +!function(i){i.languages.diff={coord:[/^(?:\*{3}|-{3}|\+{3}).*$/m,/^@@.*@@$/m,/^\d+.*$/m]};var r={"deleted-sign":"-","deleted-arrow":"<","inserted-sign":"+","inserted-arrow":">",unchanged:" ",diff:"!"};Object.keys(r).forEach(function(e){var n=r[e],a=[];/^\w+$/.test(e)||a.push(/\w+/.exec(e)[0]),"diff"===e&&a.push("bold"),i.languages.diff[e]={pattern:RegExp("^(?:["+n+"].*(?:\r\n?|\n|(?![\\s\\S])))+","m"),alias:a,inside:{line:{pattern:/(.)(?=[\s\S]).*(?:\r\n?|\n)?/,lookbehind:!0},prefix:{pattern:/[\s\S]/,alias:/\w+/.exec(e)[0]}}}}),Object.defineProperty(i.languages.diff,"PREFIXES",{value:r})}(Prism); \ No newline at end of file diff --git a/tests/languages/diff/diff_feature.test b/tests/languages/diff/diff_feature.test index 4379e56d44..2dbba25c82 100644 --- a/tests/languages/diff/diff_feature.test +++ b/tests/languages/diff/diff_feature.test @@ -11,12 +11,12 @@ ---------------------------------------------------- [ - ["diff", "! qt: core\r\n"], - ["unchanged", " unchanged\r\n"], - ["deleted-sign", "- qt: core\r\n"], - ["inserted-sign", "+ qt: core gui\r\n"], - ["deleted-arrow", "< qt: core\r\n"], - ["inserted-arrow", "> qt: core quick"] + ["diff", [["prefix", "!"], ["line", " qt: core\r\n"]]], + ["unchanged", [["prefix", " "], ["line", " unchanged\r\n"]]], + ["deleted-sign", [["prefix", "-"], ["line", " qt: core\r\n"]]], + ["inserted-sign", [["prefix", "+"], ["line", " qt: core gui\r\n"]]], + ["deleted-arrow", [["prefix", "<"], ["line", " qt: core\r\n"]]], + ["inserted-arrow", [["prefix", ">"], ["line", " qt: core quick"]]] ] ---------------------------------------------------- From 0cfb6c5f27a568c86b9f31076e9b70b6a7b83ad0 Mon Sep 17 00:00:00 2001 From: Ben Gubler Date: Sat, 4 Apr 2020 13:04:08 -0600 Subject: [PATCH 0481/1100] EJS: Added `eta` alias (#2282) --- components.js | 2 +- components.json | 6 +++++- components/prism-ejs.js | 2 ++ components/prism-ejs.min.js | 2 +- plugins/autoloader/prism-autoloader.js | 1 + plugins/autoloader/prism-autoloader.min.js | 2 +- plugins/show-language/prism-show-language.js | 1 + plugins/show-language/prism-show-language.min.js | 2 +- 8 files changed, 13 insertions(+), 5 deletions(-) diff --git a/components.js b/components.js index fd583fb412..8cbf7ec1a6 100644 --- a/components.js +++ b/components.js @@ -1,2 +1,2 @@ -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"Augmented Backus–Naur form","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"Backus–Naur form","alias":"rbnf","aliasTitles":{"rbnf":"Routing Backus–Naur form"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dax":{"title":"DAX","owner":"peterbud"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"Extended Backus–Naur form","owner":"RunDevelopment"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment"},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"http":{"title":"HTTP","optional":["css","javascript","json","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"json":{"title":"JSON","owner":"CupOfTea696"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","modify":["actionscript","coffeescript","flow","javascript","typescript","vala"],"owner":"RunDevelopment"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"solidity":{"title":"Solidity (Ethereum)","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","visual-basic"],"owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"Augmented Backus–Naur form","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"Backus–Naur form","alias":"rbnf","aliasTitles":{"rbnf":"Routing Backus–Naur form"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dax":{"title":"DAX","owner":"peterbud"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"Extended Backus–Naur form","owner":"RunDevelopment"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"http":{"title":"HTTP","optional":["css","javascript","json","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"json":{"title":"JSON","owner":"CupOfTea696"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","modify":["actionscript","coffeescript","flow","javascript","typescript","vala"],"owner":"RunDevelopment"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"solidity":{"title":"Solidity (Ethereum)","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","visual-basic"],"owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; if (typeof module !== 'undefined' && module.exports) { module.exports = components; } \ No newline at end of file diff --git a/components.json b/components.json index 70eef9e16d..cdedc34564 100644 --- a/components.json +++ b/components.json @@ -291,7 +291,11 @@ "ejs": { "title": "EJS", "require": ["javascript", "markup-templating"], - "owner": "RunDevelopment" + "owner": "RunDevelopment", + "alias": "eta", + "aliasTitles": { + "eta": "Eta" + } }, "elixir": { "title": "Elixir", diff --git a/components/prism-ejs.js b/components/prism-ejs.js index 74dd9f585c..047f0dd587 100644 --- a/components/prism-ejs.js +++ b/components/prism-ejs.js @@ -21,4 +21,6 @@ Prism.languages['markup-templating'].tokenizePlaceholders(env, 'ejs'); }); + Prism.languages.eta = Prism.languages.ejs; + }(Prism)); diff --git a/components/prism-ejs.min.js b/components/prism-ejs.min.js index ebfe0cbda2..1a07bdb8f1 100644 --- a/components/prism-ejs.min.js +++ b/components/prism-ejs.min.js @@ -1 +1 @@ -!function(a){a.languages.ejs={delimiter:{pattern:/^<%[-_=]?|[-_]?%>$/,alias:"punctuation"},comment:/^#[\s\S]*/,"language-javascript":{pattern:/[\s\S]+/,inside:a.languages.javascript}},a.hooks.add("before-tokenize",function(e){a.languages["markup-templating"].buildPlaceholders(e,"ejs",/<%(?!%)[\s\S]+?%>/g)}),a.hooks.add("after-tokenize",function(e){a.languages["markup-templating"].tokenizePlaceholders(e,"ejs")})}(Prism); \ No newline at end of file +!function(e){e.languages.ejs={delimiter:{pattern:/^<%[-_=]?|[-_]?%>$/,alias:"punctuation"},comment:/^#[\s\S]*/,"language-javascript":{pattern:/[\s\S]+/,inside:e.languages.javascript}},e.hooks.add("before-tokenize",function(a){e.languages["markup-templating"].buildPlaceholders(a,"ejs",/<%(?!%)[\s\S]+?%>/g)}),e.hooks.add("after-tokenize",function(a){e.languages["markup-templating"].tokenizePlaceholders(a,"ejs")}),e.languages.eta=e.languages.ejs}(Prism); \ No newline at end of file diff --git a/plugins/autoloader/prism-autoloader.js b/plugins/autoloader/prism-autoloader.js index 277e2e6ad1..13fb67bd3e 100644 --- a/plugins/autoloader/prism-autoloader.js +++ b/plugins/autoloader/prism-autoloader.js @@ -155,6 +155,7 @@ "jinja2": "django", "dns-zone": "dns-zone-file", "dockerfile": "docker", + "eta": "ejs", "xlsx": "excel-formula", "xls": "excel-formula", "gamemakerlanguage": "gml", diff --git a/plugins/autoloader/prism-autoloader.min.js b/plugins/autoloader/prism-autoloader.min.js index 3f067d42fa..c1f02e5254 100644 --- a/plugins/autoloader/prism-autoloader.min.js +++ b/plugins/autoloader/prism-autoloader.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof self&&self.Prism&&self.document&&document.createElement){var c={javascript:"clike",actionscript:"javascript",arduino:"cpp",aspnet:["markup","csharp"],bison:"c",c:"clike",csharp:"clike",cpp:"c",coffeescript:"javascript",crystal:"ruby","css-extras":"css",d:"clike",dart:"clike",django:"markup-templating",ejs:["javascript","markup-templating"],etlua:["lua","markup-templating"],erb:["ruby","markup-templating"],fsharp:"clike","firestore-security-rules":"clike",flow:"javascript",ftl:"markup-templating",glsl:"clike",gml:"clike",go:"clike",groovy:"clike",haml:"ruby",handlebars:"markup-templating",haxe:"clike",java:"clike",javadoc:["markup","java","javadoclike"],jolie:"clike",jsdoc:["javascript","javadoclike"],"js-extras":"javascript","js-templates":"javascript",jsonp:"json",json5:"json",kotlin:"clike",latte:["clike","markup-templating","php"],less:"css",lilypond:"scheme",markdown:"markup","markup-templating":"markup",n4js:"javascript",nginx:"clike",objectivec:"c",opencl:"c",parser:"markup",php:["clike","markup-templating"],phpdoc:["php","javadoclike"],"php-extras":"php",plsql:"sql",processing:"clike",protobuf:"clike",pug:["markup","javascript"],qml:"javascript",qore:"clike",jsx:["markup","javascript"],tsx:["jsx","typescript"],reason:"clike",ruby:"clike",sass:"css",scss:"css",scala:"java","shell-session":"bash",smarty:"markup-templating",solidity:"clike",soy:"markup-templating",sparql:"turtle",sqf:"clike",swift:"clike",tap:"yaml",textile:"markup",tt2:["clike","markup-templating"],twig:"markup",typescript:"javascript","t4-cs":["t4-templating","csharp"],"t4-vb":["t4-templating","visual-basic"],vala:"clike",vbnet:"basic",velocity:"markup",wiki:"markup",xeora:"markup",xquery:"markup"},l={html:"markup",xml:"markup",svg:"markup",mathml:"markup",js:"javascript",g4:"antlr4",adoc:"asciidoc",shell:"bash",shortcode:"bbcode",rbnf:"bnf",conc:"concurnas",cs:"csharp",dotnet:"csharp",coffee:"coffeescript",jinja2:"django","dns-zone":"dns-zone-file",dockerfile:"docker",xlsx:"excel-formula",xls:"excel-formula",gamemakerlanguage:"gml",hs:"haskell",tex:"latex",context:"latex",ly:"lilypond",emacs:"lisp",elisp:"lisp","emacs-lisp":"lisp",md:"markdown",moon:"moonscript",n4jsd:"n4js",objectpascal:"pascal",px:"pcaxis",pq:"powerquery",mscript:"powerquery",py:"python",robot:"robotframework",rb:"ruby",sln:"solution-file",rq:"sparql",trig:"turtle",ts:"typescript",t4:"t4-cs",vb:"visual-basic",xeoracube:"xeora",yml:"yaml"},n={},e="components/",a=Prism.util.currentScript();if(a){var t=/\bplugins\/autoloader\/prism-autoloader\.(?:min\.)js$/i,r=/[\w-]+\.(?:min\.)js$/i;if(a.hasAttribute("data-autoloader-path"))e=a.getAttribute("data-autoloader-path").trim().replace(/\/?$/,"/");else{var s=a.src;t.test(s)?e=s.replace(t,"components/"):r.test(s)&&(e=s.replace(r,"components/"))}}var p=Prism.plugins.autoloader={languages_path:e,use_minified:!0,loadLanguages:o};Prism.hooks.add("complete",function(e){e.element&&e.language&&!e.grammar&&"none"!==e.language&&function(e,a){e in l&&(e=l[e]);var t=a.getAttribute("data-dependencies"),r=a.parentElement;!t&&r&&"pre"===r.tagName.toLowerCase()&&(t=r.getAttribute("data-dependencies")),o(t=t?t.split(/\s*,\s*/g):[],function(){u(e,function(){Prism.highlightElement(a)})})}(e.language,e.element)})}function o(e,a,t){"string"==typeof e&&(e=[e]);var r=e.length,s=0,i=!1;function c(){i||++s===r&&a&&a(e)}0!==r?e.forEach(function(e){u(e,c,function(){i||(i=!0,t&&t(e))})}):a&&setTimeout(a,0)}function u(a,t,r){var s=0<=a.indexOf("!");a=a.replace("!",""),a=l[a]||a;var e=function(){var e=n[a];if(e||(e=n[a]={callbacks:[]}),e.callbacks.push({success:t,error:r}),!s&&Prism.languages[a])m(a,"success");else if(!s&&e.error)m(a,"error");else if(s||!e.loading){e.loading=!0,function(e,a,t){var r=document.createElement("script");r.src=e,r.async=!0,r.onload=function(){document.body.removeChild(r),a&&a()},r.onerror=function(){document.body.removeChild(r),t&&t()},document.body.appendChild(r)}(function(e){return p.languages_path+"prism-"+e+(p.use_minified?".min":"")+".js"}(a),function(){e.loading=!1,m(a,"success")},function(){e.loading=!1,e.error=!0,m(a,"error")})}},i=c[a];i&&i.length?o(i,e,r):e()}function m(e,a){if(n[e]){for(var t=n[e].callbacks,r=0,s=t.length;r Date: Sun, 5 Apr 2020 14:31:56 +0200 Subject: [PATCH 0482/1100] gulp: Fixed language map (#2283) --- gulpfile.js/index.js | 20 ++++++++++++++++--- plugins/show-language/prism-show-language.js | 3 --- .../show-language/prism-show-language.min.js | 2 +- 3 files changed, 18 insertions(+), 7 deletions(-) diff --git a/gulpfile.js/index.js b/gulpfile.js/index.js index f944acfff4..7c5d94ebdf 100644 --- a/gulpfile.js/index.js +++ b/gulpfile.js/index.js @@ -88,6 +88,7 @@ function watchComponentsAndPlugins() { async function languagePlugins() { const data = await componentsPromise; + /** @type {Record} */ const languagesMap = {}; const dependenciesMap = {}; const aliasMap = {}; @@ -112,8 +113,12 @@ async function languagePlugins() { * @param {string} title */ function addLanguageTitle(key, title) { - if (!languagesMap[key] && guessTitle(key) !== title) { - languagesMap[key] = title; + if (!(key in languagesMap)) { + if (guessTitle(key) === title) { + languagesMap[key] = null; + } else { + languagesMap[key] = title; + } } } @@ -150,7 +155,16 @@ async function languagePlugins() { return JSON.stringify(json, null, '\t').replace(/\n/g, '\n\t'); } - const jsonLanguagesMap = formattedStringify(languagesMap); + /** @type {Record} */ + const nonNullLanguageMap = {}; + for (const id in languagesMap) { + const title = languagesMap[id]; + if (title) { + nonNullLanguageMap[id] = title; + } + } + + const jsonLanguagesMap = formattedStringify(nonNullLanguageMap); const jsonDependenciesMap = formattedStringify(dependenciesMap); const jsonAliasMap = formattedStringify(aliasMap); diff --git a/plugins/show-language/prism-show-language.js b/plugins/show-language/prism-show-language.js index 4044f8917a..e1d0826cf3 100644 --- a/plugins/show-language/prism-show-language.js +++ b/plugins/show-language/prism-show-language.js @@ -33,10 +33,8 @@ "aspnet": "ASP.NET (C#)", "autohotkey": "AutoHotkey", "autoit": "AutoIt", - "shell": "Bash", "basic": "BASIC", "bbcode": "BBcode", - "shortcode": "BBcode", "bnf": "Backus–Naur form", "rbnf": "Routing Backus–Naur form", "conc": "Concurnas", @@ -57,7 +55,6 @@ "dockerfile": "Docker", "ebnf": "Extended Backus–Naur form", "ejs": "EJS", - "eta": "EJS", "etlua": "Embedded Lua templating", "erb": "ERB", "excel-formula": "Excel Formula", diff --git a/plugins/show-language/prism-show-language.min.js b/plugins/show-language/prism-show-language.min.js index 278fb0cec8..483b3760e0 100644 --- a/plugins/show-language/prism-show-language.min.js +++ b/plugins/show-language/prism-show-language.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof self&&self.Prism&&self.document)if(Prism.plugins.toolbar){var r={html:"HTML",xml:"XML",svg:"SVG",mathml:"MathML",css:"CSS",clike:"C-like",js:"JavaScript",abap:"ABAP",abnf:"Augmented Backus–Naur form",antlr4:"ANTLR4",g4:"ANTLR4",apacheconf:"Apache Configuration",apl:"APL",aql:"AQL",arff:"ARFF",asciidoc:"AsciiDoc",adoc:"AsciiDoc",asm6502:"6502 Assembly",aspnet:"ASP.NET (C#)",autohotkey:"AutoHotkey",autoit:"AutoIt",shell:"Bash",basic:"BASIC",bbcode:"BBcode",shortcode:"BBcode",bnf:"Backus–Naur form",rbnf:"Routing Backus–Naur form",conc:"Concurnas",csharp:"C#",cs:"C#",dotnet:"C#",cpp:"C++",cil:"CIL",coffee:"CoffeeScript",cmake:"CMake",csp:"Content-Security-Policy","css-extras":"CSS Extras",dax:"DAX",django:"Django/Jinja2",jinja2:"Django/Jinja2","dns-zone-file":"DNS zone file","dns-zone":"DNS zone file",dockerfile:"Docker",ebnf:"Extended Backus–Naur form",ejs:"EJS",eta:"EJS",etlua:"Embedded Lua templating",erb:"ERB","excel-formula":"Excel Formula",xlsx:"Excel Formula",xls:"Excel Formula",fsharp:"F#","firestore-security-rules":"Firestore security rules",ftl:"FreeMarker Template Language",gcode:"G-code",gdscript:"GDScript",gedcom:"GEDCOM",glsl:"GLSL",gml:"GameMaker Language",gamemakerlanguage:"GameMaker Language",graphql:"GraphQL",hs:"Haskell",hcl:"HCL",http:"HTTP",hpkp:"HTTP Public-Key-Pins",hsts:"HTTP Strict-Transport-Security",ichigojam:"IchigoJam",inform7:"Inform 7",javadoc:"JavaDoc",javadoclike:"JavaDoc-like",javastacktrace:"Java stack trace",jq:"JQ",jsdoc:"JSDoc","js-extras":"JS Extras","js-templates":"JS Templates",json:"JSON",jsonp:"JSONP",json5:"JSON5",latex:"LaTeX",tex:"TeX",context:"ConTeXt",lilypond:"LilyPond",ly:"LilyPond",emacs:"Lisp",elisp:"Lisp","emacs-lisp":"Lisp",llvm:"LLVM IR",lolcode:"LOLCODE",md:"Markdown","markup-templating":"Markup templating",matlab:"MATLAB",mel:"MEL",moon:"MoonScript",n1ql:"N1QL",n4js:"N4JS",n4jsd:"N4JS","nand2tetris-hdl":"Nand To Tetris HDL",nasm:"NASM",neon:"NEON",nginx:"nginx",nsis:"NSIS",objectivec:"Objective-C",ocaml:"OCaml",opencl:"OpenCL",parigp:"PARI/GP",objectpascal:"Object Pascal",pcaxis:"PC-Axis",px:"PC-Axis",php:"PHP",phpdoc:"PHPDoc","php-extras":"PHP Extras",plsql:"PL/SQL",powerquery:"PowerQuery",pq:"PowerQuery",mscript:"PowerQuery",powershell:"PowerShell",properties:".properties",protobuf:"Protocol Buffers",py:"Python",q:"Q (kdb+ database)",qml:"QML",jsx:"React JSX",tsx:"React TSX",renpy:"Ren'py",rest:"reST (reStructuredText)",robotframework:"Robot Framework",robot:"Robot Framework",rb:"Ruby",sas:"SAS",sass:"Sass (Sass)",scss:"Sass (Scss)","shell-session":"Shell session",solidity:"Solidity (Ethereum)","solution-file":"Solution file",sln:"Solution file",soy:"Soy (Closure Template)",sparql:"SPARQL",rq:"SPARQL","splunk-spl":"Splunk SPL",sqf:"SQF: Status Quo Function (Arma 3)",sql:"SQL",tap:"TAP",toml:"TOML",tt2:"Template Toolkit 2",trig:"TriG",ts:"TypeScript","t4-cs":"T4 Text Templates (C#)",t4:"T4 Text Templates (C#)","t4-vb":"T4 Text Templates (VB)","t4-templating":"T4 templating",vbnet:"VB.Net",vhdl:"VHDL",vim:"vim","visual-basic":"Visual Basic",vb:"Visual Basic",wasm:"WebAssembly",wiki:"Wiki markup",xeoracube:"XeoraCube",xojo:"Xojo (REALbasic)",xquery:"XQuery",yaml:"YAML",yml:"YAML"};Prism.plugins.toolbar.registerButton("show-language",function(e){var a=e.element.parentNode;if(a&&/pre/i.test(a.nodeName)){var s,t=a.getAttribute("data-language")||r[e.language]||((s=e.language)?(s.substring(0,1).toUpperCase()+s.substring(1)).replace(/s(?=cript)/,"S"):s);if(t){var o=document.createElement("span");return o.textContent=t,o}}})}else console.warn("Show Languages plugin loaded before Toolbar plugin.")}(); \ No newline at end of file +!function(){if("undefined"!=typeof self&&self.Prism&&self.document)if(Prism.plugins.toolbar){var r={html:"HTML",xml:"XML",svg:"SVG",mathml:"MathML",css:"CSS",clike:"C-like",js:"JavaScript",abap:"ABAP",abnf:"Augmented Backus–Naur form",antlr4:"ANTLR4",g4:"ANTLR4",apacheconf:"Apache Configuration",apl:"APL",aql:"AQL",arff:"ARFF",asciidoc:"AsciiDoc",adoc:"AsciiDoc",asm6502:"6502 Assembly",aspnet:"ASP.NET (C#)",autohotkey:"AutoHotkey",autoit:"AutoIt",basic:"BASIC",bbcode:"BBcode",bnf:"Backus–Naur form",rbnf:"Routing Backus–Naur form",conc:"Concurnas",csharp:"C#",cs:"C#",dotnet:"C#",cpp:"C++",cil:"CIL",coffee:"CoffeeScript",cmake:"CMake",csp:"Content-Security-Policy","css-extras":"CSS Extras",dax:"DAX",django:"Django/Jinja2",jinja2:"Django/Jinja2","dns-zone-file":"DNS zone file","dns-zone":"DNS zone file",dockerfile:"Docker",ebnf:"Extended Backus–Naur form",ejs:"EJS",etlua:"Embedded Lua templating",erb:"ERB","excel-formula":"Excel Formula",xlsx:"Excel Formula",xls:"Excel Formula",fsharp:"F#","firestore-security-rules":"Firestore security rules",ftl:"FreeMarker Template Language",gcode:"G-code",gdscript:"GDScript",gedcom:"GEDCOM",glsl:"GLSL",gml:"GameMaker Language",gamemakerlanguage:"GameMaker Language",graphql:"GraphQL",hs:"Haskell",hcl:"HCL",http:"HTTP",hpkp:"HTTP Public-Key-Pins",hsts:"HTTP Strict-Transport-Security",ichigojam:"IchigoJam",inform7:"Inform 7",javadoc:"JavaDoc",javadoclike:"JavaDoc-like",javastacktrace:"Java stack trace",jq:"JQ",jsdoc:"JSDoc","js-extras":"JS Extras","js-templates":"JS Templates",json:"JSON",jsonp:"JSONP",json5:"JSON5",latex:"LaTeX",tex:"TeX",context:"ConTeXt",lilypond:"LilyPond",ly:"LilyPond",emacs:"Lisp",elisp:"Lisp","emacs-lisp":"Lisp",llvm:"LLVM IR",lolcode:"LOLCODE",md:"Markdown","markup-templating":"Markup templating",matlab:"MATLAB",mel:"MEL",moon:"MoonScript",n1ql:"N1QL",n4js:"N4JS",n4jsd:"N4JS","nand2tetris-hdl":"Nand To Tetris HDL",nasm:"NASM",neon:"NEON",nginx:"nginx",nsis:"NSIS",objectivec:"Objective-C",ocaml:"OCaml",opencl:"OpenCL",parigp:"PARI/GP",objectpascal:"Object Pascal",pcaxis:"PC-Axis",px:"PC-Axis",php:"PHP",phpdoc:"PHPDoc","php-extras":"PHP Extras",plsql:"PL/SQL",powerquery:"PowerQuery",pq:"PowerQuery",mscript:"PowerQuery",powershell:"PowerShell",properties:".properties",protobuf:"Protocol Buffers",py:"Python",q:"Q (kdb+ database)",qml:"QML",jsx:"React JSX",tsx:"React TSX",renpy:"Ren'py",rest:"reST (reStructuredText)",robotframework:"Robot Framework",robot:"Robot Framework",rb:"Ruby",sas:"SAS",sass:"Sass (Sass)",scss:"Sass (Scss)","shell-session":"Shell session",solidity:"Solidity (Ethereum)","solution-file":"Solution file",sln:"Solution file",soy:"Soy (Closure Template)",sparql:"SPARQL",rq:"SPARQL","splunk-spl":"Splunk SPL",sqf:"SQF: Status Quo Function (Arma 3)",sql:"SQL",tap:"TAP",toml:"TOML",tt2:"Template Toolkit 2",trig:"TriG",ts:"TypeScript","t4-cs":"T4 Text Templates (C#)",t4:"T4 Text Templates (C#)","t4-vb":"T4 Text Templates (VB)","t4-templating":"T4 templating",vbnet:"VB.Net",vhdl:"VHDL",vim:"vim","visual-basic":"Visual Basic",vb:"Visual Basic",wasm:"WebAssembly",wiki:"Wiki markup",xeoracube:"XeoraCube",xojo:"Xojo (REALbasic)",xquery:"XQuery",yaml:"YAML",yml:"YAML"};Prism.plugins.toolbar.registerButton("show-language",function(e){var a=e.element.parentNode;if(a&&/pre/i.test(a.nodeName)){var s,t=a.getAttribute("data-language")||r[e.language]||((s=e.language)?(s.substring(0,1).toUpperCase()+s.substring(1)).replace(/s(?=cript)/,"S"):s);if(t){var o=document.createElement("span");return o.textContent=t,o}}})}else console.warn("Show Languages plugin loaded before Toolbar plugin.")}(); \ No newline at end of file From 893f2a79016b81f3cb2748183e28caf59f9524a6 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Tue, 7 Apr 2020 17:27:26 +0200 Subject: [PATCH 0483/1100] Line numbers: Exposed `_resizeElement` function (#2288) --- plugins/line-numbers/prism-line-numbers.js | 18 ++++++++++++++---- plugins/line-numbers/prism-line-numbers.min.js | 2 +- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/plugins/line-numbers/prism-line-numbers.js b/plugins/line-numbers/prism-line-numbers.js index 7ab1dc046b..b2e3147584 100644 --- a/plugins/line-numbers/prism-line-numbers.js +++ b/plugins/line-numbers/prism-line-numbers.js @@ -138,10 +138,10 @@ */ Prism.plugins.lineNumbers = { /** - * Get node for provided line number - * @param {Element} element pre element - * @param {Number} number line number - * @return {Element|undefined} + * Returns the node of the given line number in the given element. + * @param {Element} element A `
          ` element with line numbers.
          +		 * @param {Number} number
          +		 * @returns {Element | undefined}
           		 */
           		getLine: function (element, number) {
           			if (element.tagName !== 'PRE' || !element.classList.contains(PLUGIN_NAME)) {
          @@ -162,6 +162,16 @@
           			var lineIndex = number - lineNumberStart;
           
           			return lineNumberRows.children[lineIndex];
          +		},
          +		/**
          +		 * Resizes the line numbers of the given element.
          +		 *
          +		 * This function will not add line numbers. It will only resize existing ones.
          +		 * @param {Element} element A `
          ` element with line numbers.
          +		 * @returns {void}
          +		 */
          +		resize: function (element) {
          +			_resizeElement(element);
           		}
           	};
           
          diff --git a/plugins/line-numbers/prism-line-numbers.min.js b/plugins/line-numbers/prism-line-numbers.min.js
          index ca84bbe3e9..59fc41d37e 100644
          --- a/plugins/line-numbers/prism-line-numbers.min.js
          +++ b/plugins/line-numbers/prism-line-numbers.min.js
          @@ -1 +1 @@
          -!function(){if("undefined"!=typeof self&&self.Prism&&self.document){var l="line-numbers",c=/\n(?!$)/g,m=function(e){var t=a(e)["white-space"];if("pre-wrap"===t||"pre-line"===t){var n=e.querySelector("code"),r=e.querySelector(".line-numbers-rows"),s=e.querySelector(".line-numbers-sizer"),i=n.textContent.split(c);s||((s=document.createElement("span")).className="line-numbers-sizer",n.appendChild(s)),s.style.display="block",i.forEach(function(e,t){s.textContent=e||"\n";var n=s.getBoundingClientRect().height;r.children[t].style.height=n+"px"}),s.textContent="",s.style.display="none"}},a=function(e){return e?window.getComputedStyle?getComputedStyle(e):e.currentStyle||null:null};window.addEventListener("resize",function(){Array.prototype.forEach.call(document.querySelectorAll("pre."+l),m)}),Prism.hooks.add("complete",function(e){if(e.code){var t=e.element,n=t.parentNode;if(n&&/pre/i.test(n.nodeName)&&!t.querySelector(".line-numbers-rows")){for(var r=!1,s=/(?:^|\s)line-numbers(?:\s|$)/,i=t;i;i=i.parentNode)if(s.test(i.className)){r=!0;break}if(r){t.className=t.className.replace(s," "),s.test(n.className)||(n.className+=" line-numbers");var l,a=e.code.match(c),o=a?a.length+1:1,u=new Array(o+1).join("");(l=document.createElement("span")).setAttribute("aria-hidden","true"),l.className="line-numbers-rows",l.innerHTML=u,n.hasAttribute("data-start")&&(n.style.counterReset="linenumber "+(parseInt(n.getAttribute("data-start"),10)-1)),e.element.appendChild(l),m(n),Prism.hooks.run("line-numbers",e)}}}}),Prism.hooks.add("line-numbers",function(e){e.plugins=e.plugins||{},e.plugins.lineNumbers=!0}),Prism.plugins.lineNumbers={getLine:function(e,t){if("PRE"===e.tagName&&e.classList.contains(l)){var n=e.querySelector(".line-numbers-rows"),r=parseInt(e.getAttribute("data-start"),10)||1,s=r+(n.children.length-1);t");(l=document.createElement("span")).setAttribute("aria-hidden","true"),l.className="line-numbers-rows",l.innerHTML=u,n.hasAttribute("data-start")&&(n.style.counterReset="linenumber "+(parseInt(n.getAttribute("data-start"),10)-1)),e.element.appendChild(l),m(n),Prism.hooks.run("line-numbers",e)}}}}),Prism.hooks.add("line-numbers",function(e){e.plugins=e.plugins||{},e.plugins.lineNumbers=!0}),Prism.plugins.lineNumbers={getLine:function(e,t){if("PRE"===e.tagName&&e.classList.contains(l)){var n=e.querySelector(".line-numbers-rows"),r=parseInt(e.getAttribute("data-start"),10)||1,s=r+(n.children.length-1);t
          Date: Tue, 7 Apr 2020 20:32:39 +0200
          Subject: [PATCH 0484/1100] Scheme: Improvements (#2263)
          
          ---
           components/prism-scheme.js                    | 32 +++++-
           components/prism-scheme.min.js                |  2 +-
           known-failures.html                           | 14 +++
           tests/languages/scheme/character_feature.test | 34 ++++++-
           .../scheme/lambda_parameter_feature.test      | 21 ++++
           tests/languages/scheme/number_feature.test    | 98 ++++++++++++++++---
           tests/languages/scheme/string_feature.test    |  8 +-
           tests/languages/scheme/symbol_feature.test    | 13 +++
           8 files changed, 198 insertions(+), 24 deletions(-)
           create mode 100644 tests/languages/scheme/lambda_parameter_feature.test
           create mode 100644 tests/languages/scheme/symbol_feature.test
          
          diff --git a/components/prism-scheme.js b/components/prism-scheme.js
          index 13a0f6d59b..ad5d000b9c 100644
          --- a/components/prism-scheme.js
          +++ b/components/prism-scheme.js
          @@ -1,13 +1,22 @@
           Prism.languages.scheme = {
           	'comment': /;.*/,
           	'string': {
          -		pattern: /"(?:[^"\\]|\\.)*"|'[^()#'\s]+/,
          +		pattern: /"(?:[^"\\]|\\.)*"/,
          +		greedy: true
          +	},
          +	'symbol': {
          +		pattern: /'[^()#'\s]+/,
           		greedy: true
           	},
           	'character': {
          -		pattern: /#\\(?:[ux][a-fA-F\d]+|[a-zA-Z]+|\S)/,
          +		pattern: /#\\(?:[ux][a-fA-F\d]+|[-a-zA-Z]+|\S)/,
          +		greedy: true,
           		alias: 'string'
           	},
          +	'lambda-parameter': {
          +		pattern: /(\(lambda\s+\()[^()'\s]+/,
          +		lookbehind: true
          +	},
           	'keyword': {
           		pattern: /(\()(?:define(?:-syntax|-library|-values)?|(?:case-)?lambda|let(?:\*|rec)?(?:-values)?|else|if|cond|begin|delay(?:-force)?|parameterize|guard|set!|(?:quasi-)?quote|syntax-rules)(?=[()\s])/,
           		lookbehind: true
          @@ -17,7 +26,22 @@ Prism.languages.scheme = {
           		lookbehind: true
           	},
           	'number': {
          -		pattern: /([\s()])[-+]?(?:\d+\/\d+|\d*\.?\d+(?:\s*[-+]\s*\d*\.?\d+i)?)\b/,
          +		// This pattern (apart from the lookarounds) works like this:
          +		//
          +		// Decimal numbers
          +		//        := \d*\.?\d+(?:[eE][+-]?\d+)?|\d+\/\d+
          +		//     := (?:[+-]i)?|i
          +		//      := (?:#d(?:#[ei])?|#[ei](?:#d)?)?
          +		//      := [+-]?
          +		//
          +		// Binary, octal, and hexadecimal numbers
          +		//     := [\da-fA-F]+(?:\/[\da-fA-F]+)?
          +		//  := (?:[+-]i)?|i
          +		//   := #[box](?:#[ei])?|#[ei](?:#[box])?
          +		//   := [+-]?
          +		//
          +		//          := |
          +		pattern: /([\s()])(?:(?:#d(?:#[ei])?|#[ei](?:#d)?)?[+-]?(?:(?:\d*\.?\d+(?:[eE][+-]?\d+)?|\d+\/\d+)(?:[+-](?:\d*\.?\d+(?:[eE][+-]?\d+)?|\d+\/\d+)i)?|(?:\d*\.?\d+(?:[eE][+-]?\d+)?|\d+\/\d+)i)|(?:#[box](?:#[ei])?|#[ei](?:#[box])?)[+-]?(?:[\da-fA-F]+(?:\/[\da-fA-F]+)?(?:[+-][\da-fA-F]+(?:\/[\da-fA-F]+)?i)?|[\da-fA-F]+(?:\/[\da-fA-F]+)?i))(?=[\s()]|$)/,
           		lookbehind: true
           	},
           	'boolean': /#[tf]/,
          @@ -26,7 +50,7 @@ Prism.languages.scheme = {
           		lookbehind: true
           	},
           	'function': {
          -		pattern: /(\()[^()'\s]+(?=[()\s)]|$)/,
          +		pattern: /(\()[^()'\s]+(?=[()\s]|$)/,
           		lookbehind: true
           	},
           	'punctuation': /[()']/
          diff --git a/components/prism-scheme.min.js b/components/prism-scheme.min.js
          index 04bc6c1943..4a2d1fa28a 100644
          --- a/components/prism-scheme.min.js
          +++ b/components/prism-scheme.min.js
          @@ -1 +1 @@
          -Prism.languages.scheme={comment:/;.*/,string:{pattern:/"(?:[^"\\]|\\.)*"|'[^()#'\s]+/,greedy:!0},character:{pattern:/#\\(?:[ux][a-fA-F\d]+|[a-zA-Z]+|\S)/,alias:"string"},keyword:{pattern:/(\()(?:define(?:-syntax|-library|-values)?|(?:case-)?lambda|let(?:\*|rec)?(?:-values)?|else|if|cond|begin|delay(?:-force)?|parameterize|guard|set!|(?:quasi-)?quote|syntax-rules)(?=[()\s])/,lookbehind:!0},builtin:{pattern:/(\()(?:(?:cons|car|cdr|list|call-with-current-continuation|call\/cc|append|abs|apply|eval)\b|null\?|pair\?|boolean\?|eof-object\?|char\?|procedure\?|number\?|port\?|string\?|vector\?|symbol\?|bytevector\?)(?=[()\s])/,lookbehind:!0},number:{pattern:/([\s()])[-+]?(?:\d+\/\d+|\d*\.?\d+(?:\s*[-+]\s*\d*\.?\d+i)?)\b/,lookbehind:!0},boolean:/#[tf]/,operator:{pattern:/(\()(?:[-+*%\/]|[<>]=?|=>?)(?=\s|$)/,lookbehind:!0},function:{pattern:/(\()[^()'\s]+(?=[()\s)]|$)/,lookbehind:!0},punctuation:/[()']/};
          \ No newline at end of file
          +Prism.languages.scheme={comment:/;.*/,string:{pattern:/"(?:[^"\\]|\\.)*"/,greedy:!0},symbol:{pattern:/'[^()#'\s]+/,greedy:!0},character:{pattern:/#\\(?:[ux][a-fA-F\d]+|[-a-zA-Z]+|\S)/,greedy:!0,alias:"string"},"lambda-parameter":{pattern:/(\(lambda\s+\()[^()'\s]+/,lookbehind:!0},keyword:{pattern:/(\()(?:define(?:-syntax|-library|-values)?|(?:case-)?lambda|let(?:\*|rec)?(?:-values)?|else|if|cond|begin|delay(?:-force)?|parameterize|guard|set!|(?:quasi-)?quote|syntax-rules)(?=[()\s])/,lookbehind:!0},builtin:{pattern:/(\()(?:(?:cons|car|cdr|list|call-with-current-continuation|call\/cc|append|abs|apply|eval)\b|null\?|pair\?|boolean\?|eof-object\?|char\?|procedure\?|number\?|port\?|string\?|vector\?|symbol\?|bytevector\?)(?=[()\s])/,lookbehind:!0},number:{pattern:/([\s()])(?:(?:#d(?:#[ei])?|#[ei](?:#d)?)?[+-]?(?:(?:\d*\.?\d+(?:[eE][+-]?\d+)?|\d+\/\d+)(?:[+-](?:\d*\.?\d+(?:[eE][+-]?\d+)?|\d+\/\d+)i)?|(?:\d*\.?\d+(?:[eE][+-]?\d+)?|\d+\/\d+)i)|(?:#[box](?:#[ei])?|#[ei](?:#[box])?)[+-]?(?:[\da-fA-F]+(?:\/[\da-fA-F]+)?(?:[+-][\da-fA-F]+(?:\/[\da-fA-F]+)?i)?|[\da-fA-F]+(?:\/[\da-fA-F]+)?i))(?=[\s()]|$)/,lookbehind:!0},boolean:/#[tf]/,operator:{pattern:/(\()(?:[-+*%\/]|[<>]=?|=>?)(?=\s|$)/,lookbehind:!0},function:{pattern:/(\()[^()'\s]+(?=[()\s]|$)/,lookbehind:!0},punctuation:/[()']/};
          \ No newline at end of file
          diff --git a/known-failures.html b/known-failures.html
          index b03f034aee..6083199b4e 100644
          --- a/known-failures.html
          +++ b/known-failures.html
          @@ -287,6 +287,20 @@ 

          Nested block comments

          +
          + +

          The first argument of case-lambda argument lists are highlighted as functions

          +
          (define plus
          +	(case-lambda
          +		(() 0)
          +		((x) x)
          +		((x y) (+ x y))
          +		((x y z) (+ (+ x y) z))
          +		(args (apply + args))))
          + +
          + +

          Nested block comments

          diff --git a/tests/languages/scheme/character_feature.test b/tests/languages/scheme/character_feature.test index 06185b5930..f95cb705bf 100644 --- a/tests/languages/scheme/character_feature.test +++ b/tests/languages/scheme/character_feature.test @@ -1,5 +1,15 @@ -#\a -#\space +#\a ; lowercase letter +#\A ; uppercase letter +#\( ; left parenthesis +#\space ; the space character +#\newline ; the newline character + +#\c-a ; Control-a +#\meta-b ; Meta-b +#\c-s-m-h-a ; Control-Meta-Super-Hyper-A + +#\; #\' #\" + #\u0041 #\x10FFFF #\λ @@ -9,7 +19,27 @@ [ ["character", "#\\a"], + ["comment", "; lowercase letter"], + ["character", "#\\A"], + ["comment", "; uppercase letter"], + ["character", "#\\("], + ["comment", "; left parenthesis"], ["character", "#\\space"], + ["comment", "; the space character"], + ["character", "#\\newline"], + ["comment", "; the newline character"], + + ["character", "#\\c-a"], + ["comment", "; Control-a"], + ["character", "#\\meta-b"], + ["comment", "; Meta-b"], + ["character", "#\\c-s-m-h-a"], + ["comment", "; Control-Meta-Super-Hyper-A"], + + ["character", "#\\;"], + ["character", "#\\'"], + ["character", "#\\\""], + ["character", "#\\u0041"], ["character", "#\\x10FFFF"], ["character", "#\\λ"], diff --git a/tests/languages/scheme/lambda_parameter_feature.test b/tests/languages/scheme/lambda_parameter_feature.test new file mode 100644 index 0000000000..afc03ab76d --- /dev/null +++ b/tests/languages/scheme/lambda_parameter_feature.test @@ -0,0 +1,21 @@ +(lambda (foo bar) (concat foo bar)) + +---------------------------------------------------- + +[ + ["punctuation", "("], + ["keyword", "lambda"], + ["punctuation", "("], + ["lambda-parameter", "foo"], + " bar", + ["punctuation", ")"], + ["punctuation", "("], + ["function", "concat"], + " foo bar", + ["punctuation", ")"], + ["punctuation", ")"] +] + +---------------------------------------------------- + +Checks for lambda parameters. diff --git a/tests/languages/scheme/number_feature.test b/tests/languages/scheme/number_feature.test index bdd2af45a5..15f1ca20a5 100644 --- a/tests/languages/scheme/number_feature.test +++ b/tests/languages/scheme/number_feature.test @@ -1,19 +1,95 @@ -(foo 42) -(foo 3.14159) +(foo 42 +42 -42) +(foo 1e3 +1e3 -1e3) +(foo 1e+3 1e-3 3.14159 3.14159e-1) (foo 8/3) -(foo 3+4i) -(foo 2.5+0.0i) -(foo 3+0i) +(foo 3+4i 2.5+0.0i 2.5+0.0i -2.5e4+0.0e4i 3+0i -2e-5i) +(list 10i +10i -10i 10.10i 10+10i 10.10+10.10i 10-10i 10e+10i 10+10e+10i) + +(list #d123 #e#d123e-4 #d#i12 #i-1.234i) + +(list #xBAD #b1110011 #o777) +(list #i#x10 #i#x10+10i #b10+10i) + +; not a number but a symbol +(define 1+2 10) ---------------------------------------------------- [ - ["punctuation", "("], ["function", "foo"], ["number", "42"], ["punctuation", ")"], - ["punctuation", "("], ["function", "foo"], ["number", "3.14159"], ["punctuation", ")"], - ["punctuation", "("], ["function", "foo"], ["number", "8/3"], ["punctuation", ")"], - ["punctuation", "("], ["function", "foo"], ["number", "3+4i"], ["punctuation", ")"], - ["punctuation", "("], ["function", "foo"], ["number", "2.5+0.0i"], ["punctuation", ")"], - ["punctuation", "("], ["function", "foo"], ["number", "3+0i"], ["punctuation", ")"] + ["punctuation", "("], + ["function", "foo"], + ["number", "42"], + ["number", "+42"], + ["number", "-42"], + ["punctuation", ")"], + + ["punctuation", "("], + ["function", "foo"], + ["number", "1e3"], + ["number", "+1e3"], + ["number", "-1e3"], + ["punctuation", ")"], + + ["punctuation", "("], + ["function", "foo"], + ["number", "1e+3"], + ["number", "1e-3"], + ["number", "3.14159"], + ["number", "3.14159e-1"], + ["punctuation", ")"], + + ["punctuation", "("], + ["function", "foo"], + ["number", "8/3"], + ["punctuation", ")"], + + ["punctuation", "("], + ["function", "foo"], + ["number", "3+4i"], + ["number", "2.5+0.0i"], + ["number", "2.5+0.0i"], + ["number", "-2.5e4+0.0e4i"], + ["number", "3+0i"], + ["number", "-2e-5i"], + ["punctuation", ")"], + + ["punctuation", "("], + ["builtin", "list"], + ["number", "10i"], + ["number", "+10i"], + ["number", "-10i"], + ["number", "10.10i"], + ["number", "10+10i"], + ["number", "10.10+10.10i"], + ["number", "10-10i"], + ["number", "10e+10i"], + ["number", "10+10e+10i"], + ["punctuation", ")"], + + ["punctuation", "("], + ["builtin", "list"], + ["number", "#d123"], + ["number", "#e#d123e-4"], + ["number", "#d#i12"], + ["number", "#i-1.234i"], + ["punctuation", ")"], + + ["punctuation", "("], + ["builtin", "list"], + ["number", "#xBAD"], + ["number", "#b1110011"], + ["number", "#o777"], + ["punctuation", ")"], + + ["punctuation", "("], + ["builtin", "list"], + ["number", "#i#x10"], + ["number", "#i#x10+10i"], + ["number", "#b10+10i"], + ["punctuation", ")"], + + ["comment", "; not a number but a symbol"], + ["punctuation", "("], ["keyword", "define"], " 1+2 ", ["number", "10"], ["punctuation", ")"] ] ---------------------------------------------------- diff --git a/tests/languages/scheme/string_feature.test b/tests/languages/scheme/string_feature.test index 821f1ff834..0361b517c4 100644 --- a/tests/languages/scheme/string_feature.test +++ b/tests/languages/scheme/string_feature.test @@ -4,19 +4,15 @@ multi line " -'turkey -(define a 'foo) ---------------------------------------------------- [ ["string", "\"\""], ["string", "\"fo\\\"obar\""], - ["string", "\"\r\nmulti\r\nline\r\n\""], - ["string", "'turkey"], - ["punctuation", "("], ["keyword", "define"], " a ", ["string","'foo"], ["punctuation",")"] + ["string", "\"\r\nmulti\r\nline\r\n\""] ] ---------------------------------------------------- -Checks for strings and symbols. +Checks for strings. diff --git a/tests/languages/scheme/symbol_feature.test b/tests/languages/scheme/symbol_feature.test new file mode 100644 index 0000000000..3cdf4cb5c1 --- /dev/null +++ b/tests/languages/scheme/symbol_feature.test @@ -0,0 +1,13 @@ +'turkey +(define a 'foo) + +---------------------------------------------------- + +[ + ["symbol", "'turkey"], + ["punctuation", "("], ["keyword", "define"], " a ", ["symbol","'foo"], ["punctuation",")"] +] + +---------------------------------------------------- + +Checks for symbols. From e6b2c6fc31eaaff734d5934aa187f0c20c6f0ce9 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Tue, 7 Apr 2020 21:30:01 +0200 Subject: [PATCH 0485/1100] Command Line: Correctly rehighlight elements (#2291) --- plugins/command-line/prism-command-line.js | 7 ++++--- plugins/command-line/prism-command-line.min.js | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/plugins/command-line/prism-command-line.js b/plugins/command-line/prism-command-line.js index 69bc2a8daa..0d1392ff8e 100644 --- a/plugins/command-line/prism-command-line.js +++ b/plugins/command-line/prism-command-line.js @@ -23,9 +23,10 @@ Prism.hooks.add('before-highlight', function (env) { return; } - if (env.element.querySelector('.command-line-prompt')) { // Abort if prompt already exists. - commandLine.complete = true; - return; + // The element might be highlighted multiple times, so we just remove the previous prompt + var existingPrompt = env.element.querySelector('.command-line-prompt'); + if (existingPrompt) { + existingPrompt.remove(); } var codeLines = env.code.split('\n'); diff --git a/plugins/command-line/prism-command-line.min.js b/plugins/command-line/prism-command-line.min.js index 2aa2544f59..b0f6cd1557 100644 --- a/plugins/command-line/prism-command-line.min.js +++ b/plugins/command-line/prism-command-line.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof self&&self.Prism&&self.document){var u=/(?:^|\s)command-line(?:\s|$)/;Prism.hooks.add("before-highlight",function(e){var t=e.vars=e.vars||{},a=t["command-line"]=t["command-line"]||{};if(!a.complete&&e.code){var n=e.element.parentNode;if(n&&/pre/i.test(n.nodeName)&&(u.test(n.className)||u.test(e.element.className)))if(e.element.querySelector(".command-line-prompt"))a.complete=!0;else{var r=e.code.split("\n");a.numberOfLines=r.length;var s=a.outputLines=[],o=n.getAttribute("data-output"),i=n.getAttribute("data-filter-output");if(o||""===o){o=o.split(",");for(var l=0;lr.length&&(d=r.length),d--;for(var c=--p;c<=d;c++)s[c]=r[c],r[c]=""}}}else if(i)for(l=0;l');else{var i=r("data-user","user"),l=r("data-host","localhost");s=s.join('')}var m=document.createElement("span");m.className="command-line-prompt",m.innerHTML=s;for(var p=0,d=(a.outputLines||[]).length;ps.length&&(c=s.length),c--;for(var u=--p;u<=c;u++)o[u]=s[u],s[u]=""}}}else if(l)for(m=0;m');else{var i=r("data-user","user"),l=r("data-host","localhost");s=s.join('')}var m=document.createElement("span");m.className="command-line-prompt",m.innerHTML=s;for(var d=0,p=(a.outputLines||[]).length;d Date: Thu, 9 Apr 2020 00:39:09 +0200 Subject: [PATCH 0486/1100] gulp: Improved `inlineRegexSource` (#2296) --- components/prism-csharp.min.js | 2 +- components/prism-d.min.js | 2 +- components/prism-ftl.min.js | 2 +- components/prism-lilypond.min.js | 2 +- components/prism-markup.min.js | 2 +- components/prism-pure.min.js | 2 +- components/prism-qml.min.js | 2 +- components/prism-shell-session.min.js | 2 +- gulpfile.js/index.js | 22 +++++++++++++--------- 9 files changed, 21 insertions(+), 17 deletions(-) diff --git a/components/prism-csharp.min.js b/components/prism-csharp.min.js index 66a31bf1bc..e2f6a327d4 100644 --- a/components/prism-csharp.min.js +++ b/components/prism-csharp.min.js @@ -1 +1 @@ -!function(s){function a(e,s){return e.replace(/<<(\d+)>>/g,function(e,n){return"(?:"+s[+n]+")"})}function t(e,n,s){return RegExp(a(e,n),s||"")}function e(e,n){for(var s=0;s>/g,function(){return"(?:"+e+")"});return e.replace(/<>/g,"[^\\s\\S]")}var n="bool byte char decimal double dynamic float int long object sbyte short string uint ulong ushort var void",i="class enum interface struct",r="add alias ascending async await by descending from get global group into join let nameof notnull on orderby partial remove select set unmanaged value when where where",o="abstract as base break case catch checked const continue default delegate do else event explicit extern finally fixed for foreach goto if implicit in internal is lock namespace new null operator out override params private protected public readonly ref return sealed sizeof stackalloc static switch this throw try typeof unchecked unsafe using virtual volatile while yield";function l(e){return"\\b(?:"+e.trim().replace(/ /g,"|")+")\\b"}var d=l(i),p=RegExp(l(n+" "+i+" "+r+" "+o)),c=l(i+" "+r+" "+o),u=l(n+" "+i+" "+o),g=e("<(?:[^<>;=+\\-*/%&|^]|<>)*>",2),b=e("\\((?:[^()]|<>)*\\)",2),h="@?\\b[A-Za-z_]\\w*\\b",f=a("<<0>>(?:\\s*<<1>>)?",[h,g]),m=a("(?!<<0>>)<<1>>(?:\\s*\\.\\s*<<1>>)*",[c,f]),k="\\[\\s*(?:,\\s*)*\\]",y=a("(?:<<0>>|<<1>>)(?:\\s*(?:\\?\\s*)?<<2>>)*(?:\\s*\\?)?",[a("\\(<<0>>+(?:,<<0>>+)+\\)",[a("[^,()<>[\\];=+\\-*/%&|^]|<<0>>|<<1>>|<<2>>",[g,b,k])]),m,k]),w={keyword:p,punctuation:/[<>()?,.:[\]]/},v="'(?:[^\r\n'\\\\]|\\\\.|\\\\[Uux][\\da-fA-F]{1,8})'",x='"(?:\\\\.|[^\\\\"\r\n])*"';s.languages.csharp=s.languages.extend("clike",{string:[{pattern:t("(^|[^$\\\\])<<0>>",['@"(?:""|\\\\[\\s\\S]|[^\\\\"])*"(?!")']),lookbehind:!0,greedy:!0},{pattern:t("(^|[^@$\\\\])<<0>>",[x]),lookbehind:!0,greedy:!0},{pattern:RegExp(v),greedy:!0,alias:"character"}],"class-name":[{pattern:t("(\\busing\\s+static\\s+)<<0>>(?=\\s*;)",[m]),lookbehind:!0,inside:w},{pattern:t("(\\busing\\s+<<0>>\\s*=\\s*)<<1>>(?=\\s*;)",[h,y]),lookbehind:!0,inside:w},{pattern:t("(\\busing\\s+)<<0>>(?=\\s*=)",[h]),lookbehind:!0},{pattern:t("(\\b<<0>>\\s+)<<1>>",[d,f]),lookbehind:!0,inside:w},{pattern:t("(\\bcatch\\s*\\(\\s*)<<0>>",[m]),lookbehind:!0,inside:w},{pattern:t("(\\bwhere\\s+)<<0>>",[h]),lookbehind:!0},{pattern:t("(\\b(?:is|as)\\s+)<<0>>",[y]),lookbehind:!0,inside:w},{pattern:t("\\b<<0>>(?=\\s+(?!<<1>>)<<2>>(?:\\s*[=,;:{)\\]]|\\s+in))",[y,u,h]),inside:w}],keyword:p,number:/(?:\b0(?:x[\da-f_]*[\da-f]|b[01_]*[01])|(?:\B\.\d+(?:_+\d+)*|\b\d+(?:_+\d+)*(?:\.\d+(?:_+\d+)*)?)(?:e[-+]?\d+(?:_+\d+)*)?)(?:ul|lu|[dflmu])?\b/i,operator:/>>=?|<<=?|[-=]>|([-+&|])\1|~|\?\?=?|[-+*/%&|^!=<>]=?/,punctuation:/\?\.?|::|[{}[\];(),.:]/}),s.languages.insertBefore("csharp","number",{range:{pattern:/\.\./,alias:"operator"}}),s.languages.insertBefore("csharp","punctuation",{"named-parameter":{pattern:t("([(,]\\s*)<<0>>(?=\\s*:)",[h]),lookbehind:!0,alias:"punctuation"}}),s.languages.insertBefore("csharp","class-name",{namespace:{pattern:t("(\\b(?:namespace|using)\\s+)<<0>>(?:\\s*\\.\\s*<<0>>)*(?=\\s*[;{])",[h]),lookbehind:!0,inside:{punctuation:/\./}},"type-expression":{pattern:t("(\\b(?:default|typeof|sizeof)\\s*\\(\\s*)(?:[^()\\s]|\\s(?!\\s*\\))|<<0>>)*(?=\\s*\\))",[b]),lookbehind:!0,alias:"class-name",inside:w},"return-type":{pattern:t("<<0>>(?=\\s+(?:<<1>>\\s*(?:=>|[({]|\\.\\s*this\\s*\\[)|this\\s*\\[))",[y,m]),inside:w,alias:"class-name"},"constructor-invocation":{pattern:t("(\\bnew\\s+)<<0>>(?=\\s*[[({])",[y]),lookbehind:!0,inside:w,alias:"class-name"},"generic-method":{pattern:t("<<0>>\\s*<<1>>(?=\\s*\\()",[h,g]),inside:{function:t("^<<0>>",[h]),generic:{pattern:RegExp(g),alias:"class-name",inside:w}}},"type-list":{pattern:t("\\b((?:<<0>>\\s+<<1>>|where\\s+<<2>>)\\s*:\\s*)(?:<<3>>|<<4>>)(?:\\s*,\\s*(?:<<3>>|<<4>>))*(?=\\s*(?:where|[{;]|=>|$))",[d,f,h,y,p.source]),lookbehind:!0,inside:{keyword:p,"class-name":{pattern:RegExp(y),greedy:!0,inside:w},punctuation:/,/}},preprocessor:{pattern:/(^\s*)#.*/m,lookbehind:!0,alias:"property",inside:{directive:{pattern:/(\s*#)\b(?:define|elif|else|endif|endregion|error|if|line|pragma|region|undef|warning)\b/,lookbehind:!0,alias:"keyword"}}}});var $=x+"|"+v,_=a("\\/(?![*/])|\\/\\/[^\r\n]*[\r\n]|\\/\\*[\\s\\S]*?\\*\\/|<<0>>",[$]),B=e(a("[^\"'/()]|<<0>>|\\(<>*\\)",[_]),2),E="\\b(?:assembly|event|field|method|module|param|property|return|type)\\b",R=a("<<0>>(?:\\s*\\(<<1>>*\\))?",[m,B]);s.languages.insertBefore("csharp","class-name",{attribute:{pattern:t("((?:^|[^\\s\\w>)?])\\s*\\[\\s*)(?:<<0>>\\s*:\\s*)?<<1>>(?:\\s*,\\s*<<1>>)*(?=\\s*\\])",[E,R]),lookbehind:!0,greedy:!0,inside:{target:{pattern:t("^<<0>>(?=\\s*:)",[E]),alias:"keyword"},"attribute-arguments":{pattern:t("\\(<<0>>*\\)",[B]),inside:s.languages.csharp},"class-name":{pattern:RegExp(m),inside:{punctuation:/\./}},punctuation:/[:,]/}}});var S=":[^}\r\n]+",P=e(a("[^\"'/()]|<<0>>|\\(<>*\\)",[_]),2),z=a("\\{(?!\\{)(?:(?![}:])<<0>>)*<<1>>?\\}",[P,S]),j=e(a("[^\"'/()]|\\/(?!\\*)|\\/\\*.*?\\*\\/|<<0>>|\\(<>*\\)",[$]),2),A=a("\\{(?!\\{)(?:(?![}:])<<0>>)*<<1>>?\\}",[j,S]);function F(e,n){return{interpolation:{pattern:t("([^{](?:\\{\\{)*)<<0>>",[e]),lookbehind:!0,inside:{"format-string":{pattern:t("(^\\{(?:(?![}:])<<0>>)*)<<1>>(?=\\}$)",[n,S]),lookbehind:!0,inside:{punctuation:/^:/}},punctuation:/^\{|\}$/,expression:{pattern:/[\s\S]+/,alias:"language-csharp",inside:s.languages.csharp}}},string:/[\s\S]+/}}s.languages.insertBefore("csharp","string",{"interpolation-string":[{pattern:t('(^|[^\\\\])(?:\\$@|@\\$)"(?:""|\\\\[\\s\\S]|\\{\\{|<<0>>|[^\\\\{"])*"',[z]),lookbehind:!0,greedy:!0,inside:F(z,P)},{pattern:t('(^|[^@\\\\])\\$"(?:\\\\.|\\{\\{|<<0>>|[^\\\\"{])*"',[A]),lookbehind:!0,greedy:!0,inside:F(A,j)}]})}(Prism),Prism.languages.dotnet=Prism.languages.cs=Prism.languages.csharp; \ No newline at end of file +!function(s){function a(e,s){return e.replace(/<<(\d+)>>/g,function(e,n){return"(?:"+s[+n]+")"})}function t(e,n,s){return RegExp(a(e,n),s||"")}function e(e,n){for(var s=0;s>/g,function(){return"(?:"+e+")"});return e.replace(/<>/g,"[^\\s\\S]")}var n="bool byte char decimal double dynamic float int long object sbyte short string uint ulong ushort var void",i="class enum interface struct",r="add alias ascending async await by descending from get global group into join let nameof notnull on orderby partial remove select set unmanaged value when where where",o="abstract as base break case catch checked const continue default delegate do else event explicit extern finally fixed for foreach goto if implicit in internal is lock namespace new null operator out override params private protected public readonly ref return sealed sizeof stackalloc static switch this throw try typeof unchecked unsafe using virtual volatile while yield";function l(e){return"\\b(?:"+e.trim().replace(/ /g,"|")+")\\b"}var d=l(i),p=RegExp(l(n+" "+i+" "+r+" "+o)),c=l(i+" "+r+" "+o),u=l(n+" "+i+" "+o),g=e("<(?:[^<>;=+\\-*/%&|^]|<>)*>",2),b=e("\\((?:[^()]|<>)*\\)",2),h="@?\\b[A-Za-z_]\\w*\\b",f=a("<<0>>(?:\\s*<<1>>)?",[h,g]),m=a("(?!<<0>>)<<1>>(?:\\s*\\.\\s*<<1>>)*",[c,f]),k="\\[\\s*(?:,\\s*)*\\]",y=a("(?:<<0>>|<<1>>)(?:\\s*(?:\\?\\s*)?<<2>>)*(?:\\s*\\?)?",[a("\\(<<0>>+(?:,<<0>>+)+\\)",[a("[^,()<>[\\];=+\\-*/%&|^]|<<0>>|<<1>>|<<2>>",[g,b,k])]),m,k]),w={keyword:p,punctuation:/[<>()?,.:[\]]/},v="'(?:[^\r\n'\\\\]|\\\\.|\\\\[Uux][\\da-fA-F]{1,8})'",x='"(?:\\\\.|[^\\\\"\r\n])*"';s.languages.csharp=s.languages.extend("clike",{string:[{pattern:t("(^|[^$\\\\])<<0>>",['@"(?:""|\\\\[^]|[^\\\\"])*"(?!")']),lookbehind:!0,greedy:!0},{pattern:t("(^|[^@$\\\\])<<0>>",[x]),lookbehind:!0,greedy:!0},{pattern:RegExp(v),greedy:!0,alias:"character"}],"class-name":[{pattern:t("(\\busing\\s+static\\s+)<<0>>(?=\\s*;)",[m]),lookbehind:!0,inside:w},{pattern:t("(\\busing\\s+<<0>>\\s*=\\s*)<<1>>(?=\\s*;)",[h,y]),lookbehind:!0,inside:w},{pattern:t("(\\busing\\s+)<<0>>(?=\\s*=)",[h]),lookbehind:!0},{pattern:t("(\\b<<0>>\\s+)<<1>>",[d,f]),lookbehind:!0,inside:w},{pattern:t("(\\bcatch\\s*\\(\\s*)<<0>>",[m]),lookbehind:!0,inside:w},{pattern:t("(\\bwhere\\s+)<<0>>",[h]),lookbehind:!0},{pattern:t("(\\b(?:is|as)\\s+)<<0>>",[y]),lookbehind:!0,inside:w},{pattern:t("\\b<<0>>(?=\\s+(?!<<1>>)<<2>>(?:\\s*[=,;:{)\\]]|\\s+in))",[y,u,h]),inside:w}],keyword:p,number:/(?:\b0(?:x[\da-f_]*[\da-f]|b[01_]*[01])|(?:\B\.\d+(?:_+\d+)*|\b\d+(?:_+\d+)*(?:\.\d+(?:_+\d+)*)?)(?:e[-+]?\d+(?:_+\d+)*)?)(?:ul|lu|[dflmu])?\b/i,operator:/>>=?|<<=?|[-=]>|([-+&|])\1|~|\?\?=?|[-+*/%&|^!=<>]=?/,punctuation:/\?\.?|::|[{}[\];(),.:]/}),s.languages.insertBefore("csharp","number",{range:{pattern:/\.\./,alias:"operator"}}),s.languages.insertBefore("csharp","punctuation",{"named-parameter":{pattern:t("([(,]\\s*)<<0>>(?=\\s*:)",[h]),lookbehind:!0,alias:"punctuation"}}),s.languages.insertBefore("csharp","class-name",{namespace:{pattern:t("(\\b(?:namespace|using)\\s+)<<0>>(?:\\s*\\.\\s*<<0>>)*(?=\\s*[;{])",[h]),lookbehind:!0,inside:{punctuation:/\./}},"type-expression":{pattern:t("(\\b(?:default|typeof|sizeof)\\s*\\(\\s*)(?:[^()\\s]|\\s(?!\\s*\\))|<<0>>)*(?=\\s*\\))",[b]),lookbehind:!0,alias:"class-name",inside:w},"return-type":{pattern:t("<<0>>(?=\\s+(?:<<1>>\\s*(?:=>|[({]|\\.\\s*this\\s*\\[)|this\\s*\\[))",[y,m]),inside:w,alias:"class-name"},"constructor-invocation":{pattern:t("(\\bnew\\s+)<<0>>(?=\\s*[[({])",[y]),lookbehind:!0,inside:w,alias:"class-name"},"generic-method":{pattern:t("<<0>>\\s*<<1>>(?=\\s*\\()",[h,g]),inside:{function:t("^<<0>>",[h]),generic:{pattern:RegExp(g),alias:"class-name",inside:w}}},"type-list":{pattern:t("\\b((?:<<0>>\\s+<<1>>|where\\s+<<2>>)\\s*:\\s*)(?:<<3>>|<<4>>)(?:\\s*,\\s*(?:<<3>>|<<4>>))*(?=\\s*(?:where|[{;]|=>|$))",[d,f,h,y,p.source]),lookbehind:!0,inside:{keyword:p,"class-name":{pattern:RegExp(y),greedy:!0,inside:w},punctuation:/,/}},preprocessor:{pattern:/(^\s*)#.*/m,lookbehind:!0,alias:"property",inside:{directive:{pattern:/(\s*#)\b(?:define|elif|else|endif|endregion|error|if|line|pragma|region|undef|warning)\b/,lookbehind:!0,alias:"keyword"}}}});var $=x+"|"+v,_=a("/(?![*/])|//[^\r\n]*[\r\n]|/\\*[^]*?\\*/|<<0>>",[$]),B=e(a("[^\"'/()]|<<0>>|\\(<>*\\)",[_]),2),E="\\b(?:assembly|event|field|method|module|param|property|return|type)\\b",R=a("<<0>>(?:\\s*\\(<<1>>*\\))?",[m,B]);s.languages.insertBefore("csharp","class-name",{attribute:{pattern:t("((?:^|[^\\s\\w>)?])\\s*\\[\\s*)(?:<<0>>\\s*:\\s*)?<<1>>(?:\\s*,\\s*<<1>>)*(?=\\s*\\])",[E,R]),lookbehind:!0,greedy:!0,inside:{target:{pattern:t("^<<0>>(?=\\s*:)",[E]),alias:"keyword"},"attribute-arguments":{pattern:t("\\(<<0>>*\\)",[B]),inside:s.languages.csharp},"class-name":{pattern:RegExp(m),inside:{punctuation:/\./}},punctuation:/[:,]/}}});var P=":[^}\r\n]+",z=e(a("[^\"'/()]|<<0>>|\\(<>*\\)",[_]),2),S=a("\\{(?!\\{)(?:(?![}:])<<0>>)*<<1>>?\\}",[z,P]),j=e(a("[^\"'/()]|/(?!\\*)|/\\*.*?\\*/|<<0>>|\\(<>*\\)",[$]),2),A=a("\\{(?!\\{)(?:(?![}:])<<0>>)*<<1>>?\\}",[j,P]);function F(e,n){return{interpolation:{pattern:t("([^{](?:\\{\\{)*)<<0>>",[e]),lookbehind:!0,inside:{"format-string":{pattern:t("(^\\{(?:(?![}:])<<0>>)*)<<1>>(?=\\}$)",[n,P]),lookbehind:!0,inside:{punctuation:/^:/}},punctuation:/^\{|\}$/,expression:{pattern:/[\s\S]+/,alias:"language-csharp",inside:s.languages.csharp}}},string:/[\s\S]+/}}s.languages.insertBefore("csharp","string",{"interpolation-string":[{pattern:t('(^|[^\\\\])(?:\\$@|@\\$)"(?:""|\\\\[^]|\\{\\{|<<0>>|[^\\\\{"])*"',[S]),lookbehind:!0,greedy:!0,inside:F(S,z)},{pattern:t('(^|[^@\\\\])\\$"(?:\\\\.|\\{\\{|<<0>>|[^\\\\"{])*"',[A]),lookbehind:!0,greedy:!0,inside:F(A,j)}]})}(Prism),Prism.languages.dotnet=Prism.languages.cs=Prism.languages.csharp; \ No newline at end of file diff --git a/components/prism-d.min.js b/components/prism-d.min.js index 782340f502..8732878db6 100644 --- a/components/prism-d.min.js +++ b/components/prism-d.min.js @@ -1 +1 @@ -Prism.languages.d=Prism.languages.extend("clike",{comment:[{pattern:/^\s*#!.+/,greedy:!0},{pattern:RegExp("(^|[^\\\\])(?:"+["\\/\\+(?:\\/\\+[\\s\\S]*?\\+\\/|(?!\\/\\+)[\\s\\S])*?\\+\\/","\\/\\/.*","\\/\\*[\\s\\S]*?\\*\\/"].join("|")+")"),lookbehind:!0,greedy:!0}],string:[{pattern:RegExp(['\\b[rx]"(?:\\\\[\\s\\S]|[^\\\\"])*"[cwd]?','\\bq"(?:\\[[\\s\\S]*?\\]|\\([\\s\\S]*?\\)|<[\\s\\S]*?>|\\{[\\s\\S]*?\\})"','\\bq"((?!\\d)\\w+)$[\\s\\S]*?^\\1"','\\bq"(.)[\\s\\S]*?\\2"',"'(?:\\\\(?:\\W|\\w+)|[^\\\\])'",'(["`])(?:\\\\[\\s\\S]|(?!\\3)[^\\\\])*\\3[cwd]?'].join("|"),"m"),greedy:!0},{pattern:/\bq\{(?:\{[^{}]*\}|[^{}])*\}/,greedy:!0,alias:"token-string"}],number:[/\b0x\.?[a-f\d_]+(?:(?!\.\.)\.[a-f\d_]*)?(?:p[+-]?[a-f\d_]+)?[ulfi]*/i,{pattern:/((?:\.\.)?)(?:\b0b\.?|\b|\.)\d[\d_]*(?:(?!\.\.)\.[\d_]*)?(?:e[+-]?\d[\d_]*)?[ulfi]*/i,lookbehind:!0}],keyword:/\$|\b(?:abstract|alias|align|asm|assert|auto|body|bool|break|byte|case|cast|catch|cdouble|cent|cfloat|char|class|const|continue|creal|dchar|debug|default|delegate|delete|deprecated|do|double|else|enum|export|extern|false|final|finally|float|for|foreach|foreach_reverse|function|goto|idouble|if|ifloat|immutable|import|inout|int|interface|invariant|ireal|lazy|long|macro|mixin|module|new|nothrow|null|out|override|package|pragma|private|protected|public|pure|real|ref|return|scope|shared|short|static|struct|super|switch|synchronized|template|this|throw|true|try|typedef|typeid|typeof|ubyte|ucent|uint|ulong|union|unittest|ushort|version|void|volatile|wchar|while|with|__(?:(?:FILE|MODULE|LINE|FUNCTION|PRETTY_FUNCTION|DATE|EOF|TIME|TIMESTAMP|VENDOR|VERSION)__|gshared|traits|vector|parameters)|string|wstring|dstring|size_t|ptrdiff_t)\b/,operator:/\|[|=]?|&[&=]?|\+[+=]?|-[-=]?|\.?\.\.|=[>=]?|!(?:i[ns]\b|<>?=?|>=?|=)?|\bi[ns]\b|(?:<[<>]?|>>?>?|\^\^|[*\/%^~])=?/}),Prism.languages.insertBefore("d","keyword",{property:/\B@\w*/}),Prism.languages.insertBefore("d","function",{register:{pattern:/\b(?:[ABCD][LHX]|E[ABCD]X|E?(?:BP|SP|DI|SI)|[ECSDGF]S|CR[0234]|DR[012367]|TR[3-7]|X?MM[0-7]|R[ABCD]X|[BS]PL|R[BS]P|[DS]IL|R[DS]I|R(?:[89]|1[0-5])[BWD]?|XMM(?:[89]|1[0-5])|YMM(?:1[0-5]|\d))\b|\bST(?:\([0-7]\)|\b)/,alias:"variable"}}); \ No newline at end of file +Prism.languages.d=Prism.languages.extend("clike",{comment:[{pattern:/^\s*#!.+/,greedy:!0},{pattern:RegExp("(^|[^\\\\])(?:"+["/\\+(?:/\\+[^]*?\\+/|(?!/\\+)[^])*?\\+/","//.*","/\\*[^]*?\\*/"].join("|")+")"),lookbehind:!0,greedy:!0}],string:[{pattern:RegExp(['\\b[rx]"(?:\\\\[^]|[^\\\\"])*"[cwd]?','\\bq"(?:\\[[^]*?\\]|\\([^]*?\\)|<[^]*?>|\\{[^]*?\\})"','\\bq"((?!\\d)\\w+)$[^]*?^\\1"','\\bq"(.)[^]*?\\2"',"'(?:\\\\(?:\\W|\\w+)|[^\\\\])'",'(["`])(?:\\\\[^]|(?!\\3)[^\\\\])*\\3[cwd]?'].join("|"),"m"),greedy:!0},{pattern:/\bq\{(?:\{[^{}]*\}|[^{}])*\}/,greedy:!0,alias:"token-string"}],number:[/\b0x\.?[a-f\d_]+(?:(?!\.\.)\.[a-f\d_]*)?(?:p[+-]?[a-f\d_]+)?[ulfi]*/i,{pattern:/((?:\.\.)?)(?:\b0b\.?|\b|\.)\d[\d_]*(?:(?!\.\.)\.[\d_]*)?(?:e[+-]?\d[\d_]*)?[ulfi]*/i,lookbehind:!0}],keyword:/\$|\b(?:abstract|alias|align|asm|assert|auto|body|bool|break|byte|case|cast|catch|cdouble|cent|cfloat|char|class|const|continue|creal|dchar|debug|default|delegate|delete|deprecated|do|double|else|enum|export|extern|false|final|finally|float|for|foreach|foreach_reverse|function|goto|idouble|if|ifloat|immutable|import|inout|int|interface|invariant|ireal|lazy|long|macro|mixin|module|new|nothrow|null|out|override|package|pragma|private|protected|public|pure|real|ref|return|scope|shared|short|static|struct|super|switch|synchronized|template|this|throw|true|try|typedef|typeid|typeof|ubyte|ucent|uint|ulong|union|unittest|ushort|version|void|volatile|wchar|while|with|__(?:(?:FILE|MODULE|LINE|FUNCTION|PRETTY_FUNCTION|DATE|EOF|TIME|TIMESTAMP|VENDOR|VERSION)__|gshared|traits|vector|parameters)|string|wstring|dstring|size_t|ptrdiff_t)\b/,operator:/\|[|=]?|&[&=]?|\+[+=]?|-[-=]?|\.?\.\.|=[>=]?|!(?:i[ns]\b|<>?=?|>=?|=)?|\bi[ns]\b|(?:<[<>]?|>>?>?|\^\^|[*\/%^~])=?/}),Prism.languages.insertBefore("d","keyword",{property:/\B@\w*/}),Prism.languages.insertBefore("d","function",{register:{pattern:/\b(?:[ABCD][LHX]|E[ABCD]X|E?(?:BP|SP|DI|SI)|[ECSDGF]S|CR[0234]|DR[012367]|TR[3-7]|X?MM[0-7]|R[ABCD]X|[BS]PL|R[BS]P|[DS]IL|R[DS]I|R(?:[89]|1[0-5])[BWD]?|XMM(?:[89]|1[0-5])|YMM(?:1[0-5]|\d))\b|\bST(?:\([0-7]\)|\b)/,alias:"variable"}}); \ No newline at end of file diff --git a/components/prism-ftl.min.js b/components/prism-ftl.min.js index 03c230757e..5b99ac5be3 100644 --- a/components/prism-ftl.min.js +++ b/components/prism-ftl.min.js @@ -1 +1 @@ -!function(n){for(var i="(?!<#--)[^()\"']|\\((?:)*\\)|<#--[\\s\\S]*?--\x3e|\"(?:[^\\\\\"]|\\\\.)*\"|'(?:[^\\\\']|\\\\.)*'",e=0;e<2;e++)i=i.replace(//g,function(){return i});i=i.replace(//g,"[^sS]");var t={comment:/<#--[\s\S]*?-->/,string:[{pattern:/\br("|')(?:(?!\1)[^\\]|\\.)*\1/,greedy:!0},{pattern:RegExp("(\"|')(?:(?!\\1|\\$\\{)[^\\\\]|\\\\.|\\$\\{(?:)*?\\})*\\1".replace(//g,function(){return i})),greedy:!0,inside:{interpolation:{pattern:RegExp("((?:^|[^\\\\])(?:\\\\\\\\)*)\\$\\{(?:)*?\\}".replace(//g,function(){return i})),lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:null}}}}],keyword:/\b(?:as)\b/,boolean:/\b(?:true|false)\b/,"builtin-function":{pattern:/((?:^|[^?])\?\s*)\w+/,lookbehind:!0,alias:"function"},function:/\w+(?=\s*\()/,number:/\d+(?:\.\d+)?/,operator:/\.\.[<*!]?|->|--|\+\+|&&|\|\||\?{1,2}|[-+*/%!=<>]=?|\b(?:gt|gte|lt|lte)\b/,punctuation:/[,;.:()[\]{}]/};t.string[1].inside.interpolation.inside.rest=t,n.languages.ftl={"ftl-comment":{pattern:/^<#--[\s\S]*/,alias:"comment"},"ftl-directive":{pattern:/^<[\s\S]+>$/,inside:{directive:{pattern:/(^<\/?)[#@][a-z]\w*/i,lookbehind:!0,alias:"keyword"},punctuation:/^<\/?|\/?>$/,content:{pattern:/[\s\S]*\S[\s\S]*/,alias:"ftl",inside:t}}},"ftl-interpolation":{pattern:/^\$\{[\s\S]*\}$/,inside:{punctuation:/^\$\{|\}$/,content:{pattern:/[\s\S]*\S[\s\S]*/,alias:"ftl",inside:t}}}},n.hooks.add("before-tokenize",function(e){var t=RegExp("<#--[\\s\\S]*?--\x3e|<\\/?[#@][a-zA-Z](?:)*?>|\\$\\{(?:)*?\\}".replace(//g,function(){return i}),"gi");n.languages["markup-templating"].buildPlaceholders(e,"ftl",t)}),n.hooks.add("after-tokenize",function(e){n.languages["markup-templating"].tokenizePlaceholders(e,"ftl")})}(Prism); \ No newline at end of file +!function(n){for(var i="(?!<#--)[^()\"']|\\((?:)*\\)|<#--[^]*?--\x3e|\"(?:[^\\\\\"]|\\\\.)*\"|'(?:[^\\\\']|\\\\.)*'",e=0;e<2;e++)i=i.replace(//g,function(){return i});i=i.replace(//g,"[^sS]");var t={comment:/<#--[\s\S]*?-->/,string:[{pattern:/\br("|')(?:(?!\1)[^\\]|\\.)*\1/,greedy:!0},{pattern:RegExp("(\"|')(?:(?!\\1|\\$\\{)[^\\\\]|\\\\.|\\$\\{(?:)*?\\})*\\1".replace(//g,function(){return i})),greedy:!0,inside:{interpolation:{pattern:RegExp("((?:^|[^\\\\])(?:\\\\\\\\)*)\\$\\{(?:)*?\\}".replace(//g,function(){return i})),lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:null}}}}],keyword:/\b(?:as)\b/,boolean:/\b(?:true|false)\b/,"builtin-function":{pattern:/((?:^|[^?])\?\s*)\w+/,lookbehind:!0,alias:"function"},function:/\w+(?=\s*\()/,number:/\d+(?:\.\d+)?/,operator:/\.\.[<*!]?|->|--|\+\+|&&|\|\||\?{1,2}|[-+*/%!=<>]=?|\b(?:gt|gte|lt|lte)\b/,punctuation:/[,;.:()[\]{}]/};t.string[1].inside.interpolation.inside.rest=t,n.languages.ftl={"ftl-comment":{pattern:/^<#--[\s\S]*/,alias:"comment"},"ftl-directive":{pattern:/^<[\s\S]+>$/,inside:{directive:{pattern:/(^<\/?)[#@][a-z]\w*/i,lookbehind:!0,alias:"keyword"},punctuation:/^<\/?|\/?>$/,content:{pattern:/[\s\S]*\S[\s\S]*/,alias:"ftl",inside:t}}},"ftl-interpolation":{pattern:/^\$\{[\s\S]*\}$/,inside:{punctuation:/^\$\{|\}$/,content:{pattern:/[\s\S]*\S[\s\S]*/,alias:"ftl",inside:t}}}},n.hooks.add("before-tokenize",function(e){var t=RegExp("<#--[^]*?--\x3e|)*?>|\\$\\{(?:)*?\\}".replace(//g,function(){return i}),"gi");n.languages["markup-templating"].buildPlaceholders(e,"ftl",t)}),n.hooks.add("after-tokenize",function(e){n.languages["markup-templating"].tokenizePlaceholders(e,"ftl")})}(Prism); \ No newline at end of file diff --git a/components/prism-lilypond.min.js b/components/prism-lilypond.min.js index 2101047089..3015c84ed8 100644 --- a/components/prism-lilypond.min.js +++ b/components/prism-lilypond.min.js @@ -1 +1 @@ -!function(e){for(var n='\\((?:[^();"#\\\\]|\\\\[\\s\\S]|;.*|"(?:[^"\\\\]|\\\\.)*"|#(?:\\{(?:(?!#\\})[\\s\\S])*#\\}|[^{])|)*\\)',i=0;i<5;i++)n=n.replace(//g,function(){return n});n=n.replace(//g,"[^\\s\\S]");var d=e.languages.lilypond={comment:/%(?:(?!\{).*|\{[\s\S]*?%\})/,"embedded-scheme":{pattern:RegExp('(^|[=\\s])#(?:"(?:[^"\\\\]|\\\\.)*"|[^\\s()"]*(?:[^\\s()]|))'.replace(//g,function(){return n}),"m"),lookbehind:!0,greedy:!0,inside:{scheme:{pattern:/^(#)[\s\S]+$/,lookbehind:!0,alias:"language-scheme",inside:{"embedded-lilypond":{pattern:/#\{[\s\S]*?#\}/,greedy:!0,inside:{punctuation:/^#\{|#\}$/,lilypond:{pattern:/[\s\S]+/,alias:"language-lilypond",inside:null}}},rest:e.languages.scheme}},punctuation:/#/}},string:{pattern:/"(?:[^"\\]|\\.)*"/,greedy:!0},"class-name":{pattern:/(\\new\s+)[\w-]+/,lookbehind:!0},keyword:{pattern:/\\[a-z][-\w]*/i,inside:{punctuation:/^\\/}},operator:/[=|]|<<|>>/,punctuation:{pattern:/(^|[a-z\d])(?:'+|,+|[_^]?-[_^]?(?:[-+^!>._]|(?=\d))|[_^]\.?|[.!])|[{}()[\]<>^~]|\\[()[\]<>\\!]|--|__/,lookbehind:!0},number:/\b\d+(?:\/\d+)?\b/};d["embedded-scheme"].inside.scheme.inside["embedded-lilypond"].inside.lilypond.inside=d,e.languages.ly=d}(Prism); \ No newline at end of file +!function(e){for(var n='\\((?:[^();"#\\\\]|\\\\[^]|;.*|"(?:[^"\\\\]|\\\\.)*"|#(?:\\{(?:(?!#\\})[^])*#\\}|[^{])|)*\\)',i=0;i<5;i++)n=n.replace(//g,function(){return n});n=n.replace(//g,"[^\\s\\S]");var d=e.languages.lilypond={comment:/%(?:(?!\{).*|\{[\s\S]*?%\})/,"embedded-scheme":{pattern:RegExp('(^|[=\\s])#(?:"(?:[^"\\\\]|\\\\.)*"|[^\\s()"]*(?:[^\\s()]|))'.replace(//g,function(){return n}),"m"),lookbehind:!0,greedy:!0,inside:{scheme:{pattern:/^(#)[\s\S]+$/,lookbehind:!0,alias:"language-scheme",inside:{"embedded-lilypond":{pattern:/#\{[\s\S]*?#\}/,greedy:!0,inside:{punctuation:/^#\{|#\}$/,lilypond:{pattern:/[\s\S]+/,alias:"language-lilypond",inside:null}}},rest:e.languages.scheme}},punctuation:/#/}},string:{pattern:/"(?:[^"\\]|\\.)*"/,greedy:!0},"class-name":{pattern:/(\\new\s+)[\w-]+/,lookbehind:!0},keyword:{pattern:/\\[a-z][-\w]*/i,inside:{punctuation:/^\\/}},operator:/[=|]|<<|>>/,punctuation:{pattern:/(^|[a-z\d])(?:'+|,+|[_^]?-[_^]?(?:[-+^!>._]|(?=\d))|[_^]\.?|[.!])|[{}()[\]<>^~]|\\[()[\]<>\\!]|--|__/,lookbehind:!0},number:/\b\d+(?:\/\d+)?\b/};d["embedded-scheme"].inside.scheme.inside["embedded-lilypond"].inside.lilypond.inside=d,e.languages.ly=d}(Prism); \ No newline at end of file diff --git a/components/prism-markup.min.js b/components/prism-markup.min.js index ac113b2d8a..9b9b160ba5 100644 --- a/components/prism-markup.min.js +++ b/components/prism-markup.min.js @@ -1 +1 @@ -Prism.languages.markup={comment://,prolog:/<\?[\s\S]+?\?>/,doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:(?!)*\]\s*)?>/i,greedy:!0},cdata://i,tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/i,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/i,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/i,inside:{punctuation:[/^=/,{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:/&#?[\da-z]{1,8};/i},Prism.languages.markup.tag.inside["attr-value"].inside.entity=Prism.languages.markup.entity,Prism.hooks.add("wrap",function(a){"entity"===a.type&&(a.attributes.title=a.content.replace(/&/,"&"))}),Object.defineProperty(Prism.languages.markup.tag,"addInlined",{value:function(a,e){var s={};s["language-"+e]={pattern:/(^$)/i,lookbehind:!0,inside:Prism.languages[e]},s.cdata=/^$/i;var n={"included-cdata":{pattern://i,inside:s}};n["language-"+e]={pattern:/[\s\S]+/,inside:Prism.languages[e]};var t={};t[a]={pattern:RegExp("(<__[\\s\\S]*?>)(?:\\s*|[\\s\\S])*?(?=<\\/__>)".replace(/__/g,function(){return a}),"i"),lookbehind:!0,greedy:!0,inside:n},Prism.languages.insertBefore("markup","cdata",t)}}),Prism.languages.xml=Prism.languages.extend("markup",{}),Prism.languages.html=Prism.languages.markup,Prism.languages.mathml=Prism.languages.markup,Prism.languages.svg=Prism.languages.markup; \ No newline at end of file +Prism.languages.markup={comment://,prolog:/<\?[\s\S]+?\?>/,doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:(?!)*\]\s*)?>/i,greedy:!0},cdata://i,tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/i,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/i,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/i,inside:{punctuation:[/^=/,{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:/&#?[\da-z]{1,8};/i},Prism.languages.markup.tag.inside["attr-value"].inside.entity=Prism.languages.markup.entity,Prism.hooks.add("wrap",function(a){"entity"===a.type&&(a.attributes.title=a.content.replace(/&/,"&"))}),Object.defineProperty(Prism.languages.markup.tag,"addInlined",{value:function(a,e){var s={};s["language-"+e]={pattern:/(^$)/i,lookbehind:!0,inside:Prism.languages[e]},s.cdata=/^$/i;var n={"included-cdata":{pattern://i,inside:s}};n["language-"+e]={pattern:/[\s\S]+/,inside:Prism.languages[e]};var t={};t[a]={pattern:RegExp("(<__[^]*?>)(?:\\s*|[^])*?(?=)".replace(/__/g,function(){return a}),"i"),lookbehind:!0,greedy:!0,inside:n},Prism.languages.insertBefore("markup","cdata",t)}}),Prism.languages.xml=Prism.languages.extend("markup",{}),Prism.languages.html=Prism.languages.markup,Prism.languages.mathml=Prism.languages.markup,Prism.languages.svg=Prism.languages.markup; \ No newline at end of file diff --git a/components/prism-pure.min.js b/components/prism-pure.min.js index 52db33e4c1..079f0479e1 100644 --- a/components/prism-pure.min.js +++ b/components/prism-pure.min.js @@ -1 +1 @@ -!function(r){r.languages.pure={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?\*\//,lookbehind:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0},/#!.+/],"inline-lang":{pattern:/%<[\s\S]+?%>/,greedy:!0,inside:{lang:{pattern:/(^%< *)-\*-.+?-\*-/,lookbehind:!0,alias:"comment"},delimiter:{pattern:/^%<.*|%>$/,alias:"punctuation"}}},string:{pattern:/"(?:\\.|[^"\\\r\n])*"/,greedy:!0},number:{pattern:/((?:\.\.)?)(?:\b(?:inf|nan)\b|\b0x[\da-f]+|(?:\b(?:0b)?\d+(?:\.\d)?|\B\.\d)\d*(?:e[+-]?\d+)?L?)/i,lookbehind:!0},keyword:/\b(?:ans|break|bt|case|catch|cd|clear|const|def|del|dump|else|end|exit|extern|false|force|help|if|infix[lr]?|interface|let|ls|mem|namespace|nonfix|NULL|of|otherwise|outfix|override|postfix|prefix|private|public|pwd|quit|run|save|show|stats|then|throw|trace|true|type|underride|using|when|with)\b/,function:/\b(?:abs|add_(?:(?:fundef|interface|macdef|typedef)(?:_at)?|addr|constdef|vardef)|all|any|applp?|arity|bigintp?|blob(?:_crc|_size|p)?|boolp?|byte_(?:matrix|pointer)|byte_c?string(?:_pointer)?|calloc|cat|catmap|ceil|char[ps]?|check_ptrtag|chr|clear_sentry|clearsym|closurep?|cmatrixp?|cols?|colcat(?:map)?|colmap|colrev|colvector(?:p|seq)?|complex(?:_float_(?:matrix|pointer)|_matrix(?:_view)?|_pointer|p)?|conj|cookedp?|cst|cstring(?:_(?:dup|list|vector))?|curry3?|cyclen?|del_(?:constdef|fundef|interface|macdef|typedef|vardef)|delete|diag(?:mat)?|dim|dmatrixp?|do|double(?:_matrix(?:_view)?|_pointer|p)?|dowith3?|drop|dropwhile|eval(?:cmd)?|exactp|filter|fix|fixity|flip|float(?:_matrix|_pointer)|floor|fold[lr]1?|frac|free|funp?|functionp?|gcd|get(?:_(?:byte|constdef|double|float|fundef|int(?:64)?|interface(?:_typedef)?|long|macdef|pointer|ptrtag|short|sentry|string|typedef|vardef))?|globsym|hash|head|id|im|imatrixp?|index|inexactp|infp|init|insert|int(?:_matrix(?:_view)?|_pointer|p)?|int64_(?:matrix|pointer)|integerp?|iteraten?|iterwhile|join|keys?|lambdap?|last(?:err(?:pos)?)?|lcd|list[2p]?|listmap|make_ptrtag|malloc|map|matcat|matrixp?|max|member|min|nanp|nargs|nmatrixp?|null|numberp?|ord|pack(?:ed)?|pointer(?:_cast|_tag|_type|p)?|pow|pred|ptrtag|put(?:_(?:byte|double|float|int(?:64)?|long|pointer|short|string))?|rationalp?|re|realp?|realloc|recordp?|redim|reduce(?:_with)?|refp?|repeatn?|reverse|rlistp?|round|rows?|rowcat(?:map)?|rowmap|rowrev|rowvector(?:p|seq)?|same|scan[lr]1?|sentry|sgn|short_(?:matrix|pointer)|slice|smatrixp?|sort|split|str|strcat|stream|stride|string(?:_(?:dup|list|vector)|p)?|subdiag(?:mat)?|submat|subseq2?|substr|succ|supdiag(?:mat)?|symbolp?|tail|take|takewhile|thunkp?|transpose|trunc|tuplep?|typep|ubyte|uint(?:64)?|ulong|uncurry3?|unref|unzip3?|update|ushort|vals?|varp?|vector(?:p|seq)?|void|zip3?|zipwith3?)\b/,special:{pattern:/\b__[a-z]+__\b/i,alias:"builtin"},operator:/(?=\b_|[^_])[!"#$%&'*+,\-.\/:<=>?@\\^_`|~\u00a1-\u00bf\u00d7-\u00f7\u20d0-\u2bff]+|\b(?:and|div|mod|not|or)\b/,punctuation:/[(){}\[\];,|]/};["c",{lang:"c++",alias:"cpp"},"fortran"].forEach(function(e){var t=e;if("string"!=typeof e&&(t=e.alias,e=e.lang),r.languages[t]){var a={};a["inline-lang-"+t]={pattern:RegExp("%< *-\\*- *{lang}\\d* *-\\*-[\\s\\S]+?%>".replace("{lang}",e.replace(/([.+*?\/\\(){}\[\]])/g,"\\$1")),"i"),inside:r.util.clone(r.languages.pure["inline-lang"].inside)},a["inline-lang-"+t].inside.rest=r.util.clone(r.languages[t]),r.languages.insertBefore("pure","inline-lang",a)}}),r.languages.c&&(r.languages.pure["inline-lang"].inside.rest=r.util.clone(r.languages.c))}(Prism); \ No newline at end of file +!function(r){r.languages.pure={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?\*\//,lookbehind:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0},/#!.+/],"inline-lang":{pattern:/%<[\s\S]+?%>/,greedy:!0,inside:{lang:{pattern:/(^%< *)-\*-.+?-\*-/,lookbehind:!0,alias:"comment"},delimiter:{pattern:/^%<.*|%>$/,alias:"punctuation"}}},string:{pattern:/"(?:\\.|[^"\\\r\n])*"/,greedy:!0},number:{pattern:/((?:\.\.)?)(?:\b(?:inf|nan)\b|\b0x[\da-f]+|(?:\b(?:0b)?\d+(?:\.\d)?|\B\.\d)\d*(?:e[+-]?\d+)?L?)/i,lookbehind:!0},keyword:/\b(?:ans|break|bt|case|catch|cd|clear|const|def|del|dump|else|end|exit|extern|false|force|help|if|infix[lr]?|interface|let|ls|mem|namespace|nonfix|NULL|of|otherwise|outfix|override|postfix|prefix|private|public|pwd|quit|run|save|show|stats|then|throw|trace|true|type|underride|using|when|with)\b/,function:/\b(?:abs|add_(?:(?:fundef|interface|macdef|typedef)(?:_at)?|addr|constdef|vardef)|all|any|applp?|arity|bigintp?|blob(?:_crc|_size|p)?|boolp?|byte_(?:matrix|pointer)|byte_c?string(?:_pointer)?|calloc|cat|catmap|ceil|char[ps]?|check_ptrtag|chr|clear_sentry|clearsym|closurep?|cmatrixp?|cols?|colcat(?:map)?|colmap|colrev|colvector(?:p|seq)?|complex(?:_float_(?:matrix|pointer)|_matrix(?:_view)?|_pointer|p)?|conj|cookedp?|cst|cstring(?:_(?:dup|list|vector))?|curry3?|cyclen?|del_(?:constdef|fundef|interface|macdef|typedef|vardef)|delete|diag(?:mat)?|dim|dmatrixp?|do|double(?:_matrix(?:_view)?|_pointer|p)?|dowith3?|drop|dropwhile|eval(?:cmd)?|exactp|filter|fix|fixity|flip|float(?:_matrix|_pointer)|floor|fold[lr]1?|frac|free|funp?|functionp?|gcd|get(?:_(?:byte|constdef|double|float|fundef|int(?:64)?|interface(?:_typedef)?|long|macdef|pointer|ptrtag|short|sentry|string|typedef|vardef))?|globsym|hash|head|id|im|imatrixp?|index|inexactp|infp|init|insert|int(?:_matrix(?:_view)?|_pointer|p)?|int64_(?:matrix|pointer)|integerp?|iteraten?|iterwhile|join|keys?|lambdap?|last(?:err(?:pos)?)?|lcd|list[2p]?|listmap|make_ptrtag|malloc|map|matcat|matrixp?|max|member|min|nanp|nargs|nmatrixp?|null|numberp?|ord|pack(?:ed)?|pointer(?:_cast|_tag|_type|p)?|pow|pred|ptrtag|put(?:_(?:byte|double|float|int(?:64)?|long|pointer|short|string))?|rationalp?|re|realp?|realloc|recordp?|redim|reduce(?:_with)?|refp?|repeatn?|reverse|rlistp?|round|rows?|rowcat(?:map)?|rowmap|rowrev|rowvector(?:p|seq)?|same|scan[lr]1?|sentry|sgn|short_(?:matrix|pointer)|slice|smatrixp?|sort|split|str|strcat|stream|stride|string(?:_(?:dup|list|vector)|p)?|subdiag(?:mat)?|submat|subseq2?|substr|succ|supdiag(?:mat)?|symbolp?|tail|take|takewhile|thunkp?|transpose|trunc|tuplep?|typep|ubyte|uint(?:64)?|ulong|uncurry3?|unref|unzip3?|update|ushort|vals?|varp?|vector(?:p|seq)?|void|zip3?|zipwith3?)\b/,special:{pattern:/\b__[a-z]+__\b/i,alias:"builtin"},operator:/(?=\b_|[^_])[!"#$%&'*+,\-.\/:<=>?@\\^_`|~\u00a1-\u00bf\u00d7-\u00f7\u20d0-\u2bff]+|\b(?:and|div|mod|not|or)\b/,punctuation:/[(){}\[\];,|]/};["c",{lang:"c++",alias:"cpp"},"fortran"].forEach(function(e){var t=e;if("string"!=typeof e&&(t=e.alias,e=e.lang),r.languages[t]){var a={};a["inline-lang-"+t]={pattern:RegExp("%< *-\\*- *{lang}\\d* *-\\*-[^]+?%>".replace("{lang}",e.replace(/([.+*?\/\\(){}\[\]])/g,"\\$1")),"i"),inside:r.util.clone(r.languages.pure["inline-lang"].inside)},a["inline-lang-"+t].inside.rest=r.util.clone(r.languages[t]),r.languages.insertBefore("pure","inline-lang",a)}}),r.languages.c&&(r.languages.pure["inline-lang"].inside.rest=r.util.clone(r.languages.c))}(Prism); \ No newline at end of file diff --git a/components/prism-qml.min.js b/components/prism-qml.min.js index cea3757d0c..a67fda803f 100644 --- a/components/prism-qml.min.js +++ b/components/prism-qml.min.js @@ -1 +1 @@ -!function(e){for(var r=/(?:[^\\()[\]{}"'/]||\/(?![*/])||\(*\)|\[*\]|\{*\}|\\[\s\S])/.source.replace(//g,function(){return"\"(?:\\\\.|[^\\\\\"\r\n])*\"|'(?:\\\\.|[^\\\\'\r\n])*'"}).replace(//g,function(){return"\\/\\/.*|\\/\\*(?:(?!\\*\\/)[\\s\\S])*\\*\\/"}),n=0;n<2;n++)r=r.replace(//g,function(){return r});r=r.replace(//g,"[^\\s\\S]"),e.languages.qml={comment:{pattern:/\/\/.*|\/\*[\s\S]*?\*\//,greedy:!0},"javascript-function":{pattern:RegExp("((?:^|;)[ \t]*)function\\s+[_$a-zA-Z\\xA0-\\uFFFF][$\\w\\xA0-\\uFFFF]*\\s*\\(*\\)\\s*\\{*\\}".replace(//g,function(){return r}),"m"),lookbehind:!0,greedy:!0,alias:"language-javascript",inside:e.languages.javascript},"class-name":{pattern:/((?:^|[:;])[ \t]*)(?!\d)\w+(?=[ \t]*\{|[ \t]+on\b)/m,lookbehind:!0},property:[{pattern:/((?:^|[;{])[ \t]*)(?!\d)\w+(?:\.\w+)*(?=[ \t]*:)/m,lookbehind:!0},{pattern:/((?:^|[;{])[ \t]*)property[ \t]+(?!\d)\w+(?:\.\w+)*[ \t]+(?!\d)\w+(?:\.\w+)*(?=[ \t]*:)/m,lookbehind:!0,inside:{keyword:/^property/,property:/\w+(?:\.\w+)*/}}],"javascript-expression":{pattern:RegExp("(:[ \t]*)(?![\\s;}[])(?:(?!$|[;}]))+".replace(//g,function(){return r}),"m"),lookbehind:!0,greedy:!0,alias:"language-javascript",inside:e.languages.javascript},string:/"(?:\\.|[^\\"\r\n])*"/,keyword:/\b(?:as|import|on)\b/,punctuation:/[{}[\]:;,]/}}(Prism); \ No newline at end of file +!function(e){for(var r="(?:[^\\\\()[\\]{}\"'/]||/(?![*/])||\\(*\\)|\\[*\\]|\\{*\\}|\\\\[^])".replace(//g,function(){return"\"(?:\\\\.|[^\\\\\"\r\n])*\"|'(?:\\\\.|[^\\\\'\r\n])*'"}).replace(//g,function(){return"//.*|/\\*(?:(?!\\*/)[^])*\\*/"}),n=0;n<2;n++)r=r.replace(//g,function(){return r});r=r.replace(//g,"[^\\s\\S]"),e.languages.qml={comment:{pattern:/\/\/.*|\/\*[\s\S]*?\*\//,greedy:!0},"javascript-function":{pattern:RegExp("((?:^|;)[ \t]*)function\\s+[_$a-zA-Z\\xA0-\\uFFFF][$\\w\\xA0-\\uFFFF]*\\s*\\(*\\)\\s*\\{*\\}".replace(//g,function(){return r}),"m"),lookbehind:!0,greedy:!0,alias:"language-javascript",inside:e.languages.javascript},"class-name":{pattern:/((?:^|[:;])[ \t]*)(?!\d)\w+(?=[ \t]*\{|[ \t]+on\b)/m,lookbehind:!0},property:[{pattern:/((?:^|[;{])[ \t]*)(?!\d)\w+(?:\.\w+)*(?=[ \t]*:)/m,lookbehind:!0},{pattern:/((?:^|[;{])[ \t]*)property[ \t]+(?!\d)\w+(?:\.\w+)*[ \t]+(?!\d)\w+(?:\.\w+)*(?=[ \t]*:)/m,lookbehind:!0,inside:{keyword:/^property/,property:/\w+(?:\.\w+)*/}}],"javascript-expression":{pattern:RegExp("(:[ \t]*)(?![\\s;}[])(?:(?!$|[;}]))+".replace(//g,function(){return r}),"m"),lookbehind:!0,greedy:!0,alias:"language-javascript",inside:e.languages.javascript},string:/"(?:\\.|[^\\"\r\n])*"/,keyword:/\b(?:as|import|on)\b/,punctuation:/[{}[\]:;,]/}}(Prism); \ No newline at end of file diff --git a/components/prism-shell-session.min.js b/components/prism-shell-session.min.js index 31d2e7f39d..c2a733e00e 100644 --- a/components/prism-shell-session.min.js +++ b/components/prism-shell-session.min.js @@ -1 +1 @@ -!function(n){var s=["([\"'])(?:\\\\[\\s\\S]|\\$\\([^)]+\\)|`[^`]+`|(?!\\1)[^\\\\])*\\1","<<-?\\s*(\\w+?)\\s*(?:\r?\n|\r)[\\s\\S]*?(?:\r?\n|\r)\\2","<<-?\\s*([\"'])(\\w+)\\3\\s*(?:\r?\n|\r)[\\s\\S]*?(?:\r?\n|\r)\\4"].join("|");n.languages["shell-session"]={info:{pattern:/^[^\r\n$#*!]+(?=[$#])/m,alias:"punctuation",inside:{path:{pattern:/(:)[\s\S]+/,lookbehind:!0},user:/^[^\s@:$#*!/\\]+@[^\s@:$#*!/\\]+(?=:|$)/,punctuation:/:/}},command:{pattern:RegExp("[$#](?:[^\\\\\r\n'\"<]|\\\\.|<>)+".replace(/<>/g,function(){return s})),greedy:!0,inside:{bash:{pattern:/(^[$#]\s*)[\s\S]+/,lookbehind:!0,alias:"language-bash",inside:n.languages.bash},"shell-symbol":{pattern:/^[$#]/,alias:"important"}}},output:/.(?:.*(?:\r\n?|\n|.$))*/}}(Prism); \ No newline at end of file +!function(n){var s=["([\"'])(?:\\\\[^]|\\$\\([^)]+\\)|`[^`]+`|(?!\\1)[^\\\\])*\\1","<<-?\\s*(\\w+?)\\s*(?:\r?\n|\r)[^]*?(?:\r?\n|\r)\\2","<<-?\\s*([\"'])(\\w+)\\3\\s*(?:\r?\n|\r)[^]*?(?:\r?\n|\r)\\4"].join("|");n.languages["shell-session"]={info:{pattern:/^[^\r\n$#*!]+(?=[$#])/m,alias:"punctuation",inside:{path:{pattern:/(:)[\s\S]+/,lookbehind:!0},user:/^[^\s@:$#*!/\\]+@[^\s@:$#*!/\\]+(?=:|$)/,punctuation:/:/}},command:{pattern:RegExp("[$#](?:[^\\\\\r\n'\"<]|\\\\.|<>)+".replace(/<>/g,function(){return s})),greedy:!0,inside:{bash:{pattern:/(^[$#]\s*)[\s\S]+/,lookbehind:!0,alias:"language-bash",inside:n.languages.bash},"shell-symbol":{pattern:/^[$#]/,alias:"important"}}},output:/.(?:.*(?:\r\n?|\n|.$))*/}}(Prism); \ No newline at end of file diff --git a/gulpfile.js/index.js b/gulpfile.js/index.js index 7c5d94ebdf..ae3e0d06e4 100644 --- a/gulpfile.js/index.js +++ b/gulpfile.js/index.js @@ -30,18 +30,22 @@ const componentsPromise = new Promise((resolve, reject) => { function inlineRegexSource() { return replace( - /\/((?:[^\n\r[\\\/]|\\.|\[(?:[^\n\r\\\]]|\\.)*\])*)\/\.source\b/g, + /\/((?:[^\n\r[\\\/]|\\.|\[(?:[^\n\r\\\]]|\\.)*\])+)\/\s*\.\s*source\b/g, (m, source) => { // escape backslashes - source = source.replace(/\\(.)/g, function (m, g1) { - // characters like /\n/ can just be kept as "\n" instead of being escaped to "\\n" - if (/[nrt0]/.test(g1)) { - return m; - } - if ('\\' == g1) { - return '\\\\\\\\'; // escape using 4 backslashes + source = source.replace(/\\(.)|\[(\\s\\S|\\S\\s)\]/g, function (m, g1, g2) { + if (g1) { + // characters like /\n/ can just be kept as "\n" instead of being escaped to "\\n" + if (/[nrt0/]/.test(g1)) { + return m; + } + if ('\\' == g1) { + return '\\\\\\\\'; // escape using 4 backslashes + } + return '\\\\' + g1; + } else { + return "[^]"; } - return '\\\\' + g1; }); // escape single quotes source = source.replace(/'/g, "\\'"); From 62e184bba6485c228777cd8e5017925428eba78f Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Thu, 9 Apr 2020 12:50:20 +0200 Subject: [PATCH 0487/1100] Java: Fixed `namespace` token (#2295) --- components/prism-java.js | 4 +- components/prism-java.min.js | 2 +- tests/languages/java/module_feature.test | 269 ++++++++++----------- tests/languages/java/package_feature.test | 47 +++- tests/languages/scala/keyword_feature.test | 4 +- 5 files changed, 167 insertions(+), 159 deletions(-) diff --git a/components/prism-java.js b/components/prism-java.js index 545239539f..498b7a32f2 100644 --- a/components/prism-java.js +++ b/components/prism-java.js @@ -44,7 +44,9 @@ lookbehind: true }, 'namespace': { - pattern: /(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)[a-z]\w*(?:\.[a-z]\w*)+/, + pattern: RegExp( + /(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)(?!)[a-z]\w*(?:\.[a-z]\w*)*\.?/ + .source.replace(//g, function () { return keywords.source; })), lookbehind: true, inside: { 'punctuation': /\./, diff --git a/components/prism-java.min.js b/components/prism-java.min.js index 079c8d4e7d..818fd8ec78 100644 --- a/components/prism-java.min.js +++ b/components/prism-java.min.js @@ -1 +1 @@ -!function(e){var t=/\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|null|open|opens|package|private|protected|provides|public|record|requires|return|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/,a=/\b[A-Z](?:\w*[a-z]\w*)?\b/;e.languages.java=e.languages.extend("clike",{"class-name":[a,/\b[A-Z]\w*(?=\s+\w+\s*[;,=())])/],keyword:t,function:[e.languages.clike.function,{pattern:/(\:\:)[a-z_]\w*/,lookbehind:!0}],number:/\b0b[01][01_]*L?\b|\b0x[\da-f_]*\.?[\da-f_p+-]+\b|(?:\b\d[\d_]*\.?[\d_]*|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,lookbehind:!0}}),e.languages.insertBefore("java","string",{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:"string"}}),e.languages.insertBefore("java","class-name",{annotation:{alias:"punctuation",pattern:/(^|[^.])@\w+/,lookbehind:!0},namespace:{pattern:/(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)[a-z]\w*(?:\.[a-z]\w*)+/,lookbehind:!0,inside:{punctuation:/\./}},generics:{pattern:/<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<[\w\s,.&?]*>)*>)*>)*>/,inside:{"class-name":a,keyword:t,punctuation:/[<>(),.:]/,operator:/[?&|]/}}})}(Prism); \ No newline at end of file +!function(e){var t=/\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|null|open|opens|package|private|protected|provides|public|record|requires|return|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/,a=/\b[A-Z](?:\w*[a-z]\w*)?\b/;e.languages.java=e.languages.extend("clike",{"class-name":[a,/\b[A-Z]\w*(?=\s+\w+\s*[;,=())])/],keyword:t,function:[e.languages.clike.function,{pattern:/(\:\:)[a-z_]\w*/,lookbehind:!0}],number:/\b0b[01][01_]*L?\b|\b0x[\da-f_]*\.?[\da-f_p+-]+\b|(?:\b\d[\d_]*\.?[\d_]*|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,lookbehind:!0}}),e.languages.insertBefore("java","string",{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:"string"}}),e.languages.insertBefore("java","class-name",{annotation:{alias:"punctuation",pattern:/(^|[^.])@\w+/,lookbehind:!0},namespace:{pattern:RegExp("(\\b(?:exports|import(?:\\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\\s+)(?!)[a-z]\\w*(?:\\.[a-z]\\w*)*\\.?".replace(//g,function(){return t.source})),lookbehind:!0,inside:{punctuation:/\./}},generics:{pattern:/<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<[\w\s,.&?]*>)*>)*>)*>/,inside:{"class-name":a,keyword:t,punctuation:/[<>(),.:]/,operator:/[?&|]/}}})}(Prism); \ No newline at end of file diff --git a/tests/languages/java/module_feature.test b/tests/languages/java/module_feature.test index 983f8ececb..e7db3d8072 100644 --- a/tests/languages/java/module_feature.test +++ b/tests/languages/java/module_feature.test @@ -1,156 +1,135 @@ module com.js.prism { - exports java.net.http; - exports jdk.internal.editor.spi to jdk.jshell; + exports java.net.http; + exports jdk.internal.editor.spi to jdk.jshell; - requires java.base; - requires transitive java.xml; + requires java.base; + requires transitive java.xml; - uses java.net.ContentHandlerFactory; + uses java.net.ContentHandlerFactory; - opens java.time.DateTime; - opens java.time.LocalDateTime to java.logging; - - provides com.modules.hello.HelloInterface with com.modules.hello.HelloModules; + opens java.time.DateTime; + opens java.time.LocalDateTime to java.logging; + provides com.modules.hello.HelloInterface with com.modules.hello.HelloModules; } - ---------------------------------------------------- - [ - ["keyword", "module"], - ["namespace", - ["com", - ["punctuation", "."], - "js", - ["punctuation", "."], - "prism" - ] - ], - ["punctuation", "{"], - - ["keyword", "exports"], - ["namespace", - [ - "java", - ["punctuation", "."], - "net", - ["punctuation", "."], - "http" - ] - ], - ["punctuation", ";"], - - ["keyword", "exports"], - ["namespace", - [ - "jdk", - ["punctuation", "."], - "internal", - ["punctuation", "."], - "editor", - ["punctuation", "."], - "spi" - ] - ], - ["keyword", "to"], - ["namespace", - [ - "jdk", - ["punctuation", "."], - "jshell" - ] - ], - ["punctuation", ";"], - - ["keyword", "requires"], - ["namespace", - [ - "java", - ["punctuation", "."], - "base" - ] - ], - ["punctuation", ";"], - - ["keyword", "requires"], - ["keyword", "transitive"], - ["namespace", - [ - "java", - ["punctuation", "."], - "xml" - ] - ], - ["punctuation", ";"], - - ["keyword", "uses"], - ["namespace", - [ - "java", - ["punctuation", "."], - "net" - ] - ], - ["punctuation", "."], - ["class-name", "ContentHandlerFactory"], - ["punctuation", ";"], - - ["keyword", "opens"], - ["namespace", - [ - "java", - ["punctuation", "."], - "time" - ] - ], - ["punctuation", "."], - ["class-name", "DateTime"], - ["punctuation", ";"], - ["keyword", "opens"], - ["namespace", - [ - "java", - ["punctuation", "."], - "time" - ] - ], - ["punctuation", "."], - ["class-name", "LocalDateTime"], - ["keyword", "to"], - ["namespace", - [ - "java", - ["punctuation", "."], - "logging" - ] - ], - ["punctuation", ";"], - ["keyword", "provides"], - ["namespace", - [ - "com", - ["punctuation", "."], - "modules", - ["punctuation", "."], - "hello" - ] - ], - ["punctuation", "."], - ["class-name", "HelloInterface"], - ["keyword", "with"], - ["namespace", - [ - "com", - ["punctuation", "."], - "modules", - ["punctuation", "."], - "hello" - ] - ], - ["punctuation", "."], - ["class-name", "HelloModules"], - ["punctuation", ";"], - ["punctuation", "}"] + +[ + ["keyword", "module"], + ["namespace", [ + "com", + ["punctuation", "."], + "js", + ["punctuation", "."], + "prism" + ]], + ["punctuation", "{"], + + ["keyword", "exports"], + ["namespace", [ + "java", + ["punctuation", "."], + "net", + ["punctuation", "."], + "http" + ]], + ["punctuation", ";"], + + ["keyword", "exports"], + ["namespace", [ + "jdk", + ["punctuation", "."], + "internal", + ["punctuation", "."], + "editor", + ["punctuation", "."], + "spi" + ]], + ["keyword", "to"], + ["namespace", [ + "jdk", + ["punctuation", "."], + "jshell" + ]], + ["punctuation", ";"], + + ["keyword", "requires"], + ["namespace", [ + "java", + ["punctuation", "."], + "base" + ]], + ["punctuation", ";"], + + ["keyword", "requires"], + ["keyword", "transitive"], + ["namespace", [ + "java", + ["punctuation", "."], + "xml" + ]], + ["punctuation", ";"], + + ["keyword", "uses"], + ["namespace", [ + "java", + ["punctuation", "."], + "net", + ["punctuation", "."] + ]], + ["class-name", "ContentHandlerFactory"], + ["punctuation", ";"], + + ["keyword", "opens"], + ["namespace", [ + "java", + ["punctuation", "."], + "time", + ["punctuation", "."] + ]], + ["class-name", "DateTime"], + ["punctuation", ";"], + + ["keyword", "opens"], + ["namespace", [ + "java", + ["punctuation", "."], + "time", + ["punctuation", "."] + ]], + ["class-name", "LocalDateTime"], + ["keyword", "to"], + ["namespace", [ + "java", + ["punctuation", "."], + "logging" + ]], + ["punctuation", ";"], + + ["keyword", "provides"], + ["namespace", [ + "com", + ["punctuation", "."], + "modules", + ["punctuation", "."], + "hello", + ["punctuation", "."] + ]], + ["class-name", "HelloInterface"], + ["keyword", "with"], + ["namespace", [ + "com", + ["punctuation", "."], + "modules", + ["punctuation", "."], + "hello", + ["punctuation", "."] + ]], + ["class-name", "HelloModules"], + ["punctuation", ";"], + + ["punctuation", "}"] ] ---------------------------------------------------- diff --git a/tests/languages/java/package_feature.test b/tests/languages/java/package_feature.test index 9fe6f1f353..3dcf209474 100644 --- a/tests/languages/java/package_feature.test +++ b/tests/languages/java/package_feature.test @@ -1,8 +1,11 @@ +package java; package java.lang; +import foo.Bar; import java.lang.Math; import java.lang.*; +import static foo.Bar.BAZ; import static java.lang.Math.PI; import static java.lang.Math.sin; import static java.lang.Math.*; @@ -10,6 +13,11 @@ import static java.lang.Math.*; ---------------------------------------------------- [ + ["keyword", "package"], + ["namespace", [ + "java" + ]], + ["punctuation", ";"], ["keyword", "package"], ["namespace", [ "java", @@ -18,13 +26,20 @@ import static java.lang.Math.*; ]], ["punctuation", ";"], + ["keyword", "import"], + ["namespace", [ + "foo", + ["punctuation", "."] + ]], + ["class-name", "Bar"], + ["punctuation", ";"], ["keyword", "import"], ["namespace", [ "java", ["punctuation", "."], - "lang" + "lang", + ["punctuation", "."] ]], - ["punctuation", "."], ["class-name", "Math"], ["punctuation", ";"], @@ -32,10 +47,20 @@ import static java.lang.Math.*; ["namespace", [ "java", ["punctuation", "."], - "lang" + "lang", + ["punctuation", "."] ]], + ["operator", "*"], + ["punctuation", ";"], + ["keyword", "import"], + ["keyword", "static"], + ["namespace", [ + "foo", + ["punctuation", "."] + ]], + ["class-name", "Bar"], ["punctuation", "."], - "*", + "BAZ", ["punctuation", ";"], ["keyword", "import"], @@ -43,9 +68,9 @@ import static java.lang.Math.*; ["namespace", [ "java", ["punctuation", "."], - "lang" + "lang", + ["punctuation", "."] ]], - ["punctuation", "."], ["class-name", "Math"], ["punctuation", "."], "PI", @@ -56,9 +81,9 @@ import static java.lang.Math.*; ["namespace", [ "java", ["punctuation", "."], - "lang" + "lang", + ["punctuation", "."] ]], - ["punctuation", "."], ["class-name", "Math"], ["punctuation", "."], "sin", @@ -67,8 +92,10 @@ import static java.lang.Math.*; ["keyword", "static"], ["namespace", [ "java", - ["punctuation", "."], "lang" - ]], ["punctuation", "."], + ["punctuation", "."], + "lang", + ["punctuation", "."] + ]], ["class-name", "Math"], ["punctuation", "."], "*", diff --git a/tests/languages/scala/keyword_feature.test b/tests/languages/scala/keyword_feature.test index c17e96050e..9e3cfb4d1b 100644 --- a/tests/languages/scala/keyword_feature.test +++ b/tests/languages/scala/keyword_feature.test @@ -4,7 +4,7 @@ abstract case catch class def do else extends final finally for forSome if -implicit import lazy +implicit import; lazy match new null object override package private protected return sealed @@ -21,7 +21,7 @@ var while with yield ["keyword", "class"], ["keyword", "def"], ["keyword", "do"], ["keyword", "else"], ["keyword", "extends"], ["keyword", "final"], ["keyword", "finally"], ["keyword", "for"], ["keyword", "forSome"], ["keyword", "if"], - ["keyword", "implicit"], ["keyword", "import"], ["keyword", "lazy"], + ["keyword", "implicit"], ["keyword", "import"], ["punctuation", ";"], ["keyword", "lazy"], ["keyword", "match"], ["keyword", "new"], ["keyword", "null"], ["keyword", "object"], ["keyword", "override"], ["keyword", "package"], ["keyword", "private"], ["keyword", "protected"], ["keyword", "return"], ["keyword", "sealed"], From 044dd27172340082d899c0cdd385f380fd2070fc Mon Sep 17 00:00:00 2001 From: Ayesh Karunaratne Date: Thu, 9 Apr 2020 19:15:51 +0700 Subject: [PATCH 0488/1100] Bash: Added `composer` command (#2298) This adds PHP's dependency manager `composer` to the list of commands. --- components/prism-bash.js | 2 +- components/prism-bash.min.js | 2 +- tests/languages/bash/function_feature.test | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/components/prism-bash.js b/components/prism-bash.js index cb16416772..f7b5eeeeea 100644 --- a/components/prism-bash.js +++ b/components/prism-bash.js @@ -133,7 +133,7 @@ }, 'variable': insideString.variable, 'function': { - pattern: /(^|[\s;|&]|[<>]\()(?:add|apropos|apt|aptitude|apt-cache|apt-get|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/, + pattern: /(^|[\s;|&]|[<>]\()(?:add|apropos|apt|aptitude|apt-cache|apt-get|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/, lookbehind: true }, 'keyword': { diff --git a/components/prism-bash.min.js b/components/prism-bash.min.js index c9c3995f3e..bf4e91a8c7 100644 --- a/components/prism-bash.min.js +++ b/components/prism-bash.min.js @@ -1 +1 @@ -!function(e){var t="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",n={environment:{pattern:RegExp("\\$"+t),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--?|-=|\+\+?|\+=|!=?|~|\*\*?|\*=|\/=?|%=?|<<=?|>>=?|<=?|>=?|==?|&&?|&=|\^=?|\|\|?|\|=|\?|:/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+t),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|x[0-9a-fA-F]{1,2}|u[0-9a-fA-F]{4}|U[0-9a-fA-F]{8})/};e.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)\w+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b\w+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+t),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+?)\s*(?:\r?\n|\r)[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:n},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s*(?:\r?\n|\r)[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\](?:\\\\)*)(["'])(?:\\[\s\S]|\$\([^)]+\)|`[^`]+`|(?!\2)[^\\])*\2/,lookbehind:!0,greedy:!0,inside:n}],environment:{pattern:RegExp("\\$?"+t),alias:"constant"},variable:n.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|aptitude|apt-cache|apt-get|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:if|then|else|elif|fi|for|while|in|case|esac|function|select|do|done|until)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|break|cd|continue|eval|exec|exit|export|getopts|hash|pwd|readonly|return|shift|test|times|trap|umask|unset|alias|bind|builtin|caller|command|declare|echo|enable|help|let|local|logout|mapfile|printf|read|readarray|source|type|typeset|ulimit|unalias|set|shopt)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:true|false)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|==?|!=?|=~|<<[<-]?|[&\d]?>>|\d?[<>]&?|&[>&]?|\|[&|]?|<=?|>=?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}};for(var a=["comment","function-name","for-or-select","assign-left","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],r=n.variable[1].inside,s=0;s>=?|<=?|>=?|==?|&&?|&=|\^=?|\|\|?|\|=|\?|:/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+t),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|x[0-9a-fA-F]{1,2}|u[0-9a-fA-F]{4}|U[0-9a-fA-F]{8})/};e.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)\w+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b\w+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+t),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+?)\s*(?:\r?\n|\r)[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:n},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s*(?:\r?\n|\r)[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\](?:\\\\)*)(["'])(?:\\[\s\S]|\$\([^)]+\)|`[^`]+`|(?!\2)[^\\])*\2/,lookbehind:!0,greedy:!0,inside:n}],environment:{pattern:RegExp("\\$?"+t),alias:"constant"},variable:n.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|aptitude|apt-cache|apt-get|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:if|then|else|elif|fi|for|while|in|case|esac|function|select|do|done|until)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|break|cd|continue|eval|exec|exit|export|getopts|hash|pwd|readonly|return|shift|test|times|trap|umask|unset|alias|bind|builtin|caller|command|declare|echo|enable|help|let|local|logout|mapfile|printf|read|readarray|source|type|typeset|ulimit|unalias|set|shopt)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:true|false)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|==?|!=?|=~|<<[<-]?|[&\d]?>>|\d?[<>]&?|&[>&]?|\|[&|]?|<=?|>=?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}};for(var a=["comment","function-name","for-or-select","assign-left","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],r=n.variable[1].inside,s=0;s Date: Sun, 12 Apr 2020 23:15:37 +0600 Subject: [PATCH 0489/1100] Added support for Structured Text (IEC 61131-3) (#2311) --- components.js | 2 +- components.json | 4 ++ components/prism-iecst.js | 30 ++++++++++++++ components/prism-iecst.min.js | 1 + examples/prism-iecst.html | 40 +++++++++++++++++++ plugins/show-language/prism-show-language.js | 1 + .../show-language/prism-show-language.min.js | 2 +- tests/languages/iecst/block.test | 23 +++++++++++ tests/languages/iecst/number.test | 13 ++++++ tests/languages/iecst/symbol.test | 22 ++++++++++ 10 files changed, 136 insertions(+), 2 deletions(-) create mode 100644 components/prism-iecst.js create mode 100644 components/prism-iecst.min.js create mode 100644 examples/prism-iecst.html create mode 100644 tests/languages/iecst/block.test create mode 100644 tests/languages/iecst/number.test create mode 100644 tests/languages/iecst/symbol.test diff --git a/components.js b/components.js index 8cbf7ec1a6..5042db992e 100644 --- a/components.js +++ b/components.js @@ -1,2 +1,2 @@ -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"Augmented Backus–Naur form","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"Backus–Naur form","alias":"rbnf","aliasTitles":{"rbnf":"Routing Backus–Naur form"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dax":{"title":"DAX","owner":"peterbud"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"Extended Backus–Naur form","owner":"RunDevelopment"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"http":{"title":"HTTP","optional":["css","javascript","json","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"json":{"title":"JSON","owner":"CupOfTea696"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","modify":["actionscript","coffeescript","flow","javascript","typescript","vala"],"owner":"RunDevelopment"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"solidity":{"title":"Solidity (Ethereum)","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","visual-basic"],"owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"Augmented Backus–Naur form","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"Backus–Naur form","alias":"rbnf","aliasTitles":{"rbnf":"Routing Backus–Naur form"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dax":{"title":"DAX","owner":"peterbud"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"Extended Backus–Naur form","owner":"RunDevelopment"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"http":{"title":"HTTP","optional":["css","javascript","json","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"json":{"title":"JSON","owner":"CupOfTea696"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","modify":["actionscript","coffeescript","flow","javascript","typescript","vala"],"owner":"RunDevelopment"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"solidity":{"title":"Solidity (Ethereum)","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","visual-basic"],"owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; if (typeof module !== 'undefined' && module.exports) { module.exports = components; } \ No newline at end of file diff --git a/components.json b/components.json index cdedc34564..31d828a116 100644 --- a/components.json +++ b/components.json @@ -458,6 +458,10 @@ "title": "Icon", "owner": "Golmote" }, + "iecst": { + "title": "Structured Text (IEC 61131-3)", + "owner": "serhioromano" + }, "inform7": { "title": "Inform 7", "owner": "Golmote" diff --git a/components/prism-iecst.js b/components/prism-iecst.js new file mode 100644 index 0000000000..bf4d1d50bf --- /dev/null +++ b/components/prism-iecst.js @@ -0,0 +1,30 @@ +Prism.languages.iecst = { + 'comment': [ + { + pattern: /(^|[^\\])(?:\/\*[\s\S]*?(?:\*\/|$)|\(\*[\s\S]*?(?:\*\)|$)|\{[\s\S]*?(?:\}|$))/, + lookbehind: true, + }, + { + pattern: /(^|[^\\:])\/\/.*/, + lookbehind: true, + greedy: true, + }, + ], + 'string': { + pattern: /(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/, + greedy: true, + }, + 'class-name': /\b(?:END_)?(?:PROGRAM|CONFIGURATION|INTERFACE|FUNCTION_BLOCK|FUNCTION|ACTION|TRANSITION|TYPE|STRUCT|(?:INITIAL_)?STEP|NAMESPACE|LIBRARY|CHANNEL|FOLDER|RESOURCE|VAR_(?:GLOBAL|INPUT|PUTPUT|IN_OUT|ACCESS|TEMP|EXTERNAL|CONFIG)|VAR|METHOD|PROPERTY)\b/i, + 'keyword': /\b(?:(?:END_)?(?:IF|WHILE|REPEAT|CASE|FOR)|ELSE|FROM|THEN|ELSIF|DO|TO|BY|PRIVATE|PUBLIC|PROTECTED|CONSTANT|RETURN|EXIT|CONTINUE|GOTO|JMP|AT|RETAIN|NON_RETAIN|TASK|WITH|UNTIL|USING|EXTENDS|IMPLEMENTS|GET|SET|__TRY|__CATCH|__FINALLY|__ENDTRY)\b/, + 'variable': /\b(?:AT|BOOL|BYTE|(?:D|L)?WORD|U?(?:S|D|L)?INT|L?REAL|TIME(?:_OF_DAY)?|TOD|DT|DATE(?:_AND_TIME)?|STRING|ARRAY|ANY|POINTER)\b/, + 'symbol': /%[IQM][XBWDL][\d.]*|%[IQ][\d.]*/, + 'number': /\b(?:16#[\da-f]+|2#[01_]+|0x[\da-f]+)\b|\b(?:T|D|DT|TOD)#[\d_shmd:]*|\b[A-Z]*\#[\d.,_]*|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?/i, + 'boolean': /\b(?:TRUE|FALSE|NULL)\b/, + 'function': /\w+(?=\()/, + 'operator': /(?:S?R?:?=>?|&&?|\*\*?|<=?|>=?|[-:^/+])|\b(?:OR|AND|MOD|NOT|XOR|LE|GE|EQ|NE|GE|LT)\b/, + 'punctuation': /[();]/, + 'type': { + 'pattern': /#/, + 'alias': 'selector', + }, +}; diff --git a/components/prism-iecst.min.js b/components/prism-iecst.min.js new file mode 100644 index 0000000000..2356700a40 --- /dev/null +++ b/components/prism-iecst.min.js @@ -0,0 +1 @@ +Prism.languages.iecst={comment:[{pattern:/(^|[^\\])(?:\/\*[\s\S]*?(?:\*\/|$)|\(\*[\s\S]*?(?:\*\)|$)|\{[\s\S]*?(?:\}|$))/,lookbehind:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":/\b(?:END_)?(?:PROGRAM|CONFIGURATION|INTERFACE|FUNCTION_BLOCK|FUNCTION|ACTION|TRANSITION|TYPE|STRUCT|(?:INITIAL_)?STEP|NAMESPACE|LIBRARY|CHANNEL|FOLDER|RESOURCE|VAR_(?:GLOBAL|INPUT|PUTPUT|IN_OUT|ACCESS|TEMP|EXTERNAL|CONFIG)|VAR|METHOD|PROPERTY)\b/i,keyword:/\b(?:(?:END_)?(?:IF|WHILE|REPEAT|CASE|FOR)|ELSE|FROM|THEN|ELSIF|DO|TO|BY|PRIVATE|PUBLIC|PROTECTED|CONSTANT|RETURN|EXIT|CONTINUE|GOTO|JMP|AT|RETAIN|NON_RETAIN|TASK|WITH|UNTIL|USING|EXTENDS|IMPLEMENTS|GET|SET|__TRY|__CATCH|__FINALLY|__ENDTRY)\b/,variable:/\b(?:AT|BOOL|BYTE|(?:D|L)?WORD|U?(?:S|D|L)?INT|L?REAL|TIME(?:_OF_DAY)?|TOD|DT|DATE(?:_AND_TIME)?|STRING|ARRAY|ANY|POINTER)\b/,symbol:/%[IQM][XBWDL][\d.]*|%[IQ][\d.]*/,number:/\b(?:16#[\da-f]+|2#[01_]+|0x[\da-f]+)\b|\b(?:T|D|DT|TOD)#[\d_shmd:]*|\b[A-Z]*\#[\d.,_]*|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?/i,boolean:/\b(?:TRUE|FALSE|NULL)\b/,function:/\w+(?=\()/,operator:/(?:S?R?:?=>?|&&?|\*\*?|<=?|>=?|[-:^/+])|\b(?:OR|AND|MOD|NOT|XOR|LE|GE|EQ|NE|GE|LT)\b/,punctuation:/[();]/,type:{pattern:/#/,alias:"selector"}}; \ No newline at end of file diff --git a/examples/prism-iecst.html b/examples/prism-iecst.html new file mode 100644 index 0000000000..2bfc455654 --- /dev/null +++ b/examples/prism-iecst.html @@ -0,0 +1,40 @@ +

          Code

          +
          
          +CONFIGURATION DefaultCfg
          +    VAR_GLOBAL
          +      Start_Stop AT %IX0.0: BOOL; (* This is a comment *)
          +    END_VAR
          +    TASK NewTask  (INTERVAL := T#20ms);
          +    PROGRAM Main WITH NewTask : PLC_PRG;
          +END_CONFIGURATION
          +  
          +PROGRAM demo
          +    VAR_EXTERNAL
          +      Start_Stop: BOOL;
          +      StringVar: STRING[250] := "Test String"
          +    END_VAR
          +    VAR
          +      a : REAL; // Another comment
          +      todTest: TIME_OF_DAY := TOD#12:55;
          +    END_VAR
          +    a := csq(12.5);
          +    IF a > REAL#100 - 16#FAC0 + 2#1001_0110 THEN
          +      Start_Stop := TRUE;
          +    END_IF
          +END_PROGRAM;
          +  
          +FUNCTION_BLOCK PRIVATE MyName EXTENDS AnotherName
          +      
          +END_FUNCTION_BLOCK
          +
          +/* Get a square of the circle */
          +FUNCTION csq : REAL 
          +    VAR_INPUT
          +      r: REAL;
          +    END_VAR
          +    VAR CONSTANT
          +      c_pi: REAL := 3.14;
          +    END_VAR
          +    csq := ABS(c_pi * (r * 2));
          +END_FUNCTION
          +
          \ No newline at end of file diff --git a/plugins/show-language/prism-show-language.js b/plugins/show-language/prism-show-language.js index e1d0826cf3..957172ea4f 100644 --- a/plugins/show-language/prism-show-language.js +++ b/plugins/show-language/prism-show-language.js @@ -76,6 +76,7 @@ "hpkp": "HTTP Public-Key-Pins", "hsts": "HTTP Strict-Transport-Security", "ichigojam": "IchigoJam", + "iecst": "Structured Text (IEC 61131-3)", "inform7": "Inform 7", "javadoc": "JavaDoc", "javadoclike": "JavaDoc-like", diff --git a/plugins/show-language/prism-show-language.min.js b/plugins/show-language/prism-show-language.min.js index 483b3760e0..3bef08fe6d 100644 --- a/plugins/show-language/prism-show-language.min.js +++ b/plugins/show-language/prism-show-language.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof self&&self.Prism&&self.document)if(Prism.plugins.toolbar){var r={html:"HTML",xml:"XML",svg:"SVG",mathml:"MathML",css:"CSS",clike:"C-like",js:"JavaScript",abap:"ABAP",abnf:"Augmented Backus–Naur form",antlr4:"ANTLR4",g4:"ANTLR4",apacheconf:"Apache Configuration",apl:"APL",aql:"AQL",arff:"ARFF",asciidoc:"AsciiDoc",adoc:"AsciiDoc",asm6502:"6502 Assembly",aspnet:"ASP.NET (C#)",autohotkey:"AutoHotkey",autoit:"AutoIt",basic:"BASIC",bbcode:"BBcode",bnf:"Backus–Naur form",rbnf:"Routing Backus–Naur form",conc:"Concurnas",csharp:"C#",cs:"C#",dotnet:"C#",cpp:"C++",cil:"CIL",coffee:"CoffeeScript",cmake:"CMake",csp:"Content-Security-Policy","css-extras":"CSS Extras",dax:"DAX",django:"Django/Jinja2",jinja2:"Django/Jinja2","dns-zone-file":"DNS zone file","dns-zone":"DNS zone file",dockerfile:"Docker",ebnf:"Extended Backus–Naur form",ejs:"EJS",etlua:"Embedded Lua templating",erb:"ERB","excel-formula":"Excel Formula",xlsx:"Excel Formula",xls:"Excel Formula",fsharp:"F#","firestore-security-rules":"Firestore security rules",ftl:"FreeMarker Template Language",gcode:"G-code",gdscript:"GDScript",gedcom:"GEDCOM",glsl:"GLSL",gml:"GameMaker Language",gamemakerlanguage:"GameMaker Language",graphql:"GraphQL",hs:"Haskell",hcl:"HCL",http:"HTTP",hpkp:"HTTP Public-Key-Pins",hsts:"HTTP Strict-Transport-Security",ichigojam:"IchigoJam",inform7:"Inform 7",javadoc:"JavaDoc",javadoclike:"JavaDoc-like",javastacktrace:"Java stack trace",jq:"JQ",jsdoc:"JSDoc","js-extras":"JS Extras","js-templates":"JS Templates",json:"JSON",jsonp:"JSONP",json5:"JSON5",latex:"LaTeX",tex:"TeX",context:"ConTeXt",lilypond:"LilyPond",ly:"LilyPond",emacs:"Lisp",elisp:"Lisp","emacs-lisp":"Lisp",llvm:"LLVM IR",lolcode:"LOLCODE",md:"Markdown","markup-templating":"Markup templating",matlab:"MATLAB",mel:"MEL",moon:"MoonScript",n1ql:"N1QL",n4js:"N4JS",n4jsd:"N4JS","nand2tetris-hdl":"Nand To Tetris HDL",nasm:"NASM",neon:"NEON",nginx:"nginx",nsis:"NSIS",objectivec:"Objective-C",ocaml:"OCaml",opencl:"OpenCL",parigp:"PARI/GP",objectpascal:"Object Pascal",pcaxis:"PC-Axis",px:"PC-Axis",php:"PHP",phpdoc:"PHPDoc","php-extras":"PHP Extras",plsql:"PL/SQL",powerquery:"PowerQuery",pq:"PowerQuery",mscript:"PowerQuery",powershell:"PowerShell",properties:".properties",protobuf:"Protocol Buffers",py:"Python",q:"Q (kdb+ database)",qml:"QML",jsx:"React JSX",tsx:"React TSX",renpy:"Ren'py",rest:"reST (reStructuredText)",robotframework:"Robot Framework",robot:"Robot Framework",rb:"Ruby",sas:"SAS",sass:"Sass (Sass)",scss:"Sass (Scss)","shell-session":"Shell session",solidity:"Solidity (Ethereum)","solution-file":"Solution file",sln:"Solution file",soy:"Soy (Closure Template)",sparql:"SPARQL",rq:"SPARQL","splunk-spl":"Splunk SPL",sqf:"SQF: Status Quo Function (Arma 3)",sql:"SQL",tap:"TAP",toml:"TOML",tt2:"Template Toolkit 2",trig:"TriG",ts:"TypeScript","t4-cs":"T4 Text Templates (C#)",t4:"T4 Text Templates (C#)","t4-vb":"T4 Text Templates (VB)","t4-templating":"T4 templating",vbnet:"VB.Net",vhdl:"VHDL",vim:"vim","visual-basic":"Visual Basic",vb:"Visual Basic",wasm:"WebAssembly",wiki:"Wiki markup",xeoracube:"XeoraCube",xojo:"Xojo (REALbasic)",xquery:"XQuery",yaml:"YAML",yml:"YAML"};Prism.plugins.toolbar.registerButton("show-language",function(e){var a=e.element.parentNode;if(a&&/pre/i.test(a.nodeName)){var s,t=a.getAttribute("data-language")||r[e.language]||((s=e.language)?(s.substring(0,1).toUpperCase()+s.substring(1)).replace(/s(?=cript)/,"S"):s);if(t){var o=document.createElement("span");return o.textContent=t,o}}})}else console.warn("Show Languages plugin loaded before Toolbar plugin.")}(); \ No newline at end of file +!function(){if("undefined"!=typeof self&&self.Prism&&self.document)if(Prism.plugins.toolbar){var r={html:"HTML",xml:"XML",svg:"SVG",mathml:"MathML",css:"CSS",clike:"C-like",js:"JavaScript",abap:"ABAP",abnf:"Augmented Backus–Naur form",antlr4:"ANTLR4",g4:"ANTLR4",apacheconf:"Apache Configuration",apl:"APL",aql:"AQL",arff:"ARFF",asciidoc:"AsciiDoc",adoc:"AsciiDoc",asm6502:"6502 Assembly",aspnet:"ASP.NET (C#)",autohotkey:"AutoHotkey",autoit:"AutoIt",basic:"BASIC",bbcode:"BBcode",bnf:"Backus–Naur form",rbnf:"Routing Backus–Naur form",conc:"Concurnas",csharp:"C#",cs:"C#",dotnet:"C#",cpp:"C++",cil:"CIL",coffee:"CoffeeScript",cmake:"CMake",csp:"Content-Security-Policy","css-extras":"CSS Extras",dax:"DAX",django:"Django/Jinja2",jinja2:"Django/Jinja2","dns-zone-file":"DNS zone file","dns-zone":"DNS zone file",dockerfile:"Docker",ebnf:"Extended Backus–Naur form",ejs:"EJS",etlua:"Embedded Lua templating",erb:"ERB","excel-formula":"Excel Formula",xlsx:"Excel Formula",xls:"Excel Formula",fsharp:"F#","firestore-security-rules":"Firestore security rules",ftl:"FreeMarker Template Language",gcode:"G-code",gdscript:"GDScript",gedcom:"GEDCOM",glsl:"GLSL",gml:"GameMaker Language",gamemakerlanguage:"GameMaker Language",graphql:"GraphQL",hs:"Haskell",hcl:"HCL",http:"HTTP",hpkp:"HTTP Public-Key-Pins",hsts:"HTTP Strict-Transport-Security",ichigojam:"IchigoJam",iecst:"Structured Text (IEC 61131-3)",inform7:"Inform 7",javadoc:"JavaDoc",javadoclike:"JavaDoc-like",javastacktrace:"Java stack trace",jq:"JQ",jsdoc:"JSDoc","js-extras":"JS Extras","js-templates":"JS Templates",json:"JSON",jsonp:"JSONP",json5:"JSON5",latex:"LaTeX",tex:"TeX",context:"ConTeXt",lilypond:"LilyPond",ly:"LilyPond",emacs:"Lisp",elisp:"Lisp","emacs-lisp":"Lisp",llvm:"LLVM IR",lolcode:"LOLCODE",md:"Markdown","markup-templating":"Markup templating",matlab:"MATLAB",mel:"MEL",moon:"MoonScript",n1ql:"N1QL",n4js:"N4JS",n4jsd:"N4JS","nand2tetris-hdl":"Nand To Tetris HDL",nasm:"NASM",neon:"NEON",nginx:"nginx",nsis:"NSIS",objectivec:"Objective-C",ocaml:"OCaml",opencl:"OpenCL",parigp:"PARI/GP",objectpascal:"Object Pascal",pcaxis:"PC-Axis",px:"PC-Axis",php:"PHP",phpdoc:"PHPDoc","php-extras":"PHP Extras",plsql:"PL/SQL",powerquery:"PowerQuery",pq:"PowerQuery",mscript:"PowerQuery",powershell:"PowerShell",properties:".properties",protobuf:"Protocol Buffers",py:"Python",q:"Q (kdb+ database)",qml:"QML",jsx:"React JSX",tsx:"React TSX",renpy:"Ren'py",rest:"reST (reStructuredText)",robotframework:"Robot Framework",robot:"Robot Framework",rb:"Ruby",sas:"SAS",sass:"Sass (Sass)",scss:"Sass (Scss)","shell-session":"Shell session",solidity:"Solidity (Ethereum)","solution-file":"Solution file",sln:"Solution file",soy:"Soy (Closure Template)",sparql:"SPARQL",rq:"SPARQL","splunk-spl":"Splunk SPL",sqf:"SQF: Status Quo Function (Arma 3)",sql:"SQL",tap:"TAP",toml:"TOML",tt2:"Template Toolkit 2",trig:"TriG",ts:"TypeScript","t4-cs":"T4 Text Templates (C#)",t4:"T4 Text Templates (C#)","t4-vb":"T4 Text Templates (VB)","t4-templating":"T4 templating",vbnet:"VB.Net",vhdl:"VHDL",vim:"vim","visual-basic":"Visual Basic",vb:"Visual Basic",wasm:"WebAssembly",wiki:"Wiki markup",xeoracube:"XeoraCube",xojo:"Xojo (REALbasic)",xquery:"XQuery",yaml:"YAML",yml:"YAML"};Prism.plugins.toolbar.registerButton("show-language",function(e){var a=e.element.parentNode;if(a&&/pre/i.test(a.nodeName)){var t,s=a.getAttribute("data-language")||r[e.language]||((t=e.language)?(t.substring(0,1).toUpperCase()+t.substring(1)).replace(/s(?=cript)/,"S"):t);if(s){var o=document.createElement("span");return o.textContent=s,o}}})}else console.warn("Show Languages plugin loaded before Toolbar plugin.")}(); \ No newline at end of file diff --git a/tests/languages/iecst/block.test b/tests/languages/iecst/block.test new file mode 100644 index 0000000000..58c4d8dcaf --- /dev/null +++ b/tests/languages/iecst/block.test @@ -0,0 +1,23 @@ +csq := ABS(c_pi * (r * 2)); + +---------------------------------------------------- + +[ + "csq ", + ["operator", ":="], + ["function", "ABS"], + ["punctuation", "("], + "c_pi ", + ["operator", "*"], + ["punctuation", "("], + "r ", + ["operator", "*"], + ["number", "2"], + ["punctuation", ")"], + ["punctuation", ")"], + ["punctuation", ";"] +] + +---------------------------------------------------- + +Checks expression. diff --git a/tests/languages/iecst/number.test b/tests/languages/iecst/number.test new file mode 100644 index 0000000000..666f8fb4a1 --- /dev/null +++ b/tests/languages/iecst/number.test @@ -0,0 +1,13 @@ +a := 100 + +---------------------------------------------------- + +[ + "a ", + ["operator", ":="], + ["number", "100"] +] + +---------------------------------------------------- + +Checks number. diff --git a/tests/languages/iecst/symbol.test b/tests/languages/iecst/symbol.test new file mode 100644 index 0000000000..8b210cdc2d --- /dev/null +++ b/tests/languages/iecst/symbol.test @@ -0,0 +1,22 @@ +VAR + varname AT %QX1.0.0: BOOL := TRUE; +END_VAR + +---------------------------------------------------- + +[ + ["class-name", "VAR"], + "\n varname ", + ["keyword", "AT"], + ["symbol", "%QX1.0.0"], + ["operator", ":"], + ["variable", "BOOL"], + ["operator", ":="], + ["boolean", "TRUE"], + ["punctuation", ";"], + ["class-name", "END_VAR"] +] + +---------------------------------------------------- + +Checks symbols. From 7a554b5f894b49ae2cea500890281a1d8b8ec971 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Thu, 16 Apr 2020 22:27:54 +0200 Subject: [PATCH 0490/1100] Fixed several cases of exponential backtracking (#2268) --- components/prism-antlr4.js | 2 +- components/prism-antlr4.min.js | 2 +- components/prism-applescript.js | 4 +- components/prism-applescript.min.js | 2 +- components/prism-asciidoc.js | 2 +- components/prism-asciidoc.min.js | 2 +- components/prism-c.js | 2 +- components/prism-c.min.js | 2 +- components/prism-csharp.js | 4 +- components/prism-csharp.min.js | 2 +- components/prism-d.js | 2 +- components/prism-d.min.js | 2 +- components/prism-eiffel.js | 2 +- components/prism-eiffel.min.js | 2 +- components/prism-elixir.js | 2 +- components/prism-elixir.min.js | 2 +- components/prism-ftl.js | 4 +- components/prism-ftl.min.js | 2 +- components/prism-groovy.js | 3 +- components/prism-groovy.min.js | 2 +- components/prism-javascript.js | 2 +- components/prism-javascript.min.js | 2 +- components/prism-jsx.js | 4 +- components/prism-jsx.min.js | 2 +- components/prism-lilypond.js | 2 +- components/prism-lilypond.min.js | 2 +- components/prism-livescript.js | 4 +- components/prism-livescript.min.js | 2 +- components/prism-lolcode.js | 4 +- components/prism-lolcode.min.js | 2 +- components/prism-markdown.js | 2 +- components/prism-markdown.min.js | 2 +- components/prism-markup.js | 4 +- components/prism-markup.min.js | 2 +- components/prism-neon.js | 2 +- components/prism-neon.min.js | 2 +- components/prism-pascal.js | 4 +- components/prism-pascal.min.js | 2 +- components/prism-php.js | 6 +-- components/prism-php.min.js | 2 +- components/prism-powershell.js | 2 +- components/prism-powershell.min.js | 2 +- components/prism-qml.js | 2 +- components/prism-qml.min.js | 2 +- components/prism-rip.js | 2 +- components/prism-rip.min.js | 2 +- components/prism-robotframework.js | 4 +- components/prism-robotframework.min.js | 2 +- components/prism-shell-session.js | 6 +-- components/prism-shell-session.min.js | 2 +- components/prism-textile.js | 59 ++++++++++++++++---------- components/prism-textile.min.js | 2 +- components/prism-toml.js | 14 ++++-- components/prism-toml.min.js | 2 +- components/prism-turtle.js | 2 +- components/prism-turtle.min.js | 2 +- components/prism-xquery.js | 6 +-- components/prism-xquery.min.js | 2 +- prism.js | 6 +-- 59 files changed, 122 insertions(+), 100 deletions(-) diff --git a/components/prism-antlr4.js b/components/prism-antlr4.js index 14fc2daa36..85102ec67e 100644 --- a/components/prism-antlr4.js +++ b/components/prism-antlr4.js @@ -31,7 +31,7 @@ Prism.languages.antlr4 = { } }, 'command': { - pattern: /(->\s*)(?:\s*(?:,\s*)?[a-z]\w*(?:\s*\([^()\r\n]*\))?)+(?=\s*;)/i, + pattern: /(->\s*)(?:\s*(?:,\s*)?\b[a-z]\w*(?:\s*\([^()\r\n]*\))?)+(?=\s*;)/i, lookbehind: true, inside: { 'function': /\b\w+(?=\s*(?:[,(]|$))/, diff --git a/components/prism-antlr4.min.js b/components/prism-antlr4.min.js index a3ddcdf1ce..b7347f9e2d 100644 --- a/components/prism-antlr4.min.js +++ b/components/prism-antlr4.min.js @@ -1 +1 @@ -Prism.languages.antlr4={comment:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,string:{pattern:/'(?:\\.|[^\\'\r\n])*'/,greedy:!0},"character-class":{pattern:/\[(?:\\.|[^\\\]\r\n])*\]/,greedy:!0,alias:"regex",inside:{range:{pattern:/([^[]|(?:^|[^\\])(?:\\\\)*\\\[)-(?!\])/,lookbehind:!0,alias:"punctuation"},escape:/\\(?:u(?:[a-fA-F\d]{4}|\{[a-fA-F\d]+\})|[pP]\{[=\w-]+\}|[^\r\nupP])/,punctuation:/[\[\]]/}},action:{pattern:/\{(?:[^{}]|\{(?:[^{}]|\{(?:[^{}]|\{[^{}]*\})*\})*\})*\}/,greedy:!0,inside:{content:{pattern:/(\{)[\s\S]+(?=\})/,lookbehind:!0},punctuation:/[{}]/}},command:{pattern:/(->\s*)(?:\s*(?:,\s*)?[a-z]\w*(?:\s*\([^()\r\n]*\))?)+(?=\s*;)/i,lookbehind:!0,inside:{function:/\b\w+(?=\s*(?:[,(]|$))/,punctuation:/[,()]/}},annotation:{pattern:/@\w+(?:::\w+)*/,alias:"keyword"},label:{pattern:/#[ \t]*\w+/,alias:"punctuation"},keyword:/\b(?:catch|channels|finally|fragment|grammar|import|lexer|locals|mode|options|parser|returns|throws|tokens)\b/,definition:[{pattern:/\b[a-z]\w*(?=\s*:)/,alias:["rule","class-name"]},{pattern:/\b[A-Z]\w*(?=\s*:)/,alias:["token","constant"]}],constant:/\b[A-Z][A-Z_]*\b/,operator:/\.\.|->|[|~]|[*+?]\??/,punctuation:/[;:()=]/},Prism.languages.g4=Prism.languages.antlr4; \ No newline at end of file +Prism.languages.antlr4={comment:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,string:{pattern:/'(?:\\.|[^\\'\r\n])*'/,greedy:!0},"character-class":{pattern:/\[(?:\\.|[^\\\]\r\n])*\]/,greedy:!0,alias:"regex",inside:{range:{pattern:/([^[]|(?:^|[^\\])(?:\\\\)*\\\[)-(?!\])/,lookbehind:!0,alias:"punctuation"},escape:/\\(?:u(?:[a-fA-F\d]{4}|\{[a-fA-F\d]+\})|[pP]\{[=\w-]+\}|[^\r\nupP])/,punctuation:/[\[\]]/}},action:{pattern:/\{(?:[^{}]|\{(?:[^{}]|\{(?:[^{}]|\{[^{}]*\})*\})*\})*\}/,greedy:!0,inside:{content:{pattern:/(\{)[\s\S]+(?=\})/,lookbehind:!0},punctuation:/[{}]/}},command:{pattern:/(->\s*)(?:\s*(?:,\s*)?\b[a-z]\w*(?:\s*\([^()\r\n]*\))?)+(?=\s*;)/i,lookbehind:!0,inside:{function:/\b\w+(?=\s*(?:[,(]|$))/,punctuation:/[,()]/}},annotation:{pattern:/@\w+(?:::\w+)*/,alias:"keyword"},label:{pattern:/#[ \t]*\w+/,alias:"punctuation"},keyword:/\b(?:catch|channels|finally|fragment|grammar|import|lexer|locals|mode|options|parser|returns|throws|tokens)\b/,definition:[{pattern:/\b[a-z]\w*(?=\s*:)/,alias:["rule","class-name"]},{pattern:/\b[A-Z]\w*(?=\s*:)/,alias:["token","constant"]}],constant:/\b[A-Z][A-Z_]*\b/,operator:/\.\.|->|[|~]|[*+?]\??/,punctuation:/[;:()=]/},Prism.languages.g4=Prism.languages.antlr4; \ No newline at end of file diff --git a/components/prism-applescript.js b/components/prism-applescript.js index 4b4b8295a8..6b320356b1 100644 --- a/components/prism-applescript.js +++ b/components/prism-applescript.js @@ -1,7 +1,7 @@ Prism.languages.applescript = { 'comment': [ // Allow one level of nesting - /\(\*(?:\(\*[\s\S]*?\*\)|[\s\S])*?\*\)/, + /\(\*(?:\(\*(?:[^*]|\*(?!\)))*\*\)|(?!\(\*)[\s\S])*?\*\)/, /--.+/, /#.+/ ], @@ -17,4 +17,4 @@ Prism.languages.applescript = { alias: 'builtin' }, 'punctuation': /[{}():,¬«»《》]/ -}; \ No newline at end of file +}; diff --git a/components/prism-applescript.min.js b/components/prism-applescript.min.js index 839f0dcfbc..adf3f99b74 100644 --- a/components/prism-applescript.min.js +++ b/components/prism-applescript.min.js @@ -1 +1 @@ -Prism.languages.applescript={comment:[/\(\*(?:\(\*[\s\S]*?\*\)|[\s\S])*?\*\)/,/--.+/,/#.+/],string:/"(?:\\.|[^"\\\r\n])*"/,number:/(?:\b\d+\.?\d*|\B\.\d+)(?:e-?\d+)?\b/i,operator:[/[&=≠≤≥*+\-\/÷^]|[<>]=?/,/\b(?:(?:start|begin|end)s? with|(?:(?:does not|doesn't) contain|contains?)|(?:is|isn't|is not) (?:in|contained by)|(?:(?:is|isn't|is not) )?(?:greater|less) than(?: or equal)?(?: to)?|(?:(?:does not|doesn't) come|comes) (?:before|after)|(?:is|isn't|is not) equal(?: to)?|(?:(?:does not|doesn't) equal|equals|equal to|isn't|is not)|(?:a )?(?:ref(?: to)?|reference to)|(?:and|or|div|mod|as|not))\b/],keyword:/\b(?:about|above|after|against|apart from|around|aside from|at|back|before|beginning|behind|below|beneath|beside|between|but|by|considering|continue|copy|does|eighth|else|end|equal|error|every|exit|false|fifth|first|for|fourth|from|front|get|given|global|if|ignoring|in|instead of|into|is|it|its|last|local|me|middle|my|ninth|of|on|onto|out of|over|prop|property|put|repeat|return|returning|second|set|seventh|since|sixth|some|tell|tenth|that|the|then|third|through|thru|timeout|times|to|transaction|true|try|until|where|while|whose|with|without)\b/,class:{pattern:/\b(?:alias|application|boolean|class|constant|date|file|integer|list|number|POSIX file|real|record|reference|RGB color|script|text|centimetres|centimeters|feet|inches|kilometres|kilometers|metres|meters|miles|yards|square feet|square kilometres|square kilometers|square metres|square meters|square miles|square yards|cubic centimetres|cubic centimeters|cubic feet|cubic inches|cubic metres|cubic meters|cubic yards|gallons|litres|liters|quarts|grams|kilograms|ounces|pounds|degrees Celsius|degrees Fahrenheit|degrees Kelvin)\b/,alias:"builtin"},punctuation:/[{}():,¬«»《》]/}; \ No newline at end of file +Prism.languages.applescript={comment:[/\(\*(?:\(\*(?:[^*]|\*(?!\)))*\*\)|(?!\(\*)[\s\S])*?\*\)/,/--.+/,/#.+/],string:/"(?:\\.|[^"\\\r\n])*"/,number:/(?:\b\d+\.?\d*|\B\.\d+)(?:e-?\d+)?\b/i,operator:[/[&=≠≤≥*+\-\/÷^]|[<>]=?/,/\b(?:(?:start|begin|end)s? with|(?:(?:does not|doesn't) contain|contains?)|(?:is|isn't|is not) (?:in|contained by)|(?:(?:is|isn't|is not) )?(?:greater|less) than(?: or equal)?(?: to)?|(?:(?:does not|doesn't) come|comes) (?:before|after)|(?:is|isn't|is not) equal(?: to)?|(?:(?:does not|doesn't) equal|equals|equal to|isn't|is not)|(?:a )?(?:ref(?: to)?|reference to)|(?:and|or|div|mod|as|not))\b/],keyword:/\b(?:about|above|after|against|apart from|around|aside from|at|back|before|beginning|behind|below|beneath|beside|between|but|by|considering|continue|copy|does|eighth|else|end|equal|error|every|exit|false|fifth|first|for|fourth|from|front|get|given|global|if|ignoring|in|instead of|into|is|it|its|last|local|me|middle|my|ninth|of|on|onto|out of|over|prop|property|put|repeat|return|returning|second|set|seventh|since|sixth|some|tell|tenth|that|the|then|third|through|thru|timeout|times|to|transaction|true|try|until|where|while|whose|with|without)\b/,class:{pattern:/\b(?:alias|application|boolean|class|constant|date|file|integer|list|number|POSIX file|real|record|reference|RGB color|script|text|centimetres|centimeters|feet|inches|kilometres|kilometers|metres|meters|miles|yards|square feet|square kilometres|square kilometers|square metres|square meters|square miles|square yards|cubic centimetres|cubic centimeters|cubic feet|cubic inches|cubic metres|cubic meters|cubic yards|gallons|litres|liters|quarts|grams|kilograms|ounces|pounds|degrees Celsius|degrees Fahrenheit|degrees Kelvin)\b/,alias:"builtin"},punctuation:/[{}():,¬«»《》]/}; \ No newline at end of file diff --git a/components/prism-asciidoc.js b/components/prism-asciidoc.js index 954f0c9ac5..bc0664f1c3 100644 --- a/components/prism-asciidoc.js +++ b/components/prism-asciidoc.js @@ -149,7 +149,7 @@ Those do not have the restrictions of the constrained quotes. They are, in order: __emphasis__, **strong**, ++monospace++, +++passthrough+++, ##unquoted##, $$passthrough$$, ~subscript~, ^superscript^, {attribute-reference}, [[anchor]], [[[bibliography anchor]]], <>, (((indexes))) and ((indexes)) */ - pattern: /(^|[^\\])(?:(?:\B\[(?:[^\]\\"]|(["'])(?:(?!\2)[^\\]|\\.)*\2|\\.)*\])?(?:\b_(?!\s)(?: _|[^_\\\r\n]|\\.)+(?:(?:\r?\n|\r)(?: _|[^_\\\r\n]|\\.)+)*_\b|\B``(?!\s).+?(?:(?:\r?\n|\r).+?)*''\B|\B`(?!\s)(?: ['`]|.)+?(?:(?:\r?\n|\r)(?: ['`]|.)+?)*['`]\B|\B(['*+#])(?!\s)(?: \3|(?!\3)[^\\\r\n]|\\.)+(?:(?:\r?\n|\r)(?: \3|(?!\3)[^\\\r\n]|\\.)+)*\3\B)|(?:\[(?:[^\]\\"]|(["'])(?:(?!\4)[^\\]|\\.)*\4|\\.)*\])?(?:(__|\*\*|\+\+\+?|##|\$\$|[~^]).+?(?:(?:\r?\n|\r).+?)*\5|\{[^}\r\n]+\}|\[\[\[?.+?(?:(?:\r?\n|\r).+?)*\]?\]\]|<<.+?(?:(?:\r?\n|\r).+?)*>>|\(\(\(?.+?(?:(?:\r?\n|\r).+?)*\)?\)\)))/m, + pattern: /(^|[^\\])(?:(?:\B\[(?:[^\]\\"]|(["'])(?:(?!\2)[^\\]|\\.)*\2|\\.)*\])?(?:\b_(?!\s)(?: _|[^_\\\r\n]|\\.)+(?:(?:\r?\n|\r)(?: _|[^_\\\r\n]|\\.)+)*_\b|\B``(?!\s).+?(?:(?:\r?\n|\r).+?)*''\B|\B`(?!\s)(?:[^`'\s]|\s+\S)+['`]\B|\B(['*+#])(?!\s)(?: \3|(?!\3)[^\\\r\n]|\\.)+(?:(?:\r?\n|\r)(?: \3|(?!\3)[^\\\r\n]|\\.)+)*\3\B)|(?:\[(?:[^\]\\"]|(["'])(?:(?!\4)[^\\]|\\.)*\4|\\.)*\])?(?:(__|\*\*|\+\+\+?|##|\$\$|[~^]).+?(?:(?:\r?\n|\r).+?)*\5|\{[^}\r\n]+\}|\[\[\[?.+?(?:(?:\r?\n|\r).+?)*\]?\]\]|<<.+?(?:(?:\r?\n|\r).+?)*>>|\(\(\(?.+?(?:(?:\r?\n|\r).+?)*\)?\)\)))/m, lookbehind: true, inside: { 'attributes': attributes, diff --git a/components/prism-asciidoc.min.js b/components/prism-asciidoc.min.js index 4c5e76af64..b37a07c92b 100644 --- a/components/prism-asciidoc.min.js +++ b/components/prism-asciidoc.min.js @@ -1 +1 @@ -!function(t){var n={pattern:/(^[ \t]*)\[(?!\[)(?:(["'$`])(?:(?!\2)[^\\]|\\.)*\2|\[(?:[^\]\\]|\\.)*\]|[^\]\\]|\\.)*\]/m,lookbehind:!0,inside:{quoted:{pattern:/([$`])(?:(?!\1)[^\\]|\\.)*\1/,inside:{punctuation:/^[$`]|[$`]$/}},interpreted:{pattern:/'(?:[^'\\]|\\.)*'/,inside:{punctuation:/^'|'$/}},string:/"(?:[^"\\]|\\.)*"/,variable:/\w+(?==)/,punctuation:/^\[|\]$|,/,operator:/=/,"attr-value":/(?!^\s+$).+/}},a=t.languages.asciidoc={"comment-block":{pattern:/^(\/{4,})(?:\r?\n|\r)(?:[\s\S]*(?:\r?\n|\r))??\1/m,alias:"comment"},table:{pattern:/^\|={3,}(?:(?:\r?\n|\r).*)*?(?:\r?\n|\r)\|={3,}$/m,inside:{specifiers:{pattern:/(?!\|)(?:(?:(?:\d+(?:\.\d+)?|\.\d+)[+*])?(?:[<^>](?:\.[<^>])?|\.[<^>])?[a-z]*)(?=\|)/,alias:"attr-value"},punctuation:{pattern:/(^|[^\\])[|!]=*/,lookbehind:!0}}},"passthrough-block":{pattern:/^(\+{4,})(?:\r?\n|\r)(?:[\s\S]*(?:\r?\n|\r))??\1$/m,inside:{punctuation:/^\++|\++$/}},"literal-block":{pattern:/^(-{4,}|\.{4,})(?:\r?\n|\r)(?:[\s\S]*(?:\r?\n|\r))??\1$/m,inside:{punctuation:/^(?:-+|\.+)|(?:-+|\.+)$/}},"other-block":{pattern:/^(--|\*{4,}|_{4,}|={4,})(?:\r?\n|\r)(?:[\s\S]*(?:\r?\n|\r))??\1$/m,inside:{punctuation:/^(?:-+|\*+|_+|=+)|(?:-+|\*+|_+|=+)$/}},"list-punctuation":{pattern:/(^[ \t]*)(?:-|\*{1,5}|\.{1,5}|(?:[a-z]|\d+)\.|[xvi]+\))(?= )/im,lookbehind:!0,alias:"punctuation"},"list-label":{pattern:/(^[ \t]*)[a-z\d].+(?::{2,4}|;;)(?=\s)/im,lookbehind:!0,alias:"symbol"},"indented-block":{pattern:/((\r?\n|\r)\2)([ \t]+)\S.*(?:(?:\r?\n|\r)\3.+)*(?=\2{2}|$)/,lookbehind:!0},comment:/^\/\/.*/m,title:{pattern:/^.+(?:\r?\n|\r)(?:={3,}|-{3,}|~{3,}|\^{3,}|\+{3,})$|^={1,5} +.+|^\.(?![\s.]).*/m,alias:"important",inside:{punctuation:/^(?:\.|=+)|(?:=+|-+|~+|\^+|\++)$/}},"attribute-entry":{pattern:/^:[^:\r\n]+:(?: .*?(?: \+(?:\r?\n|\r).*?)*)?$/m,alias:"tag"},attributes:n,hr:{pattern:/^'{3,}$/m,alias:"punctuation"},"page-break":{pattern:/^<{3,}$/m,alias:"punctuation"},admonition:{pattern:/^(?:TIP|NOTE|IMPORTANT|WARNING|CAUTION):/m,alias:"keyword"},callout:[{pattern:/(^[ \t]*)/m,lookbehind:!0,alias:"symbol"},{pattern:/<\d+>/,alias:"symbol"}],macro:{pattern:/\b[a-z\d][a-z\d-]*::?(?:(?:\S+)??\[(?:[^\]\\"]|(["'])(?:(?!\1)[^\\]|\\.)*\1|\\.)*\])/,inside:{function:/^[a-z\d-]+(?=:)/,punctuation:/^::?/,attributes:{pattern:/(?:\[(?:[^\]\\"]|(["'])(?:(?!\1)[^\\]|\\.)*\1|\\.)*\])/,inside:n.inside}}},inline:{pattern:/(^|[^\\])(?:(?:\B\[(?:[^\]\\"]|(["'])(?:(?!\2)[^\\]|\\.)*\2|\\.)*\])?(?:\b_(?!\s)(?: _|[^_\\\r\n]|\\.)+(?:(?:\r?\n|\r)(?: _|[^_\\\r\n]|\\.)+)*_\b|\B``(?!\s).+?(?:(?:\r?\n|\r).+?)*''\B|\B`(?!\s)(?: ['`]|.)+?(?:(?:\r?\n|\r)(?: ['`]|.)+?)*['`]\B|\B(['*+#])(?!\s)(?: \3|(?!\3)[^\\\r\n]|\\.)+(?:(?:\r?\n|\r)(?: \3|(?!\3)[^\\\r\n]|\\.)+)*\3\B)|(?:\[(?:[^\]\\"]|(["'])(?:(?!\4)[^\\]|\\.)*\4|\\.)*\])?(?:(__|\*\*|\+\+\+?|##|\$\$|[~^]).+?(?:(?:\r?\n|\r).+?)*\5|\{[^}\r\n]+\}|\[\[\[?.+?(?:(?:\r?\n|\r).+?)*\]?\]\]|<<.+?(?:(?:\r?\n|\r).+?)*>>|\(\(\(?.+?(?:(?:\r?\n|\r).+?)*\)?\)\)))/m,lookbehind:!0,inside:{attributes:n,url:{pattern:/^(?:\[\[\[?.+?\]?\]\]|<<.+?>>)$/,inside:{punctuation:/^(?:\[\[\[?|<<)|(?:\]\]\]?|>>)$/}},"attribute-ref":{pattern:/^\{.+\}$/,inside:{variable:{pattern:/(^\{)[a-z\d,+_-]+/,lookbehind:!0},operator:/^[=?!#%@$]|!(?=[:}])/,punctuation:/^\{|\}$|::?/}},italic:{pattern:/^(['_])[\s\S]+\1$/,inside:{punctuation:/^(?:''?|__?)|(?:''?|__?)$/}},bold:{pattern:/^\*[\s\S]+\*$/,inside:{punctuation:/^\*\*?|\*\*?$/}},punctuation:/^(?:``?|\+{1,3}|##?|\$\$|[~^]|\(\(\(?)|(?:''?|\+{1,3}|##?|\$\$|[~^`]|\)?\)\))$/}},replacement:{pattern:/\((?:C|TM|R)\)/,alias:"builtin"},entity:/&#?[\da-z]{1,8};/i,"line-continuation":{pattern:/(^| )\+$/m,lookbehind:!0,alias:"punctuation"}};function i(t){for(var n={},i=0,e=(t=t.split(" ")).length;i](?:\.[<^>])?|\.[<^>])?[a-z]*)(?=\|)/,alias:"attr-value"},punctuation:{pattern:/(^|[^\\])[|!]=*/,lookbehind:!0}}},"passthrough-block":{pattern:/^(\+{4,})(?:\r?\n|\r)(?:[\s\S]*(?:\r?\n|\r))??\1$/m,inside:{punctuation:/^\++|\++$/}},"literal-block":{pattern:/^(-{4,}|\.{4,})(?:\r?\n|\r)(?:[\s\S]*(?:\r?\n|\r))??\1$/m,inside:{punctuation:/^(?:-+|\.+)|(?:-+|\.+)$/}},"other-block":{pattern:/^(--|\*{4,}|_{4,}|={4,})(?:\r?\n|\r)(?:[\s\S]*(?:\r?\n|\r))??\1$/m,inside:{punctuation:/^(?:-+|\*+|_+|=+)|(?:-+|\*+|_+|=+)$/}},"list-punctuation":{pattern:/(^[ \t]*)(?:-|\*{1,5}|\.{1,5}|(?:[a-z]|\d+)\.|[xvi]+\))(?= )/im,lookbehind:!0,alias:"punctuation"},"list-label":{pattern:/(^[ \t]*)[a-z\d].+(?::{2,4}|;;)(?=\s)/im,lookbehind:!0,alias:"symbol"},"indented-block":{pattern:/((\r?\n|\r)\2)([ \t]+)\S.*(?:(?:\r?\n|\r)\3.+)*(?=\2{2}|$)/,lookbehind:!0},comment:/^\/\/.*/m,title:{pattern:/^.+(?:\r?\n|\r)(?:={3,}|-{3,}|~{3,}|\^{3,}|\+{3,})$|^={1,5} +.+|^\.(?![\s.]).*/m,alias:"important",inside:{punctuation:/^(?:\.|=+)|(?:=+|-+|~+|\^+|\++)$/}},"attribute-entry":{pattern:/^:[^:\r\n]+:(?: .*?(?: \+(?:\r?\n|\r).*?)*)?$/m,alias:"tag"},attributes:n,hr:{pattern:/^'{3,}$/m,alias:"punctuation"},"page-break":{pattern:/^<{3,}$/m,alias:"punctuation"},admonition:{pattern:/^(?:TIP|NOTE|IMPORTANT|WARNING|CAUTION):/m,alias:"keyword"},callout:[{pattern:/(^[ \t]*)/m,lookbehind:!0,alias:"symbol"},{pattern:/<\d+>/,alias:"symbol"}],macro:{pattern:/\b[a-z\d][a-z\d-]*::?(?:(?:\S+)??\[(?:[^\]\\"]|(["'])(?:(?!\1)[^\\]|\\.)*\1|\\.)*\])/,inside:{function:/^[a-z\d-]+(?=:)/,punctuation:/^::?/,attributes:{pattern:/(?:\[(?:[^\]\\"]|(["'])(?:(?!\1)[^\\]|\\.)*\1|\\.)*\])/,inside:n.inside}}},inline:{pattern:/(^|[^\\])(?:(?:\B\[(?:[^\]\\"]|(["'])(?:(?!\2)[^\\]|\\.)*\2|\\.)*\])?(?:\b_(?!\s)(?: _|[^_\\\r\n]|\\.)+(?:(?:\r?\n|\r)(?: _|[^_\\\r\n]|\\.)+)*_\b|\B``(?!\s).+?(?:(?:\r?\n|\r).+?)*''\B|\B`(?!\s)(?:[^`'\s]|\s+\S)+['`]\B|\B(['*+#])(?!\s)(?: \3|(?!\3)[^\\\r\n]|\\.)+(?:(?:\r?\n|\r)(?: \3|(?!\3)[^\\\r\n]|\\.)+)*\3\B)|(?:\[(?:[^\]\\"]|(["'])(?:(?!\4)[^\\]|\\.)*\4|\\.)*\])?(?:(__|\*\*|\+\+\+?|##|\$\$|[~^]).+?(?:(?:\r?\n|\r).+?)*\5|\{[^}\r\n]+\}|\[\[\[?.+?(?:(?:\r?\n|\r).+?)*\]?\]\]|<<.+?(?:(?:\r?\n|\r).+?)*>>|\(\(\(?.+?(?:(?:\r?\n|\r).+?)*\)?\)\)))/m,lookbehind:!0,inside:{attributes:n,url:{pattern:/^(?:\[\[\[?.+?\]?\]\]|<<.+?>>)$/,inside:{punctuation:/^(?:\[\[\[?|<<)|(?:\]\]\]?|>>)$/}},"attribute-ref":{pattern:/^\{.+\}$/,inside:{variable:{pattern:/(^\{)[a-z\d,+_-]+/,lookbehind:!0},operator:/^[=?!#%@$]|!(?=[:}])/,punctuation:/^\{|\}$|::?/}},italic:{pattern:/^(['_])[\s\S]+\1$/,inside:{punctuation:/^(?:''?|__?)|(?:''?|__?)$/}},bold:{pattern:/^\*[\s\S]+\*$/,inside:{punctuation:/^\*\*?|\*\*?$/}},punctuation:/^(?:``?|\+{1,3}|##?|\$\$|[~^]|\(\(\(?)|(?:''?|\+{1,3}|##?|\$\$|[~^`]|\)?\)\))$/}},replacement:{pattern:/\((?:C|TM|R)\)/,alias:"builtin"},entity:/&#?[\da-z]{1,8};/i,"line-continuation":{pattern:/(^| )\+$/m,lookbehind:!0,alias:"punctuation"}};function i(t){for(var n={},i=0,e=(t=t.split(" ")).length;i|("|')(?:\\?.)+?\2)/, + pattern: /(#\s*include\s*)(?:<.+?>|(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2)/, lookbehind: true }, // highlight macro directives as keywords diff --git a/components/prism-c.min.js b/components/prism-c.min.js index 9acdccc0e1..f34d9594ee 100644 --- a/components/prism-c.min.js +++ b/components/prism-c.min.js @@ -1 +1 @@ -Prism.languages.c=Prism.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+/,lookbehind:!0},keyword:/\b(?:__attribute__|_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|asm|typeof|inline|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|union|unsigned|void|volatile|while)\b/,function:/[a-z_]\w*(?=\s*\()/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/,number:/(?:\b0x(?:[\da-f]+\.?[\da-f]*|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?)[ful]*/i}),Prism.languages.insertBefore("c","string",{macro:{pattern:/(^\s*)#\s*[a-z]+(?:[^\r\n\\]|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,alias:"property",inside:{string:{pattern:/(#\s*include\s*)(?:<.+?>|("|')(?:\\?.)+?\2)/,lookbehind:!0},directive:{pattern:/(#\s*)\b(?:define|defined|elif|else|endif|error|ifdef|ifndef|if|import|include|line|pragma|undef|using)\b/,lookbehind:!0,alias:"keyword"}}},constant:/\b(?:__FILE__|__LINE__|__DATE__|__TIME__|__TIMESTAMP__|__func__|EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|stdin|stdout|stderr)\b/}),delete Prism.languages.c.boolean; \ No newline at end of file +Prism.languages.c=Prism.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+/,lookbehind:!0},keyword:/\b(?:__attribute__|_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|asm|typeof|inline|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|union|unsigned|void|volatile|while)\b/,function:/[a-z_]\w*(?=\s*\()/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/,number:/(?:\b0x(?:[\da-f]+\.?[\da-f]*|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?)[ful]*/i}),Prism.languages.insertBefore("c","string",{macro:{pattern:/(^\s*)#\s*[a-z]+(?:[^\r\n\\]|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,alias:"property",inside:{string:{pattern:/(#\s*include\s*)(?:<.+?>|(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2)/,lookbehind:!0},directive:{pattern:/(#\s*)\b(?:define|defined|elif|else|endif|error|ifdef|ifndef|if|import|include|line|pragma|undef|using)\b/,lookbehind:!0,alias:"keyword"}}},constant:/\b(?:__FILE__|__LINE__|__DATE__|__TIME__|__TIMESTAMP__|__func__|EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|stdin|stdout|stderr)\b/}),delete Prism.languages.c.boolean; \ No newline at end of file diff --git a/components/prism-csharp.js b/components/prism-csharp.js index 2807b148ca..a03c7dbe86 100644 --- a/components/prism-csharp.js +++ b/components/prism-csharp.js @@ -269,7 +269,7 @@ // attributes var regularStringOrCharacter = regularString + '|' + character; - var regularStringCharacterOrComment = replace(/\/(?![*/])|\/\/[^\r\n]*[\r\n]|\/\*[\s\S]*?\*\/|<<0>>/.source, [regularStringOrCharacter]); + var regularStringCharacterOrComment = replace(/\/(?![*/])|\/\/[^\r\n]*[\r\n]|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>/.source, [regularStringOrCharacter]); var roundExpression = nested(replace(/[^"'/()]|<<0>>|\(<>*\)/.source, [regularStringCharacterOrComment]), 2); // https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/concepts/attributes/#attribute-targets @@ -310,7 +310,7 @@ var mInterpolationRound = nested(replace(/[^"'/()]|<<0>>|\(<>*\)/.source, [regularStringCharacterOrComment]), 2) var mInterpolation = replace(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source, [mInterpolationRound, formatString]); // single line - var sInterpolationRound = nested(replace(/[^"'/()]|\/(?!\*)|\/\*.*?\*\/|<<0>>|\(<>*\)/.source, [regularStringOrCharacter]), 2) + var sInterpolationRound = nested(replace(/[^"'/()]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>|\(<>*\)/.source, [regularStringOrCharacter]), 2) var sInterpolation = replace(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source, [sInterpolationRound, formatString]); function createInterpolationInside(interpolation, interpolationRound) { diff --git a/components/prism-csharp.min.js b/components/prism-csharp.min.js index e2f6a327d4..e5eeb3f717 100644 --- a/components/prism-csharp.min.js +++ b/components/prism-csharp.min.js @@ -1 +1 @@ -!function(s){function a(e,s){return e.replace(/<<(\d+)>>/g,function(e,n){return"(?:"+s[+n]+")"})}function t(e,n,s){return RegExp(a(e,n),s||"")}function e(e,n){for(var s=0;s>/g,function(){return"(?:"+e+")"});return e.replace(/<>/g,"[^\\s\\S]")}var n="bool byte char decimal double dynamic float int long object sbyte short string uint ulong ushort var void",i="class enum interface struct",r="add alias ascending async await by descending from get global group into join let nameof notnull on orderby partial remove select set unmanaged value when where where",o="abstract as base break case catch checked const continue default delegate do else event explicit extern finally fixed for foreach goto if implicit in internal is lock namespace new null operator out override params private protected public readonly ref return sealed sizeof stackalloc static switch this throw try typeof unchecked unsafe using virtual volatile while yield";function l(e){return"\\b(?:"+e.trim().replace(/ /g,"|")+")\\b"}var d=l(i),p=RegExp(l(n+" "+i+" "+r+" "+o)),c=l(i+" "+r+" "+o),u=l(n+" "+i+" "+o),g=e("<(?:[^<>;=+\\-*/%&|^]|<>)*>",2),b=e("\\((?:[^()]|<>)*\\)",2),h="@?\\b[A-Za-z_]\\w*\\b",f=a("<<0>>(?:\\s*<<1>>)?",[h,g]),m=a("(?!<<0>>)<<1>>(?:\\s*\\.\\s*<<1>>)*",[c,f]),k="\\[\\s*(?:,\\s*)*\\]",y=a("(?:<<0>>|<<1>>)(?:\\s*(?:\\?\\s*)?<<2>>)*(?:\\s*\\?)?",[a("\\(<<0>>+(?:,<<0>>+)+\\)",[a("[^,()<>[\\];=+\\-*/%&|^]|<<0>>|<<1>>|<<2>>",[g,b,k])]),m,k]),w={keyword:p,punctuation:/[<>()?,.:[\]]/},v="'(?:[^\r\n'\\\\]|\\\\.|\\\\[Uux][\\da-fA-F]{1,8})'",x='"(?:\\\\.|[^\\\\"\r\n])*"';s.languages.csharp=s.languages.extend("clike",{string:[{pattern:t("(^|[^$\\\\])<<0>>",['@"(?:""|\\\\[^]|[^\\\\"])*"(?!")']),lookbehind:!0,greedy:!0},{pattern:t("(^|[^@$\\\\])<<0>>",[x]),lookbehind:!0,greedy:!0},{pattern:RegExp(v),greedy:!0,alias:"character"}],"class-name":[{pattern:t("(\\busing\\s+static\\s+)<<0>>(?=\\s*;)",[m]),lookbehind:!0,inside:w},{pattern:t("(\\busing\\s+<<0>>\\s*=\\s*)<<1>>(?=\\s*;)",[h,y]),lookbehind:!0,inside:w},{pattern:t("(\\busing\\s+)<<0>>(?=\\s*=)",[h]),lookbehind:!0},{pattern:t("(\\b<<0>>\\s+)<<1>>",[d,f]),lookbehind:!0,inside:w},{pattern:t("(\\bcatch\\s*\\(\\s*)<<0>>",[m]),lookbehind:!0,inside:w},{pattern:t("(\\bwhere\\s+)<<0>>",[h]),lookbehind:!0},{pattern:t("(\\b(?:is|as)\\s+)<<0>>",[y]),lookbehind:!0,inside:w},{pattern:t("\\b<<0>>(?=\\s+(?!<<1>>)<<2>>(?:\\s*[=,;:{)\\]]|\\s+in))",[y,u,h]),inside:w}],keyword:p,number:/(?:\b0(?:x[\da-f_]*[\da-f]|b[01_]*[01])|(?:\B\.\d+(?:_+\d+)*|\b\d+(?:_+\d+)*(?:\.\d+(?:_+\d+)*)?)(?:e[-+]?\d+(?:_+\d+)*)?)(?:ul|lu|[dflmu])?\b/i,operator:/>>=?|<<=?|[-=]>|([-+&|])\1|~|\?\?=?|[-+*/%&|^!=<>]=?/,punctuation:/\?\.?|::|[{}[\];(),.:]/}),s.languages.insertBefore("csharp","number",{range:{pattern:/\.\./,alias:"operator"}}),s.languages.insertBefore("csharp","punctuation",{"named-parameter":{pattern:t("([(,]\\s*)<<0>>(?=\\s*:)",[h]),lookbehind:!0,alias:"punctuation"}}),s.languages.insertBefore("csharp","class-name",{namespace:{pattern:t("(\\b(?:namespace|using)\\s+)<<0>>(?:\\s*\\.\\s*<<0>>)*(?=\\s*[;{])",[h]),lookbehind:!0,inside:{punctuation:/\./}},"type-expression":{pattern:t("(\\b(?:default|typeof|sizeof)\\s*\\(\\s*)(?:[^()\\s]|\\s(?!\\s*\\))|<<0>>)*(?=\\s*\\))",[b]),lookbehind:!0,alias:"class-name",inside:w},"return-type":{pattern:t("<<0>>(?=\\s+(?:<<1>>\\s*(?:=>|[({]|\\.\\s*this\\s*\\[)|this\\s*\\[))",[y,m]),inside:w,alias:"class-name"},"constructor-invocation":{pattern:t("(\\bnew\\s+)<<0>>(?=\\s*[[({])",[y]),lookbehind:!0,inside:w,alias:"class-name"},"generic-method":{pattern:t("<<0>>\\s*<<1>>(?=\\s*\\()",[h,g]),inside:{function:t("^<<0>>",[h]),generic:{pattern:RegExp(g),alias:"class-name",inside:w}}},"type-list":{pattern:t("\\b((?:<<0>>\\s+<<1>>|where\\s+<<2>>)\\s*:\\s*)(?:<<3>>|<<4>>)(?:\\s*,\\s*(?:<<3>>|<<4>>))*(?=\\s*(?:where|[{;]|=>|$))",[d,f,h,y,p.source]),lookbehind:!0,inside:{keyword:p,"class-name":{pattern:RegExp(y),greedy:!0,inside:w},punctuation:/,/}},preprocessor:{pattern:/(^\s*)#.*/m,lookbehind:!0,alias:"property",inside:{directive:{pattern:/(\s*#)\b(?:define|elif|else|endif|endregion|error|if|line|pragma|region|undef|warning)\b/,lookbehind:!0,alias:"keyword"}}}});var $=x+"|"+v,_=a("/(?![*/])|//[^\r\n]*[\r\n]|/\\*[^]*?\\*/|<<0>>",[$]),B=e(a("[^\"'/()]|<<0>>|\\(<>*\\)",[_]),2),E="\\b(?:assembly|event|field|method|module|param|property|return|type)\\b",R=a("<<0>>(?:\\s*\\(<<1>>*\\))?",[m,B]);s.languages.insertBefore("csharp","class-name",{attribute:{pattern:t("((?:^|[^\\s\\w>)?])\\s*\\[\\s*)(?:<<0>>\\s*:\\s*)?<<1>>(?:\\s*,\\s*<<1>>)*(?=\\s*\\])",[E,R]),lookbehind:!0,greedy:!0,inside:{target:{pattern:t("^<<0>>(?=\\s*:)",[E]),alias:"keyword"},"attribute-arguments":{pattern:t("\\(<<0>>*\\)",[B]),inside:s.languages.csharp},"class-name":{pattern:RegExp(m),inside:{punctuation:/\./}},punctuation:/[:,]/}}});var P=":[^}\r\n]+",z=e(a("[^\"'/()]|<<0>>|\\(<>*\\)",[_]),2),S=a("\\{(?!\\{)(?:(?![}:])<<0>>)*<<1>>?\\}",[z,P]),j=e(a("[^\"'/()]|/(?!\\*)|/\\*.*?\\*/|<<0>>|\\(<>*\\)",[$]),2),A=a("\\{(?!\\{)(?:(?![}:])<<0>>)*<<1>>?\\}",[j,P]);function F(e,n){return{interpolation:{pattern:t("([^{](?:\\{\\{)*)<<0>>",[e]),lookbehind:!0,inside:{"format-string":{pattern:t("(^\\{(?:(?![}:])<<0>>)*)<<1>>(?=\\}$)",[n,P]),lookbehind:!0,inside:{punctuation:/^:/}},punctuation:/^\{|\}$/,expression:{pattern:/[\s\S]+/,alias:"language-csharp",inside:s.languages.csharp}}},string:/[\s\S]+/}}s.languages.insertBefore("csharp","string",{"interpolation-string":[{pattern:t('(^|[^\\\\])(?:\\$@|@\\$)"(?:""|\\\\[^]|\\{\\{|<<0>>|[^\\\\{"])*"',[S]),lookbehind:!0,greedy:!0,inside:F(S,z)},{pattern:t('(^|[^@\\\\])\\$"(?:\\\\.|\\{\\{|<<0>>|[^\\\\"{])*"',[A]),lookbehind:!0,greedy:!0,inside:F(A,j)}]})}(Prism),Prism.languages.dotnet=Prism.languages.cs=Prism.languages.csharp; \ No newline at end of file +!function(s){function a(e,s){return e.replace(/<<(\d+)>>/g,function(e,n){return"(?:"+s[+n]+")"})}function t(e,n,s){return RegExp(a(e,n),s||"")}function e(e,n){for(var s=0;s>/g,function(){return"(?:"+e+")"});return e.replace(/<>/g,"[^\\s\\S]")}var n="bool byte char decimal double dynamic float int long object sbyte short string uint ulong ushort var void",i="class enum interface struct",r="add alias ascending async await by descending from get global group into join let nameof notnull on orderby partial remove select set unmanaged value when where where",o="abstract as base break case catch checked const continue default delegate do else event explicit extern finally fixed for foreach goto if implicit in internal is lock namespace new null operator out override params private protected public readonly ref return sealed sizeof stackalloc static switch this throw try typeof unchecked unsafe using virtual volatile while yield";function l(e){return"\\b(?:"+e.trim().replace(/ /g,"|")+")\\b"}var d=l(i),p=RegExp(l(n+" "+i+" "+r+" "+o)),c=l(i+" "+r+" "+o),u=l(n+" "+i+" "+o),g=e("<(?:[^<>;=+\\-*/%&|^]|<>)*>",2),b=e("\\((?:[^()]|<>)*\\)",2),h="@?\\b[A-Za-z_]\\w*\\b",f=a("<<0>>(?:\\s*<<1>>)?",[h,g]),m=a("(?!<<0>>)<<1>>(?:\\s*\\.\\s*<<1>>)*",[c,f]),k="\\[\\s*(?:,\\s*)*\\]",y=a("(?:<<0>>|<<1>>)(?:\\s*(?:\\?\\s*)?<<2>>)*(?:\\s*\\?)?",[a("\\(<<0>>+(?:,<<0>>+)+\\)",[a("[^,()<>[\\];=+\\-*/%&|^]|<<0>>|<<1>>|<<2>>",[g,b,k])]),m,k]),w={keyword:p,punctuation:/[<>()?,.:[\]]/},v="'(?:[^\r\n'\\\\]|\\\\.|\\\\[Uux][\\da-fA-F]{1,8})'",x='"(?:\\\\.|[^\\\\"\r\n])*"';s.languages.csharp=s.languages.extend("clike",{string:[{pattern:t("(^|[^$\\\\])<<0>>",['@"(?:""|\\\\[^]|[^\\\\"])*"(?!")']),lookbehind:!0,greedy:!0},{pattern:t("(^|[^@$\\\\])<<0>>",[x]),lookbehind:!0,greedy:!0},{pattern:RegExp(v),greedy:!0,alias:"character"}],"class-name":[{pattern:t("(\\busing\\s+static\\s+)<<0>>(?=\\s*;)",[m]),lookbehind:!0,inside:w},{pattern:t("(\\busing\\s+<<0>>\\s*=\\s*)<<1>>(?=\\s*;)",[h,y]),lookbehind:!0,inside:w},{pattern:t("(\\busing\\s+)<<0>>(?=\\s*=)",[h]),lookbehind:!0},{pattern:t("(\\b<<0>>\\s+)<<1>>",[d,f]),lookbehind:!0,inside:w},{pattern:t("(\\bcatch\\s*\\(\\s*)<<0>>",[m]),lookbehind:!0,inside:w},{pattern:t("(\\bwhere\\s+)<<0>>",[h]),lookbehind:!0},{pattern:t("(\\b(?:is|as)\\s+)<<0>>",[y]),lookbehind:!0,inside:w},{pattern:t("\\b<<0>>(?=\\s+(?!<<1>>)<<2>>(?:\\s*[=,;:{)\\]]|\\s+in))",[y,u,h]),inside:w}],keyword:p,number:/(?:\b0(?:x[\da-f_]*[\da-f]|b[01_]*[01])|(?:\B\.\d+(?:_+\d+)*|\b\d+(?:_+\d+)*(?:\.\d+(?:_+\d+)*)?)(?:e[-+]?\d+(?:_+\d+)*)?)(?:ul|lu|[dflmu])?\b/i,operator:/>>=?|<<=?|[-=]>|([-+&|])\1|~|\?\?=?|[-+*/%&|^!=<>]=?/,punctuation:/\?\.?|::|[{}[\];(),.:]/}),s.languages.insertBefore("csharp","number",{range:{pattern:/\.\./,alias:"operator"}}),s.languages.insertBefore("csharp","punctuation",{"named-parameter":{pattern:t("([(,]\\s*)<<0>>(?=\\s*:)",[h]),lookbehind:!0,alias:"punctuation"}}),s.languages.insertBefore("csharp","class-name",{namespace:{pattern:t("(\\b(?:namespace|using)\\s+)<<0>>(?:\\s*\\.\\s*<<0>>)*(?=\\s*[;{])",[h]),lookbehind:!0,inside:{punctuation:/\./}},"type-expression":{pattern:t("(\\b(?:default|typeof|sizeof)\\s*\\(\\s*)(?:[^()\\s]|\\s(?!\\s*\\))|<<0>>)*(?=\\s*\\))",[b]),lookbehind:!0,alias:"class-name",inside:w},"return-type":{pattern:t("<<0>>(?=\\s+(?:<<1>>\\s*(?:=>|[({]|\\.\\s*this\\s*\\[)|this\\s*\\[))",[y,m]),inside:w,alias:"class-name"},"constructor-invocation":{pattern:t("(\\bnew\\s+)<<0>>(?=\\s*[[({])",[y]),lookbehind:!0,inside:w,alias:"class-name"},"generic-method":{pattern:t("<<0>>\\s*<<1>>(?=\\s*\\()",[h,g]),inside:{function:t("^<<0>>",[h]),generic:{pattern:RegExp(g),alias:"class-name",inside:w}}},"type-list":{pattern:t("\\b((?:<<0>>\\s+<<1>>|where\\s+<<2>>)\\s*:\\s*)(?:<<3>>|<<4>>)(?:\\s*,\\s*(?:<<3>>|<<4>>))*(?=\\s*(?:where|[{;]|=>|$))",[d,f,h,y,p.source]),lookbehind:!0,inside:{keyword:p,"class-name":{pattern:RegExp(y),greedy:!0,inside:w},punctuation:/,/}},preprocessor:{pattern:/(^\s*)#.*/m,lookbehind:!0,alias:"property",inside:{directive:{pattern:/(\s*#)\b(?:define|elif|else|endif|endregion|error|if|line|pragma|region|undef|warning)\b/,lookbehind:!0,alias:"keyword"}}}});var $=x+"|"+v,_=a("/(?![*/])|//[^\r\n]*[\r\n]|/\\*(?:[^*]|\\*(?!/))*\\*/|<<0>>",[$]),B=e(a("[^\"'/()]|<<0>>|\\(<>*\\)",[_]),2),E="\\b(?:assembly|event|field|method|module|param|property|return|type)\\b",R=a("<<0>>(?:\\s*\\(<<1>>*\\))?",[m,B]);s.languages.insertBefore("csharp","class-name",{attribute:{pattern:t("((?:^|[^\\s\\w>)?])\\s*\\[\\s*)(?:<<0>>\\s*:\\s*)?<<1>>(?:\\s*,\\s*<<1>>)*(?=\\s*\\])",[E,R]),lookbehind:!0,greedy:!0,inside:{target:{pattern:t("^<<0>>(?=\\s*:)",[E]),alias:"keyword"},"attribute-arguments":{pattern:t("\\(<<0>>*\\)",[B]),inside:s.languages.csharp},"class-name":{pattern:RegExp(m),inside:{punctuation:/\./}},punctuation:/[:,]/}}});var P=":[^}\r\n]+",z=e(a("[^\"'/()]|<<0>>|\\(<>*\\)",[_]),2),S=a("\\{(?!\\{)(?:(?![}:])<<0>>)*<<1>>?\\}",[z,P]),j=e(a("[^\"'/()]|/(?!\\*)|/\\*(?:[^*]|\\*(?!/))*\\*/|<<0>>|\\(<>*\\)",[$]),2),A=a("\\{(?!\\{)(?:(?![}:])<<0>>)*<<1>>?\\}",[j,P]);function F(e,n){return{interpolation:{pattern:t("([^{](?:\\{\\{)*)<<0>>",[e]),lookbehind:!0,inside:{"format-string":{pattern:t("(^\\{(?:(?![}:])<<0>>)*)<<1>>(?=\\}$)",[n,P]),lookbehind:!0,inside:{punctuation:/^:/}},punctuation:/^\{|\}$/,expression:{pattern:/[\s\S]+/,alias:"language-csharp",inside:s.languages.csharp}}},string:/[\s\S]+/}}s.languages.insertBefore("csharp","string",{"interpolation-string":[{pattern:t('(^|[^\\\\])(?:\\$@|@\\$)"(?:""|\\\\[^]|\\{\\{|<<0>>|[^\\\\{"])*"',[S]),lookbehind:!0,greedy:!0,inside:F(S,z)},{pattern:t('(^|[^@\\\\])\\$"(?:\\\\.|\\{\\{|<<0>>|[^\\\\"{])*"',[A]),lookbehind:!0,greedy:!0,inside:F(A,j)}]})}(Prism),Prism.languages.dotnet=Prism.languages.cs=Prism.languages.csharp; \ No newline at end of file diff --git a/components/prism-d.js b/components/prism-d.js index 898a1e296e..53a3f9086c 100644 --- a/components/prism-d.js +++ b/components/prism-d.js @@ -9,7 +9,7 @@ Prism.languages.d = Prism.languages.extend('clike', { pattern: RegExp(/(^|[^\\])/.source + '(?:' + [ // /+ comment +/ // Allow one level of nesting - /\/\+(?:\/\+[\s\S]*?\+\/|(?!\/\+)[\s\S])*?\+\//.source, + /\/\+(?:\/\+(?:[^+]|\+(?!\/))*\+\/|(?!\/\+)[\s\S])*?\+\//.source, // // comment /\/\/.*/.source, // /* comment */ diff --git a/components/prism-d.min.js b/components/prism-d.min.js index 8732878db6..1b98c6debb 100644 --- a/components/prism-d.min.js +++ b/components/prism-d.min.js @@ -1 +1 @@ -Prism.languages.d=Prism.languages.extend("clike",{comment:[{pattern:/^\s*#!.+/,greedy:!0},{pattern:RegExp("(^|[^\\\\])(?:"+["/\\+(?:/\\+[^]*?\\+/|(?!/\\+)[^])*?\\+/","//.*","/\\*[^]*?\\*/"].join("|")+")"),lookbehind:!0,greedy:!0}],string:[{pattern:RegExp(['\\b[rx]"(?:\\\\[^]|[^\\\\"])*"[cwd]?','\\bq"(?:\\[[^]*?\\]|\\([^]*?\\)|<[^]*?>|\\{[^]*?\\})"','\\bq"((?!\\d)\\w+)$[^]*?^\\1"','\\bq"(.)[^]*?\\2"',"'(?:\\\\(?:\\W|\\w+)|[^\\\\])'",'(["`])(?:\\\\[^]|(?!\\3)[^\\\\])*\\3[cwd]?'].join("|"),"m"),greedy:!0},{pattern:/\bq\{(?:\{[^{}]*\}|[^{}])*\}/,greedy:!0,alias:"token-string"}],number:[/\b0x\.?[a-f\d_]+(?:(?!\.\.)\.[a-f\d_]*)?(?:p[+-]?[a-f\d_]+)?[ulfi]*/i,{pattern:/((?:\.\.)?)(?:\b0b\.?|\b|\.)\d[\d_]*(?:(?!\.\.)\.[\d_]*)?(?:e[+-]?\d[\d_]*)?[ulfi]*/i,lookbehind:!0}],keyword:/\$|\b(?:abstract|alias|align|asm|assert|auto|body|bool|break|byte|case|cast|catch|cdouble|cent|cfloat|char|class|const|continue|creal|dchar|debug|default|delegate|delete|deprecated|do|double|else|enum|export|extern|false|final|finally|float|for|foreach|foreach_reverse|function|goto|idouble|if|ifloat|immutable|import|inout|int|interface|invariant|ireal|lazy|long|macro|mixin|module|new|nothrow|null|out|override|package|pragma|private|protected|public|pure|real|ref|return|scope|shared|short|static|struct|super|switch|synchronized|template|this|throw|true|try|typedef|typeid|typeof|ubyte|ucent|uint|ulong|union|unittest|ushort|version|void|volatile|wchar|while|with|__(?:(?:FILE|MODULE|LINE|FUNCTION|PRETTY_FUNCTION|DATE|EOF|TIME|TIMESTAMP|VENDOR|VERSION)__|gshared|traits|vector|parameters)|string|wstring|dstring|size_t|ptrdiff_t)\b/,operator:/\|[|=]?|&[&=]?|\+[+=]?|-[-=]?|\.?\.\.|=[>=]?|!(?:i[ns]\b|<>?=?|>=?|=)?|\bi[ns]\b|(?:<[<>]?|>>?>?|\^\^|[*\/%^~])=?/}),Prism.languages.insertBefore("d","keyword",{property:/\B@\w*/}),Prism.languages.insertBefore("d","function",{register:{pattern:/\b(?:[ABCD][LHX]|E[ABCD]X|E?(?:BP|SP|DI|SI)|[ECSDGF]S|CR[0234]|DR[012367]|TR[3-7]|X?MM[0-7]|R[ABCD]X|[BS]PL|R[BS]P|[DS]IL|R[DS]I|R(?:[89]|1[0-5])[BWD]?|XMM(?:[89]|1[0-5])|YMM(?:1[0-5]|\d))\b|\bST(?:\([0-7]\)|\b)/,alias:"variable"}}); \ No newline at end of file +Prism.languages.d=Prism.languages.extend("clike",{comment:[{pattern:/^\s*#!.+/,greedy:!0},{pattern:RegExp("(^|[^\\\\])(?:"+["/\\+(?:/\\+(?:[^+]|\\+(?!/))*\\+/|(?!/\\+)[^])*?\\+/","//.*","/\\*[^]*?\\*/"].join("|")+")"),lookbehind:!0,greedy:!0}],string:[{pattern:RegExp(['\\b[rx]"(?:\\\\[^]|[^\\\\"])*"[cwd]?','\\bq"(?:\\[[^]*?\\]|\\([^]*?\\)|<[^]*?>|\\{[^]*?\\})"','\\bq"((?!\\d)\\w+)$[^]*?^\\1"','\\bq"(.)[^]*?\\2"',"'(?:\\\\(?:\\W|\\w+)|[^\\\\])'",'(["`])(?:\\\\[^]|(?!\\3)[^\\\\])*\\3[cwd]?'].join("|"),"m"),greedy:!0},{pattern:/\bq\{(?:\{[^{}]*\}|[^{}])*\}/,greedy:!0,alias:"token-string"}],number:[/\b0x\.?[a-f\d_]+(?:(?!\.\.)\.[a-f\d_]*)?(?:p[+-]?[a-f\d_]+)?[ulfi]*/i,{pattern:/((?:\.\.)?)(?:\b0b\.?|\b|\.)\d[\d_]*(?:(?!\.\.)\.[\d_]*)?(?:e[+-]?\d[\d_]*)?[ulfi]*/i,lookbehind:!0}],keyword:/\$|\b(?:abstract|alias|align|asm|assert|auto|body|bool|break|byte|case|cast|catch|cdouble|cent|cfloat|char|class|const|continue|creal|dchar|debug|default|delegate|delete|deprecated|do|double|else|enum|export|extern|false|final|finally|float|for|foreach|foreach_reverse|function|goto|idouble|if|ifloat|immutable|import|inout|int|interface|invariant|ireal|lazy|long|macro|mixin|module|new|nothrow|null|out|override|package|pragma|private|protected|public|pure|real|ref|return|scope|shared|short|static|struct|super|switch|synchronized|template|this|throw|true|try|typedef|typeid|typeof|ubyte|ucent|uint|ulong|union|unittest|ushort|version|void|volatile|wchar|while|with|__(?:(?:FILE|MODULE|LINE|FUNCTION|PRETTY_FUNCTION|DATE|EOF|TIME|TIMESTAMP|VENDOR|VERSION)__|gshared|traits|vector|parameters)|string|wstring|dstring|size_t|ptrdiff_t)\b/,operator:/\|[|=]?|&[&=]?|\+[+=]?|-[-=]?|\.?\.\.|=[>=]?|!(?:i[ns]\b|<>?=?|>=?|=)?|\bi[ns]\b|(?:<[<>]?|>>?>?|\^\^|[*\/%^~])=?/}),Prism.languages.insertBefore("d","keyword",{property:/\B@\w*/}),Prism.languages.insertBefore("d","function",{register:{pattern:/\b(?:[ABCD][LHX]|E[ABCD]X|E?(?:BP|SP|DI|SI)|[ECSDGF]S|CR[0234]|DR[012367]|TR[3-7]|X?MM[0-7]|R[ABCD]X|[BS]PL|R[BS]P|[DS]IL|R[DS]I|R(?:[89]|1[0-5])[BWD]?|XMM(?:[89]|1[0-5])|YMM(?:1[0-5]|\d))\b|\bST(?:\([0-7]\)|\b)/,alias:"variable"}}); \ No newline at end of file diff --git a/components/prism-eiffel.js b/components/prism-eiffel.js index 82dddfa75f..450d29a8ba 100644 --- a/components/prism-eiffel.js +++ b/components/prism-eiffel.js @@ -13,7 +13,7 @@ Prism.languages.eiffel = { }, // Single-line string { - pattern: /"(?:%\s+%|%.|[^%"\r\n])*"/, + pattern: /"(?:%\s*\n\s*%|%.|[^%"\r\n])*"/, greedy: true } ], diff --git a/components/prism-eiffel.min.js b/components/prism-eiffel.min.js index d33cb16362..1dbd42c7af 100644 --- a/components/prism-eiffel.min.js +++ b/components/prism-eiffel.min.js @@ -1 +1 @@ -Prism.languages.eiffel={comment:/--.*/,string:[{pattern:/"([^[]*)\[[\s\S]*?\]\1"/,greedy:!0},{pattern:/"([^{]*)\{[\s\S]*?\}\1"/,greedy:!0},{pattern:/"(?:%\s+%|%.|[^%"\r\n])*"/,greedy:!0}],char:/'(?:%.|[^%'\r\n])+'/,keyword:/\b(?:across|agent|alias|all|and|attached|as|assign|attribute|check|class|convert|create|Current|debug|deferred|detachable|do|else|elseif|end|ensure|expanded|export|external|feature|from|frozen|if|implies|inherit|inspect|invariant|like|local|loop|not|note|obsolete|old|once|or|Precursor|redefine|rename|require|rescue|Result|retry|select|separate|some|then|undefine|until|variant|Void|when|xor)\b/i,boolean:/\b(?:True|False)\b/i,"class-name":{pattern:/\b[A-Z][\dA-Z_]*\b/,alias:"builtin"},number:[/\b0[xcb][\da-f](?:_*[\da-f])*\b/i,/(?:\d(?:_*\d)*)?\.(?:(?:\d(?:_*\d)*)?e[+-]?)?\d(?:_*\d)*|\d(?:_*\d)*\.?/i],punctuation:/:=|<<|>>|\(\||\|\)|->|\.(?=\w)|[{}[\];(),:?]/,operator:/\\\\|\|\.\.\||\.\.|\/[~\/=]?|[><]=?|[-+*^=~]/}; \ No newline at end of file +Prism.languages.eiffel={comment:/--.*/,string:[{pattern:/"([^[]*)\[[\s\S]*?\]\1"/,greedy:!0},{pattern:/"([^{]*)\{[\s\S]*?\}\1"/,greedy:!0},{pattern:/"(?:%\s*\n\s*%|%.|[^%"\r\n])*"/,greedy:!0}],char:/'(?:%.|[^%'\r\n])+'/,keyword:/\b(?:across|agent|alias|all|and|attached|as|assign|attribute|check|class|convert|create|Current|debug|deferred|detachable|do|else|elseif|end|ensure|expanded|export|external|feature|from|frozen|if|implies|inherit|inspect|invariant|like|local|loop|not|note|obsolete|old|once|or|Precursor|redefine|rename|require|rescue|Result|retry|select|separate|some|then|undefine|until|variant|Void|when|xor)\b/i,boolean:/\b(?:True|False)\b/i,"class-name":{pattern:/\b[A-Z][\dA-Z_]*\b/,alias:"builtin"},number:[/\b0[xcb][\da-f](?:_*[\da-f])*\b/i,/(?:\d(?:_*\d)*)?\.(?:(?:\d(?:_*\d)*)?e[+-]?)?\d(?:_*\d)*|\d(?:_*\d)*\.?/i],punctuation:/:=|<<|>>|\(\||\|\)|->|\.(?=\w)|[{}[\];(),:?]/,operator:/\\\\|\|\.\.\||\.\.|\/[~\/=]?|[><]=?|[-+*^=~]/}; \ No newline at end of file diff --git a/components/prism-elixir.js b/components/prism-elixir.js index c96dd4c4fa..793323c4ea 100644 --- a/components/prism-elixir.js +++ b/components/prism-elixir.js @@ -8,7 +8,7 @@ Prism.languages.elixir = { 'string': [ { // ~s"""foo""" (multi-line), ~s'''foo''' (multi-line), ~s/foo/, ~s|foo|, ~s"foo", ~s'foo', ~s(foo), ~s[foo], ~s{foo} (with interpolation care), ~s - pattern: /~[cCsSwW](?:("""|''')(?:\\[\s\S]|(?!\1)[^\\])+\1|([\/|"'])(?:\\.|(?!\2)[^\\\r\n])+\2|\((?:\\.|[^\\)\r\n])+\)|\[(?:\\.|[^\\\]\r\n])+\]|\{(?:\\.|#\{[^}]+\}|[^\\}\r\n])+\}|<(?:\\.|[^\\>\r\n])+>)[csa]?/, + pattern: /~[cCsSwW](?:("""|''')(?:\\[\s\S]|(?!\1)[^\\])+\1|([\/|"'])(?:\\.|(?!\2)[^\\\r\n])+\2|\((?:\\.|[^\\)\r\n])+\)|\[(?:\\.|[^\\\]\r\n])+\]|\{(?:\\.|#\{[^}]+\}|#(?!\{)|[^#\\}\r\n])+\}|<(?:\\.|[^\\>\r\n])+>)[csa]?/, greedy: true, inside: { // See interpolation below diff --git a/components/prism-elixir.min.js b/components/prism-elixir.min.js index 25fd99f0dc..8882992d31 100644 --- a/components/prism-elixir.min.js +++ b/components/prism-elixir.min.js @@ -1 +1 @@ -Prism.languages.elixir={comment:/#.*/m,regex:{pattern:/~[rR](?:("""|''')(?:\\[\s\S]|(?!\1)[^\\])+\1|([\/|"'])(?:\\.|(?!\2)[^\\\r\n])+\2|\((?:\\.|[^\\)\r\n])+\)|\[(?:\\.|[^\\\]\r\n])+\]|\{(?:\\.|[^\\}\r\n])+\}|<(?:\\.|[^\\>\r\n])+>)[uismxfr]*/,greedy:!0},string:[{pattern:/~[cCsSwW](?:("""|''')(?:\\[\s\S]|(?!\1)[^\\])+\1|([\/|"'])(?:\\.|(?!\2)[^\\\r\n])+\2|\((?:\\.|[^\\)\r\n])+\)|\[(?:\\.|[^\\\]\r\n])+\]|\{(?:\\.|#\{[^}]+\}|[^\\}\r\n])+\}|<(?:\\.|[^\\>\r\n])+>)[csa]?/,greedy:!0,inside:{}},{pattern:/("""|''')[\s\S]*?\1/,greedy:!0,inside:{}},{pattern:/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0,inside:{}}],atom:{pattern:/(^|[^:]):\w+/,lookbehind:!0,alias:"symbol"},"attr-name":/\w+\??:(?!:)/,capture:{pattern:/(^|[^&])&(?:[^&\s\d()][^\s()]*|(?=\())/,lookbehind:!0,alias:"function"},argument:{pattern:/(^|[^&])&\d+/,lookbehind:!0,alias:"variable"},attribute:{pattern:/@\w+/,alias:"variable"},number:/\b(?:0[box][a-f\d_]+|\d[\d_]*)(?:\.[\d_]+)?(?:e[+-]?[\d_]+)?\b/i,keyword:/\b(?:after|alias|and|case|catch|cond|def(?:callback|exception|impl|module|p|protocol|struct)?|do|else|end|fn|for|if|import|not|or|require|rescue|try|unless|use|when)\b/,boolean:/\b(?:true|false|nil)\b/,operator:[/\bin\b|&&?|\|[|>]?|\\\\|::|\.\.\.?|\+\+?|-[->]?|<[-=>]|>=|!==?|\B!|=(?:==?|[>~])?|[*\/^]/,{pattern:/([^<])<(?!<)/,lookbehind:!0},{pattern:/([^>])>(?!>)/,lookbehind:!0}],punctuation:/<<|>>|[.,%\[\]{}()]/},Prism.languages.elixir.string.forEach(function(e){e.inside={interpolation:{pattern:/#\{[^}]+\}/,inside:{delimiter:{pattern:/^#\{|\}$/,alias:"punctuation"},rest:Prism.languages.elixir}}}}); \ No newline at end of file +Prism.languages.elixir={comment:/#.*/m,regex:{pattern:/~[rR](?:("""|''')(?:\\[\s\S]|(?!\1)[^\\])+\1|([\/|"'])(?:\\.|(?!\2)[^\\\r\n])+\2|\((?:\\.|[^\\)\r\n])+\)|\[(?:\\.|[^\\\]\r\n])+\]|\{(?:\\.|[^\\}\r\n])+\}|<(?:\\.|[^\\>\r\n])+>)[uismxfr]*/,greedy:!0},string:[{pattern:/~[cCsSwW](?:("""|''')(?:\\[\s\S]|(?!\1)[^\\])+\1|([\/|"'])(?:\\.|(?!\2)[^\\\r\n])+\2|\((?:\\.|[^\\)\r\n])+\)|\[(?:\\.|[^\\\]\r\n])+\]|\{(?:\\.|#\{[^}]+\}|#(?!\{)|[^#\\}\r\n])+\}|<(?:\\.|[^\\>\r\n])+>)[csa]?/,greedy:!0,inside:{}},{pattern:/("""|''')[\s\S]*?\1/,greedy:!0,inside:{}},{pattern:/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0,inside:{}}],atom:{pattern:/(^|[^:]):\w+/,lookbehind:!0,alias:"symbol"},"attr-name":/\w+\??:(?!:)/,capture:{pattern:/(^|[^&])&(?:[^&\s\d()][^\s()]*|(?=\())/,lookbehind:!0,alias:"function"},argument:{pattern:/(^|[^&])&\d+/,lookbehind:!0,alias:"variable"},attribute:{pattern:/@\w+/,alias:"variable"},number:/\b(?:0[box][a-f\d_]+|\d[\d_]*)(?:\.[\d_]+)?(?:e[+-]?[\d_]+)?\b/i,keyword:/\b(?:after|alias|and|case|catch|cond|def(?:callback|exception|impl|module|p|protocol|struct)?|do|else|end|fn|for|if|import|not|or|require|rescue|try|unless|use|when)\b/,boolean:/\b(?:true|false|nil)\b/,operator:[/\bin\b|&&?|\|[|>]?|\\\\|::|\.\.\.?|\+\+?|-[->]?|<[-=>]|>=|!==?|\B!|=(?:==?|[>~])?|[*\/^]/,{pattern:/([^<])<(?!<)/,lookbehind:!0},{pattern:/([^>])>(?!>)/,lookbehind:!0}],punctuation:/<<|>>|[.,%\[\]{}()]/},Prism.languages.elixir.string.forEach(function(e){e.inside={interpolation:{pattern:/#\{[^}]+\}/,inside:{delimiter:{pattern:/^#\{|\}$/,alias:"punctuation"},rest:Prism.languages.elixir}}}}); \ No newline at end of file diff --git a/components/prism-ftl.js b/components/prism-ftl.js index 90958f1f09..85c039f727 100644 --- a/components/prism-ftl.js +++ b/components/prism-ftl.js @@ -3,11 +3,11 @@ // https://freemarker.apache.org/docs/dgui_template_exp.html // FTL expression with 4 levels of nesting supported - var FTL_EXPR = /(?!<#--)[^()"']|\((?:)*\)|<#--[\s\S]*?-->|"(?:[^\\"]|\\.)*"|'(?:[^\\']|\\.)*'/.source; + var FTL_EXPR = /[^<()"']|\((?:)*\)|<(?!#--)|<#--(?:[^-]|-(?!->))*-->|"(?:[^\\"]|\\.)*"|'(?:[^\\']|\\.)*'/.source; for (var i = 0; i < 2; i++) { FTL_EXPR = FTL_EXPR.replace(//g, function () { return FTL_EXPR; }); } - FTL_EXPR = FTL_EXPR.replace(//g, '[^\s\S]'); + FTL_EXPR = FTL_EXPR.replace(//g, /[^\s\S]/.source); var ftl = { 'comment': /<#--[\s\S]*?-->/, diff --git a/components/prism-ftl.min.js b/components/prism-ftl.min.js index 5b99ac5be3..8918cb7d84 100644 --- a/components/prism-ftl.min.js +++ b/components/prism-ftl.min.js @@ -1 +1 @@ -!function(n){for(var i="(?!<#--)[^()\"']|\\((?:)*\\)|<#--[^]*?--\x3e|\"(?:[^\\\\\"]|\\\\.)*\"|'(?:[^\\\\']|\\\\.)*'",e=0;e<2;e++)i=i.replace(//g,function(){return i});i=i.replace(//g,"[^sS]");var t={comment:/<#--[\s\S]*?-->/,string:[{pattern:/\br("|')(?:(?!\1)[^\\]|\\.)*\1/,greedy:!0},{pattern:RegExp("(\"|')(?:(?!\\1|\\$\\{)[^\\\\]|\\\\.|\\$\\{(?:)*?\\})*\\1".replace(//g,function(){return i})),greedy:!0,inside:{interpolation:{pattern:RegExp("((?:^|[^\\\\])(?:\\\\\\\\)*)\\$\\{(?:)*?\\}".replace(//g,function(){return i})),lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:null}}}}],keyword:/\b(?:as)\b/,boolean:/\b(?:true|false)\b/,"builtin-function":{pattern:/((?:^|[^?])\?\s*)\w+/,lookbehind:!0,alias:"function"},function:/\w+(?=\s*\()/,number:/\d+(?:\.\d+)?/,operator:/\.\.[<*!]?|->|--|\+\+|&&|\|\||\?{1,2}|[-+*/%!=<>]=?|\b(?:gt|gte|lt|lte)\b/,punctuation:/[,;.:()[\]{}]/};t.string[1].inside.interpolation.inside.rest=t,n.languages.ftl={"ftl-comment":{pattern:/^<#--[\s\S]*/,alias:"comment"},"ftl-directive":{pattern:/^<[\s\S]+>$/,inside:{directive:{pattern:/(^<\/?)[#@][a-z]\w*/i,lookbehind:!0,alias:"keyword"},punctuation:/^<\/?|\/?>$/,content:{pattern:/[\s\S]*\S[\s\S]*/,alias:"ftl",inside:t}}},"ftl-interpolation":{pattern:/^\$\{[\s\S]*\}$/,inside:{punctuation:/^\$\{|\}$/,content:{pattern:/[\s\S]*\S[\s\S]*/,alias:"ftl",inside:t}}}},n.hooks.add("before-tokenize",function(e){var t=RegExp("<#--[^]*?--\x3e|)*?>|\\$\\{(?:)*?\\}".replace(//g,function(){return i}),"gi");n.languages["markup-templating"].buildPlaceholders(e,"ftl",t)}),n.hooks.add("after-tokenize",function(e){n.languages["markup-templating"].tokenizePlaceholders(e,"ftl")})}(Prism); \ No newline at end of file +!function(n){for(var i="[^<()\"']|\\((?:)*\\)|<(?!#--)|<#--(?:[^-]|-(?!->))*--\x3e|\"(?:[^\\\\\"]|\\\\.)*\"|'(?:[^\\\\']|\\\\.)*'",e=0;e<2;e++)i=i.replace(//g,function(){return i});i=i.replace(//g,"[^\\s\\S]");var t={comment:/<#--[\s\S]*?-->/,string:[{pattern:/\br("|')(?:(?!\1)[^\\]|\\.)*\1/,greedy:!0},{pattern:RegExp("(\"|')(?:(?!\\1|\\$\\{)[^\\\\]|\\\\.|\\$\\{(?:)*?\\})*\\1".replace(//g,function(){return i})),greedy:!0,inside:{interpolation:{pattern:RegExp("((?:^|[^\\\\])(?:\\\\\\\\)*)\\$\\{(?:)*?\\}".replace(//g,function(){return i})),lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:null}}}}],keyword:/\b(?:as)\b/,boolean:/\b(?:true|false)\b/,"builtin-function":{pattern:/((?:^|[^?])\?\s*)\w+/,lookbehind:!0,alias:"function"},function:/\w+(?=\s*\()/,number:/\d+(?:\.\d+)?/,operator:/\.\.[<*!]?|->|--|\+\+|&&|\|\||\?{1,2}|[-+*/%!=<>]=?|\b(?:gt|gte|lt|lte)\b/,punctuation:/[,;.:()[\]{}]/};t.string[1].inside.interpolation.inside.rest=t,n.languages.ftl={"ftl-comment":{pattern:/^<#--[\s\S]*/,alias:"comment"},"ftl-directive":{pattern:/^<[\s\S]+>$/,inside:{directive:{pattern:/(^<\/?)[#@][a-z]\w*/i,lookbehind:!0,alias:"keyword"},punctuation:/^<\/?|\/?>$/,content:{pattern:/[\s\S]*\S[\s\S]*/,alias:"ftl",inside:t}}},"ftl-interpolation":{pattern:/^\$\{[\s\S]*\}$/,inside:{punctuation:/^\$\{|\}$/,content:{pattern:/[\s\S]*\S[\s\S]*/,alias:"ftl",inside:t}}}},n.hooks.add("before-tokenize",function(e){var t=RegExp("<#--[^]*?--\x3e|)*?>|\\$\\{(?:)*?\\}".replace(//g,function(){return i}),"gi");n.languages["markup-templating"].buildPlaceholders(e,"ftl",t)}),n.hooks.add("after-tokenize",function(e){n.languages["markup-templating"].tokenizePlaceholders(e,"ftl")})}(Prism); \ No newline at end of file diff --git a/components/prism-groovy.js b/components/prism-groovy.js index cb5e05c159..cd0bd2a551 100644 --- a/components/prism-groovy.js +++ b/components/prism-groovy.js @@ -1,7 +1,8 @@ Prism.languages.groovy = Prism.languages.extend('clike', { 'string': [ { - pattern: /("""|''')(?:[^\\]|\\[\s\S])*?\1|\$\/(?:\$\/\$|[\s\S])*?\/\$/, + // https://groovy-lang.org/syntax.html#_dollar_slashy_string + pattern: /("""|''')(?:[^\\]|\\[\s\S])*?\1|\$\/(?:[^/$]|\$(?:[/$]|(?![/$]))|\/(?!\$))*\/\$/, greedy: true }, { diff --git a/components/prism-groovy.min.js b/components/prism-groovy.min.js index fbe2ac1920..726bcb6eb1 100644 --- a/components/prism-groovy.min.js +++ b/components/prism-groovy.min.js @@ -1 +1 @@ -Prism.languages.groovy=Prism.languages.extend("clike",{string:[{pattern:/("""|''')(?:[^\\]|\\[\s\S])*?\1|\$\/(?:\$\/\$|[\s\S])*?\/\$/,greedy:!0},{pattern:/(["'/])(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0}],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/,number:/\b(?:0b[01_]+|0x[\da-f_]+(?:\.[\da-f_p\-]+)?|[\d_]+(?:\.[\d_]+)?(?:e[+-]?[\d]+)?)[glidf]?\b/i,operator:{pattern:/(^|[^.])(?:~|==?~?|\?[.:]?|\*(?:[.=]|\*=?)?|\.[@&]|\.\.<|\.\.(?!\.)|-[-=>]?|\+[+=]?|!=?|<(?:<=?|=>?)?|>(?:>>?=?|=)?|&[&=]?|\|[|=]?|\/=?|\^=?|%=?)/,lookbehind:!0},punctuation:/\.+|[{}[\];(),.:$]/}),Prism.languages.insertBefore("groovy","string",{shebang:{pattern:/#!.+/,alias:"comment"}}),Prism.languages.insertBefore("groovy","punctuation",{"spock-block":/\b(?:setup|given|when|then|and|cleanup|expect|where):/}),Prism.languages.insertBefore("groovy","function",{annotation:{pattern:/(^|[^.])@\w+/,lookbehind:!0,alias:"punctuation"}}),Prism.hooks.add("wrap",function(e){if("groovy"===e.language&&"string"===e.type){var t=e.content[0];if("'"!=t){var n=/([^\\])(?:\$(?:\{.*?\}|[\w.]+))/;"$"===t&&(n=/([^\$])(?:\$(?:\{.*?\}|[\w.]+))/),e.content=e.content.replace(/</g,"<").replace(/&/g,"&"),e.content=Prism.highlight(e.content,{expression:{pattern:n,lookbehind:!0,inside:Prism.languages.groovy}}),e.classes.push("/"===t?"regex":"gstring")}}}); \ No newline at end of file +Prism.languages.groovy=Prism.languages.extend("clike",{string:[{pattern:/("""|''')(?:[^\\]|\\[\s\S])*?\1|\$\/(?:[^/$]|\$(?:[/$]|(?![/$]))|\/(?!\$))*\/\$/,greedy:!0},{pattern:/(["'/])(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0}],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/,number:/\b(?:0b[01_]+|0x[\da-f_]+(?:\.[\da-f_p\-]+)?|[\d_]+(?:\.[\d_]+)?(?:e[+-]?[\d]+)?)[glidf]?\b/i,operator:{pattern:/(^|[^.])(?:~|==?~?|\?[.:]?|\*(?:[.=]|\*=?)?|\.[@&]|\.\.<|\.\.(?!\.)|-[-=>]?|\+[+=]?|!=?|<(?:<=?|=>?)?|>(?:>>?=?|=)?|&[&=]?|\|[|=]?|\/=?|\^=?|%=?)/,lookbehind:!0},punctuation:/\.+|[{}[\];(),.:$]/}),Prism.languages.insertBefore("groovy","string",{shebang:{pattern:/#!.+/,alias:"comment"}}),Prism.languages.insertBefore("groovy","punctuation",{"spock-block":/\b(?:setup|given|when|then|and|cleanup|expect|where):/}),Prism.languages.insertBefore("groovy","function",{annotation:{pattern:/(^|[^.])@\w+/,lookbehind:!0,alias:"punctuation"}}),Prism.hooks.add("wrap",function(e){if("groovy"===e.language&&"string"===e.type){var t=e.content[0];if("'"!=t){var n=/([^\\])(?:\$(?:\{.*?\}|[\w.]+))/;"$"===t&&(n=/([^\$])(?:\$(?:\{.*?\}|[\w.]+))/),e.content=e.content.replace(/</g,"<").replace(/&/g,"&"),e.content=Prism.highlight(e.content,{expression:{pattern:n,lookbehind:!0,inside:Prism.languages.groovy}}),e.classes.push("/"===t?"regex":"gstring")}}}); \ No newline at end of file diff --git a/components/prism-javascript.js b/components/prism-javascript.js index f50e9e5570..19c371cce8 100644 --- a/components/prism-javascript.js +++ b/components/prism-javascript.js @@ -26,7 +26,7 @@ Prism.languages.javascript['class-name'][0].pattern = /(\b(?:class|interface|ext Prism.languages.insertBefore('javascript', 'keyword', { 'regex': { - pattern: /((?:^|[^$\w\xA0-\uFFFF."'\])\s])\s*)\/(?:\[(?:[^\]\\\r\n]|\\.)*]|\\.|[^/\\\[\r\n])+\/[gimyus]{0,6}(?=(?:\s|\/\*[\s\S]*?\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/, + pattern: /((?:^|[^$\w\xA0-\uFFFF."'\])\s])\s*)\/(?:\[(?:[^\]\\\r\n]|\\.)*]|\\.|[^/\\\[\r\n])+\/[gimyus]{0,6}(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/, lookbehind: true, greedy: true }, diff --git a/components/prism-javascript.min.js b/components/prism-javascript.min.js index a38f54f91b..b96f317f32 100644 --- a/components/prism-javascript.min.js +++ b/components/prism-javascript.min.js @@ -1 +1 @@ -Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])[_$A-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\.(?:prototype|constructor))/,lookbehind:!0}],keyword:[{pattern:/((?:^|})\s*)(?:catch|finally)\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],number:/\b(?:(?:0[xX](?:[\dA-Fa-f](?:_[\dA-Fa-f])?)+|0[bB](?:[01](?:_[01])?)+|0[oO](?:[0-7](?:_[0-7])?)+)n?|(?:\d(?:_\d)?)+n|NaN|Infinity)\b|(?:\b(?:\d(?:_\d)?)+\.?(?:\d(?:_\d)?)*|\B\.(?:\d(?:_\d)?)+)(?:[Ee][+-]?(?:\d(?:_\d)?)+)?/,function:/#?[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,operator:/--|\+\+|\*\*=?|=>|&&|\|\||[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?[.?]?|[~:]/}),Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/,Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s])\s*)\/(?:\[(?:[^\]\\\r\n]|\\.)*]|\\.|[^/\\\[\r\n])+\/[gimyus]{0,6}(?=(?:\s|\/\*[\s\S]*?\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/,lookbehind:!0,greedy:!0},"function-variable":{pattern:/#?[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)?\s*\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*=>)/i,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*\s*)\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),Prism.languages.insertBefore("javascript","string",{"template-string":{pattern:/`(?:\\[\s\S]|\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}|(?!\${)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\${|}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}}}),Prism.languages.markup&&Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.js=Prism.languages.javascript; \ No newline at end of file +Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])[_$A-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\.(?:prototype|constructor))/,lookbehind:!0}],keyword:[{pattern:/((?:^|})\s*)(?:catch|finally)\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],number:/\b(?:(?:0[xX](?:[\dA-Fa-f](?:_[\dA-Fa-f])?)+|0[bB](?:[01](?:_[01])?)+|0[oO](?:[0-7](?:_[0-7])?)+)n?|(?:\d(?:_\d)?)+n|NaN|Infinity)\b|(?:\b(?:\d(?:_\d)?)+\.?(?:\d(?:_\d)?)*|\B\.(?:\d(?:_\d)?)+)(?:[Ee][+-]?(?:\d(?:_\d)?)+)?/,function:/#?[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,operator:/--|\+\+|\*\*=?|=>|&&|\|\||[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?[.?]?|[~:]/}),Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/,Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s])\s*)\/(?:\[(?:[^\]\\\r\n]|\\.)*]|\\.|[^/\\\[\r\n])+\/[gimyus]{0,6}(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/,lookbehind:!0,greedy:!0},"function-variable":{pattern:/#?[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)?\s*\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*=>)/i,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*\s*)\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),Prism.languages.insertBefore("javascript","string",{"template-string":{pattern:/`(?:\\[\s\S]|\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}|(?!\${)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\${|}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}}}),Prism.languages.markup&&Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.js=Prism.languages.javascript; \ No newline at end of file diff --git a/components/prism-jsx.js b/components/prism-jsx.js index b8307f539d..30e6e3f4c6 100644 --- a/components/prism-jsx.js +++ b/components/prism-jsx.js @@ -3,7 +3,7 @@ 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.:$-]+(?:=(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s{'">=]+|\{(?:\{(?:\{[^}]*\}|[^{}])*\}|[^{}])+\}))?|\{\s*\.{3}\s*[a-z_$][\w$]*(?:\.[a-z_$][\w$]*)*\s*\}))*\s*\/?)?>/i; +Prism.languages.jsx.tag.pattern= /<\/?(?:[\w.:-]+\s*(?:\s+(?:[\w.:$-]+(?:=(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s{'">=]+|\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])+\}))?|\{\s*\.{3}\s*[a-z_$][\w$]*(?:\.[a-z_$][\w$]*)*\s*\}))*\s*\/?)?>/i; Prism.languages.jsx.tag.inside['tag'].pattern = /^<\/?[^\s>\/]*/i; Prism.languages.jsx.tag.inside['attr-value'].pattern = /=(?!\{)(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s'">]+)/i; @@ -22,7 +22,7 @@ Prism.languages.insertBefore('inside', 'attr-name', { Prism.languages.insertBefore('inside', 'attr-value',{ 'script': { // Allow for two levels of nesting - pattern: /=(?:\{(?:\{(?:\{[^}]*\}|[^}])*\}|[^}])+\})/i, + pattern: /=(?:\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])+\})/i, inside: { 'script-punctuation': { pattern: /^=(?={)/, diff --git a/components/prism-jsx.min.js b/components/prism-jsx.min.js index 39aa611d66..81390211bc 100644 --- a/components/prism-jsx.min.js +++ b/components/prism-jsx.min.js @@ -1 +1 @@ -!function(i){var t=i.util.clone(i.languages.javascript);i.languages.jsx=i.languages.extend("markup",t),i.languages.jsx.tag.pattern=/<\/?(?:[\w.:-]+\s*(?:\s+(?:[\w.:$-]+(?:=(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s{'">=]+|\{(?:\{(?:\{[^}]*\}|[^{}])*\}|[^{}])+\}))?|\{\s*\.{3}\s*[a-z_$][\w$]*(?:\.[a-z_$][\w$]*)*\s*\}))*\s*\/?)?>/i,i.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/i,i.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s'">]+)/i,i.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,i.languages.insertBefore("inside","attr-name",{spread:{pattern:/\{\s*\.{3}\s*[a-z_$][\w$]*(?:\.[a-z_$][\w$]*)*\s*\}/,inside:{punctuation:/\.{3}|[{}.]/,"attr-value":/\w+/}}},i.languages.jsx.tag),i.languages.insertBefore("inside","attr-value",{script:{pattern:/=(?:\{(?:\{(?:\{[^}]*\}|[^}])*\}|[^}])+\})/i,inside:{"script-punctuation":{pattern:/^=(?={)/,alias:"punctuation"},rest:i.languages.jsx},alias:"language-javascript"}},i.languages.jsx.tag);var o=function(t){return t?"string"==typeof t?t:"string"==typeof t.content?t.content:t.content.map(o).join(""):""},p=function(t){for(var n=[],e=0;e"===a.content[a.content.length-1].content||n.push({tagName:o(a.content[0].content[1]),openedBraces:0}):0=]+|\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])+\}))?|\{\s*\.{3}\s*[a-z_$][\w$]*(?:\.[a-z_$][\w$]*)*\s*\}))*\s*\/?)?>/i,i.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/i,i.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s'">]+)/i,i.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,i.languages.insertBefore("inside","attr-name",{spread:{pattern:/\{\s*\.{3}\s*[a-z_$][\w$]*(?:\.[a-z_$][\w$]*)*\s*\}/,inside:{punctuation:/\.{3}|[{}.]/,"attr-value":/\w+/}}},i.languages.jsx.tag),i.languages.insertBefore("inside","attr-value",{script:{pattern:/=(?:\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])+\})/i,inside:{"script-punctuation":{pattern:/^=(?={)/,alias:"punctuation"},rest:i.languages.jsx},alias:"language-javascript"}},i.languages.jsx.tag);var o=function(t){return t?"string"==typeof t?t:"string"==typeof t.content?t.content:t.content.map(o).join(""):""},p=function(t){for(var n=[],e=0;e"===a.content[a.content.length-1].content||n.push({tagName:o(a.content[0].content[1]),openedBraces:0}):0)*\)/.source; + var schemeExpression = /\((?:[^();"#\\]|\\[\s\S]|;.*(?!.)|"(?:[^"\\]|\\.)*"|#(?:\{(?:(?!#\})[\s\S])*#\}|[^{])|)*\)/.source; // allow for up to pow(2, recursivenessLog2) many levels of recursive brace expressions // For some reason, this can't be 4 var recursivenessLog2 = 5; diff --git a/components/prism-lilypond.min.js b/components/prism-lilypond.min.js index 3015c84ed8..49ce96e9a4 100644 --- a/components/prism-lilypond.min.js +++ b/components/prism-lilypond.min.js @@ -1 +1 @@ -!function(e){for(var n='\\((?:[^();"#\\\\]|\\\\[^]|;.*|"(?:[^"\\\\]|\\\\.)*"|#(?:\\{(?:(?!#\\})[^])*#\\}|[^{])|)*\\)',i=0;i<5;i++)n=n.replace(//g,function(){return n});n=n.replace(//g,"[^\\s\\S]");var d=e.languages.lilypond={comment:/%(?:(?!\{).*|\{[\s\S]*?%\})/,"embedded-scheme":{pattern:RegExp('(^|[=\\s])#(?:"(?:[^"\\\\]|\\\\.)*"|[^\\s()"]*(?:[^\\s()]|))'.replace(//g,function(){return n}),"m"),lookbehind:!0,greedy:!0,inside:{scheme:{pattern:/^(#)[\s\S]+$/,lookbehind:!0,alias:"language-scheme",inside:{"embedded-lilypond":{pattern:/#\{[\s\S]*?#\}/,greedy:!0,inside:{punctuation:/^#\{|#\}$/,lilypond:{pattern:/[\s\S]+/,alias:"language-lilypond",inside:null}}},rest:e.languages.scheme}},punctuation:/#/}},string:{pattern:/"(?:[^"\\]|\\.)*"/,greedy:!0},"class-name":{pattern:/(\\new\s+)[\w-]+/,lookbehind:!0},keyword:{pattern:/\\[a-z][-\w]*/i,inside:{punctuation:/^\\/}},operator:/[=|]|<<|>>/,punctuation:{pattern:/(^|[a-z\d])(?:'+|,+|[_^]?-[_^]?(?:[-+^!>._]|(?=\d))|[_^]\.?|[.!])|[{}()[\]<>^~]|\\[()[\]<>\\!]|--|__/,lookbehind:!0},number:/\b\d+(?:\/\d+)?\b/};d["embedded-scheme"].inside.scheme.inside["embedded-lilypond"].inside.lilypond.inside=d,e.languages.ly=d}(Prism); \ No newline at end of file +!function(e){for(var n='\\((?:[^();"#\\\\]|\\\\[^]|;.*(?!.)|"(?:[^"\\\\]|\\\\.)*"|#(?:\\{(?:(?!#\\})[^])*#\\}|[^{])|)*\\)',i=0;i<5;i++)n=n.replace(//g,function(){return n});n=n.replace(//g,"[^\\s\\S]");var d=e.languages.lilypond={comment:/%(?:(?!\{).*|\{[\s\S]*?%\})/,"embedded-scheme":{pattern:RegExp('(^|[=\\s])#(?:"(?:[^"\\\\]|\\\\.)*"|[^\\s()"]*(?:[^\\s()]|))'.replace(//g,function(){return n}),"m"),lookbehind:!0,greedy:!0,inside:{scheme:{pattern:/^(#)[\s\S]+$/,lookbehind:!0,alias:"language-scheme",inside:{"embedded-lilypond":{pattern:/#\{[\s\S]*?#\}/,greedy:!0,inside:{punctuation:/^#\{|#\}$/,lilypond:{pattern:/[\s\S]+/,alias:"language-lilypond",inside:null}}},rest:e.languages.scheme}},punctuation:/#/}},string:{pattern:/"(?:[^"\\]|\\.)*"/,greedy:!0},"class-name":{pattern:/(\\new\s+)[\w-]+/,lookbehind:!0},keyword:{pattern:/\\[a-z][-\w]*/i,inside:{punctuation:/^\\/}},operator:/[=|]|<<|>>/,punctuation:{pattern:/(^|[a-z\d])(?:'+|,+|[_^]?-[_^]?(?:[-+^!>._]|(?=\d))|[_^]\.?|[.!])|[{}()[\]<>^~]|\\[()[\]<>\\!]|--|__/,lookbehind:!0},number:/\b\d+(?:\/\d+)?\b/};d["embedded-scheme"].inside.scheme.inside["embedded-lilypond"].inside.lilypond.inside=d,e.languages.ly=d}(Prism); \ No newline at end of file diff --git a/components/prism-livescript.js b/components/prism-livescript.js index b55bc91b8e..bc0c157ca5 100644 --- a/components/prism-livescript.js +++ b/components/prism-livescript.js @@ -47,7 +47,7 @@ Prism.languages.livescript = { ], 'regex': [ { - pattern: /\/\/(?:\[.+?]|\\.|(?!\/\/)[^\\])+\/\/[gimyu]{0,5}/, + pattern: /\/\/(?:\[[^\r\n\]]*\]|\\.|(?!\/\/)[^\\\[])+\/\/[gimyu]{0,5}/, greedy: true, inside: { 'comment': { @@ -57,7 +57,7 @@ Prism.languages.livescript = { } }, { - pattern: /\/(?:\[.+?]|\\.|[^/\\\r\n])+\/[gimyu]{0,5}/, + pattern: /\/(?:\[[^\r\n\]]*\]|\\.|[^/\\\r\n\[])+\/[gimyu]{0,5}/, greedy: true } ], diff --git a/components/prism-livescript.min.js b/components/prism-livescript.min.js index 22d3f943a2..be566cf888 100644 --- a/components/prism-livescript.min.js +++ b/components/prism-livescript.min.js @@ -1 +1 @@ -Prism.languages.livescript={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?\*\//,lookbehind:!0},{pattern:/(^|[^\\])#.*/,lookbehind:!0}],"interpolated-string":{pattern:/(^|[^"])("""|")(?:\\[\s\S]|(?!\2)[^\\])*\2(?!")/,lookbehind:!0,greedy:!0,inside:{variable:{pattern:/(^|[^\\])#[a-z_](?:-?[a-z]|[\d_])*/m,lookbehind:!0},interpolation:{pattern:/(^|[^\\])#\{[^}]+\}/m,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^#\{|\}$/,alias:"variable"}}},string:/[\s\S]+/}},string:[{pattern:/('''|')(?:\\[\s\S]|(?!\1)[^\\])*\1/,greedy:!0},{pattern:/<\[[\s\S]*?\]>/,greedy:!0},/\\[^\s,;\])}]+/],regex:[{pattern:/\/\/(?:\[.+?]|\\.|(?!\/\/)[^\\])+\/\/[gimyu]{0,5}/,greedy:!0,inside:{comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0}}},{pattern:/\/(?:\[.+?]|\\.|[^/\\\r\n])+\/[gimyu]{0,5}/,greedy:!0}],keyword:{pattern:/(^|(?!-).)\b(?:break|case|catch|class|const|continue|default|do|else|extends|fallthrough|finally|for(?: ever)?|function|if|implements|it|let|loop|new|null|otherwise|own|return|super|switch|that|then|this|throw|try|unless|until|var|void|when|while|yield)(?!-)\b/m,lookbehind:!0},"keyword-operator":{pattern:/(^|[^-])\b(?:(?:delete|require|typeof)!|(?:and|by|delete|export|from|import(?: all)?|in|instanceof|is(?:nt| not)?|not|of|or|til|to|typeof|with|xor)(?!-)\b)/m,lookbehind:!0,alias:"operator"},boolean:{pattern:/(^|[^-])\b(?:false|no|off|on|true|yes)(?!-)\b/m,lookbehind:!0},argument:{pattern:/(^|(?!\.&\.)[^&])&(?!&)\d*/m,lookbehind:!0,alias:"variable"},number:/\b(?:\d+~[\da-z]+|\d[\d_]*(?:\.\d[\d_]*)?(?:[a-z]\w*)?)/i,identifier:/[a-z_](?:-?[a-z]|[\d_])*/i,operator:[{pattern:/( )\.(?= )/,lookbehind:!0},/\.(?:[=~]|\.\.?)|\.(?:[&|^]|<<|>>>?)\.|:(?:=|:=?)|&&|\|[|>]|<(?:<[>=?]?|-(?:->?|>)?|\+\+?|@@?|%%?|\*\*?|!(?:~?=|--?>|~?~>)?|~(?:~?>|=)?|==?|\^\^?|[\/?]/],punctuation:/[(){}\[\]|.,:;`]/},Prism.languages.livescript["interpolated-string"].inside.interpolation.inside.rest=Prism.languages.livescript; \ No newline at end of file +Prism.languages.livescript={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?\*\//,lookbehind:!0},{pattern:/(^|[^\\])#.*/,lookbehind:!0}],"interpolated-string":{pattern:/(^|[^"])("""|")(?:\\[\s\S]|(?!\2)[^\\])*\2(?!")/,lookbehind:!0,greedy:!0,inside:{variable:{pattern:/(^|[^\\])#[a-z_](?:-?[a-z]|[\d_])*/m,lookbehind:!0},interpolation:{pattern:/(^|[^\\])#\{[^}]+\}/m,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^#\{|\}$/,alias:"variable"}}},string:/[\s\S]+/}},string:[{pattern:/('''|')(?:\\[\s\S]|(?!\1)[^\\])*\1/,greedy:!0},{pattern:/<\[[\s\S]*?\]>/,greedy:!0},/\\[^\s,;\])}]+/],regex:[{pattern:/\/\/(?:\[[^\r\n\]]*\]|\\.|(?!\/\/)[^\\\[])+\/\/[gimyu]{0,5}/,greedy:!0,inside:{comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0}}},{pattern:/\/(?:\[[^\r\n\]]*\]|\\.|[^/\\\r\n\[])+\/[gimyu]{0,5}/,greedy:!0}],keyword:{pattern:/(^|(?!-).)\b(?:break|case|catch|class|const|continue|default|do|else|extends|fallthrough|finally|for(?: ever)?|function|if|implements|it|let|loop|new|null|otherwise|own|return|super|switch|that|then|this|throw|try|unless|until|var|void|when|while|yield)(?!-)\b/m,lookbehind:!0},"keyword-operator":{pattern:/(^|[^-])\b(?:(?:delete|require|typeof)!|(?:and|by|delete|export|from|import(?: all)?|in|instanceof|is(?:nt| not)?|not|of|or|til|to|typeof|with|xor)(?!-)\b)/m,lookbehind:!0,alias:"operator"},boolean:{pattern:/(^|[^-])\b(?:false|no|off|on|true|yes)(?!-)\b/m,lookbehind:!0},argument:{pattern:/(^|(?!\.&\.)[^&])&(?!&)\d*/m,lookbehind:!0,alias:"variable"},number:/\b(?:\d+~[\da-z]+|\d[\d_]*(?:\.\d[\d_]*)?(?:[a-z]\w*)?)/i,identifier:/[a-z_](?:-?[a-z]|[\d_])*/i,operator:[{pattern:/( )\.(?= )/,lookbehind:!0},/\.(?:[=~]|\.\.?)|\.(?:[&|^]|<<|>>>?)\.|:(?:=|:=?)|&&|\|[|>]|<(?:<[>=?]?|-(?:->?|>)?|\+\+?|@@?|%%?|\*\*?|!(?:~?=|--?>|~?~>)?|~(?:~?>|=)?|==?|\^\^?|[\/?]/],punctuation:/[(){}\[\]|.,:;`]/},Prism.languages.livescript["interpolated-string"].inside.interpolation.inside.rest=Prism.languages.livescript; \ No newline at end of file diff --git a/components/prism-lolcode.js b/components/prism-lolcode.js index 3e406edefd..4703535e18 100644 --- a/components/prism-lolcode.js +++ b/components/prism-lolcode.js @@ -4,7 +4,7 @@ Prism.languages.lolcode = { /\bBTW.+/ ], 'string': { - pattern: /"(?::.|[^"])*"/, + pattern: /"(?::.|[^":])*"/, inside: { 'variable': /:\{[^}]+\}/, 'symbol': [ @@ -52,4 +52,4 @@ Prism.languages.lolcode = { lookbehind: true }, 'punctuation': /\.{3}|…|,|!/ -}; \ No newline at end of file +}; diff --git a/components/prism-lolcode.min.js b/components/prism-lolcode.min.js index 3ff50470ff..f9d3502e67 100644 --- a/components/prism-lolcode.min.js +++ b/components/prism-lolcode.min.js @@ -1 +1 @@ -Prism.languages.lolcode={comment:[/\bOBTW\s+[\s\S]*?\s+TLDR\b/,/\bBTW.+/],string:{pattern:/"(?::.|[^"])*"/,inside:{variable:/:\{[^}]+\}/,symbol:[/:\([a-f\d]+\)/i,/:\[[^\]]+\]/,/:[)>o":]/]},greedy:!0},number:/(?:\B-)?(?:\b\d+\.?\d*|\B\.\d+)/,symbol:{pattern:/(^|\s)(?:A )?(?:YARN|NUMBR|NUMBAR|TROOF|BUKKIT|NOOB)(?=\s|,|$)/,lookbehind:!0,inside:{keyword:/A(?=\s)/}},label:{pattern:/((?:^|\s)(?:IM IN YR|IM OUTTA YR) )[a-zA-Z]\w*/,lookbehind:!0,alias:"string"},function:{pattern:/((?:^|\s)(?:I IZ|HOW IZ I|IZ) )[a-zA-Z]\w*/,lookbehind:!0},keyword:[{pattern:/(^|\s)(?:O HAI IM|KTHX|HAI|KTHXBYE|I HAS A|ITZ(?: A)?|R|AN|MKAY|SMOOSH|MAEK|IS NOW(?: A)?|VISIBLE|GIMMEH|O RLY\?|YA RLY|NO WAI|OIC|MEBBE|WTF\?|OMG|OMGWTF|GTFO|IM IN YR|IM OUTTA YR|FOUND YR|YR|TIL|WILE|UPPIN|NERFIN|I IZ|HOW IZ I|IF U SAY SO|SRS|HAS A|LIEK(?: A)?|IZ)(?=\s|,|$)/,lookbehind:!0},/'Z(?=\s|,|$)/],boolean:{pattern:/(^|\s)(?:WIN|FAIL)(?=\s|,|$)/,lookbehind:!0},variable:{pattern:/(^|\s)IT(?=\s|,|$)/,lookbehind:!0},operator:{pattern:/(^|\s)(?:NOT|BOTH SAEM|DIFFRINT|(?:SUM|DIFF|PRODUKT|QUOSHUNT|MOD|BIGGR|SMALLR|BOTH|EITHER|WON|ALL|ANY) OF)(?=\s|,|$)/,lookbehind:!0},punctuation:/\.{3}|…|,|!/}; \ No newline at end of file +Prism.languages.lolcode={comment:[/\bOBTW\s+[\s\S]*?\s+TLDR\b/,/\bBTW.+/],string:{pattern:/"(?::.|[^":])*"/,inside:{variable:/:\{[^}]+\}/,symbol:[/:\([a-f\d]+\)/i,/:\[[^\]]+\]/,/:[)>o":]/]},greedy:!0},number:/(?:\B-)?(?:\b\d+\.?\d*|\B\.\d+)/,symbol:{pattern:/(^|\s)(?:A )?(?:YARN|NUMBR|NUMBAR|TROOF|BUKKIT|NOOB)(?=\s|,|$)/,lookbehind:!0,inside:{keyword:/A(?=\s)/}},label:{pattern:/((?:^|\s)(?:IM IN YR|IM OUTTA YR) )[a-zA-Z]\w*/,lookbehind:!0,alias:"string"},function:{pattern:/((?:^|\s)(?:I IZ|HOW IZ I|IZ) )[a-zA-Z]\w*/,lookbehind:!0},keyword:[{pattern:/(^|\s)(?:O HAI IM|KTHX|HAI|KTHXBYE|I HAS A|ITZ(?: A)?|R|AN|MKAY|SMOOSH|MAEK|IS NOW(?: A)?|VISIBLE|GIMMEH|O RLY\?|YA RLY|NO WAI|OIC|MEBBE|WTF\?|OMG|OMGWTF|GTFO|IM IN YR|IM OUTTA YR|FOUND YR|YR|TIL|WILE|UPPIN|NERFIN|I IZ|HOW IZ I|IF U SAY SO|SRS|HAS A|LIEK(?: A)?|IZ)(?=\s|,|$)/,lookbehind:!0},/'Z(?=\s|,|$)/],boolean:{pattern:/(^|\s)(?:WIN|FAIL)(?=\s|,|$)/,lookbehind:!0},variable:{pattern:/(^|\s)IT(?=\s|,|$)/,lookbehind:!0},operator:{pattern:/(^|\s)(?:NOT|BOTH SAEM|DIFFRINT|(?:SUM|DIFF|PRODUKT|QUOSHUNT|MOD|BIGGR|SMALLR|BOTH|EITHER|WON|ALL|ANY) OF)(?=\s|,|$)/,lookbehind:!0},punctuation:/\.{3}|…|,|!/}; \ No newline at end of file diff --git a/components/prism-markdown.js b/components/prism-markdown.js index 8259fd919e..51de0ba275 100644 --- a/components/prism-markdown.js +++ b/components/prism-markdown.js @@ -23,7 +23,7 @@ } - var tableCell = /(?:\\.|``.+?``|`[^`\r\n]+`|[^\\|\r\n`])+/.source; + var tableCell = /(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source; var tableRow = /\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|$)/.source.replace(/__/g, function () { return tableCell; }); var tableLine = /\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source; diff --git a/components/prism-markdown.min.js b/components/prism-markdown.min.js index 2ce180d075..f49ac890df 100644 --- a/components/prism-markdown.min.js +++ b/components/prism-markdown.min.js @@ -1 +1 @@ -!function(d){function n(n,e){return n=n.replace(//g,function(){return"(?:\\\\.|[^\\\\\n\r]|(?:\n|\r\n?)(?!\n|\r\n?))"}),e&&(n=n+"|"+n.replace(/_/g,"\\*")),RegExp("((?:^|[^\\\\])(?:\\\\{2})*)(?:"+n+")")}var e="(?:\\\\.|``.+?``|`[^`\r\n]+`|[^\\\\|\r\n`])+",t="\\|?__(?:\\|__)+\\|?(?:(?:\n|\r\n?)|$)".replace(/__/g,function(){return e}),a="\\|?[ \t]*:?-{3,}:?[ \t]*(?:\\|[ \t]*:?-{3,}:?[ \t]*)+\\|?(?:\n|\r\n?)";d.languages.markdown=d.languages.extend("markup",{}),d.languages.insertBefore("markdown","prolog",{blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+t+a+"(?:"+t+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+t+a+")(?:"+t+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(e),inside:d.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+t+")"+a+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+t+"$"),inside:{"table-header":{pattern:RegExp(e),alias:"important",inside:d.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/``.+?``|`[^`\r\n]+`/,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#+.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n("__(?:(?!_)|_(?:(?!_))+_)+__",!0),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n("_(?:(?!_)|__(?:(?!_))+__)+_",!0),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n("(~~?)(?:(?!~))+?\\2",!1),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},url:{pattern:n('!?\\[(?:(?!\\]))+\\](?:\\([^\\s)]+(?:[\t ]+"(?:\\\\.|[^"\\\\])*")?\\)| ?\\[(?:(?!\\]))+\\])',!1),lookbehind:!0,greedy:!0,inside:{variable:{pattern:/(\[)[^\]]+(?=\]$)/,lookbehind:!0},content:{pattern:/(^!?\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},string:{pattern:/"(?:\\.|[^"\\])*"(?=\)$)/}}}}),["url","bold","italic","strike"].forEach(function(e){["url","bold","italic","strike"].forEach(function(n){e!==n&&(d.languages.markdown[e].inside.content.inside[n]=d.languages.markdown[n])})}),d.hooks.add("after-tokenize",function(n){"markdown"!==n.language&&"md"!==n.language||!function n(e){if(e&&"string"!=typeof e)for(var t=0,a=e.length;t/g,function(){return"(?:\\\\.|[^\\\\\n\r]|(?:\n|\r\n?)(?!\n|\r\n?))"}),e&&(n=n+"|"+n.replace(/_/g,"\\*")),RegExp("((?:^|[^\\\\])(?:\\\\{2})*)(?:"+n+")")}var e="(?:\\\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\\\|\r\n`])+",t="\\|?__(?:\\|__)+\\|?(?:(?:\n|\r\n?)|$)".replace(/__/g,function(){return e}),a="\\|?[ \t]*:?-{3,}:?[ \t]*(?:\\|[ \t]*:?-{3,}:?[ \t]*)+\\|?(?:\n|\r\n?)";d.languages.markdown=d.languages.extend("markup",{}),d.languages.insertBefore("markdown","prolog",{blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+t+a+"(?:"+t+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+t+a+")(?:"+t+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(e),inside:d.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+t+")"+a+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+t+"$"),inside:{"table-header":{pattern:RegExp(e),alias:"important",inside:d.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/``.+?``|`[^`\r\n]+`/,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#+.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n("__(?:(?!_)|_(?:(?!_))+_)+__",!0),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n("_(?:(?!_)|__(?:(?!_))+__)+_",!0),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n("(~~?)(?:(?!~))+?\\2",!1),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},url:{pattern:n('!?\\[(?:(?!\\]))+\\](?:\\([^\\s)]+(?:[\t ]+"(?:\\\\.|[^"\\\\])*")?\\)| ?\\[(?:(?!\\]))+\\])',!1),lookbehind:!0,greedy:!0,inside:{variable:{pattern:/(\[)[^\]]+(?=\]$)/,lookbehind:!0},content:{pattern:/(^!?\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},string:{pattern:/"(?:\\.|[^"\\])*"(?=\)$)/}}}}),["url","bold","italic","strike"].forEach(function(e){["url","bold","italic","strike"].forEach(function(n){e!==n&&(d.languages.markdown[e].inside.content.inside[n]=d.languages.markdown[n])})}),d.hooks.add("after-tokenize",function(n){"markdown"!==n.language&&"md"!==n.language||!function n(e){if(e&&"string"!=typeof e)for(var t=0,a=e.length;t/, 'prolog': /<\?[\s\S]+?\?>/, 'doctype': { - pattern: /"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:(?!)*\]\s*)?>/i, + pattern: /"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i, greedy: true }, 'cdata': //i, @@ -87,7 +87,7 @@ Object.defineProperty(Prism.languages.markup.tag, 'addInlined', { var def = {}; def[tagName] = { - pattern: RegExp(/(<__[\s\S]*?>)(?:\s*|[\s\S])*?(?=<\/__>)/.source.replace(/__/g, function () { return tagName; }), 'i'), + pattern: RegExp(/(<__[\s\S]*?>)(?:))*\]\]>|(?!)/.source.replace(/__/g, function () { return tagName; }), 'i'), lookbehind: true, greedy: true, inside: inside diff --git a/components/prism-markup.min.js b/components/prism-markup.min.js index 9b9b160ba5..764578b713 100644 --- a/components/prism-markup.min.js +++ b/components/prism-markup.min.js @@ -1 +1 @@ -Prism.languages.markup={comment://,prolog:/<\?[\s\S]+?\?>/,doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:(?!)*\]\s*)?>/i,greedy:!0},cdata://i,tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/i,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/i,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/i,inside:{punctuation:[/^=/,{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:/&#?[\da-z]{1,8};/i},Prism.languages.markup.tag.inside["attr-value"].inside.entity=Prism.languages.markup.entity,Prism.hooks.add("wrap",function(a){"entity"===a.type&&(a.attributes.title=a.content.replace(/&/,"&"))}),Object.defineProperty(Prism.languages.markup.tag,"addInlined",{value:function(a,e){var s={};s["language-"+e]={pattern:/(^$)/i,lookbehind:!0,inside:Prism.languages[e]},s.cdata=/^$/i;var n={"included-cdata":{pattern://i,inside:s}};n["language-"+e]={pattern:/[\s\S]+/,inside:Prism.languages[e]};var t={};t[a]={pattern:RegExp("(<__[^]*?>)(?:\\s*|[^])*?(?=)".replace(/__/g,function(){return a}),"i"),lookbehind:!0,greedy:!0,inside:n},Prism.languages.insertBefore("markup","cdata",t)}}),Prism.languages.xml=Prism.languages.extend("markup",{}),Prism.languages.html=Prism.languages.markup,Prism.languages.mathml=Prism.languages.markup,Prism.languages.svg=Prism.languages.markup; \ No newline at end of file +Prism.languages.markup={comment://,prolog:/<\?[\s\S]+?\?>/,doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0},cdata://i,tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/i,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/i,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/i,inside:{punctuation:[/^=/,{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:/&#?[\da-z]{1,8};/i},Prism.languages.markup.tag.inside["attr-value"].inside.entity=Prism.languages.markup.entity,Prism.hooks.add("wrap",function(a){"entity"===a.type&&(a.attributes.title=a.content.replace(/&/,"&"))}),Object.defineProperty(Prism.languages.markup.tag,"addInlined",{value:function(a,e){var s={};s["language-"+e]={pattern:/(^$)/i,lookbehind:!0,inside:Prism.languages[e]},s.cdata=/^$/i;var n={"included-cdata":{pattern://i,inside:s}};n["language-"+e]={pattern:/[\s\S]+/,inside:Prism.languages[e]};var t={};t[a]={pattern:RegExp("(<__[^]*?>)(?:))*\\]\\]>|(?!)".replace(/__/g,function(){return a}),"i"),lookbehind:!0,greedy:!0,inside:n},Prism.languages.insertBefore("markup","cdata",t)}}),Prism.languages.xml=Prism.languages.extend("markup",{}),Prism.languages.html=Prism.languages.markup,Prism.languages.mathml=Prism.languages.markup,Prism.languages.svg=Prism.languages.markup; \ No newline at end of file diff --git a/components/prism-neon.js b/components/prism-neon.js index 3b70dcf378..4acd10c535 100644 --- a/components/prism-neon.js +++ b/components/prism-neon.js @@ -27,7 +27,7 @@ Prism.languages.neon = { alias: 'keyword' }, 'string': { - pattern: /(^|[[{(=:,\s])(?:('''|""")\r?\n(?:(?:[^\r\n]|\r?\n(?![\t ]*\2))*\r?\n)?[\t ]*\2|'[^'\r\n]*'|"(?:\\.|[^"\r\n])*")/, + pattern: /(^|[[{(=:,\s])(?:('''|""")\r?\n(?:(?:[^\r\n]|\r?\n(?![\t ]*\2))*\r?\n)?[\t ]*\2|'[^'\r\n]*'|"(?:\\.|[^\\"\r\n])*")/, lookbehind: true, greedy: true }, diff --git a/components/prism-neon.min.js b/components/prism-neon.min.js index 0adabef6ab..7783ba7310 100644 --- a/components/prism-neon.min.js +++ b/components/prism-neon.min.js @@ -1 +1 @@ -Prism.languages.neon={comment:{pattern:/#.*/,greedy:!0},datetime:{pattern:/(^|[[{(=:,\s])\d\d\d\d-\d\d?-\d\d?(?:(?:[Tt]| +)\d\d?:\d\d:\d\d(?:\.\d*)? *(?:Z|[-+]\d\d?(?::?\d\d)?)?)?(?=$|[\]}),\s])/,lookbehind:!0,alias:"number"},key:{pattern:/(^|[[{(,\s])[^,:=[\]{}()'"\s]+(?=\s*:(?:$|[\]}),\s])|\s*=)/,lookbehind:!0,alias:"atrule"},number:{pattern:/(^|[[{(=:,\s])[+-]?(?:0x[\da-fA-F]+|0o[0-7]+|0b[01]+|(?:\d+\.?\d*|\.?\d+)(?:[eE][+-]?\d+)?)(?=$|[\]}),:=\s])/,lookbehind:!0},boolean:{pattern:/(^|[[{(=:,\s])(?:true|false|yes|no)(?=$|[\]}),:=\s])/i,lookbehind:!0},null:{pattern:/(^|[[{(=:,\s])(?:null)(?=$|[\]}),:=\s])/i,lookbehind:!0,alias:"keyword"},string:{pattern:/(^|[[{(=:,\s])(?:('''|""")\r?\n(?:(?:[^\r\n]|\r?\n(?![\t ]*\2))*\r?\n)?[\t ]*\2|'[^'\r\n]*'|"(?:\\.|[^"\r\n])*")/,lookbehind:!0,greedy:!0},literal:{pattern:/(^|[[{(=:,\s])(?:[^#"\',:=[\]{}()\s`-]|[:-][^"\',=[\]{}()\s])(?:[^,:=\]})(\s]+|:(?![\s,\]})]|$)|[ \t]+[^#,:=\]})(\s])*/,lookbehind:!0,alias:"string"},punctuation:/[,:=[\]{}()-]/}; \ No newline at end of file +Prism.languages.neon={comment:{pattern:/#.*/,greedy:!0},datetime:{pattern:/(^|[[{(=:,\s])\d\d\d\d-\d\d?-\d\d?(?:(?:[Tt]| +)\d\d?:\d\d:\d\d(?:\.\d*)? *(?:Z|[-+]\d\d?(?::?\d\d)?)?)?(?=$|[\]}),\s])/,lookbehind:!0,alias:"number"},key:{pattern:/(^|[[{(,\s])[^,:=[\]{}()'"\s]+(?=\s*:(?:$|[\]}),\s])|\s*=)/,lookbehind:!0,alias:"atrule"},number:{pattern:/(^|[[{(=:,\s])[+-]?(?:0x[\da-fA-F]+|0o[0-7]+|0b[01]+|(?:\d+\.?\d*|\.?\d+)(?:[eE][+-]?\d+)?)(?=$|[\]}),:=\s])/,lookbehind:!0},boolean:{pattern:/(^|[[{(=:,\s])(?:true|false|yes|no)(?=$|[\]}),:=\s])/i,lookbehind:!0},null:{pattern:/(^|[[{(=:,\s])(?:null)(?=$|[\]}),:=\s])/i,lookbehind:!0,alias:"keyword"},string:{pattern:/(^|[[{(=:,\s])(?:('''|""")\r?\n(?:(?:[^\r\n]|\r?\n(?![\t ]*\2))*\r?\n)?[\t ]*\2|'[^'\r\n]*'|"(?:\\.|[^\\"\r\n])*")/,lookbehind:!0,greedy:!0},literal:{pattern:/(^|[[{(=:,\s])(?:[^#"\',:=[\]{}()\s`-]|[:-][^"\',=[\]{}()\s])(?:[^,:=\]})(\s]+|:(?![\s,\]})]|$)|[ \t]+[^#,:=\]})(\s])*/,lookbehind:!0,alias:"string"},punctuation:/[,:=[\]{}()-]/}; \ No newline at end of file diff --git a/components/prism-pascal.js b/components/prism-pascal.js index bc7a2836f6..9e95353af6 100644 --- a/components/prism-pascal.js +++ b/components/prism-pascal.js @@ -11,7 +11,7 @@ Prism.languages.pascal = { /\/\/.*/ ], 'string': { - pattern: /(?:'(?:''|[^'\r\n])*'|#[&$%]?[a-f\d]+)+|\^[a-z]/i, + pattern: /(?:'(?:''|[^'\r\n])*'(?!')|#[&$%]?[a-f\d]+)+|\^[a-z]/i, greedy: true }, 'keyword': [ @@ -52,4 +52,4 @@ Prism.languages.pascal = { 'punctuation': /\(\.|\.\)|[()\[\]:;,.]/ }; -Prism.languages.objectpascal = Prism.languages.pascal; \ No newline at end of file +Prism.languages.objectpascal = Prism.languages.pascal; diff --git a/components/prism-pascal.min.js b/components/prism-pascal.min.js index 7f17c3621a..07ae8a25ee 100644 --- a/components/prism-pascal.min.js +++ b/components/prism-pascal.min.js @@ -1 +1 @@ -Prism.languages.pascal={comment:[/\(\*[\s\S]+?\*\)/,/\{[\s\S]+?\}/,/\/\/.*/],string:{pattern:/(?:'(?:''|[^'\r\n])*'|#[&$%]?[a-f\d]+)+|\^[a-z]/i,greedy:!0},keyword:[{pattern:/(^|[^&])\b(?:absolute|array|asm|begin|case|const|constructor|destructor|do|downto|else|end|file|for|function|goto|if|implementation|inherited|inline|interface|label|nil|object|of|operator|packed|procedure|program|record|reintroduce|repeat|self|set|string|then|to|type|unit|until|uses|var|while|with)\b/i,lookbehind:!0},{pattern:/(^|[^&])\b(?:dispose|exit|false|new|true)\b/i,lookbehind:!0},{pattern:/(^|[^&])\b(?:class|dispinterface|except|exports|finalization|finally|initialization|inline|library|on|out|packed|property|raise|resourcestring|threadvar|try)\b/i,lookbehind:!0},{pattern:/(^|[^&])\b(?:absolute|abstract|alias|assembler|bitpacked|break|cdecl|continue|cppdecl|cvar|default|deprecated|dynamic|enumerator|experimental|export|external|far|far16|forward|generic|helper|implements|index|interrupt|iochecks|local|message|name|near|nodefault|noreturn|nostackframe|oldfpccall|otherwise|overload|override|pascal|platform|private|protected|public|published|read|register|reintroduce|result|safecall|saveregisters|softfloat|specialize|static|stdcall|stored|strict|unaligned|unimplemented|varargs|virtual|write)\b/i,lookbehind:!0}],number:[/(?:[&%]\d+|\$[a-f\d]+)/i,/\b\d+(?:\.\d+)?(?:e[+-]?\d+)?/i],operator:[/\.\.|\*\*|:=|<[<=>]?|>[>=]?|[+\-*\/]=?|[@^=]/i,{pattern:/(^|[^&])\b(?:and|as|div|exclude|in|include|is|mod|not|or|shl|shr|xor)\b/,lookbehind:!0}],punctuation:/\(\.|\.\)|[()\[\]:;,.]/},Prism.languages.objectpascal=Prism.languages.pascal; \ No newline at end of file +Prism.languages.pascal={comment:[/\(\*[\s\S]+?\*\)/,/\{[\s\S]+?\}/,/\/\/.*/],string:{pattern:/(?:'(?:''|[^'\r\n])*'(?!')|#[&$%]?[a-f\d]+)+|\^[a-z]/i,greedy:!0},keyword:[{pattern:/(^|[^&])\b(?:absolute|array|asm|begin|case|const|constructor|destructor|do|downto|else|end|file|for|function|goto|if|implementation|inherited|inline|interface|label|nil|object|of|operator|packed|procedure|program|record|reintroduce|repeat|self|set|string|then|to|type|unit|until|uses|var|while|with)\b/i,lookbehind:!0},{pattern:/(^|[^&])\b(?:dispose|exit|false|new|true)\b/i,lookbehind:!0},{pattern:/(^|[^&])\b(?:class|dispinterface|except|exports|finalization|finally|initialization|inline|library|on|out|packed|property|raise|resourcestring|threadvar|try)\b/i,lookbehind:!0},{pattern:/(^|[^&])\b(?:absolute|abstract|alias|assembler|bitpacked|break|cdecl|continue|cppdecl|cvar|default|deprecated|dynamic|enumerator|experimental|export|external|far|far16|forward|generic|helper|implements|index|interrupt|iochecks|local|message|name|near|nodefault|noreturn|nostackframe|oldfpccall|otherwise|overload|override|pascal|platform|private|protected|public|published|read|register|reintroduce|result|safecall|saveregisters|softfloat|specialize|static|stdcall|stored|strict|unaligned|unimplemented|varargs|virtual|write)\b/i,lookbehind:!0}],number:[/(?:[&%]\d+|\$[a-f\d]+)/i,/\b\d+(?:\.\d+)?(?:e[+-]?\d+)?/i],operator:[/\.\.|\*\*|:=|<[<=>]?|>[>=]?|[+\-*\/]=?|[@^=]/i,{pattern:/(^|[^&])\b(?:and|as|div|exclude|in|include|is|mod|not|or|shl|shr|xor)\b/,lookbehind:!0}],punctuation:/\(\.|\.\)|[()\[\]:;,.]/},Prism.languages.objectpascal=Prism.languages.pascal; \ No newline at end of file diff --git a/components/prism-php.js b/components/prism-php.js index ded22a73e0..8c2751a5a5 100644 --- a/components/prism-php.js +++ b/components/prism-php.js @@ -62,14 +62,14 @@ }); var string_interpolation = { - pattern: /{\$(?:{(?:{[^{}]+}|[^{}]+)}|[^{}])+}|(^|[^\\{])\$+(?:\w+(?:\[.+?]|->\w+)*)/, + pattern: /{\$(?:{(?:{[^{}]+}|[^{}]+)}|[^{}])+}|(^|[^\\{])\$+(?:\w+(?:\[[^\r\n\[\]]+\]|->\w+)*)/, lookbehind: true, inside: Prism.languages.php }; Prism.languages.insertBefore('php', 'string', { 'nowdoc-string': { - pattern: /<<<'([^']+)'(?:\r\n?|\n)(?:.*(?:\r\n?|\n))*?\1;/, + pattern: /<<<'([^']+)'[\r\n](?:.*[\r\n])*?\1;/, greedy: true, alias: 'string', inside: { @@ -83,7 +83,7 @@ } }, 'heredoc-string': { - pattern: /<<<(?:"([^"]+)"(?:\r\n?|\n)(?:.*(?:\r\n?|\n))*?\1;|([a-z_]\w*)(?:\r\n?|\n)(?:.*(?:\r\n?|\n))*?\2;)/i, + pattern: /<<<(?:"([^"]+)"[\r\n](?:.*[\r\n])*?\1;|([a-z_]\w*)[\r\n](?:.*[\r\n])*?\2;)/i, greedy: true, alias: 'string', inside: { diff --git a/components/prism-php.min.js b/components/prism-php.min.js index ea56b5eb80..1c4ef76587 100644 --- a/components/prism-php.min.js +++ b/components/prism-php.min.js @@ -1 +1 @@ -!function(n){n.languages.php=n.languages.extend("clike",{keyword:/\b(?:__halt_compiler|abstract|and|array|as|break|callable|case|catch|class|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|eval|exit|extends|final|finally|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|namespace|new|or|parent|print|private|protected|public|require|require_once|return|static|switch|throw|trait|try|unset|use|var|while|xor|yield)\b/i,boolean:{pattern:/\b(?:false|true)\b/i,alias:"constant"},constant:[/\b[A-Z_][A-Z0-9_]*\b/,/\b(?:null)\b/i],comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0}}),n.languages.insertBefore("php","string",{"shell-comment":{pattern:/(^|[^\\])#.*/,lookbehind:!0,alias:"comment"}}),n.languages.insertBefore("php","comment",{delimiter:{pattern:/\?>$|^<\?(?:php(?=\s)|=)?/i,alias:"important"}}),n.languages.insertBefore("php","keyword",{variable:/\$+(?:\w+\b|(?={))/i,package:{pattern:/(\\|namespace\s+|use\s+)[\w\\]+/,lookbehind:!0,inside:{punctuation:/\\/}}}),n.languages.insertBefore("php","operator",{property:{pattern:/(->)[\w]+/,lookbehind:!0}});var e={pattern:/{\$(?:{(?:{[^{}]+}|[^{}]+)}|[^{}])+}|(^|[^\\{])\$+(?:\w+(?:\[.+?]|->\w+)*)/,lookbehind:!0,inside:n.languages.php};n.languages.insertBefore("php","string",{"nowdoc-string":{pattern:/<<<'([^']+)'(?:\r\n?|\n)(?:.*(?:\r\n?|\n))*?\1;/,greedy:!0,alias:"string",inside:{delimiter:{pattern:/^<<<'[^']+'|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<'?|[';]$/}}}},"heredoc-string":{pattern:/<<<(?:"([^"]+)"(?:\r\n?|\n)(?:.*(?:\r\n?|\n))*?\1;|([a-z_]\w*)(?:\r\n?|\n)(?:.*(?:\r\n?|\n))*?\2;)/i,greedy:!0,alias:"string",inside:{delimiter:{pattern:/^<<<(?:"[^"]+"|[a-z_]\w*)|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<"?|[";]$/}},interpolation:e}},"single-quoted-string":{pattern:/'(?:\\[\s\S]|[^\\'])*'/,greedy:!0,alias:"string"},"double-quoted-string":{pattern:/"(?:\\[\s\S]|[^\\"])*"/,greedy:!0,alias:"string",inside:{interpolation:e}}}),delete n.languages.php.string,n.hooks.add("before-tokenize",function(e){if(/<\?/.test(e.code)){n.languages["markup-templating"].buildPlaceholders(e,"php",/<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#)(?:[^?\n\r]|\?(?!>))*(?=$|\?>|[\r\n])|\/\*[\s\S]*?(?:\*\/|$))*?(?:\?>|$)/gi)}}),n.hooks.add("after-tokenize",function(e){n.languages["markup-templating"].tokenizePlaceholders(e,"php")})}(Prism); \ No newline at end of file +!function(n){n.languages.php=n.languages.extend("clike",{keyword:/\b(?:__halt_compiler|abstract|and|array|as|break|callable|case|catch|class|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|eval|exit|extends|final|finally|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|namespace|new|or|parent|print|private|protected|public|require|require_once|return|static|switch|throw|trait|try|unset|use|var|while|xor|yield)\b/i,boolean:{pattern:/\b(?:false|true)\b/i,alias:"constant"},constant:[/\b[A-Z_][A-Z0-9_]*\b/,/\b(?:null)\b/i],comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0}}),n.languages.insertBefore("php","string",{"shell-comment":{pattern:/(^|[^\\])#.*/,lookbehind:!0,alias:"comment"}}),n.languages.insertBefore("php","comment",{delimiter:{pattern:/\?>$|^<\?(?:php(?=\s)|=)?/i,alias:"important"}}),n.languages.insertBefore("php","keyword",{variable:/\$+(?:\w+\b|(?={))/i,package:{pattern:/(\\|namespace\s+|use\s+)[\w\\]+/,lookbehind:!0,inside:{punctuation:/\\/}}}),n.languages.insertBefore("php","operator",{property:{pattern:/(->)[\w]+/,lookbehind:!0}});var e={pattern:/{\$(?:{(?:{[^{}]+}|[^{}]+)}|[^{}])+}|(^|[^\\{])\$+(?:\w+(?:\[[^\r\n\[\]]+\]|->\w+)*)/,lookbehind:!0,inside:n.languages.php};n.languages.insertBefore("php","string",{"nowdoc-string":{pattern:/<<<'([^']+)'[\r\n](?:.*[\r\n])*?\1;/,greedy:!0,alias:"string",inside:{delimiter:{pattern:/^<<<'[^']+'|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<'?|[';]$/}}}},"heredoc-string":{pattern:/<<<(?:"([^"]+)"[\r\n](?:.*[\r\n])*?\1;|([a-z_]\w*)[\r\n](?:.*[\r\n])*?\2;)/i,greedy:!0,alias:"string",inside:{delimiter:{pattern:/^<<<(?:"[^"]+"|[a-z_]\w*)|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<"?|[";]$/}},interpolation:e}},"single-quoted-string":{pattern:/'(?:\\[\s\S]|[^\\'])*'/,greedy:!0,alias:"string"},"double-quoted-string":{pattern:/"(?:\\[\s\S]|[^\\"])*"/,greedy:!0,alias:"string",inside:{interpolation:e}}}),delete n.languages.php.string,n.hooks.add("before-tokenize",function(e){if(/<\?/.test(e.code)){n.languages["markup-templating"].buildPlaceholders(e,"php",/<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#)(?:[^?\n\r]|\?(?!>))*(?=$|\?>|[\r\n])|\/\*[\s\S]*?(?:\*\/|$))*?(?:\?>|$)/gi)}}),n.hooks.add("after-tokenize",function(e){n.languages["markup-templating"].tokenizePlaceholders(e,"php")})}(Prism); \ No newline at end of file diff --git a/components/prism-powershell.js b/components/prism-powershell.js index 3df9b87919..446f72b1dd 100644 --- a/components/prism-powershell.js +++ b/components/prism-powershell.js @@ -18,7 +18,7 @@ inside: { 'function': { // Allow for one level of nesting - pattern: /(^|[^`])\$\((?:\$\(.*?\)|(?!\$\()[^\r\n)])*\)/, + pattern: /(^|[^`])\$\((?:\$\([^\r\n()]*\)|(?!\$\()[^\r\n)])*\)/, lookbehind: true, // Populated at end of file inside: {} diff --git a/components/prism-powershell.min.js b/components/prism-powershell.min.js index 21bf16c4f6..39513ce7ce 100644 --- a/components/prism-powershell.min.js +++ b/components/prism-powershell.min.js @@ -1 +1 @@ -!function(e){var t=Prism.languages.powershell={comment:[{pattern:/(^|[^`])<#[\s\S]*?#>/,lookbehind:!0},{pattern:/(^|[^`])#.*/,lookbehind:!0}],string:[{pattern:/"(?:`[\s\S]|[^`"])*"/,greedy:!0,inside:{function:{pattern:/(^|[^`])\$\((?:\$\(.*?\)|(?!\$\()[^\r\n)])*\)/,lookbehind:!0,inside:{}}}},{pattern:/'(?:[^']|'')*'/,greedy:!0}],namespace:/\[[a-z](?:\[(?:\[[^\]]*]|[^\[\]])*]|[^\[\]])*]/i,boolean:/\$(?:true|false)\b/i,variable:/\$\w+\b/i,function:[/\b(?:Add-(?:Computer|Content|History|Member|PSSnapin|Type)|Checkpoint-Computer|Clear-(?:Content|EventLog|History|Item|ItemProperty|Variable)|Compare-Object|Complete-Transaction|Connect-PSSession|ConvertFrom-(?:Csv|Json|StringData)|Convert-Path|ConvertTo-(?:Csv|Html|Json|Xml)|Copy-(?:Item|ItemProperty)|Debug-Process|Disable-(?:ComputerRestore|PSBreakpoint|PSRemoting|PSSessionConfiguration)|Disconnect-PSSession|Enable-(?:ComputerRestore|PSBreakpoint|PSRemoting|PSSessionConfiguration)|Enter-PSSession|Exit-PSSession|Export-(?:Alias|Clixml|Console|Csv|FormatData|ModuleMember|PSSession)|ForEach-Object|Format-(?:Custom|List|Table|Wide)|Get-(?:Alias|ChildItem|Command|ComputerRestorePoint|Content|ControlPanelItem|Culture|Date|Event|EventLog|EventSubscriber|FormatData|Help|History|Host|HotFix|Item|ItemProperty|Job|Location|Member|Module|Process|PSBreakpoint|PSCallStack|PSDrive|PSProvider|PSSession|PSSessionConfiguration|PSSnapin|Random|Service|TraceSource|Transaction|TypeData|UICulture|Unique|Variable|WmiObject)|Group-Object|Import-(?:Alias|Clixml|Csv|LocalizedData|Module|PSSession)|Invoke-(?:Command|Expression|History|Item|RestMethod|WebRequest|WmiMethod)|Join-Path|Limit-EventLog|Measure-(?:Command|Object)|Move-(?:Item|ItemProperty)|New-(?:Alias|Event|EventLog|Item|ItemProperty|Module|ModuleManifest|Object|PSDrive|PSSession|PSSessionConfigurationFile|PSSessionOption|PSTransportOption|Service|TimeSpan|Variable|WebServiceProxy)|Out-(?:Default|File|GridView|Host|Null|Printer|String)|Pop-Location|Push-Location|Read-Host|Receive-(?:Job|PSSession)|Register-(?:EngineEvent|ObjectEvent|PSSessionConfiguration|WmiEvent)|Remove-(?:Computer|Event|EventLog|Item|ItemProperty|Job|Module|PSBreakpoint|PSDrive|PSSession|PSSnapin|TypeData|Variable|WmiObject)|Rename-(?:Computer|Item|ItemProperty)|Reset-ComputerMachinePassword|Resolve-Path|Restart-(?:Computer|Service)|Restore-Computer|Resume-(?:Job|Service)|Save-Help|Select-(?:Object|String|Xml)|Send-MailMessage|Set-(?:Alias|Content|Date|Item|ItemProperty|Location|PSBreakpoint|PSDebug|PSSessionConfiguration|Service|StrictMode|TraceSource|Variable|WmiInstance)|Show-(?:Command|ControlPanelItem|EventLog)|Sort-Object|Split-Path|Start-(?:Job|Process|Service|Sleep|Transaction)|Stop-(?:Computer|Job|Process|Service)|Suspend-(?:Job|Service)|Tee-Object|Test-(?:ComputerSecureChannel|Connection|ModuleManifest|Path|PSSessionConfigurationFile)|Trace-Command|Unblock-File|Undo-Transaction|Unregister-(?:Event|PSSessionConfiguration)|Update-(?:FormatData|Help|List|TypeData)|Use-Transaction|Wait-(?:Event|Job|Process)|Where-Object|Write-(?:Debug|Error|EventLog|Host|Output|Progress|Verbose|Warning))\b/i,/\b(?:ac|cat|chdir|clc|cli|clp|clv|compare|copy|cp|cpi|cpp|cvpa|dbp|del|diff|dir|ebp|echo|epal|epcsv|epsn|erase|fc|fl|ft|fw|gal|gbp|gc|gci|gcs|gdr|gi|gl|gm|gp|gps|group|gsv|gu|gv|gwmi|iex|ii|ipal|ipcsv|ipsn|irm|iwmi|iwr|kill|lp|ls|measure|mi|mount|move|mp|mv|nal|ndr|ni|nv|ogv|popd|ps|pushd|pwd|rbp|rd|rdr|ren|ri|rm|rmdir|rni|rnp|rp|rv|rvpa|rwmi|sal|saps|sasv|sbp|sc|select|set|shcm|si|sl|sleep|sls|sort|sp|spps|spsv|start|sv|swmi|tee|trcm|type|write)\b/i],keyword:/\b(?:Begin|Break|Catch|Class|Continue|Data|Define|Do|DynamicParam|Else|ElseIf|End|Exit|Filter|Finally|For|ForEach|From|Function|If|InlineScript|Parallel|Param|Process|Return|Sequence|Switch|Throw|Trap|Try|Until|Using|Var|While|Workflow)\b/i,operator:{pattern:/(\W?)(?:!|-(?:eq|ne|gt|ge|lt|le|sh[lr]|not|b?(?:and|x?or)|(?:Not)?(?:Like|Match|Contains|In)|Replace|Join|is(?:Not)?|as)\b|-[-=]?|\+[+=]?|[*\/%]=?)/i,lookbehind:!0},punctuation:/[|{}[\];(),.]/},o=t.string[0].inside;o.boolean=t.boolean,o.variable=t.variable,o.function.inside=t}(); \ No newline at end of file +!function(e){var t=Prism.languages.powershell={comment:[{pattern:/(^|[^`])<#[\s\S]*?#>/,lookbehind:!0},{pattern:/(^|[^`])#.*/,lookbehind:!0}],string:[{pattern:/"(?:`[\s\S]|[^`"])*"/,greedy:!0,inside:{function:{pattern:/(^|[^`])\$\((?:\$\([^\r\n()]*\)|(?!\$\()[^\r\n)])*\)/,lookbehind:!0,inside:{}}}},{pattern:/'(?:[^']|'')*'/,greedy:!0}],namespace:/\[[a-z](?:\[(?:\[[^\]]*]|[^\[\]])*]|[^\[\]])*]/i,boolean:/\$(?:true|false)\b/i,variable:/\$\w+\b/i,function:[/\b(?:Add-(?:Computer|Content|History|Member|PSSnapin|Type)|Checkpoint-Computer|Clear-(?:Content|EventLog|History|Item|ItemProperty|Variable)|Compare-Object|Complete-Transaction|Connect-PSSession|ConvertFrom-(?:Csv|Json|StringData)|Convert-Path|ConvertTo-(?:Csv|Html|Json|Xml)|Copy-(?:Item|ItemProperty)|Debug-Process|Disable-(?:ComputerRestore|PSBreakpoint|PSRemoting|PSSessionConfiguration)|Disconnect-PSSession|Enable-(?:ComputerRestore|PSBreakpoint|PSRemoting|PSSessionConfiguration)|Enter-PSSession|Exit-PSSession|Export-(?:Alias|Clixml|Console|Csv|FormatData|ModuleMember|PSSession)|ForEach-Object|Format-(?:Custom|List|Table|Wide)|Get-(?:Alias|ChildItem|Command|ComputerRestorePoint|Content|ControlPanelItem|Culture|Date|Event|EventLog|EventSubscriber|FormatData|Help|History|Host|HotFix|Item|ItemProperty|Job|Location|Member|Module|Process|PSBreakpoint|PSCallStack|PSDrive|PSProvider|PSSession|PSSessionConfiguration|PSSnapin|Random|Service|TraceSource|Transaction|TypeData|UICulture|Unique|Variable|WmiObject)|Group-Object|Import-(?:Alias|Clixml|Csv|LocalizedData|Module|PSSession)|Invoke-(?:Command|Expression|History|Item|RestMethod|WebRequest|WmiMethod)|Join-Path|Limit-EventLog|Measure-(?:Command|Object)|Move-(?:Item|ItemProperty)|New-(?:Alias|Event|EventLog|Item|ItemProperty|Module|ModuleManifest|Object|PSDrive|PSSession|PSSessionConfigurationFile|PSSessionOption|PSTransportOption|Service|TimeSpan|Variable|WebServiceProxy)|Out-(?:Default|File|GridView|Host|Null|Printer|String)|Pop-Location|Push-Location|Read-Host|Receive-(?:Job|PSSession)|Register-(?:EngineEvent|ObjectEvent|PSSessionConfiguration|WmiEvent)|Remove-(?:Computer|Event|EventLog|Item|ItemProperty|Job|Module|PSBreakpoint|PSDrive|PSSession|PSSnapin|TypeData|Variable|WmiObject)|Rename-(?:Computer|Item|ItemProperty)|Reset-ComputerMachinePassword|Resolve-Path|Restart-(?:Computer|Service)|Restore-Computer|Resume-(?:Job|Service)|Save-Help|Select-(?:Object|String|Xml)|Send-MailMessage|Set-(?:Alias|Content|Date|Item|ItemProperty|Location|PSBreakpoint|PSDebug|PSSessionConfiguration|Service|StrictMode|TraceSource|Variable|WmiInstance)|Show-(?:Command|ControlPanelItem|EventLog)|Sort-Object|Split-Path|Start-(?:Job|Process|Service|Sleep|Transaction)|Stop-(?:Computer|Job|Process|Service)|Suspend-(?:Job|Service)|Tee-Object|Test-(?:ComputerSecureChannel|Connection|ModuleManifest|Path|PSSessionConfigurationFile)|Trace-Command|Unblock-File|Undo-Transaction|Unregister-(?:Event|PSSessionConfiguration)|Update-(?:FormatData|Help|List|TypeData)|Use-Transaction|Wait-(?:Event|Job|Process)|Where-Object|Write-(?:Debug|Error|EventLog|Host|Output|Progress|Verbose|Warning))\b/i,/\b(?:ac|cat|chdir|clc|cli|clp|clv|compare|copy|cp|cpi|cpp|cvpa|dbp|del|diff|dir|ebp|echo|epal|epcsv|epsn|erase|fc|fl|ft|fw|gal|gbp|gc|gci|gcs|gdr|gi|gl|gm|gp|gps|group|gsv|gu|gv|gwmi|iex|ii|ipal|ipcsv|ipsn|irm|iwmi|iwr|kill|lp|ls|measure|mi|mount|move|mp|mv|nal|ndr|ni|nv|ogv|popd|ps|pushd|pwd|rbp|rd|rdr|ren|ri|rm|rmdir|rni|rnp|rp|rv|rvpa|rwmi|sal|saps|sasv|sbp|sc|select|set|shcm|si|sl|sleep|sls|sort|sp|spps|spsv|start|sv|swmi|tee|trcm|type|write)\b/i],keyword:/\b(?:Begin|Break|Catch|Class|Continue|Data|Define|Do|DynamicParam|Else|ElseIf|End|Exit|Filter|Finally|For|ForEach|From|Function|If|InlineScript|Parallel|Param|Process|Return|Sequence|Switch|Throw|Trap|Try|Until|Using|Var|While|Workflow)\b/i,operator:{pattern:/(\W?)(?:!|-(?:eq|ne|gt|ge|lt|le|sh[lr]|not|b?(?:and|x?or)|(?:Not)?(?:Like|Match|Contains|In)|Replace|Join|is(?:Not)?|as)\b|-[-=]?|\+[+=]?|[*\/%]=?)/i,lookbehind:!0},punctuation:/[|{}[\];(),.]/},o=t.string[0].inside;o.boolean=t.boolean,o.variable=t.variable,o.function.inside=t}(); \ No newline at end of file diff --git a/components/prism-qml.js b/components/prism-qml.js index 838b3063ed..ac63c3d634 100644 --- a/components/prism-qml.js +++ b/components/prism-qml.js @@ -1,7 +1,7 @@ (function (Prism) { var jsString = /"(?:\\.|[^\\"\r\n])*"|'(?:\\.|[^\\'\r\n])*'/.source; - var jsComment = /\/\/.*|\/\*(?:(?!\*\/)[\s\S])*\*\//.source; + var jsComment = /\/\/.*(?!.)|\/\*(?:[^*]|\*(?!\/))*\*\//.source; var jsExpr = /(?:[^\\()[\]{}"'/]||\/(?![*/])||\(*\)|\[*\]|\{*\}|\\[\s\S])/ .source.replace(//g, function () { return jsString; }).replace(//g, function () { return jsComment; }); diff --git a/components/prism-qml.min.js b/components/prism-qml.min.js index a67fda803f..09fb3f2046 100644 --- a/components/prism-qml.min.js +++ b/components/prism-qml.min.js @@ -1 +1 @@ -!function(e){for(var r="(?:[^\\\\()[\\]{}\"'/]||/(?![*/])||\\(*\\)|\\[*\\]|\\{*\\}|\\\\[^])".replace(//g,function(){return"\"(?:\\\\.|[^\\\\\"\r\n])*\"|'(?:\\\\.|[^\\\\'\r\n])*'"}).replace(//g,function(){return"//.*|/\\*(?:(?!\\*/)[^])*\\*/"}),n=0;n<2;n++)r=r.replace(//g,function(){return r});r=r.replace(//g,"[^\\s\\S]"),e.languages.qml={comment:{pattern:/\/\/.*|\/\*[\s\S]*?\*\//,greedy:!0},"javascript-function":{pattern:RegExp("((?:^|;)[ \t]*)function\\s+[_$a-zA-Z\\xA0-\\uFFFF][$\\w\\xA0-\\uFFFF]*\\s*\\(*\\)\\s*\\{*\\}".replace(//g,function(){return r}),"m"),lookbehind:!0,greedy:!0,alias:"language-javascript",inside:e.languages.javascript},"class-name":{pattern:/((?:^|[:;])[ \t]*)(?!\d)\w+(?=[ \t]*\{|[ \t]+on\b)/m,lookbehind:!0},property:[{pattern:/((?:^|[;{])[ \t]*)(?!\d)\w+(?:\.\w+)*(?=[ \t]*:)/m,lookbehind:!0},{pattern:/((?:^|[;{])[ \t]*)property[ \t]+(?!\d)\w+(?:\.\w+)*[ \t]+(?!\d)\w+(?:\.\w+)*(?=[ \t]*:)/m,lookbehind:!0,inside:{keyword:/^property/,property:/\w+(?:\.\w+)*/}}],"javascript-expression":{pattern:RegExp("(:[ \t]*)(?![\\s;}[])(?:(?!$|[;}]))+".replace(//g,function(){return r}),"m"),lookbehind:!0,greedy:!0,alias:"language-javascript",inside:e.languages.javascript},string:/"(?:\\.|[^\\"\r\n])*"/,keyword:/\b(?:as|import|on)\b/,punctuation:/[{}[\]:;,]/}}(Prism); \ No newline at end of file +!function(e){for(var r="(?:[^\\\\()[\\]{}\"'/]||/(?![*/])||\\(*\\)|\\[*\\]|\\{*\\}|\\\\[^])".replace(//g,function(){return"\"(?:\\\\.|[^\\\\\"\r\n])*\"|'(?:\\\\.|[^\\\\'\r\n])*'"}).replace(//g,function(){return"//.*(?!.)|/\\*(?:[^*]|\\*(?!/))*\\*/"}),n=0;n<2;n++)r=r.replace(//g,function(){return r});r=r.replace(//g,"[^\\s\\S]"),e.languages.qml={comment:{pattern:/\/\/.*|\/\*[\s\S]*?\*\//,greedy:!0},"javascript-function":{pattern:RegExp("((?:^|;)[ \t]*)function\\s+[_$a-zA-Z\\xA0-\\uFFFF][$\\w\\xA0-\\uFFFF]*\\s*\\(*\\)\\s*\\{*\\}".replace(//g,function(){return r}),"m"),lookbehind:!0,greedy:!0,alias:"language-javascript",inside:e.languages.javascript},"class-name":{pattern:/((?:^|[:;])[ \t]*)(?!\d)\w+(?=[ \t]*\{|[ \t]+on\b)/m,lookbehind:!0},property:[{pattern:/((?:^|[;{])[ \t]*)(?!\d)\w+(?:\.\w+)*(?=[ \t]*:)/m,lookbehind:!0},{pattern:/((?:^|[;{])[ \t]*)property[ \t]+(?!\d)\w+(?:\.\w+)*[ \t]+(?!\d)\w+(?:\.\w+)*(?=[ \t]*:)/m,lookbehind:!0,inside:{keyword:/^property/,property:/\w+(?:\.\w+)*/}}],"javascript-expression":{pattern:RegExp("(:[ \t]*)(?![\\s;}[])(?:(?!$|[;}]))+".replace(//g,function(){return r}),"m"),lookbehind:!0,greedy:!0,alias:"language-javascript",inside:e.languages.javascript},string:/"(?:\\.|[^\\"\r\n])*"/,keyword:/\b(?:as|import|on)\b/,punctuation:/[{}[\]:;,]/}}(Prism); \ No newline at end of file diff --git a/components/prism-rip.js b/components/prism-rip.js index f57be147c6..3a8a8cb8b3 100644 --- a/components/prism-rip.js +++ b/components/prism-rip.js @@ -14,7 +14,7 @@ Prism.languages.rip = { 'character': /\B`[^\s`'",.:;#\/\\()<>\[\]{}]\b/, 'regex': { - pattern: /(^|[^/])\/(?!\/)(?:\[.+?]|\\.|[^/\\\r\n])+\/(?=\s*(?:$|[\r\n,.;})]))/, + pattern: /(^|[^/])\/(?!\/)(?:\[[^\n\r\]]*\]|\\.|[^/\\\r\n\[])+\/(?=\s*(?:$|[\r\n,.;})]))/, lookbehind: true, greedy: true }, diff --git a/components/prism-rip.min.js b/components/prism-rip.min.js index ee6ca0c105..eb6f02f361 100644 --- a/components/prism-rip.min.js +++ b/components/prism-rip.min.js @@ -1 +1 @@ -Prism.languages.rip={comment:/#.*/,keyword:/(?:=>|->)|\b(?:class|if|else|switch|case|return|exit|try|catch|finally|raise)\b/,builtin:/@|\bSystem\b/,boolean:/\b(?:true|false)\b/,date:/\b\d{4}-\d{2}-\d{2}\b/,time:/\b\d{2}:\d{2}:\d{2}\b/,datetime:/\b\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\b/,character:/\B`[^\s`'",.:;#\/\\()<>\[\]{}]\b/,regex:{pattern:/(^|[^/])\/(?!\/)(?:\[.+?]|\\.|[^/\\\r\n])+\/(?=\s*(?:$|[\r\n,.;})]))/,lookbehind:!0,greedy:!0},symbol:/:[^\d\s`'",.:;#\/\\()<>\[\]{}][^\s`'",.:;#\/\\()<>\[\]{}]*/,string:{pattern:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0},number:/[+-]?(?:(?:\d+\.\d+)|(?:\d+))/,punctuation:/(?:\.{2,3})|[`,.:;=\/\\()<>\[\]{}]/,reference:/[^\d\s`'",.:;#\/\\()<>\[\]{}][^\s`'",.:;#\/\\()<>\[\]{}]*/}; \ No newline at end of file +Prism.languages.rip={comment:/#.*/,keyword:/(?:=>|->)|\b(?:class|if|else|switch|case|return|exit|try|catch|finally|raise)\b/,builtin:/@|\bSystem\b/,boolean:/\b(?:true|false)\b/,date:/\b\d{4}-\d{2}-\d{2}\b/,time:/\b\d{2}:\d{2}:\d{2}\b/,datetime:/\b\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\b/,character:/\B`[^\s`'",.:;#\/\\()<>\[\]{}]\b/,regex:{pattern:/(^|[^/])\/(?!\/)(?:\[[^\n\r\]]*\]|\\.|[^/\\\r\n\[])+\/(?=\s*(?:$|[\r\n,.;})]))/,lookbehind:!0,greedy:!0},symbol:/:[^\d\s`'",.:;#\/\\()<>\[\]{}][^\s`'",.:;#\/\\()<>\[\]{}]*/,string:{pattern:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0},number:/[+-]?(?:(?:\d+\.\d+)|(?:\d+))/,punctuation:/(?:\.{2,3})|[`,.:;=\/\\()<>\[\]{}]/,reference:/[^\d\s`'",.:;#\/\\()<>\[\]{}][^\s`'",.:;#\/\\()<>\[\]{}]*/}; \ No newline at end of file diff --git a/components/prism-robotframework.js b/components/prism-robotframework.js index ec0dd6a319..df925ff3be 100644 --- a/components/prism-robotframework.js +++ b/components/prism-robotframework.js @@ -46,7 +46,7 @@ var docTag = { - pattern: /(\[Documentation\](?: |\t)[ \t]*)(?![ \t]|#)(?:.|[ \t]*(?:\r\n?|\n)[ \t]*\.{3}[ \t]*)+/, + pattern: /(\[Documentation\](?: |\t)[ \t]*)(?![ \t]|#)(?:.|(?:\r\n?|\n)[ \t]*\.{3})+/, lookbehind: true, alias: 'string' }; @@ -71,7 +71,7 @@ Prism.languages['robotframework'] = { 'settings': createSection('Settings', { 'documentation': { - pattern: /([\r\n] ?Documentation(?: |\t)[ \t]*)(?![ \t]|#)(?:.|[ \t]*(?:\r\n?|\n)[ \t]*\.{3}[ \t]*)+/, + pattern: /([\r\n] ?Documentation(?: |\t)[ \t]*)(?![ \t]|#)(?:.|(?:\r\n?|\n)[ \t]*\.{3})+/, lookbehind: true, alias: 'string' }, diff --git a/components/prism-robotframework.min.js b/components/prism-robotframework.min.js index 842d9a330f..0e388aa70c 100644 --- a/components/prism-robotframework.min.js +++ b/components/prism-robotframework.min.js @@ -1 +1 @@ -!function(t){var r={pattern:/(^[ \t]*| {2}|\t)#.*/m,lookbehind:!0,greedy:!0},o={pattern:/((?:^|[^\\])(?:\\{2})*)[$@&%]\{(?:[^{}\r\n]|\{[^{}\r\n]*\})*\}/,lookbehind:!0,inside:{punctuation:/^[$@&%]\{|\}$/}};function n(t,n){var e={"section-header":{pattern:/^ ?\*{3}.+?\*{3}/,alias:"keyword"}};for(var a in n)e[a]=n[a];return e.tag={pattern:/([\r\n](?: |\t)[ \t]*)\[[-\w]+\]/,lookbehind:!0,inside:{punctuation:/\[|\]/}},e.variable=o,e.comment=r,{pattern:RegExp("^ ?\\*{3}[ \t]*[ \t]*\\*{3}(?:.|[\r\n](?!\\*{3}))*".replace(//g,function(){return t}),"im"),alias:"section",inside:e}}var e={pattern:/(\[Documentation\](?: |\t)[ \t]*)(?![ \t]|#)(?:.|[ \t]*(?:\r\n?|\n)[ \t]*\.{3}[ \t]*)+/,lookbehind:!0,alias:"string"},a={pattern:/([\r\n] ?)(?!#)(?:\S(?:[ \t]\S)*)+/,lookbehind:!0,alias:"function",inside:{variable:o}},i={pattern:/([\r\n](?: |\t)[ \t]*)(?!\[|\.{3}|#)(?:\S(?:[ \t]\S)*)+/,lookbehind:!0,inside:{variable:o}};t.languages.robotframework={settings:n("Settings",{documentation:{pattern:/([\r\n] ?Documentation(?: |\t)[ \t]*)(?![ \t]|#)(?:.|[ \t]*(?:\r\n?|\n)[ \t]*\.{3}[ \t]*)+/,lookbehind:!0,alias:"string"},property:{pattern:/([\r\n] ?)(?!\.{3}|#)(?:\S(?:[ \t]\S)*)+/,lookbehind:!0}}),variables:n("Variables"),"test-cases":n("Test Cases",{"test-name":a,documentation:e,property:i}),keywords:n("Keywords",{"keyword-name":a,documentation:e,property:i}),tasks:n("Tasks",{"task-name":a,documentation:e,property:i}),comment:r},t.languages.robot=t.languages.robotframework}(Prism); \ No newline at end of file +!function(t){var r={pattern:/(^[ \t]*| {2}|\t)#.*/m,lookbehind:!0,greedy:!0},o={pattern:/((?:^|[^\\])(?:\\{2})*)[$@&%]\{(?:[^{}\r\n]|\{[^{}\r\n]*\})*\}/,lookbehind:!0,inside:{punctuation:/^[$@&%]\{|\}$/}};function n(t,n){var e={"section-header":{pattern:/^ ?\*{3}.+?\*{3}/,alias:"keyword"}};for(var a in n)e[a]=n[a];return e.tag={pattern:/([\r\n](?: |\t)[ \t]*)\[[-\w]+\]/,lookbehind:!0,inside:{punctuation:/\[|\]/}},e.variable=o,e.comment=r,{pattern:RegExp("^ ?\\*{3}[ \t]*[ \t]*\\*{3}(?:.|[\r\n](?!\\*{3}))*".replace(//g,function(){return t}),"im"),alias:"section",inside:e}}var e={pattern:/(\[Documentation\](?: |\t)[ \t]*)(?![ \t]|#)(?:.|(?:\r\n?|\n)[ \t]*\.{3})+/,lookbehind:!0,alias:"string"},a={pattern:/([\r\n] ?)(?!#)(?:\S(?:[ \t]\S)*)+/,lookbehind:!0,alias:"function",inside:{variable:o}},i={pattern:/([\r\n](?: |\t)[ \t]*)(?!\[|\.{3}|#)(?:\S(?:[ \t]\S)*)+/,lookbehind:!0,inside:{variable:o}};t.languages.robotframework={settings:n("Settings",{documentation:{pattern:/([\r\n] ?Documentation(?: |\t)[ \t]*)(?![ \t]|#)(?:.|(?:\r\n?|\n)[ \t]*\.{3})+/,lookbehind:!0,alias:"string"},property:{pattern:/([\r\n] ?)(?!\.{3}|#)(?:\S(?:[ \t]\S)*)+/,lookbehind:!0}}),variables:n("Variables"),"test-cases":n("Test Cases",{"test-name":a,documentation:e,property:i}),keywords:n("Keywords",{"keyword-name":a,documentation:e,property:i}),tasks:n("Tasks",{"task-name":a,documentation:e,property:i}),comment:r},t.languages.robot=t.languages.robotframework}(Prism); \ No newline at end of file diff --git a/components/prism-shell-session.js b/components/prism-shell-session.js index 953080ce68..2d6ca7bb33 100644 --- a/components/prism-shell-session.js +++ b/components/prism-shell-session.js @@ -10,11 +10,11 @@ // here doc // 1 capturing group - /<<-?\s*(\w+?)\s*(?:\r?\n|\r)[\s\S]*?(?:\r?\n|\r)\2/.source, + /<<-?\s*(\w+?)[ \t]*(?!.)[\s\S]*?[\r\n]\2/.source, // here doc quoted // 2 capturing group - /<<-?\s*(["'])(\w+)\3\s*(?:\r?\n|\r)[\s\S]*?(?:\r?\n|\r)\4/.source + /<<-?\s*(["'])(\w+)\3[ \t]*(?!.)[\s\S]*?[\r\n]\4/.source ].join('|'); Prism.languages['shell-session'] = { @@ -48,7 +48,7 @@ } } }, - 'output': /.(?:.*(?:\r\n?|\n|.$))*/ + 'output': /.(?:.*(?:[\r\n]|.$))*/ }; }(Prism)); diff --git a/components/prism-shell-session.min.js b/components/prism-shell-session.min.js index c2a733e00e..1bfb2081cc 100644 --- a/components/prism-shell-session.min.js +++ b/components/prism-shell-session.min.js @@ -1 +1 @@ -!function(n){var s=["([\"'])(?:\\\\[^]|\\$\\([^)]+\\)|`[^`]+`|(?!\\1)[^\\\\])*\\1","<<-?\\s*(\\w+?)\\s*(?:\r?\n|\r)[^]*?(?:\r?\n|\r)\\2","<<-?\\s*([\"'])(\\w+)\\3\\s*(?:\r?\n|\r)[^]*?(?:\r?\n|\r)\\4"].join("|");n.languages["shell-session"]={info:{pattern:/^[^\r\n$#*!]+(?=[$#])/m,alias:"punctuation",inside:{path:{pattern:/(:)[\s\S]+/,lookbehind:!0},user:/^[^\s@:$#*!/\\]+@[^\s@:$#*!/\\]+(?=:|$)/,punctuation:/:/}},command:{pattern:RegExp("[$#](?:[^\\\\\r\n'\"<]|\\\\.|<>)+".replace(/<>/g,function(){return s})),greedy:!0,inside:{bash:{pattern:/(^[$#]\s*)[\s\S]+/,lookbehind:!0,alias:"language-bash",inside:n.languages.bash},"shell-symbol":{pattern:/^[$#]/,alias:"important"}}},output:/.(?:.*(?:\r\n?|\n|.$))*/}}(Prism); \ No newline at end of file +!function(n){var s=["([\"'])(?:\\\\[^]|\\$\\([^)]+\\)|`[^`]+`|(?!\\1)[^\\\\])*\\1","<<-?\\s*(\\w+?)[ \t]*(?!.)[^]*?[\r\n]\\2","<<-?\\s*([\"'])(\\w+)\\3[ \t]*(?!.)[^]*?[\r\n]\\4"].join("|");n.languages["shell-session"]={info:{pattern:/^[^\r\n$#*!]+(?=[$#])/m,alias:"punctuation",inside:{path:{pattern:/(:)[\s\S]+/,lookbehind:!0},user:/^[^\s@:$#*!/\\]+@[^\s@:$#*!/\\]+(?=:|$)/,punctuation:/:/}},command:{pattern:RegExp("[$#](?:[^\\\\\r\n'\"<]|\\\\.|<>)+".replace(/<>/g,function(){return s})),greedy:!0,inside:{bash:{pattern:/(^[$#]\s*)[\s\S]+/,lookbehind:!0,alias:"language-bash",inside:n.languages.bash},"shell-symbol":{pattern:/^[$#]/,alias:"important"}}},output:/.(?:.*(?:[\r\n]|.$))*/}}(Prism); \ No newline at end of file diff --git a/components/prism-textile.js b/components/prism-textile.js index c801995382..a190971166 100644 --- a/components/prism-textile.js +++ b/components/prism-textile.js @@ -1,7 +1,22 @@ (function (Prism) { // We don't allow for pipes inside parentheses // to not break table pattern |(. foo |). bar | - var modifierRegex = /(?:\([^|)]+\)|\[[^\]]+\]|\{[^}]+\})+/.source; + var modifierRegex = /\([^|()\n]+\)|\[[^\]\n]+\]|\{[^}\n]+\}/.source; + // Opening and closing parentheses which are not a modifier + // This pattern is necessary to prevent exponential backtracking + var parenthesesRegex = /\)|\((?![^|()\n]+\))/.source; + /** + * @param {string} source + * @param {string} [flags] + */ + function withModifier(source, flags) { + return RegExp( + source + .replace(//g, function () { return '(?:' + modifierRegex + ')'; }) + .replace(//g, function () { return '(?:' + parenthesesRegex + ')'; }), + flags || ''); + } + var modifierTokens = { 'css': { pattern: /\{[^}]+\}/, @@ -32,10 +47,10 @@ // h1. Header 1 'block-tag': { - pattern: RegExp('^[a-z]\\w*(?:' + modifierRegex + '|[<>=()])*\\.'), + pattern: withModifier(/^[a-z]\w*(?:||[<>=])*\./.source), inside: { 'modifier': { - pattern: RegExp('(^[a-z]\\w*)(?:' + modifierRegex + '|[<>=()])+(?=\\.)'), + pattern: withModifier(/(^[a-z]\w*)(?:||[<>=])+(?=\.)/.source), lookbehind: true, inside: modifierTokens }, @@ -47,10 +62,10 @@ // # List item // * List item 'list': { - pattern: RegExp('^[*#]+(?:' + modifierRegex + ')?\\s+.+', 'm'), + pattern: withModifier(/^[*#]+*\s+.+/.source, 'm'), inside: { 'modifier': { - pattern: RegExp('(^[*#]+)' + modifierRegex), + pattern: withModifier(/(^[*#]+)+/.source), lookbehind: true, inside: modifierTokens }, @@ -62,12 +77,12 @@ 'table': { // Modifiers can be applied to the row: {color:red}.|1|2|3| // or the cell: |{color:red}.1|2|3| - pattern: RegExp('^(?:(?:' + modifierRegex + '|[<>=()^~])+\\.\\s*)?(?:\\|(?:(?:' + modifierRegex + '|[<>=()^~_]|[\\\\/]\\d+)+\\.)?[^|]*)+\\|', 'm'), + pattern: withModifier(/^(?:(?:||[<>=^~])+\.\s*)?(?:\|(?:(?:||[<>=^~_]|[\\/]\d+)+\.)?[^|]*)+\|/.source, 'm'), inside: { 'modifier': { // Modifiers for rows after the first one are // preceded by a pipe and a line feed - pattern: RegExp('(^|\\|(?:\\r?\\n|\\r)?)(?:' + modifierRegex + '|[<>=()^~_]|[\\\\/]\\d+)+(?=\\.)'), + pattern: withModifier(/(^|\|(?:\r?\n|\r)?)(?:||[<>=^~_]|[\\/]\d+)+(?=\.)/.source), lookbehind: true, inside: modifierTokens }, @@ -76,56 +91,56 @@ }, 'inline': { - pattern: RegExp('(\\*\\*|__|\\?\\?|[*_%@+\\-^~])(?:' + modifierRegex + ')?.+?\\1'), + pattern: withModifier(/(\*\*|__|\?\?|[*_%@+\-^~])*.+?\1/.source), inside: { // Note: superscripts and subscripts are not handled specifically // *bold*, **bold** 'bold': { - pattern: RegExp('(^(\\*\\*?)(?:' + modifierRegex + ')?).+?(?=\\2)'), + pattern: withModifier(/(^(\*\*?)*).+?(?=\2)/.source), lookbehind: true }, // _italic_, __italic__ 'italic': { - pattern: RegExp('(^(__?)(?:' + modifierRegex + ')?).+?(?=\\2)'), + pattern: withModifier(/(^(__?)*).+?(?=\2)/.source), lookbehind: true }, // ??cite?? 'cite': { - pattern: RegExp('(^\\?\\?(?:' + modifierRegex + ')?).+?(?=\\?\\?)'), + pattern: withModifier(/(^\?\?*).+?(?=\?\?)/.source), lookbehind: true, alias: 'string' }, // @code@ 'code': { - pattern: RegExp('(^@(?:' + modifierRegex + ')?).+?(?=@)'), + pattern: withModifier(/(^@*).+?(?=@)/.source), lookbehind: true, alias: 'keyword' }, // +inserted+ 'inserted': { - pattern: RegExp('(^\\+(?:' + modifierRegex + ')?).+?(?=\\+)'), + pattern: withModifier(/(^\+*).+?(?=\+)/.source), lookbehind: true }, // -deleted- 'deleted': { - pattern: RegExp('(^-(?:' + modifierRegex + ')?).+?(?=-)'), + pattern: withModifier(/(^-*).+?(?=-)/.source), lookbehind: true }, // %span% 'span': { - pattern: RegExp('(^%(?:' + modifierRegex + ')?).+?(?=%)'), + pattern: withModifier(/(^%*).+?(?=%)/.source), lookbehind: true }, 'modifier': { - pattern: RegExp('(^\\*\\*|__|\\?\\?|[*_%@+\\-^~])' + modifierRegex), + pattern: withModifier(/(^\*\*|__|\?\?|[*_%@+\-^~])+/.source), lookbehind: true, inside: modifierTokens }, @@ -152,14 +167,14 @@ // "text":http://example.com // "text":link-ref 'link': { - pattern: RegExp('"(?:' + modifierRegex + ')?[^"]+":.+?(?=[^\\w/]?(?:\\s|$))'), + pattern: withModifier(/"*[^"]+":.+?(?=[^\w/]?(?:\s|$))/.source), inside: { 'text': { - pattern: RegExp('(^"(?:' + modifierRegex + ')?)[^"]+(?=")'), + pattern: withModifier(/(^"*)[^"]+(?=")/.source), lookbehind: true }, 'modifier': { - pattern: RegExp('(^")' + modifierRegex), + pattern: withModifier(/(^")+/.source), lookbehind: true, inside: modifierTokens }, @@ -174,15 +189,15 @@ // !image.jpg! // !image.jpg(Title)!:http://example.com 'image': { - pattern: RegExp('!(?:' + modifierRegex + '|[<>=()])*[^!\\s()]+(?:\\([^)]+\\))?!(?::.+?(?=[^\\w/]?(?:\\s|$)))?'), + pattern: withModifier(/!(?:||[<>=])*[^!\s()]+(?:\([^)]+\))?!(?::.+?(?=[^\w/]?(?:\s|$)))?/.source), inside: { 'source': { - pattern: RegExp('(^!(?:' + modifierRegex + '|[<>=()])*)[^!\\s()]+(?:\\([^)]+\\))?(?=!)'), + pattern: withModifier(/(^!(?:||[<>=])*)[^!\s()]+(?:\([^)]+\))?(?=!)/.source), lookbehind: true, alias: 'url' }, 'modifier': { - pattern: RegExp('(^!)(?:' + modifierRegex + '|[<>=()])+'), + pattern: withModifier(/(^!)(?:||[<>=])+/.source), lookbehind: true, inside: modifierTokens }, diff --git a/components/prism-textile.min.js b/components/prism-textile.min.js index 025150e245..ea7920f2fb 100644 --- a/components/prism-textile.min.js +++ b/components/prism-textile.min.js @@ -1 +1 @@ -!function(e){var n="(?:\\([^|)]+\\)|\\[[^\\]]+\\]|\\{[^}]+\\})+",i={css:{pattern:/\{[^}]+\}/,inside:{rest:e.languages.css}},"class-id":{pattern:/(\()[^)]+(?=\))/,lookbehind:!0,alias:"attr-value"},lang:{pattern:/(\[)[^\]]+(?=\])/,lookbehind:!0,alias:"attr-value"},punctuation:/[\\\/]\d+|\S/},t=e.languages.textile=e.languages.extend("markup",{phrase:{pattern:/(^|\r|\n)\S[\s\S]*?(?=$|\r?\n\r?\n|\r\r)/,lookbehind:!0,inside:{"block-tag":{pattern:RegExp("^[a-z]\\w*(?:"+n+"|[<>=()])*\\."),inside:{modifier:{pattern:RegExp("(^[a-z]\\w*)(?:"+n+"|[<>=()])+(?=\\.)"),lookbehind:!0,inside:i},tag:/^[a-z]\w*/,punctuation:/\.$/}},list:{pattern:RegExp("^[*#]+(?:"+n+")?\\s+.+","m"),inside:{modifier:{pattern:RegExp("(^[*#]+)"+n),lookbehind:!0,inside:i},punctuation:/^[*#]+/}},table:{pattern:RegExp("^(?:(?:"+n+"|[<>=()^~])+\\.\\s*)?(?:\\|(?:(?:"+n+"|[<>=()^~_]|[\\\\/]\\d+)+\\.)?[^|]*)+\\|","m"),inside:{modifier:{pattern:RegExp("(^|\\|(?:\\r?\\n|\\r)?)(?:"+n+"|[<>=()^~_]|[\\\\/]\\d+)+(?=\\.)"),lookbehind:!0,inside:i},punctuation:/\||^\./}},inline:{pattern:RegExp("(\\*\\*|__|\\?\\?|[*_%@+\\-^~])(?:"+n+")?.+?\\1"),inside:{bold:{pattern:RegExp("(^(\\*\\*?)(?:"+n+")?).+?(?=\\2)"),lookbehind:!0},italic:{pattern:RegExp("(^(__?)(?:"+n+")?).+?(?=\\2)"),lookbehind:!0},cite:{pattern:RegExp("(^\\?\\?(?:"+n+")?).+?(?=\\?\\?)"),lookbehind:!0,alias:"string"},code:{pattern:RegExp("(^@(?:"+n+")?).+?(?=@)"),lookbehind:!0,alias:"keyword"},inserted:{pattern:RegExp("(^\\+(?:"+n+")?).+?(?=\\+)"),lookbehind:!0},deleted:{pattern:RegExp("(^-(?:"+n+")?).+?(?=-)"),lookbehind:!0},span:{pattern:RegExp("(^%(?:"+n+")?).+?(?=%)"),lookbehind:!0},modifier:{pattern:RegExp("(^\\*\\*|__|\\?\\?|[*_%@+\\-^~])"+n),lookbehind:!0,inside:i},punctuation:/[*_%?@+\-^~]+/}},"link-ref":{pattern:/^\[[^\]]+\]\S+$/m,inside:{string:{pattern:/(\[)[^\]]+(?=\])/,lookbehind:!0},url:{pattern:/(\])\S+$/,lookbehind:!0},punctuation:/[\[\]]/}},link:{pattern:RegExp('"(?:'+n+')?[^"]+":.+?(?=[^\\w/]?(?:\\s|$))'),inside:{text:{pattern:RegExp('(^"(?:'+n+')?)[^"]+(?=")'),lookbehind:!0},modifier:{pattern:RegExp('(^")'+n),lookbehind:!0,inside:i},url:{pattern:/(:).+/,lookbehind:!0},punctuation:/[":]/}},image:{pattern:RegExp("!(?:"+n+"|[<>=()])*[^!\\s()]+(?:\\([^)]+\\))?!(?::.+?(?=[^\\w/]?(?:\\s|$)))?"),inside:{source:{pattern:RegExp("(^!(?:"+n+"|[<>=()])*)[^!\\s()]+(?:\\([^)]+\\))?(?=!)"),lookbehind:!0,alias:"url"},modifier:{pattern:RegExp("(^!)(?:"+n+"|[<>=()])+"),lookbehind:!0,inside:i},url:{pattern:/(:).+/,lookbehind:!0},punctuation:/[!:]/}},footnote:{pattern:/\b\[\d+\]/,alias:"comment",inside:{punctuation:/\[|\]/}},acronym:{pattern:/\b[A-Z\d]+\([^)]+\)/,inside:{comment:{pattern:/(\()[^)]+(?=\))/,lookbehind:!0},punctuation:/[()]/}},mark:{pattern:/\b\((?:TM|R|C)\)/,alias:"comment",inside:{punctuation:/[()]/}}}}}),a=t.phrase.inside,o={inline:a.inline,link:a.link,image:a.image,footnote:a.footnote,acronym:a.acronym,mark:a.mark};t.tag.pattern=/<\/?(?!\d)[a-z0-9]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s'">=]+))?)*\s*\/?>/i;var r=a.inline.inside;r.bold.inside=o,r.italic.inside=o,r.inserted.inside=o,r.deleted.inside=o,r.span.inside=o;var d=a.table.inside;d.inline=o.inline,d.link=o.link,d.image=o.image,d.footnote=o.footnote,d.acronym=o.acronym,d.mark=o.mark}(Prism); \ No newline at end of file +!function(n){function e(n,e){return RegExp(n.replace(//g,function(){return"(?:\\([^|()\n]+\\)|\\[[^\\]\n]+\\]|\\{[^}\n]+\\})"}).replace(//g,function(){return"(?:\\)|\\((?![^|()\n]+\\)))"}),e||"")}var i={css:{pattern:/\{[^}]+\}/,inside:{rest:n.languages.css}},"class-id":{pattern:/(\()[^)]+(?=\))/,lookbehind:!0,alias:"attr-value"},lang:{pattern:/(\[)[^\]]+(?=\])/,lookbehind:!0,alias:"attr-value"},punctuation:/[\\\/]\d+|\S/},t=n.languages.textile=n.languages.extend("markup",{phrase:{pattern:/(^|\r|\n)\S[\s\S]*?(?=$|\r?\n\r?\n|\r\r)/,lookbehind:!0,inside:{"block-tag":{pattern:e("^[a-z]\\w*(?:||[<>=])*\\."),inside:{modifier:{pattern:e("(^[a-z]\\w*)(?:||[<>=])+(?=\\.)"),lookbehind:!0,inside:i},tag:/^[a-z]\w*/,punctuation:/\.$/}},list:{pattern:e("^[*#]+*\\s+.+","m"),inside:{modifier:{pattern:e("(^[*#]+)+"),lookbehind:!0,inside:i},punctuation:/^[*#]+/}},table:{pattern:e("^(?:(?:||[<>=^~])+\\.\\s*)?(?:\\|(?:(?:||[<>=^~_]|[\\\\/]\\d+)+\\.)?[^|]*)+\\|","m"),inside:{modifier:{pattern:e("(^|\\|(?:\r?\n|\r)?)(?:||[<>=^~_]|[\\\\/]\\d+)+(?=\\.)"),lookbehind:!0,inside:i},punctuation:/\||^\./}},inline:{pattern:e("(\\*\\*|__|\\?\\?|[*_%@+\\-^~])*.+?\\1"),inside:{bold:{pattern:e("(^(\\*\\*?)*).+?(?=\\2)"),lookbehind:!0},italic:{pattern:e("(^(__?)*).+?(?=\\2)"),lookbehind:!0},cite:{pattern:e("(^\\?\\?*).+?(?=\\?\\?)"),lookbehind:!0,alias:"string"},code:{pattern:e("(^@*).+?(?=@)"),lookbehind:!0,alias:"keyword"},inserted:{pattern:e("(^\\+*).+?(?=\\+)"),lookbehind:!0},deleted:{pattern:e("(^-*).+?(?=-)"),lookbehind:!0},span:{pattern:e("(^%*).+?(?=%)"),lookbehind:!0},modifier:{pattern:e("(^\\*\\*|__|\\?\\?|[*_%@+\\-^~])+"),lookbehind:!0,inside:i},punctuation:/[*_%?@+\-^~]+/}},"link-ref":{pattern:/^\[[^\]]+\]\S+$/m,inside:{string:{pattern:/(\[)[^\]]+(?=\])/,lookbehind:!0},url:{pattern:/(\])\S+$/,lookbehind:!0},punctuation:/[\[\]]/}},link:{pattern:e('"*[^"]+":.+?(?=[^\\w/]?(?:\\s|$))'),inside:{text:{pattern:e('(^"*)[^"]+(?=")'),lookbehind:!0},modifier:{pattern:e('(^")+'),lookbehind:!0,inside:i},url:{pattern:/(:).+/,lookbehind:!0},punctuation:/[":]/}},image:{pattern:e("!(?:||[<>=])*[^!\\s()]+(?:\\([^)]+\\))?!(?::.+?(?=[^\\w/]?(?:\\s|$)))?"),inside:{source:{pattern:e("(^!(?:||[<>=])*)[^!\\s()]+(?:\\([^)]+\\))?(?=!)"),lookbehind:!0,alias:"url"},modifier:{pattern:e("(^!)(?:||[<>=])+"),lookbehind:!0,inside:i},url:{pattern:/(:).+/,lookbehind:!0},punctuation:/[!:]/}},footnote:{pattern:/\b\[\d+\]/,alias:"comment",inside:{punctuation:/\[|\]/}},acronym:{pattern:/\b[A-Z\d]+\([^)]+\)/,inside:{comment:{pattern:/(\()[^)]+(?=\))/,lookbehind:!0},punctuation:/[()]/}},mark:{pattern:/\b\((?:TM|R|C)\)/,alias:"comment",inside:{punctuation:/[()]/}}}}}),a=t.phrase.inside,o={inline:a.inline,link:a.link,image:a.image,footnote:a.footnote,acronym:a.acronym,mark:a.mark};t.tag.pattern=/<\/?(?!\d)[a-z0-9]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s'">=]+))?)*\s*\/?>/i;var r=a.inline.inside;r.bold.inside=o,r.italic.inside=o,r.inserted.inside=o,r.deleted.inside=o,r.span.inside=o;var d=a.table.inside;d.inline=o.inline,d.link=o.link,d.image=o.image,d.footnote=o.footnote,d.acronym=o.acronym,d.mark=o.mark}(Prism); \ No newline at end of file diff --git a/components/prism-toml.js b/components/prism-toml.js index e911d89ee3..4ab785f149 100644 --- a/components/prism-toml.js +++ b/components/prism-toml.js @@ -1,7 +1,13 @@ (function (Prism) { - // pattern: /(?:[\w-]+|'[^'\n\r]*'|"(?:\.|[^\\"\r\n])*")/ - var key = "(?:[\\w-]+|'[^'\n\r]*'|\"(?:\\.|[^\\\\\"\r\n])*\")"; + var key = /(?:[\w-]+|'[^'\n\r]*'|"(?:\\.|[^\\"\r\n])*")/.source; + + /** + * @param {string} pattern + */ + function insertKey(pattern) { + return pattern.replace(/__/g, function () { return key; }); + } Prism.languages.toml = { 'comment': { @@ -9,13 +15,13 @@ greedy: true }, 'table': { - pattern: RegExp("(^\\s*\\[\\s*(?:\\[\\s*)?)" + key + "(?:\\s*\\.\\s*" + key + ")*(?=\\s*\\])", "m"), + pattern: RegExp(insertKey(/(^\s*\[\s*(?:\[\s*)?)__(?:\s*\.\s*__)*(?=\s*\])/.source), 'm'), lookbehind: true, greedy: true, alias: 'class-name' }, 'key': { - pattern: RegExp("(^\\s*|[{,]\\s*)" + key + "(?:\\s*\\.\\s*" + key + ")*(?=\\s*=)", "m"), + pattern: RegExp(insertKey(/(^\s*|[{,]\s*)__(?:\s*\.\s*__)*(?=\s*=)/.source), 'm'), lookbehind: true, greedy: true, alias: 'property' diff --git a/components/prism-toml.min.js b/components/prism-toml.min.js index f0ffbd4c82..4670192798 100644 --- a/components/prism-toml.min.js +++ b/components/prism-toml.min.js @@ -1 +1 @@ -!function(e){var d="(?:[\\w-]+|'[^'\n\r]*'|\"(?:\\.|[^\\\\\"\r\n])*\")";Prism.languages.toml={comment:{pattern:/#.*/,greedy:!0},table:{pattern:RegExp("(^\\s*\\[\\s*(?:\\[\\s*)?)"+d+"(?:\\s*\\.\\s*"+d+")*(?=\\s*\\])","m"),lookbehind:!0,greedy:!0,alias:"class-name"},key:{pattern:RegExp("(^\\s*|[{,]\\s*)"+d+"(?:\\s*\\.\\s*"+d+")*(?=\\s*=)","m"),lookbehind:!0,greedy:!0,alias:"property"},string:{pattern:/"""(?:\\[\s\S]|[^\\])*?"""|'''[\s\S]*?'''|'[^'\n\r]*'|"(?:\\.|[^\\"\r\n])*"/,greedy:!0},date:[{pattern:/\d{4}-\d{2}-\d{2}(?:[T\s]\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|[+-]\d{2}:\d{2})?)?/i,alias:"number"},{pattern:/\d{2}:\d{2}:\d{2}(?:\.\d+)?/i,alias:"number"}],number:/(?:\b0(?:x[\da-zA-Z]+(?:_[\da-zA-Z]+)*|o[0-7]+(?:_[0-7]+)*|b[10]+(?:_[10]+)*))\b|[-+]?\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?\b|[-+]?(?:inf|nan)\b/,boolean:/\b(?:true|false)\b/,punctuation:/[.,=[\]{}]/}}(); \ No newline at end of file +!function(e){function n(e){return e.replace(/__/g,function(){return"(?:[\\w-]+|'[^'\n\r]*'|\"(?:\\\\.|[^\\\\\"\r\n])*\")"})}e.languages.toml={comment:{pattern:/#.*/,greedy:!0},table:{pattern:RegExp(n("(^\\s*\\[\\s*(?:\\[\\s*)?)__(?:\\s*\\.\\s*__)*(?=\\s*\\])"),"m"),lookbehind:!0,greedy:!0,alias:"class-name"},key:{pattern:RegExp(n("(^\\s*|[{,]\\s*)__(?:\\s*\\.\\s*__)*(?=\\s*=)"),"m"),lookbehind:!0,greedy:!0,alias:"property"},string:{pattern:/"""(?:\\[\s\S]|[^\\])*?"""|'''[\s\S]*?'''|'[^'\n\r]*'|"(?:\\.|[^\\"\r\n])*"/,greedy:!0},date:[{pattern:/\d{4}-\d{2}-\d{2}(?:[T\s]\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|[+-]\d{2}:\d{2})?)?/i,alias:"number"},{pattern:/\d{2}:\d{2}:\d{2}(?:\.\d+)?/i,alias:"number"}],number:/(?:\b0(?:x[\da-zA-Z]+(?:_[\da-zA-Z]+)*|o[0-7]+(?:_[0-7]+)*|b[10]+(?:_[10]+)*))\b|[-+]?\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?\b|[-+]?(?:inf|nan)\b/,boolean:/\b(?:true|false)\b/,punctuation:/[.,=[\]{}]/}}(Prism); \ No newline at end of file diff --git a/components/prism-turtle.js b/components/prism-turtle.js index e11da7e864..4e477a82d2 100644 --- a/components/prism-turtle.js +++ b/components/prism-turtle.js @@ -16,7 +16,7 @@ Prism.languages.turtle = { greedy: true }, 'url': { - pattern: /<(?:[^\x00-\x20<>"{}|^`\\]|\\(?:u[\da-f]{4}|U[\da-f]{8}))*>/i, + pattern: /<(?:[^\x00-\x20<>"{}|^`\\]|\\(?:u[\da-fA-F]{4}|U[\da-fA-F]{8}))*>/, greedy: true, inside: { 'punctuation': /[<>]/ diff --git a/components/prism-turtle.min.js b/components/prism-turtle.min.js index 14d4a5a7a9..666798f5b3 100644 --- a/components/prism-turtle.min.js +++ b/components/prism-turtle.min.js @@ -1 +1 @@ -Prism.languages.turtle={comment:{pattern:/#.*/,greedy:!0},"multiline-string":{pattern:/"""(?:(?:""?)?(?:[^"\\]|\\.))*"""|'''(?:(?:''?)?(?:[^'\\]|\\.))*'''/,greedy:!0,alias:"string",inside:{comment:/#.*/}},string:{pattern:/"(?:[^\\"\r\n]|\\.)*"|'(?:[^\\'\r\n]|\\.)*'/,greedy:!0},url:{pattern:/<(?:[^\x00-\x20<>"{}|^`\\]|\\(?:u[\da-f]{4}|U[\da-f]{8}))*>/i,greedy:!0,inside:{punctuation:/[<>]/}},function:{pattern:/(?:(?![-.\d\xB7])[-.\w\xB7\xC0-\uFFFD]+)?:(?:(?![-.])(?:[-.:\w\xC0-\uFFFD]|%[\da-f]{2}|\\.)+)?/i,inside:{"local-name":{pattern:/([^:]*:)[\s\S]+/,lookbehind:!0},prefix:{pattern:/[\s\S]+/,inside:{punctuation:/:/}}}},number:/[+-]?\b\d+\.?\d*(?:e[+-]?\d+)?/i,punctuation:/[{}.,;()[\]]|\^\^/,boolean:/\b(?:true|false)\b/,keyword:[/(?:\ba|@prefix|@base)\b|=/,/\b(?:graph|base|prefix)\b/i],tag:{pattern:/@[a-z]+(?:-[a-z\d]+)*/i,inside:{punctuation:/@/}}},Prism.languages.trig=Prism.languages.turtle; \ No newline at end of file +Prism.languages.turtle={comment:{pattern:/#.*/,greedy:!0},"multiline-string":{pattern:/"""(?:(?:""?)?(?:[^"\\]|\\.))*"""|'''(?:(?:''?)?(?:[^'\\]|\\.))*'''/,greedy:!0,alias:"string",inside:{comment:/#.*/}},string:{pattern:/"(?:[^\\"\r\n]|\\.)*"|'(?:[^\\'\r\n]|\\.)*'/,greedy:!0},url:{pattern:/<(?:[^\x00-\x20<>"{}|^`\\]|\\(?:u[\da-fA-F]{4}|U[\da-fA-F]{8}))*>/,greedy:!0,inside:{punctuation:/[<>]/}},function:{pattern:/(?:(?![-.\d\xB7])[-.\w\xB7\xC0-\uFFFD]+)?:(?:(?![-.])(?:[-.:\w\xC0-\uFFFD]|%[\da-f]{2}|\\.)+)?/i,inside:{"local-name":{pattern:/([^:]*:)[\s\S]+/,lookbehind:!0},prefix:{pattern:/[\s\S]+/,inside:{punctuation:/:/}}}},number:/[+-]?\b\d+\.?\d*(?:e[+-]?\d+)?/i,punctuation:/[{}.,;()[\]]|\^\^/,boolean:/\b(?:true|false)\b/,keyword:[/(?:\ba|@prefix|@base)\b|=/,/\b(?:graph|base|prefix)\b/i],tag:{pattern:/@[a-z]+(?:-[a-z\d]+)*/i,inside:{punctuation:/@/}}},Prism.languages.trig=Prism.languages.turtle; \ No newline at end of file diff --git a/components/prism-xquery.js b/components/prism-xquery.js index 406f593a08..d5a02ffa1d 100644 --- a/components/prism-xquery.js +++ b/components/prism-xquery.js @@ -55,12 +55,12 @@ 'punctuation': /[[\](){},;:/]/ }); - Prism.languages.xquery.tag.pattern = /<\/?(?!\d)[^\s>\/=$<%]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\[\s\S]|{(?!{)(?:{(?:{[^}]*}|[^}])*}|[^}])+}|(?!\1)[^\\])*\1|[^\s'">=]+))?)*\s*\/?>/i; - Prism.languages.xquery['tag'].inside['attr-value'].pattern = /=(?:("|')(?:\\[\s\S]|{(?!{)(?:{(?:{[^}]*}|[^}])*}|[^}])+}|(?!\1)[^\\])*\1|[^\s'">=]+)/i; + Prism.languages.xquery.tag.pattern = /<\/?(?!\d)[^\s>\/=$<%]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\[\s\S]|{(?!{)(?:{(?:{[^{}]*}|[^{}])*}|[^{}])+}|(?!\1)[^\\])*\1|[^\s'">=]+))?)*\s*\/?>/i; + Prism.languages.xquery['tag'].inside['attr-value'].pattern = /=(?:("|')(?:\\[\s\S]|{(?!{)(?:{(?:{[^{}]*}|[^{}])*}|[^{}])+}|(?!\1)[^\\])*\1|[^\s'">=]+)/i; Prism.languages.xquery['tag'].inside['attr-value'].inside['punctuation'] = /^="|"$/; Prism.languages.xquery['tag'].inside['attr-value'].inside['expression'] = { // Allow for two levels of nesting - pattern: /{(?!{)(?:{(?:{[^}]*}|[^}])*}|[^}])+}/, + pattern: /{(?!{)(?:{(?:{[^{}]*}|[^{}])*}|[^{}])+}/, inside: Prism.languages.xquery, alias: 'language-xquery' }; diff --git a/components/prism-xquery.min.js b/components/prism-xquery.min.js index 55f99e3c60..d8f715a9a7 100644 --- a/components/prism-xquery.min.js +++ b/components/prism-xquery.min.js @@ -1 +1 @@ -!function(r){r.languages.xquery=r.languages.extend("markup",{"xquery-comment":{pattern:/\(:[\s\S]*?:\)/,greedy:!0,alias:"comment"},string:{pattern:/(["'])(?:\1\1|(?!\1)[\s\S])*\1/,greedy:!0},extension:{pattern:/\(#.+?#\)/,alias:"symbol"},variable:/\$[\w-:]+/,axis:{pattern:/(^|[^-])(?:ancestor(?:-or-self)?|attribute|child|descendant(?:-or-self)?|following(?:-sibling)?|parent|preceding(?:-sibling)?|self)(?=::)/,lookbehind:!0,alias:"operator"},"keyword-operator":{pattern:/(^|[^:-])\b(?:and|castable as|div|eq|except|ge|gt|idiv|instance of|intersect|is|le|lt|mod|ne|or|union)\b(?=$|[^:-])/,lookbehind:!0,alias:"operator"},keyword:{pattern:/(^|[^:-])\b(?:as|ascending|at|base-uri|boundary-space|case|cast as|collation|construction|copy-namespaces|declare|default|descending|else|empty (?:greatest|least)|encoding|every|external|for|function|if|import|in|inherit|lax|let|map|module|namespace|no-inherit|no-preserve|option|order(?: by|ed|ing)?|preserve|return|satisfies|schema|some|stable|strict|strip|then|to|treat as|typeswitch|unordered|validate|variable|version|where|xquery)\b(?=$|[^:-])/,lookbehind:!0},function:/[\w-]+(?::[\w-]+)*(?=\s*\()/,"xquery-element":{pattern:/(element\s+)[\w-]+(?::[\w-]+)*/,lookbehind:!0,alias:"tag"},"xquery-attribute":{pattern:/(attribute\s+)[\w-]+(?::[\w-]+)*/,lookbehind:!0,alias:"attr-name"},builtin:{pattern:/(^|[^:-])\b(?:attribute|comment|document|element|processing-instruction|text|xs:(?:anyAtomicType|anyType|anyURI|base64Binary|boolean|byte|date|dateTime|dayTimeDuration|decimal|double|duration|ENTITIES|ENTITY|float|gDay|gMonth|gMonthDay|gYear|gYearMonth|hexBinary|ID|IDREFS?|int|integer|language|long|Name|NCName|negativeInteger|NMTOKENS?|nonNegativeInteger|nonPositiveInteger|normalizedString|NOTATION|positiveInteger|QName|short|string|time|token|unsigned(?:Byte|Int|Long|Short)|untyped(?:Atomic)?|yearMonthDuration))\b(?=$|[^:-])/,lookbehind:!0},number:/\b\d+(?:\.\d+)?(?:E[+-]?\d+)?/,operator:[/[+*=?|@]|\.\.?|:=|!=|<[=<]?|>[=>]?/,{pattern:/(\s)-(?=\s)/,lookbehind:!0}],punctuation:/[[\](){},;:/]/}),r.languages.xquery.tag.pattern=/<\/?(?!\d)[^\s>\/=$<%]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\[\s\S]|{(?!{)(?:{(?:{[^}]*}|[^}])*}|[^}])+}|(?!\1)[^\\])*\1|[^\s'">=]+))?)*\s*\/?>/i,r.languages.xquery.tag.inside["attr-value"].pattern=/=(?:("|')(?:\\[\s\S]|{(?!{)(?:{(?:{[^}]*}|[^}])*}|[^}])+}|(?!\1)[^\\])*\1|[^\s'">=]+)/i,r.languages.xquery.tag.inside["attr-value"].inside.punctuation=/^="|"$/,r.languages.xquery.tag.inside["attr-value"].inside.expression={pattern:/{(?!{)(?:{(?:{[^}]*}|[^}])*}|[^}])+}/,inside:r.languages.xquery,alias:"language-xquery"};var s=function(e){return"string"==typeof e?e:"string"==typeof e.content?e.content:e.content.map(s).join("")},l=function(e){for(var t=[],n=0;n"===a.content[a.content.length-1].content||t.push({tagName:s(a.content[0].content[1]),openedBraces:0}):!(0[=>]?/,{pattern:/(\s)-(?=\s)/,lookbehind:!0}],punctuation:/[[\](){},;:/]/}),r.languages.xquery.tag.pattern=/<\/?(?!\d)[^\s>\/=$<%]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\[\s\S]|{(?!{)(?:{(?:{[^{}]*}|[^{}])*}|[^{}])+}|(?!\1)[^\\])*\1|[^\s'">=]+))?)*\s*\/?>/i,r.languages.xquery.tag.inside["attr-value"].pattern=/=(?:("|')(?:\\[\s\S]|{(?!{)(?:{(?:{[^{}]*}|[^{}])*}|[^{}])+}|(?!\1)[^\\])*\1|[^\s'">=]+)/i,r.languages.xquery.tag.inside["attr-value"].inside.punctuation=/^="|"$/,r.languages.xquery.tag.inside["attr-value"].inside.expression={pattern:/{(?!{)(?:{(?:{[^{}]*}|[^{}])*}|[^{}])+}/,inside:r.languages.xquery,alias:"language-xquery"};var s=function(e){return"string"==typeof e?e:"string"==typeof e.content?e.content:e.content.map(s).join("")},l=function(e){for(var t=[],n=0;n"===a.content[a.content.length-1].content||t.push({tagName:s(a.content[0].content[1]),openedBraces:0}):!(0/, 'prolog': /<\?[\s\S]+?\?>/, 'doctype': { - pattern: /"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:(?!)*\]\s*)?>/i, + pattern: /"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i, greedy: true }, 'cdata': //i, @@ -823,7 +823,7 @@ Object.defineProperty(Prism.languages.markup.tag, 'addInlined', { var def = {}; def[tagName] = { - pattern: RegExp(/(<__[\s\S]*?>)(?:\s*|[\s\S])*?(?=<\/__>)/.source.replace(/__/g, function () { return tagName; }), 'i'), + pattern: RegExp(/(<__[\s\S]*?>)(?:))*\]\]>|(?!)/.source.replace(/__/g, function () { return tagName; }), 'i'), lookbehind: true, greedy: true, inside: inside @@ -976,7 +976,7 @@ Prism.languages.javascript['class-name'][0].pattern = /(\b(?:class|interface|ext Prism.languages.insertBefore('javascript', 'keyword', { 'regex': { - pattern: /((?:^|[^$\w\xA0-\uFFFF."'\])\s])\s*)\/(?:\[(?:[^\]\\\r\n]|\\.)*]|\\.|[^/\\\[\r\n])+\/[gimyus]{0,6}(?=(?:\s|\/\*[\s\S]*?\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/, + pattern: /((?:^|[^$\w\xA0-\uFFFF."'\])\s])\s*)\/(?:\[(?:[^\]\\\r\n]|\\.)*]|\\.|[^/\\\[\r\n])+\/[gimyus]{0,6}(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/, lookbehind: true, greedy: true }, From a197cfcdc76a87e1d462c40e7a314ebd7c97c8dc Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Thu, 16 Apr 2020 22:30:37 +0200 Subject: [PATCH 0491/1100] Typescript: Added `asserts` keyword and other improvements (#2280) --- components/prism-typescript.js | 47 ++++++- components/prism-typescript.min.js | 2 +- .../typescript/class-name_feature.test | 125 ++++++++++++++++++ .../typescript/function_feature.test | 91 +++++++++++++ .../languages/typescript/keyword_feature.test | 10 +- 5 files changed, 265 insertions(+), 10 deletions(-) create mode 100644 tests/languages/typescript/class-name_feature.test create mode 100644 tests/languages/typescript/function_feature.test diff --git a/components/prism-typescript.js b/components/prism-typescript.js index 54c45bf610..f15345bd4e 100644 --- a/components/prism-typescript.js +++ b/components/prism-typescript.js @@ -1,7 +1,42 @@ -Prism.languages.typescript = Prism.languages.extend('javascript', { - // From JavaScript Prism keyword list and TypeScript language spec: https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#221-reserved-words - 'keyword': /\b(?:abstract|as|async|await|break|case|catch|class|const|constructor|continue|debugger|declare|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|is|keyof|let|module|namespace|new|null|of|package|private|protected|public|readonly|return|require|set|static|super|switch|this|throw|try|type|typeof|undefined|var|void|while|with|yield)\b/, - 'builtin': /\b(?:string|Function|any|number|boolean|Array|symbol|console|Promise|unknown|never)\b/, -}); +(function (Prism) { -Prism.languages.ts = Prism.languages.typescript; + Prism.languages.typescript = Prism.languages.extend('javascript', { + 'class-name': { + pattern: /(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/, + lookbehind: true, + greedy: true, + inside: null // see below + }, + // From JavaScript Prism keyword list and TypeScript language spec: https://github.com/Microsoft/TypeScript/blob/master/doc/spec.md#221-reserved-words + 'keyword': /\b(?:abstract|as|asserts|async|await|break|case|catch|class|const|constructor|continue|debugger|declare|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|is|keyof|let|module|namespace|new|null|of|package|private|protected|public|readonly|return|require|set|static|super|switch|this|throw|try|type|typeof|undefined|var|void|while|with|yield)\b/, + 'builtin': /\b(?:string|Function|any|number|boolean|Array|symbol|console|Promise|unknown|never)\b/, + }); + + // doesn't work with TS because TS is too complex + delete Prism.languages.typescript['parameter']; + + // a version of typescript specifically for highlighting types + var typeInside = Prism.languages.extend('typescript', {}); + delete typeInside['class-name']; + + Prism.languages.typescript['class-name'].inside = typeInside; + + Prism.languages.insertBefore('typescript', 'function', { + 'generic-function': { + // e.g. foo( ... + pattern: /#?[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/, + greedy: true, + inside: { + 'function': /^#?[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*/, + 'generic': { + pattern: /<[\s\S]+/, // everything after the first < + alias: 'class-name', + inside: typeInside + } + } + } + }); + + Prism.languages.ts = Prism.languages.typescript; + +}(Prism)); diff --git a/components/prism-typescript.min.js b/components/prism-typescript.min.js index 2390f69400..18512141ed 100644 --- a/components/prism-typescript.min.js +++ b/components/prism-typescript.min.js @@ -1 +1 @@ -Prism.languages.typescript=Prism.languages.extend("javascript",{keyword:/\b(?:abstract|as|async|await|break|case|catch|class|const|constructor|continue|debugger|declare|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|is|keyof|let|module|namespace|new|null|of|package|private|protected|public|readonly|return|require|set|static|super|switch|this|throw|try|type|typeof|undefined|var|void|while|with|yield)\b/,builtin:/\b(?:string|Function|any|number|boolean|Array|symbol|console|Promise|unknown|never)\b/}),Prism.languages.ts=Prism.languages.typescript; \ No newline at end of file +!function(e){e.languages.typescript=e.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},keyword:/\b(?:abstract|as|asserts|async|await|break|case|catch|class|const|constructor|continue|debugger|declare|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|is|keyof|let|module|namespace|new|null|of|package|private|protected|public|readonly|return|require|set|static|super|switch|this|throw|try|type|typeof|undefined|var|void|while|with|yield)\b/,builtin:/\b(?:string|Function|any|number|boolean|Array|symbol|console|Promise|unknown|never)\b/}),delete e.languages.typescript.parameter;var n=e.languages.extend("typescript",{});delete n["class-name"],e.languages.typescript["class-name"].inside=n,e.languages.insertBefore("typescript","function",{"generic-function":{pattern:/#?[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:n}}}}),e.languages.ts=e.languages.typescript}(Prism); \ No newline at end of file diff --git a/tests/languages/typescript/class-name_feature.test b/tests/languages/typescript/class-name_feature.test new file mode 100644 index 0000000000..0a712617cf --- /dev/null +++ b/tests/languages/typescript/class-name_feature.test @@ -0,0 +1,125 @@ +interface Dictionary { + [key: string]: T; +} + +interface Foo extends Dictionary {} + +class Bar extends Baz implements FooBar {} + +type Record = { + [P in K]: T; +} +type Diff = T extends U ? never : T; + +---------------------------------------------------- + +[ + ["keyword", "interface"], + ["class-name", [ + "Dictionary", + ["operator", "<"], + ["constant", "T"], + ["operator", ">"] + ]], + ["punctuation", "{"], + ["punctuation", "["], + "key", + ["operator", ":"], + ["builtin", "string"], + ["punctuation", "]"], + ["operator", ":"], + ["constant", "T"], + ["punctuation", ";"], + ["punctuation", "}"], + + ["keyword", "interface"], + ["class-name", [ + "Foo" + ]], + ["keyword", "extends"], + ["class-name", [ + "Dictionary", + ["operator", "<"], + ["builtin", "number"], + ["operator", ">"] + ]], + ["punctuation", "{"], + ["punctuation", "}"], + + ["keyword", "class"], + ["class-name", [ + "Bar", + ["operator", "<"], + ["constant", "T"], + ["operator", ">"] + ]], + ["keyword", "extends"], + ["class-name", [ + "Baz", + ["operator", "<"], + ["constant", "T"], + ["operator", ">"] + ]], + ["keyword", "implements"], + ["class-name", [ + "FooBar", + ["operator", "<"], + ["builtin", "number"], + ["punctuation", ","], + ["constant", "T"], + ["operator", "|"], + ["keyword", "null"], + ["operator", ">"] + ]], + ["punctuation", "{"], + ["punctuation", "}"], + + ["keyword", "type"], + ["class-name", [ + "Record", + ["operator", "<"], + ["constant", "K"], + ["keyword", "extends"], + ["keyword", "keyof"], + ["builtin", "any"], + ["punctuation", ","], + ["constant", "T"], + ["operator", ">"] + ]], + ["operator", "="], + ["punctuation", "{"], + ["punctuation", "["], + ["constant", "P"], + ["keyword", "in"], + ["constant", "K"], + ["punctuation", "]"], + ["operator", ":"], + ["constant", "T"], + ["punctuation", ";"], + ["punctuation", "}"], + + ["keyword", "type"], + ["class-name", [ + "Diff", + ["operator", "<"], + ["constant", "T"], + ["punctuation", ","], + ["constant", "U"], + ["operator", ">"] + ]], + ["operator", "="], + ["constant", "T"], + ["keyword", "extends"], + ["class-name", [ + ["constant", "U"] + ]], + ["operator", "?"], + ["builtin", "never"], + ["operator", ":"], + ["constant", "T"], + ["punctuation", ";"] +] + +---------------------------------------------------- + +Checks for class, interface, and other type names. diff --git a/tests/languages/typescript/function_feature.test b/tests/languages/typescript/function_feature.test new file mode 100644 index 0000000000..3b0fd70417 --- /dev/null +++ b/tests/languages/typescript/function_feature.test @@ -0,0 +1,91 @@ +function getProperty(o: T, propertyName: K): T[K] { } + +declare function f(x: T): T extends true ? string : number; + +function assert(condition: any, msg?: string): asserts condition { } + +---------------------------------------------------- + +[ + ["keyword", "function"], + ["generic-function", [ + ["function", "getProperty"], + ["generic", [ + ["operator", "<"], + ["constant", "T"], + ["punctuation", ","], + ["constant", "K"], + ["keyword", "extends"], + ["keyword", "keyof"], + ["constant", "T"], + ["operator", ">"] + ]] + ]], + ["punctuation", "("], + "o", + ["operator", ":"], + ["constant", "T"], + ["punctuation", ","], + " propertyName", + ["operator", ":"], + ["constant", "K"], + ["punctuation", ")"], + ["operator", ":"], + ["constant", "T"], + ["punctuation", "["], + ["constant", "K"], + ["punctuation", "]"], + ["punctuation", "{"], + ["punctuation", "}"], + + ["keyword", "declare"], + ["keyword", "function"], + ["generic-function", [ + ["function", "f"], + ["generic", [ + ["operator", "<"], + ["constant", "T"], + ["keyword", "extends"], + ["builtin", "boolean"], + ["operator", ">"] + ]] + ]], + ["punctuation", "("], + "x", + ["operator", ":"], + ["constant", "T"], + ["punctuation", ")"], + ["operator", ":"], + ["constant", "T"], + ["keyword", "extends"], + ["class-name", [ + ["boolean", "true"] + ]], + ["operator", "?"], + ["builtin", "string"], + ["operator", ":"], + ["builtin", "number"], + ["punctuation", ";"], + + ["keyword", "function"], + ["function", "assert"], + ["punctuation", "("], + "condition", + ["operator", ":"], + ["builtin", "any"], + ["punctuation", ","], + " msg", + ["operator", "?"], + ["operator", ":"], + ["builtin", "string"], + ["punctuation", ")"], + ["operator", ":"], + ["keyword", "asserts"], + " condition ", + ["punctuation", "{"], + ["punctuation", "}"] +] + +---------------------------------------------------- + +Checks for functions. diff --git a/tests/languages/typescript/keyword_feature.test b/tests/languages/typescript/keyword_feature.test index 9e19b365a4..f877e094e3 100644 --- a/tests/languages/typescript/keyword_feature.test +++ b/tests/languages/typescript/keyword_feature.test @@ -1,5 +1,6 @@ abstract as +asserts async await break @@ -51,8 +52,9 @@ switch this throw try -type +type; typeof +undefined var void while @@ -64,6 +66,7 @@ yield [ ["keyword", "abstract"], ["keyword", "as"], + ["keyword", "asserts"], ["keyword", "async"], ["keyword", "await"], ["keyword", "break"], @@ -115,8 +118,9 @@ yield ["keyword", "this"], ["keyword", "throw"], ["keyword", "try"], - ["keyword", "type"], + ["keyword", "type"], ["punctuation", ";"], ["keyword", "typeof"], + ["keyword", "undefined"], ["keyword", "var"], ["keyword", "void"], ["keyword", "while"], @@ -126,4 +130,4 @@ yield ---------------------------------------------------- -Checks for keywords. \ No newline at end of file +Checks for keywords. From 5cdc3251af31276b04f85b0f44bc30d4b37144c3 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Thu, 16 Apr 2020 22:36:38 +0200 Subject: [PATCH 0492/1100] Autoloader: Improved path detection and other minor improvements (#2245) --- plugins/autoloader/prism-autoloader.js | 36 ++++++++++++---------- plugins/autoloader/prism-autoloader.min.js | 2 +- 2 files changed, 20 insertions(+), 18 deletions(-) diff --git a/plugins/autoloader/prism-autoloader.js b/plugins/autoloader/prism-autoloader.js index 13fb67bd3e..c429e8b07d 100644 --- a/plugins/autoloader/prism-autoloader.js +++ b/plugins/autoloader/prism-autoloader.js @@ -3,7 +3,11 @@ return; } - // The dependencies map is built automatically with gulp + /** + * The dependencies map is built automatically with gulp. + * + * @type {Object} + */ var lang_dependencies = /*dependencies_placeholder[*/{ "javascript": "clike", "actionscript": "javascript", @@ -200,11 +204,13 @@ var script = Prism.util.currentScript(); if (script) { - var autoloaderFile = /\bplugins\/autoloader\/prism-autoloader\.(?:min\.)js$/i; - var prismFile = /[\w-]+\.(?:min\.)js$/i; - if (script.hasAttribute('data-autoloader-path')) { + var autoloaderFile = /\bplugins\/autoloader\/prism-autoloader\.(?:min\.)js(?:\?[^\r\n/]*)?$/i; + var prismFile = /(^|\/)[\w-]+\.(?:min\.)js(?:\?[^\r\n/]*)?$/i; + + var autoloaderPath = script.getAttribute('data-autoloader-path'); + if (autoloaderPath != null) { // data-autoloader-path is set, so just use it - languages_path = script.getAttribute('data-autoloader-path').trim().replace(/\/?$/, '/'); + languages_path = autoloaderPath.trim().replace(/\/?$/, '/'); } else { var src = script.src; if (autoloaderFile.test(src)) { @@ -212,7 +218,7 @@ languages_path = src.replace(autoloaderFile, 'components/'); } else if (prismFile.test(src)) { // the script is part of a bundle like a custom prism.js from the download page - languages_path = src.replace(prismFile, 'components/'); + languages_path = src.replace(prismFile, '$1components/'); } } } @@ -270,19 +276,15 @@ } // Look for additional dependencies defined on the or
           tags
          -		var deps = elt.getAttribute('data-dependencies');
          -		var parent = elt.parentElement;
          -		if (!deps && parent && parent.tagName.toLowerCase() === 'pre') {
          -			deps = parent.getAttribute('data-dependencies');
          -		}
          -
          -		if (deps) {
          -			deps = deps.split(/\s*,\s*/g);
          -		} else {
          -			deps = [];
          +		var deps = (elt.getAttribute('data-dependencies') || '').trim();
          +		if (!deps) {
          +			var parent = elt.parentElement;
          +			if (parent && parent.tagName.toLowerCase() === 'pre') {
          +				deps = (parent.getAttribute('data-dependencies') || '').trim();
          +			}
           		}
           
          -		loadLanguages(deps, function () {
          +		loadLanguages(deps ? deps.split(/\s*,\s*/g) : [], function () {
           			loadLanguage(lang, function () {
           				Prism.highlightElement(elt);
           			});
          diff --git a/plugins/autoloader/prism-autoloader.min.js b/plugins/autoloader/prism-autoloader.min.js
          index c1f02e5254..c99f7b5ea3 100644
          --- a/plugins/autoloader/prism-autoloader.min.js
          +++ b/plugins/autoloader/prism-autoloader.min.js
          @@ -1 +1 @@
          -!function(){if("undefined"!=typeof self&&self.Prism&&self.document&&document.createElement){var c={javascript:"clike",actionscript:"javascript",arduino:"cpp",aspnet:["markup","csharp"],bison:"c",c:"clike",csharp:"clike",cpp:"c",coffeescript:"javascript",crystal:"ruby","css-extras":"css",d:"clike",dart:"clike",django:"markup-templating",ejs:["javascript","markup-templating"],etlua:["lua","markup-templating"],erb:["ruby","markup-templating"],fsharp:"clike","firestore-security-rules":"clike",flow:"javascript",ftl:"markup-templating",glsl:"clike",gml:"clike",go:"clike",groovy:"clike",haml:"ruby",handlebars:"markup-templating",haxe:"clike",java:"clike",javadoc:["markup","java","javadoclike"],jolie:"clike",jsdoc:["javascript","javadoclike"],"js-extras":"javascript","js-templates":"javascript",jsonp:"json",json5:"json",kotlin:"clike",latte:["clike","markup-templating","php"],less:"css",lilypond:"scheme",markdown:"markup","markup-templating":"markup",n4js:"javascript",nginx:"clike",objectivec:"c",opencl:"c",parser:"markup",php:["clike","markup-templating"],phpdoc:["php","javadoclike"],"php-extras":"php",plsql:"sql",processing:"clike",protobuf:"clike",pug:["markup","javascript"],qml:"javascript",qore:"clike",jsx:["markup","javascript"],tsx:["jsx","typescript"],reason:"clike",ruby:"clike",sass:"css",scss:"css",scala:"java","shell-session":"bash",smarty:"markup-templating",solidity:"clike",soy:"markup-templating",sparql:"turtle",sqf:"clike",swift:"clike",tap:"yaml",textile:"markup",tt2:["clike","markup-templating"],twig:"markup",typescript:"javascript","t4-cs":["t4-templating","csharp"],"t4-vb":["t4-templating","visual-basic"],vala:"clike",vbnet:"basic",velocity:"markup",wiki:"markup",xeora:"markup",xquery:"markup"},l={html:"markup",xml:"markup",svg:"markup",mathml:"markup",js:"javascript",g4:"antlr4",adoc:"asciidoc",shell:"bash",shortcode:"bbcode",rbnf:"bnf",conc:"concurnas",cs:"csharp",dotnet:"csharp",coffee:"coffeescript",jinja2:"django","dns-zone":"dns-zone-file",dockerfile:"docker",eta:"ejs",xlsx:"excel-formula",xls:"excel-formula",gamemakerlanguage:"gml",hs:"haskell",tex:"latex",context:"latex",ly:"lilypond",emacs:"lisp",elisp:"lisp","emacs-lisp":"lisp",md:"markdown",moon:"moonscript",n4jsd:"n4js",objectpascal:"pascal",px:"pcaxis",pq:"powerquery",mscript:"powerquery",py:"python",robot:"robotframework",rb:"ruby",sln:"solution-file",rq:"sparql",trig:"turtle",ts:"typescript",t4:"t4-cs",vb:"visual-basic",xeoracube:"xeora",yml:"yaml"},n={},e="components/",a=Prism.util.currentScript();if(a){var t=/\bplugins\/autoloader\/prism-autoloader\.(?:min\.)js$/i,s=/[\w-]+\.(?:min\.)js$/i;if(a.hasAttribute("data-autoloader-path"))e=a.getAttribute("data-autoloader-path").trim().replace(/\/?$/,"/");else{var r=a.src;t.test(r)?e=r.replace(t,"components/"):s.test(r)&&(e=r.replace(s,"components/"))}}var p=Prism.plugins.autoloader={languages_path:e,use_minified:!0,loadLanguages:o};Prism.hooks.add("complete",function(e){e.element&&e.language&&!e.grammar&&"none"!==e.language&&function(e,a){e in l&&(e=l[e]);var t=a.getAttribute("data-dependencies"),s=a.parentElement;!t&&s&&"pre"===s.tagName.toLowerCase()&&(t=s.getAttribute("data-dependencies")),o(t=t?t.split(/\s*,\s*/g):[],function(){u(e,function(){Prism.highlightElement(a)})})}(e.language,e.element)})}function o(e,a,t){"string"==typeof e&&(e=[e]);var s=e.length,r=0,i=!1;function c(){i||++r===s&&a&&a(e)}0!==s?e.forEach(function(e){u(e,c,function(){i||(i=!0,t&&t(e))})}):a&&setTimeout(a,0)}function u(a,t,s){var r=0<=a.indexOf("!");a=a.replace("!",""),a=l[a]||a;var e=function(){var e=n[a];if(e||(e=n[a]={callbacks:[]}),e.callbacks.push({success:t,error:s}),!r&&Prism.languages[a])m(a,"success");else if(!r&&e.error)m(a,"error");else if(r||!e.loading){e.loading=!0,function(e,a,t){var s=document.createElement("script");s.src=e,s.async=!0,s.onload=function(){document.body.removeChild(s),a&&a()},s.onerror=function(){document.body.removeChild(s),t&&t()},document.body.appendChild(s)}(function(e){return p.languages_path+"prism-"+e+(p.use_minified?".min":"")+".js"}(a),function(){e.loading=!1,m(a,"success")},function(){e.loading=!1,e.error=!0,m(a,"error")})}},i=c[a];i&&i.length?o(i,e,s):e()}function m(e,a){if(n[e]){for(var t=n[e].callbacks,s=0,r=t.length;s
          Date: Sun, 26 Apr 2020 19:30:31 +0800
          Subject: [PATCH 0493/1100] Objectivec: Added `objc` alias (#2331)
          
          ---
           components.js                                    | 2 +-
           components.json                                  | 1 +
           components/prism-objectivec.js                   | 2 ++
           components/prism-objectivec.min.js               | 2 +-
           plugins/autoloader/prism-autoloader.js           | 1 +
           plugins/autoloader/prism-autoloader.min.js       | 2 +-
           plugins/show-language/prism-show-language.js     | 1 +
           plugins/show-language/prism-show-language.min.js | 2 +-
           8 files changed, 9 insertions(+), 4 deletions(-)
          
          diff --git a/components.js b/components.js
          index 5042db992e..724aefb1f4 100644
          --- a/components.js
          +++ b/components.js
          @@ -1,2 +1,2 @@
          -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"Augmented Backus–Naur form","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"Backus–Naur form","alias":"rbnf","aliasTitles":{"rbnf":"Routing Backus–Naur form"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dax":{"title":"DAX","owner":"peterbud"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"Extended Backus–Naur form","owner":"RunDevelopment"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"http":{"title":"HTTP","optional":["css","javascript","json","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"json":{"title":"JSON","owner":"CupOfTea696"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","modify":["actionscript","coffeescript","flow","javascript","typescript","vala"],"owner":"RunDevelopment"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"solidity":{"title":"Solidity (Ethereum)","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","visual-basic"],"owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}};
          +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"Augmented Backus–Naur form","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"Backus–Naur form","alias":"rbnf","aliasTitles":{"rbnf":"Routing Backus–Naur form"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dax":{"title":"DAX","owner":"peterbud"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"Extended Backus–Naur form","owner":"RunDevelopment"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"http":{"title":"HTTP","optional":["css","javascript","json","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"json":{"title":"JSON","owner":"CupOfTea696"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","modify":["actionscript","coffeescript","flow","javascript","typescript","vala"],"owner":"RunDevelopment"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"solidity":{"title":"Solidity (Ethereum)","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","visual-basic"],"owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}};
           if (typeof module !== 'undefined' && module.exports) { module.exports = components; }
          \ No newline at end of file
          diff --git a/components.json b/components.json
          index 31d828a116..3896359b68 100644
          --- a/components.json
          +++ b/components.json
          @@ -705,6 +705,7 @@
           		"objectivec": {
           			"title": "Objective-C",
           			"require": "c",
          +			"alias": "objc",
           			"owner": "uranusjr"
           		},
           		"ocaml": {
          diff --git a/components/prism-objectivec.js b/components/prism-objectivec.js
          index b2ccb8775b..386b351276 100644
          --- a/components/prism-objectivec.js
          +++ b/components/prism-objectivec.js
          @@ -5,3 +5,5 @@ Prism.languages.objectivec = Prism.languages.extend('c', {
           });
           
           delete Prism.languages.objectivec['class-name'];
          +
          +Prism.languages.objc = Prism.languages.objectivec;
          \ No newline at end of file
          diff --git a/components/prism-objectivec.min.js b/components/prism-objectivec.min.js
          index d80cfb3dc0..a7568e9ce6 100644
          --- a/components/prism-objectivec.min.js
          +++ b/components/prism-objectivec.min.js
          @@ -1 +1 @@
          -Prism.languages.objectivec=Prism.languages.extend("c",{keyword:/\b(?:asm|typeof|inline|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|union|unsigned|void|volatile|while|in|self|super)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/,string:/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1|@"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,operator:/-[->]?|\+\+?|!=?|<>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}),delete Prism.languages.objectivec["class-name"];
          \ No newline at end of file
          +Prism.languages.objectivec=Prism.languages.extend("c",{keyword:/\b(?:asm|typeof|inline|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|union|unsigned|void|volatile|while|in|self|super)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/,string:/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1|@"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,operator:/-[->]?|\+\+?|!=?|<>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}),delete Prism.languages.objectivec["class-name"],Prism.languages.objc=Prism.languages.objectivec;
          \ No newline at end of file
          diff --git a/plugins/autoloader/prism-autoloader.js b/plugins/autoloader/prism-autoloader.js
          index c429e8b07d..c8157419e9 100644
          --- a/plugins/autoloader/prism-autoloader.js
          +++ b/plugins/autoloader/prism-autoloader.js
          @@ -173,6 +173,7 @@
           		"md": "markdown",
           		"moon": "moonscript",
           		"n4jsd": "n4js",
          +		"objc": "objectivec",
           		"objectpascal": "pascal",
           		"px": "pcaxis",
           		"pq": "powerquery",
          diff --git a/plugins/autoloader/prism-autoloader.min.js b/plugins/autoloader/prism-autoloader.min.js
          index c99f7b5ea3..0e8a7af6bd 100644
          --- a/plugins/autoloader/prism-autoloader.min.js
          +++ b/plugins/autoloader/prism-autoloader.min.js
          @@ -1 +1 @@
          -!function(){if("undefined"!=typeof self&&self.Prism&&self.document&&document.createElement){var l={javascript:"clike",actionscript:"javascript",arduino:"cpp",aspnet:["markup","csharp"],bison:"c",c:"clike",csharp:"clike",cpp:"c",coffeescript:"javascript",crystal:"ruby","css-extras":"css",d:"clike",dart:"clike",django:"markup-templating",ejs:["javascript","markup-templating"],etlua:["lua","markup-templating"],erb:["ruby","markup-templating"],fsharp:"clike","firestore-security-rules":"clike",flow:"javascript",ftl:"markup-templating",glsl:"clike",gml:"clike",go:"clike",groovy:"clike",haml:"ruby",handlebars:"markup-templating",haxe:"clike",java:"clike",javadoc:["markup","java","javadoclike"],jolie:"clike",jsdoc:["javascript","javadoclike"],"js-extras":"javascript","js-templates":"javascript",jsonp:"json",json5:"json",kotlin:"clike",latte:["clike","markup-templating","php"],less:"css",lilypond:"scheme",markdown:"markup","markup-templating":"markup",n4js:"javascript",nginx:"clike",objectivec:"c",opencl:"c",parser:"markup",php:["clike","markup-templating"],phpdoc:["php","javadoclike"],"php-extras":"php",plsql:"sql",processing:"clike",protobuf:"clike",pug:["markup","javascript"],qml:"javascript",qore:"clike",jsx:["markup","javascript"],tsx:["jsx","typescript"],reason:"clike",ruby:"clike",sass:"css",scss:"css",scala:"java","shell-session":"bash",smarty:"markup-templating",solidity:"clike",soy:"markup-templating",sparql:"turtle",sqf:"clike",swift:"clike",tap:"yaml",textile:"markup",tt2:["clike","markup-templating"],twig:"markup",typescript:"javascript","t4-cs":["t4-templating","csharp"],"t4-vb":["t4-templating","visual-basic"],vala:"clike",vbnet:"basic",velocity:"markup",wiki:"markup",xeora:"markup",xquery:"markup"},c={html:"markup",xml:"markup",svg:"markup",mathml:"markup",js:"javascript",g4:"antlr4",adoc:"asciidoc",shell:"bash",shortcode:"bbcode",rbnf:"bnf",conc:"concurnas",cs:"csharp",dotnet:"csharp",coffee:"coffeescript",jinja2:"django","dns-zone":"dns-zone-file",dockerfile:"docker",eta:"ejs",xlsx:"excel-formula",xls:"excel-formula",gamemakerlanguage:"gml",hs:"haskell",tex:"latex",context:"latex",ly:"lilypond",emacs:"lisp",elisp:"lisp","emacs-lisp":"lisp",md:"markdown",moon:"moonscript",n4jsd:"n4js",objectpascal:"pascal",px:"pcaxis",pq:"powerquery",mscript:"powerquery",py:"python",robot:"robotframework",rb:"ruby",sln:"solution-file",rq:"sparql",trig:"turtle",ts:"typescript",t4:"t4-cs",vb:"visual-basic",xeoracube:"xeora",yml:"yaml"},n={},e="components/",a=Prism.util.currentScript();if(a){var t=/\bplugins\/autoloader\/prism-autoloader\.(?:min\.)js(?:\?[^\r\n/]*)?$/i,r=/(^|\/)[\w-]+\.(?:min\.)js(?:\?[^\r\n/]*)?$/i,s=a.getAttribute("data-autoloader-path");if(null!=s)e=s.trim().replace(/\/?$/,"/");else{var i=a.src;t.test(i)?e=i.replace(t,"components/"):r.test(i)&&(e=i.replace(r,"$1components/"))}}var p=Prism.plugins.autoloader={languages_path:e,use_minified:!0,loadLanguages:o};Prism.hooks.add("complete",function(e){e.element&&e.language&&!e.grammar&&"none"!==e.language&&function(e,a){e in c&&(e=c[e]);var t=(a.getAttribute("data-dependencies")||"").trim();if(!t){var r=a.parentElement;r&&"pre"===r.tagName.toLowerCase()&&(t=(r.getAttribute("data-dependencies")||"").trim())}o(t?t.split(/\s*,\s*/g):[],function(){m(e,function(){Prism.highlightElement(a)})})}(e.language,e.element)})}function o(e,a,t){"string"==typeof e&&(e=[e]);var r=e.length,s=0,i=!1;function l(){i||++s===r&&a&&a(e)}0!==r?e.forEach(function(e){m(e,l,function(){i||(i=!0,t&&t(e))})}):a&&setTimeout(a,0)}function m(a,t,r){var s=0<=a.indexOf("!");a=a.replace("!",""),a=c[a]||a;var e=function(){var e=n[a];if(e||(e=n[a]={callbacks:[]}),e.callbacks.push({success:t,error:r}),!s&&Prism.languages[a])u(a,"success");else if(!s&&e.error)u(a,"error");else if(s||!e.loading){e.loading=!0,function(e,a,t){var r=document.createElement("script");r.src=e,r.async=!0,r.onload=function(){document.body.removeChild(r),a&&a()},r.onerror=function(){document.body.removeChild(r),t&&t()},document.body.appendChild(r)}(function(e){return p.languages_path+"prism-"+e+(p.use_minified?".min":"")+".js"}(a),function(){e.loading=!1,u(a,"success")},function(){e.loading=!1,e.error=!0,u(a,"error")})}},i=l[a];i&&i.length?o(i,e,r):e()}function u(e,a){if(n[e]){for(var t=n[e].callbacks,r=0,s=t.length;r
          Date: Mon, 27 Apr 2020 23:27:24 +0900
          Subject: [PATCH 0494/1100] Update Git repo URL in package.json (#2334)
          
          This should point to the org now.
          ---
           package.json | 2 +-
           1 file changed, 1 insertion(+), 1 deletion(-)
          
          diff --git a/package.json b/package.json
          index f8bb2a9fcf..0929771700 100755
          --- a/package.json
          +++ b/package.json
          @@ -17,7 +17,7 @@
             },
             "repository": {
               "type": "git",
          -    "url": "https://github.com/LeaVerou/prism.git"
          +    "url": "https://github.com/PrismJS/prism.git"
             },
             "keywords": [
               "prism",
          
          From ac297ba5250f5e25067aeaae6d269b7295b19e05 Mon Sep 17 00:00:00 2001
          From: Michael Schmidt 
          Date: Mon, 27 Apr 2020 22:20:41 +0200
          Subject: [PATCH 0495/1100] Scheme: Added missing special keywords (#2304)
          
          ---
           components/prism-scheme.js                  |  2 +-
           components/prism-scheme.min.js              |  2 +-
           tests/languages/scheme/keyword_feature.test | 16 +++++++++++++---
           3 files changed, 15 insertions(+), 5 deletions(-)
          
          diff --git a/components/prism-scheme.js b/components/prism-scheme.js
          index ad5d000b9c..878383f62d 100644
          --- a/components/prism-scheme.js
          +++ b/components/prism-scheme.js
          @@ -18,7 +18,7 @@ Prism.languages.scheme = {
           		lookbehind: true
           	},
           	'keyword': {
          -		pattern: /(\()(?:define(?:-syntax|-library|-values)?|(?:case-)?lambda|let(?:\*|rec)?(?:-values)?|else|if|cond|begin|delay(?:-force)?|parameterize|guard|set!|(?:quasi-)?quote|syntax-rules)(?=[()\s])/,
          +		pattern: /(\()(?:define(?:-library|-macro|-syntax|-values)?|defmacro|(?:case-)?lambda|let(?:(?:\*|rec)?(?:-values)?|-syntax|rec-syntax)|else|if|cond|begin|delay(?:-force)?|parameterize|guard|set!|(?:quasi-)?quote|syntax-(?:case|rules))(?=[()\s])/,
           		lookbehind: true
           	},
           	'builtin': {
          diff --git a/components/prism-scheme.min.js b/components/prism-scheme.min.js
          index 4a2d1fa28a..b1a8826dd5 100644
          --- a/components/prism-scheme.min.js
          +++ b/components/prism-scheme.min.js
          @@ -1 +1 @@
          -Prism.languages.scheme={comment:/;.*/,string:{pattern:/"(?:[^"\\]|\\.)*"/,greedy:!0},symbol:{pattern:/'[^()#'\s]+/,greedy:!0},character:{pattern:/#\\(?:[ux][a-fA-F\d]+|[-a-zA-Z]+|\S)/,greedy:!0,alias:"string"},"lambda-parameter":{pattern:/(\(lambda\s+\()[^()'\s]+/,lookbehind:!0},keyword:{pattern:/(\()(?:define(?:-syntax|-library|-values)?|(?:case-)?lambda|let(?:\*|rec)?(?:-values)?|else|if|cond|begin|delay(?:-force)?|parameterize|guard|set!|(?:quasi-)?quote|syntax-rules)(?=[()\s])/,lookbehind:!0},builtin:{pattern:/(\()(?:(?:cons|car|cdr|list|call-with-current-continuation|call\/cc|append|abs|apply|eval)\b|null\?|pair\?|boolean\?|eof-object\?|char\?|procedure\?|number\?|port\?|string\?|vector\?|symbol\?|bytevector\?)(?=[()\s])/,lookbehind:!0},number:{pattern:/([\s()])(?:(?:#d(?:#[ei])?|#[ei](?:#d)?)?[+-]?(?:(?:\d*\.?\d+(?:[eE][+-]?\d+)?|\d+\/\d+)(?:[+-](?:\d*\.?\d+(?:[eE][+-]?\d+)?|\d+\/\d+)i)?|(?:\d*\.?\d+(?:[eE][+-]?\d+)?|\d+\/\d+)i)|(?:#[box](?:#[ei])?|#[ei](?:#[box])?)[+-]?(?:[\da-fA-F]+(?:\/[\da-fA-F]+)?(?:[+-][\da-fA-F]+(?:\/[\da-fA-F]+)?i)?|[\da-fA-F]+(?:\/[\da-fA-F]+)?i))(?=[\s()]|$)/,lookbehind:!0},boolean:/#[tf]/,operator:{pattern:/(\()(?:[-+*%\/]|[<>]=?|=>?)(?=\s|$)/,lookbehind:!0},function:{pattern:/(\()[^()'\s]+(?=[()\s]|$)/,lookbehind:!0},punctuation:/[()']/};
          \ No newline at end of file
          +Prism.languages.scheme={comment:/;.*/,string:{pattern:/"(?:[^"\\]|\\.)*"/,greedy:!0},symbol:{pattern:/'[^()#'\s]+/,greedy:!0},character:{pattern:/#\\(?:[ux][a-fA-F\d]+|[-a-zA-Z]+|\S)/,greedy:!0,alias:"string"},"lambda-parameter":{pattern:/(\(lambda\s+\()[^()'\s]+/,lookbehind:!0},keyword:{pattern:/(\()(?:define(?:-library|-macro|-syntax|-values)?|defmacro|(?:case-)?lambda|let(?:(?:\*|rec)?(?:-values)?|-syntax|rec-syntax)|else|if|cond|begin|delay(?:-force)?|parameterize|guard|set!|(?:quasi-)?quote|syntax-(?:case|rules))(?=[()\s])/,lookbehind:!0},builtin:{pattern:/(\()(?:(?:cons|car|cdr|list|call-with-current-continuation|call\/cc|append|abs|apply|eval)\b|null\?|pair\?|boolean\?|eof-object\?|char\?|procedure\?|number\?|port\?|string\?|vector\?|symbol\?|bytevector\?)(?=[()\s])/,lookbehind:!0},number:{pattern:/([\s()])(?:(?:#d(?:#[ei])?|#[ei](?:#d)?)?[+-]?(?:(?:\d*\.?\d+(?:[eE][+-]?\d+)?|\d+\/\d+)(?:[+-](?:\d*\.?\d+(?:[eE][+-]?\d+)?|\d+\/\d+)i)?|(?:\d*\.?\d+(?:[eE][+-]?\d+)?|\d+\/\d+)i)|(?:#[box](?:#[ei])?|#[ei](?:#[box])?)[+-]?(?:[\da-fA-F]+(?:\/[\da-fA-F]+)?(?:[+-][\da-fA-F]+(?:\/[\da-fA-F]+)?i)?|[\da-fA-F]+(?:\/[\da-fA-F]+)?i))(?=[\s()]|$)/,lookbehind:!0},boolean:/#[tf]/,operator:{pattern:/(\()(?:[-+*%\/]|[<>]=?|=>?)(?=\s|$)/,lookbehind:!0},function:{pattern:/(\()[^()'\s]+(?=[()\s]|$)/,lookbehind:!0},punctuation:/[()']/};
          \ No newline at end of file
          diff --git a/tests/languages/scheme/keyword_feature.test b/tests/languages/scheme/keyword_feature.test
          index 1abc8282a7..53085d543d 100644
          --- a/tests/languages/scheme/keyword_feature.test
          +++ b/tests/languages/scheme/keyword_feature.test
          @@ -1,7 +1,9 @@
           (define)
          -(define-syntax)
           (define-library)
          +(define-macro)
          +(define-syntax)
           (define-values)
          +(defmacro)
           (case-lambda)
           (lambda)
           (let)
          @@ -22,14 +24,19 @@
           (quasi-quote)
           (quote)
           (syntax-rules)
          +(syntax-case)
          +(letrec-syntax)
          +(let-syntax)
           
           ----------------------------------------------------
           
           [
           	["punctuation", "("], ["keyword", "define"], ["punctuation", ")"],
          -	["punctuation", "("], ["keyword", "define-syntax"], ["punctuation", ")"],
           	["punctuation", "("], ["keyword", "define-library"], ["punctuation", ")"],
          +	["punctuation", "("], ["keyword", "define-macro"], ["punctuation", ")"],
          +	["punctuation", "("], ["keyword", "define-syntax"], ["punctuation", ")"],
           	["punctuation", "("], ["keyword", "define-values"], ["punctuation", ")"],
          +	["punctuation", "("], ["keyword", "defmacro"], ["punctuation", ")"],
           	["punctuation", "("], ["keyword", "case-lambda"], ["punctuation", ")"],
           	["punctuation", "("], ["keyword", "lambda"], ["punctuation", ")"],
           	["punctuation", "("], ["keyword", "let"], ["punctuation", ")"],
          @@ -49,7 +56,10 @@
           	["punctuation", "("], ["keyword", "set!"], ["punctuation", ")"],
           	["punctuation", "("], ["keyword", "quasi-quote"], ["punctuation", ")"],
           	["punctuation", "("], ["keyword", "quote"], ["punctuation", ")"],
          -	["punctuation", "("], ["keyword", "syntax-rules"], ["punctuation", ")"]
          +	["punctuation", "("], ["keyword", "syntax-rules"], ["punctuation", ")"],
          +	["punctuation", "("], ["keyword", "syntax-case"], ["punctuation", ")"],
          +	["punctuation", "("], ["keyword", "letrec-syntax"], ["punctuation", ")"],
          +	["punctuation", "("], ["keyword", "let-syntax"], ["punctuation", ")"]
           ]
           
           ----------------------------------------------------
          
          From de21eb6418e89d1f868becf27a3d40634f63374b Mon Sep 17 00:00:00 2001
          From: Michael Schmidt 
          Date: Mon, 27 Apr 2020 22:22:12 +0200
          Subject: [PATCH 0496/1100] Added support for AL (#2300)
          
          ---
           components.js                                 |   2 +-
           components.json                               |   4 +
           components/prism-al.js                        |  25 +++
           components/prism-al.min.js                    |   1 +
           examples/prism-al.html                        |  60 +++++
           plugins/show-language/prism-show-language.js  |   1 +
           .../show-language/prism-show-language.min.js  |   2 +-
           tests/languages/al/boolean_feature.test       |  17 ++
           tests/languages/al/class-name_feature.test    | 211 ++++++++++++++++++
           tests/languages/al/comment_feature.test       |  17 ++
           tests/languages/al/function_feature.test      |  92 ++++++++
           tests/languages/al/keyword_feature.test       | 210 +++++++++++++++++
           tests/languages/al/operator_feature.test      |  57 +++++
           tests/languages/al/string_feature.test        |  20 ++
           tests/languages/al/variable_feature.test      |  21 ++
           15 files changed, 738 insertions(+), 2 deletions(-)
           create mode 100644 components/prism-al.js
           create mode 100644 components/prism-al.min.js
           create mode 100644 examples/prism-al.html
           create mode 100644 tests/languages/al/boolean_feature.test
           create mode 100644 tests/languages/al/class-name_feature.test
           create mode 100644 tests/languages/al/comment_feature.test
           create mode 100644 tests/languages/al/function_feature.test
           create mode 100644 tests/languages/al/keyword_feature.test
           create mode 100644 tests/languages/al/operator_feature.test
           create mode 100644 tests/languages/al/string_feature.test
           create mode 100644 tests/languages/al/variable_feature.test
          
          diff --git a/components.js b/components.js
          index 724aefb1f4..fc7fd99193 100644
          --- a/components.js
          +++ b/components.js
          @@ -1,2 +1,2 @@
          -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"Augmented Backus–Naur form","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"Backus–Naur form","alias":"rbnf","aliasTitles":{"rbnf":"Routing Backus–Naur form"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dax":{"title":"DAX","owner":"peterbud"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"Extended Backus–Naur form","owner":"RunDevelopment"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"http":{"title":"HTTP","optional":["css","javascript","json","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"json":{"title":"JSON","owner":"CupOfTea696"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","modify":["actionscript","coffeescript","flow","javascript","typescript","vala"],"owner":"RunDevelopment"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"solidity":{"title":"Solidity (Ethereum)","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","visual-basic"],"owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}};
          +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"Augmented Backus–Naur form","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"Backus–Naur form","alias":"rbnf","aliasTitles":{"rbnf":"Routing Backus–Naur form"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dax":{"title":"DAX","owner":"peterbud"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"Extended Backus–Naur form","owner":"RunDevelopment"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"http":{"title":"HTTP","optional":["css","javascript","json","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"json":{"title":"JSON","owner":"CupOfTea696"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","modify":["actionscript","coffeescript","flow","javascript","typescript","vala"],"owner":"RunDevelopment"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"solidity":{"title":"Solidity (Ethereum)","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","visual-basic"],"owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}};
           if (typeof module !== 'undefined' && module.exports) { module.exports = components; }
          \ No newline at end of file
          diff --git a/components.json b/components.json
          index 3896359b68..23098ad28c 100644
          --- a/components.json
          +++ b/components.json
          @@ -91,6 +91,10 @@
           			"title": "Ada",
           			"owner": "Lucretia"
           		},
          +		"al": {
          +			"title": "AL",
          +			"owner": "RunDevelopment"
          +		},
           		"antlr4": {
           			"title": "ANTLR4",
           			"alias": "g4",
          diff --git a/components/prism-al.js b/components/prism-al.js
          new file mode 100644
          index 0000000000..f4903719ea
          --- /dev/null
          +++ b/components/prism-al.js
          @@ -0,0 +1,25 @@
          +// based on https://github.com/microsoft/AL/blob/master/grammar/alsyntax.tmlanguage
          +
          +Prism.languages.al = {
          +	'comment': /\/\/.*|\/\*[\s\S]*?\*\//,
          +	'string': {
          +		pattern: /'(?:''|[^'\r\n])*'(?!')|"(?:""|[^"\r\n])*"(?!")/,
          +		greedy: true
          +	},
          +	'function': {
          +		pattern: /(\b(?:event|procedure|trigger)\s+|(?:^|[^.])\.\s*)[a-z_]\w*(?=\s*\()/i,
          +		lookbehind: true
          +	},
          +	'keyword': [
          +		// keywords
          +		/\b(?:array|asserterror|begin|break|case|do|downto|else|end|event|exit|for|foreach|function|if|implements|in|indataset|interface|internal|local|of|procedure|program|protected|repeat|runonclient|securityfiltering|suppressdispose|temporary|then|to|trigger|until|var|while|with|withevents)\b/i,
          +		// objects and metadata that are used like keywords
          +		/\b(?:action|actions|addafter|addbefore|addfirst|addlast|area|assembly|chartpart|codeunit|column|controladdin|cuegroup|customizes|dataitem|dataset|dotnet|elements|enum|enumextension|extends|field|fieldattribute|fieldelement|fieldgroup|fieldgroups|fields|filter|fixed|grid|group|key|keys|label|labels|layout|modify|moveafter|movebefore|movefirst|movelast|page|pagecustomization|pageextension|part|profile|query|repeater|report|requestpage|schema|separator|systempart|table|tableelement|tableextension|textattribute|textelement|type|usercontrol|value|xmlport)\b/i
          +	],
          +	'number': /\b(?:0x[\da-f]+|(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?)(?:F|U(?:LL?)?|LL?)?\b/i,
          +	'boolean': /\b(?:false|true)\b/i,
          +	'variable': /\b(?:Curr(?:FieldNo|Page|Report)|RequestOptionsPage|x?Rec)\b/,
          +	'class-name': /\b(?:automation|biginteger|bigtext|blob|boolean|byte|char|clienttype|code|completiontriggererrorlevel|connectiontype|database|dataclassification|datascope|date|dateformula|datetime|decimal|defaultlayout|dialog|dictionary|dotnetassembly|dotnettypedeclaration|duration|errorinfo|errortype|executioncontext|executionmode|fieldclass|fieldref|fieldtype|file|filterpagebuilder|guid|httpclient|httpcontent|httpheaders|httprequestmessage|httpresponsemessage|instream|integer|joker|jsonarray|jsonobject|jsontoken|jsonvalue|keyref|list|moduledependencyinfo|moduleinfo|none|notification|notificationscope|objecttype|option|outstream|pageresult|record|recordid|recordref|reportformat|securityfilter|sessionsettings|tableconnectiontype|tablefilter|testaction|testfield|testfilterfield|testpage|testpermissions|testrequestpage|text|textbuilder|textconst|textencoding|time|transactionmodel|transactiontype|variant|verbosity|version|view|views|webserviceactioncontext|webserviceactionresultcode|xmlattribute|xmlattributecollection|xmlcdata|xmlcomment|xmldeclaration|xmldocument|xmldocumenttype|xmlelement|xmlnamespacemanager|xmlnametable|xmlnode|xmlnodelist|xmlprocessinginstruction|xmlreadoptions|xmltext|xmlwriteoptions)\b/i,
          +	'operator': /\.\.|:[=:]|[-+*/]=?|<>|[<>]=?|=|\b(?:and|div|mod|not|or|xor)\b/i,
          +	'punctuation': /[()\[\]{}:.;,]/
          +};
          diff --git a/components/prism-al.min.js b/components/prism-al.min.js
          new file mode 100644
          index 0000000000..3084e4d4c6
          --- /dev/null
          +++ b/components/prism-al.min.js
          @@ -0,0 +1 @@
          +Prism.languages.al={comment:/\/\/.*|\/\*[\s\S]*?\*\//,string:{pattern:/'(?:''|[^'\r\n])*'(?!')|"(?:""|[^"\r\n])*"(?!")/,greedy:!0},function:{pattern:/(\b(?:event|procedure|trigger)\s+|(?:^|[^.])\.\s*)[a-z_]\w*(?=\s*\()/i,lookbehind:!0},keyword:[/\b(?:array|asserterror|begin|break|case|do|downto|else|end|event|exit|for|foreach|function|if|implements|in|indataset|interface|internal|local|of|procedure|program|protected|repeat|runonclient|securityfiltering|suppressdispose|temporary|then|to|trigger|until|var|while|with|withevents)\b/i,/\b(?:action|actions|addafter|addbefore|addfirst|addlast|area|assembly|chartpart|codeunit|column|controladdin|cuegroup|customizes|dataitem|dataset|dotnet|elements|enum|enumextension|extends|field|fieldattribute|fieldelement|fieldgroup|fieldgroups|fields|filter|fixed|grid|group|key|keys|label|labels|layout|modify|moveafter|movebefore|movefirst|movelast|page|pagecustomization|pageextension|part|profile|query|repeater|report|requestpage|schema|separator|systempart|table|tableelement|tableextension|textattribute|textelement|type|usercontrol|value|xmlport)\b/i],number:/\b(?:0x[\da-f]+|(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?)(?:F|U(?:LL?)?|LL?)?\b/i,boolean:/\b(?:false|true)\b/i,variable:/\b(?:Curr(?:FieldNo|Page|Report)|RequestOptionsPage|x?Rec)\b/,"class-name":/\b(?:automation|biginteger|bigtext|blob|boolean|byte|char|clienttype|code|completiontriggererrorlevel|connectiontype|database|dataclassification|datascope|date|dateformula|datetime|decimal|defaultlayout|dialog|dictionary|dotnetassembly|dotnettypedeclaration|duration|errorinfo|errortype|executioncontext|executionmode|fieldclass|fieldref|fieldtype|file|filterpagebuilder|guid|httpclient|httpcontent|httpheaders|httprequestmessage|httpresponsemessage|instream|integer|joker|jsonarray|jsonobject|jsontoken|jsonvalue|keyref|list|moduledependencyinfo|moduleinfo|none|notification|notificationscope|objecttype|option|outstream|pageresult|record|recordid|recordref|reportformat|securityfilter|sessionsettings|tableconnectiontype|tablefilter|testaction|testfield|testfilterfield|testpage|testpermissions|testrequestpage|text|textbuilder|textconst|textencoding|time|transactionmodel|transactiontype|variant|verbosity|version|view|views|webserviceactioncontext|webserviceactionresultcode|xmlattribute|xmlattributecollection|xmlcdata|xmlcomment|xmldeclaration|xmldocument|xmldocumenttype|xmlelement|xmlnamespacemanager|xmlnametable|xmlnode|xmlnodelist|xmlprocessinginstruction|xmlreadoptions|xmltext|xmlwriteoptions)\b/i,operator:/\.\.|:[=:]|[-+*/]=?|<>|[<>]=?|=|\b(?:and|div|mod|not|or|xor)\b/i,punctuation:/[()\[\]{}:.;,]/};
          \ No newline at end of file
          diff --git a/examples/prism-al.html b/examples/prism-al.html
          new file mode 100644
          index 0000000000..8b5c2086af
          --- /dev/null
          +++ b/examples/prism-al.html
          @@ -0,0 +1,60 @@
          +

          Full example

          +
          // Source: https://github.com/microsoft/AL/blob/master/samples/ControlAddIn/al/Page/CustomerCardAddIn.al
          +
          +pageextension 50300 CustomerCardAddIn extends "Customer Card"
          +{
          +	layout
          +	{
          +		addafter(Blocked)
          +		{
          +			usercontrol(ControlName; TestAddIn)
          +			{
          +				ApplicationArea = All;
          +
          +				trigger Callback(i : integer; s: text; d : decimal; c : char)
          +				begin
          +					Message('Got from js: %1, %2, %3, %4', i, s, d, c);
          +				end;
          +			}
          +		}
          +	}
          +
          +	actions
          +	{
          +		addafter(Approve)
          +		{
          +			action(CallJavaScript)
          +			{
          +				ApplicationArea = All;
          +
          +				trigger OnAction();
          +				begin
          +					CurrPage.ControlName.CallJavaScript(5, 'text', 6.3, 'c');
          +				end;
          +			}
          +
          +			action(CallViaCodeunit)
          +			{
          +				ApplicationArea = All;
          +
          +				trigger OnAction();
          +				var c : Codeunit AddInHelpers;
          +				begin
          +					c.CallJavaScript(CurrPage.ControlName);
          +				end;
          +			}
          +
          +			action(CallStaleControlAddIn)
          +			{
          +				ApplicationArea = All;
          +
          +				trigger OnAction();
          +				var c : Codeunit AddInHelpersSingleton;
          +				begin
          +					c.CallStaleAddInMethod();
          +					Message('Probably nothing should happen...');
          +				end;
          +			}
          +		}
          +	}
          +}
          diff --git a/plugins/show-language/prism-show-language.js b/plugins/show-language/prism-show-language.js index 46b0492214..c075729cb1 100644 --- a/plugins/show-language/prism-show-language.js +++ b/plugins/show-language/prism-show-language.js @@ -21,6 +21,7 @@ "js": "JavaScript", "abap": "ABAP", "abnf": "Augmented Backus–Naur form", + "al": "AL", "antlr4": "ANTLR4", "g4": "ANTLR4", "apacheconf": "Apache Configuration", diff --git a/plugins/show-language/prism-show-language.min.js b/plugins/show-language/prism-show-language.min.js index 319c1c2168..df2c294ed8 100644 --- a/plugins/show-language/prism-show-language.min.js +++ b/plugins/show-language/prism-show-language.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof self&&self.Prism&&self.document)if(Prism.plugins.toolbar){var r={html:"HTML",xml:"XML",svg:"SVG",mathml:"MathML",css:"CSS",clike:"C-like",js:"JavaScript",abap:"ABAP",abnf:"Augmented Backus–Naur form",antlr4:"ANTLR4",g4:"ANTLR4",apacheconf:"Apache Configuration",apl:"APL",aql:"AQL",arff:"ARFF",asciidoc:"AsciiDoc",adoc:"AsciiDoc",asm6502:"6502 Assembly",aspnet:"ASP.NET (C#)",autohotkey:"AutoHotkey",autoit:"AutoIt",basic:"BASIC",bbcode:"BBcode",bnf:"Backus–Naur form",rbnf:"Routing Backus–Naur form",conc:"Concurnas",csharp:"C#",cs:"C#",dotnet:"C#",cpp:"C++",cil:"CIL",coffee:"CoffeeScript",cmake:"CMake",csp:"Content-Security-Policy","css-extras":"CSS Extras",dax:"DAX",django:"Django/Jinja2",jinja2:"Django/Jinja2","dns-zone-file":"DNS zone file","dns-zone":"DNS zone file",dockerfile:"Docker",ebnf:"Extended Backus–Naur form",ejs:"EJS",etlua:"Embedded Lua templating",erb:"ERB","excel-formula":"Excel Formula",xlsx:"Excel Formula",xls:"Excel Formula",fsharp:"F#","firestore-security-rules":"Firestore security rules",ftl:"FreeMarker Template Language",gcode:"G-code",gdscript:"GDScript",gedcom:"GEDCOM",glsl:"GLSL",gml:"GameMaker Language",gamemakerlanguage:"GameMaker Language",graphql:"GraphQL",hs:"Haskell",hcl:"HCL",http:"HTTP",hpkp:"HTTP Public-Key-Pins",hsts:"HTTP Strict-Transport-Security",ichigojam:"IchigoJam",iecst:"Structured Text (IEC 61131-3)",inform7:"Inform 7",javadoc:"JavaDoc",javadoclike:"JavaDoc-like",javastacktrace:"Java stack trace",jq:"JQ",jsdoc:"JSDoc","js-extras":"JS Extras","js-templates":"JS Templates",json:"JSON",jsonp:"JSONP",json5:"JSON5",latex:"LaTeX",tex:"TeX",context:"ConTeXt",lilypond:"LilyPond",ly:"LilyPond",emacs:"Lisp",elisp:"Lisp","emacs-lisp":"Lisp",llvm:"LLVM IR",lolcode:"LOLCODE",md:"Markdown","markup-templating":"Markup templating",matlab:"MATLAB",mel:"MEL",moon:"MoonScript",n1ql:"N1QL",n4js:"N4JS",n4jsd:"N4JS","nand2tetris-hdl":"Nand To Tetris HDL",nasm:"NASM",neon:"NEON",nginx:"nginx",nsis:"NSIS",objectivec:"Objective-C",objc:"Objective-C",ocaml:"OCaml",opencl:"OpenCL",parigp:"PARI/GP",objectpascal:"Object Pascal",pcaxis:"PC-Axis",px:"PC-Axis",php:"PHP",phpdoc:"PHPDoc","php-extras":"PHP Extras",plsql:"PL/SQL",powerquery:"PowerQuery",pq:"PowerQuery",mscript:"PowerQuery",powershell:"PowerShell",properties:".properties",protobuf:"Protocol Buffers",py:"Python",q:"Q (kdb+ database)",qml:"QML",jsx:"React JSX",tsx:"React TSX",renpy:"Ren'py",rest:"reST (reStructuredText)",robotframework:"Robot Framework",robot:"Robot Framework",rb:"Ruby",sas:"SAS",sass:"Sass (Sass)",scss:"Sass (Scss)","shell-session":"Shell session",solidity:"Solidity (Ethereum)","solution-file":"Solution file",sln:"Solution file",soy:"Soy (Closure Template)",sparql:"SPARQL",rq:"SPARQL","splunk-spl":"Splunk SPL",sqf:"SQF: Status Quo Function (Arma 3)",sql:"SQL",tap:"TAP",toml:"TOML",tt2:"Template Toolkit 2",trig:"TriG",ts:"TypeScript","t4-cs":"T4 Text Templates (C#)",t4:"T4 Text Templates (C#)","t4-vb":"T4 Text Templates (VB)","t4-templating":"T4 templating",vbnet:"VB.Net",vhdl:"VHDL",vim:"vim","visual-basic":"Visual Basic",vb:"Visual Basic",wasm:"WebAssembly",wiki:"Wiki markup",xeoracube:"XeoraCube",xojo:"Xojo (REALbasic)",xquery:"XQuery",yaml:"YAML",yml:"YAML"};Prism.plugins.toolbar.registerButton("show-language",function(e){var a=e.element.parentNode;if(a&&/pre/i.test(a.nodeName)){var t,s=a.getAttribute("data-language")||r[e.language]||((t=e.language)?(t.substring(0,1).toUpperCase()+t.substring(1)).replace(/s(?=cript)/,"S"):t);if(s){var o=document.createElement("span");return o.textContent=s,o}}})}else console.warn("Show Languages plugin loaded before Toolbar plugin.")}(); \ No newline at end of file +!function(){if("undefined"!=typeof self&&self.Prism&&self.document)if(Prism.plugins.toolbar){var r={html:"HTML",xml:"XML",svg:"SVG",mathml:"MathML",css:"CSS",clike:"C-like",js:"JavaScript",abap:"ABAP",abnf:"Augmented Backus–Naur form",al:"AL",antlr4:"ANTLR4",g4:"ANTLR4",apacheconf:"Apache Configuration",apl:"APL",aql:"AQL",arff:"ARFF",asciidoc:"AsciiDoc",adoc:"AsciiDoc",asm6502:"6502 Assembly",aspnet:"ASP.NET (C#)",autohotkey:"AutoHotkey",autoit:"AutoIt",basic:"BASIC",bbcode:"BBcode",bnf:"Backus–Naur form",rbnf:"Routing Backus–Naur form",conc:"Concurnas",csharp:"C#",cs:"C#",dotnet:"C#",cpp:"C++",cil:"CIL",coffee:"CoffeeScript",cmake:"CMake",csp:"Content-Security-Policy","css-extras":"CSS Extras",dax:"DAX",django:"Django/Jinja2",jinja2:"Django/Jinja2","dns-zone-file":"DNS zone file","dns-zone":"DNS zone file",dockerfile:"Docker",ebnf:"Extended Backus–Naur form",ejs:"EJS",etlua:"Embedded Lua templating",erb:"ERB","excel-formula":"Excel Formula",xlsx:"Excel Formula",xls:"Excel Formula",fsharp:"F#","firestore-security-rules":"Firestore security rules",ftl:"FreeMarker Template Language",gcode:"G-code",gdscript:"GDScript",gedcom:"GEDCOM",glsl:"GLSL",gml:"GameMaker Language",gamemakerlanguage:"GameMaker Language",graphql:"GraphQL",hs:"Haskell",hcl:"HCL",http:"HTTP",hpkp:"HTTP Public-Key-Pins",hsts:"HTTP Strict-Transport-Security",ichigojam:"IchigoJam",iecst:"Structured Text (IEC 61131-3)",inform7:"Inform 7",javadoc:"JavaDoc",javadoclike:"JavaDoc-like",javastacktrace:"Java stack trace",jq:"JQ",jsdoc:"JSDoc","js-extras":"JS Extras","js-templates":"JS Templates",json:"JSON",jsonp:"JSONP",json5:"JSON5",latex:"LaTeX",tex:"TeX",context:"ConTeXt",lilypond:"LilyPond",ly:"LilyPond",emacs:"Lisp",elisp:"Lisp","emacs-lisp":"Lisp",llvm:"LLVM IR",lolcode:"LOLCODE",md:"Markdown","markup-templating":"Markup templating",matlab:"MATLAB",mel:"MEL",moon:"MoonScript",n1ql:"N1QL",n4js:"N4JS",n4jsd:"N4JS","nand2tetris-hdl":"Nand To Tetris HDL",nasm:"NASM",neon:"NEON",nginx:"nginx",nsis:"NSIS",objectivec:"Objective-C",objc:"Objective-C",ocaml:"OCaml",opencl:"OpenCL",parigp:"PARI/GP",objectpascal:"Object Pascal",pcaxis:"PC-Axis",px:"PC-Axis",php:"PHP",phpdoc:"PHPDoc","php-extras":"PHP Extras",plsql:"PL/SQL",powerquery:"PowerQuery",pq:"PowerQuery",mscript:"PowerQuery",powershell:"PowerShell",properties:".properties",protobuf:"Protocol Buffers",py:"Python",q:"Q (kdb+ database)",qml:"QML",jsx:"React JSX",tsx:"React TSX",renpy:"Ren'py",rest:"reST (reStructuredText)",robotframework:"Robot Framework",robot:"Robot Framework",rb:"Ruby",sas:"SAS",sass:"Sass (Sass)",scss:"Sass (Scss)","shell-session":"Shell session",solidity:"Solidity (Ethereum)","solution-file":"Solution file",sln:"Solution file",soy:"Soy (Closure Template)",sparql:"SPARQL",rq:"SPARQL","splunk-spl":"Splunk SPL",sqf:"SQF: Status Quo Function (Arma 3)",sql:"SQL",tap:"TAP",toml:"TOML",tt2:"Template Toolkit 2",trig:"TriG",ts:"TypeScript","t4-cs":"T4 Text Templates (C#)",t4:"T4 Text Templates (C#)","t4-vb":"T4 Text Templates (VB)","t4-templating":"T4 templating",vbnet:"VB.Net",vhdl:"VHDL",vim:"vim","visual-basic":"Visual Basic",vb:"Visual Basic",wasm:"WebAssembly",wiki:"Wiki markup",xeoracube:"XeoraCube",xojo:"Xojo (REALbasic)",xquery:"XQuery",yaml:"YAML",yml:"YAML"};Prism.plugins.toolbar.registerButton("show-language",function(e){var a=e.element.parentNode;if(a&&/pre/i.test(a.nodeName)){var t,s=a.getAttribute("data-language")||r[e.language]||((t=e.language)?(t.substring(0,1).toUpperCase()+t.substring(1)).replace(/s(?=cript)/,"S"):t);if(s){var o=document.createElement("span");return o.textContent=s,o}}})}else console.warn("Show Languages plugin loaded before Toolbar plugin.")}(); \ No newline at end of file diff --git a/tests/languages/al/boolean_feature.test b/tests/languages/al/boolean_feature.test new file mode 100644 index 0000000000..a225c7b053 --- /dev/null +++ b/tests/languages/al/boolean_feature.test @@ -0,0 +1,17 @@ +false +true +FALSE +TRUE + +---------------------------------------------------- + +[ + ["boolean", "false"], + ["boolean", "true"], + ["boolean", "FALSE"], + ["boolean", "TRUE"] +] + +---------------------------------------------------- + +Checks for booleans. diff --git a/tests/languages/al/class-name_feature.test b/tests/languages/al/class-name_feature.test new file mode 100644 index 0000000000..8987988b2b --- /dev/null +++ b/tests/languages/al/class-name_feature.test @@ -0,0 +1,211 @@ +automation +biginteger +bigtext +blob +boolean +byte +char +clienttype +code +completiontriggererrorlevel +connectiontype +database +dataclassification +datascope +date +dateformula +datetime +decimal +defaultlayout +dialog +dictionary +dotnetassembly +dotnettypedeclaration +duration +errorinfo +errortype +executioncontext +executionmode +fieldclass +fieldref +fieldtype +file +filterpagebuilder +guid +httpclient +httpcontent +httpheaders +httprequestmessage +httpresponsemessage +instream +integer +joker +jsonarray +jsonobject +jsontoken +jsonvalue +keyref +list +moduledependencyinfo +moduleinfo +none +notification +notificationscope +objecttype +option +outstream +pageresult +record +recordid +recordref +reportformat +securityfilter +sessionsettings +tableconnectiontype +tablefilter +testaction +testfield +testfilterfield +testpage +testpermissions +testrequestpage +text +textbuilder +textconst +textencoding +time +transactionmodel +transactiontype +variant +verbosity +version +view +views +webserviceactioncontext +webserviceactionresultcode +xmlattribute +xmlattributecollection +xmlcdata +xmlcomment +xmldeclaration +xmldocument +xmldocumenttype +xmlelement +xmlnamespacemanager +xmlnametable +xmlnode +xmlnodelist +xmlprocessinginstruction +xmlreadoptions +xmltext +xmlwriteoptions + +---------------------------------------------------- + +[ + ["class-name", "automation"], + ["class-name", "biginteger"], + ["class-name", "bigtext"], + ["class-name", "blob"], + ["class-name", "boolean"], + ["class-name", "byte"], + ["class-name", "char"], + ["class-name", "clienttype"], + ["class-name", "code"], + ["class-name", "completiontriggererrorlevel"], + ["class-name", "connectiontype"], + ["class-name", "database"], + ["class-name", "dataclassification"], + ["class-name", "datascope"], + ["class-name", "date"], + ["class-name", "dateformula"], + ["class-name", "datetime"], + ["class-name", "decimal"], + ["class-name", "defaultlayout"], + ["class-name", "dialog"], + ["class-name", "dictionary"], + ["class-name", "dotnetassembly"], + ["class-name", "dotnettypedeclaration"], + ["class-name", "duration"], + ["class-name", "errorinfo"], + ["class-name", "errortype"], + ["class-name", "executioncontext"], + ["class-name", "executionmode"], + ["class-name", "fieldclass"], + ["class-name", "fieldref"], + ["class-name", "fieldtype"], + ["class-name", "file"], + ["class-name", "filterpagebuilder"], + ["class-name", "guid"], + ["class-name", "httpclient"], + ["class-name", "httpcontent"], + ["class-name", "httpheaders"], + ["class-name", "httprequestmessage"], + ["class-name", "httpresponsemessage"], + ["class-name", "instream"], + ["class-name", "integer"], + ["class-name", "joker"], + ["class-name", "jsonarray"], + ["class-name", "jsonobject"], + ["class-name", "jsontoken"], + ["class-name", "jsonvalue"], + ["class-name", "keyref"], + ["class-name", "list"], + ["class-name", "moduledependencyinfo"], + ["class-name", "moduleinfo"], + ["class-name", "none"], + ["class-name", "notification"], + ["class-name", "notificationscope"], + ["class-name", "objecttype"], + ["class-name", "option"], + ["class-name", "outstream"], + ["class-name", "pageresult"], + ["class-name", "record"], + ["class-name", "recordid"], + ["class-name", "recordref"], + ["class-name", "reportformat"], + ["class-name", "securityfilter"], + ["class-name", "sessionsettings"], + ["class-name", "tableconnectiontype"], + ["class-name", "tablefilter"], + ["class-name", "testaction"], + ["class-name", "testfield"], + ["class-name", "testfilterfield"], + ["class-name", "testpage"], + ["class-name", "testpermissions"], + ["class-name", "testrequestpage"], + ["class-name", "text"], + ["class-name", "textbuilder"], + ["class-name", "textconst"], + ["class-name", "textencoding"], + ["class-name", "time"], + ["class-name", "transactionmodel"], + ["class-name", "transactiontype"], + ["class-name", "variant"], + ["class-name", "verbosity"], + ["class-name", "version"], + ["class-name", "view"], + ["class-name", "views"], + ["class-name", "webserviceactioncontext"], + ["class-name", "webserviceactionresultcode"], + ["class-name", "xmlattribute"], + ["class-name", "xmlattributecollection"], + ["class-name", "xmlcdata"], + ["class-name", "xmlcomment"], + ["class-name", "xmldeclaration"], + ["class-name", "xmldocument"], + ["class-name", "xmldocumenttype"], + ["class-name", "xmlelement"], + ["class-name", "xmlnamespacemanager"], + ["class-name", "xmlnametable"], + ["class-name", "xmlnode"], + ["class-name", "xmlnodelist"], + ["class-name", "xmlprocessinginstruction"], + ["class-name", "xmlreadoptions"], + ["class-name", "xmltext"], + ["class-name", "xmlwriteoptions"] +] + +---------------------------------------------------- + +Checks for class names. diff --git a/tests/languages/al/comment_feature.test b/tests/languages/al/comment_feature.test new file mode 100644 index 0000000000..4ae0238ba4 --- /dev/null +++ b/tests/languages/al/comment_feature.test @@ -0,0 +1,17 @@ +// comment +/**/ +/* + comment +*/ + +---------------------------------------------------- + +[ + ["comment", "// comment"], + ["comment", "/**/"], + ["comment", "/*\n comment\n*/"] +] + +---------------------------------------------------- + +Checks for comments. diff --git a/tests/languages/al/function_feature.test b/tests/languages/al/function_feature.test new file mode 100644 index 0000000000..5f106ac077 --- /dev/null +++ b/tests/languages/al/function_feature.test @@ -0,0 +1,92 @@ +procedure CallJavaScript(i : integer; s: text; d : decimal; c : char); +local procedure AssignGlobalToLocal(var addin : ControlAddIn TestAddIn) +trigger Callback(i : integer; s: text; d : decimal; c : char) +trigger OnAction(); +event Callback(i : integer; s: text; d : decimal; c : char); + +---------------------------------------------------- + +[ + ["keyword", "procedure"], + ["function", "CallJavaScript"], + ["punctuation", "("], + "i ", + ["punctuation", ":"], + ["class-name", "integer"], + ["punctuation", ";"], + " s", + ["punctuation", ":"], + ["class-name", "text"], + ["punctuation", ";"], + " d ", + ["punctuation", ":"], + ["class-name", "decimal"], + ["punctuation", ";"], + " c ", + ["punctuation", ":"], + ["class-name", "char"], + ["punctuation", ")"], + ["punctuation", ";"], + + ["keyword", "local"], + ["keyword", "procedure"], + ["function", "AssignGlobalToLocal"], + ["punctuation", "("], + ["keyword", "var"], + " addin ", + ["punctuation", ":"], + ["keyword", "ControlAddIn"], + " TestAddIn", + ["punctuation", ")"], + + ["keyword", "trigger"], + ["function", "Callback"], + ["punctuation", "("], + "i ", + ["punctuation", ":"], + ["class-name", "integer"], + ["punctuation", ";"], + " s", + ["punctuation", ":"], + ["class-name", "text"], + ["punctuation", ";"], + " d ", + ["punctuation", ":"], + ["class-name", "decimal"], + ["punctuation", ";"], + " c ", + ["punctuation", ":"], + ["class-name", "char"], + ["punctuation", ")"], + + ["keyword", "trigger"], + ["function", "OnAction"], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", ";"], + + ["keyword", "event"], + ["function", "Callback"], + ["punctuation", "("], + "i ", + ["punctuation", ":"], + ["class-name", "integer"], + ["punctuation", ";"], + " s", + ["punctuation", ":"], + ["class-name", "text"], + ["punctuation", ";"], + " d ", + ["punctuation", ":"], + ["class-name", "decimal"], + ["punctuation", ";"], + " c ", + ["punctuation", ":"], + ["class-name", "char"], + ["punctuation", ")"], + ["punctuation", ";"] +] + +---------------------------------------------------- + +Checks for functions. diff --git a/tests/languages/al/keyword_feature.test b/tests/languages/al/keyword_feature.test new file mode 100644 index 0000000000..2734cb20a3 --- /dev/null +++ b/tests/languages/al/keyword_feature.test @@ -0,0 +1,210 @@ +array +asserterror +begin +break +case +do +downto +else +end +event +exit +for +foreach +function +if +implements +in +indataset +interface +internal +local +of +procedure +program +protected +repeat +runonclient +securityfiltering +suppressdispose +temporary +then +to +trigger +until +var +while +with +withevents + +action +actions +addafter +addbefore +addfirst +addlast +area +assembly +chartpart +codeunit +column +controladdin +cuegroup +customizes +dataitem +dataset +dotnet +elements +enum +enumextension +extends +field +fieldattribute +fieldelement +fieldgroup +fieldgroups +fields +filter +fixed +grid +group +key +keys +label +labels +layout +modify +moveafter +movebefore +movefirst +movelast +page +pagecustomization +pageextension +part +profile +query +repeater +report +requestpage +schema +separator +systempart +table +tableelement +tableextension +textattribute +textelement +type +usercontrol +value +xmlport + +---------------------------------------------------- + +[ + ["keyword", "array"], + ["keyword", "asserterror"], + ["keyword", "begin"], + ["keyword", "break"], + ["keyword", "case"], + ["keyword", "do"], + ["keyword", "downto"], + ["keyword", "else"], + ["keyword", "end"], + ["keyword", "event"], + ["keyword", "exit"], + ["keyword", "for"], + ["keyword", "foreach"], + ["keyword", "function"], + ["keyword", "if"], + ["keyword", "implements"], + ["keyword", "in"], + ["keyword", "indataset"], + ["keyword", "interface"], + ["keyword", "internal"], + ["keyword", "local"], + ["keyword", "of"], + ["keyword", "procedure"], + ["keyword", "program"], + ["keyword", "protected"], + ["keyword", "repeat"], + ["keyword", "runonclient"], + ["keyword", "securityfiltering"], + ["keyword", "suppressdispose"], + ["keyword", "temporary"], + ["keyword", "then"], + ["keyword", "to"], + ["keyword", "trigger"], + ["keyword", "until"], + ["keyword", "var"], + ["keyword", "while"], + ["keyword", "with"], + ["keyword", "withevents"], + ["keyword", "action"], + ["keyword", "actions"], + ["keyword", "addafter"], + ["keyword", "addbefore"], + ["keyword", "addfirst"], + ["keyword", "addlast"], + ["keyword", "area"], + ["keyword", "assembly"], + ["keyword", "chartpart"], + ["keyword", "codeunit"], + ["keyword", "column"], + ["keyword", "controladdin"], + ["keyword", "cuegroup"], + ["keyword", "customizes"], + ["keyword", "dataitem"], + ["keyword", "dataset"], + ["keyword", "dotnet"], + ["keyword", "elements"], + ["keyword", "enum"], + ["keyword", "enumextension"], + ["keyword", "extends"], + ["keyword", "field"], + ["keyword", "fieldattribute"], + ["keyword", "fieldelement"], + ["keyword", "fieldgroup"], + ["keyword", "fieldgroups"], + ["keyword", "fields"], + ["keyword", "filter"], + ["keyword", "fixed"], + ["keyword", "grid"], + ["keyword", "group"], + ["keyword", "key"], + ["keyword", "keys"], + ["keyword", "label"], + ["keyword", "labels"], + ["keyword", "layout"], + ["keyword", "modify"], + ["keyword", "moveafter"], + ["keyword", "movebefore"], + ["keyword", "movefirst"], + ["keyword", "movelast"], + ["keyword", "page"], + ["keyword", "pagecustomization"], + ["keyword", "pageextension"], + ["keyword", "part"], + ["keyword", "profile"], + ["keyword", "query"], + ["keyword", "repeater"], + ["keyword", "report"], + ["keyword", "requestpage"], + ["keyword", "schema"], + ["keyword", "separator"], + ["keyword", "systempart"], + ["keyword", "table"], + ["keyword", "tableelement"], + ["keyword", "tableextension"], + ["keyword", "textattribute"], + ["keyword", "textelement"], + ["keyword", "type"], + ["keyword", "usercontrol"], + ["keyword", "value"], + ["keyword", "xmlport"] +] + +---------------------------------------------------- + +Checks for keywords and other literals which behave like keywords. diff --git a/tests/languages/al/operator_feature.test b/tests/languages/al/operator_feature.test new file mode 100644 index 0000000000..2ec9708ed6 --- /dev/null +++ b/tests/languages/al/operator_feature.test @@ -0,0 +1,57 @@ ++ - * / ++= -= *= /= + +< <= > >= <> = + +:= +:: + +100..100 + +AND DIV MOD NOT OR XOR +and div mod not or xor + +---------------------------------------------------- + +[ + ["operator", "+"], + ["operator", "-"], + ["operator", "*"], + ["operator", "/"], + + ["operator", "+="], + ["operator", "-="], + ["operator", "*="], + ["operator", "/="], + + ["operator", "<"], + ["operator", "<="], + ["operator", ">"], + ["operator", ">="], + ["operator", "<>"], + ["operator", "="], + + ["operator", ":="], + ["operator", "::"], + + ["number", "100"], + ["operator", ".."], + ["number", "100"], + + ["operator", "AND"], + ["operator", "DIV"], + ["operator", "MOD"], + ["operator", "NOT"], + ["operator", "OR"], + ["operator", "XOR"], + ["operator", "and"], + ["operator", "div"], + ["operator", "mod"], + ["operator", "not"], + ["operator", "or"], + ["operator", "xor"] +] + +---------------------------------------------------- + +Checks for operators. diff --git a/tests/languages/al/string_feature.test b/tests/languages/al/string_feature.test new file mode 100644 index 0000000000..e6e5babbca --- /dev/null +++ b/tests/languages/al/string_feature.test @@ -0,0 +1,20 @@ +'' +"" +'foo' +"bar" + +'C:\text.txt' + +---------------------------------------------------- + +[ + ["string", "''"], + ["string", "\"\""], + ["string", "'foo'"], + ["string", "\"bar\""], + ["string", "'C:\\text.txt'"] +] + +---------------------------------------------------- + +Checks for strings. diff --git a/tests/languages/al/variable_feature.test b/tests/languages/al/variable_feature.test new file mode 100644 index 0000000000..5a09ed0079 --- /dev/null +++ b/tests/languages/al/variable_feature.test @@ -0,0 +1,21 @@ +CurrFieldNo +CurrPage +CurrReport +RequestOptionsPage +Rec +xRec + +---------------------------------------------------- + +[ + ["variable", "CurrFieldNo"], + ["variable", "CurrPage"], + ["variable", "CurrReport"], + ["variable", "RequestOptionsPage"], + ["variable", "Rec"], + ["variable", "xRec"] +] + +---------------------------------------------------- + +Checks for variables. From fec39bcf5090fa375d61428e64a75c6ea5ebc0f8 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Mon, 27 Apr 2020 22:23:57 +0200 Subject: [PATCH 0497/1100] Powershell: New functions pattern bases on naming conventions (#2301) --- components/prism-powershell.js | 4 ++-- components/prism-powershell.min.js | 2 +- tests/languages/powershell/function_feature.test | 6 ++++-- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/components/prism-powershell.js b/components/prism-powershell.js index 446f72b1dd..327b9bc610 100644 --- a/components/prism-powershell.js +++ b/components/prism-powershell.js @@ -34,12 +34,12 @@ // Supports two levels of nested brackets (e.g. `[OutputType([System.Collections.Generic.List[int]])]`) 'namespace': /\[[a-z](?:\[(?:\[[^\]]*]|[^\[\]])*]|[^\[\]])*]/i, 'boolean': /\$(?:true|false)\b/i, - 'variable': /\$\w+\b/i, + 'variable': /\$\w+\b/, // Cmdlets and aliases. Aliases should come last, otherwise "write" gets preferred over "write-host" for example // Get-Command | ?{ $_.ModuleName -match "Microsoft.PowerShell.(Util|Core|Management)" } // Get-Alias | ?{ $_.ReferencedCommand.Module.Name -match "Microsoft.PowerShell.(Util|Core|Management)" } 'function': [ - /\b(?:Add-(?:Computer|Content|History|Member|PSSnapin|Type)|Checkpoint-Computer|Clear-(?:Content|EventLog|History|Item|ItemProperty|Variable)|Compare-Object|Complete-Transaction|Connect-PSSession|ConvertFrom-(?:Csv|Json|StringData)|Convert-Path|ConvertTo-(?:Csv|Html|Json|Xml)|Copy-(?:Item|ItemProperty)|Debug-Process|Disable-(?:ComputerRestore|PSBreakpoint|PSRemoting|PSSessionConfiguration)|Disconnect-PSSession|Enable-(?:ComputerRestore|PSBreakpoint|PSRemoting|PSSessionConfiguration)|Enter-PSSession|Exit-PSSession|Export-(?:Alias|Clixml|Console|Csv|FormatData|ModuleMember|PSSession)|ForEach-Object|Format-(?:Custom|List|Table|Wide)|Get-(?:Alias|ChildItem|Command|ComputerRestorePoint|Content|ControlPanelItem|Culture|Date|Event|EventLog|EventSubscriber|FormatData|Help|History|Host|HotFix|Item|ItemProperty|Job|Location|Member|Module|Process|PSBreakpoint|PSCallStack|PSDrive|PSProvider|PSSession|PSSessionConfiguration|PSSnapin|Random|Service|TraceSource|Transaction|TypeData|UICulture|Unique|Variable|WmiObject)|Group-Object|Import-(?:Alias|Clixml|Csv|LocalizedData|Module|PSSession)|Invoke-(?:Command|Expression|History|Item|RestMethod|WebRequest|WmiMethod)|Join-Path|Limit-EventLog|Measure-(?:Command|Object)|Move-(?:Item|ItemProperty)|New-(?:Alias|Event|EventLog|Item|ItemProperty|Module|ModuleManifest|Object|PSDrive|PSSession|PSSessionConfigurationFile|PSSessionOption|PSTransportOption|Service|TimeSpan|Variable|WebServiceProxy)|Out-(?:Default|File|GridView|Host|Null|Printer|String)|Pop-Location|Push-Location|Read-Host|Receive-(?:Job|PSSession)|Register-(?:EngineEvent|ObjectEvent|PSSessionConfiguration|WmiEvent)|Remove-(?:Computer|Event|EventLog|Item|ItemProperty|Job|Module|PSBreakpoint|PSDrive|PSSession|PSSnapin|TypeData|Variable|WmiObject)|Rename-(?:Computer|Item|ItemProperty)|Reset-ComputerMachinePassword|Resolve-Path|Restart-(?:Computer|Service)|Restore-Computer|Resume-(?:Job|Service)|Save-Help|Select-(?:Object|String|Xml)|Send-MailMessage|Set-(?:Alias|Content|Date|Item|ItemProperty|Location|PSBreakpoint|PSDebug|PSSessionConfiguration|Service|StrictMode|TraceSource|Variable|WmiInstance)|Show-(?:Command|ControlPanelItem|EventLog)|Sort-Object|Split-Path|Start-(?:Job|Process|Service|Sleep|Transaction)|Stop-(?:Computer|Job|Process|Service)|Suspend-(?:Job|Service)|Tee-Object|Test-(?:ComputerSecureChannel|Connection|ModuleManifest|Path|PSSessionConfigurationFile)|Trace-Command|Unblock-File|Undo-Transaction|Unregister-(?:Event|PSSessionConfiguration)|Update-(?:FormatData|Help|List|TypeData)|Use-Transaction|Wait-(?:Event|Job|Process)|Where-Object|Write-(?:Debug|Error|EventLog|Host|Output|Progress|Verbose|Warning))\b/i, + /\b(?:Add|Approve|Assert|Backup|Block|Checkpoint|Clear|Close|Compare|Complete|Compress|Confirm|Connect|Convert|ConvertFrom|ConvertTo|Copy|Debug|Deny|Disable|Disconnect|Dismount|Edit|Enable|Enter|Exit|Expand|Export|Find|ForEach|Format|Get|Grant|Group|Hide|Import|Initialize|Install|Invoke|Join|Limit|Lock|Measure|Merge|Move|New|New|Open|Optimize|Out|Ping|Pop|Protect|Publish|Push|Read|Receive|Redo|Register|Remove|Rename|Repair|Request|Reset|Resize|Resolve|Restart|Restore|Resume|Revoke|Save|Search|Select|Send|Set|Show|Skip|Sort|Split|Start|Step|Stop|Submit|Suspend|Switch|Sync|Tee|Test|Trace|Unblock|Undo|Uninstall|Unlock|Unprotect|Unpublish|Unregister|Update|Use|Wait|Watch|Where|Write)-[a-z]+\b/i, /\b(?:ac|cat|chdir|clc|cli|clp|clv|compare|copy|cp|cpi|cpp|cvpa|dbp|del|diff|dir|ebp|echo|epal|epcsv|epsn|erase|fc|fl|ft|fw|gal|gbp|gc|gci|gcs|gdr|gi|gl|gm|gp|gps|group|gsv|gu|gv|gwmi|iex|ii|ipal|ipcsv|ipsn|irm|iwmi|iwr|kill|lp|ls|measure|mi|mount|move|mp|mv|nal|ndr|ni|nv|ogv|popd|ps|pushd|pwd|rbp|rd|rdr|ren|ri|rm|rmdir|rni|rnp|rp|rv|rvpa|rwmi|sal|saps|sasv|sbp|sc|select|set|shcm|si|sl|sleep|sls|sort|sp|spps|spsv|start|sv|swmi|tee|trcm|type|write)\b/i ], // per http://technet.microsoft.com/en-us/library/hh847744.aspx diff --git a/components/prism-powershell.min.js b/components/prism-powershell.min.js index 39513ce7ce..ca7177b5b9 100644 --- a/components/prism-powershell.min.js +++ b/components/prism-powershell.min.js @@ -1 +1 @@ -!function(e){var t=Prism.languages.powershell={comment:[{pattern:/(^|[^`])<#[\s\S]*?#>/,lookbehind:!0},{pattern:/(^|[^`])#.*/,lookbehind:!0}],string:[{pattern:/"(?:`[\s\S]|[^`"])*"/,greedy:!0,inside:{function:{pattern:/(^|[^`])\$\((?:\$\([^\r\n()]*\)|(?!\$\()[^\r\n)])*\)/,lookbehind:!0,inside:{}}}},{pattern:/'(?:[^']|'')*'/,greedy:!0}],namespace:/\[[a-z](?:\[(?:\[[^\]]*]|[^\[\]])*]|[^\[\]])*]/i,boolean:/\$(?:true|false)\b/i,variable:/\$\w+\b/i,function:[/\b(?:Add-(?:Computer|Content|History|Member|PSSnapin|Type)|Checkpoint-Computer|Clear-(?:Content|EventLog|History|Item|ItemProperty|Variable)|Compare-Object|Complete-Transaction|Connect-PSSession|ConvertFrom-(?:Csv|Json|StringData)|Convert-Path|ConvertTo-(?:Csv|Html|Json|Xml)|Copy-(?:Item|ItemProperty)|Debug-Process|Disable-(?:ComputerRestore|PSBreakpoint|PSRemoting|PSSessionConfiguration)|Disconnect-PSSession|Enable-(?:ComputerRestore|PSBreakpoint|PSRemoting|PSSessionConfiguration)|Enter-PSSession|Exit-PSSession|Export-(?:Alias|Clixml|Console|Csv|FormatData|ModuleMember|PSSession)|ForEach-Object|Format-(?:Custom|List|Table|Wide)|Get-(?:Alias|ChildItem|Command|ComputerRestorePoint|Content|ControlPanelItem|Culture|Date|Event|EventLog|EventSubscriber|FormatData|Help|History|Host|HotFix|Item|ItemProperty|Job|Location|Member|Module|Process|PSBreakpoint|PSCallStack|PSDrive|PSProvider|PSSession|PSSessionConfiguration|PSSnapin|Random|Service|TraceSource|Transaction|TypeData|UICulture|Unique|Variable|WmiObject)|Group-Object|Import-(?:Alias|Clixml|Csv|LocalizedData|Module|PSSession)|Invoke-(?:Command|Expression|History|Item|RestMethod|WebRequest|WmiMethod)|Join-Path|Limit-EventLog|Measure-(?:Command|Object)|Move-(?:Item|ItemProperty)|New-(?:Alias|Event|EventLog|Item|ItemProperty|Module|ModuleManifest|Object|PSDrive|PSSession|PSSessionConfigurationFile|PSSessionOption|PSTransportOption|Service|TimeSpan|Variable|WebServiceProxy)|Out-(?:Default|File|GridView|Host|Null|Printer|String)|Pop-Location|Push-Location|Read-Host|Receive-(?:Job|PSSession)|Register-(?:EngineEvent|ObjectEvent|PSSessionConfiguration|WmiEvent)|Remove-(?:Computer|Event|EventLog|Item|ItemProperty|Job|Module|PSBreakpoint|PSDrive|PSSession|PSSnapin|TypeData|Variable|WmiObject)|Rename-(?:Computer|Item|ItemProperty)|Reset-ComputerMachinePassword|Resolve-Path|Restart-(?:Computer|Service)|Restore-Computer|Resume-(?:Job|Service)|Save-Help|Select-(?:Object|String|Xml)|Send-MailMessage|Set-(?:Alias|Content|Date|Item|ItemProperty|Location|PSBreakpoint|PSDebug|PSSessionConfiguration|Service|StrictMode|TraceSource|Variable|WmiInstance)|Show-(?:Command|ControlPanelItem|EventLog)|Sort-Object|Split-Path|Start-(?:Job|Process|Service|Sleep|Transaction)|Stop-(?:Computer|Job|Process|Service)|Suspend-(?:Job|Service)|Tee-Object|Test-(?:ComputerSecureChannel|Connection|ModuleManifest|Path|PSSessionConfigurationFile)|Trace-Command|Unblock-File|Undo-Transaction|Unregister-(?:Event|PSSessionConfiguration)|Update-(?:FormatData|Help|List|TypeData)|Use-Transaction|Wait-(?:Event|Job|Process)|Where-Object|Write-(?:Debug|Error|EventLog|Host|Output|Progress|Verbose|Warning))\b/i,/\b(?:ac|cat|chdir|clc|cli|clp|clv|compare|copy|cp|cpi|cpp|cvpa|dbp|del|diff|dir|ebp|echo|epal|epcsv|epsn|erase|fc|fl|ft|fw|gal|gbp|gc|gci|gcs|gdr|gi|gl|gm|gp|gps|group|gsv|gu|gv|gwmi|iex|ii|ipal|ipcsv|ipsn|irm|iwmi|iwr|kill|lp|ls|measure|mi|mount|move|mp|mv|nal|ndr|ni|nv|ogv|popd|ps|pushd|pwd|rbp|rd|rdr|ren|ri|rm|rmdir|rni|rnp|rp|rv|rvpa|rwmi|sal|saps|sasv|sbp|sc|select|set|shcm|si|sl|sleep|sls|sort|sp|spps|spsv|start|sv|swmi|tee|trcm|type|write)\b/i],keyword:/\b(?:Begin|Break|Catch|Class|Continue|Data|Define|Do|DynamicParam|Else|ElseIf|End|Exit|Filter|Finally|For|ForEach|From|Function|If|InlineScript|Parallel|Param|Process|Return|Sequence|Switch|Throw|Trap|Try|Until|Using|Var|While|Workflow)\b/i,operator:{pattern:/(\W?)(?:!|-(?:eq|ne|gt|ge|lt|le|sh[lr]|not|b?(?:and|x?or)|(?:Not)?(?:Like|Match|Contains|In)|Replace|Join|is(?:Not)?|as)\b|-[-=]?|\+[+=]?|[*\/%]=?)/i,lookbehind:!0},punctuation:/[|{}[\];(),.]/},o=t.string[0].inside;o.boolean=t.boolean,o.variable=t.variable,o.function.inside=t}(); \ No newline at end of file +!function(e){var i=Prism.languages.powershell={comment:[{pattern:/(^|[^`])<#[\s\S]*?#>/,lookbehind:!0},{pattern:/(^|[^`])#.*/,lookbehind:!0}],string:[{pattern:/"(?:`[\s\S]|[^`"])*"/,greedy:!0,inside:{function:{pattern:/(^|[^`])\$\((?:\$\([^\r\n()]*\)|(?!\$\()[^\r\n)])*\)/,lookbehind:!0,inside:{}}}},{pattern:/'(?:[^']|'')*'/,greedy:!0}],namespace:/\[[a-z](?:\[(?:\[[^\]]*]|[^\[\]])*]|[^\[\]])*]/i,boolean:/\$(?:true|false)\b/i,variable:/\$\w+\b/,function:[/\b(?:Add|Approve|Assert|Backup|Block|Checkpoint|Clear|Close|Compare|Complete|Compress|Confirm|Connect|Convert|ConvertFrom|ConvertTo|Copy|Debug|Deny|Disable|Disconnect|Dismount|Edit|Enable|Enter|Exit|Expand|Export|Find|ForEach|Format|Get|Grant|Group|Hide|Import|Initialize|Install|Invoke|Join|Limit|Lock|Measure|Merge|Move|New|New|Open|Optimize|Out|Ping|Pop|Protect|Publish|Push|Read|Receive|Redo|Register|Remove|Rename|Repair|Request|Reset|Resize|Resolve|Restart|Restore|Resume|Revoke|Save|Search|Select|Send|Set|Show|Skip|Sort|Split|Start|Step|Stop|Submit|Suspend|Switch|Sync|Tee|Test|Trace|Unblock|Undo|Uninstall|Unlock|Unprotect|Unpublish|Unregister|Update|Use|Wait|Watch|Where|Write)-[a-z]+\b/i,/\b(?:ac|cat|chdir|clc|cli|clp|clv|compare|copy|cp|cpi|cpp|cvpa|dbp|del|diff|dir|ebp|echo|epal|epcsv|epsn|erase|fc|fl|ft|fw|gal|gbp|gc|gci|gcs|gdr|gi|gl|gm|gp|gps|group|gsv|gu|gv|gwmi|iex|ii|ipal|ipcsv|ipsn|irm|iwmi|iwr|kill|lp|ls|measure|mi|mount|move|mp|mv|nal|ndr|ni|nv|ogv|popd|ps|pushd|pwd|rbp|rd|rdr|ren|ri|rm|rmdir|rni|rnp|rp|rv|rvpa|rwmi|sal|saps|sasv|sbp|sc|select|set|shcm|si|sl|sleep|sls|sort|sp|spps|spsv|start|sv|swmi|tee|trcm|type|write)\b/i],keyword:/\b(?:Begin|Break|Catch|Class|Continue|Data|Define|Do|DynamicParam|Else|ElseIf|End|Exit|Filter|Finally|For|ForEach|From|Function|If|InlineScript|Parallel|Param|Process|Return|Sequence|Switch|Throw|Trap|Try|Until|Using|Var|While|Workflow)\b/i,operator:{pattern:/(\W?)(?:!|-(?:eq|ne|gt|ge|lt|le|sh[lr]|not|b?(?:and|x?or)|(?:Not)?(?:Like|Match|Contains|In)|Replace|Join|is(?:Not)?|as)\b|-[-=]?|\+[+=]?|[*\/%]=?)/i,lookbehind:!0},punctuation:/[|{}[\];(),.]/},r=i.string[0].inside;r.boolean=i.boolean,r.variable=i.variable,r.function.inside=i}(); \ No newline at end of file diff --git a/tests/languages/powershell/function_feature.test b/tests/languages/powershell/function_feature.test index e7b07af93d..d7b67c3ad8 100644 --- a/tests/languages/powershell/function_feature.test +++ b/tests/languages/powershell/function_feature.test @@ -53,6 +53,7 @@ Unregister-PSSessionConfiguration Update-FormatData Update-Help Update-List Update-TypeData Use-Transaction Wait-Event Wait-Job Wait-Process Where-Object Write-Debug Write-Error Write-EventLog Write-Host Write-Output Write-Progress Write-Verbose Write-Warning +Get-AppxPackage ---------------------------------------------------- @@ -391,8 +392,9 @@ Write-Verbose Write-Warning ["function", "Write-Output"], ["function", "Write-Progress"], ["function", "Write-Verbose"], - ["function", "Write-Warning"] + ["function", "Write-Warning"], + ["function", "Get-AppxPackage"] ] ---------------------------------------------------- -Testing functions and aliases \ No newline at end of file +Testing functions and aliases From bd4d8165fb1635b18ce6c6a0d9521e2c87a93a77 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Mon, 27 Apr 2020 22:29:20 +0200 Subject: [PATCH 0498/1100] Added support for Peoplecode (#2302) --- components.js | 2 +- components.json | 5 + components/prism-peoplecode.js | 42 ++++++ components/prism-peoplecode.min.js | 1 + examples/prism-peoplecode.html | 128 ++++++++++++++++++ plugins/autoloader/prism-autoloader.js | 1 + plugins/autoloader/prism-autoloader.min.js | 2 +- plugins/show-language/prism-show-language.js | 2 + .../show-language/prism-show-language.min.js | 2 +- .../languages/peoplecode/boolean_feature.test | 13 ++ .../languages/peoplecode/comment_feature.test | 36 +++++ .../languages/peoplecode/keyword_feature.test | 123 +++++++++++++++++ .../peoplecode/operator_feature.test | 38 ++++++ .../languages/peoplecode/string_feature.test | 22 +++ 14 files changed, 414 insertions(+), 3 deletions(-) create mode 100644 components/prism-peoplecode.js create mode 100644 components/prism-peoplecode.min.js create mode 100644 examples/prism-peoplecode.html create mode 100644 tests/languages/peoplecode/boolean_feature.test create mode 100644 tests/languages/peoplecode/comment_feature.test create mode 100644 tests/languages/peoplecode/keyword_feature.test create mode 100644 tests/languages/peoplecode/operator_feature.test create mode 100644 tests/languages/peoplecode/string_feature.test diff --git a/components.js b/components.js index fc7fd99193..cb77f4cb0e 100644 --- a/components.js +++ b/components.js @@ -1,2 +1,2 @@ -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"Augmented Backus–Naur form","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"Backus–Naur form","alias":"rbnf","aliasTitles":{"rbnf":"Routing Backus–Naur form"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dax":{"title":"DAX","owner":"peterbud"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"Extended Backus–Naur form","owner":"RunDevelopment"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"http":{"title":"HTTP","optional":["css","javascript","json","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"json":{"title":"JSON","owner":"CupOfTea696"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","modify":["actionscript","coffeescript","flow","javascript","typescript","vala"],"owner":"RunDevelopment"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"solidity":{"title":"Solidity (Ethereum)","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","visual-basic"],"owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"Augmented Backus–Naur form","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"Backus–Naur form","alias":"rbnf","aliasTitles":{"rbnf":"Routing Backus–Naur form"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dax":{"title":"DAX","owner":"peterbud"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"Extended Backus–Naur form","owner":"RunDevelopment"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"http":{"title":"HTTP","optional":["css","javascript","json","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"json":{"title":"JSON","owner":"CupOfTea696"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","modify":["actionscript","coffeescript","flow","javascript","typescript","vala"],"owner":"RunDevelopment"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"solidity":{"title":"Solidity (Ethereum)","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","visual-basic"],"owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; if (typeof module !== 'undefined' && module.exports) { module.exports = components; } \ No newline at end of file diff --git a/components.json b/components.json index 23098ad28c..83444fe186 100644 --- a/components.json +++ b/components.json @@ -755,6 +755,11 @@ "alias": "px", "owner": "RunDevelopment" }, + "peoplecode": { + "title": "PeopleCode", + "alias": "pcode", + "owner": "RunDevelopment" + }, "perl": { "title": "Perl", "owner": "Golmote" diff --git a/components/prism-peoplecode.js b/components/prism-peoplecode.js new file mode 100644 index 0000000000..b7db0f7648 --- /dev/null +++ b/components/prism-peoplecode.js @@ -0,0 +1,42 @@ +Prism.languages.peoplecode = { + 'comment': RegExp([ + // C-style multiline comments + /\/\*[\s\S]*?\*\//.source, + // REM comments + /\bREM[^;]*;/.source, + // Nested <* *> comments + /<\*(?:[^<*]|\*(?!>)|<(?!\*)|<\*(?:(?!\*>)[\s\S])*\*>)*\*>/.source, + // /+ +/ comments + /\/\+[\s\S]*?\+\//.source, + ].join("|")), + 'string': { + pattern: /'(?:''|[^'\r\n])*'(?!')|"(?:""|[^"\r\n])*"(?!")/, + greedy: true + }, + 'variable': /%\w+/, + 'function-definition': { + pattern: /((?:^|[^\w-])(?:function|method)\s+)\w+/i, + lookbehind: true, + alias: 'function' + }, + 'class-name': { + pattern: /((?:^|[^-\w])(?:as|catch|class|component|create|extends|global|implements|instance|local|of|property|returns)\s+)\w+(?::\w+)*/i, + lookbehind: true, + inside: { + 'punctuation': /:/ + } + }, + 'keyword': /\b(?:abstract|alias|as|catch|class|component|constant|create|declare|else|end-(?:class|evaluate|for|function|get|if|method|set|try|while)|evaluate|extends|for|function|get|global|implements|import|instance|if|library|local|method|null|of|out|peopleCode|private|program|property|protected|readonly|ref|repeat|returns?|set|step|then|throw|to|try|until|value|when(?:-other)?|while)\b/i, + 'operator-keyword': { + pattern: /\b(?:and|not|or)\b/i, + alias: 'operator' + }, + 'function': /[_a-z]\w*(?=\s*\()/i, + + 'boolean': /\b(?:false|true)\b/i, + 'number': /\b\d+(?:\.\d+)?\b/, + 'operator': /<>|[<>]=?|!=|\*\*|[-+*/|=@]/, + 'punctuation': /[:.;,()[\]]/ +}; + +Prism.languages.pcode = Prism.languages.peoplecode; diff --git a/components/prism-peoplecode.min.js b/components/prism-peoplecode.min.js new file mode 100644 index 0000000000..6481666733 --- /dev/null +++ b/components/prism-peoplecode.min.js @@ -0,0 +1 @@ +Prism.languages.peoplecode={comment:RegExp(["/\\*[^]*?\\*/","\\bREM[^;]*;","<\\*(?:[^<*]|\\*(?!>)|<(?!\\*)|<\\*(?:(?!\\*>)[^])*\\*>)*\\*>","/\\+[^]*?\\+/"].join("|")),string:{pattern:/'(?:''|[^'\r\n])*'(?!')|"(?:""|[^"\r\n])*"(?!")/,greedy:!0},variable:/%\w+/,"function-definition":{pattern:/((?:^|[^\w-])(?:function|method)\s+)\w+/i,lookbehind:!0,alias:"function"},"class-name":{pattern:/((?:^|[^-\w])(?:as|catch|class|component|create|extends|global|implements|instance|local|of|property|returns)\s+)\w+(?::\w+)*/i,lookbehind:!0,inside:{punctuation:/:/}},keyword:/\b(?:abstract|alias|as|catch|class|component|constant|create|declare|else|end-(?:class|evaluate|for|function|get|if|method|set|try|while)|evaluate|extends|for|function|get|global|implements|import|instance|if|library|local|method|null|of|out|peopleCode|private|program|property|protected|readonly|ref|repeat|returns?|set|step|then|throw|to|try|until|value|when(?:-other)?|while)\b/i,"operator-keyword":{pattern:/\b(?:and|not|or)\b/i,alias:"operator"},function:/[_a-z]\w*(?=\s*\()/i,boolean:/\b(?:false|true)\b/i,number:/\b\d+(?:\.\d+)?\b/,operator:/<>|[<>]=?|!=|\*\*|[-+*/|=@]/,punctuation:/[:.;,()[\]]/},Prism.languages.pcode=Prism.languages.peoplecode; \ No newline at end of file diff --git a/examples/prism-peoplecode.html b/examples/prism-peoplecode.html new file mode 100644 index 0000000000..bcd9cd734e --- /dev/null +++ b/examples/prism-peoplecode.html @@ -0,0 +1,128 @@ +

          Full example

          +
          /* Source: https://github.com/chrismalek/psoftToXML/blob/master/psftToXML.pcode */
          +
          +class psoftToXML
          +	method RowsetToXML(&parentNode As XmlNode, &rowSetIn As Rowset) Returns XmlNode;
          +	method RecordToXML(&parentNode As XmlNode, &recordIn As Record) Returns XmlNode;
          +	method FieldToXML(&ParentNode As XmlNode, &fieldIn As Field) Returns XmlNode;
          +	method RowToXML(&ParentNode As XmlNode, &rowIn As Row) Returns XmlNode;
          +	method psoftToXML();
          +	property array of string fieldsToSkip;
          +private
          +	instance string &psObjectTypeString;
          +end-class;
          +
          +method psoftToXML
          +	&psObjectTypeString = "PSOBJECTTYPE";
          +	%This.fieldsToSkip = CreateArrayRept("", 0);
          +end-method;
          +
          +method FieldToXML
          +	/+ &ParentNode as XmlNode, +/
          +	/+ &fieldIn as Field +/
          +	/+ Returns XmlNode +/
          +	Local XmlNode &outNode;
          +
          +	Local XmlNode &fldNode, &tempNode;
          +
          +	&fldNode = &ParentNode.AddElement(&fieldIn.Name);
          +
          +	&fldNode.AddAttribute("PSFIELDTYPE", &fieldIn.Type);
          +	&fldNode.AddAttribute(%This.psObjectTypeString, "FIELD");
          +
          +	If &fieldIn.IsEditXlat Then
          +		&fldNode.AddAttribute("LongTranslateValue", &fieldIn.LongTranslateValue);
          +	End-If;
          +
          +	Evaluate &fieldIn.Type
          +	When = "LONGCHAR"
          +	When = "IMAGE"
          +	When = "IMAGEREFERENCE"
          +		If All(&fieldIn.Value) Then
          +
          +			&tempNode = &fldNode.AddCDataSection(&fieldIn.Value);
          +		End-If;
          +		Break;
          +
          +	When = "NUMBER";
          +		&tempNode = &fldNode.AddText(&fieldIn.Value);
          +		Break;
          +	When-Other
          +		If All(&fieldIn.Value) Then
          +			&tempNode = &fldNode.AddText(&fieldIn.Value);
          +		End-If;
          +
          +		Break;
          +	End-Evaluate;
          +
          +	Return &outNode;
          +end-method;
          +
          +
          +method RecordToXML
          +	/+ &parentNode as XmlNode, +/
          +	/+ &recordIn as Record +/
          +	/+ Returns XmlNode +/
          +
          +	Local XmlNode &outNode, &fieldNode;
          +
          +	Local integer &i;
          +
          +	&outNode = &parentNode.AddElement(&recordIn.Name);
          +
          +	&outNode.AddAttribute(%This.psObjectTypeString, "RECORD");
          +
          +	For &i = 1 To &recordIn.FieldCount
          +
          +		If %This.fieldsToSkip.Find(&recordIn.GetField(&i).Name) <= 0 Then
          +			&fieldNode = %This.FieldToXML(&outNode, &recordIn.GetField(&i));
          +		End-If;
          +	End-For;
          +
          +	Return &outNode;
          +end-method;
          +
          +
          +method RowToXML
          +	/+ &ParentNode as XmlNode, +/
          +	/+ &rowIn as Row +/
          +	/+ Returns XmlNode +/
          +
          +	Local XmlNode &outNode, &recNode;
          +
          +	Local integer &i;
          +
          +	&outNode = &ParentNode.AddElement("ROW");
          +	&outNode.AddAttribute(&psObjectTypeString, "ROW");
          +	&outNode.AddAttribute("RowNumber", String(&rowIn.RowNumber));
          +
          +	For &i = 1 To &rowIn.RecordCount
          +		&recNode = %This.RecordToXML(&outNode, &rowIn.GetRecord(&i));
          +	End-For;
          +
          +	Local XmlNode &rsNode;
          +	For &i = 1 To &rowIn.ChildCount
          +		&rsNode = %This.RowsetToXML(&outNode, &rowIn.GetRowset(&i));
          +
          +	End-For;
          +
          +	Return &outNode;
          +end-method;
          +
          +
          +method RowsetToXML
          +	/+ &parentNode as XmlNode, +/
          +	/+ &rowSetIn as Rowset +/
          +	/+ Returns XmlNode +/
          +
          +	Local XmlNode &outNode, &rowNode;
          +
          +	Local integer &i;
          +	&outNode = &parentNode.AddElement(&rowSetIn.DBRecordName);
          +	&outNode.AddAttribute(&psObjectTypeString, "ROWSET");
          +
          +	For &i = 1 To &rowSetIn.ActiveRowCount
          +		&rowNode = %This.RowToXML(&outNode, &rowSetIn.GetRow(&i));
          +	End-For;
          +	Return &outNode;
          +end-method;
          diff --git a/plugins/autoloader/prism-autoloader.js b/plugins/autoloader/prism-autoloader.js index c8157419e9..55e25d7be9 100644 --- a/plugins/autoloader/prism-autoloader.js +++ b/plugins/autoloader/prism-autoloader.js @@ -176,6 +176,7 @@ "objc": "objectivec", "objectpascal": "pascal", "px": "pcaxis", + "pcode": "peoplecode", "pq": "powerquery", "mscript": "powerquery", "py": "python", diff --git a/plugins/autoloader/prism-autoloader.min.js b/plugins/autoloader/prism-autoloader.min.js index 0e8a7af6bd..47500e80ac 100644 --- a/plugins/autoloader/prism-autoloader.min.js +++ b/plugins/autoloader/prism-autoloader.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof self&&self.Prism&&self.document&&document.createElement){var c={javascript:"clike",actionscript:"javascript",arduino:"cpp",aspnet:["markup","csharp"],bison:"c",c:"clike",csharp:"clike",cpp:"c",coffeescript:"javascript",crystal:"ruby","css-extras":"css",d:"clike",dart:"clike",django:"markup-templating",ejs:["javascript","markup-templating"],etlua:["lua","markup-templating"],erb:["ruby","markup-templating"],fsharp:"clike","firestore-security-rules":"clike",flow:"javascript",ftl:"markup-templating",glsl:"clike",gml:"clike",go:"clike",groovy:"clike",haml:"ruby",handlebars:"markup-templating",haxe:"clike",java:"clike",javadoc:["markup","java","javadoclike"],jolie:"clike",jsdoc:["javascript","javadoclike"],"js-extras":"javascript","js-templates":"javascript",jsonp:"json",json5:"json",kotlin:"clike",latte:["clike","markup-templating","php"],less:"css",lilypond:"scheme",markdown:"markup","markup-templating":"markup",n4js:"javascript",nginx:"clike",objectivec:"c",opencl:"c",parser:"markup",php:["clike","markup-templating"],phpdoc:["php","javadoclike"],"php-extras":"php",plsql:"sql",processing:"clike",protobuf:"clike",pug:["markup","javascript"],qml:"javascript",qore:"clike",jsx:["markup","javascript"],tsx:["jsx","typescript"],reason:"clike",ruby:"clike",sass:"css",scss:"css",scala:"java","shell-session":"bash",smarty:"markup-templating",solidity:"clike",soy:"markup-templating",sparql:"turtle",sqf:"clike",swift:"clike",tap:"yaml",textile:"markup",tt2:["clike","markup-templating"],twig:"markup",typescript:"javascript","t4-cs":["t4-templating","csharp"],"t4-vb":["t4-templating","visual-basic"],vala:"clike",vbnet:"basic",velocity:"markup",wiki:"markup",xeora:"markup",xquery:"markup"},l={html:"markup",xml:"markup",svg:"markup",mathml:"markup",js:"javascript",g4:"antlr4",adoc:"asciidoc",shell:"bash",shortcode:"bbcode",rbnf:"bnf",conc:"concurnas",cs:"csharp",dotnet:"csharp",coffee:"coffeescript",jinja2:"django","dns-zone":"dns-zone-file",dockerfile:"docker",eta:"ejs",xlsx:"excel-formula",xls:"excel-formula",gamemakerlanguage:"gml",hs:"haskell",tex:"latex",context:"latex",ly:"lilypond",emacs:"lisp",elisp:"lisp","emacs-lisp":"lisp",md:"markdown",moon:"moonscript",n4jsd:"n4js",objc:"objectivec",objectpascal:"pascal",px:"pcaxis",pq:"powerquery",mscript:"powerquery",py:"python",robot:"robotframework",rb:"ruby",sln:"solution-file",rq:"sparql",trig:"turtle",ts:"typescript",t4:"t4-cs",vb:"visual-basic",xeoracube:"xeora",yml:"yaml"},n={},e="components/",a=Prism.util.currentScript();if(a){var t=/\bplugins\/autoloader\/prism-autoloader\.(?:min\.)js(?:\?[^\r\n/]*)?$/i,r=/(^|\/)[\w-]+\.(?:min\.)js(?:\?[^\r\n/]*)?$/i,s=a.getAttribute("data-autoloader-path");if(null!=s)e=s.trim().replace(/\/?$/,"/");else{var i=a.src;t.test(i)?e=i.replace(t,"components/"):r.test(i)&&(e=i.replace(r,"$1components/"))}}var p=Prism.plugins.autoloader={languages_path:e,use_minified:!0,loadLanguages:o};Prism.hooks.add("complete",function(e){e.element&&e.language&&!e.grammar&&"none"!==e.language&&function(e,a){e in l&&(e=l[e]);var t=(a.getAttribute("data-dependencies")||"").trim();if(!t){var r=a.parentElement;r&&"pre"===r.tagName.toLowerCase()&&(t=(r.getAttribute("data-dependencies")||"").trim())}o(t?t.split(/\s*,\s*/g):[],function(){m(e,function(){Prism.highlightElement(a)})})}(e.language,e.element)})}function o(e,a,t){"string"==typeof e&&(e=[e]);var r=e.length,s=0,i=!1;function c(){i||++s===r&&a&&a(e)}0!==r?e.forEach(function(e){m(e,c,function(){i||(i=!0,t&&t(e))})}):a&&setTimeout(a,0)}function m(a,t,r){var s=0<=a.indexOf("!");a=a.replace("!",""),a=l[a]||a;var e=function(){var e=n[a];if(e||(e=n[a]={callbacks:[]}),e.callbacks.push({success:t,error:r}),!s&&Prism.languages[a])u(a,"success");else if(!s&&e.error)u(a,"error");else if(s||!e.loading){e.loading=!0,function(e,a,t){var r=document.createElement("script");r.src=e,r.async=!0,r.onload=function(){document.body.removeChild(r),a&&a()},r.onerror=function(){document.body.removeChild(r),t&&t()},document.body.appendChild(r)}(function(e){return p.languages_path+"prism-"+e+(p.use_minified?".min":"")+".js"}(a),function(){e.loading=!1,u(a,"success")},function(){e.loading=!1,e.error=!0,u(a,"error")})}},i=c[a];i&&i.length?o(i,e,r):e()}function u(e,a){if(n[e]){for(var t=n[e].callbacks,r=0,s=t.length;r + +<* +<* +comment +*> +*> + +/+ +comment ++/ + +---------------------------------------------------- + +[ + ["comment", "/*\ncomment\n*/"], + ["comment", "REM comment;"], + ["comment", "REM comment\nstatement;"], + ["comment", "<*\ncomment\n*>"], + ["comment", "<*\n<*\ncomment\n*>\n*>"], + ["comment", "/+\ncomment\n+/"] +] + +---------------------------------------------------- + +Checks for comments. diff --git a/tests/languages/peoplecode/keyword_feature.test b/tests/languages/peoplecode/keyword_feature.test new file mode 100644 index 0000000000..bcbe17caf6 --- /dev/null +++ b/tests/languages/peoplecode/keyword_feature.test @@ -0,0 +1,123 @@ +abstract +alias +as; +catch; +class; +component; +constant; +create; +declare +else +end-class +end-evaluate +end-for +end-function +end-get +end-if +end-method +end-set +end-try +end-while +evaluate +extends; +for +function +get +global; +implements; +import +instance; +if +library +local; +method +null +of; +out +peopleCode +private +program +property; +protected +readonly +ref +repeat +return +returns; +set +step +then +throw +to +try +until +value +when +when-other +while + +---------------------------------------------------- + +[ + ["keyword", "abstract"], + ["keyword", "alias"], + ["keyword", "as"], ["punctuation", ";"], + ["keyword", "catch"], ["punctuation", ";"], + ["keyword", "class"], ["punctuation", ";"], + ["keyword", "component"], ["punctuation", ";"], + ["keyword", "constant"], ["punctuation", ";"], + ["keyword", "create"], ["punctuation", ";"], + ["keyword", "declare"], + ["keyword", "else"], + ["keyword", "end-class"], + ["keyword", "end-evaluate"], + ["keyword", "end-for"], + ["keyword", "end-function"], + ["keyword", "end-get"], + ["keyword", "end-if"], + ["keyword", "end-method"], + ["keyword", "end-set"], + ["keyword", "end-try"], + ["keyword", "end-while"], + ["keyword", "evaluate"], + ["keyword", "extends"], ["punctuation", ";"], + ["keyword", "for"], + ["keyword", "function"], + ["function-definition", "get"], + ["keyword", "global"], ["punctuation", ";"], + ["keyword", "implements"], ["punctuation", ";"], + ["keyword", "import"], + ["keyword", "instance"], ["punctuation", ";"], + ["keyword", "if"], + ["keyword", "library"], + ["keyword", "local"], ["punctuation", ";"], + ["keyword", "method"], + ["function-definition", "null"], + ["keyword", "of"], ["punctuation", ";"], + ["keyword", "out"], + ["keyword", "peopleCode"], + ["keyword", "private"], + ["keyword", "program"], + ["keyword", "property"], ["punctuation", ";"], + ["keyword", "protected"], + ["keyword", "readonly"], + ["keyword", "ref"], + ["keyword", "repeat"], + ["keyword", "return"], + ["keyword", "returns"], ["punctuation", ";"], + ["keyword", "set"], + ["keyword", "step"], + ["keyword", "then"], + ["keyword", "throw"], + ["keyword", "to"], + ["keyword", "try"], + ["keyword", "until"], + ["keyword", "value"], + ["keyword", "when"], + ["keyword", "when-other"], + ["keyword", "while"] +] + +---------------------------------------------------- + +Checks for keywords. diff --git a/tests/languages/peoplecode/operator_feature.test b/tests/languages/peoplecode/operator_feature.test new file mode 100644 index 0000000000..6b29e58463 --- /dev/null +++ b/tests/languages/peoplecode/operator_feature.test @@ -0,0 +1,38 @@ ++ - * / ** +> >= < <= = != <> +| @ + +and or not +AND OR NOT + +---------------------------------------------------- + +[ + ["operator", "+"], + ["operator", "-"], + ["operator", "*"], + ["operator", "/"], + ["operator", "**"], + + ["operator", ">"], + ["operator", ">="], + ["operator", "<"], + ["operator", "<="], + ["operator", "="], + ["operator", "!="], + ["operator", "<>"], + + ["operator", "|"], + ["operator", "@"], + + ["operator-keyword", "and"], + ["operator-keyword", "or"], + ["operator-keyword", "not"], + ["operator-keyword", "AND"], + ["operator-keyword", "OR"], + ["operator-keyword", "NOT"] +] + +---------------------------------------------------- + +Checks for operators. diff --git a/tests/languages/peoplecode/string_feature.test b/tests/languages/peoplecode/string_feature.test new file mode 100644 index 0000000000..117a0a1e12 --- /dev/null +++ b/tests/languages/peoplecode/string_feature.test @@ -0,0 +1,22 @@ +"" +"foo" +"""foo"" " + +'' +'foo' +'''foo' + +---------------------------------------------------- + +[ + ["string", "\"\""], + ["string", "\"foo\""], + ["string", "\"\"\"foo\"\" \""], + ["string", "''"], + ["string", "'foo'"], + ["string", "'''foo'"] +] + +---------------------------------------------------- + +Checks for strings. From 1093ceb31d20d358f4aed0f0526b4694868923e6 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Mon, 27 Apr 2020 22:33:02 +0200 Subject: [PATCH 0499/1100] Added support for UnrealScript (#2305) --- components.js | 2 +- components.json | 5 + components/prism-unrealscript.js | 42 ++++ components/prism-unrealscript.min.js | 1 + examples/prism-unrealscript.html | 38 ++++ plugins/autoloader/prism-autoloader.js | 2 + plugins/autoloader/prism-autoloader.min.js | 2 +- plugins/show-language/prism-show-language.js | 2 + .../show-language/prism-show-language.min.js | 2 +- .../unrealscript/boolean_feature.test | 13 ++ .../unrealscript/class-name_feature.test | 51 +++++ .../unrealscript/comment_feature.test | 16 ++ .../unrealscript/keyword_feature.test | 204 ++++++++++++++++++ .../languages/unrealscript/macro_feature.test | 15 ++ .../unrealscript/metadata_feature.test | 87 ++++++++ .../unrealscript/number_feature.test | 16 ++ .../unrealscript/operator_feature.test | 70 ++++++ .../unrealscript/string_feature.test | 19 ++ 18 files changed, 584 insertions(+), 3 deletions(-) create mode 100644 components/prism-unrealscript.js create mode 100644 components/prism-unrealscript.min.js create mode 100644 examples/prism-unrealscript.html create mode 100644 tests/languages/unrealscript/boolean_feature.test create mode 100644 tests/languages/unrealscript/class-name_feature.test create mode 100644 tests/languages/unrealscript/comment_feature.test create mode 100644 tests/languages/unrealscript/keyword_feature.test create mode 100644 tests/languages/unrealscript/macro_feature.test create mode 100644 tests/languages/unrealscript/metadata_feature.test create mode 100644 tests/languages/unrealscript/number_feature.test create mode 100644 tests/languages/unrealscript/operator_feature.test create mode 100644 tests/languages/unrealscript/string_feature.test diff --git a/components.js b/components.js index cb77f4cb0e..7f1e930a59 100644 --- a/components.js +++ b/components.js @@ -1,2 +1,2 @@ -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"Augmented Backus–Naur form","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"Backus–Naur form","alias":"rbnf","aliasTitles":{"rbnf":"Routing Backus–Naur form"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dax":{"title":"DAX","owner":"peterbud"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"Extended Backus–Naur form","owner":"RunDevelopment"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"http":{"title":"HTTP","optional":["css","javascript","json","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"json":{"title":"JSON","owner":"CupOfTea696"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","modify":["actionscript","coffeescript","flow","javascript","typescript","vala"],"owner":"RunDevelopment"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"solidity":{"title":"Solidity (Ethereum)","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","visual-basic"],"owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"Augmented Backus–Naur form","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"Backus–Naur form","alias":"rbnf","aliasTitles":{"rbnf":"Routing Backus–Naur form"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dax":{"title":"DAX","owner":"peterbud"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"Extended Backus–Naur form","owner":"RunDevelopment"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"http":{"title":"HTTP","optional":["css","javascript","json","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"json":{"title":"JSON","owner":"CupOfTea696"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","modify":["actionscript","coffeescript","flow","javascript","typescript","vala"],"owner":"RunDevelopment"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"solidity":{"title":"Solidity (Ethereum)","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","visual-basic"],"owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; if (typeof module !== 'undefined' && module.exports) { module.exports = components; } \ No newline at end of file diff --git a/components.json b/components.json index 83444fe186..833f6ff2b6 100644 --- a/components.json +++ b/components.json @@ -1068,6 +1068,11 @@ "title": "T4 templating", "owner": "RunDevelopment" }, + "unrealscript": { + "title": "UnrealScript", + "alias": ["uscript", "uc"], + "owner": "RunDevelopment" + }, "vala": { "title": "Vala", "require": "clike", diff --git a/components/prism-unrealscript.js b/components/prism-unrealscript.js new file mode 100644 index 0000000000..a6a1345f82 --- /dev/null +++ b/components/prism-unrealscript.js @@ -0,0 +1,42 @@ +Prism.languages.unrealscript = { + 'comment': /\/\/.*|\/\*[\s\S]*?\*\//, + 'string': { + pattern: /(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/, + greedy: true + }, + 'category': { + pattern: /(\b(?:(?:autoexpand|hide|show)categories|var)\s*\()[^()]+(?=\))/, + lookbehind: true, + greedy: true, + alias: 'property' + }, + 'metadata': { + pattern: /(\w\s*)<\s*\w+\s*=[^<>|=\r\n]+(?:\|\s*\w+\s*=[^<>|=\r\n]+)*>/, + lookbehind: true, + greedy: true, + inside: { + 'property': /\w+(?=\s*=)/, + 'operator': /=/, + 'punctuation': /[<>|]/ + } + }, + 'macro': { + pattern: /`\w+/, + alias: 'property' + }, + 'class-name': { + pattern: /(\b(?:class|enum|extends|interface|state(?:\(\))?|struct|within)\s+)\w+/, + lookbehind: true + }, + + 'keyword': /\b(?:abstract|actor|array|auto|autoexpandcategories|bool|break|byte|case|class|classgroup|client|coerce|collapsecategories|config|const|continue|default|defaultproperties|delegate|dependson|deprecated|do|dontcollapsecategories|editconst|editinlinenew|else|enum|event|exec|export|extends|final|float|for|forcescriptorder|foreach|function|goto|guid|hidecategories|hidedropdown|if|ignores|implements|inherits|input|int|interface|iterator|latent|local|material|name|native|nativereplication|noexport|nontransient|noteditinlinenew|notplaceable|operator|optional|out|pawn|perobjectconfig|perobjectlocalized|placeable|postoperator|preoperator|private|protected|reliable|replication|return|server|showcategories|simulated|singular|state|static|string|struct|structdefault|structdefaultproperties|switch|texture|transient|travel|unreliable|until|var|vector|while|within)\b/, + 'function': /[a-z_]\w*(?=\s*\()/i, + + 'boolean': /\b(?:false|true)\b/, + 'number': /\b0x[\da-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?/i, + // https://docs.unrealengine.com/udk/Three/UnrealScriptExpressions.html + 'operator': />>|<<|--|\+\+|\*\*|[-+*/~!=<>$@]=?|&&?|\|\|?|\^\^?|[?:%]|\b(?:Cross|Dot|ClockwiseFrom)\b/, + 'punctuation': /[()[\]{};,.]/ +}; + +Prism.languages.uc = Prism.languages.uscript = Prism.languages.unrealscript; diff --git a/components/prism-unrealscript.min.js b/components/prism-unrealscript.min.js new file mode 100644 index 0000000000..eb58ad0315 --- /dev/null +++ b/components/prism-unrealscript.min.js @@ -0,0 +1 @@ +Prism.languages.unrealscript={comment:/\/\/.*|\/\*[\s\S]*?\*\//,string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},category:{pattern:/(\b(?:(?:autoexpand|hide|show)categories|var)\s*\()[^()]+(?=\))/,lookbehind:!0,greedy:!0,alias:"property"},metadata:{pattern:/(\w\s*)<\s*\w+\s*=[^<>|=\r\n]+(?:\|\s*\w+\s*=[^<>|=\r\n]+)*>/,lookbehind:!0,greedy:!0,inside:{property:/\w+(?=\s*=)/,operator:/=/,punctuation:/[<>|]/}},macro:{pattern:/`\w+/,alias:"property"},"class-name":{pattern:/(\b(?:class|enum|extends|interface|state(?:\(\))?|struct|within)\s+)\w+/,lookbehind:!0},keyword:/\b(?:abstract|actor|array|auto|autoexpandcategories|bool|break|byte|case|class|classgroup|client|coerce|collapsecategories|config|const|continue|default|defaultproperties|delegate|dependson|deprecated|do|dontcollapsecategories|editconst|editinlinenew|else|enum|event|exec|export|extends|final|float|for|forcescriptorder|foreach|function|goto|guid|hidecategories|hidedropdown|if|ignores|implements|inherits|input|int|interface|iterator|latent|local|material|name|native|nativereplication|noexport|nontransient|noteditinlinenew|notplaceable|operator|optional|out|pawn|perobjectconfig|perobjectlocalized|placeable|postoperator|preoperator|private|protected|reliable|replication|return|server|showcategories|simulated|singular|state|static|string|struct|structdefault|structdefaultproperties|switch|texture|transient|travel|unreliable|until|var|vector|while|within)\b/,function:/[a-z_]\w*(?=\s*\()/i,boolean:/\b(?:false|true)\b/,number:/\b0x[\da-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/>>|<<|--|\+\+|\*\*|[-+*/~!=<>$@]=?|&&?|\|\|?|\^\^?|[?:%]|\b(?:Cross|Dot|ClockwiseFrom)\b/,punctuation:/[()[\]{};,.]/},Prism.languages.uc=Prism.languages.uscript=Prism.languages.unrealscript; \ No newline at end of file diff --git a/examples/prism-unrealscript.html b/examples/prism-unrealscript.html new file mode 100644 index 0000000000..b4926e6ba7 --- /dev/null +++ b/examples/prism-unrealscript.html @@ -0,0 +1,38 @@ +

          Full example

          +
          // Source: https://github.com/Jusas/XCOM2_ReconSoldierClass/blob/master/ReconOperatorSoldierClass/Src/ReconSoldierClass/Classes/ReconOperator_AcademyUnlocks.uc
          +
          +class ReconOperator_AcademyUnlocks extends X2StrategyElement;
          +
          +static function array<X2DataTemplate> CreateTemplates()
          +{
          +	local array<X2DataTemplate> Templates;
          +
          +	Templates.AddItem(AdrenalineUnlock());
          +
          +	return Templates;
          +}
          +
          +static function X2SoldierAbilityUnlockTemplate AdrenalineUnlock()
          +{
          +	local X2SoldierAbilityUnlockTemplate Template;
          +	local ArtifactCost Resources;
          +
          +	`CREATE_X2TEMPLATE(class'X2SoldierAbilityUnlockTemplate', Template, 'ReconAdrenalineUnlock');
          +
          +	Template.AllowedClasses.AddItem('ReconSoldierClass');
          +	Template.AbilityName = 'ReconAdrenalineSpike';
          +	Template.strImage = "img:///UILibrary_ReconOperator.GTS.GTS_adrenaline";
          +
          +	// Requirements
          +	Template.Requirements.RequiredHighestSoldierRank = 5;
          +	Template.Requirements.RequiredSoldierClass = 'ReconSoldierClass';
          +	Template.Requirements.RequiredSoldierRankClassCombo = true;
          +	Template.Requirements.bVisibleIfSoldierRankGatesNotMet = true;
          +
          +	// Cost
          +	Resources.ItemTemplateName = 'Supplies';
          +	Resources.Quantity = 75;
          +	Template.Cost.ResourceCosts.AddItem(Resources);
          +
          +	return Template;
          +}
          diff --git a/plugins/autoloader/prism-autoloader.js b/plugins/autoloader/prism-autoloader.js index 55e25d7be9..9967942a45 100644 --- a/plugins/autoloader/prism-autoloader.js +++ b/plugins/autoloader/prism-autoloader.js @@ -187,6 +187,8 @@ "trig": "turtle", "ts": "typescript", "t4": "t4-cs", + "uscript": "unrealscript", + "uc": "unrealscript", "vb": "visual-basic", "xeoracube": "xeora", "yml": "yaml" diff --git a/plugins/autoloader/prism-autoloader.min.js b/plugins/autoloader/prism-autoloader.min.js index 47500e80ac..b1a4b0f8ee 100644 --- a/plugins/autoloader/prism-autoloader.min.js +++ b/plugins/autoloader/prism-autoloader.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof self&&self.Prism&&self.document&&document.createElement){var c={javascript:"clike",actionscript:"javascript",arduino:"cpp",aspnet:["markup","csharp"],bison:"c",c:"clike",csharp:"clike",cpp:"c",coffeescript:"javascript",crystal:"ruby","css-extras":"css",d:"clike",dart:"clike",django:"markup-templating",ejs:["javascript","markup-templating"],etlua:["lua","markup-templating"],erb:["ruby","markup-templating"],fsharp:"clike","firestore-security-rules":"clike",flow:"javascript",ftl:"markup-templating",glsl:"clike",gml:"clike",go:"clike",groovy:"clike",haml:"ruby",handlebars:"markup-templating",haxe:"clike",java:"clike",javadoc:["markup","java","javadoclike"],jolie:"clike",jsdoc:["javascript","javadoclike"],"js-extras":"javascript","js-templates":"javascript",jsonp:"json",json5:"json",kotlin:"clike",latte:["clike","markup-templating","php"],less:"css",lilypond:"scheme",markdown:"markup","markup-templating":"markup",n4js:"javascript",nginx:"clike",objectivec:"c",opencl:"c",parser:"markup",php:["clike","markup-templating"],phpdoc:["php","javadoclike"],"php-extras":"php",plsql:"sql",processing:"clike",protobuf:"clike",pug:["markup","javascript"],qml:"javascript",qore:"clike",jsx:["markup","javascript"],tsx:["jsx","typescript"],reason:"clike",ruby:"clike",sass:"css",scss:"css",scala:"java","shell-session":"bash",smarty:"markup-templating",solidity:"clike",soy:"markup-templating",sparql:"turtle",sqf:"clike",swift:"clike",tap:"yaml",textile:"markup",tt2:["clike","markup-templating"],twig:"markup",typescript:"javascript","t4-cs":["t4-templating","csharp"],"t4-vb":["t4-templating","visual-basic"],vala:"clike",vbnet:"basic",velocity:"markup",wiki:"markup",xeora:"markup",xquery:"markup"},l={html:"markup",xml:"markup",svg:"markup",mathml:"markup",js:"javascript",g4:"antlr4",adoc:"asciidoc",shell:"bash",shortcode:"bbcode",rbnf:"bnf",conc:"concurnas",cs:"csharp",dotnet:"csharp",coffee:"coffeescript",jinja2:"django","dns-zone":"dns-zone-file",dockerfile:"docker",eta:"ejs",xlsx:"excel-formula",xls:"excel-formula",gamemakerlanguage:"gml",hs:"haskell",tex:"latex",context:"latex",ly:"lilypond",emacs:"lisp",elisp:"lisp","emacs-lisp":"lisp",md:"markdown",moon:"moonscript",n4jsd:"n4js",objc:"objectivec",objectpascal:"pascal",px:"pcaxis",pcode:"peoplecode",pq:"powerquery",mscript:"powerquery",py:"python",robot:"robotframework",rb:"ruby",sln:"solution-file",rq:"sparql",trig:"turtle",ts:"typescript",t4:"t4-cs",vb:"visual-basic",xeoracube:"xeora",yml:"yaml"},n={},e="components/",a=Prism.util.currentScript();if(a){var t=/\bplugins\/autoloader\/prism-autoloader\.(?:min\.)js(?:\?[^\r\n/]*)?$/i,r=/(^|\/)[\w-]+\.(?:min\.)js(?:\?[^\r\n/]*)?$/i,s=a.getAttribute("data-autoloader-path");if(null!=s)e=s.trim().replace(/\/?$/,"/");else{var i=a.src;t.test(i)?e=i.replace(t,"components/"):r.test(i)&&(e=i.replace(r,"$1components/"))}}var p=Prism.plugins.autoloader={languages_path:e,use_minified:!0,loadLanguages:o};Prism.hooks.add("complete",function(e){e.element&&e.language&&!e.grammar&&"none"!==e.language&&function(e,a){e in l&&(e=l[e]);var t=(a.getAttribute("data-dependencies")||"").trim();if(!t){var r=a.parentElement;r&&"pre"===r.tagName.toLowerCase()&&(t=(r.getAttribute("data-dependencies")||"").trim())}o(t?t.split(/\s*,\s*/g):[],function(){m(e,function(){Prism.highlightElement(a)})})}(e.language,e.element)})}function o(e,a,t){"string"==typeof e&&(e=[e]);var r=e.length,s=0,i=!1;function c(){i||++s===r&&a&&a(e)}0!==r?e.forEach(function(e){m(e,c,function(){i||(i=!0,t&&t(e))})}):a&&setTimeout(a,0)}function m(a,t,r){var s=0<=a.indexOf("!");a=a.replace("!",""),a=l[a]||a;var e=function(){var e=n[a];if(e||(e=n[a]={callbacks:[]}),e.callbacks.push({success:t,error:r}),!s&&Prism.languages[a])u(a,"success");else if(!s&&e.error)u(a,"error");else if(s||!e.loading){e.loading=!0,function(e,a,t){var r=document.createElement("script");r.src=e,r.async=!0,r.onload=function(){document.body.removeChild(r),a&&a()},r.onerror=function(){document.body.removeChild(r),t&&t()},document.body.appendChild(r)}(function(e){return p.languages_path+"prism-"+e+(p.use_minified?".min":"")+".js"}(a),function(){e.loading=!1,u(a,"success")},function(){e.loading=!1,e.error=!0,u(a,"error")})}},i=c[a];i&&i.length?o(i,e,r):e()}function u(e,a){if(n[e]){for(var t=n[e].callbacks,r=0,s=t.length;r; + +enum EMyEnum +{ + EME_ValA, + EME_ValB, +}; + +var() LinearColor DrawColor; + + +// not metadata +var array> Bar; + +---------------------------------------------------- + +[ + ["keyword", "var"], + ["keyword", "float"], + " MyVar", + ["metadata", [ + ["punctuation", "<"], + ["property", "TAG"], + ["operator", "="], + "VALUE", + ["punctuation", ">"] + ]], + ["punctuation", ";"], + + ["keyword", "enum"], + ["class-name", "EMyEnum"], + ["punctuation", "{"], + "\r\n\tEME_ValA", + ["metadata", [ + ["punctuation", "<"], + ["property", "TAG"], + ["operator", "="], + "VALUE", + ["punctuation", ">"] + ]], + ["punctuation", ","], + "\r\n\tEME_ValB", + ["metadata", [ + ["punctuation", "<"], + ["property", "TAG"], + ["operator", "="], + "VALUE", + ["punctuation", ">"] + ]], + ["punctuation", ","], + ["punctuation", "}"], + ["punctuation", ";"], + + ["keyword", "var"], + ["punctuation", "("], + ["punctuation", ")"], + " LinearColor DrawColor", + ["metadata", [ + ["punctuation", "<"], + ["property", "DisplayName"], + ["operator", "="], + "Draw Color", + ["punctuation", "|"], + ["property", "EditCondition"], + ["operator", "="], + "bOverrideDrawColor", + ["punctuation", ">"] + ]], + ["punctuation", ";"], + + + ["comment", "// not metadata"], + + ["keyword", "var"], + ["keyword", "array"], + ["operator", "<"], + ["keyword", "class"], + ["operator", "<"], + "Foo", + ["operator", ">>"], + " Bar", + ["punctuation", ";"] +] + +---------------------------------------------------- + +Checks for metadata. diff --git a/tests/languages/unrealscript/number_feature.test b/tests/languages/unrealscript/number_feature.test new file mode 100644 index 0000000000..8f744d9ce6 --- /dev/null +++ b/tests/languages/unrealscript/number_feature.test @@ -0,0 +1,16 @@ +123 +123e+5 + +0xFFFF + +---------------------------------------------------- + +[ + ["number", "123"], + ["number", "123e+5"], + ["number", "0xFFFF"] +] + +---------------------------------------------------- + +Checks for numbers. diff --git a/tests/languages/unrealscript/operator_feature.test b/tests/languages/unrealscript/operator_feature.test new file mode 100644 index 0000000000..2fe1324814 --- /dev/null +++ b/tests/languages/unrealscript/operator_feature.test @@ -0,0 +1,70 @@ ++ - * / % ** ++= -= *= /= +++ -- +~ && || ^^ +! & | ^ << >> + +> >= < <= == != ~= +$ $= @ @= += + +? : + +Cross Dot ClockwiseFrom + +---------------------------------------------------- + +[ + ["operator", "+"], + ["operator", "-"], + ["operator", "*"], + ["operator", "/"], + ["operator", "%"], + ["operator", "**"], + + ["operator", "+="], + ["operator", "-="], + ["operator", "*="], + ["operator", "/="], + + ["operator", "++"], + ["operator", "--"], + + ["operator", "~"], + ["operator", "&&"], + ["operator", "||"], + ["operator", "^^"], + + ["operator", "!"], + ["operator", "&"], + ["operator", "|"], + ["operator", "^"], + ["operator", "<<"], + ["operator", ">>"], + + ["operator", ">"], + ["operator", ">="], + ["operator", "<"], + ["operator", "<="], + ["operator", "=="], + ["operator", "!="], + ["operator", "~="], + + ["operator", "$"], + ["operator", "$="], + ["operator", "@"], + ["operator", "@="], + + ["operator", "="], + + ["operator", "?"], + ["operator", ":"], + + ["operator", "Cross"], + ["operator", "Dot"], + ["operator", "ClockwiseFrom"] +] + +---------------------------------------------------- + +Checks for operators. diff --git a/tests/languages/unrealscript/string_feature.test b/tests/languages/unrealscript/string_feature.test new file mode 100644 index 0000000000..1c2715ef38 --- /dev/null +++ b/tests/languages/unrealscript/string_feature.test @@ -0,0 +1,19 @@ +"" +"foo" + +'' +'foo' + +---------------------------------------------------- + +[ + ["string", "\"\""], + ["string", "\"foo\""], + + ["string", "''"], + ["string", "'foo'"] +] + +---------------------------------------------------- + +Checks for strings. From cde5b0fab769acb09e8e03ec3085a3c2ea0e421a Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Mon, 27 Apr 2020 22:39:29 +0200 Subject: [PATCH 0500/1100] Added support for Warpscript (#2307) --- components.js | 2 +- components.json | 4 ++ components/prism-warpscript.js | 21 +++++++++ components/prism-warpscript.min.js | 1 + examples/prism-warpscript.html | 22 +++++++++ .../languages/warpscript/boolean_feature.test | 17 +++++++ .../languages/warpscript/comment_feature.test | 19 ++++++++ .../languages/warpscript/number_feature.test | 35 +++++++++++++++ .../warpscript/operator_feature.test | 45 +++++++++++++++++++ .../warpscript/punctuation_feature.test | 19 ++++++++ .../languages/warpscript/string_feature.test | 19 ++++++++ 11 files changed, 203 insertions(+), 1 deletion(-) create mode 100644 components/prism-warpscript.js create mode 100644 components/prism-warpscript.min.js create mode 100644 examples/prism-warpscript.html create mode 100644 tests/languages/warpscript/boolean_feature.test create mode 100644 tests/languages/warpscript/comment_feature.test create mode 100644 tests/languages/warpscript/number_feature.test create mode 100644 tests/languages/warpscript/operator_feature.test create mode 100644 tests/languages/warpscript/punctuation_feature.test create mode 100644 tests/languages/warpscript/string_feature.test diff --git a/components.js b/components.js index 7f1e930a59..f6cb0f94b2 100644 --- a/components.js +++ b/components.js @@ -1,2 +1,2 @@ -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"Augmented Backus–Naur form","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"Backus–Naur form","alias":"rbnf","aliasTitles":{"rbnf":"Routing Backus–Naur form"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dax":{"title":"DAX","owner":"peterbud"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"Extended Backus–Naur form","owner":"RunDevelopment"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"http":{"title":"HTTP","optional":["css","javascript","json","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"json":{"title":"JSON","owner":"CupOfTea696"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","modify":["actionscript","coffeescript","flow","javascript","typescript","vala"],"owner":"RunDevelopment"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"solidity":{"title":"Solidity (Ethereum)","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","visual-basic"],"owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"Augmented Backus–Naur form","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"Backus–Naur form","alias":"rbnf","aliasTitles":{"rbnf":"Routing Backus–Naur form"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dax":{"title":"DAX","owner":"peterbud"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"Extended Backus–Naur form","owner":"RunDevelopment"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"http":{"title":"HTTP","optional":["css","javascript","json","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"json":{"title":"JSON","owner":"CupOfTea696"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","modify":["actionscript","coffeescript","flow","javascript","typescript","vala"],"owner":"RunDevelopment"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"solidity":{"title":"Solidity (Ethereum)","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","visual-basic"],"owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; if (typeof module !== 'undefined' && module.exports) { module.exports = components; } \ No newline at end of file diff --git a/components.json b/components.json index 833f6ff2b6..0d3ed831af 100644 --- a/components.json +++ b/components.json @@ -1105,6 +1105,10 @@ "alias": "vb", "owner": "Golmote" }, + "warpscript": { + "title": "WarpScript", + "owner": "RunDevelopment" + }, "wasm": { "title": "WebAssembly", "owner": "Golmote" diff --git a/components/prism-warpscript.js b/components/prism-warpscript.js new file mode 100644 index 0000000000..75de50dc97 --- /dev/null +++ b/components/prism-warpscript.js @@ -0,0 +1,21 @@ +Prism.languages.warpscript = { + 'comment': /#.*|\/\/.*|\/\*[\s\S]*?\*\//, + 'string': { + pattern: /"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'|<'(?:[^\\']|'(?!>)|\\.)*'>/, + greedy: true + }, + 'variable': /\$\S+/, + 'macro': { + pattern: /@\S+/, + alias: 'property' + }, + // WarpScript doesn't have any keywords, these are all functions under the control category + // https://www.warp10.io/tags/control + 'keyword': /\b(?:BREAK|CHECKMACRO|CONTINUE|CUDF|DEFINED|DEFINEDMACRO|EVAL|FAIL|FOR|FOREACH|FORSTEP|IFT|IFTE|MSGFAIL|NRETURN|RETHROW|RETURN|SWITCH|TRY|UDF|UNTIL|WHILE)\b/, + 'number': /[+-]?\b(?:NaN|Infinity|\d+(?:\.\d*)?(?:[Ee][+-]?\d+)?|0x[\da-fA-F]+|0b[01]+)\b/, + 'boolean': /\b(?:false|true|F|T)\b/, + 'punctuation': /<%|%>|[{}[\]()]/, + // Some operators from the "operators" category + // https://www.warp10.io/tags/operators + 'operator': /==|&&?|\|\|?|\*\*?|>>>?|<<|==|[<>!~]=?|[-/%^]|\+!?|\b(?:AND|NOT|OR)\b/ +}; diff --git a/components/prism-warpscript.min.js b/components/prism-warpscript.min.js new file mode 100644 index 0000000000..b5a6a70769 --- /dev/null +++ b/components/prism-warpscript.min.js @@ -0,0 +1 @@ +Prism.languages.warpscript={comment:/#.*|\/\/.*|\/\*[\s\S]*?\*\//,string:{pattern:/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'|<'(?:[^\\']|'(?!>)|\\.)*'>/,greedy:!0},variable:/\$\S+/,macro:{pattern:/@\S+/,alias:"property"},keyword:/\b(?:BREAK|CHECKMACRO|CONTINUE|CUDF|DEFINED|DEFINEDMACRO|EVAL|FAIL|FOR|FOREACH|FORSTEP|IFT|IFTE|MSGFAIL|NRETURN|RETHROW|RETURN|SWITCH|TRY|UDF|UNTIL|WHILE)\b/,number:/[+-]?\b(?:NaN|Infinity|\d+(?:\.\d*)?(?:[Ee][+-]?\d+)?|0x[\da-fA-F]+|0b[01]+)\b/,boolean:/\b(?:false|true|F|T)\b/,punctuation:/<%|%>|[{}[\]()]/,operator:/==|&&?|\|\|?|\*\*?|>>>?|<<|==|[<>!~]=?|[-/%^]|\+!?|\b(?:AND|NOT|OR)\b/}; \ No newline at end of file diff --git a/examples/prism-warpscript.html b/examples/prism-warpscript.html new file mode 100644 index 0000000000..177d0d57d9 --- /dev/null +++ b/examples/prism-warpscript.html @@ -0,0 +1,22 @@ +

          Full example

          +
          // Source: https://www.warp10.io/content/04_Tutorials/01_WarpScript/05_Best_Practices
          +
          +//factorial macro. take a number on the stack, push its factorial
          +<%
          +	'input' STORE
          +	1
          +	1 $input <% * %> FOR
          +%> 'factorial' STORE
          +
          +//build a map with key from 1 to 10 and value = key!
          +{} 'result' STORE
          +
          +1 10
          +<%
          +	'key' STORE
          +	$result $key @factorial $key PUT
          +	DROP //remove the map let by PUT
          +%> FOR
          +
          +//push the result on the stack
          +$result
          diff --git a/tests/languages/warpscript/boolean_feature.test b/tests/languages/warpscript/boolean_feature.test new file mode 100644 index 0000000000..fa3f73ad2b --- /dev/null +++ b/tests/languages/warpscript/boolean_feature.test @@ -0,0 +1,17 @@ +false +true +F +T + +---------------------------------------------------- + +[ + ["boolean", "false"], + ["boolean", "true"], + ["boolean", "F"], + ["boolean", "T"] +] + +---------------------------------------------------- + +Checks for booleans. diff --git a/tests/languages/warpscript/comment_feature.test b/tests/languages/warpscript/comment_feature.test new file mode 100644 index 0000000000..be9e2b2464 --- /dev/null +++ b/tests/languages/warpscript/comment_feature.test @@ -0,0 +1,19 @@ +# Python style comments, starting with a '#' and extending to the end of the line + +// Java style comments, extending to the end of the line after the '//' + +/* + C style block comments, possibly spanning multiple lines +*/ + +---------------------------------------------------- + +[ + ["comment", "# Python style comments, starting with a '#' and extending to the end of the line"], + ["comment", "// Java style comments, extending to the end of the line after the '//'"], + ["comment", "/*\r\n C style block comments, possibly spanning multiple lines\r\n*/"] +] + +---------------------------------------------------- + +Checks for comments. diff --git a/tests/languages/warpscript/number_feature.test b/tests/languages/warpscript/number_feature.test new file mode 100644 index 0000000000..a0f361beac --- /dev/null +++ b/tests/languages/warpscript/number_feature.test @@ -0,0 +1,35 @@ +123 +-123 +5e4 +5e-4 +123.546 +123.546E-5 + +0xFFF +0b10101 + +NaN +Infinity +-Infinity + +---------------------------------------------------- + +[ + ["number", "123"], + ["number", "-123"], + ["number", "5e4"], + ["number", "5e-4"], + ["number", "123.546"], + ["number", "123.546E-5"], + + ["number", "0xFFF"], + ["number", "0b10101"], + + ["number", "NaN"], + ["number", "Infinity"], + ["number", "-Infinity"] +] + +---------------------------------------------------- + +Checks for numbers. diff --git a/tests/languages/warpscript/operator_feature.test b/tests/languages/warpscript/operator_feature.test new file mode 100644 index 0000000000..635036a1fc --- /dev/null +++ b/tests/languages/warpscript/operator_feature.test @@ -0,0 +1,45 @@ +!= < > ~= <= == >= +% * + - / ** +! && AND OR NOT || +& ^ | >>> ~ << >> ++! + +---------------------------------------------------- + +[ + ["operator", "!="], + ["operator", "<"], + ["operator", ">"], + ["operator", "~="], + ["operator", "<="], + ["operator", "=="], + ["operator", ">="], + + ["operator", "%"], + ["operator", "*"], + ["operator", "+"], + ["operator", "-"], + ["operator", "/"], + ["operator", "**"], + + ["operator", "!"], + ["operator", "&&"], + ["operator", "AND"], + ["operator", "OR"], + ["operator", "NOT"], + ["operator", "||"], + + ["operator", "&"], + ["operator", "^"], + ["operator", "|"], + ["operator", ">>>"], + ["operator", "~"], + ["operator", "<<"], + ["operator", ">>"], + + ["operator", "+!"] +] + +---------------------------------------------------- + +Checks for operators. diff --git a/tests/languages/warpscript/punctuation_feature.test b/tests/languages/warpscript/punctuation_feature.test new file mode 100644 index 0000000000..ba0cb5308e --- /dev/null +++ b/tests/languages/warpscript/punctuation_feature.test @@ -0,0 +1,19 @@ +<% %> +( ) [ ] { } + +---------------------------------------------------- + +[ + ["punctuation", "<%"], + ["punctuation", "%>"], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", "["], + ["punctuation", "]"], + ["punctuation", "{"], + ["punctuation", "}"] +] + +---------------------------------------------------- + +Checks for punctuation. diff --git a/tests/languages/warpscript/string_feature.test b/tests/languages/warpscript/string_feature.test new file mode 100644 index 0000000000..2fea2cd750 --- /dev/null +++ b/tests/languages/warpscript/string_feature.test @@ -0,0 +1,19 @@ +'Caf%C3%A9' + +"foo" + +<' + foo +'> + +---------------------------------------------------- + +[ + ["string", "'Caf%C3%A9'"], + ["string", "\"foo\""], + ["string", "<'\r\n foo\r\n'>"] +] + +---------------------------------------------------- + +Checks for strings. From eb70070de8027462635b4ae1ae8f8cda428ecf49 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Mon, 27 Apr 2020 22:43:30 +0200 Subject: [PATCH 0501/1100] Added support for SSML (#2306) --- components.js | 2 +- components.json | 5 +++-- components/prism-markup.js | 10 ++++++---- components/prism-markup.min.js | 2 +- plugins/autoloader/prism-autoloader.js | 1 + plugins/autoloader/prism-autoloader.min.js | 2 +- plugins/show-language/prism-show-language.js | 1 + plugins/show-language/prism-show-language.min.js | 2 +- prism.js | 10 ++++++---- 9 files changed, 21 insertions(+), 14 deletions(-) diff --git a/components.js b/components.js index f6cb0f94b2..776aaaa7e7 100644 --- a/components.js +++ b/components.js @@ -1,2 +1,2 @@ -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"Augmented Backus–Naur form","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"Backus–Naur form","alias":"rbnf","aliasTitles":{"rbnf":"Routing Backus–Naur form"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dax":{"title":"DAX","owner":"peterbud"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"Extended Backus–Naur form","owner":"RunDevelopment"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"http":{"title":"HTTP","optional":["css","javascript","json","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"json":{"title":"JSON","owner":"CupOfTea696"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","modify":["actionscript","coffeescript","flow","javascript","typescript","vala"],"owner":"RunDevelopment"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"solidity":{"title":"Solidity (Ethereum)","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","visual-basic"],"owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml","ssml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","ssml":"SSML"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"Augmented Backus–Naur form","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"Backus–Naur form","alias":"rbnf","aliasTitles":{"rbnf":"Routing Backus–Naur form"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dax":{"title":"DAX","owner":"peterbud"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"Extended Backus–Naur form","owner":"RunDevelopment"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"http":{"title":"HTTP","optional":["css","javascript","json","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"json":{"title":"JSON","owner":"CupOfTea696"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","modify":["actionscript","coffeescript","flow","javascript","typescript","vala"],"owner":"RunDevelopment"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"solidity":{"title":"Solidity (Ethereum)","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","visual-basic"],"owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; if (typeof module !== 'undefined' && module.exports) { module.exports = components; } \ No newline at end of file diff --git a/components.json b/components.json index 0d3ed831af..dc87275049 100644 --- a/components.json +++ b/components.json @@ -48,12 +48,13 @@ }, "markup": { "title": "Markup", - "alias": ["html", "xml", "svg", "mathml"], + "alias": ["html", "xml", "svg", "mathml", "ssml"], "aliasTitles": { "html": "HTML", "xml": "XML", "svg": "SVG", - "mathml": "MathML" + "mathml": "MathML", + "ssml": "SSML" }, "option": "default" }, diff --git a/components/prism-markup.js b/components/prism-markup.js index a7dcab8d1b..b8837c7aef 100644 --- a/components/prism-markup.js +++ b/components/prism-markup.js @@ -7,18 +7,18 @@ Prism.languages.markup = { }, 'cdata': //i, 'tag': { - pattern: /<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/i, + pattern: /<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/, greedy: true, inside: { 'tag': { - pattern: /^<\/?[^\s>\/]+/i, + pattern: /^<\/?[^\s>\/]+/, inside: { 'punctuation': /^<\/?/, 'namespace': /^[^\s>\/:]+:/ } }, 'attr-value': { - pattern: /=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/i, + pattern: /=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/, inside: { 'punctuation': [ /^=/, @@ -97,7 +97,9 @@ Object.defineProperty(Prism.languages.markup.tag, 'addInlined', { } }); -Prism.languages.xml = Prism.languages.extend('markup', {}); Prism.languages.html = Prism.languages.markup; Prism.languages.mathml = Prism.languages.markup; Prism.languages.svg = Prism.languages.markup; + +Prism.languages.xml = Prism.languages.extend('markup', {}); +Prism.languages.ssml = Prism.languages.xml; diff --git a/components/prism-markup.min.js b/components/prism-markup.min.js index 764578b713..7a0545236d 100644 --- a/components/prism-markup.min.js +++ b/components/prism-markup.min.js @@ -1 +1 @@ -Prism.languages.markup={comment://,prolog:/<\?[\s\S]+?\?>/,doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0},cdata://i,tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/i,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/i,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/i,inside:{punctuation:[/^=/,{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:/&#?[\da-z]{1,8};/i},Prism.languages.markup.tag.inside["attr-value"].inside.entity=Prism.languages.markup.entity,Prism.hooks.add("wrap",function(a){"entity"===a.type&&(a.attributes.title=a.content.replace(/&/,"&"))}),Object.defineProperty(Prism.languages.markup.tag,"addInlined",{value:function(a,e){var s={};s["language-"+e]={pattern:/(^$)/i,lookbehind:!0,inside:Prism.languages[e]},s.cdata=/^$/i;var n={"included-cdata":{pattern://i,inside:s}};n["language-"+e]={pattern:/[\s\S]+/,inside:Prism.languages[e]};var t={};t[a]={pattern:RegExp("(<__[^]*?>)(?:))*\\]\\]>|(?!)".replace(/__/g,function(){return a}),"i"),lookbehind:!0,greedy:!0,inside:n},Prism.languages.insertBefore("markup","cdata",t)}}),Prism.languages.xml=Prism.languages.extend("markup",{}),Prism.languages.html=Prism.languages.markup,Prism.languages.mathml=Prism.languages.markup,Prism.languages.svg=Prism.languages.markup; \ No newline at end of file +Prism.languages.markup={comment://,prolog:/<\?[\s\S]+?\?>/,doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0},cdata://i,tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[/^=/,{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:/&#?[\da-z]{1,8};/i},Prism.languages.markup.tag.inside["attr-value"].inside.entity=Prism.languages.markup.entity,Prism.hooks.add("wrap",function(a){"entity"===a.type&&(a.attributes.title=a.content.replace(/&/,"&"))}),Object.defineProperty(Prism.languages.markup.tag,"addInlined",{value:function(a,e){var s={};s["language-"+e]={pattern:/(^$)/i,lookbehind:!0,inside:Prism.languages[e]},s.cdata=/^$/i;var n={"included-cdata":{pattern://i,inside:s}};n["language-"+e]={pattern:/[\s\S]+/,inside:Prism.languages[e]};var t={};t[a]={pattern:RegExp("(<__[^]*?>)(?:))*\\]\\]>|(?!)".replace(/__/g,function(){return a}),"i"),lookbehind:!0,greedy:!0,inside:n},Prism.languages.insertBefore("markup","cdata",t)}}),Prism.languages.html=Prism.languages.markup,Prism.languages.mathml=Prism.languages.markup,Prism.languages.svg=Prism.languages.markup,Prism.languages.xml=Prism.languages.extend("markup",{}),Prism.languages.ssml=Prism.languages.xml; \ No newline at end of file diff --git a/plugins/autoloader/prism-autoloader.js b/plugins/autoloader/prism-autoloader.js index 9967942a45..da660f6bae 100644 --- a/plugins/autoloader/prism-autoloader.js +++ b/plugins/autoloader/prism-autoloader.js @@ -146,6 +146,7 @@ "xml": "markup", "svg": "markup", "mathml": "markup", + "ssml": "markup", "js": "javascript", "g4": "antlr4", "adoc": "asciidoc", diff --git a/plugins/autoloader/prism-autoloader.min.js b/plugins/autoloader/prism-autoloader.min.js index b1a4b0f8ee..193eac3ce4 100644 --- a/plugins/autoloader/prism-autoloader.min.js +++ b/plugins/autoloader/prism-autoloader.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof self&&self.Prism&&self.document&&document.createElement){var c={javascript:"clike",actionscript:"javascript",arduino:"cpp",aspnet:["markup","csharp"],bison:"c",c:"clike",csharp:"clike",cpp:"c",coffeescript:"javascript",crystal:"ruby","css-extras":"css",d:"clike",dart:"clike",django:"markup-templating",ejs:["javascript","markup-templating"],etlua:["lua","markup-templating"],erb:["ruby","markup-templating"],fsharp:"clike","firestore-security-rules":"clike",flow:"javascript",ftl:"markup-templating",glsl:"clike",gml:"clike",go:"clike",groovy:"clike",haml:"ruby",handlebars:"markup-templating",haxe:"clike",java:"clike",javadoc:["markup","java","javadoclike"],jolie:"clike",jsdoc:["javascript","javadoclike"],"js-extras":"javascript","js-templates":"javascript",jsonp:"json",json5:"json",kotlin:"clike",latte:["clike","markup-templating","php"],less:"css",lilypond:"scheme",markdown:"markup","markup-templating":"markup",n4js:"javascript",nginx:"clike",objectivec:"c",opencl:"c",parser:"markup",php:["clike","markup-templating"],phpdoc:["php","javadoclike"],"php-extras":"php",plsql:"sql",processing:"clike",protobuf:"clike",pug:["markup","javascript"],qml:"javascript",qore:"clike",jsx:["markup","javascript"],tsx:["jsx","typescript"],reason:"clike",ruby:"clike",sass:"css",scss:"css",scala:"java","shell-session":"bash",smarty:"markup-templating",solidity:"clike",soy:"markup-templating",sparql:"turtle",sqf:"clike",swift:"clike",tap:"yaml",textile:"markup",tt2:["clike","markup-templating"],twig:"markup",typescript:"javascript","t4-cs":["t4-templating","csharp"],"t4-vb":["t4-templating","visual-basic"],vala:"clike",vbnet:"basic",velocity:"markup",wiki:"markup",xeora:"markup",xquery:"markup"},l={html:"markup",xml:"markup",svg:"markup",mathml:"markup",js:"javascript",g4:"antlr4",adoc:"asciidoc",shell:"bash",shortcode:"bbcode",rbnf:"bnf",conc:"concurnas",cs:"csharp",dotnet:"csharp",coffee:"coffeescript",jinja2:"django","dns-zone":"dns-zone-file",dockerfile:"docker",eta:"ejs",xlsx:"excel-formula",xls:"excel-formula",gamemakerlanguage:"gml",hs:"haskell",tex:"latex",context:"latex",ly:"lilypond",emacs:"lisp",elisp:"lisp","emacs-lisp":"lisp",md:"markdown",moon:"moonscript",n4jsd:"n4js",objc:"objectivec",objectpascal:"pascal",px:"pcaxis",pcode:"peoplecode",pq:"powerquery",mscript:"powerquery",py:"python",robot:"robotframework",rb:"ruby",sln:"solution-file",rq:"sparql",trig:"turtle",ts:"typescript",t4:"t4-cs",uscript:"unrealscript",uc:"unrealscript",vb:"visual-basic",xeoracube:"xeora",yml:"yaml"},n={},e="components/",a=Prism.util.currentScript();if(a){var t=/\bplugins\/autoloader\/prism-autoloader\.(?:min\.)js(?:\?[^\r\n/]*)?$/i,r=/(^|\/)[\w-]+\.(?:min\.)js(?:\?[^\r\n/]*)?$/i,s=a.getAttribute("data-autoloader-path");if(null!=s)e=s.trim().replace(/\/?$/,"/");else{var i=a.src;t.test(i)?e=i.replace(t,"components/"):r.test(i)&&(e=i.replace(r,"$1components/"))}}var p=Prism.plugins.autoloader={languages_path:e,use_minified:!0,loadLanguages:o};Prism.hooks.add("complete",function(e){e.element&&e.language&&!e.grammar&&"none"!==e.language&&function(e,a){e in l&&(e=l[e]);var t=(a.getAttribute("data-dependencies")||"").trim();if(!t){var r=a.parentElement;r&&"pre"===r.tagName.toLowerCase()&&(t=(r.getAttribute("data-dependencies")||"").trim())}o(t?t.split(/\s*,\s*/g):[],function(){u(e,function(){Prism.highlightElement(a)})})}(e.language,e.element)})}function o(e,a,t){"string"==typeof e&&(e=[e]);var r=e.length,s=0,i=!1;function c(){i||++s===r&&a&&a(e)}0!==r?e.forEach(function(e){u(e,c,function(){i||(i=!0,t&&t(e))})}):a&&setTimeout(a,0)}function u(a,t,r){var s=0<=a.indexOf("!");a=a.replace("!",""),a=l[a]||a;var e=function(){var e=n[a];if(e||(e=n[a]={callbacks:[]}),e.callbacks.push({success:t,error:r}),!s&&Prism.languages[a])m(a,"success");else if(!s&&e.error)m(a,"error");else if(s||!e.loading){e.loading=!0,function(e,a,t){var r=document.createElement("script");r.src=e,r.async=!0,r.onload=function(){document.body.removeChild(r),a&&a()},r.onerror=function(){document.body.removeChild(r),t&&t()},document.body.appendChild(r)}(function(e){return p.languages_path+"prism-"+e+(p.use_minified?".min":"")+".js"}(a),function(){e.loading=!1,m(a,"success")},function(){e.loading=!1,e.error=!0,m(a,"error")})}},i=c[a];i&&i.length?o(i,e,r):e()}function m(e,a){if(n[e]){for(var t=n[e].callbacks,r=0,s=t.length;r/i, 'tag': { - pattern: /<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/i, + pattern: /<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/, greedy: true, inside: { 'tag': { - pattern: /^<\/?[^\s>\/]+/i, + pattern: /^<\/?[^\s>\/]+/, inside: { 'punctuation': /^<\/?/, 'namespace': /^[^\s>\/:]+:/ } }, 'attr-value': { - pattern: /=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/i, + pattern: /=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/, inside: { 'punctuation': [ /^=/, @@ -833,11 +833,13 @@ Object.defineProperty(Prism.languages.markup.tag, 'addInlined', { } }); -Prism.languages.xml = Prism.languages.extend('markup', {}); Prism.languages.html = Prism.languages.markup; Prism.languages.mathml = Prism.languages.markup; Prism.languages.svg = Prism.languages.markup; +Prism.languages.xml = Prism.languages.extend('markup', {}); +Prism.languages.ssml = Prism.languages.xml; + /* ********************************************** Begin prism-css.js From e27e65afc9d49212470b96e0ce8cea854b8f7f23 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Mon, 27 Apr 2020 22:54:18 +0200 Subject: [PATCH 0502/1100] Scheme: Improved boolean (#2316) I noticed that scheme booleans also partially highlighted `#true`, so I fixed that. --- components/prism-scheme.js | 2 +- components/prism-scheme.min.js | 2 +- tests/languages/scheme/boolean_feature.test | 10 ++++++++-- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/components/prism-scheme.js b/components/prism-scheme.js index 878383f62d..d67c14c2b6 100644 --- a/components/prism-scheme.js +++ b/components/prism-scheme.js @@ -44,7 +44,7 @@ Prism.languages.scheme = { pattern: /([\s()])(?:(?:#d(?:#[ei])?|#[ei](?:#d)?)?[+-]?(?:(?:\d*\.?\d+(?:[eE][+-]?\d+)?|\d+\/\d+)(?:[+-](?:\d*\.?\d+(?:[eE][+-]?\d+)?|\d+\/\d+)i)?|(?:\d*\.?\d+(?:[eE][+-]?\d+)?|\d+\/\d+)i)|(?:#[box](?:#[ei])?|#[ei](?:#[box])?)[+-]?(?:[\da-fA-F]+(?:\/[\da-fA-F]+)?(?:[+-][\da-fA-F]+(?:\/[\da-fA-F]+)?i)?|[\da-fA-F]+(?:\/[\da-fA-F]+)?i))(?=[\s()]|$)/, lookbehind: true }, - 'boolean': /#[tf]/, + 'boolean': /#[ft](?=[()\s]|$)/, 'operator': { pattern: /(\()(?:[-+*%\/]|[<>]=?|=>?)(?=\s|$)/, lookbehind: true diff --git a/components/prism-scheme.min.js b/components/prism-scheme.min.js index b1a8826dd5..1fb53dd2f1 100644 --- a/components/prism-scheme.min.js +++ b/components/prism-scheme.min.js @@ -1 +1 @@ -Prism.languages.scheme={comment:/;.*/,string:{pattern:/"(?:[^"\\]|\\.)*"/,greedy:!0},symbol:{pattern:/'[^()#'\s]+/,greedy:!0},character:{pattern:/#\\(?:[ux][a-fA-F\d]+|[-a-zA-Z]+|\S)/,greedy:!0,alias:"string"},"lambda-parameter":{pattern:/(\(lambda\s+\()[^()'\s]+/,lookbehind:!0},keyword:{pattern:/(\()(?:define(?:-library|-macro|-syntax|-values)?|defmacro|(?:case-)?lambda|let(?:(?:\*|rec)?(?:-values)?|-syntax|rec-syntax)|else|if|cond|begin|delay(?:-force)?|parameterize|guard|set!|(?:quasi-)?quote|syntax-(?:case|rules))(?=[()\s])/,lookbehind:!0},builtin:{pattern:/(\()(?:(?:cons|car|cdr|list|call-with-current-continuation|call\/cc|append|abs|apply|eval)\b|null\?|pair\?|boolean\?|eof-object\?|char\?|procedure\?|number\?|port\?|string\?|vector\?|symbol\?|bytevector\?)(?=[()\s])/,lookbehind:!0},number:{pattern:/([\s()])(?:(?:#d(?:#[ei])?|#[ei](?:#d)?)?[+-]?(?:(?:\d*\.?\d+(?:[eE][+-]?\d+)?|\d+\/\d+)(?:[+-](?:\d*\.?\d+(?:[eE][+-]?\d+)?|\d+\/\d+)i)?|(?:\d*\.?\d+(?:[eE][+-]?\d+)?|\d+\/\d+)i)|(?:#[box](?:#[ei])?|#[ei](?:#[box])?)[+-]?(?:[\da-fA-F]+(?:\/[\da-fA-F]+)?(?:[+-][\da-fA-F]+(?:\/[\da-fA-F]+)?i)?|[\da-fA-F]+(?:\/[\da-fA-F]+)?i))(?=[\s()]|$)/,lookbehind:!0},boolean:/#[tf]/,operator:{pattern:/(\()(?:[-+*%\/]|[<>]=?|=>?)(?=\s|$)/,lookbehind:!0},function:{pattern:/(\()[^()'\s]+(?=[()\s]|$)/,lookbehind:!0},punctuation:/[()']/}; \ No newline at end of file +Prism.languages.scheme={comment:/;.*/,string:{pattern:/"(?:[^"\\]|\\.)*"/,greedy:!0},symbol:{pattern:/'[^()#'\s]+/,greedy:!0},character:{pattern:/#\\(?:[ux][a-fA-F\d]+|[-a-zA-Z]+|\S)/,greedy:!0,alias:"string"},"lambda-parameter":{pattern:/(\(lambda\s+\()[^()'\s]+/,lookbehind:!0},keyword:{pattern:/(\()(?:define(?:-library|-macro|-syntax|-values)?|defmacro|(?:case-)?lambda|let(?:(?:\*|rec)?(?:-values)?|-syntax|rec-syntax)|else|if|cond|begin|delay(?:-force)?|parameterize|guard|set!|(?:quasi-)?quote|syntax-(?:case|rules))(?=[()\s])/,lookbehind:!0},builtin:{pattern:/(\()(?:(?:cons|car|cdr|list|call-with-current-continuation|call\/cc|append|abs|apply|eval)\b|null\?|pair\?|boolean\?|eof-object\?|char\?|procedure\?|number\?|port\?|string\?|vector\?|symbol\?|bytevector\?)(?=[()\s])/,lookbehind:!0},number:{pattern:/([\s()])(?:(?:#d(?:#[ei])?|#[ei](?:#d)?)?[+-]?(?:(?:\d*\.?\d+(?:[eE][+-]?\d+)?|\d+\/\d+)(?:[+-](?:\d*\.?\d+(?:[eE][+-]?\d+)?|\d+\/\d+)i)?|(?:\d*\.?\d+(?:[eE][+-]?\d+)?|\d+\/\d+)i)|(?:#[box](?:#[ei])?|#[ei](?:#[box])?)[+-]?(?:[\da-fA-F]+(?:\/[\da-fA-F]+)?(?:[+-][\da-fA-F]+(?:\/[\da-fA-F]+)?i)?|[\da-fA-F]+(?:\/[\da-fA-F]+)?i))(?=[\s()]|$)/,lookbehind:!0},boolean:/#[ft](?=[()\s]|$)/,operator:{pattern:/(\()(?:[-+*%\/]|[<>]=?|=>?)(?=\s|$)/,lookbehind:!0},function:{pattern:/(\()[^()'\s]+(?=[()\s]|$)/,lookbehind:!0},punctuation:/[()']/}; \ No newline at end of file diff --git a/tests/languages/scheme/boolean_feature.test b/tests/languages/scheme/boolean_feature.test index 6c10017e3f..af218655a4 100644 --- a/tests/languages/scheme/boolean_feature.test +++ b/tests/languages/scheme/boolean_feature.test @@ -1,13 +1,19 @@ #t #f +; not a boolean +#true + ---------------------------------------------------- [ ["boolean", "#t"], - ["boolean", "#f"] + ["boolean", "#f"], + + ["comment", "; not a boolean"], + "\r\n#true" ] ---------------------------------------------------- -Checks for booleans. \ No newline at end of file +Checks for booleans. From 053016ef53288bd31630e0006c02ef470cef5e85 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Mon, 27 Apr 2020 23:18:30 +0200 Subject: [PATCH 0503/1100] Added support for Racket (#2315) --- components.js | 2 +- components.json | 6 + components/prism-racket.js | 58 ++++++++++ components/prism-racket.min.js | 1 + examples/prism-racket.html | 16 +++ plugins/autoloader/prism-autoloader.js | 2 + plugins/autoloader/prism-autoloader.min.js | 2 +- plugins/show-language/prism-show-language.js | 1 + .../show-language/prism-show-language.min.js | 2 +- tests/languages/racket/boolean_feature.test | 13 +++ tests/languages/racket/builtin_feature.test | 99 +++++++++++++++++ tests/languages/racket/character_feature.test | 51 +++++++++ tests/languages/racket/comment_feature.test | 13 +++ tests/languages/racket/function_feature.test | 47 ++++++++ tests/languages/racket/keyword_feature.test | 13 +++ .../racket/lambda_parameter_feature.test | 35 ++++++ tests/languages/racket/lang_feature.test | 17 +++ tests/languages/racket/number_feature.test | 105 ++++++++++++++++++ tests/languages/racket/operator_feature.test | 55 +++++++++ tests/languages/racket/string_feature.test | 18 +++ tests/languages/racket/symbol_feature.test | 13 +++ 21 files changed, 566 insertions(+), 3 deletions(-) create mode 100644 components/prism-racket.js create mode 100644 components/prism-racket.min.js create mode 100644 examples/prism-racket.html create mode 100644 tests/languages/racket/boolean_feature.test create mode 100644 tests/languages/racket/builtin_feature.test create mode 100644 tests/languages/racket/character_feature.test create mode 100644 tests/languages/racket/comment_feature.test create mode 100644 tests/languages/racket/function_feature.test create mode 100644 tests/languages/racket/keyword_feature.test create mode 100644 tests/languages/racket/lambda_parameter_feature.test create mode 100644 tests/languages/racket/lang_feature.test create mode 100644 tests/languages/racket/number_feature.test create mode 100644 tests/languages/racket/operator_feature.test create mode 100644 tests/languages/racket/string_feature.test create mode 100644 tests/languages/racket/symbol_feature.test diff --git a/components.js b/components.js index 776aaaa7e7..258848430f 100644 --- a/components.js +++ b/components.js @@ -1,2 +1,2 @@ -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml","ssml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","ssml":"SSML"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"Augmented Backus–Naur form","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"Backus–Naur form","alias":"rbnf","aliasTitles":{"rbnf":"Routing Backus–Naur form"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dax":{"title":"DAX","owner":"peterbud"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"Extended Backus–Naur form","owner":"RunDevelopment"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"http":{"title":"HTTP","optional":["css","javascript","json","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"json":{"title":"JSON","owner":"CupOfTea696"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","modify":["actionscript","coffeescript","flow","javascript","typescript","vala"],"owner":"RunDevelopment"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"solidity":{"title":"Solidity (Ethereum)","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","visual-basic"],"owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml","ssml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","ssml":"SSML"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"Augmented Backus–Naur form","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"Backus–Naur form","alias":"rbnf","aliasTitles":{"rbnf":"Routing Backus–Naur form"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dax":{"title":"DAX","owner":"peterbud"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"Extended Backus–Naur form","owner":"RunDevelopment"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"http":{"title":"HTTP","optional":["css","javascript","json","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"json":{"title":"JSON","owner":"CupOfTea696"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"racket":{"title":"Racket","require":"scheme","alias":"rkt","owner":"RunDevelopment"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","modify":["actionscript","coffeescript","flow","javascript","typescript","vala"],"owner":"RunDevelopment"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"solidity":{"title":"Solidity (Ethereum)","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","visual-basic"],"owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; if (typeof module !== 'undefined' && module.exports) { module.exports = components; } \ No newline at end of file diff --git a/components.json b/components.json index dc87275049..3c111019f6 100644 --- a/components.json +++ b/components.json @@ -866,6 +866,12 @@ "title": "R", "owner": "Golmote" }, + "racket": { + "title": "Racket", + "require": "scheme", + "alias": "rkt", + "owner": "RunDevelopment" + }, "jsx": { "title": "React JSX", "require": ["markup", "javascript"], diff --git a/components/prism-racket.js b/components/prism-racket.js new file mode 100644 index 0000000000..3face9d42e --- /dev/null +++ b/components/prism-racket.js @@ -0,0 +1,58 @@ +Prism.languages.racket = Prism.languages.extend('scheme', {}); + +// Add brackets to racket +// The basic idea here is to go through all pattens of Scheme and replace all occurrences of "(" with the union of "(" +// and "["; Similar for ")". This is a bit tricky because "(" can be escaped or inside a character set. Both cases +// have to be handled differently and, of course, we don't want to destroy groups, so we can only replace literal "(" +// and ")". +// To do this, we use a regular expression which will parse any JS regular expression. It works because regexes are +// matches from left to right and already matched text cannot be matched again. We use this to first capture all +// escaped characters (not really, we don't get escape sequences but we don't need them). Because we already captured +// all escaped characters, we know that any "[" character is the start of a character set, so we match that character +// set whole. +// With the regex parsed, we only have to replace all escaped "(" (they cannot be unescaped outside of character sets) +// with /[([]/ and replace all "(" inside character sets. +// Note: This method does not work for "(" that are escaped like this /\x28/ or this /\u0028/. +Prism.languages.DFS(Prism.languages.racket, function (key, value) { + if (Prism.util.type(value) === 'RegExp') { + var source = value.source.replace(/\\(.)|\[\^?((?:\\.|[^\\\]])*)\]/g, function (m, g1, g2) { + if (g1) { + if (g1 === '(') { + // replace all '(' characters outside character sets + return '[([]'; + } + if (g1 === ')') { + // replace all ')' characters outside character sets + return '[)\\]]'; + } + } + if (g2) { + var prefix = m[1] === '^' ? '[^' : '['; + return prefix + g2.replace(/\\(.)|[()]/g, function (m, g1) { + if (m === '(' || g1 === '(') { + // replace all '(' characters inside character sets + return '(['; + } + if (m === ')' || g1 === ')') { + // replace all ')' characters inside character sets + return ')\\]'; + } + return m; + }) + ']'; + } + return m; + }); + + this[key] = RegExp(source, value.flags); + } +}); + +Prism.languages.insertBefore('racket', 'string', { + 'lang': { + pattern: /^#lang.+/m, + greedy: true, + alias: 'keyword' + } +}); + +Prism.languages.rkt = Prism.languages.racket; diff --git a/components/prism-racket.min.js b/components/prism-racket.min.js new file mode 100644 index 0000000000..50b08c19dd --- /dev/null +++ b/components/prism-racket.min.js @@ -0,0 +1 @@ +Prism.languages.racket=Prism.languages.extend("scheme",{}),Prism.languages.DFS(Prism.languages.racket,function(e,r){if("RegExp"===Prism.util.type(r)){var a=r.source.replace(/\\(.)|\[\^?((?:\\.|[^\\\]])*)\]/g,function(e,r,a){if(r){if("("===r)return"[([]";if(")"===r)return"[)\\]]"}return a?("^"===e[1]?"[^":"[")+a.replace(/\\(.)|[()]/g,function(e,r){return"("===e||"("===r?"([":")"===e||")"===r?")\\]":e})+"]":e});this[e]=RegExp(a,r.flags)}}),Prism.languages.insertBefore("racket","string",{lang:{pattern:/^#lang.+/m,greedy:!0,alias:"keyword"}}),Prism.languages.rkt=Prism.languages.racket; \ No newline at end of file diff --git a/examples/prism-racket.html b/examples/prism-racket.html new file mode 100644 index 0000000000..d09509f43f --- /dev/null +++ b/examples/prism-racket.html @@ -0,0 +1,16 @@ +

          Full example

          +
          ; Source: https://github.com/mbutterick/pollen/blob/master/pollen/private/to-string.rkt
          +
          +#lang racket/base
          +(provide (all-defined-out))
          +
          +(define (to-string x)
          +  (cond
          +    [(string? x) x]
          +    [(or (null? x) (void? x)) ""]
          +    [(or (symbol? x) (number? x) (path? x) (char? x)) (format "~a" x)]
          +    ;; special handling for procedures, because if a procedure reaches this func,
          +    ;; it usually indicates a failed attempt to use a tag function.
          +    ;; meaning, it's more useful to raise an error.
          +    [(procedure? x) (error 'pollen "Can't convert procedure ~a to string" x)]
          +    [else (format "~v" x)]))
          diff --git a/plugins/autoloader/prism-autoloader.js b/plugins/autoloader/prism-autoloader.js index da660f6bae..01646c0b45 100644 --- a/plugins/autoloader/prism-autoloader.js +++ b/plugins/autoloader/prism-autoloader.js @@ -97,6 +97,7 @@ ], "qml": "javascript", "qore": "clike", + "racket": "scheme", "jsx": [ "markup", "javascript" @@ -181,6 +182,7 @@ "pq": "powerquery", "mscript": "powerquery", "py": "python", + "rkt": "racket", "robot": "robotframework", "rb": "ruby", "sln": "solution-file", diff --git a/plugins/autoloader/prism-autoloader.min.js b/plugins/autoloader/prism-autoloader.min.js index 193eac3ce4..69c97e7705 100644 --- a/plugins/autoloader/prism-autoloader.min.js +++ b/plugins/autoloader/prism-autoloader.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof self&&self.Prism&&self.document&&document.createElement){var c={javascript:"clike",actionscript:"javascript",arduino:"cpp",aspnet:["markup","csharp"],bison:"c",c:"clike",csharp:"clike",cpp:"c",coffeescript:"javascript",crystal:"ruby","css-extras":"css",d:"clike",dart:"clike",django:"markup-templating",ejs:["javascript","markup-templating"],etlua:["lua","markup-templating"],erb:["ruby","markup-templating"],fsharp:"clike","firestore-security-rules":"clike",flow:"javascript",ftl:"markup-templating",glsl:"clike",gml:"clike",go:"clike",groovy:"clike",haml:"ruby",handlebars:"markup-templating",haxe:"clike",java:"clike",javadoc:["markup","java","javadoclike"],jolie:"clike",jsdoc:["javascript","javadoclike"],"js-extras":"javascript","js-templates":"javascript",jsonp:"json",json5:"json",kotlin:"clike",latte:["clike","markup-templating","php"],less:"css",lilypond:"scheme",markdown:"markup","markup-templating":"markup",n4js:"javascript",nginx:"clike",objectivec:"c",opencl:"c",parser:"markup",php:["clike","markup-templating"],phpdoc:["php","javadoclike"],"php-extras":"php",plsql:"sql",processing:"clike",protobuf:"clike",pug:["markup","javascript"],qml:"javascript",qore:"clike",jsx:["markup","javascript"],tsx:["jsx","typescript"],reason:"clike",ruby:"clike",sass:"css",scss:"css",scala:"java","shell-session":"bash",smarty:"markup-templating",solidity:"clike",soy:"markup-templating",sparql:"turtle",sqf:"clike",swift:"clike",tap:"yaml",textile:"markup",tt2:["clike","markup-templating"],twig:"markup",typescript:"javascript","t4-cs":["t4-templating","csharp"],"t4-vb":["t4-templating","visual-basic"],vala:"clike",vbnet:"basic",velocity:"markup",wiki:"markup",xeora:"markup",xquery:"markup"},l={html:"markup",xml:"markup",svg:"markup",mathml:"markup",ssml:"markup",js:"javascript",g4:"antlr4",adoc:"asciidoc",shell:"bash",shortcode:"bbcode",rbnf:"bnf",conc:"concurnas",cs:"csharp",dotnet:"csharp",coffee:"coffeescript",jinja2:"django","dns-zone":"dns-zone-file",dockerfile:"docker",eta:"ejs",xlsx:"excel-formula",xls:"excel-formula",gamemakerlanguage:"gml",hs:"haskell",tex:"latex",context:"latex",ly:"lilypond",emacs:"lisp",elisp:"lisp","emacs-lisp":"lisp",md:"markdown",moon:"moonscript",n4jsd:"n4js",objc:"objectivec",objectpascal:"pascal",px:"pcaxis",pcode:"peoplecode",pq:"powerquery",mscript:"powerquery",py:"python",robot:"robotframework",rb:"ruby",sln:"solution-file",rq:"sparql",trig:"turtle",ts:"typescript",t4:"t4-cs",uscript:"unrealscript",uc:"unrealscript",vb:"visual-basic",xeoracube:"xeora",yml:"yaml"},n={},e="components/",a=Prism.util.currentScript();if(a){var t=/\bplugins\/autoloader\/prism-autoloader\.(?:min\.)js(?:\?[^\r\n/]*)?$/i,r=/(^|\/)[\w-]+\.(?:min\.)js(?:\?[^\r\n/]*)?$/i,s=a.getAttribute("data-autoloader-path");if(null!=s)e=s.trim().replace(/\/?$/,"/");else{var i=a.src;t.test(i)?e=i.replace(t,"components/"):r.test(i)&&(e=i.replace(r,"$1components/"))}}var p=Prism.plugins.autoloader={languages_path:e,use_minified:!0,loadLanguages:o};Prism.hooks.add("complete",function(e){e.element&&e.language&&!e.grammar&&"none"!==e.language&&function(e,a){e in l&&(e=l[e]);var t=(a.getAttribute("data-dependencies")||"").trim();if(!t){var r=a.parentElement;r&&"pre"===r.tagName.toLowerCase()&&(t=(r.getAttribute("data-dependencies")||"").trim())}o(t?t.split(/\s*,\s*/g):[],function(){u(e,function(){Prism.highlightElement(a)})})}(e.language,e.element)})}function o(e,a,t){"string"==typeof e&&(e=[e]);var r=e.length,s=0,i=!1;function c(){i||++s===r&&a&&a(e)}0!==r?e.forEach(function(e){u(e,c,function(){i||(i=!0,t&&t(e))})}):a&&setTimeout(a,0)}function u(a,t,r){var s=0<=a.indexOf("!");a=a.replace("!",""),a=l[a]||a;var e=function(){var e=n[a];if(e||(e=n[a]={callbacks:[]}),e.callbacks.push({success:t,error:r}),!s&&Prism.languages[a])m(a,"success");else if(!s&&e.error)m(a,"error");else if(s||!e.loading){e.loading=!0,function(e,a,t){var r=document.createElement("script");r.src=e,r.async=!0,r.onload=function(){document.body.removeChild(r),a&&a()},r.onerror=function(){document.body.removeChild(r),t&&t()},document.body.appendChild(r)}(function(e){return p.languages_path+"prism-"+e+(p.use_minified?".min":"")+".js"}(a),function(){e.loading=!1,m(a,"success")},function(){e.loading=!1,e.error=!0,m(a,"error")})}},i=c[a];i&&i.length?o(i,e,r):e()}function m(e,a){if(n[e]){for(var t=n[e].callbacks,r=0,s=t.length;rexact 3) +(!fact) +(** 10) +(exact? +(** +(defined foo) + +[fl= 1 2] +[flmin 2 3] +[exact? 2] +[inexact->exact 3] +[!fact] +[** 10] +[exact? +[** +[defined foo] + +---------------------------------------------------- + +[ + ["punctuation", "("], ["function", "fl="], ["number", "1"], ["number", "2"], ["punctuation", ")"], + ["punctuation", "("], ["function", "flmin"], ["number", "2"], ["number", "3"], ["punctuation", ")"], + ["punctuation", "("], ["function", "exact?"], ["number", "2"], ["punctuation", ")"], + ["punctuation", "("], ["function", "inexact->exact"], ["number", "3"], ["punctuation", ")"], + ["punctuation", "("], ["function", "!fact"], ["punctuation", ")"], + ["punctuation", "("], ["function", "**"], ["number", "10"], ["punctuation", ")"], + ["punctuation", "("], ["function", "exact?"], + ["punctuation", "("], ["function", "**"], + ["punctuation", "("], ["function", "defined"], " foo", ["punctuation", ")"], + + ["punctuation", "["], ["function", "fl="], ["number", "1"], ["number", "2"], ["punctuation", "]"], + ["punctuation", "["], ["function", "flmin"], ["number", "2"], ["number", "3"], ["punctuation", "]"], + ["punctuation", "["], ["function", "exact?"], ["number", "2"], ["punctuation", "]"], + ["punctuation", "["], ["function", "inexact->exact"], ["number", "3"], ["punctuation", "]"], + ["punctuation", "["], ["function", "!fact"], ["punctuation", "]"], + ["punctuation", "["], ["function", "**"], ["number", "10"], ["punctuation", "]"], + ["punctuation", "["], ["function", "exact?"], + ["punctuation", "["], ["function", "**"], + ["punctuation", "["], ["function", "defined"], " foo", ["punctuation", "]"] +] + +---------------------------------------------------- + +Checks for functions. diff --git a/tests/languages/racket/keyword_feature.test b/tests/languages/racket/keyword_feature.test new file mode 100644 index 0000000000..6023c9674c --- /dev/null +++ b/tests/languages/racket/keyword_feature.test @@ -0,0 +1,13 @@ +(define) +[define] + +---------------------------------------------------- + +[ + ["punctuation", "("], ["keyword", "define"], ["punctuation", ")"], + ["punctuation", "["], ["keyword", "define"], ["punctuation", "]"] +] + +---------------------------------------------------- + +Checks for keywords. diff --git a/tests/languages/racket/lambda_parameter_feature.test b/tests/languages/racket/lambda_parameter_feature.test new file mode 100644 index 0000000000..f374c29f75 --- /dev/null +++ b/tests/languages/racket/lambda_parameter_feature.test @@ -0,0 +1,35 @@ +(lambda (foo bar) (concat foo bar)) + +(lambda [foo bar] [concat foo bar]) + +---------------------------------------------------- + +[ + ["punctuation", "("], + ["keyword", "lambda"], + ["punctuation", "("], + ["lambda-parameter", "foo"], + " bar", + ["punctuation", ")"], + ["punctuation", "("], + ["function", "concat"], + " foo bar", + ["punctuation", ")"], + ["punctuation", ")"], + + ["punctuation", "("], + ["keyword", "lambda"], + ["punctuation", "["], + ["lambda-parameter", "foo"], + " bar", + ["punctuation", "]"], + ["punctuation", "["], + ["function", "concat"], + " foo bar", + ["punctuation", "]"], + ["punctuation", ")"] +] + +---------------------------------------------------- + +Checks for lambda parameters. diff --git a/tests/languages/racket/lang_feature.test b/tests/languages/racket/lang_feature.test new file mode 100644 index 0000000000..3e6579e1f2 --- /dev/null +++ b/tests/languages/racket/lang_feature.test @@ -0,0 +1,17 @@ +#lang racket +#lang racket/base +#lang s-exp "html.rkt" +#lang s-exp pollen/private/dialect + +---------------------------------------------------- + +[ + ["lang", "#lang racket"], + ["lang", "#lang racket/base"], + ["lang", "#lang s-exp \"html.rkt\""], + ["lang", "#lang s-exp pollen/private/dialect"] +] + +---------------------------------------------------- + +Checks for #lang. diff --git a/tests/languages/racket/number_feature.test b/tests/languages/racket/number_feature.test new file mode 100644 index 0000000000..9a517e1a02 --- /dev/null +++ b/tests/languages/racket/number_feature.test @@ -0,0 +1,105 @@ +(foo 42 +42 -42) +(foo 1e3 +1e3 -1e3) +(foo 1e+3 1e-3 3.14159 3.14159e-1) +(foo 8/3) +(foo 3+4i 2.5+0.0i 2.5+0.0i -2.5e4+0.0e4i 3+0i -2e-5i) +(list 10i +10i -10i 10.10i 10+10i 10.10+10.10i 10-10i 10e+10i 10+10e+10i) + +(list #d123 #e#d123e-4 #d#i12 #i-1.234i) + +(list #xBAD #b1110011 #o777) +(list #i#x10 #i#x10+10i #b10+10i) + +; not a number but a symbol +(define 1+2 10) + + +[foo 42] + +---------------------------------------------------- + +[ + ["punctuation", "("], + ["function", "foo"], + ["number", "42"], + ["number", "+42"], + ["number", "-42"], + ["punctuation", ")"], + + ["punctuation", "("], + ["function", "foo"], + ["number", "1e3"], + ["number", "+1e3"], + ["number", "-1e3"], + ["punctuation", ")"], + + ["punctuation", "("], + ["function", "foo"], + ["number", "1e+3"], + ["number", "1e-3"], + ["number", "3.14159"], + ["number", "3.14159e-1"], + ["punctuation", ")"], + + ["punctuation", "("], + ["function", "foo"], + ["number", "8/3"], + ["punctuation", ")"], + + ["punctuation", "("], + ["function", "foo"], + ["number", "3+4i"], + ["number", "2.5+0.0i"], + ["number", "2.5+0.0i"], + ["number", "-2.5e4+0.0e4i"], + ["number", "3+0i"], + ["number", "-2e-5i"], + ["punctuation", ")"], + + ["punctuation", "("], + ["builtin", "list"], + ["number", "10i"], + ["number", "+10i"], + ["number", "-10i"], + ["number", "10.10i"], + ["number", "10+10i"], + ["number", "10.10+10.10i"], + ["number", "10-10i"], + ["number", "10e+10i"], + ["number", "10+10e+10i"], + ["punctuation", ")"], + + ["punctuation", "("], + ["builtin", "list"], + ["number", "#d123"], + ["number", "#e#d123e-4"], + ["number", "#d#i12"], + ["number", "#i-1.234i"], + ["punctuation", ")"], + + ["punctuation", "("], + ["builtin", "list"], + ["number", "#xBAD"], + ["number", "#b1110011"], + ["number", "#o777"], + ["punctuation", ")"], + + ["punctuation", "("], + ["builtin", "list"], + ["number", "#i#x10"], + ["number", "#i#x10+10i"], + ["number", "#b10+10i"], + ["punctuation", ")"], + + ["comment", "; not a number but a symbol"], + ["punctuation", "("], ["keyword", "define"], " 1+2 ", ["number", "10"], ["punctuation", ")"], + + ["punctuation", "["], + ["function", "foo"], + ["number", "42"], + ["punctuation", "]"] +] + +---------------------------------------------------- + +Checks for numbers, rational numbers, and complex numbers. diff --git a/tests/languages/racket/operator_feature.test b/tests/languages/racket/operator_feature.test new file mode 100644 index 0000000000..ff98979575 --- /dev/null +++ b/tests/languages/racket/operator_feature.test @@ -0,0 +1,55 @@ +(+ +(- +(* +(/ +(% +(< +(<= +(> +(>= +(= +(=> + +[+ +[- +[* +[/ +[% +[< +[<= +[> +[>= +[= +[=> + +---------------------------------------------------- + +[ + ["punctuation", "("], ["operator", "+"], + ["punctuation", "("], ["operator", "-"], + ["punctuation", "("], ["operator", "*"], + ["punctuation", "("], ["operator", "/"], + ["punctuation", "("], ["operator", "%"], + ["punctuation", "("], ["operator", "<"], + ["punctuation", "("], ["operator", "<="], + ["punctuation", "("], ["operator", ">"], + ["punctuation", "("], ["operator", ">="], + ["punctuation", "("], ["operator", "="], + ["punctuation", "("], ["operator", "=>"], + + ["punctuation", "["], ["operator", "+"], + ["punctuation", "["], ["operator", "-"], + ["punctuation", "["], ["operator", "*"], + ["punctuation", "["], ["operator", "/"], + ["punctuation", "["], ["operator", "%"], + ["punctuation", "["], ["operator", "<"], + ["punctuation", "["], ["operator", "<="], + ["punctuation", "["], ["operator", ">"], + ["punctuation", "["], ["operator", ">="], + ["punctuation", "["], ["operator", "="], + ["punctuation", "["], ["operator", "=>"] +] + +---------------------------------------------------- + +Checks for operators. diff --git a/tests/languages/racket/string_feature.test b/tests/languages/racket/string_feature.test new file mode 100644 index 0000000000..0361b517c4 --- /dev/null +++ b/tests/languages/racket/string_feature.test @@ -0,0 +1,18 @@ +"" +"fo\"obar" +" +multi +line +" + +---------------------------------------------------- + +[ + ["string", "\"\""], + ["string", "\"fo\\\"obar\""], + ["string", "\"\r\nmulti\r\nline\r\n\""] +] + +---------------------------------------------------- + +Checks for strings. diff --git a/tests/languages/racket/symbol_feature.test b/tests/languages/racket/symbol_feature.test new file mode 100644 index 0000000000..3cdf4cb5c1 --- /dev/null +++ b/tests/languages/racket/symbol_feature.test @@ -0,0 +1,13 @@ +'turkey +(define a 'foo) + +---------------------------------------------------- + +[ + ["symbol", "'turkey"], + ["punctuation", "("], ["keyword", "define"], " a ", ["symbol","'foo"], ["punctuation",")"] +] + +---------------------------------------------------- + +Checks for symbols. From 4b61661d67c0bd34be288000e7f8ab6966959817 Mon Sep 17 00:00:00 2001 From: Lynette <604020768@qq.com> Date: Wed, 29 Apr 2020 18:04:08 +0800 Subject: [PATCH 0504/1100] Line numbers: Fixed TypeError when lineNumberWrapper is null (#2337) If a code block doesn't contain code, line numbers will not be added but the resize event still expected them to be there resulting in a TypeError. --- plugins/line-numbers/prism-line-numbers.js | 3 +++ plugins/line-numbers/prism-line-numbers.min.js | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins/line-numbers/prism-line-numbers.js b/plugins/line-numbers/prism-line-numbers.js index b2e3147584..61a4c9968e 100644 --- a/plugins/line-numbers/prism-line-numbers.js +++ b/plugins/line-numbers/prism-line-numbers.js @@ -27,6 +27,9 @@ if (whiteSpace === 'pre-wrap' || whiteSpace === 'pre-line') { var codeElement = element.querySelector('code'); var lineNumbersWrapper = element.querySelector('.line-numbers-rows'); + if (!codeElement || !lineNumbersWrapper) { + return; + } var lineNumberSizer = element.querySelector('.line-numbers-sizer'); var codeLines = codeElement.textContent.split(NEW_LINE_EXP); diff --git a/plugins/line-numbers/prism-line-numbers.min.js b/plugins/line-numbers/prism-line-numbers.min.js index 59fc41d37e..7e272c376f 100644 --- a/plugins/line-numbers/prism-line-numbers.min.js +++ b/plugins/line-numbers/prism-line-numbers.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof self&&self.Prism&&self.document){var l="line-numbers",c=/\n(?!$)/g,m=function(e){var t=a(e)["white-space"];if("pre-wrap"===t||"pre-line"===t){var n=e.querySelector("code"),r=e.querySelector(".line-numbers-rows"),s=e.querySelector(".line-numbers-sizer"),i=n.textContent.split(c);s||((s=document.createElement("span")).className="line-numbers-sizer",n.appendChild(s)),s.style.display="block",i.forEach(function(e,t){s.textContent=e||"\n";var n=s.getBoundingClientRect().height;r.children[t].style.height=n+"px"}),s.textContent="",s.style.display="none"}},a=function(e){return e?window.getComputedStyle?getComputedStyle(e):e.currentStyle||null:null};window.addEventListener("resize",function(){Array.prototype.forEach.call(document.querySelectorAll("pre."+l),m)}),Prism.hooks.add("complete",function(e){if(e.code){var t=e.element,n=t.parentNode;if(n&&/pre/i.test(n.nodeName)&&!t.querySelector(".line-numbers-rows")){for(var r=!1,s=/(?:^|\s)line-numbers(?:\s|$)/,i=t;i;i=i.parentNode)if(s.test(i.className)){r=!0;break}if(r){t.className=t.className.replace(s," "),s.test(n.className)||(n.className+=" line-numbers");var l,a=e.code.match(c),o=a?a.length+1:1,u=new Array(o+1).join("");(l=document.createElement("span")).setAttribute("aria-hidden","true"),l.className="line-numbers-rows",l.innerHTML=u,n.hasAttribute("data-start")&&(n.style.counterReset="linenumber "+(parseInt(n.getAttribute("data-start"),10)-1)),e.element.appendChild(l),m(n),Prism.hooks.run("line-numbers",e)}}}}),Prism.hooks.add("line-numbers",function(e){e.plugins=e.plugins||{},e.plugins.lineNumbers=!0}),Prism.plugins.lineNumbers={getLine:function(e,t){if("PRE"===e.tagName&&e.classList.contains(l)){var n=e.querySelector(".line-numbers-rows"),r=parseInt(e.getAttribute("data-start"),10)||1,s=r+(n.children.length-1);t");(l=document.createElement("span")).setAttribute("aria-hidden","true"),l.className="line-numbers-rows",l.innerHTML=u,n.hasAttribute("data-start")&&(n.style.counterReset="linenumber "+(parseInt(n.getAttribute("data-start"),10)-1)),e.element.appendChild(l),m(n),Prism.hooks.run("line-numbers",e)}}}}),Prism.hooks.add("line-numbers",function(e){e.plugins=e.plugins||{},e.plugins.lineNumbers=!0}),Prism.plugins.lineNumbers={getLine:function(e,t){if("PRE"===e.tagName&&e.classList.contains(l)){var n=e.querySelector(".line-numbers-rows"),r=parseInt(e.getAttribute("data-start"),10)||1,s=r+(n.children.length-1);t Date: Wed, 29 Apr 2020 15:25:01 +0200 Subject: [PATCH 0505/1100] C: Improved macros (#2320) --- components/prism-c.js | 19 +++-- components/prism-c.min.js | 2 +- tests/languages/c/macro_feature.test | 122 +++++++++++++++++++++++---- 3 files changed, 117 insertions(+), 26 deletions(-) diff --git a/components/prism-c.js b/components/prism-c.js index c3b3ede7a2..c755712680 100644 --- a/components/prism-c.js +++ b/components/prism-c.js @@ -17,18 +17,23 @@ Prism.languages.insertBefore('c', 'string', { 'macro': { // allow for multiline macro definitions // spaces after the # character compile fine with gcc - pattern: /(^\s*)#\s*[a-z]+(?:[^\r\n\\]|\\(?:\r\n|[\s\S]))*/im, + pattern: /(^\s*)#\s*[a-z]+(?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im, lookbehind: true, + greedy: true, alias: 'property', inside: { - // highlight the path of the include statement as a string - 'string': { - pattern: /(#\s*include\s*)(?:<.+?>|(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2)/, - lookbehind: true - }, + 'string': [ + { + // highlight the path of the include statement as a string + pattern: /^(#\s*include\s*)<[^>]+>/, + lookbehind: true + }, + Prism.languages.c['string'] + ], + 'comment': Prism.languages.c['comment'], // highlight macro directives as keywords 'directive': { - pattern: /(#\s*)\b(?:define|defined|elif|else|endif|error|ifdef|ifndef|if|import|include|line|pragma|undef|using)\b/, + pattern: /^(#\s*)[a-z]+/, lookbehind: true, alias: 'keyword' } diff --git a/components/prism-c.min.js b/components/prism-c.min.js index f34d9594ee..ccc6c806b0 100644 --- a/components/prism-c.min.js +++ b/components/prism-c.min.js @@ -1 +1 @@ -Prism.languages.c=Prism.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+/,lookbehind:!0},keyword:/\b(?:__attribute__|_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|asm|typeof|inline|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|union|unsigned|void|volatile|while)\b/,function:/[a-z_]\w*(?=\s*\()/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/,number:/(?:\b0x(?:[\da-f]+\.?[\da-f]*|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?)[ful]*/i}),Prism.languages.insertBefore("c","string",{macro:{pattern:/(^\s*)#\s*[a-z]+(?:[^\r\n\\]|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,alias:"property",inside:{string:{pattern:/(#\s*include\s*)(?:<.+?>|(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2)/,lookbehind:!0},directive:{pattern:/(#\s*)\b(?:define|defined|elif|else|endif|error|ifdef|ifndef|if|import|include|line|pragma|undef|using)\b/,lookbehind:!0,alias:"keyword"}}},constant:/\b(?:__FILE__|__LINE__|__DATE__|__TIME__|__TIMESTAMP__|__func__|EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|stdin|stdout|stderr)\b/}),delete Prism.languages.c.boolean; \ No newline at end of file +Prism.languages.c=Prism.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+/,lookbehind:!0},keyword:/\b(?:__attribute__|_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|asm|typeof|inline|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|union|unsigned|void|volatile|while)\b/,function:/[a-z_]\w*(?=\s*\()/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/,number:/(?:\b0x(?:[\da-f]+\.?[\da-f]*|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?)[ful]*/i}),Prism.languages.insertBefore("c","string",{macro:{pattern:/(^\s*)#\s*[a-z]+(?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},Prism.languages.c.string],comment:Prism.languages.c.comment,directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"}}},constant:/\b(?:__FILE__|__LINE__|__DATE__|__TIME__|__TIMESTAMP__|__func__|EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|stdin|stdout|stderr)\b/}),delete Prism.languages.c.boolean; \ No newline at end of file diff --git a/tests/languages/c/macro_feature.test b/tests/languages/c/macro_feature.test index 6e65d9d590..8fb83b359c 100644 --- a/tests/languages/c/macro_feature.test +++ b/tests/languages/c/macro_feature.test @@ -1,5 +1,6 @@ # include - #define PG_locked 0 +# include "stdio.h" + #define PG_locked 0 #defined #elif @@ -16,30 +17,115 @@ #undef #using +#somethingunknown + +#define FOO /* + comment +*/ 1 + +#define FOO 1 // trailing comment + +#define MAX(a, b) \ + ((a) < (b) ? (b) : (a)) + ---------------------------------------------------- [ ["macro", [ - "# ", ["directive", "include"], + "# ", + ["directive", "include"], ["string", ""] ]], - ["macro", ["#", ["directive", "define"], " PG_locked 0"]], - ["macro", ["#", ["directive", "defined"]]], - ["macro", ["#", ["directive", "elif"]]], - ["macro", ["#", ["directive", "else"]]], - ["macro", ["#", ["directive", "endif"]]], - ["macro", ["#", ["directive", "error"]]], - ["macro", ["#", ["directive", "ifdef"]]], - ["macro", ["#", ["directive", "ifndef"]]], - ["macro", ["#", ["directive", "if"]]], - ["macro", ["#", ["directive", "import"]]], - ["macro", ["#", ["directive", "include"]]], - ["macro", ["#", ["directive", "line"]]], - ["macro", ["#", ["directive", "pragma"]]], - ["macro", ["#", ["directive", "undef"]]], - ["macro", ["#", ["directive", "using"]]] + ["macro", [ + "# ", + ["directive", "include"], + ["string", "\"stdio.h\""] + ]], + ["macro", [ + "#", + ["directive", "define"], + " PG_locked 0" + ]], + ["macro", [ + "#", + ["directive", "defined"] + ]], + ["macro", [ + "#", + ["directive", "elif"] + ]], + ["macro", [ + "#", + ["directive", "else"] + ]], + ["macro", [ + "#", + ["directive", "endif"] + ]], + ["macro", [ + "#", + ["directive", "error"] + ]], + ["macro", [ + "#", + ["directive", "ifdef"] + ]], + ["macro", [ + "#", + ["directive", "ifndef"] + ]], + ["macro", [ + "#", + ["directive", "if"] + ]], + ["macro", [ + "#", + ["directive", "import"] + ]], + ["macro", [ + "#", + ["directive", "include"] + ]], + ["macro", [ + "#", + ["directive", "line"] + ]], + ["macro", [ + "#", + ["directive", "pragma"] + ]], + ["macro", [ + "#", + ["directive", "undef"] + ]], + ["macro", [ + "#", + ["directive", "using"] + ]], + ["macro", [ + "#", + ["directive", "somethingunknown"] + ]], + ["macro", [ + "#", + ["directive", "define"], + " FOO ", + ["comment", "/*\r\n comment\r\n*/"], + " 1" + ]], + ["macro", [ + "#", + ["directive", "define"], + " FOO 1 ", + ["comment", "// trailing comment"] + ]], + ["macro", [ + "#", + ["directive", "define"], + " MAX(a, b) \\\r\n\t((a) < (b) ? (b) : (a))" + ]] ] ---------------------------------------------------- -Checks for macros and paths inside include statements. \ No newline at end of file +Checks for macros and paths inside include statements. From d2541d548e7177eaad631b0e8dae10c88a3229b8 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Wed, 29 Apr 2020 15:25:26 +0200 Subject: [PATCH 0506/1100] Scheme: Consistent lookaheads (#2322) --- components/prism-scheme.js | 8 ++++---- components/prism-scheme.min.js | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/components/prism-scheme.js b/components/prism-scheme.js index d67c14c2b6..f284a5d77a 100644 --- a/components/prism-scheme.js +++ b/components/prism-scheme.js @@ -18,11 +18,11 @@ Prism.languages.scheme = { lookbehind: true }, 'keyword': { - pattern: /(\()(?:define(?:-library|-macro|-syntax|-values)?|defmacro|(?:case-)?lambda|let(?:(?:\*|rec)?(?:-values)?|-syntax|rec-syntax)|else|if|cond|begin|delay(?:-force)?|parameterize|guard|set!|(?:quasi-)?quote|syntax-(?:case|rules))(?=[()\s])/, + pattern: /(\()(?:define(?:-library|-macro|-syntax|-values)?|defmacro|(?:case-)?lambda|let(?:(?:\*|rec)?(?:-values)?|-syntax|rec-syntax)|else|if|cond|begin|delay(?:-force)?|parameterize|guard|set!|(?:quasi-)?quote|syntax-(?:case|rules))(?=[()\s]|$)/, lookbehind: true }, 'builtin': { - pattern: /(\()(?:(?:cons|car|cdr|list|call-with-current-continuation|call\/cc|append|abs|apply|eval)\b|null\?|pair\?|boolean\?|eof-object\?|char\?|procedure\?|number\?|port\?|string\?|vector\?|symbol\?|bytevector\?)(?=[()\s])/, + pattern: /(\()(?:(?:cons|car|cdr|list|call-with-current-continuation|call\/cc|append|abs|apply|eval)\b|null\?|pair\?|boolean\?|eof-object\?|char\?|procedure\?|number\?|port\?|string\?|vector\?|symbol\?|bytevector\?)(?=[()\s]|$)/, lookbehind: true }, 'number': { @@ -41,12 +41,12 @@ Prism.languages.scheme = { // := [+-]? // // := | - pattern: /([\s()])(?:(?:#d(?:#[ei])?|#[ei](?:#d)?)?[+-]?(?:(?:\d*\.?\d+(?:[eE][+-]?\d+)?|\d+\/\d+)(?:[+-](?:\d*\.?\d+(?:[eE][+-]?\d+)?|\d+\/\d+)i)?|(?:\d*\.?\d+(?:[eE][+-]?\d+)?|\d+\/\d+)i)|(?:#[box](?:#[ei])?|#[ei](?:#[box])?)[+-]?(?:[\da-fA-F]+(?:\/[\da-fA-F]+)?(?:[+-][\da-fA-F]+(?:\/[\da-fA-F]+)?i)?|[\da-fA-F]+(?:\/[\da-fA-F]+)?i))(?=[\s()]|$)/, + pattern: /([\s()])(?:(?:#d(?:#[ei])?|#[ei](?:#d)?)?[+-]?(?:(?:\d*\.?\d+(?:[eE][+-]?\d+)?|\d+\/\d+)(?:[+-](?:\d*\.?\d+(?:[eE][+-]?\d+)?|\d+\/\d+)i)?|(?:\d*\.?\d+(?:[eE][+-]?\d+)?|\d+\/\d+)i)|(?:#[box](?:#[ei])?|#[ei](?:#[box])?)[+-]?(?:[\da-fA-F]+(?:\/[\da-fA-F]+)?(?:[+-][\da-fA-F]+(?:\/[\da-fA-F]+)?i)?|[\da-fA-F]+(?:\/[\da-fA-F]+)?i))(?=[()\s]|$)/, lookbehind: true }, 'boolean': /#[ft](?=[()\s]|$)/, 'operator': { - pattern: /(\()(?:[-+*%\/]|[<>]=?|=>?)(?=\s|$)/, + pattern: /(\()(?:[-+*%\/]|[<>]=?|=>?)(?=[()\s]|$)/, lookbehind: true }, 'function': { diff --git a/components/prism-scheme.min.js b/components/prism-scheme.min.js index 1fb53dd2f1..99aaccbe16 100644 --- a/components/prism-scheme.min.js +++ b/components/prism-scheme.min.js @@ -1 +1 @@ -Prism.languages.scheme={comment:/;.*/,string:{pattern:/"(?:[^"\\]|\\.)*"/,greedy:!0},symbol:{pattern:/'[^()#'\s]+/,greedy:!0},character:{pattern:/#\\(?:[ux][a-fA-F\d]+|[-a-zA-Z]+|\S)/,greedy:!0,alias:"string"},"lambda-parameter":{pattern:/(\(lambda\s+\()[^()'\s]+/,lookbehind:!0},keyword:{pattern:/(\()(?:define(?:-library|-macro|-syntax|-values)?|defmacro|(?:case-)?lambda|let(?:(?:\*|rec)?(?:-values)?|-syntax|rec-syntax)|else|if|cond|begin|delay(?:-force)?|parameterize|guard|set!|(?:quasi-)?quote|syntax-(?:case|rules))(?=[()\s])/,lookbehind:!0},builtin:{pattern:/(\()(?:(?:cons|car|cdr|list|call-with-current-continuation|call\/cc|append|abs|apply|eval)\b|null\?|pair\?|boolean\?|eof-object\?|char\?|procedure\?|number\?|port\?|string\?|vector\?|symbol\?|bytevector\?)(?=[()\s])/,lookbehind:!0},number:{pattern:/([\s()])(?:(?:#d(?:#[ei])?|#[ei](?:#d)?)?[+-]?(?:(?:\d*\.?\d+(?:[eE][+-]?\d+)?|\d+\/\d+)(?:[+-](?:\d*\.?\d+(?:[eE][+-]?\d+)?|\d+\/\d+)i)?|(?:\d*\.?\d+(?:[eE][+-]?\d+)?|\d+\/\d+)i)|(?:#[box](?:#[ei])?|#[ei](?:#[box])?)[+-]?(?:[\da-fA-F]+(?:\/[\da-fA-F]+)?(?:[+-][\da-fA-F]+(?:\/[\da-fA-F]+)?i)?|[\da-fA-F]+(?:\/[\da-fA-F]+)?i))(?=[\s()]|$)/,lookbehind:!0},boolean:/#[ft](?=[()\s]|$)/,operator:{pattern:/(\()(?:[-+*%\/]|[<>]=?|=>?)(?=\s|$)/,lookbehind:!0},function:{pattern:/(\()[^()'\s]+(?=[()\s]|$)/,lookbehind:!0},punctuation:/[()']/}; \ No newline at end of file +Prism.languages.scheme={comment:/;.*/,string:{pattern:/"(?:[^"\\]|\\.)*"/,greedy:!0},symbol:{pattern:/'[^()#'\s]+/,greedy:!0},character:{pattern:/#\\(?:[ux][a-fA-F\d]+|[-a-zA-Z]+|\S)/,greedy:!0,alias:"string"},"lambda-parameter":{pattern:/(\(lambda\s+\()[^()'\s]+/,lookbehind:!0},keyword:{pattern:/(\()(?:define(?:-library|-macro|-syntax|-values)?|defmacro|(?:case-)?lambda|let(?:(?:\*|rec)?(?:-values)?|-syntax|rec-syntax)|else|if|cond|begin|delay(?:-force)?|parameterize|guard|set!|(?:quasi-)?quote|syntax-(?:case|rules))(?=[()\s]|$)/,lookbehind:!0},builtin:{pattern:/(\()(?:(?:cons|car|cdr|list|call-with-current-continuation|call\/cc|append|abs|apply|eval)\b|null\?|pair\?|boolean\?|eof-object\?|char\?|procedure\?|number\?|port\?|string\?|vector\?|symbol\?|bytevector\?)(?=[()\s]|$)/,lookbehind:!0},number:{pattern:/([\s()])(?:(?:#d(?:#[ei])?|#[ei](?:#d)?)?[+-]?(?:(?:\d*\.?\d+(?:[eE][+-]?\d+)?|\d+\/\d+)(?:[+-](?:\d*\.?\d+(?:[eE][+-]?\d+)?|\d+\/\d+)i)?|(?:\d*\.?\d+(?:[eE][+-]?\d+)?|\d+\/\d+)i)|(?:#[box](?:#[ei])?|#[ei](?:#[box])?)[+-]?(?:[\da-fA-F]+(?:\/[\da-fA-F]+)?(?:[+-][\da-fA-F]+(?:\/[\da-fA-F]+)?i)?|[\da-fA-F]+(?:\/[\da-fA-F]+)?i))(?=[()\s]|$)/,lookbehind:!0},boolean:/#[ft](?=[()\s]|$)/,operator:{pattern:/(\()(?:[-+*%\/]|[<>]=?|=>?)(?=[()\s]|$)/,lookbehind:!0},function:{pattern:/(\()[^()'\s]+(?=[()\s]|$)/,lookbehind:!0},punctuation:/[()']/}; \ No newline at end of file From 87a5c7aeff8a01f41bdb5b1e570cf9d9856636cf Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Wed, 29 Apr 2020 15:29:51 +0200 Subject: [PATCH 0507/1100] Added support for HLSL (#2318) https://docs.microsoft.com/en-us/windows/win32/direct3dhlsl/dx-graphics-hlsl --- components.js | 2 +- components.json | 5 + components/prism-hlsl.js | 20 + components/prism-hlsl.min.js | 1 + examples/prism-hlsl.html | 18 + plugins/autoloader/prism-autoloader.js | 1 + plugins/autoloader/prism-autoloader.min.js | 2 +- plugins/show-language/prism-show-language.js | 1 + .../show-language/prism-show-language.min.js | 2 +- tests/languages/hlsl/boolean_feature.test | 13 + tests/languages/hlsl/class-name_feature.test | 99 +++ tests/languages/hlsl/comment_feature.test | 17 + tests/languages/hlsl/keyword_feature.test | 711 ++++++++++++++++++ tests/languages/hlsl/number_feature.test | 83 ++ tests/languages/hlsl/operator_feature.test | 50 ++ 15 files changed, 1022 insertions(+), 3 deletions(-) create mode 100644 components/prism-hlsl.js create mode 100644 components/prism-hlsl.min.js create mode 100644 examples/prism-hlsl.html create mode 100644 tests/languages/hlsl/boolean_feature.test create mode 100644 tests/languages/hlsl/class-name_feature.test create mode 100644 tests/languages/hlsl/comment_feature.test create mode 100644 tests/languages/hlsl/keyword_feature.test create mode 100644 tests/languages/hlsl/number_feature.test create mode 100644 tests/languages/hlsl/operator_feature.test diff --git a/components.js b/components.js index 258848430f..bae217ef54 100644 --- a/components.js +++ b/components.js @@ -1,2 +1,2 @@ -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml","ssml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","ssml":"SSML"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"Augmented Backus–Naur form","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"Backus–Naur form","alias":"rbnf","aliasTitles":{"rbnf":"Routing Backus–Naur form"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dax":{"title":"DAX","owner":"peterbud"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"Extended Backus–Naur form","owner":"RunDevelopment"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"http":{"title":"HTTP","optional":["css","javascript","json","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"json":{"title":"JSON","owner":"CupOfTea696"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"racket":{"title":"Racket","require":"scheme","alias":"rkt","owner":"RunDevelopment"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","modify":["actionscript","coffeescript","flow","javascript","typescript","vala"],"owner":"RunDevelopment"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"solidity":{"title":"Solidity (Ethereum)","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","visual-basic"],"owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml","ssml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","ssml":"SSML"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"Augmented Backus–Naur form","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"Backus–Naur form","alias":"rbnf","aliasTitles":{"rbnf":"Routing Backus–Naur form"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dax":{"title":"DAX","owner":"peterbud"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"Extended Backus–Naur form","owner":"RunDevelopment"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"hlsl":{"title":"HLSL","require":"c","owner":"RunDevelopment"},"http":{"title":"HTTP","optional":["css","javascript","json","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"json":{"title":"JSON","owner":"CupOfTea696"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"racket":{"title":"Racket","require":"scheme","alias":"rkt","owner":"RunDevelopment"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","modify":["actionscript","coffeescript","flow","javascript","typescript","vala"],"owner":"RunDevelopment"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"solidity":{"title":"Solidity (Ethereum)","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","visual-basic"],"owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; if (typeof module !== 'undefined' && module.exports) { module.exports = components; } \ No newline at end of file diff --git a/components.json b/components.json index 3c111019f6..8addd6127c 100644 --- a/components.json +++ b/components.json @@ -437,6 +437,11 @@ "title": "HCL", "owner": "outsideris" }, + "hlsl": { + "title": "HLSL", + "require": "c", + "owner": "RunDevelopment" + }, "http": { "title": "HTTP", "optional": [ diff --git a/components/prism-hlsl.js b/components/prism-hlsl.js new file mode 100644 index 0000000000..460bf7a1e3 --- /dev/null +++ b/components/prism-hlsl.js @@ -0,0 +1,20 @@ +Prism.languages.hlsl = Prism.languages.extend('c', { + + // Regarding keywords and class names: + // The list of all keywords was split into 'keyword' and 'class-name' tokens based on whether they are capitalized. + // https://docs.microsoft.com/en-us/windows/win32/direct3dhlsl/dx-graphics-hlsl-appendix-keywords + // https://docs.microsoft.com/en-us/windows/win32/direct3dhlsl/dx-graphics-hlsl-appendix-reserved-words + 'class-name': [ + Prism.languages.c['class-name'], + /\b(?:AppendStructuredBuffer|BlendState|Buffer|ByteAddressBuffer|CompileShader|ComputeShader|ConsumeStructuredBuffer|DepthStencilState|DepthStencilView|DomainShader|GeometryShader|Hullshader|InputPatch|LineStream|OutputPatch|PixelShader|PointStream|RasterizerState|RenderTargetView|RWBuffer|RWByteAddressBuffer|RWStructuredBuffer|RWTexture(?:1D|1DArray|2D|2DArray|3D)|SamplerComparisonState|SamplerState|StructuredBuffer|Texture(?:1D|1DArray|2D|2DArray|2DMS|2DMSArray|3D|Cube|CubeArray)|TriangleStream|VertexShader)\b/ + ], + 'keyword': [ + // HLSL keyword + /\b(?:asm|asm_fragment|auto|break|case|catch|cbuffer|centroid|char|class|column_major|compile|compile_fragment|const|const_cast|continue|default|delete|discard|do|dynamic_cast|else|enum|explicit|export|extern|for|friend|fxgroup|goto|groupshared|if|in|inline|inout|interface|line|lineadj|linear|long|matrix|mutable|namespace|new|nointerpolation|noperspective|operator|out|packoffset|pass|pixelfragment|point|precise|private|protected|public|register|reinterpret_cast|return|row_major|sample|sampler|shared|short|signed|sizeof|snorm|stateblock|stateblock_state|static|static_cast|string|struct|switch|tbuffer|technique|technique10|technique11|template|texture|this|throw|triangle|triangleadj|try|typedef|typename|uniform|union|unorm|unsigned|using|vector|vertexfragment|virtual|void|volatile|while)\b/, + // scalar, vector, and matrix types + /\b(?:bool|double|dword|float|half|int|min(?:10float|12int|16(?:float|int|uint))|uint)(?:[1-4](?:x[1-4])?)?\b/ + ], + // https://docs.microsoft.com/en-us/windows/win32/direct3dhlsl/dx-graphics-hlsl-appendix-grammar#floating-point-numbers + 'number': /(?:(?:\b\d+\.?\d*|\B\.\d+)(?:[eE][+-]?\d+)?|\b0x[\da-fA-F]+)[fFhHlLuU]?\b/, + 'boolean': /\b(?:false|true)\b/ +}); diff --git a/components/prism-hlsl.min.js b/components/prism-hlsl.min.js new file mode 100644 index 0000000000..b1c7ff37ac --- /dev/null +++ b/components/prism-hlsl.min.js @@ -0,0 +1 @@ +Prism.languages.hlsl=Prism.languages.extend("c",{"class-name":[Prism.languages.c["class-name"],/\b(?:AppendStructuredBuffer|BlendState|Buffer|ByteAddressBuffer|CompileShader|ComputeShader|ConsumeStructuredBuffer|DepthStencilState|DepthStencilView|DomainShader|GeometryShader|Hullshader|InputPatch|LineStream|OutputPatch|PixelShader|PointStream|RasterizerState|RenderTargetView|RWBuffer|RWByteAddressBuffer|RWStructuredBuffer|RWTexture(?:1D|1DArray|2D|2DArray|3D)|SamplerComparisonState|SamplerState|StructuredBuffer|Texture(?:1D|1DArray|2D|2DArray|2DMS|2DMSArray|3D|Cube|CubeArray)|TriangleStream|VertexShader)\b/],keyword:[/\b(?:asm|asm_fragment|auto|break|case|catch|cbuffer|centroid|char|class|column_major|compile|compile_fragment|const|const_cast|continue|default|delete|discard|do|dynamic_cast|else|enum|explicit|export|extern|for|friend|fxgroup|goto|groupshared|if|in|inline|inout|interface|line|lineadj|linear|long|matrix|mutable|namespace|new|nointerpolation|noperspective|operator|out|packoffset|pass|pixelfragment|point|precise|private|protected|public|register|reinterpret_cast|return|row_major|sample|sampler|shared|short|signed|sizeof|snorm|stateblock|stateblock_state|static|static_cast|string|struct|switch|tbuffer|technique|technique10|technique11|template|texture|this|throw|triangle|triangleadj|try|typedef|typename|uniform|union|unorm|unsigned|using|vector|vertexfragment|virtual|void|volatile|while)\b/,/\b(?:bool|double|dword|float|half|int|min(?:10float|12int|16(?:float|int|uint))|uint)(?:[1-4](?:x[1-4])?)?\b/],number:/(?:(?:\b\d+\.?\d*|\B\.\d+)(?:[eE][+-]?\d+)?|\b0x[\da-fA-F]+)[fFhHlLuU]?\b/,boolean:/\b(?:false|true)\b/}); \ No newline at end of file diff --git a/examples/prism-hlsl.html b/examples/prism-hlsl.html new file mode 100644 index 0000000000..96b4bac5c9 --- /dev/null +++ b/examples/prism-hlsl.html @@ -0,0 +1,18 @@ +

          Full example

          +
          // Source: https://github.com/mellinoe/veldrid/blob/d60e5a036add2123a15f0da02f1da65a80503d54/src/Veldrid.ImGui/Assets/HLSL/imgui-frag.hlsl
          +
          +struct PS_INPUT
          +{
          +	float4 pos : SV_POSITION;
          +	float4 col : COLOR0;
          +	float2 uv  : TEXCOORD0;
          +};
          +
          +Texture2D FontTexture : register(t0);
          +sampler FontSampler : register(s0);
          +
          +float4 FS(PS_INPUT input) : SV_Target
          +{
          +	float4 out_col = input.col * FontTexture.Sample(FontSampler, input.uv);
          +	return out_col;
          +}
          diff --git a/plugins/autoloader/prism-autoloader.js b/plugins/autoloader/prism-autoloader.js index 01646c0b45..25ca6fadb4 100644 --- a/plugins/autoloader/prism-autoloader.js +++ b/plugins/autoloader/prism-autoloader.js @@ -49,6 +49,7 @@ "haml": "ruby", "handlebars": "markup-templating", "haxe": "clike", + "hlsl": "c", "java": "clike", "javadoc": [ "markup", diff --git a/plugins/autoloader/prism-autoloader.min.js b/plugins/autoloader/prism-autoloader.min.js index 69c97e7705..58b5e95d40 100644 --- a/plugins/autoloader/prism-autoloader.min.js +++ b/plugins/autoloader/prism-autoloader.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof self&&self.Prism&&self.document&&document.createElement){var c={javascript:"clike",actionscript:"javascript",arduino:"cpp",aspnet:["markup","csharp"],bison:"c",c:"clike",csharp:"clike",cpp:"c",coffeescript:"javascript",crystal:"ruby","css-extras":"css",d:"clike",dart:"clike",django:"markup-templating",ejs:["javascript","markup-templating"],etlua:["lua","markup-templating"],erb:["ruby","markup-templating"],fsharp:"clike","firestore-security-rules":"clike",flow:"javascript",ftl:"markup-templating",glsl:"clike",gml:"clike",go:"clike",groovy:"clike",haml:"ruby",handlebars:"markup-templating",haxe:"clike",java:"clike",javadoc:["markup","java","javadoclike"],jolie:"clike",jsdoc:["javascript","javadoclike"],"js-extras":"javascript","js-templates":"javascript",jsonp:"json",json5:"json",kotlin:"clike",latte:["clike","markup-templating","php"],less:"css",lilypond:"scheme",markdown:"markup","markup-templating":"markup",n4js:"javascript",nginx:"clike",objectivec:"c",opencl:"c",parser:"markup",php:["clike","markup-templating"],phpdoc:["php","javadoclike"],"php-extras":"php",plsql:"sql",processing:"clike",protobuf:"clike",pug:["markup","javascript"],qml:"javascript",qore:"clike",racket:"scheme",jsx:["markup","javascript"],tsx:["jsx","typescript"],reason:"clike",ruby:"clike",sass:"css",scss:"css",scala:"java","shell-session":"bash",smarty:"markup-templating",solidity:"clike",soy:"markup-templating",sparql:"turtle",sqf:"clike",swift:"clike",tap:"yaml",textile:"markup",tt2:["clike","markup-templating"],twig:"markup",typescript:"javascript","t4-cs":["t4-templating","csharp"],"t4-vb":["t4-templating","visual-basic"],vala:"clike",vbnet:"basic",velocity:"markup",wiki:"markup",xeora:"markup",xquery:"markup"},l={html:"markup",xml:"markup",svg:"markup",mathml:"markup",ssml:"markup",js:"javascript",g4:"antlr4",adoc:"asciidoc",shell:"bash",shortcode:"bbcode",rbnf:"bnf",conc:"concurnas",cs:"csharp",dotnet:"csharp",coffee:"coffeescript",jinja2:"django","dns-zone":"dns-zone-file",dockerfile:"docker",eta:"ejs",xlsx:"excel-formula",xls:"excel-formula",gamemakerlanguage:"gml",hs:"haskell",tex:"latex",context:"latex",ly:"lilypond",emacs:"lisp",elisp:"lisp","emacs-lisp":"lisp",md:"markdown",moon:"moonscript",n4jsd:"n4js",objc:"objectivec",objectpascal:"pascal",px:"pcaxis",pcode:"peoplecode",pq:"powerquery",mscript:"powerquery",py:"python",rkt:"racket",robot:"robotframework",rb:"ruby",sln:"solution-file",rq:"sparql",trig:"turtle",ts:"typescript",t4:"t4-cs",uscript:"unrealscript",uc:"unrealscript",vb:"visual-basic",xeoracube:"xeora",yml:"yaml"},n={},e="components/",a=Prism.util.currentScript();if(a){var t=/\bplugins\/autoloader\/prism-autoloader\.(?:min\.)js(?:\?[^\r\n/]*)?$/i,r=/(^|\/)[\w-]+\.(?:min\.)js(?:\?[^\r\n/]*)?$/i,s=a.getAttribute("data-autoloader-path");if(null!=s)e=s.trim().replace(/\/?$/,"/");else{var i=a.src;t.test(i)?e=i.replace(t,"components/"):r.test(i)&&(e=i.replace(r,"$1components/"))}}var p=Prism.plugins.autoloader={languages_path:e,use_minified:!0,loadLanguages:o};Prism.hooks.add("complete",function(e){e.element&&e.language&&!e.grammar&&"none"!==e.language&&function(e,a){e in l&&(e=l[e]);var t=(a.getAttribute("data-dependencies")||"").trim();if(!t){var r=a.parentElement;r&&"pre"===r.tagName.toLowerCase()&&(t=(r.getAttribute("data-dependencies")||"").trim())}o(t?t.split(/\s*,\s*/g):[],function(){m(e,function(){Prism.highlightElement(a)})})}(e.language,e.element)})}function o(e,a,t){"string"==typeof e&&(e=[e]);var r=e.length,s=0,i=!1;function c(){i||++s===r&&a&&a(e)}0!==r?e.forEach(function(e){m(e,c,function(){i||(i=!0,t&&t(e))})}):a&&setTimeout(a,0)}function m(a,t,r){var s=0<=a.indexOf("!");a=a.replace("!",""),a=l[a]||a;var e=function(){var e=n[a];if(e||(e=n[a]={callbacks:[]}),e.callbacks.push({success:t,error:r}),!s&&Prism.languages[a])u(a,"success");else if(!s&&e.error)u(a,"error");else if(s||!e.loading){e.loading=!0,function(e,a,t){var r=document.createElement("script");r.src=e,r.async=!0,r.onload=function(){document.body.removeChild(r),a&&a()},r.onerror=function(){document.body.removeChild(r),t&&t()},document.body.appendChild(r)}(function(e){return p.languages_path+"prism-"+e+(p.use_minified?".min":"")+".js"}(a),function(){e.loading=!1,u(a,"success")},function(){e.loading=!1,e.error=!0,u(a,"error")})}},i=c[a];i&&i.length?o(i,e,r):e()}function u(e,a){if(n[e]){for(var t=n[e].callbacks,r=0,s=t.length;r> & | ^ <<= >>= &= |= ^= +! && || ? : +< > == != <= >= +++ -- + +---------------------------------------------------- + +[ + ["operator", "+"], + ["operator", "-"], + ["operator", "*"], + ["operator", "/"], + ["operator", "%"], + ["operator", "="], + ["operator", "+="], + ["operator", "-="], + ["operator", "*="], + ["operator", "/="], + ["operator", "%="], + ["operator", "~"], + ["operator", "<<"], + ["operator", ">>"], + ["operator", "&"], + ["operator", "|"], + ["operator", "^"], + ["operator", "<<="], + ["operator", ">>="], + ["operator", "&="], + ["operator", "|="], + ["operator", "^="], + ["operator", "!"], + ["operator", "&&"], + ["operator", "||"], + ["operator", "?"], + ["operator", ":"], + ["operator", "<"], + ["operator", ">"], + ["operator", "=="], + ["operator", "!="], + ["operator", "<="], + ["operator", ">="], + ["operator", "++"], + ["operator", "--"] +] + +---------------------------------------------------- + +Checks for operators. From 33e4995653c41ec0e7ec7606bdef1a45f9065b80 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Wed, 29 Apr 2020 15:39:59 +0200 Subject: [PATCH 0508/1100] GLSL: Improvements (#2321) This improves GLSL by extending C instead of C-like. --- components.js | 2 +- components.json | 2 +- components/prism-glsl.js | 15 +--- components/prism-glsl.min.js | 2 +- examples/prism-glsl.html | 34 ++++----- plugins/autoloader/prism-autoloader.js | 2 +- plugins/autoloader/prism-autoloader.min.js | 2 +- tests/languages/glsl/keyword_feature.test | 14 ++-- tests/languages/glsl/macro_feature.test | 74 +++++++++++++++++++ .../languages/glsl/preprocessor_feature.test | 35 --------- 10 files changed, 104 insertions(+), 78 deletions(-) create mode 100644 tests/languages/glsl/macro_feature.test delete mode 100644 tests/languages/glsl/preprocessor_feature.test diff --git a/components.js b/components.js index bae217ef54..0d73302b31 100644 --- a/components.js +++ b/components.js @@ -1,2 +1,2 @@ -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml","ssml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","ssml":"SSML"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"Augmented Backus–Naur form","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"Backus–Naur form","alias":"rbnf","aliasTitles":{"rbnf":"Routing Backus–Naur form"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dax":{"title":"DAX","owner":"peterbud"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"Extended Backus–Naur form","owner":"RunDevelopment"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"clike","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"hlsl":{"title":"HLSL","require":"c","owner":"RunDevelopment"},"http":{"title":"HTTP","optional":["css","javascript","json","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"json":{"title":"JSON","owner":"CupOfTea696"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"racket":{"title":"Racket","require":"scheme","alias":"rkt","owner":"RunDevelopment"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","modify":["actionscript","coffeescript","flow","javascript","typescript","vala"],"owner":"RunDevelopment"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"solidity":{"title":"Solidity (Ethereum)","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","visual-basic"],"owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml","ssml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","ssml":"SSML"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"Augmented Backus–Naur form","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"Backus–Naur form","alias":"rbnf","aliasTitles":{"rbnf":"Routing Backus–Naur form"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dax":{"title":"DAX","owner":"peterbud"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"Extended Backus–Naur form","owner":"RunDevelopment"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"c","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"hlsl":{"title":"HLSL","require":"c","owner":"RunDevelopment"},"http":{"title":"HTTP","optional":["css","javascript","json","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"json":{"title":"JSON","owner":"CupOfTea696"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"racket":{"title":"Racket","require":"scheme","alias":"rkt","owner":"RunDevelopment"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","modify":["actionscript","coffeescript","flow","javascript","typescript","vala"],"owner":"RunDevelopment"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"solidity":{"title":"Solidity (Ethereum)","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","visual-basic"],"owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; if (typeof module !== 'undefined' && module.exports) { module.exports = components; } \ No newline at end of file diff --git a/components.json b/components.json index 8addd6127c..5a71eaeeed 100644 --- a/components.json +++ b/components.json @@ -379,7 +379,7 @@ }, "glsl": { "title": "GLSL", - "require": "clike", + "require": "c", "owner": "Golmote" }, "gml": { diff --git a/components/prism-glsl.js b/components/prism-glsl.js index 44ad4aa649..9db2b2e096 100644 --- a/components/prism-glsl.js +++ b/components/prism-glsl.js @@ -1,16 +1,3 @@ -Prism.languages.glsl = Prism.languages.extend('clike', { - 'comment': [ - /\/\*[\s\S]*?\*\//, - /\/\/(?:\\(?:\r\n|[\s\S])|[^\\\r\n])*/ - ], - 'number': /(?:\b0x[\da-f]+|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?)[ulf]*/i, +Prism.languages.glsl = Prism.languages.extend('c', { 'keyword': /\b(?:attribute|const|uniform|varying|buffer|shared|coherent|volatile|restrict|readonly|writeonly|atomic_uint|layout|centroid|flat|smooth|noperspective|patch|sample|break|continue|do|for|while|switch|case|default|if|else|subroutine|in|out|inout|float|double|int|void|bool|true|false|invariant|precise|discard|return|d?mat[234](?:x[234])?|[ibdu]?vec[234]|uint|lowp|mediump|highp|precision|[iu]?sampler[123]D|[iu]?samplerCube|sampler[12]DShadow|samplerCubeShadow|[iu]?sampler[12]DArray|sampler[12]DArrayShadow|[iu]?sampler2DRect|sampler2DRectShadow|[iu]?samplerBuffer|[iu]?sampler2DMS(?:Array)?|[iu]?samplerCubeArray|samplerCubeArrayShadow|[iu]?image[123]D|[iu]?image2DRect|[iu]?imageCube|[iu]?imageBuffer|[iu]?image[12]DArray|[iu]?imageCubeArray|[iu]?image2DMS(?:Array)?|struct|common|partition|active|asm|class|union|enum|typedef|template|this|resource|goto|inline|noinline|public|static|extern|external|interface|long|short|half|fixed|unsigned|superp|input|output|hvec[234]|fvec[234]|sampler3DRect|filter|sizeof|cast|namespace|using)\b/ }); - -Prism.languages.insertBefore('glsl', 'comment', { - 'preprocessor': { - pattern: /(^[ \t]*)#(?:(?:define|undef|if|ifdef|ifndef|else|elif|endif|error|pragma|extension|version|line)\b)?/m, - lookbehind: true, - alias: 'builtin' - } -}); \ No newline at end of file diff --git a/components/prism-glsl.min.js b/components/prism-glsl.min.js index b350c5cd1a..f33decf696 100644 --- a/components/prism-glsl.min.js +++ b/components/prism-glsl.min.js @@ -1 +1 @@ -Prism.languages.glsl=Prism.languages.extend("clike",{comment:[/\/\*[\s\S]*?\*\//,/\/\/(?:\\(?:\r\n|[\s\S])|[^\\\r\n])*/],number:/(?:\b0x[\da-f]+|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?)[ulf]*/i,keyword:/\b(?:attribute|const|uniform|varying|buffer|shared|coherent|volatile|restrict|readonly|writeonly|atomic_uint|layout|centroid|flat|smooth|noperspective|patch|sample|break|continue|do|for|while|switch|case|default|if|else|subroutine|in|out|inout|float|double|int|void|bool|true|false|invariant|precise|discard|return|d?mat[234](?:x[234])?|[ibdu]?vec[234]|uint|lowp|mediump|highp|precision|[iu]?sampler[123]D|[iu]?samplerCube|sampler[12]DShadow|samplerCubeShadow|[iu]?sampler[12]DArray|sampler[12]DArrayShadow|[iu]?sampler2DRect|sampler2DRectShadow|[iu]?samplerBuffer|[iu]?sampler2DMS(?:Array)?|[iu]?samplerCubeArray|samplerCubeArrayShadow|[iu]?image[123]D|[iu]?image2DRect|[iu]?imageCube|[iu]?imageBuffer|[iu]?image[12]DArray|[iu]?imageCubeArray|[iu]?image2DMS(?:Array)?|struct|common|partition|active|asm|class|union|enum|typedef|template|this|resource|goto|inline|noinline|public|static|extern|external|interface|long|short|half|fixed|unsigned|superp|input|output|hvec[234]|fvec[234]|sampler3DRect|filter|sizeof|cast|namespace|using)\b/}),Prism.languages.insertBefore("glsl","comment",{preprocessor:{pattern:/(^[ \t]*)#(?:(?:define|undef|if|ifdef|ifndef|else|elif|endif|error|pragma|extension|version|line)\b)?/m,lookbehind:!0,alias:"builtin"}}); \ No newline at end of file +Prism.languages.glsl=Prism.languages.extend("c",{keyword:/\b(?:attribute|const|uniform|varying|buffer|shared|coherent|volatile|restrict|readonly|writeonly|atomic_uint|layout|centroid|flat|smooth|noperspective|patch|sample|break|continue|do|for|while|switch|case|default|if|else|subroutine|in|out|inout|float|double|int|void|bool|true|false|invariant|precise|discard|return|d?mat[234](?:x[234])?|[ibdu]?vec[234]|uint|lowp|mediump|highp|precision|[iu]?sampler[123]D|[iu]?samplerCube|sampler[12]DShadow|samplerCubeShadow|[iu]?sampler[12]DArray|sampler[12]DArrayShadow|[iu]?sampler2DRect|sampler2DRectShadow|[iu]?samplerBuffer|[iu]?sampler2DMS(?:Array)?|[iu]?samplerCubeArray|samplerCubeArrayShadow|[iu]?image[123]D|[iu]?image2DRect|[iu]?imageCube|[iu]?imageBuffer|[iu]?image[12]DArray|[iu]?imageCubeArray|[iu]?image2DMS(?:Array)?|struct|common|partition|active|asm|class|union|enum|typedef|template|this|resource|goto|inline|noinline|public|static|extern|external|interface|long|short|half|fixed|unsigned|superp|input|output|hvec[234]|fvec[234]|sampler3DRect|filter|sizeof|cast|namespace|using)\b/}); \ No newline at end of file diff --git a/examples/prism-glsl.html b/examples/prism-glsl.html index 7492a422ba..7d64da4bfd 100644 --- a/examples/prism-glsl.html +++ b/examples/prism-glsl.html @@ -15,18 +15,18 @@

          Vertex shader example

          vec3 specularColor = vec3(1.0,1.0,1.0); void main(void) { - // compute position - gl_Position = _mvProj * vec4(vertex, 1.0); - - localPos = vertex; - - // compute light info - vec3 n = normalize(_norm * normal); - vec3 diffuse; - float specular; - float glowingSpecular = 50.0; - getDirectionalLight(n, _dLight, glowingSpecular, diffuse, specular); - vColor = max(diffuse,_ambient.xyz)*materialColor+specular*specularColor+_ambient; + // compute position + gl_Position = _mvProj * vec4(vertex, 1.0); + + localPos = vertex; + + // compute light info + vec3 n = normalize(_norm * normal); + vec3 diffuse; + float specular; + float glowingSpecular = 50.0; + getDirectionalLight(n, _dLight, glowingSpecular, diffuse, specular); + vColor = max(diffuse,_ambient.xyz)*materialColor+specular*specularColor+_ambient; }

          Fragment shader example

          @@ -42,17 +42,17 @@

          Fragment shader example

          varying vec3 localPos; void main() { - vec3 color; + vec3 color; vec3 position, useBrick; - + position = localPos / BrickSize.xyz; if (fract(position.y * 0.5) > 0.5){ position.x += 0.5; - position.z += 0.5; + position.z += 0.5; } - + position = fract(position); useBrick = step(position, BrickPct.xyz); @@ -62,4 +62,4 @@

          Fragment shader example

          gl_FragColor = vec4(color, 1.0); } -
          \ No newline at end of file +
          diff --git a/plugins/autoloader/prism-autoloader.js b/plugins/autoloader/prism-autoloader.js index 25ca6fadb4..c791aef1a7 100644 --- a/plugins/autoloader/prism-autoloader.js +++ b/plugins/autoloader/prism-autoloader.js @@ -42,7 +42,7 @@ "firestore-security-rules": "clike", "flow": "javascript", "ftl": "markup-templating", - "glsl": "clike", + "glsl": "c", "gml": "clike", "go": "clike", "groovy": "clike", diff --git a/plugins/autoloader/prism-autoloader.min.js b/plugins/autoloader/prism-autoloader.min.js index 58b5e95d40..8e6ef7bcc4 100644 --- a/plugins/autoloader/prism-autoloader.min.js +++ b/plugins/autoloader/prism-autoloader.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof self&&self.Prism&&self.document&&document.createElement){var c={javascript:"clike",actionscript:"javascript",arduino:"cpp",aspnet:["markup","csharp"],bison:"c",c:"clike",csharp:"clike",cpp:"c",coffeescript:"javascript",crystal:"ruby","css-extras":"css",d:"clike",dart:"clike",django:"markup-templating",ejs:["javascript","markup-templating"],etlua:["lua","markup-templating"],erb:["ruby","markup-templating"],fsharp:"clike","firestore-security-rules":"clike",flow:"javascript",ftl:"markup-templating",glsl:"clike",gml:"clike",go:"clike",groovy:"clike",haml:"ruby",handlebars:"markup-templating",haxe:"clike",hlsl:"c",java:"clike",javadoc:["markup","java","javadoclike"],jolie:"clike",jsdoc:["javascript","javadoclike"],"js-extras":"javascript","js-templates":"javascript",jsonp:"json",json5:"json",kotlin:"clike",latte:["clike","markup-templating","php"],less:"css",lilypond:"scheme",markdown:"markup","markup-templating":"markup",n4js:"javascript",nginx:"clike",objectivec:"c",opencl:"c",parser:"markup",php:["clike","markup-templating"],phpdoc:["php","javadoclike"],"php-extras":"php",plsql:"sql",processing:"clike",protobuf:"clike",pug:["markup","javascript"],qml:"javascript",qore:"clike",racket:"scheme",jsx:["markup","javascript"],tsx:["jsx","typescript"],reason:"clike",ruby:"clike",sass:"css",scss:"css",scala:"java","shell-session":"bash",smarty:"markup-templating",solidity:"clike",soy:"markup-templating",sparql:"turtle",sqf:"clike",swift:"clike",tap:"yaml",textile:"markup",tt2:["clike","markup-templating"],twig:"markup",typescript:"javascript","t4-cs":["t4-templating","csharp"],"t4-vb":["t4-templating","visual-basic"],vala:"clike",vbnet:"basic",velocity:"markup",wiki:"markup",xeora:"markup",xquery:"markup"},l={html:"markup",xml:"markup",svg:"markup",mathml:"markup",ssml:"markup",js:"javascript",g4:"antlr4",adoc:"asciidoc",shell:"bash",shortcode:"bbcode",rbnf:"bnf",conc:"concurnas",cs:"csharp",dotnet:"csharp",coffee:"coffeescript",jinja2:"django","dns-zone":"dns-zone-file",dockerfile:"docker",eta:"ejs",xlsx:"excel-formula",xls:"excel-formula",gamemakerlanguage:"gml",hs:"haskell",tex:"latex",context:"latex",ly:"lilypond",emacs:"lisp",elisp:"lisp","emacs-lisp":"lisp",md:"markdown",moon:"moonscript",n4jsd:"n4js",objc:"objectivec",objectpascal:"pascal",px:"pcaxis",pcode:"peoplecode",pq:"powerquery",mscript:"powerquery",py:"python",rkt:"racket",robot:"robotframework",rb:"ruby",sln:"solution-file",rq:"sparql",trig:"turtle",ts:"typescript",t4:"t4-cs",uscript:"unrealscript",uc:"unrealscript",vb:"visual-basic",xeoracube:"xeora",yml:"yaml"},n={},e="components/",a=Prism.util.currentScript();if(a){var t=/\bplugins\/autoloader\/prism-autoloader\.(?:min\.)js(?:\?[^\r\n/]*)?$/i,r=/(^|\/)[\w-]+\.(?:min\.)js(?:\?[^\r\n/]*)?$/i,s=a.getAttribute("data-autoloader-path");if(null!=s)e=s.trim().replace(/\/?$/,"/");else{var i=a.src;t.test(i)?e=i.replace(t,"components/"):r.test(i)&&(e=i.replace(r,"$1components/"))}}var p=Prism.plugins.autoloader={languages_path:e,use_minified:!0,loadLanguages:o};Prism.hooks.add("complete",function(e){e.element&&e.language&&!e.grammar&&"none"!==e.language&&function(e,a){e in l&&(e=l[e]);var t=(a.getAttribute("data-dependencies")||"").trim();if(!t){var r=a.parentElement;r&&"pre"===r.tagName.toLowerCase()&&(t=(r.getAttribute("data-dependencies")||"").trim())}o(t?t.split(/\s*,\s*/g):[],function(){m(e,function(){Prism.highlightElement(a)})})}(e.language,e.element)})}function o(e,a,t){"string"==typeof e&&(e=[e]);var r=e.length,s=0,i=!1;function c(){i||++s===r&&a&&a(e)}0!==r?e.forEach(function(e){m(e,c,function(){i||(i=!0,t&&t(e))})}):a&&setTimeout(a,0)}function m(a,t,r){var s=0<=a.indexOf("!");a=a.replace("!",""),a=l[a]||a;var e=function(){var e=n[a];if(e||(e=n[a]={callbacks:[]}),e.callbacks.push({success:t,error:r}),!s&&Prism.languages[a])u(a,"success");else if(!s&&e.error)u(a,"error");else if(s||!e.loading){e.loading=!0,function(e,a,t){var r=document.createElement("script");r.src=e,r.async=!0,r.onload=function(){document.body.removeChild(r),a&&a()},r.onerror=function(){document.body.removeChild(r),t&&t()},document.body.appendChild(r)}(function(e){return p.languages_path+"prism-"+e+(p.use_minified?".min":"")+".js"}(a),function(){e.loading=!1,u(a,"success")},function(){e.loading=!1,e.error=!0,u(a,"error")})}},i=c[a];i&&i.length?o(i,e,r):e()}function u(e,a){if(n[e]){for(var t=n[e].callbacks,r=0,s=t.length;r Date: Wed, 29 Apr 2020 19:31:30 +0200 Subject: [PATCH 0509/1100] C++: Fixed `enum class` class names (#2342) The `class` keyword in `enum class` enums was falsely highlighted as the class name. --- components/prism-cpp.js | 2 +- components/prism-cpp.min.js | 2 +- tests/languages/cpp/class-name_feature.test | 4 +++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/components/prism-cpp.js b/components/prism-cpp.js index 08be199ca3..8903840101 100644 --- a/components/prism-cpp.js +++ b/components/prism-cpp.js @@ -1,6 +1,6 @@ Prism.languages.cpp = Prism.languages.extend('c', { 'class-name': { - pattern: /(\b(?:class|enum|struct)\s+)\w+/, + pattern: /(\b(?:class|enum|struct)\s+)(?!class|enum|struct)\w+/, lookbehind: true }, 'keyword': /\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char8_t|char16_t|char32_t|class|compl|concept|const|consteval|constexpr|constinit|const_cast|continue|co_await|co_return|co_yield|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|float|for|friend|goto|if|inline|int|int8_t|int16_t|int32_t|int64_t|uint8_t|uint16_t|uint32_t|uint64_t|long|mutable|namespace|new|noexcept|nullptr|operator|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/, diff --git a/components/prism-cpp.min.js b/components/prism-cpp.min.js index 819c1675f2..2f0af4f881 100644 --- a/components/prism-cpp.min.js +++ b/components/prism-cpp.min.js @@ -1 +1 @@ -Prism.languages.cpp=Prism.languages.extend("c",{"class-name":{pattern:/(\b(?:class|enum|struct)\s+)\w+/,lookbehind:!0},keyword:/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char8_t|char16_t|char32_t|class|compl|concept|const|consteval|constexpr|constinit|const_cast|continue|co_await|co_return|co_yield|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|float|for|friend|goto|if|inline|int|int8_t|int16_t|int32_t|int64_t|uint8_t|uint16_t|uint32_t|uint64_t|long|mutable|namespace|new|noexcept|nullptr|operator|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+\.?[\da-f']*|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+\.?[\d']*|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]*/i,greedy:!0},operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:true|false)\b/}),Prism.languages.insertBefore("cpp","string",{"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}); \ No newline at end of file +Prism.languages.cpp=Prism.languages.extend("c",{"class-name":{pattern:/(\b(?:class|enum|struct)\s+)(?!class|enum|struct)\w+/,lookbehind:!0},keyword:/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char8_t|char16_t|char32_t|class|compl|concept|const|consteval|constexpr|constinit|const_cast|continue|co_await|co_return|co_yield|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|float|for|friend|goto|if|inline|int|int8_t|int16_t|int32_t|int64_t|uint8_t|uint16_t|uint32_t|uint64_t|long|mutable|namespace|new|noexcept|nullptr|operator|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+\.?[\da-f']*|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+\.?[\d']*|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]*/i,greedy:!0},operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:true|false)\b/}),Prism.languages.insertBefore("cpp","string",{"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}); \ No newline at end of file diff --git a/tests/languages/cpp/class-name_feature.test b/tests/languages/cpp/class-name_feature.test index e61733c3ce..2f79a4cd9a 100644 --- a/tests/languages/cpp/class-name_feature.test +++ b/tests/languages/cpp/class-name_feature.test @@ -2,6 +2,7 @@ class Foo class Foo_bar struct foo enum bar +enum class FooBar ---------------------------------------------------- @@ -9,7 +10,8 @@ enum bar ["keyword", "class"], ["class-name", "Foo"], ["keyword", "class"], ["class-name", "Foo_bar"], ["keyword", "struct"], ["class-name", "foo"], - ["keyword", "enum"], ["class-name", "bar"] + ["keyword", "enum"], ["class-name", "bar"], + ["keyword", "enum"], ["keyword", "class"], ["class-name", "FooBar"] ] ---------------------------------------------------- From c93244768ec7031caa6359655289c1e756a90194 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Wed, 29 Apr 2020 21:54:31 +0200 Subject: [PATCH 0510/1100] Python: Fixed empty multiline strings (#2344) --- components/prism-python.js | 4 ++-- components/prism-python.min.js | 2 +- tests/languages/python/string-interpolation_feature.test | 2 +- tests/languages/python/triple-quoted-string_feature.test | 6 +++++- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/components/prism-python.js b/components/prism-python.js index 8619ed7a0a..2d96b154a5 100644 --- a/components/prism-python.js +++ b/components/prism-python.js @@ -4,7 +4,7 @@ Prism.languages.python = { lookbehind: true }, 'string-interpolation': { - pattern: /(?:f|rf|fr)(?:("""|''')[\s\S]+?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i, + pattern: /(?:f|rf|fr)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i, greedy: true, inside: { 'interpolation': { @@ -27,7 +27,7 @@ Prism.languages.python = { } }, 'triple-quoted-string': { - pattern: /(?:[rub]|rb|br)?("""|''')[\s\S]+?\1/i, + pattern: /(?:[rub]|rb|br)?("""|''')[\s\S]*?\1/i, greedy: true, alias: 'string' }, diff --git a/components/prism-python.min.js b/components/prism-python.min.js index 35336af28c..3045bfb177 100644 --- a/components/prism-python.min.js +++ b/components/prism-python.min.js @@ -1 +1 @@ -Prism.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0},"string-interpolation":{pattern:/(?:f|rf|fr)(?:("""|''')[\s\S]+?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:{{)*){(?!{)(?:[^{}]|{(?!{)(?:[^{}]|{(?!{)(?:[^{}])+})+})+}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|rb|br)?("""|''')[\s\S]+?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|rb|br)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^\s*)@\w+(?:\.\w+)*/im,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:and|as|assert|async|await|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:True|False|None)\b/,number:/(?:\b(?=\d)|\B(?=\.))(?:0[bo])?(?:(?:\d|0x[\da-f])[\da-f]*\.?\d*|\.\d+)(?:e[+-]?\d+)?j?\b/i,operator:/[-+%=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},Prism.languages.python["string-interpolation"].inside.interpolation.inside.rest=Prism.languages.python,Prism.languages.py=Prism.languages.python; \ No newline at end of file +Prism.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0},"string-interpolation":{pattern:/(?:f|rf|fr)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:{{)*){(?!{)(?:[^{}]|{(?!{)(?:[^{}]|{(?!{)(?:[^{}])+})+})+}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|rb|br)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|rb|br)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^\s*)@\w+(?:\.\w+)*/im,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:and|as|assert|async|await|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:True|False|None)\b/,number:/(?:\b(?=\d)|\B(?=\.))(?:0[bo])?(?:(?:\d|0x[\da-f])[\da-f]*\.?\d*|\.\d+)(?:e[+-]?\d+)?j?\b/i,operator:/[-+%=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},Prism.languages.python["string-interpolation"].inside.interpolation.inside.rest=Prism.languages.python,Prism.languages.py=Prism.languages.python; \ No newline at end of file diff --git a/tests/languages/python/string-interpolation_feature.test b/tests/languages/python/string-interpolation_feature.test index 789cb83243..95ca423cbd 100644 --- a/tests/languages/python/string-interpolation_feature.test +++ b/tests/languages/python/string-interpolation_feature.test @@ -144,4 +144,4 @@ f'{(lambda x: x*2)(3)}' ---------------------------------------------------- -Checks for string interpolation. \ No newline at end of file +Checks for string interpolation. diff --git a/tests/languages/python/triple-quoted-string_feature.test b/tests/languages/python/triple-quoted-string_feature.test index ab1e2ab759..13157cbc5e 100644 --- a/tests/languages/python/triple-quoted-string_feature.test +++ b/tests/languages/python/triple-quoted-string_feature.test @@ -1,7 +1,9 @@ +"""""" """foobar""" """fo"o #bar baz""" +'''''' '''foobar''' '''fo'o #bar @@ -10,12 +12,14 @@ baz''' ---------------------------------------------------- [ + ["triple-quoted-string", "\"\"\"\"\"\""], ["triple-quoted-string", "\"\"\"foobar\"\"\""], ["triple-quoted-string", "\"\"\"fo\"o\r\n#bar\r\nbaz\"\"\""], + ["triple-quoted-string", "''''''"], ["triple-quoted-string", "'''foobar'''"], ["triple-quoted-string", "'''fo'o\r\n#bar\r\nbaz'''"] ] ---------------------------------------------------- -Checks for triple-quoted strings. \ No newline at end of file +Checks for triple-quoted strings. From 7f948ecbceaa1a7c507946cd84e8d1d848c4b303 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=A3=E9=87=8C=E5=A5=BD=E8=84=8F=E4=B8=8D=E5=8F=AF?= =?UTF-8?q?=E4=BB=A5?= <453491931@qq.com> Date: Sun, 3 May 2020 23:40:09 +0800 Subject: [PATCH 0511/1100] pug: Improved class and id detection in tags (#2358) --- components/prism-pug.js | 4 +++- components/prism-pug.min.js | 2 +- tests/languages/pug/tag_feature.test | 24 ++++++++++++++++++++---- 3 files changed, 24 insertions(+), 6 deletions(-) diff --git a/components/prism-pug.js b/components/prism-pug.js index b1ecd942a3..6860ded5dd 100644 --- a/components/prism-pug.js +++ b/components/prism-pug.js @@ -130,7 +130,9 @@ } } ], - 'punctuation': /:/ + 'punctuation': /:/, + 'attr-id': /#[\w\-]+/, + 'attr-class': /\.[\w\-]+/ } }, 'code': [ diff --git a/components/prism-pug.min.js b/components/prism-pug.min.js index b116e79089..68ccecfdc0 100644 --- a/components/prism-pug.min.js +++ b/components/prism-pug.min.js @@ -1 +1 @@ -!function(e){e.languages.pug={comment:{pattern:/(^([\t ]*))\/\/.*(?:(?:\r?\n|\r)\2[\t ]+.+)*/m,lookbehind:!0},"multiline-script":{pattern:/(^([\t ]*)script\b.*\.[\t ]*)(?:(?:\r?\n|\r(?!\n))(?:\2[\t ]+.+|\s*?(?=\r?\n|\r)))+/m,lookbehind:!0,inside:e.languages.javascript},filter:{pattern:/(^([\t ]*)):.+(?:(?:\r?\n|\r(?!\n))(?:\2[\t ]+.+|\s*?(?=\r?\n|\r)))+/m,lookbehind:!0,inside:{"filter-name":{pattern:/^:[\w-]+/,alias:"variable"}}},"multiline-plain-text":{pattern:/(^([\t ]*)[\w\-#.]+\.[\t ]*)(?:(?:\r?\n|\r(?!\n))(?:\2[\t ]+.+|\s*?(?=\r?\n|\r)))+/m,lookbehind:!0},markup:{pattern:/(^[\t ]*)<.+/m,lookbehind:!0,inside:e.languages.markup},doctype:{pattern:/((?:^|\n)[\t ]*)doctype(?: .+)?/,lookbehind:!0},"flow-control":{pattern:/(^[\t ]*)(?:if|unless|else|case|when|default|each|while)\b(?: .+)?/m,lookbehind:!0,inside:{each:{pattern:/^each .+? in\b/,inside:{keyword:/\b(?:each|in)\b/,punctuation:/,/}},branch:{pattern:/^(?:if|unless|else|case|when|default|while)\b/,alias:"keyword"},rest:e.languages.javascript}},keyword:{pattern:/(^[\t ]*)(?:block|extends|include|append|prepend)\b.+/m,lookbehind:!0},mixin:[{pattern:/(^[\t ]*)mixin .+/m,lookbehind:!0,inside:{keyword:/^mixin/,function:/\w+(?=\s*\(|\s*$)/,punctuation:/[(),.]/}},{pattern:/(^[\t ]*)\+.+/m,lookbehind:!0,inside:{name:{pattern:/^\+\w+/,alias:"function"},rest:e.languages.javascript}}],script:{pattern:/(^[\t ]*script(?:(?:&[^(]+)?\([^)]+\))*[\t ]+).+/m,lookbehind:!0,inside:e.languages.javascript},"plain-text":{pattern:/(^[\t ]*(?!-)[\w\-#.]*[\w\-](?:(?:&[^(]+)?\([^)]+\))*\/?[\t ]+).+/m,lookbehind:!0},tag:{pattern:/(^[\t ]*)(?!-)[\w\-#.]*[\w\-](?:(?:&[^(]+)?\([^)]+\))*\/?:?/m,lookbehind:!0,inside:{attributes:[{pattern:/&[^(]+\([^)]+\)/,inside:e.languages.javascript},{pattern:/\([^)]+\)/,inside:{"attr-value":{pattern:/(=\s*)(?:\{[^}]*\}|[^,)\r\n]+)/,lookbehind:!0,inside:e.languages.javascript},"attr-name":/[\w-]+(?=\s*!?=|\s*[,)])/,punctuation:/[!=(),]+/}}],punctuation:/:/}},code:[{pattern:/(^[\t ]*(?:-|!?=)).+/m,lookbehind:!0,inside:e.languages.javascript}],punctuation:/[.\-!=|]+/};for(var t=[{filter:"atpl",language:"twig"},{filter:"coffee",language:"coffeescript"},"ejs","handlebars","less","livescript","markdown",{filter:"sass",language:"scss"},"stylus"],n={},a=0,i=t.length;a Date: Mon, 4 May 2020 23:52:49 +0200 Subject: [PATCH 0512/1100] Better error messages for pattern tests (#2364) --- tests/pattern-tests.js | 114 +++++++++++++++++++++++++---------------- 1 file changed, 70 insertions(+), 44 deletions(-) diff --git a/tests/pattern-tests.js b/tests/pattern-tests.js index beb33c7b11..b35fdb9b6a 100644 --- a/tests/pattern-tests.js +++ b/tests/pattern-tests.js @@ -81,7 +81,7 @@ function testPatterns(Prism) { BFS(Prism.languages, path => { const { key, value } = path[path.length - 1]; - let tokenPath = ''; + let tokenPath = 'Prism.languages'; for (const { key } of path) { if (!key) { // do nothing @@ -172,11 +172,46 @@ function testPatterns(Prism) { } } + /** + * Returns whether the given element will always at the start of the whole match. + * + * @param {Element} element + * @returns {boolean} + */ + function isFirstMatch(element) { + const parent = element.parent; + switch (parent.type) { + case 'Alternative': + // all elements before this element have to of zero length + if (!parent.elements.slice(0, parent.elements.indexOf(element)).every(isAlwaysZeroWidth)) { + return false; + } + const grandParent = parent.parent; + if (grandParent.type === 'Pattern') { + return true; + } else { + return isFirstMatch(grandParent); + } + + case 'Quantifier': + if (parent.max >= 2) { + return false; + } else { + return isFirstMatch(parent); + } + + default: + throw new Error(`Internal error: The given node should not be a '${element.type}'.`); + } + } + it('- should not match the empty string', function () { forEachPattern(({ pattern, tokenPath }) => { // test for empty string - assert.notMatch('', pattern, `Token ${tokenPath}: ${pattern} should not match the empty string.`); + assert.notMatch('', pattern, `${tokenPath}: ${pattern} should not match the empty string.\n\n` + + `Patterns that do match the empty string can potentially cause infinitely many empty tokens. ` + + `Make sure that all patterns always consume at least one character.`); }); }); @@ -187,54 +222,26 @@ function testPatterns(Prism) { forEachCapturingGroup(ast.pattern, () => { hasCapturingGroup = true; }); if (!hasCapturingGroup) { - assert.fail(`Token ${tokenPath}: The pattern is set to 'lookbehind: true' but does not have a capturing group.`); + assert.fail(`${tokenPath}: The pattern is set to 'lookbehind: true' but does not have a capturing group.\n\n` + + `Prism lookbehind groups use the captured text of the first capturing group to simulate a lookbehind. ` + + `Without a capturing group, a lookbehind is not possible.\n` + + `To fix this, either add a capturing group for the lookbehind or remove the 'lookbehind' property.`); } } }); }); it('- should not have lookbehind groups that can be preceded by other some characters', function () { - /** - * Returns whether the given element will always match the start of the string. - * - * @param {Element} element - * @returns {boolean} - */ - function isFirstMatch(element) { - const parent = element.parent; - switch (parent.type) { - case 'Alternative': - // all elements before this element have to of zero length - if (!parent.elements.slice(0, parent.elements.indexOf(element)).every(isAlwaysZeroWidth)) { - return false; - } - const grandParent = parent.parent; - if (grandParent.type === 'Pattern') { - return true; - } else { - return isFirstMatch(grandParent); - } - - case 'Quantifier': - if (parent.max >= 2) { - return false; - } else { - return isFirstMatch(parent); - } - - default: - throw new Error(`Internal error: The given node should not be a '${element.type}'.`); - } - } - forEachPattern(({ ast, tokenPath, lookbehind }) => { if (!lookbehind) { return; } forEachCapturingGroup(ast.pattern, ({ group, number }) => { if (number === 1 && !isFirstMatch(group)) { - assert.fail(`Token ${tokenPath}: ` - + `The lookbehind group (if matched) always has to be at index 0 relative to the whole match.`); + assert.fail(`${tokenPath}: The lookbehind group ${group.raw} might be preceded by some characters.\n\n` + + `Prism assumes that the lookbehind group, if captured, is the first thing matched by the regex. ` + + `If characters might precede the lookbehind group (e.g. /a?(b)c/), then Prism cannot correctly apply the lookbehind correctly in all cases.\n` + + `To fix this, either remove the preceding characters or include them in the lookbehind group.`); } }); }); @@ -249,9 +256,9 @@ function testPatterns(Prism) { if (number === 1 && isAlwaysZeroWidth(group)) { const groupContent = group.raw.substr(1, group.raw.length - 2); const replacement = group.alternatives.length === 1 ? groupContent : `(?:${groupContent})`; - reportError(`Token ${tokenPath}: The lookbehind group ${group.raw} does not consume characters. ` - + `Therefor it is not necessary to use a lookbehind group. ` - + `Replacing the lookbehind group with: ${replacement}`); + reportError(`${tokenPath}: The lookbehind group ${group.raw} does not consume characters.\n\n` + + `Therefor it is not necessary to use a lookbehind group.\n` + + `To fix this, replace the lookbehind group with ${replacement} and remove the 'lookbehind' property.`); } }); }); @@ -262,7 +269,22 @@ function testPatterns(Prism) { forEachCapturingGroup(ast.pattern, ({ group, number }) => { const isLookbehindGroup = lookbehind && number === 1; if (group.references.length === 0 && !isLookbehindGroup) { - reportError(`Token ${tokenPath}: Unused capturing group ${group.raw}. All capturing groups have to be either referenced or used as a Prism lookbehind group.`); + const fixes = []; + fixes.push(`Make this group a non-capturing group ('(?:...)' instead of '(...)'). (It's usually this option.)`); + fixes.push(`Reference this group with a backreference (use '\\${number}' for this).`); + if (number === 1 && !lookbehind) { + if (isFirstMatch(group)) { + fixes.push(`Add a 'lookbehind: true' declaration.`); + } else { + fixes.push(`Add a 'lookbehind: true' declaration. (This group is not a valid lookbehind group because it can be preceded by some characters.)`); + } + } + + reportError(`${tokenPath}: Unused capturing group ${group.raw}.\n\n` + + `Unused capturing groups generally degrade the performance of regular expressions. ` + + `They might also be a sign that a backreference is incorrect or that a 'lookbehind: true' declaration in missing.\n` + + `To fix this, do one of the following:\n` + + fixes.map(f => '- ' + f).join('\n')); } }); }); @@ -272,7 +294,8 @@ function testPatterns(Prism) { const niceName = /^[a-z][a-z\d]*(?:[-_][a-z\d]+)*$/; function testName(name, desc = 'token name') { if (!niceName.test(name)) { - assert.fail(`The ${desc} '${name}' does not match ${niceName}`); + assert.fail(`The ${desc} '${name}' does not match ${niceName}.\n\n` + + `To fix this, choose a name that matches the above regular expression.`); } } @@ -305,7 +328,10 @@ function testPatterns(Prism) { visitRegExpAST(ast.pattern, { onCharacterEnter(node) { if (/^\\(?:[1-9]|\d{2,})$/.test(node.raw)) { - reportError(`Token ${tokenPath}: Octal escape ${node.raw}.`); + reportError(`${tokenPath}: Octal escape ${node.raw}.\n\n` + + `Octal escapes can be confused with backreferences, so please do not use them.\n` + + `To fix this, use a different escape method. ` + + `Note that this could also be an invalid backreference, so be sure to carefully analyse the pattern.`); } } }); From 4172ab6f84f6a69cf258523d679f9a6b636ee1ec Mon Sep 17 00:00:00 2001 From: Caijinglong Date: Wed, 6 May 2020 15:52:21 +0800 Subject: [PATCH 0513/1100] Dart: Added missing keywords (#2355) --- components/prism-dart.js | 4 +-- components/prism-dart.min.js | 2 +- tests/languages/dart/keyword_feature.test | 31 +++++++++++++---------- 3 files changed, 21 insertions(+), 16 deletions(-) diff --git a/components/prism-dart.js b/components/prism-dart.js index 9b2b2e0924..cd4230a40d 100644 --- a/components/prism-dart.js +++ b/components/prism-dart.js @@ -11,7 +11,7 @@ Prism.languages.dart = Prism.languages.extend('clike', { ], 'keyword': [ /\b(?:async|sync|yield)\*/, - /\b(?:abstract|assert|async|await|break|case|catch|class|const|continue|default|deferred|do|dynamic|else|enum|export|external|extends|factory|final|finally|for|get|if|implements|import|in|library|new|null|operator|part|rethrow|return|set|static|super|switch|this|throw|try|typedef|var|void|while|with|yield)\b/ + /\b(?:abstract|assert|async|await|break|case|catch|class|const|continue|covariant|default|deferred|do|dynamic|else|enum|export|extension|external|extends|factory|final|finally|for|Function|get|hide|if|implements|interface|import|in|library|mixin|new|null|on|operator|part|rethrow|return|set|show|static|super|switch|sync|this|throw|try|typedef|var|void|while|with|yield)\b/ ], 'operator': /\bis!|\b(?:as|is)\b|\+\+|--|&&|\|\||<<=?|>>=?|~(?:\/=?)?|[+\-*\/%&^|=!<>]=?|\?/ }); @@ -21,4 +21,4 @@ Prism.languages.insertBefore('dart','function',{ pattern: /@\w+/, alias: 'symbol' } -}); \ No newline at end of file +}); diff --git a/components/prism-dart.min.js b/components/prism-dart.min.js index e0383869a5..1a6bfbd71f 100644 --- a/components/prism-dart.min.js +++ b/components/prism-dart.min.js @@ -1 +1 @@ -Prism.languages.dart=Prism.languages.extend("clike",{string:[{pattern:/r?("""|''')[\s\S]*?\1/,greedy:!0},{pattern:/r?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0}],keyword:[/\b(?:async|sync|yield)\*/,/\b(?:abstract|assert|async|await|break|case|catch|class|const|continue|default|deferred|do|dynamic|else|enum|export|external|extends|factory|final|finally|for|get|if|implements|import|in|library|new|null|operator|part|rethrow|return|set|static|super|switch|this|throw|try|typedef|var|void|while|with|yield)\b/],operator:/\bis!|\b(?:as|is)\b|\+\+|--|&&|\|\||<<=?|>>=?|~(?:\/=?)?|[+\-*\/%&^|=!<>]=?|\?/}),Prism.languages.insertBefore("dart","function",{metadata:{pattern:/@\w+/,alias:"symbol"}}); \ No newline at end of file +Prism.languages.dart=Prism.languages.extend("clike",{string:[{pattern:/r?("""|''')[\s\S]*?\1/,greedy:!0},{pattern:/r?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0}],keyword:[/\b(?:async|sync|yield)\*/,/\b(?:abstract|assert|async|await|break|case|catch|class|const|continue|covariant|default|deferred|do|dynamic|else|enum|export|extension|external|extends|factory|final|finally|for|Function|get|hide|if|implements|interface|import|in|library|mixin|new|null|on|operator|part|rethrow|return|set|show|static|super|switch|sync|this|throw|try|typedef|var|void|while|with|yield)\b/],operator:/\bis!|\b(?:as|is)\b|\+\+|--|&&|\|\||<<=?|>>=?|~(?:\/=?)?|[+\-*\/%&^|=!<>]=?|\?/}),Prism.languages.insertBefore("dart","function",{metadata:{pattern:/@\w+/,alias:"symbol"}}); \ No newline at end of file diff --git a/tests/languages/dart/keyword_feature.test b/tests/languages/dart/keyword_feature.test index a5e3c6c2da..bc78ce3e11 100644 --- a/tests/languages/dart/keyword_feature.test +++ b/tests/languages/dart/keyword_feature.test @@ -3,19 +3,22 @@ abstract assert async await break case catch class; const -continue default deferred +continue covariant default deferred do dynamic else enum -export external +export extension external extends; -factory final finally for -get if +factory final finally for Function +get hide if implements; +interface; import -in library +in +library +mixin new; null -operator part rethrow return -set static super switch this +on operator part rethrow return +set show static super switch sync this throw try typedef var void while with yield @@ -27,19 +30,21 @@ void while with yield ["keyword", "break"], ["keyword", "case"], ["keyword", "catch"], ["keyword", "class"], ["punctuation", ";"], ["keyword", "const"], - ["keyword", "continue"], ["keyword", "default"], ["keyword", "deferred"], + ["keyword", "continue"], ["keyword", "covariant"], ["keyword", "default"], ["keyword", "deferred"], ["keyword", "do"], ["keyword", "dynamic"], ["keyword", "else"], ["keyword", "enum"], - ["keyword", "export"], ["keyword", "external"], + ["keyword", "export"], ["keyword", "extension"], ["keyword", "external"], ["keyword", "extends"], ["punctuation", ";"], - ["keyword", "factory"], ["keyword", "final"], ["keyword", "finally"], ["keyword", "for"], - ["keyword", "get"], ["keyword", "if"], + ["keyword", "factory"], ["keyword", "final"], ["keyword", "finally"], ["keyword", "for"], ["keyword", "Function"], + ["keyword", "get"], ["keyword", "hide"], ["keyword", "if"], ["keyword", "implements"], ["punctuation", ";"], + ["keyword", "interface"], ["punctuation", ";"], ["keyword", "import"], ["keyword", "in"], ["keyword", "library"], + ["keyword", "mixin"], ["keyword", "new"], ["punctuation", ";"], ["keyword", "null"], - ["keyword", "operator"], ["keyword", "part"], ["keyword", "rethrow"], ["keyword", "return"], - ["keyword", "set"], ["keyword", "static"], ["keyword", "super"], ["keyword", "switch"], ["keyword", "this"], + ["keyword", "on"], ["keyword", "operator"], ["keyword", "part"], ["keyword", "rethrow"], ["keyword", "return"], + ["keyword", "set"], ["keyword", "show"], ["keyword", "static"], ["keyword", "super"], ["keyword", "switch"], ["keyword", "sync"], ["keyword", "this"], ["keyword", "throw"], ["keyword", "try"], ["keyword", "typedef"], ["keyword", "var"], ["keyword", "void"], ["keyword", "while"], ["keyword", "with"], ["keyword", "yield"] ] From 032910ba8c423591279fd413eee3d66a6104bc6f Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Wed, 6 May 2020 10:06:01 +0200 Subject: [PATCH 0514/1100] JavaDoc: Improvements (#2324) This makes some improvements to JavaDoc: - Extended support for [references](https://corochann.com/javadoc-coding-rule-of-link-linkplain-see-372.html). - Better code support - Added support for `
          ` elements
              - Added support for HTML inside code (but not `{@code}` code)
              - Fixed that the line splitting pattern required at least 2 characters per line
          - Added support for HTML entities.
          - Changed the line ends to `\r\n` for all test files.
          ---
           components/prism-javadoc.js                   |  90 ++-
           components/prism-javadoc.min.js               |   2 +-
           .../languages/javadoc/class-name_feature.test |  40 -
           tests/languages/javadoc/code_feature.test     | 695 ++++++++++++++----
           tests/languages/javadoc/entity_feature.test   |  15 +
           tests/languages/javadoc/keyword_feature.test  | 152 ++--
           .../languages/javadoc/parameter_feature.test  |  40 +-
           .../languages/javadoc/reference_feature.test  | 348 +++++++++
           tests/languages/javadoc/tag_feature.test      | 238 +++---
           9 files changed, 1207 insertions(+), 413 deletions(-)
           delete mode 100644 tests/languages/javadoc/class-name_feature.test
           create mode 100644 tests/languages/javadoc/entity_feature.test
           create mode 100644 tests/languages/javadoc/reference_feature.test
          
          diff --git a/components/prism-javadoc.js b/components/prism-javadoc.js
          index 052ceaf3fa..de38724ece 100644
          --- a/components/prism-javadoc.js
          +++ b/components/prism-javadoc.js
          @@ -1,53 +1,81 @@
           (function (Prism) {
           
          -	var codeLines = {
          -		'code': {
          -			pattern: /(^(?:\s*(?:\*\s*)*)).*[^*\s].+$/m,
          -			lookbehind: true,
          -			inside: Prism.languages.java,
          -			alias: 'language-java'
          -		}
          -	};
          +	var codeLinePattern = /(^(?:\s*(?:\*\s*)*)).*[^*\s].*$/m;
          +
          +	var memberReference = /#\s*\w+(?:\s*\([^()]*\))?/.source;
          +	var reference = /(?:[a-zA-Z]\w+\s*\.\s*)*[A-Z]\w*(?:\s*)?|/.source.replace(//g, function () { return memberReference });
           
           	Prism.languages.javadoc = Prism.languages.extend('javadoclike', {});
           	Prism.languages.insertBefore('javadoc', 'keyword', {
          -		'class-name': [
          -			{
          -				pattern: /(@(?:exception|throws|see|link|linkplain|value)\s+(?:[a-z\d]+\.)*)[A-Z](?:\w*[a-z]\w*)?(?:\.[A-Z](?:\w*[a-z]\w*)?)*/,
          -				lookbehind: true,
          -				inside: {
          -					'punctuation': /\./
          -				}
          -			},
          -			{
          -				// @param  the first generic type parameter
          -				pattern: /(@param\s+)<[A-Z]\w*>/,
          -				lookbehind: true,
          -				inside: {
          -					'punctuation': /[.<>]/
          -				}
          +		'reference': {
          +			pattern: RegExp(/(@(?:exception|throws|see|link|linkplain|value)\s+(?:\*\s*)?)/.source + '(?:' + reference + ')'),
          +			lookbehind: true,
          +			inside: {
          +				'function': {
          +					pattern: /(#\s*)\w+(?=\s*\()/,
          +					lookbehind: true
          +				},
          +				'field': {
          +					pattern: /(#\s*)\w+/,
          +					lookbehind: true
          +				},
          +				'namespace': {
          +					pattern: /\b(?:[a-z]\w*\s*\.\s*)+/,
          +					inside: {
          +						'punctuation': /\./
          +					}
          +				},
          +				'class-name': /\b[A-Z]\w*/,
          +				'keyword': Prism.languages.java.keyword,
          +				'punctuation': /[#()[\],.]/
           			}
          -		],
          -		'namespace': {
          -			pattern: /(@(?:exception|throws|see|link|linkplain)\s+)(?:[a-z\d]+\.)+/,
          +		},
          +		'class-name': {
          +			// @param  the first generic type parameter
          +			pattern: /(@param\s+)<[A-Z]\w*>/,
           			lookbehind: true,
           			inside: {
          -				'punctuation': /\./
          +				'punctuation': /[.<>]/
           			}
           		},
           		'code-section': [
           			{
          -				pattern: /(\{@code\s+)(?:[^{}]|\{[^{}]*\})+?(?=\s*\})/,
          +				pattern: /(\{@code\s+)(?:[^{}]|\{(?:[^{}]|\{(?:[^{}]|\{(?:[^{}]|\{[^{}]*\})*\})*\})*\})+?(?=\s*\})/,
           				lookbehind: true,
          -				inside: codeLines
          +				inside: {
          +					'code': {
          +						// there can't be any HTML inside of {@code} tags
          +						pattern: codeLinePattern,
          +						lookbehind: true,
          +						inside: Prism.languages.java,
          +						alias: 'language-java'
          +					}
          +				}
           			},
           			{
          -				pattern: /(<(code|tt)>\s*)[\s\S]+?(?=\s*<\/\2>)/,
          +				pattern: /(<(code|pre|tt)>(?!)\s*)[\s\S]+?(?=\s*<\/\2>)/,
           				lookbehind: true,
          -				inside: codeLines
          +				inside: {
          +					'line': {
          +						pattern: codeLinePattern,
          +						lookbehind: true,
          +						inside: {
          +							// highlight HTML tags and entities
          +							'tag': Prism.languages.markup.tag,
          +							'entity': Prism.languages.markup.entity,
          +							'code': {
          +								// everything else is Java code
          +								pattern: /.+/,
          +								inside: Prism.languages.java,
          +								alias: 'language-java'
          +							}
          +						}
          +					}
          +				}
           			}
           		],
           		'tag': Prism.languages.markup.tag,
          +		'entity': Prism.languages.markup.entity,
           	});
           
           	Prism.languages.javadoclike.addSupport('java', Prism.languages.javadoc);
          diff --git a/components/prism-javadoc.min.js b/components/prism-javadoc.min.js
          index 84726d8702..18d7f9c7e4 100644
          --- a/components/prism-javadoc.min.js
          +++ b/components/prism-javadoc.min.js
          @@ -1 +1 @@
          -!function(a){var e={code:{pattern:/(^(?:\s*(?:\*\s*)*)).*[^*\s].+$/m,lookbehind:!0,inside:a.languages.java,alias:"language-java"}};a.languages.javadoc=a.languages.extend("javadoclike",{}),a.languages.insertBefore("javadoc","keyword",{"class-name":[{pattern:/(@(?:exception|throws|see|link|linkplain|value)\s+(?:[a-z\d]+\.)*)[A-Z](?:\w*[a-z]\w*)?(?:\.[A-Z](?:\w*[a-z]\w*)?)*/,lookbehind:!0,inside:{punctuation:/\./}},{pattern:/(@param\s+)<[A-Z]\w*>/,lookbehind:!0,inside:{punctuation:/[.<>]/}}],namespace:{pattern:/(@(?:exception|throws|see|link|linkplain)\s+)(?:[a-z\d]+\.)+/,lookbehind:!0,inside:{punctuation:/\./}},"code-section":[{pattern:/(\{@code\s+)(?:[^{}]|\{[^{}]*\})+?(?=\s*\})/,lookbehind:!0,inside:e},{pattern:/(<(code|tt)>\s*)[\s\S]+?(?=\s*<\/\2>)/,lookbehind:!0,inside:e}],tag:a.languages.markup.tag}),a.languages.javadoclike.addSupport("java",a.languages.javadoc)}(Prism);
          \ No newline at end of file
          +!function(a){var e=/(^(?:\s*(?:\*\s*)*)).*[^*\s].*$/m,n="(?:[a-zA-Z]\\w+\\s*\\.\\s*)*[A-Z]\\w*(?:\\s*)?|".replace(//g,function(){return"#\\s*\\w+(?:\\s*\\([^()]*\\))?"});a.languages.javadoc=a.languages.extend("javadoclike",{}),a.languages.insertBefore("javadoc","keyword",{reference:{pattern:RegExp("(@(?:exception|throws|see|link|linkplain|value)\\s+(?:\\*\\s*)?)(?:"+n+")"),lookbehind:!0,inside:{function:{pattern:/(#\s*)\w+(?=\s*\()/,lookbehind:!0},field:{pattern:/(#\s*)\w+/,lookbehind:!0},namespace:{pattern:/\b(?:[a-z]\w*\s*\.\s*)+/,inside:{punctuation:/\./}},"class-name":/\b[A-Z]\w*/,keyword:a.languages.java.keyword,punctuation:/[#()[\],.]/}},"class-name":{pattern:/(@param\s+)<[A-Z]\w*>/,lookbehind:!0,inside:{punctuation:/[.<>]/}},"code-section":[{pattern:/(\{@code\s+)(?:[^{}]|\{(?:[^{}]|\{(?:[^{}]|\{(?:[^{}]|\{[^{}]*\})*\})*\})*\})+?(?=\s*\})/,lookbehind:!0,inside:{code:{pattern:e,lookbehind:!0,inside:a.languages.java,alias:"language-java"}}},{pattern:/(<(code|pre|tt)>(?!)\s*)[\s\S]+?(?=\s*<\/\2>)/,lookbehind:!0,inside:{line:{pattern:e,lookbehind:!0,inside:{tag:a.languages.markup.tag,entity:a.languages.markup.entity,code:{pattern:/.+/,inside:a.languages.java,alias:"language-java"}}}}}],tag:a.languages.markup.tag,entity:a.languages.markup.entity}),a.languages.javadoclike.addSupport("java",a.languages.javadoc)}(Prism);
          \ No newline at end of file
          diff --git a/tests/languages/javadoc/class-name_feature.test b/tests/languages/javadoc/class-name_feature.test
          deleted file mode 100644
          index 20ac38ebd8..0000000000
          --- a/tests/languages/javadoc/class-name_feature.test
          +++ /dev/null
          @@ -1,40 +0,0 @@
          -/**
          - * @throws IllegalArgumentException if the argument is negative.
          - * @see org.my.company.InfoClass for more information.
          - * @param  the first generic argument.
          - */
          -
          -----------------------------------------------------
          -
          -[
          -	"/**\n * ",
          -	["keyword", "@throws"],
          -	["class-name", [
          -		"IllegalArgumentException"
          -	]],
          -	" if the argument is negative.\n * ",
          -	["keyword", "@see"],
          -	["namespace", [
          -		"org",
          -		["punctuation", "."],
          -		"my",
          -		["punctuation", "."],
          -		"company",
          -		["punctuation", "."]
          -	]],
          -	["class-name", [
          -		"InfoClass"
          -	]],
          -	" for more information.\n * ",
          -	["keyword", "@param"],
          -	["class-name", [
          -		["punctuation", "<"],
          -		"T",
          -		["punctuation", ">"]
          -	]],
          -	" the first generic argument.\n */"
          -]
          -
          -----------------------------------------------------
          -
          -Checks for class names.
          diff --git a/tests/languages/javadoc/code_feature.test b/tests/languages/javadoc/code_feature.test
          index c9e52394c3..a39babdfee 100644
          --- a/tests/languages/javadoc/code_feature.test
          +++ b/tests/languages/javadoc/code_feature.test
          @@ -1,135 +1,560 @@
          -/**
          - * {@code this.foo} is never {@code null}.
          - * Foo.bar(null)
          - * 
          
          - * for (int i = 0; i < array.length; i++) {
          - *     array[i] += 1;
          - * }
          - * return array;
          - * 
          - */ - ----------------------------------------------------- - -[ - "/**\n * ", - ["punctuation", "{"], - ["keyword", "@code"], - ["code-section", [ - ["code", [ - ["keyword", "this"], - ["punctuation", "."], - "foo" - ]] - ]], - ["punctuation", "}"], - " is never ", - ["punctuation", "{"], - ["keyword", "@code"], - ["code-section", [ - ["code", [ - ["keyword", "null"] - ]] - ]], - ["punctuation", "}"], - ".\n * ", - - ["tag", [ - ["tag", [ - ["punctuation", "<"], - "code" - ]], - ["punctuation", ">"] - ]], - ["code-section", [ - ["code", [ - ["class-name", "Foo"], - ["punctuation", "."], - ["function", "bar"], - ["punctuation", "("], - ["keyword", "null"], - ["punctuation", ")"] - ]] - ]], - ["tag", [ - ["tag", [ - ["punctuation", ""] - ]], - "\n * ", - - ["tag", [ - ["tag", [ - ["punctuation", "<"], - "pre" - ]], - ["punctuation", ">"] - ]], - ["tag", [ - ["tag", [ - ["punctuation", "<"], - "code" - ]], - ["punctuation", ">"] - ]], - ["code-section", [ - "* ", - ["code", [ - ["keyword", "for"], - ["punctuation", "("], - ["keyword", "int"], - " i ", - ["operator", "="], - ["number", "0"], - ["punctuation", ";"], - " i ", - ["operator", "<"], - " array", - ["punctuation", "."], - "length", - ["punctuation", ";"], - " i", - ["operator", "++"], - ["punctuation", ")"], - ["punctuation", "{"] - ]], - "\n * ", - ["code", [ - "array", - ["punctuation", "["], - "i", - ["punctuation", "]"], - ["operator", "+="], - ["number", "1"], - ["punctuation", ";"] - ]], - "\n * }\n * ", - ["code", [ - ["keyword", "return"], - " array", - ["punctuation", ";"] - ]], - "\n *" - ]], - ["tag", [ - ["tag", [ - ["punctuation", ""] - ]], - ["tag", [ - ["tag", [ - ["punctuation", ""] - ]], - "\n */" -] - ----------------------------------------------------- - -Checks for code. +/** + * {@code this.foo} is never {@code null}. + * + * Foo.bar(null) + * Foo + * + *
          
          + * for (int i = 0; i < array.length; i++) {
          + *     array[i] += 1;
          + * }
          + * return array;
          + * 
          + * + *
          {@code
          + *     String message = String.join("-", "Java", "is", "cool");
          + *     // message returned is: "Java-is-cool"
          + * }
          + * + *
          + *     dstBegin + (srcEnd-srcBegin) - 1
          + * 
          + * + *
          + *     c == (char)(((hibyte & 0xff) << 8)
          + *                         | (b & 0xff))
          + * 
          + * + *
           {@code
          + * interface ArchiveSearcher { String search(String target); }
          + * class App {
          + *   void showSearch(final String target)
          + *       throws InterruptedException {
          + *     Future future
          + *       = executor.submit(new Callable() {
          + *         public String call() {
          + *             return searcher.search(target);
          + *         }});
          + *     displayOtherThings(); // do other things while searching
          + *     try {
          + *       displayText(future.get()); // use future
          + *     } catch (ExecutionException ex) { cleanup(); return; }
          + *   }
          + * }}
          + */ + +---------------------------------------------------- + +[ + "/**\r\n * ", + ["punctuation", "{"], + ["keyword", "@code"], + ["code-section", [ + ["code", [ + ["keyword", "this"], + ["punctuation", "."], + "foo" + ]] + ]], + ["punctuation", "}"], + " is never ", + ["punctuation", "{"], + ["keyword", "@code"], + ["code-section", [ + ["code", [ + ["keyword", "null"] + ]] + ]], + ["punctuation", "}"], + ".\r\n *\r\n * ", + ["tag", [ + ["tag", [ + ["punctuation", "<"], + "code" + ]], + ["punctuation", ">"] + ]], + ["code-section", [ + ["line", [ + ["code", [ + ["class-name", "Foo"], + ["punctuation", "."], + ["function", "bar"], + ["punctuation", "("], + ["keyword", "null"], + ["punctuation", ")"] + ]] + ]] + ]], + ["tag", [ + ["tag", [ + ["punctuation", ""] + ]], + "\r\n * ", + ["tag", [ + ["tag", [ + ["punctuation", "<"], + "tt" + ]], + ["punctuation", ">"] + ]], + ["code-section", [ + ["line", [ + ["code", [ + ["class-name", "Foo"] + ]] + ]] + ]], + ["tag", [ + ["tag", [ + ["punctuation", ""] + ]], + "\r\n *\r\n * ", + ["tag", [ + ["tag", [ + ["punctuation", "<"], + "pre" + ]], + ["punctuation", ">"] + ]], + ["tag", [ + ["tag", [ + ["punctuation", "<"], + "code" + ]], + ["punctuation", ">"] + ]], + ["code-section", [ + "* ", + ["line", [ + ["code", [ + ["keyword", "for"], + ["punctuation", "("], + ["keyword", "int"], + " i ", + ["operator", "="], + ["number", "0"], + ["punctuation", ";"], + " i ", + ["operator", "<"], + " array", + ["punctuation", "."], + "length", + ["punctuation", ";"], + " i", + ["operator", "++"], + ["punctuation", ")"], + ["punctuation", "{"] + ]] + ]], + "\r\n * ", + ["line", [ + ["code", [ + "array", + ["punctuation", "["], + "i", + ["punctuation", "]"], + ["operator", "+="], + ["number", "1"], + ["punctuation", ";"] + ]] + ]], + "\r\n * ", + ["line", [ + ["code", [ + ["punctuation", "}"] + ]] + ]], + "\r\n * ", + ["line", [ + ["code", [ + ["keyword", "return"], + " array", + ["punctuation", ";"] + ]] + ]], + "\r\n *" + ]], + ["tag", [ + ["tag", [ + ["punctuation", ""] + ]], + ["tag", [ + ["tag", [ + ["punctuation", ""] + ]], + "\r\n *\r\n * ", + ["tag", [ + ["tag", [ + ["punctuation", "<"], + "pre" + ]], + ["punctuation", ">"] + ]], + ["punctuation", "{"], + ["keyword", "@code"], + ["code-section", [ + "* ", + ["code", [ + ["class-name", "String"], + " message ", + ["operator", "="], + ["class-name", "String"], + ["punctuation", "."], + ["function", "join"], + ["punctuation", "("], + ["string", "\"-\""], + ["punctuation", ","], + ["string", "\"Java\""], + ["punctuation", ","], + ["string", "\"is\""], + ["punctuation", ","], + ["string", "\"cool\""], + ["punctuation", ")"], + ["punctuation", ";"] + ]], + "\r\n * ", + ["code", [ + ["comment", "// message returned is: \"Java-is-cool\""] + ]], + "\r\n *" + ]], + ["punctuation", "}"], + ["tag", [ + ["tag", [ + ["punctuation", ""] + ]], + "\r\n *\r\n * ", + ["tag", [ + ["tag", [ + ["punctuation", "<"], + "pre" + ]], + ["punctuation", ">"] + ]], + ["code-section", [ + "* ", + ["line", [ + ["code", [ + "dstBegin ", + ["operator", "+"], + ["punctuation", "("], + "srcEnd", + ["operator", "-"], + "srcBegin", + ["punctuation", ")"], + ["operator", "-"], + ["number", "1"] + ]] + ]], + "\r\n *" + ]], + ["tag", [ + ["tag", [ + ["punctuation", ""] + ]], + "\r\n *\r\n * ", + ["tag", [ + ["tag", [ + ["punctuation", "<"], + "pre" + ]], + ["punctuation", ">"] + ]], + ["code-section", [ + "* ", + ["line", [ + ["tag", [ + ["tag", [ + ["punctuation", "<"], + "b" + ]], + ["punctuation", ">"] + ]], + ["tag", [ + ["tag", [ + ["punctuation", "<"], + "i" + ]], + ["punctuation", ">"] + ]], + ["code", [ + "c" + ]], + ["tag", [ + ["tag", [ + ["punctuation", ""] + ]], + ["tag", [ + ["tag", [ + ["punctuation", ""] + ]], + ["code", [ + ["operator", "=="], + ["punctuation", "("], + ["keyword", "char"], + ["punctuation", ")"], + ["punctuation", "("], + ["punctuation", "("], + ["punctuation", "("], + "hibyte " + ]], + ["entity", "&"], + ["code", [ + ["number", "0xff"], + ["punctuation", ")"] + ]], + ["entity", "<"], + ["entity", "<"], + ["code", [ + ["number", "8"], + ["punctuation", ")"] + ]] + ]], + "\r\n * ", + ["line", [ + ["code", [ + ["operator", "|"], + ["punctuation", "("] + ]], + ["tag", [ + ["tag", [ + ["punctuation", "<"], + "b" + ]], + ["punctuation", ">"] + ]], + ["tag", [ + ["tag", [ + ["punctuation", "<"], + "i" + ]], + ["punctuation", ">"] + ]], + ["code", [ + "b" + ]], + ["tag", [ + ["tag", [ + ["punctuation", ""] + ]], + ["tag", [ + ["tag", [ + ["punctuation", ""] + ]], + ["code", [ + ]], + ["entity", "&"], + ["code", [ + ["number", "0xff"], + ["punctuation", ")"], + ["punctuation", ")"] + ]] + ]], + "\r\n *" + ]], + ["tag", [ + ["tag", [ + ["punctuation", ""] + ]], + "\r\n *\r\n * ", + ["tag", [ + ["tag", [ + ["punctuation", "<"], + "pre" + ]], + ["punctuation", ">"] + ]], + ["punctuation", "{"], + ["keyword", "@code"], + ["code-section", [ + "* ", + ["code", [ + ["keyword", "interface"], + ["class-name", "ArchiveSearcher"], + ["punctuation", "{"], + ["class-name", "String"], + ["function", "search"], + ["punctuation", "("], + ["class-name", "String"], + " target", + ["punctuation", ")"], + ["punctuation", ";"], + ["punctuation", "}"] + ]], + "\r\n * ", + ["code", [ + ["keyword", "class"], + ["class-name", "App"], + ["punctuation", "{"] + ]], + "\r\n * ", + ["code", [ + ["keyword", "void"], + ["function", "showSearch"], + ["punctuation", "("], + ["keyword", "final"], + ["class-name", "String"], + " target", + ["punctuation", ")"] + ]], + "\r\n * ", + ["code", [ + ["keyword", "throws"], + ["class-name", "InterruptedException"], + ["punctuation", "{"] + ]], + "\r\n * ", + ["code", [ + ["class-name", "Future"], + ["generics", [ + ["punctuation", "<"], + ["class-name", "String"], + ["punctuation", ">"] + ]], + " future" + ]], + "\r\n * ", + ["code", [ + ["operator", "="], + " executor", + ["punctuation", "."], + ["function", "submit"], + ["punctuation", "("], + ["keyword", "new"], + ["class-name", "Callable"], + ["generics", [ + ["punctuation", "<"], + ["class-name", "String"], + ["punctuation", ">"] + ]], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", "{"] + ]], + "\r\n * ", + ["code", [ + ["keyword", "public"], + ["class-name", "String"], + ["function", "call"], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", "{"] + ]], + "\r\n * ", + ["code", [ + ["keyword", "return"], + " searcher", + ["punctuation", "."], + ["function", "search"], + ["punctuation", "("], + "target", + ["punctuation", ")"], + ["punctuation", ";"] + ]], + "\r\n * ", + ["code", [ + ["punctuation", "}"], + ["punctuation", "}"], + ["punctuation", ")"], + ["punctuation", ";"] + ]], + "\r\n * ", + ["code", [ + ["function", "displayOtherThings"], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", ";"], + ["comment", "// do other things while searching"] + ]], + "\r\n * ", + ["code", [ + ["keyword", "try"], + ["punctuation", "{"] + ]], + "\r\n * ", + ["code", [ + ["function", "displayText"], + ["punctuation", "("], + "future", + ["punctuation", "."], + ["function", "get"], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", ")"], + ["punctuation", ";"], + ["comment", "// use future"] + ]], + "\r\n * ", + ["code", [ + ["punctuation", "}"], + ["keyword", "catch"], + ["punctuation", "("], + ["class-name", "ExecutionException"], + " ex", + ["punctuation", ")"], + ["punctuation", "{"], + ["function", "cleanup"], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", ";"], + ["keyword", "return"], + ["punctuation", ";"], + ["punctuation", "}"] + ]], + "\r\n * ", + ["code", [ + ["punctuation", "}"] + ]], + "\r\n * ", + ["code", [ + ["punctuation", "}"] + ]] + ]], + ["punctuation", "}"], + ["tag", [ + ["tag", [ + ["punctuation", ""] + ]], + "\r\n */" +] + +---------------------------------------------------- + +Checks for code. diff --git a/tests/languages/javadoc/entity_feature.test b/tests/languages/javadoc/entity_feature.test new file mode 100644 index 0000000000..9789e9e793 --- /dev/null +++ b/tests/languages/javadoc/entity_feature.test @@ -0,0 +1,15 @@ +/** + * < + */ + +---------------------------------------------------- + +[ + "/**\r\n * ", + ["entity", "<"], + "\r\n */" +] + +---------------------------------------------------- + +Checks for HTML entities inside doc comments. diff --git a/tests/languages/javadoc/keyword_feature.test b/tests/languages/javadoc/keyword_feature.test index db56bb42b1..8f4baf65f3 100644 --- a/tests/languages/javadoc/keyword_feature.test +++ b/tests/languages/javadoc/keyword_feature.test @@ -1,69 +1,83 @@ -/** - * @author - * @deprecated - * @exception - * @param - * @return - * @see - * @serial - * @serialData - * @serialField - * @since - * @throws - * @version - * {@code} - * {@docRoot} - * {@inheritDoc} - * {@link} - * {@linkplain} - * {@literal} - * {@value} - */ - ----------------------------------------------------- - -[ - "/**\n * ", - ["keyword", "@author"], - "\n * ", - ["keyword", "@deprecated"], - "\n * ", - ["keyword", "@exception"], - "\n * ", - ["keyword", "@param"], - "\n * ", - ["keyword", "@return"], - "\n * ", - ["keyword", "@see"], - "\n * ", - ["keyword", "@serial"], - "\n * ", - ["keyword", "@serialData"], - "\n * ", - ["keyword", "@serialField"], - "\n * ", - ["keyword", "@since"], - "\n * ", - ["keyword", "@throws"], - "\n * ", - ["keyword", "@version"], - "\n * ", - ["punctuation", "{"], ["keyword", "@code"], ["punctuation", "}"], - "\n * ", - ["punctuation", "{"], ["keyword", "@docRoot"], ["punctuation", "}"], - "\n * ", - ["punctuation", "{"], ["keyword", "@inheritDoc"], ["punctuation", "}"], - "\n * ", - ["punctuation", "{"], ["keyword", "@link"], ["punctuation", "}"], - "\n * ", - ["punctuation", "{"], ["keyword", "@linkplain"], ["punctuation", "}"], - "\n * ", - ["punctuation", "{"], ["keyword", "@literal"], ["punctuation", "}"], - "\n * ", - ["punctuation", "{"], ["keyword", "@value"], ["punctuation", "}"], - "\n */" -] - ----------------------------------------------------- - -Checks for all keywords. +/** + * @author + * @deprecated + * @exception + * @param + * @return + * @see + * @serial + * @serialData + * @serialField + * @since + * @throws + * @version + * {@code} + * {@docRoot} + * {@inheritDoc} + * {@link} + * {@linkplain} + * {@literal} + * {@value} + */ + +---------------------------------------------------- + +[ + "/**\r\n * ", + ["keyword", "@author"], + "\r\n * ", + ["keyword", "@deprecated"], + "\r\n * ", + ["keyword", "@exception"], + "\r\n * ", + ["keyword", "@param"], + "\r\n * ", + ["keyword", "@return"], + "\r\n * ", + ["keyword", "@see"], + "\r\n * ", + ["keyword", "@serial"], + "\r\n * ", + ["keyword", "@serialData"], + "\r\n * ", + ["keyword", "@serialField"], + "\r\n * ", + ["keyword", "@since"], + "\r\n * ", + ["keyword", "@throws"], + "\r\n * ", + ["keyword", "@version"], + "\r\n * ", + ["punctuation", "{"], + ["keyword", "@code"], + ["punctuation", "}"], + "\r\n * ", + ["punctuation", "{"], + ["keyword", "@docRoot"], + ["punctuation", "}"], + "\r\n * ", + ["punctuation", "{"], + ["keyword", "@inheritDoc"], + ["punctuation", "}"], + "\r\n * ", + ["punctuation", "{"], + ["keyword", "@link"], + ["punctuation", "}"], + "\r\n * ", + ["punctuation", "{"], + ["keyword", "@linkplain"], + ["punctuation", "}"], + "\r\n * ", + ["punctuation", "{"], + ["keyword", "@literal"], + ["punctuation", "}"], + "\r\n * ", + ["punctuation", "{"], + ["keyword", "@value"], + ["punctuation", "}"], + "\r\n */" +] + +---------------------------------------------------- + +Checks for all keywords. diff --git a/tests/languages/javadoc/parameter_feature.test b/tests/languages/javadoc/parameter_feature.test index 98e12ed902..33f25b2b7b 100644 --- a/tests/languages/javadoc/parameter_feature.test +++ b/tests/languages/javadoc/parameter_feature.test @@ -1,20 +1,20 @@ -/** - * @param foo an argument. - * @param bar another argument. - */ - ----------------------------------------------------- - -[ - "/**\n * ", - ["keyword", "@param"], - ["parameter", "foo"], - " an argument.\n * ", - ["keyword", "@param"], - ["parameter", "bar"], - " another argument.\n */" -] - ----------------------------------------------------- - -Checks for parameters. +/** + * @param foo an argument. + * @param bar another argument. + */ + +---------------------------------------------------- + +[ + "/**\r\n * ", + ["keyword", "@param"], + ["parameter", "foo"], + " an argument.\r\n * ", + ["keyword", "@param"], + ["parameter", "bar"], + " another argument.\r\n */" +] + +---------------------------------------------------- + +Checks for parameters. diff --git a/tests/languages/javadoc/reference_feature.test b/tests/languages/javadoc/reference_feature.test new file mode 100644 index 0000000000..b7df94ef09 --- /dev/null +++ b/tests/languages/javadoc/reference_feature.test @@ -0,0 +1,348 @@ +/** + * @throws IllegalArgumentException if the argument is negative. + * @see org.my.company.InfoClass for more information. + * @param the first generic argument. + * {@linkplain #foo(char[], java.lang.String) foo} + * + * multi-line {@link + * #foo(char[], java.lang.String)} + * + * @see #field + * @see #method(Type, Type) + * @see #method(Type argname, Type argname) + * @see #constructor(Type, Type) + * @see #constructor(Type argname, Type argname) + * @see Class#field + * @see Class#method(Type, Type) + * @see Class#method(Type argname, Type argname) + * @see Class#constructor(Type, Type) + * @see Class#constructor(Type argname, Type argname) + * @see Class.NestedClass + * @see Class + * @see foo.bar.Class#field + * @see foo.bar.Class#method(Type, Type) + * @see foo.bar.Class#method(Type argname, Type argname) + * @see foo.bar.Class#constructor(Type, Type) + * @see foo.bar.Class#constructor(Type argname, Type argname) + * @see foo.bar.Class.NestedClass + * @see foo.bar.Class + */ + +---------------------------------------------------- + +[ + "/**\r\n * ", + ["keyword", "@throws"], + ["reference", [ + ["class-name", "IllegalArgumentException"] + ]], + " if the argument is negative.\r\n * ", + ["keyword", "@see"], + ["reference", [ + ["namespace", [ + "org", + ["punctuation", "."], + "my", + ["punctuation", "."], + "company", + ["punctuation", "."] + ]], + ["class-name", "InfoClass"] + ]], + " for more information.\r\n * ", + ["keyword", "@param"], + ["class-name", [ + ["punctuation", "<"], + "T", + ["punctuation", ">"] + ]], + " the first generic argument.\r\n * ", + ["punctuation", "{"], + ["keyword", "@linkplain"], + ["reference", [ + ["punctuation", "#"], + ["function", "foo"], + ["punctuation", "("], + ["keyword", "char"], + ["punctuation", "["], + ["punctuation", "]"], + ["punctuation", ","], + ["namespace", [ + "java", + ["punctuation", "."], + "lang", + ["punctuation", "."] + ]], + ["class-name", "String"], + ["punctuation", ")"] + ]], + " foo", + ["punctuation", "}"], + + "\r\n *\r\n * multi-line ", + ["punctuation", "{"], + ["keyword", "@link"], + "\r\n * ", + ["reference", [ + ["punctuation", "#"], + ["function", "foo"], + ["punctuation", "("], + ["keyword", "char"], + ["punctuation", "["], + ["punctuation", "]"], + ["punctuation", ","], + ["namespace", [ + "java", + ["punctuation", "."], + "lang", + ["punctuation", "."] + ]], + ["class-name", "String"], + ["punctuation", ")"] + ]], + ["punctuation", "}"], + + "\r\n *\r\n * ", + ["keyword", "@see"], + ["reference", [ + ["punctuation", "#"], + ["field", "field"] + ]], + "\r\n * ", + ["keyword", "@see"], + ["reference", [ + ["punctuation", "#"], + ["function", "method"], + ["punctuation", "("], + ["class-name", "Type"], + ["punctuation", ","], + ["class-name", "Type"], + ["punctuation", ")"] + ]], + "\r\n * ", + ["keyword", "@see"], + ["reference", [ + ["punctuation", "#"], + ["function", "method"], + ["punctuation", "("], + ["class-name", "Type"], + " argname", + ["punctuation", ","], + ["class-name", "Type"], + " argname", + ["punctuation", ")"] + ]], + "\r\n * ", + ["keyword", "@see"], + ["reference", [ + ["punctuation", "#"], + ["function", "constructor"], + ["punctuation", "("], + ["class-name", "Type"], + ["punctuation", ","], + ["class-name", "Type"], + ["punctuation", ")"] + ]], + "\r\n * ", + ["keyword", "@see"], + ["reference", [ + ["punctuation", "#"], + ["function", "constructor"], + ["punctuation", "("], + ["class-name", "Type"], + " argname", + ["punctuation", ","], + ["class-name", "Type"], + " argname", + ["punctuation", ")"] + ]], + "\r\n * ", + ["keyword", "@see"], + ["reference", [ + ["class-name", "Class"], + ["punctuation", "#"], + ["field", "field"] + ]], + "\r\n * ", + ["keyword", "@see"], + ["reference", [ + ["class-name", "Class"], + ["punctuation", "#"], + ["function", "method"], + ["punctuation", "("], + ["class-name", "Type"], + ["punctuation", ","], + ["class-name", "Type"], + ["punctuation", ")"] + ]], + "\r\n * ", + ["keyword", "@see"], + ["reference", [ + ["class-name", "Class"], + ["punctuation", "#"], + ["function", "method"], + ["punctuation", "("], + ["class-name", "Type"], + " argname", + ["punctuation", ","], + ["class-name", "Type"], + " argname", + ["punctuation", ")"] + ]], + "\r\n * ", + ["keyword", "@see"], + ["reference", [ + ["class-name", "Class"], + ["punctuation", "#"], + ["function", "constructor"], + ["punctuation", "("], + ["class-name", "Type"], + ["punctuation", ","], + ["class-name", "Type"], + ["punctuation", ")"] + ]], + "\r\n * ", + ["keyword", "@see"], + ["reference", [ + ["class-name", "Class"], + ["punctuation", "#"], + ["function", "constructor"], + ["punctuation", "("], + ["class-name", "Type"], + " argname", + ["punctuation", ","], + ["class-name", "Type"], + " argname", + ["punctuation", ")"] + ]], + "\r\n * ", + ["keyword", "@see"], + ["reference", [ + ["class-name", "Class"], + ["punctuation", "."], + ["class-name", "NestedClass"] + ]], + "\r\n * ", + ["keyword", "@see"], + ["reference", [ + ["class-name", "Class"] + ]], + "\r\n * ", + ["keyword", "@see"], + ["reference", [ + ["namespace", [ + "foo", + ["punctuation", "."], + "bar", + ["punctuation", "."] + ]], + ["class-name", "Class"], + ["punctuation", "#"], + ["field", "field"] + ]], + "\r\n * ", + ["keyword", "@see"], + ["reference", [ + ["namespace", [ + "foo", + ["punctuation", "."], + "bar", + ["punctuation", "."] + ]], + ["class-name", "Class"], + ["punctuation", "#"], + ["function", "method"], + ["punctuation", "("], + ["class-name", "Type"], + ["punctuation", ","], + ["class-name", "Type"], + ["punctuation", ")"] + ]], + "\r\n * ", + ["keyword", "@see"], + ["reference", [ + ["namespace", [ + "foo", + ["punctuation", "."], + "bar", + ["punctuation", "."] + ]], + ["class-name", "Class"], + ["punctuation", "#"], + ["function", "method"], + ["punctuation", "("], + ["class-name", "Type"], + " argname", + ["punctuation", ","], + ["class-name", "Type"], + " argname", + ["punctuation", ")"] + ]], + "\r\n * ", + ["keyword", "@see"], + ["reference", [ + ["namespace", [ + "foo", + ["punctuation", "."], + "bar", + ["punctuation", "."] + ]], + ["class-name", "Class"], + ["punctuation", "#"], + ["function", "constructor"], + ["punctuation", "("], + ["class-name", "Type"], + ["punctuation", ","], + ["class-name", "Type"], + ["punctuation", ")"] + ]], + "\r\n * ", + ["keyword", "@see"], + ["reference", [ + ["namespace", [ + "foo", + ["punctuation", "."], + "bar", + ["punctuation", "."] + ]], + ["class-name", "Class"], + ["punctuation", "#"], + ["function", "constructor"], + ["punctuation", "("], + ["class-name", "Type"], + " argname", + ["punctuation", ","], + ["class-name", "Type"], + " argname", + ["punctuation", ")"] + ]], + "\r\n * ", + ["keyword", "@see"], + ["reference", [ + ["namespace", [ + "foo", + ["punctuation", "."], + "bar", + ["punctuation", "."] + ]], + ["class-name", "Class"], + ["punctuation", "."], + ["class-name", "NestedClass"] + ]], + "\r\n * ", + ["keyword", "@see"], + ["reference", [ + ["namespace", [ + "foo", + ["punctuation", "."], + "bar", + ["punctuation", "."] + ]], + ["class-name", "Class"] + ]], + "\r\n */" +] + +---------------------------------------------------- + +Checks for references. diff --git a/tests/languages/javadoc/tag_feature.test b/tests/languages/javadoc/tag_feature.test index 81b49a51f5..a32187ffa8 100644 --- a/tests/languages/javadoc/tag_feature.test +++ b/tests/languages/javadoc/tag_feature.test @@ -1,117 +1,121 @@ -/** - *

          - * - * - * - * - * - *
          - * foo - * - * bar - *
          - * some link - */ - ----------------------------------------------------- - -[ - "/**\n * ", - ["tag", [ - ["tag", [ - ["punctuation", "<"], - "p" - ]], - ["punctuation", ">"] - ]], - "\n * ", - ["tag", [ - ["tag", [ - ["punctuation", "<"], - "table" - ]], - ["punctuation", ">"] - ]], - "\n * ", - ["tag", [ - ["tag", [ - ["punctuation", "<"], - "tr" - ]], - ["punctuation", ">"] - ]], - "\n * ", - ["tag", [ - ["tag", [ - ["punctuation", "<"], - "td" - ]], - ["punctuation", ">"] - ]], - "\n * foo\n * ", - ["tag", [ - ["tag", [ - ["punctuation", ""] - ]], - "\n * ", - ["tag", [ - ["tag", [ - ["punctuation", "<"], - "td" - ]], - ["punctuation", ">"] - ]], - "\n * bar\n * ", - ["tag", [ - ["tag", [ - ["punctuation", ""] - ]], - "\n * ", - ["tag", [ - ["tag", [ - ["punctuation", ""] - ]], - "\n * ", - ["tag", [ - ["tag", [ - ["punctuation", ""] - ]], - "\n * ", - ["tag", [ - ["tag", [ - ["punctuation", "<"], "a"]], - ["attr-name", ["href"]], - ["attr-value", [ - ["punctuation", "="], - ["punctuation", "\""], - "example.com", - ["punctuation", "\""] - ]], - ["punctuation", ">"] - ]], - "some link", - ["tag", [ - ["tag", [ - ["punctuation", ""] - ]], - "\n */" -] - ----------------------------------------------------- - -Checks for HTML tags inside doc comments. +/** + *

          + * + * + * + * + * + *
          + * foo + * + * bar + *
          + * some link + */ + +---------------------------------------------------- + +[ + "/**\r\n * ", + ["tag", [ + ["tag", [ + ["punctuation", "<"], + "p" + ]], + ["punctuation", ">"] + ]], + "\r\n * ", + ["tag", [ + ["tag", [ + ["punctuation", "<"], + "table" + ]], + ["punctuation", ">"] + ]], + "\r\n * ", + ["tag", [ + ["tag", [ + ["punctuation", "<"], + "tr" + ]], + ["punctuation", ">"] + ]], + "\r\n * ", + ["tag", [ + ["tag", [ + ["punctuation", "<"], + "td" + ]], + ["punctuation", ">"] + ]], + "\r\n * foo\r\n * ", + ["tag", [ + ["tag", [ + ["punctuation", ""] + ]], + "\r\n * ", + ["tag", [ + ["tag", [ + ["punctuation", "<"], + "td" + ]], + ["punctuation", ">"] + ]], + "\r\n * bar\r\n * ", + ["tag", [ + ["tag", [ + ["punctuation", ""] + ]], + "\r\n * ", + ["tag", [ + ["tag", [ + ["punctuation", ""] + ]], + "\r\n * ", + ["tag", [ + ["tag", [ + ["punctuation", ""] + ]], + "\r\n * ", + ["tag", [ + ["tag", [ + ["punctuation", "<"], + "a" + ]], + ["attr-name", [ + "href" + ]], + ["attr-value", [ + ["punctuation", "="], + ["punctuation", "\""], + "example.com", + ["punctuation", "\""] + ]], + ["punctuation", ">"] + ]], + "some link", + ["tag", [ + ["tag", [ + ["punctuation", ""] + ]], + "\r\n */" +] + +---------------------------------------------------- + +Checks for HTML tags inside doc comments. From 0d65d6c9b712c827ad417c4558bdc28b5ac8a555 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=A3=E9=87=8C=E5=A5=BD=E8=84=8F=E4=B8=8D=E5=8F=AF?= =?UTF-8?q?=E4=BB=A5?= <453491931@qq.com> Date: Wed, 6 May 2020 16:35:29 +0800 Subject: [PATCH 0515/1100] Stylus: Fixed comments breaking strings and URLs (#2361) --- components/prism-stylus.js | 10 ++++++- components/prism-stylus.min.js | 2 +- .../stylus/property-declaration_feature.test | 27 +++++++++++++++++++ 3 files changed, 37 insertions(+), 2 deletions(-) diff --git a/components/prism-stylus.js b/components/prism-stylus.js index 256b70f77e..9ebc873632 100644 --- a/components/prism-stylus.js +++ b/components/prism-stylus.js @@ -1,6 +1,13 @@ (function (Prism) { var inside = { - 'url': /url\((["']?).*?\1\)/i, + 'comment': { + pattern: /(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/, + lookbehind: true + }, + 'url': { + pattern: /url\((["']?).*?\1\)/i, + greedy: true + }, 'string': { pattern: /("|')(?:(?!\1)[^\\\r\n]|\\(?:\r\n|[\s\S]))*\1/, greedy: true @@ -78,6 +85,7 @@ 'property-declaration': { pattern: /((?:^|\{)([ \t]*))(?:[\w-]|\{[^}\r\n]+\})+(?:\s*:\s*|[ \t]+)[^{\r\n]*(?:;|[^{\r\n,](?=$)(?!(?:\r?\n|\r)(?:\{|\2[ \t]+)))/m, lookbehind: true, + greedy: true, inside: { 'property': { pattern: /^[^\s:]+/, diff --git a/components/prism-stylus.min.js b/components/prism-stylus.min.js index 08309271e9..002e32893d 100644 --- a/components/prism-stylus.min.js +++ b/components/prism-stylus.min.js @@ -1 +1 @@ -!function(n){var t={url:/url\((["']?).*?\1\)/i,string:{pattern:/("|')(?:(?!\1)[^\\\r\n]|\\(?:\r\n|[\s\S]))*\1/,greedy:!0},interpolation:null,func:null,important:/\B!(?:important|optional)\b/i,keyword:{pattern:/(^|\s+)(?:(?:if|else|for|return|unless)(?=\s+|$)|@[\w-]+)/,lookbehind:!0},hexcode:/#[\da-f]{3,6}/i,number:/\b\d+(?:\.\d+)?%?/,boolean:/\b(?:true|false)\b/,operator:[/~|[+!\/%<>?=]=?|[-:]=|\*[*=]?|\.+|&&|\|\||\B-\B|\b(?:and|in|is(?: a| defined| not|nt)?|not|or)\b/],punctuation:/[{}()\[\];:,]/};t.interpolation={pattern:/\{[^\r\n}:]+\}/,alias:"variable",inside:{delimiter:{pattern:/^{|}$/,alias:"punctuation"},rest:t}},t.func={pattern:/[\w-]+\([^)]*\).*/,inside:{function:/^[^(]+/,rest:t}},n.languages.stylus={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0},"atrule-declaration":{pattern:/(^\s*)@.+/m,lookbehind:!0,inside:{atrule:/^@[\w-]+/,rest:t}},"variable-declaration":{pattern:/(^[ \t]*)[\w$-]+\s*.?=[ \t]*(?:(?:\{[^}]*\}|.+)|$)/m,lookbehind:!0,inside:{variable:/^\S+/,rest:t}},statement:{pattern:/(^[ \t]*)(?:if|else|for|return|unless)[ \t]+.+/m,lookbehind:!0,inside:{keyword:/^\S+/,rest:t}},"property-declaration":{pattern:/((?:^|\{)([ \t]*))(?:[\w-]|\{[^}\r\n]+\})+(?:\s*:\s*|[ \t]+)[^{\r\n]*(?:;|[^{\r\n,](?=$)(?!(?:\r?\n|\r)(?:\{|\2[ \t]+)))/m,lookbehind:!0,inside:{property:{pattern:/^[^\s:]+/,inside:{interpolation:t.interpolation}},rest:t}},selector:{pattern:/(^[ \t]*)(?:(?=\S)(?:[^{}\r\n:()]|::?[\w-]+(?:\([^)\r\n]*\))?|\{[^}\r\n]+\})+)(?:(?:\r?\n|\r)(?:\1(?:(?=\S)(?:[^{}\r\n:()]|::?[\w-]+(?:\([^)\r\n]*\))?|\{[^}\r\n]+\})+)))*(?:,$|\{|(?=(?:\r?\n|\r)(?:\{|\1[ \t]+)))/m,lookbehind:!0,inside:{interpolation:t.interpolation,punctuation:/[{},]/}},func:t.func,string:t.string,interpolation:t.interpolation,punctuation:/[{}()\[\];:.]/}}(Prism); \ No newline at end of file +!function(n){var t={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0},url:{pattern:/url\((["']?).*?\1\)/i,greedy:!0},string:{pattern:/("|')(?:(?!\1)[^\\\r\n]|\\(?:\r\n|[\s\S]))*\1/,greedy:!0},interpolation:null,func:null,important:/\B!(?:important|optional)\b/i,keyword:{pattern:/(^|\s+)(?:(?:if|else|for|return|unless)(?=\s+|$)|@[\w-]+)/,lookbehind:!0},hexcode:/#[\da-f]{3,6}/i,number:/\b\d+(?:\.\d+)?%?/,boolean:/\b(?:true|false)\b/,operator:[/~|[+!\/%<>?=]=?|[-:]=|\*[*=]?|\.+|&&|\|\||\B-\B|\b(?:and|in|is(?: a| defined| not|nt)?|not|or)\b/],punctuation:/[{}()\[\];:,]/};t.interpolation={pattern:/\{[^\r\n}:]+\}/,alias:"variable",inside:{delimiter:{pattern:/^{|}$/,alias:"punctuation"},rest:t}},t.func={pattern:/[\w-]+\([^)]*\).*/,inside:{function:/^[^(]+/,rest:t}},n.languages.stylus={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0},"atrule-declaration":{pattern:/(^\s*)@.+/m,lookbehind:!0,inside:{atrule:/^@[\w-]+/,rest:t}},"variable-declaration":{pattern:/(^[ \t]*)[\w$-]+\s*.?=[ \t]*(?:(?:\{[^}]*\}|.+)|$)/m,lookbehind:!0,inside:{variable:/^\S+/,rest:t}},statement:{pattern:/(^[ \t]*)(?:if|else|for|return|unless)[ \t]+.+/m,lookbehind:!0,inside:{keyword:/^\S+/,rest:t}},"property-declaration":{pattern:/((?:^|\{)([ \t]*))(?:[\w-]|\{[^}\r\n]+\})+(?:\s*:\s*|[ \t]+)[^{\r\n]*(?:;|[^{\r\n,](?=$)(?!(?:\r?\n|\r)(?:\{|\2[ \t]+)))/m,lookbehind:!0,greedy:!0,inside:{property:{pattern:/^[^\s:]+/,inside:{interpolation:t.interpolation}},rest:t}},selector:{pattern:/(^[ \t]*)(?:(?=\S)(?:[^{}\r\n:()]|::?[\w-]+(?:\([^)\r\n]*\))?|\{[^}\r\n]+\})+)(?:(?:\r?\n|\r)(?:\1(?:(?=\S)(?:[^{}\r\n:()]|::?[\w-]+(?:\([^)\r\n]*\))?|\{[^}\r\n]+\})+)))*(?:,$|\{|(?=(?:\r?\n|\r)(?:\{|\1[ \t]+)))/m,lookbehind:!0,inside:{interpolation:t.interpolation,punctuation:/[{},]/}},func:t.func,string:t.string,interpolation:t.interpolation,punctuation:/[{}()\[\];:.]/}}(Prism); \ No newline at end of file diff --git a/tests/languages/stylus/property-declaration_feature.test b/tests/languages/stylus/property-declaration_feature.test index 275eb43d92..ff42f035dd 100644 --- a/tests/languages/stylus/property-declaration_feature.test +++ b/tests/languages/stylus/property-declaration_feature.test @@ -10,6 +10,12 @@ background-{foo}: bar; div {foo} bar +comment + content 'http://www.example.com' // comment + background url(http://example.com) /* comment */ + background /* comment */ url("http://example.com") + content '/* this is string not comment */' + ---------------------------------------------------- [ @@ -44,6 +50,27 @@ div ]] ]], " bar" + ]], + + ["selector", ["comment"]], + ["property-declaration", [ + ["property", ["content"]], + ["string", "'http://www.example.com'"], + ["comment", "// comment"] + ]], + ["property-declaration", [ + ["property", ["background"]], + ["url", "url(http://example.com)"], + ["comment", "/* comment */"] + ]], + ["property-declaration", [ + ["property", ["background"]], + ["comment", "/* comment */"], + ["url", "url(\"http://example.com\")"] + ]], + ["property-declaration", [ + ["property", ["content"]], + ["string", "'/* this is string not comment */'"] ]] ] From d0c1c70d21a44bd1d679522265cab71cf6995e5f Mon Sep 17 00:00:00 2001 From: HeX0R101 <64781117+HeX0R101@users.noreply.github.com> Date: Wed, 6 May 2020 23:59:29 +0200 Subject: [PATCH 0516/1100] Added support for PureBasic (#2369) A language based on Basic (BlitzBasic to be precise) with inline assembler also and direct API calls. Can compile on Windows, Linux, and macOS --- components.js | 2 +- components.json | 6 + components/prism-purebasic.js | 70 ++++++ components/prism-purebasic.min.js | 1 + examples/prism-purebasic.html | 30 +++ plugins/autoloader/prism-autoloader.js | 2 + plugins/autoloader/prism-autoloader.min.js | 2 +- plugins/show-language/prism-show-language.js | 2 + .../show-language/prism-show-language.min.js | 2 +- .../languages/purebasic/comment_feature.test | 20 ++ .../languages/purebasic/function_feature.test | 211 ++++++++++++++++++ tests/languages/purebasic/number_feature.test | 19 ++ .../languages/purebasic/operator_feature.test | 15 ++ tests/languages/purebasic/string_feature.test | 13 ++ 14 files changed, 392 insertions(+), 3 deletions(-) create mode 100644 components/prism-purebasic.js create mode 100644 components/prism-purebasic.min.js create mode 100644 examples/prism-purebasic.html create mode 100644 tests/languages/purebasic/comment_feature.test create mode 100644 tests/languages/purebasic/function_feature.test create mode 100644 tests/languages/purebasic/number_feature.test create mode 100644 tests/languages/purebasic/operator_feature.test create mode 100644 tests/languages/purebasic/string_feature.test diff --git a/components.js b/components.js index 0d73302b31..896edfccd2 100644 --- a/components.js +++ b/components.js @@ -1,2 +1,2 @@ -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml","ssml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","ssml":"SSML"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"Augmented Backus–Naur form","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"Backus–Naur form","alias":"rbnf","aliasTitles":{"rbnf":"Routing Backus–Naur form"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dax":{"title":"DAX","owner":"peterbud"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"Extended Backus–Naur form","owner":"RunDevelopment"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"c","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"hlsl":{"title":"HLSL","require":"c","owner":"RunDevelopment"},"http":{"title":"HTTP","optional":["css","javascript","json","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"json":{"title":"JSON","owner":"CupOfTea696"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"racket":{"title":"Racket","require":"scheme","alias":"rkt","owner":"RunDevelopment"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","modify":["actionscript","coffeescript","flow","javascript","typescript","vala"],"owner":"RunDevelopment"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"solidity":{"title":"Solidity (Ethereum)","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","visual-basic"],"owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml","ssml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","ssml":"SSML"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"Augmented Backus–Naur form","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"Backus–Naur form","alias":"rbnf","aliasTitles":{"rbnf":"Routing Backus–Naur form"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dax":{"title":"DAX","owner":"peterbud"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"Extended Backus–Naur form","owner":"RunDevelopment"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"c","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"hlsl":{"title":"HLSL","require":"c","owner":"RunDevelopment"},"http":{"title":"HTTP","optional":["css","javascript","json","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"json":{"title":"JSON","owner":"CupOfTea696"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"purebasic":{"title":"PureBasic","require":"clike","alias":"pbfasm","owner":"HeX0R101"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"racket":{"title":"Racket","require":"scheme","alias":"rkt","owner":"RunDevelopment"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","modify":["actionscript","coffeescript","flow","javascript","typescript","vala"],"owner":"RunDevelopment"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"solidity":{"title":"Solidity (Ethereum)","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","visual-basic"],"owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; if (typeof module !== 'undefined' && module.exports) { module.exports = components; } \ No newline at end of file diff --git a/components.json b/components.json index 5a71eaeeed..fef85f2cd7 100644 --- a/components.json +++ b/components.json @@ -848,6 +848,12 @@ ], "owner": "Golmote" }, + "purebasic": { + "title": "PureBasic", + "require": "clike", + "alias": "pbfasm", + "owner": "HeX0R101" + }, "python": { "title": "Python", "alias": "py", diff --git a/components/prism-purebasic.js b/components/prism-purebasic.js new file mode 100644 index 0000000000..fd720d4a3b --- /dev/null +++ b/components/prism-purebasic.js @@ -0,0 +1,70 @@ +/* +Original Code by Bas Groothedde +!!MANY THANKS!! I never would have made this, regex and me will never be best friends ;) +==> https://codepen.io/ImagineProgramming/details/JYydBy/ +slightly changed to pass all tests +*/ + + +// PureBasic support, steal stuff from ansi-c +Prism.languages.purebasic = Prism.languages.extend('clike', { + 'comment': /;.*/, + 'keyword': /\b(?:declarecdll|declaredll|compilerselect|compilercase|compilerdefault|compilerendselect|compilererror|enableexplicit|disableexplicit|not|and|or|xor|calldebugger|debuglevel|enabledebugger|disabledebugger|restore|read|includepath|includebinary|threaded|runtime|with|endwith|structureunion|endstructureunion|align|newlist|newmap|interface|endinterface|extends|enumeration|endenumeration|swap|foreach|continue|fakereturn|goto|gosub|return|break|module|endmodule|declaremodule|enddeclaremodule|declare|declarec|prototype|prototypec|enableasm|disableasm|dim|redim|data|datasection|enddatasection|to|procedurereturn|debug|default|case|select|endselect|as|import|endimport|importc|compilerif|compilerelse|compilerendif|compilerelseif|end|structure|endstructure|while|wend|for|next|step|if|else|elseif|endif|repeat|until|procedure|proceduredll|procedurec|procedurecdll|endprocedure|protected|shared|static|global|define|includefile|xincludefile|macro|endmacro)\b/i, + 'function': /\b\w+(?:\.\w+)?\s*(?=\()/, + 'number': /(?:\$[\da-f]+|\b-?\d*\.?\d+(?:e[+-]?\d+)?)\b/i, + 'operator': /(?:@\*?|\?|\*)\w+|-[>-]?|\+\+?|!=?|<>?=?|==?|&&?|\|?\||[~^%?*/@]/ +}); + +Prism.languages.insertBefore('purebasic', 'keyword', { + 'tag': /#\w+/, + 'asm': { + pattern: /(^\s*)!.*/m, + lookbehind: true, + alias: 'tag', + inside: { + 'comment': /;.*/, + 'string': { + pattern: /(["'`])(?:\\.|(?!\1)[^\\\r\n])*\1/, + greedy: true + }, + // Anonymous label references, i.e.: jmp @b + 'label-reference-anonymous': { + pattern: /(\s*!\s*j[a-z]+\s+)@[fb]/i, + lookbehind: true, + alias: 'fasm-label' + }, + // Named label reference, i.e.: jne label1 + 'label-reference-addressed': { + pattern: /(\s*!\s*j[a-z]+\s+)[A-Z._?$@][\w.?$@~#]*/i, + lookbehind: true, + alias: 'fasm-label' + }, + 'function': { + pattern: /^(\s*!\s*)[\da-z]+(?=\s|$)/im, + lookbehind: true + }, + 'function-inline': { + pattern: /(\s*:\s*)[\da-z]+(?=\s)/i, + lookbehind: true, + alias: 'function' + }, + 'label': { + pattern: /^(\s*!\s*)[A-Za-z._?$@][\w.?$@~#]*(?=:)/m, + lookbehind: true, + alias: 'fasm-label' + }, + 'keyword': [ + /(?:extern|extern|global)[^;\r\n]*/i, + /(?:CPU|FLOAT|DEFAULT).*/ + ], + 'register': /\b(?:st\d|[xyz]mm\d\d?|[cdt]r\d|r\d\d?[bwd]?|[er]?[abcd]x|[abcd][hl]|[er]?(?:bp|sp|si|di)|[cdefgs]s|mm\d+)\b/i, + 'number': /(?:\b|-|(?=\$))(?:0[hx][\da-f]*\.?[\da-f]+(?:p[+-]?\d+)?|\d[\da-f]+[hx]|\$\d[\da-f]*|0[oq][0-7]+|[0-7]+[oq]|0[by][01]+|[01]+[by]|0[dt]\d+|\d*\.?\d+(?:\.?e[+-]?\d+)?[dt]?)\b/i, + 'operator': /[\[\]*+\-/%<>=&|$!,.:]/ + } + } +}); + +delete Prism.languages.purebasic['class-name']; +delete Prism.languages.purebasic['boolean']; + +Prism.languages.pbfasm = Prism.languages['purebasic']; diff --git a/components/prism-purebasic.min.js b/components/prism-purebasic.min.js new file mode 100644 index 0000000000..131123b33d --- /dev/null +++ b/components/prism-purebasic.min.js @@ -0,0 +1 @@ +Prism.languages.purebasic=Prism.languages.extend("clike",{comment:/;.*/,keyword:/\b(?:declarecdll|declaredll|compilerselect|compilercase|compilerdefault|compilerendselect|compilererror|enableexplicit|disableexplicit|not|and|or|xor|calldebugger|debuglevel|enabledebugger|disabledebugger|restore|read|includepath|includebinary|threaded|runtime|with|endwith|structureunion|endstructureunion|align|newlist|newmap|interface|endinterface|extends|enumeration|endenumeration|swap|foreach|continue|fakereturn|goto|gosub|return|break|module|endmodule|declaremodule|enddeclaremodule|declare|declarec|prototype|prototypec|enableasm|disableasm|dim|redim|data|datasection|enddatasection|to|procedurereturn|debug|default|case|select|endselect|as|import|endimport|importc|compilerif|compilerelse|compilerendif|compilerelseif|end|structure|endstructure|while|wend|for|next|step|if|else|elseif|endif|repeat|until|procedure|proceduredll|procedurec|procedurecdll|endprocedure|protected|shared|static|global|define|includefile|xincludefile|macro|endmacro)\b/i,function:/\b\w+(?:\.\w+)?\s*(?=\()/,number:/(?:\$[\da-f]+|\b-?\d*\.?\d+(?:e[+-]?\d+)?)\b/i,operator:/(?:@\*?|\?|\*)\w+|-[>-]?|\+\+?|!=?|<>?=?|==?|&&?|\|?\||[~^%?*/@]/}),Prism.languages.insertBefore("purebasic","keyword",{tag:/#\w+/,asm:{pattern:/(^\s*)!.*/m,lookbehind:!0,alias:"tag",inside:{comment:/;.*/,string:{pattern:/(["'`])(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0},"label-reference-anonymous":{pattern:/(\s*!\s*j[a-z]+\s+)@[fb]/i,lookbehind:!0,alias:"fasm-label"},"label-reference-addressed":{pattern:/(\s*!\s*j[a-z]+\s+)[A-Z._?$@][\w.?$@~#]*/i,lookbehind:!0,alias:"fasm-label"},function:{pattern:/^(\s*!\s*)[\da-z]+(?=\s|$)/im,lookbehind:!0},"function-inline":{pattern:/(\s*:\s*)[\da-z]+(?=\s)/i,lookbehind:!0,alias:"function"},label:{pattern:/^(\s*!\s*)[A-Za-z._?$@][\w.?$@~#]*(?=:)/m,lookbehind:!0,alias:"fasm-label"},keyword:[/(?:extern|extern|global)[^;\r\n]*/i,/(?:CPU|FLOAT|DEFAULT).*/],register:/\b(?:st\d|[xyz]mm\d\d?|[cdt]r\d|r\d\d?[bwd]?|[er]?[abcd]x|[abcd][hl]|[er]?(?:bp|sp|si|di)|[cdefgs]s|mm\d+)\b/i,number:/(?:\b|-|(?=\$))(?:0[hx][\da-f]*\.?[\da-f]+(?:p[+-]?\d+)?|\d[\da-f]+[hx]|\$\d[\da-f]*|0[oq][0-7]+|[0-7]+[oq]|0[by][01]+|[01]+[by]|0[dt]\d+|\d*\.?\d+(?:\.?e[+-]?\d+)?[dt]?)\b/i,operator:/[\[\]*+\-/%<>=&|$!,.:]/}}}),delete Prism.languages.purebasic["class-name"],delete Prism.languages.purebasic.boolean,Prism.languages.pbfasm=Prism.languages.purebasic; \ No newline at end of file diff --git a/examples/prism-purebasic.html b/examples/prism-purebasic.html new file mode 100644 index 0000000000..379f737dc6 --- /dev/null +++ b/examples/prism-purebasic.html @@ -0,0 +1,30 @@ +

          Note: PureBasic Examples.

          + +

          Comments

          +
          ; This is a comment
          + +

          Strings

          +
          "This a string."
          + +

          Numbers

          +
          42
          +3.14159
          +-42
          +-3.14159
          +.5
          +10.
          +2E10
          +4.2E-14
          +-3E+2
          + +

          PureBasic example

          +
          Procedure.s Test(s.s)
          +	Protected a$, b$, Result.s
          +
          +	Result = Mid(s, 1, 3)
          +
          +	ProcedureReturn Result
          +EndProcedure
          +
          +Test()
          +End
          diff --git a/plugins/autoloader/prism-autoloader.js b/plugins/autoloader/prism-autoloader.js index c791aef1a7..defb42abd4 100644 --- a/plugins/autoloader/prism-autoloader.js +++ b/plugins/autoloader/prism-autoloader.js @@ -96,6 +96,7 @@ "markup", "javascript" ], + "purebasic": "clike", "qml": "javascript", "qore": "clike", "racket": "scheme", @@ -182,6 +183,7 @@ "pcode": "peoplecode", "pq": "powerquery", "mscript": "powerquery", + "pbfasm": "purebasic", "py": "python", "rkt": "racket", "robot": "robotframework", diff --git a/plugins/autoloader/prism-autoloader.min.js b/plugins/autoloader/prism-autoloader.min.js index 8e6ef7bcc4..8411f7f2fc 100644 --- a/plugins/autoloader/prism-autoloader.min.js +++ b/plugins/autoloader/prism-autoloader.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof self&&self.Prism&&self.document&&document.createElement){var c={javascript:"clike",actionscript:"javascript",arduino:"cpp",aspnet:["markup","csharp"],bison:"c",c:"clike",csharp:"clike",cpp:"c",coffeescript:"javascript",crystal:"ruby","css-extras":"css",d:"clike",dart:"clike",django:"markup-templating",ejs:["javascript","markup-templating"],etlua:["lua","markup-templating"],erb:["ruby","markup-templating"],fsharp:"clike","firestore-security-rules":"clike",flow:"javascript",ftl:"markup-templating",glsl:"c",gml:"clike",go:"clike",groovy:"clike",haml:"ruby",handlebars:"markup-templating",haxe:"clike",hlsl:"c",java:"clike",javadoc:["markup","java","javadoclike"],jolie:"clike",jsdoc:["javascript","javadoclike"],"js-extras":"javascript","js-templates":"javascript",jsonp:"json",json5:"json",kotlin:"clike",latte:["clike","markup-templating","php"],less:"css",lilypond:"scheme",markdown:"markup","markup-templating":"markup",n4js:"javascript",nginx:"clike",objectivec:"c",opencl:"c",parser:"markup",php:["clike","markup-templating"],phpdoc:["php","javadoclike"],"php-extras":"php",plsql:"sql",processing:"clike",protobuf:"clike",pug:["markup","javascript"],qml:"javascript",qore:"clike",racket:"scheme",jsx:["markup","javascript"],tsx:["jsx","typescript"],reason:"clike",ruby:"clike",sass:"css",scss:"css",scala:"java","shell-session":"bash",smarty:"markup-templating",solidity:"clike",soy:"markup-templating",sparql:"turtle",sqf:"clike",swift:"clike",tap:"yaml",textile:"markup",tt2:["clike","markup-templating"],twig:"markup",typescript:"javascript","t4-cs":["t4-templating","csharp"],"t4-vb":["t4-templating","visual-basic"],vala:"clike",vbnet:"basic",velocity:"markup",wiki:"markup",xeora:"markup",xquery:"markup"},l={html:"markup",xml:"markup",svg:"markup",mathml:"markup",ssml:"markup",js:"javascript",g4:"antlr4",adoc:"asciidoc",shell:"bash",shortcode:"bbcode",rbnf:"bnf",conc:"concurnas",cs:"csharp",dotnet:"csharp",coffee:"coffeescript",jinja2:"django","dns-zone":"dns-zone-file",dockerfile:"docker",eta:"ejs",xlsx:"excel-formula",xls:"excel-formula",gamemakerlanguage:"gml",hs:"haskell",tex:"latex",context:"latex",ly:"lilypond",emacs:"lisp",elisp:"lisp","emacs-lisp":"lisp",md:"markdown",moon:"moonscript",n4jsd:"n4js",objc:"objectivec",objectpascal:"pascal",px:"pcaxis",pcode:"peoplecode",pq:"powerquery",mscript:"powerquery",py:"python",rkt:"racket",robot:"robotframework",rb:"ruby",sln:"solution-file",rq:"sparql",trig:"turtle",ts:"typescript",t4:"t4-cs",uscript:"unrealscript",uc:"unrealscript",vb:"visual-basic",xeoracube:"xeora",yml:"yaml"},n={},e="components/",a=Prism.util.currentScript();if(a){var t=/\bplugins\/autoloader\/prism-autoloader\.(?:min\.)js(?:\?[^\r\n/]*)?$/i,r=/(^|\/)[\w-]+\.(?:min\.)js(?:\?[^\r\n/]*)?$/i,s=a.getAttribute("data-autoloader-path");if(null!=s)e=s.trim().replace(/\/?$/,"/");else{var i=a.src;t.test(i)?e=i.replace(t,"components/"):r.test(i)&&(e=i.replace(r,"$1components/"))}}var p=Prism.plugins.autoloader={languages_path:e,use_minified:!0,loadLanguages:o};Prism.hooks.add("complete",function(e){e.element&&e.language&&!e.grammar&&"none"!==e.language&&function(e,a){e in l&&(e=l[e]);var t=(a.getAttribute("data-dependencies")||"").trim();if(!t){var r=a.parentElement;r&&"pre"===r.tagName.toLowerCase()&&(t=(r.getAttribute("data-dependencies")||"").trim())}o(t?t.split(/\s*,\s*/g):[],function(){m(e,function(){Prism.highlightElement(a)})})}(e.language,e.element)})}function o(e,a,t){"string"==typeof e&&(e=[e]);var r=e.length,s=0,i=!1;function c(){i||++s===r&&a&&a(e)}0!==r?e.forEach(function(e){m(e,c,function(){i||(i=!0,t&&t(e))})}):a&&setTimeout(a,0)}function m(a,t,r){var s=0<=a.indexOf("!");a=a.replace("!",""),a=l[a]||a;var e=function(){var e=n[a];if(e||(e=n[a]={callbacks:[]}),e.callbacks.push({success:t,error:r}),!s&&Prism.languages[a])u(a,"success");else if(!s&&e.error)u(a,"error");else if(s||!e.loading){e.loading=!0,function(e,a,t){var r=document.createElement("script");r.src=e,r.async=!0,r.onload=function(){document.body.removeChild(r),a&&a()},r.onerror=function(){document.body.removeChild(r),t&&t()},document.body.appendChild(r)}(function(e){return p.languages_path+"prism-"+e+(p.use_minified?".min":"")+".js"}(a),function(){e.loading=!1,u(a,"success")},function(){e.loading=!1,e.error=!0,u(a,"error")})}},i=c[a];i&&i.length?o(i,e,r):e()}function u(e,a){if(n[e]){for(var t=n[e].callbacks,r=0,s=t.length;r >= ++ - * + +---------------------------------------------------- + +[ + ["operator", "<"], ["operator", "<="], + ["operator", ">"], ["operator", ">="], + ["operator", "+"], ["operator", "-"], ["operator", "*"] +] + +---------------------------------------------------- + +Checks for operators. \ No newline at end of file diff --git a/tests/languages/purebasic/string_feature.test b/tests/languages/purebasic/string_feature.test new file mode 100644 index 0000000000..a34d9527ee --- /dev/null +++ b/tests/languages/purebasic/string_feature.test @@ -0,0 +1,13 @@ +"" +"foobar" + +---------------------------------------------------- + +[ + ["string", "\"\""], + ["string", "\"foobar\""] +] + +---------------------------------------------------- + +Checks for strings. \ No newline at end of file From ce0fa227a7d7bbded8a7d947a90e45ff3abf8a58 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Thu, 7 May 2020 13:40:37 +0200 Subject: [PATCH 0517/1100] Website improvements (#2053) --- extending.html | 8 +-- index.html | 16 +++--- scripts/code.js | 18 +++++++ style.css | 9 ++-- test-suite.html | 136 +++++++++++++++++++++++++----------------------- 5 files changed, 107 insertions(+), 80 deletions(-) diff --git a/extending.html b/extending.html index de25798507..be51b557f3 100644 --- a/extending.html +++ b/extending.html @@ -145,7 +145,7 @@

          Creating a new language definition

          In this example, we choose foo-bar as the id of the new language. The language id has to be unique and should work well with the language-xxxx CSS class name Prism uses to refer to language definitions. Your language id should ideally match the regular expression /^[a-z][a-z\d]*(?:-[a-z][a-z\d]*)*$/.

        • -

          Edit components.json to register the new language by adding it to the languages object. (Please note that all language entries are sorted alphabetically by title.)
          +

          Edit components.json to register the new language by adding it to the languages object. (Please note that all language entries are sorted alphabetically by title.)
          Our new entry for this example will look like this:

          "foo-bar": {
          @@ -153,7 +153,7 @@ 

          Creating a new language definition

          "owner": "Your GitHub name" }
          -

          If your language definition depends any other languages, you have to specify this here as well by adding a "require" property. E.g. "require": "clike", or "require" : ["markup", "css"]. For more information on dependencies read the declaring dependencies section.

          +

          If your language definition depends any other languages, you have to specify this here as well by adding a "require" property. E.g. "require": "clike", or "require" : ["markup", "css"]. For more information on dependencies read the declaring dependencies section.

          Note: Any changes made to components.json require a rebuild (see step 3).

        • @@ -266,7 +266,7 @@

          Dependencies

          Languages and plugins can depend on each other, so Prism has its own dependency system to declare and resolve dependencies.

          -

          Declaring dependencies

          +

          Declaring dependencies

          You declare a dependency by adding a property to the entry of your language or plugin in the components.json file. The name of the property will be dependency kind and its value will be the component id of the dependee. If multiple languages or plugins are depended upon then you can also declare an array of component ids.

          @@ -354,7 +354,7 @@

          Dependency kinds

          Note: You can declare a component as both require and modify

          -

          Resolving dependencies

          +

          Resolving dependencies

          We consider the dependencies of components an implementation detail, so they may change from release to release. Prism will usually resolve dependencies for you automatically. So you won't have to worry about dependency loading if you download a bundle or use the loadLanguages function in NodeJS, the AutoLoader, or our Babel plugin.

          diff --git a/index.html b/index.html index e8048d6f8c..24f1f99dfb 100644 --- a/index.html +++ b/index.html @@ -100,7 +100,7 @@

          Full list of features

        • Very easy to extend without modifying the code, due to Prism’s plugin architecture. Multiple hooks are scattered throughout the source.
        • Very easy to define new languages. Only thing you need is a good understanding of regular expressions
        • All styling is done through CSS, with sensible class names rather than ugly namespaced abbreviated nonsense.
        • -
        • Wide browser support: IE11, Firefox, Chrome, Safari, Opera, most Mobile browsers
        • +
        • Wide browser support: Edge, IE11, Firefox, Chrome, Safari, Opera, most Mobile browsers
        • Highlights embedded languages (e.g. CSS inside HTML, JavaScript inside HTML)
        • Highlights inline code as well, not just code blocks
        • Highlights nested languages (CSS in HTML, JavaScript in HTML)
        • @@ -115,16 +115,16 @@

          Full list of features

          Limitations

          • Any pre-existing HTML in the code will be stripped off. There are ways around it though.
          • -
          • Regex-based so it *will* fail on certain edge cases, which are documented in the known failues page.
          • +
          • Regex-based so it *will* fail on certain edge cases, which are documented in the known failures page.
          • Some of our themes have problems with certain layouts. Known cases are documented here.
          • -
          • No IE 6-10 support. If someone can read code, they are probably in the 85% of the population with a modern browser.
          • +
          • No IE 6-10 support. If someone can read code, they are probably in the 95% of the population with a modern browser.

          Basic usage

          -

          You will need to include the prism.css and prism.js files you downloaded in your page. Example: +

          You will need to include the prism.css and prism.js files you downloaded in your page. Example:

          <!DOCTYPE html>
           <html>
           <head>
          @@ -160,7 +160,7 @@ 

          Basic usage

          </script> <script src="prism.js"></script>
          -

          Usage with CDNs

          +

          Usage with CDNs

          In combination with CDNs, we recommend using the Autoloader plugin which automatically loads languages when necessary.

          @@ -179,9 +179,9 @@

          Usage with CDNs

          </body> </html>
          -

          CDNs which provide PrismJS are e.g. cdnjs and jsDelivr.

          +

          CDNs which provide PrismJS are e.g. cdnjs, jsDelivr, and UNPKG.

          -

          Usage with Webpack, Browserify, & Other Bundlers

          +

          Usage with Webpack, Browserify, & Other Bundlers

          If you want to use Prism with a bundler, install Prism with npm:

          @@ -196,7 +196,7 @@

          Usage with Webpack, Browserify, & Other Bundlers

          the minimum number of languages and plugins to satisfy your needs. See that plugin's documentation for configuration details.

          -

          Usage with Node

          +

          Usage with Node

          If you want to use Prism on the server or through the command line, Prism can be used with Node.js as well. This might be useful if you're trying to generate static HTML pages with highlighted code for environments that don't support browser-side JS, like AMP pages.

          diff --git a/scripts/code.js b/scripts/code.js index e6aad049ae..d41f88bedf 100644 --- a/scripts/code.js +++ b/scripts/code.js @@ -100,6 +100,24 @@ if (toc.children.length > 0) { })(); +/** + * Linkify h2 + */ +(function () { + $$('section h2[id]').forEach(function (h2) { + var text = h2.textContent; + h2.innerHTML = ''; + + $u.element.create('a', { + properties: { + href: window.location.pathname + '#' + h2.id + }, + contents: text, + inside: h2 + }); + }); +})(); + // calc() (function(){ if(!window.PrefixFree) return; diff --git a/style.css b/style.css index 00be1070a3..e86e07409a 100644 --- a/style.css +++ b/style.css @@ -48,11 +48,13 @@ section h1 { font-style: normal; } - section h1 > a { + section h1 > a, + section h2[id] > a { text-decoration: none; } - section h1 > a:before { + section h1 > a:before, + section h2[id] > a:before { content: '§'; position: absolute; padding: 0 .2em; @@ -62,7 +64,8 @@ section h1 { text-shadow: 0 1px white; } - section h1 > a:hover:before { + section h1 > a:hover:before, + section h2[id] > a:hover:before { color: black; background: #f1ad26; } diff --git a/test-suite.html b/test-suite.html index 11bf139d35..4d4105482f 100644 --- a/test-suite.html +++ b/test-suite.html @@ -18,6 +18,7 @@

          Running the test suite

          +

          Prism has a test suite, that ensures that the correct tokens are matched.

        @@ -27,12 +28,16 @@

        Running the test suite

        Running the test suite is simple: just call npm test.

        All test files are run in isolation. A new prism instance is created for each test case. This will slow the test runner a bit down, but we can be sure that nothing leaks into the next test case.

        -
        -

        Running tests for specific languages

        -

        To run the tests only for one language, you can use the language parameter: npm run test:languages -- --language=markup.

        -

        You can even specify multiple languages: npm run test:languages -- --language=markup --language=css.

        -
        +

        Running tests for specific languages

        + +

        To run the tests only for one language, you can use the language parameter:

        + +
        npm run test:languages -- --language=markup
        + +

        You can even specify multiple languages:

        + +
        npm run test:languages -- --language=markup --language=css
        @@ -41,59 +46,59 @@

        Writing tests

        Thank you for writing tests! Tests are awesome! They ensure, that we can improve the codebase without breaking anything. Also, this way, we can ensure that upgrading Prism is as painless as possible for you.

        You can add new tests by creating a new test case file (with the .test file extension) in the tests directory which is located at /tests/languages/${language}.

        -
        -

        Language directories

        -

        All tests are sorted into directories in the tests/languages directory. Each directory name encodes, which language you are currently testing.

        -

        All language names must match the names from the definition in components.js.

        - -

        Example 1: testing a language in isolation (default use case)

        -

        Just put your test file into the directory of the language you want to test.

        -

        So, if you want to test CSS, put your test file in /tests/languages/css to test CSS only. If you create a test case in this directory, the test runner will ensure that the css language definition including all required language definitions are correctly loaded.

        - -

        Example 2: testing language injection

        -

        If you want to test language injection, you typically need to load two or more languages where one language is the “main” language that is being tested, with all other languages being injected into it.

        -

        You need to define multiple languages by separating them using a + sign: markup+php.

        -

        The languages are loaded in order, so first markup (+ dependencies) is loaded, then php (+ dependencies). The test loader ensures that no language is loaded more than once (for example if two languages have the same dependencies).

        -

        By default the last language is the main language: php+markup will have markup as main language. This is equal to putting your code in the following code block:

        -
        ...
        +
        +	

        Language directories

        + +

        All tests are sorted into directories in the tests/languages directory. Each directory name encodes, which language you are currently testing.

        +

        All language names must match the names from the definition in components.js.

        + +

        Example 1: testing a language in isolation (default use case)

        +

        Just put your test file into the directory of the language you want to test.

        +

        So, if you want to test CSS, put your test file in /tests/languages/css to test CSS only. If you create a test case in this directory, the test runner will ensure that the css language definition including all required language definitions are correctly loaded.

        + +

        Example 2: testing language injection

        +

        If you want to test language injection, you typically need to load two or more languages where one language is the “main” language that is being tested, with all other languages being injected into it.

        +

        You need to define multiple languages by separating them using a + sign: markup+php.

        +

        The languages are loaded in order, so first markup (+ dependencies) is loaded, then php (+ dependencies). The test loader ensures that no language is loaded more than once (for example if two languages have the same dependencies).

        +

        By default the last language is the main language: php+markup will have markup as main language. This is equal to putting your code in the following code block:

        +
        ...
         <pre><code class="language-markup">
         	<!-- your code here -->
         </code><pre>
         ...
        -

        If you need to load the languages in a given order, but you don't want to use the last language as main language, you can mark the main language with an exclamation mark: php!+markup. This will use php as main language. (You can only define one main language. The test runner will fail all tests in directories with more than one main language.)

        - -

        Note: by loading multiple languages you can do integration tests (ensure that loading two or more languages together won't break anything).

        -
        - -
        -

        Creating your test case file

        -

        At first you need to create a new file in the language directory, you want to test.

        -

        Use a proper name for your test case. Please use one case of the following conventions:

        -
          -
        • issue{issueid}: reference a github issue id (example: issue588.test).
        • -
        • {featurename}_feature: group all tests to one feature in one file (example: string_interpolation_feature.test).
        • -
        • {language}_inclusion: test inclusion of one language into the other (example: markup!+css/css_inclusion.test will test CSS inclusion into markup).
        • -
        -

        You can use all conventions as a prefix, so string_interpolation_feature_inline.test is possible. But please take a minute or two to think of a proper name of your test case file. You are writing code not only for the computers, but also for your fellow developers.

        -
        - -
        -

        Writing your test

        -

        The structure of a test case file is as follows:

        -
        
        +	

        If you need to load the languages in a given order, but you don't want to use the last language as main language, you can mark the main language with an exclamation mark: php!+markup. This will use php as main language. (You can only define one main language. The test runner will fail all tests in directories with more than one main language.)

        + +

        Note: by loading multiple languages you can do integration tests (ensure that loading two or more languages together won't break anything).

        + + +

        Creating your test case file

        + +

        At first you need to create a new file in the language directory, you want to test.

        +

        Use a proper name for your test case. Please use one case of the following conventions:

        +
          +
        • issue{issueid}: reference a github issue id (example: issue588.test).
        • +
        • {featurename}_feature: group all tests to one feature in one file (example: string_interpolation_feature.test).
        • +
        • {language}_inclusion: test inclusion of one language into the other (example: markup!+css/css_inclusion.test will test CSS inclusion into markup).
        • +
        +

        You can use all conventions as a prefix, so string_interpolation_feature_inline.test is possible. But please take a minute or two to think of a proper name of your test case file. You are writing code not only for the computers, but also for your fellow developers.

        + + +

        Writing your test

        +

        The structure of a test case file is as follows:

        +
        
         ... language snippet...
         ----
         ... the simplified token stream you expect ...
        -

        Your file is built up of two or three sections, separated by ten or more dashes -, starting at the begin of the line:

        -
          -
        1. Your language snippet. The code you want to compile using Prism. (required)
        2. -
        3. The simplified token stream you expect. Needs to be valid JSON. (required)
        4. -
        5. A comment explaining the test case. (optional)
        6. -
        -

        The easiest way would be to look at an existing test file:

        -
        var a = 5;
        +	

        Your file is built up of two or three sections, separated by ten or more dashes -, starting at the begin of the line:

        +
          +
        1. Your language snippet. The code you want to compile using Prism. (required)
        2. +
        3. The simplified token stream you expect. Needs to be valid JSON. (required)
        4. +
        5. A comment explaining the test case. (optional)
        6. +
        +

        The easiest way would be to look at an existing test file:

        +
        var a = 5;
         
         ----------------------------------------------------
         
        @@ -108,22 +113,23 @@ 

        Writing your test

        ---------------------------------------------------- This is a comment explaining this test case.
        -
        - -
        -

        Explaining the simplified token stream

        -

        While compiling, Prism transforms your source code into a token stream. This is basically a tree of nested tokens (or arrays, or strings).

        -

        As these trees are hard to write by hand, the test runner uses a simplified version of it.

        -

        It uses the following rules:

        -
          -
        • Token objects are transformed into an array: [token.type, token.content] (whereas token.content can be a nested structure).
        • -
        • All strings that are either empty or only contain whitespace, are removed from the token stream.
        • -
        • All empty structures are removed.
        • -
        -

        To get a pretty-printed version of the simplified token stream of a failed test, add the --pretty modifier. Keep in mind that the pretty-printed token stream is indented using spaces, you may need to convert these to tabs. (Most editors today have an option which handles the conversion for you.)
        - E.g. npm run test:languages -- --pretty.

        -

        For further information: reading the tests of the test runner (tests/testrunner-tests.js) will help you understand the transformation.

        -
        + + +

        Explaining the simplified token stream

        + +

        While compiling, Prism transforms your source code into a token stream. This is basically a tree of nested tokens (or arrays, or strings).

        +

        As these trees are hard to write by hand, the test runner uses a simplified version of it.

        +

        It uses the following rules:

        +
          +
        • Token objects are transformed into an array: [token.type, token.content] (whereas token.content can be a nested structure).
        • +
        • All strings that are either empty or only contain whitespace, are removed from the token stream.
        • +
        • All empty structures are removed.
        • +
        +

        To get a pretty-printed version of the simplified token stream of a failed test, add the --pretty modifier. Keep in mind that the pretty-printed token stream is indented using spaces, you may need to convert these to tabs. (Most editors today have an option which handles the conversion for you.)

        + +
        npm run test:languages -- --pretty
        + +

        For further information: reading the tests of the test runner (tests/testrunner-tests.js) will help you understand the transformation.

        From 2c10ef8a3ab9abb416d277d40d39ebe491ca0127 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=A3=E9=87=8C=E5=A5=BD=E8=84=8F=E4=B8=8D=E5=8F=AF?= =?UTF-8?q?=E4=BB=A5?= <453491931@qq.com> Date: Thu, 7 May 2020 19:58:29 +0800 Subject: [PATCH 0518/1100] Stylus: New tokens and other improvements. (#2368) This adds `color`, `unit`, and `entity` tokens. The `number` and `operator` patterns were also improved. --- components/prism-stylus.js | 28 +++++++++++++++++-- components/prism-stylus.min.js | 2 +- .../stylus+pug/stylus_inclusion.test | 2 +- tests/languages/stylus/func_feature.test | 2 +- tests/languages/stylus/important_feature.test | 2 +- tests/languages/stylus/number_feature.test | 6 ++-- .../stylus/property-declaration_feature.test | 9 ++++-- tests/languages/stylus/selector_feature.test | 10 +++---- 8 files changed, 45 insertions(+), 16 deletions(-) diff --git a/components/prism-stylus.js b/components/prism-stylus.js index 9ebc873632..fb738429e1 100644 --- a/components/prism-stylus.js +++ b/components/prism-stylus.js @@ -1,4 +1,14 @@ (function (Prism) { + var unit = { + pattern: /(\d)(?:%|[a-z]+)/, + lookbehind: true + }; + // 123 -123 .123 -.123 12.3 -12.3 + var number = { + pattern: /(^|[^\w.-])-?\d*\.?\d+/, + lookbehind: true + }; + var inside = { 'comment': { pattern: /(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/, @@ -20,13 +30,27 @@ lookbehind: true }, 'hexcode': /#[\da-f]{3,6}/i, - 'number': /\b\d+(?:\.\d+)?%?/, + 'color': [ + /\b(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)\b/i, + { + pattern: /\b(?:rgb|hsl)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:rgb|hsl)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i, + inside: { + 'unit': unit, + 'number': number, + 'function': /[\w-]+(?=\()/, + 'punctuation': /[(),]/ + } + } + ], + 'entity': /\\[\da-f]{1,8}/i, + 'unit': unit, 'boolean': /\b(?:true|false)\b/, 'operator': [ // We want non-word chars around "-" because it is // accepted in property names. - /~|[+!\/%<>?=]=?|[-:]=|\*[*=]?|\.+|&&|\|\||\B-\B|\b(?:and|in|is(?: a| defined| not|nt)?|not|or)\b/ + /~|[+!\/%<>?=]=?|[-:]=|\*[*=]?|\.{2,3}|&&|\|\||\B-\B|\b(?:and|in|is(?: a| defined| not|nt)?|not|or)\b/ ], + 'number': number, 'punctuation': /[{}()\[\];:,]/ }; diff --git a/components/prism-stylus.min.js b/components/prism-stylus.min.js index 002e32893d..2c63c58159 100644 --- a/components/prism-stylus.min.js +++ b/components/prism-stylus.min.js @@ -1 +1 @@ -!function(n){var t={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0},url:{pattern:/url\((["']?).*?\1\)/i,greedy:!0},string:{pattern:/("|')(?:(?!\1)[^\\\r\n]|\\(?:\r\n|[\s\S]))*\1/,greedy:!0},interpolation:null,func:null,important:/\B!(?:important|optional)\b/i,keyword:{pattern:/(^|\s+)(?:(?:if|else|for|return|unless)(?=\s+|$)|@[\w-]+)/,lookbehind:!0},hexcode:/#[\da-f]{3,6}/i,number:/\b\d+(?:\.\d+)?%?/,boolean:/\b(?:true|false)\b/,operator:[/~|[+!\/%<>?=]=?|[-:]=|\*[*=]?|\.+|&&|\|\||\B-\B|\b(?:and|in|is(?: a| defined| not|nt)?|not|or)\b/],punctuation:/[{}()\[\];:,]/};t.interpolation={pattern:/\{[^\r\n}:]+\}/,alias:"variable",inside:{delimiter:{pattern:/^{|}$/,alias:"punctuation"},rest:t}},t.func={pattern:/[\w-]+\([^)]*\).*/,inside:{function:/^[^(]+/,rest:t}},n.languages.stylus={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0},"atrule-declaration":{pattern:/(^\s*)@.+/m,lookbehind:!0,inside:{atrule:/^@[\w-]+/,rest:t}},"variable-declaration":{pattern:/(^[ \t]*)[\w$-]+\s*.?=[ \t]*(?:(?:\{[^}]*\}|.+)|$)/m,lookbehind:!0,inside:{variable:/^\S+/,rest:t}},statement:{pattern:/(^[ \t]*)(?:if|else|for|return|unless)[ \t]+.+/m,lookbehind:!0,inside:{keyword:/^\S+/,rest:t}},"property-declaration":{pattern:/((?:^|\{)([ \t]*))(?:[\w-]|\{[^}\r\n]+\})+(?:\s*:\s*|[ \t]+)[^{\r\n]*(?:;|[^{\r\n,](?=$)(?!(?:\r?\n|\r)(?:\{|\2[ \t]+)))/m,lookbehind:!0,greedy:!0,inside:{property:{pattern:/^[^\s:]+/,inside:{interpolation:t.interpolation}},rest:t}},selector:{pattern:/(^[ \t]*)(?:(?=\S)(?:[^{}\r\n:()]|::?[\w-]+(?:\([^)\r\n]*\))?|\{[^}\r\n]+\})+)(?:(?:\r?\n|\r)(?:\1(?:(?=\S)(?:[^{}\r\n:()]|::?[\w-]+(?:\([^)\r\n]*\))?|\{[^}\r\n]+\})+)))*(?:,$|\{|(?=(?:\r?\n|\r)(?:\{|\1[ \t]+)))/m,lookbehind:!0,inside:{interpolation:t.interpolation,punctuation:/[{},]/}},func:t.func,string:t.string,interpolation:t.interpolation,punctuation:/[{}()\[\];:.]/}}(Prism); \ No newline at end of file +!function(e){var n={pattern:/(\d)(?:%|[a-z]+)/,lookbehind:!0},r={pattern:/(^|[^\w.-])-?\d*\.?\d+/,lookbehind:!0},i={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0},url:{pattern:/url\((["']?).*?\1\)/i,greedy:!0},string:{pattern:/("|')(?:(?!\1)[^\\\r\n]|\\(?:\r\n|[\s\S]))*\1/,greedy:!0},interpolation:null,func:null,important:/\B!(?:important|optional)\b/i,keyword:{pattern:/(^|\s+)(?:(?:if|else|for|return|unless)(?=\s+|$)|@[\w-]+)/,lookbehind:!0},hexcode:/#[\da-f]{3,6}/i,color:[/\b(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)\b/i,{pattern:/\b(?:rgb|hsl)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:rgb|hsl)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,inside:{unit:n,number:r,function:/[\w-]+(?=\()/,punctuation:/[(),]/}}],entity:/\\[\da-f]{1,8}/i,unit:n,boolean:/\b(?:true|false)\b/,operator:[/~|[+!\/%<>?=]=?|[-:]=|\*[*=]?|\.{2,3}|&&|\|\||\B-\B|\b(?:and|in|is(?: a| defined| not|nt)?|not|or)\b/],number:r,punctuation:/[{}()\[\];:,]/};i.interpolation={pattern:/\{[^\r\n}:]+\}/,alias:"variable",inside:{delimiter:{pattern:/^{|}$/,alias:"punctuation"},rest:i}},i.func={pattern:/[\w-]+\([^)]*\).*/,inside:{function:/^[^(]+/,rest:i}},e.languages.stylus={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0},"atrule-declaration":{pattern:/(^\s*)@.+/m,lookbehind:!0,inside:{atrule:/^@[\w-]+/,rest:i}},"variable-declaration":{pattern:/(^[ \t]*)[\w$-]+\s*.?=[ \t]*(?:(?:\{[^}]*\}|.+)|$)/m,lookbehind:!0,inside:{variable:/^\S+/,rest:i}},statement:{pattern:/(^[ \t]*)(?:if|else|for|return|unless)[ \t]+.+/m,lookbehind:!0,inside:{keyword:/^\S+/,rest:i}},"property-declaration":{pattern:/((?:^|\{)([ \t]*))(?:[\w-]|\{[^}\r\n]+\})+(?:\s*:\s*|[ \t]+)[^{\r\n]*(?:;|[^{\r\n,](?=$)(?!(?:\r?\n|\r)(?:\{|\2[ \t]+)))/m,lookbehind:!0,greedy:!0,inside:{property:{pattern:/^[^\s:]+/,inside:{interpolation:i.interpolation}},rest:i}},selector:{pattern:/(^[ \t]*)(?:(?=\S)(?:[^{}\r\n:()]|::?[\w-]+(?:\([^)\r\n]*\))?|\{[^}\r\n]+\})+)(?:(?:\r?\n|\r)(?:\1(?:(?=\S)(?:[^{}\r\n:()]|::?[\w-]+(?:\([^)\r\n]*\))?|\{[^}\r\n]+\})+)))*(?:,$|\{|(?=(?:\r?\n|\r)(?:\{|\1[ \t]+)))/m,lookbehind:!0,inside:{interpolation:i.interpolation,punctuation:/[{},]/}},func:i.func,string:i.string,interpolation:i.interpolation,punctuation:/[{}()\[\];:.]/}}(Prism); \ No newline at end of file diff --git a/tests/languages/stylus+pug/stylus_inclusion.test b/tests/languages/stylus+pug/stylus_inclusion.test index 3c7c8d2574..d154ab2e75 100644 --- a/tests/languages/stylus+pug/stylus_inclusion.test +++ b/tests/languages/stylus+pug/stylus_inclusion.test @@ -10,7 +10,7 @@ ["variable", "font-size"], ["operator", "="], ["number", "14"], - "px" + ["unit", "px"] ]] ]] ] diff --git a/tests/languages/stylus/func_feature.test b/tests/languages/stylus/func_feature.test index 7f2c346774..59ad2362c0 100644 --- a/tests/languages/stylus/func_feature.test +++ b/tests/languages/stylus/func_feature.test @@ -33,7 +33,7 @@ form input[type=button] ["function", "border-radius"], ["punctuation", "("], ["number", "5"], - "px", + ["unit", "px"], ["punctuation", ")"] ]], ["property-declaration", [ diff --git a/tests/languages/stylus/important_feature.test b/tests/languages/stylus/important_feature.test index 225c1e0539..44c9fdbe8f 100644 --- a/tests/languages/stylus/important_feature.test +++ b/tests/languages/stylus/important_feature.test @@ -7,7 +7,7 @@ color: red !important ["property-declaration", [ ["property", ["color"]], ["punctuation", ":"], - " red ", + ["color", "red"], ["important", "!important"] ]], ["atrule-declaration", [ diff --git a/tests/languages/stylus/number_feature.test b/tests/languages/stylus/number_feature.test index f3a0710903..61229b92ac 100644 --- a/tests/languages/stylus/number_feature.test +++ b/tests/languages/stylus/number_feature.test @@ -18,12 +18,14 @@ bar = 1.5% ["property-declaration", [ ["property", ["width"]], ["punctuation", ":"], - ["number", "23%"] + ["number", "23"], + ["unit", "%"] ]], ["variable-declaration", [ ["variable", "bar"], ["operator", "="], - ["number", "1.5%"] + ["number", "1.5"], + ["unit", "%"] ]] ] diff --git a/tests/languages/stylus/property-declaration_feature.test b/tests/languages/stylus/property-declaration_feature.test index ff42f035dd..d4cd649639 100644 --- a/tests/languages/stylus/property-declaration_feature.test +++ b/tests/languages/stylus/property-declaration_feature.test @@ -2,6 +2,7 @@ div width 40px color: red background: blue; + animation-name test1, animation4 div { background-{foo}: bar; @@ -21,14 +22,16 @@ comment [ ["selector", ["div"]], ["property-declaration", [ - ["property", ["width"]], ["number", "40"], "px" + ["property", ["width"]], ["number", "40"], ["unit", "px"] ]], ["property-declaration", [ - ["property", ["color"]], ["punctuation", ":"], " red" + ["property", ["color"]], ["punctuation", ":"], ["color", "red"] ]], ["property-declaration", [ - ["property", ["background"]], ["punctuation", ":"], " blue", ["punctuation", ";"] + ["property", ["background"]], ["punctuation", ":"], ["color", "blue"], ["punctuation", ";"] ]], + ["property-declaration", [ + ["property", ["animation-name"]], " test1", ["punctuation", ","], " animation4"]], ["selector", ["div ", ["punctuation", "{"]]], ["property-declaration", [ ["property", [ diff --git a/tests/languages/stylus/selector_feature.test b/tests/languages/stylus/selector_feature.test index 1908c4bed7..3868dfcaa3 100644 --- a/tests/languages/stylus/selector_feature.test +++ b/tests/languages/stylus/selector_feature.test @@ -22,15 +22,15 @@ color red [ ["selector", ["div\r\nspan[foo=bar]"]], - ["property-declaration", [["property", ["color"]], " red"]], + ["property-declaration", [["property", ["color"]], ["color", "red"]]], ["selector", ["div input", ["punctuation", ","], "\r\ninput:nth-child(2n)"]], - ["property-declaration", [["property", ["color"]], " red"]], + ["property-declaration", [["property", ["color"]], ["color", "red"]]], ["selector", ["#foo"]], ["selector", [".bar::before"]], - ["property-declaration", [["property", ["color"]], " red"]], + ["property-declaration", [["property", ["color"]], ["color", "red"]]], ["selector", ["#foo"]], ["selector", [".bar ", ["punctuation", "{"]]], - ["property-declaration", [["property", ["color"]], " red"]], + ["property-declaration", [["property", ["color"]], ["color", "red"]]], ["punctuation", "}"], ["selector", [ ["interpolation", [ @@ -41,7 +41,7 @@ color red ]], ":hover" ]], - ["property-declaration", [["property", ["color"]], " red"]] + ["property-declaration", [["property", ["color"]], ["color", "red"]]] ] ---------------------------------------------------- From eb82e80438e622ccc511303dbf62c657b7ab7a54 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Thu, 7 May 2020 21:35:08 +0200 Subject: [PATCH 0519/1100] Line Highlight: Added linkable line numbers (#2328) This makes individual line numbers clickable creating a link to that specific line for that specific code block. --- plugins/line-highlight/index.html | 11 +++ .../line-highlight/prism-line-highlight.css | 10 +++ .../line-highlight/prism-line-highlight.js | 85 +++++++++++++++++-- .../prism-line-highlight.min.js | 2 +- plugins/line-numbers/prism-line-numbers.css | 1 - 5 files changed, 98 insertions(+), 11 deletions(-) diff --git a/plugins/line-highlight/index.html b/plugins/line-highlight/index.html index 5c37fb7eb4..2a974ea40b 100644 --- a/plugins/line-highlight/index.html +++ b/plugins/line-highlight/index.html @@ -9,6 +9,7 @@ + @@ -51,6 +52,8 @@

        How to use

        You can also link to specific lines on any code snippet, by using the following as a url hash: #{element-id}.{lines} where {element-id} is the id of the <pre> element and {lines} is one or more lines or line ranges that follow the format outlined above. For example, if there is an element with id="play" on the page, you can link to lines 5-6 by linking to #play.5-6

        + +

        If line numbers are also enabled for a code block and the <pre> element has an id, you can add the linkable-line-numbers class to the <pre> element. This will make all line numbers clickable and when clicking any line number, it will change the hash of the current page to link to that specific line.

        @@ -69,12 +72,20 @@

        Line 43, starting from line 41

        
         
         	

        Linking example

        + +

        With line numbers

        +
        
        +
        +	

        With linkable line numbers

        +
        
        +
         
        + diff --git a/plugins/line-highlight/prism-line-highlight.css b/plugins/line-highlight/prism-line-highlight.css index 6058db44ac..1262b9a342 100644 --- a/plugins/line-highlight/prism-line-highlight.css +++ b/plugins/line-highlight/prism-line-highlight.css @@ -47,3 +47,13 @@ pre[data-line] { .line-numbers .line-highlight:after { content: none; } + +pre[id].linkable-line-numbers span.line-numbers-rows { + pointer-events: all; +} +pre[id].linkable-line-numbers span.line-numbers-rows > span:before { + cursor: pointer; +} +pre[id].linkable-line-numbers span.line-numbers-rows > span:hover:before { + background-color: rgba(128, 128, 128, .2); +} diff --git a/plugins/line-highlight/prism-line-highlight.js b/plugins/line-highlight/prism-line-highlight.js index bebbcbf1cf..5f0a5e0ef1 100644 --- a/plugins/line-highlight/prism-line-highlight.js +++ b/plugins/line-highlight/prism-line-highlight.js @@ -4,15 +4,33 @@ return; } - function $$(expr, con) { - return Array.prototype.slice.call((con || document).querySelectorAll(expr)); + /** + * @param {string} selector + * @param {ParentNode} [container] + * @returns {HTMLElement[]} + */ + function $$(selector, container) { + return Array.prototype.slice.call((container || document).querySelectorAll(selector)); } + /** + * Returns whether the given element has the given class. + * + * @param {Element} element + * @param {string} className + * @returns {boolean} + */ function hasClass(element, className) { className = " " + className + " "; return (" " + element.className + " ").replace(/[\n\t]/g, " ").indexOf(className) > -1 } + /** + * Calls the given function. + * + * @param {() => any} func + * @returns {void} + */ function callFunction(func) { func(); } @@ -26,8 +44,8 @@ var d = document.createElement('div'); d.style.fontSize = '13px'; d.style.lineHeight = '1.5'; - d.style.padding = 0; - d.style.border = 0; + d.style.padding = '0'; + d.style.border = '0'; d.innerHTML = ' 
         '; document.body.appendChild(d); // Browsers that round the line-height should have offsetHeight === 38 @@ -53,7 +71,7 @@ function highlightLines(pre, lines, classes) { lines = typeof lines === 'string' ? lines : pre.getAttribute('data-line'); - var ranges = lines.replace(/\s+/g, '').split(','); + var ranges = lines.replace(/\s+/g, '').split(',').filter(Boolean); var offset = +pre.getAttribute('data-line-offset') || 0; var parseMethod = isLineHeightRounded() ? parseInt : parseFloat; @@ -68,6 +86,7 @@ var start = +range[0]; var end = +range[1] || start; + /** @type {HTMLElement} */ var line = pre.querySelector('.line-highlight[data-range="' + currentRange + '"]') || document.createElement('div'); mutateActions.push(function () { @@ -115,11 +134,58 @@ }); }); + var id = pre.id; + if (hasLineNumbers && id) { + // This implements linkable line numbers. Linkable line numbers use Line Highlight to create a link to a + // specific line. For this to work, the pre element has to: + // 1) have line numbers, + // 2) have the `linkable-line-numbers` class or an ascendant that has that class, and + // 3) have an id. + + var linkableLineNumbersClass = 'linkable-line-numbers'; + var linkableLineNumbers = false; + var node = pre; + while (node) { + if (hasClass(node, linkableLineNumbersClass)) { + linkableLineNumbers = true; + break; + } + node = node.parentElement; + } + + if (linkableLineNumbers) { + if (!hasClass(pre, linkableLineNumbersClass)) { + // add class to pre + mutateActions.push(function () { + pre.className = (pre.className + ' ' + linkableLineNumbersClass).trim(); + }); + } + + var start = parseInt(pre.getAttribute('data-start') || '1'); + + // iterate all line number spans + $$('.line-numbers-rows > span', pre).forEach(function (lineSpan, i) { + var lineNumber = i + start; + lineSpan.onclick = function () { + var hash = id + '.' + lineNumber; + + // this will prevent scrolling since the span is obviously in view + scrollIntoView = false; + location.hash = hash; + setTimeout(function () { + scrollIntoView = true; + }, 1); + }; + }); + } + } + return function () { mutateActions.forEach(callFunction); }; } + var scrollIntoView = true; function applyHash() { var hash = location.hash.slice(1); @@ -148,7 +214,9 @@ var mutateDom = highlightLines(pre, range, 'temporary '); mutateDom(); - document.querySelector('.temporary.line-highlight').scrollIntoView(); + if (scrollIntoView) { + document.querySelector('.temporary.line-highlight').scrollIntoView(); + } } var fakeTimer = 0; // Hack to limit the number of times applyHash() runs @@ -203,9 +271,8 @@ window.addEventListener('hashchange', applyHash); window.addEventListener('resize', function () { - var actions = []; - $$('pre[data-line]').forEach(function (pre) { - actions.push(highlightLines(pre)); + var actions = $$('pre[data-line]').map(function (pre) { + return highlightLines(pre); }); actions.forEach(callFunction); }); diff --git a/plugins/line-highlight/prism-line-highlight.min.js b/plugins/line-highlight/prism-line-highlight.min.js index adfe7f3738..adf8d37755 100644 --- a/plugins/line-highlight/prism-line-highlight.min.js +++ b/plugins/line-highlight/prism-line-highlight.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof self&&self.Prism&&self.document&&document.querySelector){var t,n=function(){if(void 0===t){var e=document.createElement("div");e.style.fontSize="13px",e.style.lineHeight="1.5",e.style.padding=0,e.style.border=0,e.innerHTML=" 
         ",document.body.appendChild(e),t=38===e.offsetHeight,document.body.removeChild(e)}return t},a=0;Prism.hooks.add("before-sanity-check",function(e){var t=e.element.parentNode,n=t&&t.getAttribute("data-line");if(t&&n&&/pre/i.test(t.nodeName)){var i=0;r(".line-highlight",t).forEach(function(e){i+=e.textContent.length,e.parentNode.removeChild(e)}),i&&/^( \n)+$/.test(e.code.slice(-i))&&(e.code=e.code.slice(0,-i))}}),Prism.hooks.add("complete",function e(t){var n=t.element.parentNode,i=n&&n.getAttribute("data-line");if(n&&i&&/pre/i.test(n.nodeName)){clearTimeout(a);var r=Prism.plugins.lineNumbers,o=t.plugins&&t.plugins.lineNumbers;if(l(n,"line-numbers")&&r&&!o)Prism.hooks.add("line-numbers",e);else s(n,i)(),a=setTimeout(u,1)}}),window.addEventListener("hashchange",u),window.addEventListener("resize",function(){var t=[];r("pre[data-line]").forEach(function(e){t.push(s(e))}),t.forEach(i)})}function r(e,t){return Array.prototype.slice.call((t||document).querySelectorAll(e))}function l(e,t){return t=" "+t+" ",-1<(" "+e.className+" ").replace(/[\n\t]/g," ").indexOf(t)}function i(e){e()}function s(u,e,d){var t=(e="string"==typeof e?e:u.getAttribute("data-line")).replace(/\s+/g,"").split(","),c=+u.getAttribute("data-line-offset")||0,f=(n()?parseInt:parseFloat)(getComputedStyle(u).lineHeight),h=l(u,"line-numbers"),p=h?u:u.querySelector("code")||u,m=[];return t.forEach(function(e){var t=e.split("-"),n=+t[0],i=+t[1]||n,r=u.querySelector('.line-highlight[data-range="'+e+'"]')||document.createElement("div");if(m.push(function(){r.setAttribute("aria-hidden","true"),r.setAttribute("data-range",e),r.className=(d||"")+" line-highlight"}),h&&Prism.plugins.lineNumbers){var o=Prism.plugins.lineNumbers.getLine(u,n),a=Prism.plugins.lineNumbers.getLine(u,i);if(o){var l=o.offsetTop+"px";m.push(function(){r.style.top=l})}if(a){var s=a.offsetTop-o.offsetTop+a.offsetHeight+"px";m.push(function(){r.style.height=s})}}else m.push(function(){r.setAttribute("data-start",n),n ",document.body.appendChild(e),t=38===e.offsetHeight,document.body.removeChild(e)}return t},l=!0,a=0;Prism.hooks.add("before-sanity-check",function(e){var t=e.element.parentNode,n=t&&t.getAttribute("data-line");if(t&&n&&/pre/i.test(t.nodeName)){var i=0;g(".line-highlight",t).forEach(function(e){i+=e.textContent.length,e.parentNode.removeChild(e)}),i&&/^( \n)+$/.test(e.code.slice(-i))&&(e.code=e.code.slice(0,-i))}}),Prism.hooks.add("complete",function e(t){var n=t.element.parentNode,i=n&&n.getAttribute("data-line");if(n&&i&&/pre/i.test(n.nodeName)){clearTimeout(a);var r=Prism.plugins.lineNumbers,o=t.plugins&&t.plugins.lineNumbers;if(b(n,"line-numbers")&&r&&!o)Prism.hooks.add("line-numbers",e);else u(n,i)(),a=setTimeout(c,1)}}),window.addEventListener("hashchange",c),window.addEventListener("resize",function(){g("pre[data-line]").map(function(e){return u(e)}).forEach(v)})}function g(e,t){return Array.prototype.slice.call((t||document).querySelectorAll(e))}function b(e,t){return t=" "+t+" ",-1<(" "+e.className+" ").replace(/[\n\t]/g," ").indexOf(t)}function v(e){e()}function u(u,e,c){var t=(e="string"==typeof e?e:u.getAttribute("data-line")).replace(/\s+/g,"").split(",").filter(Boolean),d=+u.getAttribute("data-line-offset")||0,f=(s()?parseInt:parseFloat)(getComputedStyle(u).lineHeight),m=b(u,"line-numbers"),p=m?u:u.querySelector("code")||u,h=[];t.forEach(function(e){var t=e.split("-"),n=+t[0],i=+t[1]||n,r=u.querySelector('.line-highlight[data-range="'+e+'"]')||document.createElement("div");if(h.push(function(){r.setAttribute("aria-hidden","true"),r.setAttribute("data-range",e),r.className=(c||"")+" line-highlight"}),m&&Prism.plugins.lineNumbers){var o=Prism.plugins.lineNumbers.getLine(u,n),a=Prism.plugins.lineNumbers.getLine(u,i);if(o){var s=o.offsetTop+"px";h.push(function(){r.style.top=s})}if(a){var l=a.offsetTop-o.offsetTop+a.offsetHeight+"px";h.push(function(){r.style.height=l})}}else h.push(function(){r.setAttribute("data-start",n),n span",u).forEach(function(e,t){var n=t+a;e.onclick=function(){var e=i+"."+n;l=!1,location.hash=e,setTimeout(function(){l=!0},1)}})}}return function(){h.forEach(v)}}function c(){var e=location.hash.slice(1);g(".temporary.line-highlight").forEach(function(e){e.parentNode.removeChild(e)});var t=(e.match(/\.([\d,-]+)$/)||[,""])[1];if(t&&!document.getElementById(e)){var n=e.slice(0,e.lastIndexOf(".")),i=document.getElementById(n);if(i)i.hasAttribute("data-line")||i.setAttribute("data-line",""),u(i,t,"temporary ")(),l&&document.querySelector(".temporary.line-highlight").scrollIntoView()}}}(); \ No newline at end of file diff --git a/plugins/line-numbers/prism-line-numbers.css b/plugins/line-numbers/prism-line-numbers.css index 08b29ed615..57705307cb 100644 --- a/plugins/line-numbers/prism-line-numbers.css +++ b/plugins/line-numbers/prism-line-numbers.css @@ -27,7 +27,6 @@ pre[class*="language-"].line-numbers > code { } .line-numbers-rows > span { - pointer-events: none; display: block; counter-increment: linenumber; } From 6d663b6e6e9ba86c9f4bad34732527952efb97f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=A3=E9=87=8C=E5=A5=BD=E8=84=8F=E4=B8=8D=E5=8F=AF?= =?UTF-8?q?=E4=BB=A5?= <453491931@qq.com> Date: Fri, 8 May 2020 04:17:54 +0800 Subject: [PATCH 0520/1100] Stylus: Fixed comments breaking declarations + minor improvements (#2372) Comments broke URLs in all non-greedy declarations. Comments are now matched as part of these declarations. This also adds support for comments inside selectors. --- components/prism-stylus.js | 11 ++++++----- components/prism-stylus.min.js | 2 +- .../stylus/atrule-declaration_feature.test | 13 +++++++++++++ tests/languages/stylus/keyword_feature.test | 8 ++++++++ tests/languages/stylus/selector_feature.test | 7 ++++++- .../stylus/variable-declaration_feature.test | 7 +++++++ 6 files changed, 41 insertions(+), 7 deletions(-) diff --git a/components/prism-stylus.js b/components/prism-stylus.js index fb738429e1..18d014dbef 100644 --- a/components/prism-stylus.js +++ b/components/prism-stylus.js @@ -74,10 +74,6 @@ }; Prism.languages.stylus = { - 'comment': { - pattern: /(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/, - lookbehind: true - }, 'atrule-declaration': { pattern: /(^\s*)@.+/m, lookbehind: true, @@ -109,7 +105,6 @@ 'property-declaration': { pattern: /((?:^|\{)([ \t]*))(?:[\w-]|\{[^}\r\n]+\})+(?:\s*:\s*|[ \t]+)[^{\r\n]*(?:;|[^{\r\n,](?=$)(?!(?:\r?\n|\r)(?:\{|\2[ \t]+)))/m, lookbehind: true, - greedy: true, inside: { 'property': { pattern: /^[^\s:]+/, @@ -131,12 +126,18 @@ lookbehind: true, inside: { 'interpolation': inside.interpolation, + 'comment': inside.comment, 'punctuation': /[{},]/ } }, 'func': inside.func, 'string': inside.string, + 'comment': { + pattern: /(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/, + lookbehind: true, + greedy: true + }, 'interpolation': inside.interpolation, 'punctuation': /[{}()\[\];:.]/ }; diff --git a/components/prism-stylus.min.js b/components/prism-stylus.min.js index 2c63c58159..f70528cf87 100644 --- a/components/prism-stylus.min.js +++ b/components/prism-stylus.min.js @@ -1 +1 @@ -!function(e){var n={pattern:/(\d)(?:%|[a-z]+)/,lookbehind:!0},r={pattern:/(^|[^\w.-])-?\d*\.?\d+/,lookbehind:!0},i={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0},url:{pattern:/url\((["']?).*?\1\)/i,greedy:!0},string:{pattern:/("|')(?:(?!\1)[^\\\r\n]|\\(?:\r\n|[\s\S]))*\1/,greedy:!0},interpolation:null,func:null,important:/\B!(?:important|optional)\b/i,keyword:{pattern:/(^|\s+)(?:(?:if|else|for|return|unless)(?=\s+|$)|@[\w-]+)/,lookbehind:!0},hexcode:/#[\da-f]{3,6}/i,color:[/\b(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)\b/i,{pattern:/\b(?:rgb|hsl)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:rgb|hsl)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,inside:{unit:n,number:r,function:/[\w-]+(?=\()/,punctuation:/[(),]/}}],entity:/\\[\da-f]{1,8}/i,unit:n,boolean:/\b(?:true|false)\b/,operator:[/~|[+!\/%<>?=]=?|[-:]=|\*[*=]?|\.{2,3}|&&|\|\||\B-\B|\b(?:and|in|is(?: a| defined| not|nt)?|not|or)\b/],number:r,punctuation:/[{}()\[\];:,]/};i.interpolation={pattern:/\{[^\r\n}:]+\}/,alias:"variable",inside:{delimiter:{pattern:/^{|}$/,alias:"punctuation"},rest:i}},i.func={pattern:/[\w-]+\([^)]*\).*/,inside:{function:/^[^(]+/,rest:i}},e.languages.stylus={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0},"atrule-declaration":{pattern:/(^\s*)@.+/m,lookbehind:!0,inside:{atrule:/^@[\w-]+/,rest:i}},"variable-declaration":{pattern:/(^[ \t]*)[\w$-]+\s*.?=[ \t]*(?:(?:\{[^}]*\}|.+)|$)/m,lookbehind:!0,inside:{variable:/^\S+/,rest:i}},statement:{pattern:/(^[ \t]*)(?:if|else|for|return|unless)[ \t]+.+/m,lookbehind:!0,inside:{keyword:/^\S+/,rest:i}},"property-declaration":{pattern:/((?:^|\{)([ \t]*))(?:[\w-]|\{[^}\r\n]+\})+(?:\s*:\s*|[ \t]+)[^{\r\n]*(?:;|[^{\r\n,](?=$)(?!(?:\r?\n|\r)(?:\{|\2[ \t]+)))/m,lookbehind:!0,greedy:!0,inside:{property:{pattern:/^[^\s:]+/,inside:{interpolation:i.interpolation}},rest:i}},selector:{pattern:/(^[ \t]*)(?:(?=\S)(?:[^{}\r\n:()]|::?[\w-]+(?:\([^)\r\n]*\))?|\{[^}\r\n]+\})+)(?:(?:\r?\n|\r)(?:\1(?:(?=\S)(?:[^{}\r\n:()]|::?[\w-]+(?:\([^)\r\n]*\))?|\{[^}\r\n]+\})+)))*(?:,$|\{|(?=(?:\r?\n|\r)(?:\{|\1[ \t]+)))/m,lookbehind:!0,inside:{interpolation:i.interpolation,punctuation:/[{},]/}},func:i.func,string:i.string,interpolation:i.interpolation,punctuation:/[{}()\[\];:.]/}}(Prism); \ No newline at end of file +!function(e){var n={pattern:/(\d)(?:%|[a-z]+)/,lookbehind:!0},r={pattern:/(^|[^\w.-])-?\d*\.?\d+/,lookbehind:!0},i={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0},url:{pattern:/url\((["']?).*?\1\)/i,greedy:!0},string:{pattern:/("|')(?:(?!\1)[^\\\r\n]|\\(?:\r\n|[\s\S]))*\1/,greedy:!0},interpolation:null,func:null,important:/\B!(?:important|optional)\b/i,keyword:{pattern:/(^|\s+)(?:(?:if|else|for|return|unless)(?=\s+|$)|@[\w-]+)/,lookbehind:!0},hexcode:/#[\da-f]{3,6}/i,color:[/\b(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)\b/i,{pattern:/\b(?:rgb|hsl)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:rgb|hsl)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,inside:{unit:n,number:r,function:/[\w-]+(?=\()/,punctuation:/[(),]/}}],entity:/\\[\da-f]{1,8}/i,unit:n,boolean:/\b(?:true|false)\b/,operator:[/~|[+!\/%<>?=]=?|[-:]=|\*[*=]?|\.{2,3}|&&|\|\||\B-\B|\b(?:and|in|is(?: a| defined| not|nt)?|not|or)\b/],number:r,punctuation:/[{}()\[\];:,]/};i.interpolation={pattern:/\{[^\r\n}:]+\}/,alias:"variable",inside:{delimiter:{pattern:/^{|}$/,alias:"punctuation"},rest:i}},i.func={pattern:/[\w-]+\([^)]*\).*/,inside:{function:/^[^(]+/,rest:i}},e.languages.stylus={"atrule-declaration":{pattern:/(^\s*)@.+/m,lookbehind:!0,inside:{atrule:/^@[\w-]+/,rest:i}},"variable-declaration":{pattern:/(^[ \t]*)[\w$-]+\s*.?=[ \t]*(?:(?:\{[^}]*\}|.+)|$)/m,lookbehind:!0,inside:{variable:/^\S+/,rest:i}},statement:{pattern:/(^[ \t]*)(?:if|else|for|return|unless)[ \t]+.+/m,lookbehind:!0,inside:{keyword:/^\S+/,rest:i}},"property-declaration":{pattern:/((?:^|\{)([ \t]*))(?:[\w-]|\{[^}\r\n]+\})+(?:\s*:\s*|[ \t]+)[^{\r\n]*(?:;|[^{\r\n,](?=$)(?!(?:\r?\n|\r)(?:\{|\2[ \t]+)))/m,lookbehind:!0,inside:{property:{pattern:/^[^\s:]+/,inside:{interpolation:i.interpolation}},rest:i}},selector:{pattern:/(^[ \t]*)(?:(?=\S)(?:[^{}\r\n:()]|::?[\w-]+(?:\([^)\r\n]*\))?|\{[^}\r\n]+\})+)(?:(?:\r?\n|\r)(?:\1(?:(?=\S)(?:[^{}\r\n:()]|::?[\w-]+(?:\([^)\r\n]*\))?|\{[^}\r\n]+\})+)))*(?:,$|\{|(?=(?:\r?\n|\r)(?:\{|\1[ \t]+)))/m,lookbehind:!0,inside:{interpolation:i.interpolation,comment:i.comment,punctuation:/[{},]/}},func:i.func,string:i.string,comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0,greedy:!0},interpolation:i.interpolation,punctuation:/[{}()\[\];:.]/}}(Prism); \ No newline at end of file diff --git a/tests/languages/stylus/atrule-declaration_feature.test b/tests/languages/stylus/atrule-declaration_feature.test index d0e6505d5f..156a553020 100644 --- a/tests/languages/stylus/atrule-declaration_feature.test +++ b/tests/languages/stylus/atrule-declaration_feature.test @@ -3,6 +3,8 @@ @font-face { @keyframes { @media (max-{foo}: bar) +@namespace url(http://www.w3.org/1999/xhtml) // comment +@namespace svg url(http://www.w3.org/2000/svg) // comment ---------------------------------------------------- @@ -23,6 +25,17 @@ ["punctuation", ":"], " bar", ["punctuation", ")"] + ]], + ["atrule-declaration", [ + ["atrule", "@namespace"], + ["url", "url(http://www.w3.org/1999/xhtml)"], + ["comment", "// comment"] + ]], + ["atrule-declaration", [ + ["atrule", "@namespace"], + " svg ", + ["url", "url(http://www.w3.org/2000/svg)"], + ["comment", "// comment"] ]] ] diff --git a/tests/languages/stylus/keyword_feature.test b/tests/languages/stylus/keyword_feature.test index 5182775191..f5ebb4f6f5 100644 --- a/tests/languages/stylus/keyword_feature.test +++ b/tests/languages/stylus/keyword_feature.test @@ -2,6 +2,7 @@ for i in 1..5 if a == 3 z-index: 1 unless @z-index; return pair[1] if pair[0] == key for pair in hash +if url == "http://example.com" // comment ---------------------------------------------------- @@ -36,6 +37,13 @@ return pair[1] if pair[0] == key for pair in hash ["operator", "=="], " key ", ["keyword", "for"], " pair ", ["operator", "in"], " hash" + ]], + ["statement", [ + ["keyword", "if"], + " url ", + ["operator", "=="], + ["string", "\"http://example.com\""], + ["comment", "// comment"] ]] ] diff --git a/tests/languages/stylus/selector_feature.test b/tests/languages/stylus/selector_feature.test index 3868dfcaa3..50912ea2f6 100644 --- a/tests/languages/stylus/selector_feature.test +++ b/tests/languages/stylus/selector_feature.test @@ -18,6 +18,9 @@ color red {foo} {bar}:hover color red +div // comment + display inline-block // comment + ---------------------------------------------------- [ @@ -41,7 +44,9 @@ color red ]], ":hover" ]], - ["property-declaration", [["property", ["color"]], ["color", "red"]]] + ["property-declaration", [["property", ["color"]], ["color", "red"]]], + ["selector", ["div ", ["comment", "// comment"]]], + ["property-declaration", [["property", ["display"]], " inline-block ", ["comment", "// comment"]]] ] ---------------------------------------------------- diff --git a/tests/languages/stylus/variable-declaration_feature.test b/tests/languages/stylus/variable-declaration_feature.test index 1d68f9dfe0..2e98e4fb0d 100644 --- a/tests/languages/stylus/variable-declaration_feature.test +++ b/tests/languages/stylus/variable-declaration_feature.test @@ -2,6 +2,7 @@ foo = 'bar' a = 4 bar-baz = 5 a += 8 +url = "http://example.com" // comment ---------------------------------------------------- @@ -25,6 +26,12 @@ a += 8 ["variable", "a"], ["operator", "+="], ["number", "8"] + ]], + ["variable-declaration", [ + ["variable", "url"], + ["operator", "="], + ["string", "\"http://example.com\""], + ["comment", "// comment"] ]] ] From 8a72830ab4b08d8d21ea4fc75fa27ba1ea872da2 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Thu, 7 May 2020 22:44:16 +0200 Subject: [PATCH 0521/1100] Regex: Added aliases and minor improvements (#2325) This adds a lot of aliases to the regex tokens, so themes can apply their styles. It also makes a few improvements. See the PR for more details. --- components/prism-regex.js | 80 +++++++++++++------ components/prism-regex.min.js | 2 +- examples/prism-regex.html | 46 +++++++++++ tests/examples-test.js | 4 +- tests/languages/regex/charset_feature.test | 8 ++ tests/languages/regex/quantifier_feature.test | 22 ++++- 6 files changed, 132 insertions(+), 30 deletions(-) create mode 100644 examples/prism-regex.html diff --git a/components/prism-regex.js b/components/prism-regex.js index ec94277045..7b4d144035 100644 --- a/components/prism-regex.js +++ b/components/prism-regex.js @@ -4,8 +4,15 @@ pattern: /\\[\\(){}[\]^$+*?|.]/, alias: 'escape' }; - var escape = /\\(?:x[\da-fA-F]{2}|u[\da-fA-F]{4}|u\{[\da-fA-F]+\}|c[a-zA-Z]|0[0-7]{0,2}|[123][0-7]{2}|.)/ - var charClass = /\\[wsd]|\.|\\p{[^{}]+}/i + var escape = /\\(?:x[\da-fA-F]{2}|u[\da-fA-F]{4}|u\{[\da-fA-F]+\}|c[a-zA-Z]|0[0-7]{0,2}|[123][0-7]{2}|.)/; + var charClass = { + pattern: /\.|\\[wsd]|\\p{[^{}]+}/i, + alias: 'class-name' + }; + var charClassWithoutDot = { + pattern: /\\[wsd]|\\p{[^{}]+}/i, + alias: 'class-name' + }; var rangeChar = '(?:[^\\\\-]|' + escape.source + ')'; var range = RegExp(rangeChar + '-' + rangeChar); @@ -17,16 +24,6 @@ alias: 'variable' }; - var backreference = [ - /\\(?![123][0-7]{2})[1-9]/, // a backreference which is not an octal escape - { - pattern: /\\k<[^<>']+>/, - inside: { - 'group-name': groupName - } - } - ]; - Prism.languages.regex = { 'charset': { pattern: /((?:^|[^\\])(?:\\\\)*)\[(?:[^\\\]]|\\[\s\S])*\]/, @@ -35,25 +32,47 @@ 'charset-negation': { pattern: /(^\[)\^/, lookbehind: true, + alias: 'operator' + }, + 'charset-punctuation': { + pattern: /^\[|\]$/, + alias: 'punctuation' }, - 'charset-punctuation': /^\[|\]$/, 'range': { pattern: range, inside: { 'escape': escape, - 'range-punctuation': /-/ + 'range-punctuation': { + pattern: /-/, + alias: 'operator' + } } }, 'special-escape': specialEscape, - 'charclass': charClass, - 'backreference': backreference, + 'charclass': charClassWithoutDot, 'escape': escape } }, 'special-escape': specialEscape, 'charclass': charClass, - 'backreference': backreference, - 'anchor': /[$^]|\\[ABbGZz]/, + 'backreference': [ + { + // a backreference which is not an octal escape + pattern: /\\(?![123][0-7]{2})[1-9]/, + alias: 'keyword' + }, + { + pattern: /\\k<[^<>']+>/, + alias: 'keyword', + inside: { + 'group-name': groupName + } + } + ], + 'anchor': { + pattern: /[$^]|\\[ABbGZz]/, + alias: 'function' + }, 'escape': escape, 'group': [ { @@ -62,14 +81,24 @@ // (), (?), (?'name'), (?>), (?:), (?=), (?!), (?<=), (?']+>|'[^<>']+'|[>:]|']+(?=[>']$)/,lookbehind:!0,alias:"variable"},c=[/\\(?![123][0-7]{2})[1-9]/,{pattern:/\\k<[^<>']+>/,inside:{"group-name":t}}];n.languages.regex={charset:{pattern:/((?:^|[^\\])(?:\\\\)*)\[(?:[^\\\]]|\\[\s\S])*\]/,lookbehind:!0,inside:{"charset-negation":{pattern:/(^\[)\^/,lookbehind:!0},"charset-punctuation":/^\[|\]$/,range:{pattern:s,inside:{escape:a,"range-punctuation":/-/}},"special-escape":e,charclass:r,backreference:c,escape:a}},"special-escape":e,charclass:r,backreference:c,anchor:/[$^]|\\[ABbGZz]/,escape:a,group:[{pattern:/\((?:\?(?:<[^<>']+>|'[^<>']+'|[>:]|']+(?=[>']$)/,lookbehind:!0,alias:"variable"};n.languages.regex={charset:{pattern:/((?:^|[^\\])(?:\\\\)*)\[(?:[^\\\]]|\\[\s\S])*\]/,lookbehind:!0,inside:{"charset-negation":{pattern:/(^\[)\^/,lookbehind:!0,alias:"operator"},"charset-punctuation":{pattern:/^\[|\]$/,alias:"punctuation"},range:{pattern:i,inside:{escape:e,"range-punctuation":{pattern:/-/,alias:"operator"}}},"special-escape":a,charclass:{pattern:/\\[wsd]|\\p{[^{}]+}/i,alias:"class-name"},escape:e}},"special-escape":a,charclass:{pattern:/\.|\\[wsd]|\\p{[^{}]+}/i,alias:"class-name"},backreference:[{pattern:/\\(?![123][0-7]{2})[1-9]/,alias:"keyword"},{pattern:/\\k<[^<>']+>/,alias:"keyword",inside:{"group-name":r}}],anchor:{pattern:/[$^]|\\[ABbGZz]/,alias:"function"},escape:e,group:[{pattern:/\((?:\?(?:<[^<>']+>|'[^<>']+'|[>:]|The regex languages con be used for inline regex snippets like (?<number>\d+)[-_ ]\k<number> but it mainly adds itself to other languages such as:

        + +

        JavaScript

        +
        Prism.languages.markup = {
        +	'comment': /<!--[\s\S]*?-->/,
        +	'prolog': /<\?[\s\S]+?\?>/,
        +	'doctype': {
        +		pattern: /<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,
        +		greedy: true
        +	},
        +	'cdata': /<!\[CDATA\[[\s\S]*?]]>/i,
        +	'tag': {
        +		pattern: /<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/i,
        +		greedy: true,
        +		inside: {
        +			'tag': {
        +				pattern: /^<\/?[^\s>\/]+/i,
        +				inside: {
        +					'punctuation': /^<\/?/,
        +					'namespace': /^[^\s>\/:]+:/
        +				}
        +			},
        +			'attr-value': {
        +				pattern: /=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/i,
        +				inside: {
        +					'punctuation': [
        +						/^=/,
        +						{
        +							pattern: /^(\s*)["']|["']$/,
        +							lookbehind: true
        +						}
        +					]
        +				}
        +			},
        +			'punctuation': /\/?>/,
        +			'attr-name': {
        +				pattern: /[^\s>\/]+/,
        +				inside: {
        +					'namespace': /^[^\s>\/:]+:/
        +				}
        +			}
        +
        +		}
        +	},
        +	'entity': /&#?[\da-z]{1,8};/i
        +};
        diff --git a/tests/examples-test.js b/tests/examples-test.js index b45c684917..0a4f3e4164 100644 --- a/tests/examples-test.js +++ b/tests/examples-test.js @@ -13,9 +13,7 @@ describe('Examples', function () { 'markup-templating', 't4-templating', // this does alter some languages but it's mainly a library - 'javadoclike', - // Regex doesn't have any classes supported by our themes and mainly extends other languages - 'regex' + 'javadoclike' ]); const validFiles = new Set(); diff --git a/tests/languages/regex/charset_feature.test b/tests/languages/regex/charset_feature.test index 0a970da1a9..317216e2de 100644 --- a/tests/languages/regex/charset_feature.test +++ b/tests/languages/regex/charset_feature.test @@ -2,6 +2,7 @@ [^] [foo] [\]\b] +[.^$\1] ---------------------------------------------------- @@ -28,6 +29,13 @@ ["special-escape", "\\]"], ["escape", "\\b"], ["charset-punctuation", "]"] + ]], + + ["charset", [ + ["charset-punctuation", "["], + ".^$", + ["escape", "\\1"], + ["charset-punctuation", "]"] ]] ] diff --git a/tests/languages/regex/quantifier_feature.test b/tests/languages/regex/quantifier_feature.test index 87246d65bd..bd4e9bf999 100644 --- a/tests/languages/regex/quantifier_feature.test +++ b/tests/languages/regex/quantifier_feature.test @@ -1,6 +1,12 @@ * + ? {2} {2,} {0,1} +*? +? ?? +{2}? {2,}? {0,1}? + +*+ ++ ?+ +{2}+ {2,}+ {0,1}+ + ---------------------------------------------------- [ @@ -9,7 +15,21 @@ ["quantifier", "?"], ["quantifier", "{2}"], ["quantifier", "{2,}"], - ["quantifier", "{0,1}"] + ["quantifier", "{0,1}"], + + ["quantifier", "*?"], + ["quantifier", "+?"], + ["quantifier", "??"], + ["quantifier", "{2}?"], + ["quantifier", "{2,}?"], + ["quantifier", "{0,1}?"], + + ["quantifier", "*+"], + ["quantifier", "++"], + ["quantifier", "?+"], + ["quantifier", "{2}+"], + ["quantifier", "{2,}+"], + ["quantifier", "{0,1}+"] ] ---------------------------------------------------- From e523f5d0b74044e487001964cc8b4df635f7e9de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=A3=E9=87=8C=E5=A5=BD=E8=84=8F=E4=B8=8D=E5=8F=AF?= =?UTF-8?q?=E4=BB=A5?= <453491931@qq.com> Date: Sat, 9 May 2020 02:42:24 +0800 Subject: [PATCH 0522/1100] CSS Extras: Renamed `attr-{name,value}` tokens and added tokens for combinators and selector lists (#2373) --- components/prism-css-extras.js | 12 +- components/prism-css-extras.min.js | 2 +- .../selector_attribute_feature.test | 70 ++++---- .../css!+css-extras/selector_feature.test | 34 +++- .../selector_n-th_feature.test | 164 +++++++++--------- .../selector_pseudo-class_feature.test | 118 ++++++------- 6 files changed, 219 insertions(+), 181 deletions(-) diff --git a/components/prism-css-extras.js b/components/prism-css-extras.js index 1b6ab8c027..f62c47bbd2 100644 --- a/components/prism-css-extras.js +++ b/components/prism-css-extras.js @@ -27,11 +27,11 @@ 'punctuation': /\|$/ } }, - 'attribute': { + 'attr-name': { pattern: /^(\s*)[-\w\xA0-\uFFFF]+/, lookbehind: true }, - 'value': [ + 'attr-value': [ string, { pattern: /(=\s*)[-\w\xA0-\uFFFF]+(?=\s*$)/, @@ -55,7 +55,13 @@ lookbehind: true } ], - 'punctuation': /[()]/ + 'combinator': />|\+|~|\|\|/, + + // the `tag` token has been existed and removed. + // because we can't find a perfect tokenize to match it. + // if you want to add it, please read https://github.com/PrismJS/prism/pull/2373 first. + + 'punctuation': /[(),]/, } }; diff --git a/components/prism-css-extras.min.js b/components/prism-css-extras.min.js index 00ed486bf1..81ee713413 100644 --- a/components/prism-css-extras.min.js +++ b/components/prism-css-extras.min.js @@ -1 +1 @@ -!function(e){var a,n=/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/;e.languages.css.selector={pattern:e.languages.css.selector,inside:a={"pseudo-element":/:(?:after|before|first-letter|first-line|selection)|::[-\w]+/,"pseudo-class":/:[-\w]+/,class:/\.[-:.\w]+/,id:/#[-:.\w]+/,attribute:{pattern:RegExp("\\[(?:[^[\\]\"']|"+n.source+")*\\]"),greedy:!0,inside:{punctuation:/^\[|\]$/,"case-sensitivity":{pattern:/(\s)[si]$/i,lookbehind:!0,alias:"keyword"},namespace:{pattern:/^(\s*)[-*\w\xA0-\uFFFF]*\|(?!=)/,lookbehind:!0,inside:{punctuation:/\|$/}},attribute:{pattern:/^(\s*)[-\w\xA0-\uFFFF]+/,lookbehind:!0},value:[n,{pattern:/(=\s*)[-\w\xA0-\uFFFF]+(?=\s*$)/,lookbehind:!0}],operator:/[|~*^$]?=/}},"n-th":[{pattern:/(\(\s*)[+-]?\d*[\dn](?:\s*[+-]\s*\d+)?(?=\s*\))/,lookbehind:!0,inside:{number:/[\dn]+/,operator:/[+-]/}},{pattern:/(\(\s*)(?:even|odd)(?=\s*\))/i,lookbehind:!0}],punctuation:/[()]/}},e.languages.css.atrule.inside["selector-function-argument"].inside=a,e.languages.insertBefore("css","property",{variable:{pattern:/(^|[^-\w\xA0-\uFFFF])--[-_a-z\xA0-\uFFFF][-\w\xA0-\uFFFF]*/i,lookbehind:!0}});var r={pattern:/(\d)(?:%|[a-z]+)/,lookbehind:!0},i={pattern:/(^|[^\w.-])-?\d*\.?\d+/,lookbehind:!0};e.languages.insertBefore("css","function",{operator:{pattern:/(\s)[+\-*\/](?=\s)/,lookbehind:!0},hexcode:{pattern:/\B#(?:[\da-f]{1,2}){3,4}\b/i,alias:"color"},color:[/\b(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)\b/i,{pattern:/\b(?:rgb|hsl)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:rgb|hsl)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,inside:{unit:r,number:i,function:/[\w-]+(?=\()/,punctuation:/[(),]/}}],entity:/\\[\da-f]{1,8}/i,unit:r,number:i})}(Prism); \ No newline at end of file +!function(e){var a,n=/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/;e.languages.css.selector={pattern:e.languages.css.selector,inside:a={"pseudo-element":/:(?:after|before|first-letter|first-line|selection)|::[-\w]+/,"pseudo-class":/:[-\w]+/,class:/\.[-:.\w]+/,id:/#[-:.\w]+/,attribute:{pattern:RegExp("\\[(?:[^[\\]\"']|"+n.source+")*\\]"),greedy:!0,inside:{punctuation:/^\[|\]$/,"case-sensitivity":{pattern:/(\s)[si]$/i,lookbehind:!0,alias:"keyword"},namespace:{pattern:/^(\s*)[-*\w\xA0-\uFFFF]*\|(?!=)/,lookbehind:!0,inside:{punctuation:/\|$/}},"attr-name":{pattern:/^(\s*)[-\w\xA0-\uFFFF]+/,lookbehind:!0},"attr-value":[n,{pattern:/(=\s*)[-\w\xA0-\uFFFF]+(?=\s*$)/,lookbehind:!0}],operator:/[|~*^$]?=/}},"n-th":[{pattern:/(\(\s*)[+-]?\d*[\dn](?:\s*[+-]\s*\d+)?(?=\s*\))/,lookbehind:!0,inside:{number:/[\dn]+/,operator:/[+-]/}},{pattern:/(\(\s*)(?:even|odd)(?=\s*\))/i,lookbehind:!0}],combinator:/>|\+|~|\|\|/,punctuation:/[(),]/}},e.languages.css.atrule.inside["selector-function-argument"].inside=a,e.languages.insertBefore("css","property",{variable:{pattern:/(^|[^-\w\xA0-\uFFFF])--[-_a-z\xA0-\uFFFF][-\w\xA0-\uFFFF]*/i,lookbehind:!0}});var r={pattern:/(\d)(?:%|[a-z]+)/,lookbehind:!0},i={pattern:/(^|[^\w.-])-?\d*\.?\d+/,lookbehind:!0};e.languages.insertBefore("css","function",{operator:{pattern:/(\s)[+\-*\/](?=\s)/,lookbehind:!0},hexcode:{pattern:/\B#(?:[\da-f]{1,2}){3,4}\b/i,alias:"color"},color:[/\b(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)\b/i,{pattern:/\b(?:rgb|hsl)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:rgb|hsl)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,inside:{unit:r,number:i,function:/[\w-]+(?=\()/,punctuation:/[(),]/}}],entity:/\\[\da-f]{1,8}/i,unit:r,number:i})}(Prism); \ No newline at end of file diff --git a/tests/languages/css!+css-extras/selector_attribute_feature.test b/tests/languages/css!+css-extras/selector_attribute_feature.test index 25d1259f2b..fe2587b7a6 100644 --- a/tests/languages/css!+css-extras/selector_attribute_feature.test +++ b/tests/languages/css!+css-extras/selector_attribute_feature.test @@ -28,7 +28,7 @@ ["selector", [ ["attribute", [ ["punctuation", "["], - ["attribute", "attr"], + ["attr-name", "attr"], ["punctuation", "]"] ]] ]], @@ -38,9 +38,9 @@ ["selector", [ ["attribute", [ ["punctuation", "["], - ["attribute", "attr"], + ["attr-name", "attr"], ["operator", "="], - ["value", "val"], + ["attr-value", "val"], ["punctuation", "]"] ]] ]], @@ -50,9 +50,9 @@ ["selector", [ ["attribute", [ ["punctuation", "["], - ["attribute", "attr"], + ["attr-name", "attr"], ["operator", "="], - ["value", "\"val\""], + ["attr-value", "\"val\""], ["punctuation", "]"] ]] ]], @@ -62,9 +62,9 @@ ["selector", [ ["attribute", [ ["punctuation", "["], - ["attribute", "attr"], + ["attr-name", "attr"], ["operator", "="], - ["value", "'val'"], + ["attr-value", "'val'"], ["punctuation", "]"] ]] ]], @@ -74,9 +74,9 @@ ["selector", [ ["attribute", [ ["punctuation", "["], - ["attribute", "attr"], + ["attr-name", "attr"], ["operator", "|="], - ["value", "val"], + ["attr-value", "val"], ["punctuation", "]"] ]] ]], @@ -86,9 +86,9 @@ ["selector", [ ["attribute", [ ["punctuation", "["], - ["attribute", "attr"], + ["attr-name", "attr"], ["operator", "~="], - ["value", "val"], + ["attr-value", "val"], ["punctuation", "]"] ]] ]], @@ -98,9 +98,9 @@ ["selector", [ ["attribute", [ ["punctuation", "["], - ["attribute", "attr"], + ["attr-name", "attr"], ["operator", "|="], - ["value", "val"], + ["attr-value", "val"], ["punctuation", "]"] ]] ]], @@ -110,9 +110,9 @@ ["selector", [ ["attribute", [ ["punctuation", "["], - ["attribute", "attr"], + ["attr-name", "attr"], ["operator", "^="], - ["value", "val"], + ["attr-value", "val"], ["punctuation", "]"] ]] ]], @@ -122,9 +122,9 @@ ["selector", [ ["attribute", [ ["punctuation", "["], - ["attribute", "attr"], + ["attr-name", "attr"], ["operator", "$="], - ["value", "val"], + ["attr-value", "val"], ["punctuation", "]"] ]] ]], @@ -134,9 +134,9 @@ ["selector", [ ["attribute", [ ["punctuation", "["], - ["attribute", "attr"], + ["attr-name", "attr"], ["operator", "*="], - ["value", "val"], + ["attr-value", "val"], ["punctuation", "]"] ]] ]], @@ -150,7 +150,7 @@ "foo", ["punctuation", "|"] ]], - ["attribute", "attr"], + ["attr-name", "attr"], ["punctuation", "]"] ]], ["attribute", [ @@ -159,7 +159,7 @@ "*", ["punctuation", "|"] ]], - ["attribute", "attr"], + ["attr-name", "attr"], ["punctuation", "]"] ]], ["attribute", [ @@ -167,7 +167,7 @@ ["namespace", [ ["punctuation", "|"] ]], - ["attribute", "attr"], + ["attr-name", "attr"], ["punctuation", "]"] ]] ]], @@ -181,9 +181,9 @@ "foo", ["punctuation", "|"] ]], - ["attribute", "attr"], + ["attr-name", "attr"], ["operator", "|="], - ["value", "val"], + ["attr-value", "val"], ["punctuation", "]"] ]] ]], @@ -193,9 +193,9 @@ ["selector", [ ["attribute", [ ["punctuation", "["], - ["attribute", "attr"], + ["attr-name", "attr"], ["operator", "="], - ["value", "val"], + ["attr-value", "val"], ["case-sensitivity", "i"], ["punctuation", "]"] ]] @@ -206,9 +206,9 @@ ["selector", [ ["attribute", [ ["punctuation", "["], - ["attribute", "attr"], + ["attr-name", "attr"], ["operator", "="], - ["value", "\"val\""], + ["attr-value", "\"val\""], ["case-sensitivity", "S"], ["punctuation", "]"] ]] @@ -219,7 +219,7 @@ ["selector", [ ["attribute", [ ["punctuation", "["], - ["attribute", "attr"], + ["attr-name", "attr"], ["punctuation", "]"] ]] ]], @@ -229,9 +229,9 @@ ["selector", [ ["attribute", [ ["punctuation", "["], - ["attribute", "attr"], + ["attr-name", "attr"], ["operator", "="], - ["value", "val"], + ["attr-value", "val"], ["punctuation", "]"] ]] ]], @@ -241,9 +241,9 @@ ["selector", [ ["attribute", [ ["punctuation", "["], - ["attribute", "attr"], + ["attr-name", "attr"], ["operator", "="], - ["value", "val"], + ["attr-value", "val"], ["case-sensitivity", "i"], ["punctuation", "]"] ]] @@ -254,9 +254,9 @@ ["selector", [ ["attribute", [ ["punctuation", "["], - ["attribute", "attr"], + ["attr-name", "attr"], ["operator", "="], - ["value", "\"i#m :not(a.class)\""], + ["attr-value", "\"i#m :not(a.class)\""], ["punctuation", "]"] ]] ]], diff --git a/tests/languages/css!+css-extras/selector_feature.test b/tests/languages/css!+css-extras/selector_feature.test index d42ec7faa6..ddd6961403 100644 --- a/tests/languages/css!+css-extras/selector_feature.test +++ b/tests/languages/css!+css-extras/selector_feature.test @@ -7,6 +7,14 @@ foo#bar { #foo > .bar:hover:after { +span, +div { + +div > p, +.css-li ~ .css-li, +.previous-selector + .selector, +.selected || td { + ---------------------------------------------------- [ @@ -32,10 +40,34 @@ foo#bar { ["selector", [ ["id", "#foo"], - " > ", + ["combinator", ">"], ["class", ".bar"], ["pseudo-class", ":hover"], ["pseudo-element", ":after"] + ]], ["punctuation", "{"], + + ["selector", [ + "span", + ["punctuation", ","], + "\r\ndiv" + ]], ["punctuation", "{"], + + ["selector", [ + "div ", + ["combinator", ">"], + " p", + ["punctuation", ","], + ["class", ".css-li"], + ["combinator", "~"], + ["class", ".css-li"], + ["punctuation", ","], + ["class", ".previous-selector"], + ["combinator", "+"], + ["class", ".selector"], + ["punctuation", ","], + ["class", ".selected"], + ["combinator", "||"], + " td" ]], ["punctuation", "{"] ] diff --git a/tests/languages/css!+css-extras/selector_n-th_feature.test b/tests/languages/css!+css-extras/selector_n-th_feature.test index 64e5aa7bb5..0b7bcb8e9a 100644 --- a/tests/languages/css!+css-extras/selector_n-th_feature.test +++ b/tests/languages/css!+css-extras/selector_n-th_feature.test @@ -1,82 +1,82 @@ -:nth-child(2n+1) {} -:nth-child(+2n - 1) {} -:nth-child(2n) {} -:nth-child(+5) {} -:nth-child(even) {} -:nth-child(odd) {} - ----------------------------------------------------- - -[ - ["selector", [ - ["pseudo-class", ":nth-child"], - ["punctuation", "("], - ["n-th", [ - ["number", "2n"], - ["operator", "+"], - ["number", "1"] - ]], - ["punctuation", ")"] - ]], - ["punctuation", "{"], - ["punctuation", "}"], - - ["selector", [ - ["pseudo-class", ":nth-child"], - ["punctuation", "("], - ["n-th", [ - ["operator", "+"], - ["number", "2n"], - ["operator", "-"], - ["number", "1"] - ]], - ["punctuation", ")"] - ]], - ["punctuation", "{"], - ["punctuation", "}"], - - ["selector", [ - ["pseudo-class", ":nth-child"], - ["punctuation", "("], - ["n-th", [ - ["number", "2n"] - ]], - ["punctuation", ")"] - ]], - ["punctuation", "{"], - ["punctuation", "}"], - - ["selector", [ - ["pseudo-class", ":nth-child"], - ["punctuation", "("], - ["n-th", [ - ["operator", "+"], - ["number", "5"] - ]], - ["punctuation", ")"] - ]], - ["punctuation", "{"], - ["punctuation", "}"], - - ["selector", [ - ["pseudo-class", ":nth-child"], - ["punctuation", "("], - ["n-th", "even"], - ["punctuation", ")"] - ]], - ["punctuation", "{"], - ["punctuation", "}"], - - ["selector", [ - ["pseudo-class", ":nth-child"], - ["punctuation", "("], - ["n-th", "odd"], - ["punctuation", ")"] - ]], - ["punctuation", "{"], - ["punctuation", "}"] -] - ----------------------------------------------------- - -Checks for n-th expressions. +:nth-child(2n+1) {} +:nth-child(+2n - 1) {} +:nth-child(2n) {} +:nth-child(+5) {} +:nth-child(even) {} +:nth-child(odd) {} + +---------------------------------------------------- + +[ + ["selector", [ + ["pseudo-class", ":nth-child"], + ["punctuation", "("], + ["n-th", [ + ["number", "2n"], + ["operator", "+"], + ["number", "1"] + ]], + ["punctuation", ")"] + ]], + ["punctuation", "{"], + ["punctuation", "}"], + + ["selector", [ + ["pseudo-class", ":nth-child"], + ["punctuation", "("], + ["n-th", [ + ["operator", "+"], + ["number", "2n"], + ["operator", "-"], + ["number", "1"] + ]], + ["punctuation", ")"] + ]], + ["punctuation", "{"], + ["punctuation", "}"], + + ["selector", [ + ["pseudo-class", ":nth-child"], + ["punctuation", "("], + ["n-th", [ + ["number", "2n"] + ]], + ["punctuation", ")"] + ]], + ["punctuation", "{"], + ["punctuation", "}"], + + ["selector", [ + ["pseudo-class", ":nth-child"], + ["punctuation", "("], + ["n-th", [ + ["operator", "+"], + ["number", "5"] + ]], + ["punctuation", ")"] + ]], + ["punctuation", "{"], + ["punctuation", "}"], + + ["selector", [ + ["pseudo-class", ":nth-child"], + ["punctuation", "("], + ["n-th", "even"], + ["punctuation", ")"] + ]], + ["punctuation", "{"], + ["punctuation", "}"], + + ["selector", [ + ["pseudo-class", ":nth-child"], + ["punctuation", "("], + ["n-th", "odd"], + ["punctuation", ")"] + ]], + ["punctuation", "{"], + ["punctuation", "}"] +] + +---------------------------------------------------- + +Checks for n-th expressions. diff --git a/tests/languages/css!+css-extras/selector_pseudo-class_feature.test b/tests/languages/css!+css-extras/selector_pseudo-class_feature.test index e4dfe15183..bf2cea6217 100644 --- a/tests/languages/css!+css-extras/selector_pseudo-class_feature.test +++ b/tests/languages/css!+css-extras/selector_pseudo-class_feature.test @@ -1,59 +1,59 @@ -foo:hover {} - -:lang(en) {} - -.bar:not(baz:hover):not(.foo) {} - -:where(p:not(.class)) {} - ----------------------------------------------------- - -[ - ["selector", [ - "foo", - ["pseudo-class", ":hover"] - ]], - ["punctuation", "{"], - ["punctuation", "}"], - - ["selector", [ - ["pseudo-class", ":lang"], - ["punctuation", "("], - "en", - ["punctuation", ")"] - ]], - ["punctuation", "{"], - ["punctuation", "}"], - - ["selector", [ - ["class", ".bar"], - ["pseudo-class", ":not"], - ["punctuation", "("], - "baz", - ["pseudo-class", ":hover"], - ["punctuation", ")"], - ["pseudo-class", ":not"], - ["punctuation", "("], - ["class", ".foo"], - ["punctuation", ")"] - ]], - ["punctuation", "{"], - ["punctuation", "}"], - - ["selector", [ - ["pseudo-class", ":where"], - ["punctuation", "("], - "p", - ["pseudo-class", ":not"], - ["punctuation", "("], - ["class", ".class"], - ["punctuation", ")"], - ["punctuation", ")"] - ]], - ["punctuation", "{"], - ["punctuation", "}"] -] - ----------------------------------------------------- - -Checks for pseudo-classes inside selectors. +foo:hover {} + +:lang(en) {} + +.bar:not(baz:hover):not(.foo) {} + +:where(p:not(.class)) {} + +---------------------------------------------------- + +[ + ["selector", [ + "foo", + ["pseudo-class", ":hover"] + ]], + ["punctuation", "{"], + ["punctuation", "}"], + + ["selector", [ + ["pseudo-class", ":lang"], + ["punctuation", "("], + "en", + ["punctuation", ")"] + ]], + ["punctuation", "{"], + ["punctuation", "}"], + + ["selector", [ + ["class", ".bar"], + ["pseudo-class", ":not"], + ["punctuation", "("], + "baz", + ["pseudo-class", ":hover"], + ["punctuation", ")"], + ["pseudo-class", ":not"], + ["punctuation", "("], + ["class", ".foo"], + ["punctuation", ")"] + ]], + ["punctuation", "{"], + ["punctuation", "}"], + + ["selector", [ + ["pseudo-class", ":where"], + ["punctuation", "("], + "p", + ["pseudo-class", ":not"], + ["punctuation", "("], + ["class", ".class"], + ["punctuation", ")"], + ["punctuation", ")"] + ]], + ["punctuation", "{"], + ["punctuation", "}"] +] + +---------------------------------------------------- + +Checks for pseudo-classes inside selectors. From 194c54292548381312e3247fc5b2e0f72f7afcec Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Mon, 11 May 2020 14:49:10 +0200 Subject: [PATCH 0523/1100] Rust: Improvements (#2332) This makes several improvements to Rust. This includes support for multiline strings, better closures, attributes, macros, and comments, an update for the keyword list, and more. --- components/prism-rust.js | 154 +++++++++++------- components/prism-rust.min.js | 2 +- tests/languages/rust/attribute_feature.test | 28 +++- tests/languages/rust/boolean_feature.test | 13 ++ .../rust/closure-params_feature.test | 118 +++++++++++++- tests/languages/rust/comment_feature.test | 11 +- tests/languages/rust/function_feature.test | 56 +++++-- tests/languages/rust/issue1339.test | 6 +- tests/languages/rust/keyword_feature.test | 128 +++++++++++---- .../rust/lifetime-annotation_feature.test | 6 +- tests/languages/rust/macro_example.test | 144 ++++++++++++++++ ...-rules_feature.test => macro_feature.test} | 8 +- tests/languages/rust/number_feature.test | 8 +- tests/languages/rust/operator_feature.test | 4 +- tests/languages/rust/string_feature.test | 26 ++- 15 files changed, 583 insertions(+), 129 deletions(-) create mode 100644 tests/languages/rust/boolean_feature.test create mode 100644 tests/languages/rust/macro_example.test rename tests/languages/rust/{macro-rules_feature.test => macro_feature.test} (52%) diff --git a/components/prism-rust.js b/components/prism-rust.js index a2b9ae2599..cb42b75498 100644 --- a/components/prism-rust.js +++ b/components/prism-rust.js @@ -1,68 +1,100 @@ -/* TODO - Add support for Markdown notation inside doc comments - Add support for nested block comments... - Match closure params even when not followed by dash or brace - Add better support for macro definition -*/ +(function (Prism) { -Prism.languages.rust = { - 'comment': [ - { - pattern: /(^|[^\\])\/\*[\s\S]*?\*\//, - lookbehind: true - }, - { - pattern: /(^|[^\\:])\/\/.*/, - lookbehind: true - } - ], - 'string': [ - { - pattern: /b?r(#*)"(?:\\.|(?!"\1)[^\\\r\n])*"\1/, + var multilineComment = /\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|)*\*\//.source; + for (var i = 0; i < 2; i++) { + // support 4 levels of nested comments + multilineComment = multilineComment.replace(//g, function () { return multilineComment; }); + } + multilineComment = multilineComment.replace(//g, function () { return /[^\s\S]/.source; }); + + + Prism.languages.rust = { + 'comment': [ + { + pattern: RegExp(/(^|[^\\])/.source + multilineComment), + lookbehind: true, + greedy: true + }, + { + pattern: /(^|[^\\:])\/\/.*/, + lookbehind: true, + greedy: true + } + ], + 'string': { + pattern: /b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/, greedy: true }, - { - pattern: /b?"(?:\\.|[^\\\r\n"])*"/, - greedy: true - } - ], - 'char': { - pattern: /b?'(?:\\(?:x[0-7][\da-fA-F]|u{(?:[\da-fA-F]_*){1,6}|.)|[^\\\r\n\t'])'/, - alias: 'string' - }, - 'lifetime-annotation': { - pattern: /'[^\s>']+/, - alias: 'symbol' - }, - 'keyword': /\b(?:abstract|alignof|as|async|await|be|box|break|const|continue|crate|do|dyn|else|enum|extern|false|final|fn|for|if|impl|in|let|loop|match|mod|move|mut|offsetof|once|override|priv|pub|pure|ref|return|sizeof|static|self|Self|struct|super|true|trait|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/, + 'char': { + pattern: /b?'(?:\\(?:x[0-7][\da-fA-F]|u{(?:[\da-fA-F]_*){1,6}|.)|[^\\\r\n\t'])'/, + greedy: true, + alias: 'string' + }, + 'attribute': { + pattern: /#!?\[[^[\]]*\]/, + greedy: true, + alias: 'attr-name', + inside: { + 'string': null // see below + } + }, + + // Closure params should not be confused with bitwise OR | + 'closure-params': { + pattern: /([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/, + lookbehind: true, + greedy: true, + inside: { + 'closure-punctuation': { + pattern: /^\||\|$/, + alias: 'punctuation' + }, + rest: null // see below + } + }, - 'attribute': { - pattern: /#!?\[.+?\]/, - greedy: true, - alias: 'attr-name' - }, + 'lifetime-annotation': { + pattern: /'\w+/, + alias: 'symbol' + }, + + 'fragment-specifier': { + pattern: /(\$\w+:)[a-z]+/, + lookbehind: true, + alias: 'punctuation' + }, + 'variable': /\$\w+/, + + 'function-definition': { + pattern: /(\bfn\s*)\w+/, + lookbehind: true, + alias: 'function' + }, + 'keyword': [ + // https://github.com/rust-lang/reference/blob/master/src/keywords.md + /\b(?:abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|Self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/, + // primitives + // https://doc.rust-lang.org/stable/rust-by-example/primitives.html + /\b(?:[ui](?:8|16|32|64|128|size)|f(?:32|64)|bool|char)\b/ + ], + + // functions can technically start with an upper-case letter, but this will introduce a lot of false positives + // and Rust's naming conventions recommend snake_case anyway. + // https://doc.rust-lang.org/1.0.0/style/style/naming/README.html + 'function': /\b[a-z_]\w*(?=\s*(?:::\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*)?\()/, + 'macro': { + pattern: /\w+!/, + alias: 'property' + }, - 'function': [ - /\w+(?=\s*\()/, - // Macros can use parens or brackets - /\w+!(?=\s*\(|\[)/ - ], - 'macro-rules': { - pattern: /\w+!/, - alias: 'function' - }, + // Hex, oct, bin, dec numbers with visual separators and type suffix + 'number': /\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:\d(?:_?\d)*)?\.?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:[iu](?:8|16|32|64|size)?|f32|f64))?\b/, + 'boolean': /\b(?:false|true)\b/, + 'punctuation': /->|\.\.=|\.{1,3}|::|[{}[\];(),:]/, + 'operator': /[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<>?=?|[@?]/ + }; - // Hex, oct, bin, dec numbers with visual separators and type suffix - 'number': /\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:\d(?:_?\d)*)?\.?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:[iu](?:8|16|32|64)?|f32|f64))?\b/, + Prism.languages.rust['closure-params'].inside.rest = Prism.languages.rust; + Prism.languages.rust['attribute'].inside['string'] = Prism.languages.rust['string']; - // Closure params should not be confused with bitwise OR | - 'closure-params': { - pattern: /\|[^|]*\|(?=\s*[{-])/, - inside: { - 'punctuation': /[|:,]/, - 'operator': /[&*]/ - } - }, - 'punctuation': /->|\.\.=|\.{1,3}|::|[{}[\];(),:]/, - 'operator': /[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<>?=?|[@?]/ -}; +}(Prism)); diff --git a/components/prism-rust.min.js b/components/prism-rust.min.js index 0535651161..aaad309fa5 100644 --- a/components/prism-rust.min.js +++ b/components/prism-rust.min.js @@ -1 +1 @@ -Prism.languages.rust={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?\*\//,lookbehind:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0}],string:[{pattern:/b?r(#*)"(?:\\.|(?!"\1)[^\\\r\n])*"\1/,greedy:!0},{pattern:/b?"(?:\\.|[^\\\r\n"])*"/,greedy:!0}],char:{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u{(?:[\da-fA-F]_*){1,6}|.)|[^\\\r\n\t'])'/,alias:"string"},"lifetime-annotation":{pattern:/'[^\s>']+/,alias:"symbol"},keyword:/\b(?:abstract|alignof|as|async|await|be|box|break|const|continue|crate|do|dyn|else|enum|extern|false|final|fn|for|if|impl|in|let|loop|match|mod|move|mut|offsetof|once|override|priv|pub|pure|ref|return|sizeof|static|self|Self|struct|super|true|trait|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,attribute:{pattern:/#!?\[.+?\]/,greedy:!0,alias:"attr-name"},function:[/\w+(?=\s*\()/,/\w+!(?=\s*\(|\[)/],"macro-rules":{pattern:/\w+!/,alias:"function"},number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:\d(?:_?\d)*)?\.?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:[iu](?:8|16|32|64)?|f32|f64))?\b/,"closure-params":{pattern:/\|[^|]*\|(?=\s*[{-])/,inside:{punctuation:/[|:,]/,operator:/[&*]/}},punctuation:/->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,operator:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<>?=?|[@?]/}; \ No newline at end of file +!function(e){for(var t="/\\*(?:[^*/]|\\*(?!/)|/(?!\\*)|)*\\*/",a=0;a<2;a++)t=t.replace(//g,function(){return t});t=t.replace(//g,function(){return"[^\\s\\S]"}),e.languages.rust={comment:[{pattern:RegExp("(^|[^\\\\])"+t),lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,greedy:!0},char:{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u{(?:[\da-fA-F]_*){1,6}|.)|[^\\\r\n\t'])'/,greedy:!0,alias:"string"},attribute:{pattern:/#!?\[[^[\]]*\]/,greedy:!0,alias:"attr-name",inside:{string:null}},"closure-params":{pattern:/([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,lookbehind:!0,greedy:!0,inside:{"closure-punctuation":{pattern:/^\||\|$/,alias:"punctuation"},rest:null}},"lifetime-annotation":{pattern:/'\w+/,alias:"symbol"},"fragment-specifier":{pattern:/(\$\w+:)[a-z]+/,lookbehind:!0,alias:"punctuation"},variable:/\$\w+/,"function-definition":{pattern:/(\bfn\s*)\w+/,lookbehind:!0,alias:"function"},keyword:[/\b(?:abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|Self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,/\b(?:[ui](?:8|16|32|64|128|size)|f(?:32|64)|bool|char)\b/],function:/\b[a-z_]\w*(?=\s*(?:::\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*)?\()/,macro:{pattern:/\w+!/,alias:"property"},number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:\d(?:_?\d)*)?\.?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:[iu](?:8|16|32|64|size)?|f32|f64))?\b/,boolean:/\b(?:false|true)\b/,punctuation:/->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,operator:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<>?=?|[@?]/},e.languages.rust["closure-params"].inside.rest=e.languages.rust,e.languages.rust.attribute.inside.string=e.languages.rust.string}(Prism); \ No newline at end of file diff --git a/tests/languages/rust/attribute_feature.test b/tests/languages/rust/attribute_feature.test index a3dac8a871..e2475dd738 100644 --- a/tests/languages/rust/attribute_feature.test +++ b/tests/languages/rust/attribute_feature.test @@ -1,13 +1,35 @@ #[test] #![warn(unstable)] +#[doc(hidden)] +#[unstable( + feature = "thread_local_internals", + reason = "recently added to create a key", + issue = "none" +)] ---------------------------------------------------- [ - ["attribute", "#[test]"], - ["attribute", "#![warn(unstable)]"] + ["attribute", [ + "#[test]" + ]], + ["attribute", [ + "#![warn(unstable)]" + ]], + ["attribute", [ + "#[doc(hidden)]" + ]], + ["attribute", [ + "#[unstable(\r\n\tfeature = ", + ["string", "\"thread_local_internals\""], + ",\r\n\treason = ", + ["string", "\"recently added to create a key\""], + ",\r\n\tissue = ", + ["string", "\"none\""], + "\r\n)]" + ]] ] ---------------------------------------------------- -Checks for attributes. \ No newline at end of file +Checks for attributes. diff --git a/tests/languages/rust/boolean_feature.test b/tests/languages/rust/boolean_feature.test new file mode 100644 index 0000000000..a4e4d4bc5c --- /dev/null +++ b/tests/languages/rust/boolean_feature.test @@ -0,0 +1,13 @@ +false +true + +---------------------------------------------------- + +[ + ["boolean", "false"], + ["boolean", "true"] +] + +---------------------------------------------------- + +Checks for booleans. diff --git a/tests/languages/rust/closure-params_feature.test b/tests/languages/rust/closure-params_feature.test index 83bf90004c..4af3effdb5 100644 --- a/tests/languages/rust/closure-params_feature.test +++ b/tests/languages/rust/closure-params_feature.test @@ -1,11 +1,19 @@ |x: int, y: int| -> int {} || {} +vec1.iter().any(|&x| x == 2); +foo(123, || x * x); + +let add_one_v2 = |x: u32| -> u32 { x + 1 }; +let add_one_v3 = |x| { x + 1 }; +let add_one_v4 = |x| x + 1 ; +move || println!("This is a: {}", text) + ---------------------------------------------------- [ ["closure-params", [ - ["punctuation", "|"], + ["closure-punctuation", "|"], "x", ["punctuation", ":"], " int", @@ -13,18 +21,114 @@ " y", ["punctuation", ":"], " int", - ["punctuation", "|"] + ["closure-punctuation", "|"] + ]], + ["punctuation", "->"], + " int ", + ["punctuation", "{"], + ["punctuation", "}"], + + ["closure-params", [ + ["closure-punctuation", "|"], + ["closure-punctuation", "|"] + ]], + ["punctuation", "{"], + ["punctuation", "}"], + + "\r\n\r\nvec1", + ["punctuation", "."], + ["function", "iter"], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", "."], + ["function", "any"], + ["punctuation", "("], + ["closure-params", [ + ["closure-punctuation", "|"], + ["operator", "&"], + "x", + ["closure-punctuation", "|"] + ]], + " x ", + ["operator", "=="], + ["number", "2"], + ["punctuation", ")"], + ["punctuation", ";"], + + ["function", "foo"], + ["punctuation", "("], + ["number", "123"], + ["punctuation", ","], + ["closure-params", [ + ["closure-punctuation", "|"], + ["closure-punctuation", "|"] + ]], + " x ", + ["operator", "*"], + " x", + ["punctuation", ")"], + ["punctuation", ";"], + + ["keyword", "let"], + " add_one_v2 ", + ["operator", "="], + ["closure-params", [ + ["closure-punctuation", "|"], + "x", + ["punctuation", ":"], + ["keyword", "u32"], + ["closure-punctuation", "|"] ]], ["punctuation", "->"], - " int ", ["punctuation", "{"], ["punctuation", "}"], + ["keyword", "u32"], + ["punctuation", "{"], + " x ", + ["operator", "+"], + ["number", "1"], + ["punctuation", "}"], + ["punctuation", ";"], + + ["keyword", "let"], + " add_one_v3 ", + ["operator", "="], + ["closure-params", [ + ["closure-punctuation", "|"], + "x", + ["closure-punctuation", "|"] + ]], + ["punctuation", "{"], + " x ", + ["operator", "+"], + ["number", "1"], + ["punctuation", "}"], + ["punctuation", ";"], + + ["keyword", "let"], + " add_one_v4 ", + ["operator", "="], + ["closure-params", [ + ["closure-punctuation", "|"], + "x", + ["closure-punctuation", "|"] + ]], + " x ", + ["operator", "+"], + ["number", "1"], + ["punctuation", ";"], + ["keyword", "move"], ["closure-params", [ - ["punctuation", "|"], - ["punctuation", "|"] + ["closure-punctuation", "|"], + ["closure-punctuation", "|"] ]], - ["punctuation", "{"], ["punctuation", "}"] + ["macro", "println!"], + ["punctuation", "("], + ["string", "\"This is a: {}\""], + ["punctuation", ","], + " text", + ["punctuation", ")"] ] ---------------------------------------------------- -Checks for closure params. \ No newline at end of file +Checks for closure params. diff --git a/tests/languages/rust/comment_feature.test b/tests/languages/rust/comment_feature.test index 936702840e..84e1e99e5f 100644 --- a/tests/languages/rust/comment_feature.test +++ b/tests/languages/rust/comment_feature.test @@ -4,15 +4,22 @@ /* foo bar */ +/* /* */ /** */ /*! */ */ +/*! /* */ /** */ /*! */ */ +/** /* */ /** */ /*! */ */ + ---------------------------------------------------- [ ["comment", "//"], ["comment", "// foobar"], ["comment", "/**/"], - ["comment", "/* foo\r\nbar */"] + ["comment", "/* foo\r\nbar */"], + ["comment", "/* /* */ /** */ /*! */ */"], + ["comment", "/*! /* */ /** */ /*! */ */"], + ["comment", "/** /* */ /** */ /*! */ */"] ] ---------------------------------------------------- -Checks for comments. \ No newline at end of file +Checks for comments. diff --git a/tests/languages/rust/function_feature.test b/tests/languages/rust/function_feature.test index 63fcc8b94d..c4a51d434e 100644 --- a/tests/languages/rust/function_feature.test +++ b/tests/languages/rust/function_feature.test @@ -2,22 +2,58 @@ foo ( foobar( foo_bar_42( -foo! ( -foobar![ -foo_bar_42!( +foo_generic::>() + +fn apply(f: F) where F: FnOnce() { + f(); +} ---------------------------------------------------- [ - ["function", "foo"], ["punctuation", "("], - ["function", "foobar"], ["punctuation", "("], - ["function", "foo_bar_42"], ["punctuation", "("], + ["function", "foo"], + ["punctuation", "("], + ["function", "foobar"], + ["punctuation", "("], + ["function", "foo_bar_42"], + ["punctuation", "("], + + ["function", "foo_generic"], + ["punctuation", "::"], + ["operator", "<"], + "T", + ["punctuation", ","], + " Option", + ["operator", "<"], + "T", + ["operator", ">>"], + ["punctuation", "("], + ["punctuation", ")"], - ["function", "foo!"], ["punctuation", "("], - ["function", "foobar!"], ["punctuation", "["], - ["function", "foo_bar_42!"], ["punctuation", "("] + ["keyword", "fn"], + ["function-definition", "apply"], + ["operator", "<"], + "F", + ["operator", ">"], + ["punctuation", "("], + "f", + ["punctuation", ":"], + " F", + ["punctuation", ")"], + ["keyword", "where"], + " F", + ["punctuation", ":"], + " FnOnce", + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", "{"], + ["function", "f"], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", ";"], + ["punctuation", "}"] ] ---------------------------------------------------- -Checks for functions and macros. \ No newline at end of file +Checks for functions and macros. diff --git a/tests/languages/rust/issue1339.test b/tests/languages/rust/issue1339.test index 1dd3208f59..df5d7d8723 100644 --- a/tests/languages/rust/issue1339.test +++ b/tests/languages/rust/issue1339.test @@ -12,7 +12,7 @@ fn foo<'a> (first: &'a str, second: &'a str) => () { } ["punctuation", "["], ["operator", "&"], ["lifetime-annotation", "'static"], - " char", + ["keyword", "char"], ["punctuation", "]"], ["operator", "="], ["operator", "&"], @@ -20,7 +20,7 @@ fn foo<'a> (first: &'a str, second: &'a str) => () { } ["string", "\"2\""], ["punctuation", "]"], ["keyword", "fn"], - " foo", + ["function-definition", "foo"], ["operator", "<"], ["lifetime-annotation", "'a"], ["operator", ">"], @@ -46,4 +46,4 @@ fn foo<'a> (first: &'a str, second: &'a str) => () { } ---------------------------------------------------- -Checks for lifetime annotations in real-world examples. See #1339. \ No newline at end of file +Checks for lifetime annotations in real-world examples. See #1339. diff --git a/tests/languages/rust/keyword_feature.test b/tests/languages/rust/keyword_feature.test index 68b2a623ef..5ec2bb7a6b 100644 --- a/tests/languages/rust/keyword_feature.test +++ b/tests/languages/rust/keyword_feature.test @@ -1,39 +1,109 @@ -abstract alignof as async -await be box break const -continue crate do dyn -else enum extern -false final fn for -if impl in let loop -match mod move mut -offsetof once override -priv pub pure ref -return sizeof static -self Self struct super -true trait type typeof -union unsafe unsized use -virtual where while +abstract +as +async +await +become +box +break +const +continue +crate +do +dyn +else +enum +extern +final +fn; +for +if +impl +in +let +loop +macro +match +mod +move +mut +override +priv +pub +ref +return +self +Self +static +struct +super +trait +try +type +typeof +union +unsafe +unsized +use +virtual +where +while yield ---------------------------------------------------- [ - ["keyword", "abstract"], ["keyword", "alignof"], ["keyword", "as"], ["keyword", "async"], ["keyword", "await"], - ["keyword", "be"], ["keyword", "box"], ["keyword", "break"], ["keyword", "const"], - ["keyword", "continue"], ["keyword", "crate"], ["keyword", "do"], ["keyword", "dyn"], - ["keyword", "else"], ["keyword", "enum"], ["keyword", "extern"], - ["keyword", "false"], ["keyword", "final"], ["keyword", "fn"], ["keyword", "for"], - ["keyword", "if"], ["keyword", "impl"], ["keyword", "in"], ["keyword", "let"], ["keyword", "loop"], - ["keyword", "match"], ["keyword", "mod"], ["keyword", "move"], ["keyword", "mut"], - ["keyword", "offsetof"], ["keyword", "once"], ["keyword", "override"], - ["keyword", "priv"], ["keyword", "pub"], ["keyword", "pure"], ["keyword", "ref"], - ["keyword", "return"], ["keyword", "sizeof"], ["keyword", "static"], - ["keyword", "self"], ["keyword", "Self"], ["keyword", "struct"], ["keyword", "super"], - ["keyword", "true"], ["keyword", "trait"], ["keyword", "type"], ["keyword", "typeof"], - ["keyword", "union"], ["keyword", "unsafe"], ["keyword", "unsized"], ["keyword", "use"], - ["keyword", "virtual"], ["keyword", "where"], ["keyword", "while"], + ["keyword", "abstract"], + ["keyword", "as"], + ["keyword", "async"], + ["keyword", "await"], + ["keyword", "become"], + ["keyword", "box"], + ["keyword", "break"], + ["keyword", "const"], + ["keyword", "continue"], + ["keyword", "crate"], + ["keyword", "do"], + ["keyword", "dyn"], + ["keyword", "else"], + ["keyword", "enum"], + ["keyword", "extern"], + ["keyword", "final"], + ["keyword", "fn"], ["punctuation", ";"], + ["keyword", "for"], + ["keyword", "if"], + ["keyword", "impl"], + ["keyword", "in"], + ["keyword", "let"], + ["keyword", "loop"], + ["keyword", "macro"], + ["keyword", "match"], + ["keyword", "mod"], + ["keyword", "move"], + ["keyword", "mut"], + ["keyword", "override"], + ["keyword", "priv"], + ["keyword", "pub"], + ["keyword", "ref"], + ["keyword", "return"], + ["keyword", "self"], + ["keyword", "Self"], + ["keyword", "static"], + ["keyword", "struct"], + ["keyword", "super"], + ["keyword", "trait"], + ["keyword", "try"], + ["keyword", "type"], + ["keyword", "typeof"], + ["keyword", "union"], + ["keyword", "unsafe"], + ["keyword", "unsized"], + ["keyword", "use"], + ["keyword", "virtual"], + ["keyword", "where"], + ["keyword", "while"], ["keyword", "yield"] ] ---------------------------------------------------- -Checks for all keywords. \ No newline at end of file +Checks for all keywords. diff --git a/tests/languages/rust/lifetime-annotation_feature.test b/tests/languages/rust/lifetime-annotation_feature.test index 02c813debc..5af0e9740a 100644 --- a/tests/languages/rust/lifetime-annotation_feature.test +++ b/tests/languages/rust/lifetime-annotation_feature.test @@ -1,15 +1,19 @@ +'static 'foo 'a +'_ <'a> ---------------------------------------------------- [ + ["lifetime-annotation", "'static"], ["lifetime-annotation", "'foo"], ["lifetime-annotation", "'a"], + ["lifetime-annotation", "'_"], ["operator", "<"], ["lifetime-annotation", "'a"], ["operator", ">"] ] ---------------------------------------------------- -Checks for lifetime annotations. \ No newline at end of file +Checks for lifetime annotations. diff --git a/tests/languages/rust/macro_example.test b/tests/languages/rust/macro_example.test new file mode 100644 index 0000000000..593fe2f90a --- /dev/null +++ b/tests/languages/rust/macro_example.test @@ -0,0 +1,144 @@ +macro_rules! write_html { + ($w:expr, ) => (()); + + ($w:expr, $e:tt) => (write!($w, "{}", $e)); + + ($w:expr, $tag:ident [ $($inner:tt)* ] $($rest:tt)*) => {{ + write!($w, "<{}>", stringify!($tag)); + write_html!($w, $($inner)*); + write!($w, "", stringify!($tag)); + write_html!($w, $($rest)*); + }}; +} + +---------------------------------------------------- + +[ + ["macro", "macro_rules!"], + " write_html ", + ["punctuation", "{"], + + ["punctuation", "("], + ["variable", "$w"], + ["punctuation", ":"], + ["fragment-specifier", "expr"], + ["punctuation", ","], + ["punctuation", ")"], + ["operator", "=>"], + ["punctuation", "("], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", ")"], + ["punctuation", ";"], + + ["punctuation", "("], + ["variable", "$w"], + ["punctuation", ":"], + ["fragment-specifier", "expr"], + ["punctuation", ","], + ["variable", "$e"], + ["punctuation", ":"], + ["fragment-specifier", "tt"], + ["punctuation", ")"], + ["operator", "=>"], + ["punctuation", "("], + ["macro", "write!"], + ["punctuation", "("], + ["variable", "$w"], + ["punctuation", ","], + ["string", "\"{}\""], + ["punctuation", ","], + ["variable", "$e"], + ["punctuation", ")"], + ["punctuation", ")"], + ["punctuation", ";"], + + ["punctuation", "("], + ["variable", "$w"], + ["punctuation", ":"], + ["fragment-specifier", "expr"], + ["punctuation", ","], + ["variable", "$tag"], + ["punctuation", ":"], + ["fragment-specifier", "ident"], + ["punctuation", "["], + " $", + ["punctuation", "("], + ["variable", "$inner"], + ["punctuation", ":"], + ["fragment-specifier", "tt"], + ["punctuation", ")"], + ["operator", "*"], + ["punctuation", "]"], + " $", + ["punctuation", "("], + ["variable", "$rest"], + ["punctuation", ":"], + ["fragment-specifier", "tt"], + ["punctuation", ")"], + ["operator", "*"], + ["punctuation", ")"], + ["operator", "=>"], + ["punctuation", "{"], + ["punctuation", "{"], + + ["macro", "write!"], + ["punctuation", "("], + ["variable", "$w"], + ["punctuation", ","], + ["string", "\"<{}>\""], + ["punctuation", ","], + ["macro", "stringify!"], + ["punctuation", "("], + ["variable", "$tag"], + ["punctuation", ")"], + ["punctuation", ")"], + ["punctuation", ";"], + + ["macro", "write_html!"], + ["punctuation", "("], + ["variable", "$w"], + ["punctuation", ","], + " $", + ["punctuation", "("], + ["variable", "$inner"], + ["punctuation", ")"], + ["operator", "*"], + ["punctuation", ")"], + ["punctuation", ";"], + + ["macro", "write!"], + ["punctuation", "("], + ["variable", "$w"], + ["punctuation", ","], + ["string", "\"\""], + ["punctuation", ","], + ["macro", "stringify!"], + ["punctuation", "("], + ["variable", "$tag"], + ["punctuation", ")"], + ["punctuation", ")"], + ["punctuation", ";"], + + ["macro", "write_html!"], + ["punctuation", "("], + ["variable", "$w"], + ["punctuation", ","], + " $", + ["punctuation", "("], + ["variable", "$rest"], + ["punctuation", ")"], + ["operator", "*"], + ["punctuation", ")"], + ["punctuation", ";"], + + ["punctuation", "}"], + ["punctuation", "}"], + ["punctuation", ";"], + + ["punctuation", "}"] +] + +---------------------------------------------------- + +Checks this macro example. diff --git a/tests/languages/rust/macro-rules_feature.test b/tests/languages/rust/macro_feature.test similarity index 52% rename from tests/languages/rust/macro-rules_feature.test rename to tests/languages/rust/macro_feature.test index 9d30051c3a..ba91479ace 100644 --- a/tests/languages/rust/macro-rules_feature.test +++ b/tests/languages/rust/macro_feature.test @@ -5,11 +5,11 @@ foo_bar_42! ---------------------------------------------------- [ - ["macro-rules", "foo!"], - ["macro-rules", "foo_bar!"], - ["macro-rules", "foo_bar_42!"] + ["macro", "foo!"], + ["macro", "foo_bar!"], + ["macro", "foo_bar_42!"] ] ---------------------------------------------------- -Checks for macro rules. \ No newline at end of file +Checks for macros. diff --git a/tests/languages/rust/number_feature.test b/tests/languages/rust/number_feature.test index 61d6e8a5e7..b4857e9dec 100644 --- a/tests/languages/rust/number_feature.test +++ b/tests/languages/rust/number_feature.test @@ -18,6 +18,8 @@ 4.2f32 4.2f64 +0usize + ---------------------------------------------------- [ @@ -39,9 +41,11 @@ ["number", "3.5E-8u64"], ["number", "4.6e+41i64"], ["number", "4.2f32"], - ["number", "4.2f64"] + ["number", "4.2f64"], + + ["number", "0usize"] ] ---------------------------------------------------- -Checks for numbers. \ No newline at end of file +Checks for numbers. diff --git a/tests/languages/rust/operator_feature.test b/tests/languages/rust/operator_feature.test index ae188f8bc7..ca49cf2d7a 100644 --- a/tests/languages/rust/operator_feature.test +++ b/tests/languages/rust/operator_feature.test @@ -6,7 +6,7 @@ ! != ^ ^= = == => -& && &= +& && &= ; | || |= < << <= <<= > >> >= >>= @@ -23,7 +23,7 @@ ["operator", "!"], ["operator", "!="], ["operator", "^"], ["operator", "^="], ["operator", "="], ["operator", "=="], ["operator", "=>"], - ["operator", "&"], ["operator", "&&"], ["operator", "&="], + ["operator", "&"], ["operator", "&&"], ["operator", "&="], ["punctuation", ";"], ["operator", "|"], ["operator", "||"], ["operator", "|="], ["operator", "<"], ["operator", "<<"], ["operator", "<="], ["operator", "<<="], ["operator", ">"], ["operator", ">>"], ["operator", ">="], ["operator", ">>="], diff --git a/tests/languages/rust/string_feature.test b/tests/languages/rust/string_feature.test index c0667e2668..c9f7637d84 100644 --- a/tests/languages/rust/string_feature.test +++ b/tests/languages/rust/string_feature.test @@ -1,35 +1,53 @@ "" "fo\"obar" +"foo\ + bar" +"foo +bar" b"" b"fo\"obar" r#""# r#"fo"obar"# -r###"foo#bar"### +r###"foo +# +bar"### br#""# br#"fo"obar"# br###"foo#bar"### +r"(?x) +(?P\d{4}) # the year +- +(?P\d{2}) # the month +- +(?P\d{2}) # the day +" + ---------------------------------------------------- [ ["string", "\"\""], ["string", "\"fo\\\"obar\""], + ["string", "\"foo\\\r\n\tbar\""], + ["string", "\"foo\r\nbar\""], ["string", "b\"\""], ["string", "b\"fo\\\"obar\""], ["string", "r#\"\"#"], ["string", "r#\"fo\"obar\"#"], - ["string", "r###\"foo#bar\"###"], + ["string", "r###\"foo\r\n#\r\nbar\"###"], ["string", "br#\"\"#"], ["string", "br#\"fo\"obar\"#"], - ["string", "br###\"foo#bar\"###"] + ["string", "br###\"foo#bar\"###"], + + ["string", "r\"(?x)\r\n(?P\\d{4}) # the year\r\n-\r\n(?P\\d{2}) # the month\r\n-\r\n(?P\\d{2}) # the day\r\n\""] ] ---------------------------------------------------- -Checks for strings. \ No newline at end of file +Checks for strings. From 1946918a5667bb1e6a5fd604b11eb0e1d230c511 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Wed, 13 May 2020 11:25:39 +0200 Subject: [PATCH 0524/1100] Scheme: Improved lambda parameter (#2346) --- components/prism-racket.js | 9 ++++++++- components/prism-racket.min.js | 2 +- components/prism-scheme.js | 15 +++++++++++---- components/prism-scheme.min.js | 2 +- .../scheme/lambda_parameter_feature.test | 17 +++++++++++++++-- 5 files changed, 36 insertions(+), 9 deletions(-) diff --git a/components/prism-racket.js b/components/prism-racket.js index 3face9d42e..f5eaac2b35 100644 --- a/components/prism-racket.js +++ b/components/prism-racket.js @@ -1,4 +1,11 @@ -Prism.languages.racket = Prism.languages.extend('scheme', {}); +Prism.languages.racket = Prism.languages.extend('scheme', { + 'lambda-parameter': { + // the racket lambda syntax is a lot more complex, so we won't even attempt to capture it. + // this will just prevent false positives of the `function` pattern + pattern: /(\(lambda\s+\()[^()'\s]+/, + lookbehind: true + } +}); // Add brackets to racket // The basic idea here is to go through all pattens of Scheme and replace all occurrences of "(" with the union of "(" diff --git a/components/prism-racket.min.js b/components/prism-racket.min.js index 50b08c19dd..5a3e25e8ca 100644 --- a/components/prism-racket.min.js +++ b/components/prism-racket.min.js @@ -1 +1 @@ -Prism.languages.racket=Prism.languages.extend("scheme",{}),Prism.languages.DFS(Prism.languages.racket,function(e,r){if("RegExp"===Prism.util.type(r)){var a=r.source.replace(/\\(.)|\[\^?((?:\\.|[^\\\]])*)\]/g,function(e,r,a){if(r){if("("===r)return"[([]";if(")"===r)return"[)\\]]"}return a?("^"===e[1]?"[^":"[")+a.replace(/\\(.)|[()]/g,function(e,r){return"("===e||"("===r?"([":")"===e||")"===r?")\\]":e})+"]":e});this[e]=RegExp(a,r.flags)}}),Prism.languages.insertBefore("racket","string",{lang:{pattern:/^#lang.+/m,greedy:!0,alias:"keyword"}}),Prism.languages.rkt=Prism.languages.racket; \ No newline at end of file +Prism.languages.racket=Prism.languages.extend("scheme",{"lambda-parameter":{pattern:/(\(lambda\s+\()[^()'\s]+/,lookbehind:!0}}),Prism.languages.DFS(Prism.languages.racket,function(e,a){if("RegExp"===Prism.util.type(a)){var r=a.source.replace(/\\(.)|\[\^?((?:\\.|[^\\\]])*)\]/g,function(e,a,r){if(a){if("("===a)return"[([]";if(")"===a)return"[)\\]]"}return r?("^"===e[1]?"[^":"[")+r.replace(/\\(.)|[()]/g,function(e,a){return"("===e||"("===a?"([":")"===e||")"===a?")\\]":e})+"]":e});this[e]=RegExp(r,a.flags)}}),Prism.languages.insertBefore("racket","string",{lang:{pattern:/^#lang.+/m,greedy:!0,alias:"keyword"}}),Prism.languages.rkt=Prism.languages.racket; \ No newline at end of file diff --git a/components/prism-scheme.js b/components/prism-scheme.js index f284a5d77a..e36aa1ee7f 100644 --- a/components/prism-scheme.js +++ b/components/prism-scheme.js @@ -13,10 +13,17 @@ Prism.languages.scheme = { greedy: true, alias: 'string' }, - 'lambda-parameter': { - pattern: /(\(lambda\s+\()[^()'\s]+/, - lookbehind: true - }, + 'lambda-parameter': [ + // https://www.cs.cmu.edu/Groups/AI/html/r4rs/r4rs_6.html#SEC30 + { + pattern: /(\(lambda\s+)[^()'\s]+/, + lookbehind: true + }, + { + pattern: /(\(lambda\s+\()[^()']+/, + lookbehind: true + } + ], 'keyword': { pattern: /(\()(?:define(?:-library|-macro|-syntax|-values)?|defmacro|(?:case-)?lambda|let(?:(?:\*|rec)?(?:-values)?|-syntax|rec-syntax)|else|if|cond|begin|delay(?:-force)?|parameterize|guard|set!|(?:quasi-)?quote|syntax-(?:case|rules))(?=[()\s]|$)/, lookbehind: true diff --git a/components/prism-scheme.min.js b/components/prism-scheme.min.js index 99aaccbe16..bdd367f019 100644 --- a/components/prism-scheme.min.js +++ b/components/prism-scheme.min.js @@ -1 +1 @@ -Prism.languages.scheme={comment:/;.*/,string:{pattern:/"(?:[^"\\]|\\.)*"/,greedy:!0},symbol:{pattern:/'[^()#'\s]+/,greedy:!0},character:{pattern:/#\\(?:[ux][a-fA-F\d]+|[-a-zA-Z]+|\S)/,greedy:!0,alias:"string"},"lambda-parameter":{pattern:/(\(lambda\s+\()[^()'\s]+/,lookbehind:!0},keyword:{pattern:/(\()(?:define(?:-library|-macro|-syntax|-values)?|defmacro|(?:case-)?lambda|let(?:(?:\*|rec)?(?:-values)?|-syntax|rec-syntax)|else|if|cond|begin|delay(?:-force)?|parameterize|guard|set!|(?:quasi-)?quote|syntax-(?:case|rules))(?=[()\s]|$)/,lookbehind:!0},builtin:{pattern:/(\()(?:(?:cons|car|cdr|list|call-with-current-continuation|call\/cc|append|abs|apply|eval)\b|null\?|pair\?|boolean\?|eof-object\?|char\?|procedure\?|number\?|port\?|string\?|vector\?|symbol\?|bytevector\?)(?=[()\s]|$)/,lookbehind:!0},number:{pattern:/([\s()])(?:(?:#d(?:#[ei])?|#[ei](?:#d)?)?[+-]?(?:(?:\d*\.?\d+(?:[eE][+-]?\d+)?|\d+\/\d+)(?:[+-](?:\d*\.?\d+(?:[eE][+-]?\d+)?|\d+\/\d+)i)?|(?:\d*\.?\d+(?:[eE][+-]?\d+)?|\d+\/\d+)i)|(?:#[box](?:#[ei])?|#[ei](?:#[box])?)[+-]?(?:[\da-fA-F]+(?:\/[\da-fA-F]+)?(?:[+-][\da-fA-F]+(?:\/[\da-fA-F]+)?i)?|[\da-fA-F]+(?:\/[\da-fA-F]+)?i))(?=[()\s]|$)/,lookbehind:!0},boolean:/#[ft](?=[()\s]|$)/,operator:{pattern:/(\()(?:[-+*%\/]|[<>]=?|=>?)(?=[()\s]|$)/,lookbehind:!0},function:{pattern:/(\()[^()'\s]+(?=[()\s]|$)/,lookbehind:!0},punctuation:/[()']/}; \ No newline at end of file +Prism.languages.scheme={comment:/;.*/,string:{pattern:/"(?:[^"\\]|\\.)*"/,greedy:!0},symbol:{pattern:/'[^()#'\s]+/,greedy:!0},character:{pattern:/#\\(?:[ux][a-fA-F\d]+|[-a-zA-Z]+|\S)/,greedy:!0,alias:"string"},"lambda-parameter":[{pattern:/(\(lambda\s+)[^()'\s]+/,lookbehind:!0},{pattern:/(\(lambda\s+\()[^()']+/,lookbehind:!0}],keyword:{pattern:/(\()(?:define(?:-library|-macro|-syntax|-values)?|defmacro|(?:case-)?lambda|let(?:(?:\*|rec)?(?:-values)?|-syntax|rec-syntax)|else|if|cond|begin|delay(?:-force)?|parameterize|guard|set!|(?:quasi-)?quote|syntax-(?:case|rules))(?=[()\s]|$)/,lookbehind:!0},builtin:{pattern:/(\()(?:(?:cons|car|cdr|list|call-with-current-continuation|call\/cc|append|abs|apply|eval)\b|null\?|pair\?|boolean\?|eof-object\?|char\?|procedure\?|number\?|port\?|string\?|vector\?|symbol\?|bytevector\?)(?=[()\s]|$)/,lookbehind:!0},number:{pattern:/([\s()])(?:(?:#d(?:#[ei])?|#[ei](?:#d)?)?[+-]?(?:(?:\d*\.?\d+(?:[eE][+-]?\d+)?|\d+\/\d+)(?:[+-](?:\d*\.?\d+(?:[eE][+-]?\d+)?|\d+\/\d+)i)?|(?:\d*\.?\d+(?:[eE][+-]?\d+)?|\d+\/\d+)i)|(?:#[box](?:#[ei])?|#[ei](?:#[box])?)[+-]?(?:[\da-fA-F]+(?:\/[\da-fA-F]+)?(?:[+-][\da-fA-F]+(?:\/[\da-fA-F]+)?i)?|[\da-fA-F]+(?:\/[\da-fA-F]+)?i))(?=[()\s]|$)/,lookbehind:!0},boolean:/#[ft](?=[()\s]|$)/,operator:{pattern:/(\()(?:[-+*%\/]|[<>]=?|=>?)(?=[()\s]|$)/,lookbehind:!0},function:{pattern:/(\()[^()'\s]+(?=[()\s]|$)/,lookbehind:!0},punctuation:/[()']/}; \ No newline at end of file diff --git a/tests/languages/scheme/lambda_parameter_feature.test b/tests/languages/scheme/lambda_parameter_feature.test index afc03ab76d..a076879750 100644 --- a/tests/languages/scheme/lambda_parameter_feature.test +++ b/tests/languages/scheme/lambda_parameter_feature.test @@ -1,13 +1,26 @@ +(lambda x x) +(lambda (x) x) (lambda (foo bar) (concat foo bar)) ---------------------------------------------------- [ + ["punctuation", "("], + ["keyword", "lambda"], + ["lambda-parameter", "x"], + " x", + ["punctuation", ")"], + ["punctuation", "("], + ["keyword", "lambda"], + ["punctuation", "("], + ["lambda-parameter", "x"], + ["punctuation", ")"], + " x", + ["punctuation", ")"], ["punctuation", "("], ["keyword", "lambda"], ["punctuation", "("], - ["lambda-parameter", "foo"], - " bar", + ["lambda-parameter", "foo bar"], ["punctuation", ")"], ["punctuation", "("], ["function", "concat"], From caec5e3025356daf493599620de08a42e8d39830 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Wed, 13 May 2020 11:26:38 +0200 Subject: [PATCH 0525/1100] Added support for XML doc in C#, F#, and VB.net (#2340) --- components.js | 2 +- components.json | 6 ++ components/prism-xml-doc.js | 40 ++++++++++++ components/prism-xml-doc.min.js | 1 + examples/prism-xml-doc.html | 14 ++++ plugins/autoloader/prism-autoloader.js | 1 + plugins/autoloader/prism-autoloader.min.js | 2 +- plugins/show-language/prism-show-language.js | 1 + .../show-language/prism-show-language.min.js | 2 +- .../languages/csharp!+xml-doc/inclusion.test | 65 +++++++++++++++++++ .../languages/fsharp!+xml-doc/inclusion.test | 65 +++++++++++++++++++ tests/languages/vbnet!+xml-doc/inclusion.test | 65 +++++++++++++++++++ 12 files changed, 261 insertions(+), 3 deletions(-) create mode 100644 components/prism-xml-doc.js create mode 100644 components/prism-xml-doc.min.js create mode 100644 examples/prism-xml-doc.html create mode 100644 tests/languages/csharp!+xml-doc/inclusion.test create mode 100644 tests/languages/fsharp!+xml-doc/inclusion.test create mode 100644 tests/languages/vbnet!+xml-doc/inclusion.test diff --git a/components.js b/components.js index 896edfccd2..0219ce6fca 100644 --- a/components.js +++ b/components.js @@ -1,2 +1,2 @@ -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml","ssml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","ssml":"SSML"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"Augmented Backus–Naur form","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"Backus–Naur form","alias":"rbnf","aliasTitles":{"rbnf":"Routing Backus–Naur form"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dax":{"title":"DAX","owner":"peterbud"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"Extended Backus–Naur form","owner":"RunDevelopment"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"c","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"hlsl":{"title":"HLSL","require":"c","owner":"RunDevelopment"},"http":{"title":"HTTP","optional":["css","javascript","json","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"json":{"title":"JSON","owner":"CupOfTea696"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"purebasic":{"title":"PureBasic","require":"clike","alias":"pbfasm","owner":"HeX0R101"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"racket":{"title":"Racket","require":"scheme","alias":"rkt","owner":"RunDevelopment"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","modify":["actionscript","coffeescript","flow","javascript","typescript","vala"],"owner":"RunDevelopment"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"solidity":{"title":"Solidity (Ethereum)","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","visual-basic"],"owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml","ssml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","ssml":"SSML"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"Augmented Backus–Naur form","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"Backus–Naur form","alias":"rbnf","aliasTitles":{"rbnf":"Routing Backus–Naur form"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dax":{"title":"DAX","owner":"peterbud"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"Extended Backus–Naur form","owner":"RunDevelopment"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"c","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"hlsl":{"title":"HLSL","require":"c","owner":"RunDevelopment"},"http":{"title":"HTTP","optional":["css","javascript","json","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"json":{"title":"JSON","owner":"CupOfTea696"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"purebasic":{"title":"PureBasic","require":"clike","alias":"pbfasm","owner":"HeX0R101"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"racket":{"title":"Racket","require":"scheme","alias":"rkt","owner":"RunDevelopment"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","modify":["actionscript","coffeescript","flow","javascript","typescript","vala"],"owner":"RunDevelopment"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"solidity":{"title":"Solidity (Ethereum)","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","visual-basic"],"owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xml-doc":{"title":"XML doc (.net)","require":"markup","modify":["csharp","fsharp","vbnet"],"owner":"RunDevelopment"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; if (typeof module !== 'undefined' && module.exports) { module.exports = components; } \ No newline at end of file diff --git a/components.json b/components.json index fef85f2cd7..ad1ec642e5 100644 --- a/components.json +++ b/components.json @@ -1145,6 +1145,12 @@ }, "owner": "freakmaxi" }, + "xml-doc": { + "title": "XML doc (.net)", + "require": "markup", + "modify": ["csharp", "fsharp", "vbnet"], + "owner": "RunDevelopment" + }, "xojo": { "title": "Xojo (REALbasic)", "owner": "Golmote" diff --git a/components/prism-xml-doc.js b/components/prism-xml-doc.js new file mode 100644 index 0000000000..34f8f946fb --- /dev/null +++ b/components/prism-xml-doc.js @@ -0,0 +1,40 @@ +(function (Prism) { + + /** + * If the given language is present, it will insert the given doc comment grammar token into it. + * + * @param {string} lang + * @param {any} docComment + */ + function insertDocComment(lang, docComment) { + if (Prism.languages[lang]) { + Prism.languages.insertBefore(lang, 'comment', { + 'doc-comment': docComment + }); + } + } + + var tag = Prism.languages.markup.tag; + + var slashDocComment = { + pattern: /\/\/\/.*/, + greedy: true, + alias: 'comment', + inside: { + 'tag': tag + } + }; + var tickDocComment = { + pattern: /'''.*/, + greedy: true, + alias: 'comment', + inside: { + 'tag': tag + } + }; + + insertDocComment('csharp', slashDocComment); + insertDocComment('fsharp', slashDocComment); + insertDocComment('vbnet', tickDocComment); + +}(Prism)); diff --git a/components/prism-xml-doc.min.js b/components/prism-xml-doc.min.js new file mode 100644 index 0000000000..8a80d65342 --- /dev/null +++ b/components/prism-xml-doc.min.js @@ -0,0 +1 @@ +!function(n){function a(a,e){n.languages[a]&&n.languages.insertBefore(a,"comment",{"doc-comment":e})}var e=n.languages.markup.tag,t={pattern:/\/\/\/.*/,greedy:!0,alias:"comment",inside:{tag:e}},g={pattern:/'''.*/,greedy:!0,alias:"comment",inside:{tag:e}};a("csharp",t),a("fsharp",t),a("vbnet",g)}(Prism); \ No newline at end of file diff --git a/examples/prism-xml-doc.html b/examples/prism-xml-doc.html new file mode 100644 index 0000000000..0e815617db --- /dev/null +++ b/examples/prism-xml-doc.html @@ -0,0 +1,14 @@ +

        C#

        +
        /// <summary>
        +/// Summary documentation goes here.
        +/// </summary>
        + +

        F#

        +
        /// <summary>
        +/// Summary documentation goes here.
        +/// </summary>
        + +

        VB.net

        +
        ''' <summary>
        +''' Summary documentation goes here.
        +''' </summary>
        diff --git a/plugins/autoloader/prism-autoloader.js b/plugins/autoloader/prism-autoloader.js index defb42abd4..0d87437af7 100644 --- a/plugins/autoloader/prism-autoloader.js +++ b/plugins/autoloader/prism-autoloader.js @@ -141,6 +141,7 @@ "velocity": "markup", "wiki": "markup", "xeora": "markup", + "xml-doc": "markup", "xquery": "markup" }/*]*/; diff --git a/plugins/autoloader/prism-autoloader.min.js b/plugins/autoloader/prism-autoloader.min.js index 8411f7f2fc..d5e7ed2db0 100644 --- a/plugins/autoloader/prism-autoloader.min.js +++ b/plugins/autoloader/prism-autoloader.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof self&&self.Prism&&self.document&&document.createElement){var c={javascript:"clike",actionscript:"javascript",arduino:"cpp",aspnet:["markup","csharp"],bison:"c",c:"clike",csharp:"clike",cpp:"c",coffeescript:"javascript",crystal:"ruby","css-extras":"css",d:"clike",dart:"clike",django:"markup-templating",ejs:["javascript","markup-templating"],etlua:["lua","markup-templating"],erb:["ruby","markup-templating"],fsharp:"clike","firestore-security-rules":"clike",flow:"javascript",ftl:"markup-templating",glsl:"c",gml:"clike",go:"clike",groovy:"clike",haml:"ruby",handlebars:"markup-templating",haxe:"clike",hlsl:"c",java:"clike",javadoc:["markup","java","javadoclike"],jolie:"clike",jsdoc:["javascript","javadoclike"],"js-extras":"javascript","js-templates":"javascript",jsonp:"json",json5:"json",kotlin:"clike",latte:["clike","markup-templating","php"],less:"css",lilypond:"scheme",markdown:"markup","markup-templating":"markup",n4js:"javascript",nginx:"clike",objectivec:"c",opencl:"c",parser:"markup",php:["clike","markup-templating"],phpdoc:["php","javadoclike"],"php-extras":"php",plsql:"sql",processing:"clike",protobuf:"clike",pug:["markup","javascript"],purebasic:"clike",qml:"javascript",qore:"clike",racket:"scheme",jsx:["markup","javascript"],tsx:["jsx","typescript"],reason:"clike",ruby:"clike",sass:"css",scss:"css",scala:"java","shell-session":"bash",smarty:"markup-templating",solidity:"clike",soy:"markup-templating",sparql:"turtle",sqf:"clike",swift:"clike",tap:"yaml",textile:"markup",tt2:["clike","markup-templating"],twig:"markup",typescript:"javascript","t4-cs":["t4-templating","csharp"],"t4-vb":["t4-templating","visual-basic"],vala:"clike",vbnet:"basic",velocity:"markup",wiki:"markup",xeora:"markup",xquery:"markup"},l={html:"markup",xml:"markup",svg:"markup",mathml:"markup",ssml:"markup",js:"javascript",g4:"antlr4",adoc:"asciidoc",shell:"bash",shortcode:"bbcode",rbnf:"bnf",conc:"concurnas",cs:"csharp",dotnet:"csharp",coffee:"coffeescript",jinja2:"django","dns-zone":"dns-zone-file",dockerfile:"docker",eta:"ejs",xlsx:"excel-formula",xls:"excel-formula",gamemakerlanguage:"gml",hs:"haskell",tex:"latex",context:"latex",ly:"lilypond",emacs:"lisp",elisp:"lisp","emacs-lisp":"lisp",md:"markdown",moon:"moonscript",n4jsd:"n4js",objc:"objectivec",objectpascal:"pascal",px:"pcaxis",pcode:"peoplecode",pq:"powerquery",mscript:"powerquery",pbfasm:"purebasic",py:"python",rkt:"racket",robot:"robotframework",rb:"ruby",sln:"solution-file",rq:"sparql",trig:"turtle",ts:"typescript",t4:"t4-cs",uscript:"unrealscript",uc:"unrealscript",vb:"visual-basic",xeoracube:"xeora",yml:"yaml"},n={},e="components/",a=Prism.util.currentScript();if(a){var t=/\bplugins\/autoloader\/prism-autoloader\.(?:min\.)js(?:\?[^\r\n/]*)?$/i,r=/(^|\/)[\w-]+\.(?:min\.)js(?:\?[^\r\n/]*)?$/i,s=a.getAttribute("data-autoloader-path");if(null!=s)e=s.trim().replace(/\/?$/,"/");else{var i=a.src;t.test(i)?e=i.replace(t,"components/"):r.test(i)&&(e=i.replace(r,"$1components/"))}}var p=Prism.plugins.autoloader={languages_path:e,use_minified:!0,loadLanguages:o};Prism.hooks.add("complete",function(e){e.element&&e.language&&!e.grammar&&"none"!==e.language&&function(e,a){e in l&&(e=l[e]);var t=(a.getAttribute("data-dependencies")||"").trim();if(!t){var r=a.parentElement;r&&"pre"===r.tagName.toLowerCase()&&(t=(r.getAttribute("data-dependencies")||"").trim())}o(t?t.split(/\s*,\s*/g):[],function(){u(e,function(){Prism.highlightElement(a)})})}(e.language,e.element)})}function o(e,a,t){"string"==typeof e&&(e=[e]);var r=e.length,s=0,i=!1;function c(){i||++s===r&&a&&a(e)}0!==r?e.forEach(function(e){u(e,c,function(){i||(i=!0,t&&t(e))})}):a&&setTimeout(a,0)}function u(a,t,r){var s=0<=a.indexOf("!");a=a.replace("!",""),a=l[a]||a;var e=function(){var e=n[a];if(e||(e=n[a]={callbacks:[]}),e.callbacks.push({success:t,error:r}),!s&&Prism.languages[a])m(a,"success");else if(!s&&e.error)m(a,"error");else if(s||!e.loading){e.loading=!0,function(e,a,t){var r=document.createElement("script");r.src=e,r.async=!0,r.onload=function(){document.body.removeChild(r),a&&a()},r.onerror=function(){document.body.removeChild(r),t&&t()},document.body.appendChild(r)}(function(e){return p.languages_path+"prism-"+e+(p.use_minified?".min":"")+".js"}(a),function(){e.loading=!1,m(a,"success")},function(){e.loading=!1,e.error=!0,m(a,"error")})}},i=c[a];i&&i.length?o(i,e,r):e()}function m(e,a){if(n[e]){for(var t=n[e].callbacks,r=0,s=t.length;r +/// Class level summary documentation goes here. +/// +/// +/// Longer comments can be associated with a type or member through +/// the remarks tag. +/// + +---------------------------------------------------- + +[ + ["doc-comment", [ + "/// ", + ["tag", [ + ["tag", [ + ["punctuation", "<"], + "summary" + ]], + ["punctuation", ">"] + ]] + ]], + ["doc-comment", [ + "/// Class level summary documentation goes here." + ]], + ["doc-comment", [ + "/// ", + ["tag", [ + ["tag", [ + ["punctuation", ""] + ]] + ]], + ["doc-comment", [ + "/// ", + ["tag", [ + ["tag", [ + ["punctuation", "<"], + "remarks" + ]], + ["punctuation", ">"] + ]] + ]], + ["doc-comment", [ + "/// Longer comments can be associated with a type or member through" + ]], + ["doc-comment", [ + "/// the remarks tag." + ]], + ["doc-comment", [ + "/// ", + ["tag", [ + ["tag", [ + ["punctuation", ""] + ]] + ]] +] + +---------------------------------------------------- + +Checks for XML documentation comments. diff --git a/tests/languages/fsharp!+xml-doc/inclusion.test b/tests/languages/fsharp!+xml-doc/inclusion.test new file mode 100644 index 0000000000..828c9f5b69 --- /dev/null +++ b/tests/languages/fsharp!+xml-doc/inclusion.test @@ -0,0 +1,65 @@ +/// +/// Class level summary documentation goes here. +/// +/// +/// Longer comments can be associated with a type or member through +/// the remarks tag. +/// + +---------------------------------------------------- + +[ + ["doc-comment", [ + "/// ", + ["tag", [ + ["tag", [ + ["punctuation", "<"], + "summary" + ]], + ["punctuation", ">"] + ]] + ]], + ["doc-comment", [ + "/// Class level summary documentation goes here." + ]], + ["doc-comment", [ + "/// ", + ["tag", [ + ["tag", [ + ["punctuation", ""] + ]] + ]], + ["doc-comment", [ + "/// ", + ["tag", [ + ["tag", [ + ["punctuation", "<"], + "remarks" + ]], + ["punctuation", ">"] + ]] + ]], + ["doc-comment", [ + "/// Longer comments can be associated with a type or member through" + ]], + ["doc-comment", [ + "/// the remarks tag." + ]], + ["doc-comment", [ + "/// ", + ["tag", [ + ["tag", [ + ["punctuation", ""] + ]] + ]] +] + +---------------------------------------------------- + +Checks for XML documentation comments. diff --git a/tests/languages/vbnet!+xml-doc/inclusion.test b/tests/languages/vbnet!+xml-doc/inclusion.test new file mode 100644 index 0000000000..aa80f0a72a --- /dev/null +++ b/tests/languages/vbnet!+xml-doc/inclusion.test @@ -0,0 +1,65 @@ +''' +''' Class level summary documentation goes here. +''' +''' +''' Longer comments can be associated with a type or member through +''' the remarks tag. +''' + +---------------------------------------------------- + +[ + ["doc-comment", [ + "''' ", + ["tag", [ + ["tag", [ + ["punctuation", "<"], + "summary" + ]], + ["punctuation", ">"] + ]] + ]], + ["doc-comment", [ + "''' Class level summary documentation goes here." + ]], + ["doc-comment", [ + "''' ", + ["tag", [ + ["tag", [ + ["punctuation", ""] + ]] + ]], + ["doc-comment", [ + "''' ", + ["tag", [ + ["tag", [ + ["punctuation", "<"], + "remarks" + ]], + ["punctuation", ">"] + ]] + ]], + ["doc-comment", [ + "''' Longer comments can be associated with a type or member through" + ]], + ["doc-comment", [ + "''' the remarks tag." + ]], + ["doc-comment", [ + "''' ", + ["tag", [ + ["tag", [ + ["punctuation", ""] + ]] + ]] +] + +---------------------------------------------------- + +Checks for XML documentation comments. From b609333997350cbd24cfac62c273d909b7c093e0 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Wed, 13 May 2020 11:32:36 +0200 Subject: [PATCH 0526/1100] T4-VB: Use the right VB variant (#2341) I used the wrong VB variant when creating T4 VB. It should have been VB.net. --- components.js | 2 +- components.json | 2 +- components/prism-t4-vb.js | 2 +- components/prism-t4-vb.min.js | 2 +- plugins/autoloader/prism-autoloader.js | 2 +- plugins/autoloader/prism-autoloader.min.js | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/components.js b/components.js index 0219ce6fca..bc6a408753 100644 --- a/components.js +++ b/components.js @@ -1,2 +1,2 @@ -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml","ssml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","ssml":"SSML"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"Augmented Backus–Naur form","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"Backus–Naur form","alias":"rbnf","aliasTitles":{"rbnf":"Routing Backus–Naur form"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dax":{"title":"DAX","owner":"peterbud"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"Extended Backus–Naur form","owner":"RunDevelopment"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"c","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"hlsl":{"title":"HLSL","require":"c","owner":"RunDevelopment"},"http":{"title":"HTTP","optional":["css","javascript","json","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"json":{"title":"JSON","owner":"CupOfTea696"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"purebasic":{"title":"PureBasic","require":"clike","alias":"pbfasm","owner":"HeX0R101"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"racket":{"title":"Racket","require":"scheme","alias":"rkt","owner":"RunDevelopment"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","modify":["actionscript","coffeescript","flow","javascript","typescript","vala"],"owner":"RunDevelopment"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"solidity":{"title":"Solidity (Ethereum)","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","visual-basic"],"owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xml-doc":{"title":"XML doc (.net)","require":"markup","modify":["csharp","fsharp","vbnet"],"owner":"RunDevelopment"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml","ssml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","ssml":"SSML"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"Augmented Backus–Naur form","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"Backus–Naur form","alias":"rbnf","aliasTitles":{"rbnf":"Routing Backus–Naur form"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dax":{"title":"DAX","owner":"peterbud"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"Extended Backus–Naur form","owner":"RunDevelopment"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"c","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"hlsl":{"title":"HLSL","require":"c","owner":"RunDevelopment"},"http":{"title":"HTTP","optional":["css","javascript","json","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"json":{"title":"JSON","owner":"CupOfTea696"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"purebasic":{"title":"PureBasic","require":"clike","alias":"pbfasm","owner":"HeX0R101"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"racket":{"title":"Racket","require":"scheme","alias":"rkt","owner":"RunDevelopment"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","modify":["actionscript","coffeescript","flow","javascript","typescript","vala"],"owner":"RunDevelopment"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"solidity":{"title":"Solidity (Ethereum)","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","vbnet"],"owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xml-doc":{"title":"XML doc (.net)","require":"markup","modify":["csharp","fsharp","vbnet"],"owner":"RunDevelopment"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; if (typeof module !== 'undefined' && module.exports) { module.exports = components; } \ No newline at end of file diff --git a/components.json b/components.json index ad1ec642e5..8a4f85865d 100644 --- a/components.json +++ b/components.json @@ -1079,7 +1079,7 @@ }, "t4-vb": { "title": "T4 Text Templates (VB)", - "require": ["t4-templating", "visual-basic"], + "require": ["t4-templating", "vbnet"], "owner": "RunDevelopment" }, "t4-templating": { diff --git a/components/prism-t4-vb.js b/components/prism-t4-vb.js index 321991dbc6..7571b112a9 100644 --- a/components/prism-t4-vb.js +++ b/components/prism-t4-vb.js @@ -1 +1 @@ -Prism.languages['t4-vb'] = Prism.languages['t4-templating'].createT4('visual-basic'); +Prism.languages['t4-vb'] = Prism.languages['t4-templating'].createT4('vbnet'); diff --git a/components/prism-t4-vb.min.js b/components/prism-t4-vb.min.js index 5c4f55015c..23b0ddad8f 100644 --- a/components/prism-t4-vb.min.js +++ b/components/prism-t4-vb.min.js @@ -1 +1 @@ -Prism.languages["t4-vb"]=Prism.languages["t4-templating"].createT4("visual-basic"); \ No newline at end of file +Prism.languages["t4-vb"]=Prism.languages["t4-templating"].createT4("vbnet"); \ No newline at end of file diff --git a/plugins/autoloader/prism-autoloader.js b/plugins/autoloader/prism-autoloader.js index 0d87437af7..abe4b01aa0 100644 --- a/plugins/autoloader/prism-autoloader.js +++ b/plugins/autoloader/prism-autoloader.js @@ -134,7 +134,7 @@ ], "t4-vb": [ "t4-templating", - "visual-basic" + "vbnet" ], "vala": "clike", "vbnet": "basic", diff --git a/plugins/autoloader/prism-autoloader.min.js b/plugins/autoloader/prism-autoloader.min.js index d5e7ed2db0..e25aea2eec 100644 --- a/plugins/autoloader/prism-autoloader.min.js +++ b/plugins/autoloader/prism-autoloader.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof self&&self.Prism&&self.document&&document.createElement){var c={javascript:"clike",actionscript:"javascript",arduino:"cpp",aspnet:["markup","csharp"],bison:"c",c:"clike",csharp:"clike",cpp:"c",coffeescript:"javascript",crystal:"ruby","css-extras":"css",d:"clike",dart:"clike",django:"markup-templating",ejs:["javascript","markup-templating"],etlua:["lua","markup-templating"],erb:["ruby","markup-templating"],fsharp:"clike","firestore-security-rules":"clike",flow:"javascript",ftl:"markup-templating",glsl:"c",gml:"clike",go:"clike",groovy:"clike",haml:"ruby",handlebars:"markup-templating",haxe:"clike",hlsl:"c",java:"clike",javadoc:["markup","java","javadoclike"],jolie:"clike",jsdoc:["javascript","javadoclike"],"js-extras":"javascript","js-templates":"javascript",jsonp:"json",json5:"json",kotlin:"clike",latte:["clike","markup-templating","php"],less:"css",lilypond:"scheme",markdown:"markup","markup-templating":"markup",n4js:"javascript",nginx:"clike",objectivec:"c",opencl:"c",parser:"markup",php:["clike","markup-templating"],phpdoc:["php","javadoclike"],"php-extras":"php",plsql:"sql",processing:"clike",protobuf:"clike",pug:["markup","javascript"],purebasic:"clike",qml:"javascript",qore:"clike",racket:"scheme",jsx:["markup","javascript"],tsx:["jsx","typescript"],reason:"clike",ruby:"clike",sass:"css",scss:"css",scala:"java","shell-session":"bash",smarty:"markup-templating",solidity:"clike",soy:"markup-templating",sparql:"turtle",sqf:"clike",swift:"clike",tap:"yaml",textile:"markup",tt2:["clike","markup-templating"],twig:"markup",typescript:"javascript","t4-cs":["t4-templating","csharp"],"t4-vb":["t4-templating","visual-basic"],vala:"clike",vbnet:"basic",velocity:"markup",wiki:"markup",xeora:"markup","xml-doc":"markup",xquery:"markup"},l={html:"markup",xml:"markup",svg:"markup",mathml:"markup",ssml:"markup",js:"javascript",g4:"antlr4",adoc:"asciidoc",shell:"bash",shortcode:"bbcode",rbnf:"bnf",conc:"concurnas",cs:"csharp",dotnet:"csharp",coffee:"coffeescript",jinja2:"django","dns-zone":"dns-zone-file",dockerfile:"docker",eta:"ejs",xlsx:"excel-formula",xls:"excel-formula",gamemakerlanguage:"gml",hs:"haskell",tex:"latex",context:"latex",ly:"lilypond",emacs:"lisp",elisp:"lisp","emacs-lisp":"lisp",md:"markdown",moon:"moonscript",n4jsd:"n4js",objc:"objectivec",objectpascal:"pascal",px:"pcaxis",pcode:"peoplecode",pq:"powerquery",mscript:"powerquery",pbfasm:"purebasic",py:"python",rkt:"racket",robot:"robotframework",rb:"ruby",sln:"solution-file",rq:"sparql",trig:"turtle",ts:"typescript",t4:"t4-cs",uscript:"unrealscript",uc:"unrealscript",vb:"visual-basic",xeoracube:"xeora",yml:"yaml"},n={},e="components/",a=Prism.util.currentScript();if(a){var t=/\bplugins\/autoloader\/prism-autoloader\.(?:min\.)js(?:\?[^\r\n/]*)?$/i,r=/(^|\/)[\w-]+\.(?:min\.)js(?:\?[^\r\n/]*)?$/i,s=a.getAttribute("data-autoloader-path");if(null!=s)e=s.trim().replace(/\/?$/,"/");else{var i=a.src;t.test(i)?e=i.replace(t,"components/"):r.test(i)&&(e=i.replace(r,"$1components/"))}}var p=Prism.plugins.autoloader={languages_path:e,use_minified:!0,loadLanguages:o};Prism.hooks.add("complete",function(e){e.element&&e.language&&!e.grammar&&"none"!==e.language&&function(e,a){e in l&&(e=l[e]);var t=(a.getAttribute("data-dependencies")||"").trim();if(!t){var r=a.parentElement;r&&"pre"===r.tagName.toLowerCase()&&(t=(r.getAttribute("data-dependencies")||"").trim())}o(t?t.split(/\s*,\s*/g):[],function(){m(e,function(){Prism.highlightElement(a)})})}(e.language,e.element)})}function o(e,a,t){"string"==typeof e&&(e=[e]);var r=e.length,s=0,i=!1;function c(){i||++s===r&&a&&a(e)}0!==r?e.forEach(function(e){m(e,c,function(){i||(i=!0,t&&t(e))})}):a&&setTimeout(a,0)}function m(a,t,r){var s=0<=a.indexOf("!");a=a.replace("!",""),a=l[a]||a;var e=function(){var e=n[a];if(e||(e=n[a]={callbacks:[]}),e.callbacks.push({success:t,error:r}),!s&&Prism.languages[a])u(a,"success");else if(!s&&e.error)u(a,"error");else if(s||!e.loading){e.loading=!0,function(e,a,t){var r=document.createElement("script");r.src=e,r.async=!0,r.onload=function(){document.body.removeChild(r),a&&a()},r.onerror=function(){document.body.removeChild(r),t&&t()},document.body.appendChild(r)}(function(e){return p.languages_path+"prism-"+e+(p.use_minified?".min":"")+".js"}(a),function(){e.loading=!1,u(a,"success")},function(){e.loading=!1,e.error=!0,u(a,"error")})}},i=c[a];i&&i.length?o(i,e,r):e()}function u(e,a){if(n[e]){for(var t=n[e].callbacks,r=0,s=t.length;r Date: Wed, 13 May 2020 11:59:18 +0200 Subject: [PATCH 0527/1100] C++: Improved class name detection (#2348) --- components/prism-cpp.js | 78 +++++++++---- components/prism-cpp.min.js | 2 +- tests/languages/cpp/base-clause_feature.test | 117 +++++++++++++++++++ tests/languages/cpp/class-name_feature.test | 39 ++++++- tests/languages/cpp/issue2347.test | 72 ++++++++++++ 5 files changed, 286 insertions(+), 22 deletions(-) create mode 100644 tests/languages/cpp/base-clause_feature.test create mode 100644 tests/languages/cpp/issue2347.test diff --git a/components/prism-cpp.js b/components/prism-cpp.js index 8903840101..0de2ed5b5f 100644 --- a/components/prism-cpp.js +++ b/components/prism-cpp.js @@ -1,21 +1,59 @@ -Prism.languages.cpp = Prism.languages.extend('c', { - 'class-name': { - pattern: /(\b(?:class|enum|struct)\s+)(?!class|enum|struct)\w+/, - lookbehind: true - }, - 'keyword': /\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char8_t|char16_t|char32_t|class|compl|concept|const|consteval|constexpr|constinit|const_cast|continue|co_await|co_return|co_yield|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|float|for|friend|goto|if|inline|int|int8_t|int16_t|int32_t|int64_t|uint8_t|uint16_t|uint32_t|uint64_t|long|mutable|namespace|new|noexcept|nullptr|operator|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/, - 'number': { - pattern: /(?:\b0b[01']+|\b0x(?:[\da-f']+\.?[\da-f']*|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+\.?[\d']*|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]*/i, - greedy: true - }, - 'operator': />>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/, - 'boolean': /\b(?:true|false)\b/ -}); +(function (Prism) { -Prism.languages.insertBefore('cpp', 'string', { - 'raw-string': { - pattern: /R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/, - alias: 'string', - greedy: true - } -}); + var keyword = /\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char8_t|char16_t|char32_t|class|compl|concept|const|consteval|constexpr|constinit|const_cast|continue|co_await|co_return|co_yield|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|float|for|friend|goto|if|inline|int|int8_t|int16_t|int32_t|int64_t|uint8_t|uint16_t|uint32_t|uint64_t|long|mutable|namespace|new|noexcept|nullptr|operator|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/; + + Prism.languages.cpp = Prism.languages.extend('c', { + 'class-name': [ + { + pattern: RegExp(/(\b(?:class|enum|struct|typename)\s+)(?!)\w+/.source + .replace(//g, function () { return keyword.source; })), + lookbehind: true + }, + // This is intended to capture the class name of method implementations like: + // void foo::bar() const {} + // However! The `foo` in the above example could also be a namespace, so we only capture the class name if + // it starts with an uppercase letter. This approximation should give decent results. + /\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/, + // This will capture the class name before destructors like: + // Foo::~Foo() {} + /\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i, + { + // This also intends to capture the class name of method implementations but here the class has template + // parameters, so it can't be a namespace (until C++ adds generic namespaces). + pattern: /\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/, + inside: null // see below + } + ], + 'keyword': keyword, + 'number': { + pattern: /(?:\b0b[01']+|\b0x(?:[\da-f']+\.?[\da-f']*|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+\.?[\d']*|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]*/i, + greedy: true + }, + 'operator': />>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/, + 'boolean': /\b(?:true|false)\b/ + }); + + Prism.languages.insertBefore('cpp', 'string', { + 'raw-string': { + pattern: /R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/, + alias: 'string', + greedy: true + } + }); + + Prism.languages.insertBefore('cpp', 'class-name', { + // the base clause is an optional list of parent classes + // https://en.cppreference.com/w/cpp/language/class + 'base-clause': { + pattern: /(\b(?:class|struct)\s+\w+\s*:\s*)(?:[^;{}"'])+?(?=\s*[;{])/, + lookbehind: true, + greedy: true, + inside: Prism.languages.extend('cpp', {}) + } + }); + Prism.languages.insertBefore('inside', 'operator', { + // All untokenized words that are not namespaces should be class names + 'class-name': /\b[a-z_]\w*\b(?!\s*::)/i + }, Prism.languages.cpp['base-clause']); + +}(Prism)); diff --git a/components/prism-cpp.min.js b/components/prism-cpp.min.js index 2f0af4f881..f31882471c 100644 --- a/components/prism-cpp.min.js +++ b/components/prism-cpp.min.js @@ -1 +1 @@ -Prism.languages.cpp=Prism.languages.extend("c",{"class-name":{pattern:/(\b(?:class|enum|struct)\s+)(?!class|enum|struct)\w+/,lookbehind:!0},keyword:/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char8_t|char16_t|char32_t|class|compl|concept|const|consteval|constexpr|constinit|const_cast|continue|co_await|co_return|co_yield|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|float|for|friend|goto|if|inline|int|int8_t|int16_t|int32_t|int64_t|uint8_t|uint16_t|uint32_t|uint64_t|long|mutable|namespace|new|noexcept|nullptr|operator|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+\.?[\da-f']*|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+\.?[\d']*|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]*/i,greedy:!0},operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:true|false)\b/}),Prism.languages.insertBefore("cpp","string",{"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}); \ No newline at end of file +!function(e){var t=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char8_t|char16_t|char32_t|class|compl|concept|const|consteval|constexpr|constinit|const_cast|continue|co_await|co_return|co_yield|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|float|for|friend|goto|if|inline|int|int8_t|int16_t|int32_t|int64_t|uint8_t|uint16_t|uint32_t|uint64_t|long|mutable|namespace|new|noexcept|nullptr|operator|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/;e.languages.cpp=e.languages.extend("c",{"class-name":[{pattern:RegExp("(\\b(?:class|enum|struct|typename)\\s+)(?!)\\w+".replace(//g,function(){return t.source})),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,{pattern:/\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/,inside:null}],keyword:t,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+\.?[\da-f']*|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+\.?[\d']*|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]*/i,greedy:!0},operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:true|false)\b/}),e.languages.insertBefore("cpp","string",{"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),e.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)(?:[^;{}"'])+?(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:e.languages.extend("cpp",{})}}),e.languages.insertBefore("inside","operator",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},e.languages.cpp["base-clause"])}(Prism); \ No newline at end of file diff --git a/tests/languages/cpp/base-clause_feature.test b/tests/languages/cpp/base-clause_feature.test new file mode 100644 index 0000000000..4d9247bbc4 --- /dev/null +++ b/tests/languages/cpp/base-clause_feature.test @@ -0,0 +1,117 @@ +struct Base {}; +struct Derived : Base {}; +struct Derived : private Base; +class X : public virtual B {}; +class Y : virtual public B {}; +class Y : virtual baz::B {}; +class Z : public B; +struct AA : X, Y, foo::bar::Z {}; + +class service : private Transport // comment +{}; + +---------------------------------------------------- + +[ + ["keyword", "struct"], + ["class-name", "Base"], + ["punctuation", "{"], + ["punctuation", "}"], + ["punctuation", ";"], + ["keyword", "struct"], + ["class-name", "Derived"], + ["operator", ":"], + ["base-clause", [ + ["class-name", "Base"] + ]], + ["punctuation", "{"], + ["punctuation", "}"], + ["punctuation", ";"], + ["keyword", "struct"], + ["class-name", "Derived"], + ["operator", ":"], + ["base-clause", [ + ["keyword", "private"], + ["class-name", "Base"] + ]], + ["punctuation", ";"], + ["keyword", "class"], + ["class-name", "X"], + ["operator", ":"], + ["base-clause", [ + ["keyword", "public"], + ["keyword", "virtual"], + ["class-name", "B"] + ]], + ["punctuation", "{"], + ["punctuation", "}"], + ["punctuation", ";"], + ["keyword", "class"], + ["class-name", "Y"], + ["operator", ":"], + ["base-clause", [ + ["keyword", "virtual"], + ["keyword", "public"], + ["class-name", "B"] + ]], + ["punctuation", "{"], + ["punctuation", "}"], + ["punctuation", ";"], + ["keyword", "class"], + ["class-name", "Y"], + ["operator", ":"], + ["base-clause", [ + ["keyword", "virtual"], + " baz", + ["operator", "::"], + ["class-name", "B"] + ]], + ["punctuation", "{"], + ["punctuation", "}"], + ["punctuation", ";"], + ["keyword", "class"], + ["class-name", "Z"], + ["operator", ":"], + ["base-clause", [ + ["keyword", "public"], + ["class-name", "B"], + ["operator", "<"], + "foo", + ["operator", "::"], + ["class-name", "T"], + ["operator", ">"] + ]], + ["punctuation", ";"], + ["keyword", "struct"], + ["class-name", "AA"], + ["operator", ":"], + ["base-clause", [ + ["class-name", "X"], + ["punctuation", ","], + ["class-name", "Y"], + ["punctuation", ","], + " foo", + ["operator", "::"], + "bar", + ["operator", "::"], + ["class-name", "Z"] + ]], + ["punctuation", "{"], + ["punctuation", "}"], + ["punctuation", ";"], + ["keyword", "class"], + ["class-name", "service"], + ["operator", ":"], + ["base-clause", [ + ["keyword", "private"], + ["class-name", "Transport"], + ["comment", "// comment"] + ]], + ["punctuation", "{"], + ["punctuation", "}"], + ["punctuation", ";"] +] + +---------------------------------------------------- + +Checks for the base clauses of classes and structs. diff --git a/tests/languages/cpp/class-name_feature.test b/tests/languages/cpp/class-name_feature.test index 2f79a4cd9a..c3b7a01db7 100644 --- a/tests/languages/cpp/class-name_feature.test +++ b/tests/languages/cpp/class-name_feature.test @@ -3,6 +3,11 @@ class Foo_bar struct foo enum bar enum class FooBar +template + +void Foo::bar() {} +Foo::~Foo() {} +void Foo::bar() {} ---------------------------------------------------- @@ -11,7 +16,39 @@ enum class FooBar ["keyword", "class"], ["class-name", "Foo_bar"], ["keyword", "struct"], ["class-name", "foo"], ["keyword", "enum"], ["class-name", "bar"], - ["keyword", "enum"], ["keyword", "class"], ["class-name", "FooBar"] + ["keyword", "enum"], ["keyword", "class"], ["class-name", "FooBar"], + ["keyword", "template"], ["operator", "<"], ["keyword", "typename"], ["class-name", "FooBar"], ["operator", ">"], + + + ["keyword", "void"], + ["class-name", "Foo"], + ["operator", "::"], + ["function", "bar"], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", "{"], + ["punctuation", "}"], + + ["class-name", "Foo"], + ["operator", "::"], + ["operator", "~"], + ["function", "Foo"], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", "{"], + ["punctuation", "}"], + + ["keyword", "void"], + ["class-name", "Foo"], + ["operator", "<"], + ["keyword", "int"], + ["operator", ">"], + ["operator", "::"], + ["function", "bar"], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", "{"], + ["punctuation", "}"] ] ---------------------------------------------------- diff --git a/tests/languages/cpp/issue2347.test b/tests/languages/cpp/issue2347.test new file mode 100644 index 0000000000..9f302201b6 --- /dev/null +++ b/tests/languages/cpp/issue2347.test @@ -0,0 +1,72 @@ +class MainWindow : public QMainWindow +{ + Q_OBJECT + + private slots: + void changeWindowTitle(); +}; +void MainWindow::changeWindowTitle() +{ + setWindowTitle(plainTextEdit->currentFile.split("/").last() + " - Notepanda"); +} + +---------------------------------------------------- + +[ + ["keyword", "class"], + ["class-name", "MainWindow"], + ["operator", ":"], + ["base-clause", [ + ["keyword", "public"], + ["class-name", "QMainWindow"] + ]], + + ["punctuation", "{"], + + "\n Q_OBJECT\n\n ", + + ["keyword", "private"], + " slots", + ["operator", ":"], + + ["keyword", "void"], + ["function", "changeWindowTitle"], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", ";"], + + ["punctuation", "}"], + ["punctuation", ";"], + + ["keyword", "void"], + ["class-name", "MainWindow"], + ["operator", "::"], + ["function", "changeWindowTitle"], + ["punctuation", "("], + ["punctuation", ")"], + + ["punctuation", "{"], + + ["function", "setWindowTitle"], + ["punctuation", "("], + "plainTextEdit", + ["operator", "->"], + "currentFile", + ["punctuation", "."], + ["function", "split"], + ["punctuation", "("], + ["string", "\"/\""], + ["punctuation", ")"], + ["punctuation", "."], + ["function", "last"], + ["punctuation", "("], + ["punctuation", ")"], + ["operator", "+"], + ["string", "\" - Notepanda\""], + ["punctuation", ")"], + ["punctuation", ";"], + + ["punctuation", "}"] +] + +---------------------------------------------------- From 4935b5caef1f4ec7b1aff8d9a604e8fa2fb08401 Mon Sep 17 00:00:00 2001 From: Proudust Date: Sat, 16 May 2020 11:22:21 +0900 Subject: [PATCH 0528/1100] Ren'Py: Added `rpy` alias (#2385) --- components.js | 2 +- components.json | 1 + components/prism-renpy.js | 2 ++ components/prism-renpy.min.js | 2 +- plugins/autoloader/prism-autoloader.js | 1 + plugins/autoloader/prism-autoloader.min.js | 2 +- plugins/show-language/prism-show-language.js | 1 + plugins/show-language/prism-show-language.min.js | 2 +- 8 files changed, 9 insertions(+), 4 deletions(-) diff --git a/components.js b/components.js index bc6a408753..9dd33457d2 100644 --- a/components.js +++ b/components.js @@ -1,2 +1,2 @@ -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml","ssml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","ssml":"SSML"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"Augmented Backus–Naur form","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"Backus–Naur form","alias":"rbnf","aliasTitles":{"rbnf":"Routing Backus–Naur form"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dax":{"title":"DAX","owner":"peterbud"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"Extended Backus–Naur form","owner":"RunDevelopment"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"c","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"hlsl":{"title":"HLSL","require":"c","owner":"RunDevelopment"},"http":{"title":"HTTP","optional":["css","javascript","json","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"json":{"title":"JSON","owner":"CupOfTea696"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"purebasic":{"title":"PureBasic","require":"clike","alias":"pbfasm","owner":"HeX0R101"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"racket":{"title":"Racket","require":"scheme","alias":"rkt","owner":"RunDevelopment"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","modify":["actionscript","coffeescript","flow","javascript","typescript","vala"],"owner":"RunDevelopment"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"solidity":{"title":"Solidity (Ethereum)","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","vbnet"],"owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xml-doc":{"title":"XML doc (.net)","require":"markup","modify":["csharp","fsharp","vbnet"],"owner":"RunDevelopment"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml","ssml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","ssml":"SSML"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"Augmented Backus–Naur form","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"Backus–Naur form","alias":"rbnf","aliasTitles":{"rbnf":"Routing Backus–Naur form"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dax":{"title":"DAX","owner":"peterbud"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"Extended Backus–Naur form","owner":"RunDevelopment"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"c","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"hlsl":{"title":"HLSL","require":"c","owner":"RunDevelopment"},"http":{"title":"HTTP","optional":["css","javascript","json","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"json":{"title":"JSON","owner":"CupOfTea696"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"purebasic":{"title":"PureBasic","require":"clike","alias":"pbfasm","owner":"HeX0R101"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"racket":{"title":"Racket","require":"scheme","alias":"rkt","owner":"RunDevelopment"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","alias":"rpy","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","modify":["actionscript","coffeescript","flow","javascript","typescript","vala"],"owner":"RunDevelopment"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"solidity":{"title":"Solidity (Ethereum)","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","vbnet"],"owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xml-doc":{"title":"XML doc (.net)","require":"markup","modify":["csharp","fsharp","vbnet"],"owner":"RunDevelopment"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; if (typeof module !== 'undefined' && module.exports) { module.exports = components; } \ No newline at end of file diff --git a/components.json b/components.json index 8a4f85865d..f92adb2c2d 100644 --- a/components.json +++ b/components.json @@ -899,6 +899,7 @@ }, "renpy": { "title": "Ren'py", + "alias": "rpy", "owner": "HyuchiaDiego" }, "reason": { diff --git a/components/prism-renpy.js b/components/prism-renpy.js index 9be52394e2..008917b323 100644 --- a/components/prism-renpy.js +++ b/components/prism-renpy.js @@ -27,3 +27,5 @@ Prism.languages.renpy= { 'punctuation' : /[{}[\];(),.:]/ }; + +Prism.languages.rpy = Prism.languages.renpy; diff --git a/components/prism-renpy.min.js b/components/prism-renpy.min.js index 6a06e3434d..100a97c392 100644 --- a/components/prism-renpy.min.js +++ b/components/prism-renpy.min.js @@ -1 +1 @@ -Prism.languages.renpy={comment:{pattern:/(^|[^\\])#.+/,lookbehind:!0},string:{pattern:/("""|''')[\s\S]+?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2|(?:^#?(?:(?:[0-9a-fA-F]{2}){3}|(?:[0-9a-fA-F]){3})$)/m,greedy:!0},function:/[a-z_]\w*(?=\()/i,property:/\b(?:insensitive|idle|hover|selected_idle|selected_hover|background|position|alt|xpos|ypos|pos|xanchor|yanchor|anchor|xalign|yalign|align|xcenter|ycenter|xofsset|yoffset|ymaximum|maximum|xmaximum|xminimum|yminimum|minimum|xsize|ysizexysize|xfill|yfill|area|antialias|black_color|bold|caret|color|first_indent|font|size|italic|justify|kerning|language|layout|line_leading|line_overlap_split|line_spacing|min_width|newline_indent|outlines|rest_indent|ruby_style|slow_cps|slow_cps_multiplier|strikethrough|text_align|underline|hyperlink_functions|vertical|hinting|foreground|left_margin|xmargin|top_margin|bottom_margin|ymargin|left_padding|right_padding|xpadding|top_padding|bottom_padding|ypadding|size_group|child|hover_sound|activate_sound|mouse|focus_mask|keyboard_focus|bar_vertical|bar_invert|bar_resizing|left_gutter|right_gutter|top_gutter|bottom_gutter|left_bar|right_bar|top_bar|bottom_bar|thumb|thumb_shadow|thumb_offset|unscrollable|spacing|first_spacing|box_reverse|box_wrap|order_reverse|fit_first|ysize|thumbnail_width|thumbnail_height|help|text_ypos|text_xpos|idle_color|hover_color|selected_idle_color|selected_hover_color|insensitive_color|alpha|insensitive_background|hover_background|zorder|value|width|xadjustment|xanchoraround|xaround|xinitial|xoffset|xzoom|yadjustment|yanchoraround|yaround|yinitial|yzoom|zoom|ground|height|text_style|text_y_fudge|selected_insensitive|has_sound|has_music|has_voice|focus|hovered|image_style|length|minwidth|mousewheel|offset|prefix|radius|range|right_margin|rotate|rotate_pad|developer|screen_width|screen_height|window_title|name|version|windows_icon|default_fullscreen|default_text_cps|default_afm_time|main_menu_music|sample_sound|enter_sound|exit_sound|save_directory|enter_transition|exit_transition|intra_transition|main_game_transition|game_main_transition|end_splash_transition|end_game_transition|after_load_transition|window_show_transition|window_hide_transition|adv_nvl_transition|nvl_adv_transition|enter_yesno_transition|exit_yesno_transition|enter_replay_transition|exit_replay_transition|say_attribute_transition|directory_name|executable_name|include_update|window_icon|modal|google_play_key|google_play_salt|drag_name|drag_handle|draggable|dragged|droppable|dropped|narrator_menu|action|default_afm_enable|version_name|version_tuple|inside|fadeout|fadein|layers|layer_clipping|linear|scrollbars|side_xpos|side_ypos|side_spacing|edgescroll|drag_joined|drag_raise|drop_shadow|drop_shadow_color|subpixel|easein|easeout|time|crop|auto|update|get_installed_packages|can_update|UpdateVersion|Update|overlay_functions|translations|window_left_padding|show_side_image|show_two_window)\b/,tag:/\b(?:label|image|menu|[hv]box|frame|text|imagemap|imagebutton|bar|vbar|screen|textbutton|buttoscreenn|fixed|grid|input|key|mousearea|side|timer|viewport|window|hotspot|hotbar|self|button|drag|draggroup|tag|mm_menu_frame|nvl|block|parallel)\b|\$/,keyword:/\b(?:as|assert|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|pass|print|raise|return|try|while|yield|adjustment|alignaround|allow|angle|around|box_layout|cache|changed|child_size|clicked|clipping|corner1|corner2|default|delay|exclude|scope|slow|slow_abortable|slow_done|sound|style_group|substitute|suffix|transform_anchor|transpose|unhovered|config|theme|mm_root|gm_root|rounded_window|build|disabled_text|disabled|widget_selected|widget_text|widget_hover|widget|updater|behind|call|expression|hide|init|jump|onlayer|python|renpy|scene|set|show|transform|play|queue|stop|pause|define|window|repeat|contains|choice|on|function|event|animation|clockwise|counterclockwise|circles|knot|null|None|random|has|add|use|fade|dissolve|style|store|id|voice|center|left|right|less_rounded|music|movie|clear|persistent|ui)\b/,boolean:/\b(?:[Tt]rue|[Ff]alse)\b/,number:/(?:\b(?:0[bo])?(?:(?:\d|0x[\da-f])[\da-f]*\.?\d*)|\B\.\d+)(?:e[+-]?\d+)?j?/i,operator:/[-+%=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]|\b(?:or|and|not|with|at)\b/,punctuation:/[{}[\];(),.:]/}; \ No newline at end of file +Prism.languages.renpy={comment:{pattern:/(^|[^\\])#.+/,lookbehind:!0},string:{pattern:/("""|''')[\s\S]+?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2|(?:^#?(?:(?:[0-9a-fA-F]{2}){3}|(?:[0-9a-fA-F]){3})$)/m,greedy:!0},function:/[a-z_]\w*(?=\()/i,property:/\b(?:insensitive|idle|hover|selected_idle|selected_hover|background|position|alt|xpos|ypos|pos|xanchor|yanchor|anchor|xalign|yalign|align|xcenter|ycenter|xofsset|yoffset|ymaximum|maximum|xmaximum|xminimum|yminimum|minimum|xsize|ysizexysize|xfill|yfill|area|antialias|black_color|bold|caret|color|first_indent|font|size|italic|justify|kerning|language|layout|line_leading|line_overlap_split|line_spacing|min_width|newline_indent|outlines|rest_indent|ruby_style|slow_cps|slow_cps_multiplier|strikethrough|text_align|underline|hyperlink_functions|vertical|hinting|foreground|left_margin|xmargin|top_margin|bottom_margin|ymargin|left_padding|right_padding|xpadding|top_padding|bottom_padding|ypadding|size_group|child|hover_sound|activate_sound|mouse|focus_mask|keyboard_focus|bar_vertical|bar_invert|bar_resizing|left_gutter|right_gutter|top_gutter|bottom_gutter|left_bar|right_bar|top_bar|bottom_bar|thumb|thumb_shadow|thumb_offset|unscrollable|spacing|first_spacing|box_reverse|box_wrap|order_reverse|fit_first|ysize|thumbnail_width|thumbnail_height|help|text_ypos|text_xpos|idle_color|hover_color|selected_idle_color|selected_hover_color|insensitive_color|alpha|insensitive_background|hover_background|zorder|value|width|xadjustment|xanchoraround|xaround|xinitial|xoffset|xzoom|yadjustment|yanchoraround|yaround|yinitial|yzoom|zoom|ground|height|text_style|text_y_fudge|selected_insensitive|has_sound|has_music|has_voice|focus|hovered|image_style|length|minwidth|mousewheel|offset|prefix|radius|range|right_margin|rotate|rotate_pad|developer|screen_width|screen_height|window_title|name|version|windows_icon|default_fullscreen|default_text_cps|default_afm_time|main_menu_music|sample_sound|enter_sound|exit_sound|save_directory|enter_transition|exit_transition|intra_transition|main_game_transition|game_main_transition|end_splash_transition|end_game_transition|after_load_transition|window_show_transition|window_hide_transition|adv_nvl_transition|nvl_adv_transition|enter_yesno_transition|exit_yesno_transition|enter_replay_transition|exit_replay_transition|say_attribute_transition|directory_name|executable_name|include_update|window_icon|modal|google_play_key|google_play_salt|drag_name|drag_handle|draggable|dragged|droppable|dropped|narrator_menu|action|default_afm_enable|version_name|version_tuple|inside|fadeout|fadein|layers|layer_clipping|linear|scrollbars|side_xpos|side_ypos|side_spacing|edgescroll|drag_joined|drag_raise|drop_shadow|drop_shadow_color|subpixel|easein|easeout|time|crop|auto|update|get_installed_packages|can_update|UpdateVersion|Update|overlay_functions|translations|window_left_padding|show_side_image|show_two_window)\b/,tag:/\b(?:label|image|menu|[hv]box|frame|text|imagemap|imagebutton|bar|vbar|screen|textbutton|buttoscreenn|fixed|grid|input|key|mousearea|side|timer|viewport|window|hotspot|hotbar|self|button|drag|draggroup|tag|mm_menu_frame|nvl|block|parallel)\b|\$/,keyword:/\b(?:as|assert|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|pass|print|raise|return|try|while|yield|adjustment|alignaround|allow|angle|around|box_layout|cache|changed|child_size|clicked|clipping|corner1|corner2|default|delay|exclude|scope|slow|slow_abortable|slow_done|sound|style_group|substitute|suffix|transform_anchor|transpose|unhovered|config|theme|mm_root|gm_root|rounded_window|build|disabled_text|disabled|widget_selected|widget_text|widget_hover|widget|updater|behind|call|expression|hide|init|jump|onlayer|python|renpy|scene|set|show|transform|play|queue|stop|pause|define|window|repeat|contains|choice|on|function|event|animation|clockwise|counterclockwise|circles|knot|null|None|random|has|add|use|fade|dissolve|style|store|id|voice|center|left|right|less_rounded|music|movie|clear|persistent|ui)\b/,boolean:/\b(?:[Tt]rue|[Ff]alse)\b/,number:/(?:\b(?:0[bo])?(?:(?:\d|0x[\da-f])[\da-f]*\.?\d*)|\B\.\d+)(?:e[+-]?\d+)?j?/i,operator:/[-+%=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]|\b(?:or|and|not|with|at)\b/,punctuation:/[{}[\];(),.:]/},Prism.languages.rpy=Prism.languages.renpy; \ No newline at end of file diff --git a/plugins/autoloader/prism-autoloader.js b/plugins/autoloader/prism-autoloader.js index abe4b01aa0..9ee94e8021 100644 --- a/plugins/autoloader/prism-autoloader.js +++ b/plugins/autoloader/prism-autoloader.js @@ -187,6 +187,7 @@ "pbfasm": "purebasic", "py": "python", "rkt": "racket", + "rpy": "renpy", "robot": "robotframework", "rb": "ruby", "sln": "solution-file", diff --git a/plugins/autoloader/prism-autoloader.min.js b/plugins/autoloader/prism-autoloader.min.js index e25aea2eec..e9da5d3aff 100644 --- a/plugins/autoloader/prism-autoloader.min.js +++ b/plugins/autoloader/prism-autoloader.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof self&&self.Prism&&self.document&&document.createElement){var i={javascript:"clike",actionscript:"javascript",arduino:"cpp",aspnet:["markup","csharp"],bison:"c",c:"clike",csharp:"clike",cpp:"c",coffeescript:"javascript",crystal:"ruby","css-extras":"css",d:"clike",dart:"clike",django:"markup-templating",ejs:["javascript","markup-templating"],etlua:["lua","markup-templating"],erb:["ruby","markup-templating"],fsharp:"clike","firestore-security-rules":"clike",flow:"javascript",ftl:"markup-templating",glsl:"c",gml:"clike",go:"clike",groovy:"clike",haml:"ruby",handlebars:"markup-templating",haxe:"clike",hlsl:"c",java:"clike",javadoc:["markup","java","javadoclike"],jolie:"clike",jsdoc:["javascript","javadoclike"],"js-extras":"javascript","js-templates":"javascript",jsonp:"json",json5:"json",kotlin:"clike",latte:["clike","markup-templating","php"],less:"css",lilypond:"scheme",markdown:"markup","markup-templating":"markup",n4js:"javascript",nginx:"clike",objectivec:"c",opencl:"c",parser:"markup",php:["clike","markup-templating"],phpdoc:["php","javadoclike"],"php-extras":"php",plsql:"sql",processing:"clike",protobuf:"clike",pug:["markup","javascript"],purebasic:"clike",qml:"javascript",qore:"clike",racket:"scheme",jsx:["markup","javascript"],tsx:["jsx","typescript"],reason:"clike",ruby:"clike",sass:"css",scss:"css",scala:"java","shell-session":"bash",smarty:"markup-templating",solidity:"clike",soy:"markup-templating",sparql:"turtle",sqf:"clike",swift:"clike",tap:"yaml",textile:"markup",tt2:["clike","markup-templating"],twig:"markup",typescript:"javascript","t4-cs":["t4-templating","csharp"],"t4-vb":["t4-templating","vbnet"],vala:"clike",vbnet:"basic",velocity:"markup",wiki:"markup",xeora:"markup","xml-doc":"markup",xquery:"markup"},l={html:"markup",xml:"markup",svg:"markup",mathml:"markup",ssml:"markup",js:"javascript",g4:"antlr4",adoc:"asciidoc",shell:"bash",shortcode:"bbcode",rbnf:"bnf",conc:"concurnas",cs:"csharp",dotnet:"csharp",coffee:"coffeescript",jinja2:"django","dns-zone":"dns-zone-file",dockerfile:"docker",eta:"ejs",xlsx:"excel-formula",xls:"excel-formula",gamemakerlanguage:"gml",hs:"haskell",tex:"latex",context:"latex",ly:"lilypond",emacs:"lisp",elisp:"lisp","emacs-lisp":"lisp",md:"markdown",moon:"moonscript",n4jsd:"n4js",objc:"objectivec",objectpascal:"pascal",px:"pcaxis",pcode:"peoplecode",pq:"powerquery",mscript:"powerquery",pbfasm:"purebasic",py:"python",rkt:"racket",robot:"robotframework",rb:"ruby",sln:"solution-file",rq:"sparql",trig:"turtle",ts:"typescript",t4:"t4-cs",uscript:"unrealscript",uc:"unrealscript",vb:"visual-basic",xeoracube:"xeora",yml:"yaml"},n={},e="components/",a=Prism.util.currentScript();if(a){var t=/\bplugins\/autoloader\/prism-autoloader\.(?:min\.)js(?:\?[^\r\n/]*)?$/i,r=/(^|\/)[\w-]+\.(?:min\.)js(?:\?[^\r\n/]*)?$/i,s=a.getAttribute("data-autoloader-path");if(null!=s)e=s.trim().replace(/\/?$/,"/");else{var c=a.src;t.test(c)?e=c.replace(t,"components/"):r.test(c)&&(e=c.replace(r,"$1components/"))}}var p=Prism.plugins.autoloader={languages_path:e,use_minified:!0,loadLanguages:o};Prism.hooks.add("complete",function(e){e.element&&e.language&&!e.grammar&&"none"!==e.language&&function(e,a){e in l&&(e=l[e]);var t=(a.getAttribute("data-dependencies")||"").trim();if(!t){var r=a.parentElement;r&&"pre"===r.tagName.toLowerCase()&&(t=(r.getAttribute("data-dependencies")||"").trim())}o(t?t.split(/\s*,\s*/g):[],function(){m(e,function(){Prism.highlightElement(a)})})}(e.language,e.element)})}function o(e,a,t){"string"==typeof e&&(e=[e]);var r=e.length,s=0,c=!1;function i(){c||++s===r&&a&&a(e)}0!==r?e.forEach(function(e){m(e,i,function(){c||(c=!0,t&&t(e))})}):a&&setTimeout(a,0)}function m(a,t,r){var s=0<=a.indexOf("!");a=a.replace("!",""),a=l[a]||a;var e=function(){var e=n[a];if(e||(e=n[a]={callbacks:[]}),e.callbacks.push({success:t,error:r}),!s&&Prism.languages[a])u(a,"success");else if(!s&&e.error)u(a,"error");else if(s||!e.loading){e.loading=!0,function(e,a,t){var r=document.createElement("script");r.src=e,r.async=!0,r.onload=function(){document.body.removeChild(r),a&&a()},r.onerror=function(){document.body.removeChild(r),t&&t()},document.body.appendChild(r)}(function(e){return p.languages_path+"prism-"+e+(p.use_minified?".min":"")+".js"}(a),function(){e.loading=!1,u(a,"success")},function(){e.loading=!1,e.error=!0,u(a,"error")})}},c=i[a];c&&c.length?o(c,e,r):e()}function u(e,a){if(n[e]){for(var t=n[e].callbacks,r=0,s=t.length;r Date: Mon, 18 May 2020 02:29:27 +0300 Subject: [PATCH 0529/1100] Markup & JSON: Added new aliases (#2390) This adds the `rss` and `atom` alias for Markup and the `webmanifest` alias for JSON. --- components.js | 2 +- components.json | 10 ++++++++-- components/prism-json.js | 2 ++ components/prism-json.min.js | 2 +- components/prism-markup.js | 2 ++ components/prism-markup.min.js | 2 +- plugins/autoloader/prism-autoloader.js | 3 +++ plugins/autoloader/prism-autoloader.min.js | 2 +- plugins/show-language/prism-show-language.js | 2 ++ plugins/show-language/prism-show-language.min.js | 2 +- prism.js | 2 ++ 11 files changed, 24 insertions(+), 7 deletions(-) diff --git a/components.js b/components.js index 9dd33457d2..786f34dbac 100644 --- a/components.js +++ b/components.js @@ -1,2 +1,2 @@ -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml","ssml"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","ssml":"SSML"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"Augmented Backus–Naur form","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"Backus–Naur form","alias":"rbnf","aliasTitles":{"rbnf":"Routing Backus–Naur form"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dax":{"title":"DAX","owner":"peterbud"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"Extended Backus–Naur form","owner":"RunDevelopment"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"c","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"hlsl":{"title":"HLSL","require":"c","owner":"RunDevelopment"},"http":{"title":"HTTP","optional":["css","javascript","json","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"json":{"title":"JSON","owner":"CupOfTea696"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"purebasic":{"title":"PureBasic","require":"clike","alias":"pbfasm","owner":"HeX0R101"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"racket":{"title":"Racket","require":"scheme","alias":"rkt","owner":"RunDevelopment"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","alias":"rpy","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","modify":["actionscript","coffeescript","flow","javascript","typescript","vala"],"owner":"RunDevelopment"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"solidity":{"title":"Solidity (Ethereum)","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","vbnet"],"owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xml-doc":{"title":"XML doc (.net)","require":"markup","modify":["csharp","fsharp","vbnet"],"owner":"RunDevelopment"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml","ssml","atom","rss"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","ssml":"SSML","atom":"Atom","rss":"RSS"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"Augmented Backus–Naur form","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"Backus–Naur form","alias":"rbnf","aliasTitles":{"rbnf":"Routing Backus–Naur form"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dax":{"title":"DAX","owner":"peterbud"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"Extended Backus–Naur form","owner":"RunDevelopment"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"c","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"hlsl":{"title":"HLSL","require":"c","owner":"RunDevelopment"},"http":{"title":"HTTP","optional":["css","javascript","json","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"json":{"title":"JSON","alias":"webmanifest","aliasTitles":{"webmanifest":"Web App Manifest"},"owner":"CupOfTea696"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"purebasic":{"title":"PureBasic","require":"clike","alias":"pbfasm","owner":"HeX0R101"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"racket":{"title":"Racket","require":"scheme","alias":"rkt","owner":"RunDevelopment"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","alias":"rpy","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","modify":["actionscript","coffeescript","flow","javascript","typescript","vala"],"owner":"RunDevelopment"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"solidity":{"title":"Solidity (Ethereum)","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","vbnet"],"owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xml-doc":{"title":"XML doc (.net)","require":"markup","modify":["csharp","fsharp","vbnet"],"owner":"RunDevelopment"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; if (typeof module !== 'undefined' && module.exports) { module.exports = components; } \ No newline at end of file diff --git a/components.json b/components.json index f92adb2c2d..5e122eaae2 100644 --- a/components.json +++ b/components.json @@ -48,13 +48,15 @@ }, "markup": { "title": "Markup", - "alias": ["html", "xml", "svg", "mathml", "ssml"], + "alias": ["html", "xml", "svg", "mathml", "ssml", "atom", "rss"], "aliasTitles": { "html": "HTML", "xml": "XML", "svg": "SVG", "mathml": "MathML", - "ssml": "SSML" + "ssml": "SSML", + "atom": "Atom", + "rss": "RSS" }, "option": "default" }, @@ -560,6 +562,10 @@ }, "json": { "title": "JSON", + "alias": "webmanifest", + "aliasTitles": { + "webmanifest": "Web App Manifest" + }, "owner": "CupOfTea696" }, "jsonp": { diff --git a/components/prism-json.js b/components/prism-json.js index 0adfcb6fca..48495f36b0 100644 --- a/components/prism-json.js +++ b/components/prism-json.js @@ -17,3 +17,5 @@ Prism.languages.json = { alias: 'keyword' } }; + +Prism.languages.webmanifest = Prism.languages.json; diff --git a/components/prism-json.min.js b/components/prism-json.min.js index 4cb36e3288..3159a1435d 100644 --- a/components/prism-json.min.js +++ b/components/prism-json.min.js @@ -1 +1 @@ -Prism.languages.json={property:{pattern:/"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,greedy:!0},string:{pattern:/"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,greedy:!0},comment:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,number:/-?\d+\.?\d*(?:e[+-]?\d+)?/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:true|false)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}}; \ No newline at end of file +Prism.languages.json={property:{pattern:/"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,greedy:!0},string:{pattern:/"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,greedy:!0},comment:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,number:/-?\d+\.?\d*(?:e[+-]?\d+)?/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:true|false)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}},Prism.languages.webmanifest=Prism.languages.json; \ No newline at end of file diff --git a/components/prism-markup.js b/components/prism-markup.js index b8837c7aef..ad65b41fb6 100644 --- a/components/prism-markup.js +++ b/components/prism-markup.js @@ -103,3 +103,5 @@ Prism.languages.svg = Prism.languages.markup; Prism.languages.xml = Prism.languages.extend('markup', {}); Prism.languages.ssml = Prism.languages.xml; +Prism.languages.atom = Prism.languages.xml; +Prism.languages.rss = Prism.languages.xml; diff --git a/components/prism-markup.min.js b/components/prism-markup.min.js index 7a0545236d..2578826a3e 100644 --- a/components/prism-markup.min.js +++ b/components/prism-markup.min.js @@ -1 +1 @@ -Prism.languages.markup={comment://,prolog:/<\?[\s\S]+?\?>/,doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0},cdata://i,tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[/^=/,{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:/&#?[\da-z]{1,8};/i},Prism.languages.markup.tag.inside["attr-value"].inside.entity=Prism.languages.markup.entity,Prism.hooks.add("wrap",function(a){"entity"===a.type&&(a.attributes.title=a.content.replace(/&/,"&"))}),Object.defineProperty(Prism.languages.markup.tag,"addInlined",{value:function(a,e){var s={};s["language-"+e]={pattern:/(^$)/i,lookbehind:!0,inside:Prism.languages[e]},s.cdata=/^$/i;var n={"included-cdata":{pattern://i,inside:s}};n["language-"+e]={pattern:/[\s\S]+/,inside:Prism.languages[e]};var t={};t[a]={pattern:RegExp("(<__[^]*?>)(?:))*\\]\\]>|(?!)".replace(/__/g,function(){return a}),"i"),lookbehind:!0,greedy:!0,inside:n},Prism.languages.insertBefore("markup","cdata",t)}}),Prism.languages.html=Prism.languages.markup,Prism.languages.mathml=Prism.languages.markup,Prism.languages.svg=Prism.languages.markup,Prism.languages.xml=Prism.languages.extend("markup",{}),Prism.languages.ssml=Prism.languages.xml; \ No newline at end of file +Prism.languages.markup={comment://,prolog:/<\?[\s\S]+?\?>/,doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0},cdata://i,tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[/^=/,{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:/&#?[\da-z]{1,8};/i},Prism.languages.markup.tag.inside["attr-value"].inside.entity=Prism.languages.markup.entity,Prism.hooks.add("wrap",function(a){"entity"===a.type&&(a.attributes.title=a.content.replace(/&/,"&"))}),Object.defineProperty(Prism.languages.markup.tag,"addInlined",{value:function(a,e){var s={};s["language-"+e]={pattern:/(^$)/i,lookbehind:!0,inside:Prism.languages[e]},s.cdata=/^$/i;var n={"included-cdata":{pattern://i,inside:s}};n["language-"+e]={pattern:/[\s\S]+/,inside:Prism.languages[e]};var t={};t[a]={pattern:RegExp("(<__[^]*?>)(?:))*\\]\\]>|(?!)".replace(/__/g,function(){return a}),"i"),lookbehind:!0,greedy:!0,inside:n},Prism.languages.insertBefore("markup","cdata",t)}}),Prism.languages.html=Prism.languages.markup,Prism.languages.mathml=Prism.languages.markup,Prism.languages.svg=Prism.languages.markup,Prism.languages.xml=Prism.languages.extend("markup",{}),Prism.languages.ssml=Prism.languages.xml,Prism.languages.atom=Prism.languages.xml,Prism.languages.rss=Prism.languages.xml; \ No newline at end of file diff --git a/plugins/autoloader/prism-autoloader.js b/plugins/autoloader/prism-autoloader.js index 9ee94e8021..d0a819de57 100644 --- a/plugins/autoloader/prism-autoloader.js +++ b/plugins/autoloader/prism-autoloader.js @@ -151,6 +151,8 @@ "svg": "markup", "mathml": "markup", "ssml": "markup", + "atom": "markup", + "rss": "markup", "js": "javascript", "g4": "antlr4", "adoc": "asciidoc", @@ -169,6 +171,7 @@ "xls": "excel-formula", "gamemakerlanguage": "gml", "hs": "haskell", + "webmanifest": "json", "tex": "latex", "context": "latex", "ly": "lilypond", diff --git a/plugins/autoloader/prism-autoloader.min.js b/plugins/autoloader/prism-autoloader.min.js index e9da5d3aff..e87c287fe8 100644 --- a/plugins/autoloader/prism-autoloader.min.js +++ b/plugins/autoloader/prism-autoloader.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof self&&self.Prism&&self.document&&document.createElement){var i={javascript:"clike",actionscript:"javascript",arduino:"cpp",aspnet:["markup","csharp"],bison:"c",c:"clike",csharp:"clike",cpp:"c",coffeescript:"javascript",crystal:"ruby","css-extras":"css",d:"clike",dart:"clike",django:"markup-templating",ejs:["javascript","markup-templating"],etlua:["lua","markup-templating"],erb:["ruby","markup-templating"],fsharp:"clike","firestore-security-rules":"clike",flow:"javascript",ftl:"markup-templating",glsl:"c",gml:"clike",go:"clike",groovy:"clike",haml:"ruby",handlebars:"markup-templating",haxe:"clike",hlsl:"c",java:"clike",javadoc:["markup","java","javadoclike"],jolie:"clike",jsdoc:["javascript","javadoclike"],"js-extras":"javascript","js-templates":"javascript",jsonp:"json",json5:"json",kotlin:"clike",latte:["clike","markup-templating","php"],less:"css",lilypond:"scheme",markdown:"markup","markup-templating":"markup",n4js:"javascript",nginx:"clike",objectivec:"c",opencl:"c",parser:"markup",php:["clike","markup-templating"],phpdoc:["php","javadoclike"],"php-extras":"php",plsql:"sql",processing:"clike",protobuf:"clike",pug:["markup","javascript"],purebasic:"clike",qml:"javascript",qore:"clike",racket:"scheme",jsx:["markup","javascript"],tsx:["jsx","typescript"],reason:"clike",ruby:"clike",sass:"css",scss:"css",scala:"java","shell-session":"bash",smarty:"markup-templating",solidity:"clike",soy:"markup-templating",sparql:"turtle",sqf:"clike",swift:"clike",tap:"yaml",textile:"markup",tt2:["clike","markup-templating"],twig:"markup",typescript:"javascript","t4-cs":["t4-templating","csharp"],"t4-vb":["t4-templating","vbnet"],vala:"clike",vbnet:"basic",velocity:"markup",wiki:"markup",xeora:"markup","xml-doc":"markup",xquery:"markup"},l={html:"markup",xml:"markup",svg:"markup",mathml:"markup",ssml:"markup",js:"javascript",g4:"antlr4",adoc:"asciidoc",shell:"bash",shortcode:"bbcode",rbnf:"bnf",conc:"concurnas",cs:"csharp",dotnet:"csharp",coffee:"coffeescript",jinja2:"django","dns-zone":"dns-zone-file",dockerfile:"docker",eta:"ejs",xlsx:"excel-formula",xls:"excel-formula",gamemakerlanguage:"gml",hs:"haskell",tex:"latex",context:"latex",ly:"lilypond",emacs:"lisp",elisp:"lisp","emacs-lisp":"lisp",md:"markdown",moon:"moonscript",n4jsd:"n4js",objc:"objectivec",objectpascal:"pascal",px:"pcaxis",pcode:"peoplecode",pq:"powerquery",mscript:"powerquery",pbfasm:"purebasic",py:"python",rkt:"racket",rpy:"renpy",robot:"robotframework",rb:"ruby",sln:"solution-file",rq:"sparql",trig:"turtle",ts:"typescript",t4:"t4-cs",uscript:"unrealscript",uc:"unrealscript",vb:"visual-basic",xeoracube:"xeora",yml:"yaml"},n={},e="components/",a=Prism.util.currentScript();if(a){var t=/\bplugins\/autoloader\/prism-autoloader\.(?:min\.)js(?:\?[^\r\n/]*)?$/i,r=/(^|\/)[\w-]+\.(?:min\.)js(?:\?[^\r\n/]*)?$/i,s=a.getAttribute("data-autoloader-path");if(null!=s)e=s.trim().replace(/\/?$/,"/");else{var c=a.src;t.test(c)?e=c.replace(t,"components/"):r.test(c)&&(e=c.replace(r,"$1components/"))}}var p=Prism.plugins.autoloader={languages_path:e,use_minified:!0,loadLanguages:o};Prism.hooks.add("complete",function(e){e.element&&e.language&&!e.grammar&&"none"!==e.language&&function(e,a){e in l&&(e=l[e]);var t=(a.getAttribute("data-dependencies")||"").trim();if(!t){var r=a.parentElement;r&&"pre"===r.tagName.toLowerCase()&&(t=(r.getAttribute("data-dependencies")||"").trim())}o(t?t.split(/\s*,\s*/g):[],function(){m(e,function(){Prism.highlightElement(a)})})}(e.language,e.element)})}function o(e,a,t){"string"==typeof e&&(e=[e]);var r=e.length,s=0,c=!1;function i(){c||++s===r&&a&&a(e)}0!==r?e.forEach(function(e){m(e,i,function(){c||(c=!0,t&&t(e))})}):a&&setTimeout(a,0)}function m(a,t,r){var s=0<=a.indexOf("!");a=a.replace("!",""),a=l[a]||a;var e=function(){var e=n[a];if(e||(e=n[a]={callbacks:[]}),e.callbacks.push({success:t,error:r}),!s&&Prism.languages[a])u(a,"success");else if(!s&&e.error)u(a,"error");else if(s||!e.loading){e.loading=!0,function(e,a,t){var r=document.createElement("script");r.src=e,r.async=!0,r.onload=function(){document.body.removeChild(r),a&&a()},r.onerror=function(){document.body.removeChild(r),t&&t()},document.body.appendChild(r)}(function(e){return p.languages_path+"prism-"+e+(p.use_minified?".min":"")+".js"}(a),function(){e.loading=!1,u(a,"success")},function(){e.loading=!1,e.error=!0,u(a,"error")})}},c=i[a];c&&c.length?o(c,e,r):e()}function u(e,a){if(n[e]){for(var t=n[e].callbacks,r=0,s=t.length;r Date: Mon, 18 May 2020 14:01:07 -0400 Subject: [PATCH 0530/1100] SAS: Improved comments in `proc groovy` and `proc lua` (#2392) --- components/prism-sas.js | 12 ++++++++---- components/prism-sas.min.js | 2 +- tests/languages/groovy+sas/groovy_inclusion.test | 11 ++++++++--- tests/languages/lua+sas/lua_inclusion.test | 2 ++ tests/languages/sas/proccas_feature.test | 2 ++ 5 files changed, 21 insertions(+), 8 deletions(-) diff --git a/components/prism-sas.js b/components/prism-sas.js index c3479b0047..ab04dac1bf 100644 --- a/components/prism-sas.js +++ b/components/prism-sas.js @@ -101,10 +101,10 @@ pattern: /(?:action)/i, alias: 'keyword' }, + 'comment': comment, 'function': func, 'arg-value': args['arg-value'], 'operator': args.operator, - 'comment': comment, 'argument': args.arg, 'number': number, 'numeric-constant': numericConstant, @@ -154,15 +154,17 @@ }, 'proc-groovy': { - pattern: /(^proc\s+groovy(?:\s+[\w|=]+)?;)(?:\s*submit)[\s\S]+?(?=^(?:proc\s+\w+|quit|run|data);|(?![\s\S]))/im, + pattern: /(^proc\s+groovy(?:\s+[\w|=]+)?;)[\s\S]+?(?=^(?:proc\s+\w+|quit|run|data);|(?![\s\S]))/im, lookbehind: true, inside: { + 'comment': comment, 'groovy': { pattern: RegExp(/(^[ \t]*submit(?:\s+(?:load|parseonly|norun))?)(?:|[^"'])+?(?=endsubmit;)/.source.replace(//g, function () { return stringPattern; }), 'im'), lookbehind: true, alias: 'language-groovy', inside: Prism.languages.groovy }, + 'keyword': keywords, 'submit-statement': submitStatement, 'global-statements': globalStatements, 'number': number, @@ -173,15 +175,17 @@ }, 'proc-lua': { - pattern: /(^proc\s+lua(?:\s+[\w|=]+)?;)(?:\s*submit)[\s\S]+?(?=^(?:proc\s+\w+|quit|run|data);|(?![\s\S]))/im, + pattern: /(^proc\s+lua(?:\s+[\w|=]+)?;)[\s\S]+?(?=^(?:proc\s+\w+|quit|run|data);|(?![\s\S]))/im, lookbehind: true, inside: { + 'comment': comment, 'lua': { pattern: RegExp(/(^[ \t]*submit(?:\s+(?:load|parseonly|norun))?)(?:|[^"'])+?(?=endsubmit;)/.source.replace(//g, function () { return stringPattern; }), 'im'), lookbehind: true, alias: 'language-lua', inside: Prism.languages.lua }, + 'keyword': keywords, 'submit-statement': submitStatement, 'global-statements': globalStatements, 'number': number, @@ -195,6 +199,7 @@ pattern: /(^proc\s+cas(?:\s+[\w|=]+)?;)[\s\S]+?(?=^(?:proc\s+\w+|quit|data);|(?![\s\S]))/im, lookbehind: true, inside: { + 'comment': comment, 'statement-var': { pattern: /((?:^|\s)=?)saveresult\s+[^;]+/im, lookbehind: true, @@ -217,7 +222,6 @@ 'step': step, 'keyword': keywords, 'function': func, - 'comment': comment, 'format': format, 'altformat': altformat, 'global-statements': globalStatements, diff --git a/components/prism-sas.min.js b/components/prism-sas.min.js index 2cf280aaca..c7e0a2f0fc 100644 --- a/components/prism-sas.min.js +++ b/components/prism-sas.min.js @@ -1 +1 @@ -!function(e){var t="(?:\"(?:\"\"|[^\"])*\"(?!\")|'(?:''|[^'])*'(?!'))",a=/\b(?:\d[\da-f]*x|\d+(?:\.\d+)?(?:e[+-]?\d+)?)\b/i,n={pattern:RegExp(t+"[bx]"),alias:"number"},i={pattern:/(^|\s+)(?:proc\s+\w+|quit|run|data(?!\=))\b/i,alias:"keyword",lookbehind:!0},s=[/\/\*[\s\S]*?\*\//,{pattern:/(^\s*|;\s*)\*[^;]*;/m,lookbehind:!0}],r={pattern:RegExp(t),greedy:!0},o=/[$%@.(){}\[\];,\\]/,l={pattern:/%?\w+(?=\()/,alias:"keyword"},c={function:l,"arg-value":{pattern:/(\s*=\s*)[A-Z\.]+/i,lookbehind:!0},operator:/=/,"macro-variable":{pattern:/&[^\.]*\./i,alias:"string"},arg:{pattern:/[A-Z]+/i,alias:"keyword"},number:a,"numeric-constant":n,punctuation:o,string:r},d={pattern:/\b(?:format|put)\b=?[\w'$.]+/im,inside:{keyword:/^(?:format|put)(?=\=)/i,equals:/=/,format:{pattern:/(?:\w|\$\d)+\.\d?/i,alias:"number"}}},p={pattern:/\b(?:format|put)\s+[\w']+(?:\s+[$.\w]+)+(?=;)/i,inside:{keyword:/^(?:format|put)/i,format:{pattern:/[\w$]+\.\d?/,alias:"number"}}},u={pattern:/((?:^|[\s])=?)(?:catname|checkpoint execute_always|dm|endsas|filename|footnote|%include|libname|%list|lock|missing|options|page|resetline|%run|sasfile|skip|sysecho|title\d?)\b/i,lookbehind:!0,alias:"keyword"},m={pattern:/(^|\s)(?:submit(?:\s+(?:load|parseonly|norun))?|endsubmit)\b/i,lookbehind:!0,alias:"keyword"},b="accessControl|cdm|aggregation|aStore|ruleMining|audio|autotune|bayesianNetClassifier|bioMedImage|boolRule|builtins|cardinality|sccasl|clustering|copula|countreg|dataDiscovery|dataPreprocess|dataSciencePilot|dataStep|decisionTree|deepLearn|deepNeural|varReduce|simSystem|ds2|deduplication|ecm|entityRes|espCluster|explainModel|factmac|fastKnn|fcmpact|fedSql|freqTab|gam|gleam|graphSemiSupLearn|gVarCluster|hiddenMarkovModel|hyperGroup|image|iml|ica|kernalPca|langModel|ldaTopic|sparseML|mlTools|mixed|modelPublishing|mbc|network|optNetwork|neuralNet|nonlinear|nmf|nonParametricBayes|optimization|panel|pls|percentile|pca|phreg|qkb|qlim|quantreg|recommend|tsReconcile|deepRnn|regression|reinforcementLearn|robustPca|sampling|sparkEmbeddedProcess|search(?:Analytics)?|sentimentAnalysis|sequence|configuration|session(?:Prop)?|severity|simple|smartData|sandwich|spatialreg|stabilityMonitoring|spc|loadStreams|svDataDescription|svm|table|conditionalRandomFields|text(?:Rule(?:Develop|Score)|Mining|Parse|Topic|Util|Filters|Frequency)|tsInfo|timeData|transpose|uniTimeSeries",g={pattern:RegExp("(^|\\s)(?:action\\s+)?(?:)\\.[a-z]+\\b[^;]+".replace(//g,function(){return b}),"i"),lookbehind:!0,inside:{keyword:RegExp("(?:)\\.[a-z]+\\b".replace(//g,function(){return b}),"i"),action:{pattern:/(?:action)/i,alias:"keyword"},function:l,"arg-value":c["arg-value"],operator:c.operator,comment:s,argument:c.arg,number:a,"numeric-constant":n,punctuation:o,string:r}},k={pattern:/((?:^|\s)=?)(?:after|analysis|and|array|barchart|barwidth|begingraph|by|call|cas|cbarline|cfill|class(?:lev)?|close|column|computed?|contains|continue|data(?=\=)|define|delete|describe|document|do\s+over|do|dol|drop|dul|end(?:source|comp)?|entryTitle|else|eval(?:uate)?|exec(?:ute)?|exit|fill(?:attrs)?|file(?:name)?|flist|fnc|function(?:list)?|goto|global|group(?:by)?|headline|headskip|histogram|if|infile|keep|keylabel|keyword|label|layout|leave|legendlabel|length|libname|loadactionset|merge|midpoints|name|noobs|nowd|_?null_|ods|options|or|otherwise|out(?:put)?|over(?:lay)?|plot|put|print|raise|ranexp|rannor|rbreak|retain|return|select|set|session|sessref|source|statgraph|sum|summarize|table|temp|terminate|then\s+do|then|title\d?|to|var|when|where|xaxisopts|yaxisopts|y2axisopts)\b/i,lookbehind:!0};e.languages.sas={datalines:{pattern:/^(\s*)(?:(?:data)?lines|cards);[\s\S]+?^\s*;/im,lookbehind:!0,alias:"string",inside:{keyword:{pattern:/^(?:(?:data)?lines|cards)/i},punctuation:/;/}},"proc-sql":{pattern:/(^proc\s+(?:fed)?sql(?:\s+[\w|=]+)?;)[\s\S]+?(?=^(?:proc\s+\w+|quit|run|data);|(?![\s\S]))/im,lookbehind:!0,inside:{sql:{pattern:RegExp("^[ \t]*(?:select|alter\\s+table|(?:create|describe|drop)\\s+(?:index|table(?:\\s+constraints)?|view)|create\\s+unique\\s+index|insert\\s+into|update)(?:|[^;\"'])+;".replace(//g,function(){return t}),"im"),alias:"language-sql",inside:e.languages.sql},"global-statements":u,"sql-statements":{pattern:/(^|\s)(?:disconnect\s+from|exec(?:ute)?|begin|commit|rollback|reset|validate)\b/i,lookbehind:!0,alias:"keyword"},number:a,"numeric-constant":n,punctuation:o,string:r}},"proc-groovy":{pattern:/(^proc\s+groovy(?:\s+[\w|=]+)?;)(?:\s*submit)[\s\S]+?(?=^(?:proc\s+\w+|quit|run|data);|(?![\s\S]))/im,lookbehind:!0,inside:{groovy:{pattern:RegExp("(^[ \t]*submit(?:\\s+(?:load|parseonly|norun))?)(?:|[^\"'])+?(?=endsubmit;)".replace(//g,function(){return t}),"im"),lookbehind:!0,alias:"language-groovy",inside:e.languages.groovy},"submit-statement":m,"global-statements":u,number:a,"numeric-constant":n,punctuation:o,string:r}},"proc-lua":{pattern:/(^proc\s+lua(?:\s+[\w|=]+)?;)(?:\s*submit)[\s\S]+?(?=^(?:proc\s+\w+|quit|run|data);|(?![\s\S]))/im,lookbehind:!0,inside:{lua:{pattern:RegExp("(^[ \t]*submit(?:\\s+(?:load|parseonly|norun))?)(?:|[^\"'])+?(?=endsubmit;)".replace(//g,function(){return t}),"im"),lookbehind:!0,alias:"language-lua",inside:e.languages.lua},"submit-statement":m,"global-statements":u,number:a,"numeric-constant":n,punctuation:o,string:r}},"proc-cas":{pattern:/(^proc\s+cas(?:\s+[\w|=]+)?;)[\s\S]+?(?=^(?:proc\s+\w+|quit|data);|(?![\s\S]))/im,lookbehind:!0,inside:{"statement-var":{pattern:/((?:^|\s)=?)saveresult\s+[^;]+/im,lookbehind:!0,inside:{statement:{pattern:/^saveresult\s+\S+/i,inside:{keyword:/^(?:saveresult)/i}},rest:c}},"cas-actions":g,statement:{pattern:/((?:^|\s)=?)(?:default|(?:un)?set|on|output|upload)[^;]+/im,lookbehind:!0,inside:c},step:i,keyword:k,function:l,comment:s,format:d,altformat:p,"global-statements":u,number:a,"numeric-constant":n,punctuation:o,string:r}},"proc-args":{pattern:RegExp("(^proc\\s+\\w+\\s+)(?!\\s)(?:[^;\"']|)+;".replace(//g,function(){return t}),"im"),lookbehind:!0,inside:c},"macro-keyword":{pattern:/((?:^|\s)=?)%(?:ABORT|BQUOTE|BY|CMS|COPY|DISPLAY|DO|ELSE|END|EVAL|GLOBAL|GO|GOTO|IF|INC|INCLUDE|INDEX|INPUT|KTRIM|LENGTH|LET|LIST|LOCAL|NRBQUOTE|NRQUOTE|NRSTR|PUT|QKTRIM|QSCAN|QSUBSTR|QSYSFUNC|QUOTE|QUPCASE|RETURN|RUN|SCAN|STR|SUBSTR|SUPERQ|SYMDEL|SYMGLOBL|SYMLOCAL|SYMEXIST|SYSCALL|SYSEVALF|SYSEXEC|SYSFUNC|SYSGET|SYSRPUT|THEN|TO|TSO|UNQUOTE|UNTIL|UPCASE|WHILE|WINDOW)\b/i,lookbehind:!0,alias:"keyword"},"macro-declaration":{pattern:/^%macro[^;]+(?=;)/im,inside:{keyword:/%macro/i}},"macro-end":{pattern:/^%mend[^;]+(?=;)/im,inside:{keyword:/%mend/i}},macro:{pattern:/%_\w+(?=\()/,alias:"keyword"},input:{pattern:/\binput\s+[-\w\s/*.$&]+;/i,inside:{input:{alias:"keyword",pattern:/^input/i},comment:s,number:a,"numeric-constant":n}},"options-args":{pattern:/(^options)[-'"|/\\<>*+=:()\w\s]*(?=;)/im,lookbehind:!0,inside:c},"cas-actions":g,comment:s,function:l,format:d,altformat:p,"numeric-constant":n,datetime:{pattern:RegExp(t+"(?:dt?|t)"),alias:"number"},string:r,step:i,keyword:k,"operator-keyword":{pattern:/\b(?:eq|ne|gt|lt|ge|le|in|not)\b/i,alias:"operator"},number:a,operator:/\*\*?|\|\|?|!!?|¦¦?|<[>=]?|>[<=]?|[-+\/=&]|[~¬^]=?/i,punctuation:o}}(Prism); \ No newline at end of file +!function(e){var t="(?:\"(?:\"\"|[^\"])*\"(?!\")|'(?:''|[^'])*'(?!'))",a=/\b(?:\d[\da-f]*x|\d+(?:\.\d+)?(?:e[+-]?\d+)?)\b/i,n={pattern:RegExp(t+"[bx]"),alias:"number"},i={pattern:/(^|\s+)(?:proc\s+\w+|quit|run|data(?!\=))\b/i,alias:"keyword",lookbehind:!0},s=[/\/\*[\s\S]*?\*\//,{pattern:/(^\s*|;\s*)\*[^;]*;/m,lookbehind:!0}],r={pattern:RegExp(t),greedy:!0},o=/[$%@.(){}\[\];,\\]/,l={pattern:/%?\w+(?=\()/,alias:"keyword"},c={function:l,"arg-value":{pattern:/(\s*=\s*)[A-Z\.]+/i,lookbehind:!0},operator:/=/,"macro-variable":{pattern:/&[^\.]*\./i,alias:"string"},arg:{pattern:/[A-Z]+/i,alias:"keyword"},number:a,"numeric-constant":n,punctuation:o,string:r},d={pattern:/\b(?:format|put)\b=?[\w'$.]+/im,inside:{keyword:/^(?:format|put)(?=\=)/i,equals:/=/,format:{pattern:/(?:\w|\$\d)+\.\d?/i,alias:"number"}}},p={pattern:/\b(?:format|put)\s+[\w']+(?:\s+[$.\w]+)+(?=;)/i,inside:{keyword:/^(?:format|put)/i,format:{pattern:/[\w$]+\.\d?/,alias:"number"}}},u={pattern:/((?:^|[\s])=?)(?:catname|checkpoint execute_always|dm|endsas|filename|footnote|%include|libname|%list|lock|missing|options|page|resetline|%run|sasfile|skip|sysecho|title\d?)\b/i,lookbehind:!0,alias:"keyword"},m={pattern:/(^|\s)(?:submit(?:\s+(?:load|parseonly|norun))?|endsubmit)\b/i,lookbehind:!0,alias:"keyword"},b="accessControl|cdm|aggregation|aStore|ruleMining|audio|autotune|bayesianNetClassifier|bioMedImage|boolRule|builtins|cardinality|sccasl|clustering|copula|countreg|dataDiscovery|dataPreprocess|dataSciencePilot|dataStep|decisionTree|deepLearn|deepNeural|varReduce|simSystem|ds2|deduplication|ecm|entityRes|espCluster|explainModel|factmac|fastKnn|fcmpact|fedSql|freqTab|gam|gleam|graphSemiSupLearn|gVarCluster|hiddenMarkovModel|hyperGroup|image|iml|ica|kernalPca|langModel|ldaTopic|sparseML|mlTools|mixed|modelPublishing|mbc|network|optNetwork|neuralNet|nonlinear|nmf|nonParametricBayes|optimization|panel|pls|percentile|pca|phreg|qkb|qlim|quantreg|recommend|tsReconcile|deepRnn|regression|reinforcementLearn|robustPca|sampling|sparkEmbeddedProcess|search(?:Analytics)?|sentimentAnalysis|sequence|configuration|session(?:Prop)?|severity|simple|smartData|sandwich|spatialreg|stabilityMonitoring|spc|loadStreams|svDataDescription|svm|table|conditionalRandomFields|text(?:Rule(?:Develop|Score)|Mining|Parse|Topic|Util|Filters|Frequency)|tsInfo|timeData|transpose|uniTimeSeries",g={pattern:RegExp("(^|\\s)(?:action\\s+)?(?:)\\.[a-z]+\\b[^;]+".replace(//g,function(){return b}),"i"),lookbehind:!0,inside:{keyword:RegExp("(?:)\\.[a-z]+\\b".replace(//g,function(){return b}),"i"),action:{pattern:/(?:action)/i,alias:"keyword"},comment:s,function:l,"arg-value":c["arg-value"],operator:c.operator,argument:c.arg,number:a,"numeric-constant":n,punctuation:o,string:r}},k={pattern:/((?:^|\s)=?)(?:after|analysis|and|array|barchart|barwidth|begingraph|by|call|cas|cbarline|cfill|class(?:lev)?|close|column|computed?|contains|continue|data(?=\=)|define|delete|describe|document|do\s+over|do|dol|drop|dul|end(?:source|comp)?|entryTitle|else|eval(?:uate)?|exec(?:ute)?|exit|fill(?:attrs)?|file(?:name)?|flist|fnc|function(?:list)?|goto|global|group(?:by)?|headline|headskip|histogram|if|infile|keep|keylabel|keyword|label|layout|leave|legendlabel|length|libname|loadactionset|merge|midpoints|name|noobs|nowd|_?null_|ods|options|or|otherwise|out(?:put)?|over(?:lay)?|plot|put|print|raise|ranexp|rannor|rbreak|retain|return|select|set|session|sessref|source|statgraph|sum|summarize|table|temp|terminate|then\s+do|then|title\d?|to|var|when|where|xaxisopts|yaxisopts|y2axisopts)\b/i,lookbehind:!0};e.languages.sas={datalines:{pattern:/^(\s*)(?:(?:data)?lines|cards);[\s\S]+?^\s*;/im,lookbehind:!0,alias:"string",inside:{keyword:{pattern:/^(?:(?:data)?lines|cards)/i},punctuation:/;/}},"proc-sql":{pattern:/(^proc\s+(?:fed)?sql(?:\s+[\w|=]+)?;)[\s\S]+?(?=^(?:proc\s+\w+|quit|run|data);|(?![\s\S]))/im,lookbehind:!0,inside:{sql:{pattern:RegExp("^[ \t]*(?:select|alter\\s+table|(?:create|describe|drop)\\s+(?:index|table(?:\\s+constraints)?|view)|create\\s+unique\\s+index|insert\\s+into|update)(?:|[^;\"'])+;".replace(//g,function(){return t}),"im"),alias:"language-sql",inside:e.languages.sql},"global-statements":u,"sql-statements":{pattern:/(^|\s)(?:disconnect\s+from|exec(?:ute)?|begin|commit|rollback|reset|validate)\b/i,lookbehind:!0,alias:"keyword"},number:a,"numeric-constant":n,punctuation:o,string:r}},"proc-groovy":{pattern:/(^proc\s+groovy(?:\s+[\w|=]+)?;)[\s\S]+?(?=^(?:proc\s+\w+|quit|run|data);|(?![\s\S]))/im,lookbehind:!0,inside:{comment:s,groovy:{pattern:RegExp("(^[ \t]*submit(?:\\s+(?:load|parseonly|norun))?)(?:|[^\"'])+?(?=endsubmit;)".replace(//g,function(){return t}),"im"),lookbehind:!0,alias:"language-groovy",inside:e.languages.groovy},keyword:k,"submit-statement":m,"global-statements":u,number:a,"numeric-constant":n,punctuation:o,string:r}},"proc-lua":{pattern:/(^proc\s+lua(?:\s+[\w|=]+)?;)[\s\S]+?(?=^(?:proc\s+\w+|quit|run|data);|(?![\s\S]))/im,lookbehind:!0,inside:{comment:s,lua:{pattern:RegExp("(^[ \t]*submit(?:\\s+(?:load|parseonly|norun))?)(?:|[^\"'])+?(?=endsubmit;)".replace(//g,function(){return t}),"im"),lookbehind:!0,alias:"language-lua",inside:e.languages.lua},keyword:k,"submit-statement":m,"global-statements":u,number:a,"numeric-constant":n,punctuation:o,string:r}},"proc-cas":{pattern:/(^proc\s+cas(?:\s+[\w|=]+)?;)[\s\S]+?(?=^(?:proc\s+\w+|quit|data);|(?![\s\S]))/im,lookbehind:!0,inside:{comment:s,"statement-var":{pattern:/((?:^|\s)=?)saveresult\s+[^;]+/im,lookbehind:!0,inside:{statement:{pattern:/^saveresult\s+\S+/i,inside:{keyword:/^(?:saveresult)/i}},rest:c}},"cas-actions":g,statement:{pattern:/((?:^|\s)=?)(?:default|(?:un)?set|on|output|upload)[^;]+/im,lookbehind:!0,inside:c},step:i,keyword:k,function:l,format:d,altformat:p,"global-statements":u,number:a,"numeric-constant":n,punctuation:o,string:r}},"proc-args":{pattern:RegExp("(^proc\\s+\\w+\\s+)(?!\\s)(?:[^;\"']|)+;".replace(//g,function(){return t}),"im"),lookbehind:!0,inside:c},"macro-keyword":{pattern:/((?:^|\s)=?)%(?:ABORT|BQUOTE|BY|CMS|COPY|DISPLAY|DO|ELSE|END|EVAL|GLOBAL|GO|GOTO|IF|INC|INCLUDE|INDEX|INPUT|KTRIM|LENGTH|LET|LIST|LOCAL|NRBQUOTE|NRQUOTE|NRSTR|PUT|QKTRIM|QSCAN|QSUBSTR|QSYSFUNC|QUOTE|QUPCASE|RETURN|RUN|SCAN|STR|SUBSTR|SUPERQ|SYMDEL|SYMGLOBL|SYMLOCAL|SYMEXIST|SYSCALL|SYSEVALF|SYSEXEC|SYSFUNC|SYSGET|SYSRPUT|THEN|TO|TSO|UNQUOTE|UNTIL|UPCASE|WHILE|WINDOW)\b/i,lookbehind:!0,alias:"keyword"},"macro-declaration":{pattern:/^%macro[^;]+(?=;)/im,inside:{keyword:/%macro/i}},"macro-end":{pattern:/^%mend[^;]+(?=;)/im,inside:{keyword:/%mend/i}},macro:{pattern:/%_\w+(?=\()/,alias:"keyword"},input:{pattern:/\binput\s+[-\w\s/*.$&]+;/i,inside:{input:{alias:"keyword",pattern:/^input/i},comment:s,number:a,"numeric-constant":n}},"options-args":{pattern:/(^options)[-'"|/\\<>*+=:()\w\s]*(?=;)/im,lookbehind:!0,inside:c},"cas-actions":g,comment:s,function:l,format:d,altformat:p,"numeric-constant":n,datetime:{pattern:RegExp(t+"(?:dt?|t)"),alias:"number"},string:r,step:i,keyword:k,"operator-keyword":{pattern:/\b(?:eq|ne|gt|lt|ge|le|in|not)\b/i,alias:"operator"},number:a,operator:/\*\*?|\|\|?|!!?|¦¦?|<[>=]?|>[<=]?|[-+\/=&]|[~¬^]=?/i,punctuation:o}}(Prism); \ No newline at end of file diff --git a/tests/languages/groovy+sas/groovy_inclusion.test b/tests/languages/groovy+sas/groovy_inclusion.test index edaece0025..abc69a4464 100644 --- a/tests/languages/groovy+sas/groovy_inclusion.test +++ b/tests/languages/groovy+sas/groovy_inclusion.test @@ -1,4 +1,5 @@ proc groovy classpath=cp; + /* Testing a comment */ submit parseonly; class Speaker { def say( word ) { @@ -26,6 +27,7 @@ quit; ], [ "proc-groovy", [ + ["comment", "/* Testing a comment */"], ["submit-statement", "submit parseonly"], [ "groovy", [ @@ -60,9 +62,12 @@ quit; ["punctuation", ";"] ] ], - ["keyword", "eval"], - ["string", "\"s = new Speaker(); s.say( \"\"Hi\"\" )\""], - ["punctuation", ";"], + ["proc-groovy",[ + ["keyword", "eval"], + ["string", "\"s = new Speaker(); s.say( \"\"Hi\"\" )\""], + ["punctuation", ";"] + ] + ], ["step", "quit"], ["punctuation", ";"] ] diff --git a/tests/languages/lua+sas/lua_inclusion.test b/tests/languages/lua+sas/lua_inclusion.test index 2a1a7bf874..85cdea347e 100644 --- a/tests/languages/lua+sas/lua_inclusion.test +++ b/tests/languages/lua+sas/lua_inclusion.test @@ -1,4 +1,5 @@ proc lua; +/* Testing a comment */ submit; array = { 1, 2, 3, 4, 5 } sum = sas.sumx(array) @@ -13,6 +14,7 @@ run; ["punctuation", ";"], [ "proc-lua", [ + ["comment", "/* Testing a comment */"], ["submit-statement", "submit"], [ "lua", [ diff --git a/tests/languages/sas/proccas_feature.test b/tests/languages/sas/proccas_feature.test index 5bc03d3ad6..60c42881d0 100644 --- a/tests/languages/sas/proccas_feature.test +++ b/tests/languages/sas/proccas_feature.test @@ -6,6 +6,7 @@ run; quit; proc cas; + /* Testing a comment */ session casauto; output log; table.loadTable / path="iris.sashdat"; @@ -61,6 +62,7 @@ quit; ["punctuation", ";"], ["proc-cas", [ + ["comment", "/* Testing a comment */"], ["keyword", "session"], " casauto", ["punctuation", ";"], From d60557713c033219be0acc36591a683576e723af Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Tue, 19 May 2020 00:36:06 +0200 Subject: [PATCH 0531/1100] IO: Fixed operator pattern (#2365) --- components/prism-io.js | 2 +- components/prism-io.min.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/components/prism-io.js b/components/prism-io.js index d589496b6a..c259eaa010 100644 --- a/components/prism-io.js +++ b/components/prism-io.js @@ -26,6 +26,6 @@ Prism.languages.io = { 'builtin':/\b(?:Array|AudioDevice|AudioMixer|Block|Box|Buffer|CFunction|CGI|Color|Curses|DBM|DNSResolver|DOConnection|DOProxy|DOServer|Date|Directory|Duration|DynLib|Error|Exception|FFT|File|Fnmatch|Font|Future|GL|GLE|GLScissor|GLU|GLUCylinder|GLUQuadric|GLUSphere|GLUT|Host|Image|Importer|LinkList|List|Lobby|Locals|MD5|MP3Decoder|MP3Encoder|Map|Message|Movie|Notification|Number|Object|OpenGL|Point|Protos|Regex|SGML|SGMLElement|SGMLParser|SQLite|Server|Sequence|ShowMessage|SleepyCat|SleepyCatCursor|Socket|SocketManager|Sound|Soup|Store|String|Tree|UDPSender|UPDReceiver|URL|User|Warning|WeakLink|Random|BigNum|Sequence)\b/, 'boolean': /\b(?:true|false|nil)\b/, 'number': /\b0x[\da-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:e-?\d+)?/i, - 'operator': /[=!*/%+-^&|]=|>>?=?|<>?=?|<>?=?|<>?=?|< Date: Tue, 19 May 2020 01:47:03 +0200 Subject: [PATCH 0532/1100] Tests: Included console in VM context (#2353) --- tests/helper/prism-loader.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/helper/prism-loader.js b/tests/helper/prism-loader.js index 7bc07487c9..58522e96ed 100644 --- a/tests/helper/prism-loader.js +++ b/tests/helper/prism-loader.js @@ -153,6 +153,9 @@ module.exports = { * @returns {*} */ runFileWithContext(fileSource, context = {}) { + // we don't have to pass our console but it's the only way these scripts can talk + // not supplying console here means that all references to `console` inside them will refer to a no-op console + context.console = console; vm.runInNewContext(fileSource, context); return context; } From b526e8c0caae2d3e4f579dea0043010f703c47a6 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Tue, 19 May 2020 01:52:09 +0200 Subject: [PATCH 0533/1100] Ruby: Optimized `regex` and `string` patterns (#2354) --- components/prism-ruby.js | 76 ++++++++---------------------------- components/prism-ruby.min.js | 2 +- 2 files changed, 17 insertions(+), 61 deletions(-) diff --git a/components/prism-ruby.js b/components/prism-ruby.js index 6311122afa..3c07d481d6 100644 --- a/components/prism-ruby.js +++ b/components/prism-ruby.js @@ -39,36 +39,14 @@ Prism.languages.insertBefore('ruby', 'keyword', { 'regex': [ { - pattern: /%r([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1[gim]{0,3}/, - greedy: true, - inside: { - 'interpolation': interpolation - } - }, - { - pattern: /%r\((?:[^()\\]|\\[\s\S])*\)[gim]{0,3}/, - greedy: true, - inside: { - 'interpolation': interpolation - } - }, - { - // Here we need to specifically allow interpolation - pattern: /%r\{(?:[^#{}\\]|#(?:\{[^}]+\})?|\\[\s\S])*\}[gim]{0,3}/, - greedy: true, - inside: { - 'interpolation': interpolation - } - }, - { - pattern: /%r\[(?:[^\[\]\\]|\\[\s\S])*\][gim]{0,3}/, - greedy: true, - inside: { - 'interpolation': interpolation - } - }, - { - pattern: /%r<(?:[^<>\\]|\\[\s\S])*>[gim]{0,3}/, + pattern: RegExp(/%r/.source + '(?:' + [ + /([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1[gim]{0,3}/.source, + /\((?:[^()\\]|\\[\s\S])*\)[gim]{0,3}/.source, + // Here we need to specifically allow interpolation + /\{(?:[^#{}\\]|#(?:\{[^}]+\})?|\\[\s\S])*\}[gim]{0,3}/.source, + /\[(?:[^\[\]\\]|\\[\s\S])*\][gim]{0,3}/.source, + /<(?:[^<>\\]|\\[\s\S])*>[gim]{0,3}/.source + ].join('|') + ')'), greedy: true, inside: { 'interpolation': interpolation @@ -102,36 +80,14 @@ Prism.languages.ruby.string = [ { - pattern: /%[qQiIwWxs]?([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1/, - greedy: true, - inside: { - 'interpolation': interpolation - } - }, - { - pattern: /%[qQiIwWxs]?\((?:[^()\\]|\\[\s\S])*\)/, - greedy: true, - inside: { - 'interpolation': interpolation - } - }, - { - // Here we need to specifically allow interpolation - pattern: /%[qQiIwWxs]?\{(?:[^#{}\\]|#(?:\{[^}]+\})?|\\[\s\S])*\}/, - greedy: true, - inside: { - 'interpolation': interpolation - } - }, - { - pattern: /%[qQiIwWxs]?\[(?:[^\[\]\\]|\\[\s\S])*\]/, - greedy: true, - inside: { - 'interpolation': interpolation - } - }, - { - pattern: /%[qQiIwWxs]?<(?:[^<>\\]|\\[\s\S])*>/, + pattern: RegExp(/%[qQiIwWxs]?/.source + '(?:' + [ + /([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source, + /\((?:[^()\\]|\\[\s\S])*\)/.source, + // Here we need to specifically allow interpolation + /\{(?:[^#{}\\]|#(?:\{[^}]+\})?|\\[\s\S])*\}/.source, + /\[(?:[^\[\]\\]|\\[\s\S])*\]/.source, + /<(?:[^<>\\]|\\[\s\S])*>/.source + ].join('|') + ')'), greedy: true, inside: { 'interpolation': interpolation diff --git a/components/prism-ruby.min.js b/components/prism-ruby.min.js index 8b2fcb8187..3d5d4a14b5 100644 --- a/components/prism-ruby.min.js +++ b/components/prism-ruby.min.js @@ -1 +1 @@ -!function(e){e.languages.ruby=e.languages.extend("clike",{comment:[/#.*/,{pattern:/^=begin\s[\s\S]*?^=end/m,greedy:!0}],"class-name":{pattern:/(\b(?:class)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:alias|and|BEGIN|begin|break|case|class|def|define_method|defined|do|each|else|elsif|END|end|ensure|extend|for|if|in|include|module|new|next|nil|not|or|prepend|protected|private|public|raise|redo|require|rescue|retry|return|self|super|then|throw|undef|unless|until|when|while|yield)\b/});var n={pattern:/#\{[^}]+\}/,inside:{delimiter:{pattern:/^#\{|\}$/,alias:"tag"},rest:e.languages.ruby}};delete e.languages.ruby.function,e.languages.insertBefore("ruby","keyword",{regex:[{pattern:/%r([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1[gim]{0,3}/,greedy:!0,inside:{interpolation:n}},{pattern:/%r\((?:[^()\\]|\\[\s\S])*\)[gim]{0,3}/,greedy:!0,inside:{interpolation:n}},{pattern:/%r\{(?:[^#{}\\]|#(?:\{[^}]+\})?|\\[\s\S])*\}[gim]{0,3}/,greedy:!0,inside:{interpolation:n}},{pattern:/%r\[(?:[^\[\]\\]|\\[\s\S])*\][gim]{0,3}/,greedy:!0,inside:{interpolation:n}},{pattern:/%r<(?:[^<>\\]|\\[\s\S])*>[gim]{0,3}/,greedy:!0,inside:{interpolation:n}},{pattern:/(^|[^/])\/(?!\/)(?:\[[^\r\n\]]+\]|\\.|[^[/\\\r\n])+\/[gim]{0,3}(?=\s*(?:$|[\r\n,.;})]))/,lookbehind:!0,greedy:!0}],variable:/[@$]+[a-zA-Z_]\w*(?:[?!]|\b)/,symbol:{pattern:/(^|[^:]):[a-zA-Z_]\w*(?:[?!]|\b)/,lookbehind:!0},"method-definition":{pattern:/(\bdef\s+)[\w.]+/,lookbehind:!0,inside:{function:/\w+$/,rest:e.languages.ruby}}}),e.languages.insertBefore("ruby","number",{builtin:/\b(?:Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Stat|Fixnum|Float|Hash|Integer|IO|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|String|Struct|TMS|Symbol|ThreadGroup|Thread|Time|TrueClass)\b/,constant:/\b[A-Z]\w*(?:[?!]|\b)/}),e.languages.ruby.string=[{pattern:/%[qQiIwWxs]?([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1/,greedy:!0,inside:{interpolation:n}},{pattern:/%[qQiIwWxs]?\((?:[^()\\]|\\[\s\S])*\)/,greedy:!0,inside:{interpolation:n}},{pattern:/%[qQiIwWxs]?\{(?:[^#{}\\]|#(?:\{[^}]+\})?|\\[\s\S])*\}/,greedy:!0,inside:{interpolation:n}},{pattern:/%[qQiIwWxs]?\[(?:[^\[\]\\]|\\[\s\S])*\]/,greedy:!0,inside:{interpolation:n}},{pattern:/%[qQiIwWxs]?<(?:[^<>\\]|\\[\s\S])*>/,greedy:!0,inside:{interpolation:n}},{pattern:/("|')(?:#\{[^}]+\}|\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0,inside:{interpolation:n}}],e.languages.rb=e.languages.ruby}(Prism); \ No newline at end of file +!function(e){e.languages.ruby=e.languages.extend("clike",{comment:[/#.*/,{pattern:/^=begin\s[\s\S]*?^=end/m,greedy:!0}],"class-name":{pattern:/(\b(?:class)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:alias|and|BEGIN|begin|break|case|class|def|define_method|defined|do|each|else|elsif|END|end|ensure|extend|for|if|in|include|module|new|next|nil|not|or|prepend|protected|private|public|raise|redo|require|rescue|retry|return|self|super|then|throw|undef|unless|until|when|while|yield)\b/});var n={pattern:/#\{[^}]+\}/,inside:{delimiter:{pattern:/^#\{|\}$/,alias:"tag"},rest:e.languages.ruby}};delete e.languages.ruby.function,e.languages.insertBefore("ruby","keyword",{regex:[{pattern:RegExp("%r(?:"+["([^a-zA-Z0-9\\s{(\\[<])(?:(?!\\1)[^\\\\]|\\\\[^])*\\1[gim]{0,3}","\\((?:[^()\\\\]|\\\\[^])*\\)[gim]{0,3}","\\{(?:[^#{}\\\\]|#(?:\\{[^}]+\\})?|\\\\[^])*\\}[gim]{0,3}","\\[(?:[^\\[\\]\\\\]|\\\\[^])*\\][gim]{0,3}","<(?:[^<>\\\\]|\\\\[^])*>[gim]{0,3}"].join("|")+")"),greedy:!0,inside:{interpolation:n}},{pattern:/(^|[^/])\/(?!\/)(?:\[[^\r\n\]]+\]|\\.|[^[/\\\r\n])+\/[gim]{0,3}(?=\s*(?:$|[\r\n,.;})]))/,lookbehind:!0,greedy:!0}],variable:/[@$]+[a-zA-Z_]\w*(?:[?!]|\b)/,symbol:{pattern:/(^|[^:]):[a-zA-Z_]\w*(?:[?!]|\b)/,lookbehind:!0},"method-definition":{pattern:/(\bdef\s+)[\w.]+/,lookbehind:!0,inside:{function:/\w+$/,rest:e.languages.ruby}}}),e.languages.insertBefore("ruby","number",{builtin:/\b(?:Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Stat|Fixnum|Float|Hash|Integer|IO|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|String|Struct|TMS|Symbol|ThreadGroup|Thread|Time|TrueClass)\b/,constant:/\b[A-Z]\w*(?:[?!]|\b)/}),e.languages.ruby.string=[{pattern:RegExp("%[qQiIwWxs]?(?:"+["([^a-zA-Z0-9\\s{(\\[<])(?:(?!\\1)[^\\\\]|\\\\[^])*\\1","\\((?:[^()\\\\]|\\\\[^])*\\)","\\{(?:[^#{}\\\\]|#(?:\\{[^}]+\\})?|\\\\[^])*\\}","\\[(?:[^\\[\\]\\\\]|\\\\[^])*\\]","<(?:[^<>\\\\]|\\\\[^])*>"].join("|")+")"),greedy:!0,inside:{interpolation:n}},{pattern:/("|')(?:#\{[^}]+\}|\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0,inside:{interpolation:n}}],e.languages.rb=e.languages.ruby}(Prism); \ No newline at end of file From fdbc44737963f598a4c4f70f72ab9b6c11df04f4 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Tue, 19 May 2020 01:52:38 +0200 Subject: [PATCH 0534/1100] CSS Extras: Optimized `class` and `id` patterns (#2359) --- components/prism-css-extras.js | 4 +- components/prism-css-extras.min.js | 2 +- .../css!+css-extras/selector_feature.test | 42 +++---------------- 3 files changed, 9 insertions(+), 39 deletions(-) diff --git a/components/prism-css-extras.js b/components/prism-css-extras.js index f62c47bbd2..cb71eb4d80 100644 --- a/components/prism-css-extras.js +++ b/components/prism-css-extras.js @@ -8,8 +8,8 @@ inside: selectorInside = { 'pseudo-element': /:(?:after|before|first-letter|first-line|selection)|::[-\w]+/, 'pseudo-class': /:[-\w]+/, - 'class': /\.[-:.\w]+/, - 'id': /#[-:.\w]+/, + 'class': /\.[-\w]+/, + 'id': /#[-\w]+/, 'attribute': { pattern: RegExp('\\[(?:[^[\\]"\']|' + string.source + ')*\\]'), greedy: true, diff --git a/components/prism-css-extras.min.js b/components/prism-css-extras.min.js index 81ee713413..dd8a5d6df7 100644 --- a/components/prism-css-extras.min.js +++ b/components/prism-css-extras.min.js @@ -1 +1 @@ -!function(e){var a,n=/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/;e.languages.css.selector={pattern:e.languages.css.selector,inside:a={"pseudo-element":/:(?:after|before|first-letter|first-line|selection)|::[-\w]+/,"pseudo-class":/:[-\w]+/,class:/\.[-:.\w]+/,id:/#[-:.\w]+/,attribute:{pattern:RegExp("\\[(?:[^[\\]\"']|"+n.source+")*\\]"),greedy:!0,inside:{punctuation:/^\[|\]$/,"case-sensitivity":{pattern:/(\s)[si]$/i,lookbehind:!0,alias:"keyword"},namespace:{pattern:/^(\s*)[-*\w\xA0-\uFFFF]*\|(?!=)/,lookbehind:!0,inside:{punctuation:/\|$/}},"attr-name":{pattern:/^(\s*)[-\w\xA0-\uFFFF]+/,lookbehind:!0},"attr-value":[n,{pattern:/(=\s*)[-\w\xA0-\uFFFF]+(?=\s*$)/,lookbehind:!0}],operator:/[|~*^$]?=/}},"n-th":[{pattern:/(\(\s*)[+-]?\d*[\dn](?:\s*[+-]\s*\d+)?(?=\s*\))/,lookbehind:!0,inside:{number:/[\dn]+/,operator:/[+-]/}},{pattern:/(\(\s*)(?:even|odd)(?=\s*\))/i,lookbehind:!0}],combinator:/>|\+|~|\|\|/,punctuation:/[(),]/}},e.languages.css.atrule.inside["selector-function-argument"].inside=a,e.languages.insertBefore("css","property",{variable:{pattern:/(^|[^-\w\xA0-\uFFFF])--[-_a-z\xA0-\uFFFF][-\w\xA0-\uFFFF]*/i,lookbehind:!0}});var r={pattern:/(\d)(?:%|[a-z]+)/,lookbehind:!0},i={pattern:/(^|[^\w.-])-?\d*\.?\d+/,lookbehind:!0};e.languages.insertBefore("css","function",{operator:{pattern:/(\s)[+\-*\/](?=\s)/,lookbehind:!0},hexcode:{pattern:/\B#(?:[\da-f]{1,2}){3,4}\b/i,alias:"color"},color:[/\b(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)\b/i,{pattern:/\b(?:rgb|hsl)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:rgb|hsl)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,inside:{unit:r,number:i,function:/[\w-]+(?=\()/,punctuation:/[(),]/}}],entity:/\\[\da-f]{1,8}/i,unit:r,number:i})}(Prism); \ No newline at end of file +!function(e){var a,n=/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/;e.languages.css.selector={pattern:e.languages.css.selector,inside:a={"pseudo-element":/:(?:after|before|first-letter|first-line|selection)|::[-\w]+/,"pseudo-class":/:[-\w]+/,class:/\.[-\w]+/,id:/#[-\w]+/,attribute:{pattern:RegExp("\\[(?:[^[\\]\"']|"+n.source+")*\\]"),greedy:!0,inside:{punctuation:/^\[|\]$/,"case-sensitivity":{pattern:/(\s)[si]$/i,lookbehind:!0,alias:"keyword"},namespace:{pattern:/^(\s*)[-*\w\xA0-\uFFFF]*\|(?!=)/,lookbehind:!0,inside:{punctuation:/\|$/}},"attr-name":{pattern:/^(\s*)[-\w\xA0-\uFFFF]+/,lookbehind:!0},"attr-value":[n,{pattern:/(=\s*)[-\w\xA0-\uFFFF]+(?=\s*$)/,lookbehind:!0}],operator:/[|~*^$]?=/}},"n-th":[{pattern:/(\(\s*)[+-]?\d*[\dn](?:\s*[+-]\s*\d+)?(?=\s*\))/,lookbehind:!0,inside:{number:/[\dn]+/,operator:/[+-]/}},{pattern:/(\(\s*)(?:even|odd)(?=\s*\))/i,lookbehind:!0}],combinator:/>|\+|~|\|\|/,punctuation:/[(),]/}},e.languages.css.atrule.inside["selector-function-argument"].inside=a,e.languages.insertBefore("css","property",{variable:{pattern:/(^|[^-\w\xA0-\uFFFF])--[-_a-z\xA0-\uFFFF][-\w\xA0-\uFFFF]*/i,lookbehind:!0}});var r={pattern:/(\d)(?:%|[a-z]+)/,lookbehind:!0},i={pattern:/(^|[^\w.-])-?\d*\.?\d+/,lookbehind:!0};e.languages.insertBefore("css","function",{operator:{pattern:/(\s)[+\-*\/](?=\s)/,lookbehind:!0},hexcode:{pattern:/\B#(?:[\da-f]{1,2}){3,4}\b/i,alias:"color"},color:[/\b(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)\b/i,{pattern:/\b(?:rgb|hsl)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:rgb|hsl)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,inside:{unit:r,number:i,function:/[\w-]+(?=\()/,punctuation:/[(),]/}}],entity:/\\[\da-f]{1,8}/i,unit:r,number:i})}(Prism); \ No newline at end of file diff --git a/tests/languages/css!+css-extras/selector_feature.test b/tests/languages/css!+css-extras/selector_feature.test index ddd6961403..6521dc44b7 100644 --- a/tests/languages/css!+css-extras/selector_feature.test +++ b/tests/languages/css!+css-extras/selector_feature.test @@ -1,20 +1,12 @@ foo:after { foo::first-letter { -foo.bar { +foo.bar.baz { -foo#bar { +foo#bar.baz { #foo > .bar:hover:after { -span, -div { - -div > p, -.css-li ~ .css-li, -.previous-selector + .selector, -.selected || td { - ---------------------------------------------------- [ @@ -30,12 +22,14 @@ div > p, ["selector", [ "foo", - ["class", ".bar"] + ["class", ".bar"], + ["class", ".baz"] ]], ["punctuation", "{"], ["selector", [ "foo", - ["id", "#bar"] + ["id", "#bar"], + ["class", ".baz"] ]], ["punctuation", "{"], ["selector", [ @@ -44,30 +38,6 @@ div > p, ["class", ".bar"], ["pseudo-class", ":hover"], ["pseudo-element", ":after"] - ]], ["punctuation", "{"], - - ["selector", [ - "span", - ["punctuation", ","], - "\r\ndiv" - ]], ["punctuation", "{"], - - ["selector", [ - "div ", - ["combinator", ">"], - " p", - ["punctuation", ","], - ["class", ".css-li"], - ["combinator", "~"], - ["class", ".css-li"], - ["punctuation", ","], - ["class", ".previous-selector"], - ["combinator", "+"], - ["class", ".selector"], - ["punctuation", ","], - ["class", ".selected"], - ["combinator", "||"], - " td" ]], ["punctuation", "{"] ] From ab1e34ae00f1562b45525b2a93cb0506dc7d8235 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Tue, 19 May 2020 01:53:44 +0200 Subject: [PATCH 0535/1100] Markup: Added alias for named entities (#2351) --- components/prism-markup.js | 8 +++++++- components/prism-markup.min.js | 2 +- prism.js | 8 +++++++- tests/languages/markup/entity_feature.js | 8 +++++--- 4 files changed, 20 insertions(+), 6 deletions(-) diff --git a/components/prism-markup.js b/components/prism-markup.js index ad65b41fb6..bb0126e7c7 100644 --- a/components/prism-markup.js +++ b/components/prism-markup.js @@ -39,7 +39,13 @@ Prism.languages.markup = { } }, - 'entity': /&#?[\da-z]{1,8};/i + 'entity': [ + { + pattern: /&[\da-z]{1,8};/i, + alias: 'named-entity' + }, + /&#x?[\da-f]{1,8};/i + ] }; Prism.languages.markup['tag'].inside['attr-value'].inside['entity'] = diff --git a/components/prism-markup.min.js b/components/prism-markup.min.js index 2578826a3e..fe93631151 100644 --- a/components/prism-markup.min.js +++ b/components/prism-markup.min.js @@ -1 +1 @@ -Prism.languages.markup={comment://,prolog:/<\?[\s\S]+?\?>/,doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0},cdata://i,tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[/^=/,{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:/&#?[\da-z]{1,8};/i},Prism.languages.markup.tag.inside["attr-value"].inside.entity=Prism.languages.markup.entity,Prism.hooks.add("wrap",function(a){"entity"===a.type&&(a.attributes.title=a.content.replace(/&/,"&"))}),Object.defineProperty(Prism.languages.markup.tag,"addInlined",{value:function(a,e){var s={};s["language-"+e]={pattern:/(^$)/i,lookbehind:!0,inside:Prism.languages[e]},s.cdata=/^$/i;var n={"included-cdata":{pattern://i,inside:s}};n["language-"+e]={pattern:/[\s\S]+/,inside:Prism.languages[e]};var t={};t[a]={pattern:RegExp("(<__[^]*?>)(?:))*\\]\\]>|(?!)".replace(/__/g,function(){return a}),"i"),lookbehind:!0,greedy:!0,inside:n},Prism.languages.insertBefore("markup","cdata",t)}}),Prism.languages.html=Prism.languages.markup,Prism.languages.mathml=Prism.languages.markup,Prism.languages.svg=Prism.languages.markup,Prism.languages.xml=Prism.languages.extend("markup",{}),Prism.languages.ssml=Prism.languages.xml,Prism.languages.atom=Prism.languages.xml,Prism.languages.rss=Prism.languages.xml; \ No newline at end of file +Prism.languages.markup={comment://,prolog:/<\?[\s\S]+?\?>/,doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0},cdata://i,tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[/^=/,{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},Prism.languages.markup.tag.inside["attr-value"].inside.entity=Prism.languages.markup.entity,Prism.hooks.add("wrap",function(a){"entity"===a.type&&(a.attributes.title=a.content.replace(/&/,"&"))}),Object.defineProperty(Prism.languages.markup.tag,"addInlined",{value:function(a,e){var s={};s["language-"+e]={pattern:/(^$)/i,lookbehind:!0,inside:Prism.languages[e]},s.cdata=/^$/i;var n={"included-cdata":{pattern://i,inside:s}};n["language-"+e]={pattern:/[\s\S]+/,inside:Prism.languages[e]};var t={};t[a]={pattern:RegExp("(<__[^]*?>)(?:))*\\]\\]>|(?!)".replace(/__/g,function(){return a}),"i"),lookbehind:!0,greedy:!0,inside:n},Prism.languages.insertBefore("markup","cdata",t)}}),Prism.languages.html=Prism.languages.markup,Prism.languages.mathml=Prism.languages.markup,Prism.languages.svg=Prism.languages.markup,Prism.languages.xml=Prism.languages.extend("markup",{}),Prism.languages.ssml=Prism.languages.xml,Prism.languages.atom=Prism.languages.xml,Prism.languages.rss=Prism.languages.xml; \ No newline at end of file diff --git a/prism.js b/prism.js index f8269053f9..d145dbce37 100644 --- a/prism.js +++ b/prism.js @@ -775,7 +775,13 @@ Prism.languages.markup = { } }, - 'entity': /&#?[\da-z]{1,8};/i + 'entity': [ + { + pattern: /&[\da-z]{1,8};/i, + alias: 'named-entity' + }, + /&#x?[\da-f]{1,8};/i + ] }; Prism.languages.markup['tag'].inside['attr-value'].inside['entity'] = diff --git a/tests/languages/markup/entity_feature.js b/tests/languages/markup/entity_feature.js index e5ac15931d..ec74c9e394 100644 --- a/tests/languages/markup/entity_feature.js +++ b/tests/languages/markup/entity_feature.js @@ -1,4 +1,6 @@ module.exports = { - '&': '&amp;', - 'ϑ': '&thetasym;' -}; \ No newline at end of file + '&': '&amp;', + 'ϑ': '&thetasym;', + 'A': '&#65;', + 'A': '&#x41;' +}; From 81cf23442deb603e51e86f0cd5381359d3f2dc8f Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Tue, 19 May 2020 01:58:59 +0200 Subject: [PATCH 0536/1100] Julia: Improved strings, comments, and other patterns (#2363) --- components/prism-julia.js | 36 +++++++++---- components/prism-julia.min.js | 2 +- tests/languages/julia/comment_feature.test | 13 ++++- tests/languages/julia/constant_feature.test | 22 +++++++- tests/languages/julia/issue2360.test | 39 +++++++++++++++ tests/languages/julia/number_feature.test | 18 ++++++- tests/languages/julia/operator_feature.test | 28 ++++++++--- .../languages/julia/punctuation_feature.test | 26 ++++++++++ tests/languages/julia/regex_feature.test | 17 +++++++ tests/languages/julia/string_feature.test | 50 ++++++++++++++++--- 10 files changed, 222 insertions(+), 29 deletions(-) create mode 100644 tests/languages/julia/issue2360.test create mode 100644 tests/languages/julia/punctuation_feature.test create mode 100644 tests/languages/julia/regex_feature.test diff --git a/components/prism-julia.js b/components/prism-julia.js index 8fa770f3b1..a71b785064 100644 --- a/components/prism-julia.js +++ b/components/prism-julia.js @@ -1,13 +1,31 @@ -Prism.languages.julia= { +Prism.languages.julia = { 'comment': { - pattern: /(^|[^\\])#.*/, + // support one level of nested comments + // https://github.com/JuliaLang/julia/pull/6128 + pattern: /(^|[^\\])(?:#=(?:[^#=]|=(?!#)|#(?!=)|#=(?:[^#=]|=(?!#)|#(?!=))*=#)*=#|#.*)/, lookbehind: true }, - 'string': /("""|''')[\s\S]+?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2/, - 'keyword' : /\b(?:abstract|baremodule|begin|bitstype|break|catch|ccall|const|continue|do|else|elseif|end|export|finally|for|function|global|if|immutable|import|importall|in|let|local|macro|module|print|println|quote|return|struct|try|type|typealias|using|while)\b/, - 'boolean' : /\b(?:true|false)\b/, - 'number' : /(?:\b(?=\d)|\B(?=\.))(?:0[box])?(?:[\da-f]+\.?\d*|\.\d+)(?:[efp][+-]?\d+)?j?/i, - 'operator': /[-+*^%÷&$\\]=?|\/[\/=]?|!=?=?|\|[=>]?|<(?:<=?|[=:])?|>(?:=|>>?=?)?|==?=?|[~≠≤≥]/, - 'punctuation' : /[{}[\];(),.:]/, - 'constant': /\b(?:(?:NaN|Inf)(?:16|32|64)?)\b/ + 'regex': { + // https://docs.julialang.org/en/v1/manual/strings/#Regular-Expressions-1 + pattern: /r"(?:\\.|[^"\\\r\n])*"[imsx]{0,4}/, + greedy: true + }, + 'string': { + // https://docs.julialang.org/en/v1/manual/strings/#man-characters-1 + // https://docs.julialang.org/en/v1/manual/strings/#String-Basics-1 + // https://docs.julialang.org/en/v1/manual/strings/#non-standard-string-literals-1 + // https://docs.julialang.org/en/v1/manual/running-external-programs/#Running-External-Programs-1 + pattern: /"""[\s\S]+?"""|\w*"(?:\\.|[^"\\\r\n])*"|(^|[^\w'])'(?:\\[^\r\n][^'\r\n]*|[^\\\r\n])'|`(?:[^\\`\r\n]|\\.)*`/, + lookbehind: true, + greedy: true + }, + 'keyword': /\b(?:abstract|baremodule|begin|bitstype|break|catch|ccall|const|continue|do|else|elseif|end|export|finally|for|function|global|if|immutable|import|importall|in|let|local|macro|module|print|println|quote|return|struct|try|type|typealias|using|while)\b/, + 'boolean': /\b(?:true|false)\b/, + 'number': /(?:\b(?=\d)|\B(?=\.))(?:0[box])?(?:[\da-f]+(?:_[\da-f]+)*\.?(?:\d+(?:_\d+)*)?|\.\d+(?:_\d+)*)(?:[efp][+-]?\d+(?:_\d+)*)?j?/i, + // https://docs.julialang.org/en/v1/manual/mathematical-operations/ + // https://docs.julialang.org/en/v1/manual/mathematical-operations/#Operator-Precedence-and-Associativity-1 + 'operator': /&&|\|\||[-+*^%÷⊻&$\\]=?|\/[\/=]?|!=?=?|\|[=>]?|<(?:<=?|[=:|])?|>(?:=|>>?=?)?|==?=?|[~≠≤≥'√∛]/, + 'punctuation': /::?|[{}[\]();,.?]/, + // https://docs.julialang.org/en/v1/base/numbers/#Base.im + 'constant': /\b(?:(?:NaN|Inf)(?:16|32|64)?|im|pi|e|catalan|eulergamma|golden)\b|[πℯγφ]/ }; diff --git a/components/prism-julia.min.js b/components/prism-julia.min.js index b47d12c34a..7bed6d84a3 100644 --- a/components/prism-julia.min.js +++ b/components/prism-julia.min.js @@ -1 +1 @@ -Prism.languages.julia={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0},string:/("""|''')[\s\S]+?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2/,keyword:/\b(?:abstract|baremodule|begin|bitstype|break|catch|ccall|const|continue|do|else|elseif|end|export|finally|for|function|global|if|immutable|import|importall|in|let|local|macro|module|print|println|quote|return|struct|try|type|typealias|using|while)\b/,boolean:/\b(?:true|false)\b/,number:/(?:\b(?=\d)|\B(?=\.))(?:0[box])?(?:[\da-f]+\.?\d*|\.\d+)(?:[efp][+-]?\d+)?j?/i,operator:/[-+*^%÷&$\\]=?|\/[\/=]?|!=?=?|\|[=>]?|<(?:<=?|[=:])?|>(?:=|>>?=?)?|==?=?|[~≠≤≥]/,punctuation:/[{}[\];(),.:]/,constant:/\b(?:(?:NaN|Inf)(?:16|32|64)?)\b/}; \ No newline at end of file +Prism.languages.julia={comment:{pattern:/(^|[^\\])(?:#=(?:[^#=]|=(?!#)|#(?!=)|#=(?:[^#=]|=(?!#)|#(?!=))*=#)*=#|#.*)/,lookbehind:!0},regex:{pattern:/r"(?:\\.|[^"\\\r\n])*"[imsx]{0,4}/,greedy:!0},string:{pattern:/"""[\s\S]+?"""|\w*"(?:\\.|[^"\\\r\n])*"|(^|[^\w'])'(?:\\[^\r\n][^'\r\n]*|[^\\\r\n])'|`(?:[^\\`\r\n]|\\.)*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:abstract|baremodule|begin|bitstype|break|catch|ccall|const|continue|do|else|elseif|end|export|finally|for|function|global|if|immutable|import|importall|in|let|local|macro|module|print|println|quote|return|struct|try|type|typealias|using|while)\b/,boolean:/\b(?:true|false)\b/,number:/(?:\b(?=\d)|\B(?=\.))(?:0[box])?(?:[\da-f]+(?:_[\da-f]+)*\.?(?:\d+(?:_\d+)*)?|\.\d+(?:_\d+)*)(?:[efp][+-]?\d+(?:_\d+)*)?j?/i,operator:/&&|\|\||[-+*^%÷⊻&$\\]=?|\/[\/=]?|!=?=?|\|[=>]?|<(?:<=?|[=:|])?|>(?:=|>>?=?)?|==?=?|[~≠≤≥'√∛]/,punctuation:/::?|[{}[\]();,.?]/,constant:/\b(?:(?:NaN|Inf)(?:16|32|64)?|im|pi|e|catalan|eulergamma|golden)\b|[πℯγφ]/}; \ No newline at end of file diff --git a/tests/languages/julia/comment_feature.test b/tests/languages/julia/comment_feature.test index 054d6023d1..559c6bf70a 100644 --- a/tests/languages/julia/comment_feature.test +++ b/tests/languages/julia/comment_feature.test @@ -1,13 +1,22 @@ # # foobar +#=# +#= + multi line + =# + +#= #= nested =# =# ---------------------------------------------------- [ ["comment", "#"], - ["comment", "# foobar"] + ["comment", "# foobar"], + ["comment", "#=#"], + ["comment", "#=\r\n multi line\r\n =#"], + ["comment", "#= #= nested =# =#"] ] ---------------------------------------------------- -Checks for comments. \ No newline at end of file +Checks for comments. diff --git a/tests/languages/julia/constant_feature.test b/tests/languages/julia/constant_feature.test index 402418ad3f..a79bbd0215 100644 --- a/tests/languages/julia/constant_feature.test +++ b/tests/languages/julia/constant_feature.test @@ -1,6 +1,13 @@ NaN NaN16 NaN32 NaN64 Inf Inf16 Inf32 Inf64 +im +pi π +e ℯ +catalan +eulergamma γ +golden φ + ---------------------------------------------------- [ @@ -11,9 +18,20 @@ Inf Inf16 Inf32 Inf64 ["constant", "Inf"], ["constant", "Inf16"], ["constant", "Inf32"], - ["constant", "Inf64"] + ["constant", "Inf64"], + + ["constant", "im"], + ["constant", "pi"], + ["constant", "π"], + ["constant", "e"], + ["constant", "ℯ"], + ["constant", "catalan"], + ["constant", "eulergamma"], + ["constant", "γ"], + ["constant", "golden"], + ["constant", "φ"] ] ---------------------------------------------------- -Checks for all constants. \ No newline at end of file +Checks for all constants. diff --git a/tests/languages/julia/issue2360.test b/tests/languages/julia/issue2360.test new file mode 100644 index 0000000000..f796996916 --- /dev/null +++ b/tests/languages/julia/issue2360.test @@ -0,0 +1,39 @@ +""" + count_consecutive(str::AbstractString, start::Int) + +Counts the number of identical characters in a given string `str` starting from index `start`. + +# Examples + +```julia-repl +julia> count_consecutive("AAAB", 3) +('A', 3) + +julia> count_consecutive("x y z", 3) +('y', 1) +``` +""" +function count_consecutive(str, start) + ... +end + +---------------------------------------------------- + +[ + ["string", "\"\"\"\r\n\tcount_consecutive(str::AbstractString, start::Int)\r\n\r\nCounts the number of identical characters in a given string `str` starting from index `start`.\r\n\r\n# Examples\r\n\r\n```julia-repl\r\njulia> count_consecutive(\"AAAB\", 3)\r\n('A', 3)\r\n\r\njulia> count_consecutive(\"x y z\", 3)\r\n('y', 1)\r\n```\r\n\"\"\""], + ["keyword", "function"], + " count_consecutive", + ["punctuation", "("], + "str", + ["punctuation", ","], + " start", + ["punctuation", ")"], + ["punctuation", "."], + ["punctuation", "."], + ["punctuation", "."], + ["keyword", "end"] +] + +---------------------------------------------------- + +Multi-line strings didn't work correctly. diff --git a/tests/languages/julia/number_feature.test b/tests/languages/julia/number_feature.test index 72fc7a48e5..5c8e2d5969 100644 --- a/tests/languages/julia/number_feature.test +++ b/tests/languages/julia/number_feature.test @@ -1,7 +1,10 @@ 0b0011 0o274 0xBadFace +0x123456789abcdef 42 +1. +.5 1.23 1e10 2.5e-4 @@ -10,6 +13,10 @@ 0x1p0 0x1.8p3 0x.4p-1 +10_000 +0.000_000_005 +0xdead_beef +0b1011_0010 ---------------------------------------------------- @@ -17,7 +24,10 @@ ["number", "0b0011"], ["number", "0o274"], ["number", "0xBadFace"], + ["number", "0x123456789abcdef"], ["number", "42"], + ["number", "1."], + ["number", ".5"], ["number", "1.23"], ["number", "1e10"], ["number", "2.5e-4"], @@ -25,9 +35,13 @@ ["number", "2.5f-4"], ["number", "0x1p0"], ["number", "0x1.8p3"], - ["number", "0x.4p-1"] + ["number", "0x.4p-1"], + ["number", "10_000"], + ["number", "0.000_000_005"], + ["number", "0xdead_beef"], + ["number", "0b1011_0010"] ] ---------------------------------------------------- -Checks for binary, octal, hexadecimal and decimal numbers. \ No newline at end of file +Checks for binary, octal, hexadecimal and decimal numbers. diff --git a/tests/languages/julia/operator_feature.test b/tests/languages/julia/operator_feature.test index 57f0d68c8b..70c611d98d 100644 --- a/tests/languages/julia/operator_feature.test +++ b/tests/languages/julia/operator_feature.test @@ -7,13 +7,18 @@ % %= ÷ ÷= ! != !== -& &= -| |= |> +& &= && +⊻ ⊻= +| |= || +|> <| $ $= < <= <: << <<= > >= >> >>= >>> >>>= = == === -~ ≠ ≤ ≥ +~ ≠ ≤ ≥ √ ∛ + +A'b +A'b'' ---------------------------------------------------- @@ -27,15 +32,24 @@ $ $= ["operator", "%"], ["operator", "%="], ["operator", "÷"], ["operator", "÷="], ["operator", "!"], ["operator", "!="], ["operator", "!=="], - ["operator", "&"], ["operator", "&="], - ["operator", "|"], ["operator", "|="], ["operator", "|>"], + ["operator", "&"], ["operator", "&="], ["operator", "&&"], + ["operator", "⊻"], ["operator", "⊻="], + ["operator", "|"], ["operator", "|="], ["operator", "||"], + ["operator", "|>"], ["operator", "<|"], ["operator", "$"], ["operator", "$="], ["operator", "<"], ["operator", "<="], ["operator", "<:"], ["operator", "<<"], ["operator", "<<="], ["operator", ">"], ["operator", ">="], ["operator", ">>"], ["operator", ">>="], ["operator", ">>>"], ["operator", ">>>="], ["operator", "="], ["operator", "=="], ["operator", "==="], - ["operator", "~"], ["operator", "≠"], ["operator", "≤"], ["operator", "≥"] + ["operator", "~"], ["operator", "≠"], ["operator", "≤"], ["operator", "≥"], ["operator", "√"], ["operator", "∛"], + "\r\n\r\nA", + ["operator", "'"], + "b\r\nA", + ["operator", "'"], + "b", + ["operator", "'"], + ["operator", "'"] ] ---------------------------------------------------- -Checks for operators. \ No newline at end of file +Checks for operators. diff --git a/tests/languages/julia/punctuation_feature.test b/tests/languages/julia/punctuation_feature.test new file mode 100644 index 0000000000..c550aec6a2 --- /dev/null +++ b/tests/languages/julia/punctuation_feature.test @@ -0,0 +1,26 @@ +{ } [ ] ( ) +; , +. +:: +? : + +---------------------------------------------------- + +[ + ["punctuation", "{"], + ["punctuation", "}"], + ["punctuation", "["], + ["punctuation", "]"], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", ";"], + ["punctuation", ","], + ["punctuation", "."], + ["punctuation", "::"], + ["punctuation", "?"], + ["punctuation", ":"] +] + +---------------------------------------------------- + +Checks for punctuation. diff --git a/tests/languages/julia/regex_feature.test b/tests/languages/julia/regex_feature.test new file mode 100644 index 0000000000..664196cd16 --- /dev/null +++ b/tests/languages/julia/regex_feature.test @@ -0,0 +1,17 @@ +r"foo"i +r"(a|b)(c)?(d)" +r"^\s*(?:#\s*(.*?)\s*$|$)" +r"a+.*b+.*?d$"ism + +---------------------------------------------------- + +[ + ["regex", "r\"foo\"i"], + ["regex", "r\"(a|b)(c)?(d)\""], + ["regex", "r\"^\\s*(?:#\\s*(.*?)\\s*$|$)\""], + ["regex", "r\"a+.*b+.*?d$\"ism"] +] + +---------------------------------------------------- + +Checks for regular expressions. diff --git a/tests/languages/julia/string_feature.test b/tests/languages/julia/string_feature.test index 207b3f4425..b88864a6e3 100644 --- a/tests/languages/julia/string_feature.test +++ b/tests/languages/julia/string_feature.test @@ -1,29 +1,67 @@ "" "fo\"o" +"\xe2\x88" + 'x' '\'' '\u2200' +'\x80' +'\xe2\x88' +'∀' + """foo""" """fo"o bar""" -'''foo''' -'''fo'o -bar''' + +`echo hello` +`echo "foo bar"` + +# non-standard string +s"\g<0>1" +b"DATA\xff\u2200" +v"0.3-" +raw"\\ \\\"" + +# not a character +A'b +A'b'' ---------------------------------------------------- [ ["string", "\"\""], ["string", "\"fo\\\"o\""], + ["string", "\"\\xe2\\x88\""], + ["string", "'x'"], ["string", "'\\''"], ["string", "'\\u2200'"], + ["string", "'\\x80'"], + ["string", "'\\xe2\\x88'"], + ["string", "'∀'"], + ["string", "\"\"\"foo\"\"\""], ["string", "\"\"\"fo\"o\r\nbar\"\"\""], - ["string", "'''foo'''"], - ["string", "'''fo'o\r\nbar'''"] + + ["string", "`echo hello`"], + ["string", "`echo \"foo bar\"`"], + + ["comment", "# non-standard string"], + ["string", "s\"\\g<0>1\""], + ["string", "b\"DATA\\xff\\u2200\""], + ["string", "v\"0.3-\""], + ["string", "raw\"\\\\ \\\\\\\"\""], + + ["comment", "# not a character"], + "\r\nA", + ["operator", "'"], + "b\r\nA", + ["operator", "'"], + "b", + ["operator", "'"], + ["operator", "'"] ] ---------------------------------------------------- -Checks for strings and characters. \ No newline at end of file +Checks for strings and characters. From 96a0116e69754d5639f351c98ea4c23b88322dac Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Tue, 19 May 2020 01:59:40 +0200 Subject: [PATCH 0537/1100] Markup: Added `attr-equals` alias for the attribute `=` sign (#2350) --- components/prism-markup.js | 8 ++++---- components/prism-markup.min.js | 2 +- prism.js | 8 ++++---- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/components/prism-markup.js b/components/prism-markup.js index bb0126e7c7..af51c86a49 100644 --- a/components/prism-markup.js +++ b/components/prism-markup.js @@ -21,11 +21,11 @@ Prism.languages.markup = { pattern: /=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/, inside: { 'punctuation': [ - /^=/, { - pattern: /^(\s*)["']|["']$/, - lookbehind: true - } + pattern: /^=/, + alias: 'attr-equals' + }, + /"|'/ ] } }, diff --git a/components/prism-markup.min.js b/components/prism-markup.min.js index fe93631151..16a1fd1363 100644 --- a/components/prism-markup.min.js +++ b/components/prism-markup.min.js @@ -1 +1 @@ -Prism.languages.markup={comment://,prolog:/<\?[\s\S]+?\?>/,doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0},cdata://i,tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[/^=/,{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},Prism.languages.markup.tag.inside["attr-value"].inside.entity=Prism.languages.markup.entity,Prism.hooks.add("wrap",function(a){"entity"===a.type&&(a.attributes.title=a.content.replace(/&/,"&"))}),Object.defineProperty(Prism.languages.markup.tag,"addInlined",{value:function(a,e){var s={};s["language-"+e]={pattern:/(^$)/i,lookbehind:!0,inside:Prism.languages[e]},s.cdata=/^$/i;var n={"included-cdata":{pattern://i,inside:s}};n["language-"+e]={pattern:/[\s\S]+/,inside:Prism.languages[e]};var t={};t[a]={pattern:RegExp("(<__[^]*?>)(?:))*\\]\\]>|(?!)".replace(/__/g,function(){return a}),"i"),lookbehind:!0,greedy:!0,inside:n},Prism.languages.insertBefore("markup","cdata",t)}}),Prism.languages.html=Prism.languages.markup,Prism.languages.mathml=Prism.languages.markup,Prism.languages.svg=Prism.languages.markup,Prism.languages.xml=Prism.languages.extend("markup",{}),Prism.languages.ssml=Prism.languages.xml,Prism.languages.atom=Prism.languages.xml,Prism.languages.rss=Prism.languages.xml; \ No newline at end of file +Prism.languages.markup={comment://,prolog:/<\?[\s\S]+?\?>/,doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0},cdata://i,tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},Prism.languages.markup.tag.inside["attr-value"].inside.entity=Prism.languages.markup.entity,Prism.hooks.add("wrap",function(a){"entity"===a.type&&(a.attributes.title=a.content.replace(/&/,"&"))}),Object.defineProperty(Prism.languages.markup.tag,"addInlined",{value:function(a,e){var s={};s["language-"+e]={pattern:/(^$)/i,lookbehind:!0,inside:Prism.languages[e]},s.cdata=/^$/i;var n={"included-cdata":{pattern://i,inside:s}};n["language-"+e]={pattern:/[\s\S]+/,inside:Prism.languages[e]};var t={};t[a]={pattern:RegExp("(<__[^]*?>)(?:))*\\]\\]>|(?!)".replace(/__/g,function(){return a}),"i"),lookbehind:!0,greedy:!0,inside:n},Prism.languages.insertBefore("markup","cdata",t)}}),Prism.languages.html=Prism.languages.markup,Prism.languages.mathml=Prism.languages.markup,Prism.languages.svg=Prism.languages.markup,Prism.languages.xml=Prism.languages.extend("markup",{}),Prism.languages.ssml=Prism.languages.xml,Prism.languages.atom=Prism.languages.xml,Prism.languages.rss=Prism.languages.xml; \ No newline at end of file diff --git a/prism.js b/prism.js index d145dbce37..8a136e94b7 100644 --- a/prism.js +++ b/prism.js @@ -757,11 +757,11 @@ Prism.languages.markup = { pattern: /=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/, inside: { 'punctuation': [ - /^=/, { - pattern: /^(\s*)["']|["']$/, - lookbehind: true - } + pattern: /^=/, + alias: 'attr-equals' + }, + /"|'/ ] } }, From 9c7bc820787ff30cd33b25d00f438ea60873c478 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Tue, 19 May 2020 02:30:59 +0200 Subject: [PATCH 0538/1100] Markup: Added tokens inside DOCTYPE (#2349) --- components/prism-markup.js | 21 ++++- components/prism-markup.min.js | 2 +- prism.js | 21 ++++- tests/languages/markup/doctype_feature.test | 97 +++++++++++++++++++-- 4 files changed, 130 insertions(+), 11 deletions(-) diff --git a/components/prism-markup.js b/components/prism-markup.js index af51c86a49..63dbf16c46 100644 --- a/components/prism-markup.js +++ b/components/prism-markup.js @@ -2,8 +2,24 @@ Prism.languages.markup = { 'comment': //, 'prolog': /<\?[\s\S]+?\?>/, 'doctype': { + // https://www.w3.org/TR/xml/#NT-doctypedecl pattern: /"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i, - greedy: true + greedy: true, + inside: { + 'internal-subset': { + pattern: /(\[)[\s\S]+(?=\]>$)/, + lookbehind: true, + greedy: true, + inside: null // see below + }, + 'string': { + pattern: /"[^"]*"|'[^']*'/, + greedy: true + }, + 'punctuation': /^$|[[\]]/, + 'doctype-tag': /^DOCTYPE/, + 'name': /[^\s<>'"]+/ + } }, 'cdata': //i, 'tag': { @@ -50,9 +66,10 @@ Prism.languages.markup = { Prism.languages.markup['tag'].inside['attr-value'].inside['entity'] = Prism.languages.markup['entity']; +Prism.languages.markup['doctype'].inside['internal-subset'].inside = Prism.languages.markup; // Plugin to make entity title show the real entity, idea by Roman Komarov -Prism.hooks.add('wrap', function(env) { +Prism.hooks.add('wrap', function (env) { if (env.type === 'entity') { env.attributes['title'] = env.content.replace(/&/, '&'); diff --git a/components/prism-markup.min.js b/components/prism-markup.min.js index 16a1fd1363..1882d5795e 100644 --- a/components/prism-markup.min.js +++ b/components/prism-markup.min.js @@ -1 +1 @@ -Prism.languages.markup={comment://,prolog:/<\?[\s\S]+?\?>/,doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0},cdata://i,tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},Prism.languages.markup.tag.inside["attr-value"].inside.entity=Prism.languages.markup.entity,Prism.hooks.add("wrap",function(a){"entity"===a.type&&(a.attributes.title=a.content.replace(/&/,"&"))}),Object.defineProperty(Prism.languages.markup.tag,"addInlined",{value:function(a,e){var s={};s["language-"+e]={pattern:/(^$)/i,lookbehind:!0,inside:Prism.languages[e]},s.cdata=/^$/i;var n={"included-cdata":{pattern://i,inside:s}};n["language-"+e]={pattern:/[\s\S]+/,inside:Prism.languages[e]};var t={};t[a]={pattern:RegExp("(<__[^]*?>)(?:))*\\]\\]>|(?!)".replace(/__/g,function(){return a}),"i"),lookbehind:!0,greedy:!0,inside:n},Prism.languages.insertBefore("markup","cdata",t)}}),Prism.languages.html=Prism.languages.markup,Prism.languages.mathml=Prism.languages.markup,Prism.languages.svg=Prism.languages.markup,Prism.languages.xml=Prism.languages.extend("markup",{}),Prism.languages.ssml=Prism.languages.xml,Prism.languages.atom=Prism.languages.xml,Prism.languages.rss=Prism.languages.xml; \ No newline at end of file +Prism.languages.markup={comment://,prolog:/<\?[\s\S]+?\?>/,doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^$|[[\]]/,"doctype-tag":/^DOCTYPE/,name:/[^\s<>'"]+/}},cdata://i,tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},Prism.languages.markup.tag.inside["attr-value"].inside.entity=Prism.languages.markup.entity,Prism.languages.markup.doctype.inside["internal-subset"].inside=Prism.languages.markup,Prism.hooks.add("wrap",function(a){"entity"===a.type&&(a.attributes.title=a.content.replace(/&/,"&"))}),Object.defineProperty(Prism.languages.markup.tag,"addInlined",{value:function(a,e){var s={};s["language-"+e]={pattern:/(^$)/i,lookbehind:!0,inside:Prism.languages[e]},s.cdata=/^$/i;var n={"included-cdata":{pattern://i,inside:s}};n["language-"+e]={pattern:/[\s\S]+/,inside:Prism.languages[e]};var t={};t[a]={pattern:RegExp("(<__[^]*?>)(?:))*\\]\\]>|(?!)".replace(/__/g,function(){return a}),"i"),lookbehind:!0,greedy:!0,inside:n},Prism.languages.insertBefore("markup","cdata",t)}}),Prism.languages.html=Prism.languages.markup,Prism.languages.mathml=Prism.languages.markup,Prism.languages.svg=Prism.languages.markup,Prism.languages.xml=Prism.languages.extend("markup",{}),Prism.languages.ssml=Prism.languages.xml,Prism.languages.atom=Prism.languages.xml,Prism.languages.rss=Prism.languages.xml; \ No newline at end of file diff --git a/prism.js b/prism.js index 8a136e94b7..f257ebf27c 100644 --- a/prism.js +++ b/prism.js @@ -738,8 +738,24 @@ Prism.languages.markup = { 'comment': //, 'prolog': /<\?[\s\S]+?\?>/, 'doctype': { + // https://www.w3.org/TR/xml/#NT-doctypedecl pattern: /"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i, - greedy: true + greedy: true, + inside: { + 'internal-subset': { + pattern: /(\[)[\s\S]+(?=\]>$)/, + lookbehind: true, + greedy: true, + inside: null // see below + }, + 'string': { + pattern: /"[^"]*"|'[^']*'/, + greedy: true + }, + 'punctuation': /^$|[[\]]/, + 'doctype-tag': /^DOCTYPE/, + 'name': /[^\s<>'"]+/ + } }, 'cdata': //i, 'tag': { @@ -786,9 +802,10 @@ Prism.languages.markup = { Prism.languages.markup['tag'].inside['attr-value'].inside['entity'] = Prism.languages.markup['entity']; +Prism.languages.markup['doctype'].inside['internal-subset'].inside = Prism.languages.markup; // Plugin to make entity title show the real entity, idea by Roman Komarov -Prism.hooks.add('wrap', function(env) { +Prism.hooks.add('wrap', function (env) { if (env.type === 'entity') { env.attributes['title'] = env.content.replace(/&/, '&'); diff --git a/tests/languages/markup/doctype_feature.test b/tests/languages/markup/doctype_feature.test index 8c3d955f37..4ba9ee2175 100644 --- a/tests/languages/markup/doctype_feature.test +++ b/tests/languages/markup/doctype_feature.test @@ -15,12 +15,97 @@ ---------------------------------------------------- [ - ["doctype", ""], - ["doctype", ""], - ["doctype", ""], - ["doctype", ""], - ["doctype", "\r\n]>"], - ["doctype", "\r\n\t\r\n\t\r\n]>"] + ["doctype", [ + ["punctuation", ""] + ]], + ["doctype", [ + ["punctuation", ""] + ]], + ["doctype", [ + ["punctuation", ""] + ]], + ["doctype", [ + ["punctuation", ""] + ]], + ["doctype", [ + ["punctuation", ""] + ]] + ]], + ["punctuation", "]"], + ["punctuation", ">"] + ]], + ["doctype", [ + ["punctuation", ""] + ]], + ["tag", [ + ["tag", [ + ["punctuation", "<"], + "!ELEMENT" + ]], + ["attr-name", [ + "subject" + ]], + ["attr-name", [ + "(#PCDATA)" + ]], + ["punctuation", ">"] + ]], + ["comment", ""] + ]], + ["punctuation", "]"], + ["punctuation", ">"] + ]] ] ---------------------------------------------------- From e416341fc032b5b7714faba3aae5ba909fce70f2 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Fri, 22 May 2020 17:37:53 +0200 Subject: [PATCH 0539/1100] Test: Always use `components.json` (#2370) All test files now consistently import `components.json` instead of `components.js`. The JS file is generated and can be outdated. This can be annoying when you're adding a language. --- tests/aliases-test.js | 2 +- tests/dependencies-test.js | 2 +- tests/helper/prism-loader.js | 2 +- tests/pattern-tests.js | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/aliases-test.js b/tests/aliases-test.js index 0e35ce9fa4..2b562f7f75 100644 --- a/tests/aliases-test.js +++ b/tests/aliases-test.js @@ -2,7 +2,7 @@ const { assert } = require("chai"); const PrismLoader = require('./helper/prism-loader'); -const { languages } = require('./../components'); +const { languages } = require('./../components.json'); function toArray(value) { diff --git a/tests/dependencies-test.js b/tests/dependencies-test.js index 375147a12a..aa0c405e10 100644 --- a/tests/dependencies-test.js +++ b/tests/dependencies-test.js @@ -1,6 +1,6 @@ const { assert } = require('chai'); const getLoader = require('../dependencies'); -const components = require('../components'); +const components = require('../components.json'); describe('Dependency logic', function () { diff --git a/tests/helper/prism-loader.js b/tests/helper/prism-loader.js index 58522e96ed..562e02dfaa 100644 --- a/tests/helper/prism-loader.js +++ b/tests/helper/prism-loader.js @@ -3,7 +3,7 @@ const fs = require("fs"); const vm = require("vm"); const { getAllFiles } = require("./test-discovery"); -const components = require("../../components"); +const components = require("../../components.json"); const getLoader = require("../../dependencies"); const languagesCatalog = components.languages; diff --git a/tests/pattern-tests.js b/tests/pattern-tests.js index b35fdb9b6a..cbf1d54eca 100644 --- a/tests/pattern-tests.js +++ b/tests/pattern-tests.js @@ -3,7 +3,7 @@ const { assert } = require('chai'); const PrismLoader = require('./helper/prism-loader'); const { BFS, parseRegex } = require('./helper/util'); -const { languages } = require('../components'); +const { languages } = require('../components.json'); const { visitRegExpAST } = require('regexpp'); From 4fe036766ea84f2a0ab11194babe38f0e559ce27 Mon Sep 17 00:00:00 2001 From: Joe DF Date: Mon, 25 May 2020 07:30:51 -0400 Subject: [PATCH 0540/1100] AutoHotkey: Added missing definitions (#2400) This adds a lot of missing keywords, builtins, constants, and other definitions. --- components/prism-autohotkey.js | 10 +++---- components/prism-autohotkey.min.js | 2 +- .../languages/autohotkey/builtin_feature.test | 26 +++++++++++++++++++ .../autohotkey/constant_feature.test | 14 ++++++++++ .../autohotkey/important_feature.test | 16 +++++++++--- .../languages/autohotkey/keyword_feature.test | 12 +++++++++ .../autohotkey/selector_feature.test | 2 ++ 7 files changed, 73 insertions(+), 9 deletions(-) diff --git a/components/prism-autohotkey.js b/components/prism-autohotkey.js index 01c2b0d1f6..72ed8f2989 100644 --- a/components/prism-autohotkey.js +++ b/components/prism-autohotkey.js @@ -13,15 +13,15 @@ Prism.languages.autohotkey= { 'punctuation': /[{}[\]():,]/, 'boolean': /\b(?:true|false)\b/, - 'selector': /\b(?:AutoTrim|BlockInput|Break|Click|ClipWait|Continue|Control|ControlClick|ControlFocus|ControlGet|ControlGetFocus|ControlGetPos|ControlGetText|ControlMove|ControlSend|ControlSendRaw|ControlSetText|CoordMode|Critical|DetectHiddenText|DetectHiddenWindows|Drive|DriveGet|DriveSpaceFree|EnvAdd|EnvDiv|EnvGet|EnvMult|EnvSet|EnvSub|EnvUpdate|Exit|ExitApp|FileAppend|FileCopy|FileCopyDir|FileCreateDir|FileCreateShortcut|FileDelete|FileEncoding|FileGetAttrib|FileGetShortcut|FileGetSize|FileGetTime|FileGetVersion|FileInstall|FileMove|FileMoveDir|FileRead|FileReadLine|FileRecycle|FileRecycleEmpty|FileRemoveDir|FileSelectFile|FileSelectFolder|FileSetAttrib|FileSetTime|FormatTime|GetKeyState|Gosub|Goto|GroupActivate|GroupAdd|GroupClose|GroupDeactivate|Gui|GuiControl|GuiControlGet|Hotkey|ImageSearch|IniDelete|IniRead|IniWrite|Input|InputBox|KeyWait|ListHotkeys|ListLines|ListVars|Loop|Menu|MouseClick|MouseClickDrag|MouseGetPos|MouseMove|MsgBox|OnExit|OutputDebug|Pause|PixelGetColor|PixelSearch|PostMessage|Process|Progress|Random|RegDelete|RegRead|RegWrite|Reload|Repeat|Return|Run|RunAs|RunWait|Send|SendEvent|SendInput|SendMessage|SendMode|SendPlay|SendRaw|SetBatchLines|SetCapslockState|SetControlDelay|SetDefaultMouseSpeed|SetEnv|SetFormat|SetKeyDelay|SetMouseDelay|SetNumlockState|SetScrollLockState|SetStoreCapslockMode|SetTimer|SetTitleMatchMode|SetWinDelay|SetWorkingDir|Shutdown|Sleep|Sort|SoundBeep|SoundGet|SoundGetWaveVolume|SoundPlay|SoundSet|SoundSetWaveVolume|SplashImage|SplashTextOff|SplashTextOn|SplitPath|StatusBarGetText|StatusBarWait|StringCaseSense|StringGetPos|StringLeft|StringLen|StringLower|StringMid|StringReplace|StringRight|StringSplit|StringTrimLeft|StringTrimRight|StringUpper|Suspend|SysGet|Thread|ToolTip|Transform|TrayTip|URLDownloadToFile|WinActivate|WinActivateBottom|WinClose|WinGet|WinGetActiveStats|WinGetActiveTitle|WinGetClass|WinGetPos|WinGetText|WinGetTitle|WinHide|WinKill|WinMaximize|WinMenuSelectItem|WinMinimize|WinMinimizeAll|WinMinimizeAllUndo|WinMove|WinRestore|WinSet|WinSetTitle|WinShow|WinWait|WinWaitActive|WinWaitClose|WinWaitNotActive)\b/i, + 'selector': /\b(?:AutoTrim|BlockInput|Break|Click|ClipWait|Continue|Control|ControlClick|ControlFocus|ControlGet|ControlGetFocus|ControlGetPos|ControlGetText|ControlMove|ControlSend|ControlSendRaw|ControlSetText|CoordMode|Critical|DetectHiddenText|DetectHiddenWindows|Drive|DriveGet|DriveSpaceFree|EnvAdd|EnvDiv|EnvGet|EnvMult|EnvSet|EnvSub|EnvUpdate|Exit|ExitApp|FileAppend|FileCopy|FileCopyDir|FileCreateDir|FileCreateShortcut|FileDelete|FileEncoding|FileGetAttrib|FileGetShortcut|FileGetSize|FileGetTime|FileGetVersion|FileInstall|FileMove|FileMoveDir|FileRead|FileReadLine|FileRecycle|FileRecycleEmpty|FileRemoveDir|FileSelectFile|FileSelectFolder|FileSetAttrib|FileSetTime|FormatTime|GetKeyState|Gosub|Goto|GroupActivate|GroupAdd|GroupClose|GroupDeactivate|Gui|GuiControl|GuiControlGet|Hotkey|ImageSearch|IniDelete|IniRead|IniWrite|Input|InputBox|KeyWait|ListHotkeys|ListLines|ListVars|Loop|Menu|MouseClick|MouseClickDrag|MouseGetPos|MouseMove|MsgBox|OnExit|OutputDebug|Pause|PixelGetColor|PixelSearch|PostMessage|Process|Progress|Random|RegDelete|RegRead|RegWrite|Reload|Repeat|Return|Run|RunAs|RunWait|Send|SendEvent|SendInput|SendMessage|SendMode|SendPlay|SendRaw|SetBatchLines|SetCapslockState|SetControlDelay|SetDefaultMouseSpeed|SetEnv|SetFormat|SetKeyDelay|SetMouseDelay|SetNumlockState|SetRegView|SetScrollLockState|SetStoreCapslockMode|SetTimer|SetTitleMatchMode|SetWinDelay|SetWorkingDir|Shutdown|Sleep|Sort|SoundBeep|SoundGet|SoundGetWaveVolume|SoundPlay|SoundSet|SoundSetWaveVolume|SplashImage|SplashTextOff|SplashTextOn|SplitPath|StatusBarGetText|StatusBarWait|StringCaseSense|StringGetPos|StringLeft|StringLen|StringLower|StringMid|StringReplace|StringRight|StringSplit|StringTrimLeft|StringTrimRight|StringUpper|Suspend|SysGet|Thread|ToolTip|Transform|TrayTip|URLDownloadToFile|WinActivate|WinActivateBottom|WinClose|WinGet|WinGetActiveStats|WinGetActiveTitle|WinGetClass|WinGetPos|WinGetText|WinGetTitle|WinHide|WinKill|WinMaximize|WinMenuSelectItem|WinMinimize|WinMinimizeAll|WinMinimizeAllUndo|WinMove|WinRestore|WinSet|WinSetTitle|WinShow|WinWait|WinWaitActive|WinWaitClose|WinWaitNotActive)\b/i, - 'constant': /\b(?:a_ahkpath|a_ahkversion|a_appdata|a_appdatacommon|a_autotrim|a_batchlines|a_caretx|a_carety|a_computername|a_controldelay|a_cursor|a_dd|a_ddd|a_dddd|a_defaultmousespeed|a_desktop|a_desktopcommon|a_detecthiddentext|a_detecthiddenwindows|a_endchar|a_eventinfo|a_exitreason|a_formatfloat|a_formatinteger|a_gui|a_guievent|a_guicontrol|a_guicontrolevent|a_guiheight|a_guiwidth|a_guix|a_guiy|a_hour|a_iconfile|a_iconhidden|a_iconnumber|a_icontip|a_index|a_ipaddress1|a_ipaddress2|a_ipaddress3|a_ipaddress4|a_isadmin|a_iscompiled|a_iscritical|a_ispaused|a_issuspended|a_isunicode|a_keydelay|a_language|a_lasterror|a_linefile|a_linenumber|a_loopfield|a_loopfileattrib|a_loopfiledir|a_loopfileext|a_loopfilefullpath|a_loopfilelongpath|a_loopfilename|a_loopfileshortname|a_loopfileshortpath|a_loopfilesize|a_loopfilesizekb|a_loopfilesizemb|a_loopfiletimeaccessed|a_loopfiletimecreated|a_loopfiletimemodified|a_loopreadline|a_loopregkey|a_loopregname|a_loopregsubkey|a_loopregtimemodified|a_loopregtype|a_mday|a_min|a_mm|a_mmm|a_mmmm|a_mon|a_mousedelay|a_msec|a_mydocuments|a_now|a_nowutc|a_numbatchlines|a_ostype|a_osversion|a_priorhotkey|programfiles|a_programfiles|a_programs|a_programscommon|a_screenheight|a_screenwidth|a_scriptdir|a_scriptfullpath|a_scriptname|a_sec|a_space|a_startmenu|a_startmenucommon|a_startup|a_startupcommon|a_stringcasesense|a_tab|a_temp|a_thisfunc|a_thishotkey|a_thislabel|a_thismenu|a_thismenuitem|a_thismenuitempos|a_tickcount|a_timeidle|a_timeidlephysical|a_timesincepriorhotkey|a_timesincethishotkey|a_titlematchmode|a_titlematchmodespeed|a_username|a_wday|a_windelay|a_windir|a_workingdir|a_yday|a_year|a_yweek|a_yyyy|clipboard|clipboardall|comspec|errorlevel)\b/i, + 'constant': /\b(?:a_ahkpath|a_ahkversion|a_appdata|a_appdatacommon|a_autotrim|a_batchlines|a_caretx|a_carety|a_computername|a_controldelay|a_cursor|a_dd|a_ddd|a_dddd|a_defaultmousespeed|a_desktop|a_desktopcommon|a_detecthiddentext|a_detecthiddenwindows|a_endchar|a_eventinfo|a_exitreason|a_fileencoding|a_formatfloat|a_formatinteger|a_gui|a_guievent|a_guicontrol|a_guicontrolevent|a_guiheight|a_guiwidth|a_guix|a_guiy|a_hour|a_iconfile|a_iconhidden|a_iconnumber|a_icontip|a_index|a_ipaddress1|a_ipaddress2|a_ipaddress3|a_ipaddress4|a_is64bitos|a_isadmin|a_iscompiled|a_iscritical|a_ispaused|a_issuspended|a_isunicode|a_keydelay|a_language|a_lasterror|a_linefile|a_linenumber|a_loopfield|a_loopfileattrib|a_loopfiledir|a_loopfileext|a_loopfilefullpath|a_loopfilelongpath|a_loopfilename|a_loopfileshortname|a_loopfileshortpath|a_loopfilesize|a_loopfilesizekb|a_loopfilesizemb|a_loopfiletimeaccessed|a_loopfiletimecreated|a_loopfiletimemodified|a_loopreadline|a_loopregkey|a_loopregname|a_loopregsubkey|a_loopregtimemodified|a_loopregtype|a_mday|a_min|a_mm|a_mmm|a_mmmm|a_mon|a_mousedelay|a_msec|a_mydocuments|a_now|a_nowutc|a_numbatchlines|a_ostype|a_osversion|a_priorhotkey|a_priorkey|programfiles|a_programfiles|a_programs|a_programscommon|a_ptrsize|a_regview|a_screendpi|a_screenheight|a_screenwidth|a_scriptdir|a_scriptfullpath|a_scripthwnd|a_scriptname|a_sec|a_space|a_startmenu|a_startmenucommon|a_startup|a_startupcommon|a_stringcasesense|a_tab|a_temp|a_thisfunc|a_thishotkey|a_thislabel|a_thismenu|a_thismenuitem|a_thismenuitempos|a_tickcount|a_timeidle|a_timeidlephysical|a_timesincepriorhotkey|a_timesincethishotkey|a_titlematchmode|a_titlematchmodespeed|a_username|a_wday|a_windelay|a_windir|a_workingdir|a_yday|a_year|a_yweek|a_yyyy|clipboard|clipboardall|comspec|errorlevel)\b/i, - 'builtin': /\b(?:abs|acos|asc|asin|atan|ceil|chr|class|cos|dllcall|exp|fileexist|Fileopen|floor|il_add|il_create|il_destroy|instr|substr|isfunc|islabel|IsObject|ln|log|lv_add|lv_delete|lv_deletecol|lv_getcount|lv_getnext|lv_gettext|lv_insert|lv_insertcol|lv_modify|lv_modifycol|lv_setimagelist|mod|onmessage|numget|numput|registercallback|regexmatch|regexreplace|round|sin|tan|sqrt|strlen|sb_seticon|sb_setparts|sb_settext|strsplit|tv_add|tv_delete|tv_getchild|tv_getcount|tv_getnext|tv_get|tv_getparent|tv_getprev|tv_getselection|tv_gettext|tv_modify|varsetcapacity|winactive|winexist|__New|__Call|__Get|__Set)\b/i, + 'builtin': /\b(?:abs|acos|asc|asin|atan|ceil|chr|class|comobjactive|comobjarray|comobjconnect|comobjcreate|comobjerror|comobjflags|comobjget|comobjquery|comobjtype|comobjvalue|cos|dllcall|exp|fileexist|Fileopen|floor|il_add|il_create|il_destroy|instr|substr|isfunc|islabel|IsObject|ln|log|lv_add|lv_delete|lv_deletecol|lv_getcount|lv_getnext|lv_gettext|lv_insert|lv_insertcol|lv_modify|lv_modifycol|lv_setimagelist|ltrim|rtrim|mod|onmessage|numget|numput|registercallback|regexmatch|regexreplace|round|sin|tan|sqrt|strlen|strreplace|sb_seticon|sb_setparts|sb_settext|strsplit|tv_add|tv_delete|tv_getchild|tv_getcount|tv_getnext|tv_get|tv_getparent|tv_getprev|tv_getselection|tv_gettext|tv_modify|varsetcapacity|winactive|winexist|__New|__Call|__Get|__Set)\b/i, 'symbol': /\b(?:alt|altdown|altup|appskey|backspace|browser_back|browser_favorites|browser_forward|browser_home|browser_refresh|browser_search|browser_stop|bs|capslock|ctrl|ctrlbreak|ctrldown|ctrlup|del|delete|down|end|enter|esc|escape|f1|f10|f11|f12|f13|f14|f15|f16|f17|f18|f19|f2|f20|f21|f22|f23|f24|f3|f4|f5|f6|f7|f8|f9|home|ins|insert|joy1|joy10|joy11|joy12|joy13|joy14|joy15|joy16|joy17|joy18|joy19|joy2|joy20|joy21|joy22|joy23|joy24|joy25|joy26|joy27|joy28|joy29|joy3|joy30|joy31|joy32|joy4|joy5|joy6|joy7|joy8|joy9|joyaxes|joybuttons|joyinfo|joyname|joypov|joyr|joyu|joyv|joyx|joyy|joyz|lalt|launch_app1|launch_app2|launch_mail|launch_media|lbutton|lcontrol|lctrl|left|lshift|lwin|lwindown|lwinup|mbutton|media_next|media_play_pause|media_prev|media_stop|numlock|numpad0|numpad1|numpad2|numpad3|numpad4|numpad5|numpad6|numpad7|numpad8|numpad9|numpadadd|numpadclear|numpaddel|numpaddiv|numpaddot|numpaddown|numpadend|numpadenter|numpadhome|numpadins|numpadleft|numpadmult|numpadpgdn|numpadpgup|numpadright|numpadsub|numpadup|pgdn|pgup|printscreen|ralt|rbutton|rcontrol|rctrl|right|rshift|rwin|rwindown|rwinup|scrolllock|shift|shiftdown|shiftup|space|tab|up|volume_down|volume_mute|volume_up|wheeldown|wheelleft|wheelright|wheelup|xbutton1|xbutton2)\b/i, - 'important': /#\b(?:AllowSameLineComments|ClipboardTimeout|CommentFlag|ErrorStdOut|EscapeChar|HotkeyInterval|HotkeyModifierTimeout|Hotstring|IfWinActive|IfWinExist|IfWinNotActive|IfWinNotExist|Include|IncludeAgain|InstallKeybdHook|InstallMouseHook|KeyHistory|LTrim|MaxHotkeysPerInterval|MaxMem|MaxThreads|MaxThreadsBuffer|MaxThreadsPerHotkey|NoEnv|NoTrayIcon|Persistent|SingleInstance|UseHook|WinActivateForce)\b/i, + 'important': /#\b(?:AllowSameLineComments|ClipboardTimeout|CommentFlag|DerefChar|ErrorStdOut|EscapeChar|HotkeyInterval|HotkeyModifierTimeout|Hotstring|If|IfTimeout|IfWinActive|IfWinExist|IfWinNotActive|IfWinNotExist|Include|IncludeAgain|InputLevel|InstallKeybdHook|InstallMouseHook|KeyHistory|MaxHotkeysPerInterval|MaxMem|MaxThreads|MaxThreadsBuffer|MaxThreadsPerHotkey|MenuMaskKey|NoEnv|NoTrayIcon|Persistent|SingleInstance|UseHook|Warn|WinActivateForce)\b/i, - 'keyword': /\b(?:Abort|AboveNormal|Add|ahk_class|ahk_group|ahk_id|ahk_pid|All|Alnum|Alpha|AltSubmit|AltTab|AltTabAndMenu|AltTabMenu|AltTabMenuDismiss|AlwaysOnTop|AutoSize|Background|BackgroundTrans|BelowNormal|between|BitAnd|BitNot|BitOr|BitShiftLeft|BitShiftRight|BitXOr|Bold|Border|Button|ByRef|Checkbox|Checked|CheckedGray|Choose|ChooseString|Close|Color|ComboBox|Contains|ControlList|Count|Date|DateTime|Days|DDL|Default|DeleteAll|Delimiter|Deref|Destroy|Digit|Disable|Disabled|DropDownList|Edit|Eject|Else|Enable|Enabled|Error|Exist|Expand|ExStyle|FileSystem|First|Flash|Float|FloatFast|Focus|Font|for|global|Grid|Group|GroupBox|GuiClose|GuiContextMenu|GuiDropFiles|GuiEscape|GuiSize|Hdr|Hidden|Hide|High|HKCC|HKCR|HKCU|HKEY_CLASSES_ROOT|HKEY_CURRENT_CONFIG|HKEY_CURRENT_USER|HKEY_LOCAL_MACHINE|HKEY_USERS|HKLM|HKU|Hours|HScroll|Icon|IconSmall|ID|IDLast|If|IfEqual|IfExist|IfGreater|IfGreaterOrEqual|IfInString|IfLess|IfLessOrEqual|IfMsgBox|IfNotEqual|IfNotExist|IfNotInString|IfWinActive|IfWinExist|IfWinNotActive|IfWinNotExist|Ignore|ImageList|in|Integer|IntegerFast|Interrupt|is|italic|Join|Label|LastFound|LastFoundExist|Limit|Lines|List|ListBox|ListView|local|Lock|Logoff|Low|Lower|Lowercase|MainWindow|Margin|Maximize|MaximizeBox|MaxSize|Minimize|MinimizeBox|MinMax|MinSize|Minutes|MonthCal|Mouse|Move|Multi|NA|No|NoActivate|NoDefault|NoHide|NoIcon|NoMainWindow|norm|Normal|NoSort|NoSortHdr|NoStandard|Not|NoTab|NoTimers|Number|Off|Ok|On|OwnDialogs|Owner|Parse|Password|Picture|Pixel|Pos|Pow|Priority|ProcessName|Radio|Range|Read|ReadOnly|Realtime|Redraw|REG_BINARY|REG_DWORD|REG_EXPAND_SZ|REG_MULTI_SZ|REG_SZ|Region|Relative|Rename|Report|Resize|Restore|Retry|RGB|Screen|Seconds|Section|Serial|SetLabel|ShiftAltTab|Show|Single|Slider|SortDesc|Standard|static|Status|StatusBar|StatusCD|strike|Style|Submit|SysMenu|Tab2|TabStop|Text|Theme|Tile|ToggleCheck|ToggleEnable|ToolWindow|Top|Topmost|TransColor|Transparent|Tray|TreeView|TryAgain|Type|UnCheck|underline|Unicode|Unlock|UpDown|Upper|Uppercase|UseErrorLevel|Vis|VisFirst|Visible|VScroll|Wait|WaitClose|WantCtrlA|WantF2|WantReturn|While|Wrap|Xdigit|xm|xp|xs|Yes|ym|yp|ys)\b/i + 'keyword': /\b(?:Abort|AboveNormal|Add|ahk_class|ahk_exe|ahk_group|ahk_id|ahk_pid|All|Alnum|Alpha|AltSubmit|AltTab|AltTabAndMenu|AltTabMenu|AltTabMenuDismiss|AlwaysOnTop|AutoSize|Background|BackgroundTrans|BelowNormal|between|BitAnd|BitNot|BitOr|BitShiftLeft|BitShiftRight|BitXOr|Bold|Border|Button|ByRef|Checkbox|Checked|CheckedGray|Choose|ChooseString|Close|Color|ComboBox|Contains|ControlList|Count|Date|DateTime|Days|DDL|Default|DeleteAll|Delimiter|Deref|Destroy|Digit|Disable|Disabled|DropDownList|Edit|Eject|Else|Enable|Enabled|Error|Exist|Expand|ExStyle|FileSystem|First|Flash|Float|FloatFast|Focus|Font|for|global|Grid|Group|GroupBox|GuiClose|GuiContextMenu|GuiDropFiles|GuiEscape|GuiSize|Hdr|Hidden|Hide|High|HKCC|HKCR|HKCU|HKEY_CLASSES_ROOT|HKEY_CURRENT_CONFIG|HKEY_CURRENT_USER|HKEY_LOCAL_MACHINE|HKEY_USERS|HKLM|HKU|Hours|HScroll|Icon|IconSmall|ID|IDLast|If|IfEqual|IfExist|IfGreater|IfGreaterOrEqual|IfInString|IfLess|IfLessOrEqual|IfMsgBox|IfNotEqual|IfNotExist|IfNotInString|IfWinActive|IfWinExist|IfWinNotActive|IfWinNotExist|Ignore|ImageList|in|Integer|IntegerFast|Interrupt|is|italic|Join|Label|LastFound|LastFoundExist|Limit|Lines|List|ListBox|ListView|local|Lock|Logoff|Low|Lower|Lowercase|MainWindow|Margin|Maximize|MaximizeBox|MaxSize|Minimize|MinimizeBox|MinMax|MinSize|Minutes|MonthCal|Mouse|Move|Multi|NA|No|NoActivate|NoDefault|NoHide|NoIcon|NoMainWindow|norm|Normal|NoSort|NoSortHdr|NoStandard|Not|NoTab|NoTimers|Number|Off|Ok|On|OwnDialogs|Owner|Parse|Password|Picture|Pixel|Pos|Pow|Priority|ProcessName|Radio|Range|Read|ReadOnly|Realtime|Redraw|REG_BINARY|REG_DWORD|REG_EXPAND_SZ|REG_MULTI_SZ|REG_SZ|Region|Relative|Rename|Report|Resize|Restore|Retry|RGB|Screen|Seconds|Section|Serial|SetLabel|ShiftAltTab|Show|Single|Slider|SortDesc|Standard|static|Status|StatusBar|StatusCD|strike|Style|Submit|SysMenu|Tab2|TabStop|Text|Theme|Tile|ToggleCheck|ToggleEnable|ToolWindow|Top|Topmost|TransColor|Transparent|Tray|TreeView|TryAgain|Throw|Try|Catch|Finally|Type|UnCheck|underline|Unicode|Unlock|Until|UpDown|Upper|Uppercase|UseErrorLevel|Vis|VisFirst|Visible|VScroll|Wait|WaitClose|WantCtrlA|WantF2|WantReturn|While|Wrap|Xdigit|xm|xp|xs|Yes|ym|yp|ys)\b/i }; diff --git a/components/prism-autohotkey.min.js b/components/prism-autohotkey.min.js index bd6fdb24f6..de5dfc12e3 100644 --- a/components/prism-autohotkey.min.js +++ b/components/prism-autohotkey.min.js @@ -1 +1 @@ -Prism.languages.autohotkey={comment:{pattern:/(^[^";\n]*(?:"[^"\n]*?"[^"\n]*?)*)(?:;.*$|^\s*\/\*[\s\S]*\n\*\/)/m,lookbehind:!0},string:/"(?:[^"\n\r]|"")*"/m,function:/[^(); \t,\n+*\-=?>:\\\/<&%\[\]]+?(?=\()/m,tag:/^[ \t]*[^\s:]+?(?=:(?:[^:]|$))/m,variable:/%\w+%/,number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/\?|\/\/?=?|:=|\|[=|]?|&[=&]?|\+[=+]?|-[=-]?|\*[=*]?|<(?:<=?|>|=)?|>>?=?|[.^!=~]=?|\b(?:AND|NOT|OR)\b/,punctuation:/[{}[\]():,]/,boolean:/\b(?:true|false)\b/,selector:/\b(?:AutoTrim|BlockInput|Break|Click|ClipWait|Continue|Control|ControlClick|ControlFocus|ControlGet|ControlGetFocus|ControlGetPos|ControlGetText|ControlMove|ControlSend|ControlSendRaw|ControlSetText|CoordMode|Critical|DetectHiddenText|DetectHiddenWindows|Drive|DriveGet|DriveSpaceFree|EnvAdd|EnvDiv|EnvGet|EnvMult|EnvSet|EnvSub|EnvUpdate|Exit|ExitApp|FileAppend|FileCopy|FileCopyDir|FileCreateDir|FileCreateShortcut|FileDelete|FileEncoding|FileGetAttrib|FileGetShortcut|FileGetSize|FileGetTime|FileGetVersion|FileInstall|FileMove|FileMoveDir|FileRead|FileReadLine|FileRecycle|FileRecycleEmpty|FileRemoveDir|FileSelectFile|FileSelectFolder|FileSetAttrib|FileSetTime|FormatTime|GetKeyState|Gosub|Goto|GroupActivate|GroupAdd|GroupClose|GroupDeactivate|Gui|GuiControl|GuiControlGet|Hotkey|ImageSearch|IniDelete|IniRead|IniWrite|Input|InputBox|KeyWait|ListHotkeys|ListLines|ListVars|Loop|Menu|MouseClick|MouseClickDrag|MouseGetPos|MouseMove|MsgBox|OnExit|OutputDebug|Pause|PixelGetColor|PixelSearch|PostMessage|Process|Progress|Random|RegDelete|RegRead|RegWrite|Reload|Repeat|Return|Run|RunAs|RunWait|Send|SendEvent|SendInput|SendMessage|SendMode|SendPlay|SendRaw|SetBatchLines|SetCapslockState|SetControlDelay|SetDefaultMouseSpeed|SetEnv|SetFormat|SetKeyDelay|SetMouseDelay|SetNumlockState|SetScrollLockState|SetStoreCapslockMode|SetTimer|SetTitleMatchMode|SetWinDelay|SetWorkingDir|Shutdown|Sleep|Sort|SoundBeep|SoundGet|SoundGetWaveVolume|SoundPlay|SoundSet|SoundSetWaveVolume|SplashImage|SplashTextOff|SplashTextOn|SplitPath|StatusBarGetText|StatusBarWait|StringCaseSense|StringGetPos|StringLeft|StringLen|StringLower|StringMid|StringReplace|StringRight|StringSplit|StringTrimLeft|StringTrimRight|StringUpper|Suspend|SysGet|Thread|ToolTip|Transform|TrayTip|URLDownloadToFile|WinActivate|WinActivateBottom|WinClose|WinGet|WinGetActiveStats|WinGetActiveTitle|WinGetClass|WinGetPos|WinGetText|WinGetTitle|WinHide|WinKill|WinMaximize|WinMenuSelectItem|WinMinimize|WinMinimizeAll|WinMinimizeAllUndo|WinMove|WinRestore|WinSet|WinSetTitle|WinShow|WinWait|WinWaitActive|WinWaitClose|WinWaitNotActive)\b/i,constant:/\b(?:a_ahkpath|a_ahkversion|a_appdata|a_appdatacommon|a_autotrim|a_batchlines|a_caretx|a_carety|a_computername|a_controldelay|a_cursor|a_dd|a_ddd|a_dddd|a_defaultmousespeed|a_desktop|a_desktopcommon|a_detecthiddentext|a_detecthiddenwindows|a_endchar|a_eventinfo|a_exitreason|a_formatfloat|a_formatinteger|a_gui|a_guievent|a_guicontrol|a_guicontrolevent|a_guiheight|a_guiwidth|a_guix|a_guiy|a_hour|a_iconfile|a_iconhidden|a_iconnumber|a_icontip|a_index|a_ipaddress1|a_ipaddress2|a_ipaddress3|a_ipaddress4|a_isadmin|a_iscompiled|a_iscritical|a_ispaused|a_issuspended|a_isunicode|a_keydelay|a_language|a_lasterror|a_linefile|a_linenumber|a_loopfield|a_loopfileattrib|a_loopfiledir|a_loopfileext|a_loopfilefullpath|a_loopfilelongpath|a_loopfilename|a_loopfileshortname|a_loopfileshortpath|a_loopfilesize|a_loopfilesizekb|a_loopfilesizemb|a_loopfiletimeaccessed|a_loopfiletimecreated|a_loopfiletimemodified|a_loopreadline|a_loopregkey|a_loopregname|a_loopregsubkey|a_loopregtimemodified|a_loopregtype|a_mday|a_min|a_mm|a_mmm|a_mmmm|a_mon|a_mousedelay|a_msec|a_mydocuments|a_now|a_nowutc|a_numbatchlines|a_ostype|a_osversion|a_priorhotkey|programfiles|a_programfiles|a_programs|a_programscommon|a_screenheight|a_screenwidth|a_scriptdir|a_scriptfullpath|a_scriptname|a_sec|a_space|a_startmenu|a_startmenucommon|a_startup|a_startupcommon|a_stringcasesense|a_tab|a_temp|a_thisfunc|a_thishotkey|a_thislabel|a_thismenu|a_thismenuitem|a_thismenuitempos|a_tickcount|a_timeidle|a_timeidlephysical|a_timesincepriorhotkey|a_timesincethishotkey|a_titlematchmode|a_titlematchmodespeed|a_username|a_wday|a_windelay|a_windir|a_workingdir|a_yday|a_year|a_yweek|a_yyyy|clipboard|clipboardall|comspec|errorlevel)\b/i,builtin:/\b(?:abs|acos|asc|asin|atan|ceil|chr|class|cos|dllcall|exp|fileexist|Fileopen|floor|il_add|il_create|il_destroy|instr|substr|isfunc|islabel|IsObject|ln|log|lv_add|lv_delete|lv_deletecol|lv_getcount|lv_getnext|lv_gettext|lv_insert|lv_insertcol|lv_modify|lv_modifycol|lv_setimagelist|mod|onmessage|numget|numput|registercallback|regexmatch|regexreplace|round|sin|tan|sqrt|strlen|sb_seticon|sb_setparts|sb_settext|strsplit|tv_add|tv_delete|tv_getchild|tv_getcount|tv_getnext|tv_get|tv_getparent|tv_getprev|tv_getselection|tv_gettext|tv_modify|varsetcapacity|winactive|winexist|__New|__Call|__Get|__Set)\b/i,symbol:/\b(?:alt|altdown|altup|appskey|backspace|browser_back|browser_favorites|browser_forward|browser_home|browser_refresh|browser_search|browser_stop|bs|capslock|ctrl|ctrlbreak|ctrldown|ctrlup|del|delete|down|end|enter|esc|escape|f1|f10|f11|f12|f13|f14|f15|f16|f17|f18|f19|f2|f20|f21|f22|f23|f24|f3|f4|f5|f6|f7|f8|f9|home|ins|insert|joy1|joy10|joy11|joy12|joy13|joy14|joy15|joy16|joy17|joy18|joy19|joy2|joy20|joy21|joy22|joy23|joy24|joy25|joy26|joy27|joy28|joy29|joy3|joy30|joy31|joy32|joy4|joy5|joy6|joy7|joy8|joy9|joyaxes|joybuttons|joyinfo|joyname|joypov|joyr|joyu|joyv|joyx|joyy|joyz|lalt|launch_app1|launch_app2|launch_mail|launch_media|lbutton|lcontrol|lctrl|left|lshift|lwin|lwindown|lwinup|mbutton|media_next|media_play_pause|media_prev|media_stop|numlock|numpad0|numpad1|numpad2|numpad3|numpad4|numpad5|numpad6|numpad7|numpad8|numpad9|numpadadd|numpadclear|numpaddel|numpaddiv|numpaddot|numpaddown|numpadend|numpadenter|numpadhome|numpadins|numpadleft|numpadmult|numpadpgdn|numpadpgup|numpadright|numpadsub|numpadup|pgdn|pgup|printscreen|ralt|rbutton|rcontrol|rctrl|right|rshift|rwin|rwindown|rwinup|scrolllock|shift|shiftdown|shiftup|space|tab|up|volume_down|volume_mute|volume_up|wheeldown|wheelleft|wheelright|wheelup|xbutton1|xbutton2)\b/i,important:/#\b(?:AllowSameLineComments|ClipboardTimeout|CommentFlag|ErrorStdOut|EscapeChar|HotkeyInterval|HotkeyModifierTimeout|Hotstring|IfWinActive|IfWinExist|IfWinNotActive|IfWinNotExist|Include|IncludeAgain|InstallKeybdHook|InstallMouseHook|KeyHistory|LTrim|MaxHotkeysPerInterval|MaxMem|MaxThreads|MaxThreadsBuffer|MaxThreadsPerHotkey|NoEnv|NoTrayIcon|Persistent|SingleInstance|UseHook|WinActivateForce)\b/i,keyword:/\b(?:Abort|AboveNormal|Add|ahk_class|ahk_group|ahk_id|ahk_pid|All|Alnum|Alpha|AltSubmit|AltTab|AltTabAndMenu|AltTabMenu|AltTabMenuDismiss|AlwaysOnTop|AutoSize|Background|BackgroundTrans|BelowNormal|between|BitAnd|BitNot|BitOr|BitShiftLeft|BitShiftRight|BitXOr|Bold|Border|Button|ByRef|Checkbox|Checked|CheckedGray|Choose|ChooseString|Close|Color|ComboBox|Contains|ControlList|Count|Date|DateTime|Days|DDL|Default|DeleteAll|Delimiter|Deref|Destroy|Digit|Disable|Disabled|DropDownList|Edit|Eject|Else|Enable|Enabled|Error|Exist|Expand|ExStyle|FileSystem|First|Flash|Float|FloatFast|Focus|Font|for|global|Grid|Group|GroupBox|GuiClose|GuiContextMenu|GuiDropFiles|GuiEscape|GuiSize|Hdr|Hidden|Hide|High|HKCC|HKCR|HKCU|HKEY_CLASSES_ROOT|HKEY_CURRENT_CONFIG|HKEY_CURRENT_USER|HKEY_LOCAL_MACHINE|HKEY_USERS|HKLM|HKU|Hours|HScroll|Icon|IconSmall|ID|IDLast|If|IfEqual|IfExist|IfGreater|IfGreaterOrEqual|IfInString|IfLess|IfLessOrEqual|IfMsgBox|IfNotEqual|IfNotExist|IfNotInString|IfWinActive|IfWinExist|IfWinNotActive|IfWinNotExist|Ignore|ImageList|in|Integer|IntegerFast|Interrupt|is|italic|Join|Label|LastFound|LastFoundExist|Limit|Lines|List|ListBox|ListView|local|Lock|Logoff|Low|Lower|Lowercase|MainWindow|Margin|Maximize|MaximizeBox|MaxSize|Minimize|MinimizeBox|MinMax|MinSize|Minutes|MonthCal|Mouse|Move|Multi|NA|No|NoActivate|NoDefault|NoHide|NoIcon|NoMainWindow|norm|Normal|NoSort|NoSortHdr|NoStandard|Not|NoTab|NoTimers|Number|Off|Ok|On|OwnDialogs|Owner|Parse|Password|Picture|Pixel|Pos|Pow|Priority|ProcessName|Radio|Range|Read|ReadOnly|Realtime|Redraw|REG_BINARY|REG_DWORD|REG_EXPAND_SZ|REG_MULTI_SZ|REG_SZ|Region|Relative|Rename|Report|Resize|Restore|Retry|RGB|Screen|Seconds|Section|Serial|SetLabel|ShiftAltTab|Show|Single|Slider|SortDesc|Standard|static|Status|StatusBar|StatusCD|strike|Style|Submit|SysMenu|Tab2|TabStop|Text|Theme|Tile|ToggleCheck|ToggleEnable|ToolWindow|Top|Topmost|TransColor|Transparent|Tray|TreeView|TryAgain|Type|UnCheck|underline|Unicode|Unlock|UpDown|Upper|Uppercase|UseErrorLevel|Vis|VisFirst|Visible|VScroll|Wait|WaitClose|WantCtrlA|WantF2|WantReturn|While|Wrap|Xdigit|xm|xp|xs|Yes|ym|yp|ys)\b/i}; \ No newline at end of file +Prism.languages.autohotkey={comment:{pattern:/(^[^";\n]*(?:"[^"\n]*?"[^"\n]*?)*)(?:;.*$|^\s*\/\*[\s\S]*\n\*\/)/m,lookbehind:!0},string:/"(?:[^"\n\r]|"")*"/m,function:/[^(); \t,\n+*\-=?>:\\\/<&%\[\]]+?(?=\()/m,tag:/^[ \t]*[^\s:]+?(?=:(?:[^:]|$))/m,variable:/%\w+%/,number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/\?|\/\/?=?|:=|\|[=|]?|&[=&]?|\+[=+]?|-[=-]?|\*[=*]?|<(?:<=?|>|=)?|>>?=?|[.^!=~]=?|\b(?:AND|NOT|OR)\b/,punctuation:/[{}[\]():,]/,boolean:/\b(?:true|false)\b/,selector:/\b(?:AutoTrim|BlockInput|Break|Click|ClipWait|Continue|Control|ControlClick|ControlFocus|ControlGet|ControlGetFocus|ControlGetPos|ControlGetText|ControlMove|ControlSend|ControlSendRaw|ControlSetText|CoordMode|Critical|DetectHiddenText|DetectHiddenWindows|Drive|DriveGet|DriveSpaceFree|EnvAdd|EnvDiv|EnvGet|EnvMult|EnvSet|EnvSub|EnvUpdate|Exit|ExitApp|FileAppend|FileCopy|FileCopyDir|FileCreateDir|FileCreateShortcut|FileDelete|FileEncoding|FileGetAttrib|FileGetShortcut|FileGetSize|FileGetTime|FileGetVersion|FileInstall|FileMove|FileMoveDir|FileRead|FileReadLine|FileRecycle|FileRecycleEmpty|FileRemoveDir|FileSelectFile|FileSelectFolder|FileSetAttrib|FileSetTime|FormatTime|GetKeyState|Gosub|Goto|GroupActivate|GroupAdd|GroupClose|GroupDeactivate|Gui|GuiControl|GuiControlGet|Hotkey|ImageSearch|IniDelete|IniRead|IniWrite|Input|InputBox|KeyWait|ListHotkeys|ListLines|ListVars|Loop|Menu|MouseClick|MouseClickDrag|MouseGetPos|MouseMove|MsgBox|OnExit|OutputDebug|Pause|PixelGetColor|PixelSearch|PostMessage|Process|Progress|Random|RegDelete|RegRead|RegWrite|Reload|Repeat|Return|Run|RunAs|RunWait|Send|SendEvent|SendInput|SendMessage|SendMode|SendPlay|SendRaw|SetBatchLines|SetCapslockState|SetControlDelay|SetDefaultMouseSpeed|SetEnv|SetFormat|SetKeyDelay|SetMouseDelay|SetNumlockState|SetRegView|SetScrollLockState|SetStoreCapslockMode|SetTimer|SetTitleMatchMode|SetWinDelay|SetWorkingDir|Shutdown|Sleep|Sort|SoundBeep|SoundGet|SoundGetWaveVolume|SoundPlay|SoundSet|SoundSetWaveVolume|SplashImage|SplashTextOff|SplashTextOn|SplitPath|StatusBarGetText|StatusBarWait|StringCaseSense|StringGetPos|StringLeft|StringLen|StringLower|StringMid|StringReplace|StringRight|StringSplit|StringTrimLeft|StringTrimRight|StringUpper|Suspend|SysGet|Thread|ToolTip|Transform|TrayTip|URLDownloadToFile|WinActivate|WinActivateBottom|WinClose|WinGet|WinGetActiveStats|WinGetActiveTitle|WinGetClass|WinGetPos|WinGetText|WinGetTitle|WinHide|WinKill|WinMaximize|WinMenuSelectItem|WinMinimize|WinMinimizeAll|WinMinimizeAllUndo|WinMove|WinRestore|WinSet|WinSetTitle|WinShow|WinWait|WinWaitActive|WinWaitClose|WinWaitNotActive)\b/i,constant:/\b(?:a_ahkpath|a_ahkversion|a_appdata|a_appdatacommon|a_autotrim|a_batchlines|a_caretx|a_carety|a_computername|a_controldelay|a_cursor|a_dd|a_ddd|a_dddd|a_defaultmousespeed|a_desktop|a_desktopcommon|a_detecthiddentext|a_detecthiddenwindows|a_endchar|a_eventinfo|a_exitreason|a_fileencoding|a_formatfloat|a_formatinteger|a_gui|a_guievent|a_guicontrol|a_guicontrolevent|a_guiheight|a_guiwidth|a_guix|a_guiy|a_hour|a_iconfile|a_iconhidden|a_iconnumber|a_icontip|a_index|a_ipaddress1|a_ipaddress2|a_ipaddress3|a_ipaddress4|a_is64bitos|a_isadmin|a_iscompiled|a_iscritical|a_ispaused|a_issuspended|a_isunicode|a_keydelay|a_language|a_lasterror|a_linefile|a_linenumber|a_loopfield|a_loopfileattrib|a_loopfiledir|a_loopfileext|a_loopfilefullpath|a_loopfilelongpath|a_loopfilename|a_loopfileshortname|a_loopfileshortpath|a_loopfilesize|a_loopfilesizekb|a_loopfilesizemb|a_loopfiletimeaccessed|a_loopfiletimecreated|a_loopfiletimemodified|a_loopreadline|a_loopregkey|a_loopregname|a_loopregsubkey|a_loopregtimemodified|a_loopregtype|a_mday|a_min|a_mm|a_mmm|a_mmmm|a_mon|a_mousedelay|a_msec|a_mydocuments|a_now|a_nowutc|a_numbatchlines|a_ostype|a_osversion|a_priorhotkey|a_priorkey|programfiles|a_programfiles|a_programs|a_programscommon|a_ptrsize|a_regview|a_screendpi|a_screenheight|a_screenwidth|a_scriptdir|a_scriptfullpath|a_scripthwnd|a_scriptname|a_sec|a_space|a_startmenu|a_startmenucommon|a_startup|a_startupcommon|a_stringcasesense|a_tab|a_temp|a_thisfunc|a_thishotkey|a_thislabel|a_thismenu|a_thismenuitem|a_thismenuitempos|a_tickcount|a_timeidle|a_timeidlephysical|a_timesincepriorhotkey|a_timesincethishotkey|a_titlematchmode|a_titlematchmodespeed|a_username|a_wday|a_windelay|a_windir|a_workingdir|a_yday|a_year|a_yweek|a_yyyy|clipboard|clipboardall|comspec|errorlevel)\b/i,builtin:/\b(?:abs|acos|asc|asin|atan|ceil|chr|class|comobjactive|comobjarray|comobjconnect|comobjcreate|comobjerror|comobjflags|comobjget|comobjquery|comobjtype|comobjvalue|cos|dllcall|exp|fileexist|Fileopen|floor|il_add|il_create|il_destroy|instr|substr|isfunc|islabel|IsObject|ln|log|lv_add|lv_delete|lv_deletecol|lv_getcount|lv_getnext|lv_gettext|lv_insert|lv_insertcol|lv_modify|lv_modifycol|lv_setimagelist|ltrim|rtrim|mod|onmessage|numget|numput|registercallback|regexmatch|regexreplace|round|sin|tan|sqrt|strlen|strreplace|sb_seticon|sb_setparts|sb_settext|strsplit|tv_add|tv_delete|tv_getchild|tv_getcount|tv_getnext|tv_get|tv_getparent|tv_getprev|tv_getselection|tv_gettext|tv_modify|varsetcapacity|winactive|winexist|__New|__Call|__Get|__Set)\b/i,symbol:/\b(?:alt|altdown|altup|appskey|backspace|browser_back|browser_favorites|browser_forward|browser_home|browser_refresh|browser_search|browser_stop|bs|capslock|ctrl|ctrlbreak|ctrldown|ctrlup|del|delete|down|end|enter|esc|escape|f1|f10|f11|f12|f13|f14|f15|f16|f17|f18|f19|f2|f20|f21|f22|f23|f24|f3|f4|f5|f6|f7|f8|f9|home|ins|insert|joy1|joy10|joy11|joy12|joy13|joy14|joy15|joy16|joy17|joy18|joy19|joy2|joy20|joy21|joy22|joy23|joy24|joy25|joy26|joy27|joy28|joy29|joy3|joy30|joy31|joy32|joy4|joy5|joy6|joy7|joy8|joy9|joyaxes|joybuttons|joyinfo|joyname|joypov|joyr|joyu|joyv|joyx|joyy|joyz|lalt|launch_app1|launch_app2|launch_mail|launch_media|lbutton|lcontrol|lctrl|left|lshift|lwin|lwindown|lwinup|mbutton|media_next|media_play_pause|media_prev|media_stop|numlock|numpad0|numpad1|numpad2|numpad3|numpad4|numpad5|numpad6|numpad7|numpad8|numpad9|numpadadd|numpadclear|numpaddel|numpaddiv|numpaddot|numpaddown|numpadend|numpadenter|numpadhome|numpadins|numpadleft|numpadmult|numpadpgdn|numpadpgup|numpadright|numpadsub|numpadup|pgdn|pgup|printscreen|ralt|rbutton|rcontrol|rctrl|right|rshift|rwin|rwindown|rwinup|scrolllock|shift|shiftdown|shiftup|space|tab|up|volume_down|volume_mute|volume_up|wheeldown|wheelleft|wheelright|wheelup|xbutton1|xbutton2)\b/i,important:/#\b(?:AllowSameLineComments|ClipboardTimeout|CommentFlag|DerefChar|ErrorStdOut|EscapeChar|HotkeyInterval|HotkeyModifierTimeout|Hotstring|If|IfTimeout|IfWinActive|IfWinExist|IfWinNotActive|IfWinNotExist|Include|IncludeAgain|InputLevel|InstallKeybdHook|InstallMouseHook|KeyHistory|MaxHotkeysPerInterval|MaxMem|MaxThreads|MaxThreadsBuffer|MaxThreadsPerHotkey|MenuMaskKey|NoEnv|NoTrayIcon|Persistent|SingleInstance|UseHook|Warn|WinActivateForce)\b/i,keyword:/\b(?:Abort|AboveNormal|Add|ahk_class|ahk_exe|ahk_group|ahk_id|ahk_pid|All|Alnum|Alpha|AltSubmit|AltTab|AltTabAndMenu|AltTabMenu|AltTabMenuDismiss|AlwaysOnTop|AutoSize|Background|BackgroundTrans|BelowNormal|between|BitAnd|BitNot|BitOr|BitShiftLeft|BitShiftRight|BitXOr|Bold|Border|Button|ByRef|Checkbox|Checked|CheckedGray|Choose|ChooseString|Close|Color|ComboBox|Contains|ControlList|Count|Date|DateTime|Days|DDL|Default|DeleteAll|Delimiter|Deref|Destroy|Digit|Disable|Disabled|DropDownList|Edit|Eject|Else|Enable|Enabled|Error|Exist|Expand|ExStyle|FileSystem|First|Flash|Float|FloatFast|Focus|Font|for|global|Grid|Group|GroupBox|GuiClose|GuiContextMenu|GuiDropFiles|GuiEscape|GuiSize|Hdr|Hidden|Hide|High|HKCC|HKCR|HKCU|HKEY_CLASSES_ROOT|HKEY_CURRENT_CONFIG|HKEY_CURRENT_USER|HKEY_LOCAL_MACHINE|HKEY_USERS|HKLM|HKU|Hours|HScroll|Icon|IconSmall|ID|IDLast|If|IfEqual|IfExist|IfGreater|IfGreaterOrEqual|IfInString|IfLess|IfLessOrEqual|IfMsgBox|IfNotEqual|IfNotExist|IfNotInString|IfWinActive|IfWinExist|IfWinNotActive|IfWinNotExist|Ignore|ImageList|in|Integer|IntegerFast|Interrupt|is|italic|Join|Label|LastFound|LastFoundExist|Limit|Lines|List|ListBox|ListView|local|Lock|Logoff|Low|Lower|Lowercase|MainWindow|Margin|Maximize|MaximizeBox|MaxSize|Minimize|MinimizeBox|MinMax|MinSize|Minutes|MonthCal|Mouse|Move|Multi|NA|No|NoActivate|NoDefault|NoHide|NoIcon|NoMainWindow|norm|Normal|NoSort|NoSortHdr|NoStandard|Not|NoTab|NoTimers|Number|Off|Ok|On|OwnDialogs|Owner|Parse|Password|Picture|Pixel|Pos|Pow|Priority|ProcessName|Radio|Range|Read|ReadOnly|Realtime|Redraw|REG_BINARY|REG_DWORD|REG_EXPAND_SZ|REG_MULTI_SZ|REG_SZ|Region|Relative|Rename|Report|Resize|Restore|Retry|RGB|Screen|Seconds|Section|Serial|SetLabel|ShiftAltTab|Show|Single|Slider|SortDesc|Standard|static|Status|StatusBar|StatusCD|strike|Style|Submit|SysMenu|Tab2|TabStop|Text|Theme|Tile|ToggleCheck|ToggleEnable|ToolWindow|Top|Topmost|TransColor|Transparent|Tray|TreeView|TryAgain|Throw|Try|Catch|Finally|Type|UnCheck|underline|Unicode|Unlock|Until|UpDown|Upper|Uppercase|UseErrorLevel|Vis|VisFirst|Visible|VScroll|Wait|WaitClose|WantCtrlA|WantF2|WantReturn|While|Wrap|Xdigit|xm|xp|xs|Yes|ym|yp|ys)\b/i}; \ No newline at end of file diff --git a/tests/languages/autohotkey/builtin_feature.test b/tests/languages/autohotkey/builtin_feature.test index afbe8d3325..2a9e902c76 100644 --- a/tests/languages/autohotkey/builtin_feature.test +++ b/tests/languages/autohotkey/builtin_feature.test @@ -7,6 +7,16 @@ ceil chr class cos +comobjactive +comobjarray +comobjconnect +comobjcreate +comobjerror +comobjflags +comobjget +comobjquery +comobjtype +comobjvalue dllcall exp fileexist @@ -22,6 +32,8 @@ islabel IsObject ln log +ltrim +rtrim lv_add lv_delete lv_deletecol @@ -45,6 +57,7 @@ sin tan sqrt strlen +strreplace sb_seticon sb_setparts sb_settext @@ -80,6 +93,16 @@ __Set ["builtin", "chr"], ["builtin", "class"], ["builtin", "cos"], + ["builtin", "comobjactive"], + ["builtin", "comobjarray"], + ["builtin", "comobjconnect"], + ["builtin", "comobjcreate"], + ["builtin", "comobjerror"], + ["builtin", "comobjflags"], + ["builtin", "comobjget"], + ["builtin", "comobjquery"], + ["builtin", "comobjtype"], + ["builtin", "comobjvalue"], ["builtin", "dllcall"], ["builtin", "exp"], ["builtin", "fileexist"], @@ -95,6 +118,8 @@ __Set ["builtin", "IsObject"], ["builtin", "ln"], ["builtin", "log"], + ["builtin", "ltrim"], + ["builtin", "rtrim"], ["builtin", "lv_add"], ["builtin", "lv_delete"], ["builtin", "lv_deletecol"], @@ -118,6 +143,7 @@ __Set ["builtin", "tan"], ["builtin", "sqrt"], ["builtin", "strlen"], + ["builtin", "strreplace"], ["builtin", "sb_seticon"], ["builtin", "sb_setparts"], ["builtin", "sb_settext"], diff --git a/tests/languages/autohotkey/constant_feature.test b/tests/languages/autohotkey/constant_feature.test index ab11673488..e50bc3b5d8 100644 --- a/tests/languages/autohotkey/constant_feature.test +++ b/tests/languages/autohotkey/constant_feature.test @@ -20,6 +20,7 @@ a_detecthiddenwindows a_endchar a_eventinfo a_exitreason +a_fileencoding a_formatfloat a_formatinteger a_gui @@ -40,6 +41,7 @@ a_ipaddress1 a_ipaddress2 a_ipaddress3 a_ipaddress4 +a_is64bitos a_isadmin a_iscompiled a_iscritical @@ -87,11 +89,16 @@ a_numbatchlines a_ostype a_osversion a_priorhotkey +a_priorkey programfiles a_programfiles a_programs a_programscommon +a_ptrsize +a_regview +a_screendpi a_screenheight +a_scripthwnd a_screenwidth a_scriptdir a_scriptfullpath @@ -157,6 +164,7 @@ errorlevel ["constant", "a_endchar"], ["constant", "a_eventinfo"], ["constant", "a_exitreason"], + ["constant", "a_fileencoding"], ["constant", "a_formatfloat"], ["constant", "a_formatinteger"], ["constant", "a_gui"], @@ -177,6 +185,7 @@ errorlevel ["constant", "a_ipaddress2"], ["constant", "a_ipaddress3"], ["constant", "a_ipaddress4"], + ["constant", "a_is64bitos"], ["constant", "a_isadmin"], ["constant", "a_iscompiled"], ["constant", "a_iscritical"], @@ -224,11 +233,16 @@ errorlevel ["constant", "a_ostype"], ["constant", "a_osversion"], ["constant", "a_priorhotkey"], + ["constant", "a_priorkey"], ["constant", "programfiles"], ["constant", "a_programfiles"], ["constant", "a_programs"], ["constant", "a_programscommon"], + ["constant", "a_ptrsize"], + ["constant", "a_regview"], + ["constant", "a_screendpi"], ["constant", "a_screenheight"], + ["constant", "a_scripthwnd"], ["constant", "a_screenwidth"], ["constant", "a_scriptdir"], ["constant", "a_scriptfullpath"], diff --git a/tests/languages/autohotkey/important_feature.test b/tests/languages/autohotkey/important_feature.test index aa9cbeb5d6..910015d93f 100644 --- a/tests/languages/autohotkey/important_feature.test +++ b/tests/languages/autohotkey/important_feature.test @@ -1,32 +1,37 @@ #AllowSameLineComments #ClipboardTimeout #CommentFlag +#DerefChar #ErrorStdOut #EscapeChar #HotkeyInterval #HotkeyModifierTimeout #Hotstring +#If +#IfTimeout #IfWinActive #IfWinExist #IfWinNotActive #IfWinNotExist #Include #IncludeAgain +#InputLevel #InstallKeybdHook #InstallMouseHook #KeyHistory -#LTrim #MaxHotkeysPerInterval #MaxMem #MaxThreads #MaxThreadsBuffer #MaxThreadsPerHotkey +#MenuMaskKey #NoEnv #NoTrayIcon #Persistent #SingleInstance #UseHook #WinActivateForce +#Warn ---------------------------------------------------- @@ -34,32 +39,37 @@ ["important", "#AllowSameLineComments"], ["important", "#ClipboardTimeout"], ["important", "#CommentFlag"], + ["important", "#DerefChar"], ["important", "#ErrorStdOut"], ["important", "#EscapeChar"], ["important", "#HotkeyInterval"], ["important", "#HotkeyModifierTimeout"], ["important", "#Hotstring"], + ["important", "#If"], + ["important", "#IfTimeout"], ["important", "#IfWinActive"], ["important", "#IfWinExist"], ["important", "#IfWinNotActive"], ["important", "#IfWinNotExist"], ["important", "#Include"], ["important", "#IncludeAgain"], + ["important", "#InputLevel"], ["important", "#InstallKeybdHook"], ["important", "#InstallMouseHook"], ["important", "#KeyHistory"], - ["important", "#LTrim"], ["important", "#MaxHotkeysPerInterval"], ["important", "#MaxMem"], ["important", "#MaxThreads"], ["important", "#MaxThreadsBuffer"], ["important", "#MaxThreadsPerHotkey"], + ["important", "#MenuMaskKey"], ["important", "#NoEnv"], ["important", "#NoTrayIcon"], ["important", "#Persistent"], ["important", "#SingleInstance"], ["important", "#UseHook"], - ["important", "#WinActivateForce"] + ["important", "#WinActivateForce"], + ["important", "#Warn"] ] ---------------------------------------------------- diff --git a/tests/languages/autohotkey/keyword_feature.test b/tests/languages/autohotkey/keyword_feature.test index 91671355fd..705f6763e2 100644 --- a/tests/languages/autohotkey/keyword_feature.test +++ b/tests/languages/autohotkey/keyword_feature.test @@ -2,6 +2,7 @@ Abort AboveNormal Add ahk_class +ahk_exe ahk_group ahk_id ahk_pid @@ -29,6 +30,7 @@ Bold Border Button ByRef +Catch Checkbox Checked CheckedGray @@ -63,6 +65,7 @@ Exist Expand ExStyle FileSystem +Finally First Flash Float @@ -223,6 +226,7 @@ Tab2 TabStop Text Theme +Throw Tile ToggleCheck ToggleEnable @@ -233,12 +237,14 @@ TransColor Transparent Tray TreeView +Try TryAgain Type UnCheck underline Unicode Unlock +Until UpDown Upper Uppercase @@ -270,6 +276,7 @@ ys ["keyword", "AboveNormal"], ["keyword", "Add"], ["keyword", "ahk_class"], + ["keyword", "ahk_exe"], ["keyword", "ahk_group"], ["keyword", "ahk_id"], ["keyword", "ahk_pid"], @@ -297,6 +304,7 @@ ys ["keyword", "Border"], ["keyword", "Button"], ["keyword", "ByRef"], + ["keyword", "Catch"], ["keyword", "Checkbox"], ["keyword", "Checked"], ["keyword", "CheckedGray"], @@ -331,6 +339,7 @@ ys ["keyword", "Expand"], ["keyword", "ExStyle"], ["keyword", "FileSystem"], + ["keyword", "Finally"], ["keyword", "First"], ["keyword", "Flash"], ["keyword", "Float"], @@ -491,6 +500,7 @@ ys ["keyword", "TabStop"], ["keyword", "Text"], ["keyword", "Theme"], + ["keyword", "Throw"], ["keyword", "Tile"], ["keyword", "ToggleCheck"], ["keyword", "ToggleEnable"], @@ -501,12 +511,14 @@ ys ["keyword", "Transparent"], ["keyword", "Tray"], ["keyword", "TreeView"], + ["keyword", "Try"], ["keyword", "TryAgain"], ["keyword", "Type"], ["keyword", "UnCheck"], ["keyword", "underline"], ["keyword", "Unicode"], ["keyword", "Unlock"], + ["keyword", "Until"], ["keyword", "UpDown"], ["keyword", "Upper"], ["keyword", "Uppercase"], diff --git a/tests/languages/autohotkey/selector_feature.test b/tests/languages/autohotkey/selector_feature.test index 29210c265b..7f84f51a49 100644 --- a/tests/languages/autohotkey/selector_feature.test +++ b/tests/languages/autohotkey/selector_feature.test @@ -118,6 +118,7 @@ SetFormat SetKeyDelay SetMouseDelay SetNumlockState +SetRegView SetScrollLockState SetStoreCapslockMode SetTimer @@ -308,6 +309,7 @@ WinWaitNotActive ["selector", "SetKeyDelay"], ["selector", "SetMouseDelay"], ["selector", "SetNumlockState"], + ["selector", "SetRegView"], ["selector", "SetScrollLockState"], ["selector", "SetStoreCapslockMode"], ["selector", "SetTimer"], From 0255cb6ae227d596b2d00bbc9b32b0391e604b37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ad=C3=A1m=20Brudzewsky?= Date: Wed, 27 May 2020 13:32:49 +0100 Subject: [PATCH 0541/1100] =?UTF-8?q?APL:=20Added=20=E2=8D=A5=20(#2409)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Introduced into Dyalog APL 18.0 which is just about to be released. --- components/prism-apl.js | 4 ++-- components/prism-apl.min.js | 2 +- tests/languages/apl/dyadic-operator_feature.test | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/components/prism-apl.js b/components/prism-apl.js index 1e4f3f94fb..b87451cf0d 100644 --- a/components/prism-apl.js +++ b/components/prism-apl.js @@ -17,7 +17,7 @@ Prism.languages.apl = { alias: 'operator' }, 'dyadic-operator': { - pattern: /[.⍣⍠⍤∘⌸@⌺]/, + pattern: /[.⍣⍠⍤∘⌸@⌺⍥]/, alias: 'operator' }, 'assignment': { @@ -29,4 +29,4 @@ Prism.languages.apl = { pattern: /[{}⍺⍵⍶⍹∇⍫:]/, alias: 'builtin' } -}; \ No newline at end of file +}; diff --git a/components/prism-apl.min.js b/components/prism-apl.min.js index e1c6b5466a..2607b68ea7 100644 --- a/components/prism-apl.min.js +++ b/components/prism-apl.min.js @@ -1 +1 @@ -Prism.languages.apl={comment:/(?:⍝|#[! ]).*$/m,string:{pattern:/'(?:[^'\r\n]|'')*'/,greedy:!0},number:/¯?(?:\d*\.?\d+(?:e[+¯]?\d+)?|¯|∞)(?:j¯?(?:\d*\.?\d+(?:e[+¯]?\d+)?|¯|∞))?/i,statement:/:[A-Z][a-z][A-Za-z]*\b/,"system-function":{pattern:/⎕[A-Z]+/i,alias:"function"},constant:/[⍬⌾#⎕⍞]/,function:/[-+×÷⌈⌊∣|⍳⍸?*⍟○!⌹<≤=>≥≠≡≢∊⍷∪∩~∨∧⍱⍲⍴,⍪⌽⊖⍉↑↓⊂⊃⊆⊇⌷⍋⍒⊤⊥⍕⍎⊣⊢⍁⍂≈⍯↗¤→]/,"monadic-operator":{pattern:/[\\\/⌿⍀¨⍨⌶&∥]/,alias:"operator"},"dyadic-operator":{pattern:/[.⍣⍠⍤∘⌸@⌺]/,alias:"operator"},assignment:{pattern:/←/,alias:"keyword"},punctuation:/[\[;\]()◇⋄]/,dfn:{pattern:/[{}⍺⍵⍶⍹∇⍫:]/,alias:"builtin"}}; \ No newline at end of file +Prism.languages.apl={comment:/(?:⍝|#[! ]).*$/m,string:{pattern:/'(?:[^'\r\n]|'')*'/,greedy:!0},number:/¯?(?:\d*\.?\d+(?:e[+¯]?\d+)?|¯|∞)(?:j¯?(?:\d*\.?\d+(?:e[+¯]?\d+)?|¯|∞))?/i,statement:/:[A-Z][a-z][A-Za-z]*\b/,"system-function":{pattern:/⎕[A-Z]+/i,alias:"function"},constant:/[⍬⌾#⎕⍞]/,function:/[-+×÷⌈⌊∣|⍳⍸?*⍟○!⌹<≤=>≥≠≡≢∊⍷∪∩~∨∧⍱⍲⍴,⍪⌽⊖⍉↑↓⊂⊃⊆⊇⌷⍋⍒⊤⊥⍕⍎⊣⊢⍁⍂≈⍯↗¤→]/,"monadic-operator":{pattern:/[\\\/⌿⍀¨⍨⌶&∥]/,alias:"operator"},"dyadic-operator":{pattern:/[.⍣⍠⍤∘⌸@⌺⍥]/,alias:"operator"},assignment:{pattern:/←/,alias:"keyword"},punctuation:/[\[;\]()◇⋄]/,dfn:{pattern:/[{}⍺⍵⍶⍹∇⍫:]/,alias:"builtin"}}; \ No newline at end of file diff --git a/tests/languages/apl/dyadic-operator_feature.test b/tests/languages/apl/dyadic-operator_feature.test index bd141edef6..cec61b4f55 100644 --- a/tests/languages/apl/dyadic-operator_feature.test +++ b/tests/languages/apl/dyadic-operator_feature.test @@ -1,15 +1,15 @@ . ⍣ ⍠ ⍤ ∘ ⌸ -@ ⌺ +@ ⌺ ⍥ ---------------------------------------------------- [ ["dyadic-operator", "."], ["dyadic-operator", "⍣"], ["dyadic-operator", "⍠"], ["dyadic-operator", "⍤"], ["dyadic-operator", "∘"], ["dyadic-operator", "⌸"], - ["dyadic-operator", "@"], ["dyadic-operator", "⌺"] + ["dyadic-operator", "@"], ["dyadic-operator", "⌺"], ["dyadic-operator", "⍥"] ] ---------------------------------------------------- -Checks for dyadic operators. \ No newline at end of file +Checks for dyadic operators. From ba5ac1dae4a214688affb2af41678365e1389b0a Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Fri, 29 May 2020 16:10:59 +0200 Subject: [PATCH 0542/1100] VB: Added missing keywords (#2376) --- components/prism-visual-basic.js | 2 +- components/prism-visual-basic.min.js | 2 +- tests/languages/visual-basic/keyword_feature.test | 6 +++++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/components/prism-visual-basic.js b/components/prism-visual-basic.js index 4fd106556b..d63b36b3b9 100644 --- a/components/prism-visual-basic.js +++ b/components/prism-visual-basic.js @@ -20,7 +20,7 @@ Prism.languages['visual-basic'] = { }, 'number': /(?:(?:\b\d+(?:\.\d+)?|\.\d+)(?:E[+-]?\d+)?|&[HO][\dA-F]+)(?:U?[ILS]|[FRD])?/i, 'boolean': /\b(?:True|False|Nothing)\b/i, - 'keyword': /\b(?:AddHandler|AddressOf|Alias|And(?:Also)?|As|Boolean|ByRef|Byte|ByVal|Call|Case|Catch|C(?:Bool|Byte|Char|Date|Dbl|Dec|Int|Lng|Obj|SByte|Short|Sng|Str|Type|UInt|ULng|UShort)|Char|Class|Const|Continue|Date|Decimal|Declare|Default|Delegate|Dim|DirectCast|Do|Double|Each|Else(?:If)?|End(?:If)?|Enum|Erase|Error|Event|Exit|Finally|For|Friend|Function|Get(?:Type|XMLNamespace)?|Global|GoSub|GoTo|Handles|If|Implements|Imports|In|Inherits|Integer|Interface|Is|IsNot|Let|Lib|Like|Long|Loop|Me|Mod|Module|Must(?:Inherit|Override)|My(?:Base|Class)|Namespace|Narrowing|New|Next|Not(?:Inheritable|Overridable)?|Object|Of|On|Operator|Option(?:al)?|Or(?:Else)?|Out|Overloads|Overridable|Overrides|ParamArray|Partial|Private|Property|Protected|Public|RaiseEvent|ReadOnly|ReDim|RemoveHandler|Resume|Return|SByte|Select|Set|Shadows|Shared|short|Single|Static|Step|Stop|String|Structure|Sub|SyncLock|Then|Throw|To|Try|TryCast|TypeOf|U(?:Integer|Long|Short)|Using|Variant|Wend|When|While|Widening|With(?:Events)?|WriteOnly|Xor)\b/i, + 'keyword': /\b(?:AddHandler|AddressOf|Alias|And(?:Also)?|As|Boolean|ByRef|Byte|ByVal|Call|Case|Catch|C(?:Bool|Byte|Char|Date|Dbl|Dec|Int|Lng|Obj|SByte|Short|Sng|Str|Type|UInt|ULng|UShort)|Char|Class|Const|Continue|Currency|Date|Decimal|Declare|Default|Delegate|Dim|DirectCast|Do|Double|Each|Else(?:If)?|End(?:If)?|Enum|Erase|Error|Event|Exit|Finally|For|Friend|Function|Get(?:Type|XMLNamespace)?|Global|GoSub|GoTo|Handles|If|Implements|Imports|In|Inherits|Integer|Interface|Is|IsNot|Let|Lib|Like|Long|Loop|Me|Mod|Module|Must(?:Inherit|Override)|My(?:Base|Class)|Namespace|Narrowing|New|Next|Not(?:Inheritable|Overridable)?|Object|Of|On|Operator|Option(?:al)?|Or(?:Else)?|Out|Overloads|Overridable|Overrides|ParamArray|Partial|Private|Property|Protected|Public|RaiseEvent|ReadOnly|ReDim|RemoveHandler|Resume|Return|SByte|Select|Set|Shadows|Shared|short|Single|Static|Step|Stop|String|Structure|Sub|SyncLock|Then|Throw|To|Try|TryCast|Type|TypeOf|U(?:Integer|Long|Short)|Using|Variant|Wend|When|While|Widening|With(?:Events)?|WriteOnly|Xor)\b/i, 'operator': [ /[+\-*/\\^<=>&#@$%!]/, { diff --git a/components/prism-visual-basic.min.js b/components/prism-visual-basic.min.js index 9681c6aa80..0349773a68 100644 --- a/components/prism-visual-basic.min.js +++ b/components/prism-visual-basic.min.js @@ -1 +1 @@ -Prism.languages["visual-basic"]={comment:{pattern:/(?:['‘’]|REM\b)(?:[^\r\n_]|_(?:\r\n?|\n)?)*/i,inside:{keyword:/^REM/i}},directive:{pattern:/#(?:Const|Else|ElseIf|End|ExternalChecksum|ExternalSource|If|Region)(?:[^\S\r\n]_[^\S\r\n]*(?:\r\n?|\n)|.)+/i,alias:"comment",greedy:!0},string:{pattern:/\$?["“”](?:["“”]{2}|[^"“”])*["“”]C?/i,greedy:!0},date:{pattern:/#[^\S\r\n]*(?:\d+([/-])\d+\1\d+(?:[^\S\r\n]+(?:\d+[^\S\r\n]*(?:AM|PM)|\d+:\d+(?::\d+)?(?:[^\S\r\n]*(?:AM|PM))?))?|(?:\d+[^\S\r\n]*(?:AM|PM)|\d+:\d+(?::\d+)?(?:[^\S\r\n]*(?:AM|PM))?))[^\S\r\n]*#/i,alias:"builtin"},number:/(?:(?:\b\d+(?:\.\d+)?|\.\d+)(?:E[+-]?\d+)?|&[HO][\dA-F]+)(?:U?[ILS]|[FRD])?/i,boolean:/\b(?:True|False|Nothing)\b/i,keyword:/\b(?:AddHandler|AddressOf|Alias|And(?:Also)?|As|Boolean|ByRef|Byte|ByVal|Call|Case|Catch|C(?:Bool|Byte|Char|Date|Dbl|Dec|Int|Lng|Obj|SByte|Short|Sng|Str|Type|UInt|ULng|UShort)|Char|Class|Const|Continue|Date|Decimal|Declare|Default|Delegate|Dim|DirectCast|Do|Double|Each|Else(?:If)?|End(?:If)?|Enum|Erase|Error|Event|Exit|Finally|For|Friend|Function|Get(?:Type|XMLNamespace)?|Global|GoSub|GoTo|Handles|If|Implements|Imports|In|Inherits|Integer|Interface|Is|IsNot|Let|Lib|Like|Long|Loop|Me|Mod|Module|Must(?:Inherit|Override)|My(?:Base|Class)|Namespace|Narrowing|New|Next|Not(?:Inheritable|Overridable)?|Object|Of|On|Operator|Option(?:al)?|Or(?:Else)?|Out|Overloads|Overridable|Overrides|ParamArray|Partial|Private|Property|Protected|Public|RaiseEvent|ReadOnly|ReDim|RemoveHandler|Resume|Return|SByte|Select|Set|Shadows|Shared|short|Single|Static|Step|Stop|String|Structure|Sub|SyncLock|Then|Throw|To|Try|TryCast|TypeOf|U(?:Integer|Long|Short)|Using|Variant|Wend|When|While|Widening|With(?:Events)?|WriteOnly|Xor)\b/i,operator:[/[+\-*/\\^<=>&#@$%!]/,{pattern:/([^\S\r\n])_(?=[^\S\r\n]*[\r\n])/,lookbehind:!0}],punctuation:/[{}().,:?]/},Prism.languages.vb=Prism.languages["visual-basic"]; \ No newline at end of file +Prism.languages["visual-basic"]={comment:{pattern:/(?:['‘’]|REM\b)(?:[^\r\n_]|_(?:\r\n?|\n)?)*/i,inside:{keyword:/^REM/i}},directive:{pattern:/#(?:Const|Else|ElseIf|End|ExternalChecksum|ExternalSource|If|Region)(?:[^\S\r\n]_[^\S\r\n]*(?:\r\n?|\n)|.)+/i,alias:"comment",greedy:!0},string:{pattern:/\$?["“”](?:["“”]{2}|[^"“”])*["“”]C?/i,greedy:!0},date:{pattern:/#[^\S\r\n]*(?:\d+([/-])\d+\1\d+(?:[^\S\r\n]+(?:\d+[^\S\r\n]*(?:AM|PM)|\d+:\d+(?::\d+)?(?:[^\S\r\n]*(?:AM|PM))?))?|(?:\d+[^\S\r\n]*(?:AM|PM)|\d+:\d+(?::\d+)?(?:[^\S\r\n]*(?:AM|PM))?))[^\S\r\n]*#/i,alias:"builtin"},number:/(?:(?:\b\d+(?:\.\d+)?|\.\d+)(?:E[+-]?\d+)?|&[HO][\dA-F]+)(?:U?[ILS]|[FRD])?/i,boolean:/\b(?:True|False|Nothing)\b/i,keyword:/\b(?:AddHandler|AddressOf|Alias|And(?:Also)?|As|Boolean|ByRef|Byte|ByVal|Call|Case|Catch|C(?:Bool|Byte|Char|Date|Dbl|Dec|Int|Lng|Obj|SByte|Short|Sng|Str|Type|UInt|ULng|UShort)|Char|Class|Const|Continue|Currency|Date|Decimal|Declare|Default|Delegate|Dim|DirectCast|Do|Double|Each|Else(?:If)?|End(?:If)?|Enum|Erase|Error|Event|Exit|Finally|For|Friend|Function|Get(?:Type|XMLNamespace)?|Global|GoSub|GoTo|Handles|If|Implements|Imports|In|Inherits|Integer|Interface|Is|IsNot|Let|Lib|Like|Long|Loop|Me|Mod|Module|Must(?:Inherit|Override)|My(?:Base|Class)|Namespace|Narrowing|New|Next|Not(?:Inheritable|Overridable)?|Object|Of|On|Operator|Option(?:al)?|Or(?:Else)?|Out|Overloads|Overridable|Overrides|ParamArray|Partial|Private|Property|Protected|Public|RaiseEvent|ReadOnly|ReDim|RemoveHandler|Resume|Return|SByte|Select|Set|Shadows|Shared|short|Single|Static|Step|Stop|String|Structure|Sub|SyncLock|Then|Throw|To|Try|TryCast|Type|TypeOf|U(?:Integer|Long|Short)|Using|Variant|Wend|When|While|Widening|With(?:Events)?|WriteOnly|Xor)\b/i,operator:[/[+\-*/\\^<=>&#@$%!]/,{pattern:/([^\S\r\n])_(?=[^\S\r\n]*[\r\n])/,lookbehind:!0}],punctuation:/[{}().,:?]/},Prism.languages.vb=Prism.languages["visual-basic"]; \ No newline at end of file diff --git a/tests/languages/visual-basic/keyword_feature.test b/tests/languages/visual-basic/keyword_feature.test index 73309df28c..92dfe817e5 100644 --- a/tests/languages/visual-basic/keyword_feature.test +++ b/tests/languages/visual-basic/keyword_feature.test @@ -32,6 +32,7 @@ CType CUInt CULng CUShort +Currency Date Decimal Declare @@ -133,6 +134,7 @@ Throw To Try TryCast +Type TypeOf UInteger ULong @@ -185,6 +187,7 @@ Xor ["keyword", "CUInt"], ["keyword", "CULng"], ["keyword", "CUShort"], + ["keyword", "Currency"], ["keyword", "Date"], ["keyword", "Decimal"], ["keyword", "Declare"], @@ -286,6 +289,7 @@ Xor ["keyword", "To"], ["keyword", "Try"], ["keyword", "TryCast"], + ["keyword", "Type"], ["keyword", "TypeOf"], ["keyword", "UInteger"], ["keyword", "ULong"], @@ -304,4 +308,4 @@ Xor ---------------------------------------------------- -Checks for all keywords. \ No newline at end of file +Checks for all keywords. From b28f21b768ef421e515d65f042c9ae95f8684019 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Fri, 29 May 2020 16:17:03 +0200 Subject: [PATCH 0543/1100] JS: Added support for logical assignment operators (#2378) --- components/prism-javascript.js | 2 +- components/prism-javascript.min.js | 2 +- prism.js | 2 +- tests/languages/javascript/operator_feature.test | 12 ++++++------ 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/components/prism-javascript.js b/components/prism-javascript.js index 19c371cce8..d405ec4266 100644 --- a/components/prism-javascript.js +++ b/components/prism-javascript.js @@ -19,7 +19,7 @@ Prism.languages.javascript = Prism.languages.extend('clike', { 'number': /\b(?:(?:0[xX](?:[\dA-Fa-f](?:_[\dA-Fa-f])?)+|0[bB](?:[01](?:_[01])?)+|0[oO](?:[0-7](?:_[0-7])?)+)n?|(?:\d(?:_\d)?)+n|NaN|Infinity)\b|(?:\b(?:\d(?:_\d)?)+\.?(?:\d(?:_\d)?)*|\B\.(?:\d(?:_\d)?)+)(?:[Ee][+-]?(?:\d(?:_\d)?)+)?/, // Allow for all non-ASCII characters (See http://stackoverflow.com/a/2008444) 'function': /#?[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/, - 'operator': /--|\+\+|\*\*=?|=>|&&|\|\||[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?[.?]?|[~:]/ + 'operator': /--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/ }); Prism.languages.javascript['class-name'][0].pattern = /(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/; diff --git a/components/prism-javascript.min.js b/components/prism-javascript.min.js index b96f317f32..c830279abb 100644 --- a/components/prism-javascript.min.js +++ b/components/prism-javascript.min.js @@ -1 +1 @@ -Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])[_$A-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\.(?:prototype|constructor))/,lookbehind:!0}],keyword:[{pattern:/((?:^|})\s*)(?:catch|finally)\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],number:/\b(?:(?:0[xX](?:[\dA-Fa-f](?:_[\dA-Fa-f])?)+|0[bB](?:[01](?:_[01])?)+|0[oO](?:[0-7](?:_[0-7])?)+)n?|(?:\d(?:_\d)?)+n|NaN|Infinity)\b|(?:\b(?:\d(?:_\d)?)+\.?(?:\d(?:_\d)?)*|\B\.(?:\d(?:_\d)?)+)(?:[Ee][+-]?(?:\d(?:_\d)?)+)?/,function:/#?[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,operator:/--|\+\+|\*\*=?|=>|&&|\|\||[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?[.?]?|[~:]/}),Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/,Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s])\s*)\/(?:\[(?:[^\]\\\r\n]|\\.)*]|\\.|[^/\\\[\r\n])+\/[gimyus]{0,6}(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/,lookbehind:!0,greedy:!0},"function-variable":{pattern:/#?[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)?\s*\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*=>)/i,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*\s*)\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),Prism.languages.insertBefore("javascript","string",{"template-string":{pattern:/`(?:\\[\s\S]|\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}|(?!\${)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\${|}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}}}),Prism.languages.markup&&Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.js=Prism.languages.javascript; \ No newline at end of file +Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])[_$A-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\.(?:prototype|constructor))/,lookbehind:!0}],keyword:[{pattern:/((?:^|})\s*)(?:catch|finally)\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],number:/\b(?:(?:0[xX](?:[\dA-Fa-f](?:_[\dA-Fa-f])?)+|0[bB](?:[01](?:_[01])?)+|0[oO](?:[0-7](?:_[0-7])?)+)n?|(?:\d(?:_\d)?)+n|NaN|Infinity)\b|(?:\b(?:\d(?:_\d)?)+\.?(?:\d(?:_\d)?)*|\B\.(?:\d(?:_\d)?)+)(?:[Ee][+-]?(?:\d(?:_\d)?)+)?/,function:/#?[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/,Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s])\s*)\/(?:\[(?:[^\]\\\r\n]|\\.)*]|\\.|[^/\\\[\r\n])+\/[gimyus]{0,6}(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/,lookbehind:!0,greedy:!0},"function-variable":{pattern:/#?[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)?\s*\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*=>)/i,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*\s*)\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),Prism.languages.insertBefore("javascript","string",{"template-string":{pattern:/`(?:\\[\s\S]|\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}|(?!\${)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\${|}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}}}),Prism.languages.markup&&Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.js=Prism.languages.javascript; \ No newline at end of file diff --git a/prism.js b/prism.js index f257ebf27c..162b54c36e 100644 --- a/prism.js +++ b/prism.js @@ -996,7 +996,7 @@ Prism.languages.javascript = Prism.languages.extend('clike', { 'number': /\b(?:(?:0[xX](?:[\dA-Fa-f](?:_[\dA-Fa-f])?)+|0[bB](?:[01](?:_[01])?)+|0[oO](?:[0-7](?:_[0-7])?)+)n?|(?:\d(?:_\d)?)+n|NaN|Infinity)\b|(?:\b(?:\d(?:_\d)?)+\.?(?:\d(?:_\d)?)*|\B\.(?:\d(?:_\d)?)+)(?:[Ee][+-]?(?:\d(?:_\d)?)+)?/, // Allow for all non-ASCII characters (See http://stackoverflow.com/a/2008444) 'function': /#?[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/, - 'operator': /--|\+\+|\*\*=?|=>|&&|\|\||[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?[.?]?|[~:]/ + 'operator': /--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/ }); Prism.languages.javascript['class-name'][0].pattern = /(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/; diff --git a/tests/languages/javascript/operator_feature.test b/tests/languages/javascript/operator_feature.test index d5126c4333..806f311fba 100644 --- a/tests/languages/javascript/operator_feature.test +++ b/tests/languages/javascript/operator_feature.test @@ -4,13 +4,13 @@ > >= >> >>= >>> >>>= = == === => ! != !== -& && &= -| || |= +& && &= &&= +| || |= ||= * ** *= **= / /= ~ ^ ^= % %= ? : ... -?? ?. +?? ?. ??= ---------------------------------------------------- @@ -21,13 +21,13 @@ ["operator", ">"], ["operator", ">="], ["operator", ">>"], ["operator", ">>="], ["operator", ">>>"], ["operator", ">>>="], ["operator", "="], ["operator", "=="], ["operator", "==="], ["operator", "=>"], ["operator", "!"], ["operator", "!="], ["operator", "!=="], - ["operator", "&"], ["operator", "&&"], ["operator", "&="], - ["operator", "|"], ["operator", "||"], ["operator", "|="], + ["operator", "&"], ["operator", "&&"], ["operator", "&="], ["operator", "&&="], + ["operator", "|"], ["operator", "||"], ["operator", "|="], ["operator", "||="], ["operator", "*"], ["operator", "**"], ["operator", "*="], ["operator", "**="], ["operator", "/"], ["operator", "/="], ["operator", "~"], ["operator", "^"], ["operator", "^="], ["operator", "%"], ["operator", "%="], ["operator", "?"], ["operator", ":"], ["operator", "..."], - ["operator", "??"], ["operator", "?."] + ["operator", "??"], ["operator", "?."], ["operator", "??="] ] ---------------------------------------------------- From 55bf7ec1baaf8ac8c845abebbba1df0940f6d65b Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Fri, 29 May 2020 16:21:40 +0200 Subject: [PATCH 0544/1100] Filter highlightAll: Fixed typo (#2391) --- plugins/filter-highlight-all/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/filter-highlight-all/index.html b/plugins/filter-highlight-all/index.html index 53f9439568..34962f65cc 100644 --- a/plugins/filter-highlight-all/index.html +++ b/plugins/filter-highlight-all/index.html @@ -116,7 +116,7 @@

        Examples

        Prism will ignore these blocks, so you can even define your own static highlighting which Prism would normally remove.

        a.link::before {
        -	content: 'I just do my own highlighted';
        +	content: 'I just do my own highlighting';
         	color: #F00;
         }
        From 6352213a042d00b712450610ec2a18b3627c18f7 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Fri, 29 May 2020 16:22:10 +0200 Subject: [PATCH 0545/1100] Solidity: Added `sol` alias (#2382) --- components.js | 2 +- components.json | 1 + components/prism-solidity.js | 2 ++ components/prism-solidity.min.js | 2 +- plugins/autoloader/prism-autoloader.js | 1 + plugins/autoloader/prism-autoloader.min.js | 2 +- plugins/show-language/prism-show-language.js | 1 + plugins/show-language/prism-show-language.min.js | 2 +- 8 files changed, 9 insertions(+), 4 deletions(-) diff --git a/components.js b/components.js index 786f34dbac..cc16f75db0 100644 --- a/components.js +++ b/components.js @@ -1,2 +1,2 @@ -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml","ssml","atom","rss"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","ssml":"SSML","atom":"Atom","rss":"RSS"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"Augmented Backus–Naur form","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"Backus–Naur form","alias":"rbnf","aliasTitles":{"rbnf":"Routing Backus–Naur form"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dax":{"title":"DAX","owner":"peterbud"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"Extended Backus–Naur form","owner":"RunDevelopment"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"c","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"hlsl":{"title":"HLSL","require":"c","owner":"RunDevelopment"},"http":{"title":"HTTP","optional":["css","javascript","json","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"json":{"title":"JSON","alias":"webmanifest","aliasTitles":{"webmanifest":"Web App Manifest"},"owner":"CupOfTea696"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"purebasic":{"title":"PureBasic","require":"clike","alias":"pbfasm","owner":"HeX0R101"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"racket":{"title":"Racket","require":"scheme","alias":"rkt","owner":"RunDevelopment"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","alias":"rpy","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","modify":["actionscript","coffeescript","flow","javascript","typescript","vala"],"owner":"RunDevelopment"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"solidity":{"title":"Solidity (Ethereum)","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","vbnet"],"owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xml-doc":{"title":"XML doc (.net)","require":"markup","modify":["csharp","fsharp","vbnet"],"owner":"RunDevelopment"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml","ssml","atom","rss"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","ssml":"SSML","atom":"Atom","rss":"RSS"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"Augmented Backus–Naur form","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"Backus–Naur form","alias":"rbnf","aliasTitles":{"rbnf":"Routing Backus–Naur form"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dax":{"title":"DAX","owner":"peterbud"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"Extended Backus–Naur form","owner":"RunDevelopment"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"c","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"hlsl":{"title":"HLSL","require":"c","owner":"RunDevelopment"},"http":{"title":"HTTP","optional":["css","javascript","json","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"json":{"title":"JSON","alias":"webmanifest","aliasTitles":{"webmanifest":"Web App Manifest"},"owner":"CupOfTea696"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"purebasic":{"title":"PureBasic","require":"clike","alias":"pbfasm","owner":"HeX0R101"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"racket":{"title":"Racket","require":"scheme","alias":"rkt","owner":"RunDevelopment"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","alias":"rpy","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","modify":["actionscript","coffeescript","flow","javascript","typescript","vala"],"owner":"RunDevelopment"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"solidity":{"title":"Solidity (Ethereum)","alias":"sol","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","vbnet"],"owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xml-doc":{"title":"XML doc (.net)","require":"markup","modify":["csharp","fsharp","vbnet"],"owner":"RunDevelopment"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; if (typeof module !== 'undefined' && module.exports) { module.exports = components; } \ No newline at end of file diff --git a/components.json b/components.json index 5e122eaae2..8a1aec0cf1 100644 --- a/components.json +++ b/components.json @@ -993,6 +993,7 @@ }, "solidity": { "title": "Solidity (Ethereum)", + "alias": "sol", "require": "clike", "owner": "glachaud" }, diff --git a/components/prism-solidity.js b/components/prism-solidity.js index cf261cd7e6..ee541bdea9 100644 --- a/components/prism-solidity.js +++ b/components/prism-solidity.js @@ -18,3 +18,5 @@ Prism.languages.insertBefore('solidity', 'number', { alias: 'number', } }); + +Prism.languages.sol = Prism.languages.solidity; diff --git a/components/prism-solidity.min.js b/components/prism-solidity.min.js index b70e1fa126..08d7d42358 100644 --- a/components/prism-solidity.min.js +++ b/components/prism-solidity.min.js @@ -1 +1 @@ -Prism.languages.solidity=Prism.languages.extend("clike",{"class-name":{pattern:/(\b(?:contract|enum|interface|library|new|struct|using)\s+)(?!\d)[\w$]+/,lookbehind:!0},keyword:/\b(?:_|anonymous|as|assembly|assert|break|calldata|case|constant|constructor|continue|contract|default|delete|do|else|emit|enum|event|external|for|from|function|if|import|indexed|inherited|interface|internal|is|let|library|mapping|memory|modifier|new|payable|pragma|private|public|pure|require|returns?|revert|selfdestruct|solidity|storage|struct|suicide|switch|this|throw|using|var|view|while)\b/,operator:/=>|->|:=|=:|\*\*|\+\+|--|\|\||&&|<<=?|>>=?|[-+*/%^&|<>!=]=?|[~?]/}),Prism.languages.insertBefore("solidity","keyword",{builtin:/\b(?:address|bool|string|u?int(?:8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?|byte|bytes(?:[1-9]|[12]\d|3[0-2])?)\b/}),Prism.languages.insertBefore("solidity","number",{version:{pattern:/([<>]=?|\^)\d+\.\d+\.\d+\b/,lookbehind:!0,alias:"number"}}); \ No newline at end of file +Prism.languages.solidity=Prism.languages.extend("clike",{"class-name":{pattern:/(\b(?:contract|enum|interface|library|new|struct|using)\s+)(?!\d)[\w$]+/,lookbehind:!0},keyword:/\b(?:_|anonymous|as|assembly|assert|break|calldata|case|constant|constructor|continue|contract|default|delete|do|else|emit|enum|event|external|for|from|function|if|import|indexed|inherited|interface|internal|is|let|library|mapping|memory|modifier|new|payable|pragma|private|public|pure|require|returns?|revert|selfdestruct|solidity|storage|struct|suicide|switch|this|throw|using|var|view|while)\b/,operator:/=>|->|:=|=:|\*\*|\+\+|--|\|\||&&|<<=?|>>=?|[-+*/%^&|<>!=]=?|[~?]/}),Prism.languages.insertBefore("solidity","keyword",{builtin:/\b(?:address|bool|string|u?int(?:8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?|byte|bytes(?:[1-9]|[12]\d|3[0-2])?)\b/}),Prism.languages.insertBefore("solidity","number",{version:{pattern:/([<>]=?|\^)\d+\.\d+\.\d+\b/,lookbehind:!0,alias:"number"}}),Prism.languages.sol=Prism.languages.solidity; \ No newline at end of file diff --git a/plugins/autoloader/prism-autoloader.js b/plugins/autoloader/prism-autoloader.js index d0a819de57..81c1624a23 100644 --- a/plugins/autoloader/prism-autoloader.js +++ b/plugins/autoloader/prism-autoloader.js @@ -193,6 +193,7 @@ "rpy": "renpy", "robot": "robotframework", "rb": "ruby", + "sol": "solidity", "sln": "solution-file", "rq": "sparql", "trig": "turtle", diff --git a/plugins/autoloader/prism-autoloader.min.js b/plugins/autoloader/prism-autoloader.min.js index e87c287fe8..7114f5fed7 100644 --- a/plugins/autoloader/prism-autoloader.min.js +++ b/plugins/autoloader/prism-autoloader.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof self&&self.Prism&&self.document&&document.createElement){var c={javascript:"clike",actionscript:"javascript",arduino:"cpp",aspnet:["markup","csharp"],bison:"c",c:"clike",csharp:"clike",cpp:"c",coffeescript:"javascript",crystal:"ruby","css-extras":"css",d:"clike",dart:"clike",django:"markup-templating",ejs:["javascript","markup-templating"],etlua:["lua","markup-templating"],erb:["ruby","markup-templating"],fsharp:"clike","firestore-security-rules":"clike",flow:"javascript",ftl:"markup-templating",glsl:"c",gml:"clike",go:"clike",groovy:"clike",haml:"ruby",handlebars:"markup-templating",haxe:"clike",hlsl:"c",java:"clike",javadoc:["markup","java","javadoclike"],jolie:"clike",jsdoc:["javascript","javadoclike"],"js-extras":"javascript","js-templates":"javascript",jsonp:"json",json5:"json",kotlin:"clike",latte:["clike","markup-templating","php"],less:"css",lilypond:"scheme",markdown:"markup","markup-templating":"markup",n4js:"javascript",nginx:"clike",objectivec:"c",opencl:"c",parser:"markup",php:["clike","markup-templating"],phpdoc:["php","javadoclike"],"php-extras":"php",plsql:"sql",processing:"clike",protobuf:"clike",pug:["markup","javascript"],purebasic:"clike",qml:"javascript",qore:"clike",racket:"scheme",jsx:["markup","javascript"],tsx:["jsx","typescript"],reason:"clike",ruby:"clike",sass:"css",scss:"css",scala:"java","shell-session":"bash",smarty:"markup-templating",solidity:"clike",soy:"markup-templating",sparql:"turtle",sqf:"clike",swift:"clike",tap:"yaml",textile:"markup",tt2:["clike","markup-templating"],twig:"markup",typescript:"javascript","t4-cs":["t4-templating","csharp"],"t4-vb":["t4-templating","vbnet"],vala:"clike",vbnet:"basic",velocity:"markup",wiki:"markup",xeora:"markup","xml-doc":"markup",xquery:"markup"},l={html:"markup",xml:"markup",svg:"markup",mathml:"markup",ssml:"markup",atom:"markup",rss:"markup",js:"javascript",g4:"antlr4",adoc:"asciidoc",shell:"bash",shortcode:"bbcode",rbnf:"bnf",conc:"concurnas",cs:"csharp",dotnet:"csharp",coffee:"coffeescript",jinja2:"django","dns-zone":"dns-zone-file",dockerfile:"docker",eta:"ejs",xlsx:"excel-formula",xls:"excel-formula",gamemakerlanguage:"gml",hs:"haskell",webmanifest:"json",tex:"latex",context:"latex",ly:"lilypond",emacs:"lisp",elisp:"lisp","emacs-lisp":"lisp",md:"markdown",moon:"moonscript",n4jsd:"n4js",objc:"objectivec",objectpascal:"pascal",px:"pcaxis",pcode:"peoplecode",pq:"powerquery",mscript:"powerquery",pbfasm:"purebasic",py:"python",rkt:"racket",rpy:"renpy",robot:"robotframework",rb:"ruby",sln:"solution-file",rq:"sparql",trig:"turtle",ts:"typescript",t4:"t4-cs",uscript:"unrealscript",uc:"unrealscript",vb:"visual-basic",xeoracube:"xeora",yml:"yaml"},n={},e="components/",a=Prism.util.currentScript();if(a){var t=/\bplugins\/autoloader\/prism-autoloader\.(?:min\.)js(?:\?[^\r\n/]*)?$/i,r=/(^|\/)[\w-]+\.(?:min\.)js(?:\?[^\r\n/]*)?$/i,s=a.getAttribute("data-autoloader-path");if(null!=s)e=s.trim().replace(/\/?$/,"/");else{var i=a.src;t.test(i)?e=i.replace(t,"components/"):r.test(i)&&(e=i.replace(r,"$1components/"))}}var p=Prism.plugins.autoloader={languages_path:e,use_minified:!0,loadLanguages:o};Prism.hooks.add("complete",function(e){e.element&&e.language&&!e.grammar&&"none"!==e.language&&function(e,a){e in l&&(e=l[e]);var t=(a.getAttribute("data-dependencies")||"").trim();if(!t){var r=a.parentElement;r&&"pre"===r.tagName.toLowerCase()&&(t=(r.getAttribute("data-dependencies")||"").trim())}o(t?t.split(/\s*,\s*/g):[],function(){m(e,function(){Prism.highlightElement(a)})})}(e.language,e.element)})}function o(e,a,t){"string"==typeof e&&(e=[e]);var r=e.length,s=0,i=!1;function c(){i||++s===r&&a&&a(e)}0!==r?e.forEach(function(e){m(e,c,function(){i||(i=!0,t&&t(e))})}):a&&setTimeout(a,0)}function m(a,t,r){var s=0<=a.indexOf("!");a=a.replace("!",""),a=l[a]||a;var e=function(){var e=n[a];if(e||(e=n[a]={callbacks:[]}),e.callbacks.push({success:t,error:r}),!s&&Prism.languages[a])u(a,"success");else if(!s&&e.error)u(a,"error");else if(s||!e.loading){e.loading=!0,function(e,a,t){var r=document.createElement("script");r.src=e,r.async=!0,r.onload=function(){document.body.removeChild(r),a&&a()},r.onerror=function(){document.body.removeChild(r),t&&t()},document.body.appendChild(r)}(function(e){return p.languages_path+"prism-"+e+(p.use_minified?".min":"")+".js"}(a),function(){e.loading=!1,u(a,"success")},function(){e.loading=!1,e.error=!0,u(a,"error")})}},i=c[a];i&&i.length?o(i,e,r):e()}function u(e,a){if(n[e]){for(var t=n[e].callbacks,r=0,s=t.length;r Date: Fri, 29 May 2020 16:24:07 +0200 Subject: [PATCH 0546/1100] JS: Improved `get`/`set` and parameter detection (#2387) --- components/prism-javascript.js | 4 +- components/prism-javascript.min.js | 2 +- prism.js | 4 +- .../javascript/getter-setter_feature.test | 115 ++++++++++++++++++ .../languages/javascript/keyword_feature.test | 6 +- 5 files changed, 122 insertions(+), 9 deletions(-) create mode 100644 tests/languages/javascript/getter-setter_feature.test diff --git a/components/prism-javascript.js b/components/prism-javascript.js index d405ec4266..7ab2343bb1 100644 --- a/components/prism-javascript.js +++ b/components/prism-javascript.js @@ -12,7 +12,7 @@ Prism.languages.javascript = Prism.languages.extend('clike', { lookbehind: true }, { - pattern: /(^|[^.]|\.\.\.\s*)\b(?:as|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/, + pattern: /(^|[^.]|\.\.\.\s*)\b(?:as|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|(?:get|set)(?=\s*[\[$\w\xA0-\uFFFF])|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/, lookbehind: true }, ], @@ -51,7 +51,7 @@ Prism.languages.insertBefore('javascript', 'keyword', { inside: Prism.languages.javascript }, { - pattern: /((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*\s*)\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*\{)/, + pattern: /((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*\{)/, lookbehind: true, inside: Prism.languages.javascript } diff --git a/components/prism-javascript.min.js b/components/prism-javascript.min.js index c830279abb..27db69ff8a 100644 --- a/components/prism-javascript.min.js +++ b/components/prism-javascript.min.js @@ -1 +1 @@ -Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])[_$A-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\.(?:prototype|constructor))/,lookbehind:!0}],keyword:[{pattern:/((?:^|})\s*)(?:catch|finally)\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],number:/\b(?:(?:0[xX](?:[\dA-Fa-f](?:_[\dA-Fa-f])?)+|0[bB](?:[01](?:_[01])?)+|0[oO](?:[0-7](?:_[0-7])?)+)n?|(?:\d(?:_\d)?)+n|NaN|Infinity)\b|(?:\b(?:\d(?:_\d)?)+\.?(?:\d(?:_\d)?)*|\B\.(?:\d(?:_\d)?)+)(?:[Ee][+-]?(?:\d(?:_\d)?)+)?/,function:/#?[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/,Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s])\s*)\/(?:\[(?:[^\]\\\r\n]|\\.)*]|\\.|[^/\\\[\r\n])+\/[gimyus]{0,6}(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/,lookbehind:!0,greedy:!0},"function-variable":{pattern:/#?[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)?\s*\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*=>)/i,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*\s*)\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),Prism.languages.insertBefore("javascript","string",{"template-string":{pattern:/`(?:\\[\s\S]|\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}|(?!\${)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\${|}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}}}),Prism.languages.markup&&Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.js=Prism.languages.javascript; \ No newline at end of file +Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])[_$A-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\.(?:prototype|constructor))/,lookbehind:!0}],keyword:[{pattern:/((?:^|})\s*)(?:catch|finally)\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|(?:get|set)(?=\s*[\[$\w\xA0-\uFFFF])|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],number:/\b(?:(?:0[xX](?:[\dA-Fa-f](?:_[\dA-Fa-f])?)+|0[bB](?:[01](?:_[01])?)+|0[oO](?:[0-7](?:_[0-7])?)+)n?|(?:\d(?:_\d)?)+n|NaN|Infinity)\b|(?:\b(?:\d(?:_\d)?)+\.?(?:\d(?:_\d)?)*|\B\.(?:\d(?:_\d)?)+)(?:[Ee][+-]?(?:\d(?:_\d)?)+)?/,function:/#?[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/,Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s])\s*)\/(?:\[(?:[^\]\\\r\n]|\\.)*]|\\.|[^/\\\[\r\n])+\/[gimyus]{0,6}(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/,lookbehind:!0,greedy:!0},"function-variable":{pattern:/#?[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)?\s*\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*=>)/i,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),Prism.languages.insertBefore("javascript","string",{"template-string":{pattern:/`(?:\\[\s\S]|\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}|(?!\${)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\${|}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}}}),Prism.languages.markup&&Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.js=Prism.languages.javascript; \ No newline at end of file diff --git a/prism.js b/prism.js index 162b54c36e..cad54a61fa 100644 --- a/prism.js +++ b/prism.js @@ -989,7 +989,7 @@ Prism.languages.javascript = Prism.languages.extend('clike', { lookbehind: true }, { - pattern: /(^|[^.]|\.\.\.\s*)\b(?:as|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/, + pattern: /(^|[^.]|\.\.\.\s*)\b(?:as|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|(?:get|set)(?=\s*[\[$\w\xA0-\uFFFF])|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/, lookbehind: true }, ], @@ -1028,7 +1028,7 @@ Prism.languages.insertBefore('javascript', 'keyword', { inside: Prism.languages.javascript }, { - pattern: /((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*\s*)\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*\{)/, + pattern: /((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*\{)/, lookbehind: true, inside: Prism.languages.javascript } diff --git a/tests/languages/javascript/getter-setter_feature.test b/tests/languages/javascript/getter-setter_feature.test new file mode 100644 index 0000000000..a86a7dc661 --- /dev/null +++ b/tests/languages/javascript/getter-setter_feature.test @@ -0,0 +1,115 @@ +const obj = { + get name() { return 'bar'; }, + get [expr]() { return 'bar'; }, + async get name() { return 'bar'; }, + set name(val) { }, + set [expr](val) { }, + async set [expr](val) { }, +}; + +// not keywords +get(); +set(foo); + +---------------------------------------------------- + +[ + ["keyword", "const"], + " obj ", + ["operator", "="], + ["punctuation", "{"], + + ["keyword", "get"], + ["function", "name"], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", "{"], + ["keyword", "return"], + ["string", "'bar'"], + ["punctuation", ";"], + ["punctuation", "}"], + ["punctuation", ","], + + ["keyword", "get"], + ["punctuation", "["], + "expr", + ["punctuation", "]"], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", "{"], + ["keyword", "return"], + ["string", "'bar'"], + ["punctuation", ";"], + ["punctuation", "}"], + ["punctuation", ","], + + ["keyword", "async"], + ["keyword", "get"], + ["function", "name"], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", "{"], + ["keyword", "return"], + ["string", "'bar'"], + ["punctuation", ";"], + ["punctuation", "}"], + ["punctuation", ","], + + ["keyword", "set"], + ["function", "name"], + ["punctuation", "("], + ["parameter", [ + "val" + ]], + ["punctuation", ")"], + ["punctuation", "{"], + ["punctuation", "}"], + ["punctuation", ","], + + ["keyword", "set"], + ["punctuation", "["], + "expr", + ["punctuation", "]"], + ["punctuation", "("], + ["parameter", [ + "val" + ]], + ["punctuation", ")"], + ["punctuation", "{"], + ["punctuation", "}"], + ["punctuation", ","], + + ["keyword", "async"], + ["keyword", "set"], + ["punctuation", "["], + "expr", + ["punctuation", "]"], + ["punctuation", "("], + ["parameter", [ + "val" + ]], + ["punctuation", ")"], + ["punctuation", "{"], + ["punctuation", "}"], + ["punctuation", ","], + + ["punctuation", "}"], + ["punctuation", ";"], + + ["comment", "// not keywords"], + + ["function", "get"], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", ";"], + + ["function", "set"], + ["punctuation", "("], + "foo", + ["punctuation", ")"], + ["punctuation", ";"] +] + +---------------------------------------------------- + +Checks for getters and setters. diff --git a/tests/languages/javascript/keyword_feature.test b/tests/languages/javascript/keyword_feature.test index b88d1bb9b1..c5ae92ad74 100644 --- a/tests/languages/javascript/keyword_feature.test +++ b/tests/languages/javascript/keyword_feature.test @@ -5,10 +5,10 @@ as; await; break; case; class; const; continue; debugger; default; delete; do; else; enum; export; extends; for; -from; get; if; implements; +from; if; implements; import; in; instanceof; interface; let; new; null; of; package; private; -protected; public; return; set; static; +protected; public; return; static; super; switch; this; throw; try; typeof; undefined; var; void; while; with; yield; @@ -39,7 +39,6 @@ with; yield; ["keyword", "extends"], ["punctuation", ";"], ["keyword", "for"], ["punctuation", ";"], ["keyword", "from"], ["punctuation", ";"], - ["keyword", "get"], ["punctuation", ";"], ["keyword", "if"], ["punctuation", ";"], ["keyword", "implements"], ["punctuation", ";"], ["keyword", "import"], ["punctuation", ";"], @@ -55,7 +54,6 @@ with; yield; ["keyword", "protected"], ["punctuation", ";"], ["keyword", "public"], ["punctuation", ";"], ["keyword", "return"], ["punctuation", ";"], - ["keyword", "set"], ["punctuation", ";"], ["keyword", "static"], ["punctuation", ";"], ["keyword", "super"], ["punctuation", ";"], ["keyword", "switch"], ["punctuation", ";"], From 9e64c62e3cf9586c836c3b13516629a97368efc8 Mon Sep 17 00:00:00 2001 From: Alex Mabry Date: Fri, 29 May 2020 12:28:05 -0500 Subject: [PATCH 0547/1100] GraphQL: Added support for multi-line strings and descriptions (#2406) --- components.js | 2 +- components.json | 1 + components/prism-graphql.js | 14 +++++++- components/prism-graphql.min.js | 2 +- examples/prism-graphql.html | 35 +++++++++++++++++-- .../graphql/description_feature.test | 34 ++++++++++++++++++ tests/languages/graphql/string_feature.test | 5 ++- .../markdown+graphql/description_feature.test | 26 ++++++++++++++ 8 files changed, 113 insertions(+), 6 deletions(-) create mode 100644 tests/languages/graphql/description_feature.test create mode 100644 tests/languages/markdown+graphql/description_feature.test diff --git a/components.js b/components.js index cc16f75db0..ce821ff52a 100644 --- a/components.js +++ b/components.js @@ -1,2 +1,2 @@ -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml","ssml","atom","rss"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","ssml":"SSML","atom":"Atom","rss":"RSS"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"Augmented Backus–Naur form","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"Backus–Naur form","alias":"rbnf","aliasTitles":{"rbnf":"Routing Backus–Naur form"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dax":{"title":"DAX","owner":"peterbud"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"Extended Backus–Naur form","owner":"RunDevelopment"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"c","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"hlsl":{"title":"HLSL","require":"c","owner":"RunDevelopment"},"http":{"title":"HTTP","optional":["css","javascript","json","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"json":{"title":"JSON","alias":"webmanifest","aliasTitles":{"webmanifest":"Web App Manifest"},"owner":"CupOfTea696"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"purebasic":{"title":"PureBasic","require":"clike","alias":"pbfasm","owner":"HeX0R101"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"racket":{"title":"Racket","require":"scheme","alias":"rkt","owner":"RunDevelopment"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","alias":"rpy","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","modify":["actionscript","coffeescript","flow","javascript","typescript","vala"],"owner":"RunDevelopment"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"solidity":{"title":"Solidity (Ethereum)","alias":"sol","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","vbnet"],"owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xml-doc":{"title":"XML doc (.net)","require":"markup","modify":["csharp","fsharp","vbnet"],"owner":"RunDevelopment"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml","ssml","atom","rss"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","ssml":"SSML","atom":"Atom","rss":"RSS"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"Augmented Backus–Naur form","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"Backus–Naur form","alias":"rbnf","aliasTitles":{"rbnf":"Routing Backus–Naur form"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dax":{"title":"DAX","owner":"peterbud"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"Extended Backus–Naur form","owner":"RunDevelopment"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"c","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","optional":["markdown"],"owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"hlsl":{"title":"HLSL","require":"c","owner":"RunDevelopment"},"http":{"title":"HTTP","optional":["css","javascript","json","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"json":{"title":"JSON","alias":"webmanifest","aliasTitles":{"webmanifest":"Web App Manifest"},"owner":"CupOfTea696"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"purebasic":{"title":"PureBasic","require":"clike","alias":"pbfasm","owner":"HeX0R101"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"racket":{"title":"Racket","require":"scheme","alias":"rkt","owner":"RunDevelopment"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","alias":"rpy","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","modify":["actionscript","coffeescript","flow","javascript","typescript","vala"],"owner":"RunDevelopment"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"solidity":{"title":"Solidity (Ethereum)","alias":"sol","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","vbnet"],"owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xml-doc":{"title":"XML doc (.net)","require":"markup","modify":["csharp","fsharp","vbnet"],"owner":"RunDevelopment"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; if (typeof module !== 'undefined' && module.exports) { module.exports = components; } \ No newline at end of file diff --git a/components.json b/components.json index 8a1aec0cf1..858656a0e9 100644 --- a/components.json +++ b/components.json @@ -397,6 +397,7 @@ }, "graphql": { "title": "GraphQL", + "optional": ["markdown"], "owner": "Golmote" }, "groovy": { diff --git a/components/prism-graphql.js b/components/prism-graphql.js index 22107ad412..efc61c3447 100644 --- a/components/prism-graphql.js +++ b/components/prism-graphql.js @@ -1,7 +1,19 @@ Prism.languages.graphql = { 'comment': /#.*/, + 'description': { + pattern: /(?:"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*")(?=\s*[a-z_])/i, + greedy: true, + alias: 'string', + inside: { + 'language-markdown': { + pattern: /(^"(?:"")?)(?!\1)[\s\S]+(?=\1$)/, + lookbehind: true, + inside: Prism.languages.markdown + } + } + }, 'string': { - pattern: /"(?:\\.|[^\\"\r\n])*"/, + pattern: /"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*"/, greedy: true }, 'number': /(?:\B-|\b)\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i, diff --git a/components/prism-graphql.min.js b/components/prism-graphql.min.js index 3db10bad0a..df6e5aee6b 100644 --- a/components/prism-graphql.min.js +++ b/components/prism-graphql.min.js @@ -1 +1 @@ -Prism.languages.graphql={comment:/#.*/,string:{pattern:/"(?:\\.|[^\\"\r\n])*"/,greedy:!0},number:/(?:\B-|\b)\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,boolean:/\b(?:true|false)\b/,variable:/\$[a-z_]\w*/i,directive:{pattern:/@[a-z_]\w*/i,alias:"function"},"attr-name":{pattern:/[a-z_]\w*(?=\s*(?:\((?:[^()"]|"(?:\\.|[^\\"\r\n])*")*\))?:)/i,greedy:!0},"class-name":{pattern:/(\b(?:enum|implements|interface|on|scalar|type|union)\s+)[a-zA-Z_]\w*/,lookbehind:!0},fragment:{pattern:/(\bfragment\s+|\.{3}\s*(?!on\b))[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},keyword:/\b(?:enum|fragment|implements|input|interface|mutation|on|query|scalar|schema|type|union)\b/,operator:/[!=|]|\.{3}/,punctuation:/[!(){}\[\]:=,]/,constant:/\b(?!ID\b)[A-Z][A-Z_\d]*\b/}; \ No newline at end of file +Prism.languages.graphql={comment:/#.*/,description:{pattern:/(?:"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*")(?=\s*[a-z_])/i,greedy:!0,alias:"string",inside:{"language-markdown":{pattern:/(^"(?:"")?)(?!\1)[\s\S]+(?=\1$)/,lookbehind:!0,inside:Prism.languages.markdown}}},string:{pattern:/"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*"/,greedy:!0},number:/(?:\B-|\b)\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,boolean:/\b(?:true|false)\b/,variable:/\$[a-z_]\w*/i,directive:{pattern:/@[a-z_]\w*/i,alias:"function"},"attr-name":{pattern:/[a-z_]\w*(?=\s*(?:\((?:[^()"]|"(?:\\.|[^\\"\r\n])*")*\))?:)/i,greedy:!0},"class-name":{pattern:/(\b(?:enum|implements|interface|on|scalar|type|union)\s+)[a-zA-Z_]\w*/,lookbehind:!0},fragment:{pattern:/(\bfragment\s+|\.{3}\s*(?!on\b))[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},keyword:/\b(?:enum|fragment|implements|input|interface|mutation|on|query|scalar|schema|type|union)\b/,operator:/[!=|]|\.{3}/,punctuation:/[!(){}\[\]:=,]/,constant:/\b(?!ID\b)[A-Z][A-Z_\d]*\b/}; \ No newline at end of file diff --git a/examples/prism-graphql.html b/examples/prism-graphql.html index 12113a9d80..7a030bceee 100644 --- a/examples/prism-graphql.html +++ b/examples/prism-graphql.html @@ -3,7 +3,10 @@

        Comments

        Strings

        ""
        -"foo \"bar\" baz"
        +"foo \"bar\" baz" +""" "Multi-line" strings +are supported.""" +

        Numbers

        0
        @@ -28,4 +31,32 @@ 

        Keywords

        id name profilePic(size: 50) -}
        \ No newline at end of file +}
        + +

        Markdown inside of descriptions require markdown to be loaded. +On this page, checking Markdown before checking GraphQL should +make the example below work properly.

        + +

        Descriptions

        +
        """
        +This is a multiline description
        +# Heading
        +[Prism](http://www.prismjs.com)
        +
        +It can contain **Markdown
        +	on multiple lines**
        +"""
        +type Example {
        +	id: ID!
        +}
        +
        +type Sample {
        +	"""
        +	Simple multiline description
        +	"""
        +	name(
        +		"This is a single line description"
        +		first: Int
        +	): String
        +}
        +
        \ No newline at end of file diff --git a/tests/languages/graphql/description_feature.test b/tests/languages/graphql/description_feature.test new file mode 100644 index 0000000000..10be0219f1 --- /dev/null +++ b/tests/languages/graphql/description_feature.test @@ -0,0 +1,34 @@ +"Single-line description" +type Foo {} +""" +Multiline description +""" +type Bar {} + +---------------------------------------------------- + +[ + ["description", [ + "\"", + ["language-markdown", "Single-line description"], + "\"" + ]], + ["keyword", "type"], + ["class-name", "Foo"], + ["punctuation", "{"], + ["punctuation", "}"], + + ["description", [ + "\"\"\"", + ["language-markdown", "\r\nMultiline description\r\n"], + "\"\"\"" + ]], + ["keyword", "type"], + ["class-name", "Bar"], + ["punctuation", "{"], + ["punctuation", "}"] +] + +---------------------------------------------------- + +Checks for descriptions. \ No newline at end of file diff --git a/tests/languages/graphql/string_feature.test b/tests/languages/graphql/string_feature.test index a3d26be33a..6324f4f580 100644 --- a/tests/languages/graphql/string_feature.test +++ b/tests/languages/graphql/string_feature.test @@ -1,13 +1,16 @@ "" "foo bar" "foo\"bar\\baz" +"""multi-line +string""" ---------------------------------------------------- [ ["string", "\"\""], ["string", "\"foo bar\""], - ["string", "\"foo\\\"bar\\\\baz\""] + ["string", "\"foo\\\"bar\\\\baz\""], + ["string", "\"\"\"multi-line\r\nstring\"\"\""] ] ---------------------------------------------------- diff --git a/tests/languages/markdown+graphql/description_feature.test b/tests/languages/markdown+graphql/description_feature.test new file mode 100644 index 0000000000..40b0a98fa5 --- /dev/null +++ b/tests/languages/markdown+graphql/description_feature.test @@ -0,0 +1,26 @@ +""" +Complex multiline description +# Title +""" +type Baz {} + +---------------------------------------------------- + +[ + ["description", [ + "\"\"\"", + ["language-markdown", [ + "\r\nComplex multiline description\r\n", + ["title", [["punctuation", "#"], " Title"]] + ]], + "\"\"\"" + ]], + ["keyword", "type"], + ["class-name", "Baz"], + ["punctuation", "{"], + ["punctuation", "}"] +] + +---------------------------------------------------- + +Checks for descriptions. \ No newline at end of file From cb6349e2cc31bef704bbf20538be3ad2df33b51b Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Mon, 1 Jun 2020 16:43:17 +0200 Subject: [PATCH 0548/1100] Changelog: Fixed v1.20.0 release date --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5a3d7d4781..694c2996d5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Prism Changelog -## 1.20.0 (TBD) +## 1.20.0 (2020-04-04) ### New components From 1e3f542be065f04bf9f9f109e92c08b1370572ad Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Thu, 4 Jun 2020 22:15:55 +0200 Subject: [PATCH 0549/1100] Scheme: Adjusted lookbehind for literals (#2396) --- components/prism-scheme.js | 7 +++++-- components/prism-scheme.min.js | 2 +- tests/languages/scheme/number_feature.test | 4 ++++ 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/components/prism-scheme.js b/components/prism-scheme.js index e36aa1ee7f..9c7b60c0fc 100644 --- a/components/prism-scheme.js +++ b/components/prism-scheme.js @@ -48,10 +48,13 @@ Prism.languages.scheme = { // := [+-]? // // := | - pattern: /([\s()])(?:(?:#d(?:#[ei])?|#[ei](?:#d)?)?[+-]?(?:(?:\d*\.?\d+(?:[eE][+-]?\d+)?|\d+\/\d+)(?:[+-](?:\d*\.?\d+(?:[eE][+-]?\d+)?|\d+\/\d+)i)?|(?:\d*\.?\d+(?:[eE][+-]?\d+)?|\d+\/\d+)i)|(?:#[box](?:#[ei])?|#[ei](?:#[box])?)[+-]?(?:[\da-fA-F]+(?:\/[\da-fA-F]+)?(?:[+-][\da-fA-F]+(?:\/[\da-fA-F]+)?i)?|[\da-fA-F]+(?:\/[\da-fA-F]+)?i))(?=[()\s]|$)/, + pattern: /(^|[\s()])(?:(?:#d(?:#[ei])?|#[ei](?:#d)?)?[+-]?(?:(?:\d*\.?\d+(?:[eE][+-]?\d+)?|\d+\/\d+)(?:[+-](?:\d*\.?\d+(?:[eE][+-]?\d+)?|\d+\/\d+)i)?|(?:\d*\.?\d+(?:[eE][+-]?\d+)?|\d+\/\d+)i)|(?:#[box](?:#[ei])?|#[ei](?:#[box])?)[+-]?(?:[\da-fA-F]+(?:\/[\da-fA-F]+)?(?:[+-][\da-fA-F]+(?:\/[\da-fA-F]+)?i)?|[\da-fA-F]+(?:\/[\da-fA-F]+)?i))(?=[()\s]|$)/, + lookbehind: true + }, + 'boolean': { + pattern: /(^|[\s()])#[ft](?=[()\s]|$)/, lookbehind: true }, - 'boolean': /#[ft](?=[()\s]|$)/, 'operator': { pattern: /(\()(?:[-+*%\/]|[<>]=?|=>?)(?=[()\s]|$)/, lookbehind: true diff --git a/components/prism-scheme.min.js b/components/prism-scheme.min.js index bdd367f019..7176052c9d 100644 --- a/components/prism-scheme.min.js +++ b/components/prism-scheme.min.js @@ -1 +1 @@ -Prism.languages.scheme={comment:/;.*/,string:{pattern:/"(?:[^"\\]|\\.)*"/,greedy:!0},symbol:{pattern:/'[^()#'\s]+/,greedy:!0},character:{pattern:/#\\(?:[ux][a-fA-F\d]+|[-a-zA-Z]+|\S)/,greedy:!0,alias:"string"},"lambda-parameter":[{pattern:/(\(lambda\s+)[^()'\s]+/,lookbehind:!0},{pattern:/(\(lambda\s+\()[^()']+/,lookbehind:!0}],keyword:{pattern:/(\()(?:define(?:-library|-macro|-syntax|-values)?|defmacro|(?:case-)?lambda|let(?:(?:\*|rec)?(?:-values)?|-syntax|rec-syntax)|else|if|cond|begin|delay(?:-force)?|parameterize|guard|set!|(?:quasi-)?quote|syntax-(?:case|rules))(?=[()\s]|$)/,lookbehind:!0},builtin:{pattern:/(\()(?:(?:cons|car|cdr|list|call-with-current-continuation|call\/cc|append|abs|apply|eval)\b|null\?|pair\?|boolean\?|eof-object\?|char\?|procedure\?|number\?|port\?|string\?|vector\?|symbol\?|bytevector\?)(?=[()\s]|$)/,lookbehind:!0},number:{pattern:/([\s()])(?:(?:#d(?:#[ei])?|#[ei](?:#d)?)?[+-]?(?:(?:\d*\.?\d+(?:[eE][+-]?\d+)?|\d+\/\d+)(?:[+-](?:\d*\.?\d+(?:[eE][+-]?\d+)?|\d+\/\d+)i)?|(?:\d*\.?\d+(?:[eE][+-]?\d+)?|\d+\/\d+)i)|(?:#[box](?:#[ei])?|#[ei](?:#[box])?)[+-]?(?:[\da-fA-F]+(?:\/[\da-fA-F]+)?(?:[+-][\da-fA-F]+(?:\/[\da-fA-F]+)?i)?|[\da-fA-F]+(?:\/[\da-fA-F]+)?i))(?=[()\s]|$)/,lookbehind:!0},boolean:/#[ft](?=[()\s]|$)/,operator:{pattern:/(\()(?:[-+*%\/]|[<>]=?|=>?)(?=[()\s]|$)/,lookbehind:!0},function:{pattern:/(\()[^()'\s]+(?=[()\s]|$)/,lookbehind:!0},punctuation:/[()']/}; \ No newline at end of file +Prism.languages.scheme={comment:/;.*/,string:{pattern:/"(?:[^"\\]|\\.)*"/,greedy:!0},symbol:{pattern:/'[^()#'\s]+/,greedy:!0},character:{pattern:/#\\(?:[ux][a-fA-F\d]+|[-a-zA-Z]+|\S)/,greedy:!0,alias:"string"},"lambda-parameter":[{pattern:/(\(lambda\s+)[^()'\s]+/,lookbehind:!0},{pattern:/(\(lambda\s+\()[^()']+/,lookbehind:!0}],keyword:{pattern:/(\()(?:define(?:-library|-macro|-syntax|-values)?|defmacro|(?:case-)?lambda|let(?:(?:\*|rec)?(?:-values)?|-syntax|rec-syntax)|else|if|cond|begin|delay(?:-force)?|parameterize|guard|set!|(?:quasi-)?quote|syntax-(?:case|rules))(?=[()\s]|$)/,lookbehind:!0},builtin:{pattern:/(\()(?:(?:cons|car|cdr|list|call-with-current-continuation|call\/cc|append|abs|apply|eval)\b|null\?|pair\?|boolean\?|eof-object\?|char\?|procedure\?|number\?|port\?|string\?|vector\?|symbol\?|bytevector\?)(?=[()\s]|$)/,lookbehind:!0},number:{pattern:/(^|[\s()])(?:(?:#d(?:#[ei])?|#[ei](?:#d)?)?[+-]?(?:(?:\d*\.?\d+(?:[eE][+-]?\d+)?|\d+\/\d+)(?:[+-](?:\d*\.?\d+(?:[eE][+-]?\d+)?|\d+\/\d+)i)?|(?:\d*\.?\d+(?:[eE][+-]?\d+)?|\d+\/\d+)i)|(?:#[box](?:#[ei])?|#[ei](?:#[box])?)[+-]?(?:[\da-fA-F]+(?:\/[\da-fA-F]+)?(?:[+-][\da-fA-F]+(?:\/[\da-fA-F]+)?i)?|[\da-fA-F]+(?:\/[\da-fA-F]+)?i))(?=[()\s]|$)/,lookbehind:!0},boolean:{pattern:/(^|[\s()])#[ft](?=[()\s]|$)/,lookbehind:!0},operator:{pattern:/(\()(?:[-+*%\/]|[<>]=?|=>?)(?=[()\s]|$)/,lookbehind:!0},function:{pattern:/(\()[^()'\s]+(?=[()\s]|$)/,lookbehind:!0},punctuation:/[()']/}; \ No newline at end of file diff --git a/tests/languages/scheme/number_feature.test b/tests/languages/scheme/number_feature.test index 15f1ca20a5..2b51f1b464 100644 --- a/tests/languages/scheme/number_feature.test +++ b/tests/languages/scheme/number_feature.test @@ -1,3 +1,5 @@ +123 + (foo 42 +42 -42) (foo 1e3 +1e3 -1e3) (foo 1e+3 1e-3 3.14159 3.14159e-1) @@ -16,6 +18,8 @@ ---------------------------------------------------- [ + ["number", "123"], + ["punctuation", "("], ["function", "foo"], ["number", "42"], From ddf3cc624fcee4c871c40b0563814272f15eda4c Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Sun, 7 Jun 2020 18:49:55 +0200 Subject: [PATCH 0550/1100] Autohotkey: Improved comments and other improvements (#2412) Original author: nnnik --- components/prism-autohotkey.js | 25 ++++++++++------ components/prism-autohotkey.min.js | 2 +- .../languages/autohotkey/comment_feature.test | 29 +++++++++++++++++-- .../autohotkey/function_feature.test | 9 +++++- 4 files changed, 52 insertions(+), 13 deletions(-) diff --git a/components/prism-autohotkey.js b/components/prism-autohotkey.js index 72ed8f2989..ea588fef32 100644 --- a/components/prism-autohotkey.js +++ b/components/prism-autohotkey.js @@ -1,16 +1,21 @@ // NOTES - follows first-first highlight method, block is locked after highlight, different from SyntaxHl -Prism.languages.autohotkey= { - 'comment': { - pattern: /(^[^";\n]*(?:"[^"\n]*?"[^"\n]*?)*)(?:;.*$|^\s*\/\*[\s\S]*\n\*\/)/m, - lookbehind: true - }, +Prism.languages.autohotkey = { + 'comment': [ + { + pattern: /(^|\s);.*/, + lookbehind: true + }, + { + pattern: /(^\s*)\/\*[^\r\n]*(?:[\r\n](?![ \t]*\*\/)|[^\r\n])*(?:[\r\n][ \t]*\*\/)?/m, + lookbehind: true, + greedy: true + } + ], 'string': /"(?:[^"\n\r]|"")*"/m, - 'function': /[^(); \t,\n+*\-=?>:\\\/<&%\[\]]+?(?=\()/m, //function - don't use .*\) in the end bcoz string locks it - 'tag': /^[ \t]*[^\s:]+?(?=:(?:[^:]|$))/m, //labels + 'tag': /^[ \t]*[^\s:]+?(?=:(?:[^:]|$))/m, //labels 'variable': /%\w+%/, 'number': /\b0x[\dA-Fa-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:[Ee]-?\d+)?/, 'operator': /\?|\/\/?=?|:=|\|[=|]?|&[=&]?|\+[=+]?|-[=-]?|\*[=*]?|<(?:<=?|>|=)?|>>?=?|[.^!=~]=?|\b(?:AND|NOT|OR)\b/, - 'punctuation': /[{}[\]():,]/, 'boolean': /\b(?:true|false)\b/, 'selector': /\b(?:AutoTrim|BlockInput|Break|Click|ClipWait|Continue|Control|ControlClick|ControlFocus|ControlGet|ControlGetFocus|ControlGetPos|ControlGetText|ControlMove|ControlSend|ControlSendRaw|ControlSetText|CoordMode|Critical|DetectHiddenText|DetectHiddenWindows|Drive|DriveGet|DriveSpaceFree|EnvAdd|EnvDiv|EnvGet|EnvMult|EnvSet|EnvSub|EnvUpdate|Exit|ExitApp|FileAppend|FileCopy|FileCopyDir|FileCreateDir|FileCreateShortcut|FileDelete|FileEncoding|FileGetAttrib|FileGetShortcut|FileGetSize|FileGetTime|FileGetVersion|FileInstall|FileMove|FileMoveDir|FileRead|FileReadLine|FileRecycle|FileRecycleEmpty|FileRemoveDir|FileSelectFile|FileSelectFolder|FileSetAttrib|FileSetTime|FormatTime|GetKeyState|Gosub|Goto|GroupActivate|GroupAdd|GroupClose|GroupDeactivate|Gui|GuiControl|GuiControlGet|Hotkey|ImageSearch|IniDelete|IniRead|IniWrite|Input|InputBox|KeyWait|ListHotkeys|ListLines|ListVars|Loop|Menu|MouseClick|MouseClickDrag|MouseGetPos|MouseMove|MsgBox|OnExit|OutputDebug|Pause|PixelGetColor|PixelSearch|PostMessage|Process|Progress|Random|RegDelete|RegRead|RegWrite|Reload|Repeat|Return|Run|RunAs|RunWait|Send|SendEvent|SendInput|SendMessage|SendMode|SendPlay|SendRaw|SetBatchLines|SetCapslockState|SetControlDelay|SetDefaultMouseSpeed|SetEnv|SetFormat|SetKeyDelay|SetMouseDelay|SetNumlockState|SetRegView|SetScrollLockState|SetStoreCapslockMode|SetTimer|SetTitleMatchMode|SetWinDelay|SetWorkingDir|Shutdown|Sleep|Sort|SoundBeep|SoundGet|SoundGetWaveVolume|SoundPlay|SoundSet|SoundSetWaveVolume|SplashImage|SplashTextOff|SplashTextOn|SplitPath|StatusBarGetText|StatusBarWait|StringCaseSense|StringGetPos|StringLeft|StringLen|StringLower|StringMid|StringReplace|StringRight|StringSplit|StringTrimLeft|StringTrimRight|StringUpper|Suspend|SysGet|Thread|ToolTip|Transform|TrayTip|URLDownloadToFile|WinActivate|WinActivateBottom|WinClose|WinGet|WinGetActiveStats|WinGetActiveTitle|WinGetClass|WinGetPos|WinGetText|WinGetTitle|WinHide|WinKill|WinMaximize|WinMenuSelectItem|WinMinimize|WinMinimizeAll|WinMinimizeAllUndo|WinMove|WinRestore|WinSet|WinSetTitle|WinShow|WinWait|WinWaitActive|WinWaitClose|WinWaitNotActive)\b/i, @@ -23,5 +28,7 @@ Prism.languages.autohotkey= { 'important': /#\b(?:AllowSameLineComments|ClipboardTimeout|CommentFlag|DerefChar|ErrorStdOut|EscapeChar|HotkeyInterval|HotkeyModifierTimeout|Hotstring|If|IfTimeout|IfWinActive|IfWinExist|IfWinNotActive|IfWinNotExist|Include|IncludeAgain|InputLevel|InstallKeybdHook|InstallMouseHook|KeyHistory|MaxHotkeysPerInterval|MaxMem|MaxThreads|MaxThreadsBuffer|MaxThreadsPerHotkey|MenuMaskKey|NoEnv|NoTrayIcon|Persistent|SingleInstance|UseHook|Warn|WinActivateForce)\b/i, - 'keyword': /\b(?:Abort|AboveNormal|Add|ahk_class|ahk_exe|ahk_group|ahk_id|ahk_pid|All|Alnum|Alpha|AltSubmit|AltTab|AltTabAndMenu|AltTabMenu|AltTabMenuDismiss|AlwaysOnTop|AutoSize|Background|BackgroundTrans|BelowNormal|between|BitAnd|BitNot|BitOr|BitShiftLeft|BitShiftRight|BitXOr|Bold|Border|Button|ByRef|Checkbox|Checked|CheckedGray|Choose|ChooseString|Close|Color|ComboBox|Contains|ControlList|Count|Date|DateTime|Days|DDL|Default|DeleteAll|Delimiter|Deref|Destroy|Digit|Disable|Disabled|DropDownList|Edit|Eject|Else|Enable|Enabled|Error|Exist|Expand|ExStyle|FileSystem|First|Flash|Float|FloatFast|Focus|Font|for|global|Grid|Group|GroupBox|GuiClose|GuiContextMenu|GuiDropFiles|GuiEscape|GuiSize|Hdr|Hidden|Hide|High|HKCC|HKCR|HKCU|HKEY_CLASSES_ROOT|HKEY_CURRENT_CONFIG|HKEY_CURRENT_USER|HKEY_LOCAL_MACHINE|HKEY_USERS|HKLM|HKU|Hours|HScroll|Icon|IconSmall|ID|IDLast|If|IfEqual|IfExist|IfGreater|IfGreaterOrEqual|IfInString|IfLess|IfLessOrEqual|IfMsgBox|IfNotEqual|IfNotExist|IfNotInString|IfWinActive|IfWinExist|IfWinNotActive|IfWinNotExist|Ignore|ImageList|in|Integer|IntegerFast|Interrupt|is|italic|Join|Label|LastFound|LastFoundExist|Limit|Lines|List|ListBox|ListView|local|Lock|Logoff|Low|Lower|Lowercase|MainWindow|Margin|Maximize|MaximizeBox|MaxSize|Minimize|MinimizeBox|MinMax|MinSize|Minutes|MonthCal|Mouse|Move|Multi|NA|No|NoActivate|NoDefault|NoHide|NoIcon|NoMainWindow|norm|Normal|NoSort|NoSortHdr|NoStandard|Not|NoTab|NoTimers|Number|Off|Ok|On|OwnDialogs|Owner|Parse|Password|Picture|Pixel|Pos|Pow|Priority|ProcessName|Radio|Range|Read|ReadOnly|Realtime|Redraw|REG_BINARY|REG_DWORD|REG_EXPAND_SZ|REG_MULTI_SZ|REG_SZ|Region|Relative|Rename|Report|Resize|Restore|Retry|RGB|Screen|Seconds|Section|Serial|SetLabel|ShiftAltTab|Show|Single|Slider|SortDesc|Standard|static|Status|StatusBar|StatusCD|strike|Style|Submit|SysMenu|Tab2|TabStop|Text|Theme|Tile|ToggleCheck|ToggleEnable|ToolWindow|Top|Topmost|TransColor|Transparent|Tray|TreeView|TryAgain|Throw|Try|Catch|Finally|Type|UnCheck|underline|Unicode|Unlock|Until|UpDown|Upper|Uppercase|UseErrorLevel|Vis|VisFirst|Visible|VScroll|Wait|WaitClose|WantCtrlA|WantF2|WantReturn|While|Wrap|Xdigit|xm|xp|xs|Yes|ym|yp|ys)\b/i + 'keyword': /\b(?:Abort|AboveNormal|Add|ahk_class|ahk_exe|ahk_group|ahk_id|ahk_pid|All|Alnum|Alpha|AltSubmit|AltTab|AltTabAndMenu|AltTabMenu|AltTabMenuDismiss|AlwaysOnTop|AutoSize|Background|BackgroundTrans|BelowNormal|between|BitAnd|BitNot|BitOr|BitShiftLeft|BitShiftRight|BitXOr|Bold|Border|Button|ByRef|Checkbox|Checked|CheckedGray|Choose|ChooseString|Close|Color|ComboBox|Contains|ControlList|Count|Date|DateTime|Days|DDL|Default|DeleteAll|Delimiter|Deref|Destroy|Digit|Disable|Disabled|DropDownList|Edit|Eject|Else|Enable|Enabled|Error|Exist|Expand|ExStyle|FileSystem|First|Flash|Float|FloatFast|Focus|Font|for|global|Grid|Group|GroupBox|GuiClose|GuiContextMenu|GuiDropFiles|GuiEscape|GuiSize|Hdr|Hidden|Hide|High|HKCC|HKCR|HKCU|HKEY_CLASSES_ROOT|HKEY_CURRENT_CONFIG|HKEY_CURRENT_USER|HKEY_LOCAL_MACHINE|HKEY_USERS|HKLM|HKU|Hours|HScroll|Icon|IconSmall|ID|IDLast|If|IfEqual|IfExist|IfGreater|IfGreaterOrEqual|IfInString|IfLess|IfLessOrEqual|IfMsgBox|IfNotEqual|IfNotExist|IfNotInString|IfWinActive|IfWinExist|IfWinNotActive|IfWinNotExist|Ignore|ImageList|in|Integer|IntegerFast|Interrupt|is|italic|Join|Label|LastFound|LastFoundExist|Limit|Lines|List|ListBox|ListView|local|Lock|Logoff|Low|Lower|Lowercase|MainWindow|Margin|Maximize|MaximizeBox|MaxSize|Minimize|MinimizeBox|MinMax|MinSize|Minutes|MonthCal|Mouse|Move|Multi|NA|No|NoActivate|NoDefault|NoHide|NoIcon|NoMainWindow|norm|Normal|NoSort|NoSortHdr|NoStandard|Not|NoTab|NoTimers|Number|Off|Ok|On|OwnDialogs|Owner|Parse|Password|Picture|Pixel|Pos|Pow|Priority|ProcessName|Radio|Range|Read|ReadOnly|Realtime|Redraw|REG_BINARY|REG_DWORD|REG_EXPAND_SZ|REG_MULTI_SZ|REG_SZ|Region|Relative|Rename|Report|Resize|Restore|Retry|RGB|Screen|Seconds|Section|Serial|SetLabel|ShiftAltTab|Show|Single|Slider|SortDesc|Standard|static|Status|StatusBar|StatusCD|strike|Style|Submit|SysMenu|Tab2|TabStop|Text|Theme|Tile|ToggleCheck|ToggleEnable|ToolWindow|Top|Topmost|TransColor|Transparent|Tray|TreeView|TryAgain|Throw|Try|Catch|Finally|Type|UnCheck|underline|Unicode|Unlock|Until|UpDown|Upper|Uppercase|UseErrorLevel|Vis|VisFirst|Visible|VScroll|Wait|WaitClose|WantCtrlA|WantF2|WantReturn|While|Wrap|Xdigit|xm|xp|xs|Yes|ym|yp|ys)\b/i, + 'function': /[^(); \t,\n+*\-=?>:\\\/<&%\[\]]+?(?=\()/m, + 'punctuation': /[{}[\]():,]/ }; diff --git a/components/prism-autohotkey.min.js b/components/prism-autohotkey.min.js index de5dfc12e3..bef70e46f3 100644 --- a/components/prism-autohotkey.min.js +++ b/components/prism-autohotkey.min.js @@ -1 +1 @@ -Prism.languages.autohotkey={comment:{pattern:/(^[^";\n]*(?:"[^"\n]*?"[^"\n]*?)*)(?:;.*$|^\s*\/\*[\s\S]*\n\*\/)/m,lookbehind:!0},string:/"(?:[^"\n\r]|"")*"/m,function:/[^(); \t,\n+*\-=?>:\\\/<&%\[\]]+?(?=\()/m,tag:/^[ \t]*[^\s:]+?(?=:(?:[^:]|$))/m,variable:/%\w+%/,number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/\?|\/\/?=?|:=|\|[=|]?|&[=&]?|\+[=+]?|-[=-]?|\*[=*]?|<(?:<=?|>|=)?|>>?=?|[.^!=~]=?|\b(?:AND|NOT|OR)\b/,punctuation:/[{}[\]():,]/,boolean:/\b(?:true|false)\b/,selector:/\b(?:AutoTrim|BlockInput|Break|Click|ClipWait|Continue|Control|ControlClick|ControlFocus|ControlGet|ControlGetFocus|ControlGetPos|ControlGetText|ControlMove|ControlSend|ControlSendRaw|ControlSetText|CoordMode|Critical|DetectHiddenText|DetectHiddenWindows|Drive|DriveGet|DriveSpaceFree|EnvAdd|EnvDiv|EnvGet|EnvMult|EnvSet|EnvSub|EnvUpdate|Exit|ExitApp|FileAppend|FileCopy|FileCopyDir|FileCreateDir|FileCreateShortcut|FileDelete|FileEncoding|FileGetAttrib|FileGetShortcut|FileGetSize|FileGetTime|FileGetVersion|FileInstall|FileMove|FileMoveDir|FileRead|FileReadLine|FileRecycle|FileRecycleEmpty|FileRemoveDir|FileSelectFile|FileSelectFolder|FileSetAttrib|FileSetTime|FormatTime|GetKeyState|Gosub|Goto|GroupActivate|GroupAdd|GroupClose|GroupDeactivate|Gui|GuiControl|GuiControlGet|Hotkey|ImageSearch|IniDelete|IniRead|IniWrite|Input|InputBox|KeyWait|ListHotkeys|ListLines|ListVars|Loop|Menu|MouseClick|MouseClickDrag|MouseGetPos|MouseMove|MsgBox|OnExit|OutputDebug|Pause|PixelGetColor|PixelSearch|PostMessage|Process|Progress|Random|RegDelete|RegRead|RegWrite|Reload|Repeat|Return|Run|RunAs|RunWait|Send|SendEvent|SendInput|SendMessage|SendMode|SendPlay|SendRaw|SetBatchLines|SetCapslockState|SetControlDelay|SetDefaultMouseSpeed|SetEnv|SetFormat|SetKeyDelay|SetMouseDelay|SetNumlockState|SetRegView|SetScrollLockState|SetStoreCapslockMode|SetTimer|SetTitleMatchMode|SetWinDelay|SetWorkingDir|Shutdown|Sleep|Sort|SoundBeep|SoundGet|SoundGetWaveVolume|SoundPlay|SoundSet|SoundSetWaveVolume|SplashImage|SplashTextOff|SplashTextOn|SplitPath|StatusBarGetText|StatusBarWait|StringCaseSense|StringGetPos|StringLeft|StringLen|StringLower|StringMid|StringReplace|StringRight|StringSplit|StringTrimLeft|StringTrimRight|StringUpper|Suspend|SysGet|Thread|ToolTip|Transform|TrayTip|URLDownloadToFile|WinActivate|WinActivateBottom|WinClose|WinGet|WinGetActiveStats|WinGetActiveTitle|WinGetClass|WinGetPos|WinGetText|WinGetTitle|WinHide|WinKill|WinMaximize|WinMenuSelectItem|WinMinimize|WinMinimizeAll|WinMinimizeAllUndo|WinMove|WinRestore|WinSet|WinSetTitle|WinShow|WinWait|WinWaitActive|WinWaitClose|WinWaitNotActive)\b/i,constant:/\b(?:a_ahkpath|a_ahkversion|a_appdata|a_appdatacommon|a_autotrim|a_batchlines|a_caretx|a_carety|a_computername|a_controldelay|a_cursor|a_dd|a_ddd|a_dddd|a_defaultmousespeed|a_desktop|a_desktopcommon|a_detecthiddentext|a_detecthiddenwindows|a_endchar|a_eventinfo|a_exitreason|a_fileencoding|a_formatfloat|a_formatinteger|a_gui|a_guievent|a_guicontrol|a_guicontrolevent|a_guiheight|a_guiwidth|a_guix|a_guiy|a_hour|a_iconfile|a_iconhidden|a_iconnumber|a_icontip|a_index|a_ipaddress1|a_ipaddress2|a_ipaddress3|a_ipaddress4|a_is64bitos|a_isadmin|a_iscompiled|a_iscritical|a_ispaused|a_issuspended|a_isunicode|a_keydelay|a_language|a_lasterror|a_linefile|a_linenumber|a_loopfield|a_loopfileattrib|a_loopfiledir|a_loopfileext|a_loopfilefullpath|a_loopfilelongpath|a_loopfilename|a_loopfileshortname|a_loopfileshortpath|a_loopfilesize|a_loopfilesizekb|a_loopfilesizemb|a_loopfiletimeaccessed|a_loopfiletimecreated|a_loopfiletimemodified|a_loopreadline|a_loopregkey|a_loopregname|a_loopregsubkey|a_loopregtimemodified|a_loopregtype|a_mday|a_min|a_mm|a_mmm|a_mmmm|a_mon|a_mousedelay|a_msec|a_mydocuments|a_now|a_nowutc|a_numbatchlines|a_ostype|a_osversion|a_priorhotkey|a_priorkey|programfiles|a_programfiles|a_programs|a_programscommon|a_ptrsize|a_regview|a_screendpi|a_screenheight|a_screenwidth|a_scriptdir|a_scriptfullpath|a_scripthwnd|a_scriptname|a_sec|a_space|a_startmenu|a_startmenucommon|a_startup|a_startupcommon|a_stringcasesense|a_tab|a_temp|a_thisfunc|a_thishotkey|a_thislabel|a_thismenu|a_thismenuitem|a_thismenuitempos|a_tickcount|a_timeidle|a_timeidlephysical|a_timesincepriorhotkey|a_timesincethishotkey|a_titlematchmode|a_titlematchmodespeed|a_username|a_wday|a_windelay|a_windir|a_workingdir|a_yday|a_year|a_yweek|a_yyyy|clipboard|clipboardall|comspec|errorlevel)\b/i,builtin:/\b(?:abs|acos|asc|asin|atan|ceil|chr|class|comobjactive|comobjarray|comobjconnect|comobjcreate|comobjerror|comobjflags|comobjget|comobjquery|comobjtype|comobjvalue|cos|dllcall|exp|fileexist|Fileopen|floor|il_add|il_create|il_destroy|instr|substr|isfunc|islabel|IsObject|ln|log|lv_add|lv_delete|lv_deletecol|lv_getcount|lv_getnext|lv_gettext|lv_insert|lv_insertcol|lv_modify|lv_modifycol|lv_setimagelist|ltrim|rtrim|mod|onmessage|numget|numput|registercallback|regexmatch|regexreplace|round|sin|tan|sqrt|strlen|strreplace|sb_seticon|sb_setparts|sb_settext|strsplit|tv_add|tv_delete|tv_getchild|tv_getcount|tv_getnext|tv_get|tv_getparent|tv_getprev|tv_getselection|tv_gettext|tv_modify|varsetcapacity|winactive|winexist|__New|__Call|__Get|__Set)\b/i,symbol:/\b(?:alt|altdown|altup|appskey|backspace|browser_back|browser_favorites|browser_forward|browser_home|browser_refresh|browser_search|browser_stop|bs|capslock|ctrl|ctrlbreak|ctrldown|ctrlup|del|delete|down|end|enter|esc|escape|f1|f10|f11|f12|f13|f14|f15|f16|f17|f18|f19|f2|f20|f21|f22|f23|f24|f3|f4|f5|f6|f7|f8|f9|home|ins|insert|joy1|joy10|joy11|joy12|joy13|joy14|joy15|joy16|joy17|joy18|joy19|joy2|joy20|joy21|joy22|joy23|joy24|joy25|joy26|joy27|joy28|joy29|joy3|joy30|joy31|joy32|joy4|joy5|joy6|joy7|joy8|joy9|joyaxes|joybuttons|joyinfo|joyname|joypov|joyr|joyu|joyv|joyx|joyy|joyz|lalt|launch_app1|launch_app2|launch_mail|launch_media|lbutton|lcontrol|lctrl|left|lshift|lwin|lwindown|lwinup|mbutton|media_next|media_play_pause|media_prev|media_stop|numlock|numpad0|numpad1|numpad2|numpad3|numpad4|numpad5|numpad6|numpad7|numpad8|numpad9|numpadadd|numpadclear|numpaddel|numpaddiv|numpaddot|numpaddown|numpadend|numpadenter|numpadhome|numpadins|numpadleft|numpadmult|numpadpgdn|numpadpgup|numpadright|numpadsub|numpadup|pgdn|pgup|printscreen|ralt|rbutton|rcontrol|rctrl|right|rshift|rwin|rwindown|rwinup|scrolllock|shift|shiftdown|shiftup|space|tab|up|volume_down|volume_mute|volume_up|wheeldown|wheelleft|wheelright|wheelup|xbutton1|xbutton2)\b/i,important:/#\b(?:AllowSameLineComments|ClipboardTimeout|CommentFlag|DerefChar|ErrorStdOut|EscapeChar|HotkeyInterval|HotkeyModifierTimeout|Hotstring|If|IfTimeout|IfWinActive|IfWinExist|IfWinNotActive|IfWinNotExist|Include|IncludeAgain|InputLevel|InstallKeybdHook|InstallMouseHook|KeyHistory|MaxHotkeysPerInterval|MaxMem|MaxThreads|MaxThreadsBuffer|MaxThreadsPerHotkey|MenuMaskKey|NoEnv|NoTrayIcon|Persistent|SingleInstance|UseHook|Warn|WinActivateForce)\b/i,keyword:/\b(?:Abort|AboveNormal|Add|ahk_class|ahk_exe|ahk_group|ahk_id|ahk_pid|All|Alnum|Alpha|AltSubmit|AltTab|AltTabAndMenu|AltTabMenu|AltTabMenuDismiss|AlwaysOnTop|AutoSize|Background|BackgroundTrans|BelowNormal|between|BitAnd|BitNot|BitOr|BitShiftLeft|BitShiftRight|BitXOr|Bold|Border|Button|ByRef|Checkbox|Checked|CheckedGray|Choose|ChooseString|Close|Color|ComboBox|Contains|ControlList|Count|Date|DateTime|Days|DDL|Default|DeleteAll|Delimiter|Deref|Destroy|Digit|Disable|Disabled|DropDownList|Edit|Eject|Else|Enable|Enabled|Error|Exist|Expand|ExStyle|FileSystem|First|Flash|Float|FloatFast|Focus|Font|for|global|Grid|Group|GroupBox|GuiClose|GuiContextMenu|GuiDropFiles|GuiEscape|GuiSize|Hdr|Hidden|Hide|High|HKCC|HKCR|HKCU|HKEY_CLASSES_ROOT|HKEY_CURRENT_CONFIG|HKEY_CURRENT_USER|HKEY_LOCAL_MACHINE|HKEY_USERS|HKLM|HKU|Hours|HScroll|Icon|IconSmall|ID|IDLast|If|IfEqual|IfExist|IfGreater|IfGreaterOrEqual|IfInString|IfLess|IfLessOrEqual|IfMsgBox|IfNotEqual|IfNotExist|IfNotInString|IfWinActive|IfWinExist|IfWinNotActive|IfWinNotExist|Ignore|ImageList|in|Integer|IntegerFast|Interrupt|is|italic|Join|Label|LastFound|LastFoundExist|Limit|Lines|List|ListBox|ListView|local|Lock|Logoff|Low|Lower|Lowercase|MainWindow|Margin|Maximize|MaximizeBox|MaxSize|Minimize|MinimizeBox|MinMax|MinSize|Minutes|MonthCal|Mouse|Move|Multi|NA|No|NoActivate|NoDefault|NoHide|NoIcon|NoMainWindow|norm|Normal|NoSort|NoSortHdr|NoStandard|Not|NoTab|NoTimers|Number|Off|Ok|On|OwnDialogs|Owner|Parse|Password|Picture|Pixel|Pos|Pow|Priority|ProcessName|Radio|Range|Read|ReadOnly|Realtime|Redraw|REG_BINARY|REG_DWORD|REG_EXPAND_SZ|REG_MULTI_SZ|REG_SZ|Region|Relative|Rename|Report|Resize|Restore|Retry|RGB|Screen|Seconds|Section|Serial|SetLabel|ShiftAltTab|Show|Single|Slider|SortDesc|Standard|static|Status|StatusBar|StatusCD|strike|Style|Submit|SysMenu|Tab2|TabStop|Text|Theme|Tile|ToggleCheck|ToggleEnable|ToolWindow|Top|Topmost|TransColor|Transparent|Tray|TreeView|TryAgain|Throw|Try|Catch|Finally|Type|UnCheck|underline|Unicode|Unlock|Until|UpDown|Upper|Uppercase|UseErrorLevel|Vis|VisFirst|Visible|VScroll|Wait|WaitClose|WantCtrlA|WantF2|WantReturn|While|Wrap|Xdigit|xm|xp|xs|Yes|ym|yp|ys)\b/i}; \ No newline at end of file +Prism.languages.autohotkey={comment:[{pattern:/(^|\s);.*/,lookbehind:!0},{pattern:/(^\s*)\/\*[^\r\n]*(?:[\r\n](?![ \t]*\*\/)|[^\r\n])*(?:[\r\n][ \t]*\*\/)?/m,lookbehind:!0,greedy:!0}],string:/"(?:[^"\n\r]|"")*"/m,tag:/^[ \t]*[^\s:]+?(?=:(?:[^:]|$))/m,variable:/%\w+%/,number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/\?|\/\/?=?|:=|\|[=|]?|&[=&]?|\+[=+]?|-[=-]?|\*[=*]?|<(?:<=?|>|=)?|>>?=?|[.^!=~]=?|\b(?:AND|NOT|OR)\b/,boolean:/\b(?:true|false)\b/,selector:/\b(?:AutoTrim|BlockInput|Break|Click|ClipWait|Continue|Control|ControlClick|ControlFocus|ControlGet|ControlGetFocus|ControlGetPos|ControlGetText|ControlMove|ControlSend|ControlSendRaw|ControlSetText|CoordMode|Critical|DetectHiddenText|DetectHiddenWindows|Drive|DriveGet|DriveSpaceFree|EnvAdd|EnvDiv|EnvGet|EnvMult|EnvSet|EnvSub|EnvUpdate|Exit|ExitApp|FileAppend|FileCopy|FileCopyDir|FileCreateDir|FileCreateShortcut|FileDelete|FileEncoding|FileGetAttrib|FileGetShortcut|FileGetSize|FileGetTime|FileGetVersion|FileInstall|FileMove|FileMoveDir|FileRead|FileReadLine|FileRecycle|FileRecycleEmpty|FileRemoveDir|FileSelectFile|FileSelectFolder|FileSetAttrib|FileSetTime|FormatTime|GetKeyState|Gosub|Goto|GroupActivate|GroupAdd|GroupClose|GroupDeactivate|Gui|GuiControl|GuiControlGet|Hotkey|ImageSearch|IniDelete|IniRead|IniWrite|Input|InputBox|KeyWait|ListHotkeys|ListLines|ListVars|Loop|Menu|MouseClick|MouseClickDrag|MouseGetPos|MouseMove|MsgBox|OnExit|OutputDebug|Pause|PixelGetColor|PixelSearch|PostMessage|Process|Progress|Random|RegDelete|RegRead|RegWrite|Reload|Repeat|Return|Run|RunAs|RunWait|Send|SendEvent|SendInput|SendMessage|SendMode|SendPlay|SendRaw|SetBatchLines|SetCapslockState|SetControlDelay|SetDefaultMouseSpeed|SetEnv|SetFormat|SetKeyDelay|SetMouseDelay|SetNumlockState|SetRegView|SetScrollLockState|SetStoreCapslockMode|SetTimer|SetTitleMatchMode|SetWinDelay|SetWorkingDir|Shutdown|Sleep|Sort|SoundBeep|SoundGet|SoundGetWaveVolume|SoundPlay|SoundSet|SoundSetWaveVolume|SplashImage|SplashTextOff|SplashTextOn|SplitPath|StatusBarGetText|StatusBarWait|StringCaseSense|StringGetPos|StringLeft|StringLen|StringLower|StringMid|StringReplace|StringRight|StringSplit|StringTrimLeft|StringTrimRight|StringUpper|Suspend|SysGet|Thread|ToolTip|Transform|TrayTip|URLDownloadToFile|WinActivate|WinActivateBottom|WinClose|WinGet|WinGetActiveStats|WinGetActiveTitle|WinGetClass|WinGetPos|WinGetText|WinGetTitle|WinHide|WinKill|WinMaximize|WinMenuSelectItem|WinMinimize|WinMinimizeAll|WinMinimizeAllUndo|WinMove|WinRestore|WinSet|WinSetTitle|WinShow|WinWait|WinWaitActive|WinWaitClose|WinWaitNotActive)\b/i,constant:/\b(?:a_ahkpath|a_ahkversion|a_appdata|a_appdatacommon|a_autotrim|a_batchlines|a_caretx|a_carety|a_computername|a_controldelay|a_cursor|a_dd|a_ddd|a_dddd|a_defaultmousespeed|a_desktop|a_desktopcommon|a_detecthiddentext|a_detecthiddenwindows|a_endchar|a_eventinfo|a_exitreason|a_fileencoding|a_formatfloat|a_formatinteger|a_gui|a_guievent|a_guicontrol|a_guicontrolevent|a_guiheight|a_guiwidth|a_guix|a_guiy|a_hour|a_iconfile|a_iconhidden|a_iconnumber|a_icontip|a_index|a_ipaddress1|a_ipaddress2|a_ipaddress3|a_ipaddress4|a_is64bitos|a_isadmin|a_iscompiled|a_iscritical|a_ispaused|a_issuspended|a_isunicode|a_keydelay|a_language|a_lasterror|a_linefile|a_linenumber|a_loopfield|a_loopfileattrib|a_loopfiledir|a_loopfileext|a_loopfilefullpath|a_loopfilelongpath|a_loopfilename|a_loopfileshortname|a_loopfileshortpath|a_loopfilesize|a_loopfilesizekb|a_loopfilesizemb|a_loopfiletimeaccessed|a_loopfiletimecreated|a_loopfiletimemodified|a_loopreadline|a_loopregkey|a_loopregname|a_loopregsubkey|a_loopregtimemodified|a_loopregtype|a_mday|a_min|a_mm|a_mmm|a_mmmm|a_mon|a_mousedelay|a_msec|a_mydocuments|a_now|a_nowutc|a_numbatchlines|a_ostype|a_osversion|a_priorhotkey|a_priorkey|programfiles|a_programfiles|a_programs|a_programscommon|a_ptrsize|a_regview|a_screendpi|a_screenheight|a_screenwidth|a_scriptdir|a_scriptfullpath|a_scripthwnd|a_scriptname|a_sec|a_space|a_startmenu|a_startmenucommon|a_startup|a_startupcommon|a_stringcasesense|a_tab|a_temp|a_thisfunc|a_thishotkey|a_thislabel|a_thismenu|a_thismenuitem|a_thismenuitempos|a_tickcount|a_timeidle|a_timeidlephysical|a_timesincepriorhotkey|a_timesincethishotkey|a_titlematchmode|a_titlematchmodespeed|a_username|a_wday|a_windelay|a_windir|a_workingdir|a_yday|a_year|a_yweek|a_yyyy|clipboard|clipboardall|comspec|errorlevel)\b/i,builtin:/\b(?:abs|acos|asc|asin|atan|ceil|chr|class|comobjactive|comobjarray|comobjconnect|comobjcreate|comobjerror|comobjflags|comobjget|comobjquery|comobjtype|comobjvalue|cos|dllcall|exp|fileexist|Fileopen|floor|il_add|il_create|il_destroy|instr|substr|isfunc|islabel|IsObject|ln|log|lv_add|lv_delete|lv_deletecol|lv_getcount|lv_getnext|lv_gettext|lv_insert|lv_insertcol|lv_modify|lv_modifycol|lv_setimagelist|ltrim|rtrim|mod|onmessage|numget|numput|registercallback|regexmatch|regexreplace|round|sin|tan|sqrt|strlen|strreplace|sb_seticon|sb_setparts|sb_settext|strsplit|tv_add|tv_delete|tv_getchild|tv_getcount|tv_getnext|tv_get|tv_getparent|tv_getprev|tv_getselection|tv_gettext|tv_modify|varsetcapacity|winactive|winexist|__New|__Call|__Get|__Set)\b/i,symbol:/\b(?:alt|altdown|altup|appskey|backspace|browser_back|browser_favorites|browser_forward|browser_home|browser_refresh|browser_search|browser_stop|bs|capslock|ctrl|ctrlbreak|ctrldown|ctrlup|del|delete|down|end|enter|esc|escape|f1|f10|f11|f12|f13|f14|f15|f16|f17|f18|f19|f2|f20|f21|f22|f23|f24|f3|f4|f5|f6|f7|f8|f9|home|ins|insert|joy1|joy10|joy11|joy12|joy13|joy14|joy15|joy16|joy17|joy18|joy19|joy2|joy20|joy21|joy22|joy23|joy24|joy25|joy26|joy27|joy28|joy29|joy3|joy30|joy31|joy32|joy4|joy5|joy6|joy7|joy8|joy9|joyaxes|joybuttons|joyinfo|joyname|joypov|joyr|joyu|joyv|joyx|joyy|joyz|lalt|launch_app1|launch_app2|launch_mail|launch_media|lbutton|lcontrol|lctrl|left|lshift|lwin|lwindown|lwinup|mbutton|media_next|media_play_pause|media_prev|media_stop|numlock|numpad0|numpad1|numpad2|numpad3|numpad4|numpad5|numpad6|numpad7|numpad8|numpad9|numpadadd|numpadclear|numpaddel|numpaddiv|numpaddot|numpaddown|numpadend|numpadenter|numpadhome|numpadins|numpadleft|numpadmult|numpadpgdn|numpadpgup|numpadright|numpadsub|numpadup|pgdn|pgup|printscreen|ralt|rbutton|rcontrol|rctrl|right|rshift|rwin|rwindown|rwinup|scrolllock|shift|shiftdown|shiftup|space|tab|up|volume_down|volume_mute|volume_up|wheeldown|wheelleft|wheelright|wheelup|xbutton1|xbutton2)\b/i,important:/#\b(?:AllowSameLineComments|ClipboardTimeout|CommentFlag|DerefChar|ErrorStdOut|EscapeChar|HotkeyInterval|HotkeyModifierTimeout|Hotstring|If|IfTimeout|IfWinActive|IfWinExist|IfWinNotActive|IfWinNotExist|Include|IncludeAgain|InputLevel|InstallKeybdHook|InstallMouseHook|KeyHistory|MaxHotkeysPerInterval|MaxMem|MaxThreads|MaxThreadsBuffer|MaxThreadsPerHotkey|MenuMaskKey|NoEnv|NoTrayIcon|Persistent|SingleInstance|UseHook|Warn|WinActivateForce)\b/i,keyword:/\b(?:Abort|AboveNormal|Add|ahk_class|ahk_exe|ahk_group|ahk_id|ahk_pid|All|Alnum|Alpha|AltSubmit|AltTab|AltTabAndMenu|AltTabMenu|AltTabMenuDismiss|AlwaysOnTop|AutoSize|Background|BackgroundTrans|BelowNormal|between|BitAnd|BitNot|BitOr|BitShiftLeft|BitShiftRight|BitXOr|Bold|Border|Button|ByRef|Checkbox|Checked|CheckedGray|Choose|ChooseString|Close|Color|ComboBox|Contains|ControlList|Count|Date|DateTime|Days|DDL|Default|DeleteAll|Delimiter|Deref|Destroy|Digit|Disable|Disabled|DropDownList|Edit|Eject|Else|Enable|Enabled|Error|Exist|Expand|ExStyle|FileSystem|First|Flash|Float|FloatFast|Focus|Font|for|global|Grid|Group|GroupBox|GuiClose|GuiContextMenu|GuiDropFiles|GuiEscape|GuiSize|Hdr|Hidden|Hide|High|HKCC|HKCR|HKCU|HKEY_CLASSES_ROOT|HKEY_CURRENT_CONFIG|HKEY_CURRENT_USER|HKEY_LOCAL_MACHINE|HKEY_USERS|HKLM|HKU|Hours|HScroll|Icon|IconSmall|ID|IDLast|If|IfEqual|IfExist|IfGreater|IfGreaterOrEqual|IfInString|IfLess|IfLessOrEqual|IfMsgBox|IfNotEqual|IfNotExist|IfNotInString|IfWinActive|IfWinExist|IfWinNotActive|IfWinNotExist|Ignore|ImageList|in|Integer|IntegerFast|Interrupt|is|italic|Join|Label|LastFound|LastFoundExist|Limit|Lines|List|ListBox|ListView|local|Lock|Logoff|Low|Lower|Lowercase|MainWindow|Margin|Maximize|MaximizeBox|MaxSize|Minimize|MinimizeBox|MinMax|MinSize|Minutes|MonthCal|Mouse|Move|Multi|NA|No|NoActivate|NoDefault|NoHide|NoIcon|NoMainWindow|norm|Normal|NoSort|NoSortHdr|NoStandard|Not|NoTab|NoTimers|Number|Off|Ok|On|OwnDialogs|Owner|Parse|Password|Picture|Pixel|Pos|Pow|Priority|ProcessName|Radio|Range|Read|ReadOnly|Realtime|Redraw|REG_BINARY|REG_DWORD|REG_EXPAND_SZ|REG_MULTI_SZ|REG_SZ|Region|Relative|Rename|Report|Resize|Restore|Retry|RGB|Screen|Seconds|Section|Serial|SetLabel|ShiftAltTab|Show|Single|Slider|SortDesc|Standard|static|Status|StatusBar|StatusCD|strike|Style|Submit|SysMenu|Tab2|TabStop|Text|Theme|Tile|ToggleCheck|ToggleEnable|ToolWindow|Top|Topmost|TransColor|Transparent|Tray|TreeView|TryAgain|Throw|Try|Catch|Finally|Type|UnCheck|underline|Unicode|Unlock|Until|UpDown|Upper|Uppercase|UseErrorLevel|Vis|VisFirst|Visible|VScroll|Wait|WaitClose|WantCtrlA|WantF2|WantReturn|While|Wrap|Xdigit|xm|xp|xs|Yes|ym|yp|ys)\b/i,function:/[^(); \t,\n+*\-=?>:\\\/<&%\[\]]+?(?=\()/m,punctuation:/[{}[\]():,]/}; \ No newline at end of file diff --git a/tests/languages/autohotkey/comment_feature.test b/tests/languages/autohotkey/comment_feature.test index 5b00ce20db..912bc895b2 100644 --- a/tests/languages/autohotkey/comment_feature.test +++ b/tests/languages/autohotkey/comment_feature.test @@ -1,13 +1,38 @@ ;foo ; bar +nota;comment + +; comments break strings +" ;" + +/* +0 +*/ +/*1*/ + */ +/* +1 ; +2 */ +foo + ---------------------------------------------------- [ ["comment", ";foo"], - ["comment", "; bar"] + ["comment", "; bar"], + + "\r\n\r\nnota;comment\r\n\r\n", + + ["comment", "; comments break strings"], + "\r\n\" ", + ["comment", ";\""], + + ["comment", "/*\r\n0\r\n*/"], + ["comment", "/*1*/\r\n\t */"], + ["comment", "/*\r\n1 ;\r\n2 */\r\nfoo"] ] ---------------------------------------------------- -Checks for comments. \ No newline at end of file +Checks for comments. diff --git a/tests/languages/autohotkey/function_feature.test b/tests/languages/autohotkey/function_feature.test index f38a186f69..2fe744d222 100644 --- a/tests/languages/autohotkey/function_feature.test +++ b/tests/languages/autohotkey/function_feature.test @@ -1,15 +1,22 @@ foo( foo_bar( +; not a function +if( + ---------------------------------------------------- [ ["function", "foo"], ["punctuation", "("], ["function", "foo_bar"], + ["punctuation", "("], + + ["comment", "; not a function"], + ["keyword", "if"], ["punctuation", "("] ] ---------------------------------------------------- -Checks for functions. \ No newline at end of file +Checks for functions. From 937e2691f97577c5d27f635c088e6733bc3179e8 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Sun, 7 Jun 2020 18:51:45 +0200 Subject: [PATCH 0551/1100] Default Theme: Added a comment that declares the background color of `operator` tokens as intentional (#2309) --- themes/prism.css | 1 + 1 file changed, 1 insertion(+) diff --git a/themes/prism.css b/themes/prism.css index 618a4121e1..5b8ed2d132 100644 --- a/themes/prism.css +++ b/themes/prism.css @@ -106,6 +106,7 @@ pre[class*="language-"] { .language-css .token.string, .style .token.string { color: #9a6e3a; + /* This background color was intended by the author of this theme. */ background: hsla(0, 0%, 100%, .5); } From 939a17c49a7aad74bef1d0aaf58752448ba1aa3c Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Sun, 7 Jun 2020 18:52:25 +0200 Subject: [PATCH 0552/1100] Protobuf: Added support for RPC (#2414) --- components/prism-protobuf.js | 23 ++++--- components/prism-protobuf.min.js | 2 +- tests/languages/protobuf/keyword_feature.test | 8 +++ tests/languages/protobuf/rpc_feature.test | 68 +++++++++++++++++++ 4 files changed, 92 insertions(+), 9 deletions(-) create mode 100644 tests/languages/protobuf/rpc_feature.test diff --git a/components/prism-protobuf.js b/components/prism-protobuf.js index 4e369f84e9..c74f9206c2 100644 --- a/components/prism-protobuf.js +++ b/components/prism-protobuf.js @@ -3,16 +3,23 @@ var builtinTypes = /\b(?:double|float|[su]?int(?:32|64)|s?fixed(?:32|64)|bool|string|bytes)\b/; Prism.languages.protobuf = Prism.languages.extend('clike', { - 'class-name': { - pattern: /(\b(?:enum|extend|message|service)\s+)[A-Za-z_]\w*(?=\s*\{)/, - lookbehind: true - }, - 'keyword': /\b(?:enum|extend|extensions|import|message|oneof|option|optional|package|public|repeated|required|reserved|service|syntax|to)\b/ + 'class-name': [ + { + pattern: /(\b(?:enum|extend|message|service)\s+)[A-Za-z_]\w*(?=\s*\{)/, + lookbehind: true + }, + { + pattern: /(\b(?:rpc\s+\w+|returns)\s*\(\s*(?:stream\s+)?)\.?[A-Za-z_]\w*(?:\.[A-Za-z_]\w*)*(?=\s*\))/, + lookbehind: true + } + ], + 'keyword': /\b(?:enum|extend|extensions|import|message|oneof|option|optional|package|public|repeated|required|reserved|returns|rpc(?=\s+\w)|service|stream|syntax|to)\b(?!\s*=\s*\d)/, + 'function': /[a-z_]\w*(?=\s*\()/i }); Prism.languages.insertBefore('protobuf', 'operator', { 'map': { - pattern: /\bmap<\s*[\w.]+\s*,\s*[\w.]+\s*>(?=\s+[A-Za-z_]\w*\s*[=;])/, + pattern: /\bmap<\s*[\w.]+\s*,\s*[\w.]+\s*>(?=\s+[a-z_]\w*\s*[=;])/i, alias: 'class-name', inside: { 'punctuation': /[<>.,]/, @@ -21,14 +28,14 @@ }, 'builtin': builtinTypes, 'positional-class-name': { - pattern: /(?:\b|\B\.)[A-Za-z_]\w*(?:\.[A-Za-z_]\w*)*(?=\s+[A-Za-z_]\w*\s*[=;])/, + pattern: /(?:\b|\B\.)[a-z_]\w*(?:\.[a-z_]\w*)*(?=\s+[a-z_]\w*\s*[=;])/i, alias: 'class-name', inside: { 'punctuation': /\./ } }, 'annotation': { - pattern: /(\[\s*)[A-Za-z_]\w*(?=\s*=)/, + pattern: /(\[\s*)[a-z_]\w*(?=\s*=)/i, lookbehind: true } }); diff --git a/components/prism-protobuf.min.js b/components/prism-protobuf.min.js index ffbdaee557..7fce235d4a 100644 --- a/components/prism-protobuf.min.js +++ b/components/prism-protobuf.min.js @@ -1 +1 @@ -!function(e){var a=/\b(?:double|float|[su]?int(?:32|64)|s?fixed(?:32|64)|bool|string|bytes)\b/;e.languages.protobuf=e.languages.extend("clike",{"class-name":{pattern:/(\b(?:enum|extend|message|service)\s+)[A-Za-z_]\w*(?=\s*\{)/,lookbehind:!0},keyword:/\b(?:enum|extend|extensions|import|message|oneof|option|optional|package|public|repeated|required|reserved|service|syntax|to)\b/}),e.languages.insertBefore("protobuf","operator",{map:{pattern:/\bmap<\s*[\w.]+\s*,\s*[\w.]+\s*>(?=\s+[A-Za-z_]\w*\s*[=;])/,alias:"class-name",inside:{punctuation:/[<>.,]/,builtin:a}},builtin:a,"positional-class-name":{pattern:/(?:\b|\B\.)[A-Za-z_]\w*(?:\.[A-Za-z_]\w*)*(?=\s+[A-Za-z_]\w*\s*[=;])/,alias:"class-name",inside:{punctuation:/\./}},annotation:{pattern:/(\[\s*)[A-Za-z_]\w*(?=\s*=)/,lookbehind:!0}})}(Prism); \ No newline at end of file +!function(e){var s=/\b(?:double|float|[su]?int(?:32|64)|s?fixed(?:32|64)|bool|string|bytes)\b/;e.languages.protobuf=e.languages.extend("clike",{"class-name":[{pattern:/(\b(?:enum|extend|message|service)\s+)[A-Za-z_]\w*(?=\s*\{)/,lookbehind:!0},{pattern:/(\b(?:rpc\s+\w+|returns)\s*\(\s*(?:stream\s+)?)\.?[A-Za-z_]\w*(?:\.[A-Za-z_]\w*)*(?=\s*\))/,lookbehind:!0}],keyword:/\b(?:enum|extend|extensions|import|message|oneof|option|optional|package|public|repeated|required|reserved|returns|rpc(?=\s+\w)|service|stream|syntax|to)\b(?!\s*=\s*\d)/,function:/[a-z_]\w*(?=\s*\()/i}),e.languages.insertBefore("protobuf","operator",{map:{pattern:/\bmap<\s*[\w.]+\s*,\s*[\w.]+\s*>(?=\s+[a-z_]\w*\s*[=;])/i,alias:"class-name",inside:{punctuation:/[<>.,]/,builtin:s}},builtin:s,"positional-class-name":{pattern:/(?:\b|\B\.)[a-z_]\w*(?:\.[a-z_]\w*)*(?=\s+[a-z_]\w*\s*[=;])/i,alias:"class-name",inside:{punctuation:/\./}},annotation:{pattern:/(\[\s*)[a-z_]\w*(?=\s*=)/i,lookbehind:!0}})}(Prism); \ No newline at end of file diff --git a/tests/languages/protobuf/keyword_feature.test b/tests/languages/protobuf/keyword_feature.test index 1272833b68..a5ae3f0a3c 100644 --- a/tests/languages/protobuf/keyword_feature.test +++ b/tests/languages/protobuf/keyword_feature.test @@ -11,7 +11,10 @@ public repeated required reserved +returns +rpc LotsOfReplies( service +stream syntax to @@ -31,7 +34,12 @@ to ["keyword", "repeated"], ["keyword", "required"], ["keyword", "reserved"], + ["keyword", "returns"], + ["keyword", "rpc"], + ["function", "LotsOfReplies"], + ["punctuation", "("], ["keyword", "service"], + ["keyword", "stream"], ["keyword", "syntax"], ["keyword", "to"] ] diff --git a/tests/languages/protobuf/rpc_feature.test b/tests/languages/protobuf/rpc_feature.test new file mode 100644 index 0000000000..a88028353b --- /dev/null +++ b/tests/languages/protobuf/rpc_feature.test @@ -0,0 +1,68 @@ +rpc LotsOfReplies(HelloRequest) returns (stream HelloResponse); +rpc BidiHello(stream HelloRequest) returns (stream HelloResponse); +rpc CancelOperation(CancelOperationRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { post: "/v1/{name=operations/**}:cancel" body: "*" }; +} + +---------------------------------------------------- + +[ + ["keyword", "rpc"], + ["function", "LotsOfReplies"], + ["punctuation", "("], + ["class-name", "HelloRequest"], + ["punctuation", ")"], + ["keyword", "returns"], + ["punctuation", "("], + ["keyword", "stream"], + ["class-name", "HelloResponse"], + ["punctuation", ")"], + ["punctuation", ";"], + + ["keyword", "rpc"], + ["function", "BidiHello"], + ["punctuation", "("], + ["keyword", "stream"], + ["class-name", "HelloRequest"], + ["punctuation", ")"], + ["keyword", "returns"], + ["punctuation", "("], + ["keyword", "stream"], + ["class-name", "HelloResponse"], + ["punctuation", ")"], + ["punctuation", ";"], + + ["keyword", "rpc"], + ["function", "CancelOperation"], + ["punctuation", "("], + ["class-name", "CancelOperationRequest"], + ["punctuation", ")"], + ["keyword", "returns"], + ["punctuation", "("], + ["class-name", "google.protobuf.Empty"], + ["punctuation", ")"], + ["punctuation", "{"], + ["keyword", "option"], + ["punctuation", "("], + "google", + ["punctuation", "."], + "api", + ["punctuation", "."], + "http", + ["punctuation", ")"], + ["operator", "="], + ["punctuation", "{"], + " post", + ["punctuation", ":"], + ["string", "\"/v1/{name=operations/**}:cancel\""], + " body", + ["punctuation", ":"], + ["string", "\"*\""], + ["punctuation", "}"], + ["punctuation", ";"], + ["punctuation", "}"] +] + +---------------------------------------------------- + +Check for RPC definitions. From 2a2e79ed5d32af6f0d0d90ea7aad002665051083 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Sun, 7 Jun 2020 18:54:31 +0200 Subject: [PATCH 0553/1100] C#: Fixed adjacent string interpolations (#2402) --- components/prism-csharp.js | 2 +- components/prism-csharp.min.js | 2 +- .../csharp/interpolation-string_feature.test | 26 +++++++++++++++++++ 3 files changed, 28 insertions(+), 2 deletions(-) diff --git a/components/prism-csharp.js b/components/prism-csharp.js index a03c7dbe86..240122649f 100644 --- a/components/prism-csharp.js +++ b/components/prism-csharp.js @@ -316,7 +316,7 @@ function createInterpolationInside(interpolation, interpolationRound) { return { 'interpolation': { - pattern: re(/([^{](?:\{\{)*)<<0>>/.source, [interpolation]), + pattern: re(/((?:^|[^{])(?:\{\{)*)<<0>>/.source, [interpolation]), lookbehind: true, inside: { 'format-string': { diff --git a/components/prism-csharp.min.js b/components/prism-csharp.min.js index e5eeb3f717..51da949829 100644 --- a/components/prism-csharp.min.js +++ b/components/prism-csharp.min.js @@ -1 +1 @@ -!function(s){function a(e,s){return e.replace(/<<(\d+)>>/g,function(e,n){return"(?:"+s[+n]+")"})}function t(e,n,s){return RegExp(a(e,n),s||"")}function e(e,n){for(var s=0;s>/g,function(){return"(?:"+e+")"});return e.replace(/<>/g,"[^\\s\\S]")}var n="bool byte char decimal double dynamic float int long object sbyte short string uint ulong ushort var void",i="class enum interface struct",r="add alias ascending async await by descending from get global group into join let nameof notnull on orderby partial remove select set unmanaged value when where where",o="abstract as base break case catch checked const continue default delegate do else event explicit extern finally fixed for foreach goto if implicit in internal is lock namespace new null operator out override params private protected public readonly ref return sealed sizeof stackalloc static switch this throw try typeof unchecked unsafe using virtual volatile while yield";function l(e){return"\\b(?:"+e.trim().replace(/ /g,"|")+")\\b"}var d=l(i),p=RegExp(l(n+" "+i+" "+r+" "+o)),c=l(i+" "+r+" "+o),u=l(n+" "+i+" "+o),g=e("<(?:[^<>;=+\\-*/%&|^]|<>)*>",2),b=e("\\((?:[^()]|<>)*\\)",2),h="@?\\b[A-Za-z_]\\w*\\b",f=a("<<0>>(?:\\s*<<1>>)?",[h,g]),m=a("(?!<<0>>)<<1>>(?:\\s*\\.\\s*<<1>>)*",[c,f]),k="\\[\\s*(?:,\\s*)*\\]",y=a("(?:<<0>>|<<1>>)(?:\\s*(?:\\?\\s*)?<<2>>)*(?:\\s*\\?)?",[a("\\(<<0>>+(?:,<<0>>+)+\\)",[a("[^,()<>[\\];=+\\-*/%&|^]|<<0>>|<<1>>|<<2>>",[g,b,k])]),m,k]),w={keyword:p,punctuation:/[<>()?,.:[\]]/},v="'(?:[^\r\n'\\\\]|\\\\.|\\\\[Uux][\\da-fA-F]{1,8})'",x='"(?:\\\\.|[^\\\\"\r\n])*"';s.languages.csharp=s.languages.extend("clike",{string:[{pattern:t("(^|[^$\\\\])<<0>>",['@"(?:""|\\\\[^]|[^\\\\"])*"(?!")']),lookbehind:!0,greedy:!0},{pattern:t("(^|[^@$\\\\])<<0>>",[x]),lookbehind:!0,greedy:!0},{pattern:RegExp(v),greedy:!0,alias:"character"}],"class-name":[{pattern:t("(\\busing\\s+static\\s+)<<0>>(?=\\s*;)",[m]),lookbehind:!0,inside:w},{pattern:t("(\\busing\\s+<<0>>\\s*=\\s*)<<1>>(?=\\s*;)",[h,y]),lookbehind:!0,inside:w},{pattern:t("(\\busing\\s+)<<0>>(?=\\s*=)",[h]),lookbehind:!0},{pattern:t("(\\b<<0>>\\s+)<<1>>",[d,f]),lookbehind:!0,inside:w},{pattern:t("(\\bcatch\\s*\\(\\s*)<<0>>",[m]),lookbehind:!0,inside:w},{pattern:t("(\\bwhere\\s+)<<0>>",[h]),lookbehind:!0},{pattern:t("(\\b(?:is|as)\\s+)<<0>>",[y]),lookbehind:!0,inside:w},{pattern:t("\\b<<0>>(?=\\s+(?!<<1>>)<<2>>(?:\\s*[=,;:{)\\]]|\\s+in))",[y,u,h]),inside:w}],keyword:p,number:/(?:\b0(?:x[\da-f_]*[\da-f]|b[01_]*[01])|(?:\B\.\d+(?:_+\d+)*|\b\d+(?:_+\d+)*(?:\.\d+(?:_+\d+)*)?)(?:e[-+]?\d+(?:_+\d+)*)?)(?:ul|lu|[dflmu])?\b/i,operator:/>>=?|<<=?|[-=]>|([-+&|])\1|~|\?\?=?|[-+*/%&|^!=<>]=?/,punctuation:/\?\.?|::|[{}[\];(),.:]/}),s.languages.insertBefore("csharp","number",{range:{pattern:/\.\./,alias:"operator"}}),s.languages.insertBefore("csharp","punctuation",{"named-parameter":{pattern:t("([(,]\\s*)<<0>>(?=\\s*:)",[h]),lookbehind:!0,alias:"punctuation"}}),s.languages.insertBefore("csharp","class-name",{namespace:{pattern:t("(\\b(?:namespace|using)\\s+)<<0>>(?:\\s*\\.\\s*<<0>>)*(?=\\s*[;{])",[h]),lookbehind:!0,inside:{punctuation:/\./}},"type-expression":{pattern:t("(\\b(?:default|typeof|sizeof)\\s*\\(\\s*)(?:[^()\\s]|\\s(?!\\s*\\))|<<0>>)*(?=\\s*\\))",[b]),lookbehind:!0,alias:"class-name",inside:w},"return-type":{pattern:t("<<0>>(?=\\s+(?:<<1>>\\s*(?:=>|[({]|\\.\\s*this\\s*\\[)|this\\s*\\[))",[y,m]),inside:w,alias:"class-name"},"constructor-invocation":{pattern:t("(\\bnew\\s+)<<0>>(?=\\s*[[({])",[y]),lookbehind:!0,inside:w,alias:"class-name"},"generic-method":{pattern:t("<<0>>\\s*<<1>>(?=\\s*\\()",[h,g]),inside:{function:t("^<<0>>",[h]),generic:{pattern:RegExp(g),alias:"class-name",inside:w}}},"type-list":{pattern:t("\\b((?:<<0>>\\s+<<1>>|where\\s+<<2>>)\\s*:\\s*)(?:<<3>>|<<4>>)(?:\\s*,\\s*(?:<<3>>|<<4>>))*(?=\\s*(?:where|[{;]|=>|$))",[d,f,h,y,p.source]),lookbehind:!0,inside:{keyword:p,"class-name":{pattern:RegExp(y),greedy:!0,inside:w},punctuation:/,/}},preprocessor:{pattern:/(^\s*)#.*/m,lookbehind:!0,alias:"property",inside:{directive:{pattern:/(\s*#)\b(?:define|elif|else|endif|endregion|error|if|line|pragma|region|undef|warning)\b/,lookbehind:!0,alias:"keyword"}}}});var $=x+"|"+v,_=a("/(?![*/])|//[^\r\n]*[\r\n]|/\\*(?:[^*]|\\*(?!/))*\\*/|<<0>>",[$]),B=e(a("[^\"'/()]|<<0>>|\\(<>*\\)",[_]),2),E="\\b(?:assembly|event|field|method|module|param|property|return|type)\\b",R=a("<<0>>(?:\\s*\\(<<1>>*\\))?",[m,B]);s.languages.insertBefore("csharp","class-name",{attribute:{pattern:t("((?:^|[^\\s\\w>)?])\\s*\\[\\s*)(?:<<0>>\\s*:\\s*)?<<1>>(?:\\s*,\\s*<<1>>)*(?=\\s*\\])",[E,R]),lookbehind:!0,greedy:!0,inside:{target:{pattern:t("^<<0>>(?=\\s*:)",[E]),alias:"keyword"},"attribute-arguments":{pattern:t("\\(<<0>>*\\)",[B]),inside:s.languages.csharp},"class-name":{pattern:RegExp(m),inside:{punctuation:/\./}},punctuation:/[:,]/}}});var P=":[^}\r\n]+",z=e(a("[^\"'/()]|<<0>>|\\(<>*\\)",[_]),2),S=a("\\{(?!\\{)(?:(?![}:])<<0>>)*<<1>>?\\}",[z,P]),j=e(a("[^\"'/()]|/(?!\\*)|/\\*(?:[^*]|\\*(?!/))*\\*/|<<0>>|\\(<>*\\)",[$]),2),A=a("\\{(?!\\{)(?:(?![}:])<<0>>)*<<1>>?\\}",[j,P]);function F(e,n){return{interpolation:{pattern:t("([^{](?:\\{\\{)*)<<0>>",[e]),lookbehind:!0,inside:{"format-string":{pattern:t("(^\\{(?:(?![}:])<<0>>)*)<<1>>(?=\\}$)",[n,P]),lookbehind:!0,inside:{punctuation:/^:/}},punctuation:/^\{|\}$/,expression:{pattern:/[\s\S]+/,alias:"language-csharp",inside:s.languages.csharp}}},string:/[\s\S]+/}}s.languages.insertBefore("csharp","string",{"interpolation-string":[{pattern:t('(^|[^\\\\])(?:\\$@|@\\$)"(?:""|\\\\[^]|\\{\\{|<<0>>|[^\\\\{"])*"',[S]),lookbehind:!0,greedy:!0,inside:F(S,z)},{pattern:t('(^|[^@\\\\])\\$"(?:\\\\.|\\{\\{|<<0>>|[^\\\\"{])*"',[A]),lookbehind:!0,greedy:!0,inside:F(A,j)}]})}(Prism),Prism.languages.dotnet=Prism.languages.cs=Prism.languages.csharp; \ No newline at end of file +!function(s){function a(e,s){return e.replace(/<<(\d+)>>/g,function(e,n){return"(?:"+s[+n]+")"})}function t(e,n,s){return RegExp(a(e,n),s||"")}function e(e,n){for(var s=0;s>/g,function(){return"(?:"+e+")"});return e.replace(/<>/g,"[^\\s\\S]")}var n="bool byte char decimal double dynamic float int long object sbyte short string uint ulong ushort var void",i="class enum interface struct",r="add alias ascending async await by descending from get global group into join let nameof notnull on orderby partial remove select set unmanaged value when where where",o="abstract as base break case catch checked const continue default delegate do else event explicit extern finally fixed for foreach goto if implicit in internal is lock namespace new null operator out override params private protected public readonly ref return sealed sizeof stackalloc static switch this throw try typeof unchecked unsafe using virtual volatile while yield";function l(e){return"\\b(?:"+e.trim().replace(/ /g,"|")+")\\b"}var d=l(i),p=RegExp(l(n+" "+i+" "+r+" "+o)),c=l(i+" "+r+" "+o),u=l(n+" "+i+" "+o),g=e("<(?:[^<>;=+\\-*/%&|^]|<>)*>",2),b=e("\\((?:[^()]|<>)*\\)",2),h="@?\\b[A-Za-z_]\\w*\\b",f=a("<<0>>(?:\\s*<<1>>)?",[h,g]),m=a("(?!<<0>>)<<1>>(?:\\s*\\.\\s*<<1>>)*",[c,f]),k="\\[\\s*(?:,\\s*)*\\]",y=a("(?:<<0>>|<<1>>)(?:\\s*(?:\\?\\s*)?<<2>>)*(?:\\s*\\?)?",[a("\\(<<0>>+(?:,<<0>>+)+\\)",[a("[^,()<>[\\];=+\\-*/%&|^]|<<0>>|<<1>>|<<2>>",[g,b,k])]),m,k]),w={keyword:p,punctuation:/[<>()?,.:[\]]/},v="'(?:[^\r\n'\\\\]|\\\\.|\\\\[Uux][\\da-fA-F]{1,8})'",x='"(?:\\\\.|[^\\\\"\r\n])*"';s.languages.csharp=s.languages.extend("clike",{string:[{pattern:t("(^|[^$\\\\])<<0>>",['@"(?:""|\\\\[^]|[^\\\\"])*"(?!")']),lookbehind:!0,greedy:!0},{pattern:t("(^|[^@$\\\\])<<0>>",[x]),lookbehind:!0,greedy:!0},{pattern:RegExp(v),greedy:!0,alias:"character"}],"class-name":[{pattern:t("(\\busing\\s+static\\s+)<<0>>(?=\\s*;)",[m]),lookbehind:!0,inside:w},{pattern:t("(\\busing\\s+<<0>>\\s*=\\s*)<<1>>(?=\\s*;)",[h,y]),lookbehind:!0,inside:w},{pattern:t("(\\busing\\s+)<<0>>(?=\\s*=)",[h]),lookbehind:!0},{pattern:t("(\\b<<0>>\\s+)<<1>>",[d,f]),lookbehind:!0,inside:w},{pattern:t("(\\bcatch\\s*\\(\\s*)<<0>>",[m]),lookbehind:!0,inside:w},{pattern:t("(\\bwhere\\s+)<<0>>",[h]),lookbehind:!0},{pattern:t("(\\b(?:is|as)\\s+)<<0>>",[y]),lookbehind:!0,inside:w},{pattern:t("\\b<<0>>(?=\\s+(?!<<1>>)<<2>>(?:\\s*[=,;:{)\\]]|\\s+in))",[y,u,h]),inside:w}],keyword:p,number:/(?:\b0(?:x[\da-f_]*[\da-f]|b[01_]*[01])|(?:\B\.\d+(?:_+\d+)*|\b\d+(?:_+\d+)*(?:\.\d+(?:_+\d+)*)?)(?:e[-+]?\d+(?:_+\d+)*)?)(?:ul|lu|[dflmu])?\b/i,operator:/>>=?|<<=?|[-=]>|([-+&|])\1|~|\?\?=?|[-+*/%&|^!=<>]=?/,punctuation:/\?\.?|::|[{}[\];(),.:]/}),s.languages.insertBefore("csharp","number",{range:{pattern:/\.\./,alias:"operator"}}),s.languages.insertBefore("csharp","punctuation",{"named-parameter":{pattern:t("([(,]\\s*)<<0>>(?=\\s*:)",[h]),lookbehind:!0,alias:"punctuation"}}),s.languages.insertBefore("csharp","class-name",{namespace:{pattern:t("(\\b(?:namespace|using)\\s+)<<0>>(?:\\s*\\.\\s*<<0>>)*(?=\\s*[;{])",[h]),lookbehind:!0,inside:{punctuation:/\./}},"type-expression":{pattern:t("(\\b(?:default|typeof|sizeof)\\s*\\(\\s*)(?:[^()\\s]|\\s(?!\\s*\\))|<<0>>)*(?=\\s*\\))",[b]),lookbehind:!0,alias:"class-name",inside:w},"return-type":{pattern:t("<<0>>(?=\\s+(?:<<1>>\\s*(?:=>|[({]|\\.\\s*this\\s*\\[)|this\\s*\\[))",[y,m]),inside:w,alias:"class-name"},"constructor-invocation":{pattern:t("(\\bnew\\s+)<<0>>(?=\\s*[[({])",[y]),lookbehind:!0,inside:w,alias:"class-name"},"generic-method":{pattern:t("<<0>>\\s*<<1>>(?=\\s*\\()",[h,g]),inside:{function:t("^<<0>>",[h]),generic:{pattern:RegExp(g),alias:"class-name",inside:w}}},"type-list":{pattern:t("\\b((?:<<0>>\\s+<<1>>|where\\s+<<2>>)\\s*:\\s*)(?:<<3>>|<<4>>)(?:\\s*,\\s*(?:<<3>>|<<4>>))*(?=\\s*(?:where|[{;]|=>|$))",[d,f,h,y,p.source]),lookbehind:!0,inside:{keyword:p,"class-name":{pattern:RegExp(y),greedy:!0,inside:w},punctuation:/,/}},preprocessor:{pattern:/(^\s*)#.*/m,lookbehind:!0,alias:"property",inside:{directive:{pattern:/(\s*#)\b(?:define|elif|else|endif|endregion|error|if|line|pragma|region|undef|warning)\b/,lookbehind:!0,alias:"keyword"}}}});var $=x+"|"+v,_=a("/(?![*/])|//[^\r\n]*[\r\n]|/\\*(?:[^*]|\\*(?!/))*\\*/|<<0>>",[$]),B=e(a("[^\"'/()]|<<0>>|\\(<>*\\)",[_]),2),E="\\b(?:assembly|event|field|method|module|param|property|return|type)\\b",R=a("<<0>>(?:\\s*\\(<<1>>*\\))?",[m,B]);s.languages.insertBefore("csharp","class-name",{attribute:{pattern:t("((?:^|[^\\s\\w>)?])\\s*\\[\\s*)(?:<<0>>\\s*:\\s*)?<<1>>(?:\\s*,\\s*<<1>>)*(?=\\s*\\])",[E,R]),lookbehind:!0,greedy:!0,inside:{target:{pattern:t("^<<0>>(?=\\s*:)",[E]),alias:"keyword"},"attribute-arguments":{pattern:t("\\(<<0>>*\\)",[B]),inside:s.languages.csharp},"class-name":{pattern:RegExp(m),inside:{punctuation:/\./}},punctuation:/[:,]/}}});var P=":[^}\r\n]+",z=e(a("[^\"'/()]|<<0>>|\\(<>*\\)",[_]),2),S=a("\\{(?!\\{)(?:(?![}:])<<0>>)*<<1>>?\\}",[z,P]),j=e(a("[^\"'/()]|/(?!\\*)|/\\*(?:[^*]|\\*(?!/))*\\*/|<<0>>|\\(<>*\\)",[$]),2),A=a("\\{(?!\\{)(?:(?![}:])<<0>>)*<<1>>?\\}",[j,P]);function F(e,n){return{interpolation:{pattern:t("((?:^|[^{])(?:\\{\\{)*)<<0>>",[e]),lookbehind:!0,inside:{"format-string":{pattern:t("(^\\{(?:(?![}:])<<0>>)*)<<1>>(?=\\}$)",[n,P]),lookbehind:!0,inside:{punctuation:/^:/}},punctuation:/^\{|\}$/,expression:{pattern:/[\s\S]+/,alias:"language-csharp",inside:s.languages.csharp}}},string:/[\s\S]+/}}s.languages.insertBefore("csharp","string",{"interpolation-string":[{pattern:t('(^|[^\\\\])(?:\\$@|@\\$)"(?:""|\\\\[^]|\\{\\{|<<0>>|[^\\\\{"])*"',[S]),lookbehind:!0,greedy:!0,inside:F(S,z)},{pattern:t('(^|[^@\\\\])\\$"(?:\\\\.|\\{\\{|<<0>>|[^\\\\"{])*"',[A]),lookbehind:!0,greedy:!0,inside:F(A,j)}]})}(Prism),Prism.languages.dotnet=Prism.languages.cs=Prism.languages.csharp; \ No newline at end of file diff --git a/tests/languages/csharp/interpolation-string_feature.test b/tests/languages/csharp/interpolation-string_feature.test index 9e3cdd2170..d5c2142721 100644 --- a/tests/languages/csharp/interpolation-string_feature.test +++ b/tests/languages/csharp/interpolation-string_feature.test @@ -1,5 +1,6 @@ $"Hello, {{ {name} }}! Today is {date.DayOfWeek}, it's {date:HH:mm} now." $"{a,5} and {b + "" /* foo ":} */:format} {h(a, b)}" +$"{1}{2}{3}" @$" " @@ -87,6 +88,31 @@ $@"{ ]], ["string", "\""] ]], + ["interpolation-string", [ + ["string", "$\""], + ["interpolation", [ + ["punctuation", "{"], + ["expression", [ + ["number", "1"] + ]], + ["punctuation", "}"] + ]], + ["interpolation", [ + ["punctuation", "{"], + ["expression", [ + ["number", "2"] + ]], + ["punctuation", "}"] + ]], + ["interpolation", [ + ["punctuation", "{"], + ["expression", [ + ["number", "3"] + ]], + ["punctuation", "}"] + ]], + ["string", "\""] + ]], ["interpolation-string", [ ["string", "@$\"\n\""] ]], From 7f341fc15726f3cdb12abbb38c80d4d6467e2ec4 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Fri, 12 Jun 2020 12:52:31 +0200 Subject: [PATCH 0554/1100] C#: Improved pattern matching (#2411) --- components/prism-csharp.js | 7 +- components/prism-csharp.min.js | 2 +- ...ass-name-variables-parameters_feature.test | 86 +++ tests/languages/csharp/keyword_feature.test | 6 + tests/languages/csharp/switch_feature.test | 582 ++++++++++++++++++ 5 files changed, 679 insertions(+), 4 deletions(-) create mode 100644 tests/languages/csharp/switch_feature.test diff --git a/components/prism-csharp.js b/components/prism-csharp.js index 240122649f..d4bf8c7eb3 100644 --- a/components/prism-csharp.js +++ b/components/prism-csharp.js @@ -47,7 +47,7 @@ typeDeclaration: 'class enum interface struct', // contextual keywords // ("var" and "dynamic" are missing because they are used like types) - contextual: 'add alias ascending async await by descending from get global group into join let nameof notnull on orderby partial remove select set unmanaged value when where where', + contextual: 'add alias and ascending async await by descending from get global group into join let nameof not notnull on or orderby partial remove select set unmanaged value when where where', // all other keywords other: 'abstract as base break case catch checked const continue default delegate do else event explicit extern finally fixed for foreach goto if implicit in internal is lock namespace new null operator out override params private protected public readonly ref return sealed sizeof stackalloc static switch this throw try typeof unchecked unsafe using virtual volatile while yield' }; @@ -68,6 +68,7 @@ var genericName = replace(/<<0>>(?:\s*<<1>>)?/.source, [name, generic]); var identifier = replace(/(?!<<0>>)<<1>>(?:\s*\.\s*<<1>>)*/.source, [nonTypeKeywords, genericName]); var array = /\[\s*(?:,\s*)*\]/.source; + var typeExpressionWithoutTuple = replace(/<<0>>(?:\s*(?:\?\s*)?<<1>>)*(?:\s*\?)?/.source, [identifier, array]); var tupleElement = replace(/[^,()<>[\];=+\-*/%&|^]|<<0>>|<<1>>|<<2>>/.source, [generic, nestedRound, array]) var tuple = replace(/\(<<0>>+(?:,<<0>>+)+\)/.source, [tupleElement]); var typeExpression = replace(/(?:<<0>>|<<1>>)(?:\s*(?:\?\s*)?<<2>>)*(?:\s*\?)?/.source, [tuple, identifier, array]); @@ -150,14 +151,14 @@ // Casts and checks via as and is. // as Foo, is Bar // (things like if(a is Foo b) is covered by variable declaration) - pattern: re(/(\b(?:is|as)\s+)<<0>>/.source, [typeExpression]), + pattern: re(/(\b(?:is(?:\s+not)?|as)\s+)<<0>>/.source, [typeExpressionWithoutTuple]), lookbehind: true, inside: typeInside }, { // Variable, field and parameter declaration // (Foo bar, Bar baz, Foo[,,] bay, Foo> bax) - pattern: re(/\b<<0>>(?=\s+(?!<<1>>)<<2>>(?:\s*[=,;:{)\]]|\s+in))/.source, [typeExpression, nonContextualKeywords, name]), + pattern: re(/\b<<0>>(?=\s+(?!<<1>>)<<2>>(?:\s*[=,;:{)\]]|\s+(?:in|when)\b))/.source, [typeExpression, nonContextualKeywords, name]), inside: typeInside } ], diff --git a/components/prism-csharp.min.js b/components/prism-csharp.min.js index 51da949829..4b3dc42e1d 100644 --- a/components/prism-csharp.min.js +++ b/components/prism-csharp.min.js @@ -1 +1 @@ -!function(s){function a(e,s){return e.replace(/<<(\d+)>>/g,function(e,n){return"(?:"+s[+n]+")"})}function t(e,n,s){return RegExp(a(e,n),s||"")}function e(e,n){for(var s=0;s>/g,function(){return"(?:"+e+")"});return e.replace(/<>/g,"[^\\s\\S]")}var n="bool byte char decimal double dynamic float int long object sbyte short string uint ulong ushort var void",i="class enum interface struct",r="add alias ascending async await by descending from get global group into join let nameof notnull on orderby partial remove select set unmanaged value when where where",o="abstract as base break case catch checked const continue default delegate do else event explicit extern finally fixed for foreach goto if implicit in internal is lock namespace new null operator out override params private protected public readonly ref return sealed sizeof stackalloc static switch this throw try typeof unchecked unsafe using virtual volatile while yield";function l(e){return"\\b(?:"+e.trim().replace(/ /g,"|")+")\\b"}var d=l(i),p=RegExp(l(n+" "+i+" "+r+" "+o)),c=l(i+" "+r+" "+o),u=l(n+" "+i+" "+o),g=e("<(?:[^<>;=+\\-*/%&|^]|<>)*>",2),b=e("\\((?:[^()]|<>)*\\)",2),h="@?\\b[A-Za-z_]\\w*\\b",f=a("<<0>>(?:\\s*<<1>>)?",[h,g]),m=a("(?!<<0>>)<<1>>(?:\\s*\\.\\s*<<1>>)*",[c,f]),k="\\[\\s*(?:,\\s*)*\\]",y=a("(?:<<0>>|<<1>>)(?:\\s*(?:\\?\\s*)?<<2>>)*(?:\\s*\\?)?",[a("\\(<<0>>+(?:,<<0>>+)+\\)",[a("[^,()<>[\\];=+\\-*/%&|^]|<<0>>|<<1>>|<<2>>",[g,b,k])]),m,k]),w={keyword:p,punctuation:/[<>()?,.:[\]]/},v="'(?:[^\r\n'\\\\]|\\\\.|\\\\[Uux][\\da-fA-F]{1,8})'",x='"(?:\\\\.|[^\\\\"\r\n])*"';s.languages.csharp=s.languages.extend("clike",{string:[{pattern:t("(^|[^$\\\\])<<0>>",['@"(?:""|\\\\[^]|[^\\\\"])*"(?!")']),lookbehind:!0,greedy:!0},{pattern:t("(^|[^@$\\\\])<<0>>",[x]),lookbehind:!0,greedy:!0},{pattern:RegExp(v),greedy:!0,alias:"character"}],"class-name":[{pattern:t("(\\busing\\s+static\\s+)<<0>>(?=\\s*;)",[m]),lookbehind:!0,inside:w},{pattern:t("(\\busing\\s+<<0>>\\s*=\\s*)<<1>>(?=\\s*;)",[h,y]),lookbehind:!0,inside:w},{pattern:t("(\\busing\\s+)<<0>>(?=\\s*=)",[h]),lookbehind:!0},{pattern:t("(\\b<<0>>\\s+)<<1>>",[d,f]),lookbehind:!0,inside:w},{pattern:t("(\\bcatch\\s*\\(\\s*)<<0>>",[m]),lookbehind:!0,inside:w},{pattern:t("(\\bwhere\\s+)<<0>>",[h]),lookbehind:!0},{pattern:t("(\\b(?:is|as)\\s+)<<0>>",[y]),lookbehind:!0,inside:w},{pattern:t("\\b<<0>>(?=\\s+(?!<<1>>)<<2>>(?:\\s*[=,;:{)\\]]|\\s+in))",[y,u,h]),inside:w}],keyword:p,number:/(?:\b0(?:x[\da-f_]*[\da-f]|b[01_]*[01])|(?:\B\.\d+(?:_+\d+)*|\b\d+(?:_+\d+)*(?:\.\d+(?:_+\d+)*)?)(?:e[-+]?\d+(?:_+\d+)*)?)(?:ul|lu|[dflmu])?\b/i,operator:/>>=?|<<=?|[-=]>|([-+&|])\1|~|\?\?=?|[-+*/%&|^!=<>]=?/,punctuation:/\?\.?|::|[{}[\];(),.:]/}),s.languages.insertBefore("csharp","number",{range:{pattern:/\.\./,alias:"operator"}}),s.languages.insertBefore("csharp","punctuation",{"named-parameter":{pattern:t("([(,]\\s*)<<0>>(?=\\s*:)",[h]),lookbehind:!0,alias:"punctuation"}}),s.languages.insertBefore("csharp","class-name",{namespace:{pattern:t("(\\b(?:namespace|using)\\s+)<<0>>(?:\\s*\\.\\s*<<0>>)*(?=\\s*[;{])",[h]),lookbehind:!0,inside:{punctuation:/\./}},"type-expression":{pattern:t("(\\b(?:default|typeof|sizeof)\\s*\\(\\s*)(?:[^()\\s]|\\s(?!\\s*\\))|<<0>>)*(?=\\s*\\))",[b]),lookbehind:!0,alias:"class-name",inside:w},"return-type":{pattern:t("<<0>>(?=\\s+(?:<<1>>\\s*(?:=>|[({]|\\.\\s*this\\s*\\[)|this\\s*\\[))",[y,m]),inside:w,alias:"class-name"},"constructor-invocation":{pattern:t("(\\bnew\\s+)<<0>>(?=\\s*[[({])",[y]),lookbehind:!0,inside:w,alias:"class-name"},"generic-method":{pattern:t("<<0>>\\s*<<1>>(?=\\s*\\()",[h,g]),inside:{function:t("^<<0>>",[h]),generic:{pattern:RegExp(g),alias:"class-name",inside:w}}},"type-list":{pattern:t("\\b((?:<<0>>\\s+<<1>>|where\\s+<<2>>)\\s*:\\s*)(?:<<3>>|<<4>>)(?:\\s*,\\s*(?:<<3>>|<<4>>))*(?=\\s*(?:where|[{;]|=>|$))",[d,f,h,y,p.source]),lookbehind:!0,inside:{keyword:p,"class-name":{pattern:RegExp(y),greedy:!0,inside:w},punctuation:/,/}},preprocessor:{pattern:/(^\s*)#.*/m,lookbehind:!0,alias:"property",inside:{directive:{pattern:/(\s*#)\b(?:define|elif|else|endif|endregion|error|if|line|pragma|region|undef|warning)\b/,lookbehind:!0,alias:"keyword"}}}});var $=x+"|"+v,_=a("/(?![*/])|//[^\r\n]*[\r\n]|/\\*(?:[^*]|\\*(?!/))*\\*/|<<0>>",[$]),B=e(a("[^\"'/()]|<<0>>|\\(<>*\\)",[_]),2),E="\\b(?:assembly|event|field|method|module|param|property|return|type)\\b",R=a("<<0>>(?:\\s*\\(<<1>>*\\))?",[m,B]);s.languages.insertBefore("csharp","class-name",{attribute:{pattern:t("((?:^|[^\\s\\w>)?])\\s*\\[\\s*)(?:<<0>>\\s*:\\s*)?<<1>>(?:\\s*,\\s*<<1>>)*(?=\\s*\\])",[E,R]),lookbehind:!0,greedy:!0,inside:{target:{pattern:t("^<<0>>(?=\\s*:)",[E]),alias:"keyword"},"attribute-arguments":{pattern:t("\\(<<0>>*\\)",[B]),inside:s.languages.csharp},"class-name":{pattern:RegExp(m),inside:{punctuation:/\./}},punctuation:/[:,]/}}});var P=":[^}\r\n]+",z=e(a("[^\"'/()]|<<0>>|\\(<>*\\)",[_]),2),S=a("\\{(?!\\{)(?:(?![}:])<<0>>)*<<1>>?\\}",[z,P]),j=e(a("[^\"'/()]|/(?!\\*)|/\\*(?:[^*]|\\*(?!/))*\\*/|<<0>>|\\(<>*\\)",[$]),2),A=a("\\{(?!\\{)(?:(?![}:])<<0>>)*<<1>>?\\}",[j,P]);function F(e,n){return{interpolation:{pattern:t("((?:^|[^{])(?:\\{\\{)*)<<0>>",[e]),lookbehind:!0,inside:{"format-string":{pattern:t("(^\\{(?:(?![}:])<<0>>)*)<<1>>(?=\\}$)",[n,P]),lookbehind:!0,inside:{punctuation:/^:/}},punctuation:/^\{|\}$/,expression:{pattern:/[\s\S]+/,alias:"language-csharp",inside:s.languages.csharp}}},string:/[\s\S]+/}}s.languages.insertBefore("csharp","string",{"interpolation-string":[{pattern:t('(^|[^\\\\])(?:\\$@|@\\$)"(?:""|\\\\[^]|\\{\\{|<<0>>|[^\\\\{"])*"',[S]),lookbehind:!0,greedy:!0,inside:F(S,z)},{pattern:t('(^|[^@\\\\])\\$"(?:\\\\.|\\{\\{|<<0>>|[^\\\\"{])*"',[A]),lookbehind:!0,greedy:!0,inside:F(A,j)}]})}(Prism),Prism.languages.dotnet=Prism.languages.cs=Prism.languages.csharp; \ No newline at end of file +!function(s){function a(e,s){return e.replace(/<<(\d+)>>/g,function(e,n){return"(?:"+s[+n]+")"})}function t(e,n,s){return RegExp(a(e,n),s||"")}function e(e,n){for(var s=0;s>/g,function(){return"(?:"+e+")"});return e.replace(/<>/g,"[^\\s\\S]")}var n="bool byte char decimal double dynamic float int long object sbyte short string uint ulong ushort var void",r="class enum interface struct",i="add alias and ascending async await by descending from get global group into join let nameof not notnull on or orderby partial remove select set unmanaged value when where where",o="abstract as base break case catch checked const continue default delegate do else event explicit extern finally fixed for foreach goto if implicit in internal is lock namespace new null operator out override params private protected public readonly ref return sealed sizeof stackalloc static switch this throw try typeof unchecked unsafe using virtual volatile while yield";function l(e){return"\\b(?:"+e.trim().replace(/ /g,"|")+")\\b"}var d=l(r),p=RegExp(l(n+" "+r+" "+i+" "+o)),c=l(r+" "+i+" "+o),u=l(n+" "+r+" "+o),g=e("<(?:[^<>;=+\\-*/%&|^]|<>)*>",2),b=e("\\((?:[^()]|<>)*\\)",2),h="@?\\b[A-Za-z_]\\w*\\b",f=a("<<0>>(?:\\s*<<1>>)?",[h,g]),m=a("(?!<<0>>)<<1>>(?:\\s*\\.\\s*<<1>>)*",[c,f]),k="\\[\\s*(?:,\\s*)*\\]",y=a("<<0>>(?:\\s*(?:\\?\\s*)?<<1>>)*(?:\\s*\\?)?",[m,k]),w=a("(?:<<0>>|<<1>>)(?:\\s*(?:\\?\\s*)?<<2>>)*(?:\\s*\\?)?",[a("\\(<<0>>+(?:,<<0>>+)+\\)",[a("[^,()<>[\\];=+\\-*/%&|^]|<<0>>|<<1>>|<<2>>",[g,b,k])]),m,k]),v={keyword:p,punctuation:/[<>()?,.:[\]]/},x="'(?:[^\r\n'\\\\]|\\\\.|\\\\[Uux][\\da-fA-F]{1,8})'",$='"(?:\\\\.|[^\\\\"\r\n])*"';s.languages.csharp=s.languages.extend("clike",{string:[{pattern:t("(^|[^$\\\\])<<0>>",['@"(?:""|\\\\[^]|[^\\\\"])*"(?!")']),lookbehind:!0,greedy:!0},{pattern:t("(^|[^@$\\\\])<<0>>",[$]),lookbehind:!0,greedy:!0},{pattern:RegExp(x),greedy:!0,alias:"character"}],"class-name":[{pattern:t("(\\busing\\s+static\\s+)<<0>>(?=\\s*;)",[m]),lookbehind:!0,inside:v},{pattern:t("(\\busing\\s+<<0>>\\s*=\\s*)<<1>>(?=\\s*;)",[h,w]),lookbehind:!0,inside:v},{pattern:t("(\\busing\\s+)<<0>>(?=\\s*=)",[h]),lookbehind:!0},{pattern:t("(\\b<<0>>\\s+)<<1>>",[d,f]),lookbehind:!0,inside:v},{pattern:t("(\\bcatch\\s*\\(\\s*)<<0>>",[m]),lookbehind:!0,inside:v},{pattern:t("(\\bwhere\\s+)<<0>>",[h]),lookbehind:!0},{pattern:t("(\\b(?:is(?:\\s+not)?|as)\\s+)<<0>>",[y]),lookbehind:!0,inside:v},{pattern:t("\\b<<0>>(?=\\s+(?!<<1>>)<<2>>(?:\\s*[=,;:{)\\]]|\\s+(?:in|when)\\b))",[w,u,h]),inside:v}],keyword:p,number:/(?:\b0(?:x[\da-f_]*[\da-f]|b[01_]*[01])|(?:\B\.\d+(?:_+\d+)*|\b\d+(?:_+\d+)*(?:\.\d+(?:_+\d+)*)?)(?:e[-+]?\d+(?:_+\d+)*)?)(?:ul|lu|[dflmu])?\b/i,operator:/>>=?|<<=?|[-=]>|([-+&|])\1|~|\?\?=?|[-+*/%&|^!=<>]=?/,punctuation:/\?\.?|::|[{}[\];(),.:]/}),s.languages.insertBefore("csharp","number",{range:{pattern:/\.\./,alias:"operator"}}),s.languages.insertBefore("csharp","punctuation",{"named-parameter":{pattern:t("([(,]\\s*)<<0>>(?=\\s*:)",[h]),lookbehind:!0,alias:"punctuation"}}),s.languages.insertBefore("csharp","class-name",{namespace:{pattern:t("(\\b(?:namespace|using)\\s+)<<0>>(?:\\s*\\.\\s*<<0>>)*(?=\\s*[;{])",[h]),lookbehind:!0,inside:{punctuation:/\./}},"type-expression":{pattern:t("(\\b(?:default|typeof|sizeof)\\s*\\(\\s*)(?:[^()\\s]|\\s(?!\\s*\\))|<<0>>)*(?=\\s*\\))",[b]),lookbehind:!0,alias:"class-name",inside:v},"return-type":{pattern:t("<<0>>(?=\\s+(?:<<1>>\\s*(?:=>|[({]|\\.\\s*this\\s*\\[)|this\\s*\\[))",[w,m]),inside:v,alias:"class-name"},"constructor-invocation":{pattern:t("(\\bnew\\s+)<<0>>(?=\\s*[[({])",[w]),lookbehind:!0,inside:v,alias:"class-name"},"generic-method":{pattern:t("<<0>>\\s*<<1>>(?=\\s*\\()",[h,g]),inside:{function:t("^<<0>>",[h]),generic:{pattern:RegExp(g),alias:"class-name",inside:v}}},"type-list":{pattern:t("\\b((?:<<0>>\\s+<<1>>|where\\s+<<2>>)\\s*:\\s*)(?:<<3>>|<<4>>)(?:\\s*,\\s*(?:<<3>>|<<4>>))*(?=\\s*(?:where|[{;]|=>|$))",[d,f,h,w,p.source]),lookbehind:!0,inside:{keyword:p,"class-name":{pattern:RegExp(w),greedy:!0,inside:v},punctuation:/,/}},preprocessor:{pattern:/(^\s*)#.*/m,lookbehind:!0,alias:"property",inside:{directive:{pattern:/(\s*#)\b(?:define|elif|else|endif|endregion|error|if|line|pragma|region|undef|warning)\b/,lookbehind:!0,alias:"keyword"}}}});var _=$+"|"+x,B=a("/(?![*/])|//[^\r\n]*[\r\n]|/\\*(?:[^*]|\\*(?!/))*\\*/|<<0>>",[_]),E=e(a("[^\"'/()]|<<0>>|\\(<>*\\)",[B]),2),R="\\b(?:assembly|event|field|method|module|param|property|return|type)\\b",P=a("<<0>>(?:\\s*\\(<<1>>*\\))?",[m,E]);s.languages.insertBefore("csharp","class-name",{attribute:{pattern:t("((?:^|[^\\s\\w>)?])\\s*\\[\\s*)(?:<<0>>\\s*:\\s*)?<<1>>(?:\\s*,\\s*<<1>>)*(?=\\s*\\])",[R,P]),lookbehind:!0,greedy:!0,inside:{target:{pattern:t("^<<0>>(?=\\s*:)",[R]),alias:"keyword"},"attribute-arguments":{pattern:t("\\(<<0>>*\\)",[E]),inside:s.languages.csharp},"class-name":{pattern:RegExp(m),inside:{punctuation:/\./}},punctuation:/[:,]/}}});var z=":[^}\r\n]+",S=e(a("[^\"'/()]|<<0>>|\\(<>*\\)",[B]),2),j=a("\\{(?!\\{)(?:(?![}:])<<0>>)*<<1>>?\\}",[S,z]),A=e(a("[^\"'/()]|/(?!\\*)|/\\*(?:[^*]|\\*(?!/))*\\*/|<<0>>|\\(<>*\\)",[_]),2),F=a("\\{(?!\\{)(?:(?![}:])<<0>>)*<<1>>?\\}",[A,z]);function U(e,n){return{interpolation:{pattern:t("((?:^|[^{])(?:\\{\\{)*)<<0>>",[e]),lookbehind:!0,inside:{"format-string":{pattern:t("(^\\{(?:(?![}:])<<0>>)*)<<1>>(?=\\}$)",[n,z]),lookbehind:!0,inside:{punctuation:/^:/}},punctuation:/^\{|\}$/,expression:{pattern:/[\s\S]+/,alias:"language-csharp",inside:s.languages.csharp}}},string:/[\s\S]+/}}s.languages.insertBefore("csharp","string",{"interpolation-string":[{pattern:t('(^|[^\\\\])(?:\\$@|@\\$)"(?:""|\\\\[^]|\\{\\{|<<0>>|[^\\\\{"])*"',[j]),lookbehind:!0,greedy:!0,inside:U(j,S)},{pattern:t('(^|[^@\\\\])\\$"(?:\\\\.|\\{\\{|<<0>>|[^\\\\"{])*"',[F]),lookbehind:!0,greedy:!0,inside:U(F,A)}]})}(Prism),Prism.languages.dotnet=Prism.languages.cs=Prism.languages.csharp; \ No newline at end of file diff --git a/tests/languages/csharp/class-name-variables-parameters_feature.test b/tests/languages/csharp/class-name-variables-parameters_feature.test index 9e1c0fc9ba..53b93c85ca 100644 --- a/tests/languages/csharp/class-name-variables-parameters_feature.test +++ b/tests/languages/csharp/class-name-variables-parameters_feature.test @@ -7,6 +7,14 @@ void Foo(Foo a, Bar b, Bar[, ] c, Foo<(int, int)> d); Bar Abc => 0; Bar.FooBar Abc; +if (foo is Bar) +if (foo is not Bar) +if (foo is null) +if (foo is not null) +if (t is (int, string)) +if ((e1, e2) is (0, int i) or (int i, 0)) +var baz = foo as Bar; + ---------------------------------------------------- [ @@ -113,6 +121,84 @@ Bar.FooBar Abc; ["punctuation", ">"] ]], " Abc", + ["punctuation", ";"], + + ["keyword", "if"], + ["punctuation", "("], + "foo ", + ["keyword", "is"], + ["class-name", [ + "Bar" + ]], + ["punctuation", ")"], + ["keyword", "if"], + ["punctuation", "("], + "foo ", + ["keyword", "is"], + ["keyword", "not"], + ["class-name", [ + "Bar" + ]], + ["punctuation", ")"], + ["keyword", "if"], + ["punctuation", "("], + "foo ", + ["keyword", "is"], + ["keyword", "null"], + ["punctuation", ")"], + ["keyword", "if"], + ["punctuation", "("], + "foo ", + ["keyword", "is"], + ["keyword", "not"], + ["keyword", "null"], + ["punctuation", ")"], + ["keyword", "if"], + ["punctuation", "("], + "t ", + ["keyword", "is"], + ["punctuation", "("], + ["keyword", "int"], + ["punctuation", ","], + ["keyword", "string"], + ["punctuation", ")"], + ["punctuation", ")"], + ["keyword", "if"], + ["punctuation", "("], + ["punctuation", "("], + "e1", + ["punctuation", ","], + " e2", + ["punctuation", ")"], + ["keyword", "is"], + ["punctuation", "("], + ["number", "0"], + ["punctuation", ","], + ["class-name", [ + ["keyword", "int"] + ]], + " i", + ["punctuation", ")"], + ["keyword", "or"], + ["punctuation", "("], + ["class-name", [ + ["keyword", "int"] + ]], + " i", + ["punctuation", ","], + ["number", "0"], + ["punctuation", ")"], + ["punctuation", ")"], + ["class-name", [ + ["keyword", "var"] + ]], + " baz ", + ["operator", "="], + " foo ", + ["keyword", "as"], + ["class-name", [ + "Bar" + ]], ["punctuation", ";"] ] diff --git a/tests/languages/csharp/keyword_feature.test b/tests/languages/csharp/keyword_feature.test index 75a9f6b695..1769b30b0e 100644 --- a/tests/languages/csharp/keyword_feature.test +++ b/tests/languages/csharp/keyword_feature.test @@ -1,6 +1,7 @@ abstract add alias +and as ascending async @@ -54,11 +55,13 @@ long nameof namespace; new; +not notnull null object on operator +or orderby out override @@ -109,6 +112,7 @@ yield ["keyword", "abstract"], ["keyword", "add"], ["keyword", "alias"], + ["keyword", "and"], ["keyword", "as"], ["keyword", "ascending"], ["keyword", "async"], @@ -162,11 +166,13 @@ yield ["keyword", "nameof"], ["keyword", "namespace"], ["punctuation", ";"], ["keyword", "new"], ["punctuation", ";"], + ["keyword", "not"], ["keyword", "notnull"], ["keyword", "null"], ["keyword", "object"], ["keyword", "on"], ["keyword", "operator"], + ["keyword", "or"], ["keyword", "orderby"], ["keyword", "out"], ["keyword", "override"], diff --git a/tests/languages/csharp/switch_feature.test b/tests/languages/csharp/switch_feature.test new file mode 100644 index 0000000000..a9ff987424 --- /dev/null +++ b/tests/languages/csharp/switch_feature.test @@ -0,0 +1,582 @@ +public static decimal CalculateToll(object vehicle) => + vehicle switch + { + DeliveryTruck t when t.GrossWeightClass > 5000 => 10.00m + 5.00m, + DeliveryTruck t when t.GrossWeightClass < 3000 => 10.00m - 2.00m, + DeliveryTruck _ => 10.00m, + _ => throw new ArgumentException("Not a known vehicle type", nameof(vehicle)) + }; + +DeliveryTruck t when t.GrossWeightClass switch +{ + > 5000 => 10.00m + 5.00m, + < 3000 => 10.00m - 2.00m, + _ => 10.00m, +}, +DeliveryTruck t when t.GrossWeightClass switch +{ + < 3000 => 10.00m - 2.00m, + >= 3000 and <= 5000 => 10.00m, + > 5000 => 10.00m + 5.00m, +}, + +switch (DateTime.Now.DayOfWeek) +{ + case DayOfWeek.Sunday: + case DayOfWeek.Saturday: + Console.WriteLine("The weekend"); + break; + case DayOfWeek.Monday: + Console.WriteLine("The first day of the work week."); + break; + case DayOfWeek.Friday: + Console.WriteLine("The last day of the work week."); + break; + default: + Console.WriteLine("The middle of the work week."); + break; +} + +switch (str) +{ + case "1": + case "small": + cost += 25; + break; + case "2": + case "medium": + cost += 25; + goto case "1"; + case "3": + case "large": + cost += 50; + goto case "1"; + default: + Console.WriteLine("Invalid selection. Please select 1, 2, or 3."); + break; +} + +switch (sh) +{ + // Note that this code never evaluates to true. + case Shape shape when shape == null: + break; + case null: + break; + case Rectangle r when r.Length == r.Width && r.Area > 0: + break; + default: + break; +} + +switch (coll) +{ + case Array arr: + break; + case IEnumerable ieInt: + break; + case object o: + break; + default: + break; +} + +bool IsValidPercentage(object x) => x is + >= 0 and <= 100 or // integer tests + >= 0F and <= 100F or // float tests + >= 0D and <= 100D; // double tests + +bool isSmallByte(object o) => o is byte and < 100; + +case (0, int x): +case (int x, 0): + Console.WriteLine(x); + +case < 2: break; +case 0 or 1 or 2 or 3 or 4 or 5: break; + +int x = b switch { <100 => 0, 100 => 1, 101 => 2, >101 => 3 }; + +---------------------------------------------------- + +[ + ["keyword", "public"], + ["keyword", "static"], + ["return-type", [ + ["keyword", "decimal"] + ]], + ["function", "CalculateToll"], + ["punctuation", "("], + ["class-name", [ + ["keyword", "object"] + ]], + " vehicle", + ["punctuation", ")"], + ["operator", "=>"], + "\n\tvehicle ", + ["keyword", "switch"], + ["punctuation", "{"], + ["class-name", [ + "DeliveryTruck" + ]], + " t ", + ["keyword", "when"], + " t", + ["punctuation", "."], + "GrossWeightClass ", + ["operator", ">"], + ["number", "5000"], + ["operator", "=>"], + ["number", "10.00m"], + ["operator", "+"], + ["number", "5.00m"], + ["punctuation", ","], + ["class-name", [ + "DeliveryTruck" + ]], + " t ", + ["keyword", "when"], + " t", + ["punctuation", "."], + "GrossWeightClass ", + ["operator", "<"], + ["number", "3000"], + ["operator", "=>"], + ["number", "10.00m"], + ["operator", "-"], + ["number", "2.00m"], + ["punctuation", ","], + ["return-type", [ + "DeliveryTruck" + ]], + " _ ", + ["operator", "=>"], + ["number", "10.00m"], + ["punctuation", ","], + "\n\t\t_ ", + ["operator", "=>"], + ["keyword", "throw"], + ["keyword", "new"], + ["constructor-invocation", [ + "ArgumentException" + ]], + ["punctuation", "("], + ["string", "\"Not a known vehicle type\""], + ["punctuation", ","], + ["keyword", "nameof"], + ["punctuation", "("], + "vehicle", + ["punctuation", ")"], + ["punctuation", ")"], + ["punctuation", "}"], + ["punctuation", ";"], + ["class-name", [ + "DeliveryTruck" + ]], + " t ", + ["keyword", "when"], + " t", + ["punctuation", "."], + "GrossWeightClass ", + ["keyword", "switch"], + ["punctuation", "{"], + ["operator", ">"], + ["number", "5000"], + ["operator", "=>"], + ["number", "10.00m"], + ["operator", "+"], + ["number", "5.00m"], + ["punctuation", ","], + ["operator", "<"], + ["number", "3000"], + ["operator", "=>"], + ["number", "10.00m"], + ["operator", "-"], + ["number", "2.00m"], + ["punctuation", ","], + "\n\t_ ", + ["operator", "=>"], + ["number", "10.00m"], + ["punctuation", ","], + ["punctuation", "}"], + ["punctuation", ","], + ["class-name", [ + "DeliveryTruck" + ]], + " t ", + ["keyword", "when"], + " t", + ["punctuation", "."], + "GrossWeightClass ", + ["keyword", "switch"], + ["punctuation", "{"], + ["operator", "<"], + ["number", "3000"], + ["operator", "=>"], + ["number", "10.00m"], + ["operator", "-"], + ["number", "2.00m"], + ["punctuation", ","], + ["operator", ">="], + ["number", "3000"], + ["keyword", "and"], + ["operator", "<="], + ["number", "5000"], + ["operator", "=>"], + ["number", "10.00m"], + ["punctuation", ","], + ["operator", ">"], + ["number", "5000"], + ["operator", "=>"], + ["number", "10.00m"], + ["operator", "+"], + ["number", "5.00m"], + ["punctuation", ","], + ["punctuation", "}"], + ["punctuation", ","], + ["keyword", "switch"], + ["punctuation", "("], + "DateTime", + ["punctuation", "."], + "Now", + ["punctuation", "."], + "DayOfWeek", + ["punctuation", ")"], + ["punctuation", "{"], + ["keyword", "case"], + " DayOfWeek", + ["punctuation", "."], + "Sunday", + ["punctuation", ":"], + ["keyword", "case"], + " DayOfWeek", + ["punctuation", "."], + "Saturday", + ["punctuation", ":"], + "\n\t\tConsole", + ["punctuation", "."], + ["function", "WriteLine"], + ["punctuation", "("], + ["string", "\"The weekend\""], + ["punctuation", ")"], + ["punctuation", ";"], + ["keyword", "break"], + ["punctuation", ";"], + ["keyword", "case"], + " DayOfWeek", + ["punctuation", "."], + "Monday", + ["punctuation", ":"], + "\n\t\tConsole", + ["punctuation", "."], + ["function", "WriteLine"], + ["punctuation", "("], + ["string", "\"The first day of the work week.\""], + ["punctuation", ")"], + ["punctuation", ";"], + ["keyword", "break"], + ["punctuation", ";"], + ["keyword", "case"], + " DayOfWeek", + ["punctuation", "."], + "Friday", + ["punctuation", ":"], + "\n\t\tConsole", + ["punctuation", "."], + ["function", "WriteLine"], + ["punctuation", "("], + ["string", "\"The last day of the work week.\""], + ["punctuation", ")"], + ["punctuation", ";"], + ["keyword", "break"], + ["punctuation", ";"], + ["keyword", "default"], + ["punctuation", ":"], + "\n\t\tConsole", + ["punctuation", "."], + ["function", "WriteLine"], + ["punctuation", "("], + ["string", "\"The middle of the work week.\""], + ["punctuation", ")"], + ["punctuation", ";"], + ["keyword", "break"], + ["punctuation", ";"], + ["punctuation", "}"], + ["keyword", "switch"], + ["punctuation", "("], + "str", + ["punctuation", ")"], + ["punctuation", "{"], + ["keyword", "case"], + ["string", "\"1\""], + ["punctuation", ":"], + ["keyword", "case"], + ["string", "\"small\""], + ["punctuation", ":"], + "\n\t\tcost ", + ["operator", "+="], + ["number", "25"], + ["punctuation", ";"], + ["keyword", "break"], + ["punctuation", ";"], + ["keyword", "case"], + ["string", "\"2\""], + ["punctuation", ":"], + ["keyword", "case"], + ["string", "\"medium\""], + ["punctuation", ":"], + "\n\t\tcost ", + ["operator", "+="], + ["number", "25"], + ["punctuation", ";"], + ["keyword", "goto"], + ["keyword", "case"], + ["string", "\"1\""], + ["punctuation", ";"], + ["keyword", "case"], + ["string", "\"3\""], + ["punctuation", ":"], + ["keyword", "case"], + ["string", "\"large\""], + ["punctuation", ":"], + "\n\t\tcost ", + ["operator", "+="], + ["number", "50"], + ["punctuation", ";"], + ["keyword", "goto"], + ["keyword", "case"], + ["string", "\"1\""], + ["punctuation", ";"], + ["keyword", "default"], + ["punctuation", ":"], + "\n\t\tConsole", + ["punctuation", "."], + ["function", "WriteLine"], + ["punctuation", "("], + ["string", "\"Invalid selection. Please select 1, 2, or 3.\""], + ["punctuation", ")"], + ["punctuation", ";"], + ["keyword", "break"], + ["punctuation", ";"], + ["punctuation", "}"], + ["keyword", "switch"], + ["punctuation", "("], + "sh", + ["punctuation", ")"], + ["punctuation", "{"], + ["comment", "// Note that this code never evaluates to true."], + ["keyword", "case"], + ["class-name", [ + "Shape" + ]], + " shape ", + ["keyword", "when"], + " shape ", + ["operator", "=="], + ["keyword", "null"], + ["punctuation", ":"], + ["keyword", "break"], + ["punctuation", ";"], + ["keyword", "case"], + ["keyword", "null"], + ["punctuation", ":"], + ["keyword", "break"], + ["punctuation", ";"], + ["keyword", "case"], + ["class-name", [ + "Rectangle" + ]], + " r ", + ["keyword", "when"], + " r", + ["punctuation", "."], + "Length ", + ["operator", "=="], + " r", + ["punctuation", "."], + "Width ", + ["operator", "&&"], + " r", + ["punctuation", "."], + "Area ", + ["operator", ">"], + ["number", "0"], + ["punctuation", ":"], + ["keyword", "break"], + ["punctuation", ";"], + ["keyword", "default"], + ["punctuation", ":"], + ["keyword", "break"], + ["punctuation", ";"], + ["punctuation", "}"], + ["keyword", "switch"], + ["punctuation", "("], + "coll", + ["punctuation", ")"], + ["punctuation", "{"], + ["keyword", "case"], + ["class-name", [ + "Array" + ]], + " arr", + ["punctuation", ":"], + ["keyword", "break"], + ["punctuation", ";"], + ["keyword", "case"], + ["class-name", [ + "IEnumerable", + ["punctuation", "<"], + ["keyword", "int"], + ["punctuation", ">"] + ]], + " ieInt", + ["punctuation", ":"], + ["keyword", "break"], + ["punctuation", ";"], + ["keyword", "case"], + ["class-name", [ + ["keyword", "object"] + ]], + " o", + ["punctuation", ":"], + ["keyword", "break"], + ["punctuation", ";"], + ["keyword", "default"], + ["punctuation", ":"], + ["keyword", "break"], + ["punctuation", ";"], + ["punctuation", "}"], + ["return-type", [ + ["keyword", "bool"] + ]], + ["function", "IsValidPercentage"], + ["punctuation", "("], + ["class-name", [ + ["keyword", "object"] + ]], + " x", + ["punctuation", ")"], + ["operator", "=>"], + " x ", + ["keyword", "is"], + ["operator", ">="], + ["number", "0"], + ["keyword", "and"], + ["operator", "<="], + ["number", "100"], + ["keyword", "or"], + ["comment", "// integer tests"], + ["operator", ">="], + ["number", "0F"], + ["keyword", "and"], + ["operator", "<="], + ["number", "100F"], + ["keyword", "or"], + ["comment", "// float tests"], + ["operator", ">="], + ["number", "0D"], + ["keyword", "and"], + ["operator", "<="], + ["number", "100D"], + ["punctuation", ";"], + ["comment", "// double tests"], + ["return-type", [ + ["keyword", "bool"] + ]], + ["function", "isSmallByte"], + ["punctuation", "("], + ["class-name", [ + ["keyword", "object"] + ]], + " o", + ["punctuation", ")"], + ["operator", "=>"], + " o ", + ["keyword", "is"], + ["class-name", [ + ["keyword", "byte"] + ]], + ["keyword", "and"], + ["operator", "<"], + ["number", "100"], + ["punctuation", ";"], + ["keyword", "case"], + ["punctuation", "("], + ["number", "0"], + ["punctuation", ","], + ["class-name", [ + ["keyword", "int"] + ]], + " x", + ["punctuation", ")"], + ["punctuation", ":"], + ["keyword", "case"], + ["punctuation", "("], + ["class-name", [ + ["keyword", "int"] + ]], + " x", + ["punctuation", ","], + ["number", "0"], + ["punctuation", ")"], + ["punctuation", ":"], + "\n\tConsole", + ["punctuation", "."], + ["function", "WriteLine"], + ["punctuation", "("], + "x", + ["punctuation", ")"], + ["punctuation", ";"], + ["keyword", "case"], + ["operator", "<"], + ["number", "2"], + ["punctuation", ":"], + ["keyword", "break"], + ["punctuation", ";"], + ["keyword", "case"], + ["number", "0"], + ["keyword", "or"], + ["number", "1"], + ["keyword", "or"], + ["number", "2"], + ["keyword", "or"], + ["number", "3"], + ["keyword", "or"], + ["number", "4"], + ["keyword", "or"], + ["number", "5"], + ["punctuation", ":"], + ["keyword", "break"], + ["punctuation", ";"], + ["class-name", [ + ["keyword", "int"] + ]], + " x ", + ["operator", "="], + " b ", + ["keyword", "switch"], + ["punctuation", "{"], + ["operator", "<"], + ["number", "100"], + ["operator", "=>"], + ["number", "0"], + ["punctuation", ","], + ["number", "100"], + ["operator", "=>"], + ["number", "1"], + ["punctuation", ","], + ["number", "101"], + ["operator", "=>"], + ["number", "2"], + ["punctuation", ","], + ["operator", ">"], + ["number", "101"], + ["operator", "=>"], + ["number", "3"], + ["punctuation", "}"], + ["punctuation", ";"] +] + +---------------------------------------------------- + +Checks for switch statements and expressions. From de8ed16dc7523a6c357adbfd7e8a8906d9909d80 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Fri, 12 Jun 2020 12:53:22 +0200 Subject: [PATCH 0555/1100] GraphQL: Added missing keywords (#2407) --- components/prism-graphql.js | 6 +- components/prism-graphql.min.js | 2 +- .../languages/graphql/class-name_feature.test | 12 +++- tests/languages/graphql/keyword_feature.test | 62 +++++++++++++------ tests/languages/graphql/operator_feature.test | 5 +- 5 files changed, 61 insertions(+), 26 deletions(-) diff --git a/components/prism-graphql.js b/components/prism-graphql.js index efc61c3447..d276c3f4c0 100644 --- a/components/prism-graphql.js +++ b/components/prism-graphql.js @@ -28,7 +28,7 @@ Prism.languages.graphql = { greedy: true }, 'class-name': { - pattern: /(\b(?:enum|implements|interface|on|scalar|type|union)\s+)[a-zA-Z_]\w*/, + pattern: /(\b(?:enum|implements|interface|on|scalar|type|union)\s+|&\s*)[a-zA-Z_]\w*/, lookbehind: true }, 'fragment': { @@ -36,8 +36,8 @@ Prism.languages.graphql = { lookbehind: true, alias: 'function' }, - 'keyword': /\b(?:enum|fragment|implements|input|interface|mutation|on|query|scalar|schema|type|union)\b/, - 'operator': /[!=|]|\.{3}/, + 'keyword': /\b(?:directive|enum|extend|fragment|implements|input|interface|mutation|on|query|repeatable|scalar|schema|subscription|type|union)\b/, + 'operator': /[!=|&]|\.{3}/, 'punctuation': /[!(){}\[\]:=,]/, 'constant': /\b(?!ID\b)[A-Z][A-Z_\d]*\b/ }; diff --git a/components/prism-graphql.min.js b/components/prism-graphql.min.js index df6e5aee6b..00b1dfc53a 100644 --- a/components/prism-graphql.min.js +++ b/components/prism-graphql.min.js @@ -1 +1 @@ -Prism.languages.graphql={comment:/#.*/,description:{pattern:/(?:"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*")(?=\s*[a-z_])/i,greedy:!0,alias:"string",inside:{"language-markdown":{pattern:/(^"(?:"")?)(?!\1)[\s\S]+(?=\1$)/,lookbehind:!0,inside:Prism.languages.markdown}}},string:{pattern:/"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*"/,greedy:!0},number:/(?:\B-|\b)\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,boolean:/\b(?:true|false)\b/,variable:/\$[a-z_]\w*/i,directive:{pattern:/@[a-z_]\w*/i,alias:"function"},"attr-name":{pattern:/[a-z_]\w*(?=\s*(?:\((?:[^()"]|"(?:\\.|[^\\"\r\n])*")*\))?:)/i,greedy:!0},"class-name":{pattern:/(\b(?:enum|implements|interface|on|scalar|type|union)\s+)[a-zA-Z_]\w*/,lookbehind:!0},fragment:{pattern:/(\bfragment\s+|\.{3}\s*(?!on\b))[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},keyword:/\b(?:enum|fragment|implements|input|interface|mutation|on|query|scalar|schema|type|union)\b/,operator:/[!=|]|\.{3}/,punctuation:/[!(){}\[\]:=,]/,constant:/\b(?!ID\b)[A-Z][A-Z_\d]*\b/}; \ No newline at end of file +Prism.languages.graphql={comment:/#.*/,description:{pattern:/(?:"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*")(?=\s*[a-z_])/i,greedy:!0,alias:"string",inside:{"language-markdown":{pattern:/(^"(?:"")?)(?!\1)[\s\S]+(?=\1$)/,lookbehind:!0,inside:Prism.languages.markdown}}},string:{pattern:/"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*"/,greedy:!0},number:/(?:\B-|\b)\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,boolean:/\b(?:true|false)\b/,variable:/\$[a-z_]\w*/i,directive:{pattern:/@[a-z_]\w*/i,alias:"function"},"attr-name":{pattern:/[a-z_]\w*(?=\s*(?:\((?:[^()"]|"(?:\\.|[^\\"\r\n])*")*\))?:)/i,greedy:!0},"class-name":{pattern:/(\b(?:enum|implements|interface|on|scalar|type|union)\s+|&\s*)[a-zA-Z_]\w*/,lookbehind:!0},fragment:{pattern:/(\bfragment\s+|\.{3}\s*(?!on\b))[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},keyword:/\b(?:directive|enum|extend|fragment|implements|input|interface|mutation|on|query|repeatable|scalar|schema|subscription|type|union)\b/,operator:/[!=|&]|\.{3}/,punctuation:/[!(){}\[\]:=,]/,constant:/\b(?!ID\b)[A-Z][A-Z_\d]*\b/}; \ No newline at end of file diff --git a/tests/languages/graphql/class-name_feature.test b/tests/languages/graphql/class-name_feature.test index 6ac1e29933..1680bafd44 100644 --- a/tests/languages/graphql/class-name_feature.test +++ b/tests/languages/graphql/class-name_feature.test @@ -1,6 +1,7 @@ interface Foo {} type Foo {} type Foo implements Bar {} +type Business implements NamedEntity & ValuedEntity {} enum Foo {} scalar Foo union Foo @@ -26,6 +27,15 @@ on Foo {} ["punctuation", "{"], ["punctuation", "}"], + ["keyword", "type"], + ["class-name", "Business"], + ["keyword", "implements"], + ["class-name", "NamedEntity"], + ["operator", "&"], + ["class-name", "ValuedEntity"], + ["punctuation", "{"], + ["punctuation", "}"], + ["keyword", "enum"], ["class-name", "Foo"], ["punctuation", "{"], @@ -45,4 +55,4 @@ on Foo {} ---------------------------------------------------- -Checks for class names. \ No newline at end of file +Checks for class names. diff --git a/tests/languages/graphql/keyword_feature.test b/tests/languages/graphql/keyword_feature.test index 9d30f88dfa..c22834121b 100644 --- a/tests/languages/graphql/keyword_feature.test +++ b/tests/languages/graphql/keyword_feature.test @@ -1,33 +1,57 @@ -enum -fragment -implements -input -interface -mutation -on -query -scalar -schema -type -union +directive, +enum, +extend, +fragment, +implements, +input, +interface, +mutation, +on, +query, +repeatable, +scalar, +schema, +subscription, +type, +union, ---------------------------------------------------- [ + ["keyword", "directive"], + ["punctuation", ","], ["keyword", "enum"], - ["class-name", "fragment"], + ["punctuation", ","], + ["keyword", "extend"], + ["punctuation", ","], + ["keyword", "fragment"], + ["punctuation", ","], ["keyword", "implements"], - ["class-name", "input"], + ["punctuation", ","], + ["keyword", "input"], + ["punctuation", ","], ["keyword", "interface"], - ["class-name", "mutation"], + ["punctuation", ","], + ["keyword", "mutation"], + ["punctuation", ","], ["keyword", "on"], - ["class-name", "query"], + ["punctuation", ","], + ["keyword", "query"], + ["punctuation", ","], + ["keyword", "repeatable"], + ["punctuation", ","], ["keyword", "scalar"], - ["class-name", "schema"], + ["punctuation", ","], + ["keyword", "schema"], + ["punctuation", ","], + ["keyword", "subscription"], + ["punctuation", ","], ["keyword", "type"], - ["class-name", "union"] + ["punctuation", ","], + ["keyword", "union"], + ["punctuation", ","] ] ---------------------------------------------------- -Checks for keywords. \ No newline at end of file +Checks for keywords. diff --git a/tests/languages/graphql/operator_feature.test b/tests/languages/graphql/operator_feature.test index c19fe7393e..465ad30258 100644 --- a/tests/languages/graphql/operator_feature.test +++ b/tests/languages/graphql/operator_feature.test @@ -1,4 +1,4 @@ -= ! | += ! | & ... ---------------------------------------------------- @@ -7,9 +7,10 @@ ["operator", "="], ["operator", "!"], ["operator", "|"], + ["operator", "&"], ["operator", "..."] ] ---------------------------------------------------- -Checks for operators. \ No newline at end of file +Checks for operators. From 48fac3b26c544473797539a952aa3ae861b5d41a Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Fri, 12 Jun 2020 15:58:46 +0200 Subject: [PATCH 0556/1100] Added a test for identifier support across all languages (#2371) --- components/prism-apl.js | 2 +- components/prism-apl.min.js | 2 +- components/prism-asm6502.js | 8 +- components/prism-asm6502.min.js | 2 +- components/prism-css-extras.js | 3 +- components/prism-css-extras.min.js | 2 +- components/prism-ebnf.js | 2 +- components/prism-ebnf.min.js | 2 +- components/prism-eiffel.js | 2 +- components/prism-eiffel.min.js | 2 +- components/prism-excel-formula.js | 6 +- components/prism-excel-formula.min.js | 2 +- components/prism-hcl.js | 8 +- components/prism-hcl.min.js | 2 +- components/prism-hpkp.js | 4 +- components/prism-hpkp.min.js | 2 +- components/prism-hsts.js | 4 +- components/prism-hsts.min.js | 2 +- components/prism-j.js | 4 +- components/prism-j.min.js | 2 +- components/prism-jq.js | 4 +- components/prism-jq.min.js | 2 +- components/prism-json.js | 3 +- components/prism-json.min.js | 2 +- components/prism-json5.js | 2 +- components/prism-json5.min.js | 2 +- components/prism-markdown.js | 14 +- components/prism-markdown.min.js | 2 +- components/prism-ocaml.js | 4 +- components/prism-ocaml.min.js | 2 +- components/prism-oz.js | 10 +- components/prism-oz.min.js | 2 +- components/prism-parigp.js | 4 +- components/prism-parigp.min.js | 2 +- components/prism-pure.js | 4 +- components/prism-pure.min.js | 2 +- components/prism-q.js | 4 +- components/prism-q.min.js | 2 +- components/prism-rip.js | 2 +- components/prism-rip.min.js | 2 +- components/prism-stylus.js | 2 +- components/prism-stylus.min.js | 2 +- components/prism-textile.js | 3 +- components/prism-textile.min.js | 2 +- components/prism-toml.js | 6 +- components/prism-toml.min.js | 2 +- components/prism-tt2.js | 2 +- components/prism-tt2.min.js | 2 +- package.json | 3 +- tests/identifier-test.js | 216 ++++++++++++++++++ tests/languages/markdown/bold_feature.test | 53 +++-- tests/languages/markdown/italic_feature.test | 53 +++-- .../markdown/nested_bold_italic_feature.test | 15 ++ tests/languages/markdown/strike_feature.test | 48 ++-- tests/languages/textile/inline_feature.test | 8 +- 55 files changed, 397 insertions(+), 154 deletions(-) create mode 100644 tests/identifier-test.js diff --git a/components/prism-apl.js b/components/prism-apl.js index b87451cf0d..ea15c6f18c 100644 --- a/components/prism-apl.js +++ b/components/prism-apl.js @@ -4,7 +4,7 @@ Prism.languages.apl = { pattern: /'(?:[^'\r\n]|'')*'/, greedy: true }, - 'number': /¯?(?:\d*\.?\d+(?:e[+¯]?\d+)?|¯|∞)(?:j¯?(?:\d*\.?\d+(?:e[+¯]?\d+)?|¯|∞))?/i, + 'number': /¯?(?:\d*\.?\b\d+(?:e[+¯]?\d+)?|¯|∞)(?:j¯?(?:\d*\.?\d+(?:e[+¯]?\d+)?|¯|∞))?/i, 'statement': /:[A-Z][a-z][A-Za-z]*\b/, 'system-function': { pattern: /⎕[A-Z]+/i, diff --git a/components/prism-apl.min.js b/components/prism-apl.min.js index 2607b68ea7..4baa0d6d17 100644 --- a/components/prism-apl.min.js +++ b/components/prism-apl.min.js @@ -1 +1 @@ -Prism.languages.apl={comment:/(?:⍝|#[! ]).*$/m,string:{pattern:/'(?:[^'\r\n]|'')*'/,greedy:!0},number:/¯?(?:\d*\.?\d+(?:e[+¯]?\d+)?|¯|∞)(?:j¯?(?:\d*\.?\d+(?:e[+¯]?\d+)?|¯|∞))?/i,statement:/:[A-Z][a-z][A-Za-z]*\b/,"system-function":{pattern:/⎕[A-Z]+/i,alias:"function"},constant:/[⍬⌾#⎕⍞]/,function:/[-+×÷⌈⌊∣|⍳⍸?*⍟○!⌹<≤=>≥≠≡≢∊⍷∪∩~∨∧⍱⍲⍴,⍪⌽⊖⍉↑↓⊂⊃⊆⊇⌷⍋⍒⊤⊥⍕⍎⊣⊢⍁⍂≈⍯↗¤→]/,"monadic-operator":{pattern:/[\\\/⌿⍀¨⍨⌶&∥]/,alias:"operator"},"dyadic-operator":{pattern:/[.⍣⍠⍤∘⌸@⌺⍥]/,alias:"operator"},assignment:{pattern:/←/,alias:"keyword"},punctuation:/[\[;\]()◇⋄]/,dfn:{pattern:/[{}⍺⍵⍶⍹∇⍫:]/,alias:"builtin"}}; \ No newline at end of file +Prism.languages.apl={comment:/(?:⍝|#[! ]).*$/m,string:{pattern:/'(?:[^'\r\n]|'')*'/,greedy:!0},number:/¯?(?:\d*\.?\b\d+(?:e[+¯]?\d+)?|¯|∞)(?:j¯?(?:\d*\.?\d+(?:e[+¯]?\d+)?|¯|∞))?/i,statement:/:[A-Z][a-z][A-Za-z]*\b/,"system-function":{pattern:/⎕[A-Z]+/i,alias:"function"},constant:/[⍬⌾#⎕⍞]/,function:/[-+×÷⌈⌊∣|⍳⍸?*⍟○!⌹<≤=>≥≠≡≢∊⍷∪∩~∨∧⍱⍲⍴,⍪⌽⊖⍉↑↓⊂⊃⊆⊇⌷⍋⍒⊤⊥⍕⍎⊣⊢⍁⍂≈⍯↗¤→]/,"monadic-operator":{pattern:/[\\\/⌿⍀¨⍨⌶&∥]/,alias:"operator"},"dyadic-operator":{pattern:/[.⍣⍠⍤∘⌸@⌺⍥]/,alias:"operator"},assignment:{pattern:/←/,alias:"keyword"},punctuation:/[\[;\]()◇⋄]/,dfn:{pattern:/[{}⍺⍵⍶⍹∇⍫:]/,alias:"builtin"}}; \ No newline at end of file diff --git a/components/prism-asm6502.js b/components/prism-asm6502.js index f8e57d8817..9bd0af5b7d 100644 --- a/components/prism-asm6502.js +++ b/components/prism-asm6502.js @@ -6,19 +6,19 @@ Prism.languages.asm6502 = { }, 'string': /(["'`])(?:\\.|(?!\1)[^\\\r\n])*\1/, 'opcode': { - pattern: /\b(?:adc|and|asl|bcc|bcs|beq|bit|bmi|bne|bpl|brk|bvc|bvs|clc|cld|cli|clv|cmp|cpx|cpy|dec|dex|dey|eor|inc|inx|iny|jmp|jsr|lda|ldx|ldy|lsr|nop|ora|pha|php|pla|plp|rol|ror|rti|rts|sbc|sec|sed|sei|sta|stx|sty|tax|tay|tsx|txa|txs|tya|ADC|AND|ASL|BCC|BCS|BEQ|BIT|BMI|BNE|BPL|BRK|BVC|BVS|CLC|CLD|CLI|CLV|CMP|CPX|CPY|DEC|DEX|DEY|EOR|INC|INX|INY|JMP|JSR|LDA|LDX|LDY|LSR|NOP|ORA|PHA|PHP|PLA|PLP|ROL|ROR|RTI|RTS|SBC|SEC|SED|SEI|STA|STX|STY|TAX|TAY|TSX|TXA|TXS|TYA)\b/, + pattern: /\b(?:adc|and|asl|bcc|bcs|beq|bit|bmi|bne|bpl|brk|bvc|bvs|clc|cld|cli|clv|cmp|cpx|cpy|dec|dex|dey|eor|inc|inx|iny|jmp|jsr|lda|ldx|ldy|lsr|nop|ora|pha|php|pla|plp|rol|ror|rti|rts|sbc|sec|sed|sei|sta|stx|sty|tax|tay|tsx|txa|txs|tya|ADC|AND|ASL|BCC|BCS|BEQ|BIT|BMI|BNE|BPL|BRK|BVC|BVS|CLC|CLD|CLI|CLV|CMP|CPX|CPY|DEC|DEX|DEY|EOR|INC|INX|INY|JMP|JSR|LDA|LDX|LDY|LSR|NOP|ORA|PHA|PHP|PLA|PLP|ROL|ROR|RTI|RTS|SBC|SEC|SED|SEI|STA|STX|STY|TAX|TAY|TSX|TXA|TXS|TYA)\b/, alias: 'property' }, 'hexnumber': { - pattern: /#?\$[\da-f]{2,4}/i, + pattern: /#?\$[\da-f]{2,4}\b/i, alias: 'string' }, 'binarynumber': { - pattern: /#?%[01]+/, + pattern: /#?%[01]+\b/, alias: 'string' }, 'decimalnumber': { - pattern: /#?\d+/, + pattern: /#?\b\d+\b/, alias: 'string' }, 'register': { diff --git a/components/prism-asm6502.min.js b/components/prism-asm6502.min.js index c12b06a23d..2bfd7b351a 100644 --- a/components/prism-asm6502.min.js +++ b/components/prism-asm6502.min.js @@ -1 +1 @@ -Prism.languages.asm6502={comment:/;.*/,directive:{pattern:/\.\w+(?= )/,alias:"keyword"},string:/(["'`])(?:\\.|(?!\1)[^\\\r\n])*\1/,opcode:{pattern:/\b(?:adc|and|asl|bcc|bcs|beq|bit|bmi|bne|bpl|brk|bvc|bvs|clc|cld|cli|clv|cmp|cpx|cpy|dec|dex|dey|eor|inc|inx|iny|jmp|jsr|lda|ldx|ldy|lsr|nop|ora|pha|php|pla|plp|rol|ror|rti|rts|sbc|sec|sed|sei|sta|stx|sty|tax|tay|tsx|txa|txs|tya|ADC|AND|ASL|BCC|BCS|BEQ|BIT|BMI|BNE|BPL|BRK|BVC|BVS|CLC|CLD|CLI|CLV|CMP|CPX|CPY|DEC|DEX|DEY|EOR|INC|INX|INY|JMP|JSR|LDA|LDX|LDY|LSR|NOP|ORA|PHA|PHP|PLA|PLP|ROL|ROR|RTI|RTS|SBC|SEC|SED|SEI|STA|STX|STY|TAX|TAY|TSX|TXA|TXS|TYA)\b/,alias:"property"},hexnumber:{pattern:/#?\$[\da-f]{2,4}/i,alias:"string"},binarynumber:{pattern:/#?%[01]+/,alias:"string"},decimalnumber:{pattern:/#?\d+/,alias:"string"},register:{pattern:/\b[xya]\b/i,alias:"variable"}}; \ No newline at end of file +Prism.languages.asm6502={comment:/;.*/,directive:{pattern:/\.\w+(?= )/,alias:"keyword"},string:/(["'`])(?:\\.|(?!\1)[^\\\r\n])*\1/,opcode:{pattern:/\b(?:adc|and|asl|bcc|bcs|beq|bit|bmi|bne|bpl|brk|bvc|bvs|clc|cld|cli|clv|cmp|cpx|cpy|dec|dex|dey|eor|inc|inx|iny|jmp|jsr|lda|ldx|ldy|lsr|nop|ora|pha|php|pla|plp|rol|ror|rti|rts|sbc|sec|sed|sei|sta|stx|sty|tax|tay|tsx|txa|txs|tya|ADC|AND|ASL|BCC|BCS|BEQ|BIT|BMI|BNE|BPL|BRK|BVC|BVS|CLC|CLD|CLI|CLV|CMP|CPX|CPY|DEC|DEX|DEY|EOR|INC|INX|INY|JMP|JSR|LDA|LDX|LDY|LSR|NOP|ORA|PHA|PHP|PLA|PLP|ROL|ROR|RTI|RTS|SBC|SEC|SED|SEI|STA|STX|STY|TAX|TAY|TSX|TXA|TXS|TYA)\b/,alias:"property"},hexnumber:{pattern:/#?\$[\da-f]{2,4}\b/i,alias:"string"},binarynumber:{pattern:/#?%[01]+\b/,alias:"string"},decimalnumber:{pattern:/#?\b\d+\b/,alias:"string"},register:{pattern:/\b[xya]\b/i,alias:"variable"}}; \ No newline at end of file diff --git a/components/prism-css-extras.js b/components/prism-css-extras.js index cb71eb4d80..956c5f2225 100644 --- a/components/prism-css-extras.js +++ b/components/prism-css-extras.js @@ -75,7 +75,7 @@ }); var unit = { - pattern: /(\d)(?:%|[a-z]+)/, + pattern: /(\b\d+)(?:%|[a-z]+\b)/, lookbehind: true }; // 123 -123 .123 -.123 12.3 -12.3 @@ -107,6 +107,7 @@ } } ], + // it's important that there is no boundary assertion after the hex digits 'entity': /\\[\da-f]{1,8}/i, 'unit': unit, 'number': number diff --git a/components/prism-css-extras.min.js b/components/prism-css-extras.min.js index dd8a5d6df7..d99e341b69 100644 --- a/components/prism-css-extras.min.js +++ b/components/prism-css-extras.min.js @@ -1 +1 @@ -!function(e){var a,n=/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/;e.languages.css.selector={pattern:e.languages.css.selector,inside:a={"pseudo-element":/:(?:after|before|first-letter|first-line|selection)|::[-\w]+/,"pseudo-class":/:[-\w]+/,class:/\.[-\w]+/,id:/#[-\w]+/,attribute:{pattern:RegExp("\\[(?:[^[\\]\"']|"+n.source+")*\\]"),greedy:!0,inside:{punctuation:/^\[|\]$/,"case-sensitivity":{pattern:/(\s)[si]$/i,lookbehind:!0,alias:"keyword"},namespace:{pattern:/^(\s*)[-*\w\xA0-\uFFFF]*\|(?!=)/,lookbehind:!0,inside:{punctuation:/\|$/}},"attr-name":{pattern:/^(\s*)[-\w\xA0-\uFFFF]+/,lookbehind:!0},"attr-value":[n,{pattern:/(=\s*)[-\w\xA0-\uFFFF]+(?=\s*$)/,lookbehind:!0}],operator:/[|~*^$]?=/}},"n-th":[{pattern:/(\(\s*)[+-]?\d*[\dn](?:\s*[+-]\s*\d+)?(?=\s*\))/,lookbehind:!0,inside:{number:/[\dn]+/,operator:/[+-]/}},{pattern:/(\(\s*)(?:even|odd)(?=\s*\))/i,lookbehind:!0}],combinator:/>|\+|~|\|\|/,punctuation:/[(),]/}},e.languages.css.atrule.inside["selector-function-argument"].inside=a,e.languages.insertBefore("css","property",{variable:{pattern:/(^|[^-\w\xA0-\uFFFF])--[-_a-z\xA0-\uFFFF][-\w\xA0-\uFFFF]*/i,lookbehind:!0}});var r={pattern:/(\d)(?:%|[a-z]+)/,lookbehind:!0},i={pattern:/(^|[^\w.-])-?\d*\.?\d+/,lookbehind:!0};e.languages.insertBefore("css","function",{operator:{pattern:/(\s)[+\-*\/](?=\s)/,lookbehind:!0},hexcode:{pattern:/\B#(?:[\da-f]{1,2}){3,4}\b/i,alias:"color"},color:[/\b(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)\b/i,{pattern:/\b(?:rgb|hsl)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:rgb|hsl)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,inside:{unit:r,number:i,function:/[\w-]+(?=\()/,punctuation:/[(),]/}}],entity:/\\[\da-f]{1,8}/i,unit:r,number:i})}(Prism); \ No newline at end of file +!function(e){var a,n=/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/;e.languages.css.selector={pattern:e.languages.css.selector,inside:a={"pseudo-element":/:(?:after|before|first-letter|first-line|selection)|::[-\w]+/,"pseudo-class":/:[-\w]+/,class:/\.[-\w]+/,id:/#[-\w]+/,attribute:{pattern:RegExp("\\[(?:[^[\\]\"']|"+n.source+")*\\]"),greedy:!0,inside:{punctuation:/^\[|\]$/,"case-sensitivity":{pattern:/(\s)[si]$/i,lookbehind:!0,alias:"keyword"},namespace:{pattern:/^(\s*)[-*\w\xA0-\uFFFF]*\|(?!=)/,lookbehind:!0,inside:{punctuation:/\|$/}},"attr-name":{pattern:/^(\s*)[-\w\xA0-\uFFFF]+/,lookbehind:!0},"attr-value":[n,{pattern:/(=\s*)[-\w\xA0-\uFFFF]+(?=\s*$)/,lookbehind:!0}],operator:/[|~*^$]?=/}},"n-th":[{pattern:/(\(\s*)[+-]?\d*[\dn](?:\s*[+-]\s*\d+)?(?=\s*\))/,lookbehind:!0,inside:{number:/[\dn]+/,operator:/[+-]/}},{pattern:/(\(\s*)(?:even|odd)(?=\s*\))/i,lookbehind:!0}],combinator:/>|\+|~|\|\|/,punctuation:/[(),]/}},e.languages.css.atrule.inside["selector-function-argument"].inside=a,e.languages.insertBefore("css","property",{variable:{pattern:/(^|[^-\w\xA0-\uFFFF])--[-_a-z\xA0-\uFFFF][-\w\xA0-\uFFFF]*/i,lookbehind:!0}});var r={pattern:/(\b\d+)(?:%|[a-z]+\b)/,lookbehind:!0},i={pattern:/(^|[^\w.-])-?\d*\.?\d+/,lookbehind:!0};e.languages.insertBefore("css","function",{operator:{pattern:/(\s)[+\-*\/](?=\s)/,lookbehind:!0},hexcode:{pattern:/\B#(?:[\da-f]{1,2}){3,4}\b/i,alias:"color"},color:[/\b(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)\b/i,{pattern:/\b(?:rgb|hsl)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:rgb|hsl)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,inside:{unit:r,number:i,function:/[\w-]+(?=\()/,punctuation:/[(),]/}}],entity:/\\[\da-f]{1,8}/i,unit:r,number:i})}(Prism); \ No newline at end of file diff --git a/components/prism-ebnf.js b/components/prism-ebnf.js index 84609bc90e..0d9fde08bf 100644 --- a/components/prism-ebnf.js +++ b/components/prism-ebnf.js @@ -15,7 +15,7 @@ Prism.languages.ebnf = { lookbehind: true, alias: ['rule', 'keyword'] }, - 'rule': /[a-z]\w*(?:[ \t]+[a-z]\w*)*/i, + 'rule': /\b[a-z]\w*(?:[ \t]+[a-z]\w*)*\b/i, 'punctuation': /\([:/]|[:/]\)|[.,;()[\]{}]/, 'operator': /[-=|*/!]/ diff --git a/components/prism-ebnf.min.js b/components/prism-ebnf.min.js index 022b2991be..55889a6824 100644 --- a/components/prism-ebnf.min.js +++ b/components/prism-ebnf.min.js @@ -1 +1 @@ -Prism.languages.ebnf={comment:/\(\*[\s\S]*?\*\)/,string:{pattern:/"[^"\r\n]*"|'[^'\r\n]*'/,greedy:!0},special:{pattern:/\?[^?\r\n]*\?/,greedy:!0,alias:"class-name"},definition:{pattern:/^(\s*)[a-z]\w*(?:[ \t]+[a-z]\w*)*(?=\s*=)/im,lookbehind:!0,alias:["rule","keyword"]},rule:/[a-z]\w*(?:[ \t]+[a-z]\w*)*/i,punctuation:/\([:/]|[:/]\)|[.,;()[\]{}]/,operator:/[-=|*/!]/}; \ No newline at end of file +Prism.languages.ebnf={comment:/\(\*[\s\S]*?\*\)/,string:{pattern:/"[^"\r\n]*"|'[^'\r\n]*'/,greedy:!0},special:{pattern:/\?[^?\r\n]*\?/,greedy:!0,alias:"class-name"},definition:{pattern:/^(\s*)[a-z]\w*(?:[ \t]+[a-z]\w*)*(?=\s*=)/im,lookbehind:!0,alias:["rule","keyword"]},rule:/\b[a-z]\w*(?:[ \t]+[a-z]\w*)*\b/i,punctuation:/\([:/]|[:/]\)|[.,;()[\]{}]/,operator:/[-=|*/!]/}; \ No newline at end of file diff --git a/components/prism-eiffel.js b/components/prism-eiffel.js index 450d29a8ba..7afd7eeada 100644 --- a/components/prism-eiffel.js +++ b/components/prism-eiffel.js @@ -30,7 +30,7 @@ Prism.languages.eiffel = { // hexa | octal | bin /\b0[xcb][\da-f](?:_*[\da-f])*\b/i, // Decimal - /(?:\d(?:_*\d)*)?\.(?:(?:\d(?:_*\d)*)?e[+-]?)?\d(?:_*\d)*|\d(?:_*\d)*\.?/i + /(?:\b\d(?:_*\d)*)?\.(?:(?:\d(?:_*\d)*)?e[+-]?)?\d(?:_*\d)*\b|\b\d(?:_*\d)*\b\.?/i ], 'punctuation': /:=|<<|>>|\(\||\|\)|->|\.(?=\w)|[{}[\];(),:?]/, 'operator': /\\\\|\|\.\.\||\.\.|\/[~\/=]?|[><]=?|[-+*^=~]/ diff --git a/components/prism-eiffel.min.js b/components/prism-eiffel.min.js index 1dbd42c7af..43f7c14b02 100644 --- a/components/prism-eiffel.min.js +++ b/components/prism-eiffel.min.js @@ -1 +1 @@ -Prism.languages.eiffel={comment:/--.*/,string:[{pattern:/"([^[]*)\[[\s\S]*?\]\1"/,greedy:!0},{pattern:/"([^{]*)\{[\s\S]*?\}\1"/,greedy:!0},{pattern:/"(?:%\s*\n\s*%|%.|[^%"\r\n])*"/,greedy:!0}],char:/'(?:%.|[^%'\r\n])+'/,keyword:/\b(?:across|agent|alias|all|and|attached|as|assign|attribute|check|class|convert|create|Current|debug|deferred|detachable|do|else|elseif|end|ensure|expanded|export|external|feature|from|frozen|if|implies|inherit|inspect|invariant|like|local|loop|not|note|obsolete|old|once|or|Precursor|redefine|rename|require|rescue|Result|retry|select|separate|some|then|undefine|until|variant|Void|when|xor)\b/i,boolean:/\b(?:True|False)\b/i,"class-name":{pattern:/\b[A-Z][\dA-Z_]*\b/,alias:"builtin"},number:[/\b0[xcb][\da-f](?:_*[\da-f])*\b/i,/(?:\d(?:_*\d)*)?\.(?:(?:\d(?:_*\d)*)?e[+-]?)?\d(?:_*\d)*|\d(?:_*\d)*\.?/i],punctuation:/:=|<<|>>|\(\||\|\)|->|\.(?=\w)|[{}[\];(),:?]/,operator:/\\\\|\|\.\.\||\.\.|\/[~\/=]?|[><]=?|[-+*^=~]/}; \ No newline at end of file +Prism.languages.eiffel={comment:/--.*/,string:[{pattern:/"([^[]*)\[[\s\S]*?\]\1"/,greedy:!0},{pattern:/"([^{]*)\{[\s\S]*?\}\1"/,greedy:!0},{pattern:/"(?:%\s*\n\s*%|%.|[^%"\r\n])*"/,greedy:!0}],char:/'(?:%.|[^%'\r\n])+'/,keyword:/\b(?:across|agent|alias|all|and|attached|as|assign|attribute|check|class|convert|create|Current|debug|deferred|detachable|do|else|elseif|end|ensure|expanded|export|external|feature|from|frozen|if|implies|inherit|inspect|invariant|like|local|loop|not|note|obsolete|old|once|or|Precursor|redefine|rename|require|rescue|Result|retry|select|separate|some|then|undefine|until|variant|Void|when|xor)\b/i,boolean:/\b(?:True|False)\b/i,"class-name":{pattern:/\b[A-Z][\dA-Z_]*\b/,alias:"builtin"},number:[/\b0[xcb][\da-f](?:_*[\da-f])*\b/i,/(?:\b\d(?:_*\d)*)?\.(?:(?:\d(?:_*\d)*)?e[+-]?)?\d(?:_*\d)*\b|\b\d(?:_*\d)*\b\.?/i],punctuation:/:=|<<|>>|\(\||\|\)|->|\.(?=\w)|[{}[\];(),:?]/,operator:/\\\\|\|\.\.\||\.\.|\/[~\/=]?|[><]=?|[-+*^=~]/}; \ No newline at end of file diff --git a/components/prism-excel-formula.js b/components/prism-excel-formula.js index b81d673a48..c5444d8e47 100644 --- a/components/prism-excel-formula.js +++ b/components/prism-excel-formula.js @@ -38,11 +38,11 @@ Prism.languages['excel-formula'] = { } }, 'function-name': { - pattern: /[A-Z]\w*(?=\()/i, + pattern: /\b[A-Z]\w*(?=\()/i, alias: 'keyword' }, 'range': { - pattern: /\$?(?:[A-Z]+\$?\d+:\$?[A-Z]+\$?\d+|[A-Z]+:\$?[A-Z]+|\d+:\$?\d+)/i, + pattern: /\$?\b(?:[A-Z]+\$?\d+:\$?[A-Z]+\$?\d+|[A-Z]+:\$?[A-Z]+|\d+:\$?\d+)\b/i, alias: 'property', inside: { 'operator': /:/, @@ -54,7 +54,7 @@ Prism.languages['excel-formula'] = { 'cell': { // Excel is case insensitive, so the string "foo1" could be either a variable or a cell. // To combat this, we match cells case insensitive, if the contain at least one "$", and case sensitive otherwise. - pattern: /[A-Z]+\d+|\$[A-Za-z]+\$?\d+|[A-Za-z]+\$\d+/, + pattern: /\b[A-Z]+\d+\b|\$[A-Za-z]+\$?\d+\b|\b[A-Za-z]+\$\d+\b/, alias: 'property' }, 'number': /(?:\b\d+(?:\.\d+)?|\B\.\d+)(?:e[+-]?\d+)?\b/i, diff --git a/components/prism-excel-formula.min.js b/components/prism-excel-formula.min.js index 1c8affb9a5..c165540253 100644 --- a/components/prism-excel-formula.min.js +++ b/components/prism-excel-formula.min.js @@ -1 +1 @@ -Prism.languages["excel-formula"]={comment:{pattern:/(\bN\(\s*)"(?:[^"]|"")*"(?=\s*\))/i,lookbehind:!0,greedy:!0},string:{pattern:/"(?:[^"]|"")*"(?!")/,greedy:!0},reference:{pattern:/(?:'[^']*'|(?:[^\s()[\]{}<>*?"';,$&]*\[[^^\s()[\]{}<>*?"']+\])?\w+)!/,greedy:!0,alias:"string",inside:{operator:/!$/,punctuation:/'/,sheet:{pattern:/[^[\]]+$/,alias:"function"},file:{pattern:/\[[^[\]]+\]$/,inside:{punctuation:/[[\]]/}},path:/[\s\S]+/}},"function-name":{pattern:/[A-Z]\w*(?=\()/i,alias:"keyword"},range:{pattern:/\$?(?:[A-Z]+\$?\d+:\$?[A-Z]+\$?\d+|[A-Z]+:\$?[A-Z]+|\d+:\$?\d+)/i,alias:"property",inside:{operator:/:/,cell:/\$?[A-Z]+\$?\d+/i,column:/\$?[A-Z]+/i,row:/\$?\d+/}},cell:{pattern:/[A-Z]+\d+|\$[A-Za-z]+\$?\d+|[A-Za-z]+\$\d+/,alias:"property"},number:/(?:\b\d+(?:\.\d+)?|\B\.\d+)(?:e[+-]?\d+)?\b/i,boolean:/\b(?:TRUE|FALSE)\b/i,operator:/[-+*/^%=&,]|<[=>]?|>=?/,punctuation:/[[\]();{}|]/},Prism.languages.xlsx=Prism.languages.xls=Prism.languages["excel-formula"]; \ No newline at end of file +Prism.languages["excel-formula"]={comment:{pattern:/(\bN\(\s*)"(?:[^"]|"")*"(?=\s*\))/i,lookbehind:!0,greedy:!0},string:{pattern:/"(?:[^"]|"")*"(?!")/,greedy:!0},reference:{pattern:/(?:'[^']*'|(?:[^\s()[\]{}<>*?"';,$&]*\[[^^\s()[\]{}<>*?"']+\])?\w+)!/,greedy:!0,alias:"string",inside:{operator:/!$/,punctuation:/'/,sheet:{pattern:/[^[\]]+$/,alias:"function"},file:{pattern:/\[[^[\]]+\]$/,inside:{punctuation:/[[\]]/}},path:/[\s\S]+/}},"function-name":{pattern:/\b[A-Z]\w*(?=\()/i,alias:"keyword"},range:{pattern:/\$?\b(?:[A-Z]+\$?\d+:\$?[A-Z]+\$?\d+|[A-Z]+:\$?[A-Z]+|\d+:\$?\d+)\b/i,alias:"property",inside:{operator:/:/,cell:/\$?[A-Z]+\$?\d+/i,column:/\$?[A-Z]+/i,row:/\$?\d+/}},cell:{pattern:/\b[A-Z]+\d+\b|\$[A-Za-z]+\$?\d+\b|\b[A-Za-z]+\$\d+\b/,alias:"property"},number:/(?:\b\d+(?:\.\d+)?|\B\.\d+)(?:e[+-]?\d+)?\b/i,boolean:/\b(?:TRUE|FALSE)\b/i,operator:/[-+*/^%=&,]|<[=>]?|>=?/,punctuation:/[[\]();{}|]/},Prism.languages.xlsx=Prism.languages.xls=Prism.languages["excel-formula"]; \ No newline at end of file diff --git a/components/prism-hcl.js b/components/prism-hcl.js index 89e873ea22..d614c7c80b 100644 --- a/components/prism-hcl.js +++ b/components/prism-hcl.js @@ -26,9 +26,7 @@ Prism.languages.hcl = { } } }, - { - pattern: /[\w-]+(?=\s+{)/ - } + /[\w-]+(?=\s+{)/ ], 'property': [ /[\w-\.]+(?=\s*=(?!=))/, @@ -53,13 +51,13 @@ Prism.languages.hcl = { pattern: /"(?:\\[\s\S]|[^\\"])*"/, greedy: true, }, - 'number': /\b0x[\da-f]+|\d+\.?\d*(?:e[+-]?\d+)?/i, + 'number': /\b0x[\da-f]+\b|\b\d+\.?\d*(?:e[+-]?\d+)?/i, 'punctuation': /[!\$#%&'()*+,.\/;<=>@\[\\\]^`{|}~?:]/, } }, } }, - 'number': /\b0x[\da-f]+|\d+\.?\d*(?:e[+-]?\d+)?/i, + 'number': /\b0x[\da-f]+\b|\b\d+\.?\d*(?:e[+-]?\d+)?/i, 'boolean': /\b(?:true|false)\b/i, 'punctuation': /[=\[\]{}]/, }; diff --git a/components/prism-hcl.min.js b/components/prism-hcl.min.js index 2d6e26ca31..c2d7b19290 100644 --- a/components/prism-hcl.min.js +++ b/components/prism-hcl.min.js @@ -1 +1 @@ -Prism.languages.hcl={comment:/(?:\/\/|#).*|\/\*[\s\S]*?(?:\*\/|$)/,heredoc:{pattern:/<<-?(\w+)[\s\S]*?^\s*\1/m,greedy:!0,alias:"string"},keyword:[{pattern:/(?:resource|data)\s+(?:"(?:\\[\s\S]|[^\\"])*")(?=\s+"[\w-]+"\s+{)/i,inside:{type:{pattern:/(resource|data|\s+)(?:"(?:\\[\s\S]|[^\\"])*")/i,lookbehind:!0,alias:"variable"}}},{pattern:/(?:provider|provisioner|variable|output|module|backend)\s+(?:[\w-]+|"(?:\\[\s\S]|[^\\"])*")\s+(?={)/i,inside:{type:{pattern:/(provider|provisioner|variable|output|module|backend)\s+(?:[\w-]+|"(?:\\[\s\S]|[^\\"])*")\s+/i,lookbehind:!0,alias:"variable"}}},{pattern:/[\w-]+(?=\s+{)/}],property:[/[\w-\.]+(?=\s*=(?!=))/,/"(?:\\[\s\S]|[^\\"])+"(?=\s*[:=])/],string:{pattern:/"(?:[^\\$"]|\\[\s\S]|\$(?:(?=")|\$+|[^"${])|\$\{(?:[^{}"]|"(?:[^\\"]|\\[\s\S])*")*\})*"/,greedy:!0,inside:{interpolation:{pattern:/(^|[^$])\$\{(?:[^{}"]|"(?:[^\\"]|\\[\s\S])*")*\}/,lookbehind:!0,inside:{type:{pattern:/(\b(?:terraform|var|self|count|module|path|data|local)\b\.)[\w\*]+/i,lookbehind:!0,alias:"variable"},keyword:/\b(?:terraform|var|self|count|module|path|data|local)\b/i,function:/\w+(?=\()/,string:{pattern:/"(?:\\[\s\S]|[^\\"])*"/,greedy:!0},number:/\b0x[\da-f]+|\d+\.?\d*(?:e[+-]?\d+)?/i,punctuation:/[!\$#%&'()*+,.\/;<=>@\[\\\]^`{|}~?:]/}}}},number:/\b0x[\da-f]+|\d+\.?\d*(?:e[+-]?\d+)?/i,boolean:/\b(?:true|false)\b/i,punctuation:/[=\[\]{}]/}; \ No newline at end of file +Prism.languages.hcl={comment:/(?:\/\/|#).*|\/\*[\s\S]*?(?:\*\/|$)/,heredoc:{pattern:/<<-?(\w+)[\s\S]*?^\s*\1/m,greedy:!0,alias:"string"},keyword:[{pattern:/(?:resource|data)\s+(?:"(?:\\[\s\S]|[^\\"])*")(?=\s+"[\w-]+"\s+{)/i,inside:{type:{pattern:/(resource|data|\s+)(?:"(?:\\[\s\S]|[^\\"])*")/i,lookbehind:!0,alias:"variable"}}},{pattern:/(?:provider|provisioner|variable|output|module|backend)\s+(?:[\w-]+|"(?:\\[\s\S]|[^\\"])*")\s+(?={)/i,inside:{type:{pattern:/(provider|provisioner|variable|output|module|backend)\s+(?:[\w-]+|"(?:\\[\s\S]|[^\\"])*")\s+/i,lookbehind:!0,alias:"variable"}}},/[\w-]+(?=\s+{)/],property:[/[\w-\.]+(?=\s*=(?!=))/,/"(?:\\[\s\S]|[^\\"])+"(?=\s*[:=])/],string:{pattern:/"(?:[^\\$"]|\\[\s\S]|\$(?:(?=")|\$+|[^"${])|\$\{(?:[^{}"]|"(?:[^\\"]|\\[\s\S])*")*\})*"/,greedy:!0,inside:{interpolation:{pattern:/(^|[^$])\$\{(?:[^{}"]|"(?:[^\\"]|\\[\s\S])*")*\}/,lookbehind:!0,inside:{type:{pattern:/(\b(?:terraform|var|self|count|module|path|data|local)\b\.)[\w\*]+/i,lookbehind:!0,alias:"variable"},keyword:/\b(?:terraform|var|self|count|module|path|data|local)\b/i,function:/\w+(?=\()/,string:{pattern:/"(?:\\[\s\S]|[^\\"])*"/,greedy:!0},number:/\b0x[\da-f]+\b|\b\d+\.?\d*(?:e[+-]?\d+)?/i,punctuation:/[!\$#%&'()*+,.\/;<=>@\[\\\]^`{|}~?:]/}}}},number:/\b0x[\da-f]+\b|\b\d+\.?\d*(?:e[+-]?\d+)?/i,boolean:/\b(?:true|false)\b/i,punctuation:/[=\[\]{}]/}; \ No newline at end of file diff --git a/components/prism-hpkp.js b/components/prism-hpkp.js index bd87b2b290..1db02643d2 100644 --- a/components/prism-hpkp.js +++ b/components/prism-hpkp.js @@ -10,11 +10,11 @@ Prism.languages.hpkp = { alias: 'keyword' }, 'safe': { - pattern: /\d{7,}/, + pattern: /\b\d{7,}\b/, alias: 'selector' }, 'unsafe': { - pattern: /\d{1,6}/, + pattern: /\b\d{1,6}\b/, alias: 'function' } }; diff --git a/components/prism-hpkp.min.js b/components/prism-hpkp.min.js index 9cc6503a64..099dfdea14 100644 --- a/components/prism-hpkp.min.js +++ b/components/prism-hpkp.min.js @@ -1 +1 @@ -Prism.languages.hpkp={directive:{pattern:/\b(?:(?:includeSubDomains|preload|strict)(?: |;)|pin-sha256="[a-zA-Z\d+=/]+"|(?:max-age|report-uri)=|report-to )/,alias:"keyword"},safe:{pattern:/\d{7,}/,alias:"selector"},unsafe:{pattern:/\d{1,6}/,alias:"function"}}; \ No newline at end of file +Prism.languages.hpkp={directive:{pattern:/\b(?:(?:includeSubDomains|preload|strict)(?: |;)|pin-sha256="[a-zA-Z\d+=/]+"|(?:max-age|report-uri)=|report-to )/,alias:"keyword"},safe:{pattern:/\b\d{7,}\b/,alias:"selector"},unsafe:{pattern:/\b\d{1,6}\b/,alias:"function"}}; \ No newline at end of file diff --git a/components/prism-hsts.js b/components/prism-hsts.js index c6bf354c00..4d56433fd0 100644 --- a/components/prism-hsts.js +++ b/components/prism-hsts.js @@ -10,11 +10,11 @@ Prism.languages.hsts = { alias: 'keyword' }, 'safe': { - pattern: /\d{8,}/, + pattern: /\b\d{8,}\b/, alias: 'selector' }, 'unsafe': { - pattern: /\d{1,7}/, + pattern: /\b\d{1,7}\b/, alias: 'function' } }; diff --git a/components/prism-hsts.min.js b/components/prism-hsts.min.js index 4af1e8f2e5..b92d756c52 100644 --- a/components/prism-hsts.min.js +++ b/components/prism-hsts.min.js @@ -1 +1 @@ -Prism.languages.hsts={directive:{pattern:/\b(?:max-age=|includeSubDomains|preload)/,alias:"keyword"},safe:{pattern:/\d{8,}/,alias:"selector"},unsafe:{pattern:/\d{1,7}/,alias:"function"}}; \ No newline at end of file +Prism.languages.hsts={directive:{pattern:/\b(?:max-age=|includeSubDomains|preload)/,alias:"keyword"},safe:{pattern:/\b\d{8,}\b/,alias:"selector"},unsafe:{pattern:/\b\d{1,7}\b/,alias:"function"}}; \ No newline at end of file diff --git a/components/prism-j.js b/components/prism-j.js index b8b91d23d7..c86a2e8698 100644 --- a/components/prism-j.js +++ b/components/prism-j.js @@ -11,7 +11,7 @@ Prism.languages.j = { pattern: /(?!\^:|;\.|[=!][.:])(?:\{(?:\.|::?)?|p(?:\.\.?|:)|[=!\]]|[<>+*\-%$|,#][.:]?|[?^]\.?|[;\[]:?|[~}"i][.:]|[ACeEIjLor]\.|(?:[_\/\\qsux]|_?\d):)/, alias: 'keyword' }, - 'number': /\b_?(?:(?!\d:)\d+(?:\.\d+)?(?:(?:[ejpx]|ad|ar)_?\d+(?:\.\d+)?)*(?:b_?[\da-z]+(?:\.[\da-z]+)?)?|_(?!\.))/, + 'number': /\b_?(?:(?!\d:)\d+(?:\.\d+)?(?:(?:[ejpx]|ad|ar)_?\d+(?:\.\d+)?)*(?:b_?[\da-z]+(?:\.[\da-z]+)?)?|_\b(?!\.))/, 'adverb': { pattern: /[~}]|[\/\\]\.?|[bfM]\.|t[.:]/, alias: 'builtin' @@ -22,4 +22,4 @@ Prism.languages.j = { alias: 'variable' }, 'punctuation': /[()]/ -}; \ No newline at end of file +}; diff --git a/components/prism-j.min.js b/components/prism-j.min.js index 2171b6219c..a7b71721ca 100644 --- a/components/prism-j.min.js +++ b/components/prism-j.min.js @@ -1 +1 @@ -Prism.languages.j={comment:/\bNB\..*/,string:{pattern:/'(?:''|[^'\r\n])*'/,greedy:!0},keyword:/\b(?:(?:adverb|conjunction|CR|def|define|dyad|LF|monad|noun|verb)\b|(?:assert|break|case|catch[dt]?|continue|do|else|elseif|end|fcase|for|for_\w+|goto_\w+|if|label_\w+|return|select|throw|try|while|whilst)\.)/,verb:{pattern:/(?!\^:|;\.|[=!][.:])(?:\{(?:\.|::?)?|p(?:\.\.?|:)|[=!\]]|[<>+*\-%$|,#][.:]?|[?^]\.?|[;\[]:?|[~}"i][.:]|[ACeEIjLor]\.|(?:[_\/\\qsux]|_?\d):)/,alias:"keyword"},number:/\b_?(?:(?!\d:)\d+(?:\.\d+)?(?:(?:[ejpx]|ad|ar)_?\d+(?:\.\d+)?)*(?:b_?[\da-z]+(?:\.[\da-z]+)?)?|_(?!\.))/,adverb:{pattern:/[~}]|[\/\\]\.?|[bfM]\.|t[.:]/,alias:"builtin"},operator:/[=a][.:]|_\./,conjunction:{pattern:/&(?:\.:?|:)?|[.:@][.:]?|[!D][.:]|[;dHT]\.|`:?|[\^LS]:|"/,alias:"variable"},punctuation:/[()]/}; \ No newline at end of file +Prism.languages.j={comment:/\bNB\..*/,string:{pattern:/'(?:''|[^'\r\n])*'/,greedy:!0},keyword:/\b(?:(?:adverb|conjunction|CR|def|define|dyad|LF|monad|noun|verb)\b|(?:assert|break|case|catch[dt]?|continue|do|else|elseif|end|fcase|for|for_\w+|goto_\w+|if|label_\w+|return|select|throw|try|while|whilst)\.)/,verb:{pattern:/(?!\^:|;\.|[=!][.:])(?:\{(?:\.|::?)?|p(?:\.\.?|:)|[=!\]]|[<>+*\-%$|,#][.:]?|[?^]\.?|[;\[]:?|[~}"i][.:]|[ACeEIjLor]\.|(?:[_\/\\qsux]|_?\d):)/,alias:"keyword"},number:/\b_?(?:(?!\d:)\d+(?:\.\d+)?(?:(?:[ejpx]|ad|ar)_?\d+(?:\.\d+)?)*(?:b_?[\da-z]+(?:\.[\da-z]+)?)?|_\b(?!\.))/,adverb:{pattern:/[~}]|[\/\\]\.?|[bfM]\.|t[.:]/,alias:"builtin"},operator:/[=a][.:]|_\./,conjunction:{pattern:/&(?:\.:?|:)?|[.:@][.:]?|[!D][.:]|[;dHT]\.|`:?|[\^LS]:|"/,alias:"variable"},punctuation:/[()]/}; \ No newline at end of file diff --git a/components/prism-jq.js b/components/prism-jq.js index c7d234226f..ee44b3a0c3 100644 --- a/components/prism-jq.js +++ b/components/prism-jq.js @@ -37,12 +37,12 @@ 'variable': /\B\$\w+/, 'property-literal': { - pattern: /[a-z_]\w*(?=\s*:(?!:))/i, + pattern: /\b[a-z_]\w*(?=\s*:(?!:))/i, alias: 'property' }, 'keyword': /\b(?:as|break|catch|def|elif|else|end|foreach|if|import|include|label|module|modulemeta|null|reduce|then|try|while)\b/, 'boolean': /\b(?:true|false)\b/, - 'number': /(?:\b\d+\.|\B\.)?\d+(?:[eE][+-]?\d+)?\b/, + 'number': /(?:\b\d+\.|\B\.)?\b\d+(?:[eE][+-]?\d+)?\b/, 'operator': [ { diff --git a/components/prism-jq.min.js b/components/prism-jq.min.js index 03f544baa9..9ace5cf92c 100644 --- a/components/prism-jq.min.js +++ b/components/prism-jq.min.js @@ -1 +1 @@ -!function(e){var n="\\\\\\((?:[^()]|\\([^()]*\\))*\\)",t=RegExp('"(?:[^"\r\n\\\\]|\\\\[^\r\n(]|__)*"'.replace(/__/g,function(){return n})),i={interpolation:{pattern:RegExp("((?:^|[^\\\\])(?:\\\\{2})*)"+n),lookbehind:!0,inside:{content:{pattern:/^(\\\()[\s\S]+(?=\)$)/,lookbehind:!0,inside:null},punctuation:/^\\\(|\)$/}}},a=e.languages.jq={comment:/#.*/,property:{pattern:RegExp(t.source+"(?=\\s*:(?!:))"),greedy:!0,inside:i},string:{pattern:t,greedy:!0,inside:i},function:{pattern:/(\bdef\s+)[a-z_]\w+/i,lookbehind:!0},variable:/\B\$\w+/,"property-literal":{pattern:/[a-z_]\w*(?=\s*:(?!:))/i,alias:"property"},keyword:/\b(?:as|break|catch|def|elif|else|end|foreach|if|import|include|label|module|modulemeta|null|reduce|then|try|while)\b/,boolean:/\b(?:true|false)\b/,number:/(?:\b\d+\.|\B\.)?\d+(?:[eE][+-]?\d+)?\b/,operator:[{pattern:/\|=?/,alias:"pipe"},/\.\.|[!=<>]?=|\?\/\/|\/\/=?|[-+*/%]=?|[<>?]|\b(?:and|or|not)\b/],"c-style-function":{pattern:/\b[a-z_]\w*(?=\s*\()/i,alias:"function"},punctuation:/::|[()\[\]{},:;]|\.(?=\s*[\[\w$])/,dot:{pattern:/\./,alias:"important"}};i.interpolation.inside.content.inside=a}(Prism); \ No newline at end of file +!function(e){var n="\\\\\\((?:[^()]|\\([^()]*\\))*\\)",t=RegExp('"(?:[^"\r\n\\\\]|\\\\[^\r\n(]|__)*"'.replace(/__/g,function(){return n})),i={interpolation:{pattern:RegExp("((?:^|[^\\\\])(?:\\\\{2})*)"+n),lookbehind:!0,inside:{content:{pattern:/^(\\\()[\s\S]+(?=\)$)/,lookbehind:!0,inside:null},punctuation:/^\\\(|\)$/}}},a=e.languages.jq={comment:/#.*/,property:{pattern:RegExp(t.source+"(?=\\s*:(?!:))"),greedy:!0,inside:i},string:{pattern:t,greedy:!0,inside:i},function:{pattern:/(\bdef\s+)[a-z_]\w+/i,lookbehind:!0},variable:/\B\$\w+/,"property-literal":{pattern:/\b[a-z_]\w*(?=\s*:(?!:))/i,alias:"property"},keyword:/\b(?:as|break|catch|def|elif|else|end|foreach|if|import|include|label|module|modulemeta|null|reduce|then|try|while)\b/,boolean:/\b(?:true|false)\b/,number:/(?:\b\d+\.|\B\.)?\b\d+(?:[eE][+-]?\d+)?\b/,operator:[{pattern:/\|=?/,alias:"pipe"},/\.\.|[!=<>]?=|\?\/\/|\/\/=?|[-+*/%]=?|[<>?]|\b(?:and|or|not)\b/],"c-style-function":{pattern:/\b[a-z_]\w*(?=\s*\()/i,alias:"function"},punctuation:/::|[()\[\]{},:;]|\.(?=\s*[\[\w$])/,dot:{pattern:/\./,alias:"important"}};i.interpolation.inside.content.inside=a}(Prism); \ No newline at end of file diff --git a/components/prism-json.js b/components/prism-json.js index 48495f36b0..8f9ae4a517 100644 --- a/components/prism-json.js +++ b/components/prism-json.js @@ -1,3 +1,4 @@ +// https://www.json.org/json-en.html Prism.languages.json = { 'property': { pattern: /"(?:\\.|[^\\"\r\n])*"(?=\s*:)/, @@ -8,7 +9,7 @@ Prism.languages.json = { greedy: true }, 'comment': /\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/, - 'number': /-?\d+\.?\d*(?:e[+-]?\d+)?/i, + 'number': /-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i, 'punctuation': /[{}[\],]/, 'operator': /:/, 'boolean': /\b(?:true|false)\b/, diff --git a/components/prism-json.min.js b/components/prism-json.min.js index 3159a1435d..fd102bf591 100644 --- a/components/prism-json.min.js +++ b/components/prism-json.min.js @@ -1 +1 @@ -Prism.languages.json={property:{pattern:/"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,greedy:!0},string:{pattern:/"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,greedy:!0},comment:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,number:/-?\d+\.?\d*(?:e[+-]?\d+)?/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:true|false)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}},Prism.languages.webmanifest=Prism.languages.json; \ No newline at end of file +Prism.languages.json={property:{pattern:/"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,greedy:!0},string:{pattern:/"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,greedy:!0},comment:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:true|false)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}},Prism.languages.webmanifest=Prism.languages.json; \ No newline at end of file diff --git a/components/prism-json5.js b/components/prism-json5.js index c64238d74a..7b8858fab5 100644 --- a/components/prism-json5.js +++ b/components/prism-json5.js @@ -17,7 +17,7 @@ pattern: string, greedy: true }, - 'number': /[+-]?(?:NaN|Infinity|0x[a-fA-F\d]+|(?:\d+\.?\d*|\.\d+)(?:[eE][+-]?\d+)?)/ + 'number': /[+-]?\b(?:NaN|Infinity|0x[a-fA-F\d]+)\b|[+-]?(?:\b\d+\.?\d*|\B\.\d+)(?:[eE][+-]?\d+\b)?/ }); }(Prism)); diff --git a/components/prism-json5.min.js b/components/prism-json5.min.js index 3abd8f392f..b557751432 100644 --- a/components/prism-json5.min.js +++ b/components/prism-json5.min.js @@ -1 +1 @@ -!function(n){var e=/("|')(?:\\(?:\r\n?|\n|.)|(?!\1)[^\\\r\n])*\1/;n.languages.json5=n.languages.extend("json",{property:[{pattern:RegExp(e.source+"(?=\\s*:)"),greedy:!0},{pattern:/[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*:)/,alias:"unquoted"}],string:{pattern:e,greedy:!0},number:/[+-]?(?:NaN|Infinity|0x[a-fA-F\d]+|(?:\d+\.?\d*|\.\d+)(?:[eE][+-]?\d+)?)/})}(Prism); \ No newline at end of file +!function(n){var e=/("|')(?:\\(?:\r\n?|\n|.)|(?!\1)[^\\\r\n])*\1/;n.languages.json5=n.languages.extend("json",{property:[{pattern:RegExp(e.source+"(?=\\s*:)"),greedy:!0},{pattern:/[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*:)/,alias:"unquoted"}],string:{pattern:e,greedy:!0},number:/[+-]?\b(?:NaN|Infinity|0x[a-fA-F\d]+)\b|[+-]?(?:\b\d+\.?\d*|\B\.\d+)(?:[eE][+-]?\d+\b)?/})}(Prism); \ No newline at end of file diff --git a/components/prism-markdown.js b/components/prism-markdown.js index 51de0ba275..75bc6deacf 100644 --- a/components/prism-markdown.js +++ b/components/prism-markdown.js @@ -11,14 +11,10 @@ * _Note:_ Keep in mind that this adds a capturing group. * * @param {string} pattern - * @param {boolean} starAlternative Whether to also add an alternative where all `_`s are replaced with `*`s. * @returns {RegExp} */ - function createInline(pattern, starAlternative) { + function createInline(pattern) { pattern = pattern.replace(//g, function () { return inner; }); - if (starAlternative) { - pattern = pattern + '|' + pattern.replace(/_/g, '\\*'); - } return RegExp(/((?:^|[^\\])(?:\\{2})*)/.source + '(?:' + pattern + ')'); } @@ -164,7 +160,7 @@ // __strong__ // allow one nested instance of italic text using the same delimiter - pattern: createInline(/__(?:(?!_)|_(?:(?!_))+_)+__/.source, true), + pattern: createInline(/\b__(?:(?!_)|_(?:(?!_))+_)+__\b|\*\*(?:(?!\*)|\*(?:(?!\*))+\*)+\*\*/.source), lookbehind: true, greedy: true, inside: { @@ -181,7 +177,7 @@ // _em_ // allow one nested instance of bold text using the same delimiter - pattern: createInline(/_(?:(?!_)|__(?:(?!_))+__)+_/.source, true), + pattern: createInline(/\b_(?:(?!_)|__(?:(?!_))+__)+_\b|\*(?:(?!\*)|\*\*(?:(?!\*))+\*\*)+\*/.source), lookbehind: true, greedy: true, inside: { @@ -196,7 +192,7 @@ 'strike': { // ~~strike through~~ // ~strike~ - pattern: createInline(/(~~?)(?:(?!~))+?\2/.source, false), + pattern: createInline(/(~~?)(?:(?!~))+?\2/.source), lookbehind: true, greedy: true, inside: { @@ -212,7 +208,7 @@ // [example](http://example.com "Optional title") // [example][id] // [example] [id] - pattern: createInline(/!?\[(?:(?!\]))+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)| ?\[(?:(?!\]))+\])/.source, false), + pattern: createInline(/!?\[(?:(?!\]))+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)| ?\[(?:(?!\]))+\])/.source), lookbehind: true, greedy: true, inside: { diff --git a/components/prism-markdown.min.js b/components/prism-markdown.min.js index f49ac890df..f4a6da225f 100644 --- a/components/prism-markdown.min.js +++ b/components/prism-markdown.min.js @@ -1 +1 @@ -!function(d){function n(n,e){return n=n.replace(//g,function(){return"(?:\\\\.|[^\\\\\n\r]|(?:\n|\r\n?)(?!\n|\r\n?))"}),e&&(n=n+"|"+n.replace(/_/g,"\\*")),RegExp("((?:^|[^\\\\])(?:\\\\{2})*)(?:"+n+")")}var e="(?:\\\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\\\|\r\n`])+",t="\\|?__(?:\\|__)+\\|?(?:(?:\n|\r\n?)|$)".replace(/__/g,function(){return e}),a="\\|?[ \t]*:?-{3,}:?[ \t]*(?:\\|[ \t]*:?-{3,}:?[ \t]*)+\\|?(?:\n|\r\n?)";d.languages.markdown=d.languages.extend("markup",{}),d.languages.insertBefore("markdown","prolog",{blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+t+a+"(?:"+t+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+t+a+")(?:"+t+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(e),inside:d.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+t+")"+a+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+t+"$"),inside:{"table-header":{pattern:RegExp(e),alias:"important",inside:d.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/``.+?``|`[^`\r\n]+`/,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#+.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n("__(?:(?!_)|_(?:(?!_))+_)+__",!0),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n("_(?:(?!_)|__(?:(?!_))+__)+_",!0),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n("(~~?)(?:(?!~))+?\\2",!1),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},url:{pattern:n('!?\\[(?:(?!\\]))+\\](?:\\([^\\s)]+(?:[\t ]+"(?:\\\\.|[^"\\\\])*")?\\)| ?\\[(?:(?!\\]))+\\])',!1),lookbehind:!0,greedy:!0,inside:{variable:{pattern:/(\[)[^\]]+(?=\]$)/,lookbehind:!0},content:{pattern:/(^!?\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},string:{pattern:/"(?:\\.|[^"\\])*"(?=\)$)/}}}}),["url","bold","italic","strike"].forEach(function(e){["url","bold","italic","strike"].forEach(function(n){e!==n&&(d.languages.markdown[e].inside.content.inside[n]=d.languages.markdown[n])})}),d.hooks.add("after-tokenize",function(n){"markdown"!==n.language&&"md"!==n.language||!function n(e){if(e&&"string"!=typeof e)for(var t=0,a=e.length;t/g,function(){return"(?:\\\\.|[^\\\\\n\r]|(?:\n|\r\n?)(?!\n|\r\n?))"}),RegExp("((?:^|[^\\\\])(?:\\\\{2})*)(?:"+n+")")}var e="(?:\\\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\\\|\r\n`])+",t="\\|?__(?:\\|__)+\\|?(?:(?:\n|\r\n?)|$)".replace(/__/g,function(){return e}),a="\\|?[ \t]*:?-{3,}:?[ \t]*(?:\\|[ \t]*:?-{3,}:?[ \t]*)+\\|?(?:\n|\r\n?)";d.languages.markdown=d.languages.extend("markup",{}),d.languages.insertBefore("markdown","prolog",{blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+t+a+"(?:"+t+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+t+a+")(?:"+t+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(e),inside:d.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+t+")"+a+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+t+"$"),inside:{"table-header":{pattern:RegExp(e),alias:"important",inside:d.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/``.+?``|`[^`\r\n]+`/,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#+.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n("\\b__(?:(?!_)|_(?:(?!_))+_)+__\\b|\\*\\*(?:(?!\\*)|\\*(?:(?!\\*))+\\*)+\\*\\*"),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n("\\b_(?:(?!_)|__(?:(?!_))+__)+_\\b|\\*(?:(?!\\*)|\\*\\*(?:(?!\\*))+\\*\\*)+\\*"),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n("(~~?)(?:(?!~))+?\\2"),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},url:{pattern:n('!?\\[(?:(?!\\]))+\\](?:\\([^\\s)]+(?:[\t ]+"(?:\\\\.|[^"\\\\])*")?\\)| ?\\[(?:(?!\\]))+\\])'),lookbehind:!0,greedy:!0,inside:{variable:{pattern:/(\[)[^\]]+(?=\]$)/,lookbehind:!0},content:{pattern:/(^!?\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},string:{pattern:/"(?:\\.|[^"\\])*"(?=\)$)/}}}}),["url","bold","italic","strike"].forEach(function(e){["url","bold","italic","strike"].forEach(function(n){e!==n&&(d.languages.markdown[e].inside.content.inside[n]=d.languages.markdown[n])})}),d.hooks.add("after-tokenize",function(n){"markdown"!==n.language&&"md"!==n.language||!function n(e){if(e&&"string"!=typeof e)for(var t=0,a=e.length;t@^|&+\-*\/$%!?~][!$%&*+\-.\/:<=>?@^|~]*|\b(?:and|asr|land|lor|lsl|lsr|lxor|mod|or)\b/, - 'punctuation': /[(){}\[\]|_.,:;]/ -}; \ No newline at end of file + 'punctuation': /[(){}\[\]|.,:;]|\b_\b/ +}; diff --git a/components/prism-ocaml.min.js b/components/prism-ocaml.min.js index 25114ede1c..b4ea3c5b38 100644 --- a/components/prism-ocaml.min.js +++ b/components/prism-ocaml.min.js @@ -1 +1 @@ -Prism.languages.ocaml={comment:/\(\*[\s\S]*?\*\)/,string:[{pattern:/"(?:\\.|[^\\\r\n"])*"/,greedy:!0},{pattern:/(['`])(?:\\(?:\d+|x[\da-f]+|.)|(?!\1)[^\\\r\n])\1/i,greedy:!0}],number:/\b(?:0x[\da-f][\da-f_]+|(?:0[bo])?\d[\d_]*\.?[\d_]*(?:e[+-]?[\d_]+)?)/i,directive:{pattern:/\B#\w+/,alias:"important"},label:{pattern:/\B~\w+/,alias:"function"},type_variable:{pattern:/\B'\w+/,alias:"function"},variant:{pattern:/`\w+/,alias:"variable"},module:{pattern:/\b[A-Z]\w+/,alias:"variable"},keyword:/\b(?:as|assert|begin|class|constraint|do|done|downto|else|end|exception|external|for|fun|function|functor|if|in|include|inherit|initializer|lazy|let|match|method|module|mutable|new|nonrec|object|of|open|private|rec|sig|struct|then|to|try|type|val|value|virtual|when|where|while|with)\b/,boolean:/\b(?:false|true)\b/,operator:/:=|[=<>@^|&+\-*\/$%!?~][!$%&*+\-.\/:<=>?@^|~]*|\b(?:and|asr|land|lor|lsl|lsr|lxor|mod|or)\b/,punctuation:/[(){}\[\]|_.,:;]/}; \ No newline at end of file +Prism.languages.ocaml={comment:/\(\*[\s\S]*?\*\)/,string:[{pattern:/"(?:\\.|[^\\\r\n"])*"/,greedy:!0},{pattern:/(['`])(?:\\(?:\d+|x[\da-f]+|.)|(?!\1)[^\\\r\n])\1/i,greedy:!0}],number:/\b(?:0x[\da-f][\da-f_]+|(?:0[bo])?\d[\d_]*\.?[\d_]*(?:e[+-]?[\d_]+)?)/i,directive:{pattern:/\B#\w+/,alias:"important"},label:{pattern:/\B~\w+/,alias:"function"},type_variable:{pattern:/\B'\w+/,alias:"function"},variant:{pattern:/`\w+/,alias:"variable"},module:{pattern:/\b[A-Z]\w+/,alias:"variable"},keyword:/\b(?:as|assert|begin|class|constraint|do|done|downto|else|end|exception|external|for|fun|function|functor|if|in|include|inherit|initializer|lazy|let|match|method|module|mutable|new|nonrec|object|of|open|private|rec|sig|struct|then|to|try|type|val|value|virtual|when|where|while|with)\b/,boolean:/\b(?:false|true)\b/,operator:/:=|[=<>@^|&+\-*\/$%!?~][!$%&*+\-.\/:<=>?@^|~]*|\b(?:and|asr|land|lor|lsl|lsr|lxor|mod|or)\b/,punctuation:/[(){}\[\]|.,:;]|\b_\b/}; \ No newline at end of file diff --git a/components/prism-oz.js b/components/prism-oz.js index ff8482aaa6..4c6c2848db 100644 --- a/components/prism-oz.js +++ b/components/prism-oz.js @@ -9,17 +9,17 @@ Prism.languages.oz = { greedy: true, alias: 'builtin' }, - 'keyword': /[$_]|\[\]|\b(?:at|attr|case|catch|choice|class|cond|declare|define|dis|else(?:case|if)?|end|export|fail|false|feat|finally|from|fun|functor|if|import|in|local|lock|meth|nil|not|of|or|prepare|proc|prop|raise|require|self|skip|then|thread|true|try|unit)\b/, + 'keyword': /\$|\[\]|\b(?:_|at|attr|case|catch|choice|class|cond|declare|define|dis|else(?:case|if)?|end|export|fail|false|feat|finally|from|fun|functor|if|import|in|local|lock|meth|nil|not|of|or|prepare|proc|prop|raise|require|self|skip|then|thread|true|try|unit)\b/, 'function': [ - /[a-z][A-Za-z\d]*(?=\()/, + /\b[a-z][A-Za-z\d]*(?=\()/, { - pattern: /(\{)[A-Z][A-Za-z\d]*/, + pattern: /(\{)[A-Z][A-Za-z\d]*\b/, lookbehind: true } ], - 'number': /\b(?:0[bx][\da-f]+|\d+\.?\d*(?:e~?\d+)?\b)|&(?:[^\\]|\\(?:\d{3}|.))/i, + 'number': /\b(?:0[bx][\da-f]+|\d+\.?\d*(?:e~?\d+)?)\b|&(?:[^\\]|\\(?:\d{3}|.))/i, 'variable': /\b[A-Z][A-Za-z\d]*|`(?:[^`\\]|\\.)+`/, 'attr-name': /\w+(?=:)/, 'operator': /:(?:=|::?)|<[-:=]?|=(?:=|=?:?|\\=:?|!!?|[|#+\-*\/,~^@]|\b(?:andthen|div|mod|orelse)\b/, 'punctuation': /[\[\](){}.:;?]/ -}; \ No newline at end of file +}; diff --git a/components/prism-oz.min.js b/components/prism-oz.min.js index a6e7f4825b..7bd2ccfd06 100644 --- a/components/prism-oz.min.js +++ b/components/prism-oz.min.js @@ -1 +1 @@ -Prism.languages.oz={comment:/\/\*[\s\S]*?\*\/|%.*/,string:{pattern:/"(?:[^"\\]|\\[\s\S])*"/,greedy:!0},atom:{pattern:/'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,alias:"builtin"},keyword:/[$_]|\[\]|\b(?:at|attr|case|catch|choice|class|cond|declare|define|dis|else(?:case|if)?|end|export|fail|false|feat|finally|from|fun|functor|if|import|in|local|lock|meth|nil|not|of|or|prepare|proc|prop|raise|require|self|skip|then|thread|true|try|unit)\b/,function:[/[a-z][A-Za-z\d]*(?=\()/,{pattern:/(\{)[A-Z][A-Za-z\d]*/,lookbehind:!0}],number:/\b(?:0[bx][\da-f]+|\d+\.?\d*(?:e~?\d+)?\b)|&(?:[^\\]|\\(?:\d{3}|.))/i,variable:/\b[A-Z][A-Za-z\d]*|`(?:[^`\\]|\\.)+`/,"attr-name":/\w+(?=:)/,operator:/:(?:=|::?)|<[-:=]?|=(?:=|=?:?|\\=:?|!!?|[|#+\-*\/,~^@]|\b(?:andthen|div|mod|orelse)\b/,punctuation:/[\[\](){}.:;?]/}; \ No newline at end of file +Prism.languages.oz={comment:/\/\*[\s\S]*?\*\/|%.*/,string:{pattern:/"(?:[^"\\]|\\[\s\S])*"/,greedy:!0},atom:{pattern:/'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,alias:"builtin"},keyword:/\$|\[\]|\b(?:_|at|attr|case|catch|choice|class|cond|declare|define|dis|else(?:case|if)?|end|export|fail|false|feat|finally|from|fun|functor|if|import|in|local|lock|meth|nil|not|of|or|prepare|proc|prop|raise|require|self|skip|then|thread|true|try|unit)\b/,function:[/\b[a-z][A-Za-z\d]*(?=\()/,{pattern:/(\{)[A-Z][A-Za-z\d]*\b/,lookbehind:!0}],number:/\b(?:0[bx][\da-f]+|\d+\.?\d*(?:e~?\d+)?)\b|&(?:[^\\]|\\(?:\d{3}|.))/i,variable:/\b[A-Z][A-Za-z\d]*|`(?:[^`\\]|\\.)+`/,"attr-name":/\w+(?=:)/,operator:/:(?:=|::?)|<[-:=]?|=(?:=|=?:?|\\=:?|!!?|[|#+\-*\/,~^@]|\b(?:andthen|div|mod|orelse)\b/,punctuation:/[\[\](){}.:;?]/}; \ No newline at end of file diff --git a/components/prism-parigp.js b/components/prism-parigp.js index 93c3cee7d6..a1eaf9be0d 100644 --- a/components/prism-parigp.js +++ b/components/prism-parigp.js @@ -22,9 +22,9 @@ Prism.languages.parigp = { 'function': /\w[\w ]*?(?= *\()/, 'number': { // The lookbehind and the negative lookahead prevent from breaking the .. operator - pattern: /((?:\. *\. *)?)(?:\d(?: *\d)*(?: *(?!\. *\.)\.(?: *\d)*)?|\. *\d(?: *\d)*)(?: *e *[+-]? *\d(?: *\d)*)?/i, + pattern: /((?:\. *\. *)?)(?:\b\d(?: *\d)*(?: *(?!\. *\.)\.(?: *\d)*)?|\. *\d(?: *\d)*)(?: *e *[+-]? *\d(?: *\d)*)?/i, lookbehind: true }, 'operator': /\. *\.|[*\/!](?: *=)?|%(?: *=|(?: *#)?(?: *')*)?|\+(?: *[+=])?|-(?: *[-=>])?|<(?:(?: *<)?(?: *=)?| *>)?|>(?: *>)?(?: *=)?|=(?: *=){0,2}|\\(?: *\/)?(?: *=)?|&(?: *&)?|\| *\||['#~^]/, 'punctuation': /[\[\]{}().,:;|]/ -}; \ No newline at end of file +}; diff --git a/components/prism-parigp.min.js b/components/prism-parigp.min.js index fa567d6807..62e3f6a3b0 100644 --- a/components/prism-parigp.min.js +++ b/components/prism-parigp.min.js @@ -1 +1 @@ -Prism.languages.parigp={comment:/\/\*[\s\S]*?\*\/|\\\\.*/,string:{pattern:/"(?:[^"\\\r\n]|\\.)*"/,greedy:!0},keyword:function(){var r=["breakpoint","break","dbg_down","dbg_err","dbg_up","dbg_x","forcomposite","fordiv","forell","forpart","forprime","forstep","forsubgroup","forvec","for","iferr","if","local","my","next","return","until","while"];return r=r.map(function(r){return r.split("").join(" *")}).join("|"),RegExp("\\b(?:"+r+")\\b")}(),function:/\w[\w ]*?(?= *\()/,number:{pattern:/((?:\. *\. *)?)(?:\d(?: *\d)*(?: *(?!\. *\.)\.(?: *\d)*)?|\. *\d(?: *\d)*)(?: *e *[+-]? *\d(?: *\d)*)?/i,lookbehind:!0},operator:/\. *\.|[*\/!](?: *=)?|%(?: *=|(?: *#)?(?: *')*)?|\+(?: *[+=])?|-(?: *[-=>])?|<(?:(?: *<)?(?: *=)?| *>)?|>(?: *>)?(?: *=)?|=(?: *=){0,2}|\\(?: *\/)?(?: *=)?|&(?: *&)?|\| *\||['#~^]/,punctuation:/[\[\]{}().,:;|]/}; \ No newline at end of file +Prism.languages.parigp={comment:/\/\*[\s\S]*?\*\/|\\\\.*/,string:{pattern:/"(?:[^"\\\r\n]|\\.)*"/,greedy:!0},keyword:function(){var r=["breakpoint","break","dbg_down","dbg_err","dbg_up","dbg_x","forcomposite","fordiv","forell","forpart","forprime","forstep","forsubgroup","forvec","for","iferr","if","local","my","next","return","until","while"];return r=r.map(function(r){return r.split("").join(" *")}).join("|"),RegExp("\\b(?:"+r+")\\b")}(),function:/\w[\w ]*?(?= *\()/,number:{pattern:/((?:\. *\. *)?)(?:\b\d(?: *\d)*(?: *(?!\. *\.)\.(?: *\d)*)?|\. *\d(?: *\d)*)(?: *e *[+-]? *\d(?: *\d)*)?/i,lookbehind:!0},operator:/\. *\.|[*\/!](?: *=)?|%(?: *=|(?: *#)?(?: *')*)?|\+(?: *[+=])?|-(?: *[-=>])?|<(?:(?: *<)?(?: *=)?| *>)?|>(?: *>)?(?: *=)?|=(?: *=){0,2}|\\(?: *\/)?(?: *=)?|&(?: *&)?|\| *\||['#~^]/,punctuation:/[\[\]{}().,:;|]/}; \ No newline at end of file diff --git a/components/prism-pure.js b/components/prism-pure.js index 968f113fef..1973621daf 100644 --- a/components/prism-pure.js +++ b/components/prism-pure.js @@ -1,4 +1,6 @@ (function (Prism) { + // https://agraef.github.io/pure-docs/pure.html#lexical-matters + Prism.languages.pure = { 'comment': [ { @@ -42,7 +44,7 @@ alias: 'builtin' }, // Any combination of operator chars can be an operator - 'operator': /(?=\b_|[^_])[!"#$%&'*+,\-.\/:<=>?@\\^_`|~\u00a1-\u00bf\u00d7-\u00f7\u20d0-\u2bff]+|\b(?:and|div|mod|not|or)\b/, + 'operator': /(?:[!"#$%&'*+,\-.\/:<=>?@\\^`|~\u00a1-\u00bf\u00d7-\u00f7\u20d0-\u2bff]|\b_+\b)+|\b(?:and|div|mod|not|or)\b/, // FIXME: How can we prevent | and , to be highlighted as operator when they are used alone? 'punctuation': /[(){}\[\];,|]/ }; diff --git a/components/prism-pure.min.js b/components/prism-pure.min.js index 079f0479e1..f02c9ad3d8 100644 --- a/components/prism-pure.min.js +++ b/components/prism-pure.min.js @@ -1 +1 @@ -!function(r){r.languages.pure={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?\*\//,lookbehind:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0},/#!.+/],"inline-lang":{pattern:/%<[\s\S]+?%>/,greedy:!0,inside:{lang:{pattern:/(^%< *)-\*-.+?-\*-/,lookbehind:!0,alias:"comment"},delimiter:{pattern:/^%<.*|%>$/,alias:"punctuation"}}},string:{pattern:/"(?:\\.|[^"\\\r\n])*"/,greedy:!0},number:{pattern:/((?:\.\.)?)(?:\b(?:inf|nan)\b|\b0x[\da-f]+|(?:\b(?:0b)?\d+(?:\.\d)?|\B\.\d)\d*(?:e[+-]?\d+)?L?)/i,lookbehind:!0},keyword:/\b(?:ans|break|bt|case|catch|cd|clear|const|def|del|dump|else|end|exit|extern|false|force|help|if|infix[lr]?|interface|let|ls|mem|namespace|nonfix|NULL|of|otherwise|outfix|override|postfix|prefix|private|public|pwd|quit|run|save|show|stats|then|throw|trace|true|type|underride|using|when|with)\b/,function:/\b(?:abs|add_(?:(?:fundef|interface|macdef|typedef)(?:_at)?|addr|constdef|vardef)|all|any|applp?|arity|bigintp?|blob(?:_crc|_size|p)?|boolp?|byte_(?:matrix|pointer)|byte_c?string(?:_pointer)?|calloc|cat|catmap|ceil|char[ps]?|check_ptrtag|chr|clear_sentry|clearsym|closurep?|cmatrixp?|cols?|colcat(?:map)?|colmap|colrev|colvector(?:p|seq)?|complex(?:_float_(?:matrix|pointer)|_matrix(?:_view)?|_pointer|p)?|conj|cookedp?|cst|cstring(?:_(?:dup|list|vector))?|curry3?|cyclen?|del_(?:constdef|fundef|interface|macdef|typedef|vardef)|delete|diag(?:mat)?|dim|dmatrixp?|do|double(?:_matrix(?:_view)?|_pointer|p)?|dowith3?|drop|dropwhile|eval(?:cmd)?|exactp|filter|fix|fixity|flip|float(?:_matrix|_pointer)|floor|fold[lr]1?|frac|free|funp?|functionp?|gcd|get(?:_(?:byte|constdef|double|float|fundef|int(?:64)?|interface(?:_typedef)?|long|macdef|pointer|ptrtag|short|sentry|string|typedef|vardef))?|globsym|hash|head|id|im|imatrixp?|index|inexactp|infp|init|insert|int(?:_matrix(?:_view)?|_pointer|p)?|int64_(?:matrix|pointer)|integerp?|iteraten?|iterwhile|join|keys?|lambdap?|last(?:err(?:pos)?)?|lcd|list[2p]?|listmap|make_ptrtag|malloc|map|matcat|matrixp?|max|member|min|nanp|nargs|nmatrixp?|null|numberp?|ord|pack(?:ed)?|pointer(?:_cast|_tag|_type|p)?|pow|pred|ptrtag|put(?:_(?:byte|double|float|int(?:64)?|long|pointer|short|string))?|rationalp?|re|realp?|realloc|recordp?|redim|reduce(?:_with)?|refp?|repeatn?|reverse|rlistp?|round|rows?|rowcat(?:map)?|rowmap|rowrev|rowvector(?:p|seq)?|same|scan[lr]1?|sentry|sgn|short_(?:matrix|pointer)|slice|smatrixp?|sort|split|str|strcat|stream|stride|string(?:_(?:dup|list|vector)|p)?|subdiag(?:mat)?|submat|subseq2?|substr|succ|supdiag(?:mat)?|symbolp?|tail|take|takewhile|thunkp?|transpose|trunc|tuplep?|typep|ubyte|uint(?:64)?|ulong|uncurry3?|unref|unzip3?|update|ushort|vals?|varp?|vector(?:p|seq)?|void|zip3?|zipwith3?)\b/,special:{pattern:/\b__[a-z]+__\b/i,alias:"builtin"},operator:/(?=\b_|[^_])[!"#$%&'*+,\-.\/:<=>?@\\^_`|~\u00a1-\u00bf\u00d7-\u00f7\u20d0-\u2bff]+|\b(?:and|div|mod|not|or)\b/,punctuation:/[(){}\[\];,|]/};["c",{lang:"c++",alias:"cpp"},"fortran"].forEach(function(e){var t=e;if("string"!=typeof e&&(t=e.alias,e=e.lang),r.languages[t]){var a={};a["inline-lang-"+t]={pattern:RegExp("%< *-\\*- *{lang}\\d* *-\\*-[^]+?%>".replace("{lang}",e.replace(/([.+*?\/\\(){}\[\]])/g,"\\$1")),"i"),inside:r.util.clone(r.languages.pure["inline-lang"].inside)},a["inline-lang-"+t].inside.rest=r.util.clone(r.languages[t]),r.languages.insertBefore("pure","inline-lang",a)}}),r.languages.c&&(r.languages.pure["inline-lang"].inside.rest=r.util.clone(r.languages.c))}(Prism); \ No newline at end of file +!function(r){r.languages.pure={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?\*\//,lookbehind:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0},/#!.+/],"inline-lang":{pattern:/%<[\s\S]+?%>/,greedy:!0,inside:{lang:{pattern:/(^%< *)-\*-.+?-\*-/,lookbehind:!0,alias:"comment"},delimiter:{pattern:/^%<.*|%>$/,alias:"punctuation"}}},string:{pattern:/"(?:\\.|[^"\\\r\n])*"/,greedy:!0},number:{pattern:/((?:\.\.)?)(?:\b(?:inf|nan)\b|\b0x[\da-f]+|(?:\b(?:0b)?\d+(?:\.\d)?|\B\.\d)\d*(?:e[+-]?\d+)?L?)/i,lookbehind:!0},keyword:/\b(?:ans|break|bt|case|catch|cd|clear|const|def|del|dump|else|end|exit|extern|false|force|help|if|infix[lr]?|interface|let|ls|mem|namespace|nonfix|NULL|of|otherwise|outfix|override|postfix|prefix|private|public|pwd|quit|run|save|show|stats|then|throw|trace|true|type|underride|using|when|with)\b/,function:/\b(?:abs|add_(?:(?:fundef|interface|macdef|typedef)(?:_at)?|addr|constdef|vardef)|all|any|applp?|arity|bigintp?|blob(?:_crc|_size|p)?|boolp?|byte_(?:matrix|pointer)|byte_c?string(?:_pointer)?|calloc|cat|catmap|ceil|char[ps]?|check_ptrtag|chr|clear_sentry|clearsym|closurep?|cmatrixp?|cols?|colcat(?:map)?|colmap|colrev|colvector(?:p|seq)?|complex(?:_float_(?:matrix|pointer)|_matrix(?:_view)?|_pointer|p)?|conj|cookedp?|cst|cstring(?:_(?:dup|list|vector))?|curry3?|cyclen?|del_(?:constdef|fundef|interface|macdef|typedef|vardef)|delete|diag(?:mat)?|dim|dmatrixp?|do|double(?:_matrix(?:_view)?|_pointer|p)?|dowith3?|drop|dropwhile|eval(?:cmd)?|exactp|filter|fix|fixity|flip|float(?:_matrix|_pointer)|floor|fold[lr]1?|frac|free|funp?|functionp?|gcd|get(?:_(?:byte|constdef|double|float|fundef|int(?:64)?|interface(?:_typedef)?|long|macdef|pointer|ptrtag|short|sentry|string|typedef|vardef))?|globsym|hash|head|id|im|imatrixp?|index|inexactp|infp|init|insert|int(?:_matrix(?:_view)?|_pointer|p)?|int64_(?:matrix|pointer)|integerp?|iteraten?|iterwhile|join|keys?|lambdap?|last(?:err(?:pos)?)?|lcd|list[2p]?|listmap|make_ptrtag|malloc|map|matcat|matrixp?|max|member|min|nanp|nargs|nmatrixp?|null|numberp?|ord|pack(?:ed)?|pointer(?:_cast|_tag|_type|p)?|pow|pred|ptrtag|put(?:_(?:byte|double|float|int(?:64)?|long|pointer|short|string))?|rationalp?|re|realp?|realloc|recordp?|redim|reduce(?:_with)?|refp?|repeatn?|reverse|rlistp?|round|rows?|rowcat(?:map)?|rowmap|rowrev|rowvector(?:p|seq)?|same|scan[lr]1?|sentry|sgn|short_(?:matrix|pointer)|slice|smatrixp?|sort|split|str|strcat|stream|stride|string(?:_(?:dup|list|vector)|p)?|subdiag(?:mat)?|submat|subseq2?|substr|succ|supdiag(?:mat)?|symbolp?|tail|take|takewhile|thunkp?|transpose|trunc|tuplep?|typep|ubyte|uint(?:64)?|ulong|uncurry3?|unref|unzip3?|update|ushort|vals?|varp?|vector(?:p|seq)?|void|zip3?|zipwith3?)\b/,special:{pattern:/\b__[a-z]+__\b/i,alias:"builtin"},operator:/(?:[!"#$%&'*+,\-.\/:<=>?@\\^`|~\u00a1-\u00bf\u00d7-\u00f7\u20d0-\u2bff]|\b_+\b)+|\b(?:and|div|mod|not|or)\b/,punctuation:/[(){}\[\];,|]/};["c",{lang:"c++",alias:"cpp"},"fortran"].forEach(function(e){var t=e;if("string"!=typeof e&&(t=e.alias,e=e.lang),r.languages[t]){var a={};a["inline-lang-"+t]={pattern:RegExp("%< *-\\*- *{lang}\\d* *-\\*-[^]+?%>".replace("{lang}",e.replace(/([.+*?\/\\(){}\[\]])/g,"\\$1")),"i"),inside:r.util.clone(r.languages.pure["inline-lang"].inside)},a["inline-lang-"+t].inside.rest=r.util.clone(r.languages[t]),r.languages.insertBefore("pure","inline-lang",a)}}),r.languages.c&&(r.languages.pure["inline-lang"].inside.rest=r.util.clone(r.languages.c))}(Prism); \ No newline at end of file diff --git a/components/prism-q.js b/components/prism-q.js index 985b7a54f2..283b51127e 100644 --- a/components/prism-q.js +++ b/components/prism-q.js @@ -44,8 +44,8 @@ Prism.languages.q = { alias: 'function' }, 'verb': { - pattern: /(?:\B\.\B|\b[01]:|<[=>]?|>=?|[:+\-*%,!?_~=|$&#@^]):?/, + pattern: /(?:\B\.\B|\b[01]:|<[=>]?|>=?|[:+\-*%,!?~=|$&#@^]):?|\b_\b:?/, alias: 'operator' }, 'punctuation': /[(){}\[\];.]/ -}; \ No newline at end of file +}; diff --git a/components/prism-q.min.js b/components/prism-q.min.js index 308eac8f57..e05de737fe 100644 --- a/components/prism-q.min.js +++ b/components/prism-q.min.js @@ -1 +1 @@ -Prism.languages.q={string:/"(?:\\.|[^"\\\r\n])*"/,comment:[{pattern:/([\t )\]}])\/.*/,lookbehind:!0,greedy:!0},{pattern:/(^|\r?\n|\r)\/[\t ]*(?:(?:\r?\n|\r)(?:.*(?:\r?\n|\r))*?(?:\\(?=[\t ]*(?:\r?\n|\r))|$)|\S.*)/,lookbehind:!0,greedy:!0},{pattern:/^\\[\t ]*(?:\r?\n|\r)[\s\S]+/m,greedy:!0},{pattern:/^#!.+/m,greedy:!0}],symbol:/`(?::\S+|[\w.]*)/,datetime:{pattern:/0N[mdzuvt]|0W[dtz]|\d{4}\.\d\d(?:m|\.\d\d(?:T(?:\d\d(?::\d\d(?::\d\d(?:[.:]\d\d\d)?)?)?)?)?[dz]?)|\d\d:\d\d(?::\d\d(?:[.:]\d\d\d)?)?[uvt]?/,alias:"number"},number:/\b(?![01]:)(?:0[wn]|0W[hj]?|0N[hje]?|0x[\da-fA-F]+|\d+\.?\d*(?:e[+-]?\d+)?[hjfeb]?)/,keyword:/\\\w+\b|\b(?:abs|acos|aj0?|all|and|any|asc|asin|asof|atan|attr|avgs?|binr?|by|ceiling|cols|cor|cos|count|cov|cross|csv|cut|delete|deltas|desc|dev|differ|distinct|div|do|dsave|ej|enlist|eval|except|exec|exit|exp|fby|fills|first|fkeys|flip|floor|from|get|getenv|group|gtime|hclose|hcount|hdel|hopen|hsym|iasc|identity|idesc|if|ij|in|insert|inter|inv|keys?|last|like|list|ljf?|load|log|lower|lsq|ltime|ltrim|mavg|maxs?|mcount|md5|mdev|med|meta|mins?|mmax|mmin|mmu|mod|msum|neg|next|not|null|or|over|parse|peach|pj|plist|prds?|prev|prior|rand|rank|ratios|raze|read0|read1|reciprocal|reval|reverse|rload|rotate|rsave|rtrim|save|scan|scov|sdev|select|set|setenv|show|signum|sin|sqrt|ssr?|string|sublist|sums?|sv|svar|system|tables|tan|til|trim|txf|type|uj|ungroup|union|update|upper|upsert|value|var|views?|vs|wavg|where|while|within|wj1?|wsum|ww|xasc|xbar|xcols?|xdesc|xexp|xgroup|xkey|xlog|xprev|xrank)\b/,adverb:{pattern:/['\/\\]:?|\beach\b/,alias:"function"},verb:{pattern:/(?:\B\.\B|\b[01]:|<[=>]?|>=?|[:+\-*%,!?_~=|$&#@^]):?/,alias:"operator"},punctuation:/[(){}\[\];.]/}; \ No newline at end of file +Prism.languages.q={string:/"(?:\\.|[^"\\\r\n])*"/,comment:[{pattern:/([\t )\]}])\/.*/,lookbehind:!0,greedy:!0},{pattern:/(^|\r?\n|\r)\/[\t ]*(?:(?:\r?\n|\r)(?:.*(?:\r?\n|\r))*?(?:\\(?=[\t ]*(?:\r?\n|\r))|$)|\S.*)/,lookbehind:!0,greedy:!0},{pattern:/^\\[\t ]*(?:\r?\n|\r)[\s\S]+/m,greedy:!0},{pattern:/^#!.+/m,greedy:!0}],symbol:/`(?::\S+|[\w.]*)/,datetime:{pattern:/0N[mdzuvt]|0W[dtz]|\d{4}\.\d\d(?:m|\.\d\d(?:T(?:\d\d(?::\d\d(?::\d\d(?:[.:]\d\d\d)?)?)?)?)?[dz]?)|\d\d:\d\d(?::\d\d(?:[.:]\d\d\d)?)?[uvt]?/,alias:"number"},number:/\b(?![01]:)(?:0[wn]|0W[hj]?|0N[hje]?|0x[\da-fA-F]+|\d+\.?\d*(?:e[+-]?\d+)?[hjfeb]?)/,keyword:/\\\w+\b|\b(?:abs|acos|aj0?|all|and|any|asc|asin|asof|atan|attr|avgs?|binr?|by|ceiling|cols|cor|cos|count|cov|cross|csv|cut|delete|deltas|desc|dev|differ|distinct|div|do|dsave|ej|enlist|eval|except|exec|exit|exp|fby|fills|first|fkeys|flip|floor|from|get|getenv|group|gtime|hclose|hcount|hdel|hopen|hsym|iasc|identity|idesc|if|ij|in|insert|inter|inv|keys?|last|like|list|ljf?|load|log|lower|lsq|ltime|ltrim|mavg|maxs?|mcount|md5|mdev|med|meta|mins?|mmax|mmin|mmu|mod|msum|neg|next|not|null|or|over|parse|peach|pj|plist|prds?|prev|prior|rand|rank|ratios|raze|read0|read1|reciprocal|reval|reverse|rload|rotate|rsave|rtrim|save|scan|scov|sdev|select|set|setenv|show|signum|sin|sqrt|ssr?|string|sublist|sums?|sv|svar|system|tables|tan|til|trim|txf|type|uj|ungroup|union|update|upper|upsert|value|var|views?|vs|wavg|where|while|within|wj1?|wsum|ww|xasc|xbar|xcols?|xdesc|xexp|xgroup|xkey|xlog|xprev|xrank)\b/,adverb:{pattern:/['\/\\]:?|\beach\b/,alias:"function"},verb:{pattern:/(?:\B\.\B|\b[01]:|<[=>]?|>=?|[:+\-*%,!?~=|$&#@^]):?|\b_\b:?/,alias:"operator"},punctuation:/[(){}\[\];.]/}; \ No newline at end of file diff --git a/components/prism-rip.js b/components/prism-rip.js index 3a8a8cb8b3..b28b75dc26 100644 --- a/components/prism-rip.js +++ b/components/prism-rip.js @@ -24,7 +24,7 @@ Prism.languages.rip = { pattern: /("|')(?:\\.|(?!\1)[^\\\r\n])*\1/, greedy: true }, - 'number': /[+-]?(?:(?:\d+\.\d+)|(?:\d+))/, + 'number': /[+-]?\b(?:\d+\.\d+|\d+)\b/, 'punctuation': /(?:\.{2,3})|[`,.:;=\/\\()<>\[\]{}]/, diff --git a/components/prism-rip.min.js b/components/prism-rip.min.js index eb6f02f361..f88fd7f42a 100644 --- a/components/prism-rip.min.js +++ b/components/prism-rip.min.js @@ -1 +1 @@ -Prism.languages.rip={comment:/#.*/,keyword:/(?:=>|->)|\b(?:class|if|else|switch|case|return|exit|try|catch|finally|raise)\b/,builtin:/@|\bSystem\b/,boolean:/\b(?:true|false)\b/,date:/\b\d{4}-\d{2}-\d{2}\b/,time:/\b\d{2}:\d{2}:\d{2}\b/,datetime:/\b\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\b/,character:/\B`[^\s`'",.:;#\/\\()<>\[\]{}]\b/,regex:{pattern:/(^|[^/])\/(?!\/)(?:\[[^\n\r\]]*\]|\\.|[^/\\\r\n\[])+\/(?=\s*(?:$|[\r\n,.;})]))/,lookbehind:!0,greedy:!0},symbol:/:[^\d\s`'",.:;#\/\\()<>\[\]{}][^\s`'",.:;#\/\\()<>\[\]{}]*/,string:{pattern:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0},number:/[+-]?(?:(?:\d+\.\d+)|(?:\d+))/,punctuation:/(?:\.{2,3})|[`,.:;=\/\\()<>\[\]{}]/,reference:/[^\d\s`'",.:;#\/\\()<>\[\]{}][^\s`'",.:;#\/\\()<>\[\]{}]*/}; \ No newline at end of file +Prism.languages.rip={comment:/#.*/,keyword:/(?:=>|->)|\b(?:class|if|else|switch|case|return|exit|try|catch|finally|raise)\b/,builtin:/@|\bSystem\b/,boolean:/\b(?:true|false)\b/,date:/\b\d{4}-\d{2}-\d{2}\b/,time:/\b\d{2}:\d{2}:\d{2}\b/,datetime:/\b\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\b/,character:/\B`[^\s`'",.:;#\/\\()<>\[\]{}]\b/,regex:{pattern:/(^|[^/])\/(?!\/)(?:\[[^\n\r\]]*\]|\\.|[^/\\\r\n\[])+\/(?=\s*(?:$|[\r\n,.;})]))/,lookbehind:!0,greedy:!0},symbol:/:[^\d\s`'",.:;#\/\\()<>\[\]{}][^\s`'",.:;#\/\\()<>\[\]{}]*/,string:{pattern:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0},number:/[+-]?\b(?:\d+\.\d+|\d+)\b/,punctuation:/(?:\.{2,3})|[`,.:;=\/\\()<>\[\]{}]/,reference:/[^\d\s`'",.:;#\/\\()<>\[\]{}][^\s`'",.:;#\/\\()<>\[\]{}]*/}; \ No newline at end of file diff --git a/components/prism-stylus.js b/components/prism-stylus.js index 18d014dbef..dce16acc7a 100644 --- a/components/prism-stylus.js +++ b/components/prism-stylus.js @@ -1,6 +1,6 @@ (function (Prism) { var unit = { - pattern: /(\d)(?:%|[a-z]+)/, + pattern: /(\b\d+)(?:%|[a-z]+)/, lookbehind: true }; // 123 -123 .123 -.123 12.3 -12.3 diff --git a/components/prism-stylus.min.js b/components/prism-stylus.min.js index f70528cf87..72ea652026 100644 --- a/components/prism-stylus.min.js +++ b/components/prism-stylus.min.js @@ -1 +1 @@ -!function(e){var n={pattern:/(\d)(?:%|[a-z]+)/,lookbehind:!0},r={pattern:/(^|[^\w.-])-?\d*\.?\d+/,lookbehind:!0},i={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0},url:{pattern:/url\((["']?).*?\1\)/i,greedy:!0},string:{pattern:/("|')(?:(?!\1)[^\\\r\n]|\\(?:\r\n|[\s\S]))*\1/,greedy:!0},interpolation:null,func:null,important:/\B!(?:important|optional)\b/i,keyword:{pattern:/(^|\s+)(?:(?:if|else|for|return|unless)(?=\s+|$)|@[\w-]+)/,lookbehind:!0},hexcode:/#[\da-f]{3,6}/i,color:[/\b(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)\b/i,{pattern:/\b(?:rgb|hsl)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:rgb|hsl)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,inside:{unit:n,number:r,function:/[\w-]+(?=\()/,punctuation:/[(),]/}}],entity:/\\[\da-f]{1,8}/i,unit:n,boolean:/\b(?:true|false)\b/,operator:[/~|[+!\/%<>?=]=?|[-:]=|\*[*=]?|\.{2,3}|&&|\|\||\B-\B|\b(?:and|in|is(?: a| defined| not|nt)?|not|or)\b/],number:r,punctuation:/[{}()\[\];:,]/};i.interpolation={pattern:/\{[^\r\n}:]+\}/,alias:"variable",inside:{delimiter:{pattern:/^{|}$/,alias:"punctuation"},rest:i}},i.func={pattern:/[\w-]+\([^)]*\).*/,inside:{function:/^[^(]+/,rest:i}},e.languages.stylus={"atrule-declaration":{pattern:/(^\s*)@.+/m,lookbehind:!0,inside:{atrule:/^@[\w-]+/,rest:i}},"variable-declaration":{pattern:/(^[ \t]*)[\w$-]+\s*.?=[ \t]*(?:(?:\{[^}]*\}|.+)|$)/m,lookbehind:!0,inside:{variable:/^\S+/,rest:i}},statement:{pattern:/(^[ \t]*)(?:if|else|for|return|unless)[ \t]+.+/m,lookbehind:!0,inside:{keyword:/^\S+/,rest:i}},"property-declaration":{pattern:/((?:^|\{)([ \t]*))(?:[\w-]|\{[^}\r\n]+\})+(?:\s*:\s*|[ \t]+)[^{\r\n]*(?:;|[^{\r\n,](?=$)(?!(?:\r?\n|\r)(?:\{|\2[ \t]+)))/m,lookbehind:!0,inside:{property:{pattern:/^[^\s:]+/,inside:{interpolation:i.interpolation}},rest:i}},selector:{pattern:/(^[ \t]*)(?:(?=\S)(?:[^{}\r\n:()]|::?[\w-]+(?:\([^)\r\n]*\))?|\{[^}\r\n]+\})+)(?:(?:\r?\n|\r)(?:\1(?:(?=\S)(?:[^{}\r\n:()]|::?[\w-]+(?:\([^)\r\n]*\))?|\{[^}\r\n]+\})+)))*(?:,$|\{|(?=(?:\r?\n|\r)(?:\{|\1[ \t]+)))/m,lookbehind:!0,inside:{interpolation:i.interpolation,comment:i.comment,punctuation:/[{},]/}},func:i.func,string:i.string,comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0,greedy:!0},interpolation:i.interpolation,punctuation:/[{}()\[\];:.]/}}(Prism); \ No newline at end of file +!function(e){var n={pattern:/(\b\d+)(?:%|[a-z]+)/,lookbehind:!0},r={pattern:/(^|[^\w.-])-?\d*\.?\d+/,lookbehind:!0},i={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0},url:{pattern:/url\((["']?).*?\1\)/i,greedy:!0},string:{pattern:/("|')(?:(?!\1)[^\\\r\n]|\\(?:\r\n|[\s\S]))*\1/,greedy:!0},interpolation:null,func:null,important:/\B!(?:important|optional)\b/i,keyword:{pattern:/(^|\s+)(?:(?:if|else|for|return|unless)(?=\s+|$)|@[\w-]+)/,lookbehind:!0},hexcode:/#[\da-f]{3,6}/i,color:[/\b(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)\b/i,{pattern:/\b(?:rgb|hsl)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:rgb|hsl)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,inside:{unit:n,number:r,function:/[\w-]+(?=\()/,punctuation:/[(),]/}}],entity:/\\[\da-f]{1,8}/i,unit:n,boolean:/\b(?:true|false)\b/,operator:[/~|[+!\/%<>?=]=?|[-:]=|\*[*=]?|\.{2,3}|&&|\|\||\B-\B|\b(?:and|in|is(?: a| defined| not|nt)?|not|or)\b/],number:r,punctuation:/[{}()\[\];:,]/};i.interpolation={pattern:/\{[^\r\n}:]+\}/,alias:"variable",inside:{delimiter:{pattern:/^{|}$/,alias:"punctuation"},rest:i}},i.func={pattern:/[\w-]+\([^)]*\).*/,inside:{function:/^[^(]+/,rest:i}},e.languages.stylus={"atrule-declaration":{pattern:/(^\s*)@.+/m,lookbehind:!0,inside:{atrule:/^@[\w-]+/,rest:i}},"variable-declaration":{pattern:/(^[ \t]*)[\w$-]+\s*.?=[ \t]*(?:(?:\{[^}]*\}|.+)|$)/m,lookbehind:!0,inside:{variable:/^\S+/,rest:i}},statement:{pattern:/(^[ \t]*)(?:if|else|for|return|unless)[ \t]+.+/m,lookbehind:!0,inside:{keyword:/^\S+/,rest:i}},"property-declaration":{pattern:/((?:^|\{)([ \t]*))(?:[\w-]|\{[^}\r\n]+\})+(?:\s*:\s*|[ \t]+)[^{\r\n]*(?:;|[^{\r\n,](?=$)(?!(?:\r?\n|\r)(?:\{|\2[ \t]+)))/m,lookbehind:!0,inside:{property:{pattern:/^[^\s:]+/,inside:{interpolation:i.interpolation}},rest:i}},selector:{pattern:/(^[ \t]*)(?:(?=\S)(?:[^{}\r\n:()]|::?[\w-]+(?:\([^)\r\n]*\))?|\{[^}\r\n]+\})+)(?:(?:\r?\n|\r)(?:\1(?:(?=\S)(?:[^{}\r\n:()]|::?[\w-]+(?:\([^)\r\n]*\))?|\{[^}\r\n]+\})+)))*(?:,$|\{|(?=(?:\r?\n|\r)(?:\{|\1[ \t]+)))/m,lookbehind:!0,inside:{interpolation:i.interpolation,comment:i.comment,punctuation:/[{},]/}},func:i.func,string:i.string,comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0,greedy:!0},interpolation:i.interpolation,punctuation:/[{}()\[\];:.]/}}(Prism); \ No newline at end of file diff --git a/components/prism-textile.js b/components/prism-textile.js index a190971166..71c6fd256b 100644 --- a/components/prism-textile.js +++ b/components/prism-textile.js @@ -91,7 +91,8 @@ }, 'inline': { - pattern: withModifier(/(\*\*|__|\?\?|[*_%@+\-^~])*.+?\1/.source), + pattern: withModifier(/(^|[^a-zA-Z\d])(\*\*|__|\?\?|[*_%@+\-^~])*.+?\2(?![a-zA-Z\d])/.source), + lookbehind: true, inside: { // Note: superscripts and subscripts are not handled specifically diff --git a/components/prism-textile.min.js b/components/prism-textile.min.js index ea7920f2fb..d0a410ecb3 100644 --- a/components/prism-textile.min.js +++ b/components/prism-textile.min.js @@ -1 +1 @@ -!function(n){function e(n,e){return RegExp(n.replace(//g,function(){return"(?:\\([^|()\n]+\\)|\\[[^\\]\n]+\\]|\\{[^}\n]+\\})"}).replace(//g,function(){return"(?:\\)|\\((?![^|()\n]+\\)))"}),e||"")}var i={css:{pattern:/\{[^}]+\}/,inside:{rest:n.languages.css}},"class-id":{pattern:/(\()[^)]+(?=\))/,lookbehind:!0,alias:"attr-value"},lang:{pattern:/(\[)[^\]]+(?=\])/,lookbehind:!0,alias:"attr-value"},punctuation:/[\\\/]\d+|\S/},t=n.languages.textile=n.languages.extend("markup",{phrase:{pattern:/(^|\r|\n)\S[\s\S]*?(?=$|\r?\n\r?\n|\r\r)/,lookbehind:!0,inside:{"block-tag":{pattern:e("^[a-z]\\w*(?:||[<>=])*\\."),inside:{modifier:{pattern:e("(^[a-z]\\w*)(?:||[<>=])+(?=\\.)"),lookbehind:!0,inside:i},tag:/^[a-z]\w*/,punctuation:/\.$/}},list:{pattern:e("^[*#]+*\\s+.+","m"),inside:{modifier:{pattern:e("(^[*#]+)+"),lookbehind:!0,inside:i},punctuation:/^[*#]+/}},table:{pattern:e("^(?:(?:||[<>=^~])+\\.\\s*)?(?:\\|(?:(?:||[<>=^~_]|[\\\\/]\\d+)+\\.)?[^|]*)+\\|","m"),inside:{modifier:{pattern:e("(^|\\|(?:\r?\n|\r)?)(?:||[<>=^~_]|[\\\\/]\\d+)+(?=\\.)"),lookbehind:!0,inside:i},punctuation:/\||^\./}},inline:{pattern:e("(\\*\\*|__|\\?\\?|[*_%@+\\-^~])*.+?\\1"),inside:{bold:{pattern:e("(^(\\*\\*?)*).+?(?=\\2)"),lookbehind:!0},italic:{pattern:e("(^(__?)*).+?(?=\\2)"),lookbehind:!0},cite:{pattern:e("(^\\?\\?*).+?(?=\\?\\?)"),lookbehind:!0,alias:"string"},code:{pattern:e("(^@*).+?(?=@)"),lookbehind:!0,alias:"keyword"},inserted:{pattern:e("(^\\+*).+?(?=\\+)"),lookbehind:!0},deleted:{pattern:e("(^-*).+?(?=-)"),lookbehind:!0},span:{pattern:e("(^%*).+?(?=%)"),lookbehind:!0},modifier:{pattern:e("(^\\*\\*|__|\\?\\?|[*_%@+\\-^~])+"),lookbehind:!0,inside:i},punctuation:/[*_%?@+\-^~]+/}},"link-ref":{pattern:/^\[[^\]]+\]\S+$/m,inside:{string:{pattern:/(\[)[^\]]+(?=\])/,lookbehind:!0},url:{pattern:/(\])\S+$/,lookbehind:!0},punctuation:/[\[\]]/}},link:{pattern:e('"*[^"]+":.+?(?=[^\\w/]?(?:\\s|$))'),inside:{text:{pattern:e('(^"*)[^"]+(?=")'),lookbehind:!0},modifier:{pattern:e('(^")+'),lookbehind:!0,inside:i},url:{pattern:/(:).+/,lookbehind:!0},punctuation:/[":]/}},image:{pattern:e("!(?:||[<>=])*[^!\\s()]+(?:\\([^)]+\\))?!(?::.+?(?=[^\\w/]?(?:\\s|$)))?"),inside:{source:{pattern:e("(^!(?:||[<>=])*)[^!\\s()]+(?:\\([^)]+\\))?(?=!)"),lookbehind:!0,alias:"url"},modifier:{pattern:e("(^!)(?:||[<>=])+"),lookbehind:!0,inside:i},url:{pattern:/(:).+/,lookbehind:!0},punctuation:/[!:]/}},footnote:{pattern:/\b\[\d+\]/,alias:"comment",inside:{punctuation:/\[|\]/}},acronym:{pattern:/\b[A-Z\d]+\([^)]+\)/,inside:{comment:{pattern:/(\()[^)]+(?=\))/,lookbehind:!0},punctuation:/[()]/}},mark:{pattern:/\b\((?:TM|R|C)\)/,alias:"comment",inside:{punctuation:/[()]/}}}}}),a=t.phrase.inside,o={inline:a.inline,link:a.link,image:a.image,footnote:a.footnote,acronym:a.acronym,mark:a.mark};t.tag.pattern=/<\/?(?!\d)[a-z0-9]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s'">=]+))?)*\s*\/?>/i;var r=a.inline.inside;r.bold.inside=o,r.italic.inside=o,r.inserted.inside=o,r.deleted.inside=o,r.span.inside=o;var d=a.table.inside;d.inline=o.inline,d.link=o.link,d.image=o.image,d.footnote=o.footnote,d.acronym=o.acronym,d.mark=o.mark}(Prism); \ No newline at end of file +!function(n){function e(n,e){return RegExp(n.replace(//g,function(){return"(?:\\([^|()\n]+\\)|\\[[^\\]\n]+\\]|\\{[^}\n]+\\})"}).replace(//g,function(){return"(?:\\)|\\((?![^|()\n]+\\)))"}),e||"")}var i={css:{pattern:/\{[^}]+\}/,inside:{rest:n.languages.css}},"class-id":{pattern:/(\()[^)]+(?=\))/,lookbehind:!0,alias:"attr-value"},lang:{pattern:/(\[)[^\]]+(?=\])/,lookbehind:!0,alias:"attr-value"},punctuation:/[\\\/]\d+|\S/},t=n.languages.textile=n.languages.extend("markup",{phrase:{pattern:/(^|\r|\n)\S[\s\S]*?(?=$|\r?\n\r?\n|\r\r)/,lookbehind:!0,inside:{"block-tag":{pattern:e("^[a-z]\\w*(?:||[<>=])*\\."),inside:{modifier:{pattern:e("(^[a-z]\\w*)(?:||[<>=])+(?=\\.)"),lookbehind:!0,inside:i},tag:/^[a-z]\w*/,punctuation:/\.$/}},list:{pattern:e("^[*#]+*\\s+.+","m"),inside:{modifier:{pattern:e("(^[*#]+)+"),lookbehind:!0,inside:i},punctuation:/^[*#]+/}},table:{pattern:e("^(?:(?:||[<>=^~])+\\.\\s*)?(?:\\|(?:(?:||[<>=^~_]|[\\\\/]\\d+)+\\.)?[^|]*)+\\|","m"),inside:{modifier:{pattern:e("(^|\\|(?:\r?\n|\r)?)(?:||[<>=^~_]|[\\\\/]\\d+)+(?=\\.)"),lookbehind:!0,inside:i},punctuation:/\||^\./}},inline:{pattern:e("(^|[^a-zA-Z\\d])(\\*\\*|__|\\?\\?|[*_%@+\\-^~])*.+?\\2(?![a-zA-Z\\d])"),lookbehind:!0,inside:{bold:{pattern:e("(^(\\*\\*?)*).+?(?=\\2)"),lookbehind:!0},italic:{pattern:e("(^(__?)*).+?(?=\\2)"),lookbehind:!0},cite:{pattern:e("(^\\?\\?*).+?(?=\\?\\?)"),lookbehind:!0,alias:"string"},code:{pattern:e("(^@*).+?(?=@)"),lookbehind:!0,alias:"keyword"},inserted:{pattern:e("(^\\+*).+?(?=\\+)"),lookbehind:!0},deleted:{pattern:e("(^-*).+?(?=-)"),lookbehind:!0},span:{pattern:e("(^%*).+?(?=%)"),lookbehind:!0},modifier:{pattern:e("(^\\*\\*|__|\\?\\?|[*_%@+\\-^~])+"),lookbehind:!0,inside:i},punctuation:/[*_%?@+\-^~]+/}},"link-ref":{pattern:/^\[[^\]]+\]\S+$/m,inside:{string:{pattern:/(\[)[^\]]+(?=\])/,lookbehind:!0},url:{pattern:/(\])\S+$/,lookbehind:!0},punctuation:/[\[\]]/}},link:{pattern:e('"*[^"]+":.+?(?=[^\\w/]?(?:\\s|$))'),inside:{text:{pattern:e('(^"*)[^"]+(?=")'),lookbehind:!0},modifier:{pattern:e('(^")+'),lookbehind:!0,inside:i},url:{pattern:/(:).+/,lookbehind:!0},punctuation:/[":]/}},image:{pattern:e("!(?:||[<>=])*[^!\\s()]+(?:\\([^)]+\\))?!(?::.+?(?=[^\\w/]?(?:\\s|$)))?"),inside:{source:{pattern:e("(^!(?:||[<>=])*)[^!\\s()]+(?:\\([^)]+\\))?(?=!)"),lookbehind:!0,alias:"url"},modifier:{pattern:e("(^!)(?:||[<>=])+"),lookbehind:!0,inside:i},url:{pattern:/(:).+/,lookbehind:!0},punctuation:/[!:]/}},footnote:{pattern:/\b\[\d+\]/,alias:"comment",inside:{punctuation:/\[|\]/}},acronym:{pattern:/\b[A-Z\d]+\([^)]+\)/,inside:{comment:{pattern:/(\()[^)]+(?=\))/,lookbehind:!0},punctuation:/[()]/}},mark:{pattern:/\b\((?:TM|R|C)\)/,alias:"comment",inside:{punctuation:/[()]/}}}}}),a=t.phrase.inside,o={inline:a.inline,link:a.link,image:a.image,footnote:a.footnote,acronym:a.acronym,mark:a.mark};t.tag.pattern=/<\/?(?!\d)[a-z0-9]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s'">=]+))?)*\s*\/?>/i;var r=a.inline.inside;r.bold.inside=o,r.italic.inside=o,r.inserted.inside=o,r.deleted.inside=o,r.span.inside=o;var d=a.table.inside;d.inline=o.inline,d.link=o.link,d.image=o.image,d.footnote=o.footnote,d.acronym=o.acronym,d.mark=o.mark}(Prism); \ No newline at end of file diff --git a/components/prism-toml.js b/components/prism-toml.js index 4ab785f149..18352c92d7 100644 --- a/components/prism-toml.js +++ b/components/prism-toml.js @@ -33,16 +33,16 @@ 'date': [ { // Offset Date-Time, Local Date-Time, Local Date - pattern: /\d{4}-\d{2}-\d{2}(?:[T\s]\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|[+-]\d{2}:\d{2})?)?/i, + pattern: /\b\d{4}-\d{2}-\d{2}(?:[T\s]\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|[+-]\d{2}:\d{2})?)?\b/i, alias: 'number' }, { // Local Time - pattern: /\d{2}:\d{2}:\d{2}(?:\.\d+)?/i, + pattern: /\b\d{2}:\d{2}:\d{2}(?:\.\d+)?\b/, alias: 'number' } ], - 'number': /(?:\b0(?:x[\da-zA-Z]+(?:_[\da-zA-Z]+)*|o[0-7]+(?:_[0-7]+)*|b[10]+(?:_[10]+)*))\b|[-+]?\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?\b|[-+]?(?:inf|nan)\b/, + 'number': /(?:\b0(?:x[\da-zA-Z]+(?:_[\da-zA-Z]+)*|o[0-7]+(?:_[0-7]+)*|b[10]+(?:_[10]+)*))\b|[-+]?\b\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?\b|[-+]?\b(?:inf|nan)\b/, 'boolean': /\b(?:true|false)\b/, 'punctuation': /[.,=[\]{}]/ }; diff --git a/components/prism-toml.min.js b/components/prism-toml.min.js index 4670192798..1d6612ac20 100644 --- a/components/prism-toml.min.js +++ b/components/prism-toml.min.js @@ -1 +1 @@ -!function(e){function n(e){return e.replace(/__/g,function(){return"(?:[\\w-]+|'[^'\n\r]*'|\"(?:\\\\.|[^\\\\\"\r\n])*\")"})}e.languages.toml={comment:{pattern:/#.*/,greedy:!0},table:{pattern:RegExp(n("(^\\s*\\[\\s*(?:\\[\\s*)?)__(?:\\s*\\.\\s*__)*(?=\\s*\\])"),"m"),lookbehind:!0,greedy:!0,alias:"class-name"},key:{pattern:RegExp(n("(^\\s*|[{,]\\s*)__(?:\\s*\\.\\s*__)*(?=\\s*=)"),"m"),lookbehind:!0,greedy:!0,alias:"property"},string:{pattern:/"""(?:\\[\s\S]|[^\\])*?"""|'''[\s\S]*?'''|'[^'\n\r]*'|"(?:\\.|[^\\"\r\n])*"/,greedy:!0},date:[{pattern:/\d{4}-\d{2}-\d{2}(?:[T\s]\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|[+-]\d{2}:\d{2})?)?/i,alias:"number"},{pattern:/\d{2}:\d{2}:\d{2}(?:\.\d+)?/i,alias:"number"}],number:/(?:\b0(?:x[\da-zA-Z]+(?:_[\da-zA-Z]+)*|o[0-7]+(?:_[0-7]+)*|b[10]+(?:_[10]+)*))\b|[-+]?\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?\b|[-+]?(?:inf|nan)\b/,boolean:/\b(?:true|false)\b/,punctuation:/[.,=[\]{}]/}}(Prism); \ No newline at end of file +!function(e){function n(e){return e.replace(/__/g,function(){return"(?:[\\w-]+|'[^'\n\r]*'|\"(?:\\\\.|[^\\\\\"\r\n])*\")"})}e.languages.toml={comment:{pattern:/#.*/,greedy:!0},table:{pattern:RegExp(n("(^\\s*\\[\\s*(?:\\[\\s*)?)__(?:\\s*\\.\\s*__)*(?=\\s*\\])"),"m"),lookbehind:!0,greedy:!0,alias:"class-name"},key:{pattern:RegExp(n("(^\\s*|[{,]\\s*)__(?:\\s*\\.\\s*__)*(?=\\s*=)"),"m"),lookbehind:!0,greedy:!0,alias:"property"},string:{pattern:/"""(?:\\[\s\S]|[^\\])*?"""|'''[\s\S]*?'''|'[^'\n\r]*'|"(?:\\.|[^\\"\r\n])*"/,greedy:!0},date:[{pattern:/\b\d{4}-\d{2}-\d{2}(?:[T\s]\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|[+-]\d{2}:\d{2})?)?\b/i,alias:"number"},{pattern:/\b\d{2}:\d{2}:\d{2}(?:\.\d+)?\b/,alias:"number"}],number:/(?:\b0(?:x[\da-zA-Z]+(?:_[\da-zA-Z]+)*|o[0-7]+(?:_[0-7]+)*|b[10]+(?:_[10]+)*))\b|[-+]?\b\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?\b|[-+]?\b(?:inf|nan)\b/,boolean:/\b(?:true|false)\b/,punctuation:/[.,=[\]{}]/}}(Prism); \ No newline at end of file diff --git a/components/prism-tt2.js b/components/prism-tt2.js index df49a9eaab..236bd2d07d 100644 --- a/components/prism-tt2.js +++ b/components/prism-tt2.js @@ -9,7 +9,7 @@ Prism.languages.insertBefore('tt2', 'number', { 'operator': /=[>=]?|!=?|<=?|>=?|&&|\|\|?|\b(?:and|or|not)\b/, 'variable': { - pattern: /[a-z]\w*(?:\s*\.\s*(?:\d+|\$?[a-z]\w*))*/i + pattern: /\b[a-z]\w*(?:\s*\.\s*(?:\d+|\$?[a-z]\w*))*\b/i } }); diff --git a/components/prism-tt2.min.js b/components/prism-tt2.min.js index 5de0617e8b..f208411014 100644 --- a/components/prism-tt2.min.js +++ b/components/prism-tt2.min.js @@ -1 +1 @@ -!function(t){t.languages.tt2=t.languages.extend("clike",{comment:/#.*|\[%#[\s\S]*?%\]/,keyword:/\b(?:BLOCK|CALL|CASE|CATCH|CLEAR|DEBUG|DEFAULT|ELSE|ELSIF|END|FILTER|FINAL|FOREACH|GET|IF|IN|INCLUDE|INSERT|LAST|MACRO|META|NEXT|PERL|PROCESS|RAWPERL|RETURN|SET|STOP|TAGS|THROW|TRY|SWITCH|UNLESS|USE|WHILE|WRAPPER)\b/,punctuation:/[[\]{},()]/}),t.languages.insertBefore("tt2","number",{operator:/=[>=]?|!=?|<=?|>=?|&&|\|\|?|\b(?:and|or|not)\b/,variable:{pattern:/[a-z]\w*(?:\s*\.\s*(?:\d+|\$?[a-z]\w*))*/i}}),t.languages.insertBefore("tt2","keyword",{delimiter:{pattern:/^(?:\[%|%%)-?|-?%]$/,alias:"punctuation"}}),t.languages.insertBefore("tt2","string",{"single-quoted-string":{pattern:/'[^\\']*(?:\\[\s\S][^\\']*)*'/,greedy:!0,alias:"string"},"double-quoted-string":{pattern:/"[^\\"]*(?:\\[\s\S][^\\"]*)*"/,greedy:!0,alias:"string",inside:{variable:{pattern:/\$(?:[a-z]\w*(?:\.(?:\d+|\$?[a-z]\w*))*)/i}}}}),delete t.languages.tt2.string,t.hooks.add("before-tokenize",function(e){t.languages["markup-templating"].buildPlaceholders(e,"tt2",/\[%[\s\S]+?%\]/g)}),t.hooks.add("after-tokenize",function(e){t.languages["markup-templating"].tokenizePlaceholders(e,"tt2")})}(Prism); \ No newline at end of file +!function(t){t.languages.tt2=t.languages.extend("clike",{comment:/#.*|\[%#[\s\S]*?%\]/,keyword:/\b(?:BLOCK|CALL|CASE|CATCH|CLEAR|DEBUG|DEFAULT|ELSE|ELSIF|END|FILTER|FINAL|FOREACH|GET|IF|IN|INCLUDE|INSERT|LAST|MACRO|META|NEXT|PERL|PROCESS|RAWPERL|RETURN|SET|STOP|TAGS|THROW|TRY|SWITCH|UNLESS|USE|WHILE|WRAPPER)\b/,punctuation:/[[\]{},()]/}),t.languages.insertBefore("tt2","number",{operator:/=[>=]?|!=?|<=?|>=?|&&|\|\|?|\b(?:and|or|not)\b/,variable:{pattern:/\b[a-z]\w*(?:\s*\.\s*(?:\d+|\$?[a-z]\w*))*\b/i}}),t.languages.insertBefore("tt2","keyword",{delimiter:{pattern:/^(?:\[%|%%)-?|-?%]$/,alias:"punctuation"}}),t.languages.insertBefore("tt2","string",{"single-quoted-string":{pattern:/'[^\\']*(?:\\[\s\S][^\\']*)*'/,greedy:!0,alias:"string"},"double-quoted-string":{pattern:/"[^\\"]*(?:\\[\s\S][^\\"]*)*"/,greedy:!0,alias:"string",inside:{variable:{pattern:/\$(?:[a-z]\w*(?:\.(?:\d+|\$?[a-z]\w*))*)/i}}}}),delete t.languages.tt2.string,t.hooks.add("before-tokenize",function(e){t.languages["markup-templating"].buildPlaceholders(e,"tt2",/\[%[\s\S]+?%\]/g)}),t.hooks.add("after-tokenize",function(e){t.languages["markup-templating"].tokenizePlaceholders(e,"tt2")})}(Prism); \ No newline at end of file diff --git a/package.json b/package.json index 0929771700..e13a1275a8 100755 --- a/package.json +++ b/package.json @@ -9,11 +9,12 @@ "test:core": "mocha tests/core/**/*.js", "test:dependencies": "mocha tests/dependencies-test.js", "test:examples": "mocha tests/examples-test.js", + "test:identifiers": "mocha tests/identifier-test.js", "test:languages": "mocha tests/run.js", "test:patterns": "mocha tests/pattern-tests.js", "test:plugins": "mocha tests/plugins/**/*.js", "test:runner": "mocha tests/testrunner-tests.js", - "test": "npm run test:runner && npm run test:core && npm run test:dependencies && npm run test:languages && npm run test:plugins && npm run test:aliases && npm run test:patterns && npm run test:examples" + "test": "npm run test:runner && npm run test:core && npm run test:dependencies && npm run test:languages && npm run test:plugins && npm run test:aliases && npm run test:patterns && npm run test:examples && npm run test:identifiers" }, "repository": { "type": "git", diff --git a/tests/identifier-test.js b/tests/identifier-test.js new file mode 100644 index 0000000000..9c90fc5e8d --- /dev/null +++ b/tests/identifier-test.js @@ -0,0 +1,216 @@ +"use strict"; + +const { assert } = require('chai'); +const PrismLoader = require('./helper/prism-loader'); +const { languages } = require('../components.json'); +const TokenStreamTransformer = require('./helper/token-stream-transformer'); + + +// This is where you can exclude a language from the identifier test. +// +// To exclude a language to the `testOptions` variable and add your language and the identifier types it should +// excluded from. All languages opt-in for all identifier types by default, so you have to explicitly disable each type +// you want to disable by setting it to `false`. +// Also add a small comment explaining why the language was excluded. +// +// The actual identifiers for all identifier types are defined in the `identifiers` variable. + +/** + * @type {Partial>} + * + * @typedef IdentifierTestOptions + * @property {boolean} [word=true] + * @property {boolean} [number=true] + * @property {boolean} [template=true] + */ +const testOptions = { + // all of these have a special syntax for tokens of the form __something__ + 'asciidoc': { + template: false + }, + 'markdown': { + template: false + }, + 'textile': { + template: false + }, + + // LilyPond doesn't tokenize based on words + 'lilypond': { + word: false, + number: false, + template: false, + }, +}; + +/** @type {Record} */ +const identifiers = { + word: [ + 'abc', + 'word', + 'foo1', + 'foo123', + 'foo123bar', + 'foo_123', + 'foo_123_bar', + ], + number: [ + '0', + '1', + '9', + '123', + '123456789', + ], + template: [ + '__PHP0__', + '__LANG0__', + '__LANG123__', + '___PLACEHOLDER_0___', + '___PLACEHOLDER_123___', + ], +}; + + +// Below is the implementation of the test. +// If you only came here to exclude a language, you won't find anything below. + + +/** @type {Record} */ +const aliasMap = {}; +for (const name in languages) { + const element = languages[name]; + if (element.alias) { + if (Array.isArray(element.alias)) { + element.alias.forEach(a => { + aliasMap[a] = name; + }); + } else { + aliasMap[element.alias] = name; + } + } +} + +for (const lang in languages) { + if (lang === 'meta') { + continue; + } + + describe(`Test '${lang}'`, function () { + const Prism = PrismLoader.createInstance(lang); + testLiterals(Prism, lang); + }); + + function toArray(value) { + if (Array.isArray(value)) { + return value; + } else if (value != null) { + return [value]; + } else { + return []; + } + } + + let optional = toArray(languages[lang].optional); + let modify = toArray(languages[lang].modify); + + if (optional.length > 0 || modify.length > 0) { + let name = `Test '${lang}'`; + if (optional.length > 0) { + name += ` + optional dependencies '${optional.join("', '")}'`; + } + if (modify.length > 0) { + name += ` + modify dependencies '${modify.join("', '")}'`; + } + + describe(name, function () { + const Prism = PrismLoader.createInstance([...optional, ...modify, lang]); + testLiterals(Prism, lang); + }); + } +} + +/** + * @param {string} lang + * @returns {IdentifierTestOptions} + */ +function getOptions(lang) { + return testOptions[aliasMap[lang] || lang] || {}; +} + +/** + * @param {string | Token | (string | Token)[]} token + * @returns {boolean} + * + * @typedef Token + * @property {string} type + * @property {string | Token | (string | Token)[]} content + */ +function isNotBroken(token) { + if (typeof token === "string") { + return true; + } else if (Array.isArray(token)) { + return token.length === 1 && isNotBroken(token[0]); + } else { + return isNotBroken(token.content); + } +} + +/** + * Tests all patterns in the given Prism instance. + * + * @param {any} Prism + * @param {lang} Prism + */ +function testLiterals(Prism, lang) { + + /** + * @param {string[]} identifierElements + * @param {keyof IdentifierTestOptions} identifierType + */ + function matchNotBroken(identifierElements, identifierType) { + for (const name in Prism.languages) { + const grammar = Prism.languages[name]; + if (typeof grammar !== 'object') { + continue; + } + + const options = getOptions(name); + if (options[identifierType] === false) { + continue; + } + + for (const ident of identifierElements) { + const tokens = Prism.tokenize(ident, grammar); + + if (!isNotBroken(tokens)) { + assert.fail( + `${name}: Failed to tokenize the ${identifierType} '${ident}' as one or no token.\n` + + 'Actual token stream:\n\n' + + TokenStreamTransformer.prettyprint(TokenStreamTransformer.simplify(tokens)) + + '\n\n' + + 'How to fix this:\n' + + 'If your language failed any of the identifier tests then some patterns in your language can break identifiers. ' + + 'An identifier is broken if it is split into two different token (e.g. the identifier \'foo123\' (this could be a variable name) but \'123\' is tokenized as a number). ' + + 'This is usually a bug and means that some patterns need more boundary checking.\n' + + 'This test defines an identifier as /[A-Za-z_][A-Za-z_0-9]*/ so you can use \\b boundary assertions.\n\n' + + 'If the syntactic concept of an identifier is not applicable to your language, you can exclude your language from this test (or parts of it). ' + + 'Open \'' + __filename + '\' and follow the instructions to exclude a language. ' + + '(This is usually not what you should do. Only very few language do not have the concept of identifiers.)' + ); + } + } + } + } + + + const options = getOptions(lang); + for (const key in identifiers) { + const identifierType = /** @type {keyof IdentifierTestOptions} */ (key); + const element = identifiers[identifierType]; + if (options[identifierType] !== false) { + it(`- should not break ${identifierType} identifiers`, function () { + matchNotBroken(element, identifierType); + }); + } + } +} diff --git a/tests/languages/markdown/bold_feature.test b/tests/languages/markdown/bold_feature.test index 39217ab775..8d1cdb2048 100644 --- a/tests/languages/markdown/bold_feature.test +++ b/tests/languages/markdown/bold_feature.test @@ -5,18 +5,20 @@ __foobar__ __foo bar__ -__foo*bar*baz__ -__foo_bar_baz__ -__foo~bar~baz__ -__foo~~bar~~baz__ +__foo *bar* baz__ +__foo _bar_ baz__ +__foo ~bar~ baz__ +__foo ~~bar~~ baz__ __foo[bar](baz)__ -**foo*bar*baz** -**foo_bar_baz** -**foo~bar~baz** -**foo~~bar~~baz** +**foo *bar* baz** +**foo _bar_ baz** +**foo ~bar~ baz** +**foo ~~bar~~ baz** **foo[bar](baz)** +not__bold__ __this__either + ---------------------------------------------------- [ @@ -51,7 +53,7 @@ __foo[bar](baz)__ ["bold", [ ["punctuation", "__"], ["content", [ - "foo", + "foo ", ["italic", [ ["punctuation", "*"], ["content", [ @@ -59,14 +61,14 @@ __foo[bar](baz)__ ]], ["punctuation", "*"] ]], - "baz" + " baz" ]], ["punctuation", "__"] ]], ["bold", [ ["punctuation", "__"], ["content", [ - "foo", + "foo ", ["italic", [ ["punctuation", "_"], ["content", [ @@ -74,14 +76,14 @@ __foo[bar](baz)__ ]], ["punctuation", "_"] ]], - "baz" + " baz" ]], ["punctuation", "__"] ]], ["bold", [ ["punctuation", "__"], ["content", [ - "foo", + "foo ", ["strike", [ ["punctuation", "~"], ["content", [ @@ -89,14 +91,14 @@ __foo[bar](baz)__ ]], ["punctuation", "~"] ]], - "baz" + " baz" ]], ["punctuation", "__"] ]], ["bold", [ ["punctuation", "__"], ["content", [ - "foo", + "foo ", ["strike", [ ["punctuation", "~~"], ["content", [ @@ -104,7 +106,7 @@ __foo[bar](baz)__ ]], ["punctuation", "~~"] ]], - "baz" + " baz" ]], ["punctuation", "__"] ]], @@ -125,7 +127,7 @@ __foo[bar](baz)__ ["bold", [ ["punctuation", "**"], ["content", [ - "foo", + "foo ", ["italic", [ ["punctuation", "*"], ["content", [ @@ -133,14 +135,14 @@ __foo[bar](baz)__ ]], ["punctuation", "*"] ]], - "baz" + " baz" ]], ["punctuation", "**"] ]], ["bold", [ ["punctuation", "**"], ["content", [ - "foo", + "foo ", ["italic", [ ["punctuation", "_"], ["content", [ @@ -148,14 +150,14 @@ __foo[bar](baz)__ ]], ["punctuation", "_"] ]], - "baz" + " baz" ]], ["punctuation", "**"] ]], ["bold", [ ["punctuation", "**"], ["content", [ - "foo", + "foo ", ["strike", [ ["punctuation", "~"], ["content", [ @@ -163,14 +165,14 @@ __foo[bar](baz)__ ]], ["punctuation", "~"] ]], - "baz" + " baz" ]], ["punctuation", "**"] ]], ["bold", [ ["punctuation", "**"], ["content", [ - "foo", + "foo ", ["strike", [ ["punctuation", "~~"], ["content", [ @@ -178,7 +180,7 @@ __foo[bar](baz)__ ]], ["punctuation", "~~"] ]], - "baz" + " baz" ]], ["punctuation", "**"] ]], @@ -195,7 +197,8 @@ __foo[bar](baz)__ ]] ]], ["punctuation", "**"] - ]] + ]], + "\r\n\r\nnot__bold__ __this__either" ] ---------------------------------------------------- diff --git a/tests/languages/markdown/italic_feature.test b/tests/languages/markdown/italic_feature.test index f090260853..ca9fc5d6a8 100644 --- a/tests/languages/markdown/italic_feature.test +++ b/tests/languages/markdown/italic_feature.test @@ -5,18 +5,20 @@ _foobar_ _foo bar_ -_foo__bar__baz_ -_foo**bar**baz_ -_foo~bar~baz_ -_foo~~bar~~baz_ +_foo __bar__ baz_ +_foo **bar** baz_ +_foo ~bar~ baz_ +_foo ~~bar~~ baz_ _foo[bar](baz)_ -*foo__bar__baz* -*foo**bar**baz* -*foo~bar~baz* -*foo~~bar~~baz* +*foo __bar__ baz* +*foo **bar** baz* +*foo ~bar~ baz* +*foo ~~bar~~ baz* *foo[bar](baz)* +not_italic_ _this_either + ---------------------------------------------------- [ @@ -51,7 +53,7 @@ _foo[bar](baz)_ ["italic", [ ["punctuation", "_"], ["content", [ - "foo", + "foo ", ["bold", [ ["punctuation", "__"], ["content", [ @@ -59,14 +61,14 @@ _foo[bar](baz)_ ]], ["punctuation", "__"] ]], - "baz" + " baz" ]], ["punctuation", "_"] ]], ["italic", [ ["punctuation", "_"], ["content", [ - "foo", + "foo ", ["bold", [ ["punctuation", "**"], ["content", [ @@ -74,14 +76,14 @@ _foo[bar](baz)_ ]], ["punctuation", "**"] ]], - "baz" + " baz" ]], ["punctuation", "_"] ]], ["italic", [ ["punctuation", "_"], ["content", [ - "foo", + "foo ", ["strike", [ ["punctuation", "~"], ["content", [ @@ -89,14 +91,14 @@ _foo[bar](baz)_ ]], ["punctuation", "~"] ]], - "baz" + " baz" ]], ["punctuation", "_"] ]], ["italic", [ ["punctuation", "_"], ["content", [ - "foo", + "foo ", ["strike", [ ["punctuation", "~~"], ["content", [ @@ -104,7 +106,7 @@ _foo[bar](baz)_ ]], ["punctuation", "~~"] ]], - "baz" + " baz" ]], ["punctuation", "_"] ]], @@ -125,7 +127,7 @@ _foo[bar](baz)_ ["italic", [ ["punctuation", "*"], ["content", [ - "foo", + "foo ", ["bold", [ ["punctuation", "__"], ["content", [ @@ -133,14 +135,14 @@ _foo[bar](baz)_ ]], ["punctuation", "__"] ]], - "baz" + " baz" ]], ["punctuation", "*"] ]], ["italic", [ ["punctuation", "*"], ["content", [ - "foo", + "foo ", ["bold", [ ["punctuation", "**"], ["content", [ @@ -148,14 +150,14 @@ _foo[bar](baz)_ ]], ["punctuation", "**"] ]], - "baz" + " baz" ]], ["punctuation", "*"] ]], ["italic", [ ["punctuation", "*"], ["content", [ - "foo", + "foo ", ["strike", [ ["punctuation", "~"], ["content", [ @@ -163,14 +165,14 @@ _foo[bar](baz)_ ]], ["punctuation", "~"] ]], - "baz" + " baz" ]], ["punctuation", "*"] ]], ["italic", [ ["punctuation", "*"], ["content", [ - "foo", + "foo ", ["strike", [ ["punctuation", "~~"], ["content", [ @@ -178,7 +180,7 @@ _foo[bar](baz)_ ]], ["punctuation", "~~"] ]], - "baz" + " baz" ]], ["punctuation", "*"] ]], @@ -195,7 +197,8 @@ _foo[bar](baz)_ ]] ]], ["punctuation", "*"] - ]] + ]], + "\r\n\r\nnot_italic_ _this_either" ] ---------------------------------------------------- diff --git a/tests/languages/markdown/nested_bold_italic_feature.test b/tests/languages/markdown/nested_bold_italic_feature.test index 63eefe4f33..e29a798060 100644 --- a/tests/languages/markdown/nested_bold_italic_feature.test +++ b/tests/languages/markdown/nested_bold_italic_feature.test @@ -18,6 +18,8 @@ **a *b*** +___foo___ + ---------------------------------------------------- [ @@ -154,6 +156,19 @@ ]] ]], ["punctuation", "**"] + ]], + ["bold", [ + ["punctuation", "__"], + ["content", [ + ["italic", [ + ["punctuation", "_"], + ["content", [ + "foo" + ]], + ["punctuation", "_"] + ]] + ]], + ["punctuation", "__"] ]] ] diff --git a/tests/languages/markdown/strike_feature.test b/tests/languages/markdown/strike_feature.test index 9cb9b70adf..4a0ced00e0 100644 --- a/tests/languages/markdown/strike_feature.test +++ b/tests/languages/markdown/strike_feature.test @@ -5,16 +5,16 @@ bar~~ ~foo bar~ -~foo*bar*baz~ -~foo_bar_baz~ -~foo**bar**baz~ -~foo__bar__baz~ +~foo *bar* baz~ +~foo _bar_ baz~ +~foo **bar** baz~ +~foo __bar__ baz~ ~foo[bar](baz)~ -~~foo*bar*baz~~ -~~foo_bar_baz~~ -~~foo**bar**baz~~ -~~foo__bar__baz~~ +~~foo *bar* baz~~ +~~foo _bar_ baz~~ +~~foo **bar** baz~~ +~~foo __bar__ baz~~ ~~foo[bar](baz)~~ ---------------------------------------------------- @@ -51,7 +51,7 @@ bar~ ["strike", [ ["punctuation", "~"], ["content", [ - "foo", + "foo ", ["italic", [ ["punctuation", "*"], ["content", [ @@ -59,14 +59,14 @@ bar~ ]], ["punctuation", "*"] ]], - "baz" + " baz" ]], ["punctuation", "~"] ]], ["strike", [ ["punctuation", "~"], ["content", [ - "foo", + "foo ", ["italic", [ ["punctuation", "_"], ["content", [ @@ -74,14 +74,14 @@ bar~ ]], ["punctuation", "_"] ]], - "baz" + " baz" ]], ["punctuation", "~"] ]], ["strike", [ ["punctuation", "~"], ["content", [ - "foo", + "foo ", ["bold", [ ["punctuation", "**"], ["content", [ @@ -89,14 +89,14 @@ bar~ ]], ["punctuation", "**"] ]], - "baz" + " baz" ]], ["punctuation", "~"] ]], ["strike", [ ["punctuation", "~"], ["content", [ - "foo", + "foo ", ["bold", [ ["punctuation", "__"], ["content", [ @@ -104,7 +104,7 @@ bar~ ]], ["punctuation", "__"] ]], - "baz" + " baz" ]], ["punctuation", "~"] ]], @@ -125,7 +125,7 @@ bar~ ["strike", [ ["punctuation", "~~"], ["content", [ - "foo", + "foo ", ["italic", [ ["punctuation", "*"], ["content", [ @@ -133,14 +133,14 @@ bar~ ]], ["punctuation", "*"] ]], - "baz" + " baz" ]], ["punctuation", "~~"] ]], ["strike", [ ["punctuation", "~~"], ["content", [ - "foo", + "foo ", ["italic", [ ["punctuation", "_"], ["content", [ @@ -148,14 +148,14 @@ bar~ ]], ["punctuation", "_"] ]], - "baz" + " baz" ]], ["punctuation", "~~"] ]], ["strike", [ ["punctuation", "~~"], ["content", [ - "foo", + "foo ", ["bold", [ ["punctuation", "**"], ["content", [ @@ -163,14 +163,14 @@ bar~ ]], ["punctuation", "**"] ]], - "baz" + " baz" ]], ["punctuation", "~~"] ]], ["strike", [ ["punctuation", "~~"], ["content", [ - "foo", + "foo ", ["bold", [ ["punctuation", "__"], ["content", [ @@ -178,7 +178,7 @@ bar~ ]], ["punctuation", "__"] ]], - "baz" + " baz" ]], ["punctuation", "~~"] ]], diff --git a/tests/languages/textile/inline_feature.test b/tests/languages/textile/inline_feature.test index e56e17bbd9..04dbbcb5ad 100644 --- a/tests/languages/textile/inline_feature.test +++ b/tests/languages/textile/inline_feature.test @@ -22,6 +22,8 @@ __*a* **b** ??c?? @d@ +e+ -f- %g% ^h^ ~i~__ -*a* **b** _c_ __d__ ??e?? @f@ +g+ %h% ^i^ ~j~- %*a* **b** _c_ __d__ ??e?? @f@ +g+ -h- ^i^ ~j~% +not_italic_ _this_either + ---------------------------------------------------- [ @@ -158,9 +160,13 @@ __*a* **b** ??c?? @d@ +e+ -f- %g% ^h^ ~i~__ ["inline", [["punctuation", "^"], "i", ["punctuation", "^"]]], ["inline", [["punctuation", "~"], "j", ["punctuation", "~"]]] ]], ["punctuation", "%"]]] + ]], + + ["phrase", [ + "not_italic_ _this_either" ]] ] ---------------------------------------------------- -Checks for inline styles and nesting. \ No newline at end of file +Checks for inline styles and nesting. From 5ff7932bb881752751247225b7c2cb0b8d83e749 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Fri, 12 Jun 2020 16:09:46 +0200 Subject: [PATCH 0557/1100] Removed gulp `premerge` task (#2357) --- .travis.yml | 9 ++++++--- gulpfile.js/index.js | 2 -- gulpfile.js/premerge.js | 20 -------------------- 3 files changed, 6 insertions(+), 25 deletions(-) delete mode 100644 gulpfile.js/premerge.js diff --git a/.travis.yml b/.travis.yml index 4cbb749561..1023859023 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,9 +13,12 @@ before_install: install: - npm ci before_script: -- npm install -g gulp -- gulp -- gulp premerge +# Rebuild Prism +- npx gulp +# Detect changes +# First, we stage all changes and then detect if there is anything staged +- git add --all && git diff-index --cached HEAD --stat --exit-code || + (echo && echo "The above files changed because the build is not up to date." && echo "Please rebuild Prism." && exit 1) script: npm test deploy: provider: npm diff --git a/gulpfile.js/index.js b/gulpfile.js/index.js index ae3e0d06e4..ece403a2e3 100644 --- a/gulpfile.js/index.js +++ b/gulpfile.js/index.js @@ -12,7 +12,6 @@ const util = require('util'); const fs = require('fs'); const paths = require('./paths'); -const { premerge } = require('./premerge'); const { changes, linkify } = require('./changelog'); @@ -216,7 +215,6 @@ const plugins = series(languagePlugins, minifyPlugins); module.exports = { watch: watchComponentsAndPlugins, default: parallel(components, plugins, componentsJsonToJs, build), - premerge, linkify, changes }; diff --git a/gulpfile.js/premerge.js b/gulpfile.js/premerge.js deleted file mode 100644 index c83894b102..0000000000 --- a/gulpfile.js/premerge.js +++ /dev/null @@ -1,20 +0,0 @@ -"use strict"; - -const git = require('simple-git/promise')(__dirname); - - -/** - * Checks that no files have been modified by the build process. - */ -function gitChanges() { - return git.status().then(res => { - if (res.files.length > 0) { - console.log(res); - throw new Error('There are changes in the file system. Did you forget to run gulp?'); - } - }); -} - -module.exports = { - premerge: gitChanges -}; From ff74a6106360d169975e0d49ae54c70193f68954 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Fri, 12 Jun 2020 18:42:12 +0200 Subject: [PATCH 0558/1100] Added `npm run build` command (#2356) --- README.md | 7 ++++--- extending.html | 8 +++++--- package.json | 1 + 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index b09d6eb81f..2478355c9d 100644 --- a/README.md +++ b/README.md @@ -16,13 +16,14 @@ You can learn more on [prismjs.com](https://prismjs.com/). Prism depends on community contributions to expand and cover a wider array of use cases. If you like it, considering giving back by sending a pull request. Here are a few tips: - Read the [documentation](https://prismjs.com/extending.html). Prism was designed to be extensible. -- Do not edit `prism.js`, it’s just the version of Prism used by the Prism website and is built automatically. Limit your changes to the unminified files in the `components/` folder. The minified files are also generated automatically. -- The build system uses [gulp](https://github.com/gulpjs/gulp) to minify the files and build `prism.js`. Having gulp installed, you just need to run the command `gulp`. +- Do not edit `prism.js`, it’s just the version of Prism used by the Prism website and is built automatically. Limit your changes to the unminified files in the `components/` folder. `prism.js` and all minified files are also generated automatically by our build system. +- The build system uses [gulp](https://github.com/gulpjs/gulp) to minify the files and build `prism.js`. With all of Prism's dependencies installed, you just need to run the command `npm run build`. - Please follow the code conventions used in the files already. For example, I use [tabs for indentation and spaces for alignment](http://lea.verou.me/2012/01/why-tabs-are-clearly-superior/). Opening braces are on the same line, closing braces on their own line regardless of construct. There is a space before the opening brace. etc etc. - Please try to err towards more smaller PRs rather than few huge PRs. If a PR includes changes I want to merge and changes I don't, handling it becomes difficult. - My time is very limited these days, so it might take a long time to review longer PRs (short ones are usually merged very quickly), especially those modifying the Prism Core. This doesn't mean your PR is rejected. - If you contribute a new language definition, you will be responsible for handling bug reports about that language definition. -- If you add a new language definition, theme or plugin, you need to add it to `components.json` as well and rebuild Prism by running `gulp`, so that it becomes available to the download build page. For new languages, please also add a few [tests](https://prismjs.com/test-suite.html) and an example in the `examples/` folder. +- If you [add a new language definition](https://prismjs.com/extending.html#creating-a-new-language-definition) or plugin, you need to add it to `components.json` as well and rebuild Prism by running `npm run build`, so that it becomes available to the download build page. For new languages, please also add a few [tests](https://prismjs.com/test-suite.html) and an example in the `examples/` folder. +- Go to [prism-themes](https://github.com/PrismJS/prism-themes) if you want to add a new theme. Thank you so much for contributing!! diff --git a/extending.html b/extending.html index be51b557f3..5b3df45863 100644 --- a/extending.html +++ b/extending.html @@ -158,11 +158,11 @@

        Creating a new language definition

        Note: Any changes made to components.json require a rebuild (see step 3).

      • Write the language definition.

        @@ -255,7 +255,9 @@

        Creating a new language definition

        We don't have any rules as to what counts as an example, so a single Full example section where you present the highlighting of the major features of the language is enough.

      • -

        Run npx gulp again.

        +

        Run npm run build again.

        + +

        Your language definition is now ready!

      • diff --git a/package.json b/package.json index e13a1275a8..8a475ff250 100755 --- a/package.json +++ b/package.json @@ -5,6 +5,7 @@ "main": "prism.js", "style": "themes/prism.css", "scripts": { + "build": "gulp", "test:aliases": "mocha tests/aliases-test.js", "test:core": "mocha tests/core/**/*.js", "test:dependencies": "mocha tests/dependencies-test.js", From 37273a6f79d40f1196629007291bd9fc7d76db9c Mon Sep 17 00:00:00 2001 From: edukisto <52005215+edukisto@users.noreply.github.com> Date: Sun, 21 Jun 2020 11:34:19 +0300 Subject: [PATCH 0559/1100] Dockerfile: Fixed strings inside comments (#2428) Strings inside comments broke comments. Comments are now greedy, so this can't happen anymore. --- components/prism-docker.js | 5 ++++- components/prism-docker.min.js | 2 +- examples/prism-docker.html | 2 ++ tests/languages/docker/comment_feature.test | 4 +++- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/components/prism-docker.js b/components/prism-docker.js index c075828a80..270e66c554 100644 --- a/components/prism-docker.js +++ b/components/prism-docker.js @@ -4,7 +4,10 @@ Prism.languages.docker = { lookbehind: true }, 'string': /("|')(?:(?!\1)[^\\\r\n]|\\(?:\r\n|[\s\S]))*\1/, - 'comment': /#.*/, + 'comment': { + pattern: /#.*/, + greedy: true + }, 'punctuation': /---|\.\.\.|[:[\]{}\-,|>?]/ }; diff --git a/components/prism-docker.min.js b/components/prism-docker.min.js index ec55d3aa24..9c1b73ff6d 100644 --- a/components/prism-docker.min.js +++ b/components/prism-docker.min.js @@ -1 +1 @@ -Prism.languages.docker={keyword:{pattern:/(^\s*)(?:ADD|ARG|CMD|COPY|ENTRYPOINT|ENV|EXPOSE|FROM|HEALTHCHECK|LABEL|MAINTAINER|ONBUILD|RUN|SHELL|STOPSIGNAL|USER|VOLUME|WORKDIR)(?=\s)/im,lookbehind:!0},string:/("|')(?:(?!\1)[^\\\r\n]|\\(?:\r\n|[\s\S]))*\1/,comment:/#.*/,punctuation:/---|\.\.\.|[:[\]{}\-,|>?]/},Prism.languages.dockerfile=Prism.languages.docker; \ No newline at end of file +Prism.languages.docker={keyword:{pattern:/(^\s*)(?:ADD|ARG|CMD|COPY|ENTRYPOINT|ENV|EXPOSE|FROM|HEALTHCHECK|LABEL|MAINTAINER|ONBUILD|RUN|SHELL|STOPSIGNAL|USER|VOLUME|WORKDIR)(?=\s)/im,lookbehind:!0},string:/("|')(?:(?!\1)[^\\\r\n]|\\(?:\r\n|[\s\S]))*\1/,comment:{pattern:/#.*/,greedy:!0},punctuation:/---|\.\.\.|[:[\]{}\-,|>?]/},Prism.languages.dockerfile=Prism.languages.docker; \ No newline at end of file diff --git a/examples/prism-docker.html b/examples/prism-docker.html index 325d65035c..206d84314a 100644 --- a/examples/prism-docker.html +++ b/examples/prism-docker.html @@ -2,6 +2,8 @@

        Comments

        # These are the comments for a dockerfile.
         # I want to make sure $(variables) don't break out,
         # and we shouldn't see keywords like ADD or ENTRYPOINT
        +
        +# I also want to make sure that this "string" and this 'string' don't break out.
         

        Full example

        diff --git a/tests/languages/docker/comment_feature.test b/tests/languages/docker/comment_feature.test index 054d6023d1..b29b2bedf8 100644 --- a/tests/languages/docker/comment_feature.test +++ b/tests/languages/docker/comment_feature.test @@ -1,11 +1,13 @@ # # foobar +# "foo" 'bar' ---------------------------------------------------- [ ["comment", "#"], - ["comment", "# foobar"] + ["comment", "# foobar"], + ["comment", "# \"foo\" 'bar'"] ] ---------------------------------------------------- From ae0327b3040951b2b6276e033e53b7e326ad01ce Mon Sep 17 00:00:00 2001 From: Starbeamrainbowlabs Date: Mon, 22 Jun 2020 12:16:29 +0100 Subject: [PATCH 0560/1100] Added JS stack trace language (#2418) This language highlights JavaScript stack traces generated by commonly used JS engines. --- components.js | 2 +- components.json | 4 + components/prism-jsstacktrace.js | 48 +++++++++ components/prism-jsstacktrace.min.js | 1 + examples/prism-jsstacktrace.html | 99 +++++++++++++++++++ plugins/show-language/prism-show-language.js | 1 + .../show-language/prism-show-language.min.js | 2 +- .../errormessage-nodejs_feature.test | 11 +++ .../jsstacktrace/errormessage_feature.test | 11 +++ .../jsstacktrace/filename_feature.test | 30 ++++++ .../jsstacktrace/filenamedirect_feature.test | 28 ++++++ .../filenamedirectwindows_feature.test | 28 ++++++ .../jsstacktrace/function_feature.test | 26 +++++ .../jsstacktrace/linenumber_feature.test | 29 ++++++ .../jsstacktrace/notmycode_feature.test | 18 ++++ 15 files changed, 336 insertions(+), 2 deletions(-) create mode 100644 components/prism-jsstacktrace.js create mode 100644 components/prism-jsstacktrace.min.js create mode 100644 examples/prism-jsstacktrace.html create mode 100644 tests/languages/jsstacktrace/errormessage-nodejs_feature.test create mode 100644 tests/languages/jsstacktrace/errormessage_feature.test create mode 100644 tests/languages/jsstacktrace/filename_feature.test create mode 100644 tests/languages/jsstacktrace/filenamedirect_feature.test create mode 100644 tests/languages/jsstacktrace/filenamedirectwindows_feature.test create mode 100644 tests/languages/jsstacktrace/function_feature.test create mode 100644 tests/languages/jsstacktrace/linenumber_feature.test create mode 100644 tests/languages/jsstacktrace/notmycode_feature.test diff --git a/components.js b/components.js index ce821ff52a..15d306601f 100644 --- a/components.js +++ b/components.js @@ -1,2 +1,2 @@ -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml","ssml","atom","rss"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","ssml":"SSML","atom":"Atom","rss":"RSS"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"Augmented Backus–Naur form","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"Backus–Naur form","alias":"rbnf","aliasTitles":{"rbnf":"Routing Backus–Naur form"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dax":{"title":"DAX","owner":"peterbud"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"Extended Backus–Naur form","owner":"RunDevelopment"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"c","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","optional":["markdown"],"owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"hlsl":{"title":"HLSL","require":"c","owner":"RunDevelopment"},"http":{"title":"HTTP","optional":["css","javascript","json","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"json":{"title":"JSON","alias":"webmanifest","aliasTitles":{"webmanifest":"Web App Manifest"},"owner":"CupOfTea696"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"purebasic":{"title":"PureBasic","require":"clike","alias":"pbfasm","owner":"HeX0R101"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"racket":{"title":"Racket","require":"scheme","alias":"rkt","owner":"RunDevelopment"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","alias":"rpy","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","modify":["actionscript","coffeescript","flow","javascript","typescript","vala"],"owner":"RunDevelopment"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"solidity":{"title":"Solidity (Ethereum)","alias":"sol","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","vbnet"],"owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xml-doc":{"title":"XML doc (.net)","require":"markup","modify":["csharp","fsharp","vbnet"],"owner":"RunDevelopment"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml","ssml","atom","rss"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","ssml":"SSML","atom":"Atom","rss":"RSS"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"Augmented Backus–Naur form","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"Backus–Naur form","alias":"rbnf","aliasTitles":{"rbnf":"Routing Backus–Naur form"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dax":{"title":"DAX","owner":"peterbud"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"Extended Backus–Naur form","owner":"RunDevelopment"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"c","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","optional":["markdown"],"owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"hlsl":{"title":"HLSL","require":"c","owner":"RunDevelopment"},"http":{"title":"HTTP","optional":["css","javascript","json","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"jsstacktrace":{"title":"JS stack trace","owner":"sbrl"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"json":{"title":"JSON","alias":"webmanifest","aliasTitles":{"webmanifest":"Web App Manifest"},"owner":"CupOfTea696"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"purebasic":{"title":"PureBasic","require":"clike","alias":"pbfasm","owner":"HeX0R101"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"racket":{"title":"Racket","require":"scheme","alias":"rkt","owner":"RunDevelopment"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","alias":"rpy","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","modify":["actionscript","coffeescript","flow","javascript","typescript","vala"],"owner":"RunDevelopment"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"solidity":{"title":"Solidity (Ethereum)","alias":"sol","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","vbnet"],"owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xml-doc":{"title":"XML doc (.net)","require":"markup","modify":["csharp","fsharp","vbnet"],"owner":"RunDevelopment"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; if (typeof module !== 'undefined' && module.exports) { module.exports = components; } \ No newline at end of file diff --git a/components.json b/components.json index 858656a0e9..38306f24be 100644 --- a/components.json +++ b/components.json @@ -548,6 +548,10 @@ ], "owner": "RunDevelopment" }, + "jsstacktrace": { + "title": "JS stack trace", + "owner": "sbrl" + }, "js-templates": { "title": "JS Templates", "require": "javascript", diff --git a/components/prism-jsstacktrace.js b/components/prism-jsstacktrace.js new file mode 100644 index 0000000000..161c3546fc --- /dev/null +++ b/components/prism-jsstacktrace.js @@ -0,0 +1,48 @@ +Prism.languages.jsstacktrace = { + 'error-message': { + pattern: /^\S.*/m, + alias: 'string' + }, + + 'stack-frame': { + pattern: /^[ \t]+at[ \t]+.*/m, + inside: { + 'not-my-code': { + pattern: /[ \t]+at[ \t]+(?:node\.js|\|.*(?:node_modules|\(\\)|\(\|\$|\(internal\/|\(node\.js)).*/m, + alias: 'comment' + }, + + 'filename': { + pattern: /(\bat\s+|\()(?:[a-zA-Z]:)?[^():]+(?=:)/, + lookbehind: true, + alias: 'url' + }, + + 'function': { + pattern: /(at\s+(?:new\s+)?)[_$a-zA-Z\xA0-\uFFFF<][.$\w\xA0-\uFFFF<>]*/, + lookbehind: true, + inside: { + 'punctuation': /\./ + } + }, + + 'punctuation': /[()]/, + + 'keyword': /\b(?:at|new)\b/, + + 'alias': { + pattern: /\[(?:as\s+)?[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*\]/, + alias: 'variable' + }, + + 'line-number': { + pattern: /:[0-9]+(?::[0-9]+)?\b/, + alias: 'number', + inside: { + 'punctuation': /:/ + } + }, + + } + } +} diff --git a/components/prism-jsstacktrace.min.js b/components/prism-jsstacktrace.min.js new file mode 100644 index 0000000000..caad56d23d --- /dev/null +++ b/components/prism-jsstacktrace.min.js @@ -0,0 +1 @@ +Prism.languages.jsstacktrace={"error-message":{pattern:/^\S.*/m,alias:"string"},"stack-frame":{pattern:/^[ \t]+at[ \t]+.*/m,inside:{"not-my-code":{pattern:/[ \t]+at[ \t]+(?:node\.js|\|.*(?:node_modules|\(\\)|\(\|\$|\(internal\/|\(node\.js)).*/m,alias:"comment"},filename:{pattern:/(\bat\s+|\()(?:[a-zA-Z]:)?[^():]+(?=:)/,lookbehind:!0,alias:"url"},function:{pattern:/(at\s+(?:new\s+)?)[_$a-zA-Z\xA0-\uFFFF<][.$\w\xA0-\uFFFF<>]*/,lookbehind:!0,inside:{punctuation:/\./}},punctuation:/[()]/,keyword:/\b(?:at|new)\b/,alias:{pattern:/\[(?:as\s+)?[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*\]/,alias:"variable"},"line-number":{pattern:/:[0-9]+(?::[0-9]+)?\b/,alias:"number",inside:{punctuation:/:/}}}}}; \ No newline at end of file diff --git a/examples/prism-jsstacktrace.html b/examples/prism-jsstacktrace.html new file mode 100644 index 0000000000..f67f68de34 --- /dev/null +++ b/examples/prism-jsstacktrace.html @@ -0,0 +1,99 @@ +

        Full example

        +
        (node:40780) DeprecationWarning: Using Buffer without `new` will soon stop working. Use `new Buffer()`, or preferably `Buffer.from()`, `Buffer.allocUnsafe()` or `Buffer.alloc()` instead.
        +    at Buffer (buffer.js:79:13)
        +    at repl:1:1
        +    at sigintHandlersWrap (vm.js:22:35)
        +    at sigintHandlersWrap (vm.js:96:12)
        +    at ContextifyScript.Script.runInThisContext (vm.js:21:12)
        +    at REPLServer.defaultEval (repl.js:313:29)
        +    at bound (domain.js:280:14)
        +    at REPLServer.runBound [as eval] (domain.js:293:12)
        +    at REPLServer.onLine (repl.js:513:10)
        +    at emitOne (events.js:101:20)
        +
        +Error: custom error
        +    at Server.<anonymous> (/trace/showcases/http.js:4:9)
        +    at emitTwo (events.js:106:13)
        +    at Server.emit (events.js:191:7)
        +    at HTTPParser.parserOnIncoming [as onIncoming] (_http_server.js:543:12)
        +    at HTTPParser.parserOnHeadersComplete (_http_common.js:105:23)
        +    at new <anonymous> (_http_common.js:159:16)
        +    at exports.FreeList.alloc (internal/freelist.js:14:46)
        +    at Server.connectionListener (_http_server.js:316:24)
        +    at emitOne (events.js:96:13)
        +    at Server.emit (events.js:188:7)
        +    at TCP.onconnection (net.js:1460:8)
        +    at createServerHandle (net.js:1181:14)
        +    at Server._listen2 (net.js:1225:14)
        +    at listen (net.js:1290:10)
        +    at Server.listen (net.js:1386:5)
        +    at Object.<anonymous> (/trace/showcases/http.js:5:4)
        +    at Module._compile (module.js:541:32)
        +    at Object.Module._extensions..js (module.js:550:10)
        +    at Module.load (module.js:458:32)
        +    at tryModuleLoad (module.js:417:12)
        +    at Function.Module._load (module.js:409:3)
        +    at Module.runMain (module.js:575:10)
        +    at run (bootstrap_node.js:340:7)
        +    at startup (bootstrap_node.js:132:9)
        +    at bootstrap_node.js:455:3
        +
        +
        +Error: custom error
        +    at /trace/showcases/basic.js:7:13
        +    at _combinedTickCallback (internal/process/next_tick.js:67:7)
        +    at process._tickCallback (internal/process/next_tick.js:98:9)
        +    at InternalFieldObject.ondone (/trace/showcases/basic.js:6:13)
        +    at /trace/showcases/basic.js:5:10
        +    at FSReqWrap.readFileAfterClose [as oncomplete] (fs.js:445:3)
        +    at ReadFileContext.close (fs.js:358:11)
        +    at FSReqWrap.readFileAfterRead [as oncomplete] (fs.js:414:15)
        +    at ReadFileContext.read (fs.js:342:11)
        +    at FSReqWrap.readFileAfterStat [as oncomplete] (fs.js:398:11)
        +    at FSReqWrap.readFileAfterOpen [as oncomplete] (fs.js:374:11)
        +    at Object.fs.readFile (fs.js:303:11)
        +    at Object.<anonymous> (/trace/showcases/basic.js:4:4)
        +    at Module._compile (module.js:541:32)
        +    at Object.Module._extensions..js (module.js:550:10)
        +    at Module.load (module.js:458:32)
        +    at tryModuleLoad (module.js:417:12)
        +    at Function.Module._load (module.js:409:3)
        +    at Module.runMain (module.js:575:10)
        +    at run (bootstrap_node.js:340:7)
        +    at startup (bootstrap_node.js:132:9)
        +    at bootstrap_node.js:455:3
        +
        +
        +BulkWriteError: E11000 duplicate key error collection: test.test index: _id_ dup key: { : 1 }
        +    at OrderedBulkOperation.handleWriteError (/workspace/node_modules/mongodb/lib/bulk/common.js:1048:11)
        +    at resultHandler (/workspace/node_modules/mongodb/lib/bulk/ordered.js:159:23)
        +    at /workspace/node_modules/mongodb/node_modules/mongodb-core/lib/connection/pool.js:532:18
        +    at _combinedTickCallback (internal/process/next_tick.js:131:7)
        +    at process._tickCallback (internal/process/next_tick.js:180:9)
        +
        +Error
        +    at Collection.(anonymous function) [as insertMany] (/workspace/node_modules/monogram/lib/collection.js:80:21)
        +    at insert (/workspace/test.js:14:31)
        +    at run (/workspace/test.js:9:9)
        +    at <anonymous>
        +    at process._tickCallback (internal/process/next_tick.js:188:7)
        +
        +Error
        +    at Collection.(anonymous function) [as insertMany] (/workspace/node_modules/monogram/lib/collection.js:80:21)
        +    at insert (/workspace/test.js:15:31)
        +    at processTicksAndRejections (internal/process/next_tick.js:81:5)
        +
        +
        +Deno:
        +
        +Error: Some error
        +    at throwsA (<unknown>:1:23)
        +    at <unknown>:1:13
        +    at evaluate ($deno$/repl.ts:64:34)
        +    at Object.replLoop ($deno$/repl.ts:153:13)
        +
        +Uncaught NotFound: No such file or directory (os error 2)
        +    at DenoError (deno/js/errors.ts:22:5)
        +    at maybeError (deno/js/errors.ts:41:12)
        +    at handleAsyncMsgFromRust (deno/js/dispatch.ts:27:17)
        +
        diff --git a/plugins/show-language/prism-show-language.js b/plugins/show-language/prism-show-language.js index ac7d41779f..db2b822df5 100644 --- a/plugins/show-language/prism-show-language.js +++ b/plugins/show-language/prism-show-language.js @@ -88,6 +88,7 @@ "jq": "JQ", "jsdoc": "JSDoc", "js-extras": "JS Extras", + "jsstacktrace": "JS stack trace", "js-templates": "JS Templates", "json": "JSON", "webmanifest": "Web App Manifest", diff --git a/plugins/show-language/prism-show-language.min.js b/plugins/show-language/prism-show-language.min.js index 802b0d75f1..3bf40b14a2 100644 --- a/plugins/show-language/prism-show-language.min.js +++ b/plugins/show-language/prism-show-language.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof self&&self.Prism&&self.document)if(Prism.plugins.toolbar){var r={html:"HTML",xml:"XML",svg:"SVG",mathml:"MathML",ssml:"SSML",rss:"RSS",css:"CSS",clike:"C-like",js:"JavaScript",abap:"ABAP",abnf:"Augmented Backus–Naur form",al:"AL",antlr4:"ANTLR4",g4:"ANTLR4",apacheconf:"Apache Configuration",apl:"APL",aql:"AQL",arff:"ARFF",asciidoc:"AsciiDoc",adoc:"AsciiDoc",asm6502:"6502 Assembly",aspnet:"ASP.NET (C#)",autohotkey:"AutoHotkey",autoit:"AutoIt",basic:"BASIC",bbcode:"BBcode",bnf:"Backus–Naur form",rbnf:"Routing Backus–Naur form",conc:"Concurnas",csharp:"C#",cs:"C#",dotnet:"C#",cpp:"C++",cil:"CIL",coffee:"CoffeeScript",cmake:"CMake",csp:"Content-Security-Policy","css-extras":"CSS Extras",dax:"DAX",django:"Django/Jinja2",jinja2:"Django/Jinja2","dns-zone-file":"DNS zone file","dns-zone":"DNS zone file",dockerfile:"Docker",ebnf:"Extended Backus–Naur form",ejs:"EJS",etlua:"Embedded Lua templating",erb:"ERB","excel-formula":"Excel Formula",xlsx:"Excel Formula",xls:"Excel Formula",fsharp:"F#","firestore-security-rules":"Firestore security rules",ftl:"FreeMarker Template Language",gcode:"G-code",gdscript:"GDScript",gedcom:"GEDCOM",glsl:"GLSL",gml:"GameMaker Language",gamemakerlanguage:"GameMaker Language",graphql:"GraphQL",hs:"Haskell",hcl:"HCL",hlsl:"HLSL",http:"HTTP",hpkp:"HTTP Public-Key-Pins",hsts:"HTTP Strict-Transport-Security",ichigojam:"IchigoJam",iecst:"Structured Text (IEC 61131-3)",inform7:"Inform 7",javadoc:"JavaDoc",javadoclike:"JavaDoc-like",javastacktrace:"Java stack trace",jq:"JQ",jsdoc:"JSDoc","js-extras":"JS Extras","js-templates":"JS Templates",json:"JSON",webmanifest:"Web App Manifest",jsonp:"JSONP",json5:"JSON5",latex:"LaTeX",tex:"TeX",context:"ConTeXt",lilypond:"LilyPond",ly:"LilyPond",emacs:"Lisp",elisp:"Lisp","emacs-lisp":"Lisp",llvm:"LLVM IR",lolcode:"LOLCODE",md:"Markdown","markup-templating":"Markup templating",matlab:"MATLAB",mel:"MEL",moon:"MoonScript",n1ql:"N1QL",n4js:"N4JS",n4jsd:"N4JS","nand2tetris-hdl":"Nand To Tetris HDL",nasm:"NASM",neon:"NEON",nginx:"nginx",nsis:"NSIS",objectivec:"Objective-C",objc:"Objective-C",ocaml:"OCaml",opencl:"OpenCL",parigp:"PARI/GP",objectpascal:"Object Pascal",pcaxis:"PC-Axis",px:"PC-Axis",peoplecode:"PeopleCode",pcode:"PeopleCode",php:"PHP",phpdoc:"PHPDoc","php-extras":"PHP Extras",plsql:"PL/SQL",powerquery:"PowerQuery",pq:"PowerQuery",mscript:"PowerQuery",powershell:"PowerShell",properties:".properties",protobuf:"Protocol Buffers",purebasic:"PureBasic",pbfasm:"PureBasic",py:"Python",q:"Q (kdb+ database)",qml:"QML",rkt:"Racket",jsx:"React JSX",tsx:"React TSX",renpy:"Ren'py",rpy:"Ren'py",rest:"reST (reStructuredText)",robotframework:"Robot Framework",robot:"Robot Framework",rb:"Ruby",sas:"SAS",sass:"Sass (Sass)",scss:"Sass (Scss)","shell-session":"Shell session",solidity:"Solidity (Ethereum)",sol:"Solidity (Ethereum)","solution-file":"Solution file",sln:"Solution file",soy:"Soy (Closure Template)",sparql:"SPARQL",rq:"SPARQL","splunk-spl":"Splunk SPL",sqf:"SQF: Status Quo Function (Arma 3)",sql:"SQL",tap:"TAP",toml:"TOML",tt2:"Template Toolkit 2",trig:"TriG",ts:"TypeScript","t4-cs":"T4 Text Templates (C#)",t4:"T4 Text Templates (C#)","t4-vb":"T4 Text Templates (VB)","t4-templating":"T4 templating",uscript:"UnrealScript",uc:"UnrealScript",vbnet:"VB.Net",vhdl:"VHDL",vim:"vim","visual-basic":"Visual Basic",vb:"Visual Basic",wasm:"WebAssembly",wiki:"Wiki markup",xeoracube:"XeoraCube","xml-doc":"XML doc (.net)",xojo:"Xojo (REALbasic)",xquery:"XQuery",yaml:"YAML",yml:"YAML"};Prism.plugins.toolbar.registerButton("show-language",function(e){var a=e.element.parentNode;if(a&&/pre/i.test(a.nodeName)){var s,t=a.getAttribute("data-language")||r[e.language]||((s=e.language)?(s.substring(0,1).toUpperCase()+s.substring(1)).replace(/s(?=cript)/,"S"):s);if(t){var o=document.createElement("span");return o.textContent=t,o}}})}else console.warn("Show Languages plugin loaded before Toolbar plugin.")}(); \ No newline at end of file +!function(){if("undefined"!=typeof self&&self.Prism&&self.document)if(Prism.plugins.toolbar){var r={html:"HTML",xml:"XML",svg:"SVG",mathml:"MathML",ssml:"SSML",rss:"RSS",css:"CSS",clike:"C-like",js:"JavaScript",abap:"ABAP",abnf:"Augmented Backus–Naur form",al:"AL",antlr4:"ANTLR4",g4:"ANTLR4",apacheconf:"Apache Configuration",apl:"APL",aql:"AQL",arff:"ARFF",asciidoc:"AsciiDoc",adoc:"AsciiDoc",asm6502:"6502 Assembly",aspnet:"ASP.NET (C#)",autohotkey:"AutoHotkey",autoit:"AutoIt",basic:"BASIC",bbcode:"BBcode",bnf:"Backus–Naur form",rbnf:"Routing Backus–Naur form",conc:"Concurnas",csharp:"C#",cs:"C#",dotnet:"C#",cpp:"C++",cil:"CIL",coffee:"CoffeeScript",cmake:"CMake",csp:"Content-Security-Policy","css-extras":"CSS Extras",dax:"DAX",django:"Django/Jinja2",jinja2:"Django/Jinja2","dns-zone-file":"DNS zone file","dns-zone":"DNS zone file",dockerfile:"Docker",ebnf:"Extended Backus–Naur form",ejs:"EJS",etlua:"Embedded Lua templating",erb:"ERB","excel-formula":"Excel Formula",xlsx:"Excel Formula",xls:"Excel Formula",fsharp:"F#","firestore-security-rules":"Firestore security rules",ftl:"FreeMarker Template Language",gcode:"G-code",gdscript:"GDScript",gedcom:"GEDCOM",glsl:"GLSL",gml:"GameMaker Language",gamemakerlanguage:"GameMaker Language",graphql:"GraphQL",hs:"Haskell",hcl:"HCL",hlsl:"HLSL",http:"HTTP",hpkp:"HTTP Public-Key-Pins",hsts:"HTTP Strict-Transport-Security",ichigojam:"IchigoJam",iecst:"Structured Text (IEC 61131-3)",inform7:"Inform 7",javadoc:"JavaDoc",javadoclike:"JavaDoc-like",javastacktrace:"Java stack trace",jq:"JQ",jsdoc:"JSDoc","js-extras":"JS Extras",jsstacktrace:"JS stack trace","js-templates":"JS Templates",json:"JSON",webmanifest:"Web App Manifest",jsonp:"JSONP",json5:"JSON5",latex:"LaTeX",tex:"TeX",context:"ConTeXt",lilypond:"LilyPond",ly:"LilyPond",emacs:"Lisp",elisp:"Lisp","emacs-lisp":"Lisp",llvm:"LLVM IR",lolcode:"LOLCODE",md:"Markdown","markup-templating":"Markup templating",matlab:"MATLAB",mel:"MEL",moon:"MoonScript",n1ql:"N1QL",n4js:"N4JS",n4jsd:"N4JS","nand2tetris-hdl":"Nand To Tetris HDL",nasm:"NASM",neon:"NEON",nginx:"nginx",nsis:"NSIS",objectivec:"Objective-C",objc:"Objective-C",ocaml:"OCaml",opencl:"OpenCL",parigp:"PARI/GP",objectpascal:"Object Pascal",pcaxis:"PC-Axis",px:"PC-Axis",peoplecode:"PeopleCode",pcode:"PeopleCode",php:"PHP",phpdoc:"PHPDoc","php-extras":"PHP Extras",plsql:"PL/SQL",powerquery:"PowerQuery",pq:"PowerQuery",mscript:"PowerQuery",powershell:"PowerShell",properties:".properties",protobuf:"Protocol Buffers",purebasic:"PureBasic",pbfasm:"PureBasic",py:"Python",q:"Q (kdb+ database)",qml:"QML",rkt:"Racket",jsx:"React JSX",tsx:"React TSX",renpy:"Ren'py",rpy:"Ren'py",rest:"reST (reStructuredText)",robotframework:"Robot Framework",robot:"Robot Framework",rb:"Ruby",sas:"SAS",sass:"Sass (Sass)",scss:"Sass (Scss)","shell-session":"Shell session",solidity:"Solidity (Ethereum)",sol:"Solidity (Ethereum)","solution-file":"Solution file",sln:"Solution file",soy:"Soy (Closure Template)",sparql:"SPARQL",rq:"SPARQL","splunk-spl":"Splunk SPL",sqf:"SQF: Status Quo Function (Arma 3)",sql:"SQL",tap:"TAP",toml:"TOML",tt2:"Template Toolkit 2",trig:"TriG",ts:"TypeScript","t4-cs":"T4 Text Templates (C#)",t4:"T4 Text Templates (C#)","t4-vb":"T4 Text Templates (VB)","t4-templating":"T4 templating",uscript:"UnrealScript",uc:"UnrealScript",vbnet:"VB.Net",vhdl:"VHDL",vim:"vim","visual-basic":"Visual Basic",vb:"Visual Basic",wasm:"WebAssembly",wiki:"Wiki markup",xeoracube:"XeoraCube","xml-doc":"XML doc (.net)",xojo:"Xojo (REALbasic)",xquery:"XQuery",yaml:"YAML",yml:"YAML"};Prism.plugins.toolbar.registerButton("show-language",function(e){var a=e.element.parentNode;if(a&&/pre/i.test(a.nodeName)){var t,s=a.getAttribute("data-language")||r[e.language]||((t=e.language)?(t.substring(0,1).toUpperCase()+t.substring(1)).replace(/s(?=cript)/,"S"):t);if(s){var o=document.createElement("span");return o.textContent=s,o}}})}else console.warn("Show Languages plugin loaded before Toolbar plugin.")}(); \ No newline at end of file diff --git a/tests/languages/jsstacktrace/errormessage-nodejs_feature.test b/tests/languages/jsstacktrace/errormessage-nodejs_feature.test new file mode 100644 index 0000000000..0beb7ed10c --- /dev/null +++ b/tests/languages/jsstacktrace/errormessage-nodejs_feature.test @@ -0,0 +1,11 @@ +(node:16843) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'tick' of undefined + +---------------------------------------------------- + +[ + ["error-message", "(node:16843) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'tick' of undefined"] +] + +---------------------------------------------------- + +Checks basic a basic error message. diff --git a/tests/languages/jsstacktrace/errormessage_feature.test b/tests/languages/jsstacktrace/errormessage_feature.test new file mode 100644 index 0000000000..856e18357b --- /dev/null +++ b/tests/languages/jsstacktrace/errormessage_feature.test @@ -0,0 +1,11 @@ +Some text + +---------------------------------------------------- + +[ + ["error-message", "Some text"] +] + +---------------------------------------------------- + +Checks basic a basic error message. diff --git a/tests/languages/jsstacktrace/filename_feature.test b/tests/languages/jsstacktrace/filename_feature.test new file mode 100644 index 0000000000..289e767896 --- /dev/null +++ b/tests/languages/jsstacktrace/filename_feature.test @@ -0,0 +1,30 @@ +Some text + at (foo/bar.baz:123:98) + +---------------------------------------------------- + +[ + ["error-message", "Some text"], + [ + "stack-frame", + [ + ["keyword", "at"], + ["punctuation", "("], + ["filename", "foo/bar.baz"], + [ + "line-number", + [ + ["punctuation", ":"], + "123", + ["punctuation", ":"], + "98" + ] + ], + ["punctuation", ")"] + ] + ] +] + +---------------------------------------------------- + +Checks basic a basic error message. diff --git a/tests/languages/jsstacktrace/filenamedirect_feature.test b/tests/languages/jsstacktrace/filenamedirect_feature.test new file mode 100644 index 0000000000..6c5501e586 --- /dev/null +++ b/tests/languages/jsstacktrace/filenamedirect_feature.test @@ -0,0 +1,28 @@ +Some text + at /foo/bar.baz:123:98 + +---------------------------------------------------- + +[ + ["error-message", "Some text"], + [ + "stack-frame", + [ + ["keyword", "at"], + ["filename", "/foo/bar.baz"], + [ + "line-number", + [ + ["punctuation", ":"], + "123", + ["punctuation", ":"], + "98" + ] + ] + ] + ] +] + +---------------------------------------------------- + +Checks basic a basic error message. diff --git a/tests/languages/jsstacktrace/filenamedirectwindows_feature.test b/tests/languages/jsstacktrace/filenamedirectwindows_feature.test new file mode 100644 index 0000000000..c5f671d81e --- /dev/null +++ b/tests/languages/jsstacktrace/filenamedirectwindows_feature.test @@ -0,0 +1,28 @@ +Some text + at C:\foo\bar.baz:123:98 + +---------------------------------------------------- + +[ + ["error-message", "Some text"], + [ + "stack-frame", + [ + ["keyword", "at"], + ["filename", "C:\\foo\\bar.baz"], + [ + "line-number", + [ + ["punctuation", ":"], + "123", + ["punctuation", ":"], + "98" + ] + ] + ] + ] +] + +---------------------------------------------------- + +Checks basic a basic error message. diff --git a/tests/languages/jsstacktrace/function_feature.test b/tests/languages/jsstacktrace/function_feature.test new file mode 100644 index 0000000000..2b5b51ce0f --- /dev/null +++ b/tests/languages/jsstacktrace/function_feature.test @@ -0,0 +1,26 @@ +Some text + at foo.bar + +---------------------------------------------------- + +[ + ["error-message", "Some text"], + [ + "stack-frame", + [ + ["keyword", "at"], + [ + "function", + [ + "foo", + [ "punctuation", "." ], + "bar" + ] + ] + ] + ] +] + +---------------------------------------------------- + +Checks basic a basic error message. diff --git a/tests/languages/jsstacktrace/linenumber_feature.test b/tests/languages/jsstacktrace/linenumber_feature.test new file mode 100644 index 0000000000..42e0d2e5ae --- /dev/null +++ b/tests/languages/jsstacktrace/linenumber_feature.test @@ -0,0 +1,29 @@ +Some text + at :98:32 + +---------------------------------------------------- + +[ + ["error-message", "Some text"], + [ + "stack-frame", [ + [ + "keyword", + "at" + ], + [ + "line-number", + [ + ["punctuation", ":"], + "98", + ["punctuation", ":"], + "32" + ] + ] + ] + ] +] + +---------------------------------------------------- + +Checks basic a basic error message. diff --git a/tests/languages/jsstacktrace/notmycode_feature.test b/tests/languages/jsstacktrace/notmycode_feature.test new file mode 100644 index 0000000000..8f3aba22c3 --- /dev/null +++ b/tests/languages/jsstacktrace/notmycode_feature.test @@ -0,0 +1,18 @@ +Some text + at processTicksAndRejections (internal/process/task_queues.js:98:32) + +---------------------------------------------------- + +[ + ["error-message", "Some text"], + [ + "stack-frame", + [ + ["not-my-code", "\tat processTicksAndRejections (internal/process/task_queues.js:98:32)"] + ] + ] +] + +---------------------------------------------------- + +Checks greying out internal / library code stack trace frames From 3a127c7d338dfa469ed26290d7de35a7dcbe3f41 Mon Sep 17 00:00:00 2001 From: Xy Ren Date: Wed, 24 Jun 2020 20:30:38 +0800 Subject: [PATCH 0561/1100] Add support for the language Agda (#2430) --- components.js | 2 +- components.json | 4 + components/prism-agda.js | 24 +++ components/prism-agda.min.js | 1 + examples/prism-agda.html | 169 +++++++++++++++++++++ tests/languages/agda/comment_feature.test | 18 +++ tests/languages/agda/data_feature.test | 37 +++++ tests/languages/agda/function_feature.test | 56 +++++++ tests/languages/agda/module_feature.test | 49 ++++++ tests/languages/agda/record_feature.test | 37 +++++ 10 files changed, 396 insertions(+), 1 deletion(-) create mode 100644 components/prism-agda.js create mode 100644 components/prism-agda.min.js create mode 100644 examples/prism-agda.html create mode 100644 tests/languages/agda/comment_feature.test create mode 100644 tests/languages/agda/data_feature.test create mode 100644 tests/languages/agda/function_feature.test create mode 100644 tests/languages/agda/module_feature.test create mode 100644 tests/languages/agda/record_feature.test diff --git a/components.js b/components.js index 15d306601f..754a5cf520 100644 --- a/components.js +++ b/components.js @@ -1,2 +1,2 @@ -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml","ssml","atom","rss"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","ssml":"SSML","atom":"Atom","rss":"RSS"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"Augmented Backus–Naur form","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"Backus–Naur form","alias":"rbnf","aliasTitles":{"rbnf":"Routing Backus–Naur form"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dax":{"title":"DAX","owner":"peterbud"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"Extended Backus–Naur form","owner":"RunDevelopment"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"c","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","optional":["markdown"],"owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"hlsl":{"title":"HLSL","require":"c","owner":"RunDevelopment"},"http":{"title":"HTTP","optional":["css","javascript","json","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"jsstacktrace":{"title":"JS stack trace","owner":"sbrl"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"json":{"title":"JSON","alias":"webmanifest","aliasTitles":{"webmanifest":"Web App Manifest"},"owner":"CupOfTea696"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"purebasic":{"title":"PureBasic","require":"clike","alias":"pbfasm","owner":"HeX0R101"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"racket":{"title":"Racket","require":"scheme","alias":"rkt","owner":"RunDevelopment"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","alias":"rpy","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","modify":["actionscript","coffeescript","flow","javascript","typescript","vala"],"owner":"RunDevelopment"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"solidity":{"title":"Solidity (Ethereum)","alias":"sol","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","vbnet"],"owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xml-doc":{"title":"XML doc (.net)","require":"markup","modify":["csharp","fsharp","vbnet"],"owner":"RunDevelopment"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml","ssml","atom","rss"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","ssml":"SSML","atom":"Atom","rss":"RSS"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"Augmented Backus–Naur form","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"agda":{"title":"Agda","owner":"xy-ren"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"Backus–Naur form","alias":"rbnf","aliasTitles":{"rbnf":"Routing Backus–Naur form"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dax":{"title":"DAX","owner":"peterbud"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"Extended Backus–Naur form","owner":"RunDevelopment"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"c","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","optional":["markdown"],"owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"hlsl":{"title":"HLSL","require":"c","owner":"RunDevelopment"},"http":{"title":"HTTP","optional":["css","javascript","json","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"jsstacktrace":{"title":"JS stack trace","owner":"sbrl"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"json":{"title":"JSON","alias":"webmanifest","aliasTitles":{"webmanifest":"Web App Manifest"},"owner":"CupOfTea696"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"purebasic":{"title":"PureBasic","require":"clike","alias":"pbfasm","owner":"HeX0R101"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"racket":{"title":"Racket","require":"scheme","alias":"rkt","owner":"RunDevelopment"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","alias":"rpy","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","modify":["actionscript","coffeescript","flow","javascript","typescript","vala"],"owner":"RunDevelopment"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"solidity":{"title":"Solidity (Ethereum)","alias":"sol","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","vbnet"],"owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xml-doc":{"title":"XML doc (.net)","require":"markup","modify":["csharp","fsharp","vbnet"],"owner":"RunDevelopment"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; if (typeof module !== 'undefined' && module.exports) { module.exports = components; } \ No newline at end of file diff --git a/components.json b/components.json index 38306f24be..d0363f6189 100644 --- a/components.json +++ b/components.json @@ -94,6 +94,10 @@ "title": "Ada", "owner": "Lucretia" }, + "agda": { + "title": "Agda", + "owner": "xy-ren" + }, "al": { "title": "AL", "owner": "RunDevelopment" diff --git a/components/prism-agda.js b/components/prism-agda.js new file mode 100644 index 0000000000..e197651cca --- /dev/null +++ b/components/prism-agda.js @@ -0,0 +1,24 @@ +(function (Prism) { + + Prism.languages.agda = { + 'comment': /\{-[\s\S]*?(?:-\}|$)|--.*/, + 'string': { + pattern: /"(?:\\(?:\r\n|[\s\S])|[^\\\r\n"])*"/, + greedy: true, + }, + 'punctuation': /[(){}⦃⦄.;@]/, + 'class-name': { + pattern: /((?:data|record) +)\S+/, + lookbehind: true, + }, + 'function': { + pattern: /(^[ \t]*)[^:\r\n]+?(?=:)/m, + lookbehind: true, + }, + 'operator': { + pattern: /(^\s*|\s)(?:[=|:∀→λ\\?_]|->)(?=\s)/, + lookbehind: true, + }, + 'keyword': /\b(?:Set|abstract|constructor|data|eta-equality|field|forall|forall|hiding|import|in|inductive|infix|infixl|infixr|instance|let|macro|module|mutual|no-eta-equality|open|overlap|pattern|postulate|primitive|private|public|quote|quoteContext|quoteGoal|quoteTerm|record|renaming|rewrite|syntax|tactic|unquote|unquoteDecl|unquoteDef|using|variable|where|with)\b/, + }; +}(Prism)); diff --git a/components/prism-agda.min.js b/components/prism-agda.min.js new file mode 100644 index 0000000000..fd54ff1aa2 --- /dev/null +++ b/components/prism-agda.min.js @@ -0,0 +1 @@ +Prism.languages.agda={comment:/\{-[\s\S]*?(?:-\}|$)|--.*/,string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^\\\r\n"])*"/,greedy:!0},punctuation:/[(){}⦃⦄.;@]/,"class-name":{pattern:/((?:data|record) +)\S+/,lookbehind:!0},function:{pattern:/(^[ \t]*)[^:\r\n]+?(?=:)/m,lookbehind:!0},operator:{pattern:/(^\s*|\s)(?:[=|:∀→λ\\?_]|->)(?=\s)/,lookbehind:!0},keyword:/\b(?:Set|abstract|constructor|data|eta-equality|field|forall|forall|hiding|import|in|inductive|infix|infixl|infixr|instance|let|macro|module|mutual|no-eta-equality|open|overlap|pattern|postulate|primitive|private|public|quote|quoteContext|quoteGoal|quoteTerm|record|renaming|rewrite|syntax|tactic|unquote|unquoteDecl|unquoteDef|using|variable|where|with)\b/}; \ No newline at end of file diff --git a/examples/prism-agda.html b/examples/prism-agda.html new file mode 100644 index 0000000000..2c3d2572ec --- /dev/null +++ b/examples/prism-agda.html @@ -0,0 +1,169 @@ +

        Agda Full Example

        +

        ** Copyright - this piece of code is a modified version of [https://plfa.github.io/Naturals/] by Philip Wadler, Wen Kokke, Jeremy G Siek and contributors.

        +
        -- 1.1 Naturals
        +
        +module plfa.part1.Naturals where
        +
        +-- The standard way to enter Unicode math symbols in Agda
        +-- is to use the IME provided by agda-mode.
        +-- for example ℕ can be entered by typing \bN.
        +
        +-- The inductive definition of natural numbers.
        +-- In Agda, data declarations correspond to axioms.
        +-- Also types correspond to sets.
        +-- CHAR: \bN → ℕ
        +data ℕ : Set where
        +	-- This corresponds to the `zero` rule in Dedekin-Peano's axioms.
        +	-- Note that the syntax resembles Haskell GADTs.
        +	-- Also note that the `has-type` operator is `:` (as in Idris), not `::` (as in Haskell).
        +	zero : ℕ
        +	-- This corresponds to the `succesor` rule in Dedekin-Peano's axioms.
        +	-- In such a constructive system in Agda, induction rules etc comes by nature.
        +	-- The function arrow can be either `->` or `→`.
        +	-- CHAR: \to or \-> or \r- → →
        +	suc  : ℕ → ℕ
        +
        +-- EXERCISE `seven`
        +seven : ℕ
        +seven = suc (suc (suc (suc (suc (suc (suc zero))))))
        +
        +-- This line is a compiler pragma.
        +-- It makes `ℕ` correspond to Haskell's type `Integer`
        +-- and allows us to use number literals (0, 1, 2, ...) to express `ℕ`.
        +{-# BUILTIN NATURAL ℕ #-}
        +
        +-- Agda has a module system corresponding to the project file structure.
        +-- e.g. `My.Namespace` is in
        +-- `project path/My/Namespace.agda`.
        +
        +-- The `import` statement does NOT expose the names to the top namespace.
        +-- You'll have to use `My.Namespace.thing` instead of directly `thing`.
        +import Relation.Binary.PropositionalEquality as Eq
        +-- The `open` statement unpacks all the names in a imported namespace and exposes them to the top namespace.
        +-- Alternatively the `open import` statement imports a namespace and opens it at the same time.
        +-- The `using (a; ..)` clause can limit a range of names to expose, instead of all of them.
        +-- Alternatively, the `hiding (a; ..)` clause can limit a range of names NOT to expose.
        +-- Also the `renaming (a to b; ..)` clause can rename names.
        +-- CHAR: \== → ≡
        +--       \gt → ⟨
        +--       \lt → ⟩
        +--       \qed → ∎
        +open Eq using (_≡_; refl)
        +open Eq.≡-Reasoning using (begin_; _≡⟨⟩_; _∎)
        +
        +-- Addition of `ℕ`.
        +-- Note that Agda functions are *like* Haskell functions.
        +-- In Agda, operators can be mixfix (incl. infix, prefix, suffix, self-bracketing and many others).
        +-- All the `holes` are represented by `_`s. Unlike Haskell, operator names don't need to be put in parentheses.
        +-- Operators can also be called in the manner of normal functions.
        +-- e.g. a + b = _+_ a b.
        +-- Sections are also available, though somehow weird.
        +-- e.g. a +_ = _+_ a.
        +_+_ : ℕ → ℕ → ℕ
        +-- Lhs can also be infix!
        +-- This is the standard definition in both Peano and Agda stdlib.
        +-- We do pattern match on the first parameter, it's both convention and for convenience.
        +-- Agda does a termination check on recursive function.
        +-- Here the first parameter decreases over evaluation thus it is *well-founded*.
        +zero    + n = n
        +(suc m) + n = suc (m + n)
        +
        +-- Here we take a glance at the *dependent type*.
        +-- In dependent type, we can put values into type level, and vice versa.
        +-- This is especially useful when we're expecting to make the types more precise.
        +-- Here `_≡_` is a type that says that two values are *the same*, that is, samely constructed.
        +_ : 2 + 3 ≡ 5
        +-- We can do it by ≡-Reasoning, that is writing a (unreasonably long) chain of equations.
        +_ =
        +	begin
        +		2 + 3
        +	≡⟨⟩ -- This operator means the lhs and rhs can be reduced to the same form so that they are equal.
        +		suc (1 + 3)
        +	≡⟨⟩
        +		suc (suc (0 + 3)) -- Just simulating the function evaluation
        +	≡⟨⟩
        +		suc (suc 3)
        +	≡⟨⟩
        +		5
        +	∎ -- The *tombstone*, QED.
        +
        +-- Well actually we can also get this done by simply writing `refl`.
        +-- `refl` is a proof that says "If two values evaluates to the same form, then they are equal".
        +-- Since Agda can automatically evaluate the terms for us, this makes sense.
        +_ : 2 + 3 ≡ 5
        +_ = refl
        +
        +-- Multiplication of `ℕ`, defined with addition.
        +_*_ : ℕ → ℕ → ℕ
        +-- Here we can notice that in Agda we prefer to indent by *visual blocks* instead by a fixed number of spaces.
        +zero    * n = zero
        +-- Here the addition is at the front, to be consistent with addition.
        +(suc m) * n = n + (m * n)
        +
        +-- EXERCISE `_^_`, Exponentation of `ℕ`.
        +_^_ : ℕ → ℕ → ℕ
        +-- We can only pattern match the 2nd argument.
        +m ^ zero    = suc zero
        +m ^ (suc n) = m * (m ^ n)
        +
        +-- *Monus* (a wordplay on minus), the non-negative subtraction of `ℕ`.
        +-- if less than 0 then we get 0.
        +-- CHAR: \.- → ∸
        +_∸_ : ℕ → ℕ → ℕ
        +m     ∸ zero  = m
        +zero  ∸ suc n = zero
        +suc m ∸ suc n = m ∸ n
        +
        +-- Now we define the precedence of the operators, as in Haskell.
        +infixl 6 _+_ _∸_
        +infixl 7 _*_
        +
        +-- These are some more pragmas. Should be self-explaining.
        +{-# BUILTIN NATPLUS _+_ #-}
        +{-# BUILTIN NATTIMES _*_ #-}
        +{-# BUILTIN NATMINUS _∸_ #-}
        +
        +-- EXERCISE `Bin`. We define a binary representation of natural numbers.
        +-- Leading `O`s are acceptable.
        +data Bin : Set where
        +	⟨⟩ : Bin
        +	_O : Bin → Bin
        +	_I : Bin → Bin
        +
        +-- Like `suc` for `Bin`.
        +inc : Bin → Bin
        +inc ⟨⟩ = ⟨⟩ I
        +inc (b O) = b I
        +inc (b I) = (inc b) O
        +
        +-- `ℕ` to `Bin`. This is a Θ(n) solution and awaits a better Θ(log n) reimpelementation.
        +to : ℕ → Bin
        +to zero    = ⟨⟩ O
        +to (suc n) = inc (to n)
        +
        +-- `Bin` to `ℕ`.
        +from : Bin → ℕ
        +from ⟨⟩    = 0
        +from (b O) = 2 * (from b)
        +from (b I) = 1 + 2 * (from b)
        +
        +-- Simple tests from 0 to 4.
        +_ : from (to 0) ≡ 0
        +_ = refl
        +
        +_ : from (to 1) ≡ 1
        +_ = refl
        +
        +_ : from (to 2) ≡ 2
        +_ = refl
        +
        +_ : from (to 3) ≡ 3
        +_ = refl
        +
        +_ : from (to 4) ≡ 4
        +_ = refl
        +
        +-- EXERCISE END `Bin`
        +
        +-- STDLIB: import Data.Nat using (ℕ; zero; suc; _+_; _*_; _^_; _∸_)
        +
        \ No newline at end of file diff --git a/tests/languages/agda/comment_feature.test b/tests/languages/agda/comment_feature.test new file mode 100644 index 0000000000..8dd0bf4689 --- /dev/null +++ b/tests/languages/agda/comment_feature.test @@ -0,0 +1,18 @@ +{- + This is a + multiline comment +-} +-- This is a singleline comment + +---------------------------------------------------- + +[ + ["comment", "{-\n\tThis is a\n\tmultiline comment\n-}"], + ["comment", "-- This is a singleline comment"] +] + +---------------------------------------------------- + +In agda there are two kinds of comments: + - Multiline comments wrapped by {- -} + - Singleline comments leading by -- diff --git a/tests/languages/agda/data_feature.test b/tests/languages/agda/data_feature.test new file mode 100644 index 0000000000..e4300cba7f --- /dev/null +++ b/tests/languages/agda/data_feature.test @@ -0,0 +1,37 @@ +data _≐_ {ℓ} {A : Set ℓ} (x : A) : A → Prop ℓ where + refl : x ≐ x + +---------------------------------------------------- + +[ + ["keyword", "data"], + ["class-name", "_≐_"], + ["punctuation", "{"], + "ℓ", + ["punctuation", "}"], + ["punctuation", "{"], + ["function", "A "], + ["operator", ":"], + ["keyword", "Set"], + " ℓ", + ["punctuation", "}"], + ["punctuation", "("], + ["function", "x "], + ["operator", ":"], + " A", + ["punctuation", ")"], + ["function", " "], + ["operator", ":"], + " A ", + ["operator", "→"], + " Prop ℓ ", + ["keyword", "where"], + ["function", "refl "], + ["operator", ":"], + " x ≐ x" +] + +---------------------------------------------------- + +The `data` keyword in Agda is used to declare a type (of course it can be dependent) +in a fashion like Haskell's GADTs. diff --git a/tests/languages/agda/function_feature.test b/tests/languages/agda/function_feature.test new file mode 100644 index 0000000000..f857f8dcd3 --- /dev/null +++ b/tests/languages/agda/function_feature.test @@ -0,0 +1,56 @@ +merge : {A : Set} (_<_ : A → A → Bool) → List A → List A → List A +merge xs [] = xs +merge [] ys = ys +merge xs@(x ∷ xs₁) ys@(y ∷ ys₁) = + if x < y then x ∷ merge xs₁ ys + else y ∷ merge xs ys₁ + +---------------------------------------------------- + +[ + ["function", "merge "], + ["operator", ":"], + ["punctuation", "{"], + ["function", "A "], + ["operator", ":"], + ["keyword", "Set"], + ["punctuation", "}"], + ["punctuation", "("], + ["function", "_<_ "], + ["operator", ":"], + " A ", + ["operator", "→"], + " A ", + ["operator", "→"], + " Bool", + ["punctuation", ")"], + ["operator", "→"], + " List A ", + ["operator", "→"], + " List A ", + ["operator", "→"], + " List A\nmerge xs [] ", + ["operator", "="], + " xs\nmerge [] ys ", + ["operator", "="], + " ys\nmerge xs", + ["punctuation", "@"], + ["punctuation", "("], + "x ∷ xs₁", + ["punctuation", ")"], + " ys", + ["punctuation", "@"], + ["punctuation", "("], + "y ∷ ys₁", + ["punctuation", ")"], + ["operator", "="], + "\n\tif x < y then x ∷ merge xs₁ ys\n\t\t\t\t\t else y ∷ merge xs ys₁" +] + +---------------------------------------------------- + +Functions in Agda are PURE and TOTAL. +Different from Haskell, they can be *dependent* and they can receive implicit arguments. +Functions can be infix, or even mixfix, and they become operators. +So it is generally not possible to highlight all the "operators" as they are functions. +(Also, types are functions too, so it is generally impossible to highlight types.) diff --git a/tests/languages/agda/module_feature.test b/tests/languages/agda/module_feature.test new file mode 100644 index 0000000000..deb9e5ddee --- /dev/null +++ b/tests/languages/agda/module_feature.test @@ -0,0 +1,49 @@ +module Test.test where +import Relation.Binary.PropositionalEquality as Eq +open Eq hiding (_≡_; refl) +open Eq.≡-Reasoning using (begin_; _≡⟨⟩_; _∎) renaming (begin_ to start_) + +---------------------------------------------------- + +[ + ["keyword", "module"], + " Test", + ["punctuation", "."], + "test ", + ["keyword", "where"], + ["keyword", "import"], + " Relation", + ["punctuation", "."], + "Binary", + ["punctuation", "."], + "PropositionalEquality as Eq\n", + ["keyword", "open"], + " Eq ", + ["keyword", "hiding"], + ["punctuation", "("], + "_≡_", + ["punctuation", ";"], + " refl", + ["punctuation", ")"], + ["keyword", "open"], + " Eq", + ["punctuation", "."], + "≡-Reasoning ", + ["keyword", "using"], + ["punctuation", "("], + "begin_", + ["punctuation", ";"], + " _≡⟨⟩_", + ["punctuation", ";"], + " _∎", + ["punctuation", ")"], + ["keyword", "renaming"], + ["punctuation", "("], + "begin_ to start_", + ["punctuation", ")"] +] + +---------------------------------------------------- + +Agda's module system is one based on namespaces and corresponding to file structure. +It supports namespace importing, open importing, partial hiding/using and renaming. diff --git a/tests/languages/agda/record_feature.test b/tests/languages/agda/record_feature.test new file mode 100644 index 0000000000..57c83e5e44 --- /dev/null +++ b/tests/languages/agda/record_feature.test @@ -0,0 +1,37 @@ +record Fin (n : Nat) : Set where + constructor _[_] + field + ⟦_⟧ : Nat + proof : suc ⟦_⟧ ≤ n +open Fin + +---------------------------------------------------- + +[ + ["keyword", "record"], + ["class-name", "Fin"], + ["punctuation", "("], + ["function", "n "], + ["operator", ":"], + " Nat", + ["punctuation", ")"], + ["function", " "], + ["operator", ":"], + ["keyword", "Set"], + ["keyword", "where"], + ["keyword", "constructor"], + " _[_]\n\t", + ["keyword", "field"], + ["function", "⟦_⟧ "], + ["operator", ":"], + " Nat\n\t\t", + ["function", "proof "], + ["operator", ":"], + " suc ⟦_⟧ ≤ n\n", + ["keyword", "open"], + " Fin" +] + +---------------------------------------------------- + +Agda's record is like objects, but different in many aspects and much more powerful. From a36e96ab142015106dc40084bad982c18587da18 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Sat, 27 Jun 2020 00:01:47 +0200 Subject: [PATCH 0562/1100] Added general de/activation mechanism for plugins (#2434) Keep Markup, Line numbers, and Normalize whitespace now share the same per-element class-based de/activation logic. --- components/prism-core.js | 35 +++++++++++++++++++ components/prism-core.min.js | 2 +- plugins/keep-markup/index.html | 5 ++- plugins/keep-markup/prism-keep-markup.js | 4 +++ plugins/keep-markup/prism-keep-markup.min.js | 2 +- plugins/line-numbers/prism-line-numbers.js | 22 +++--------- .../line-numbers/prism-line-numbers.min.js | 2 +- .../prism-normalize-whitespace.js | 10 ++++-- .../prism-normalize-whitespace.min.js | 2 +- prism.js | 35 +++++++++++++++++++ 10 files changed, 94 insertions(+), 25 deletions(-) diff --git a/components/prism-core.js b/components/prism-core.js index cd5cee1e81..f247eb1388 100644 --- a/components/prism-core.js +++ b/components/prism-core.js @@ -143,6 +143,41 @@ var _ = { } return null; } + }, + + /** + * Returns whether a given class is active for `element`. + * + * The class can be activated if `element` or one of its ancestors has the given class and it can be deactivated + * if `element` or one of its ancestors has the negated version of the given class. The _negated version_ of the + * given class is just the given class with a `no-` prefix. + * + * Whether the class is active is determined by the closest ancestor of `element` (where `element` itself is + * closest ancestor) that has the given class or the negated version of it. If neither `element` nor any of its + * ancestors have the given class or the negated version of it, then the default activation will be returned. + * + * In the paradoxical situation where the closest ancestor contains __both__ the given class and the negated + * version of it, the class is considered active. + * + * @param {Element} element + * @param {string} className + * @param {boolean} [defaultActivation=false] + * @returns {boolean} + */ + isActive: function (element, className, defaultActivation) { + var no = 'no-' + className; + + while (element) { + var classList = element.classList; + if (classList.contains(className)) { + return true; + } + if (classList.contains(no)) { + return false; + } + element = element.parentElement; + } + return !!defaultActivation; } }, diff --git a/components/prism-core.min.js b/components/prism-core.min.js index 698c572d7c..19ebaa572c 100644 --- a/components/prism-core.min.js +++ b/components/prism-core.min.js @@ -1 +1 @@ -var _self="undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{},Prism=function(u){var c=/\blang(?:uage)?-([\w-]+)\b/i,n=0,C={manual:u.Prism&&u.Prism.manual,disableWorkerMessageHandler:u.Prism&&u.Prism.disableWorkerMessageHandler,util:{encode:function e(n){return n instanceof _?new _(n.type,e(n.content),n.alias):Array.isArray(n)?n.map(e):n.replace(/&/g,"&").replace(/n.length)return;if(!(b instanceof _)){var x=1;if(d&&y!=t.tail.prev){g.lastIndex=k;var w=g.exec(n);if(!w)break;var A=w.index+(h&&w[1]?w[1].length:0),P=w.index+w[0].length,S=k;for(S+=y.value.length;S<=A;)y=y.next,S+=y.value.length;if(S-=y.value.length,k=S,y.value instanceof _)continue;for(var O=y;O!==t.tail&&(S"+a.content+""},!u.document)return u.addEventListener&&(C.disableWorkerMessageHandler||u.addEventListener("message",function(e){var n=JSON.parse(e.data),t=n.language,r=n.code,a=n.immediateClose;u.postMessage(C.highlight(r,C.languages[t],t)),a&&u.close()},!1)),C;var e=C.util.currentScript();function t(){C.manual||C.highlightAll()}if(e&&(C.filename=e.src,e.hasAttribute("data-manual")&&(C.manual=!0)),!C.manual){var r=document.readyState;"loading"===r||"interactive"===r&&e&&e.defer?document.addEventListener("DOMContentLoaded",t):window.requestAnimationFrame?window.requestAnimationFrame(t):window.setTimeout(t,16)}return C}(_self);"undefined"!=typeof module&&module.exports&&(module.exports=Prism),"undefined"!=typeof global&&(global.Prism=Prism); \ No newline at end of file +var _self="undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{},Prism=function(u){var c=/\blang(?:uage)?-([\w-]+)\b/i,n=0,C={manual:u.Prism&&u.Prism.manual,disableWorkerMessageHandler:u.Prism&&u.Prism.disableWorkerMessageHandler,util:{encode:function e(n){return n instanceof _?new _(n.type,e(n.content),n.alias):Array.isArray(n)?n.map(e):n.replace(/&/g,"&").replace(/n.length)return;if(!(b instanceof _)){var x=1;if(d&&y!=t.tail.prev){g.lastIndex=k;var w=g.exec(n);if(!w)break;var A=w.index+(h&&w[1]?w[1].length:0),P=w.index+w[0].length,S=k;for(S+=y.value.length;S<=A;)y=y.next,S+=y.value.length;if(S-=y.value.length,k=S,y.value instanceof _)continue;for(var O=y;O!==t.tail&&(S"+a.content+""},!u.document)return u.addEventListener&&(C.disableWorkerMessageHandler||u.addEventListener("message",function(e){var n=JSON.parse(e.data),t=n.language,r=n.code,a=n.immediateClose;u.postMessage(C.highlight(r,C.languages[t],t)),a&&u.close()},!1)),C;var e=C.util.currentScript();function t(){C.manual||C.highlightAll()}if(e&&(C.filename=e.src,e.hasAttribute("data-manual")&&(C.manual=!0)),!C.manual){var r=document.readyState;"loading"===r||"interactive"===r&&e&&e.defer?document.addEventListener("DOMContentLoaded",t):window.requestAnimationFrame?window.requestAnimationFrame(t):window.setTimeout(t,16)}return C}(_self);"undefined"!=typeof module&&module.exports&&(module.exports=Prism),"undefined"!=typeof global&&(global.Prism=Prism); \ No newline at end of file diff --git a/plugins/keep-markup/index.html b/plugins/keep-markup/index.html index c3ade50836..333f9e0079 100644 --- a/plugins/keep-markup/index.html +++ b/plugins/keep-markup/index.html @@ -34,7 +34,10 @@

        How to use

        -

        You have nothing to do. With this plugin loaded, all markup inside code will be kept.

        + +

        You have nothing to do. The plugin is active by default. With this plugin loaded, all markup inside code will be kept.

        + +

        However, you can deactivate the plugin for certain code element by adding the no-keep-markup class to it. You can also deactivate the plugin for the whole page by adding the no-keep-markup class to the body of the page and then selectively activate it again by adding the keep-markup class to code elements.

        Examples

        diff --git a/plugins/keep-markup/prism-keep-markup.js b/plugins/keep-markup/prism-keep-markup.js index bc136c6720..b0fb0d0b4d 100644 --- a/plugins/keep-markup/prism-keep-markup.js +++ b/plugins/keep-markup/prism-keep-markup.js @@ -11,6 +11,10 @@ return; } + if (!Prism.util.isActive(env.element, 'keep-markup', true)) { + return; + } + var pos = 0; var data = []; var f = function (elt, baseNode) { diff --git a/plugins/keep-markup/prism-keep-markup.min.js b/plugins/keep-markup/prism-keep-markup.min.js index 5d072e920a..a0a0973fc8 100644 --- a/plugins/keep-markup/prism-keep-markup.min.js +++ b/plugins/keep-markup/prism-keep-markup.min.js @@ -1 +1 @@ -"undefined"!=typeof self&&self.Prism&&self.document&&document.createRange&&(Prism.plugins.KeepMarkup=!0,Prism.hooks.add("before-highlight",function(e){if(e.element.children.length){var a=0,s=[],l=function(e,n){var o={};n||(o.clone=e.cloneNode(!1),o.posOpen=a,s.push(o));for(var t=0,d=e.childNodes.length;tn.node.posOpen&&(n.nodeStart=d,n.nodeStartPos=n.node.posOpen-n.pos),n.nodeStart&&n.pos+d.data.length>=n.node.posClose&&(n.nodeEnd=d,n.nodeEndPos=n.node.posClose-n.pos),n.pos+=d.data.length);if(n.nodeStart&&n.nodeEnd){var r=document.createRange();return r.setStart(n.nodeStart,n.nodeStartPos),r.setEnd(n.nodeEnd,n.nodeEndPos),n.node.clone.appendChild(r.extractContents()),r.insertNode(n.node.clone),r.detach(),!1}}return!0};n.keepMarkup.forEach(function(e){a(n.element,{node:e,pos:0})}),n.highlightedCode=n.element.innerHTML}})); \ No newline at end of file +"undefined"!=typeof self&&self.Prism&&self.document&&document.createRange&&(Prism.plugins.KeepMarkup=!0,Prism.hooks.add("before-highlight",function(e){if(e.element.children.length&&Prism.util.isActive(e.element,"keep-markup",!0)){var a=0,s=[],l=function(e,n){var o={};n||(o.clone=e.cloneNode(!1),o.posOpen=a,s.push(o));for(var t=0,d=e.childNodes.length;tn.node.posOpen&&(n.nodeStart=d,n.nodeStartPos=n.node.posOpen-n.pos),n.nodeStart&&n.pos+d.data.length>=n.node.posClose&&(n.nodeEnd=d,n.nodeEndPos=n.node.posClose-n.pos),n.pos+=d.data.length);if(n.nodeStart&&n.nodeEnd){var r=document.createRange();return r.setStart(n.nodeStart,n.nodeStartPos),r.setEnd(n.nodeEnd,n.nodeEndPos),n.node.clone.appendChild(r.extractContents()),r.insertNode(n.node.clone),r.detach(),!1}}return!0};n.keepMarkup.forEach(function(e){a(n.element,{node:e,pos:0})}),n.highlightedCode=n.element.innerHTML}})); \ No newline at end of file diff --git a/plugins/line-numbers/prism-line-numbers.js b/plugins/line-numbers/prism-line-numbers.js index 61a4c9968e..b627d2de94 100644 --- a/plugins/line-numbers/prism-line-numbers.js +++ b/plugins/line-numbers/prism-line-numbers.js @@ -74,8 +74,8 @@ return; } - var code = env.element; - var pre = code.parentNode; + var code = /** @type {Element} */ (env.element); + var pre = /** @type {Element} */ (code.parentNode); // works only for wrapped inside
         (not inline)
         		if (!pre || !/pre/i.test(pre.nodeName)) {
        @@ -87,27 +87,15 @@
         			return;
         		}
         
        -		var addLineNumbers = false;
        -		var lineNumbersRegex = /(?:^|\s)line-numbers(?:\s|$)/;
        -
        -		for (var element = code; element; element = element.parentNode) {
        -			if (lineNumbersRegex.test(element.className)) {
        -				addLineNumbers = true;
        -				break;
        -			}
        -		}
        -
         		// only add line numbers if  or one of its ancestors has the `line-numbers` class
        -		if (!addLineNumbers) {
        +		if (!Prism.util.isActive(code, PLUGIN_NAME)) {
         			return;
         		}
         
         		// Remove the class 'line-numbers' from the 
        -		code.className = code.className.replace(lineNumbersRegex, ' ');
        +		code.classList.remove(PLUGIN_NAME);
         		// Add the class 'line-numbers' to the 
        -		if (!lineNumbersRegex.test(pre.className)) {
        -			pre.className += ' line-numbers';
        -		}
        +		pre.classList.add(PLUGIN_NAME);
         
         		var match = env.code.match(NEW_LINE_EXP);
         		var linesNum = match ? match.length + 1 : 1;
        diff --git a/plugins/line-numbers/prism-line-numbers.min.js b/plugins/line-numbers/prism-line-numbers.min.js
        index 7e272c376f..f89b9b50e1 100644
        --- a/plugins/line-numbers/prism-line-numbers.min.js
        +++ b/plugins/line-numbers/prism-line-numbers.min.js
        @@ -1 +1 @@
        -!function(){if("undefined"!=typeof self&&self.Prism&&self.document){var l="line-numbers",c=/\n(?!$)/g,m=function(e){var t=a(e)["white-space"];if("pre-wrap"===t||"pre-line"===t){var n=e.querySelector("code"),r=e.querySelector(".line-numbers-rows");if(!n||!r)return;var s=e.querySelector(".line-numbers-sizer"),i=n.textContent.split(c);s||((s=document.createElement("span")).className="line-numbers-sizer",n.appendChild(s)),s.style.display="block",i.forEach(function(e,t){s.textContent=e||"\n";var n=s.getBoundingClientRect().height;r.children[t].style.height=n+"px"}),s.textContent="",s.style.display="none"}},a=function(e){return e?window.getComputedStyle?getComputedStyle(e):e.currentStyle||null:null};window.addEventListener("resize",function(){Array.prototype.forEach.call(document.querySelectorAll("pre."+l),m)}),Prism.hooks.add("complete",function(e){if(e.code){var t=e.element,n=t.parentNode;if(n&&/pre/i.test(n.nodeName)&&!t.querySelector(".line-numbers-rows")){for(var r=!1,s=/(?:^|\s)line-numbers(?:\s|$)/,i=t;i;i=i.parentNode)if(s.test(i.className)){r=!0;break}if(r){t.className=t.className.replace(s," "),s.test(n.className)||(n.className+=" line-numbers");var l,a=e.code.match(c),o=a?a.length+1:1,u=new Array(o+1).join("");(l=document.createElement("span")).setAttribute("aria-hidden","true"),l.className="line-numbers-rows",l.innerHTML=u,n.hasAttribute("data-start")&&(n.style.counterReset="linenumber "+(parseInt(n.getAttribute("data-start"),10)-1)),e.element.appendChild(l),m(n),Prism.hooks.run("line-numbers",e)}}}}),Prism.hooks.add("line-numbers",function(e){e.plugins=e.plugins||{},e.plugins.lineNumbers=!0}),Prism.plugins.lineNumbers={getLine:function(e,t){if("PRE"===e.tagName&&e.classList.contains(l)){var n=e.querySelector(".line-numbers-rows"),r=parseInt(e.getAttribute("data-start"),10)||1,s=r+(n.children.length-1);t");(r=document.createElement("span")).setAttribute("aria-hidden","true"),r.className="line-numbers-rows",r.innerHTML=l,n.hasAttribute("data-start")&&(n.style.counterReset="linenumber "+(parseInt(n.getAttribute("data-start"),10)-1)),e.element.appendChild(r),u(n),Prism.hooks.run("line-numbers",e)}}}),Prism.hooks.add("line-numbers",function(e){e.plugins=e.plugins||{},e.plugins.lineNumbers=!0}),Prism.plugins.lineNumbers={getLine:function(e,t){if("PRE"===e.tagName&&e.classList.contains(a)){var n=e.querySelector(".line-numbers-rows"),r=parseInt(e.getAttribute("data-start"),10)||1,i=r+(n.children.length-1);t
        Date: Sat, 27 Jun 2020 00:03:07 +0200
        Subject: [PATCH 0563/1100] Line numbers: Style inline code of website (#2435)
        
        ---
         plugins/line-numbers/index.html | 2 +-
         1 file changed, 1 insertion(+), 1 deletion(-)
        
        diff --git a/plugins/line-numbers/index.html b/plugins/line-numbers/index.html
        index e135379e93..856c8998e5 100644
        --- a/plugins/line-numbers/index.html
        +++ b/plugins/line-numbers/index.html
        @@ -14,7 +14,7 @@
         
         
         
        -
        +
         
         
        From 06495f90957c167214ff0dbf4b7ff6934f2c63d8 Mon Sep 17 00:00:00 2001 From: Ayesh Karunaratne Date: Sun, 28 Jun 2020 01:43:47 +0700 Subject: [PATCH 0564/1100] Okaidia theme: Update comment text color to meet WCAG contrast recommendations to AA level (#2292) --- themes/prism-okaidia.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/themes/prism-okaidia.css b/themes/prism-okaidia.css index fcb5fc4e4b..cf04068a45 100644 --- a/themes/prism-okaidia.css +++ b/themes/prism-okaidia.css @@ -52,7 +52,7 @@ pre[class*="language-"] { .token.prolog, .token.doctype, .token.cdata { - color: slategray; + color: #8292a2; } .token.punctuation { From 8c9c2896d36940a738fb5eb5b4590850d2d29152 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Sat, 27 Jun 2020 20:46:04 +0200 Subject: [PATCH 0565/1100] Command Line: Some refactoring (#2290) --- plugins/command-line/prism-command-line.js | 272 ++++++++++-------- .../command-line/prism-command-line.min.js | 2 +- 2 files changed, 158 insertions(+), 116 deletions(-) diff --git a/plugins/command-line/prism-command-line.js b/plugins/command-line/prism-command-line.js index 0d1392ff8e..907fd36df6 100644 --- a/plugins/command-line/prism-command-line.js +++ b/plugins/command-line/prism-command-line.js @@ -1,140 +1,182 @@ -(function() { +(function () { -if (typeof self === 'undefined' || !self.Prism || !self.document) { - return; -} - -var clsReg = /(?:^|\s)command-line(?:\s|$)/; - -Prism.hooks.add('before-highlight', function (env) { - var vars = env.vars = env.vars || {}; - var commandLine = vars['command-line'] = vars['command-line'] || {}; - - if (commandLine.complete || !env.code) { - commandLine.complete = true; + if (typeof self === 'undefined' || !self.Prism || !self.document) { return; } - // Works only for wrapped inside
         (not inline).
        -	var pre = env.element.parentNode;
        -	if (!pre || !/pre/i.test(pre.nodeName) || // Abort only if neither the 
         nor the  have the class
        -		(!clsReg.test(pre.className) && !clsReg.test(env.element.className))) {
        -		commandLine.complete = true;
        -		return;
        +	var CLASS_PATTERN = /(?:^|\s)command-line(?:\s|$)/;
        +	var PROMPT_CLASS = 'command-line-prompt';
        +
        +	/** @type {(str: string, prefix: string) => boolean} */
        +	var startsWith = "".startsWith
        +		? function (s, p) { return s.startsWith(p); }
        +		: function (s, p) { return s.indexOf(p) === 0; };
        +
        +	/**
        +	 * Repeats the given string some number of times.
        +	 *
        +	 * This is just a polyfill for `String.prototype.repeat`.
        +	 *
        +	 * @param {string} str
        +	 * @param {number} times
        +	 * @returns {string}
        +	 */
        +	function repeat(str, times) {
        +		var s = "";
        +		for (var i = 0; i < times; i++) {
        +			s += str;
        +		}
        +		return s;
         	}
         
        -	// The element might be highlighted multiple times, so we just remove the previous prompt
        -	var existingPrompt = env.element.querySelector('.command-line-prompt');
        -	if (existingPrompt) {
        -		existingPrompt.remove();
        +	/**
        +	 * Returns the command line info object from the given hook environment.
        +	 *
        +	 * @param {any} env
        +	 * @returns {CommandLineInfo}
        +	 *
        +	 * @typedef CommandLineInfo
        +	 * @property {boolean} [complete]
        +	 * @property {number} [numberOfLines]
        +	 * @property {string[]} [outputLines]
        +	 */
        +	function getCommandLineInfo(env) {
        +		var vars = env.vars = env.vars || {};
        +		return vars['command-line'] = vars['command-line'] || {};
         	}
         
        -	var codeLines = env.code.split('\n');
        -	commandLine.numberOfLines = codeLines.length;
        -	var outputLines = commandLine.outputLines = [];
        -
        -	var outputSections = pre.getAttribute('data-output');
        -	var outputFilter = pre.getAttribute('data-filter-output');
        -	if (outputSections || outputSections === '') { // The user specified the output lines. -- cwells
        -		outputSections = outputSections.split(',');
        -		for (var i = 0; i < outputSections.length; i++) { // Parse the output sections into start/end ranges. -- cwells
        -			var range = outputSections[i].split('-');
        -			var outputStart = parseInt(range[0], 10);
        -			var outputEnd = (range.length === 2 ? parseInt(range[1], 10) : outputStart);
        -
        -			if (!isNaN(outputStart) && !isNaN(outputEnd)) {
        -				if (outputStart < 1) {
        -					outputStart = 1;
        -				}
        -				if (outputEnd > codeLines.length) {
        -					outputEnd = codeLines.length;
        +
        +	Prism.hooks.add('before-highlight', function (env) {
        +		var commandLine = getCommandLineInfo(env);
        +
        +		if (commandLine.complete || !env.code) {
        +			commandLine.complete = true;
        +			return;
        +		}
        +
        +		// Works only for  wrapped inside 
         (not inline).
        +		var pre = env.element.parentElement;
        +		if (!pre || !/pre/i.test(pre.nodeName) || // Abort only if neither the 
         nor the  have the class
        +			(!CLASS_PATTERN.test(pre.className) && !CLASS_PATTERN.test(env.element.className))) {
        +			commandLine.complete = true;
        +			return;
        +		}
        +
        +		// The element might be highlighted multiple times, so we just remove the previous prompt
        +		var existingPrompt = env.element.querySelector('.' + PROMPT_CLASS);
        +		if (existingPrompt) {
        +			existingPrompt.remove();
        +		}
        +
        +		var codeLines = env.code.split('\n');
        +		commandLine.numberOfLines = codeLines.length;
        +		/** @type {string[]} */
        +		var outputLines = commandLine.outputLines = [];
        +
        +		var outputSections = pre.getAttribute('data-output');
        +		var outputFilter = pre.getAttribute('data-filter-output');
        +		if (outputSections !== null) { // The user specified the output lines. -- cwells
        +			outputSections.split(',').forEach(function (section) {
        +				var range = section.split('-');
        +				var outputStart = parseInt(range[0], 10);
        +				var outputEnd = range.length === 2 ? parseInt(range[1], 10) : outputStart;
        +
        +				if (!isNaN(outputStart) && !isNaN(outputEnd)) {
        +					if (outputStart < 1) {
        +						outputStart = 1;
        +					}
        +					if (outputEnd > codeLines.length) {
        +						outputEnd = codeLines.length;
        +					}
        +					// Convert start and end to 0-based to simplify the arrays. -- cwells
        +					outputStart--;
        +					outputEnd--;
        +					// Save the output line in an array and clear it in the code so it's not highlighted. -- cwells
        +					for (var j = outputStart; j <= outputEnd; j++) {
        +						outputLines[j] = codeLines[j];
        +						codeLines[j] = '';
        +					}
         				}
        -				// Convert start and end to 0-based to simplify the arrays. -- cwells
        -				outputStart--;
        -				outputEnd--;
        -				// Save the output line in an array and clear it in the code so it's not highlighted. -- cwells
        -				for (var j = outputStart; j <= outputEnd; j++) {
        -					outputLines[j] = codeLines[j];
        -					codeLines[j] = '';
        +			});
        +		} else if (outputFilter) { // Treat lines beginning with this string as output. -- cwells
        +			for (var i = 0; i < codeLines.length; i++) {
        +				if (startsWith(codeLines[i], outputFilter)) { // This line is output. -- cwells
        +					outputLines[i] = codeLines[i].slice(outputFilter.length);
        +					codeLines[i] = '';
         				}
         			}
         		}
        -	} else if (outputFilter) { // Treat lines beginning with this string as output. -- cwells
        -		for (var i = 0; i < codeLines.length; i++) {
        -			if (codeLines[i].indexOf(outputFilter) === 0) { // This line is output. -- cwells
        -				outputLines[i] = codeLines[i].slice(outputFilter.length);
        -				codeLines[i] = '';
        -			}
        +
        +		env.code = codeLines.join('\n');
        +	});
        +
        +	Prism.hooks.add('before-insert', function (env) {
        +		var commandLine = getCommandLineInfo(env);
        +
        +		if (commandLine.complete) {
        +			return;
         		}
        -	}
         
        -	env.code = codeLines.join('\n');
        -});
        +		// Reinsert the output lines into the highlighted code. -- cwells
        +		var codeLines = env.highlightedCode.split('\n');
        +		var outputLines = commandLine.outputLines || [];
        +		for (var i = 0, l = outputLines.length; i < l; i++) {
        +			if (outputLines.hasOwnProperty(i)) {
        +				codeLines[i] = outputLines[i];
        +			}
        +		}
        +		env.highlightedCode = codeLines.join('\n');
        +	});
         
        -Prism.hooks.add('before-insert', function (env) {
        -	var vars = env.vars = env.vars || {};
        -	var commandLine = vars['command-line'] = vars['command-line'] || {};
        -	if (commandLine.complete) {
        -		return;
        -	}
        +	Prism.hooks.add('complete', function (env) {
        +		var commandLine = getCommandLineInfo(env);
         
        -	// Reinsert the output lines into the highlighted code. -- cwells
        -	var codeLines = env.highlightedCode.split('\n');
        -	for (var i = 0, l = (commandLine.outputLines || []).length; i < l; i++) {
        -		if (commandLine.outputLines.hasOwnProperty(i)) {
        -			codeLines[i] = commandLine.outputLines[i];
        +		if (commandLine.complete) {
        +			return;
         		}
        -	}
        -	env.highlightedCode = codeLines.join('\n');
        -});
         
        -Prism.hooks.add('complete', function (env) {
        -	var vars = env.vars = env.vars || {};
        -	var commandLine = vars['command-line'] = vars['command-line'] || {};
        -	if (commandLine.complete) {
        -		return;
        -	}
        +		var pre = env.element.parentElement;
        +		if (CLASS_PATTERN.test(env.element.className)) { // Remove the class "command-line" from the 
        +			env.element.className = env.element.className.replace(CLASS_PATTERN, ' ');
        +		}
        +		if (!CLASS_PATTERN.test(pre.className)) { // Add the class "command-line" to the 
        +			pre.className += ' command-line';
        +		}
         
        -	var pre = env.element.parentNode;
        -	if (clsReg.test(env.element.className)) { // Remove the class "command-line" from the 
        -		env.element.className = env.element.className.replace(clsReg, ' ');
        -	}
        -	if (!clsReg.test(pre.className)) { // Add the class "command-line" to the 
        -		pre.className += ' command-line';
        -	}
        +		function getAttribute(key, defaultValue) {
        +			return (pre.getAttribute(key) || defaultValue).replace(/"/g, '"');
        +		}
         
        -	var getAttribute = function(key, defaultValue) {
        -		return (pre.getAttribute(key) || defaultValue).replace(/"/g, '"');
        -	};
        -
        -	// Create the "rows" that will become the command-line prompts. -- cwells
        -	var promptLines = new Array((commandLine.numberOfLines || 0) + 1);
        -	var promptText = getAttribute('data-prompt', '');
        -	if (promptText !== '') {
        -		promptLines = promptLines.join('');
        -	} else {
        -		var user = getAttribute('data-user', 'user');
        -		var host = getAttribute('data-host', 'localhost');
        -		promptLines = promptLines.join('');
        -	}
        +		// Create the "rows" that will become the command-line prompts. -- cwells
        +		var promptLines;
        +		var rowCount = commandLine.numberOfLines || 0;
        +		var promptText = getAttribute('data-prompt', '');
        +		if (promptText !== '') {
        +			promptLines = repeat('', rowCount);
        +		} else {
        +			var user = getAttribute('data-user', 'user');
        +			var host = getAttribute('data-host', 'localhost');
        +			promptLines = repeat('', rowCount);
        +		}
         
        -	// Create the wrapper element. -- cwells
        -	var prompt = document.createElement('span');
        -	prompt.className = 'command-line-prompt';
        -	prompt.innerHTML = promptLines;
        -
        -	// Remove the prompt from the output lines. -- cwells
        -	for (var i = 0, l = (commandLine.outputLines || []).length; i < l; i++) {
        -		if (commandLine.outputLines.hasOwnProperty(i)) {
        -			var node = prompt.children[i];
        -			node.removeAttribute('data-user');
        -			node.removeAttribute('data-host');
        -			node.removeAttribute('data-prompt');
        +		// Create the wrapper element. -- cwells
        +		var prompt = document.createElement('span');
        +		prompt.className = PROMPT_CLASS;
        +		prompt.innerHTML = promptLines;
        +
        +		// Remove the prompt from the output lines. -- cwells
        +		var outputLines = commandLine.outputLines || [];
        +		for (var i = 0, l = outputLines.length; i < l; i++) {
        +			if (outputLines.hasOwnProperty(i)) {
        +				var node = prompt.children[i];
        +				node.removeAttribute('data-user');
        +				node.removeAttribute('data-host');
        +				node.removeAttribute('data-prompt');
        +			}
         		}
        -	}
         
        -	env.element.insertBefore(prompt, env.element.firstChild);
        -	commandLine.complete = true;
        -});
        +		env.element.insertBefore(prompt, env.element.firstChild);
        +		commandLine.complete = true;
        +	});
         
         }());
        diff --git a/plugins/command-line/prism-command-line.min.js b/plugins/command-line/prism-command-line.min.js
        index b0f6cd1557..8a3d34716e 100644
        --- a/plugins/command-line/prism-command-line.min.js
        +++ b/plugins/command-line/prism-command-line.min.js
        @@ -1 +1 @@
        -!function(){if("undefined"!=typeof self&&self.Prism&&self.document){var f=/(?:^|\s)command-line(?:\s|$)/;Prism.hooks.add("before-highlight",function(e){var t=e.vars=e.vars||{},a=t["command-line"]=t["command-line"]||{};if(!a.complete&&e.code){var n=e.element.parentNode;if(n&&/pre/i.test(n.nodeName)&&(f.test(n.className)||f.test(e.element.className))){var r=e.element.querySelector(".command-line-prompt");r&&r.remove();var s=e.code.split("\n");a.numberOfLines=s.length;var o=a.outputLines=[],i=n.getAttribute("data-output"),l=n.getAttribute("data-filter-output");if(i||""===i){i=i.split(",");for(var m=0;ms.length&&(c=s.length),c--;for(var u=--p;u<=c;u++)o[u]=s[u],s[u]=""}}}else if(l)for(m=0;m');else{var i=r("data-user","user"),l=r("data-host","localhost");s=s.join('')}var m=document.createElement("span");m.className="command-line-prompt",m.innerHTML=s;for(var d=0,p=(a.outputLines||[]).length;ds.length&&(a=s.length),a--;for(var r=--n;r<=a;r++)o[r]=s[r],s[r]=""}});else if(i)for(var l=0;l',r);else n=d('',r);var o=document.createElement("span");o.className=p,o.innerHTML=n;for(var i=t.outputLines||[],l=0,m=i.length;l
        Date: Sat, 27 Jun 2020 21:34:40 +0200
        Subject: [PATCH 0566/1100] Coy: Minor improvements (#2176)
        
        ---
         themes/prism-coy.css | 10 +---------
         1 file changed, 1 insertion(+), 9 deletions(-)
        
        diff --git a/themes/prism-coy.css b/themes/prism-coy.css
        index 2d873dced9..5436ff7ade 100644
        --- a/themes/prism-coy.css
        +++ b/themes/prism-coy.css
        @@ -45,7 +45,7 @@ pre[class*="language-"]>code {
         	background-attachment: local;
         }
         
        -code[class*="language"] {
        +code[class*="language-"] {
         	max-height: inherit;
         	height: inherit;
         	padding: 0 1em;
        @@ -93,7 +93,6 @@ pre[class*="language-"]:after {
         	transform: rotate(-2deg);
         }
         
        -:not(pre) > code[class*="language-"]:after,
         pre[class*="language-"]:after {
         	right: 0.75em;
         	left: auto;
        @@ -191,13 +190,6 @@ pre[class*="language-"]:after {
         
         }
         
        -/* Plugin styles */
        -.token.tab:not(:empty):before,
        -.token.cr:before,
        -.token.lf:before {
        -	color: #e0d7d1;
        -}
        -
         /* Plugin styles: Line Numbers */
         pre[class*="language-"].line-numbers.line-numbers {
         	padding-left: 0;
        
        From e756be3f7f5583548a9a0f1b2c00aab2ba74cdee Mon Sep 17 00:00:00 2001
        From: Michael Schmidt 
        Date: Sat, 27 Jun 2020 21:43:24 +0200
        Subject: [PATCH 0567/1100] Tests are now faster (#2165)
        
        ---
         tests/checks/extend.js              |  20 -----
         tests/checks/insert-before.js       |  32 --------
         tests/helper/check-functionality.js |  13 ----
         tests/helper/checks.js              |  63 ++++++++++++++++
         tests/helper/prism-loader.js        | 110 ++++++++++------------------
         5 files changed, 102 insertions(+), 136 deletions(-)
         delete mode 100644 tests/checks/extend.js
         delete mode 100644 tests/checks/insert-before.js
         delete mode 100644 tests/helper/check-functionality.js
         create mode 100644 tests/helper/checks.js
        
        diff --git a/tests/checks/extend.js b/tests/checks/extend.js
        deleted file mode 100644
        index b699dd374d..0000000000
        --- a/tests/checks/extend.js
        +++ /dev/null
        @@ -1,20 +0,0 @@
        -const { testFunction } = require('./../helper/check-functionality');
        -
        -function extendTest(id, redef) {
        -	const details = `\nextend("${id}", ${redef})`;
        -
        -	// type checks
        -	if (typeof id !== 'string') {
        -		throw new TypeError(`The id argument has to be a 'string'.` + details);
        -	}
        -	if (typeof redef !== 'object') {
        -		throw new TypeError(`The redef argument has to be an 'object'.` + details);
        -	}
        -
        -
        -	if (!(id in Prism.languages)) {
        -		throw new Error(`Cannot extend '${id}' because it is not defined in Prism.languages.`);
        -	}
        -}
        -
        -testFunction('extend', Prism.languages, extendTest);
        diff --git a/tests/checks/insert-before.js b/tests/checks/insert-before.js
        deleted file mode 100644
        index 85363455b5..0000000000
        --- a/tests/checks/insert-before.js
        +++ /dev/null
        @@ -1,32 +0,0 @@
        -const { testFunction } = require('./../helper/check-functionality');
        -
        -function insertBeforeTest(inside, before, insert, root) {
        -	const details = `\ninsertBefore("${inside}", "${before}", ${insert}, ${root})`;
        -
        -	// type checks
        -	if (typeof inside !== 'string') {
        -		throw new TypeError(`The inside argument has to be a 'string'.` + details);
        -	}
        -	if (typeof before !== 'string') {
        -		throw new TypeError(`The before argument has to be a 'string'.` + details);
        -	}
        -	if (typeof insert !== 'object') {
        -		throw new TypeError(`The insert argument has to be an 'object'.` + details);
        -	}
        -	if (root && typeof root !== 'object') {
        -		throw new TypeError(`The root argument has to be an 'object' if defined.` + details);
        -	}
        -
        -
        -	root = root || Prism.languages;
        -	var grammar = root[inside];
        -
        -	if (typeof grammar !== 'object') {
        -		throw new Error(`The grammar "${inside}" has to be an 'object' not '${typeof grammar}'.`);
        -	}
        -	if (!(before in grammar)) {
        -		throw new Error(`"${before}" has to be a key of the grammar "${inside}".`);
        -	}
        -}
        -
        -testFunction('insertBefore', Prism.languages, insertBeforeTest);
        diff --git a/tests/helper/check-functionality.js b/tests/helper/check-functionality.js
        deleted file mode 100644
        index 0192d0cb3c..0000000000
        --- a/tests/helper/check-functionality.js
        +++ /dev/null
        @@ -1,13 +0,0 @@
        -"use strict";
        -
        -module.exports = {
        -	testFunction(name, object, tester) {
        -		const func = object[name];
        -
        -		object[name] = function () {
        -			tester.apply(this, arguments);
        -			return func.apply(this, arguments);
        -		};
        -	}
        -
        -}
        diff --git a/tests/helper/checks.js b/tests/helper/checks.js
        new file mode 100644
        index 0000000000..f926626c34
        --- /dev/null
        +++ b/tests/helper/checks.js
        @@ -0,0 +1,63 @@
        +"use strict";
        +
        +function testFunction(name, object, tester) {
        +	const func = object[name];
        +
        +	object[name] = function () {
        +		tester.apply(this, arguments);
        +		return func.apply(this, arguments);
        +	};
        +}
        +
        +module.exports = (Prism) => {
        +
        +	function extendTest(id, redef) {
        +		const details = `\nextend("${id}", ${redef})`;
        +
        +		// type checks
        +		if (typeof id !== 'string') {
        +			throw new TypeError(`The id argument has to be a 'string'.` + details);
        +		}
        +		if (typeof redef !== 'object') {
        +			throw new TypeError(`The redef argument has to be an 'object'.` + details);
        +		}
        +
        +
        +		if (!(id in Prism.languages)) {
        +			throw new Error(`Cannot extend '${id}' because it is not defined in Prism.languages.`);
        +		}
        +	}
        +
        +	function insertBeforeTest(inside, before, insert, root) {
        +		const details = `\ninsertBefore("${inside}", "${before}", ${insert}, ${root})`;
        +
        +		// type checks
        +		if (typeof inside !== 'string') {
        +			throw new TypeError(`The inside argument has to be a 'string'.` + details);
        +		}
        +		if (typeof before !== 'string') {
        +			throw new TypeError(`The before argument has to be a 'string'.` + details);
        +		}
        +		if (typeof insert !== 'object') {
        +			throw new TypeError(`The insert argument has to be an 'object'.` + details);
        +		}
        +		if (root && typeof root !== 'object') {
        +			throw new TypeError(`The root argument has to be an 'object' if defined.` + details);
        +		}
        +
        +
        +		root = root || Prism.languages;
        +		var grammar = root[inside];
        +
        +		if (typeof grammar !== 'object') {
        +			throw new Error(`The grammar "${inside}" has to be an 'object' not '${typeof grammar}'.`);
        +		}
        +		if (!(before in grammar)) {
        +			throw new Error(`"${before}" has to be a key of the grammar "${inside}".`);
        +		}
        +	}
        +
        +	testFunction('extend', Prism.languages, extendTest);
        +	testFunction('insertBefore', Prism.languages, insertBeforeTest);
        +
        +};
        diff --git a/tests/helper/prism-loader.js b/tests/helper/prism-loader.js
        index 562e02dfaa..2d70c987ce 100644
        --- a/tests/helper/prism-loader.js
        +++ b/tests/helper/prism-loader.js
        @@ -1,11 +1,11 @@
         "use strict";
         
         const fs = require("fs");
        -const vm = require("vm");
         const { getAllFiles } = require("./test-discovery");
         const components = require("../../components.json");
         const getLoader = require("../../dependencies");
         const languagesCatalog = components.languages;
        +const coreChecks = require('./checks');
         
         
         /**
        @@ -14,6 +14,13 @@ const languagesCatalog = components.languages;
          * @property {Set} loaded A set of loaded components.
          */
         
        +/** @type {Map} */
        +const fileSourceCache = new Map();
        +/** @type {() => any} */
        +let coreSupplierFunction = null;
        +/** @type {Map void>} */
        +const languageCache = new Map();
        +
         module.exports = {
         
         	/**
        @@ -51,9 +58,15 @@ module.exports = {
         				throw new Error(`Language '${id}' not found.`);
         			}
         
        -			// load the language itself
        -			const languageSource = this.loadComponentSource(id);
        -			context.Prism = this.runFileWithContext(languageSource, { Prism: context.Prism }).Prism;
        +			// get the function which adds the language from cache
        +			let languageFunction = languageCache.get(id);
        +			if (languageFunction === undefined) {
        +				// make a function from the code which take "Prism" as an argument, so the language grammar
        +				// references the function argument
        +				const func = new Function('Prism', this.loadComponentSource(id));
        +				languageCache.set(id, languageFunction = (Prism) => func(Prism));
        +			}
        +			languageFunction(context.Prism);
         
         			context.loaded.add(id);
         		});
        @@ -69,45 +82,26 @@ module.exports = {
         	 * @returns {Prism}
         	 */
         	createEmptyPrism() {
        -		const coreSource = this.loadComponentSource("core");
        -		const context = this.runFileWithContext(coreSource);
        -
        -		for (const testSource of this.getChecks().map(src => this.loadFileSource(src))) {
        -			context.Prism = this.runFileWithContext(testSource, {
        -				Prism: context.Prism,
        -				/**
        -				 * A pseudo require function for the checks.
        -				 *
        -				 * This function will behave like the regular `require` in real modules when called form a check file.
        -				 *
        -				 * @param {string} id The id of relative path to require.
        -				 */
        -				require(id) {
        -					if (id.startsWith('./')) {
        -						// We have to rewrite relative paths starting with './'
        -						return require('./../checks/' + id.substr(2));
        -					} else {
        -						// This might be an id like 'mocha' or 'fs' or a relative path starting with '../'.
        -						// In both cases we don't have to change anything.
        -						return require(id);
        -					}
        -				}
        -			}).Prism;
        +		if (!coreSupplierFunction) {
        +			const source = this.loadComponentSource("core");
        +			// Core exports itself in 2 ways:
        +			//  1) it uses `module.exports = Prism` which what we'll use
        +			//  2) it uses `global.Prism = Prism` which we want to sabotage to prevent leaking
        +			const func = new Function('module', 'global', source);
        +			coreSupplierFunction = () => {
        +				const module = {
        +					// that's all we care about
        +					exports: {}
        +				};
        +				func(module, {});
        +				return module.exports;
        +			};
         		}
        -
        -		return context.Prism;
        +		const Prism = coreSupplierFunction();
        +		coreChecks(Prism);
        +		return Prism;
         	},
         
        -
        -	/**
        -	 * Cached file sources, to prevent massive HDD work
        -	 *
        -	 * @private
        -	 * @type {Object.}
        -	 */
        -	fileSourceCache: {},
        -
        -
         	/**
         	 * Loads the given component's file source as string
         	 *
        @@ -127,36 +121,10 @@ module.exports = {
         	 * @returns {string}
         	 */
         	loadFileSource(src) {
        -		return this.fileSourceCache[src] = this.fileSourceCache[src] || fs.readFileSync(src, "utf8");
        -	},
        -
        -
        -	checkCache: null,
        -
        -	/**
        -	 * Returns a list of files which add additional checks to Prism functions.
        -	 *
        -	 * @returns {ReadonlyArray}
        -	 */
        -	getChecks() {
        -		return this.checkCache = this.checkCache || getAllFiles(__dirname + "/../checks");
        -	},
        -
        -
        -	/**
        -	 * Runs a VM for a given file source with the given context
        -	 *
        -	 * @private
        -	 * @param {string} fileSource
        -	 * @param {*} [context={}]
        -	 *
        -	 * @returns {*}
        -	 */
        -	runFileWithContext(fileSource, context = {}) {
        -		// we don't have to pass our console but it's the only way these scripts can talk
        -		// not supplying console here means that all references to `console` inside them will refer to a no-op console
        -		context.console = console;
        -		vm.runInNewContext(fileSource, context);
        -		return context;
        +		let content = fileSourceCache.get(src);
        +		if (content === undefined) {
        +			fileSourceCache.set(src, content = fs.readFileSync(src, "utf8"));
        +		}
        +		return content;
         	}
         };
        
        From a375872875eb1419e6fe337cf63b4234b218041d Mon Sep 17 00:00:00 2001
        From: Michael Schmidt 
        Date: Sat, 27 Jun 2020 22:38:50 +0200
        Subject: [PATCH 0568/1100] Added test to sort the language list (#2222)
        
        ---
         components.js                                 |   2 +-
         components.json                               | 152 +++++++++---------
         plugins/autoloader/prism-autoloader.js        |  26 +--
         plugins/autoloader/prism-autoloader.min.js    |   2 +-
         plugins/show-language/prism-show-language.js  |  36 ++---
         .../show-language/prism-show-language.min.js  |   2 +-
         tests/dependencies-test.js                    |  32 ++++
         7 files changed, 142 insertions(+), 110 deletions(-)
        
        diff --git a/components.js b/components.js
        index 754a5cf520..c46b1323b3 100644
        --- a/components.js
        +++ b/components.js
        @@ -1,2 +1,2 @@
        -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml","ssml","atom","rss"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","ssml":"SSML","atom":"Atom","rss":"RSS"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"Augmented Backus–Naur form","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"agda":{"title":"Agda","owner":"xy-ren"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"Backus–Naur form","alias":"rbnf","aliasTitles":{"rbnf":"Routing Backus–Naur form"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"clojure":{"title":"Clojure","owner":"troglotit"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dax":{"title":"DAX","owner":"peterbud"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"Extended Backus–Naur form","owner":"RunDevelopment"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"c","owner":"Golmote"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","optional":["markdown"],"owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"hlsl":{"title":"HLSL","require":"c","owner":"RunDevelopment"},"http":{"title":"HTTP","optional":["css","javascript","json","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"jsstacktrace":{"title":"JS stack trace","owner":"sbrl"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"json":{"title":"JSON","alias":"webmanifest","aliasTitles":{"webmanifest":"Web App Manifest"},"owner":"CupOfTea696"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"purebasic":{"title":"PureBasic","require":"clike","alias":"pbfasm","owner":"HeX0R101"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"racket":{"title":"Racket","require":"scheme","alias":"rkt","owner":"RunDevelopment"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"renpy":{"title":"Ren'py","alias":"rpy","owner":"HyuchiaDiego"},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","modify":["actionscript","coffeescript","flow","javascript","typescript","vala"],"owner":"RunDevelopment"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"solidity":{"title":"Solidity (Ethereum)","alias":"sol","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","vbnet"],"owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xml-doc":{"title":"XML doc (.net)","require":"markup","modify":["csharp","fsharp","vbnet"],"owner":"RunDevelopment"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}};
        +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml","ssml","atom","rss"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","ssml":"SSML","atom":"Atom","rss":"RSS"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"ABNF","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"agda":{"title":"Agda","owner":"xy-ren"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"BNF","alias":"rbnf","aliasTitles":{"rbnf":"RBNF"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"clojure":{"title":"Clojure","owner":"troglotit"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dax":{"title":"DAX","owner":"peterbud"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"EBNF","owner":"RunDevelopment"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"c","owner":"Golmote"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","optional":["markdown"],"owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"hlsl":{"title":"HLSL","require":"c","owner":"RunDevelopment"},"http":{"title":"HTTP","optional":["css","javascript","json","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","alias":"webmanifest","aliasTitles":{"webmanifest":"Web App Manifest"},"owner":"CupOfTea696"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"jsstacktrace":{"title":"JS stack trace","owner":"sbrl"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"purebasic":{"title":"PureBasic","require":"clike","alias":"pbfasm","owner":"HeX0R101"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"racket":{"title":"Racket","require":"scheme","alias":"rkt","owner":"RunDevelopment"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","modify":["actionscript","coffeescript","flow","javascript","typescript","vala"],"owner":"RunDevelopment"},"renpy":{"title":"Ren'py","alias":"rpy","owner":"HyuchiaDiego"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"solidity":{"title":"Solidity (Ethereum)","alias":"sol","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","vbnet"],"owner":"RunDevelopment"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":"vb","owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xml-doc":{"title":"XML doc (.net)","require":"markup","modify":["csharp","fsharp","vbnet"],"owner":"RunDevelopment"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}};
         if (typeof module !== 'undefined' && module.exports) { module.exports = components; }
        \ No newline at end of file
        diff --git a/components.json b/components.json
        index d0363f6189..004f8482c4 100644
        --- a/components.json
        +++ b/components.json
        @@ -81,7 +81,7 @@
         			"owner": "dellagustin"
         		},
         		"abnf": {
        -			"title": "Augmented Backus–Naur form",
        +			"title": "ABNF",
         			"owner": "RunDevelopment"
         		},
         		"actionscript": {
        @@ -137,15 +137,15 @@
         			"title": "AsciiDoc",
         			"owner": "Golmote"
         		},
        -		"asm6502": {
        -			"title": "6502 Assembly",
        -			"owner": "kzurawel"
        -		},
         		"aspnet": {
         			"title": "ASP.NET (C#)",
         			"require": ["markup", "csharp"],
         			"owner": "nauzilus"
         		},
        +		"asm6502": {
        +			"title": "6502 Assembly",
        +			"owner": "kzurawel"
        +		},
         		"autohotkey": {
         			"title": "AutoHotkey",
         			"owner": "aviaryan"
        @@ -184,10 +184,10 @@
         			"owner": "Golmote"
         		},
         		"bnf": {
        -			"title": "Backus–Naur form",
        +			"title": "BNF",
         			"alias": "rbnf",
         			"aliasTitles": {
        -				"rbnf": "Routing Backus–Naur form"
        +				"rbnf": "RBNF"
         			},
         			"owner": "RunDevelopment"
         		},
        @@ -208,11 +208,6 @@
         			"require": "clike",
         			"owner": "zeitgeist87"
         		},
        -		"concurnas": {
        -			"title": "Concurnas",
        -			"alias": "conc",
        -			"owner": "jasontatton"
        -		},
         		"csharp": {
         			"title": "C#",
         			"require": "clike",
        @@ -228,29 +223,34 @@
         			"title": "CIL",
         			"owner": "sbrl"
         		},
        +		"clojure": {
        +			"title": "Clojure",
        +			"owner": "troglotit"
        +		},
        +		"cmake": {
        +			"title": "CMake",
        +			"owner": "mjrogozinski"
        +		},
         		"coffeescript": {
         			"title": "CoffeeScript",
         			"require": "javascript",
         			"alias": "coffee",
         			"owner": "R-osey"
         		},
        -		"cmake": {
        -			"title": "CMake",
        -			"owner": "mjrogozinski"
        +		"concurnas": {
        +			"title": "Concurnas",
        +			"alias": "conc",
        +			"owner": "jasontatton"
         		},
        -		"clojure": {
        -			"title": "Clojure",
        -			"owner": "troglotit"
        +		"csp": {
        +			"title": "Content-Security-Policy",
        +			"owner": "ScottHelme"
         		},
         		"crystal": {
         			"title": "Crystal",
         			"require": "ruby",
         			"owner": "MakeNowJust"
         		},
        -		"csp": {
        -			"title": "Content-Security-Policy",
        -			"owner": "ScottHelme"
        -		},
         		"css-extras": {
         			"title": "CSS Extras",
         			"require": "css",
        @@ -292,7 +292,7 @@
         			"owner": "JustinBeckwith"
         		},
         		"ebnf": {
        -			"title": "Extended Backus–Naur form",
        +			"title": "EBNF",
         			"owner": "RunDevelopment"
         		},
         		"eiffel": {
        @@ -363,6 +363,12 @@
         			"require": "markup-templating",
         			"owner": "RunDevelopment"
         		},
        +		"gml": {
        +			"title": "GameMaker Language",
        +			"alias": "gamemakerlanguage",
        +			"require": "clike",
        +			"owner": "LiarOnce"
        +		},
         		"gcode": {
         			"title": "G-code",
         			"owner": "RunDevelopment"
        @@ -388,12 +394,6 @@
         			"require": "c",
         			"owner": "Golmote"
         		},
        -		"gml": {
        -			"title": "GameMaker Language",
        -			"alias": "gamemakerlanguage",
        -			"require": "clike",
        -			"owner": "LiarOnce"
        -		},
         		"go": {
         			"title": "Go",
         			"require": "clike",
        @@ -475,10 +475,6 @@
         			"title": "Icon",
         			"owner": "Golmote"
         		},
        -		"iecst": {
        -			"title": "Structured Text (IEC 61131-3)",
        -			"owner": "serhioromano"
        -		},
         		"inform7": {
         			"title": "Inform 7",
         			"owner": "Golmote"
        @@ -552,6 +548,24 @@
         			],
         			"owner": "RunDevelopment"
         		},
        +		"json": {
        +			"title": "JSON",
        +			"alias": "webmanifest",
        +			"aliasTitles": {
        +				"webmanifest": "Web App Manifest"
        +			},
        +			"owner": "CupOfTea696"
        +		},
        +		"json5": {
        +			"title": "JSON5",
        +			"require": "json",
        +			"owner": "RunDevelopment"
        +		},
        +		"jsonp": {
        +			"title": "JSONP",
        +			"require": "json",
        +			"owner": "RunDevelopment"
        +		},
         		"jsstacktrace": {
         			"title": "JS stack trace",
         			"owner": "sbrl"
        @@ -569,24 +583,6 @@
         			],
         			"owner": "RunDevelopment"
         		},
        -		"json": {
        -			"title": "JSON",
        -			"alias": "webmanifest",
        -			"aliasTitles": {
        -				"webmanifest": "Web App Manifest"
        -			},
        -			"owner": "CupOfTea696"
        -		},
        -		"jsonp": {
        -			"title": "JSONP",
        -			"require": "json",
        -			"owner": "RunDevelopment"
        -		},
        -		"json5": {
        -			"title": "JSON5",
        -			"require": "json",
        -			"owner": "RunDevelopment"
        -		},
         		"julia": {
         			"title": "Julia",
         			"owner": "cdagnino"
        @@ -912,11 +908,6 @@
         			"title": "React TSX",
         			"require": ["jsx", "typescript"]
         		},
        -		"renpy": {
        -			"title": "Ren'py",
        -			"alias": "rpy",
        -			"owner": "HyuchiaDiego"
        -		},
         		"reason": {
         			"title": "Reason",
         			"require": "clike",
        @@ -934,6 +925,11 @@
         			],
         			"owner": "RunDevelopment"
         		},
        +		"renpy": {
        +			"title": "Ren'py",
        +			"alias": "rpy",
        +			"owner": "HyuchiaDiego"
        +		},
         		"rest": {
         			"title": "reST (reStructuredText)",
         			"owner": "Golmote"
        @@ -1035,6 +1031,10 @@
         			"title": "SQL",
         			"owner": "multipetros"
         		},
        +		"iecst": {
        +			"title": "Structured Text (IEC 61131-3)",
        +			"owner": "serhioromano"
        +		},
         		"stylus": {
         			"title": "Stylus",
         			"owner": "vkbansal"
        @@ -1044,6 +1044,21 @@
         			"require": "clike",
         			"owner": "chrischares"
         		},
        +		"t4-templating": {
        +			"title": "T4 templating",
        +			"owner": "RunDevelopment"
        +		},
        +		"t4-cs": {
        +			"title": "T4 Text Templates (C#)",
        +			"require": ["t4-templating", "csharp"],
        +			"alias": "t4",
        +			"owner": "RunDevelopment"
        +		},
        +		"t4-vb": {
        +			"title": "T4 Text Templates (VB)",
        +			"require": ["t4-templating", "vbnet"],
        +			"owner": "RunDevelopment"
        +		},
         		"tap": {
         			"title": "TAP",
         			"owner": "isaacs",
        @@ -1053,6 +1068,11 @@
         			"title": "Tcl",
         			"owner": "PeterChaplin"
         		},
        +		"tt2": {
        +			"title": "Template Toolkit 2",
        +			"require": ["clike", "markup-templating"],
        +			"owner": "gflohr"
        +		},
         		"textile": {
         			"title": "Textile",
         			"require": "markup",
        @@ -1063,11 +1083,6 @@
         			"title": "TOML",
         			"owner": "RunDevelopment"
         		},
        -		"tt2": {
        -			"title": "Template Toolkit 2",
        -			"require": ["clike", "markup-templating"],
        -			"owner": "gflohr"
        -		},
         		"turtle": {
         			"title": "Turtle",
         			"alias": "trig",
        @@ -1088,21 +1103,6 @@
         			"alias": "ts",
         			"owner": "vkbansal"
         		},
        -		"t4-cs": {
        -			"title": "T4 Text Templates (C#)",
        -			"require": ["t4-templating", "csharp"],
        -			"alias": "t4",
        -			"owner": "RunDevelopment"
        -		},
        -		"t4-vb": {
        -			"title": "T4 Text Templates (VB)",
        -			"require": ["t4-templating", "vbnet"],
        -			"owner": "RunDevelopment"
        -		},
        -		"t4-templating": {
        -			"title": "T4 templating",
        -			"owner": "RunDevelopment"
        -		},
         		"unrealscript": {
         			"title": "UnrealScript",
         			"alias": ["uscript", "uc"],
        diff --git a/plugins/autoloader/prism-autoloader.js b/plugins/autoloader/prism-autoloader.js
        index 81c1624a23..79d6aed2ec 100644
        --- a/plugins/autoloader/prism-autoloader.js
        +++ b/plugins/autoloader/prism-autoloader.js
        @@ -42,8 +42,8 @@
         		"firestore-security-rules": "clike",
         		"flow": "javascript",
         		"ftl": "markup-templating",
        -		"glsl": "c",
         		"gml": "clike",
        +		"glsl": "c",
         		"go": "clike",
         		"groovy": "clike",
         		"haml": "ruby",
        @@ -62,9 +62,9 @@
         			"javadoclike"
         		],
         		"js-extras": "javascript",
        -		"js-templates": "javascript",
        -		"jsonp": "json",
         		"json5": "json",
        +		"jsonp": "json",
        +		"js-templates": "javascript",
         		"kotlin": "clike",
         		"latte": [
         			"clike",
        @@ -120,14 +120,6 @@
         		"sparql": "turtle",
         		"sqf": "clike",
         		"swift": "clike",
        -		"tap": "yaml",
        -		"textile": "markup",
        -		"tt2": [
        -			"clike",
        -			"markup-templating"
        -		],
        -		"twig": "markup",
        -		"typescript": "javascript",
         		"t4-cs": [
         			"t4-templating",
         			"csharp"
        @@ -136,6 +128,14 @@
         			"t4-templating",
         			"vbnet"
         		],
        +		"tap": "yaml",
        +		"tt2": [
        +			"clike",
        +			"markup-templating"
        +		],
        +		"textile": "markup",
        +		"twig": "markup",
        +		"typescript": "javascript",
         		"vala": "clike",
         		"vbnet": "basic",
         		"velocity": "markup",
        @@ -159,10 +159,10 @@
         		"shell": "bash",
         		"shortcode": "bbcode",
         		"rbnf": "bnf",
        -		"conc": "concurnas",
         		"cs": "csharp",
         		"dotnet": "csharp",
         		"coffee": "coffeescript",
        +		"conc": "concurnas",
         		"jinja2": "django",
         		"dns-zone": "dns-zone-file",
         		"dockerfile": "docker",
        @@ -196,9 +196,9 @@
         		"sol": "solidity",
         		"sln": "solution-file",
         		"rq": "sparql",
        +		"t4": "t4-cs",
         		"trig": "turtle",
         		"ts": "typescript",
        -		"t4": "t4-cs",
         		"uscript": "unrealscript",
         		"uc": "unrealscript",
         		"vb": "visual-basic",
        diff --git a/plugins/autoloader/prism-autoloader.min.js b/plugins/autoloader/prism-autoloader.min.js
        index 7114f5fed7..b8996496c6 100644
        --- a/plugins/autoloader/prism-autoloader.min.js
        +++ b/plugins/autoloader/prism-autoloader.min.js
        @@ -1 +1 @@
        -!function(){if("undefined"!=typeof self&&self.Prism&&self.document&&document.createElement){var c={javascript:"clike",actionscript:"javascript",arduino:"cpp",aspnet:["markup","csharp"],bison:"c",c:"clike",csharp:"clike",cpp:"c",coffeescript:"javascript",crystal:"ruby","css-extras":"css",d:"clike",dart:"clike",django:"markup-templating",ejs:["javascript","markup-templating"],etlua:["lua","markup-templating"],erb:["ruby","markup-templating"],fsharp:"clike","firestore-security-rules":"clike",flow:"javascript",ftl:"markup-templating",glsl:"c",gml:"clike",go:"clike",groovy:"clike",haml:"ruby",handlebars:"markup-templating",haxe:"clike",hlsl:"c",java:"clike",javadoc:["markup","java","javadoclike"],jolie:"clike",jsdoc:["javascript","javadoclike"],"js-extras":"javascript","js-templates":"javascript",jsonp:"json",json5:"json",kotlin:"clike",latte:["clike","markup-templating","php"],less:"css",lilypond:"scheme",markdown:"markup","markup-templating":"markup",n4js:"javascript",nginx:"clike",objectivec:"c",opencl:"c",parser:"markup",php:["clike","markup-templating"],phpdoc:["php","javadoclike"],"php-extras":"php",plsql:"sql",processing:"clike",protobuf:"clike",pug:["markup","javascript"],purebasic:"clike",qml:"javascript",qore:"clike",racket:"scheme",jsx:["markup","javascript"],tsx:["jsx","typescript"],reason:"clike",ruby:"clike",sass:"css",scss:"css",scala:"java","shell-session":"bash",smarty:"markup-templating",solidity:"clike",soy:"markup-templating",sparql:"turtle",sqf:"clike",swift:"clike",tap:"yaml",textile:"markup",tt2:["clike","markup-templating"],twig:"markup",typescript:"javascript","t4-cs":["t4-templating","csharp"],"t4-vb":["t4-templating","vbnet"],vala:"clike",vbnet:"basic",velocity:"markup",wiki:"markup",xeora:"markup","xml-doc":"markup",xquery:"markup"},l={html:"markup",xml:"markup",svg:"markup",mathml:"markup",ssml:"markup",atom:"markup",rss:"markup",js:"javascript",g4:"antlr4",adoc:"asciidoc",shell:"bash",shortcode:"bbcode",rbnf:"bnf",conc:"concurnas",cs:"csharp",dotnet:"csharp",coffee:"coffeescript",jinja2:"django","dns-zone":"dns-zone-file",dockerfile:"docker",eta:"ejs",xlsx:"excel-formula",xls:"excel-formula",gamemakerlanguage:"gml",hs:"haskell",webmanifest:"json",tex:"latex",context:"latex",ly:"lilypond",emacs:"lisp",elisp:"lisp","emacs-lisp":"lisp",md:"markdown",moon:"moonscript",n4jsd:"n4js",objc:"objectivec",objectpascal:"pascal",px:"pcaxis",pcode:"peoplecode",pq:"powerquery",mscript:"powerquery",pbfasm:"purebasic",py:"python",rkt:"racket",rpy:"renpy",robot:"robotframework",rb:"ruby",sol:"solidity",sln:"solution-file",rq:"sparql",trig:"turtle",ts:"typescript",t4:"t4-cs",uscript:"unrealscript",uc:"unrealscript",vb:"visual-basic",xeoracube:"xeora",yml:"yaml"},n={},e="components/",a=Prism.util.currentScript();if(a){var t=/\bplugins\/autoloader\/prism-autoloader\.(?:min\.)js(?:\?[^\r\n/]*)?$/i,r=/(^|\/)[\w-]+\.(?:min\.)js(?:\?[^\r\n/]*)?$/i,s=a.getAttribute("data-autoloader-path");if(null!=s)e=s.trim().replace(/\/?$/,"/");else{var i=a.src;t.test(i)?e=i.replace(t,"components/"):r.test(i)&&(e=i.replace(r,"$1components/"))}}var p=Prism.plugins.autoloader={languages_path:e,use_minified:!0,loadLanguages:o};Prism.hooks.add("complete",function(e){e.element&&e.language&&!e.grammar&&"none"!==e.language&&function(e,a){e in l&&(e=l[e]);var t=(a.getAttribute("data-dependencies")||"").trim();if(!t){var r=a.parentElement;r&&"pre"===r.tagName.toLowerCase()&&(t=(r.getAttribute("data-dependencies")||"").trim())}o(t?t.split(/\s*,\s*/g):[],function(){m(e,function(){Prism.highlightElement(a)})})}(e.language,e.element)})}function o(e,a,t){"string"==typeof e&&(e=[e]);var r=e.length,s=0,i=!1;function c(){i||++s===r&&a&&a(e)}0!==r?e.forEach(function(e){m(e,c,function(){i||(i=!0,t&&t(e))})}):a&&setTimeout(a,0)}function m(a,t,r){var s=0<=a.indexOf("!");a=a.replace("!",""),a=l[a]||a;var e=function(){var e=n[a];if(e||(e=n[a]={callbacks:[]}),e.callbacks.push({success:t,error:r}),!s&&Prism.languages[a])u(a,"success");else if(!s&&e.error)u(a,"error");else if(s||!e.loading){e.loading=!0,function(e,a,t){var r=document.createElement("script");r.src=e,r.async=!0,r.onload=function(){document.body.removeChild(r),a&&a()},r.onerror=function(){document.body.removeChild(r),t&&t()},document.body.appendChild(r)}(function(e){return p.languages_path+"prism-"+e+(p.use_minified?".min":"")+".js"}(a),function(){e.loading=!1,u(a,"success")},function(){e.loading=!1,e.error=!0,u(a,"error")})}},i=c[a];i&&i.length?o(i,e,r):e()}function u(e,a){if(n[e]){for(var t=n[e].callbacks,r=0,s=t.length;r !ignore.has(key)).map(key => {
        +			return {
        +				id: key,
        +				title: components.languages[key].title
        +			};
        +		});
        +
        +		/**
        +		 * Transforms the given title into an intermediate representation to allowed for sensible comparisons
        +		 * between titles.
        +		 *
        +		 * @param {string} title
        +		 */
        +		function transformTitle(title) {
        +			return title.replace(/\W+/g, '').replace(/^\d+/, '').toLowerCase();
        +		}
        +
        +		const sorted = [...languages].sort((a, b) => {
        +			const comp = transformTitle(a.title).localeCompare(transformTitle(b.title));
        +			if (comp !== 0) {
        +				return comp;
        +			}
        +			// a and b have the same intermediate form (e.g. "C" => "C", "C++" => "C", "C#" => "C").
        +			a.title.toLowerCase().localeCompare(b.title.toLowerCase())
        +		});
        +
        +		assert.sameOrderedMembers(languages, sorted);
        +	});
        +
         });
        
        From 4ff555bea15176a500c83f2bdfd0b95239e31251 Mon Sep 17 00:00:00 2001
        From: Michael Schmidt 
        Date: Sun, 28 Jun 2020 01:34:29 +0200
        Subject: [PATCH 0569/1100] Added JSDoc (#1782)
        
        ---
         .jsdoc.json                                   |   66 +
         components/prism-core.js                      |  460 +++++-
         components/prism-core.min.js                  |    2 +-
         docs/Prism.hooks.html                         |  494 ++++++
         docs/Prism.html                               | 1370 +++++++++++++++++
         docs/Prism.languages.html                     |  683 ++++++++
         docs/Token.html                               |  670 ++++++++
         docs/fonts/Montserrat/Montserrat-Bold.eot     |  Bin 0 -> 106135 bytes
         docs/fonts/Montserrat/Montserrat-Bold.ttf     |  Bin 0 -> 47088 bytes
         docs/fonts/Montserrat/Montserrat-Bold.woff    |  Bin 0 -> 112872 bytes
         docs/fonts/Montserrat/Montserrat-Bold.woff2   |  Bin 0 -> 85436 bytes
         docs/fonts/Montserrat/Montserrat-Regular.eot  |  Bin 0 -> 106287 bytes
         docs/fonts/Montserrat/Montserrat-Regular.ttf  |  Bin 0 -> 46392 bytes
         docs/fonts/Montserrat/Montserrat-Regular.woff |  Bin 0 -> 112020 bytes
         .../fonts/Montserrat/Montserrat-Regular.woff2 |  Bin 0 -> 85240 bytes
         docs/global.html                              |  965 ++++++++++++
         docs/index.html                               |  107 ++
         docs/prism-core.js.html                       | 1252 +++++++++++++++
         docs/scripts/collapse.js                      |   20 +
         docs/scripts/linenumber.js                    |   25 +
         docs/scripts/nav.js                           |   12 +
         docs/scripts/polyfill.js                      |    4 +
         docs/scripts/prettify/lang-css.js             |    2 +
         docs/scripts/prettify/prettify.js             |   28 +
         docs/scripts/search.js                        |   83 +
         docs/styles/jsdoc.css                         |  765 +++++++++
         docs/styles/overwrites.css                    |   19 +
         docs/styles/prettify.css                      |   79 +
         extending.html                                |  131 +-
         gulpfile.js/docs.js                           |   62 +
         gulpfile.js/index.js                          |    5 +-
         package-lock.json                             |  438 +++++-
         package.json                                  |    3 +
         .../jsonp-highlight/prism-jsonp-highlight.js  |    2 +-
         prism.js                                      |  460 +++++-
         scripts/examples.js                           |    2 +-
         tests/helper/test-case.js                     |    1 +
         tests/helper/test-discovery.js                |   10 +-
         38 files changed, 8026 insertions(+), 194 deletions(-)
         create mode 100644 .jsdoc.json
         create mode 100644 docs/Prism.hooks.html
         create mode 100644 docs/Prism.html
         create mode 100644 docs/Prism.languages.html
         create mode 100644 docs/Token.html
         create mode 100644 docs/fonts/Montserrat/Montserrat-Bold.eot
         create mode 100644 docs/fonts/Montserrat/Montserrat-Bold.ttf
         create mode 100644 docs/fonts/Montserrat/Montserrat-Bold.woff
         create mode 100644 docs/fonts/Montserrat/Montserrat-Bold.woff2
         create mode 100644 docs/fonts/Montserrat/Montserrat-Regular.eot
         create mode 100644 docs/fonts/Montserrat/Montserrat-Regular.ttf
         create mode 100644 docs/fonts/Montserrat/Montserrat-Regular.woff
         create mode 100644 docs/fonts/Montserrat/Montserrat-Regular.woff2
         create mode 100644 docs/global.html
         create mode 100644 docs/index.html
         create mode 100644 docs/prism-core.js.html
         create mode 100644 docs/scripts/collapse.js
         create mode 100644 docs/scripts/linenumber.js
         create mode 100644 docs/scripts/nav.js
         create mode 100644 docs/scripts/polyfill.js
         create mode 100644 docs/scripts/prettify/lang-css.js
         create mode 100644 docs/scripts/prettify/prettify.js
         create mode 100644 docs/scripts/search.js
         create mode 100644 docs/styles/jsdoc.css
         create mode 100644 docs/styles/overwrites.css
         create mode 100644 docs/styles/prettify.css
         create mode 100644 gulpfile.js/docs.js
        
        diff --git a/.jsdoc.json b/.jsdoc.json
        new file mode 100644
        index 0000000000..3d27a4582f
        --- /dev/null
        +++ b/.jsdoc.json
        @@ -0,0 +1,66 @@
        +{
        +	"plugins": [
        +		"plugins/markdown",
        +		"./gulpfile.js/docs.js"
        +	],
        +	"opts": {
        +		"destination": "./docs",
        +		"encoding": "utf8",
        +		"template": "./node_modules/docdash",
        +		"access": [
        +			"public",
        +			"protected"
        +		]
        +	},
        +	"recurseDepth": 10,
        +	"source": {
        +		"includePattern": "\\.js$",
        +		"excludePattern": "\\.min\\.js$"
        +	},
        +	"tags": {
        +		"allowUnknownTags": true,
        +		"dictionaries": [
        +			"jsdoc",
        +			"closure"
        +		]
        +	},
        +	"templates": {
        +		"cleverLinks": true,
        +		"monospaceLinks": true,
        +		"default": {
        +			"includeDate": false
        +		}
        +	},
        +	"docdash": {
        +		"static": true,
        +		"sort": true,
        +		"search": true,
        +		"collapse": false,
        +		"wrap": false,
        +		"typedefs": true,
        +		"private": false,
        +		"scripts": [
        +			"styles/overwrites.css"
        +		],
        +		"openGraph": {
        +			"title": "Prism generated API documentation",
        +			"type": "website",
        +			"image": "/logo.svg",
        +			"site_name": "Prism",
        +			"url": "https://prismjs.com"
        +		},
        +		"menu": {
        +			"PrismJS": {
        +				"href": "https://prismjs.com",
        +				"class": "menu-item",
        +				"id": "website_link"
        +			},
        +			"GitHub": {
        +				"href": "https://github.com/PrismJS/prism",
        +				"target": "_blank",
        +				"class": "menu-item",
        +				"id": "github_link"
        +			}
        +		}
        +	}
        +}
        diff --git a/components/prism-core.js b/components/prism-core.js
        index f247eb1388..4d1c1aefe5 100644
        --- a/components/prism-core.js
        +++ b/components/prism-core.js
        @@ -1,3 +1,5 @@
        +/// 
        +
         var _self = (typeof window !== 'undefined')
         	? window   // if in browser
         	: (
        @@ -8,10 +10,12 @@ var _self = (typeof window !== 'undefined')
         
         /**
          * Prism: Lightweight, robust, elegant syntax highlighting
        - * MIT license http://www.opensource.org/licenses/mit-license.php/
        - * @author Lea Verou http://lea.verou.me
        + *
        + * @license MIT 
        + * @author Lea Verou 
        + * @namespace
        + * @public
          */
        -
         var Prism = (function (_self){
         
         // Private helper vars
        @@ -20,8 +24,39 @@ var uniqueId = 0;
         
         
         var _ = {
        +	/**
        +	 * By default, Prism will attempt to highlight all code elements (by calling {@link Prism.highlightAll}) on the
        +	 * current page after the page finished loading. This might be a problem if e.g. you wanted to asynchronously load
        +	 * additional languages or plugins yourself.
        +	 *
        +	 * By setting this value to `true`, Prism will not automatically highlight all code elements on the page.
        +	 *
        +	 * You obviously have to change this value before the automatic highlighting started. To do this, you can add an
        +	 * empty Prism object into the global scope before loading the Prism script like this:
        +	 *
        +	 * ```js
        +	 * window.Prism = window.Prism || {};
        +	 * Prism.manual = true;
        +	 * // add a new 
        +    
        +    
        +    
        +    
        +    
        +    
        +    
        +
        +
        +
        +
        +
        +
        +
        +
        +
        +
        +
        + +

        hooks

        + + + + + + + +
        + +
        + +

        + Prism. + + hooks +

        + + +
        + +
        + +
        + + + +
        + + +
        Source:
        +
        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        + + + + + + + + +
        + + + + + + + + + + + + + + + + + +

        Methods

        + + + + + + +

        (static) add(name, callback)

        + + + + + + +
        + + +
        Source:
        +
        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        + + + + + +
        +

        Adds the given callback to the list of callbacks for the given hook.

        +

        The callback will be invoked when the hook it is registered for is run. +Hooks are usually directly run by a highlight function but you can also run hooks yourself.

        +

        One callback function can be registered to multiple hooks and the same hook multiple times.

        +
        + + + + + + + + + + + +
        Parameters:
        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        NameTypeDescription
        name + + +string + + + +

        The name of the hook.

        callback + + +HookCallback + + + +

        The callback function which is given environment variables.

        + + + + + + + + + + + + + + + + + + + + + + + + +

        (static) run(name, env)

        + + + + + + +
        + + +
        Source:
        +
        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        + + + + + +
        +

        Runs a hook invoking all registered callbacks with the given environment variables.

        +

        Callbacks will be invoked synchronously and in the order in which they were registered.

        +
        + + + + + + + + + + + +
        Parameters:
        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        NameTypeDescription
        name + + +string + + + +

        The name of the hook.

        env + + +Object.<string, any> + + + +

        The environment variables of the hook passed to all callbacks registered.

        + + + + + + + + + + + + + + + + + + + + + + + + + +
        + +
        + + + + + + +
        + +
        + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/Prism.html b/docs/Prism.html new file mode 100644 index 0000000000..0744baa0a2 --- /dev/null +++ b/docs/Prism.html @@ -0,0 +1,1370 @@ + + + + + + Prism - Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + +
        + +

        Prism

        + + + + + + + +
        + +
        + +

        + Prism +

        + + +
        + +
        + +
        + + + +
        + + +
        Source:
        +
        + + + + + + + + + + + + + + + + + + + +
        Author:
        +
        +
          +
        • Lea Verou <https://lea.verou.me>
        • +
        +
        + + + + + +
        License:
        +
        • MIT
        + + + + + + + + + +
        + + + + + +

        Prism: Lightweight, robust, elegant syntax highlighting

        + + + + +
        + + + + + + + + + + + + + +

        Namespaces

        + +
        +
        hooks
        +
        + +
        languages
        +
        +
        + + + +

        Members

        + + + +

        (static) manual :boolean

        + + + + + +
        + + +
        Source:
        +
        + + + + + + + + + + + + + + + + + + + + + + + + + +
        Default Value:
        +
          +
        • false
        • +
        + + + + + + + +
        + + + + + +
        +

        By default, Prism will attempt to highlight all code elements (by calling Prism.highlightAll) on the +current page after the page finished loading. This might be a problem if e.g. you wanted to asynchronously load +additional languages or plugins yourself.

        +

        By setting this value to true, Prism will not automatically highlight all code elements on the page.

        +

        You obviously have to change this value before the automatic highlighting started. To do this, you can add an +empty Prism object into the global scope before loading the Prism script like this:

        +
        window.Prism = window.Prism || {};
        +Prism.manual = true;
        +// add a new <script> to load Prism's script
        +
        +
        + + + +
        Type:
        +
          +
        • + +boolean + + +
        • +
        + + + + + + + + + + +

        Methods

        + + + + + + +

        (static) highlight(text, grammar, language) → {string}

        + + + + + + +
        + + +
        Source:
        +
        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        + + + + + +
        +

        Low-level function, only use if you know what you’re doing. It accepts a string of text as input +and the language definitions to use, and returns a string with the HTML produced.

        +

        The following hooks will be run:

        +
          +
        1. before-tokenize
        2. +
        3. after-tokenize
        4. +
        5. wrap: On each Token.
        6. +
        +
        + + + + + + + + + +
        Example
        + +
        Prism.highlight('var foo = true;', Prism.languages.javascript, 'javascript');
        + + + + +
        Parameters:
        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        NameTypeDescription
        text + + +string + + + +

        A string with the code to be highlighted.

        grammar + + +Grammar + + + +

        An object containing the tokens to use.

        +

        Usually a language definition like Prism.languages.markup.

        language + + +string + + + +

        The name of the language definition passed to grammar.

        + + + + + + + + + + + + + + + + +
        Returns:
        + + +
        +

        The highlighted HTML.

        +
        + + + +
        +
        + Type +
        +
        + +string + + +
        +
        + + + + + + + + + + +

        (static) highlightAll(asyncopt, callbackopt)

        + + + + + + +
        + + +
        Source:
        +
        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        + + + + + +
        +

        This is the most high-level function in Prism’s API. +It fetches all the elements that have a .language-xxxx class and then calls Prism.highlightElement on +each one of them.

        +

        This is equivalent to Prism.highlightAllUnder(document, async, callback).

        +
        + + + + + + + + + + + +
        Parameters:
        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        NameTypeAttributesDefaultDescription
        async + + +boolean + + + + + + <optional>
        + + + + + +
        + + false + +

        Same as in Prism.highlightAllUnder.

        callback + + +HighlightCallback + + + + + + <optional>
        + + + + + +
        + +

        Same as in Prism.highlightAllUnder.

        + + + + + + + + + + + + + + + + + + + + + + + + +

        (static) highlightAllUnder(container, asyncopt, callbackopt)

        + + + + + + +
        + + +
        Source:
        +
        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        + + + + + +
        +

        Fetches all the descendants of container that have a .language-xxxx class and then calls +Prism.highlightElement on each one of them.

        +

        The following hooks will be run:

        +
          +
        1. before-highlightall
        2. +
        3. All hooks of Prism.highlightElement for each element.
        4. +
        +
        + + + + + + + + + + + +
        Parameters:
        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        NameTypeAttributesDefaultDescription
        container + + +ParentNode + + + + + + + + + + + +

        The root element, whose descendants that have a .language-xxxx class will be highlighted.

        async + + +boolean + + + + + + <optional>
        + + + + + +
        + + false + +

        Whether each element is to be highlighted asynchronously using Web Workers.

        callback + + +HighlightCallback + + + + + + <optional>
        + + + + + +
        + +

        An optional callback to be invoked on each element after its highlighting is done.

        + + + + + + + + + + + + + + + + + + + + + + + + +

        (static) highlightElement(element, asyncopt, callbackopt)

        + + + + + + +
        + + +
        Source:
        +
        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        + + + + + +
        +

        Highlights the code inside a single element.

        +

        The following hooks will be run:

        +
          +
        1. before-sanity-check
        2. +
        3. before-highlight
        4. +
        5. All hooks of Prism.highlight. These hooks will only be run by the current worker if async is true.
        6. +
        7. before-insert
        8. +
        9. after-highlight
        10. +
        11. complete
        12. +
        +
        + + + + + + + + + + + +
        Parameters:
        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        NameTypeAttributesDefaultDescription
        element + + +Element + + + + + + + + + + + +

        The element containing the code. +It must have a class of language-xxxx to be processed, where xxxx is a valid language identifier.

        async + + +boolean + + + + + + <optional>
        + + + + + +
        + + false + +

        Whether the element is to be highlighted asynchronously using Web Workers +to improve performance and avoid blocking the UI when highlighting very large chunks of code. This option is +disabled by default.

        +

        Note: All language definitions required to highlight the code must be included in the main prism.js file for +asynchronous highlighting to work. You can build your own bundle on the +Download page.

        callback + + +HighlightCallback + + + + + + <optional>
        + + + + + +
        + +

        An optional callback to be invoked after the highlighting is done. +Mostly useful when async is true, since in that case, the highlighting is done asynchronously.

        + + + + + + + + + + + + + + + + + + + + + + + + +

        (static) tokenize(text, grammar) → {TokenStream}

        + + + + + + +
        + + +
        Source:
        +
        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        + + + + + +
        +

        This is the heart of Prism, and the most low-level function you can use. It accepts a string of text as input +and the language definitions to use, and returns an array with the tokenized code.

        +

        When the language definition includes nested tokens, the function is called recursively on each of these tokens.

        +

        This method could be useful in other contexts as well, as a very crude parser.

        +
        + + + + + + + + + +
        Example
        + +
        let code = `var foo = 0;`;
        +let tokens = Prism.tokenize(code, Prism.languages.javascript);
        +tokens.forEach(token => {
        +    if (token instanceof Prism.Token && token.type === 'number') {
        +        console.log(`Found numeric literal: ${token.content}`);
        +    }
        +});
        + + + + +
        Parameters:
        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        NameTypeDescription
        text + + +string + + + +

        A string with the code to be highlighted.

        grammar + + +Grammar + + + +

        An object containing the tokens to use.

        +

        Usually a language definition like Prism.languages.markup.

        + + + + + + + + + + + + + + + + +
        Returns:
        + + +
        +

        An array of strings and tokens, a token stream.

        +
        + + + +
        +
        + Type +
        +
        + +TokenStream + + +
        +
        + + + + + + + + + + + +
        + +
        + + + + + + +
        + +
        + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/Prism.languages.html b/docs/Prism.languages.html new file mode 100644 index 0000000000..2145781194 --- /dev/null +++ b/docs/Prism.languages.html @@ -0,0 +1,683 @@ + + + + + + languages - Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + +
        + +

        languages

        + + + + + + + +
        + +
        + +

        + Prism. + + languages +

        + + +
        + +
        + +
        + + + +
        + + +
        Source:
        +
        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        + + + + + +

        This namespace contains all currently loaded languages and the some helper functions to create and modify languages.

        + + + + +
        + + + + + + + + + + + + + + + + + +

        Methods

        + + + + + + +

        (static) extend(id, redef) → {Grammar}

        + + + + + + +
        + + +
        Source:
        +
        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        + + + + + +
        +

        Creates a deep copy of the language with the given id and appends the given tokens.

        +

        If a token in redef also appears in the copied language, then the existing token in the copied language +will be overwritten at its original position.

        +

        Best practices

        +

        Since the position of overwriting tokens (token in redef that overwrite tokens in the copied language) +doesn't matter, they can technically be in any order. However, this can be confusing to others that trying to +understand the language definition because, normally, the order of tokens matters in Prism grammars.

        +

        Therefore, it is encouraged to order overwriting tokens according to the positions of the overwritten tokens. +Furthermore, all non-overwriting tokens should be placed after the overwriting ones.

        +
        + + + + + + + + + +
        Example
        + +
        Prism.languages['css-with-colors'] = Prism.languages.extend('css', {
        +    // Prism.languages.css already has a 'comment' token, so this token will overwrite CSS' 'comment' token
        +    // at its original position
        +    'comment': { ... },
        +    // CSS doesn't have a 'color' token, so this token will be appended
        +    'color': /\b(?:red|green|blue)\b/
        +});
        + + + + +
        Parameters:
        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        NameTypeDescription
        id + + +string + + + +

        The id of the language to extend. This has to be a key in Prism.languages.

        redef + + +Grammar + + + +

        The new tokens to append.

        + + + + + + + + + + + + + + + + +
        Returns:
        + + +
        +

        The new language created.

        +
        + + + +
        +
        + Type +
        +
        + +Grammar + + +
        +
        + + + + + + + + + + +

        (static) insertBefore(inside, before, insert, rootopt) → {Grammar}

        + + + + + + +
        + + +
        Source:
        +
        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        + + + + + +
        +

        Inserts tokens before another token in a language definition or any other grammar.

        +

        Usage

        +

        This helper method makes it easy to modify existing languages. For example, the CSS language definition +not only defines CSS highlighting for CSS documents, but also needs to define highlighting for CSS embedded +in HTML through <style> elements. To do this, it needs to modify Prism.languages.markup and add the +appropriate tokens. However, Prism.languages.markup is a regular JavaScript object literal, so if you do +this:

        +
        Prism.languages.markup.style = {
        +    // token
        +};
        +
        +

        then the style token will be added (and processed) at the end. insertBefore allows you to insert tokens +before existing tokens. For the CSS example above, you would use it like this:

        +
        Prism.languages.insertBefore('markup', 'cdata', {
        +    'style': {
        +        // token
        +    }
        +});
        +
        +

        Special cases

        +

        If the grammars of inside and insert have tokens with the same name, the tokens in inside's grammar +will be ignored.

        +

        This behavior can be used to insert tokens after before:

        +
        Prism.languages.insertBefore('markup', 'comment', {
        +    'comment': Prism.languages.markup.comment,
        +    // tokens after 'comment'
        +});
        +
        +

        Limitations

        +

        The main problem insertBefore has to solve is iteration order. Since ES2015, the iteration order for object +properties is guaranteed to be the insertion order (except for integer keys) but some browsers behave +differently when keys are deleted and re-inserted. So insertBefore can't be implemented by temporarily +deleting properties which is necessary to insert at arbitrary positions.

        +

        To solve this problem, insertBefore doesn't actually insert the given tokens into the target object. +Instead, it will create a new object and replace all references to the target object with the new one. This +can be done without temporarily deleting properties, so the iteration order is well-defined.

        +

        However, only references that can be reached from Prism.languages or insert will be replaced. I.e. if +you hold the target object in a variable, then the value of the variable will not change.

        +
        var oldMarkup = Prism.languages.markup;
        +var newMarkup = Prism.languages.insertBefore('markup', 'comment', { ... });
        +
        +assert(oldMarkup !== Prism.languages.markup);
        +assert(newMarkup === Prism.languages.markup);
        +
        +
        + + + + + + + + + + + +
        Parameters:
        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        NameTypeAttributesDescription
        inside + + +string + + + + + + + + + +

        The property of root (e.g. a language id in Prism.languages) that contains the +object to be modified.

        before + + +string + + + + + + + + + +

        The key to insert before.

        insert + + +Grammar + + + + + + + + + +

        An object containing the key-value pairs to be inserted.

        root + + +Object.<string, any> + + + + + + <optional>
        + + + + + +

        The object containing inside, i.e. the object that contains the +object to be modified.

        +

        Defaults to Prism.languages.

        + + + + + + + + + + + + + + + + +
        Returns:
        + + +
        +

        The new grammar object.

        +
        + + + +
        +
        + Type +
        +
        + +Grammar + + +
        +
        + + + + + + + + + + + +
        + +
        + + + + + + +
        + +
        + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/Token.html b/docs/Token.html new file mode 100644 index 0000000000..08ec3b6c90 --- /dev/null +++ b/docs/Token.html @@ -0,0 +1,670 @@ + + + + + + Token - Documentation + + + + + + + + + + + + + + + + + + + + + + + + + + +
        + +

        Token

        + + + + + + + +
        + +
        + +

        + Token +

        + + +
        + +
        + +
        + + + + + +

        new Token(type, content, aliasopt, matchedStropt, greedyopt)

        + + + + + + +
        + + +
        Source:
        +
        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        + + + + + +
        +

        Creates a new token.

        +
        + + + + + + + + + + + +
        Parameters:
        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        NameTypeAttributesDefaultDescription
        type + + +string + + + + + + + + + + + +

        See type

        content + + +string +| + +TokenStream + + + + + + + + + + + +

        See content

        alias + + +string +| + +Array.<string> + + + + + + <optional>
        + + + + + +
        + +

        The alias(es) of the token.

        matchedStr + + +string + + + + + + <optional>
        + + + + + +
        + + "" + +

        A copy of the full string this token was created from.

        greedy + + +boolean + + + + + + <optional>
        + + + + + +
        + + false + +

        Whether the pattern that created this token is greedy or not. Will be removed soon.

        + + + + + + + + + + + + + + + + + + + + +
        + + + + + + + + + + + + + + + +

        Members

        + + + +

        alias :string|Array.<string>

        + + + + + +
        + + +
        Source:
        +
        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        See:
        +
        + +
        + + + +
        + + + + + +
        +

        The alias(es) of the token.

        +
        + + + +
        Type:
        +
          +
        • + +string +| + +Array.<string> + + +
        • +
        + + + + + + + + +

        content :string|TokenStream

        + + + + + +
        + + +
        Source:
        +
        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        + + + + + +
        +

        The strings or tokens contained by this token.

        +

        This will be a token stream if the pattern matched also defined an inside grammar.

        +
        + + + +
        Type:
        + + + + + + + + + +

        type :string

        + + + + + +
        + + +
        Source:
        +
        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        See:
        +
        + +
        + + + +
        + + + + + +
        +

        The type of the token.

        +

        This is usually the key of a pattern in a Grammar.

        +
        + + + +
        Type:
        +
          +
        • + +string + + +
        • +
        + + + + + + + + + + + + + + +
        + +
        + + + + + + +
        + +
        + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/docs/fonts/Montserrat/Montserrat-Bold.eot b/docs/fonts/Montserrat/Montserrat-Bold.eot new file mode 100644 index 0000000000000000000000000000000000000000..f2970bbdc7cced41387b330775acfe5904035ada GIT binary patch literal 106135 zcmZs?WmFX27dAQt3^4T2HA4(7-8FQ>&>SHKC z00j8|$^H)tfdIt+@CED9-~ZwN*WdsHfFHmY5DW+cxB>$IbI1SU|MgYJ z#8dX=n35u`+dY204|(4+k}kgz!DCz#W6D=d+4LA>xU85t+hLE!cFcI}xjXX{!IBPDNJh2>Fr!4c=FXJweQB;lyn$`IQtjmw6cCFwvd;=-msV1S+T z3oJbmMLexZ^)out@WqISHviq`UJn56zEffwXA|%+tsyx&%lEdD0F>2r>DlVfUUBJ9 z_X%$n#tU#R`HdaGD55)a7rsJ4tM)kzu^1Ctalah8gEtwBpm!_`;O8=G=oyK!)`OW< z;(N@ZV+@WuW1*tNDqA8Vl^o2tN)W8Mk9dUIOiF^#O@~>=(6sj?{(`k~7IZq372(Kw71d^P_*B&^ zl{P!mcv(1L$6VinMUu8($i!5 z`HsdP`H|DiI9yV+zxuY<`0Zd^$^Q`4ri|s=%OmyX-^n`Wgk^0z&Rag6WoeGdYRasFai!^v-kpr=Ek4+3Mo0G-Kpq?KiAqTfeBQ5uPhB^ zIbRFU*#CozNLszmj${9LBG3awa~Z^A1vCPclDH!2Kh%6Ig)>HjWE(yYvlCJznrx_h z5wjA%1d|3$B(sUQbpUa5`>{!oJ>YvnUq(Vr=bUb3%W)v+eT0M)Ch)zhXVBu)xS zZQq+qKT?}I>@-=I4y_3jx&LE+tMJ>vb==TRpi~dL)?z7B-JbfZ?CU^M99t$Ncuy{q zpt!VU`6AF$JUn?>BTzx=fUB>m-)4!k|Ae8~tQf1x6Yb_j*=+Q*~mQyHJRzs57ldeP)krfcbbYi?Pg3C-qa$)wWY ztqU$Ws1|)ROz*YiZD}@{!5xzl{*-3<)ttv>mRtPf^Dx`x6~ngu3TH1d;)aDE;&J7M z1%;$w;SLJSfq2HSIt6jYH^tf#FrQrA_lo43M4J++K&@_yx#fv^?Ufawyvr}ux{h0N z1#|#Q>Ort-B%iseI{~HD7NlaDK}Hou@H^EXOT)z;As6%{j`_@XcW%I(Ce2Nx&H(!7;OWdj4&ASI)>yyvI?mYTQqRC1t@8lD(3^*Fs z7XV3Z4zz&jUTUW~0OK(snzSLQlf1Gnmy)`zlk#L{NH@zhY~3*5E%jRwe#ni4AqiV6L>t!m zXzpt#5qLv1PF;baBL;$ojG9){eUQ@1wMu~Kh&Z>2+!_=-EtVZ$v-)6fqcd_oCo9MZ zqGpH&vWd%!Xye-Ws`MYL8b8JND{){$GXQTgC(pn!mDhklYBJ=$J}c+z+F*QE`MCX) zK8M=UWWR;Om^&9Cm!9uLg1Y2BFVGJ`L^|3wS-;Y3GrQ0Nu3>~T5}XIlgMo_@YA+DN z^e(txhSl@;M4!|*WLuT}kZkJu3M%D{Dqi9x|EltFh?*-Z;`0L06RP@A#egQM;VijW zlLsAGr@HLH`w+DeJrecrS#q??yV&#Z@3c*$Qb~{x7**T7M9v0FFSF1BsbXO% zxp5)x*NjXMx~InCcyMDbhIANe*Zz@&hN_p6WfP+Yd(Rv_2i07^&Kp#{8(s>T1bAJH zBBDkaT0Xy0n^OgF$`s!qeEr;(?DpS#y2#p(btt2x46?g)iT-uS1GXB*ZJ=wkpAfDr zaQ(=M1a8eIHJ|v$?f5ynmqS}DUIP>;frI+hdIk1M9U-~n_L`auRBJ~Z0P*yJ(D)bhkQkT-7!tv_93zLi3em?WM z_7S?+itwjv;r8UAp?ZUf2F%b3ds%JzCsA5%nw6>_me$8~KdtObo0^uBKYdGM79h+4 zfb2!)({b1$<>VgBI0GduGHv_Z%Bb2l{H`lBF|d=Lc-8xtjQ3zf)f==p=OZX-dC1v6 zNF3$B!@4KahzPU~<+_>pr@?@yc`F^V$^dCG4>oOZTT&*8@E>dnqS`?jH>p`7nCoDw z`{vG#WH@&m5f*Wm&qX!WNK?3z|+H+fh27a}f&kc_D|YZfsZ{ z1ydB^V&L!FbnlhxwJ^4L`xU>5=I=1$Nh^H%fuFUXItK{khk6@}`)!AEu(*VGtdLS|x}2^YjOL#zrd=ZgXui2S=rl{8AFb!6Senfd<9!Mp zgu~Q-su)^nE6l3^ElxxArcZGL5(F~Ojdj2tUA5bK?|!-DUk3|N@@}%I&7zk_v*Y&K z&ImP`mZKe6&@YuWYoP)8wR9rgn_#BE<;v)zo;~E(Egzo2)#B1FYq849x1APx`f)@f z`P}VsVqEPYI}x{MeSL(C?HGForl4^P%_I_+DZZVJmfXnn-cpXqY;`Qg^CtFR2AY(C6w}hXdntfYVhz@5`QIzuQ_Yn-)3O( zX_#tI$;rwDIlVSsdH_G+1;a$q>e(jxS-`>eR8pRGm6`Wob|2Y3drVzTB7t8)1S7lf zbcE{c!*bKmsCzsQj7H3a%=#*mgY5LE00OLmVx2i+ zXu=n_0%WsC03T0r(H=EWq411ebOuJU@}lbFD>F#H;)Gfr_r?8WFtcbJ+`L3|c0Mc` zi@q;foRfJ*Fv~+ntr0BN3Ny)n%{xCE02dcv|IDmrtq^_vKiMbi45Vc>{r}PTUHlylOEt0gQ0TS1oi0RHGjM&D zuNCtGBtw`FmoHpcjeo^#GwnBXU(K@C2ap1jNRLiSb67}TQN1Z^u5{Lz%ws?hzvld5 z8)Ngxe^T_NFu_L9+Xpv0bp#ltcvw};MmkORQq^-6uiTa_iX>C+U&VVBa`e)QTE+uk z?0enY_%S(YoIhb836{SoGI`PSGGw;jQr>|XbU}46?!p){#fw?B9RTLlZS;=qQVr3| zn7PS);B%v01)#pzL5#NwM@jQZZ=TlsBz^j4YGJ{|xl-u;=rXSG>T&-&uk>kEIB_Bw zuZ)w(eoRcl012}X!o*S}J`*r2PH5e6FzU)FOCglJ{*wYZP*wzO{<9h1O4&6+3ZU#F zBjv>izY_oTj7Hwg^&JqE-L5aeR-+L!1$oCNHR{=05|Z=sqtbTe*uC1%Yf_J~`JaGQ zy+U0ojn^hRD%EfvAKpbN59{?0wpof|e~oav?9$P>;Z3!ozIlC)EtWa~kL{l8CA>~z zTNY#d2N_l+WLkWBcZ~I(Qx9|Htxc+|*8{oUZ{Z@*rdBVKbOStPm}?V4zK#RL^@E!! zc$s$w3Q6B!=J{cL>I6*~GIeX|Pc$HA9rRxGLajw=Z3?_ofsoRCc90{4cO%ksiS@meL}Nra^{fL`Ffj*S{zz*pbdT z$vMoSp=eTs$8CiS<)3iSR*XDl&RT2foTAMVK-fUxqiW~gck5BQ$J^>zh>y#&wt+XY zUMwK?IN5NPZk9BbR~feC4yg<9C6aVn7Gbn0)Oyd2!4vQiaEH8!)s9spd_tj5L-RrS z`p!2r;^IxE^n=yy7=`~9v~+VXw9rNkJ3%~fu9P=v~u<4Kt(H_;j15$j5=L6+zee!T;X$NXqjT3)re#L#Fvor^nyP@i=4S*#1HKue~9?C%@3i?8OnRHvIk#4d7D zE>$k`@3&h=k4Ad)tox^8&lTLS5gRe=;P?DMw%wAC#s&k?sscm{mWO=Fe}7_4N%M1% z@>M4QHXn4kRHd7c>H-UezsmBVh++~+p@)R*T$Z02(XmIiYZf5cnK1R%H;kKdA6YTf z1tm+9N~aLWt@~IAerQl&go?~Q?o#GuS^Md!vJLk-0g33XVEj{fNaw}AuB=_WxN=GuM$9{C ztQ*G1d6mIcc={ypJWh8cUPs%LNQTn>-*gO@uhaHqVW?+apK2;;f5EHGBq>5QpSoq<$7Cj|#y`nrwNA z6iKhQji<x?OQudt*Y9aozB6#v-j)< znSfFcW|*Sm(8SoAfpU_GnwKpaR4itipRNLB4S-xF(o|MOvsgU=8hVq}CfG}T?DmF} zRzAKE5osMI*=iLR%SJ?jeSUWezmbt(7t}19zbQAa&;Fj< zJdQ}~6g4zfy25Bt>b&hY=X#lGW3>$c>rv_XtVEIYByfnj9>|;Em6A7VYwZ z=?{KoQ%j)VcBV5d2VXI0Bqec>SY^L5>OHN&NcamqQ9siPgfi?HAd3v}#nOwDMP8Ct zakcS(tGPKB3U$oenF`J^)X zMY!*CDrU7T-7~hIGl{xsnjX0S(LuJ`V-Mz%>^U(XTk>$EFBW2 zx4I7rw6i=nsbaz%22myuS!>KHp%awvsHK4f0b@?&$N^LYDR#Uosg8hR84^DImzk{D z?F$2&MA5v;gCzWo@8faSaf5njNRfu^aiPR*zAOpT1BB<}bJ|YpsZwrT?aZUy$MPK` zP7lIa!E}HTP8nOx!SteWO9?u17F+2C;`}wplkrnVQ%5(FF$SDt04ODr<^vEm(5}4= zoaz@XfyAX6zk6W(5TLHp|6$u>1;`-?25cn0^e0mXK2@dD$C|8R|U<5c{Xo6_t#5QVw_q3EZ0Z+vb*aJ}P>ut2H-gvCZ0TxCYJjU#kQj$YKcyPsH6XepYzTU{ zc&w6k3Tv3ZH%+_E`!20uTToq*|3kJ~ODCCrfZaJ`SeZy(USwL`fZJBH=9m8H{uhEvs5;viI|0MG4cZh*zXU7*h*;2K|j?s-dk`q*soKd`3lC<%N1~Cx2-_w}o z$roPb3>}{Yms^PC&v8lQ6dGq_@O7;wCIC0YR4qE>sMj7(7}wNcJQ4gN=_ayEZ3d-U zh)m764^~{a>>qVtdLksY)IbTpOWzf4D8DvC72fq%Ujb7Rn2l0%I zd(6zQ#>4SGJ&4y?C#b7$vP$(XTlZSz#KVl2whN|S5uXND{yddpTLVgO7|N@(krg5t zf`lB*e~Gw1G+5=1HSB<$xsKA4$kyr#Jb>3p8e+7~x7 zsOdTDxYXfAkR^SbGG(!-_RYg7r8FsKlDNExi1Hr!a`%i^ydz}O1v{nzB#pBYQpeU< zn_6$%cIWg6CrNvy;G?Wpu8bAedZ_wc;xS+EXBKFxvuw8Z$B%H#F_>g13{*$POX>q; zi~_n`Q1n*FPKw$xj3HO2g-qH!f+2{fhFtOy&#n23=yeG_<`rHl$Qbd&`>mV{?uFxi zvir+Xv}s8JL-pU1nI6DRakOi=QRLfEB7^hwe^(DERIQF&7L_IMTBlzacaC;=#c8Cv zaPME7iws31#pn2`XXct2ANgv4g0qt6d?(X-WX*;rkS5TmXE-CI(FTS=jUT>qsEvxlq;r+6gb?kj~J~4u_8lHR-^+TmC`+Sx@okqon z=`)Vx|46P)_BHwIYwwo?Ux?m>8W-XJB|6!hy;u`DVOSlU(SO7u-pMB_R^~bTfs0cr z@L{GEur5?Xzxu&X`z3P4)ph*<=9OclJ*o8;!unaYN9 zt*Ixuc)u1z(W%nS)%$&-Mg&;aPm2#mw|UqfA046(B6_{Vp+f~fKGvf>8D?Z(|{*)XcdD0o%NYTP?x-+C3M~i1HtJlqVz{KpN z6jJryJy6@Q)9Cwdl*gOMiLuf!{K8#rGlZoQDi4t~f2L;0@@rb$oin^zDbzb=Ur^zV ziKvY9JUG4*ey3IuM;90ak%*RqD_A z*TCjJWJ<1D=nQqfq<^jifR7G!XSdTk~bH?*{%W5Q3y zgxyEYN$W_lh0p~1WRbZjkoRLhg?^X`RjyvC|2Us4BIjWUTa7X(l2u4KL88$N=`#Eo z%g(o%fJy!67bS@JL799NnpR@*ojn7>*w%VfYQL3&ECs5ggyv4B&M^zks_Oz^GcWGG zSbjqnNsKw$^oe_Is`(+!$+!v97YR91C08%;`qm&F!+_!F+#Pj{a4>GXzB^4M2>apQ zFDnAveROL?^1@v4rGz%Ig>&J4eFEd23bnZ6tGkm9Ki2`<8Gc|u*|)crRUGFWhBA#! zHMNYnAvN48f7_UyqA>Ce+SA+L79EB*`M8`c%%ZOj(Wk?29&T!-#D!@QZ3dAzOEu_Y`A-;p z)J}?NbkkWdWyA(FKg3-ul=(FsjGh-#q_}-?k|iW z6m`Rgt| zbD#hE3$6bpCOFoUnfUuV(4G6QWeG>=T1nrF1_r%`0H-FJs%xC4O5M^+*3Pl zB~Z+^cptd=<|9A>^qzVIdau!VXqoJqn99vG;aLosqkW9*TfN-(F(Mq58v6GIxRxhs74Tk5^PH_IfwyQ8c=iPoR4+jU$ku9#Ww!P<6; z*Le>Yl8YH}KL5=Dr7=Du@os~2H&_|dHp>mlf)OHW9A)Yr=X~(XZOn^(pE&c<+@+;7=^Ru3`ZG!O=Rm1otmC8R71{(g%s1CL6_ytYK5qY91SM$=r5j?g zN!E)JB2py`zY8#7>H|u7@U%Hr(CowKU%0wks$bQ|U*>c{T$53HV1-I93Pi7t~wUht@n90L(h_5*kosyoN}-WJEutZXJ)DFi^jx z&`gFau&ExMCK=K`FqTqe2fn5JS+kWlf50rWY9ck~S~))``I%*&$g9*}aDl0imU}Wk zTM&&{u*IuznVNGUw}X#5mnEsva)i1|-m}$xr%9*OzW^NI)5uEf zZE?#Hb$ocl3wxu#aZ~&+(w8^%UP-(}Z%XUf1>1O*vD`f_SaO;kri~r1C?OR5`jhM4 zWfV(GtX;n-7l6i!_2m9gd*0ReAQ8>YI4(Yczvd#ba^Qbz!vSf&ZZq2I7ViE9w|!lH zndf#pE)%lQh-`o;iIJTFPDv_U`n4WkCfUKOh}h{s$La z1QjrP=a1EWABPQZCMTe5C6#iG5FrThBmRRNSzj`ycDg_AO81`24naxrV-&YgL4f%3 z2y!O3%Rj_1pf;bkVlDWO{@?ztuwloQ{YFEH9w`~+PERdw+C!zPsunuahAGWhoRi#r zf{M$gjXNds_k9&M$%L&VpQg;+z8j_%GuNx;s(rw)b-wESf)2236r3ww-fK9v4dA?o zp!t*Y-`hCQO;I7H=*y_db_958b{&26UdQtG;C;Q8Y+>i2Ke&g}h|z*_ofsE~H^4Z~ zfqZxd@MfAj|9BR850d{@Y4vwM9Jo6F%{FFeW5X3iAJg)b`vH_bOt6=o<$@S2ga=WXNXCA`dY36jW> zai2Wk*d?kWrPFr)`q6vVLd;?&Zsu-UQTD_XWtzVIuTEM;Y-tt~o8YEHY7OH$ZRSSS zG3dQB|M(!iJ-W~slfVYxcI)4nva14uJ(6oJgd}sQo_b5R4JbePEZ?2&Foo%XKR#!OS7+Ib5LvVXn;y(pM8~{?r`OZ3?>4qA)J;{;aRsHb%3eTGtYb2 z!4j0BYVhgfzidwV65FTI96?8rQFwfR4fJ+YMMQa9>s<}e$f0~+znHfMRgKe~^zVk7 z!fhHO@F{nihLy%cdL0Q5Uca!b(#NW>Yu2{6DiPg0p^_mya%mY((m`WPHl_rq(tiL& z0}Vz`=H-!}!2U0dqBYI}+QOVeSN!FG(4&F0T(O9_ zUkpo#rE&J^t7o**K5@-bzpoiNwdc`?b}&>1;7FR}A)2ZZsVb<_8Zl%*pxdI`wN|MW zjxPUabMzurj1ZOd*meJvW(%&HxZlM3zKn0R9eMNDNj409-aY@LHQ4XKEu?^Dm;G=h zNp*jX0}PD|Zn$R(_}4=m5i8T9^NX{%-w0KwcjzzGr6BCaYrzW~SG3=;Zqw;NUfQjS zw^-1L@sT+5ENEg(grruJ%ekI= zk2}pUM<>29NrGh>2agU}|%o1>Lhfg2}&e(&!hz%tpf4$$nf^c}YG}CSJUif7@Nq)^oJh@&$V+B=J19el*33 z0RMS{o%tJ*&P=s2Zx3hEx383Zb4Ms=hQtHjDy5e3o4&>J?G zRsKACk|Q``xIX0osJY{Vh2lZwZ$oC-cr?)h@Lq{=SPJatYX$N%K(E1L&iJn>_y*mW ziDxn1qGrCml?uyST-|^y{hVD1!lEE;}ZqD$7PttQl)c$Ninij=ZpOo1>aXgAB-8Lew;>xn) z?uHO9SE%kzV;SG)c#QfTphE)HKlOWAEdPwpIf}mj=Ji}8LJ>eZO32(FW7zRIBW9OE zN4OeQDK=q>*Q$nvf%TNQdz=Qjc46AJx;o&ex?kzl``0Vq-n-XAzsYEWq<(vxG7zxO zyt64kT&M@{kaq>@hW?^6n#w;5#l^?n;Xqs`+QXxo^pWCurpp}X#D?@GcPZqy4Eo5A zgnw@q_gLC>1(JV3(}>#Dn;tnJQX%vX>cJoQQPGEUiWxDV$ zD~bi0EUxoF%voB#p<>#Db6Fmz$6zZeKy8;O%~%Ycp5X;`4_X<8DGNBm#DWwTUe3t=NwqZBe~iB|rQ@=Oifd zV3U5YB9=5cT{fDMsq{X&1TDdtyo@9yTjBXjLPwcx0kx#u6HCR?gHuM4MQTdCS!f;| zzDpCH(63TqnF4U~nUoo11dU`PN+zhFx-lRM`~~}(HVCgW`s6|j{Sq^`6t}~x&xH8s zK+GT+?21&qcZPwfx+kl7sWBvA`rC%TY(|eV z-jwwPR(B#>Y5drW5A&o<-|}reZr)nHC$-J1;^1q`d1IxW`-b5$(|%ck^=1&pZ1338AZtar zIR*|3j+=owW+YW6A+EsZ-f{jyxw?yS*z>G&lnfw-cRgWth&r1^NmXbGohJ{b&zlYe z$f)ovHb{*s#Ep}BmH-}|)Z2&}sBjUY-#gKKrgmEi5dW9ns7g{>KYo7cKr!+aKN`Cj zTdMOCPjpXb59oX@)cBLAfMr|l84H9n;hC11VjW=9ha`=-p^$c+X9sPaRiD_nNr8~| zB#e1yqhH~&vmq3j#O*|(vfz6Y`vA%eN#;d5Aykkf>6^v#O)smd}yOWZ2(g zg3M=fuO=eT4;T_S;_Q47RItEQ)W%C+R-+NrC;`b7(#C2{h-v8$hzdC-Ixw)RA}#Tx zS>UQnC;)7E;};)tWb88{{0qdAsXO9Tk8IamQSS51E8a`arF%5MM?~pqI^dwmkV!0Q z&`xjwlsuubCgsK2ZxDM)jXkUTMu2O;!nRRcjDh-e4&TIAnXkfuTm^54EtONjfzpiCn|T&*!(w=%~$et-D@_$&kO7*%A~ z?lb>;V;`RiFl?E3NwxRe3L? zFeKmeY?S#R%^#m8XP=2l8r|@vP>dciQqnx9%Xa$s*(luU+Ue*e0o=v2Xa$$8WI9Jo z)y{?M5KZ)sj1@81=KfFibSRTGJtSozwIR?et^3WypX;f3e<+jWuJjdZNdx>{5@1Yf zGCT(1h@V|KZrtX}gSICznE7h&#YwbpSM{s!$5MUt$dM-uqiE$N)$JeZc1p?){08?n zmwEL~zdVL}_L?f2J01xU{5t{}IopDrve??hf}mAYPSA9Hz(ObWo*?&3KlH^}UHWEdR_#W3a=cmeKUx8~n3L{o# zrrc);k9ta7(-_RT*!=`YcmIbs`1jK3amek38S)V8pSSh-B!wlh$xfpu?zXyKdW0aA zpoE6v(1<)fcx)D!_!B?4svFU-uyidQ8*0d2 z&*sG{e2Km+55!_a`gH3w^1fK0C|1?{qrc0~vDcT?tb8jgL6YVyo_oyg^8htQ zI&lT{-{>N}rt}mAFr(E21*IdQ_KAhdIIpYv+k(PZN?ZTg@%^z$68qCyWhq>#E;bFc z29WWPB>-J%*g7IKk@MhE$trUffO=w5k}r%>R9*c))-*|z*Dgy#u#=QfDi2t${fhhd zeNS?DgJ`#Dj)(X8XnaxyqPNe-AfRZ2*6` zZey;-?BuE&dMz^+XfnrzajVSuM&2o$#&FAN&h^~)&9MzL;!K4mfSRt)LNzs%3pxRK z7-H9l)$d@+Z!YIZSE0t7%NFm1lGtQAZU?ROsu5k5tXX6mKaNK$H{+cFYdH0+P`hiv zdnyIdr<+$9c0y(QLe!zWJoPs>6BP-AA$5|DypO3HI4c6dM4a|sn0g-U^wf!~7Tm&z zDFaoL+z2S?&{t$5$R~j(H=at0H|;Ko_lR7$czaP-@TkzQOt%NH>LKluMefbQ;Ah=e`lDe2B*r3;da3 zN?)x3kYnAsp#=kqbw{r0osS&*s&lF*+aFSIrf92XMdf>%CH0_A_KP6`bxk~OV+uJu zTx-YL4~B2xu^UwREKQvPpMJG7eqP}~oHMomu z6mz6~Fr^gHr6e?2lBvzwA?>ehfkdi^CERMtg>39P-rSW zKJVusPpFgWj6A-aAjIl6Sms3+eINpb*POCmdWhbTjqBt>ZzKU@W{(BifA+R%LshwJ zQJI7!zE}z^mP{K$&fkLk%5FceGOWXJ;HifKd(qR#urnNp9EVT`?V4$?Lkqeoac$W2 zRA?5?(}{l(5rLCypiP^bUQ!kQsh$-aFUM+*jfMmzAr8NPtP~bsawg=EvSN`bpI=qKK9sejyx9P)J!)f5x%q8HVgQj_isuaXt$S)vUygrV_eb z8Q#$tCZc~{Zrnihqq-eF8d^y=j8jCa{S8^b43vB=2N-l zW`OmYPS~$btMm64lK!f3ekYGAiR4t3y<@W{PH!+#!FM)nNup8>6qIW1ETKCmY_H$& zBr8d3vc5d+WnSYq5q*l3OF=gVNkW-Ek_ifbpql@Ky=wo&tZV39;SH9Dv_-pD>MNKL zHtwCr5Sy_ycd)nNG(A{PXdZM`N?v@)523fJJh-7Agz)86o!t1z~Gg_oD%CXS!cl*_JX&YX-^r2K8`)A#MT|=pFy5$lY<x{K1fWq*f%v3sr_Er|&ZGPi$q6Ln!?WTRCqkgxC(T zGX6tmfV=eV=&|3*{@F2b$2!Ao$9~m1PWoLMlV(~B_dT`u?FYcxjx&St&ZlT{531#* z+8ozkdP=c+MS?USDF*`?b^MGBt3Jg9LWUJTR%BF5$q+{{x_a?lg{}J8X%)ooh04c% zVZ&STBWohcE~k~bDU&y~7C}?~jBPPqQ3{`BuH2`T!aK-g`xZhN?bb5Gk7&E4l~;%NX+jD zj{NZyUS5t61KG|N_Xblb4R4p&PtQVR)eMQLt)Haje5!+SQ9tJVIZA$ZF{8BD{@TUD z%UEDCL1Cx1B%PKp6P|w`4fnyDIKS&a3*2wdX7++RM>*aUEh2je8nY=)%9(v9{ZS4S zL7(#4b3&0^<2py>61_JcI7)r|9p|Z<&|@yTb%stH6x7f866#z;@AYCQ`v0=a**(mW zV$&u$r=+@|(f`P}MaJHp^+rPX0Acu!EU&I@+EJB)s)}yNOAX=S^6T_B;)wCWNu`RA zN$B zTM;re#-2IIqcTic$vl@PY~Oawv9|}Ng@uz{`Fd|s624BD6CF7*lk&)GOeCkW4mBXb zxWM%BKIGM0`4pSQRq4CGs8*#IYsfQE9%GeC>Zxw9yG2m7#=eIrOIM-FO1;DSy`y%R z9WppBbi8*hbSn`PjI0rRgRVzY9xMlJGmPc!eKwN_;%-kShNbum7?7dRHKh`?Rb1S( z`xK-ED@$;+ctK!I^iOy2s`r1>F5HALzW9(&OntyDz0uNhgia0U~SF2gf z8Edp+zWI0A3d&N~KNaG=WPaW?@;&pSc_W3FmGbtIuBK_X{K>EQ3O(~ZsfiN%XkqnQ z{_YPwf2O(Pe4JVudSC4}nuA%rw$rEtTa(>y!> zSvggTLSd?4N^HZkPpmhtTkPK`?w*uLEhu)@e>dAb&wOCqFL}Ymp`ZKIF>kr_^?v*O znfT+j(q&T{e#gj!;+<_LkhnC{+mkR5HFvIde2@`-d^p(K zFSt4gyXGFu)r6W$Z4-F@)Qsx$b>dMFGcXmR+e=!$!$SxZt|SbYh0=oD0{`%Fkm3p+ zgjL=j0e(g5ar_&=Hb|-L?eB4myUE?;{tS7Rgs~}Kv=TbZN!=R>T6x=TRib2-+M;wbVUs^_^V;|IMdKl3L|y@_p!ZAm0} z?(?bE@uf93Ax9+)G9$mEVB%@C0&D#Bqpr@+-~6EtE7_EAGllV~wwAB1UZ=!s0Ca@X zom2GZf2S8lKOxIs9*@H#egwE?kAN$Yn}Z||BjApmNlMVoSwuoN!Ns0Qf~6-VMeL;I`uh1d3b1zpHpHyf{fgK*a3a zW2LIq>o7J^kiFX6hUp{(wAT6sb-sX&^2)w75`PgI2j@noHAy?gOpU?^BE0hzI#b>k z6Y8KpZk0E1?GXw>bh?XQtQYbs?;7LO- z3=KY_uedZp{yZjTvH$6{hBLY9@lOAuR^FZdt?Kbi{}iTCGyj30ESdk}qsltL_XPYA zf!_%lSU+{riJ$sTJfqd61jaW0*Z9Zu!Sfa_}80( zXtmUKkEu~RM5hs?6rf$g01WVJLRSMs5f&5>TmdM;n})7~V?-r{UG1Tovf9C?pMj)| z7?Ip-u#o~K0u%s@1#lZ|8hAB8LqR_l0GJ14SP8%t%&DL)dlF|`I>2e-_7-g{6td9c z=pc|(U^^E>A)PRQ6{REHgn%o6bpW?Q;909iCTPGzL$x8`w6t{1fk*i*x%Z>8P)Gor zpmYH*jk-TETmIAlCzH3ZXTVp`SU&!vjn4b|5rj{D{K11{4YSB-^@*3hD8Z(A{bxS2 zL5%ey&^Q_XO1k}d{E*n)zRRZ$ilSf30Vg>5i+ls z6=W?wKoyUlUE~TZZ`C}2<%8OLfGca-d!MzR4L!hxfqp-(Ics8ZFL1$TvoCk**v`=1 zaH@K;_Z!t-d4ygDN=EKm;Z?>m_X?E?*?ZSzF*EwN3>5bH^tj9Kj z>^W*JA82ieXVb2wu?!#OHOQO5m2AJsKn#ln)i{A?~^u_+YEs9oOG4{hR zv3IjEPs79+Ya(r)y=+~k8ZP#LNGO>nuc~tnmwJwrgO%R5l$tf(rTHPvcdw9K*gaJ; z3$*H8X=+z`FGIE7iGw4PrXD4A_nu@GCgSfT%6PeVmCNAOc*Ezya~?1u_PJM!4DiaY z6|V^C;yUDsd&GlPcq^kUFwD+C^OFP_6R&RmL)1BK;|dAk$%;z|w!m^}*a$4=eL0^$ z16_=d-FRgONPsuIqU)@Tvahl+0lj#&g*kf`S8@!M(ys4;G`X9GC{0CO%kS)EW4K&OGvU?G`bm{`axh7JtGIujOsn?< ziQ9CR;!uQt1zbsZ421d3TNdI_=i)KF`#8`*`t7TkL@>Mb=-Cb*VH=JRM!OKV<~bH? zz|?#>CsEqy4~SHDvBx9zm)dI#thB3XA{pePwbd9v*#mH+VkI52NV6W@+jA6-Z~oBm zjyjIk1V&cB8WSpFH65glhZbgR>fr}}WIz6eJ?m&x=u56UV%>52jkWuvmXb{uHx%CP zg`H(IC~395ZDZ=Aw{67eXF9nNp3L;X&q~yhjG0c1lE@ztM$Pz8f?<*pu4Il%JaaC_ zxrDAfZ0lgVj;=B}Cc{H7x+)o94DOP&pN#I2FqYez2^gL38q@<~CjEA8Gn3m4?NR~Q zGqi*Lz|PVDH9?)E>5v9?k;cvp?IAn6S9Z><5Q>r;N`Q)zYf8}-B%8^B6(r~fgjA4s z@`$M>zo;Ulh^4>Q&*;*o`l6t`vB->%cRFRW}5mHU7@QRWvuVN}l^KubVLSvAM zk~tpVWz))lhFqf} zh-KcBu?)BcG7!swLeUJnrdlDFZ;C`R=Se_@UE(787EtQ^ zc}(Z;lH=8zvEud#p5Y8AtIqI-6{mK*Lkooxjvn0s;j>LIMLwfPjJO zARr(#{}2#(KZpowRD;-<$q^KXbkuV58we>yHEHodI%-K9u9~!>FX1I-(n`ysP6E6( zw`1#s)u_Vn5`8`vbAXF>J|o4czR?kq3fEAuVg!X%5P3*Afy>#6CogXK;zFL1w~Ky# zZ6@ygTC3+$Q9|I7x94@PwF5mR-Td8jX_Ix*+dS^N?Y;M0ENdAwir^P$2L0~Z&khQb z?36Zb6>E$h@das=KDr9u1SZl7#jsk`6{Naf+-^Z~METiLujlDL~nzJQzKTl1hp$A{AJ1h*kr5W_O09$B?yR;KoAMN)=Z16(t;XRtz}mGe&7u*zlH( z9a0Nu>sAiEwv$n=f{RN;1qwqbrX+RNlc{VXMvbE!xktXTk8u+#JPe{YnKH1cK*UEa zWJ4`u{wBR4Rj)&qu!m-`=FMbI&13^sv&Zn;Dh^0HR*;J3M^aqOfJ>RMmn%RfFd-%| zWqoeleQc5J4l4N^6Kf!oYYODncxpB20ot^LcD?|k9K_IOM1lx9q$51Opg;lCW=M}C zKn|2T&T}Lox!#g;a7oBxlaP-mCkZDd+1$ZajU-$_ttD)!4N?W18l)jK{iM<_a9VVL zjT!DMPkN=||K^;S6f*P5z4s)a`p)2?*ek$z?`SBPFH+t)zUR>`|2tI^%umA zTk9IPry94qHEUWmYS~!gMvU?G5e0J}EG1a`#_0f-$Icc6@*f29GBykN*fKT*Y%C4o zV4lLmsum6SSZ+eWw+jWVEEZ6(Q9{8-3j+998p6X@3j-KfYN23sLcqlf2XYn;*?7?(wQSjS(dGK?RArF1!JFpZL5od|or+O3#TaKbXo3VIWNYa3epQ9UtccPr!x$ z6S8OFjVXqZH^T-$3<`W0J9shM!H9nb1wITkehe340npq)JSTvHzX2M&1TK68P2eFf zfQt`+pS}fjo}xz930hRKB;wW;vWc5gFt*JGI1OQiV7DJSa=<3_v5Dhp%P2+ZV-v?G zFF(_}y#ktk%+r=yDp9e9q6tgf^*7Hzl9k8?7(uB93@T16UcfndysdBAQr8>G=J5s7 zFmTnMNp%>SIUP{?fRF<$sga-i0H!1am!m5U5G@qt+BziLel}=j*Nqbb8Bti6 zaea=a0dleh8#@BO4Q-ls*+PSm$=k31!3}W%Dn@{V%oml+CX+&bfI)*1#z@h(+GA~gD?E0)I)2C#}aRk)%OR#;$iR}CJ+Xx1nc z0!($`3}&Bm=S%js|j0vXd{n zC*z0pl0~(E>8;%_SQ4O0w~#YSs#pdD)x8?c5E&6q=zIex=sGMx@DkRz1wgs0?P8Ne!nrwG5<`Co#uM9d)t zPFZ{vJcg}?$D-T{oIAF+sICl*1w9Lp6y<#)+R6qfFI^`=0@$ej%0N?E&8>^zkg5ZR05nAKrCHw0~XR&K{Wki z#40LHUSHb2Cx9F41NX&d^tPbx`oMe>ez3`-{kdVUA#SH`7V8aGIXo@|-IVbaLtkI;RE0s&?vcb`z*F&LE$LZxnKS z;*KD=s@DNQIH&bLys^tD_VU))?M@K=sp$=EM;`5G;8og?YTa#5N#@k~v#x`fD{n;& zeg@D3a4ED3ZU7onP)WV?fgbs#FbA4ba3p#zdgT_B*~3{=1T}B{KtipC6HueVo7u(6 z&CT}LX^K^Cu@Dgk!kM%QbQsj&*<3d^*i%UQEHsXy!)Be~NXbR~DYK+FQYLOg!vMa* znYqQt&17f^lRF4@(S39GU}? zEGeltvQp9Kg(FtD-0Yz`a%3e=C*erAHkeV!ZVJBsaiG7PXI{=ZE7``~_c-$VoN0dN z8(*$1p1Yrv-sj|l%>1YGKNm*yM&G>8%mf_&Eg z`+eGbo6acJ-*$)R77pCPJ#axkZVdI@N_FpITvEBr%2%!k-gMyW+c+YC9C{ezU{ zRnJk;BPc}bs{`>9h$;ZpNEn&3npkX&ULtz;nh3rcBZ96Q)dt74g7X0~7c(VRp3OoH zQAkk*-C{$RMy(|Ei)fM1CO+uk5(=%kQ0+txtD7uqPZCv>GrXWbTS`nb}IHHgPcAv4x(?Q$y;%hk16Wv4}` zrD!@|Ng`Q#A+eoSFvS}2-ENN?1>J0!TFRGRvZX*PDqT9tm#b$~Qb<{%jy};!EJ@XP zcD+_3j*pP{;Dq0zt&p!$=GUo9)#_e4^)HaSv{i;~>#dLq&g&gJ8GXVPFruvTG8$Oo zMv6kD_{x&QHbo^{Bp-!TBipitcHIuQ8dJCfr=4 zLXHxV6K5|lO}Qhwqa=izF~~`?97WeEXbUSPAUCd~fgF^Dnn_3=IVj>Dra@szw@{1# zNRyie(8uw>3Br<)qJ8DmAwW&+=pl7hY!DE~a|9HEN-# z>k>UC0u$8yPsg4EB^P!e*l!qWWU570A~3U~^Zbd|0 zyi}2U6&!W4&`q9}u4p|mQD)g~6K$5!HV}%B>}SPAn|iAjY4K6!Z_HG3Gre-cQ>jB# z>RfPBn=Fgh(6M*ucdX)}&a;|Rq>{>Xkr2Qxp@lj~7f+;yfEpr#D|&d?0nVQ!pH5>y zOIh?;o9NO-KAxRt)768~(J>?kM1-5|>8yLcC`kd)AtPm2NQX9ABj7qDB&Nj)0=S_h zY`j#HCTvl|vO5VG8>E9A5RoskHbcI2NJz-=NXW=ITHu3^oe~Z{bVxYI{Tp~b6&yPs z^lgvuZExr{S%NCSGnb@9^0FMxUD%V#N4c+W&UsSo&ngAyqoQRoSYoX#i<;k>QK zkO&o>qEW?GXw!KvCc3t+G!Q9vf(2}}Kw)#nc1xKKV`W{oTP)L-%Lr#cB4 z1nPrFr&wh@I>`3?Ry5Hj^^U7MUY{8R*A~|&y*{YG1)FdP5}nZoq6#3TI*6s(5&ta5 z2(8KD!6|V9Q=ly{E5ryAohXA79*b<0^!3uuPh2>}_u~N3UI3Kwj7Yf}^okaokwdY` z6z{nrlQ;wH6jT_HQw_-$o~}r?lrbQp1udVi*a9yFk@RC;bchuwD1*~&V1UG(HjYW; zK2pm;;!;Q(MkJpL_nnR@NhG^ty7CT2mxAPJP^gik%q>=|ZjAp+Tf#0c;Q>*9-#Rau zG{x}V1i9EKTOCPj;1=e+;-#;KydajYgatKdG;>!q?rP>Mnz@&AR|lg!fxHi?L`WVb ztDysO3Q#fA1qcdjF!*y=V!5m_Eo%=0TERI8Qp--(vWFVhR5KdOO=4MOd@-e}QOKj)f#_zp z#RhA50WE9?8xNiqz3Ws!bA1H>Hq~k$C5q|{VwC=|a6R#hryQ{`IGU0JMOc;upOy#) z`Cx;OkYivCrHH^@SeSNW5LY;2U`e|Zdwhj$uyOJhgGwC+2GYR#C5ZetVq<#oGq%e0 zbZm6pf_r+{TOE>C z$4xQqOGC{W)BV!px2=xIoU?)yV@7o|GrMmtcWewTiZ@qws3qO0mKL@Mz;T_;eZE*H zwwt{0P2PVKcb*Bm&j3;hMR%{>cTMHa>5G-!4n}uP{=skfm#gqCK?(+omiT3Isgo;} zeOY1XQ7SI8`E}RU5DSNlE^e(il@+5X!JvlJ7+@tH6b%)Zii*qBy0Kb!2=mywz4}B~ zr#BM43NVV>;?3TjKnC>cBENX3uimDj^rEf`Ep^Yz#}m_wU2C^aiq@GNtY^s~ilDZy zP6S?)xn1esp~?PfS9!P*c=|+MJ_@ffaJ#_!Rp#jnMtO>aLtOc^UyjgfdU0yMDnnKI zdWgSXqA%B^X&j6Nkkw2maToW}BL4f+G06F?h`t@|SHzv+h@y89e7(wVieRPJxGBCU z<`JUgAnuoX=;1|Oh+v0g=_#=j;XR0*pk(AD;%>P)v{+8kmvVBs?AY5qn{jonN5_;! zjNnC#?Ga--hq0Uov78F)k(;dcHQ-lVhrPqu=K`+eAe8n;)IE{)CbD7HYbM}7Gv0Pw zggp^!Aij4>U5h(K*sy9{i!X)Pu{^sLaxTT2yw)oBCb3q$yB0y0V$A~VSpr>)Ju9(h z(RM777h=KAjbf)#YZYgiY*p%ih?n^;#e~eZDrie$AvUWLK-FSJiB=@`s>F!uu_98e zNHJB32@0_yEiH(eUbpXM4x|J0B-K$$tON8K-v~XSEkRd@h%kQf20P18RCkCm-b#Xx z)lq4>s*8KoQEy#U7O!KdF9GTY0qO?H9YIzRR2M+?141f-o2sa^z*R-JxT*`FdV!%8 zL3&;vpm^B*7?`SWrHZELtdNh14M(&fAtr=A-%P5Kn&E1@LK>3;xGGJhKelOK^%7=e zT9|i!$bywu8X~KW-1W*>s^fjAo5R=MmFoZQs<`NtTx(@DgAS_WMBc6@=JjzX3a&F{ zR~dr$mhS24ivQUYtx^IpThpqooYhv(v)!$v_5c?@A&wn_9Z$)6PnqBftz3*rT#hjO zl-baM4o+5xfkRKn7cs}Qta0hI@t`6AP{)-hUfpjDIoZ21*)?rt@&kv~`YPt}fC`lf>)RKQQwz9;JB z)AfF-`oF?{tVUz%nhX6?9e=85AM12JSz9cRbCh_Ht~GQGBltvOdV_de83UwZgS6 za8AlQQ_4GQHQPXh??8m_K!oo=gzT{Gbkgxd&Q@!-f!gW0ovxY$IP?f{=y7w-a^!Yg zh-zBlO?F#V*?W7knl8)1vkCp0#Tzw-mlnT3k8b8ap<(@DVE#?#4>7)r(Als>Q zPri^Q*a_2U+s|sk#k)m(D=B!N^LUf8#lA%~J1IdtZM^(pV%INnXg2f9C-QRsi3a)E+ZnUKY}-`NJjO6BYMUWy=x?ITxz@3z&`ZAS9H+AH$iHR+;2AW zVnc5sV!O@FM*1z$zKpbQry{%WfNk@@Hu>kO@4fn)?|^Odo-0MfifD)#BSd`f6>xU( zR|g84uE`mSyFQ*O{|@d0piLXntU*Kx2ZGpGmG`a@eU0W5+bv)n5$ucI zjz#X}!`{{2`Os4O(PcYH7bS<-Xo=j5J*`Ea_R(jj;w<;A7IEoW^_43=S)$GhQnTwR ztn$j0pB(73i!@ozlx+II)_HlF&n%|1%PKZ}a-z;Rn$Ipn?D;(wa6d(ym-`OQV2z&> zPiHxgUpffa^?|GI=xY10HGSA4U%+|m<9Vy@(fx^fC!W4Hqh3HG?L_(O2J$Zog=pP6Sbel_Lg~e4*rHSHRKx65iS{la`uE6vik?2j08j) z)>Jkytn`I!^n{_(C3Tp6gT8%%|6*RZq4w6wdbQYniF&M%+AZjXT%o?=UboL#FDwmI zch4CwEWR>cT|C6SVvtIj>Ek8khm4n(>5{9mn{{>&1+u`%o)w#N*=R8?mQ!xoUzn6$ zgYV}(o+Vq$@+BG5*mUT0A4Pbxr;iebhOj|A>Vv2AAIwC)%4F@8nLBr(leb`G?bsln zd2|!+VcsHN`awST!zU?OlYv?Z#X|{BE&62Y?4+k$EhQcF4iczzb)dcCRn_Sz(Ig2* zi(KuJtDrJC>(e9hfXMu>OpV(2tV%DSlx=H;N12~Ymr9{gkj$vbTq-h95{&oLqaHU{ zmwMq*t)h~RRxFfiwINZdROyoGO_efAY^kNK2~7}MI%u_^>7t7xCW}GVCEvJo+!qE+ z{YX^KQA(RyDN}1jDr{8>n-m31Gcu+f6sd<)Dq+wOFz5)GVVMxL%!pE`L@87m3brwj zt3X64Tvd>a@Ari}{mM@NY$@OEemV@6B~+Ll@vu(ay{B&1R_cMrZbTv5lLj+!Cq_D63zz|Hz(Ug!wiCa^mnZ@f>QWM# zQ3-X>vipD$IB7wa3Xl@dO(7<0Gt#95lj_luVaUla=T^^JP-VcK1ei4-$uQ&?6i@(3 z!Ac1@AFF3J7ac7LDNKkd zbp$C=L=>rS0HO&}k*mr?3wQ)Wg(V^d$J}W~Mp{q^pKT!>3epkKApnjFTiG1fqa%}% zkx9+_P}YEJMyfq(as=1L2n<$YO)GfjgyeHVay>wtj%-dqne#GCmT)G2)RL4cNlKR_ zrN@(4QY4M4DI;n@BWh?(VQ!OHS;rb_phoXYXyxSB%Tj7vFf}@qn&@Ipbf$r>?MbU5 z|Ed(x>e}e_Z7B6@uk}Yq`lBi>R(t(NGyhT1-|9MgEkw&jsF_z38T=Q@ivUv*UI`~Wb&!Tf5OrClE!4RwRR!1QS_Cy9X|$M8N|{10aq22O&&$x&cr zukbu__6N#~113RW8>soSYqHKP0?8u4EU0v)r_XuMK*k}^B-h#p1AU-*=yVA>2SARG z2e9xM9VMQJNoS$bR!t5u4u(&Cq3z+*QxNHy^g3pG!@^%_hFTpnH4cfEheXXoqGv$p znb0~WY8?hkL%pUU-qr2EXF%`ihFZ$yGn<3F{qeN6kwZ; zODS85>K@}$-T|6P4(+-D=zu-(#*ch*EAlYZ`1dt);1Uxjx8e*K4ymKx#5nggzuWN> zk8?m_?rPFK&9N`Y!J-)VD}T2_ogVCO4mMAHjqU!%_~7NL7*f?46t%y4Tcty~%7=BI zeJ$9pZiJ|1rd6bVTHRcxFzmPcekc)cYK&W(jt~ld0^iNwZ^B9N3-ZDNO7Flgl>iGR zeZ311x3dG=(3J-E%Chc{K#O}J_faGZdl~zB64*C&mihpDD?l4{qfUmDnf-A_bI@0>K9t^ac&H*gf*MFaVj@J*pi9QZx}quK)&PELm3o12Cp4A|z}|@uj1kp!l{=L~kE@ zTB9{s{ZZ;uV0@BQ;RkI|mThBepu(09?sT zHC&aid;<%Mkz^mKt5+qn0hBTEP;#(H${6-IvKaVidBj-^d@e5F$ztT9nCFa09!*sY zPVkBt`1D64{J4fm@Sx_g*^;MO977o$aSUWG%?+$BDZtAg;EzNyep>#?`a6n#W%&$z zG#|?Z{X-w0^$dIx59x;b$@;>kPiTWptV7~x{UMKzz=kpOt==`sfed5R7vk%WCY~sU zCo-l_wGUY^T%Sl|?^xhD$qxZTctlWd2*E@#H;a5W-cG{nxeR?0h+<8lv73nmcogJ3 z0Z|RxD0l^!El6T#dJx|{n6h(lEQNxIZruXFQt@DCZaw=nq8q6|d+NL%`{be15!Wgk@8CVEK0UeGA8C7WLD{>|bNd1tm*{9^*CHF_rQp5R z^e`pw2WJD34fZbZNWX7D^;Hnv=w64;+rj^VL@_<9!I{)BVQ@BsGCiQo{R|jixe(Ye z)`9}$Z-x+If@AS}T$ky4JX&}yTtRxzsgx2=9 zfTdO+*+FP6+9)%Rri}#CXkrX5#ERh4B3iV-Wv>bAG^PVKoH#F1knPu4dca*_=}xVL zOD!pblcg|Qpr$ac3yNK4D-%j!uC@8)%mc))?l{Rcsbn!V9A|{MdDGn7_UiEkBEzo` z9t3i5fYW;pX@530{)+&7kU*adV&;G!0g}%kh*vM04R{7b*W%dKhCEmby>bb0mmrmS zO%I`53QID#aX0Tp)4deR6H>Dsmmh9JmoIqqm>3oLr)+R#( zfE&vs$Y5aBO#hzoSyIuUBT%+fof-noSb-SI2Ke0-K;Iwe(jsa!izpgaCWr?fQ3wp$ zA@wBC`IHE1)dCu_fely)5X&}bVT_s>S!l1le9*wlpgddIp@us&FtmU}E!r#ZqzVcy zO<=cxLn0Gazxl&y(*C8iG62fCCdw_O*+v`;0%S90$;66~f_XRJsWqcjX_5(Wux zX2HX0zV@geV>W{FE5h)UR2S^tf$+AIfAI4=AF8K^9#f!7RD(BqG!7t0t|d{!xLcHLwIEqnX-=e=|^^6j)grP7@0?L z=rP4`Vl`3=>Ce`9#!*867n$MLJVP-uiPR9px=6V44Bn4fv0gNDg8pK<=ZI!hM?AS2 zXNYEOqdZtIG9R966Ml^8cwS(R7nov`$TG?ytPWGe6thh64As%RK(fj-641uTevPaL zOz{kX5TLwgo^zOT^iayC9s;ic;4R)<2Qtfm;~01gN=Ja^Z*UUC_W>-i;5#=S1DSh( zmR%ZYSPyU#&F%tOW595tJO?+amg61+nPb3po;(LK$AIWucn)AO;5tT+0nOCQVUL%x z$IHk1V%gby%Nj(>L63k9-ta4SJ^(r~@Bx~e#If)Jm%IwnQRj}0B5xBz;6XHe0B>X9 z0MvW{Rqq0?d%&u_;8pK<6;?g~C2{ZpRz3h>9Sj%v^(FoYT_50r+W!O(H|X_i{1A=@ z!H2eK`jPN-&6)lPDLvrTC%hV~qj^>&B zP&l{7D_T*)jqn9m7Ws*lr?fWO9>q<*779ElH$8)SCTaj+mz3 zj)Y+;;Hp{E64b->7N!vpw{Ib(DTG-GOzO9v-+*FP)M|aiO_`LZ8$<;=s<@{`R}|>J zz*D_o{Z8txDbZE(o#%I4N1K-sRVDK0vYxJbtBaVb*hFhq=Y;C5ghl^ucuuWs*Ac;* zvF{wcGE0=d338bC9I(Z(>?pP!m##U*TG&XtNOPMgVKRI}opK0stniMDYDU5Wx;%6J zMK*F|;EXRMYfVyHIwQbm8#y6+Wp<;xEL`M7$R5`%CE`~(5uh>gA|@&1 zwWCYKa}@!JBt8TVl}Es+7QeJb1YPxlplKP3|91P}wXpwf$bYFYKY^c{`~_D^1TkCu6&S)rEO80rt$9d6vyy&aE=&Cxw zAo?{uxV%i1Op-zNuL1T*AM$A~6hsxa$jjURA32BfI4@j(pB(16 z&*R|5`56J6c%rk98Sn8lQ~XV8{}Wz6#MicQ;)L%Wp*zQ@yT_^B zE0MYtDO!;Ol&nc<6w4j)(_%=#AbwARXhPHl#qs0Ph_UyTz#^IH3e* z6cKleP@Uq`t2m${XA}{4iq#MyT5RGuI=&;D*TiyZyhNs(#7Z=B9AeGAG}CNPR&DYx zHjrY?xiuVyPn$}r&AByMw=1mMlR9mQoir(m%>Z6`p&LBeU&=HEGp2%oRBZDl8#;NW z!j02mO?22!x@;!hH$)vbLvEUBNZbG?nvhzJapz58`KFC2QKBopLfMZYZ9KtJ9(6Iw zI_BRvBhe1)KRG0aoSdJWGCNKherdx>bm305Vhe#aVhfFQ;ZHhEB`PE^@kE9>G?0Zl zNJpkjB`PKeugTSFqF|b+m?RYw1ly#<+obw>={}UWp4zSj?|1}Zc1sFCPs(gZN&mz(NxY{yyGvx2hx#5SAu+Tr@ zHW$DR&pkEIJvyhyl0U_8_liRAfqV#kdO|$ffRBTB!i)F9*IGZb_rkx?&Bx{jB>X^c zsocsq?q!0bkP~eC`+?=$$|pxNm>lOrB^>PfTmJrpZ#vGutvaKT2nyHr$mB%zoL)K! zI_L75=klIL{;?ZCHsBGr+d|?}+P}8wx&uHxGh+^;Y!vpyxe>MlZf&WmHo*5lW6#mH z3VUrOdu;^~wgawhsr0GC`P(R=c5&&OB?N7#y|TA>FrL{@xD8EDvxJAu11B?S$Z&Wp zPnssU4^O$9NpK#L;5|V;&S*G1Nl&&BGi>7SY?K@aLg|^m-)z_iY}$6s{ONQMjkW?) zO6LCAvYi9P9j6-(+e*IMN*injPHn0VZK>LAusC+w3Qe{HT-#Gz+fwdrstLBhC^py% zOxsi(+fvgu)dbRCS?MK@%-T)N+Jl+31lgecHfR#&WWLFc9g|y)E12Ob*bp7FvO2_A zWD1N$4mUEwJ^KB4d-A5lQ2v0P9Z;}W3<-4Gj*0^IL@(LXWi?l3vdF>Bp&mK{LdnB? z@rdmpv>gp(duLaz(!_i4@rdrWZdi`*p+R5L#CH+kUHK)`IaVOQr$L^G;OQNOHTR%# z!$%ch*)*la|$mqYgGC*@94i zFi7q8tq3$PC!vMFY*KR(oMyq;;0WJx{A87C^OIKvfQts)v4wZ3YYq1yd4?7|cH6fP z#Kb^+-DpiaV602X705q89c7&{+=2Z8O2AV!evVxOwDwXRxMn^g5LR|zKVTGV5YVsS zDL}!%?}7OQsIUlhwg^jFv<~18)&Ux~4w11Ml47uAfsiW@L5lIDu7xL&`qZ2m{-*|N zlY!u#sP}*|Nr4*qO$;#_0xu?!SWE(F6S`dyi~uldP(Z(+3;JE&VZrsSRF@fU>F9TZ zP`)ft-nC?mBLTZ5*H^?3^cAQWJ%RP{0r-^cj`o|uA{?q1g@tCR(->eaVu z#)tIvHr9T}vcx%KDPq}TKC#|a39av0U5W<916#SJM(IL2Ud0HfL&%{CsBUyHB?}un z4NlE9f;nUcvo!11I>yeZvpczzHe_~{xk%h(Xac#eJ0k5PYa_dn5eQaw^?TJBBLI<6 zWMHx*e2NnaHNvCtp*$%C3Rc3Xu%hfNiwobcbRuZA?!uLjqNFPm3Ms;i@T^P^b_7;| zg~0FNLiidS3jzmgxc3mReM>MZ5UvxWftr1_eHuQEpJ(s77u^f!!u!5`P@YCNm}Rcv znyL%Pyz(PFzwWccsRrW4IM@xPOK$bH-qRGai;TV2SM_;-uO1cGD+Nnys>s3jqNmlBrS19(>d5R)Bj-5xMq6HSEMORUSlw!n~ zwY2tfsj5p*a@3rk1+h_SK3kzJ(U$Q`NOF_-q+lf}lG+J(d=kBFB&9N10#mH=-GqfODOu;@s_6VwTI1en4|!7+fAKnauAoNGWeKs^8;pcwELdWyKrIZ?0; z+y*WJM*%1R+q#rpdA)UgLH@UnybiJ6rAJdLf~a!%DCKp4`osN9&ZhrUPl=nxAmUN+ zxN*I4>Tw=8np{RXaUNWy#<#~)#=W$swrgpBw+;w4)@^ax&9=X2({1}}SVF~Gh&INy znl!*PmzrUEMm;0W5xWVeg?vApBz_YA2+~fV78+m*Oy`*VjI>SYXF~HKo#Hln8PK}O zXLc`}DG<5<@tF&~49_1w7U{*9vDjup=NX-hdyve9zJ_OGYZ+|<7HC^!GjVOcw?u*I zZW$1_#z$h#)G{G!p^f4=!v4echEos57Ti4-UG9xtZ(X3fLv^2bvg-|~V?x(M8|>WK zv}zd8v&J_NfxAi`u!jnThmDoQv)Tn-7|^fAH`?0uwT%k>3~#eD%`s?WLbn*5i?FmY zAzPt|@%$AzPt|;^hg#)^GVwhdiR}<7_?<3VM#5FqbuDcVkWxz0C&YRyk4sUpPJJN? zUJr<+29xC~DE3m&f<~j}Sxe=VSKl1A1z&=AbfABOWtTW)Rz@!6dtZX`k9fwTXT`t+G$)h82|6<-L$9U_hGdBdAB!o&;8=p?Sb! zHDTUGQXnSJdmn*<_OV~;rNa*dDlq1F-j?6jv^qk*35wyqQ3$UPho~HyC5DMqjOPK@lS-@Y8kt2yMZsrUe(r=fLhQM+_?z0mw7|fz$43Bi zRWdN$d2D;;eXJvV_=Ir7LZURHeJD7?Ed*&0KAf2nk{?J*^n2jsiP9D76Ss@j22_~! zHh_14P#7G2qbp-=r+=tCgg;6#NPduwyA_8C=hgxbo#=_EjOEKBVF?@~X`Xpxjc&c4 zG~qcAkYxMFjX8O6=@HvsbG5bx9FZ7d=URyNoYE?E4rqBlGON7uMC5>kL6Q%Q5Rg)US0cN_ z00w|Dfo6hG5y&3oTiQ*7ECV<>$Rw}j>j7%zEbZ0;^&6ND*y=dITlypc07r`$4jeo^ zfZ^D=AIU_wU^!v`00{mBJ3-JO4UR4hkTGx)BY~ky^+^BAN9>0d2lQ|>2_g=R9yKMCJ6Wgum?m32s%HJ{#L!Z^S|I{lfN5&KYO3&)7&4mo(lO}Bk-h; z+>!dwKycy^tn=(RaR}plm-5U!SWmFw-6Qz%WXSxr@%Q2{gAWpXvx%1>yK4Xa|K+cb zuO7Ub^XxI!Ag|wVA74!R6UXnfJg4~NU+FKmmYq4zJLf5j61oAJBO%_F0M`TvYQQx-bFU*=D5`DONCoDf!TPs3=EkoauV z3J+;>7n0e$D`H5Ht&8--3|=oOBrA!|KbD}Y5PE7=wsBYtS*#tD7Cm73zkTc-3ne1Z zmf&VeMIh0qGynlER%wE$d;W(jq3!|@ouSm?c861&U^&rkla*t zuYre6ItlU(upa)i@i)W}K|d#N6+UtJk7@g{vq3ElnpAFGz2`FiFeWDi3{dHEHCj`7 zf;FMm!sIAiP)<)^Y*l?!sobXfcgPB#WAERAAm=Z0_5f$M+t>qXbx@SP-xkij4Kuex zlINwi+xs#K1_R^T|3RHQ+B5D{6@e%1)9M{`jMDR@AW#UH2V-YX;U5ZhxwA%%A=-Co z73si-FsluXfp_R0H1gJo(h3WOSfGbSt$bR<=rq%hPOksA|I$Ni?fY(BzpZ>)PvLpZ zhCVDJ0sw;w95pyp?jGAz2 z3b#94V6$zJkSWo2`~~tz#$a8X)wBM|pgB z1;5v`U`FA$RI;tf?8#$|pYC?Ki-&FbV?d1dWbDCmTIQDLfmPkNyI_`u)vSK8lo{3B z+?RPfk!*XiNo9S{mp2Fd9o5ga7J?T7QwMb>OBpQu3^_8^>bOK0a|sZ4aR+svZn2XZ zmH;5nZZHA*zOrBgkRt`}fCD;NuYIx11DZj+JCVmxo)bCLXMlB#Gqb=uBrXAR!HZLx zpC}ZenL&6IiGBAF*A#N}?)8F_klnzJI9x6U$xsalNqKy{)Ejbg0G&v(OZx(pKtR90A_6ae!#^#s^nfo~V+yQI}JYvg6cM&&U~ln z0AwkI0iL6v0Aoo|3i9iG%^BCs%dh#)B-i=?gS8j<6rB!4sd|$4_7lBg-v4zl$nen5 z|J*;Ntf%&7fgZjDJp6kSZ^n-#%_lxQSRDCtbWd2sURRKn>rpA{OrDQV6U(Ick*0br z)E$iCt8$W zskKe%IZ~>#SK5lIFDlbQ4QpgVllnvX1*8g)N=m5|B%_krLm43CQIq0B>9b63OxXqJ zHz^r~sE7%n(aw)Uu-Ei_zscyv|KsS%e*ox%e_nMWf=1fSujyE|`M2u?0cM!5IbZfRO}^hLjL*1QH8Q z1&AW%A}AuvLr`KkX;5I-AfTrf`XGz#ctQAB%t5+aMFhjKc!Q&BvI%j#0~~vv^rqwd z_n-vFPjCBNc*H0$eWQ(NWxvVmLNflHtuZ(MZD@mjd)A2C^D|lrm+{?iK-+@a-mSV@ zRS9juy&Fbb?Q{?cw|ZR4g9co@L66+%f?ixHK^HERK`$=`AeDF8oWxed&Tx9PNxv%W z)f}0&jhw|SSsa!Pc!Phpv1W1$>_{B_VO%I!CR+eA7Tl_T335-)Q7{_Hi zjK|TKI%DIXpkfl{6`02+9gJpa2&O){7DEutpaZ4+RU*h@aY*wq_2iXIMM)f{C#OfL zzawNunET}r%x#$kh9XRbS&88y(8o0)R$`t=F)_|dmN9CQ<`|YFcZ_z)9!5O*bH+0a zh?5koiHV6Xrb^%7k_=|hMwXp9F=_pET6E{dr%qzD>CB5xla*=Ga~7Z0t4^HQ0@#D7 zTw)Hb493Q}%t6(nF$Y)GId;(Lu?JBu#2rPMh&eR`Nqy9M7=x%uVh)jbF|v^$V^S{$ zH-x#1{FlejOq!z{T-{gDOpC1PX#k@Xw17h!X#m3cgychoLsd*~-WPR7Zq!$>OaLL(VSzn`R+=UzBMk%lj+NLh}!q;=2I-hMd> zgulV(;2C}~XQ)6*UMJ_RF?dcQT6PEe7?(s0u`Z9dJwj{n`6r)dCDApCbog%!P8bQy zP8|11>Ml^=`ilXTiX#te6h;$k6h}W&c}2)m&nU3cu|!~gu|#uEUQu9@3URPCF+^df z6zQSlVu->~DUZ{4D6kqze2}y;L}9rUq+u)N7C(N_%jlVrOus&E-=?)MDZ|tv|39_g za#|=0$J!(+aS92_eAEXDaT>&mMzsfZGet)wY6_9JJm~jaP{&LL6s4LO(@?{T|@!dr7Zp^%%5xs2E ze&)VS#SO{7JHbzmo5eD%Tna;7%D=G>~@q=Vd|3S02@#Au|a-XdZVxK=YmB$jP^OVlnj96vp%b5tf zuEw@^XnS)rf1~IRI4^PPD;A7z{BX_oU4?JGK0KA8RLQ2X>gfbGq*2{ZWo0XPU87-jy8E29dWy!dM^d2S=9B950 zVk4V?kwxQI;mMm4BG5xec@tAL@6jRJxG1Tp3TmV(AZes$2kBqm4lb*Tt}`p>wL{c$ zrlPz6CSq%DVBN*VxUGXLHL%KgxW@joTQ~$i1qY*G+G;K}%cd|1HuHw1aZF0ef=Dj9 z@(|PC6tOQI9A(UFP(5DKrvxHvn5n?=q=}E;t!xYYd@HApMVv5R%N;Qd5H?r^eSW#q zJNQ^5@8Mwn@oqXpIO#mcN%lHn$4-<~gx1Lki36H4ogUuv1$bK_^oCXKu>|UExhX;| z=4EPh<;dP|lcOVPk%ONipl^(giOU?v3Jj>yfGRYcWk!+6sM0ekH0?@_KC+`p_=wXw zbVX!raWLbZ>KjG`&*q;|2)cs9?szidA?y7f{ZShG!{GYdI; z7yG1JFs5{Lc;OJ`^brw^gu&Y4EL!>bAO0hvKbdsYJhtCZ^7P1d__TN;GCmG!jzjbr ze~|K4@Q*Xv9%|~$3WF~ $)*$PqXnI`Dx6H^>%8=WhJm03?IcDv zNPOf~3XW5Ijj?EJ-trU`06SO4#!*+b#`dE1&b&&HdDaeds16gIzXp8zme zpO{niOH<}2xF?Q&CTvxYL&r8+B+%!0G&wm94sBCIkgKoF+TjkSML|^m%K%rTXCuD_S`mKU zxOr*Fs$Vn$1!%u!TmiXJ)}*R`xQ*+8C#FSSb7-Mh`3M9$UNda+G$cW4&aRfiz7gVh*k2X3anF5?5X_^ehT}RD;HQ1TkBK3kt2#mpRGr8y|9f&T(}I80T#;CQ%DJf zb1r2!E!+}A2hx?AkgCr=ae;Qt>PN}4mw1`7GKskhXXYr| zK^n_mhm?!2H7)CRUOM)H%|bm5^}Ntppv_j*272*oSF3Kn8W8AYGmTbVHS0>2X`xqo zvDTWe^%|{Zeyg;kQCwAZC?3>(K%E`616KCA($-r@`d3xXw)B6kZ4Z=W6`)lQLz)fK zRc+f@9k91A+Av?VsjftlzK04e*6l~#M6ytl?Ij6MJU)g=@Ssn@ zQ?^P4_6ceD?t$`#O_gjHg$h$8CmJgL4&ha;@tWDk+bdDFo!u^|tFm+cMB z{EB2eUtr=vc%G0-Mb5Av zoe~a6BRjd@E!uzOHSA4_-MP)z@=5t)oR>&7grZ*_=?GjRxfG5jKuKEYZ=yFFMjs9+ z!&r0L`3vNIT1etS?pCbJRLy|Sy9hUM)p2FH>7f%MPSG1i7bmrHa!e|D3E;L2bPaw+ zKrEFP$68JWs;0p7pX3^zd8lo?+>`D?28o@NWaKgqNRuEEKo?i{t+9q~eLXlkP!sdz z1V`JF2P?%ON_4b!Tgglme=t0w?RWIa7LEY1Sy6CVx1;hw*nQ&Ut?$KCw>{5xm|f>PN2xIVT)hImW#1)L}JMNbT?n~ba~D* zAC55R%xTn+Mss!1;;=gNyfOby#=FT);_IdgKT5X}5fxHj^l9j1ZIe^vX&u@36m7ok z@i+Je|HfTk9Xd!#N0ir*2Gt%KEo4Bk+Rb0Y%$M-n>YOA0)Y#xbxXQ|qh}@t_(M1vHk~Fr0K9&M#1M(dIG->`!6+WS_ALLh^%0w9&q+N7xATz$2^IhaknCXVD=jiq1 z?%UQy2plM?*>py1)}uW3OQ>>m{gGE(~m!$JZ#j$~7ndLIPjxy$3=Ni3=fC8!m(- z(7dSiog|N0iwEd(SRZh>4eETwJSo$pSuAm73b9!j6WV6p1zYxZv^q`W5v zR4sl;DYnO-OZ2|v43-4nk*5+W>j^R4!ysPzcZhfVl#$fq%*s9gC#^Opr*N zD3QdG^pk*vOoz;YU`CXL6prBuQVtOv$qF(6GA~47L=vQQhz3Zg$T-OF5mF;tBfcCA z9|$_UJ*GJ#KJa@?bx3!>eQneS4zCYu4h)VLjF64I4XYSU80j0n8@w=>GAS4Y4SgE8 zHuO<2UJz1MlC*%8)MCB=6Dp;?f{wm=KuET*pdh_QM_GYe)-9}2gj?KOL|(9ffRz}4 z>`w4%;KA5n*kXWvkniB%F#7?5!RsNML5d;c1J(j0!t8~i3y%mHgfav}2mpmggmneN z2nq#N1V#jx2w;R3f)|5R1q1_sf&znV1TllHf^`Cm2MYyW1UCmb4nhqa5r7ng5)=@O z6f^V*owMB#AP^`ORe+*}42Dvy2F~!F-9cpN&?x{g?+>o*3zQC63iurcNJNH=f4^!1 zhyh*Xm=*za06qgW4loF49C!pU2(Std59V|LQ=_*?_Ita^=>yag(qpd+Ar3+B4^7>H zZ*x7#_OSSTtl9rH<>&Pp6Y@h2hNG_887m`C<9c1(vb!X6<;3EJghFS`> z*y+U27m{-$pU`0a;bp-530<$CXq%iHAQvD!h}m>xo$$1d-cog*L>`I)Bv;-Vc(~UT zU<2WS#FrNysw#f|1d?LFe?+h^mn;v9sHcp8d&|{PU{sSAhY&-_&>wgaB)5UYA40VW zRiHTHBUJ==p;iS@k|@M0EA#h2jyljEYmg4YK?W6|GMTY@Uc*2-%lftP!g?rY78Ldj zsr36cQ<;kh3K(lq=3^`!I4}uC4?P%RDILTP7S2Xqil_|ly9U7+3!A_cZmbD-Od~ZQ z9S^YTl|q4)JSV8G%2K>JT5^UY!Ou+I)q-kjghF$LbyX;bM&|0)P!bZu4diruC+i^~ zeZ>W?F5R1e08myz(BI9yrg#84GMWO0%n)+vK=I;vi;Lha4?}VwJ4-5);POx#XmR1d zh^GUiN8p3FYSgXxGz%So8bD`D>~m1` zsb>{;(_tD!uto{d04BI21vx>&E%;htk>n)I!uS|(C$%*fS_S<`sRw~cEew8~Qg6y2 zhqIbM9BP(s6J<>$r`S&FNpE?3Wr1!8eEO+*3jXc3%(njPDwVOHA< zYrK1db+;$sYa1G(+a^3$EfHR36Km31I;&Q?TH;8*_4-taP3f0ufNW^$&-c zelN9jExi6M2NbsK7UArgD;J`8?x_C#@VE;F#ml7!naHvW?#>+dnq9oaCX$L(qw4%# z1%rZ|Pw7PLLMP`cz31kWt-(o>fk?i^!XRnbKAWmNU|Wgu=5K{@Dw!Wb613G&`Afok zXgjBoh({Bp=DmRmq-iX!vsI1U2HDV@Lr^B3yCr;^>6@uLOwpi#MMx%R=x*W;I%k4B zvy*f?e?$v?&VZmGaxQe#%D7eAZ*A>_4enTQEnu&RIjgu)L#<=oN|;@wir@nBepJk& zo$wR<2Y|oK;B*W8#{$$N_jnTmJafR#{o;Lt=jRAEAHLm7VU6p<9fH%V%>_T>qgoOV!|ll_z?WAaf#W+z!FOup$L^Hv691TEH+ zvd_7|#+U4ZCCI@CAK>c6124~dZ2}kz@INGM$J!%!$lEQj)PthXa8zz5*l+D~d2AFZ zEWcI;8P5s8w}=hNDL;1)AGrQseGKOKj=>tDk?{>!6ZY36U~$-DZZBBRRaPo&)=-x2 z=#zpTCRFTGP>;pn$(XAH?~UN0kvgs1h>saa5^sX12*BEzOEwI%6S!fFRD?*-3 zdmH9Xd<5DJF9F0~E-gtqCk?xU5ygh3YxuDw4j+F)rZ;SfaaQSYQd)`QU#eQ0kp|Hg z{IeXmj_L=bd+W5BVUnaXEW}F{lDCTY?2YF8tl^}kz`;#PQq9=N>^A{YP=XBn;I{5K zv2vy7i_y8jFq%Ft;Hs3h3}v&Q?djqmJ_~Ls-n^4dw7}rHhP_Q?fV()4p&HbxQVW_4 zyLb5*n$nyr(4z}#f=1Ei6Yv!&dk=>4vCFW=@sg8I{zDJj5DTy-#_XiXB-C=EJvvBM zI)3haMkJ|pkpa4=sTx?Dw0H*$-d%K&mo@sa!D$dubZB~>lejPwj27HCuHdhPMbS>w z(E(fkPZlf1GqB&b03&vB8!q<8cy-?hN)< zaAm4)#X@>c5pBnwIS$--7!Ym8jPbi0aJmp}$C!Zz+;|WR?Z=jybEX(DQ3$Y6F`AJH zFi~BuhtbP$RUIc02UKEbtZ=~G#{*QxCJ7aB4E|ZkV7JM`950g;950xFO&Bpd)*LT9 zu^cZvB-B)I1 zm0O1PGi)0HeuhY15e$&^e>4~L-uS&e)X7w@kK5ZMCx9?r-hCd!kjC~Ik8U{hDT89z z#VnphU`y}f_cJs;siTVdGA$zgjNP_CkE;DDTeYBNfEisT$;6Az?~6EWh)npf{ptz# z79`2!n7$D(UTHW-lFlnMv%lOdiVm}>9!tztXkPf;kzDbI$ns3WbA84;bAl%}bAPy_ z$red=CpTbXbK1*rmnQ5)kPcK2#*z# z(#Z-kmkZP6m|u5<{wd6~@j(a~cz<8jC*l}9Ric_$K(Xy9R*NNyD};p!D82FdZ}-5J zDV3q9sonaJ<39Go10MzAIBq|im`q+gfEi3S0gzz3dtmHIboXDdvNRE)GV)CrFY#sP z?>6dDCo;ku3z&)rptpKLBw%48zeO~KixvX_Kwp{kK$!g|y%O%Of@%F(e;f0@hjlL&nC|9L`DJ(@wiiJXA zIYZ#87sgm9&dXx_T>z0ww?Q_oMmw3_iOm)c{&^}}OefiftjExu0}T7-P^hcR7^+i; zL3naj3=*kqN^RqC?9ahND}0&9Ld)SaxsI7Z6YWMbJ#>f%~2E$ke3zRr1O3KaHsWM z^b-K^_~G)0?}uExf|157@{)xNoKdq`(0ID9FH6ILhHPSkQ&@=&;AX+jpZka5Dmlng zg|=)$#iFar7s(zoj|Yt7om&K0JgZTKyafVt4RD2%n?d7!uv$Zamwv#i32c<-$2=XwTOo^Bc11tV|gWbjNC}pPNX9=QZGC6srX{m zreqa`h|Z>BA2xOs$r@qvT5(*Jh(2zNyA+Ls=83U&Y0j_|KlAZKjNvlYplB$O1S0yB z#9`-_!Cz#uQ6m77@u%f3SGG+L->{$$6jN2 zO9e4?&Fx#gd90UYoCXHtnn%J@(fx@z0xOcVi>a_2;l%nlgHVV*Xrk+$irg}g`Jy19 zyx{abws>c~8^AJBr?Mo8Y}7RuD6shZVH2r$NQ&DOR;h2Vs5JRcaidrPgMxcpO}n$O zvEkpsHioB)?>sB$aP2$T(Xmqz-+yLxnfi4N6_m8i37CWCu!F#l(!KO}LTr|mLuf}@ zqpW%|H;-9j)mg<%8*~H8l!QCPJ+tHLW(RTxv`^Ld%BkVYYcS7 z2`9;tmtzfkwnRl6IXXe_>+eQlig9AdV*H(N79!Tfd| zOeCQI8QGbauCT46F-?^f3MGbT14U|Yrno`UVW2-3W&;FIV~gp8F?gb11@}ztu<&^l z$i$dP!T@;3Q%q(_BN>q+A%7HnJWdTtP3BMnUPhS4d5SYIcr9|kMxWwe`fau^E^a71 zg}jb7jkJt6h>j>r)MRm_c+vL^enLYFyV69+)wdrf05Ik@5gbxk4x6^0hZxS#iS%4e zNafLh6&FEK128dI1T;uX9JQJ>C=-g3?f}S~W8O4FL@T7pO}s0rG`=dG^f;rG#BNA>4QpQ##VjXi9O_UQf4TQaki-Lw9&d^e%Sf(73uF;~J^eIk*= z3mxko;yd<7@+P0f2bU5$Xl)GYe=-!$%$bnldC9sqY=XRLk}Ns%-GEtV>96=^F$DWS z1`oWF0)U8!h{92cTm*@)Uud<2h8Tqx%>Y|_(L*f!$qP6a z`V>ZMA*4nFF9vp#J1@!Sj)~%T6|6^j;)4qFm_HNSJ0`MX&8Qw?M9z|&nq+@vYtVp~ zq>fO(VWs!^qv6P1V$H%BAAI3+MU-wKwV4+{n%|=W50h`3fYY=QM|0M^+yrb{7P+z% z_V5j6p#n4ziNfzS89Ci#g9c&&We3Sx$HaLB8TTva{KyIZXzUR3R(>wU)Eh7ofVY9< zo`22T0Vm4O|1%V`%u#3wJvvAGX}A_h^XAbcxwwu#Z5T@yzC-~0XCB8MkpL;_(mvZG zM-VRdfHY?X#2?HW@g8QGnypM$uJlJ5bBZ+@HW~m!>lGY{ok_LdBA#FJTmR^48K#_2 zFu;ux8swoFs`3KFfY8S)M$Oq{#m}>o|!km6Vl*)winpswDywSr# z!PNQ0`=g9Z&4G!DkA6f}HM2HDJd&f1>K1{l6O3F#Bm)xbudW;lOnJ#4?I2%GpcxN8 z10{NNdVq2uVF4ol$blT3okYNep55z&N^JZdq0l-L^@H_P_8NjbV1!th}t}+egm$1$4t0Bjl!dO?I z&OpOI=r9L}P(RzC&gsN3P$gg~Wo+*kv8mpPE2qD0tDMVM{Pfx=AsHhznkxfL?UBr9 z>NaVMh*szog`G|)F$|ryS{w=JXqp-_Zx;RIAVfArBRk9Fs5{7s3Gvt}Iac*}@mzcX z1S9m$M-eIyV5Z<91Sp@1wd@>O*C4>+XH+*ruW7t4gKdP&Sx&`;EN1Arf1HO0zw=4A zgEHlae2f1EL9RGZbAvLIPtW`Z#n1P`Xtl!hOy;@C47Z~pXk3x}$%dI`e=;5n5(xnNA1}Fy!&1bebj~#F%!z%2K!^Jc3^xzGt9fqNRwVvrzgcbcL*=>%#U z_HY@SPGDBeLx>}-u#uYL7U>;2?(8Yj$EaukA@}?N2aWbw1jt+nB@Ib8^cTz~5_;g! z4Gyg#Ugjs%Nd-)Ra75rQo|&E{nuRbQcAP8$2e2R-O@bK6qB+>95;4w@O>d zz6G*qA;~7hori0R6SYznPRgmYsB4JVqmKHnPO=VA&&O^-|4vb9hQ^2+4PPISXpNU?6BAnbnE-50;$*w(jaT0SYCNBJWwR41uB2$`j4WYS|7 zdgPeJ%^UirlDm>h9aDPg@-XAMCyCWG6xfnh>Kj?uUhaciXTDc^nm!Ky_@7xN%5A(VYOxSP;qQMbKaAq2`IGNezguo_Z*g0T-pX251BHyufNB8(&l5lv1HOpm z5=JWCNCpG2K?_GsG6aZ2X5|vTg7gl$+gG(XQYEjTb<)|l#;{y`#?r;OWW!lYhPBt+ zwxk?G_AR;zwMGgmLMUHMvsrnU$qK9m z5DBB=z$En4&~qNH4FcUx#h4Mp0Q)NurDJ7{EQVMi2>@E1K=LG(IWTsZKq)OCaSEN( z+gaS+CN6%LcT_&pY?KdYK&fO%k+}Ld14X zw(a@K*_x)hrSRcE>up5U%!v0<>b_>rT>?k?rRu9Swhn3+!-WH-wJ@J>rD^*6sz^R5 z@Jhpd$?e&w$%a#)8??*eN2a@OIWgbDk4<*YntjFNQV9fW4Q`Sg`FjGlEb96XHjqmy zu+ip-O(jrozIaG`P;3&K@m96@GAdu-D;5rMNi>F8yx?2V`91$BiaKwN~-54#6+mS@IvyL-4fkE-jn#2< zG&DX$BaSGC>PJyaG<7QnH+w|lcqlYlRw0mhl4GMP2t*JknPwV3!FI`I^1_bpokx!k zt4>LvMv+Ut+@dAuIDkbr$>Xc(BuPI8<&C3t(h= zs-jlUGQj}xA)-K{?@Gjy&Y?Ewn}lbFBzdm#vxhm*635SR*^6#evO4gwta&8xx5#-J zc{0SR?G<%ydv*m7d3+7S!?(9;6Aw!ugduYd%h{9a4;P~fhDKK*s3C4?(=sy|f)k`O zyk^U|!|^Yz?6owsyM#V0=I7MptyfavyC}$;uw#g~OIGc9K`r%Lvr7qFTc1mk^L7V& z+m1^_h!-u|6aFO)kMcx>LxT$5+<81l&x$|;1>_%pL5)xlqXX6#{Eua5TN&kSFKr9U zq`HLxAU%{j0s@S8P@RZSF|v6tA%NO~yyo|Sc>D_^Ia^#Hc}~CDhtSSK`K=~15$J@m zQOyw$4=qmFhA5-w#uAZx_?yEzk$S%$QUx+M%CVlBZJM>L0Gy-)`r9oQ%6J9qVYFL) zU?0$<=(dN@aDp{#K#8;*DoPy7A!A5(DOAuJ61xdkW)0)H3HeMK??P@`HY20U3#}U* z1=hO`8qQgDsPj9Fy40ESP4nWAg3%15xU|xp{0m&fzyhd!TxU*$+LQBC{CYLc8mX?&05@vP=wygP;18Oq1W(|46ad7Mh#8ER9 z`B?{o_Xnj9;&|R7x&1q>S6>$QC(1KJLYp)zZdrdh`{4AjO?p0W%=lBdA?>?fDS$pE z{I+CSrCZ^gT@Zw#7Ckth1Sp;t0up>I?yHQLTsd#%rBm_1QSWR(n9!-BZ!At1z~i9Q z?xrEfFXs|)#?ix&*CNd!)^RTivH?`4ZzMV^L^qB^s5&oB#2eUj6C2$qK$nQh6v>15 zkHJnEzsVOZR)OW*K6{nUVCFuRCRfy%UtIltaZZANu?C}}4IIE7N~R#x>|F)y=p{c8 zZ|q^bG3*FZ&8#qLTsw%E-RhQ$dN_pean7>k+<0EzoRa{D>71q=i}o9Cj2MGPoI%Lt z=Hw+G5O3MYNL3JONj{T}4nkGfgLv$MdoPBtSeL=w*JC5PDvwLJ(tz=Bn-TSjJlu=c z`mKR<@bY1?pgp*Jjg>;W*0Gh(Pcae<(At3brUN(@#C0K@4hFL(N+e#}B{ zOhSFHhM%A5UAv^$*EK7BZMmW7r9lC2N9z2yf2zwM<6@YTD-;)DK+3||BR1i%m!7l1 z^&9Xu`Q)Zq9SHF-W;D6Zn{Am!GfB9~+ymj#%z{I}I$j?E{L%DVTN3m)2knoHLQE%v zT@MD0I(=5cy=<6w_fo*6ki_1$73*&M5S~lHsulr1hl5Yy?cf56;oQ+L}Dq6i)93JVQ%=_IsvfF1`JL_>SAwe`@DCUocfoWcv;FcttWk@A`6iAE<&@sOf z#{-jU!pe(yHJ&4`!Q&U2QY{)e48kcDlK?6!`di*`u4x7IEpXwdC^(CwLea7$+#=!A zwAIa_mZ|LRvvF@~KM4jK`dDK$5j_2YQ}6H_6@vi3F%@ovq;Wtia$5O_0m`h8fDye3 z%k|AFE|6g~bmgJ)`6&BV7r=;0@xvZ?G(fTPb`i6^pikhiB@uWxx}+x5@M)TtaG`4Y z`6*bkz8anlBNE%Pq|SX($r`Cy*?bhd8z>PSD-*%KGF`>$DG9i|8&D!LR4)dhv3n4U zArQi1csKMwIIK;Eqm+cAEryeW+vh_$d5vh38C^acYTgo|Wn=E*wBrz7l|AMgwKI!4 zNC$jTTLdz+hOqjO%v}x^b%`D%uwbhF}!6{L{@d&n@Kx3vN*d1}y`ixYwMl*)bOr-_0l;c~0>EhNxvedtYh z0fJ_VTa1P(1&3)&CXQOxk3nFR^#yhfS1lEhUQ^|_br0a&+XE}sty5`T$kKscMOI@H zJ&Y+*cZ*RAV(YTQ-ZnY`?hq7X*&MobWOEjN4aI|gB@ocoaV-l{pezt84eB|>ru9P# zPlYkeHIQ5&W^-AjEK4O=vC8thp&BWj8T#W3oN1<_+1$1G2*6GdHEhmi2Lce|Q5pch z{b@N~)!*7KehsG3bezfhtfqa$(hB@(mwRl0)zX&|Rz@XnBlw;qvltW)Z-qt&;b)1D z9O+IP0zx)I`Wr)IaeH826^uyjKdRv@DgiEb8+${E;g*LJ;34`|q|MiyOQ;6VjSDV` zVqkBFp2nG%gG-rs{eH!{xfSr;1>mOZ z`Jt$E5!GN`?2nLcTF${@8c+4wE;jEtBJu7a%s#5oH>T`MO($DnT#zWUY=}v{09tWS zE+A%ra0>rZa3!cI!MHpBDai#{pSIe&ybz*?z+FFpghaA^EikD1s0~{!Wz`hfEGKEo zg*wf-BZ>XNntYQqC?JV6!14lu4%Ri$NT;2p-AGHdz|>qQApqZ8W9vN}Li%_TAPU)p zOgvmO?J7iigr*ZG zn*>cBCeB4IMDVry!H|5ki=U_EBWY9<^0TNHw0xOF0Ax*~m|`dyV@2q?sSFsB*Ch&K z8}rb@M_hzt3h1m@)Xtc`FKN-c%3de|TB+o*-*17W;t_|dmcrwKq9sq1Fn8t9Jtrz; zgh0>D3>@Q_8j|`LImbRyU5H)O7tq1ZIh9Z;lyEe*26yZ*t=lG2>Z)}H_83;}ztkVt zVOzF4C@*1!ZrGZj-p+d6u_I?#N&|Rrr4P z;5iNbJjUe#EDs<+jvXs+MYumz>n9TeMrFcIq6 zA$;coAQNNlFnJ(lB3U*>VIf@hx;upDLZ0*F{+F-GF!@nzK#_v*5U2?xvl3o9BX6&r z{0`^(&qyCG{Bl17wC94GfB-TTa}94>E-Aq=(4)10hR997;@yRU3GgB|;h>B#_}}^n^om1=-^lW-n;4x*HbNqloSNWHX2e+DLGgT9EkVL z4uA;$S_K#Z+T0t22pL9%!D%jcs4Czjh50guXGxUe>Sb_&k_sm*Xnz?(SjfJPJ=CVS z21j%!2zg99m&?G2AqCmTrW*QG+nq;0u7_77T#cI42eeSOZhPLR75`V(WbV zXH0{s!N9=>z!AO&E5E~Qy^Fy?#ODpIVwv25iY((fP#b`BWJ3}9WP2AR=^A|@D}IXl`S8HXh%9QY(o z%5g=OPCQd`yvkbu3ScOhVjf*H?wHuapU@yvW&=Rv!>PwXKn8G18}a9CdBtJYx+~L9 z=)rUi&5%fuE7ib3tT-E z$kGXhkO?EqS6k~?w~k5>*j$jgAvC7JomuFD6)L+q6t&J75=9)W#oBNww|b zJrIP7C;t@CM^*^=-W(VUC3WJUNV>@UDe9AR7XBHW-_9nC46~S&Gq4E2LWRyT6W01K zuMjYiNg*tUg9A~d#k}}MSY1C8#+L)*0nJ7=kh_m37Q{z(v|EueSnPFQ=lCzN^ zV9_b}%0eV1Wsgjg?2p;-kqW`DgW)EM!MCbC#i<`JqB1Py{P?AuuxJGEPw`;eej1fB z!KXBO^*DG^GFUg^0tW}Y1RxFZBq62ZF%oQ`W6ig1c~dIKRd_KN01If<1^Dg5cXp5w z znS!tIu8tKUn=S+ihV*Di6M4DNP8ls${Nqxt7hL6LVe_sL$|X?@>vad3lzDsmIfKnt zh@g>5as#>G!nIc=E;q6mgS~x_jSMwsCquy|>cOJ_Vu+m!27uRfe4$fu|J4W#V?>$2 zVz=-w{T?seMI6H#SKNr07|w8Tq&uR-hY~%tdWBLLgNP!4|4sN{uE2@*a%2wflLV+4 z698%`FDJ)D$zG0;Dv$<^3^NEu6==zu7AZjjvJ`f`X4X^Te;AvTM*)=y>9j{u7Fq{q z(W{PYzPyhN2U5OyHXlJJD8+erc?0o-RQ^GTgM~`+)0^jC5C((#9q6S`1l9_Mk41Tw zED?@g7J++9&O?&Xt0Lw0lmu4z(>dW^F6N+@X*mwvHVk@9aaX`-O2(fd!}2Sad{}FPA07XE$zYyi&7u4iP zV39C^z4+T@$Q1&?a>B9eAl?NTU^W)pAxF30ep1<0T3;38D~L)JxQtt@2CGY8)O;_{L zrG9>Z@#UH8IUxrRgYGA*TMEAwOkRWf9=J!AFlCV3^WdY+fCtHdQ3|Z&=B+co6!H93 z&AnlQMD1tq61xKAnMlA1$Tel6=^#Ar0I$&p)>%Mq8O7j3Q&b~1Yz#`6U!u?zrpQFI zpQC4j)GkuW^Qu$i2MrmD7r=f{_KL#gY4IXvJ#GOfJWS+(wc#TNz!bWc5O~lLF1+H{ zx+^(QX7LWrND5-ThGXa`+=32EV?J5n8!E79y;`d^Fvb{xC>#-+FJ&NNw%Cq@tvsbyC6z-#$A>2)#p;h%9O9^#M~*JWq%1FZ zn^t1raFvcfWKBsKz(U}d7+up^>8xwv%BxD02Jc=A9Bd-WzzKtv;|O#)icXu8=gwr; zeK>VHU9JKAW1mdeEpsRn1uE4CRfZd z@;||#F}z71#BmzZ8?um~ixxnW_`HF$MY20Of|y}v6If$A=LQ-54sEegXkik+Po@_# z-<0zS=2bvSrBDzS(2Z$^zLB|9c?Et35JFanW-kjN}vNS{_V zOF{U2offqXh4RiJTVe6I6@?kz!iG#IZUh*nn`7t}Y{mqsq@r1FH&(7`*fw*_1`(I6 zY9B~RBV1%S58N!>&mIQ#Y5zy~-emH{kh^mBNWt$U6Q~Srj6C^Gcvu)1KokV$hCXsF zNziy@Ly#0)13*lNk?5MStI=`^p+!q!bC>nYx2_$%V8@Hy85OpKP&5(xV5k~zQ=p$u z7uUdwIqjivqj{wK{$;^NO-qcCa)IzVbm5Cf4-_}aIoG6}grtTYP(KI<^jlO7?BmXk zdmK&@miw$xw^SajN(R59(nqxDN`9bewCQ`eHA`Vv5%z}^4P7B}<2lsMKTK;n^{Wm- zW^oL8MWxPllxg)seLSEa-gt^?!k}*uNV|}VTO!c5vn0KWfK#WsHiXxcNzq)K-|Yg1mAh1O;n}wjOe%9D>%@@2v{+c@#+l1 zDZwYy?d5^&B#Ea186@3QgM=0p9C|@fDBc2SDXPTr^k-_}$RX;>{yh;i*Gt6D1)F3* z%ig6ZkdBZ8@Jf=_QL)U;bzq^<4fxkE1N zhr%FQbD=h*!(dLAxT2?QM@%#U@>3=nYPT>$0+Z3vNWn1PegTBhNHipLy*nya&te_u zCV>IGCWnCnuB{I+aC#I)Mh!37iJ}Y2sGvBpCWTbcOr5INVenkDrRkkgwjZQ$vP#66 z)hlC7lbm9$A2$kHq)i2_6m=!g1|pt~w6G%&VUaX9AS9yz9%C^X3S9>pyk#D5j@e_b zs4clDVGGbKAf3FM87>n+F@vW!SX{6!oZVsM2qxglf@>K4dLfN;z)eDn<$|!l2HPHH z^l*W`g|vhm%eh4Z+6UBQK=w6=#AJb>;~?18O^qNJI%mP8Zm>?oY@jEK8iv7%b210$ zn&ttC#{{S`7+^^X)1~*5rS0>`B<32BZ+X|s_eb?D0&;_)Cb~hOVbGS!L8lTO!sOl7 zXzIlQx-n97gf{G)GpnZ=8U6z#Mv!a#;7G!dYlw$&T;~hlnxky*z+|Nn4KyRrPZ`4q zi2&YngOsrV(+R@&>uMIj^vD@BEGL#=*RBBQiFNppx0LL)o2}mwh=KZphP!0XJ(p@r}4wEILgJObq2nD#$z%_*tKlvxdxF9 z+BW%C&rV~HRL0pEOvkpZod+&MVIfihtg1baavLvyT7|Qzu}i7}quir%lRz}ak5xOH z6orrt&o((q5Dh1q2{%v;2bvU{NCw^S>ex@yZ$0h`OBUIK?r;jFb+dDw9d+4B;M+d9 z=VyvUSAoJ#N>LdX6l{}x~FGUohZY7mKqE0NWALn-E9$K!T)70Eu;lF|Z3MHP~wp|3eb5&lwa z`lzd^)uzjjoJ4KYhuS=^S}@E)$grTofReI+lWI+~96SgQfq(aMR>DoKfNP1O`)kS$N2mtu*ET#bs9O`*%*3!M zIGPlN5DmM;7)f*kevKEuexYppGeHpz=s_YfxLy$uek>D)@i|4}RuyGl!66C6L|($p zbzY6!&So|Bl*(`Vf06as&V+G9_9r`BAwXy@qv)GpdjWV zDc$(f>_LoYz~&FL@#RcAc-BCYb$-%KxDud!)sLzfPsRYGnPJl<3yb^6J6);lXwPxs zv`v$7*pXHIwW3jmFe|^TEeQ?ZU6u;~ftec!-QarK6kAi5f96SeF3vw9Y~VQ>z*DVs zHxA4!6pB|FcORqTQ9r@=KUoPLhk>SorWHADX#IK zql@Oo?%l*|dR?|P5jkDrx^>W+CU;eWzEN9U(h0i3jyhod&(>dt7CtD2FP7%Gy3K$R zNFY>e?U*l{4*RsvK6Ky}rA%;yL6bf=i6~pe%TpObAR)K42B>Z!4=@|{ zN|dwfAF)ALSVD+Nd&MJPU^CF%dIq~1o4)noY=tRJRv|FFbUZIjzXy&wJ$%_MpnEf z5)>~eUuPF4<U!sN48l4eJAxFn**w}J7aMj+Sl+MGj2 zK2qZmj1G3a(GZRu6`vj3pgG!*y&tn_JeDTt8ds4`9x^XV{UOjOQ=mjwO;rkq6OA_k z8w?b&TD;~sZNF2g(FaEcnxR$zG|d6f`S6XMgTy~xqj`i&5FZ8Yk;h(Iq;ck=<86`4 zmQ|zQ%977;h@~U|8Tu_s(Jys%4vvRcTmFBpb>wLhY&d=K@i$m|mXTnT(e7Mzs4Aqm zgG{wm$qC0mP$o{{=bMJZ2uM2*fX^dKFDOuDBasyP3fw%rb_rR?(6G%oaF4fc1*-uI zkQC&O7&cr>`l$lWMJq?(Hz8d}XbA80U|KSVHU|LPK$q3Wxb4pwCyhKp@Ubgrh6$in&fUj49_6l?8+Ypwa( z7fZneSNCY{9S)y}M)2VqQ>i6eOgf15p>`y^L$pdgIv!0a2R;%qV7rBa5*a(T3SDGD zRiy5DvxHD}4~d@C&c`;pd!DO72tRhroXkzn&`C)!y>%5;#Mz z0jtHNi}zgGS9qJOL-@S0Ff9~eeeEgR9750|NWmv0Kekpk=}5eeXd8E-sJdNDz;_uM zFx}Q5^HHn@8;mR%?aPMOE*FB-)X=?)%tP(rd<@Jg)9KJhh>MPO4o#jj=6$>6Mu+8z zaC$u@g?WmQyDNDfEqRtFXUe$)7# z=pGqYzsA+Xy27?%efE|su0d$}qX}BvjzoV9SxFwPkpvka z`sw*9w&xfaG(f1dluV*J!FuMFSKsHg=Eox5&IAq*3nl5B=r1i7K3fi5=V$S!h5nrnd{a^|vF+Kawv8Z~t5B zssjSO+d<>@~60mk2A&*$8ijA zKHOG#%f14*>N6-hI8AMWT{=Av|XmlLTydRu7~Pk#?!V zMO*@6lzj@Ff(sS+6h1DE}p53hEmIRKtQwLI>2a~+5eP$w4tFd#^a z$-tFeUL-6UXaOxK!TU=zs?&`7d2B_3yduJdHl6DJfioCQLN>jDUfEOH&NUmrj2?UcKy_ucc}oyj8-ZIr8BdL?-cNJV_{<4&hXUkrvM$ zU!EW#W?#v_7TO3l%0&xr#JyN6djK&3>1Nh;0cP4D>~0M}7pSm8rMGdp;vz8FT2Imi zZQw|suVbSFnJ0?+MABt$YSBRs5n_(zDj2nit(G>=XtoRh-k}uTYLZ~_Qbd$n4kSh)2qA!1jh4ho%$Df0JXXy5^G2WK1!S8I zqcXSw!lg02B=1Wy!2t^9*~P~M72d0$B5+~`8_#I08ZRB5P74ZWYQno#U6OKm6eMM# zIViF>M%j#wl%}f|t@n`@Gz(Ycepl6zX=zdAuwDz6XNuSoRJ|T5-j4u=!39W!@liPj zd<`0He;C#CfM~5tJ{8g?NiZN12Fiw~1_UU{Iz)I$;GnKvGRcAT!tCuNmjv{ag9h_C z()vcQTPi7tqJ<{q)&W!F6hs@L#~M~av?t2|jDUp0BHG9V0j0U1LRL)-gjI-bcYnT; zmPo-V2w71HsN04C_8h`6RIu>OfT8J$igL2~|%(}pGRRzFKLskW; zX!}NvSrKFzVlINB+aC91M0;91e^Ua*At|Dz;JmyQiY$UFa1iQ1j?3f3mUWbxVY(zx z;~0a5k-{odOSD=vl9am$3S|iPH?nR>8z;HQa;Rk^-VOU}w`b3i zgX!56WUC<`4*Z>T2Tp00Kp+XC5o1jA9LQ()GyoG>qW}V>=iv&%1PwYCvWayO%MwN+ zS?;NA6mLNDW&JzK59FbXF`XITaMwfTwNNkuTMdPz01hnE{RX718M(ZWEv-L6j`xnOQCg?7QZ>|qj^A|<$) zY)X#@#t6<8pupn?MN9yr9*_+kbHoc7+8^~iZXQNJBnHDHTK(12As~{RrCP+FznAaK zZ{-5t1rR2FHEx4~EWm74sH^}_agW8X(_(NeN?U-8;v|7EIN>9Ov{Q_CbfU1D(F|Et zWa>wc#b1QCePaXOQDBDesGtax7D;SA*^q_ijE7T-2gVSx8u<(^cq2Mg_@V_ia;y`F zfH_M`P8*FlTeRU)gQu!O8D7d!bi_g`lM^VU30AN87H* zBgF1d0Z0_VQAc$6d%2bR{f~edf~*uz;FS@C4?1u)W5JwesL~Tb-ThWpXU%>#tThNg z`35KNydch1qgecAwI|O+JRc&b6-?=5a1-jL3Z)TqL>r-;T*a5Qh(YqFB^P{%T`yx5 z89*l~e5!-lZ(Bi(f?;`+MLYz%aS;!W>C;iz+0F_pEQN#@8j!ub;aj<ngOK3AEs(doM zNK%#K@a0qEHi~&1+6V!6-v2`G=BXm}ib@oj7m3NNZg|^c#87>LBtjE%oBQx(#)iim zaxv(MW!2)zg?@<^nR^gcO_x2Hkfl5@R!~xwzQ>p$fh69H+G8t_rea{Oa`{TiV5uaC z^)tGTw3OHn!+ngeq#_?oxu9{0ps7(y+tHm_lxkWgby-jzDr$~=3R5fCpXq)(L0WR+ z6g;pwE6=(j3+pXDqzGS8EX?>>lI!$~uc^bMq6An8Sz`h>zeo`snQdVK^YY;mWwwZg z`7&G(EvTXp>oa7CHP4Uj>P}x)T*{Vm`n4d~#sqKTLB4{*4HZ_NOK7f_MOwnY{QegBNn9{rMKq|EL{?yMCF0XV*oU*uE3vh2H|#IvnxG3 z-!+4+F1~0{bjeCsI?{YAWDwKE>1u3uItJ`F(7LufEp}4-X(TYGN^#{bygQqUPMkVq#Us-0OtMF34$Y7c$y~oM0Y4C8e z5ok3{fU;dcD};!N3Ki_oa%YM52T}FuS*1Y8*S1Kq98P6n%_~SLGq!VXh;Av7!`jWK zL&q-36x>GPGXX78R7-`U3owu)lM>Ax6W%7EO)2(hGJ{4{Vjqf3Eq9Y>c$s{_Djq$a zcz_rV0{)l;D8{(MDO`lmCs}=HgNo=awE=HRz)Fp&MY82MK0p&dZUx|NgA#@x1;Heo z)0QU@i3T7=TYIHAg#a>vw2sYszQ=jE&!iqn73kQZt7Cw0V;~ckUI+>SF>Ni102z-= zfM{DwbOUQ;7@iC2<zh(xh7}x5s(K0<&CKw`1jr0e=9TPH#wAi5<8=fMgAphi?i?e>CYRZfAv)l8cPe z&8%WnX;0*_d?!jI68g2uY?A)~wvkyHTHJ&(GAgWiuL`6--4^15qTFsTth4f-viji; zzra9HG7`t90D+InAf)zZOL+joUb6ML%0S6$0t$bgDAN`xe#Y_2FZE4;gn=DZ%kEqX zJxw{rrw-{kbBP!=0#rV7v$9}BG%`~>^6+Kl^}ofx5D&~k1`yV^}9vUHV2#|k-A05?jc)PuFQ zP|PVWh%Ai+8yyQ_pg(*s)7!#~O;8vdP6K~Zay5hD8y%gd`JdRT0b^U6L*TOxr`8ix zrkEtHq19P4Bq%o08xmdsEkef)21yh90U>|MJ2f?~PfThR zl33Z6Z;F*kHbbtGg~lFfM!7&Sd_Zp6n+|0ZFgJOk;r3qrK7XMz<2oUA!Pwo~Ly!u` z>aX{pYlLXc@KeSe16(;y=GzQ-RcHr9F1R?X=Exk1EHGz94Mwgyqga)qLE30X@Gx1H z0GNq+gl&JgAi5d*j@Vj$fNnQirFxaN%Bmc0+t(6DV&{R`-UnLv9Zf%}Bp21ETy>T< zZZ>Kwj3ewresndL*P^@n_u`Sj=6dz6{18%;$XX`hz&@^yzVPXzl+!^{d9R>Li7_g= z5H>f|;y;wT#8(m=_!ECkfd)Wb{q=sVAeOb_x2aWq(wm^{YU9w0#yy7E_errZb- z6zjm>Aqsv@*~ziMd>t`wxdJMAoxj44-`|_(Dw#uP117eL>$zRd@DXrhu|c-%t^!JX z!mC5xo@KH;tc?Yl(+v%Y>uf!>Lq_^BG7$;o;ovMwv!+8q6O)zaYAOKe2WMXH+)Fxu zgIlcl^kG%(MGi>>s`1!ax|L`(0wp?(7&21w!Hy`%GwFiElUOZM6Csk(O{v~VwDc}x z!ca{c5{Ay`CQ6!Q&E%zZcO}%equQo88%WK;*qm2c2I=`-ifO@Yd}$}EaW&($phvr==mEv7)B`mfhfUL` z&3X7vVnaCSV=9(&3R$u8*dnmOoABTceM09+?V8Uu&s5}^@JSk6*b1jR!Ski}Ck}&@ zFjN=JaBaE?-PB$Uuu^t6Wtw-&36W1L0JL<9Y3!#hp4&6)34&rghk^-UvQYkbKxi_8 zuoD3TMAVoLfOd^ki`6H5n4}=BoX0udU@^jHyES(?2j@g|p8^dgAGHK9tX@o?=n8wbgKEy4Gx!537O%V64_@EUbGDee&mm8C-s-ns*4GM>AXBOe_! zFwa_S;bG~{ku(~ZC{#|iW2uieayx+Af+7Q!LF#Vrk6Dd%ktrXi31IDIK52v!fr3V)QS0pm{LCOByej}=8lUPy?Bse%9FgpXD6Tu?w9zY+ zbx1C9`BrkQqg;)%p-V<%w4Y5Xr-sgv?rGE3NC%W&$2w1d0Yvtb+4&(mb{1<9tw%b` zy^VC-3>BDB%>6df`Q!C!^}9rs;51Bt36^m60oiB;UFoazGUyb>IK4ep=&`DG6j4YLwwrW#aF`0H`#)k z3Xkj3yDjwqA3GI&W^x!0v5qHaKj#EYMwNm&{?OU0UfA%cnv|py!?8f`fb=C`_lW8j zk1vg_U#@WQa}pbD2$@z`0?xH12Sp zb*bOH?e3X%VGjKDaT&xS57L%2ho`kky}b!9a(MTPmT# z{ntA_b>4Y23Q70y1Wz_u6F8^PL=m<)>?>s*Q=o!acLhSlWUH+N_hdH;`zU9?YXg1| z)}uz@;nY(gi%QWj!caPFzuwv4L86RhHGm5yo4y4)0oq}fO=C61LiS8Z=n9*0!Mm9q zTd9yJ=o*2aT#lHkVP7QrA&DX-ZD0x7>t(X{htNG%Cg@C@Dm(i*3I}rd{d_3EQvw1G z1O~NbU@%QmY_Z9M^y4a1>^cOI{=QA7?c9sc7p*8~=jm&FH_+mnd1f)K+|XzsOTqqS zbH3f>wNaTg_;OJw27@j-g#0`HMGU7L6}DI=!QAQS5HS(IJ>A#<7Luvht?xXg83R

        fETNMevwO+mYTFC)@^Ar{>f35uhUo z>R_7vaMcm0u#K$&AFQB8)U1vXv!))H( zPd#h*l{8ec)ogCG6KcyIl!`_2BGN)0I*`;zfCRIThd>+N519_<%tiL#Zf4ccXQ?SY zT4`*-jGH2=pwVZN|Pa zAIXpifr=rDH_Ut?^PcExA*pI7b#>pfhCDPt{RRiowsl%)p&-C=aHDocRzGAsf87V` zJg{iDpib)C3h;S0Ge0(?1XNajuU{c};=o)?iki)lQDKk~j!NaYu9@79$|2@7ij$yH zTPT#!M`(odvp!RR_J`Al$4rKSDI+PUR=;7fkcJ-tbIKoO4Qawopd5@eG;_|)X1vJq z;5pp~g{igBhv7lkRfqrP;A8rF!G|XcY`R!M-CnC9O$TW*v=?xcjol&F(w30@p&4j{ zi_!NU+L;VR(!lO^Ube;vSp@ws2FJ^{d9PWgwyhp8C4s2)-&!vputuPJVFd>HWt>Pr zXjs9OEwG?Pt_Dug=2!1Qk7{wJZdu3ab-9A2I;>89`&ju`{m;!=W;2L>qFz~1iil#X zjHpFVR6;2T`Yr!h>v+Be!t&-2l>{#LZ^aG~V{Uce-r-0ylpyr)FgORTpg_LBu5=6f zI_Sn2M0?UG?|SG4ygmeVPa~q#KFJ;hD|96bag+%y!*1L1`Zxt>+WX~mH_i59phZls zI#4s9=msWfB0HUrcoGqh2B(&)SL=e2aitf9shQcQ4z}uVPx`-+US|@Q!ZxhHfIYFQ2ULWb=BodoILp|xwDH@r zvS{x~4IVKMjexbS;Lqv`)rS&>-i^(LugS_GQu~ z3_i7$svzK16gAB&)IfpgTSTh-4N|~0f&$~i&`TzN8Vi;it&oH9 z@$SRvmIv{8*98}Z4DltCGr#N7xETR%5pycNGe1r>Av|l3PeZezVd1?tvH|W)0_&iZbP^Nf?^FZmZu@*wJ1|SgxW)1J$2~T21!O-0BtU>Cef0#qy+J{= z&Q<_QQv++DBiJH8*}3>t3rB#NO7szcL@Oo_ar$mJhi(=iLfSV*$|uBb7>EK>Y<>d{ z)_Q+$0oD6W(+bJQGknn~f_C(je97X@@5PW3Mgk0$PR8g7MEW-2$15);g?NZ{J4yn9 zaWQ%)1OydIqpP(P(jF;V>_CV|Enr8AgF_-DlSv>b5HVsxZd#~U4uyikK(psf4xKBP zvK4TtL!K4f?|os$v8fE@tRSfksWX_A5dMkqa$TiolS`<*xE%+8b{+kO zi~)op4gMRbwioc=z{n9EdaR7i+c^^k)#QuHB;=!lhEL?yelQK`C~8L{UQ@Pb8C2;I+40OKY$ucga9~1j*Sh?ZfVK ziz{|Ju0C~*`(77@HK~!0d{WXtPScGCqz&aQF#KB=a9tK^QyF;B&G%6SF}8bH$y(FI zSZ=1SV?~ZI4_bg}2E9HFGL=?#f_w zD?*LOa?A|pvi7R7eD46r5aLLD zb|tx1(1{q!fEoV<462A+%$E1U_xNno-$H`gD^V1GJKF+|lIAK?ijGaA=?&^&kuhI! z<#T1=BOSNgiFq1 z*tT^z$PIWa;hF0gqB98wdp!j5Zm1bnqfs8w#f^ZjAu}4M6_NPL!V!G_h1jM?Z=dWJ zopK*5f4$(I;<~~dWk%;2i`?8Vcj0Ykgn)WZvf8>uPx;r@j@Cc<@ZmS!t|53m1ZvsU zN)%5~th3R#J?L^3&f5~Ql4|#M30??WE(6595}aoUE5u3HnYQs}m$Fvz)+l=kS^RkB8n zB}s(XJ6a(K9fM5iAcizeS+hSlr0&KPc7}z?2usN^He5KKcnC4OuylBUP>T_72|~+t zjU#^Ia$>v|mUaxM;22Qm;U0$s4qK;*bO<_#Tonv-sHcPweK*UnI@GB<(T~uaE4NTd z#%D=Gq)agj`YloY6D;6iAsoU`Euw^J*$yCZEb@l@J=4dtG`T2r_clKMN)<%d1+na) z2nPyciYb~Z9`TgyVl?x;-E}w=VksAblqSU(wBY8oV`(1yf!UpO&WC$#%6~YY#r4rK zLM;m;)X0Lp`Ty*EFc_F##61&CjTVTJN_GpqkNb!8ko9}agoBib;`*VM;fz60Ef*E{c}%X&d;;;sNE8kwt$bd{KPI#ARP(}Zza)) z0seFjYtMiYu<7+*ycT5gAP`+CYSQ!y>SbHzYgN0QLbk2hR>6;dn6iFrl47 zKG)sR@gJ5qSo`814T){3fib8x_8Ur;#FXh7%EYk-q+MOLRUB4WsK(H%U9 zTl2#HZL90SUEKMACoc((LsRJD!9R~_C86CiB2LOt*lpJ56P1a2cUlMo#vh8<$Nm&J zA2I*ABL8Zij6%R(q@d)`JU1sT`uS|A+Guy8;NTV-5hNde&Qg^-u z;xTaRnHEk^ua2U2u@=f_;N~bc*yAZzV1GwZ_htu#92LuxJ~d?KHiLf9N1$NT`p*=$ zU&oPvp>DTm&hW-<^|0DC_~Z_mIv%bn4EE7u03I;DER~`fK3J?qKv4~F{FMkwuuN+R zgI<8Kzy&#fZjMSewkKK?(#j<5vFyWh%6O5Eb^+-+$=IjQgG#AXej&PT zwze7^V4h)==$$dzJ0ZKOD(e+EefE=gl#PN6UVwSkX%3?H^ENGjDhb=q241uvE}4xt ztWA5lmxx&~I8YL$=}?b89;(Kyx% za`O{QK~cbeHV|;bb>RDCRc)U3w=oIrYY(q!Tk`TqkiuJ3S1sO+7h9oWBx}sb34~1~ zkjlx|V(USLwH(P=IDmu3y`uu56s$(2rrCCs(1+L?DsUS$4OqTjo9ghrH9;!m#9ak5 zaDX%pgO1bU=oV6&$3#{Z$)`$rT7ewpy0gYn_eO`UgpVz2L=)DuXi;JVS6Z}yL9z3?E2juv#eR$?)R`$#MPLA@#2 z-`cW2KhI#$THU#)A<^HMeg5gQKB>+=<<|p6P4T#<9_0$bv~Oe_l7iUL5ELs+F6W-zoe zg?-;+BLrayLoMbHcE_#tw{GXk5wt?kK#jgbgDEH|?D*6a9!JYEiWN+qXz?E>fuHK= z%vVpgdw%~OgGJ0D5QDe?aWpUkn4}UL?mcL=k+2AdY?pXN6A5%7-hga*1Dr1_hDO1# zxuztdNrw=cm1BMx8S)V1vEPa2104qzll_muVo_z+ZS0;fIDbBSyw&XhfmO-%#G=2v z0gXtldpk!62}8t$hU&$O?CS292|V`pguF=w8}UkoX=U6=*>G#R+Dv`M z|5fiS-`bc_(Y>nDgdi-_V64+qtW!rz(3A#^8uFLcHy;H_pqmad^asuh45hc4Uoc>B z@2pPUf$&(^Oee&qi<|kaG6;f32b$j!5Enkn#lqP7__e=gcNrQsuu-9H4=8NXA!NVp zB=e7+K*?!vejUaf1c{VuKDa>Jg$bh5l(!{LoIa&A5nW3W8*(Tsupod`ZzUGQC{Qo% z0|vb8(`B+)AtD8roaV=(RMWS#6bQ-9S_|4;*9f6{38(L>VOS*zO=kco9p`dMK>)N6 zcy9^hdbG*NlHnoZ%VC6Aty5E z{|lX z4;m0~tB<(^F)+T$YS|gcmKX#gORbTFy?Gap<9wRgWlYaLzbHY1j!33${LT|LlzwO} zB@vq(O-=fB@mY|Mb6Px}4L?hrvc;~-3&Ru_*Xw0P3Tr1mlEu2#&7w}Rjaz;wLDNuu z5^f3yR{eDbgNgxaSoG%4R*DUo5yDCLS{(%W%L9k6l?KJam`GDBbs}FcE{x->5W0mW z8h}HlFG{!8qdr)2vdFNXVm3>SrXD0Yuz|d`MeA*Z3?@L4>;M8=k>J@MQA#9<)$&eq zqkNEnMy#1lH!$edmTr|1PVfDYGiG}B`U$h+43v!N@UFtd%vuQPcxOQfl6VGj`T`?1 zWfFeli-(5F#Ms2OkB)3P&Nu0KQKw>U$C%z?PCV}q2p|xE9|WGGjx|4!cpQNdkQfcE zTeu+rL8<6fvR>+`n|{EHQbh&kmUrO_2z<6MfI8hY28GO8bti$XV7&D2y~} zHT@FFeqpSI0*QBsauSYb-Qg^D%!D4l!9obMGX<4cj#DBSW6_H?v1I&F3W8)gRa^0F z-?+AVv7c=T?7ChqCcqp`N+E6;d}wek`S#OmUW{(y-*~)3vP`7xJlpS)Pp(1JtUK{A zrJw{JbGY9C+_jR?^y$9wqYV79BPwNcmy~0P%aTAlmB3RV0@-78|FlfVO0D5bWq5W8 zqw6lsz#%A-I8cZ_LQ1^cwvarc=UNqr8Hoi|4VB2~jLTvcT1$6&kfE<8X;`TVIgU#P zFESckKN#P{+puzeNE=tvN(f`jgn68{x%S}*yFH1Naz4iyXc7qlkYU*vX_c!mO?8o= zxzWclnbw_=-%eyB-tIi?t~6x_AxCFuZu0O@00#}4bSpGI2NQ(|jr8OMv`YaxfjC6R zoARWv!0G{6+m1O$}cU$wz-+DF!b z`5H#p?LHL{9FZ4baTyrA2-=m|(BU$2z&wXFC=NFIw}NTLh9x`4*TS!l7sk$ zjnr$m?niREmxZ?`oPganbA>~*|?YU zeOf$Lz`~=sg`RWxZ?gteKLmM;D_~a*#A!kcBTc7Ekl4JrQ2YnaIvmGqxrm~6pmgwM zpbul+OuMO+uoCeh_`r6eAg3NfO3>7`OTj~sr$8dYJv0UnXRs4^jovwxzhVy~_|WHT`ll)Zu|ZK@1a7+DP6lng z=5hH7PLvNbs4G?CqM1uwTJ4cEVNH6KkC3{z2GdX%S}IB+$B40{uuX5L5gn<{2*Zu& z8?UM&AM>VXp<+e~SLI>VN`2YdWx0Qg$G-jGpm)S(=67`iq?_ou6#RkXlpbS}aRl&% zfEL`+4CQ@o-83vE2z3G9)eR8q72P4l zOi->6b=%c3o+hFSud9>Ftn6|-_)m^av*n3 z^LWrWWPg5_#-@HGF-m-mh7ngv5yQ=FGHLk(i-#XQoyYRg5_P(bvsS}Oai4fcsAIbZ z!LR<7+eOFVE{S8tWwI@ z!lG7yQ}QRoLAF@=ZZ%k99bboZq6@mw7S+J>wAMZlYhBwLarn@H@;+ua5Q2mKh~Uu;bj;v zc?ubb2T?2^_D|sl;_FYV)f&FqT(szrDpDtB+_w0{NqKBE=~p*G0v?@IzK>)!EfI<| zk|l41(@XM@SYpXU=Qld*@h>;I7a)e91Pk?)f*aDo{V>R|ds`m$xHd_yc zpdn8Mkq;)^Pje4{nD%!-;%+0`B1IEHg!M)m+67b?$?|;`K0BS2Nww~V$e6=}Vl+HY z&JNBEWF+4#mi9=8$5j;nQJ;%wB!Bb^^E*i~WY+7R80X~AgeJWXd74CWP@gBO{)7sd zqwc;##Q=FRZkT)6#mi>OJc08yvaQ1o6bMA_6CR#r#JQlrCdP>x!f_xEZ>euM<>I$n zT##IPP98EScur=amTLpy#lmwl9Ek!9~1y}ns`WvA*mmw#)3~euh%+73>l7=+OTTYLtHPKe+3^yeX@Oi>;lw(W$6L7axLd%fTh5>M9}`$P@}UEL5j5 z#J%je@=TQudFF6{qM}f_U^1668)9DK90ezI|7jcAdPO{b^;a1|?nG+huE@$96-o6j zwbIsQTW&kqAz&Gi9+Icq_7`vhviK+z9(vq8=D{pQ=Tbru;DOa^8o)0lklTUWC6n1G zWnXfhfhj|=2m+Q#L3v~6%Osfv3IP-)hmE!(QYaBfk}57xI0^6XEc|!N5$a6#dr?M{ z=qNufmlA`EF5ipd;y54Yxd3VVq-48_))-p0Ez4b9xQHVGi7!bz zoU+l)MVCv0u1k8YQqvE5{1s@tV!jl~7Q8dAU^jLDI$!x2gCOA`BopLvsl{Qc3dAfI|7n82Zp=@1edS9VB zNQ_)rD71WAOs~>amCO;!tg7P@6ldE%nCOq_#3_FidHTlR5||#^n2x20WhBvX$s}?? ztwug2Fx-e*%i_G~9Nqv+K(xOND%XF|0*9tTDDA?LZa=06X#RJYduWX~ow+I7&(SoNj)Ln(l?(Cs&n%!>=$Sw11Fd86wlJLh@Uw78qNFcpyf<{AyzbUCo93<^Xr6L7<+18S?vRbH# z*MSLZ729X+ea4Q~gA?3N(fXN0(;%iE_M7NEf+;nHsptMIl)jux@CNp99Ug)W=l>xZ ze!zw$$rw)5r-O|sS?cPgs(Tx8jbq02OYjOPlH1k?|IbG@h@%Z}g<|4q6W4wXHKL<< z_eG82&)2rcqKkMK?%sGo=pDQi^uayqpnbMT_L`V&I)dTH1D3R*?KYG*MxVhGT2T3O zeW8At`W z+*ys1J;1H6$_m~;%ICYvCyh1a+92+xXvtH@jHpiDaSRSuzK6uch&k6~PAMgJmOVuP z3%jvYffbGTq$P9)KYEEIH=f&L8%UVyaq=o={Nc;HThhr zwYxYmW56V8b&?){urc)Jw(J1T=xL(rKh+wR_eYx+RSep9gtvdQ*llRoM$&l()2FNN zQciX{rwoK;F21G&)b#5Z)RD6XIfEe$%wuu}VL;m+qI6i<%k(tmAUa zAA3Saxg+$q54A*XPR05NTEqboeXfQ9p!#tq-D#WUG^YQJm&|@EOI{w*fGkycSLNV_ zr^Uz$4-ziSA3gC3jzE4FRIJvIKM1;#X!*IW@;43nGbOZi{Cty3gv^dYjRBIcanokg zihNtHxF6Y<*rC#40W_u}Aqg6YCIGsVZA-viZA~OVb$nQw@o!i8br9ADz}LuVW$jA0 zRpULtL=ez)V67s&EvlQ8O0Q{~%hozT1oV+r>EFP#xR z^pt^nK)w*)`OraY^J=9=A(zMp@H-HBItPlmJewyE`Wuf{&^<8zT@nM1hxu&~{N%<- ziGPf72lPQA=6AyMs1HFv=AQ%e_T79_j)tbfp+evZ3<4`vc6n_O!m-LHqf6p&OeaJ1 z2|7Xw4g8?ZnW~IOzF+!8*>KdMguvfu{vLDjrl)0u3l&m@o<}!%{TtH&|rf_GEl2X1U z(IEtZTY9Vyf*-zW0RUz$d~m!bkY{I5;UJ5`k9^qW!O+*GWx+|q8E-L~_L*cbNfNsR z3lg;@fi?d=odAZR3nq=23SqO7sA%v!*vVXFLVAomr2pT>F=ha|2*Wi40t7`zxe%H{ zdYKmhTOnwH5$`nyC(-O8!-{)2wf%Uaw;VfIH`rx2Dq7@)Yj9kn)f;F)bm~;;fLSPF zwhU=H6*S>5$(bs{1(?P6!0t-WKx766WGEDZXM(J~c#nc+7qcJGDM1bx5C%_C;xrxF z&{=*$np^^vku%0-68##8d;5Z;*ob-oyk(^3W)Zmfqt%7X*%lhmMm`Kl9=YzWcV}6% zN|HM^Z7N8#&5_QtApI3q9AF1tLVuL5KcvP>pO~yU&$9PEN@4>`3@5d&{z=cY#}6T` zr-o<~Xry@p)1<%^yz25A+CWm^TJQZE0QM`&PvBV0M9a%yK3ZEPUVI5Z)S=!hdQF{^ zHa?h%Fu=1&qy_Z@=J&)1-Td(14|HkZHyR&v(5KWb`z#FgrB9EiBZ&3wS#FOI(fuL4 z;6OdNLg9>9(*MTRDqw##ZLE}P_u(?emSGZr@OKXl5<<@zy{n&~Y@w0xm;kPI4Cx>t zSKIg0%d4cVc`qRn4RR&n_Tk2!NX&fz2nH5Z;J>+EF-lepeJ6pHLRm^XfTQpX>|4QW zY!Z{o{e0nroPntPb!miBCPGQDIwebVu*SDsN+B-y4WorQyGxl-d+WFi$ZqibcvwV8 zXV-4Ke>>fGIJ!Sbalrk(Kpb>)3=&vpKUVo|z|?sSA=k!ITVo0{zG5&cIqqwQORCr5 z$8Bh;_egMcDx@j875Hl&o5ousDIYE5v^VJl=R zD@C3HR&KdKi%olg8A=zb2Lr4BgD966e1kt5Qwv%Y%0QOXz!7!+sqxY6ZxkdtAA(+P z16Dxfa)AO2P8@+!t84d>ri*op*UeYmA%54H8HV4?Qa?)!Gb zK#?_M$$hfKhWX@eShVw_n)4T%1t6DJF9FMkwl^o ztn6I_bhiy`;IH{^EDFxg`rY>fQ!o*qg}dwDb-^ue_!--8tyZ z{8u@~>D)$X!ntu9rIw1`1v(_%JxI*-P-Z?V&_!gzc~m9<-teuLdx&}fig_kYXc6-|=$zl~G3~b*LM*{#EbRb+n(U5q3P32u$k@m&v zD2IK#1^KO4kicpw#cD?yMpzI(B@z;=ghx*%4*8K+3W*4li?6tpF8z3=?#jK=t3p%L zbaj|kkLM60H1awN&A6ljDiI4|9C|t_7HjYu@^fXm$-tC|KBe$wAOo}M14fg4lmM6Z z2h^g0;{k!jCHa710(g>`i)aOWNqA1O04TAY1b~)w91FT$1Y_4UF7A?LODGJTA(c9E zjD#fX0}jp!uFT9+2yp?QPpV+I3h2L}V7>j96D{?(B}HV4vFx|OoM)4F@Ii!=R8k@`43qdSs%J3G z{N*dscr#ck8j{q`1hT}Gq%&V0o`qnB&!AW*faciJHdvfqFGXZRxk@LRjD%vjy*o|H zGHQx&RP8+I@r)_TM`^o7YA-2>J5G8tauv=|+H;Ya@LpNxX<;I@P_BbJNeGk)S`#R$ zMF^^qLN$?;Wl|~90@PMS7nGuTsK`PWo1=8xBPKvs1kKaTj~KyRqHdd%R-E#fV|3)B zH1NFQo2M-qp9STXZk7ToNDAmPbhu(UJg#*aDp)ESzdO%CmQ*^ej{ihVcaGGQs2H%8 zRZzT1Yb(C@SK3vYD=tk+D+*4P1`tghHKt=DG+6>>oF?}S(bHR|IMYRukCH$QN;5}K zA-&XQj+_H~isp=mY3$4_X7twCi=7YLd zY(#6e2GFiJw}Y<;4yOX$#92ZS$ZdWhH%Kg=6D{*Fl}fo;`MBwFu`#7H03#DF6xk?V z4j!MhF~rmQm@}N1M-#FD@~vVda8R&|k6;HD{_LZyoEgM;i5cEECZ9klMG3I1(?5CXzuQg8{`-np9XtC>MxwKKerw8h!#u zfRY%@kPO;HqPbHE%O`dW@f!7g8s%UVm*-jR8PP928P8r3p$W!_fNuN|ulI2edsUE? zP)&=vwM`6EyHR=Osm#6q5nZYhNi34VNi3GqT#`&$6%%H;BUF-B5fd(QSodGZ5qy5G z(!?ZyCohksBn+@GH6=LwazS$;<=0^OQJzHjM;JD!fRe~r0<>(g8317N9C1UANLTN* zm577N&h6q;=WF(qNhHxzDUH~*HX%`mHZJ!F()~EX!D0rJO(c>7II(8G_&;Gi48xy) z*)y4=KgLhaf-N*dKj2GUt`dm`jxiuVvqRh|-J@^5$gm-qPzVS$D1&MBB>=-=pbW@) zH`|HCbY+u>l;?y|GkdlYWTu8;w9ra98G#L?ipkA=Y#8 zDkY<5nK2`*N>*N`kH&)m@mJ-nW(f~Yh+)Y7-G7AH*TAtz9i(Pe;h|kn`AirS5l9z_ zHH1$G!P*N6Lyy5)&NWOz9ODYrsj5RLb0{lVW~pK!$?&WOC`zo2JfYsXo&bl3<|H;5 zP`G(0Z?O`ZD_$flVg9#xs``CUCVqGsN6MA$Xh3)xMs^rfd+=#fY#)`5V=ae8UuD@G zLOxkw{q*zH;hR`BLzkw1x+SfpkUsfgxyxTQ z2?$f11`^avY&iJqLHIa8Yyf3{3*;OelxN6aAg5?I0nCNKS9QqMfvbB$FeW9b10h@2 zbIHkggVDj1ONJ5~SV&Unm#l-};3lXGS;A0tnmM>?m2=Em5$vPqY;2mcbpQUU{-~65BHQghbn#2!X2=RuU*5)`A#bZgMSDOy+1MaZ_Ncaah1XF&%{; ztX{gDFchdmfX9y8-DC}8SW0D9xsi3Ko0dza))V@PZNVWEa>+vNVIY)B4}^qGrcCMo zCOXDlF~z6*TV3&Bx{e8sUvI!sFVh%^zp*wo3sp$vTgf094Lyu(ENNs{KGbB`*FuTV z&6=Lao=!{VsMtjkxGPpP z@Ha&DJ^-$Tb;K#D1cm_Q$QFKaZk3R(lXDbsN0FEa2Vh_gBc)R^=|?u5Y6to?Byws; zZ&hbtQ^ZDCl_^9QYs!;7)q;AJB`WgE$UxOPXkJrZ!hol~IHH5`k&6O&LdXE2i)a?= z7LUd<=~<6LmKm5Qv22rKm$GZd6tR4n(DFLy^s|a0U6w2gps|nQX-AprrmI}EQl9Xs zHV%CCbqMFA+u(kI@gybpnstHJ`Ievqs+W|3`V5uYCKqiLc8QkT%sW5%Ba?BHOZY#m z3!HtWJ9cs!pP+9le@>S3x1XXH?u7fHcMaq1Dd@-|R3A&M5dW~*9AD_p=EjXt0=Ra+N7 zN;BCYvgoi%2MwQv zowS7}YIL=%?Z0IN5O-hC#J*gm?T2OcGiOu}O6^Q;3@|koJ$m z1|kXM(l=t%mW(0_nKPA5=ksK+1Q{vyu`qJT_|TM4eqzDA4reXkgO>Inr&w2f){xgsBedH z+wpQ`-fkDN8||8C2ojpZ5vWyL7QktAdr~UUmBOq>Ri;ORRyHdk@`^+^4g@`B6M?b# zcc|oa8lb~Ri=Vg#?8x!zdbG2X(;2}f&C;K?KX5=dczuEqXPl!f=wFb$XO^@=3qagg zW=3uT@F@UD*>Ws!$OeOetxsG++i3{Wm~uvJ0k%em!nElCp-O1wDkvn&fZ%YgRZ-CN zNyTIwBfDf2kaBP-h)!gz2^T9TAyB432&B3%fc(Bt8BQn)n~_^h6+&lFdYEvoZia?) zXQUmP1ohggq6k&Qhad?E&Nz}<%f4!?73NXd9catKtq6C^L(qPRgcDSwbCswzI1z>> zpy&^Aq=Zrp(hj)V$>IhxJA5n%b=z$Z^w4NfZxCBKIf<;)ULepQ=peNxMFdftqiWA( zg%#c9!8j3Ad1Dm8h?2Tr>!Zhakd=YFhC;oeD)ph_LNsVSMwgTk6Kx-(h)`P*o*p71 zJoIb(EZm#B;#~h?w@d%!5~E6@i7(PKh+-N?g?!INAlcxoHcd^;x@aq719j;PWxGSD zvU#PW+?NbC!JeY5GNkKtAT=CN9t8-|+0={qM3i*6Y&J1jUxN^@;~?i;gbm6(#+9gN zJ_-(;h*=%rEk=c>iQF?vIF{h3(I|x9C!!O32-9!;KUbZW?_3EpY>u@Fz=Vd0zIFy$ z>>~<>bHNFvz1#=UUzfFM4G(+`Td<=RrU%&uCoTrBO8KCRbp`H~rEC*=--ZxaU%J@B zYe(S4TpLtJb|KubW~AD6)Mwya7OpTYl$vml7FqLm0)_d}b})slMhqN`iY6Pcxl%q9 zSm=C6qA71^CdHr)iBq;l2H-G4&KG-H5;h7pf*^JNWDq3x7)@T4NQs%X!A4#*Xq4+6d}fDc(ioFACn84Aj`6t?zQrby(=Pm~i>wMp z)J>5fNPsG@c@w1|&_Wm+M$1DClqMfg5)tbaKkr~?g2-pYp73x8rq5y3tn;9j-(_+k z5v@WS^;!LysLhUG>mxs+LdX{aO!NF3dFkKVU~JDSNBLYpqBfaBjKKWV*1Uy9ibFxt zqgQ=rh`t%6dnl||q#Q~o>B7+!f6u5%SO5e&-00d{YnYcX1T6>*10abJH<<@N(uU|C z#Ir2R$bbP((9PI0TYw4U|5vr>WvsCFZg`*KBSwzh3a9nlsRvI$M^SHaSxTxnZZ@h* zN*7$}sU@3cXu4d-OPxq_N-Uy9l1-bAgz*sdPzr6%*jgtm8DjZo+F|{5kx9UOt~v@pw}Hv zfab1X*H@b;#cAT%)~bGX3`&Iv3-G3RNHoy=Pvi+8ld_$()gi*4FHC>nGWrE)8E*r8VeQXhbuK z8DRT)2$^;smxKn5R3h7;Gfrte_K~dSf`~8_kBArxMZpqveQ38p{?Z71^h;$^KNtll z*62CsIrELQwy>P>Q%41`NbVM}O!$sLdb|`uyi&Bi#^CVjQY*m`^G}|9Xt~~fL@eIk z2opP89`Zy*Pw%$1k+>ubpLorfLm;Jb0l`EreAn0;Npl5D!h)za=qhycTR(HRwq1u9B*b z&dBeM(x~0=;O?X7$ve8iX%bG7oD;$%kkI*Pp}^{Fm3{f2MzpuEka4BHV_6^8QX8}x zsqtPA1frL_KSOiN(Vl%ZxsTs9#%JTKUJU*7mw>3sfna3#^BK=ZEnMgdDbUMk>p&E9 zvX=g~0qqWOTxAFzo_kR@&xUldoui5&%i54M>UR3g7w&}`aZB#+d^*n#EjI7XPfJaP za{fRC7(u7%PkUPGR}lO^SWKYWMCd}3tD-8@b{6cWt`x8k1exwC74egIoaAVFA;q!% zk+{9yWzOn_UDZTnZ>`uwBF3@Wo5|*K`6+}SF+h9=MHGr+sH=Rk36{~PDJaxq%pvjg zBTzgZXCF@F1nD=j@EIPq2}Mqm148{EEM8c^7IJ``*9z~yw|38(`iSA_^GYhoZkpw2 zhAAiu#KnNphl_nc8LXXxxtn{@5QzAAZRnuXEL1ibkLY|c})f^Y;=gMznhNvfN}5nzBa*(!K!%Q`=)( z0#Rs|x~%!G6=hsS<0@%;{dosijz%o;j?Zj68Qg$d{WhUEix?C{CD5fyD!%**At3NJ zx2vXuPK(*@!`y-dP5F4f)@U)3ZaroCQ`1n<7rRISzh#{i3Kjw&S5F(5EcD%4mc zUobd90>sfju{uJ6&!l$}F2`1*Ioc@@sNz6i)E*&;;3iVAWr}3rA=mU|{5g3ZcGNJS z1H3H_YURif*M^STTi7~CAZZ{y8cxm-!8W6=4Xig%!VvkN1SJ1vVxofD=LAK^5h$%y zd0xbJWB6=zegm%aQfqtlc)mGTa;FCQYz!&8nENDdwlPo zA6#Kv4ZxAvt@Ro^7YmCI&|{?5qi)h?nshi?Ue9E3oG+Oa>TO#TQZRIE-3Vz-tce=T z7Of+>ezftho#F}Ls7KKvjwVC_J}9$y=3hDlU5}huDf#XPzr93TpNFAq@kCMd1?E_i zV55))v{Bm#odXz3l!N?>;z)W`gP*Hmzzig+3I1Ayu?5>moP|w@2^Ocb`P+*he~UA5 zmU-5CFr>ZcEJ9K>!ph*b+!a_hf7UocJ8#Q9HNO(t;59gDRm}255Q+?RVLPoS=Gq{|4rfJcB8vH`#L4b4b=xSxcvRZW+?!xsnnC zG_VyaRLsxv-=ZFJsacm7aImN5XQ*iYKEt-@ZsaTrVY1Os>aFWnMQSb-PH!%_Fizat^u>M1}fE%E&}tPkaF9+Z-E#2 z0BI4Io|GU{n}ByS3)&0C;`CZ!Oux|^*sVW#F1N)q`&QW2+~UOlj#EjaLKF&C~pcH9;vROVtS~p#b5+})$AVwgpXzc*9M+!7Y z>`mSAzcNAXFh@wl-V~LfAmW9;RPIQuLB`H7d`}PIS2Cyu4*J2x>X+Jby5G@s_CBIJ z-8W72>U1$nX&k{k98II+eS@9M+MLIzSn#0v18%n{^bNA{r!HE>vkkpBH3nJE_{~A* zPdi@7uaM&w!)qc%j%0^1z z8h~4g8rDM~Vlz#(fLCODCNQvuB-O>idg4K!bP84B`k)60bIuRi7g0@M=fc+1b^>d(nb7XdnEI{*!>#iBOU z(w95>=_fHYq|_F)o`S42^k;1__T$aO?422#Rel~H(79jZuG_}loLmpK_$UJfH!Ii-B3`{J<>W5;J0k7l(NwQAD@|195~Yo z>UPfAJ1n2FKqX0CTDR}fYtHYn|fML67a4GRF+}i z2wS2QI93MBryTYhtm?Qx0B8%OWVOQ3U!Ve|dk4utL( z4XDot!gpuFL;GT+k80 zWhiiB7W;=8jTTq4SXnA60Xhv)am8&as6%92P4aNitPejLx)wUh7azlv4 z6(Y=V*b4$6BcISLT-sU@TiGZ`0(XTed(7YuX>y6|MIEE_U~fmdb4lmf5E(EI=ZH1o zhAnL6aEi4&37sDFn2CEv-kgo(v;-#>sp%?qo-Vusv*R5rX`+M^;7$w3`61x9zAQmC&{7N*2>;VL6&fY*rW%v4)p z4qHGg2?s%*aZ#~HO@&M~}s7*9WzxHQ20a z)f%A=3Gs0~s4Nw()TtBb_XqUu;&Ah9iW2GJ?$nn~zT3z8=xp+9+$X`St+!L6oLLrOf|J>>l4XmB14*)>vnN9+^TUJpl2Y|tMp}>TG z5qI(7Z7)AA!B6<`s<*^dmQ|C6($@aupasUghr(Mbn9(g0EBzrTwQ6AVGq_3Yy-D^C zZxjd|*@izQu|`r|%^ft|CosD5yKF-O2JNP>YLKj3kxQfsIA%imrEoreE-rqmsmTuH zJ9IlxA+8-7;v5-B!_OcrG@VLJd#sR+%kYF45d7zj2d{x`LLwiTOjT)PxN{^xBIuZb zSOEzE7!RFqK8nHuLGi*vC@s~z?1#4y59Gwjbt@r_LbH)W5wSFx1T4A%NDoVtU8stW ziEL9jrJyWtb26RW^vkP6j+VRB*cP5@bA?~A=4qJ-y-1;#mLYF_k}~bbRb)-1f8pC$ zjRrN1U2y|2DT4!2gtfbCnf7jE>)0%9bm7~RDSxJU7VY77sJ4;GN zMK&XHKt!N*zMu=I-b7Za{9>JLSS{+izgc^=ii9=%3(A414M00q5hZtJ8i{1hIXo9- zF;;cU6xaZKe@(bFFSdM&1>b zisj-N!uyj3;WcsZEEPsgo>@`SM6(%W3ushiktSly!#GL1;d}F&;7HvPDXDE#K_mC$hbKyb!R*(i$*#*!%*R>MJ|Mgdy)u5syU3)3`|m=_U-f-b6+BRgOPN-o|K ze&_527Dv{05H-{yuuKWCl0_v)uUt+J03;YojVW*)<5>ZV7q#%UOaKctd+L!?<~Kf$ z06C>-ImW845B8}D5pxaHF@Y#hz#%3{Kp=Y_%zzFJzMurpR!aq7*5hO|qb6LIVuXu| zMF?wj8Ot)V6)Bf%8ytBYYflOCH&0jxz#;zQ4p;%%dJjCM(2#-^mJK>5h_@t921M{{ zF*{8#KM4X2lhf>qmlMl#H)XP_?~QP!(HPo_0V`EKB#E%duz{(w@~2*k<|`^%DSbuRN_!JTS8_7*r;h?|;$joH?jLPU zXYs3({34TmMgiFj!f1`N(=XN2Fq$H|DXjUJgwY#HfN5xf?|Rgkm!<(Up-l!S@e2fq zX2`%Mh^%XBj2jrJtR{$sFHl2o@x0v@&lJST6^MzD*3e6mMC`JVhJXvq>C_EZxk@5r zif}~8YGf>kt8?f}cNQZA(}h$v?qy4%9E^GjXC_FU6kuqrXCB;?1h)-U@2w~|7qw?A zJ(&tZ;|gOqOqN<3-jX+rhP?%r3veUOlL(31gRStn|t9v*DFA{s^MV_ zsikyCB}kLRNQR_C&7>muA`vl-iPRcGC>$h6)5+pud{N=Vlkbtb(9bzh|iYR^y=P$zGgONl%tv* z4y8!aYq;4s40q2CoCW~JrgY@1s)O$A2EQ)Y0fhX1&GICP81gH^Rwl^vyLAI9`gBfE~F&TQ)8a8l>p z4nA9l!(yQfHIVSJ;f!!AN~OLj1EoI8B1pi)2KpAsT)sW0ZFRq&O>Jb zw3?qfXyNPCa1%k`Wyx?F(V9xqh-Qe@25QZS%MqkT6`?@k(%8Z^L7WN8`&X!|y{Uv{9tS&_$5~$cqe!5E_d-`&>=#(^Qlzmjv4p7NjA` z`8>QUNNhhPrfX)b$_pO(YQ#|<(uni;^Mw)JsH~(aL{S-vfMoWIA8dLyunwq%QiCt$ zXBrBB%S0lG?bKF#*d%B~Q5pZoI&4Fc+7S*J8GuvV$-VPK?7<9gSAO(8u(QLxBVvJ)CEX)!bhH1JC_eD+UjS;*ClozR4=pJtm7y?@?CdHK&GN-73Ih>IhE~SK3sY#D8(qYmW1&W#1uTC>d2%dm`gNvhCGG z7B<+?sZrWK=*llAEKB_q!2t(I@&2SRQJsR7>SacXbfZU57-%HilSh?Gdg0Wis>%Dr ze5EN`U^gk9#imutZkf`}R<|g*bd@j=u1^S7ncN9f=pozsPOa&p!%A&!GNdY~ZumBp zNJB?WJ+{S0jE7Q~wb$ii3R-MnhTx&`$R8*A9tc`LcS=9Be)394V7cky(fnQfh!e;9 zJAGz)_=1t_H90ocgiy5)TPT?l+!9d6;%Y{47Ubvoij(cW zB!`-4Tds&*L< z6zusKpNOua*258DDdIlFL!Dg2rYHQrGim(790+X!5)juR7M*%E8lM#*b>}Bhvy?WK zXyl@hge|cPebh*5K4GOeMM+3)iUlVJw@n2pQWJevEKR$hy%0}|iOc>Q_VfGlaUQw~ ztGXdsko@NQnAI90Wui)&dzu;wAsP8?W-Z`Tv=~sz2id7Hm|mk>2aOfz`n;2-c@=Rc zMxPX+o^TOeKlS)CG1{O>A;(nQs|TDGxh!rWMOLSC^FHU!teM5gtdOa*-m18kuhf&{ z-cqR|s+xLjA(k&}eaB4fY^YO|inNaFjYrG9=#IiV`@uDr>-Oj@|7YkmpY1QUI0SU) z{>lHj_|VhkYcG$qNe-Kq^ptNX7d`tdv>9)HikKxwHlm$s>u$OEKUKr^1Cx)aJQm~( zMI9S(W9qVY949dbQ_84*Q&bW&w&lz@Nv3YJ-4d5&Ek{xY;=OSjr=OOrlsVX2`UU>`&n$tSN%obvVxE-G zE)zV{WruVE>rw&KL5C?MYJ5aq*Q-&GI55!x)Ip``Yb22(J(VgVQ~-AkM8_5-PBAgU z+bj!9#cGU{!))vlNgZQYOf=t(TOXnFg{|FP&9NYwbX25oGUcH1%T}~P#$<-x0#+&{ zYQT2dsQKnEmRR}XBzh!MdsJ21&QOu;TisuwRF@VdE`!VciskUPAm)eh5Z+a^M^f{Y znaeQzrlAY93GW`lmt1_Pp*nGULv_m>< zVl#d-c*Y>;BH}@-7weRrn~E*E0h#<(h%2rQYgB33MleM$TeWt9ZCHn$pPA-*}d+IHe5psy+GawQYQjD*=7FKmDfgf=h zW+4$eh^3iPRHc-Ihpl8vwX)qyqA6F$REU=(Cs_AeocCm3&)UetBQq*pgrd&e2q+^@ zEWX60Y+$@bgy7{$*!t z>TMCZm_@AMtpWp~L)1ff1T{8#mxz$@3X2eMI5{R|lJk>!-{ANg7r<(3ovT@7?lA(d z+)rhEgN6C3yrVQ+s|+qD5XfPRRiUU?&fcUBA*7Dm2k(K4i(xp)gVTlf42HQ_G8S&@ z1%pxu5^La$rc4k$2b3t1ndLCy@(}ZSNh~Z~&XxB{Q9qDv8ASU+h``9AlmQ|zb3-vl z@yhJ>?J4+u?%MB8;sQN>6D6i~kzUJ9EElCv8QQO`QLFaJ^<)PDqKMwRNCpVoT1{Njr z3L;&F6T1v-0GS~qKa%Naay2em!BJmB3a(WvT2zBWYsl3Fkhxa7K8CBDklTI_TKE>O z9X61N&Y6HKB8_YLn^w#fc5r(pB?TaTpww6T;j8v4GfSG-mt2=ih`wXKtB}iBVeAPDkFZO+7kZP28ZGPqYzQ>R{{_O1SR^B z|1vV&^x1TpJkU6oM(|h3qN6gcLU~P>jo9WT8JI%~G>)xzFrr5AjGn8Lj9~LqtkN8X z!xTI9psq`K?SSq}US|+uIOU@=yyqGOJW1|6Gdjj9cmABgq(vc0{l_LPFCx&99+}&` z`&h|{hfZg1@>1m@Q$ZfX)RBzDJYix`vq51}JVSFk1?35QPlycASi^uUbR-0#v zOrbcjJH*=F2(l3&!cg$vnhEa>9KL;~mq5&NB_17_nhE^)qAe-i{{rU5XgzxH!8RL> zIa=IvG0<27WEx|Lub`nAIiUW&cM~-vi5*ix-FgIVlVR`UQ@d#9JB#i5@@T5)0PvRp z4AYt;_>GuxO%x`Ei5Ti!s51kfZ3nWj&&BxY-$ zQNJ@b&1&PJdwC~v)M6mZ$)=Yy3K+C`0bL}3H!_jb_BL0DX9kIZ6HX+EFkEC5)N?Tg zLd@EjE-~I~>7DRF8hbbRr?GXVhzdt?x8cCE*+`O_CFvEND+XAcqRDW=*h+>M3RR5x zF8A3=Vrzvx%Tg;OQZ%bsb%i{6P)dGX8CQbON`{y6R?xId5&<@W$^(?p=KzCymmXe` zY^5H{tSRNnJUfn8M>qxwd1Z&mWx{$eKLYGZn_|ENLInJmIRwSJ1bkd@u!eyi93mwH zydppeDHIiDV;t%fZ2o-Si-+Ue@%CADxKapGr$DGYKy z!#dpC@HbHP{MK#ns-f&Ir#p$gYV6y9zdJ<4kQ`=h@RcQ~h6aKAqH&7@XJ7+1fi)on zX2hK^gbHhAsDZ=W)i0s45dhyiDdpi@OE0(_WgZPC(h#%rNwBb@!KBSUEpWWUN#)*- zUIfxgKvB!Uo23y9B%5?n{R-5q;bK?XU%K5eOTvW_3^uN1nHRiJ2&<`1;+;feZ2YhS zjWc92EgXtwURHdFd2B7pY=&JoOpwfVg@A}M{t%+cW|EZTFv-j#Iz|L)ZG*<9Okof4 zp|#vzZFD01m~vFecao$=B!y`fl4}TdkYE=OTgbYSY(zkv;xgiskq{+u4V)xO&mvkD z84^56%vmaLlEV^_a|xS<42&T9A23i$;06hNq#IO^XNx3tGSd%r{OXMR5sODiHG)Bn*?vt6mE(D1O+^LV6 z1ZP47KUB^fq zaB(2OVdw^ghpHMXx)^;6^g%nes8G_XEyEam!01pSJ;8==MsCrVIEY<&Y@l=+GGO95 z*3)+a_-s9CY{M%pBBKVs8<2I)Vs>Rnk&9_Tk}@dg!`+V5Hh6fUn1itl;~La#XyQX> z2MmvvoveB%NymwtphtT(Z5+JT=x$iqZxXl+;^Mf1BW@d&yNX+(Abz(7+l&X|w@`2g z=esWTmq++PSxO;~QS`TD$qnC#}i&!zCIY$$E2&l8Xw`aS9Y8(V;1Rm1mVfIFL z!yG~yP}lx;BHItDKM?yOcOcA2bGi{af-r>G;~0wsMu@K#$V{l0{9~u^RcNb%JcVzD zJHDSHUy9x;Sd39pguIB3hL(ZGG7A8)h`8ukxU+CP(x^+3t5BtaJH^lw6eOzxMS{#Is~ z;kFxI*>=m6>o#5oYsDh)PKDv2h8`G78c@ z#w(Io47+FREf^<75cK-8QBl6j$P=gUwyy@sOu%P)%P5$fa_o z90-wJOBGPaObZI7+zq5%b{YYW6n7g-1-9-r0?KuxYV5I1N&$fB$W=MPwxdN4g;b0e zN9}aRw8WSued*0|5*% zuD@K#Sg<7YVF)&K{mK?k+zRV_7_*Px2Ont=7I-gqWv)K4|ZOk5(!X#E)>;NZf7Nufh6U~{iT$=paLrsM zo0=@&xS~)^64+5FkH3>P(kd^-*?D#r7gtum4FcQHEfn(NY?*k~(kpMWAi8NrfqQ=? zJ<)4C_vM?r35sWEGipd9ieE+mG)`ODS^o*cHd`n1A~79g;n(rzVhF(_QMz?c?T#T0d!Z)qzDLE)OO_0cx7oVdQfrubxNmj%FL09Yvjr6`@Pt!EMbU4ck4Z80c zrrhJG)#@W*uq;MF3~WK@$=+apPl+8E2TL0gBVwpPksOoQXCqkI@(SZN1tfs3PJ$_g z#YNx<+*b0zTejrPB3c5RDHN*Z@_0m#7h#c_Nnj&V?VwQBaf^VQ0qm(IvRPPyco$YA zS6nG`q-QxvG3;MwMhDb`l6|v#0_#D_18&`%bTO=5s6Qnx3+E-XJ~4D-ZzY$)QCNu5 zq$wx3Q=l~kZW;;(5tvrDLNkqR1ZPIov5W?yYQ+l!hKyz&3*HaC&UzM?ch4TW-;Q8J zD9sSKLxX%xz*YtO&B8G6p2KAT+goD>*l6y&SP-Zg=n8y6 z@Mv-wUDNafwsSvgv)ca1Uj1WHYGvtrdQ?zuy*gjn^V|yxE!RYL5n`AFfk3d(P<}w* zu>4JF!J)``SyaJ6&ZuK7fCa%oYzFW2xlA+5Cf|lSu>A z9z(+=O2C+~w7K1zY??^P6CoeRNwPGQL~42$Q7mFAmCMH@d}hd6z#ud1{Ap7mh@osxji8O zLxPGJtf|)N*P(o5J*uum7;3P)ZmLCUVuAq<5mszlRhJa>QB^{je(J=&tgw^f@c8ng zsM58G;34f%_E#vct<2qc1!cq|C(o}Uk{ktt0EeUM9BOV}4`=gNt-9ViSDldHAkE|F#b#>4A^l;-x@{6Sux68)Y zRw;e|_>w19pWlx~4mlbHcb=GsW$J!OS9^IkwQny$Xs2U~awn(ULt;CHlS;Z1f!;;=i}wn-+b+!hw{T26N?S$Gnq<+j{PdMRa+MfMf= z3FuG=%H*J(Gg?u}S;lO0_m!a$w`8zrRb58V44dh$$3iq#U8pzXs$Vg3+U26_x4Rdb9PA(Wb-rJ~eVsO#~ST!PyoN z62obzg23cWACtXKU>R*ZbuoE5{G>|J2Q)|kQbR`~3!>^6TZ{2(IF1t*mOm_*k-3_* zXdJQz*q6zs+$zPJ__9CQ^s-$?aL~!}T8R2A=f#^7BjlsEGg2ynCzKX;5>!bb>DZjo z7>@LeeI%1k*L-6)13BfB_RY%u=Rdim?8}=&A(5o>Zy9kP6p7rKCN~Qitq3EbN8l8Y z+FGIIXX~t#IFijl$E1zGYyFOV_NnT>q(88|x zlCmTRFFUW{gXgv^&_eg6pHr#8i42kwop?!WC=O;qSF_@Q%3ad~k(s24-Y^+Va0~}^ zTYI|~fMuxdke{+=2}|iDc!I9G9s_J#qofx((qAjG9|62sIe0c7*4t|C9rrXKCiR*> zY4@oo)O3m63;+)34YtlG#hnO~a}H`w`KV{=5FnH7DV04?1L?OdmuC+FM4dBT=`8c` zzY0u*dk;J8OlgJOZc z?Ug|_bYpKsf)ezXMG+J6MuK49nYE;$;*m6lu``=*MN}%%jSJW%&T&3_Edo4FZRzzg z3aGWQ5^C~8LO7MK0F7zGpB>uFd&hc>Y1pxeh6hHWRHF=?dsJVi(R z4{1f*pKM3a|L6z4#a*Es6wXiWW$RBFNyGRK>EdBPB9(`=)C=SOSccYjN)1t82O&Q_jd8u1nLWm(ZMvvoCSx+>7o4+{z zqM{ZSaFi)E78Y`5@6;7hiRDf=(&70WwK_F`-;!og(yvjOr&$qKLZ%B#ZjDF_QmSdG z1J=4rlx0cZnIPzD49|h8M52*zXx}}LnT9mF8Y3mS;XkY^p$`GKVqiM```2H+c92I^Op?x)t=cvC z`sG2kpXsQ1?CXCdp4wI7JbNy6eLdpv9t49$B;MxK3G=9Vd2epJksz{#VQ=Wu?ZaxGeeZd?<=Sem`I zb~<)aQ%AFnw-SvuSlm?_#PQ<9YNiw;#&|T7-1yY zz%Ujd0yyeSHY4s2lbn+y`>3E8Z0V^ViK;(ADHqNfw~W6w(G~=a@P_kR91~pJh?Do0HIPOkCU^=GgmB;|(Kgv!a-y>=>f#3Upg-6vy{I z<3+L2OlsvGgN|b75XH^;i`%moH&wbWZi-@q1bdhh+`yjZ1oto}xp+Oxx$a$$b4+`h zQ=HKp=7{Gr=Q*A^%<;};&9wW%Z+>u^Ufd*u+j^cd+7UIa^CGZ20rX(dpm}Y8C!p19 z@)VEwW9A6qX)OuOR$CKKPB-BcT5|;M7Blc<8_BVm!ug$Vm=?s4iQ1B7Ul!f-C2E?Q zH%&=3&zT(*u8fI%TV|vyvr>Rx7a{Rtma#EPcx~SnFC8NJlx&_K+IXdP8s9V->(aF} zZla%?iWjAbQ|=-dYqL@n&8Z6K5SnD77P3uE87PYfq)z;g9@no)_(Y_q3M zYi4O89M_oCrn%%ak)X{%S*&hLW^3EouvMDInASL^s%e60MAo(rSuB=R{4qiLF+uN% z$xAQ<*1f^Wc(PL29?A@sHx(?xC6tM4o~le#wnu=|#*-D?#Y-;|*3l2=I27YVl`yqA_nK z9=4#3O`d>mO_Lr~57G&H6(?p(jO7p^W&Voh-K0oT-sZFs!ab7o7h~oU@j5`Nj5J2|XF9_p*zZd*lQE79 zd_V09z0UvWO^KAA<5N5_dGty9oR< zMNp8J@SbUYDtfH2cU;wXVb{Gi zYfxs|k@eV3VEXrm!KIPKubT-mH&kKyWc9qIKZTB?*_$)*g?uC|SRkQ11xk9pWbZ zB@zFB(pm{NQlXHlgaS9~;+ztNngE2F&`?sH8@h&BL7?{(Z9+@-@IfyJFr(fQhVSaZ zHtd_qV&Qy#})`YnQ5J>IcFp;@Wsti3-} z`EX(~H8r_>$f#wi9r}hQp+SDt*HsAdNSAcT`4N za5~KmHkaZCZjqv08vv{28|d|~o}?+Xil$Y4yXuDNCA=d=$0v4>oklS(7&8ze^Anpm zgvyX3{Q7NQ!*=VF+DMfoWoYQgxX0+~Vpxdv1xLqj@vZ2Z2v(i!Hi~9(hng$;%P3fI z-EM$(&(*_a7e&O8|5*@7(=Q6-kqyF&W3c6rcJ6dEZbUSd<#oVz>~lgD5qLkZhEx%+ zj*JNzBkR>6a;wie4)e%^ym0|WokqH91oQ#i8tkKyQ~@#*h#jGOC;Exb$N*|2`WL$N zRMP!87Kl_l?cl|Qxy}jz;ps#9&F9OQX;Q@LCZ-Xg3!X97K3=_9g;Hs;21(lLmw7i{qM9yI~T~PLtAN*d%c5L z%T4Tnp=PkPjU$^XQIgX^qa^Le-iH6^rGw1;$Mrix_bKDY(twAsfI75!Qe`_?@~!m_ z_gp1j$Wg}#*(?4Pm;b^`Z==cBjiZ4l2e zrc^63L^4^g#DWO29tfdW(-)()B55RY%IuL$s9GhTaF#50OJp08dp1pH4W8Z*m_~eg zA-g$(TX)(LlOm+o)8C>NH07#PA1=Qnp|HsYH*9JpR&H-t$evNcZ8mKu*Y-rnlAA6% z@`^a3rGagL1*zJs>YXR5avozPm{O*gCgw#06<1&yh zan>UR8>j#vICQ`uCs4rP%rRD@9u(w@HVV@A4dkLI*4;KTB~71$!EzJ=V^$f{BO=3* zGmJ8(^|PRp6G*~hK^X|Lj+3?JXs=1f@aoqBY`Iu5VlZkqOf-**>sVo94pEZE?3Ujw zJ+0PHZL+NlDSj#nlypUya>W@6s~O-?Y-W8gM%kv9H5Ea`q$3rOwd=&f3~3PVyt-aXB7OX@Pa?Y3U0NA`oDs%4nU5Pw={BeeCq)O%b>ov3#Rwu;ZZ+a0 zr5x^cg9RyxN!2tMx0&8U+2?`ua5mlLTJ*3=TH!@|0lxql*e@V2t%n039we5MUrh z=o#MlFzTX~?rk78X91wRvH@O!Xgv5z4CQWzOQXPyp`eywy_@rY7 z#>k?8MP?j;pN2f_HFn6bgC2int|C)dCr8%lZAPoKjbrPHFnbxeNR-s3?rRr;^B7<`wlOtnWca{&_Z zIZ|i_5unc;?he?&U)(q*vfp)*VS@|*s`X6TV$rFNgW@<>_EJu}M=)R;^g}zlaIJ4B zNpW^>G1avo5iOq(QxJWRfgf>{X`!`vYV3!G;&Z7Oa}hpsa7%JeI&_5Tg=toz6)V)R za9U(Uiiq8`6HS<;zoZ(d8nL*U8Tm3EK$@5dzX_#DoAm{Ux)Ub2M- z8x;4wLBc>{72?|%ZB65$$sn_zYq2=&ts$~B0`PMilmEL;6o3yhu726|Lxq)uXAP;$ zUC0o(?kGAWaT60izJNK%1 zgBPbDAf^H#3-Ny!3Crg0fO-B-Qs8rCC5vg{Z-YDQh#*lTD6FPG*4Cjntw-2!2xJE0 ztQ7%%XBirDswY$M8yV17N}$4*rY%jH*mS9N?G@-!sKTY@BiOiqJq?@Jei8buT@RgN zM5!xzp@hGhARx{_7mI9F4>ujW=d21^wQU3)y3i z@!X9pFvcA**`buuUX*s&!9e>h-n2G-`ucNwG=vAdKuJp&ET+(v2_`zSfwpMkao7JF z(K#sHG;esN>FEf5+HXUqOog<}0wMeXVGpnb3cUbOM79Z(zzfZA54(_Xs89zuQ!Z>+ z%u1s%SbaM(kVYiLqp69_l*nZkIATL=9%eSvnuvDHXa-@Y-1IMZL5ougV=zazfB6CL z%z05JHe1&mw=N+?1muO{b;pKA6V7a0(vqOLG{gT0L_$mlUoCt5p-3X} zp~>K*a0Hsj0Peu@6tA_yffv0KKsIUglmi~{gE6EPVu_=P$T|vGKo6Q34bqq@&`BP1 zHoBJaV7D~Lz<(jxk;u#nW6pt3*B-2@)PI2s3MM!XVe_{Th z%E={D%MB=sF|8+uF1J0s5G6?rCdxH`sqpfA%GBt%f-jv~PH<>2oRW-d*he%WcmTAk zrAnh${G29igc|v*x5rM?kQ7Zxdf3NJqisyV+;d{`?lB5MLSnP8h_(koZ1UZ;gqois zP?d;e_e$7`S{`^YhPz>_j~$5KYbfy+do+BqlF~_^1B^8mIP0vmxc}6gX4F)FC#Cq* zCZ+UIg^)wvd4t83*h(%GU?345%m4De<_{L%v^qn88kArGK}KpAIE9nL0HIn#Ug+&~zU^A5MgWq!7AjPnjE-Z~Vhf{czh+|d z;B#L}$o?B@l=cb-f}D<>D6Bm|eB>a4)O_TSmB5s@i-#n0;(9qa&NbV*5s#uq;u6d7jA5h)H4 ze{oO2ae+u6_##vwpf&`TR4okADw$afiu2_o*p-^74vEn~>VUK#HK=fx?Y4_P5|s&B{=)1CzTlkmtioiWfi1Z!d?QsJ1=Kqt{V3=e1GUg(&xCGuTuo$}J4Yoj>4W`J|&c^iDz~z@B z2Y6q>M~@!pD73=fh?L^8V0IiC1qEb1i}a{(E2L%H#{KRlBeKswV%J|KCDH>t8gY%T zn;q8dRt+2yK^W)|ZDHtzyc50xIz`1>hSe!7LO{tNh(w@Y0jghvJP30 zEJ0X$ggAIce%p6)7fYH5fFLiaqtiv4z(8ahSQ;9qO+cxjNLmsw843@f8m|FpoH1{u zF0Yv;3C0wUmYvd(0wyM`gCXER(s>VL7m1zr?*e zX_6PFuZ~!T6D1Sfv@DLnm0_9z(4t!KtQx<+0NAfPq-8}{TsC$b1e>g$iUz9(aumyA=$DYGVX(7CBOB$f*KWTg_8{>}@zoAnCw7P2N)kT8X+~;2Jt) z(wu_lYl%f3rn~=8@Y#w`Dr*!VI%HlUj@Qx#cT3m^d~|}Efhk7aOJw1-z$>M?thZdg z+D;1>05-@4WMiPX6i`$g0P--+Xx|#1n1G&gS&j78hxSJR42$Q7X~1E!O8+nh`$+2z zE`2Tj2vT#}{Xg2^NW~NTqR@NPVK_f!IlCNdJ2LCUD)_LEWEoUPNEp!Fc|eAX+5yp? zxJ_D$#pOizo<3DES7^$zv2N{&ymG6&Ir6AZi72%PW0VvbM=6dLHQ2Vq*^!Nl?DyHF zs}VjYMKFg&z3OOYQ=HEk)V5%Sd8bGkToM5vDM?|$YAjV=)G5J*vpms*vj;5zjY&o=jawbr zL1RVPfq44amB&DKQF@;CL!ZpHb8j(`#g@hexwT|)G9#-cxjQFPVih%DmoBUDqAMxm ztP-s-Hya+*|KNPSdEjY~adbktbJ{jfg+sph6e)aUE@zcHxA=Uq0u-qEC6d?H+^iF& zLbvn;b8GFUg||I1z5A1p3#RI0kEbJpF?8B*jOnoR;UtE03-i=z3Mi5cK@1iG>9ulQ z;Pn@cB3W9C0`%4y&>`b|$#H=gvTb_19K5pLl#GeYn z46_h&4tuw4FeSX29|#6nhlfRkV@2#9O(`MABgpT_JhtORswNQPKmiA#z7XS=M5GiN z#62_|)%*>ez|3jjha>BVbp`PbuS?3+J?%hDi6DUG2FQTpcS{6aPqmm-olSB@b&R0N zByGQBl3sk33kPm80f}8=p@ukZrKRX8maU|@IM6r%uf9RGA94J&H5gml{ zBaBNH04KP+pd9LyTI8bbD>bBRF9e}Fyql$d2kB2?!{Zi1uw(+q9E8Hd{^meTAi;nw z^u7a-Pq!U#Gz*jbbugR(ju2oOI+b(7jx z1Hv=NP~;%Svw`!~eL8r8d8Q{$FT&v?U{f}vOeez*rFCVUIOBuEE2G7L5EoN|H1r*$Bt5f!vCQl zo*(BSwtFKnS0A}tEvr~zPh2l#4oaiOoD2*BNbBnE3)7pt7S?)6C{P*r4F(V$K*&D? z;cV9{aF2Suj>fQvLufRsAkIS0`4z)+f(-*%*`g3#cKkGKBGL*?)Fu_NQ}CvH(LBK)elVggGB)L{h6 zX%D3~JBEqs{y@*spX3k777}IxpjZ7-;Y(ErpJOD^n{JS5aXLzkchPczEcr!((5+ex zQXw#!ls~7#C24tsQW-z*Tf)FU$^gCUgK6tm-YmKR-G>XWs2H99*^~WelRTd2;X;O` z^>AtnDA&{GFJ_vx%wPi&&@1f>6_ z_4K7~dSSm{bU^xzGmG*dj6aUewaK6=`QcG0I-HT75?$mc+GS5WL_-eZIG&a~0q|{5 zh&%3);0Ja=s!fT>Sx5w}t{d?v1L5XQP=Fh=$eKvO1jYc*(R8P(05JQvR3JLbQ_K>= z2Whb#cJDeflc#zH2ijnYDu00SNWCdS61I3Xa(E*?0cn(2G+KPqk z01Z?e7-iMvbcAw}xuVBI$bmrk#?S?|2_*A7;x@*VAqlL;3y>h@I(-LJ#}2LMv<|>K z&bLHX*at=ir(6PNPzU-Twv3h)LIG71VglHB^bFgVvI5NjKwMZ-psWF^=hPSHIUbUWIi7=lNTmA3&dVd zbPLz*H0y%F@EJ8X;p|}ET+Zf9k1Rd#M_k4756;~}yOz0Dtt$SIBNj(|-s#YPiWPL5E6q6kwA(o1-$fLevbov=)T#)L)O%*||q2PK9( zgWsljhNvk2q68CU&F>tKG(IhzBU6EQPp)j5#W4gOx%_)zVf-1OKq6|Ip+3(jGw8Qi z&dk3upp|Ud>DFfVkP%Z`+IiR=TFs6foRSl z3nQ5P5%vC3-H)g*kSde3xV?exo&vCN(5QZ)^$L^0Xl|zcXb{uHkNEnBrLr?;BBUj> z5LL7Q6c|$6J!DfryFWmVDUwmM$Xp7u=8ypWAocZ^cto7}QJ0lo+H1~FxxQf5anFj_ z0Ex~DtLnj+z?E%Tp9lxU3P~#UgULQsW_8FEqIL)2b<8B)Fl#gs#6hTY9Jq>BgVT;9IJed#zfY~OT-0XR9M5Z45u=N5TrLCtaaOuj6s>DG%*2~ zqBb9yt4SN3e{vtcQqUqB^I97!C(ZAR6{}Mcw(W8S=fx zC161$=6L^lg>BgdhuQ?>-)o#5fo51d=4E$?dWv4^3j~U-@Pu8lr|5Nq;jYq`#9~#n zB-Cgnnw8v!j&=_)0_r@E6?xu*iSaP$Y?Eox*7aGXR{)uZ;L{_#XqZU{j{`c00THXz z7!)+X$iD$8vcZOflLX@eLkgc4^-i}7HxPi~i7_ipwc_VOE247}($57c?+#*xmUXIS zAso1YtCS;-Iy+*u$TL0k&CvDAvzr}I1eXC&Iv1kyR+^lrjS>up)-vEN06~%tZ>MN- zblU6~?S*?BS^+gk(-M6RVhjZ`Sc2Vj`Hfx}=9`=H*vf#%ngHciiuK&8O62n`$6{I|(G+ttmUPp&>6A zrI`w35=WvK3N3D+VH;gK+@}JRL;(C%8bSo01zx<*QLL}5RmFmcMcOz96m$z1B(faoZ%A`I~>l&27AGZ-D9%MWr3 zK$xJF2AfbZd`JF9Lr``Eg3xS(fCZ^sj$0C?x1k>1w}=f38VNS)xJRW!C`bd@lrPa} zI)S^)+d^>@W!S(bz>8oFWU5>ZWT_klU=a0!wk3<#gzHL%aSe~2}W;* zpFHc-6WO-`T!i0R;Ccd*w1n9-rwO6SMC#fWwnEmD+KU?n)8O+U;*LQjINnKJ)+kj;J`Jg9%f++0?|~mgAZ9l zS_NCP&Kat3%y46vBzs07+;)I#a9{zeG+otNq}Qf^*5g9cXs*Vj5Uz)$F---eD5ecq zs)8y=h(pipudb?qD|0l+PK|pUI8QSeY=0~-W`Ghpf`|~17%4IBtz>wNb5S_a#tmK} z7z<5}8IdCv16cgJ#w;3|!0s(K`p9@$`D4a25=e^;7`1A!vldBIh}4KjfmI0zK~Ys& z#9E&XyLeWy7JQnZ3kd~M#*ij4i>?~b zmK&4x$~-itNJblQnc7E%M@0iQ+&>~YHb-PWi5QV`o zpMr`BUp3ec$_)!SlxS?QLsyIkl*26LH=S=CJsueYaT~ZoMLF!cz*>^{kxpYI5^dB!*sTx0qu@Pg-e3{8iOQwnMmj#VPW5;C^%C+b*`*&ZWOfkqxa#h$>l z#wP-c3<8S`$x=!U2y5OkY0Q2CYgta9c-NJyFZnx3eL^OnBxt^_n8U!IXy)hR%-PZy z88SYmQ`9l&paJw7+xAt2O0@y+m|*|&Cjp4Y=yk`lvHu8oQ{x|7I6c53JXkpi6CL@% zgH87O98}$(qJbU?35cUmQyp>y?LTD`*atftX9JjVIQSwK$oNtcLKv8)F z;Y`43RI+l3rtR9`8Bkxm z2xNGUu*+S+;(Y}fa7LO6j(S0o+ZU#e1^^QVdZ!aXO}MhI#>}8Uk z`0+_kUoTXhPno1mQ{l&n%7SD4T_aJCF*4BXO;9Gnh~0gmSSl+4D-Cq41s7ljBx8*X zXS4v>Whp8E4<~B~k}=aN(HBHW7MM|9T(tqNO@VdxQC!R1?~NxY3k)p*NkdR4U*3fOetWYw> zaSIl9ZG*(ywC^(YCo1U5!P(A~o|g!+hvt!>{MxMrfK^a=!~d=U(gr{gWN{MxI^0iD z061(HNr8^g2<`y6>etHN}^V1R0DjB?wP-ys~O3@iW zB1D7t)!Vd)S+5c;(%#9Qy8f~zj(E;q4*~C05(vw|4qnQ=;dZSH*2&lN86&=c^8jyW zViAJGViSNN@~NtD0|0}vQ9uYu;~_;A&J{jHHOr8Q3c=t43XHDO(5wIqci8~J+X~3> ztemHYC73irsm?G7Q2AM98uO$9LA`)6xr3PCnheOd4Q1^xVivv{-xlg zBHt+{Qh`hU+|z>{Dz&KJ-Xo8OGCn`lRa- zO@%wb{8Kdqs zi%1I(NY~o&XM*2hOwxaYCkl3R0HczwndTZ51p4WLXH1VnT;$EvBwI@eCn!F^`i{T` zCS`?$;CbVp9QlN&KjV)a9V|_fsB~ZYb}qXVPVJ+n!snEw5;t;0$Ie+2$s<60#>83 zheBkahXC4z5hn_T=TphEGaEdt^G>EbIU)XXRSyS;UezU;=$bRlnI5`mmm@=m=4U>c zKSs%ZEK}2|nSiQ_=>hrMMp3qZaIxS(2(afD`;E0Yh^Ix zwmyK67*6b+rK~tRIspbGuy@G9Hg=0gbzVmu-v!Q2Ok*S+Fc8JoDM%vc43jtpjf@4% zC!o(!f54wg51T^Rfb0t>-VPSf!#cCaw9X2c#T|Q8^$q;aS=!v>@03d!w3lfd_!dm;Z z&jj<2@M~JMw^U<=laV{5FkXNif)Br+v0U)Oc!FdKPZeQYSgN2Q)7|He8h#9_!HmCq z%iHf_He>X^P#UL+^Fu~zv1~xOHdJBrBrp) z!1)m*RJLtm6QBpWzfXdp78icrLMzLziO&d#NJ+ zFQqvCqEE8WWu`(M%{zieY=yQ(4}CCe2H6Qb+z3}muYxFp(m|x2PQ(y>HBFwR-|&rS ze3YeGZzWWIbRhaKyFRsw;ghG}0&>QG)Xew;fCOO%R!Olw3tk;!1MQ+J3l(RSQnZB+ zas}-^kpqLf`!MVC+`7K=7yu7nl7xQT9l|>Xu2(e(tg?&X>L{|xZ=jjM-)Yz3`U9T= zgMd+GEmV7Pa0McR&I261)mov`Pr<600v8HduI8GgK^SRPkVIyQ3|K-W#sf}C$P#;< zc?U$5#*vBfSTty=bcOTxCsWg)4eJK>`DT`MTn1;XavRvv=62fhi*X(tl^}1Rj~CKh zv1s-W6E?;e3!6n2WtdEyn5Uq4^_CCUF@6DeJd&5%9~IgIly92o9fL%N>Lp}V@s=iD zx@4Sr%R_Rf1(x3~3Ha$GbD zc@eXpETAzL1^c(KGM&`n34Bq9jT-CO%#3M%tuDkWFRjZIl zeUD=8AWRzYosnWM3kcQ=)XCE1p>xMo0e5D_5Hhm}g>n^4dS9u5@fE8w1(Tm?4gg&mm&XL1DoWr2cI<|5_qtYx6mHJu&4qeJ0)k&J%q_L;?(f;Ko`@+I<^I z%yS3;>u9hgI%2#>^6pQLrt>RY3VrOJQ#2MR+P7d3&k=-+qgZ@hrZ7A+qgG&0wX#ih zK$>q~qBE@t&ay3Z1azput7CIlTld^;SUqNjo_wyqBUpt}2_^xWUGl;AhP82ri_9*m z)r5{nShLAJ_o+DP$;&LPgjQDhG+wPmp?r~Rt z1L?{~kzD4U9=iE9A>%71F-*Fqb2rCds`RSvOD|x$US7Mm^Ub+Lg4A!zpa8mS=y>!h zA;<#pfH<&*o*=+gb}b^KyTT|1UA7~-H2#^x%*~WcUX;{zQ~*m0hLE1(~U{c=6Nw|JJNIY&~$ptxZ04ey94OCj)w#_ea zZDw*?z(Sc^oh)dMLL>!Z)eh%<}`MtR-!q3)PZaF*YB-xVTb6|moT zH@M1TtKNSNRqBNT^%YjTJjxD>Fe}$dcZC5lV5Xxn%opQ1U!=dnp$x(u7TjfiM_pVyh{g)rf z?irB-W$~4`pI#HW18f-8VQ-^MjY~I1wtOifqRzZ;+Q?%vbOBg;LthBk>>4z{NK^(t zyk4e8!I}f7$oy6(O%>M60ht_T<2Q9R!1SuE<)$#^rC*mR>TDu=CXG7^LUkd9kgDkx zFxL>sLo@6w!V`{(#FwW=j0Dhn3+4ryQ2ylDs|tF&dZkRSxDaZpVLPVDMwaXT8uZBbTjt;Eb3$S3>%*+m^93)Zwl& zx@36@!|kocWWeo7h9Q|n>^?3DBdJ?;j{LzDrqY=!4*oZabceTl5^rb(^WtSB2Gdubp<^H^g8I4mTM zLWo8hkc65+HAHt8NfOLn{a!}MU_WTS!|-af-;A!fyW|Jwja-e?^B;-<8gGG$xfH*0 z&D9H6fVA*Z(iD_Vpr(T|n{2@Fq=7#+bEhkV(P#|33E6^Tn`$^O`-;kKtS37SCHi@+ zvv;KvB&r+wwrtj6zI8UC-^_59*@XYF&C!+ zxF7%t${$z=AqSE?AnAG^{k&2@S$eaC03n4u*c$Kv28q^Mc}Sqag0BEo*s~uvoq#YE z%5i#d>9QE!aM2~D&MX6{*oO=qj$Mk@Vp1i*NJSV|cN#GjQdh7*YX=qn+>b>E!}Z7x zGddw++;t+9JTH{Y>bP=(lqh1b)Tk!Q^*YmN0qM>mkq(`ucumIvWq6Y_*o@at!F<0F zdDt9yG60MbEN};lp-fYd(WHhXt|%Lv=_!Dm5(_y{5hVnHB9^6DwMkNw4ncj>6n_~R zzJr=WCb!GsA&!DedNgL3X4b z669v1pg*@p%sm#Eo4RAFNOA_soDgxSaO#s<<_KAs&+!Z)9P&B&aX^ALiZCEC9ihd( z$#SHQ@9q@bnZ(r-{!1DmW;WJ)im%Eylxv6l5I8iO5YGR-vQu%6W_E!*f_cy8fqEe^ zO_WF{m|Pa!lbiwYtRNWL@+%dC6Ozyn$90vWUnhEEB!7cA-l|n*q7d8YN8jdR-)mDm zKRMAh8QCNZM~edPgj`&_-W>$bamLUx%_2gtSj#>bq@XTv`ytCvF;ciWxU_9cdBslU zp39MbC6rMOh7=V1TvQ=eiq7;O&Y&X(l7`le4gA>x(?w;s>k$#9pZj21 z0L{U;OI|DF9>j%!HRQHGE|})O4BFSL1Jhstv{lAWepViOy+NjK=&>BMX^w%5z#l+O zvw(FVPiIaq3^KN=u>lZwCi{i@r2r0qu_q!oCragdNsO!};biHi-xuWU?mG>Yg`Qz* zCtuq+H=y$wPP*WaZObXzY{eWcw(0~y;?4IUw=7C(}Hvis)i`JBt(%|(n=kElt0H-3h5ODmt>NxVkCEtbAZAw zsof_11zqWdSWeNiR55r7Ystr>i+YkO7JrU zs!heGzFL5=3`|s*ld6?ToMG}ESimb3wqQkj@Xksn;2hu`3|o$Q0EB1<$2>>@KbJcx zQHSbYssboi1~Z!RUcR{sIz=t-@ymsnADkyw)#n^nA6Uzx2WGhe;W*am05$dlP?Poc z8t5;!r2y%57y!kKvA0AhhQ2Hb6}lz6NWdAN{=7)Qe(nj~VvJH;bFUUhL)OZ0u9 zZYyoBeUqtKy}=nh1U9-RX&u7$4i%R|A~gUQ7aesl!Ho^AYi1~Y2%b1O%~Kacc%)x$ zI1o=vJZo21%t4J!H;^vAc_DWZQw%4s(z2z=B)ibajY_-m(=#B&$C8PKf(~I}KCnDj zeB{)Y2r<2gWMf`#=F6~j!4m4kJd8RH1QIyopQo^xr*S_YX+bPyq&~_6MkCXg(}zm< zmWP^>u2^z7)$zSi=xR`P2~S)ZZqVxj_JWjk0GYLuYsSegD=$htz7PXfO zqL&O1G(w#1S;)dSoDr{{Tc1 z>=;B#T^4BcP{p-vMhK7)+?Z#d+q+^)x6a2Zg!7Z~sZ0FouLU{Tc&hh16I0<26h;g+ zG$At1-r+teXg z%80Uu^2n;Br+LVJ&pm<{K3#zxi=KBfLlhTQh~pn0R-Yzi1!b5!>BX@AEDM*mtcD3- z!H-unKX^w|Ss zq(}&M6T^g1iuMz1Ob=&n(Mq}jEgJSDO2{{9kJAS<1|ZTL)2kwsa=#I+E!^Y{A}iYQ zN-MxjtFq(@(T~LoM8YKq5)GI|j}~MMxI~UdTF}h@BIA{<&b_9iBNh~7A*C@l{3l0~ zQfsYN6=T zd;d`U#wi%-V0PoJ-&rQALI`wJN6H(9I3|WhsnI_%OFVxINgdLZ9S1r1JN`l){7jFs(`c@ zI8_Ab>_VzmFt!GBu<&xqm&b?(cw_B@IJV6^45?*Ubfth=E*eIr9P+N3T z&Q4jGr4gPI_KH<4wsNU#wh`f;{kMjZS8pbLt3iSEs00zrl-Sjw5=@X_(!}Q+4yD^n zsL~`6z0^Gx=-RG#QN_asNN0Bo-9J|QLvHPEUm;fy`fb!I=*1qn%y$qij1KQv76V&# zPuv=Ty#;sv{~1t*-PVCOrUojEilp~J?3k3!E1-8$!Bc+eQupX?muprsK$cKY>z&w4X^>R7VZ1!0qMbw9j#U*4O(DsoG9@(Eu;Y^Dz1%=~C)9Ftd z{+zsan;LSdAv8yxBzOb>=aOn2&S#5ZTo;A5)v?BC^V|en@t_^T;2uGF`)*-c20Tn= z?_IN)FEIZ7l1B%(_tXszd76rBqpczAsj*Y6W(S+9G){AyAJ*P%dJjk%TPG?CZYT!M z0Xn5)Ik5}4!FxB?F9qF|)#_WC#R!;AlLl6x<@?(hDwX>faYKh&B2msLHmNvbBql83Fw!BJ>JPleeSRr$iwcw(dHA1^^N4nGgyN)tqVs4OJ0v$e<(p9H~i*}#* zr5|#FpLNo|TKMU)C5MB;QEg6At;s%LwpVL*b-7p41Rgb1fkv4vq9y|@T&xHtTX=Vk z;oT}4ibHDzfmOyaHEN1ADpq+VK;S|S3c%8k!^d($XjLEz1=88*GvK)0#D};Le6tKZ z$u)9C!{mK%2+PEN1@jC}Lf?VfgHMuQHiuul=RlAVX_JkVECWybss!00cA=p=yeX!{ z5p*B_zZhHUz(!zcJu83}Ku!EXdm0Y?ut?`|Cv{{zoFl-71nB!~z`%GE~zcpEDi9M?yEvQ=v=8rmY3 zr#mMYqY;2e6>L9Sk@&(B)<8=5NBZY@l;aY=Qq`1bf)iBJzc*@MZ@ivNaI1(Ot%~X# z1Zqnw>3q!!hSbrjbE84rjMC`35T+t%gNuf(??9>y#UdLp+S=~L z86_Lj;KkzlAyF10@`)nQ7g}<8`PbD@!N37^q3W3qi?RR5HeUYvu1l9<3hR#}3@Ke= z5jTY;#eH(Th=9BlFW=-SMe{W=%u!NhPYly_o)ZzJ1ysWe*?4`8H&EAvgmyvv5r58! z$1$3rd^j%I4Kxp@mMLF}PI)pZJf*mA+?$*)mrwi`u`#yx1_QvZag!h2l~O`ez#e%G zg|^(yATyI`bd8URXfiDdM5%YfvFr6RlpehWAow8FpwV4K1EkIA;)wkU%|&gx)jz?j zH4ueKGUjb`aM4EDOCwMYkz$YxmpcFIH7?Bsthyd_pjO3@!|tj_BVTtPkmEuA{8<5YgUZr15Ot??nB+7J-`%M z3;t3J;fiKC4ZuYek%zQFi8!Ew5B~N%55_$rJcU8?hoh3nGI_{YBV{mk^e5_Fm1wKt z62iL-ciQ`uZqEpFTjFODej1W@7Z%raDXCvd6SzM0oM!M)`$~G<4hjIgamF$PyWA8k zQ@u_^lAs_y2FK^!?zFRTrd!?R>-K39Wu{qb!>p_6VQ0+-a?-U9@KdOOGr>qq;}ts! z;H`u7lWJNSjZ#SRDz^eKAs*Lt=kLDGEHou0*HHx<6}m(L#HI(=+KiSWTWvI+(6=Z&0*BNNs1EI44p$i6z@F9a3B*2`2*iQc$|DU4Kn-^s*E#{n;Cb! zqL=pNWZJ^yAbK$FV+wVDZ@9~bLa{7RAK!bjAoq}vq~X<2_9|@fDOF94e?fYQBl-u2 zRaY3SYT@x{^%Sje>fc1pYt&10-i!b9DI4D!i~BHPHcm54gEBi*l2Cpu9TFuYEyzUE z5KOOCGRCB0#X74+^F9s5(^XY6MAKZ5nU@q`Xtf~&%qjtq=%o5G@n4)WHxf;YE}7$S zmsRP~TtFH;8kIsGDmZgeq7Gt3f7k!A4 zKc{zMYcS}o{aVfs(1(;=1pG_RI6y+q1yGOzDGX1mKFd{H@~6*w!_9)_&o+8T$YhCe zuQ7uyqUJyzNc9NHS^eB=S8DYL4~l@vVvB?zrd2TUijfwD9ymNp1}Vg54ZuLpPL+>X zq9>FKYURH7?AWqJEbUFEAEFkV0(v9)-Fom)a1*hvhZ$&~px$$&koDbA2tqeGi(7y& z8!mFw6_gCfRRKm@ca>E!>WFqI73F3U3tNP`9A@{74O~mcd2$^{N|$;)B0~_^zMGUR zBAK#~g^44MbA9|}SMEr`%~4M`zg53ReF*8MJ&jr+RY12xnwe(Fy9$D20Wejx+#Ch0 zW9x>=3S*0m3|txBYjM%V@Ek8D zHNG@HF`-O?auB$>IVM|B*y&0b<1$G)nrMA084ihzLC+`MY1eP%a6{6hOL_?2q|bxh zz;zKag0&wtHNvIh2q$MQ)%sJN>Hw&$$>Fke^jome#)ARLCdDEi=+UhilG)OC$Qjx{ zB8DYJex4p(&3^y!&tT$Rl5!T1nYYoq5TIV$2p2oVWjRgMN(8r6JEoNZNFD?{{1T}) zQ`3fX73a_6@hKkw0QJjwcB`5uO}{}g%%_@_oXbVlzQzTu^fj(R2H<$N6@5M_dRZ#? zx#^0(40d`4Ez&ZrhXp7$sN@KT*;XOjq7sGVx&o%~rd8GaSs7&iRwYDZ{ht{~S(!tF zwQOZ5Os({LdGCgM-a;x$l<7}iRH!o4>bI?)M&&pyN@WV*7)}Ft5&;m3EK4b!4A_#x z^uRQrk6-G&h0)a+ri}i-X>?s$AvrLxj_n&J0LG*YHe-cvI#D|Rw&!u1fgyKUZ%c7k>mB;Q-va=(ZlZ_gLVgGEZir%wcQvpt(UST^AWBi zwiJa()lE;&%n;2Yw+=ij3V<+Xt5ZxFVQ%;v(x0rk$DK!pbc`fFdNY!AQ3VqOMfR2g(uraMMljn{Yaw0am+_rG>exC?7xpS$#ti?-@tYHs%trf?RxRUWw6Aghuf)JH&=TkUko|i#1yacZ#>{Fc0r)`YXuF4@13@x*D^Bjul(4Wx;!e;3 zrF$ok354XCA)!gUt~ohCJ1gPxTWQUTbj+p^D0fadlFsA}41&T$!g*YsghM-)(`f_l zjR}ik{;+72RiG46Dh~_-yk~tAi;&F`q}>^da%Im%QgzVrO(GtL9T*tXsCV&uOyT#i zw@j5soKb6p4%W+olXP!@tvJO?(@Q8I(>29i!wE(1` zfkynDFUL#RKxCDqDpb-5U~q+eOdpKr$FA58<+nVHU1T;i+;Y8<4?X!%oJBkrRa{!S`AP>Y)L* z|WoFGD|?-|wiINm$s$;M zXhaCOXqe+#zl9S7;Bu$jGk*lA*%Uz!$XXf|NrU5d+8eAz_pOvuZ{YDOS33&pu^RJ8 NbN`kq065MBBfty~TCM;9 literal 0 HcmV?d00001 diff --git a/docs/fonts/Montserrat/Montserrat-Bold.ttf b/docs/fonts/Montserrat/Montserrat-Bold.ttf new file mode 100644 index 0000000000000000000000000000000000000000..3bfd79b66f9dd2a59deef46385ff5d9c576d6aae GIT binary patch literal 47088 zcmd442Y6h?)i*wK?>2R(CE1d(+zl>Z8`~J$1aJa4 z2{;rHY67e=1_I8T1b7nyNg&BfUXqYN2yqA@^bX$r|IXZ9Y2^}r?0Sh{&V*YFt+*~k)$J+yfP;^WcYYq;xHuid`txrcwakujdm*ot??Mu$dX$4_3% z*zkO$myIDp^Sb&CwD&VS+s7uhZ1a?#8AJM408ic8^}|Dp)~rL?kQ?piObl(?AT5dQ z!E-e7o7W9ZjOO*Vyvx`QJo9%ptlzw)*|%dqV>`b<`PVmW8r|^ouJ8Vkv2B2#y}%>} zxFwr(ipfmNa=lK(N-~p1Rb1v=UVxj-moYr_s8lMgN}HgMSH~D#i59)Zp||LB_~(8# z|Bn9->C~C#R;lRB^C%zqm@!$0I<+j4xx6_MTqW^NHCF*76k&=W0#hz)od9$07z0&;^I=WQZh44 zamKjhY>QnNX>_qv9UXrd20seAr2{hgSFm3 z0I;M8Sgb4tjmYeb^gY}q!l9f997bY1on9LTPT;ArOT_^zCI%64bW}ooRAO|Z)2xn6 z#?&ZICM*G84h2g#eIKve^uW;21DpI$@UrpCE*rmII<@HL@$s7%U9oj!WUGHRs23Pv zvKehzSsZ|nF<5HAz{NOjM0^x0^tu6?N-e8KffmtxW0xju@Q^=>MG4~3My3++=tG1f zZ9Ma;qzApU_#fZ9S0NQ@m8fK+m`i%hZYSa=<_TV%>YkasKeZ=L#uk^yC|B1;-UMDzRmj6%EDgT>1Nx>ld5cSF|(F-=g z8oLy-)5l9hZXUg@Z*r1KVbnSR$Tl&WsmMu877Q8u>i3AB2#c43@t-1oj!dH|^0PoN z9;H|yEI*@o#slvJKH$#-mN=qCnKLeNtQIs~rDec1Ktrox(>0F8>J#iVU6Y;J<(QtO zdRwVQ4`y=pCCd&vJs?)g4XTzMQA{2p)fKkdIXSm%7ysb;C( zWI!pfC@lxjAU~`>GGGKQFPBNysii^B9IwqOd>koC4&nz zcB!$v5g$OU(JUH}B@hu?WZ5Ru;BxLsl%D6m==k|J4sZ>Zu8{b*{de-Y{!swf!%v)P z24=;4BkGA@cCSSzOVo@?mZ*O4Lh3WBr#X_KCv<{zhP9LnN9vT{=;e2;UVX=M<@d0{d6i$# ztbj()nq5H2rC$jSbauQnBc5nhU zj6?z!8*rEq$HmBnSZ;(?Cr_`KiHVFQniA8JlTai9EX-+%RG4pwy@Yr$7H=ypQyx|0 znbpdIAbmw)$+vB$Wnu5$MK_O)-?E6-ahX53b#!T({rll9lMI1Xnx>*yejqUb1T{bqlU|U2TpVL0GZ+#fa>M`) zisYbB3bpPrc+PEq^6Fsw>(Tz~O?8{4Q$7BJ_0`q&9|%faA-984(^wu+YMKGk0H&X; zk}x-RAp`z~L;Ss61^%9sYbE}!7Ti6%00b&z1R=Kw`2hHU^g?)02v=^m4pq(GHFw1g zeG2U!+L&5sYM6EA*(ve`5qIUen-)Z`ylJ^Y#ycLhrx{Clf)Fhf0V6n0KfpM}u@vU< z7R7R=2CyMasZ>E8sgXncBAG@C0w0!XEhe=k8$*LpQUnOCQ4&K1Awtq$siUDNAEVzN0CEjMuEsjbJHhK|fkU#w>orWH*Q+pr zX=(E$CQ2Xpe|f9_R}Z}KA~AZ*(rEqxaDcT;wG}l*lhhHVgMdo9mI|C<#>$~AOhUTi zSeNjJD)Fb<`j`7}yyd>rci()+(OYj9OUUp1PSl>n-}J}xchG_iSP9Ef3=(jpRt3&8 zwH#v>hTw(ZnUIh`sJ3K7VUaz?au3$W=zH#bjLRQAdfUwpe8AQ3zt2Z_|DXTtzu$k9 z@bDh$K7qP*EW?|o0hLZytsnvmJ*~_RgRPX1;NiDV`rrNT7lR3!C)H4uG3o0Sfu_6U+zbclxZAcspUq*sI#AC#D0UPSd&1 zVQf_@&58)F(R6E|`KFuFQgtahW1^GjJTfv3@`u*uz$KBaB&MMtRSgD9Z~NV`lM_|yfS z&y$6QNaPcIrJHvTcnxW3jHTJqtXUaoG{x$$CPrWeLxF_g7ZSKV9xOsujW!#sIiak) z)Mlkck>7maYwm4zONusLd}&>st1qL%y|W>`F6N@a!d%IE$u|Gbo4WEk3%eG2%1y?J zEUUlXVK1-Gw9$N3`uR5ISshUT`vk1^eDR;oh<|G;|A#Z;r|bDRJYH^`%Kuq-y!7Ez z{O1&p_5qLlB=DZcX0d7>+vSS}mXmCml3D{zMXd!|V|AGDs!mgvFXy~zQAiU-B4!jp z^uT~pp99u}NKhIif#?WHt=3@VG@7oim?&@(X$1+V-BNe3fx-)9#)J!I?TX=1QPah| zm0=}#L`0}|Hr>#L$_@;8(~65-uHx$As`66TELTyo&0)3M>{fkjWQNPGwM=R1R%bR* z1y<>Bq9`^77j3&nYr#6r%1VPoB0nkn$D(@cW>@uPZ)|PbmREOVeEX)Ym)6y~=7V5% zG#spRtg7zW)9HV>6EjWMG0Q($0}66|l;o)@S?qEb6fRrZ)4H%&p`mVjPV=t0->NDt zt@59&C`zp}+d${-m^ELMPGen3XWvm~NFD9@@7)U2ifP0A-v$ zVTQ0}%_eC}Pm_zpJw@i^zuei{y0dG2)eXn0S6g~|YHDyv)|Siq`Yvl}t&>jsKX33a zoZH+ymoD%xGq6xAcn36}WJ6RWsX0@YnXYNeOt-MiV7A*8%S`fFS~X2>#V+&Fp`M;Y z3m5Fp*q%41wzs#oH+Or+?ghHGUA?`#+S(c$I(u7MdOI7v?KF4Iu*p#SR@Nrw)EQ|I zcgXR8Yi)3JzTu6GgP{a`9b*w33K{@07DD|G9||n2p`oBmLGDIlao((AD1s>>zc7)B zp_pQLXAecZ)2b)A7s}ZbyDRe)8}(AyP)KWUs9M)e!_mFEs%!S_>YCZJYoya>(&}29 zclGt{YHr}_Ghdq;3iR0wNoRxf7iMAkY@IjRoRyh|URzQPNr?$iOn?I}2m7Cip;N)Y zvKquAuK+`DR!l@>PU`>yyy@UikO-yKp^U!La@y+?XV1H8*K~{%Ok{yZl5%i*;ph)6n=r*`sN=iy*N=C91EJt)gVL4^64u%BO^3c_tj(#IxB}aC6tJQBsak} zrxXT{iG-+5l8F{(=tK|6-=Jv^aq6JS)$sn|1IPOMCWdYGhFp`qO^V&-U&D`XOIf-$ zE_P$$Y%zjm(q@ccI?G{46)u=yf(9PPB@GE=T3WuqQ7KY2GZLIth$fIjK&~2)D~+=j zWDoX=krpP49wKP_R2Gt4(EV_N2xWt4l99n!Movby%>sDRopy(fL=#TR0G6Sk#5H5q zmd+sU%{N{@`zr-?*0GYgJ+%{^JKNiLc5ba*FlSC(U2kull;-zdf5d6ukZ$SdG&VI{ z+|zS$Lr;r;Pe*li2VFFp?O> z2>kwwEDKR^DeC!HP6S2L9+V6d)f0m904sYS3`f&y<~MJ$BLHGnpF`v$N6Bzb>CZ-C_)nVhp2L%Ok=#3582pdh}=qD~}|#gzS{c z__1ZeY&j!k;Ng%B)1lZf%RSme8!zlScI>ssUiskrzwSJQAzJ$4YyM}HHZc~bfwvr` zsVG2>ro@1lyz~^>jTm@n<^W+?2|_KufSG7v3m?vestwD8GQpCGFQ`}Ov>Mp7TDnw_ zQAh(d5#zu!rD~8Wkz^T491wFpzsJ*e(@jdNv)c1rdDv~zo? z{fV?57>5YQSjBp~}l+BCHmg~xw7Bc9eGCI5#r;-~BRcq;yTsDG)F zAN!(y>2kChaa`h$1_Ia^4Xuakg+`>*`8kyZmVh0V4%o3X7b|C1dgC&xG+|<^&)#+T}eWG#B?oR&+NDn$)YpMVG;J|&DY#&Ig$}Y-XdIHFeki1$A%s>~5{cP}{aYeN=oOr|aZFx|;6h=l#5sA+mR!%T zL>SJiM69kpc0<+rvz3U3&!v~@TEldRP%jisYC}kGnwHfG%JZmAXZ7T4tx8D_sz&JT zzt)rUt3&9?v8u6idm`WM_t%AWMaVLB(wg9i>{do0sC3W)x3~;k#@%Zd4r-}wAT5T zPm!9!U-?n=EQSSzuE-e3S6Cvs=ocQ)FM0?j(>ljsUtmmVfh22s4G>NQ*A-kb6hH7V z76@1|Q(OsU9s`sHje%5C!>23i(juC=kKMpO%Q+%-b@`<c;tXHJj(?EU6oe8MBN@+Q_uVTF)GJYV!J=^yJi}h^W-Y>f+fhu_l4r-vGHhk4-AH z5Ss_XS_I?_9mEY8^bi(-6(D3O$OJD`v@bFSLVg#kID^?{Qk!ezo0hkXY>v=g8eQmi7w+Vhg?XO(Dt{#Z^TKVl8r3#FF2VDsf<=^QbwSAO7cE6iDS@Jh<5=4Y>;NOB63hN5|Be9K^K`$ zggzqFkwhzX$RQXtj6zUIu&rdUDK-XvyRpeJINsNH?7#t=*^!o}*RNdhhi&`zZTr2| zL3`;f7`0W93lktofPSYX2?!Aa8c5iKK%*i78AGvT=LCK8L7-TeIZ5`$W*=l9#iUN! zJ}n^AdkoU5>$4UXuetQtL`5?R$zGdd$2MN%|Lfk4b{Io_=7{);phm{*F6%9FO|exBQ>_|3NtT zC{QMFkjV1Ac?q#PurX3OC1q<};a7t|1oTM!CbGmNhfQp+%ZfapD23(av|A!Af8R0D zlQ%D|GNI6D&WV@)cH7s#f&TpWvhFnF`uKz_yIRWhU&kk)_bBbsm~2D6G`6UJDxStr ziT_ZjARN|tCdt6S1$HWc2C(2S+o_QKW}e{xkU#H#YumQvym{Ml|0&?M0XR4csgQOm zqOg;?g;pw!I+p9E>Q(GHq>|_L8K|-3=)5lJ(W77^(gq4V_uw>CDP|C(^jHS!H&{!sdAaAqr`bYKm8 zFoVf(9*G$rSJ-}dDD`p?1M~ggCr~( zi79i|Hnn%n=G|#!iH`Jnx$cCz+Kg1`t@ieZvkk^_SH7oOAKRRm?El1JvFQ^4N(y>+ z9ePLF2XtPnIB?^T0aehsV@x_n^@ujO5~fVG=c*pJE}AuKQCZo-S+f?FISL9Kj>19* zzunbURM?%D*IiiDo!6J|bh_P6XFh0xzS_gIFZh4`o7&eG2YY%BE?Ojhy&WB}oOIMjFT8!@#@iPv zzlYXs-n@=3U_c9oQ;OY2HG|g@777VkKW)OIhsutwnyG_3y26ykODDe~wsNcXqBQ26 zR1El270&@K#bESkiGrmQbt#@~XK{g4mg>kB?m)C(=?Japf}Vmt1X`*1%-cNHm04L{ z(3yI1?vZ7)w>A{D+=i{pKyGzLUcSxNUEAVWR$n>d{RVN&04&XJ^dgN_dn-~wMQKT} zBf~wD)DPI|z^7n42K8f7EWoG>r0YMB#V}+ci&1!HHEiI=FRV{yJrFY+o z&TEV7bH>YSTlaMy@&AUuaWg-1(VW`Vb=meyGcAR#g%{nvcl;s1!?J*vy8%xu6P_y#cIQi{>i0cVO*?Bja45E7)jH{I;Nl6T(g|HY|q zZo2Ne>n8Xq|B`(mPtGFI>k859N^e=Hvr;E)%OF~{G)jt;;FSan#zany5!#eRO2PK zvEe%Z!xcqEmDL3W!k+`CCaDW})UkOdA>;}9DiTaJ1!%;wy8+mfA^3^m64S!uO;wWE zu5;1`ywO0hj_EL@Vo^45TOy6A)aC!e_xbBbq*LQ(?vpAueFQFV1I9K2Vmd*Ho;s*LZp{{`Kpd1XVONHB^>> z5~Qb3+#MYM@!@)fBK!{%1rQ|=^(I34zlq-kX~W3!yzr+3)4-ZMZ3oMN(=^65+8CXj z5RYt;*oQH|MO4{bz=o48#LGyo-@SHie?PA5!oqC2bX!J-w`>_6+0yUzdh6@)gBeWb z^&R{cNKg*174$$l)+pq6V1%~qEJDBw`50?))&LySL;8cB@9;mjdigK<`uaZY^9!Dn zfVvI<{uDOLTM!G@7siXRMFRG>dWsV(6{oNi;>23=RI!wnhoBE~VsuEWNB@iqtDsP+ zjJjIT4deR?GXs*e{$(Xq(zH&3?7e(P*mLO5xNZ*e}1S z>7qY<|B@3I4K~f6Kfjf$KWc47?Rxa|AZkx#<=&Ez`V32b(9v+30|!YPJ;ZQ=u@T?3 zYthfp24!dm2Sz$uIsC=Ib`PSLr7N-L)8WW-xhpPD<(W@v9bCHHQSV4inxjujGa8NW z_7Rgv0UY1Jm>VHcHhSwZ*Eso>8wAG%oLKfGVj{x-arKln4dA4tFqUFVv1X>Da58|> zfegd~ND5*25e0DDDL#MSVCEHP4(=O+AMdjq!Z028Bqi9IFAZz6}UNq3Zra3Krc<#KB zvdQcmi#0dLM*K26KR^3>jg_sfm5r8IcY0}KV_9X!-ZX={SKbNcVLwjzT(8=C~^qW zfRItlLZ=L4b^L5r$2WxWI@EPQdJ4P_^3_aUN2G#LAHvKQ@~1<%xKFb>s`p=Kb$sK6 zcpdtBwUE6kyrut)*NJWlHH!pKGyFq^xJfMF-(_`D%z1bn@E#3p+$5a>-j9Uv&ZqIN z2c!o9X(|JxVZ15`SWreZ(>|XXE3#UhEr#O%h*?Ql=P)b4nF2_@A?V|4AvnY6BOSfK zX)thy-Wl8>$OOoI1eGHwiJ57;ASjpNB_N=c6W4?l;HYiM_E~Wds$frjTgMduybx<+3Z17 zyqZgN4^r3aAV0MQRI$ zb!K}!+0N24&HP8G9dsd`0_-N}=pEkH_&E4)t3jubkmV|} zC2dIBcf_#o2<{Z#%a2@PxX!?1CT_)NVlsG}oFr-zG=NcvV#?VsL6Kz02P#4&8IIG% z6&1O;xO5eHuF_IhUIk9}2C#FG0$nVPIa#ToJi9qJ zGdIoQ%C@z6TURd1t#hSY^3CC+UJ_UW*A^OeC!JriSuyAYDYS8dREFFxt43%KM%k(h z>SE4lhdDFZAP}M@S_mUDiNXSW4+vizwS{3$Y?_}bEz8X-E6W?ZD&3i7w|%|P4d{ys zJ5#pjT{Fxlh+c?p&b&3WAg4ArJ*yzg)8a%AEV)iQdVo1Hi{Hv|{0MX8VKFxzX1^d3 zrFizRm>cAOq|8IsIPHHV+h$!6wE;B$nljHZhiA<5`%sIriUj9*;AL>NhXhyCdt<4I zeW-Se;w~dNeeP9YXmY2*%~;@0oUowTYCf(RX~qsG0kME!gR;YTk5cfshBeQEm4|=e zk6uibuH*eYMbZF~rHWHSwBRCSBD2z33(sBD6V4g2w}nJOiBN;X5r1=0k;8$D_s?=V zXVFD1IN5XTNxl{({u!S|RpESgp4$z_&V1{0`Btk4QcWd+I=&67jh!t#iJ2?xHHtqo z$Qr68Io+vNK-$7CCGr!A3-u`r6mjxf(K+pt|{PpDcpXf!}!Fb*!OO0YZloZ_gcV$ZF1=Z>X|P8w5o zq!>>wTDrq&zm;H*1MGbQ_GKp%#ZfC|am*y0k>T((fWur=fDc;A1n}tq9`-{S>Rc$} zbTS-Z(NjCKL1)4H2w=CxP!LWRAZ%fY6AdI`w4vh)eQ_#Uk^Qtxi-u_FF~V2^^MO8Y( z96I#w;`M*ov*$1CQFA0}Cir7mkph3TKn+bNQ8hhsyh1@dDw8NCxI`NTtIhU^!;jiX zI!|~*ZG*S&38nIZcMl(a8!m$ooY>#w*U6&6QZ6*Z=}@rz`WGp@6Kkg^!9V!&62uRJ zB}&-u`5fN=&)Oh6aS1p1|HAt(15XTM#qn{hu11^v>aQF+^c5cS)KgDVY1GP#MQO++ zShmk94upgIp&e{!B#=B*UY_kSYEx0g)mL{uiAvA|$W%BpPLj`a0YDnWCXWdLijh zG&w^$jISDYrKXqXNpC6Q;muL*ELW*$^Z$xp9K`8~uR&h1(0*WMMp~*dIWbi z(mu$HE;ifSl>+lG%onL~5K$s^2&rkmD+-cI2Tn}z_6Y1FwgFOMd{fL3i%2LY!9`|s zAWFK@^YY!o_s6bEm9?#G+`egKXK!)W?AD=1|2ST3VgD68 z+IMb^-7ukYn|Gu;)pzOh<~H?R60?3H(zDYQac_L?+(sU6j=ClyJI#NMJvG%FeHh5i z#M=PUAlc@#1>SkI8*bt%?0iSjyvJ!X?DFei-Gh-C=Pt1QfWu|vmm`iHw0A}0%vfmm z5A!vjx$|;!vhmIbn?6aOXpf=eUP0$dXExSP2$Cez*GZv61R5{x`tvlh34&HSVG}x72Ownjevn5HY`N zQ=J#@bg3y-9!qPeUl0P0h}{#|(8=Q=9{rMn{egE?STBSHE%-JU_|q%r9wGp{18iB@ zCJ-7I#zhD$kXyKeFFG?hGBWa=8@J7!RkOHv{yXpN-Mja@Lum)TS+K|6*`9%+7AI5b zO%};y$4{c8E1h61IR1y_b`=ip&^Em!k46f036e^asvGC$r!}IephhHIoXDCkwk(vB zu&0kc{`ljQxW4ZH_`ct~ILXWV%KH{C#t+Vb{)AVOzez~qm7tjuzo}!FNNG|FBuA&$ z1{`qJ0)RjaUdCB|m5L-=6(n2w;FU~iF0L5yl?~Li`!B!mzRU0DmV58raqqpNK5miH z_)VAt=U+Wz=zTZ_OC5j7Z|67d00fKKA?}wvfIxFXC-EX-q);prFi-5gbpEbg^Dh;@ zeEDVlyLb0rCVtUE9jgZHm!l;4IKcW$ju?bUGCK=2!uYIKk#B(-Cn41;^_=PL{wXzA zhxLkusWw`G7q0v9h@v8!4cA))^RvMR{`(@ky`aEuFY@j<9SWk^I(7$O!s!jjaOqxb zWs-jz&2b^cwTS(Ykc@_gLYP3!l5xi_!bcq&Lk;uE73&0C-hdB-y42w)g@crx_xMln zTlSv3Z2JzpQtYg}GUZjP4USR=@}59mJAaA4xMTZeC-NvM!Hg$&jc%#325Om7`6o9B_WRULHLA#z4w~%+7VDb*b4T2AxLmFG*hS) zivV~ivw9E$x~%S1L~>YB6YSOmaVCv)F1s^Zyum?>y+UFpbfmP5WJ()fTW(Ith%;IF z5TDm%FR`Vh$EBO4mD0S%&(l*A;`8iFhfQh9U0`*ypkW~^5t{cy5a!YXh{-e^B$^K5 z^)L?dCIA{P_us)^+Wf$FNI4;|7l~bt`K4wioco;zYq~PEky|A{tKc-CB4- zJM;3=(~0EsO7lvJ3et1abL`f5an@jp{A173>`Cnv%M0-}XlZO}x0@_MA$tX-Tskz= z(=#~O!*3&V=!)!Yt0gDL!ta^mcF!s9L83Jj)i~bYKTa3l0aMZS73Jj>m1Sj>{*l7| zs;d4%N|{FylmK*hGp7^{eObp0-UOIB)i{f$rBfDcO9GEExUjJb-=NZRqZIw^?YF=D zr%#9d&+xM0Z8zLNgEf~~B#30e($MM<)0~O+4chEdBTmCg39tO=+uM23_M=C) zkML6evouGt1I6-d(vMjMYi6H!`K+K?9FmW~I>%IQu3`CHi$n4_pN2>{!GuS`7n-u; zEl3iJP)QM_D(hB6!BY;aVx)wT8YDpxF8P>cD=^D?v~(noT+BS+5)p6~CKs}Qxu~}` zyj0{_4f4pyu%pH2X&MLmQY*1LU)fyQR9}k@m)o5VYl73}jDdSz=p`}O&w>aQq5)F) z#2Yh0?@F0|!&)d$IPFL`{O>l;(mGFTeA!m-n%dg&hT-yqMYil^_pDoY&$6X=O{^U- z=kKh&=6Bn+zjSRuYioH$b906CA$hc=fU5j&Rd=Dw!@~FVvK~)n29mL ziyp}081(rd--D2x;&NqWxje4oth}sTw^akNS3TA1X>SiQ@fyj-r8P2|8j40~ODNA4 zLZnBUm_Kr$dq+#hT&ERI5KGoIwC^!SUzX&a=f5a7+3d-&TRc_w6y`KnM$eu-tG~Qq zI6u41>6z_X)LAw^`;wyC>}8GJlFFWLaAcWWscB|^V(!hR5=(Xws5&-qOd_2+js-3L z*ki`Z!X)h9O444;e#QJx%mSwx!;{cau@^vg0xtIqJc6a%Dc*UO7-k6EWJOp<@b(NFq=f1cy9pDO%TXjR zC>n(Dj#RwU*7R2SAFiy;NKUJ)O*cYjtv5QGOL_|| zY3oum&87@fbZmyVVs4SMaqh~rjmJ)@WBpU@5~2hZ}s0 zaGq7>bIfMqz~)MGMG2gWa-8wgZ_tVY@1>P%`ptz3md<*M*3>(TrjQhRtD)nzWy>aq zhi_ZDd~#*)zOIhFbLZ~u?7Y0UXsEn=sJ41>@?ukYPC5Qe2v*C>Cx?b6moL3-<;vTa zH}qW5J9lqa_x|4A{oM;omR40QE%CTZ3*l{4URaXvLD#}DQGhdAVkP%3vvRc#uAF#l z1=-AYVG(2Sp$0Ov3>#AstE0J&sZ}~PZ2q)eya>0DepXaSxF{pnAX-3Fa>SOtC7f2Knvp`SrHBVO@WD(0xPq_@bQ?#zF@3F)i8F? zoW(v{cDAir`hkK51tn*8hhu{m)av(c*ueL9)z@TYWSF;u`c*tbehPBC7P}l?Z>>H$ zg4}6w<{aXHO4=2n!$ya+SF3^a38M<#VTclTmL9y)G)b3)x4_H*-)FMV;mfnN zHsRNbH{&F#_*K_zxLRJscNOm%UwY@{5=lC>(EkYU@IUg8Crky=`t`;oPF4-onD(qMXvw z9J=_r{5ge%a|#ORH@~MWC#Q@qT5n;qWUqoVoqH1XJl4MHlc;^yUMro3xez^?uHpaG z?g?|G0T=3~+WnJn`X>QlCA(V6k_sVaWea?zV~7-k2j7QLgJ1vz(#Z$BK`>cNNQVrk z7f&L;Yv;~wCog;GYM$-?EuZu+r~dvMyAbGGXfK2G0qmS&e4q)Cj7R$xA#*Ku@Mss0 zb}ya^?qKkA>|!vq?lHcwXwjzqhxbb>y1S2{b;;i^^#*$7Mll9oKI8s{kqDQf{kOEWm6W!( zm!{clX{k1An$+9s@wC!aV@spRG#fCGBrOeGk5ja%>^j1lvXAsn^(jRfwN5EjLiGYg zhLoxQO!GRw>Lp!J_4*<=HQo?uNaJ&)`jWKVG(04k#DlcdkPsc6VQQLVNW?w0VK$Al zN!l5>TKYA($(Qc2kqYWJ@lF0~q+f%NaR0(UN}v^Teu8_VL2!**~AxpM}q93KOQ7^kJY-ysPZ2eNQcXL_%{9uMwlX+mZL~3+4^ZxnSNX znjAlK@3<^|@hC=Xvosng#aSq^*GwC? z(|gUGU%J2fUc^GrhdeYH|iGuW~rj)1A)rgSgTWmPVbKna=Qw=+h29zhChA3i!6s!mjMn z#L&`Cwj0g`NKtqQt@i_7+Ju~1@`J?q_lAb`69*=w6|Jpc{G8?ThuK$!zrmOCB3iy( ztCHuz`QS5Hfv}gv{vjXXTI^{>vU~BSc*cGA!np`(zm!(s1T&q!`$PiULd^Yv6n-=K z7QJO$i5Zqw@DD|vPlGX+OC$V$AqU8K^RtqtA9=16c|H!tY?gNNzX;y>MKH!E_42#1 za>;mOy;5qew3NSzb%fqhff)3X@kBNo(#Zl?tLW|jRqQIn?~j>)27pv()5>=-PStFJ zKj2|@6T6H31G|a)__h4M`7hC%Xn4Zdr6OrSxI_)v- z+qz-hdfiUlmAdP6x9GkTaX2z2vL|vN^4C$bqi&7*Zq%buPenZ+T^RjH43CM4vBea| zRL8W%^u?@*xhUqFF~5%aAa-8tH)HRJJstaAtUoR?E;%kIt|abf@rCg>=p}ud{#b%5 z;gW>!C;T+wg@ivP{3B7H*qFFJ@jHo+BtDt=Zqh)~c+%FS*9>;Uh~W;yQ^~sI-sFAB z&la)` zOJAA3F?~<^H`4D;e>DB+jHnD}Mpwp$jJ+8TWc(oGt;~$fO_|qc{w=E^t0!wD>*B1d zv+l|IT~@%n%=};Gw=5RRY|9?YH!TlZp0)hi^0MXc)<~<{T48Or_FAv7{=oXC@`ZoY zq@CL*><`%Awtwu%a#T1LIBs$L(D56`KVZ?h+tI{>@I^w#^^%J+oUF7a`kGK!HpUtn&UzY!^{73TNE6^2W7StC!Q1H`&mkZ+y z`wOoqoGkPeey{L}!eTVUJ#A66@kGslH4`8A|H$l9ej z%q*^lm=!1I&C(_3Ui3Cma455Mg0=H}R*H-6)jU6N8h062Bf?K`PvCaCr0Yd`yDAm+ zql~z&MfnR{svM*dEXrl(45F`U5t4oeYr-^H@|L8g^vqg-zwART8}C?6?Z20X82X@J{?a1wlL6LEFm zN(f%jxa)DH;7Z3ud6IGctNCWs#U2e5tCCnp@Jiqh!vFSQ;00d5%J?c=8fL|1lQVI* zK)b^wJ&!gKFZBTK9#+Cn;vJu-kw$qB23{tgF}{?oWA`y9zY^(JvN*m0G`RuyQS@aM zi=^2i^6f=BE~$dqai#Kw%#JISzsGF2tl}Pof#9Gy!>*wjgtqocjnK0+6?6@w6g@1^Rvx`706Kp-+ld+Xu z%r3#Z7Iv~z>>c)fct<@CO8PbXU-m!jMfNWHJCB8*(Qfu*_Gk9rkaFVL+w4#5HZ}=A z?bp~F>|W5*t!xkb3A>Zs0XgU)5RV#?WF*$K2*|{-%z*cRfJ3qjc-ojS_VLVyHO|4D zkfXAJ$y|8Fd*IJi%BtZVv5qyedgg`Yq=7ZD7VL7(!TwhdB(ecWWDB9EcCtb2#IFS1 zuVy3c50JvPu#J$!HnZ()4ch^~nK2G`0rn(&f<4QA#-8ypx7o)Q^tTL{&0UYO*tuOk zP2b{vUx~?=GcdTye0V{>PjU=>59esv@UU&A$zt)b0Uv9!H9v?^ZyIdO_i?w+Jh&>~ zC%MfdX5SBceJbbT2XlB-Q_FCRPt($G@yU*Xc}w~&HjC+SzuDK@izx4a$?U73P{qK2 z`M8pMXoOy8YzaP@eMOXBL^*%h+iwOmhlk8QoCqF7jG59RDO5(GvO&|}z`%eB(E1{q zhJ9>azmIiMX5?y8UW{Y$Wp)ic8qbC)$D?Yta$sO&Xu!u^0|Pc6>+K&M7|8d@ZgY#- zr*aITFY2b=exKUb=+oF5(Q{-S%=f9>HuS_ia$LQ#(M&1SN0S0G{ra?nEyF%J&w|7z z^I`L0G;q8~?EqTl_7C=&hUN|Q+XgHHW}mmOA895+MzH;SpW5xyHn|>z%p-8C!K1Cw zhB2}=4*8^&t9*PIQ25k&`97`NOrS=iFDkYYSpckeaDcK5HVaU7?gzEetf{3j&oVVy z5$>6z7pc_3T>zm8{T?*89JUS7ND2%y6ODq;YyyxWC^4S4p=PCts0$SL*-;9Gr@9ti zD4K}Q*7#slqzv*f*(?KjmV94~8~-D##Wyn4obQWuqXTBMFQ%!J`h|e4aljW#PxJ5; zi>G{F9IA;IC@}*A!vNbC*EDE8JZSdC0crWZcz4(Q{^P2V<^j7eX4JMV-=}wX&F$~% zQzA_k#3zdQ1ov?k-?X6rczk@5j}JBa;#@@Kpr*#-G4vCQA0JP~NXU-f{^LaYKvv^n zj4zsv&9m50EEEPcP&yUC8qI@f{$xS|9Gh8V=v~Tt)X(_i;7d)7-~3bT_$=Yw4cuKCYvChWmH~-E-Z*f`WISW)K** znG1Y;8BLIUUtU;Z@>JqRCD9d@=$uO2q$Fm#nJ>omAM`H^{mTSgX7rEl7W9wqR`ieV zHuR6~cJz<#4)l-iPV|rN+2|kLbI?D!yWQp*F@5sgKx@LFxd~%CNVG77yU$IuTHyBO zyL|bWg@u>^ZJ^ZiPD9&Jg^hUVKg|I$%=ZD*An0Z9XM~9K}?dNihN(G zyTDkJ?<@PVtRU!NWG}}Mv1Et2z}!ZR0I2Oae7Mcl2FBBmH3p0p+@XwfLlQ7t0gjdI z(<7S-Ow=K=9gk#v zVyOz@!VC!1&LA#qH9%AKRFY2zCSo?X+S;g58pWDWn&^yzX&;;4Utq4m+D*_)N+c?s z8VaArfu{~6O^FH0Af8KkgSOyk0p5IHZKySY{ors7k}Pp{mqSBb2mVn&SZwv_oBDfA zSV_$_0|mzmcoODq{fyLkrrsH;@Ip9G+3>itOEkEB6|V3MXE)gB_EowLgZzlb4r8WY z2sR98fv*4{Hi<4189Nos5BVZ(jY`*voNbtC1(z3=C~i^ zBBmDs5i^(av><67<)J_y<)OfQ%0qz#?i1jK4G1knh>Or7_X)1V^&_Oj4NyK#`4&?? z5n4j|L})4H6QO0)W)re4r#30Dg4(3OAhk(>Afl&chBSNbL zTohU@;G)o&fQv%o0xk-z5pYrHA^{hL)(W^NGyxn}O%32W@#L#R!g?iGkKhJEI%V^D z@w5?ZErOJ1lMQ_PxL65NiA$6qW#5K+s+B6YD?!SzLkUub zoyc1=Ro|uJNz`|l5~S?Alptl_jgmD=eS4H3Ww=}kQii?ATRTRRXYrg+d|7Yxn3|RSx?V{{K&7tBB!WT z8;&z=qc?(Gw4|$=WoucUc#hv74eEMzUR{aCt;)nn*kJS~Hm2#wVMUq1;qGKBy zBGSDn-Xw3lH^v*~)&7taOyoBpfq7?qMS{$lkK6gdxzHC5_8*r=nvXl_=`r0NIB%f~QL$%<4uPXHf z(|I-g;)3bC2|I^Mdfim{)4VN|j<*HWPnE|@E5w(KKX_Xha1?>&eYlh`-aLyZB`hJ& zQ^Bwd&HZP=u!?1ZZ76xvEREBfT&W%n;wyq-oKk}Qu1VM)wnJ+lhZa8u4c-h}23a&_ zAv7N`qqz4V*E*za#?vNzheWg$~C}-u>~d8BYrcUb3}bxVB6RXyGS9v ztI-PO*b1vb0ZOfh?V}KOgsrfGjH8|{sCfaxLx??Jo4MzWZA3k5VSy+|odkOk>=z4Q zt7rfW)#oh%+jFqY`C2hgr7jfx-3-{M|K_k3&R1@_R>C9oTj}*?^pxIjlnEQw|G+Xf z#(pDgS=F#+{hifv%um2fwyHJ2!vyS1Er5AFEL(5DF0?_6_eNN`I$`JPhQ(?N*|N9_ z_tcBBytJBy%JF zPjf0y<0ek;8p(vc_7wYoeaJq7U9TRtsViX*i(}t`rSEpk4?XO9ldzjb!p@g~9SSqI zz*aX1JDwLdv}o7_A7t^|3Jc%8u=D)@mbiytO?((O!>727+qnbVy5GmC87I4f9p%}u zy1fl+-lL!$3+#s1fwI5NbFjmZ%k!8GcDaM>0CqJGw3-MNo zSvcG1;U&D3m+^95!7F(cujVz_;jH8J+{+tyBi=#sN7x6i!A$-gY;eC-&0f&m9p5oD zymiayip~Q38}_xcyPG4%MQHxKF74KJ<3+`u^7wHj%bHLYk>F`;ir6u_X??-Sy7d#f z_3K8Jz?Mstn8+<-n?{wmh*j&iZW5^xtHv)5=G#2JO+-a*9=&*Uoe~@!Up=-($+&Jj zSfSF!x~&tNL>nSNZBQWC1_hNiln}Kc@=+TipVEd1Ds702q74d({uDJ<2JgkeyNB+@ zMdc-?4WpaJ*N+U3uG=!YX>>%Op{Zeh!SK-L(d6@|DOEHy2k%8nRYjtS;-aEPRm;{* z>qTVotWqUYW2ts%)28*8Y~2tc?j!3jS*Mv8Ux(4rY#tq6zive2^AuGC@8uDzHw|5k zl!=uQVuUCZOjG*cDQbw=GQM_1+KO>3EX?a-EW;D;(|5A9Q~=`g)fI1~>Kd(r5obu20T7m385Ies;9Z{U}F zBBJH!i2q^|e~3!+AM>{$2xX%7F9N>6`;aMqf!~jqCh%(D>A;JDGl3rjJ`4OM@E*eN z;Uwc{ftLdBqtE}s2eqJ9C1c>z&>b-X>aYrEPbByWya+7ft)GGa!n@G0qk>Noa|E6N zS7QVvJ}U6K;HrcA|42~*?DpYf4!nu*K0x^l?r-AzI$*{rccjsU*Wgk%N+_@^5yj}=iwGtG!jF`cz^f=r zaWQBq1y7T6kdyZLX;+1Ifc}m(=xrKT#QYCZUc^^}l)qqv|BkN;>2G00 zcw6L>u#)b@*93mO5Bz&SzRBSASD>{6`0B8pT!~$xgZP@TsvQEp596BwE`JsFUGBjb z|5FU>O$v6JzKh!L!x|oqb@&0a>cdxy73M*)(wsma9>OTmH) z#LDq|Kjq3 z9Y~H1Jc3zV8h8q0s{xg&F*>h;mOf&O5tkYGCBAh31^OC^P$c^b(c5`Gp|J*K1l~b9 zj<*0O^ih75dlFjHVAo26H5S{gXc1C*_$To9@Tc%F%`EXDDp8@1=_iB)9R;I;w;435 z&=yjZSa@xTkTNSn5K_UjW=Y_u!4knrr+Tjmd?soOwSu`JVuIzT@`cJh6ATdSXjSB; zC=L3hK%rz%2lEBzLhxzo7Wlzb5H(@0{5|kp)b>a4Fq%oqCz5a_cma(B)vgh9D!d)n z)VL6DPdgiYkk7BHX(Pxj>B*lYs1@RhqC$LdGv%u4!n7`xuQ#`+e6(AB2g2!N9 zYXB|H{f|PUGCj7$J3(!t_oC)s1l|tZ2r3D-3l9CRh{vzUt2}*#H(sF(IQDl~4EXhr zM4n#(Kfemxf%vD;<~F3B23CHB@UMuM1ztd|;=r@W|03Fqq1;psDW5_DS3c;M;I~$A zU~oXtrxmbU1WqEsrGH6%!t9_=h!$Ajb3DOE;jDUoj9B-1>q$X9v6ztx^-w+2G)et> z8`6CY+M#rn7-^-R6kyjxxWp$PR}Oj_ix%|2jY`0S5*S|zX%5koSj^^knVaY+@I%x@ z^A=+qn8bAwSSe&R$gc%oAXr)8Dx!|S_fRv@)M>-K-)t7kvNHvv5IIq{cXXe;{*g;K)?kAT0rpMz~hhcRYQ~e3Bts&)zIsRGZ5d_3BDaA_;$45+fjmV zM+?5K6MQ>X@NJFggGTg0Bl-{{`Va-qy%+0`36Q0NbLv1(CdeBW^z=XfNLb16zk<-W zSgbZ0R1}LfARhQkL~L?sMqxd&;tEN4R0eMb6;~|AAwgWzl7bmI%@~bL)Id4$&ku1a zALThjxp>b*ke=!PK`I|=`(OX)aU$t0;$QM7sszAP4*K~#;Kw|DEATgb{g?}{f|r1g zAnr}fI!S~=E5*Ow(gky(Uho!3hmhqcEGRfEH+jZ@_CF7Nfa`PNCli+XZwEEtMo+_b zbvGo_H!*J*=5~_cq^A)|1$X@jJ@yBFgEswvzoEBZfKpO`=Oj=KaU$ZdUqBN3EAWFi zm@BjH--hG=_X2^ZguJT8m_-4;6hQd~_{DR0-_}n6Gb9c`8;{tx37=?Q2H*c8@cY1T z(ciy_wd`$3=^r4KRtNMLxr97Q@-Fhcfu2S}ZioDf(x4ft5jD`b(e(+XQ@1DL zt|3Z@(nJo*MVCUe3TLOZ3xB{}i3;hfWWwl7(IACLA_}~V^p6FVd~)Hc{)H3`M)wP> zqDm(VZTY;5#fKl9X9co?jyAZ; zIX>D#B>fp=BnOczdMH8V>zlTT)APmf2D!y>l2JH}U~yi|EmE#KNqzb&dJW^!$X?#D zj{Cds&i}OUEpX!!7SF!|g~5kHhhw!FKvGT2&pfOR|4xb~yhU@M$CE-9))JleUrfRF4y~ijZZgFGB-w28x^LWIZv{#GFIS2%#g+c`;9y z@^l69Kc+4Bay-oOD7BjqkN33V@m3QtFSpir+c%XdW&Nz>zeobwT6!9(V5yP`j1ZFmCODO&I% zl4|M(d?iAg zQD&(0!VI|30sW9XpN(E7E~K15_di08W3=rE-1I25HE?9ni{M;N7oVaXP38slTgO7BI_5%U;t25MISUA?6w zXak`qfXpAkp+|UnA$ndpneRE~dt>w$Qm#QZb9&CfmXee{=Spds?-uj=D3pm90E zO5}FVZ*n}xP23jd2D891uQCGTx+BFA%2Fwk@X_q)kDi!aAzmTj;4J(O^>sQgHAf#N z>A2U74w7XE)EtwmXjr5PQKvqK+JWN{)k(P;;}6}Fj&gf!ZPgff{M_D9pYxR4f0~;1 zxX1j>iV@ulJO;pvX;BbL`2#ceRcd}3jx-Rx#whe93I*22@&nvS+Y!F(R`_fum_n!aMx;v|X=T9_e3dKiUosj=$`Bqf zOgUqSo1(d=NpW+o!m$`$j!S9?bydeyXRU=NGxZ2Ff!R#H{j{pY$nD2YGD&Z?GoJg= zCZ1-LbI~iL_$wnQ`^i(#>)ocMqkMr+I`DY(IplRMl$=|cFktdxc||YSf3<5PiS7@Rj%GJlU_6sO7NIvDB1j* zl!-N?DpR<{dNxBJUo);gIVU>7lf`pmW`}qt%nmx;Q#M{DBAqc(vn$9MvwNpKgdd- zRv*^06W}oU_zD{3v{Jt`3;sX>g{!muDT}<%f1Q!DdH)L439C>Z;ll@4e( zBNv!AhJ7Tw8cpaxS({vqUb-4+kGU%4$pKp(Mf7I=qsUQ=o6*D779+0ERy?yJj?-O^ z{sxx;-wId(1dBoG1a_+X%$LqSHUcdN!&Ng@T`2Vg6ho_NP+aIKyy|0emZCmN zSC{MmNv;Yk7pu}%ZYzD%o$ND7Nae1QdcM1m$EnS2 zk~He|5O7JHWSFya`m66w)?zE`)D7`E^~qPLuc7_2{);-cnHIJ&?&#>WHV6hsCNNbeKjK!Tb$}Z!#eiV z1WXCoA#Rs3x2rcsG#DcqjS+nR4Bu=l$QujthJUwV-ffuY4fAe8J8x)r8^R^ScG$2T zF>HscU|VvFve;&SLTk0FqF@NGFoXvU;ZE(hqofJKWw!UEUd!Vg76upLUhauc+ z2=^Jni(?3DMJ~X0$gpiSY+DW0oLAwx4BMPn;kpdrUa!LS$8gr}iT)~R_Zr%H&&M{y zJY&8dc2xw(=M4FrA)hnkyS=w!k@r@#nBNz@w_>^XRfvjD-mc46IeK; zz3fN+N9R#KBC^s-m`iA+)rIRm(E}WQTWxIZbJ$5$8#>Q(3H#;*Ets)JhLx1M$2p|C zcW{+nSh3{2fL><4PA}i4#o{W7g+YCoJ?d~mw6Lepc^(HMe~PxHu4WZbc1r6W?*FsY zth&(UT(WqRXpG0xG)EYxu=jk8t@fmr?Ln#aZ=GInQhR>b>E={gxwnf~l3w&fMdJx_ zKu9v@j4p>Z?-Et24(*?N5(!7^mJ{5?-dWeCz7TYBYCj+CZaVdCMn@$q2gmZZ2&y%r zp>>?++ZXT;=!bR$6ucu~(DQZ3tLej@izA+kvW#zo%JGXCXr%B{(z8m|uHa652D}TB zUz%|36x2G1obqV3M+cTqV5?(3T<&sO!8n<|?h`D&3YC z+Ras3%q3b(r*o#zU8cc#bKi`)FP|rE_?;+M!_LOdjK(_f?1SiWD9L`-iKpPQJF$bE z0Gi#hvw?%Mn$KXDI3x@srof&;?CP?IW5+mw6$CqXm|15A81It_EAwD@$P?RHz!I=J z-j_*BSnUOJ!Nw@NCi*wF8fdlcKWf|5S?Kb-?Nk^!MSDcA-y`H8&oNJ^)LM-JrivDW*Krg5;-wa$Zs~f5T`}XOJC`DD9-jLz@ED z#*%0qT=8=B9ep$C2IT+EXqM74?gCG~i@vxLJ@Fnmlr*q0XyoO*|0Szd#cS8MoW3Sl z+2^78A8L1G`IPL^5ZA8uDn;dpyNjP!oGg?2L8*Lj{4B&aylNYn?k{rv7jdoj=~++O z9g+A-Yr~zwmHHF(q+;8X{b9)VJmnp(@m**TwLV2impQt)dhn}gy7p;=r`jB2#B>vP z0oNtw{CZPR?+WS-C!I^u3%sW#jMEBWwG4@(0~ulk5@UNTCB;K@Ru`?zN#1FN=N7Q1 zttEGO8w?&o=xS-rcCz-hV95m6amv#P@6k~}zTpQg90kW|3{s3_aI2kCITELwV_=t@ ztT7|#Qi8$&untajpShFVoaSIheck$5@2HIU9hI=hMDM7G%W8M-uUIru< z(F@w{XYJ|i1yZs*D87My_W{jw<7ak=(epu|7~-3NV?VHlqdPtF5l~;j3=GdLzxH z@QlB~I%QJpZ_D9J%HhhrHT6s9OsDSWeePhN2(40^n<=xA(f$$F8{r*w^h@o~o+pj2 z;D1@%5bo=!%72u^eh_5X_9 TV!uf}z&C0i)Vr*-XWRb)IXm>Y literal 0 HcmV?d00001 diff --git a/docs/fonts/Montserrat/Montserrat-Bold.woff b/docs/fonts/Montserrat/Montserrat-Bold.woff new file mode 100644 index 0000000000000000000000000000000000000000..92607654b7c7225082b354f7ec641d5595f3d8c1 GIT binary patch literal 112872 zcmZ^}WmFtZ&?pQcfdByl1h){}gX=#RxVyW%1YO+SeQ{fCS>*D( z-~0W$x6f41oa(Bs>guXKQ#0kJASsD}h=72A*nEJ1^Ll^Fv-{frU)y&TX{lGb&DX*A z{|ksx-z6kpnd4uf7y;o;;_U6bv6P~M3IYO>5CVcp9s=T5S9xFYNhuXoF$4tQD=!f% z0)n7efE>a%1r;_91ccuoU*}SM1p~FkLP=vAL;F{p!K;X02ncA;U1#+e#;(qv5fG~n zUTMrWYLf2G@erTPE$`v|o5Fhf8Htw%sO zg(JMdE@q|5L^3xuG(kXgtA3^9`42uW-YlEHB42U;$@u&V)W~}uT+D5p-4PJoU*|#v zARv$%xW=oKSlb!D(*6E{fPh8%iZel>{he=P=>94<#^ir_Kfk}k!nQTEF@41azS<=F zRY(3dU{1Haos%;HVjMLB0$D2pg4#tIwHb!JqvBYqw(C)aX@WuwZ=``2CU;-+7QNvY(Az9~^yuPH`l zl5VpU=8jTJq}!gbaD36dPUrRuYa3tE4BkL)B{`3MWOb-^G|3v~>R#oJoEypc!~M3m zm_G5y1Ea>;-9J6h+o)UkWw!61=ts`WXVrLdop>h3NYgy|MVizw&fNZHE`cbzycu_% z);~$yp?q?ML|^0Z`+BrKg*I5>>DZv z8d~uejy+e4(;Ujq`qn&26%HAM^3*R<*L%Sagjq)_-Z^X+k)VGH4;0Un`r8qIET!37 z3jX~{M4r)R9X0k~@51{hruIHuLy6hew5C>dpi~X7Ok1wp=B6fxyMKQkM_XI)#DJ_i z&ZUQS9?5G-k<`@K-e2zD5D!t&l5DySx5P8;A^|@x@)vg zaz`9ZeiuUuo&)=~Ssv~-M#tB<;9ILDyL@Nhu>drPIx8dQ80o&M)2P(`D*G?iKTT5TY?06GV?hGr?cf z-Y#7dsyPawq~DI#9i{sWSSVCN`#3ZCdM7$I>w)tgdlE@H8juPCeZCnuN|yVOgo`kI zH+Nh;>#-00$eZ_?BP&oUv)0^Qfnu2K#C;G z+Pm?xe?Wm7RCy^Asc-eDwsS}9J9}UE4X^ld1G29TwSO^GPJl7ri%fVCW)IY)54Y$H z&y>`DMs3ShBelP-pZO9AflH{j z#qso4sjRxyci$B0md4_ezbUhYh0<$z44!-%Wa$F^(SUDVY)msg!?VHub8ii3-hLn! zyv0Iw%H~0;n--fP+)ETB%{=47|5Ni9_cskSUx8sgxAk;GIkKf067f`)3tl)va`enz z`Rpx+TtH<9Azykg3x&VpnI=CxeiK2~&Zy!LHL=eRSw@VFM`iXR2aqGgu&z{>h@`k! zNE_OLep9|-z>dvTu4Jm1@6YWoy3v4BenPvK?GOiDN==bgvLkMou235CFrAy$nF*sBBG(*$I$loq1VpQ7l6s#PnF}UkO6$`ph_LTvC+6fuHY3Khmq(76>M+ ztQHb?GcC}o5yUGSOUF3LDRmse_?jUXULwOBQ78}BB=a>JWT*469NDY;>0-O68rB^DZTo)_hfIjPuKQ*RJPh6ZHL^ZFi8E*45x)i|=)l(69u<`_L(yBs!e6KI`;Dm=1s;%Nh zE8q$paSloA3tYGqSB5eO(m7~E(IDGep}W^c#=<}}1G<(p4T#TO@to(L@AOJDNDy#3 ziJ1DcFOXtdW!-gh5-N3M2~nI?$$t@!BJw)W8?e|@lJindQ$Enz?@6fmuxF;pzaMbr z-h=__1fI4RIP$F#thXEx_(gk$J)AylJQw7@tS)1jmw^H$L>strxirplcgLPTsy8^@ zcGO6+TU3s@ z=W&get|0K~EEsAr&Q%LsFRM=gB%Tl`ZYc?lE%$87O$nVMm&|!ALJClFISo1BzCFqx zJc~!iKThz9k`{1Pz-5CIZjsE*nV3o#=J3`0X#S0hT4@xdT~NDwiusgB@8qsEyzAuxE58)IlH_JGUp*& z=@c-*@93Bm?PWF{EWf>8{=q+4gvol9bA(5Z(!|`h7tXwGk!`V7;2qp#C5FpaU};h0 z*sdvDfk_^I==qE6c|++WB|EWjwlNO5(B{MSkH6MnJFC_|ys50ru$M{wjE{JM)tX3SpTvu+eao&Ei6RMw&bt40zZGP@;0*s3E} z-QtHt)N^de?a=xgq#MLbf*cmuyJXucPLv$PTUJ8Wx{`VRw!pn-NKw1TXAKj>iol#O zd}-EP3&I`gDG?U$}+-QCCl|r_jn;jr1mbfbwU|O{%En) zVYwSE4x@F%J?SRhV%e6TU3Z1Jx8FfQFc&TkY|;qK^frg0{JBo0{pUHsP4wtG>N=&9 zv5CuKI-Gmn*Qe&MsbcTlWYq#li%6}(Of&#J?ol)>vYFRuWw+nI)8^Rgvu`A6`sX|@ z`f`Fp=DCQJi`Oh--#w#6DG;HpxpXSsyc8vxrFFe!gOxInR8K$S^0H-Lc>2k_%_8bF z@p3RUfkS=eK6B`3;is**e||e0ps%A3BX1aMkkPytXE6}qGp$J~39tZq_^n~~is@9F zqki8Yox7K0o2I$CC$y}QI>5$Yn#mt{-9(uJf4YM2Q0nNi!_RnP?xh{6u!jA z2XAyER#GS4`&@@U-Q`lZ_AjH*8`~-72~O7ADwTSGL;U zP5ahZMQ_DYDIo+a6wD-qUoQ?WHa6Tw{rB?xKi6rQ!>!kRqnmGgNxb|?agJr3r#asM z%7DR6KKSz2&FHNVmvM?+^3B-aeKTk!Zz^wBQ=?n4Tc=ymUF}^^RN>6=owMqij@xWN zMVOjRS;gE6vBg+pqSkRm+dNZO5Gd^_>Olc>mDpYA!fcaM+xk_iFOEL%XvOC;Ofw&-RCoiwZ}n zcErX2l91TP9_rw~X*Na&MmRD_`yUJrb7Pf~#NJ&V{w)4dX#08S25pG`_xA{ezWVRp z;eVz=lQq_G1B#_Xk3Mp4YT!O5@m1euau7SXwkUGi?|VIsnwf`eF8rZEOq)G6RW)Ae4%_Vk^CK7T=%bQ zeB*unxDw_2cO&#Ev!vVUy&gYVWAyrHbO!KrlKf@q(81rx3KO)~1^`17omoEtxk7)u z2_fZl^*&)h_uonG@6_LX`0bB~C2JyKJ7n(ttrgj-2J^TEk)#GSt>&F}4VhpyZd)~p zS2Y2g`djluGnTVO=B{jA%_pw3AEHlxsTYC@vfb&WkO9|OP0 zu0JqNFU;#@U;d@$6qXeIBxd+YROwSMo=(4u^sU8c1moMB_i+)iTDqnRZNbOQztft7 zR+HnnDdo0qsHSe0SQU7AUQ^LlW z!bW1pMz6s}aoGAyzD3R2b7=$fl`~IKJR=P?5Cep?KyJ zc;;a}v0gf|XI4(f%I2SmT9U?CXuaG-U2w64JEWXC zi@p<$xudC?S>3@Pz2}YWi%n6EefOQj@cL6+L;87jaZg{HAIGHIgk#iU?tJs4Mv43P zj-3gw!)_rWFYC|Xs`w3k=v?gM=C!ZmsSi;4d9clr8}bP8MGx5-E72E@2jhU5$Eetc(}F{tfHqI_>N*(`QU9M!Uq6suNva#!)jlb=ZBP{KS;0 zM*h(otV7T?Sf8kK6$ScTf)2ok`_!#7+a%4Gv*S>8g74ic1#=5^Q|6fix$cvOfPh?6YMp}WtVA6QbK;M_ z{SNQ=`D?7S#4VjCK}$PxwX9{8cwQTJHR?F16oRPn1{wveFde(*IU*KWhZKB=IViC? zOVqUAd8?$ZsfWCyqR6tT!y86J5}qvHE4Pp%M@|E~@2im8*id!rtwt@)`BY+tU-s{X z<{0ce;*_l5>BhVq5z4)^IqQ;KS%X{4e3B*gIWDed=KNlKa){W;E^I8vg*G&H#--ts zt(ocLWfgebTtItdv7l=1&B$+3GJ_#ZT6Ih_7J#t`o7%Q&{gGS2;!#J^_jY1$yyIx^ z1y(CZmwz>K0k3?xHeSl;k)~r4xZ|7F=sj1mb*CcCSjN&wrIzt|ZSVZ?e{8%B;n9Kr z^9oyQpah3V-lbH;MMZO3(mH2H?1QUWNk%;mrc_erOxw&3VRL?xO>02rbBVDWx>_tD zEuOBx%2^3#h2V5o(_7GYjN8ND?x2y;CX0+YA)l`@toy-F>s6eAIGhj7x3xcM93O<}UYV+D!&o<6I z{5?~=GvaE37c7l8$68IK>&?ZIOQjvuMsa4*-Gu3>jj0=pSHfI0p&C>5Is9p!-&DC| z*9{#;w7x-{*Ic9^J}&H0diq1tB1Jp%J$Hk98l@z&(ev?7nX|D^db908@q@g%GLvKP zxVa~Y5i~68I<51lYP-WWwE*|!Oz%P;*pP3O+A0r{Ii8X%=fhBPb^G$3RVzb8GY1P= zR&ivAm}2V$^168GeIt?kFN<^F%FUW2Vl&9P%^dpI>~hCnJVhp|L56`U6iupTw@8Udt3_B7PRCLwswQ7_;eu=!02EpS%fKK>9SBAt&{z@k8v z6SmiKW%ukwVq!a(c%8AndD?S;ed3<%H-|Ri1+md}&hoK8gch&5<=@R)Iuti!WGm#T zsH=n1!g+2Ky4;x)|DPCz9Mu{0l?4EyL04cmgb zDuO$7B~%=#Lu`Gx3WE#Q4QxCo&qSdsquUGsvlfw$VUs2a4-xpIA~FnC<`isHX`(x! zTsxtv%Nh7MWF5;tttst8$$P8ShAi+)>MtGcgGxp9rbU(#pp#`<^)U?KXYOS_V%r)m zHEUsV_Q(q#4~jsvRDJ`l2U%lF&X*|;e_OKJ7-WEtl8SIo6(=-nx*leQT=!k1$7x1e zPg~WPM3=YxvkME{hU}S28Gjy?~kjpIetXCEQX$oZu90v&~Qf61V%M_-#V zQ~1TuqsTNSbLJLk$MJ$xeEetrDK*;VF6QIK`MYTA^PgqAGq)Sn!&Kx_UhGmA@}GZnDUd+MM2Z+jp5oPCaRC)I;fRyK5D4#i2ti)Afn}4Yw1KFLO>0U%gn6P&#Q2ZS2~Y zwF7W!sQpic0;gyBXL8cK+D(P%7V34gl&-szToX4g46hy1XdVHfh93Er+RP5u^55rF zzp7dICZ*A*?@GgLIyFaYS-b)+$R^WIy6hOM`nxusDWVtOd-LsF7I`XmMV|h|Jv(f$ zN04?X#7&(KH~g+(Aw;S?SB1-Sgf|vQsjEyC0qayRbZMyGChF^|6!+9V4yIy_Zufr{ zXoU@XPGz!<50h6cIK=xkoX#gB`+DwNwHwL>2E;4Vnau4CM1DtR-xXMb&n!_`u+6WR zh6DIrdp6r9-$)U(%Piq$cIlqb43lNMzN@(Ai^hbTJ5v%d+SXbM-aq`&rqpE3R@ z{ju*x&W@O&pveFeBco-)*B)BhW>#$v0KKsDj=a^5h0THaA)6mAVM?U}Y(Ng#%JeuB z)@sOBVvxWY>3(vIm%q9Tn2?!H1IbtbatiY&#{#!b&HY#>4CSrq}PTUip3R z-*b(dSX!S1mF>#3m#t8t_bIw)Y%h%;H$oSz+0qNj-9nV}OiPR@=HjyLihEZ^VIR6W$Q*mA8)DTuD-o=Co*-Yk z2D46H+=$oJV5#QxCM(YRC_L=GzG5!1Qd!`xHXNdPAF>1oYl*OFhQ)S7FZ&Q!oS|h& z9d~=_tDi|lT_fHKmSSLUf0XJ4Yq<-=b*@*gxl)lGK$YZcm?&i?_{0kg`4s29p9>m1 z)q6Ae98(!MS58sftTk4RVO2!+C1M=W``&f^JB&dp@{+HJw&|H>K#M> zKI`55)+uleD&U=agX@LKx>9bKIteoU-j?;xp+g9*)N@5;tAyw}&?BXU6XGA5mK?7s#x0)Uu^<=oE=mt+O zU@MsH6ZE6$2M?l6H2qb80|*}(NB*HDoNBI?XWN63$#NQN_p4ksiEDac1ogmzKZ_im z^_J8Zk;P?C)8X`1r8~0*pVb|P{?2GOMa@8+?RAo*M$P&Lm3$xy zs9p!ojYYre41sGay(m3XS#@P&i;%WSRr{wi?_d9FH7^eR^=5s=h&VSW!a6D(vW|QE z_~_Pq8GNgb@@L-Luh`0KM8pTETxwoYbO>jt;`xyjzq95c#lTr^HqA+a6O1$N-bu%8|KgReB8oPaTjKYAZIKml&kZXboedQ0AW zkHMaCr!8ECJB7VN#_pnBVVkAk@74$AHudo%ri4vegi)!1ct#ow*x^*|FM=;gJI^P+ zp49CG(~rUPE+T^XKohl&qOa|@X&PhM1Yyn}!bMpEf9tr)pSSb2?;jhiWLHXR zbJgoxY(@Q;uFn_grT_y;mB+w?=Mn&~Ih`&Cu@t2o&@De3PVEO25xV)xOv@>LFax(a zkW9}BUg^H9JsWb$7qys78=v~@xcq7Qs~8%f?rD9lR9aMcnmnpCbLU4T#ff{Q3!=bZ z8yS~RnnQ*omyH*c`JMf&PJ^n#sVWUyB+8wHhr?fqC7_1?w$HX@AG*oE`rCz6c~+lI z3E6>nLVMw=P_`W!Pp|bob<@s&yx2Qlr-9_(vEXy0nH*ddp$a!;6{bi*WDuf?lc^G) zrXb!UWUtbdmfiM;txvwnA6#VOdOga|ImDP^U*vjNua{jC=E<o;;J54v>cf=S}tK)YB3<0=l`LhB2i5fuaoJz zth5lH>o`x)q=WZQzm(You($1$(aF<+hV;*^Pk~Mm`^z4Bo5>;2SrXWuXc{2=kFeUz z@275rtJcilD$ALDOnHTZL~My6anUjpmXy1O`(M%cJPT2f9{E8hDm}>qOB$E)A1ZEE zHMJ|NDj|Kgm6ckv!!-?3m(EzL*gcKM!aS=)B~Gk2&jttOBh>sh4?NKG2CG?+$jVt8 zbEF}I0Dj&gJ1Iv-xL|jFanY$Fhs?WvY!2$r%J>Y@8*&qj=VV1^K}?^AS3EAkFp?J_|?7LKdEfrOl@KJMRj`kn5cCLc1i zKA|2AOV-SMZMu1#FI66Npn3|!d=?i6QZl_4-o{Drd*2r+!>=N3u#Ss?WXOtNdBXOR!KJFlkY~@sp8!oMMqBCtjNH*{3=bG_{)m8=iSW)ahBcD%dfUq-(jnV zkFZQEvaV9BGOP~6wb<^`04MY=E5BVyM(rBlZKuzo#{m>Y8BeZ~``=zBme0W}=WHuJ zS!-Q$NbMCXydTNY6apa+>#_QVt7oXbnYD1`WDJ?xHZ#fs`?*XlA5$-o(}w8uwJ!Hr z-=oSs?o-}9*6YuzhwFKv?}#n> z4XK%#Ss{nh@PD5WM@h}(^@>T&nstcGq~PPe6GyPsW*-nI+~V3w`q=(M8jR~cbl~m1 zieyF1C0w4iERyjAC^M+|(u=DXvYvd#z{{$h=@dV~pViHV+&lND1?%dJQxdh`l6EVs zlsAvcYq572Q&P~KK-G>qnL0vmSk>Q(IxbOeIqp$dBaK73vLV2RCmubhyumll&`0;5 zVVlq|yi$y!o)?~4;RKI{picA$21ma~sgv&`H9hm}<}%uI6|Lq>T9HqlBY91~1rGC3xQ35_ z7*h+li-lh+3-KmX=7+wBi2U(zL3K`W32-54F&Li*G=tuIiY)+8k|sKGSDMPP$|txc zYVkEjzK^AfO<2q7RyB-02p{MUMz1O`O)U4`CM|}#{z+L?s3oh3R@5;U*(!lsfU}1c zHHREU9CUFl(dHD^wA(V){CD+T{>q-e!$A1kPr6zyJ9s4|h`Q(6qxxH8US>C&&I@BrPfBQ0gx>YMFZbPjY5 zEhh$_S5wqnoxr~-;Dy|%uubX*bXITFh=>WIXyq#pJ$MFfHk53TEkz&bmlu5W#juIB z`ny3eWHC<<(HVt7JyGf>#+!VhRe7||@e}Q=L=EW8?Gsa_Q_EAqVO+cft3QQSSeAd= zP?*OIf+eKhUVZAOLlfrp^hDH;H__1*?ZRwj@v<>$PFuK{vRbm9z|^R3#b{#j8nm?<`VT>-+9m4TJ5ISCwp10-7Jet71XQm50cn}X?8DrMsG`+Au5 z!RQ26oU^>Lg|hZi+&~WEXW0H!CZJUfN4vG!FIA(^6DK*2i6U(g58*wyV;UN3nox)> zdiUvDH|(1ZQn~~9F=h;Kf=rSENp5=Ra?Ln(c;m*n} zt_|szdk1{g`>u%^EZZ$ruo0I`RxLs^7wv@zS0pb@9e$iG9Px-X#*mPM&hi`kYV`}e zKilVo%u9_r#Y|Z0xcyD;ec!#)r=jx56So0Ie$l(W0Qp+2c5jp<1_jK~KW4C`Q$QwXyO#^S8-mDorGCi@+yWw|%&#bSN$5*RFQayxy7}eQhZq8Ex-MGypRgSbRPH@5hG(Zzha zINAQp;~LM0e%b1*;Tl%HIC0s+>Ivc#i1h=*K7{a+z|n3)^X2Q)r*T&r_1D5i)*FbV zaHuz+1<{A+i7{$A%q?VE?%`t|nK$*h@c6D|?NCk6F52K0sT)7IVmKe|m?U*?E90O2 zEOAcfZmJpogOfv@>x<>{Izd8t;y#Iw5bD3r&&S>gnC!GmryRwaFp z<047}kRR)YIFxOJTa2iH!Bm!Olu^J1d@ya(zzO-0GJzy6Wt4;Mx5y|33Zv6%=LzKP z6aH{X;A6x&>7B&>r6OxPZC2{wdSXgaDSvg-&r#_8EaEH`ul&2F&9&hD5BJ3Dy5qxo zCtF-uKEN?=Plg9`sPW$J*>&f&z+gfgjQln9bGnYs89R8r*53xlg-pUZQ>s?ezquvf znc3mC9MN0ZDrLqQM0UHZfu~UFKzz`hErZ=+MSeyRF^)_(h2Q|qjm$@W(i1vD?D3Sl zeTI%d3V`#wp;X?39ZhJ*_9Tkz@_l92Q!?g&iu3Iwvc}7jQI`|EO5u4a_fA3*&C6-g zOx%!uw*$&cv@Z27ea8pG#^3cD{9-iyMB7KLte4$6G*{CV*|C)9S^Hp(}m zuO-E)StgnMz(wFKEP9-&-Ja14{7oKNN1*p1Oi{N=prvLQ5WOn7TPx{E*9~X~t$&ng z-B7as3rwIh=~B>BU`p+X%i%=2_wG*mCf;7wPQtZ8>;3~_LuK@la!ldRBmV)*Io>%^ zeU@n5H7Wl4eK=0L>^|aZNivLhjN~Qf*~>0E31R~U4W;AejAo62UKGg}z7S0e3z1Q* z3tbNV6p6)^`u2BsNxsin8^1I?*vc$PzV^ zZ=~e^OI9yU^yy^*cni60*!4@5n~XwON7(~Ye14htkU)pBEgvKPbY%VW=HhXFxpB-{ zE2aE@%PyW@i!XH25~NSFylQXOH&4>}xu0&<;Eac+^9`59e}@OZ{S4H#5Lo)EkRInt zmnu07y>QYM)209Wgd@q{>)dzFGJ0N9wtk%P*x9&_HxNtGI-xG3DY)BE7M-yb6}D#t5jW(ZetR@XUwf7kS$4WE(S`4|{94;XjHb#q$m*CipVq3~SE zgIBt}Oxvy?)sX6RtH=caDhSiH^r4FW48ro{!jzbENAVsgg6@rbANqtc=DP{KuyUHK zBZ@;1`5=!d53bTQM@w!QH4;v`+zXxz^GcT}n4Zl-D$)S5ahTjWdz#8%N{ zkg=T>J^va61{}lTk045Ses>mk&aSh3hHrIQHr3H$&!5K7SF28T_pSB?Pofu-qu(B1 zm7K7Beu>&=gAzcwI`jhJ9pl^jcbiX}Qo1NAQzm{wB!b(=5T)H9cLmfzLxpOcNi;Q# z)b8bz;LZKmoDH?nsfVYGox`TN^wXg;g&pC57V@!7`n{9GsQV`!(45b0|D_KrF_?*8 zA1kAxHA_6wZHBZR>PvIw&^ZA#*E8zc@{z3LfB`P(Hmeq?@W@7MUV@TPe6wK~kI`R5 znD(!A4|HxbIzsuAp_2hz7GlvM98*@9sb6xubCi<>T~klcl4k+~SCQ4R<}h>$76vNC zSpaG5T22(JnQN-cLuaR&CkGQpXTP271=ExMJ*aM^*Qz&dNpKAqdI7qXvL220=k~Z~xJ7sD+Ge|c=I%Tb z?CzHXC+GCyRA=-<*mk3e}!(5+dBmM4$# zXFDtpG*{F^<~H8z8C1cMsbm9m9Xy@1wT};DR5nzvLDT&dG_J_L(B{i=a)L^Z;q@yc zG|Y<-BeSx3UMC3Nd;YtBGvVZhOM9u!0@FV_AnS5e-~7x^->6FzD!tpm=PLo#-VJ$y z`tpg$IB_~IIb4gL34%z|gK2RErMUF#|4_Ly*uVRqrK5(nth?)y=#ahoybIpl4By|o ze?X?nf;$#|JB1m%)igki8J|0|yQ5I%p`ai|`>(~WR5LGUX&H#j{&gy>aD&&v>=h z?#r@U4PLfBZHm$otSDM!^V5&}@Z`3uW3~FCB=qFQ1?*}zPR$#qGwk{Yk{Vvp_tQ5% z7KXdE!grzG6<1wK&*5=(FVjz?mforRUmii7XPpD<3Q&4JJU%4BwA=vxTj)2vKZS3b z)4%Zcr+1>0jkq;3?i-AYW5tpT%;T@Ea&|cBb}v{k?KVOd$7=w_@R?)9Tl0(W89~p^ zw>o3v{RTOCB4uqTl=>yj^PVNIVa0U@4LJ_j+}Q*Mj>~Y_`E4NizIjG_M1u2L`|NJiqHW^Wt?Eys=F4hGOk5E{5fadWY<&B8S9$lHyDz(bW)PHv>+jFtgW=8S zMQ)#r2eI{8Cu<;;s_z!H0OTxE(FWs)pfk4)ai5*g!}pZ%k&>G zIsc~-zS}bC9eNw7P)|b|#F-)NOVT6T(4e2udgnU99B+EmVe$NOe3#YJ&m(cX;g1H9 zNqpF$mU(`1D#db}SNHBeqU?lJB>q_Hcg_-PDu91?b16BmYt`3G`+^C5Jk@Zqk`HHb z#l&iy6QU*H^e8kbX^(x}k3H;^t=)2NU(_8+{Mkx2AR@eWB;A3yF(9lhxN$A0k@(QV zp%37OV72P8jqkU%Z6z6!c_ep;#8HgLX_~PPP{=fzR4pI9z18eqPO7;ji``4VaHa90 zT@_5@T<}bO6@p8_uoSD(w5qBDU_N= zZU$F8s(U(&vf~9HUPh;qRcGa-xZcLuCFq^}qOA)XLtCIX$a)G$F+bu{x&^dfpRLW5otS_JGQ4UT5(@I zpHq0#zqz_DKw>gf>f3JzN7q2-Z?8Cin(e=D4bgtJFuv4T;SW8_>_aLoQuz zmF|8lQT7Z`Hku8LOQ!Zkr}UiDmX-_t#&CGVPiyl6}fd zoOnmdl8t)DV@4E=0eOH8V&BFfJjJ9RZ6qfNHKCj4tpHL)pOi~FnFga0keqo9tO z1bK1!6U$m*`S#NbGbb;bCkH9LCgWW%L^{zsziu94tvzC^EyMGnTH=U7OZd`8v#oqN zL!Zf=eIsS)M1HpG+Y{0(U9nwSF5R)yV6TYK*65PiINpwOT5bha&r=;(I&sKOn&%{Z z16;L*w^TI);QP;Zto=1WW#>w)+IBCm8q2${|L~>wT$5lT0&bBkQPwG_GB!RRVRgGt zBQVQj*aLd3>72fBiyW`Sl``qd!{?Fl8EUVY^EZ#rFq;Nv1@yS_6Hd(ILGkD1vlNVS zPl~Js8CZLi*>mqNJ&C=yj3mm}vOcd>NCtXVy$IT*Thor?tBz}c|CYY}9-NqxGTQai z5fkHfaft(0ZP}9;_Vemf<)VSU{H8Wz6Ac?0ZnAxNh1-a{i+WZGCbTIY)}{y}P7qW| z**roo*4HCD0hB1nO)s9iXcIrjl>$O6%<3qi`%simFpF zGwOfS9Ww|lv?;YPw*9D`Yho4@lCAwkE@`UNO13tBmC~s;T-m=6jO=w{Ur^!JV7h)+ zPLL$M(L(Fg2yktG86?Xb9vPq3Al?WbTV`yzIV*3#5L zb0@Vow4X4K!WXwPV=FL+_4GK_;$6;a>KJ0xmpxPW>NH4+Pe!sz6NfwO8%;9m0Ioa| zq-J*s*5=jV@j`RhbyG!SQ%*Ogx*3)Fs)VB}FKN~*w>Ygz{S6nRdTf!2;Lv|MPL@R# z9RqBl$);a*Wr!`(bQKO(l?r+tVTOX;g@s~L_;b3+1$8WrEq0k$?qD`U!2_P1h04Ao zWj*803RwTy{nHSWO$U>Fohk6$$cC@p5GI}U`2WZBpRi*xXI=AZsf{5?^`6^U7T81A zGVh`>5XRG4I18gaVKlVseQR6ux++bD;NB&eSu6&@ww(i~yxDpADXdH-nym757tRVP zJyQ49_!7$~aEVW9>RvHd%X=wgpvD~@{_}jQhRFCQr-_P&wA-NxBo}uW#4PR0c>l`Q z*YhUt5PkQqBOjBBDsylD4PLo! zJn_1wWXu}GC4g#_vVDD__K_nvUh&xWfWgS0zNuTrUYF_^V$FALRlShlJ}+NtS|76Z zvp4e9-aMPKz&<-pl>QeW9UwxIV*lQjwA;!+I6nf|H{4yVH?PAzH!ggA&!f}4v$4KYQk(=REmB;CDE3iY zN-54#K*36*S(gyS9{p>=_}dQ?Vt|QDQm$)$VU);6w-=;HDpBfhD)jLq&A1n0dhdfM z4}Pot5k~_Ju-)T1eIh~dD zltW`cI+ZzYu2$xD2*giIw^y(8Yle7PN$?mqHP0)6(5qYT8gqS0&;xi*tbB`ch>ZU= z@a@FI$a87emL06=xg+`}R2X0~bj>`0%FinK5vNab`?DhGUv%~XlDHEB%imzy!Iwb#Tdk=2A>&f9wsVMeZPE$Nl5N!@Q*G~hJ(fw4kBP{jXn2DLY-F27Z(J*u zW{97}GH@ESFMRrhQQ11B!I;iCQk_41Tap5&^5E5aW4(g%CoKxVBVtAk_atsDdEXmIB znQ^G#CXWco?Xsm;4e1O93B<}Y|B`|!Qj{8dH)Ac-2v18L@ll-Sxp=$790VxapTB49 zGGyj52+tKAnPi>KaL@Td`vv-wU>q6yQcuP5cRL^*;Jvg+0q2vy{^Sy9h|NMvRGo_~ zjOp6=iE#2sl>dh!dvPGXXo3Ns);p>Ikr@2+21myV)#}RW!PXV%)qzMP8Pv@f_|#Sb z8lRAQ`$lqQwIw@6arMIY>6GF@@FHs*KU_dt=*T*>xUL{~JTX#W<@1sCPH~-F?l{j) z9SDCcZ@ z7|Xa^IPd(kgwzrJ?g8PLc;<7lh;hfO4;sad&m}CD3%bx@9@(x%inprYZC4j)5=T`N zhVRgiT&R&kblXXQ?jq-43TE)teH@0V8=LD?bMdYB=4e0#HpAvv2FLu3EObZS63m(2D5S^rz9P#i*I$86Q|N zNwcV920OBBfa*OO|M9Gluh^lS1nPb%{_q3;clJk_>Ni$3Jjb=<+O;ezH6$WCUon9K zoXP#x`}T;Rh+BA+k^XRndq=}54MckZ+^uS1NAE@u7nyE}`_}8(3~m#A!h3Ezp8U4) ztsLly3T3}p$kdv|Gc01QlA4i43)n^mg7*m%3Is?Mq6<5^>&Qq78fM=@Pc_V#*qOCSZvmZYc|i zJtF}2)$CG9IP8P)IQZ`n9qdc(J;z2b+hcN;5kuE*l7><>jmFS9QMhUZM6rB_KB`+S z%9z;o(+P?^M-tQlElkkR95tJJU7XX~57ix=;YY8z$!7|cOWglM)>}Zu^#gswRcK3b zD_-2)y|^syPH|n_wT0sDviPFK-QC?;+}+(4mY4pYbKd7Y-?zz~Br|jO>`iiWvdM2U z9K;0L6^OKz?>#HvpmuP0_G&|0zf|HEmDCQUIUChIBpEG8yvf8;0e?qg-J}qJxP;!+ zm&Rdww2s#vKsvLUqPj^>kubd(>BlOcLjG&?(K!h=b=Q3q{%x1jfSwbl2Uy%usAUlxtho3e~g24z_Z~(uapD8OCU#q*+IOYxNHAdGfX6u^7i*3i3 zFeeEU!c;zxB#^59Y#1?M|Gt0&*Xgr=S_{P6nXdz`eGlM*|NNyg&a>o%Ur0kde|3Da z!2aD=uMU44zDo@^P0V%NI}%2(lP|bl-JF$U_1@TcUTb&u6UfgfK~HRa7fd9yDOl_H zd&VtnMAX>L-z<`vFq|5PiPd{sBHgWwB0M;W`++thzncy7gv)O{;yu9i*?Jz;O02*E-`dGk{i6t@0b(8SU19YrQjnm?F^@R5LRs@9dHA9QpZ28A(CcW1jxN zoc^;|B8EP~DtUhKwTQwDqLJ_bje9i0v7aNQjmty&4s$t>^1 zs2ZgGA06<{C{x4)e$E;}idm#Qe&S-3{#fZVQY!oLa>PZBJlN;%>B#r74B6W1P9Ldt zr)%$5ClIgq6K%2qu1rhQts&XM7(O=19Xs2|1DU&W$|&7C z^0Jr>XqwnH)Ft88%^#Loz-;Q;mDaT=*Uc-=RaZZrWaU(SZbDq4YUWIVbz2D|fVKwhG2Mr<%wba+-_#^IfV_W=vzCrlT0>Pq921Na6)mCIU-WiDLmV#G$V^r8lS+*qT@4e1^6v5u3hXj+d3Pf z0#l$LvzSn;3}YM@PyPgRRHT^G2-paffVAlcw&YiK(k4l4sjsrbO)5#!>_dIdjSSe= z30#l)6P)2~s{0_JHT=hXCx4r0Kbx5dr778_!8wp~b^HW>=qa;PRF0>N>%Lr((6iP| zRJKnzA&STXOX{xdH0z)!V~S*42m{Nc9EG8APL#}bY={~Qvk*o8Ko3{SH!}1U;~amP z>$niAlznn^ps}H!Ozuz3UnbuYKWZR#SK%g#X(SqOzZuq)rud%vXTJnzaDZm;*U@&k z*Y3I`sBGw<++Q(kP-lZvm1PaL+~B^-k4306pZ5n!HQj!Qoaz~-a$6yG7w{DjdZ|JEmTy}&XJ zV|O(rwnJ7@GPOr4%xSTo*r8_hYWp4auw`TCoJ)7Td(<)|f7&_!Wg$QPWilVBoXt7ZRB}sxHj+o#BS0lCHKf_UAxrG^A0Sw z+s`h#G6k{En6ILL&ZWKPMx~;l^sb7d%{EVBpsnU&<#^S-65j&&Bux#c{!v|OHMJK_ zn-NiM2$sNG7(P9veM0eAQJVQBqw2xoysq_dWnBd1LX_})a42x!)%0lNbhAW znHkTsb_N9^K@C7)pT%8f7?;Iu(mk+l^}uzpWzj}RLPNf>b2kEpH27fl44B%{zhwjr zwr{Q_tUP(kA36(pY*fCoyV-HXkS=OkbWdGNMVdMabC&2L_DAE=UiB~R|1zb zjQFmsml)4SE*AfpkG4W*HRZ(81_s(annd<^Q)c%>ybDXohOZSfPt3HFGLQCh;=EbX zsRfn-ALZ7p(68c+35Gfb%WsQIck3U3E_^uma@P#)!+(A1*F;|Q+LOk-eTZ)SVc(x6 zo)vk!U+3=of?_l_F`JqBz8%PRL45Mw^T^6^agB~MQCiV)`qF!Sy5 z=Of5Ex_x171X6#mz2DNmCh|=D5={P*?3)J4JeQw%DDlmB41<{*+TL?czRtUkuhYs7 zd?D>tolY<#01W-*b9yH96&ny+vlmMJ7wY1rOam&U+L3m4XvvlLx+J6)o3c_{n-qDFr@Vr2|3$Pit> zzDLdH>}u0}W;|-oaWCM4#7Wy4+|FO8eD;Y&;W)DO>9}paU-lN|nlWT}Uk6oPlk|+N z!B>#x?uNf}B;gM033()8*^7!0 z?8B0g>%)_=I|iGV_hv%M3ED(S@3#NLE3suVbIehwk5?{{B0Is^4{96?^e?xKs=vBx zCtZ~qt@AIp=A~ms@cBB5)GULjViB}(Ki8e@=BIpFWemrSBGIqQyaeOR# zeC$!sW;|xREOwkBZajm`CX=x~ox$cVcxf+qiGTAJ!`}1o#biNgnXps9D8M=R6(qYF zu-~e1EueYL&~vgwa_fNVSsC0a+@nWq7==Jp7c|>x{h3fey zm|wPskl0Wjy|O>-pZFumtuU(R@8A_umb>5%QWj4|7l2*V=&y(|Jc>h^b;qlWkPn@? z!bG^!3;Ij)n?Zv!@K*4RpHqs6S!V)9W}*kn8 zC?saSaapohsSBGnYUV~VRsJ3%`HoH(57cUmyT=u3F>7p&P-;1$_ciKs0a zL@uGqtwcHmhMnfM_UHlqd+&);F7|o3Fk{*<4uUSfoKsuP7jVl$zfOCL9NUIG11sCr zkI$;t9C2?YMMIOM#PRU2ss5o^Q$)Y7w_m}{aJ{sH3H`N{+ZzJ?k?>)=jbS=MM8G|~uwN0;?v4^qT%9)Hh%Z@?^CSS;$Akgf1ES z-q$}bsZqU+mwrQEcfD5M^wQz`BNP9}O94!|_+k9XOihuZkOrO1#P59VfvE9;@+FRZ z$G_>alWE64@KUH~MJLyLl})?M$jRI;ytu ziAL%qU_-Wh2^=PsYRO&tR<-wvottLJQ%VAtePjiSC(73ID20N0S z4%Bf7(y0oR7|YHG!()iWJB`Mhv+KrIFoSo(KNq*8Kzo!preYrxi*Qsl+gqgiFVgP) z9c+Z#&>0bMD3)tfOCS|J7HVMj<=r7){()Up}KG`07D{D8bpB5qXbSU}Kd_{vM< zx%Qgi(S69hEkA89PcUC_da!y-Fr^9srLl|(X{+EY{fc7Ha>Zn$ZzZnYhLpEj*E9*z zK#AR)ZQotg+>D^+DsdF3++XZ=KC|Z4GZ6-T9*b%h+&Ysq!QQ+G?k6TBq7O?PWPmXS zdGej61bOa?)fQ4TPmCL0$K_<&Tu+DjG(8;9JlP{XhvyI_odpsNGJM_6k~=cdwP=#xj`mn>NeUoZI*47(6b1ln6HARUGl}})3Nsn_sR#Niu_c6k;QJng|$?c zbTC$!G7FtELn4hqkv*O26yTagvpnf&C-wl7htzj`CMEWOE}ir!Mh$-IaN^@4InFB0 zMk%@0OzBk765GI=TdlBGt*9ldcEZFgiR<96(;+`7Q};#b&w8BEE`@a%yFL6@sea3m zxl`K2{2)gAqL_sui$Rk8k4$-9zx~`$`h(a{pagliLLetfG7IadP)wNKa)v|!LCpDM zDyq3SdL6AoB*jpS!s~iaivZ(q2R6k>Exkx}vWalNwnR?SpKX6kG0eqTN6ovuK0beE zl$g=*C7Xy!_WAHQ8GpBh{yCm>YW$k@bHDR_f)DxcP%@R=kkFYz$&RoPpW-#?h(xx@ zSV`X@TC_q*bWEIVl5Q2UY!c;b>}OeFqu;R`(=sU&u|LGnXsU#w4iy(f0pjLTS>&o( zRlgHua>(gx$R=N|1yjPg5c-?ZG|9TLwCR5LeTzsDHTuhD+HHYGkj?zNuVx~-XROxI zge4D0EblYTjY>hVECI(!Ez(gmkMIpgx2Ys*fk)b*-QWJAvE8MoEv*yrVx-dBoLP)g z4*-2a-psIelCu}l!1|La1o*qnpX1VMqTPgu1?KbM4Mn!&3A^%>T5qL-AwqOsUPFo8$nfR^r_gYI zmeX3R6RpOfvg)JU;8+6b(>lBp@sy|peznz3EOpTlB<6AODH8MDV!BJg47K;7hKUJw zE2E)#RJO9`GGS6)M7o;GhJ~&Cg0hmtERw3H=UhgDi}gumZTB2?or}&_3nNHEF{+ED z?b4D1HAKYnY_VBMbSVSSm3^XEbJ9Sg1RW8Gdnf>bcuBvX32pOZx|a*B4oBa89Pr%q zr8p6;kNEzn<2+-ps;xtD^mlFdNK4W8?+mQ0kVDV-4U3_Ztr}#-ua`%v zGw&hKkjpZqRnqvow>$ho?zYOSpmxaE%e%w(u}@q&5^V@EfqrGV;eDc&{WG9$mm zjLKHRoihIJ%TBt|s_c+wz~yel_p9)wD?F8ZdYf^g$<2E6i-HI{y-z%r z?bN1n%{?8xfJE5%)TZMp!L>Tha=2eYb92QYlFR14J4ZT3`$peAS_}SEsvQy)h z=@X&zX#-As&Z=dDOrD7;!w2#g*0!J_Cy6JK+NWn~W->$kX>M2+cF z%tUg4W+nVb@yEBEE-H`)jS@3r(O(YX8dNZ17)Pi%m`d+fh74L|EA8;T|HeyLZvP?I zJP8~fOS2t&5Hsx1eLW=GSR`*V2;^Ujp`?f{xKzokQKgBI-YE^)N%tUEDR1En@lvS8 z7oumjlu`r)YO&137HbKl#CjzX<teSp^}^>Jnn_Qdz5m9b+uyHCQ?|@D}{5sbY{wI53DXLH*)UAU6j#jwg>8iW-z6`_RJ^Ivs%=I1U zk=daBMs@Y-KvAiKUUAwajak_c&R++XziEavW{E>m#$5I)W4H;`A|@xa2>Phk)Ixh7 zTFLhL{p3D9`en&~#tpMg^6ce*^2<{H&`PoYQD_b2RY$$Ie%RZO5cQfsDC!dr!)a91 zXWUObr2D~HAz9kTGRMm~yAqZ@>pSo~WBXj-t@jLs_V$Cl$_xyRZbQ8|*j5Z<4H|K0 z!Cq&Bcgw9CA)ej!7<>-4^9`JQj{i|wn}CAe()0L8Ol(>#wI{$6=)$(I9p}olrr7*0 z)+H#dmSpf2B$Yb?V~Igjm=}~ ztB6?hRq&c&eC6~0EvNpULSaLopHMYBPbslsgJVDT{( zv4HmUGUrm$JVR%B$E0@pAg#nPr%Mxq)1$TSKt)!4`P76z?nb8EtSTerFh%3FNRG}v zBHVqAOMzYQsaQ{k0Z^l>*CMw}a4ba&TWZzIb9y8@iqlJR8X~ibEtIOl9ke9-8>1H? z%06`zt@rzSk<==xkUxKs)H15A1c}$(f>Ll{Fv{gJ1&Duo**4!zi+8^ahjetey1Am! z5`=Zux5;1S%m`ee)pj*FasjTuYjZkv!D~Yno2;~5*XC9ra8|(cA9#EfKG<_-U60;% zKAbLR5xt&97Yx=b0n;zq+O9@NgiB47YNxdc&6TFubH@Sf%@wAMC7O0~Q5^JKM~o-3 zHMX5?-W9gkw+lOG@8pOlZCcwJV(Ykb; zrIe8LqLY!Cv5`=9GOz*A%b!3qnP7>fnzEGNf?leMaL|UVd2%trm{}_<=D3@8xT5ZB zx`_t%@WkSuIoz6nXQSJ8qZi)WvntgpYkY+*PhI|wi4eZ;8{k}AC!{7~y<{du#(DS?GybiSrme6gZ%dm5 z_I(o>R(fB*xrPnncX{*`>I4+LVAHi2Zwwv0ga^|Wys$FpK?xlW0Rz;euip?H)9^I z`o`WW<4CK%+X0y%<*D{&S#UGS>0cCAvE}WN7fIdY;;9wCO;pVj!8GrA&>b*OAh&p|U%6J)U z@XoIXiW*?Z;b6{ND_|D}y+vd716K+q+50;r#n2mD4btf9VH5Lf`R(?*j`3$%L6)26 zUb+uW(ThRukiOdD%O*!i*%01%tNlsDUF$_Qr@(Dr!D<6ceXsc}!ff@vjWff2>!#<* zRL^7=u%7bbu!SvDJidB+!x;A$M~Aj3HQTaGb@Zpc)NFVZQobb|I^eJAd1bC;V0ues z9B0Y#wANt?Jjd09sT#*s#;8}JSzoRh;r#eYu32El!*b&3z4jC<(NRjanSiO&+Tm*o z*9;)4S0CqFcT;z{C+=U;*eWr0;ox4{?mERvY}D8_OsO_uNaWVu?b^|^Ys6N2OzlOi zd+brW`$q(;W>b2BbS`!CDUFCDz>3ukwYE&D;a>AJdC6=LjX3pSto#x2F~i{Z zqVCz8s-+X8*%^epa$^(I^@X}br&zp2VJm6evhHP)%6k2gOsq{&DE$i(_e2qcAee_8c<)o@6P^ zfQc=8zcax}Z+ku1!IB`*I7dmkf$PnZY?;b5#viUs9uAh*+mFkZ*E@{+?M>s&ay^LP z%|h|202CJgPu+iq!rLJtna2B4IP>eZ%0b-t&0yerN zZA(`fdOz1{u=05aGoh;21Lx?5#w6%IRC-~v%@4|QO54C#9It)t>IY+aJX*N_^)^hp zQOr*)&-&u0!7ihMff_ZhwZ{E}aNZLtC05$}QJi+oJh(R;OMb#oD6Exb!Jsck$|lB0 zC{iamL*d6iH&puo#65<5`BqJwn$wvn_0N;AisqbNwHHNb# z>qgJI`Uhfjt|e~ixC&w`n`khcs(R;+Sq5sbF>I6qeJKOAP0W>_sh`*1-HolS*=|72 z9vi~g`zu+$b|lif51C*O?$jC2UQ1fy{-uyrMFvm#SW0f_2qpg3t^3XUi4tl|VA|xr z&a%`Px;}`Aw4-IEIfe6W2$ zYe8*k2gBXl@`IV;=(cEQfB4PkZOMIQVOT!H?UcUA?GV8}Df99{E&>x=CrUPR*3^il zi-^h7`we?+pU04iBB}kEt4SHqSnYu@h{0OijK_Jrc>v0D^P^z*l|)f&v~Fhx62YwT zr8D`zjMp0+3d3(VW;hx-Nmzw0w0#&)+$waE=Wc6%Z;QgwMok7KJ z3%{_}l{+e{WmASEGc$rgkeU$}N zDg&mmHyb~{HpucRY^K)tOqff}&ND)>>+MrL5@ zPYZrJ0fy7U^bW!p(wDyD*TQaY)EJV78N8U2%LFJIO0nJcnVQ7eMs}d+bEAc@T+x-9 zlZzcA4=+_twZGqw`VURy6WWstoe>w>TlM0MFH6~z&D_`+918O|0f-nbat7s!^FIvC zUKtt^2JZu$Cj(#7x_G|u7F0CU+84rAI^y++}Js2HVk0dZbifh>I)Vefn zQPd`wtTtvC5PK+f7_jeNo{?+Ab4KNM zXi((M%5%fDQ>5pz7QX^mSQ$PQb`g|O`aCXT9B1wROo## z;p5?NBudX%oNAq3;uZOXc_XnE5Ericm0{xyz3~iey&dY$X9R})0;Z05@LB$i|biB zr)LE$zX@%fThu$k^einnDQA$-|DdrXp<5ND^-2xr8F*?BzTG}g7RgGKzsLE?q0YFd zQwl7byA84W+nTl5sb)V~*IK%%{AX!_Uf^f_eXbco8I!Hq_`ODrnb)Et96a4}<#|U} zdb-9{`*f!4W6FdXx_4r(zGOR-wD5ax>Zfzs1NAQCc2m6b(Fy*P$do|62etc+dVW{@ zrk?4ZHH7w^yXmtiifm#ZW@%y0Kh@xCNH%ePTWhSjA6f20rUbga?qF`64$|`l@?G6l zbX^MX0{r&Dd+-m-K$`uc-F(^}m8A*(5ovbvSudxAsIp7N=T#^d3r!Azji&|1!#z^25Bc*GSi?_6(D< zz3i9}HXUVqSrKNOQVdvY{$$4f7f`N>(v{?MU8w>AFrbetmRVAoNc{kuA4OXyh%7;= zX1fNRS*}Ds@hGbh7st8rJaz5!VkQp5Q4Y7rSr6t}T-PBEPW@gc+6-dm9hoOK2}&h! z(eb5b$Cy#L5+-opAXbvhi5OwmD_k=njf?GaR!SCEqB_>5NAFN2sLw*W< zphu{|P*ChheRoThmG>+3HCc~^+1|Wpy)fRq2*0R5zQn===Uz%-?IkbRkL^=W3A_4M zF#hzl{ilF2+uCR8CC#6|!X z|70fRqockf;r>X3Kub0@$3cT)e(Dc-!SE!Wnjn3$+VqCq@1 zweUUP6Wc#WR7V*T;gG}VBdasb1c@S^tMP(feAGQluEp~Zr|NxCMUYF_Izr$yEPkOk z>J8mA>M-UxQ)dJ2G9#?@#K+6%O&qB~fFhlyaqDF>jw z6*PHrdy)`kDZZGtgk@Q9IbW`WE3WUF(54z1XF~14QrlVd(4y#Eq{)fO97UB2xk-Ui zU8u{J@a!#g7j_gP}HA8Y5Fm)|znSbd(LMm^(E&b(Gx>M;3A)vGIX(_=g zZ-iDCzHvl*sD;I2wK>v1Td3F)s}?Ty3N-Psk5Zm9EPB%A085*q8t)Q8L^?v!bqy zBv(6?%a74u)pVxIb6KfmyDW;A@4vKQNRb|7OOgTHQAQZ^B+3NETBx%m#9ADr3dD*x zPZh?C=dtl5iaXvBN3bnApG``Fb>5AVD;&rf(R)hYeT(=&vtq<{%8YB_w7@S;8t0Oy zNF5=4hZ)hx6DviVQWGnMQ01$@LT@~kAwwhiOgvZCA9@?}tEAXf<~0j)6lN5BUfvI*&Tn3ws9%up7JXUZ%x=+`%H zZ|Nr9+hs|-3Ea2~11>eZg2s5cUr)mZr!Ll=$N`slv|n(?(cW_8r!xrt)Y8&h3SAoT zONpb-+jfW;283XttvM^q zohjeZ1_~neC@Q0!kGD(-H^o->cwv|hD!(?%+$vWKIlmpr+7l;>ekm-78l*EMg*FBR zxrZR%XS|ScQ!88qa&{-6#8Tz{_Q|hEmc?IJBit|%*oKECg`{ETeyFNsIAlOD^paAv zLV*HO857FqFr4A-tID!DBo%LJ^MnqqZ3+>l9_Ik!QFR=U4+q#=L?etl3bE8VF>mv$ z{`fEVfm^yHo(2?ChQvCh*-lODse@vKnPtDSMC4iTqSRk~E5BqGw3jh;Pz{d#Y8wK- zk*g%kDk5Wsqs=u!z&B>))isWv)VPfC*SK4IL+XP?{8SectHzjGq#dRFIZx�Msr zYXEic`J5Z76pu*_OP7pVMTAvD7^S=a_XlMckJ~oNjBiO8=vVpaSCFc1RFPAFB~zf1Sh6M z?h;cZgq{~t2um633)+I^Rra<=j0(s)RI zOeQF)k3(N=oOc|(=(r}!Ra?GcgvCq{lxiN=KW!7_6VomyY21`){6 zip_wsCL7PU>vSF)eoL}?)CQ3tO4*)+p=YN7i*rkEIZEP!O|R$34V%c-uCF(!t!Lb) z+m8uO+0b+(thbV6t}p*vnC?V`t~W9v_8d{rrg>WMv^@huUqS<6{iY3HaQ_9JUfn$3 zT*d!=44wbyF${g^EGzr9y8uRFC6UgR%ym5)$G@GdwT=ywrqI(mg=K8t^2`T%BP&hNQS#&k3iqI(@A<*Mm(Smyfr z=5a^Og*ah;t@ccjeS=(h*jtuCFOML5%F}+Z8!qFfb4ys%1$kS4xew`krmsdi_E@gQ zN-_~R%)Gn3T^eY^Mye$dh?U%RVyrIq&UMbgPFdK#of-50zsF2sUqy9CiQ3X^3Fo{J z5a@;6Puj-+L=pcfEE8#=TlVxZhs8*4BucE3O|9op0~^l>5dPZeLX@!a9p=WICPQ2N z;BI?5xxN%GqNGjB<=`cIM#8>0hNx~#XTtJLpjYtt1-;KL9Z+XyZIgCmywF(p@H9 zQ9SN$WJYqIfne=K;3>UC^Fcb3ye2k`>iKP77A34!+OaCr4M8OyDd> zPM;L8nHjfOajVI@3>Z*5nk+U`*m>p6F)lc068qp{=aP6&IXbgt@>A_yo?;|`^c6Br zFyf4}ZhXzeKzqDX*l$eTyVE)D^su27LR8E-mPvHV{Z{cWsF0tsh({$QC!wfmwIu5L2&c4+u#a=)g*7(uG`l9&>z_GEI3rAI0U0+yY?GPq^z zJSz2GYE_lLIl`EF)MJR4F!CAx^E)V^(Z}+zcZH0B^png_@X}`8`H$dTQ?#T+gInIm zPFi=?oN&nxs<`C8K1<(fvg97W#Tns5%%5bF3Q&LlSMFNifzD{Pl7$3ZWD5R#mJ=O}f+)58m~;Gn0V;@rWy7D`2$qkWmSIVS@C zIb|eYpaYp*0e{oih}F#}&MRpLK8{bqos+A)4bOc3ih5wdeua9=N1^=IlPHe+lPB&_ zhwmrGx2DIRK5`A0{W!feM|ShB!D*4@UiX&n8YA?4J+f4Gd4wK+Tg_(6<#b){bkpW^ zL+^CUhj3kpaMOVBb2u|TvNYzale&(-Cjb0t?3ygOtgZ6e2>AtkS4p-*B@qk3B2`Os z`#eP^9ZM%>*>S*PJQPbWQO5W11%pPZM6`%yheqYEQmJ^U2O=)J#pGYvW~B5cr=!VY z`S!Q|yNGz~rpte%l=DZE+08n0$cNQRw5n~o^S!m}PUdT|&wqjg3 z5$Qe5?C*`rB7sfi4$wz=T@DxX%oYnpSSnR(&E~sAn5!7!Lb4;BO3?YEg(x(Q<3t$T zx0Qdz35QbU|4|yU+vxMhCh{37%8I4=Ta=y1bBJU5=Z%o?pAZ!CK0ew$G~WyHjS@3? znEky|)z#&8UXs>$=Ga&%w*1z~Gzdbky}P)atnFxaO7z(e{+Q>r+J6dG183_l{&Q8> zSJp!Q+xMN@dbR|i=Vp;vhUZ3}x}N7&sp~3q9V{;Z-7L0kgKiY)`#?!0D^Rk#{)C}W zOV@m>-0T5FQ%O}}6iww0M^gjp@Eb3;X%z}3E79_X;)@lEq-$|&4`-|<3Z<&CN*8O6 zCW-*{gsrd6!kEklDp0|F;UFf9p&Fd(-4X2y^T8_2;<=Kg3X9=7g67*}Uc3E)O7w!U zv}U`5|7l_<^nW|esMbpPYtQyss#CLI;jrn-rJgn&NoBSDe|jVRlFRX8^;t(YX}??= zkK<`q9xcRXxykXY6HGa-*Wz(?+Fii7=JWK3j)H-Pg^G!u6dfO%7?TjEuAri%rl_h6 znV6ZHo1C5IWMaFNN8zJ-eWeuMlz3A7=b{D(^{;NVEoHjOf1TOU3GArq?a8k0>aOmI z2<$2g>;c+#U)@$o`0T3t6vSu5D@(E0&P+?Pmex#5ar$0zzFbdf6Yqn|eID_CW(mRJ z85SA@;u+*BisKoT*!O{c=15V14F6i>gADRDO+iLw?z`GQv&FEq4U0??wGHxA)wGRD zo#&Q*f@L|D42ywvO9lnHE=xw`-nYE#St3Zhn}tS^yc@a7a=cq5j$_U1IRJ*{&A(P< z%^UgJHqBdQo~NGw+t}H;5}IPFvbxG50Bs2f(aUQWdH>WA8kE)ki$g6<$Dh*Hy z!QTpGiQh?SDa*48b4zmm=9gs`<$;R}Y=4>?8(LeM+89`v0FA87&er$0k2eo@Pd5&B z(%~$4@2ibof!l%1C?(IFJpWU5|Cg?%0l~*XDX^)KEz*5oVPAdW7xc$Wg>vNd38Gpa zuEitq+vS?oi;^=_Wg^ESh|Cv?no0NTL0cGe{S!;|Q?!H+^bA%b(stY2zWi+?WDth_ zDE6mqaL2%_-d+&)X#4??d^hA+Y{ze&G(8rAPF_s!UpYgX%}cV<^(K3Mnd@q>(NQeMV~h?4 zCvJ<8N|QYQRRQ5DIa&hJizsgjve{B8rkqj%VHV`21*J7fNYhfeKA7ol!Eg;?a{>#3 z@H-RuFxe;n^ezToro#-$}&9V{pMgh*9xni0AVQx3-api_$SG_8kP7%C3RfVv)h5H`mgaDENT?P zGAWDzlUnQelPc_mjQA@DRhwZEa_8cV*@8z%7OoblrBg(4NQ}G3HV97>3sR+}X=UjR z{977h=z3D@?_47{bHJmHeI%`0uI*e;IJ4!U#&{&#Y8#p2&UUs7d8aLjV5>-9M_#j? zILD$bM{C|&TB2H)IyaH3t$hR}1vb&wj=G#P_g}m*QvW8Vc)xbn)>*{-?_UpaiB%CS zj`%vXtz_BE6e@xPYcKkE5!*^kV1r&-BfZl2J+fY8k|bnuN@Rd9xiXfyQarix;>OZ* zgB}atLB^otSZ@c($U$mu%B1bo&F5`_Op&^PI4T_wf^_-Afcw z%PL~u6&D81s`TSpc4%3?L$Le;u>4&7qNPkbuV6K=gg39KJ+I8mrQpe>1ka@?!KF;u zpkUUZgx#R1-k{9srr_$PgzTm$@21RnuV8zxM0BsHf3Ga~LBaRK)SC~JC?BR3{!G~Y znfml+Qu5CRjVIBJrB zX&soqA!U#h==sWAiXwV08fj+DWWslniv6Cu@Q@ zFS77DK&u}I+Rj|E#g673rm{vl9W`*n`sF!PsU19(S$K07W!A(|`2EfMZ(iGp;QTHV z62jB}K1l3{Geoso;qm zajjWN5UzzfDFIKea*)$Ov<<-&Sj59wG85?lLj0b`SRv@^L9_t@OOA-R^FT5Z4ulw; z$5<&y<{;XFfCVgK>O7E!lma0}$mq|()s!B1lwptScVNp*Fn?P-DLj`WRw5C$pzski zsZ^I^V*MhRZb13__^bfBaASJglJZPOPD!xY0pbpiwA-G>hq6%$^b{f6?~0^BQLqJi z@{sL!M0B7ioB}3F!)kXCtw>8qV?E1=i5&{(kvs!r{Qz=?6v-wLWE$L^R4&tJYElTIiV@xI6y{zSrYShBm zmD}Rwk1bl~EJ92N)h~=~%p!vGCf+0bkb=^8(KXSh`(J8aF(vHrqqVm$+Z8tzD$*II9R^PW-KJ zjIAiNsTUs6oD${KhvOcV(+%7L2`$|62~D`vqd3wEvi;n$)`rf1+BVwGbEzmJ(?c|0 zpi4h1^aCnwi0Why2AJ122| zEy*kGtGMgwt>e0D>TU2ap&fs%``D#Nw~4VN)R|dId*n)M`RWO8V9YEhU8>|$5av9$ zEZlGAI1i!kTG$Gl$ie(wRLfBX4gRkV9BjJTT!VQ#M-!X|qpb&%-ciSsP$w!;CrKA2 z@>nEdStM{gWIstRiliCihUWHu!h8F!*^?{{+<><{dh2eq@bxQ8Yb$&YyG-Q0a)m)g z;`^T!7crl{Q8s2Z*hrZ5o%K5!dO3dLq8fJ!xG!3Y4_gBxmYxfMf^F zk7Z)5lA*{KmKb_1V1B>DVvRK;8=74kfZ%bonO`z!xZAi76n#7%42Mw(iCof@jCE zB457c;t{smg-{bopto&m)2Ho1qkPVBHVEA`TFs2=#m1+h3VX03?3nsc&5u~UsEZhZ zSj$CIj~7Rzl=r+gD~9Mo$&%t@%*m&%)V%WRSdPF&x$+l<7QvBbs&Q>$l7)V;u(u3+ zAtNtbhF-9wjgg{ml4nlr`nYTtC){qqU~yOM}2 zXb5kgQ2Ac|z~>;A!9&y~uJu51K_4lrU`K&FEh7QEP30jZ7aO-PMlkW#V=(h%JU^*( zp77yQXqhN|AQ)Zuo6#O0;#Ng*BLk-A#t-Ao4?0o8%fZm_bog^BiY-f2a@jJ!k62m(CMOIj+AJec7o!{@9>`^ zo%KTvh>6T_^{#!5_a_9IoGiC@Wwv%@Qt=u!Q5v}!9UR+s{PFhR4S(jG4u~lTBaz3J z$S4cv(}6j2~ul?CJ<=gtVAMg%;g`X7W*NMv7>D;MdX-HH1m^6L3?x1DF zpf70!Hk^YmpZ;;q6ZJ`NkGZY4-a*`s+w5bKql+E)9vsl#;+!Yxx8g11BlLdl!IO5` z7I?IO3CtOe3SkgrZhBhYzvKlE>*v@U_6<)SmD`a}Zm#U#-!=I2p8H%s!%yDni>}>) zc#&USg}tt^Ij-oGINUXOR%o%1y|)_CUeK^wrRn1-O0@i%T7URyqaHq>q}30N&df$m zl}D3O*?AyZ1)YVEy{BaHQ{O-X#RSW=K)~dBGC8_oB0gTVu~M**%}A^}GXSfHPV-x} zG4m&*4Pmt{Q6qMJgc^mg8Vx{=%5aSiC(*ku*rCUp*ZmUm-b&2h%-`O0Kx1El@~t$i z^S=_&RNz?NlnSx@N_l!y#!a5Cq%PH8(|_rUKVtZn^hX@Uz#GtPOCwXRm$&K=MW1XM zv8=L0+!`Vs0-D=fzSsSibRm>C>)o)*(G!^OYU{k5I6Hjpe^biW9hlp~+pM{x0N107 z{%`0!d1G&M-4)^MUBm5(TDe$>yf2Ig>5?MWNgrecg35QB@89~QukD;Yn4vNZg^0#5 zREZfeOW0gqQ6{bbbq=pb76c9_jP?w<=BT(wFhNHoqm47KUK|5k}^Enf>Dn zDOuQYyzoK1L_#6bO-?6UirO^Kq9n)y9&G%+7v2UcoaKQqV0G261B7|6%JLqcaPeF5#FR z+jht5*h$Am$LZL%ZQHi(q+{FG9s7ec!A#f6mW?b=9e=UDzAAT0t7G>Q#!# zHF14|^^W#Mp)eSpgc>ih-}Z}

        M3UDXbPVJmHZvev$~fdAmfKZ%lf*NUNInSXp>h z#9b@4ZI$(!X^C?6Jf2qHfINKLtK#mL;TYZr@=mFjQ2yTo{ZRbhFqFfk)y32L?S$WP zf2=|gbhi`sIrI9-d*|Sd^cgLj%ATSkD6x*TfBPvbG10*&1|*N&55(^nM0d~Et?O7( z2?PdWPu)MsU(BD(|L-Rwxa>QRuh-Vc4j3px(7^S({JZ=|>bo?^m-~+Nj`Ba(tC7_= z!=JCrYA;7G9&fl{NYcCNNCyH@p0)_Pg#I9Yq##Kl93XxxZdP;p?r;{2z?*+r4}2?#)ybMr8c1;lm9PBTV=yg;Wg z#03;?sgaXk*@cx((S-A89&)xP^dPf%9B_5898)H1yzlUM&>$Sclxs=3J|8`~K+9~9 z)qtG?b&m7WIxddu*6b-z5I42HS50RveXPsqheoL7*@`tpIz#%Zrlq(J_p{A(oAwm8~^Jhryg5fiqjMU4*)1!|)ae~bqMNJ&vi zq4vp8l=7GwNU7lRP|or}1L6=xm~aM|z#^HqT?|MVcFCuA@pJxCsOJT<`J2qbWynvM zeZ%U+rp(6$W)CqR58)Xzc!@)D{A@!9Oga5dE;ML+>zWaSHoW6~!Z2xReKwR^Gn#}s z&7y+n-?Eu;S<57R)?!fWA%C5q*36LL=IxV;?ndQ272|F4cy&aKJA$R0(3($3Di-+I zN|DT@t`%~@%*3xzg!vbXTg}9B3+cVZ^a{bfBjxV-xaVC@CIwwF@AsHaM)u}X2kbR| z0Dh-UoHAt@>T{I#IZXSrXJMWH5?FTNx7sUM9V)I*ls4c={fAN$F`x|@+QxEakGHvx z`D@78E>-IQigSR#CU|5MWu}cM=YS9Cp9EnL5^o&cUs|dG3Pd4Iqmpd1*qX_cXd!$Y z6f;S4L!QVz#uQB-(K;=D}rlgEWTMnB&p*5T2Z;!|(7r>lmWwc7g3M zayq|E8M-FU;oA3W(&+Xg+D;fsB99Z=&>8Y0&qzDi7~&%j_N9qV>7}&Z9;A3~5J8{;68`=CG7SrHtQbmgdo=!Od})OMf-B;mw5T^UK+TO_q2YWF|%( z=;`R1vZ@w=EE>uYdJ?|{C8Xq|87rFts+J=f#OcN~tACz1MO3X+Gze9WiB~gZHicL% zXEdlx?8gp=#c^9Js0&1aSg{)~(=t~idj_CD!81@tXfK#pxrhGilld+Ib zd{FRTq)?9NKliFM#@Co~S@j7^N1zzOWVNw9+kQSea9JJxUG1Z&kDWNcUioKV6aKb| z+1gI=zKIjt2JW>9%h*Q6f2%)O1Q{k9i5zZ13O6OLk`ZXeh81s)i7zXxkr80WhOuXk z+dpfBUVug|T&fVkK#WBoNXQ-3<%Iom0^_hC#8$EbQ=FPM7|tA=_?LX7-z+AO86V4# zi%{I&O6CBN)9g|6PtTw{->eO%JkAAJ+yc|h^hZ+R8i zx;ay__9N4H!MdfnUTt}OUDNg4AiKKKxsl<+B$uzKDuRF zZJk!D^!UDNt7*bzsb<5v)3Eg-LZ=bWWm9hB&xX0yWfnmbIA-1PpDwn8 z`O|`+lB)X!ATHffgCN5hsR%{tn#c0D0ts3c7bu7QGlCOr1!+l5*|b zYS$FEw>|k<)*8-FvuNKauMGaWX7(u)dk~M}QAjNCCv}YzqJm zBKgb#%}L(N*msO;btvM&cWisRnUqb(m9TTYn*lgh8ePf_c;b3arSK(g?y`N^bcgJy_A41o!Wp1zyr2I;+y zc3U$lV_yVAQk{X+<*W=;C_2g??&5%$I^w>wpn%jjUSJ%bk?~}lx?Gi=9zBXdXCAeJ z&0Apscn9}ami{*l{S!y(AgAl|Mv;7t4FehN`In%uF9=2UX)d^~29X{(t(kcR zM~1(-p9gMChl1h>lfwE&_H;#vK>&#NY+@#S-1*dl$L7Txe(Q^#iMY8nxj-G;;5`x` z^Gm%$L`5?9V`c5r)IMUnpDs-cG%d%Dk9fYPw-U%G4aJX zbwzN%J1_m9Ne<;_AmLanJ3FHeDuVm!iUPHOI75wq?{ZtzMr^K*wkhw+{dh}Da_35x z+lMngzILOhKzoC&R#ofG#>}FMx;oy3#hHs23^MI;O?)qjdLNSXe&hm5K2sp_Jqbk< zJhA}O5d!YVNT<4wTH zZN)QVm?Nf^tI6vnpZx%DB!l5{9N)vl>LNY=dA$20s=n81tCNWvA=;_VTajiU?PouScluoHs7?$qb0ti8_`^=e1=ev3=0#MpFEXCJ zbJrXnpP8@R>QOwb&-c(TBu|Rl@^3gY^?SRI3zhLR`0N>DkhXu=hCURvIuKLp3~- zyJ`=-ghuSzI@x2XYgv4PS*sYt2Wn+d8VQ1Ek{qE5o?@SO*ICK`C{-vx3IE1DQZ-U0sX#4!k^-j>1?%6Z2!rMdbc`iUl z#X~gw)*sPc96{>UACu~Knomk@-jdJJXS*~G$W6;MMEgZYc1WoJzMtL>Wh4C=)vU{J zeLICnC~XJgjPYU|kcifV0TSov08f_-8hy*1msh5O11VeutJ)}A22!OGl6La&Lm>BL zD_k;XljW^;aO&vsdwLNK?WhT{Ku59nBvfqK%ZZX^Cney?5i#iW5RDi9Y)|?20)O$I zRE3?0#edCg(x}j$LP+ozY(~x5dbQu$??1jVBHTtsC8kjU<4MYh!kQVD*xEJQHlve^ zp^gnM z)&7CPK=FSs2Mm$G-A8pIZs;X9J z1*I=kVBgUUd~B`7*pf@~AhE_ofxh zJpFnu0$d{UlevfL=sJiwFxWP{@(?_DDFaEqCHh|K0%N85PiE;PfLk=r4AY>&jJd`R zDL@=*Bt<$g0!b|DJc|f!IPSXGKtUQDOlX4Hroju1Qx`3~>4p~s(|yE`OqplJi$3WE>rnn(V zLGe|OIpYL>6YVYh#x1gEe|DduD>~x;f~w)HkwN1${{Rf)CnA7UbuXoks+v?TyGb)B z?ThCXmw^bWBr)tpQc;iiE7hAcSf>>1!Vq8mBW&q~JFKv(=ugYspdI3mT-4F@X+Iwg zeY*BNJ-M2wub;+SiEeI*soARgF%nI*!jZ;P-Gbry%`n`QQtf5D2_?*65ID8`{y_12 z_)Yny2ZD1O@G80e`*T>$M;wSK!FP~=#A34+{;I);vWjlYd0Dh^S)?3&wr-DQK^sue zXQmWcFLw)5S!|rNA};)5YtUS5wWftT5v#Z}jlP_j-rjU~ef|4yZ$@ScJ-A?d?Tp{J z8#cN)I{uPMzjv^H13UEAr1Gk1lsCmr2FIs|2kypTd(Y-Gmc!69(q!ZEGkcXTBf797 zZ%PRoyADZQK1(&LpFR|hvCAw#vL(sz7##(57mI=m|D0<-IqIY0ps=Z9<1T)BIPF@zkC}dZ|%17hw3%8xR>xdBJafZ`s z1#QbD*M~QQkx7l*(dG!d!!fj(U%jxf$s(waahJZZjKhejCyIg|0P!4ExXZ)|=85YU zRYvWS4Kj(_Ugg$8RZzbU_k1>(N@e2ObC_TCD3GJmP+`FPcz>S)Pv)DIGhKza^GEmA zp4YO=@|`amP+=c2whijn3ZLzgVJYCFnkDuXc)P{XGqo?E{~i|o^yeLRcxC;WF!Ia) zmfq<*kw^r;c}>P2xC~G5wDNy(fm+o=T68L zn)rD*T7mcW^ivT1NR{{Q-?3hc1Me&?#{tHnO$9 z;22h=j=&-x#$K~zFtjSjn}plO*7ItWJGi;PZ+uyjoU2_);(pWy^(wfdVBAPI0T8P; zI)f!Sz3}Lbw~_$NJ~@M(5D+tvF#IbL40Oo4u-u^k@r&Bqv{b;*|Mc^0@6<3xleqQk zMjsW?ZL+lxS_IGxqeV(Jv@W?l^F*?WE`C8M(ha&X%pYA+)Kw zKI~AxK=Wp>TJN)_vhrT!f27a+6a|t3!PlTCmlHS>X#VIrEH-DSu|8S4a0t6_yf**B z3%@;gYvI4W&}QxS_dvt1jo-rDxu7OGI0QZR88{XkZp>rQ%}$TcDJh3@Mj2#a`iMbZ zrJE7{6PJ9g#^SY4T%_L8X81xM?7@$do~- zcy*+bC-}Sy(ev0uU*2XmOxiLhQLLP_iLhSlZwQ9e`p{bh!t^9SgPtfFJ22Q_x%; zBGkCX6PJ>PN9D?GT0dJEv3WEsdE#>Qf_uMoo1Cd^;fKwV9c9t7Vqbb?#t(7Ly2gwX zyXF-C&xFaj!R8rEwgz>RkW85sTwtracbz>4NNlW} zW{Ac$i$Jg1JB@AIDqRj4rk4K00Yp7UeCWb{0}FPn$q=HpLkihUndFg&b>{tM&4-w=)f=^9`lFel|-O5 zjazQ?${eHgryl^Jq3f5eL(gt|*k$`2;-}*n<7#^X#mf-7!=?R=5bw`1u#~~F@>hb~yYx5Yn6ZWu?_a_gz%@SD@ zU{gSS$NWctT+I(f<9Vge&E?OZKi+?I*zlvo+2|B(c0RB$!+yIP!yj{-+qk%)znoee zNlEB#`tBxYo-Z?u)mBYy=*)H8!*lGA(wlk~+qO69i@BTE^%NUB#_T!%${3Kl*4Z^h z*d)xNYNR_JyP$oE3zV1Sk1O!?Ab8IL3?T9|yyX1{KV8f9xsLff!upo`iPcf-=2oKZ zqG8@t=YhcmANCa@V*`5;QLSS z#QL`ORD;XQobLP=2U=5a?#m`4}Q!zg=NDiQakeA|7kHlkIHm9A9EhwgD_fRjG zF|c>|LNG7RTw%&K9_}ton6_|8ETY1w4W=x~TsX}bVS zu?o)(g&$kZ{xd2e8PZB5Df!sBu>t3*EN3r~8K~ehib*o!%iZaIx0dg?u!?&Wq*sq|e{r^qQR#bb#e)a;GL;dMBIKk38kc)yd}or?!(_@YK4bHSf7uBB z{(vfz+erRvnEa%@`I5t-c;i>2$56!5%3vFQN#>|3bqH?HC+0DlaD1#}L7KXj;I2NY zNB@XXTLt&%a1lm&rBjrsj;JhVjCcplulaRH+npQF)(kq}npOnvhb88WPai)fkLB4i zg3*=dB5t6o52?0x8w6jABK741j(y7AH#;^*!1$o-s+3|CTDCaa+XUFQ7FXN=SQs~} zdfxm6jr6W?fAmnP_dfsS{uaBFi=*k=0i$E2v(v}aPMFVmd+~+d4N_(8kk+B@5$oRz zuYb5atdj1&0eH3!=@hmyiazoIGwi>{S9r#A6TLK2{_BeIk)Wq0d%)6fsLu(q~pyWI)NZ@ImUE5gdX|-EOUgyU& zQ$5x2^pu$!8GU3-+dRH?D0{M=54b|5?Vv*fSBqC#5Go&A)snWBl&}y(H@D5cLXzLK z+6jeq4Pw>lJGa3S=t#yqe?bR5Xdnor+>(gim00uhi;A4*j(6rFw2^^~on5;w=F+^V zO$UE?_50B6UA6V1usbUji9MFa$ykR|+tkkL*G@lz-Qs0n^v2+guNL#U_@5}v{+ zxX2jtB-Q#d%M}JQVXVr~o;0E8HuuI=VcQ zb&Wf<*YX!tyNr)1TCMf^TZS_?LlQXGt>wP+n7FP!#h&eHtWqJ4ph%3Uo;7vJ^o84frSIYTVtx6j($ZRIsimr=3lJEY>53r# z#P8wukshLT(?4f@{zQLEz^JjP(fiBrV5bx5g86Eg^^L(Ll=d+fq&-#6l;cK-Yw(~F z7(dG^+E1pFS4MrsdkP~@VZa5~;w`C&BBOrKYX*WBdnb(?J7V})qH2ya$_fj7nl@bLmX0-y zjjdIJ5a+h;yTgHr*~1^qhgVn({a-kUFj{drtB zIOv^qd~P0-ys|Ao*qiY+p28qA*>L2aYav=5ItU8_rkQm7a%RL{!=;Vj{!y{MF-4A6 z5uSuCfE8lQZRZXqc`YtGWd9V9ISa!Xbho|00++htmN-FiXiZK=nQLix<1xm`;}+#; ziSM0qs|_4I_Qk$wQMvm zBUeGMGG{j~U?w?V!CGzdpCJF9STlY3pW7qyQ@jYm;XQCabB%=(cxeNLc+_cSVmf@l z4@QBnaXmpl@6Fd%s9tG6WN(MxWx&`bxVcb?@2DhH_el7e&%lvkUi+8AnNn-$c?HF- zOQ>?UI9C_cj*u`gBF+IA*B!ZdxtDl0zQ@Iar@;9^oO)~f<+rO;Z~doJBI%cjwD$$= zPf^{1pR5$luB!@T@m|o!e!LQK+J>(dUOy^e!gP|5ucTR+D*cZz{r?Oi4|nN0Og*nF z53lIGFT1**B!uULuLS*p14(MVYeeYvowQR#iB!dqvYu1G337%HoI^Gys#1E)@A{x3 z@&Sw?ecZoL<+Q&q{;0+4wH5vI;r>h{&hRO9Lb8tBbHk`6cTg?qo*O7HwVhMoMRn{a z2rBwzdUKmxLsvGbmqeYk%Am+c7)#6X;sIkGMNmSMFo~7pjc}To>-HLsRh$31v9k}l z`BF%PL&U*AwZB)}(4nJ%%eYKE`%*z-4=M5|IsScC3Bb{pZho*r^uAb{^Zs%D73OR0 zg{akbVZtZ;nEU78X1l0srjLrk*7XKwj0e@L#(#pw-80l|wBLPSAyQGUr*UVYUYs;_dHP-Ns z??s`+?=?dr9-yU(7(LwpYMSB^h}nEj>xj`lbcHG{FVn3xHrpjaKLhOXK; zyww$ECl`YtsASI;Jpu*5f)$V{qil;2y=Wy-Qd&=nO< z3KzKx3dI(B<}~X0O%+Wn=%YW!?%&|fbPoF)I3ueh6CJ3mtLsiT)7H||#sslUuuQy*LB8Z{Ui@5RcIhUyTA^}t-{R@?(Ffc{K8M*awD{`;y5-*5&Y^ymCQu`vKoRSa zsJmB%*B0>(2IWOGDcorwqtMWR{ua&9;7p4z;Z3#4fvM`I5omE6`XfFuGoq(^lFji6 zEZ>GFlegK~syTAup;5E*nMFFm@^}`TiS?{@TAwU(Z6tc zI6}2Ci$U%_`Wd?1xkS_-Ng|=PS=MfT!qifKZE(a_B-lx%2=`_rfd`ga(Qj zD^*r?)nNU8ce&D3>~}nLND#lE1={C^)nK_t8aeR|^0PYMhC~|ALf(F_tD8OQMd?k; z2#A(M-L=g<1C&EsAF_Yl0w>(|^V88{HyQmLBj3v2_IM%Y2^9W>Si$a$hzpn!$NC zu4;6~ylmW-8ZKWTb)qMpe%@hi>uhLXl=JE;t1e*2wI?12U-5shFZ>vLZb9$LwLjmM zx%qkGH#0(qH&@Kq&!!Hsu&`_>?!jYX;*^*2C#*uvFXHTsc0}fajVz%$-0J#!FqSIP zlw`@h!4Cn9j{npCcAfk;*((dl7Fn92rg;z1Ig|ZOBC*}~|5af7Qy>4Y z3al#d75%}L`l~$%9=(kRE%B$_k6o9Co~cMp`)#-SvUe?|v0L|> zggMRKUREE&;Pqm=lZGQ=EZ2NE*Yf?@?$^Co94PqC@lSGYRxo;`UW~h={v%>zj=PYq zNB`c2_(qKSr)$nHv@=6GLh{a-EE-EDk~jC4%B864y#qo>6ib2(j`1`Zut+td}l{$34-3e0JX?8!z|dO-86{I}FmUe#k~> z1SbrqxhM?(q}5)5roI1C&fA}nrv$_3Wg2fkQ58r2xmLSsv@>ih-~R@2+`cc@GotA8 zT_ojE|2D1@Y5_8LiEn6Tw-eX3y>AS^e(AJ$Cp#93|9^@Q#0SeBWb5>MrKvLHUY3Kl zYcLAJNG0uIC8q;<=NMZRc1n2`~8QL+<>QTLl0Q&vx4@$a7~ zr$Z*=ZyxdBjJ%rT+!V$H#Kvk@Z;tg_1TCAc3ahRjOeiCjf?E5XKHmFpiyMVJ zskYoVP|{w#$0n?|ABW*V zq_?`+Uc7=W=|!d9!a1D6!A>s=uucOSwkF4V@#m-hGWE50vfR_&H8r8m3oh^rhZ8Ccc$djill|Y(EJgw zB-{eE@J-;{m!56fIf-AjbDw6ezGcZ+2;2s5M?-6eW(VankDa`!}0mLC> zgyV%zu0>is94<`95H9s z3@+)bvg*pp<`u1f$1?%%Sr;;kZsX}PJlNo>vQ|Ye`{$20(KIUSEC@!H+@Ci0i{+=R zrbdxgkr{XG1H(j$JnvkUOFV71X_pbqtsA(G60&^9Ucx!V_%T>e;}c%NFSx1~;V=;o z6>U4|vE=<`f59<*J5v(-W68n(u9Sr|ktYKm%U-XvlB8%d6IebK%Xd@7a2e$%)m%(4eN9IMPZ{OR!l zts^ZK;(!ejVetM87MiN5e4g&5fzD}bJ58|z97SX0rftvq*t~+eP+4F2J`J$XnN1B` z506CG`}dgMk{Dk6c~l)8IYj1nNW~z^4Kn&4v?j0Eljtb8%H|sWUOn5$MK~c|Fxg82 z1&6FM8ohkMNcjn8VUE8)7P(J+xk{FYh%aMlN^8h?>G*0ZhV&r5UL;O zPf=T{_gmAqv@qwtb2;DbPVVO<0C*O-Fg*y@%)0ZPuMRz0xiE^;yz!f>tI=YA^0TQc zSbz8CzejkR&vX-=j++BL_+HPswND|cV^bo}$JLc<_L#&RDnuPVKIZ!4J6B#_=6m(l z-qOrXzy-hix6EbA#^7r3QFjGX?)2b)NYE(CKG;RzQ<%Ujw6!LBMc z`z&4YG{`GI4KE-)q zd)NZi>-cgwb=i5@%I0E|(DD|GkOm32l58(!$(W?3cQ$c{XU{#~mmep;Tj9*FUGM(dRqJdzQpPI3;6wyL8~`eMgSnQAbBdv9mPkQoMcGXTOt!CB3s7*V7xLR^@3gW2+-D z1b~qRewg)%(5Q~^GXx{enve%5Y%IDYrTEQSHL~gXPr_N-dw|ukRXVasGkK|I{86V_ z^?Kd{)IVqzF3zkV&`J`p*bbHJiJwaH#banaXhsEy7K7WG73fU{h zApC}h*f?y{?+l6~2-=OrP+4V&Y|KKS<=Y!hHUf^nI=iOItJa?Bba%KqFR8q2o&N+k zRj=jeVX8B_ojo(2P(z}Z{2}~CeI5Gv;`*u6L13KdDL6fT{`at2=oqaSRG<%P+#$S~ zJaza*l3`>4keqoh$-rut1!#a$g(j<&bVwItf1XlRHl||TPts0wwPbU)Fq8BWtWZlw zaY5(rQ7>j6l7r+1+4@~Z_(80Qn{O%()!{Ot=`fLmiHp)tS&{FEvzUS%OQ~#?d=OBb zAkQ|tm)Qi1aEuw}06Lkrj(z~gZqiMH8THc-S6RLjkB0du9?~q$$``Plyt3$!@_DTG zBt6CeK#U^`cvtDkouRUoSq0Yl|F)vtON9R6!r@sLQE3{)emVv&s9gpx`#di%)6bah zKS;{z2plbyNM~}_zm#+c4=kfZYWT8P@i#~l40&>@#>Y9m!ofKu>Fqd-VZ0XL;c#j3 zW#-uSkdYy*BKpk6FTiKwR|!QVkLXUuu+g;Cqp7n?XUgaPhg$0ki8Pa8bO#HjQ&u?K zr$$A>)F@Npw_h)8x%>2X{@$$WZ}w|+f1FhVq3l64{1>alE)|8{oXX|wXd&8wDO3s} z-mmoy=ZUv+;E8^&qtX3?7N@(`4iD4p^3u+Z+^i=eZ+DI5PD61g57d~-&a`UaQ9*fs z&%X-cHT>A6Cl_{h7ZD=AmXr*NRY%{n%N6P3oqUTM-vOesk~il$qMX8yzTkipS6D6n z7C*>^j58!fZe;O9WIL*?271hrwA&&Ct?Kc)2izYzg<1QC=rhLfGLQrnDFM`)0d)rP zx}35Fnvhu7LYkwqrv^MZ)OnL@ee;4ak1lpCT?41?ZlA^wprLLQNqiH6@}O4hHVP$~ zGl_Fqt*gz!@xFQl9iqP7X|mLg0hEBEU$wxo>Pz{ptX^)q0QKsv?ffM8wPm@pyfD9+ znPJIM*WjDri}zGu1#}>2hX(u(xQ0yJP~?d?Xoi*N;Q*j7wA9d(P!{58$qHH3L)EP% zMBH79sU;2>@dY@X=ua|Vh+!JFq}hflcgz(LI9|msjfwr@TxmgDv+`mOCoUm=_z0s* z*O>muoi0XqP{ap!0(x9(qw?Y4=w}Q=$@#2jHBg26TtTM{#JEY=x~fYn%c_zCDt|ir z-|;^^Ocb(O`VX(jFHszQ_=U>>C8B+a9*a6BBc#`nG{^k!a0tSzez!l35vg>{rwQHJ z)4BasTB>ijM{BM4@=`oQ21W`KqPZC(b-T)S5L7s&E`BKDVgM&_UnEI-3l@AU*?^Y9 zHY)%_EQipNE+3NGg|VITF)9XtBEqLJN$v8e9x^bGGM9!V_GEN`SRyD^T4RDkh*t(d zoYEMPMW2c?MEI98wm79mNIu`@9oXZ}Px4GzNvrIRF%X{Hl67(1O5Cc)Mq+(uq{$yY ztSo)2!!4{06!k=kMog)aApvkI?5N+QD(fa9tK37V&aW zyxjJIMtUu<%u2l%?4sr-92%5?@-{jHBm+}8nG0?mD*uv(I*M?ogE7?B*GzyToA?JAR{hL?n^fDK4bce> zRNNEJ32yqnugcEuTjl5S^IKcZ&{YQFHKKyI547PVsS8QKeZ1M&ce`L<8fBZ(8bE#9 z2vbUxtSagcjaSSoBSW*my~-+RHVZd`(YDghxRGXLAZ%jyfsK^|mziF!BKS{6suEhT zDA>Qesf!nb8B$klPoG*JqsXTJP`Yz-_UBs+|HI%Yczv6%?L>yrHGzmJ6!gpwf@_^t z3sv4859h45!$Gvzpuo^^FS-z^6bAlynH-HQZOUA&xvg%n&smqFS3j3e(68kji8TNr zLAw@x>RC{iI9V%vyGY^;yf7gImu)T*8WCK+`2AHf(T&KP%HPUz5Ik!WeTd;S!8gCz zDvTJqn+kj@5%IvOU*>)KLsWK1vE#IZe2g3e5p@iB%T^`yP_PP6IW|1~dv=Cx`7P_G zKNg;o<6`4)aKTR>!8UqZrv5n&D4N+IR%l%f80z%O^bls$IC}$jdIAnY6G~s-8=$y5|3 z9^A?LM6|MxbIdPv0pGIFoUzDWPVI;35iJR1_=Zx`rzDr-M{-Lg)pm`CpgjX`nmUEsOhX;!HbJOVK#Geq$icfH_-VpKST;D%T?eyxTM@s1ykH(80ssdt#eZmgDqz=jElj4r;-%(%B zT@!Rh3ADGl@eZ6niVMJVkQSdAE1tNydN4_{7>9y+E6P_UgnfhoJK`4eF9*E`+7iVj0cJ})j&?Dn@mMNN)u}j%}1!WPY`S-Is zxQ&Ll9Yeo+0sb@VOv z!QnQf+QXD6N%oX8l;6fbhz&55lMNN+%W#$FQoYs#JdDunc$g&9?@^`fXQr1#H&c|Z z#EC@O7lXJvu4_qd28Y>(Smt%(gbV}xh>w`K`l6zo>sgmaH&xc+IG^0zEd z?Oq3u*JAn4l^ub*{#gv}V(XV%X&~pbn|DI=X{LuEZr?q~Az0Ktc(c5!?vr+onIfjO zWJE*K;D;eKj8gQS9to@%*8wF)6tM5gpjXM2Im%a*^|=oqmRm9`P&rds#V@vYCX&lb zcL*y(vqo}6t(u+x6AtPus+W4+=O@L8$%4tfYm&-5rRv@HGK&svHFhE~mZ8HVR-=ep zGTctpq-PYT7u7k^B`i;=s5qtqi+b!lotv+pUe=9YMd@hYqDU|3;xJTp9)NM-QYW-@ zgNI}gaIH#qena!8Msw*1>P_tj!3BxRc3xM#!j1olPp5Rbi1`;(5L6YrDc zs!c#cU76sZ!^HRrjqIuVMD%wR(L3(W5nQ$HU7E)wh=3}5Sa1yio8EF|ver6lPsJ6# z?{9NYYNROlziLNdpR(QJhm8H-f(JcO$RtNw)O6e6ZpC`S-9cSB9Qz?#9LNp#G3XgWdNdqHS4oN1Hc58Nu3btO;j=?DVD_RK&eA!T-_GdS$*` zaH&VWxkN3`w>Qm~E*-VDZ1qv9MJv6yCGb;oxo`Oyz7KRwi)3(fRyvE;z_()oyyQLO z_V3~(rXF}}_C2--+jIC{l5Uml_^?dv_*%g!VY(Pbl-m3UqbRZq~Va5Dt zEo{3^;!IH7u_fRws7p{8sW)!rv}@&mqIg^+$JZ}f3DpyjNb}s>owdR}S3-H#U$#=W zJh8Aorc=skBGkQ(s$xw!b3C2LrLN04{`V`h+l^QAcEI_Leo9~6;##vt0bH+zu=(tp zH=ApetuZs06witGZ^7+ixfdO7?}?eWW#(iC0S17xaLo|Uk^{|m_7F!Feo$Mev>21J z4T#RoV%UaY&(VWg@0m9pUhett?u@pH9 zLJe4&G9gl4v6$@ZuGf=qD@)LC_DCINs3G5Dt)3c5cYlD7uc)TA83@QvS%yHm_MTI? z;h0BaKucj_XuwBE3fM#@2f>{pZSvTTklQjm{nSwfOis}=>hLP5#AUvXtX!1;8LpFN zZPCL7T13A?k|0$ae!ENwCx8JnR@-WpQn&@?FetwbHmo?-AgB#ufJ?j7?btNihwI;y z-@-3~R$62eWPIbCq`jRDqf`CWnXh;^~4Mw+h2*{@@#wF)d25S-+X!;Yl1@w$Xh5tXYmHd2#G%Z5#Ix z@5#8IPEy&eCDf6VzFfB>b+W?w5TLL`oM06D{HwFz>n!Ul|Db2pMgLuN_DsTyXJ;evgQIbLyc3jiYl+?i1eN{=Lybpd$rHHe}@yn`}h=C9Xo5AUGaiTaVJn z)l5BEZ=v0Z>P(Y_0FV4*qslFhy}TMB*kZ$SBLi2MJ^yT24cV=FTuV#5Wac#mt&Lea$1;fGbO z>EyzrY2(XC@O{o{T>SsQtJRY+8<|SW3##OlJv&NkT?i(fGBn@ifp^ai%`-_#NP9dk zzuTf=^^o*jB$%yr8u&4%_2FwGMQRxqbUcrj#XQ7Q4$j8^d0|k!xn*uvH-WqA_Dv!o z`urY`z2%x>t8w7*?>^wRu`|LW7R;|od)ZXJkA8V8>3pQ-2Z!zuSH1$f()#W>HcT55_IMg0xY)$Ew6tq^Ep?A5S0JnuZ-Q8 zHox=HN(~UMXxFYze4tcr!_E!MQV! za;3idCYZ(roh6lXNr;tQfog$&wEJs?AnPV`{E+lFmdDT~of$oD>|QB!zlJ4Y1m{{P zk34NcLm+>(tRK@*m-<181z$k??@r3W-;fWZjwM|vQ*P;h@%0W-qAg9-;4Ry?bj!AF z+qP}nwr$(CZQHi(uJ`@jy?WGxoSZ?PLBxvOu>*VRFIFW$`y*+AL{18omd@L24w&VsV|MFg-qs72s#z$I z`u3zvv?9yo-a-Fc+cf};?i8dGbzKA`K)#jY54z<6vX{J_mIv*UyV`~VYaPW+gH8af z8Yb*?z{ZH`j|G5tmb`#w_wU1HB#>vq>p|{Ny8HlfXs=I}hTZllw70Y4V_n|NIxVbP znp?%r!RBP3x36p=_l>dCaNdxsc$?mQUtfP`Xl>|jZ>y1L-qWe(S=#9C;$Xg%I~FAQ zy695mfo07hPDMeLAbt8p67{>fp!&k4$?Uj$BMU{3Wd22$hnT$if}96WI|DG4;b#+m z_hluju~r&yVUF*S|6&>h&Wav=-+QU;qp(DG-qY;ar>2+8c-+9;{vsDR%^(A<&DF|h z(>Jp+>F>JI>NfMzrp;0hY79Spy)7LhP*D3U-kp~r?{_u?K~D5}$ajSyC)KzDS)o2X1#GtXqS z5XXR2)v>il9*yJSv zl@h#rS7lyh0rsu+wcJa~5k9SRyQB39aBj z^`-^Vi3~bk)NUovEUpwQaTgCdroeF=1}ZInzg3eYUHSys*G6V|jS2_%&57R*fwYuRdKJ@iSFKT|_W0t!&6-8K zXJURs47-`VW}Jy(tD4!_1gjp;ji1h|a|K%5Fb!{L9NyF|pD$=TlY=H4jXyPAkCQ3c zne7*2G~C`VUN2c4sP@AI_aUa&GP_^5VCTI%00!5&_QPVQz#}(CSwUlzP{UObZw0-p z3TXK`F$@ei-Zx|9`_ugaJjF8sH;S&eS+2)}XD^;7Z!b7(-!?NoFIqSKZmcI%HgP&} zKcT7}o2ga?SNnmful_*|Ws`O=;)9V{apdT8i(S}c@9SynN zgBVjJJzg6a+oDdNNmT>a@d0ljNqhulu{a|xv*hGAL3B=;F-LlV^`l$=-k9)ODvtik zy7;jJ+#%es+?XuBrKPxkEor{};U5debpLAv5Vn3&U--CCjTjamOTNyx_{$-Xd#6vW zxAiiG4cnhGtNRiY6Sr;I=Z?1NcldGqm(u@TN%m$5Jx+S)WC(GPuOWE>{9(GAKf!11 z2u+Dae1LC>u$`_4A>cC@><~WEeygMjWFa|0eOtJ0nTHeVyIak$3&l=)Zjh9baWPHh z6pVR`6UYYf%}(&dNeXMh$(Nnuef{Sf*r+DK=k}Q8=OsSAltd9db-N|$Gc10Es^h7` z=J3c4EH32~5WT=}?cxx-9x!Ovx>TRl22OVj4HAVNMv%M~ey=U<3ZMt0oONSM_U>^@ z)@$Fo6xz3MwjvkacW_IVFF~md!yG_GpeZtQy`jE|@gLO6qOww=$MpjkSgf~SJJ6JRgRHsLy4dyTpn2!Y`9>^? z{P4Pa2#jQ%)mnVWya-xDAvGn~O zZ$?p{g|RwwWGYF*-cqAi>Gp3yozf&YCC6R=+4zbZVAz_3~p)XI6hQ4ApEC*~!wets3#fm1ua#H}68$ggozPNvsA^M?0 z%o-zh^p~qg7rnaI@RAMAw|%l{rsfTF)z#9!g5f~A1tnsFHG1}ep9CWz^A?EsMUek# z@em&-{maruwWk?Xs{4{#^li8GRR~Y&2sJFFz!NNoK!k!o(68?WxgaKhyIToSB@5(Y zGVvh?{0``iv%pX0VzaeK*S8NNbf{t`6Cy(tDs%l&Rj!1AGDP%$UnoPw!Uy0H2jq0W zD%33@v$3o!=P#|RsB5SyD$gs=9w!hV?a5+xjTLE|LOs_3WONDqHz<(q>T@5`9o|F$ z2P3)k$UO}B<#B*N%hTCn@migv%B@JdSp^{C@{vToQ4 z*%I@(SA1T4dG~!-#kuVh7Yg**NDh0;GbS?VV!(A*fUgLe=~Gk<2nLXk8wp;!VM`M! zI`7*?B9rLworLV+`#^&UJl(UKdCDUMVLS`Kodf%YA(gE~hGSQ0iiL&0nz*oI%Zc^g z@;bS0$QZs6lESRQQuKc1uAJg>+vbC4l#p^U%7uG!=Y!i)pu8AhP0X2vB^C81TtRh- z3u=MKj6q&IrWqYotT^e45tGJ%Aqo0`fMT!T$wg8GV>2IZ#XKQxSSP3oM}Nr=DzF%9 zpJl32!kneydM{`pEG~(pR?9fnFe?T|=Wb;cVJgt_)aXQGuC<6*0R!Thlr3M99;1U% zppuJ|l~RRJV}}3uZWaMM9X8oPBJok4|3Gf45c6*-&ut@1M$(wsGuhd(V*N!zJ|tG> z?|)vsGd{+4=3G9nCI5nIrZ`GtaYz#M87}?v|0J3*zdknUL=$eB+77m(@Wke4Z^7!!;L)WnpBOZU$gW>I$}l+ypouO6wtB|{;vKduns z!N?%-S6o0{Ne4N=j1d!3S%Y*&UzUX2X8Wz6mUO!`e3ZiOT!uu*?Mb4G+JzjqhH&FD ze}2J9&Zefc#aP-=U-GmwHKX8&FA5xckMPWMQmiV5c5#00JfmXOJ)i-&S zF}QC30f*?XB;K>{LT~93NEogs^LC2|`|cDKQwG6Oa@IlN(K6g8UV`3u^=t0JXBr&) zTVppIdnTW#8=!)Cv&jQrh&^ENMtv0i)rh>k7mlOUI(uAm)bGa7lmNJQ^6i@7TLW@W zhFyg0FN75(x^gkWhzFE4hpI)a&GBPTK(2^gs8IMui8J{)#2mqrD|if?{-@2!o9x~U z{G|*R3hUF5)bGgWtOJQahWGUsKa`*xX#@=pl{{s}D$l~qT6b75ig7*Bf&0lnP^L|b zgGC48{`BhekN0cF&7zp8_I_JuvN9SkB^ zZJ+>0CP9!?8EQdbXCj4#MNUHsN*v2Rp@X4&r3^L`f}!9WWvy|Yrj3~_rq?jjOe|yS z`(a_{_ob!607sbjmiB$6>W~gtY9E?v?jM?($TV0NEWo!CNbmF$=1y>p6+%(SA3UqX z$(X6C*u1)n%k#$uIXMc9)rUe+CT{%2iV#HAXEOVJ?Q4zcR1A4k9VXcnEmpA0sg7Zk zl8!{9nlf1BfVf6ka=ZEAo(dz^PDB-*hKKRK@)(oW25uk*w-N(zOp9IM@wiEKdI z=1q!NkXY`G?{nTke#k7W0!arkY^NuD){EbH<}+^CmYB5V>gr6+HytbM%Jkav%IJhQ z?_;F5ks^fyUNQ%j?rBnq9Ib(BOUW@1LcmAa_qO6z{OOqtF^}u2(YR|?(nZ?g z`kZcBB=>f{X;#=MewLoSC%p-B|MI_J@RLPp6QN4E$5fc#E;qAS$z4`3s>$dVS?(rOv^`10@J-SVkM=Uq-Znn1yfynSu_NYpD^ zTTX-9p0_@6c3pjyP+G70!?(o@wRC|W4fG7c;SU~#j4|Q)Bu#+v!Mfg)Me|H~p<$EE zD0ISINw0dY;^Qr;&xK5a3y%>RTF9N|jyWS8<1pY@icu(_kr&TU-O?${LIdPP#OB!T zhj`w$(UJ!U*F}K;1D*CRTOG`fnNN~1sH{fN0p9fpV1ycbNr&{k=Pau9{g&%Kr9&lY8wrtrQdTH=V}N3;c<_$Ce+tP2_sKw{O0(A zvL4@}{;ArNN|iJ)bN_gUd41Rm9~W)R$H%NL4HYJ*=)VVpOX$}4l{xO%5faru`RkF3 z4Nvt@vz@0Q2XGYfnv%=Y!r4-}sC1b51G}Z4CE@tt$(^!sLc{eky0C?XrL_=~>G0-R zRP+e<9XA8=)9z_M^rhhXJD4Z`j-!q5qkrz*337OgS#(Y>7X1BV8&fT&)z-SAp??07 zvhUCGgt_YCSzJ)$H3meMR=T~dp<}9Je@(iL>r=|o-H2M#np};!_f-X#76+qzp=^mu zi$pr8>VbgAMQPZ88ly^yk}(7-qE1W^H7)h>_mfI$hSgrsFR~ck=dSlSZfzcj^AskZ zlImy@VB+!!GNe>( z3Y(Ll0ca74aWe|%5CdNt-VsV(yhw7xMXmI#`ouRX(FT`K`l;k4bT!pGy>R-8coQ+Y zu%0g+`OzMNZxoIj7Y2X|Wf68zkt`Y5@bRZDKu35ag2VtXaZFApH1aw~n+5HUEvRI3 zP1ByO)6{TBY>7YiRpa^;yid5*A4NTd1NH|j9y`%Uh1%bA%;P_q)amKz{^>GO*j%6O zKi@WmiKyd%U!wHn4@rv2a@t{AVs44aE(ivV=VFf3`VGYRqq>B_T(-rN`5f+v2gg^T zNy|s$6F|fj^ekOboviy%>Xk*Gi<>96b!1zZ=EQf)3?oN2ySIG?dA^?w zNKAF@>jxUx-e?_Q8p_de-E&4t5GNcZrK}31z~o*!hbjDqMsW@*q4p(-G649(ol&Q}H*BgN(}F40x1+6k6u7r*M| z#*8FxZd>gXW5v%^6U{IzL=`DkRu;zZisSgma$f4MpFe*fDV$4aPZ=ub!trP<+V&Lk%7RJQTTc`k_EgtU?sA}Du)q9C#rSA7T-lntKj%d zo8D3y39ec<2uu<|wNP@?Ut3N#MwH9KuxzSna}cdk2|`741bB~^C2%K~L+LYCSQI_2 zUKVUz>?N}rq#tvSF|>UeUeN6FdcW*`C;Mx^BP<|5J3i)B^?um>?%tkJ|Bi zVtu9Q+g<-m(_)QdiGn6V42r;fy~Fn&3&YlD0b^HEg6(VyPJmr}yqW3$iD^>JaLJ@@ zCK^VAd~yS2H{&CMcyi^gKb216Jm%Bayrj`wxh?aaywhMez%_BB$wFVR{SDk%;rsnW z$2{Vy8!UIlqDS4Rn+jdkm|3<)6yrR{DTA$bp7Ix!tq=6dHqeT8pm2L8v&0KT9PjT3 z$~QO7NVyWL4N>CZy^&mMkL0KJbr2v{ChPQL>0-`Ql$&Sf^~@)8xIGe?&gKFzdjRA3 z%ln@cIJ3hkGB*BToL-KCE|< zNh@2>Q>%U$maEw^v@tj(x?gZ#DOpr@71y7yRV|>*{1;sGAq9Xz-%CbC)M#v04n^qi zF%*tm#12b_1Pc=Y9n`=Sh^3$=lPFWmBj1(Ijt~B#bx;?J>0>*lwo()*Py55#5wA}vmt2!!Yg`_pX8z`_b8{k(fi0m^v zId9Jql-8YHV%xF4=6B$Coj#YjyRGwe38^_xopuL#S$&}iu;{BV%02?fWetkm>yW_o_L_E_{@ts|AjQ+%*yuxFz$C|3`XzsD?lfx(~zc%M^cW1qYkQwQJu??RbdpCIxxqy0x zSJ_TeSf|O@@WSJD5gr{%{s3u&CNyzQI`xczzAd4D8htKBDCiViWoXCj3@;yOg*|hs zUwK9nvVb~pG0Q6T_CvmMzCL|T&Lz9eKJLZo;$n`1DeWHPKdI%t)5Cr?iJZ?2wdi1J zcsO13RBddu*_nPk?**G{^rnGgEb3JNRJ`INPrKs^B8IipC z;m?Lv5VT+Q%eCrz)vjI3@GpZ2Ej5$Nj@?ZP~1DVgAdHDvphx0Ar# z_c3;yq&@s$rd0Y9&%mI2<;%&MEIO_R@r8k7cq3(t6Io+42?wgk^#SPyx8adi=B;IF zhOajO8sRj(^}H|rfqg1ito2v#oI#F)oN|^b2*rdiHV900VP%7$*>>O9G7RO(!N&U< z_EP{HHg#*hNq>M#hR1COih)6Xt{{fn{lax$b>gd4r&3W5)}&9fNQPZ0wft`|IP^hJv=|7WgJ=W-XMw?dWba`SZG10ouGDM7A|Wko z@1&K5DM>G>l@whp&lkp)Y|=s+5!EE5(0pL8AOju0jS-*&K2iX#o^T3~TxmKR2)T>a0@senozu5}#v~$@inQP5(R$*|_IX>?&FWs+?3&(6$ z5X?NAqSoQ`SS!h4AB1hSFvBc^QEcc4YOt!XNgYi#B7ueOKC5!446`&zbW-W$nk{uv zaYfD3q?%Xv~p!}?OZ9;0%Q&ba|JH|B!EPgO>&nElU-UtMPi3F2UXBTf( zzenTk=~Kajyk*g``jvg#>o7XA{akAcjK{W#5 z;ZmT`h8m7+G8p{H9$UU5JVenR)b?rr>};p&MyAI5bEqgLzWZXuB<>T0&V*}lyDfUg zLc!sq&J$=G0_{5s$pf931oy;7bo+L_MbcZ{ttkHM28Gfio;dQ_0VsFXD`mH z4|y{agY-tH*yO6;y39@fz5b&e(H}ArIEi5)W575=$P0gXJ@_IYbnw@O2Eiiu`r0i^ z{MiEN{+(;_IWkfFfPx|Qv~Oh0J^G58@V-bk5lmO~{8tdUpNb_( z+fIkkuU6V_AXX7Dvvy)Qjw|J-_NFQ4RkJ>EwQi+O3zetF�O;&bslFM}<`=-aHtO zBK)(kdK=XEuO?+ZD) z*Zv(lm7qa{spGm<9@71}zy*G_Vf=wYGqKsN55-8Md7fPGpm z-^4yC%Qph9hs&t)SKlPcEn1yhJ$Y&~s&ce@4Whu>R}iUrxcEK;xij+cQfRiNtZsc|G5MBAvhJ zI>N@FdY`4;+6nQ~`lzd1Pj!7Si^rEOi6DI`m`}l?7Pyn?a~mbdgg$GFd+IkdnpSU3 zgmCITmgQ^*nS3dNlwH%RF@_h6;)TafgnATGn$#3zT1rb&#v86!a)<;-;grhVqz}lm z7r3V#)YEkK$dz5CtB9C_p|clQnO^I$h+Cf4v2{A0@2E6Zcj}UsmM9GBl9-q%3_eNm z+>Ex`C&nI{#)5|pt*q+n@YE=lKW6Hkxq3Ig>6)^LDT+M-&{|-R;pUb7+EV-BnTUz+ zCITS8Bvj|Mzwu*Y_Tl(8?1Z>-mw*E+C=r zyT|j&s7;(LT2(;!g+WF(=X9rhVkYIOJNo+QfomYPN%&uFi9Fy7FB&MXSB(E&K4alK2j2co;_s5jQ^5-@)OZAZ4RF#D-hGy$*A=*;WY^sy} zxEnbw@nT(FID*F-3B1LPVXyxr)#=g`dt&Q2om6Q!vNA?4E)!8_nsw8#GpYHKkK!{5}s?q(zLS4=b`qd*@O#-+t zgkXC0_gtl-XIk|LHH8G?d$kRAzc28w4PeJeIHg@+JDd6wZYIdcEDP*#kdrEAs8!g< z`lRlEX1Vc-M`!EtTZTCQ5D$)5BVMFCh#56!y7qru7*?gyAjF%#^$1V+Kqk%pQ-qkF z5q0&Ro^hQotjBow>?YSy-1}^t9(g-cESG~;3Kz9SH6W?#Ehn-cbS9t(_K-RjU&GQ+ z7jiFVBDcukj_a;pf`>_MS#v>w*M;)Di>v;M-gzED4}3*gm>22SH1N2PP%SyVUNtyF zuoksy!F)~A27=bkI#d=cWJ!qYqy&E_>gOWE4rfD3Pg-vVOM;-LcU)I`%wEEw8-1X- z9CD?OI21%2ZKRIA?#Q=q8<){hz#T@U@|*7GzcqCo4&yW&!Q)<{nU_s&TU%T=`!agn zn^nzS3Tw!*h^2yNAGH(N>GTGQq`LNp@)lg0d!6z<@^xd9OQ6KjG|b4z#!^iYTF#b= zuRG6g{TzKTXg}jtFflP)oJ62zd(O@T=7}*dcaC3?%fE};cZ&+MoL(ARGkYWkIN?jT zOuN#|)!DlT=dI3@hJCK}znDqZx%al|(T-RrJ+7HNN!bImL`(zBY{+9maQ)o!CJSr6 z&?>kQyg;6v`@yV3ByS{1*I&!wjp_hh7y>dH*g~M66yS=Jr|(FGMsS0`VcEw=Y>39XrQNkxs%Ua`L^4)-++xl*^7PAxKwQxX-V>jqnIg1N( z*BA>giSOQ*R~orhg6PF)`9mtPRhB4*M2QeUYy>CcSM~$R5q*!=KYx%Dpw9?@c@y9_ zP}a13W+vKgpM5rcx9Dt%EH;7{TqSqw8i^fxQ#z!AI1qr+=Mu9Mb_y$wNly{L%T%EH z5sc@njJ5;VchJwH4-)Ukg0PR7Og>qhBP_|7ncMFbN=LkNy5D({TVEoq(jfa&9p+W4 z2m=1?EZoiIRxCfhtmJs5ge~J^KYzIz0@4hc3ON6KV9W_yw%Y)CMp#fX5WY3D5B|2? zOMfKU#WAvT!;AgPWTZ@5{$5N}FX+oLz?r5GxGBzW;JTwLimMeQFQ6Vu(LKA}3z%s) zB8w^}lcS_@@d}bbcc#2kM{29anqC^3bo>>+Vua+xtOYF*fi{gD-t5WgPwH<_KiA&` zJka9xXm{Lb`2WVu7YIqxpt!}WWBGRwbMZygBSgZrx9BL``0YA6?J4ZkEz)@$Tab#@ zCoAh-Zx7Y2Lc^JJ3lXWTnOw1s&LC4hhCpnkyNWYSJHU zxo=1rHXyx#^N>zoY#>@o@}=h23^~trL_JO zcwr%Mu^j?0wN{8F6wN*<)2Tz^&ux<&F7NZTnJ$C#OM{Xb{^?#ZQHP#LnX!|*t^W*P z3Fnpdq3N;YG#zetp`Qt8Afp%R%{@Ko32&U?zg0*B#iAF}FSS~6Ox$Q}i{yP<-I4t< z=ECiGzUa~Oun^-33}(CLu}$!!{9V^C<%)%8k1@63KaOOb5U6+}P3m+Be8PeE9%RI} z&%n^*_Oe8h{k?g@9WtZUBYly3*mr)5#m!>5xQzE-&EF0(k}C)=EtS~M&Tztn8Po|7 zIwyqLm?}V_1sVwuY3ct?j7O+ww1sSF6XCM@n@epd{hkI}P#+Vvd_-)TlljZRX!^AZv*WAiB zHiO)CSQkFApD-To^%@R9uX%=rtBCK&3{#d2k;z1Cy^po0u#!Pj?$ zXJXU6(EmSe`4is^IXUFR2WE|hm8ta0C$wCWfE?FT8>{P9Q}Ti-wWF2vu0EZM1iO9_ zmg+2jX0@|t!>5)~7ysvsLzzlSuwM-)*>eJ$XgIKG@EeBm&1Ksq|V#h3LrPOQD z5iE&4Tq#j2@x9Qf6~o;N^2%{r6Zs{ZY{`&;;?lAMYl0L1B^~?g%vpvewLVYzwcG@90SIXNE#z9II*NW88?NobgK*KxJHU^^-DoJv92Unff zvj>bywIyGlupIIb3{BymQwyP7RJURSTvnK{*xTzTG!~+AN`|B`|C8VE3f`T+WUQo% zW~$Jx68-fW1-B`Ie-Bru=56F|<+Hz7MxkQ6vL;dTjK$`D)F6@4QqLw`26f@V@}>@A z)R2Piofxf0i+M-~o#eQs4985iYfU-`jH(y5TFV!%Pwj@R3Pdb$pEfs>0@i`_y!jV#U_enm2rM!_`ps!RvHYKXtdA=i*aaY&}*# z%;m@KBD7VWylw;%oh>_X9*lnymfMqmq$;Eq)Kdw3o|l-ibdcl8y_5HiV)Q@yYHSdf zpN=}Xu7K|`O0W=HV-jZ796~R{iEO&=>0mRH&vKk9PfACUBig7H@nk;wBk z)q>rBa+Lq-{38~5&Azf(u`+;5NCH(nKQnVPivnSD=Q_gR;_kPIB z5o~sOQ&mNPfKW5&!FJAwBrl_fC<(m$M*xY7F1OAXi@j`P6ee!KE`vN5Kdsq0a-$jc zwDFtH+&m(`(&}W{Y)3}?|1esMsi~tPZ^~D*{}EanrT@dj`I`T)3xY>_?^MnYv4RX& zN0=d^i70ao>3%w3iRK1W8rhyl=lw5ejsq8~!wFbJO3Je2{0A}L&kg$1&;r*|t&5(n zcqxzquqor{En_iPO-o0J4FZC66~LGSwp8(A(kG#NcQYIHI1!DIbVK9k%KNENSP_Z| z=+)6nv=xNjJQwr_?gfKJN(M~_GYG%P?o}DjsO(N4v|59xJJpU`)UjLS0>}OAivAev zQ#&25qOD*b499|J|CRL6n{HIm)&!OGz@u8o4mXY2f?63bect|t7qq}kwL54*g&EW@ zFv_T)uKXu9?lW~$Apv5M+5WWyG#BflQYrOprMbs>34=S?y~nKH47ivY3gF|+eIU&j zk6@BFX8|E!Cgh7C)k?QV8l=b^!@vdjXrThrpwTGAc7g2i#;D6Ld_ zfX8VnlaHJ81YvlqOVGOb4~7x2I#l{R$sCdAxNr}sU;o?3Z=zK*YBjo4k@jB*1OW-0 zZ2h(8tGWJd{7Ovr>PCap08oX3_xpebOU-F%Kf)WycY6}*idCymp!=DP4pV2FJl2dZ z>0(U8Xs_$>$RrY~9nvEqEj%jUU+B5x1xnh7K~eBX?Z`onvkt&h&2lM9hxNj6nttM{ zRm=WSQ(@lHHJ%eX^^8AE0b1gPrX zNz_lh+6!MQD0E*EDD*;M&<@2V9g!@?~iCKSB&rS&%H9T%*^!k zEMzxCfwWteAMnYe+l;C-dmV;gT|4}2uHfFtsM`0YOJoG#IZ6cJ5ed1X>da1Xo)JPhBK9 zgx__}l~3NEv7YbSA!8Uv91BPIEJD9@1{rE`yB*zDB3~teZSr~@@SMMKMNn$&T4Tr^ zj%W+U8ZNCaHza8{G$0lkSlobdwJs1IF6DuK0=e)oERkz&Y7n9(a)BTO-l+*5h~;4E z;~B~kx3GP~AX2A57|9=wZt`qiytw@FL_)@F_HL2+bVpG?HZ1vF*`U9R&ZKxC8fKz= zE1;a7>ezqjKpwSnbiWFtW7I^9ab(8}`Y}<^nrQkt3SEl6I$&nu+Ta==IUC?AKTOpi z`h+J>77$M{g*mP1GEy<%Pt<{wr6ST&cgrAT@Sh6oP?i+K$N>|Z=g(9a>iP)F-doy8 zg_fzUSUDRy>K@KE(%X%*$#+)WYo|I2GN7?|aC;zZwsyAhelUJQ9-ZER#$*-m#&nII zG5)dbXjjOiS{qREQshjGsER8U!S|uxvpQHQUu{Q3s_u=Z3!1gHc0+SstdaBEj)mp3 z9H@}yDLH)1r?EWGzhv={_khLx@kx?g16fZYeV1PIgP!W#sxI9iq!>egOh=Ltjr*J^bI$h`x$~eNY=h9JC>)Q>zsr=inlV-%l9? z#+ie`dI~>h5F9Z^4t5B`U+}qqbXR59+GzzN0xp*4R}U*-U;n(m-*@X)^X^T5>jq2X zA9Z?yixBU34w~GBWfl#>GS+z{G)Xg01U`wJ6Yo-gJTm~b6AXC~l`*(t8~qf_MNO5& zlp1IM2(~#sNTdLf^H3(N=QRgXgN`1fP%iIJ!%1e}B1I zNW+nPtE8y7FcMjmepr5(pL~Dqa~8u|9@}C!jOsHZ637G6$SX$ck>n*XzzX03_W}0l%@3Y*}u(w3x?Iy_bbT@YVcpV>Y*K@8j^maiY#))IxB1oOa!_J9~;aGeU0LPjzFu! zV~s>Qf|NPii3Ixy<7#anS1^1s$~S>_QJnDH!<3>fX2tAj2L?(*21#F%Wx>yevG&Xt zR!J27rg)6{zQ6sOFHww`TgR{>>RMuf3*E0coN^z zTlA9PzaK_e%HV|9)H9B%e~p#`aKU6=2Vi2g5CdXr!5(F7XHb}}G0LKGz97{hbq94O zaXf*%PJA4VSH|v@u;lUdJBTYw(rfBOJa4>`)+-4vsfc=jf_4MAzEiaEZ3L)Ll>*mB zM$5P5(j}w&_{l#V$NiVrg={L_WMCD(msk=5BifvkpTE_R(P*x+)-}k9?q-?gyg??ElX|~O}u`g>(-Md{p2UX4QK5{Mh?Hl6K_RSE23S=KEJQo!`|7 zVS{5FIJp-+TntrGQ&@#E-p8j~cdu;(t_7bx?d{QfPPZ~HB-$h6kVm=?qs-pK3jzM( zUjF&q=x8m}#k{(gWYBXnBWY=H{ib7=9H~5lAmJqKO_*D^LBPw-zs>&K*$0_#zy(Z@ zaxT5-i+Jb8z)y)K8gF9O9t%N-T26Pf%fWtvD}z`iChY2aP*81ZG=~9*U-bJyKIHf+- zr}2YDs+nIl{{O&Wr-%Ov>qr5#kOS#}pG-YAYIN9I|NEWZYI-Rg?I%WkcGbbe zEypckTd-!MbO|DeP~&qi-{CNE0RjOMCANX%JY|V&K^PhdRq8n)v4}Grx@LNtjDAZV z0a7e)j=~;%kh$(bSpK|xptx7jwmqDeK^P61t@@Q^2RJdm9h=%Z%J#Gk-T(-Obwf*# zM+$5;X5YXyvq`CCV|g>~wuZKNH4LmbqrBq0w!+HhmFnURWwK4MCx8e*MNY)>jh%WA z=OF+nEJqHy`nv84^HLF(&DQK{YhIO=m%+h%vn(YF z^CFyz3fu|{v`WlU&_L5;dl!34SC}fiBCnh*!ey5pp*5qN3IQ>KB=3r) zWR3MQlaWS#M)sB0!e+MBSy;?X_QN*k_Md`lZ?11NdKYYm54Mx+ho2mYC9diRG0T8p zNlcjEo!{&~vA*ya1i_|hRAnJ(EXEPeM>vLyu_);Tm2bbjCo-N=uIZEHWEiXhG*=(* z=SLOHRuhsso?!=d)2L@eWIbll3=>>EWF%&7t6`NM#-g+!XGN9Gt_@LD?POt6T4Nck zWOZlN_X8h6Hu2+FEk-3!Dc9p;Qxn}0tIV8lgk~DD?S@2Mi`(&B8>!>-GezKQR#Y;! zn0?Mlvl8~&z?|HA_3jLPo#3`KC2BLRw2hjs;gNB0bW5K^sxz-GlDF!L8g^VPvbNvw zWtndSxNw1~Px10*rgpMIlw8onto~E%7Eo%g@~-BQ+VAbREfy(y(SRc>_hGEspkyrI zGgC*6>XMd2!ebIs51)Y{==PVjCP0tIyo&=*r1<<=GxZ}Ub%y$pn0@7Q_hBSKy9tE# zj2Z_*QvKtq3}mk)Jfxpbt91IgGCmJ0E7Uzs+SK+`Rn z+@vWgqMc4Y(F#O$JuJM?qHvqM#gk#_h=e$9W~7gU86~S=0^r!HLN^S=5c)r^zP$B~ ze=l>e?TuzzI&L)F-Z^Z3Zu1tpUaC4@@^Ctzu=EkD_hop@{&M3Yygn4#W-j3bzwV^8 z5mqm%{gqHWN9(VM9~B&@b>hNMqMh}F2kf*LOb7GI8C-wK@| z$|VL;W?O&;;_dLh$^O1xb~im|=dPvp4ZZhmO~B@ac-$sw;^I^Sa~!Psd3^1mTa&fr zfxk4`-6G7f#txH+miK~nU%-`WPX)+O_^9d}u!+!GyWyW<9h!aXw?Wmk=&0rm>h%bH zB!7BoE-#&hSFPF!7%y0dKrkCTHtdU~lCF!7(8@d;gqR`KnWi{)CKo(Yj1xw?%#Wvx zRAyE6-8!wt!mN)OCG|k+^vI@Cir{7)+k&H>;J<=I3=}7CLK)2Kh`(XnXHm??U2Pc=8+hdNolcz-j+tvt= zsc`ymh<3ZO^g|4sSI5Ll?)k1A;#s`P=Rfx`2kIDAx|9&LvJ?2{7!AU z8T%agwMd}6#F&xJo)Ol6LgscBV9$aPUOjH^eCAkIcP@4#5f5vQ`dAZg{9}@SkBgcq zo-##qnknP`()7Ep z(>^vg{?%U4ZAL?6&p=LYkA4$c8)+|YMt@Y^Daa6`4VAfVX&<6akXR9GK7NA}du&r} zx78`QkN}W8JD}U>Qj1T^nA%M3F;>cVA?epvkt|*W6D%7RH>P*EF zc_u)STcx8v861ZjySu%k+`(Q#0SuE=QmubCy^qyRO^xEpU@X6#PGrrVLoH5fOWetE zm_DFZe4)eoDfPJ)G5v1H40`)>6Wn|NXK-vulk!$I9aS1s%YaVIswUg2%g>_t=M2}Y&pS~L5xvn}6V_dB%s zB!zdon$M>Smmi+3y0s!pgHCrCc==T4|4CNK-$z zDo@wJ0hN@#WVF<|`@9O&@0X>Dw;2;N7M2sO4f6D#HzIX~5lsnV|C8+~}&C!#9`*iZyMPY}#M%UAmtEm=6NOEWOh zd=z+5CHx9xWB(4*D8beA8lHuUV|5QJu8B)cKteg&!iJ~CeoR(b#>!?O9T$f*Kj$o5M>`XEp zBLS=Tr$aPB!y8{G4Fw<}B2nrLa{qM2U{~NX1zJr4b^q@;zD{6L(W?(t#b9PEJPfK1 zS9~ly^3?ZFe;UIh6vtmOZ*f%$cnkV(gg1aN3KTd3;zOP05bzqc(l3GHMkqK3yJW3<3X;;65g@*lAr`95+9XtX z_a|%`)?BL=GE3K;uRu4ye>KfGFInTHxKI-V$xz0;RxJ;OO7}qY*-cC!P-WE zi@@8KlBk9Fic+D$@z{xj+LDL`mr0B~;aUmYoRp64brgKB(8@u~-6ww>M7VwikqUS| z)`m{gfL=BQwpSNhyjh~I&Q4F$2r_fxc3wO(9e9?r9V{yeTG2+)bfNRK(@FE6^)({8 z5NVh){lQO!TDffb!Wi|bA0-V94J8dFZELk>(h-1ri5r%tQHUv(;43V#XmKL3FzfU3 zg!LT{?@q8op=ulkGealK;9@?E`R0$=YUX!(m`yb1n?iC5W?pDYQNP9f&(+^!taK{A zm+p;vlxw#5vcKkHG);&pPC=Gr*f=9MPwawnS^|J60-c07N^W^ zJ0voa2@d%-_}QYXjStS@o=<^A0jm4@3ZYc<(!?Q1ht!5tVQ)=!AA8w~iQ))VUq?)3 z;NCd$-gr(Cz6Cx#M4xgeP_)EE^m2Ha30HqZ$I!<+ayMn6f?o+< zGx$pnAL9^}04lI{+Q}Swsz_#3kjQgE&hGnT_Vuc%mO*9>W^VW1Je=4?&(o!x(Jtn4FB_=Vdc0xMKfz632JT{l z0-%WG#`ONm0*b($KwAGElWyl9d>tJ^(=b?Vs# zcrkzz#Hb}JqX>Y7{DaOIHkt9qS0e^57g;cdLDK2d*L`zO#KAhV?8_2a?-z!yt-bgS*NXlbB;zLgM2}`sDVw2Z~ zec68@2*(=Ob|u%W_gv2J`cnHb$?Kfr6ug(ehB@~y1?Jpq(q-%b39^e4 zD}MKOF!YVUmF0vTT;qsPA4)@p8I#s@;=&07RKtZrxYVfTi2_oepXEVO4k*<=%`I)- zK6{npSuo}K_2pj=C)eaT3P)8mYjyl?zVa-EWiCOJa(9&E&ms1-xOTg7k>Fm(y{HN)3I%<<8-VW+qUi8*tU6N+vwP~ zZB5U==4D>yVV-uKs$E~zsoH0s^yYA^%lhn24KH>-bAA~pJ-K0qEYphq(rt=3C63|Yap%YQnk8Hou^Ec+ghadi zQ+};N*$6Iym>DG+EdzQCetH>SK z;qwoF!SUEu;cqp|@G6DPr$U6!{o72xC8zcDef*mVDbMvkervyxCbq8!-o6>S$d2sb zZXT6Dq~zsp^u}Y@l^fBMKBXFi=&-cW51aXp4?8~4ogOE@(R|!@X5LvBFxj>ydZ1i{ ztzo)}eXJPv@sxjW_UeU{l(ydL;kQ3s5Su^EpIE-{!)h^cQ7z1OTB&o*nvK3aa_3|! zgjTw<=hH-2E5}6EETILjIY<1GtC{b`MG=CgfK}sO^*Q-FJM-shjA&5tq_{r>hFAST z9jU%O2IU?Bakj6xI}#moTuIvquCzFw74M-P#loZBQgPmJ>K6}t>MKLo?|Vl8R5wS) zr8)KJ?`xCr<>~4Sh;=`o;<`DvdybfR3~7PK>yD4&fZ(!0)(J;gtt{_|377gn%L@X!~RM* zwTz*RzLDGuCsl9gGmAD;jxBl|BeT2PR1C-YQhUtl289Au{0M3Ia@8(aa+>C7RX(s! z$U%=wvAUVVwMetuyO#q6Kr8!nU}f}t#%!Ylx6H+_;c+UWBWWr)IaA00tHAH#r#1XH zxhC9f*i4zL>~&W?KcRz!MO5g4#0$&st=Z;cmrs z&8;Lof)xE0GM5d-jvd+W>oqe@`rW~=s-dryHn!0Qyx})=hDXZ3GnsDxnAzCo%VHyq zF|e?(7O>@2yd3*US392VuSmsqbcAaUa-WF2Ng3B(BbRR-EgmO{Cqb`!Zvtr`GXv__ z*rl#$kd7vkP9?UN=tE3RBYlC@w1b;Ff1|?RYj2L4*_r;T%*YqH%%E zoZ^yz0qR_F<}zJ5RYXg$_+V8=*X?9_%#6Up*EUhD#W`>b!#Ktz%Qoe5V5I2D*vLyn z7#Pxk$#7*u(WIB!01el-=oKJbQ#73~gA@<(E1a1egmXsbVAwo|Zn9eySuLYVo-vjtDnCTo|s^` zK&TmzQ`)d09vM3fa^%*REYkL+A$_|j_%yNp@%1TxdVRd}1vI&%@xQ!gVt~5RW98UKYQy_*17Ip@kh z5Esa%P$WVLt}Q;A>unq9=)^v<+rW|?LvV7k+rXh=HEc6*mcDqFb#-^^*fZFc>HT^K z)?ErFuOl6vbd21272i#10GZ7QGD+uFHp;1plO||4{&)Q-v&b=eb?<(p_&B!x0#Yjg zC-sL}ma*N$@}5+4)twgKjp(Vk)q2%ul5_S2B{5oRwU0$y;=Yx}GXGr03Kjf$Lu-c zjQwB#>7Wr+94DvCs5WpYS~l(MC{z-i0y&0M*pLpmiIEkS7&pt~`?acT-{ZFxZ3(-KJNxvj=@GpPkH>ePan zz+X%!7j!0@!=pj5!)Ong^1;-hqRfC_dk)9@-3{%JFzRsgjZT9Di3|ZA-kP1{#e09g2d4HwXgWSrD9AIEyuNW~Fxy1H&s&b)V7 zo4dNNsinG>gOTo07xE!5Z-vuRN%G*3iA&P7IXey>C~}?U7wL0orV?5;YzNxjJgD%O zxc9m{hoKi4AL(IXfPwlomLukr%-?YHbn*&(8xpn5Ed=_MhaMI~I1=SlTzjO+|6o#^ z*@ukZen62G;i?EMB(-QXz?h%jqGOY2@Ho9Ip;2o>?g?D)R5H1~?6ks%K|8u-ct_nK z(A?2mQXT?Sn!2C={w)vN^3#9mPJE6I45bjnMoR}q|0ISnIQUaG6Mb=b`Tg$mhS(DL zr>D#3;j*Rnd_I*~NO&)%%AdgqUsI0y!c0i{pBSIT*`{J{JC%-cq$V~aMd4q(CRb`v zevQ!zKCc|bcGq=b#)IR9DeHgKE$yFI1SaiLyg6>il=ZhDK!(WFiJ3A-bTnw1h;+b%QvI zj5gV}L}GnbFl^5dWMEojlQ-H@*Mo(hesOqS0M#fdQ);1#V`3q*M9Lk5bmZ!%69N4# z2}azlccFJ5W*#^Obo*G|e}uVg3xc>X`XZ&NX#efp`9Rh`nHK6%{Fk;4=AT<5A$Gxs ziogrIwRcVFW!_1VSEs*yK4qFSLxjdA>XHlmlz|~1DkZz2ZNCTR_55eUi}(+OaFdJe z*|O}TkqS8G%KSK1IxLN0bcr3es@_!7Ax_*LLu0wT%qFp1)ctQX|w5Sqd(-O@=$9$ z1Cw?sZrRgI9p!Nh>3h$xXF4$o3(@5b6XV4NiC(K0Xz}NVt+u_%ejp@%VDKtIX)nK5 zYvNMS-B4?EnYT;7ATE{`+-Tn2=eL9P?swFeq_r|mGj$BU^KY$mhDOv1#W2Nji~m3v zgIYL}8j4-vVfB4~9Y3JdJ7ucX=uHOTkD+6Riy29?9QKTyciLxm)lAt-*U)e_Ies)Z ztc+Pmwh-}V`$|N$co}|*OPKy448)Ze&=nriIq12_A-63gx$WB)%6*|92sBqCsIKO37kLQ`W}Erie~~kbx8nTw$Ym3iVD0H7;59j@iktN zcQ+*4DYo|8ZjDYiTGiW+{pfQeR;=NlW6hjVa#QkFBUsqh)d#hmXc!my?0#s!zbd%8 zT(DsC0iq!&!*MP%Jp}^zbN6078k25g6?BHIeva)GjeLe9m)SwiGxp|fOLrhv4yybC^ z-IO3IJ3ngVTgi9i@=$=oddT%=#nA#4jgMNORY6fV$^`P~o%?Nvi0V^nJ4Si22VS_b zI}DP;Om_MbJz^uWC`~m$wIOla|E0wpehzokn$g84)iVPb?)DLkig_Kf3ex60uM!zh zlB0@Aw8jd~7yFSRh7+m#`}f{&Omqv#jzAu$mF%zMP^6;CDI9)&mCe5jy6n8|BmutP z=PehVq$@XAZO=EG{c~pxnoUzpF;Lnw{;YYVt=-sRz3*qY=r~dS`|Te@%jfEIo|^&3 zdtAdd1O<#T$A(d?6f{c2bjRJMQ>p*yyT2Tka(_75j>j@|Y^-~|E%0QRHF+<+-QKGF4XnZnP5EI}YcddGQC=0Q7^+sxz8tx=Iv{*Zdnj z2#By`s}n?A&;*OGFi*w`UONcok3}REBn6aO0jP1E?Fc6cqp`nXfT_UK_856$y@Hb7 z@xsS~9}#nC*o*Sw1}B}uL3H~%Cye(8GqcpR0tZU0sC|7*qkXe|iU#>$?f>a0KW=KL4@{}F1)FIB{>6!$Iq94F$0ch2*G!MCM75TQ{TR?z& z5RPpV*TAghLygxM1};}`yvY_GO{wvG!zL0Ng#0ZA47oQ3YjnQ18y+GQ1*s9jEb49* zR2S|HtNoTTvt1oHN0bn2#HIO=rtbs8F5wYEEUu5?dUYukg5mUqFz~u zvYLVZ)6+px(!nKzEQ((L8631R7zTmAejuEPD_+Gfu|@EnTWQC<*lMYXq8hxu@883CHQWwY2V=^Ym)3}kR`m-}BE=crOmz9-`-oiVjF+mZZ6Wq=(ULEUlQ++a?@|?SVZm5HxB){TXMBDj}`0IW!2O) z6;@Pa*QpQc3wF)|Hzz0Xvp|UQt@tLBnEt-@kB#xWtU#!Luhq6P_{xfl3G2)MZQ(JF z#hKI4rytHHwnBGnO1pPXIh%Bwgh3Y%W-jhW>@;?wZY>#&EwDDX(Rr8(I|lvax1~8R zCdY09JH)dd4Zdq=Ad5kYiEfVk8kn*1I+h~!Va%75$Qay%m^hNAxGpEh^|iO{JG!LW zI(TVkSiHA+wl6u3-Sd6@z#%`897&xaa;x7xJ*3f0^|L^l0wf+9PSZBILsUlEZq$D~ zu(0r*|2O7*$?OBkQ;=P5#-w@UN9wBoNFzb|1cIa|eb;xI{f>sYTBnwbFAZM>XV){A z;LU7_9C5r{7k0?iCoO4sxyU%}2d<9)`OV(T;JaU)Lqz{)NhyEiu|U$qXFfsR|wEW(!w2EWM9_79T|7GqNrB+PZ=uRE34$R&n%rH?D-E=Yy0I zvPVWa*=d(aU4kB8m&f6T#vgk+2^Z#)Ea`7(Q?n)E#U=L2#v2*30C6pE2PVpD%J#&J zlA9Fz9FGZ?0Wl|MjhDOg1+q@btmPWC(wl-t-&6T4O8Ds!2CYFkWgvH$*t>6d_w@K@ zI(gH1;MmXGl!4U>AU1L#16~6%)ZyPX=)b{3qz)d*39Z(OD5jEf#T9|jT7wbvy_wTQMvfXt%y$;XANIIi8 zVXWC52le+<#d)&nf9K&C_j}fa)DI_gS7G#R?H0`wyoWQa{ft^9{rRT#V7??^fi2?R z`gYI*sgub&z;gF}tQ@SaG~`wr&PB0(RmL~=oLqD*Q{X0Z5zueOj4wVC64CNLB8D## z7h9F`p8WTxLwrOGn{I0K#nsF7+tJPJu3ZlAlx__oM@utDBJc6E4ZrW?^QxIo?A4~v z=sz*qhb|*CmqKLfo0>|lRSg}*WBShMW*9?C{QA#Kd%npFA0Bp{R0-=gZXyRHIbv$N zD**4_DAja`MVs}hmd983B*uKlT#m`xH6Od&9x9+_hLl6r-tqL+DA4F7l~lH)UUd}_ zw5RpXHwq3JyW%*{w-->Wi|cFo0&8CTQhc*-d5!W7$1Zn-3a}j|RcpjOcRyTVCsbkK zyIIyPNBf8$F2Y*Z)qHM6E*cc=FygO4gG|J^C-^nuK28}2^r4x;`I=pWAL(KD_ApLl z(=Edvw!mcHC0tD88pa|YaX%wmY{35|-%Y({%gHr5vwW$`_~G@!ksJNch)FBCo$y+% z6P!VWHH?mS!6EWnfwHfgS6GgyZ8+sS*@~dW^_ge4(jcK_gt54|FzCVPvlME@^-sex zQq)(bg83Y<7@KxTY)a9r7kE+9CQfX^@p!bV z(@$Yc#fr}S?WD)s+S4N^hqHf@lXGvKE^Dkdm(9=bVua@eG-u80!=sr`JAZR~gw6dh zaDPE24br6^i>N}chR-;1{W?=$c-Xx5eZF2wJ6Qoc-6$2;IS6(>z4)YbrfAxvb6foq zv`<|v$F#RSmRUn{<7_0bH0N5FtK+S&cJGV!2)OsQ z+SDq{I&+2w_z?jOIOpHIgN7KVO;Z<6PkE`4*S9yamH%vh|IuYvh1zX?^0$|+t8t;{ zUFTlljLk4q5v+Fm987T#(Gm0`)r<6Uy1yHyTKS}ZJ|8Qtvy>_H zyS%Z_zCAb#Y;O<5b#Y-WE4KWjJfBmMRa{)FI4^T~9t`O;PMeWIGkzR?#~9j0R-i|+ zKw7I|@v{5+i>>!36j8}8CauL#M2p=;x1X8sZlBF5aI$I&U${J%=h6LSqaT>l)f^n$ z>V@KTw|uLujqR`jX67HFU}y4m0~3DZfY)@S#@LAgINwWjXM~i@(t%Rh7ozCTqukve zjaT)kROKfk4pj`>Hy{YhSC?f$I%$)V8s@LfSrtIJ!i; zxnFCCd0o7NCer9O6=_h`znZNri)f<4L$Qmtt5TE*IrS*$t0ZL03blt|ky$D*#sgUe zio}~CfO*85MZ3NR^0ZPO+iO`lN)i2x_z{&kf?&Pw2;gD?ly%5j`j) z=I7FYxoVKj=c5Lz4{Z`$jns&6s%D`*J3&xldKG{1!vo!xJa3dt4(N1HRzUsh0@gALJSceiG#qr3Jt6mCT5 zPThk$Pkq!vdgBVYgJk2Ln^ru}NKjQz4lmD!qbH-lxFV%s014GZMM)g;3fb?edoHw)2uQ z6QcnTPS>5^+z;YYy4o6zk}u$dN(nuCW(&?bU-c$5-z%z_tL#D&nG#nd-1k>}VML6M zo-GG=3Da#4zt}wvW_B*T1kPwmL?sxBtUf20?w{)tuaaqZZWXg;pOq4!r|X9xjy1ka zS$ou9-eJ5!C#%>!083up&ObBk&F*`6QDV-6(Q}l*CT7Njcy$(doG?kxp8B7$5z#0SRK+2sl(9f}6tfkCpY%HjBRyWiAJAvb0b%i>UC{;9> zn(Hcxvt)a3VZF~s0qXx?6)neT=ibulh?cnDhH6?(0N5=cZKgIXqvS4f*1;svW61JJ z{MWnN_UOA=s665=Bj2CGko}@uW#3pcU1pBi-x2Z{_R;CNX~TQdpJ5A;jr%h9*3eZnaL&%7<_)P*mYvg_2<0T zu_&|9(yc%I-Dwy!NsINVo?#?1#d{7InTe~%$j8wMJZoz09T4b zHkM;#)4+*3I2O!_YU%pQFt4$hkCMxF62#{iX#!0V*dWU15GgMG59;7Iub9=I61%cc zF%Xc{oOq{9QtI#@Usu9wtW?Z)!TXw?T1$=DmCO9ID%mRZqlS4bo4hYpiImE(i4#Zr zM`sErijxp_=!%n1LWX+Vs~3L-7L3Qor!{ZXR5O9078f_E_M1Ia+zdQ zO;K(0+Er1lE7BRLgw`?MYSY;J##AvHDCvQF+YP=pS>a#0dR6d4a`ogVb_CA*+-Fnk zczMs7e&f58{Hp6Cio#>aVPN;*z`c?~`$N_(SVStiP# z)?7maWrb!xwYe6nVg5O4%Q&wR@3&ETiS8DSq5pNm1GYOP(Zc~7Qhu)ffD9G>5g`On zVaU`rxT{kne>cNLC$(l?>On^S_Ayp{j|GQVK1IJMh;#Hp+)q}h29v%@Bfw5DOD!!1TvHDu zh_po4_VJ_BT&4@z7JP`dZR9dIC*RK)$=-aV&hP$ooi$GqEwA$CZW1c-jT2?CZD3SH z^`#M96$p@%^H2IDfR=hE)vpZJ&CR8oPrPm|>~{6LzX-s~**IL+&SGPAwEet2vt-<5 zt*x+juAbTg42i+pVTY6{#IiuW`P&S2*Cf8R!%isX=zCPDd@-kxmVi%8DZR?_QTmKN zNinf+vT?2!JlKwH7_UFJj>R%CZZ0djd3omexadk1gQ}i_|J5CNp03tBrWcDN96F3_ zRxQeb$$zc@k2>-JPA~P*PIa>Y%tPYw!!IT7;gotlO&UGq9uvQ5m)5Z-SX;;bZ&+Iv z+z{T|mEymM7nUcTP=ba}R+AHUH<(+uHlt3jl0(ag;@sTg{X=^f7ly0H!8Y3zO+K_w zu%GuDS4qb*K*9YLV@V@cb;YlI?W@>B<^4qi!!{h~;bTzo@o}p$)?Q7?AqAkMR6+`? zW7R%6{rrG=R;!dEJU6PItEyC?;utwA4Vp658{r(uee6rD_^AVxag~LTkvlL-NVh@t zh`i8Gsr=3HuU6Q6@N%(Cj1`tD)}Vyu)Y32{{HU;_rQG}7W0d+()dD5?on7;{&3|hp zhV3m_Yfx1k;Y^}+(rc(JB&#g+B-}(T{TQjK)+1J9>xg5(l#PVD9{}Sbli#cK$UP3P zw}_eDul=zpjPg@8f5LUK3DAkwm7Y;xe+di>=t*%8VGDHU<1 zr80@6$ZX6ytVzf*=-#o__-)K^&d8{}eaGY%2wRXX_kMoYPRrYW&qz-AkDh#R)62lL zRkPAovc`OLkT8T2kTVcT!`}02r9B$#b8rpxX8b@&m#)5pGAqY}9k1|Ye#0C)iefkv z?+vFbG`O6adljE*5EkBK3#eHdOe=D@>WwYcDnfv0(zeK+(2h#y5eU z)zq(Tsr0V)}+f^_u! ztn9QiB+kcXW@fe1(?dAlr3J%AhSfFF#;ooARykIGL*J+U9os zB<1!2k#bYBwhOWs7U$)$+QtySEOq30h?&!xt?6FnOAcDvA-quhW^ zfPDLDBvj55v2QGhbHYNOymc=)@@)AKrMY^Ho9DJ;YT1j0hP)!ehp6?i1Z$mtfhtxR zV;cQ~9oyv@@!2><$m+{jUSsS2B`At@pE$@fGA-H*?$COj)$#{sxFspU;4&ZIR^ftU z4?yKhmSjl*ic&!w4ca_;PMI2HL*78|bEaYCEOT_WN$LZ6Xivo0wB~9}irY_YS6)sb z;LgBE^qthxzh<_JrLF%Ss*DP2g+dbuOMXLWm35xsnfL&PgyI`1hn<)J9pNSf`e4Z; z?X61;o2*G6gi84i>v8;LD*O~ZgnEQIG|>V)Fh1hBg$xC)7|KXVNv}7D9Kc+sq^PMT z2rb(I2cD424K?2P+YYh47n90#E@Q=x8-9E}-!9!*vTF`2V>2?Sy)q*;yddZdqg$i} zDSD5b4^8K70!e)azPOw#(u}I-U13dkd34Z>_==;$26(Rbut6b0(W5~jkLBR>0}gwg ze@!d{HMrb->s67rt{z z4C6UM7M5~z_trF$MAL<(X@6o)<2luQJy^K}W2RyXWDg-e0_WM6p`a@nM#MzBcxA8k z+#n|gL$H1n__!H%ZhWQi-$XH!G0*nDq&3IUJ}L1YRAp@>BcW5 z`3Y+kRDAtI7SEqI7V89=7*?IpXAsQO z)u@ouh87Og+8P!A>h^HrV;vW-zAKpxLqcmkNr*VYr}j>xKSHr*R9M>1+oaPi^WYb~HX%i$a#8eI;+TuWIV)X{e~Hi{-2- z=ykMBw&ho}vc@jC9j07FB20~=T-A)v)YeST)CPX_4wf)&qmh4$=nzK;IQNPY3V&%p zg3SIti(yN4m-@KZpu23Y$05e?y7uYGltVR!#LM|q(SD%Po`RwJ$fcIM)AScARQ~J= zRz|NG8Bms=D1x>R+Ee~u8LP83sSqz#8minApXwi#IzcnkmE4!3nm}AGIPIV(Vmktc z%xnpnNq-$Ln!^+Bl&q}J9mC(;gZAzlh~G%Y1hk8(z7-gr!yJKm{Hwrb)lXKwUH8c@5S8qnYUVHHhlA$H$=|mnQNB zrEW9b`>V)wy@chXt8xr1w$!PNbv`RKP-b>*H~w;&@{#zb#x2p?U1KBB9e3)K>bqa< z)MMA@z%GbY-I}YDl~s^(K7}|f^|ZwRvAi3FprO-Ae0%L8DTz)wt^cU~<~wdmwe9NZ z@?SkytU~0BkRg*+r?GA6xous$90?d!zb9&671)MTGjm!N5Yb$lO@$ zWpH=2F3%;3ln?_hyWn=Y#`TbblA8=3oBMCoAOGdZ1GKib=@R>;OfJGhcHuN#W9e~} zsF5TRMMVPaWSnGuc8F(x2dW^<=%ke_g0WX)Y)0H{9(?c9P*UCyD^i-KruI=(;m(0e zhfZt{0c%%^v6-pHL&zg$FC47NTHQ-+x1u$>xaR5?a)4+*qf>$oe7NCspjkXN-cWWY z1E)#)iaqstl38HnonooaTdBe-bpzf`vNs6{0X7;YngyIuwJ@@99ScZ!+Sxb-1zK<2 z&;6Rx4hgx3+naJsUUKtaSB74$n${PCxukZ*Po7&g{e8yUF-FPp0p1S zw?9GQ2kV&*EYwv_flNN5SWY_0g0kScKK`Wue~=A52zd9si63uI8sFTpA@4)RJ=c51 zMV?&vNha+GFODmZV5=o0W8e-OvW7^6rFl_t@xYGL-BSihCNG)LOA#O|N&H)%U11q|4+ixrVOMPxNNw__@DeoLqPQ?OzMzo2}yk%FI=DaQiph~x|aiJGt!1S;<9y={Ob07#W6Cw6PxmS=#<|<#$iMG0%LiQ@5A&NNh0n)a_+<0>)5$~ zovEv>i;Js`$%_jFL?8drbN3Bj#B%OZFgV$iv5}!HvHv1@2bf8uSH_0`7(nq2JnoTx zl@nP=SKgOi2AKBP?SKkianvQ>fWwvm-hPkC=6SP-#8=5R#L(@Om$L1CV{$s^T> zza|e9X6^}WJTk)i@?Ut-f{NU<^m)viH9gghjvupfnMBz)slM`^^-Unl&U}N;ib~ba zTl3kkr+NSsv>mS1ww|+d&$*D-zPrhx`~Don^d~|oIhCLFfdF|~{R!DV=5r%n_cr)FC8K1Kf8&ms(2JTFwHq0AKn*w+anQW5RLaZ{UZGk^WVY}3&SRxa4I^`h zBWp{sY0|@cIs6rRs!Zx;sAB2lWpn?McAy}QMOKKq$JPYF-cQ=V0oT74_CMM3AY!iK zu>QKBo4j%DoI=1Z-mmhQ2w_#vA?`8~dU>6yY;xd79hy0<5OA-mO=OX!-{Kj8MMy@U z3KtFV@Ikd2-l}9n!Ch8YVnZOb@TI%>f^6ldn; zFfu14wcmJdo_}$oA#p(^>AzeZ8U;i4gNPwz9TJ6vr{ zQX45li0NtzGY)>xYY!Se^%8O9d#1DFfSnx}CzB}iTsoE)a_^e&ki1i4cm6Q z>xGIM8GIS+ZI_1=6)L-Y_MXwxi!#6kU{Qe|RjdzNgrvxXWM&}X-HQT6MbqN=G4)iD zgC;bsCmQ|J1fkyWb*6Q~+lzyNgh_3%V`{xO46KhUZjBhj@8-eGZOeIH4zOe4FqEu5?$B1Zt-AX`x_iY^&V8}Q2$(i~Ohuuy z>$fp(0a&F`1_{&Pu{H|0pNQRzH?5rOUy(hv+q~{GxJ!DEDIgv*;3Lbk-}t6tVPFn4 zNdQBRA24!}ZI3FG5ipeEZe&|fei?hL${8rcAL459C4zV-OeTiU(ivJL%)%cQGkp48 zfqM@NOZpRAPnlN$-{s*7#G19pt9U8Z&*p{U-+m@e%Iw~=f?F#M^=}a~*S_{E#v7Me z1hv??RW$U~x*FQr11I6JB{ClJRoza#EfW0(|51^i$dhCIcK?U0DPYBr#QT1)a2r`m zhXsw7{F7~BO^%__q4E7#5!~Vv&&|p34OYAK&V3isT=D8iXw)vQUw^zMQ&wrq-PWd(jY5*8NQ1nIr?apbef|DJj8 zw5_Y5tg8zE=q|5msjtr|!3RME49|{_&kpwrshI+#Ht!l54qeD?(iu|^4zaM0kCMYR z1O82E_OuQ%jzHmOr9<<*C+t-eCYw>p=+bdtBHo?iIuUW{#1kq{v&i^FE9DV)*d1I9 zS3K5e=^;=1huTEFbed}~Xy^nu1qi&qeBL3X;n~F<1;3DGLRd50cz1+9yEq5l8=pG= zz=X-p*d5I=2S(ePSKQkhqtu+AwcEPCtku+5g#~SH3cC)uZP$SZA= zZf0@FCZS!LHXQHN1btQH zk26Og=ZgFzG%+u`psS z^fL#}4KNc;1VJ~bB1$=MQlHZ$ZwBa-WEbX>D@8t=#@m|(~wFpdOMGXC$66Aow)W+*nO zm#(HXX6P~0qy`&~nlHA(kNUkYN5q#I4DZqDfTM8{{jK<~O+$5e+DHR1A#o%7d#*wS zRE9uGYOM-nb9H8Gp!Ge;v01;uO%SME?KT>5b!E;VBo97@o4a>%N*Xsf^`N6P;TOM> zzJ)y8PX{{<*RX%aEfa7&fbl*ZWqY1yAPYX8pD}hs-wudO$ov<7&~TIO6R!w!?W}@B zMLWT5-+X4PBy!2CbwMRF8?f*TRxTi-WCrCYx#aRhfpJOHjNd_|R+*D_^l2cXoO%o+ zuX4NjP`9{E6rf#@);D5!8##AvAqbv*+ecqfN>~>aP!`LY(F&7K$sl5?gl06^BlgF- zO|=sOjtEuH=b(h%ApNu#OibtMxh5(u-SqJpo$jw*u5G7f)iLWKVhAr5)OyFV?^Mj6 zZ=eB5R)@2WeTBgC7?!!OqLhYd#ld}M&o`+_$>a*l{KW?V3!dcS@w(37k*>uH==Xln z$-35NH-YWOLC?MNej27G;4Q^2EvH$%HM=P?tzn}jBcrN+nxOS!sL$8xZZy^A)gr)V z$#Nwlx5;7Z6me`REp3IBg0Up^P<70G#z@CY%}s7JDi248g$*_>4&2ulDR5^IaYy5_ zYu)|V3}#y`FrmB@q~@isylQnFy0c1EQ$50L)Sg}Tt1D)@9?%ckj@|ohWM*cxKL`AY z@TBeozFH3R?z}kZE!pmWF=$jXl7q~^d9JZwjA(uopQ9U@0W0%@VA0#QGr}#Lo6V12 zv`Ug=qbN~NfUIJjag`f;n2C5F3+fZ@7oQVG z4wm&jLakXuMQZ4y?e1e0nrvEt$I3$_zjP$abVHX|sdjzDUSRKN zgUv#B^Ljl5&+7$(G7b9^>%SHWaxl?zB5r1Gjx&t}wgWG7cOU7Q&r1zH0q#ClI1FO_ ztSG*r10bX3?a<5X{Y$e!YeC4}5f7h2@b7N~ADE%nTaxMh87F+tNjC=uXXbhLVD7B0 zC{_%omy73{zNyTxu-m(oB=^mJ7BE0kaM182k!&(D4fjE=nYhA<=X0_l^-Ud^ALzKK$UmHfk~VAWW_C^tbvDYv$U z2{bQRT6{0{)u?481UjBX3%$4;6It3vjAoV93Mc5Iuc95C?A|YXpM!#}bCj)Vl}YlN zv?DZ1&Qxb8_|Tv)mnChPu+qFduieONk?nRtXc?WyoT`T$mBF$ik0QTWt^sl)L0fTc z_pHqDXOCd;619Ph6}U7I%VO!_wL`1RY)NWQ`}?h&6*eLQLZkoNXA0KVvhl_F;!1Z! z_Mf9;m?N(+TAzbG6$&q(j+b-Z;dT5^xGXJV?U>Ih0??7x`o=3{h-#Qz+$Ul+{)vHG z(0bBRc2x&ELzt}>aN}$H-VXP(3)d}MT6nQcJU0)UWP(46LpQWbK}_2a8RYDbI+@EHc4b;9 z+u2&@PJWvyCe5oL7Q!rBtPidr=lOUB@fyj)-COcDk&rU*UtIxI!j>ihA_0@7dawz} zP}6+f*L{C#|6N}Z&%JXctV+|_Y(?|*lBH~hq#=C76}oe^LJ;wk{-*JxwtxP#V6VY< zUO59i<#lrs<3}+|6nYDpQau)FT21ChZ-$TPCfx0|gTJddm#;=ATv&9*04fKcj>;}F zGA@by^?#LC7Y=HhiN^Y)p^qM->29kD5~+FDjmL#MSx}x?QH{KX)1eJxnL$EUMu5C} zQqaf>ubDUYZkksV93OCl587K7ce~w@6aU(5I%DtVmivs&c_{BkYn+utbQ2ypEoq6|G<68}hb10b7=(CcWkCuWDeK&V^hI3@_ z|Mh+3!Xbu#ud{q=nYdg1_|%H`t(|z-w+|04{rSOFYZr|;^7QBbH+bRt_xJp@ULkRS z0=KWWc&^&s1eI5ZRMKVcdoQe1hxmwXv)}ZoRQQbq-Syvbn83gq& zTy*ytHHhqYI`XL?iUf4+^+ID{z9td~=Q+|B1aAkLA?mqz7bq|PaiRS(T8@LCZ23JXV)x}JVL_NwW8 z!LPfK>usi|RMz10)g zor4tM%mg$6(Cce7G&gV7ncF?a5!?ToyvhI3?&#*Y6*7+H z$rU->&+&9(Rfy$_Pao!{425RmfzV=%g57zvfcRaurqrBV6IxviXil;XS#-9-ZKA)h z+UTe)w==NOn-}Y0yhGWclDrXKyA{FGgGwEQpIh{7QE2U=DT4Oq@ zkjAyEYA}!$be9_p<-R*zo_#Ba&KWcJWg5>7t=#8v-N|rYfVlT_+*jeLCZZ1Gp3TE~ zQZ>&_97dkf8RRX@nxa+-Q%b=I@CciG*rwB7h<#u_a=?*9Le3x_@XYi?>K*heSV#5+ zx@U0q&F%~z<9_VJ81_L+Y9-{;!>@RbGvA9|CLqqK;RCVCT_xe2fhD}-=L+oouwd6N z@h|lCebXKL!Zfn-_M4^lGs0(S_<-{LSLp$1L~%A!ZgY!)lJ*IO3!}VIwqWN@NPK1= zePZ9oJf0i&<1nlf@{o6|j9Vn}jzwXRv~ON zhpmmSr#x?T7L3n#@*;G@FcC;5lA6(aNM51@x+QkYwu36bEWQTAm$UYiI#e^s+aTmE zco*8w*G4k70q=_O&^}7Sb%ZxBTt|5G<4mPaA^7MixcNf37Sf67+u-I=hO6=%s@W79 z_t1UtF6WT8|I$n}&)4pMX-IRK+=u0SoWKPma2L{aGOkUcX;fHz8~zi2*}= z7;MvQ*ne0)$F|`|T&~{5dW)Zbl;n1}5q?Nt$NRha{oV3?C)@%*qHp8(%M4A)t}Gt=Htz9Ag>}0 ziKOnFF5+47ivGhNmJ&@Q&ioZRr9{ywsb;*uWC`TcwGj)-IIu`Z(q)pmQ3az*>+T9aC6e0s)MYrZr(BCr-3~1DiqI%HU2o%5}#p7;gB< zV=S@zO=sq<6JgmLwl4~X^`Mo* z_D8J+tOvCmb|7x$I!Jq7OFA)dy>5 z^udNmeNZ2*4+fsF97w6CC}e6fZ4mE#quk*vEps@^C4G<(Y`>N3gXrz1D1!A$pols; zOC{7ttAtNu%Z2!a<@hApTJCU^l{y{e(_e1mQysE^hP=PHF8Cq^~t4UcE(R1ugFdFdbb}m6j*aBWPW-KeuQm1G*|OA zceTP#laZe`;Qj0Q{p%HeYC?Y6iuX_O`zI8BnoM57@`-E>NDMX1Noz?LGEM!wOtWO% z4(IZ%c@-6Tsb0^HgEG%Fkyr6KiR=uE)MsU7)srrzw^3a2kpT8~+=0E#qpg+LUH6VF z;tH~JD+!VK;&%7|eu(&=V)*0d&n3Qy_y5T6^Y~Ht$^B}1c?aGxZHz|Cv9rO(fx9Z>2@ zW5M$@6C&3Ifkh;PfzO}3{dTM@7Q)ZqXYzTdtLZm{3X(<%N?A`^4$Nwzk3R z7q6{s&~DupKX&Wt)whntZ`-P^uUy+4FE*dJBo!V@y`-0)Gex}W=#Bq2ygU+KaKB}* zX{u$SbxU2{mez^ZNz-0y`4@{ko}!b!rm7a*&PxqTceS?eT57m-r>>>Cu_8(Q-Kr%? zke0NB@o7P!mxJVy66O<@Z7~TN6=uS7V}ihhI32@JLpcNB`6`J9X9RN`9PE@%T9{Lk zO=-z#?9>rQmoE)(czy7dmto`|h_~P|rlPjPele;#swYct7&5Q2=2+~j3fc$yPp`JD zvZUu`ukzFuOfE=Yw?Ai_IY+f=hkIFdnh=}Z8uq>5h={i%k{D(VVIR8)sGRdW#9q+aCT$gmy zk`3iItr$8zY1}aeFt)=ud3tEYP30TfCYvTL)8g*|AYpw!+PYx<&ZPtTlob8I z(w+6e+O>VPmC~P;wFE+Uhx`;!2eOk}gDKhkG&<2Hf&d9X1(iI{94ym>W>lVLjQ6U6 zkbWg$>Ixd3SvI1fZ_oHn+w#cYZH%^8!lVz38q(?+&Q_b@__{dD#PwkM^l>LYNI>7-kd$+4i+nx zXAL~D$G&oNQsRzOHok;VJSs?%nXgRP^rHc)2A(RICBoFMAzEz@JNezKQi4oNKXHa^ zoQgQjW@najK(qMtbI;v9I!cpi&6kh#^)FxEPZu1K-@o5S-ee(8wohZ@Z#fO2IhHJZ z*J*%IC6hV94?4u7V&WI*&Pq>WObUF-^Stx?f$-b7@aD3EO%tnc>g&5{^+eC%;>pIr zvLf*g_Bw_s@l|(`dh7Q1(OcH6zGWWx(W9smoC4mO_)AKzaS3h zH!W^BRFW6GVe!hV+SHBkqyGM+3|C>^{xbh~Q&Qr!{i!*QJezr+-B~%_l$Ju|G5-^e zc`D0I#KJYk=>>t!$w@6RHb_A}MU5p=m9aLkJ&9DOAf-#^!Cp~9^QFT_?|$t)^PQuk zcUs>4+TZSlV(}-^H3~)IPuVr9%(G`n4p|ypl7iGr1&xk&Al2ePt;kL_ecl_dfP|1zUrX;vwX!`5~{;W4VaB@#?S?%(c zKK-Bm{O3QT=lzxe|G@5}#fMzgRrpQD@q0)Y3)_`r`!Re^NgpRbMjY-dsWp^mO9u)p zP#plS37&VHQ!6FU%~uvhJTk<2VH(+&!-2MO)MKe({tnK1bu4a-i_jypk;D@g4hIKOWeOf{0c1D zbk9WGwrxb7AHo#U!Njr)X>nes0b7@Gpv7%f4bf^gNF0n3;0&UtQ{X#V@}UGa%ag-V zg4rm6#2p}+GYEe9AlZj^1@*)P`Z3EU(V5Ze-bz5CdyTxoW@-91)(~=Tdmz``W zW4CcOgmVG1%Z^;zr&6*@x2y+Pf585!4cFhzNB|`pZnPZ`AMWUAJ9-pe(5I&8`B6oUq7 zmtjP#5Es;6y?iHx9UJjznWHI9%UCeAth?>LM^FFnSGqevJOop@6ThN+=v0QiKcQo* zdHS^@P5%BW=*QI)!FNoIN((@vP6CyN%5n=Lqev^Wxecc3a&j)CpUq_|X0jQ~;x7-~ z!kJ6Y0Ou?Zk7gbJEHak%CDu_E2Muw!liLdoWT~{PX`XSgP=UPB($B)x^{V;FH39Fc z1-d~gCcz@o{~IjaC~uTfw>cZ===2@G`3)WYEsn&%4FdzBhxfl&e!ufvWsIS*O!vsl zc)Tql3| z*3qL9{Z(J*>k@aywV>4*(|8J9185WCIWw7@VJ0|TW^)q@;XFTrpYX+{mNC9#E!i|-m#xqQ0xMR6uf@ssi&Sgi`S>c z4<7l&b7vvYAHa2lA8<_k7F0*96ajkNz%4=;%>xOE@LVL7=5MCwBvG>_{jlye6T$$KMU zgd+zAuDD|00RM#5mk%F2ID9$(7m?UVSyyRr-|OM8gd$G&B2GrcPD?C76GMaw z2pV2D_+n-xd4haS31>$4DyKx%9Dk7Iu?pQB>Ye*aF|70}ZY(HPNUi zRltd?;tWr~uk3VKE*91v!?N`F`HS)>-m^tRjkGB3im!^DC!B%n8-FPNrRHEw*A0z7 zgazyieC~>UTet4x9}>=!i1Pr^;5cgdIHs#B-R?@7g}v((ABQ`RoV$GQz5`KZ1y)wA zPIp(jX%?32WYmD?_U*m=+>vvLAEzn7^4DScI3__!JP+yH9yP~|ILE?IX4|9u>3;D$ zoW{Sq;sJ*3^gH|hi8dt+L2C0m*rrPvw`6Sefh!(}Z1)B}C-JmC>OwOMihxFnrOh?5 zUah<@qNGmMOTGij8skrsmYMhy{`yOlcu1 zmYa1a0iq_blf>!t`na7qBMchtPC~g}I7NhbP@^SgBhhON`Vpcd8m&$B4SOaItY%&aY!28mtqaT!7=^w?t_o+SWr4*;$7o-ZYhDOk zYB8lG<-1mno3o_fAFvyF%8garITFX}AJhZiKqM#GKDs2?nwbv3jE_p!1sKz)DF}cR z%Zs8Ib4ME?GlhBZTtVH(T~L(%qYDb(k9YkuJ^jbr?(p@xi}Q80?EgfL6AH6b`s8G; z(!1I5T%59p#e3nUU0>LXMXSjPnnO#7hIqOEfCXmk{5+4vWl9zc*^R(0XR`SG{{4H- zUH-%g@QTmFS#h;w6E%}QT1N*-2Fa0fwr4Oo#9=pO;sQ3r=>%r$O$W5{!iCF?j zB!AVO=c>aOL<;}nf?wAyZP?UM(OuNl(B81A-fZe9dOzo}3}>CoWBIQPEFty5My?f( z&~iBrL3^;ZG&?g+rB|!)OY$2Qe#mdd0kP@Gfs=vc@P$ecLRew9|Q$>G{e`|>? zXk}U#94Ck;e+w{yn$T|k*4D7MHcvqA?59W0iqD{k{_zp|*XcyrPY~O=7TbwuvZorG zF~qTiU;>btb7C8$4TqudK|z6ZOKHN;lFE9lMim915;=crx#GF8&w*GyqkyL}Yd1_wTy@ z%J+}|mA?M*Fub}~Tu)yMg_QV_RQ+8!p7p!*IDL)B=)$<4Mxa6lwvSqvbUsQ+f}m0Z zJ151bZup!R&f7Wh+B|NZW=;?drjaQov{~o7zV>X_r^Y+>w=UY%y0c;D=H7+rZOae0 zwEC+THwWlzKm4DqcPy*fxOma}swH&i-t@y6(^uCQm((pRD_ckid$<|TKJ?LV%5q{J zsU$bb*)R;iPI>9nFhw+|dTVqWiAp6&=Y!mmFO0@(CGp%G^hKBE$`-FeSPgyFO?76vic%Zwmu)DkyfsXL4rm5lKDR#j=bhf{_DiElu_WP^FiIU-(n&A=# z>0>t-fM^-bR6m$SvqsWM9+l`;wgA+L0C7kO6fxr=&Y+2lq+DtO`r;Ub(PVv+RwYxf zI%b_{`pK2Gtg;}}(2ocA{9!sabvAV@Y4JDugS9p1p=sJDqG_a7<%%d}`y{l6QiQS+ z;=N(u?fAil;9|(nugGCghJyg&x=FThg-Bsqj?si-RwHr608ZHBY@b{9@6dUwmJd zS<0k3{G`WxjD_om{B5drG6Rp-M-y+pYEt|qf@CHfr4hS1e1u+%JCQ@5i2hqj=B{af8@%UZjfIaw7#*)qNVxgQCb=J|7ya85l; z5)dzgij7HffRmI@q;#0Xd2|n66vQu2>^XC0&jhqiFdFmuIE;0xV$Vk{j?J9;2nEW7 zl>0YM6R8*LH!gk5!xCV~bBpkds4R3e;~H79rrlaL?RvN~bFxZ1&%|rt6OTyqs2}H% zFZMjrM$eQK)f#QjKll939XoeGJ1i2vikk{8_ul(? z0%Rj;g}33m(dR9=VJF$X5sr!n;Je}hLL zwIVp~=kVaHHgFyQkTw8piIb61O-2DCMd9Z^XRYz_HKYPw#qvsfsqW+&co6jXNURjm zo|-s=HWffS1@7My;Xfw`0;*`qf`l%vd(4M+B;;0vZfHLDgVg zWUaV4wID8zjLMZ_)<;W&sk)kw>gMW24RzSz07|Y7+*B>cpZB(A0eyc(&$TLvbMW5(9DUXKHV z>aN(@xa5#A{_?cKK5L!8xAy%7kOJfzOI6ycK?8PcWIq> zRZ|C5xh(1K9CLvw%Op8@Fb(Bba2m08{ z#X1`V2pd8e+r$B(d*qAwdhsN&P~WL?5;9c$*uPinM*|DDEP+)A_a1~vC>gA-87%qu zN&5V>m#>d>jKTCi%Fd;vp6$##L7)pOTxJyCKrrxt65(WVvfId@(B&#|d-?XSMjIV+ z%*&q7EfkS?(2UtMU6o;!k8UyY!k_FpMS-c-y31X~&e7t6(yE1Zoq=G%(Y z$V^PkS-ddAlAw)qWMo?wXyTmdl273@eT)7#(mID!lL>C$8OaB=sJbx}# z5f*`vs5R{PmnIIh0y@v=`I}%w&w~r;@GJD%Y)rnlRokj6(7KW9Ny`&UnAEwkukaq`Lo_g$-2ogE*)Yvt;*V?9?cZ9CH2i&+N`_mqwX0;6>cmuD@~P#gfET0nAW2_A9PPsM`{d9;qXO>i5PVa5-! zw1iQ^Ur`b$4RC)ex62tpkp!6{3KLRz%WTe*!na@f<~3WL+H!f*8ve*>F~;fA6+w}& zxLwO8+fMkki zE-q%DMVeUKrPf*d;@LlnXL(MUf54Y1vyD61o{7_#L4gepV;%yq zWF0^$jD)lF0PQ72vLoer)hK&rFjY37ynSYzt`vnI?FfP|qdz}&Vv)c8n$0Sk%@wp2 zEjv)zm!53$8gkUP+k*@LzG+i){n!_l8I4|dp(k({uDY_?WLenoi0rFQ%lJMn=3*9@ zJ|_8#QOdXUm#MoV_Vbl2Hp$NCpL*)Hr=PwJMi0IC;-TqZk;t}E$&*s{DaXu4-3IQX zr)<+fFQe}=)GMU@9otOF*)AeIGv(4Rvc(HF#{E}QV!4ma-W}(Cg-fxUxHpd7h0$jZ zzwp9g{vpYW(?S4wqlFZa&R}~%4!#{0fB+FrScIrGM9nNi1OyG6J}MO*K`d0GT2N6{ zFHap-WG(Wzuo-iT*Xhw~vSx*WW%)GI(;{{`Qp@qkt-J-IL68p?Ke2J+6B{=@F*SWm zqt89m)_%0O+JDc=cQuBR{msn>O5-%bnzL)x-o0kc-D`EK|IsIw`|JG;?XXGn^+bJ1 zWuP=Z{;L|o`F%frVEiJofLlcK$njuY8i2+GdL5NhI=b1rj^&`4B08cMbb4g+S}ppN zQi}7J2kf@9HIo-rP7RdWI(caxygXc1-uJ?Hfk(2XG8Zl8-p09AJgTx}HmBk_-~idD z4@gAxEPr?~viW9Yth99F{Nk`lMOxY+#w^oftczWk1ol8$`o6PnO; z^?*2p{ACDM7kb=9MQ%@__^mZOZv3UftAZXhnzso*LreJ?T7_0O(r0lRIY|lekzbxm z!v2P%lKF@>9yEF_+u|c}D5RsO7W1oC8&rZES9|6UDrd%&C|ojMRgf#HP|{ba+)A~e zKdJ^{MOif!K7_KuydM9qRK#^)cez-yHeWe4nhRvG4Ijkw3S#$E-7PjenGy&%sgB)E8Kp7Jq4qr$Kzcnw06v$uha} zkLH*wiwz4G7Ic*Px*XLDn|j+D3R|;#U8Rnt)m3nlIV~|OBLz=1WQvE(m!!Ci77xy| ze7J@Dfxb&}JI}e#U35RZMt^!SXPTLp#xB?? z-avmU*$0Q|8n}wSgLO^3ZloPVsf3X|hVQ>>AARRkm&x#YGV4Nca>d6?&y;4tPQby}fu_lJz@X5>wLOm$OmP9+r2i4%1RO>Igsqw*LTc zKcBasBU|7iH|7Z2m&1nnJDjx)()_KIE$am=g%u0vLQn8!*#j8vKc;Iaxd5#I-Qr>R z{&NzsfaHg)y=xz4hzq)88ai%%c;bgY<14^R%4T z^h$P=5pG8rWjO^{l#jV_Pi4t4(s8If;=70&wb|KTZ}!7@W#e}`fxo?x7e6;BTJiaN zguTR}UC;ARPvY&na28W|>@N9?uvm&^u8$})6{Cz9%bXC#l`>oBmLVV>!ZNu+0`vFc zJ)J+6NsQi!Utli=yy!%!+l7v2?o#Qw6x36)%M9vGb> zkrxebca7Yi$yxn@i2m%wGWTD^{0b31zj(V>V4drQ6WHz)Z+FAoc4s|%YMy6P(T`5T#S6upd98mQWjg4cjV`WpqWl1|BS6 z&QuNy>cCq2*`;Zt^tEp@dKeI=&mm41?`t8j^Lswy&xeL~9=-M`UDMHl2$7g=sd-!2 z3~PaJx1~#^InLV>E<<{5QfPjyM9*u(V`-s7q3e0h>09MA9^=5l0KmS^$UtbEQh`J3684bz@bkI=-|`h|7D3$OTDdZ2iR zobrz`!x=`)uG(;tKN*LIgd4d&ikTS`ctT2+C$WA06NyPlOef8CxmXNVK{@O!9YoYb z;PCb2C6yJ3hRHnC`8630L1%SHXv8hA{f>eOqj?%#8M>LiM@-}<$tTHlA)h44dh1Xe zlXy|`uX-=Vc3-0Nx-Wg4XG%(sOV5IC+E9^|mxX_%nfV`dWqL|{yw$v@J3SSDn;N^= z{L7@PLZ^glaQnV$7CGXfHAcd$=*er;byeNMg?V?(P`|LGSI8*aNnG z4Ec{!C?fIUcVj%K$J{tA>CP}IXm}a2gU`Rp^?GyDiv}F@={$?gZZ>(Buao%bSKgmCYfxvM?m#Y@GkgjwKA2Ac8L44Pp;%qaeq`GZw zc5{xSxkqD8GuyHK!BA$Xh3H5sspswcSRO6b8_69_k$R)u(YS`^aE0GDD#;~{#Y|_1 z-K8FWwmdo0X0Ir7Wc4Q&7W6E7(-604fz7(HMqOktt|SDer$d?IA4wib2~&0fkCl+9 zQ46F!*4U+x6DvJ@!lnL z2wvs)tjfJ{x(43k_sq(@M?;x#JJI32(ir8klzWHi1pJb|jrS6id(Yv$LqY=HOIGeF zda5>6xpxENSI+NcD)$s!SnE>mEkj(INgm!SQ|>)Rd*FVd3GZbq_cqg&@JIR{-m``8 zp+5EZ&_UrSXtfD=YsG(TcD=ss#v348w#ltQ29_bJ&6?m>FRwgpUxG6a_nk zuw3D8ge8YzFjMcN&Wv7?pIr}m#m7(_dKhk*@7xm) zM~XZM%RMIcz%2?7dYAS@@E|baUD#72UJZW8>JndPZA|Ns4}D9ZF=L!E{&RL}`oSrI ze*7iGu^wr;k<;?hxj2fu=(#sb@+nuSm&IO5+CqOF@fp2a<{v@)aCVY zeqN66xOb6nB$NCLzu%HcQUP;{iF&s=#Y>uMs!Ltg%#@VG3~SMwb>$`fwmhpZD?KZ& zIh{~$57|TCl=9SEq>RFCgt_4$=tTp zk!=&!GPV_NTd@*Eww=t|mW>41@UFo@`s1BDtE*@9e{4H}1f@n75a80uIySC0o~2|S z@rA`4RU{aedt;9DvQE8PVDnU1tzOqf@lb1eR#tjd6CYDar=!0mCNM~Qaf}61Y?rh8}5E~u@ft1!Dyd}c;%V^UIFoGGmaDGZV>N}rj%-;F(1*kV`(ex{#~$5A>M z^3jh;67#6jNjj-EmQL#8$MR;YqZ+OFEqCgIbYqsIEWg~FL-(g-CM3m|W)!%r#qnIn zX+%D_f&Pi}4mrZ@0?sq|p38ZiR*F~x67@T5KG}y>QseurS=Hn*f}ZE`kV!cUbJI;(c;95T(t&i)k-^KeAS*D zfz{6JZ0BkiSxkre7u&sF`{I5HrxLVVp&UlcWs8}JDQYe@`11Er>4OoJmH^Xq4+a2O7Zbu6WYaXF17Ob3jmbDj&Nq} zK8o#S#J0qYJQ=pd$aWaXQt1@^Ba0W~06TJW9INR){nGGqdFKuCx6n!$oL838%d*rP zaH)75430Bh@H+5?mcp3})%o~3`ajb_IK%2pKNR{_C`9)}zf<*+T(xdOTrf`eOm}np zd`oDNK;~^9h+CWNuPOIAsuSnwp3*zJ(mUn#-%YpC-rRiH25U#@Tc2%nyOwtG*t**wpByD> z#v8-9({Qpn1!XOwoXk`8w zm;VQ7t2(jh^0zi$9tue^l`u&h+Rcg`_>^P^KE>_8G0IHNTV}6ZMx)(^c=HmM%laL{ zPYK(VHnv2!!DL6WT&Th_8)aO6K-NlS)<%>GeHc+@a-K5Z6Z(`g+sJ3hpj2isvdrg% z-K>m)&!?p_pXOy09au!@k=Xh%hg}&P#&yf1(RwbzPN_5qI~Gfi$Nv8SVaH>^u-^=J zRV*0x_f3Rd9osgbNoXADwCqZ?NgJ8lELD(x=ZGn*({+w#^=N?|GN- zbF%LdLa!E%5(lir8-jK*-OBD072aRZ?vt;}_ebU27Td_LNsjc4xq(h4fzOEUV!u9p z`csdwdrLy6$qU3XZ+VSW{)HQF+;kQB{{jEkU;F?70RR912QxGNG+pOt}uZP}mh z|AuV+KoJzcJ_7)e{03=w0nOP3Y#g~4$MK)-DPyi_uPL{IO_`aQasPMa_L!NOnVFfH znVFfnc+AW<|F5mdYL#?Xdy*QRq>rA*_B?yu#8oG;(^V-+rY&IqiGQsP(GbA?t+f46 zsa)JJrR!X)w3{qLI}=0yLhikIJvvAw!NIKOl**|)Dw#7*#>Z@C3VGhpNa9p8CH@NU z<0AY{pD+i^i(erQ^K*zzlfJdKef(X`w=;#8!wxs#Ljw($?{ey-v7QfHEn z>lQ7}x}Krbe?hd1QuYI-J%4Ri(9Y)|wX0&fYJ!jXxJH`k`jU4$MY*_Q<`klH4#oM| zFE|Ist5tROIXQbp{6j%5Rz(f`%=vQ`)@hA)wIdp(NuEEmbvEanoUhb+v$baCJ(qoy zGHaMeEwUrPIU`on!N=-sJI-DrI*YUNB;eZdj6-}}w`g{VNX}GW4YmixKj-4#)A|(M zT9Yf%ltS2R)xCyoRbCt1TEO1MK4z;^PIst_JvE70qF0G~)4x7-i@)*A;i_*R;5wJ5 zal58KAjU5Sv`tS9gpb2b&-hn-f>XG5#2<*`z?}FoVh=yZZW8WM(*M2bA77r$p1~St zkl)86$(_lcw66e>JjD1zGdW%xm1qjs8{k^=Y{cr^Ct24gtJ8l$R7vFLB+<#-tSN~K z5aZ92>%p`?v@KLz#gu7+k9pn6y))Iq+^+iOK{W|6BmO5u*qb%6AP?riSY8{)zqxB= zsQ;ff-4YH#beL@`fuXO!a^RHm-(P|%b2^SKj`Fz+)J`&Hi;STs}K=? z=!SC*_LNg}N!IlXD*Z2Tj}Q-JKL~wC5VK%>5`mOTs)T=UiFq|wlo#itAP?lgSYF4( zf4NW9vO2r1tX&xYT#&IUtAR6J8{ADA>(w#TevCS{KZK=t5&*42PH4m$A70yt% zq}|6n9KV-6hQ?X*`el!0pEZAmqGo`-Gq>o>5Rv?xmhxWmD7eOt=Wu6!QRABI^%_@@ ziK?j1T%dO5dbM^PRo|}GeET`(CeoVkMyr{2K1=vJw@Yp!nW70eriKgb0$H>t^I^!365&8MAm zztg6sUNl~juN}4O6`9$QFHb)J-R?mqQl6|H?EtZBIY*q_hoY#Jg}3_uLrT)9f7D8&bcm z;(t6hR~_kdc0YBtkFbyD0edEv;yUWLn7${;_X5``_BRK!)YR}i;Tx-8e2Kj=e$5@t z_#Wy=`%8O_y13iYs~GfBG2@tO-(}HJ6ZQ$;;YzG?cE}xuPfXdBK1R0FH=XpK{Ivq z^*S@bb0)P4!rGR#sEKW;=60SUyD9IcpUQpBsc~ob9DRo}_AqnqjxV)$(0`PM+a9ca zzuJd2P5i69Mk6u~VeZy4;eGLJQ8CZAKXrIkBWRC|25O{TsL|}Nf!mikO~AfGoh>?Mz*DL1~C^9f+OP*RwNuk25vE^wJ=+6>d`#`wIDw ziC5rFGfrd7epsTNs`_-JD$JIe%KV1rXbnI!vy0MbX7(lS$NlGP6iUnyT8a{L81uZJ zB=?!*-@T7jeda9YCu3o+KLlMuO!jYws0<}$W0j%A+^N3$glCwcUMMx&sTWF36QwfG z*OH&rmKu~ZXLE8Ek!v_PM<|oi?4Z`@z&@od{GQO3_DPTw{;tFC>U?BQN%&p-9n^M! zI+#`Q<@S1Ya4!7aXM$Zto(u3DeJ3mJj#h`dR}r`1x<37Hs9P9+mvj1%dPOT}uZ(~2 zwYT%wJ9W47H7c=_v%F4E-@dwhqzF~vac~LYDE3s;T_zh zrnaG4x+0~#sFfmfnL3AeaVG{U9lXoD+0+MaIrAP>+UJNK;CZ&B_AS-TbW{(2PqNMe zpM!XlU0}KsU)2NZru(3Ox}rV$pe+tbqLR2T4ocdC@CF)XX@>=gVzkcEwwmpvzh6r3 zIT8=zWb{ws#*F`+jJHKy>93QBN}&i*V7Nb(|+zfm>$$B$Ey8LDOBZyDPuGAT_pT{PwY43o+l0001Z0SwUt(4aRI z0Kiwf{cW?hZQHhSwr$(CZS`#1u5EWSvmcX(Bn;ze0H(2)qx>ClLJn8+FmF?jZj56s zM=|fj6fWj&UZxuD7{4scq+|Jun zqaDLA|I8e&=3)FlYZQyvi8yB`a6Y&5Je6q0AZD?V&m+zWGPsy>5ee7RDIzh2i@BSZsfIjB8C=f&yiP4TF^Wa(M6Tr1Dd2jBp}&+8Zsuu5 zu?X{1^_7;w#oW!yG@=)i&_nvgbi@8-1Q}e;{k%>s)RCFM`P|O)*pI9rgUh*}_i02g zCb5!(*yHR3&gXWl&v~5pX+$q3v66$BpPRt>n4cGHM9%ymgUh*}y%7b^qu)YjR&+Kc z+|1K_Of&j1Eu#2s>d}p*?8Uj27H~a}^FEDmE@k$({9)Q*|Ia_2LCj(!YP#TVUZxuD z7{)xd@^!?8C-Xl8^`M(c6vqKHm~d^|wr$(?Zf#rf7gk#{EFYj@jksZr2kA+2qM5n( zk6&gp|LJ6aY4mw$Is3WJd(?J#J(qb+6z)2*nbSPxH(BWU=yuNYoG|kEPbULR0%W9o(b5@Y1Df*U_Xyh z`?=FR<~RB{f1LY#N8T>3<}kPUO%^4z(!)6FxwM$wT;?@V6rsP%C3yeJcGPq=U^AzA zPaN`cEe(6TejoSW2-wVN9`lYA;tIe(EQ*EjN7=)<@3)vPe!ExuW#2E`vyl#&Gw`HOc;hgjkC zKLhpbAV(Aj0C>wSW2=kJE=CvIKHKijw$q)>?(7T7E%#5!SA64{_vZb8+WKtmz699A zH69T`0Zk0EN*FQwx`kuh;1y!{?G^Ul4{!?q|HFFy+`%dC@QxJ9FsBG(NBZxmXT(s& zIGgzA=q()M2CqnH!5o7=|}aA3I%a+qP}nwslmdi}nIe7xuAp3AvDbDc)u^Gyk)*$*9IKwuP8~!7r$_ z;D}&kgMYAig%6O$l7K77Vwrj?{@~0i`)kdZh60H@{D42PZVeL;p!W@bq=RfWv(b!c zD3BndE&ACe-<@bM>n^kI{qsjLxGTN~X-c;)`j@5nRb7x!7ZZfesu|450wr$(CZEIrNb~3ST+qN^Y zb92r;@2z_Ogj=;g^xm~q`~UVCs%vDKCv!HGeYdb6+SsdqsU^m5Pw?`!o`F@k^r|Ekw-o?aWQtJ*URVPdz3 z;}IalYb?;Wb$@O*2+-Q95)Qj&unoc>*V1m+>|?M(64uW!JlaR0lgLf+9-!NZ@Ctyw z3mwH-Y!C?foy%VjPkaQf@hlnQyNdBe<&@7xxZ~^r|2jE$ql>Y$N>CyzSzg2yRkB06sd#16CWFXm8>47 zSh5dC92_AmLh4K%Cd7*k$X1~G3+i2HEr@@5d7~v4ZZlzk?;0i_?ZK$Cvz@liHjI7y zce7HX!2rjXzT`qi$`GCPS%%(X!h8TA(2~p@tix;osh0msA714S_=aktAA9C5LWe3&0Puz%J2E** zE~0d5A5s@zmW1SN;Li;|Z=)oP9&kK9+5;akK^l?TK=d2gUjebfB2qg*tUF#sD9Al8 zl$-+u=pE8o!6J5DWZ0DTX4T9gb|MHLU?a{1R?+QYDNX?b&kSp ztY-du3;bGuSd70rfjlbT_ClC-6MaS-zjfumrbuM@A3=?}+ZWp2>EfhcZw5QrYagr( zY}{4_WJ$9HSi0e1`i$g8D7)cYzwZN|9F*V;)q|V7xWjgGMLTyN%nTT0eptdKr~|9} zj_aZ540CmNM|%5yUw6_G+2W;2og%~OW#)>E^fk6)y*9ku{wZaO61{_!J^c1@=Q7aU zi*a{H zPIbe8zaOm+mWgcs44v6O$%Sh^KpH0kPP&0>zJM{rm|@5kYWd7DcLKLUtRMoex${23 z0^fVA-l>+c88pGZbX@Is?cNL4!sz>xW%ol2EJl>Fp|}+83EkG8Qv&*?lPQpjD9O6- zJZ?;N_eJbyLR_Z<S&RW8>+adp#LN&WcC2&-5y^x~fNWxb=egB|`T3ywO<3*iQS+3>|at6r!WN&rrJ>J)UU@m~K3hdKSVVe}|J6oU+AOr+u_ zP z(-%mUeJm}eQ)nA8SI1ZW&Ufjl6TshK9UU=gM=?7;?(1^{v}acPXy3i%p%|#E!y5*; zB^gWkij6C3q26}jR8sNH2eIz!=e}SU`tuj`ae!w2F&oRY%M`LpYOa5**N3Xx{vv(a z#%>xqp_y{=de_RL!4vSoQ zhWga+ra^ZNRv*>`1Y>w;{<h+oM*hDojVwG!fuy~I<2I?70cAc~ z)8oGT)J*kT7IscN%Wa0fqjn|SL7AFFvu|d}1p!Ir3j_VEm%g|}f&7b*b6F~gUO6fA z=A(+f@JDlkd$@HP;>Sj)=aXYr3h284&6@@Q=xd!9jFAHX^Y*yoKES>Z3K!<<#%jTq zzg!?Vb4;Iui{B5i;L_(x{>3PU0B{JB2lA_F!d_PCfVOPUs%^3kYGl4#U9PXXnP5;c zT)#>=Sl>)*c7NXH#oWdxV+_S9mw(&m;qui8@Zp)}&!$U><4ioR@O-5S_dfac!qufX zMQm$tJ0-DIDgf;u1JcI1Yaz|T2F zZ3*TvEwdwYK+PxH>TnQMoZa2R`%)i{XqWNb>5NDRkO2wY3{`eax3_JILb$_1`0y^= zVaI~>!$y&h+(nxyoz!ZNN%j|ChZ|RkyEyw)g%RA9y!ns%6ye(A+rJCMrh_=hpiKL| zNiZ#uj1?Mzu8R&!Qb#QKze>>AEfP}ud7@F~BHGni)7U|^j%gm{dDGd2R)W{yELR5f z8J&) zlH0w={F&~n-dRj)_XwvdyryIWjP#4kuWqv;CG2z_Y-~^jN52-ignb%al(W7nn=`Py zY?)Z4Ew;Qc>6^kjABaqfFBu<&-((N4kZp%e?#u3|x7ua$c{gR z%tM%~QJ97KYMiUckop;&~+mG$-C7$@YBd5$D_cvAWk~>fBFsaiB z2(i=TbzVsQuCUJ^{n28eI6F`Wzu@?gl6yKv{{Z}9?5MAMuxR-re^a39Lvs?a%);}Z z0JlBom}r{%bIE~p!h!R3!Wk3T7@}&_0y{iA z3;ej92?Czr?}56y0l$5z4}|E84WNY8gM)Ajc;4R85>Unw1jguoZ{AI}b1gyFdd=IN zgSonL(!#pJ((TuN%Oi}5_St1^XQ>;&7N_82=Ae%f+}Ky7hHxDqgg7)CWOK2PVy&Y# z6(R&_OdX=v8BhRQL6scNL%U-`A0Nm=-!@?XX^497U^7^+M$4Z&wMdq%i728E^5udc zNC-Z7dm~8Y_9P`plg+PN12D?P3RD|p9(i~aL57x#l9Ad+eA>C@`8Kk^Sar_`jX%_M z{)s?9qyou&M9MEIZI0tn&;Og%*E_Cp_Ncz2uJ(REpe%-QT( zR0#VoM<>n)VS(VQV7E}sNYhsT`&ThK8!Hqn5Tc)r8u<)OcEA-|Nxr8`>8Yd@(&_lc z%#7-4K}pSrSEa4pkkIz~OK6vH7M*v7Bg!to2M!}G+J>!xee;h+Mce*rNZaw6%RT9o zbtRpnwdpJ6)1##B{?_IxHdk9^*UO#UHbZlDk?q~Z{)KDFLLKfeSkO1c*Cutg;qjv| z#}-Qr%!4>2S>%3f-;ZP?yQ!E3b*R}yB#OTNp9 zg3CLx95rK-_Wg=*-bdX_hWz>QlZ=4L^Bh>^qoIDtRX)%xe>igN_e^lqu%ZFXL$ z+Jy`?NDw_nTcW5t-1paBMLaVNZ~<0x@kG(mWpuohcf%`L$@hGUvCdGDP|~?C=`X6c zwNhyLkLAy~L*Sr=IL364kfv2j>R(r<`<;N!K~++`Q0=dg+G+gGneH&8U_3LAj-ARW zg}?G}ws9@uuOB8}qG0iRH@2?1!td=aF1FePS>ub{oYvODq!ijduLIK0eDXStAgqFH zt%r$Ah~aSbA{GLBmjh_>t_gU2r6+t#QrMnq92cwTAy$ z)m?J1yskK3a4<^D@pey*6n}~7(!~{$kdEh`lOzaGninei1++;JLMsO4qZYIXB+ej7 zDEyvFlu!M`QGS@1AW!x&Lnllj3r0C6McP@!pj;}!Tt1#p!CWd%qg}uP9+?U-oP}c; zS&;rSLKdoZJ2LzmuAL#VY?{q(uP+Ls=FiP8IbSTtSaG$Dylit>4JXr#D%Kfol$jJt z`kWLyQ%SIcxj5C~Y&uIr5$@$FpD4#^+U+SdmG+4QYukKa_I*C9H)?|P(@DkKeE~0F zpHLX3Oe7l=w-FEs=73%ZAWcS14M5G3~ z&hR~3Aj%6_T@bzI95j1rR4C7U~LlPCGf7Y-ptLnGFv915C zq8WtmhgLPM+Jt7gAYI#uvdzgyllen7M(1tSF|Ay(4J#gll5>oX%Ggte%Q&_%ia8Y5 zXG;HZ%sl5hZtn@E-9!3COSYKHO>18^u5|^i+V)#y&dhP2geREgF71O2JbK{)nX?`Dgjq8LE0fi{5*(mlDDaK=BKl`SzWaPHNlxrMi`tSOk z&P{$whg7rb$Yc3(q}wL;);$_~gXcP@lSc~e_3W-U{_~6|&ttf(_mQLS^PFneW0dVE z>9lLtQy~6miQlph(S>RE^P;WK6GZUmL0b2_EFu@skp8!POnjOwHd%W%{=5BZvL^o~ zQh#m*gY|(R`HS&)A@-zn-8R~KopWx#^~U(z)|=%=5EiQ$L=acI?MV{k2_Z`ol^MlL z5*8^bND@~$&5aWjNHL5PRapHQCoIu&7$>grx~0m^6@aG7FE#Ly*McHVQqaIOPEynX z`>Cv;{!>|5Q5%kVQ9%>ec~Map1THWjP=IMp4Mm!HUJHh%aZUrh8mnqKPdc-1IE`DoZa7bSBXHf17|L=zOgPeY+>cq>c05dZ;(OhXns&cVUVq+{ zbiZHXf4xqB2?Rr-BME6rRF;z`O;VOuW?o#BQ>1BJlvm|`V4jg9 zj$)owVw`N8QJ|`7oK@kxbe@qX&vKqsX5D<4QKaj9m{sNdfCJ1B1j5lT0Q#cUh90P5di;n=fZkw41&X}?Z+T2pJ45uJ-m0CWtf;D6;yAaioh8e#u3KbT zzpS07ZNIEr=6S=ln;{IvwO^ng&a#{PRgz`D#D1)8H%pqLZNJF8ylFR2)4XZF%>BfD zGeaE1{da+Jy7Oj^s;2Yr66dw|%`AD2_uoaZ{HbuCj{sOW|jRuSPYQYlPO^^GtdE1^`!hVrREJmBY!e8?y|4)#*-yer{ zzn}sjsM){Q+X1)_y2Kul(@0yyZ4y@NEWYry#q!$cwLB*p{YZwF= zQ#H*>Bm9~(8u^prtz=e!@7%PmU!v`@Zn$WO_Y_3VeP}-Iw&a-o6oB4&U|i$2XsPoQ z!rFOgeGTYuPlUR5&(Zd}^GEPLFwA*gFy(m)rt=<@(tR6huDs2<{@_Eoc9V_Xr8WWW zR~v;+uFojD(Cffg9|GrnNpr3=F40vJgj4=sii$2wXO{C-X!}HzCo(L(G^(vMCd4eV z*vtgAaY7&ME^YWnv8ZGNL)!6dj=9s29|lIC!Ogc|oaOohK?AM4jYGDyE4p^J$t+E& zLa-3pAFPBcnoeoAI32D%ZsZED@$t&DoSeR z7gUtk>X{i?8DK@M4C&$+{2X5qM&_*x-(DGBo7mvxzwtx-Cy|T#+J3dkdf#f@&0;-3 zSTeavtaoF&u>R`YwuFk*!Ou?IMfIn0aM{$wWRv^0TBytAnbdb1 z*%@Guo*i)9W(s|LAQ(MRDZjM3Cme|PFuWyhDo<6qW^GI3&2q~OUXxXq&FZs5{q65s zB_>)K1N89+7k9U(x8fHzs_HiHPA!&8JWQ~1ttH(b-u~9A*SktU%#{K~(ybEMhO5r{ zNd>P&KREahFbK}|iccShn1M|I;nXz2yJ$#&+6GkUHv!~vL;kA8;L(Y$lZYgm=?rby zt26c+=&3FrMccYCR4r>?X?i2N=izsSNokl^vw$qaOH4qokIAI`h!(Qy-G_(c;tK1! z3>sV4{#r`Eku%YWsF_zKUPfpcUdC;0Mh#w2kdwpMZZnoYHc4~ys0b*Xt@|>DlAjf_@EMv_SZX5ncF6jiqWsR!jD5Q_Ir|39vC+lp~{Yi*53 zH-D6GU0lGk^+!IsoEV(s63qd&ZaBc8AmBoHErbjf6Ney{nK}_QOU5 z91ZCYQwd-uIHSpaR!Hm!*m&?u$751>w_-ek&C8v&q?Y$PjwndtS=jWX>yFVJecZi# z-2?^-=gjoK0H9!HPcOapNFN$V*m5LlN9-c>3nGI03(g&Fn2G`KZ_7&B62(l(#=8!G ze1)lXWKWL#$t`79;nT)W2AMniF#2#v^^h@d={Bp`%%;eo@)c<4M%a2SZ`XRVGDeBu zYeLP1-e20y@QUG3Xn@g?P56^&PFTa;Nu;%;czn^fmkjn^&VdL+W7H%iO-!=?dI%Ic zxRDzw0OAxr9WB@F1L9%_PZXmVFK!TKBl!zyWCL+XxF4!6#_bZ1W`YuZGKWa4-q1>~ zjZZxtzI;wTKZH0@CO4rFjaSy89}Jdm;pe{ixs0Fp+I(a1-T@Dd#m}@BDiTS0cp%!j z2(b3xi?s;;qyX^Z9vlb(^!G5HCGU!%-J%eMa?c_q*2+W$PjLxzcS>>XxD$H`y*(Bd0$7V`XgX_hY|?h^2bt)ORXW zrfRJ}OqEE#TH$8J65mG{s&a}` zK~_xtZHKhBug$Y2LryknaZ^E-XGU1iu^qdt1X+!+Tfw@hTT?~$d!i!ILp=3TH5xvk z3UL42sq6e6fa*y*15tdOQLTMB^~joTKAk=qN}irDbVK2v#8K-4t%sLyDjGSBP?!}f zau{&jgRHj68OiB=7w1s2Pp2~@15uC#Uzw%wz`xc0J%%TuCP!qgOu!=Vbzlu@ zy6>r1@j<;|{y5L&7QgzC;_0z4OJ(v=dsC-#)hmrmQhA)Nn?HaqLE zMM#Ce15hs48BFZB6$E3GCL6HI!%*o_Qo^T64#t8vY;7v?OcdaXM(hhi9HPUh)9bK) zrv(A9EAry=gB@fa+IvJ8VuAfE&oD&%aUyMxfP)_leXxFAAA}kCMBNf_;!HmxTl#Vs zU5kcV`NVBx#)xa#DlzmTeFhG^^M!UJ^!IO{vI1*zaQeg-$sT-~pM091U8o_I2?$|k z;l}ZNGIs=q-l}sQ9tT=}kIClZl*sk%`h1{ktF)wY!GY|GbzHf}te|4j>GX*F3Oo<) zJz(NAy;`PQOm08nIWm@M6fl(}ZQ1NP4K>>4O1$&$a(V8b9G!!Ew*jw(D8N?DnX_T< z^Ba3wxIF!KTu{?EC1SIKusVhyK5K)9mID5T};ckaR% zki_~1<-iE{)Iw%lP-R>ZbWM8B(liEjnZ8aCfEU+?VEiR9^v(2llEGWVSf0$XWQh@$udjRB zKh!21r$voi?mtUQB#IdeC_2%Er5iCqU;pANoT*31XlAD*qdfCWcm`GrDq~E_4QX3V0Ysl?oC$B%5t>hB)QURIP=sFIMHv6GZ78w*?YmkJc z^t7ssJ53%Omwp_@wr8=mCzL4qlV$;$j#w1CFBvBHYk;f%B%9jPW!vp{kiWNlgri|+ zH2A>1xK7$dNUiY-#->;DeK$d64D!+tmCsi0iL`RpYCL%{GpL7}Ba?#?e449S90V?I z25HZ2WrBNMpS#+s?{TpG{o$ynVjA`jeUb?~ptLRU^ME`A>?vvm?C~_Jax+NMOwtBw zW^PI3pxrDA-Iv6A2mDwkGgA_I!}ZHQ0@?@0qx2%{;L%G#aD-ai>M~85tz25|%7J)W zpSSm@%T}_=@$+9d^?mmiQiHQ&Lf(9T!j%oZupMTq=$n?ZEZZF~<3W>0R}wB7Uo2LW z=pB@_K7t>DRewam*@?-F_K8yS_a~X=S`~yDRJch=JPTJ-kwcJ+l9P{({S@Y54Vqn% zlCjCuVrS=UEv|G@I8byDY$pal#e1;gW(kZPBnvO0p|}&I6gZK^OSj!l-g*?98)uXG z*2`}deK$T6E+ZB;hr*UOYk*zePResB%2Abpmx-2X1kP> z#!pgCZ=oWe7bQ&-@ilxXsXXnLZ;(TWa1ft0`t+jDGPjeS?BC1ade{3S&JA(*5hgQ2 z90Ag49@))RaKN$u~_P@PDUD_s8);^MsD zx?5m;an(*ald>s#ekiAd&dfCKeIl?-(5R9t4sW&0V z?bEQYF^zLhz)E+p)JMpAAub~S})(+8w(ZDUeV?X){)^yM{pZ^0q1;glf0 zeWgLZq_XZIumzcupRS?&HJz-z(-Q}x zkIKV`R&4-YXa5WKiFb?)vpd;G9m(56`w$Io`rOuE4^G4BBnJGv9v#5I`kX17TBm1h zizm6ykxQie%}+4^F7$qcK4`_vv}BL z0=~bF12(l*uiyWC1(t*BxB$kfHw1)z8}8q$`(5F9Ez$kC!ZDasE}6sTGx|M2VA$|l z!^Zzn2k$H=0KL8dIEd`KSuCfO*v{LLE~=K#1NW!bfw`|&Dc5wD<&L&*KSnW(bo1jl zp0Dp))N=501Sk?yeh@vD%JOfKBns(1DeZIQDKj=WI{jpsfT0;PEbTs}sA74N_yjXS z1EFwprc99;F)ZN%aq1EzrsM$@EEz!?+^VfMSazp1UAS7?sDP zI;U#ZYJ|4^o^Y5adW?pX8T|cx5Rr-R4?Wx{hG4mvpkj%{Sjlkeiv;8JgkfFYq<1%> z^Nbumqc<4(jZ1!ISbsu)ONny&O*?dH-eb@k4o-P9a@*q%7xeoO;N_)bZT|Dj&bf_4SG&5J3HO-UR`sdk z`a^oYS39dlMm444d~yHG+-Uq+v}>Kn?tM9oTH`0 zm(x+FhrJSsG=H|XO@*mk=oHyr0<>V4sY6JM0~1TSKysiw&vH~!s$!QpUu3BiOWVLb zsrpT*ushX*!TQO51xTDC zK3Gj0b6#^`QNq1n2fwQspuBo_B01b7aW{kKbfIVYF=PgzY4W9=!W{D@@56ZL2|@e0#E|<1@u$pAjv@ogK|?5VV`J2TAsErQK$6mzys?MIRg7I6Q}wBmMV!5 zwO!bdZSwp`sDu}Es2{yE_^=J?!ph{qG{LNO;OAO>O=kDitEjA0YhL5whi6MCtbu#7Of6S=9FsEmPm zDVLMsSEZLhZJRXGlSB_})w-Y-^e)p=`RLk$s{2;2^1DsctdR zJQ>?lz$^|d4yUNAb9uLVmq{Gq=2zIazBuHl(hri_PZoYX$S+nQ7-zH)iVVaaYUVHD zX1Gu5Uuc*2*S(nGzSzt!L&2Ce_UjHPD|dC`IP*YPBktc*1QUz>aiok>IhZJW)({^v zVa?Z9ks7(Tl)8>^TS|K*#6jv?(tI1xyQj#Qj=$BWl6=cAyL}FK^rX@qR_~>vK65nS z+W^@5dXK=o{Cd?WGLGYKynGSMz82glP1w^N@W_YSpO+=VS5_Vt9vU8TP_f+m-LlXU z9Y)Sg^eMH$&`nYuPH1NnY-sSd&Cp_Pm(tjqO0fp1`y?|iD6kmto6Z2ceDZvRvt|)h zcRN|)B~7Fp-kzImY;nPB&p`@x7^y2^=Ba=Crc3b)Z;FxC#BNxqb!aEK_wuxwI%mId z;c1M@cgbvBD6}Qr$T*?Y`(+88lXjLId?2=Ek*zr#?;p~xFX`k7YG^AYfE!f{vV#Xu z&!3Xz48wef3jHu2g;_m0yN8R z*|sL(6$Df32sZdZ?#4642RIO`8KrA~78X3!-eL<^@R&<0CzPi@qw7+AiyOu|V|Vei z<2-TU+I(g1t)7(?;i0-RefBipBvVNOA;%|@QMsgiL@CK<1EbA{vW+D8IwYW}i`kgM za4UyP7Q7i257SHLD!1!6xtBO_S~dc^>$PB1E-a+41AWDjLQRkm3-bQ?N?BPtd+5zu zX9T-XFm3e3+qv>KF#W^+5eBM&wu4hUX`m!9Gh6)Y2Y<#B?zf8#7zp_53kc!6{*eHE z0;CT-1iY9V7FJ3D7WV5hRp$MxukikB*q0F;3et!JI6<%$;|N5bSdch@TW;X|OBEEK zWjr3x_%>7WBkg z8L_+U@cu*(CF%}51PhG>M;0qpX;ZU77R=yp&>z;+ClDkD{qEEgJ4vPkUggGCXgAQp zEk82MC8b(Mnj6b8)VC$tz_9=cPvgdx@7JD1qDEQ=kqN9TMA$B5soq>r&dTsBvIadf za1c{*7~Py}+MqT59+dkBZydeTn-NR~M1bCY1W2D*1B1@Eq*NwKbn`C>xdnCp1WJ&5 zcLOa{?{Wi4a;;p_Yz6bY9Ya=~J3EayDj=D(1;>IU37RYq^=B7>z1@Y9P*eyZ>I z)ont-;@m0f7o+r7?qV#T7)wCnDRBpfxZk)89b0@KxG86|BIL&;6Ct6w;+ORt9{v(L zu~cxW#NK$W+fqF>RfdXoxDx7n7LaKXI6isN5R^Do39w~hcxmXhYK?}0h*I!UdRl2( zn6%%2OisWjF>3%a+hI0DYMswy9m7n) zGfp4G!ZJ-;`W+O51$cU9nq-ORc%H}PBaPXUCC*=_6zj;zY(4i7h1LK;nHUNu<8 z#3x4&+I#oh9sQ*jLDE;A&(n0X)`js^kJ)FU=jAoV)UqzL#G zOG)H-wAx3%lTTyc7^1|O(q{r#phu^Vl;azWHHQ!{knqjKH#PrMdPHI9$S3$ zd>YxDw#=}ZYI zG^$LZP86?J988rnCV|-+PR1%<==+wl(67+|DGROzWIpcbO?!Zne|qWo0GuZk?2h<~1bP)#=X%O;rRL)heFYEWV?Jbo-C$?wPI{j*Yu=XI zFyumOHPZ|ltwK-^|ItV0cv_6T))@{5U1{O*e7xkx`#B{p4Ks7_I~~>Lr>`}=;okKM zig->r@!MX|2hTd?PpT`wB;Fb8MQ5WN^j4?L097G=Zr?}lUb>F8KGFLz-JAkn!P82O zpZN1HRei?D*QvreCm|0(ug|X2&T)%;sGxH9%{!8MW059cE$x7UmT|pFoTZxhAPTp(nm?$}xi7`;z^tdQJ;H4nB0OIphsrkV3OnM>U6C$L?S|w&O z2W1NKqmJe7aU~kLcQZs;-+e3^rAjn*Cv1Aldq6BRp_ah#R&q~Ktmgcf;8ya1*F9=z zXQM|HFCDTiWDm+7Pr01%;(bTQ*q&LC-!Y(k3Jjt?2PRXN(FA!BIR}BQ za14QOTUOq)5Hg`_+U!XW(azYmy$=qas+?s(+8BO}l{%E3GO=TXAFc;AQ(IIDsFNih zXNs(N)j2j*CO3Ld5Rv`=|NsC0|NsC0|Nq}lGLfxH2AH%3U-2`ye<3jEoCDs8BOOgq zOe|1RX2CRrGBM^wS=CLNqo7(URc+sCx=#0S9}h5N8;(%h(n6@l6A!0wmqe6lz(2nd{JbC(hZqcDNf^J zECV>)Uzyhp@qssG>d-+lzAb4Z3I|7WG>J~g7@LJ!AMcgriBxL;G*8b!ehz0DzgGbe zU3kcVE%w99sTO&$8LmoMN)P?@_03W`y6ws39oQdqoMeR$67JEKWztt^t@EBZJq;fG zkY&V2?BjpZD_nhchl%y5T&NQ}^62Gp#=Rn+yt@)S>+Wf^PI9_CC`f(#2F`FNhHiZA z?cGP#| zE^&kRBez>Otn5`PBYH)tkYIYjh=`rBN$)L77rvAesptPzct-1Rv=(~@%td>IKR-W)jHDipl;f><=SV8*R;LuFogSLX zBTrFkS##RSv>Cw+A@%LaG)$Q57{8 zA_^mSW1~qI?VOzl32F>yF{7WyaP=?)+;91}BE9OQ#Dq*huRB|hR94q%*sW68g(S`( zldyvS!T)69M%W;EoY;PZjfBjCFy!_M2LR9_RSasRrf40NGYi>Qv0>*pX%~CmA|Cyv zs`&Wwm#6Q)ecG?gUAL;mLnMczJqYq3$@2h-z6en|KhMwY&%N(0SrlVq!N?IgqDIPK zV+_eu>Vskt{Sl+V4lK;VXe`Xes2ZTTb&L%#h*B9n5a}MGRH{gZAR_3K7BOH{iZBN_ zB4Sjiz$6T+Ca-g&2ED;kxjud3H-c(0z<%`#YEZQn7PPb1!Ad^vE4yMvR_xee;4F4I z^#3;Z|DT{@L(ER0G$q*yAn0lBm#p=McQ6~V?)Urx2pC#ZFCCB)XiNa$2`DL{n(k&N zJvcIA^}ny2ednBe?|Uy(0yE8qv_brFmT?c0T^V6ys!WJl$bzPl^s34|EPtp6yj!#U z5MS!MMZAy9Gbc+kH?}Op5mKyT=xAfn(^er?6)jc2mo{_PdR!Un{_KaFe|dZp`-v}M zDdle5r43gpfvUoKU^U z2sezdyReGQLy9!43M+Ri$#!Xblvkl73T62BeI8*ajKWy>r+&b1yXWp_XjDQYB_d-8 z!4R4T$D$Vhi+~^)fVmYG4hsPhHljAhHdsXi8yjqF3>eWPO9Z79m`E6y3C5LiVdaH= zcY5b}QGfU6z&eX*Aw6?G!GoCv1OPA*rh%gFxPt(0Ll$x-g(G56AN#@X-oHJ}8=e>< zk)gwMS|Vi8q!RI@i4gHbB8eu3A9eQXJxNcNWk-(fbK>LV5Yr?0aFqK%sM1!R$}7+W zfNQrdTeo&Xw&zt#=iwuSOn@LkFlW30bH5=pc>sBE&d`fhF(C!ad=sU;mTLEU>e*>0y|G>$YoCH; ztP~>`L^%9U^>dMnT=ZMghyC+~5W-`OW5|AF4YKskc214rD+A{o==6>it$12R3|;P@ z8XM1>#G= z^{;=KZQBYltl8|VqErP)s(L2hz^6Z%*tbkoj}}(agiB7n$^WCyH@ju23?L`~Y`m<5 zcbEKx{maJKpV;sutp_8}dLaNI8>yL*Q&m$ny4l8Gu~W)rbf z0Ulp9{UQMtQFmv_?sRX%nAWfd!!qUtV$%?fA9!89F}55H1(#v0isgdc1yj;yq> zMS-vSOQ%2>$#M?-mg$}{mC64=dpl2fxim{d`}TTY&Ux25%eH(cDYIVzNdYLV(M)LG zUmB}dC`tu1s8m27W}-4@RtM;P14Zc7Catt{As+6a`h9D^Ol;oxV=mwULH4gJ*gD@j z1>`CZ8^j}|WR{$q#sC#GoXZV8O+`7&`(jg{A%jhlmJS0EqUxA*(J_f1UHr@G{-Hvf zr5b9DW&4=_GoU2h0yuzA-7`;uY0YIq)vVwqM}8i=d;?)%mPhI~Sh0p=a69>E`uD#% z`!Dv6ggqotKm^?w%a^M9r|Ewi8~_v?-8OQ(V=AFmilCqX43J=4QQhdn4p)euD%@>E z=3UyX4mCU0(ArN)bfpG$OW}wfatvKMVy}-bbvosf6lfZ9Z&I}?L|f+yZI%o~RIHpn z6~Hx5`RJ%qNQxPM~a7@_a@k6viS9{{O3%w*T@A(r^@^$gLz6*w880 z%9SejZhHKOC717i;G6-tdv-pt3A0KVZUU(UD&*MusA!!y+(atEA%t@5&Q;-}cV!pl zs@tM;SEed-CM0g!?QtN14}`j?!sg#htR-RAn{B~%fPe--H5#C%y8)0eZ*|Lk`1lfFAPOt zc{{VoU9QoKt4boQ00$5Mf2I0wvSR=PmT}9ny)zUXz{HlVwydhLek@o)1EMWxvEbJK z)upp@-~f)@Hu;x5POsRZjtdSz>?`*_&`?|+yXOQn385*0JfJF`iN(>FD{rY81chxp^X^28yQeea@ zZjP8Vib7asm`}<&uj5eQ(*C)BOV|9Kxgn*fSRo8jEvUueBwk|wPD^@zN@q?Tc!0o+ zmWllfc%F5j7`|>W;TQ%_|4V4ZYvwvG%UG0oLZ?sk%hiJMG6wSb2eSW&6N)1@)l5ANz*7Ml+=lgm5*pJZufEs;r^hqv=MRZd$%#2V_X3upA~C`ktx4h7!Yb8l+ryy#6^B9yA%qaZ7-J45m~>|S zeUE~y z)sQYbAiErZ9C90S*L}!CPaw~H0UAG%G!)OML(%3Dl=Rp^$xaoN^=XE(BePJhX46gX zmJv|7IP!<6nuza9)r~Q>UAnveTwn2UUyckkUZcAtY7mn>-Gi*uQIu|tY|Q6Pj&ZTY zaV&w!)Th(FwEp`NLW;cVN-|akK{mPG3m+Iz{3;VwA*xEK(a@l$&9+8`acTFPnXc5P zsBKX@0-?M1d%AGmO8@~3VaLgOw*cVIf?BS$SZWgq!*Fp!I=8rgZM~25Uj~ocb zoUs@#k4SPealPvsE=tgDiQ zYy@Gv=#6wL(JzTeQAv79Qdr1)$uVOS{A0H{dKAv^Iyl>7_H(_ zh}e2m=Ir*;h}rY#EI4=!5^9f0%F#1p$;o4parW5cTqbiUxN>{v;^CEu<%iz5MSv(- zs&p8#WXshPfx@t(`U|xGj9Px zycMVL|GlLG1(N;G$-oF?@$0K7sGb@Pk5YhedI>UMbfiMVwtw%fV_!Vx^?yD){qyg~ zKl1==`xAD~Wt#Vy`TqBT1o8npBEy~!zIu^Qe=C3*fc)B>&(rIF2LS!XuL2~n5s*-_ zgZ3H7!_7=LM#8`GJwSp#{H%M)bIHHTIW+&aEn8rqjaZxet(R$;dx z561b}mh|=>9^HIO;W)kka76qZFaZd4YdoaVUPehaDx8mC5Ni7!+_LorFN1}V@Sw{r z&QHyt(f?U4`r^nIz>3s2ZAjv^y|62q2r#46r>4xT^Bs$AA#C<6B!AgcA_7t=#@jWu z`U}&)4o<)b?m@x+(H4w}*t%`gv}Or@@Q6nx<2N_7mOlnqq!2U#NtA^sfbRO1iO{9t z982IQPvicri=u%V28#yi0Cf(&vgCF;(ri&i!#7Mgx z&UmX(P;-29wZ9`CkUiNzs3QT8fx#B>p`1DSa<9zd*#U=F0uJl`9mB-2O=mHb!Ca1G z^fb+*?)tOChu5-0V+&4VfSR8tbV}uYFl)iB;{oxxjU6St8d#67{9G;$$V>C7G$r}w zEEqSat&Veh9`0Qx+%6>M6N^N&9|Q;$fuDrIDd@afk8U|Gfn#$&#DsiC>02OT9GLU! z@I?ENMdpobgo&qZG4gH%tO%^GhJ{JXEgnHEPdOI z%d+%ET?6tf7vZgEzfCX)ynJl<)-w{Xc2<~e zf*6ipU6#M$V_@!i!z-4t*eowLOKa7FWnQBZ%T~v@zc}45ECFy#9I|gO>%6JaBgyIl zfBHl}R4>Uih7Jz3V*;sBG*Y7R-N=8hMK?q zCS*cs?F?Rwk@>%q%!x2?`1cBvNg%D+Mo?u*nNQG=CldcC2${VPvzd=(I9~480Q;o( zVWCo(=%W)hURx%CdJW*p8NgS&TRi;7qX(^;B<6I8NE4NUiW?fo7k=e{IQ_Zf_h6_> znSmWxmdAOpR^|KyluM6N8je6Qz^OHk^LT3H2+kX5>&5;@%BZ51({J9!I2)j;sc6a| z7SbV%9T~+a+2%57Tl(j))5>!^1c!&`bIz&U-m^kY&3R(S-IFz8z=(jW(&}H^e?^*l zIT5ZDivwO0tvjcWKc5&ZiJUjjCzC&AZ=c-?lO5-Mb-X0Nb1Jr_1WEwMmlM}=^i4&a zUp>d8>znH+ky#c32 zD0tZjv6vbF{D@JwvJW|5jq2uw?75T3{1re)AWLWL;h0EW!)r0{vF z-De2?l}@zv9n`%L2b<+KA>lF$ot=?h#?W#8I=(U_H~9kljFa+gQ=x^&seu7xp$e?{lMPeSJE(Mn zW50}c?@gG)el-)IISUQ5`BJL+5_IfZRy7Qf#;0v!5|0*&q4&hbXeOs}#-;+#gXtOH z%*uF>MQt05Vq%N0?bsR0UL{}*yIa82haC|DVdPcq^?+)mTQvhi@m~!~nf(HFmUIM_)RC7VNl%-+01X=WTrU6*cGV3I2Ed2~UfL&17modW$5?F;GNMzBB=Y++NK(8#7?7pmoxBx>Q9vI(9ZuXW7BnxdTJ6TvY* zNOTN#2{4~e3JQn_z|i}XL#X@2!oV6s=rS}D(T&=S&6A|jAR$XIZ3Wkhom)vh9}JBN zJRo?BJF$nkur^G_i5Lu4FxL7z$}2?P*W*R3#~3-m35U4=5JfyEQX_SpG~L{$>P|eo zeW2QDx17@O4%d^0howHpYnD&9By|IQ+EHqOQ4%l$7@;5p?}-lFg;+M5#`N?0ucpD< z%D&xQA4ded^N)Y=f9T#-8dbY)_y%t`d?U|bem%a$`S!luLc?!Sw|1}uZ@@O+Ve1@s z!;9T0y3#pUwdQ4hu3!E?M!ul;%loRnmaq3Ce3ZZ8AN*4rclL|1H*Usad@`&~cPr1n zGTkh5Ewa=Kt8K8&UI!d@%t^OBvG5__p~$!kYOq2a&LR05M*bZRupF-NpGy|2ZsoP&8EgG>>%&!-P%1)$?6A zOOL}<*!WqHSSt>x_GljHMhwZDEAnECxJuqFd_RKiGTfJ@aP^lF?im4eU~hX)*RxZ2 zW#vC^21CC!>D-hf6ggE(XW^&)(4_9t4ceh0>HA8zZ9!yW%4CIY%Mj6jo$^ng^U~Mr zP51_#g3&cghXYR_<`r*MXEguO-7s!+xBU*pK^$_}5l0D>4SPiK*a29Vou3ERsnyE(_*S^}crIDV)* zQc{-6J)uvZ{(Jq9dpoyn)_Ce#B$ljLd*Go*Hf<&RB#!)$qjX&0nk|;uo|f5cLw5Y{ zkG}~1AtKqeXWzkNs&3^Rv=E>}kHHmJU2`2HCd^o{Qld(YIt`k%XeW4Q$311E@r@EC zNR{oMopTvXw{}&hfZC(VfErrxPaVKXm`8ZbDF)K z7MW)fva>_VN$;~pe7CJos}~;H8rJz?Q@=3I_BEGH>@|z>C3KHE4qx*tA{FWAKqtB}j1e)l3JzLez~B5K011BLqmEaA z((vRRAJ{tkXHBOtjPl;#di7`fOMXK88AU1~xtSbbkyS)fot{^Ioaacpm42vwY)8bgynn+c)e+pF0-rRDQl`ii> zQBPr!S4<5TRWNP7SllaVofve3z#9VN`56XzqZ6e>gf|+>U5P`d<=|aAqiMP@mLTU-&en9;CDC*?S>|iQ878* z?a=&80l5i6oPx${4mL=$j!J;Q?U^moNcg**(2C|KZsw5-vMlatc&s*gT**0Vgl0wH zflVW2pn+>zxH&*q?RE*UuhT*a-%T~PG_c7X3@m}sG_h(2)@Og*q29d_A{X+0mzvb> zWjL;E;lWg&SvPOk*|ZGw>wl+d?!Y388P5!_<(^=veJ(%v)`yKU!7@YofMDqBnq>Y?@65 zvtba9AIayi$Fp-4W?rNL?Y5Ol{A6dE$T0Th6{pBIwO>R6YRmHZ<5epl%BVgWE0L|<3Wm(Z+g~iWYRqRyMxbq;VHhv*_IGr~BKTB#^=r{3}?pS%B59lQl^g zuCQgf0$myn*ht`;gYMBD`L_E~7rR`B|69C$$g^zyav-Ov@_|m2i6ybmy>m0V`)B_5 z(7sxa(>k|Pi)?cKmk#rfyXsE|wTIY6sIfMStaS;zD<5(Z_FTEDgK6377JUK1Q;0~! z78sAG0HAqbTsvVl9U>0T#Hj?(g; zP-W?0Q&z{XG?8@to}KG;wUD2)*MzXZSM2I4-_4Td8CTj|yjy&KS;oN8$ z^-F_Ek^g2c%E>4ov{9|UXkY^nI>U>+J?&N3KB3rtKZeCUf!rs}QK;jEPxO>Qeo7V= zZYxSH@q-v3dJpqf-HCS$xS*mUPnZ=y&squLu zyE^O-a2>X6dk>XqlMQ}s>Jrpc%+BEh=CLt%YzvmkJ0}eCUI;EH&YJ zxULYX;1>w;f4@ zK$J^$3x+h@T6yST*PwWu;Yh=*896;xNJu}IqT;xBjtgwo!upDecp-x+Mi~;5Q2`@v z2K(x=!Qo}|29t%8`9Lb_uQQ%Or@_6=*mPNBS|ibGR!ZgaGdI#yTKGgfp0D#E7) zW==GhsQlBA{^}9C$HIdz82z^@i^l5KEZh5n7cp!j{dh@8%j(%Eu1kfsUb(&1ZK(Au6 zuRXNcP}TeljXGC*_0lv$R&LHeqysvDyE+x>`tFFRFhM~}p>4ojGeRT-cM{ihZ}nAy zVu3nZP7y&mX`v?PNsO>-56gmP5e!a<3h8wPTg>%9H%}^Pp zy2Bfn0QSbUg54Q(+KDDa^jepRrYq#^xfT)wVM|R5Bi((>#!{sZZ;eMG5LVTSy)JgD6!>okNt=?SA z!xI6Vug?8zIcGJutH+5sfVi zhmk%KDPmTM&W`dwJicxwA+13uR4d1X7FcE}03zo90DE<^H4YdQs;4AvpVQ0KncPoWuv=RFD2eI zM*e_UYkGC|JbS@cnVTlcRHY&j>)wc>gSaZ#y2YE;9QuLJx~YBLx^5ykX*l80VWqw* z>Rh0eOeYQ;3n4wxd!W^UC@ba?BZ^NN|IP@pjO3ZRY1Rx0qi&o<0JK6dYIR0zwa~l? z-Z=w*)FA6tWmF&U!Gw)$I0K9^z;PV{jEZjxx^e{`i^4FWxk5?}?lKqbAjo9orY4w! zEI?E7pLpS8P@ez8NSv*A&Wtp)=H<>kE(MW07&UOoEm0aNLfDM4;?C6!)2{Ok0Ij#Z zt}4WSz1_oz;OnPvqkG;2yTrO)-T4*ZDQftks~c>pFiYe?{YAz~icqxaQ;b~I-V zb^(rwJ+oeDO85MI&a>YxyJix6`}yIoJKk&4akj2i)0N;bUWf*CnGRx~ zdCl6tt&7IRGO>XzAZMc@onH^YeV*803`rn~c6KN&pTrHIpB7_KjAwX!41|N)8in4J-jYYCM1FCV3mV9@PvN=A zF%*3EfqC1>1zeruFmvvy&FqW1lsaxVwL%u>cN_Qjkiozu+q!C^U9%TCBiez49@&x@ zjEuH`Kd9eT#5>P@fe@ldfPsdYk?#{Ck96oFmNUpO$vkLvUQ;MdwuS87I3f#p=asRA zsiu%z^_e6^!~o{U^{b;Y4@d4QdXKlHrU#*)*lFg@S4C2^lzL)us`vhQueWn#lvBZ#{>76>oj*{X@z_AVBKIGVu}k`pTQbk~;;QbOdu#yGIRrjwHHOl}w`ncCb=BPNp^DW=gBdyxCrS zk-h>2M+~IR_q%0v=R<1j!~?YbLxtG@GN~xA^PFfb;E=uGdWhyVnJEBX$XJ-#0i<+A z3IUEd+Wpb^Rs*S|8CJ7(!q}%Ot5xb?7loK>=4TVIn&|Vsa{>bwO1n~>xV~NqZiEf{ zLB*W~L7$8~0FYrgXu>uu85NO&PGxKhDTcf$@@VU4zqAUo7gG84{pkIrUw&m_{7)evnR|< zZ*>*?>X|FAbAu+^rLJM1+jl83F;Ew3z>b;_^Q6pz8*H*mvOWEfALG8Spqq%knO2nV zQf-$orp=sY8(SoU4Mh>rv+7Jh;XZYS;1~Ku52N6QK~%{oRg7RT#bvzT!X%s4UO;?4%gQty5ZeOg5xtL zmmz+1AZS2vNT*M!UfSi)XZ_J2Q2`=-oZ^y?d0{gLv%EJ-?7d-7R=N6Hs&MqMCl;drC8jv z&%ON2QwDj(W)U3LdB-t`1c^2dV8V;CjKUwGU?>hgl$v@8 zt|?j($`7@|B2!lH5luT11w~yD0%;4r9o3!e1Yh@>?nUgiJ*;8z0l%W^k~R zQluVoV0}W87CmfvMa2aI+~lzfD4{!@Z_;sP~0J3^x3eQwQ!SQmHVmTx9g4)1V8>4 zY)q*ZCe?4~8+m|vxYW58?2nOxR9!CD=Q9Esu-Q@;22a#bFOG^bpsaLmW0K7?tFERh z11a*-sU)xo3+@UJqel$yK#kH1+$IbjynqGEKkrC`Of+x(#~!;thn2VL;JSW&cgbqp z*ZweLzSI@;PT7g-V3uesNI+Ve1CKqXc(%Ir;a2mh2VRShS-|l3i~WwSlHLeQJx8~H z9c1|%XZ?Di5-Yls#ao=RnBz24dt$a|=mgTA4U-2?`wnsDjIYY=lW+Z9`WxYo5cmc! z5S(t(aL+ZL`TW0m=oU{erV-sZtb3YQ>2-!(Xo_T$2c4X-+S@Fl(abusbw0kn`500$ z58n3{zwAnU6<)n7kJGzLx$?68VaE902v>evccLrz%#v3vfeH@ns>j<)p87r8$*Y=? zPJnql*JHl2C9j4iMD=4)t|qKl#8#V8w1=hCgewA@?QN(75sny8 zx?9Az8tP0#ecMt~>;TCupJUZ%L_4kT#WYs+dgIt&#`W{;WndjFyG6=eZ(@Cp?HdAC z69Y^i0XiWC?Iyza0N7qY>IL{{f$s$MWa&2W0L)Sjf_eibgek=UwHhu*H3~s@u@i%P#{nYRH!# z)zCbJXUg_Bb#dpeK1z%o8xm0x0q;GYUMq3a6q_JMkj;zJbrm4>=P-Tlg^XUvrefKt zWE12oR+iQ()#%ZJ};K zzNF>kAjGV~ZX2vu^X&#b!W@6aCoC?%e$uQtKdVJ7)J3~ktPhhp`7i9+-5XmIyPwrP zm@~Ohxvu+Z>yYj`e4Z#dmKr0CdfrGUfl6pZCX*G4 zLB%p7q;*=o0e#-H&a_$mBCc2NvUJai@PzChj(4k-C{n{n)vmCPuAy^wwLQxTuA(Qd z(tagN&;aS6^QSKBa z=uq3}@VsBqKFCj+0dHjiRuL{QM!U50b2P)+7~piD9)Il|F{ zVu|(GR@6D1HN(6@7F=M-N_%!sx|elf>_Z3ploN$2%M*>48YdiJ;lLMl;RdKpih=p627ZB{Ey|_;_{)>wIra;qkG)X2G`rlp`@lY)TKHaurVN z%s!H}-s+8VB$JHEUoP~`cn^|-&mHw+>xp^s$FEXdr-)pGi%q6KGuY;w>zqR7cQf0a z6&*67_BLu^ez!7g&;A;3qkdhVLeXO$8%Y^cQBN^851xl1i2Q}&)@|}QzMz$uJ($E+ zQa%3`*^|mp=|e?$FO=M9IW?C^2pr5Ur0`*cOpW0QwT5k1$K^Vkm0W6{h26y_D3?CE zVX&jXyiQX6^-p<~_c7giulW1j_=)t#k~e;?-4+is#`i|J@jbc|-S{E1#Em}$e~!Q9 zf7ave=XmO$XFGA@KSw(MZ+>E~$9!c=+}(t;{#Agy`+h4H@r_>v%H8Fd5|k$!lNHow zN{f2LkGA&a(gz7t)H8?V`i?W18JKNvH^w@cpN`M*D~6^KPV5~$_dWO zjWi0*9q!+}HR^RJ&UzT#$B(?nKY?lV#@@yF7{A9n8n$WPhgE-;cX5x5V~&T#2OKE~ ztIO$ib@puHT0uPPig8iy^mDySvD>rY1y4y*B*nuU`Z`KX%-t3Z zr&YsI60(HkOQls+0FVYO(EM+)szcoX_1*r&U|(Ix6JaP0(A0j{RVcgcOPU|8icoD+ zbNq+}J1eTMLj^@nT7Q|irkP9gqJ}5E19S!b+_*h69;OExoWl%d7(1sftp4I!FPIQF zGMbLXqbSH{x{+Iv)YgY+OgfYGZTJkv^_oLlOceJH005KHF5Zobv(*u%2AEEyQ3yht z#_1V~@W6gesFk9ep!D0mvjV_!5&+~q7Fhq^Xj#`D05$^L{=}!gx|3(h&>O%OdtXCAQn|mr&J#fTS3DX+(t06`JF zsK88F^QgJGBN0_rKZc6HkmasB!9kqROZO_?WN}(G zWT{YRHEBsigGv9+{VtlU?@~oY7`0K2PMyVy&SO-qu8*Or4KUANv9U+v_abWFftP1= z51iJ{l~`$q;K6Ck8s98=g8HNgpyGY~ zsmfMbgq zf>T9ty_Ji>b0ql4bwNFMM>0cd46%oLMk{H3Go;0w$L+X>>4LXdhAD-MB9=-;>%;0x zcNsy*XRB+Rp0l)?EzX)zdLo?a8vl6dK@&m~HEBD3nSj%j;{x5`J=TG9x6C~is~)WG z@Dy;yG^f6(uV$F(bML~D7UYX6zwZCsW3_r>4u9%Arw2!@$4y>22jY|q)O zk;s?gIHy*PY?dOGsn~W`FM;Cer6UYjKF<&y8GLwq?mdcYFyDHmW zRQL5v4yZov@jgeS3(mtVEzztac%$4$&!%B71ppc;8Z=gG?T_|yq-N1s z6VagaUFlkvx~bR+(>JY}p*o8dod>9P*f(a<1~6+>0o^gp(2Kx{?C*io+BsfkECI%B z8w)D$vE^CqpA$F#WWS%`e(8bppg;_tYY6pJ&$J?$sFJ1{x`bevyIr3O_e@75z->>& zl@&*7pbh|84Dsni@M&<22Rb&uaVmNS>$h4tq>aX5Vpy$9Uta&bn)Db=uGL7j061rl z*zg|fzE+*O@&O#-6HfU}yXeCY-|sluiKEPT5qO$>Vkuo*>r1!&68Rs&Ki{{m346}c zYTr0(Mkx_abxn@f+-S|eC4DcwG6A?sSVQ`arnBS}F1r@KJqBGNyoU685^)wc;JKSM z62meU=hUi6&XOaew*mkpeb!mBbZ^geu?;4WRcytWFB$hVpe$sFtiL(xjh5R8?Ki4(k~{@2gu85DFc&>8AbP9hk8on~~}<>7KerNl3h8Dh}!E z9j1|-kP7iL@?(x(Tjq{tG84De%*`_2O)N|KK|8QDH(`y?S>dqk=U!l?^Ipr3o=Oaq zO>Nez`IXoEqeR`gLm3pZE$K32x|h3vqPe4QZp0kVX{N3ENLIxeDxEUXvV^UAtyLhq zVKsfH7D`Th(&RhtSf}@-W1jg5^Iml&?&F)YNp#`Jr1362lSuqH6s>3_E%BkTVmw54 zj|^7!=OA6$`C7ZzeHO0mTPd*>sp5%0j?baJl#|MrIdI-v4v>#jqX-{&%NpWisFK#F zMNT>pv_f)+X}LO$zNzS$=EdyUlBQ`cbK6&XhDKNsVbSl5gOA6Ia|Agu&S%`(%KUCd zYh%?L_Re?h0Niw%uQ+jk@#-Ms@YAhV@j$r)B-awUR(?N$Mu7xYBs&6>3g?5*`UdKO z;_>QQvBoe*Vh%>jg+M}Ri=>qnZ368?XiL$~C2fI>4}*ay(9HZV+ZXnV0*r1_Srien zT+RWachb@9YDrJd3;(*=Q=rf7FyiZvzDq=kfr{pz;~?Y22qouJb2{O$Y*?f$$|ahg zXhz!$v|U3b;>pc(z+U{J_*~^>_LQ=>+#xHduBZ%F^hD%)Wdk_3oR$1@eFNJZG2mos zF$o8%97P{ShY?V=t4HY;qAL=^c{R~nB6>;m{0L&M^Vxm$P76!;*R!u}`pM~es7m05 z3c52HI9+xC;+;*b`O`Qk6ae=V-SpmkmG8fXLc7AzutU~1<6Iu#p|I#-ZB#h4y{&6U zO@F{0ZZ25!j1cC0pyk{m)zOuBkOx@dO-HXSA@3R@j8VhM)1-kvqXXX znU?^cL$||C!uzVs)O9EYtB#q?qAIEiRZ(#M zq9Bxl<79#GD&JjDxF|Zb-+9ucwB~uYrZw%>AWw~_9m&L5OxdUVpazJA(WOk3nXFPO zxgP!Kp?Rj{wm&llkWJ8@Sxj4O9!f!XEtqRNs}{?mlEaelLpfv)|1u>Vi5+?bC5J)D zF{ng^>7G%3ptdTdf`Mi*4@&IN!7yH#B>>a~1OxyFzqH6sc1aYyp(0Kn%a8ypSHf)_ z6d}}5lLvvO76QEtOGNgLM2(^h+e(SkR@=74=VBYGt+uRG3oW!@(Q2#kEyBXW!r&lb z@Qk8F8O4gepOzoD0aQUj;9S5s;9#H%E?E5RDN_f`C(d-7)3Pv3uvoWk+qP}nwr%U% zwr$(CZQHhO)v6Z;uE#L=-U9xPE5-cMucnz}-_y$FJ94@(IDz)b0F; zF}i%=FFLat-uPYF-)7#f@1_1z-G5{CAMtoU{Tp5Rn$cZ+8MYlATE5F|+Er8MhAqo# zyH#Q@Eqbk&$q`gtUHL8-_bFicKAxPatdYlN>E79`L_GBzrYBS|#DemJ*|0KurUzj` z4lu^SZ4gC^U?i{WJ!McxiiPzNTGtEz!qz&ElPaATEA_t978@^SVq5z#Vm}su%5;nW zIP=-yiXEnU*XZ0ve-3VmNkB`v`FLxx#>dkFl?ADB>OF*+94&I_8Frld?l@Sr*D(aX zQtx>t07V8LF27BHuYVtP5d;@7W*7e(4BUn!=e<|R6UXyD%sA8YxJX&s^|;D;Lv^%i zFx$A^;N)%_?HJ=pc8_)Wa`#B~7o;kRW&6m0|22IPohr-p%Cw|sD%RH-@1)4(s|rG? zb6Tm={Q*mDNK~ypV7iQT#K%*TolFR6$Vrft`IO z8~(fXyFD$LPjtb~OkB!{InHT_xN#fd-sR4Ax9p1@F1h!5q8$2}B(URaGH#1Msopc{ z?mT)cuI(&SyRt=DnEqO_IgrbW;=T&=I2*Vu?T#|iLPBWoRs{^Q-oyZNh>B(i*xE!j zbAT7)aB3hvm^R%NYIkmlI+#%3iImZMaaVcl>{6VfFA*6N1u!{X6pZf(h_@zyUK3a! z-REM!tQ|AK;^ja?4v1bs*-x^i>T!$=>sd+S z0mqf@%|lg2X|$sq5r!OqiAk=8pxhxRHl^0IoKy!?>YysNa+P?&ieA3HB2(hVk@yLh z7;=kYvGW7B+$5ElDrfX7o@n4u+rsi1JC6$deUT76;&d_+Gn|J}W*O5uvq^#?zG&c` z-kC9jj+~qE!g$hnis|glyF=F!p@`7Yx=RN3XY)O-(dN{5?a|E%N#dwT;w*u7PN>y) z_v626dA8rAI<l&f-kaoDD6{P6jiQj`}H9Y3Uq&^Oc<`_r%xKSo6BD z5!k!5QjEHxF6Dh~s{^)kkqF(wy@=-C0nl@U)Vz1-1pzWhsX&B) zf>J(jNT60L6tv@uVw-j2wrSdSL{L=jA8QK>BSGfgl?lEAbeS3!n%oBgZ6+a+!fLfz zD4S-->jjI^VlmM<6w7g$zC_n`+S#>p1t{+^$(;Mrjox!?TIab1&iC3uzwaJL?4|26 zVY;^SG(YzD0x58v@JujFoI^Hc+q^`oP76_qK1golB>zmRKEDWzi`*Dlky1)CcmIH(VzRL#p%zL=z}tczTV^EIT59^c@u_AHdMeJIqsWF=yYbgsH+N zT$)|Th)uJz&az>SYKFcb66rEuv6DsWk!%*485Va_LhHiF+($?tbt2XWBFY zxFV}8gIylrDfypX@UIuV5jNnO4pC^cSB%bhlF=|u4XdfBXJf+nHeB`?%H2B^9G`rr zUpMUF;^Iurl;KFSP>DiE#I^`l!={w1OAMKE1OTwXIE`tl=8=V5QnTvD7^MXfE9ABv zYjUE$gQle=x0`CnX(DFvVL*Rl;~QmCjL>y`;CF4V(kV5oPV+msX-G>y2fMKQKh2Hy zMi%!2n4KBo%f;*;V6qh$xH0$%C?nY%rRw2rdSyAI=#^7fzp@rvH;2(4CqDhXO+#`- zym*RSrijaoH-S6gc)`WCttN|ak!zzt#96Bx(M)BN`f<~uL9R+HOY;DO^e-{SfFxA# zyZl&3@lsYuoy2sNT1jcttS3Rv8TP#H2#e<;D1eC%oj@kkeoYH@o_H% zQ}prVJgfMd{nw3FjHD|x$r9NhyehQx8&u7K zHRCAOt&?aI+pvVK%&W_x72y@y(BDaxmc(eegBMnC5G1oiP3kDIFN5PsE5gnEGn+)X z8LiRLes_iNY_oMsclPAcD%D|EpMOJD>ecTphQ&hex!`~gn!FxGmTG+^ zrB2)nJyGV^lx(`U9rcLs`2?oOr7}r>{lqt{#!+3}?)1-ydQZjlenq#;?S36bNsYX% zE{fR~sdHB1!0vh-)v(hl+C|u-b_MBG);@!&1+dHNE&}b5+RI>4nzA6MRb^#;m?pNcA1E8)yTS80=4mpTfY8d___HHhKXiq=?Rs^k_z zN1I^lX&M~9J=#jCNmOt`}&`48) z4VpGU1vRJ~Ho{H}hjR66uy*LgXi=|P_RmYut(uT*i_x)9T0|OG54K>XHIJTXN*jlA zUY~WWZbZ&;2deJp!$k9J>xX#hkhnz@g-qRQ*T;cS&ZlgtZ|vUx^B#(GBn1=@6{}7- zF;hAQK(UyQ$`FXr3~W}#9_q$2(sEg1&3;z*0&>m5$jZG9=4owc8vpOxKI#zBFB)bS zG75x5h>x8tfP(@}Gig`BW}Mw)nuv&~Nf<^H(Gn3fs#``oJbauc^O@JxRTWBw;V)-Y;bM17Pd zsy%cx1BZK()_Pu*6PycBdClu8j1+KFT5s~Mz}*&PhlGXBle;gB55|Bw9W7dYcFYn|HS2aI`1)8+JY3HrEd`Us0_N=iS0h9(Xv@LByWJ40t$0^Y;MVegYze{G6$K1x65y~)SbetDxK}6 zU$;)zJM?!-(FYGEA0B^P%|$uPUqANz1Gt-qP`R$8!Y@W#V&tA2LJmHz9;<_W(hX8U zQ#A~Nb!pxIAM&5H=MbrF2DuJqrR;>W;?daK*uAb*F8Y zPk;KO-BU=1&XBt%K|mNUIjQ+5`0uo2#M1M|Xk08%<1Um|jgaF-ps&z!N5WuH}LF;6RmScda=!{tD zGrJWljQd9|&??G}vN}0lItW`#`3nNkt(Ho|o}gPL%pk487w{iZU7FZK#H&PfzlBKL#J0P>Gg_hx^+szm>`+PUlW zwV>$lP)fvm=L)h{-X?d&+o6yYu17dICt*CigCToPzfaV$DgYj2GpozDdqtvB^ZBqm zAd?Cvf=K#!+#e8z=qItsdg-1QCSBFAMs^jqNME9Vbj(Tsa9f_b{)#N7effPmyV>eg ztp?do8vMq_(BJ*{ShK<`2MSNu+h)V9c&5Dk?PHO^8?)SeF9u5^VRz^a)!q9GFjPxh zLnAv5Y_R;Uk8p_QkN55=5ef$*49;8*fF9!6K_jo%#`ZzJQf^e$9ELQR>=WdSrWn_( zc5AMMDcM~~YKgC{I`9?nYe)MECoNLcU`l!)4pbPA6iGX*QT~0uz9RmKvcJZ?Pp6y; zT8hd>A&N|$=jmKZLAOHP$Tk*<$;7HDjVQ&?`Xo_q2)LH)DI+srB}U8&8F5=}^k`Ib zXusU{(a&khGwBuH$%^n|7PT)uoN4Y5j>v)}-0G!n1%+nF#IA`}6YI$x2<31X3bXkR zzK@Mt`?R5*Y3es{hJ6Vk8&s>d8u3!A)|UU<526&Mb`tM=e2(KuZ$z{dD~25@rZ4@P zO!bN_$uz3Pf7-FR*P-@Ci+%BCr0L4Nxh=)rI-(X6l4_8Y3b?3QD^q8nLct|msFf;O zq|g|lx^?SmZ@#P8F)MFXySpOd>BPZ^O3;WNFnUG|A;NXP$QOp&6wFQ+)1U_1{942v za;|Exd&SPc(PFEcU2`%nor+Uq$42DJ`|(LAzkcWrK2xn+izR8STPJtpnd7wYy}^CC z-O9MeT?>F}^QW@~Nbw*P0-8i*i71Nm^X#U?+a zzPul&$n#wC{oOq@iaTG*)qjL|yU~n={1~6|}&&jZ34vz~@Ee^6o$pJU))|AFt zH(?DW))dwVZUAIw(l50HQ4NA!jomS!0A&Xxt40KZKQJHykmZmR#IhltQ=NeKynH&XrrG_RUQ5=qkqT9=qc@$oYoiIIrzdqF13EhU*oukU-qi8<%&RzD9h* zv+7){_w9}4F2_xr9d;{G>R#fWvgR{gbzf<&_ww1W20nYTk-GMpTRz&SEqjfY^28rN z<|-u_L^R6al)4oKI*~B_ttFJkRI5@ST#6z&p1=?^zv7~#MPhTF0VQULql{NfvX1%{ zZ9a!)*3^OdZq_ugKLVDiU~k!K|9Up}eUMhnL6`^1og~UNCBl%#M3Xeqo;?GQeV}n# zkG!L4(WI$^{}F9Uswnd~6iw-xB3etFK|!WM5R7D13<|+tL*A<--93Pr&_x2%^5g5 z=Zm7*t+o|#hu0%uXCCSi?7wnjDsurE-P1qM{}aSlvgl6n3sy8xo=iQ*6F!ZSh$KkC zK(`C(0i;2KC<%ZS-%3ambf$&WiifVbQr*%>-rBSZ9lH8y_fKP!BvhVgrmdkUB7;3<~!{*b~O+(?%z|Pu1NhPHVr&1{GeaPmIyKDsNy(Nw) zVe?=qa3MxBT5YY9qT-2aijMfUKAO@0x$ps zfxuy>C4rap#3sWjRk=z9mB%RzMmv1VsWe^dW_0+d=9vUa^Bu%Auxu0T(r-orseU`E2!k2<6S|Km_i372{QZzFp>%)vshm&%jurw&!b@#;3Aq@YP2q!> ztGx-O4k3CG;XqO<2}4j2r3Cseo*IUFmg%{RA>C#4skZjDd+TlhJPYq!3R5%~7U+W1 zhf_GA#uI&tq(f;-)Q?pOk%I575ZmlQbZ^lpmsJ`)&t{;Z6h1kPPl_>zSG=K|BZo9s zJ35W*8GZ;&ewPpo@P=sbd1qayr$-%#=GQmBP~A=RKlLrlEZpY%Nszp{z8R)vZbDiuF}1`o6d53)g- z8Sb?F9~?Gaf%0cZ{h{*VxT1K3304pa7AK z2KhR5yGCWA9TMUV3eUA(9}+`twvSd{I}zFvn;Nc2LV*oJDq>d z0?^|=dw@x)K4O-9`I*8l4pGy}DWz!VA4?^a;&L&tp)$kBETv{|U+tzYI8nq)YJU8g z@>LF`%1z+JZqf+|2_dB%-n%^bEFY&>@ zUhZuzI3VsskkYe9i{h5LKI z-4u9pv!EYPryU+%wS#I7aDcD~6=cEVo@7W9L~TS>oeETsmhLUyh^H^@fL&AWxjtcK zzbBecTiz7H>a+Uy1*h&Y9~*X)zsDR^_cBO6**&3*m(tW@z_yZk)uPE}xdIZ*yMZUMbGUIE-1PUcst^3X1vhYq8q*1nuy zSlJz?neSfgOv^Xy>BbXm)mmsxr`>Bhb6vM~)U25X=n8=pJH>cgLxkP|;lOSO1lCS> z^R(~b_0fFmkbU$2$tceVgg8KNTKuIBC?tBYLa8J>HDiS#(@63$GZRRt0VQ1`;yz|M#A|=?0 zb%PB3px_H+oK!3rW^t;n9i~nH@eu&%3QtP3jJikX%?Hc2ywvkgDyMsNfLXFE=v3Xf zY@^2ci0n*t--~xvuo1tu-6PfZ@dUAEnB=m$aUN8T@ev{%iW4xs4trqcO?iLcRUzue z+*rj|UBtUIF}tmW#}nw6m_60BY)P*1JYX&m34#!NOMOS8?h=twF^EJ>pq)30$6e)q z2KGx}XdGucF{r(tlS>v9{IZV-U0u6Q!p`}KB9KHX9FHumdn0+K+V~r4wP>64{FCdt z=&%om%Mj;)!b~#`!OuYfhGka@8(}+l8>OZ95r3A*-cm%_GY;vqsECZ7H>)IN+q|pZ z()$d+h!+(pB#|4B1Ylf5sbZRBk+yZ}=XCFWMAj8d+>U7UAf^VoD4|xgZN5m|xX#ye z?|FsR6A6%-m8 zBrdp~8Ix1+8yO}fAuKC2H84BbKi%3NvlYfoNK{`~2JhA|)rJWZ6wv)VGuLNK3r`Nr zj71zCofx7g>5P~g)6Py+b~w}1m0k-vWoIZ8}SQCCu2T3%oWk?H2S`+Brie_Uba0B+WBj~5;0M6 zk*Ut^4lGP;gqpO!slVzX)rA+!mFdxZzu%%8dxa?TcH1R;;}Aiw^%?CSB_}H?E-=@c z@^qi;$%#@I(2!9Ytto7*41Il_?ScB~FKWo>C~1*>C1sGX(0C`!`HQocbUdOagCm6G zM5P60rXK5@8%qqAR}j&WQqz+Zl~oqsy9W?wcsSgdl;6Vf3KSmT5El^B-8|vEj))DB z7LgK^9fL4BIzI3#XNRTjz=%UmnumBG&9o4^)f^R)8MF*-AF>~;mzHBhPI4fdCLZS1 z*4Nh5ot1V?nKTFoaK;`+?v?EaToI8ObT*9b-v)UCO+PcR^X~xNW$bEkal?d4u2`_@ zt~k}Iol^70b=)Lvd-l8_&L%`KA`;9G5aoGPocl>1Bb$AY6A*f2bCi^|o2Qi4-6SA* z^Mxhw-~O8dKwY17wf>USBWKm#k&%Z)l2{e5=wabp@d%a2nLPfKfi=^%_`N$_oo3kq z+==BZSko+%?yD>VWk1L2ct{!0@3Lq2e>W&vyCLHu1c1->Z)u$ZH=pf!t%kPno`}}% z(lNO6FthN*B1p7<+_(dR@R+{2)d#r8Cwxd4&9f za2dM;PRmj7l8jWTWZv;2*KwG#)yjqcDVXIo|>YIkhU8C!D?C}pa z+?^a#tIBe^Bd}IAnR}Aud0o|+g#8PT`ljZ^X8-HSvGlAPc)@D*#bS6G8JS}RZRHW0 znaok$6*6>}wHYgDw}AgJnI~keHc&nPtOM5M-&RhfA|bJrANSAlD%NLICz}w-AWCv}`AGp-dl5xgToc(C>3LA%D+;OIyT9Ks z*ZzC|Ji_E-QUSn&*6#zB_`<0(tjVGln~&kV*1+HAZD`Wb%t~te8`96Gefak!{>Ms{ z$*#&uX;Z2hqdaSwzWH{_O7;1H7S04og$}gk=M7_)S_4HFvs_GZ^qR*&!jGHQmqhri zA91r{#904RwM*02o|p6P>C*_m{Tr&^T5B&t3{6w67-J`647#QNclB8IIspGtC0%o2 z_v+o<{%DNT_sERHeQ`iw(+7V1p+tFaSY@%KrxCwH9o5cWT=fH|-~QuU>;HRf5AlI+ zB(X80_v#!!6z`mTlzq%%&N(MaC+rFEhBfNo>il;9{P=pZ6{qj_%T6-}UDoFzsip#Z z9%{LPz`6eNO%Q!ZGIi5~Qq$XM+2xB-c4OzqF}lrZb#;DufsKKMnU$WQt)Zp4wZ0jU zfItBg3!zHM0v1(t2q}V;k@)Mt!WA@Oi_Ha{r#d+X4mrxi^XQOU2NHO zN~_gswNq-_mA@Z9Uw(v zS&MhaemefBzNz7^PLcbLBteldELFX5`3zPxG40e%FbJ^+iJ}VJX{f~}0_Vod4^hM+ z+0;!zt;BA-#-5$~;?~BGgFU0xwRH0WK7_bl@9jnVG~(2eY>ceTVbLb)YigUcKKqxK9aNOm6jhbg6;_tk z7FUxn)Y94za_!+0pkPAp7C#xeiS7>JPD4pcT~}UR8S7FRG1_j?#jI28wRk#n^#|W# zQWZN}i^uEza(lbfrtg<}1ge;b`v1up{-}B923{Nhku3TDnbwNz*2@sb%v9&i*qrEA zj-cLhlAaXAd7+^s>LLO{Fd9(k_k5tB0Pz~Z8ez1>02l(A5Cmzo>&51)hG`4ys+M_A z4BNU%lM_dy1`D?mlr?-f$oZf8m46T%=XH2dEaxxaB~QDpy(8cI%pWz?c|K25I3rbG ziHkA><(Nr9o87l;2$$7ZV`Jp8gwQObssvhPqsI5#MTL7E2dT(}R6U)7CJr^Dri|yH zSMY{H)V?gJ6uVS%+#}T!=_#MV{gV-;SSMPz&82__v2gOIUrzMW|$z?)?d{| zvsZ#*&(+=^*24HGYe&Wmbth?!mGD;NjlmfAN(Y@w%{x-(UXl`+3#_Vovg{0t?AY_{y-$YylX0qH*YNyMP5b0!mZG;Vt&OJj=K3ocTTh4Ri!!y=TB=)1Us2Av40@-U z59H3BBxN9>x~JT#@mXRqfP`~P`)^zK7*rg5@7`~M{5nH;+!&^Im%QvgFSztM@)_o<|6 z8pcVuaGYhb!{LzBOm?0KI(>iR%I-wrG?f;GQKYpZiBg0u&rB0UT{@4H<>8A|m8G?6 zks{A5!YPGZ+#kFj+21)n^2a3dwY3eT5CKK?AWUHnGzpW(k0V`DExWg{cw5Z_1l)BOLlfPuNd$pG3w8ukeiu@M)8B`TK)(5erWoUBePJz>;7#RP#NkKDtv_@brj$1=_ejem$u3WAm* z-Bm)Y+~>%ov8pJDSDCZaV{yuMn+Zmht1gmRtGkqQvFd(`zCqA6l&%?Hw7hVB>H_Bq z?kN~>upnW^#E|lp^_ujal0hYr>YQxtJ`YScY#=+A_2zvz-kyc%r=8Z(=xBF0xL9{c zjBKCxv{^$Vf}p_Q044rUWfu9b%gD0J_<{=o{sR#LMg>9zM1@~_??~v_Obv;SA3mraNSh2s`ege2Mwp==*6pYCLmPI2b=8 z*{=?b(yG0@-B~Vsvg!OWC?6CoF;+ieX{g=Lu5j$AbX^JE>g<}s>-G4&G#%V3hR>$W zGah-dm}xy&cOtar#?Gb1M_PyUBT>3YtL2rkxuB41&u5@4zp zE`4dV@%imJad@n*$2=~w<%w&>J@hb&v8I^I(bwe5@HpzqMb8tvl_OsW{tw0#bu~}2 zF(URnLE8B!&Qu}T>y&Y4ya%GH!KPbpc%)3n!ci^p7L}lo+A1EZ9QmfW# z%H8r`Gd#r{uwv!)_{Z*gx7{q-c@foVF?!8|#b*V-cJMib%Xf6~@spF_9wv1U;Nvq^ z9W3+(PwV}cXiLZu=M)b1X0Y@Q{x#sa&6N-SHsF1a3lw%w=oOB87zP4^UmM24k?T`V z@W}>n7f>mTbEiN<%$;nnn~Xmol{|KJ1Y31ZR{v`zVX`^!%11s+lEatRt5Rtls{q5Wt6TVpp+lmU=ZZfm~O0~&8}s3<*^1dx=C#L;O1?NKZu(W4}T1^|=~Bxwhy))os9 zY`OHBNuyfBn`2W6h2sB&etj}CRNZoz`N%#J8xM_5H5wLytBX&X?Uv4`(kgwLOD=J? zgVBk;{(R0cs0;USvC={Z_%|yh4>xE3Gf(i&6)^7uS2Dlw{S$8p z5SYu1L;&^GT7knEwDgW5?O*eo9^cizm>VF`9pWD-=xrzS++0^6X7um9Q zSLgUTwMMYs#}4t9cL|u|se8&$fhdn_NoZT5WmVkvoZ=e=IQHcl@@MpXz>`c}&tS0Z zPkPNxd`6fVC`hD_IT@1K1xH@Vtd)4#@6aoJOMPApRCA#ot}2d|n=&i2RTyp}2mE&$ z{h8KLsK?^dGWWH(^XJukv4s68#<$O3!a)Gg?`er)!I{Pa-gaPAR;-CKg#L<*ZfqzJav3|ZO06^F;O7zH z40zE0J)BKrh&&ndL2||59ma~&>FlNLnQnh$;vWznnfnF_a|gYJv6FrZrP~gOfVdno zGbDBCAw;zYEbwN|Z~_Uge2A3tPGt*COiOBvt6Nm-njj^fNK(jircL@=+yLXsMSNDq zbmjP)4Muhij#o-iwlp2clA%|fQSXLnUEqjnWo{5_c?EQfrN8xVcT+O2-d>aQB6W}r z61@aB_06Jb>hu!63v<#`m?x_8aDvE091^j#X-KsQs`w{dGbSGeJtW_;ZQ?(iO4SD9 z-dg#FQu(81V;?b5iCpy{?tg;d`QG?U<@|#+NnaRoss+Z{Z*-1S^i%Z5uAD{YdnrhJ zlwaDHy}oZV)pTzUsJp^B>l{U=^m{NS?{mFZg=Exwr=m}pl(R7Tj^?lL%B%+c{p5m>uoq8 zshJ8$kU7~TiFdJ*#k)713Etu%-Hh0CM8|v5^Dr=I@+C;a+{fI9P$_DwYy+vAg6-q( z&1D*`IezHtpziB*&Cqvk?g>A$be}GF+1J-biURxUB``ayke zc%Rn3JL(Y%noz&+ORqE#0XMEg#esbMAz$%j(m~wdng0Y1d?C*7u_mJE1#eLS;CS|- z-~+I@_E0P*WE`;;b1SA#>?Ka<{7NbnQZ`we)?ZxcK++Ik-XPRlYvt`!$i1n+ zxqr@Hs1x(|5v+3h0H4AqE;vbH_plTRQ5XTCmlH6*Xxy@rqay=CklB4}gp!!0xoK;v zcf)Q`4%LsTkS0~FSLD=rX*G?~B2y^TE98>YbiFQbWGDndcrk`xe5a~$k_M4%fVJbp zSxgEsc&F$RAO1d1+xpIc#Y$85EJ|)|&L2@Ri_%A+`(W^my4CYGY(mnT*akvMh0R+Q zM}M&le9Zf6NThQSxC{;p;M|&za>nNtv-h%3+p2rC-K=>UKq&eHc$kdB8n8*i6LT|& z)o){ji54R(rD%~w&&_E;rHXTE=y*`08+TT)TF(7(KQH{w@j@}w$PMRy9%SvgUw=Yn zqUu=vqD4cO(u`?35E$&dZ+g7MV@i!zUgKk|jdyAjVG{jN$$kTNsWi-{f$nGf^@04L zzkyHvUWxw&_NU72!W@^F|2`tVpU8(jbZ(VxY}vTq>V?|r>jAeO2KQltalvnd!Bc?nDX{NlpzqL0Y09y z0MK21oaE7;=oedDFwLykJP0e?uyw4^(Sn0;i{cVqPWAr03afLcC#JR(w(xG_-h5$w zGDy>4*RP)T7W>*V%N0kEWl>F1S>w2DQ~GrPBzd%nXvovMe+VNN@n#s#sLtW#>ze2C z>$qdBT7Mm5{RHCUS)IpN(BrPZgX>y#hF-9>TqL}@rD~S#Twv1K7ha&kL3J@)dtD6e z5-szkT;wcl7&K7>ILl`Hyz6cc3Gd#gw*9-7?!APsnq>Exl6TE9+~{gP!=D1iURI2| z>Fj{*;nCN+kh>*9K;R9xeO^tQ7>ZR2URM78>z-txwf37a#lIVxZncG_)|rxPd$W8= z>rJ=Mn|AN>b$|N;BVSlXJ=WX1rQz2)pwz$NFiz!$)<7sSP)0~lY(yT7qOSpLJRU!? zX~rDIvJZ*vnPNiEc2cW5TU~A5%*f@l9~m^IUiKB>0xe7%)g z>xi?~9}89KFf67NoMB0&G)>Zivn-ZF-dc8)q+V-|mtV|5n);$y}>V~T$T7g?F98Pct!Aji326?PI>EUTFrn8q@YOEmf5<<)rQ~%q8Xnr6PFG>_;7?zu+s&D) z(^F8&07-?pL>w%^&sNS0424W1LbNCCGDRgrxy}=R-UqvOg^_;Sw`5GDm5e6`6<5M?=q{ zFMN#B{{S&jFbD@SP4feTg_bjbEKS*)fy$o4CV5RAJ7p-9NAy^_g-qYrK2aI@-lZ!W zo?RUq>FU&GRlPXWO$+gB$>VDRvA$Q8HD)TDh9JuA_0y`y7llww*%1Z)b~7$Oyr%DSh6aQgLblQsk$6dBmZL>`CN$vfJGw%+z6)ZX{NrUq&0TxA+8S#h6^xFChOhH35#^I-qx=L-2EQKr zuO2oWN#*5)M|+DJ7dY9Qdi#NojO7pa+p`u@5ElBmoU?2mFJ*E&)Y zzR8DFOmW9;!8v+z8I;qcRz%yWh94@d^LV>UUj_chdH{MQ2DCkhV>Oc4$c6(?M_`m- zM{ve|`{r;xyon~u3)?qx=*kpeQKy&e%rO$OqIUgSpWc+@InoY}SUn$7Rsa};zI;ZI zQ^J)%glSCf$*?k>l$}NUVmb@h&v*7dR;RoKWFK0=4KQ^0_r%qsLu#JjI#@SHmb^%Q z(I<*tcfFIB%ozig`1L}+OFM}T2x2{?un?ny9%ARXNv=3i310d znN@ymSTF?Ct_A)e8vuY*UM&!aW$2QLo)h62a4Na5$Pbe*GFnIvT542s%@BccB^aJM zusQ+1K}==7;>rdQ$%!kljP^9&4Rx^oS2N@q?MJ1sOOx_LP){1mBVnbLpP6;y9Z~LW za#SrV9yurmHBOY6AKLwe1`n*P>Twq0!+9>fZ(CCiMIAX4*Z38|LVQ~kP1OGCqRR$& z_*P$y5r-r@<5(M&<^5Z7+FQ|)+)@r`CWhfF^h&p*STk z6H{b_QFe%{K*bd&<7rm#L@If!m>w^9rPYf`2o2mJDZ}>MFjMnZh39B)mEG;m-nQ0> zmk(fK(bHC&ZP{})s>s@|h~Wx{xxQgELYgR#dySjL!^Y1LYWHvREt8}#QGt(SI9b?q z`Pi%iLWI)3R>mbb_*{UmT7G`M)G=3FsTvYm^?xru)K62quX_sumn!%U?yqRRqZplYW0G1S9&(F7W(gxH6so47vmd5j)S`dB=G#ENKGA%TZ&WKr zRWc30J*lFtyZH}mzoFrAwL1$?yL!PrpBCB-AfLnZh5a1wPew->YX zb+R^sK4EjN(-#^9Jk*jNvHOKB z4Bap!-9m2qe=b*DS#97pyB&R3oaOuM?fpF6u4ZP%Q|{fbpRtI(F`d+x+FgS4g}-vx zGY^9BSGwLz>$h#YQTV{S$NyHncmIHS9@pHzk9Cvz5PmL6*4(biZ29X$V}%-yL%}wQ z+vb~v6gn=0P28XnkwxuLxW@QBLQ^H6qm~itg_MbM@61xsUl(x3AFp%=d;l0)GYSy7`aZmgD0CY$ zTc2^qSVLL^oqBRuCaATtXA#MQG<_>(1ED$QDgq`FO{!<`Xo~(V$9@cTI@30!4}4P8u&z47jK!k?*ZngY_u|>BhY% z@I0#u7`~t-<%1M)HNm}?ucRHUd+$|#4x*J67AcR2WCo3?C=wH8K?TS2MlXc?CCvIHUW>KWx(B$4|krnbN2u3VwITYd_ z3vkrd*Ve)Ku9-`di~Y_mWt+AOvr?{LeR{nEVM-dQNTW^xsF}k<5eTO`eSY=o+~NKOrlOJyQ`JDL zbfi{3Q)v-DOPtv(9LVI_NCOG&aRLQlvU}Q!ygheH^4a$dLM*}!EqZ6vIm5f8Pe)AtDntfTf@enR%!-%myM?i-)keKapMyhe^F=FX)1+^nkHdPjA5? z{xjwA^??5`05w3$zftoYtv>-IdxbpMy^kR^*Q-NOQ5eUF5{(A6iMr4`Ms%f{x{b?; z7{eF?IS(&38qgKBuw}i}n0SbTPKLg{j`?sml32FTcS8d&6@BpuPCsuLT~#bHJez9L`FX%8Q+U#iqM zF8Yrgdl9=kWk9^um%EJPi1A4zXf``s$a18Q!d2wiE27kK*g8Lb(1INOkF{8?M32-* z-Ok1XqSz}CqOD_B`R|kAB^LpC+zdK?L<}?h8HUMx%LI(8b&mJ&7l(6cEIiHgk7_e1 zin894_9Q5jP#V*_n4ex{iNcDqiT7;@l?s~B5)H6XxZl|L5{8Tpq_aZq;L|8b0$tY= zk5OA-@%1X&54GQVRKjhrc@Z0!m)!}tCYyQz>#L{UqAutHv-wI07eK&~H^e$osWe~E zqP;P9dryrjiuYB>`4HAux>Db|IwPoi4ODko5cgt*1?o@~L-i21ShF2&mN-y~R3eH` zcc~>^306C)BjoFXrwN{5kwV#xi)C!w1EUgW(aB4+Fw_Ap)V_+SibQPmKv|VGa29HU zp7G~Qoro_d=5&c?j(|idyaOsdvbYD8CDG5>nE-HgrSD#awX!xH3 zSThJ|8gwF7Yf6x=Y8*|(0t!lABF_U2%Hw@YUDhe_C&@KlKNbY(VhISJ<5?}I3Cp=c8OWf)W=cNA|KTP>Tf!m@ zON&D>9a9xl<3@zHGP>Ga5}k)SxQRQE0@tY$3{VVgB}Hh&oZb4|F0)?n>HycX#Stt?6d%m7UG*KjrLb8xT+5}AKPfi{2h3T!4< zYABuWf%@m}|EF9eS`uQ57yM44T=OU*r<0Y`_lBX!7BZvoW!t~PS+6M$>A+ex1uC~P z*QOx_N_od&J9}M~Y}8-=Mrc$<^xz%A)r_Sfg76uEzFVWz*Dr)5kk@+`*tB2(yPnGx zWVFS4HIZPQaLausVk!9JTdBX6E?q0*<(3qnZ>Yu0K$hKw`c5xYnisV6Ov}cH;`zQ; z8y!B8uuSr=Wt~FmeWhW#!X3nj7k^(!p{Au3iyn~b0&~An&x6d(60)_TMh7}6uRr2a z%{Svls?H;Z=9&Ku#cmn4YD-!ypy=jPW~bEvRZUx&&Nojm~TM#F7a&f9HX>C+7 zs!=OGW7E|nxs;3}GSLAwyn;G?&iVA)DL7P~VBB-}PQut(n@o1B(sZLqoMRCPqL1rZ z{Vj2hNpy`RB7MFK!d$G_%+|rtiNwbhPW9N`huE20-3>V&^>U;)@E{qN`+}lpAjI-7 zW+gZNe>E!h{A?W#aV!bdHlf&f-VqDeRqRW&B-dFKsNt@AmMSLg{AN#6+L3NE5*eRt zAf83kv5JKc4+P5Y3B#)(y6gz0y7Ris+~q9&vEJKp?Y!Y9-S65f@6+%`HT@!??WQ*R zv~DYy?IaC6R^$y7N3o@Guw@{jl)s^cRfI%xqK8%MVC&D?v8F1Q@ml`7EdIj}xbY8_#&b_jUJwpg8f}g%K2i!pk+oS<`LkHp99=^b z`xpmU{16);{TaeBZ(xl&UGb<~Ly?fC*ig`k zrxiglqCV@EHx{4)rBR?+i<52vkuZ$d5bPB)H<6KoZ6(Sc4qp$fi-dBDEQ&$8>TZV)r6LtrY@00EZ%D z$GkxX7o9b>Pun!*GkB(H6``#c&OYe9R~c6(fcgFV2!-8cIif z5vF=g+)d*5+>{_npOnV`Ma-riG65R+h59QU29$NuUV2o_KDYI7xZ5gXt>NvcX6tZ1 zw2)M&mals89$lxP@D0ZuSl@sgg34qZ#OaHVeXwl-qAb?4R(XGKL}xk52w$J|s9Xd= zA`CIJ!S2kNkFZ%%!TtgzlXdK{Idr`c~&tr<{m7W&BBAid|(e7 ze=Mzp98kG43KT^LB(O*-35;7m4OVI{OHG~XFsiw$hn5xUyRlF!X7Y)P8cY2#Aeq5{ z8WWd7uhc%)_i&-=Yk^3fPAZyZ_;^YRHswwl*_V>`c05K@ka>5&gpQTPV06msXS;%_ zv;LjU=aKc9?5OMFsF3FOPk@IT4n1iY)2vK}nz8ztrZ~;X#1tw6eC?KmsPJl#JJ7LM z3G|K8&NzBnegIBZO$JoLTh+YT1TCsHf{?ng7L1dxn>HI(wQJZh@=cg`u%}VhH8qI# zjPPB6wQ9GAg94@tSOLGGG$4+$ALI!L%}-eAjYeZMzS-|gq;psIgjUv`NJce?l?nFD z*P*irR3)n(zhm-E2o>T*EE^*<)Rnds+8Zw*Jq8<`eFpaG7q4>$^K}<|_^()utHjT9;;jN?lvIS&) z9wbH#VGQ`7eMRcrxX;HB@-}z_4zahl$wUq`qi0-vPK8oNU=cn_(rB~`;pHi8X9-Qm zA6KKZpb|-4dZ8mZ_+gw5B9=oVYsX;Pf(v5>S*~G4vwk7&4xWgUBO_YYj&y95zM zmx8BaVdwl|_-jO?)y?KwylP6A6~weKL%3X53So*s?@=p4tu?xv=!lyVM9nKx{YL}q z|~%PI@%7O_?K@aR{6;z9fW=Y-Th;1k-Z2K}OWQ zmT*plI=agX%V3;&eyzF)F+>}DT$8eHZPQfAcF3X4Kas4K=u!6f5Vh8W1g_bk^>n?N zwne~FOXvgPBw;>SY#>~5ijaQgMd8ZLt_Tz4(tPqzdHpT@YG>T}5xOQ)%Lr!=g2rS+ z1YacSH<%ozGIFSXn(-HzI3y=CV~y`B_a7!uP;7s2rbKe@Niu1mGH4-CN|WEhNCrth zfL7hA{+PpyoY$Rw=RCm~ROuoA0b*uYBmHVM?jDyeHF7RA`h+XwQzveRi(%8m(BHI| z329+~@$Dm^oVk;Izin~HA$|+Xhzw=5c10bh(fU<%%SNXDXPF3>}tUENv^F%0@&p+qNo3hrdG*{#KD znuUV8xvyC$k*k1CwGm3*(`YsVDpx8^o!+oxlSsbwpb!4cBO?i;Ys^OOTlr$WO5Nz$ zg}58-Gfm_ZWBHN+Vl)eyqp`-dcHFNIY6+GytOaD>=}7y#XLuOPTfsyNSvMEjx*GTN zQ$XC|t@FUJzdi`@(BaqjHFxl#A#~wsYCL>8u zNL0<{_1X|U1}Rh;Ndj%0-kiA_gWitvsM1H%5FkSf?k&to6=gdT{x(643@qVoMG)1e z>=&xSLNJewQD~2Dec2$6$jy>!m*=<>!O;*wO*|zvB-Tb}VV#2!_hlMI@-kWcVU_HU z7OLU|MRFp!e;F;>BUc5kxA0m9Y6ds7hKS#X80o3Pun(P}aM$;DAG< zCh}rffQQI>c~v=`uuGb-R)fYu4RoXpkdg#aEasj8Sy{YN9`^8B7Q^7ngPw@Z*||4) zi`stU1cq4=UyC>&J$esH?otiMkT#D>w)#E&ic3}8OKa=V^oMP!J&eeyifGv`GgW_KdpRg4u1{x~rC59i)bAAV1tA zk35?9n5Dpu!cl9?AuX1Tt52W(NT4R1ku@P+%Fm==xl&je70g_M+CpTz7Q$nnt7Y$> z`y`l(kA?UR250vuC~heb7$Yw8Yp1k zC=74$1E^@EOknmdkJdSAhm65lx@(=O-!4)6Z;5>;Z=eb7-o0k!M%TnlQyeH>r@N60 z_lQ^dbT2R@?=?Hz0DcG@x#cN1K-MQGA?ErjOO2c9A9roLSlE~UAqk3p8YPm!wsDwHFlq!=tNaal2%Q8RX)-cf6nOPuZRruGd zC;@_;7R97E;-n(!GgWMaevED=R#Y|gJ|pwd*JPKjWiCU2DOOOOn`Bmm;eG`vck~dj zP&Oe;##X8L!SQFN^*|jwRKr;4hvqFJoDs4TT6)*%otfq`i`pWgRu+V8!Q-skUJ(TJ zB21E9F*7{fI7UmUpGF9>gQP$fdEulEF5>FW&%Nz3=`%%PlQCFx)+530SrqG#Y*PGe z8nv!_YnGCrNRPRwbfApYoa)TX%9+(C7AG{~-`L{1Wl}E6n$o~tYc?+fjQEken`@l(Z>x9|Dp97YA;6bJ{iaq@;=5eu6U%UQoOGk8qcCzSx2S ziuv@KuzfJ3-9ycag0zryGV!D9m&hG5*1a7;I0R9Zw7GJ|I$Zm&8StuRZuZ9 zn|CZQ+ELF=HUlSD=txjfE~2iSohy8oaP7pw2U-(>m0=Or1!O4mDM%u~fAR9b*1_!>a>RiB z_l$s@Qd5R6+JTI zwd{nePr?_&NeUBHYEZhzbnxfdX(X|mtG5%e-fVE8B=ju4sz_HIy2mFv*!0VzS=g7E zmkXK7Ev#i(LKLFSw4r-4d|%}=00)mjE6yPDG4d8yV!$~a!J*2BUsVkwQyF*^g#Qk`Kl32BQ}p=0~Lx6+<%ujo^^$v zWSHDD!L}nKu&;RaTXMLH} z9^>m3v-PJRXhim|%V@Th&#X)-tIpW-Psh`}FS?m2E@IQ~7pz@#8@FK9;0eXlI{A)n zT~$&NG+`@!z=6`@ZOg9Oy(HCdFZ-Hk|D1eTcQxs0mpDu;%Z;~bV_s~XD1)Y&_$K^< z$Q9#XA+K5Y3ZfNkTGW5`d;$Vx0U6g9YO{>Dl8U0p2i>c`zvj_9C-Q)5;KX~tL2>hi zx!Cz1tMvu!UOjXs8WuMqV2tb{%}SMLj_*%Es_;AzC@4brKS6wa3??x=BV%=6 zwrY!&&=0ch3%}KN4$LikPJe!}aqT>_?4Z%U&EwI<4jRjtgmzDTh0|&0@C+YK4xR@e zhqM*i5}9^l-4(VSDm=7jm>yKp(i*!EBDY^nf=0m%YSj;3n#F>g;6Si&U~tZ2L9RxH z_~8g^eG%EuFxEA+&UfF?mTMC*(GqYumHr#$48N8Ce))1M7$R>tx_2Z^?mZy&y$@N6 zEF%o~MWo7no|{C;<#O}`g^SD;Hc&Cmm&`uMCx_1#%#w%6X7QbQ>`WXpZl-6hW3GeZ zL;kb<_m=%9fqw0bmbsZ~3n*Y3nMCb8#CPnlzgHqtaCG0-d2zVuQ#~^+9_8SGH2d$d zPZ2Y?b+g#gTCy5w{9#MXt*Wk(ks?N~IA6zixC%iNx+h0e@=-@td~gE!Q7 z)RS!SXj#btdgiiRPS^3HN#vCWtvNf~ZWSN2dc6m%j%_yr2asj-I4o$bgUn=R<5FJ| zncZp#!`txZ9>z{kHj+toXqiJ!(SucTouk*9&2V zQ5-QH$G(uYawuCnmPHk@@h@TF4g9_;n>1Xzexcl&puger2MowQv(*ru&Ex31A=qT- zOT0~YV0y2-A;5hU3m+Hx&7)Uq!~4>$7(PF~wRLQ0fIMPS+h>zmQ;Uz5`$&Ua2R`-d zc_c$ps#HkIy6M)9AIxA;tST9kN|Ujq{nvKcuZyaplwi6U0Od9_ijAyl8I!hpl74Gf z#5c=;b_7+~z*XzBRt{%t$Frn;kE!iGRg%>6DvGlN&)Q4<)R4{(0VyAKs>1eVtLVqyw?Nh1+m_UC7w4Km_&lyKiC0m_+Kj;!{X?i|&oad{!XEAbmgNpt`IF4sER zcewLxJ9k?=`E%B+-35t^3Ys<(Ng{jULVI4)c4me}n`c@r8(J;*7`5!@q$lm}?N7)v zQ5~eSU4>ntGocTvvw+?}Sprl%gbW`f@7HT(JIA|cS{M9sRYrE}RQLF{*hE zk+O9jtqUwKYH_p>IWysJYBJzbH?lf=$Q-YTeh?G>AS$WfrImqhdd#WDRU2menp{h; zfM2_%=cm%<58e6o{y~CByYOPZZtUUY{DJNHifwOp{2eX)X@&${HTTQT{j(s)?~hMU zJ=?Z%=s>g7lRWe1U!Ts_4AgWHbA7hQ^t81*Jx$kY+7+J0YpB(;9sc73-k1UZiC%+u z7f3NYz4|M6JVvWFXLZargeqc4k5`VZijBP^U5*ReGVu->b>kQ-=mnI9m4zw23`0!J zg3RsJs6;v4M;)o{K~aFZQM87IZ3dCOufEs6d3uhjD;ri}F7li`NwHHdyATHjtC zFi{P8nr7zMb5l(o)zE+}dvcr8WH3u*db7!ieKl%0u7gl#^c|@(6h&a& zNOJRAK!2pxWy0M`B{BsfBwlE~%HY6K;CiH)Sr>nR21&0OI!t`jpN>Tr5hjXo=eWI>{6C)e>qVAhXBO~^_jwgDj(FL> z67Z!*yA6h<-bF=tHBK==$X(brxNYlZaS4ndD29nPU-%W7*=i7|1siv5o!Pppzjyxt zr+qZPK3P9Ekv@c`Gpn=YO=i8>iVzr@JNifaf126WDs&>5$&~(x*x%CX%-VUi*mtX8 zYjdm8y6vK?=1M1qu`Qvass=a6Lr80w88DOtB`Yyh)#L6l5n9kCQsMd91Wwe&J0Fn> z?5x;lusRz5oxQXH-9R!1+n1#8UN^5PH68s&($*Ojg{d6UrstO+gre%SNrq*UrzTS& zEHzZtWA8B#IvT*YRl6B7UM`fTXyQp4G!nmr(jHhLreLhnQ)pm;of-cO@jm22LM>lV zuhR*umM<%&2$&+JARK`&F5PJo&IFL@Au_Mp}aw@285{5&?t=N)UaU^6+@*G z2;iBaPLb4bt~ZJd$nomeSv*%IR4*QLk=bO+3u_$AqoHdtWqp+CXQfp)5_bz;z8cY{ z2#VyjJVAqCLJhS%xtqdXCiN=%lB-bD=uclK>0686cLgXWH|ZVnT8hvk;Bj-yNuqMP zXt8hdUwfSLtmsmT_(f=qB22r%!c0$$Q}XuzC1fB`LOPMkqhK*SDyax?TrJUbbr+SK z$~Z;y(Sa?RT6s{J zh>mCcU>rYs04W=fQmpM8&EA zWCko!)|CM-4u2RJR&IdYW)w%cC@2rQ zQNg2-6+9M8$s<#g_7dLxOG0gR72Y4sZY0nIV(|+9D?j+{<9NIpn57YCh|QUOI^%S4 z<=T$|03x6tJxIidGcHS@aaVCyZtE^LKFm!A|M;a0?NBEynpXt9uv-%}?h|U6uvK5eF0xS}ujEt9 z1&u17VrNh{Eq znO-zsFTs`2^NUb4S|N(7YUD{8^z!YZ!2$$5E5J$Cxhq;5xT)-aP)lLQb#dmV5NYBS z{>9t!@&%Q6fM5F0DQtJ-nyDg+fT@`dSrScuojOCAn>GjWWK!9GcJVb@lzwJ;Q@j~h zOw5hOI4}{qDo&6A$mB3^RAmW5K`Dt8;EIG$JvM4RP&da}p^Id2Xjqz}46efScaMiP zcBTC<%bS@E*!OkSSZvFSTS|8)isYpttH9Y)Ru;zw7(?nZk+_4YssB-kbtN1!3SNdG zeNFwtziAXz*V2{Baw0v8hD?#cXUsnap){Tn5}2gC1vzyyKs$FW#GaRJ`|9v=+Wc*u zHJy(W!SRqG!)|Z|Qj{SwRFxQNGip<-2UV;fCasC)e8aKGCj*^Swo<_ts{>t%P%=BpCmcq2f)iqDDLU=1{Zai?P%WtRWjfzf7!ub=R zi6>V%Yl@&HGmyCC`1f%dZSfRXD{w-EnPaHVam#p-HKoYpnYj4Fu-GdgcH3A4SR|2& zsFO^su)2e7rBs64c1>2l2M9{GJ*7zPwTHT9nY0r=(GSXc_U)pE53Ku5#dnW%=?Y`N zs3z?Y-8wkQI`1Xs3#@ZPsq%WZv@Sq5AP<+N;B`c~g0*NFrjv_7+1_mpD!H{H-M<{P ziUzi{R=-icTnr^>h!WW%?lNp84}+%snD*m%PcJW7r0HCGXqGp$rTu7X|6*Yw@XD{z z-1x}v7k%ssHe{FKopQ<{rJlCF% z_anUE=v5t#z?woh3=jv>mk!GWy19uiQ>;4(@iP*Eo2ukQKGLTvjid5vbiLe*7DUot znVH2XzN&>SuhWmo!{sS>Jy9-aFJ6u96ksrA5jEo9FqCftXS?6S1Ak0MO~>QJb@AY1 z%1t1KO!-_5E*N|nzSOE^xQX7auq_mLif3=!3ZOKBVAU-xHB@ubNg+3qME5ndRKxr+ zyst6X_gsZPhWlRQ^))XhE%#l}t8xYgx*Fda|DSDxIrTkd zxtEpZH%RiPmDZuQRc?(uZ-*|2!TB(8l;6{j?2QU7tMNZxNf{|VBQP31+@1H6u=d^7TEN3Ai*cv&gD_LWHMz><@!awfu81w z%$jcMK%`4?DH!+OMFQUefoqY!5Fu{X7>ULy%CBfDH%%%T4R{iV%aCmN@twhX7P&sB z_4CrzsGv5NL;yO{gT`&8bUOK~KqI@ZyW#!9CC-R?$ z*F50^7+iP}URJBEB(jo=%QXU+DiJ*Et3rGo6MHSS!p>q@1{w$GfEAnNx-Nr3*S%Su zsjI=9%(amDI!TsQj)lwRFtm=$&$aBV#cJ^Yz(VED!)z8dg{yG}|d z)!x|t!RYl_HA&;*;{br18JsgDP`8*(VneazhZ9t%&eSWFnFe*CDETH6eB93#4%M4r z;}7euP~7e4t}LVjqQZRFSsyFxH3G{6OHqJW{F_&CY8mjl?+HR@8=V2?n+Gi2INiB8 zD6X0xe!hbPW+Z)bb(hho=<1P~%sp~>Z+hZ|J$fM%Dg<8ExypPgeC`u5b8Fn3oJnP$ zmza%gJjGCrP3Jeq?8TOnvLkWiXK}Hc=sa7aFSznU+s1Ah;Ppr+*thgDy1mU|my$Pq z|EvkZv<=I(hTU*jZr!DKxh-U_S(-E1Z4SMe3Me1q^ln)`hd0gp`Tp%*iib ze>n-CeDV6lq~PsovzeDEpA-%Sb&~peQ>u8K^P2UVXdnP{@i4&3UpXg^Z}Q&VggVjB zJfPQsMJX5KOs&22?fCYQjqSGtlh{cfpxk6*U?z)EF2bd^R6fz@#}UCZ|NihG@%=yhbQ~|6 zeGIHS1q1{IQLR}}#Y{)apTbkDV_CS-()=s_^pe`TQ&&wCMX~N*bgY@ID$;(Eni)VD z`&YE}7xWOT{R_nvMaLqhbQzP?3ZQFEJlxID1_R=KC}X~Qe{aNF`;=Pxrx<66@Tb^{ zF+3n>#h{n<56Uf;t=g@29hKHBMZn}}j6O_?Kq5!rats=tEldTJv-k7il0zC1bQKF&5dJV~?ebmgg%nGaoj#Aa zhp$wC2DP9`!P_y8qM`J-m{)M7qzsN0KO$EO8M&;A6HSmhbme4nr2t!39w^T7J}~Wk z(0men^yVCeX{@vhL7xfn0p*iWihMq}Yeb-KHk;Kg6L-bMu%rEp#713~L8;WI(NV85 zHUS4?q8`1Kqva#&(j#xGI87#WR*K~aEC{;$fWPtJ;^OLKHggRn{ z#~nk&ei{L)`HZ{T5X%%Whzwl?QbqMf)?h0{h)m26k)Z0&IIE4ZOg@c7*Ht1l_@)mt z*x}7~1WkY5A;V3#OX560U#}U;o%_2XvfR|g6s4=`#8L7XS4_kU zhW|u#F81}jRpp(9xJP3F0Kf+3-%Ni!%emRk-JJ=HP}Vu-o{EC%f<5P%vo+NX)q}pq zhDIpWgGcI*<)=CEAn{t%(ds?#+ktEAA3~FB&tI6l@NLuX;opW1xAOwZCxb`SEqA2Z zp>@A`AnhoC{Tj4SQqSVonMji@Z(7hK6ThyGrL9z|m`pZ_#9%X3Xuw%b`!}~@BSTAv zhV+)nb{Z<<+bvnPrsh`9ubw<=CIeTN3Lpoeo+f<^r=UG*e?T5{Vx6D`l(YDm zHctN2v+9_vm{eEq*tB%F0zPp&%a`ef%zwHy%Us^u*iild%h37_O=adu1J#FfR~ViQ zC0JZ7#gInus&gHGT>Iozci#E>$lzyj% z`IcL2`qInJW_Z$kzdDz7WS4zpE2e?3!H|DOk@%z&`mr&Y!6hQnL|B<}g&d?#1M`k* z!eNNz>jasMq>vAQHQQ&5aI_SSLd%RWBGCYI289*`f(X`rnVkF>0(sN_<9>j^jPrz+ z;Y}YlwR@bNq4F*{x0=a8qb$uc3+TFZo`GfUbGM~02y45nCOl60ikG^DkO7Ak;I|}w zmSHM8dgLg9M^XfkrWf76pi@k6+fiBQ?P@W$+f7AQ1VxJ#W5VbujZyRXeM~WNXc}#+dZ>F(y)_#mZ+@JIt zru=bHG(nt&Lqge5^1j;b7N0>MP)M4m?1*VRQcH9aV`nT{nWUa*Yw(^nLiw_>L* zD=v-kJ^XG_UhyKaCS`a@ae&mO$ll{ru4|6oq_0t9k@lEsT`sT$G`%n#RdEWm?}g@# z=QQ-vJa&rwZfVBSVaRE7jymCW5b~q7)U@tpn}ecU?gV_AG>gBOW7McK;95UTrjw@^ z61=1*NE=b?gIKSKt7^460|Vc z)4Sk5vO+u}IvljHy=TcDw^=)NGsNu*zZve%4{{l`s5|rNw^RE3j`AP>3p3wN{hmL~ z{oar~!eJo)X2dHuj&wFXp8717izRA7EDeQIw?~c)OSl1KeKL%NU0Cq%5MLF4NrnjG z%@UKlXFp9&yZOs-?(i?Ds3h3k?x2$D(fS@bR`}{DpH;}9c{>MR4a)Ai+XY+>jr>Ww z*Q;ZER>3M?nKgZ{L3_!}iJOjC3yX8Mwb)g-vAU6s!C?^a^l}{i)Z!!SIlswap3(Y0 z?ax})Akn&P(Zeij-VTd(9vc+1!?K?C!>nkRO`7K+45BII(p9NtQzQnzeT zhsJ(I&JNd|*|+(YFj`ij)krG3m=<=Mn8jiUIQ;(qdR4zWYE{){i(5OqHku%lMjFB1-Q-QMnu;Rz($D6d-{gG$=xpukBA8EiYT@eQo~t~- z{Gsz-R!O7P7P&YD5j=V?Sf~fQ^UAbi6zStocgX6g)$aI2DE=`ZMoQ8rQTiDCO0_}U z+ALN>l7aQVveP6Qoe6sGJY`)<;uvwW3$yDO>t@MlZVp*ap1sO`2gQ}t ztG&J-+D0;*pk5_1E27oW=F(GH`G>0xf z)6iv13cMYwEzwqwLrvb_9nl3%9D^=fm6g9?yCfrfx4}7Gbn2^e>l)?IDpj#XBEY|I z`Js&Tx-Vx#dFZY!q17vnZ=5%D0Acnw6^A4l1-VwiSCI0!$f#%WxIDj7Qw|CjY*e|$ z2tQX-j!|#M#px2`n34T}T~*xFWfswx0Vndm!QcZBBaf5GmNs(J{6hEUk?@A`^mxU_ zkw)L;saCd}E75RcKxF1xXxEwP=BBPf`sH%{!~EHjV$Y5PMyF%WkUL!zuV#eGs!a-v zJ*BH6=i!v5PA99huTgJbsVTE5*l#!adelsgtBc`O4kiCWte-4Npz&mA1YD3NmU$*- zxh?N`?NM6DZ!D@k?kpg3aeUmp*%BKKDRZrs2P8d0-D|JdRnyb zHXuecn)GpqD`d*xW8jSG2r{1?mz;MaKA{G>Bx8-+4B+{@&6({_wyhnOyLQnoQ42q@{qFut31>Io&KtqPc)~_^ zJF1%T+a_U=VIxMD#iH`e$6w$TScWFO2c>1yMb)7jujBxc3A=fCB?71|Reqyo0o&c>Nb70ivtW*5-bZicu*gJ{Mm z9KSl%aF|RPN7BBioj!gumJ?qeP4TnhrWU3mSxGGy^S;4gr-El^6(!VSC^;L)uBHFy zJXo?nRHomNUNgovVvVTJ^i(*hr7vlp097?d(QG}Po50dq#m#C z%IB;15bTz^dAwaI_d{IV?khTk>QC#V0*h}l;M_5Y&NZa6zecia%xfq!ve zwkB7fKkyRR>V&TgD#`{H6}$&E{~GD_TYtL2ZWo+~(kl=X)=HgBs@G}P#bSb3d&a$K z9@e!kfOK?2MZZ@sW^R&7ClIQ2+N}pj0=<6qrx>!J&#z=xeOQv#S~t9*GgTY%+sz{M zM*o%((WG3&<;f*{ky0a7-jPS7P_r*xw&c&|JXm+wg zr%h?(<|(rqH}e!pLvc{5=c<$T#1Ti!JuOcrgwHif-;)Z(Jqerc^%_!Jjb|8$H+(Vl zu3Q2|qhswYX+9j@*$J}2ri4-%M^m$VAz$|^7skJ(FP@h(SYCl#R@TKb_io#LaH{Y8 z=9u?bQODEN?}SlI$#RZVQMs;4A|(^W0yFU=1; zb9daTHPk)+9CUawA7}ea_WAgPtn{C1Hxd1`V=?uNi66ryeK;xwg(8x#HljDkb)9)zPK!j!$&56S;~?EC)mqaX`r6O zQdW9w(C=l1D(>-L*R9VNHZQtZs|F!nH^%EppJ_h#L;W}Pn{VvuUUcQ=X{Zti@{jLb znzh6ew?U+0C%#$!?q_--*h=MM_VW97X71E#u73@0BWQLX@g#9@5m35Q?$+yD1Prde zzB(b8-IRVJi_C;IV<)%R_{rwwQ3~;cyEculI6ZKB3GM1{YS_`^U-3!W$PVU)x;l|Y zVGg3$0yI*=;D}Zs7HFl$Q6!NxR^|#XLF+Bb$=l=KjzORq>CaGeGL`rOG%@~g95oIj zF9tyg3;I|WmvLkqLO~JwL!7N%tDmx;mS8#iO-H#Mb|VCm;9++Ub92 z;*UK9b2d9&bA{ieYn$t_3R90z-lSFwP5>rFJ$4{ncg;xEQJy|4c=D5$MB$i{x`m2L zNKJPJ%ymrl-)mBg-;cZcGVuLq-trlZdVPm zF)1ZwDK>bloZOXi*4D`mq?CM^92?%PpvscU|DyY-edgbRg%E_IGZq>w{6Z`4*;euB+tdO4Dt5x*3Uj zk!|Sf@1xDVky0p-H)}FZu3F#wSBw6{_rSgV2GeWHqOq>aw#&y0j!SLQ<%gQnAjvFg z8HJrMmhmd7aeoTefmm*N>w7DI+6?uLs->~8Pt-!;U|fN&(xp$ zEld^@%}?*l>qX%**SOTsV^MHA7V7C&F)ot9otwGThbUl* zsfAvuw4kxt%_UUEU{eG0V)rP>Ol;<(H&`2s08eFXt%gggITcx4_KLj0B3ndRzhgG+ zan)>uL|KG3kAYOzs`N17p&8!1_=5lZ^O%{rKPwuE*@ErP*goN(n9At+{MBJBtVmU? zuwv#rfVH*0?_8=0hKcAci1WjCB>#?c~1p(e1 z_nwLEvj5vE(*@{fgbNL>g3KsZBaSYRhyeaqe#Yl^V4|a{s`4ZegZ_syb3{jBA?A3z z#Th!NT2Bx!Tx;Yp;Jli3!62@GVwbMqs`Bb6GHokQ)~Gj3iD_+X%OrH70QbIu$uC;t z8uVs_RaC9gtz-Gp`IbSjpGz=jq>u6q`PnA+zamAbsMyeWn5g(aFMF}OVc2wim(p}o zyl>B-ROPr&>s9WWqLktpa2ynR^+$JD&X2eJJeItIEZTY8HXLVj;6RY8VDN<{pC7OJ z^3(o;b~FM@PrpRQ+nbY%s}IMADH$VeNZ4>1E*PvWdL!fc2c9~L^lYZ5nQ4>tro155 z7kiROOaTs=_6t{bYYV!>iKTMd@r2_F8i^#3(`VymR~m`& z(#HNEL5G@CmX8%KWGy(ArIv!cOkqF7{b5o947Nmh!R~0|AU<=pYhG?o%_EnJN%D))kOB)>fhzz3&%o^2Mewtr*e4{n zK82X0Rvgb6Rr-8XT<-=)dM-y~b2; zDP0qQbd75s>&ITOUqE&RsQs*feErTj;0R!D`4o{~K^EU&D3WRAWCg(g<%l`SP$#M4 z^BZ(QLp2OJ2TPOZ5CjS}lPO^VU!h`_6#_y2&tG42iXv+=XHBEKc!R`6KtcX%udmVk z5vILeY+FZ_N^C5#($RO zbrr!M%Ti)am39bz$u@G{MH1-jR=gJ820pU#*#h;oKNR3D7uS#QQvpjd91kW7||XmqKF zOqK?urG%7N`^@~zcuG%`+H3`aMzq}v`QOv>Iz{bvjcd`_;|WbXL4#h)sjucM-4yme zs7alqp+k^P*dx<$c`_}7A=U7B5)G65!OG~;Lh;1O7G)SFx71!syp$c>jdg%tI;9c1lDO$kdtT^MeL=^k{$|f2n#nNz$qsTUV(;$A3KPU%+fG468 z-6q?M`?~1NLxG zC0d7{PWKws>3zL#iBA z(-YGd92c5eRO`^tHcCq=#Pcc*;lPMzdWLqHt;B4~++g>$w&dnqx7+OK3G_wVMTJrk zid*`hT0$ZT3)VhKPBi1ifROq3M@X?2kz5Z>QUPuLfAO`_oSd-(hJpgeb&Tam3AO)z zL=@EtljL<$4k;%G&tlmIl5#jQMV&CQt_bb{f;Mt1rActk%vb&;KNoiZ-=rw~#LjoS z`gUa@clOm*hys_y$JP`j!NVo-sYsy~N(3iMe%2S@utFi8AQIqkWG;jy~K-tuzBvsuFJk(G*{UznlxwZ>uE+Cx06|EpMt zf%lP+lEl_ZS>FKPs;t1WEi4Mk!Dmfv!Cf72%U3a2u2zOk+MgW8tZT@NCou#_gt1Lp zFfapeeeKzHjJA8QY-n=G=atOw#q3yU8*3{=?>*jE>0q<+TAB7#fJM4*ttdpAI4$E? zQqR6t@QQW{ftAA%3OqGr>Cnz&yQ|apOque@u1F%S3ad(YyO-pARU9f|lh9~3 znMmMKkw^}O!k5l_mS_+EkMv#Hra!b415rofNbDVWv$-8FwsS~C9n1|AqZqt&A6liZ zMPt1gD44kV$0rBHQnq2S=TczjvGkWhA`&SiFz5mT66Hd4#-YnQo93#`d#1Ne=GISC zgS`IV7V{Y7*b*)UfUU(-WX@l_vRA3tn3<`vUZvUGvjIIkR)^AJFd%`=cHZ^E@h0=k zy}sxeRC7y6#+tinL|}Xs!GRRj@Kf0RLYtxr%`yGRl>&&h6_pj_6snV+q$!E!7t63!vy%x=N0+2qPsGdQkJhQlxd`;A+d!L8+q zkq8(+Rj4Z1IwNjf<=K6d);H)Kni$IV!sib}?Kn_BRPRN9bv(Nwm(9-WWaOx~Ktq{z z=St#fYzYdUrbOD$gL@WQi7VP^lt(9nh@2d@K;&tpXtwM>74r3+#C28E%} z?5d*0**|3`(Zi$y3JT4wK_*G5s8kW1&hMD_L}?GKCQ-@;{?O_TWG$H^v-jXLGmMsY zqa#T=Nf-Rgg7gNoR@aCYoB$#2`tu3J{6`{@ot6S)BRBg}ZX78ma5&Q0EF-WPk1x~U zC}uT*DWyY8q>JS*>r9!-K8r*MnRPfFiDc7HZ1!6y^evnH6BHi%@5`svVRY`lopsmbkPe;R z%G*D3iX9xT296E9ZGq~@L~t|~0XZIU-$jR!|MVVhcfbT;6P>`1p{k>@b;*c55hxXn zpJDz?r{y_wDC0VwzCiy}xUjVP= zler_4yrY@5d!$>q_EF{7X)YySkZ$$}C|q9rw)tp64o9PPaEKJkbc-iEye=WJH+;P> z3A+AkAn>ac=odYyYfxJ9u0rb56SO=g9_h&+Tm(fJbQiqYa4I z#;sy8kti17@uD0oF+P?QS4c%`yzE6aSphyT2c>y4g*0cpoF6u8k%B^NI1#H_y#ry} zOA8EvlA<>6rghVEg-hu-Zw>I@)IPm#ddNLWLWiUq*3BN=5EAQHP&0240KhiWJCWpf z5Qy!L5Y5wETYx3b7x)b8^TgO57yGB41ok_P^buweRh+DllxTtYvv~XKUbaPSaNlkjOk9WvdT)g-J|er6Smgi5vuEUdTyIWFt~p zNr{-$bYbKML(eWNv7GRSMLvQlJ}ed$H52siCOJR#)S*A0-`o`UDzP$c3i;)BM}^3) zIYh?pCYd0KL~^P8_`$GQdHq2BMzl#5eYS8k6EE;}OR@V_-T7 z2P|xK88Xlj-w50x5Fl42VVHPs!eJJ^J%;)V}iQ{$n=gAg>c zW5sWQVG$v_ZV#YuPp;UTI!*rZ_O{C7H&FO)+wpp)EU?H~Y*{(j%T835n8ECeS?ny5 z1=cf;yKPjSX63@-K0~=U^l-uLp9Z$O|7Z=TD^DO;UgoS6t|*k!%RYujl?}XDmCiEZ za<`znhW$}o>`6w3g06^>n3bA?f7uE zbwyNwHOkAbj;XRjM$XN;ZBJFszFNSmfMdJjmges)@d@=gvtQ#fkwXt0giZzh6nmg0aw z6`~h@e5Y2TfADVM%1>%fviADJvJ*MM45g9}<0lfH4OWTvf$l-ZY(};&J2)ho^o%gk zrH!earA5vX>&ij9X3Ul)W-$9w^?|2a)=awVNeD6|V0!t@8LUbL6 zqyJ0l*R=D$r9~m9klBHqHkB6rYwG!5Qg>#fz%8cMtX8Mjsdo~E=~_`W*EUe2PD3{x z%MfbFT|esIDZewc$!EXYx1TfgPXFS-n;ejV@dPiYGJa_?0x~d#{3A$7X+_}-HT~>n zhiXT@c#AO4P^({c-g#cX+EnWnj*1IZvzs0EpkilnB3k1s$jFVQoo22f(4`wZ$IwxsX=>W>TSsKTy*L^EvQmHalUsl6KC%honE)SJ9 zRb5fe>K)h+Ehg|c+}UtnOvF>d@(fQrI>TzY(klk-{P$q?i%(j+RC3O;W}TS|<_5yvu&4#+=XAXMeqMb)oc69?h5>BGq(rOr<8<{Xd#b z^59+mrro`r$k+HF1NwcMw+BnU+P!>m`1>9XK5SFbZQ+-45}pVo$1fq+L;5;iG`FzbEN8x~&o zpS}!m!Ho4X-8e%#UTCjAk0F1HBF=)dPz{Erl!2P|tjll^%i4ffD7nDB?GU;u=B z;qW@hkLY0LcNja7WTVqbb~}kK&t-H}x)^eL4v}OJ*3Tgx;bK&F{!<< z4$o+=7W5Z#5QR_0@Wpi;d!E@WPNA?lz!p2@`}~KOHRL9d+=&S_L}E?C+=LQ|Fj1+5 zOu#B|A7>IYc|>AfVnQ{ERGl!Gg%%AFBu*JwswY96NPZ(dxbiQIJJCm+$*K8zcx{;T zY*yOYM~@7q$B)iPY7Kz|rJ%soVOh_*eD=c%Q(Swyz^iI-faOGM!|Ak#5A~+Uk5kVE zhRFE78Ce?%pLGy?gmC1Cr=<+o%6!ZNAzqLt1*C7p@W7RDio0JeU~T|TNH#4!K!S_a6Cofexy^`ur z8qCUwjtYmvw^fIYL+cJ;EaS%DQZay2Gl&mx4TE^#$MMZNK%WPhL=8jz! zZ=o3xmwBl+lF|RLs`_SIbj|h0l>=$%0x{>?->*N3%oDTNJPG-q!j(FOL(wVsq4_2f zN1UThH6{p?aRfyUoRjG_N{MWpD7mSsc%eQy%!1%(WW!6^qQmw7iPr)_tOV>2TPwD` zE>D2+P!#5K_YFIeXrNH3hC-y+Ds6h`d)OrXVHwk_5k8)%%1aY5>fO8d2}&Z^M0kSrY+ltsQ`wj77E~5L}oMyy78PUmcpk=!Z&<=DSh+$*bUcC_zs4n zz>BA>mg($lAg8Sk$5dwKR8Ed{=K7PPVz%`!F0V8;0mm}l8&W0-<;3IF(>!lQ8edx?KqPrN9$Yi#KlWF zC3)?8ROwRIAzD&VOiXbS&6l@ieuJ@JQX<(%D3t{Kkbi(}nE%$Z-LmuV>C?zt#Vn2$KP8^|qIZ!c>!Z{E8FcYMwFI~JX z-lnC({tmrMZCmq*3?4J5`(S~d7yAE$42V>rbglz#PHI28GKb^f9EkH5> zWw*-AW$~uBb8!Q;K;Eat|E@YREMou@^g}=lG`tVA0tp%-k|n~iiIzLQE$@@Oc-Xw_ zV^{n^$CdNy{k9Uq?$aw&JAQ(IO9uG~oC`??ye}%uAzQ2gEpG>X2FgMPY$OEnqB87C zcG{gRqbxJa+6H(ykJ+1r>Q*o1Tzh(Lk^Y1(8>UF|0~N zXz>{H1@1AX%W3DXN`B%0$!u@=N46pywL-Os%T(e)?SpRFx*9++o2kGL-9@LUD{2`W z6S?3G4I2%Q{qVo(y96#3tnDBQcrTpo)M}s=pBv&oYB$xCt4Sc zT`6Wq#f2pDB$29c__`=|e46XqGgf&(kM7}RtV?B{{#HWAVdOe_)PskV6!%q%VSNvB zl`QLO@Es_4wUu?>Au5qCvdTPJMh=TZ3gf?4t-2?zn8G! zq34ti#M~(59(^=il9Rhjg;?>SXZN>1t0@Ty-4CH^N<;2u8OXU--d@^Wi{zXe&V_RS z5ZPyRazt5RAOr#gXNm6Lpk)8+xM|>ILD0I#;p&xi9U@3|;cv-`b+%#3AlhBR`!(+a zWxBF3axEuvHHta>>Gp6890ZQ>zDXK$3Swgg(b0xJWr*&+7#-N)zs_O{a;>;~4q0-I(09H5Q-c^V z{y#v96+SR>2~?AR8+ZTx;M23zG$ zFk(B9&rLY!~f*qoXhpIVTawjLf_>U!E*lawhR~?p%(IHDJ=l z;=ad^j&1l;w6$L5e;zxyiD83rNrrV80mtfA5t;EK$|c#QYsB_6aZCc-$fg~Q`H1b6 zXGBNwKm9?RyOq}>_8gdqJmZ2uwx~H%X-*Au-YiFbJFShGft|H;#S5Nj&W0DZj_L*( zV^ofr2+U@pSvd$Usa#PwCV8;CcJeXMCA*1Zf|(c}Jhwwfr7#f*WQ#h}S!ZfE^JX*Z zVa@Eq6H#?J#&&Qr22HfHrmXMVUWh_8-u%|}-a;Xg2xLYE^Rd@CBcPHV0$p)txeGe~ z(eJ~#vw8g#zxYk1%>Q(mkQUf;U?M6QnUUFrx|7P;hC8iWQj0EeofU(di2^WuT^K(% z_IClihmkqg(NQV>r)O?7uSM)RFcC=vG9xnsJGSOeT#54}R3{gr%ib6(6%D$Jg}xF8hYQ%s~*X zY`F;vk+cYXrW|X8!F=>~&Pb@F;l<$s2Uy%@<*|S0&%!xPULVCLKC`_Q2zkEhG9j&D z!-%uVU}; zt$1CIb>W954xWwTMW*W)oPNy?G(6&*kq7J;mglOFG$5xn$LBuhd1A-$`!xBgXl$;3 zEoepkhAa8&e`7OE+kx!MThSK{y(&Lid&S|&6g%A=xY6xj)H1tZ6jzpS%!b@*7Jmk` z>u|9x1Yq4R=NMM&eD#=15PL(U5k}R|a znzhp;dX`oMvU4sL9VZ;yG{_Bdlu?FVIG{16GM!Mcn`ex%PvMZvZK7AZYbRfn`#lAJ;~cpKS_+wwKqXmFduO%R(Eet2bueS1*BQ(w+Sz1Ne6sa_ z1^ttbOfZVd*^0bDCJ+}@|0=~Apf?vyoihsx@gWsAI%{$dwEnu^m2*9Ly%BGDMPQONUEmkDVN8@7xN>WXst}#DV7a8`Sny;;j^&QV-Y7i}j?5eswbGE$JV#Ah^;IK}WZG)2-nCP{H zg}Fe^U-$*HHQKcF=4dI7>lt;}ImC)Z<_q}S#{vVoUt=zcdgVb!OLkQ~fOCU+ zt;L2dBY|Dlt1~W*ELJMApp8>$V+|YMtWjM%%^VXwODm#xjJ#13%{k%NrZLa9EeH zGy<_wkp|J5i-(=F4vNFts~F#pmroa@Z%jd;sD3VFWjG9j&D!1gYD7C25?CHE95#!hSVbi&*nu<_4KSd`+!| zR*E%1Z!Wx@vjK|3y7XG}JA0CBfFkb=&bQF7`UA|9<+))#Xwa8<ZT0R>vY8pFA zh&CL4K+Z>iPX)_>pMmK=iLuC`qOpvoQwx?Kg%x3`7*-qLRW)wxkF z)!n6iS}Cs#nzg*yx7%da9c$CnjS;+qK$*tV zvJa>i>QQyA>!p7Jppo!>^D&q)t{XK2zY=+7_nq`-cqf~j`#savkSck8qx z9j>Tbv!xF5IX*vKFL8%uKIbzII=YD6RyON`gu#i1`;9cvWIcB}{_h8I?eL-HqO!Ah zeI?!-#|0k_Yz}+frfSL)MnWQXpAeuGtmnYJ|uXsg0+Ec`M6 z&7%VE)9>GWzBK?n)!FRb0&sp3sNJdY6K-r|PTBka)0(yaH+t6eNt!(cW*4foX|nMb z5_E3FT(BcptOW@^3}L)>UZ(+M-3M%DLqdx1L}>h&2SDo|0Gg|}e$1x*7Xas{jENQ` zSt>jz-=-&LprzsG`=H-ul5<8#x?A+?ln zRjRa&I{NKR+P5ijhh|d+s6XqL!0loOw%amC%w{$u)DeH@J3v(cJzag?`#Q)@xnbdN z>5DJ^s~S}x^p3?A5~-z3u4s>xL0?zFdVZ>1Ab}K?kUE9nR_cJ+Ep}B|0Lk`(C1sHA z52J+b6*1cjZzpo!N9_h6Zy!)9x>R4x4VnhI_N`)i6J)0*Tr_<0#754=dpwut@qAw3 z6}}j}mjPZOeiPBK?4prY%Xt;A#%6yB%+0TX^F7p|mWQE^zlx-N@YiVKZzE}M2VS2x zz#F}$S7WmyfzhpaGEH_o1ygu>bE>O61JiicQ)cM>jjaLhs(IIeY50~6bWf9?a_DrL zpGwb+w)56v{vCA(fDURcrmo?Cf%C%~;S>i@9gsP0UIGOXOa- z=Doc(d*_Ra=8Hz$Sd_Lr{7&dHU=Eug*Z~88AY|~^MeaMH^ROU34{V@=E)YEsHet}m z17u(bhOlrLV}dC>W++f1AR_rEXRGt}HMG#&yN%LSyfWW}&}pFJ*i>k<6gl?6BY#R- zqC;mo1}8Yh8P0LxU*1jg-EVd^+p~@g&{$^$?dg2Geg0oo$T3wFcEB&K6qoMKsoHh& zWA<(><-}T1siAJ_|E)~Z{4+?>N7B3KPdzUyUj9>>KO9pReZ=J|b>;NuyJx#S|K0)N zagRzp4xl=N|KvM0BfQS8k~gdW|KUY09eUp_yGv>zE#1q+Z1(ue|NhmRI)ty7udA&# z{*t13K>xy4aIX*E_wO|v_>w|B`ymxyz=3yykGU55VP~K({t*vs&f&f*fZl@nDm>5p z*{jdP0AVkG>$Ub$0Gyowo&u0(PW4$RSkwi6#A@ILm*`1Zp*5s|pwdUjk&UKmTi%aU7VIoLMgfswYILt+4s(=3;Jf6Q(|0K;V9E~m zVP@QSlG+B=xF-yv``}o7i5#W8GvQ zdslR*Cm&PqWJb}VFnf-fStvY_LhjC_pa$JuX?bc$t|=G8RJOyiUB((hK&O@gwR($+ zCGMP;tq)?KD;*6fas?di%WI+Dk$Q~Mdx%Dka3Rt_9O4kq#dB3jHChCIn0qS7n4GOJywE;QG4(k!3N0@9uoESqzW%V`2K-4w{NGKKGJ1JY+18a zC=pAmV7*D(=vXu>=pxf6*BfH018JpaE=D+iRtk%G9scl;vAcTR%3~UXspfd@DrB=( zRcH+nBVwcimRn2PI)-MgB0PN$>_yBoNkZ*wpVK zr3&K<=3nfB!TKS+V?hac=p$Vy)`w_{&A+!l%e?S;G4n@^aCg+M*AUF#^>N+Kvb0<9 zaqbL5A_g=iXZG!tHHKXCDbL>;l@>Ng0L;GLB#^5+@%Hs?9)2Y9ie4q=s1E!`((Q>; zGzfH$srDIPETU)j9qi{I0O=8dIYg<}-GH2paTUT&WNIYhNUo2(74&@TN)t`&jaFp9 zb38B9XvWX;NaR;r0V^?kM0=ULtsTXHN4juq8ta!>RK zQip`}b^fFB9j{t4Ez0frkkYc1!iEshs(W5qUyOt}$r4)_Gzb_A_l6}c51E0_&SAYGZ#e^cQTKouhj|K2^~J9>sQ zl8NduGAf{E(>BarOSTWtDoHhhU5h@p+*f9v1~#pn0XDFKO)EtXdx<`?1X%^E zH1@(93=z+)PQ@}4UGDsQfS;x7$;&u9!(?7j2j7cSl2z{gwF-(UC)y}HqY?$gdW@d~ z1kjvK+h|tTlO=#bd#MrZT6_m=i4K6k{-B_<_1_f~d*?wO4!o2l53c}v|D2lFH<=Th z5V{pAV=rAcctjpJJS7sl6X1h(ANpTYP#kQt9OF#aD=-1W%>tl(@T+BtQ6M*Q-{a7& z@GxrSR2!@Fz|Y{$3gshF!3^w~e2wl^%)uk$A)J#cbee@ybaHD}cs??<4J>1yDbRCj zPxZWv7!-Fz)SEv!7tTJ{@Ba>`!O?SKBG&NK>gemzi>>nmAB0ZC{56}beUWBh{;Bh7 zb22R=35B+tUMIejPSC!e-7Xx7K8)h0iqW%Fl(7f`=bB(#2CyQGT>QSI8AVNDc1M2Z zN%rh&3%L}!GOAp4X=)I1axpkjC{?H$Vh6}9t=4Q&p@e&+wf;>}yCs?8TjWxyJ5p!Qf

        <(a?CQuB=SbU zxtRpGPKfS=#@BHeiI5EXR7r0iFNs?Aj8_k|$paIrFm-u$MH2y#2g>nLT@lk=eaQ8UlVk%s~v zyA#PXx7pmzpn1AxrDx`I8fT0E1mppcM)^}U&pf%3yFWBLkXoE~L2W6#AJ^G70U9?3Gr5tIL1 zVflmS0uSqiT_}eYl_gJJt?Vbm(E)J{HWT!Ug@XN)f)9lluM|xqHUrJ&zSBHx$!Wqf z{z%%S-kk|9F{qz#HT`PupoZ#cbeTofC5Q=~X9G^WM2*r)cSp1oa5ou77hjq%p&22H zJPYH|;F}@LBqo%Ek$gf!zQleyHaL*mqF-&z(I|sE=lBk{{4O^`-0`*U6cHVn4gx@J z{BEvwcb7%qnYQlK5uG9KsLjffv}l@?b`|%exJP`~*t#36^1UmJBs9-hDn}owSNJ=j zpR8IZ_zPnM`QH**y{Zr_fz%=9di`L(NAwYTa6n;Vmv*yjE@~FGD6a|xwFo2V)m}L> z`n!U&{)b?{L%LYBl>IsbkDLf;brJME`kxeP=aXNxa{lBK7wa97xiL>&dUqnxI>IDyzLLrwJF35^jy0&}rJqmE=)HGeVvQvnlE3_5NH%0=9&GW>Bwh}~~?^z6T zVL${6(sLEpqCLWcwwf*sX9_yZ5Z*)-OJE%5eU>vRfW-wcA0Sx*=jB))Ar~UfHx`3j zD-67piLGD&JPbet9C*Y44><6Eg9roQ0S6KA7I399%GH4$X0Jc4!FZgE7Nr+jsIMt=O4Aa;+{@ zsH}zYTmTek{1cVnJ0p+q1LZqQ+3E^Bb|=3#h~qk%-jqJtm`@AOmlgi$nUIIfE#v_Y z_!$?^E$qyf0?ZEO7xF3L^vWgRgi|e^M+ux5zA(RH44|Z`n#a3EbKtlv`Hmaktwjg$ z<&ix1C*s^7kHiRX5Fx(Pu1>x@VqWdG*-5SWe(uj>Y-YI?bmv{haS6zqn6q*avx&3% zm06rAVb5nzw@7R-4B~Xm0k_M@g^GO`a*o5rJ&y-==1(YsGBz;amA>wE*Z=PO_mcTp zsr~9Deaa3hA3p)JXffoDwN>IP40`*>t#Lm3mvh7f*LLPrw-jLqBfnH3H`{W?d!EO<2@PS-UX(< zt9PvtBKqb|R6s2MTk}E(KrpBiM%wk`osBbSd?(S#S!r!ytJ+@xzzdn$ZR{DUb{B7Uncyv|*i zm#;-J%ej*Q`|NqI(Mc8lL|&g!rSrl{J}6D4W@tmiI`{5>&if$n5oA0nx#BZ{x!p54 z&FS>PG^J>cbR9T((j5Bb`=Z$8+!G`Hb^e>Di3-?m9j)F0Gj$KWHIZb5sgq%wy0v+K z(O=xotF>dUl_ZqNEOwYWDGI3>vd^%Y0B3)?f6mfG31VZ(Vz*lk%*MYhs^uIa0fUEm zM;EWZG}+jL00suD<<#}sU;S!g%DXb{z)%W8RKF4C@c8@4k<(|mOe?gWi@~rSbQC=N zo>P?>TP_X%FwZuFa-L*$Jz>}M)r>`PXXg|92-rW%%D=|T(09(F(e1gZibN6%!?lyb z_)bIOmYp!{!Sq!&XW)9P>9G%0Eq27!(b;y_(1p%im~y$nggp^UJIFyFW% zmQHGR0|(rwV8BH|?b%+OMPxYuVXoXe3`k64#KH2~HH824jsdm788+^Wd&v`(r)0a7 zj>JGD+TG2qZp>>1xIk))0DFr32WBRBy&>yzIN&a~i&ig|) zCR!|K!PNE_uWH{z;f>-k-!+(?K?==sDW+zL%y2u1NVs|3u5toDLQc>O@&z0sgpl_k z9=LE3h_j?&0EEfHGv4dj+a@$uU8Qg3Lz*#CP!@vLwHJR<3R1c)0RDlWY%?fVcfky9}?4Bp{&%NKTO4 zaOVI@U35-OHxAezG5y+14z;tPFe9nEHsntaYO%u&3jl%N5g&TxvfVC5#6kOIJSAZe z8r_O~nLa2&Sc_$k2!4UbA(gZlxQH1;+gsjoy9jm>xF;#rXjQRQ>2^R63`IPP_;_T> zwL7eMDo-^~Tv#zvUX)x7(E6o@%RLYigVo#G_}NmXoqQI+rlkWOB@2+&wM2oEduf=f zz>JDeq$n)h1@FTTTzurDAM|mB4T3Fn<8iM|$kDy@n43}u&rX(hy|`+bQsZtkNHkdc zgpDNg^iMQr@T(o%fH*p8L1<%eKr4Rv5=7eNMN+oB99|+gl3#BJ!D#vn0m40dPTPqVt z%!TVVLY0~L1cBP{H0`oSG&Y>nY`=@B*#@K*!h<9Gc$+6?A0~4I=bavA1lcris*5v0=rTvBF#t_+BhgoDLvaCsUwjMNYw)8lE|?0T+pH-NwJmn=iCmoZli1P`5ZNB40dErzi7TaFcvoX#nI4(3r$ow$ zc@!CJ$+LeSL1mgty6nS@mR2(yLM$@H-olgs*~XychU4I%jINri~u^ho@9>c0BiVyZ$)ig6&vp(vx3M*t&E98ky_JS$TthYLJ>ym$7%U1_B7nV-6?tG7tta_~z3ztk{>=`&oS<@i$`)Pt&i z_%vJcoXMwCzrk?MKRoNpTQgO>|6-9`*?A2-{eH)9uD(8Ap049phHNHzqQ{f@W&Ku> z>qywT^k1v^O>0bKrih#^iIyT!=iXCwuAG$tTyQ=%5sS0@ynW%|wqm$i%R-%dPQ51) zpQ%WSP;e#AqhV`?A4xbhqg5X*Eh@zT14uua6!OXlb*%FEj2QJZau(D_$?f7au&EoF z;Zp@3IbG-Txh^$wA|j(}bQxPt+*C+t*M*FIyIM1Vjqpwy_nep`eMbB^sU?u7#hp>* zPVJBgq^HomJu-5fZ@`s7YNP)eYUe%DiA)Tq3ihOX*|@}UEf67le^DnBafv3i2qwF) zwNlD6CLgEEUM55mCw;p>?H1YT4IUqRf8^sJV=A}x; z)=;_#TJ{kQA7P1_4k@M6n7iFpJf<}eW&-K&@ck6lU|9g7%{BL)<0MHUGTxU`q|cSm z(j-RM%A^Q>ONcFtRK}Xmu z18OP}7VZ3&qwXBK!w_YdhVFz=Y1sDXy_RWUow+a+w8>z z@i?hSL>L@1%+ljPrf~^h|eW25bS0PiRfQQNRklRy} zr7CnceoO~T>J?fj992Z&`ib`0sctF4!!a;s9E~H0*4&+#LZrcjZnL-P)ectMPH(Lr zNYmF4c1@7!P(&uNT%?2k;-AOPE?*s>tWFz(E3mEHRKj5sk(x)+ zP1qW5<^VH`k;=uJs#T;K#53;yJ7OZ?R=(~cHmUhIj$r?_D=Vedio{AhVRqA$bVc8MPb?GU0p}ya9z=GwQ?LNx$rv(BXwdMX4JFgXj|L)HLCPTL>JKZ?ZaZuP+EL{8E5( z8iOtAKYa`;_H=q_RxhYPU3+h!rIM=m@q@>}A6Vp)?*rhyS$v^;Uz%+=tmC(qdmIRW zED7Vbf!9x2B%YkuXAat_Fw(+Hv@#?9nQB_!ii4_f@UL%t@kwy;`T6gk@7L#X=xlq+ zGY|pWdApBm^zD*HnvD0!xz2opD_R<$gigbsS>zmZD&__Wt;mh6hnIMso)Y(l7Y*MM z{sh7C0nf-`xZ0_B9ymw|W_MOukc3!ObUZVwSTzzS1WPD#>-WZxm)rjT*#O`Uzq4oQr|c z74q-27OnVPnfsN2(kTuQ6IBiPK&NRSqBT+K&#UgywjZZQoG+7?;|1$o{h(G9THj-K9_?q=ow3uB4nPB?9K?LU! zHRMEqj!=4OI8~l2r}LVcsjgLU|BAs>4;_r29QNi1xDzmnriE%y<~DzhGFz_d)+g@a z`&zd_a+g0+UDkQZd>rNFYG3r%-|cU%QnWo;zXv$J{17y)FvP1&e+SpY@5brHXR3S) zoVTJoJCs|$leU+7Rw=pRd0hg02svjHz)uK<+d3-n?o??;~a`x3Nh+q4Nzu|3`2p z%^>)04f;~~`xRCE>^X?E!`&!bA~htKfUtV~W;hbTpg>U68qnAqjN|Q}%qnhvBMBya z8VXvQhHB?98s}T2CQrs({U5JgLWW!Np3qXhIJb*hD%1k@d%T8z*&|@EcaP(lK)BJs zjDrP$1%wO%v_VD<7-CF+4`&h%Fh^h5!sUE?cB4BOuJ%5mhbzD_cfVHaIBbrWf@8*s zq-J7i4R^xrYQnXm2e6#RRf~bNk2rit|b%?x@Jm=;{4GBx%t1&c^4;=N&*GgN{VLH{df4-j=tCb~Mrk zO({c~M*cDe6JM#94T{|~+Dl0pgQ;3G6r0_B!ix6V`+?4eMZ2H?RY0o0t5<$pA+<1r zN=DM3_4J!e1HqrG(a4Xd(RYSaz#3dBbUm1sH7kt-f3IGPnV4dkrC-Z>tsD;eqKpNN zHq&&20q-&+vbZRabW?HMragKnw=eBhJ0M|{0d+ePhcjFB8hTP@?`cXpEOE~rZ$;MVnB}2 zct2PV<8@tHsHzA(y!WkPX3D72a8KKJygGUs27;s4r?2n3zI>FFw?_O@fXmP4C${SPYzd;;AU{(1P$o{fx#p-%9Z#M= z(+E%8x7hbSPD^!N(pyF;p6s{8&vQzm<~-v4lop%CcoQkkfwnge?<5N3;Qe&3-{T{& zet-Xo|BwIvOxCogG8f7k@8#2KX)#C-qkM_bG6@HyVeme4R)1j^)LDolD1w3JBgu{4Yja zgsmiupVl)Vh7>su4G4(2;XQw3Z7jXmFU3gMEQpWCrD0Wasvi4hQVYdLQZud$hwqYh zA&hZ)5YyDzrKum`NHM_?gXKhfGTb*SGZoOnS(&Psd)-*!X?UCt)ydb5IWHC$tqB&l z%j@G!54tBUjXT7>K0AHPxiBNYd7`$D8bF$jZ0E|IofYP??l^dBhC~c}qKEJICKI}z z37FgCPGz!)9TnnRkmp^taOCHLf{;h&SJ)3bH_zD8En9tDLn}^hQ#$Q58}r20C^G}` z%F#}=ZTP%`I({%}z@TB|G|;GX<8UUDK6Ilai7ec=@eYAzP%VV4e&?-&gy1!ef(Clu zRqK4MIJ_&3Qm4s8a7e8b$@wvRAv98C!SYDLghXM^%6yxKy7p;WD4;UKiz(6>7}6{$ zCDD^y8;W?BCJI_v;egl^wBjw-(<``bjV}t2vuF^B3q{BelyZH`X$=`k|CfO}dg>pa zGbMnXZJT%8@s-kr+4%Gb6-Ih!Q$7DI2Xhjoq9hvAt702GEqhk5ygs;~%oeW$e8+xm zTKX^csrY?P=9u%kU&9k+dMy{|t!Ckp_7Y=%#dY&GDaA{#wFk3JWEZzVx6 z_~1QOUFV1T)y3@~<9rgz$Q7Sbd+&T7rMal|_uIx_3Y~47+ z=c4{rA`Af5>b?7%y6+#KtJS0`g5LH#Q72n7ra8|#`)KW|6xdladd3}Jd0KVU760~j zUMR0`x$ekiEH$H|L(D&1rGuPVKU%K`0lH>*+n}4TB}VUpS~%^J*{itCKXgWOJG6V$ znt3SzS<34T-_&tj!0To==$+$_;8EwLGPdxJJ-43Mu!@&$F6)aO0@$)t0)ub(jKS{t z_(A|q(@gK!bL)A{+%E>_!VrVCb9e{O2?x~4wjsZ=(WKecZvpJ)sb4!=O`max*VejA z!dgYC-f{cJa)qGu#E}hW+bc;@y?o9Zm_o}bYxAM|;@*=` zhdHN-V|{NMytep!9eW#pt1dp+yy1tWgeYN@Y>zVWuQ#Aiq%;UCpNk#aonwgyfWUiq zPxW}!M2{U;fTh};!iP7^r=A2;xfr>fPu4WY)i6}`x#(mI$c3lgJfE(eL2HMx9~(cK zqMV<@S_c^G-T87HHLBIix&iesvw<}h!uYhqOun>T@b-x<9T-4sD+VvdN!zVdMr}Nd zGNHyD8D8BBH2H7`W!o+JDGj_2?9sN&~hJI{ssx^1;YAJ+DE6HGxp{^vZ8FRjejP>H?So5sxB?ibO_;-0wIiu%DMA3GI1?ZeW?c2MHDdQqMTG6Bz8HEvTOY`@88VneeD>++kCU3towBZQ#hMtbCJO35M*dX^ZV;s>W+kKMle1nud^=7EV_!L~766m+k z4lCOWVO(c)23FYTl$w^xOi*{E56$or)bU=+QcY`!+ID^8JwVpj8~@eVvo#A>$p_eKabv43@Emb9mGP?jRybN80J`R=Q# zW+aNS-`5zPwtMh3R0NLb-9|k{Z>jTX&TEmox1x1qY1@P!%yu6;pZd)dq%g#{2Mf1u zuN71i`(EyA9}EmY#y~4DAdouKX?JM_SynEbKMF}}+_*b&m zqPz1xFJ|Ji&g6D+M9Q5En;7y+)1Uo)d{ozkMa&WyL~y!k!OXHZuc%TI-Ux|3$MN4NdF2Ar7}Q(y(1-0TVOmPi(_p33xSZmgPD!;t2~V`zW4o)B?8q(+^=lQw5=p2pM9`;u6Nl220OPElL z|2xu>G^g7HZn-5KNKE<7v#39yh#DxDa3rS4_4rAHJ%?%4?8|i-5iG`ZvD5 zz09>`!Nw45vk<{RS4xFT(@`M?cSC@D!z93S*)}xdIrkqEF!V&L-5QOv5JIObrBB{W zS{b=MI0zJL1Z)RskDhB-(~HMxCq=#! z{MosmjhvU}9x!+NyBBOw2dLFA9iU$OhUl^OVx3_l2FcL5FEB2vzp+RMkV=}OihtV^ zZ~E`HhCq%do#IX-8MWmdJM(#nzr6tOnJCB2XbxpU7Nn$j~^EByVpG}N@txN{RCqx#7P-`AoL{)bAdH^|qM(=8oKKAN0EVxN1htdP;73OO z3Q@0E$}GTb!!S+_rCXsmz2osv5_imt^X#TUz@7G2`uMW7R`N_1XZH*bF-qA0+SF@l z2Zf%mgEfbBo@0$Pc#tV~yaHx|2?Kd|o^tO;1ot_$Ywv#Va+Qk=7ZC$jX-sZh6CmlC z;pmX_h4vYZ*x`=zS&<)cSR?FkXk9l57#q}$t0Q;G&&#I*$d-%__Jx8PE%+`|4cc8R zUk8+=4^VC1$B^h?(G?Od^FRQQ;YR4x5|>a{0kgBClg&$^XD1ZAx7WPk8N?b+6z*(@ zPtF=N{HIG&f+VK)?wCl52nUYyjRKwRptI-7B5anBmDH&u(Lh%9Ea#nLqiDtWi@59lj9xKvYKQO8ym z6wc#V3&0%K>*@$$k!Bp`8R%z1_*wdWdN5_SRd#BS)lCL~fxEF*)_X2vrsGh6kfjMMvM-U*~ksLh#cB>Nx(RfQyh(evPMekBa96E22PI7Tk{c4R* z@gWp6O_9ZwYZC2IW_JSkf$^e2;?tp?IFP8EE_H%AszF~%8euRpLG{2gt=lDoTlW>= z5e4=v=aptd)@kK2B*+}>0E}!jpYA!%ye|{bhwhM?j-}7Ftk0md_6qySJ+L^B23c#O z-*TFId^3AqKhC;Zp9^4D5p2K>W-1|r)m!173%l}4d!LX6kKzL$@XooL2AS5IvC0rA z-T(oNV-?S2IIfli#x2kEaT0r#@G!Pdff7{WL(Q)3_yxlmR78f*h71X~91;(pJC%h6 z<^81RrsVpRB|yfV(<&4y9T8FHxYk{;iY2T()O>O-h|#r1)_l^0q%A;Z5{IFS7N}+7 zSh|Chhx>}KD!r*72Wuv%k^n2%r%P4}05DBM!11>+DYiv+Qc~(|;>Nd7?*=1u3Y4?J zZ3B}Vlc7!w{ZJ;HQc~>3aE52Y%HGZfA?hxngVlCl^44F;Uxuk&OL}aZQ;R~Hellh( zo!liu&9&XKd7M@Tpaox!2{Qx@;an0p1*}tw~Sovner&i?Sm}WUzNY!Z;r6*XOj;9=aGg5mF|rIVN&2 zK&sxf#~aS%3(gbrG~Hb7I`$LB2$FGH6*)_o5}d}~-NeS*RH9|~AX)c;ueiV7Ox~97#uy2IlD9aMD5Iwu4;00JIEPi6TyNe{o zMHOCFZDN^%>7gisGwJ{_JUGK9tPWGV{^NE#tFnEdNrNLU;aVM^e^PU%skJj-jSrWV{)X+a-+gsauh3-$ zvhFxwHp_mW>tU`n_LcV_x?;5mZ3z9B5=MS|T;HWMtPrkNlgiV3=H_WFrAp?wPiCw$ zEbg_cN^q?Xkc`r`5M_Jf<8=n6En#YzAwE6fDrY6bG*x9)4$`lce3mIF4 zb}lK80EH0O4*dKw(=#1Id&-prEV|xGfejqVb@>mYr4)>`ZC&Vva02Xu!eOfL`Hdds zPk5ar@!9ZzV9E8%j$RD;o7=A{&UjiiY%l}y7oI^)%%0hIk5bbp_6||6659OA&f~fv zsMpPanpBi8V5VTUc*KzsmWjf~gxh<0TT6+7FRZ}wwK4=id-#F{v#``{$CF4AL{rt2 zISFAKM?p0E-&Y<2QaUoT+U~>KyKg1)W16&8!HMY}Y*N0@jn|FJuZ0h#5E<nu?g&UPo+xKIx(FznsGjsEl!R>0DUh8aF3~ei+CV3297>nO^u%o?Vy?; zfes_}Y9HA7_+|G;HTU!hJo5WpqkZvPb|dFTLeQc2Z4hD#94_)!+Sl}O7y{6dgkT@d z$MZ~2BO2CBA{+3p@u&I22nhUb1X~C1c)>~JSPQ~~E;XGtv%*oM_;x(h!{X}^0b_5-}lj2RFoZnE;b2I zIxj>tgKC|pl<-k_s)O-iIJiz|+hL8-l2yj9PA-KsjUu(&Vg)(U;~Cv2V<<_KRL!aW zMx#*$c;pxH;?rJ5K05M=+(`~%%H%PD>yG%I8C@Mp*|tRe!}f^`Dh{8-f}}QLLLwII z_nJl)5NO7ey&$xiW#lBDg$57fi$B)074|}h4-3tlNIrGL8lwy&_#<^AA&7 z8sPxg$FTUow}??J!9G`<+p>iH)9kmV>y2Mc@n{kDqm$J3V%@~vra@S&@`S*3Gam4! zT&2$;%hG@cI3r_qnAYCWTU3yHCsF8f<7v7wL5a-!CD<>`tF!U1`9q5Y^J#cI86N>r z;#M0PdoL3CPAy0AWdg|zqrKqj3+Of?#g>3z=SVq^-Ar9lcH4n!(!TS%wLDNpfxA-I zZUVjurEdrbRxL@bgaiIGUW?pg4lj|8*Grg?U1|JlK%Kc-;Cc28NKB9%!ncWL8&pI_ z)K5j>s#>3y-vrVKpC%Bl#W?swb9UKst+0<7=W|oCBZH{v7;i zRI5wFeKy#Vt=kTBmb}OmU*09&?Yr^136+kFvcKb%NQe)DOoZ>Gzs`9HFnYEy7EJ7W z)Y+)r9DhtGw8dT6rZ|Lkf)Xi|+qeaS>?#aoVhX<+JCe%dg}kv z%8zhE%cL$y6?q{vF|i`%PZbCg)j5bO8KIB^mtV1O{G`VYyKa=N%atx2d@-5ua^RQ* z02>r|&&y`?8#{Ko^#|_JD4jTaH4_fyh>@gL>Vf-g*jUG)ZQf?;WbB#%qMU6biMpZ< z<3^C?_|Xgo3?^pJ#h@-j0mSb)&_8z8I0zA6H{dwuEb8ULX(89ps`Wfbse-yyE&R3# z@v5Z}vor{oq3<>r^^G1yWes}Z3nEn~(={4JZoN=9ko{d@Z2}XVPy!OZX7fD`(`1X_ zZ4BJw8v7i&VeG9rpTpGCP*2~Cp99#WlQ3=z6U=!$2BaGgJF(bVkUiY`V!zCtB_Hs+ zY1!kjmhL6}O8T`HD%KgbE1ahi&FZXdBzt}|TfARU<)6s(JHEl1?c>4?wv~MLf?Ieu zd5*=sTWnPJbW$4oZ=dg8otO!kd`5l`k{}qYSh1Aa2?NT`EJ5Z*UliEv_$z`@hGg1q z1ILwjl^a@2K*{eRO9>LyG}w@C=J6i$x<+*?QGHwtvB?@VJRPD7uqa1oQ6a(=wh@n< zN6ym$Uo3Do47Di^Y-8t4xN&22^V>J6?l}MuzhB5DAqUM|@TH-&P#ho=maGPips_(C znB3XRgGyzR7Jo7jIWO;;*PNHY%O%hH^pUGIRs3(yA=YTUODZnJt}?Cdpk(lM`0@U_ zQ|Hg_nS#N6xnQycNeUy;)d_q=EA6_~vCko12KJ6-YsxgdZ7Le{Y|xE*wm;&ZGO9RT z0#7SOwpO6$UxOyKdBv*kSz*qTb34u3XhdS|nB}SYTL$+7pju!Ng#mS&B$Nc&<9?pb0KAq<{UUDrGe{f@r|i&ByK2sZhI)jQ5n1X~FL2)h1XrgOMC+f$3Hz(n)ETAB$aGz(K1c5+kDX@d2rdM4E$ zeA4+c3?!qZ%0@G3E`aFD8}1oHp##&htG)g!3Fql&d5Ud$oCm_-#hg1 zc3yhEsD>C@o@8O0@U{JO&XWFVSRH3Ew8p#ihaAEnz7aLj0Ej$jJoI zPTBE8Jb7eX?GNV8Ac!P0}u@2aSSv2ID@-BjbRr}NM{T&ss>|guXk)dtyrkvW1pibsdsY9 zrl%FLO_Z8NVt7G4W&#Es_BirDKfy1fK|s6~-c1VNxGXcU$Ltz_;LeDa9UBWw4Q>Ef z^L$5j3gCY;iRtUyEOz^|*4$Tg&Uxr>3pJ$H>o!gK5X6&L5L+|x30ufhqaZ}3wRoAQ zsZc5gQU%gBbPPm|Lai_yudMOQ@YX|s-4=gv+Ar)!(hIk zY*bQlnjnDK45>3O%VD*C+C-@D<3I@h>#9n?2GsZQn=(<`nf@dsI7BjU1iSBi z(JaulJ;i8cF3G?E`V1~O)vgZ{u-ttkTd&`h*1qfDnHuFf9eA6YqA|p=PIU9{6qJ~| z#^Y>f{nuBMsL4hr1AvI>lQ;>StSj($yr!CN53vN%&sodsN)gp^M-Lpmq%*j$r@`RM}>YcOq+v{Bax|p^v`eFJjvsDNZmLRUTp7y6`tKqZS^H z&*%xF8LW*=8;lui=-x1XibA#s=&5PPa3f6=MwK--4?ex5L{xlO)QjT|lGmHz)PtPs z-@lxW;Gfc9z9KD_L*;1e4ZR;(M=?Iu?Uv-ydY{2VCelQ^2Hce}G}7;n(E|p-_FisT zyf@{Mh|WcV4enL*weU8}Bg)Q0_uYh^gV415yl(AnB<*w4;kDW!+&G6WBqwMHSfQDQ z$;@gDz?vE?&5EjhE|k|~x_t2E5)D{AZr4!P30Ijk)>nDB zdxAc0m28^7${4hy(lM`Zw1;!jMfN(1!=mbPcWCbo1R)_oj5a}5Mjay-W&!#jAm!Ed z;4KeduuY0X8#ErnPIY`uo$4xIl>c=7ZC;GDr^BxJjV3)mq#Ip?1WUaV`(Rw6^6o<} zLGs$J_%@9>TN-yKGu6fAX9BafF@Cl01-z|Mc!O`Mk_4MBbldB!XEUxEtIKto?^CgV zaI;ufRO@matBjtJS_X=7H;&@KnI{&3&dMyN#o`ezcnBSXdT=+3gjJ?Wo6amXb*-aF zW|L4^M7YyW1JIp37Dv&*#~7P1c8g2s%u>n-!B`ovzKlE7Bqd#DLImPs*zikE75gHQ z17j8j-ez7V{#5E%O%5dcMDvSUYZ?rAp{YGq6LCQO&JvIy@PIu;xtcA%)yT^Y$W zJ3CexLj`U}Nz8Nx0z~gS@ojj#$p$jsgF?!EkREQHPbw&D4ea(cK3O@#83YMmw|;nJ zC)HThmme84?Ku5Z}+T>hfyI>&lF9 zKFnT1n8(|2Kp;QRgsi)s{Vz>kS4C}=YKEui8XwZ&)-8L;^mv z9hL~m)6J^dxYf>_BI&hg6M2*6RguM|4J`9qgAs3KNwn1zCd@9ixxGk9&v$yONO=QL zJIcesV4FBkRl)qhb63N2$%^`Qhc}0Xzt7@8hCvOfZe=$NY6dPmO#!I0 z(JLk#evT zO_0RLo5L2=i2It+n6pKuFSf3fQF50cNC!J&=GR=ztlK*+v4bt}cSHf-*M*ODNU(S4?!g3g%QyUrhYq(}L9tya$~?2edYU zkTKm&T*-*-PjQxZ!FR(|q$STA@2QW9T(%E^sf8vl4fEdTVU@AbCRzfW;s<{Aj}y{S zu`Q6*a%lx`85JLRAV#2eJbPGT3<_b9k3qZ5#jL{wKBtDM?5JCPJ0%%B&SmO zzf=76=?oJJfv$cs!u|-K>d}}>@tT@k`ZyH=Om>$SD?SVx2Cqgpx`2{W{vMI~p-6S5 zK#B(e64#3n&@4*N_m9p4C@DV@^~E37=dm_0N=5!wR=Q8Mn74BM%*c3~aZggI=bA!I zJ<|-Bv~LiCZkc4Pkq-dhQamcVvB!wa{4+#=pSh)~>d#CXr2JU}@>d9YJY*D$PnngJg8nR_LAfn9kyva#pG#dWHm?JJlg#}zSZttz29miIU5e+& zhwG89n9;H~xO{;e#t-&aZrFlW3ZqTAQ5HuGA< zmGL(Q2;s7JE}N0?wi^tSG#GOD3qWwJ2)7C9jSRL&7e6=sd|WduH_?5+XVc$P;H~f)AJC;$mTIDD50{{X1 zQ01|rd$}Oz!xcseYZ3K?PXOlZTK4||{5U`ITa4p50&fP5*CYW_+B#lhi|}pOw9+;2 zAP_4Gi`7^aOs6R=;~>E|p;M*!7*MAI$sx!xq`}B?W|Vky)r9|4;b)oB7ZB2k5%5%2 z454yWJr!l%l=6LTu$8-xV(8nr!HI9P)6Jt!z*Na9)e5(O?;>QA zhaBGNDZpgVB1-W8T`$DmM_p^naYk9azKG2*?VbMx8E)aFyOZuY{^frxBTKZwsAk$y z?#e&J?fSrW%YT8L-4%8VO8?y&RQ#S&(n)~e&}bLJ1ir9yZKwD1jg^NU}NP}J7)Ofuye)@pW%xxO#-6l$}l({)i9Qo5DyarS!qhw z<^Dvd#43ylElA3ijWF@eauifNo0}`0gUb-41Xt@tme?UpouUEP)AETzYhbsCLom|l zjN4*F$1?|{U0vpxvi%ftO_s!-MP;R$FTo7VGze%ki;#1Z`eBeVB^{@LSj~y-362cM ziN)j%8ZnnFHa2$Fi~EuIA$~u#v*!X4URfD3RXOz>)Trui1ruzpotpxY@HfE~0!)8X z2jNVwC;7ZBlyCLU+rT>hU>L~WV~8mX&dF+DuC zl^R%HbV(sY1lrkw&xNv`_AsyO;c0kWR8!zW=`YB6@ada)COd&%QfZ-fw4zYvwB{*& z)C_76hV50r8aQ5z1WGihIl?+D7`e_GBtn&Sj&G+TFJsnmd#8_euF;L)M4N;*)B^#Z zzVf^D026U83q}zY8vKTU_L*_hxSXH0_^QoG4~)DivV$Rn86{z4>3nuD)u8aOA7T1A zBAw9oVp@Zrlt!|YkBMl;DYHB^2^Y{9!3rFAGfoQT`{suu3z6++6yM4kB3o`373*<~ z9z<7nDaV9ZXxzI-{_ayKa0i=J{!!(yC8r(3vg0VT8x4@{mMVs^YL+d$n%0Jj$`bNn z=_7llo;jPeU~L;@mBK{mgfI6y*zK}PiFJhQj?Q}FL*t{ux>e=63oP2>T2}seA8%8|3NxpO(5cs3`hP+Gx>5QF zqNmSW&hVj~Cqkc_(aU^zYCeuy(Ms~!{&6V6k3z2MLcj2hOA>WZnC?v#(Qvk~VO z;15YRf~TaQV;X4yd{=mwAloga4d|T&)wkjfJQ4W`A{H8prR`MCeYC1UOefs$_mC=d zN=#_CHR1~ZvSzxFz+ex?0W$671oaRqt9>cxiH z5qCJ96)gx$LQfy(Gbr%~6O-`!U^XGO@(KU*&AxG5X78M`qL&ld>R%cR7(rPKeZNZ_ z$2*pSt{%fdcVj1LJldj-i1;BAsp|!0>VjN28Z!Aw49VEoNxQ}NRDMmTsnOQn?}XPc z=GG{kf>Bj7C@qrrn;=7DGko%s>1U9Y^ic0ZKi7K;(EfVOe}3Cu1>mSW0F+Fvi6A@M zeZm4-;cs8Xj;B2>?H~Hie6HqyKtIm`zj=xBa=>qYM(g_vx&21krU;?Ie`EswO_(3p zzwXbjC0ECPxXa5szMv)?0eNWpAHKKO@omqkekQr}pv%;Ijk@Gh<-iy~rftwu>|UxZ z)K|PE{ag1=^3Z}>l_(dLJi3sG?22K3=Y$Y2*u4nqqKZ~dcLOy6w1n3;F@oxGobukS z@~++Vp<9v_$LJQJy1^_GpEN$sckS1WP(&9w>Ca`Mb#r+9kKUA;U0dKsbV)Mg!FN?M zAM%#`0TC00E#If+8kk0ox_-#ppZ-isb4*D!wOz8%`|DGEDx*8vv&C; zmn(T2*)=?|lj>$m>t>a2l$IU-q{>v-O$Q zCi+@XjkU08#wHTpruh#yl!}*&FXCrfV$j=7rH7{=ocfXF7{$v6wdP;myrQ%qIJn__p$T zmL-rrE||evH=~YQ8xc_HUq3e`J~4_eWw1tk?bw_2pH({k^jk0d4=BcQgKZJnz3AO@ z%de*I1XDZKu{tqr1@b~*Pwzj|WHR*y+jEaHb%9_5gf~1VPL~ts)LLG`wr~oVIH#Y* z7PYm!pQ$@Uo5*j9%01zAi+W9VLdm@t~%D60PO(XOq7^v8>5 z@?JM1L?bZ-`>=n@qXCi5W}$T}di;-mf-T|cC;f&Az?q6*qP8EscSu3sYDKY^KXex4 zAO1!${$MNWIbY}1m!%)a3~M$$LqoA8?((Ya0+#te5O%VsgoHe*%_ z`+nuvFNCp>{tl!-6>BnEL{{9Dh_V&#gy2u3M`O!e7;Po)phS;nX7GGvdPwaNu5oJR z6hBjzK5;kCG?y9E9z?qHJIr~AH!NsQB}w|U_Rid5ORV;TpO-9+uvO-&=d{OLy^YhUoQ5BJ?r{#A4|d`j%l_=WG{yoo$>zybTP- z4TZh6Nx$A^nc}x;X3qnz^g(PY$3L~X|Mid}f_F3@eSxEnR4wM-0LFsST#kbO(~x$I zV#N_B1GU~n9c8>>-HEmD%O z45k=++EbP0X0x?_+Ko+nNLSD{v{zA1QY*IiDG(al1A%crX7(!ZYK?3mW;N{hdrWt- zo-fFb^tq3`eHFLGn>1E%C8^p?G477&-?0kX#F3i%Ku4w48oP0b?JKtZOl#9ZHYFjo z6V_3TsRxWSGwl(BD29_o3Pfx96^Gh`Yl0f}z_a`V#!*Vq{KmA;*SUwV;^K$%gw1En z<9$L~Hz!ep8FenN=TPwwb#A zESr5U+9PTk=a%cgC>F~-VKiLf5!r3)E~JH;z_%D!~SRE)N~p5ZU6|3|~)>7mb=N>P7fOnqR!fHDUJxQIKo( zw&C~a3QxoiN0nvC1`hFJXtm6Y>nq0NW~gMf+|+Ny2%;1Sr6~Gw!6%*6f@(9^Pb*sfes1C@Qf7T&T1`n=T~ya8 zi%MdbK4%mro^me}_IzXpFP-CDyYRfQ_Hy4=m%6t0_kF3>{Pz6DJ{FoDpJfjVN8@vC z1>RLQ7^*a_^;e(11sKuKLVbr(6#A`T8kXNYBisIv)mB_W4m8L`A~F!0W)9qoj4hF- zM!uG&EPDiq%0aprvAxkw(4(;Z4BItO_ZPd?;gkvH!}>_>vfV&tIqPFk$FVy~l7;76 zdi^Ph$A#X24!^t`PT-#eCbcU#{xv{p9C|=af+1}*BZ6_$;30c&N1E`N$ z41T!scr$_A$$;pJlB<&KEeE%H+c5_F(Ghv;-ZXIQPmN?{DggiA4sJ(+TSsPA302|1 zHG&NzqZ`K(wXe#lVDqy*Xtf7j>(N?g%dOvY9-0oo?NET*BfxFV*r;QMCu@mr$6+)g zBD)0N$RmP%C4UC~f6^AM+ke53R(hDV;feTBllK{8 zvL7;PhQR2d|M2crJJHxk*FW_{0mq?w%W#_4P#Z>=3{wm9)A)t)`;5$-z^AJ((JdEDK9>J%< zH<6TW^(ZVm##C|EJvy6GJqDW*^vr1H9r@I*zc{#RhOKt!4}a%Who3kdM?r@(l%0iOjk_Jc09pJfv|_nOFl}4@|4%K#1T$ z5*y(H+2PC)WLa$m2z#5Cfcghm`MEHfz=Osrva2N6`h4%Cpv4>bvMoaiY&(UG$y8T@ zn~vaAe9cD+;MlU+MUXj}e51{zorIc(C9J7B#6PvtmaD~SRvFv4uaA;r%6YtX(YPMh zc)7r~Qn_n>RH}s=ascd-R zc~4hk8CR)z`3gg=ax>JHvrgvTw-~OaCC~LN!2*dgley=cZyez$3MRF{k$LMFNpdvdf}qQKgBGehI;3+lv^ z%{N=L^ZX!;_VEE9lQctH{bxJ&a zFu)KCXfa|rUJxZ&Q8l0&re#CqVAu15Fp85j%Zsuib<@tR=!bFI?)HZx075W=Vt4|P zH0_be6e^9*V2;XSbGV)t`>Y8@5sJi;F{Go<zCSK@(uM~AITvy>B0A$&b)}dXFMm@1Opc=$;wkJ4C;dMMFD^yFa!#N zBakRG28)Ejgy3MxOlx#Nj4_MNfy5{TLXkD=^`$boLa9>M(A3gaXWhJ~Z(wL-Y=Y0q z=Y98FHPB!~4L8zgV~w9rJ2X5pIyOErIW;{qJ2$_uxU{^oy0*TtxwXBsySIOEnC)m3 zVP>MmE&y@ZCC8)rBfWlvA4(cDiYa4d>^MXe28lsquo$A5X^~OUF>)D{6NQuGG_H&> zW>z*^#&(FvsOXs3xOnx}f0>1poRXTBo{^cAos*lFUr<<7TvA$AUQt<9T~k|E-_Y39 z+|t_C-qG3B-P7CGKQK5nJThwZn253C#z#(=I7!Qh5ZAacRz@<^9M(|v#y{d9Fa!#N zBakRG28+WJh$J$FN~1HFEH;PB;|qi$u|z79E0kQc-5D-YJ!$ji^=CMDYFc^{drSSS z%gD^i&dHab<#<7qT(N~6`34H3I7zd-C@WGoZPyRuwB79wM>E??x?}W$C}BlyUamy9 zwRLp$^g%xE92uKXUs|?`Z;XXF6i2N-&P^auXpNh+MAph+T3Lgsa>Lv+?F-y8o+y?` zWpV|-P-RdlY?E|&~ z%#0!N7*PqZmei@&pi$GVVaa2_#kRHmqP1$%u462%HEG_Z8+N*T^y=fW{ibQrs!h8} zReJS-V7}M$%7eavp^>qPshPP2%hC#Lb~}e_ZDR}B@t8DjEF9v>deGmCSLXOS>?o1S zV#RT7m3pxWPMYN=VfSE2ZNCXM2pAwJ&WLPT%DE}HdtU7J`?(j|sl0sk zaQQ;9RIXHO^+vPR?sR+ofpyW0$#gdNdij}L0U!h;D25ZfIbZ!zk`-0c4U^eowb>m_ zGZcUKJD6&i+;| zan=+s)@C*lYUs_<4o@oo@9u(KRMx7Yic2%UEZX%#DPwzP&a+vS$V4ono)vuw$`RE9 zBX7WKACOZAfI&JOZ6*;AK7|Z_Bp=YWNJsP#b32v+Tq#(P!!8ft(iG*pT}T?7sui56 zg;(cPKmKfp2k&rz4zraX?NYQ4O#7b&s@!}RDZkM69MkHW2C!ZIf9?hxfS zhGk!XIJztkVUxm?-hOy6Y2miu0Tez$B7A2Vu{6763)syb7MZ%%Rxq@7YeU%4A?at~ zoatZ_(GFE9hQ9fas6+M<>oJOr`Zf30>`Kw4qrh?wsIs=3%_EhK4|xFw;6NT-X#B&g zd23u1p0MALZa_ljfMps;fL5nUXAlR+s=)57NSugq7xxG;KcNA$}~jEi-};d-MTL_7|1;-yH4FQw7=!4xd*v$0V8 zU>BYIQww=|t5Q6h4pk;sfZ(eTjuFMWc!`!0WpAlegT$Bt1w<%dEdff%yARs5dpFz9 z!GqEzM0{%dT_tk_#L3k~DDY*DQ2EX9=jXudJ7Z~@(Vqt!XJ*t)Zhum6h%QVmw9ppo z=~wmNq&Vk;-jJ?(bIrrMfn&HCM|mV`ZWUGg*c$kA(d$7GTkU z;;TkJZZOEWMwQZ2IObxMcg_@Sq#5_)s?w9uL4%T^Z(&Cz`KqaJM#NePHKHkUu@*&4 zZ-1M92HYjKxwTgMZ7X>=tYsoe%!5_Kli&lYtNOUo3F>$-j%%1EZBA)2+>x;|1n2H) zdpDI;l)~0+|4OD_N)^Ty|L>;n%P#Bve^txUhI;kU!UmSA)i%O;MVQF6JKaT|$kXL8 z>qC?4(@0HmOeowX%>~Q^is345A`C{5Q864S1RTSCNVCzJ4fAK&YV)#OTAVUhbssn+}`+?S`Tl6v7iTDP!m3DhH-7chq1vCCpCoOKaTk(cJh&OHI zrQz_u9$fHSV-&2tcj*DoE9R?sqjbjphxhFfHTtRU6szWA9w#y ze&lvdRFrPW_;UZ*dJI10=)(r3ucNaR${o~$KBS$KJQt0i1`H<@37BT*LX6pvsb(yr zv&^?a5LldAQM6GpVIoiVt=w>-UQbKDdHjRrGL9Y?gi+W7ySrD&zoi%IuO zFLAp6xQtW(-{ZCjGXy9Ycvs)T85|P?28=Ry(20)v5g1=71Ry~lQk)_2+9S|NG9~gX zYstwUr=5^1M|cJ^2%x}#JMW=xa)X~>WCm6cKp86t<^HhXi}!nH zf#$fsfB<5R3?t}B$L=w^ENgl4;m!M2wfuZ}XaTSbPxKw|HhBN8-_LLJ`FfZAtbez& zi_kp8NQ#vrb#JCF6?3A&P=*b-oUpo`gt|7w56r{}W*CnUQ&hWmp-!(T#Y*-Xh*jaS ztCnKKlg&I;tTj38b=c{BSmdn8UN6GBH{qp@X5SN2W0QB=81R_h8UuPaMp9KevAV>_ zq}>}MU+kzcZKQ;-5ch{cy26Kil|bYe6JJI&sv&WS;P!w z7~8A|~&zHCwyFT4;Jz1_<2fYdv!>gngsF!P1L8!>}j{3wsrrXk| zS>FcW`EQ?eUgTrm$sZ;8wY4-aaSs zCdM?BMIWNX+{s+k8!D%9JI1)S&rEj4LZ!{~7R#Yc-t}U=pSp3MShx@ldN& zNg9sYm6USmAzNHgc zftk3J4q9zoET)k-l3NgSBZwK|se4Grf%Le((XsMka!OxI1+A#%QHez`mxif>lXJlL zh+>3Kq*Sa0beeX=^cca())uSCCR7Dw8m<~IAz67LWsY&zbW~#1q-xFvZuwBRN^i($#G*%Df z>MmqLySRbwr&TC3ou26+C(SuoMj-y8b8bp|6l)N-L>`?^At@Li4 z13^YZtC#6EZ9OgZ*uEOmMi#5|texTXLdnX{6qx1sLIq8HQEsQe(a5iO^C4yHO}2_R z{pL-oB0kHroL*5WolAikZeNWe5-kReEle_9ULH)|>fmz9#}w<4U_Esg9zS+0MVx$5 z`Sz_|8^B>BGWHCvGS#DRk?;eK_9IL=k6sg$za47J(hPxChtezN3QS~*KAs&6 zFC(;6#2P&TV_uyM-{jBkhsS{{y@|6B)(%4JMJ9EZWN5T{C{poh&gLnnudiGEQ zwtF=6IC|E+Bn?>tje8(r&fDrvJ96~rGEJjI)uL!~$Vw%r8Ea^(6|5W0@Y(XzD{ z>{<^}k|XB|vPX@D2PUUXp^H!obz^3MnsYweAg^ zp!GQ|@}h;;pBi_iZnHPSz!A!ep8ozD;0WbKt+m!#YunyY1*Vn`mples%6oE7`@c8E zW#yYI(t1yyW0<8K=)|75xN6Q58&;LN^t}LV1BwA9GxrjDP{)K!|OxeghDDxmp31w;NDxylVimaL)NU zvkC$Z6gcPWtQL@S&N%=80ssIY03ad)A|k*#x#k##9CxKQwSjU(sg0!^U8!@Psg)T6 zM<}m;l%p$kjarnWD|L-pl%p$kjarmftC4C|>ieBH6AE0?$K1yuKnJ=|0GY$d^MX3q z6xbLHbfE(Ul+c3;_+#nUj8KmInot_CY4LxADXsa|byKJ19`@O|51!@yeq~sdhzsw^ zF+v$os0JSLnwB=Of&im_mVbZ;CAUK*QAeG2tI;6m0^y3FW((D?`kByG8(`H26LZ}t zt-0UQp8I9v%x}@|uzHUmvOkJZycsF_`-jVOB_5Wxn#aGeb`e&;>sF4KZ~4_*75Tka z$C0M4=n=15zSo{xQKy%?=VdQ`lJ?E&^m_Na>XDH~6=`r9xzoOBmEP{2;~woRk}HOJ z6Qi8rs6vq@ipWTrky?&HhsfOpm(4MN2=jyr1kU2_{k&Y4wCg&TSIz|>BD}nr}2u<-&3unW1_aZQ{!&W|ILUI0Mh!@>Ae(AK@0(1gT&VN(7#B-wWhb^D-es zd@L33rD=IRwlpKt_Ng6agR@-;8@N5$OJ48XzLxsog|08IyD?z>_JnSeLPT}`0%>=v zK|x^P17d^wrDOW9jI>2t->?0f8=KaCCP;brD?3hPzH&+X4DAgrGC?JnT3jzHXcu(b zamIu6rFR>o!rRleI_G@}wo29~i-kTR_R(&~+XlGEZiQ=TsCjPaDG1&+=_Nn^gr<73BX{OxEJI&$`G;z^48Xk$zlddkfYkc zEKYlD3-~k<0E{BHYj-2=(YuMip+4k~1X<1iN+>x}1}L93V2J+h2yyAC2QR8QV%-`> z*xp2Ki?F^4w8`M&^S1geN6@ar2aAv=f)Fu9x3-(2EVDj~lhUzm^+CP(_rNhb3>tR1 zvYhcr^gY_)BVGViW<(A&C_gcS>De6_%1FvPt$$wt8Y$-8$_#;B8IT$3bp2uF!Pp0g zNjlwy>;sRvb@85&_@VmvUW;x<8L#xh}_HXDH$58BaSI-c^L zC~p^oJ9PxR2riJgkWW9&r?w^5HQTdM* zmx?D2x?Bev+2;q$o%k2I_-Yza*DTRjzA*th|3sP^$qN|&me3*t1d0&UkO1CTpeBWB z;KKVs2D)t)^nqZxgB8%wm{cukOwVAP;iCs6WJbca8p)NxMkcX269ql7q#3=0mU!@{ zZ_OOU@@Z*s49UC%IpyZH6LWwwy5>ZiLd1=mT>q=*s<2e9FWZzUZ(qVOUm7xd8<7K+t)ceq57<6@YP5 z*XoL*FNkEFgy!v~=K1^OrH>h>*uS&qba~AGs*kpzq`+y2>f?-(JA@k{fc)Z<*)}d= zBCy?7&3#?P@;bveY#b0qTozg6(55YKuk(_!GmAokz6_B_4kCyt27k#fU!KLhD{0K` zUIbItYvoakA?y~&&D{v0(H*=JBo@iV+TQ<83=PH~(DPchTSC+Rh7I{2ptb#bY(abR z3mE{s;VZ!RQ8d8W4D;UZIeA-}pXu)Eo8-ZF&@;m}dME5&o855Ju0p?U2%aM6#V=xT z{e(rou%Fk@>A$3N^rJBws^$xU@QFDB{e!)=uk_OId^keBrtRhzBHzF(ifWJEw)+f_ z2jHb|DErR$L%sL!LulU?{t0jWFqFnNoc9j>h88XN`JU9RV literal 0 HcmV?d00001 diff --git a/docs/fonts/Montserrat/Montserrat-Regular.eot b/docs/fonts/Montserrat/Montserrat-Regular.eot new file mode 100644 index 0000000000000000000000000000000000000000..735d12b51e3e109058fe239ec79c77cbd59f1384 GIT binary patch literal 106287 zcmZs?Wl$Sl&@Y^XBm`}OJHdko_cjD~cXxM}(gb&h;ts`&7btD<0tJc}Yl{^xMQXIP zz5nN#_scu??w&cj=Qro<`LsJbyR*WTK!8^T5C8;#0ARrX5afS%z<)?K@PAZo{d*t) zlHmVC|3^Fq0+9bBNwRL~|407+i3*?t@B{b)f&oDQ7eL^D?C_rs0FVO=|2w+@LIB?X zA%XuP3;@&ry%7ZP_}>>ufD}LoAPPYL#{dB5|I-fg|FQxA5P%KfK#L7vTm~>Zn`-VP zecEZ$jo3rx`Ph90YF8mXt;789naP*egjBIENwMWiMl4!%(wr8kB%kV!q?Kn!_xV}^ z`+fSPSxW$*9zTwB z#3q+OolB_iG>td+Y^rrle(}EiVp}5hM)E$i>Hfuz+}ry}Qzn`|wQ5hl$3*Xt9r`)o zz930n=|$U9(-}y_nFI`Nt(D%j=kIsBp@-vCkoSYIrC+rlrHRAhaN(p#0y;_YIK5-s z?0NE6>Mu$lCyWT(BVN4;(nOo52|88V?DhYHh8e zOo4Sx0olM9QdTsf%n?K|+2hNMG;$i>H-IyiXbKZAcvC5I=#A?{mTfUzw(qQgo5V0ar zRp^joTs0q_t`S`XtdI9x-Uo22;8ciPO-C2gW}MbvB8`XHXV6^lR9RftU_=p)KZ}~} z7fu`Q2CE&|sa{uIH=Gq!6%Q%0`Cg)*7Roh?IDmI8`%PCb8N!LIiMfB<4}d9&FQuJI zB1A0Yi&!H&uH^gfRYwthG=;x4CE6(%l}6D00fxj5v0iq@9#YGhOJ8>c5|GjZ74XRj zZ#MbX{}y^AEx}yWe+DW<=O7mk`Aa$+IWl!SAX(!YcQz6w8Pm7hZvN518ZE5EE6q$SUr z$}?9%cdO8P@Yq!I;6*9Cinvz<&^lqSunY+Vfgm?~0hiXj%n?*W4ncKpR#{^ZJ3(?p zz=7&g+w1Rc+roPD0G%Z1H(vQ`gw7!COA(GIDtb4GlLKMdM4f+~S+xlCE*}-< z8SDf(B}6J*8le0{rTN;`Zs#2(32T zke36_mZ(LXkCm~LuJ#7HJ#ceNu*)JM5)d{Tp6m2UKQ9QD!lp@x%-TCpqImc z+Q8wNGngb6eW|#?*mxsyMcQgX^au%N8h_XCsqO}#-6OVB9V__1@bJI#HKKy6x)Dz8^}e^7ACefbfg)a|kRp?Ov?(sybQ$ ztS9*XSfsb#tI`Ioe8XnnA88Oa{r%ctyY$pRI~|0rCm+&FYei5}H!hnhEJZPe)^Qp0 z@4RzIClCBBvisxDo%c}E9xqcQ13w-(KW1N+UcqliURrX{3$Q+`< zt5o?#@Q^rj*bR4^>3K-};uAg?0phdF7m-RMNbW{(Vvb6UhNVqt&bVG(F|6w&G4^p+ zni^`=r10)>H_7k(4+N!vKQ%(gS_mn@4@&r{7ReD&Vj4k~HKc6sa3SS+A=`8pXtz}j zkJ`@p97OkKP1>WOclAJpT`-vrUkAusGN6AmK5s2f3y>Xy!y<)+0EU08qc^G!mq!w3 z>x5HlE}X?nEVV)A>Xzkr-ZcAI%5S0uj`JgJQiKY1yW?{zln=ZG8m-V=N0Eq69HZygl*VUf7MEX|B^QiVXNH zvb0rcnr%o%YH)-h+xQp7qYPIz%=?tADzTvNRog<-^vvT8Bx!dU%9ZHkrVkT6f)0P# zA}THLcTc4NZ}kpnfR)A>Gs-dy4~~b_Z4q1C|A?Dj%W#LN4GIlUnTliE(toPD``0nq z1pwzWp(ZGkY(6xGQ}9tpf}?wAmA19h8=3d70|q?V73#RSy?K=PD*@w8A9e9h z>@7WCIO}{p)RxZvO_fDOJWU7&c6iIr_`Uey7$OB*HeL4FtWGR%0tg>7Ev^K;!Zzlhc`%`5k8v;7YK@zx?@XM08s;EUjzA{)t9*Yyl0K1556;b;q zttwJxy{Nc11n71#_LZ9C8;o`1;#}Kq@%3H0U!(oCVyjflKW?i@6NQ%-nHR`#ssYLI z%~z6Ug*iFw4G+ht_?*Cu`}+D(!%+qoFRHgg=iCw+m964f1OWSU%ss#J4sn$K6yk8B zT%_CEkrZgdswCP8BA~i}N*M+9_L2;^YkJPuDwHwu>d`z>2qBM&mf=jhn} z_>Y=wMlNb}d068QdRU#Xx;Bq#I=`bU8*bf#@uF4Ii58e5l^IQp`OD!dJ&A=)L6DBm@ay)natEmuxN>(WcYPcU4R#dxk+(s5 ziOJPFS$?z#2rqB{)L4I#B7?~}}*id8&)KPDK>+RJP1?}E^ zp8J@cp@y22B7J^FU4#R@6k=vr($*x>;3&N$`wca`E8NWYjfYovC2l?|AIizx%-{L> z&(yMr;!fQg{pc*s%~F`h$tmKY;k=wV#So$0vy= zP-L)${_e%^L`yUj+B%t&NxmA4Q3O{#1F0hVZ6Sep|lQ`CsVj@ zNEPjTy18FV;6sCG)K`lKW|F#X;G$hMegzkx3HwVIyC{M#m#RSV_e+ot)i_<2G_G#m zZNmi7{6BUHomp(xp8pbPZurI2`8Swopzen6AB22@eiVMs9_U`$V|uaDr*fGD}KZ7%(`p8=wts8DP0jyZVm z#iDv!Ac+eh$l6dq`_v!)6;mcoI%^&JJY}u(oHC%ayJDm28rN8`*G$>NUbe|DX3&{w zd_S+J?Zn4jMN+>wrJ~1Cl!3Crp!1LF+1OS^)uur`q*2AYADUfW=(*2~&R zCq~Dt-uRC%g}lHWYfFTwN?W=K3>i1`@$FzXH{R)iI`0PSlG}%Mwz%3C$FaltsDBAm z_j5Kr(oG&VIE}YYn>2>-|3jY~50G=hQP1Nf0k)%wG5 zN`)1%940!CiA3N}YBlcESppmBpC4=u`#CSST(-?~ zWv#J?t3m$&LafmUqq`=ccvR|VdG8qfcIj77OuT{WPUtDHT@_+vBR|smO#t#JrDnj^ zxbvQX=oS}@GbyvPH=V%wUFJif?ZoGSF9Q!!p69X$bmDmD@62K2iV3iUgm@RCLayCR zscj_%dHOkJ%2PpTt)R0mX>wbRY$Lzf;smnxhGjD{K=7qEBj;KXE;fkhRTHPp4HhKN z$11&p|BjTz{*)&qWLf`|zz$-}*DxSDO)WRJjVN(91WkzOtC=x9!e6aUtQ=w8*7p{- z=}9`uEGj5iP=UFkhS*QRny<*8@|Gcr$z{PP)%gofr%MI*y^ zE}1Y2xJ39zgtK_pJ9y-uLO?6f(&gdoOJ>j8Xo)5`O0ibbxx5{anwjkiv(6u?mirY* zbx8D`M^xF9-0jP346}QvtkB2m&B4(g{w7v-)|p7Q>)MgG%PhLlbytdiv%2MNV`7~p z;-xh=S@JXAT9}SDANAgMj;b)KV0rlSw&)wj3Qzv)Sx6RSy8dHYeo`ru1mQfn4fB6- zW3DIG-ny~K88(H;CakFiO_hedqPq<(m9CrR3`zcU8B`|on1z$oQbt!kJ-q)g{(eso zmW4*9n^jdF6)7I%LQcojK-VuFF23&g(|_TUV#(z^dRBjK_{-QXRF^a}i39qYbeUk2 zbcuXj2IaTwX~Vy*#xL3Wul4U} z&7b90X_e0=tO=j7(CLlYj1^&BW(l=)22v!rO{!wob&`)v9bu~#t)mS9<^uq@c^n-<(-+8+OrtZIP zxT44p=$cGQ!ml3ZcAbFeO)471n8Hj z6mOj+P3#$a;h#DS9o7hn5Vr-SR3R&d@KHoSOKiQZ;dEh_s6`$-B$qw&gIn|=Hpd8z?<{EGz3+3W1zH5X_E%@$z&88 z8M#iKcaGhmaE2UUvcz7R3LU`v3rkB+KH5O^@>5UAC+|h#sc4U?1zMA+vFFyx43?W7 zco_u9;VMKU8J{n1I+D{v1m;TNhI7_A*9$@_#Yn1V)4wC9gz}e$d(?jiD@7-a%EWzT zhDU$(Fa**8g5I2k8UvUzY))YOvu!Au`yj|(Q;^Wjdmm2yrjwey8uc0_5872SD{CGR z>-Tkry5men1Oa~%-cv9q0LdqW7u*9f=@X;RRiALhL8U^!j)-fs?W-{GBYD5oyq+V~ zUV`ZS*q0k2K|hc`8aU=L_#m)_H9W*`Y>3<&7;r!7Cp836J^GE^gR<%TF$}^jBu;mcei2!ZOs^n~a=e99f2Ik2{|;+S|R5%f8j zEd~EGu=g60Pe)wthn{`MA(b_(V?31uA&_uv7l_v+C9Rikl-E`iyH^h&ln z@!Um@#2PgX%&`F@p=3TfxMJidiZKeU%Y(5!w&$Tt6t;{kzCDo87|K-D&KPRA&sL=iUmVrv3UN4!yS z#0|*jRlP9cMJ`U%=uXG*j4Eelofxd&qon#;SxWY0Dl-z1r0{vJ%DvE;ID*-9-q-D$ z_E=L6qTsxX5dVECr8q=zbn$|a3!v-K`HW73`SA^TBsO`rF2K$Bds5;(&z?=3zZDx* zLmHNBNwQwkc{XL*1GFy$AWaDDJ^+RwcWK0BgisOs(5i!Nl#$bV)FYAbH;;V&aJN@( z<{%#Osm~#UV?5_w`2H_|x}ka82rn2D#q#4&BAC$u>A1dZwrl;BM3(w8D&F)ul) z7MHD&qeqXlUe(Cy(H3Mv#e7FLpo_P z<>2|MW4Uw-IfRRgGgno2r^A;Bjz_2A1h<|xQFH43xMliN^}P5kf$0awyEso+6(e{P z!jY=DvV@iYp zA(buakf!|t^wp@0e^nVYEf* z!|3$8)!}Kglr|Hte|T_DlEWb#J2_0@{q!PT%#{J@_Dv0Y!SJX()s_7e*Hd1gY@>q% zxVgGvTo;frE~39@WNy{2cD)26$aV;5tt8uNLN>eRz=ItwKmJvYP~q?HO%XJ#TX6Et ze@ZOo<;>|sa*+n!UXVfLnCci?BzGT^G*PFzWKqT}0O1v3?vwZ2!$_t$Z z^g z!cMW(X};!;(3sYPr4-*l)P-6S>7N!qv2%LkfYYAtp;TPT07nq?Swo?-0l)+%AB7D3 zPQvi&XOe1OF;Ss?@i->3Z&z`g%te$zx{V_Y#N1!eDRJ`{sHH@m{=>d3UN?nii zj7n#u^68Uqth>8j<2jvYak*nVT8O6rPb5!;DGioZ;TfIdUyyW5SxBahSHCarD&r&} zzNkkHW|PQ?iutMV7qOM{7u`Tm-`aU#uj|rN3C17lyYPf!MH^ z&?G9!98#{5Mlj|Bh^J1);PTltkaKfCTNmJ>_(4fgcE=>x3NIN>Ki-e&*4E`E*)RJ^ zCqC&52dleUPp4^;Sb!yXcqWs+ncL$N7_f!8sJfP?883#7okdOwB(E~y1#A1~&6gx4A?7`&ks8VYKzTxI!W=1s0k6n-kh;^^F zMuaEHUPlQ5k)o*j5?3+O%8_iu>NAYBN6-*a&RXTxbcn2XZAn zpT$rVQS8nvO=dBD5KqMZ-dY~E{_aw!Z}7ZSN6471O>9G+r)8MkTd^@ahT9uu{QFg7TCEMcLk+c;b9(kV3lE0emDDJKD3=o;Nw&?==|3pFBX zh}WNnqZfYr9;b^Vq%q2P$4a%3&bGd!P&^n5xLT`Q!hnjwj;hB%60~$8`YjRBoNcm4 zHhu7J$u5R=5}qz#5z0N>?OCK_+yNGb9V z#zdcZV`d?b1HHAXi)G>>YDi$xu?VT!EH6Xy=BJ_UJA9@g;L+L*lNvt`zRhAOG16@Q z|6H~$9x&DO?taR_?@r@;;p=#jx~k*Q9x&?ItG>+u@QiP|g}|5NTalpD*G1UukL9OT z3U&ZuZa7#ZG{x51U1sqqyMax9n~3oT;xw-C*sXRpO(hOCj1Zib)M)C=nyK;;AbnXg z{=Y2SAXjNan`vij+SQz>ApC5x=*!Vk5U4TMn5+Q-QD!15N}w|tWNgu1^jF=d>fpde z;K{l7l145=UW|-fO%_d_pYNRk*0k^`Hn(d|%I1bEvS$W~wkX+nsh2B}}eE$56wIqo=9^>;cm_Gc+irM`-C6^ds~<LGZw9&^kl|Gf8ppH6^bts zoU`SOm14ui>WvP;T*)~6-#{xg4+aci3Ckt~9OqLn&@|bSOke=^rN?kF0XK8!A-6e-L8w^jcW~BgZA|w-x1XdB zu=U#h_tp?77#Y8%^HM6;?C3gp&EGD}#V$LLq*zt6c{(?IXKmXkJBY43M_fX#h(gNN z3XJN@y&@Tskm?txrZoRRVe3@+vs4x}4R+B4&(A@{;(Us^&B4l&G~dKebz~A-BOMRU zza&c6nynIz%-(ybV<=s6@DMk@ZG|f~lf~zWVGF7x%yIjzbTmOUizH?w0Cb=1#XzL2 zCox(cnB25!qJgo`XW(H+%X;3QC`$>zLSe*?V|E0eNjc5s@Miv;??USq6Qu;IhNBph zB2mM*CTsdB=1>a-DvN>9nxpZQQ6!Vbn+Ux@wKW@=+FPWXbHR%6g2T5LzP(^&ZOVG> z(ce&YTNc0v{QOKxS3OC7JF<@!FXX2ajYU1ICa@1APR_NSt}{sfi1N;~w|?u@MlnLw zK4RO*h>c;7B+o5MXs%U*6QZjhmJsy$dPX|{1=TQ0m(X5P;0n* z@jxy2bT>UbGv>PXbiFjEERU8V_;cnXo!^`FU;$@v2@zI#mSO%H9Kr3w`6akq-`JSs zkb+Hku72jq~2AE1w+T+0sX9w?qMY?|i@M$pE6Am*9o9!AdfL^1=j~RH?EWR;shO|Xg zm3&-ZNnX#_AzLV{8H=GLpBMA3yU?W$Q1*fB?TbGxSORKL2xbox=l*i^-RwB0;(K>$ z(`4=GWwGc7T&KAe6^p`!|JfFWmykWj*lP{i*Nx-vr9>9QlnGV}99iTjIGxMnv1ho{ zzyYVscZ0O1}mkATl z!SAUpY@}FV7UndU@?nJfSko^xG8i z?qPu+**T5v&nP7u#RPiumMRQHB+d0L1V)qXW8N4^E3+)nbgYpY4h;J}&uGL?t^ET~ zc#W6&8qP~cOwLmbmX*$yZH7qBD7_p1=$!+F4^TZBo~Gmt?V(svx73E3k@s7#wkWJ| zN|BI~+5;Mi3;$~m@?WyeJpjGS85AcQT+opC4iDUQsL9RkPjd?M?`sE}Qel4-_!z~u z%Nmb@PF_;ZBkaLI5_cs2V8YpPY}4h~qYwlzzxx8E$X1-R0p^pp# z$>u$%i>bae-T&r;c9JIIJWo%`uU9x~!P3g?@HL?wRJ4Bae2#-SDwn@c?_bD0T36y zH3DM{9e;+j1wFDD^no){s8lj~3kCEz?*VR-Xl@f*(r6eDL;ao~FOh9G)>q*#P3t}o1@u3Q<< z>Tjm@Q&QYw-;xP~|D^(o<4Xw9krpbrX0m4hRCQnK;gNkty(ABhs9unVk|W2iwv|E; zdpAa46#in0h|#ip&tIlnd1k7!KfPTYKBbf*3C%;i^6L09N)Zc_yb-zHBaC$5t_wJZ z7CW%Je#^jN%R8Z)9SgX7bu}E5vKndX7U4tq>er&Gol`zBGai0 z$of%^s!6)0!ZS`vmYjK3#)VGv=NH_FRy?H`GA~w@lM=q6aUe_8CElf8KIT689k#AG zYaamh8Q$ngOeryrTLhM-f1we#ZQ=R1BXK6MpI1t~V1tkZMy}O1# zz~vJDiC%#SmVk^E-rZ&KdZrq^B!Ed6=RTOTJCvBp9rwdACSCWVM^)uoF$X5Z-+%lX z&R!G=Dy7tI?3_Wp2!*vNrAdPDX8Pi>P4#M<8JHq+1jfq~RzksEs^}p~pti4kAR%7; zrEGpG;w0m{rXxkjOV{Di@AzjXgHp&xN&)3bxIY&VNyY8F?nI7~B<_sWxm|z#JVk@1 zE|kE+dYd+R$&1vg%q0Ez`hF{wIq3XT?j9gwj`j zj+Fd0=G;f4mgpuKV_D(MZICsT;T+#7lB6jxb@&hqS4K3f5Q>DVAULHaNoZDE4{BhR zX`v+glrVsVy9Plw(?j^J)8y;YXGYTr5ZkDt<=q)H$4h7AbX>IB=CY;!w4HR8$l|;) zMA|F(H4Tk@YIPF}SYm~`c6d3z+oyhjZK>1WRg7~uGkihVkZ-&!U!TW;!uwg_tasXc z{Q7qSaLx}gZU9{=uE;qH%k22cyP%5qq4wKtlhCe6uz3j0L>=F~fYPZX#=16)R)scv1;Ueq zM<|-VB*lxRw=ZbW$cE^oa#R&0%YqTJz=HRxf_2DsK2fs4stnoG6(}~*C!-Je{!e#s zWS8sX0j1dlf1K#gwp;p-AY5DnV3&6Zlq#7?8E9=wE&)}I4V$^SG_@m7*R?`CPcb*S z7n;79yf#=0e_=u--2Z@PlATIeN}b5-1gUA865b)(1Qizs`J>?v7AYNj1xr1blKPH+ zW=*>{GAXp?s*tL1I=A91^EG4AMR*|uXv`4pW(28u%QJ;0ENWQ!luSYqzV`LE+T0&k zY~-qEJFkr5kG(~f$E441!_-YgPWf*+4zAK&`dq9&6BBKc3z| z!lygw1TqZ@Z(a>Z?U@%4Z}A+}N9~>pAe7?}+vj)onW%RE!#a#$7+d$@bE4UJY#nV{E=66i@Gng({Hd%U=_9+Lk z`ADkKq{*D8T2`|{-Dk-WGM*Xak9PULh+1rj7c-!swy!=1^}VpIuGZ1ZqIR;@<3j!2 zw;$E{^;|_Q)}+1~Ucje)E`QBD>y^r2K%=&5*|qC3$Oduh^qc14Dc(2#qUbr(IpW5w z%>FPYGTL|_Jw2t7+x4mWjqs;zTd+O$-s82&Xo;)`KU2^IM71&f7~K@56Mmp#oot7K z3Pfsb_{XsV{+0goS(dl4{AcUQ)73AMe#UE2w68aAW(UhX<_qZR3{mNpnw}&R*sipy4iZeuotQeJ}>Ko^GaT=>PNoMM4mu#uxu4j2gpNCi>C8@`lxZptry} zBVktmw#v;EV%lrdj!!(~)qUGifE&@94c{nen?l(dD=ELGMTiM0+RHGEjoUy-^Iew< zrlTBXmLEFa6x~D#$ocVcS+6VwYKu&4v80evP(F+{q#CykzS+IFA6~Ff3cKBy{Ika(?3$h{wjQGw)LJtoJou|po1vy7neb=v>3@k9 z^dH^GvbnWHp#uK_(c#Z{G2hG_Q`|MJa=6DDw3~Eyc_qDr^;mdNA?e+pL;0rb&b#V9 z`Im~X({W}SN8P~>8BM#kVri+SbiTcpUtGsX1CKdsmpySP{6F?z$p7h zrMAXSWulEeW8z;G#o#lF<^pEgDX0xzoj|n;z`n2+(9eeTkUBgh)nc&G zB9Iu`GoSL0zHGCcv2lnu`H;wQXfm`A4c+2rg$<%Gp&zkd@$1*WNQc->?gw925!E}F zw$$(V*8EDb>Q30k{t_Z^igS7w3~}J(k206#d)PphoOMW%=E?{qjX5bv69Jt03aF=G zbO_8v4QEZs)imf&%@@j_Ws6^=7L9L-sk<*Z%vpc-0E`-fp1wtICrZ#2n0*m~F>&U5Qfe_na;PkP7QPCpe&@L%@_X-zD+R-idK=xtgc(`v;7q5x<>QN%@{J zNT2bNH)D0vy%eO?^u(mit+?5-UF;C@93Bu%9bUr`#2{sVY3~>-Y0vBQ@Ierez^5qc z#=>~9mf7Y&am5ImN*4sA`ZLg0BJRE%P?3;Q7qFtZz1DXkIRG%tl-257?JIEA;F%^S zuE}3^nkHtyKT$*Kw@64mO?KUjsNn|NaANaM$KS{>&6scm5v4+n06p=DOz>CNPwG1E z($ByTZZo2@|2Tnhn`^b?n{f!%lYGvbNCrN%@p9n4pecair%hvB+Tp; z?k@Q`jz&F;=wf?(xD*fkONrFq5-bf(_8(eb9(8=WbW~38PcAi< zDy3f_@v8KC?Dh7~bWB7dGp8px;+59kFQ9gc;WoFH=jn+@BAAHbUJwgwZtlD>EU?Ou z?m6L%dPD8%1IZz$vY)8@#3uOu5dC}ZMC>8#($*0 zTRvR~_w;AmKUPztJ$;Pb+K=rFeW`-|*fQ}$>wr|Spb9}1SXYhFeDqvgk+@kMrKyy% z5mTz5LHQ%@_v6QdAF6XKpd^ADFOCPZrR_OWz|UFwr8U)G*TlAM$d6mdH{}ef3+7XI z34hy}KqCVBurswUgh1}@5X}KdZ-Ghjy+C3Q8mFfye^gQWX8Q1fDq$=aGvc+gf_oGp zjC#LX^Wgfo?%#+n+qI!0!`pMMFi^ItICjno`k%i_aFaPZp#CRmW_zwbpr z+wL5yC)sKb{EXq|_6GlbZi_`jQ0E0aEEa&jawKE|C)oj~f%&Ad9~0Se?plq3jY_7S zpy3jOAE#`0NVU>_HeMX3sf~A+PxjSRMvl z<7iV+y`EU@{&nyAI1e9uv0Zd~HAZK^v%uiw32hnBj2Mk(AHA7ULb+g85RKX(Dr+N=*nqiCRg51MK;Zbu}{$JY3 zP?uwsSqDg}4?g`t*Y<+l6;oQCS!QbZgkYVyyl7aG|EyjYG+9O5F6EX)WYK=9=(6#+ zA>FhWr)Kp~=+d|rCN6MEeLR|$zomoC)&_{Q{-njJ)gB>ACJuXC$5g~Ermg@P@bTb# zjphxB+1c_PO#GtEU#VZ$XN}U0N7HrRaY%cQ5>Cg?i*^&GjWbDtXl3C<6hr3b{k<)# zBTP9s)nc?o_T3~2>&)|XJDvn$XQLYJ6hwh6I2GNo-}FVve26-gOPp|+N_d9M>n=_|1$5fjuUZ9+){B0fIg81VMA1yV(9IP~BWE|hj>Q7|Q ziPw)iVuw^n&BIh&{mF4w7w^KWNeyn?6lrJ8`vMdxs@mkx9m^Z13YY=4A)(+ME52_FceMUTY#bD zKIQv8#cX!7Bn^-l0q5|{At_3Dkv~5riRx^&I+sJ8YFSQ%9CKn}k3cuWJA%tsltsU| z!pbC1Pg;qoqIf`YLB~7)xnbexpz4#C$C>HR3@plp1^BAsKpo?MxWc(S>O*#hP4G<; zI8S zA>+zbtEAustg~~S=)L${Dp~n!lJ>E0@8JU`kU`nlI{TR=-*YBao@nFGou1+2Ou8>;gqgXnLa&K-no!ui+XB>sQM6*!7>Sz9>JUS z)I>hc-sJ4HQzy~fC10}2g{MM42|}gq29-pNfZ??5_jG@>Ffyz_qzizq#QllVHU&~$ zc^XehyXa_FR@QlJyByRUwTWJ@Tg`{`&r-wrC294oEi$mQN4n=*DIjkOsFM*$IseO; z9Y@qz4cTQs?@z&#hQzo-r@c?AxH6g_+s541%5Q z{+>Qsvo_zd_17v9@n-9_joJJ6#*g+gj^u$*hwbE#wS9pqJb~Zl&wq()gMRlH1#5Cs z4-SdeeT;QBX!;BXm767*KXXEu;Jo@#G%$_*s?1*#>~B4Z>Z*H6P1HXkiVbrd>Gg;!vE7z-d-(#?6Kr{bJAKR(jY5=$greQjyYyhnMAXF(`ImV5`3C zWk)r+!E6iFr~ei1agG=`@rZXza@(rAYmx=DCtIi=B1}J{N?c`0k!R4F##_C)aCazU z@drmNCUT(n3?TWD>6PVtMlKJd=HNsAhLP@(D}bXYh9$aD!zOTH={T8~@1#_^9?t2X zFcK&I%dO^dJ@Z;Un|Exsy1=A`Wol2tM`itn^yB*KT4qBoS~lKbl0r@539qu@Rxv}kuzJo1F6^IhXPu4 z*SkN>3V49aI;2%y6p{}nd|NsP^zwJLK*I5jMZ?0xR^5GdnG3y~uhSa^Sz1TUlGgy5 zVxobrt~8?5vmIKQ~Y z`NGjZGoB58Mg{kpb4s#*GLUSgGz5ln9OFwoe<=K#?=YlGOK8FeWSs z#p{4-3QLXU3P|gzEk*x})9&$5DVD?O>VvtiFbnC&S=tGNQ`@-w1beaV3*`$_UrdF( zT13_CAsri|HD1UXhVhkJLQ=29MV-Q_GbpQyso#b+Yi60qO3tY(PJqR|m}_54J@Bf! zIxPe?Lj#b3sf*`s>~N!53T}v{Ibld}6A@e&HuoD@@rrpXz1P7bEEyxl*e+ z2y(hPw;+Y?I`vJ(RoOe&{4wtqfOE~*;c>M%Riu8cy@?@g7dIRK)F;!J9N;lsp{N|z zM!8V)C6hc2S|z{;P6yZ835Ilzlz?4Q9z)TL;dE5|KOq-_$pN8^YC4=?7rOS@KEmsepwi{Jf@^1TeSyTnpsjz{tvdLi&JVb9 zeqB3#4g^+CPu!c<+t2zc*Df1Vd`6m8IV*k@=TBt3L>gTQ(W$QG23ci0zZl3fxI{8A z&Z~R}vsT$mf9PYCjvgNgR!I$GtWKKVd&)!nT-f7P&nH;(w>ohoy?4dMO)B>V6Di$C zV5M)u1~Hj3R9P7se*ss9B+2pmI0JI`6`rJ3aj7aUrad{|OmaN@G>OUT9tiUviluct znW`ne95voh4N44`Qkhm%q!H2*!oK_#q#wU}_umi)nL;Hol**axO&%$b5O$!@sVwa0 zL37DHG7jd{t&`%PINT)UCT5lY3Z#amb$mdw!Kl&8wa%nf4Sk{%aiL%X>BWla{Nam> zjQ1nYed~C?>%`Nlcyj&yC_gV-F)1JVGJAU82OC6$TRSX#EZ-ugGhgPrJ*!J_TOQBF zz~^=%Uu#V-$B;f5o(;lEQzc?F1=ThzN-FQ|tA z%{(2;OQkrWa2TX&N@?R2(WBizT7<#gBV5wX%)3A8>}|nFBRP@L>GajJV(F*zs8!zF zjGw@=>#MX!QH<>I;Na4cniw)JTCg(+Bb@hRYQ%*r4|XdyddC_!ExHaXm=c(wak+P) zkN&Y9-LV4xq>T`n>x4NWf>e#~bBmwz9pGD4hK5o^uvfFZI!44w6M~7(1bb{Uitf&% zb0X_CMJhx=26?jzhb*UAJEK%n!_B4@6Vx;t8H2UkALb-Z!i;N+fDDf|rhE=(Qh*n> z@K;9bX|d6AMZo$TDuajyuNOkLkA-w)O9Rv7RcJZyhnjp_H+c+Iqs+I<4LFVS@#Jhy zWM+?I<9XS(rA*savD0vn_>RMfOn)GLZ7DvQPCz`*L>WM!>*I3AT*RKU>bzA?CNow5 zk*RHLR^GxHpv&bi>^YCr$ql5KscB}1Be8gmUgw3P)H{<0>Q6hR6b*Ysx%c?4_fqOZ zr^mO9X=e=BRO{52H_ZGB%2h57ex|(A_?%HI2gOsZn1Y~;K_5BujOy!Eek@rY6$Hq1 zmxL*7%3B;+9ch`}&B+`lPDq}wdjEapK$0BLA9TVo86Wa{peyhv+VVK+Ie^8`5*iF5 ze#?J1K7UVhHvZq{kziqY$pLE57#0~J5f7CDx8B<7U$4(tnxHJr_ zKQ{)gxc6w&yu1iSwyBt@R?CHu&r+G%Hw}rH(z<;mCz&p&X?mVE@5y?m{~=hnGW1pX zp&^&vnc-3b&qwm!kpuk$p|B zn)%%`7M}#P;Wvd%RJs|OFLP&});(LY;bdUS+>X7OU)BTj(Riu}bQhWz@zy0sA-hG2 zUE$*Mf$hCLKFRVGG{^i&wbLD%?$%o*;7*15l4F7 z9`2g*I#5n%-cN(B!MN@jkxz8jsh6}3iXjZOb$q!G8+gBMcGp2;%~ServO=Apl4&3R6|Mg?|Nk@> z%?3U}&Er`m3V!PD-gI#H3kryt-SNMEu1l zkfGj%IL_5& zhp~q&1z*gmjpMlr?QdY4q{XZmKbyQSev>t{T7r+VH1B>A)6IvAeVYV z{8NlzhluOUS9gnEXco9Q{G0d$-x){JPLKn9=T#h|8(Li)ZOXVM-xg}MOw*8v^irbK zw#=JSFp;6fF%*m;GOMGiPt|8O6f!g@YxmuJGOL0G3@c_f!0OCKbCW}jSwL~v_2sZ8 z0~Tg-SJGfEXSLOos75WIXC{GyD{u_gmcd$N*WUL$`jViJ<7#*0kPd#8(H~=pOZ^1n z5H&k2E1}>23Du#bl{;C(5|cR+1&C@w=nKIG0r8nQyR29m06MIC01|{i1(bWD!Kn(P zU9NzUK@ljO;7~Rc?s3X7q*Hn!F&a7hN3;VkGdMhB_ETjd9aiSMmI!tIoW__F<{za0<*STfVn}^>F6aCHk6aov;|%UF znzK(y!%W98PnaUBL`<{d*Q64=>_k$Ixld)-!-B8=4Sj3Wri|OAEW|h2ZLDVCx%#Ae zbg7p%UGNM=uaiALJy=^cd#C#OFsF#hZCcT1Zepx`KeJrmH@8xi&2V;v`e5yuI6C>y z#|*Crh^Gk??b;9G*QBcb6eNer{Um-Pzb`Mk^{eig@{953Tfhg;^-=}7YP#3Vh#U=Z zlh?fGQs4NF+X>pgVppcc-aH4SU}8q2dBEF9nF ztp$fJ0*`v+7J;jI-zvC+OHt92@5vYoNoO&iD9ZCRzNNX}+LXx~<^76IaW8MQRW+S zt5|IAZsLA|Eu;Rwzg4+&@?+uBdBEfGSPf{X6GwNM*$@foMQR^ZGfCO!v-E#5B+e!N z`uahBpZSYGr6Swc?yPWF_F1W4G%=?G(u>8iMF1Tg<7j2x7xUN3JROx-8oNJ>GxroL zk%;K;#(Qo;**#jm@&u>uv^tv4wOLu%DOZGvo>XbosmGABPlZ#`mpNJhmOV=`k>W*} zJ(@9`V57fU|~zi#jCaoEll5zmJ~W zDN?&gyIr_JdcRC;WDSzMM0%$I!&!YvRwqA299YnyyTw(H?t-!gzdz}aP-DwiJ^lQ4 za(nHpLxO2~hSe9viu9JBOkoW}9wB|+^R3fOlE!8A6VY1GC9d^MZikRs(6s_)SpDg- zJ0!LqF47(t#8vluDUt@ig*$k^*;*?>@yw6~G^->H-itYSCl$6!fUbi%j`{ME-ZY<& z?I?t{O8{(|bbgmL>3r#aMAAr&ZE5MWOH^ey=^Rb=aO@87Ck-yFBn`oXn^H;*EQIPK zC~{tcyG*rBxX~SMPuVGQKoG8`k_YePsjLHXQ*GK*0}J8FYKj~Lb*`yKZ1oC7wxORw zs)q{lXgn=yt(^BQypqG2&m>l%s7v?zBTE)r}Prn_^ngfBY#J-Jy+B z43@e_)GM4ck~W(rPbso3PM0Y!Xz>q4@|L;@AG&?d{%s8>QjIEp9k!}-BO5X~mFBjEvXDyd zv;(qJxG2&%u&|Zqv#`Rj))JF-!452Pf&?(w&%3q6l&NfIn(^!sHmo30wMm^g6C1mZ zFqQ19P+@_A(JCI-YdfLCsfCloD-Y1B-N0u60)aYyQuSc{xsaoi(D?uh(ITLMx7!sn z4_VRHVSM=}YpA7&)qD4K4mKT%7_zV>C8#Rx5FUMg%CwRXF65~6YFV|0y#~#YG(Jw7 ze(l1~iElaR=}~E89HcS<%ECfApr00oM4rg^%u>+F4vZ*>xUQ`sZrZ?}8g)!=Dx;wi zRW1~rf-5Q1z$cHWo@$(GV;fufGt7}=Hm49!)f#|EM7QEcrJ!3;h$xsTO$0?~@ZWl{ zeIC5kSX>lUC_a+O8Jdh0^+L3~`Fn-|Cg!!Q8W4haF384J+R9j1$i0@S2=!lE#Bpm7 z#AzvRjyDyuMD`gpT&-L!yRXG=yl@|&J8QTLzrstt;@mZ&m=^=rQz*O$#4Aev0W5DX zOLH75>;^MjbypH|8hkEsFA*{Pj8b7{PQ>~wp0s?!dJ>6Ua}m8#Kv{xxQE*Q9ABjof!w zwOk7}SnV__B@IDm%Tx)5&kRq+3ndQV)bPlKd8qomwnD^MA!w`+utHJs z3D-?N*WfaSc)Co(o{wPW>BrXtotkqlkJeQgP0)iKq4eHStSCk#NA%7!;S20B;-e`uh)fYEln zTw+TBB9E5Y2qd>Kn`DLb#UKnRrVx9X*^f){1`>7-{mP~EyiQS;ONk2(*GYyGCBq5V zqEH&ZL^6j&Y&!>#VFmFl|KkP;B3o(EP0*`s&MlqcawftNu!X zYO7avk7kGde#GhxZs{Ju_k;w|5SfMi{>s(kRNdp$@#8e6V&PUPUarsutzHFE9io_c z3T^`fwc&}{PNvt>(Pq|uAySMNw#Ez5-wN??Hx=0?<)!AvE^0Zhfy1kyoU{Rm4(T?ppXp_uDEq1uSm~W?H#^ zS|_|lf5AgGN}-Jv?Z@kNF|)GE1{AJ|Z2s^6@@>M0ac3(lE2PuYKJ@HMtoHFs0SQfg33|>u ze^6CK-9K7Y<|t0xV#mN_!|vOwNX$UVN#K(qIb>jg2@9yuX`DWLR1PGSO38Gtxt?(} z65yyIQ25!V2xW~z%`hwc6naVJXH6{Jg2u`b0SN$6(>>pX@BWT-rYFPbSK5kw=0sFE zV)Z*wu9vQzHcc+R3kbrQBChGEg|N7h56?qy@yPAe+06HZytx)xJsap_lx-UdhxSChX^sZyZb}B-yz?3uvHGAJ` z$}vR&2uekgklfFGEsK=s&|UqFrKSi~EWYYguB8u|=pQUr2ewQ+GC1&PWGqkF6_mtf z*;h|rG{#a(CM^)9lA<``0xE3RjUy!^<$`>jT2`iIa4dUvbd}ubuJ;tV@(;jr>e_A> zTcw6Ym4#99x&TTMjEeJ_HRLbQaLplL0h|kye+fRR2+g;)w9mfHN}e;z3VWG_tMr@+ z(g0w-A%S1h&rHU|{Dzj^ohk4784I1orch<>%f@Na_wB=HX7FQHFjmSV{AhYWGCF?F zdV^Uot4pVK2!L@=xyUNVG?#yrinU7!U!@=wt(l_sBp5=AyR-nyr+7t9Lsb{(5_GYt*!t`oI+j=(@aLrvr}uCy`)T!A`Gfl$XJr)s7N?ICACOe&nz)UTX8%9XX{ znWoNoiv5_9;d?dMd1l;Dij^i%0MjE^_8506%Z8_^}yN}3BW9Mnv%mo8z6eO7}PgpQ| z{uwRvb#;ss?b3AcuIDUl zGBvOj=^y#c3JxS`fayF@fUKxT=upwLt_6Lw{`^>We7y9ss1R>OMaGh*!?$NrtTyXp zG>8S8bVqRxpjZh3eb8B3D+^@3v06X-sd#&X=DQ9ihZ``VdChGCb7aM&@~&_5Nz&ZG zAZt=3D_3ms6>2W#G=OOG5KrAuBbOi73^lS>N1CgEU0#F4Q;vM}bu#&O-^i_y z$*id6xZ*3xA`D4CL{;&e12a22z#tW(_CmH#v?w(Ey(Zcju~-5(H53Iu|B7d#>{;7Z zqtpyG!J)w>X0yddXIbLcd{?DoF8U}Mi|3@rzeF(%Ih z9Ak)W$P*>8QBKsZYKMvIV~*;wP#8e_U;z|e+|iKPJmu5?W2LN6(`2Vm0#}DC%K7hG zW#D#}D|)4`{!WVS2o(}rp7SJ{Ap=|q5pNOWCClX{#_Kc#x+e~h%{lzE>lLsN0R@cC z&{ea~woVdG)?om$(WuCs(;-%?uXz6gIzA=@9;*btSx6@QU1{(*tA96AT|IRTFpN*2 zJa+YK^)Vq85DmeVbDh6)j%Tf&15oN09jLw&5%n^3ju(H`fJ9i&pB0Eog=nIk=7>w8 zjL8IC1E-4_B>7=a70h478_%ERiAs6lz{3^VMQ=^aShlYtnH#Fc?_nD>93s= zWXqj7ho{DV2>U&~#D02#&GC`~hTDgUM$-)6$6{7BtmJN3ZxRb?y0;%^GsSBG;T2GyPgDdNflcnno;( zK(bi}v~QzB0cIBslvjab2K1KOmtoDLJNeN zwWI#jgNXwugvpP2kfLIlgvJ}qQ?xl@MVi%IlgWK?Hd^U}G9L+Vx?&m)*OmVZ#Of-2e7tGvQ znmt2HtCKrGuka^v5*p!cLl&UfunuA>OL8R|b~}Zyri=#Xqg^DXpokjQJ`$AziDVpg z;V%?&x@e}h8SaCXWHQEP)%e`usWSI59Yk2WIWy39aU`i`SPM+nOgl$J z|ERbrN5odtJ{=??X_mpKU17s)#B_hqh@2V&fhXw=W`R>Znc4U{#7mz$m>4nh(S=ucqqq+=4n#uLH z(MiV(%Cj(6y%h37m@CX10M#J`z>9XVK)?B*wz*e;7kp*is)<5|5iQJd6Ia!E{7MIn?lCaRbwy+X9X4iVO-UUh-jQ5~&vILvaoMlp9m z%G@ES9>={mrt+f90r7QA`86R{wCaD$>K}URvWhN9#l!5C8I@7xIq4YvB({TYp-3ZABHeE*eamR`$heA^fTLDPAm2vV~z ziD&TJC(-uhaR!>u-n&>n8usXQO9-sQ1IppGW30eFkHCK;TP!2A{zHjjAE!GGLihYP z!yK^$L*tX&Sht?PkDZ^^Bts-z?mw_wC)9^V0p_%kVZszZ2I)zkpWFADTGI9R03nY8fgN``BKfBx<&0;wxz4E3;xvoZNzg--1IV zy6`C|Xk1X6Bi1&Lko|XgOhfZ1y3zN{#)nXB^;>j*#T9NbSfr*~apZHb?W;&Lf$m6? z)mGzym2Hn^OW}c)tj1>Rq)mToW2&!&t8mV@;{jUNjv`=>vfRhYOhB{y3c zsJPc^@|vhFSk^Cwt@ung+tf9zENEHQ#|AaLb8mju(P&Cz;{GYlv>9sRjxjN9xiE3R zp|I>q{A?oJ(p_U<^s~4yo~w|jfo!D8k2mo=(VoG8HqS)UO2@eKn+dc@$GGEa1y-wL z+<@1RKcZtiz_y}gs$i@HUcr7euMM<^O#^fEIVz@Gxr3v@1hk@c9$Xhs(11g{Lduw$ z@r)iB)~&m;HGOIG-ZddgKe%ZEn*=)i$!Djyqruv>aCo3o`f{ak`kjYx?|HqXq{+=p zueBAC*aSXD-_b|w8lsQnb(;!$DXpEnCVxNZ_zG7(j_Y^-H5iMr5v1IimsX3Qm&zeb!lh)gC%RZQ7cr%Q*8WI*Znw^N^x=i z?q!m$=d;x-WHwER`FJ6)Z>#`ZSV5uuY^UhSR~>V;gz3LtX)h%*mTzvk?!@0(TXbI^ zBOfZZ<+&L@&Q$UKMi!b*`u-Psf>Qb8gOWGff89vFbmKnu$BJLx)Yap>iYUU&A+k02 zbz`*N%4Y33X6%n`e``ag$c@2qWCP+|GhBM_?|Ci?j5@ku?K3j8Z2X44p)YrsfNlpU&GI5{I74RtViny`S!Sq(6Kq(-of(@o!3id+6`A&#;qgV=$GC3d#{2Dl zQ!(expx@7C$lDurz6vw0{-3QiiPcJ9X}N!9>_!|kJqwK`*a6{x>8F!Bw7aK{xnjDf8exGZE_y{#a5jirex+<}KvaGcnwPxs!r1gX(XIZqFI}BUspEfhjcN6hF@l1{IsZFl>$h2?1z#Ms-d8>ucNcz`bPL54+luQv0l^CP zK~BG}+(H{f-|VEmg9<#;d`tn)oB@R&-qPBtH9XUJ#8110PCWLM+8PB8ecONe7~WR00N@HhPkiH=JRex0=0b_@Eiv|GltvJofqUbi z`YGT{my)eoLpisyExR$@&;){`**Gg~V)%`_nuV~~+k7e~lU-OiYAWY-y!JebyYvZ; z_Cm3+bM;t_y&v}wT+>HutfmRY-S~vGMDZJUmjI-M2g>4Ejaj0VUEc);)F2FDsAPORoph=*dq~JOX;fE>`C<9bp zF+l1;(Bvr0C}}D{MP(Yu!xatFXS5yF!SiZHTe$b{&eL#{JnVK4)iUh{bvqgb zxvIU)+Mq`kVHP<2jPYJWAO2g_knpnS_%f+6*qtO1h%D)Lb^h}6%L6>&1@yjiGDhNg z)ZCW*_KZJ4wft;~e%#{dU*w$r00=RAq%9IcoHWG9;%z3kAe{3(h%wB&#m+fTil+Sd z&MiK%$nJi6R#zhQ#Ch9by_YUr{Og~RP{z?j zG=nRgW_=(fq9o*RPjc1a2*lqWPI+LbjQP;iz>cm?{IH|)OKtLn}xlX&5(X^Xp^%_0NfC(Vx2P+y&?5gl8Gw$9P|NY|>c% zL=|jdY=WO{hC6*-t0?&L*LFK)=BTCP;SwO;Ntubw$2`z&a_+j zS0V(y&d_6L`h_A8tO!KVW<5p^juJ7ql>s=n|DoFuW(`+{4MFr+B>4k7DW^q!txhDg zWqhreB((SL@_F_pJfHL9=jV^qj?R7+`5UrBv!!q|Y$U$)?|Wag85r?lKgpVc(#20r z0_+yhSE=mXrd9UjrLP&6Xz(O$=-)JH`h{9=hWL-LS_kVh*gq+T&Nk>oa;BS1jhEtw zq&C-9Q6h>hEc9DENefmuPUhUC;_RibTMU3!F_}ngc3g3!CTiZ@Zc%ztbmbqdid~G3 z6Tq#Jg-EO$TgT^}j>VHDk`tfy|A_tp^{e}Q?lXE1IMnc2AW(-SwJnJ|Xj8=t4aDzQ&Q%z&kH5%88D_&Hk^KbgG5Sk11 z1A&m&jI2HVtXsfKb@~}cRE4xyc36NZX@!XK6z*LxaLg3Oc+WJqI1Q)CDQy@%MN@xj zn7f~`|8w+G?g6U#GgF}*bGy5c7u*%z_(X22-N)NVC?)WjYxD<&{OYfBg6+T9>{!&% zc>baJFYz@Wxah7bZ1I{lfs`z4iEvV!pPxYSYGx(fLkp|l71~8!xmJTt_oSpZ?cAP} zEtpByD1S+AyYEAVJW9vjk?%$8BP5<}a_^z& z-5&cXH+=Pa@JUYWJ5GUjoRSZvM&U=V(;%`(m0#FgOGqZ~6?sH>t*)H*wGw1FPn%XB zM7FOdW0(gYAYp++vBnDAXdcVQI@wH0UVk;es#3g7CHyvTv&zr^u02O(t=Y6znsbR=*!LpSEn!4}@x7D=Qe^ugD{hkk@A9eH_B=oa|3 zVMh*)n~|qfyIUm{X+%QjcuvHG;G8)4C*-jZOYVJ5Ikf6(Io8VTF@h8A3U}p*#sRuA zkCC~22e)8(XRuP*dth(~tO;i+`v7*r07}9rsyqYk>&BOF8nV*}%x4)N3Z}Jvatkw* zSsRZ=rgCKwHTpN~UbxM;*S~6JTwI|Dhp=W;bvho-Kc2@Hu zv#pOJdMilESP!V(7bKQ@TC45AQy2cwjoMV!O5aqn4qm|h6aV(cGFmItG(GOU*BN(1 z@AO)71K0{bbLajFd!>!kwt1Yu-qpE>r2$NGW6%Buzxm#Qr=04+%2UM{APdJM`U=_$ zQ^EN+M+q}&XofVPE}QVHi;2&? z%Qy0d|8!R|U$pKd^5pDDJjVzlAweR0Gz=etw z?WGCgiFx<^Di>QI%PXoO2izy-g&vS9pPeC0Pir8NJ%v@A`%i%E^Jp!zzLmx;$*}Ll zQZN&nK{G+}tWB)Wk8rHdnRINy82-j{G0VFcWcnJoIYRm~ah0|E_;68S8^6EQ0@xHE z;Qoi0CJxXXLH@kBk7sVUmo<$ptYf!rHdBNxXrA9a@IS0x>@=G5bn(ze zGVCA+dv-Otp_MG9>9J?gyME=q3;6U+N=EMAqPV^#AF0u~OEF8O~`F`#;f_>rU&L{||RjbZdb4m}lSKu{> zPipXjteIkQx13CS#AFvA>D&Y0?p^%3AGwMneum}WRC%@4QhbRuzl$$0&a$+st= z-u|HL#t@1ZN!!<(xH8@^cr0!%uF*S)!~crWa?8V-G|-6nNs1NiGq-30wK{f90_zhj zk5ZkEX-A!WhvqM2u$XV@5{95xr2zgETf(?jG6bHfx3qb{ZQDyK63k)aj8wA<8-WK0 z&Z;8PV;YP0W8rvR_iT^lx(7GBhW$7Gs-0!>A!#>7?>BeeC~)iifsx|}${v1Tp}+7e z3d!j}7(TK-|j0OO9GOoQ>WnHH_1CdG~%v&?<#7oCCW!QRQnhVn;! zlyY63L41$J55=Sci>P$dne`i0yDkEk?#G`$jmo#sQxLv3#t;KxWsstw0CuZ%>Oj9s@s?WEJ2s869 zA?BxeO+n9^f&jOH*Ro|qwVkzlUM1uMt06g``P}K=XoL$KhD!u9&i#TFUBim*ZReKK zocnDYFjRVcdgd~^ZJuFak9WY43YxF(ZD(4%oX9AS^!gzm{GaedkS*Oidq|JTmPz6p z|2$Ten0&Nbc}BO-3CtI_Z*Bzc#wabr#%ROlIbYS{wu_0F$CK&K4i=U~RqMTgM1&IF zT?Mf4iDiwZWe2v%D*r(S`=iyls*@%EEl8jftrisM!nosoRG=<_HpAOgTp{QpwLqIm zxs-^?)83c?0nqkB2-Xj)$4{(-=r6eul-DHa9pck|+Ak^ZVorOnA}FsyR3^R;2<(1I zsr?vevp9&pFd7heVDh_tzx9G)>x}4&aY%?f)=ws{?f>#aTwljravlsSj|_I{D%|Gu z$SwLZxk)=-adP1$Nzz>k z-uOUxX;9zaMm@W8Na_8EM;DbfyaaFjHyqpvTpo*m zH+~FNM6BGV47~WbZECZG5x#GHgzWOuU$zcZ69267zi)iR|9vvh^cX!n3({r(X?A52 z^k8H2s{5x|^nHVbPnh7>FjnzqpR_N1b63Jays=cZVoT}j0& zdghmnBX};hP+jcUC!jshOL{MCG_@DuyUEhg|B_~9F^aiXfO?~n@HxGR8<48<+ZW$7#lp1^jmVBXED!)5{J6$X8mM*Aq+}|R)MEyo|f`emL z2&F6gUE6`RZwdBTsx5-rvgfw;<8$)66SHTA8+N{x>=6vn<2b)5GTPHM>nU)tUqq1! z^PqO;ZPR+p318s7)h!lU98?|y~)6=w|yohYy@&gy;e}&K4nqQh`*_HcZ!jJH<_Px@3x*KP~BYx z8-U(aT}fBc{X*J2P*VJUlMwQGmB@#e{cB!K@;3=^XbHtzW=cCjtDj?Js-=CK`((9l_^cs$53U=J6iu(!#S$0)8pfNw>H1yxJop>)Zw3akZ`Q6I zENIbp*DQ=Y{qmkM=_iLwd;4GU!`~207@VxE*79_$=$ab;jU!p|FMnlf)^C!x_alhb ze`u2{prksznL2u8F3xrm-3qRe6*U zrVik!de3ouo5;5Bn_F?;1y_dTtaywQ#%>fV{a1zeBTD!6EKXJ+`O@;T=vOt`7j>O_ za=`z7+`Xh87TQIVlwBxLgHi{`_nCSA{O#5Z`UPKW0iD_j>suS&NGWs?H@_zv`S-_< zMZuObVZ)8!JScn!q0;dH`Pn#;FT*K>EMv&5u2TC@YnG)Dgsube?&8M&eUd>r>H{)A_PXjn9U0Tp&Yi zP!UjM$?JX_i*rd4Ro>H#v;MTRr*ea+m`0NF2I2;(Z&Hh2oc`ZVfJPDWcM=df}lzO z#Bxi1M?zyDthndP+H4?Ya}GT<4C zA8`eo^3yNn-}lOoV1L&p7QSre{mt<3*DvlR2jE=`NqYfO@vZ0jGtt@9ej1G zDr9j-6X#S}!AE!1>E!~&(HFVmC0W99;cQxp7M^9sfyBI@k$D~29nA@7mBcd^@zm$Y z7USps>dCQy2z0beRW|cZy1<0jo<8yU>2IoIo1E($`L3M=RcjHknFLmO$$9`iBVx^fcyq60F8^VTzjQ?66i;C!<^`K>Y<+ z)K7&78E1(_PZuHym!(bgbb#VExo)Ab3SzdbB=jfgA`OWC+3-@-Q+B_v@`g42QvxTsubVOQx1O!`Jdz8vGI~`AUDxP< z9_&w(d;X4Ltm>SnR&4D`72n8h>e4c=Cd zEB%N?BT#VVNf;^FZ~WNkJ-EswsW8E8v>Rk~MB*xGh`u01K_v_p8=GH2cB+}n%nw;q zBovJMg(vi?^fg9Z?&&86y#$Tv%#F{h1sm5;VdB)hTg^`R#T2U`Rw~iR*389NJgz}hrk!6QeGPsI_N!r5LHv}o zhQl=f7;Eg0SQHqbT@jlPr)9sBIa!0S2~SkhU3`Nqk35eQ4`&`Umz9US8hamUTu=pj z-3hM&C!rdggoKL=Yiq!DC`rp#dT?@ z6(bZkmF9rbS5*>}P7dfSc3Mh+jaiI#!Cu3(@TOUkfywkLAcq8drK|D_{VOiWY+O24 zfbpYLfQv0{oy{}zI~yR0AzB%bmC6R!pkzT5W(~8otY>Io9tFcu-{AUC7B<*EWF1%+ z#fGqix58bbMVi$G2?Yz9Qye~I3fBq!pe7}3!V!!i*(+|Fo^(w zCJ-{(IOvDg1MCoX0h@;@LMo&^x7>8O@R&dnKou-VISPRV#6qmouO)fn2ZO@#(_$GX z43Tz=EzV7zJi#pC6lIXrSRW8JDi7niTfbFd&HV*xMlqOtI7De(;mgvO+Go|b*H7m+ z^|}b=O}UoT#$-QkS7AS6|2-TEn#reM1@@4x3fyv;a`(`9fFq*sM)CzriAul>DZ|B6 znon3Lj`)@$j$Z4`5SZSZn?l8p;u<5GcwS64My0*}53}-i6&yu^nR(*2SCWs@?2ED# zaz)bqU!+vSd>i=_)XZuwDf-$vhm@N(@3z@D!jesl_tNt6nYpmJ?^| z=HubwBp&HJ64Ys!>BjXXitP*vfQ9w9%^-O7cdA6SbIPVJ*b02Jp7dCzHDLV}UxIIE zM%kKn8*lrXPI4W2Nsa((ONdmw4XN^f;x-boD_|MZt|$O;3kh?9c!JhO1pD^*+So`G zeI~~lh&q!Ja}BDBf*LQzBvHQ7rSVbv%(&Cn-m1)L zQD_W%>jmpD>V|rdml{|9i#Z*uiDwq;P;X%47^I9e{s~54rHF?6N&7a}f4qzytN^M` z{G^g62;EZ`C`X9S2Qv4Ac)n$ltNT+hUOC*-OopfrF`MtX26}b~=s%+kPFaBVAuKRO zYO#WJrj2qLemPqN`>!3lx;))$55wbl&Te;$z?ZRi+#(Fs=gUE&cu$xEC@w23C?~8LCjtnUR@0Xz>JOguPX3sd`X?=Z0`sW3u9LUe{7tR)u9qF%4v2TS=3)!2;NuSixRP9FJ;jU>G z;7oXPtre(7wxqQSq{W*tti%;&{1S25O5fG9ttep|P*y*D;mHuY;!wP9_wqtAy?0DT z)n7Too^r*cT+?cFP-XPXr{9qO#_m=KzXqj@RE1#6RyAr!j**lbvxwP0@T7NkJA5yXyEBfzFHr^m z1-})KS-ZF2_n5ku)k=lo%6kn{_NA9t`?8ie6O|1~1K%^8bb35w9Wt87>M%ja9py#X z1&;fVZEa@%n|vPNyo>ooULHTe)_zPJh>9c)0l8F6ICGCg+)Jq}=L*LPRv&*cwv{F) zhR-J`fXDXm-trnyE4L)oaSEbU2q;bq+cj0N$O;YYbOF1)ndfUnmOPWHKLeQepYaIO zn|~m6@f7W#??77+i^yk;)T&Ot*oZ{FKlao|n?HQ`O*wBinZU=ExErY*sg7&%*QNnTUSam=BGK>ehIM}FiP^f|<-FWa*_`98 zQde%tg0tALsGC1N*WvHaoEABWdQWl;_A8g=-IJ)qE`PsXdGL!2){v9CYbA_;koO9h zW6K`k@xM9j<$EM$xL-bvv2nvtnDR|DE#P}Z$oR`-UX>)1O9b^f@t~6>#h_Ew^DGx7 z6LNCMZGUZUBqtf3U=@XCJ)3f7t*wCsZ>5&`mM4vHHLV9zvs+W-3~BqFd6(Pp2$OpR)iGu@2TA(GslRxCAn{{-Eq|my=*w@-8*|Wo-W=2EiU=YeezS8=FO6BUYZwylaaxp;f@~HR&B@2 zQ3{cyT7^4p)_jes00OI5Z~Y}(E8S{Y{dml(>@DG*B|WmokiU&Db%suUJg;=yU+J;S zxDBoU)d6$oZS+uSK32ceV##GC?Rvn>Epa|l?)6=3QrQ{CUE>xLl*RLL46Q~3{4OPe zn-@6!=E#G5PQO;Vc5wgtEILpOZ|hpJuQ?tOH&Ad_2RB|yjtJ^uSv^kAk z_-T5(7wGCCU-KSmf$!YPa6!fCq`_0hm=o<0cd4&7bTQ>{xi6t?? zg)wK%zV49(-u0&8ztVkt!@c0pjRP0atD$6P5uvH9=g^@+BNs;XUp;@?27Nb)^;bJN zM|QrfX>oC!ASw4|K3PjUdX-8Cc=dE7M;3mvu?c#LW^FnBKR6|Ro}Z=wHcY*HdZPy>qcEECQlECR z;m%X+=Fq0!jIjL|&bxjQocGCq5@J3WJz}!>y)vrJy&6~RT~%#>hH=^szub-fn@AQ> z9n|LE_Kvh)hD~MVC^B*>?UgY`_vq;!Wl4)x4p_UrkC!Bj(ilJ1PS+=P9l)Vvr(K&o zP_D&*ei1iHRb#-yD8T<~OaOeS=!+2$dZD*H3_`}q7FV;GGS zYJMc#^fG^EO!U8lXfYh>5mh|?-&D~*SCPnsXQTHw(H0(291PgUjg?@C<8%#tmF;ec z2aZ3CKoM|Y3$TN0Cp3uZ4AoomNaN6P0&J{?2Nk?rhQ)>_w@-aFIBp|T&7C*xUVgl3 zn0_wBH7zh0!2KiHLWQO{@3)e!L=yfCa_O*OUBaa+z&A*ls@3i zs=E^`Oug19_F}Q7dfrLY(XdN>1@%7wML@d0R-JVTqoq6OZ%Vq}#+u60V$k+({x8y{mzwXDj3M$b)^ zF=+o>HmVj@tbf+1J}JhjH4U+`Jv{2p)mek0;+3jB=zFOpO=xVbl^4``(DJtweWJB6 z>PDNUB{X4DlsQfsD^r%C6mX|y4e3=|Ib5!eA4f443py>J3M)c^?QG+DqcFo^)O;fer>!+Zg3QUW`E z-o{7;Clv4uoF)KL@NR%6V5k6W+^GO5-P{0FU5o(fyc7XvbI<|>cK`v)f5-!N;~)>1 z_yN3s+tL6ISmah?(j%Rh9u1CYj~(e672}-NwI8|f9OJm<+;fWY)3MJY17HZZ3~&b)`S1+* zZVO3ooVd~e?%pE+!NRA7{Vihf0fE~b0fn>70Y|N*y2W*}zzzo4a10D2(7!;otAGxW z{?h#TwJ-t0YHR_Df;lDpU1;nBbz+19FSg_WK3cW_W~~1JAF%I{zou#cFH zP-(mkpaye~0ya-sfZ~8Sq1Zd~mZ`u2^Qlw-8AD(%b~C)#XE^4l2r*Y})ETOjfEl<+ z`@gf)>j2g!-~d1-^Z*n|>VP9qwGv;y^Be#&Qz)PhG|s>caL5M>`&J0sclNj=ZQt{g z&;Vv3*V6pW&GrCS|AFy-l+S_yI8HqP9X{^6*0sEF~BWIU-5G>zz(UP5C+w9r~s`F-Y@hykAM?taljGmhX4y)yiftc19ZQ6^~HBV2ox4T#9?7I z)GUFH!pIn4SpyA)kR|}K1j7pntpdlGuR>6UqbWifv49Dx<|spIfDZpYi9$TvGyHr?gP5>Nb>j2O_^Z;1q zfD+yTEg%5Sk-h-hm$CuclrRIoFfydKGtJ_ysVL-~U?6+o$UNQ}~f3@f;a zC9k0}Dd0VWlV@DI9f=XVvVz0dB$zsyM_)Y5-*^7y*^jqyVu~vqUwH192_1E1}uwxpa6sG+h_R zBrlPzHw}9z0jJ+ zQFqheILXw{k!IjDZwk3I!R1#9bq{-AMOBtEH(`QYc6wVY;FL8gZNy(E@af;MLq3F> ziK8ttf{OeNVegByDni4Fsx{(o_j2<9y-_2;d!A8UOa!KDw*!&S zVhwMIXu}2&b!x(46ipi+TnqP;RVspHGR#3t@PVA8jKU$7t$b6^bksx*d)En{euNO7 z{|Q5z*r=hMJ+gI+&C}c&@jh2PMUb_Ghej;T^lYi=kzI1C@UGHuUKIMK#a-v-kncY` zkoh{Q$BpELay2bbGfs>m>X&+R9S#ax9L8Lc*HF4`8nU@3 z4#vvnC70!t5@NPjNr7eDTycwJuwvMa7`AQ3Er!vHVTv(q*bG}Q;}*yRTFsTyNYgys zhw6mhw@u?ePqjK%M0k$=1`XN-pB*sGOR?=V+{Z^<6ap6xgUm)sTSGMHe`l9rz`!mH zBPW4W^-n1N_6zSm8_W+?IOXNq>0+zCMC%V zp4iF5N;9IFFsghh0(V3TRLN34bA)_(<8DfnG<^;nSAfBSyh7_vS%7XG6+G4-UC-w{bA5%|c>jY;^AQN3J;4kc0=H=<@x^BEYmZ&HG5= zVt!hPo_QiCoBz|ui|OHY^zh4lJQbQw&P^kYo2)xbYQwt^bh{N%G$baY`4>*#w^%&i zM0(Rw(HBG$m9d8C&nOuyq8feH22bjSMAS)i9>%g+9|6TP_kW zl=~oMNgo+fZVagmba~~ON1sU=JeFu9X7u4kQ7qLKOCv-aA!S3?oHxSyZ6Ho;q7EM$7HDZCKJv6_gRg$t4lBizu4*L`%BK^6dKIqvo(F4|q@h(Je2H>t&fHEkAMZJySlK$x zEd2?_a-Y-(CX#+k^6#@*W0usLQfRZOoP-;LnT}kdclqV9$}YDl-ELIe8-zT^JS6Cx zOyg(QId!>pIc`x1v|EATW;3wIYfG$~ zc`N~-q?FXuj7$mCNsT*hElQO1odwa;#|O8;3vdcjC`t#ONgjAvGA+E|(&ZbM`CjI4 zjP~AFaC|EQV3rzz0mOBO@tZ6?rootsFvyk*0!B*E>^>zZ_v_ujrYi<}?ZANLUIY^c z~Q#>Pj(U~U9^|uk7?VDK#h2s#M!Ay_#Zt!?*lYE=Jix#GguP*ezPA ze}9qv9#}SK;av^oPYx;@>UWjRQ@nWT!E&Erh+5S+T4{hD((ERgzaCC!jx7b}C~;_M zqIM_L(+!kX32-AaDTg8nQwYz^_h|* z?L-|i*BZleO1ORbhfGVXPUmGzt6p(3_ddy$ZNpFD_Y^$gw2?|lNmt3$R(wOoluYZ= zdClTT32WSgT=(-I`g5O=_nP#0j{UbucPAti=`DtY59$1;v7OZYJ5R)}r5F0@e9^WJ z+Ap226Wn3En%12c5@b0ni6c{9`=0^DrHu@$V#hR==(fmKpsE$4WQ07U(l=K(LPcYh zqk6`X2c>$my!fqASjeSkc5`D@+#$(q>fTXPcxV18n@k!gbQ^@-9Dch>tJrNB&};I?EdO|+S}>4a zGQ48FfcQYRkQ|__tf(4VMCXRehCuK|2~8cF9)8Czq(a8Hg5P+W~9+1a4` z6*Jy*a(5{N9}=+^QxZ#z+b8QL@?mW!QdS5)mAAB8miHL>}2bd$mI3u?kPq|9>j>`oD{8TEmGVPuhO6;^-9E*I)rwA5c}Em@$u37 z!|liMhr9>nkK>;oA5I=^pI|!rIet1mJ0)#J$0+A-=WPx}4vtRBPOKbyos^vrPOzL3 z8^)SX%_5Dxo9Z+#H-$)oj%ZE^$P-L+Oe0L=rHeUJXdy$A}oYGBqiZKolJXo1~&Q^sB`ID?LG_5Zt>sk_ulG{|qi`pJEo4z@_nV=-ReI z@Qe2^nvsZag}2eYG>tBM{qi!Ook$ag)9edslt*^aCq2?6Im?@EYVgu8BJU;(kN$sSllSXp%M2di_D-ex&IR0zJ8gb#wUn=`|MP4Oq!$)#3ahrnqp`3g?#qMAuTFUMs}Y#CF_w zt5xN{om<=0g;DeM3rc|?E+Zi6c!H3gCL4|s5CC8@>E2UMWk83)hWT;9{1GUjSN;W`4!@Qjfy6zl z0O#h%RYcu8k^fUC4#H%2Y+n~8KGr!$`HyB(`}IGf%H=E_{|@`6yzzwW_&O8{TLm8o z&zRrGigsWVTK*^0>Z`uapuTJ~0g-h(f zx<#CnA0KttdQ3!j{@1beF#2OX&4!V*) z*n@koPZSk|WU7j* z@QRGEy`LU3fXJAc!PY1grt2t5;*NPB!bWQpO_kG7XYFEc&QA`rb{Z{A^#QF+S%~U# zVkl?CoMxS*i#Sh}xMuTRYIE4~ETM&2(fzJY`!cJ<{Qbj^b!OmZ)kdOOL7$rsFAnWlu}=D<;fUoUxYYXhB!zZJ zaz0xr28XmH)-job89Y#&CZgKVBwZ+?L%w-=j_VVyhejSF39gob&fCpn)qkT2DbDXk z*^vi>BZ$N&^lz6zj-UX*l;ayyg!|kWMmll%XAmlc!q|W!D^WsA$ms`E&KnW*BqRA$ z`y!6^i;9evmU0L>AD#}S1m>kq6>?`B=Qq;1idt|uZiFJ+P8m+nRsIv#U33YZ%z#g| zc17cMJ+k&y#Nvfyo+O?J(SqroUB-SeJ$SZ2UsuA>2PClZAM22DA0yTKdL*W7+9xug z=*3~#KZ(4xGa(M;#uMzN=n|+x_s0SVp)jYUR{GgR9Yl|sOi6p*y6asP`k~_6p+Fnr zC^T`j0aO!sA?CW#N zF!R=?8gx~i`Ez*+)Yq#)ww96Q@M6+C?(kYid-qF7?t1-c9mn{sBedWJq;`D(T1R2l z3draFbY&F*#y_?!Mkq#2;Iyy^ZWbGN2yDZRL_lZ?ey#xtkiZe}_EbEopuMBq4DDh- ztjy~&6FM*5rJSDufqA;n8+%Z6*3PqyoYF?`CfPJH}6J zq-QPPmbPjbs$j=MP_eMT1_!nT

        }Sj2B`TwI*d^qb9-QHahAo5Grcy-5U-|39@#! zOYh0A#yBHTlM8BRF^*KlHrbV zP;a1Z+I-@cs#SymAmH3VVOn8Q@|o1Uq`(OB%>Cowfe|mh&@A9hQ)aWv5xuEwxhBoHGYW1Hr@ll>Hkp9G_pFSa&AXchLvyh3k8 zDde950LxtS>Sk!al9<^``g#rysm+9aut0K7BT3YZcRP(b(fOymho`ca=#9iALVMt0 z8du_L&>z4w7$ycj#IW8kFB5@L4p{9MnfgPsRv2F7U-!+$xG|Ayeto`g2!nOTLB9F$ z{RQnxNMQ~mSj9j;ZW7Au^OE=y`Lu_EPMCQw1OodAGCltP0P^$A;v$_rTm#G8f2Lpz z@(+}REW8C&cuP@X+yNn{+DnTE2zpQn2yW}QRfvlycI!UY;^ZOji;zcseolehCS?c^ z3kWOv@D>mpA|w3=33s=D12~B*KjO92%lNEKWc*ej5ccMe=#oL(%{zK~I3w^Uvw}Zs zA6=;xX2aH9r3J_%+Ls`XXCG*U{)`A4aaaR2+ltI%O}MRWA89O~Q%$(7c{AIJ{pNdd zU67mMo!pgYZ~zHyAw&$5hYOpx;IIN3M3_Us1V?%mAWNONmCO+s5?30I;9yC>H*aVv zG;S9W8aywiD+EkpL`HLcHHp$R3H;QnqMe28qoJOEF9og2itj>w#FVd zmtDLb?Tu(a9__MfZLsR!k-_*fek{um%))`pg+7;Tl)xERVa>@1`*?5&Pa}y34ZXw$ z0b<=jJiUfq9q-$;7xx6BImYV~CJPiFxx|M-Vwh)nl+Z=N6|}_Cg2hE$S+EPfu>F=N z*cLAN-axe+=74WMiNFPlF!Olo8gv9;eV`O+(HY!ML=Gxmo5aX~;`y^!nqWA*5#mpX znANW~H*qyxlKsE5WD3|YhVjAjnXP7#g9L_yN0>EQMz)j$)9p?DECwymp0*e=GuyoT zttxSVDm@a{F^mn!-NM$@fiqp)+2aWnMsN>rx(Yg}PTPVdE!bJJVCbVIAZoL0vu?A# z^znmEBPOQjZ5v!a8Qqz$2PBoB8Nk9eu~D|O5gbgo0NdW!N~uGLEqD6(h_)m7Gw*N7 zNY?Iw<9~*gG4uN{^;*+)$?~{bkw0nr4lpVg}KJ1LE@hx;LXA6trQr zo*XmGNyj;-Y01RjoNU|=9~71zfmp?Vv9IuklxX>DalEgvXKQ;stF#6jFm=D)pKFKU z9FIJjK5lSV@MiHd1I+QnaA!|3V9|p5$2+8KY-2)8Jz$!+E=LiA&dM=EOId6h)Ig&n z13-Z2#`Qn2D>F2HyoQOVfCi6RyAJl%-WrF_uiX}a8=Cha096%d(fa6%ZBWv5fuNv? zroP%@*9g>@<{TA{7$ZmfuF+f|o!HP4tOiaDGY$fxb;k32c+m$`JDqU<9Pw7wZ5k;v z9X_1l5lsV+s=$Lof{UaE_)|%V}Hhws6<>NJMsy&nr!T&`A$C_$M(6R9(C`>&UR4#iU&N<1vm;H_ewDI3jk4A z(ZB1GPzvS#x%Uu+J9<6j#;HQa6O(uRv* zRNFvkH*_$Dfg1V(*zN%Gi#!0{qhCkUqiRvg%_1oFbZh7fZUkl~-~3vEzIlR3#&~Mi z^8rj|CvW^#v!macX8zdB<7fjL;@#-h->tS-mUL@x*3ygXIyJZJZL97hkIYk!P7c|X z_J$*(D~_;foa%~%Zq1787l#A}?qVczMQH3>H-W6};A694?Kq3M(g#r5P~Jlx4_7cX z51>q8qfW3PAOnoM$7o>`v(rei=)Ahx%Nz;o}hJ17BXt%`1xVcdPS4m z?4Vf7ds7j&29Ox(g1lZO()Z9MUlu44^6;7vt-+EoT*AuBi^4@3m`d-79Fu@sPkK5}e=2D1)6!jMjXpQEs9A_9ZUVFZ92^R~ohr>kqS>+5pwJ(*mgz?+ zvw+i>y;~5%~}C+?^{8mF07UC zys})E%IH^C_RyM<<5a!8wgXcp2F({k0?oN-2;?frR1~<)1vJfyF!o-HPLzZ zd)`{;C>@FtTiBp_{J7g72-YL1NV;0^bWAXG+L)>`XUtpBnnC+dI7!w$R89s$Hd3ia z5Gf{zjN<8pC`Utv1FI7Z$%Cejn_^D2Ss=)^(0{ft0Adp*B1=B@+*N(os6hr%Vo?Ug zraA0X?5j;}9dT+3{W{3&0Ks`n4%iBpv0#%vGq5Y9jg?mg_ji?szpNYw4?Xp&4*FRR z_b{tU?#KJP&WS_+h>6)ZYW>^a>OVI-H+FedU5*%n>njfPgsT0jGKJM^>Y%902>X1Y zRDVDly-GZLd>pU!qy;Ojj+iW}tAhcMqNFQoq9v!G1&Ik0l~E4b@yFxA`Btur-BiIV z19$lu#asn+2Ml+@5RxXf%MI=)yIT0N)C3wM4i;O-NfXw|j^~tl@7E7;6=|cRBbTx5 zK2gP$o{Cq9=~G6pE@I3T_8OqG1_QJm-R*`_Jj>H_4Q#HmI3c`1vs!}<;$@uKve2U| zbOa~|Lm|e8Sa)!2yC~YgV}`B~PD^M*lG+kVsN8VXsL^@jUB@?tfz>uK#3W1FNNUld z+R|q3^ErcNAYcSMj~YCBSdb6p0+3$3%A4Gv8vkou_~>jYzs|}P<#!kOa}4aELNPL? zV*AY?U~}6Vy;~{(Sd5dGhlyRC9fsD#e%P*6W4Ly0PRi0fimd4DHn!oVv!k%u+Cguc z9mKYDb{g9PDL8{hxVW^8NatKv_cyPEL+W8F-wp+(?C9^A+foF?owi1`rsSg+5I1=) zx1nENTx|DAWl|+nW-xEky+b!uJjB_I2FE_6-A3tBGYgS~-IW-AHr17dDn|MS0I8e? z0B{GZ%2M;rrQ;bn^n+-}C!XagDGKBzHGSubS#z;Ks2QSBo zKF!GoCdw{ScSGv#?+jeU4bLmk+ z+p!D3mmktgeE2mDA2Le{iMa_V=m6Bs>2%d(8Vea#>z*0kN#CntAgW2Va;E~1(oMj?}3~PL~v{7ecP^DmnM1y5P&vZjyITCUd4M9sqKxJCm=kIe5m>LL8uJ0D%ZG2&S@z zBHVl#(z9}ajjBR0B8~DDcAjdsFE~cdT=?ZHCElwa^;StW-ey-fwTWB( zEh%Hb0vk9W9Qn7eNTVf&kSJoJr>7lh=@&i&$8ZOP2Vz3pLM5D0g*`VL_%C0n(s;(& zO8#zflpHT6F8|@+p)Q?xtp#}O_Qj!SQ7&FMo)u-&c1#Ma!}%_BH7l#Q8~&DnKq5;p z!%14um^s0-=$8`*m9xv1E-7<#J6c!obwCJbpfc<`k~bVBSu>|BUba;QfRvsCQ=g{X z0I}+Vee7BEf^4U443}2h>Pk;I(0LfZ^V2>~SfJKet)i{r ze4(E$@3XBk&W?>Ujp+n&`(ct}bRbQ~z~q@%x7Y5huYiIs64Qs&#D98~5JU|U>(%D~ z&t+i=`j<-h04cisCnda9({3If^6tZpuuE`GO}DDH3}m^qhOivYSuBF{-6mH$&G zxI(D891>S}VD)=cNOIj(yM#E6BM!=Rj2#sd5Yfb5X|SZG4N;ia!&TW&#u`hh_nk3q#^Td%%cq zS$%@Z1{N`ogmBzJoLbPB0E&wd>xhZD+K4CM!=Hwxei*TKc-Ye89xJg|o^lg0b+LBt zA$t~QPu#lLidEgMzpC2i5e!P{>AI?}+Xx2?#UFMMTtX05@&1tY)>6^Nj8l?;5xu_j zs@*~^?_~2gw*ld+`P##y`KymL&Dgx{Dhm6Vq8@#H*rM33A$fK!k)BDB0+^0%xTWBp zA{N|TaF!$L+h&j`sCl*J|9e|__OXT(-@hDMJ&l;-(#Pn$J5$l;>3yFZ0-;5*y$C~L2J3) z*oJ8l+<8qC{yo`)st`;pL#zzA^m>cgh+r4IF%H^HD!oplJQgpMAIG#vR;HjuQzh1< zF(dE@VgbH3x^Wy%rMSJTc?-&>?Gz-Cnuhl3fP}tu7Afa=6&R6UXSMO@DDNEq2 zLD(<;;7N3N;$qzD{coS{v$cq3rip%*aC;5g^=5@?C3fR9+X{~KG_gE=}& zZMotYoGWp9HoT+MJkhXr7%wrvE&;fmb(o=uYdS!7TV8_M$)~c~fT6hUnZjbjRYWLFE%;pI;`R#*4LZ@uHQE6(xWL`xmqZ`} z;=qQ_ab|k#IIUZTR1`EVt*t?)M7H#-|1dRw4nV&0OEB}UEu|}zVkQ3p>LlG;%yoHT zYEk4)EF_(1$6$HLy&{WNmIJ%cs8G8^v@|bt%Z`JI$Z_53;;YOo;Iem!=~4jdvHzCKLeiCX%O(1c`}PEwim(~7MO_>&K>+1)3&P7_NrjsL?e|y&ZO8#2o> z5$xg?payuy){_A!13YcXNrEHmJZ;HAi(xS*g^jWpH5#B>5TStKnMG=VRD`wigQZk+ z-ja|4Z4jOrlo0~%sKLA?{F=0)3T7Gw)w_ouC(@v{ts6VK^FJ=iJi4&r6{Tap+A#2#8utcd5l#{X2&#H<)ak(UyPOCc$*qAb^fs~lw#laz5Gip1_-P03HO$GmRbx1elZLh zF-1QZgnBV)z1idLC^6TnfJjfU;QU~l7?Yzgez^&^*9*pGo2%|tU*^uTnOiXC* zjW$wv3&@Je^Kd4a=zfd7Sol@QEY*KN=C+SvBnc5)GG@jRXVo1#=1ml+&w(ijC399# zJ4oFn+CcIDt<;c*O)r{KA1$|qSw(EN&7~)&5Z6oBO?(kgPEL&^iR`B>F)v6o%5Hsb zX>k9~yiGdWO7lu7_31Q{} zF%hS4oDoyxCJ2di0@pi%64p$HcIC$;bYK~sanw)D@N(s)K=f+h33P>T*{f#xtkLjl zim-}XlZ(j;GR+5ahOp+s(Lxu21aKat81YXb?_6^O}8?==i3|#2>F%072Bokgf!g zDSs0`TXKNz+$k1DzVS?C`8SE1mDrF@L2uu{Hm;zd7v<5*xr?s=d@1bALk?M&S zOe^`29&J*!r`|TB{XIG>v zK$QAJR=RrUPD_|>8#14O24?pQMa{D@BO^0`x=PL*pkINPQPA}LUQHkCxw}MW;>1|5 z8Kn~Eg^ID6FL1o1w3ndvKok<9!2pnLxR~~C@Ir!szYuyK38|nd``8Tw;3n=|0m)xB zR0&T&><`R<0W2b?ASxi0LCTC4=dVHSqahXqHt6gwU&C+tby}{Rr(qnE_8Wbd4ntu1 z%}YHmkw!|5ntU676H;+9-aI01Xo$RCrO=`=No+>ot++mp>S;^4|HWBCq-66Gz85ZZ zV9xU@3xIzqQo@f~mYfNa?O% zh2rOgho*8o&wzU_svMUmQe7g?2Ovv;6(q48$!;l%lEXkB)zBY`XZL`wY0+tz8SY6d8_2K?Ro8ZK=? z5f7Fg@()9bEK{EzP|$8DwNUjl!~e|AOCv^h)$wrXO8_wSM1k z_bLX_kX8AHPX`NSArD0~x#QGq0%Js><3zGXi&Tz~i>hwj`)(?pYG{YAP*ZAz-Q_*d z;-xJF0567gI2e;FLyD;`(Y_SH-HNF{q2A#S;xv8(x~K)r3xE9T^}*avDlq8^FZ3Fe zM?*P>hv3!|IIQ0rIa|2>sko6S@uJP6MJ_kD6!RJ=ZQaCD5J-*{Wmg(6I}19)xc#Qs z8Opv#?F>xhi`B`ZKoFUv%Q-YkT_uAENol3^JY4_JiyU#l4s@45v3^L*wG*l)tFqe8 zJ|xA66@iYSE#wUoW|bXaXDTv3X{2u}G01^Yk^2VyO|p@SzsGF=lF(SfNZ_ndge%!n zJ!1e3hbmCBU;|3FO{cGvH!F0H4W$6$Ve9o^)VhADi7^vUpiGcyC!{?Zd z;sQXducjp>AwFV~w+1@cy`RdnYJ=!?op?R!4UcKK`~wkEGzzX4swMT1D!*j(4yd#uWbTX z#MH(sY&a$;2l;3?ge;Nx9g*#N7dgD!b_v=~M1d1Wf6v7ihd!Qdwz&LoSyOS#Cm`5+ zp7#whOk81w4Z*YOK>NVujUTe&)W%5GXAANj!G8LAarm(Z$hD+R3qeqz}?+UiTJZ%`iG}CH#3&B z=3DtK5iuSlwOu4*XU1h04xS?miR@naDM>u9Zr0mzv2K) zGM|YW9UI!?WEq4->co@{W=ymxg^E-(8&SalqK0$x=_!?&mLG$ZgC6qwJgfp1i(VkN zqilU8LPm>3+Sns$qOXK`7&#Nkw9#h>_Zv+M<>*1@M&@7YY)Ge)`@|JeZ>;0XD9cNikLGOj)-Z$_BDje% zx9HMMRg&e;CUO9PN71yapKUo9cUibt1Y!`3Fq)(a4Z;J57BhZiOn3lJ4T+v$+izj- zaXy}_?04Mz+8$7Oi2&#2MphtZIGgu~lZGmk!*kbBrfms>!n zxsPcOeR5IS=0K2T_YBM%5Lq$0LD|TiPYsw#MW&`11iQHYXI_&fJBtnM!ah?e>a8{M4835g;dhs!~*Oia+}E>P(a z_5EdvVj5yaWb!`+DROGu#@%SvJE9N@fKo`LdoXHArPy!W@J|J+RF4(L^hDgxk_;%y>}-_6ZN!=p&Eu(?6fzI{v)=;3fceu{e$VnP+V414rcs#8neH zlqLwe8b#(pbD@F)E?Vn0PBr_l!wzPo#@x=i=Iqauac={qR&?{cNYZMr_7do;O!ZMN z@gp=+Z{DGpujT>6$xM|-{@JOZQI7L>%?r46ghURVZGX`JX-4S5gi-50Ojs^NtmK!?j6*iK24h}jdXc=pt?2ZXkR+YPJ| z!9ywdXNi`pJ^Z-CNZ6Wej5HE9Ftij?|2b{W2&!nDgv#X+o%nDazZD)Jy1yxs$$=+2 zq+$YzDd5x7;LwzwpKtISJ$cla{)$HLGpLczGPT34%dO1;mCC}_8I46gW^gXOz-9ez zsJhv6+|P?`XR!SwCW5Vsn;M!$RWOgFVHv{wMNxxj)K`lW@OR3ZA|?jWhl9Q=l0{|- zkGEM3iJo;~C;t*K4N|n8pC~Jy`T`wpp0aM0_mhl54$DQ2Le9D+QsY$-;tFk_QhuO- z{`Y!{1K%k?92<<;e?~l$>2UkqF|GBJ&}zv%-o2`m0d%K{r#o0K5o!7;mrgZt_ZP|u zp_C!}VBFfiK(=Ouih&8n?W(e-%m{?~*nX zI^M%qNrb%obuj0AY~xEu3P&*~a*@QyeMLf5cFPm+R45-3LU`n0cqNqGL+CrI&O^G5 zZe=_qd0LIdBYnydC}86k9hvG+QH0{+aQg13dV*Tf6^4N6F;E|=b2Mm-H6%^Nj+oG| zJa1eGpAvE;s{RN$pyZTyXG&rnMg~ngqlv9Xh4gl4+*2(O9O^WpS|EMYY3%-3Y2~5@ zuA>}ftpScB3gx0pn?}vmbgpe1@ctY*%6rlCHc%F1NM7GVb~KH~phEf7e$QR+2#~@~Xi+VXiY5u@x@NrmwS=H9;<0%1L~Gn3MOM+i zmqs*RoaF;DRa~e0R!yvJVzaDWO8^LfNFWbJuHmMo_DBoxlaXY5yr10rxV43~Jpg|-@v?k$fz#4-4@0MS^PrO(&&;?niF>Bc&?WcUk_aGl6TP)gz+&L8n*z3dhoI! zBT}TLz;T+O09b_jbyOk)yU?9i4yS`egeO(eq~{fMpA+9jxGJn_Vj zk%5JabCGsjeeStGo+6$~C#6(q`5y_;B#xni79v9L!HWPD;K0n%M2Zt_p^WDVSM}pp z0FfW5UR#h2g9`%uwj8OkZGy;Y*q}Yk>CAvh`v7keCRz^D801#Z=iW=Q@Q16Tgpa`& z-U@nENZ$CoiU01*4Dfs$cr_lca?FB26^~hbE|CMg0cao4@T|CgL2N=H$?_mW*pZm& zyA`AhF!?CC_Z(k+rS%1#RiHxdnKyuZT&=~dbmBXR5O6M-?XqD{LFZEBEek96U{Axi zKPLhNV^XGxtc4Eu98|QHTW#UF@Vyp1@2W1iGZKx5J?X`5$!%TbBp8iShVMctvgQJN z`|S$`Zfzv)@T+SB*0LY|DvTL3bG6k4Yey>1ue8z*$DOD1LLNJF)gZoFQ~+xs6uj{9 z-n`fz=dch!9Cy)_mxk(YKxQV_Cc2*}w*gm)aLZ$Sns`v!nJ2%Zdo?@RVTe(f8~{r| zw7)^x+E4HgI z&ZHm={lh6x)BzVAFjHWT?2#zFwH0Vie*rtEVh?5%9AopY2u>ptqG$D(S{6jbCjngE zW2#S@MqGB8$0@v{MYgF0kuhMX)yL`^4mx6@X{?pnlM2Y0FPnucL^@)kL})zE1*S9& zf!0uPgWH}a=WF1Y60I_X0_${{B9NjseGx(NYo0-)_27U7sFMwo+0_wgC5oy`s=Td& zEmoLR3LJP3RcZo&Qr`q8!hkw~M&<%dylo5wRjdPQOs_ZcLx_e#%zhTw>(^b-M#qg) zp9DojAAm*@Ri0S4riLe3uYyrK+39o)2zwDxelDfz?FlK>r)t*1Knh``!xS)Z`v2=8 zcjT=5S1uo#Bm*ZT-%lJ@L9FgnDF9_Eq(?P7&O)s&f~n%p%=ck{WYGaunq|(zN*fiH z31SeI(r-SwXhdCs7!bqBpBojG{M^oIvjxoqrih-%>$)I>lZ6M{ft^ zHFD{ep!Z0byrO@)mo3tXnPi?)#E9^b>E_jiMG>u*ILpg!&%G}Aoo}RP`uJq)Zja=G zCNd#1nlR2HCD}A*MYr!?HcqzSedUqvqZ2v8h@Bken6b=$KVlCXY@%j(aZ-9Fini&> zk|hnw308KQMM<@`NJM=-72RgsA`d);*bet@=@*xl6WO6U#*=ZSmSeB{gHl5LCw)lX zz^_nA5kYR&+yWLmsh;~7@IZ}z+uA5pIm89P5$%)5?{{?2pX&OfIP5Gu@gJFpYvMp>(SV8nc%!O0;g1s(;5lE?kvv{5ADIp>+YvPh2jc z6E<`M^(nTHZ~Gk!s-EQqH&tSAZUF5hw&PH^H;MX#Lq>>_c8v6k zWJN>9{dUB+ z1stC9YPB&7*OPC@*dhyub!+BS*V^V%sWsk!(+Uo@SeMe6On*43ISFb_Jy7B_G>a>i zSk1^zG?F0juuFZklfpM-n|+l5nQpDn{?4EHV#3p+=6HTQ0~F~uTM7RHWh%E(OD7du z7+9%^3^`WnYnztgjg;fGAgbv_CX3pTOL#&R!=mu673~m-78*2baOk6Yt~;uC1!Yz6 zipJVCZ0xIAHM13L^}V7cC}R2cvZ_P}5k?5AXJm#(v}I}E>$g-&ZiZ`N{ z`zp4LXt6>i!4zcbg`jN|Z-zV!#{E2df8gS+nF_5)!c@YmKOBXicleNvTfgic5msvU z@MLxnoHw#s)v>^t-jNgFTF9SD%z~_5Sx0hRMEL)Qc{-umSS47r_A}imdps3JH&}SE zW=U*nGm(^s6di3gG$A&NnAL(3CHBNx74HU4_||MiQyhMu>yoQd8-lGzw zR>&21L8R=xoalXd?3ITx6|F*x#9zKoqy~S!LfrT)qLHqxW9v!^y}KeQ!GIbjsWzMli2QgpipX`&d8L{W`Bu(BmD(9&j!@HH={;wg*bF_BCpMvl#=+4OvN zl1_F_QhqMhE{Ze=$JB#Hzbwy9{LsP+4IVck``*JuQR-s&Z1OHaRnmXOb2U0;yMBs| z{b^T~>m_wcO;4fMd1)V-5^PqOP-fSNuteA}HoxBncHX<`Hc9FxN#TKv=~XN;s@M}T zjuu>R^PaI(HCk$gT3|~k@nu;dKD9tCsyS`kKC>xXZ|M{q&WBGvfW>F`B1RK&!2J&Q-0l!|S!HP^mPKf^MQ3O7`$l!|NapMsxN zc3)DyBr$1nvG+ey@}_Y=h*OPo`Bl!GRD zuPh01dQn?rrOJxZi%fU{J>Tzp`C3s5b9}ai3~7Esi?Ij_q4;3;v*87(Fw=)ojBz$ru}C`1NPMh2tE6V)%L#P;P{uKR5;J@*?|puH+G z)_Xx>q7*V%R#fyP-4bJm#u6&wExNThXks|sNtb9?(~1GsMyj~!z6~^)N+NVG8ja@G zPq8`{BcEiQ6k&3Zdv+wO`rV~vT)aUEs$T4hr0Wx*PUksCJsDP^p4a3&qcVFQ;!7eW zgJ=R-5fh;V;FsGXYuREQB+)j~UbaNpDB1QB#USb*(;9kLbXZv00ik5r9!N`%STLcS z*u(2ZN4lsDTVrDrlzM~g99LGOWM(*IH1t)C?I-IV>u&|63bFs@$D*o8J=@xNQKT3m zEifCI7Y=M$XAHwFCW?J%;QLSyetAWMx5ZBKJ3|M~*V8!8oYq-_%B9w_{@BesYF1#a zdgGvG@rfvStXF^&65STl7F|k{Rch8$6ZEPw@$~8)?SD&1N63Id(Bbf#V_2Pm} z+5=IPh$tCRnU9!;#b8C`y{7145MUPZz!F$&FB~ApO?m4tuoGqH4UwdGCBztM8Ll3>A4f-?mtk5 zc2^!Asf;gb#+^L#Cz7mWke$QTC8hNtE0@y>=?*{4k5mE%CwYkR5}RgME_0oR2%$lR z^yN-5@JrK`1vPP#&aY;2qKxYFx@j74g+;pVES6duX^&yJ^Gu*@{>2xjt@X_<7DI%_ zV=(1O2pp6+50kQpyD%lGdk*xO*Ms( zm{5iXS}_X3D-ei4UlCB)Dj^#*1?TyX?2;uGDI0Bh=B*?}O!x$`l!=&UUAt9a*bOvz z8B&lTBX~eY-4Y5H#hCnV4Fxv=K=6c;fi9_pAAEVn%sRg+SzYg!dj`k@XIF*>nUx9Z zO(c_gj;_VRu#e*^F+<2Pq?@2GLK6sZ&p?;ev0_&NqD?7;7N(FB>^mq$;YEyPrLja_ z96|UR_I>c>K=EgmFRGm5?$h~&rECPr^TuoFD04j=4k{@uYU2>I!)Q#O!+AU_5aEK$?EoK%8yFm=;ii!~7+}y=Y zR$T}LD4=%)k90xUtg91^A}-9TY7Zi|N2ht{1t8a>fSTbYM%+laF;Rauk{MG*fJL04 z`pP$QE%{WU6c2Jvbr7hatWojS!|JXLs1u1{FjOXC8vEWAq43Z$8HfN3AP)q$)(N9o zUl0lFrz73t;vTuFvdbD#% z>7lHxY()U)HVt@Ul}c?r0#Z6X=%TKvd6XYCu`os$kH}mPz{W`>4)1q31O^~cMUzb^ zzKoTDs*+KH<^!57!^}~Mv0h%7kfADX0MKLrP2sAWz#CZ`jYR7tEx zw$mmBIbC~(yu9(5hCD@VT7%Qh%Ma9Uct;%}%dBW}L&14ZWs3y|VF^-h)c|CIs_1Vm zv|=*bUPHwJg+Y{1OD2dEcOn%M3eJF(Kt+i1jw0}f2|RdmM9C%YrC5OUR7Uq&6jvh* zLKyA)nczjyhOC(1y(Fv?b65;iUl^zaN@77x+qjgWC2Q9dS;A7G^UGeiqRk0oU&{cEjk!N*()I||F+zSmIJR&O zKz84yTpHj$z)d8@#<~*WP~Vf=<|f4V%f+yl%^ljTUj?ejaMNr~U7=Yl6s0|D0*6s* zV@8rm>wrtsvyh_x4QUI6g5fRs1Fp-jM9>m8nwdCPTtUY@FaaG4EXcY$KECuphr+Aq zoL-)Q0`MKb1Vu<_APj?$-8vNDwAs!$fGLkCVjU7(fZ_m}qf(xOiq5Q3Pz

        kKuE;l z_raFOqqr?ZHK>IK@w_;{~AB&*`A7G^=sI3H148b+VP$IT!_4Q+-@e zp>5r2Is$r*gGijZn*6Gon*`=tiURapj78xnz)MOvoun5^Ql-Qtj4tg;?b_*Fux(sj zj2X>8_mcp5>`XC3I3O)fG)Qb*`UIh{fs)lPXoF}XowG8<#qNlq2EuTQRC)$NEelj% z3+j@v435?&D!d2>I|Y=eC<6pu6sddJLbs~(LOrk=Eb661$WQ{A)`?W)CcJ(uN*jyY zIxW~K>Q%J2N+?`<8B&0V^VeppQtc3}P{<(FRh#7yVoB;Uo=>?@KvCiNE_KfFQ15w$ z!P#^@Z?svmpgEjgqb?VlJMSy&wZXoL5yLuDqyfruy)I*cSj&lLA#K|L_4B(xQ;he(n> zbU2-XsT`@D09r24rv*{@y4L@Ko&x@B3VW!Kz7I=Y=YpU9ZrURL0(cpG+JuJ$-A{5* z%8E8B`eQ;_If>Ya#ETI=xH)mvm@%1P=544#pBb#2-h0GNxdU^#6btXhlDmra3jV8um&P-?}K&|PvDWt$6Ni+$e z2!Pvqyi7mZfZZnEpCElRif+mb4wHq3{nIcgTt3Lz5tJ&2@&Vc9ie|>a2zGE8B~boL z8CG?AY=kFek#Sh*lL>b~F7@CD>%b}3f_1YU2#l)!)2Xr|f-OX>;_U zP138_+=MZpon>8e*c5SDub`>E`RJxGgh?d1L;WzDW6g{u6}}eTv@B;|wrkcdcN8hN zu^qk?s{1myV3yL3+rXOfMvCmpk|=P{d&d$fUMTjg_CCvWzd&PBb$!?uEa|W*!XR-P zy6IVoq)@`|Wh@uDmfRvTV{HTQn4uoy6b~OXYiaR>a zfXqPqv|N>gbj^V1Ot9~)!LD&TMh0R7^36A4-uCUDML=VHr8;C)mOvOMSk8fov*X;q z6xrBU5*Ep?F5HuC7~Gx(5*={3-wjTS;#QavH?CtSY7VD@SX7B}oE=HTV75}sdh|}LvBJz$l{hm*Q+I+V&>$igzCdzKk;AupB?1!wF=3ElqZ`qr87LS zYy%-D_B3=I+gnWERaXI z^vwa#WwcAZS{Ub>4FxvsShSSINVvpElN?h_a&_w<;l{~+aDB0?cu6dyigxf4O$QV+ zisF;|ZUF(nH{)|&J$<~biy5%=Om0e(+9cDCDE%vm1<0NlO|2uen-5>nn>+8rA7)P? zbB~S+*^35X;+pnpF$WYA<)RrO#SNp^(RC+Wzq2-Q=^ zhmdcR)j}@xvO3s@c~LzK-cV#JIqe03Mo}Vk#yg8KK6>e`VQJC7Pg3ONl5$d$%0Wf# ze-KTe`$$qsV5fR$%t*jqS+Bpb2bxGuax|su=5whdU2bX#Kc?Qp2(%$wrp%mUzFY3A zoRqcKSZGyzZcL_o!}OG*8YWPSOJ)Iaw+FcO>{58HD(W)cN!5|FUQB89`JFv?0wP}b zK?P*qSvqR~;54JA6i)?Z6)u`jU1&xy!CEF%-dSjb9=_IXHbJ@8nRZZoor#UfQfoAs z(ZwEC2@)fUEQE0EkypoTgdV?kwIy(IPrQ1f+}@vXnniMviD2Iy5M&N1txX-K;Pv8c z6hkC1p`MlQL@=gXZUdmG1_v0bt*e_%M$M!j)L-3Br_;P} z4GS0^eby;9deN^864J7^nHHYw8lG9KVv!XI^h%UoWXw#v)XI{`c%uRqp8$qrldmX5 zsj19Dxy!<|p3A49hoH!|TgoCJ%$&+6;SzD{$>JhRJ7fAHeM+(s8yT^Pi1Bf`+e&4fsZ`Kwy3eGld`?ef|IX&=a!`#7482ET(&p~eNjnRtxa{@9|1 zE4xk*%GG$x3@(ZEad)?O>nds{r;QTSK^Cf*5|DJ34vc29e)FHLEGnp~zKvuo>MGs& z)L2tIZB^|aX(*$n1L5ap`Dv;^QxMo6k-Dr)A1R(-B0>oIYCSDSHPgln`!_XHv70?L zS6Tpg=)y5E4ujIdaji_Oq9R-#_V*8@%gTcb->vQL#Y`A8lDwo69ZTIF1qt-gFHZ~& z_87B2$rsBKYte#4RW(_mBTCDm{uV0VGD;?D9_+Rm?n7$*$h5a~kGP@GiA zao#0}nGX;?+e%xO4Qy>p>-=8=d_GD44Rl>Znl9&w&IkR*nn*UyhaHI!lrKIyGD4?V zH3oVFLuKSW-AqGGaODDV&}hx93edvw>XE1G>G(lWDkXj$3p5?z)(#0joDqj%4Jcw6 zqXm+3OAtTREG3qNI&Sr59rF!n0!%x>W_HJGdZC}Bj zyjnMX1!NOAY7NK+MVqaMHmTsxdN+}qlz=nxh0t+9NMuJWk~IZU5}}TQQ74g)|8$_@ z@eD$8{D5Kl-J^btDQsk}VTA<{$O>iLeUoClE};1&PY+YGRE)=?*Yqt3j%DTKy;M42 zaHMV0^9BD(Wn}@Ma0Q6(Z#+6$B~alB`Vh%Z5Dij9SkeCvJZ-iV2*O8iAT@sw+(S>Q%bLK!Hc~!PLmm>5UWAf-YIZ}J8*rU;IL^D@f?{b4^#F*-VnBrF{|`bkt>Pu7?ss7dKxBa z3^jhWszW3&p^fb$z+p=ftHZhlSwM)q0rdx`(H>yNhE`TpUKJ!$=!Oq9AUUQdrlN@e33oTn=OgSgHEyP9!LfdS@wVEt|D2 znkCp!4zc$ZUwYdI3q!i`LkNZ~UZqYW1vY}?Z68-$ikB!viOJZmg$WARz@`#-^vgv$ z?G&w}feJ<)sHLkdam++wzX>O=Blw>sg)xYyh{Qo z${;|xcm`}qmjs)E!?8)G4q<8=5}S}RJ4esLY=1{uU^^7UN0^ZWjO|*p6S3~?O2T+p z3QhGd5c-JXl9BWz=QN*8VyXcu{vk4-uZzOfr{#=PH)^_e<=u!w;^m_L>WHQIx8`1G zhkd#chIwZ_DzfyB2S`WJ(PEGDf~73_KRMK_A;rDMxJ$U8N*nSXm~n!L`FNj!mUid9 zM477;i4I`4!5=@>B+SOGLF^$%^}r6r*~4cW=6~U6(Mr!yA{1IeUkyg>dRlSy;;Y-5 zg)UpBQFn85K53pM1X0E^0wHyD?uelm;X%XSEVqIl$MxpsgBSvCw95SHsysa@4A4om zA<#GW66}YYnpVFRAkt#deh#D+5fi5C9Q!{DYc4cv3zF3k&~YG%QXXEz^vZ!p-LMz& z>z|^$ww?qFr&MEFhx)ie8$({@snbR?)-6kzb>42Eo_mQ?t574tHFUJ{6LrLZ#!Ef!Zsmak z+tbB>-8pUg&Gj>4lNyU+FHUMd*rQ=UP%IS-K`<)k*MdyRwH|1*exy&L<|c({fYziP z~rs?bS={Nbb{7kkxF=h zsy|S9P4(<6B9BbKZ*NqpHB(?#Y()VfH{UX7II67V*M$~tx&h59Su#|GrG-Pqtm*6-mE|Gzhc>DN0WWr}81_;~)XPD)5b3KT zxTA%o#~K)JrV;Ud9JbiPD#2m&=Yqwwv-^Y~?;q;0AUlrB>CMKZk64n*kcv{jh!@@# z$4X;Tu&Qr?Z?qz~C@HUk^da>~3w;WKL#??`AShN6+f%;4L@oT0z`-@sf}SahlMqD- z%gjY?7aa#H1tG~jCW+^W;#dF%>3Z<|0f#9AA%N$Ivi~Du?<6{*Kp=hSM(}6?I~Q(J zWroZ|Mt(}DO><+?i?!f(`m-e1ccZh9?d)K8{9;G0!b|>kZ>H%ES3O#Z{i8J1ldhO> z0GuEo6j%)2^|b;D#ei)PblwsGWa zUQH{#MlTC>>#Z#bS?P9|bV;^>W3u_+5(y9sQAj=gB*~gW~stjp32?Ge`eck8@qX{)qb*q`UeIBmi3z_6M zb87qXOh9XJry*lKqY2&^+$xifU(+9O78UxrsjG$R@7Qtopn%dyK~`Dhq>vNXz6^?a z;@c8Hsf7)ejin>`8`bhf45qE^coZLk)A&0fr>Y&$9^(+dx#BN{-p`B~&~X*;C{A4- zWL(4%4QRL{ME#SC5`H{o;t6K?1*iAe4zbF}6^CyG3}c-HqzljE5Z2hJ-m~Ey+ATvC z>7CZdW^5CCR~WjCZ-U=K318yV!?qhkNmW=M2-{ZSG(wD22u}1R-UQDfU;})Q-4BM| zyxv@Jz6ThXA7$`9%6d?A{E3prwWwtfj1{Jsd5;7536ij()6CtI0O)Mkl1#2wze6s8 zlHYtp3;+#9D@IyK=?f{ici^046BW-^hi(tYO&W2m0vW9BmFTgf%|j$Y=Pakq*XTl) z|Ip4BQA2GA;t06Uuv0GKG-p1^gu0rZr@#ks2t(>?);R7ypjY7uP*~<4P%H3B92P+$ z*}v_Adx*;`w7^W>FAwf=E^DnY93H%YR`)p=$a{P=_^cE*^4&V&G*Qvww@|qh&juwd z`JY?SfS$UW`Cnn;TRn`CMcsajK_CG>AP(rlfK81Xmx(n#d85+|`heTFtfZeHs7X82 zPlRYN%%O#q`M$xCJQL6_O#Lzl)(a94&%wkB0O%$h?6e>P7*S{$lpq|tdTTL|AKxMY zNcH3g?6i;?KXd!Yw-bm*KJ}kh0m0S$`PP6|^FccAGhSicSAe~rQO5-J-3_U-<9)dS z1Ihpss0%g<><-q;i+Bq7BQ7IBdWcyLtZzZBwjcl%;$0@W1?2F?9_EJM7860z^~S~H zRfzj|+pjhC*FKT^!M)@fcg>%VfJ18ecN{OhS7vtk`^{!p@DR7bsbv|Gw-kv5L8x69 zWP^9n!^T+2D0-RhU@*%#OZ;6Dz>OVZ+y>bg@G0bQ5f?w5{ZRkkan2wDK?Tg|cv1N= zq|4~WiBv8K=bD?C=%OWYcNuIN4YA(~! zKeXSsktva6s>Bs$=rQfS6R_KW6E71)QIJoC+hTO^#t(4sIX~tfO$U)I2ESTZ^e`lC zft@$SGyr4kc-F-8EVzav#qc?4j5mhgsx7sEDTs1P#wivJ33~yQACcw7h-grk=8pNg zEQ+yG@g60)@n@kc zj~X))KxOz7F}nhkM`@=)q=0XXMnfM*?}=1yx-IV8@m~C3M?rBGVt9=8ZO0D$K;h-p z`E+)?eXzby`P%h+aH&7I>Xta|>|*;GI`sSF>Awq;RBU?GWq6}r*KihHa-cp<6pEOy043rGki>a|hF z>>7yi{AEhV z+%2+!sFA8j2J}P<0T2zyLjyYiW7*F22w1FWdrhz_bZu08A9A7WK0(sz%bcbg16!LIR+FMSLA&@ww^#sZ%CRE>Yd4| zH38vkekh?ZMTlqu%-_){J`QL*Yp~8LdYNTXSG-T?*oUIj##CSgv1h8)WQzAY)nq?; zN&>yj5pk$YYdl;$htO(&IE6g6G!9DlqJ(#i+3&yWignDoi(gE#XUP)S|-+i93}H`HL(3pM(ZwN)PIz>g_Rni>}j*I^2{GM^u#0E8)ll_1ZPbAB#g@l!~0CMlSrNnKp zk|LFnG6QG#7{wXje8%B(pjSJ9>QRH$&_E5hh(PQBom;y#f(9!SAJ8nDUkkV++$7I4 zo2nQ?AGi5R2WepaCwy#HaX9sFcuA=e#7wq`xiJ-?JbOY-*fx(ks>V{vL&0&$U`fd= zOa~W=!tf}gB4qrjQkCo?zIKv!v8~MZt2C7}1R0oK{PW@dOt5-(lW;C82fd`+BcqE0 zrILmK1xKG9?O$ki2bCI@AT^(GX^JqYYtTe;*ja!dpFrt13i6DZ%<^_Op?ZXKB@qw; zH_>CMS}q2N2y(G~1UAUHP^P(BS%4HG<x};~o>y>U_>AMiWJPrgtH$507nPcsrESg{pYVLbe6x=yU?QgoI?T+jtm4BO zqA?tJuG!7{7*QY+I3fWcYjGu%L)a`3_}i3zP#7FG>jde_n~>36t`4kF1pkgh{TV;t z24nhwfxT1F{4ykppva$r3V@jwI*@h|2uLHah`X>NSON)8STrJpAR02Y%su?V3R1yW z#!teQ8Cuh6W7e$3n#;m&oie1m{&@W|50U(`F^Hsgx+5a?v4-m2_UvTJX~G4ZzW>I# zig1%xBz4yQM7Z=8icE)HsyB~Pf_@KlQB%X#X+uYSm=nFoTe-* zv5ka4-L_|A!N_dKmF|oKr{H6=AYEVOG<(+vQOLtUk zv1L-gKoJu+>~Xn`%Tx)wm;6_wja_7xjvZ&m8SaG&PaaEF(x6l=8=ftFx;tnH<;)n` z%!Sy}j$L~)4-tLX6#xW)8G+fPqYoflfvoEo!eVcUTfuL?_gnc06m>wqd*~4ty@%L~ zq%ML7PWW6*=0_pl?~ol3>R{{ao`_e;(dDla8ZEE-GRy@hDS>4LCiFsGle)tO5c-a_ zvYc$ul%H{q7mhR<`4GdL@fd-%3L&%D+BPf++KVYb$^wD8%3w&M#L5;Bw%8((8dRWe zbb!6`fw#&A?;@DPgOIZto#;x55yR0Ftld>p6eEo+{K2N_$8-u&&YXEt&uJE@&uB6k z)77C1ss=_}8bbO#<;U8k1$)O41~cZwc6G=iJA($zAdCU+T>a+7+A$Oc*Pp3V$J4Ji)(~+GANMaRdYSZ;VKa_Hxi+4;4j6B;zXQe_rau51Fn`=a_FS=KO zx5TUH#aRFtC$Pz|KGBNqb)8gHplBkLlIBv1;b%9{7sM8-JqIos(POW>WDrXxk}Y%ogui8 z0tSZ@oybPSu=cuRxI@F78N&yLEc44(>iro_;HW0n=U0skN)tday2;>D_fvQYVFQ9e zw)(?m6H6>^(NZM&6V@(B)q@U8+H5;;NDoDyDmN!8#i|39dX8Og2=jipsLCPeoxWXd z9$9p#nIk-~19>0J@e+LRuSgPJ5y+KlnLW-1RU{Cu<#0`4QrpL#f7BQIA%Ierf=CJB zG;R9iR=g?%hrKi~u0ZpvWY*3wNF212IOv4IJzx59F!Da`$|`I~i@8O0pc|ehF4MClxb0pz#?KYB^#|emldnrLeGl0=njF&)M!JwNr;@3Ge%RMBH-%k zsGs0Kgzkdz2!f*bT=0rQ zPC^wX>yKr-42(h$5(U44&eEcJ!w0&Zmuw9OObF-kv~7_a9%e;@4v+i-hhn+y4W>QiOZ@NMo) zB2;+W3tl6qL;Ya~b9#LdFl>^TM6Vbtdl2U}F|gaWXG^jeA%sMsLaSqdbN3)Ne3@c} z@e57vFo`pN;jX#ITqPpz#fb%vKVA_T*VBJ}fIer&P+%u6SZK4y*lj{8F%kk08P2hA zbgY0n$``>sOQ9ih>tN)Of+u4xu1!|(R}&JL?nOVhA@Z+S9`(r_%Vw`CK2*W%7fAAN zQ>1zqJ0(CMvQa-RFmtyIBjZ*Bz99+m6af2(h9c#sDs>frq!*aNA=o&85=1FLy~m2P z@1(}erY0Ml8>LeX9BeKUfz`$d(pn(uaP1^QB^ww-(&(X~`>LS57 zR@*?Ex+ta6fCNl9QHrI~5Z|kmYknOsHbX>Vj$*sOZ_;i^|D7GWc&LQ<_34HZ(}2CEOZ zZGUm~x{qosP4440Y`G749K%5I4LjUjBkUQWvKe+5GxYj|+i@m2ZVSu-9smhp4F`1D z9GFB$88pV|T3ArA&f%|;z>ZppM2RGEGa*pwMDj?Gpe9@ol{(AugV-OUr=h*_1FKJt z5$rCI-8hv&088RZE9HWG2rY>?nNC5Aw)}NcReU9+96vHqlxVzQtm#;c@nYEpvtQLP`O+o1W1_;AGBe($%safZO zb<8Oju$dh8XY=;MBf&`O|<0~2JRqo#^< zFB1zvF*7J&N|pys6n}?BN1~8CoFmBq^VYrSFAyuD%&>XeH-fC{9-W9%rVB&d6 zTfp!j6i*z^iFwq$EarSUf3YE@Vo_{k%tOnVge18cm0If}Wh@?R*wDzRd6*Y2tvE-i z#IWdfT<4XCfAGBZcp%ihKLcfd%Mi#{a9zE6N#yn4$@f3P^Cr(|7)}{ZZ{6$HH2zDG z#t{)XShp!EX(EwjLb3SNM0(aE*w}KZB0`w8Is_kvQ0lLE3P-O|fIdXSRui+b2wjWy z*3W8^mp1zl{X#uz)d3rMs{_NV0LCwW51DJioC()m_5E>Zpjs$OCY2hHH^9?|K4kDQ z#ec68>^t!|49*=vM4KqonczxAvhOQlbNUd|wqX-qpv3PD93?J{aR2hn>vP~X*U^`2 znrbS;s;iSS$rtogbtH5u|LYJ$L}2KO(73nrnar7jqUAQ#uA(MbLkQuRdO#cMiYfTG z{$NjW{>$^Lyk3)+b6Yteb@cMMEUMf>f^K6pjnE7JOr%7T;5JCq;uD5bNi?V}^!A#Q zKgG`31#SM1kJwc#L~pd z?z?LoPFT4PyS>jsAvN6YzIWlp0F)#tF(fw#WM9);eRDhrL`S)Y*W`)j%}i zMV4-D#^0&B5g(q0AHWylnip3OFU#_*CT_mH#LIh_m-Dal;S=osd@&#v&BqFOM1sg^ z6o9RW6n0OV!FY){e1vT`q)r#hecmJ$K04LWvFk>TRj#t*wby@%(a9h;E)NMre`5lo znaocEZm1hiTfzXGVl3K=xJ~cmju%`7gneM@Qh815#mXRB8$xPmhPkS?@+?fb_%}^8 zhLY9KD2XK>rHzGp#7%6`JJK%(^f=I3_ghLAh=icbC%_?bGe|=8f=v8<)AU7r=IQ$u zvYFB>d!Rfc%A6xeruZVqaGZnM-T;zGJ{W>T`MNvJY@A1+10waE>wA&kG}B_KWF?nF zqI*pe{-Kg0++$0|0LcWQA+ydZd_g1Km$!PG5Ku|*um_P+mp0&(*ECMR8}a}!QF;7+ zGx1~X*?$*TEApOh5FjIQ%KqQKQ>ZroK^7o6KmR`nHiCJF#6)2!xqnXc=}M7>0tAVr zE_L5L?N17EYvbM~Q(uC{Xl$Oih>4n}Oucz+o(Dybp)HZtD??axRdq)=qy&Wx*d}bs zPx*k?{cTJ!R+{)FQFM%e$92{&g2zv=AzSKE#xJ;Virq+vaE?!4D{g4{L=9!u(^7T z3xw(6t*i7p0F2i%U{x117rV~w+kVyhb1*j60HEB^Pk0@Vgf=8%)=)>Pj zF@7_{*t;}X;)3_qaT2ATCtpQysXFjRYJp3uX|}A&^!UtB0`zpu!V1GSK0;9^+^iCb z;Atpx!O3u`<$z>Ky0hD)TB0PH^||-+_2F5U2$wCh2%6P+c+6gJ#J~UsR)uMU+10P;xWh2jxh*!BnS}y6?F9> zhUf*JXcwA^tHhOfiD0s~@1k|LZR^X&NGy#6J@vmjLa2%2X#7*TXZE1jyWI}tj1WXW z1vK%yaeZcNk>vA@ynsPO@q_d(nu9Ba9oN@_jW7n%AxdD#v{qw~D34U_?gfJi_y(7WpGtsyB7!6{D9@nb-2f5e z&z@FDL=R)wl@2^!2oS|~Qhg4`r-I?j^bYCa5CBjF5aEkbzjA!uyU|0V-n0UnVJsS| zFxO5lz6oFnaCotU;n){6hav$57rDXxJEK&<0M)6&Qn#I0J^K!lYNCrSB;BPG*s z@TC1-jNR1$&E)FTL0Fy;0~1?`_h705*GFF6_XF?h2Hcl=0?k7K!ut9V*@J(PIcgM6 zq)VhSVC|-%_42d_&W2M-xkJKmcUFBsqK4-w>Hf1h(H(?X#>#+LP>CZ~)gt+L&_Bu> zFQ`ioQq$zLTP@eEZ0=A97g4wg(n5aKXO$=l=eO-%1c)tn8E7q_6v}VLy_($N9jok> zxq1ZBFcF;;D68Ums;}3%3Tk+TVP!*5kUQT5K^m9!EQ(=#LBae^iRJru%3%&l!ZRL9 z{X!i^wcpCY=)jtjSP(k&R9DHuRSS4cltS&_9|st)0D|5>*;kNe;%F1ggCfpSz|d3BS7i+q4PmIcHV6js&U}g8I?Uhh6v$QqJwe{c zI}&gpWPDs~`p(J3A_j#MB`+){@Agn^T!BOTUL}x)5iSOex~NsjVaSVcnB`*78i{Kc zU)2mDeyKb51Hdk6)E*IY#};T^i)(Q(yJQyt1OQ1uw!bvv7`r3$Fc%_TBq~d*0;u=p zV`E_KYd-va;}D-{6hUhABm@BZ#I^el&DUH;a4Q9i5~H+~cDg1%YTFQmA>P=V`v`2F z0p0(!SWF3m$)LT7QopTx49fX}T1tPbMN$F`3sBZWwB-*x-G~myW7)?cO**uCCOQ-4=@76Y zsxGI2$$0E-Yt^N#N}DU2D$2T(Sn>&|3qMfTasQN|D_MdZ4Uq+WinR7l9D!JuC#|3V zU}%?Xm$al%9JDKW)HI1J7F#?>!MUR2I|!K!Xq8)fM41lm^Ogttaj5Nc<}jOFh%ie4 zqIJ3iAw+x1V2+TL=OOuxu`}@zeTFe;4;U&>2$nL%3Nxd#7{pLI7z*1eH4zL>ALjq4 zLs+4@6G3F@ffC1G6F{Iy*g@{LhV)QJ45>T>= zvK|S?GmmJjASE1M+)hTOxp1kgb1B;88DC^ENw=a~iQP=Um4WlW?j@OSRI_ZwY~X47 z&D9>IB(i?I5c!C+u&TWLdWe98c}E_QIwZ1y&q>ya$=Uh>NA&EK6Gh7XCn!AIrQwo# z`w;Cse|lDEx=Vx*-It@4`@Po)Q36~!0n75c`dA1%rWr^4O-=XhvveZO*`fgS9w*{a zz$BanhZ*vK3RE4Ej4CDQ7zoUN;DbpU@9l^GJ?~$^Coe-_ z22?SJu)t|!7y~+K{*Egc(;LiSGYHhX;B;#P7;vpqd?r2bHI(}Dg=U*Bq=S;&(QNpFokjo6|^+27u6PaSy`=? zWP(a^r$(UKJsa$UQ;5TGrlAW+D)9s`iXtlh`|V~2oeMSncm&W30fwTaQ#>~AijN71 zsT_!ug2W4x{zj8-FD4EB*$j}=&>UoBA`9 z&iihFD74L7t|_76sSf7l!FPTL(RJ_PSxkKGnxh6M3Cqv{9O@M!qdATM>F-dvwAD5k zfpD>rj{zuQTLz-ItAW`eTk<5nUwVtuXU-V2YWo^3P)8X=tIv{=d7W2L@2}(hJwBN{ zG$>pjHluFPQDj+AmKE!IO_+<(J;8B$& zzR;g*0|)ydXpjY7?cNG3ffnFWUiY&JyC;d6YntC4PoRjA1rwMSj^wXUnR zC;V;GyGj|cHI8jRKbU*Y}aM#8SUc7@84`1-IlU#kDH;JrtKybmy? z2_~jNFQTA#_R=&w>baK`xE~U$EjE9kn^LSi$E7#ROmKaPG!W*}WFP&sjW64BBeTM1 zi#vJiO5HVIT4A*hxtic>G!kmr&tI_)R2Bk|YvVYDQkb*p%OP&Tfjpc{)L8FOxq`tm z7=hsA1RsM>a9FwW>1fDeaA&|ocuBZ=lG_?a*g;s(^nyEY87w4Nyn#l1AeOS7CIfz; z&F6t=WN3hZH{IVRZM;AP2ZtbVAC;;;0z4*$QzhHCwNKj+s2{em42xL=3r#^0?+PgM z_&RuJjv2zG%2DFB5;$ZAYOn3c$o^qR`wShTH$eVl(2gvr*cGw65_!+$2lLR{l9xqz zCe$^ya+NKR9^OV^T9|Wi{R22zRYf4P z!|075hymiOcHj7sJvhe=O`;iU!Ss7ma6N}Y1Ad{fOW_UF6&(L)!O)Ku6Qow&9T=|p zd0z=WhR3-ue1fACz*X?UG!VTToIEuIq5-J!gF?U7&U-1nhj=1Omz46C23bhNj7-yf z_YLYo0P|6p76(YgTaV)++aUbxfk?=&xq>z@uB>jCt`;uw2JM9%r>*m>|JoH*o3>I9 znX?2R1)7WPAxuaocnHr9x#YuD;9I2BF$ZI92A+biLJ8?FRewQlbu`HY3Pk_4cQw)* z(IJX(pnNyrMk;CL8-gd#s7v=|34=3pP%T_0Xw3M7 znUS88L$OrA--N*~CMSDK3 z7;mFcX<{85jFB6C#W-ci$j3@QGc3sw<79+c5%bQsuLTcatVu;r<&XK80w==7vXZLS zlvMGtF^_e^^AKUv*^q;_%rTwD5*N}GM6I!~f@C?~&bM+Ezz{A&TNDrv1mIybZH`m1 zUJS)v-JfGt8?DKP8Iu;m`TdY9S(yAfba}5fcV8`#7GxKouAzRAoB{Cm9zRD z2GSVhGMNKocVDb@Yj?J8g65&RjXK~WQPFGbUZ%3ws-_RHD^cxKu|=qdi89u}AZ{su z_W())x&YmSo|; zslD%?EW&eveD(>#!9j-txVI9Fzd#j%F?TQ3Il!=OhH_b=DY7?Os<|R9QIQs?$yHZM zMXE|R_Q6$GBt@zn2}u#gRgVo9NCvNG>6XH|QPl?GkHAP}NBqDW@zff{hXwDviC1Omd13n&QE zE!+^rkp|R)1$YUVjY4Be`8J6gTZqgjShTS-7SQH2bC@O}m`<^+G|XF4m~xmVViK4p zO&BH`nSiZx1jWNL67%@|%$I#QAn>quIU)iP4Xp1iJNXMkeT_s<--p61p9Gc2p55zI zA5cg2lXLf-#W^+u4u|j;`2dJ05?to(C&|FXp>2B_x^8b~Y+I#;FhZNy4uB%#p>}Gd zajLYmm4dVh&dU92aL+nsLli-6mIsZ-?r2IJGs=CDf%c zAm|lo!b+MD;D{!{wq8_hZ0|%rKwQ`xLV`9fY!Zl=Pv#Ir3{wTM;JUGt(@-a2_}3`! z*ARENU2R;6_9%h!-0&Ex0uR{hl+i5V5~?y0ol%kmFbOow22}^P^^S^&p<2AT*LzuB#0mk?$AwZfCsiJTzzkO2RJq6rC$cQ z$_yWT#^912Nd6b-aI&TzI8zv=iKPjFOkWN{V30VF88gGhR3%6gD6a61Vd4@%2v7=| zO)OwL3mhm)Tf$g=$N}?3vX-78)*gYts1W+$`6MOmWvHeXpiMEQ0+3w5>4JJ>+tAmd z+{fu>@ctHWtP%@?hxFkpzfs6r!2JOYF(SIQI-C{Nk+&s)FQvkO5x|&YmO2y;>p#yV zxKF!m0N`|VAIFoS$mBnW?ZP~s7zCc%=0RKy5Q#!^IS!jxE9|^2N;=v)ymWBppy(|= zkSatp3Yi6@i|IT`d$|E7NkL*K_~1}fKpUtpwFQ5HhBZm-45nfUl&KAXBgp4a6Z{Wo z7yiA3l7KTF@ylL8(TusX<``%Dx`984#dUqO+nbXqz3=5= zC_H*>6r;-&Q%$HgR9fZ+#+B_pv4pHCUms4-YL8ABAv7`n5p#A$?4#Q|$pGa7pGe6b z!7URAtt5pXJOJs2(=tJZ0H_h{MJw2iyvso9Es{n$N)@_Nhj8&|a4{mJSH(CJSEpQA zMlpb3lMGfhFsY+?P(+mPU1Rgg{3Tf=|3GP5wtXa|*sKysyx4qQ&h&v4cJxUf@n~-H zbP`EagCHHo2~h+)AY1E32oYq;Rw4%gvAstlOBWr@MWKjlYM_nuu1C_H_B)bJO{i%m zCKYz?s&7wnoK&0Fk1_TJ1?6XKZ{mUo2_wKIQl!?dSP${aES(~Q53(KAWt+Z;islmp zP$EGCr0oazcysCxsh2LA-Llh3Pls(XJL|1q4lK>0v*EX%gv!=N*nrzcj;>#_t1y=s z9YHK2A1OkK8nZsUSAZ3SH2`n0Rh>b=OD1L906q~XaYSs)0ALsiIJ&Sw(GBO-FxmrW)tL+})?WB|F!VMESKrUZ1W z;wiP057;!#V&F2w^s8_nHG2_(JMqAmmH_|gW$S&H*p}Z(l_1bP0 z=7HY&B*-Dqs)VO~V&k|rpe0?641FkE`ct?z%#uV_Y%(1`0`jY4reu;c07L@g!}6jyRzMV2}&xfdH9PSs08!5}}c7VvJbGFG48%!}@C#C3i#+;+luKM|}*9i(mE><6z{B_Y{>Ey4q1Q)U=N4mB6=-5DeE60c68eRLB$90vwg=0Q^wT+YYNyDeKJxD2*me@IDAuq;)JUV&QmJ zXb;vokFL;ygNh-C@?p5}49yk(p$fpU%ZP=%=Aw<#I>%gx;s~X?aujueTmfPkN)=`; zjr=}n@%>&9wJ;&?#aP@RqY~gX{mo~bQLhr%532iXe{(0Epcu0ewAcd#gM~$%>t>d* zif}8Hqr)MPv>H{QWdLS{8vxM!G!@AbAtSJ@n+!yv&R@kSqz|8BKI{mjQGdXQ2Uo-K z;xJtTLQc2=AV1+@B&!^nlYIylQ`^O&bz)6vJo6UVEH8?j`>+tThP*NL=XR*z?6^!i z5dk7HiORC9p3T54xAlizrASKJK4g;7PD9dB0flc6I>910uy$b$U1CE}h^by9GptyC0mr(1H>+P^5*{eKl!TJY* zM?)a%0d;Xs&H)RH??h#sGVyk8kS+KCmlC1IvP742kQAK->-0pjI4sjKV`T2ijoi9f z-Pr){N_Lor*_R5fvUQ#V?#@8sr^#kFLZKXsKNU|xa}$)7N{%)v*nnfph{B9F1>F{1 zLw52J3N{<`QE(>#31F65f|v}~704;iCK7L;NVv%2fnYq^An}G^v<}1JL`L9ThDhw?^yv5;q2E<2+@IF=< z$VVZhhH(s>2@xJsg9)zixlA(Ea7QhG6r^6}(>uO-6c9VaL^uM{-6yM5EXfIjgv)@y zw3yK@0J|+;hrkcW>LXb!hkEqw;HX5NN77=KFi&KbmjKRU2vry^N9NGh3_ZXZP!yY* zB9kSohQ1brfN*jrB7&Pp6N^ZgV(bPQCTrOz5I_w2Lde2;iA~swtVRfuf@DIE9$H|& zg#?6KM5PlNAZITNBknAkfPPeayX-qV0d1BDVmN>*g%3KFm{^{8VtN4Zs8%EG7Xvxd;)Q?-2fqgc!7{2{CdvsUJ2vw5Z^L#T>uX4#j17& z(F-^a)Ucxpf(ZqkVCI4(RsoD3ISXP^f*L5KJCy@XQUFQNC1~vJW=lop9i4L~+g3$R zx&hpt&w^{%ATJS~y7(9#nsQ$Z;DM zQrff#w40QXwjWNn)C+^czH?X2ZWGWZ7E= z_J-rB6pt!F50p2Y>L+^mG!CM?Nv5=^oe8yhZWSH#1tkyu4z=Kl4U{XBY0zr~wvUQ= zDP=Sc2OSANbZ@^AL&0>5G@ixpKvD_pV{kVT-jBWWm3?@8S2S7%g10R99ms|>D3_aH z;Dj#z3=q)u=g}_)6v`FiU}=S#gyR!UR6r|Z&nR4N3i>V)Mjk7FkVE(=YF%Qk=-?XZ zhg6}UJ}tUBGXEqFLQJMVz%_hQF2=n&ls31wprq;)rf@EjNfR6N5g^=WyBYP5Sln=p z^j@x8j-it!G;7!)p>Xem>uMskDoW0vH9k0AXj*6QZkOBc_$-qDYXB9o1a;L7o@LMl zK~{8H90UlbEs{~L=Ep*Y@dSTqIP@SbI;bHF-j(RDLSKoJMF%tU@jygexz zH80J*9#l8Z@>#b^X>Kn3+TuJ1mZLDB5>-HJ1zIzPEe`qHU81Gk^${6mFh&bDPGnCR zgu&SrFIvCkMPtq?c8UxOwA;B9y(o??Jd_7#Qlvs-%o^BQaxFyJnUZTRRHP^(U2*#X z5Zho}job+U=L*fX2ZZdR(Avukvu=1?pcYkfW)}t}T7)#B5Im`Um46(m1;0@fO-~$8 zvc(ckWNsEWEsacx2i=JTMtX3hYw0G&q>OILNj!E@8eG(i@1f$!ixQBk66Dzm7labk zmHj59m=HviqE1oE%V|ydV%z}tX9Pd#I?X&fvF1S5wCm}_*%U>MXDFsjsc{GCjGO1p z`WPQHM{kak2+krw-Byu2Y+f}RS%lB0L(g`z(iounG7(io^SK#k7c5>7X1mEum+iVe z&gTd$IHb{7OoNUfq!^#`6|MUx4k`uSNm}{_m8Lc`wGxa5Q#=Dv8_V1g8j=FnGA;()-$SDV z?cs)iOT!vGZw{-D!t)_eW+4cO8IXP-0wOA!ipDqUcwB-mA@z(hFu0#aG4y|h(>k2-(2XY8(pe!bJ9ptRlfvde+sA73ZSm(6^UF>iid z&Z}y*24VOK1PYMAtrm(E1=|bW`bYroW&jBCTR;r%z*W(79sQFV-R#bf*hbg+kJcdS z@jRNk9i4=F-6(!QW!uMz8EsefmzNeM)xQwd_hgidsYz81>JtHJ|LwrKn}KFq#5mnJ zb>*#DiI<>fS^8V_fH~RIKrTxuybLJ1d$E6??wBn6iJu zVKXBV-W*DFB$nFwu>l3dXV?@7@&XOLz!ema#G=wM} zza(8WnO$q3!)J|?{XG;4!dHX2>$=5&MBloJz-^l(T8e;}yJ6v1mDG=HwBrz|whuow z&z`~+hvqcv|%#fLMFh3jFaGJxmw^&p0g2+_=ubzB>iGqPBKr89xnGX4hZht zo9}xUN|%_J&4oCOMU$$#n)h*QCyvEIIn%L04X~Qqs618iglZ1SG;>tAvJ2h`U!M}( zM{Bsw8Walt?JcyQZN})pKGNd zB8%{s_bYq&?n+45x2-CfA@s?t+fNuBOihE%e783lJ~jd&*Z1Ql!76zv-I+AjkXht| zC&CYhvHwU0VwW`)8VQKwbkTQHFqfSY=FE#o5kk3NZ17e~hGgxyW=(kP%m^8VU%YSn z9G_`?)md9f!||sAnN@wI+o7T)0Ypa*DGV({R!Jljifah%Hr#3r22B{x7n4RgqG~N{SLxmmY|Qk9pJx45JN0 zA2yXDBSUhLs@TSf`WM*x52cC z9`5qz)c7Xz;=wm?h)k~K)ke=dXZ8NdeCZA@vAa5 z&se0=$?MVa#Q5dj7@HTwgHcI6?}WgQOeP-65wI@h@F3*Xe<$JlDEphk7g_X2Ok$(f zZyt&F1a45H-L+qm#%kfGY7g{WlNPodotTJ7HHVO9h}H^BS41dkJwxNH^&xRU*B!`V zLS;l(Suokz_?Gf3jzcU|p{ZCvW2dD+_C?yPU{T+DjAqZk9j$m_}x2d2D_ z&nwvDHkv7mr_CeFV`^Ws(pg! zc)#gRNx<0zibvGLGp_(G!}18IeGECqPud=}XPAXZKP(&VxNL%@3JLM^=pWhFNyzD{ zCCUyw)z%sBweYZuv@igJX1M;l$WO_#I@Q9ALNBp`#L3ucAn4Td$Z#l15$OyAcGZpk zweCmSctnc{lUuF>=Y&u1@0E0_p=0Cr`abF^<%8jt;WydrLN+Cl7dTO#BNM(sMD@Fx zFr^N;tz?q#_yZN@@LVPoZuDTshD>SeX zcPjLWLCXM=P+vMfoQ`IBdSbqmL1>A^e4;Mky|UAb8jQ%Y>6O50Gn%&df^lH~4)AP- z1xSjeQsP8H4~K!Vu*?M-4F^RfViO=V8W%ftni>7P?qmRTIjZb{(MU)a1`eFf)IhG^ zxK_f#TrD)=ATvf4ldo1U1};BnXcqut-A`8MKT=3N;{F4ZwnwXJdi)0v?4*NR#NVU$ zO^_=n|9pi~Ev_T#u|jIHkHW&8iWS|Z7%jl)Oa?hnin&At?NQ-1dG%`5d@fk6d-a{e zaKzE?eejb9Llb>c<(yRT5nh{?DLOV;MSqZqOeA(~r@`CR&_#0HC;D}q1FyV_HLmE> z9Pl%CQozhvZy*m_tow_Fp*AyK6j2L>rGxF+*H>V)J7a$5p zLLXpKSh$nFH5-el(yAC^UjewezGb$Y^dpiI`eawqy&l*(P(-u4@lwln{m+SGJLP{ z6N{Q@cvKSfz(Q)SXa=aQ9UTM7Q8ob>v~O>211-yrDy2|G(g_AZY@@k5)L_?pTAMr( z#5houth6LQ0UmX6p2D*b0UfLc$-wy#Wrf%nGQeVhd#9vfXvHphS?cbiB4mCL4R#|; z9d8iulF?)#Gl#p_ucg|W;(8%!kNsVAmzKFvCeI5!#`fai4LG%^Vch3;kMfui9mA1S z@)@E#z_ZqiIb%Q~I(!5! z?oQ#b$2o4|X%d%hO{oOq7T5dNvY7kU7Jl4iDH9y6pwbnzkI^?>7%F!PyEcq8R4o7ti&ngB(=$xotJ`}n~b21f!K*y zUXOdxp3n~wbeJN>#;883wUIwLs+JEr;#GkqoN7|959w2XL2_K{v`3bIL)~^!2Xq-w zI?J$A;9yLfUs{hUF!=T`$x}wB6lk;L+=en%B%w8IOI(DEe1qP40R&@5!qw5}zG^I% z>U?!@$IE2nO%O*xr*UgmC6IvYAu%aKfUswz|N7w=cXn8NS;8oKVKw)2Sc;6AHP&fT zdy54CsRNH`Z%)!#J33eGa$B%RSA`OUc3BG_o`zXOODVDk&sWyjNJ*KHz3)frFKwZ& zarBrmH{sX!V3phgnfi&e7Nrk#JYW`nO6~a{$8Dl|r#Sv>HSoJNsyDT1FGFH6(mcZr zthe^cKW%UNqqtZAUc{4VHp{H^HLK z)JBQ6Vuff$WMRTaFtLckg8PeIa!Ca)Eb~zyy9OAj*2Xo4`eC-z@XrGPTo&k`je1%` zLH>@$PDH^F7zA^!WS2Rj5n^O+Mv;RH@vy4jIasfc)GXE-tX!iQaz@yd?>#aw=MrYROvJ3Y`;Q3oQcm!MLPN6&>8 z8zW&QQX-o^2Bw1e@yn^ILIJ}XT?C`=@b!j1bP}S8iAV>7wn7xVpXCyZP)Z%@iI6O_ zU5E`6x^ zu7Xs9Pk8abbWmz?S6U#KtDxdMaHrRtC9-K8xGH!=>Lxaj`7t5zF}U#K@N!PY@R>jr z+u$jJY(xQPz6_MdkAV3AP}|^kn#15Pe%H7ChCdC&0dTYrex(g3b! z!E*=FG61n}z)qtPd;q9o#hKuuFN8-0G92(wKf?6{!qj-2Xo9XUNrv8JXtqPURrpFiq)>{G;mje8$v6u@T@f@O z8od!E1msnk$z2b5M72?F3gfGFL}p>+_9>Hj7jb$!YN=9???vHj1VLM87CPlxs$8EW z_(&(4H`S_bM_E!C|TWusTe;ScnJZe*S(~~8t#Zd z{xpmOtKOu#io*+f;Maux`YK&aThd*D-GMtclS_u9%Iy~jddj(nR17>$LNy;oLTovx+5!X!+FrTI$z5{Cz=OgfA zu;PJy&}(~;#?mTDYqeAE?XXhT)FT`N3r1S`-wXI5K7R!JQja~{LR=B?8}bSsx=r5ehui57mrJXXMcHihcfBMpIs z)L)6F^Q^MoAzEjq&rqn4t}Z6=sTS@k zGOwlK{3qxIMpUjUk7ZHq5Q`6CF-=>U6Sn%H)ranoZBbcIz!RH`bAWlBAw6VMBi6e13NTxQcE zijtzCDn^y5AOR_GQsE+c`uVMBdQX#k4rWG2))GP)=6%0gF-XuVbCL1k|}-BvL6%rqG#k zqPiD9jUs6j7xPIHiI#%pkpZ_=;VdNyi=lB%GUzZfo`{`UCv`8XE>h)aA~JsBd|arU zRJO{N+7mp1g$h`xN|iF1tW2efi6~f7XW@*|DwZk|?NxwErHX}ROKhzEi8pY%_y8%0 z(|=5q7E;A$pY|B-1*Q`gLi20D8Wd8+L1Lu#R(2)&R4f#wmM{g^xZXfIlS#s=-UJ0z zVUIkV=kL%ey9=&jcf|mIE5gvnAVA02@ZE|d#39hCO+-%&$6lnQr91o{ehkqIsqXxM zB_@|dwH!{PfDg3b^2tDy5}g4#)GYEw)YMD)D=%KrA9Ad|7|pcR#Kk68!6Ap7$L(A@ z6p>IcsV$)_6{rK`%jjIw2rw_zY!3-FLPR1D9srLBLP>gKs>n@7nCV`AeeSG6&Scai zEx<;g7fJA@1CvEC1&M(;L{9Vstrrv-6p^>-Z#TM9+ZJzDN*|?Ge}5NVj18gr#Y2;q{~s|W(!&R z)l}C5kZn8&?Rdr@7b!-S;1%2pdmloR6&RsUD*035@r+(O#Tr*+RJHI^zX>n54THl_ zia25r4)a^*-OY4}7Q0ykc^k*SFMCcGXY5X4lV5M8amt0^|G zQKd(BHOfOlj1?L(WF+W8rOSTw5zGsn}-|m&yIry91}HisY;^?-jF6XFByeWMrjmbSm=h$!nNX~Hda4D+d>3s#T}sGGSTRS z>7^D{vQ%EsUg$YRdYmRA z?=MD58=Rh+Y!hi<=;)4Ol9>Erh+hsfA>gx6>6xzw+_sFUGE$kWl}lJ7#$+0mBTHbYfF0`%`C#;}(SX*(d+q<{!z*uw-| zHuoBs$EUJw=r3ule^J0H*AdE^tH5O8Z3(b|@zUV@r8VgRnsfbH_^ThgAYax$cR$Yt z;#zMOKdawtO2z!Aj#X%REH<5!2WKsS9%@gfsS`g!nyE91@=Drzx&1a`%o;?0jlxuK zuz9egO5(eR;+vax*MNH-z-Bu|m~)O&&gf8OT0@N`beRZK6?~)v=fH7GVHjdkl*bpR zhKvWV=CE`&&blsI9gf*FwNdGAqyh}S4}J`VPva?Xq+$T*>}Z#;Jq{Aj2Xzt5lvEvw zC}n_*ydAv;0X&>SZ6$xv&sHjMtuS|!*$^SB)Pm&^a-&i%bLiI z>}p{x_PnBjBt9gKPnRY36z~2rDy8fM{|sh;X@}&$?TgUF7GOetkU2+o{6J2wJEWV7 z5!_Fx4WY98g(kKQQOqDvoz-YD2`-@SlLGRBfYqpxxpWMu1|aA1zOw|MVyoake+ATV zSk9nH`ZcR^;y1>ipw2FU2LE6d=-tU59Rr)`4IAc6CmPaBKZW#NTP~-OBRDqYbP5rQ z9^cwGMnTB1`%6V@548QZ;#UFv{bTJAvY~|wE((8t$7FBW+ zqx_s;Lp{8699O0}ykbkvLmX6n6%XMG%%J*MHDjaW#$9i+7icxLS)>ER<9?ik@!ChQ z6QC=N{C6M9w+=CrD*?)IWJsK2BSs<0@SsODlMDuv%wO(_E)1nP>A+Pu9y}U67?k zEgb-iSU=#Tu_JQo3=k@slx_ADsqj7;H+f{>KO402_ZZAZRaM7Bqoi~2*%TInm{7Fi zG$(Qbfs@ObqiQ5o_wx$!SHn&};E_(BI`FJpL!nIq9hhJxum;8hABFS5S>U4ZQFvUA zQ{@l~M3PsKE>e&?F z$0YQmbLJ4+Uc6u`WD&6_-z10wW?;Z8ZDj758-cK@8$fwinP8Lu6tf)oa$0lHnCCfw zPMYKR1|`9&?->S;@;O)48x|YJ1H%FL!lS@E7MEhtO7NV;tS{j6@B%QXq-5|-uCIqz zha&2VN>kJY6)8)BO;SB?w7hEk3GWTzNTTplp3&9(NDO33xEp>)?=^|nhNAFw;7Wxc zTfi{z6Fe3bn!Y_kQfzrPWYpNn_q>D?Eml2H- zj&VgvTeTgElb%L)!lWop+G!!=u8m#9z;(KGWRP{*V*o2**6rW}L$5SF*aOTNd0Zag z%bia19Agb76w-|p!^2WP)6T9LiUUd3(&D-Sq^&E5Y6~YCj#YRPLWGB_1wj^xC!q6$ zTc<|v2)j8UfH*~`f|w%nB>ZOZYsuiT0j_jr%&k!dx(Nw_4e3yOv8v-H(n6-sW}iPc z$%Ke*I9#Y^DqzOtQmD;7OT$#E6Chl)39e2asFd(aEUEnz$EWol_vwZwJj(Ie2rQ3P z{xV@In82hmzZzorg(8uo!|A3e{YvUFNc(16tsU2|blUZBLbjZjMQJn!gy>Fl5+ zLo1d>mGcQ%NZ8A@7h|S{E}bTw1E0R(?Dlc^Lg>S%W%vccu#aHv>iwCeD?n(GdV#$; zg=)SLMsQH7%54D0S6<};n;|OLZ zE}0Bmxq$teOGvvRhx^b3`rW34CNI!M&RRWP+V!ggxL7l`Eq$w(?n@UeOOc~yMRT%M zmNk}EnTog@;jByApLt{5m_ET+1v$=ao2I) zBQP`%b*@o^Yb;!_P(2S1>hW1+>P)+vE$A*9wrq)9#Vk^nR(tIJsd!aORTESoa|K(E z0A#NcGF(Zpuilph*abc*aGIc-6U8cKsU~5RC!FI}nV;Vx1|Vmk{^nNpUTGZQaW2G+ zfV|C#Bs&=4k`<#fW{{Cdz$RwmYynh3nYlBI64cG!YO68AX5!VfiCZcgGdF$%S6D42 zESs;?@ARADd~h)7)*@xXQO{>CRFO5umig3SsZeHDn&^_-kY!D9!s+HIjeR>Q|X(R8!cs<39e5R68rOAkZi-nFc*n>g-3%aCjj{JBp#bFn=mj7O#G4^HX=#%vq=t8 zyCil8kMINmW5NU4XYg44r>bZUBa`+^s*vX7Ut$k~MB$b!I#nsh^G4A-G%469Re70H z3FICqS8-!x5`hm5Yk&|eMFV(=Jrt-+&_RO7*v51PC_j*KBYM3%E>7*aft3+K7(o0!m0cAmvXJb;v(MT#8h*YA+iT(-sQ7MH_ ztHV&dpg2KBh}apRZ?iHe8PRt^9e}reOHEIb?^vj=vl*Vm%vG{ht0rc<%UDuO#dcd; zQ9x=K^LqQd!)#lBeiQ$0GTI0vycBY^1>; zz{cfX$|@O|odiovLz>?Zevj?{d0?togXWzDi8V`o15SpEI-+Li^EFG><4Z(C4`@?V ztx(;BYYkEj@A7GNU|0A6v2y*Y9zAuYsSfPTc4qvbh>kY(8h@L$%OhmY#*U2^H0>~m z8Ar9EECH~?0JU@gE3TjIZXc~&44CG+$sZar@Bdo<2N9z<6(4fYtfQ`4P@DCyuzF|F zqCkBcT?ZpBTWeSL*T9AO6N65^SZFiDYSX7e^W}z&V{+6`SWRoM`>@vdu+w;&wpm1$ z81XkP+r@@3jx@e+wbL{E>}=7F`x_bTf}lZKdBZi@eb<=Uto&h%T+>ybmV_rmxX+Or&L)OpkI8 zEZ;Goretk1y==5$GE}7NT z3n*1?A!k!*>hjf4mnqSkMSrm~eCj#>e^(V!)XKuyYR#ZI+OuGJTCQ+~AIf>nn&rk; z&6yeEvwTnuEY~jsTQ$o_U3i$c_;;ZAqnB0Y@3IW>Od(Y__-8F87YrXCo zJXVjb9ywa?TVB;}`mLRWG3@b{YdCPV1t~kACK{?D#EDmsi`E$BTQ9GY-`llYz+g z4RqFo$j@@E2ZPh2L5!rE>}NpM__60HRT4bS7BKHlK}3%_DR<(C0Yt89cp_XBr_8y= zu;O5~5UdjnOQBLgu&gW;xHeBhEE^`Q81MIkVfF^kP+!~{k}vF+Vj=axnG2Lnk_1@uf?KbVf}>fC_Sq#?2N73_Lhk_EfY9; zIK<8CE4P^&R__BuMO%{UMZ1;-1>M;=z^7J15KbmqJPVWPIhmlfv}TI9U}8IqjM+HE z13pZnGHl4hD$K|-V8w$`Oq(+($kQv$38U(}VW!4gU`%C4siEvh!UKtnF$CB%4`!*D zax0vsQ4t!f$B?Q;we~nr0I@kpa?y?EPX(Bu(N$86#j(l-nrp!Se!K$*X)-({vnu8b z+cLNmP?UWF1WK@pq7f|^eO6=xf@>`TBltv3Koyt~0MQ+}2a`Y{S3>+~pcPg{1*A~x zG*IGdJdBbc0Hhr2B2;KAQKV?lt_@S0s?5}V1-Fp#jHeT!2uhL%p@JCo7W;;s1=w3B zhTvHiaZztakm5tqF33}rHsCYGYqi8&HmTK0lXK$jO!B)nd8P=OAkli|%`JfiULYj= zxWLhKSOl1>U9v9~u7@prSc_NGmOC$`$9oY2rA0fFOR_yioK^KIJNS_rKq>ZZB1_fA zkK?$h(nMJ|iY}AzE=1~9TCHYntypGHL1rY)Sk(XE(j2{9Q7cwz%9W^=CT8}j@J>R` zeYPd_heVejDVP9dbg5XwiFT!(FAp~UyM;xp8ZTP(XYDA@Evm>#hx2B- zR(jFgwIF1hsezyf^ySeZCD){p;kBk)V%XV84Hi!uF@d5^?Q2nO=EcgrtXM%LpyuQa z3ZR+6P^&uDrI^;0Vk#uu(z4{Gp{$1bvPG(SRH;t{GmVQSaPLeuqTT~ZOafTxJF<_= zculbgZLxNySuspinMVe=b+0Tf^}qnLHo94lck`rz#IUVkOXxrgzg|%7+RtnP0LcOX zY`gNT_c~TX^IU^On0E+=b>5+yB#3sVOUz!C(s4zcZbsl}R+v!$itd^q5_+uRXn~dC zP=dWbC{{-_)@*bfV9{g|9ajLZPRR(P_2T-6At!rT6lw2b!3K0TS<+%$GtF!ne>Hl! zz-B~^qz@%vHOmUpIkp1KB(d&!8>f?kQ7xqtTI@$UuQ~-?+MykFDkc82uK2`vDgW#V zK@}_nqPBJzt15OGHG~R2s!zFY4Wt!6(G`N+H!Z=}^g|VqDXsKt-vvWQ;k!9;xGJ}* zOOsazPVQMuZP%1Zc_g}$ON>11aapaEwm$ly#fhyGipUp|fD*yJ$UzlNr7V^(^|whP zskDWOu~J;EUt!Ay4Qj*9b{}I+i`q$PS1zf$!CI_nR}4>eV(=FFD;%d*!qc;>45zPe z$v`4LB->t#i4@A=5S{ufIFzCCB$q14mqwLLFm0NOCH-a5vf{ZVQEyAvF1c#+SNVqo zt%XX+NNuVeD6HyW?zRS!kwz7mT16%!2DD>(jQ3f#JeqBwh{dR+W2GdLE5$xUaCm+w zf;Yx92Z5%IW~dH|`D`8+s~C9s7LgL2V(B7ncGSslG^-^w+N6<5Ct!9`6m+c9I5mmr zEr(M3I4OfV7A^Iy%43@g0xjEjG1A8=agc7(#V50n%%-%^jM9)ssRUB0_}Wdps@(#j z19xDFU~xnnb3;0|z@~9-+bYPtCB-R52{fxD>Rs|Ak0ZpZkEnY8WlG_ILX-pQSpe3cg%M~t)N1vH;^{S=6!GPu%{xT-nE_)!mYo567s&Tz5dJY`eVzXeUS zPRZ{9BmgAalFa$WB(tCrHUdPHGkL)#-1=rgL{lsYSL9eEgP^hmKrElps8FA(1J*S? zPHV7Z9G>7}f{}Da!zFT&unJzN&oviEs?_n7g-&E!oD^$Tps*CY0*|0kO0v|w1LMA0 zoV06^a-Tn_qAOiL!-ox`M7rw3}yb1e5e@ z1XyuMFshY1+4)>fimKog|ECM>;Pli{5RIcjiti9=2-#qjv;vXps0HOaMx!H8K%EpQ znwzH1-hwGnUKZCXH!>vdT2|5y=Z}Q2AranRJsa?aK49b#AVQrRLMZr_(5uRHmY`FJ z3OIp8UD{Kk>plgn8fE_C5f#ReDR`!RU6Z9vkHV%!L|d8f5n*XoZwZojU|w%sDbPVp zw3*Gf+#2;oJ87mRt&?RLmdz>7!%FI%B5c~tHa)c7dI^%tRi*tzCS$)@r`4SF0k-S> ziB8&Yb1gJJQ-~DVQ!|

        -
        -

        Prism.languages.insertBefore(inside, before, insert, root)

        +

        Helper functions

        -

        This is a helper method to ease modifying existing languages. For example, the CSS language definition not only defines CSS highlighting for CSS documents, - but also needs to define highlighting for CSS embedded in HTML through <style> elements. To do this, it needs to modify - Prism.languages.markup and add the appropriate tokens. However, Prism.languages.markup - is a regular JavaScript object literal, so if you do this:

        - -
        Prism.languages.markup.style = {
        -	/* tokens */
        -};
        - -

        then the style token will be added (and processed) at the end. Prism.languages.insertBefore allows you to insert - tokens before existing tokens. For the CSS example above, you would use it like this:

        - -
        Prism.languages.insertBefore('markup', 'cdata', {
        -	'style': {
        -		/* tokens */
        -	}
        -});
        - -

        Parameters

        -
        -
        inside
        -
        The property of root that contains the object to be modified.
        - -
        before
        -
        Key to insert before (String)
        - -
        insert
        -
        An object containing the key-value pairs to be inserted
        - -
        root
        -
        The root object, i.e. the object that contains the object that will be modified. Optional, default value is Prism.languages.
        -
        -
        +

        Prism also provides some useful function for creating and modifying language definitions. Prism.languages.insertBefore can be used to modify existing languages definitions. Prism.languages.extend is useful for when your language is very similar to another existing language.

        @@ -397,99 +364,7 @@

        Writing plugins

        API documentation

        -
        -

        Prism.highlightAll(async, callback)

        -

        This is the most high-level function in Prism’s API. It fetches all the elements that have a .language-xxxx class - and then calls Prism.highlightElement() on each one of them.

        - -

        Parameters

        -
        -
        async
        -
        - Whether to use Web Workers to improve performance and avoid blocking the UI when highlighting very large - chunks of code. False by default - (why?).
        - Note: All language definitions required to highlight the code must be included in the main prism.js - file for the async highlighting to work. You can build your own bundle on the Download page. -
        - -
        callback
        -
        - An optional callback to be invoked after the highlighting is done. Mostly useful when async - is true, since in that case, the highlighting is done asynchronously. -
        -
        -
        - -
        -

        Prism.highlightAllUnder(element, async, callback)

        -

        Fetches all the descendants of element that have a .language-xxxx class - and then calls Prism.highlightElement() on each one of them.

        - -

        Parameters

        -
        -
        element
        -
        The root element, whose descendants that have a .language-xxxx class will be highlighted.
        - -
        async
        -
        Same as in Prism.highlightAll()
        - -
        callback
        -
        Same as in Prism.highlightAll()
        -
        -
        - -
        -

        Prism.highlightElement(element, async, callback)

        -

        Highlights the code inside a single element.

        - -

        Parameters

        -
        -
        element
        -
        The element containing the code. It must have a class of language-xxxx to be processed, where xxxx is a valid language identifier.
        - -
        async
        -
        Same as in Prism.highlightAll()
        -
        callback
        -
        Same as in Prism.highlightAll()
        -
        -
        - -
        -

        Prism.highlight(text, grammar, language)

        -

        Low-level function, only use if you know what you’re doing. - It accepts a string of text as input, the language definitions to use, and the name of the language, and returns a string with the HTML produced.

        - -

        Parameters

        -
        -
        text
        -
        A string with the code to be highlighted.
        -
        grammar
        -
        An object containing the tokens to use. Usually a language definition like Prism.languages.markup
        -
        language
        -
        The name of the language definition passed to grammar. E.g. markup or javascript
        -
        - -

        Returns

        -

        The highlighted HTML

        -
        - -
        -

        Prism.tokenize(text, grammar)

        -

        This is the heart of Prism, and the most low-level function you can use. It accepts a string of text as input and the language definitions to use, and returns an array with the tokenized code. - When the language definition includes nested tokens, the function is called recursively on each of these tokens. This method could be useful in other contexts as well, as a very crude parser.

        - -

        Parameters

        -
        -
        text
        -
        A string with the code to be highlighted.
        -
        grammar
        -
        An object containing the tokens to use. Usually a language definition like Prism.languages.markup
        -
        - -

        Returns

        -

        An array of strings, tokens (class Prism.Token) and other arrays.

        -
        +

        All public and stable parts of Prism's API are documented here.

        diff --git a/gulpfile.js/docs.js b/gulpfile.js/docs.js new file mode 100644 index 0000000000..cbd82f3fc2 --- /dev/null +++ b/gulpfile.js/docs.js @@ -0,0 +1,62 @@ +"use strict"; + +const { src, dest, series } = require('gulp'); +const replace = require('gulp-replace'); +const jsdoc = require('gulp-jsdoc3'); +const pump = require('pump'); +const del = require('del'); + +const jsDoc = { + config: '../.jsdoc.json', + readme: 'README.md', + files: ['components/prism-core.js'], + junk: ['docs/fonts/Source-Sans-Pro', 'docs/**/Apache-License-2.0.txt'] +}; + + +function docsClean() { + return del([ + // everything in the docs folder + 'docs/**/*', + // except for our CSS overwrites + '!docs/styles', + '!docs/styles/overwrites.css', + ]); +} + +function docsCreate(cb) { + var config = require(jsDoc.config); + var files = [jsDoc.readme].concat(jsDoc.files); + src(files, { read: false }).pipe(jsdoc(config, cb)); +} + +function docsAddFavicon(cb) { + return pump([ + src('docs/*.html'), + replace( + /\s*<\/head>/, + '\n $&' + ), + dest('docs/') + ], cb); +} + +function docsRemoveExcessFiles() { + return del(jsDoc.junk); +} + +const docs = series(docsClean, docsCreate, docsRemoveExcessFiles, docsAddFavicon); + +module.exports = { + docs, + handlers: { + jsdocCommentFound(comment) { + // This is a hack. + // JSDoc doesn't support TS' type import syntax (e.g. `@type {import("./my-file.js").Type}`) and throws an + // error if used. So we just replace the "function" with some literal that JSDoc will interpret as a + // namespace. Not pretty but it works. + comment.comment = comment.comment + .replace(/\bimport\s*\(\s*(?:"(?:[^"\r\n\\]|\\.)*"|'(?:[^'\r\n\\]|\\.)*')\s*\)/g, '__dyn_import__') + } + } +}; diff --git a/gulpfile.js/index.js b/gulpfile.js/index.js index ece403a2e3..fdc6a73ae2 100644 --- a/gulpfile.js/index.js +++ b/gulpfile.js/index.js @@ -13,6 +13,7 @@ const fs = require('fs'); const paths = require('./paths'); const { changes, linkify } = require('./changelog'); +const { docs } = require('./docs'); const componentsPromise = new Promise((resolve, reject) => { @@ -202,7 +203,7 @@ async function languagePlugins() { } })); - const rejectedTasks = taskResults.filter(/** @return {r is {status: 'rejected', reason: any}} */ r => r.status === 'rejected'); + const rejectedTasks = taskResults.filter(/** @returns {r is {status: 'rejected', reason: any}} */ r => r.status === 'rejected'); if (rejectedTasks.length > 0) { throw rejectedTasks.map(r => r.reason); } @@ -214,7 +215,7 @@ const plugins = series(languagePlugins, minifyPlugins); module.exports = { watch: watchComponentsAndPlugins, - default: parallel(components, plugins, componentsJsonToJs, build), + default: series(parallel(components, plugins, componentsJsonToJs, build), docs), linkify, changes }; diff --git a/package-lock.json b/package-lock.json index 2664007e2d..5abfdb95b2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4,6 +4,41 @@ "lockfileVersion": 1, "requires": true, "dependencies": { + "@babel/parser": { + "version": "7.10.3", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.10.3.tgz", + "integrity": "sha512-oJtNJCMFdIMwXGmx+KxuaD7i3b8uS7TTFYW/FNG2BT8m+fmGHoiPYoH0Pe3gya07WuFmM5FCDIr1x0irkD/hyA==", + "dev": true + }, + "@types/events": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@types/events/-/events-3.0.0.tgz", + "integrity": "sha512-EaObqwIvayI5a8dCzhFrjKzVwKLxjoG9T6Ppd5CEo07LRKfQ8Yokw54r5+Wq7FaBQ+yXRvQAYPrHwya1/UFt9g==", + "dev": true + }, + "@types/glob": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.1.1.tgz", + "integrity": "sha512-1Bh06cbWJUHMC97acuD6UMG29nMt0Aqz1vF3guLfG+kHHJhy3AyohZFFxYk2f7Q1SQIrNwvncxAE0N/9s70F2w==", + "dev": true, + "requires": { + "@types/events": "*", + "@types/minimatch": "*", + "@types/node": "*" + } + }, + "@types/minimatch": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.3.tgz", + "integrity": "sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA==", + "dev": true + }, + "@types/node": { + "version": "12.0.2", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.0.2.tgz", + "integrity": "sha512-5tabW/i+9mhrfEOUcLDu2xBPsHJ+X5Orqy9FKpale3SjDA17j5AEpYq5vfy3oAeAHGcvANRCO3NV3d2D6q3NiA==", + "dev": true + }, "abab": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.0.tgz", @@ -225,6 +260,21 @@ } } }, + "array-union": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz", + "integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=", + "dev": true, + "requires": { + "array-uniq": "^1.0.1" + } + }, + "array-uniq": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz", + "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=", + "dev": true + }, "array-unique": { "version": "0.3.2", "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", @@ -402,6 +452,15 @@ "tweetnacl": "^0.14.3" } }, + "beeper": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/beeper/-/beeper-2.0.0.tgz", + "integrity": "sha512-+ShExQEewPvKdTUOtCAJmkUAgEyNF0QqgiAhPRE5xLvoFkIPt8xuHKaz1gMLzSMS73beHWs9gbRBngdH61nVWw==", + "dev": true, + "requires": { + "delay": "^4.1.0" + } + }, "binary-extensions": { "version": "1.13.1", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.13.1.tgz", @@ -424,6 +483,12 @@ "file-uri-to-path": "1.0.0" } }, + "bluebird": { + "version": "3.7.2", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", + "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==", + "dev": true + }, "brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -516,6 +581,15 @@ "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", "dev": true }, + "catharsis": { + "version": "0.8.11", + "resolved": "https://registry.npmjs.org/catharsis/-/catharsis-0.8.11.tgz", + "integrity": "sha512-a+xUyMV7hD1BrDQA/3iPV7oc+6W26BgVJO05PGEoatMyIuPScQKsde6i3YorWX1qs+AZjnJ18NqdKoCtKiNh1g==", + "dev": true, + "requires": { + "lodash": "^4.17.14" + } + }, "chai": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/chai/-/chai-4.2.0.tgz", @@ -970,6 +1044,35 @@ } } }, + "del": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/del/-/del-4.1.1.tgz", + "integrity": "sha512-QwGuEUouP2kVwQenAsOof5Fv8K9t3D8Ca8NxcXKrIpEHjTXK5J2nXLdP+ALI1cgv8wj7KuwBhTwBkOZSJKM5XQ==", + "dev": true, + "requires": { + "@types/glob": "^7.1.1", + "globby": "^6.1.0", + "is-path-cwd": "^2.0.0", + "is-path-in-cwd": "^2.0.0", + "p-map": "^2.0.0", + "pify": "^4.0.1", + "rimraf": "^2.6.3" + }, + "dependencies": { + "pify": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "dev": true + } + } + }, + "delay": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/delay/-/delay-4.3.0.tgz", + "integrity": "sha512-Lwaf3zVFDMBop1yDuFZ19F9WyGcZcGacsbdlZtWjQmM50tOcMntm1njF/Nb/Vjij3KaSvCF+sEYGKrrjObu2NA==", + "dev": true + }, "delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", @@ -994,6 +1097,12 @@ "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", "dev": true }, + "docdash": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/docdash/-/docdash-1.2.0.tgz", + "integrity": "sha512-IYZbgYthPTspgqYeciRJNPhSwL51yer7HAwDXhF5p+H7mTDbPvY3PCk/QDjNxdPCpWkaJVFC4t7iCNB/t9E5Kw==", + "dev": true + }, "dom-serializer": { "version": "0.2.2", "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.2.2.tgz", @@ -2272,6 +2381,19 @@ "which": "^1.2.14" } }, + "globby": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/globby/-/globby-6.1.0.tgz", + "integrity": "sha1-9abXDoOV4hyFj7BInWTfAkJNUGw=", + "dev": true, + "requires": { + "array-union": "^1.0.1", + "glob": "^7.0.3", + "object-assign": "^4.0.1", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0" + } + }, "glogg": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/glogg/-/glogg-1.0.2.tgz", @@ -2386,6 +2508,45 @@ "through2": "^2.0.0" } }, + "gulp-jsdoc3": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/gulp-jsdoc3/-/gulp-jsdoc3-3.0.0.tgz", + "integrity": "sha512-rE2jAwCPA8XFi9g4V3Z3LPhZNjxuMTIYQVMjdqZAQpRfJITLVaUK3xfmiiNTMc7j+fT7pL8Q5yj7ZPRdwCJWNg==", + "dev": true, + "requires": { + "ansi-colors": "^4.1.1", + "beeper": "^2.0.0", + "debug": "^4.1.1", + "fancy-log": "^1.3.3", + "ink-docstrap": "^1.3.2", + "jsdoc": "^3.6.3", + "map-stream": "0.0.7", + "tmp": "0.1.0" + }, + "dependencies": { + "ansi-colors": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", + "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", + "dev": true + }, + "debug": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + } + } + }, "gulp-rename": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/gulp-rename/-/gulp-rename-1.4.0.tgz", @@ -2592,6 +2753,16 @@ "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==", "dev": true }, + "ink-docstrap": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/ink-docstrap/-/ink-docstrap-1.3.2.tgz", + "integrity": "sha512-STx5orGQU1gfrkoI/fMU7lX6CSP7LBGO10gXNgOZhwKhUqbtNjCkYSewJtNnLmWP1tAGN6oyEpG1HFPw5vpa5Q==", + "dev": true, + "requires": { + "moment": "^2.14.1", + "sanitize-html": "^1.13.0" + } + }, "interpret": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.2.0.tgz", @@ -2762,6 +2933,30 @@ } } }, + "is-path-cwd": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-2.1.0.tgz", + "integrity": "sha512-Sc5j3/YnM8tDeyCsVeKlm/0p95075DyLmDEIkSgQ7mXkrOX+uTCtmQFm0CYzVyJwcCCmO3k8qfJt17SxQwB5Zw==", + "dev": true + }, + "is-path-in-cwd": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-path-in-cwd/-/is-path-in-cwd-2.1.0.tgz", + "integrity": "sha512-rNocXHgipO+rvnP6dk3zI20RpOtrAM/kzbB258Uw5BWr3TpXi861yzjo16Dn4hUox07iw5AyeMLHWsujkjzvRQ==", + "dev": true, + "requires": { + "is-path-inside": "^2.1.0" + } + }, + "is-path-inside": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-2.1.0.tgz", + "integrity": "sha512-wiyhTzfDWsvwAW53OBWF5zuvaOGlZ6PwYxAbPVDhpm+gM09xKQGjBq/8uYN12aDvMxnAnq3dxTyoSoRNmg5YFg==", + "dev": true, + "requires": { + "path-is-inside": "^1.0.2" + } + }, "is-plain-object": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", @@ -2890,12 +3085,63 @@ } } }, + "js2xmlparser": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/js2xmlparser/-/js2xmlparser-4.0.1.tgz", + "integrity": "sha512-KrPTolcw6RocpYjdC7pL7v62e55q7qOMHvLX1UCLc5AAS8qeJ6nukarEJAF2KL2PZxlbGueEbINqZR2bDe/gUw==", + "dev": true, + "requires": { + "xmlcreate": "^2.0.3" + } + }, "jsbn": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", "dev": true }, + "jsdoc": { + "version": "3.6.4", + "resolved": "https://registry.npmjs.org/jsdoc/-/jsdoc-3.6.4.tgz", + "integrity": "sha512-3G9d37VHv7MFdheviDCjUfQoIjdv4TC5zTTf5G9VODLtOnVS6La1eoYBDlbWfsRT3/Xo+j2MIqki2EV12BZfwA==", + "dev": true, + "requires": { + "@babel/parser": "^7.9.4", + "bluebird": "^3.7.2", + "catharsis": "^0.8.11", + "escape-string-regexp": "^2.0.0", + "js2xmlparser": "^4.0.1", + "klaw": "^3.0.0", + "markdown-it": "^10.0.0", + "markdown-it-anchor": "^5.2.7", + "marked": "^0.8.2", + "mkdirp": "^1.0.4", + "requizzle": "^0.2.3", + "strip-json-comments": "^3.1.0", + "taffydb": "2.6.2", + "underscore": "~1.10.2" + }, + "dependencies": { + "escape-string-regexp": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", + "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", + "dev": true + }, + "mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "dev": true + }, + "strip-json-comments": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.0.tgz", + "integrity": "sha512-e6/d0eBu7gHtdCqFt0xJr642LdToM5/cN4Qb9DbHjVx1CP5RyeM+zH7pbecEmDv/lBqb0QH+6Uqq75rxFPkM0w==", + "dev": true + } + } + }, "jsdom": { "version": "13.2.0", "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-13.2.0.tgz", @@ -2978,6 +3224,15 @@ "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", "dev": true }, + "klaw": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/klaw/-/klaw-3.0.0.tgz", + "integrity": "sha512-0Fo5oir+O9jnXu5EefYbVK+mHMBeEVEy2cmctR1O1NECcCkPRreJKrS6Qt/j3KC2C148Dfo9i3pCmCMsdqGr0g==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.9" + } + }, "last-run": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/last-run/-/last-run-1.1.1.tgz", @@ -3041,6 +3296,15 @@ "resolve": "^1.1.7" } }, + "linkify-it": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-2.2.0.tgz", + "integrity": "sha512-GnAl/knGn+i1U/wjBz3akz2stz+HrHLsxMwHQGofCDfPvlf+gDKN58UtfmUquTY4/MXeE2x7k19KQmeoZi94Iw==", + "dev": true, + "requires": { + "uc.micro": "^1.0.1" + } + }, "load-json-file": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", @@ -3172,6 +3436,31 @@ "object-visit": "^1.0.0" } }, + "markdown-it": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-10.0.0.tgz", + "integrity": "sha512-YWOP1j7UbDNz+TumYP1kpwnP0aEa711cJjrAQrzd0UXlbJfc5aAq0F/PZHjiioqDC1NKgvIMX+o+9Bk7yuM2dg==", + "dev": true, + "requires": { + "argparse": "^1.0.7", + "entities": "~2.0.0", + "linkify-it": "^2.0.0", + "mdurl": "^1.0.1", + "uc.micro": "^1.0.5" + } + }, + "markdown-it-anchor": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/markdown-it-anchor/-/markdown-it-anchor-5.3.0.tgz", + "integrity": "sha512-/V1MnLL/rgJ3jkMWo84UR+K+jF1cxNG1a+KwqeXqTIJ+jtA8aWSHuigx8lTzauiIjBDbwF3NcWQMotd0Dm39jA==", + "dev": true + }, + "marked": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/marked/-/marked-0.8.2.tgz", + "integrity": "sha512-EGwzEeCcLniFX51DhTpmTom+dSA/MG/OBUDjnWtHbEnjAH180VzUeAw+oE4+Zv+CoYBWyRlYOTR0N8SO9R1PVw==", + "dev": true + }, "matchdep": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/matchdep/-/matchdep-2.0.0.tgz", @@ -3207,6 +3496,12 @@ } } }, + "mdurl": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-1.0.1.tgz", + "integrity": "sha1-/oWy7HWlkDfyrf7BAP1sYBdhFS4=", + "dev": true + }, "mem": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/mem/-/mem-4.2.0.tgz", @@ -3384,6 +3679,12 @@ } } }, + "moment": { + "version": "2.27.0", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.27.0.tgz", + "integrity": "sha512-al0MUK7cpIcglMv3YF13qSgdAIqxHTO7brRtaz3DlSULbqfazqkc5kEjNrLDOM7fsjshoFIihnU8snrP7zUvhQ==", + "dev": true + }, "ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", @@ -3701,6 +4002,12 @@ "p-limit": "^2.0.0" } }, + "p-map": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-2.1.0.tgz", + "integrity": "sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw==", + "dev": true + }, "p-try": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.1.0.tgz", @@ -3772,6 +4079,12 @@ "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", "dev": true }, + "path-is-inside": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", + "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=", + "dev": true + }, "path-key": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", @@ -3855,6 +4168,34 @@ "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=", "dev": true }, + "postcss": { + "version": "7.0.32", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.32.tgz", + "integrity": "sha512-03eXong5NLnNCD05xscnGKGDZ98CyzoqPSMjOe6SuoQY7Z2hIj0Ld1g/O/UQRuOle2aRtiIRDg9tDcTGAkLfKw==", + "dev": true, + "requires": { + "chalk": "^2.4.2", + "source-map": "^0.6.1", + "supports-color": "^6.1.0" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + }, + "supports-color": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", + "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, "prelude-ls": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", @@ -4149,6 +4490,15 @@ "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=", "dev": true }, + "requizzle": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/requizzle/-/requizzle-0.2.3.tgz", + "integrity": "sha512-YanoyJjykPxGHii0fZP0uUPEXpvqfBDxWV7s6GKAiiOsiqhX6vHNyW3Qzdmqp/iq/ExbhaGbVrjB4ruEVSM4GQ==", + "dev": true, + "requires": { + "lodash": "^4.17.14" + } + }, "resolve": { "version": "1.15.1", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.15.1.tgz", @@ -4189,6 +4539,15 @@ "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", "dev": true }, + "rimraf": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", + "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + }, "safe-buffer": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", @@ -4210,6 +4569,34 @@ "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", "dev": true }, + "sanitize-html": { + "version": "1.27.0", + "resolved": "https://registry.npmjs.org/sanitize-html/-/sanitize-html-1.27.0.tgz", + "integrity": "sha512-U1btucGeYVpg0GoK43jPpe/bDCV4cBOGuxzv5NBd0bOjyZdMKY0n98S/vNlO1wVwre0VCj8H3hbzE7gD2+RjKA==", + "dev": true, + "requires": { + "chalk": "^2.4.1", + "htmlparser2": "^4.1.0", + "lodash": "^4.17.15", + "postcss": "^7.0.27", + "srcset": "^2.0.1", + "xtend": "^4.0.1" + }, + "dependencies": { + "htmlparser2": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-4.1.0.tgz", + "integrity": "sha512-4zDq1a1zhE4gQso/c5LP1OtrhYTncXNSpvJYtWJBtXAETPlMfi3IFNjGuQbYLuVY4ZR0QMqRVvo4Pdy9KLyP8Q==", + "dev": true, + "requires": { + "domelementtype": "^2.0.1", + "domhandler": "^3.0.0", + "domutils": "^2.0.0", + "entities": "^2.0.0" + } + } + } + }, "saxes": { "version": "3.1.9", "resolved": "https://registry.npmjs.org/saxes/-/saxes-3.1.9.tgz", @@ -4501,6 +4888,12 @@ "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", "dev": true }, + "srcset": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/srcset/-/srcset-2.0.1.tgz", + "integrity": "sha512-00kZI87TdRKwt+P8jj8UZxbfp7mK2ufxcIMWvhAOZNJTRROimpHeruWrGvCZneiuVDLqdyHefVp748ECTnyUBQ==", + "dev": true + }, "sshpk": { "version": "1.16.1", "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz", @@ -4638,6 +5031,12 @@ "integrity": "sha1-rifbOPZgp64uHDt9G8KQgZuFGeY=", "dev": true }, + "taffydb": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/taffydb/-/taffydb-2.6.2.tgz", + "integrity": "sha1-fLy2S1oUG2ou/CxdLGe04VCyomg=", + "dev": true + }, "textextensions": { "version": "2.4.0", "resolved": "https://registry.npmjs.org/textextensions/-/textextensions-2.4.0.tgz", @@ -4676,6 +5075,15 @@ "integrity": "sha512-NB6Dk1A9xgQPMoGqC5CVXn123gWyte215ONT5Pp5a0yt4nlEoO1ZWeCwpncaekPHXO60i47ihFnZPiRPjRMq4Q==", "optional": true }, + "tmp": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.1.0.tgz", + "integrity": "sha512-J7Z2K08jbGcdA1kkQpJSqLF6T0tdQqpR2pnSUXsIchbPdTI9v3e85cLW0d6WDhwuAleOV71j2xWs8qMPfK7nKw==", + "dev": true, + "requires": { + "rimraf": "^2.6.3" + } + }, "to-absolute-glob": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/to-absolute-glob/-/to-absolute-glob-2.0.2.tgz", @@ -4798,6 +5206,12 @@ "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=", "dev": true }, + "uc.micro": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-1.0.6.tgz", + "integrity": "sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA==", + "dev": true + }, "uglify-js": { "version": "3.5.2", "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.5.2.tgz", @@ -4822,6 +5236,12 @@ "integrity": "sha1-5z3T17DXxe2G+6xrCufYxqadUPo=", "dev": true }, + "underscore": { + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.10.2.tgz", + "integrity": "sha512-N4P+Q/BuyuEKFJ43B9gYuOj4TQUHXX+j2FqguVOpjkssLUUrnJofCcBccJSCoeturDoZU6GorDTHSvUDlSQbTg==", + "dev": true + }, "undertaker": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/undertaker/-/undertaker-1.2.1.tgz", @@ -5164,6 +5584,12 @@ "integrity": "sha512-tGkGJkN8XqCod7OT+EvGYK5Z4SfDQGD30zAa58OcnAa0RRWgzUEK72tkXhsX1FZd+rgnhRxFtmO+ihkp8LHSkw==", "dev": true }, + "xmlcreate": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/xmlcreate/-/xmlcreate-2.0.3.tgz", + "integrity": "sha512-HgS+X6zAztGa9zIK3Y3LXuJes33Lz9x+YyTxgrkIdabu2vqcGOWwdfCpf1hWLRrd553wd4QCDf6BBO6FfdsRiQ==", + "dev": true + }, "xtend": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", @@ -5202,9 +5628,9 @@ "dev": true }, "camelcase": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.2.0.tgz", - "integrity": "sha512-IXFsBS2pC+X0j0N/GE7Dm7j3bsEBp+oTpb7F50dwEVX7rf3IgwO9XatnegTsDtniKCUtEJH4fSU6Asw7uoVLfQ==", + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", "dev": true }, "cliui": { @@ -5333,9 +5759,9 @@ "dev": true }, "yargs-parser": { - "version": "13.0.0", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.0.0.tgz", - "integrity": "sha512-w2LXjoL8oRdRQN+hOyppuXs+V/fVAYtpcrRxZuF7Kt/Oc+Jr2uAcVntaUTNT6w5ihoWfFDpNY8CPx1QskxZ/pw==", + "version": "13.1.2", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", + "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", "dev": true, "requires": { "camelcase": "^5.0.0", diff --git a/package.json b/package.json index 8a475ff250..fa92ec55fd 100755 --- a/package.json +++ b/package.json @@ -33,9 +33,12 @@ }, "devDependencies": { "chai": "^4.2.0", + "del": "^4.1.1", + "docdash": "^1.2.0", "gulp": "^4.0.2", "gulp-concat": "^2.3.4", "gulp-header": "^2.0.7", + "gulp-jsdoc3": "^3.0.0", "gulp-rename": "^1.2.0", "gulp-replace": "^1.0.0", "gulp-uglify": "^3.0.1", diff --git a/plugins/jsonp-highlight/prism-jsonp-highlight.js b/plugins/jsonp-highlight/prism-jsonp-highlight.js index 8b6f65ea9a..5f0d68b547 100644 --- a/plugins/jsonp-highlight/prism-jsonp-highlight.js +++ b/plugins/jsonp-highlight/prism-jsonp-highlight.js @@ -11,7 +11,7 @@ /** * The list of adapter which will be used if `data-adapter` is not specified. * - * @type {Array.<{adapter: Adapter, name: string}>} + * @type {Array<{adapter: Adapter, name: string}>} */ var adapters = []; diff --git a/prism.js b/prism.js index 63b9e32cfa..bde34e3c0e 100644 --- a/prism.js +++ b/prism.js @@ -3,6 +3,8 @@ Begin prism-core.js ********************************************** */ +/// + var _self = (typeof window !== 'undefined') ? window // if in browser : ( @@ -13,10 +15,12 @@ var _self = (typeof window !== 'undefined') /** * Prism: Lightweight, robust, elegant syntax highlighting - * MIT license http://www.opensource.org/licenses/mit-license.php/ - * @author Lea Verou http://lea.verou.me + * + * @license MIT + * @author Lea Verou + * @namespace + * @public */ - var Prism = (function (_self){ // Private helper vars @@ -25,8 +29,39 @@ var uniqueId = 0; var _ = { + /** + * By default, Prism will attempt to highlight all code elements (by calling {@link Prism.highlightAll}) on the + * current page after the page finished loading. This might be a problem if e.g. you wanted to asynchronously load + * additional languages or plugins yourself. + * + * By setting this value to `true`, Prism will not automatically highlight all code elements on the page. + * + * You obviously have to change this value before the automatic highlighting started. To do this, you can add an + * empty Prism object into the global scope before loading the Prism script like this: + * + * ```js + * window.Prism = window.Prism || {}; + * Prism.manual = true; + * // add a new + @@ -132,7 +132,7 @@
        -
        +

        Customize your download

        Select your compression level, as well as the languages and plugins you need.

        @@ -170,16 +170,16 @@

        Customize your download

        -
        +
        - + - - - - + + + + diff --git a/examples.html b/examples.html index e60984c4d7..e1942a2b37 100644 --- a/examples.html +++ b/examples.html @@ -3,9 +3,9 @@ - + Examples ▲ Prism - + - + @@ -51,7 +51,7 @@
      • -

        Rebuild Prism by running npx gulp.

        +

        Rebuild Prism by running npm run build.

        This will make your language available to the test page, or more precise: your local version of it. You can open your local test.html page in any browser, select your language, and see how your language definition highlights any code you input.

        -

        Note: You have to reload the test page to apply changes made to prism-foo-bar.js.

        +

        Note: You have to reload the test page to apply changes made to prism-foo-bar.js but you don't have to rebuild Prism itself. However, if you change components.json (e.g. because you added a dependency) then these changes will not show up until you rebuild Prism.

      • -
        +

        Examples

        The examples in this page serve a dual purpose: They act as unit tests, making it easy to spot bugs, and at the same time demonstrate what Prism can do, on simple and on edge cases.

        @@ -97,14 +97,14 @@

        Per language examples

        -
        +
        - + - - - + + + diff --git a/extending.html b/extending.html index 1a77438838..532dd436aa 100644 --- a/extending.html +++ b/extending.html @@ -3,12 +3,12 @@ - + Extending Prism ▲ Prism - + - + - + @@ -24,7 +24,7 @@
        -
        +

        FAQ

        Frequently Asked Questions, with a few Questions I want people to Frequently Ask.

        @@ -121,9 +121,9 @@

        How can I use different highlighting for tokens with the same name in differ } -
        +
        - + - + diff --git a/gulpfile.js/changelog.js b/gulpfile.js/changelog.js index 147344ee5c..0c236de2a6 100644 --- a/gulpfile.js/changelog.js +++ b/gulpfile.js/changelog.js @@ -320,13 +320,7 @@ async function changes() { function changedWebsite(info) { if (info.changes.length > 0 && info.changes.every(c => { - if (/[\w-]+\.(?:html|svg)$/.test(c.file)) { - return true; - } - if (/^scripts(?:\/[\w-]+)*\/[\w-]+\.js$/.test(c.file)) { - return true; - } - return ['style.css'].indexOf(c.file) >= 0; + return /[\w-]+\.html$/.test(c.file) || /^assets\//.test(c.file); })) { addEntry('Other >> Website', info); return true; diff --git a/index.html b/index.html index 24f1f99dfb..d9e79615f4 100644 --- a/index.html +++ b/index.html @@ -7,11 +7,11 @@ window.console && console.log('foo'); - + Prism - + - + @@ -19,7 +19,7 @@
        -
        +
        • @@ -57,14 +57,14 @@

          Used By

          Prism is used on several websites, small and large. Some of them are:

          - Smashing Magazine - A List Apart - Mozilla Developer Network (MDN) - CSS-Tricks - SitePoint - Drupal - React - Stripe + Smashing Magazine + A List Apart + Mozilla Developer Network (MDN) + CSS-Tricks + SitePoint + Drupal + React + Stripe
          @@ -75,13 +75,13 @@

          Examples

          
           
           	

          This page’s CSS code, highlighted with Prism:

          -
          
          +	
          
           
           	

          This page’s HTML, highlighted with Prism:

          
           
           	

          This page’s logo (SVG), highlighted with Prism:

          -
          
          +	
          
           
           	

          If you’re still not sold, you can view more examples or try it out for yourself.

          @@ -292,12 +292,12 @@

          Credits

        -
        +
        - + - + + @@ -27,7 +27,7 @@
        -
        +

        Known failures

        A list of rare edge cases where Prism highlights code incorrectly.

        @@ -359,7 +359,7 @@

        Coy

        Coy's shadows and background might not wrap around the code correctly if combined with float of flexbox layouts.

        - +

        Workarounds

        @@ -372,9 +372,9 @@

        Workarounds

        -
        +
        - + @@ -403,7 +403,7 @@

        Workarounds

        }); }); - + diff --git a/plugins/autolinker/index.html b/plugins/autolinker/index.html index 592b8d3ba2..c1ac1abff2 100644 --- a/plugins/autolinker/index.html +++ b/plugins/autolinker/index.html @@ -3,13 +3,13 @@ - + Autolinker ▲ Prism plugins - + - + @@ -52,13 +52,13 @@

        HTML

        <p>Autolinking in raw text: http://prismjs.com</p>
        -
        +
        - + - + diff --git a/plugins/autoloader/index.html b/plugins/autoloader/index.html index 2d7f7ca8e0..6a8187f84e 100644 --- a/plugins/autoloader/index.html +++ b/plugins/autoloader/index.html @@ -3,10 +3,10 @@ - + Autoloader ▲ Prism plugins - + - + @@ -137,17 +137,17 @@

        Markdown

        -
        +
        - + - + - - - + + + + @@ -92,13 +92,13 @@

        Windows PowerShell With Output

        -
        +
        - + - + diff --git a/plugins/copy-to-clipboard/index.html b/plugins/copy-to-clipboard/index.html index 5faca153fa..01c4e3d8a8 100644 --- a/plugins/copy-to-clipboard/index.html +++ b/plugins/copy-to-clipboard/index.html @@ -3,13 +3,13 @@ - + Copy to Clipboard ▲ Prism plugins - + - + @@ -30,14 +30,14 @@

        How to use

        
         
         
        -
        +
        - + - + diff --git a/plugins/custom-class/index.html b/plugins/custom-class/index.html index 1690b80bbf..624c37bd94 100644 --- a/plugins/custom-class/index.html +++ b/plugins/custom-class/index.html @@ -3,12 +3,12 @@ - + Custom Class ▲ Prism plugins - + - + @@ -171,13 +171,13 @@

        Add new classes

        -
        +
        - + - + diff --git a/plugins/data-uri-highlight/index.html b/plugins/data-uri-highlight/index.html index bcab5bdb8d..30b581b513 100644 --- a/plugins/data-uri-highlight/index.html +++ b/plugins/data-uri-highlight/index.html @@ -3,13 +3,13 @@ - + Data-URI Highlight ▲ Prism plugins - + - + @@ -42,13 +42,13 @@

        Example

        -
        +
        - + - + diff --git a/plugins/diff-highlight/index.html b/plugins/diff-highlight/index.html index 02e3e012df..1e1bd67606 100644 --- a/plugins/diff-highlight/index.html +++ b/plugins/diff-highlight/index.html @@ -3,13 +3,13 @@ - + Diff Highlight ▲ Prism plugins - + - + @@ -65,14 +65,14 @@

        Example

        -
        +
        - + - + diff --git a/plugins/download-button/index.html b/plugins/download-button/index.html index 8e29099fec..d0236bc1a8 100644 --- a/plugins/download-button/index.html +++ b/plugins/download-button/index.html @@ -3,13 +3,13 @@ - + Download Button ▲ Prism plugins - + - + @@ -39,14 +39,14 @@

        Examples

        
         
         
        -
        +
        - + - + diff --git a/plugins/file-highlight/index.html b/plugins/file-highlight/index.html index ff0231112c..1b41d66a25 100644 --- a/plugins/file-highlight/index.html +++ b/plugins/file-highlight/index.html @@ -3,12 +3,12 @@ - + File Highlight ▲ Prism plugins - + - + @@ -45,13 +45,13 @@

        Examples

        For more examples, browse around the Prism website. Most large code samples are actually files fetched with this plugin.

        -
        +
        - + - + diff --git a/plugins/filter-highlight-all/index.html b/plugins/filter-highlight-all/index.html index 34962f65cc..bca36e1ae0 100644 --- a/plugins/filter-highlight-all/index.html +++ b/plugins/filter-highlight-all/index.html @@ -3,12 +3,12 @@ - + Filter highlightAll ▲ Prism plugins - + - + @@ -122,14 +122,14 @@

        Examples

        -
        +
        - + - + + - + @@ -61,14 +61,14 @@

        HTML (Markup)

        </html> -
        +
        - + - + diff --git a/plugins/jsonp-highlight/index.html b/plugins/jsonp-highlight/index.html index d520dd74d3..d281adf18e 100644 --- a/plugins/jsonp-highlight/index.html +++ b/plugins/jsonp-highlight/index.html @@ -3,12 +3,12 @@ - + JSONP Highlight ▲ Prism plugins - + - + @@ -154,15 +154,15 @@

        Examples

        
         
         
        -
        +
        - + - + diff --git a/plugins/keep-markup/index.html b/plugins/keep-markup/index.html index 333f9e0079..9075b58fa6 100644 --- a/plugins/keep-markup/index.html +++ b/plugins/keep-markup/index.html @@ -3,10 +3,10 @@ - + Keep markup ▲ Prism plugins - + - + @@ -66,13 +66,13 @@

        Examples

        -
        +
        - + - + diff --git a/plugins/line-highlight/index.html b/plugins/line-highlight/index.html index 2a974ea40b..f609a6fee1 100644 --- a/plugins/line-highlight/index.html +++ b/plugins/line-highlight/index.html @@ -3,14 +3,14 @@ - + Line highlight ▲ Prism plugins - + - + @@ -81,14 +81,14 @@

        With linkable line numbers

        -
        +
        - + - + diff --git a/plugins/line-numbers/index.html b/plugins/line-numbers/index.html index 856c8998e5..6b81b43ccf 100644 --- a/plugins/line-numbers/index.html +++ b/plugins/line-numbers/index.html @@ -3,13 +3,13 @@ - + Line Numbers ▲ Prism plugins - + - + @@ -53,13 +53,13 @@

        Soft wrap support

        -
        +
        - + - + diff --git a/plugins/match-braces/index.html b/plugins/match-braces/index.html index fdf2fa8d1d..e2cc9297ba 100644 --- a/plugins/match-braces/index.html +++ b/plugins/match-braces/index.html @@ -3,13 +3,13 @@ - + Match braces ▲ Prism plugins - + - + @@ -56,14 +56,14 @@

        Lisp with rainbow braces 🌈 but without hover

        (* n (factorial (- n 1))))) -
        +
        - + - + diff --git a/plugins/normalize-whitespace/index.html b/plugins/normalize-whitespace/index.html index a35d3e6a6f..bc2b0ab024 100644 --- a/plugins/normalize-whitespace/index.html +++ b/plugins/normalize-whitespace/index.html @@ -3,10 +3,10 @@ - + Normalize Whitespace ▲ Prism plugins - + - + @@ -162,14 +162,14 @@

        Examples

        -
        +
        - + - + diff --git a/plugins/previewers/index.html b/plugins/previewers/index.html index 6fc0ef84a7..cfefff6b18 100644 --- a/plugins/previewers/index.html +++ b/plugins/previewers/index.html @@ -3,13 +3,13 @@ - + Previewers ▲ Prism plugins - + - + @@ -211,7 +211,7 @@

        new Prism.plugins.Previewer(type, updater, -
        +
        @@ -220,9 +220,9 @@

        new Prism.plugins.Previewer(type, updater, - + - + diff --git a/plugins/remove-initial-line-feed/index.html b/plugins/remove-initial-line-feed/index.html index 9a5a4211c1..95490b28c4 100644 --- a/plugins/remove-initial-line-feed/index.html +++ b/plugins/remove-initial-line-feed/index.html @@ -3,12 +3,12 @@ - + Remove initial line feed ▲ Prism plugins - + - + @@ -41,13 +41,13 @@

        With the class added

        -
        +
        - + - + diff --git a/plugins/show-invisibles/index.html b/plugins/show-invisibles/index.html index baa3904d43..19138a0d78 100644 --- a/plugins/show-invisibles/index.html +++ b/plugins/show-invisibles/index.html @@ -3,13 +3,13 @@ - + Show Invisibles ▲ Prism plugins - + - + @@ -28,13 +28,13 @@

        Examples

        
         
         
        -
        +
        - + - + diff --git a/plugins/show-language/index.html b/plugins/show-language/index.html index 1f98153418..9531a13943 100644 --- a/plugins/show-language/index.html +++ b/plugins/show-language/index.html @@ -3,13 +3,13 @@ - + Show Language ▲ Prism plugins - + - + @@ -32,17 +32,17 @@

        HTML (Markup)

        SVG

        The data-language attribute can be used to display a specific label whether it has been defined as a language or not.

        -
        
        +	
        
         
         
        -
        +
        - + - + diff --git a/plugins/toolbar/index.html b/plugins/toolbar/index.html index 31eb3e2871..e85db09654 100644 --- a/plugins/toolbar/index.html +++ b/plugins/toolbar/index.html @@ -3,13 +3,13 @@ - + Toolbar ▲ Prism plugins - + - + @@ -95,12 +95,12 @@

        Ordering buttons

        <body data-toolbar-order="select-code,hello-world,label">
        -
        +
        - + - + diff --git a/plugins/treeview/index.html b/plugins/treeview/index.html index 126edf2274..24d7e99402 100644 --- a/plugins/treeview/index.html +++ b/plugins/treeview/index.html @@ -6,10 +6,10 @@ Treeview ▲ Prism plugins - + - + @@ -75,9 +75,9 @@

        How to use

        - + - + diff --git a/plugins/unescaped-markup/index.html b/plugins/unescaped-markup/index.html index 43d39c8646..5efc7ab795 100644 --- a/plugins/unescaped-markup/index.html +++ b/plugins/unescaped-markup/index.html @@ -3,14 +3,14 @@ - + Unescaped markup ▲ Prism plugins - + - + @@ -46,18 +46,18 @@

        Examples

        - + Keep markup ▲ Prism plugins - + - @@ -108,18 +108,18 @@

        FAQ

        - + Keep markup ▲ Prism plugins - + - +
        -
        +

        Unescaped markup

        Write markup without having to escape anything.

        @@ -152,13 +152,13 @@

        FAQ

        Also inline code is not as frequently copy-pasted, which was the major source of annoyance that got me to write this plugin.

        -
        +
        - + - + -->
        @@ -178,13 +178,13 @@

        FAQ

        Also inline code is not as frequently copy-pasted, which was the major source of annoyance that got me to write this plugin.

        -
        +
        - + - + diff --git a/plugins/wpd/index.html b/plugins/wpd/index.html index 596b49119c..3cae97c4cc 100644 --- a/plugins/wpd/index.html +++ b/plugins/wpd/index.html @@ -3,13 +3,13 @@ - + WebPlatform Docs ▲ Prism plugins - + - + @@ -41,23 +41,23 @@

        How to use

        Examples

        CSS

        -
        
        +	
        
         	
        
         
         	

        HTML

        
         
         	

        SVG

        -
        
        +	
        
         
         
        -
        +
        - + - + diff --git a/test-suite.html b/test-suite.html index e95a5d4546..2e2e171b3b 100644 --- a/test-suite.html +++ b/test-suite.html @@ -3,11 +3,11 @@ - + Running the test suite ▲ Prism - + - + @@ -15,7 +15,7 @@
        -
        +

        Running the test suite

        @@ -162,13 +162,13 @@

        Internal structure

        -
        +
        - + - + diff --git a/test.html b/test.html index 8180554d16..55caccfcd7 100644 --- a/test.html +++ b/test.html @@ -3,9 +3,9 @@ - + Test drive ▲ Prism - + - + @@ -100,7 +100,7 @@
        -
        +

        Test drive

        Take Prism for a spin!

        @@ -124,13 +124,13 @@

        Test drive

        -
        +
        - + - - + + From 453079bf96746e0c44f90cb7cd90fcae9a5f94cc Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Sun, 26 Jul 2020 18:46:25 +0200 Subject: [PATCH 0604/1100] Line Numbers: Fixed class name on website This fixes #2487. --- plugins/line-numbers/index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/line-numbers/index.html b/plugins/line-numbers/index.html index 0fcb2af8a9..e1a1994f49 100644 --- a/plugins/line-numbers/index.html +++ b/plugins/line-numbers/index.html @@ -24,7 +24,7 @@

        How to use

        Obviously, this is supposed to work only for code blocks (<pre><code>) and not for inline code.

        Add the line-numbers class to your desired <pre> or any of its ancestors, and the Line Numbers plugin will take care of the rest. To give all code blocks line numbers, add the line-numbers class to the <body> of the page. This is part of a general activation mechanism where adding the line-numbers (or no-line-numbers) class to any element will enable (or disable) the Line Numbers plugin for all code blocks in that element.
        Example:

        -
        <body class="line-number"> <!-- enabled for the whole page -->
        +  
        <body class="line-numbers"> <!-- enabled for the whole page -->
         
         	<!-- with line numbers -->
         	<pre><code>...</code></pre>
        @@ -36,7 +36,7 @@ 

        How to use

        <!-- without line numbers --> <pre><code>...</code></pre> <!-- enabled for a specific element - with line numbers --> - <pre class="line-number"><code>...</code></pre> + <pre class="line-numbers"><code>...</code></pre> </div> </body>
        From 649e51e56250a81dc0b0c4f5b3a4ea23e1c21834 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Mon, 27 Jul 2020 13:50:41 +0200 Subject: [PATCH 0605/1100] Added support for Dhall (#2473) --- components.js | 2 +- components.json | 4 ++ components/prism-dhall.js | 69 +++++++++++++++++++ components/prism-dhall.min.js | 1 + examples/prism-dhall.html | 30 ++++++++ tests/languages/dhall/boolean_feature.test | 13 ++++ tests/languages/dhall/comment_feature.test | 20 ++++++ tests/languages/dhall/env_feature.test | 21 ++++++ tests/languages/dhall/hash_feature.test | 15 ++++ tests/languages/dhall/keyword_feature.test | 39 +++++++++++ tests/languages/dhall/label_feature.test | 11 +++ tests/languages/dhall/number_feature.test | 35 ++++++++++ tests/languages/dhall/operator_feature.test | 44 ++++++++++++ .../languages/dhall/punctuation_feature.test | 23 +++++++ tests/languages/dhall/string_feature.test | 61 ++++++++++++++++ tests/languages/dhall/url_feature.test | 11 +++ 16 files changed, 398 insertions(+), 1 deletion(-) create mode 100644 components/prism-dhall.js create mode 100644 components/prism-dhall.min.js create mode 100644 examples/prism-dhall.html create mode 100644 tests/languages/dhall/boolean_feature.test create mode 100644 tests/languages/dhall/comment_feature.test create mode 100644 tests/languages/dhall/env_feature.test create mode 100644 tests/languages/dhall/hash_feature.test create mode 100644 tests/languages/dhall/keyword_feature.test create mode 100644 tests/languages/dhall/label_feature.test create mode 100644 tests/languages/dhall/number_feature.test create mode 100644 tests/languages/dhall/operator_feature.test create mode 100644 tests/languages/dhall/punctuation_feature.test create mode 100644 tests/languages/dhall/string_feature.test create mode 100644 tests/languages/dhall/url_feature.test diff --git a/components.js b/components.js index 8202fda1f4..2d468755c9 100644 --- a/components.js +++ b/components.js @@ -1,2 +1,2 @@ -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml","ssml","atom","rss"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","ssml":"SSML","atom":"Atom","rss":"RSS"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"ABNF","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"agda":{"title":"Agda","owner":"xy-ren"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"BNF","alias":"rbnf","aliasTitles":{"rbnf":"RBNF"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"clojure":{"title":"Clojure","owner":"troglotit"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"cypher":{"title":"Cypher","owner":"RunDevelopment"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dax":{"title":"DAX","owner":"peterbud"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"EBNF","owner":"RunDevelopment"},"editorconfig":{"title":"EditorConfig","owner":"osipxd"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"c","owner":"Golmote"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","optional":["markdown"],"owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"hlsl":{"title":"HLSL","require":"c","owner":"RunDevelopment"},"http":{"title":"HTTP","optional":["css","javascript","json","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"ignore":{"title":".ignore","owner":"osipxd","alias":["gitignore","hgignore","npmignore"],"aliasTitles":{"gitignore":".gitignore","hgignore":".hgignore","npmignore":".npmignore"}},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike","typescript"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","alias":"webmanifest","aliasTitles":{"webmanifest":"Web App Manifest"},"owner":"CupOfTea696"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"jsstacktrace":{"title":"JS stack trace","owner":"sbrl"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","alias":["kt","kts"],"aliasTitles":{"kts":"Kotlin Script"},"require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"purebasic":{"title":"PureBasic","require":"clike","alias":"pbfasm","owner":"HeX0R101"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"racket":{"title":"Racket","require":"scheme","alias":"rkt","owner":"RunDevelopment"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","modify":["actionscript","coffeescript","flow","javascript","typescript","vala"],"owner":"RunDevelopment"},"renpy":{"title":"Ren'py","alias":"rpy","owner":"HyuchiaDiego"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","owner":"RunDevelopment"},"smali":{"title":"Smali","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"solidity":{"title":"Solidity (Ethereum)","alias":"sol","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","vbnet"],"owner":"RunDevelopment"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":["vb","vba"],"aliasTitles":{"vba":"VBA"},"owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xml-doc":{"title":"XML doc (.net)","require":"markup","modify":["csharp","fsharp","vbnet"],"owner":"RunDevelopment"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"yang":{"title":"YANG","owner":"RunDevelopment"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml","ssml","atom","rss"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","ssml":"SSML","atom":"Atom","rss":"RSS"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"ABNF","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"agda":{"title":"Agda","owner":"xy-ren"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"BNF","alias":"rbnf","aliasTitles":{"rbnf":"RBNF"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"clojure":{"title":"Clojure","owner":"troglotit"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"cypher":{"title":"Cypher","owner":"RunDevelopment"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dax":{"title":"DAX","owner":"peterbud"},"dhall":{"title":"Dhall","owner":"RunDevelopment"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"EBNF","owner":"RunDevelopment"},"editorconfig":{"title":"EditorConfig","owner":"osipxd"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"c","owner":"Golmote"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","optional":["markdown"],"owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"hlsl":{"title":"HLSL","require":"c","owner":"RunDevelopment"},"http":{"title":"HTTP","optional":["css","javascript","json","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"ignore":{"title":".ignore","owner":"osipxd","alias":["gitignore","hgignore","npmignore"],"aliasTitles":{"gitignore":".gitignore","hgignore":".hgignore","npmignore":".npmignore"}},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike","typescript"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","alias":"webmanifest","aliasTitles":{"webmanifest":"Web App Manifest"},"owner":"CupOfTea696"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"jsstacktrace":{"title":"JS stack trace","owner":"sbrl"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","alias":["kt","kts"],"aliasTitles":{"kts":"Kotlin Script"},"require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"purebasic":{"title":"PureBasic","require":"clike","alias":"pbfasm","owner":"HeX0R101"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"racket":{"title":"Racket","require":"scheme","alias":"rkt","owner":"RunDevelopment"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","modify":["actionscript","coffeescript","flow","javascript","typescript","vala"],"owner":"RunDevelopment"},"renpy":{"title":"Ren'py","alias":"rpy","owner":"HyuchiaDiego"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","owner":"RunDevelopment"},"smali":{"title":"Smali","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"solidity":{"title":"Solidity (Ethereum)","alias":"sol","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","vbnet"],"owner":"RunDevelopment"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":["vb","vba"],"aliasTitles":{"vba":"VBA"},"owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xml-doc":{"title":"XML doc (.net)","require":"markup","modify":["csharp","fsharp","vbnet"],"owner":"RunDevelopment"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"yang":{"title":"YANG","owner":"RunDevelopment"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; if (typeof module !== 'undefined' && module.exports) { module.exports = components; } \ No newline at end of file diff --git a/components.json b/components.json index e3caee6bbd..0ae297ea21 100644 --- a/components.json +++ b/components.json @@ -275,6 +275,10 @@ "title": "DAX", "owner": "peterbud" }, + "dhall": { + "title": "Dhall", + "owner": "RunDevelopment" + }, "diff": { "title": "Diff", "owner": "uranusjr" diff --git a/components/prism-dhall.js b/components/prism-dhall.js new file mode 100644 index 0000000000..617e4ed5e6 --- /dev/null +++ b/components/prism-dhall.js @@ -0,0 +1,69 @@ +// ABNF grammar: +// https://github.com/dhall-lang/dhall-lang/blob/master/standard/dhall.abnf + +Prism.languages.dhall = { + // Multi-line comments can be nested. E.g. {- foo {- bar -} -} + // The multi-line pattern is essentially this: + // \{-(?:[^-{]|-(?!\})|\{(?!-)|)*-\} + 'comment': /--.*|\{-(?:[^-{]|-(?!\})|\{(?!-)|\{-(?:[^-{]|-(?!\})|\{(?!-))*-\})*-\}/, + 'string': { + pattern: /"(?:[^"\\]|\\.)*"|''(?:[^']|'(?!')|'''|''\$\{)*''(?!'|\$)/, + greedy: true, + inside: { + 'interpolation': { + pattern: /\$\{[^{}]*\}/, + inside: { + 'expression': { + pattern: /(^\$\{)[\s\S]+(?=\}$)/, + lookbehind: true, + alias: 'language-dhall', + inside: null // see blow + }, + 'punctuation': /\$\{|\}/ + } + } + } + }, + 'label': { + pattern: /`[^`]*`/, + greedy: true + }, + 'url': { + // https://github.com/dhall-lang/dhall-lang/blob/5fde8ef1bead6fb4e999d3c1ffe7044cd019d63a/standard/dhall.abnf#L596 + pattern: /\bhttps?:\/\/[\w.:%!$&'*+;=@~-]+(?:\/[\w.:%!$&'*+;=@~-]*)*(?:\?[/?\w.:%!$&'*+;=@~-]*)?/, + greedy: true + }, + 'env': { + // https://github.com/dhall-lang/dhall-lang/blob/5fde8ef1bead6fb4e999d3c1ffe7044cd019d63a/standard/dhall.abnf#L661 + pattern: /\benv:(?:(?!\d)\w+|"(?:[^"\\=]|\\.)*")/, + greedy: true, + inside: { + 'function': /^env/, + 'operator': /^:/, + 'variable': /[\s\S]+/ + } + }, + 'hash': { + // https://github.com/dhall-lang/dhall-lang/blob/5fde8ef1bead6fb4e999d3c1ffe7044cd019d63a/standard/dhall.abnf#L725 + pattern: /\bsha256:[\da-fA-F]{64}\b/, + inside: { + 'function': /sha256/, + 'operator': /:/, + 'number': /[\da-fA-F]{64}/ + } + }, + + // https://github.com/dhall-lang/dhall-lang/blob/5fde8ef1bead6fb4e999d3c1ffe7044cd019d63a/standard/dhall.abnf#L359 + 'keyword': /\b(?:as|assert|else|forall|if|in|let|merge|missing|then|toMap|using|with)\b|\u2200/, + 'builtin': /\b(?:Some|None)\b/, + + 'boolean': /\b(?:False|True)\b/, + 'number': /\bNaN\b|-?\bInfinity\b|[+-]?\b(?:0x[\da-fA-F]+|\d+(?:\.\d+)?(?:e[+-]?\d+)?)\b/, + 'operator': /\/\\|\/\/\\\\|&&|\|\||[!=]=|===|\/\/|->|\+\+|::|[+*#@=:?<>|\\\u2227\u2a53\u2261\u2afd\u03bb\u2192]/, + 'punctuation': /\.\.|[{}\[\](),./]/, + + // we'll just assume that every capital word left is a type name + 'class-name': /\b[A-Z]\w*\b/ +}; + +Prism.languages.dhall.string.inside.interpolation.inside.expression.inside = Prism.languages.dhall; diff --git a/components/prism-dhall.min.js b/components/prism-dhall.min.js new file mode 100644 index 0000000000..8d5ffab201 --- /dev/null +++ b/components/prism-dhall.min.js @@ -0,0 +1 @@ +Prism.languages.dhall={comment:/--.*|\{-(?:[^-{]|-(?!\})|\{(?!-)|\{-(?:[^-{]|-(?!\})|\{(?!-))*-\})*-\}/,string:{pattern:/"(?:[^"\\]|\\.)*"|''(?:[^']|'(?!')|'''|''\$\{)*''(?!'|\$)/,greedy:!0,inside:{interpolation:{pattern:/\$\{[^{}]*\}/,inside:{expression:{pattern:/(^\$\{)[\s\S]+(?=\}$)/,lookbehind:!0,alias:"language-dhall",inside:null},punctuation:/\$\{|\}/}}}},label:{pattern:/`[^`]*`/,greedy:!0},url:{pattern:/\bhttps?:\/\/[\w.:%!$&'*+;=@~-]+(?:\/[\w.:%!$&'*+;=@~-]*)*(?:\?[/?\w.:%!$&'*+;=@~-]*)?/,greedy:!0},env:{pattern:/\benv:(?:(?!\d)\w+|"(?:[^"\\=]|\\.)*")/,greedy:!0,inside:{function:/^env/,operator:/^:/,variable:/[\s\S]+/}},hash:{pattern:/\bsha256:[\da-fA-F]{64}\b/,inside:{function:/sha256/,operator:/:/,number:/[\da-fA-F]{64}/}},keyword:/\b(?:as|assert|else|forall|if|in|let|merge|missing|then|toMap|using|with)\b|\u2200/,builtin:/\b(?:Some|None)\b/,boolean:/\b(?:False|True)\b/,number:/\bNaN\b|-?\bInfinity\b|[+-]?\b(?:0x[\da-fA-F]+|\d+(?:\.\d+)?(?:e[+-]?\d+)?)\b/,operator:/\/\\|\/\/\\\\|&&|\|\||[!=]=|===|\/\/|->|\+\+|::|[+*#@=:?<>|\\\u2227\u2a53\u2261\u2afd\u03bb\u2192]/,punctuation:/\.\.|[{}\[\](),./]/,"class-name":/\b[A-Z]\w*\b/},Prism.languages.dhall.string.inside.interpolation.inside.expression.inside=Prism.languages.dhall; \ No newline at end of file diff --git a/examples/prism-dhall.html b/examples/prism-dhall.html new file mode 100644 index 0000000000..9005686d6e --- /dev/null +++ b/examples/prism-dhall.html @@ -0,0 +1,30 @@ +

        Full example

        +
        
        +-- source: https://github.com/dhall-lang/dhall-lang/blob/master/Prelude/Optional/head.dhall
        +
        +{-
        +Returns the first non-empty `Optional` value in a `List`
        +-}
        +let head
        +    : ∀(a : Type) → List (Optional a) → Optional a
        +    = λ(a : Type) →
        +      λ(xs : List (Optional a)) →
        +        List/fold
        +          (Optional a)
        +          xs
        +          (Optional a)
        +          ( λ(l : Optional a) →
        +            λ(r : Optional a) →
        +              merge { Some = λ(x : a) → Some x, None = r } l
        +          )
        +          (None a)
        +
        +let example0 = assert : head Natural [ None Natural, Some 1, Some 2 ] ≡ Some 1
        +
        +let example1 =
        +      assert : head Natural [ None Natural, None Natural ] ≡ None Natural
        +
        +let example2 =
        +      assert : head Natural ([] : List (Optional Natural)) ≡ None Natural
        +
        +in  head
        diff --git a/tests/languages/dhall/boolean_feature.test b/tests/languages/dhall/boolean_feature.test new file mode 100644 index 0000000000..55c2410481 --- /dev/null +++ b/tests/languages/dhall/boolean_feature.test @@ -0,0 +1,13 @@ +False +True + +---------------------------------------------------- + +[ + ["boolean", "False"], + ["boolean", "True"] +] + +---------------------------------------------------- + +Checks for Bool literals. diff --git a/tests/languages/dhall/comment_feature.test b/tests/languages/dhall/comment_feature.test new file mode 100644 index 0000000000..89dcd4754a --- /dev/null +++ b/tests/languages/dhall/comment_feature.test @@ -0,0 +1,20 @@ +-- comment + +{- + comment + {- + nested comment + -} +-} + +---------------------------------------------------- + +[ + ["comment", "-- comment"], + + ["comment", "{-\n\tcomment\n\t{-\n\t\tnested comment\n\t-}\n-}"] +] + +---------------------------------------------------- + +Checks for comments. diff --git a/tests/languages/dhall/env_feature.test b/tests/languages/dhall/env_feature.test new file mode 100644 index 0000000000..68a3827e09 --- /dev/null +++ b/tests/languages/dhall/env_feature.test @@ -0,0 +1,21 @@ +env:DHALL_PRELUDE +env:"Quotes variable" + +---------------------------------------------------- + +[ + ["env", [ + ["function", "env"], + ["operator", ":"], + ["variable", "DHALL_PRELUDE"] + ]], + ["env", [ + ["function", "env"], + ["operator", ":"], + ["variable", "\"Quotes variable\""] + ]] +] + +---------------------------------------------------- + +Checks for environment variables. diff --git a/tests/languages/dhall/hash_feature.test b/tests/languages/dhall/hash_feature.test new file mode 100644 index 0000000000..934a4ecf1d --- /dev/null +++ b/tests/languages/dhall/hash_feature.test @@ -0,0 +1,15 @@ +sha256:33f7f4c3aff62e5ecf4848f964363133452d420dcde045784518fb59fa970037 + +---------------------------------------------------- + +[ + ["hash", [ + ["function", "sha256"], + ["operator", ":"], + ["number", "33f7f4c3aff62e5ecf4848f964363133452d420dcde045784518fb59fa970037"] + ]] +] + +---------------------------------------------------- + +Checks for sha256 hashes. diff --git a/tests/languages/dhall/keyword_feature.test b/tests/languages/dhall/keyword_feature.test new file mode 100644 index 0000000000..91a227e0f6 --- /dev/null +++ b/tests/languages/dhall/keyword_feature.test @@ -0,0 +1,39 @@ +as +assert +else +forall +if +in +let +merge +missing +then +toMap +using +with + +∀ + +---------------------------------------------------- + +[ + ["keyword", "as"], + ["keyword", "assert"], + ["keyword", "else"], + ["keyword", "forall"], + ["keyword", "if"], + ["keyword", "in"], + ["keyword", "let"], + ["keyword", "merge"], + ["keyword", "missing"], + ["keyword", "then"], + ["keyword", "toMap"], + ["keyword", "using"], + ["keyword", "with"], + + ["keyword", "∀"] +] + +---------------------------------------------------- + +Checks for keywords. diff --git a/tests/languages/dhall/label_feature.test b/tests/languages/dhall/label_feature.test new file mode 100644 index 0000000000..16255a2dce --- /dev/null +++ b/tests/languages/dhall/label_feature.test @@ -0,0 +1,11 @@ +`"foo"'s 123` + +---------------------------------------------------- + +[ + ["label", "`\"foo\"'s 123`"] +] + +---------------------------------------------------- + +Checks for escaped labels. diff --git a/tests/languages/dhall/number_feature.test b/tests/languages/dhall/number_feature.test new file mode 100644 index 0000000000..3cc8a50b1d --- /dev/null +++ b/tests/languages/dhall/number_feature.test @@ -0,0 +1,35 @@ +0 +123 +123e-5 +-123e+2 +123.456 ++123.456e-7 +0xFF +-0xFF ++0xFF + +Infinity +-Infinity +NaN + +---------------------------------------------------- + +[ + ["number", "0"], + ["number", "123"], + ["number", "123e-5"], + ["number", "-123e+2"], + ["number", "123.456"], + ["number", "+123.456e-7"], + ["number", "0xFF"], + ["number", "-0xFF"], + ["number", "+0xFF"], + + ["number", "Infinity"], + ["number", "-Infinity"], + ["number", "NaN"] +] + +---------------------------------------------------- + +Checks for numeric literals. diff --git a/tests/languages/dhall/operator_feature.test b/tests/languages/dhall/operator_feature.test new file mode 100644 index 0000000000..5f49f3eeb7 --- /dev/null +++ b/tests/languages/dhall/operator_feature.test @@ -0,0 +1,44 @@ +/\ //\\ && || != == == // -> ++ :: + ++ * # | = : ? < > | \ + +∧ ⩓ ≡ ⫽ λ → + +---------------------------------------------------- + +[ + ["operator", "/\\"], + ["operator", "//\\\\"], + ["operator", "&&"], + ["operator", "||"], + ["operator", "!="], + ["operator", "=="], + ["operator", "=="], + ["operator", "//"], + ["operator", "->"], + ["operator", "++"], + ["operator", "::"], + + ["operator", "+"], + ["operator", "*"], + ["operator", "#"], + ["operator", "|"], + ["operator", "="], + ["operator", ":"], + ["operator", "?"], + ["operator", "<"], + ["operator", ">"], + ["operator", "|"], + ["operator", "\\"], + + ["operator", "∧"], + ["operator", "⩓"], + ["operator", "≡"], + ["operator", "⫽"], + ["operator", "λ"], + ["operator", "→"] +] + +---------------------------------------------------- + +Checks for operators. diff --git a/tests/languages/dhall/punctuation_feature.test b/tests/languages/dhall/punctuation_feature.test new file mode 100644 index 0000000000..c18547e170 --- /dev/null +++ b/tests/languages/dhall/punctuation_feature.test @@ -0,0 +1,23 @@ +. .. / + +{ } [ ] ( ) , + +---------------------------------------------------- + +[ + ["punctuation", "."], + ["punctuation", ".."], + ["punctuation", "/"], + + ["punctuation", "{"], + ["punctuation", "}"], + ["punctuation", "["], + ["punctuation", "]"], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", ","] +] + +---------------------------------------------------- + +Checks for punctuation. diff --git a/tests/languages/dhall/string_feature.test b/tests/languages/dhall/string_feature.test new file mode 100644 index 0000000000..572987db2c --- /dev/null +++ b/tests/languages/dhall/string_feature.test @@ -0,0 +1,61 @@ +"" +"foo" +"\"" + +"foo/${bar}" + +''foo'' +''bar'''baz'' + +'' +foo/${bar} +'' + +---------------------------------------------------- + +[ + ["string", [ + "\"\"" + ]], + ["string", [ + "\"foo\"" + ]], + ["string", [ + "\"\\\"\"" + ]], + + ["string", [ + "\"foo/", + ["interpolation", [ + ["punctuation", "${"], + ["expression", [ + "bar" + ]], + ["punctuation", "}"] + ]], + "\"" + ]], + + ["string", [ + "''foo''" + ]], + ["string", [ + "''bar'''baz''" + ]], + + ["string", [ + "''\nfoo/", + ["interpolation", [ + ["punctuation", "${"], + ["expression", [ + "bar" + ]], + ["punctuation", "}"] + ]], + "\n''" + ]] +] + +---------------------------------------------------- + +Checks for strings. diff --git a/tests/languages/dhall/url_feature.test b/tests/languages/dhall/url_feature.test new file mode 100644 index 0000000000..adea9f26f6 --- /dev/null +++ b/tests/languages/dhall/url_feature.test @@ -0,0 +1,11 @@ +https://prelude.dhall-lang.org/Natural/sum + +---------------------------------------------------- + +[ + ["url", "https://prelude.dhall-lang.org/Natural/sum"] +] + +---------------------------------------------------- + +Checks for URL literals. From f0f8210c1a9745c064d49bfb985544c654986b24 Mon Sep 17 00:00:00 2001 From: Proudust Date: Tue, 28 Jul 2020 00:45:28 +0900 Subject: [PATCH 0606/1100] Batch: Fix escaped double quote (#2485) --- components/prism-batch.js | 6 ++--- components/prism-batch.min.js | 2 +- tests/languages/batch/string_feature.test | 29 +++++++++++++++++++++++ 3 files changed, 33 insertions(+), 4 deletions(-) create mode 100644 tests/languages/batch/string_feature.test diff --git a/components/prism-batch.js b/components/prism-batch.js index c7ca9ca60d..85df6f29a7 100644 --- a/components/prism-batch.js +++ b/components/prism-batch.js @@ -7,7 +7,7 @@ 'punctuation': /:/ } }; - var string = /"[^"]*"/; + var string = /"(?:[\\"]"|[^"])*"(?!")/; var number = /(?:\b|-)\d+\b/; Prism.languages.batch = { @@ -76,7 +76,7 @@ }, { // Other commands - pattern: /((?:^|[&(])[ \t]*@?)\w+\b(?:[^^&)\r\n]|\^(?:\r\n|[\s\S]))*/im, + pattern: /((?:^|[&(])[ \t]*@?)\w+\b(?:"(?:[\\"]"|[^"])*"(?!")|[^"^&)\r\n]|\^(?:\r\n|[\s\S]))*/im, lookbehind: true, inside: { 'keyword': /^\w+\b/i, @@ -96,4 +96,4 @@ 'operator': /[&@]/, 'punctuation': /[()']/ }; -}(Prism)); \ No newline at end of file +}(Prism)); diff --git a/components/prism-batch.min.js b/components/prism-batch.min.js index 09f194e579..338ba70629 100644 --- a/components/prism-batch.min.js +++ b/components/prism-batch.min.js @@ -1 +1 @@ -!function(e){var r=/%%?[~:\w]+%?|!\S+!/,t={pattern:/\/[a-z?]+(?=[ :]|$):?|-[a-z]\b|--[a-z-]+\b/im,alias:"attr-name",inside:{punctuation:/:/}},n=/"[^"]*"/,i=/(?:\b|-)\d+\b/;Prism.languages.batch={comment:[/^::.*/m,{pattern:/((?:^|[&(])[ \t]*)rem\b(?:[^^&)\r\n]|\^(?:\r\n|[\s\S]))*/im,lookbehind:!0}],label:{pattern:/^:.*/m,alias:"property"},command:[{pattern:/((?:^|[&(])[ \t]*)for(?: ?\/[a-z?](?:[ :](?:"[^"]*"|\S+))?)* \S+ in \([^)]+\) do/im,lookbehind:!0,inside:{keyword:/^for\b|\b(?:in|do)\b/i,string:n,parameter:t,variable:r,number:i,punctuation:/[()',]/}},{pattern:/((?:^|[&(])[ \t]*)if(?: ?\/[a-z?](?:[ :](?:"[^"]*"|\S+))?)* (?:not )?(?:cmdextversion \d+|defined \w+|errorlevel \d+|exist \S+|(?:"[^"]*"|\S+)?(?:==| (?:equ|neq|lss|leq|gtr|geq) )(?:"[^"]*"|\S+))/im,lookbehind:!0,inside:{keyword:/^if\b|\b(?:not|cmdextversion|defined|errorlevel|exist)\b/i,string:n,parameter:t,variable:r,number:i,operator:/\^|==|\b(?:equ|neq|lss|leq|gtr|geq)\b/i}},{pattern:/((?:^|[&()])[ \t]*)else\b/im,lookbehind:!0,inside:{keyword:/^else\b/i}},{pattern:/((?:^|[&(])[ \t]*)set(?: ?\/[a-z](?:[ :](?:"[^"]*"|\S+))?)* (?:[^^&)\r\n]|\^(?:\r\n|[\s\S]))*/im,lookbehind:!0,inside:{keyword:/^set\b/i,string:n,parameter:t,variable:[r,/\w+(?=(?:[*\/%+\-&^|]|<<|>>)?=)/],number:i,operator:/[*\/%+\-&^|]=?|<<=?|>>=?|[!~_=]/,punctuation:/[()',]/}},{pattern:/((?:^|[&(])[ \t]*@?)\w+\b(?:[^^&)\r\n]|\^(?:\r\n|[\s\S]))*/im,lookbehind:!0,inside:{keyword:/^\w+\b/i,string:n,parameter:t,label:{pattern:/(^\s*):\S+/m,lookbehind:!0,alias:"property"},variable:r,number:i,operator:/\^/}}],operator:/[&@]/,punctuation:/[()']/}}(); \ No newline at end of file +!function(e){var r=/%%?[~:\w]+%?|!\S+!/,t={pattern:/\/[a-z?]+(?=[ :]|$):?|-[a-z]\b|--[a-z-]+\b/im,alias:"attr-name",inside:{punctuation:/:/}},n=/"(?:[\\"]"|[^"])*"(?!")/,i=/(?:\b|-)\d+\b/;Prism.languages.batch={comment:[/^::.*/m,{pattern:/((?:^|[&(])[ \t]*)rem\b(?:[^^&)\r\n]|\^(?:\r\n|[\s\S]))*/im,lookbehind:!0}],label:{pattern:/^:.*/m,alias:"property"},command:[{pattern:/((?:^|[&(])[ \t]*)for(?: ?\/[a-z?](?:[ :](?:"[^"]*"|\S+))?)* \S+ in \([^)]+\) do/im,lookbehind:!0,inside:{keyword:/^for\b|\b(?:in|do)\b/i,string:n,parameter:t,variable:r,number:i,punctuation:/[()',]/}},{pattern:/((?:^|[&(])[ \t]*)if(?: ?\/[a-z?](?:[ :](?:"[^"]*"|\S+))?)* (?:not )?(?:cmdextversion \d+|defined \w+|errorlevel \d+|exist \S+|(?:"[^"]*"|\S+)?(?:==| (?:equ|neq|lss|leq|gtr|geq) )(?:"[^"]*"|\S+))/im,lookbehind:!0,inside:{keyword:/^if\b|\b(?:not|cmdextversion|defined|errorlevel|exist)\b/i,string:n,parameter:t,variable:r,number:i,operator:/\^|==|\b(?:equ|neq|lss|leq|gtr|geq)\b/i}},{pattern:/((?:^|[&()])[ \t]*)else\b/im,lookbehind:!0,inside:{keyword:/^else\b/i}},{pattern:/((?:^|[&(])[ \t]*)set(?: ?\/[a-z](?:[ :](?:"[^"]*"|\S+))?)* (?:[^^&)\r\n]|\^(?:\r\n|[\s\S]))*/im,lookbehind:!0,inside:{keyword:/^set\b/i,string:n,parameter:t,variable:[r,/\w+(?=(?:[*\/%+\-&^|]|<<|>>)?=)/],number:i,operator:/[*\/%+\-&^|]=?|<<=?|>>=?|[!~_=]/,punctuation:/[()',]/}},{pattern:/((?:^|[&(])[ \t]*@?)\w+\b(?:"(?:[\\"]"|[^"])*"(?!")|[^"^&)\r\n]|\^(?:\r\n|[\s\S]))*/im,lookbehind:!0,inside:{keyword:/^\w+\b/i,string:n,parameter:t,label:{pattern:/(^\s*):\S+/m,lookbehind:!0,alias:"property"},variable:r,number:i,operator:/\^/}}],operator:/[&@]/,punctuation:/[()']/}}(); \ No newline at end of file diff --git a/tests/languages/batch/string_feature.test b/tests/languages/batch/string_feature.test new file mode 100644 index 0000000000..83aaaf9138 --- /dev/null +++ b/tests/languages/batch/string_feature.test @@ -0,0 +1,29 @@ +cmd "" +cmd "f\"oo" +cmd "f\\"oo" +cmd "print(""hello"")" + +---------------------------------------------------- + +[ + ["command", [ + ["keyword", "cmd"], + ["string", "\"\""] + ]], + ["command", [ + ["keyword", "cmd"], + ["string", "\"f\\\"oo\""] + ]], + ["command", [ + ["keyword", "cmd"], + ["string", "\"f\\\\\"oo\""] + ]], + ["command", [ + ["keyword", "cmd"], + ["string", "\"print(\"\"hello\"\")\""] + ]] +] + +---------------------------------------------------- + +Checks for strings. \ No newline at end of file From 158caf52343e59a66c2351ff1d83648efe871e33 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Thu, 30 Jul 2020 22:54:34 +0200 Subject: [PATCH 0607/1100] JSON: Greedy comments (#2479) Comments are now greedy allowing them to break strings, properties, and each other. --- components/prism-json.js | 5 ++++- components/prism-json.min.js | 2 +- tests/languages/json/comment_feature.test | 4 ++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/components/prism-json.js b/components/prism-json.js index 8f9ae4a517..07c4ea5dac 100644 --- a/components/prism-json.js +++ b/components/prism-json.js @@ -8,7 +8,10 @@ Prism.languages.json = { pattern: /"(?:\\.|[^\\"\r\n])*"(?!\s*:)/, greedy: true }, - 'comment': /\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/, + 'comment': { + pattern: /\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/, + greedy: true + }, 'number': /-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i, 'punctuation': /[{}[\],]/, 'operator': /:/, diff --git a/components/prism-json.min.js b/components/prism-json.min.js index fd102bf591..8315a59a24 100644 --- a/components/prism-json.min.js +++ b/components/prism-json.min.js @@ -1 +1 @@ -Prism.languages.json={property:{pattern:/"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,greedy:!0},string:{pattern:/"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,greedy:!0},comment:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:true|false)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}},Prism.languages.webmanifest=Prism.languages.json; \ No newline at end of file +Prism.languages.json={property:{pattern:/"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,greedy:!0},string:{pattern:/"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:true|false)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}},Prism.languages.webmanifest=Prism.languages.json; \ No newline at end of file diff --git a/tests/languages/json/comment_feature.test b/tests/languages/json/comment_feature.test index 50341d3992..3205c750a7 100644 --- a/tests/languages/json/comment_feature.test +++ b/tests/languages/json/comment_feature.test @@ -1,5 +1,5 @@ { - // Line comment + // Line comment "" "//": "//", /* Block comment */ @@ -10,7 +10,7 @@ [ ["punctuation", "{"], - ["comment", "// Line comment"], + ["comment", "// Line comment \"\""], ["property", "\"//\""], ["operator", ":"], ["string", "\"//\""], From 8bba4880202ef6bd7a1e379fe9aebe69dd75f7be Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Thu, 6 Aug 2020 12:12:39 +0200 Subject: [PATCH 0608/1100] Previewers: Fixed XSS (#2506) --- plugins/previewers/prism-previewers.js | 4 ++-- plugins/previewers/prism-previewers.min.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/previewers/prism-previewers.js b/plugins/previewers/prism-previewers.js index 188361c281..eaf0500af1 100644 --- a/plugins/previewers/prism-previewers.js +++ b/plugins/previewers/prism-previewers.js @@ -353,8 +353,8 @@ '' + '' + '' + - '' + - '' + + '' + + '' + ''; }); }, diff --git a/plugins/previewers/prism-previewers.min.js b/plugins/previewers/prism-previewers.min.js index cd7e06edd8..323f4472e8 100644 --- a/plugins/previewers/prism-previewers.min.js +++ b/plugins/previewers/prism-previewers.min.js @@ -1 +1 @@ -!function(){if(("undefined"==typeof self||self.Prism)&&self.document&&Function.prototype.bind){var r,s,o={gradient:{create:(r={},s=function(e){if(r[e])return r[e];var s=e.match(/^(\b|\B-[a-z]{1,10}-)((?:repeating-)?(?:linear|radial)-gradient)/),t=s&&s[1],i=s&&s[2],a=e.replace(/^(?:\b|\B-[a-z]{1,10}-)(?:repeating-)?(?:linear|radial)-gradient\(|\)$/g,"").split(/\s*,\s*/);return 0<=i.indexOf("linear")?r[e]=function(e,s,t){var i="180deg";return/^(?:-?\d*\.?\d+(?:deg|rad)|to\b|top|right|bottom|left)/.test(t[0])&&(i=t.shift()).indexOf("to ")<0&&(0<=i.indexOf("top")?i=0<=i.indexOf("left")?"to bottom right":0<=i.indexOf("right")?"to bottom left":"to bottom":0<=i.indexOf("bottom")?i=0<=i.indexOf("left")?"to top right":0<=i.indexOf("right")?"to top left":"to top":0<=i.indexOf("left")?i="to right":0<=i.indexOf("right")?i="to left":e&&(0<=i.indexOf("deg")?i=90-parseFloat(i)+"deg":0<=i.indexOf("rad")&&(i=Math.PI/2-parseFloat(i)+"rad"))),s+"("+i+","+t.join(",")+")"}(t,i,a):0<=i.indexOf("radial")?r[e]=function(e,s,t){if(t[0].indexOf("at")<0){var i="center",a="ellipse",r="farthest-corner";if(/\bcenter|top|right|bottom|left\b|^\d+/.test(t[0])&&(i=t.shift().replace(/\s*-?\d+(?:rad|deg)\s*/,"")),/\bcircle|ellipse|closest|farthest|contain|cover\b/.test(t[0])){var n=t.shift().split(/\s+/);!n[0]||"circle"!==n[0]&&"ellipse"!==n[0]||(a=n.shift()),n[0]&&(r=n.shift()),"cover"===r?r="farthest-corner":"contain"===r&&(r="clothest-side")}return s+"("+a+" "+r+" at "+i+","+t.join(",")+")"}return s+"("+t.join(",")+")"}(0,i,a):r[e]=i+"("+a.join(",")+")"},function(){new Prism.plugins.Previewer("gradient",function(e){return this.firstChild.style.backgroundImage="",this.firstChild.style.backgroundImage=s(e),!!this.firstChild.style.backgroundImage},"*",function(){this._elt.innerHTML="
        "})}),tokens:{gradient:{pattern:/(?:\b|\B-[a-z]{1,10}-)(?:repeating-)?(?:linear|radial)-gradient\((?:(?:rgb|hsl)a?\(.+?\)|[^\)])+\)/gi,inside:{function:/[\w-]+(?=\()/,punctuation:/[(),]/}}},languages:{css:!0,less:!0,sass:[{lang:"sass",before:"punctuation",inside:"inside",root:Prism.languages.sass&&Prism.languages.sass["variable-line"]},{lang:"sass",before:"punctuation",inside:"inside",root:Prism.languages.sass&&Prism.languages.sass["property-line"]}],scss:!0,stylus:[{lang:"stylus",before:"func",inside:"rest",root:Prism.languages.stylus&&Prism.languages.stylus["property-declaration"].inside},{lang:"stylus",before:"func",inside:"rest",root:Prism.languages.stylus&&Prism.languages.stylus["variable-declaration"].inside}]}},angle:{create:function(){new Prism.plugins.Previewer("angle",function(e){var s,t,i=parseFloat(e),a=e.match(/[a-z]+$/i);if(!i||!a)return!1;switch(a=a[0]){case"deg":s=360;break;case"grad":s=400;break;case"rad":s=2*Math.PI;break;case"turn":s=1}return t=100*i/s,t%=100,this[(i<0?"set":"remove")+"Attribute"]("data-negative",""),this.querySelector("circle").style.strokeDasharray=Math.abs(t)+",500",!0},"*",function(){this._elt.innerHTML=''})},tokens:{angle:/(?:\b|\B-|(?=\B\.))\d*\.?\d+(?:deg|g?rad|turn)\b/i},languages:{css:!0,less:!0,markup:{lang:"markup",before:"punctuation",inside:"inside",root:Prism.languages.markup&&Prism.languages.markup.tag.inside["attr-value"]},sass:[{lang:"sass",inside:"inside",root:Prism.languages.sass&&Prism.languages.sass["property-line"]},{lang:"sass",before:"operator",inside:"inside",root:Prism.languages.sass&&Prism.languages.sass["variable-line"]}],scss:!0,stylus:[{lang:"stylus",before:"func",inside:"rest",root:Prism.languages.stylus&&Prism.languages.stylus["property-declaration"].inside},{lang:"stylus",before:"func",inside:"rest",root:Prism.languages.stylus&&Prism.languages.stylus["variable-declaration"].inside}]}},color:{create:function(){new Prism.plugins.Previewer("color",function(e){return this.style.backgroundColor="",this.style.backgroundColor=e,!!this.style.backgroundColor})},tokens:{color:[Prism.languages.css.hexcode].concat(Prism.languages.css.color)},languages:{css:!1,less:!0,markup:{lang:"markup",before:"punctuation",inside:"inside",root:Prism.languages.markup&&Prism.languages.markup.tag.inside["attr-value"]},sass:[{lang:"sass",before:"punctuation",inside:"inside",root:Prism.languages.sass&&Prism.languages.sass["variable-line"]},{lang:"sass",inside:"inside",root:Prism.languages.sass&&Prism.languages.sass["property-line"]}],scss:!1,stylus:[{lang:"stylus",before:"hexcode",inside:"rest",root:Prism.languages.stylus&&Prism.languages.stylus["property-declaration"].inside},{lang:"stylus",before:"hexcode",inside:"rest",root:Prism.languages.stylus&&Prism.languages.stylus["variable-declaration"].inside}]}},easing:{create:function(){new Prism.plugins.Previewer("easing",function(e){var s=(e={linear:"0,0,1,1",ease:".25,.1,.25,1","ease-in":".42,0,1,1","ease-out":"0,0,.58,1","ease-in-out":".42,0,.58,1"}[e]||e).match(/-?\d*\.?\d+/g);if(4!==s.length)return!1;s=s.map(function(e,s){return 100*(s%2?1-e:e)}),this.querySelector("path").setAttribute("d","M0,100 C"+s[0]+","+s[1]+", "+s[2]+","+s[3]+", 100,0");var t=this.querySelectorAll("line");return t[0].setAttribute("x2",s[0]),t[0].setAttribute("y2",s[1]),t[1].setAttribute("x2",s[2]),t[1].setAttribute("y2",s[3]),!0},"*",function(){this._elt.innerHTML=''})},tokens:{easing:{pattern:/\bcubic-bezier\((?:-?\d*\.?\d+,\s*){3}-?\d*\.?\d+\)\B|\b(?:linear|ease(?:-in)?(?:-out)?)(?=\s|[;}]|$)/i,inside:{function:/[\w-]+(?=\()/,punctuation:/[(),]/}}},languages:{css:!0,less:!0,sass:[{lang:"sass",inside:"inside",before:"punctuation",root:Prism.languages.sass&&Prism.languages.sass["variable-line"]},{lang:"sass",inside:"inside",root:Prism.languages.sass&&Prism.languages.sass["property-line"]}],scss:!0,stylus:[{lang:"stylus",before:"hexcode",inside:"rest",root:Prism.languages.stylus&&Prism.languages.stylus["property-declaration"].inside},{lang:"stylus",before:"hexcode",inside:"rest",root:Prism.languages.stylus&&Prism.languages.stylus["variable-declaration"].inside}]}},time:{create:function(){new Prism.plugins.Previewer("time",function(e){var s=parseFloat(e),t=e.match(/[a-z]+$/i);return!(!s||!t)&&(t=t[0],this.querySelector("circle").style.animationDuration=2*s+t,!0)},"*",function(){this._elt.innerHTML=''})},tokens:{time:/(?:\b|\B-|(?=\B\.))\d*\.?\d+m?s\b/i},languages:{css:!0,less:!0,markup:{lang:"markup",before:"punctuation",inside:"inside",root:Prism.languages.markup&&Prism.languages.markup.tag.inside["attr-value"]},sass:[{lang:"sass",inside:"inside",root:Prism.languages.sass&&Prism.languages.sass["property-line"]},{lang:"sass",before:"operator",inside:"inside",root:Prism.languages.sass&&Prism.languages.sass["variable-line"]}],scss:!0,stylus:[{lang:"stylus",before:"hexcode",inside:"rest",root:Prism.languages.stylus&&Prism.languages.stylus["property-declaration"].inside},{lang:"stylus",before:"hexcode",inside:"rest",root:Prism.languages.stylus&&Prism.languages.stylus["variable-declaration"].inside}]}}},t=/(?:^|\s)token(?=$|\s)/,e=/(?:^|\s)active(?=$|\s)/g,i=/(?:^|\s)flipped(?=$|\s)/g,n=function(e,s,t,i){this._elt=null,this._type=e,this._clsRegexp=RegExp("(?:^|\\s)"+e+"(?=$|\\s)"),this._token=null,this.updater=s,this._mouseout=this.mouseout.bind(this),this.initializer=i;var a=this;t||(t=["*"]),Array.isArray(t)||(t=[t]),t.forEach(function(e){"string"!=typeof e&&(e=e.lang),n.byLanguages[e]||(n.byLanguages[e]=[]),n.byLanguages[e].indexOf(a)<0&&n.byLanguages[e].push(a)}),n.byType[e]=this};for(var a in n.prototype.init=function(){this._elt||(this._elt=document.createElement("div"),this._elt.className="prism-previewer prism-previewer-"+this._type,document.body.appendChild(this._elt),this.initializer&&this.initializer())},n.prototype.isDisabled=function(e){do{if(e.hasAttribute&&e.hasAttribute("data-previewers"))return-1===(e.getAttribute("data-previewers")||"").split(/\s+/).indexOf(this._type)}while(e=e.parentNode);return!1},n.prototype.check=function(e){if(!t.test(e.className)||!this.isDisabled(e)){do{if(t.test(e.className)&&this._clsRegexp.test(e.className))break}while(e=e.parentNode);e&&e!==this._token&&(this._token=e,this.show())}},n.prototype.mouseout=function(){this._token.removeEventListener("mouseout",this._mouseout,!1),this._token=null,this.hide()},n.prototype.show=function(){if(this._elt||this.init(),this._token)if(this.updater.call(this._elt,this._token.textContent)){this._token.addEventListener("mouseout",this._mouseout,!1);var e=function(e){var s=e.getBoundingClientRect(),t=s.left,i=s.top,a=document.documentElement.getBoundingClientRect();return t-=a.left,{top:i-=a.top,right:innerWidth-t-s.width,bottom:innerHeight-i-s.height,left:t,width:s.width,height:s.height}}(this._token);this._elt.className+=" active",0"})}),tokens:{gradient:{pattern:/(?:\b|\B-[a-z]{1,10}-)(?:repeating-)?(?:linear|radial)-gradient\((?:(?:rgb|hsl)a?\(.+?\)|[^\)])+\)/gi,inside:{function:/[\w-]+(?=\()/,punctuation:/[(),]/}}},languages:{css:!0,less:!0,sass:[{lang:"sass",before:"punctuation",inside:"inside",root:Prism.languages.sass&&Prism.languages.sass["variable-line"]},{lang:"sass",before:"punctuation",inside:"inside",root:Prism.languages.sass&&Prism.languages.sass["property-line"]}],scss:!0,stylus:[{lang:"stylus",before:"func",inside:"rest",root:Prism.languages.stylus&&Prism.languages.stylus["property-declaration"].inside},{lang:"stylus",before:"func",inside:"rest",root:Prism.languages.stylus&&Prism.languages.stylus["variable-declaration"].inside}]}},angle:{create:function(){new Prism.plugins.Previewer("angle",function(e){var s,t,i=parseFloat(e),a=e.match(/[a-z]+$/i);if(!i||!a)return!1;switch(a=a[0]){case"deg":s=360;break;case"grad":s=400;break;case"rad":s=2*Math.PI;break;case"turn":s=1}return t=100*i/s,t%=100,this[(i<0?"set":"remove")+"Attribute"]("data-negative",""),this.querySelector("circle").style.strokeDasharray=Math.abs(t)+",500",!0},"*",function(){this._elt.innerHTML=''})},tokens:{angle:/(?:\b|\B-|(?=\B\.))\d*\.?\d+(?:deg|g?rad|turn)\b/i},languages:{css:!0,less:!0,markup:{lang:"markup",before:"punctuation",inside:"inside",root:Prism.languages.markup&&Prism.languages.markup.tag.inside["attr-value"]},sass:[{lang:"sass",inside:"inside",root:Prism.languages.sass&&Prism.languages.sass["property-line"]},{lang:"sass",before:"operator",inside:"inside",root:Prism.languages.sass&&Prism.languages.sass["variable-line"]}],scss:!0,stylus:[{lang:"stylus",before:"func",inside:"rest",root:Prism.languages.stylus&&Prism.languages.stylus["property-declaration"].inside},{lang:"stylus",before:"func",inside:"rest",root:Prism.languages.stylus&&Prism.languages.stylus["variable-declaration"].inside}]}},color:{create:function(){new Prism.plugins.Previewer("color",function(e){return this.style.backgroundColor="",this.style.backgroundColor=e,!!this.style.backgroundColor})},tokens:{color:[Prism.languages.css.hexcode].concat(Prism.languages.css.color)},languages:{css:!1,less:!0,markup:{lang:"markup",before:"punctuation",inside:"inside",root:Prism.languages.markup&&Prism.languages.markup.tag.inside["attr-value"]},sass:[{lang:"sass",before:"punctuation",inside:"inside",root:Prism.languages.sass&&Prism.languages.sass["variable-line"]},{lang:"sass",inside:"inside",root:Prism.languages.sass&&Prism.languages.sass["property-line"]}],scss:!1,stylus:[{lang:"stylus",before:"hexcode",inside:"rest",root:Prism.languages.stylus&&Prism.languages.stylus["property-declaration"].inside},{lang:"stylus",before:"hexcode",inside:"rest",root:Prism.languages.stylus&&Prism.languages.stylus["variable-declaration"].inside}]}},easing:{create:function(){new Prism.plugins.Previewer("easing",function(e){var s=(e={linear:"0,0,1,1",ease:".25,.1,.25,1","ease-in":".42,0,1,1","ease-out":"0,0,.58,1","ease-in-out":".42,0,.58,1"}[e]||e).match(/-?\d*\.?\d+/g);if(4!==s.length)return!1;s=s.map(function(e,s){return 100*(s%2?1-e:e)}),this.querySelector("path").setAttribute("d","M0,100 C"+s[0]+","+s[1]+", "+s[2]+","+s[3]+", 100,0");var t=this.querySelectorAll("line");return t[0].setAttribute("x2",s[0]),t[0].setAttribute("y2",s[1]),t[1].setAttribute("x2",s[2]),t[1].setAttribute("y2",s[3]),!0},"*",function(){this._elt.innerHTML=''})},tokens:{easing:{pattern:/\bcubic-bezier\((?:-?\d*\.?\d+,\s*){3}-?\d*\.?\d+\)\B|\b(?:linear|ease(?:-in)?(?:-out)?)(?=\s|[;}]|$)/i,inside:{function:/[\w-]+(?=\()/,punctuation:/[(),]/}}},languages:{css:!0,less:!0,sass:[{lang:"sass",inside:"inside",before:"punctuation",root:Prism.languages.sass&&Prism.languages.sass["variable-line"]},{lang:"sass",inside:"inside",root:Prism.languages.sass&&Prism.languages.sass["property-line"]}],scss:!0,stylus:[{lang:"stylus",before:"hexcode",inside:"rest",root:Prism.languages.stylus&&Prism.languages.stylus["property-declaration"].inside},{lang:"stylus",before:"hexcode",inside:"rest",root:Prism.languages.stylus&&Prism.languages.stylus["variable-declaration"].inside}]}},time:{create:function(){new Prism.plugins.Previewer("time",function(e){var s=parseFloat(e),t=e.match(/[a-z]+$/i);return!(!s||!t)&&(t=t[0],this.querySelector("circle").style.animationDuration=2*s+t,!0)},"*",function(){this._elt.innerHTML=''})},tokens:{time:/(?:\b|\B-|(?=\B\.))\d*\.?\d+m?s\b/i},languages:{css:!0,less:!0,markup:{lang:"markup",before:"punctuation",inside:"inside",root:Prism.languages.markup&&Prism.languages.markup.tag.inside["attr-value"]},sass:[{lang:"sass",inside:"inside",root:Prism.languages.sass&&Prism.languages.sass["property-line"]},{lang:"sass",before:"operator",inside:"inside",root:Prism.languages.sass&&Prism.languages.sass["variable-line"]}],scss:!0,stylus:[{lang:"stylus",before:"hexcode",inside:"rest",root:Prism.languages.stylus&&Prism.languages.stylus["property-declaration"].inside},{lang:"stylus",before:"hexcode",inside:"rest",root:Prism.languages.stylus&&Prism.languages.stylus["variable-declaration"].inside}]}}},t=/(?:^|\s)token(?=$|\s)/,e=/(?:^|\s)active(?=$|\s)/g,i=/(?:^|\s)flipped(?=$|\s)/g,n=function(e,s,t,i){this._elt=null,this._type=e,this._clsRegexp=RegExp("(?:^|\\s)"+e+"(?=$|\\s)"),this._token=null,this.updater=s,this._mouseout=this.mouseout.bind(this),this.initializer=i;var a=this;t||(t=["*"]),Array.isArray(t)||(t=[t]),t.forEach(function(e){"string"!=typeof e&&(e=e.lang),n.byLanguages[e]||(n.byLanguages[e]=[]),n.byLanguages[e].indexOf(a)<0&&n.byLanguages[e].push(a)}),n.byType[e]=this};for(var a in n.prototype.init=function(){this._elt||(this._elt=document.createElement("div"),this._elt.className="prism-previewer prism-previewer-"+this._type,document.body.appendChild(this._elt),this.initializer&&this.initializer())},n.prototype.isDisabled=function(e){do{if(e.hasAttribute&&e.hasAttribute("data-previewers"))return-1===(e.getAttribute("data-previewers")||"").split(/\s+/).indexOf(this._type)}while(e=e.parentNode);return!1},n.prototype.check=function(e){if(!t.test(e.className)||!this.isDisabled(e)){do{if(t.test(e.className)&&this._clsRegexp.test(e.className))break}while(e=e.parentNode);e&&e!==this._token&&(this._token=e,this.show())}},n.prototype.mouseout=function(){this._token.removeEventListener("mouseout",this._mouseout,!1),this._token=null,this.hide()},n.prototype.show=function(){if(this._elt||this.init(),this._token)if(this.updater.call(this._elt,this._token.textContent)){this._token.addEventListener("mouseout",this._mouseout,!1);var e=function(e){var s=e.getBoundingClientRect(),t=s.left,i=s.top,a=document.documentElement.getBoundingClientRect();return t-=a.left,{top:i-=a.top,right:innerWidth-t-s.width,bottom:innerHeight-i-s.height,left:t,width:s.width,height:s.height}}(this._token);this._elt.className+=" active",0 Date: Thu, 6 Aug 2020 17:44:57 +0200 Subject: [PATCH 0609/1100] Changelog for v1.21.0 (#2507) --- CHANGELOG.md | 200 +++++++++++++++++++++++++++++++++++++++ gulpfile.js/changelog.js | 16 +++- 2 files changed, 211 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 694c2996d5..db84cf20fa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,205 @@ # Prism Changelog +## 1.21.0 (2020-08-06) + +### New components + +* __.ignore__ & __.gitignore__ & __.hgignore__ & __.npmignore__ ([#2481](https://github.com/PrismJS/prism/issues/2481)) [`3fcce6fe`](https://github.com/PrismJS/prism/commit/3fcce6fe) +* __Agda__ ([#2430](https://github.com/PrismJS/prism/issues/2430)) [`3a127c7d`](https://github.com/PrismJS/prism/commit/3a127c7d) +* __AL__ ([#2300](https://github.com/PrismJS/prism/issues/2300)) [`de21eb64`](https://github.com/PrismJS/prism/commit/de21eb64) +* __Cypher__ ([#2459](https://github.com/PrismJS/prism/issues/2459)) [`398e2943`](https://github.com/PrismJS/prism/commit/398e2943) +* __Dhall__ ([#2473](https://github.com/PrismJS/prism/issues/2473)) [`649e51e5`](https://github.com/PrismJS/prism/commit/649e51e5) +* __EditorConfig__ ([#2471](https://github.com/PrismJS/prism/issues/2471)) [`ed8fff91`](https://github.com/PrismJS/prism/commit/ed8fff91) +* __HLSL__ ([#2318](https://github.com/PrismJS/prism/issues/2318)) [`87a5c7ae`](https://github.com/PrismJS/prism/commit/87a5c7ae) +* __JS stack trace__ ([#2418](https://github.com/PrismJS/prism/issues/2418)) [`ae0327b3`](https://github.com/PrismJS/prism/commit/ae0327b3) +* __PeopleCode__ ([#2302](https://github.com/PrismJS/prism/issues/2302)) [`bd4d8165`](https://github.com/PrismJS/prism/commit/bd4d8165) +* __PureBasic__ ([#2369](https://github.com/PrismJS/prism/issues/2369)) [`d0c1c70d`](https://github.com/PrismJS/prism/commit/d0c1c70d) +* __Racket__ ([#2315](https://github.com/PrismJS/prism/issues/2315)) [`053016ef`](https://github.com/PrismJS/prism/commit/053016ef) +* __Smali__ ([#2419](https://github.com/PrismJS/prism/issues/2419)) [`22eb5cad`](https://github.com/PrismJS/prism/commit/22eb5cad) +* __Structured Text (IEC 61131-3)__ ([#2311](https://github.com/PrismJS/prism/issues/2311)) [`8704cdfb`](https://github.com/PrismJS/prism/commit/8704cdfb) +* __UnrealScript__ ([#2305](https://github.com/PrismJS/prism/issues/2305)) [`1093ceb3`](https://github.com/PrismJS/prism/commit/1093ceb3) +* __WarpScript__ ([#2307](https://github.com/PrismJS/prism/issues/2307)) [`cde5b0fa`](https://github.com/PrismJS/prism/commit/cde5b0fa) +* __XML doc (.net)__ ([#2340](https://github.com/PrismJS/prism/issues/2340)) [`caec5e30`](https://github.com/PrismJS/prism/commit/caec5e30) +* __YANG__ ([#2467](https://github.com/PrismJS/prism/issues/2467)) [`ed1df1e1`](https://github.com/PrismJS/prism/commit/ed1df1e1) + +### Updated components + +* Markup & JSON: Added new aliases ([#2390](https://github.com/PrismJS/prism/issues/2390)) [`9782cfe6`](https://github.com/PrismJS/prism/commit/9782cfe6) +* Fixed several cases of exponential backtracking ([#2268](https://github.com/PrismJS/prism/issues/2268)) [`7a554b5f`](https://github.com/PrismJS/prism/commit/7a554b5f) +* __APL__ + * Added `⍥` ([#2409](https://github.com/PrismJS/prism/issues/2409)) [`0255cb6a`](https://github.com/PrismJS/prism/commit/0255cb6a) +* __AutoHotkey__ + * Added missing `format` built-in ([#2450](https://github.com/PrismJS/prism/issues/2450)) [`7c66cfc4`](https://github.com/PrismJS/prism/commit/7c66cfc4) + * Improved comments and other improvements ([#2412](https://github.com/PrismJS/prism/issues/2412)) [`ddf3cc62`](https://github.com/PrismJS/prism/commit/ddf3cc62) + * Added missing definitions ([#2400](https://github.com/PrismJS/prism/issues/2400)) [`4fe03676`](https://github.com/PrismJS/prism/commit/4fe03676) +* __Bash__ + * Added `composer` command ([#2298](https://github.com/PrismJS/prism/issues/2298)) [`044dd271`](https://github.com/PrismJS/prism/commit/044dd271) +* __Batch__ + * Fix escaped double quote ([#2485](https://github.com/PrismJS/prism/issues/2485)) [`f0f8210c`](https://github.com/PrismJS/prism/commit/f0f8210c) +* __C__ + * Improved macros and expressions ([#2440](https://github.com/PrismJS/prism/issues/2440)) [`8a72fa6f`](https://github.com/PrismJS/prism/commit/8a72fa6f) + * Improved macros ([#2320](https://github.com/PrismJS/prism/issues/2320)) [`fdcf7ed2`](https://github.com/PrismJS/prism/commit/fdcf7ed2) +* __C#__ + * Improved pattern matching ([#2411](https://github.com/PrismJS/prism/issues/2411)) [`7f341fc1`](https://github.com/PrismJS/prism/commit/7f341fc1) + * Fixed adjacent string interpolations ([#2402](https://github.com/PrismJS/prism/issues/2402)) [`2a2e79ed`](https://github.com/PrismJS/prism/commit/2a2e79ed) +* __C++__ + * Added support for default comparison operator ([#2426](https://github.com/PrismJS/prism/issues/2426)) [`8e9d161c`](https://github.com/PrismJS/prism/commit/8e9d161c) + * Improved class name detection ([#2348](https://github.com/PrismJS/prism/issues/2348)) [`e3fe9040`](https://github.com/PrismJS/prism/commit/e3fe9040) + * Fixed `enum class` class names ([#2342](https://github.com/PrismJS/prism/issues/2342)) [`30b4e254`](https://github.com/PrismJS/prism/commit/30b4e254) +* __Content-Security-Policy__ + * Fixed directives ([#2461](https://github.com/PrismJS/prism/issues/2461)) [`537a9e80`](https://github.com/PrismJS/prism/commit/537a9e80) +* __CSS__ + * Improved url and added keywords ([#2432](https://github.com/PrismJS/prism/issues/2432)) [`964de5a1`](https://github.com/PrismJS/prism/commit/964de5a1) +* __CSS Extras__ + * Optimized `class` and `id` patterns ([#2359](https://github.com/PrismJS/prism/issues/2359)) [`fdbc4473`](https://github.com/PrismJS/prism/commit/fdbc4473) + * Renamed `attr-{name,value}` tokens and added tokens for combinators and selector lists ([#2373](https://github.com/PrismJS/prism/issues/2373)) [`e523f5d0`](https://github.com/PrismJS/prism/commit/e523f5d0) +* __Dart__ + * Added missing keywords ([#2355](https://github.com/PrismJS/prism/issues/2355)) [`4172ab6f`](https://github.com/PrismJS/prism/commit/4172ab6f) +* __Diff__ + * Added `prefix` token ([#2281](https://github.com/PrismJS/prism/issues/2281)) [`fd432a5b`](https://github.com/PrismJS/prism/commit/fd432a5b) +* __Docker__ + * Fixed strings inside comments ([#2428](https://github.com/PrismJS/prism/issues/2428)) [`37273a6f`](https://github.com/PrismJS/prism/commit/37273a6f) +* __EditorConfig__ + * Trim spaces before key and section title ([#2482](https://github.com/PrismJS/prism/issues/2482)) [`0c30c582`](https://github.com/PrismJS/prism/commit/0c30c582) +* __EJS__ + * Added `eta` alias ([#2282](https://github.com/PrismJS/prism/issues/2282)) [`0cfb6c5f`](https://github.com/PrismJS/prism/commit/0cfb6c5f) +* __GLSL__ + * Improvements ([#2321](https://github.com/PrismJS/prism/issues/2321)) [`33e49956`](https://github.com/PrismJS/prism/commit/33e49956) +* __GraphQL__ + * Added missing keywords ([#2407](https://github.com/PrismJS/prism/issues/2407)) [`de8ed16d`](https://github.com/PrismJS/prism/commit/de8ed16d) + * Added support for multi-line strings and descriptions ([#2406](https://github.com/PrismJS/prism/issues/2406)) [`9e64c62e`](https://github.com/PrismJS/prism/commit/9e64c62e) +* __Io__ + * Fixed operator pattern ([#2365](https://github.com/PrismJS/prism/issues/2365)) [`d6055771`](https://github.com/PrismJS/prism/commit/d6055771) +* __Java__ + * Fixed `namespace` token ([#2295](https://github.com/PrismJS/prism/issues/2295)) [`62e184bb`](https://github.com/PrismJS/prism/commit/62e184bb) +* __JavaDoc__ + * Improvements ([#2324](https://github.com/PrismJS/prism/issues/2324)) [`032910ba`](https://github.com/PrismJS/prism/commit/032910ba) +* __JavaScript__ + * Improved regex detection ([#2465](https://github.com/PrismJS/prism/issues/2465)) [`4f55052f`](https://github.com/PrismJS/prism/commit/4f55052f) + * Improved `get`/`set` and parameter detection ([#2387](https://github.com/PrismJS/prism/issues/2387)) [`ed715158`](https://github.com/PrismJS/prism/commit/ed715158) + * Added support for logical assignment operators ([#2378](https://github.com/PrismJS/prism/issues/2378)) [`b28f21b7`](https://github.com/PrismJS/prism/commit/b28f21b7) +* __JSDoc__ + * Improvements ([#2466](https://github.com/PrismJS/prism/issues/2466)) [`2805ae35`](https://github.com/PrismJS/prism/commit/2805ae35) +* __JSON__ + * Greedy comments ([#2479](https://github.com/PrismJS/prism/issues/2479)) [`158caf52`](https://github.com/PrismJS/prism/commit/158caf52) +* __Julia__ + * Improved strings, comments, and other patterns ([#2363](https://github.com/PrismJS/prism/issues/2363)) [`81cf2344`](https://github.com/PrismJS/prism/commit/81cf2344) +* __Kotlin__ + * Added `kt` and `kts` aliases ([#2474](https://github.com/PrismJS/prism/issues/2474)) [`67f97e2e`](https://github.com/PrismJS/prism/commit/67f97e2e) +* __Markup__ + * Added tokens inside DOCTYPE ([#2349](https://github.com/PrismJS/prism/issues/2349)) [`9c7bc820`](https://github.com/PrismJS/prism/commit/9c7bc820) + * Added `attr-equals` alias for the attribute `=` sign ([#2350](https://github.com/PrismJS/prism/issues/2350)) [`96a0116e`](https://github.com/PrismJS/prism/commit/96a0116e) + * Added alias for named entities ([#2351](https://github.com/PrismJS/prism/issues/2351)) [`ab1e34ae`](https://github.com/PrismJS/prism/commit/ab1e34ae) + * Added support for SSML ([#2306](https://github.com/PrismJS/prism/issues/2306)) [`eb70070d`](https://github.com/PrismJS/prism/commit/eb70070d) +* __Objective-C__ + * Added `objc` alias ([#2331](https://github.com/PrismJS/prism/issues/2331)) [`67c6b7af`](https://github.com/PrismJS/prism/commit/67c6b7af) +* __PowerShell__ + * New functions pattern bases on naming conventions ([#2301](https://github.com/PrismJS/prism/issues/2301)) [`fec39bcf`](https://github.com/PrismJS/prism/commit/fec39bcf) +* __Protocol Buffers__ + * Added support for RPC syntax ([#2414](https://github.com/PrismJS/prism/issues/2414)) [`939a17c4`](https://github.com/PrismJS/prism/commit/939a17c4) +* __Pug__ + * Improved class and id detection in tags ([#2358](https://github.com/PrismJS/prism/issues/2358)) [`7f948ecb`](https://github.com/PrismJS/prism/commit/7f948ecb) +* __Python__ + * Fixed empty multiline strings ([#2344](https://github.com/PrismJS/prism/issues/2344)) [`c9324476`](https://github.com/PrismJS/prism/commit/c9324476) +* __Regex__ + * Added aliases and minor improvements ([#2325](https://github.com/PrismJS/prism/issues/2325)) [`8a72830a`](https://github.com/PrismJS/prism/commit/8a72830a) +* __Ren'py__ + * Added `rpy` alias ([#2385](https://github.com/PrismJS/prism/issues/2385)) [`4935b5ca`](https://github.com/PrismJS/prism/commit/4935b5ca) +* __Ruby__ + * Optimized `regex` and `string` patterns ([#2354](https://github.com/PrismJS/prism/issues/2354)) [`b526e8c0`](https://github.com/PrismJS/prism/commit/b526e8c0) +* __Rust__ + * Improvements ([#2464](https://github.com/PrismJS/prism/issues/2464)) [`2ff40fe0`](https://github.com/PrismJS/prism/commit/2ff40fe0) + * Improvements ([#2332](https://github.com/PrismJS/prism/issues/2332)) [`194c5429`](https://github.com/PrismJS/prism/commit/194c5429) +* __SAS__ + * Improved macro string functions ([#2463](https://github.com/PrismJS/prism/issues/2463)) [`278316ca`](https://github.com/PrismJS/prism/commit/278316ca) + * Handle edge case of string macro functions ([#2451](https://github.com/PrismJS/prism/issues/2451)) [`a0a9f1ef`](https://github.com/PrismJS/prism/commit/a0a9f1ef) + * Improved comments in `proc groovy` and `proc lua` ([#2392](https://github.com/PrismJS/prism/issues/2392)) [`475a5903`](https://github.com/PrismJS/prism/commit/475a5903) +* __Scheme__ + * Adjusted lookbehind for literals ([#2396](https://github.com/PrismJS/prism/issues/2396)) [`1e3f542b`](https://github.com/PrismJS/prism/commit/1e3f542b) + * Improved lambda parameter ([#2346](https://github.com/PrismJS/prism/issues/2346)) [`1946918a`](https://github.com/PrismJS/prism/commit/1946918a) + * Consistent lookaheads ([#2322](https://github.com/PrismJS/prism/issues/2322)) [`d2541d54`](https://github.com/PrismJS/prism/commit/d2541d54) + * Improved boolean ([#2316](https://github.com/PrismJS/prism/issues/2316)) [`e27e65af`](https://github.com/PrismJS/prism/commit/e27e65af) + * Added missing special keywords ([#2304](https://github.com/PrismJS/prism/issues/2304)) [`ac297ba5`](https://github.com/PrismJS/prism/commit/ac297ba5) + * Improvements ([#2263](https://github.com/PrismJS/prism/issues/2263)) [`9a49f78f`](https://github.com/PrismJS/prism/commit/9a49f78f) +* __Solidity (Ethereum)__ + * Added `sol` alias ([#2382](https://github.com/PrismJS/prism/issues/2382)) [`6352213a`](https://github.com/PrismJS/prism/commit/6352213a) +* __SQL__ + * Added PostgreSQL `RETURNING` keyword ([#2476](https://github.com/PrismJS/prism/issues/2476)) [`bea7a585`](https://github.com/PrismJS/prism/commit/bea7a585) +* __Stylus__ + * Fixed comments breaking declarations + minor improvements ([#2372](https://github.com/PrismJS/prism/issues/2372)) [`6d663b6e`](https://github.com/PrismJS/prism/commit/6d663b6e) + * New tokens and other improvements ([#2368](https://github.com/PrismJS/prism/issues/2368)) [`2c10ef8a`](https://github.com/PrismJS/prism/commit/2c10ef8a) + * Fixed comments breaking strings and URLs ([#2361](https://github.com/PrismJS/prism/issues/2361)) [`0d65d6c9`](https://github.com/PrismJS/prism/commit/0d65d6c9) +* __T4 Text Templates (VB)__ + * Use the correct VB variant ([#2341](https://github.com/PrismJS/prism/issues/2341)) [`b6093339`](https://github.com/PrismJS/prism/commit/b6093339) +* __TypeScript__ + * Added `asserts` keyword and other improvements ([#2280](https://github.com/PrismJS/prism/issues/2280)) [`a197cfcd`](https://github.com/PrismJS/prism/commit/a197cfcd) +* __Visual Basic__ + * Added VBA alias ([#2469](https://github.com/PrismJS/prism/issues/2469)) [`78161d60`](https://github.com/PrismJS/prism/commit/78161d60) + * Added `until` keyword ([#2423](https://github.com/PrismJS/prism/issues/2423)) [`a13ee8d9`](https://github.com/PrismJS/prism/commit/a13ee8d9) + * Added missing keywords ([#2376](https://github.com/PrismJS/prism/issues/2376)) [`ba5ac1da`](https://github.com/PrismJS/prism/commit/ba5ac1da) + +### Updated plugins + +* File Highlight & JSONP Highlight update ([#1974](https://github.com/PrismJS/prism/issues/1974)) [`afea17d9`](https://github.com/PrismJS/prism/commit/afea17d9) +* Added general de/activation mechanism for plugins ([#2434](https://github.com/PrismJS/prism/issues/2434)) [`a36e96ab`](https://github.com/PrismJS/prism/commit/a36e96ab) +* __Autoloader__ + * Fixed bug breaking Autoloader ([#2449](https://github.com/PrismJS/prism/issues/2449)) [`a3416bf3`](https://github.com/PrismJS/prism/commit/a3416bf3) + * Fixed `data-dependencies` and extensions ([#2326](https://github.com/PrismJS/prism/issues/2326)) [`1654b25f`](https://github.com/PrismJS/prism/commit/1654b25f) + * Improved path detection and other minor improvements ([#2245](https://github.com/PrismJS/prism/issues/2245)) [`5cdc3251`](https://github.com/PrismJS/prism/commit/5cdc3251) +* __Command Line__ + * Some refactoring ([#2290](https://github.com/PrismJS/prism/issues/2290)) [`8c9c2896`](https://github.com/PrismJS/prism/commit/8c9c2896) + * Correctly rehighlight elements ([#2291](https://github.com/PrismJS/prism/issues/2291)) [`e6b2c6fc`](https://github.com/PrismJS/prism/commit/e6b2c6fc) +* __Line Highlight__ + * Added linkable line numbers ([#2328](https://github.com/PrismJS/prism/issues/2328)) [`eb82e804`](https://github.com/PrismJS/prism/commit/eb82e804) +* __Line Numbers__ + * Improved resize performance ([#2125](https://github.com/PrismJS/prism/issues/2125)) [`b96ed225`](https://github.com/PrismJS/prism/commit/b96ed225) + * Fixed TypeError when `lineNumberWrapper` is null ([#2337](https://github.com/PrismJS/prism/issues/2337)) [`4b61661d`](https://github.com/PrismJS/prism/commit/4b61661d) + * Exposed `_resizeElement` function ([#2288](https://github.com/PrismJS/prism/issues/2288)) [`893f2a79`](https://github.com/PrismJS/prism/commit/893f2a79) +* __Previewers__ + * Fixed XSS ([#2506](https://github.com/PrismJS/prism/issues/2506)) [`8bba4880`](https://github.com/PrismJS/prism/commit/8bba4880) +* __Unescaped Markup__ + * No longer requires `Prism.languages.markup` ([#2444](https://github.com/PrismJS/prism/issues/2444)) [`af132dd3`](https://github.com/PrismJS/prism/commit/af132dd3) + +### Updated themes + +* __Coy__ + * Minor improvements ([#2176](https://github.com/PrismJS/prism/issues/2176)) [`7109c18c`](https://github.com/PrismJS/prism/commit/7109c18c) +* __Default__ + * Added a comment that declares the background color of `operator` tokens as intentional ([#2309](https://github.com/PrismJS/prism/issues/2309)) [`937e2691`](https://github.com/PrismJS/prism/commit/937e2691) +* __Okaidia__ + * Update comment text color to meet WCAG contrast recommendations to AA level ([#2292](https://github.com/PrismJS/prism/issues/2292)) [`06495f90`](https://github.com/PrismJS/prism/commit/06495f90) + +### Other + +* Changelog: Fixed v1.20.0 release date [`cb6349e2`](https://github.com/PrismJS/prism/commit/cb6349e2) +* __Core__ + * Fixed greedy matching bug ([#2032](https://github.com/PrismJS/prism/issues/2032)) [`40285203`](https://github.com/PrismJS/prism/commit/40285203) + * Added JSDoc ([#1782](https://github.com/PrismJS/prism/issues/1782)) [`4ff555be`](https://github.com/PrismJS/prism/commit/4ff555be) +* __Infrastructure__ + * Update Git repo URL in package.json ([#2334](https://github.com/PrismJS/prism/issues/2334)) [`10f43275`](https://github.com/PrismJS/prism/commit/10f43275) + * Added docs to ignore files ([#2437](https://github.com/PrismJS/prism/issues/2437)) [`05c9f20b`](https://github.com/PrismJS/prism/commit/05c9f20b) + * Added `npm run build` command ([#2356](https://github.com/PrismJS/prism/issues/2356)) [`ff74a610`](https://github.com/PrismJS/prism/commit/ff74a610) + * gulp: Improved `inlineRegexSource` ([#2296](https://github.com/PrismJS/prism/issues/2296)) [`abb800dd`](https://github.com/PrismJS/prism/commit/abb800dd) + * gulp: Fixed language map ([#2283](https://github.com/PrismJS/prism/issues/2283)) [`11053193`](https://github.com/PrismJS/prism/commit/11053193) + * gulp: Removed `premerge` task ([#2357](https://github.com/PrismJS/prism/issues/2357)) [`5ff7932b`](https://github.com/PrismJS/prism/commit/5ff7932b) + * Tests are now faster ([#2165](https://github.com/PrismJS/prism/issues/2165)) [`e756be3f`](https://github.com/PrismJS/prism/commit/e756be3f) + * Tests: Added extra newlines in pretty token streams ([#2070](https://github.com/PrismJS/prism/issues/2070)) [`681adeef`](https://github.com/PrismJS/prism/commit/681adeef) + * Tests: Added test for identifier support across all languages ([#2371](https://github.com/PrismJS/prism/issues/2371)) [`48fac3b2`](https://github.com/PrismJS/prism/commit/48fac3b2) + * Tests: Added test to sort the language list ([#2222](https://github.com/PrismJS/prism/issues/2222)) [`a3758728`](https://github.com/PrismJS/prism/commit/a3758728) + * Tests: Always pretty-print token streams ([#2421](https://github.com/PrismJS/prism/issues/2421)) [`583e7eb5`](https://github.com/PrismJS/prism/commit/583e7eb5) + * Tests: Always use `components.json` ([#2370](https://github.com/PrismJS/prism/issues/2370)) [`e416341f`](https://github.com/PrismJS/prism/commit/e416341f) + * Tests: Better error messages for pattern tests ([#2364](https://github.com/PrismJS/prism/issues/2364)) [`10ca6433`](https://github.com/PrismJS/prism/commit/10ca6433) + * Tests: Included `console` in VM context ([#2353](https://github.com/PrismJS/prism/issues/2353)) [`b4ed5ded`](https://github.com/PrismJS/prism/commit/b4ed5ded) +* __Website__ + * Fixed typos "Prims" ([#2455](https://github.com/PrismJS/prism/issues/2455)) [`dfa5498a`](https://github.com/PrismJS/prism/commit/dfa5498a) + * New assets directory for all web-only files ([#2180](https://github.com/PrismJS/prism/issues/2180)) [`91fdd0b1`](https://github.com/PrismJS/prism/commit/91fdd0b1) + * Improvements ([#2053](https://github.com/PrismJS/prism/issues/2053)) [`ce0fa227`](https://github.com/PrismJS/prism/commit/ce0fa227) + * Fixed Treeview page ([#2484](https://github.com/PrismJS/prism/issues/2484)) [`a0efa40b`](https://github.com/PrismJS/prism/commit/a0efa40b) + * Line Numbers: Fixed class name on website [`453079bf`](https://github.com/PrismJS/prism/commit/453079bf) + * Line Numbers: Improved documentation ([#2456](https://github.com/PrismJS/prism/issues/2456)) [`447429f0`](https://github.com/PrismJS/prism/commit/447429f0) + * Line Numbers: Style inline code on website ([#2435](https://github.com/PrismJS/prism/issues/2435)) [`ad9c13e2`](https://github.com/PrismJS/prism/commit/ad9c13e2) + * Filter highlightAll: Fixed typo ([#2391](https://github.com/PrismJS/prism/issues/2391)) [`55bf7ec1`](https://github.com/PrismJS/prism/commit/55bf7ec1) + ## 1.20.0 (2020-04-04) ### New components diff --git a/gulpfile.js/changelog.js b/gulpfile.js/changelog.js index 0c236de2a6..47b0586013 100644 --- a/gulpfile.js/changelog.js +++ b/gulpfile.js/changelog.js @@ -143,7 +143,9 @@ async function changes() { /** @param {CommitChange} change */ function notGenerated(change) { - return !change.file.endsWith('.min.js') && ['prism.js', 'components.js', 'package-lock.json'].indexOf(change.file) === -1; + return !change.file.endsWith('.min.js') + && !change.file.startsWith('docs/') + && ['prism.js', 'components.js', 'package-lock.json'].indexOf(change.file) === -1; } /** @param {CommitChange} change */ function notPartlyGenerated(change) { @@ -297,14 +299,18 @@ async function changes() { }, function changedInfrastructure(info) { - if (info.changes.length > 0 && info.changes.every(c => { - if (c.file.startsWith('gulpfile.js')) { + let relevantChanges = info.changes.filter(notGenerated); + + if (relevantChanges.length > 0 && relevantChanges.every(c => { + if (/^(?:gulpfile.js|tests)\//.test(c.file)) { + // gulp tasks or tests return true; } if (/^\.[\w.]+$/.test(c.file)) { + // a .something file return true; } - return ['CNAME', 'composer.json', 'package.json', 'package-lock.json'].indexOf(c.file) >= 0; + return ['bower.json', 'CNAME', 'composer.json', 'package.json', 'package-lock.json'].indexOf(c.file) >= 0; })) { addEntry('Other >> Infrastructure', info); return true; @@ -320,7 +326,7 @@ async function changes() { function changedWebsite(info) { if (info.changes.length > 0 && info.changes.every(c => { - return /[\w-]+\.html$/.test(c.file) || /^assets\//.test(c.file); + return /[\w-]+\.html$/.test(c.file) || /^(?:assets|docs)\//.test(c.file); })) { addEntry('Other >> Website', info); return true; From 187c8a607ee70c7914682870156faa31ed01f001 Mon Sep 17 00:00:00 2001 From: mAAdhaTTah Date: Thu, 6 Aug 2020 19:17:18 -0400 Subject: [PATCH 0610/1100] 1.21.0 --- package-lock.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index c4e08b45be..ca8d097d40 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "prismjs", - "version": "1.20.0", + "version": "1.21.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index fa92ec55fd..b498d9317a 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "prismjs", - "version": "1.20.0", + "version": "1.21.0", "description": "Lightweight, robust, elegant syntax highlighting. A spin-off project from Dabblet.", "main": "prism.js", "style": "themes/prism.css", From 388ad996c4b576205de4d4feda69202bd26c1345 Mon Sep 17 00:00:00 2001 From: Artyom Sovetnikov Date: Fri, 7 Aug 2020 21:14:34 +0300 Subject: [PATCH 0611/1100] Add support for NaniScript (#2494) --- components.js | 2 +- components.json | 5 + components/prism-naniscript.js | 170 ++++++++++++++ components/prism-naniscript.min.js | 1 + examples/prism-naniscript.html | 72 ++++++ plugins/autoloader/prism-autoloader.js | 1 + plugins/autoloader/prism-autoloader.min.js | 2 +- plugins/show-language/prism-show-language.js | 2 + .../show-language/prism-show-language.min.js | 2 +- .../languages/naniscript/command_feature.test | 207 ++++++++++++++++++ .../languages/naniscript/comment_feature.test | 17 ++ .../languages/naniscript/define_feature.test | 17 ++ .../naniscript/expression_feature.test | 91 ++++++++ tests/languages/naniscript/label_feature.test | 24 ++ .../naniscript/mixed_content_feature.test | 97 ++++++++ 15 files changed, 707 insertions(+), 3 deletions(-) create mode 100644 components/prism-naniscript.js create mode 100644 components/prism-naniscript.min.js create mode 100644 examples/prism-naniscript.html create mode 100644 tests/languages/naniscript/command_feature.test create mode 100644 tests/languages/naniscript/comment_feature.test create mode 100644 tests/languages/naniscript/define_feature.test create mode 100644 tests/languages/naniscript/expression_feature.test create mode 100644 tests/languages/naniscript/label_feature.test create mode 100644 tests/languages/naniscript/mixed_content_feature.test diff --git a/components.js b/components.js index 2d468755c9..722e145d98 100644 --- a/components.js +++ b/components.js @@ -1,2 +1,2 @@ -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml","ssml","atom","rss"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","ssml":"SSML","atom":"Atom","rss":"RSS"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"ABNF","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"agda":{"title":"Agda","owner":"xy-ren"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"BNF","alias":"rbnf","aliasTitles":{"rbnf":"RBNF"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"clojure":{"title":"Clojure","owner":"troglotit"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"cypher":{"title":"Cypher","owner":"RunDevelopment"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dax":{"title":"DAX","owner":"peterbud"},"dhall":{"title":"Dhall","owner":"RunDevelopment"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"EBNF","owner":"RunDevelopment"},"editorconfig":{"title":"EditorConfig","owner":"osipxd"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"c","owner":"Golmote"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","optional":["markdown"],"owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"hlsl":{"title":"HLSL","require":"c","owner":"RunDevelopment"},"http":{"title":"HTTP","optional":["css","javascript","json","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"ignore":{"title":".ignore","owner":"osipxd","alias":["gitignore","hgignore","npmignore"],"aliasTitles":{"gitignore":".gitignore","hgignore":".hgignore","npmignore":".npmignore"}},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike","typescript"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","alias":"webmanifest","aliasTitles":{"webmanifest":"Web App Manifest"},"owner":"CupOfTea696"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"jsstacktrace":{"title":"JS stack trace","owner":"sbrl"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","alias":["kt","kts"],"aliasTitles":{"kts":"Kotlin Script"},"require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"purebasic":{"title":"PureBasic","require":"clike","alias":"pbfasm","owner":"HeX0R101"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"racket":{"title":"Racket","require":"scheme","alias":"rkt","owner":"RunDevelopment"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","modify":["actionscript","coffeescript","flow","javascript","typescript","vala"],"owner":"RunDevelopment"},"renpy":{"title":"Ren'py","alias":"rpy","owner":"HyuchiaDiego"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","owner":"RunDevelopment"},"smali":{"title":"Smali","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"solidity":{"title":"Solidity (Ethereum)","alias":"sol","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","vbnet"],"owner":"RunDevelopment"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":["vb","vba"],"aliasTitles":{"vba":"VBA"},"owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xml-doc":{"title":"XML doc (.net)","require":"markup","modify":["csharp","fsharp","vbnet"],"owner":"RunDevelopment"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"yang":{"title":"YANG","owner":"RunDevelopment"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml","ssml","atom","rss"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","ssml":"SSML","atom":"Atom","rss":"RSS"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"ABNF","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"agda":{"title":"Agda","owner":"xy-ren"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"BNF","alias":"rbnf","aliasTitles":{"rbnf":"RBNF"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"clojure":{"title":"Clojure","owner":"troglotit"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"cypher":{"title":"Cypher","owner":"RunDevelopment"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dax":{"title":"DAX","owner":"peterbud"},"dhall":{"title":"Dhall","owner":"RunDevelopment"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"EBNF","owner":"RunDevelopment"},"editorconfig":{"title":"EditorConfig","owner":"osipxd"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"c","owner":"Golmote"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","optional":["markdown"],"owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"hlsl":{"title":"HLSL","require":"c","owner":"RunDevelopment"},"http":{"title":"HTTP","optional":["css","javascript","json","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"ignore":{"title":".ignore","owner":"osipxd","alias":["gitignore","hgignore","npmignore"],"aliasTitles":{"gitignore":".gitignore","hgignore":".hgignore","npmignore":".npmignore"}},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike","typescript"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","alias":"webmanifest","aliasTitles":{"webmanifest":"Web App Manifest"},"owner":"CupOfTea696"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"jsstacktrace":{"title":"JS stack trace","owner":"sbrl"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","alias":["kt","kts"],"aliasTitles":{"kts":"Kotlin Script"},"require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"naniscript":{"title":"Naninovel Script","owner":"Elringus","alias":"nani"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"purebasic":{"title":"PureBasic","require":"clike","alias":"pbfasm","owner":"HeX0R101"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"racket":{"title":"Racket","require":"scheme","alias":"rkt","owner":"RunDevelopment"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","modify":["actionscript","coffeescript","flow","javascript","typescript","vala"],"owner":"RunDevelopment"},"renpy":{"title":"Ren'py","alias":"rpy","owner":"HyuchiaDiego"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","owner":"RunDevelopment"},"smali":{"title":"Smali","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"solidity":{"title":"Solidity (Ethereum)","alias":"sol","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","vbnet"],"owner":"RunDevelopment"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":["vb","vba"],"aliasTitles":{"vba":"VBA"},"owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xml-doc":{"title":"XML doc (.net)","require":"markup","modify":["csharp","fsharp","vbnet"],"owner":"RunDevelopment"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"yang":{"title":"YANG","owner":"RunDevelopment"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; if (typeof module !== 'undefined' && module.exports) { module.exports = components; } \ No newline at end of file diff --git a/components.json b/components.json index 0ae297ea21..ebfa702a23 100644 --- a/components.json +++ b/components.json @@ -728,6 +728,11 @@ "title": "Nand To Tetris HDL", "owner": "stephanmax" }, + "naniscript": { + "title": "Naninovel Script", + "owner": "Elringus", + "alias": "nani" + }, "nasm": { "title": "NASM", "owner": "rbmj" diff --git a/components/prism-naniscript.js b/components/prism-naniscript.js new file mode 100644 index 0000000000..131fd6ad77 --- /dev/null +++ b/components/prism-naniscript.js @@ -0,0 +1,170 @@ +(function (Prism) { + + var expressionDef = /\{[^\r\n\[\]{}]*\}/; + + var params = { + 'quoted-string': { + pattern: /"(?:[^"\\]|\\.)*"/, + alias: 'operator' + }, + 'command-param-id': { + pattern: /(\s)\w+:/, + lookbehind: true, + alias: 'property' + }, + 'command-param-value': [ + { + pattern: expressionDef, + alias: 'selector', + }, + { + pattern: /([\t ])\S+/, + lookbehind: true, + greedy: true, + alias: 'operator', + }, + { + pattern: /\S(?:.*\S)?/, + alias: 'operator', + } + ] + }; + + Prism.languages.naniscript = { + // ; ... + 'comment': { + pattern: /^([\t ]*);.*/m, + lookbehind: true, + }, + // > ... + // Define is a control line starting with '>' followed by a word, a space and a text. + 'define': { + pattern: /^>.+/m, + alias: 'tag', + inside: { + 'value': { + pattern: /(^>\w+[\t ]+)(?!\s)[^{}\r\n]+/, + lookbehind: true, + alias: 'operator' + }, + 'key': { + pattern: /(^>)\w+/, + lookbehind: true, + } + } + }, + // # ... + 'label': { + pattern: /^([\t ]*)#[\t ]*\w+[\t ]*$/m, + lookbehind: true, + alias: 'regex' + }, + 'command': { + pattern: /^([\t ]*)@\w+(?=[\t ]|$).*/m, + lookbehind: true, + alias: 'function', + inside: { + 'command-name': /^@\w+/, + 'expression': { + pattern: expressionDef, + greedy: true, + alias: 'selector' + }, + 'command-params': { + pattern: /[\s\S]*\S[\s\S]*/, + inside: params + }, + } + }, + // Generic is any line that doesn't start with operators: ;>#@ + 'generic-text': { + pattern: /(^[ \t]*)[^#@>;\s].*/m, + lookbehind: true, + alias: 'punctuation', + inside: { + // \{ ... \} ... \[ ... \] ... \" + 'escaped-char': /\\[{}\[\]"]/, + 'expression': { + pattern: expressionDef, + greedy: true, + alias: 'selector' + }, + 'inline-command': { + pattern: /\[[\t ]*\w+[^\r\n\[\]]*\]/, + greedy: true, + alias: 'function', + inside: { + 'command-params': { + pattern: /(^\[[\t ]*\w+\b)[\s\S]+(?=\]$)/, + lookbehind: true, + inside: params + }, + 'command-param-name': { + pattern: /^(\[[\t ]*)\w+/, + lookbehind: true, + alias: 'name', + }, + 'start-stop-char': /[\[\]]/, + } + }, + } + } + }; + Prism.languages.nani = Prism.languages['naniscript']; + + /** @typedef {InstanceType} Token */ + + /** + * This hook is used to validate generic-text tokens for balanced brackets. + * Mark token as bad-line when contains not balanced brackets: {},[] + */ + Prism.hooks.add('after-tokenize', function (env) { + /** @type {(Token | string)[]} */ + var tokens = env.tokens; + tokens.forEach(function (token) { + if (typeof token !== "string" && token.type === 'generic-text') { + var content = getTextContent(token); + if (!isBracketsBalanced(content)) { + token.type = 'bad-line'; + token.content = content; + } + } + }); + }); + + /** + * @param {string} input + * @returns {boolean} + */ + function isBracketsBalanced(input) { + var brackets = "[]{}"; + var stack = []; + for (var i = 0; i < input.length; i++) { + var bracket = input[i]; + var bracketsIndex = brackets.indexOf(bracket); + if (bracketsIndex !== -1) { + if (bracketsIndex % 2 === 0) { + stack.push(bracketsIndex + 1); + } else if (stack.pop() !== bracketsIndex) { + return false; + } + } + } + return stack.length === 0; + }; + + /** + * @param {string | Token | (string | Token)[]} token + * @returns {string} + */ + function getTextContent(token) { + if (typeof token === 'string') { + return token; + } else if (Array.isArray(token)) { + return token.map(getTextContent).join(''); + } else { + return getTextContent(token.content); + } + } + +})(Prism); diff --git a/components/prism-naniscript.min.js b/components/prism-naniscript.min.js new file mode 100644 index 0000000000..11558ba6e9 --- /dev/null +++ b/components/prism-naniscript.min.js @@ -0,0 +1 @@ +!function(e){var a=/\{[^\r\n\[\]{}]*\}/,n={"quoted-string":{pattern:/"(?:[^"\\]|\\.)*"/,alias:"operator"},"command-param-id":{pattern:/(\s)\w+:/,lookbehind:!0,alias:"property"},"command-param-value":[{pattern:a,alias:"selector"},{pattern:/([\t ])\S+/,lookbehind:!0,greedy:!0,alias:"operator"},{pattern:/\S(?:.*\S)?/,alias:"operator"}]};function t(e){return"string"==typeof e?e:Array.isArray(e)?e.map(t).join(""):t(e.content)}e.languages.naniscript={comment:{pattern:/^([\t ]*);.*/m,lookbehind:!0},define:{pattern:/^>.+/m,alias:"tag",inside:{value:{pattern:/(^>\w+[\t ]+)(?!\s)[^{}\r\n]+/,lookbehind:!0,alias:"operator"},key:{pattern:/(^>)\w+/,lookbehind:!0}}},label:{pattern:/^([\t ]*)#[\t ]*\w+[\t ]*$/m,lookbehind:!0,alias:"regex"},command:{pattern:/^([\t ]*)@\w+(?=[\t ]|$).*/m,lookbehind:!0,alias:"function",inside:{"command-name":/^@\w+/,expression:{pattern:a,greedy:!0,alias:"selector"},"command-params":{pattern:/[\s\S]*\S[\s\S]*/,inside:n}}},"generic-text":{pattern:/(^[ \t]*)[^#@>;\s].*/m,lookbehind:!0,alias:"punctuation",inside:{"escaped-char":/\\[{}\[\]"]/,expression:{pattern:a,greedy:!0,alias:"selector"},"inline-command":{pattern:/\[[\t ]*\w+[^\r\n\[\]]*\]/,greedy:!0,alias:"function",inside:{"command-params":{pattern:/(^\[[\t ]*\w+\b)[\s\S]+(?=\]$)/,lookbehind:!0,inside:n},"command-param-name":{pattern:/^(\[[\t ]*)\w+/,lookbehind:!0,alias:"name"},"start-stop-char":/[\[\]]/}}}}},e.languages.nani=e.languages.naniscript,e.hooks.add("after-tokenize",function(e){e.tokens.forEach(function(e){if("string"!=typeof e&&"generic-text"===e.type){var a=t(e);(function(e){for(var a=[],n=0;nComments

        +
        ;Text of Comment
        +		;		Comment with tabs before
        +
        + +

        Define

        +
        
        +>DefineKey define 12 super usefull lines
        +
        + +

        Label

        +
        # Section
        +#Section without whitespace
        + # Section with whitespace
        +	# SectionWithTab	
        +
        + +

        Command

        +
        
        +@
        +@ cmdWithWhiteSpaceBefore
        +@cmdWithTrailingSemicolon:
        +@paramlessCmd
        + @cmdWithNoParamsAndWhitespaceBefore
        +		@cmdWithNoParamsAndTabBefore
        +					 @cmdWithNoParamsAndTabAndSpacesBefore
        +           @cmdWithNoParamsWrappedInWhitespaces             
        +@cmdWithNoParamWithTrailingSpace 
        +@cmdWithNoParamWithMultipleTrailingSpaces   
        +@cmdWithNoParamWithTrailingTab	
        +@cmdWithNoParamWithTrailingTabAndSpaces	  
        +@cmdWithPositiveIntParam 1
        +@cmdWithNegativeIntParam -1
        +@cmdWithPositiveFloatParamAndNoFraction 1.
        +@cmdWithPositiveFloatParamAndFraction 1.10
        +@cmdWithPositiveHegativeFloatParamAndNoFraction -1.
        +@cmdWithPositiveHegativeFloatParamAndFraction -1.10
        +@cmdWithBoolParamAndPositive true
        +@cmdWithBoolParamAndNegative false
        +@cmdWithStringParam hello$co\:mma"d"
        +@cmdWithQuotedStringNamelessParameter "hello grizzly"
        +@cmdWithQuotedStringNamelessParameterWithEscapedQuotesInTheValue "hello \"grizzly\""
        +@set choice="moe"
        +@command hello.grizzly
        +@command one,two,three
        +@command 1,2,3
        +@command true,false,true
        +@command hi:grizzly
        +@command hi:1
        +@command hi:true
        +@command 1 in:forest danger:true
        +@char 1 pos:0.25,-0.75 look:right
        +
        + +

        Generic Text

        +
        Generic text with inlined commands[i] example[command 1 danger:true] more text here [act danger:false true:false]
        +"Integer: a = {a} malesuada a + b = {a + b}", Random(a, b) = {Random(a, b)}, Random("foo", "bar", "foobar") = {Random("foo", "bar", "foobar")}
        +UnclosedExpression{ab{cndum dui dolor tincidu{nt [s[fa]sdf [
        +"Integer: a = {a} malesuada a + b = {a + b}", Random(a, b) = {Random(a, b)}, Random("foo", "bar", "foobar") = {Random("foo", "bar", "foobar")},}
        +
        + +

        Expressions

        +
        {}
        +{ Abs(a, d) + 12 - 1 / -230.0 + "Lol ipsum" }
        +Expressions inside a generic text line: Loreim ipsu,{ Abs(a, d) + 12 - 1 / -230.0 + "Lol ipsum" } doler sit amen {¯\_(ツ)_/¯}.
        +@ExpressionInsteadOfNamelessParameterValue {x > 0}
        +@ExpressionBlendedWithNamelessParameterValue sdf{x > 0}df
        +@ExpressionsInsideNamedParameterValueWrappedInQuotes text:"{a} < {b}"
        +@ExpressionsBlendedWithNamedParameterValue param:32r2f,df{x > 0},d.{Abs(0) + 12.24 > 0}ff
        +@ExpressionsInsteadOfNamelessParameterAndQuotedParameter {remark} if:remark=="Saying \\"Stop { "the" } car\\" was a mistake."
        +
        diff --git a/plugins/autoloader/prism-autoloader.js b/plugins/autoloader/prism-autoloader.js index b57c694bdc..28636029c5 100644 --- a/plugins/autoloader/prism-autoloader.js +++ b/plugins/autoloader/prism-autoloader.js @@ -187,6 +187,7 @@ "md": "markdown", "moon": "moonscript", "n4jsd": "n4js", + "nani": "naniscript", "objc": "objectivec", "objectpascal": "pascal", "px": "pcaxis", diff --git a/plugins/autoloader/prism-autoloader.min.js b/plugins/autoloader/prism-autoloader.min.js index 8bd4e77e1e..3b1029ffe0 100644 --- a/plugins/autoloader/prism-autoloader.min.js +++ b/plugins/autoloader/prism-autoloader.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof self&&self.Prism&&self.document&&document.createElement){var l={javascript:"clike",actionscript:"javascript",arduino:"cpp",aspnet:["markup","csharp"],bison:"c",c:"clike",csharp:"clike",cpp:"c",coffeescript:"javascript",crystal:"ruby","css-extras":"css",d:"clike",dart:"clike",django:"markup-templating",ejs:["javascript","markup-templating"],etlua:["lua","markup-templating"],erb:["ruby","markup-templating"],fsharp:"clike","firestore-security-rules":"clike",flow:"javascript",ftl:"markup-templating",gml:"clike",glsl:"c",go:"clike",groovy:"clike",haml:"ruby",handlebars:"markup-templating",haxe:"clike",hlsl:"c",java:"clike",javadoc:["markup","java","javadoclike"],jolie:"clike",jsdoc:["javascript","javadoclike","typescript"],"js-extras":"javascript",json5:"json",jsonp:"json","js-templates":"javascript",kotlin:"clike",latte:["clike","markup-templating","php"],less:"css",lilypond:"scheme",markdown:"markup","markup-templating":"markup",n4js:"javascript",nginx:"clike",objectivec:"c",opencl:"c",parser:"markup",php:["clike","markup-templating"],phpdoc:["php","javadoclike"],"php-extras":"php",plsql:"sql",processing:"clike",protobuf:"clike",pug:["markup","javascript"],purebasic:"clike",qml:"javascript",qore:"clike",racket:"scheme",jsx:["markup","javascript"],tsx:["jsx","typescript"],reason:"clike",ruby:"clike",sass:"css",scss:"css",scala:"java","shell-session":"bash",smarty:"markup-templating",solidity:"clike",soy:"markup-templating",sparql:"turtle",sqf:"clike",swift:"clike","t4-cs":["t4-templating","csharp"],"t4-vb":["t4-templating","vbnet"],tap:"yaml",tt2:["clike","markup-templating"],textile:"markup",twig:"markup",typescript:"javascript",vala:"clike",vbnet:"basic",velocity:"markup",wiki:"markup",xeora:"markup","xml-doc":"markup",xquery:"markup"},n={html:"markup",xml:"markup",svg:"markup",mathml:"markup",ssml:"markup",atom:"markup",rss:"markup",js:"javascript",g4:"antlr4",adoc:"asciidoc",shell:"bash",shortcode:"bbcode",rbnf:"bnf",cs:"csharp",dotnet:"csharp",coffee:"coffeescript",conc:"concurnas",jinja2:"django","dns-zone":"dns-zone-file",dockerfile:"docker",eta:"ejs",xlsx:"excel-formula",xls:"excel-formula",gamemakerlanguage:"gml",hs:"haskell",gitignore:"ignore",hgignore:"ignore",npmignore:"ignore",webmanifest:"json",kt:"kotlin",kts:"kotlin",tex:"latex",context:"latex",ly:"lilypond",emacs:"lisp",elisp:"lisp","emacs-lisp":"lisp",md:"markdown",moon:"moonscript",n4jsd:"n4js",objc:"objectivec",objectpascal:"pascal",px:"pcaxis",pcode:"peoplecode",pq:"powerquery",mscript:"powerquery",pbfasm:"purebasic",py:"python",rkt:"racket",rpy:"renpy",robot:"robotframework",rb:"ruby",sol:"solidity",sln:"solution-file",rq:"sparql",t4:"t4-cs",trig:"turtle",ts:"typescript",uscript:"unrealscript",uc:"unrealscript",vb:"visual-basic",vba:"visual-basic",xeoracube:"xeora",yml:"yaml"},p={},e="components/",a=Prism.util.currentScript();if(a){var r=/\bplugins\/autoloader\/prism-autoloader\.(?:min\.)js(?:\?[^\r\n/]*)?$/i,t=/(^|\/)[\w-]+\.(?:min\.)js(?:\?[^\r\n/]*)?$/i,i=a.getAttribute("data-autoloader-path");if(null!=i)e=i.trim().replace(/\/?$/,"/");else{var s=a.src;r.test(s)?e=s.replace(r,"components/"):t.test(s)&&(e=s.replace(t,"$1components/"))}}var o=Prism.plugins.autoloader={languages_path:e,use_minified:!0,loadLanguages:m};Prism.hooks.add("complete",function(e){var a=e.element,r=e.language;if(a&&r&&"none"!==r){var t=function(e){var a=(e.getAttribute("data-dependencies")||"").trim();if(!a){var r=e.parentElement;r&&"pre"===r.tagName.toLowerCase()&&(a=(r.getAttribute("data-dependencies")||"").trim())}return a?a.split(/\s*,\s*/g):[]}(a);t.push(r),t.every(u)||m(t,function(){Prism.highlightElement(a)})}})}function u(e){if(0<=e.indexOf("!"))return!1;if((e=n[e]||e)in Prism.languages)return!0;var a=p[e];return a&&!a.error&&!1===a.loading}function m(e,a,r){"string"==typeof e&&(e=[e]);var t=e.length,i=0,s=!1;function c(){s||++i===t&&a&&a(e)}0!==t?e.forEach(function(e){!function(a,r,t){var i=0<=a.indexOf("!");function e(){var e=p[a];e||(e=p[a]={callbacks:[]}),e.callbacks.push({success:r,error:t}),!i&&u(a)?k(a,"success"):!i&&e.error?k(a,"error"):!i&&e.loading||(e.loading=!0,e.error=!1,function(e,a,r){var t=document.createElement("script");t.src=e,t.async=!0,t.onload=function(){document.body.removeChild(t),a&&a()},t.onerror=function(){document.body.removeChild(t),r&&r()},document.body.appendChild(t)}(function(e){return o.languages_path+"prism-"+e+(o.use_minified?".min":"")+".js"}(a),function(){e.loading=!1,k(a,"success")},function(){e.loading=!1,e.error=!0,k(a,"error")}))}a=a.replace("!",""),a=n[a]||a;var s=l[a];s&&s.length?m(s,e,t):e()}(e,c,function(){s||(s=!0,r&&r(e))})}):a&&setTimeout(a,0)}function k(e,a){if(p[e]){for(var r=p[e].callbacks,t=0,i=r.length;t +>DefineKey define _ + 3h f[29 j] value * + +---------------------------------------------------- + +[ + ">\r\n", + ["define", [ + ">", + ["key", "DefineKey"], + ["value", "define _ + 3h f[29 j] value *"] + ]] +] + +---------------------------------------------------- + +Define tests. diff --git a/tests/languages/naniscript/expression_feature.test b/tests/languages/naniscript/expression_feature.test new file mode 100644 index 0000000000..140f921ce1 --- /dev/null +++ b/tests/languages/naniscript/expression_feature.test @@ -0,0 +1,91 @@ +{} +{ Abs(a, d) + 12 - 1 / -230.0 + "Lol ipsum" } +Expressions inside a generic text line: Loreim ipsu,{ Abs(a, d) + 12 - 1 / -230.0 + "Lol ipsum" } doler sit amen {¯\_(ツ)_/¯}. +@ExpressionInsteadOfNamelessParameterValue {x > 0} +@ExpressionBlendedWithNamelessParameterValue sdf{x > 0}df +@ExpressionsInsideNamedParameterValueWrappedInQuotes text:"{a} < {b}" +@ExpressionsBlendedWithNamedParameterValue param:32r2f,df{x > 0},d.{Abs(0) + 12.24 > 0}ff +@ExpressionsInsteadOfNamelessParameterAndQuotedParameter {remark} if:remark=="Saying \\"Stop { "the" } car\\" was a mistake." + +---------------------------------------------------- + +[ + ["generic-text", [ + ["expression", "{}"] + ]], + ["generic-text", [ + ["expression", "{ Abs(a, d) + 12 - 1 / -230.0 + \"Lol ipsum\" }"] + ]], + ["generic-text", [ + "Expressions inside a generic text line: Loreim ipsu,", + ["expression", "{ Abs(a, d) + 12 - 1 / -230.0 + \"Lol ipsum\" }"], + " doler sit amen ", + ["expression", "{¯\\_(ツ)_/¯}"], + "." + ]], + ["command", [ + ["command-name", "@ExpressionInsteadOfNamelessParameterValue"], + ["expression", "{x > 0}"] + ]], + ["command", [ + ["command-name", "@ExpressionBlendedWithNamelessParameterValue"], + ["command-params", [ + ["command-param-value", "sdf"] + ]], + ["expression", "{x > 0}"], + ["command-params", [ + ["command-param-value", "df"] + ]] + ]], + ["command", [ + ["command-name", "@ExpressionsInsideNamedParameterValueWrappedInQuotes"], + ["command-params", [ + ["command-param-id", "text:"], + ["command-param-value", "\""] + ]], + ["expression", "{a}"], + ["command-params", [ + ["command-param-value", "<"] + ]], + ["expression", "{b}"], + ["command-params", [ + ["command-param-value", "\""] + ]] + ]], + ["command", [ + ["command-name", "@ExpressionsBlendedWithNamedParameterValue"], + ["command-params", [ + ["command-param-id", "param:"], + ["command-param-value", "32r2f,df"] + ]], + ["expression", "{x > 0}"], + ["command-params", [ + ["command-param-value", ",d."] + ]], + ["expression", "{Abs(0) + 12.24 > 0}"], + ["command-params", [ + ["command-param-value", "ff"] + ]] + ]], + ["command", [ + ["command-name", "@ExpressionsInsteadOfNamelessParameterAndQuotedParameter"], + ["expression", "{remark}"], + ["command-params", [ + ["command-param-id", "if:"], + ["command-param-value", "remark=="], + ["quoted-string", "\"Saying \\\\\""], + ["command-param-value", "Stop"] + ]], + ["expression", "{ \"the\" }"], + ["command-params", [ + ["command-param-value", "car\\\\\""], + ["command-param-value", "was"], + ["command-param-value", "a"], + ["command-param-value", "mistake.\""] + ]] + ]] +] + +---------------------------------------------------- + +Expressions tests. diff --git a/tests/languages/naniscript/label_feature.test b/tests/languages/naniscript/label_feature.test new file mode 100644 index 0000000000..6a0606ec7e --- /dev/null +++ b/tests/languages/naniscript/label_feature.test @@ -0,0 +1,24 @@ +# +# Section1 +#Section2 +# Section4 +# SectionWithMultipleTabsBefore +## Section3 +# Section with multiple words + # Section with + # Section with tab + +---------------------------------------------------- + +[ + "#\r\n", + ["label", "# Section1"], + ["label", "#Section2"], + ["label", "# Section4"], + ["label", "#\t\t\tSectionWithMultipleTabsBefore"], + "\r\n## Section3\r\n# Section with multiple words\r\n\t# Section with\r\n\t# Section with tab" +] + +---------------------------------------------------- + +Label tests. diff --git a/tests/languages/naniscript/mixed_content_feature.test b/tests/languages/naniscript/mixed_content_feature.test new file mode 100644 index 0000000000..4ead87447e --- /dev/null +++ b/tests/languages/naniscript/mixed_content_feature.test @@ -0,0 +1,97 @@ +Generic text with inlined commands[i] example[command 1 danger:true] more text here [act danger:false true:false] + +@action1ForTwoLinesWithCommands +@action2ForTwoLinesWithCommands + +@commandAndGenericTextOnNewLine +Massa ut elementum. + +@commandWithParameterAndGenericTextOnNewLine WideParam +Integer + +Escaped braces inside generic text\{abu\}nt @ >ip#s;um< @ \[sdff j9dj\] + +UnclosedExpression{ab{cndum dui dolor tincidu{nt [s[fa]sdf [ +"Integer: a = {a} malesuada a + b = {a + b}", Random(a, b) = {Random(a, b)}, Random("foo", "bar", "foobar") = {Random("foo", "bar", "foobar")},} +# +> +@ + +---------------------------------------------------- + +[ + ["generic-text", [ + "Generic text with inlined commands", + ["inline-command", [ + ["start-stop-char", "["], + ["command-param-name", "i"], + ["start-stop-char", "]"] + ]], + " example", + ["inline-command", [ + ["start-stop-char", "["], + ["command-param-name", "command"], + ["command-params", [ + ["command-param-value", "1"], + ["command-param-id", "danger:"], + ["command-param-value", "true"] + ]], + ["start-stop-char", "]"] + ]], + " more text here ", + ["inline-command", [ + ["start-stop-char", "["], + ["command-param-name", "act"], + ["command-params", [ + ["command-param-id", "danger:"], + ["command-param-value", "false"], + ["command-param-id", "true:"], + ["command-param-value", "false"] + ]], + ["start-stop-char", "]"] + ]] + ]], + + ["command", [ + ["command-name", "@action1ForTwoLinesWithCommands"] + ]], + ["command", [ + ["command-name", "@action2ForTwoLinesWithCommands"] + ]], + + ["command", [ + ["command-name", "@commandAndGenericTextOnNewLine"] + ]], + ["generic-text", [ + "Massa ut elementum." + ]], + + ["command", [ + ["command-name", "@commandWithParameterAndGenericTextOnNewLine"], + ["command-params", [ + ["command-param-value", "WideParam"] + ]] + ]], + ["generic-text", [ + "Integer" + ]], + + ["generic-text", [ + "Escaped braces inside generic text", + ["escaped-char", "\\{"], + "abu", + ["escaped-char", "\\}"], + "nt @ >ip#s;um< @ ", + ["escaped-char", "\\["], + "sdff j9dj", + ["escaped-char", "\\]"] + ]], + + ["bad-line", "UnclosedExpression{ab{cndum dui dolor tincidu{nt [s[fa]sdf ["], + ["bad-line", "\"Integer: a = {a} malesuada a + b = {a + b}\", Random(a, b) = {Random(a, b)}, Random(\"foo\", \"bar\", \"foobar\") = {Random(\"foo\", \"bar\", \"foobar\")},}"], + "\n#\n>\n@" +] + +---------------------------------------------------- + +Mixed tests of Generic Text, Commands, Inline Commands. From bf115f479947619f806e5cf7c5e31038ed6eb948 Mon Sep 17 00:00:00 2001 From: Daniel 'Eisbehr' Kern Date: Tue, 11 Aug 2020 15:33:48 +0200 Subject: [PATCH 0612/1100] Added support for TypoScript (#2505) --- components.js | 2 +- components.json | 10 +- components/prism-typoscript.js | 80 ++++++++++++++++ components/prism-typoscript.min.js | 1 + examples/prism-typoscript.html | 95 +++++++++++++++++++ plugins/autoloader/prism-autoloader.js | 1 + plugins/autoloader/prism-autoloader.min.js | 2 +- plugins/show-language/prism-show-language.js | 1 + .../show-language/prism-show-language.min.js | 2 +- .../languages/typoscript/comment_feature.test | 23 +++++ .../typoscript/function_feature.test | 15 +++ .../languages/typoscript/keyword_feature.test | 69 ++++++++++++++ .../languages/typoscript/number_feature.test | 15 +++ .../typoscript/tag_string_feature.test | 37 ++++++++ 14 files changed, 349 insertions(+), 4 deletions(-) create mode 100644 components/prism-typoscript.js create mode 100644 components/prism-typoscript.min.js create mode 100644 examples/prism-typoscript.html create mode 100644 tests/languages/typoscript/comment_feature.test create mode 100644 tests/languages/typoscript/function_feature.test create mode 100644 tests/languages/typoscript/keyword_feature.test create mode 100644 tests/languages/typoscript/number_feature.test create mode 100644 tests/languages/typoscript/tag_string_feature.test diff --git a/components.js b/components.js index 722e145d98..37d10ef1ca 100644 --- a/components.js +++ b/components.js @@ -1,2 +1,2 @@ -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml","ssml","atom","rss"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","ssml":"SSML","atom":"Atom","rss":"RSS"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"ABNF","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"agda":{"title":"Agda","owner":"xy-ren"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"eisbehr-"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"BNF","alias":"rbnf","aliasTitles":{"rbnf":"RBNF"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"clojure":{"title":"Clojure","owner":"troglotit"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"cypher":{"title":"Cypher","owner":"RunDevelopment"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dax":{"title":"DAX","owner":"peterbud"},"dhall":{"title":"Dhall","owner":"RunDevelopment"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"EBNF","owner":"RunDevelopment"},"editorconfig":{"title":"EditorConfig","owner":"osipxd"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"c","owner":"Golmote"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","optional":["markdown"],"owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"hlsl":{"title":"HLSL","require":"c","owner":"RunDevelopment"},"http":{"title":"HTTP","optional":["css","javascript","json","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"ignore":{"title":".ignore","owner":"osipxd","alias":["gitignore","hgignore","npmignore"],"aliasTitles":{"gitignore":".gitignore","hgignore":".hgignore","npmignore":".npmignore"}},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike","typescript"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","alias":"webmanifest","aliasTitles":{"webmanifest":"Web App Manifest"},"owner":"CupOfTea696"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"jsstacktrace":{"title":"JS stack trace","owner":"sbrl"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","alias":["kt","kts"],"aliasTitles":{"kts":"Kotlin Script"},"require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"naniscript":{"title":"Naninovel Script","owner":"Elringus","alias":"nani"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"purebasic":{"title":"PureBasic","require":"clike","alias":"pbfasm","owner":"HeX0R101"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"racket":{"title":"Racket","require":"scheme","alias":"rkt","owner":"RunDevelopment"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","modify":["actionscript","coffeescript","flow","javascript","typescript","vala"],"owner":"RunDevelopment"},"renpy":{"title":"Ren'py","alias":"rpy","owner":"HyuchiaDiego"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","owner":"RunDevelopment"},"smali":{"title":"Smali","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"solidity":{"title":"Solidity (Ethereum)","alias":"sol","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","vbnet"],"owner":"RunDevelopment"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":["vb","vba"],"aliasTitles":{"vba":"VBA"},"owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xml-doc":{"title":"XML doc (.net)","require":"markup","modify":["csharp","fsharp","vbnet"],"owner":"RunDevelopment"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"yang":{"title":"YANG","owner":"RunDevelopment"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml","ssml","atom","rss"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","ssml":"SSML","atom":"Atom","rss":"RSS"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"ABNF","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"agda":{"title":"Agda","owner":"xy-ren"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"dkern"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"BNF","alias":"rbnf","aliasTitles":{"rbnf":"RBNF"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"clojure":{"title":"Clojure","owner":"troglotit"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"cypher":{"title":"Cypher","owner":"RunDevelopment"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dax":{"title":"DAX","owner":"peterbud"},"dhall":{"title":"Dhall","owner":"RunDevelopment"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"EBNF","owner":"RunDevelopment"},"editorconfig":{"title":"EditorConfig","owner":"osipxd"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"c","owner":"Golmote"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","optional":["markdown"],"owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"hlsl":{"title":"HLSL","require":"c","owner":"RunDevelopment"},"http":{"title":"HTTP","optional":["css","javascript","json","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"ignore":{"title":".ignore","owner":"osipxd","alias":["gitignore","hgignore","npmignore"],"aliasTitles":{"gitignore":".gitignore","hgignore":".hgignore","npmignore":".npmignore"}},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike","typescript"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","alias":"webmanifest","aliasTitles":{"webmanifest":"Web App Manifest"},"owner":"CupOfTea696"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"jsstacktrace":{"title":"JS stack trace","owner":"sbrl"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","alias":["kt","kts"],"aliasTitles":{"kts":"Kotlin Script"},"require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"naniscript":{"title":"Naninovel Script","owner":"Elringus","alias":"nani"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"purebasic":{"title":"PureBasic","require":"clike","alias":"pbfasm","owner":"HeX0R101"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"racket":{"title":"Racket","require":"scheme","alias":"rkt","owner":"RunDevelopment"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","modify":["actionscript","coffeescript","flow","javascript","typescript","vala"],"owner":"RunDevelopment"},"renpy":{"title":"Ren'py","alias":"rpy","owner":"HyuchiaDiego"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","owner":"RunDevelopment"},"smali":{"title":"Smali","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"solidity":{"title":"Solidity (Ethereum)","alias":"sol","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","vbnet"],"owner":"RunDevelopment"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"typoscript":{"title":"TypoScript","alias":"tsconfig","aliasTitles":{"tsconfig":"TSConfig"},"owner":"dkern"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":["vb","vba"],"aliasTitles":{"vba":"VBA"},"owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xml-doc":{"title":"XML doc (.net)","require":"markup","modify":["csharp","fsharp","vbnet"],"owner":"RunDevelopment"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"yang":{"title":"YANG","owner":"RunDevelopment"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; if (typeof module !== 'undefined' && module.exports) { module.exports = components; } \ No newline at end of file diff --git a/components.json b/components.json index ebfa702a23..24e7e6c029 100644 --- a/components.json +++ b/components.json @@ -126,7 +126,7 @@ "arduino": { "title": "Arduino", "require": "cpp", - "owner": "eisbehr-" + "owner": "dkern" }, "arff": { "title": "ARFF", @@ -1142,6 +1142,14 @@ "alias": "ts", "owner": "vkbansal" }, + "typoscript": { + "title": "TypoScript", + "alias": "tsconfig", + "aliasTitles": { + "tsconfig": "TSConfig" + }, + "owner": "dkern" + }, "unrealscript": { "title": "UnrealScript", "alias": ["uscript", "uc"], diff --git a/components/prism-typoscript.js b/components/prism-typoscript.js new file mode 100644 index 0000000000..16418f4ae1 --- /dev/null +++ b/components/prism-typoscript.js @@ -0,0 +1,80 @@ +(function(Prism) { + + var keywords = /\b(?:ACT|ACTIFSUB|CARRAY|CASE|CLEARGIF|COA|COA_INT|CONSTANTS|CONTENT|CUR|EDITPANEL|EFFECT|EXT|FILE|FLUIDTEMPLATE|FORM|FRAME|FRAMESET|GIFBUILDER|GMENU|GMENU_FOLDOUT|GMENU_LAYERS|GP|HMENU|HRULER|HTML|IENV|IFSUB|IMAGE|IMGMENU|IMGMENUITEM|IMGTEXT|IMG_RESOURCE|INCLUDE_TYPOSCRIPT|JSMENU|JSMENUITEM|LLL|LOAD_REGISTER|NO|PAGE|RECORDS|RESTORE_REGISTER|TEMPLATE|TEXT|TMENU|TMENUITEM|TMENU_LAYERS|USER|USER_INT|_GIFBUILDER|global|globalString|globalVar)\b/; + + Prism.languages.typoscript = { + 'comment': [ + { + // multiline comments /* */ + pattern: /(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/, + lookbehind: true + }, + { + // double-slash comments - ignored when backslashes or colon is found in front + // also ignored whenever directly after an equal-sign, because it would probably be an url without protocol + pattern: /(^|[^\\:= \t]|(?:^|[^= \t])[ \t]+)\/\/.*/, + lookbehind: true, + greedy: true + }, + { + // hash comments - ignored when leading quote is found for hex colors in strings + pattern: /(^|[^"'])#.*/, + lookbehind: true, + greedy: true + } + ], + 'function': [ + { + // old include style + pattern: //, + inside: { + 'string': { + pattern: /"[^"\r\n]*"|'[^'\r\n]*'/, + inside: { + 'keyword': keywords, + }, + }, + 'keyword': { + pattern: /INCLUDE_TYPOSCRIPT/, + }, + }, + }, + { + // new include style + pattern: /@import\s*(?:"[^"\r\n]*"|'[^'\r\n]*')/, + inside: { + 'string': /"[^"\r\n]*"|'[^'\r\n]*'/, + }, + } + ], + 'string': { + pattern: /^([^=]*=[< ]?)(?:(?!]\n).)*/, + lookbehind: true, + inside: { + 'function': /{\$.*}/, // constants include + 'keyword': keywords, + 'number': /^[0-9]+$/, + 'punctuation': /[,|:]/, + } + }, + 'keyword': keywords, + 'number': { + // special highlighting for indexes of arrays in tags + pattern: /[0-9]+\s*[.{=]/, + inside: { + 'operator': /[.{=]/, + } + }, + 'tag': { + pattern: /\.?[\w-\\]+\.?/, + inside: { + 'punctuation': /\./, + } + }, + 'punctuation': /[{}[\];(),.:|]/, + 'operator': /[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/, + }; + + Prism.languages.tsconfig = Prism.languages.typoscript; + +}(Prism)); diff --git a/components/prism-typoscript.min.js b/components/prism-typoscript.min.js new file mode 100644 index 0000000000..45ce3557c7 --- /dev/null +++ b/components/prism-typoscript.min.js @@ -0,0 +1 @@ +!function(E){var n=/\b(?:ACT|ACTIFSUB|CARRAY|CASE|CLEARGIF|COA|COA_INT|CONSTANTS|CONTENT|CUR|EDITPANEL|EFFECT|EXT|FILE|FLUIDTEMPLATE|FORM|FRAME|FRAMESET|GIFBUILDER|GMENU|GMENU_FOLDOUT|GMENU_LAYERS|GP|HMENU|HRULER|HTML|IENV|IFSUB|IMAGE|IMGMENU|IMGMENUITEM|IMGTEXT|IMG_RESOURCE|INCLUDE_TYPOSCRIPT|JSMENU|JSMENUITEM|LLL|LOAD_REGISTER|NO|PAGE|RECORDS|RESTORE_REGISTER|TEMPLATE|TEXT|TMENU|TMENUITEM|TMENU_LAYERS|USER|USER_INT|_GIFBUILDER|global|globalString|globalVar)\b/;E.languages.typoscript={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0},{pattern:/(^|[^\\:= \t]|(?:^|[^= \t])[ \t]+)\/\/.*/,lookbehind:!0,greedy:!0},{pattern:/(^|[^"'])#.*/,lookbehind:!0,greedy:!0}],function:[{pattern://,inside:{string:{pattern:/"[^"\r\n]*"|'[^'\r\n]*'/,inside:{keyword:n}},keyword:{pattern:/INCLUDE_TYPOSCRIPT/}}},{pattern:/@import\s*(?:"[^"\r\n]*"|'[^'\r\n]*')/,inside:{string:/"[^"\r\n]*"|'[^'\r\n]*'/}}],string:{pattern:/^([^=]*=[< ]?)(?:(?!]\n).)*/,lookbehind:!0,inside:{function:/{\$.*}/,keyword:n,number:/^[0-9]+$/,punctuation:/[,|:]/}},keyword:n,number:{pattern:/[0-9]+\s*[.{=]/,inside:{operator:/[.{=]/}},tag:{pattern:/\.?[\w-\\]+\.?/,inside:{punctuation:/\./}},punctuation:/[{}[\];(),.:|]/,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/},E.languages.tsconfig=E.languages.typoscript}(Prism); \ No newline at end of file diff --git a/examples/prism-typoscript.html b/examples/prism-typoscript.html new file mode 100644 index 0000000000..2ebcc1373f --- /dev/null +++ b/examples/prism-typoscript.html @@ -0,0 +1,95 @@ +

        Typical TypoScript Setup File

        +
        # import other files
        +@import 'EXT:fluid_styled_content/Configuration/TypoScript/setup.typoscript'
        +@import 'EXT:sitepackage/Configuration/TypoScript/Helper/DynamicContent.typoscript'
        +
        +page = PAGE
        +page {
        +	typeNum = 0
        +
        +	// setup templates
        +	10 = FLUIDTEMPLATE
        +	10 {
        +		templateName = TEXT
        +		templateName.stdWrap.cObject = CASE
        +		templateName.stdWrap.cObject {
        +			key.data = pagelayout
        +
        +			pagets__sitepackage_default = TEXT
        +			pagets__sitepackage_default.value = Default
        +
        +			pagets__sitepackage_alternate = TEXT
        +			pagets__sitepackage_alternate.value = Alternative
        +
        +			default = TEXT
        +			default.value = Default
        +		}
        +		
        +		templateRootPaths {
        +			0 = EXT:sitepackage/Resources/Private/Templates/Page/
        +			1 = {$sitepackage.fluidtemplate.templateRootPath}
        +		}
        +		
        +		partialRootPaths {
        +			0 = EXT:sitepackage/Resources/Private/Partials/Page/
        +			1 = {$sitepackage.fluidtemplate.partialRootPath}
        +		}
        +		
        +		layoutRootPaths {
        +			0 = EXT:sitepackage/Resources/Private/Layouts/Page/
        +			1 = {$sitepackage.fluidtemplate.layoutRootPath}
        +		}
        +
        +		dataProcessing {
        +			10 = TYPO3\CMS\Frontend\DataProcessing\MenuProcessor
        +			10 {
        +				levels = 1
        +				includeSpacer = 1
        +				as = mainnavigation
        +			}
        +		}
        +	}
        +
        +	// include css into head
        +	includeCSS {
        +		bootstrap = https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css
        +		bootstrap.external = 1
        +		website = EXT:sitepackage/Resources/Public/Css/styles.css
        +	}
        +
        +	// include js into footer
        +	includeJSFooter {
        +		jquery = https://code.jquery.com/jquery-3.2.1.slim.min.js
        +		jquery.external = 1
        +		bootstrap = https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js
        +		bootstrap.external = 1
        +		website = EXT:sitepackage/Resources/Public/JavaScript/scripts.js
        +	}
        +}
        +
        +// global site configuration
        +config {
        +	absRefPrefix = auto
        +	cache_period = 86400
        +	debug = 0
        +	disablePrefixComment = 1
        +	doctype = html5
        +	extTarget =
        +	index_enable = 1
        +	index_externals = 1
        +	index_metatags = 1
        +	inlineStyle2TempFile = 1
        +	intTarget =
        +	linkVars = L
        +	metaCharset = utf-8
        +	no_cache = 0
        +	pageTitleFirst = 1
        +	prefixLocalAnchors = all
        +	removeDefaultJS = 0
        +	sendCacheHeaders = 1
        +	compressCss = 0
        +	compressJs = 0
        +	concatenateCss = 0
        +	concatenateJs = 0
        +}
        +
        diff --git a/plugins/autoloader/prism-autoloader.js b/plugins/autoloader/prism-autoloader.js index 28636029c5..c1c95c3bbe 100644 --- a/plugins/autoloader/prism-autoloader.js +++ b/plugins/autoloader/prism-autoloader.js @@ -206,6 +206,7 @@ "t4": "t4-cs", "trig": "turtle", "ts": "typescript", + "tsconfig": "typoscript", "uscript": "unrealscript", "uc": "unrealscript", "vb": "visual-basic", diff --git a/plugins/autoloader/prism-autoloader.min.js b/plugins/autoloader/prism-autoloader.min.js index 3b1029ffe0..8a716d8aa6 100644 --- a/plugins/autoloader/prism-autoloader.min.js +++ b/plugins/autoloader/prism-autoloader.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof self&&self.Prism&&self.document&&document.createElement){var n={javascript:"clike",actionscript:"javascript",arduino:"cpp",aspnet:["markup","csharp"],bison:"c",c:"clike",csharp:"clike",cpp:"c",coffeescript:"javascript",crystal:"ruby","css-extras":"css",d:"clike",dart:"clike",django:"markup-templating",ejs:["javascript","markup-templating"],etlua:["lua","markup-templating"],erb:["ruby","markup-templating"],fsharp:"clike","firestore-security-rules":"clike",flow:"javascript",ftl:"markup-templating",gml:"clike",glsl:"c",go:"clike",groovy:"clike",haml:"ruby",handlebars:"markup-templating",haxe:"clike",hlsl:"c",java:"clike",javadoc:["markup","java","javadoclike"],jolie:"clike",jsdoc:["javascript","javadoclike","typescript"],"js-extras":"javascript",json5:"json",jsonp:"json","js-templates":"javascript",kotlin:"clike",latte:["clike","markup-templating","php"],less:"css",lilypond:"scheme",markdown:"markup","markup-templating":"markup",n4js:"javascript",nginx:"clike",objectivec:"c",opencl:"c",parser:"markup",php:["clike","markup-templating"],phpdoc:["php","javadoclike"],"php-extras":"php",plsql:"sql",processing:"clike",protobuf:"clike",pug:["markup","javascript"],purebasic:"clike",qml:"javascript",qore:"clike",racket:"scheme",jsx:["markup","javascript"],tsx:["jsx","typescript"],reason:"clike",ruby:"clike",sass:"css",scss:"css",scala:"java","shell-session":"bash",smarty:"markup-templating",solidity:"clike",soy:"markup-templating",sparql:"turtle",sqf:"clike",swift:"clike","t4-cs":["t4-templating","csharp"],"t4-vb":["t4-templating","vbnet"],tap:"yaml",tt2:["clike","markup-templating"],textile:"markup",twig:"markup",typescript:"javascript",vala:"clike",vbnet:"basic",velocity:"markup",wiki:"markup",xeora:"markup","xml-doc":"markup",xquery:"markup"},l={html:"markup",xml:"markup",svg:"markup",mathml:"markup",ssml:"markup",atom:"markup",rss:"markup",js:"javascript",g4:"antlr4",adoc:"asciidoc",shell:"bash",shortcode:"bbcode",rbnf:"bnf",cs:"csharp",dotnet:"csharp",coffee:"coffeescript",conc:"concurnas",jinja2:"django","dns-zone":"dns-zone-file",dockerfile:"docker",eta:"ejs",xlsx:"excel-formula",xls:"excel-formula",gamemakerlanguage:"gml",hs:"haskell",gitignore:"ignore",hgignore:"ignore",npmignore:"ignore",webmanifest:"json",kt:"kotlin",kts:"kotlin",tex:"latex",context:"latex",ly:"lilypond",emacs:"lisp",elisp:"lisp","emacs-lisp":"lisp",md:"markdown",moon:"moonscript",n4jsd:"n4js",nani:"naniscript",objc:"objectivec",objectpascal:"pascal",px:"pcaxis",pcode:"peoplecode",pq:"powerquery",mscript:"powerquery",pbfasm:"purebasic",py:"python",rkt:"racket",rpy:"renpy",robot:"robotframework",rb:"ruby",sol:"solidity",sln:"solution-file",rq:"sparql",t4:"t4-cs",trig:"turtle",ts:"typescript",uscript:"unrealscript",uc:"unrealscript",vb:"visual-basic",vba:"visual-basic",xeoracube:"xeora",yml:"yaml"},p={},e="components/",a=Prism.util.currentScript();if(a){var r=/\bplugins\/autoloader\/prism-autoloader\.(?:min\.)js(?:\?[^\r\n/]*)?$/i,t=/(^|\/)[\w-]+\.(?:min\.)js(?:\?[^\r\n/]*)?$/i,i=a.getAttribute("data-autoloader-path");if(null!=i)e=i.trim().replace(/\/?$/,"/");else{var s=a.src;r.test(s)?e=s.replace(r,"components/"):t.test(s)&&(e=s.replace(t,"$1components/"))}}var o=Prism.plugins.autoloader={languages_path:e,use_minified:!0,loadLanguages:m};Prism.hooks.add("complete",function(e){var a=e.element,r=e.language;if(a&&r&&"none"!==r){var t=function(e){var a=(e.getAttribute("data-dependencies")||"").trim();if(!a){var r=e.parentElement;r&&"pre"===r.tagName.toLowerCase()&&(a=(r.getAttribute("data-dependencies")||"").trim())}return a?a.split(/\s*,\s*/g):[]}(a);t.push(r),t.every(u)||m(t,function(){Prism.highlightElement(a)})}})}function u(e){if(0<=e.indexOf("!"))return!1;if((e=l[e]||e)in Prism.languages)return!0;var a=p[e];return a&&!a.error&&!1===a.loading}function m(e,a,r){"string"==typeof e&&(e=[e]);var t=e.length,i=0,s=!1;function c(){s||++i===t&&a&&a(e)}0!==t?e.forEach(function(e){!function(a,r,t){var i=0<=a.indexOf("!");function e(){var e=p[a];e||(e=p[a]={callbacks:[]}),e.callbacks.push({success:r,error:t}),!i&&u(a)?k(a,"success"):!i&&e.error?k(a,"error"):!i&&e.loading||(e.loading=!0,e.error=!1,function(e,a,r){var t=document.createElement("script");t.src=e,t.async=!0,t.onload=function(){document.body.removeChild(t),a&&a()},t.onerror=function(){document.body.removeChild(t),r&&r()},document.body.appendChild(t)}(function(e){return o.languages_path+"prism-"+e+(o.use_minified?".min":"")+".js"}(a),function(){e.loading=!1,k(a,"success")},function(){e.loading=!1,e.error=!0,k(a,"error")}))}a=a.replace("!",""),a=l[a]||a;var s=n[a];s&&s.length?m(s,e,t):e()}(e,c,function(){s||(s=!0,r&&r(e))})}):a&&setTimeout(a,0)}function k(e,a){if(p[e]){for(var r=p[e].callbacks,t=0,i=r.length;t + +---------------------------------------------------- + +[ + ["function", ["@import ", ["string", "'foo'"]]], + ["function", ["@import ", ["string", "\"bar\""]]], + ["function", ["<", ["keyword", "INCLUDE_TYPOSCRIPT"], ": source=", ["string", ["\"", ["keyword", "FILE"], ":", ["keyword", "EXT"], ":baz.typoscript\""]], ">"]] +] + +---------------------------------------------------- + +Checks for import functions. diff --git a/tests/languages/typoscript/keyword_feature.test b/tests/languages/typoscript/keyword_feature.test new file mode 100644 index 0000000000..c1bb30be2a --- /dev/null +++ b/tests/languages/typoscript/keyword_feature.test @@ -0,0 +1,69 @@ +TEXT LLL EXT _GIFBUILDER CARRAY CASE CLEARGIF COA COA_INT CONSTANTS CONTENT +EDITPANEL EFFECT FILE FORM FRAME FRAMESET FLUIDTEMPLATE GIFBUILDER +global globalString globalVar GMENU GMENU_FOLDOUT GMENU_LAYERS GP +HMENU HRULER HTML IENV IMAGE IMG_RESOURCE IMGMENU IMGMENUITEM IMGTEXT +JSMENU JSMENUITEM LOAD_REGISTER PAGE RECORDS RESTORE_REGISTER TEMPLATE +TMENU TMENU_LAYERS TMENUITEM USER USER_INT INCLUDE_TYPOSCRIPT NO ACT +IFSUB ACTIFSUB CUR + +---------------------------------------------------- + +[ + ["keyword", "TEXT"], + ["keyword", "LLL"], + ["keyword", "EXT"], + ["keyword", "_GIFBUILDER"], + ["keyword", "CARRAY"], + ["keyword", "CASE"], + ["keyword", "CLEARGIF"], + ["keyword", "COA"], + ["keyword", "COA_INT"], + ["keyword", "CONSTANTS"], + ["keyword", "CONTENT"], + ["keyword", "EDITPANEL"], + ["keyword", "EFFECT"], + ["keyword", "FILE"], + ["keyword", "FORM"], + ["keyword", "FRAME"], + ["keyword", "FRAMESET"], + ["keyword", "FLUIDTEMPLATE"], + ["keyword", "GIFBUILDER"], + ["keyword", "global"], + ["keyword", "globalString"], + ["keyword", "globalVar"], + ["keyword", "GMENU"], + ["keyword", "GMENU_FOLDOUT"], + ["keyword", "GMENU_LAYERS"], + ["keyword", "GP"], + ["keyword", "HMENU"], + ["keyword", "HRULER"], + ["keyword", "HTML"], + ["keyword", "IENV"], + ["keyword", "IMAGE"], + ["keyword", "IMG_RESOURCE"], + ["keyword", "IMGMENU"], + ["keyword", "IMGMENUITEM"], + ["keyword", "IMGTEXT"], + ["keyword", "JSMENU"], + ["keyword", "JSMENUITEM"], + ["keyword", "LOAD_REGISTER"], + ["keyword", "PAGE"], + ["keyword", "RECORDS"], + ["keyword", "RESTORE_REGISTER"], + ["keyword", "TEMPLATE"], + ["keyword", "TMENU"], + ["keyword", "TMENU_LAYERS"], + ["keyword", "TMENUITEM"], + ["keyword", "USER"], + ["keyword", "USER_INT"], + ["keyword", "INCLUDE_TYPOSCRIPT"], + ["keyword", "NO"], + ["keyword", "ACT"], + ["keyword", "IFSUB"], + ["keyword", "ACTIFSUB"], + ["keyword", "CUR"] +] + +---------------------------------------------------- + +Checks for all keywords. diff --git a/tests/languages/typoscript/number_feature.test b/tests/languages/typoscript/number_feature.test new file mode 100644 index 0000000000..4b2c30f26a --- /dev/null +++ b/tests/languages/typoscript/number_feature.test @@ -0,0 +1,15 @@ +foo = 423 +bar=1 +baz.10 = + +---------------------------------------------------- + +[ + ["tag", ["foo"]], ["operator", "="], ["string", [["number", "423"]]], + ["tag", ["bar"]], ["operator", "="], ["string", [["number", "1"]]], + ["tag", ["baz", ["punctuation", "."]]],["number", ["10 ", ["operator", "="]]], ["string", []] +] + +---------------------------------------------------- + +Checks for import functions. diff --git a/tests/languages/typoscript/tag_string_feature.test b/tests/languages/typoscript/tag_string_feature.test new file mode 100644 index 0000000000..17b1eec10e --- /dev/null +++ b/tests/languages/typoscript/tag_string_feature.test @@ -0,0 +1,37 @@ +foo.bar.baz = HMENU +foo.bar.baz { + baz.foo = bar + bar = {$const.foo} + foo = LLL:EXT:str + IFSUB < .NO + IFSUB = 1 + IFSUB { + foo = bar + } +} +Namespace\Classes\Test { + baz.foo = bar +} + +---------------------------------------------------- + +[ + ["tag", ["foo",["punctuation", "."]]], ["tag", ["bar", ["punctuation", "."]]],["tag", ["baz"]], ["operator", "="], ["string", [["keyword", "HMENU"]]], + ["tag", ["foo", ["punctuation", "."]]], ["tag", ["bar", ["punctuation", "."]]], ["tag", ["baz"]], ["punctuation", "{"], + ["tag", ["baz", ["punctuation", "."]]], ["tag", ["foo"]], ["operator", "="], ["string", ["bar"]], + ["tag", ["bar"]], ["operator", "="], ["string", [["function", "{$const.foo}"]]], + ["tag", ["foo"]],["operator", "="], ["string", [["keyword", "LLL"], ["punctuation", ":"], ["keyword", "EXT"], ["punctuation", ":"], "str"]], + ["keyword", "IFSUB"], ["operator", "<"], ["punctuation", "."],["keyword", "NO"], + ["keyword", "IFSUB"], ["operator", "="], ["string", [["number", "1"]]], + ["keyword", "IFSUB"], ["punctuation", "{"], + ["tag", ["foo"]], ["operator", "="], ["string", ["bar"]], + ["punctuation", "}"], + ["punctuation", "}"], + ["tag", ["Namespace\\Classes\\Test"]], ["punctuation", "{"], + ["tag", ["baz", ["punctuation", "."]]], ["tag", ["foo"]], ["operator", "="], ["string", ["bar"]], + ["punctuation", "}"] +] + +---------------------------------------------------- + +Checks for tags and string. From 2da2beba24b459cec461a91368ce902b7e276a46 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Wed, 12 Aug 2020 13:10:38 +0200 Subject: [PATCH 0613/1100] Added support for Stan (#2490) --- components.js | 2 +- components.json | 4 + components/prism-stan.js | 49 +++++ components/prism-stan.min.js | 1 + examples/prism-stan.html | 21 +++ tests/languages/stan/comment_feature.test | 17 ++ tests/languages/stan/constraint_feature.test | 176 ++++++++++++++++++ tests/languages/stan/directive_feature.test | 14 ++ tests/languages/stan/keyword_feature.test | 89 +++++++++ tests/languages/stan/number_feature.test | 29 +++ tests/languages/stan/operator_feature.test | 52 ++++++ tests/languages/stan/punctuation_feature.test | 19 ++ tests/languages/stan/string_feature.test | 40 ++++ 13 files changed, 512 insertions(+), 1 deletion(-) create mode 100644 components/prism-stan.js create mode 100644 components/prism-stan.min.js create mode 100644 examples/prism-stan.html create mode 100644 tests/languages/stan/comment_feature.test create mode 100644 tests/languages/stan/constraint_feature.test create mode 100644 tests/languages/stan/directive_feature.test create mode 100644 tests/languages/stan/keyword_feature.test create mode 100644 tests/languages/stan/number_feature.test create mode 100644 tests/languages/stan/operator_feature.test create mode 100644 tests/languages/stan/punctuation_feature.test create mode 100644 tests/languages/stan/string_feature.test diff --git a/components.js b/components.js index 37d10ef1ca..1be7edb15b 100644 --- a/components.js +++ b/components.js @@ -1,2 +1,2 @@ -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml","ssml","atom","rss"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","ssml":"SSML","atom":"Atom","rss":"RSS"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"ABNF","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"agda":{"title":"Agda","owner":"xy-ren"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"dkern"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"BNF","alias":"rbnf","aliasTitles":{"rbnf":"RBNF"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"clojure":{"title":"Clojure","owner":"troglotit"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"cypher":{"title":"Cypher","owner":"RunDevelopment"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dax":{"title":"DAX","owner":"peterbud"},"dhall":{"title":"Dhall","owner":"RunDevelopment"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"EBNF","owner":"RunDevelopment"},"editorconfig":{"title":"EditorConfig","owner":"osipxd"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"c","owner":"Golmote"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","optional":["markdown"],"owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"hlsl":{"title":"HLSL","require":"c","owner":"RunDevelopment"},"http":{"title":"HTTP","optional":["css","javascript","json","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"ignore":{"title":".ignore","owner":"osipxd","alias":["gitignore","hgignore","npmignore"],"aliasTitles":{"gitignore":".gitignore","hgignore":".hgignore","npmignore":".npmignore"}},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike","typescript"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","alias":"webmanifest","aliasTitles":{"webmanifest":"Web App Manifest"},"owner":"CupOfTea696"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"jsstacktrace":{"title":"JS stack trace","owner":"sbrl"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","alias":["kt","kts"],"aliasTitles":{"kts":"Kotlin Script"},"require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"naniscript":{"title":"Naninovel Script","owner":"Elringus","alias":"nani"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"purebasic":{"title":"PureBasic","require":"clike","alias":"pbfasm","owner":"HeX0R101"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"racket":{"title":"Racket","require":"scheme","alias":"rkt","owner":"RunDevelopment"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","modify":["actionscript","coffeescript","flow","javascript","typescript","vala"],"owner":"RunDevelopment"},"renpy":{"title":"Ren'py","alias":"rpy","owner":"HyuchiaDiego"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","owner":"RunDevelopment"},"smali":{"title":"Smali","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"solidity":{"title":"Solidity (Ethereum)","alias":"sol","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","vbnet"],"owner":"RunDevelopment"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"typoscript":{"title":"TypoScript","alias":"tsconfig","aliasTitles":{"tsconfig":"TSConfig"},"owner":"dkern"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":["vb","vba"],"aliasTitles":{"vba":"VBA"},"owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xml-doc":{"title":"XML doc (.net)","require":"markup","modify":["csharp","fsharp","vbnet"],"owner":"RunDevelopment"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"yang":{"title":"YANG","owner":"RunDevelopment"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml","ssml","atom","rss"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","ssml":"SSML","atom":"Atom","rss":"RSS"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"ABNF","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"agda":{"title":"Agda","owner":"xy-ren"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"dkern"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"BNF","alias":"rbnf","aliasTitles":{"rbnf":"RBNF"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"clojure":{"title":"Clojure","owner":"troglotit"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"cypher":{"title":"Cypher","owner":"RunDevelopment"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dax":{"title":"DAX","owner":"peterbud"},"dhall":{"title":"Dhall","owner":"RunDevelopment"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"EBNF","owner":"RunDevelopment"},"editorconfig":{"title":"EditorConfig","owner":"osipxd"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"c","owner":"Golmote"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","optional":["markdown"],"owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"hlsl":{"title":"HLSL","require":"c","owner":"RunDevelopment"},"http":{"title":"HTTP","optional":["css","javascript","json","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"ignore":{"title":".ignore","owner":"osipxd","alias":["gitignore","hgignore","npmignore"],"aliasTitles":{"gitignore":".gitignore","hgignore":".hgignore","npmignore":".npmignore"}},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike","typescript"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","alias":"webmanifest","aliasTitles":{"webmanifest":"Web App Manifest"},"owner":"CupOfTea696"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"jsstacktrace":{"title":"JS stack trace","owner":"sbrl"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","alias":["kt","kts"],"aliasTitles":{"kts":"Kotlin Script"},"require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"naniscript":{"title":"Naninovel Script","owner":"Elringus","alias":"nani"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"purebasic":{"title":"PureBasic","require":"clike","alias":"pbfasm","owner":"HeX0R101"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"racket":{"title":"Racket","require":"scheme","alias":"rkt","owner":"RunDevelopment"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","modify":["actionscript","coffeescript","flow","javascript","typescript","vala"],"owner":"RunDevelopment"},"renpy":{"title":"Ren'py","alias":"rpy","owner":"HyuchiaDiego"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","owner":"RunDevelopment"},"smali":{"title":"Smali","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"solidity":{"title":"Solidity (Ethereum)","alias":"sol","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"stan":{"title":"Stan","owner":"RunDevelopment"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","vbnet"],"owner":"RunDevelopment"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"typoscript":{"title":"TypoScript","alias":"tsconfig","aliasTitles":{"tsconfig":"TSConfig"},"owner":"dkern"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":["vb","vba"],"aliasTitles":{"vba":"VBA"},"owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xml-doc":{"title":"XML doc (.net)","require":"markup","modify":["csharp","fsharp","vbnet"],"owner":"RunDevelopment"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"yang":{"title":"YANG","owner":"RunDevelopment"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; if (typeof module !== 'undefined' && module.exports) { module.exports = components; } \ No newline at end of file diff --git a/components.json b/components.json index 24e7e6c029..2453edc3e4 100644 --- a/components.json +++ b/components.json @@ -1070,6 +1070,10 @@ "title": "SQL", "owner": "multipetros" }, + "stan": { + "title": "Stan", + "owner": "RunDevelopment" + }, "iecst": { "title": "Structured Text (IEC 61131-3)", "owner": "serhioromano" diff --git a/components/prism-stan.js b/components/prism-stan.js new file mode 100644 index 0000000000..3c6339b390 --- /dev/null +++ b/components/prism-stan.js @@ -0,0 +1,49 @@ +// https://mc-stan.org/docs/2_24/reference-manual/bnf-grammars.html + +Prism.languages.stan = { + 'comment': /\/\/.*|\/\*[\s\S]*?\*\/|#(?!include).*/, + 'string': { + // String literals can contain spaces and any printable ASCII characters except for " and \ + // https://mc-stan.org/docs/2_24/reference-manual/print-statements-section.html#string-literals + pattern: /"[\x20\x21\x23-\x5B\x5D-\x7E]*"/, + greedy: true + }, + 'directive': { + pattern: /^([ \t]*)#include\b.*/m, + lookbehind: true, + alias: 'property' + }, + + 'function-arg': { + pattern: /(\b(?:algebra_solver|integrate_1d|integrate_ode|integrate_ode_bdf|integrate_ode_rk45|map_rect)\s*\(\s*)[a-zA-Z]\w*/, + lookbehind: true, + alias: 'function' + }, + 'constraint': { + pattern: /(\b(?:int|matrix|real|row_vector|vector)\s*)<[^<>]*>/, + lookbehind: true, + inside: { + 'expression': { + pattern: /(=\s*)(?:(?!\s*(?:>$|,\s*\w+\s*=))[\s\S])+/, + lookbehind: true, + inside: null // see below + }, + 'property': /\b[a-z]\w*(?=\s*=)/i, + 'operator': /=/, + 'punctuation': /^<|>$|[,]/ + } + }, + 'keyword': [ + /\b(?:break|cholesky_factor_corr|cholesky_factor_cov|continue|corr_matrix|cov_matrix|data|else|for|functions|generated|if|in|increment_log_prob|int|matrix|model|ordered|parameters|positive_ordered|print|quantities|real|reject|return|row_vector|simplex|target|transformed|unit_vector|vector|void|while)\b/, + // these are functions that are known to take another function as their first argument. + /\b(?:algebra_solver|integrate_1d|integrate_ode|integrate_ode_bdf|integrate_ode_rk45|map_rect)\b/ + ], + 'function': /\b[a-z]\w*(?=\s*\()/i, + 'number': /(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:E[+-]?\d+)?\b/i, + 'boolean': /\b(?:false|true)\b/, + + 'operator': /<-|\.[*/]=?|\|\|?|&&|[!=<>+\-*/]=?|['^%~?:]/, + 'punctuation': /[()\[\]{},;]/ +}; + +Prism.languages.stan.constraint.inside.expression.inside = Prism.languages.stan; diff --git a/components/prism-stan.min.js b/components/prism-stan.min.js new file mode 100644 index 0000000000..5acd72cb02 --- /dev/null +++ b/components/prism-stan.min.js @@ -0,0 +1 @@ +Prism.languages.stan={comment:/\/\/.*|\/\*[\s\S]*?\*\/|#(?!include).*/,string:{pattern:/"[\x20\x21\x23-\x5B\x5D-\x7E]*"/,greedy:!0},directive:{pattern:/^([ \t]*)#include\b.*/m,lookbehind:!0,alias:"property"},"function-arg":{pattern:/(\b(?:algebra_solver|integrate_1d|integrate_ode|integrate_ode_bdf|integrate_ode_rk45|map_rect)\s*\(\s*)[a-zA-Z]\w*/,lookbehind:!0,alias:"function"},constraint:{pattern:/(\b(?:int|matrix|real|row_vector|vector)\s*)<[^<>]*>/,lookbehind:!0,inside:{expression:{pattern:/(=\s*)(?:(?!\s*(?:>$|,\s*\w+\s*=))[\s\S])+/,lookbehind:!0,inside:null},property:/\b[a-z]\w*(?=\s*=)/i,operator:/=/,punctuation:/^<|>$|[,]/}},keyword:[/\b(?:break|cholesky_factor_corr|cholesky_factor_cov|continue|corr_matrix|cov_matrix|data|else|for|functions|generated|if|in|increment_log_prob|int|matrix|model|ordered|parameters|positive_ordered|print|quantities|real|reject|return|row_vector|simplex|target|transformed|unit_vector|vector|void|while)\b/,/\b(?:algebra_solver|integrate_1d|integrate_ode|integrate_ode_bdf|integrate_ode_rk45|map_rect)\b/],function:/\b[a-z]\w*(?=\s*\()/i,number:/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:E[+-]?\d+)?\b/i,boolean:/\b(?:false|true)\b/,operator:/<-|\.[*/]=?|\|\|?|&&|[!=<>+\-*/]=?|['^%~?:]/,punctuation:/[()\[\]{},;]/},Prism.languages.stan.constraint.inside.expression.inside=Prism.languages.stan; \ No newline at end of file diff --git a/examples/prism-stan.html b/examples/prism-stan.html new file mode 100644 index 0000000000..6d7b0ff937 --- /dev/null +++ b/examples/prism-stan.html @@ -0,0 +1,21 @@ +

        Full example

        +
        // source: https://github.com/stan-dev/example-models/blob/8a6964135560f54f52695ccd4d2492a8067f0c30/misc/linear-regression/regression_std.stan
        +
        +// normal mixture, unknown proportion and means, known variance
        +// p(y|mu,theta) = theta * Normal(y|mu[1],1) + (1-theta) * Normal(y|mu[2],1);
        +
        +data {
        +  int<lower=0>  N;
        +  real y[N];
        +}
        +parameters {
        +  real<lower=0,upper=1> theta;
        +  real mu[2];
        +}
        +model {
        +  theta ~ uniform(0,1); // equivalently, ~ beta(1,1);
        +  for (k in 1:2)
        +    mu[k] ~ normal(0,10);
        +  for (n in 1:N)
        +    target += log_mix(theta, normal_lpdf(y[n]|mu[1],1.0), normal_lpdf(y[n]|mu[2],1.0));
        +}
        diff --git a/tests/languages/stan/comment_feature.test b/tests/languages/stan/comment_feature.test new file mode 100644 index 0000000000..eaad573ddd --- /dev/null +++ b/tests/languages/stan/comment_feature.test @@ -0,0 +1,17 @@ +# comment +// comment +/* +comment +*/ + +---------------------------------------------------- + +[ + ["comment", "# comment"], + ["comment", "// comment"], + ["comment", "/*\ncomment\n*/"] +] + +---------------------------------------------------- + +Checks for comments. diff --git a/tests/languages/stan/constraint_feature.test b/tests/languages/stan/constraint_feature.test new file mode 100644 index 0000000000..7d75b436a3 --- /dev/null +++ b/tests/languages/stan/constraint_feature.test @@ -0,0 +1,176 @@ +real b; + +real theta; + +int T; + +matrix[3, 4] B; + +row_vector[10] u; + +row_vector[3] u; + +real phi; + +real x; + +---------------------------------------------------- + +[ + ["keyword", "real"], + ["constraint", [ + ["punctuation", "<"], + ["property", "lower"], + ["operator", "="], + ["expression", [ + "a" + ]], + ["punctuation", ">"] + ]], + " b", + ["punctuation", ";"], + + ["keyword", "real"], + ["constraint", [ + ["punctuation", "<"], + ["property", "lower"], + ["operator", "="], + ["expression", [ + "a" + ]], + ["punctuation", ","], + ["property", "upper"], + ["operator", "="], + ["expression", [ + "b" + ]], + ["punctuation", ">"] + ]], + " theta", + ["punctuation", ";"], + + ["keyword", "int"], + ["constraint", [ + ["punctuation", "<"], + ["property", "lower"], + ["operator", "="], + ["expression", [ + ["number", "1"] + ]], + ["punctuation", ">"] + ]], + " T", + ["punctuation", ";"], + + ["keyword", "matrix"], + ["constraint", [ + ["punctuation", "<"], + ["property", "multiplier"], + ["operator", "="], + ["expression", [ + ["number", "5"] + ]], + ["punctuation", ">"] + ]], + ["punctuation", "["], + ["number", "3"], + ["punctuation", ","], + ["number", "4"], + ["punctuation", "]"], + " B", + ["punctuation", ";"], + + ["keyword", "row_vector"], + ["constraint", [ + ["punctuation", "<"], + ["property", "lower"], + ["operator", "="], + ["expression", [ + ["operator", "-"], + ["number", "1"] + ]], + ["punctuation", ","], + ["property", "upper"], + ["operator", "="], + ["expression", [ + ["number", "1"] + ]], + ["punctuation", ">"] + ]], + ["punctuation", "["], + ["number", "10"], + ["punctuation", "]"], + " u", + ["punctuation", ";"], + + ["keyword", "row_vector"], + ["constraint", [ + ["punctuation", "<"], + ["property", "offset"], + ["operator", "="], + ["expression", [ + ["operator", "-"], + ["number", "42"] + ]], + ["punctuation", ","], + ["property", "multiplier"], + ["operator", "="], + ["expression", [ + ["number", "3"] + ]], + ["punctuation", ">"] + ]], + ["punctuation", "["], + ["number", "3"], + ["punctuation", "]"], + " u", + ["punctuation", ";"], + + ["keyword", "real"], + ["constraint", [ + ["punctuation", "<"], + ["property", "lower"], + ["operator", "="], + ["expression", [ + ["function", "min"], + ["punctuation", "("], + "y", + ["punctuation", ")"] + ]], + ["punctuation", ","], + ["property", "upper"], + ["operator", "="], + ["expression", [ + ["function", "max"], + ["punctuation", "("], + "y", + ["punctuation", ")"] + ]], + ["punctuation", ">"] + ]], + " phi", + ["punctuation", ";"], + + ["keyword", "real"], + ["constraint", [ + ["punctuation", "<"], + ["property", "offset"], + ["operator", "="], + ["expression", [ + "mu" + ]], + ["punctuation", ","], + ["property", "multiplier"], + ["operator", "="], + ["expression", [ + "sigma" + ]], + ["punctuation", ">"] + ]], + " x", + ["punctuation", ";"] +] + +---------------------------------------------------- + +Checks for type constraints. diff --git a/tests/languages/stan/directive_feature.test b/tests/languages/stan/directive_feature.test new file mode 100644 index 0000000000..0ee5391069 --- /dev/null +++ b/tests/languages/stan/directive_feature.test @@ -0,0 +1,14 @@ +#include my-std-normal.stan // definition of standard normal + #include my-std-normal.stan + +---------------------------------------------------- + +[ + ["directive", "#include my-std-normal.stan "], + ["comment", "// definition of standard normal"], + ["directive", "#include my-std-normal.stan"] +] + +---------------------------------------------------- + +Checks for include directives. diff --git a/tests/languages/stan/keyword_feature.test b/tests/languages/stan/keyword_feature.test new file mode 100644 index 0000000000..fb1613ab10 --- /dev/null +++ b/tests/languages/stan/keyword_feature.test @@ -0,0 +1,89 @@ +break +cholesky_factor_corr +cholesky_factor_cov +continue +corr_matrix +cov_matrix +data +else +for +functions +generated +if +in +increment_log_prob +int +matrix +model +ordered +parameters +positive_ordered +print +quantities +real +reject +return +row_vector +simplex +target +transformed +unit_vector +vector +void +while + +algebra_solver +integrate_1d +integrate_ode +integrate_ode_bdf +integrate_ode_rk45 +map_rect + +---------------------------------------------------- + +[ + ["keyword", "break"], + ["keyword", "cholesky_factor_corr"], + ["keyword", "cholesky_factor_cov"], + ["keyword", "continue"], + ["keyword", "corr_matrix"], + ["keyword", "cov_matrix"], + ["keyword", "data"], + ["keyword", "else"], + ["keyword", "for"], + ["keyword", "functions"], + ["keyword", "generated"], + ["keyword", "if"], + ["keyword", "in"], + ["keyword", "increment_log_prob"], + ["keyword", "int"], + ["keyword", "matrix"], + ["keyword", "model"], + ["keyword", "ordered"], + ["keyword", "parameters"], + ["keyword", "positive_ordered"], + ["keyword", "print"], + ["keyword", "quantities"], + ["keyword", "real"], + ["keyword", "reject"], + ["keyword", "return"], + ["keyword", "row_vector"], + ["keyword", "simplex"], + ["keyword", "target"], + ["keyword", "transformed"], + ["keyword", "unit_vector"], + ["keyword", "vector"], + ["keyword", "void"], + ["keyword", "while"], + + ["keyword", "algebra_solver"], + ["keyword", "integrate_1d"], + ["keyword", "integrate_ode"], + ["keyword", "integrate_ode_bdf"], + ["keyword", "integrate_ode_rk45"], + ["keyword", "map_rect"] +] + +---------------------------------------------------- + +Checks for keywords. diff --git a/tests/languages/stan/number_feature.test b/tests/languages/stan/number_feature.test new file mode 100644 index 0000000000..0d70a28a41 --- /dev/null +++ b/tests/languages/stan/number_feature.test @@ -0,0 +1,29 @@ +0 +1 +24567898765 + +0.0 +1.0 +3.14 +2.7e3 +2E-5 +1.23e+3 + +---------------------------------------------------- + +[ + ["number", "0"], + ["number", "1"], + ["number", "24567898765"], + + ["number", "0.0"], + ["number", "1.0"], + ["number", "3.14"], + ["number", "2.7e3"], + ["number", "2E-5"], + ["number", "1.23e+3"] +] + +---------------------------------------------------- + +Checks for numbers. diff --git a/tests/languages/stan/operator_feature.test b/tests/languages/stan/operator_feature.test new file mode 100644 index 0000000000..15e30e0ae2 --- /dev/null +++ b/tests/languages/stan/operator_feature.test @@ -0,0 +1,52 @@ ++ - * / ++= -= *= /= + +== != < <= > >= +! || && + +<- = +.* .*= ./ ./= + +| ' ^ % ~ ? : + +---------------------------------------------------- + +[ + ["operator", "+"], + ["operator", "-"], + ["operator", "*"], + ["operator", "/"], + ["operator", "+="], + ["operator", "-="], + ["operator", "*="], + ["operator", "/="], + + ["operator", "=="], + ["operator", "!="], + ["operator", "<"], + ["operator", "<="], + ["operator", ">"], + ["operator", ">="], + ["operator", "!"], + ["operator", "||"], + ["operator", "&&"], + + ["operator", "<-"], + ["operator", "="], + ["operator", ".*"], + ["operator", ".*="], + ["operator", "./"], + ["operator", "./="], + + ["operator", "|"], + ["operator", "'"], + ["operator", "^"], + ["operator", "%"], + ["operator", "~"], + ["operator", "?"], + ["operator", ":"] +] + +---------------------------------------------------- + +Checks for operators. diff --git a/tests/languages/stan/punctuation_feature.test b/tests/languages/stan/punctuation_feature.test new file mode 100644 index 0000000000..a5c3d4db58 --- /dev/null +++ b/tests/languages/stan/punctuation_feature.test @@ -0,0 +1,19 @@ +( ) [ ] { } +, ; + +---------------------------------------------------- + +[ + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", "["], + ["punctuation", "]"], + ["punctuation", "{"], + ["punctuation", "}"], + ["punctuation", ","], + ["punctuation", ";"] +] + +---------------------------------------------------- + +Checks for punctuation. diff --git a/tests/languages/stan/string_feature.test b/tests/languages/stan/string_feature.test new file mode 100644 index 0000000000..f483002bcf --- /dev/null +++ b/tests/languages/stan/string_feature.test @@ -0,0 +1,40 @@ +"" +"foo bar" + +print("log density before =", target()); +print("u[", n, "] = ", u[n]); + +---------------------------------------------------- + +[ + ["string", "\"\""], + ["string", "\"foo bar\""], + + ["keyword", "print"], + ["punctuation", "("], + ["string", "\"log density before =\""], + ["punctuation", ","], + ["keyword", "target"], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", ")"], + ["punctuation", ";"], + ["keyword", "print"], + ["punctuation", "("], + ["string", "\"u[\""], + ["punctuation", ","], + " n", + ["punctuation", ","], + ["string", "\"] = \""], + ["punctuation", ","], + " u", + ["punctuation", "["], + "n", + ["punctuation", "]"], + ["punctuation", ")"], + ["punctuation", ";"] +] + +---------------------------------------------------- + +Checks for strings. From 004eaa749ddf4b420fcc1159e616cafeb60e90b3 Mon Sep 17 00:00:00 2001 From: Dmitry Eroshenko Date: Fri, 14 Aug 2020 00:00:21 +0700 Subject: [PATCH 0614/1100] Added support for MongoDB syntax (#2518) --- components.js | 2 +- components.json | 5 + components/prism-mongodb.js | 96 + components/prism-mongodb.min.js | 1 + examples/prism-mongodb.html | 59 + plugins/autoloader/prism-autoloader.js | 1 + plugins/autoloader/prism-autoloader.min.js | 2 +- plugins/show-language/prism-show-language.js | 1 + .../show-language/prism-show-language.min.js | 2 +- tests/languages/mongodb/document_feature.test | 260 +++ .../languages/mongodb/functions_feature.test | 61 + .../languages/mongodb/operations_feature.test | 1823 +++++++++++++++++ tests/languages/mongodb/query_feature.test | 71 + .../mongodb/string_url_and_ip_feature.test | 33 + tests/languages/mongodb/update_feature.test | 81 + 15 files changed, 2495 insertions(+), 3 deletions(-) create mode 100644 components/prism-mongodb.js create mode 100644 components/prism-mongodb.min.js create mode 100644 examples/prism-mongodb.html create mode 100644 tests/languages/mongodb/document_feature.test create mode 100644 tests/languages/mongodb/functions_feature.test create mode 100644 tests/languages/mongodb/operations_feature.test create mode 100644 tests/languages/mongodb/query_feature.test create mode 100644 tests/languages/mongodb/string_url_and_ip_feature.test create mode 100644 tests/languages/mongodb/update_feature.test diff --git a/components.js b/components.js index 1be7edb15b..d8f3f5a1c2 100644 --- a/components.js +++ b/components.js @@ -1,2 +1,2 @@ -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml","ssml","atom","rss"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","ssml":"SSML","atom":"Atom","rss":"RSS"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"ABNF","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"agda":{"title":"Agda","owner":"xy-ren"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"dkern"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"BNF","alias":"rbnf","aliasTitles":{"rbnf":"RBNF"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"clojure":{"title":"Clojure","owner":"troglotit"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"cypher":{"title":"Cypher","owner":"RunDevelopment"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dax":{"title":"DAX","owner":"peterbud"},"dhall":{"title":"Dhall","owner":"RunDevelopment"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"EBNF","owner":"RunDevelopment"},"editorconfig":{"title":"EditorConfig","owner":"osipxd"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"c","owner":"Golmote"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","optional":["markdown"],"owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"hlsl":{"title":"HLSL","require":"c","owner":"RunDevelopment"},"http":{"title":"HTTP","optional":["css","javascript","json","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"ignore":{"title":".ignore","owner":"osipxd","alias":["gitignore","hgignore","npmignore"],"aliasTitles":{"gitignore":".gitignore","hgignore":".hgignore","npmignore":".npmignore"}},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike","typescript"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","alias":"webmanifest","aliasTitles":{"webmanifest":"Web App Manifest"},"owner":"CupOfTea696"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"jsstacktrace":{"title":"JS stack trace","owner":"sbrl"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","alias":["kt","kts"],"aliasTitles":{"kts":"Kotlin Script"},"require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"naniscript":{"title":"Naninovel Script","owner":"Elringus","alias":"nani"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"purebasic":{"title":"PureBasic","require":"clike","alias":"pbfasm","owner":"HeX0R101"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"racket":{"title":"Racket","require":"scheme","alias":"rkt","owner":"RunDevelopment"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","modify":["actionscript","coffeescript","flow","javascript","typescript","vala"],"owner":"RunDevelopment"},"renpy":{"title":"Ren'py","alias":"rpy","owner":"HyuchiaDiego"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","owner":"RunDevelopment"},"smali":{"title":"Smali","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"solidity":{"title":"Solidity (Ethereum)","alias":"sol","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"stan":{"title":"Stan","owner":"RunDevelopment"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","vbnet"],"owner":"RunDevelopment"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"typoscript":{"title":"TypoScript","alias":"tsconfig","aliasTitles":{"tsconfig":"TSConfig"},"owner":"dkern"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":["vb","vba"],"aliasTitles":{"vba":"VBA"},"owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xml-doc":{"title":"XML doc (.net)","require":"markup","modify":["csharp","fsharp","vbnet"],"owner":"RunDevelopment"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"yang":{"title":"YANG","owner":"RunDevelopment"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml","ssml","atom","rss"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","ssml":"SSML","atom":"Atom","rss":"RSS"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"ABNF","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"agda":{"title":"Agda","owner":"xy-ren"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"dkern"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"BNF","alias":"rbnf","aliasTitles":{"rbnf":"RBNF"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"clojure":{"title":"Clojure","owner":"troglotit"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"cypher":{"title":"Cypher","owner":"RunDevelopment"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dax":{"title":"DAX","owner":"peterbud"},"dhall":{"title":"Dhall","owner":"RunDevelopment"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"EBNF","owner":"RunDevelopment"},"editorconfig":{"title":"EditorConfig","owner":"osipxd"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"c","owner":"Golmote"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","optional":["markdown"],"owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"hlsl":{"title":"HLSL","require":"c","owner":"RunDevelopment"},"http":{"title":"HTTP","optional":["css","javascript","json","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"ignore":{"title":".ignore","owner":"osipxd","alias":["gitignore","hgignore","npmignore"],"aliasTitles":{"gitignore":".gitignore","hgignore":".hgignore","npmignore":".npmignore"}},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike","typescript"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","alias":"webmanifest","aliasTitles":{"webmanifest":"Web App Manifest"},"owner":"CupOfTea696"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"jsstacktrace":{"title":"JS stack trace","owner":"sbrl"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","alias":["kt","kts"],"aliasTitles":{"kts":"Kotlin Script"},"require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"mongodb":{"title":"MongoDB","owner":"airs0urce","require":"javascript"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"naniscript":{"title":"Naninovel Script","owner":"Elringus","alias":"nani"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"purebasic":{"title":"PureBasic","require":"clike","alias":"pbfasm","owner":"HeX0R101"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"racket":{"title":"Racket","require":"scheme","alias":"rkt","owner":"RunDevelopment"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","modify":["actionscript","coffeescript","flow","javascript","typescript","vala"],"owner":"RunDevelopment"},"renpy":{"title":"Ren'py","alias":"rpy","owner":"HyuchiaDiego"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","owner":"RunDevelopment"},"smali":{"title":"Smali","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"solidity":{"title":"Solidity (Ethereum)","alias":"sol","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"stan":{"title":"Stan","owner":"RunDevelopment"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","vbnet"],"owner":"RunDevelopment"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"typoscript":{"title":"TypoScript","alias":"tsconfig","aliasTitles":{"tsconfig":"TSConfig"},"owner":"dkern"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":["vb","vba"],"aliasTitles":{"vba":"VBA"},"owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xml-doc":{"title":"XML doc (.net)","require":"markup","modify":["csharp","fsharp","vbnet"],"owner":"RunDevelopment"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"yang":{"title":"YANG","owner":"RunDevelopment"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; if (typeof module !== 'undefined' && module.exports) { module.exports = components; } \ No newline at end of file diff --git a/components.json b/components.json index 2453edc3e4..ffcafcc390 100644 --- a/components.json +++ b/components.json @@ -704,6 +704,11 @@ "title": "Mizar", "owner": "Golmote" }, + "mongodb": { + "title": "MongoDB", + "owner": "airs0urce", + "require": "javascript" + }, "monkey": { "title": "Monkey", "owner": "Golmote" diff --git a/components/prism-mongodb.js b/components/prism-mongodb.js new file mode 100644 index 0000000000..00bd440797 --- /dev/null +++ b/components/prism-mongodb.js @@ -0,0 +1,96 @@ +(function (Prism) { + + var operators = [ + // query and projection + '$eq', '$gt', '$gte', '$in', '$lt', '$lte', '$ne', '$nin', '$and', '$not', '$nor', '$or', + '$exists', '$type', '$expr', '$jsonSchema', '$mod', '$regex', '$text', '$where', '$geoIntersects', + '$geoWithin', '$near', '$nearSphere', '$all', '$elemMatch', '$size', '$bitsAllClear', '$bitsAllSet', + '$bitsAnyClear', '$bitsAnySet', '$comment', '$elemMatch', '$meta', '$slice', + + // update + '$currentDate', '$inc', '$min', '$max', '$mul', '$rename', '$set', '$setOnInsert', '$unset', + '$addToSet', '$pop', '$pull', '$push', '$pullAll', '$each', '$position', '$slice', '$sort', '$bit', + + // aggregation pipeline stages + '$addFields', '$bucket', '$bucketAuto', '$collStats', '$count', '$currentOp', '$facet', '$geoNear', + '$graphLookup', '$group','$indexStats', '$limit', '$listLocalSessions', '$listSessions', '$lookup', + '$match', '$merge', '$out', '$planCacheStats', '$project', '$redact', '$replaceRoot', '$replaceWith', + '$sample', '$set', '$skip', '$sort', '$sortByCount', '$unionWith', '$unset', '$unwind', + + // aggregation pipeline operators + '$abs', '$accumulator', '$acos', '$acosh', '$add', '$addToSet', '$allElementsTrue', '$and', + '$anyElementTrue', '$arrayElemAt', '$arrayToObject', '$asin', '$asinh', '$atan', '$atan2', + '$atanh', '$avg', '$binarySize', '$bsonSize', '$ceil', '$cmp', '$concat', '$concatArrays', '$cond', + '$convert', '$cos', '$dateFromParts', '$dateToParts', '$dateFromString', '$dateToString', '$dayOfMonth', + '$dayOfWeek', '$dayOfYear', '$degreesToRadians', '$divide', '$eq', '$exp', '$filter', '$first', + '$floor', '$function', '$gt', '$gte', '$hour', '$ifNull', '$in', '$indexOfArray', '$indexOfBytes', + '$indexOfCP', '$isArray', '$isNumber', '$isoDayOfWeek', '$isoWeek', '$isoWeekYear', '$last', + '$last', '$let', '$literal', '$ln', '$log', '$log10', '$lt', '$lte', '$ltrim', '$map', '$max', + '$mergeObjects', '$meta', '$min', '$millisecond', '$minute', '$mod', '$month', '$multiply', '$ne', + '$not', '$objectToArray', '$or', '$pow', '$push', '$radiansToDegrees', '$range', '$reduce', + '$regexFind', '$regexFindAll', '$regexMatch', '$replaceOne', '$replaceAll', '$reverseArray', '$round', + '$rtrim', '$second', '$setDifference', '$setEquals', '$setIntersection', '$setIsSubset', '$setUnion', + '$size', '$sin', '$slice', '$split', '$sqrt', '$stdDevPop', '$stdDevSamp', '$strcasecmp', '$strLenBytes', + '$strLenCP', '$substr', '$substrBytes', '$substrCP', '$subtract', '$sum', '$switch', '$tan', + '$toBool', '$toDate', '$toDecimal', '$toDouble', '$toInt', '$toLong', '$toObjectId', '$toString', + '$toLower', '$toUpper', '$trim', '$trunc', '$type', '$week', '$year', '$zip', + + // aggregation pipeline query modifiers + '$comment', '$explain', '$hint', '$max', '$maxTimeMS', '$min', '$orderby', '$query', + '$returnKey', '$showDiskLoc', '$natural', + ]; + + var builtinFunctions = [ + 'ObjectId', + 'Code', + 'BinData', + 'DBRef', + 'Timestamp', + 'NumberLong', + 'NumberDecimal', + 'MaxKey', + 'MinKey', + 'RegExp', + 'ISODate', + 'UUID', + ]; + + operators = operators.map(function(operator) { + return operator.replace('$', '\\$'); + }); + + var operatorsSource = '(?:' + operators.join('|') + ')\\b'; + + Prism.languages.mongodb = Prism.languages.extend('javascript', {}); + + Prism.languages.insertBefore('mongodb', 'string', { + 'property': { + pattern: /(?:(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1|[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)(?=\s*:)/, + greedy: true, + inside: { + 'keyword': RegExp('^([\'"])?' + operatorsSource + '(?:\\1)?$') + } + } + }); + + Prism.languages.mongodb.string.inside = { + url: { + // url pattern + pattern: /https?:\/\/[-\w@:%.+~#=]{1,256}\.[a-z0-9()]{1,6}\b[-\w()@:%+.~#?&/=]*/i, + greedy: true + }, + entity: { + // ipv4 + pattern: /\b(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\b/, + greedy: true + } + }; + + Prism.languages.insertBefore('mongodb', 'constant', { + 'builtin': { + pattern: RegExp('\\b(?:' + builtinFunctions.join('|') + ')\\b'), + alias: 'keyword' + } + }); + +}(Prism)); diff --git a/components/prism-mongodb.min.js b/components/prism-mongodb.min.js new file mode 100644 index 0000000000..c4b1d2780c --- /dev/null +++ b/components/prism-mongodb.min.js @@ -0,0 +1 @@ +!function($){var e=["$eq","$gt","$gte","$in","$lt","$lte","$ne","$nin","$and","$not","$nor","$or","$exists","$type","$expr","$jsonSchema","$mod","$regex","$text","$where","$geoIntersects","$geoWithin","$near","$nearSphere","$all","$elemMatch","$size","$bitsAllClear","$bitsAllSet","$bitsAnyClear","$bitsAnySet","$comment","$elemMatch","$meta","$slice","$currentDate","$inc","$min","$max","$mul","$rename","$set","$setOnInsert","$unset","$addToSet","$pop","$pull","$push","$pullAll","$each","$position","$slice","$sort","$bit","$addFields","$bucket","$bucketAuto","$collStats","$count","$currentOp","$facet","$geoNear","$graphLookup","$group","$indexStats","$limit","$listLocalSessions","$listSessions","$lookup","$match","$merge","$out","$planCacheStats","$project","$redact","$replaceRoot","$replaceWith","$sample","$set","$skip","$sort","$sortByCount","$unionWith","$unset","$unwind","$abs","$accumulator","$acos","$acosh","$add","$addToSet","$allElementsTrue","$and","$anyElementTrue","$arrayElemAt","$arrayToObject","$asin","$asinh","$atan","$atan2","$atanh","$avg","$binarySize","$bsonSize","$ceil","$cmp","$concat","$concatArrays","$cond","$convert","$cos","$dateFromParts","$dateToParts","$dateFromString","$dateToString","$dayOfMonth","$dayOfWeek","$dayOfYear","$degreesToRadians","$divide","$eq","$exp","$filter","$first","$floor","$function","$gt","$gte","$hour","$ifNull","$in","$indexOfArray","$indexOfBytes","$indexOfCP","$isArray","$isNumber","$isoDayOfWeek","$isoWeek","$isoWeekYear","$last","$last","$let","$literal","$ln","$log","$log10","$lt","$lte","$ltrim","$map","$max","$mergeObjects","$meta","$min","$millisecond","$minute","$mod","$month","$multiply","$ne","$not","$objectToArray","$or","$pow","$push","$radiansToDegrees","$range","$reduce","$regexFind","$regexFindAll","$regexMatch","$replaceOne","$replaceAll","$reverseArray","$round","$rtrim","$second","$setDifference","$setEquals","$setIntersection","$setIsSubset","$setUnion","$size","$sin","$slice","$split","$sqrt","$stdDevPop","$stdDevSamp","$strcasecmp","$strLenBytes","$strLenCP","$substr","$substrBytes","$substrCP","$subtract","$sum","$switch","$tan","$toBool","$toDate","$toDecimal","$toDouble","$toInt","$toLong","$toObjectId","$toString","$toLower","$toUpper","$trim","$trunc","$type","$week","$year","$zip","$comment","$explain","$hint","$max","$maxTimeMS","$min","$orderby","$query","$returnKey","$showDiskLoc","$natural"],t="(?:"+(e=e.map(function($){return $.replace("$","\\$")})).join("|")+")\\b";$.languages.mongodb=$.languages.extend("javascript",{}),$.languages.insertBefore("mongodb","string",{property:{pattern:/(?:(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1|[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)(?=\s*:)/,greedy:!0,inside:{keyword:RegExp("^(['\"])?"+t+"(?:\\1)?$")}}}),$.languages.mongodb.string.inside={url:{pattern:/https?:\/\/[-\w@:%.+~#=]{1,256}\.[a-z0-9()]{1,6}\b[-\w()@:%+.~#?&/=]*/i,greedy:!0},entity:{pattern:/\b(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\b/,greedy:!0}},$.languages.insertBefore("mongodb","constant",{builtin:{pattern:RegExp("\\b(?:"+["ObjectId","Code","BinData","DBRef","Timestamp","NumberLong","NumberDecimal","MaxKey","MinKey","RegExp","ISODate","UUID"].join("|")+")\\b"),alias:"keyword"}})}(Prism); \ No newline at end of file diff --git a/examples/prism-mongodb.html b/examples/prism-mongodb.html new file mode 100644 index 0000000000..305eae5233 --- /dev/null +++ b/examples/prism-mongodb.html @@ -0,0 +1,59 @@ +

        Document

        +
        
        +{
        +	'_id': ObjectId('5ec72ffe00316be87cab3927'),
        +	'code': Code('function () { return 22; }'),
        +	'binary': BinData(1, '232sa3d323sd232a32sda3s2d3a2s1d23s21d3sa'),
        +	'dbref': DBRef('namespace', ObjectId('5ec72f4200316be87cab3926'), 'db'),
        +	'timestamp': Timestamp(0, 0),
        +	'long': NumberLong(9223372036854775807),
        +	'decimal': NumberDecimal('1000.55'),
        +	'integer': 100,
        +	'maxkey': MaxKey(),
        +	'minkey': MinKey(),
        +	'isodate': ISODate('2012-01-01T00:00:00.000Z'),
        +	'regexp': RegExp('prism(js)?', 'i'),
        +	'string': 'Hello World',
        +	'numberArray': [1, 2, 3],
        +	'stringArray': ['1','2','3'],
        +	'randomKey': null,
        +	'object': { 'a': 1, 'b': 2 },
        +	'max_key2': MaxKey(),
        +	'number': 1234,
        +	'invalid-key': 123,
        +	noQuotesKey: 'value',
        +}
        +
        + +

        Query

        +
        
        +db.users.find({
        +	_id: { $nin: ObjectId('5ec72ffe00316be87cab3927') },
        +	age: { $gte: 18, $lte: 99 },
        +	field: { $exists: true }
        +})
        +
        + + +

        Update

        +
        
        +db.users.updateOne(
        +	{
        +		_id: ObjectId('5ec72ffe00316be87cab3927')
        +	},
        +	{
        +		$set: { age: 30 },
        +		$inc: { updateCount: 1 }, 
        +		$push: { updateDates: new Date() } 
        +	}
        +)
        +
        + +

        Aggregate

        +
        
        +db.orders.aggregate([
        +	{ $sort : { age : -1 } },
        +	{ $project : { age : 1, status : 1, name : 1 } },
        +	{ $limit: 5 }
        +])
        +
        diff --git a/plugins/autoloader/prism-autoloader.js b/plugins/autoloader/prism-autoloader.js index c1c95c3bbe..6abf07929e 100644 --- a/plugins/autoloader/prism-autoloader.js +++ b/plugins/autoloader/prism-autoloader.js @@ -76,6 +76,7 @@ "lilypond": "scheme", "markdown": "markup", "markup-templating": "markup", + "mongodb": "javascript", "n4js": "javascript", "nginx": "clike", "objectivec": "c", diff --git a/plugins/autoloader/prism-autoloader.min.js b/plugins/autoloader/prism-autoloader.min.js index 8a716d8aa6..9f0ccfe909 100644 --- a/plugins/autoloader/prism-autoloader.min.js +++ b/plugins/autoloader/prism-autoloader.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof self&&self.Prism&&self.document&&document.createElement){var n={javascript:"clike",actionscript:"javascript",arduino:"cpp",aspnet:["markup","csharp"],bison:"c",c:"clike",csharp:"clike",cpp:"c",coffeescript:"javascript",crystal:"ruby","css-extras":"css",d:"clike",dart:"clike",django:"markup-templating",ejs:["javascript","markup-templating"],etlua:["lua","markup-templating"],erb:["ruby","markup-templating"],fsharp:"clike","firestore-security-rules":"clike",flow:"javascript",ftl:"markup-templating",gml:"clike",glsl:"c",go:"clike",groovy:"clike",haml:"ruby",handlebars:"markup-templating",haxe:"clike",hlsl:"c",java:"clike",javadoc:["markup","java","javadoclike"],jolie:"clike",jsdoc:["javascript","javadoclike","typescript"],"js-extras":"javascript",json5:"json",jsonp:"json","js-templates":"javascript",kotlin:"clike",latte:["clike","markup-templating","php"],less:"css",lilypond:"scheme",markdown:"markup","markup-templating":"markup",n4js:"javascript",nginx:"clike",objectivec:"c",opencl:"c",parser:"markup",php:["clike","markup-templating"],phpdoc:["php","javadoclike"],"php-extras":"php",plsql:"sql",processing:"clike",protobuf:"clike",pug:["markup","javascript"],purebasic:"clike",qml:"javascript",qore:"clike",racket:"scheme",jsx:["markup","javascript"],tsx:["jsx","typescript"],reason:"clike",ruby:"clike",sass:"css",scss:"css",scala:"java","shell-session":"bash",smarty:"markup-templating",solidity:"clike",soy:"markup-templating",sparql:"turtle",sqf:"clike",swift:"clike","t4-cs":["t4-templating","csharp"],"t4-vb":["t4-templating","vbnet"],tap:"yaml",tt2:["clike","markup-templating"],textile:"markup",twig:"markup",typescript:"javascript",vala:"clike",vbnet:"basic",velocity:"markup",wiki:"markup",xeora:"markup","xml-doc":"markup",xquery:"markup"},l={html:"markup",xml:"markup",svg:"markup",mathml:"markup",ssml:"markup",atom:"markup",rss:"markup",js:"javascript",g4:"antlr4",adoc:"asciidoc",shell:"bash",shortcode:"bbcode",rbnf:"bnf",cs:"csharp",dotnet:"csharp",coffee:"coffeescript",conc:"concurnas",jinja2:"django","dns-zone":"dns-zone-file",dockerfile:"docker",eta:"ejs",xlsx:"excel-formula",xls:"excel-formula",gamemakerlanguage:"gml",hs:"haskell",gitignore:"ignore",hgignore:"ignore",npmignore:"ignore",webmanifest:"json",kt:"kotlin",kts:"kotlin",tex:"latex",context:"latex",ly:"lilypond",emacs:"lisp",elisp:"lisp","emacs-lisp":"lisp",md:"markdown",moon:"moonscript",n4jsd:"n4js",nani:"naniscript",objc:"objectivec",objectpascal:"pascal",px:"pcaxis",pcode:"peoplecode",pq:"powerquery",mscript:"powerquery",pbfasm:"purebasic",py:"python",rkt:"racket",rpy:"renpy",robot:"robotframework",rb:"ruby",sol:"solidity",sln:"solution-file",rq:"sparql",t4:"t4-cs",trig:"turtle",ts:"typescript",tsconfig:"typoscript",uscript:"unrealscript",uc:"unrealscript",vb:"visual-basic",vba:"visual-basic",xeoracube:"xeora",yml:"yaml"},p={},e="components/",a=Prism.util.currentScript();if(a){var r=/\bplugins\/autoloader\/prism-autoloader\.(?:min\.)js(?:\?[^\r\n/]*)?$/i,t=/(^|\/)[\w-]+\.(?:min\.)js(?:\?[^\r\n/]*)?$/i,i=a.getAttribute("data-autoloader-path");if(null!=i)e=i.trim().replace(/\/?$/,"/");else{var s=a.src;r.test(s)?e=s.replace(r,"components/"):t.test(s)&&(e=s.replace(t,"$1components/"))}}var o=Prism.plugins.autoloader={languages_path:e,use_minified:!0,loadLanguages:m};Prism.hooks.add("complete",function(e){var a=e.element,r=e.language;if(a&&r&&"none"!==r){var t=function(e){var a=(e.getAttribute("data-dependencies")||"").trim();if(!a){var r=e.parentElement;r&&"pre"===r.tagName.toLowerCase()&&(a=(r.getAttribute("data-dependencies")||"").trim())}return a?a.split(/\s*,\s*/g):[]}(a);t.push(r),t.every(u)||m(t,function(){Prism.highlightElement(a)})}})}function u(e){if(0<=e.indexOf("!"))return!1;if((e=l[e]||e)in Prism.languages)return!0;var a=p[e];return a&&!a.error&&!1===a.loading}function m(e,a,r){"string"==typeof e&&(e=[e]);var t=e.length,i=0,s=!1;function c(){s||++i===t&&a&&a(e)}0!==t?e.forEach(function(e){!function(a,r,t){var i=0<=a.indexOf("!");function e(){var e=p[a];e||(e=p[a]={callbacks:[]}),e.callbacks.push({success:r,error:t}),!i&&u(a)?k(a,"success"):!i&&e.error?k(a,"error"):!i&&e.loading||(e.loading=!0,e.error=!1,function(e,a,r){var t=document.createElement("script");t.src=e,t.async=!0,t.onload=function(){document.body.removeChild(t),a&&a()},t.onerror=function(){document.body.removeChild(t),r&&r()},document.body.appendChild(t)}(function(e){return o.languages_path+"prism-"+e+(o.use_minified?".min":"")+".js"}(a),function(){e.loading=!1,k(a,"success")},function(){e.loading=!1,e.error=!0,k(a,"error")}))}a=a.replace("!",""),a=l[a]||a;var s=n[a];s&&s.length?m(s,e,t):e()}(e,c,function(){s||(s=!0,r&&r(e))})}):a&&setTimeout(a,0)}function k(e,a){if(p[e]){for(var r=p[e].callbacks,t=0,i=r.length;t Date: Mon, 17 Aug 2020 15:39:02 +0300 Subject: [PATCH 0615/1100] Added support for BSL (1C:Enterprise) (#2520) --- components.js | 2 +- components.json | 8 + components/prism-bsl.js | 71 ++++ components/prism-bsl.min.js | 1 + examples/prism-bsl.html | 386 ++++++++++++++++++ plugins/autoloader/prism-autoloader.js | 1 + plugins/autoloader/prism-autoloader.min.js | 2 +- plugins/show-language/prism-show-language.js | 2 + .../show-language/prism-show-language.min.js | 2 +- tests/languages/bsl/comment_feature.test | 13 + tests/languages/bsl/keyword_feature.test | 37 ++ tests/languages/bsl/number_feature.test | 13 + tests/languages/bsl/operator_feature.test | 17 + tests/languages/bsl/string_feature.test | 13 + 14 files changed, 565 insertions(+), 3 deletions(-) create mode 100644 components/prism-bsl.js create mode 100644 components/prism-bsl.min.js create mode 100644 examples/prism-bsl.html create mode 100644 tests/languages/bsl/comment_feature.test create mode 100644 tests/languages/bsl/keyword_feature.test create mode 100644 tests/languages/bsl/number_feature.test create mode 100644 tests/languages/bsl/operator_feature.test create mode 100644 tests/languages/bsl/string_feature.test diff --git a/components.js b/components.js index d8f3f5a1c2..e0b9cadcd3 100644 --- a/components.js +++ b/components.js @@ -1,2 +1,2 @@ -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml","ssml","atom","rss"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","ssml":"SSML","atom":"Atom","rss":"RSS"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"ABNF","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"agda":{"title":"Agda","owner":"xy-ren"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"dkern"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"BNF","alias":"rbnf","aliasTitles":{"rbnf":"RBNF"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"clojure":{"title":"Clojure","owner":"troglotit"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"cypher":{"title":"Cypher","owner":"RunDevelopment"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dax":{"title":"DAX","owner":"peterbud"},"dhall":{"title":"Dhall","owner":"RunDevelopment"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"EBNF","owner":"RunDevelopment"},"editorconfig":{"title":"EditorConfig","owner":"osipxd"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"c","owner":"Golmote"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","optional":["markdown"],"owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"hlsl":{"title":"HLSL","require":"c","owner":"RunDevelopment"},"http":{"title":"HTTP","optional":["css","javascript","json","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"ignore":{"title":".ignore","owner":"osipxd","alias":["gitignore","hgignore","npmignore"],"aliasTitles":{"gitignore":".gitignore","hgignore":".hgignore","npmignore":".npmignore"}},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike","typescript"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","alias":"webmanifest","aliasTitles":{"webmanifest":"Web App Manifest"},"owner":"CupOfTea696"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"jsstacktrace":{"title":"JS stack trace","owner":"sbrl"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","alias":["kt","kts"],"aliasTitles":{"kts":"Kotlin Script"},"require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"mongodb":{"title":"MongoDB","owner":"airs0urce","require":"javascript"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"naniscript":{"title":"Naninovel Script","owner":"Elringus","alias":"nani"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"purebasic":{"title":"PureBasic","require":"clike","alias":"pbfasm","owner":"HeX0R101"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"racket":{"title":"Racket","require":"scheme","alias":"rkt","owner":"RunDevelopment"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","modify":["actionscript","coffeescript","flow","javascript","typescript","vala"],"owner":"RunDevelopment"},"renpy":{"title":"Ren'py","alias":"rpy","owner":"HyuchiaDiego"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","owner":"RunDevelopment"},"smali":{"title":"Smali","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"solidity":{"title":"Solidity (Ethereum)","alias":"sol","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"stan":{"title":"Stan","owner":"RunDevelopment"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","vbnet"],"owner":"RunDevelopment"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"typoscript":{"title":"TypoScript","alias":"tsconfig","aliasTitles":{"tsconfig":"TSConfig"},"owner":"dkern"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":["vb","vba"],"aliasTitles":{"vba":"VBA"},"owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xml-doc":{"title":"XML doc (.net)","require":"markup","modify":["csharp","fsharp","vbnet"],"owner":"RunDevelopment"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"yang":{"title":"YANG","owner":"RunDevelopment"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml","ssml","atom","rss"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","ssml":"SSML","atom":"Atom","rss":"RSS"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"ABNF","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"agda":{"title":"Agda","owner":"xy-ren"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"dkern"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"BNF","alias":"rbnf","aliasTitles":{"rbnf":"RBNF"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"bsl":{"title":"BSL (1C:Enterprise)","alias":"oscript","aliasTitles":{"oscript":"OneScript"},"owner":"Diversus23"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"clojure":{"title":"Clojure","owner":"troglotit"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"cypher":{"title":"Cypher","owner":"RunDevelopment"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dax":{"title":"DAX","owner":"peterbud"},"dhall":{"title":"Dhall","owner":"RunDevelopment"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"EBNF","owner":"RunDevelopment"},"editorconfig":{"title":"EditorConfig","owner":"osipxd"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"c","owner":"Golmote"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","optional":["markdown"],"owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"hlsl":{"title":"HLSL","require":"c","owner":"RunDevelopment"},"http":{"title":"HTTP","optional":["css","javascript","json","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"ignore":{"title":".ignore","owner":"osipxd","alias":["gitignore","hgignore","npmignore"],"aliasTitles":{"gitignore":".gitignore","hgignore":".hgignore","npmignore":".npmignore"}},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike","typescript"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","alias":"webmanifest","aliasTitles":{"webmanifest":"Web App Manifest"},"owner":"CupOfTea696"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"jsstacktrace":{"title":"JS stack trace","owner":"sbrl"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","alias":["kt","kts"],"aliasTitles":{"kts":"Kotlin Script"},"require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"mongodb":{"title":"MongoDB","owner":"airs0urce","require":"javascript"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"naniscript":{"title":"Naninovel Script","owner":"Elringus","alias":"nani"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"purebasic":{"title":"PureBasic","require":"clike","alias":"pbfasm","owner":"HeX0R101"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"racket":{"title":"Racket","require":"scheme","alias":"rkt","owner":"RunDevelopment"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","modify":["actionscript","coffeescript","flow","javascript","typescript","vala"],"owner":"RunDevelopment"},"renpy":{"title":"Ren'py","alias":"rpy","owner":"HyuchiaDiego"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","owner":"RunDevelopment"},"smali":{"title":"Smali","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"solidity":{"title":"Solidity (Ethereum)","alias":"sol","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"stan":{"title":"Stan","owner":"RunDevelopment"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","vbnet"],"owner":"RunDevelopment"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"typoscript":{"title":"TypoScript","alias":"tsconfig","aliasTitles":{"tsconfig":"TSConfig"},"owner":"dkern"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":["vb","vba"],"aliasTitles":{"vba":"VBA"},"owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xml-doc":{"title":"XML doc (.net)","require":"markup","modify":["csharp","fsharp","vbnet"],"owner":"RunDevelopment"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"yang":{"title":"YANG","owner":"RunDevelopment"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; if (typeof module !== 'undefined' && module.exports) { module.exports = components; } \ No newline at end of file diff --git a/components.json b/components.json index ffcafcc390..16ce470529 100644 --- a/components.json +++ b/components.json @@ -203,6 +203,14 @@ "title": "Bro", "owner": "wayward710" }, + "bsl": { + "title": "BSL (1C:Enterprise)", + "alias": "oscript", + "aliasTitles": { + "oscript": "OneScript" + }, + "owner": "Diversus23" + }, "c": { "title": "C", "require": "clike", diff --git a/components/prism-bsl.js b/components/prism-bsl.js new file mode 100644 index 0000000000..79819c2903 --- /dev/null +++ b/components/prism-bsl.js @@ -0,0 +1,71 @@ +// 1C:Enterprise +// https://github.com/Diversus23/ +// +Prism.languages.bsl = { + 'comment': /\/\/.*/, + 'string': [ + // Строки + // Strings + { + pattern: /"(?:[^"]|"")*"(?!")/, + greedy: true + }, + // Дата и время + // Date & time + { + pattern: /'(?:[^'\r\n\\]|\\.)*'/ + } + ], + 'keyword': [ + { + // RU + pattern: /(^|[^\w\u0400-\u0484\u0487-\u052f\u1c80-\u1c88\u1d2b\u1d78\u2de0-\u2dff\ua640-\ua69f\ufe2e\ufe2f])(?:пока|для|новый|прервать|попытка|исключение|вызватьисключение|иначе|конецпопытки|неопределено|функция|перем|возврат|конецфункции|если|иначеесли|процедура|конецпроцедуры|тогда|знач|экспорт|конецесли|из|каждого|истина|ложь|по|цикл|конеццикла|выполнить)(?![\w\u0400-\u0484\u0487-\u052f\u1c80-\u1c88\u1d2b\u1d78\u2de0-\u2dff\ua640-\ua69f\ufe2e\ufe2f])/i, + lookbehind: true + }, + { + // EN + pattern: /\b(?:while|for|new|break|try|except|raise|else|endtry|undefined|function|var|return|endfunction|null|if|elseif|procedure|endprocedure|then|val|export|endif|in|each|true|false|to|do|enddo|execute)\b/i + } + ], + 'number': { + pattern: /(^(?=\d)|[^\w\u0400-\u0484\u0487-\u052f\u1c80-\u1c88\u1d2b\u1d78\u2de0-\u2dff\ua640-\ua69f\ufe2e\ufe2f])(?:\d+\.?\d*|\.\d+)(?:E[+-]?\d+)?/i, + lookbehind: true + }, + 'operator': [ + /[<>+\-*/]=?|[%=]/, + // RU + { + pattern: /(^|[^\w\u0400-\u0484\u0487-\u052f\u1c80-\u1c88\u1d2b\u1d78\u2de0-\u2dff\ua640-\ua69f\ufe2e\ufe2f])(?:и|или|не)(?![\w\u0400-\u0484\u0487-\u052f\u1c80-\u1c88\u1d2b\u1d78\u2de0-\u2dff\ua640-\ua69f\ufe2e\ufe2f])/i, + lookbehind: true + }, + // EN + { + pattern: /\b(?:and|or|not)\b/i + } + + ], + 'punctuation': /\(\.|\.\)|[()\[\]:;,.]/, + 'directive': [ + // Теги препроцессора вида &Клиент, &Сервер, ... + // Preprocessor tags of the type &Client, &Server, ... + { + pattern: /^(\s*)&.*/m, + lookbehind: true, + alias: 'important' + }, + // Инструкции препроцессора вида: + // #Если Сервер Тогда + // ... + // #КонецЕсли + // Preprocessor instructions of the form: + // #If Server Then + // ... + // #EndIf + { + pattern: /^\s*#.*/gm, + alias: 'important' + } + ] +}; + +Prism.languages.oscript = Prism.languages['bsl']; diff --git a/components/prism-bsl.min.js b/components/prism-bsl.min.js new file mode 100644 index 0000000000..c2d118b4b4 --- /dev/null +++ b/components/prism-bsl.min.js @@ -0,0 +1 @@ +Prism.languages.bsl={comment:/\/\/.*/,string:[{pattern:/"(?:[^"]|"")*"(?!")/,greedy:!0},{pattern:/'(?:[^'\r\n\\]|\\.)*'/}],keyword:[{pattern:/(^|[^\w\u0400-\u0484\u0487-\u052f\u1c80-\u1c88\u1d2b\u1d78\u2de0-\u2dff\ua640-\ua69f\ufe2e\ufe2f])(?:пока|для|новый|прервать|попытка|исключение|вызватьисключение|иначе|конецпопытки|неопределено|функция|перем|возврат|конецфункции|если|иначеесли|процедура|конецпроцедуры|тогда|знач|экспорт|конецесли|из|каждого|истина|ложь|по|цикл|конеццикла|выполнить)(?![\w\u0400-\u0484\u0487-\u052f\u1c80-\u1c88\u1d2b\u1d78\u2de0-\u2dff\ua640-\ua69f\ufe2e\ufe2f])/i,lookbehind:!0},{pattern:/\b(?:while|for|new|break|try|except|raise|else|endtry|undefined|function|var|return|endfunction|null|if|elseif|procedure|endprocedure|then|val|export|endif|in|each|true|false|to|do|enddo|execute)\b/i}],number:{pattern:/(^(?=\d)|[^\w\u0400-\u0484\u0487-\u052f\u1c80-\u1c88\u1d2b\u1d78\u2de0-\u2dff\ua640-\ua69f\ufe2e\ufe2f])(?:\d+\.?\d*|\.\d+)(?:E[+-]?\d+)?/i,lookbehind:!0},operator:[/[<>+\-*/]=?|[%=]/,{pattern:/(^|[^\w\u0400-\u0484\u0487-\u052f\u1c80-\u1c88\u1d2b\u1d78\u2de0-\u2dff\ua640-\ua69f\ufe2e\ufe2f])(?:и|или|не)(?![\w\u0400-\u0484\u0487-\u052f\u1c80-\u1c88\u1d2b\u1d78\u2de0-\u2dff\ua640-\ua69f\ufe2e\ufe2f])/i,lookbehind:!0},{pattern:/\b(?:and|or|not)\b/i}],punctuation:/\(\.|\.\)|[()\[\]:;,.]/,directive:[{pattern:/^(\s*)&.*/m,lookbehind:!0,alias:"important"},{pattern:/^\s*#.*/gm,alias:"important"}]},Prism.languages.oscript=Prism.languages.bsl; \ No newline at end of file diff --git a/examples/prism-bsl.html b/examples/prism-bsl.html new file mode 100644 index 0000000000..163000b060 --- /dev/null +++ b/examples/prism-bsl.html @@ -0,0 +1,386 @@ +

        Comments

        +
         // This is a 1C:Enterprise comments
        +//
        + +

        Strings and characters

        +
        "This is a 1C:Enterprise string"
        +""
        +"a"
        +"A tabulator character: ""#9"" is easy to embed"
        + +

        Numbers

        +
        123
        +123.456
        +
        + +

        Full example

        +
        ///////////////////////////////////////////////////////////////////////////////////////////////////////
        +// Copyright (c) 2019, ООО 1С-Софт
        +// Все права защищены. Эта программа и сопроводительные материалы предоставляются 
        +// в соответствии с условиями лицензии Attribution 4.0 International (CC BY 4.0)
        +// Текст лицензии доступен по ссылке:
        +// https://creativecommons.org/licenses/by/4.0/legalcode
        +///////////////////////////////////////////////////////////////////////////////////////////////////////
        +
        +#Область СлужебныеПроцедурыИФункции
        +
        +////////////////////////////////////////////////////////////////////////////////
        +//  Основные процедуры и функции поиска контактов.
        +
        +// Получает представление и всю контактную информацию контакта.
        +//
        +// Параметры:
        +//  Контакт                 - ОпределяемыйТип.КонтактВзаимодействия - контакт для которого получается информация.
        +//  Представление           - Строка - в данный параметр будет помещено полученное представление.
        +//  СтрокаКИ                - Строка - в данный параметр будет помещено полученная контактная информация.
        +//  ТипКонтактнойИнформации - Перечисления.ТипыКонтактнойИнформации - возможность установить отбор по типу получаемой
        +//                                                                    контактной информации.
        +//
        +Процедура ПредставлениеИВсяКонтактнаяИнформациюКонтакта(Контакт, Представление, СтрокаКИ,ТипКонтактнойИнформации = Неопределено) Экспорт
        +	
        +	Представление = "";
        +	СтрокаКИ = "";
        +	Если Не ЗначениеЗаполнено(Контакт) 
        +		ИЛИ ТипЗнч(Контакт) = Тип("СправочникСсылка.СтроковыеКонтактыВзаимодействий") Тогда
        +		Контакт = Неопределено;
        +		Возврат;
        +	КонецЕсли;
        +	
        +	ИмяТаблицы = Контакт.Метаданные().Имя;
        +	ИмяПоляДляНаименованияВладельца = Взаимодействия.ИмяПоляДляНаименованияВладельца(ИмяТаблицы);
        +	
        +	Запрос = Новый Запрос;
        +	Запрос.Текст =
        +	"ВЫБРАТЬ
        +	|	СправочникКонтакт.Наименование          КАК Наименование,
        +	|	" + ИмяПоляДляНаименованияВладельца + " КАК НаименованиеВладельца
        +	|ИЗ
        +	|	Справочник." + ИмяТаблицы + " КАК СправочникКонтакт
        +	|ГДЕ
        +	|	СправочникКонтакт.Ссылка = &Контакт
        +	|";
        +	
        +	Запрос.УстановитьПараметр("Контакт", Контакт);
        +	Запрос.УстановитьПараметр("ТипКонтактнойИнформации", ТипКонтактнойИнформации);
        +	Выборка = Запрос.Выполнить().Выбрать();
        +	Если Не Выборка.Следующий() Тогда
        +		Возврат;
        +	КонецЕсли;
        +	
        +	Представление = Выборка.Наименование;
        +	
        +	Если Не ПустаяСтрока(Выборка.НаименованиеВладельца) Тогда
        +		Представление = Представление + " (" + Выборка.НаименованиеВладельца + ")";
        +	КонецЕсли;
        +	
        +	МассивКонтактов = ОбщегоНазначенияКлиентСервер.ЗначениеВМассиве(Контакт);
        +	ТаблицаКИ = УправлениеКонтактнойИнформацией.КонтактнаяИнформацияОбъектов(МассивКонтактов, ТипКонтактнойИнформации, Неопределено, ТекущаяДатаСеанса());
        +	
        +	Для Каждого СтрокаТаблицы Из ТаблицаКИ Цикл
        +		Если СтрокаТаблицы.Тип <> Перечисления.ТипыКонтактнойИнформации.Другое Тогда
        +			СтрокаКИ = СтрокаКИ + ?(ПустаяСтрока(СтрокаКИ), "", "; ") + СтрокаТаблицы.Представление;
        +		КонецЕсли;
        +	КонецЦикла;
        +	
        +КонецПроцедуры
        +
        +// Получает наименование и адреса электронной почты контакта.
        +//
        +// Параметры:
        +//  Контакт - Ссылка - контакт, для которого получаются данные.
        +//
        +// Возвращаемое значение:
        +//  Структура - содержит наименование контакта и список значений электронной почты контакта.
        +//
        +Функция НаименованиеИАдресаЭлектроннойПочтыКонтакта(Контакт) Экспорт
        +	
        +	Если Не ЗначениеЗаполнено(Контакт) 
        +		Или ТипЗнч(Контакт) = Тип("СправочникСсылка.СтроковыеКонтактыВзаимодействий") Тогда
        +		Возврат Неопределено;
        +	КонецЕсли;
        +	
        +	МетаданныеКонтакта = Контакт.Метаданные();
        +	
        +	Если МетаданныеКонтакта.Иерархический Тогда
        +		Если Контакт.ЭтоГруппа Тогда
        +			Возврат Неопределено;
        +		КонецЕсли;
        +	КонецЕсли;
        +	
        +	МассивОписанияТиповКонтактов = ВзаимодействияКлиентСервер.ОписанияКонтактов();
        +	ЭлементМассиваОписания = Неопределено;
        +	Для Каждого ЭлементМассива Из МассивОписанияТиповКонтактов Цикл
        +		
        +		Если ЭлементМассива.Имя = МетаданныеКонтакта.Имя Тогда
        +			ЭлементМассиваОписания = ЭлементМассива;
        +			Прервать;
        +		КонецЕсли;
        +		
        +	КонецЦикла;
        +	
        +	Если ЭлементМассиваОписания = Неопределено Тогда
        +		Возврат Неопределено;
        +	КонецЕсли;
        +	
        +	ИмяТаблицы = МетаданныеКонтакта.ПолноеИмя();
        +	
        +	ТекстЗапроса =
        +	"ВЫБРАТЬ РАЗРЕШЕННЫЕ РАЗЛИЧНЫЕ
        +	|	ЕСТЬNULL(ТаблицаКонтактнаяИнформация.АдресЭП,"""") КАК АдресЭП,
        +	|	СправочникКонтакт." + ЭлементМассиваОписания.ИмяРеквизитаПредставлениеКонтакта + " КАК Наименование
        +	|ИЗ
        +	|	" + ИмяТаблицы + " КАК СправочникКонтакт
        +	|		ЛЕВОЕ СОЕДИНЕНИЕ " + ИмяТаблицы + ".КонтактнаяИнформация КАК ТаблицаКонтактнаяИнформация
        +	|		ПО (ТаблицаКонтактнаяИнформация.Ссылка = СправочникКонтакт.Ссылка)
        +	|			И (ТаблицаКонтактнаяИнформация.Тип = ЗНАЧЕНИЕ(Перечисление.ТипыКонтактнойИнформации.АдресЭлектроннойПочты))
        +	|ГДЕ
        +	|	СправочникКонтакт.Ссылка = &Контакт
        +	|ИТОГИ ПО
        +	|	Наименование";
        +	
        +	Запрос = Новый Запрос;
        +	Запрос.Текст = ТекстЗапроса;
        +	Запрос.УстановитьПараметр("Контакт", Контакт);
        +	Выборка = Запрос.Выполнить().Выбрать(ОбходРезультатаЗапроса.ПоГруппировкам);
        +	
        +	Если Не Выборка.Следующий() Тогда
        +		Возврат Неопределено;
        +	КонецЕсли;
        +	
        +	Адреса = Новый Структура("Наименование,Адреса", Выборка.Наименование, Новый СписокЗначений);
        +	ВыборкаАдреса = Выборка.Выбрать();
        +	Пока ВыборкаАдреса.Следующий() Цикл
        +		Адреса.Адреса.Добавить(ВыборкаАдреса.АдресЭП);
        +	КонецЦикла;
        +	
        +	Возврат Адреса;
        +	
        +КонецФункции
        +
        +// Получает адреса электронной почты контакта.
        +//
        +// Параметры:
        +//  Контакт - ОпределяемыйТип.КонтактВзаимодействия - контакт, для которого получаются данные.
        +//
        +// Возвращаемое значение:
        +//  Массив - массив структур содержащих адреса, виды и представления адресов.
        +//
        +Функция ПолучитьАдресаЭлектроннойПочтыКонтакта(Контакт, ВключатьНезаполненныеВиды = Ложь) Экспорт
        +	
        +	Если Не ЗначениеЗаполнено(Контакт) Тогда
        +		Возврат Неопределено;
        +	КонецЕсли;
        +	
        +	Запрос = Новый Запрос;
        +	ИмяМетаданныхКонтакта = Контакт.Метаданные().Имя;
        +	
        +	Если ВключатьНезаполненныеВиды Тогда
        +		
        +		Запрос.Текст =
        +		"ВЫБРАТЬ
        +		|	ВидыКонтактнойИнформации.Ссылка КАК Вид,
        +		|	ВидыКонтактнойИнформации.Наименование КАК ВидНаименование,
        +		|	Контакты.Ссылка КАК Контакт
        +		|ПОМЕСТИТЬ КонтактВидыКИ
        +		|ИЗ
        +		|	Справочник.ВидыКонтактнойИнформации КАК ВидыКонтактнойИнформации,
        +		|	Справочник." + ИмяМетаданныхКонтакта + " КАК Контакты
        +		|ГДЕ
        +		|	ВидыКонтактнойИнформации.Родитель = &ГруппаВидаКонтактнойИнформации
        +		|	И Контакты.Ссылка = &Контакт
        +		|	И ВидыКонтактнойИнформации.Тип = ЗНАЧЕНИЕ(Перечисление.ТипыКонтактнойИнформации.АдресЭлектроннойПочты)
        +		|;
        +		|
        +		|////////////////////////////////////////////////////////////////////////////////
        +		|ВЫБРАТЬ
        +		|	Представление(КонтактВидыКИ.Контакт) КАК Представление,
        +		|	ЕСТЬNULL(КонтактнаяИнформация.АдресЭП, """") КАК АдресЭП,
        +		|	КонтактВидыКИ.Вид,
        +		|	КонтактВидыКИ.ВидНаименование
        +		|ИЗ
        +		|	КонтактВидыКИ КАК КонтактВидыКИ
        +		|		ЛЕВОЕ СОЕДИНЕНИЕ Справочник." + ИмяМетаданныхКонтакта + ".КонтактнаяИнформация КАК КонтактнаяИнформация
        +		|		ПО (КонтактнаяИнформация.Ссылка = КонтактВидыКИ.Контакт)
        +		|			И (КонтактнаяИнформация.Вид = КонтактВидыКИ.Вид)";
        +		
        +		ГруппаВидаКонтактнойИнформации = УправлениеКонтактнойИнформацией.ВидКонтактнойИнформацииПоИмени("Справочник" + ИмяМетаданныхКонтакта);
        +		Запрос.УстановитьПараметр("ГруппаВидаКонтактнойИнформации", ГруппаВидаКонтактнойИнформации);
        +	Иначе
        +		
        +		Запрос.Текст =
        +		"ВЫБРАТЬ
        +		|	Таблицы.АдресЭП,
        +		|	Таблицы.Вид,
        +		|	Таблицы.Представление,
        +		|	Таблицы.Вид.Наименование КАК ВидНаименование
        +		|ИЗ
        +		|	Справочник." + ИмяМетаданныхКонтакта + ".КонтактнаяИнформация КАК Таблицы
        +		|ГДЕ
        +		|	Таблицы.Ссылка = &Контакт
        +		|	И Таблицы.Тип = ЗНАЧЕНИЕ(Перечисление.ТипыКонтактнойИнформации.АдресЭлектроннойПочты)";
        +		
        +	КонецЕсли;
        +	
        +	Запрос.УстановитьПараметр("Контакт", Контакт);
        +	
        +	Выборка = Запрос.Выполнить().Выбрать();
        +	Если Выборка.Количество() = 0 Тогда
        +		Возврат Новый Массив;
        +	КонецЕсли;
        +	
        +	Результат = Новый Массив;
        +	Пока Выборка.Следующий() Цикл
        +		Адрес = Новый Структура;
        +		Адрес.Вставить("АдресЭП",         Выборка.АдресЭП);
        +		Адрес.Вставить("Вид",             Выборка.Вид);
        +		Адрес.Вставить("Представление",   Выборка.Представление);
        +		Адрес.Вставить("ВидНаименование", Выборка.ВидНаименование);
        +		Результат.Добавить(Адрес);
        +	КонецЦикла;
        +	
        +	Возврат Результат;
        +	
        +КонецФункции
        +
        +Функция ОтправитьПолучитьПочтуПользователяВФоне(УникальныйИдентификатор) Экспорт
        +	
        +	ПараметрыПроцедуры = Новый Структура;
        +	
        +	ПараметрыВыполнения = ДлительныеОперации.ПараметрыВыполненияВФоне(УникальныйИдентификатор);
        +	ПараметрыВыполнения.НаименованиеФоновогоЗадания = НСтр("ru = 'Получение и отправка электронной почты пользователя'");
        +	
        +	ДлительнаяОперация = ДлительныеОперации.ВыполнитьВФоне("УправлениеЭлектроннойПочтой.ОтправитьЗагрузитьПочтуПользователя",
        +		ПараметрыПроцедуры,	ПараметрыВыполнения);
        +	Возврат ДлительнаяОперация;
        +	
        +КонецФункции
        +
        +////////////////////////////////////////////////////////////////////////////////
        +//  Прочее
        +
        +// Устанавливает предмет для массива взаимодействий.
        +//
        +// Параметры:
        +//  МассивВзаимодействий - Массив - массив взаимодействий для которых будет установлен предмет.
        +//  Предмет  - Ссылка - предмет, на который будет выполнена замена.
        +//  ПроверятьНаличиеДругихЦепочек - Булево - если Истина, то будет выполнена замена предмета и для взаимодействий,
        +//                                           которые входят в  цепочки взаимодействий первым взаимодействием которых
        +//                                           является взаимодействие входящее в массив.
        +//
        +Процедура УстановитьПредметДляМассиваВзаимодействий(МассивВзаимодействий, Предмет, ПроверятьНаличиеДругихЦепочек = Ложь) Экспорт
        +
        +	Если ПроверятьНаличиеДругихЦепочек Тогда
        +		
        +		Запрос = Новый Запрос;
        +		Запрос.Текст = "ВЫБРАТЬ РАЗЛИЧНЫЕ
        +		|	ПредметыВзаимодействий.Взаимодействие КАК Ссылка
        +		|ИЗ
        +		|	РегистрСведений.ПредметыПапкиВзаимодействий КАК ПредметыВзаимодействий
        +		|ГДЕ
        +		|	НЕ (НЕ ПредметыВзаимодействий.Предмет В (&МассивВзаимодействий)
        +		|			И НЕ ПредметыВзаимодействий.Взаимодействие В (&МассивВзаимодействий))";
        +		
        +		Запрос.УстановитьПараметр("МассивВзаимодействий", МассивВзаимодействий);
        +		МассивВзаимодействий = Запрос.Выполнить().Выгрузить().ВыгрузитьКолонку("Ссылка");
        +		
        +	КонецЕсли;
        +	
        +	НачатьТранзакцию();
        +	Попытка
        +		Блокировка = Новый БлокировкаДанных;
        +		РегистрыСведений.ПредметыПапкиВзаимодействий.ЗаблокироватьПредметыПапокВзаимодействий(Блокировка, МассивВзаимодействий);
        +		Блокировка.Заблокировать();
        +		
        +		Если ТипЗнч(Предмет) = Тип("РегистрСведенийКлючЗаписи.СостоянияПредметовВзаимодействий") Тогда
        +			Предмет = Предмет.Предмет;
        +		КонецЕсли;
        +		
        +		Запрос = Новый Запрос;
        +		Запрос.Текст = "ВЫБРАТЬ РАЗЛИЧНЫЕ
        +		|	ПредметыПапкиВзаимодействий.Предмет
        +		|ИЗ
        +		|	РегистрСведений.ПредметыПапкиВзаимодействий КАК ПредметыПапкиВзаимодействий
        +		|ГДЕ
        +		|	ПредметыПапкиВзаимодействий.Взаимодействие В(&МассивВзаимодействий)
        +		|
        +		|ОБЪЕДИНИТЬ ВСЕ
        +		|
        +		|ВЫБРАТЬ
        +		|	&Предмет";
        +		
        +		Запрос.УстановитьПараметр("Предмет", Предмет);
        +		Запрос.УстановитьПараметр("МассивВзаимодействий", МассивВзаимодействий);
        +		
        +		ВыборкаПредметы = Запрос.Выполнить().Выбрать();
        +		
        +		Для Каждого Взаимодействие Из МассивВзаимодействий Цикл
        +			Взаимодействия.УстановитьПредмет(Взаимодействие, Предмет, Ложь);
        +		КонецЦикла;
        +		
        +		Взаимодействия.РассчитатьРассмотреноПоПредметам(Взаимодействия.ТаблицаДанныхДляРасчетаРассмотрено(ВыборкаПредметы, "Предмет"));
        +		ЗафиксироватьТранзакцию();
        +	Исключение
        +		ОтменитьТранзакцию();
        +		ВызватьИсключение;
        +	КонецПопытки;	
        +КонецПроцедуры
        +
        +// Преобразует письмо в двоичные данные и подготавливает к сохранению на диск.
        +//
        +// Параметры:
        +//  Письмо                  - ДокументСсылка.ЭлектронноеПисьмоВходящее,
        +//                            ДокументСсылка.ЭлектронноеПисьмоИсходящее - письмо, которое подготавливается к сохранению.
        +//  УникальныйИдентификатор - УникальныйИдентификатор - уникальный идентификатор формы, из которой была вызвана команда сохранения.
        +//
        +// Возвращаемое значение:
        +//  Структура - структура, содержащая подготовленные данные письма.
        +//
        +Функция ДанныеПисьмаДляСохраненияКакФайл(Письмо, УникальныйИдентификатор) Экспорт
        +
        +	ДанныеФайла = СтруктураДанныхФайла();
        +	
        +	ДанныеПисьма = Взаимодействия.ИнтернетПочтовоеСообщениеИзПисьма(Письмо);
        +	Если ДанныеПисьма <> Неопределено Тогда
        +		
        +		ДвоичныеДанные = ДанныеПисьма.ИнтернетПочтовоеСообщение.ПолучитьИсходныеДанные();
        +		ДанныеФайла.СсылкаНаДвоичныеДанныеФайла = ПоместитьВоВременноеХранилище(ДвоичныеДанные, УникальныйИдентификатор);
        +
        +		ДанныеФайла.Наименование = Взаимодействия.ПредставлениеПисьма(ДанныеПисьма.ИнтернетПочтовоеСообщение.Тема,
        +			ДанныеПисьма.ДатаПисьма);
        +		
        +		ДанныеФайла.Расширение  = "eml";
        +		ДанныеФайла.ИмяФайла    = ДанныеФайла.Наименование + "." + ДанныеФайла.Расширение;
        +		ДанныеФайла.Размер      = ДвоичныеДанные.Размер();
        +		ПапкаДляСохранитьКак = ОбщегоНазначения.ХранилищеОбщихНастроекЗагрузить("НастройкиПрограммы", "ПапкаДляСохранитьКак");
        +		ДанныеФайла.Вставить("ПапкаДляСохранитьКак", ПапкаДляСохранитьКак);
        +		ДанныеФайла.ДатаМодификацииУниверсальная = ТекущаяДатаСеанса();
        +		ДанныеФайла.ПолноеНаименованиеВерсии = ДанныеФайла.ИмяФайла;
        +		
        +	КонецЕсли;
        +	
        +	Возврат ДанныеФайла;
        +
        +КонецФункции
        +
        +Функция СтруктураДанныхФайла()
        +
        +	СтруктураДанныхФайла = Новый Структура;
        +	СтруктураДанныхФайла.Вставить("СсылкаНаДвоичныеДанныеФайла",        "");
        +	СтруктураДанныхФайла.Вставить("ОтносительныйПуть",                  "");
        +	СтруктураДанныхФайла.Вставить("ДатаМодификацииУниверсальная",       Дата(1, 1, 1));
        +	СтруктураДанныхФайла.Вставить("ИмяФайла",                           "");
        +	СтруктураДанныхФайла.Вставить("Наименование",                       "");
        +	СтруктураДанныхФайла.Вставить("Расширение",                         "");
        +	СтруктураДанныхФайла.Вставить("Размер",                             "");
        +	СтруктураДанныхФайла.Вставить("Редактирует",                        Неопределено);
        +	СтруктураДанныхФайла.Вставить("ПодписанЭП",                         Ложь);
        +	СтруктураДанныхФайла.Вставить("Зашифрован",                         Ложь);
        +	СтруктураДанныхФайла.Вставить("ФайлРедактируется",                  Ложь);
        +	СтруктураДанныхФайла.Вставить("ФайлРедактируетТекущийПользователь", Ложь);
        +	СтруктураДанныхФайла.Вставить("ПолноеНаименованиеВерсии",           "");
        +	
        +	Возврат СтруктураДанныхФайла;
        +
        +КонецФункции 
        +
        +#КонецОбласти
        \ No newline at end of file diff --git a/plugins/autoloader/prism-autoloader.js b/plugins/autoloader/prism-autoloader.js index 6abf07929e..f41a75654c 100644 --- a/plugins/autoloader/prism-autoloader.js +++ b/plugins/autoloader/prism-autoloader.js @@ -161,6 +161,7 @@ "shell": "bash", "shortcode": "bbcode", "rbnf": "bnf", + "oscript": "bsl", "cs": "csharp", "dotnet": "csharp", "coffee": "coffeescript", diff --git a/plugins/autoloader/prism-autoloader.min.js b/plugins/autoloader/prism-autoloader.min.js index 9f0ccfe909..ccb4d295d0 100644 --- a/plugins/autoloader/prism-autoloader.min.js +++ b/plugins/autoloader/prism-autoloader.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof self&&self.Prism&&self.document&&document.createElement){var n={javascript:"clike",actionscript:"javascript",arduino:"cpp",aspnet:["markup","csharp"],bison:"c",c:"clike",csharp:"clike",cpp:"c",coffeescript:"javascript",crystal:"ruby","css-extras":"css",d:"clike",dart:"clike",django:"markup-templating",ejs:["javascript","markup-templating"],etlua:["lua","markup-templating"],erb:["ruby","markup-templating"],fsharp:"clike","firestore-security-rules":"clike",flow:"javascript",ftl:"markup-templating",gml:"clike",glsl:"c",go:"clike",groovy:"clike",haml:"ruby",handlebars:"markup-templating",haxe:"clike",hlsl:"c",java:"clike",javadoc:["markup","java","javadoclike"],jolie:"clike",jsdoc:["javascript","javadoclike","typescript"],"js-extras":"javascript",json5:"json",jsonp:"json","js-templates":"javascript",kotlin:"clike",latte:["clike","markup-templating","php"],less:"css",lilypond:"scheme",markdown:"markup","markup-templating":"markup",mongodb:"javascript",n4js:"javascript",nginx:"clike",objectivec:"c",opencl:"c",parser:"markup",php:["clike","markup-templating"],phpdoc:["php","javadoclike"],"php-extras":"php",plsql:"sql",processing:"clike",protobuf:"clike",pug:["markup","javascript"],purebasic:"clike",qml:"javascript",qore:"clike",racket:"scheme",jsx:["markup","javascript"],tsx:["jsx","typescript"],reason:"clike",ruby:"clike",sass:"css",scss:"css",scala:"java","shell-session":"bash",smarty:"markup-templating",solidity:"clike",soy:"markup-templating",sparql:"turtle",sqf:"clike",swift:"clike","t4-cs":["t4-templating","csharp"],"t4-vb":["t4-templating","vbnet"],tap:"yaml",tt2:["clike","markup-templating"],textile:"markup",twig:"markup",typescript:"javascript",vala:"clike",vbnet:"basic",velocity:"markup",wiki:"markup",xeora:"markup","xml-doc":"markup",xquery:"markup"},l={html:"markup",xml:"markup",svg:"markup",mathml:"markup",ssml:"markup",atom:"markup",rss:"markup",js:"javascript",g4:"antlr4",adoc:"asciidoc",shell:"bash",shortcode:"bbcode",rbnf:"bnf",cs:"csharp",dotnet:"csharp",coffee:"coffeescript",conc:"concurnas",jinja2:"django","dns-zone":"dns-zone-file",dockerfile:"docker",eta:"ejs",xlsx:"excel-formula",xls:"excel-formula",gamemakerlanguage:"gml",hs:"haskell",gitignore:"ignore",hgignore:"ignore",npmignore:"ignore",webmanifest:"json",kt:"kotlin",kts:"kotlin",tex:"latex",context:"latex",ly:"lilypond",emacs:"lisp",elisp:"lisp","emacs-lisp":"lisp",md:"markdown",moon:"moonscript",n4jsd:"n4js",nani:"naniscript",objc:"objectivec",objectpascal:"pascal",px:"pcaxis",pcode:"peoplecode",pq:"powerquery",mscript:"powerquery",pbfasm:"purebasic",py:"python",rkt:"racket",rpy:"renpy",robot:"robotframework",rb:"ruby",sol:"solidity",sln:"solution-file",rq:"sparql",t4:"t4-cs",trig:"turtle",ts:"typescript",tsconfig:"typoscript",uscript:"unrealscript",uc:"unrealscript",vb:"visual-basic",vba:"visual-basic",xeoracube:"xeora",yml:"yaml"},p={},e="components/",a=Prism.util.currentScript();if(a){var r=/\bplugins\/autoloader\/prism-autoloader\.(?:min\.)js(?:\?[^\r\n/]*)?$/i,t=/(^|\/)[\w-]+\.(?:min\.)js(?:\?[^\r\n/]*)?$/i,i=a.getAttribute("data-autoloader-path");if(null!=i)e=i.trim().replace(/\/?$/,"/");else{var s=a.src;r.test(s)?e=s.replace(r,"components/"):t.test(s)&&(e=s.replace(t,"$1components/"))}}var o=Prism.plugins.autoloader={languages_path:e,use_minified:!0,loadLanguages:m};Prism.hooks.add("complete",function(e){var a=e.element,r=e.language;if(a&&r&&"none"!==r){var t=function(e){var a=(e.getAttribute("data-dependencies")||"").trim();if(!a){var r=e.parentElement;r&&"pre"===r.tagName.toLowerCase()&&(a=(r.getAttribute("data-dependencies")||"").trim())}return a?a.split(/\s*,\s*/g):[]}(a);t.push(r),t.every(u)||m(t,function(){Prism.highlightElement(a)})}})}function u(e){if(0<=e.indexOf("!"))return!1;if((e=l[e]||e)in Prism.languages)return!0;var a=p[e];return a&&!a.error&&!1===a.loading}function m(e,a,r){"string"==typeof e&&(e=[e]);var t=e.length,i=0,s=!1;function c(){s||++i===t&&a&&a(e)}0!==t?e.forEach(function(e){!function(a,r,t){var i=0<=a.indexOf("!");function e(){var e=p[a];e||(e=p[a]={callbacks:[]}),e.callbacks.push({success:r,error:t}),!i&&u(a)?k(a,"success"):!i&&e.error?k(a,"error"):!i&&e.loading||(e.loading=!0,e.error=!1,function(e,a,r){var t=document.createElement("script");t.src=e,t.async=!0,t.onload=function(){document.body.removeChild(t),a&&a()},t.onerror=function(){document.body.removeChild(t),r&&r()},document.body.appendChild(t)}(function(e){return o.languages_path+"prism-"+e+(o.use_minified?".min":"")+".js"}(a),function(){e.loading=!1,k(a,"success")},function(){e.loading=!1,e.error=!0,k(a,"error")}))}a=a.replace("!",""),a=l[a]||a;var s=n[a];s&&s.length?m(s,e,t):e()}(e,c,function(){s||(s=!0,r&&r(e))})}):a&&setTimeout(a,0)}function k(e,a){if(p[e]){for(var r=p[e].callbacks,t=0,i=r.length;t >= ++ - * / +% = +and or not и или не +---------------------------------------------------- + +[ + ["operator", "<"], ["operator", "<="], ["operator", ">"], ["operator", ">="], + ["operator", "+"], ["operator", "-"], ["operator", "*"], ["operator", "/"], + ["operator", "%"], ["operator", "="], + ["operator", "and"], ["operator", "or"], ["operator", "not"], ["operator", "и"], ["operator", "или"], ["operator", "не"] + +] + +---------------------------------------------------- + +Checks for operators. \ No newline at end of file diff --git a/tests/languages/bsl/string_feature.test b/tests/languages/bsl/string_feature.test new file mode 100644 index 0000000000..4df2508a87 --- /dev/null +++ b/tests/languages/bsl/string_feature.test @@ -0,0 +1,13 @@ +"" +"fo" + +---------------------------------------------------- + +[ + ["string", "\"\""], + ["string", "\"fo\""] +] + +---------------------------------------------------- + +Checks for strings and chars. \ No newline at end of file From bafab63473f759e985e2a98ea494e32056f8d11d Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Mon, 17 Aug 2020 16:22:21 +0200 Subject: [PATCH 0616/1100] Tests: Added an option to accept the actual token stream (#2515) --- test-suite.html | 24 +++++++- tests/helper/test-case.js | 124 +++++++++++++++++++++++--------------- tests/run.js | 4 +- 3 files changed, 99 insertions(+), 53 deletions(-) diff --git a/test-suite.html b/test-suite.html index 2e2e171b3b..e1079901ab 100644 --- a/test-suite.html +++ b/test-suite.html @@ -93,8 +93,11 @@

        Writing your test

        Your file is built up of two or three sections, separated by ten or more dashes -, starting at the begin of the line:

          -
        1. Your language snippet. The code you want to compile using Prism. (required)
        2. -
        3. The simplified token stream you expect. Needs to be valid JSON. (required)
        4. +
        5. Your language snippet. The code you want to tokenize using Prism. (required)
        6. +
        7. + The simplified token stream you expect. Needs to be valid JSON. (optional)
          + If there no token stream defined, the test case will fail unless the --accept flag is present when running the test command (e.g. npm run test:languages -- --accept). If the flag is present and there is no expected token stream, the runner will insert the actual token stream into the test case file, changing it. +
        8. A comment explaining the test case. (optional)

        The easiest way would be to look at an existing test file:

        @@ -114,10 +117,25 @@

        Writing your test

        This is a comment explaining this test case.
        +

        The easy way

        +

        The easy way to create one or multiple new test case(s) is this:

        + +
          +
        1. Create a new file for a new test case in tests/languages/${language}.
        2. +
        3. Insert the code you want to test (and nothing more).
        4. +
        5. Repeat the first two steps for as many test cases as you want.
        6. +
        7. Run npm run test:languages -- --accept.
        8. +
        9. Done.
        10. +
        + +

        This works by making the test runner insert the actual token stream of you test code as the expected token stream. Carefully check that the inserted token stream is actually what you expect or else the test is meaningless!

        + +

        Optionally, you can then also add comments to test cases.

        +

        Explaining the simplified token stream

        -

        While compiling, Prism transforms your source code into a token stream. This is basically a tree of nested tokens (or arrays, or strings).

        +

        While highlighting, Prism transforms your source code into a token stream. This is basically a tree of nested tokens (or arrays, or strings).

        As these trees are hard to write by hand, the test runner uses a simplified version of it.

        It uses the following rules:

          diff --git a/tests/helper/test-case.js b/tests/helper/test-case.js index 0ebd277e8c..a00ceda1aa 100644 --- a/tests/helper/test-case.js +++ b/tests/helper/test-case.js @@ -49,43 +49,66 @@ module.exports = { * * @param {string} languageIdentifier * @param {string} filePath + * @param {boolean} acceptEmpty */ - runTestCase(languageIdentifier, filePath) { + runTestCase(languageIdentifier, filePath, acceptEmpty) { const testCase = this.parseTestCaseFile(filePath); const usedLanguages = this.parseLanguageNames(languageIdentifier); - if (null === testCase) { - throw new Error("Test case file has invalid format (or the provided token stream is invalid JSON), please read the docs."); - } - const Prism = PrismLoader.createInstance(usedLanguages.languages); // the first language is the main language to highlight - const simplifiedTokenStream = this.simpleTokenize(Prism, testCase.testSource, usedLanguages.mainLanguage); + const simplifiedTokenStream = this.simpleTokenize(Prism, testCase.code, usedLanguages.mainLanguage); + + if (testCase.expectedTokenStream === null) { + // the test case doesn't have an expected value + if (!acceptEmpty) { + throw new Error('This test case doesn\'t have an expected toke n stream.' + + ' Either add the JSON of a token stream or run \`npm run test:languages -- --accept\`' + + ' to automatically add the current token stream.'); + } + + // change the file + const lineEnd = (/\r\n/.test(testCase.code) || !/\n/.test(testCase.code)) ? '\r\n' : '\n'; + const separator = "\n\n----------------------------------------------------\n\n"; + const pretty = TokenStreamTransformer.prettyprint(simplifiedTokenStream) + .replace(/^( +)/gm, m => { + return "\t".repeat(m.length / 4); + }); + + let content = testCase.code + separator + pretty; + if (testCase.comment) { + content += separator + testCase.comment; + } + content = content.replace(/\r?\n/g, lineEnd); - const actual = JSON.stringify(simplifiedTokenStream); - const expected = JSON.stringify(testCase.expectedTokenStream); + fs.writeFileSync(filePath, content, "utf-8"); + } else { + // there is an expected value + const actual = JSON.stringify(simplifiedTokenStream); + const expected = JSON.stringify(testCase.expectedTokenStream); - if (actual === expected) { - // no difference - return; - } + if (actual === expected) { + // no difference + return; + } - // The index of the first difference between the expected token stream and the actual token stream. - // The index is in the raw expected token stream JSON of the test case. - const diffIndex = translateIndexIgnoreSpaces(testCase.expectedJson, expected, firstDiff(expected, actual)); - const expectedJsonLines = testCase.expectedJson.substr(0, diffIndex).split(/\r\n?|\n/g); - const columnNumber = expectedJsonLines.pop().length + 1; - const lineNumber = testCase.expectedLineOffset + expectedJsonLines.length; - - const tokenStreamStr = TokenStreamTransformer.prettyprint(simplifiedTokenStream); - const message = "\n\nActual Token Stream:" + - "\n-----------------------------------------\n" + - tokenStreamStr + - "\n-----------------------------------------\n" + - "File: " + filePath + ":" + lineNumber + ":" + columnNumber + "\n\n"; - - assert.deepEqual(simplifiedTokenStream, testCase.expectedTokenStream, testCase.comment + message); + // The index of the first difference between the expected token stream and the actual token stream. + // The index is in the raw expected token stream JSON of the test case. + const diffIndex = translateIndexIgnoreSpaces(testCase.expectedJson, expected, firstDiff(expected, actual)); + const expectedJsonLines = testCase.expectedJson.substr(0, diffIndex).split(/\r\n?|\n/g); + const columnNumber = expectedJsonLines.pop().length + 1; + const lineNumber = testCase.expectedLineOffset + expectedJsonLines.length; + + const tokenStreamStr = TokenStreamTransformer.prettyprint(simplifiedTokenStream); + const message = "\n\nActual Token Stream:" + + "\n-----------------------------------------\n" + + tokenStreamStr + + "\n-----------------------------------------\n" + + "File: " + filePath + ":" + lineNumber + ":" + columnNumber + "\n\n"; + + assert.deepEqual(simplifiedTokenStream, testCase.expectedTokenStream, testCase.comment + message); + } }, /** @@ -160,33 +183,36 @@ module.exports = { * * @private * @param {string} filePath - * @returns {{testSource: string, expectedTokenStream: Array, comment:string?}|null} + * @returns {ParsedTestCase} + * + * @typedef ParsedTestCase + * @property {string} code + * @property {string} expectedJson + * @property {number} expectedLineOffset + * @property {Array | null} expectedTokenStream + * @property {string} comment */ parseTestCaseFile(filePath) { const testCaseSource = fs.readFileSync(filePath, "utf8"); - const testCaseParts = testCaseSource.split(/^-{10,}\w*$/m); - - try { - const testCase = { - testSource: testCaseParts[0].trim(), - expectedJson: testCaseParts[1], - expectedLineOffset: testCaseParts[0].split(/\r\n?|\n/g).length, - expectedTokenStream: JSON.parse(testCaseParts[1]), - comment: null - }; - - // if there are three parts, the third one is the comment - // explaining the test case - if (testCaseParts[2]) { - testCase.comment = testCaseParts[2].trim(); - } + const testCaseParts = testCaseSource.split(/^-{10,}[ \t]*$/m); - return testCase; - } - catch (e) { - // the JSON can't be parsed (e.g. it could be empty) - return null; + if (testCaseParts.length > 3) { + throw new Error("Invalid test case format: Too many sections."); } + + const code = testCaseParts[0].trim(); + const expected = (testCaseParts[1] || '').trim(); + const comment = (testCaseParts[2] || '').trim(); + + const testCase = { + code, + expectedJson: expected, + expectedLineOffset: code.split(/\r\n?|\n/g).length, + expectedTokenStream: expected ? JSON.parse(expected) : null, + comment + }; + + return testCase; }, /** diff --git a/tests/run.js b/tests/run.js index b9c8893ffe..4803dde72b 100644 --- a/tests/run.js +++ b/tests/run.js @@ -12,6 +12,8 @@ const testSuite = // load complete test suite : TestDiscovery.loadAllTests(__dirname + "/languages"); +const accept = !!argv.accept; + // define tests for all tests in all languages in the test suite for (const language in testSuite) { if (!testSuite.hasOwnProperty(language)) { @@ -27,7 +29,7 @@ for (const language in testSuite) { it("– should pass test case '" + fileName + "'", function () { if (path.extname(filePath) === '.test') { - TestCase.runTestCase(language, filePath); + TestCase.runTestCase(language, filePath, accept); } else { TestCase.runTestsWithHooks(language, require(filePath)); } From 6c921801348f53b98400c06ed2224a237fdae834 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Thu, 27 Aug 2020 19:14:20 +0200 Subject: [PATCH 0617/1100] Shell session & bash: Highlight all commands after the start of any Heredoc string (#2509) --- components/prism-bash.js | 20 ++++++++++-- components/prism-bash.min.js | 2 +- components/prism-shell-session.js | 8 ++--- components/prism-shell-session.min.js | 2 +- tests/languages/bash/string_feature.test | 15 +++++++-- .../shell-session/command_string_feature.test | 31 +++++++++++++++++-- 6 files changed, 63 insertions(+), 15 deletions(-) diff --git a/components/prism-bash.js b/components/prism-bash.js index f7b5eeeeea..2efd8d619c 100644 --- a/components/prism-bash.js +++ b/components/prism-bash.js @@ -4,7 +4,16 @@ // + make sure PS1..4 are here as they are not always set, // - some useless things. var envVars = '\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b'; + + var commandAfterHeredoc = { + pattern: /(^(["']?)\w+\2)[ \t]+\S.*/, + lookbehind: true, + alias: 'punctuation', // this looks reasonably well in all themes + inside: null // see below + }; + var insideString = { + 'bash': commandAfterHeredoc, 'environment': { pattern: RegExp("\\$" + envVars), alias: 'constant' @@ -107,7 +116,7 @@ 'string': [ // Support for Here-documents https://en.wikipedia.org/wiki/Here_document { - pattern: /((?:^|[^<])<<-?\s*)(\w+?)\s*(?:\r?\n|\r)[\s\S]*?(?:\r?\n|\r)\2/, + pattern: /((?:^|[^<])<<-?\s*)(\w+?)\s[\s\S]*?(?:\r?\n|\r)\2/, lookbehind: true, greedy: true, inside: insideString @@ -115,9 +124,12 @@ // Here-document with quotes around the tag // → No expansion (so no “inside”). { - pattern: /((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s*(?:\r?\n|\r)[\s\S]*?(?:\r?\n|\r)\3/, + pattern: /((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/, lookbehind: true, - greedy: true + greedy: true, + inside: { + 'bash': commandAfterHeredoc + } }, // “Normal” string { @@ -172,6 +184,8 @@ } }; + commandAfterHeredoc.inside = Prism.languages.bash; + /* Patterns in command substitution. */ var toBeCopied = [ 'comment', diff --git a/components/prism-bash.min.js b/components/prism-bash.min.js index bf4e91a8c7..835749bfdc 100644 --- a/components/prism-bash.min.js +++ b/components/prism-bash.min.js @@ -1 +1 @@ -!function(e){var t="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",n={environment:{pattern:RegExp("\\$"+t),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--?|-=|\+\+?|\+=|!=?|~|\*\*?|\*=|\/=?|%=?|<<=?|>>=?|<=?|>=?|==?|&&?|&=|\^=?|\|\|?|\|=|\?|:/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+t),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|x[0-9a-fA-F]{1,2}|u[0-9a-fA-F]{4}|U[0-9a-fA-F]{8})/};e.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)\w+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b\w+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+t),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+?)\s*(?:\r?\n|\r)[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:n},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s*(?:\r?\n|\r)[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\](?:\\\\)*)(["'])(?:\\[\s\S]|\$\([^)]+\)|`[^`]+`|(?!\2)[^\\])*\2/,lookbehind:!0,greedy:!0,inside:n}],environment:{pattern:RegExp("\\$?"+t),alias:"constant"},variable:n.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|aptitude|apt-cache|apt-get|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:if|then|else|elif|fi|for|while|in|case|esac|function|select|do|done|until)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|break|cd|continue|eval|exec|exit|export|getopts|hash|pwd|readonly|return|shift|test|times|trap|umask|unset|alias|bind|builtin|caller|command|declare|echo|enable|help|let|local|logout|mapfile|printf|read|readarray|source|type|typeset|ulimit|unalias|set|shopt)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:true|false)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|==?|!=?|=~|<<[<-]?|[&\d]?>>|\d?[<>]&?|&[>&]?|\|[&|]?|<=?|>=?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}};for(var a=["comment","function-name","for-or-select","assign-left","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],r=n.variable[1].inside,s=0;s>=?|<=?|>=?|==?|&&?|&=|\^=?|\|\|?|\|=|\?|:/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+t),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|x[0-9a-fA-F]{1,2}|u[0-9a-fA-F]{4}|U[0-9a-fA-F]{8})/};e.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)\w+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b\w+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+t),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+?)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:a},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:n}},{pattern:/(^|[^\\](?:\\\\)*)(["'])(?:\\[\s\S]|\$\([^)]+\)|`[^`]+`|(?!\2)[^\\])*\2/,lookbehind:!0,greedy:!0,inside:a}],environment:{pattern:RegExp("\\$?"+t),alias:"constant"},variable:a.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|aptitude|apt-cache|apt-get|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:if|then|else|elif|fi|for|while|in|case|esac|function|select|do|done|until)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|break|cd|continue|eval|exec|exit|export|getopts|hash|pwd|readonly|return|shift|test|times|trap|umask|unset|alias|bind|builtin|caller|command|declare|echo|enable|help|let|local|logout|mapfile|printf|read|readarray|source|type|typeset|ulimit|unalias|set|shopt)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:true|false)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|==?|!=?|=~|<<[<-]?|[&\d]?>>|\d?[<>]&?|&[>&]?|\|[&|]?|<=?|>=?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},n.inside=e.languages.bash;for(var s=["comment","function-name","for-or-select","assign-left","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],i=a.variable[1].inside,o=0;o>)+".replace(/<>/g,function(){return s})),greedy:!0,inside:{bash:{pattern:/(^[$#]\s*)[\s\S]+/,lookbehind:!0,alias:"language-bash",inside:n.languages.bash},"shell-symbol":{pattern:/^[$#]/,alias:"important"}}},output:/.(?:.*(?:[\r\n]|.$))*/}}(Prism); \ No newline at end of file +!function(n){var s=["([\"'])(?:\\\\[^]|\\$\\([^)]+\\)|`[^`]+`|(?!\\1)[^\\\\])*\\1","<<-?\\s*([\"']?)(\\w+)\\2\\s[^]*?[\r\n]\\3"].join("|");n.languages["shell-session"]={info:{pattern:/^[^\r\n$#*!]+(?=[$#])/m,alias:"punctuation",inside:{path:{pattern:/(:)[\s\S]+/,lookbehind:!0},user:/^[^\s@:$#*!/\\]+@[^\s@:$#*!/\\]+(?=:|$)/,punctuation:/:/}},command:{pattern:RegExp("[$#](?:[^\\\\\r\n'\"<]|\\\\.|<>)+".replace(/<>/g,function(){return s})),greedy:!0,inside:{bash:{pattern:/(^[$#]\s*)[\s\S]+/,lookbehind:!0,alias:"language-bash",inside:n.languages.bash},"shell-symbol":{pattern:/^[$#]/,alias:"important"}}},output:/.(?:.*(?:[\r\n]|.$))*/}}(Prism); \ No newline at end of file diff --git a/tests/languages/bash/string_feature.test b/tests/languages/bash/string_feature.test index 533ce79ae9..b82afd001d 100644 --- a/tests/languages/bash/string_feature.test +++ b/tests/languages/bash/string_feature.test @@ -91,18 +91,21 @@ STRING_END ["punctuation", "\\"], "'a ", ["comment", "# ' not a string"], + ["operator", [ "<<" ]], ["string", [ "STRING_END\r\nfoo\r\nbar\r\nSTRING_END" ]], + ["operator", [ "<<-" ]], ["string", [ "STRING_END\r\nfoo\r\nbar\r\nSTRING_END" ]], + ["operator", [ "<<" ]], @@ -111,20 +114,28 @@ STRING_END ["variable", "$@"], "\r\nbar\r\nEOF" ]], + ["operator", [ "<<" ]], - ["string", "'EOF'\r\n'single quoted string'\r\n\"double quoted string\"\r\nEOF"], + ["string", [ + "'EOF'\r\n'single quoted string'\r\n\"double quoted string\"\r\nEOF" + ]], + ["operator", [ "<<" ]], - ["string", "\"EOF\"\r\nfoo\r\n$bar\r\nEOF"], + ["string", [ + "\"EOF\"\r\nfoo\r\n$bar\r\nEOF" + ]], + ["operator", [ "<<" ]], ["string", [ "STRING_END\r\n# comment\r\nSTRING_END" ]], + ["string", [ "\" # comment \"" ]] diff --git a/tests/languages/shell-session/command_string_feature.test b/tests/languages/shell-session/command_string_feature.test index 4833cb4de1..a896f118e8 100644 --- a/tests/languages/shell-session/command_string_feature.test +++ b/tests/languages/shell-session/command_string_feature.test @@ -1,5 +1,6 @@ $ echo 'Foo > Bar' + $ echo "Foo > Bar" @@ -15,6 +16,11 @@ STRING_END $ echo \'a # ' +$ cat << "EOF" > /etc/ipsec.secrets +: RSA vpn-server-a.key +# : RSA vpn-server-b.key +EOF + ---------------------------------------------------- [ @@ -58,7 +64,9 @@ $ echo \'a # ' ["operator", [ "<<-" ]], - ["string", "\"STRING_END\"\r\nfoo\r\nbar\r\nSTRING_END"] + ["string", [ + "\"STRING_END\"\r\nfoo\r\nbar\r\nSTRING_END" + ]] ]] ]], @@ -71,7 +79,26 @@ $ echo \'a # ' ["comment", "# "] ]] ]], - ["output", "'"] + ["output", "'\r\n\r\n"], + ["command", [ + ["shell-symbol", "$"], + ["bash", [ + ["function", "cat"], + ["operator", [ + "<<" + ]], + ["string", [ + "\"EOF\"", + ["bash", [ + ["operator", [ + ">" + ]], + " /etc/ipsec.secrets" + ]], + "\r\n: RSA vpn-server-a.key\r\n# : RSA vpn-server-b.key\r\nEOF" + ]] + ]] + ]] ] ---------------------------------------------------- From 5ad6cb238933ae4fa6e46862fa8da3e4398c3e5a Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Thu, 27 Aug 2020 19:14:55 +0200 Subject: [PATCH 0618/1100] Custom class: Improved doc (#2512) --- plugins/custom-class/index.html | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/plugins/custom-class/index.html b/plugins/custom-class/index.html index 624c37bd94..f453e15f49 100644 --- a/plugins/custom-class/index.html +++ b/plugins/custom-class/index.html @@ -86,9 +86,9 @@

          Notes

          Feature functions must be called AFTER Prism and this plugin. For example:

          <!-- 1. load prism -->
          -<script src="prism.js"></script>
          +<script src="prism.js"></script>
           <!-- 2. load the plugin if you don't include it inside prism when download -->
          -<script src="plugins/custom-class/custom-class.js"></script>
          +<script src="plugins/custom-class/custom-class.js"></script>
           <!-- 3. call the feature you want to use -->
           <script>
           	Prism.plugins.customClass.map(myClassMap);
          @@ -109,6 +109,7 @@ 

          CSS Modules Usage:

          import classMap from 'styles/editor-class-map.css'; Prism.plugins.customClass.map(classMap)
          +

          Note: This plugin only affects generated token elements (usually of the form span.token). The classes of code and pre elements as well as all elements generated by other plugins (e.g. Toolbar elements and line number elements) will not be changed.

          @@ -117,7 +118,7 @@

          Example

          Prefix and map classes

          Input

          -
          <pre class="language-javascript"><code>
          +	
          <pre class="language-javascript"><code>
           	var foo = 'bar';
           </code></pre>
          @@ -129,18 +130,20 @@

          Prefix and map classes

          Prism.plugins.customClass.prefix('pr-');

          Output

          -
          <pre class="language-javascript"><code>
          -	<span class="pr-token pr-special-keyword">var</span>
          +	
          <pre class="language-javascript"><code class="language-markup">
          +	<span class="pr-token pr-special-keyword">var</span>
           	foo
          -	<span class="pr-token pr-operator">=</span>
          -	<span class="pr-token pr-my-string">'bar'</span>
          -	<span class="pr-token pr-punctuation">;</span>
          +	<span class="pr-token pr-operator">=</span>
          +	<span class="pr-token pr-my-string">'bar'</span>
          +	<span class="pr-token pr-punctuation">;</span>
           </code></pre>
          +

          Note that this plugin only affects tokens. The classes of the code and pre elements won't be prefixed.

          +

          Add new classes

          Input

          -
          <pre class="language-css"><code>
          +	
          <pre class="language-css"><code>
           a::after {
           	content: '\2b00 ';
           	opacity: .7;
          
          From 206dc80f48af4c5bf133d083ff543cad64df6e04 Mon Sep 17 00:00:00 2001
          From: Michael Schmidt 
          Date: Thu, 27 Aug 2020 19:16:21 +0200
          Subject: [PATCH 0619/1100] Docs: Minor improvement (#2513)
          
          ---
           components/prism-core.js |  8 ++++++--
           docs/Prism.hooks.html    |  6 +++---
           docs/Prism.html          | 13 ++++++++-----
           docs/Token.html          |  8 ++++----
           docs/global.html         | 10 +++++-----
           docs/prism-core.js.html  |  8 ++++++--
           prism.js                 |  8 ++++++--
           7 files changed, 38 insertions(+), 23 deletions(-)
          
          diff --git a/components/prism-core.js b/components/prism-core.js
          index 2be3562fb5..9f82910a8f 100644
          --- a/components/prism-core.js
          +++ b/components/prism-core.js
          @@ -455,7 +455,8 @@ var _ = {
           	 *
           	 * The following hooks will be run:
           	 * 1. `before-highlightall`
          -	 * 2. All hooks of {@link Prism.highlightElement} for each element.
          +	 * 2. `before-all-elements-highlight`
          +	 * 3. All hooks of {@link Prism.highlightElement} for each element.
           	 *
           	 * @param {ParentNode} container The root element, whose descendants that have a `.language-xxxx` class will be highlighted.
           	 * @param {boolean} [async=false] Whether each element is to be highlighted asynchronously using Web Workers.
          @@ -487,11 +488,14 @@ var _ = {
           	 * The following hooks will be run:
           	 * 1. `before-sanity-check`
           	 * 2. `before-highlight`
          -	 * 3. All hooks of {@link Prism.highlight}. These hooks will only be run by the current worker if `async` is `true`.
          +	 * 3. All hooks of {@link Prism.highlight}. These hooks will be run by an asynchronous worker if `async` is `true`.
           	 * 4. `before-insert`
           	 * 5. `after-highlight`
           	 * 6. `complete`
           	 *
          +	 * Some the above hooks will be skipped if the element doesn't contain any text or there is no grammar loaded for
          +	 * the element's language.
          +	 *
           	 * @param {Element} element The element containing the code.
           	 * It must have a class of `language-xxxx` to be processed, where `xxxx` is a valid language identifier.
           	 * @param {boolean} [async=false] Whether the element is to be highlighted asynchronously using Web Workers
          diff --git a/docs/Prism.hooks.html b/docs/Prism.hooks.html
          index a3528feefe..28f00aad29 100644
          --- a/docs/Prism.hooks.html
          +++ b/docs/Prism.hooks.html
          @@ -73,7 +73,7 @@ 

          Source:
          @@ -152,7 +152,7 @@

          (static) addSource:
          @@ -314,7 +314,7 @@

          (static) runSource:
          diff --git a/docs/Prism.html b/docs/Prism.html index 0744baa0a2..c1a9a500e8 100644 --- a/docs/Prism.html +++ b/docs/Prism.html @@ -263,7 +263,7 @@

          (static) hi
          Source:
          @@ -676,7 +676,7 @@

          (static) <
          Source:
          @@ -721,6 +721,7 @@

          (static) <

          The following hooks will be run:

          1. before-highlightall
          2. +
          3. before-all-elements-highlight
          4. All hooks of Prism.highlightElement for each element.
          @@ -910,7 +911,7 @@

          (static) Source:
          @@ -955,11 +956,13 @@

          (static)
        • before-sanity-check
        • before-highlight
        • -
        • All hooks of Prism.highlight. These hooks will only be run by the current worker if async is true.
        • +
        • All hooks of Prism.highlight. These hooks will be run by an asynchronous worker if async is true.
        • before-insert
        • after-highlight
        • complete
        • +

          Some the above hooks will be skipped if the element doesn't contain any text or there is no grammar loaded for +the element's language.

          @@ -1154,7 +1157,7 @@

          (static) tok
          Source:
          diff --git a/docs/Token.html b/docs/Token.html index 44437763fd..44e767db0c 100644 --- a/docs/Token.html +++ b/docs/Token.html @@ -80,7 +80,7 @@

          new TokenSource:
          @@ -364,7 +364,7 @@

          aliasSource:
          @@ -447,7 +447,7 @@

          contentSource:
          @@ -524,7 +524,7 @@

          typeSource:
          diff --git a/docs/global.html b/docs/global.html index 478976c1a5..380162886a 100644 --- a/docs/global.html +++ b/docs/global.html @@ -143,7 +143,7 @@

          Grammar

          Source:
          @@ -274,7 +274,7 @@

          GrammarToken

          Source:
          @@ -559,7 +559,7 @@

          High
          Source:
          @@ -713,7 +713,7 @@

          HookCallb
          Source:
          @@ -859,7 +859,7 @@

          TokenStream

          Source:
          diff --git a/docs/prism-core.js.html b/docs/prism-core.js.html index 644beffbea..fed9633629 100644 --- a/docs/prism-core.js.html +++ b/docs/prism-core.js.html @@ -508,7 +508,8 @@

          prism-core.js

          * * The following hooks will be run: * 1. `before-highlightall` - * 2. All hooks of {@link Prism.highlightElement} for each element. + * 2. `before-all-elements-highlight` + * 3. All hooks of {@link Prism.highlightElement} for each element. * * @param {ParentNode} container The root element, whose descendants that have a `.language-xxxx` class will be highlighted. * @param {boolean} [async=false] Whether each element is to be highlighted asynchronously using Web Workers. @@ -540,11 +541,14 @@

          prism-core.js

          * The following hooks will be run: * 1. `before-sanity-check` * 2. `before-highlight` - * 3. All hooks of {@link Prism.highlight}. These hooks will only be run by the current worker if `async` is `true`. + * 3. All hooks of {@link Prism.highlight}. These hooks will be run by an asynchronous worker if `async` is `true`. * 4. `before-insert` * 5. `after-highlight` * 6. `complete` * + * Some the above hooks will be skipped if the element doesn't contain any text or there is no grammar loaded for + * the element's language. + * * @param {Element} element The element containing the code. * It must have a class of `language-xxxx` to be processed, where `xxxx` is a valid language identifier. * @param {boolean} [async=false] Whether the element is to be highlighted asynchronously using Web Workers diff --git a/prism.js b/prism.js index 4eebe7d9ce..c4e6e24cf3 100644 --- a/prism.js +++ b/prism.js @@ -460,7 +460,8 @@ var _ = { * * The following hooks will be run: * 1. `before-highlightall` - * 2. All hooks of {@link Prism.highlightElement} for each element. + * 2. `before-all-elements-highlight` + * 3. All hooks of {@link Prism.highlightElement} for each element. * * @param {ParentNode} container The root element, whose descendants that have a `.language-xxxx` class will be highlighted. * @param {boolean} [async=false] Whether each element is to be highlighted asynchronously using Web Workers. @@ -492,11 +493,14 @@ var _ = { * The following hooks will be run: * 1. `before-sanity-check` * 2. `before-highlight` - * 3. All hooks of {@link Prism.highlight}. These hooks will only be run by the current worker if `async` is `true`. + * 3. All hooks of {@link Prism.highlight}. These hooks will be run by an asynchronous worker if `async` is `true`. * 4. `before-insert` * 5. `after-highlight` * 6. `complete` * + * Some the above hooks will be skipped if the element doesn't contain any text or there is no grammar loaded for + * the element's language. + * * @param {Element} element The element containing the code. * It must have a class of `language-xxxx` to be processed, where `xxxx` is a valid language identifier. * @param {boolean} [async=false] Whether the element is to be highlighted asynchronously using Web Workers From bcef22afc4e1d309b283f4e4c61c9dfe607b1a40 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Thu, 27 Aug 2020 23:11:47 +0200 Subject: [PATCH 0620/1100] JS Extras: Added control-flow keywords (#2529) --- components/prism-js-extras.js | 4 ++++ components/prism-js-extras.min.js | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/components/prism-js-extras.js b/components/prism-js-extras.js index 2b8a77eae9..b2a7fcab11 100644 --- a/components/prism-js-extras.js +++ b/components/prism-js-extras.js @@ -37,6 +37,10 @@ pattern: /\b(?:as|default|export|from|import)\b/, alias: 'module' }, + { + pattern: /\b(?:await|break|catch|continue|do|else|for|finally|if|return|switch|throw|try|while|yield)\b/, + alias: 'control-flow' + }, { pattern: /\bnull\b/, alias: ['null', 'nil'] diff --git a/components/prism-js-extras.min.js b/components/prism-js-extras.min.js index 7a5aa0fce6..366f0e27d1 100644 --- a/components/prism-js-extras.min.js +++ b/components/prism-js-extras.min.js @@ -1 +1 @@ -!function(a){a.languages.insertBefore("javascript","function-variable",{"method-variable":{pattern:RegExp("(\\.\\s*)"+a.languages.javascript["function-variable"].pattern.source),lookbehind:!0,alias:["function-variable","method","function","property-access"]}}),a.languages.insertBefore("javascript","function",{method:{pattern:RegExp("(\\.\\s*)"+a.languages.javascript.function.source),lookbehind:!0,alias:["function","property-access"]}}),a.languages.insertBefore("javascript","constant",{"known-class-name":[{pattern:/\b(?:(?:(?:Uint|Int)(?:8|16|32)|Uint8Clamped|Float(?:32|64))?Array|ArrayBuffer|BigInt|Boolean|DataView|Date|Error|Function|Intl|JSON|Math|Number|Object|Promise|Proxy|Reflect|RegExp|String|Symbol|(?:Weak)?(?:Set|Map)|WebAssembly)\b/,alias:"class-name"},{pattern:/\b(?:[A-Z]\w*)Error\b/,alias:"class-name"}]}),a.languages.javascript.keyword.unshift({pattern:/\b(?:as|default|export|from|import)\b/,alias:"module"},{pattern:/\bnull\b/,alias:["null","nil"]},{pattern:/\bundefined\b/,alias:"nil"}),a.languages.insertBefore("javascript","operator",{spread:{pattern:/\.{3}/,alias:"operator"},arrow:{pattern:/=>/,alias:"operator"}}),a.languages.insertBefore("javascript","punctuation",{"property-access":{pattern:/(\.\s*)#?[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*/,lookbehind:!0},"maybe-class-name":{pattern:/(^|[^$\w\xA0-\uFFFF])[A-Z][$\w\xA0-\uFFFF]+/,lookbehind:!0},dom:{pattern:/\b(?:document|location|navigator|performance|(?:local|session)Storage|window)\b/,alias:"variable"},console:{pattern:/\bconsole(?=\s*\.)/,alias:"class-name"}});for(var e=["function","function-variable","method","method-variable","property-access"],t=0;t/,alias:"operator"}}),a.languages.insertBefore("javascript","punctuation",{"property-access":{pattern:/(\.\s*)#?[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*/,lookbehind:!0},"maybe-class-name":{pattern:/(^|[^$\w\xA0-\uFFFF])[A-Z][$\w\xA0-\uFFFF]+/,lookbehind:!0},dom:{pattern:/\b(?:document|location|navigator|performance|(?:local|session)Storage|window)\b/,alias:"variable"},console:{pattern:/\bconsole(?=\s*\.)/,alias:"class-name"}});for(var e=["function","function-variable","method","method-variable","property-access"],t=0;t Date: Thu, 27 Aug 2020 23:51:16 +0200 Subject: [PATCH 0621/1100] JS Extras: Highlight import and export bindings (#2533) --- components/prism-js-extras.js | 29 +++- components/prism-js-extras.min.js | 2 +- .../exports_feature.test | 151 ++++++++++++++++++ .../imports_feature.test | 124 ++++++++++++++ 4 files changed, 304 insertions(+), 2 deletions(-) create mode 100644 tests/languages/javascript!+js-extras/exports_feature.test create mode 100644 tests/languages/javascript!+js-extras/imports_feature.test diff --git a/components/prism-js-extras.js b/components/prism-js-extras.js index b2a7fcab11..552ee598e5 100644 --- a/components/prism-js-extras.js +++ b/components/prism-js-extras.js @@ -32,6 +32,33 @@ ] }); + /** + * Replaces the `` placeholder in the given pattern with a pattern for general JS identifiers. + * + * @param {string} source + * @param {string} [flags] + * @returns {RegExp} + */ + function withId(source, flags) { + return RegExp( + source.replace(//g, function () { return /[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*/.source; }), + flags); + } + Prism.languages.insertBefore('javascript', 'keyword', { + 'imports': { + // https://tc39.es/ecma262/#sec-imports + pattern: withId(/(\bimport\b\s*)(?:(?:\s*,\s*(?:\*\s*as\s+|\{[^{}]*\}))?|\*\s*as\s+|\{[^{}]*\})(?=\s*\bfrom\b)/.source), + lookbehind: true, + inside: Prism.languages.javascript + }, + 'exports': { + // https://tc39.es/ecma262/#sec-exports + pattern: withId(/(\bexport\b\s*)(?:\*(?:\s*as\s+)?(?=\s*\bfrom\b)|\{[^{}]*\})/.source), + lookbehind: true, + inside: Prism.languages.javascript + } + }); + Prism.languages.javascript['keyword'].unshift( { pattern: /\b(?:as|default|export|from|import)\b/, @@ -64,7 +91,7 @@ Prism.languages.insertBefore('javascript', 'punctuation', { 'property-access': { - pattern: /(\.\s*)#?[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*/, + pattern: withId(/(\.\s*)#?/.source), lookbehind: true }, 'maybe-class-name': { diff --git a/components/prism-js-extras.min.js b/components/prism-js-extras.min.js index 366f0e27d1..0505140028 100644 --- a/components/prism-js-extras.min.js +++ b/components/prism-js-extras.min.js @@ -1 +1 @@ -!function(a){a.languages.insertBefore("javascript","function-variable",{"method-variable":{pattern:RegExp("(\\.\\s*)"+a.languages.javascript["function-variable"].pattern.source),lookbehind:!0,alias:["function-variable","method","function","property-access"]}}),a.languages.insertBefore("javascript","function",{method:{pattern:RegExp("(\\.\\s*)"+a.languages.javascript.function.source),lookbehind:!0,alias:["function","property-access"]}}),a.languages.insertBefore("javascript","constant",{"known-class-name":[{pattern:/\b(?:(?:(?:Uint|Int)(?:8|16|32)|Uint8Clamped|Float(?:32|64))?Array|ArrayBuffer|BigInt|Boolean|DataView|Date|Error|Function|Intl|JSON|Math|Number|Object|Promise|Proxy|Reflect|RegExp|String|Symbol|(?:Weak)?(?:Set|Map)|WebAssembly)\b/,alias:"class-name"},{pattern:/\b(?:[A-Z]\w*)Error\b/,alias:"class-name"}]}),a.languages.javascript.keyword.unshift({pattern:/\b(?:as|default|export|from|import)\b/,alias:"module"},{pattern:/\b(?:await|break|catch|continue|do|else|for|finally|if|return|switch|throw|try|while|yield)\b/,alias:"control-flow"},{pattern:/\bnull\b/,alias:["null","nil"]},{pattern:/\bundefined\b/,alias:"nil"}),a.languages.insertBefore("javascript","operator",{spread:{pattern:/\.{3}/,alias:"operator"},arrow:{pattern:/=>/,alias:"operator"}}),a.languages.insertBefore("javascript","punctuation",{"property-access":{pattern:/(\.\s*)#?[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*/,lookbehind:!0},"maybe-class-name":{pattern:/(^|[^$\w\xA0-\uFFFF])[A-Z][$\w\xA0-\uFFFF]+/,lookbehind:!0},dom:{pattern:/\b(?:document|location|navigator|performance|(?:local|session)Storage|window)\b/,alias:"variable"},console:{pattern:/\bconsole(?=\s*\.)/,alias:"class-name"}});for(var e=["function","function-variable","method","method-variable","property-access"],t=0;t/g,function(){return"[_$a-zA-Z\\xA0-\\uFFFF][$\\w\\xA0-\\uFFFF]*"}),e)}a.languages.insertBefore("javascript","function-variable",{"method-variable":{pattern:RegExp("(\\.\\s*)"+a.languages.javascript["function-variable"].pattern.source),lookbehind:!0,alias:["function-variable","method","function","property-access"]}}),a.languages.insertBefore("javascript","function",{method:{pattern:RegExp("(\\.\\s*)"+a.languages.javascript.function.source),lookbehind:!0,alias:["function","property-access"]}}),a.languages.insertBefore("javascript","constant",{"known-class-name":[{pattern:/\b(?:(?:(?:Uint|Int)(?:8|16|32)|Uint8Clamped|Float(?:32|64))?Array|ArrayBuffer|BigInt|Boolean|DataView|Date|Error|Function|Intl|JSON|Math|Number|Object|Promise|Proxy|Reflect|RegExp|String|Symbol|(?:Weak)?(?:Set|Map)|WebAssembly)\b/,alias:"class-name"},{pattern:/\b(?:[A-Z]\w*)Error\b/,alias:"class-name"}]}),a.languages.insertBefore("javascript","keyword",{imports:{pattern:e("(\\bimport\\b\\s*)(?:(?:\\s*,\\s*(?:\\*\\s*as\\s+|\\{[^{}]*\\}))?|\\*\\s*as\\s+|\\{[^{}]*\\})(?=\\s*\\bfrom\\b)"),lookbehind:!0,inside:a.languages.javascript},exports:{pattern:e("(\\bexport\\b\\s*)(?:\\*(?:\\s*as\\s+)?(?=\\s*\\bfrom\\b)|\\{[^{}]*\\})"),lookbehind:!0,inside:a.languages.javascript}}),a.languages.javascript.keyword.unshift({pattern:/\b(?:as|default|export|from|import)\b/,alias:"module"},{pattern:/\b(?:await|break|catch|continue|do|else|for|finally|if|return|switch|throw|try|while|yield)\b/,alias:"control-flow"},{pattern:/\bnull\b/,alias:["null","nil"]},{pattern:/\bundefined\b/,alias:"nil"}),a.languages.insertBefore("javascript","operator",{spread:{pattern:/\.{3}/,alias:"operator"},arrow:{pattern:/=>/,alias:"operator"}}),a.languages.insertBefore("javascript","punctuation",{"property-access":{pattern:e("(\\.\\s*)#?"),lookbehind:!0},"maybe-class-name":{pattern:/(^|[^$\w\xA0-\uFFFF])[A-Z][$\w\xA0-\uFFFF]+/,lookbehind:!0},dom:{pattern:/\b(?:document|location|navigator|performance|(?:local|session)Storage|window)\b/,alias:"variable"},console:{pattern:/\bconsole(?=\s*\.)/,alias:"class-name"}});for(var t=["function","function-variable","method","method-variable","property-access"],r=0;r Date: Fri, 28 Aug 2020 18:38:14 +0200 Subject: [PATCH 0622/1100] Haskell: Improvements (#2535) --- components/prism-haskell.js | 13 ++++++++----- components/prism-haskell.min.js | 2 +- tests/languages/haskell/comment_feature.test | 8 ++++++-- .../languages/haskell/import_statement_feature.test | 10 +++++----- 4 files changed, 20 insertions(+), 13 deletions(-) diff --git a/components/prism-haskell.js b/components/prism-haskell.js index 2931b8f827..d2757f9274 100644 --- a/components/prism-haskell.js +++ b/components/prism-haskell.js @@ -1,19 +1,22 @@ Prism.languages.haskell = { 'comment': { - pattern: /(^|[^-!#$%*+=?&@|~.:<>^\\\/])(?:--[^-!#$%*+=?&@|~.:<>^\\\/].*|{-[\s\S]*?-})/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]+))'/, + 'char': { + pattern: /'(?:[^\\']|\\(?:[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]+))'/, + alias: 'string' + }, 'string': { - pattern: /"(?:[^\\"]|\\(?:[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]+)|\\\s+\\)*"/, + pattern: /"(?:[^\\"]|\\(?:\S|\s+\\))*"/, greedy: true }, 'keyword': /\b(?:case|class|data|deriving|do|else|if|in|infixl|infixr|instance|let|module|newtype|of|primitive|then|type|where)\b/, - 'import_statement': { + 'import-statement': { // The imported or hidden names are not included in this import // statement. This is because we want to highlight those exactly like // we do for the names in the program. - pattern: /((?:\r?\n|\r|^)\s*)import\s+(?:qualified\s+)?(?:[A-Z][\w']*)(?:\.[A-Z][\w']*)*(?:\s+as\s+(?:[A-Z][_a-zA-Z0-9']*)(?:\.[A-Z][\w']*)*)?(?:\s+hiding\b)?/m, + pattern: /(^\s*)import\s+(?:qualified\s+)?(?:[A-Z][\w']*)(?:\.[A-Z][\w']*)*(?:\s+as\s+(?:[A-Z][\w']*)(?:\.[A-Z][\w']*)*)?(?:\s+hiding\b)?/m, lookbehind: true, inside: { 'keyword': /\b(?:import|qualified|as|hiding)\b/ diff --git a/components/prism-haskell.min.js b/components/prism-haskell.min.js index 49010de8d7..7b9534d970 100644 --- a/components/prism-haskell.min.js +++ b/components/prism-haskell.min.js @@ -1 +1 @@ -Prism.languages.haskell={comment:{pattern:/(^|[^-!#$%*+=?&@|~.:<>^\\\/])(?:--[^-!#$%*+=?&@|~.:<>^\\\/].*|{-[\s\S]*?-})/m,lookbehind:!0},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]+))'/,string:{pattern:/"(?:[^\\"]|\\(?:[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]+)|\\\s+\\)*"/,greedy:!0},keyword:/\b(?:case|class|data|deriving|do|else|if|in|infixl|infixr|instance|let|module|newtype|of|primitive|then|type|where)\b/,import_statement:{pattern:/((?:\r?\n|\r|^)\s*)import\s+(?:qualified\s+)?(?:[A-Z][\w']*)(?:\.[A-Z][\w']*)*(?:\s+as\s+(?:[A-Z][_a-zA-Z0-9']*)(?:\.[A-Z][\w']*)*)?(?:\s+hiding\b)?/m,lookbehind:!0,inside:{keyword:/\b(?:import|qualified|as|hiding)\b/}},builtin:/\b(?:abs|acos|acosh|all|and|any|appendFile|approxRational|asTypeOf|asin|asinh|atan|atan2|atanh|basicIORun|break|catch|ceiling|chr|compare|concat|concatMap|const|cos|cosh|curry|cycle|decodeFloat|denominator|digitToInt|div|divMod|drop|dropWhile|either|elem|encodeFloat|enumFrom|enumFromThen|enumFromThenTo|enumFromTo|error|even|exp|exponent|fail|filter|flip|floatDigits|floatRadix|floatRange|floor|fmap|foldl|foldl1|foldr|foldr1|fromDouble|fromEnum|fromInt|fromInteger|fromIntegral|fromRational|fst|gcd|getChar|getContents|getLine|group|head|id|inRange|index|init|intToDigit|interact|ioError|isAlpha|isAlphaNum|isAscii|isControl|isDenormalized|isDigit|isHexDigit|isIEEE|isInfinite|isLower|isNaN|isNegativeZero|isOctDigit|isPrint|isSpace|isUpper|iterate|last|lcm|length|lex|lexDigits|lexLitChar|lines|log|logBase|lookup|map|mapM|mapM_|max|maxBound|maximum|maybe|min|minBound|minimum|mod|negate|not|notElem|null|numerator|odd|or|ord|otherwise|pack|pi|pred|primExitWith|print|product|properFraction|putChar|putStr|putStrLn|quot|quotRem|range|rangeSize|read|readDec|readFile|readFloat|readHex|readIO|readInt|readList|readLitChar|readLn|readOct|readParen|readSigned|reads|readsPrec|realToFrac|recip|rem|repeat|replicate|return|reverse|round|scaleFloat|scanl|scanl1|scanr|scanr1|seq|sequence|sequence_|show|showChar|showInt|showList|showLitChar|showParen|showSigned|showString|shows|showsPrec|significand|signum|sin|sinh|snd|sort|span|splitAt|sqrt|subtract|succ|sum|tail|take|takeWhile|tan|tanh|threadToIOResult|toEnum|toInt|toInteger|toLower|toRational|toUpper|truncate|uncurry|undefined|unlines|until|unwords|unzip|unzip3|userError|words|writeFile|zip|zip3|zipWith|zipWith3)\b/,number:/\b(?:\d+(?:\.\d+)?(?:e[+-]?\d+)?|0o[0-7]+|0x[0-9a-f]+)\b/i,operator:/\s\.\s|[-!#$%*+=?&@|~.:<>^\\\/]*\.[-!#$%*+=?&@|~.:<>^\\\/]+|[-!#$%*+=?&@|~.:<>^\\\/]+\.[-!#$%*+=?&@|~.:<>^\\\/]*|[-!#$%*+=?&@|~:<>^\\\/]+|`(?:[A-Z][\w']*\.)*[_a-z][\w']*`/,hvariable:/\b(?:[A-Z][\w']*\.)*[_a-z][\w']*\b/,constant:/\b(?:[A-Z][\w']*\.)*[A-Z][\w']*\b/,punctuation:/[{}[\];(),.:]/},Prism.languages.hs=Prism.languages.haskell; \ No newline at end of file +Prism.languages.haskell={comment:{pattern:/(^|[^-!#$%*+=?&@|~.:<>^\\\/])(?:--(?:(?=.)[^-!#$%*+=?&@|~.:<>^\\\/].*|$)|{-[\s\S]*?-})/m,lookbehind:!0},char:{pattern:/'(?:[^\\']|\\(?:[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]+))'/,alias:"string"},string:{pattern:/"(?:[^\\"]|\\(?:\S|\s+\\))*"/,greedy:!0},keyword:/\b(?:case|class|data|deriving|do|else|if|in|infixl|infixr|instance|let|module|newtype|of|primitive|then|type|where)\b/,"import-statement":{pattern:/(^\s*)import\s+(?:qualified\s+)?(?:[A-Z][\w']*)(?:\.[A-Z][\w']*)*(?:\s+as\s+(?:[A-Z][\w']*)(?:\.[A-Z][\w']*)*)?(?:\s+hiding\b)?/m,lookbehind:!0,inside:{keyword:/\b(?:import|qualified|as|hiding)\b/}},builtin:/\b(?:abs|acos|acosh|all|and|any|appendFile|approxRational|asTypeOf|asin|asinh|atan|atan2|atanh|basicIORun|break|catch|ceiling|chr|compare|concat|concatMap|const|cos|cosh|curry|cycle|decodeFloat|denominator|digitToInt|div|divMod|drop|dropWhile|either|elem|encodeFloat|enumFrom|enumFromThen|enumFromThenTo|enumFromTo|error|even|exp|exponent|fail|filter|flip|floatDigits|floatRadix|floatRange|floor|fmap|foldl|foldl1|foldr|foldr1|fromDouble|fromEnum|fromInt|fromInteger|fromIntegral|fromRational|fst|gcd|getChar|getContents|getLine|group|head|id|inRange|index|init|intToDigit|interact|ioError|isAlpha|isAlphaNum|isAscii|isControl|isDenormalized|isDigit|isHexDigit|isIEEE|isInfinite|isLower|isNaN|isNegativeZero|isOctDigit|isPrint|isSpace|isUpper|iterate|last|lcm|length|lex|lexDigits|lexLitChar|lines|log|logBase|lookup|map|mapM|mapM_|max|maxBound|maximum|maybe|min|minBound|minimum|mod|negate|not|notElem|null|numerator|odd|or|ord|otherwise|pack|pi|pred|primExitWith|print|product|properFraction|putChar|putStr|putStrLn|quot|quotRem|range|rangeSize|read|readDec|readFile|readFloat|readHex|readIO|readInt|readList|readLitChar|readLn|readOct|readParen|readSigned|reads|readsPrec|realToFrac|recip|rem|repeat|replicate|return|reverse|round|scaleFloat|scanl|scanl1|scanr|scanr1|seq|sequence|sequence_|show|showChar|showInt|showList|showLitChar|showParen|showSigned|showString|shows|showsPrec|significand|signum|sin|sinh|snd|sort|span|splitAt|sqrt|subtract|succ|sum|tail|take|takeWhile|tan|tanh|threadToIOResult|toEnum|toInt|toInteger|toLower|toRational|toUpper|truncate|uncurry|undefined|unlines|until|unwords|unzip|unzip3|userError|words|writeFile|zip|zip3|zipWith|zipWith3)\b/,number:/\b(?:\d+(?:\.\d+)?(?:e[+-]?\d+)?|0o[0-7]+|0x[0-9a-f]+)\b/i,operator:/\s\.\s|[-!#$%*+=?&@|~.:<>^\\\/]*\.[-!#$%*+=?&@|~.:<>^\\\/]+|[-!#$%*+=?&@|~.:<>^\\\/]+\.[-!#$%*+=?&@|~.:<>^\\\/]*|[-!#$%*+=?&@|~:<>^\\\/]+|`(?:[A-Z][\w']*\.)*[_a-z][\w']*`/,hvariable:/\b(?:[A-Z][\w']*\.)*[_a-z][\w']*\b/,constant:/\b(?:[A-Z][\w']*\.)*[A-Z][\w']*\b/,punctuation:/[{}[\];(),.:]/},Prism.languages.hs=Prism.languages.haskell; \ No newline at end of file diff --git a/tests/languages/haskell/comment_feature.test b/tests/languages/haskell/comment_feature.test index d8c8cdda20..75c1f1bec4 100644 --- a/tests/languages/haskell/comment_feature.test +++ b/tests/languages/haskell/comment_feature.test @@ -1,14 +1,18 @@ +-- -- foo {- foo bar -} +{--} ---------------------------------------------------- [ + ["comment", "--"], ["comment", "-- foo"], - ["comment", "{- foo\r\nbar -}"] + ["comment", "{- foo\r\nbar -}"], + ["comment", "{--}"] ] ---------------------------------------------------- -Checks for single-line and multi-line comments. \ No newline at end of file +Checks for single-line and multi-line comments. diff --git a/tests/languages/haskell/import_statement_feature.test b/tests/languages/haskell/import_statement_feature.test index 120fbe7511..105f510a04 100644 --- a/tests/languages/haskell/import_statement_feature.test +++ b/tests/languages/haskell/import_statement_feature.test @@ -6,22 +6,22 @@ import Foo.Bar as Foo.Baz hiding ---------------------------------------------------- [ - ["import_statement", [ + ["import-statement", [ ["keyword", "import"], " Foo" ]], - ["import_statement", [ + ["import-statement", [ ["keyword", "import"], ["keyword", "qualified"], " Foobar" ]], - ["import_statement", [ + ["import-statement", [ ["keyword", "import"], " Foo_42.Bar ", ["keyword", "as"], " Foobar" ]], - ["import_statement", [ + ["import-statement", [ ["keyword", "import"], " Foo.Bar ", ["keyword", "as"], @@ -32,4 +32,4 @@ import Foo.Bar as Foo.Baz hiding ---------------------------------------------------- -Checks for import statement. \ No newline at end of file +Checks for import statement. From ad748a001ea6b47788740d371d0f6ff8ec58fcc4 Mon Sep 17 00:00:00 2001 From: Sri Harsha Chilakapati Date: Sun, 30 Aug 2020 18:16:21 +0530 Subject: [PATCH 0623/1100] Added PureScript language definition (#2526) --- components.js | 2 +- components.json | 6 + components/prism-purescript.js | 19 +++ components/prism-purescript.min.js | 1 + examples/prism-purescript.html | 57 +++++++++ plugins/autoloader/prism-autoloader.js | 2 + plugins/autoloader/prism-autoloader.min.js | 2 +- plugins/show-language/prism-show-language.js | 1 + .../show-language/prism-show-language.min.js | 2 +- .../languages/purescript/builtin_feature.test | 109 ++++++++++++++++++ tests/languages/purescript/char_feature.test | 17 +++ .../languages/purescript/comment_feature.test | 14 +++ .../purescript/constant_feature.test | 15 +++ .../purescript/hvariable_feature.test | 15 +++ .../purescript/import_statement_feature.test | 37 ++++++ .../languages/purescript/keyword_feature.test | 49 ++++++++ .../languages/purescript/number_feature.test | 23 ++++ .../purescript/operator_feature.test | 61 ++++++++++ .../languages/purescript/string_feature.test | 19 +++ 19 files changed, 448 insertions(+), 3 deletions(-) create mode 100644 components/prism-purescript.js create mode 100644 components/prism-purescript.min.js create mode 100644 examples/prism-purescript.html create mode 100644 tests/languages/purescript/builtin_feature.test create mode 100644 tests/languages/purescript/char_feature.test create mode 100644 tests/languages/purescript/comment_feature.test create mode 100644 tests/languages/purescript/constant_feature.test create mode 100644 tests/languages/purescript/hvariable_feature.test create mode 100644 tests/languages/purescript/import_statement_feature.test create mode 100644 tests/languages/purescript/keyword_feature.test create mode 100644 tests/languages/purescript/number_feature.test create mode 100644 tests/languages/purescript/operator_feature.test create mode 100644 tests/languages/purescript/string_feature.test diff --git a/components.js b/components.js index e0b9cadcd3..a149fbb760 100644 --- a/components.js +++ b/components.js @@ -1,2 +1,2 @@ -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml","ssml","atom","rss"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","ssml":"SSML","atom":"Atom","rss":"RSS"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"ABNF","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"agda":{"title":"Agda","owner":"xy-ren"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"dkern"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"BNF","alias":"rbnf","aliasTitles":{"rbnf":"RBNF"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"bsl":{"title":"BSL (1C:Enterprise)","alias":"oscript","aliasTitles":{"oscript":"OneScript"},"owner":"Diversus23"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"clojure":{"title":"Clojure","owner":"troglotit"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"cypher":{"title":"Cypher","owner":"RunDevelopment"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dax":{"title":"DAX","owner":"peterbud"},"dhall":{"title":"Dhall","owner":"RunDevelopment"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"EBNF","owner":"RunDevelopment"},"editorconfig":{"title":"EditorConfig","owner":"osipxd"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"c","owner":"Golmote"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","optional":["markdown"],"owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"hlsl":{"title":"HLSL","require":"c","owner":"RunDevelopment"},"http":{"title":"HTTP","optional":["css","javascript","json","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"ignore":{"title":".ignore","owner":"osipxd","alias":["gitignore","hgignore","npmignore"],"aliasTitles":{"gitignore":".gitignore","hgignore":".hgignore","npmignore":".npmignore"}},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike","typescript"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","alias":"webmanifest","aliasTitles":{"webmanifest":"Web App Manifest"},"owner":"CupOfTea696"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"jsstacktrace":{"title":"JS stack trace","owner":"sbrl"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","alias":["kt","kts"],"aliasTitles":{"kts":"Kotlin Script"},"require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"mongodb":{"title":"MongoDB","owner":"airs0urce","require":"javascript"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"naniscript":{"title":"Naninovel Script","owner":"Elringus","alias":"nani"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"purebasic":{"title":"PureBasic","require":"clike","alias":"pbfasm","owner":"HeX0R101"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"racket":{"title":"Racket","require":"scheme","alias":"rkt","owner":"RunDevelopment"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","modify":["actionscript","coffeescript","flow","javascript","typescript","vala"],"owner":"RunDevelopment"},"renpy":{"title":"Ren'py","alias":"rpy","owner":"HyuchiaDiego"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","owner":"RunDevelopment"},"smali":{"title":"Smali","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"solidity":{"title":"Solidity (Ethereum)","alias":"sol","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"stan":{"title":"Stan","owner":"RunDevelopment"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","vbnet"],"owner":"RunDevelopment"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"typoscript":{"title":"TypoScript","alias":"tsconfig","aliasTitles":{"tsconfig":"TSConfig"},"owner":"dkern"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":["vb","vba"],"aliasTitles":{"vba":"VBA"},"owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xml-doc":{"title":"XML doc (.net)","require":"markup","modify":["csharp","fsharp","vbnet"],"owner":"RunDevelopment"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"yang":{"title":"YANG","owner":"RunDevelopment"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml","ssml","atom","rss"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","ssml":"SSML","atom":"Atom","rss":"RSS"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"ABNF","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"agda":{"title":"Agda","owner":"xy-ren"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"dkern"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"BNF","alias":"rbnf","aliasTitles":{"rbnf":"RBNF"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"bsl":{"title":"BSL (1C:Enterprise)","alias":"oscript","aliasTitles":{"oscript":"OneScript"},"owner":"Diversus23"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"clojure":{"title":"Clojure","owner":"troglotit"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"cypher":{"title":"Cypher","owner":"RunDevelopment"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dax":{"title":"DAX","owner":"peterbud"},"dhall":{"title":"Dhall","owner":"RunDevelopment"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"EBNF","owner":"RunDevelopment"},"editorconfig":{"title":"EditorConfig","owner":"osipxd"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"c","owner":"Golmote"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","optional":["markdown"],"owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"hlsl":{"title":"HLSL","require":"c","owner":"RunDevelopment"},"http":{"title":"HTTP","optional":["css","javascript","json","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"ignore":{"title":".ignore","owner":"osipxd","alias":["gitignore","hgignore","npmignore"],"aliasTitles":{"gitignore":".gitignore","hgignore":".hgignore","npmignore":".npmignore"}},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike","typescript"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","alias":"webmanifest","aliasTitles":{"webmanifest":"Web App Manifest"},"owner":"CupOfTea696"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"jsstacktrace":{"title":"JS stack trace","owner":"sbrl"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","alias":["kt","kts"],"aliasTitles":{"kts":"Kotlin Script"},"require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"mongodb":{"title":"MongoDB","owner":"airs0urce","require":"javascript"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"naniscript":{"title":"Naninovel Script","owner":"Elringus","alias":"nani"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"purebasic":{"title":"PureBasic","require":"clike","alias":"pbfasm","owner":"HeX0R101"},"purescript":{"title":"PureScript","require":"haskell","alias":"purs","owner":"sriharshachilakapati"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"racket":{"title":"Racket","require":"scheme","alias":"rkt","owner":"RunDevelopment"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","modify":["actionscript","coffeescript","flow","javascript","typescript","vala"],"owner":"RunDevelopment"},"renpy":{"title":"Ren'py","alias":"rpy","owner":"HyuchiaDiego"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","owner":"RunDevelopment"},"smali":{"title":"Smali","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"solidity":{"title":"Solidity (Ethereum)","alias":"sol","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"stan":{"title":"Stan","owner":"RunDevelopment"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","vbnet"],"owner":"RunDevelopment"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"typoscript":{"title":"TypoScript","alias":"tsconfig","aliasTitles":{"tsconfig":"TSConfig"},"owner":"dkern"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":["vb","vba"],"aliasTitles":{"vba":"VBA"},"owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xml-doc":{"title":"XML doc (.net)","require":"markup","modify":["csharp","fsharp","vbnet"],"owner":"RunDevelopment"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"yang":{"title":"YANG","owner":"RunDevelopment"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; if (typeof module !== 'undefined' && module.exports) { module.exports = components; } \ No newline at end of file diff --git a/components.json b/components.json index 16ce470529..42afe6f171 100644 --- a/components.json +++ b/components.json @@ -913,6 +913,12 @@ "alias": "pbfasm", "owner": "HeX0R101" }, + "purescript": { + "title": "PureScript", + "require": "haskell", + "alias": "purs", + "owner": "sriharshachilakapati" + }, "python": { "title": "Python", "alias": "py", diff --git a/components/prism-purescript.js b/components/prism-purescript.js new file mode 100644 index 0000000000..494429547d --- /dev/null +++ b/components/prism-purescript.js @@ -0,0 +1,19 @@ +Prism.languages.purescript = Prism.languages.extend('haskell', { + 'keyword': /\b(?:ado|case|class|data|derive|do|else|forall|if|in|infixl|infixr|instance|let|module|newtype|of|primitive|then|type|where)\b/, + + 'import-statement': { + // The imported or hidden names are not included in this import + // statement. This is because we want to highlight those exactly like + // we do for the names in the program. + pattern: /(^\s*)import\s+[A-Z][\w']*(?:\.[A-Z][\w']*)*(?:\s+as\s+[A-Z][\w']*(?:\.[A-Z][\w']*)*)?(?:\s+hiding\b)?/m, + lookbehind: true, + inside: { + 'keyword': /\b(?:import|as|hiding)\b/ + } + }, + + // These are builtin functions only. Constructors are highlighted later as a constant. + 'builtin': /\b(?:absurd|add|ap|append|apply|between|bind|bottom|clamp|compare|comparing|compose|conj|const|degree|discard|disj|div|eq|flap|flip|gcd|identity|ifM|join|lcm|liftA1|liftM1|map|max|mempty|min|mod|mul|negate|not|notEq|one|otherwise|recip|show|sub|top|unit|unless|unlessM|void|when|whenM|zero)\b/, +}); + +Prism.languages.purs = Prism.languages.purescript; diff --git a/components/prism-purescript.min.js b/components/prism-purescript.min.js new file mode 100644 index 0000000000..5f82482dbf --- /dev/null +++ b/components/prism-purescript.min.js @@ -0,0 +1 @@ +Prism.languages.purescript=Prism.languages.extend("haskell",{keyword:/\b(?:ado|case|class|data|derive|do|else|forall|if|in|infixl|infixr|instance|let|module|newtype|of|primitive|then|type|where)\b/,"import-statement":{pattern:/(^\s*)import\s+[A-Z][\w']*(?:\.[A-Z][\w']*)*(?:\s+as\s+[A-Z][\w']*(?:\.[A-Z][\w']*)*)?(?:\s+hiding\b)?/m,lookbehind:!0,inside:{keyword:/\b(?:import|as|hiding)\b/}},builtin:/\b(?:absurd|add|ap|append|apply|between|bind|bottom|clamp|compare|comparing|compose|conj|const|degree|discard|disj|div|eq|flap|flip|gcd|identity|ifM|join|lcm|liftA1|liftM1|map|max|mempty|min|mod|mul|negate|not|notEq|one|otherwise|recip|show|sub|top|unit|unless|unlessM|void|when|whenM|zero)\b/}),Prism.languages.purs=Prism.languages.purescript; \ No newline at end of file diff --git a/examples/prism-purescript.html b/examples/prism-purescript.html new file mode 100644 index 0000000000..0b71ec3823 --- /dev/null +++ b/examples/prism-purescript.html @@ -0,0 +1,57 @@ +

          Comments

          +
          -- Single line comment
          +{- Multi-line
          +comment -}
          + +

          Strings and characters

          +
          'a'
          +'\n'
          +'\^A'
          +'\^]'
          +'\NUL'
          +'\23'
          +'\o75'
          +'\xFE'
          +"Here is a backslant \\ as well as \137, \
          +    \a numeric escape character, and \^X, a control character."
          + +

          Numbers

          +
          42
          +123.456
          +123.456e-789
          +1e+3
          +0o74
          +0XAF
          + +

          Full example

          +
          module Codewars.Kata.SumFracts (sumFracts) where
          +
          +import Prelude
          +
          +import Data.Foldable (foldl)
          +import Data.BigInt (BigInt, fromInt, toString)
          +import Data.List (List, length)
          +import Data.Tuple (Tuple(..))
          +import Data.Maybe (Maybe(..))
          +import Data.Ord (abs, signum)
          +
          +reduce :: Tuple BigInt BigInt -> Tuple BigInt BigInt
          +reduce (Tuple num den) =
          +  let gcd' = gcd num den
          +      den' = den / gcd'
          +   in Tuple (num / gcd' * (signum den')) (abs den')
          +   
          +sumFracts :: List (Tuple Int Int) -> Maybe String
          +sumFracts fracts =
          +  let fracts' = fracts <#> (\(Tuple n d) -> Tuple (fromInt n) (fromInt d)) >>> reduce
          +      
          +      den = foldl (\acc (Tuple _ d) -> lcm acc d) one fracts'
          +      num = foldl (\acc (Tuple n d) -> acc + n * (den / d)) zero fracts'
          +      
          +      Tuple n d = reduce $ Tuple num den
          +      
          +   in if length fracts == 0
          +        then Nothing
          +        else if d == one
          +                then Just $ toString n
          +                else Just $ (toString n) >< " " >< (toString d)
          diff --git a/plugins/autoloader/prism-autoloader.js b/plugins/autoloader/prism-autoloader.js index f41a75654c..ee40a44619 100644 --- a/plugins/autoloader/prism-autoloader.js +++ b/plugins/autoloader/prism-autoloader.js @@ -99,6 +99,7 @@ "javascript" ], "purebasic": "clike", + "purescript": "haskell", "qml": "javascript", "qore": "clike", "racket": "scheme", @@ -197,6 +198,7 @@ "pq": "powerquery", "mscript": "powerquery", "pbfasm": "purebasic", + "purs": "purescript", "py": "python", "rkt": "racket", "rpy": "renpy", diff --git a/plugins/autoloader/prism-autoloader.min.js b/plugins/autoloader/prism-autoloader.min.js index ccb4d295d0..0ef991a4e8 100644 --- a/plugins/autoloader/prism-autoloader.min.js +++ b/plugins/autoloader/prism-autoloader.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof self&&self.Prism&&self.document&&document.createElement){var n={javascript:"clike",actionscript:"javascript",arduino:"cpp",aspnet:["markup","csharp"],bison:"c",c:"clike",csharp:"clike",cpp:"c",coffeescript:"javascript",crystal:"ruby","css-extras":"css",d:"clike",dart:"clike",django:"markup-templating",ejs:["javascript","markup-templating"],etlua:["lua","markup-templating"],erb:["ruby","markup-templating"],fsharp:"clike","firestore-security-rules":"clike",flow:"javascript",ftl:"markup-templating",gml:"clike",glsl:"c",go:"clike",groovy:"clike",haml:"ruby",handlebars:"markup-templating",haxe:"clike",hlsl:"c",java:"clike",javadoc:["markup","java","javadoclike"],jolie:"clike",jsdoc:["javascript","javadoclike","typescript"],"js-extras":"javascript",json5:"json",jsonp:"json","js-templates":"javascript",kotlin:"clike",latte:["clike","markup-templating","php"],less:"css",lilypond:"scheme",markdown:"markup","markup-templating":"markup",mongodb:"javascript",n4js:"javascript",nginx:"clike",objectivec:"c",opencl:"c",parser:"markup",php:["clike","markup-templating"],phpdoc:["php","javadoclike"],"php-extras":"php",plsql:"sql",processing:"clike",protobuf:"clike",pug:["markup","javascript"],purebasic:"clike",qml:"javascript",qore:"clike",racket:"scheme",jsx:["markup","javascript"],tsx:["jsx","typescript"],reason:"clike",ruby:"clike",sass:"css",scss:"css",scala:"java","shell-session":"bash",smarty:"markup-templating",solidity:"clike",soy:"markup-templating",sparql:"turtle",sqf:"clike",swift:"clike","t4-cs":["t4-templating","csharp"],"t4-vb":["t4-templating","vbnet"],tap:"yaml",tt2:["clike","markup-templating"],textile:"markup",twig:"markup",typescript:"javascript",vala:"clike",vbnet:"basic",velocity:"markup",wiki:"markup",xeora:"markup","xml-doc":"markup",xquery:"markup"},l={html:"markup",xml:"markup",svg:"markup",mathml:"markup",ssml:"markup",atom:"markup",rss:"markup",js:"javascript",g4:"antlr4",adoc:"asciidoc",shell:"bash",shortcode:"bbcode",rbnf:"bnf",oscript:"bsl",cs:"csharp",dotnet:"csharp",coffee:"coffeescript",conc:"concurnas",jinja2:"django","dns-zone":"dns-zone-file",dockerfile:"docker",eta:"ejs",xlsx:"excel-formula",xls:"excel-formula",gamemakerlanguage:"gml",hs:"haskell",gitignore:"ignore",hgignore:"ignore",npmignore:"ignore",webmanifest:"json",kt:"kotlin",kts:"kotlin",tex:"latex",context:"latex",ly:"lilypond",emacs:"lisp",elisp:"lisp","emacs-lisp":"lisp",md:"markdown",moon:"moonscript",n4jsd:"n4js",nani:"naniscript",objc:"objectivec",objectpascal:"pascal",px:"pcaxis",pcode:"peoplecode",pq:"powerquery",mscript:"powerquery",pbfasm:"purebasic",py:"python",rkt:"racket",rpy:"renpy",robot:"robotframework",rb:"ruby",sol:"solidity",sln:"solution-file",rq:"sparql",t4:"t4-cs",trig:"turtle",ts:"typescript",tsconfig:"typoscript",uscript:"unrealscript",uc:"unrealscript",vb:"visual-basic",vba:"visual-basic",xeoracube:"xeora",yml:"yaml"},p={},e="components/",a=Prism.util.currentScript();if(a){var r=/\bplugins\/autoloader\/prism-autoloader\.(?:min\.)js(?:\?[^\r\n/]*)?$/i,t=/(^|\/)[\w-]+\.(?:min\.)js(?:\?[^\r\n/]*)?$/i,i=a.getAttribute("data-autoloader-path");if(null!=i)e=i.trim().replace(/\/?$/,"/");else{var s=a.src;r.test(s)?e=s.replace(r,"components/"):t.test(s)&&(e=s.replace(t,"$1components/"))}}var o=Prism.plugins.autoloader={languages_path:e,use_minified:!0,loadLanguages:m};Prism.hooks.add("complete",function(e){var a=e.element,r=e.language;if(a&&r&&"none"!==r){var t=function(e){var a=(e.getAttribute("data-dependencies")||"").trim();if(!a){var r=e.parentElement;r&&"pre"===r.tagName.toLowerCase()&&(a=(r.getAttribute("data-dependencies")||"").trim())}return a?a.split(/\s*,\s*/g):[]}(a);t.push(r),t.every(u)||m(t,function(){Prism.highlightElement(a)})}})}function u(e){if(0<=e.indexOf("!"))return!1;if((e=l[e]||e)in Prism.languages)return!0;var a=p[e];return a&&!a.error&&!1===a.loading}function m(e,a,r){"string"==typeof e&&(e=[e]);var t=e.length,i=0,s=!1;function c(){s||++i===t&&a&&a(e)}0!==t?e.forEach(function(e){!function(a,r,t){var i=0<=a.indexOf("!");function e(){var e=p[a];e||(e=p[a]={callbacks:[]}),e.callbacks.push({success:r,error:t}),!i&&u(a)?k(a,"success"):!i&&e.error?k(a,"error"):!i&&e.loading||(e.loading=!0,e.error=!1,function(e,a,r){var t=document.createElement("script");t.src=e,t.async=!0,t.onload=function(){document.body.removeChild(t),a&&a()},t.onerror=function(){document.body.removeChild(t),r&&r()},document.body.appendChild(t)}(function(e){return o.languages_path+"prism-"+e+(o.use_minified?".min":"")+".js"}(a),function(){e.loading=!1,k(a,"success")},function(){e.loading=!1,e.error=!0,k(a,"error")}))}a=a.replace("!",""),a=l[a]||a;var s=n[a];s&&s.length?m(s,e,t):e()}(e,c,function(){s||(s=!0,r&&r(e))})}):a&&setTimeout(a,0)}function k(e,a){if(p[e]){for(var r=p[e].callbacks,t=0,i=r.length;t= > \ | +++ : !! +\\ <- -> += :: => +>> >>= >@> +~ ! @ + +---------------------------------------------------- + +[ + ["operator", ".."], + ["hvariable", "reverse"], + ["operator", "<<<"], + ["hvariable", "sort"], + ["operator", "`foo`"], + ["operator", "`Foo.bar`"], + ["operator", "+"], + ["operator", "-"], + ["operator", "*"], + ["operator", "/"], + ["operator", "^"], + ["operator", "^^"], + ["operator", "**"], + ["operator", "&&"], + ["operator", "||"], + ["operator", "<"], + ["operator", "<="], + ["operator", "=="], + ["operator", "/="], + ["operator", ">="], + ["operator", ">"], + ["operator", "\\"], + ["operator", "|"], + ["operator", "++"], + ["operator", ":"], + ["operator", "!!"], + ["operator", "\\\\"], + ["operator", "<-"], + ["operator", "->"], + ["operator", "="], + ["operator", "::"], + ["operator", "=>"], + ["operator", ">>"], + ["operator", ">>="], + ["operator", ">@>"], + ["operator", "~"], + ["operator", "!"], + ["operator", "@"] +] + +---------------------------------------------------- + +Checks for operators. diff --git a/tests/languages/purescript/string_feature.test b/tests/languages/purescript/string_feature.test new file mode 100644 index 0000000000..a327a0568b --- /dev/null +++ b/tests/languages/purescript/string_feature.test @@ -0,0 +1,19 @@ +"" +"fo\"o" +"foo \ + \ bar" +"foo -- comment lookalike \ + \ bar" + +---------------------------------------------------- + +[ + ["string", "\"\""], + ["string", "\"fo\\\"o\""], + ["string", "\"foo \\\r\n \\ bar\""], + ["string", "\"foo -- comment lookalike \\\r\n \\ bar\""] +] + +---------------------------------------------------- + +Checks for strings. From fa2225ff13a516d77276f2cea09e0ccd2582a52e Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Sun, 30 Aug 2020 14:49:51 +0200 Subject: [PATCH 0624/1100] Removed duplicate alternatives in various languages (#2524) --- components/prism-arduino.js | 2 +- components/prism-arduino.min.js | 2 +- components/prism-cil.js | 2 +- components/prism-cil.min.js | 2 +- components/prism-clojure.js | 2 +- components/prism-clojure.min.js | 2 +- components/prism-firestore-security-rules.js | 2 +- components/prism-firestore-security-rules.min.js | 2 +- components/prism-fortran.js | 4 ++-- components/prism-fortran.min.js | 2 +- components/prism-gml.js | 2 +- components/prism-gml.min.js | 2 +- components/prism-groovy.js | 2 +- components/prism-groovy.min.js | 2 +- components/prism-iecst.js | 2 +- components/prism-iecst.min.js | 2 +- components/prism-io.js | 2 +- components/prism-io.min.js | 2 +- components/prism-n1ql.js | 6 +++--- components/prism-n1ql.min.js | 2 +- components/prism-powershell.js | 2 +- components/prism-powershell.min.js | 2 +- components/prism-processing.js | 4 ++-- components/prism-processing.min.js | 2 +- components/prism-purebasic.js | 2 +- components/prism-purebasic.min.js | 2 +- components/prism-vim.js | 4 ++-- components/prism-vim.min.js | 2 +- components/prism-warpscript.js | 2 +- components/prism-warpscript.min.js | 2 +- 30 files changed, 35 insertions(+), 35 deletions(-) diff --git a/components/prism-arduino.js b/components/prism-arduino.js index 99684d5e84..5ce27074e0 100644 --- a/components/prism-arduino.js +++ b/components/prism-arduino.js @@ -1,5 +1,5 @@ Prism.languages.arduino = Prism.languages.extend('cpp', { 'keyword': /\b(?:setup|if|else|while|do|for|return|in|instanceof|default|function|loop|goto|switch|case|new|try|throw|catch|finally|null|break|continue|boolean|bool|void|byte|word|string|String|array|int|long|integer|double)\b/, - 'builtin': /\b(?:KeyboardController|MouseController|SoftwareSerial|EthernetServer|EthernetClient|LiquidCrystal|LiquidCrystal_I2C|RobotControl|GSMVoiceCall|EthernetUDP|EsploraTFT|HttpClient|RobotMotor|WiFiClient|GSMScanner|FileSystem|Scheduler|GSMServer|YunClient|YunServer|IPAddress|GSMClient|GSMModem|Keyboard|Ethernet|Console|GSMBand|Esplora|Stepper|Process|WiFiUDP|GSM_SMS|Mailbox|USBHost|Firmata|PImage|Client|Server|GSMPIN|FileIO|Bridge|Serial|EEPROM|Stream|Mouse|Audio|Servo|File|Task|GPRS|WiFi|Wire|TFT|GSM|SPI|SD|runShellCommandAsynchronously|analogWriteResolution|retrieveCallingNumber|printFirmwareVersion|analogReadResolution|sendDigitalPortPair|noListenOnLocalhost|readJoystickButton|setFirmwareVersion|readJoystickSwitch|scrollDisplayRight|getVoiceCallStatus|scrollDisplayLeft|writeMicroseconds|delayMicroseconds|beginTransmission|getSignalStrength|runAsynchronously|getAsynchronously|listenOnLocalhost|getCurrentCarrier|readAccelerometer|messageAvailable|sendDigitalPorts|lineFollowConfig|countryNameWrite|runShellCommand|readStringUntil|rewindDirectory|readTemperature|setClockDivider|readLightSensor|endTransmission|analogReference|detachInterrupt|countryNameRead|attachInterrupt|encryptionType|readBytesUntil|robotNameWrite|readMicrophone|robotNameRead|cityNameWrite|userNameWrite|readJoystickY|readJoystickX|mouseReleased|openNextFile|scanNetworks|noInterrupts|digitalWrite|beginSpeaker|mousePressed|isActionDone|mouseDragged|displayLogos|noAutoscroll|addParameter|remoteNumber|getModifiers|keyboardRead|userNameRead|waitContinue|processInput|parseCommand|printVersion|readNetworks|writeMessage|blinkVersion|cityNameRead|readMessage|setDataMode|parsePacket|isListening|setBitOrder|beginPacket|isDirectory|motorsWrite|drawCompass|digitalRead|clearScreen|serialEvent|rightToLeft|setTextSize|leftToRight|requestFrom|keyReleased|compassRead|analogWrite|interrupts|WiFiServer|disconnect|playMelody|parseFloat|autoscroll|getPINUsed|setPINUsed|setTimeout|sendAnalog|readSlider|analogRead|beginWrite|createChar|motorsStop|keyPressed|tempoWrite|readButton|subnetMask|debugPrint|macAddress|writeGreen|randomSeed|attachGPRS|readString|sendString|remotePort|releaseAll|mouseMoved|background|getXChange|getYChange|answerCall|getResult|voiceCall|endPacket|constrain|getSocket|writeJSON|getButton|available|connected|findUntil|readBytes|exitValue|readGreen|writeBlue|startLoop|IPAddress|isPressed|sendSysex|pauseMode|gatewayIP|setCursor|getOemKey|tuneWrite|noDisplay|loadImage|switchPIN|onRequest|onReceive|changePIN|playFile|noBuffer|parseInt|overflow|checkPIN|knobRead|beginTFT|bitClear|updateIR|bitWrite|position|writeRGB|highByte|writeRed|setSpeed|readBlue|noStroke|remoteIP|transfer|shutdown|hangCall|beginSMS|endWrite|attached|maintain|noCursor|checkReg|checkPUK|shiftOut|isValid|shiftIn|pulseIn|connect|println|localIP|pinMode|getIMEI|display|noBlink|process|getBand|running|beginSD|drawBMP|lowByte|setBand|release|bitRead|prepare|pointTo|readRed|setMode|noFill|remove|listen|stroke|detach|attach|noTone|exists|buffer|height|bitSet|circle|config|cursor|random|IRread|setDNS|endSMS|getKey|micros|millis|begin|print|write|ready|flush|width|isPIN|blink|clear|press|mkdir|rmdir|close|point|yield|image|BSSID|click|delay|read|text|move|peek|beep|rect|line|open|seek|fill|size|turn|stop|home|find|step|tone|sqrt|RSSI|SSID|end|bit|tan|cos|sin|pow|map|abs|max|min|get|run|put)\b/, + 'builtin': /\b(?:KeyboardController|MouseController|SoftwareSerial|EthernetServer|EthernetClient|LiquidCrystal|LiquidCrystal_I2C|RobotControl|GSMVoiceCall|EthernetUDP|EsploraTFT|HttpClient|RobotMotor|WiFiClient|GSMScanner|FileSystem|Scheduler|GSMServer|YunClient|YunServer|IPAddress|GSMClient|GSMModem|Keyboard|Ethernet|Console|GSMBand|Esplora|Stepper|Process|WiFiUDP|GSM_SMS|Mailbox|USBHost|Firmata|PImage|Client|Server|GSMPIN|FileIO|Bridge|Serial|EEPROM|Stream|Mouse|Audio|Servo|File|Task|GPRS|WiFi|Wire|TFT|GSM|SPI|SD|runShellCommandAsynchronously|analogWriteResolution|retrieveCallingNumber|printFirmwareVersion|analogReadResolution|sendDigitalPortPair|noListenOnLocalhost|readJoystickButton|setFirmwareVersion|readJoystickSwitch|scrollDisplayRight|getVoiceCallStatus|scrollDisplayLeft|writeMicroseconds|delayMicroseconds|beginTransmission|getSignalStrength|runAsynchronously|getAsynchronously|listenOnLocalhost|getCurrentCarrier|readAccelerometer|messageAvailable|sendDigitalPorts|lineFollowConfig|countryNameWrite|runShellCommand|readStringUntil|rewindDirectory|readTemperature|setClockDivider|readLightSensor|endTransmission|analogReference|detachInterrupt|countryNameRead|attachInterrupt|encryptionType|readBytesUntil|robotNameWrite|readMicrophone|robotNameRead|cityNameWrite|userNameWrite|readJoystickY|readJoystickX|mouseReleased|openNextFile|scanNetworks|noInterrupts|digitalWrite|beginSpeaker|mousePressed|isActionDone|mouseDragged|displayLogos|noAutoscroll|addParameter|remoteNumber|getModifiers|keyboardRead|userNameRead|waitContinue|processInput|parseCommand|printVersion|readNetworks|writeMessage|blinkVersion|cityNameRead|readMessage|setDataMode|parsePacket|isListening|setBitOrder|beginPacket|isDirectory|motorsWrite|drawCompass|digitalRead|clearScreen|serialEvent|rightToLeft|setTextSize|leftToRight|requestFrom|keyReleased|compassRead|analogWrite|interrupts|WiFiServer|disconnect|playMelody|parseFloat|autoscroll|getPINUsed|setPINUsed|setTimeout|sendAnalog|readSlider|analogRead|beginWrite|createChar|motorsStop|keyPressed|tempoWrite|readButton|subnetMask|debugPrint|macAddress|writeGreen|randomSeed|attachGPRS|readString|sendString|remotePort|releaseAll|mouseMoved|background|getXChange|getYChange|answerCall|getResult|voiceCall|endPacket|constrain|getSocket|writeJSON|getButton|available|connected|findUntil|readBytes|exitValue|readGreen|writeBlue|startLoop|isPressed|sendSysex|pauseMode|gatewayIP|setCursor|getOemKey|tuneWrite|noDisplay|loadImage|switchPIN|onRequest|onReceive|changePIN|playFile|noBuffer|parseInt|overflow|checkPIN|knobRead|beginTFT|bitClear|updateIR|bitWrite|position|writeRGB|highByte|writeRed|setSpeed|readBlue|noStroke|remoteIP|transfer|shutdown|hangCall|beginSMS|endWrite|attached|maintain|noCursor|checkReg|checkPUK|shiftOut|isValid|shiftIn|pulseIn|connect|println|localIP|pinMode|getIMEI|display|noBlink|process|getBand|running|beginSD|drawBMP|lowByte|setBand|release|bitRead|prepare|pointTo|readRed|setMode|noFill|remove|listen|stroke|detach|attach|noTone|exists|buffer|height|bitSet|circle|config|cursor|random|IRread|setDNS|endSMS|getKey|micros|millis|begin|print|write|ready|flush|width|isPIN|blink|clear|press|mkdir|rmdir|close|point|yield|image|BSSID|click|delay|read|text|move|peek|beep|rect|line|open|seek|fill|size|turn|stop|home|find|step|tone|sqrt|RSSI|SSID|end|bit|tan|cos|sin|pow|map|abs|max|min|get|run|put)\b/, 'constant': /\b(?:DIGITAL_MESSAGE|FIRMATA_STRING|ANALOG_MESSAGE|REPORT_DIGITAL|REPORT_ANALOG|INPUT_PULLUP|SET_PIN_MODE|INTERNAL2V56|SYSTEM_RESET|LED_BUILTIN|INTERNAL1V1|SYSEX_START|INTERNAL|EXTERNAL|DEFAULT|OUTPUT|INPUT|HIGH|LOW)\b/ }); diff --git a/components/prism-arduino.min.js b/components/prism-arduino.min.js index 9624128b76..010132e5e0 100644 --- a/components/prism-arduino.min.js +++ b/components/prism-arduino.min.js @@ -1 +1 @@ -Prism.languages.arduino=Prism.languages.extend("cpp",{keyword:/\b(?:setup|if|else|while|do|for|return|in|instanceof|default|function|loop|goto|switch|case|new|try|throw|catch|finally|null|break|continue|boolean|bool|void|byte|word|string|String|array|int|long|integer|double)\b/,builtin:/\b(?:KeyboardController|MouseController|SoftwareSerial|EthernetServer|EthernetClient|LiquidCrystal|LiquidCrystal_I2C|RobotControl|GSMVoiceCall|EthernetUDP|EsploraTFT|HttpClient|RobotMotor|WiFiClient|GSMScanner|FileSystem|Scheduler|GSMServer|YunClient|YunServer|IPAddress|GSMClient|GSMModem|Keyboard|Ethernet|Console|GSMBand|Esplora|Stepper|Process|WiFiUDP|GSM_SMS|Mailbox|USBHost|Firmata|PImage|Client|Server|GSMPIN|FileIO|Bridge|Serial|EEPROM|Stream|Mouse|Audio|Servo|File|Task|GPRS|WiFi|Wire|TFT|GSM|SPI|SD|runShellCommandAsynchronously|analogWriteResolution|retrieveCallingNumber|printFirmwareVersion|analogReadResolution|sendDigitalPortPair|noListenOnLocalhost|readJoystickButton|setFirmwareVersion|readJoystickSwitch|scrollDisplayRight|getVoiceCallStatus|scrollDisplayLeft|writeMicroseconds|delayMicroseconds|beginTransmission|getSignalStrength|runAsynchronously|getAsynchronously|listenOnLocalhost|getCurrentCarrier|readAccelerometer|messageAvailable|sendDigitalPorts|lineFollowConfig|countryNameWrite|runShellCommand|readStringUntil|rewindDirectory|readTemperature|setClockDivider|readLightSensor|endTransmission|analogReference|detachInterrupt|countryNameRead|attachInterrupt|encryptionType|readBytesUntil|robotNameWrite|readMicrophone|robotNameRead|cityNameWrite|userNameWrite|readJoystickY|readJoystickX|mouseReleased|openNextFile|scanNetworks|noInterrupts|digitalWrite|beginSpeaker|mousePressed|isActionDone|mouseDragged|displayLogos|noAutoscroll|addParameter|remoteNumber|getModifiers|keyboardRead|userNameRead|waitContinue|processInput|parseCommand|printVersion|readNetworks|writeMessage|blinkVersion|cityNameRead|readMessage|setDataMode|parsePacket|isListening|setBitOrder|beginPacket|isDirectory|motorsWrite|drawCompass|digitalRead|clearScreen|serialEvent|rightToLeft|setTextSize|leftToRight|requestFrom|keyReleased|compassRead|analogWrite|interrupts|WiFiServer|disconnect|playMelody|parseFloat|autoscroll|getPINUsed|setPINUsed|setTimeout|sendAnalog|readSlider|analogRead|beginWrite|createChar|motorsStop|keyPressed|tempoWrite|readButton|subnetMask|debugPrint|macAddress|writeGreen|randomSeed|attachGPRS|readString|sendString|remotePort|releaseAll|mouseMoved|background|getXChange|getYChange|answerCall|getResult|voiceCall|endPacket|constrain|getSocket|writeJSON|getButton|available|connected|findUntil|readBytes|exitValue|readGreen|writeBlue|startLoop|IPAddress|isPressed|sendSysex|pauseMode|gatewayIP|setCursor|getOemKey|tuneWrite|noDisplay|loadImage|switchPIN|onRequest|onReceive|changePIN|playFile|noBuffer|parseInt|overflow|checkPIN|knobRead|beginTFT|bitClear|updateIR|bitWrite|position|writeRGB|highByte|writeRed|setSpeed|readBlue|noStroke|remoteIP|transfer|shutdown|hangCall|beginSMS|endWrite|attached|maintain|noCursor|checkReg|checkPUK|shiftOut|isValid|shiftIn|pulseIn|connect|println|localIP|pinMode|getIMEI|display|noBlink|process|getBand|running|beginSD|drawBMP|lowByte|setBand|release|bitRead|prepare|pointTo|readRed|setMode|noFill|remove|listen|stroke|detach|attach|noTone|exists|buffer|height|bitSet|circle|config|cursor|random|IRread|setDNS|endSMS|getKey|micros|millis|begin|print|write|ready|flush|width|isPIN|blink|clear|press|mkdir|rmdir|close|point|yield|image|BSSID|click|delay|read|text|move|peek|beep|rect|line|open|seek|fill|size|turn|stop|home|find|step|tone|sqrt|RSSI|SSID|end|bit|tan|cos|sin|pow|map|abs|max|min|get|run|put)\b/,constant:/\b(?:DIGITAL_MESSAGE|FIRMATA_STRING|ANALOG_MESSAGE|REPORT_DIGITAL|REPORT_ANALOG|INPUT_PULLUP|SET_PIN_MODE|INTERNAL2V56|SYSTEM_RESET|LED_BUILTIN|INTERNAL1V1|SYSEX_START|INTERNAL|EXTERNAL|DEFAULT|OUTPUT|INPUT|HIGH|LOW)\b/}); \ No newline at end of file +Prism.languages.arduino=Prism.languages.extend("cpp",{keyword:/\b(?:setup|if|else|while|do|for|return|in|instanceof|default|function|loop|goto|switch|case|new|try|throw|catch|finally|null|break|continue|boolean|bool|void|byte|word|string|String|array|int|long|integer|double)\b/,builtin:/\b(?:KeyboardController|MouseController|SoftwareSerial|EthernetServer|EthernetClient|LiquidCrystal|LiquidCrystal_I2C|RobotControl|GSMVoiceCall|EthernetUDP|EsploraTFT|HttpClient|RobotMotor|WiFiClient|GSMScanner|FileSystem|Scheduler|GSMServer|YunClient|YunServer|IPAddress|GSMClient|GSMModem|Keyboard|Ethernet|Console|GSMBand|Esplora|Stepper|Process|WiFiUDP|GSM_SMS|Mailbox|USBHost|Firmata|PImage|Client|Server|GSMPIN|FileIO|Bridge|Serial|EEPROM|Stream|Mouse|Audio|Servo|File|Task|GPRS|WiFi|Wire|TFT|GSM|SPI|SD|runShellCommandAsynchronously|analogWriteResolution|retrieveCallingNumber|printFirmwareVersion|analogReadResolution|sendDigitalPortPair|noListenOnLocalhost|readJoystickButton|setFirmwareVersion|readJoystickSwitch|scrollDisplayRight|getVoiceCallStatus|scrollDisplayLeft|writeMicroseconds|delayMicroseconds|beginTransmission|getSignalStrength|runAsynchronously|getAsynchronously|listenOnLocalhost|getCurrentCarrier|readAccelerometer|messageAvailable|sendDigitalPorts|lineFollowConfig|countryNameWrite|runShellCommand|readStringUntil|rewindDirectory|readTemperature|setClockDivider|readLightSensor|endTransmission|analogReference|detachInterrupt|countryNameRead|attachInterrupt|encryptionType|readBytesUntil|robotNameWrite|readMicrophone|robotNameRead|cityNameWrite|userNameWrite|readJoystickY|readJoystickX|mouseReleased|openNextFile|scanNetworks|noInterrupts|digitalWrite|beginSpeaker|mousePressed|isActionDone|mouseDragged|displayLogos|noAutoscroll|addParameter|remoteNumber|getModifiers|keyboardRead|userNameRead|waitContinue|processInput|parseCommand|printVersion|readNetworks|writeMessage|blinkVersion|cityNameRead|readMessage|setDataMode|parsePacket|isListening|setBitOrder|beginPacket|isDirectory|motorsWrite|drawCompass|digitalRead|clearScreen|serialEvent|rightToLeft|setTextSize|leftToRight|requestFrom|keyReleased|compassRead|analogWrite|interrupts|WiFiServer|disconnect|playMelody|parseFloat|autoscroll|getPINUsed|setPINUsed|setTimeout|sendAnalog|readSlider|analogRead|beginWrite|createChar|motorsStop|keyPressed|tempoWrite|readButton|subnetMask|debugPrint|macAddress|writeGreen|randomSeed|attachGPRS|readString|sendString|remotePort|releaseAll|mouseMoved|background|getXChange|getYChange|answerCall|getResult|voiceCall|endPacket|constrain|getSocket|writeJSON|getButton|available|connected|findUntil|readBytes|exitValue|readGreen|writeBlue|startLoop|isPressed|sendSysex|pauseMode|gatewayIP|setCursor|getOemKey|tuneWrite|noDisplay|loadImage|switchPIN|onRequest|onReceive|changePIN|playFile|noBuffer|parseInt|overflow|checkPIN|knobRead|beginTFT|bitClear|updateIR|bitWrite|position|writeRGB|highByte|writeRed|setSpeed|readBlue|noStroke|remoteIP|transfer|shutdown|hangCall|beginSMS|endWrite|attached|maintain|noCursor|checkReg|checkPUK|shiftOut|isValid|shiftIn|pulseIn|connect|println|localIP|pinMode|getIMEI|display|noBlink|process|getBand|running|beginSD|drawBMP|lowByte|setBand|release|bitRead|prepare|pointTo|readRed|setMode|noFill|remove|listen|stroke|detach|attach|noTone|exists|buffer|height|bitSet|circle|config|cursor|random|IRread|setDNS|endSMS|getKey|micros|millis|begin|print|write|ready|flush|width|isPIN|blink|clear|press|mkdir|rmdir|close|point|yield|image|BSSID|click|delay|read|text|move|peek|beep|rect|line|open|seek|fill|size|turn|stop|home|find|step|tone|sqrt|RSSI|SSID|end|bit|tan|cos|sin|pow|map|abs|max|min|get|run|put)\b/,constant:/\b(?:DIGITAL_MESSAGE|FIRMATA_STRING|ANALOG_MESSAGE|REPORT_DIGITAL|REPORT_ANALOG|INPUT_PULLUP|SET_PIN_MODE|INTERNAL2V56|SYSTEM_RESET|LED_BUILTIN|INTERNAL1V1|SYSEX_START|INTERNAL|EXTERNAL|DEFAULT|OUTPUT|INPUT|HIGH|LOW)\b/}); \ No newline at end of file diff --git a/components/prism-cil.js b/components/prism-cil.js index ee0da78da0..e2b4934f27 100644 --- a/components/prism-cil.js +++ b/components/prism-cil.js @@ -18,7 +18,7 @@ Prism.languages.cil = { 'keyword': /\b(?:abstract|ansi|assembly|auto|autochar|beforefieldinit|bool|bstr|byvalstr|catch|char|cil|class|currency|date|decimal|default|enum|error|explicit|extends|extern|famandassem|family|famorassem|final(?:ly)?|float32|float64|hidebysig|iant|idispatch|implements|import|initonly|instance|u?int(?:8|16|32|64)?|interface|iunknown|literal|lpstr|lpstruct|lptstr|lpwstr|managed|method|native(?:Type)?|nested|newslot|object(?:ref)?|pinvokeimpl|private|privatescope|public|reqsecobj|rtspecialname|runtime|sealed|sequential|serializable|specialname|static|string|struct|syschar|tbstr|unicode|unmanagedexp|unsigned|value(?:type)?|variant|virtual|void)\b/, - 'function': /\b(?:(?:constrained|unaligned|volatile|readonly|tail|no)\.)?(?:conv\.(?:[iu][1248]?|ovf\.[iu][1248]?(?:\.un)?|r\.un|r4|r8)|ldc\.(?:i4(?:\.[0-9]+|\.[mM]1|\.s)?|i8|r4|r8)|ldelem(?:\.[iu][1248]?|\.r[48]|\.ref|a)?|ldind\.(?:[iu][1248]?|r[48]|ref)|stelem\.?(?:i[1248]?|r[48]|ref)?|stind\.(?:i[1248]?|r[48]|ref)?|end(?:fault|filter|finally)|ldarg(?:\.[0-3s]|a(?:\.s)?)?|ldloc(?:\.[0-9]+|\.s)?|sub(?:\.ovf(?:\.un)?)?|mul(?:\.ovf(?:\.un)?)?|add(?:\.ovf(?:\.un)?)?|stloc(?:\.[0-3s])?|refany(?:type|val)|blt(?:\.un)?(?:\.s)?|ble(?:\.un)?(?:\.s)?|bgt(?:\.un)?(?:\.s)?|bge(?:\.un)?(?:\.s)?|unbox(?:\.any)?|init(?:blk|obj)|call(?:i|virt)?|brfalse(?:\.s)?|bne\.un(?:\.s)?|ldloca(?:\.s)?|brzero(?:\.s)?|brtrue(?:\.s)?|brnull(?:\.s)?|brinst(?:\.s)?|starg(?:\.s)?|leave(?:\.s)?|shr(?:\.un)?|rem(?:\.un)?|div(?:\.un)?|clt(?:\.un)?|alignment|ldvirtftn|castclass|beq(?:\.s)?|mkrefany|localloc|ckfinite|rethrow|ldtoken|ldsflda|cgt\.un|arglist|switch|stsfld|sizeof|newobj|newarr|ldsfld|ldnull|ldflda|isinst|throw|stobj|stloc|stfld|ldstr|ldobj|ldlen|ldftn|ldfld|cpobj|cpblk|break|br\.s|xor|shl|ret|pop|not|nop|neg|jmp|dup|clt|cgt|ceq|box|and|or|br)\b/, + 'function': /\b(?:(?:constrained|unaligned|volatile|readonly|tail|no)\.)?(?:conv\.(?:[iu][1248]?|ovf\.[iu][1248]?(?:\.un)?|r\.un|r4|r8)|ldc\.(?:i4(?:\.[0-9]+|\.[mM]1|\.s)?|i8|r4|r8)|ldelem(?:\.[iu][1248]?|\.r[48]|\.ref|a)?|ldind\.(?:[iu][1248]?|r[48]|ref)|stelem\.?(?:i[1248]?|r[48]|ref)?|stind\.(?:i[1248]?|r[48]|ref)?|end(?:fault|filter|finally)|ldarg(?:\.[0-3s]|a(?:\.s)?)?|ldloc(?:\.[0-9]+|\.s)?|sub(?:\.ovf(?:\.un)?)?|mul(?:\.ovf(?:\.un)?)?|add(?:\.ovf(?:\.un)?)?|stloc(?:\.[0-3s])?|refany(?:type|val)|blt(?:\.un)?(?:\.s)?|ble(?:\.un)?(?:\.s)?|bgt(?:\.un)?(?:\.s)?|bge(?:\.un)?(?:\.s)?|unbox(?:\.any)?|init(?:blk|obj)|call(?:i|virt)?|brfalse(?:\.s)?|bne\.un(?:\.s)?|ldloca(?:\.s)?|brzero(?:\.s)?|brtrue(?:\.s)?|brnull(?:\.s)?|brinst(?:\.s)?|starg(?:\.s)?|leave(?:\.s)?|shr(?:\.un)?|rem(?:\.un)?|div(?:\.un)?|clt(?:\.un)?|alignment|ldvirtftn|castclass|beq(?:\.s)?|mkrefany|localloc|ckfinite|rethrow|ldtoken|ldsflda|cgt\.un|arglist|switch|stsfld|sizeof|newobj|newarr|ldsfld|ldnull|ldflda|isinst|throw|stobj|stfld|ldstr|ldobj|ldlen|ldftn|ldfld|cpobj|cpblk|break|br\.s|xor|shl|ret|pop|not|nop|neg|jmp|dup|cgt|ceq|box|and|or|br)\b/, 'boolean': /\b(?:true|false)\b/, 'number': /\b-?(?:0x[0-9a-fA-F]+|[0-9]+)(?:\.[0-9a-fA-F]+)?\b/i, diff --git a/components/prism-cil.min.js b/components/prism-cil.min.js index 5669fc4919..4b5e3f9191 100644 --- a/components/prism-cil.min.js +++ b/components/prism-cil.min.js @@ -1 +1 @@ -Prism.languages.cil={comment:/\/\/.*/,string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},directive:{pattern:/(^|\W)\.[a-z]+(?=\s)/,lookbehind:!0,alias:"class-name"},variable:/\[[\w\.]+\]/,keyword:/\b(?:abstract|ansi|assembly|auto|autochar|beforefieldinit|bool|bstr|byvalstr|catch|char|cil|class|currency|date|decimal|default|enum|error|explicit|extends|extern|famandassem|family|famorassem|final(?:ly)?|float32|float64|hidebysig|iant|idispatch|implements|import|initonly|instance|u?int(?:8|16|32|64)?|interface|iunknown|literal|lpstr|lpstruct|lptstr|lpwstr|managed|method|native(?:Type)?|nested|newslot|object(?:ref)?|pinvokeimpl|private|privatescope|public|reqsecobj|rtspecialname|runtime|sealed|sequential|serializable|specialname|static|string|struct|syschar|tbstr|unicode|unmanagedexp|unsigned|value(?:type)?|variant|virtual|void)\b/,function:/\b(?:(?:constrained|unaligned|volatile|readonly|tail|no)\.)?(?:conv\.(?:[iu][1248]?|ovf\.[iu][1248]?(?:\.un)?|r\.un|r4|r8)|ldc\.(?:i4(?:\.[0-9]+|\.[mM]1|\.s)?|i8|r4|r8)|ldelem(?:\.[iu][1248]?|\.r[48]|\.ref|a)?|ldind\.(?:[iu][1248]?|r[48]|ref)|stelem\.?(?:i[1248]?|r[48]|ref)?|stind\.(?:i[1248]?|r[48]|ref)?|end(?:fault|filter|finally)|ldarg(?:\.[0-3s]|a(?:\.s)?)?|ldloc(?:\.[0-9]+|\.s)?|sub(?:\.ovf(?:\.un)?)?|mul(?:\.ovf(?:\.un)?)?|add(?:\.ovf(?:\.un)?)?|stloc(?:\.[0-3s])?|refany(?:type|val)|blt(?:\.un)?(?:\.s)?|ble(?:\.un)?(?:\.s)?|bgt(?:\.un)?(?:\.s)?|bge(?:\.un)?(?:\.s)?|unbox(?:\.any)?|init(?:blk|obj)|call(?:i|virt)?|brfalse(?:\.s)?|bne\.un(?:\.s)?|ldloca(?:\.s)?|brzero(?:\.s)?|brtrue(?:\.s)?|brnull(?:\.s)?|brinst(?:\.s)?|starg(?:\.s)?|leave(?:\.s)?|shr(?:\.un)?|rem(?:\.un)?|div(?:\.un)?|clt(?:\.un)?|alignment|ldvirtftn|castclass|beq(?:\.s)?|mkrefany|localloc|ckfinite|rethrow|ldtoken|ldsflda|cgt\.un|arglist|switch|stsfld|sizeof|newobj|newarr|ldsfld|ldnull|ldflda|isinst|throw|stobj|stloc|stfld|ldstr|ldobj|ldlen|ldftn|ldfld|cpobj|cpblk|break|br\.s|xor|shl|ret|pop|not|nop|neg|jmp|dup|clt|cgt|ceq|box|and|or|br)\b/,boolean:/\b(?:true|false)\b/,number:/\b-?(?:0x[0-9a-fA-F]+|[0-9]+)(?:\.[0-9a-fA-F]+)?\b/i,punctuation:/[{}[\];(),:=]|IL_[0-9A-Za-z]+/}; \ No newline at end of file +Prism.languages.cil={comment:/\/\/.*/,string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},directive:{pattern:/(^|\W)\.[a-z]+(?=\s)/,lookbehind:!0,alias:"class-name"},variable:/\[[\w\.]+\]/,keyword:/\b(?:abstract|ansi|assembly|auto|autochar|beforefieldinit|bool|bstr|byvalstr|catch|char|cil|class|currency|date|decimal|default|enum|error|explicit|extends|extern|famandassem|family|famorassem|final(?:ly)?|float32|float64|hidebysig|iant|idispatch|implements|import|initonly|instance|u?int(?:8|16|32|64)?|interface|iunknown|literal|lpstr|lpstruct|lptstr|lpwstr|managed|method|native(?:Type)?|nested|newslot|object(?:ref)?|pinvokeimpl|private|privatescope|public|reqsecobj|rtspecialname|runtime|sealed|sequential|serializable|specialname|static|string|struct|syschar|tbstr|unicode|unmanagedexp|unsigned|value(?:type)?|variant|virtual|void)\b/,function:/\b(?:(?:constrained|unaligned|volatile|readonly|tail|no)\.)?(?:conv\.(?:[iu][1248]?|ovf\.[iu][1248]?(?:\.un)?|r\.un|r4|r8)|ldc\.(?:i4(?:\.[0-9]+|\.[mM]1|\.s)?|i8|r4|r8)|ldelem(?:\.[iu][1248]?|\.r[48]|\.ref|a)?|ldind\.(?:[iu][1248]?|r[48]|ref)|stelem\.?(?:i[1248]?|r[48]|ref)?|stind\.(?:i[1248]?|r[48]|ref)?|end(?:fault|filter|finally)|ldarg(?:\.[0-3s]|a(?:\.s)?)?|ldloc(?:\.[0-9]+|\.s)?|sub(?:\.ovf(?:\.un)?)?|mul(?:\.ovf(?:\.un)?)?|add(?:\.ovf(?:\.un)?)?|stloc(?:\.[0-3s])?|refany(?:type|val)|blt(?:\.un)?(?:\.s)?|ble(?:\.un)?(?:\.s)?|bgt(?:\.un)?(?:\.s)?|bge(?:\.un)?(?:\.s)?|unbox(?:\.any)?|init(?:blk|obj)|call(?:i|virt)?|brfalse(?:\.s)?|bne\.un(?:\.s)?|ldloca(?:\.s)?|brzero(?:\.s)?|brtrue(?:\.s)?|brnull(?:\.s)?|brinst(?:\.s)?|starg(?:\.s)?|leave(?:\.s)?|shr(?:\.un)?|rem(?:\.un)?|div(?:\.un)?|clt(?:\.un)?|alignment|ldvirtftn|castclass|beq(?:\.s)?|mkrefany|localloc|ckfinite|rethrow|ldtoken|ldsflda|cgt\.un|arglist|switch|stsfld|sizeof|newobj|newarr|ldsfld|ldnull|ldflda|isinst|throw|stobj|stfld|ldstr|ldobj|ldlen|ldftn|ldfld|cpobj|cpblk|break|br\.s|xor|shl|ret|pop|not|nop|neg|jmp|dup|cgt|ceq|box|and|or|br)\b/,boolean:/\b(?:true|false)\b/,number:/\b-?(?:0x[0-9a-fA-F]+|[0-9]+)(?:\.[0-9a-fA-F]+)?\b/i,punctuation:/[{}[\];(),:=]|IL_[0-9A-Za-z]+/}; \ No newline at end of file diff --git a/components/prism-clojure.js b/components/prism-clojure.js index d53f2af55f..b69925aced 100644 --- a/components/prism-clojure.js +++ b/components/prism-clojure.js @@ -7,7 +7,7 @@ Prism.languages.clojure = { }, 'operator': /(?:::|[:|'])\b[a-z][\w*+!?-]*\b/i, //used for symbols and keywords 'keyword': { - pattern: /([^\w+*'?-])(?:def|if|do|let|\.\.|quote|var|->>|->|fn|loop|recur|throw|try|monitor-enter|\.|new|set!|def\-|defn|defn\-|defmacro|defmulti|defmethod|defstruct|defonce|declare|definline|definterface|defprotocol|==|defrecord|>=|deftype|<=|defproject|ns|\*|\+|\-|\/|<|=|>|accessor|agent|agent-errors|aget|alength|all-ns|alter|and|append-child|apply|array-map|aset|aset-boolean|aset-byte|aset-char|aset-double|aset-float|aset-int|aset-long|aset-short|assert|assoc|await|await-for|bean|binding|bit-and|bit-not|bit-or|bit-shift-left|bit-shift-right|bit-xor|boolean|branch\?|butlast|byte|cast|char|children|class|clear-agent-errors|comment|commute|comp|comparator|complement|concat|conj|cons|constantly|cond|if-not|construct-proxy|contains\?|count|create-ns|create-struct|cycle|dec|deref|difference|disj|dissoc|distinct|doall|doc|dorun|doseq|dosync|dotimes|doto|double|down|drop|drop-while|edit|end\?|ensure|eval|every\?|false\?|ffirst|file-seq|filter|find|find-doc|find-ns|find-var|first|float|flush|for|fnseq|frest|gensym|get-proxy-class|get|hash-map|hash-set|identical\?|identity|if-let|import|in-ns|inc|index|insert-child|insert-left|insert-right|inspect-table|inspect-tree|instance\?|int|interleave|intersection|into|into-array|iterate|join|key|keys|keyword|keyword\?|last|lazy-cat|lazy-cons|left|lefts|line-seq|list\*|list|load|load-file|locking|long|loop|macroexpand|macroexpand-1|make-array|make-node|map|map-invert|map\?|mapcat|max|max-key|memfn|merge|merge-with|meta|min|min-key|name|namespace|neg\?|new|newline|next|nil\?|node|not|not-any\?|not-every\?|not=|ns-imports|ns-interns|ns-map|ns-name|ns-publics|ns-refers|ns-resolve|ns-unmap|nth|nthrest|or|parse|partial|path|peek|pop|pos\?|pr|pr-str|print|print-str|println|println-str|prn|prn-str|project|proxy|proxy-mappings|quot|rand|rand-int|range|re-find|re-groups|re-matcher|re-matches|re-pattern|re-seq|read|read-line|reduce|ref|ref-set|refer|rem|remove|remove-method|remove-ns|rename|rename-keys|repeat|replace|replicate|resolve|rest|resultset-seq|reverse|rfirst|right|rights|root|rrest|rseq|second|select|select-keys|send|send-off|seq|seq-zip|seq\?|set|short|slurp|some|sort|sort-by|sorted-map|sorted-map-by|sorted-set|special-symbol\?|split-at|split-with|str|string\?|struct|struct-map|subs|subvec|symbol|symbol\?|sync|take|take-nth|take-while|test|time|to-array|to-array-2d|tree-seq|true\?|union|up|update-proxy|val|vals|var-get|var-set|var\?|vector|vector-zip|vector\?|when|when-first|when-let|when-not|with-local-vars|with-meta|with-open|with-out-str|xml-seq|xml-zip|zero\?|zipmap|zipper)(?=[^\w+*'?-])/, + pattern: /([^\w+*'?-])(?:def|if|do|let|\.\.|quote|var|->>|->|fn|loop|recur|throw|try|monitor-enter|\.|new|set!|def\-|defn|defn\-|defmacro|defmulti|defmethod|defstruct|defonce|declare|definline|definterface|defprotocol|==|defrecord|>=|deftype|<=|defproject|ns|\*|\+|\-|\/|<|=|>|accessor|agent|agent-errors|aget|alength|all-ns|alter|and|append-child|apply|array-map|aset|aset-boolean|aset-byte|aset-char|aset-double|aset-float|aset-int|aset-long|aset-short|assert|assoc|await|await-for|bean|binding|bit-and|bit-not|bit-or|bit-shift-left|bit-shift-right|bit-xor|boolean|branch\?|butlast|byte|cast|char|children|class|clear-agent-errors|comment|commute|comp|comparator|complement|concat|conj|cons|constantly|cond|if-not|construct-proxy|contains\?|count|create-ns|create-struct|cycle|dec|deref|difference|disj|dissoc|distinct|doall|doc|dorun|doseq|dosync|dotimes|doto|double|down|drop|drop-while|edit|end\?|ensure|eval|every\?|false\?|ffirst|file-seq|filter|find|find-doc|find-ns|find-var|first|float|flush|for|fnseq|frest|gensym|get-proxy-class|get|hash-map|hash-set|identical\?|identity|if-let|import|in-ns|inc|index|insert-child|insert-left|insert-right|inspect-table|inspect-tree|instance\?|int|interleave|intersection|into|into-array|iterate|join|key|keys|keyword|keyword\?|last|lazy-cat|lazy-cons|left|lefts|line-seq|list\*|list|load|load-file|locking|long|macroexpand|macroexpand-1|make-array|make-node|map|map-invert|map\?|mapcat|max|max-key|memfn|merge|merge-with|meta|min|min-key|name|namespace|neg\?|newline|next|nil\?|node|not|not-any\?|not-every\?|not=|ns-imports|ns-interns|ns-map|ns-name|ns-publics|ns-refers|ns-resolve|ns-unmap|nth|nthrest|or|parse|partial|path|peek|pop|pos\?|pr|pr-str|print|print-str|println|println-str|prn|prn-str|project|proxy|proxy-mappings|quot|rand|rand-int|range|re-find|re-groups|re-matcher|re-matches|re-pattern|re-seq|read|read-line|reduce|ref|ref-set|refer|rem|remove|remove-method|remove-ns|rename|rename-keys|repeat|replace|replicate|resolve|rest|resultset-seq|reverse|rfirst|right|rights|root|rrest|rseq|second|select|select-keys|send|send-off|seq|seq-zip|seq\?|set|short|slurp|some|sort|sort-by|sorted-map|sorted-map-by|sorted-set|special-symbol\?|split-at|split-with|str|string\?|struct|struct-map|subs|subvec|symbol|symbol\?|sync|take|take-nth|take-while|test|time|to-array|to-array-2d|tree-seq|true\?|union|up|update-proxy|val|vals|var-get|var-set|var\?|vector|vector-zip|vector\?|when|when-first|when-let|when-not|with-local-vars|with-meta|with-open|with-out-str|xml-seq|xml-zip|zero\?|zipmap|zipper)(?=[^\w+*'?-])/, lookbehind: true }, 'boolean': /\b(?:true|false|nil)\b/, diff --git a/components/prism-clojure.min.js b/components/prism-clojure.min.js index f9f1dcd638..122f9ba52e 100644 --- a/components/prism-clojure.min.js +++ b/components/prism-clojure.min.js @@ -1 +1 @@ -Prism.languages.clojure={comment:/;.*/,string:{pattern:/"(?:[^"\\]|\\.)*"/,greedy:!0},operator:/(?:::|[:|'])\b[a-z][\w*+!?-]*\b/i,keyword:{pattern:/([^\w+*'?-])(?:def|if|do|let|\.\.|quote|var|->>|->|fn|loop|recur|throw|try|monitor-enter|\.|new|set!|def\-|defn|defn\-|defmacro|defmulti|defmethod|defstruct|defonce|declare|definline|definterface|defprotocol|==|defrecord|>=|deftype|<=|defproject|ns|\*|\+|\-|\/|<|=|>|accessor|agent|agent-errors|aget|alength|all-ns|alter|and|append-child|apply|array-map|aset|aset-boolean|aset-byte|aset-char|aset-double|aset-float|aset-int|aset-long|aset-short|assert|assoc|await|await-for|bean|binding|bit-and|bit-not|bit-or|bit-shift-left|bit-shift-right|bit-xor|boolean|branch\?|butlast|byte|cast|char|children|class|clear-agent-errors|comment|commute|comp|comparator|complement|concat|conj|cons|constantly|cond|if-not|construct-proxy|contains\?|count|create-ns|create-struct|cycle|dec|deref|difference|disj|dissoc|distinct|doall|doc|dorun|doseq|dosync|dotimes|doto|double|down|drop|drop-while|edit|end\?|ensure|eval|every\?|false\?|ffirst|file-seq|filter|find|find-doc|find-ns|find-var|first|float|flush|for|fnseq|frest|gensym|get-proxy-class|get|hash-map|hash-set|identical\?|identity|if-let|import|in-ns|inc|index|insert-child|insert-left|insert-right|inspect-table|inspect-tree|instance\?|int|interleave|intersection|into|into-array|iterate|join|key|keys|keyword|keyword\?|last|lazy-cat|lazy-cons|left|lefts|line-seq|list\*|list|load|load-file|locking|long|loop|macroexpand|macroexpand-1|make-array|make-node|map|map-invert|map\?|mapcat|max|max-key|memfn|merge|merge-with|meta|min|min-key|name|namespace|neg\?|new|newline|next|nil\?|node|not|not-any\?|not-every\?|not=|ns-imports|ns-interns|ns-map|ns-name|ns-publics|ns-refers|ns-resolve|ns-unmap|nth|nthrest|or|parse|partial|path|peek|pop|pos\?|pr|pr-str|print|print-str|println|println-str|prn|prn-str|project|proxy|proxy-mappings|quot|rand|rand-int|range|re-find|re-groups|re-matcher|re-matches|re-pattern|re-seq|read|read-line|reduce|ref|ref-set|refer|rem|remove|remove-method|remove-ns|rename|rename-keys|repeat|replace|replicate|resolve|rest|resultset-seq|reverse|rfirst|right|rights|root|rrest|rseq|second|select|select-keys|send|send-off|seq|seq-zip|seq\?|set|short|slurp|some|sort|sort-by|sorted-map|sorted-map-by|sorted-set|special-symbol\?|split-at|split-with|str|string\?|struct|struct-map|subs|subvec|symbol|symbol\?|sync|take|take-nth|take-while|test|time|to-array|to-array-2d|tree-seq|true\?|union|up|update-proxy|val|vals|var-get|var-set|var\?|vector|vector-zip|vector\?|when|when-first|when-let|when-not|with-local-vars|with-meta|with-open|with-out-str|xml-seq|xml-zip|zero\?|zipmap|zipper)(?=[^\w+*'?-])/,lookbehind:!0},boolean:/\b(?:true|false|nil)\b/,number:/\b[\da-f]+\b/i,punctuation:/[{}\[\](),]/}; \ No newline at end of file +Prism.languages.clojure={comment:/;.*/,string:{pattern:/"(?:[^"\\]|\\.)*"/,greedy:!0},operator:/(?:::|[:|'])\b[a-z][\w*+!?-]*\b/i,keyword:{pattern:/([^\w+*'?-])(?:def|if|do|let|\.\.|quote|var|->>|->|fn|loop|recur|throw|try|monitor-enter|\.|new|set!|def\-|defn|defn\-|defmacro|defmulti|defmethod|defstruct|defonce|declare|definline|definterface|defprotocol|==|defrecord|>=|deftype|<=|defproject|ns|\*|\+|\-|\/|<|=|>|accessor|agent|agent-errors|aget|alength|all-ns|alter|and|append-child|apply|array-map|aset|aset-boolean|aset-byte|aset-char|aset-double|aset-float|aset-int|aset-long|aset-short|assert|assoc|await|await-for|bean|binding|bit-and|bit-not|bit-or|bit-shift-left|bit-shift-right|bit-xor|boolean|branch\?|butlast|byte|cast|char|children|class|clear-agent-errors|comment|commute|comp|comparator|complement|concat|conj|cons|constantly|cond|if-not|construct-proxy|contains\?|count|create-ns|create-struct|cycle|dec|deref|difference|disj|dissoc|distinct|doall|doc|dorun|doseq|dosync|dotimes|doto|double|down|drop|drop-while|edit|end\?|ensure|eval|every\?|false\?|ffirst|file-seq|filter|find|find-doc|find-ns|find-var|first|float|flush|for|fnseq|frest|gensym|get-proxy-class|get|hash-map|hash-set|identical\?|identity|if-let|import|in-ns|inc|index|insert-child|insert-left|insert-right|inspect-table|inspect-tree|instance\?|int|interleave|intersection|into|into-array|iterate|join|key|keys|keyword|keyword\?|last|lazy-cat|lazy-cons|left|lefts|line-seq|list\*|list|load|load-file|locking|long|macroexpand|macroexpand-1|make-array|make-node|map|map-invert|map\?|mapcat|max|max-key|memfn|merge|merge-with|meta|min|min-key|name|namespace|neg\?|newline|next|nil\?|node|not|not-any\?|not-every\?|not=|ns-imports|ns-interns|ns-map|ns-name|ns-publics|ns-refers|ns-resolve|ns-unmap|nth|nthrest|or|parse|partial|path|peek|pop|pos\?|pr|pr-str|print|print-str|println|println-str|prn|prn-str|project|proxy|proxy-mappings|quot|rand|rand-int|range|re-find|re-groups|re-matcher|re-matches|re-pattern|re-seq|read|read-line|reduce|ref|ref-set|refer|rem|remove|remove-method|remove-ns|rename|rename-keys|repeat|replace|replicate|resolve|rest|resultset-seq|reverse|rfirst|right|rights|root|rrest|rseq|second|select|select-keys|send|send-off|seq|seq-zip|seq\?|set|short|slurp|some|sort|sort-by|sorted-map|sorted-map-by|sorted-set|special-symbol\?|split-at|split-with|str|string\?|struct|struct-map|subs|subvec|symbol|symbol\?|sync|take|take-nth|take-while|test|time|to-array|to-array-2d|tree-seq|true\?|union|up|update-proxy|val|vals|var-get|var-set|var\?|vector|vector-zip|vector\?|when|when-first|when-let|when-not|with-local-vars|with-meta|with-open|with-out-str|xml-seq|xml-zip|zero\?|zipmap|zipper)(?=[^\w+*'?-])/,lookbehind:!0},boolean:/\b(?:true|false|nil)\b/,number:/\b[\da-f]+\b/i,punctuation:/[{}\[\](),]/}; \ No newline at end of file diff --git a/components/prism-firestore-security-rules.js b/components/prism-firestore-security-rules.js index c08d926a6e..90e34b0be7 100644 --- a/components/prism-firestore-security-rules.js +++ b/components/prism-firestore-security-rules.js @@ -1,7 +1,7 @@ Prism.languages['firestore-security-rules'] = Prism.languages.extend('clike', { 'comment': /\/\/.*/, 'keyword': /\b(?:allow|function|if|match|null|return|rules_version|service)\b/, - 'operator': /&&|\|\||[<>!=]=?|[-+*/%=]|\b(?:in|is)\b/, + 'operator': /&&|\|\||[<>!=]=?|[-+*/%]|\b(?:in|is)\b/, }); delete Prism.languages['firestore-security-rules']['class-name']; diff --git a/components/prism-firestore-security-rules.min.js b/components/prism-firestore-security-rules.min.js index e9171f42ae..c826193005 100644 --- a/components/prism-firestore-security-rules.min.js +++ b/components/prism-firestore-security-rules.min.js @@ -1 +1 @@ -Prism.languages["firestore-security-rules"]=Prism.languages.extend("clike",{comment:/\/\/.*/,keyword:/\b(?:allow|function|if|match|null|return|rules_version|service)\b/,operator:/&&|\|\||[<>!=]=?|[-+*/%=]|\b(?:in|is)\b/}),delete Prism.languages["firestore-security-rules"]["class-name"],Prism.languages.insertBefore("firestore-security-rules","keyword",{path:{pattern:/(^|[\s(),])(?:\/(?:[\w\xA0-\uFFFF]+|\{[\w\xA0-\uFFFF]+(?:=\*\*)?\}|\$\([\w\xA0-\uFFFF.]+\)))+/,lookbehind:!0,greedy:!0,inside:{variable:{pattern:/\{[\w\xA0-\uFFFF]+(?:=\*\*)?\}|\$\([\w\xA0-\uFFFF.]+\)/,inside:{operator:/=/,keyword:/\*\*/,punctuation:/[.$(){}]/}},punctuation:/[/]/}},method:{pattern:/(\ballow\s+)[a-z]+(?:\s*,\s*[a-z]+)*(?=\s*[:;])/,lookbehind:!0,alias:"builtin",inside:{punctuation:/,/}}}); \ No newline at end of file +Prism.languages["firestore-security-rules"]=Prism.languages.extend("clike",{comment:/\/\/.*/,keyword:/\b(?:allow|function|if|match|null|return|rules_version|service)\b/,operator:/&&|\|\||[<>!=]=?|[-+*/%]|\b(?:in|is)\b/}),delete Prism.languages["firestore-security-rules"]["class-name"],Prism.languages.insertBefore("firestore-security-rules","keyword",{path:{pattern:/(^|[\s(),])(?:\/(?:[\w\xA0-\uFFFF]+|\{[\w\xA0-\uFFFF]+(?:=\*\*)?\}|\$\([\w\xA0-\uFFFF.]+\)))+/,lookbehind:!0,greedy:!0,inside:{variable:{pattern:/\{[\w\xA0-\uFFFF]+(?:=\*\*)?\}|\$\([\w\xA0-\uFFFF.]+\)/,inside:{operator:/=/,keyword:/\*\*/,punctuation:/[.$(){}]/}},punctuation:/[/]/}},method:{pattern:/(\ballow\s+)[a-z]+(?:\s*,\s*[a-z]+)*(?=\s*[:;])/,lookbehind:!0,alias:"builtin",inside:{punctuation:/,/}}}); \ No newline at end of file diff --git a/components/prism-fortran.js b/components/prism-fortran.js index ecee42d828..6cbe762387 100644 --- a/components/prism-fortran.js +++ b/components/prism-fortran.js @@ -29,7 +29,7 @@ Prism.languages.fortran = { /\b(?:ASSIGNMENT|DEFAULT|ELEMENTAL|ELSE|ELSEWHERE|ELSEIF|ENTRY|IN|INCLUDE|INOUT|KIND|NULL|ONLY|OPERATOR|OUT|PURE|RECURSIVE|RESULT|SEQUENCE|STAT|THEN|USE)\b/i ], 'operator': [ - /\*\*|\/\/|=>|[=\/]=|[<>]=?|::|[+\-*=%]|\.(?:EQ|NE|LT|LE|GT|GE|NOT|AND|OR|EQV|NEQV)\.|\.[A-Z]+\./i, + /\*\*|\/\/|=>|[=\/]=|[<>]=?|::|[+\-*=%]|\.[A-Z]+\./i, { // Use lookbehind to prevent confusion with (/ /) pattern: /(^|(?!\().)\/(?!\))/, @@ -37,4 +37,4 @@ Prism.languages.fortran = { } ], 'punctuation': /\(\/|\/\)|[(),;:&]/ -}; \ No newline at end of file +}; diff --git a/components/prism-fortran.min.js b/components/prism-fortran.min.js index 6fc0847769..aa25e86802 100644 --- a/components/prism-fortran.min.js +++ b/components/prism-fortran.min.js @@ -1 +1 @@ -Prism.languages.fortran={"quoted-number":{pattern:/[BOZ](['"])[A-F0-9]+\1/i,alias:"number"},string:{pattern:/(?:\w+_)?(['"])(?:\1\1|&(?:\r\n?|\n)(?:\s*!.+(?:\r\n?|\n))?|(?!\1).)*(?:\1|&)/,inside:{comment:{pattern:/(&(?:\r\n?|\n)\s*)!.*/,lookbehind:!0}}},comment:{pattern:/!.*/,greedy:!0},boolean:/\.(?:TRUE|FALSE)\.(?:_\w+)?/i,number:/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[ED][+-]?\d+)?(?:_\w+)?/i,keyword:[/\b(?:INTEGER|REAL|DOUBLE ?PRECISION|COMPLEX|CHARACTER|LOGICAL)\b/i,/\b(?:END ?)?(?:BLOCK ?DATA|DO|FILE|FORALL|FUNCTION|IF|INTERFACE|MODULE(?! PROCEDURE)|PROGRAM|SELECT|SUBROUTINE|TYPE|WHERE)\b/i,/\b(?:ALLOCATABLE|ALLOCATE|BACKSPACE|CALL|CASE|CLOSE|COMMON|CONTAINS|CONTINUE|CYCLE|DATA|DEALLOCATE|DIMENSION|DO|END|EQUIVALENCE|EXIT|EXTERNAL|FORMAT|GO ?TO|IMPLICIT(?: NONE)?|INQUIRE|INTENT|INTRINSIC|MODULE PROCEDURE|NAMELIST|NULLIFY|OPEN|OPTIONAL|PARAMETER|POINTER|PRINT|PRIVATE|PUBLIC|READ|RETURN|REWIND|SAVE|SELECT|STOP|TARGET|WHILE|WRITE)\b/i,/\b(?:ASSIGNMENT|DEFAULT|ELEMENTAL|ELSE|ELSEWHERE|ELSEIF|ENTRY|IN|INCLUDE|INOUT|KIND|NULL|ONLY|OPERATOR|OUT|PURE|RECURSIVE|RESULT|SEQUENCE|STAT|THEN|USE)\b/i],operator:[/\*\*|\/\/|=>|[=\/]=|[<>]=?|::|[+\-*=%]|\.(?:EQ|NE|LT|LE|GT|GE|NOT|AND|OR|EQV|NEQV)\.|\.[A-Z]+\./i,{pattern:/(^|(?!\().)\/(?!\))/,lookbehind:!0}],punctuation:/\(\/|\/\)|[(),;:&]/}; \ No newline at end of file +Prism.languages.fortran={"quoted-number":{pattern:/[BOZ](['"])[A-F0-9]+\1/i,alias:"number"},string:{pattern:/(?:\w+_)?(['"])(?:\1\1|&(?:\r\n?|\n)(?:\s*!.+(?:\r\n?|\n))?|(?!\1).)*(?:\1|&)/,inside:{comment:{pattern:/(&(?:\r\n?|\n)\s*)!.*/,lookbehind:!0}}},comment:{pattern:/!.*/,greedy:!0},boolean:/\.(?:TRUE|FALSE)\.(?:_\w+)?/i,number:/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[ED][+-]?\d+)?(?:_\w+)?/i,keyword:[/\b(?:INTEGER|REAL|DOUBLE ?PRECISION|COMPLEX|CHARACTER|LOGICAL)\b/i,/\b(?:END ?)?(?:BLOCK ?DATA|DO|FILE|FORALL|FUNCTION|IF|INTERFACE|MODULE(?! PROCEDURE)|PROGRAM|SELECT|SUBROUTINE|TYPE|WHERE)\b/i,/\b(?:ALLOCATABLE|ALLOCATE|BACKSPACE|CALL|CASE|CLOSE|COMMON|CONTAINS|CONTINUE|CYCLE|DATA|DEALLOCATE|DIMENSION|DO|END|EQUIVALENCE|EXIT|EXTERNAL|FORMAT|GO ?TO|IMPLICIT(?: NONE)?|INQUIRE|INTENT|INTRINSIC|MODULE PROCEDURE|NAMELIST|NULLIFY|OPEN|OPTIONAL|PARAMETER|POINTER|PRINT|PRIVATE|PUBLIC|READ|RETURN|REWIND|SAVE|SELECT|STOP|TARGET|WHILE|WRITE)\b/i,/\b(?:ASSIGNMENT|DEFAULT|ELEMENTAL|ELSE|ELSEWHERE|ELSEIF|ENTRY|IN|INCLUDE|INOUT|KIND|NULL|ONLY|OPERATOR|OUT|PURE|RECURSIVE|RESULT|SEQUENCE|STAT|THEN|USE)\b/i],operator:[/\*\*|\/\/|=>|[=\/]=|[<>]=?|::|[+\-*=%]|\.[A-Z]+\./i,{pattern:/(^|(?!\().)\/(?!\))/,lookbehind:!0}],punctuation:/\(\/|\/\)|[(),;:&]/}; \ No newline at end of file diff --git a/components/prism-gml.js b/components/prism-gml.js index c1bf77e3b6..0ea8137ab3 100644 --- a/components/prism-gml.js +++ b/components/prism-gml.js @@ -1,7 +1,7 @@ Prism.languages.gamemakerlanguage = Prism.languages.gml = Prism.languages.extend('clike', { 'number': /(?:\b0x[\da-f]+|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?)[ulf]*/i, 'keyword': /\b(?:if|else|switch|case|default|break|for|repeat|while|do|until|continue|exit|return|globalvar|var|enum)\b/, - 'operator': /[-+%=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]|\b(?:or|and|not|with|at|xor|not)\b/, + 'operator': /[-+%=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]|\b(?:or|and|not|with|at|xor)\b/, 'constant': /\b(?:self|other|all|noone|global|local|undefined|pointer_(?:invalid|null)|action_(?:stop|restart|continue|reverse)|pi|GM_build_date|GM_version|timezone_(?:local|utc)|gamespeed_(?:fps|microseconds)|ev_(?:create|destroy|step|alarm|keyboard|mouse|collision|other|draw|draw_(?:begin|end|pre|post)|keypress|keyrelease|trigger|(?:left|right|middle|no)_button|(?:left|right|middle)_press|(?:left|right|middle)_release|mouse_(?:enter|leave|wheel_up|wheel_down)|global_(?:left|right|middle)_button|global_(?:left|right|middle)_press|global_(?:left|right|middle)_release|joystick(?:1|2)_(?:left|right|up|down|button1|button2|button3|button4|button5|button6|button7|button8)|outside|boundary|game_start|game_end|room_start|room_end|no_more_lives|animation_end|end_of_path|no_more_health|user\d|step_(?:normal|begin|end)|gui|gui_begin|gui_end)|vk_(?:nokey|anykey|enter|return|shift|control|alt|escape|space|backspace|tab|pause|printscreen|left|right|up|down|home|end|delete|insert|pageup|pagedown|f\d|numpad\d|divide|multiply|subtract|add|decimal|lshift|lcontrol|lalt|rshift|rcontrol|ralt)|mb_(?:any|none|left|right|middle)|c_(?:aqua|black|blue|dkgray|fuchsia|gray|green|lime|ltgray|maroon|navy|olive|purple|red|silver|teal|white|yellow|orange)|fa_(?:left|center|right|top|middle|bottom|readonly|hidden|sysfile|volumeid|directory|archive)|pr_(?:pointlist|linelist|linestrip|trianglelist|trianglestrip|trianglefan)|bm_(?:complex|normal|add|max|subtract|zero|one|src_colour|inv_src_colour|src_color|inv_src_color|src_alpha|inv_src_alpha|dest_alpha|inv_dest_alpha|dest_colour|inv_dest_colour|dest_color|inv_dest_color|src_alpha_sat)|audio_(?:falloff_(?:none|inverse_distance|inverse_distance_clamped|linear_distance|linear_distance_clamped|exponent_distance|exponent_distance_clamped)|old_system|new_system|mono|stereo|3d)|cr_(?:default|none|arrow|cross|beam|size_nesw|size_ns|size_nwse|size_we|uparrow|hourglass|drag|appstart|handpoint|size_all)|spritespeed_framesper(?:second|gameframe)|asset_(?:object|unknown|sprite|sound|room|path|script|font|timeline|tiles|shader)|ds_type_(?:map|list|stack|queue|grid|priority)|ef_(?:explosion|ring|ellipse|firework|smoke|smokeup|star|spark|flare|cloud|rain|snow)|pt_shape_(?:pixel|disk|square|line|star|circle|ring|sphere|flare|spark|explosion|cloud|smoke|snow)|ps_(?:distr|shape)_(?:linear|gaussian|invgaussian|rectangle|ellipse|diamond|line)|ty_(?:real|string)|dll_(?:cdel|cdecl|stdcall)|matrix_(?:view|projection|world)|os_(?:win32|windows|macosx|ios|android|linux|unknown|winphone|win8native|psvita|ps4|xboxone|ps3|uwp)|browser_(?:not_a_browser|unknown|ie|firefox|chrome|safari|safari_mobile|opera|tizen|windows_store|ie_mobile)|device_ios_(?:unknown|iphone|iphone_retina|ipad|ipad_retina|iphone5|iphone6|iphone6plus)|device_(?:emulator|tablet)|display_(?:landscape|landscape_flipped|portrait|portrait_flipped)|of_challenge_(?:win|lose|tie)|leaderboard_type_(?:number|time_mins_secs)|cmpfunc_(?:never|less|equal|lessequal|greater|notequal|greaterequal|always)|cull_(?:noculling|clockwise|counterclockwise)|lighttype_(?:dir|point)|iap_(?:ev_storeload|ev_product|ev_purchase|ev_consume|ev_restore|storeload_ok|storeload_failed|status_uninitialised|status_unavailable|status_loading|status_available|status_processing|status_restoring|failed|unavailable|available|purchased|canceled|refunded)|fb_login_(?:default|fallback_to_webview|no_fallback_to_webview|forcing_webview|use_system_account|forcing_safari)|phy_joint_(?:anchor_1_x|anchor_1_y|anchor_2_x|anchor_2_y|reaction_force_x|reaction_force_y|reaction_torque|motor_speed|angle|motor_torque|max_motor_torque|translation|speed|motor_force|max_motor_force|length_1|length_2|damping_ratio|frequency|lower_angle_limit|upper_angle_limit|angle_limits|max_length|max_torque|max_force)|phy_debug_render_(?:aabb|collision_pairs|coms|core_shapes|joints|obb|shapes)|phy_particle_flag_(?:water|zombie|wall|spring|elastic|viscous|powder|tensile|colourmixing|colormixing)|phy_particle_group_flag_(?:solid|rigid)|phy_particle_data_flag_(?:typeflags|position|velocity|colour|color|category)|achievement_(?:our_info|friends_info|leaderboard_info|info|filter_(?:all_players|friends_only|favorites_only)|type_challenge|type_score_challenge|pic_loaded|show_(?:ui|profile|leaderboard|achievement|bank|friend_picker|purchase_prompt))|network_(?:socket_(?:tcp|udp|bluetooth)|type_(?:connect|disconnect|data|non_blocking_connect)|config_(?:connect_timeout|use_non_blocking_socket|enable_reliable_udp|disable_reliable_udp))|buffer_(?:fixed|grow|wrap|fast|vbuffer|network|u8|s8|u16|s16|u32|s32|u64|f16|f32|f64|bool|text|string|seek_start|seek_relative|seek_end|generalerror|outofspace|outofbounds|invalidtype)|gp_(?:face\d|shoulderl|shoulderr|shoulderlb|shoulderrb|select|start|stickl|stickr|padu|padd|padl|padr|axislh|axislv|axisrh|axisrv)|ov_(?:friends|community|players|settings|gamegroup|achievements)|lb_sort_(?:none|ascending|descending)|lb_disp_(?:none|numeric|time_sec|time_ms)|ugc_(?:result_success|filetype_(?:community|microtrans)|visibility_(?:public|friends_only|private)|query_RankedBy(?:Vote|PublicationDate|Trend|NumTimesReported|TotalVotesAsc|VotesUp|TextSearch)|query_(?:AcceptedForGameRankedByAcceptanceDate|FavoritedByFriendsRankedByPublicationDate|CreatedByFriendsRankedByPublicationDate|NotYetRated)|sortorder_CreationOrder(?:Desc|Asc)|sortorder_(?:TitleAsc|LastUpdatedDesc|SubscriptionDateDesc|VoteScoreDesc|ForModeration)|list_(?:Published|VotedOn|VotedUp|VotedDown|WillVoteLater|Favorited|Subscribed|UsedOrPlayed|Followed)|match_(?:Items|Items_Mtx|Items_ReadyToUse|Collections|Artwork|Videos|Screenshots|AllGuides|WebGuides|IntegratedGuides|UsableInGame|ControllerBindings))|vertex_usage_(?:position|colour|color|normal|texcoord|textcoord|blendweight|blendindices|psize|tangent|binormal|fog|depth|sample)|vertex_type_(?:float\d|colour|color|ubyte4)|layerelementtype_(?:undefined|background|instance|oldtilemap|sprite|tilemap|particlesystem|tile)|tile_(?:rotate|flip|mirror|index_mask)|input_type|se_(?:chorus|compressor|echo|equalizer|flanger|gargle|none|reverb)|text_type|(?:obj|scr|spr|rm)\w+)\b/, 'variable': /\b(?:x|y|(?:x|y)(?:previous|start)|(?:h|v)speed|direction|speed|friction|gravity|gravity_direction|path_(?:index|position|positionprevious|speed|scale|orientation|endaction)|object_index|id|solid|persistent|mask_index|instance_(?:count|id)|alarm|timeline_(?:index|position|speed|running|loop)|visible|sprite_(?:index|width|height|xoffset|yoffset)|image_(?:number|index|speed|depth|xscale|yscale|angle|alpha|blend)|bbox_(?:left|right|top|bottom)|layer|phy_(?:rotation|(?:position|linear_velocity|speed|com|collision|col_normal)_(?:x|y)|angular_(?:velocity|damping)|position_(?:x|y)previous|speed|linear_damping|bullet|fixed_rotation|active|mass|inertia|dynamic|kinematic|sleeping|collision_points)|working_directory|webgl_enabled|view_(?:(?:y|x|w|h)view|(?:y|x|w|h)port|(?:v|h)(?:speed|border)|visible|surface_id|object|enabled|current|angle)|undefined|transition_(?:steps|kind|color)|temp_directory|show_(?:score|lives|health)|secure_mode|score|room_(?:width|speed|persistent|last|height|first|caption)|room|pointer_(?:null|invalid)|os_(?:version|type|device|browser)|mouse_(?:y|x|lastbutton|button)|lives|keyboard_(?:string|lastkey|lastchar|key)|iap_data|health|gamemaker_(?:version|registered|pro)|game_(?:save|project|display)_(?:id|name)|fps_real|fps|event_(?:type|object|number|action)|error_(?:occurred|last)|display_aa|delta_time|debug_mode|cursor_sprite|current_(?:year|weekday|time|second|month|minute|hour|day)|caption_(?:score|lives|health)|browser_(?:width|height)|background_(?:yscale|y|xscale|x|width|vtiled|vspeed|visible|showcolour|showcolor|index|htiled|hspeed|height|foreground|colour|color|blend|alpha)|async_load|application_surface|argument(?:_relitive|_count|\d)|argument|global|local|self|other)\b/ }); diff --git a/components/prism-gml.min.js b/components/prism-gml.min.js index a4a662c656..d8cc6761be 100644 --- a/components/prism-gml.min.js +++ b/components/prism-gml.min.js @@ -1 +1 @@ -Prism.languages.gamemakerlanguage=Prism.languages.gml=Prism.languages.extend("clike",{number:/(?:\b0x[\da-f]+|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?)[ulf]*/i,keyword:/\b(?:if|else|switch|case|default|break|for|repeat|while|do|until|continue|exit|return|globalvar|var|enum)\b/,operator:/[-+%=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]|\b(?:or|and|not|with|at|xor|not)\b/,constant:/\b(?:self|other|all|noone|global|local|undefined|pointer_(?:invalid|null)|action_(?:stop|restart|continue|reverse)|pi|GM_build_date|GM_version|timezone_(?:local|utc)|gamespeed_(?:fps|microseconds)|ev_(?:create|destroy|step|alarm|keyboard|mouse|collision|other|draw|draw_(?:begin|end|pre|post)|keypress|keyrelease|trigger|(?:left|right|middle|no)_button|(?:left|right|middle)_press|(?:left|right|middle)_release|mouse_(?:enter|leave|wheel_up|wheel_down)|global_(?:left|right|middle)_button|global_(?:left|right|middle)_press|global_(?:left|right|middle)_release|joystick(?:1|2)_(?:left|right|up|down|button1|button2|button3|button4|button5|button6|button7|button8)|outside|boundary|game_start|game_end|room_start|room_end|no_more_lives|animation_end|end_of_path|no_more_health|user\d|step_(?:normal|begin|end)|gui|gui_begin|gui_end)|vk_(?:nokey|anykey|enter|return|shift|control|alt|escape|space|backspace|tab|pause|printscreen|left|right|up|down|home|end|delete|insert|pageup|pagedown|f\d|numpad\d|divide|multiply|subtract|add|decimal|lshift|lcontrol|lalt|rshift|rcontrol|ralt)|mb_(?:any|none|left|right|middle)|c_(?:aqua|black|blue|dkgray|fuchsia|gray|green|lime|ltgray|maroon|navy|olive|purple|red|silver|teal|white|yellow|orange)|fa_(?:left|center|right|top|middle|bottom|readonly|hidden|sysfile|volumeid|directory|archive)|pr_(?:pointlist|linelist|linestrip|trianglelist|trianglestrip|trianglefan)|bm_(?:complex|normal|add|max|subtract|zero|one|src_colour|inv_src_colour|src_color|inv_src_color|src_alpha|inv_src_alpha|dest_alpha|inv_dest_alpha|dest_colour|inv_dest_colour|dest_color|inv_dest_color|src_alpha_sat)|audio_(?:falloff_(?:none|inverse_distance|inverse_distance_clamped|linear_distance|linear_distance_clamped|exponent_distance|exponent_distance_clamped)|old_system|new_system|mono|stereo|3d)|cr_(?:default|none|arrow|cross|beam|size_nesw|size_ns|size_nwse|size_we|uparrow|hourglass|drag|appstart|handpoint|size_all)|spritespeed_framesper(?:second|gameframe)|asset_(?:object|unknown|sprite|sound|room|path|script|font|timeline|tiles|shader)|ds_type_(?:map|list|stack|queue|grid|priority)|ef_(?:explosion|ring|ellipse|firework|smoke|smokeup|star|spark|flare|cloud|rain|snow)|pt_shape_(?:pixel|disk|square|line|star|circle|ring|sphere|flare|spark|explosion|cloud|smoke|snow)|ps_(?:distr|shape)_(?:linear|gaussian|invgaussian|rectangle|ellipse|diamond|line)|ty_(?:real|string)|dll_(?:cdel|cdecl|stdcall)|matrix_(?:view|projection|world)|os_(?:win32|windows|macosx|ios|android|linux|unknown|winphone|win8native|psvita|ps4|xboxone|ps3|uwp)|browser_(?:not_a_browser|unknown|ie|firefox|chrome|safari|safari_mobile|opera|tizen|windows_store|ie_mobile)|device_ios_(?:unknown|iphone|iphone_retina|ipad|ipad_retina|iphone5|iphone6|iphone6plus)|device_(?:emulator|tablet)|display_(?:landscape|landscape_flipped|portrait|portrait_flipped)|of_challenge_(?:win|lose|tie)|leaderboard_type_(?:number|time_mins_secs)|cmpfunc_(?:never|less|equal|lessequal|greater|notequal|greaterequal|always)|cull_(?:noculling|clockwise|counterclockwise)|lighttype_(?:dir|point)|iap_(?:ev_storeload|ev_product|ev_purchase|ev_consume|ev_restore|storeload_ok|storeload_failed|status_uninitialised|status_unavailable|status_loading|status_available|status_processing|status_restoring|failed|unavailable|available|purchased|canceled|refunded)|fb_login_(?:default|fallback_to_webview|no_fallback_to_webview|forcing_webview|use_system_account|forcing_safari)|phy_joint_(?:anchor_1_x|anchor_1_y|anchor_2_x|anchor_2_y|reaction_force_x|reaction_force_y|reaction_torque|motor_speed|angle|motor_torque|max_motor_torque|translation|speed|motor_force|max_motor_force|length_1|length_2|damping_ratio|frequency|lower_angle_limit|upper_angle_limit|angle_limits|max_length|max_torque|max_force)|phy_debug_render_(?:aabb|collision_pairs|coms|core_shapes|joints|obb|shapes)|phy_particle_flag_(?:water|zombie|wall|spring|elastic|viscous|powder|tensile|colourmixing|colormixing)|phy_particle_group_flag_(?:solid|rigid)|phy_particle_data_flag_(?:typeflags|position|velocity|colour|color|category)|achievement_(?:our_info|friends_info|leaderboard_info|info|filter_(?:all_players|friends_only|favorites_only)|type_challenge|type_score_challenge|pic_loaded|show_(?:ui|profile|leaderboard|achievement|bank|friend_picker|purchase_prompt))|network_(?:socket_(?:tcp|udp|bluetooth)|type_(?:connect|disconnect|data|non_blocking_connect)|config_(?:connect_timeout|use_non_blocking_socket|enable_reliable_udp|disable_reliable_udp))|buffer_(?:fixed|grow|wrap|fast|vbuffer|network|u8|s8|u16|s16|u32|s32|u64|f16|f32|f64|bool|text|string|seek_start|seek_relative|seek_end|generalerror|outofspace|outofbounds|invalidtype)|gp_(?:face\d|shoulderl|shoulderr|shoulderlb|shoulderrb|select|start|stickl|stickr|padu|padd|padl|padr|axislh|axislv|axisrh|axisrv)|ov_(?:friends|community|players|settings|gamegroup|achievements)|lb_sort_(?:none|ascending|descending)|lb_disp_(?:none|numeric|time_sec|time_ms)|ugc_(?:result_success|filetype_(?:community|microtrans)|visibility_(?:public|friends_only|private)|query_RankedBy(?:Vote|PublicationDate|Trend|NumTimesReported|TotalVotesAsc|VotesUp|TextSearch)|query_(?:AcceptedForGameRankedByAcceptanceDate|FavoritedByFriendsRankedByPublicationDate|CreatedByFriendsRankedByPublicationDate|NotYetRated)|sortorder_CreationOrder(?:Desc|Asc)|sortorder_(?:TitleAsc|LastUpdatedDesc|SubscriptionDateDesc|VoteScoreDesc|ForModeration)|list_(?:Published|VotedOn|VotedUp|VotedDown|WillVoteLater|Favorited|Subscribed|UsedOrPlayed|Followed)|match_(?:Items|Items_Mtx|Items_ReadyToUse|Collections|Artwork|Videos|Screenshots|AllGuides|WebGuides|IntegratedGuides|UsableInGame|ControllerBindings))|vertex_usage_(?:position|colour|color|normal|texcoord|textcoord|blendweight|blendindices|psize|tangent|binormal|fog|depth|sample)|vertex_type_(?:float\d|colour|color|ubyte4)|layerelementtype_(?:undefined|background|instance|oldtilemap|sprite|tilemap|particlesystem|tile)|tile_(?:rotate|flip|mirror|index_mask)|input_type|se_(?:chorus|compressor|echo|equalizer|flanger|gargle|none|reverb)|text_type|(?:obj|scr|spr|rm)\w+)\b/,variable:/\b(?:x|y|(?:x|y)(?:previous|start)|(?:h|v)speed|direction|speed|friction|gravity|gravity_direction|path_(?:index|position|positionprevious|speed|scale|orientation|endaction)|object_index|id|solid|persistent|mask_index|instance_(?:count|id)|alarm|timeline_(?:index|position|speed|running|loop)|visible|sprite_(?:index|width|height|xoffset|yoffset)|image_(?:number|index|speed|depth|xscale|yscale|angle|alpha|blend)|bbox_(?:left|right|top|bottom)|layer|phy_(?:rotation|(?:position|linear_velocity|speed|com|collision|col_normal)_(?:x|y)|angular_(?:velocity|damping)|position_(?:x|y)previous|speed|linear_damping|bullet|fixed_rotation|active|mass|inertia|dynamic|kinematic|sleeping|collision_points)|working_directory|webgl_enabled|view_(?:(?:y|x|w|h)view|(?:y|x|w|h)port|(?:v|h)(?:speed|border)|visible|surface_id|object|enabled|current|angle)|undefined|transition_(?:steps|kind|color)|temp_directory|show_(?:score|lives|health)|secure_mode|score|room_(?:width|speed|persistent|last|height|first|caption)|room|pointer_(?:null|invalid)|os_(?:version|type|device|browser)|mouse_(?:y|x|lastbutton|button)|lives|keyboard_(?:string|lastkey|lastchar|key)|iap_data|health|gamemaker_(?:version|registered|pro)|game_(?:save|project|display)_(?:id|name)|fps_real|fps|event_(?:type|object|number|action)|error_(?:occurred|last)|display_aa|delta_time|debug_mode|cursor_sprite|current_(?:year|weekday|time|second|month|minute|hour|day)|caption_(?:score|lives|health)|browser_(?:width|height)|background_(?:yscale|y|xscale|x|width|vtiled|vspeed|visible|showcolour|showcolor|index|htiled|hspeed|height|foreground|colour|color|blend|alpha)|async_load|application_surface|argument(?:_relitive|_count|\d)|argument|global|local|self|other)\b/}); \ No newline at end of file +Prism.languages.gamemakerlanguage=Prism.languages.gml=Prism.languages.extend("clike",{number:/(?:\b0x[\da-f]+|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?)[ulf]*/i,keyword:/\b(?:if|else|switch|case|default|break|for|repeat|while|do|until|continue|exit|return|globalvar|var|enum)\b/,operator:/[-+%=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]|\b(?:or|and|not|with|at|xor)\b/,constant:/\b(?:self|other|all|noone|global|local|undefined|pointer_(?:invalid|null)|action_(?:stop|restart|continue|reverse)|pi|GM_build_date|GM_version|timezone_(?:local|utc)|gamespeed_(?:fps|microseconds)|ev_(?:create|destroy|step|alarm|keyboard|mouse|collision|other|draw|draw_(?:begin|end|pre|post)|keypress|keyrelease|trigger|(?:left|right|middle|no)_button|(?:left|right|middle)_press|(?:left|right|middle)_release|mouse_(?:enter|leave|wheel_up|wheel_down)|global_(?:left|right|middle)_button|global_(?:left|right|middle)_press|global_(?:left|right|middle)_release|joystick(?:1|2)_(?:left|right|up|down|button1|button2|button3|button4|button5|button6|button7|button8)|outside|boundary|game_start|game_end|room_start|room_end|no_more_lives|animation_end|end_of_path|no_more_health|user\d|step_(?:normal|begin|end)|gui|gui_begin|gui_end)|vk_(?:nokey|anykey|enter|return|shift|control|alt|escape|space|backspace|tab|pause|printscreen|left|right|up|down|home|end|delete|insert|pageup|pagedown|f\d|numpad\d|divide|multiply|subtract|add|decimal|lshift|lcontrol|lalt|rshift|rcontrol|ralt)|mb_(?:any|none|left|right|middle)|c_(?:aqua|black|blue|dkgray|fuchsia|gray|green|lime|ltgray|maroon|navy|olive|purple|red|silver|teal|white|yellow|orange)|fa_(?:left|center|right|top|middle|bottom|readonly|hidden|sysfile|volumeid|directory|archive)|pr_(?:pointlist|linelist|linestrip|trianglelist|trianglestrip|trianglefan)|bm_(?:complex|normal|add|max|subtract|zero|one|src_colour|inv_src_colour|src_color|inv_src_color|src_alpha|inv_src_alpha|dest_alpha|inv_dest_alpha|dest_colour|inv_dest_colour|dest_color|inv_dest_color|src_alpha_sat)|audio_(?:falloff_(?:none|inverse_distance|inverse_distance_clamped|linear_distance|linear_distance_clamped|exponent_distance|exponent_distance_clamped)|old_system|new_system|mono|stereo|3d)|cr_(?:default|none|arrow|cross|beam|size_nesw|size_ns|size_nwse|size_we|uparrow|hourglass|drag|appstart|handpoint|size_all)|spritespeed_framesper(?:second|gameframe)|asset_(?:object|unknown|sprite|sound|room|path|script|font|timeline|tiles|shader)|ds_type_(?:map|list|stack|queue|grid|priority)|ef_(?:explosion|ring|ellipse|firework|smoke|smokeup|star|spark|flare|cloud|rain|snow)|pt_shape_(?:pixel|disk|square|line|star|circle|ring|sphere|flare|spark|explosion|cloud|smoke|snow)|ps_(?:distr|shape)_(?:linear|gaussian|invgaussian|rectangle|ellipse|diamond|line)|ty_(?:real|string)|dll_(?:cdel|cdecl|stdcall)|matrix_(?:view|projection|world)|os_(?:win32|windows|macosx|ios|android|linux|unknown|winphone|win8native|psvita|ps4|xboxone|ps3|uwp)|browser_(?:not_a_browser|unknown|ie|firefox|chrome|safari|safari_mobile|opera|tizen|windows_store|ie_mobile)|device_ios_(?:unknown|iphone|iphone_retina|ipad|ipad_retina|iphone5|iphone6|iphone6plus)|device_(?:emulator|tablet)|display_(?:landscape|landscape_flipped|portrait|portrait_flipped)|of_challenge_(?:win|lose|tie)|leaderboard_type_(?:number|time_mins_secs)|cmpfunc_(?:never|less|equal|lessequal|greater|notequal|greaterequal|always)|cull_(?:noculling|clockwise|counterclockwise)|lighttype_(?:dir|point)|iap_(?:ev_storeload|ev_product|ev_purchase|ev_consume|ev_restore|storeload_ok|storeload_failed|status_uninitialised|status_unavailable|status_loading|status_available|status_processing|status_restoring|failed|unavailable|available|purchased|canceled|refunded)|fb_login_(?:default|fallback_to_webview|no_fallback_to_webview|forcing_webview|use_system_account|forcing_safari)|phy_joint_(?:anchor_1_x|anchor_1_y|anchor_2_x|anchor_2_y|reaction_force_x|reaction_force_y|reaction_torque|motor_speed|angle|motor_torque|max_motor_torque|translation|speed|motor_force|max_motor_force|length_1|length_2|damping_ratio|frequency|lower_angle_limit|upper_angle_limit|angle_limits|max_length|max_torque|max_force)|phy_debug_render_(?:aabb|collision_pairs|coms|core_shapes|joints|obb|shapes)|phy_particle_flag_(?:water|zombie|wall|spring|elastic|viscous|powder|tensile|colourmixing|colormixing)|phy_particle_group_flag_(?:solid|rigid)|phy_particle_data_flag_(?:typeflags|position|velocity|colour|color|category)|achievement_(?:our_info|friends_info|leaderboard_info|info|filter_(?:all_players|friends_only|favorites_only)|type_challenge|type_score_challenge|pic_loaded|show_(?:ui|profile|leaderboard|achievement|bank|friend_picker|purchase_prompt))|network_(?:socket_(?:tcp|udp|bluetooth)|type_(?:connect|disconnect|data|non_blocking_connect)|config_(?:connect_timeout|use_non_blocking_socket|enable_reliable_udp|disable_reliable_udp))|buffer_(?:fixed|grow|wrap|fast|vbuffer|network|u8|s8|u16|s16|u32|s32|u64|f16|f32|f64|bool|text|string|seek_start|seek_relative|seek_end|generalerror|outofspace|outofbounds|invalidtype)|gp_(?:face\d|shoulderl|shoulderr|shoulderlb|shoulderrb|select|start|stickl|stickr|padu|padd|padl|padr|axislh|axislv|axisrh|axisrv)|ov_(?:friends|community|players|settings|gamegroup|achievements)|lb_sort_(?:none|ascending|descending)|lb_disp_(?:none|numeric|time_sec|time_ms)|ugc_(?:result_success|filetype_(?:community|microtrans)|visibility_(?:public|friends_only|private)|query_RankedBy(?:Vote|PublicationDate|Trend|NumTimesReported|TotalVotesAsc|VotesUp|TextSearch)|query_(?:AcceptedForGameRankedByAcceptanceDate|FavoritedByFriendsRankedByPublicationDate|CreatedByFriendsRankedByPublicationDate|NotYetRated)|sortorder_CreationOrder(?:Desc|Asc)|sortorder_(?:TitleAsc|LastUpdatedDesc|SubscriptionDateDesc|VoteScoreDesc|ForModeration)|list_(?:Published|VotedOn|VotedUp|VotedDown|WillVoteLater|Favorited|Subscribed|UsedOrPlayed|Followed)|match_(?:Items|Items_Mtx|Items_ReadyToUse|Collections|Artwork|Videos|Screenshots|AllGuides|WebGuides|IntegratedGuides|UsableInGame|ControllerBindings))|vertex_usage_(?:position|colour|color|normal|texcoord|textcoord|blendweight|blendindices|psize|tangent|binormal|fog|depth|sample)|vertex_type_(?:float\d|colour|color|ubyte4)|layerelementtype_(?:undefined|background|instance|oldtilemap|sprite|tilemap|particlesystem|tile)|tile_(?:rotate|flip|mirror|index_mask)|input_type|se_(?:chorus|compressor|echo|equalizer|flanger|gargle|none|reverb)|text_type|(?:obj|scr|spr|rm)\w+)\b/,variable:/\b(?:x|y|(?:x|y)(?:previous|start)|(?:h|v)speed|direction|speed|friction|gravity|gravity_direction|path_(?:index|position|positionprevious|speed|scale|orientation|endaction)|object_index|id|solid|persistent|mask_index|instance_(?:count|id)|alarm|timeline_(?:index|position|speed|running|loop)|visible|sprite_(?:index|width|height|xoffset|yoffset)|image_(?:number|index|speed|depth|xscale|yscale|angle|alpha|blend)|bbox_(?:left|right|top|bottom)|layer|phy_(?:rotation|(?:position|linear_velocity|speed|com|collision|col_normal)_(?:x|y)|angular_(?:velocity|damping)|position_(?:x|y)previous|speed|linear_damping|bullet|fixed_rotation|active|mass|inertia|dynamic|kinematic|sleeping|collision_points)|working_directory|webgl_enabled|view_(?:(?:y|x|w|h)view|(?:y|x|w|h)port|(?:v|h)(?:speed|border)|visible|surface_id|object|enabled|current|angle)|undefined|transition_(?:steps|kind|color)|temp_directory|show_(?:score|lives|health)|secure_mode|score|room_(?:width|speed|persistent|last|height|first|caption)|room|pointer_(?:null|invalid)|os_(?:version|type|device|browser)|mouse_(?:y|x|lastbutton|button)|lives|keyboard_(?:string|lastkey|lastchar|key)|iap_data|health|gamemaker_(?:version|registered|pro)|game_(?:save|project|display)_(?:id|name)|fps_real|fps|event_(?:type|object|number|action)|error_(?:occurred|last)|display_aa|delta_time|debug_mode|cursor_sprite|current_(?:year|weekday|time|second|month|minute|hour|day)|caption_(?:score|lives|health)|browser_(?:width|height)|background_(?:yscale|y|xscale|x|width|vtiled|vspeed|visible|showcolour|showcolor|index|htiled|hspeed|height|foreground|colour|color|blend|alpha)|async_load|application_surface|argument(?:_relitive|_count|\d)|argument|global|local|self|other)\b/}); \ No newline at end of file diff --git a/components/prism-groovy.js b/components/prism-groovy.js index cd0bd2a551..1a8a786074 100644 --- a/components/prism-groovy.js +++ b/components/prism-groovy.js @@ -18,7 +18,7 @@ Prism.languages.groovy = Prism.languages.extend('clike', { pattern: /(^|[^.])(?:~|==?~?|\?[.:]?|\*(?:[.=]|\*=?)?|\.[@&]|\.\.<|\.\.(?!\.)|-[-=>]?|\+[+=]?|!=?|<(?:<=?|=>?)?|>(?:>>?=?|=)?|&[&=]?|\|[|=]?|\/=?|\^=?|%=?)/, lookbehind: true }, - 'punctuation': /\.+|[{}[\];(),.:$]/ + 'punctuation': /\.+|[{}[\];(),:$]/ }); Prism.languages.insertBefore('groovy', 'string', { diff --git a/components/prism-groovy.min.js b/components/prism-groovy.min.js index 726bcb6eb1..79850e6b6d 100644 --- a/components/prism-groovy.min.js +++ b/components/prism-groovy.min.js @@ -1 +1 @@ -Prism.languages.groovy=Prism.languages.extend("clike",{string:[{pattern:/("""|''')(?:[^\\]|\\[\s\S])*?\1|\$\/(?:[^/$]|\$(?:[/$]|(?![/$]))|\/(?!\$))*\/\$/,greedy:!0},{pattern:/(["'/])(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0}],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/,number:/\b(?:0b[01_]+|0x[\da-f_]+(?:\.[\da-f_p\-]+)?|[\d_]+(?:\.[\d_]+)?(?:e[+-]?[\d]+)?)[glidf]?\b/i,operator:{pattern:/(^|[^.])(?:~|==?~?|\?[.:]?|\*(?:[.=]|\*=?)?|\.[@&]|\.\.<|\.\.(?!\.)|-[-=>]?|\+[+=]?|!=?|<(?:<=?|=>?)?|>(?:>>?=?|=)?|&[&=]?|\|[|=]?|\/=?|\^=?|%=?)/,lookbehind:!0},punctuation:/\.+|[{}[\];(),.:$]/}),Prism.languages.insertBefore("groovy","string",{shebang:{pattern:/#!.+/,alias:"comment"}}),Prism.languages.insertBefore("groovy","punctuation",{"spock-block":/\b(?:setup|given|when|then|and|cleanup|expect|where):/}),Prism.languages.insertBefore("groovy","function",{annotation:{pattern:/(^|[^.])@\w+/,lookbehind:!0,alias:"punctuation"}}),Prism.hooks.add("wrap",function(e){if("groovy"===e.language&&"string"===e.type){var t=e.content[0];if("'"!=t){var n=/([^\\])(?:\$(?:\{.*?\}|[\w.]+))/;"$"===t&&(n=/([^\$])(?:\$(?:\{.*?\}|[\w.]+))/),e.content=e.content.replace(/</g,"<").replace(/&/g,"&"),e.content=Prism.highlight(e.content,{expression:{pattern:n,lookbehind:!0,inside:Prism.languages.groovy}}),e.classes.push("/"===t?"regex":"gstring")}}}); \ No newline at end of file +Prism.languages.groovy=Prism.languages.extend("clike",{string:[{pattern:/("""|''')(?:[^\\]|\\[\s\S])*?\1|\$\/(?:[^/$]|\$(?:[/$]|(?![/$]))|\/(?!\$))*\/\$/,greedy:!0},{pattern:/(["'/])(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0}],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/,number:/\b(?:0b[01_]+|0x[\da-f_]+(?:\.[\da-f_p\-]+)?|[\d_]+(?:\.[\d_]+)?(?:e[+-]?[\d]+)?)[glidf]?\b/i,operator:{pattern:/(^|[^.])(?:~|==?~?|\?[.:]?|\*(?:[.=]|\*=?)?|\.[@&]|\.\.<|\.\.(?!\.)|-[-=>]?|\+[+=]?|!=?|<(?:<=?|=>?)?|>(?:>>?=?|=)?|&[&=]?|\|[|=]?|\/=?|\^=?|%=?)/,lookbehind:!0},punctuation:/\.+|[{}[\];(),:$]/}),Prism.languages.insertBefore("groovy","string",{shebang:{pattern:/#!.+/,alias:"comment"}}),Prism.languages.insertBefore("groovy","punctuation",{"spock-block":/\b(?:setup|given|when|then|and|cleanup|expect|where):/}),Prism.languages.insertBefore("groovy","function",{annotation:{pattern:/(^|[^.])@\w+/,lookbehind:!0,alias:"punctuation"}}),Prism.hooks.add("wrap",function(e){if("groovy"===e.language&&"string"===e.type){var t=e.content[0];if("'"!=t){var n=/([^\\])(?:\$(?:\{.*?\}|[\w.]+))/;"$"===t&&(n=/([^\$])(?:\$(?:\{.*?\}|[\w.]+))/),e.content=e.content.replace(/</g,"<").replace(/&/g,"&"),e.content=Prism.highlight(e.content,{expression:{pattern:n,lookbehind:!0,inside:Prism.languages.groovy}}),e.classes.push("/"===t?"regex":"gstring")}}}); \ No newline at end of file diff --git a/components/prism-iecst.js b/components/prism-iecst.js index bf4d1d50bf..4477810d2b 100644 --- a/components/prism-iecst.js +++ b/components/prism-iecst.js @@ -21,7 +21,7 @@ Prism.languages.iecst = { 'number': /\b(?:16#[\da-f]+|2#[01_]+|0x[\da-f]+)\b|\b(?:T|D|DT|TOD)#[\d_shmd:]*|\b[A-Z]*\#[\d.,_]*|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?/i, 'boolean': /\b(?:TRUE|FALSE|NULL)\b/, 'function': /\w+(?=\()/, - 'operator': /(?:S?R?:?=>?|&&?|\*\*?|<=?|>=?|[-:^/+])|\b(?:OR|AND|MOD|NOT|XOR|LE|GE|EQ|NE|GE|LT)\b/, + 'operator': /(?:S?R?:?=>?|&&?|\*\*?|<=?|>=?|[-:^/+])|\b(?:OR|AND|MOD|NOT|XOR|LE|GE|EQ|NE|GT|LT)\b/, 'punctuation': /[();]/, 'type': { 'pattern': /#/, diff --git a/components/prism-iecst.min.js b/components/prism-iecst.min.js index 2356700a40..7a45ddf0bd 100644 --- a/components/prism-iecst.min.js +++ b/components/prism-iecst.min.js @@ -1 +1 @@ -Prism.languages.iecst={comment:[{pattern:/(^|[^\\])(?:\/\*[\s\S]*?(?:\*\/|$)|\(\*[\s\S]*?(?:\*\)|$)|\{[\s\S]*?(?:\}|$))/,lookbehind:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":/\b(?:END_)?(?:PROGRAM|CONFIGURATION|INTERFACE|FUNCTION_BLOCK|FUNCTION|ACTION|TRANSITION|TYPE|STRUCT|(?:INITIAL_)?STEP|NAMESPACE|LIBRARY|CHANNEL|FOLDER|RESOURCE|VAR_(?:GLOBAL|INPUT|PUTPUT|IN_OUT|ACCESS|TEMP|EXTERNAL|CONFIG)|VAR|METHOD|PROPERTY)\b/i,keyword:/\b(?:(?:END_)?(?:IF|WHILE|REPEAT|CASE|FOR)|ELSE|FROM|THEN|ELSIF|DO|TO|BY|PRIVATE|PUBLIC|PROTECTED|CONSTANT|RETURN|EXIT|CONTINUE|GOTO|JMP|AT|RETAIN|NON_RETAIN|TASK|WITH|UNTIL|USING|EXTENDS|IMPLEMENTS|GET|SET|__TRY|__CATCH|__FINALLY|__ENDTRY)\b/,variable:/\b(?:AT|BOOL|BYTE|(?:D|L)?WORD|U?(?:S|D|L)?INT|L?REAL|TIME(?:_OF_DAY)?|TOD|DT|DATE(?:_AND_TIME)?|STRING|ARRAY|ANY|POINTER)\b/,symbol:/%[IQM][XBWDL][\d.]*|%[IQ][\d.]*/,number:/\b(?:16#[\da-f]+|2#[01_]+|0x[\da-f]+)\b|\b(?:T|D|DT|TOD)#[\d_shmd:]*|\b[A-Z]*\#[\d.,_]*|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?/i,boolean:/\b(?:TRUE|FALSE|NULL)\b/,function:/\w+(?=\()/,operator:/(?:S?R?:?=>?|&&?|\*\*?|<=?|>=?|[-:^/+])|\b(?:OR|AND|MOD|NOT|XOR|LE|GE|EQ|NE|GE|LT)\b/,punctuation:/[();]/,type:{pattern:/#/,alias:"selector"}}; \ No newline at end of file +Prism.languages.iecst={comment:[{pattern:/(^|[^\\])(?:\/\*[\s\S]*?(?:\*\/|$)|\(\*[\s\S]*?(?:\*\)|$)|\{[\s\S]*?(?:\}|$))/,lookbehind:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":/\b(?:END_)?(?:PROGRAM|CONFIGURATION|INTERFACE|FUNCTION_BLOCK|FUNCTION|ACTION|TRANSITION|TYPE|STRUCT|(?:INITIAL_)?STEP|NAMESPACE|LIBRARY|CHANNEL|FOLDER|RESOURCE|VAR_(?:GLOBAL|INPUT|PUTPUT|IN_OUT|ACCESS|TEMP|EXTERNAL|CONFIG)|VAR|METHOD|PROPERTY)\b/i,keyword:/\b(?:(?:END_)?(?:IF|WHILE|REPEAT|CASE|FOR)|ELSE|FROM|THEN|ELSIF|DO|TO|BY|PRIVATE|PUBLIC|PROTECTED|CONSTANT|RETURN|EXIT|CONTINUE|GOTO|JMP|AT|RETAIN|NON_RETAIN|TASK|WITH|UNTIL|USING|EXTENDS|IMPLEMENTS|GET|SET|__TRY|__CATCH|__FINALLY|__ENDTRY)\b/,variable:/\b(?:AT|BOOL|BYTE|(?:D|L)?WORD|U?(?:S|D|L)?INT|L?REAL|TIME(?:_OF_DAY)?|TOD|DT|DATE(?:_AND_TIME)?|STRING|ARRAY|ANY|POINTER)\b/,symbol:/%[IQM][XBWDL][\d.]*|%[IQ][\d.]*/,number:/\b(?:16#[\da-f]+|2#[01_]+|0x[\da-f]+)\b|\b(?:T|D|DT|TOD)#[\d_shmd:]*|\b[A-Z]*\#[\d.,_]*|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?/i,boolean:/\b(?:TRUE|FALSE|NULL)\b/,function:/\w+(?=\()/,operator:/(?:S?R?:?=>?|&&?|\*\*?|<=?|>=?|[-:^/+])|\b(?:OR|AND|MOD|NOT|XOR|LE|GE|EQ|NE|GT|LT)\b/,punctuation:/[();]/,type:{pattern:/#/,alias:"selector"}}; \ No newline at end of file diff --git a/components/prism-io.js b/components/prism-io.js index c259eaa010..54e06ee5a9 100644 --- a/components/prism-io.js +++ b/components/prism-io.js @@ -23,7 +23,7 @@ Prism.languages.io = { greedy: true }, 'keyword': /\b(?:activate|activeCoroCount|asString|block|break|catch|clone|collectGarbage|compileString|continue|do|doFile|doMessage|doString|else|elseif|exit|for|foreach|forward|getSlot|getEnvironmentVariable|hasSlot|if|ifFalse|ifNil|ifNilEval|ifTrue|isActive|isNil|isResumable|list|message|method|parent|pass|pause|perform|performWithArgList|print|println|proto|raise|raiseResumable|removeSlot|resend|resume|schedulerSleepSeconds|self|sender|setSchedulerSleepSeconds|setSlot|shallowCopy|slotNames|super|system|then|thisBlock|thisContext|call|try|type|uniqueId|updateSlot|wait|while|write|yield)\b/, - 'builtin':/\b(?:Array|AudioDevice|AudioMixer|Block|Box|Buffer|CFunction|CGI|Color|Curses|DBM|DNSResolver|DOConnection|DOProxy|DOServer|Date|Directory|Duration|DynLib|Error|Exception|FFT|File|Fnmatch|Font|Future|GL|GLE|GLScissor|GLU|GLUCylinder|GLUQuadric|GLUSphere|GLUT|Host|Image|Importer|LinkList|List|Lobby|Locals|MD5|MP3Decoder|MP3Encoder|Map|Message|Movie|Notification|Number|Object|OpenGL|Point|Protos|Regex|SGML|SGMLElement|SGMLParser|SQLite|Server|Sequence|ShowMessage|SleepyCat|SleepyCatCursor|Socket|SocketManager|Sound|Soup|Store|String|Tree|UDPSender|UPDReceiver|URL|User|Warning|WeakLink|Random|BigNum|Sequence)\b/, + 'builtin':/\b(?:Array|AudioDevice|AudioMixer|Block|Box|Buffer|CFunction|CGI|Color|Curses|DBM|DNSResolver|DOConnection|DOProxy|DOServer|Date|Directory|Duration|DynLib|Error|Exception|FFT|File|Fnmatch|Font|Future|GL|GLE|GLScissor|GLU|GLUCylinder|GLUQuadric|GLUSphere|GLUT|Host|Image|Importer|LinkList|List|Lobby|Locals|MD5|MP3Decoder|MP3Encoder|Map|Message|Movie|Notification|Number|Object|OpenGL|Point|Protos|Regex|SGML|SGMLElement|SGMLParser|SQLite|Server|Sequence|ShowMessage|SleepyCat|SleepyCatCursor|Socket|SocketManager|Sound|Soup|Store|String|Tree|UDPSender|UPDReceiver|URL|User|Warning|WeakLink|Random|BigNum)\b/, 'boolean': /\b(?:true|false|nil)\b/, 'number': /\b0x[\da-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:e-?\d+)?/i, 'operator': /[=!*/%+\-^&|]=|>>?=?|<>?=?|<>?=?|<=]?|>=?|\b(?:AND|ANY|ARRAY|BETWEEN|CASE|ELSE|END|EVERY|EXISTS|FIRST|IN|LIKE|NOT|OR|THEN|VALUED|WHEN|WITHIN)\b/i, + 'operator': /[-+*\/%]|!=|==?|\|\||<[>=]?|>=?|\b(?:AND|ANY|ARRAY|BETWEEN|CASE|ELSE|END|EVERY|EXISTS|FIRST|IN|LIKE|NOT|OR|THEN|VALUED|WHEN|WITHIN)\b/i, 'punctuation': /[;[\](),.{}:]/ -}; \ No newline at end of file +}; diff --git a/components/prism-n1ql.min.js b/components/prism-n1ql.min.js index bb6fd63345..4338b719a0 100644 --- a/components/prism-n1ql.min.js +++ b/components/prism-n1ql.min.js @@ -1 +1 @@ -Prism.languages.n1ql={comment:/\/\*[\s\S]*?(?:$|\*\/)/,parameter:/\$[\w.]+/,string:{pattern:/(["'])(?:\\[\s\S]|(?!\1)[^\\]|\1\1)*\1/,greedy:!0},identifier:{pattern:/`(?:\\[\s\S]|[^\\`]|``)*`/,greedy:!0},function:/\b(?:ABS|ACOS|ARRAY_AGG|ARRAY_APPEND|ARRAY_AVG|ARRAY_CONCAT|ARRAY_CONTAINS|ARRAY_COUNT|ARRAY_DISTINCT|ARRAY_FLATTEN|ARRAY_IFNULL|ARRAY_INSERT|ARRAY_INTERSECT|ARRAY_LENGTH|ARRAY_MAX|ARRAY_MIN|ARRAY_POSITION|ARRAY_PREPEND|ARRAY_PUT|ARRAY_RANGE|ARRAY_REMOVE|ARRAY_REPEAT|ARRAY_REPLACE|ARRAY_REVERSE|ARRAY_SORT|ARRAY_STAR|ARRAY_SUM|ARRAY_SYMDIFF|ARRAY_SYMDIFFN|ARRAY_UNION|ASIN|ATAN|ATAN2|AVG|BASE64|BASE64_DECODE|BASE64_ENCODE|BITAND|BITCLEAR|BITNOT|BITOR|BITSET|BITSHIFT|BITTEST|BITXOR|CEIL|CLOCK_LOCAL|CLOCK_MILLIS|CLOCK_STR|CLOCK_TZ|CLOCK_UTC|CONTAINS|CONTAINS_TOKEN|CONTAINS_TOKEN_LIKE|CONTAINS_TOKEN_REGEXP|COS|COUNT|CURL|DATE_ADD_MILLIS|DATE_ADD_STR|DATE_DIFF_MILLIS|DATE_DIFF_STR|DATE_FORMAT_STR|DATE_PART_MILLIS|DATE_PART_STR|DATE_RANGE_MILLIS|DATE_RANGE_STR|DATE_TRUNC_MILLIS|DATE_TRUNC_STR|DECODE_JSON|DEGREES|DURATION_TO_STR|E|ENCODED_SIZE|ENCODE_JSON|EXP|FLOOR|GREATEST|HAS_TOKEN|IFINF|IFMISSING|IFMISSINGORNULL|IFNAN|IFNANORINF|IFNULL|INITCAP|ISARRAY|ISATOM|ISBOOLEAN|ISNUMBER|ISOBJECT|ISSTRING|IsBitSET|LEAST|LENGTH|LN|LOG|LOWER|LTRIM|MAX|META|MILLIS|MILLIS_TO_LOCAL|MILLIS_TO_STR|MILLIS_TO_TZ|MILLIS_TO_UTC|MILLIS_TO_ZONE_NAME|MIN|MISSINGIF|NANIF|NEGINFIF|NOW_LOCAL|NOW_MILLIS|NOW_STR|NOW_TZ|NOW_UTC|NULLIF|OBJECT_ADD|OBJECT_CONCAT|OBJECT_INNER_PAIRS|OBJECT_INNER_VALUES|OBJECT_LENGTH|OBJECT_NAMES|OBJECT_PAIRS|OBJECT_PUT|OBJECT_REMOVE|OBJECT_RENAME|OBJECT_REPLACE|OBJECT_UNWRAP|OBJECT_VALUES|PAIRS|PI|POLY_LENGTH|POSINFIF|POSITION|POWER|RADIANS|RANDOM|REGEXP_CONTAINS|REGEXP_LIKE|REGEXP_POSITION|REGEXP_REPLACE|REPEAT|REPLACE|REVERSE|ROUND|RTRIM|SIGN|SIN|SPLIT|SQRT|STR_TO_DURATION|STR_TO_MILLIS|STR_TO_TZ|STR_TO_UTC|STR_TO_ZONE_NAME|SUBSTR|SUFFIXES|SUM|TAN|TITLE|TOARRAY|TOATOM|TOBOOLEAN|TOKENS|TOKENS|TONUMBER|TOOBJECT|TOSTRING|TRIM|TRUNC|TYPE|UPPER|WEEKDAY_MILLIS|WEEKDAY_STR)(?=\s*\()/i,keyword:/\b(?:ALL|ALTER|ANALYZE|AS|ASC|BEGIN|BINARY|BOOLEAN|BREAK|BUCKET|BUILD|BY|CALL|CAST|CLUSTER|COLLATE|COLLECTION|COMMIT|CONNECT|CONTINUE|CORRELATE|COVER|CREATE|DATABASE|DATASET|DATASTORE|DECLARE|DECREMENT|DELETE|DERIVED|DESC|DESCRIBE|DISTINCT|DO|DROP|EACH|ELEMENT|EXCEPT|EXCLUDE|EXECUTE|EXPLAIN|FETCH|FLATTEN|FOR|FORCE|FROM|FUNCTION|GRANT|GROUP|GSI|HAVING|IF|IGNORE|ILIKE|INCLUDE|INCREMENT|INDEX|INFER|INLINE|INNER|INSERT|INTERSECT|INTO|IS|JOIN|KEY|KEYS|KEYSPACE|KNOWN|LAST|LEFT|LET|LETTING|LIMIT|LSM|MAP|MAPPING|MATCHED|MATERIALIZED|MERGE|MINUS|MISSING|NAMESPACE|NEST|NULL|NUMBER|OBJECT|OFFSET|ON|OPTION|ORDER|OUTER|OVER|PARSE|PARTITION|PASSWORD|PATH|POOL|PREPARE|PRIMARY|PRIVATE|PRIVILEGE|PROCEDURE|PUBLIC|RAW|REALM|REDUCE|RENAME|RETURN|RETURNING|REVOKE|RIGHT|ROLE|ROLLBACK|SATISFIES|SCHEMA|SELECT|SELF|SEMI|SET|SHOW|SOME|START|STATISTICS|STRING|SYSTEM|TO|TRANSACTION|TRIGGER|TRUNCATE|UNDER|UNION|UNIQUE|UNKNOWN|UNNEST|UNSET|UPDATE|UPSERT|USE|USER|USING|VALIDATE|VALUE|VALUES|VIA|VIEW|WHERE|WHILE|WITH|WORK|XOR)\b/i,boolean:/\b(?:TRUE|FALSE)\b/i,number:/(?:\b\d+\.|\B\.)\d+e[+\-]?\d+\b|\b\d+\.?\d*|\B\.\d+\b/i,operator:/[-+*\/=%]|!=|==?|\|\||<[>=]?|>=?|\b(?:AND|ANY|ARRAY|BETWEEN|CASE|ELSE|END|EVERY|EXISTS|FIRST|IN|LIKE|NOT|OR|THEN|VALUED|WHEN|WITHIN)\b/i,punctuation:/[;[\](),.{}:]/}; \ No newline at end of file +Prism.languages.n1ql={comment:/\/\*[\s\S]*?(?:$|\*\/)/,parameter:/\$[\w.]+/,string:{pattern:/(["'])(?:\\[\s\S]|(?!\1)[^\\]|\1\1)*\1/,greedy:!0},identifier:{pattern:/`(?:\\[\s\S]|[^\\`]|``)*`/,greedy:!0},function:/\b(?:ABS|ACOS|ARRAY_AGG|ARRAY_APPEND|ARRAY_AVG|ARRAY_CONCAT|ARRAY_CONTAINS|ARRAY_COUNT|ARRAY_DISTINCT|ARRAY_FLATTEN|ARRAY_IFNULL|ARRAY_INSERT|ARRAY_INTERSECT|ARRAY_LENGTH|ARRAY_MAX|ARRAY_MIN|ARRAY_POSITION|ARRAY_PREPEND|ARRAY_PUT|ARRAY_RANGE|ARRAY_REMOVE|ARRAY_REPEAT|ARRAY_REPLACE|ARRAY_REVERSE|ARRAY_SORT|ARRAY_STAR|ARRAY_SUM|ARRAY_SYMDIFF|ARRAY_SYMDIFFN|ARRAY_UNION|ASIN|ATAN|ATAN2|AVG|BASE64|BASE64_DECODE|BASE64_ENCODE|BITAND|BITCLEAR|BITNOT|BITOR|BITSET|BITSHIFT|BITTEST|BITXOR|CEIL|CLOCK_LOCAL|CLOCK_MILLIS|CLOCK_STR|CLOCK_TZ|CLOCK_UTC|CONTAINS|CONTAINS_TOKEN|CONTAINS_TOKEN_LIKE|CONTAINS_TOKEN_REGEXP|COS|COUNT|CURL|DATE_ADD_MILLIS|DATE_ADD_STR|DATE_DIFF_MILLIS|DATE_DIFF_STR|DATE_FORMAT_STR|DATE_PART_MILLIS|DATE_PART_STR|DATE_RANGE_MILLIS|DATE_RANGE_STR|DATE_TRUNC_MILLIS|DATE_TRUNC_STR|DECODE_JSON|DEGREES|DURATION_TO_STR|E|ENCODED_SIZE|ENCODE_JSON|EXP|FLOOR|GREATEST|HAS_TOKEN|IFINF|IFMISSING|IFMISSINGORNULL|IFNAN|IFNANORINF|IFNULL|INITCAP|ISARRAY|ISATOM|ISBOOLEAN|ISNUMBER|ISOBJECT|ISSTRING|IsBitSET|LEAST|LENGTH|LN|LOG|LOWER|LTRIM|MAX|META|MILLIS|MILLIS_TO_LOCAL|MILLIS_TO_STR|MILLIS_TO_TZ|MILLIS_TO_UTC|MILLIS_TO_ZONE_NAME|MIN|MISSINGIF|NANIF|NEGINFIF|NOW_LOCAL|NOW_MILLIS|NOW_STR|NOW_TZ|NOW_UTC|NULLIF|OBJECT_ADD|OBJECT_CONCAT|OBJECT_INNER_PAIRS|OBJECT_INNER_VALUES|OBJECT_LENGTH|OBJECT_NAMES|OBJECT_PAIRS|OBJECT_PUT|OBJECT_REMOVE|OBJECT_RENAME|OBJECT_REPLACE|OBJECT_UNWRAP|OBJECT_VALUES|PAIRS|PI|POLY_LENGTH|POSINFIF|POSITION|POWER|RADIANS|RANDOM|REGEXP_CONTAINS|REGEXP_LIKE|REGEXP_POSITION|REGEXP_REPLACE|REPEAT|REPLACE|REVERSE|ROUND|RTRIM|SIGN|SIN|SPLIT|SQRT|STR_TO_DURATION|STR_TO_MILLIS|STR_TO_TZ|STR_TO_UTC|STR_TO_ZONE_NAME|SUBSTR|SUFFIXES|SUM|TAN|TITLE|TOARRAY|TOATOM|TOBOOLEAN|TOKENS|TONUMBER|TOOBJECT|TOSTRING|TRIM|TRUNC|TYPE|UPPER|WEEKDAY_MILLIS|WEEKDAY_STR)(?=\s*\()/i,keyword:/\b(?:ALL|ALTER|ANALYZE|AS|ASC|BEGIN|BINARY|BOOLEAN|BREAK|BUCKET|BUILD|BY|CALL|CAST|CLUSTER|COLLATE|COLLECTION|COMMIT|CONNECT|CONTINUE|CORRELATE|COVER|CREATE|DATABASE|DATASET|DATASTORE|DECLARE|DECREMENT|DELETE|DERIVED|DESC|DESCRIBE|DISTINCT|DO|DROP|EACH|ELEMENT|EXCEPT|EXCLUDE|EXECUTE|EXPLAIN|FETCH|FLATTEN|FOR|FORCE|FROM|FUNCTION|GRANT|GROUP|GSI|HAVING|IF|IGNORE|ILIKE|INCLUDE|INCREMENT|INDEX|INFER|INLINE|INNER|INSERT|INTERSECT|INTO|IS|JOIN|KEY|KEYS|KEYSPACE|KNOWN|LAST|LEFT|LET|LETTING|LIMIT|LSM|MAP|MAPPING|MATCHED|MATERIALIZED|MERGE|MINUS|MISSING|NAMESPACE|NEST|NULL|NUMBER|OBJECT|OFFSET|ON|OPTION|ORDER|OUTER|OVER|PARSE|PARTITION|PASSWORD|PATH|POOL|PREPARE|PRIMARY|PRIVATE|PRIVILEGE|PROCEDURE|PUBLIC|RAW|REALM|REDUCE|RENAME|RETURN|RETURNING|REVOKE|RIGHT|ROLE|ROLLBACK|SATISFIES|SCHEMA|SELECT|SELF|SEMI|SET|SHOW|SOME|START|STATISTICS|STRING|SYSTEM|TO|TRANSACTION|TRIGGER|TRUNCATE|UNDER|UNION|UNIQUE|UNKNOWN|UNNEST|UNSET|UPDATE|UPSERT|USE|USER|USING|VALIDATE|VALUE|VALUES|VIA|VIEW|WHERE|WHILE|WITH|WORK|XOR)\b/i,boolean:/\b(?:TRUE|FALSE)\b/i,number:/(?:\b\d+\.|\B\.)\d+e[+\-]?\d+\b|\b\d+\.?\d*|\B\.\d+\b/i,operator:/[-+*\/%]|!=|==?|\|\||<[>=]?|>=?|\b(?:AND|ANY|ARRAY|BETWEEN|CASE|ELSE|END|EVERY|EXISTS|FIRST|IN|LIKE|NOT|OR|THEN|VALUED|WHEN|WITHIN)\b/i,punctuation:/[;[\](),.{}:]/}; \ No newline at end of file diff --git a/components/prism-powershell.js b/components/prism-powershell.js index 327b9bc610..222f73fd72 100644 --- a/components/prism-powershell.js +++ b/components/prism-powershell.js @@ -39,7 +39,7 @@ // Get-Command | ?{ $_.ModuleName -match "Microsoft.PowerShell.(Util|Core|Management)" } // Get-Alias | ?{ $_.ReferencedCommand.Module.Name -match "Microsoft.PowerShell.(Util|Core|Management)" } 'function': [ - /\b(?:Add|Approve|Assert|Backup|Block|Checkpoint|Clear|Close|Compare|Complete|Compress|Confirm|Connect|Convert|ConvertFrom|ConvertTo|Copy|Debug|Deny|Disable|Disconnect|Dismount|Edit|Enable|Enter|Exit|Expand|Export|Find|ForEach|Format|Get|Grant|Group|Hide|Import|Initialize|Install|Invoke|Join|Limit|Lock|Measure|Merge|Move|New|New|Open|Optimize|Out|Ping|Pop|Protect|Publish|Push|Read|Receive|Redo|Register|Remove|Rename|Repair|Request|Reset|Resize|Resolve|Restart|Restore|Resume|Revoke|Save|Search|Select|Send|Set|Show|Skip|Sort|Split|Start|Step|Stop|Submit|Suspend|Switch|Sync|Tee|Test|Trace|Unblock|Undo|Uninstall|Unlock|Unprotect|Unpublish|Unregister|Update|Use|Wait|Watch|Where|Write)-[a-z]+\b/i, + /\b(?:Add|Approve|Assert|Backup|Block|Checkpoint|Clear|Close|Compare|Complete|Compress|Confirm|Connect|Convert|ConvertFrom|ConvertTo|Copy|Debug|Deny|Disable|Disconnect|Dismount|Edit|Enable|Enter|Exit|Expand|Export|Find|ForEach|Format|Get|Grant|Group|Hide|Import|Initialize|Install|Invoke|Join|Limit|Lock|Measure|Merge|Move|New|Open|Optimize|Out|Ping|Pop|Protect|Publish|Push|Read|Receive|Redo|Register|Remove|Rename|Repair|Request|Reset|Resize|Resolve|Restart|Restore|Resume|Revoke|Save|Search|Select|Send|Set|Show|Skip|Sort|Split|Start|Step|Stop|Submit|Suspend|Switch|Sync|Tee|Test|Trace|Unblock|Undo|Uninstall|Unlock|Unprotect|Unpublish|Unregister|Update|Use|Wait|Watch|Where|Write)-[a-z]+\b/i, /\b(?:ac|cat|chdir|clc|cli|clp|clv|compare|copy|cp|cpi|cpp|cvpa|dbp|del|diff|dir|ebp|echo|epal|epcsv|epsn|erase|fc|fl|ft|fw|gal|gbp|gc|gci|gcs|gdr|gi|gl|gm|gp|gps|group|gsv|gu|gv|gwmi|iex|ii|ipal|ipcsv|ipsn|irm|iwmi|iwr|kill|lp|ls|measure|mi|mount|move|mp|mv|nal|ndr|ni|nv|ogv|popd|ps|pushd|pwd|rbp|rd|rdr|ren|ri|rm|rmdir|rni|rnp|rp|rv|rvpa|rwmi|sal|saps|sasv|sbp|sc|select|set|shcm|si|sl|sleep|sls|sort|sp|spps|spsv|start|sv|swmi|tee|trcm|type|write)\b/i ], // per http://technet.microsoft.com/en-us/library/hh847744.aspx diff --git a/components/prism-powershell.min.js b/components/prism-powershell.min.js index ca7177b5b9..b52e861142 100644 --- a/components/prism-powershell.min.js +++ b/components/prism-powershell.min.js @@ -1 +1 @@ -!function(e){var i=Prism.languages.powershell={comment:[{pattern:/(^|[^`])<#[\s\S]*?#>/,lookbehind:!0},{pattern:/(^|[^`])#.*/,lookbehind:!0}],string:[{pattern:/"(?:`[\s\S]|[^`"])*"/,greedy:!0,inside:{function:{pattern:/(^|[^`])\$\((?:\$\([^\r\n()]*\)|(?!\$\()[^\r\n)])*\)/,lookbehind:!0,inside:{}}}},{pattern:/'(?:[^']|'')*'/,greedy:!0}],namespace:/\[[a-z](?:\[(?:\[[^\]]*]|[^\[\]])*]|[^\[\]])*]/i,boolean:/\$(?:true|false)\b/i,variable:/\$\w+\b/,function:[/\b(?:Add|Approve|Assert|Backup|Block|Checkpoint|Clear|Close|Compare|Complete|Compress|Confirm|Connect|Convert|ConvertFrom|ConvertTo|Copy|Debug|Deny|Disable|Disconnect|Dismount|Edit|Enable|Enter|Exit|Expand|Export|Find|ForEach|Format|Get|Grant|Group|Hide|Import|Initialize|Install|Invoke|Join|Limit|Lock|Measure|Merge|Move|New|New|Open|Optimize|Out|Ping|Pop|Protect|Publish|Push|Read|Receive|Redo|Register|Remove|Rename|Repair|Request|Reset|Resize|Resolve|Restart|Restore|Resume|Revoke|Save|Search|Select|Send|Set|Show|Skip|Sort|Split|Start|Step|Stop|Submit|Suspend|Switch|Sync|Tee|Test|Trace|Unblock|Undo|Uninstall|Unlock|Unprotect|Unpublish|Unregister|Update|Use|Wait|Watch|Where|Write)-[a-z]+\b/i,/\b(?:ac|cat|chdir|clc|cli|clp|clv|compare|copy|cp|cpi|cpp|cvpa|dbp|del|diff|dir|ebp|echo|epal|epcsv|epsn|erase|fc|fl|ft|fw|gal|gbp|gc|gci|gcs|gdr|gi|gl|gm|gp|gps|group|gsv|gu|gv|gwmi|iex|ii|ipal|ipcsv|ipsn|irm|iwmi|iwr|kill|lp|ls|measure|mi|mount|move|mp|mv|nal|ndr|ni|nv|ogv|popd|ps|pushd|pwd|rbp|rd|rdr|ren|ri|rm|rmdir|rni|rnp|rp|rv|rvpa|rwmi|sal|saps|sasv|sbp|sc|select|set|shcm|si|sl|sleep|sls|sort|sp|spps|spsv|start|sv|swmi|tee|trcm|type|write)\b/i],keyword:/\b(?:Begin|Break|Catch|Class|Continue|Data|Define|Do|DynamicParam|Else|ElseIf|End|Exit|Filter|Finally|For|ForEach|From|Function|If|InlineScript|Parallel|Param|Process|Return|Sequence|Switch|Throw|Trap|Try|Until|Using|Var|While|Workflow)\b/i,operator:{pattern:/(\W?)(?:!|-(?:eq|ne|gt|ge|lt|le|sh[lr]|not|b?(?:and|x?or)|(?:Not)?(?:Like|Match|Contains|In)|Replace|Join|is(?:Not)?|as)\b|-[-=]?|\+[+=]?|[*\/%]=?)/i,lookbehind:!0},punctuation:/[|{}[\];(),.]/},r=i.string[0].inside;r.boolean=i.boolean,r.variable=i.variable,r.function.inside=i}(); \ No newline at end of file +!function(e){var i=Prism.languages.powershell={comment:[{pattern:/(^|[^`])<#[\s\S]*?#>/,lookbehind:!0},{pattern:/(^|[^`])#.*/,lookbehind:!0}],string:[{pattern:/"(?:`[\s\S]|[^`"])*"/,greedy:!0,inside:{function:{pattern:/(^|[^`])\$\((?:\$\([^\r\n()]*\)|(?!\$\()[^\r\n)])*\)/,lookbehind:!0,inside:{}}}},{pattern:/'(?:[^']|'')*'/,greedy:!0}],namespace:/\[[a-z](?:\[(?:\[[^\]]*]|[^\[\]])*]|[^\[\]])*]/i,boolean:/\$(?:true|false)\b/i,variable:/\$\w+\b/,function:[/\b(?:Add|Approve|Assert|Backup|Block|Checkpoint|Clear|Close|Compare|Complete|Compress|Confirm|Connect|Convert|ConvertFrom|ConvertTo|Copy|Debug|Deny|Disable|Disconnect|Dismount|Edit|Enable|Enter|Exit|Expand|Export|Find|ForEach|Format|Get|Grant|Group|Hide|Import|Initialize|Install|Invoke|Join|Limit|Lock|Measure|Merge|Move|New|Open|Optimize|Out|Ping|Pop|Protect|Publish|Push|Read|Receive|Redo|Register|Remove|Rename|Repair|Request|Reset|Resize|Resolve|Restart|Restore|Resume|Revoke|Save|Search|Select|Send|Set|Show|Skip|Sort|Split|Start|Step|Stop|Submit|Suspend|Switch|Sync|Tee|Test|Trace|Unblock|Undo|Uninstall|Unlock|Unprotect|Unpublish|Unregister|Update|Use|Wait|Watch|Where|Write)-[a-z]+\b/i,/\b(?:ac|cat|chdir|clc|cli|clp|clv|compare|copy|cp|cpi|cpp|cvpa|dbp|del|diff|dir|ebp|echo|epal|epcsv|epsn|erase|fc|fl|ft|fw|gal|gbp|gc|gci|gcs|gdr|gi|gl|gm|gp|gps|group|gsv|gu|gv|gwmi|iex|ii|ipal|ipcsv|ipsn|irm|iwmi|iwr|kill|lp|ls|measure|mi|mount|move|mp|mv|nal|ndr|ni|nv|ogv|popd|ps|pushd|pwd|rbp|rd|rdr|ren|ri|rm|rmdir|rni|rnp|rp|rv|rvpa|rwmi|sal|saps|sasv|sbp|sc|select|set|shcm|si|sl|sleep|sls|sort|sp|spps|spsv|start|sv|swmi|tee|trcm|type|write)\b/i],keyword:/\b(?:Begin|Break|Catch|Class|Continue|Data|Define|Do|DynamicParam|Else|ElseIf|End|Exit|Filter|Finally|For|ForEach|From|Function|If|InlineScript|Parallel|Param|Process|Return|Sequence|Switch|Throw|Trap|Try|Until|Using|Var|While|Workflow)\b/i,operator:{pattern:/(\W?)(?:!|-(?:eq|ne|gt|ge|lt|le|sh[lr]|not|b?(?:and|x?or)|(?:Not)?(?:Like|Match|Contains|In)|Replace|Join|is(?:Not)?|as)\b|-[-=]?|\+[+=]?|[*\/%]=?)/i,lookbehind:!0},punctuation:/[|{}[\];(),.]/},r=i.string[0].inside;r.boolean=i.boolean,r.variable=i.variable,r.function.inside=i}(); \ No newline at end of file diff --git a/components/prism-processing.js b/components/prism-processing.js index b252764e71..061fb59c97 100644 --- a/components/prism-processing.js +++ b/components/prism-processing.js @@ -6,7 +6,7 @@ Prism.languages.insertBefore('processing', 'number', { // Special case: XML is a type 'constant': /\b(?!XML\b)[A-Z][A-Z\d_]+\b/, 'type': { - pattern: /\b(?:boolean|byte|char|color|double|float|int|XML|[A-Z]\w*)\b/, + pattern: /\b(?:boolean|byte|char|color|double|float|int|[A-Z]\w*)\b/, alias: 'variable' } }); @@ -15,4 +15,4 @@ Prism.languages.insertBefore('processing', 'number', { Prism.languages.processing['function'].pattern = /\w+(?=\s*\()/; // Class-names is not styled by default -Prism.languages.processing['class-name'].alias = 'variable'; \ No newline at end of file +Prism.languages.processing['class-name'].alias = 'variable'; diff --git a/components/prism-processing.min.js b/components/prism-processing.min.js index e2cc0d1ed8..70f05feb24 100644 --- a/components/prism-processing.min.js +++ b/components/prism-processing.min.js @@ -1 +1 @@ -Prism.languages.processing=Prism.languages.extend("clike",{keyword:/\b(?:break|catch|case|class|continue|default|else|extends|final|for|if|implements|import|new|null|private|public|return|static|super|switch|this|try|void|while)\b/,operator:/<[<=]?|>[>=]?|&&?|\|\|?|[%?]|[!=+\-*\/]=?/}),Prism.languages.insertBefore("processing","number",{constant:/\b(?!XML\b)[A-Z][A-Z\d_]+\b/,type:{pattern:/\b(?:boolean|byte|char|color|double|float|int|XML|[A-Z]\w*)\b/,alias:"variable"}}),Prism.languages.processing.function.pattern=/\w+(?=\s*\()/,Prism.languages.processing["class-name"].alias="variable"; \ No newline at end of file +Prism.languages.processing=Prism.languages.extend("clike",{keyword:/\b(?:break|catch|case|class|continue|default|else|extends|final|for|if|implements|import|new|null|private|public|return|static|super|switch|this|try|void|while)\b/,operator:/<[<=]?|>[>=]?|&&?|\|\|?|[%?]|[!=+\-*\/]=?/}),Prism.languages.insertBefore("processing","number",{constant:/\b(?!XML\b)[A-Z][A-Z\d_]+\b/,type:{pattern:/\b(?:boolean|byte|char|color|double|float|int|[A-Z]\w*)\b/,alias:"variable"}}),Prism.languages.processing.function.pattern=/\w+(?=\s*\()/,Prism.languages.processing["class-name"].alias="variable"; \ No newline at end of file diff --git a/components/prism-purebasic.js b/components/prism-purebasic.js index fd720d4a3b..c2b9622c93 100644 --- a/components/prism-purebasic.js +++ b/components/prism-purebasic.js @@ -54,7 +54,7 @@ Prism.languages.insertBefore('purebasic', 'keyword', { alias: 'fasm-label' }, 'keyword': [ - /(?:extern|extern|global)[^;\r\n]*/i, + /(?:extern|global)[^;\r\n]*/i, /(?:CPU|FLOAT|DEFAULT).*/ ], 'register': /\b(?:st\d|[xyz]mm\d\d?|[cdt]r\d|r\d\d?[bwd]?|[er]?[abcd]x|[abcd][hl]|[er]?(?:bp|sp|si|di)|[cdefgs]s|mm\d+)\b/i, diff --git a/components/prism-purebasic.min.js b/components/prism-purebasic.min.js index 131123b33d..377ee4c3a6 100644 --- a/components/prism-purebasic.min.js +++ b/components/prism-purebasic.min.js @@ -1 +1 @@ -Prism.languages.purebasic=Prism.languages.extend("clike",{comment:/;.*/,keyword:/\b(?:declarecdll|declaredll|compilerselect|compilercase|compilerdefault|compilerendselect|compilererror|enableexplicit|disableexplicit|not|and|or|xor|calldebugger|debuglevel|enabledebugger|disabledebugger|restore|read|includepath|includebinary|threaded|runtime|with|endwith|structureunion|endstructureunion|align|newlist|newmap|interface|endinterface|extends|enumeration|endenumeration|swap|foreach|continue|fakereturn|goto|gosub|return|break|module|endmodule|declaremodule|enddeclaremodule|declare|declarec|prototype|prototypec|enableasm|disableasm|dim|redim|data|datasection|enddatasection|to|procedurereturn|debug|default|case|select|endselect|as|import|endimport|importc|compilerif|compilerelse|compilerendif|compilerelseif|end|structure|endstructure|while|wend|for|next|step|if|else|elseif|endif|repeat|until|procedure|proceduredll|procedurec|procedurecdll|endprocedure|protected|shared|static|global|define|includefile|xincludefile|macro|endmacro)\b/i,function:/\b\w+(?:\.\w+)?\s*(?=\()/,number:/(?:\$[\da-f]+|\b-?\d*\.?\d+(?:e[+-]?\d+)?)\b/i,operator:/(?:@\*?|\?|\*)\w+|-[>-]?|\+\+?|!=?|<>?=?|==?|&&?|\|?\||[~^%?*/@]/}),Prism.languages.insertBefore("purebasic","keyword",{tag:/#\w+/,asm:{pattern:/(^\s*)!.*/m,lookbehind:!0,alias:"tag",inside:{comment:/;.*/,string:{pattern:/(["'`])(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0},"label-reference-anonymous":{pattern:/(\s*!\s*j[a-z]+\s+)@[fb]/i,lookbehind:!0,alias:"fasm-label"},"label-reference-addressed":{pattern:/(\s*!\s*j[a-z]+\s+)[A-Z._?$@][\w.?$@~#]*/i,lookbehind:!0,alias:"fasm-label"},function:{pattern:/^(\s*!\s*)[\da-z]+(?=\s|$)/im,lookbehind:!0},"function-inline":{pattern:/(\s*:\s*)[\da-z]+(?=\s)/i,lookbehind:!0,alias:"function"},label:{pattern:/^(\s*!\s*)[A-Za-z._?$@][\w.?$@~#]*(?=:)/m,lookbehind:!0,alias:"fasm-label"},keyword:[/(?:extern|extern|global)[^;\r\n]*/i,/(?:CPU|FLOAT|DEFAULT).*/],register:/\b(?:st\d|[xyz]mm\d\d?|[cdt]r\d|r\d\d?[bwd]?|[er]?[abcd]x|[abcd][hl]|[er]?(?:bp|sp|si|di)|[cdefgs]s|mm\d+)\b/i,number:/(?:\b|-|(?=\$))(?:0[hx][\da-f]*\.?[\da-f]+(?:p[+-]?\d+)?|\d[\da-f]+[hx]|\$\d[\da-f]*|0[oq][0-7]+|[0-7]+[oq]|0[by][01]+|[01]+[by]|0[dt]\d+|\d*\.?\d+(?:\.?e[+-]?\d+)?[dt]?)\b/i,operator:/[\[\]*+\-/%<>=&|$!,.:]/}}}),delete Prism.languages.purebasic["class-name"],delete Prism.languages.purebasic.boolean,Prism.languages.pbfasm=Prism.languages.purebasic; \ No newline at end of file +Prism.languages.purebasic=Prism.languages.extend("clike",{comment:/;.*/,keyword:/\b(?:declarecdll|declaredll|compilerselect|compilercase|compilerdefault|compilerendselect|compilererror|enableexplicit|disableexplicit|not|and|or|xor|calldebugger|debuglevel|enabledebugger|disabledebugger|restore|read|includepath|includebinary|threaded|runtime|with|endwith|structureunion|endstructureunion|align|newlist|newmap|interface|endinterface|extends|enumeration|endenumeration|swap|foreach|continue|fakereturn|goto|gosub|return|break|module|endmodule|declaremodule|enddeclaremodule|declare|declarec|prototype|prototypec|enableasm|disableasm|dim|redim|data|datasection|enddatasection|to|procedurereturn|debug|default|case|select|endselect|as|import|endimport|importc|compilerif|compilerelse|compilerendif|compilerelseif|end|structure|endstructure|while|wend|for|next|step|if|else|elseif|endif|repeat|until|procedure|proceduredll|procedurec|procedurecdll|endprocedure|protected|shared|static|global|define|includefile|xincludefile|macro|endmacro)\b/i,function:/\b\w+(?:\.\w+)?\s*(?=\()/,number:/(?:\$[\da-f]+|\b-?\d*\.?\d+(?:e[+-]?\d+)?)\b/i,operator:/(?:@\*?|\?|\*)\w+|-[>-]?|\+\+?|!=?|<>?=?|==?|&&?|\|?\||[~^%?*/@]/}),Prism.languages.insertBefore("purebasic","keyword",{tag:/#\w+/,asm:{pattern:/(^\s*)!.*/m,lookbehind:!0,alias:"tag",inside:{comment:/;.*/,string:{pattern:/(["'`])(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0},"label-reference-anonymous":{pattern:/(\s*!\s*j[a-z]+\s+)@[fb]/i,lookbehind:!0,alias:"fasm-label"},"label-reference-addressed":{pattern:/(\s*!\s*j[a-z]+\s+)[A-Z._?$@][\w.?$@~#]*/i,lookbehind:!0,alias:"fasm-label"},function:{pattern:/^(\s*!\s*)[\da-z]+(?=\s|$)/im,lookbehind:!0},"function-inline":{pattern:/(\s*:\s*)[\da-z]+(?=\s)/i,lookbehind:!0,alias:"function"},label:{pattern:/^(\s*!\s*)[A-Za-z._?$@][\w.?$@~#]*(?=:)/m,lookbehind:!0,alias:"fasm-label"},keyword:[/(?:extern|global)[^;\r\n]*/i,/(?:CPU|FLOAT|DEFAULT).*/],register:/\b(?:st\d|[xyz]mm\d\d?|[cdt]r\d|r\d\d?[bwd]?|[er]?[abcd]x|[abcd][hl]|[er]?(?:bp|sp|si|di)|[cdefgs]s|mm\d+)\b/i,number:/(?:\b|-|(?=\$))(?:0[hx][\da-f]*\.?[\da-f]+(?:p[+-]?\d+)?|\d[\da-f]+[hx]|\$\d[\da-f]*|0[oq][0-7]+|[0-7]+[oq]|0[by][01]+|[01]+[by]|0[dt]\d+|\d*\.?\d+(?:\.?e[+-]?\d+)?[dt]?)\b/i,operator:/[\[\]*+\-/%<>=&|$!,.:]/}}}),delete Prism.languages.purebasic["class-name"],delete Prism.languages.purebasic.boolean,Prism.languages.pbfasm=Prism.languages.purebasic; \ No newline at end of file diff --git a/components/prism-vim.js b/components/prism-vim.js index 6866af68a7..1390dd1a0a 100644 --- a/components/prism-vim.js +++ b/components/prism-vim.js @@ -2,9 +2,9 @@ Prism.languages.vim = { 'string': /"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\r\n]|'')*'/, 'comment': /".*/, 'function': /\w+(?=\()/, - 'keyword': /\b(?:ab|abbreviate|abc|abclear|abo|aboveleft|al|all|arga|argadd|argd|argdelete|argdo|arge|argedit|argg|argglobal|argl|arglocal|ar|args|argu|argument|as|ascii|bad|badd|ba|ball|bd|bdelete|be|bel|belowright|bf|bfirst|bl|blast|bm|bmodified|bn|bnext|bN|bNext|bo|botright|bp|bprevious|brea|break|breaka|breakadd|breakd|breakdel|breakl|breaklist|br|brewind|bro|browse|bufdo|b|buffer|buffers|bun|bunload|bw|bwipeout|ca|cabbrev|cabc|cabclear|caddb|caddbuffer|cad|caddexpr|caddf|caddfile|cal|call|cat|catch|cb|cbuffer|cc|ccl|cclose|cd|ce|center|cex|cexpr|cf|cfile|cfir|cfirst|cgetb|cgetbuffer|cgete|cgetexpr|cg|cgetfile|c|change|changes|chd|chdir|che|checkpath|checkt|checktime|cla|clast|cl|clist|clo|close|cmapc|cmapclear|cnew|cnewer|cn|cnext|cN|cNext|cnf|cnfile|cNfcNfile|cnorea|cnoreabbrev|col|colder|colo|colorscheme|comc|comclear|comp|compiler|conf|confirm|con|continue|cope|copen|co|copy|cpf|cpfile|cp|cprevious|cq|cquit|cr|crewind|cuna|cunabbrev|cu|cunmap|cw|cwindow|debugg|debuggreedy|delc|delcommand|d|delete|delf|delfunction|delm|delmarks|diffg|diffget|diffoff|diffpatch|diffpu|diffput|diffsplit|diffthis|diffu|diffupdate|dig|digraphs|di|display|dj|djump|dl|dlist|dr|drop|ds|dsearch|dsp|dsplit|earlier|echoe|echoerr|echom|echomsg|echon|e|edit|el|else|elsei|elseif|em|emenu|endfo|endfor|endf|endfunction|endfun|en|endif|endt|endtry|endw|endwhile|ene|enew|ex|exi|exit|exu|exusage|f|file|files|filetype|fina|finally|fin|find|fini|finish|fir|first|fix|fixdel|fo|fold|foldc|foldclose|folddoc|folddoclosed|foldd|folddoopen|foldo|foldopen|for|fu|fun|function|go|goto|gr|grep|grepa|grepadd|ha|hardcopy|h|help|helpf|helpfind|helpg|helpgrep|helpt|helptags|hid|hide|his|history|ia|iabbrev|iabc|iabclear|if|ij|ijump|il|ilist|imapc|imapclear|in|inorea|inoreabbrev|isearch|isp|isplit|iuna|iunabbrev|iu|iunmap|j|join|ju|jumps|k|keepalt|keepj|keepjumps|kee|keepmarks|laddb|laddbuffer|lad|laddexpr|laddf|laddfile|lan|language|la|last|later|lb|lbuffer|lc|lcd|lch|lchdir|lcl|lclose|let|left|lefta|leftabove|lex|lexpr|lf|lfile|lfir|lfirst|lgetb|lgetbuffer|lgete|lgetexpr|lg|lgetfile|lgr|lgrep|lgrepa|lgrepadd|lh|lhelpgrep|l|list|ll|lla|llast|lli|llist|lmak|lmake|lm|lmap|lmapc|lmapclear|lnew|lnewer|lne|lnext|lN|lNext|lnf|lnfile|lNf|lNfile|ln|lnoremap|lo|loadview|loc|lockmarks|lockv|lockvar|lol|lolder|lop|lopen|lpf|lpfile|lp|lprevious|lr|lrewind|ls|lt|ltag|lu|lunmap|lv|lvimgrep|lvimgrepa|lvimgrepadd|lw|lwindow|mak|make|ma|mark|marks|mat|match|menut|menutranslate|mk|mkexrc|mks|mksession|mksp|mkspell|mkvie|mkview|mkv|mkvimrc|mod|mode|m|move|mzf|mzfile|mz|mzscheme|nbkey|new|n|next|N|Next|nmapc|nmapclear|noh|nohlsearch|norea|noreabbrev|nu|number|nun|nunmap|omapc|omapclear|on|only|o|open|opt|options|ou|ounmap|pc|pclose|ped|pedit|pe|perl|perld|perldo|po|pop|popu|popup|pp|ppop|pre|preserve|prev|previous|p|print|P|Print|profd|profdel|prof|profile|promptf|promptfind|promptr|promptrepl|ps|psearch|pta|ptag|ptf|ptfirst|ptj|ptjump|ptl|ptlast|ptn|ptnext|ptN|ptNext|ptp|ptprevious|ptr|ptrewind|pts|ptselect|pu|put|pw|pwd|pyf|pyfile|py|python|qa|qall|q|quit|quita|quitall|r|read|rec|recover|redi|redir|red|redo|redr|redraw|redraws|redrawstatus|reg|registers|res|resize|ret|retab|retu|return|rew|rewind|ri|right|rightb|rightbelow|rub|ruby|rubyd|rubydo|rubyf|rubyfile|ru|runtime|rv|rviminfo|sal|sall|san|sandbox|sa|sargument|sav|saveas|sba|sball|sbf|sbfirst|sbl|sblast|sbm|sbmodified|sbn|sbnext|sbN|sbNext|sbp|sbprevious|sbr|sbrewind|sb|sbuffer|scripte|scriptencoding|scrip|scriptnames|se|set|setf|setfiletype|setg|setglobal|setl|setlocal|sf|sfind|sfir|sfirst|sh|shell|sign|sil|silent|sim|simalt|sla|slast|sl|sleep|sm|smagic|sm|smap|smapc|smapclear|sme|smenu|sn|snext|sN|sNext|sni|sniff|sno|snomagic|snor|snoremap|snoreme|snoremenu|sor|sort|so|source|spelld|spelldump|spe|spellgood|spelli|spellinfo|spellr|spellrepall|spellu|spellundo|spellw|spellwrong|sp|split|spr|sprevious|sre|srewind|sta|stag|startg|startgreplace|star|startinsert|startr|startreplace|stj|stjump|st|stop|stopi|stopinsert|sts|stselect|sun|sunhide|sunm|sunmap|sus|suspend|sv|sview|syncbind|t|tab|tabc|tabclose|tabd|tabdo|tabe|tabedit|tabf|tabfind|tabfir|tabfirst|tabl|tablast|tabm|tabmove|tabnew|tabn|tabnext|tabN|tabNext|tabo|tabonly|tabp|tabprevious|tabr|tabrewind|tabs|ta|tag|tags|tc|tcl|tcld|tcldo|tclf|tclfile|te|tearoff|tf|tfirst|th|throw|tj|tjump|tl|tlast|tm|tm|tmenu|tn|tnext|tN|tNext|to|topleft|tp|tprevious|tr|trewind|try|ts|tselect|tu|tu|tunmenu|una|unabbreviate|u|undo|undoj|undojoin|undol|undolist|unh|unhide|unlet|unlo|unlockvar|unm|unmap|up|update|verb|verbose|ve|version|vert|vertical|vie|view|vim|vimgrep|vimgrepa|vimgrepadd|vi|visual|viu|viusage|vmapc|vmapclear|vne|vnew|vs|vsplit|vu|vunmap|wa|wall|wh|while|winc|wincmd|windo|winp|winpos|win|winsize|wn|wnext|wN|wNext|wp|wprevious|wq|wqa|wqall|w|write|ws|wsverb|wv|wviminfo|X|xa|xall|x|xit|xm|xmap|xmapc|xmapclear|xme|xmenu|XMLent|XMLns|xn|xnoremap|xnoreme|xnoremenu|xu|xunmap|y|yank)\b/, + 'keyword': /\b(?:ab|abbreviate|abc|abclear|abo|aboveleft|al|all|arga|argadd|argd|argdelete|argdo|arge|argedit|argg|argglobal|argl|arglocal|ar|args|argu|argument|as|ascii|bad|badd|ba|ball|bd|bdelete|be|bel|belowright|bf|bfirst|bl|blast|bm|bmodified|bn|bnext|bN|bNext|bo|botright|bp|bprevious|brea|break|breaka|breakadd|breakd|breakdel|breakl|breaklist|br|brewind|bro|browse|bufdo|b|buffer|buffers|bun|bunload|bw|bwipeout|ca|cabbrev|cabc|cabclear|caddb|caddbuffer|cad|caddexpr|caddf|caddfile|cal|call|cat|catch|cb|cbuffer|cc|ccl|cclose|cd|ce|center|cex|cexpr|cf|cfile|cfir|cfirst|cgetb|cgetbuffer|cgete|cgetexpr|cg|cgetfile|c|change|changes|chd|chdir|che|checkpath|checkt|checktime|cla|clast|cl|clist|clo|close|cmapc|cmapclear|cnew|cnewer|cn|cnext|cN|cNext|cnf|cnfile|cNfcNfile|cnorea|cnoreabbrev|col|colder|colo|colorscheme|comc|comclear|comp|compiler|conf|confirm|con|continue|cope|copen|co|copy|cpf|cpfile|cp|cprevious|cq|cquit|cr|crewind|cuna|cunabbrev|cu|cunmap|cw|cwindow|debugg|debuggreedy|delc|delcommand|d|delete|delf|delfunction|delm|delmarks|diffg|diffget|diffoff|diffpatch|diffpu|diffput|diffsplit|diffthis|diffu|diffupdate|dig|digraphs|di|display|dj|djump|dl|dlist|dr|drop|ds|dsearch|dsp|dsplit|earlier|echoe|echoerr|echom|echomsg|echon|e|edit|el|else|elsei|elseif|em|emenu|endfo|endfor|endf|endfunction|endfun|en|endif|endt|endtry|endw|endwhile|ene|enew|ex|exi|exit|exu|exusage|f|file|files|filetype|fina|finally|fin|find|fini|finish|fir|first|fix|fixdel|fo|fold|foldc|foldclose|folddoc|folddoclosed|foldd|folddoopen|foldo|foldopen|for|fu|fun|function|go|goto|gr|grep|grepa|grepadd|ha|hardcopy|h|help|helpf|helpfind|helpg|helpgrep|helpt|helptags|hid|hide|his|history|ia|iabbrev|iabc|iabclear|if|ij|ijump|il|ilist|imapc|imapclear|in|inorea|inoreabbrev|isearch|isp|isplit|iuna|iunabbrev|iu|iunmap|j|join|ju|jumps|k|keepalt|keepj|keepjumps|kee|keepmarks|laddb|laddbuffer|lad|laddexpr|laddf|laddfile|lan|language|la|last|later|lb|lbuffer|lc|lcd|lch|lchdir|lcl|lclose|let|left|lefta|leftabove|lex|lexpr|lf|lfile|lfir|lfirst|lgetb|lgetbuffer|lgete|lgetexpr|lg|lgetfile|lgr|lgrep|lgrepa|lgrepadd|lh|lhelpgrep|l|list|ll|lla|llast|lli|llist|lmak|lmake|lm|lmap|lmapc|lmapclear|lnew|lnewer|lne|lnext|lN|lNext|lnf|lnfile|lNf|lNfile|ln|lnoremap|lo|loadview|loc|lockmarks|lockv|lockvar|lol|lolder|lop|lopen|lpf|lpfile|lp|lprevious|lr|lrewind|ls|lt|ltag|lu|lunmap|lv|lvimgrep|lvimgrepa|lvimgrepadd|lw|lwindow|mak|make|ma|mark|marks|mat|match|menut|menutranslate|mk|mkexrc|mks|mksession|mksp|mkspell|mkvie|mkview|mkv|mkvimrc|mod|mode|m|move|mzf|mzfile|mz|mzscheme|nbkey|new|n|next|N|Next|nmapc|nmapclear|noh|nohlsearch|norea|noreabbrev|nu|number|nun|nunmap|omapc|omapclear|on|only|o|open|opt|options|ou|ounmap|pc|pclose|ped|pedit|pe|perl|perld|perldo|po|pop|popu|popup|pp|ppop|pre|preserve|prev|previous|p|print|P|Print|profd|profdel|prof|profile|promptf|promptfind|promptr|promptrepl|ps|psearch|pta|ptag|ptf|ptfirst|ptj|ptjump|ptl|ptlast|ptn|ptnext|ptN|ptNext|ptp|ptprevious|ptr|ptrewind|pts|ptselect|pu|put|pw|pwd|pyf|pyfile|py|python|qa|qall|q|quit|quita|quitall|r|read|rec|recover|redi|redir|red|redo|redr|redraw|redraws|redrawstatus|reg|registers|res|resize|ret|retab|retu|return|rew|rewind|ri|right|rightb|rightbelow|rub|ruby|rubyd|rubydo|rubyf|rubyfile|ru|runtime|rv|rviminfo|sal|sall|san|sandbox|sa|sargument|sav|saveas|sba|sball|sbf|sbfirst|sbl|sblast|sbm|sbmodified|sbn|sbnext|sbN|sbNext|sbp|sbprevious|sbr|sbrewind|sb|sbuffer|scripte|scriptencoding|scrip|scriptnames|se|set|setf|setfiletype|setg|setglobal|setl|setlocal|sf|sfind|sfir|sfirst|sh|shell|sign|sil|silent|sim|simalt|sla|slast|sl|sleep|sm|smagic|smap|smapc|smapclear|sme|smenu|sn|snext|sN|sNext|sni|sniff|sno|snomagic|snor|snoremap|snoreme|snoremenu|sor|sort|so|source|spelld|spelldump|spe|spellgood|spelli|spellinfo|spellr|spellrepall|spellu|spellundo|spellw|spellwrong|sp|split|spr|sprevious|sre|srewind|sta|stag|startg|startgreplace|star|startinsert|startr|startreplace|stj|stjump|st|stop|stopi|stopinsert|sts|stselect|sun|sunhide|sunm|sunmap|sus|suspend|sv|sview|syncbind|t|tab|tabc|tabclose|tabd|tabdo|tabe|tabedit|tabf|tabfind|tabfir|tabfirst|tabl|tablast|tabm|tabmove|tabnew|tabn|tabnext|tabN|tabNext|tabo|tabonly|tabp|tabprevious|tabr|tabrewind|tabs|ta|tag|tags|tc|tcl|tcld|tcldo|tclf|tclfile|te|tearoff|tf|tfirst|th|throw|tj|tjump|tl|tlast|tm|tmenu|tn|tnext|tN|tNext|to|topleft|tp|tprevious|tr|trewind|try|ts|tselect|tu|tunmenu|una|unabbreviate|u|undo|undoj|undojoin|undol|undolist|unh|unhide|unlet|unlo|unlockvar|unm|unmap|up|update|verb|verbose|ve|version|vert|vertical|vie|view|vim|vimgrep|vimgrepa|vimgrepadd|vi|visual|viu|viusage|vmapc|vmapclear|vne|vnew|vs|vsplit|vu|vunmap|wa|wall|wh|while|winc|wincmd|windo|winp|winpos|win|winsize|wn|wnext|wN|wNext|wp|wprevious|wq|wqa|wqall|w|write|ws|wsverb|wv|wviminfo|X|xa|xall|x|xit|xm|xmap|xmapc|xmapclear|xme|xmenu|XMLent|XMLns|xn|xnoremap|xnoreme|xnoremenu|xu|xunmap|y|yank)\b/, 'builtin': /\b(?:autocmd|acd|ai|akm|aleph|allowrevins|altkeymap|ambiwidth|ambw|anti|antialias|arab|arabic|arabicshape|ari|arshape|autochdir|autoindent|autoread|autowrite|autowriteall|aw|awa|background|backspace|backup|backupcopy|backupdir|backupext|backupskip|balloondelay|ballooneval|balloonexpr|bdir|bdlay|beval|bex|bexpr|bg|bh|bin|binary|biosk|bioskey|bk|bkc|bomb|breakat|brk|browsedir|bs|bsdir|bsk|bt|bufhidden|buflisted|buftype|casemap|ccv|cdpath|cedit|cfu|ch|charconvert|ci|cin|cindent|cink|cinkeys|cino|cinoptions|cinw|cinwords|clipboard|cmdheight|cmdwinheight|cmp|cms|columns|com|comments|commentstring|compatible|complete|completefunc|completeopt|consk|conskey|copyindent|cot|cpo|cpoptions|cpt|cscopepathcomp|cscopeprg|cscopequickfix|cscopetag|cscopetagorder|cscopeverbose|cspc|csprg|csqf|cst|csto|csverb|cuc|cul|cursorcolumn|cursorline|cwh|debug|deco|def|define|delcombine|dex|dg|dict|dictionary|diff|diffexpr|diffopt|digraph|dip|dir|directory|dy|ea|ead|eadirection|eb|ed|edcompatible|ef|efm|ei|ek|enc|encoding|endofline|eol|ep|equalalways|equalprg|errorbells|errorfile|errorformat|esckeys|et|eventignore|expandtab|exrc|fcl|fcs|fdc|fde|fdi|fdl|fdls|fdm|fdn|fdo|fdt|fen|fenc|fencs|fex|ff|ffs|fileencoding|fileencodings|fileformat|fileformats|fillchars|fk|fkmap|flp|fml|fmr|foldcolumn|foldenable|foldexpr|foldignore|foldlevel|foldlevelstart|foldmarker|foldmethod|foldminlines|foldnestmax|foldtext|formatexpr|formatlistpat|formatoptions|formatprg|fp|fs|fsync|ft|gcr|gd|gdefault|gfm|gfn|gfs|gfw|ghr|gp|grepformat|grepprg|gtl|gtt|guicursor|guifont|guifontset|guifontwide|guiheadroom|guioptions|guipty|guitablabel|guitabtooltip|helpfile|helpheight|helplang|hf|hh|hi|hidden|highlight|hk|hkmap|hkmapp|hkp|hl|hlg|hls|hlsearch|ic|icon|iconstring|ignorecase|im|imactivatekey|imak|imc|imcmdline|imd|imdisable|imi|iminsert|ims|imsearch|inc|include|includeexpr|incsearch|inde|indentexpr|indentkeys|indk|inex|inf|infercase|insertmode|isf|isfname|isi|isident|isk|iskeyword|isprint|joinspaces|js|key|keymap|keymodel|keywordprg|km|kmp|kp|langmap|langmenu|laststatus|lazyredraw|lbr|lcs|linebreak|lines|linespace|lisp|lispwords|listchars|loadplugins|lpl|lsp|lz|macatsui|magic|makeef|makeprg|matchpairs|matchtime|maxcombine|maxfuncdepth|maxmapdepth|maxmem|maxmempattern|maxmemtot|mco|mef|menuitems|mfd|mh|mis|mkspellmem|ml|mls|mm|mmd|mmp|mmt|modeline|modelines|modifiable|modified|more|mouse|mousef|mousefocus|mousehide|mousem|mousemodel|mouses|mouseshape|mouset|mousetime|mp|mps|msm|mzq|mzquantum|nf|nrformats|numberwidth|nuw|odev|oft|ofu|omnifunc|opendevice|operatorfunc|opfunc|osfiletype|pa|para|paragraphs|paste|pastetoggle|patchexpr|patchmode|path|pdev|penc|pex|pexpr|pfn|ph|pheader|pi|pm|pmbcs|pmbfn|popt|preserveindent|previewheight|previewwindow|printdevice|printencoding|printexpr|printfont|printheader|printmbcharset|printmbfont|printoptions|prompt|pt|pumheight|pvh|pvw|qe|quoteescape|readonly|remap|report|restorescreen|revins|rightleft|rightleftcmd|rl|rlc|ro|rs|rtp|ruf|ruler|rulerformat|runtimepath|sbo|sc|scb|scr|scroll|scrollbind|scrolljump|scrolloff|scrollopt|scs|sect|sections|secure|sel|selection|selectmode|sessionoptions|sft|shcf|shellcmdflag|shellpipe|shellquote|shellredir|shellslash|shelltemp|shelltype|shellxquote|shiftround|shiftwidth|shm|shortmess|shortname|showbreak|showcmd|showfulltag|showmatch|showmode|showtabline|shq|si|sidescroll|sidescrolloff|siso|sj|slm|smartcase|smartindent|smarttab|smc|smd|softtabstop|sol|spc|spell|spellcapcheck|spellfile|spelllang|spellsuggest|spf|spl|splitbelow|splitright|sps|sr|srr|ss|ssl|ssop|stal|startofline|statusline|stl|stmp|su|sua|suffixes|suffixesadd|sw|swapfile|swapsync|swb|swf|switchbuf|sws|sxq|syn|synmaxcol|syntax|tabline|tabpagemax|tabstop|tagbsearch|taglength|tagrelative|tagstack|tal|tb|tbi|tbidi|tbis|tbs|tenc|term|termbidi|termencoding|terse|textauto|textmode|textwidth|tgst|thesaurus|tildeop|timeout|timeoutlen|title|titlelen|titleold|titlestring|toolbar|toolbariconsize|top|tpm|tsl|tsr|ttimeout|ttimeoutlen|ttm|tty|ttybuiltin|ttyfast|ttym|ttymouse|ttyscroll|ttytype|tw|tx|uc|ul|undolevels|updatecount|updatetime|ut|vb|vbs|vdir|verbosefile|vfile|viewdir|viewoptions|viminfo|virtualedit|visualbell|vop|wak|warn|wb|wc|wcm|wd|weirdinvert|wfh|wfw|whichwrap|wi|wig|wildchar|wildcharm|wildignore|wildmenu|wildmode|wildoptions|wim|winaltkeys|window|winfixheight|winfixwidth|winheight|winminheight|winminwidth|winwidth|wiv|wiw|wm|wmh|wmnu|wmw|wop|wrap|wrapmargin|wrapscan|writeany|writebackup|writedelay|ww|noacd|noai|noakm|noallowrevins|noaltkeymap|noanti|noantialias|noar|noarab|noarabic|noarabicshape|noari|noarshape|noautochdir|noautoindent|noautoread|noautowrite|noautowriteall|noaw|noawa|nobackup|noballooneval|nobeval|nobin|nobinary|nobiosk|nobioskey|nobk|nobl|nobomb|nobuflisted|nocf|noci|nocin|nocindent|nocompatible|noconfirm|noconsk|noconskey|nocopyindent|nocp|nocscopetag|nocscopeverbose|nocst|nocsverb|nocuc|nocul|nocursorcolumn|nocursorline|nodeco|nodelcombine|nodg|nodiff|nodigraph|nodisable|noea|noeb|noed|noedcompatible|noek|noendofline|noeol|noequalalways|noerrorbells|noesckeys|noet|noex|noexpandtab|noexrc|nofen|nofk|nofkmap|nofoldenable|nogd|nogdefault|noguipty|nohid|nohidden|nohk|nohkmap|nohkmapp|nohkp|nohls|noic|noicon|noignorecase|noim|noimc|noimcmdline|noimd|noincsearch|noinf|noinfercase|noinsertmode|nois|nojoinspaces|nojs|nolazyredraw|nolbr|nolinebreak|nolisp|nolist|noloadplugins|nolpl|nolz|noma|nomacatsui|nomagic|nomh|noml|nomod|nomodeline|nomodifiable|nomodified|nomore|nomousef|nomousefocus|nomousehide|nonu|nonumber|noodev|noopendevice|nopaste|nopi|nopreserveindent|nopreviewwindow|noprompt|nopvw|noreadonly|noremap|norestorescreen|norevins|nori|norightleft|norightleftcmd|norl|norlc|noro|nors|noru|noruler|nosb|nosc|noscb|noscrollbind|noscs|nosecure|nosft|noshellslash|noshelltemp|noshiftround|noshortname|noshowcmd|noshowfulltag|noshowmatch|noshowmode|nosi|nosm|nosmartcase|nosmartindent|nosmarttab|nosmd|nosn|nosol|nospell|nosplitbelow|nosplitright|nospr|nosr|nossl|nosta|nostartofline|nostmp|noswapfile|noswf|nota|notagbsearch|notagrelative|notagstack|notbi|notbidi|notbs|notermbidi|noterse|notextauto|notextmode|notf|notgst|notildeop|notimeout|notitle|noto|notop|notr|nottimeout|nottybuiltin|nottyfast|notx|novb|novisualbell|nowa|nowarn|nowb|noweirdinvert|nowfh|nowfw|nowildmenu|nowinfixheight|nowinfixwidth|nowiv|nowmnu|nowrap|nowrapscan|nowrite|nowriteany|nowritebackup|nows|invacd|invai|invakm|invallowrevins|invaltkeymap|invanti|invantialias|invar|invarab|invarabic|invarabicshape|invari|invarshape|invautochdir|invautoindent|invautoread|invautowrite|invautowriteall|invaw|invawa|invbackup|invballooneval|invbeval|invbin|invbinary|invbiosk|invbioskey|invbk|invbl|invbomb|invbuflisted|invcf|invci|invcin|invcindent|invcompatible|invconfirm|invconsk|invconskey|invcopyindent|invcp|invcscopetag|invcscopeverbose|invcst|invcsverb|invcuc|invcul|invcursorcolumn|invcursorline|invdeco|invdelcombine|invdg|invdiff|invdigraph|invdisable|invea|inveb|inved|invedcompatible|invek|invendofline|inveol|invequalalways|inverrorbells|invesckeys|invet|invex|invexpandtab|invexrc|invfen|invfk|invfkmap|invfoldenable|invgd|invgdefault|invguipty|invhid|invhidden|invhk|invhkmap|invhkmapp|invhkp|invhls|invhlsearch|invic|invicon|invignorecase|invim|invimc|invimcmdline|invimd|invincsearch|invinf|invinfercase|invinsertmode|invis|invjoinspaces|invjs|invlazyredraw|invlbr|invlinebreak|invlisp|invlist|invloadplugins|invlpl|invlz|invma|invmacatsui|invmagic|invmh|invml|invmod|invmodeline|invmodifiable|invmodified|invmore|invmousef|invmousefocus|invmousehide|invnu|invnumber|invodev|invopendevice|invpaste|invpi|invpreserveindent|invpreviewwindow|invprompt|invpvw|invreadonly|invremap|invrestorescreen|invrevins|invri|invrightleft|invrightleftcmd|invrl|invrlc|invro|invrs|invru|invruler|invsb|invsc|invscb|invscrollbind|invscs|invsecure|invsft|invshellslash|invshelltemp|invshiftround|invshortname|invshowcmd|invshowfulltag|invshowmatch|invshowmode|invsi|invsm|invsmartcase|invsmartindent|invsmarttab|invsmd|invsn|invsol|invspell|invsplitbelow|invsplitright|invspr|invsr|invssl|invsta|invstartofline|invstmp|invswapfile|invswf|invta|invtagbsearch|invtagrelative|invtagstack|invtbi|invtbidi|invtbs|invtermbidi|invterse|invtextauto|invtextmode|invtf|invtgst|invtildeop|invtimeout|invtitle|invto|invtop|invtr|invttimeout|invttybuiltin|invttyfast|invtx|invvb|invvisualbell|invwa|invwarn|invwb|invweirdinvert|invwfh|invwfw|invwildmenu|invwinfixheight|invwinfixwidth|invwiv|invwmnu|invwrap|invwrapscan|invwrite|invwriteany|invwritebackup|invws|t_AB|t_AF|t_al|t_AL|t_bc|t_cd|t_ce|t_Ce|t_cl|t_cm|t_Co|t_cs|t_Cs|t_CS|t_CV|t_da|t_db|t_dl|t_DL|t_EI|t_F1|t_F2|t_F3|t_F4|t_F5|t_F6|t_F7|t_F8|t_F9|t_fs|t_IE|t_IS|t_k1|t_K1|t_k2|t_k3|t_K3|t_k4|t_K4|t_k5|t_K5|t_k6|t_K6|t_k7|t_K7|t_k8|t_K8|t_k9|t_K9|t_KA|t_kb|t_kB|t_KB|t_KC|t_kd|t_kD|t_KD|t_ke|t_KE|t_KF|t_KG|t_kh|t_KH|t_kI|t_KI|t_KJ|t_KK|t_kl|t_KL|t_kN|t_kP|t_kr|t_ks|t_ku|t_le|t_mb|t_md|t_me|t_mr|t_ms|t_nd|t_op|t_RI|t_RV|t_Sb|t_se|t_Sf|t_SI|t_so|t_sr|t_te|t_ti|t_ts|t_ue|t_us|t_ut|t_vb|t_ve|t_vi|t_vs|t_WP|t_WS|t_xs|t_ZH|t_ZR)\b/, 'number': /\b(?:0x[\da-f]+|\d+(?:\.\d+)?)\b/i, 'operator': /\|\||&&|[-+.]=?|[=!](?:[=~][#?]?)?|[<>]=?[#?]?|[*\/%?]|\b(?:is(?:not)?)\b/, 'punctuation': /[{}[\](),;:]/ -}; \ No newline at end of file +}; diff --git a/components/prism-vim.min.js b/components/prism-vim.min.js index 9430d15a2e..8a0e126cd1 100644 --- a/components/prism-vim.min.js +++ b/components/prism-vim.min.js @@ -1 +1 @@ -Prism.languages.vim={string:/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\r\n]|'')*'/,comment:/".*/,function:/\w+(?=\()/,keyword:/\b(?:ab|abbreviate|abc|abclear|abo|aboveleft|al|all|arga|argadd|argd|argdelete|argdo|arge|argedit|argg|argglobal|argl|arglocal|ar|args|argu|argument|as|ascii|bad|badd|ba|ball|bd|bdelete|be|bel|belowright|bf|bfirst|bl|blast|bm|bmodified|bn|bnext|bN|bNext|bo|botright|bp|bprevious|brea|break|breaka|breakadd|breakd|breakdel|breakl|breaklist|br|brewind|bro|browse|bufdo|b|buffer|buffers|bun|bunload|bw|bwipeout|ca|cabbrev|cabc|cabclear|caddb|caddbuffer|cad|caddexpr|caddf|caddfile|cal|call|cat|catch|cb|cbuffer|cc|ccl|cclose|cd|ce|center|cex|cexpr|cf|cfile|cfir|cfirst|cgetb|cgetbuffer|cgete|cgetexpr|cg|cgetfile|c|change|changes|chd|chdir|che|checkpath|checkt|checktime|cla|clast|cl|clist|clo|close|cmapc|cmapclear|cnew|cnewer|cn|cnext|cN|cNext|cnf|cnfile|cNfcNfile|cnorea|cnoreabbrev|col|colder|colo|colorscheme|comc|comclear|comp|compiler|conf|confirm|con|continue|cope|copen|co|copy|cpf|cpfile|cp|cprevious|cq|cquit|cr|crewind|cuna|cunabbrev|cu|cunmap|cw|cwindow|debugg|debuggreedy|delc|delcommand|d|delete|delf|delfunction|delm|delmarks|diffg|diffget|diffoff|diffpatch|diffpu|diffput|diffsplit|diffthis|diffu|diffupdate|dig|digraphs|di|display|dj|djump|dl|dlist|dr|drop|ds|dsearch|dsp|dsplit|earlier|echoe|echoerr|echom|echomsg|echon|e|edit|el|else|elsei|elseif|em|emenu|endfo|endfor|endf|endfunction|endfun|en|endif|endt|endtry|endw|endwhile|ene|enew|ex|exi|exit|exu|exusage|f|file|files|filetype|fina|finally|fin|find|fini|finish|fir|first|fix|fixdel|fo|fold|foldc|foldclose|folddoc|folddoclosed|foldd|folddoopen|foldo|foldopen|for|fu|fun|function|go|goto|gr|grep|grepa|grepadd|ha|hardcopy|h|help|helpf|helpfind|helpg|helpgrep|helpt|helptags|hid|hide|his|history|ia|iabbrev|iabc|iabclear|if|ij|ijump|il|ilist|imapc|imapclear|in|inorea|inoreabbrev|isearch|isp|isplit|iuna|iunabbrev|iu|iunmap|j|join|ju|jumps|k|keepalt|keepj|keepjumps|kee|keepmarks|laddb|laddbuffer|lad|laddexpr|laddf|laddfile|lan|language|la|last|later|lb|lbuffer|lc|lcd|lch|lchdir|lcl|lclose|let|left|lefta|leftabove|lex|lexpr|lf|lfile|lfir|lfirst|lgetb|lgetbuffer|lgete|lgetexpr|lg|lgetfile|lgr|lgrep|lgrepa|lgrepadd|lh|lhelpgrep|l|list|ll|lla|llast|lli|llist|lmak|lmake|lm|lmap|lmapc|lmapclear|lnew|lnewer|lne|lnext|lN|lNext|lnf|lnfile|lNf|lNfile|ln|lnoremap|lo|loadview|loc|lockmarks|lockv|lockvar|lol|lolder|lop|lopen|lpf|lpfile|lp|lprevious|lr|lrewind|ls|lt|ltag|lu|lunmap|lv|lvimgrep|lvimgrepa|lvimgrepadd|lw|lwindow|mak|make|ma|mark|marks|mat|match|menut|menutranslate|mk|mkexrc|mks|mksession|mksp|mkspell|mkvie|mkview|mkv|mkvimrc|mod|mode|m|move|mzf|mzfile|mz|mzscheme|nbkey|new|n|next|N|Next|nmapc|nmapclear|noh|nohlsearch|norea|noreabbrev|nu|number|nun|nunmap|omapc|omapclear|on|only|o|open|opt|options|ou|ounmap|pc|pclose|ped|pedit|pe|perl|perld|perldo|po|pop|popu|popup|pp|ppop|pre|preserve|prev|previous|p|print|P|Print|profd|profdel|prof|profile|promptf|promptfind|promptr|promptrepl|ps|psearch|pta|ptag|ptf|ptfirst|ptj|ptjump|ptl|ptlast|ptn|ptnext|ptN|ptNext|ptp|ptprevious|ptr|ptrewind|pts|ptselect|pu|put|pw|pwd|pyf|pyfile|py|python|qa|qall|q|quit|quita|quitall|r|read|rec|recover|redi|redir|red|redo|redr|redraw|redraws|redrawstatus|reg|registers|res|resize|ret|retab|retu|return|rew|rewind|ri|right|rightb|rightbelow|rub|ruby|rubyd|rubydo|rubyf|rubyfile|ru|runtime|rv|rviminfo|sal|sall|san|sandbox|sa|sargument|sav|saveas|sba|sball|sbf|sbfirst|sbl|sblast|sbm|sbmodified|sbn|sbnext|sbN|sbNext|sbp|sbprevious|sbr|sbrewind|sb|sbuffer|scripte|scriptencoding|scrip|scriptnames|se|set|setf|setfiletype|setg|setglobal|setl|setlocal|sf|sfind|sfir|sfirst|sh|shell|sign|sil|silent|sim|simalt|sla|slast|sl|sleep|sm|smagic|sm|smap|smapc|smapclear|sme|smenu|sn|snext|sN|sNext|sni|sniff|sno|snomagic|snor|snoremap|snoreme|snoremenu|sor|sort|so|source|spelld|spelldump|spe|spellgood|spelli|spellinfo|spellr|spellrepall|spellu|spellundo|spellw|spellwrong|sp|split|spr|sprevious|sre|srewind|sta|stag|startg|startgreplace|star|startinsert|startr|startreplace|stj|stjump|st|stop|stopi|stopinsert|sts|stselect|sun|sunhide|sunm|sunmap|sus|suspend|sv|sview|syncbind|t|tab|tabc|tabclose|tabd|tabdo|tabe|tabedit|tabf|tabfind|tabfir|tabfirst|tabl|tablast|tabm|tabmove|tabnew|tabn|tabnext|tabN|tabNext|tabo|tabonly|tabp|tabprevious|tabr|tabrewind|tabs|ta|tag|tags|tc|tcl|tcld|tcldo|tclf|tclfile|te|tearoff|tf|tfirst|th|throw|tj|tjump|tl|tlast|tm|tm|tmenu|tn|tnext|tN|tNext|to|topleft|tp|tprevious|tr|trewind|try|ts|tselect|tu|tu|tunmenu|una|unabbreviate|u|undo|undoj|undojoin|undol|undolist|unh|unhide|unlet|unlo|unlockvar|unm|unmap|up|update|verb|verbose|ve|version|vert|vertical|vie|view|vim|vimgrep|vimgrepa|vimgrepadd|vi|visual|viu|viusage|vmapc|vmapclear|vne|vnew|vs|vsplit|vu|vunmap|wa|wall|wh|while|winc|wincmd|windo|winp|winpos|win|winsize|wn|wnext|wN|wNext|wp|wprevious|wq|wqa|wqall|w|write|ws|wsverb|wv|wviminfo|X|xa|xall|x|xit|xm|xmap|xmapc|xmapclear|xme|xmenu|XMLent|XMLns|xn|xnoremap|xnoreme|xnoremenu|xu|xunmap|y|yank)\b/,builtin:/\b(?:autocmd|acd|ai|akm|aleph|allowrevins|altkeymap|ambiwidth|ambw|anti|antialias|arab|arabic|arabicshape|ari|arshape|autochdir|autoindent|autoread|autowrite|autowriteall|aw|awa|background|backspace|backup|backupcopy|backupdir|backupext|backupskip|balloondelay|ballooneval|balloonexpr|bdir|bdlay|beval|bex|bexpr|bg|bh|bin|binary|biosk|bioskey|bk|bkc|bomb|breakat|brk|browsedir|bs|bsdir|bsk|bt|bufhidden|buflisted|buftype|casemap|ccv|cdpath|cedit|cfu|ch|charconvert|ci|cin|cindent|cink|cinkeys|cino|cinoptions|cinw|cinwords|clipboard|cmdheight|cmdwinheight|cmp|cms|columns|com|comments|commentstring|compatible|complete|completefunc|completeopt|consk|conskey|copyindent|cot|cpo|cpoptions|cpt|cscopepathcomp|cscopeprg|cscopequickfix|cscopetag|cscopetagorder|cscopeverbose|cspc|csprg|csqf|cst|csto|csverb|cuc|cul|cursorcolumn|cursorline|cwh|debug|deco|def|define|delcombine|dex|dg|dict|dictionary|diff|diffexpr|diffopt|digraph|dip|dir|directory|dy|ea|ead|eadirection|eb|ed|edcompatible|ef|efm|ei|ek|enc|encoding|endofline|eol|ep|equalalways|equalprg|errorbells|errorfile|errorformat|esckeys|et|eventignore|expandtab|exrc|fcl|fcs|fdc|fde|fdi|fdl|fdls|fdm|fdn|fdo|fdt|fen|fenc|fencs|fex|ff|ffs|fileencoding|fileencodings|fileformat|fileformats|fillchars|fk|fkmap|flp|fml|fmr|foldcolumn|foldenable|foldexpr|foldignore|foldlevel|foldlevelstart|foldmarker|foldmethod|foldminlines|foldnestmax|foldtext|formatexpr|formatlistpat|formatoptions|formatprg|fp|fs|fsync|ft|gcr|gd|gdefault|gfm|gfn|gfs|gfw|ghr|gp|grepformat|grepprg|gtl|gtt|guicursor|guifont|guifontset|guifontwide|guiheadroom|guioptions|guipty|guitablabel|guitabtooltip|helpfile|helpheight|helplang|hf|hh|hi|hidden|highlight|hk|hkmap|hkmapp|hkp|hl|hlg|hls|hlsearch|ic|icon|iconstring|ignorecase|im|imactivatekey|imak|imc|imcmdline|imd|imdisable|imi|iminsert|ims|imsearch|inc|include|includeexpr|incsearch|inde|indentexpr|indentkeys|indk|inex|inf|infercase|insertmode|isf|isfname|isi|isident|isk|iskeyword|isprint|joinspaces|js|key|keymap|keymodel|keywordprg|km|kmp|kp|langmap|langmenu|laststatus|lazyredraw|lbr|lcs|linebreak|lines|linespace|lisp|lispwords|listchars|loadplugins|lpl|lsp|lz|macatsui|magic|makeef|makeprg|matchpairs|matchtime|maxcombine|maxfuncdepth|maxmapdepth|maxmem|maxmempattern|maxmemtot|mco|mef|menuitems|mfd|mh|mis|mkspellmem|ml|mls|mm|mmd|mmp|mmt|modeline|modelines|modifiable|modified|more|mouse|mousef|mousefocus|mousehide|mousem|mousemodel|mouses|mouseshape|mouset|mousetime|mp|mps|msm|mzq|mzquantum|nf|nrformats|numberwidth|nuw|odev|oft|ofu|omnifunc|opendevice|operatorfunc|opfunc|osfiletype|pa|para|paragraphs|paste|pastetoggle|patchexpr|patchmode|path|pdev|penc|pex|pexpr|pfn|ph|pheader|pi|pm|pmbcs|pmbfn|popt|preserveindent|previewheight|previewwindow|printdevice|printencoding|printexpr|printfont|printheader|printmbcharset|printmbfont|printoptions|prompt|pt|pumheight|pvh|pvw|qe|quoteescape|readonly|remap|report|restorescreen|revins|rightleft|rightleftcmd|rl|rlc|ro|rs|rtp|ruf|ruler|rulerformat|runtimepath|sbo|sc|scb|scr|scroll|scrollbind|scrolljump|scrolloff|scrollopt|scs|sect|sections|secure|sel|selection|selectmode|sessionoptions|sft|shcf|shellcmdflag|shellpipe|shellquote|shellredir|shellslash|shelltemp|shelltype|shellxquote|shiftround|shiftwidth|shm|shortmess|shortname|showbreak|showcmd|showfulltag|showmatch|showmode|showtabline|shq|si|sidescroll|sidescrolloff|siso|sj|slm|smartcase|smartindent|smarttab|smc|smd|softtabstop|sol|spc|spell|spellcapcheck|spellfile|spelllang|spellsuggest|spf|spl|splitbelow|splitright|sps|sr|srr|ss|ssl|ssop|stal|startofline|statusline|stl|stmp|su|sua|suffixes|suffixesadd|sw|swapfile|swapsync|swb|swf|switchbuf|sws|sxq|syn|synmaxcol|syntax|tabline|tabpagemax|tabstop|tagbsearch|taglength|tagrelative|tagstack|tal|tb|tbi|tbidi|tbis|tbs|tenc|term|termbidi|termencoding|terse|textauto|textmode|textwidth|tgst|thesaurus|tildeop|timeout|timeoutlen|title|titlelen|titleold|titlestring|toolbar|toolbariconsize|top|tpm|tsl|tsr|ttimeout|ttimeoutlen|ttm|tty|ttybuiltin|ttyfast|ttym|ttymouse|ttyscroll|ttytype|tw|tx|uc|ul|undolevels|updatecount|updatetime|ut|vb|vbs|vdir|verbosefile|vfile|viewdir|viewoptions|viminfo|virtualedit|visualbell|vop|wak|warn|wb|wc|wcm|wd|weirdinvert|wfh|wfw|whichwrap|wi|wig|wildchar|wildcharm|wildignore|wildmenu|wildmode|wildoptions|wim|winaltkeys|window|winfixheight|winfixwidth|winheight|winminheight|winminwidth|winwidth|wiv|wiw|wm|wmh|wmnu|wmw|wop|wrap|wrapmargin|wrapscan|writeany|writebackup|writedelay|ww|noacd|noai|noakm|noallowrevins|noaltkeymap|noanti|noantialias|noar|noarab|noarabic|noarabicshape|noari|noarshape|noautochdir|noautoindent|noautoread|noautowrite|noautowriteall|noaw|noawa|nobackup|noballooneval|nobeval|nobin|nobinary|nobiosk|nobioskey|nobk|nobl|nobomb|nobuflisted|nocf|noci|nocin|nocindent|nocompatible|noconfirm|noconsk|noconskey|nocopyindent|nocp|nocscopetag|nocscopeverbose|nocst|nocsverb|nocuc|nocul|nocursorcolumn|nocursorline|nodeco|nodelcombine|nodg|nodiff|nodigraph|nodisable|noea|noeb|noed|noedcompatible|noek|noendofline|noeol|noequalalways|noerrorbells|noesckeys|noet|noex|noexpandtab|noexrc|nofen|nofk|nofkmap|nofoldenable|nogd|nogdefault|noguipty|nohid|nohidden|nohk|nohkmap|nohkmapp|nohkp|nohls|noic|noicon|noignorecase|noim|noimc|noimcmdline|noimd|noincsearch|noinf|noinfercase|noinsertmode|nois|nojoinspaces|nojs|nolazyredraw|nolbr|nolinebreak|nolisp|nolist|noloadplugins|nolpl|nolz|noma|nomacatsui|nomagic|nomh|noml|nomod|nomodeline|nomodifiable|nomodified|nomore|nomousef|nomousefocus|nomousehide|nonu|nonumber|noodev|noopendevice|nopaste|nopi|nopreserveindent|nopreviewwindow|noprompt|nopvw|noreadonly|noremap|norestorescreen|norevins|nori|norightleft|norightleftcmd|norl|norlc|noro|nors|noru|noruler|nosb|nosc|noscb|noscrollbind|noscs|nosecure|nosft|noshellslash|noshelltemp|noshiftround|noshortname|noshowcmd|noshowfulltag|noshowmatch|noshowmode|nosi|nosm|nosmartcase|nosmartindent|nosmarttab|nosmd|nosn|nosol|nospell|nosplitbelow|nosplitright|nospr|nosr|nossl|nosta|nostartofline|nostmp|noswapfile|noswf|nota|notagbsearch|notagrelative|notagstack|notbi|notbidi|notbs|notermbidi|noterse|notextauto|notextmode|notf|notgst|notildeop|notimeout|notitle|noto|notop|notr|nottimeout|nottybuiltin|nottyfast|notx|novb|novisualbell|nowa|nowarn|nowb|noweirdinvert|nowfh|nowfw|nowildmenu|nowinfixheight|nowinfixwidth|nowiv|nowmnu|nowrap|nowrapscan|nowrite|nowriteany|nowritebackup|nows|invacd|invai|invakm|invallowrevins|invaltkeymap|invanti|invantialias|invar|invarab|invarabic|invarabicshape|invari|invarshape|invautochdir|invautoindent|invautoread|invautowrite|invautowriteall|invaw|invawa|invbackup|invballooneval|invbeval|invbin|invbinary|invbiosk|invbioskey|invbk|invbl|invbomb|invbuflisted|invcf|invci|invcin|invcindent|invcompatible|invconfirm|invconsk|invconskey|invcopyindent|invcp|invcscopetag|invcscopeverbose|invcst|invcsverb|invcuc|invcul|invcursorcolumn|invcursorline|invdeco|invdelcombine|invdg|invdiff|invdigraph|invdisable|invea|inveb|inved|invedcompatible|invek|invendofline|inveol|invequalalways|inverrorbells|invesckeys|invet|invex|invexpandtab|invexrc|invfen|invfk|invfkmap|invfoldenable|invgd|invgdefault|invguipty|invhid|invhidden|invhk|invhkmap|invhkmapp|invhkp|invhls|invhlsearch|invic|invicon|invignorecase|invim|invimc|invimcmdline|invimd|invincsearch|invinf|invinfercase|invinsertmode|invis|invjoinspaces|invjs|invlazyredraw|invlbr|invlinebreak|invlisp|invlist|invloadplugins|invlpl|invlz|invma|invmacatsui|invmagic|invmh|invml|invmod|invmodeline|invmodifiable|invmodified|invmore|invmousef|invmousefocus|invmousehide|invnu|invnumber|invodev|invopendevice|invpaste|invpi|invpreserveindent|invpreviewwindow|invprompt|invpvw|invreadonly|invremap|invrestorescreen|invrevins|invri|invrightleft|invrightleftcmd|invrl|invrlc|invro|invrs|invru|invruler|invsb|invsc|invscb|invscrollbind|invscs|invsecure|invsft|invshellslash|invshelltemp|invshiftround|invshortname|invshowcmd|invshowfulltag|invshowmatch|invshowmode|invsi|invsm|invsmartcase|invsmartindent|invsmarttab|invsmd|invsn|invsol|invspell|invsplitbelow|invsplitright|invspr|invsr|invssl|invsta|invstartofline|invstmp|invswapfile|invswf|invta|invtagbsearch|invtagrelative|invtagstack|invtbi|invtbidi|invtbs|invtermbidi|invterse|invtextauto|invtextmode|invtf|invtgst|invtildeop|invtimeout|invtitle|invto|invtop|invtr|invttimeout|invttybuiltin|invttyfast|invtx|invvb|invvisualbell|invwa|invwarn|invwb|invweirdinvert|invwfh|invwfw|invwildmenu|invwinfixheight|invwinfixwidth|invwiv|invwmnu|invwrap|invwrapscan|invwrite|invwriteany|invwritebackup|invws|t_AB|t_AF|t_al|t_AL|t_bc|t_cd|t_ce|t_Ce|t_cl|t_cm|t_Co|t_cs|t_Cs|t_CS|t_CV|t_da|t_db|t_dl|t_DL|t_EI|t_F1|t_F2|t_F3|t_F4|t_F5|t_F6|t_F7|t_F8|t_F9|t_fs|t_IE|t_IS|t_k1|t_K1|t_k2|t_k3|t_K3|t_k4|t_K4|t_k5|t_K5|t_k6|t_K6|t_k7|t_K7|t_k8|t_K8|t_k9|t_K9|t_KA|t_kb|t_kB|t_KB|t_KC|t_kd|t_kD|t_KD|t_ke|t_KE|t_KF|t_KG|t_kh|t_KH|t_kI|t_KI|t_KJ|t_KK|t_kl|t_KL|t_kN|t_kP|t_kr|t_ks|t_ku|t_le|t_mb|t_md|t_me|t_mr|t_ms|t_nd|t_op|t_RI|t_RV|t_Sb|t_se|t_Sf|t_SI|t_so|t_sr|t_te|t_ti|t_ts|t_ue|t_us|t_ut|t_vb|t_ve|t_vi|t_vs|t_WP|t_WS|t_xs|t_ZH|t_ZR)\b/,number:/\b(?:0x[\da-f]+|\d+(?:\.\d+)?)\b/i,operator:/\|\||&&|[-+.]=?|[=!](?:[=~][#?]?)?|[<>]=?[#?]?|[*\/%?]|\b(?:is(?:not)?)\b/,punctuation:/[{}[\](),;:]/}; \ No newline at end of file +Prism.languages.vim={string:/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\r\n]|'')*'/,comment:/".*/,function:/\w+(?=\()/,keyword:/\b(?:ab|abbreviate|abc|abclear|abo|aboveleft|al|all|arga|argadd|argd|argdelete|argdo|arge|argedit|argg|argglobal|argl|arglocal|ar|args|argu|argument|as|ascii|bad|badd|ba|ball|bd|bdelete|be|bel|belowright|bf|bfirst|bl|blast|bm|bmodified|bn|bnext|bN|bNext|bo|botright|bp|bprevious|brea|break|breaka|breakadd|breakd|breakdel|breakl|breaklist|br|brewind|bro|browse|bufdo|b|buffer|buffers|bun|bunload|bw|bwipeout|ca|cabbrev|cabc|cabclear|caddb|caddbuffer|cad|caddexpr|caddf|caddfile|cal|call|cat|catch|cb|cbuffer|cc|ccl|cclose|cd|ce|center|cex|cexpr|cf|cfile|cfir|cfirst|cgetb|cgetbuffer|cgete|cgetexpr|cg|cgetfile|c|change|changes|chd|chdir|che|checkpath|checkt|checktime|cla|clast|cl|clist|clo|close|cmapc|cmapclear|cnew|cnewer|cn|cnext|cN|cNext|cnf|cnfile|cNfcNfile|cnorea|cnoreabbrev|col|colder|colo|colorscheme|comc|comclear|comp|compiler|conf|confirm|con|continue|cope|copen|co|copy|cpf|cpfile|cp|cprevious|cq|cquit|cr|crewind|cuna|cunabbrev|cu|cunmap|cw|cwindow|debugg|debuggreedy|delc|delcommand|d|delete|delf|delfunction|delm|delmarks|diffg|diffget|diffoff|diffpatch|diffpu|diffput|diffsplit|diffthis|diffu|diffupdate|dig|digraphs|di|display|dj|djump|dl|dlist|dr|drop|ds|dsearch|dsp|dsplit|earlier|echoe|echoerr|echom|echomsg|echon|e|edit|el|else|elsei|elseif|em|emenu|endfo|endfor|endf|endfunction|endfun|en|endif|endt|endtry|endw|endwhile|ene|enew|ex|exi|exit|exu|exusage|f|file|files|filetype|fina|finally|fin|find|fini|finish|fir|first|fix|fixdel|fo|fold|foldc|foldclose|folddoc|folddoclosed|foldd|folddoopen|foldo|foldopen|for|fu|fun|function|go|goto|gr|grep|grepa|grepadd|ha|hardcopy|h|help|helpf|helpfind|helpg|helpgrep|helpt|helptags|hid|hide|his|history|ia|iabbrev|iabc|iabclear|if|ij|ijump|il|ilist|imapc|imapclear|in|inorea|inoreabbrev|isearch|isp|isplit|iuna|iunabbrev|iu|iunmap|j|join|ju|jumps|k|keepalt|keepj|keepjumps|kee|keepmarks|laddb|laddbuffer|lad|laddexpr|laddf|laddfile|lan|language|la|last|later|lb|lbuffer|lc|lcd|lch|lchdir|lcl|lclose|let|left|lefta|leftabove|lex|lexpr|lf|lfile|lfir|lfirst|lgetb|lgetbuffer|lgete|lgetexpr|lg|lgetfile|lgr|lgrep|lgrepa|lgrepadd|lh|lhelpgrep|l|list|ll|lla|llast|lli|llist|lmak|lmake|lm|lmap|lmapc|lmapclear|lnew|lnewer|lne|lnext|lN|lNext|lnf|lnfile|lNf|lNfile|ln|lnoremap|lo|loadview|loc|lockmarks|lockv|lockvar|lol|lolder|lop|lopen|lpf|lpfile|lp|lprevious|lr|lrewind|ls|lt|ltag|lu|lunmap|lv|lvimgrep|lvimgrepa|lvimgrepadd|lw|lwindow|mak|make|ma|mark|marks|mat|match|menut|menutranslate|mk|mkexrc|mks|mksession|mksp|mkspell|mkvie|mkview|mkv|mkvimrc|mod|mode|m|move|mzf|mzfile|mz|mzscheme|nbkey|new|n|next|N|Next|nmapc|nmapclear|noh|nohlsearch|norea|noreabbrev|nu|number|nun|nunmap|omapc|omapclear|on|only|o|open|opt|options|ou|ounmap|pc|pclose|ped|pedit|pe|perl|perld|perldo|po|pop|popu|popup|pp|ppop|pre|preserve|prev|previous|p|print|P|Print|profd|profdel|prof|profile|promptf|promptfind|promptr|promptrepl|ps|psearch|pta|ptag|ptf|ptfirst|ptj|ptjump|ptl|ptlast|ptn|ptnext|ptN|ptNext|ptp|ptprevious|ptr|ptrewind|pts|ptselect|pu|put|pw|pwd|pyf|pyfile|py|python|qa|qall|q|quit|quita|quitall|r|read|rec|recover|redi|redir|red|redo|redr|redraw|redraws|redrawstatus|reg|registers|res|resize|ret|retab|retu|return|rew|rewind|ri|right|rightb|rightbelow|rub|ruby|rubyd|rubydo|rubyf|rubyfile|ru|runtime|rv|rviminfo|sal|sall|san|sandbox|sa|sargument|sav|saveas|sba|sball|sbf|sbfirst|sbl|sblast|sbm|sbmodified|sbn|sbnext|sbN|sbNext|sbp|sbprevious|sbr|sbrewind|sb|sbuffer|scripte|scriptencoding|scrip|scriptnames|se|set|setf|setfiletype|setg|setglobal|setl|setlocal|sf|sfind|sfir|sfirst|sh|shell|sign|sil|silent|sim|simalt|sla|slast|sl|sleep|sm|smagic|smap|smapc|smapclear|sme|smenu|sn|snext|sN|sNext|sni|sniff|sno|snomagic|snor|snoremap|snoreme|snoremenu|sor|sort|so|source|spelld|spelldump|spe|spellgood|spelli|spellinfo|spellr|spellrepall|spellu|spellundo|spellw|spellwrong|sp|split|spr|sprevious|sre|srewind|sta|stag|startg|startgreplace|star|startinsert|startr|startreplace|stj|stjump|st|stop|stopi|stopinsert|sts|stselect|sun|sunhide|sunm|sunmap|sus|suspend|sv|sview|syncbind|t|tab|tabc|tabclose|tabd|tabdo|tabe|tabedit|tabf|tabfind|tabfir|tabfirst|tabl|tablast|tabm|tabmove|tabnew|tabn|tabnext|tabN|tabNext|tabo|tabonly|tabp|tabprevious|tabr|tabrewind|tabs|ta|tag|tags|tc|tcl|tcld|tcldo|tclf|tclfile|te|tearoff|tf|tfirst|th|throw|tj|tjump|tl|tlast|tm|tmenu|tn|tnext|tN|tNext|to|topleft|tp|tprevious|tr|trewind|try|ts|tselect|tu|tunmenu|una|unabbreviate|u|undo|undoj|undojoin|undol|undolist|unh|unhide|unlet|unlo|unlockvar|unm|unmap|up|update|verb|verbose|ve|version|vert|vertical|vie|view|vim|vimgrep|vimgrepa|vimgrepadd|vi|visual|viu|viusage|vmapc|vmapclear|vne|vnew|vs|vsplit|vu|vunmap|wa|wall|wh|while|winc|wincmd|windo|winp|winpos|win|winsize|wn|wnext|wN|wNext|wp|wprevious|wq|wqa|wqall|w|write|ws|wsverb|wv|wviminfo|X|xa|xall|x|xit|xm|xmap|xmapc|xmapclear|xme|xmenu|XMLent|XMLns|xn|xnoremap|xnoreme|xnoremenu|xu|xunmap|y|yank)\b/,builtin:/\b(?:autocmd|acd|ai|akm|aleph|allowrevins|altkeymap|ambiwidth|ambw|anti|antialias|arab|arabic|arabicshape|ari|arshape|autochdir|autoindent|autoread|autowrite|autowriteall|aw|awa|background|backspace|backup|backupcopy|backupdir|backupext|backupskip|balloondelay|ballooneval|balloonexpr|bdir|bdlay|beval|bex|bexpr|bg|bh|bin|binary|biosk|bioskey|bk|bkc|bomb|breakat|brk|browsedir|bs|bsdir|bsk|bt|bufhidden|buflisted|buftype|casemap|ccv|cdpath|cedit|cfu|ch|charconvert|ci|cin|cindent|cink|cinkeys|cino|cinoptions|cinw|cinwords|clipboard|cmdheight|cmdwinheight|cmp|cms|columns|com|comments|commentstring|compatible|complete|completefunc|completeopt|consk|conskey|copyindent|cot|cpo|cpoptions|cpt|cscopepathcomp|cscopeprg|cscopequickfix|cscopetag|cscopetagorder|cscopeverbose|cspc|csprg|csqf|cst|csto|csverb|cuc|cul|cursorcolumn|cursorline|cwh|debug|deco|def|define|delcombine|dex|dg|dict|dictionary|diff|diffexpr|diffopt|digraph|dip|dir|directory|dy|ea|ead|eadirection|eb|ed|edcompatible|ef|efm|ei|ek|enc|encoding|endofline|eol|ep|equalalways|equalprg|errorbells|errorfile|errorformat|esckeys|et|eventignore|expandtab|exrc|fcl|fcs|fdc|fde|fdi|fdl|fdls|fdm|fdn|fdo|fdt|fen|fenc|fencs|fex|ff|ffs|fileencoding|fileencodings|fileformat|fileformats|fillchars|fk|fkmap|flp|fml|fmr|foldcolumn|foldenable|foldexpr|foldignore|foldlevel|foldlevelstart|foldmarker|foldmethod|foldminlines|foldnestmax|foldtext|formatexpr|formatlistpat|formatoptions|formatprg|fp|fs|fsync|ft|gcr|gd|gdefault|gfm|gfn|gfs|gfw|ghr|gp|grepformat|grepprg|gtl|gtt|guicursor|guifont|guifontset|guifontwide|guiheadroom|guioptions|guipty|guitablabel|guitabtooltip|helpfile|helpheight|helplang|hf|hh|hi|hidden|highlight|hk|hkmap|hkmapp|hkp|hl|hlg|hls|hlsearch|ic|icon|iconstring|ignorecase|im|imactivatekey|imak|imc|imcmdline|imd|imdisable|imi|iminsert|ims|imsearch|inc|include|includeexpr|incsearch|inde|indentexpr|indentkeys|indk|inex|inf|infercase|insertmode|isf|isfname|isi|isident|isk|iskeyword|isprint|joinspaces|js|key|keymap|keymodel|keywordprg|km|kmp|kp|langmap|langmenu|laststatus|lazyredraw|lbr|lcs|linebreak|lines|linespace|lisp|lispwords|listchars|loadplugins|lpl|lsp|lz|macatsui|magic|makeef|makeprg|matchpairs|matchtime|maxcombine|maxfuncdepth|maxmapdepth|maxmem|maxmempattern|maxmemtot|mco|mef|menuitems|mfd|mh|mis|mkspellmem|ml|mls|mm|mmd|mmp|mmt|modeline|modelines|modifiable|modified|more|mouse|mousef|mousefocus|mousehide|mousem|mousemodel|mouses|mouseshape|mouset|mousetime|mp|mps|msm|mzq|mzquantum|nf|nrformats|numberwidth|nuw|odev|oft|ofu|omnifunc|opendevice|operatorfunc|opfunc|osfiletype|pa|para|paragraphs|paste|pastetoggle|patchexpr|patchmode|path|pdev|penc|pex|pexpr|pfn|ph|pheader|pi|pm|pmbcs|pmbfn|popt|preserveindent|previewheight|previewwindow|printdevice|printencoding|printexpr|printfont|printheader|printmbcharset|printmbfont|printoptions|prompt|pt|pumheight|pvh|pvw|qe|quoteescape|readonly|remap|report|restorescreen|revins|rightleft|rightleftcmd|rl|rlc|ro|rs|rtp|ruf|ruler|rulerformat|runtimepath|sbo|sc|scb|scr|scroll|scrollbind|scrolljump|scrolloff|scrollopt|scs|sect|sections|secure|sel|selection|selectmode|sessionoptions|sft|shcf|shellcmdflag|shellpipe|shellquote|shellredir|shellslash|shelltemp|shelltype|shellxquote|shiftround|shiftwidth|shm|shortmess|shortname|showbreak|showcmd|showfulltag|showmatch|showmode|showtabline|shq|si|sidescroll|sidescrolloff|siso|sj|slm|smartcase|smartindent|smarttab|smc|smd|softtabstop|sol|spc|spell|spellcapcheck|spellfile|spelllang|spellsuggest|spf|spl|splitbelow|splitright|sps|sr|srr|ss|ssl|ssop|stal|startofline|statusline|stl|stmp|su|sua|suffixes|suffixesadd|sw|swapfile|swapsync|swb|swf|switchbuf|sws|sxq|syn|synmaxcol|syntax|tabline|tabpagemax|tabstop|tagbsearch|taglength|tagrelative|tagstack|tal|tb|tbi|tbidi|tbis|tbs|tenc|term|termbidi|termencoding|terse|textauto|textmode|textwidth|tgst|thesaurus|tildeop|timeout|timeoutlen|title|titlelen|titleold|titlestring|toolbar|toolbariconsize|top|tpm|tsl|tsr|ttimeout|ttimeoutlen|ttm|tty|ttybuiltin|ttyfast|ttym|ttymouse|ttyscroll|ttytype|tw|tx|uc|ul|undolevels|updatecount|updatetime|ut|vb|vbs|vdir|verbosefile|vfile|viewdir|viewoptions|viminfo|virtualedit|visualbell|vop|wak|warn|wb|wc|wcm|wd|weirdinvert|wfh|wfw|whichwrap|wi|wig|wildchar|wildcharm|wildignore|wildmenu|wildmode|wildoptions|wim|winaltkeys|window|winfixheight|winfixwidth|winheight|winminheight|winminwidth|winwidth|wiv|wiw|wm|wmh|wmnu|wmw|wop|wrap|wrapmargin|wrapscan|writeany|writebackup|writedelay|ww|noacd|noai|noakm|noallowrevins|noaltkeymap|noanti|noantialias|noar|noarab|noarabic|noarabicshape|noari|noarshape|noautochdir|noautoindent|noautoread|noautowrite|noautowriteall|noaw|noawa|nobackup|noballooneval|nobeval|nobin|nobinary|nobiosk|nobioskey|nobk|nobl|nobomb|nobuflisted|nocf|noci|nocin|nocindent|nocompatible|noconfirm|noconsk|noconskey|nocopyindent|nocp|nocscopetag|nocscopeverbose|nocst|nocsverb|nocuc|nocul|nocursorcolumn|nocursorline|nodeco|nodelcombine|nodg|nodiff|nodigraph|nodisable|noea|noeb|noed|noedcompatible|noek|noendofline|noeol|noequalalways|noerrorbells|noesckeys|noet|noex|noexpandtab|noexrc|nofen|nofk|nofkmap|nofoldenable|nogd|nogdefault|noguipty|nohid|nohidden|nohk|nohkmap|nohkmapp|nohkp|nohls|noic|noicon|noignorecase|noim|noimc|noimcmdline|noimd|noincsearch|noinf|noinfercase|noinsertmode|nois|nojoinspaces|nojs|nolazyredraw|nolbr|nolinebreak|nolisp|nolist|noloadplugins|nolpl|nolz|noma|nomacatsui|nomagic|nomh|noml|nomod|nomodeline|nomodifiable|nomodified|nomore|nomousef|nomousefocus|nomousehide|nonu|nonumber|noodev|noopendevice|nopaste|nopi|nopreserveindent|nopreviewwindow|noprompt|nopvw|noreadonly|noremap|norestorescreen|norevins|nori|norightleft|norightleftcmd|norl|norlc|noro|nors|noru|noruler|nosb|nosc|noscb|noscrollbind|noscs|nosecure|nosft|noshellslash|noshelltemp|noshiftround|noshortname|noshowcmd|noshowfulltag|noshowmatch|noshowmode|nosi|nosm|nosmartcase|nosmartindent|nosmarttab|nosmd|nosn|nosol|nospell|nosplitbelow|nosplitright|nospr|nosr|nossl|nosta|nostartofline|nostmp|noswapfile|noswf|nota|notagbsearch|notagrelative|notagstack|notbi|notbidi|notbs|notermbidi|noterse|notextauto|notextmode|notf|notgst|notildeop|notimeout|notitle|noto|notop|notr|nottimeout|nottybuiltin|nottyfast|notx|novb|novisualbell|nowa|nowarn|nowb|noweirdinvert|nowfh|nowfw|nowildmenu|nowinfixheight|nowinfixwidth|nowiv|nowmnu|nowrap|nowrapscan|nowrite|nowriteany|nowritebackup|nows|invacd|invai|invakm|invallowrevins|invaltkeymap|invanti|invantialias|invar|invarab|invarabic|invarabicshape|invari|invarshape|invautochdir|invautoindent|invautoread|invautowrite|invautowriteall|invaw|invawa|invbackup|invballooneval|invbeval|invbin|invbinary|invbiosk|invbioskey|invbk|invbl|invbomb|invbuflisted|invcf|invci|invcin|invcindent|invcompatible|invconfirm|invconsk|invconskey|invcopyindent|invcp|invcscopetag|invcscopeverbose|invcst|invcsverb|invcuc|invcul|invcursorcolumn|invcursorline|invdeco|invdelcombine|invdg|invdiff|invdigraph|invdisable|invea|inveb|inved|invedcompatible|invek|invendofline|inveol|invequalalways|inverrorbells|invesckeys|invet|invex|invexpandtab|invexrc|invfen|invfk|invfkmap|invfoldenable|invgd|invgdefault|invguipty|invhid|invhidden|invhk|invhkmap|invhkmapp|invhkp|invhls|invhlsearch|invic|invicon|invignorecase|invim|invimc|invimcmdline|invimd|invincsearch|invinf|invinfercase|invinsertmode|invis|invjoinspaces|invjs|invlazyredraw|invlbr|invlinebreak|invlisp|invlist|invloadplugins|invlpl|invlz|invma|invmacatsui|invmagic|invmh|invml|invmod|invmodeline|invmodifiable|invmodified|invmore|invmousef|invmousefocus|invmousehide|invnu|invnumber|invodev|invopendevice|invpaste|invpi|invpreserveindent|invpreviewwindow|invprompt|invpvw|invreadonly|invremap|invrestorescreen|invrevins|invri|invrightleft|invrightleftcmd|invrl|invrlc|invro|invrs|invru|invruler|invsb|invsc|invscb|invscrollbind|invscs|invsecure|invsft|invshellslash|invshelltemp|invshiftround|invshortname|invshowcmd|invshowfulltag|invshowmatch|invshowmode|invsi|invsm|invsmartcase|invsmartindent|invsmarttab|invsmd|invsn|invsol|invspell|invsplitbelow|invsplitright|invspr|invsr|invssl|invsta|invstartofline|invstmp|invswapfile|invswf|invta|invtagbsearch|invtagrelative|invtagstack|invtbi|invtbidi|invtbs|invtermbidi|invterse|invtextauto|invtextmode|invtf|invtgst|invtildeop|invtimeout|invtitle|invto|invtop|invtr|invttimeout|invttybuiltin|invttyfast|invtx|invvb|invvisualbell|invwa|invwarn|invwb|invweirdinvert|invwfh|invwfw|invwildmenu|invwinfixheight|invwinfixwidth|invwiv|invwmnu|invwrap|invwrapscan|invwrite|invwriteany|invwritebackup|invws|t_AB|t_AF|t_al|t_AL|t_bc|t_cd|t_ce|t_Ce|t_cl|t_cm|t_Co|t_cs|t_Cs|t_CS|t_CV|t_da|t_db|t_dl|t_DL|t_EI|t_F1|t_F2|t_F3|t_F4|t_F5|t_F6|t_F7|t_F8|t_F9|t_fs|t_IE|t_IS|t_k1|t_K1|t_k2|t_k3|t_K3|t_k4|t_K4|t_k5|t_K5|t_k6|t_K6|t_k7|t_K7|t_k8|t_K8|t_k9|t_K9|t_KA|t_kb|t_kB|t_KB|t_KC|t_kd|t_kD|t_KD|t_ke|t_KE|t_KF|t_KG|t_kh|t_KH|t_kI|t_KI|t_KJ|t_KK|t_kl|t_KL|t_kN|t_kP|t_kr|t_ks|t_ku|t_le|t_mb|t_md|t_me|t_mr|t_ms|t_nd|t_op|t_RI|t_RV|t_Sb|t_se|t_Sf|t_SI|t_so|t_sr|t_te|t_ti|t_ts|t_ue|t_us|t_ut|t_vb|t_ve|t_vi|t_vs|t_WP|t_WS|t_xs|t_ZH|t_ZR)\b/,number:/\b(?:0x[\da-f]+|\d+(?:\.\d+)?)\b/i,operator:/\|\||&&|[-+.]=?|[=!](?:[=~][#?]?)?|[<>]=?[#?]?|[*\/%?]|\b(?:is(?:not)?)\b/,punctuation:/[{}[\](),;:]/}; \ No newline at end of file diff --git a/components/prism-warpscript.js b/components/prism-warpscript.js index 75de50dc97..c33df404d9 100644 --- a/components/prism-warpscript.js +++ b/components/prism-warpscript.js @@ -17,5 +17,5 @@ Prism.languages.warpscript = { 'punctuation': /<%|%>|[{}[\]()]/, // Some operators from the "operators" category // https://www.warp10.io/tags/operators - 'operator': /==|&&?|\|\|?|\*\*?|>>>?|<<|==|[<>!~]=?|[-/%^]|\+!?|\b(?:AND|NOT|OR)\b/ + 'operator': /==|&&?|\|\|?|\*\*?|>>>?|<<|[<>!~]=?|[-/%^]|\+!?|\b(?:AND|NOT|OR)\b/ }; diff --git a/components/prism-warpscript.min.js b/components/prism-warpscript.min.js index b5a6a70769..030ea5b781 100644 --- a/components/prism-warpscript.min.js +++ b/components/prism-warpscript.min.js @@ -1 +1 @@ -Prism.languages.warpscript={comment:/#.*|\/\/.*|\/\*[\s\S]*?\*\//,string:{pattern:/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'|<'(?:[^\\']|'(?!>)|\\.)*'>/,greedy:!0},variable:/\$\S+/,macro:{pattern:/@\S+/,alias:"property"},keyword:/\b(?:BREAK|CHECKMACRO|CONTINUE|CUDF|DEFINED|DEFINEDMACRO|EVAL|FAIL|FOR|FOREACH|FORSTEP|IFT|IFTE|MSGFAIL|NRETURN|RETHROW|RETURN|SWITCH|TRY|UDF|UNTIL|WHILE)\b/,number:/[+-]?\b(?:NaN|Infinity|\d+(?:\.\d*)?(?:[Ee][+-]?\d+)?|0x[\da-fA-F]+|0b[01]+)\b/,boolean:/\b(?:false|true|F|T)\b/,punctuation:/<%|%>|[{}[\]()]/,operator:/==|&&?|\|\|?|\*\*?|>>>?|<<|==|[<>!~]=?|[-/%^]|\+!?|\b(?:AND|NOT|OR)\b/}; \ No newline at end of file +Prism.languages.warpscript={comment:/#.*|\/\/.*|\/\*[\s\S]*?\*\//,string:{pattern:/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'|<'(?:[^\\']|'(?!>)|\\.)*'>/,greedy:!0},variable:/\$\S+/,macro:{pattern:/@\S+/,alias:"property"},keyword:/\b(?:BREAK|CHECKMACRO|CONTINUE|CUDF|DEFINED|DEFINEDMACRO|EVAL|FAIL|FOR|FOREACH|FORSTEP|IFT|IFTE|MSGFAIL|NRETURN|RETHROW|RETURN|SWITCH|TRY|UDF|UNTIL|WHILE)\b/,number:/[+-]?\b(?:NaN|Infinity|\d+(?:\.\d*)?(?:[Ee][+-]?\d+)?|0x[\da-fA-F]+|0b[01]+)\b/,boolean:/\b(?:false|true|F|T)\b/,punctuation:/<%|%>|[{}[\]()]/,operator:/==|&&?|\|\|?|\*\*?|>>>?|<<|[<>!~]=?|[-/%^]|\+!?|\b(?:AND|NOT|OR)\b/}; \ No newline at end of file From e4f6ccace9207c36a15b1f9df0093e9b5b48468a Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Sun, 30 Aug 2020 15:08:38 +0200 Subject: [PATCH 0625/1100] Scheme: Added support for R7RS syntax (#2525) --- components/prism-scheme.js | 33 +- components/prism-scheme.min.js | 2 +- tests/languages/racket/function_feature.test | 8 - tests/languages/scheme/boolean_feature.test | 8 +- tests/languages/scheme/builtin_feature.test | 434 ++++++++++++++++-- tests/languages/scheme/comment_feature.test | 17 +- tests/languages/scheme/function_feature.test | 8 +- .../languages/scheme/identifier_feature.test | 7 + tests/languages/scheme/keyword_feature.test | 102 ++-- .../scheme/lambda_parameter_feature.test | 12 + 10 files changed, 523 insertions(+), 108 deletions(-) create mode 100644 tests/languages/scheme/identifier_feature.test diff --git a/components/prism-scheme.js b/components/prism-scheme.js index 9c7b60c0fc..176add2fcf 100644 --- a/components/prism-scheme.js +++ b/components/prism-scheme.js @@ -1,5 +1,10 @@ Prism.languages.scheme = { - 'comment': /;.*/, + // this supports "normal" single-line comments: + // ; comment + // and (potentially nested) multiline comments: + // #| comment #| nested |# still comment |# + // (only 1 level of nesting is supported) + 'comment': /;.*|#;\s*\((?:[^()]|\([^()]*\))*\)|#\|(?:[^#|]|#(?!\|)|\|(?!#)|#\|(?:[^#|]|#(?!\|)|\|(?!#))*\|#)*\|#/, 'string': { pattern: /"(?:[^"\\]|\\.)*"/, greedy: true @@ -9,14 +14,14 @@ Prism.languages.scheme = { greedy: true }, 'character': { - pattern: /#\\(?:[ux][a-fA-F\d]+|[-a-zA-Z]+|\S)/, + pattern: /#\\(?:[ux][a-fA-F\d]+\b|[-a-zA-Z]+\b|\S)/, greedy: true, alias: 'string' }, 'lambda-parameter': [ // https://www.cs.cmu.edu/Groups/AI/html/r4rs/r4rs_6.html#SEC30 { - pattern: /(\(lambda\s+)[^()'\s]+/, + pattern: /(\(lambda\s+)(?:[^|()'\s]+|\|(?:[^\\|]|\\.)*\|)/, lookbehind: true }, { @@ -25,11 +30,16 @@ Prism.languages.scheme = { } ], 'keyword': { - pattern: /(\()(?:define(?:-library|-macro|-syntax|-values)?|defmacro|(?:case-)?lambda|let(?:(?:\*|rec)?(?:-values)?|-syntax|rec-syntax)|else|if|cond|begin|delay(?:-force)?|parameterize|guard|set!|(?:quasi-)?quote|syntax-(?:case|rules))(?=[()\s]|$)/, + pattern: /(\()(?:begin|case(?:-lambda)?|cond(?:-expand)?|define(?:-library|-macro|-record-type|-syntax|-values)?|defmacro|delay(?:-force)?|do|else|export|except|guard|if|import|include(?:-ci|-library-declarations)?|lambda|let(?:rec)?(?:-syntax|-values|\*)?|let\*-values|only|parameterize|prefix|(?:quasi-?)?quote|rename|set!|syntax-(?:case|rules)|unless|unquote(?:-splicing)?|when)(?=[()\s]|$)/, lookbehind: true }, 'builtin': { - pattern: /(\()(?:(?:cons|car|cdr|list|call-with-current-continuation|call\/cc|append|abs|apply|eval)\b|null\?|pair\?|boolean\?|eof-object\?|char\?|procedure\?|number\?|port\?|string\?|vector\?|symbol\?|bytevector\?)(?=[()\s]|$)/, + // all functions of the base library of R7RS plus some of built-ins of R5Rs + pattern: /(\()(?:abs|and|append|apply|assoc|ass[qv]|binary-port\?|boolean=?\?|bytevector(?:-append|-copy|-copy!|-length|-u8-ref|-u8-set!|\?)?|caar|cadr|call-with-(?:current-continuation|port|values)|call\/cc|car|cdar|cddr|cdr|ceiling|char(?:->integer|-ready\?|\?|<\?|<=\?|=\?|>\?|>=\?)|close-(?:input-port|output-port|port)|complex\?|cons|current-(?:error|input|output)-port|denominator|dynamic-wind|eof-object\??|eq\?|equal\?|eqv\?|error|error-object(?:-irritants|-message|\?)|eval|even\?|exact(?:-integer-sqrt|-integer\?|\?)?|expt|features|file-error\?|floor(?:-quotient|-remainder|\/)?|flush-output-port|for-each|gcd|get-output-(?:bytevector|string)|inexact\??|input-port(?:-open\?|\?)|integer(?:->char|\?)|lcm|length|list(?:->string|->vector|-copy|-ref|-set!|-tail|\?)?|make-(?:bytevector|list|parameter|string|vector)|map|max|member|memq|memv|min|modulo|negative\?|newline|not|null\?|number(?:->string|\?)|numerator|odd\?|open-(?:input|output)-(?:bytevector|string)|or|output-port(?:-open\?|\?)|pair\?|peek-char|peek-u8|port\?|positive\?|procedure\?|quotient|raise|raise-continuable|rational\?|rationalize|read-(?:bytevector|bytevector!|char|error\?|line|string|u8)|real\?|remainder|reverse|round|set-c[ad]r!|square|string(?:->list|->number|->symbol|->utf8|->vector|-append|-copy|-copy!|-fill!|-for-each|-length|-map|-ref|-set!|\?|<\?|<=\?|=\?|>\?|>=\?)?|substring|symbol(?:->string|\?|=\?)|syntax-error|textual-port\?|truncate(?:-quotient|-remainder|\/)?|u8-ready\?|utf8->string|values|vector(?:->list|->string|-append|-copy|-copy!|-fill!|-for-each|-length|-map|-ref|-set!|\?)?|with-exception-handler|write-(?:bytevector|char|string|u8)|zero\?)(?=[()\s]|$)/, + lookbehind: true + }, + 'operator': { + pattern: /(\()(?:[-+*%/]|[<>]=?|=>?)(?=[()\s]|$)/, lookbehind: true }, 'number': { @@ -52,16 +62,17 @@ Prism.languages.scheme = { lookbehind: true }, 'boolean': { - pattern: /(^|[\s()])#[ft](?=[()\s]|$)/, - lookbehind: true - }, - 'operator': { - pattern: /(\()(?:[-+*%\/]|[<>]=?|=>?)(?=[()\s]|$)/, + pattern: /(^|[\s()])#(?:[ft]|false|true)(?=[()\s]|$)/, lookbehind: true }, 'function': { - pattern: /(\()[^()'\s]+(?=[()\s]|$)/, + pattern: /(\()(?:[^|()'\s]+|\|(?:[^\\|]|\\.)*\|)(?=[()\s]|$)/, lookbehind: true }, + 'identifier': { + pattern: /(^|[\s()])\|(?:[^\\|]|\\.)*\|(?=[()\s]|$)/, + lookbehind: true, + greedy: true + }, 'punctuation': /[()']/ }; diff --git a/components/prism-scheme.min.js b/components/prism-scheme.min.js index 7176052c9d..db51b867a2 100644 --- a/components/prism-scheme.min.js +++ b/components/prism-scheme.min.js @@ -1 +1 @@ -Prism.languages.scheme={comment:/;.*/,string:{pattern:/"(?:[^"\\]|\\.)*"/,greedy:!0},symbol:{pattern:/'[^()#'\s]+/,greedy:!0},character:{pattern:/#\\(?:[ux][a-fA-F\d]+|[-a-zA-Z]+|\S)/,greedy:!0,alias:"string"},"lambda-parameter":[{pattern:/(\(lambda\s+)[^()'\s]+/,lookbehind:!0},{pattern:/(\(lambda\s+\()[^()']+/,lookbehind:!0}],keyword:{pattern:/(\()(?:define(?:-library|-macro|-syntax|-values)?|defmacro|(?:case-)?lambda|let(?:(?:\*|rec)?(?:-values)?|-syntax|rec-syntax)|else|if|cond|begin|delay(?:-force)?|parameterize|guard|set!|(?:quasi-)?quote|syntax-(?:case|rules))(?=[()\s]|$)/,lookbehind:!0},builtin:{pattern:/(\()(?:(?:cons|car|cdr|list|call-with-current-continuation|call\/cc|append|abs|apply|eval)\b|null\?|pair\?|boolean\?|eof-object\?|char\?|procedure\?|number\?|port\?|string\?|vector\?|symbol\?|bytevector\?)(?=[()\s]|$)/,lookbehind:!0},number:{pattern:/(^|[\s()])(?:(?:#d(?:#[ei])?|#[ei](?:#d)?)?[+-]?(?:(?:\d*\.?\d+(?:[eE][+-]?\d+)?|\d+\/\d+)(?:[+-](?:\d*\.?\d+(?:[eE][+-]?\d+)?|\d+\/\d+)i)?|(?:\d*\.?\d+(?:[eE][+-]?\d+)?|\d+\/\d+)i)|(?:#[box](?:#[ei])?|#[ei](?:#[box])?)[+-]?(?:[\da-fA-F]+(?:\/[\da-fA-F]+)?(?:[+-][\da-fA-F]+(?:\/[\da-fA-F]+)?i)?|[\da-fA-F]+(?:\/[\da-fA-F]+)?i))(?=[()\s]|$)/,lookbehind:!0},boolean:{pattern:/(^|[\s()])#[ft](?=[()\s]|$)/,lookbehind:!0},operator:{pattern:/(\()(?:[-+*%\/]|[<>]=?|=>?)(?=[()\s]|$)/,lookbehind:!0},function:{pattern:/(\()[^()'\s]+(?=[()\s]|$)/,lookbehind:!0},punctuation:/[()']/}; \ No newline at end of file +Prism.languages.scheme={comment:/;.*|#;\s*\((?:[^()]|\([^()]*\))*\)|#\|(?:[^#|]|#(?!\|)|\|(?!#)|#\|(?:[^#|]|#(?!\|)|\|(?!#))*\|#)*\|#/,string:{pattern:/"(?:[^"\\]|\\.)*"/,greedy:!0},symbol:{pattern:/'[^()#'\s]+/,greedy:!0},character:{pattern:/#\\(?:[ux][a-fA-F\d]+\b|[-a-zA-Z]+\b|\S)/,greedy:!0,alias:"string"},"lambda-parameter":[{pattern:/(\(lambda\s+)(?:[^|()'\s]+|\|(?:[^\\|]|\\.)*\|)/,lookbehind:!0},{pattern:/(\(lambda\s+\()[^()']+/,lookbehind:!0}],keyword:{pattern:/(\()(?:begin|case(?:-lambda)?|cond(?:-expand)?|define(?:-library|-macro|-record-type|-syntax|-values)?|defmacro|delay(?:-force)?|do|else|export|except|guard|if|import|include(?:-ci|-library-declarations)?|lambda|let(?:rec)?(?:-syntax|-values|\*)?|let\*-values|only|parameterize|prefix|(?:quasi-?)?quote|rename|set!|syntax-(?:case|rules)|unless|unquote(?:-splicing)?|when)(?=[()\s]|$)/,lookbehind:!0},builtin:{pattern:/(\()(?:abs|and|append|apply|assoc|ass[qv]|binary-port\?|boolean=?\?|bytevector(?:-append|-copy|-copy!|-length|-u8-ref|-u8-set!|\?)?|caar|cadr|call-with-(?:current-continuation|port|values)|call\/cc|car|cdar|cddr|cdr|ceiling|char(?:->integer|-ready\?|\?|<\?|<=\?|=\?|>\?|>=\?)|close-(?:input-port|output-port|port)|complex\?|cons|current-(?:error|input|output)-port|denominator|dynamic-wind|eof-object\??|eq\?|equal\?|eqv\?|error|error-object(?:-irritants|-message|\?)|eval|even\?|exact(?:-integer-sqrt|-integer\?|\?)?|expt|features|file-error\?|floor(?:-quotient|-remainder|\/)?|flush-output-port|for-each|gcd|get-output-(?:bytevector|string)|inexact\??|input-port(?:-open\?|\?)|integer(?:->char|\?)|lcm|length|list(?:->string|->vector|-copy|-ref|-set!|-tail|\?)?|make-(?:bytevector|list|parameter|string|vector)|map|max|member|memq|memv|min|modulo|negative\?|newline|not|null\?|number(?:->string|\?)|numerator|odd\?|open-(?:input|output)-(?:bytevector|string)|or|output-port(?:-open\?|\?)|pair\?|peek-char|peek-u8|port\?|positive\?|procedure\?|quotient|raise|raise-continuable|rational\?|rationalize|read-(?:bytevector|bytevector!|char|error\?|line|string|u8)|real\?|remainder|reverse|round|set-c[ad]r!|square|string(?:->list|->number|->symbol|->utf8|->vector|-append|-copy|-copy!|-fill!|-for-each|-length|-map|-ref|-set!|\?|<\?|<=\?|=\?|>\?|>=\?)?|substring|symbol(?:->string|\?|=\?)|syntax-error|textual-port\?|truncate(?:-quotient|-remainder|\/)?|u8-ready\?|utf8->string|values|vector(?:->list|->string|-append|-copy|-copy!|-fill!|-for-each|-length|-map|-ref|-set!|\?)?|with-exception-handler|write-(?:bytevector|char|string|u8)|zero\?)(?=[()\s]|$)/,lookbehind:!0},operator:{pattern:/(\()(?:[-+*%/]|[<>]=?|=>?)(?=[()\s]|$)/,lookbehind:!0},number:{pattern:/(^|[\s()])(?:(?:#d(?:#[ei])?|#[ei](?:#d)?)?[+-]?(?:(?:\d*\.?\d+(?:[eE][+-]?\d+)?|\d+\/\d+)(?:[+-](?:\d*\.?\d+(?:[eE][+-]?\d+)?|\d+\/\d+)i)?|(?:\d*\.?\d+(?:[eE][+-]?\d+)?|\d+\/\d+)i)|(?:#[box](?:#[ei])?|#[ei](?:#[box])?)[+-]?(?:[\da-fA-F]+(?:\/[\da-fA-F]+)?(?:[+-][\da-fA-F]+(?:\/[\da-fA-F]+)?i)?|[\da-fA-F]+(?:\/[\da-fA-F]+)?i))(?=[()\s]|$)/,lookbehind:!0},boolean:{pattern:/(^|[\s()])#(?:[ft]|false|true)(?=[()\s]|$)/,lookbehind:!0},function:{pattern:/(\()(?:[^|()'\s]+|\|(?:[^\\|]|\\.)*\|)(?=[()\s]|$)/,lookbehind:!0},identifier:{pattern:/(^|[\s()])\|(?:[^\\|]|\\.)*\|(?=[()\s]|$)/,lookbehind:!0,greedy:!0},punctuation:/[()']/}; \ No newline at end of file diff --git a/tests/languages/racket/function_feature.test b/tests/languages/racket/function_feature.test index 4911b747fb..9dd606246a 100644 --- a/tests/languages/racket/function_feature.test +++ b/tests/languages/racket/function_feature.test @@ -1,20 +1,16 @@ (fl= 1 2) (flmin 2 3) -(exact? 2) (inexact->exact 3) (!fact) (** 10) -(exact? (** (defined foo) [fl= 1 2] [flmin 2 3] -[exact? 2] [inexact->exact 3] [!fact] [** 10] -[exact? [** [defined foo] @@ -23,21 +19,17 @@ [ ["punctuation", "("], ["function", "fl="], ["number", "1"], ["number", "2"], ["punctuation", ")"], ["punctuation", "("], ["function", "flmin"], ["number", "2"], ["number", "3"], ["punctuation", ")"], - ["punctuation", "("], ["function", "exact?"], ["number", "2"], ["punctuation", ")"], ["punctuation", "("], ["function", "inexact->exact"], ["number", "3"], ["punctuation", ")"], ["punctuation", "("], ["function", "!fact"], ["punctuation", ")"], ["punctuation", "("], ["function", "**"], ["number", "10"], ["punctuation", ")"], - ["punctuation", "("], ["function", "exact?"], ["punctuation", "("], ["function", "**"], ["punctuation", "("], ["function", "defined"], " foo", ["punctuation", ")"], ["punctuation", "["], ["function", "fl="], ["number", "1"], ["number", "2"], ["punctuation", "]"], ["punctuation", "["], ["function", "flmin"], ["number", "2"], ["number", "3"], ["punctuation", "]"], - ["punctuation", "["], ["function", "exact?"], ["number", "2"], ["punctuation", "]"], ["punctuation", "["], ["function", "inexact->exact"], ["number", "3"], ["punctuation", "]"], ["punctuation", "["], ["function", "!fact"], ["punctuation", "]"], ["punctuation", "["], ["function", "**"], ["number", "10"], ["punctuation", "]"], - ["punctuation", "["], ["function", "exact?"], ["punctuation", "["], ["function", "**"], ["punctuation", "["], ["function", "defined"], " foo", ["punctuation", "]"] ] diff --git a/tests/languages/scheme/boolean_feature.test b/tests/languages/scheme/boolean_feature.test index af218655a4..53753fc7a1 100644 --- a/tests/languages/scheme/boolean_feature.test +++ b/tests/languages/scheme/boolean_feature.test @@ -1,17 +1,15 @@ #t #f - -; not a boolean #true +#false ---------------------------------------------------- [ ["boolean", "#t"], ["boolean", "#f"], - - ["comment", "; not a boolean"], - "\r\n#true" + ["boolean", "#true"], + ["boolean", "#false"] ] ---------------------------------------------------- diff --git a/tests/languages/scheme/builtin_feature.test b/tests/languages/scheme/builtin_feature.test index ab03c8e209..1a3706f4b4 100644 --- a/tests/languages/scheme/builtin_feature.test +++ b/tests/languages/scheme/builtin_feature.test @@ -1,51 +1,397 @@ -(cons) -(car) -(cdr) -(null?) -(pair?) -(boolean?) -(eof-object?) -(char?) -(procedure?) -(number?) -(port?) -(string?) -(vector?) -(symbol?) -(bytevector?) -(list) -(call-with-current-continuation) -(call/cc) -(append) -(abs) -(apply) -(eval) +(abs +(and +(append +(apply +(assoc +(assq +(assv +(binary-port? +(boolean=? +(boolean? +(bytevector +(bytevector-append +(bytevector-copy +(bytevector-copy! +(bytevector-length +(bytevector-u8-ref +(bytevector-u8-set! +(bytevector? +(caar +(cadr +(call-with-current-continuation +(call-with-port +(call-with-values +(call/cc +(car +(cdar +(cddr +(cdr +(ceiling +(char->integer +(char-ready? +(char<=? +(char=? +(char>? +(char? +(close-input-port +(close-output-port +(close-port +(complex? +(cons +(current-error-port +(current-input-port +(current-output-port +(denominator +(dynamic-wind +(eof-object +(eof-object? +(eq? +(equal? +(eqv? +(error +(error-object-irritants +(error-object-message +(error-object? +(eval +(even? +(exact +(exact-integer-sqrt +(exact-integer? +(exact? +(expt +(features +(file-error? +(floor +(floor-quotient +(floor-remainder +(floor/ +(flush-output-port +(for-each +(gcd +(get-output-bytevector +(get-output-string +(inexact +(inexact? +(input-port-open? +(input-port? +(integer->char +(integer? +(lcm +(length +(list +(list->string +(list->vector +(list-copy +(list-ref +(list-set! +(list-tail +(list? +(make-bytevector +(make-list +(make-parameter +(make-string +(make-vector +(map +(max +(member +(memq +(memv +(min +(modulo +(negative? +(newline +(not +(null? +(number->string +(number? +(numerator +(odd? +(open-input-bytevector +(open-input-string +(open-output-bytevector +(open-output-string +(or +(output-port-open? +(output-port? +(pair? +(peek-char +(peek-u8 +(port? +(positive? +(procedure? +(quotient +(raise +(raise-continuable +(rational? +(rationalize +(read-bytevector +(read-bytevector! +(read-char +(read-error? +(read-line +(read-string +(read-u8 +(real? +(remainder +(reverse +(round +(set-car! +(set-cdr! +(square +(string +(string->list +(string->number +(string->symbol +(string->utf8 +(string->vector +(string-append +(string-copy +(string-copy! +(string-fill! +(string-for-each +(string-length +(string-map +(string-ref +(string-set! +(string<=? +(string=? +(string>? +(string? +(substring +(symbol->string +(symbol=? +(symbol? +(syntax-error +(textual-port? +(truncate +(truncate-quotient +(truncate-remainder +(truncate/ +(u8-ready? +(utf8->string +(values +(vector +(vector->list +(vector->string +(vector-append +(vector-copy +(vector-copy! +(vector-fill! +(vector-for-each +(vector-length +(vector-map +(vector-ref +(vector-set! +(vector? +(with-exception-handler +(write-bytevector +(write-char +(write-string +(write-u8 +(zero? ---------------------------------------------------- [ - ["punctuation", "("], ["builtin", "cons"], ["punctuation", ")"], - ["punctuation", "("], ["builtin", "car"], ["punctuation", ")"], - ["punctuation", "("], ["builtin", "cdr"], ["punctuation", ")"], - ["punctuation", "("], ["builtin", "null?"], ["punctuation", ")"], - ["punctuation", "("], ["builtin", "pair?"], ["punctuation", ")"], - ["punctuation", "("], ["builtin", "boolean?"], ["punctuation", ")"], - ["punctuation", "("], ["builtin", "eof-object?"], ["punctuation", ")"], - ["punctuation", "("], ["builtin", "char?"], ["punctuation", ")"], - ["punctuation", "("], ["builtin", "procedure?"], ["punctuation", ")"], - ["punctuation", "("], ["builtin", "number?"], ["punctuation", ")"], - ["punctuation", "("], ["builtin", "port?"], ["punctuation", ")"], - ["punctuation", "("], ["builtin", "string?"], ["punctuation", ")"], - ["punctuation", "("], ["builtin", "vector?"], ["punctuation", ")"], - ["punctuation", "("], ["builtin", "symbol?"], ["punctuation", ")"], - ["punctuation", "("], ["builtin", "bytevector?"], ["punctuation", ")"], - ["punctuation", "("], ["builtin", "list"], ["punctuation", ")"], - ["punctuation", "("], ["builtin", "call-with-current-continuation"], ["punctuation", ")"], - ["punctuation", "("], ["builtin", "call/cc"], ["punctuation", ")"], - ["punctuation", "("], ["builtin", "append"], ["punctuation", ")"], - ["punctuation", "("], ["builtin", "abs"], ["punctuation", ")"], - ["punctuation", "("], ["builtin", "apply"], ["punctuation", ")"], - ["punctuation", "("], ["builtin", "eval"], ["punctuation", ")"] + ["punctuation", "("], ["builtin", "abs"], + ["punctuation", "("], ["builtin", "and"], + ["punctuation", "("], ["builtin", "append"], + ["punctuation", "("], ["builtin", "apply"], + ["punctuation", "("], ["builtin", "assoc"], + ["punctuation", "("], ["builtin", "assq"], + ["punctuation", "("], ["builtin", "assv"], + ["punctuation", "("], ["builtin", "binary-port?"], + ["punctuation", "("], ["builtin", "boolean=?"], + ["punctuation", "("], ["builtin", "boolean?"], + ["punctuation", "("], ["builtin", "bytevector"], + ["punctuation", "("], ["builtin", "bytevector-append"], + ["punctuation", "("], ["builtin", "bytevector-copy"], + ["punctuation", "("], ["builtin", "bytevector-copy!"], + ["punctuation", "("], ["builtin", "bytevector-length"], + ["punctuation", "("], ["builtin", "bytevector-u8-ref"], + ["punctuation", "("], ["builtin", "bytevector-u8-set!"], + ["punctuation", "("], ["builtin", "bytevector?"], + ["punctuation", "("], ["builtin", "caar"], + ["punctuation", "("], ["builtin", "cadr"], + ["punctuation", "("], ["builtin", "call-with-current-continuation"], + ["punctuation", "("], ["builtin", "call-with-port"], + ["punctuation", "("], ["builtin", "call-with-values"], + ["punctuation", "("], ["builtin", "call/cc"], + ["punctuation", "("], ["builtin", "car"], + ["punctuation", "("], ["builtin", "cdar"], + ["punctuation", "("], ["builtin", "cddr"], + ["punctuation", "("], ["builtin", "cdr"], + ["punctuation", "("], ["builtin", "ceiling"], + ["punctuation", "("], ["builtin", "char->integer"], + ["punctuation", "("], ["builtin", "char-ready?"], + ["punctuation", "("], ["builtin", "char<=?"], + ["punctuation", "("], ["builtin", "char=?"], + ["punctuation", "("], ["builtin", "char>?"], + ["punctuation", "("], ["builtin", "char?"], + ["punctuation", "("], ["builtin", "close-input-port"], + ["punctuation", "("], ["builtin", "close-output-port"], + ["punctuation", "("], ["builtin", "close-port"], + ["punctuation", "("], ["builtin", "complex?"], + ["punctuation", "("], ["builtin", "cons"], + ["punctuation", "("], ["builtin", "current-error-port"], + ["punctuation", "("], ["builtin", "current-input-port"], + ["punctuation", "("], ["builtin", "current-output-port"], + ["punctuation", "("], ["builtin", "denominator"], + ["punctuation", "("], ["builtin", "dynamic-wind"], + ["punctuation", "("], ["builtin", "eof-object"], + ["punctuation", "("], ["builtin", "eof-object?"], + ["punctuation", "("], ["builtin", "eq?"], + ["punctuation", "("], ["builtin", "equal?"], + ["punctuation", "("], ["builtin", "eqv?"], + ["punctuation", "("], ["builtin", "error"], + ["punctuation", "("], ["builtin", "error-object-irritants"], + ["punctuation", "("], ["builtin", "error-object-message"], + ["punctuation", "("], ["builtin", "error-object?"], + ["punctuation", "("], ["builtin", "eval"], + ["punctuation", "("], ["builtin", "even?"], + ["punctuation", "("], ["builtin", "exact"], + ["punctuation", "("], ["builtin", "exact-integer-sqrt"], + ["punctuation", "("], ["builtin", "exact-integer?"], + ["punctuation", "("], ["builtin", "exact?"], + ["punctuation", "("], ["builtin", "expt"], + ["punctuation", "("], ["builtin", "features"], + ["punctuation", "("], ["builtin", "file-error?"], + ["punctuation", "("], ["builtin", "floor"], + ["punctuation", "("], ["builtin", "floor-quotient"], + ["punctuation", "("], ["builtin", "floor-remainder"], + ["punctuation", "("], ["builtin", "floor/"], + ["punctuation", "("], ["builtin", "flush-output-port"], + ["punctuation", "("], ["builtin", "for-each"], + ["punctuation", "("], ["builtin", "gcd"], + ["punctuation", "("], ["builtin", "get-output-bytevector"], + ["punctuation", "("], ["builtin", "get-output-string"], + ["punctuation", "("], ["builtin", "inexact"], + ["punctuation", "("], ["builtin", "inexact?"], + ["punctuation", "("], ["builtin", "input-port-open?"], + ["punctuation", "("], ["builtin", "input-port?"], + ["punctuation", "("], ["builtin", "integer->char"], + ["punctuation", "("], ["builtin", "integer?"], + ["punctuation", "("], ["builtin", "lcm"], + ["punctuation", "("], ["builtin", "length"], + ["punctuation", "("], ["builtin", "list"], + ["punctuation", "("], ["builtin", "list->string"], + ["punctuation", "("], ["builtin", "list->vector"], + ["punctuation", "("], ["builtin", "list-copy"], + ["punctuation", "("], ["builtin", "list-ref"], + ["punctuation", "("], ["builtin", "list-set!"], + ["punctuation", "("], ["builtin", "list-tail"], + ["punctuation", "("], ["builtin", "list?"], + ["punctuation", "("], ["builtin", "make-bytevector"], + ["punctuation", "("], ["builtin", "make-list"], + ["punctuation", "("], ["builtin", "make-parameter"], + ["punctuation", "("], ["builtin", "make-string"], + ["punctuation", "("], ["builtin", "make-vector"], + ["punctuation", "("], ["builtin", "map"], + ["punctuation", "("], ["builtin", "max"], + ["punctuation", "("], ["builtin", "member"], + ["punctuation", "("], ["builtin", "memq"], + ["punctuation", "("], ["builtin", "memv"], + ["punctuation", "("], ["builtin", "min"], + ["punctuation", "("], ["builtin", "modulo"], + ["punctuation", "("], ["builtin", "negative?"], + ["punctuation", "("], ["builtin", "newline"], + ["punctuation", "("], ["builtin", "not"], + ["punctuation", "("], ["builtin", "null?"], + ["punctuation", "("], ["builtin", "number->string"], + ["punctuation", "("], ["builtin", "number?"], + ["punctuation", "("], ["builtin", "numerator"], + ["punctuation", "("], ["builtin", "odd?"], + ["punctuation", "("], ["builtin", "open-input-bytevector"], + ["punctuation", "("], ["builtin", "open-input-string"], + ["punctuation", "("], ["builtin", "open-output-bytevector"], + ["punctuation", "("], ["builtin", "open-output-string"], + ["punctuation", "("], ["builtin", "or"], + ["punctuation", "("], ["builtin", "output-port-open?"], + ["punctuation", "("], ["builtin", "output-port?"], + ["punctuation", "("], ["builtin", "pair?"], + ["punctuation", "("], ["builtin", "peek-char"], + ["punctuation", "("], ["builtin", "peek-u8"], + ["punctuation", "("], ["builtin", "port?"], + ["punctuation", "("], ["builtin", "positive?"], + ["punctuation", "("], ["builtin", "procedure?"], + ["punctuation", "("], ["builtin", "quotient"], + ["punctuation", "("], ["builtin", "raise"], + ["punctuation", "("], ["builtin", "raise-continuable"], + ["punctuation", "("], ["builtin", "rational?"], + ["punctuation", "("], ["builtin", "rationalize"], + ["punctuation", "("], ["builtin", "read-bytevector"], + ["punctuation", "("], ["builtin", "read-bytevector!"], + ["punctuation", "("], ["builtin", "read-char"], + ["punctuation", "("], ["builtin", "read-error?"], + ["punctuation", "("], ["builtin", "read-line"], + ["punctuation", "("], ["builtin", "read-string"], + ["punctuation", "("], ["builtin", "read-u8"], + ["punctuation", "("], ["builtin", "real?"], + ["punctuation", "("], ["builtin", "remainder"], + ["punctuation", "("], ["builtin", "reverse"], + ["punctuation", "("], ["builtin", "round"], + ["punctuation", "("], ["builtin", "set-car!"], + ["punctuation", "("], ["builtin", "set-cdr!"], + ["punctuation", "("], ["builtin", "square"], + ["punctuation", "("], ["builtin", "string"], + ["punctuation", "("], ["builtin", "string->list"], + ["punctuation", "("], ["builtin", "string->number"], + ["punctuation", "("], ["builtin", "string->symbol"], + ["punctuation", "("], ["builtin", "string->utf8"], + ["punctuation", "("], ["builtin", "string->vector"], + ["punctuation", "("], ["builtin", "string-append"], + ["punctuation", "("], ["builtin", "string-copy"], + ["punctuation", "("], ["builtin", "string-copy!"], + ["punctuation", "("], ["builtin", "string-fill!"], + ["punctuation", "("], ["builtin", "string-for-each"], + ["punctuation", "("], ["builtin", "string-length"], + ["punctuation", "("], ["builtin", "string-map"], + ["punctuation", "("], ["builtin", "string-ref"], + ["punctuation", "("], ["builtin", "string-set!"], + ["punctuation", "("], ["builtin", "string<=?"], + ["punctuation", "("], ["builtin", "string=?"], + ["punctuation", "("], ["builtin", "string>?"], + ["punctuation", "("], ["builtin", "string?"], + ["punctuation", "("], ["builtin", "substring"], + ["punctuation", "("], ["builtin", "symbol->string"], + ["punctuation", "("], ["builtin", "symbol=?"], + ["punctuation", "("], ["builtin", "symbol?"], + ["punctuation", "("], ["builtin", "syntax-error"], + ["punctuation", "("], ["builtin", "textual-port?"], + ["punctuation", "("], ["builtin", "truncate"], + ["punctuation", "("], ["builtin", "truncate-quotient"], + ["punctuation", "("], ["builtin", "truncate-remainder"], + ["punctuation", "("], ["builtin", "truncate/"], + ["punctuation", "("], ["builtin", "u8-ready?"], + ["punctuation", "("], ["builtin", "utf8->string"], + ["punctuation", "("], ["builtin", "values"], + ["punctuation", "("], ["builtin", "vector"], + ["punctuation", "("], ["builtin", "vector->list"], + ["punctuation", "("], ["builtin", "vector->string"], + ["punctuation", "("], ["builtin", "vector-append"], + ["punctuation", "("], ["builtin", "vector-copy"], + ["punctuation", "("], ["builtin", "vector-copy!"], + ["punctuation", "("], ["builtin", "vector-fill!"], + ["punctuation", "("], ["builtin", "vector-for-each"], + ["punctuation", "("], ["builtin", "vector-length"], + ["punctuation", "("], ["builtin", "vector-map"], + ["punctuation", "("], ["builtin", "vector-ref"], + ["punctuation", "("], ["builtin", "vector-set!"], + ["punctuation", "("], ["builtin", "vector?"], + ["punctuation", "("], ["builtin", "with-exception-handler"], + ["punctuation", "("], ["builtin", "write-bytevector"], + ["punctuation", "("], ["builtin", "write-char"], + ["punctuation", "("], ["builtin", "write-string"], + ["punctuation", "("], ["builtin", "write-u8"], + ["punctuation", "("], ["builtin", "zero?"] ] ---------------------------------------------------- diff --git a/tests/languages/scheme/comment_feature.test b/tests/languages/scheme/comment_feature.test index 85faefe78b..af9bef0320 100644 --- a/tests/languages/scheme/comment_feature.test +++ b/tests/languages/scheme/comment_feature.test @@ -1,13 +1,26 @@ ; ; foobar +#;(foo bar) +#; (foo) + +#| + comment + #| nested comment |# +|# + ---------------------------------------------------- [ ["comment", ";"], - ["comment", "; foobar"] + ["comment", "; foobar"], + + ["comment", "#;(foo bar)"], + ["comment", "#; (foo)"], + + ["comment", "#|\r\n comment\r\n #| nested comment |#\r\n|#"] ] ---------------------------------------------------- -Checks for comments. \ No newline at end of file +Checks for comments. diff --git a/tests/languages/scheme/function_feature.test b/tests/languages/scheme/function_feature.test index 699ca063f4..bbd3259920 100644 --- a/tests/languages/scheme/function_feature.test +++ b/tests/languages/scheme/function_feature.test @@ -1,25 +1,23 @@ (fl= 1 2) (flmin 2 3) -(exact? 2) (inexact->exact 3) (!fact) (** 10) -(exact? (** (defined foo) +(|some name| foo) ---------------------------------------------------- [ ["punctuation", "("], ["function", "fl="], ["number", "1"], ["number", "2"], ["punctuation", ")"], ["punctuation", "("], ["function", "flmin"], ["number", "2"], ["number", "3"], ["punctuation", ")"], - ["punctuation", "("], ["function", "exact?"], ["number", "2"], ["punctuation", ")"], ["punctuation", "("], ["function", "inexact->exact"], ["number", "3"], ["punctuation", ")"], ["punctuation", "("], ["function", "!fact"], ["punctuation", ")"], ["punctuation", "("], ["function", "**"], ["number", "10"], ["punctuation", ")"], - ["punctuation", "("], ["function", "exact?"], ["punctuation", "("], ["function", "**"], - ["punctuation", "("], ["function", "defined"], " foo", ["punctuation", ")"] + ["punctuation", "("], ["function", "defined"], " foo", ["punctuation", ")"], + ["punctuation", "("], ["function", "|some name|"], " foo", ["punctuation", ")"] ] ---------------------------------------------------- diff --git a/tests/languages/scheme/identifier_feature.test b/tests/languages/scheme/identifier_feature.test new file mode 100644 index 0000000000..0ac5d36a62 --- /dev/null +++ b/tests/languages/scheme/identifier_feature.test @@ -0,0 +1,7 @@ +|\x9;\x9;| + +---------------------------------------------------- + +[ + ["identifier", "|\\x9;\\x9;|"] +] \ No newline at end of file diff --git a/tests/languages/scheme/keyword_feature.test b/tests/languages/scheme/keyword_feature.test index 53085d543d..2d6e82f5cf 100644 --- a/tests/languages/scheme/keyword_feature.test +++ b/tests/languages/scheme/keyword_feature.test @@ -1,65 +1,103 @@ -(define) +(begin) +(case) +(case-lambda) +(cond) +(cond-expand) (define-library) (define-macro) +(define-record-type) (define-syntax) (define-values) +(define) (defmacro) -(case-lambda) +(delay-force) +(delay) +(do) +(else) +(export) +(except) +(guard) +(if) +(import) +(include) +(include-ci) +(include-library-declarations) (lambda) -(let) -(let*) -(letrec) +(let-syntax) (let-values) +(let) (let*-values) +(let*) +(letrec-syntax) (letrec-values) -(else) -(if) -(cond) -(begin) -(delay) -(delay-force) +(letrec) +(letrec*) +(only) (parameterize) -(guard) -(set!) +(prefix) (quasi-quote) +(quasiquote) (quote) -(syntax-rules) +(rename) +(set!) (syntax-case) -(letrec-syntax) -(let-syntax) +(syntax-rules) +(unless) +(unquote) +(unquote-splicing) +(when) ---------------------------------------------------- [ - ["punctuation", "("], ["keyword", "define"], ["punctuation", ")"], + ["punctuation", "("], ["keyword", "begin"], ["punctuation", ")"], + ["punctuation", "("], ["keyword", "case"], ["punctuation", ")"], + ["punctuation", "("], ["keyword", "case-lambda"], ["punctuation", ")"], + ["punctuation", "("], ["keyword", "cond"], ["punctuation", ")"], + ["punctuation", "("], ["keyword", "cond-expand"], ["punctuation", ")"], ["punctuation", "("], ["keyword", "define-library"], ["punctuation", ")"], ["punctuation", "("], ["keyword", "define-macro"], ["punctuation", ")"], + ["punctuation", "("], ["keyword", "define-record-type"], ["punctuation", ")"], ["punctuation", "("], ["keyword", "define-syntax"], ["punctuation", ")"], ["punctuation", "("], ["keyword", "define-values"], ["punctuation", ")"], + ["punctuation", "("], ["keyword", "define"], ["punctuation", ")"], ["punctuation", "("], ["keyword", "defmacro"], ["punctuation", ")"], - ["punctuation", "("], ["keyword", "case-lambda"], ["punctuation", ")"], + ["punctuation", "("], ["keyword", "delay-force"], ["punctuation", ")"], + ["punctuation", "("], ["keyword", "delay"], ["punctuation", ")"], + ["punctuation", "("], ["keyword", "do"], ["punctuation", ")"], + ["punctuation", "("], ["keyword", "else"], ["punctuation", ")"], + ["punctuation", "("], ["keyword", "export"], ["punctuation", ")"], + ["punctuation", "("], ["keyword", "except"], ["punctuation", ")"], + ["punctuation", "("], ["keyword", "guard"], ["punctuation", ")"], + ["punctuation", "("], ["keyword", "if"], ["punctuation", ")"], + ["punctuation", "("], ["keyword", "import"], ["punctuation", ")"], + ["punctuation", "("], ["keyword", "include"], ["punctuation", ")"], + ["punctuation", "("], ["keyword", "include-ci"], ["punctuation", ")"], + ["punctuation", "("], ["keyword", "include-library-declarations"], ["punctuation", ")"], ["punctuation", "("], ["keyword", "lambda"], ["punctuation", ")"], - ["punctuation", "("], ["keyword", "let"], ["punctuation", ")"], - ["punctuation", "("], ["keyword", "let*"], ["punctuation", ")"], - ["punctuation", "("], ["keyword", "letrec"], ["punctuation", ")"], + ["punctuation", "("], ["keyword", "let-syntax"], ["punctuation", ")"], ["punctuation", "("], ["keyword", "let-values"], ["punctuation", ")"], + ["punctuation", "("], ["keyword", "let"], ["punctuation", ")"], ["punctuation", "("], ["keyword", "let*-values"], ["punctuation", ")"], + ["punctuation", "("], ["keyword", "let*"], ["punctuation", ")"], + ["punctuation", "("], ["keyword", "letrec-syntax"], ["punctuation", ")"], ["punctuation", "("], ["keyword", "letrec-values"], ["punctuation", ")"], - ["punctuation", "("], ["keyword", "else"], ["punctuation", ")"], - ["punctuation", "("], ["keyword", "if"], ["punctuation", ")"], - ["punctuation", "("], ["keyword", "cond"], ["punctuation", ")"], - ["punctuation", "("], ["keyword", "begin"], ["punctuation", ")"], - ["punctuation", "("], ["keyword", "delay"], ["punctuation", ")"], - ["punctuation", "("], ["keyword", "delay-force"], ["punctuation", ")"], + ["punctuation", "("], ["keyword", "letrec"], ["punctuation", ")"], + ["punctuation", "("], ["keyword", "letrec*"], ["punctuation", ")"], + ["punctuation", "("], ["keyword", "only"], ["punctuation", ")"], ["punctuation", "("], ["keyword", "parameterize"], ["punctuation", ")"], - ["punctuation", "("], ["keyword", "guard"], ["punctuation", ")"], - ["punctuation", "("], ["keyword", "set!"], ["punctuation", ")"], + ["punctuation", "("], ["keyword", "prefix"], ["punctuation", ")"], ["punctuation", "("], ["keyword", "quasi-quote"], ["punctuation", ")"], + ["punctuation", "("], ["keyword", "quasiquote"], ["punctuation", ")"], ["punctuation", "("], ["keyword", "quote"], ["punctuation", ")"], - ["punctuation", "("], ["keyword", "syntax-rules"], ["punctuation", ")"], + ["punctuation", "("], ["keyword", "rename"], ["punctuation", ")"], + ["punctuation", "("], ["keyword", "set!"], ["punctuation", ")"], ["punctuation", "("], ["keyword", "syntax-case"], ["punctuation", ")"], - ["punctuation", "("], ["keyword", "letrec-syntax"], ["punctuation", ")"], - ["punctuation", "("], ["keyword", "let-syntax"], ["punctuation", ")"] + ["punctuation", "("], ["keyword", "syntax-rules"], ["punctuation", ")"], + ["punctuation", "("], ["keyword", "unless"], ["punctuation", ")"], + ["punctuation", "("], ["keyword", "unquote"], ["punctuation", ")"], + ["punctuation", "("], ["keyword", "unquote-splicing"], ["punctuation", ")"], + ["punctuation", "("], ["keyword", "when"], ["punctuation", ")"] ] ---------------------------------------------------- diff --git a/tests/languages/scheme/lambda_parameter_feature.test b/tests/languages/scheme/lambda_parameter_feature.test index a076879750..bbc7a22ffa 100644 --- a/tests/languages/scheme/lambda_parameter_feature.test +++ b/tests/languages/scheme/lambda_parameter_feature.test @@ -1,5 +1,9 @@ (lambda x x) + +(lambda |some name| |some name|) + (lambda (x) x) + (lambda (foo bar) (concat foo bar)) ---------------------------------------------------- @@ -10,6 +14,13 @@ ["lambda-parameter", "x"], " x", ["punctuation", ")"], + + ["punctuation", "("], + ["keyword", "lambda"], + ["lambda-parameter", "|some name|"], + ["identifier", "|some name|"], + ["punctuation", ")"], + ["punctuation", "("], ["keyword", "lambda"], ["punctuation", "("], @@ -17,6 +28,7 @@ ["punctuation", ")"], " x", ["punctuation", ")"], + ["punctuation", "("], ["keyword", "lambda"], ["punctuation", "("], From bf169e5f47ccf7a56561762b2c8343e580002704 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Mon, 31 Aug 2020 17:49:09 +0200 Subject: [PATCH 0626/1100] JSDoc: Fixed line ends (#2523) --- gulpfile.js/docs.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/gulpfile.js/docs.js b/gulpfile.js/docs.js index cbd82f3fc2..b23956445e 100644 --- a/gulpfile.js/docs.js +++ b/gulpfile.js/docs.js @@ -45,7 +45,16 @@ function docsRemoveExcessFiles() { return del(jsDoc.junk); } -const docs = series(docsClean, docsCreate, docsRemoveExcessFiles, docsAddFavicon); +function docsFixLineEnds(cb) { + // https://github.com/jsdoc/jsdoc/issues/1837 + return pump([ + src('docs/*.html'), + replace(/\r\n?|\n/g, '\n'), + dest('docs/') + ], cb); +} + +const docs = series(docsClean, docsCreate, docsRemoveExcessFiles, docsAddFavicon, docsFixLineEnds); module.exports = { docs, From f62ca78790930befa8df6858b3697846455a64d4 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Mon, 31 Aug 2020 17:56:46 +0200 Subject: [PATCH 0627/1100] Regex: Changed how languages embed regexes (#2532) --- components.js | 2 +- components.json | 12 +- components/prism-javascript.js | 12 +- components/prism-javascript.min.js | 2 +- components/prism-regex.js | 23 ---- components/prism-regex.min.js | 2 +- components/prism-vala.js | 12 +- components/prism-vala.min.js | 2 +- prism.js | 12 +- .../javascript!+regex/regex_inclusion.test | 2 +- tests/languages/javascript/regex_feature.test | 104 +++++++++++++++--- .../script_feature.test | 11 +- 12 files changed, 138 insertions(+), 58 deletions(-) diff --git a/components.js b/components.js index a149fbb760..8c4b3d066a 100644 --- a/components.js +++ b/components.js @@ -1,2 +1,2 @@ -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml","ssml","atom","rss"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","ssml":"SSML","atom":"Atom","rss":"RSS"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"ABNF","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"agda":{"title":"Agda","owner":"xy-ren"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"dkern"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"BNF","alias":"rbnf","aliasTitles":{"rbnf":"RBNF"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"bsl":{"title":"BSL (1C:Enterprise)","alias":"oscript","aliasTitles":{"oscript":"OneScript"},"owner":"Diversus23"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"clojure":{"title":"Clojure","owner":"troglotit"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"cypher":{"title":"Cypher","owner":"RunDevelopment"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dax":{"title":"DAX","owner":"peterbud"},"dhall":{"title":"Dhall","owner":"RunDevelopment"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"EBNF","owner":"RunDevelopment"},"editorconfig":{"title":"EditorConfig","owner":"osipxd"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"c","owner":"Golmote"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","optional":["markdown"],"owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"hlsl":{"title":"HLSL","require":"c","owner":"RunDevelopment"},"http":{"title":"HTTP","optional":["css","javascript","json","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"ignore":{"title":".ignore","owner":"osipxd","alias":["gitignore","hgignore","npmignore"],"aliasTitles":{"gitignore":".gitignore","hgignore":".hgignore","npmignore":".npmignore"}},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike","typescript"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","alias":"webmanifest","aliasTitles":{"webmanifest":"Web App Manifest"},"owner":"CupOfTea696"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"jsstacktrace":{"title":"JS stack trace","owner":"sbrl"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","alias":["kt","kts"],"aliasTitles":{"kts":"Kotlin Script"},"require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"mongodb":{"title":"MongoDB","owner":"airs0urce","require":"javascript"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"naniscript":{"title":"Naninovel Script","owner":"Elringus","alias":"nani"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"purebasic":{"title":"PureBasic","require":"clike","alias":"pbfasm","owner":"HeX0R101"},"purescript":{"title":"PureScript","require":"haskell","alias":"purs","owner":"sriharshachilakapati"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"racket":{"title":"Racket","require":"scheme","alias":"rkt","owner":"RunDevelopment"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","modify":["actionscript","coffeescript","flow","javascript","typescript","vala"],"owner":"RunDevelopment"},"renpy":{"title":"Ren'py","alias":"rpy","owner":"HyuchiaDiego"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","owner":"RunDevelopment"},"smali":{"title":"Smali","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"solidity":{"title":"Solidity (Ethereum)","alias":"sol","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"stan":{"title":"Stan","owner":"RunDevelopment"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","vbnet"],"owner":"RunDevelopment"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"typoscript":{"title":"TypoScript","alias":"tsconfig","aliasTitles":{"tsconfig":"TSConfig"},"owner":"dkern"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":["vb","vba"],"aliasTitles":{"vba":"VBA"},"owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xml-doc":{"title":"XML doc (.net)","require":"markup","modify":["csharp","fsharp","vbnet"],"owner":"RunDevelopment"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"yang":{"title":"YANG","owner":"RunDevelopment"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml","ssml","atom","rss"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","ssml":"SSML","atom":"Atom","rss":"RSS"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","optional":"regex","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"ABNF","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"agda":{"title":"Agda","owner":"xy-ren"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"dkern"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"BNF","alias":"rbnf","aliasTitles":{"rbnf":"RBNF"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"bsl":{"title":"BSL (1C:Enterprise)","alias":"oscript","aliasTitles":{"oscript":"OneScript"},"owner":"Diversus23"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"clojure":{"title":"Clojure","owner":"troglotit"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"cypher":{"title":"Cypher","owner":"RunDevelopment"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dax":{"title":"DAX","owner":"peterbud"},"dhall":{"title":"Dhall","owner":"RunDevelopment"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"EBNF","owner":"RunDevelopment"},"editorconfig":{"title":"EditorConfig","owner":"osipxd"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"c","owner":"Golmote"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","optional":["markdown"],"owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"hlsl":{"title":"HLSL","require":"c","owner":"RunDevelopment"},"http":{"title":"HTTP","optional":["css","javascript","json","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"ignore":{"title":".ignore","owner":"osipxd","alias":["gitignore","hgignore","npmignore"],"aliasTitles":{"gitignore":".gitignore","hgignore":".hgignore","npmignore":".npmignore"}},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike","typescript"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","alias":"webmanifest","aliasTitles":{"webmanifest":"Web App Manifest"},"owner":"CupOfTea696"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"jsstacktrace":{"title":"JS stack trace","owner":"sbrl"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","alias":["kt","kts"],"aliasTitles":{"kts":"Kotlin Script"},"require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"mongodb":{"title":"MongoDB","owner":"airs0urce","require":"javascript"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"naniscript":{"title":"Naninovel Script","owner":"Elringus","alias":"nani"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"purebasic":{"title":"PureBasic","require":"clike","alias":"pbfasm","owner":"HeX0R101"},"purescript":{"title":"PureScript","require":"haskell","alias":"purs","owner":"sriharshachilakapati"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"racket":{"title":"Racket","require":"scheme","alias":"rkt","owner":"RunDevelopment"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","owner":"RunDevelopment"},"renpy":{"title":"Ren'py","alias":"rpy","owner":"HyuchiaDiego"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","owner":"RunDevelopment"},"smali":{"title":"Smali","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"solidity":{"title":"Solidity (Ethereum)","alias":"sol","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"stan":{"title":"Stan","owner":"RunDevelopment"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","vbnet"],"owner":"RunDevelopment"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"typoscript":{"title":"TypoScript","alias":"tsconfig","aliasTitles":{"tsconfig":"TSConfig"},"owner":"dkern"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","optional":"regex","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":["vb","vba"],"aliasTitles":{"vba":"VBA"},"owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xml-doc":{"title":"XML doc (.net)","require":"markup","modify":["csharp","fsharp","vbnet"],"owner":"RunDevelopment"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"yang":{"title":"YANG","owner":"RunDevelopment"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; if (typeof module !== 'undefined' && module.exports) { module.exports = components; } \ No newline at end of file diff --git a/components.json b/components.json index 42afe6f171..bdd55a732b 100644 --- a/components.json +++ b/components.json @@ -73,6 +73,7 @@ "title": "JavaScript", "require": "clike", "modify": "markup", + "optional": "regex", "alias": "js", "option": "default" }, @@ -210,7 +211,7 @@ "oscript": "OneScript" }, "owner": "Diversus23" - }, + }, "c": { "title": "C", "require": "clike", @@ -969,14 +970,6 @@ }, "regex": { "title": "Regex", - "modify": [ - "actionscript", - "coffeescript", - "flow", - "javascript", - "typescript", - "vala" - ], "owner": "RunDevelopment" }, "renpy": { @@ -1181,6 +1174,7 @@ "vala": { "title": "Vala", "require": "clike", + "optional": "regex", "owner": "TemplarVolk" }, "vbnet": { diff --git a/components/prism-javascript.js b/components/prism-javascript.js index a6ec6eb5c4..28a78ee5f6 100644 --- a/components/prism-javascript.js +++ b/components/prism-javascript.js @@ -28,7 +28,17 @@ Prism.languages.insertBefore('javascript', 'keyword', { 'regex': { pattern: /((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)\/(?:\[(?:[^\]\\\r\n]|\\.)*]|\\.|[^/\\\[\r\n])+\/[gimyus]{0,6}(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/, lookbehind: true, - greedy: true + greedy: true, + inside: { + 'regex-source': { + pattern: /^(\/)[\s\S]+(?=\/[a-z]*$)/, + lookbehind: true, + alias: 'language-regex', + inside: Prism.languages.regex + }, + 'regex-flags': /[a-z]+$/, + 'regex-delimiter': /^\/|\/$/ + } }, // This must be declared before keyword because we use "function" inside the look-forward 'function-variable': { diff --git a/components/prism-javascript.min.js b/components/prism-javascript.min.js index 0faf69afcc..21f276db5a 100644 --- a/components/prism-javascript.min.js +++ b/components/prism-javascript.min.js @@ -1 +1 @@ -Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])[_$A-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\.(?:prototype|constructor))/,lookbehind:!0}],keyword:[{pattern:/((?:^|})\s*)(?:catch|finally)\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|(?:get|set)(?=\s*[\[$\w\xA0-\uFFFF])|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],number:/\b(?:(?:0[xX](?:[\dA-Fa-f](?:_[\dA-Fa-f])?)+|0[bB](?:[01](?:_[01])?)+|0[oO](?:[0-7](?:_[0-7])?)+)n?|(?:\d(?:_\d)?)+n|NaN|Infinity)\b|(?:\b(?:\d(?:_\d)?)+\.?(?:\d(?:_\d)?)*|\B\.(?:\d(?:_\d)?)+)(?:[Ee][+-]?(?:\d(?:_\d)?)+)?/,function:/#?[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/,Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)\/(?:\[(?:[^\]\\\r\n]|\\.)*]|\\.|[^/\\\[\r\n])+\/[gimyus]{0,6}(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/,lookbehind:!0,greedy:!0},"function-variable":{pattern:/#?[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)?\s*\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*=>)/i,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),Prism.languages.insertBefore("javascript","string",{"template-string":{pattern:/`(?:\\[\s\S]|\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}|(?!\${)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\${|}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}}}),Prism.languages.markup&&Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.js=Prism.languages.javascript; \ No newline at end of file +Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])[_$A-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\.(?:prototype|constructor))/,lookbehind:!0}],keyword:[{pattern:/((?:^|})\s*)(?:catch|finally)\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|(?:get|set)(?=\s*[\[$\w\xA0-\uFFFF])|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],number:/\b(?:(?:0[xX](?:[\dA-Fa-f](?:_[\dA-Fa-f])?)+|0[bB](?:[01](?:_[01])?)+|0[oO](?:[0-7](?:_[0-7])?)+)n?|(?:\d(?:_\d)?)+n|NaN|Infinity)\b|(?:\b(?:\d(?:_\d)?)+\.?(?:\d(?:_\d)?)*|\B\.(?:\d(?:_\d)?)+)(?:[Ee][+-]?(?:\d(?:_\d)?)+)?/,function:/#?[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/,Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)\/(?:\[(?:[^\]\\\r\n]|\\.)*]|\\.|[^/\\\[\r\n])+\/[gimyus]{0,6}(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/,lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:Prism.languages.regex},"regex-flags":/[a-z]+$/,"regex-delimiter":/^\/|\/$/}},"function-variable":{pattern:/#?[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)?\s*\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*=>)/i,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),Prism.languages.insertBefore("javascript","string",{"template-string":{pattern:/`(?:\\[\s\S]|\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}|(?!\${)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\${|}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}}}),Prism.languages.markup&&Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.js=Prism.languages.javascript; \ No newline at end of file diff --git a/components/prism-regex.js b/components/prism-regex.js index 7b4d144035..0b9a576955 100644 --- a/components/prism-regex.js +++ b/components/prism-regex.js @@ -101,27 +101,4 @@ } }; - - [ - 'actionscript', - 'coffescript', - 'flow', - 'javascript', - 'typescript', - 'vala' - ].forEach(function (lang) { - var grammar = Prism.languages[lang]; - if (grammar) { - grammar['regex'].inside = { - 'language-regex': { - pattern: /^(\/)[\s\S]+(?=\/[a-z]*$)/i, - lookbehind: true, - inside: Prism.languages.regex - }, - 'regex-flags': /[a-z]+$/i, - 'regex-delimiter': /^\/|\/$/, - }; - } - }); - }(Prism)) diff --git a/components/prism-regex.min.js b/components/prism-regex.min.js index e2a76df602..15de75e94a 100644 --- a/components/prism-regex.min.js +++ b/components/prism-regex.min.js @@ -1 +1 @@ -!function(n){var a={pattern:/\\[\\(){}[\]^$+*?|.]/,alias:"escape"},e=/\\(?:x[\da-fA-F]{2}|u[\da-fA-F]{4}|u\{[\da-fA-F]+\}|c[a-zA-Z]|0[0-7]{0,2}|[123][0-7]{2}|.)/,t="(?:[^\\\\-]|"+e.source+")",i=RegExp(t+"-"+t),r={pattern:/(<|')[^<>']+(?=[>']$)/,lookbehind:!0,alias:"variable"};n.languages.regex={charset:{pattern:/((?:^|[^\\])(?:\\\\)*)\[(?:[^\\\]]|\\[\s\S])*\]/,lookbehind:!0,inside:{"charset-negation":{pattern:/(^\[)\^/,lookbehind:!0,alias:"operator"},"charset-punctuation":{pattern:/^\[|\]$/,alias:"punctuation"},range:{pattern:i,inside:{escape:e,"range-punctuation":{pattern:/-/,alias:"operator"}}},"special-escape":a,charclass:{pattern:/\\[wsd]|\\p{[^{}]+}/i,alias:"class-name"},escape:e}},"special-escape":a,charclass:{pattern:/\.|\\[wsd]|\\p{[^{}]+}/i,alias:"class-name"},backreference:[{pattern:/\\(?![123][0-7]{2})[1-9]/,alias:"keyword"},{pattern:/\\k<[^<>']+>/,alias:"keyword",inside:{"group-name":r}}],anchor:{pattern:/[$^]|\\[ABbGZz]/,alias:"function"},escape:e,group:[{pattern:/\((?:\?(?:<[^<>']+>|'[^<>']+'|[>:]|']+(?=[>']$)/,lookbehind:!0,alias:"variable"};a.languages.regex={charset:{pattern:/((?:^|[^\\])(?:\\\\)*)\[(?:[^\\\]]|\\[\s\S])*\]/,lookbehind:!0,inside:{"charset-negation":{pattern:/(^\[)\^/,lookbehind:!0,alias:"operator"},"charset-punctuation":{pattern:/^\[|\]$/,alias:"punctuation"},range:{pattern:s,inside:{escape:n,"range-punctuation":{pattern:/-/,alias:"operator"}}},"special-escape":e,charclass:{pattern:/\\[wsd]|\\p{[^{}]+}/i,alias:"class-name"},escape:n}},"special-escape":e,charclass:{pattern:/\.|\\[wsd]|\\p{[^{}]+}/i,alias:"class-name"},backreference:[{pattern:/\\(?![123][0-7]{2})[1-9]/,alias:"keyword"},{pattern:/\\k<[^<>']+>/,alias:"keyword",inside:{"group-name":i}}],anchor:{pattern:/[$^]|\\[ABbGZz]/,alias:"function"},escape:n,group:[{pattern:/\((?:\?(?:<[^<>']+>|'[^<>']+'|[>:]|>=?|=>|->|~|[+\-*\/%&^|=!<>]=?|\?\??|\.\.\./,punctuation:/[{}[\];(),.:]/}),Prism.languages.insertBefore("vala","string",{"raw-string":{pattern:/"""[\s\S]*?"""/,greedy:!0,alias:"string"},"template-string":{pattern:/@"[\s\S]*?"/,greedy:!0,inside:{interpolation:{pattern:/\$(?:\([^)]*\)|[a-zA-Z]\w*)/,inside:{delimiter:{pattern:/^\$\(?|\)$/,alias:"punctuation"},rest:Prism.languages.vala}},string:/[\s\S]+/}}}),Prism.languages.insertBefore("vala","keyword",{regex:{pattern:/\/(?:\[(?:[^\]\\\r\n]|\\.)*]|\\.|[^/\\\[\r\n])+\/[imsx]{0,4}(?=\s*(?:$|[\r\n,.;})\]]))/,greedy:!0}}); \ No newline at end of file +Prism.languages.vala=Prism.languages.extend("clike",{"class-name":[{pattern:/\b[A-Z]\w*(?:\.\w+)*\b(?=(?:\?\s+|\*?\s+\*?)\w+)/,inside:{punctuation:/\./}},{pattern:/(\[)[A-Z]\w*(?:\.\w+)*\b/,lookbehind:!0,inside:{punctuation:/\./}},{pattern:/(\b(?:class|interface)\s+[A-Z]\w*(?:\.\w+)*\s*:\s*)[A-Z]\w*(?:\.\w+)*\b/,lookbehind:!0,inside:{punctuation:/\./}},{pattern:/((?:\b(?:class|interface|new|struct|enum)\s+)|(?:catch\s+\())[A-Z]\w*(?:\.\w+)*\b/,lookbehind:!0,inside:{punctuation:/\./}}],constant:/\b[A-Z0-9_]+\b/,function:/\w+(?=\s*\()/,keyword:/\b(?:bool|char|double|float|null|size_t|ssize_t|string|unichar|void|int|int8|int16|int32|int64|long|short|uchar|uint|uint8|uint16|uint32|uint64|ulong|ushort|class|delegate|enum|errordomain|interface|namespace|struct|break|continue|do|for|foreach|return|while|else|if|switch|assert|case|default|abstract|const|dynamic|ensures|extern|inline|internal|override|private|protected|public|requires|signal|static|virtual|volatile|weak|async|owned|unowned|try|catch|finally|throw|as|base|construct|delete|get|in|is|lock|new|out|params|ref|sizeof|set|this|throws|typeof|using|value|var|yield)\b/i,number:/(?:\b0x[\da-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?)(?:f|u?l?)?/i,operator:/\+\+|--|&&|\|\||<<=?|>>=?|=>|->|~|[+\-*\/%&^|=!<>]=?|\?\??|\.\.\./,punctuation:/[{}[\];(),.:]/}),Prism.languages.insertBefore("vala","string",{"raw-string":{pattern:/"""[\s\S]*?"""/,greedy:!0,alias:"string"},"template-string":{pattern:/@"[\s\S]*?"/,greedy:!0,inside:{interpolation:{pattern:/\$(?:\([^)]*\)|[a-zA-Z]\w*)/,inside:{delimiter:{pattern:/^\$\(?|\)$/,alias:"punctuation"},rest:Prism.languages.vala}},string:/[\s\S]+/}}}),Prism.languages.insertBefore("vala","keyword",{regex:{pattern:/\/(?:\[(?:[^\]\\\r\n]|\\.)*]|\\.|[^/\\\[\r\n])+\/[imsx]{0,4}(?=\s*(?:$|[\r\n,.;})\]]))/,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:Prism.languages.regex},"regex-flags":/[a-z]+$/,"regex-delimiter":/^\/|\/$/}}}); \ No newline at end of file diff --git a/prism.js b/prism.js index c4e6e24cf3..86886596b9 100644 --- a/prism.js +++ b/prism.js @@ -1474,7 +1474,17 @@ Prism.languages.insertBefore('javascript', 'keyword', { 'regex': { pattern: /((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)\/(?:\[(?:[^\]\\\r\n]|\\.)*]|\\.|[^/\\\[\r\n])+\/[gimyus]{0,6}(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/, lookbehind: true, - greedy: true + greedy: true, + inside: { + 'regex-source': { + pattern: /^(\/)[\s\S]+(?=\/[a-z]*$)/, + lookbehind: true, + alias: 'language-regex', + inside: Prism.languages.regex + }, + 'regex-flags': /[a-z]+$/, + 'regex-delimiter': /^\/|\/$/ + } }, // This must be declared before keyword because we use "function" inside the look-forward 'function-variable': { diff --git a/tests/languages/javascript!+regex/regex_inclusion.test b/tests/languages/javascript!+regex/regex_inclusion.test index 6de6922438..3720fe7ce5 100644 --- a/tests/languages/javascript!+regex/regex_inclusion.test +++ b/tests/languages/javascript!+regex/regex_inclusion.test @@ -5,7 +5,7 @@ [ ["regex", [ ["regex-delimiter", "/"], - ["language-regex", [ + ["regex-source", [ "a", ["quantifier", "+"], ["group", ["(?:"]], diff --git a/tests/languages/javascript/regex_feature.test b/tests/languages/javascript/regex_feature.test index dddb74eb30..3a23c21af2 100644 --- a/tests/languages/javascript/regex_feature.test +++ b/tests/languages/javascript/regex_feature.test @@ -17,38 +17,110 @@ yield /regex/; ---------------------------------------------------- [ - ["regex", "/foo bar/"], ["punctuation", ";"], - ["regex", "/foo/gimyus"], ["punctuation", ","], - ["regex", "/[\\[\\]]{2,4}(?:foo)*/"], ["punctuation", ";"], - ["regex", "/foo\"test\"bar/"], ["punctuation", ";"], - ["regex", "/foo\\//"], ["punctuation", ";"], - ["regex", "/[]/"], ["punctuation", ";"], - ["regex", "/[\\]/]/"], ["punctuation", ";"], - ["number", "1"], ["operator", "/"], ["number", "4"], ["operator", "+"], ["string", "\"/, not a regex\""], ["punctuation", ";"], - ["regex", "/ '1' '2' '3' '4' '5' /"], - ["punctuation", "["], ["regex", "/foo/"], ["punctuation", "]"], + ["regex", [ + ["regex-delimiter", "/"], + ["regex-source", "foo bar"], + ["regex-delimiter", "/"] + ]], + ["punctuation", ";"], + ["regex", [ + ["regex-delimiter", "/"], + ["regex-source", "foo"], + ["regex-delimiter", "/"], + ["regex-flags", "gimyus"] + ]], + ["punctuation", ","], + ["regex", [ + ["regex-delimiter", "/"], + ["regex-source", "[\\[\\]]{2,4}(?:foo)*"], + ["regex-delimiter", "/"] + ]], + ["punctuation", ";"], + ["regex", [ + ["regex-delimiter", "/"], + ["regex-source", "foo\"test\"bar"], + ["regex-delimiter", "/"] + ]], + ["punctuation", ";"], + ["regex", [ + ["regex-delimiter", "/"], + ["regex-source", "foo\\/"], + ["regex-delimiter", "/"] + ]], + ["punctuation", ";"], + ["regex", [ + ["regex-delimiter", "/"], + ["regex-source", "[]"], + ["regex-delimiter", "/"] + ]], + ["punctuation", ";"], + ["regex", [ + ["regex-delimiter", "/"], + ["regex-source", "[\\]/]"], + ["regex-delimiter", "/"] + ]], + ["punctuation", ";"], + ["number", "1"], + ["operator", "/"], + ["number", "4"], + ["operator", "+"], + ["string", "\"/, not a regex\""], + ["punctuation", ";"], + ["regex", [ + ["regex-delimiter", "/"], + ["regex-source", " '1' '2' '3' '4' '5' "], + ["regex-delimiter", "/"] + ]], + ["punctuation", "["], + ["regex", [ + ["regex-delimiter", "/"], + ["regex-source", "foo"], + ["regex-delimiter", "/"] + ]], + ["punctuation", "]"], ["keyword", "let"], " a ", ["operator", "="], - ["regex", "/regex/m"], + ["regex", [ + ["regex-delimiter", "/"], + ["regex-source", "regex"], + ["regex-delimiter", "/"], + ["regex-flags", "m"] + ]], ["comment", "// comment"], ["keyword", "let"], " b ", ["operator", "="], " condition ", ["operator", "?"], - ["regex", "/regex/"], + ["regex", [ + ["regex-delimiter", "/"], + ["regex-source", "regex"], + ["regex-delimiter", "/"] + ]], ["operator", ":"], - ["regex", "/another one/"], + ["regex", [ + ["regex-delimiter", "/"], + ["regex-source", "another one"], + ["regex-delimiter", "/"] + ]], ["keyword", "return"], - ["regex", "/regex/"], + ["regex", [ + ["regex-delimiter", "/"], + ["regex-source", "regex"], + ["regex-delimiter", "/"] + ]], ["punctuation", ";"], ["keyword", "yield"], - ["regex", "/regex/"], + ["regex", [ + ["regex-delimiter", "/"], + ["regex-source", "regex"], + ["regex-delimiter", "/"] + ]], ["punctuation", ";"] ] ---------------------------------------------------- -Checks for regex. +Checks for regex. \ No newline at end of file diff --git a/tests/languages/markup+javascript+csharp+aspnet/script_feature.test b/tests/languages/markup+javascript+csharp+aspnet/script_feature.test index 375a02fb4b..6e48573cf3 100644 --- a/tests/languages/markup+javascript+csharp+aspnet/script_feature.test +++ b/tests/languages/markup+javascript+csharp+aspnet/script_feature.test @@ -21,7 +21,10 @@ ["punctuation", ">"] ]], ["asp-script", [ - ["preprocessor", ["#", ["directive", "pragma"]]] + ["preprocessor", [ + "#", + ["directive", "pragma"] + ]] ]], ["tag", [ ["tag", [ @@ -40,7 +43,11 @@ ]], ["script", [ ["language-javascript", [ - ["regex", "/foo/"] + ["regex", [ + ["regex-delimiter", "/"], + ["regex-source", "foo"], + ["regex-delimiter", "/"] + ]] ]] ]], ["tag", [ From d36ea993766e9d72fccad6a5b580768ffba68710 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Fri, 11 Sep 2020 15:15:56 +0200 Subject: [PATCH 0628/1100] Autoloader: Fixed file detection regexes (#2549) --- plugins/autoloader/prism-autoloader.js | 4 ++-- plugins/autoloader/prism-autoloader.min.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/autoloader/prism-autoloader.js b/plugins/autoloader/prism-autoloader.js index ee40a44619..2ed92b4df6 100644 --- a/plugins/autoloader/prism-autoloader.js +++ b/plugins/autoloader/prism-autoloader.js @@ -233,8 +233,8 @@ var script = Prism.util.currentScript(); if (script) { - var autoloaderFile = /\bplugins\/autoloader\/prism-autoloader\.(?:min\.)js(?:\?[^\r\n/]*)?$/i; - var prismFile = /(^|\/)[\w-]+\.(?:min\.)js(?:\?[^\r\n/]*)?$/i; + var autoloaderFile = /\bplugins\/autoloader\/prism-autoloader\.(?:min\.)?js(?:\?[^\r\n/]*)?$/i; + var prismFile = /(^|\/)[\w-]+\.(?:min\.)?js(?:\?[^\r\n/]*)?$/i; var autoloaderPath = script.getAttribute('data-autoloader-path'); if (autoloaderPath != null) { diff --git a/plugins/autoloader/prism-autoloader.min.js b/plugins/autoloader/prism-autoloader.min.js index 0ef991a4e8..188b1c1668 100644 --- a/plugins/autoloader/prism-autoloader.min.js +++ b/plugins/autoloader/prism-autoloader.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof self&&self.Prism&&self.document&&document.createElement){var l={javascript:"clike",actionscript:"javascript",arduino:"cpp",aspnet:["markup","csharp"],bison:"c",c:"clike",csharp:"clike",cpp:"c",coffeescript:"javascript",crystal:"ruby","css-extras":"css",d:"clike",dart:"clike",django:"markup-templating",ejs:["javascript","markup-templating"],etlua:["lua","markup-templating"],erb:["ruby","markup-templating"],fsharp:"clike","firestore-security-rules":"clike",flow:"javascript",ftl:"markup-templating",gml:"clike",glsl:"c",go:"clike",groovy:"clike",haml:"ruby",handlebars:"markup-templating",haxe:"clike",hlsl:"c",java:"clike",javadoc:["markup","java","javadoclike"],jolie:"clike",jsdoc:["javascript","javadoclike","typescript"],"js-extras":"javascript",json5:"json",jsonp:"json","js-templates":"javascript",kotlin:"clike",latte:["clike","markup-templating","php"],less:"css",lilypond:"scheme",markdown:"markup","markup-templating":"markup",mongodb:"javascript",n4js:"javascript",nginx:"clike",objectivec:"c",opencl:"c",parser:"markup",php:["clike","markup-templating"],phpdoc:["php","javadoclike"],"php-extras":"php",plsql:"sql",processing:"clike",protobuf:"clike",pug:["markup","javascript"],purebasic:"clike",purescript:"haskell",qml:"javascript",qore:"clike",racket:"scheme",jsx:["markup","javascript"],tsx:["jsx","typescript"],reason:"clike",ruby:"clike",sass:"css",scss:"css",scala:"java","shell-session":"bash",smarty:"markup-templating",solidity:"clike",soy:"markup-templating",sparql:"turtle",sqf:"clike",swift:"clike","t4-cs":["t4-templating","csharp"],"t4-vb":["t4-templating","vbnet"],tap:"yaml",tt2:["clike","markup-templating"],textile:"markup",twig:"markup",typescript:"javascript",vala:"clike",vbnet:"basic",velocity:"markup",wiki:"markup",xeora:"markup","xml-doc":"markup",xquery:"markup"},n={html:"markup",xml:"markup",svg:"markup",mathml:"markup",ssml:"markup",atom:"markup",rss:"markup",js:"javascript",g4:"antlr4",adoc:"asciidoc",shell:"bash",shortcode:"bbcode",rbnf:"bnf",oscript:"bsl",cs:"csharp",dotnet:"csharp",coffee:"coffeescript",conc:"concurnas",jinja2:"django","dns-zone":"dns-zone-file",dockerfile:"docker",eta:"ejs",xlsx:"excel-formula",xls:"excel-formula",gamemakerlanguage:"gml",hs:"haskell",gitignore:"ignore",hgignore:"ignore",npmignore:"ignore",webmanifest:"json",kt:"kotlin",kts:"kotlin",tex:"latex",context:"latex",ly:"lilypond",emacs:"lisp",elisp:"lisp","emacs-lisp":"lisp",md:"markdown",moon:"moonscript",n4jsd:"n4js",nani:"naniscript",objc:"objectivec",objectpascal:"pascal",px:"pcaxis",pcode:"peoplecode",pq:"powerquery",mscript:"powerquery",pbfasm:"purebasic",purs:"purescript",py:"python",rkt:"racket",rpy:"renpy",robot:"robotframework",rb:"ruby",sol:"solidity",sln:"solution-file",rq:"sparql",t4:"t4-cs",trig:"turtle",ts:"typescript",tsconfig:"typoscript",uscript:"unrealscript",uc:"unrealscript",vb:"visual-basic",vba:"visual-basic",xeoracube:"xeora",yml:"yaml"},p={},e="components/",a=Prism.util.currentScript();if(a){var r=/\bplugins\/autoloader\/prism-autoloader\.(?:min\.)js(?:\?[^\r\n/]*)?$/i,t=/(^|\/)[\w-]+\.(?:min\.)js(?:\?[^\r\n/]*)?$/i,i=a.getAttribute("data-autoloader-path");if(null!=i)e=i.trim().replace(/\/?$/,"/");else{var s=a.src;r.test(s)?e=s.replace(r,"components/"):t.test(s)&&(e=s.replace(t,"$1components/"))}}var o=Prism.plugins.autoloader={languages_path:e,use_minified:!0,loadLanguages:m};Prism.hooks.add("complete",function(e){var a=e.element,r=e.language;if(a&&r&&"none"!==r){var t=function(e){var a=(e.getAttribute("data-dependencies")||"").trim();if(!a){var r=e.parentElement;r&&"pre"===r.tagName.toLowerCase()&&(a=(r.getAttribute("data-dependencies")||"").trim())}return a?a.split(/\s*,\s*/g):[]}(a);t.push(r),t.every(u)||m(t,function(){Prism.highlightElement(a)})}})}function u(e){if(0<=e.indexOf("!"))return!1;if((e=n[e]||e)in Prism.languages)return!0;var a=p[e];return a&&!a.error&&!1===a.loading}function m(e,a,r){"string"==typeof e&&(e=[e]);var t=e.length,i=0,s=!1;function c(){s||++i===t&&a&&a(e)}0!==t?e.forEach(function(e){!function(a,r,t){var i=0<=a.indexOf("!");function e(){var e=p[a];e||(e=p[a]={callbacks:[]}),e.callbacks.push({success:r,error:t}),!i&&u(a)?k(a,"success"):!i&&e.error?k(a,"error"):!i&&e.loading||(e.loading=!0,e.error=!1,function(e,a,r){var t=document.createElement("script");t.src=e,t.async=!0,t.onload=function(){document.body.removeChild(t),a&&a()},t.onerror=function(){document.body.removeChild(t),r&&r()},document.body.appendChild(t)}(function(e){return o.languages_path+"prism-"+e+(o.use_minified?".min":"")+".js"}(a),function(){e.loading=!1,k(a,"success")},function(){e.loading=!1,e.error=!0,k(a,"error")}))}a=a.replace("!",""),a=n[a]||a;var s=l[a];s&&s.length?m(s,e,t):e()}(e,c,function(){s||(s=!0,r&&r(e))})}):a&&setTimeout(a,0)}function k(e,a){if(p[e]){for(var r=p[e].callbacks,t=0,i=r.length;t Date: Fri, 11 Sep 2020 15:24:20 +0200 Subject: [PATCH 0629/1100] Shell-Session: Added aliases (#2548) --- components.js | 2 +- components.json | 1 + components/prism-shell-session.js | 2 ++ components/prism-shell-session.min.js | 2 +- plugins/autoloader/prism-autoloader.js | 2 ++ plugins/autoloader/prism-autoloader.min.js | 2 +- plugins/show-language/prism-show-language.js | 2 ++ plugins/show-language/prism-show-language.min.js | 2 +- 8 files changed, 11 insertions(+), 4 deletions(-) diff --git a/components.js b/components.js index 8c4b3d066a..32aacca6ed 100644 --- a/components.js +++ b/components.js @@ -1,2 +1,2 @@ -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml","ssml","atom","rss"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","ssml":"SSML","atom":"Atom","rss":"RSS"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","optional":"regex","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"ABNF","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"agda":{"title":"Agda","owner":"xy-ren"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"dkern"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"BNF","alias":"rbnf","aliasTitles":{"rbnf":"RBNF"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"bsl":{"title":"BSL (1C:Enterprise)","alias":"oscript","aliasTitles":{"oscript":"OneScript"},"owner":"Diversus23"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"clojure":{"title":"Clojure","owner":"troglotit"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"cypher":{"title":"Cypher","owner":"RunDevelopment"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dax":{"title":"DAX","owner":"peterbud"},"dhall":{"title":"Dhall","owner":"RunDevelopment"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"EBNF","owner":"RunDevelopment"},"editorconfig":{"title":"EditorConfig","owner":"osipxd"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"c","owner":"Golmote"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","optional":["markdown"],"owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"hlsl":{"title":"HLSL","require":"c","owner":"RunDevelopment"},"http":{"title":"HTTP","optional":["css","javascript","json","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"ignore":{"title":".ignore","owner":"osipxd","alias":["gitignore","hgignore","npmignore"],"aliasTitles":{"gitignore":".gitignore","hgignore":".hgignore","npmignore":".npmignore"}},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike","typescript"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","alias":"webmanifest","aliasTitles":{"webmanifest":"Web App Manifest"},"owner":"CupOfTea696"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"jsstacktrace":{"title":"JS stack trace","owner":"sbrl"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","alias":["kt","kts"],"aliasTitles":{"kts":"Kotlin Script"},"require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"mongodb":{"title":"MongoDB","owner":"airs0urce","require":"javascript"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"naniscript":{"title":"Naninovel Script","owner":"Elringus","alias":"nani"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"purebasic":{"title":"PureBasic","require":"clike","alias":"pbfasm","owner":"HeX0R101"},"purescript":{"title":"PureScript","require":"haskell","alias":"purs","owner":"sriharshachilakapati"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"racket":{"title":"Racket","require":"scheme","alias":"rkt","owner":"RunDevelopment"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","owner":"RunDevelopment"},"renpy":{"title":"Ren'py","alias":"rpy","owner":"HyuchiaDiego"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","owner":"RunDevelopment"},"smali":{"title":"Smali","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"solidity":{"title":"Solidity (Ethereum)","alias":"sol","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"stan":{"title":"Stan","owner":"RunDevelopment"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","vbnet"],"owner":"RunDevelopment"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"typoscript":{"title":"TypoScript","alias":"tsconfig","aliasTitles":{"tsconfig":"TSConfig"},"owner":"dkern"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","optional":"regex","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":["vb","vba"],"aliasTitles":{"vba":"VBA"},"owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xml-doc":{"title":"XML doc (.net)","require":"markup","modify":["csharp","fsharp","vbnet"],"owner":"RunDevelopment"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"yang":{"title":"YANG","owner":"RunDevelopment"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml","ssml","atom","rss"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","ssml":"SSML","atom":"Atom","rss":"RSS"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","optional":"regex","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"ABNF","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"agda":{"title":"Agda","owner":"xy-ren"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"dkern"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"BNF","alias":"rbnf","aliasTitles":{"rbnf":"RBNF"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"bsl":{"title":"BSL (1C:Enterprise)","alias":"oscript","aliasTitles":{"oscript":"OneScript"},"owner":"Diversus23"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"clojure":{"title":"Clojure","owner":"troglotit"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"cypher":{"title":"Cypher","owner":"RunDevelopment"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dax":{"title":"DAX","owner":"peterbud"},"dhall":{"title":"Dhall","owner":"RunDevelopment"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"EBNF","owner":"RunDevelopment"},"editorconfig":{"title":"EditorConfig","owner":"osipxd"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"c","owner":"Golmote"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","optional":["markdown"],"owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"hlsl":{"title":"HLSL","require":"c","owner":"RunDevelopment"},"http":{"title":"HTTP","optional":["css","javascript","json","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"ignore":{"title":".ignore","owner":"osipxd","alias":["gitignore","hgignore","npmignore"],"aliasTitles":{"gitignore":".gitignore","hgignore":".hgignore","npmignore":".npmignore"}},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike","typescript"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","alias":"webmanifest","aliasTitles":{"webmanifest":"Web App Manifest"},"owner":"CupOfTea696"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"jsstacktrace":{"title":"JS stack trace","owner":"sbrl"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","alias":["kt","kts"],"aliasTitles":{"kts":"Kotlin Script"},"require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"mongodb":{"title":"MongoDB","owner":"airs0urce","require":"javascript"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"naniscript":{"title":"Naninovel Script","owner":"Elringus","alias":"nani"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"purebasic":{"title":"PureBasic","require":"clike","alias":"pbfasm","owner":"HeX0R101"},"purescript":{"title":"PureScript","require":"haskell","alias":"purs","owner":"sriharshachilakapati"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"racket":{"title":"Racket","require":"scheme","alias":"rkt","owner":"RunDevelopment"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","owner":"RunDevelopment"},"renpy":{"title":"Ren'py","alias":"rpy","owner":"HyuchiaDiego"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","alias":["sh-session","shellsession"],"owner":"RunDevelopment"},"smali":{"title":"Smali","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"solidity":{"title":"Solidity (Ethereum)","alias":"sol","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"stan":{"title":"Stan","owner":"RunDevelopment"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","vbnet"],"owner":"RunDevelopment"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"typoscript":{"title":"TypoScript","alias":"tsconfig","aliasTitles":{"tsconfig":"TSConfig"},"owner":"dkern"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","optional":"regex","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":["vb","vba"],"aliasTitles":{"vba":"VBA"},"owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xml-doc":{"title":"XML doc (.net)","require":"markup","modify":["csharp","fsharp","vbnet"],"owner":"RunDevelopment"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"yang":{"title":"YANG","owner":"RunDevelopment"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; if (typeof module !== 'undefined' && module.exports) { module.exports = components; } \ No newline at end of file diff --git a/components.json b/components.json index bdd55a732b..9aa66f86fb 100644 --- a/components.json +++ b/components.json @@ -1032,6 +1032,7 @@ "shell-session": { "title": "Shell session", "require": "bash", + "alias": ["sh-session", "shellsession"], "owner": "RunDevelopment" }, "smali": { diff --git a/components/prism-shell-session.js b/components/prism-shell-session.js index 645b0a0544..1335e13a81 100644 --- a/components/prism-shell-session.js +++ b/components/prism-shell-session.js @@ -47,4 +47,6 @@ 'output': /.(?:.*(?:[\r\n]|.$))*/ }; + Prism.languages['sh-session'] = Prism.languages['shellsession'] = Prism.languages['shell-session']; + }(Prism)); diff --git a/components/prism-shell-session.min.js b/components/prism-shell-session.min.js index 57578e64d9..c4f3e7198e 100644 --- a/components/prism-shell-session.min.js +++ b/components/prism-shell-session.min.js @@ -1 +1 @@ -!function(n){var s=["([\"'])(?:\\\\[^]|\\$\\([^)]+\\)|`[^`]+`|(?!\\1)[^\\\\])*\\1","<<-?\\s*([\"']?)(\\w+)\\2\\s[^]*?[\r\n]\\3"].join("|");n.languages["shell-session"]={info:{pattern:/^[^\r\n$#*!]+(?=[$#])/m,alias:"punctuation",inside:{path:{pattern:/(:)[\s\S]+/,lookbehind:!0},user:/^[^\s@:$#*!/\\]+@[^\s@:$#*!/\\]+(?=:|$)/,punctuation:/:/}},command:{pattern:RegExp("[$#](?:[^\\\\\r\n'\"<]|\\\\.|<>)+".replace(/<>/g,function(){return s})),greedy:!0,inside:{bash:{pattern:/(^[$#]\s*)[\s\S]+/,lookbehind:!0,alias:"language-bash",inside:n.languages.bash},"shell-symbol":{pattern:/^[$#]/,alias:"important"}}},output:/.(?:.*(?:[\r\n]|.$))*/}}(Prism); \ No newline at end of file +!function(s){var n=["([\"'])(?:\\\\[^]|\\$\\([^)]+\\)|`[^`]+`|(?!\\1)[^\\\\])*\\1","<<-?\\s*([\"']?)(\\w+)\\2\\s[^]*?[\r\n]\\3"].join("|");s.languages["shell-session"]={info:{pattern:/^[^\r\n$#*!]+(?=[$#])/m,alias:"punctuation",inside:{path:{pattern:/(:)[\s\S]+/,lookbehind:!0},user:/^[^\s@:$#*!/\\]+@[^\s@:$#*!/\\]+(?=:|$)/,punctuation:/:/}},command:{pattern:RegExp("[$#](?:[^\\\\\r\n'\"<]|\\\\.|<>)+".replace(/<>/g,function(){return n})),greedy:!0,inside:{bash:{pattern:/(^[$#]\s*)[\s\S]+/,lookbehind:!0,alias:"language-bash",inside:s.languages.bash},"shell-symbol":{pattern:/^[$#]/,alias:"important"}}},output:/.(?:.*(?:[\r\n]|.$))*/},s.languages["sh-session"]=s.languages.shellsession=s.languages["shell-session"]}(Prism); \ No newline at end of file diff --git a/plugins/autoloader/prism-autoloader.js b/plugins/autoloader/prism-autoloader.js index 2ed92b4df6..b985ed16d4 100644 --- a/plugins/autoloader/prism-autoloader.js +++ b/plugins/autoloader/prism-autoloader.js @@ -204,6 +204,8 @@ "rpy": "renpy", "robot": "robotframework", "rb": "ruby", + "sh-session": "shell-session", + "shellsession": "shell-session", "sol": "solidity", "sln": "solution-file", "rq": "sparql", diff --git a/plugins/autoloader/prism-autoloader.min.js b/plugins/autoloader/prism-autoloader.min.js index 188b1c1668..6e4d0fdbe6 100644 --- a/plugins/autoloader/prism-autoloader.min.js +++ b/plugins/autoloader/prism-autoloader.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof self&&self.Prism&&self.document&&document.createElement){var l={javascript:"clike",actionscript:"javascript",arduino:"cpp",aspnet:["markup","csharp"],bison:"c",c:"clike",csharp:"clike",cpp:"c",coffeescript:"javascript",crystal:"ruby","css-extras":"css",d:"clike",dart:"clike",django:"markup-templating",ejs:["javascript","markup-templating"],etlua:["lua","markup-templating"],erb:["ruby","markup-templating"],fsharp:"clike","firestore-security-rules":"clike",flow:"javascript",ftl:"markup-templating",gml:"clike",glsl:"c",go:"clike",groovy:"clike",haml:"ruby",handlebars:"markup-templating",haxe:"clike",hlsl:"c",java:"clike",javadoc:["markup","java","javadoclike"],jolie:"clike",jsdoc:["javascript","javadoclike","typescript"],"js-extras":"javascript",json5:"json",jsonp:"json","js-templates":"javascript",kotlin:"clike",latte:["clike","markup-templating","php"],less:"css",lilypond:"scheme",markdown:"markup","markup-templating":"markup",mongodb:"javascript",n4js:"javascript",nginx:"clike",objectivec:"c",opencl:"c",parser:"markup",php:["clike","markup-templating"],phpdoc:["php","javadoclike"],"php-extras":"php",plsql:"sql",processing:"clike",protobuf:"clike",pug:["markup","javascript"],purebasic:"clike",purescript:"haskell",qml:"javascript",qore:"clike",racket:"scheme",jsx:["markup","javascript"],tsx:["jsx","typescript"],reason:"clike",ruby:"clike",sass:"css",scss:"css",scala:"java","shell-session":"bash",smarty:"markup-templating",solidity:"clike",soy:"markup-templating",sparql:"turtle",sqf:"clike",swift:"clike","t4-cs":["t4-templating","csharp"],"t4-vb":["t4-templating","vbnet"],tap:"yaml",tt2:["clike","markup-templating"],textile:"markup",twig:"markup",typescript:"javascript",vala:"clike",vbnet:"basic",velocity:"markup",wiki:"markup",xeora:"markup","xml-doc":"markup",xquery:"markup"},n={html:"markup",xml:"markup",svg:"markup",mathml:"markup",ssml:"markup",atom:"markup",rss:"markup",js:"javascript",g4:"antlr4",adoc:"asciidoc",shell:"bash",shortcode:"bbcode",rbnf:"bnf",oscript:"bsl",cs:"csharp",dotnet:"csharp",coffee:"coffeescript",conc:"concurnas",jinja2:"django","dns-zone":"dns-zone-file",dockerfile:"docker",eta:"ejs",xlsx:"excel-formula",xls:"excel-formula",gamemakerlanguage:"gml",hs:"haskell",gitignore:"ignore",hgignore:"ignore",npmignore:"ignore",webmanifest:"json",kt:"kotlin",kts:"kotlin",tex:"latex",context:"latex",ly:"lilypond",emacs:"lisp",elisp:"lisp","emacs-lisp":"lisp",md:"markdown",moon:"moonscript",n4jsd:"n4js",nani:"naniscript",objc:"objectivec",objectpascal:"pascal",px:"pcaxis",pcode:"peoplecode",pq:"powerquery",mscript:"powerquery",pbfasm:"purebasic",purs:"purescript",py:"python",rkt:"racket",rpy:"renpy",robot:"robotframework",rb:"ruby",sol:"solidity",sln:"solution-file",rq:"sparql",t4:"t4-cs",trig:"turtle",ts:"typescript",tsconfig:"typoscript",uscript:"unrealscript",uc:"unrealscript",vb:"visual-basic",vba:"visual-basic",xeoracube:"xeora",yml:"yaml"},p={},e="components/",a=Prism.util.currentScript();if(a){var r=/\bplugins\/autoloader\/prism-autoloader\.(?:min\.)?js(?:\?[^\r\n/]*)?$/i,t=/(^|\/)[\w-]+\.(?:min\.)?js(?:\?[^\r\n/]*)?$/i,i=a.getAttribute("data-autoloader-path");if(null!=i)e=i.trim().replace(/\/?$/,"/");else{var s=a.src;r.test(s)?e=s.replace(r,"components/"):t.test(s)&&(e=s.replace(t,"$1components/"))}}var o=Prism.plugins.autoloader={languages_path:e,use_minified:!0,loadLanguages:m};Prism.hooks.add("complete",function(e){var a=e.element,r=e.language;if(a&&r&&"none"!==r){var t=function(e){var a=(e.getAttribute("data-dependencies")||"").trim();if(!a){var r=e.parentElement;r&&"pre"===r.tagName.toLowerCase()&&(a=(r.getAttribute("data-dependencies")||"").trim())}return a?a.split(/\s*,\s*/g):[]}(a);t.push(r),t.every(u)||m(t,function(){Prism.highlightElement(a)})}})}function u(e){if(0<=e.indexOf("!"))return!1;if((e=n[e]||e)in Prism.languages)return!0;var a=p[e];return a&&!a.error&&!1===a.loading}function m(e,a,r){"string"==typeof e&&(e=[e]);var t=e.length,i=0,s=!1;function c(){s||++i===t&&a&&a(e)}0!==t?e.forEach(function(e){!function(a,r,t){var i=0<=a.indexOf("!");function e(){var e=p[a];e||(e=p[a]={callbacks:[]}),e.callbacks.push({success:r,error:t}),!i&&u(a)?k(a,"success"):!i&&e.error?k(a,"error"):!i&&e.loading||(e.loading=!0,e.error=!1,function(e,a,r){var t=document.createElement("script");t.src=e,t.async=!0,t.onload=function(){document.body.removeChild(t),a&&a()},t.onerror=function(){document.body.removeChild(t),r&&r()},document.body.appendChild(t)}(function(e){return o.languages_path+"prism-"+e+(o.use_minified?".min":"")+".js"}(a),function(){e.loading=!1,k(a,"success")},function(){e.loading=!1,e.error=!0,k(a,"error")}))}a=a.replace("!",""),a=n[a]||a;var s=l[a];s&&s.length?m(s,e,t):e()}(e,c,function(){s||(s=!0,r&&r(e))})}):a&&setTimeout(a,0)}function k(e,a){if(p[e]){for(var r=p[e].callbacks,t=0,i=r.length;t Date: Fri, 11 Sep 2020 12:07:11 -0400 Subject: [PATCH 0630/1100] Added support for Birb (#2542) --- components.js | 2 +- components.json | 5 +++ components/prism-birb.js | 23 ++++++++++++++ components/prism-birb.min.js | 1 + examples/prism-birb.html | 31 ++++++++++++++++++ plugins/autoloader/prism-autoloader.js | 1 + plugins/autoloader/prism-autoloader.min.js | 2 +- tests/languages/birb/function_feature.test | 25 +++++++++++++++ tests/languages/birb/keyword_feature.test | 37 ++++++++++++++++++++++ tests/languages/birb/metadata_feature.test | 11 +++++++ tests/languages/birb/operator_feature.test | 27 ++++++++++++++++ tests/languages/birb/string_feature.test | 21 ++++++++++++ 12 files changed, 184 insertions(+), 2 deletions(-) create mode 100644 components/prism-birb.js create mode 100644 components/prism-birb.min.js create mode 100644 examples/prism-birb.html create mode 100644 tests/languages/birb/function_feature.test create mode 100644 tests/languages/birb/keyword_feature.test create mode 100644 tests/languages/birb/metadata_feature.test create mode 100644 tests/languages/birb/operator_feature.test create mode 100644 tests/languages/birb/string_feature.test diff --git a/components.js b/components.js index 32aacca6ed..b569acdd98 100644 --- a/components.js +++ b/components.js @@ -1,2 +1,2 @@ -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml","ssml","atom","rss"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","ssml":"SSML","atom":"Atom","rss":"RSS"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","optional":"regex","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"ABNF","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"agda":{"title":"Agda","owner":"xy-ren"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"dkern"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"BNF","alias":"rbnf","aliasTitles":{"rbnf":"RBNF"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"bsl":{"title":"BSL (1C:Enterprise)","alias":"oscript","aliasTitles":{"oscript":"OneScript"},"owner":"Diversus23"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"clojure":{"title":"Clojure","owner":"troglotit"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"cypher":{"title":"Cypher","owner":"RunDevelopment"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dax":{"title":"DAX","owner":"peterbud"},"dhall":{"title":"Dhall","owner":"RunDevelopment"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"EBNF","owner":"RunDevelopment"},"editorconfig":{"title":"EditorConfig","owner":"osipxd"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"c","owner":"Golmote"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","optional":["markdown"],"owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"hlsl":{"title":"HLSL","require":"c","owner":"RunDevelopment"},"http":{"title":"HTTP","optional":["css","javascript","json","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"ignore":{"title":".ignore","owner":"osipxd","alias":["gitignore","hgignore","npmignore"],"aliasTitles":{"gitignore":".gitignore","hgignore":".hgignore","npmignore":".npmignore"}},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike","typescript"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","alias":"webmanifest","aliasTitles":{"webmanifest":"Web App Manifest"},"owner":"CupOfTea696"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"jsstacktrace":{"title":"JS stack trace","owner":"sbrl"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","alias":["kt","kts"],"aliasTitles":{"kts":"Kotlin Script"},"require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"mongodb":{"title":"MongoDB","owner":"airs0urce","require":"javascript"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"naniscript":{"title":"Naninovel Script","owner":"Elringus","alias":"nani"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"purebasic":{"title":"PureBasic","require":"clike","alias":"pbfasm","owner":"HeX0R101"},"purescript":{"title":"PureScript","require":"haskell","alias":"purs","owner":"sriharshachilakapati"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"racket":{"title":"Racket","require":"scheme","alias":"rkt","owner":"RunDevelopment"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","owner":"RunDevelopment"},"renpy":{"title":"Ren'py","alias":"rpy","owner":"HyuchiaDiego"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","alias":["sh-session","shellsession"],"owner":"RunDevelopment"},"smali":{"title":"Smali","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"solidity":{"title":"Solidity (Ethereum)","alias":"sol","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"stan":{"title":"Stan","owner":"RunDevelopment"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","vbnet"],"owner":"RunDevelopment"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"typoscript":{"title":"TypoScript","alias":"tsconfig","aliasTitles":{"tsconfig":"TSConfig"},"owner":"dkern"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","optional":"regex","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":["vb","vba"],"aliasTitles":{"vba":"VBA"},"owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xml-doc":{"title":"XML doc (.net)","require":"markup","modify":["csharp","fsharp","vbnet"],"owner":"RunDevelopment"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"yang":{"title":"YANG","owner":"RunDevelopment"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml","ssml","atom","rss"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","ssml":"SSML","atom":"Atom","rss":"RSS"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","optional":"regex","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"ABNF","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"agda":{"title":"Agda","owner":"xy-ren"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"dkern"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"birb":{"title":"Birb","require":"clike","owner":"Calamity210"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"BNF","alias":"rbnf","aliasTitles":{"rbnf":"RBNF"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"bsl":{"title":"BSL (1C:Enterprise)","alias":"oscript","aliasTitles":{"oscript":"OneScript"},"owner":"Diversus23"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"clojure":{"title":"Clojure","owner":"troglotit"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"cypher":{"title":"Cypher","owner":"RunDevelopment"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dax":{"title":"DAX","owner":"peterbud"},"dhall":{"title":"Dhall","owner":"RunDevelopment"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"EBNF","owner":"RunDevelopment"},"editorconfig":{"title":"EditorConfig","owner":"osipxd"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"c","owner":"Golmote"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","optional":["markdown"],"owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"hlsl":{"title":"HLSL","require":"c","owner":"RunDevelopment"},"http":{"title":"HTTP","optional":["css","javascript","json","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"ignore":{"title":".ignore","owner":"osipxd","alias":["gitignore","hgignore","npmignore"],"aliasTitles":{"gitignore":".gitignore","hgignore":".hgignore","npmignore":".npmignore"}},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike","typescript"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","alias":"webmanifest","aliasTitles":{"webmanifest":"Web App Manifest"},"owner":"CupOfTea696"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"jsstacktrace":{"title":"JS stack trace","owner":"sbrl"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","alias":["kt","kts"],"aliasTitles":{"kts":"Kotlin Script"},"require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"mongodb":{"title":"MongoDB","owner":"airs0urce","require":"javascript"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"naniscript":{"title":"Naninovel Script","owner":"Elringus","alias":"nani"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"purebasic":{"title":"PureBasic","require":"clike","alias":"pbfasm","owner":"HeX0R101"},"purescript":{"title":"PureScript","require":"haskell","alias":"purs","owner":"sriharshachilakapati"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"racket":{"title":"Racket","require":"scheme","alias":"rkt","owner":"RunDevelopment"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","owner":"RunDevelopment"},"renpy":{"title":"Ren'py","alias":"rpy","owner":"HyuchiaDiego"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","alias":["sh-session","shellsession"],"owner":"RunDevelopment"},"smali":{"title":"Smali","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"solidity":{"title":"Solidity (Ethereum)","alias":"sol","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"stan":{"title":"Stan","owner":"RunDevelopment"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","vbnet"],"owner":"RunDevelopment"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"typoscript":{"title":"TypoScript","alias":"tsconfig","aliasTitles":{"tsconfig":"TSConfig"},"owner":"dkern"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","optional":"regex","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":["vb","vba"],"aliasTitles":{"vba":"VBA"},"owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xml-doc":{"title":"XML doc (.net)","require":"markup","modify":["csharp","fsharp","vbnet"],"owner":"RunDevelopment"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"yang":{"title":"YANG","owner":"RunDevelopment"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; if (typeof module !== 'undefined' && module.exports) { module.exports = components; } \ No newline at end of file diff --git a/components.json b/components.json index 9aa66f86fb..a7b3c9c538 100644 --- a/components.json +++ b/components.json @@ -179,6 +179,11 @@ }, "owner": "RunDevelopment" }, + "birb": { + "title": "Birb", + "require": "clike", + "owner": "Calamity210" + }, "bison": { "title": "Bison", "require": "c", diff --git a/components/prism-birb.js b/components/prism-birb.js new file mode 100644 index 0000000000..de6cd6892a --- /dev/null +++ b/components/prism-birb.js @@ -0,0 +1,23 @@ +Prism.languages.birb = Prism.languages.extend('clike', { + 'class-name': [ + /\b[A-Z](?:[\d_]*[a-zA-Z]\w*)?\b/, + + // matches variable and function return types (parameters as well). + /\b[A-Z]\w*(?=\s+\w+\s*[;,=()])/ + ], + 'string': { + pattern: /r?("|')(?:\\.|(?!\1)[^\\])*\1/, + greedy: true + }, + 'keyword': /\b(?:assert|break|case|class|const|default|else|enum|final|follows|for|grab|if|nest|next|new|noSeeb|return|static|switch|throw|var|void|while)\b/, + 'variable': /\b[a-z_]\w*\b/, + 'operator': /\+\+|--|&&|\|\||<<=?|>>=?|~(?:\/=?)?|[+\-*\/%&^|=!<>]=?|\?|:/, +}); + +Prism.languages.insertBefore('birb','function',{ + 'metadata': { + pattern: /<\w+>/, + greedy: true, + alias: 'symbol' + } +}); \ No newline at end of file diff --git a/components/prism-birb.min.js b/components/prism-birb.min.js new file mode 100644 index 0000000000..0e111ba8f2 --- /dev/null +++ b/components/prism-birb.min.js @@ -0,0 +1 @@ +Prism.languages.birb=Prism.languages.extend("clike",{"class-name":[/\b[A-Z](?:[\d_]*[a-zA-Z]\w*)?\b/,/\b[A-Z]\w*(?=\s+\w+\s*[;,=()])/],string:{pattern:/r?("|')(?:\\.|(?!\1)[^\\])*\1/,greedy:!0},keyword:/\b(?:assert|break|case|class|const|default|else|enum|final|follows|for|grab|if|nest|next|new|noSeeb|return|static|switch|throw|var|void|while)\b/,variable:/\b[a-z_]\w*\b/,operator:/\+\+|--|&&|\|\||<<=?|>>=?|~(?:\/=?)?|[+\-*\/%&^|=!<>]=?|\?|:/}),Prism.languages.insertBefore("birb","function",{metadata:{pattern:/<\w+>/,greedy:!0,alias:"symbol"}}); \ No newline at end of file diff --git a/examples/prism-birb.html b/examples/prism-birb.html new file mode 100644 index 0000000000..cdc572707d --- /dev/null +++ b/examples/prism-birb.html @@ -0,0 +1,31 @@ +

          Comments

          +
          // Single line comment
          +/* Block comment
          +on multiple lines */
          + +

          Annotations

          +
          <Supersede> // marks an instance member as overriding a superclass
          + +

          Numbers

          +
          int x = 1;
          +double y = 1.1;
          +
          + +

          Strings

          +
          String s1 = 'Strings allow single quotes';
          +String s2 = "as well as double quotes";
          +var s2 = 'Birb strings are
          +	multiline by default';
          + +

          Full example

          +
          class Birb {
          +  final String name;
          +  int age = 19;
          +
          +  void construct(String newName){
          +	nest.name = newName;
          +  }
          +}
          +Birb.construct('Yoko');
          +screm(Birb.name);
          +
          \ No newline at end of file diff --git a/plugins/autoloader/prism-autoloader.js b/plugins/autoloader/prism-autoloader.js index b985ed16d4..d400ce1c5d 100644 --- a/plugins/autoloader/prism-autoloader.js +++ b/plugins/autoloader/prism-autoloader.js @@ -16,6 +16,7 @@ "markup", "csharp" ], + "birb": "clike", "bison": "c", "c": "clike", "csharp": "clike", diff --git a/plugins/autoloader/prism-autoloader.min.js b/plugins/autoloader/prism-autoloader.min.js index 6e4d0fdbe6..67fab53f5f 100644 --- a/plugins/autoloader/prism-autoloader.min.js +++ b/plugins/autoloader/prism-autoloader.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof self&&self.Prism&&self.document&&document.createElement){var l={javascript:"clike",actionscript:"javascript",arduino:"cpp",aspnet:["markup","csharp"],bison:"c",c:"clike",csharp:"clike",cpp:"c",coffeescript:"javascript",crystal:"ruby","css-extras":"css",d:"clike",dart:"clike",django:"markup-templating",ejs:["javascript","markup-templating"],etlua:["lua","markup-templating"],erb:["ruby","markup-templating"],fsharp:"clike","firestore-security-rules":"clike",flow:"javascript",ftl:"markup-templating",gml:"clike",glsl:"c",go:"clike",groovy:"clike",haml:"ruby",handlebars:"markup-templating",haxe:"clike",hlsl:"c",java:"clike",javadoc:["markup","java","javadoclike"],jolie:"clike",jsdoc:["javascript","javadoclike","typescript"],"js-extras":"javascript",json5:"json",jsonp:"json","js-templates":"javascript",kotlin:"clike",latte:["clike","markup-templating","php"],less:"css",lilypond:"scheme",markdown:"markup","markup-templating":"markup",mongodb:"javascript",n4js:"javascript",nginx:"clike",objectivec:"c",opencl:"c",parser:"markup",php:["clike","markup-templating"],phpdoc:["php","javadoclike"],"php-extras":"php",plsql:"sql",processing:"clike",protobuf:"clike",pug:["markup","javascript"],purebasic:"clike",purescript:"haskell",qml:"javascript",qore:"clike",racket:"scheme",jsx:["markup","javascript"],tsx:["jsx","typescript"],reason:"clike",ruby:"clike",sass:"css",scss:"css",scala:"java","shell-session":"bash",smarty:"markup-templating",solidity:"clike",soy:"markup-templating",sparql:"turtle",sqf:"clike",swift:"clike","t4-cs":["t4-templating","csharp"],"t4-vb":["t4-templating","vbnet"],tap:"yaml",tt2:["clike","markup-templating"],textile:"markup",twig:"markup",typescript:"javascript",vala:"clike",vbnet:"basic",velocity:"markup",wiki:"markup",xeora:"markup","xml-doc":"markup",xquery:"markup"},n={html:"markup",xml:"markup",svg:"markup",mathml:"markup",ssml:"markup",atom:"markup",rss:"markup",js:"javascript",g4:"antlr4",adoc:"asciidoc",shell:"bash",shortcode:"bbcode",rbnf:"bnf",oscript:"bsl",cs:"csharp",dotnet:"csharp",coffee:"coffeescript",conc:"concurnas",jinja2:"django","dns-zone":"dns-zone-file",dockerfile:"docker",eta:"ejs",xlsx:"excel-formula",xls:"excel-formula",gamemakerlanguage:"gml",hs:"haskell",gitignore:"ignore",hgignore:"ignore",npmignore:"ignore",webmanifest:"json",kt:"kotlin",kts:"kotlin",tex:"latex",context:"latex",ly:"lilypond",emacs:"lisp",elisp:"lisp","emacs-lisp":"lisp",md:"markdown",moon:"moonscript",n4jsd:"n4js",nani:"naniscript",objc:"objectivec",objectpascal:"pascal",px:"pcaxis",pcode:"peoplecode",pq:"powerquery",mscript:"powerquery",pbfasm:"purebasic",purs:"purescript",py:"python",rkt:"racket",rpy:"renpy",robot:"robotframework",rb:"ruby","sh-session":"shell-session",shellsession:"shell-session",sol:"solidity",sln:"solution-file",rq:"sparql",t4:"t4-cs",trig:"turtle",ts:"typescript",tsconfig:"typoscript",uscript:"unrealscript",uc:"unrealscript",vb:"visual-basic",vba:"visual-basic",xeoracube:"xeora",yml:"yaml"},p={},e="components/",a=Prism.util.currentScript();if(a){var r=/\bplugins\/autoloader\/prism-autoloader\.(?:min\.)?js(?:\?[^\r\n/]*)?$/i,s=/(^|\/)[\w-]+\.(?:min\.)?js(?:\?[^\r\n/]*)?$/i,t=a.getAttribute("data-autoloader-path");if(null!=t)e=t.trim().replace(/\/?$/,"/");else{var i=a.src;r.test(i)?e=i.replace(r,"components/"):s.test(i)&&(e=i.replace(s,"$1components/"))}}var o=Prism.plugins.autoloader={languages_path:e,use_minified:!0,loadLanguages:m};Prism.hooks.add("complete",function(e){var a=e.element,r=e.language;if(a&&r&&"none"!==r){var s=function(e){var a=(e.getAttribute("data-dependencies")||"").trim();if(!a){var r=e.parentElement;r&&"pre"===r.tagName.toLowerCase()&&(a=(r.getAttribute("data-dependencies")||"").trim())}return a?a.split(/\s*,\s*/g):[]}(a);s.push(r),s.every(u)||m(s,function(){Prism.highlightElement(a)})}})}function u(e){if(0<=e.indexOf("!"))return!1;if((e=n[e]||e)in Prism.languages)return!0;var a=p[e];return a&&!a.error&&!1===a.loading}function m(e,a,r){"string"==typeof e&&(e=[e]);var s=e.length,t=0,i=!1;function c(){i||++t===s&&a&&a(e)}0!==s?e.forEach(function(e){!function(a,r,s){var t=0<=a.indexOf("!");function e(){var e=p[a];e||(e=p[a]={callbacks:[]}),e.callbacks.push({success:r,error:s}),!t&&u(a)?k(a,"success"):!t&&e.error?k(a,"error"):!t&&e.loading||(e.loading=!0,e.error=!1,function(e,a,r){var s=document.createElement("script");s.src=e,s.async=!0,s.onload=function(){document.body.removeChild(s),a&&a()},s.onerror=function(){document.body.removeChild(s),r&&r()},document.body.appendChild(s)}(function(e){return o.languages_path+"prism-"+e+(o.use_minified?".min":"")+".js"}(a),function(){e.loading=!1,k(a,"success")},function(){e.loading=!1,e.error=!0,k(a,"error")}))}a=a.replace("!",""),a=n[a]||a;var i=l[a];i&&i.length?m(i,e,s):e()}(e,c,function(){i||(i=!0,r&&r(e))})}):a&&setTimeout(a,0)}function k(e,a){if(p[e]){for(var r=p[e].callbacks,s=0,t=r.length;s + +---------------------------------------------------- + +[ + ["metadata", ""] +] + +---------------------------------------------------- + +Checks for metadata. \ No newline at end of file diff --git a/tests/languages/birb/operator_feature.test b/tests/languages/birb/operator_feature.test new file mode 100644 index 0000000000..4017c74c45 --- /dev/null +++ b/tests/languages/birb/operator_feature.test @@ -0,0 +1,27 @@ +++ -- +* / % ~/ ++ - ! ~ +<< >> ? : +& ^ | +>= > <= < +== != && || += *= /= +%= += -= + +---------------------------------------------------- + +[ + ["operator", "++"], ["operator", "--"], + ["operator", "*"], ["operator", "/"], ["operator", "%"], ["operator", "~/"], + ["operator", "+"], ["operator", "-"], ["operator", "!"], ["operator", "~"], + ["operator", "<<"], ["operator", ">>"], ["operator", "?"], ["operator", ":"], + ["operator", "&"], ["operator", "^"], ["operator", "|"], + ["operator", ">="], ["operator", ">"], ["operator", "<="], ["operator", "<"], + ["operator", "=="], ["operator", "!="], ["operator", "&&"], ["operator", "||"], + ["operator", "="], ["operator", "*="], ["operator", "/="], + ["operator", "%="], ["operator", "+="], ["operator", "-="] +] + +---------------------------------------------------- + +Checks for all operators. \ No newline at end of file diff --git a/tests/languages/birb/string_feature.test b/tests/languages/birb/string_feature.test new file mode 100644 index 0000000000..b3f40ddb7b --- /dev/null +++ b/tests/languages/birb/string_feature.test @@ -0,0 +1,21 @@ +"" '' +r"" r'' +"fo\"o" 'fo\'o' +'foo +bar' +"foo +bar" + +---------------------------------------------------- + +[ + ["string", "\"\""], ["string", "''"], + ["string", "r\"\""], ["string", "r''"], + ["string", "\"fo\\\"o\""], ["string", "'fo\\'o'"], + ["string", "'foo\r\nbar'"], + ["string", "\"foo\r\nbar\""] +] + +---------------------------------------------------- + +Checks for single quoted, double quoted, and multiline strings \ No newline at end of file From 3b4f14caf0c386d71011cb02e1fabe8717b83413 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Sun, 13 Sep 2020 23:25:43 +0200 Subject: [PATCH 0631/1100] Rust: Fixed Unicode char literals (#2550) --- components/prism-rust.js | 2 +- components/prism-rust.min.js | 2 +- tests/languages/rust/char_feature.test | 12 ++++++++++-- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/components/prism-rust.js b/components/prism-rust.js index 8270791534..61b842233c 100644 --- a/components/prism-rust.js +++ b/components/prism-rust.js @@ -26,7 +26,7 @@ greedy: true }, 'char': { - pattern: /b?'(?:\\(?:x[0-7][\da-fA-F]|u{(?:[\da-fA-F]_*){1,6}|.)|[^\\\r\n\t'])'/, + pattern: /b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/, greedy: true, alias: 'string' }, diff --git a/components/prism-rust.min.js b/components/prism-rust.min.js index 215b6e9880..e4680f7cdf 100644 --- a/components/prism-rust.min.js +++ b/components/prism-rust.min.js @@ -1 +1 @@ -!function(e){for(var a="/\\*(?:[^*/]|\\*(?!/)|/(?!\\*)|)*\\*/",t=0;t<2;t++)a=a.replace(//g,function(){return a});a=a.replace(//g,function(){return"[^\\s\\S]"}),e.languages.rust={comment:[{pattern:RegExp("(^|[^\\\\])"+a),lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,greedy:!0},char:{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u{(?:[\da-fA-F]_*){1,6}|.)|[^\\\r\n\t'])'/,greedy:!0,alias:"string"},attribute:{pattern:/#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,greedy:!0,alias:"attr-name",inside:{string:null}},"closure-params":{pattern:/([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,lookbehind:!0,greedy:!0,inside:{"closure-punctuation":{pattern:/^\||\|$/,alias:"punctuation"},rest:null}},"lifetime-annotation":{pattern:/'\w+/,alias:"symbol"},"fragment-specifier":{pattern:/(\$\w+:)[a-z]+/,lookbehind:!0,alias:"punctuation"},variable:/\$\w+/,"function-definition":{pattern:/(\bfn\s+)\w+/,lookbehind:!0,alias:"function"},"type-definition":{pattern:/(\b(?:enum|struct|union)\s+)\w+/,lookbehind:!0,alias:"class-name"},"module-declaration":[{pattern:/(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,lookbehind:!0,alias:"namespace"},{pattern:/(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,lookbehind:!0,alias:"namespace",inside:{punctuation:/::/}}],keyword:[/\b(?:abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|Self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,/\b(?:[ui](?:8|16|32|64|128|size)|f(?:32|64)|bool|char|str)\b/],function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,macro:{pattern:/\w+!/,alias:"property"},constant:/\b[A-Z_][A-Z_\d]+\b/,"class-name":/\b[A-Z]\w*\b/,namespace:{pattern:/(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,inside:{punctuation:/::/}},number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:\d(?:_?\d)*)?\.?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:[iu](?:8|16|32|64|size)?|f32|f64))?\b/,boolean:/\b(?:false|true)\b/,punctuation:/->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,operator:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<>?=?|[@?]/},e.languages.rust["closure-params"].inside.rest=e.languages.rust,e.languages.rust.attribute.inside.string=e.languages.rust.string}(Prism); \ No newline at end of file +!function(e){for(var a="/\\*(?:[^*/]|\\*(?!/)|/(?!\\*)|)*\\*/",t=0;t<2;t++)a=a.replace(//g,function(){return a});a=a.replace(//g,function(){return"[^\\s\\S]"}),e.languages.rust={comment:[{pattern:RegExp("(^|[^\\\\])"+a),lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,greedy:!0},char:{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,greedy:!0,alias:"string"},attribute:{pattern:/#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,greedy:!0,alias:"attr-name",inside:{string:null}},"closure-params":{pattern:/([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,lookbehind:!0,greedy:!0,inside:{"closure-punctuation":{pattern:/^\||\|$/,alias:"punctuation"},rest:null}},"lifetime-annotation":{pattern:/'\w+/,alias:"symbol"},"fragment-specifier":{pattern:/(\$\w+:)[a-z]+/,lookbehind:!0,alias:"punctuation"},variable:/\$\w+/,"function-definition":{pattern:/(\bfn\s+)\w+/,lookbehind:!0,alias:"function"},"type-definition":{pattern:/(\b(?:enum|struct|union)\s+)\w+/,lookbehind:!0,alias:"class-name"},"module-declaration":[{pattern:/(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,lookbehind:!0,alias:"namespace"},{pattern:/(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,lookbehind:!0,alias:"namespace",inside:{punctuation:/::/}}],keyword:[/\b(?:abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|Self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,/\b(?:[ui](?:8|16|32|64|128|size)|f(?:32|64)|bool|char|str)\b/],function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,macro:{pattern:/\w+!/,alias:"property"},constant:/\b[A-Z_][A-Z_\d]+\b/,"class-name":/\b[A-Z]\w*\b/,namespace:{pattern:/(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,inside:{punctuation:/::/}},number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:\d(?:_?\d)*)?\.?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:[iu](?:8|16|32|64|size)?|f32|f64))?\b/,boolean:/\b(?:false|true)\b/,punctuation:/->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,operator:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<>?=?|[@?]/},e.languages.rust["closure-params"].inside.rest=e.languages.rust,e.languages.rust.attribute.inside.string=e.languages.rust.string}(Prism); \ No newline at end of file diff --git a/tests/languages/rust/char_feature.test b/tests/languages/rust/char_feature.test index 9a1948411a..a0fb47d595 100644 --- a/tests/languages/rust/char_feature.test +++ b/tests/languages/rust/char_feature.test @@ -1,13 +1,21 @@ 'a' 'स' +'\'' +'\n' +'\u{00e9}' +'\x41' ---------------------------------------------------- [ ["char", "'a'"], - ["char", "'स'"] + ["char", "'स'"], + ["char", "'\\''"], + ["char", "'\\n'"], + ["char", "'\\u{00e9}'"], + ["char", "'\\x41'"] ] ---------------------------------------------------- -Checks for chars. \ No newline at end of file +Checks for chars. From cb75d9e2658f3ab0f4107e9f8d43745e371557b5 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Sun, 13 Sep 2020 23:26:33 +0200 Subject: [PATCH 0632/1100] Added support for SML (#2537) --- components.js | 2 +- components.json | 8 + components/prism-sml.js | 68 ++++++ components/prism-sml.min.js | 1 + examples/prism-sml.html | 43 ++++ plugins/autoloader/prism-autoloader.js | 1 + plugins/autoloader/prism-autoloader.min.js | 2 +- plugins/show-language/prism-show-language.js | 2 + .../show-language/prism-show-language.min.js | 2 +- tests/languages/sml/boolean_feature.test | 9 + tests/languages/sml/classname_feature.test | 216 ++++++++++++++++++ tests/languages/sml/comment_feature.test | 11 + tests/languages/sml/function_feature.test | 13 ++ tests/languages/sml/keyword_feature.test | 94 ++++++++ tests/languages/sml/number_feature.test | 21 ++ tests/languages/sml/operator_feature.test | 33 +++ tests/languages/sml/string_feature.test | 14 ++ tests/languages/sml/word_feature.test | 7 + 18 files changed, 544 insertions(+), 3 deletions(-) create mode 100644 components/prism-sml.js create mode 100644 components/prism-sml.min.js create mode 100644 examples/prism-sml.html create mode 100644 tests/languages/sml/boolean_feature.test create mode 100644 tests/languages/sml/classname_feature.test create mode 100644 tests/languages/sml/comment_feature.test create mode 100644 tests/languages/sml/function_feature.test create mode 100644 tests/languages/sml/keyword_feature.test create mode 100644 tests/languages/sml/number_feature.test create mode 100644 tests/languages/sml/operator_feature.test create mode 100644 tests/languages/sml/string_feature.test create mode 100644 tests/languages/sml/word_feature.test diff --git a/components.js b/components.js index b569acdd98..7d969b4c61 100644 --- a/components.js +++ b/components.js @@ -1,2 +1,2 @@ -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml","ssml","atom","rss"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","ssml":"SSML","atom":"Atom","rss":"RSS"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","optional":"regex","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"ABNF","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"agda":{"title":"Agda","owner":"xy-ren"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"dkern"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"birb":{"title":"Birb","require":"clike","owner":"Calamity210"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"BNF","alias":"rbnf","aliasTitles":{"rbnf":"RBNF"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"bsl":{"title":"BSL (1C:Enterprise)","alias":"oscript","aliasTitles":{"oscript":"OneScript"},"owner":"Diversus23"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"clojure":{"title":"Clojure","owner":"troglotit"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"cypher":{"title":"Cypher","owner":"RunDevelopment"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dax":{"title":"DAX","owner":"peterbud"},"dhall":{"title":"Dhall","owner":"RunDevelopment"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"EBNF","owner":"RunDevelopment"},"editorconfig":{"title":"EditorConfig","owner":"osipxd"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"c","owner":"Golmote"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","optional":["markdown"],"owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"hlsl":{"title":"HLSL","require":"c","owner":"RunDevelopment"},"http":{"title":"HTTP","optional":["css","javascript","json","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"ignore":{"title":".ignore","owner":"osipxd","alias":["gitignore","hgignore","npmignore"],"aliasTitles":{"gitignore":".gitignore","hgignore":".hgignore","npmignore":".npmignore"}},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike","typescript"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","alias":"webmanifest","aliasTitles":{"webmanifest":"Web App Manifest"},"owner":"CupOfTea696"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"jsstacktrace":{"title":"JS stack trace","owner":"sbrl"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","alias":["kt","kts"],"aliasTitles":{"kts":"Kotlin Script"},"require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"mongodb":{"title":"MongoDB","owner":"airs0urce","require":"javascript"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"naniscript":{"title":"Naninovel Script","owner":"Elringus","alias":"nani"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"purebasic":{"title":"PureBasic","require":"clike","alias":"pbfasm","owner":"HeX0R101"},"purescript":{"title":"PureScript","require":"haskell","alias":"purs","owner":"sriharshachilakapati"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"racket":{"title":"Racket","require":"scheme","alias":"rkt","owner":"RunDevelopment"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","owner":"RunDevelopment"},"renpy":{"title":"Ren'py","alias":"rpy","owner":"HyuchiaDiego"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","alias":["sh-session","shellsession"],"owner":"RunDevelopment"},"smali":{"title":"Smali","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"solidity":{"title":"Solidity (Ethereum)","alias":"sol","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"stan":{"title":"Stan","owner":"RunDevelopment"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","vbnet"],"owner":"RunDevelopment"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"typoscript":{"title":"TypoScript","alias":"tsconfig","aliasTitles":{"tsconfig":"TSConfig"},"owner":"dkern"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","optional":"regex","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":["vb","vba"],"aliasTitles":{"vba":"VBA"},"owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xml-doc":{"title":"XML doc (.net)","require":"markup","modify":["csharp","fsharp","vbnet"],"owner":"RunDevelopment"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"yang":{"title":"YANG","owner":"RunDevelopment"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml","ssml","atom","rss"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","ssml":"SSML","atom":"Atom","rss":"RSS"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","optional":"regex","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"ABNF","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"agda":{"title":"Agda","owner":"xy-ren"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"dkern"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"birb":{"title":"Birb","require":"clike","owner":"Calamity210"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"BNF","alias":"rbnf","aliasTitles":{"rbnf":"RBNF"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"bsl":{"title":"BSL (1C:Enterprise)","alias":"oscript","aliasTitles":{"oscript":"OneScript"},"owner":"Diversus23"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"clojure":{"title":"Clojure","owner":"troglotit"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"cypher":{"title":"Cypher","owner":"RunDevelopment"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dax":{"title":"DAX","owner":"peterbud"},"dhall":{"title":"Dhall","owner":"RunDevelopment"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"EBNF","owner":"RunDevelopment"},"editorconfig":{"title":"EditorConfig","owner":"osipxd"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"c","owner":"Golmote"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","optional":["markdown"],"owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"hlsl":{"title":"HLSL","require":"c","owner":"RunDevelopment"},"http":{"title":"HTTP","optional":["css","javascript","json","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"ignore":{"title":".ignore","owner":"osipxd","alias":["gitignore","hgignore","npmignore"],"aliasTitles":{"gitignore":".gitignore","hgignore":".hgignore","npmignore":".npmignore"}},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike","typescript"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","alias":"webmanifest","aliasTitles":{"webmanifest":"Web App Manifest"},"owner":"CupOfTea696"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"jsstacktrace":{"title":"JS stack trace","owner":"sbrl"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","alias":["kt","kts"],"aliasTitles":{"kts":"Kotlin Script"},"require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"mongodb":{"title":"MongoDB","owner":"airs0urce","require":"javascript"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"naniscript":{"title":"Naninovel Script","owner":"Elringus","alias":"nani"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"purebasic":{"title":"PureBasic","require":"clike","alias":"pbfasm","owner":"HeX0R101"},"purescript":{"title":"PureScript","require":"haskell","alias":"purs","owner":"sriharshachilakapati"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"racket":{"title":"Racket","require":"scheme","alias":"rkt","owner":"RunDevelopment"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","owner":"RunDevelopment"},"renpy":{"title":"Ren'py","alias":"rpy","owner":"HyuchiaDiego"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","alias":["sh-session","shellsession"],"owner":"RunDevelopment"},"smali":{"title":"Smali","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sml":{"title":"SML","alias":"smlnj","aliasTitles":{"smlnj":"SML/NJ"},"owner":"RunDevelopment"},"solidity":{"title":"Solidity (Ethereum)","alias":"sol","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"stan":{"title":"Stan","owner":"RunDevelopment"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","vbnet"],"owner":"RunDevelopment"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"typoscript":{"title":"TypoScript","alias":"tsconfig","aliasTitles":{"tsconfig":"TSConfig"},"owner":"dkern"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","optional":"regex","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":["vb","vba"],"aliasTitles":{"vba":"VBA"},"owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xml-doc":{"title":"XML doc (.net)","require":"markup","modify":["csharp","fsharp","vbnet"],"owner":"RunDevelopment"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"yang":{"title":"YANG","owner":"RunDevelopment"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; if (typeof module !== 'undefined' && module.exports) { module.exports = components; } \ No newline at end of file diff --git a/components.json b/components.json index a7b3c9c538..4e6ba36922 100644 --- a/components.json +++ b/components.json @@ -1053,6 +1053,14 @@ "require": "markup-templating", "owner": "Golmote" }, + "sml": { + "title": "SML", + "alias": "smlnj", + "aliasTitles": { + "smlnj": "SML/NJ" + }, + "owner": "RunDevelopment" + }, "solidity": { "title": "Solidity (Ethereum)", "alias": "sol", diff --git a/components/prism-sml.js b/components/prism-sml.js new file mode 100644 index 0000000000..867df03c09 --- /dev/null +++ b/components/prism-sml.js @@ -0,0 +1,68 @@ +// https://smlfamily.github.io/sml97-defn.pdf +// https://people.mpi-sws.org/~rossberg/sml.html +(function (Prism) { + + var keywords = /\b(?:abstype|and|andalso|as|case|datatype|do|else|end|eqtype|exception|fn|fun|functor|handle|if|in|include|infix|infixr|let|local|nonfix|of|op|open|orelse|raise|rec|sharing|sig|signature|struct|structure|then|type|val|where|while|with|withtype)\b/i; + + Prism.languages.sml = { + // allow one level of nesting + 'comment': /\(\*(?:[^*(]|\*(?!\))|\((?!\*)|\(\*(?:[^*(]|\*(?!\))|\((?!\*))*\*\))*\*\)/, + 'string': { + pattern: /#?"(?:[^"\\]|\\.)*"/, + greedy: true + }, + + 'class-name': [ + { + // This is only an approximation since the real grammar is context-free + // + // Why the main loop so complex? + // The main loop is approximately the same as /(?:\s*(?:[*,]|->)\s*)*/ which is, obviously, a lot + // simpler. The difference is that if a comma is the last iteration of the loop, then the terminal must be + // followed by a long identifier. + pattern: RegExp( + /((?:^|[^:]):\s*)(?:\s*(?:(?:\*|->)\s*|,\s*(?:(?=)|(?!)\s+)))*/.source + .replace(//g, function () { return /\s*(?:[*,]|->)/.source; }) + .replace(//g, function () { + return /(?:'[\w']*||\((?:[^()]|\([^()]*\))*\)|\{(?:[^{}]|\{[^{}]*\})*\})(?:\s+)*/.source; + }) + .replace(//g, function () { return /(?!)[a-z\d_][\w'.]*/.source; }) + .replace(//g, function () { return keywords.source; }), + 'i' + ), + lookbehind: true, + greedy: true, + inside: null // see below + }, + { + pattern: /((?:^|[^\w'])(?:datatype|exception|functor|signature|structure|type)\s+)[a-z_][\w'.]*/i, + lookbehind: true + } + ], + 'function': { + pattern: /((?:^|[^\w'])fun\s+)[a-z_][\w'.]*/i, + lookbehind: true + }, + + 'keyword': keywords, + 'variable': { + pattern: /(^|[^\w'])'[\w']*/, + lookbehind: true, + }, + + 'number': /~?\b(?:\d+(?:\.\d+)?(?:e~?\d+)?|0x[\da-f]+)\b/i, + 'word': { + pattern: /\b0w(?:\d+|x[\da-f]+)\b/i, + alias: 'constant' + }, + + 'boolean': /\b(?:false|true)\b/i, + 'operator': /\.\.\.|:[>=:]|=>?|->|[<>]=?|[!+\-*/^#|@~]/, + 'punctuation': /[(){}\[\].:,;]/ + }; + + Prism.languages.sml['class-name'][0].inside = Prism.languages.sml; + + Prism.languages.smlnj = Prism.languages.sml; + +}(Prism)); diff --git a/components/prism-sml.min.js b/components/prism-sml.min.js new file mode 100644 index 0000000000..d6a8e3d8e3 --- /dev/null +++ b/components/prism-sml.min.js @@ -0,0 +1 @@ +!function(e){var n=/\b(?:abstype|and|andalso|as|case|datatype|do|else|end|eqtype|exception|fn|fun|functor|handle|if|in|include|infix|infixr|let|local|nonfix|of|op|open|orelse|raise|rec|sharing|sig|signature|struct|structure|then|type|val|where|while|with|withtype)\b/i;e.languages.sml={comment:/\(\*(?:[^*(]|\*(?!\))|\((?!\*)|\(\*(?:[^*(]|\*(?!\))|\((?!\*))*\*\))*\*\)/,string:{pattern:/#?"(?:[^"\\]|\\.)*"/,greedy:!0},"class-name":[{pattern:RegExp("((?:^|[^:]):\\s*)(?:\\s*(?:(?:\\*|->)\\s*|,\\s*(?:(?=)|(?!)\\s+)))*".replace(//g,function(){return"\\s*(?:[*,]|->)"}).replace(//g,function(){return"(?:'[\\w']*||\\((?:[^()]|\\([^()]*\\))*\\)|\\{(?:[^{}]|\\{[^{}]*\\})*\\})(?:\\s+)*"}).replace(//g,function(){return"(?!)[a-z\\d_][\\w'.]*"}).replace(//g,function(){return n.source}),"i"),lookbehind:!0,greedy:!0,inside:null},{pattern:/((?:^|[^\w'])(?:datatype|exception|functor|signature|structure|type)\s+)[a-z_][\w'.]*/i,lookbehind:!0}],function:{pattern:/((?:^|[^\w'])fun\s+)[a-z_][\w'.]*/i,lookbehind:!0},keyword:n,variable:{pattern:/(^|[^\w'])'[\w']*/,lookbehind:!0},number:/~?\b(?:\d+(?:\.\d+)?(?:e~?\d+)?|0x[\da-f]+)\b/i,word:{pattern:/\b0w(?:\d+|x[\da-f]+)\b/i,alias:"constant"},boolean:/\b(?:false|true)\b/i,operator:/\.\.\.|:[>=:]|=>?|->|[<>]=?|[!+\-*/^#|@~]/,punctuation:/[(){}\[\].:,;]/},e.languages.sml["class-name"][0].inside=e.languages.sml,e.languages.smlnj=e.languages.sml}(Prism); \ No newline at end of file diff --git a/examples/prism-sml.html b/examples/prism-sml.html new file mode 100644 index 0000000000..d5030eb815 --- /dev/null +++ b/examples/prism-sml.html @@ -0,0 +1,43 @@ +

          Full example

          +
          (* source: https://github.com/HarrisonGrodin/ml-numbers/blob/ba35c763092052e391871edf224f17474c6231b1/src/Rational.sml *)
          +
          +structure Rational :> RATIONAL =
          +  struct
          +    type t = int * int  (* (a,b) invariant: a,b coprime; b nonnegative *)
          +
          +    local
          +      val rec gcd = fn
          +        (m,0) => m
          +      | (m,n) => gcd (n, m mod n)
          +    in
          +      infix 8 //
          +      val op // = fn (x,y) => (
          +        let
          +          val gcd = gcd (x,y)
          +        in
          +          (x div gcd, y div gcd)
          +        end
          +      )
          +    end
          +
          +    val show = Fn.id
          +
          +    val zero = (0,1)
          +    val one  = (1,1)
          +
          +    val eq : t * t -> bool = (op =)
          +    val compare = fn ((a,b),(x,y)) => Int.compare (a * y, b * x)
          +    val toString = fn (x,y) => Int.toString x ^ " // " ^ Int.toString y
          +    val percent =
          +      Fn.curry (Fn.flip (op ^)) "%"
          +      o Int.toString
          +      o (fn (a,b) => (100 * a) div b)
          +
          +    val op + = fn ((a,b),(x,y)) => (a * y + b * x) // (b * y)
          +    val ~ = fn (a,b) => (~a,b)
          +    val op - = fn (r1,r2) => r1 + ~r2
          +
          +    val op * = fn ((a,b),(x,y)) => (a * x) // (b * y)
          +    val inv = Fn.flip (op //)
          +    val op / = fn (r1,r2) => r1 * inv r2
          +  end
          diff --git a/plugins/autoloader/prism-autoloader.js b/plugins/autoloader/prism-autoloader.js index d400ce1c5d..36764c4301 100644 --- a/plugins/autoloader/prism-autoloader.js +++ b/plugins/autoloader/prism-autoloader.js @@ -207,6 +207,7 @@ "rb": "ruby", "sh-session": "shell-session", "shellsession": "shell-session", + "smlnj": "sml", "sol": "solidity", "sln": "solution-file", "rq": "sparql", diff --git a/plugins/autoloader/prism-autoloader.min.js b/plugins/autoloader/prism-autoloader.min.js index 67fab53f5f..aae7f91c62 100644 --- a/plugins/autoloader/prism-autoloader.min.js +++ b/plugins/autoloader/prism-autoloader.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof self&&self.Prism&&self.document&&document.createElement){var l={javascript:"clike",actionscript:"javascript",arduino:"cpp",aspnet:["markup","csharp"],birb:"clike",bison:"c",c:"clike",csharp:"clike",cpp:"c",coffeescript:"javascript",crystal:"ruby","css-extras":"css",d:"clike",dart:"clike",django:"markup-templating",ejs:["javascript","markup-templating"],etlua:["lua","markup-templating"],erb:["ruby","markup-templating"],fsharp:"clike","firestore-security-rules":"clike",flow:"javascript",ftl:"markup-templating",gml:"clike",glsl:"c",go:"clike",groovy:"clike",haml:"ruby",handlebars:"markup-templating",haxe:"clike",hlsl:"c",java:"clike",javadoc:["markup","java","javadoclike"],jolie:"clike",jsdoc:["javascript","javadoclike","typescript"],"js-extras":"javascript",json5:"json",jsonp:"json","js-templates":"javascript",kotlin:"clike",latte:["clike","markup-templating","php"],less:"css",lilypond:"scheme",markdown:"markup","markup-templating":"markup",mongodb:"javascript",n4js:"javascript",nginx:"clike",objectivec:"c",opencl:"c",parser:"markup",php:["clike","markup-templating"],phpdoc:["php","javadoclike"],"php-extras":"php",plsql:"sql",processing:"clike",protobuf:"clike",pug:["markup","javascript"],purebasic:"clike",purescript:"haskell",qml:"javascript",qore:"clike",racket:"scheme",jsx:["markup","javascript"],tsx:["jsx","typescript"],reason:"clike",ruby:"clike",sass:"css",scss:"css",scala:"java","shell-session":"bash",smarty:"markup-templating",solidity:"clike",soy:"markup-templating",sparql:"turtle",sqf:"clike",swift:"clike","t4-cs":["t4-templating","csharp"],"t4-vb":["t4-templating","vbnet"],tap:"yaml",tt2:["clike","markup-templating"],textile:"markup",twig:"markup",typescript:"javascript",vala:"clike",vbnet:"basic",velocity:"markup",wiki:"markup",xeora:"markup","xml-doc":"markup",xquery:"markup"},n={html:"markup",xml:"markup",svg:"markup",mathml:"markup",ssml:"markup",atom:"markup",rss:"markup",js:"javascript",g4:"antlr4",adoc:"asciidoc",shell:"bash",shortcode:"bbcode",rbnf:"bnf",oscript:"bsl",cs:"csharp",dotnet:"csharp",coffee:"coffeescript",conc:"concurnas",jinja2:"django","dns-zone":"dns-zone-file",dockerfile:"docker",eta:"ejs",xlsx:"excel-formula",xls:"excel-formula",gamemakerlanguage:"gml",hs:"haskell",gitignore:"ignore",hgignore:"ignore",npmignore:"ignore",webmanifest:"json",kt:"kotlin",kts:"kotlin",tex:"latex",context:"latex",ly:"lilypond",emacs:"lisp",elisp:"lisp","emacs-lisp":"lisp",md:"markdown",moon:"moonscript",n4jsd:"n4js",nani:"naniscript",objc:"objectivec",objectpascal:"pascal",px:"pcaxis",pcode:"peoplecode",pq:"powerquery",mscript:"powerquery",pbfasm:"purebasic",purs:"purescript",py:"python",rkt:"racket",rpy:"renpy",robot:"robotframework",rb:"ruby","sh-session":"shell-session",shellsession:"shell-session",sol:"solidity",sln:"solution-file",rq:"sparql",t4:"t4-cs",trig:"turtle",ts:"typescript",tsconfig:"typoscript",uscript:"unrealscript",uc:"unrealscript",vb:"visual-basic",vba:"visual-basic",xeoracube:"xeora",yml:"yaml"},p={},e="components/",a=Prism.util.currentScript();if(a){var r=/\bplugins\/autoloader\/prism-autoloader\.(?:min\.)?js(?:\?[^\r\n/]*)?$/i,s=/(^|\/)[\w-]+\.(?:min\.)?js(?:\?[^\r\n/]*)?$/i,t=a.getAttribute("data-autoloader-path");if(null!=t)e=t.trim().replace(/\/?$/,"/");else{var i=a.src;r.test(i)?e=i.replace(r,"components/"):s.test(i)&&(e=i.replace(s,"$1components/"))}}var o=Prism.plugins.autoloader={languages_path:e,use_minified:!0,loadLanguages:m};Prism.hooks.add("complete",function(e){var a=e.element,r=e.language;if(a&&r&&"none"!==r){var s=function(e){var a=(e.getAttribute("data-dependencies")||"").trim();if(!a){var r=e.parentElement;r&&"pre"===r.tagName.toLowerCase()&&(a=(r.getAttribute("data-dependencies")||"").trim())}return a?a.split(/\s*,\s*/g):[]}(a);s.push(r),s.every(u)||m(s,function(){Prism.highlightElement(a)})}})}function u(e){if(0<=e.indexOf("!"))return!1;if((e=n[e]||e)in Prism.languages)return!0;var a=p[e];return a&&!a.error&&!1===a.loading}function m(e,a,r){"string"==typeof e&&(e=[e]);var s=e.length,t=0,i=!1;function c(){i||++t===s&&a&&a(e)}0!==s?e.forEach(function(e){!function(a,r,s){var t=0<=a.indexOf("!");function e(){var e=p[a];e||(e=p[a]={callbacks:[]}),e.callbacks.push({success:r,error:s}),!t&&u(a)?k(a,"success"):!t&&e.error?k(a,"error"):!t&&e.loading||(e.loading=!0,e.error=!1,function(e,a,r){var s=document.createElement("script");s.src=e,s.async=!0,s.onload=function(){document.body.removeChild(s),a&&a()},s.onerror=function(){document.body.removeChild(s),r&&r()},document.body.appendChild(s)}(function(e){return o.languages_path+"prism-"+e+(o.use_minified?".min":"")+".js"}(a),function(){e.loading=!1,k(a,"success")},function(){e.loading=!1,e.error=!0,k(a,"error")}))}a=a.replace("!",""),a=n[a]||a;var i=l[a];i&&i.length?m(i,e,s):e()}(e,c,function(){i||(i=!0,r&&r(e))})}):a&&setTimeout(a,0)}function k(e,a){if(p[e]){for(var r=p[e].callbacks,s=0,t=r.length;s (svalue,'a) token +val FOO: (string) * 'a * 'a -> (svalue,'a) token +val FOO: (int) * 'a * 'a -> (svalue,'a) token +val FOO: (string list) * 'a * 'a -> (svalue,'a) token +val FOO: 'a * 'a -> (svalue,'a) token + +datatype spec_ast = SPEC of {head : string list, + decls : decl_ast list, + rules : rule_ast list, + tail : string list} + +type out_state = { +tout : real, +dtout : real, +dtime : real, +strm : TextIO.outstream +} +val outState = ref (NONE : out_state option) + +val systemLines: string -> string list +val systemCleanLines: string -> string list +val systemStanzas: string -> string list list + +---------------------------------------------------- + +[ + ["keyword", "val"], + " FOO", + ["punctuation", ":"], + ["class-name", [ + ["punctuation", "("], + "string list", + ["punctuation", ")"], + ["operator", "*"], + ["variable", "'a"], + ["operator", "*"], + ["variable", "'a"], + ["operator", "->"], + ["punctuation", "("], + "svalue", + ["punctuation", ","], + ["variable", "'a"], + ["punctuation", ")"], + " token" + ]], + ["keyword", "val"], + " FOO", + ["punctuation", ":"], + ["class-name", [ + ["punctuation", "("], + "string", + ["punctuation", ")"], + ["operator", "*"], + ["variable", "'a"], + ["operator", "*"], + ["variable", "'a"], + ["operator", "->"], + ["punctuation", "("], + "svalue", + ["punctuation", ","], + ["variable", "'a"], + ["punctuation", ")"], + " token" + ]], + ["keyword", "val"], + " FOO", + ["punctuation", ":"], + ["class-name", [ + ["punctuation", "("], + "int", + ["punctuation", ")"], + ["operator", "*"], + ["variable", "'a"], + ["operator", "*"], + ["variable", "'a"], + ["operator", "->"], + ["punctuation", "("], + "svalue", + ["punctuation", ","], + ["variable", "'a"], + ["punctuation", ")"], + " token" + ]], + ["keyword", "val"], + " FOO", + ["punctuation", ":"], + ["class-name", [ + ["punctuation", "("], + "string list", + ["punctuation", ")"], + ["operator", "*"], + ["variable", "'a"], + ["operator", "*"], + ["variable", "'a"], + ["operator", "->"], + ["punctuation", "("], + "svalue", + ["punctuation", ","], + ["variable", "'a"], + ["punctuation", ")"], + " token" + ]], + ["keyword", "val"], + " FOO", + ["punctuation", ":"], + ["class-name", [ + ["variable", "'a"], + ["operator", "*"], + ["variable", "'a"], + ["operator", "->"], + ["punctuation", "("], + "svalue", + ["punctuation", ","], + ["variable", "'a"], + ["punctuation", ")"], + " token" + ]], + + ["keyword", "datatype"], + ["class-name", "spec_ast"], + ["operator", "="], + " SPEC ", + ["keyword", "of"], + ["punctuation", "{"], + "head ", + ["punctuation", ":"], + ["class-name", [ + "string list" + ]], + ["punctuation", ","], + "\n decls ", + ["punctuation", ":"], + ["class-name", [ + "decl_ast list" + ]], + ["punctuation", ","], + "\n rules ", + ["punctuation", ":"], + ["class-name", [ + "rule_ast list" + ]], + ["punctuation", ","], + "\n tail ", + ["punctuation", ":"], + ["class-name", [ + "string list" + ]], + ["punctuation", "}"], + + ["keyword", "type"], + ["class-name", "out_state"], + ["operator", "="], + ["punctuation", "{"], + "\ntout ", + ["punctuation", ":"], + ["class-name", [ + "real" + ]], + ["punctuation", ","], + "\ndtout ", + ["punctuation", ":"], + ["class-name", [ + "real" + ]], + ["punctuation", ","], + "\ndtime ", + ["punctuation", ":"], + ["class-name", [ + "real" + ]], + ["punctuation", ","], + "\nstrm ", + ["punctuation", ":"], + ["class-name", [ + "TextIO", + ["punctuation", "."], + "outstream" + ]], + ["punctuation", "}"], + ["keyword", "val"], + " outState ", + ["operator", "="], + " ref ", + ["punctuation", "("], + "NONE ", + ["punctuation", ":"], + ["class-name", [ + "out_state option" + ]], + ["punctuation", ")"], + + ["keyword", "val"], + " systemLines", + ["punctuation", ":"], + ["class-name", [ + "string ", + ["operator", "->"], + " string list" + ]], + ["keyword", "val"], + " systemCleanLines", + ["punctuation", ":"], + ["class-name", [ + "string ", + ["operator", "->"], + " string list" + ]], + ["keyword", "val"], + " systemStanzas", + ["punctuation", ":"], + ["class-name", [ + "string ", + ["operator", "->"], + " string list list" + ]] +] \ No newline at end of file diff --git a/tests/languages/sml/comment_feature.test b/tests/languages/sml/comment_feature.test new file mode 100644 index 0000000000..735328d41d --- /dev/null +++ b/tests/languages/sml/comment_feature.test @@ -0,0 +1,11 @@ +(* comment *) +(* + (* nested comment *) +*) + +---------------------------------------------------- + +[ + ["comment", "(* comment *)"], + ["comment", "(*\n (* nested comment *)\n*)"] +] \ No newline at end of file diff --git a/tests/languages/sml/function_feature.test b/tests/languages/sml/function_feature.test new file mode 100644 index 0000000000..cabce725ba --- /dev/null +++ b/tests/languages/sml/function_feature.test @@ -0,0 +1,13 @@ +fun foo x = x * 2 + +---------------------------------------------------- + +[ + ["keyword", "fun"], + ["function", "foo"], + " x ", + ["operator", "="], + " x ", + ["operator", "*"], + ["number", "2"] +] \ No newline at end of file diff --git a/tests/languages/sml/keyword_feature.test b/tests/languages/sml/keyword_feature.test new file mode 100644 index 0000000000..f19f8c32c4 --- /dev/null +++ b/tests/languages/sml/keyword_feature.test @@ -0,0 +1,94 @@ +abstype +and +andalso +as +case +datatype; +do +else +end +eqtype +exception; +fn +fun; +functor; +handle +if +in +include +infix +infixr +let +local +nonfix +of +op +open +orelse +raise +rec +sharing +sig +signature; +struct +structure; +then +type; +val +where +while +with +withtype + +---------------------------------------------------- + +[ + ["keyword", "abstype"], + ["keyword", "and"], + ["keyword", "andalso"], + ["keyword", "as"], + ["keyword", "case"], + ["keyword", "datatype"], + ["punctuation", ";"], + ["keyword", "do"], + ["keyword", "else"], + ["keyword", "end"], + ["keyword", "eqtype"], + ["keyword", "exception"], + ["punctuation", ";"], + ["keyword", "fn"], + ["keyword", "fun"], + ["punctuation", ";"], + ["keyword", "functor"], + ["punctuation", ";"], + ["keyword", "handle"], + ["keyword", "if"], + ["keyword", "in"], + ["keyword", "include"], + ["keyword", "infix"], + ["keyword", "infixr"], + ["keyword", "let"], + ["keyword", "local"], + ["keyword", "nonfix"], + ["keyword", "of"], + ["keyword", "op"], + ["keyword", "open"], + ["keyword", "orelse"], + ["keyword", "raise"], + ["keyword", "rec"], + ["keyword", "sharing"], + ["keyword", "sig"], + ["keyword", "signature"], + ["punctuation", ";"], + ["keyword", "struct"], + ["keyword", "structure"], + ["punctuation", ";"], + ["keyword", "then"], + ["keyword", "type"], + ["punctuation", ";"], + ["keyword", "val"], + ["keyword", "where"], + ["keyword", "while"], + ["keyword", "with"], + ["keyword", "withtype"] +] \ No newline at end of file diff --git a/tests/languages/sml/number_feature.test b/tests/languages/sml/number_feature.test new file mode 100644 index 0000000000..f6f105d2c8 --- /dev/null +++ b/tests/languages/sml/number_feature.test @@ -0,0 +1,21 @@ +123 +~123 +123.456 +~123.456 +123e~3 + +0xFF +~0xFF + +---------------------------------------------------- + +[ + ["number", "123"], + ["number", "~123"], + ["number", "123.456"], + ["number", "~123.456"], + ["number", "123e~3"], + + ["number", "0xFF"], + ["number", "~0xFF"] +] \ No newline at end of file diff --git a/tests/languages/sml/operator_feature.test b/tests/languages/sml/operator_feature.test new file mode 100644 index 0000000000..0805fa1874 --- /dev/null +++ b/tests/languages/sml/operator_feature.test @@ -0,0 +1,33 @@ +... +:: :> := += <> < <= > >= +=> -> +! + - * / ^ # | @ ~ + +---------------------------------------------------- + +[ + ["operator", "..."], + ["operator", "::"], + ["operator", ":>"], + ["operator", ":="], + ["operator", "="], + ["operator", "<"], + ["operator", ">"], + ["operator", "<"], + ["operator", "<="], + ["operator", ">"], + ["operator", ">="], + ["operator", "=>"], + ["operator", "->"], + ["operator", "!"], + ["operator", "+"], + ["operator", "-"], + ["operator", "*"], + ["operator", "/"], + ["operator", "^"], + ["operator", "#"], + ["operator", "|"], + ["operator", "@"], + ["operator", "~"] +] \ No newline at end of file diff --git a/tests/languages/sml/string_feature.test b/tests/languages/sml/string_feature.test new file mode 100644 index 0000000000..95f80cbc3a --- /dev/null +++ b/tests/languages/sml/string_feature.test @@ -0,0 +1,14 @@ +"" +"foo" +"\tfoo +bar" +#"f" + +---------------------------------------------------- + +[ + ["string", "\"\""], + ["string", "\"foo\""], + ["string", "\"\\tfoo\r\nbar\""], + ["string", "#\"f\""] +] \ No newline at end of file diff --git a/tests/languages/sml/word_feature.test b/tests/languages/sml/word_feature.test new file mode 100644 index 0000000000..80c82d8473 --- /dev/null +++ b/tests/languages/sml/word_feature.test @@ -0,0 +1,7 @@ +0w123 + +---------------------------------------------------- + +[ + ["word", "0w123"] +] \ No newline at end of file From 6b47133ded2b21b64f952ebe79e89ceb19fddf8f Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Tue, 22 Sep 2020 16:50:32 +0200 Subject: [PATCH 0633/1100] Match braces: Fixed JS interpolation punctuation (#2541) --- plugins/match-braces/index.html | 3 + plugins/match-braces/prism-match-braces.js | 82 +++++++++---------- .../match-braces/prism-match-braces.min.js | 2 +- 3 files changed, 42 insertions(+), 45 deletions(-) diff --git a/plugins/match-braces/index.html b/plugins/match-braces/index.html index e2cc9297ba..9a0770fa48 100644 --- a/plugins/match-braces/index.html +++ b/plugins/match-braces/index.html @@ -44,6 +44,9 @@

          Examples

          JavaScript

          
          +	
          const func = (a, b) => {
          +	return `${a}:${b}`;
          +}

          Lisp

          (defun factorial (n)
          diff --git a/plugins/match-braces/prism-match-braces.js b/plugins/match-braces/prism-match-braces.js
          index 2488e34bce..ea278b15c4 100644
          --- a/plugins/match-braces/prism-match-braces.js
          +++ b/plugins/match-braces/prism-match-braces.js
          @@ -4,26 +4,27 @@
           		return;
           	}
           
          -	var MATCH_ALL_CLASS = /(?:^|\s)match-braces(?:\s|$)/;
          -
          -	var BRACE_HOVER_CLASS = /(?:^|\s)brace-hover(?:\s|$)/;
          -	var BRACE_SELECTED_CLASS = /(?:^|\s)brace-selected(?:\s|$)/;
          -
          -	var NO_BRACE_HOVER_CLASS = /(?:^|\s)no-brace-hover(?:\s|$)/;
          -	var NO_BRACE_SELECT_CLASS = /(?:^|\s)no-brace-select(?:\s|$)/;
          -
           	var PARTNER = {
           		'(': ')',
           		'[': ']',
           		'{': '}',
           	};
           
          +	// The names for brace types.
          +	// These names have two purposes: 1) they can be used for styling and 2) they are used to pair braces. Only braces
          +	// of the same type are paired.
           	var NAMES = {
           		'(': 'brace-round',
           		'[': 'brace-square',
           		'{': 'brace-curly',
           	};
           
          +	// A map for brace aliases.
          +	// This is useful for when some braces have a prefix/suffix as part of the punctuation token.
          +	var BRACE_ALIAS_MAP = {
          +		'${': '{', // JS template punctuation (e.g. `foo ${bar + 1}`)
          +	};
          +
           	var LEVEL_WARP = 12;
           
           	var pairIdCounter = 0;
          @@ -45,36 +46,32 @@
           	 * @this {HTMLElement}
           	 */
           	function hoverBrace() {
          -		for (var parent = this.parentElement; parent; parent = parent.parentElement) {
          -			if (NO_BRACE_HOVER_CLASS.test(parent.className)) {
          -				return;
          -			}
          +		if (!Prism.util.isActive(this, 'brace-hover', true)) {
          +			return;
           		}
           
          -		[this, getPartnerBrace(this)].forEach(function (ele) {
          -			ele.className = (ele.className.replace(BRACE_HOVER_CLASS, ' ') + ' brace-hover').replace(/\s+/g, ' ');
          +		[this, getPartnerBrace(this)].forEach(function (e) {
          +			e.classList.add('brace-hover');
           		});
           	}
           	/**
           	 * @this {HTMLElement}
           	 */
           	function leaveBrace() {
          -		[this, getPartnerBrace(this)].forEach(function (ele) {
          -			ele.className = ele.className.replace(BRACE_HOVER_CLASS, ' ');
          +		[this, getPartnerBrace(this)].forEach(function (e) {
          +			e.classList.remove('brace-hover');
           		});
           	}
           	/**
           	 * @this {HTMLElement}
           	 */
           	function clickBrace() {
          -		for (var parent = this.parentElement; parent; parent = parent.parentElement) {
          -			if (NO_BRACE_SELECT_CLASS.test(parent.className)) {
          -				return;
          -			}
          +		if (!Prism.util.isActive(this, 'brace-select', true)) {
          +			return;
           		}
           
          -		[this, getPartnerBrace(this)].forEach(function (ele) {
          -			ele.className = (ele.className.replace(BRACE_SELECTED_CLASS, ' ') + ' brace-selected').replace(/\s+/g, ' ');
          +		[this, getPartnerBrace(this)].forEach(function (e) {
          +			e.classList.add('brace-selected');
           		});
           	}
           
          @@ -91,11 +88,8 @@
           		// find the braces to match
           		/** @type {string[]} */
           		var toMatch = [];
          -		for (var ele = code; ele; ele = ele.parentElement) {
          -			if (MATCH_ALL_CLASS.test(ele.className)) {
          -				toMatch.push('(', '[', '{');
          -				break;
          -			}
          +		if (Prism.util.isActive(code, 'match-braces')) {
          +			toMatch.push('(', '[', '{');
           		}
           
           		if (toMatch.length == 0) {
          @@ -108,8 +102,8 @@
           			pre.addEventListener('mousedown', function removeBraceSelected() {
           				// the code element might have been replaced
           				var code = pre.querySelector('code');
          -				Array.prototype.slice.call(code.querySelectorAll('.brace-selected')).forEach(function (element) {
          -					element.className = element.className.replace(BRACE_SELECTED_CLASS, ' ');
          +				Array.prototype.slice.call(code.querySelectorAll('.brace-selected')).forEach(function (e) {
          +					e.classList.remove('brace-selected');
           				});
           			});
           			Object.defineProperty(pre, '__listenerAdded', { value: true });
          @@ -134,15 +128,16 @@
           				var element = punctuation[i];
           				if (element.childElementCount == 0) {
           					var text = element.textContent;
          +					text = BRACE_ALIAS_MAP[text] || text;
           					if (text === open) {
           						allBraces.push({ index: i, open: true, element: element });
          -						element.className += ' ' + name;
          -						element.className += ' brace-open';
          +						element.classList.add(name);
          +						element.classList.add('brace-open');
           						openStack.push(i);
           					} else if (text === close) {
           						allBraces.push({ index: i, open: false, element: element });
          -						element.className += ' ' + name;
          -						element.className += ' brace-close';
          +						element.classList.add(name);
          +						element.classList.add('brace-close');
           						if (openStack.length) {
           							pairs.push([i, openStack.pop()]);
           						}
          @@ -153,16 +148,16 @@
           			pairs.forEach(function (pair) {
           				var pairId = 'pair-' + (pairIdCounter++) + '-';
           
          -				var openEle = punctuation[pair[0]];
          -				var closeEle = punctuation[pair[1]];
          +				var opening = punctuation[pair[0]];
          +				var closing = punctuation[pair[1]];
           
          -				openEle.id = pairId + 'open';
          -				closeEle.id = pairId + 'close';
          +				opening.id = pairId + 'open';
          +				closing.id = pairId + 'close';
           
          -				[openEle, closeEle].forEach(function (ele) {
          -					ele.addEventListener('mouseenter', hoverBrace);
          -					ele.addEventListener('mouseleave', leaveBrace);
          -					ele.addEventListener('click', clickBrace);
          +				[opening, closing].forEach(function (e) {
          +					e.addEventListener('mouseenter', hoverBrace);
          +					e.addEventListener('mouseleave', leaveBrace);
          +					e.addEventListener('click', clickBrace);
           				});
           			});
           		});
          @@ -171,14 +166,13 @@
           		allBraces.sort(function (a, b) { return a.index - b.index; });
           		allBraces.forEach(function (brace) {
           			if (brace.open) {
          -				brace.element.className += ' brace-level-' + (level % LEVEL_WARP + 1);
          +				brace.element.classList.add('brace-level-' + (level % LEVEL_WARP + 1));
           				level++;
           			} else {
           				level = Math.max(0, level - 1);
          -				brace.element.className += ' brace-level-' + (level % LEVEL_WARP + 1);
          +				brace.element.classList.add('brace-level-' + (level % LEVEL_WARP + 1));
           			}
           		});
          -
           	});
           
           }());
          diff --git a/plugins/match-braces/prism-match-braces.min.js b/plugins/match-braces/prism-match-braces.min.js
          index 4ae2953dba..7738439357 100644
          --- a/plugins/match-braces/prism-match-braces.min.js
          +++ b/plugins/match-braces/prism-match-braces.min.js
          @@ -1 +1 @@
          -!function(){if("undefined"!=typeof self&&self.Prism&&self.document){var c=/(?:^|\s)match-braces(?:\s|$)/,a=/(?:^|\s)brace-hover(?:\s|$)/,l=/(?:^|\s)brace-selected(?:\s|$)/,n=/(?:^|\s)no-brace-hover(?:\s|$)/,t=/(?:^|\s)no-brace-select(?:\s|$)/,u={"(":")","[":"]","{":"}"},f={"(":"brace-round","[":"brace-square","{":"brace-curly"},m=0,r=/^(pair-\d+-)(open|close)$/;Prism.hooks.add("complete",function(e){var a=e.element,n=a.parentElement;if(n&&"PRE"==n.tagName){for(var t=[],r=a;r;r=r.parentElement)if(c.test(r.className)){t.push("(","[","{");break}if(0!=t.length){n.__listenerAdded||(n.addEventListener("mousedown",function(){var e=n.querySelector("code");Array.prototype.slice.call(e.querySelectorAll(".brace-selected")).forEach(function(e){e.className=e.className.replace(l," ")})}),Object.defineProperty(n,"__listenerAdded",{value:!0}));var o=Array.prototype.slice.call(a.querySelectorAll("span.token.punctuation")),i=[];t.forEach(function(e){for(var a=u[e],n=f[e],t=[],r=[],s=0;s
          Date: Tue, 22 Sep 2020 16:50:57 +0200
          Subject: [PATCH 0634/1100] Processing: Fixed function pattern (#2564)
          
          ---
           components/prism-processing.js     | 2 +-
           components/prism-processing.min.js | 2 +-
           2 files changed, 2 insertions(+), 2 deletions(-)
          
          diff --git a/components/prism-processing.js b/components/prism-processing.js
          index 061fb59c97..c30f5119c1 100644
          --- a/components/prism-processing.js
          +++ b/components/prism-processing.js
          @@ -12,7 +12,7 @@ Prism.languages.insertBefore('processing', 'number', {
           });
           
           // Spaces are allowed between function name and parenthesis
          -Prism.languages.processing['function'].pattern = /\w+(?=\s*\()/;
          +Prism.languages.processing['function'] = /\w+(?=\s*\()/;
           
           // Class-names is not styled by default
           Prism.languages.processing['class-name'].alias = 'variable';
          diff --git a/components/prism-processing.min.js b/components/prism-processing.min.js
          index 70f05feb24..9ba03b7bbe 100644
          --- a/components/prism-processing.min.js
          +++ b/components/prism-processing.min.js
          @@ -1 +1 @@
          -Prism.languages.processing=Prism.languages.extend("clike",{keyword:/\b(?:break|catch|case|class|continue|default|else|extends|final|for|if|implements|import|new|null|private|public|return|static|super|switch|this|try|void|while)\b/,operator:/<[<=]?|>[>=]?|&&?|\|\|?|[%?]|[!=+\-*\/]=?/}),Prism.languages.insertBefore("processing","number",{constant:/\b(?!XML\b)[A-Z][A-Z\d_]+\b/,type:{pattern:/\b(?:boolean|byte|char|color|double|float|int|[A-Z]\w*)\b/,alias:"variable"}}),Prism.languages.processing.function.pattern=/\w+(?=\s*\()/,Prism.languages.processing["class-name"].alias="variable";
          \ No newline at end of file
          +Prism.languages.processing=Prism.languages.extend("clike",{keyword:/\b(?:break|catch|case|class|continue|default|else|extends|final|for|if|implements|import|new|null|private|public|return|static|super|switch|this|try|void|while)\b/,operator:/<[<=]?|>[>=]?|&&?|\|\|?|[%?]|[!=+\-*\/]=?/}),Prism.languages.insertBefore("processing","number",{constant:/\b(?!XML\b)[A-Z][A-Z\d_]+\b/,type:{pattern:/\b(?:boolean|byte|char|color|double|float|int|[A-Z]\w*)\b/,alias:"variable"}}),Prism.languages.processing.function=/\w+(?=\s*\()/,Prism.languages.processing["class-name"].alias="variable";
          \ No newline at end of file
          
          From a409245e32a74ba34e16f4ee695304d125d16912 Mon Sep 17 00:00:00 2001
          From: Michael Schmidt 
          Date: Thu, 1 Oct 2020 12:32:22 +0200
          Subject: [PATCH 0635/1100] Show Language: Added title for plain text (#2555)
          
          ---
           gulpfile.js/index.js                             | 4 +++-
           plugins/show-language/index.html                 | 3 +++
           plugins/show-language/prism-show-language.js     | 1 +
           plugins/show-language/prism-show-language.min.js | 2 +-
           4 files changed, 8 insertions(+), 2 deletions(-)
          
          diff --git a/gulpfile.js/index.js b/gulpfile.js/index.js
          index fdc6a73ae2..bed24f5c7a 100644
          --- a/gulpfile.js/index.js
          +++ b/gulpfile.js/index.js
          @@ -160,7 +160,9 @@ async function languagePlugins() {
           	}
           
           	/** @type {Record} */
          -	const nonNullLanguageMap = {};
          +	const nonNullLanguageMap = {
          +		'none': 'Plain text'
          +	};
           	for (const id in languagesMap) {
           		const title = languagesMap[id];
           		if (title) {
          diff --git a/plugins/show-language/index.html b/plugins/show-language/index.html
          index 9531a13943..660f38f7d9 100644
          --- a/plugins/show-language/index.html
          +++ b/plugins/show-language/index.html
          @@ -33,6 +33,9 @@ 

          HTML (Markup)

          SVG

          The data-language attribute can be used to display a specific label whether it has been defined as a language or not.

          
          +
          +	

          Plain text

          +
          Just some text (aka. not code).

          diff --git a/plugins/show-language/prism-show-language.js b/plugins/show-language/prism-show-language.js index 7f246400e6..672d991581 100644 --- a/plugins/show-language/prism-show-language.js +++ b/plugins/show-language/prism-show-language.js @@ -12,6 +12,7 @@ // The languages map is built automatically with gulp var Languages = /*languages_placeholder[*/{ + "none": "Plain text", "html": "HTML", "xml": "XML", "svg": "SVG", diff --git a/plugins/show-language/prism-show-language.min.js b/plugins/show-language/prism-show-language.min.js index 62d6cfac1b..36298afbcd 100644 --- a/plugins/show-language/prism-show-language.min.js +++ b/plugins/show-language/prism-show-language.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof self&&self.Prism&&self.document)if(Prism.plugins.toolbar){var i={html:"HTML",xml:"XML",svg:"SVG",mathml:"MathML",ssml:"SSML",rss:"RSS",css:"CSS",clike:"C-like",js:"JavaScript",abap:"ABAP",abnf:"ABNF",al:"AL",antlr4:"ANTLR4",g4:"ANTLR4",apacheconf:"Apache Configuration",apl:"APL",aql:"AQL",arff:"ARFF",asciidoc:"AsciiDoc",adoc:"AsciiDoc",aspnet:"ASP.NET (C#)",asm6502:"6502 Assembly",autohotkey:"AutoHotkey",autoit:"AutoIt",basic:"BASIC",bbcode:"BBcode",bnf:"BNF",rbnf:"RBNF",bsl:"BSL (1C:Enterprise)",oscript:"OneScript",csharp:"C#",cs:"C#",dotnet:"C#",cpp:"C++",cil:"CIL",cmake:"CMake",coffee:"CoffeeScript",conc:"Concurnas",csp:"Content-Security-Policy","css-extras":"CSS Extras",dax:"DAX",django:"Django/Jinja2",jinja2:"Django/Jinja2","dns-zone-file":"DNS zone file","dns-zone":"DNS zone file",dockerfile:"Docker",ebnf:"EBNF",editorconfig:"EditorConfig",ejs:"EJS",etlua:"Embedded Lua templating",erb:"ERB","excel-formula":"Excel Formula",xlsx:"Excel Formula",xls:"Excel Formula",fsharp:"F#","firestore-security-rules":"Firestore security rules",ftl:"FreeMarker Template Language",gml:"GameMaker Language",gamemakerlanguage:"GameMaker Language",gcode:"G-code",gdscript:"GDScript",gedcom:"GEDCOM",glsl:"GLSL",graphql:"GraphQL",hs:"Haskell",hcl:"HCL",hlsl:"HLSL",http:"HTTP",hpkp:"HTTP Public-Key-Pins",hsts:"HTTP Strict-Transport-Security",ichigojam:"IchigoJam",ignore:".ignore",gitignore:".gitignore",hgignore:".hgignore",npmignore:".npmignore",inform7:"Inform 7",javadoc:"JavaDoc",javadoclike:"JavaDoc-like",javastacktrace:"Java stack trace",jq:"JQ",jsdoc:"JSDoc","js-extras":"JS Extras",json:"JSON",webmanifest:"Web App Manifest",json5:"JSON5",jsonp:"JSONP",jsstacktrace:"JS stack trace","js-templates":"JS Templates",kts:"Kotlin Script",kt:"Kotlin",latex:"LaTeX",tex:"TeX",context:"ConTeXt",lilypond:"LilyPond",ly:"LilyPond",emacs:"Lisp",elisp:"Lisp","emacs-lisp":"Lisp",llvm:"LLVM IR",lolcode:"LOLCODE",md:"Markdown","markup-templating":"Markup templating",matlab:"MATLAB",mel:"MEL",mongodb:"MongoDB",moon:"MoonScript",n1ql:"N1QL",n4js:"N4JS",n4jsd:"N4JS","nand2tetris-hdl":"Nand To Tetris HDL",naniscript:"Naninovel Script",nani:"Naninovel Script",nasm:"NASM",neon:"NEON",nginx:"nginx",nsis:"NSIS",objectivec:"Objective-C",objc:"Objective-C",ocaml:"OCaml",opencl:"OpenCL",parigp:"PARI/GP",objectpascal:"Object Pascal",pcaxis:"PC-Axis",px:"PC-Axis",peoplecode:"PeopleCode",pcode:"PeopleCode",php:"PHP",phpdoc:"PHPDoc","php-extras":"PHP Extras",plsql:"PL/SQL",powerquery:"PowerQuery",pq:"PowerQuery",mscript:"PowerQuery",powershell:"PowerShell",properties:".properties",protobuf:"Protocol Buffers",purebasic:"PureBasic",pbfasm:"PureBasic",purs:"PureScript",py:"Python",q:"Q (kdb+ database)",qml:"QML",rkt:"Racket",jsx:"React JSX",tsx:"React TSX",renpy:"Ren'py",rpy:"Ren'py",rest:"reST (reStructuredText)",robotframework:"Robot Framework",robot:"Robot Framework",rb:"Ruby",sas:"SAS",sass:"Sass (Sass)",scss:"Sass (Scss)","shell-session":"Shell session","sh-session":"Shell session",shellsession:"Shell session",sml:"SML",smlnj:"SML/NJ",solidity:"Solidity (Ethereum)",sol:"Solidity (Ethereum)","solution-file":"Solution file",sln:"Solution file",soy:"Soy (Closure Template)",sparql:"SPARQL",rq:"SPARQL","splunk-spl":"Splunk SPL",sqf:"SQF: Status Quo Function (Arma 3)",sql:"SQL",iecst:"Structured Text (IEC 61131-3)","t4-templating":"T4 templating","t4-cs":"T4 Text Templates (C#)",t4:"T4 Text Templates (C#)","t4-vb":"T4 Text Templates (VB)",tap:"TAP",tt2:"Template Toolkit 2",toml:"TOML",trig:"TriG",ts:"TypeScript",tsconfig:"TSConfig",uscript:"UnrealScript",uc:"UnrealScript",vbnet:"VB.Net",vhdl:"VHDL",vim:"vim","visual-basic":"Visual Basic",vba:"VBA",vb:"Visual Basic",wasm:"WebAssembly",wiki:"Wiki markup",xeoracube:"XeoraCube","xml-doc":"XML doc (.net)",xojo:"Xojo (REALbasic)",xquery:"XQuery",yaml:"YAML",yml:"YAML",yang:"YANG"};Prism.plugins.toolbar.registerButton("show-language",function(e){var s=e.element.parentNode;if(s&&/pre/i.test(s.nodeName)){var a,t=s.getAttribute("data-language")||i[e.language]||((a=e.language)?(a.substring(0,1).toUpperCase()+a.substring(1)).replace(/s(?=cript)/,"S"):a);if(t){var o=document.createElement("span");return o.textContent=t,o}}})}else console.warn("Show Languages plugin loaded before Toolbar plugin.")}(); \ No newline at end of file +!function(){if("undefined"!=typeof self&&self.Prism&&self.document)if(Prism.plugins.toolbar){var i={none:"Plain text",html:"HTML",xml:"XML",svg:"SVG",mathml:"MathML",ssml:"SSML",rss:"RSS",css:"CSS",clike:"C-like",js:"JavaScript",abap:"ABAP",abnf:"ABNF",al:"AL",antlr4:"ANTLR4",g4:"ANTLR4",apacheconf:"Apache Configuration",apl:"APL",aql:"AQL",arff:"ARFF",asciidoc:"AsciiDoc",adoc:"AsciiDoc",aspnet:"ASP.NET (C#)",asm6502:"6502 Assembly",autohotkey:"AutoHotkey",autoit:"AutoIt",basic:"BASIC",bbcode:"BBcode",bnf:"BNF",rbnf:"RBNF",bsl:"BSL (1C:Enterprise)",oscript:"OneScript",csharp:"C#",cs:"C#",dotnet:"C#",cpp:"C++",cil:"CIL",cmake:"CMake",coffee:"CoffeeScript",conc:"Concurnas",csp:"Content-Security-Policy","css-extras":"CSS Extras",dax:"DAX",django:"Django/Jinja2",jinja2:"Django/Jinja2","dns-zone-file":"DNS zone file","dns-zone":"DNS zone file",dockerfile:"Docker",ebnf:"EBNF",editorconfig:"EditorConfig",ejs:"EJS",etlua:"Embedded Lua templating",erb:"ERB","excel-formula":"Excel Formula",xlsx:"Excel Formula",xls:"Excel Formula",fsharp:"F#","firestore-security-rules":"Firestore security rules",ftl:"FreeMarker Template Language",gml:"GameMaker Language",gamemakerlanguage:"GameMaker Language",gcode:"G-code",gdscript:"GDScript",gedcom:"GEDCOM",glsl:"GLSL",graphql:"GraphQL",hs:"Haskell",hcl:"HCL",hlsl:"HLSL",http:"HTTP",hpkp:"HTTP Public-Key-Pins",hsts:"HTTP Strict-Transport-Security",ichigojam:"IchigoJam",ignore:".ignore",gitignore:".gitignore",hgignore:".hgignore",npmignore:".npmignore",inform7:"Inform 7",javadoc:"JavaDoc",javadoclike:"JavaDoc-like",javastacktrace:"Java stack trace",jq:"JQ",jsdoc:"JSDoc","js-extras":"JS Extras",json:"JSON",webmanifest:"Web App Manifest",json5:"JSON5",jsonp:"JSONP",jsstacktrace:"JS stack trace","js-templates":"JS Templates",kts:"Kotlin Script",kt:"Kotlin",latex:"LaTeX",tex:"TeX",context:"ConTeXt",lilypond:"LilyPond",ly:"LilyPond",emacs:"Lisp",elisp:"Lisp","emacs-lisp":"Lisp",llvm:"LLVM IR",lolcode:"LOLCODE",md:"Markdown","markup-templating":"Markup templating",matlab:"MATLAB",mel:"MEL",mongodb:"MongoDB",moon:"MoonScript",n1ql:"N1QL",n4js:"N4JS",n4jsd:"N4JS","nand2tetris-hdl":"Nand To Tetris HDL",naniscript:"Naninovel Script",nani:"Naninovel Script",nasm:"NASM",neon:"NEON",nginx:"nginx",nsis:"NSIS",objectivec:"Objective-C",objc:"Objective-C",ocaml:"OCaml",opencl:"OpenCL",parigp:"PARI/GP",objectpascal:"Object Pascal",pcaxis:"PC-Axis",px:"PC-Axis",peoplecode:"PeopleCode",pcode:"PeopleCode",php:"PHP",phpdoc:"PHPDoc","php-extras":"PHP Extras",plsql:"PL/SQL",powerquery:"PowerQuery",pq:"PowerQuery",mscript:"PowerQuery",powershell:"PowerShell",properties:".properties",protobuf:"Protocol Buffers",purebasic:"PureBasic",pbfasm:"PureBasic",purs:"PureScript",py:"Python",q:"Q (kdb+ database)",qml:"QML",rkt:"Racket",jsx:"React JSX",tsx:"React TSX",renpy:"Ren'py",rpy:"Ren'py",rest:"reST (reStructuredText)",robotframework:"Robot Framework",robot:"Robot Framework",rb:"Ruby",sas:"SAS",sass:"Sass (Sass)",scss:"Sass (Scss)","shell-session":"Shell session","sh-session":"Shell session",shellsession:"Shell session",sml:"SML",smlnj:"SML/NJ",solidity:"Solidity (Ethereum)",sol:"Solidity (Ethereum)","solution-file":"Solution file",sln:"Solution file",soy:"Soy (Closure Template)",sparql:"SPARQL",rq:"SPARQL","splunk-spl":"Splunk SPL",sqf:"SQF: Status Quo Function (Arma 3)",sql:"SQL",iecst:"Structured Text (IEC 61131-3)","t4-templating":"T4 templating","t4-cs":"T4 Text Templates (C#)",t4:"T4 Text Templates (C#)","t4-vb":"T4 Text Templates (VB)",tap:"TAP",tt2:"Template Toolkit 2",toml:"TOML",trig:"TriG",ts:"TypeScript",tsconfig:"TSConfig",uscript:"UnrealScript",uc:"UnrealScript",vbnet:"VB.Net",vhdl:"VHDL",vim:"vim","visual-basic":"Visual Basic",vba:"VBA",vb:"Visual Basic",wasm:"WebAssembly",wiki:"Wiki markup",xeoracube:"XeoraCube","xml-doc":"XML doc (.net)",xojo:"Xojo (REALbasic)",xquery:"XQuery",yaml:"YAML",yml:"YAML",yang:"YANG"};Prism.plugins.toolbar.registerButton("show-language",function(e){var a=e.element.parentNode;if(a&&/pre/i.test(a.nodeName)){var s,t=a.getAttribute("data-language")||i[e.language]||((s=e.language)?(s.substring(0,1).toUpperCase()+s.substring(1)).replace(/s(?=cript)/,"S"):s);if(t){var o=document.createElement("span");return o.textContent=t,o}}})}else console.warn("Show Languages plugin loaded before Toolbar plugin.")}(); \ No newline at end of file From 59853a52773ecbb686160d68481438264f90abaf Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Thu, 1 Oct 2020 12:33:11 +0200 Subject: [PATCH 0636/1100] YAML: Improved key pattern (#2561) --- components/prism-yaml.js | 15 +++++++++++---- components/prism-yaml.min.js | 2 +- tests/languages/yaml/key_feature.test | 10 ++++++++-- 3 files changed, 20 insertions(+), 7 deletions(-) diff --git a/components/prism-yaml.js b/components/prism-yaml.js index 3838926692..0ead359113 100644 --- a/components/prism-yaml.js +++ b/components/prism-yaml.js @@ -8,6 +8,12 @@ // https://yaml.org/spec/1.2/spec.html#c-ns-properties(n,c) var properties = '(?:' + tag.source + '(?:[ \t]+' + anchorOrAlias.source + ')?|' + anchorOrAlias.source + '(?:[ \t]+' + tag.source + ')?)'; + // https://yaml.org/spec/1.2/spec.html#ns-plain(n,c) + // This is a simplified version that doesn't support "#" and multiline keys + // All these long scarry character classes are simplified versions of YAML's characters + var plainKey = /(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-])(?:[ \t]*(?:(?![#:])|:))*/.source + .replace(//g, function () { return /[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source; }); + var string = /"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source; /** * @@ -31,9 +37,11 @@ }, 'comment': /#.*/, 'key': { - pattern: RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<>[ \t]+)?)[^\r\n{[\]},#\s]+?(?=\s*:\s)/.source - .replace(/<>/g, function () { return properties; })), + pattern: RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<>[ \t]+)?)<>(?=\s*:\s)/.source + .replace(/<>/g, function () { return properties; }) + .replace(/<>/g, function () { return '(?:' + plainKey + '|' + string + ')'; })), lookbehind: true, + greedy: true, alias: 'atrule' }, 'directive': { @@ -57,8 +65,7 @@ alias: 'important' }, 'string': { - // \2 because of the lookbehind group - pattern: createValuePattern(/("|')(?:(?!\2)[^\\\r\n]|\\.)*\2/.source), + pattern: createValuePattern(string), lookbehind: true, greedy: true }, diff --git a/components/prism-yaml.min.js b/components/prism-yaml.min.js index f4be9e0b27..e46001ebd9 100644 --- a/components/prism-yaml.min.js +++ b/components/prism-yaml.min.js @@ -1 +1 @@ -!function(n){var t=/[*&][^\s[\]{},]+/,e=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,r="(?:"+e.source+"(?:[ \t]+"+t.source+")?|"+t.source+"(?:[ \t]+"+e.source+")?)";function a(n,t){t=(t||"").replace(/m/g,"")+"m";var e="([:\\-,[{]\\s*(?:\\s<>[ \t]+)?)(?:<>)(?=[ \t]*(?:$|,|]|}|\\s*#))".replace(/<>/g,function(){return r}).replace(/<>/g,function(){return n});return RegExp(e,t)}n.languages.yaml={scalar:{pattern:RegExp("([\\-:]\\s*(?:\\s<>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)[^\r\n]+(?:\\2[^\r\n]+)*)".replace(/<>/g,function(){return r})),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp("((?:^|[:\\-,[{\r\n?])[ \t]*(?:<>[ \t]+)?)[^\r\n{[\\]},#\\s]+?(?=\\s*:\\s)".replace(/<>/g,function(){return r})),lookbehind:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:a("\\d{4}-\\d\\d?-\\d\\d?(?:[tT]|[ \t]+)\\d\\d?:\\d{2}:\\d{2}(?:\\.\\d*)?[ \t]*(?:Z|[-+]\\d\\d?(?::\\d{2})?)?|\\d{4}-\\d{2}-\\d{2}|\\d\\d?:\\d{2}(?::\\d{2}(?:\\.\\d*)?)?"),lookbehind:!0,alias:"number"},boolean:{pattern:a("true|false","i"),lookbehind:!0,alias:"important"},null:{pattern:a("null|~","i"),lookbehind:!0,alias:"important"},string:{pattern:a("(\"|')(?:(?!\\2)[^\\\\\r\n]|\\\\.)*\\2"),lookbehind:!0,greedy:!0},number:{pattern:a("[+-]?(?:0x[\\da-f]+|0o[0-7]+|(?:\\d+\\.?\\d*|\\.?\\d+)(?:e[+-]?\\d+)?|\\.inf|\\.nan)","i"),lookbehind:!0},tag:e,important:t,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},n.languages.yml=n.languages.yaml}(Prism); \ No newline at end of file +!function(e){var n=/[*&][^\s[\]{},]+/,t=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,r="(?:"+t.source+"(?:[ \t]+"+n.source+")?|"+n.source+"(?:[ \t]+"+t.source+")?)",a="(?:[^\\s\\x00-\\x08\\x0e-\\x1f!\"#%&'*,\\-:>?@[\\]`{|}\\x7f-\\x84\\x86-\\x9f\\ud800-\\udfff\\ufffe\\uffff]|[?:-])(?:[ \t]*(?:(?![#:])|:))*".replace(//g,function(){return"[^\\s\\x00-\\x08\\x0e-\\x1f,[\\]{}\\x7f-\\x84\\x86-\\x9f\\ud800-\\udfff\\ufffe\\uffff]"}),d="\"(?:[^\"\\\\\r\n]|\\\\.)*\"|'(?:[^'\\\\\r\n]|\\\\.)*'";function o(e,n){n=(n||"").replace(/m/g,"")+"m";var t="([:\\-,[{]\\s*(?:\\s<>[ \t]+)?)(?:<>)(?=[ \t]*(?:$|,|]|}|\\s*#))".replace(/<>/g,function(){return r}).replace(/<>/g,function(){return e});return RegExp(t,n)}e.languages.yaml={scalar:{pattern:RegExp("([\\-:]\\s*(?:\\s<>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)[^\r\n]+(?:\\2[^\r\n]+)*)".replace(/<>/g,function(){return r})),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp("((?:^|[:\\-,[{\r\n?])[ \t]*(?:<>[ \t]+)?)<>(?=\\s*:\\s)".replace(/<>/g,function(){return r}).replace(/<>/g,function(){return"(?:"+a+"|"+d+")"})),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:o("\\d{4}-\\d\\d?-\\d\\d?(?:[tT]|[ \t]+)\\d\\d?:\\d{2}:\\d{2}(?:\\.\\d*)?[ \t]*(?:Z|[-+]\\d\\d?(?::\\d{2})?)?|\\d{4}-\\d{2}-\\d{2}|\\d\\d?:\\d{2}(?::\\d{2}(?:\\.\\d*)?)?"),lookbehind:!0,alias:"number"},boolean:{pattern:o("true|false","i"),lookbehind:!0,alias:"important"},null:{pattern:o("null|~","i"),lookbehind:!0,alias:"important"},string:{pattern:o(d),lookbehind:!0,greedy:!0},number:{pattern:o("[+-]?(?:0x[\\da-f]+|0o[0-7]+|(?:\\d+\\.?\\d*|\\.?\\d+)(?:e[+-]?\\d+)?|\\.inf|\\.nan)","i"),lookbehind:!0},tag:t,important:n,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},e.languages.yml=e.languages.yaml}(Prism); \ No newline at end of file diff --git a/tests/languages/yaml/key_feature.test b/tests/languages/yaml/key_feature.test index 98359b22e9..affda31feb 100644 --- a/tests/languages/yaml/key_feature.test +++ b/tests/languages/yaml/key_feature.test @@ -1,15 +1,21 @@ --- foo: 4 FooBar : 5 +hello the-world: 23 +"\"foo# : {}[]": 23 +'\'foo# : {}[]': 23 ---------------------------------------------------- [ ["punctuation", "---"], ["key", "foo"], ["punctuation", ":"], ["number", "4"], - ["key", "FooBar"], ["punctuation", ":"], ["number", "5"] + ["key", "FooBar"], ["punctuation", ":"], ["number", "5"], + ["key", "hello the-world"], ["punctuation", ":"], ["number", "23"], + ["key", "\"\\\"foo# : {}[]\""], ["punctuation", ":"], ["number", "23"], + ["key", "'\\'foo# : {}[]'"], ["punctuation", ":"], ["number", "23"] ] ---------------------------------------------------- -Checks for keys. \ No newline at end of file +Checks for keys. From 8ae6a4bae618a3c571e3d3cc34c93d9316208da2 Mon Sep 17 00:00:00 2001 From: Tanner Dolby Date: Thu, 1 Oct 2020 12:30:04 -0700 Subject: [PATCH 0637/1100] Website: Fix typo on homepage by adding missing word add (#2570) --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index d9e79615f4..beac95486b 100644 --- a/index.html +++ b/index.html @@ -164,7 +164,7 @@

          Usage with CDNs

          In combination with CDNs, we recommend using the Autoloader plugin which automatically loads languages when necessary.

          -

          The setup of the Autoloader, will look like the following. You can also your own themes of course.

          +

          The setup of the Autoloader, will look like the following. You can also add your own themes of course.

          <!DOCTYPE html>
           <html>
          
          From 1761513e3db48ca9222037644a9c68746e24f039 Mon Sep 17 00:00:00 2001
          From: Ayesh Karunaratne 
          Date: Mon, 5 Oct 2020 18:01:19 +0700
          Subject: [PATCH 0638/1100] PHP: Added `match` keyword (PHP 8.0) (#2574)
          
          PHP introduces a new [`match` keyword in PHP 8.0](https://php.watch/versions/8.0/match-expression).
          ---
           components/prism-php.js                  | 2 +-
           components/prism-php.min.js              | 2 +-
           tests/languages/php/keyword_feature.test | 2 ++
           3 files changed, 4 insertions(+), 2 deletions(-)
          
          diff --git a/components/prism-php.js b/components/prism-php.js
          index 8c2751a5a5..19bca937c6 100644
          --- a/components/prism-php.js
          +++ b/components/prism-php.js
          @@ -12,7 +12,7 @@
            */
           (function (Prism) {
           	Prism.languages.php = Prism.languages.extend('clike', {
          -		'keyword': /\b(?:__halt_compiler|abstract|and|array|as|break|callable|case|catch|class|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|eval|exit|extends|final|finally|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|namespace|new|or|parent|print|private|protected|public|require|require_once|return|static|switch|throw|trait|try|unset|use|var|while|xor|yield)\b/i,
          +		'keyword': /\b(?:__halt_compiler|abstract|and|array|as|break|callable|case|catch|class|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|eval|exit|extends|final|finally|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|match|namespace|new|or|parent|print|private|protected|public|require|require_once|return|static|switch|throw|trait|try|unset|use|var|while|xor|yield)\b/i,
           		'boolean': {
           			pattern: /\b(?:false|true)\b/i,
           			alias: 'constant'
          diff --git a/components/prism-php.min.js b/components/prism-php.min.js
          index 1c4ef76587..63caeeadf7 100644
          --- a/components/prism-php.min.js
          +++ b/components/prism-php.min.js
          @@ -1 +1 @@
          -!function(n){n.languages.php=n.languages.extend("clike",{keyword:/\b(?:__halt_compiler|abstract|and|array|as|break|callable|case|catch|class|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|eval|exit|extends|final|finally|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|namespace|new|or|parent|print|private|protected|public|require|require_once|return|static|switch|throw|trait|try|unset|use|var|while|xor|yield)\b/i,boolean:{pattern:/\b(?:false|true)\b/i,alias:"constant"},constant:[/\b[A-Z_][A-Z0-9_]*\b/,/\b(?:null)\b/i],comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0}}),n.languages.insertBefore("php","string",{"shell-comment":{pattern:/(^|[^\\])#.*/,lookbehind:!0,alias:"comment"}}),n.languages.insertBefore("php","comment",{delimiter:{pattern:/\?>$|^<\?(?:php(?=\s)|=)?/i,alias:"important"}}),n.languages.insertBefore("php","keyword",{variable:/\$+(?:\w+\b|(?={))/i,package:{pattern:/(\\|namespace\s+|use\s+)[\w\\]+/,lookbehind:!0,inside:{punctuation:/\\/}}}),n.languages.insertBefore("php","operator",{property:{pattern:/(->)[\w]+/,lookbehind:!0}});var e={pattern:/{\$(?:{(?:{[^{}]+}|[^{}]+)}|[^{}])+}|(^|[^\\{])\$+(?:\w+(?:\[[^\r\n\[\]]+\]|->\w+)*)/,lookbehind:!0,inside:n.languages.php};n.languages.insertBefore("php","string",{"nowdoc-string":{pattern:/<<<'([^']+)'[\r\n](?:.*[\r\n])*?\1;/,greedy:!0,alias:"string",inside:{delimiter:{pattern:/^<<<'[^']+'|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<'?|[';]$/}}}},"heredoc-string":{pattern:/<<<(?:"([^"]+)"[\r\n](?:.*[\r\n])*?\1;|([a-z_]\w*)[\r\n](?:.*[\r\n])*?\2;)/i,greedy:!0,alias:"string",inside:{delimiter:{pattern:/^<<<(?:"[^"]+"|[a-z_]\w*)|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<"?|[";]$/}},interpolation:e}},"single-quoted-string":{pattern:/'(?:\\[\s\S]|[^\\'])*'/,greedy:!0,alias:"string"},"double-quoted-string":{pattern:/"(?:\\[\s\S]|[^\\"])*"/,greedy:!0,alias:"string",inside:{interpolation:e}}}),delete n.languages.php.string,n.hooks.add("before-tokenize",function(e){if(/<\?/.test(e.code)){n.languages["markup-templating"].buildPlaceholders(e,"php",/<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#)(?:[^?\n\r]|\?(?!>))*(?=$|\?>|[\r\n])|\/\*[\s\S]*?(?:\*\/|$))*?(?:\?>|$)/gi)}}),n.hooks.add("after-tokenize",function(e){n.languages["markup-templating"].tokenizePlaceholders(e,"php")})}(Prism);
          \ No newline at end of file
          +!function(n){n.languages.php=n.languages.extend("clike",{keyword:/\b(?:__halt_compiler|abstract|and|array|as|break|callable|case|catch|class|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|eval|exit|extends|final|finally|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|match|namespace|new|or|parent|print|private|protected|public|require|require_once|return|static|switch|throw|trait|try|unset|use|var|while|xor|yield)\b/i,boolean:{pattern:/\b(?:false|true)\b/i,alias:"constant"},constant:[/\b[A-Z_][A-Z0-9_]*\b/,/\b(?:null)\b/i],comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0}}),n.languages.insertBefore("php","string",{"shell-comment":{pattern:/(^|[^\\])#.*/,lookbehind:!0,alias:"comment"}}),n.languages.insertBefore("php","comment",{delimiter:{pattern:/\?>$|^<\?(?:php(?=\s)|=)?/i,alias:"important"}}),n.languages.insertBefore("php","keyword",{variable:/\$+(?:\w+\b|(?={))/i,package:{pattern:/(\\|namespace\s+|use\s+)[\w\\]+/,lookbehind:!0,inside:{punctuation:/\\/}}}),n.languages.insertBefore("php","operator",{property:{pattern:/(->)[\w]+/,lookbehind:!0}});var e={pattern:/{\$(?:{(?:{[^{}]+}|[^{}]+)}|[^{}])+}|(^|[^\\{])\$+(?:\w+(?:\[[^\r\n\[\]]+\]|->\w+)*)/,lookbehind:!0,inside:n.languages.php};n.languages.insertBefore("php","string",{"nowdoc-string":{pattern:/<<<'([^']+)'[\r\n](?:.*[\r\n])*?\1;/,greedy:!0,alias:"string",inside:{delimiter:{pattern:/^<<<'[^']+'|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<'?|[';]$/}}}},"heredoc-string":{pattern:/<<<(?:"([^"]+)"[\r\n](?:.*[\r\n])*?\1;|([a-z_]\w*)[\r\n](?:.*[\r\n])*?\2;)/i,greedy:!0,alias:"string",inside:{delimiter:{pattern:/^<<<(?:"[^"]+"|[a-z_]\w*)|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<"?|[";]$/}},interpolation:e}},"single-quoted-string":{pattern:/'(?:\\[\s\S]|[^\\'])*'/,greedy:!0,alias:"string"},"double-quoted-string":{pattern:/"(?:\\[\s\S]|[^\\"])*"/,greedy:!0,alias:"string",inside:{interpolation:e}}}),delete n.languages.php.string,n.hooks.add("before-tokenize",function(e){if(/<\?/.test(e.code)){n.languages["markup-templating"].buildPlaceholders(e,"php",/<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#)(?:[^?\n\r]|\?(?!>))*(?=$|\?>|[\r\n])|\/\*[\s\S]*?(?:\*\/|$))*?(?:\?>|$)/gi)}}),n.hooks.add("after-tokenize",function(e){n.languages["markup-templating"].tokenizePlaceholders(e,"php")})}(Prism);
          \ No newline at end of file
          diff --git a/tests/languages/php/keyword_feature.test b/tests/languages/php/keyword_feature.test
          index d40a24456e..41b72b7f14 100644
          --- a/tests/languages/php/keyword_feature.test
          +++ b/tests/languages/php/keyword_feature.test
          @@ -44,6 +44,7 @@ insteadof
           interface;
           isset
           list
          +match
           namespace;
           new;
           or
          @@ -116,6 +117,7 @@ yield
           	["keyword", "interface"], ["punctuation", ";"],
           	["keyword", "isset"],
           	["keyword", "list"],
          +	["keyword", "match"],
           	["keyword", "namespace"], ["punctuation", ";"],
           	["keyword", "new"], ["punctuation", ";"],
           	["keyword", "or"],
          
          From 655f985c3dd8ee7a7d68346b2fe03da458fb0806 Mon Sep 17 00:00:00 2001
          From: Jake Pfohl <40177206+jakepfohl@users.noreply.github.com>
          Date: Sat, 10 Oct 2020 10:46:30 -0500
          Subject: [PATCH 0639/1100] Website: Added new SB101 tutorial replacing the
           Crambler one (#2576)
          
          ---
           index.html | 2 +-
           1 file changed, 1 insertion(+), 1 deletion(-)
          
          diff --git a/index.html b/index.html
          index beac95486b..5b0b5350e9 100644
          --- a/index.html
          +++ b/index.html
          @@ -263,8 +263,8 @@ 

          Third-party tutorials

          Several tutorials have been written by members of the community to help you integrate Prism into multiple different website types and configurations:

            +
          • How to Add Prism.js Syntax Highlighting to Your WordPress Site
          • Escape HTML Inside <code> or <pre> Tag to Entities to Display Raw Code with PrismJS
          • -
          • How To Implement Prism.js Syntax Highlighting Into Your WordPress Site
          • Adding a Syntax Highlighter Shortcode Using Prism.js | WPTuts+
          • Implement PrismJs Syntax Highlighting to your Blogger/BlogSpot
          • How To Re-Run Prism.js On AJAX Content
          • From 6ab7ab12adf4788a3f1ad10cc1e5209416dd1cf1 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Sat, 10 Oct 2020 19:00:19 +0200 Subject: [PATCH 0640/1100] Changelog for v1.22.0 (#2579) --- CHANGELOG.md | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index db84cf20fa..7bf632c7c2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,63 @@ # Prism Changelog +## 1.22.0 (2020-10-10) + +### New components + +* __Birb__ ([#2542](https://github.com/PrismJS/prism/issues/2542)) [`4d31e22a`](https://github.com/PrismJS/prism/commit/4d31e22a) +* __BSL (1C:Enterprise)__ & __OneScript__ ([#2520](https://github.com/PrismJS/prism/issues/2520)) [`5c33f0bb`](https://github.com/PrismJS/prism/commit/5c33f0bb) +* __MongoDB__ ([#2518](https://github.com/PrismJS/prism/issues/2518)) [`004eaa74`](https://github.com/PrismJS/prism/commit/004eaa74) +* __Naninovel Script__ ([#2494](https://github.com/PrismJS/prism/issues/2494)) [`388ad996`](https://github.com/PrismJS/prism/commit/388ad996) +* __PureScript__ ([#2526](https://github.com/PrismJS/prism/issues/2526)) [`ad748a00`](https://github.com/PrismJS/prism/commit/ad748a00) +* __SML__ & __SML/NJ__ ([#2537](https://github.com/PrismJS/prism/issues/2537)) [`cb75d9e2`](https://github.com/PrismJS/prism/commit/cb75d9e2) +* __Stan__ ([#2490](https://github.com/PrismJS/prism/issues/2490)) [`2da2beba`](https://github.com/PrismJS/prism/commit/2da2beba) +* __TypoScript__ & __TSConfig__ ([#2505](https://github.com/PrismJS/prism/issues/2505)) [`bf115f47`](https://github.com/PrismJS/prism/commit/bf115f47) + +### Updated components + +* Removed duplicate alternatives in various languages ([#2524](https://github.com/PrismJS/prism/issues/2524)) [`fa2225ff`](https://github.com/PrismJS/prism/commit/fa2225ff) +* __Haskell__ + * Improvements ([#2535](https://github.com/PrismJS/prism/issues/2535)) [`e023044c`](https://github.com/PrismJS/prism/commit/e023044c) +* __JS Extras__ + * Highlight import and export bindings ([#2533](https://github.com/PrismJS/prism/issues/2533)) [`c51ababb`](https://github.com/PrismJS/prism/commit/c51ababb) + * Added control-flow keywords ([#2529](https://github.com/PrismJS/prism/issues/2529)) [`bcef22af`](https://github.com/PrismJS/prism/commit/bcef22af) +* __PHP__ + * Added `match` keyword (PHP 8.0) ([#2574](https://github.com/PrismJS/prism/issues/2574)) [`1761513e`](https://github.com/PrismJS/prism/commit/1761513e) +* __Processing__ + * Fixed function pattern ([#2564](https://github.com/PrismJS/prism/issues/2564)) [`35cbc02f`](https://github.com/PrismJS/prism/commit/35cbc02f) +* __Regex__ + * Changed how languages embed regexes ([#2532](https://github.com/PrismJS/prism/issues/2532)) [`f62ca787`](https://github.com/PrismJS/prism/commit/f62ca787) +* __Rust__ + * Fixed Unicode char literals ([#2550](https://github.com/PrismJS/prism/issues/2550)) [`3b4f14ca`](https://github.com/PrismJS/prism/commit/3b4f14ca) +* __Scheme__ + * Added support for R7RS syntax ([#2525](https://github.com/PrismJS/prism/issues/2525)) [`e4f6ccac`](https://github.com/PrismJS/prism/commit/e4f6ccac) +* __Shell session__ + * Added aliases ([#2548](https://github.com/PrismJS/prism/issues/2548)) [`bfb36748`](https://github.com/PrismJS/prism/commit/bfb36748) + * Highlight all commands after the start of any Heredoc string ([#2509](https://github.com/PrismJS/prism/issues/2509)) [`6c921801`](https://github.com/PrismJS/prism/commit/6c921801) +* __YAML__ + * Improved key pattern ([#2561](https://github.com/PrismJS/prism/issues/2561)) [`59853a52`](https://github.com/PrismJS/prism/commit/59853a52) + +### Updated plugins + +* __Autoloader__ + * Fixed file detection regexes ([#2549](https://github.com/PrismJS/prism/issues/2549)) [`d36ea993`](https://github.com/PrismJS/prism/commit/d36ea993) +* __Match braces__ + * Fixed JS interpolation punctuation ([#2541](https://github.com/PrismJS/prism/issues/2541)) [`6b47133d`](https://github.com/PrismJS/prism/commit/6b47133d) +* __Show Language__ + * Added title for plain text ([#2555](https://github.com/PrismJS/prism/issues/2555)) [`a409245e`](https://github.com/PrismJS/prism/commit/a409245e) + +### Other + +* Tests: Added an option to accept the actual token stream ([#2515](https://github.com/PrismJS/prism/issues/2515)) [`bafab634`](https://github.com/PrismJS/prism/commit/bafab634) +* __Core__ + * Docs: Minor improvement ([#2513](https://github.com/PrismJS/prism/issues/2513)) [`206dc80f`](https://github.com/PrismJS/prism/commit/206dc80f) +* __Infrastructure__ + * JSDoc: Fixed line ends ([#2523](https://github.com/PrismJS/prism/issues/2523)) [`bf169e5f`](https://github.com/PrismJS/prism/commit/bf169e5f) +* __Website__ + * Website: Added new SB101 tutorial replacing the Crambler one ([#2576](https://github.com/PrismJS/prism/issues/2576)) [`655f985c`](https://github.com/PrismJS/prism/commit/655f985c) + * Website: Fix typo on homepage by adding missing word add ([#2570](https://github.com/PrismJS/prism/issues/2570)) [`8ae6a4ba`](https://github.com/PrismJS/prism/commit/8ae6a4ba) + * Custom class: Improved doc ([#2512](https://github.com/PrismJS/prism/issues/2512)) [`5ad6cb23`](https://github.com/PrismJS/prism/commit/5ad6cb23) + ## 1.21.0 (2020-08-06) ### New components From 38f42dd668a7bf388dfe0f5ed4b07aacb23b0255 Mon Sep 17 00:00:00 2001 From: mAAdhaTTah Date: Sat, 10 Oct 2020 14:25:16 -0400 Subject: [PATCH 0641/1100] 1.22.0 --- package-lock.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index ca8d097d40..0ac26b0894 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "prismjs", - "version": "1.21.0", + "version": "1.22.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index b498d9317a..f921f71502 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "prismjs", - "version": "1.21.0", + "version": "1.22.0", "description": "Lightweight, robust, elegant syntax highlighting. A spin-off project from Dabblet.", "main": "prism.js", "style": "themes/prism.css", From 38808e6478ade1ac4c106dd8d57073be115991f8 Mon Sep 17 00:00:00 2001 From: Tom Pavelec <46928405+TomPavelec@users.noreply.github.com> Date: Tue, 13 Oct 2020 14:03:42 +0200 Subject: [PATCH 0642/1100] PHP: Added support for PHP 7.4 + other major improvements (#2566) --- components/prism-php.js | 261 ++++++++++++------ components/prism-php.min.js | 2 +- tests/languages/latte/html_feature.test | 20 +- tests/languages/latte/n-attr_feature.test | 4 +- tests/languages/latte/php_feature.test | 12 +- tests/languages/markup+php/issue1582.test | 46 +-- ...hp_with_closing_tag_in_markup_feature.test | 88 +++--- tests/languages/php/boolean_feature.test | 32 +-- tests/languages/php/class-name_feature.test | 137 +++++++++ tests/languages/php/comment_feature.test | 12 +- tests/languages/php/keyword_feature.test | 20 +- tests/languages/php/number_feature.test | 27 ++ tests/languages/php/operators_feature.test | 91 ++++++ tests/languages/php/package_feature.test | 15 + tests/languages/php/property_feature.test | 14 +- tests/languages/php/punctuation_feature.test | 27 ++ .../languages/php/shell-comment_feature.test | 13 - .../php/string-interpolation_feature.test | 38 +-- tests/languages/php/string_feature.test | 17 +- tests/languages/php/type_feature.test | 63 +++++ 20 files changed, 697 insertions(+), 242 deletions(-) create mode 100644 tests/languages/php/class-name_feature.test create mode 100644 tests/languages/php/number_feature.test create mode 100644 tests/languages/php/operators_feature.test create mode 100644 tests/languages/php/punctuation_feature.test delete mode 100644 tests/languages/php/shell-comment_feature.test create mode 100644 tests/languages/php/type_feature.test diff --git a/components/prism-php.js b/components/prism-php.js index 19bca937c6..c6607fca3b 100644 --- a/components/prism-php.js +++ b/components/prism-php.js @@ -1,65 +1,147 @@ /** * Original by Aaron Harun: http://aahacreative.com/2012/07/31/php-syntax-highlighting-prism/ * Modified by Miles Johnson: http://milesj.me + * Rewritten by Tom Pavelec * - * Supports the following: - * - Extends clike syntax - * - Support for PHP 5.3+ (namespaces, traits, generators, etc) - * - Smarter constant and function matching - * - * Adds the following new token classes: - * constant, delimiter, variable, function, package + * Supports PHP 5.3 - 7.4 */ (function (Prism) { - Prism.languages.php = Prism.languages.extend('clike', { - 'keyword': /\b(?:__halt_compiler|abstract|and|array|as|break|callable|case|catch|class|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|eval|exit|extends|final|finally|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|match|namespace|new|or|parent|print|private|protected|public|require|require_once|return|static|switch|throw|trait|try|unset|use|var|while|xor|yield)\b/i, - 'boolean': { - pattern: /\b(?:false|true)\b/i, - alias: 'constant' - }, - 'constant': [ - /\b[A-Z_][A-Z0-9_]*\b/, - /\b(?:null)\b/i, - ], - 'comment': { - pattern: /(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/, - lookbehind: true - } - }); - - Prism.languages.insertBefore('php', 'string', { - 'shell-comment': { - pattern: /(^|[^\\])#.*/, - lookbehind: true, - alias: 'comment' - } - }); - - Prism.languages.insertBefore('php', 'comment', { + Prism.languages.php = { 'delimiter': { pattern: /\?>$|^<\?(?:php(?=\s)|=)?/i, alias: 'important' - } - }); - - Prism.languages.insertBefore('php', 'keyword', { + }, + 'comment': [ + /\/\*[\s\S]*?\*\/|\/\/.*|#.*/ + ], 'variable': /\$+(?:\w+\b|(?={))/i, 'package': { - pattern: /(\\|namespace\s+|use\s+)[\w\\]+/, + pattern: /(namespace\s+|use\s+(?:function\s+)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i, lookbehind: true, inside: { - punctuation: /\\/ + 'punctuation': /\\/ } - } - }); - - // Must be defined after the function pattern - Prism.languages.insertBefore('php', 'operator', { + }, + 'keyword': [ + { + pattern: /(\(\s*)\b(?:bool|boolean|int|integer|float|string|object|array)\b(?=\s*\))/i, + alias: 'type-casting', + greedy: true, + lookbehind: true + }, + { + pattern: /([(,?]\s*)\b(?:bool|boolean|int|integer|float|string|object|array(?!\s*\()|mixed|self|static|callable|iterable)\b(?=\s*\$)/i, + alias: 'type-hint', + greedy: true, + lookbehind: true + }, + { + pattern: /(\)\s*:\s*\?*\s*)\b(?:bool|boolean|int|integer|float|string|object|void|array(?!\s*\()|mixed|self|static|callable|iterable)\b/i, + alias: 'return-type', + greedy: true, + lookbehind: true + }, + { + pattern: /\b(?:bool|boolean|int|integer|float|string|object|void|array(?!\s*\()|mixed|iterable)\b/i, + alias: 'type-declaration', + greedy: true + }, + { + pattern: /\b(?:parent|self|static)(?=\s*::)/i, + alias: 'static-context', + greedy: true + }, + /\b(?:__halt_compiler|abstract|and|array|as|break|callable|case|catch|class|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|eval|exit|extends|final|finally|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|namespace|match|new|or|parent|print|private|protected|public|require|require_once|return|self|static|switch|throw|trait|try|unset|use|var|while|xor|yield)\b/i + ], + 'class-name': [ + { + pattern: /(\b(?:class|interface|extends|implements|trait|instanceof|new(?!\s+self|\s+static))\s+|\bcatch\s+\()\b[a-z_]\w*(?!\\)\b/i, + greedy: true, + lookbehind: true + }, + { + pattern: /(\b(?:extends|implements|instanceof|new(?!\s+self\b|\s+static\b))\s+|\bcatch\s+\()(?:\\?\b[a-z_]\w*)+\b(?!\\)/i, + alias: 'class-name-fully-qualified', + greedy: true, + lookbehind: true, + inside: { + 'punctuation': /\\/ + } + }, + { + pattern: /\b[a-z_]\w*(?=\s*\$)/i, + alias: 'type-declaration', + greedy: true + }, + { + pattern: /(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i, + alias: ['class-name-fully-qualified', 'type-declaration'], + greedy: true, + inside: { + 'punctuation': /\\/ + } + }, + { + pattern: /\b[a-z_]\w*(?=\s*::)/i, + alias: 'static-context', + greedy: true + }, + { + pattern: /(?:\\?\b[a-z_]\w*)+(?=\s*::)/i, + alias: ['class-name-fully-qualified', 'static-context'], + greedy: true, + inside: { + 'punctuation': /\\/ + } + }, + { + pattern: /([(,?]\s*)[a-z_]\w*(?=\s*\$)/i, + alias: 'type-hint', + greedy: true, + lookbehind: true + }, + { + pattern: /([(,?]\s*)(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i, + alias: ['class-name-fully-qualified', 'type-hint'], + greedy: true, + lookbehind: true, + inside: { + 'punctuation': /\\/ + } + }, + { + pattern: /(\)\s*:\s*\?*\s*)\b[a-z_]\w*(?!\\)\b/i, + alias: 'return-type', + greedy: true, + lookbehind: true + }, + { + pattern: /(\)\s*:\s*\?*\s*)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i, + alias: ['class-name-fully-qualified', 'return-type'], + greedy: true, + lookbehind: true, + inside: { + 'punctuation': /\\/ + } + } + ], + 'constant': [ + { + pattern: /\b(?:false|true)\b/i, + alias: 'boolean' + }, + /\b[A-Z_][A-Z0-9_]*\b/, + /\b(?:null)\b/i, + ], + 'function': /\w+\s*(?=\()/, 'property': { pattern: /(->)[\w]+/, lookbehind: true - } - }); + }, + 'number': /\b0b[01]+\b|\b0x[\da-f]+\b|(?:\b\d+(?:_\d+)*\.?(?:\d+(?:_\d+)*)*|\B\.\d+)(?:e[+-]?\d+)?/i, + 'operator': /|\?\?=?|\.{3}|->|[!=]=?=?|::|\*\*=?|--|\+\+|&&|\|\||[?~]|[/^|%*&<>.+-]=?/, + 'punctuation': /[{}\[\](),:;]/ + }; var string_interpolation = { pattern: /{\$(?:{(?:{[^{}]+}|[^{}]+)}|[^{}])+}|(^|[^\\{])\$+(?:\w+(?:\[[^\r\n\[\]]+\]|->\w+)*)/, @@ -67,52 +149,57 @@ inside: Prism.languages.php }; - Prism.languages.insertBefore('php', 'string', { - 'nowdoc-string': { - pattern: /<<<'([^']+)'[\r\n](?:.*[\r\n])*?\1;/, - greedy: true, - alias: 'string', - inside: { - 'delimiter': { - pattern: /^<<<'[^']+'|[a-z_]\w*;$/i, - alias: 'symbol', - inside: { - 'punctuation': /^<<<'?|[';]$/ + Prism.languages.insertBefore('php', 'variable', { + 'string': [ + { + pattern: /<<<'([^']+)'[\r\n](?:.*[\r\n])*?\1;/, + alias: 'nowdoc-string', + greedy: true, + inside: { + 'delimiter': { + pattern: /^<<<'[^']+'|[a-z_]\w*;$/i, + alias: 'symbol', + inside: { + 'punctuation': /^<<<'?|[';]$/ + } } } + }, + { + pattern: /<<<(?:"([^"]+)"[\r\n](?:.*[\r\n])*?\1;|([a-z_]\w*)[\r\n](?:.*[\r\n])*?\2;)/i, + alias: 'heredoc-string', + greedy: true, + inside: { + 'delimiter': { + pattern: /^<<<(?:"[^"]+"|[a-z_]\w*)|[a-z_]\w*;$/i, + alias: 'symbol', + inside: { + 'punctuation': /^<<<"?|[";]$/ + } + }, + 'interpolation': string_interpolation // See below + } + }, + { + pattern: /`(?:\\[\s\S]|[^\\`])*`/, + alias: 'backtick-quoted-string', + greedy: true + }, + { + pattern: /'(?:\\[\s\S]|[^\\'])*'/, + alias: 'single-quoted-string', + greedy: true + }, + { + pattern: /"(?:\\[\s\S]|[^\\"])*"/, + alias: 'double-quoted-string', + greedy: true, + inside: { + 'interpolation': string_interpolation // See below + } } - }, - 'heredoc-string': { - pattern: /<<<(?:"([^"]+)"[\r\n](?:.*[\r\n])*?\1;|([a-z_]\w*)[\r\n](?:.*[\r\n])*?\2;)/i, - greedy: true, - alias: 'string', - inside: { - 'delimiter': { - pattern: /^<<<(?:"[^"]+"|[a-z_]\w*)|[a-z_]\w*;$/i, - alias: 'symbol', - inside: { - 'punctuation': /^<<<"?|[";]$/ - } - }, - 'interpolation': string_interpolation // See below - } - }, - 'single-quoted-string': { - pattern: /'(?:\\[\s\S]|[^\\'])*'/, - greedy: true, - alias: 'string' - }, - 'double-quoted-string': { - pattern: /"(?:\\[\s\S]|[^\\"])*"/, - greedy: true, - alias: 'string', - inside: { - 'interpolation': string_interpolation // See below - } - } + ], }); - // The different types of PHP strings "replace" the C-like standard string - delete Prism.languages.php['string']; Prism.hooks.add('before-tokenize', function(env) { if (!/<\?/.test(env.code)) { diff --git a/components/prism-php.min.js b/components/prism-php.min.js index 63caeeadf7..7ab532e717 100644 --- a/components/prism-php.min.js +++ b/components/prism-php.min.js @@ -1 +1 @@ -!function(n){n.languages.php=n.languages.extend("clike",{keyword:/\b(?:__halt_compiler|abstract|and|array|as|break|callable|case|catch|class|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|eval|exit|extends|final|finally|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|match|namespace|new|or|parent|print|private|protected|public|require|require_once|return|static|switch|throw|trait|try|unset|use|var|while|xor|yield)\b/i,boolean:{pattern:/\b(?:false|true)\b/i,alias:"constant"},constant:[/\b[A-Z_][A-Z0-9_]*\b/,/\b(?:null)\b/i],comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0}}),n.languages.insertBefore("php","string",{"shell-comment":{pattern:/(^|[^\\])#.*/,lookbehind:!0,alias:"comment"}}),n.languages.insertBefore("php","comment",{delimiter:{pattern:/\?>$|^<\?(?:php(?=\s)|=)?/i,alias:"important"}}),n.languages.insertBefore("php","keyword",{variable:/\$+(?:\w+\b|(?={))/i,package:{pattern:/(\\|namespace\s+|use\s+)[\w\\]+/,lookbehind:!0,inside:{punctuation:/\\/}}}),n.languages.insertBefore("php","operator",{property:{pattern:/(->)[\w]+/,lookbehind:!0}});var e={pattern:/{\$(?:{(?:{[^{}]+}|[^{}]+)}|[^{}])+}|(^|[^\\{])\$+(?:\w+(?:\[[^\r\n\[\]]+\]|->\w+)*)/,lookbehind:!0,inside:n.languages.php};n.languages.insertBefore("php","string",{"nowdoc-string":{pattern:/<<<'([^']+)'[\r\n](?:.*[\r\n])*?\1;/,greedy:!0,alias:"string",inside:{delimiter:{pattern:/^<<<'[^']+'|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<'?|[';]$/}}}},"heredoc-string":{pattern:/<<<(?:"([^"]+)"[\r\n](?:.*[\r\n])*?\1;|([a-z_]\w*)[\r\n](?:.*[\r\n])*?\2;)/i,greedy:!0,alias:"string",inside:{delimiter:{pattern:/^<<<(?:"[^"]+"|[a-z_]\w*)|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<"?|[";]$/}},interpolation:e}},"single-quoted-string":{pattern:/'(?:\\[\s\S]|[^\\'])*'/,greedy:!0,alias:"string"},"double-quoted-string":{pattern:/"(?:\\[\s\S]|[^\\"])*"/,greedy:!0,alias:"string",inside:{interpolation:e}}}),delete n.languages.php.string,n.hooks.add("before-tokenize",function(e){if(/<\?/.test(e.code)){n.languages["markup-templating"].buildPlaceholders(e,"php",/<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#)(?:[^?\n\r]|\?(?!>))*(?=$|\?>|[\r\n])|\/\*[\s\S]*?(?:\*\/|$))*?(?:\?>|$)/gi)}}),n.hooks.add("after-tokenize",function(e){n.languages["markup-templating"].tokenizePlaceholders(e,"php")})}(Prism); \ No newline at end of file +!function(a){a.languages.php={delimiter:{pattern:/\?>$|^<\?(?:php(?=\s)|=)?/i,alias:"important"},comment:[/\/\*[\s\S]*?\*\/|\/\/.*|#.*/],variable:/\$+(?:\w+\b|(?={))/i,package:{pattern:/(namespace\s+|use\s+(?:function\s+)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,lookbehind:!0,inside:{punctuation:/\\/}},keyword:[{pattern:/(\(\s*)\b(?:bool|boolean|int|integer|float|string|object|array)\b(?=\s*\))/i,alias:"type-casting",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)\b(?:bool|boolean|int|integer|float|string|object|array(?!\s*\()|mixed|self|static|callable|iterable)\b(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*\?*\s*)\b(?:bool|boolean|int|integer|float|string|object|void|array(?!\s*\()|mixed|self|static|callable|iterable)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/\b(?:bool|boolean|int|integer|float|string|object|void|array(?!\s*\()|mixed|iterable)\b/i,alias:"type-declaration",greedy:!0},{pattern:/\b(?:parent|self|static)(?=\s*::)/i,alias:"static-context",greedy:!0},/\b(?:__halt_compiler|abstract|and|array|as|break|callable|case|catch|class|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|eval|exit|extends|final|finally|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|namespace|match|new|or|parent|print|private|protected|public|require|require_once|return|self|static|switch|throw|trait|try|unset|use|var|while|xor|yield)\b/i],"class-name":[{pattern:/(\b(?:class|interface|extends|implements|trait|instanceof|new(?!\s+self|\s+static))\s+|\bcatch\s+\()\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self\b|\s+static\b))\s+|\bcatch\s+\()(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*\$)/i,alias:"type-declaration",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-declaration"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*::)/i,alias:["class-name-fully-qualified","static-context"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/([(,?]\s*)[a-z_]\w*(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-hint"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(\)\s*:\s*\?*\s*)\b[a-z_]\w*(?!\\)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*\?*\s*)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:["class-name-fully-qualified","return-type"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:[{pattern:/\b(?:false|true)\b/i,alias:"boolean"},/\b[A-Z_][A-Z0-9_]*\b/,/\b(?:null)\b/i],function:/\w+\s*(?=\()/,property:{pattern:/(->)[\w]+/,lookbehind:!0},number:/\b0b[01]+\b|\b0x[\da-f]+\b|(?:\b\d+(?:_\d+)*\.?(?:\d+(?:_\d+)*)*|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/|\?\?=?|\.{3}|->|[!=]=?=?|::|\*\*=?|--|\+\+|&&|\|\||[?~]|[/^|%*&<>.+-]=?/,punctuation:/[{}\[\](),:;]/};var e={pattern:/{\$(?:{(?:{[^{}]+}|[^{}]+)}|[^{}])+}|(^|[^\\{])\$+(?:\w+(?:\[[^\r\n\[\]]+\]|->\w+)*)/,lookbehind:!0,inside:a.languages.php};a.languages.insertBefore("php","variable",{string:[{pattern:/<<<'([^']+)'[\r\n](?:.*[\r\n])*?\1;/,alias:"nowdoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<'[^']+'|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<'?|[';]$/}}}},{pattern:/<<<(?:"([^"]+)"[\r\n](?:.*[\r\n])*?\1;|([a-z_]\w*)[\r\n](?:.*[\r\n])*?\2;)/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<(?:"[^"]+"|[a-z_]\w*)|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<"?|[";]$/}},interpolation:e}},{pattern:/`(?:\\[\s\S]|[^\\`])*`/,alias:"backtick-quoted-string",greedy:!0},{pattern:/'(?:\\[\s\S]|[^\\'])*'/,alias:"single-quoted-string",greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,alias:"double-quoted-string",greedy:!0,inside:{interpolation:e}}]}),a.hooks.add("before-tokenize",function(e){if(/<\?/.test(e.code)){a.languages["markup-templating"].buildPlaceholders(e,"php",/<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#)(?:[^?\n\r]|\?(?!>))*(?=$|\?>|[\r\n])|\/\*[\s\S]*?(?:\*\/|$))*?(?:\?>|$)/gi)}}),a.hooks.add("after-tokenize",function(e){a.languages["markup-templating"].tokenizePlaceholders(e,"php")})}(Prism); \ No newline at end of file diff --git a/tests/languages/latte/html_feature.test b/tests/languages/latte/html_feature.test index 3047eb0a27..d6534973bb 100644 --- a/tests/languages/latte/html_feature.test +++ b/tests/languages/latte/html_feature.test @@ -15,35 +15,35 @@ ["tag", [["tag", [["punctuation", "<"], "a"]], ["attr-name", ["href"]], ["attr-value", [["punctuation", "="], ["punctuation", "\""], ["latte", [["ld", [["punctuation", "{"], ["tag", "link"]]], - ["php", ["Post", ["punctuation", ":"], "show ", ["variable", "$post"], ["operator", "-"], ["operator", ">"], ["property", "id"]]], + ["php", ["Post", ["punctuation", ":"], ["class-name", "show"], ["variable", "$post"], ["operator", "->"], ["property", "id"]]], ["rd", [["punctuation", "}"]]]]], ["punctuation", "\""]]], ["punctuation", ">"]]], - ["latte", [["ld", [["punctuation", "{"]]], ["php", [["variable", "$post"], ["operator", "-"], ["operator", ">"], ["property", "title"]]], ["rd", [["punctuation", "}"]]]]], + ["latte", [["ld", [["punctuation", "{"]]], ["php", [["variable", "$post"], ["operator", "->"], ["property", "title"]]], ["rd", [["punctuation", "}"]]]]], ["tag", [["tag", [["punctuation", ""]]], ["tag", [["tag", [["punctuation", "<"], "a"]], ["attr-name", - [["latte", [["ld", [["punctuation", "{"], ["tag", "if"]]], ["php", [["variable", "$post"], ["operator", "-"], ["operator", ">"], ["property", "id"]]], ["rd", [["punctuation", "}"]]]]], "title"] + [["latte", [["ld", [["punctuation", "{"], ["tag", "if"]]], ["php", [["variable", "$post"], ["operator", "->"], ["property", "id"]]], ["rd", [["punctuation", "}"]]]]], "title"] ], ["attr-value", [["punctuation", "="], ["punctuation", "\""], "ahoj", ["punctuation", "\""]]], ["attr-name", [["latte", [["ld", [["punctuation", "{/"], ["tag", "if"]]], ["rd", [["punctuation", "}"]]]]]]], ["punctuation", ">"]]], - ["latte", [["ld", [["punctuation", "{"]]], ["php", [["variable", "$post"], ["operator", "-"], ["operator", ">"], ["property", "title"]]], ["rd", [["punctuation", "}"]]]]], + ["latte", [["ld", [["punctuation", "{"]]], ["php", [["variable", "$post"], ["operator", "->"], ["property", "title"]]], ["rd", [["punctuation", "}"]]]]], ["tag", [["tag", [["punctuation", ""]]], - ["latte", [["ld", [["punctuation", "{"], ["tag", "tag"]]], ["php", [["variable", "$a"], ["operator", "="], ["boolean", "true"], ["operator", "?"], ["number", "10"], ["operator", "*"], ["number", "5"]]], ["rd", [["punctuation", "}"]]]]], + ["latte", [["ld", [["punctuation", "{"], ["tag", "tag"]]], ["php", [["variable", "$a"], ["operator", "="], ["constant", "true"], ["operator", "?"], ["number", "10"], ["operator", "*"], ["number", "5"]]], ["rd", [["punctuation", "}"]]]]], ["tag", [["tag", [["punctuation", "<"], "div"]], - ["n-attr", [["attr-name", "n:attr"], ["attr-value", [["punctuation", "="], ["punctuation", "\""], ["php", [["variable", "$a"], ["operator", "="], ["boolean", "true"], ["operator", "?"], ["number", "10"], ["operator", "*"], ["number", "5"]]], ["punctuation", "\""]]]]], + ["n-attr", [["attr-name", "n:attr"], ["attr-value", [["punctuation", "="], ["punctuation", "\""], ["php", [["variable", "$a"], ["operator", "="], ["constant", "true"], ["operator", "?"], ["number", "10"], ["operator", "*"], ["number", "5"]]], ["punctuation", "\""]]]]], ["punctuation", ">"]]], - ["latte", [["ld", [["punctuation", "{"], ["tag", "php"]]], ["php", [["single-quoted-string", "''"]]], ["rd", [["punctuation", "}"]]]]], + ["latte", [["ld", [["punctuation", "{"], ["tag", "php"]]], ["php", [["string", "''"]]], ["rd", [["punctuation", "}"]]]]], - ["latte", [["ld", [["punctuation", "{"], ["tag", "php"]]], ["php", [["double-quoted-string", ["\"\""]]]], ["rd", [["punctuation", "}"]]]]], + ["latte", [["ld", [["punctuation", "{"], ["tag", "php"]]], ["php", [["string", ["\"\""]]]], ["rd", [["punctuation", "}"]]]]], - ["latte", [["ld", [["punctuation", "{"], ["tag", "php"]]], ["php", [["double-quoted-string", ["\"ba\\\"r\""]]]], ["rd", [["punctuation", "}"]]]]], + ["latte", [["ld", [["punctuation", "{"], ["tag", "php"]]], ["php", [["string", ["\"ba\\\"r\""]]]], ["rd", [["punctuation", "}"]]]]], - ["latte", [["ld", [["punctuation", "{"], ["tag", "php"]]], ["php", [["single-quoted-string", "'ba\\'z'"]]], ["rd", [["punctuation", "}"]]]]], + ["latte", [["ld", [["punctuation", "{"], ["tag", "php"]]], ["php", [["string", "'ba\\'z'"]]], ["rd", [["punctuation", "}"]]]]], ["latte", [["ld", [["punctuation", "{"], ["tag", "php"]]], ["php", [["comment", "/* \" */"]]], ["rd", [["punctuation", "}"]]]]] ] diff --git a/tests/languages/latte/n-attr_feature.test b/tests/languages/latte/n-attr_feature.test index 678f5a4e87..3effa4630c 100644 --- a/tests/languages/latte/n-attr_feature.test +++ b/tests/languages/latte/n-attr_feature.test @@ -9,13 +9,13 @@ [ ["tag", [["tag", [["punctuation", "<"], "a"]], ["n-attr", [["attr-name", "n:href"], - ["attr-value", [["punctuation", "="], ["punctuation", "\""], ["php", ["Post", ["punctuation", ":"], "show ", ["variable", "$post"], ["operator", "-"], ["operator", ">"], ["property", "id"]]], ["punctuation", "\""]]]]], + ["attr-value", [["punctuation", "="], ["punctuation", "\""], ["php", ["Post", ["punctuation", ":"], ["class-name", "show"], ["variable", "$post"], ["operator", "->"], ["property", "id"]]], ["punctuation", "\""]]]]], ["punctuation", ">"]]], "link", ["tag", [["tag", [["punctuation", ""]]], ["tag", [["tag", [["punctuation", "<"], "a"]], ["n-attr", [["attr-name", "n:href"], - ["attr-value", [["punctuation", "="], ["punctuation", "\""], ["php", ["Post", ["punctuation", ":"], "show ", ["variable", "$post"], ["operator", "-"], ["operator", ">"], ["property", "id"]]], ["punctuation", "\""]]]]], + ["attr-value", [["punctuation", "="], ["punctuation", "\""], ["php", ["Post", ["punctuation", ":"], ["class-name", "show"], ["variable", "$post"], ["operator", "->"], ["property", "id"]]], ["punctuation", "\""]]]]], ["punctuation", ">"]]], "link", ["tag", [["tag", [["punctuation", ""]]], diff --git a/tests/languages/latte/php_feature.test b/tests/languages/latte/php_feature.test index cc916a469d..6d23c0ec1e 100644 --- a/tests/languages/latte/php_feature.test +++ b/tests/languages/latte/php_feature.test @@ -10,19 +10,19 @@ ---------------------------------------------------- [ - ["latte", [["ld", [["punctuation", "{"], ["tag", "tag"]]], ["php", [["variable", "$a"], ["operator", "="], ["boolean", "true"], ["operator", "?"], ["number", "10"], ["operator", "*"], ["number", "5"]]], ["rd", [["punctuation", "}"]]]]], + ["latte", [["ld", [["punctuation", "{"], ["tag", "tag"]]], ["php", [["variable", "$a"], ["operator", "="], ["constant", "true"], ["operator", "?"], ["number", "10"], ["operator", "*"], ["number", "5"]]], ["rd", [["punctuation", "}"]]]]], ["tag", [["tag", [["punctuation", "<"], "div"]], ["n-attr", [["attr-name", "n:attr"], - ["attr-value", [["punctuation", "="], ["punctuation", "\""], ["php", [["variable", "$a"], ["operator", "="], ["boolean", "true"], ["operator", "?"], ["number", "10"], ["operator", "*"], ["number", "5"]]], ["punctuation", "\""]]]]], + ["attr-value", [["punctuation", "="], ["punctuation", "\""], ["php", [["variable", "$a"], ["operator", "="], ["constant", "true"], ["operator", "?"], ["number", "10"], ["operator", "*"], ["number", "5"]]], ["punctuation", "\""]]]]], ["punctuation", ">"]]], - ["latte", [["ld", [["punctuation", "{"], ["tag", "php"]]], ["php", [["single-quoted-string", "''"]]], ["rd", [["punctuation", "}"]]]]], + ["latte", [["ld", [["punctuation", "{"], ["tag", "php"]]], ["php", [["string", "''"]]], ["rd", [["punctuation", "}"]]]]], - ["latte", [["ld", [["punctuation", "{"], ["tag", "php"]]], ["php", [["double-quoted-string", ["\"\""]]]], ["rd", [["punctuation", "}"]]]]], + ["latte", [["ld", [["punctuation", "{"], ["tag", "php"]]], ["php", [["string", ["\"\""]]]], ["rd", [["punctuation", "}"]]]]], - ["latte", [["ld", [["punctuation", "{"], ["tag", "php"]]], ["php", [["double-quoted-string", ["\"ba\\\"r\""]]]], ["rd", [["punctuation", "}"]]]]], + ["latte", [["ld", [["punctuation", "{"], ["tag", "php"]]], ["php", [["string", ["\"ba\\\"r\""]]]], ["rd", [["punctuation", "}"]]]]], - ["latte", [["ld", [["punctuation", "{"], ["tag", "php"]]], ["php", [["single-quoted-string", "'ba\\'z'"]]], ["rd", [["punctuation", "}"]]]]], + ["latte", [["ld", [["punctuation", "{"], ["tag", "php"]]], ["php", [["string", "'ba\\'z'"]]], ["rd", [["punctuation", "}"]]]]], ["latte", [["ld", [["punctuation", "{"], ["tag", "php"]]], ["php", [["comment", "/* \" */"]]], ["rd", [["punctuation", "}"]]]]], diff --git a/tests/languages/markup+php/issue1582.test b/tests/languages/markup+php/issue1582.test index 255f97e74e..9ed8faec0e 100644 --- a/tests/languages/markup+php/issue1582.test +++ b/tests/languages/markup+php/issue1582.test @@ -1,23 +1,23 @@ -'; - echo PHP_EOL; - ----------------------------------------------------- - -[ - ["php", [ - ["delimiter", "'"], - ["punctuation", ";"], - ["keyword", "echo"], - ["constant", "PHP_EOL"], - ["punctuation", ";"] - ]] -] - ----------------------------------------------------- - -Checks for PHP closing tags '?>' inside of strings. -See #1582 for details. +'; + echo PHP_EOL; + +---------------------------------------------------- + +[ + ["php", [ + ["delimiter", "'"], + ["punctuation", ";"], + ["keyword", "echo"], + ["constant", "PHP_EOL"], + ["punctuation", ";"] + ]] +] + +---------------------------------------------------- + +Checks for PHP closing tags '?>' inside of strings. +See #1582 for details. diff --git a/tests/languages/markup+php/php_with_closing_tag_in_markup_feature.test b/tests/languages/markup+php/php_with_closing_tag_in_markup_feature.test index 8067d7c0b4..c3c5135b8f 100644 --- a/tests/languages/markup+php/php_with_closing_tag_in_markup_feature.test +++ b/tests/languages/markup+php/php_with_closing_tag_in_markup_feature.test @@ -1,44 +1,44 @@ -' + "?>"; /* ?> */ - echo PHP_EOL; - // */ - // ?> - - - ----------------------------------------------------- - -[ - ["php", [ - ["delimiter", "'"], - ["operator", "+"], - ["double-quoted-string", ["\"?>\""]], - ["punctuation", ";"], - ["comment", "/* ?> */"], - ["keyword", "echo"], - ["constant", "PHP_EOL"], - ["punctuation", ";"], - ["comment", "// */"], - ["comment", "// "], - ["delimiter", "?>"] - ]], - - ["php", [ - ["delimiter", ""] - ]] -] - ----------------------------------------------------- - -Checks for PHP closing tags '?>' inside of strings and comments. +' + "?>"; /* ?> */ + echo PHP_EOL; + // */ + // ?> + + + +---------------------------------------------------- + +[ + ["php", [ + ["delimiter", "'"], + ["operator", "+"], + ["string", ["\"?>\""]], + ["punctuation", ";"], + ["comment", "/* ?> */"], + ["keyword", "echo"], + ["constant", "PHP_EOL"], + ["punctuation", ";"], + ["comment", "// */"], + ["comment", "// "], + ["delimiter", "?>"] + ]], + + ["php", [ + ["delimiter", ""] + ]] +] + +---------------------------------------------------- + +Checks for PHP closing tags '?>' inside of strings and comments. diff --git a/tests/languages/php/boolean_feature.test b/tests/languages/php/boolean_feature.test index 55c24bc993..66e0d21a7c 100644 --- a/tests/languages/php/boolean_feature.test +++ b/tests/languages/php/boolean_feature.test @@ -1,17 +1,17 @@ -FALSE -false -TRUE -true - ----------------------------------------------------- - -[ - ["boolean", "FALSE"], - ["boolean", "false"], - ["boolean", "TRUE"], - ["boolean", "true"] -] - ----------------------------------------------------- - +FALSE +false +TRUE +true + +---------------------------------------------------- + +[ + ["constant", "FALSE"], + ["constant", "false"], + ["constant", "TRUE"], + ["constant", "true"] +] + +---------------------------------------------------- + Checks for booleans. \ No newline at end of file diff --git a/tests/languages/php/class-name_feature.test b/tests/languages/php/class-name_feature.test new file mode 100644 index 0000000000..8693b9adce --- /dev/null +++ b/tests/languages/php/class-name_feature.test @@ -0,0 +1,137 @@ +public Foo $a; + +Foo::bar(); +\Foo::bar(); +\Package\Foo::bar(); + +function f(Foo $variable): Foo {} +function f(\Foo $variable): \Foo {} +function f(\Package\Foo $variable): \Package\Foo {} +function f($variable): ?Foo {} + +class Foo extends Bar implements Baz {} + +class Foo extends \Package\Bar implements App\Baz {} + +---------------------------------------------------- + +[ + ["keyword", "public"], + ["class-name", "Foo"], + ["variable", "$a"], + ["punctuation", ";"], + + ["class-name", "Foo"], + ["operator", "::"], + ["function", "bar"], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", ";"], + + ["class-name", [ + ["punctuation", "\\"], + "Foo" + ]], + ["operator", "::"], + ["function", "bar"], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", ";"], + + ["class-name", [ + ["punctuation", "\\"], + "Package", + ["punctuation", "\\"], + "Foo" + ]], + ["operator", "::"], + ["function", "bar"], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", ";"], + + ["keyword", "function"], + ["function", "f"], + ["punctuation", "("], + ["class-name", "Foo"], + ["variable", "$variable"], + ["punctuation", ")"], + ["punctuation", ":"], + ["class-name", "Foo"], + ["punctuation", "{"], ["punctuation", "}"], + + ["keyword", "function"], + ["function", "f"], + ["punctuation", "("], + ["class-name", [ + ["punctuation", "\\"], + "Foo" + ]], + ["variable", "$variable"], + ["punctuation", ")"], + ["punctuation", ":"], + ["class-name", [ + ["punctuation", "\\"], + "Foo" + ]], + ["punctuation", "{"], ["punctuation", "}"], + + ["keyword", "function"], + ["function", "f"], + ["punctuation", "("], + ["class-name", [ + ["punctuation", "\\"], + "Package", + ["punctuation", "\\"], + "Foo" + ]], + ["variable", "$variable"], + ["punctuation", ")"], + ["punctuation", ":"], + ["class-name", [ + ["punctuation", "\\"], + "Package", + ["punctuation", "\\"], + "Foo" + ]], + ["punctuation", "{"], ["punctuation", "}"], + + ["keyword", "function"], + ["function", "f"], + ["punctuation", "("], + ["variable", "$variable"], + ["punctuation", ")"], + ["punctuation", ":"], + ["operator", "?"], + ["class-name", "Foo"], + ["punctuation", "{"], ["punctuation", "}"], + + ["keyword", "class"], + ["class-name", "Foo"], + ["keyword", "extends"], + ["class-name", "Bar"], + ["keyword", "implements"], + ["class-name", "Baz"], + ["punctuation", "{"], ["punctuation", "}"], + + ["keyword", "class"], + ["class-name", "Foo"], + ["keyword", "extends"], + ["class-name", [ + ["punctuation", "\\"], + "Package", + ["punctuation", "\\"], + "Bar" + ]], + ["keyword", "implements"], + ["class-name", [ + "App", + ["punctuation", "\\"], + "Baz" + ]], + ["punctuation", "{"], ["punctuation", "}"] +] + +---------------------------------------------------- + +Checks for class names. \ No newline at end of file diff --git a/tests/languages/php/comment_feature.test b/tests/languages/php/comment_feature.test index 0db0474557..fcbd3567b0 100644 --- a/tests/languages/php/comment_feature.test +++ b/tests/languages/php/comment_feature.test @@ -1,18 +1,24 @@ // // foobar -/**/ /* foo bar */ /* */ +/**/ +/** doc comment */ +# +# foobar ---------------------------------------------------- [ ["comment", "//"], ["comment", "// foobar"], - ["comment", "/**/"], ["comment", "/* foo\r\nbar */"], - ["comment", "/* */"] + ["comment", "/* */"], + ["comment", "/**/"], + ["comment", "/** doc comment */"], + ["comment", "#"], + ["comment", "# foobar"] ] ---------------------------------------------------- diff --git a/tests/languages/php/keyword_feature.test b/tests/languages/php/keyword_feature.test index 41b72b7f14..88d5e2bbbc 100644 --- a/tests/languages/php/keyword_feature.test +++ b/tests/languages/php/keyword_feature.test @@ -1,7 +1,7 @@ __halt_compiler abstract and -array +array() as break callable @@ -44,11 +44,12 @@ insteadof interface; isset list -match namespace; +match new; or parent +parent:: print private protected @@ -56,7 +57,11 @@ public require require_once return +self +new self +self:: static +static:: switch throw trait; @@ -74,7 +79,7 @@ yield ["keyword", "__halt_compiler"], ["keyword", "abstract"], ["keyword", "and"], - ["keyword", "array"], + ["keyword", "array"], ["punctuation", "("], ["punctuation", ")"], ["keyword", "as"], ["keyword", "break"], ["keyword", "callable"], @@ -117,11 +122,12 @@ yield ["keyword", "interface"], ["punctuation", ";"], ["keyword", "isset"], ["keyword", "list"], - ["keyword", "match"], ["keyword", "namespace"], ["punctuation", ";"], + ["keyword", "match"], ["keyword", "new"], ["punctuation", ";"], ["keyword", "or"], ["keyword", "parent"], + ["keyword", "parent"], ["operator", "::"], ["keyword", "print"], ["keyword", "private"], ["keyword", "protected"], @@ -129,10 +135,14 @@ yield ["keyword", "require"], ["keyword", "require_once"], ["keyword", "return"], + ["keyword", "self"], + ["keyword", "new"], ["keyword", "self"], + ["keyword", "self"], ["operator", "::"], ["keyword", "static"], + ["keyword", "static"], ["operator", "::"], ["keyword", "switch"], ["keyword", "throw"], - ["keyword", "trait"], ["punctuation", ";"], + ["keyword", "trait"], ["punctuation", ";"], ["keyword", "try"], ["keyword", "unset"], ["keyword", "use"], ["punctuation", ";"], diff --git a/tests/languages/php/number_feature.test b/tests/languages/php/number_feature.test new file mode 100644 index 0000000000..850930ea03 --- /dev/null +++ b/tests/languages/php/number_feature.test @@ -0,0 +1,27 @@ +664.6 +107_925_284.88_4 +1e7 +1.2e3 +1E-7 +0b10100111001 +0x539 +0x1A +0123 + +---------------------------------------------------- + +[ + ["number", "664.6"], + ["number", "107_925_284.88_4"], + ["number", "1e7"], + ["number", "1.2e3"], + ["number", "1E-7"], + ["number", "0b10100111001"], + ["number", "0x539"], + ["number", "0x1A"], + ["number", "0123"] +] + +---------------------------------------------------- + +Checks for numbers. \ No newline at end of file diff --git a/tests/languages/php/operators_feature.test b/tests/languages/php/operators_feature.test new file mode 100644 index 0000000000..33aa7d47e4 --- /dev/null +++ b/tests/languages/php/operators_feature.test @@ -0,0 +1,91 @@ +=> +<=> +?? +??= +-> +:: +... +/ +/= +^ +^= +| +|| +|= +% +%= +* +*= +** +**= +& +&& +&= +< +<= +> +>= +. +.= ++ +++ ++= +- +-- +-= +? +~ +== +!= +=== +!== + +---------------------------------------------------- + +[ + ["operator", "=>"], + ["operator", "<=>"], + ["operator", "??"], + ["operator", "??="], + ["operator", "->"], + ["operator", "::"], + ["operator", "..."], + ["operator", "/"], + ["operator", "/="], + ["operator", "^"], + ["operator", "^="], + ["operator", "|"], + ["operator", "||"], + ["operator", "|="], + ["operator", "%"], + ["operator", "%="], + ["operator", "*"], + ["operator", "*="], + ["operator", "**"], + ["operator", "**="], + ["operator", "&"], + ["operator", "&&"], + ["operator", "&="], + ["operator", "<"], + ["operator", "<="], + ["operator", ">"], + ["operator", ">="], + ["operator", "."], + ["operator", ".="], + ["operator", "+"], + ["operator", "++"], + ["operator", "+="], + ["operator", "-"], + ["operator", "--"], + ["operator", "-="], + ["operator", "?"], + ["operator", "~"], + ["operator", "=="], + ["operator", "!="], + ["operator", "==="], + ["operator", "!=="] +] + +---------------------------------------------------- + +Checks for operators. \ No newline at end of file diff --git a/tests/languages/php/package_feature.test b/tests/languages/php/package_feature.test index e1d3e5f25c..297f3a022e 100644 --- a/tests/languages/php/package_feature.test +++ b/tests/languages/php/package_feature.test @@ -1,11 +1,16 @@ +namespace App namespace \foo namespace \foo\bar\baz use \foo use \foo\bar\baz +use function \foo +use function \foo\bar\baz ---------------------------------------------------- [ + ["keyword", "namespace"], + ["package", ["App"]], ["keyword", "namespace"], ["package", [["punctuation", "\\"], "foo"]], ["keyword", "namespace"], @@ -17,6 +22,16 @@ use \foo\bar\baz ["keyword", "use"], ["package", [["punctuation", "\\"], "foo"]], ["keyword", "use"], + ["package", [ + ["punctuation", "\\"], "foo", + ["punctuation", "\\"], "bar", + ["punctuation", "\\"], "baz" + ]], + ["keyword", "use"], + ["keyword", "function"], + ["package", [["punctuation", "\\"], "foo"]], + ["keyword", "use"], + ["keyword", "function"], ["package", [ ["punctuation", "\\"], "foo", ["punctuation", "\\"], "bar", diff --git a/tests/languages/php/property_feature.test b/tests/languages/php/property_feature.test index f7790197a5..031529cb95 100644 --- a/tests/languages/php/property_feature.test +++ b/tests/languages/php/property_feature.test @@ -1,17 +1,19 @@ -$variable->property -$foo->bar->baz +$variable->property; +$foo->bar->baz; ---------------------------------------------------- [ ["variable", "$variable"], - ["operator", "-"], ["operator", ">"], + ["operator", "->"], ["property", "property"], + ["punctuation", ";"], ["variable", "$foo"], - ["operator", "-"], ["operator", ">"], + ["operator", "->"], ["property", "bar"], - ["operator", "-"], ["operator", ">"], - ["property", "baz"] + ["operator", "->"], + ["property", "baz"], + ["punctuation", ";"] ] ---------------------------------------------------- diff --git a/tests/languages/php/punctuation_feature.test b/tests/languages/php/punctuation_feature.test new file mode 100644 index 0000000000..5bedfca843 --- /dev/null +++ b/tests/languages/php/punctuation_feature.test @@ -0,0 +1,27 @@ +{ +} +[ +] +( +) +, +: +; + +---------------------------------------------------- + +[ + ["punctuation", "{"], + ["punctuation", "}"], + ["punctuation", "["], + ["punctuation", "]"], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", ","], + ["punctuation", ":"], + ["punctuation", ";"] +] + +---------------------------------------------------- + +Checks for punctuation. \ No newline at end of file diff --git a/tests/languages/php/shell-comment_feature.test b/tests/languages/php/shell-comment_feature.test deleted file mode 100644 index a1f077c8c7..0000000000 --- a/tests/languages/php/shell-comment_feature.test +++ /dev/null @@ -1,13 +0,0 @@ -# -# foobar - ----------------------------------------------------- - -[ - ["shell-comment", "#"], - ["shell-comment", "# foobar"] -] - ----------------------------------------------------- - -Checks for shell-like comments. \ No newline at end of file diff --git a/tests/languages/php/string-interpolation_feature.test b/tests/languages/php/string-interpolation_feature.test index b0d57f894c..2c7a0dfad5 100644 --- a/tests/languages/php/string-interpolation_feature.test +++ b/tests/languages/php/string-interpolation_feature.test @@ -17,12 +17,12 @@ FOO_BAR; ---------------------------------------------------- [ - ["double-quoted-string", [ + ["string", [ "\"This ", ["interpolation", [["variable", "$variable"]]], " is interpolated\"" ]], - ["double-quoted-string", [ + ["string", [ "\"", ["interpolation", [["variable", "$foo"], ["punctuation", "["], ["number", "2"], ["punctuation", "]"]]], ", ", @@ -31,34 +31,34 @@ FOO_BAR; ["interpolation", [["variable", "$foo"], ["punctuation", "["], ["variable", "$bar"], ["punctuation", "]"]]], "\"" ]], - ["double-quoted-string", [ + ["string", [ "\"", - ["interpolation", [["variable", "$foo"], ["operator", "-"], ["operator", ">"], ["property", "bar"]]], + ["interpolation", [["variable", "$foo"], ["operator", "->"], ["property", "bar"]]], "\"" ]], - ["double-quoted-string", [ + ["string", [ "\"More ", ["interpolation", [["punctuation", "{"], ["variable", "$interpolation"], ["punctuation", "}"]]], "\"" ]], - ["double-quoted-string", [ + ["string", [ "\"", ["interpolation", [ ["punctuation", "{"], - ["variable", "$arr"], ["punctuation", "["], ["single-quoted-string", "'key'"], ["punctuation", "]"], + ["variable", "$arr"], ["punctuation", "["], ["string", "'key'"], ["punctuation", "]"], ["punctuation", "}"] ]], ", ", ["interpolation", [ ["punctuation", "{"], ["variable", "$arr"], - ["punctuation", "["], ["single-quoted-string", "'foo'"], ["punctuation", "]"], + ["punctuation", "["], ["string", "'foo'"], ["punctuation", "]"], ["punctuation", "["], ["number", "3"], ["punctuation", "]"], ["punctuation", "}"] ]], "\"" ]], - ["double-quoted-string", [ + ["string", [ "\"", ["interpolation", [ ["punctuation", "{"], ["variable", "$"], ["punctuation", "{"], @@ -67,7 +67,7 @@ FOO_BAR; ]], ", but not {\\${\\$name}}\"" ]], - ["double-quoted-string", [ + ["string", [ "\"the return value of getName(): ", ["interpolation", [ ["punctuation", "{"], ["variable", "$"], ["punctuation", "{"], @@ -76,50 +76,50 @@ FOO_BAR; ]], "\"" ]], - ["double-quoted-string", [ + ["string", [ "\"the return value of \\$object->getName(): ", ["interpolation", [ ["punctuation", "{"], ["variable", "$"], ["punctuation", "{"], - ["variable", "$object"], ["operator", "-"], ["operator", ">"], ["function", "getName"], ["punctuation", "("], ["punctuation", ")"], + ["variable", "$object"], ["operator", "->"], ["function", "getName"], ["punctuation", "("], ["punctuation", ")"], ["punctuation", "}"], ["punctuation", "}"] ]], "\"" ]], - ["double-quoted-string", [ + ["string", [ "\"", ["interpolation", [ ["punctuation", "{"], - ["variable", "$foo"], ["operator", "-"], ["operator", ">"], ["variable", "$bar"], + ["variable", "$foo"], ["operator", "->"], ["variable", "$bar"], ["punctuation", "}"] ]], ", ", ["interpolation", [ ["punctuation", "{"], - ["variable", "$foo"], ["operator", "-"], ["operator", ">"], ["punctuation", "{"], + ["variable", "$foo"], ["operator", "->"], ["punctuation", "{"], ["variable", "$baz"], ["punctuation", "["], ["number", "1"], ["punctuation", "]"], ["punctuation", "}"], ["punctuation", "}"] ]], "\"" ]], - ["heredoc-string", [ + ["string", [ ["delimiter", [ ["punctuation", "<<<"], "FOO" ]], "\r\nHeredoc strings ", ["interpolation", [ - ["variable", "$also"], ["operator", "-"], ["operator", ">"], ["property", "support"] + ["variable", "$also"], ["operator", "->"], ["property", "support"] ]], ["interpolation", [ ["punctuation", "{"], ["variable", "$"], ["punctuation", "{"], - ["variable", "$string"], ["operator", "-"], ["operator", ">"], ["function", "interpolation"], ["punctuation", "("], ["punctuation", ")"], + ["variable", "$string"], ["operator", "->"], ["function", "interpolation"], ["punctuation", "("], ["punctuation", ")"], ["punctuation", "}"], ["punctuation", "}"] ]], ["delimiter", [ "FOO", ["punctuation", ";"] ]] ]], - ["heredoc-string", [ + ["string", [ ["delimiter", [ ["punctuation", "<<<\""], "FOO_BAR", ["punctuation", "\""] ]], diff --git a/tests/languages/php/string_feature.test b/tests/languages/php/string_feature.test index cac7a947cc..5e5942af9e 100644 --- a/tests/languages/php/string_feature.test +++ b/tests/languages/php/string_feature.test @@ -14,11 +14,13 @@ NOWDOC; string" 'multi-line string' +`multi-line +shell exec string` ---------------------------------------------------- [ - ["heredoc-string", [ + ["string", [ ["delimiter", [ ["punctuation", "<<<"], "FOO_BAR" ]], @@ -27,7 +29,7 @@ string' "FOO_BAR", ["punctuation", ";"] ]] ]], - ["heredoc-string", [ + ["string", [ ["delimiter", [ ["punctuation", "<<<\""], "FOO", ["punctuation", "\""] ]], @@ -36,7 +38,7 @@ string' "FOO", ["punctuation", ";"] ]] ]], - ["nowdoc-string", [ + ["string", [ ["delimiter", [ ["punctuation", "<<<'"], "NOWDOC", ["punctuation", "'"] ]], @@ -45,10 +47,11 @@ string' "NOWDOC", ["punctuation", ";"] ]] ]], - ["double-quoted-string", ["\"https://example.com\""]], - ["double-quoted-string", ["\" /* not a comment */ \""]], - ["double-quoted-string", ["\"multi-line\r\nstring\""]], - ["single-quoted-string", "'multi-line\r\nstring'"] + ["string", ["\"https://example.com\""]], + ["string", ["\" /* not a comment */ \""]], + ["string", ["\"multi-line\r\nstring\""]], + ["string", "'multi-line\r\nstring'"], + ["string", "`multi-line\r\nshell exec string`"] ] ---------------------------------------------------- diff --git a/tests/languages/php/type_feature.test b/tests/languages/php/type_feature.test new file mode 100644 index 0000000000..c1d69b97e3 --- /dev/null +++ b/tests/languages/php/type_feature.test @@ -0,0 +1,63 @@ +public bool $a; +public boolean $a; +public int $a; +public integer $a; +public float $a; +public string $a; +public object $a; +public array $a; +public mixed $a; + +(int) $a; +(string) $a; +(object) $a; +(array) $a; + +function f(): int {} +function f() :string {} +function f() : object {} +function f(): ?array {} +function f(): self {} +function f(): static {} + +function foo(int $a, string $b, ? object $c, ?array $d, self $e, static $f) {} + +---------------------------------------------------- + +[ + ["keyword", "public"], ["keyword", "bool"], ["variable", "$a"], ["punctuation", ";"], + ["keyword", "public"], ["keyword", "boolean"], ["variable", "$a"], ["punctuation", ";"], + ["keyword", "public"], ["keyword", "int"], ["variable", "$a"], ["punctuation", ";"], + ["keyword", "public"], ["keyword", "integer"], ["variable", "$a"], ["punctuation", ";"], + ["keyword", "public"], ["keyword", "float"], ["variable", "$a"], ["punctuation", ";"], + ["keyword", "public"], ["keyword", "string"], ["variable", "$a"], ["punctuation", ";"], + ["keyword", "public"], ["keyword", "object"], ["variable", "$a"], ["punctuation", ";"], + ["keyword", "public"], ["keyword", "array"], ["variable", "$a"], ["punctuation", ";"], + ["keyword", "public"], ["keyword", "mixed"], ["variable", "$a"], ["punctuation", ";"], + + ["punctuation", "("], ["keyword", "int"], ["punctuation", ")"], ["variable", "$a"], ["punctuation", ";"], + ["punctuation", "("], ["keyword", "string"], ["punctuation", ")"], ["variable", "$a"], ["punctuation", ";"], + ["punctuation", "("], ["keyword", "object"], ["punctuation", ")"], ["variable", "$a"], ["punctuation", ";"], + ["punctuation", "("], ["keyword", "array"], ["punctuation", ")"], ["variable", "$a"], ["punctuation", ";"], + + ["keyword", "function"], ["function", "f"], ["punctuation", "("], ["punctuation", ")"], ["punctuation", ":"], ["keyword", "int"], ["punctuation", "{"], ["punctuation", "}"], + ["keyword", "function"], ["function", "f"], ["punctuation", "("], ["punctuation", ")"], ["punctuation", ":"], ["keyword", "string"], ["punctuation", "{"], ["punctuation", "}"], + ["keyword", "function"], ["function", "f"], ["punctuation", "("], ["punctuation", ")"], ["punctuation", ":"], ["keyword", "object"], ["punctuation", "{"], ["punctuation", "}"], + ["keyword", "function"], ["function", "f"], ["punctuation", "("], ["punctuation", ")"], ["punctuation", ":"], ["operator", "?"], ["keyword", "array"], ["punctuation", "{"], ["punctuation", "}"], + ["keyword", "function"], ["function", "f"], ["punctuation", "("], ["punctuation", ")"], ["punctuation", ":"], ["keyword", "self"], ["punctuation", "{"], ["punctuation", "}"], + ["keyword", "function"], ["function", "f"], ["punctuation", "("], ["punctuation", ")"], ["punctuation", ":"], ["keyword", "static"], ["punctuation", "{"], ["punctuation", "}"], + + ["keyword", "function"], ["function", "foo"], ["punctuation", "("], + ["keyword", "int"], ["variable", "$a"], ["punctuation", ","], + ["keyword", "string"], ["variable", "$b"], ["punctuation", ","], + ["operator", "?"], ["keyword", "object"], ["variable", "$c"], ["punctuation", ","], + ["operator", "?"], ["keyword", "array"], ["variable", "$d"], ["punctuation", ","], + ["keyword", "self"], ["variable", "$e"], ["punctuation", ","], + ["keyword", "static"], ["variable", "$f"], + ["punctuation", ")"], + ["punctuation", "{"], ["punctuation", "}"] +] + +---------------------------------------------------- + +Checks for types. \ No newline at end of file From 73f81c89e81162f5effbe26fa211df20f876321d Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Tue, 13 Oct 2020 14:24:24 +0200 Subject: [PATCH 0643/1100] Java: Added Java 15 keywords (#2567) --- components/prism-java.js | 2 +- components/prism-java.min.js | 2 +- tests/languages/java/keyword_feature.test | 4 +++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/components/prism-java.js b/components/prism-java.js index 498b7a32f2..f5b2bf70d1 100644 --- a/components/prism-java.js +++ b/components/prism-java.js @@ -1,6 +1,6 @@ (function (Prism) { - var keywords = /\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|null|open|opens|package|private|protected|provides|public|record|requires|return|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/; + var keywords = /\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/; // based on the java naming conventions var className = /\b[A-Z](?:\w*[a-z]\w*)?\b/; diff --git a/components/prism-java.min.js b/components/prism-java.min.js index 818fd8ec78..54e1d78e1c 100644 --- a/components/prism-java.min.js +++ b/components/prism-java.min.js @@ -1 +1 @@ -!function(e){var t=/\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|null|open|opens|package|private|protected|provides|public|record|requires|return|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/,a=/\b[A-Z](?:\w*[a-z]\w*)?\b/;e.languages.java=e.languages.extend("clike",{"class-name":[a,/\b[A-Z]\w*(?=\s+\w+\s*[;,=())])/],keyword:t,function:[e.languages.clike.function,{pattern:/(\:\:)[a-z_]\w*/,lookbehind:!0}],number:/\b0b[01][01_]*L?\b|\b0x[\da-f_]*\.?[\da-f_p+-]+\b|(?:\b\d[\d_]*\.?[\d_]*|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,lookbehind:!0}}),e.languages.insertBefore("java","string",{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:"string"}}),e.languages.insertBefore("java","class-name",{annotation:{alias:"punctuation",pattern:/(^|[^.])@\w+/,lookbehind:!0},namespace:{pattern:RegExp("(\\b(?:exports|import(?:\\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\\s+)(?!)[a-z]\\w*(?:\\.[a-z]\\w*)*\\.?".replace(//g,function(){return t.source})),lookbehind:!0,inside:{punctuation:/\./}},generics:{pattern:/<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<[\w\s,.&?]*>)*>)*>)*>/,inside:{"class-name":a,keyword:t,punctuation:/[<>(),.:]/,operator:/[?&|]/}}})}(Prism); \ No newline at end of file +!function(e){var t=/\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/,a=/\b[A-Z](?:\w*[a-z]\w*)?\b/;e.languages.java=e.languages.extend("clike",{"class-name":[a,/\b[A-Z]\w*(?=\s+\w+\s*[;,=())])/],keyword:t,function:[e.languages.clike.function,{pattern:/(\:\:)[a-z_]\w*/,lookbehind:!0}],number:/\b0b[01][01_]*L?\b|\b0x[\da-f_]*\.?[\da-f_p+-]+\b|(?:\b\d[\d_]*\.?[\d_]*|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,lookbehind:!0}}),e.languages.insertBefore("java","string",{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:"string"}}),e.languages.insertBefore("java","class-name",{annotation:{alias:"punctuation",pattern:/(^|[^.])@\w+/,lookbehind:!0},namespace:{pattern:RegExp("(\\b(?:exports|import(?:\\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\\s+)(?!)[a-z]\\w*(?:\\.[a-z]\\w*)*\\.?".replace(//g,function(){return t.source})),lookbehind:!0,inside:{punctuation:/\./}},generics:{pattern:/<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<[\w\s,.&?]*>)*>)*>)*>/,inside:{"class-name":a,keyword:t,punctuation:/[<>(),.:]/,operator:/[?&|]/}}})}(Prism); \ No newline at end of file diff --git a/tests/languages/java/keyword_feature.test b/tests/languages/java/keyword_feature.test index d4114e320f..39b14a30a9 100644 --- a/tests/languages/java/keyword_feature.test +++ b/tests/languages/java/keyword_feature.test @@ -24,6 +24,7 @@ module requires transitive exports uses open opens with to provides yield +sealed non-sealed permits ---------------------------------------------------- @@ -53,7 +54,8 @@ yield ["keyword", "module"], ["keyword", "requires"], ["keyword", "transitive"], ["keyword", "exports"], ["keyword", "uses"], ["keyword", "open"], ["keyword", "opens"], ["keyword", "with"], ["keyword", "to"], ["keyword", "provides"], - ["keyword", "yield"] + ["keyword", "yield"], + ["keyword", "sealed"], ["keyword", "non-sealed"], ["keyword", "permits"] ] ---------------------------------------------------- From b04cbafe3bde12ec16375ee7b3188312ec44c515 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Tue, 13 Oct 2020 14:26:34 +0200 Subject: [PATCH 0644/1100] CSS: Better HTML `style` attribute tokenization (#2569) --- components/prism-css.js | 32 +++++--- components/prism-css.min.js | 2 +- prism.js | 32 +++++--- .../languages/markup!+css/css_inclusion.test | 21 ++--- .../markup+css+wiki/table-tag_feature.test | 78 +++++++++++-------- .../languages/php!+css-extras/issue2008.test | 45 ++++++----- 6 files changed, 121 insertions(+), 89 deletions(-) diff --git a/components/prism-css.js b/components/prism-css.js index b0b56ebfc9..870b2085f9 100644 --- a/components/prism-css.js +++ b/components/prism-css.js @@ -52,19 +52,29 @@ Prism.languages.insertBefore('inside', 'attr-value', { 'style-attr': { - pattern: /\s*style=("|')(?:\\[\s\S]|(?!\1)[^\\])*\1/i, + pattern: /(^|["'\s])style\s*=\s*(?:"[^"]*"|'[^']*')/i, + lookbehind: true, inside: { - 'attr-name': { - pattern: /^\s*style/i, - inside: markup.tag.inside - }, - 'punctuation': /^\s*=\s*['"]|['"]\s*$/, 'attr-value': { - pattern: /.+/i, - inside: Prism.languages.css - } - }, - alias: 'language-css' + pattern: /=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/, + inside: { + 'style': { + pattern: /(["'])[\s\S]+(?=["']$)/, + lookbehind: true, + alias: 'language-css', + inside: Prism.languages.css + }, + 'punctuation': [ + { + pattern: /^=/, + alias: 'attr-equals' + }, + /"|'/ + ] + } + }, + 'attr-name': /^style/i + } } }, markup.tag); } diff --git a/components/prism-css.min.js b/components/prism-css.min.js index f2197a3c66..eac256916b 100644 --- a/components/prism-css.min.js +++ b/components/prism-css.min.js @@ -1 +1 @@ -!function(e){var s=/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/;e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:/@[\w-]+[\s\S]*?(?:;|(?=\s*\{))/,inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\((?!\s*\))\s*)(?:[^()]|\((?:[^()]|\([^()]*\))*\))+?(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+s.source+"|(?:[^\\\\\r\n()\"']|\\\\[^])*)\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+s.source+"$"),alias:"url"}}},selector:RegExp("[^{}\\s](?:[^{};\"']|"+s.source+")*?(?=\\s*\\{)"),string:{pattern:s,greedy:!0},property:/[-_a-z\xA0-\uFFFF][-\w\xA0-\uFFFF]*(?=\s*:)/i,important:/!important\b/i,function:/[-a-z0-9]+(?=\()/i,punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css;var t=e.languages.markup;t&&(t.tag.addInlined("style","css"),e.languages.insertBefore("inside","attr-value",{"style-attr":{pattern:/\s*style=("|')(?:\\[\s\S]|(?!\1)[^\\])*\1/i,inside:{"attr-name":{pattern:/^\s*style/i,inside:t.tag.inside},punctuation:/^\s*=\s*['"]|['"]\s*$/,"attr-value":{pattern:/.+/i,inside:e.languages.css}},alias:"language-css"}},t.tag))}(Prism); \ No newline at end of file +!function(e){var t=/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/;e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:/@[\w-]+[\s\S]*?(?:;|(?=\s*\{))/,inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\((?!\s*\))\s*)(?:[^()]|\((?:[^()]|\([^()]*\))*\))+?(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+t.source+"|(?:[^\\\\\r\n()\"']|\\\\[^])*)\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+t.source+"$"),alias:"url"}}},selector:RegExp("[^{}\\s](?:[^{};\"']|"+t.source+")*?(?=\\s*\\{)"),string:{pattern:t,greedy:!0},property:/[-_a-z\xA0-\uFFFF][-\w\xA0-\uFFFF]*(?=\s*:)/i,important:/!important\b/i,function:/[-a-z0-9]+(?=\()/i,punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css;var s=e.languages.markup;s&&(s.tag.addInlined("style","css"),e.languages.insertBefore("inside","attr-value",{"style-attr":{pattern:/(^|["'\s])style\s*=\s*(?:"[^"]*"|'[^']*')/i,lookbehind:!0,inside:{"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{style:{pattern:/(["'])[\s\S]+(?=["']$)/,lookbehind:!0,alias:"language-css",inside:e.languages.css},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}},"attr-name":/^style/i}}},s.tag))}(Prism); \ No newline at end of file diff --git a/prism.js b/prism.js index 86886596b9..487be2bf8b 100644 --- a/prism.js +++ b/prism.js @@ -1384,19 +1384,29 @@ Prism.languages.rss = Prism.languages.xml; Prism.languages.insertBefore('inside', 'attr-value', { 'style-attr': { - pattern: /\s*style=("|')(?:\\[\s\S]|(?!\1)[^\\])*\1/i, + pattern: /(^|["'\s])style\s*=\s*(?:"[^"]*"|'[^']*')/i, + lookbehind: true, inside: { - 'attr-name': { - pattern: /^\s*style/i, - inside: markup.tag.inside - }, - 'punctuation': /^\s*=\s*['"]|['"]\s*$/, 'attr-value': { - pattern: /.+/i, - inside: Prism.languages.css - } - }, - alias: 'language-css' + pattern: /=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/, + inside: { + 'style': { + pattern: /(["'])[\s\S]+(?=["']$)/, + lookbehind: true, + alias: 'language-css', + inside: Prism.languages.css + }, + 'punctuation': [ + { + pattern: /^=/, + alias: 'attr-equals' + }, + /"|'/ + ] + } + }, + 'attr-name': /^style/i + } } }, markup.tag); } diff --git a/tests/languages/markup!+css/css_inclusion.test b/tests/languages/markup!+css/css_inclusion.test index 69264dbc4e..a29a6f6dea 100644 --- a/tests/languages/markup!+css/css_inclusion.test +++ b/tests/languages/markup!+css/css_inclusion.test @@ -98,17 +98,18 @@ foo { "foo" ]], ["style-attr", [ - ["attr-name", [ - ["attr-name", ["style"]] - ]], - ["punctuation", "=\""], + ["attr-name", "style"], ["attr-value", [ - ["property", "bar"], - ["punctuation", ":"], - "baz", - ["punctuation", ";"] - ]], - ["punctuation", "\""] + ["punctuation", "="], + ["punctuation", "\""], + ["style", [ + ["property", "bar"], + ["punctuation", ":"], + "baz", + ["punctuation", ";"] + ]], + ["punctuation", "\""] + ]] ]], ["punctuation", ">"] ]] diff --git a/tests/languages/markup+css+wiki/table-tag_feature.test b/tests/languages/markup+css+wiki/table-tag_feature.test index e3965f9694..8f8f61e24b 100644 --- a/tests/languages/markup+css+wiki/table-tag_feature.test +++ b/tests/languages/markup+css+wiki/table-tag_feature.test @@ -68,15 +68,18 @@ baz ["punctuation", "!"], ["table-tag", [ ["style-attr", [ - ["attr-name", [["attr-name", ["style"]]]], - ["punctuation", "=\""], + ["attr-name", "style"], ["attr-value", [ - ["property", "text-align"], - ["punctuation", ":"], - "left", - ["punctuation", ";"] - ]], - ["punctuation", "\""] + ["punctuation", "="], + ["punctuation", "\""], + ["style", [ + ["property", "text-align"], + ["punctuation", ":"], + "left", + ["punctuation", ";"] + ]], + ["punctuation", "\""] + ]] ]], ["table-bar", "|"] ]], " Foo\r\n", @@ -92,30 +95,36 @@ baz ["punctuation", "!"], ["table-tag", [ ["style-attr", [ - ["attr-name", [["attr-name", ["style"]]]], - ["punctuation", "=\""], + ["attr-name", "style"], ["attr-value", [ - ["property", "color"], - ["punctuation", ":"], - "red", - ["punctuation", ";"] - ]], - ["punctuation", "\""] + ["punctuation", "="], + ["punctuation", "\""], + ["style", [ + ["property", "color"], + ["punctuation", ":"], + "red", + ["punctuation", ";"] + ]], + ["punctuation", "\""] + ]] ]], ["table-bar", "|"] ]], " Foo ", ["punctuation", "!!"], ["table-tag", [ ["style-attr", [ - ["attr-name", [["attr-name", ["style"]]]], - ["punctuation", "=\""], + ["attr-name", "style"], ["attr-value", [ - ["property", "color"], - ["punctuation", ":"], - "blue", - ["punctuation", ";"] - ]], - ["punctuation", "\""] + ["punctuation", "="], + ["punctuation", "\""], + ["style", [ + ["property", "color"], + ["punctuation", ":"], + "blue", + ["punctuation", ";"] + ]], + ["punctuation", "\""] + ]] ]], ["table-bar", "|"] ]], " Bar ", @@ -125,15 +134,18 @@ baz ["punctuation", "||"], ["table-tag", [ ["style-attr", [ - ["attr-name", [["attr-name", ["style"]]]], - ["punctuation", "=\""], + ["attr-name", "style"], ["attr-value", [ - ["property", "font-weight"], - ["punctuation", ":"], - "bold", - ["punctuation", ";"] - ]], - ["punctuation", "\""] + ["punctuation", "="], + ["punctuation", "\""], + ["style", [ + ["property", "font-weight"], + ["punctuation", ":"], + "bold", + ["punctuation", ";"] + ]], + ["punctuation", "\""] + ]] ]], ["table-bar", "|"] ]], " bar ", @@ -144,4 +156,4 @@ baz ---------------------------------------------------- Checks for tables and cell attributes. -Note: Markup is loaded before CSS so that inline styles are added into grammar. \ No newline at end of file +Note: Markup is loaded before CSS so that inline styles are added into grammar. diff --git a/tests/languages/php!+css-extras/issue2008.test b/tests/languages/php!+css-extras/issue2008.test index 4710e4ae46..3dc9d01e5e 100644 --- a/tests/languages/php!+css-extras/issue2008.test +++ b/tests/languages/php!+css-extras/issue2008.test @@ -9,31 +9,30 @@ "img" ]], ["style-attr", [ - ["attr-name", [ - ["attr-name", [ - "style" - ]] - ]], - ["punctuation", "=\""], + ["attr-name", "style"], ["attr-value", [ - ["property", "width"], - ["punctuation", ":"], - ["php", [ - ["delimiter", ""] + ["punctuation", "="], + ["punctuation", "\""], + ["style", [ + ["property", "width"], + ["punctuation", ":"], + ["php", [ + ["delimiter", ""] + ]], + "%" ]], - "%" - ]], - ["punctuation", "\""] + ["punctuation", "\""] + ]] ]], ["punctuation", "/>"] ]] From f59a85f1b2cfa90c6a260e88d2b8afbd7ab3f868 Mon Sep 17 00:00:00 2001 From: Alexandre Segura Date: Thu, 15 Oct 2020 15:54:19 +0200 Subject: [PATCH 0645/1100] Set type="button" attribute for copy to clipboard plugin. (#2593) When using Prism + copy to clipboard inside a HTML form, the form is submitted when copying. It's because by default the button is seen as a submit button. Adding the `type="button"` attribute prevents this. --- plugins/copy-to-clipboard/prism-copy-to-clipboard.js | 1 + plugins/copy-to-clipboard/prism-copy-to-clipboard.min.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/copy-to-clipboard/prism-copy-to-clipboard.js b/plugins/copy-to-clipboard/prism-copy-to-clipboard.js index ce52a79143..b7ae254c7e 100644 --- a/plugins/copy-to-clipboard/prism-copy-to-clipboard.js +++ b/plugins/copy-to-clipboard/prism-copy-to-clipboard.js @@ -38,6 +38,7 @@ Prism.plugins.toolbar.registerButton('copy-to-clipboard', function (env) { var linkCopy = document.createElement('button'); linkCopy.textContent = 'Copy'; + linkCopy.setAttribute('type', 'button'); var element = env.element; diff --git a/plugins/copy-to-clipboard/prism-copy-to-clipboard.min.js b/plugins/copy-to-clipboard/prism-copy-to-clipboard.min.js index 3c8b52560e..75e2f715a2 100644 --- a/plugins/copy-to-clipboard/prism-copy-to-clipboard.min.js +++ b/plugins/copy-to-clipboard/prism-copy-to-clipboard.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof self&&self.Prism&&self.document)if(Prism.plugins.toolbar){var i=window.ClipboardJS||void 0;i||"function"!=typeof require||(i=require("clipboard"));var c=[];if(!i){var o=document.createElement("script"),t=document.querySelector("head");o.onload=function(){if(i=window.ClipboardJS)for(;c.length;)c.pop()()},o.src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.0/clipboard.min.js",t.appendChild(o)}Prism.plugins.toolbar.registerButton("copy-to-clipboard",function(o){var t=document.createElement("button");t.textContent="Copy";var e=o.element;return i?n():c.push(n),t;function n(){var o=new i(t,{text:function(){return e.textContent}});o.on("success",function(){t.textContent="Copied!",r()}),o.on("error",function(){t.textContent="Press Ctrl+C to copy",r()})}function r(){setTimeout(function(){t.textContent="Copy"},5e3)}})}else console.warn("Copy to Clipboard plugin loaded before Toolbar plugin.")}(); \ No newline at end of file +!function(){if("undefined"!=typeof self&&self.Prism&&self.document)if(Prism.plugins.toolbar){var i=window.ClipboardJS||void 0;i||"function"!=typeof require||(i=require("clipboard"));var u=[];if(!i){var t=document.createElement("script"),e=document.querySelector("head");t.onload=function(){if(i=window.ClipboardJS)for(;u.length;)u.pop()()},t.src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.0/clipboard.min.js",e.appendChild(t)}Prism.plugins.toolbar.registerButton("copy-to-clipboard",function(t){var e=document.createElement("button");e.textContent="Copy",e.setAttribute("type","button");var o=t.element;return i?n():u.push(n),e;function n(){var t=new i(e,{text:function(){return o.textContent}});t.on("success",function(){e.textContent="Copied!",r()}),t.on("error",function(){e.textContent="Press Ctrl+C to copy",r()})}function r(){setTimeout(function(){e.textContent="Copy"},5e3)}})}else console.warn("Copy to Clipboard plugin loaded before Toolbar plugin.")}(); \ No newline at end of file From df922d908dd3d77f30fccb287e61b207264df6ec Mon Sep 17 00:00:00 2001 From: Tom Pavelec <46928405+TomPavelec@users.noreply.github.com> Date: Fri, 16 Oct 2020 22:20:59 +0200 Subject: [PATCH 0646/1100] PHP: Added support for PHP 8.0 features (#2591) --- components/prism-php.js | 235 +++++++---- components/prism-php.min.js | 2 +- tests/languages/latte/html_feature.test | 2 +- tests/languages/latte/n-attr_feature.test | 4 +- .../languages/php/argument-name_feature.test | 24 ++ tests/languages/php/array_feature.test | 136 +++++++ tests/languages/php/attribute_feature.test | 364 ++++++++++++++++++ tests/languages/php/class-name_feature.test | 79 +++- tests/languages/php/delimiter_feature.test | 28 ++ tests/languages/php/operators_feature.test | 6 + tests/languages/php/type_feature.test | 23 +- 11 files changed, 817 insertions(+), 86 deletions(-) create mode 100644 tests/languages/php/argument-name_feature.test create mode 100644 tests/languages/php/array_feature.test create mode 100644 tests/languages/php/attribute_feature.test diff --git a/components/prism-php.js b/components/prism-php.js index c6607fca3b..8c6634dc29 100644 --- a/components/prism-php.js +++ b/components/prism-php.js @@ -3,17 +3,28 @@ * Modified by Miles Johnson: http://milesj.me * Rewritten by Tom Pavelec * - * Supports PHP 5.3 - 7.4 + * Supports PHP 5.3 - 8.0 */ (function (Prism) { + var comment = /\/\*[\s\S]*?\*\/|\/\/.*|#(?!\[).*/; + var constant = [ + { + pattern: /\b(?:false|true)\b/i, + alias: 'boolean' + }, + /\b[A-Z_][A-Z0-9_]*\b(?!\s*\()/, + /\b(?:null)\b/i, + ]; + var number = /\b0b[01]+\b|\b0x[\da-f]+\b|(?:\b\d+(?:_\d+)*\.?(?:\d+(?:_\d+)*)*|\B\.\d+)(?:e[+-]?\d+)?/i; + var operator = /|\?\?=?|\.{3}|\??->|[!=]=?=?|::|\*\*=?|--|\+\+|&&|\|\||<<|>>|[?~]|[/^|%*&<>.+-]=?/; + var punctuation = /[{}\[\](),:;]/; + Prism.languages.php = { 'delimiter': { pattern: /\?>$|^<\?(?:php(?=\s)|=)?/i, alias: 'important' }, - 'comment': [ - /\/\*[\s\S]*?\*\/|\/\/.*|#.*/ - ], + 'comment': comment, 'variable': /\$+(?:\w+\b|(?={))/i, 'package': { pattern: /(namespace\s+|use\s+(?:function\s+)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i, @@ -30,22 +41,40 @@ lookbehind: true }, { - pattern: /([(,?]\s*)\b(?:bool|boolean|int|integer|float|string|object|array(?!\s*\()|mixed|self|static|callable|iterable)\b(?=\s*\$)/i, + pattern: /([(,?]\s*)\b(?:bool|int|float|string|object|array(?!\s*\()|mixed|self|static|callable|iterable|(?:null|false)(?=\s*\|))\b(?=\s*\$)/i, alias: 'type-hint', greedy: true, lookbehind: true }, { - pattern: /(\)\s*:\s*\?*\s*)\b(?:bool|boolean|int|integer|float|string|object|void|array(?!\s*\()|mixed|self|static|callable|iterable)\b/i, + pattern: /([(,?]\s*[a-z0-9_|]\|\s*)(?:null|false)\b(?=\s*\$)/i, + alias: 'type-hint', + greedy: true, + lookbehind: true + }, + { + pattern: /(\)\s*:\s*\??\s*)\b(?:bool|int|float|string|object|void|array(?!\s*\()|mixed|self|static|callable|iterable|(?:null|false)(?=\s*\|))\b/i, alias: 'return-type', greedy: true, lookbehind: true }, { - pattern: /\b(?:bool|boolean|int|integer|float|string|object|void|array(?!\s*\()|mixed|iterable)\b/i, + pattern: /(\)\s*:\s*\??\s*[a-z0-9_|]\|\s*)(?:null|false)\b/i, + alias: 'return-type', + greedy: true, + lookbehind: true + }, + { + pattern: /\b(?:bool|int|float|string|object|void|array(?!\s*\()|mixed|iterable|(?:null|false)(?=\s*\|))\b/i, alias: 'type-declaration', greedy: true }, + { + pattern: /(\|\s*)(?:null|false)\b/i, + alias: 'type-declaration', + greedy: true, + lookbehind: true + }, { pattern: /\b(?:parent|self|static)(?=\s*::)/i, alias: 'static-context', @@ -53,14 +82,41 @@ }, /\b(?:__halt_compiler|abstract|and|array|as|break|callable|case|catch|class|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|eval|exit|extends|final|finally|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|namespace|match|new|or|parent|print|private|protected|public|require|require_once|return|self|static|switch|throw|trait|try|unset|use|var|while|xor|yield)\b/i ], + 'argument-name': /\b[a-z_]\w*(?=\s*:(?!:))/i, 'class-name': [ { - pattern: /(\b(?:class|interface|extends|implements|trait|instanceof|new(?!\s+self|\s+static))\s+|\bcatch\s+\()\b[a-z_]\w*(?!\\)\b/i, + pattern: /(\b(?:class|interface|extends|implements|trait|instanceof|new(?!\s+self|\s+static))\s+|\bcatch\s*\()\b[a-z_]\w*(?!\\)\b/i, + greedy: true, + lookbehind: true + }, + { + pattern: /(\|\s*)\b[a-z_]\w*(?!\\)\b/i, greedy: true, lookbehind: true }, { - pattern: /(\b(?:extends|implements|instanceof|new(?!\s+self\b|\s+static\b))\s+|\bcatch\s+\()(?:\\?\b[a-z_]\w*)+\b(?!\\)/i, + pattern: /\b[a-z_]\w*(?!\\)\b(?=\s*\|)/i, + greedy: true + }, + { + pattern: /(\|\s*)(?:\\?\b[a-z_]\w*)+\b/i, + alias: 'class-name-fully-qualified', + greedy: true, + lookbehind: true, + inside: { + 'punctuation': /\\/ + } + }, + { + pattern: /(?:\\?\b[a-z_]\w*)+\b(?=\s*\|)/i, + alias: 'class-name-fully-qualified', + greedy: true, + inside: { + 'punctuation': /\\/ + } + }, + { + pattern: /(\b(?:extends|implements|instanceof|new(?!\s+self\b|\s+static\b))\s+|\bcatch\s*\()(?:\\?\b[a-z_]\w*)+\b(?!\\)/i, alias: 'class-name-fully-qualified', greedy: true, lookbehind: true, @@ -110,13 +166,13 @@ } }, { - pattern: /(\)\s*:\s*\?*\s*)\b[a-z_]\w*(?!\\)\b/i, + pattern: /(\)\s*:\s*\??\s*)\b[a-z_]\w*(?!\\)\b/i, alias: 'return-type', greedy: true, lookbehind: true }, { - pattern: /(\)\s*:\s*\?*\s*)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i, + pattern: /(\)\s*:\s*\??\s*)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i, alias: ['class-name-fully-qualified', 'return-type'], greedy: true, lookbehind: true, @@ -125,22 +181,15 @@ } } ], - 'constant': [ - { - pattern: /\b(?:false|true)\b/i, - alias: 'boolean' - }, - /\b[A-Z_][A-Z0-9_]*\b/, - /\b(?:null)\b/i, - ], + 'constant': constant, 'function': /\w+\s*(?=\()/, 'property': { pattern: /(->)[\w]+/, lookbehind: true }, - 'number': /\b0b[01]+\b|\b0x[\da-f]+\b|(?:\b\d+(?:_\d+)*\.?(?:\d+(?:_\d+)*)*|\B\.\d+)(?:e[+-]?\d+)?/i, - 'operator': /|\?\?=?|\.{3}|->|[!=]=?=?|::|\*\*=?|--|\+\+|&&|\|\||[?~]|[/^|%*&<>.+-]=?/, - 'punctuation': /[{}\[\](),:;]/ + 'number': number, + 'operator': operator, + 'punctuation': punctuation }; var string_interpolation = { @@ -149,56 +198,104 @@ inside: Prism.languages.php }; - Prism.languages.insertBefore('php', 'variable', { - 'string': [ - { - pattern: /<<<'([^']+)'[\r\n](?:.*[\r\n])*?\1;/, - alias: 'nowdoc-string', - greedy: true, - inside: { - 'delimiter': { - pattern: /^<<<'[^']+'|[a-z_]\w*;$/i, - alias: 'symbol', - inside: { - 'punctuation': /^<<<'?|[';]$/ - } + var string = [ + { + pattern: /<<<'([^']+)'[\r\n](?:.*[\r\n])*?\1;/, + alias: 'nowdoc-string', + greedy: true, + inside: { + 'delimiter': { + pattern: /^<<<'[^']+'|[a-z_]\w*;$/i, + alias: 'symbol', + inside: { + 'punctuation': /^<<<'?|[';]$/ } } - }, - { - pattern: /<<<(?:"([^"]+)"[\r\n](?:.*[\r\n])*?\1;|([a-z_]\w*)[\r\n](?:.*[\r\n])*?\2;)/i, - alias: 'heredoc-string', - greedy: true, - inside: { - 'delimiter': { - pattern: /^<<<(?:"[^"]+"|[a-z_]\w*)|[a-z_]\w*;$/i, - alias: 'symbol', - inside: { - 'punctuation': /^<<<"?|[";]$/ - } - }, - 'interpolation': string_interpolation // See below - } - }, - { - pattern: /`(?:\\[\s\S]|[^\\`])*`/, - alias: 'backtick-quoted-string', - greedy: true - }, - { - pattern: /'(?:\\[\s\S]|[^\\'])*'/, - alias: 'single-quoted-string', - greedy: true - }, - { - pattern: /"(?:\\[\s\S]|[^\\"])*"/, - alias: 'double-quoted-string', - greedy: true, - inside: { - 'interpolation': string_interpolation // See below + } + }, + { + pattern: /<<<(?:"([^"]+)"[\r\n](?:.*[\r\n])*?\1;|([a-z_]\w*)[\r\n](?:.*[\r\n])*?\2;)/i, + alias: 'heredoc-string', + greedy: true, + inside: { + 'delimiter': { + pattern: /^<<<(?:"[^"]+"|[a-z_]\w*)|[a-z_]\w*;$/i, + alias: 'symbol', + inside: { + 'punctuation': /^<<<"?|[";]$/ + } + }, + 'interpolation': string_interpolation // See below + } + }, + { + pattern: /`(?:\\[\s\S]|[^\\`])*`/, + alias: 'backtick-quoted-string', + greedy: true + }, + { + pattern: /'(?:\\[\s\S]|[^\\'])*'/, + alias: 'single-quoted-string', + greedy: true + }, + { + pattern: /"(?:\\[\s\S]|[^\\"])*"/, + alias: 'double-quoted-string', + greedy: true, + inside: { + 'interpolation': string_interpolation // See below + } + } + ]; + + Prism.languages.insertBefore('php', 'variable', { + 'string': string, + }); + + Prism.languages.insertBefore('php', 'variable', { + 'attribute': { + pattern: /#\[(?:[^"'\/#]|\/(?![*/])|\/\/.*$|#(?!\[).*$|\/\*(?:[^*]|\*(?!\/))*\*\/|"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*')+\](?=\s*[a-z$#])/mi, + greedy: true, + inside: { + 'attribute-content': { + pattern: /^(#\[)[\s\S]+(?=]$)/, + lookbehind: true, + // inside can appear subset of php + inside: { + 'comment': comment, + 'string': string, + 'attribute-class-name': [ + { + pattern: /([^:]|^)\b[a-z_]\w*(?!\\)\b/i, + alias: 'class-name', + greedy: true, + lookbehind: true + }, + { + pattern: /([^:]|^)(?:\\?\b[a-z_]\w*)+/i, + alias: [ + 'class-name', + 'class-name-fully-qualified' + ], + greedy: true, + lookbehind: true, + inside: { + 'punctuation': /\\/ + } + } + ], + 'constant': constant, + 'number': number, + 'operator': operator, + 'punctuation': punctuation + } + }, + 'delimiter': { + pattern: /^#\[|]$/, + alias: 'punctuation' } } - ], + }, }); Prism.hooks.add('before-tokenize', function(env) { @@ -206,7 +303,7 @@ return; } - var phpPattern = /<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#)(?:[^?\n\r]|\?(?!>))*(?=$|\?>|[\r\n])|\/\*[\s\S]*?(?:\*\/|$))*?(?:\?>|$)/ig; + var phpPattern = /<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#(?!\[))(?:[^?\n\r]|\?(?!>))*(?=$|\?>|[\r\n])|#\[|\/\*[\s\S]*?(?:\*\/|$))*?(?:\?>|$)/ig; Prism.languages['markup-templating'].buildPlaceholders(env, 'php', phpPattern); }); diff --git a/components/prism-php.min.js b/components/prism-php.min.js index 7ab532e717..f5b86bf85f 100644 --- a/components/prism-php.min.js +++ b/components/prism-php.min.js @@ -1 +1 @@ -!function(a){a.languages.php={delimiter:{pattern:/\?>$|^<\?(?:php(?=\s)|=)?/i,alias:"important"},comment:[/\/\*[\s\S]*?\*\/|\/\/.*|#.*/],variable:/\$+(?:\w+\b|(?={))/i,package:{pattern:/(namespace\s+|use\s+(?:function\s+)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,lookbehind:!0,inside:{punctuation:/\\/}},keyword:[{pattern:/(\(\s*)\b(?:bool|boolean|int|integer|float|string|object|array)\b(?=\s*\))/i,alias:"type-casting",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)\b(?:bool|boolean|int|integer|float|string|object|array(?!\s*\()|mixed|self|static|callable|iterable)\b(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*\?*\s*)\b(?:bool|boolean|int|integer|float|string|object|void|array(?!\s*\()|mixed|self|static|callable|iterable)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/\b(?:bool|boolean|int|integer|float|string|object|void|array(?!\s*\()|mixed|iterable)\b/i,alias:"type-declaration",greedy:!0},{pattern:/\b(?:parent|self|static)(?=\s*::)/i,alias:"static-context",greedy:!0},/\b(?:__halt_compiler|abstract|and|array|as|break|callable|case|catch|class|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|eval|exit|extends|final|finally|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|namespace|match|new|or|parent|print|private|protected|public|require|require_once|return|self|static|switch|throw|trait|try|unset|use|var|while|xor|yield)\b/i],"class-name":[{pattern:/(\b(?:class|interface|extends|implements|trait|instanceof|new(?!\s+self|\s+static))\s+|\bcatch\s+\()\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self\b|\s+static\b))\s+|\bcatch\s+\()(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*\$)/i,alias:"type-declaration",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-declaration"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*::)/i,alias:["class-name-fully-qualified","static-context"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/([(,?]\s*)[a-z_]\w*(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-hint"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(\)\s*:\s*\?*\s*)\b[a-z_]\w*(?!\\)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*\?*\s*)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:["class-name-fully-qualified","return-type"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:[{pattern:/\b(?:false|true)\b/i,alias:"boolean"},/\b[A-Z_][A-Z0-9_]*\b/,/\b(?:null)\b/i],function:/\w+\s*(?=\()/,property:{pattern:/(->)[\w]+/,lookbehind:!0},number:/\b0b[01]+\b|\b0x[\da-f]+\b|(?:\b\d+(?:_\d+)*\.?(?:\d+(?:_\d+)*)*|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/|\?\?=?|\.{3}|->|[!=]=?=?|::|\*\*=?|--|\+\+|&&|\|\||[?~]|[/^|%*&<>.+-]=?/,punctuation:/[{}\[\](),:;]/};var e={pattern:/{\$(?:{(?:{[^{}]+}|[^{}]+)}|[^{}])+}|(^|[^\\{])\$+(?:\w+(?:\[[^\r\n\[\]]+\]|->\w+)*)/,lookbehind:!0,inside:a.languages.php};a.languages.insertBefore("php","variable",{string:[{pattern:/<<<'([^']+)'[\r\n](?:.*[\r\n])*?\1;/,alias:"nowdoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<'[^']+'|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<'?|[';]$/}}}},{pattern:/<<<(?:"([^"]+)"[\r\n](?:.*[\r\n])*?\1;|([a-z_]\w*)[\r\n](?:.*[\r\n])*?\2;)/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<(?:"[^"]+"|[a-z_]\w*)|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<"?|[";]$/}},interpolation:e}},{pattern:/`(?:\\[\s\S]|[^\\`])*`/,alias:"backtick-quoted-string",greedy:!0},{pattern:/'(?:\\[\s\S]|[^\\'])*'/,alias:"single-quoted-string",greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,alias:"double-quoted-string",greedy:!0,inside:{interpolation:e}}]}),a.hooks.add("before-tokenize",function(e){if(/<\?/.test(e.code)){a.languages["markup-templating"].buildPlaceholders(e,"php",/<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#)(?:[^?\n\r]|\?(?!>))*(?=$|\?>|[\r\n])|\/\*[\s\S]*?(?:\*\/|$))*?(?:\?>|$)/gi)}}),a.hooks.add("after-tokenize",function(e){a.languages["markup-templating"].tokenizePlaceholders(e,"php")})}(Prism); \ No newline at end of file +!function(a){var e=/\/\*[\s\S]*?\*\/|\/\/.*|#(?!\[).*/,t=[{pattern:/\b(?:false|true)\b/i,alias:"boolean"},/\b[A-Z_][A-Z0-9_]*\b(?!\s*\()/,/\b(?:null)\b/i],i=/\b0b[01]+\b|\b0x[\da-f]+\b|(?:\b\d+(?:_\d+)*\.?(?:\d+(?:_\d+)*)*|\B\.\d+)(?:e[+-]?\d+)?/i,n=/|\?\?=?|\.{3}|\??->|[!=]=?=?|::|\*\*=?|--|\+\+|&&|\|\||<<|>>|[?~]|[/^|%*&<>.+-]=?/,s=/[{}\[\](),:;]/;a.languages.php={delimiter:{pattern:/\?>$|^<\?(?:php(?=\s)|=)?/i,alias:"important"},comment:e,variable:/\$+(?:\w+\b|(?={))/i,package:{pattern:/(namespace\s+|use\s+(?:function\s+)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,lookbehind:!0,inside:{punctuation:/\\/}},keyword:[{pattern:/(\(\s*)\b(?:bool|boolean|int|integer|float|string|object|array)\b(?=\s*\))/i,alias:"type-casting",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)\b(?:bool|int|float|string|object|array(?!\s*\()|mixed|self|static|callable|iterable|(?:null|false)(?=\s*\|))\b(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*[a-z0-9_|]\|\s*)(?:null|false)\b(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*\??\s*)\b(?:bool|int|float|string|object|void|array(?!\s*\()|mixed|self|static|callable|iterable|(?:null|false)(?=\s*\|))\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*\??\s*[a-z0-9_|]\|\s*)(?:null|false)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/\b(?:bool|int|float|string|object|void|array(?!\s*\()|mixed|iterable|(?:null|false)(?=\s*\|))\b/i,alias:"type-declaration",greedy:!0},{pattern:/(\|\s*)(?:null|false)\b/i,alias:"type-declaration",greedy:!0,lookbehind:!0},{pattern:/\b(?:parent|self|static)(?=\s*::)/i,alias:"static-context",greedy:!0},/\b(?:__halt_compiler|abstract|and|array|as|break|callable|case|catch|class|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|eval|exit|extends|final|finally|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|namespace|match|new|or|parent|print|private|protected|public|require|require_once|return|self|static|switch|throw|trait|try|unset|use|var|while|xor|yield)\b/i],"argument-name":/\b[a-z_]\w*(?=\s*:(?!:))/i,"class-name":[{pattern:/(\b(?:class|interface|extends|implements|trait|instanceof|new(?!\s+self|\s+static))\s+|\bcatch\s*\()\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/(\|\s*)\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/\b[a-z_]\w*(?!\\)\b(?=\s*\|)/i,greedy:!0},{pattern:/(\|\s*)(?:\\?\b[a-z_]\w*)+\b/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(?:\\?\b[a-z_]\w*)+\b(?=\s*\|)/i,alias:"class-name-fully-qualified",greedy:!0,inside:{punctuation:/\\/}},{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self\b|\s+static\b))\s+|\bcatch\s*\()(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*\$)/i,alias:"type-declaration",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-declaration"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*::)/i,alias:["class-name-fully-qualified","static-context"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/([(,?]\s*)[a-z_]\w*(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-hint"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(\)\s*:\s*\??\s*)\b[a-z_]\w*(?!\\)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*\??\s*)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:["class-name-fully-qualified","return-type"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:t,function:/\w+\s*(?=\()/,property:{pattern:/(->)[\w]+/,lookbehind:!0},number:i,operator:n,punctuation:s};var l={pattern:/{\$(?:{(?:{[^{}]+}|[^{}]+)}|[^{}])+}|(^|[^\\{])\$+(?:\w+(?:\[[^\r\n\[\]]+\]|->\w+)*)/,lookbehind:!0,inside:a.languages.php},r=[{pattern:/<<<'([^']+)'[\r\n](?:.*[\r\n])*?\1;/,alias:"nowdoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<'[^']+'|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<'?|[';]$/}}}},{pattern:/<<<(?:"([^"]+)"[\r\n](?:.*[\r\n])*?\1;|([a-z_]\w*)[\r\n](?:.*[\r\n])*?\2;)/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<(?:"[^"]+"|[a-z_]\w*)|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<"?|[";]$/}},interpolation:l}},{pattern:/`(?:\\[\s\S]|[^\\`])*`/,alias:"backtick-quoted-string",greedy:!0},{pattern:/'(?:\\[\s\S]|[^\\'])*'/,alias:"single-quoted-string",greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,alias:"double-quoted-string",greedy:!0,inside:{interpolation:l}}];a.languages.insertBefore("php","variable",{string:r}),a.languages.insertBefore("php","variable",{attribute:{pattern:/#\[(?:[^"'\/#]|\/(?![*/])|\/\/.*$|#(?!\[).*$|\/\*(?:[^*]|\*(?!\/))*\*\/|"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*')+\](?=\s*[a-z$#])/im,greedy:!0,inside:{"attribute-content":{pattern:/^(#\[)[\s\S]+(?=]$)/,lookbehind:!0,inside:{comment:e,string:r,"attribute-class-name":[{pattern:/([^:]|^)\b[a-z_]\w*(?!\\)\b/i,alias:"class-name",greedy:!0,lookbehind:!0},{pattern:/([^:]|^)(?:\\?\b[a-z_]\w*)+/i,alias:["class-name","class-name-fully-qualified"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:t,number:i,operator:n,punctuation:s}},delimiter:{pattern:/^#\[|]$/,alias:"punctuation"}}}}),a.hooks.add("before-tokenize",function(e){if(/<\?/.test(e.code)){a.languages["markup-templating"].buildPlaceholders(e,"php",/<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#(?!\[))(?:[^?\n\r]|\?(?!>))*(?=$|\?>|[\r\n])|#\[|\/\*[\s\S]*?(?:\*\/|$))*?(?:\?>|$)/gi)}}),a.hooks.add("after-tokenize",function(e){a.languages["markup-templating"].tokenizePlaceholders(e,"php")})}(Prism); \ No newline at end of file diff --git a/tests/languages/latte/html_feature.test b/tests/languages/latte/html_feature.test index d6534973bb..437d0ad944 100644 --- a/tests/languages/latte/html_feature.test +++ b/tests/languages/latte/html_feature.test @@ -15,7 +15,7 @@ ["tag", [["tag", [["punctuation", "<"], "a"]], ["attr-name", ["href"]], ["attr-value", [["punctuation", "="], ["punctuation", "\""], ["latte", [["ld", [["punctuation", "{"], ["tag", "link"]]], - ["php", ["Post", ["punctuation", ":"], ["class-name", "show"], ["variable", "$post"], ["operator", "->"], ["property", "id"]]], + ["php", [["argument-name", "Post"], ["punctuation", ":"], ["class-name", "show"], ["variable", "$post"], ["operator", "->"], ["property", "id"]]], ["rd", [["punctuation", "}"]]]]], ["punctuation", "\""]]], ["punctuation", ">"]]], ["latte", [["ld", [["punctuation", "{"]]], ["php", [["variable", "$post"], ["operator", "->"], ["property", "title"]]], ["rd", [["punctuation", "}"]]]]], diff --git a/tests/languages/latte/n-attr_feature.test b/tests/languages/latte/n-attr_feature.test index 3effa4630c..4126431d1b 100644 --- a/tests/languages/latte/n-attr_feature.test +++ b/tests/languages/latte/n-attr_feature.test @@ -9,13 +9,13 @@ [ ["tag", [["tag", [["punctuation", "<"], "a"]], ["n-attr", [["attr-name", "n:href"], - ["attr-value", [["punctuation", "="], ["punctuation", "\""], ["php", ["Post", ["punctuation", ":"], ["class-name", "show"], ["variable", "$post"], ["operator", "->"], ["property", "id"]]], ["punctuation", "\""]]]]], + ["attr-value", [["punctuation", "="], ["punctuation", "\""], ["php", [["argument-name", "Post"], ["punctuation", ":"], ["class-name", "show"], ["variable", "$post"], ["operator", "->"], ["property", "id"]]], ["punctuation", "\""]]]]], ["punctuation", ">"]]], "link", ["tag", [["tag", [["punctuation", ""]]], ["tag", [["tag", [["punctuation", "<"], "a"]], ["n-attr", [["attr-name", "n:href"], - ["attr-value", [["punctuation", "="], ["punctuation", "\""], ["php", ["Post", ["punctuation", ":"], ["class-name", "show"], ["variable", "$post"], ["operator", "->"], ["property", "id"]]], ["punctuation", "\""]]]]], + ["attr-value", [["punctuation", "="], ["punctuation", "\""], ["php", [["argument-name", "Post"], ["punctuation", ":"], ["class-name", "show"], ["variable", "$post"], ["operator", "->"], ["property", "id"]]], ["punctuation", "\""]]]]], ["punctuation", ">"]]], "link", ["tag", [["tag", [["punctuation", ""]]], diff --git a/tests/languages/php/argument-name_feature.test b/tests/languages/php/argument-name_feature.test new file mode 100644 index 0000000000..8abbca14de --- /dev/null +++ b/tests/languages/php/argument-name_feature.test @@ -0,0 +1,24 @@ +foo( + a: 'bar', + qux: 'baz' +); + +---------------------------------------------------- + +[ + ["function", "foo"], + ["punctuation", "("], + ["argument-name", "a"], + ["punctuation", ":"], + ["string", "'bar'"], + ["punctuation", ","], + ["argument-name", "qux"], + ["punctuation", ":"], + ["string", "'baz'"], + ["punctuation", ")"], + ["punctuation", ";"] +] + +---------------------------------------------------- + +Checks for named arguments. \ No newline at end of file diff --git a/tests/languages/php/array_feature.test b/tests/languages/php/array_feature.test new file mode 100644 index 0000000000..5769920baf --- /dev/null +++ b/tests/languages/php/array_feature.test @@ -0,0 +1,136 @@ +$a = [ + 1 => [0, 1], + 2 => [2, 3], + 3 => [ + [0, 1], + [2, 3] + ] +]; + +$b = array( + Array(1, 2) +); + +$c = [...$a, ...$b, [5, 6]]; + +$d = [0, 1] + [2]; + +[$e] = [2, 3]; + +$f[] = 3; + +$g['key'] = 3; + +---------------------------------------------------- + +[ + ["variable", "$a"], + ["operator", "="], + ["punctuation", "["], + ["number", "1"], + ["operator", "=>"], + ["punctuation", "["], + ["number", "0"], + ["punctuation", ","], + ["number", "1"], + ["punctuation", "]"], + ["punctuation", ","], + ["number", "2"], + ["operator", "=>"], + ["punctuation", "["], + ["number", "2"], + ["punctuation", ","], + ["number", "3"], + ["punctuation", "]"], + ["punctuation", ","], + ["number", "3"], + ["operator", "=>"], + ["punctuation", "["], + ["punctuation", "["], + ["number", "0"], + ["punctuation", ","], + ["number", "1"], + ["punctuation", "]"], + ["punctuation", ","], + ["punctuation", "["], + ["number", "2"], + ["punctuation", ","], + ["number", "3"], + ["punctuation", "]"], + ["punctuation", "]"], + ["punctuation", "]"], + ["punctuation", ";"], + + ["variable", "$b"], + ["operator", "="], + ["keyword", "array"], + ["punctuation", "("], + ["keyword", "Array"], + ["punctuation", "("], + ["number", "1"], + ["punctuation", ","], + ["number", "2"], + ["punctuation", ")"], + ["punctuation", ")"], + ["punctuation", ";"], + + ["variable", "$c"], + ["operator", "="], + ["punctuation", "["], + ["operator", "..."], + ["variable", "$a"], + ["punctuation", ","], + ["operator", "..."], + ["variable", "$b"], + ["punctuation", ","], + ["punctuation", "["], + ["number", "5"], + ["punctuation", ","], + ["number", "6"], + ["punctuation", "]"], + ["punctuation", "]"], + ["punctuation", ";"], + + ["variable", "$d"], + ["operator", "="], + ["punctuation", "["], + ["number", "0"], + ["punctuation", ","], + ["number", "1"], + ["punctuation", "]"], + ["operator", "+"], + ["punctuation", "["], + ["number", "2"], + ["punctuation", "]"], + ["punctuation", ";"], + + ["punctuation", "["], + ["variable", "$e"], + ["punctuation", "]"], + ["operator", "="], + ["punctuation", "["], + ["number", "2"], + ["punctuation", ","], + ["number", "3"], + ["punctuation", "]"], + ["punctuation", ";"], + + ["variable", "$f"], + ["punctuation", "["], + ["punctuation", "]"], + ["operator", "="], + ["number", "3"], + ["punctuation", ";"], + + ["variable", "$g"], + ["punctuation", "["], + ["string", "'key'"], + ["punctuation", "]"], + ["operator", "="], + ["number", "3"], + ["punctuation", ";"] +] + +---------------------------------------------------- + +Checks for arrays. \ No newline at end of file diff --git a/tests/languages/php/attribute_feature.test b/tests/languages/php/attribute_feature.test new file mode 100644 index 0000000000..de9816a803 --- /dev/null +++ b/tests/languages/php/attribute_feature.test @@ -0,0 +1,364 @@ +// #[Foo] + +#[] + +#[ + // something ] + Foo, + /* something + else #[] */ + Bar + # shell comments aren't confusing at all in here +] + +#[Foo([0, 1])] + +#[ + Foo( + [ + 1 => [0, 1], + 2 => [2, 3], + 3 => [ + [0, 1], + [2, 3] + ] + ] + ) +] + +#[Foo] +#[Foo\Bar\Baz] +#[Route(Http::POST, '/products/create', 1)] +#[ + Http\Route(Http::POST, '/products/create', 1), + Foo\Bar\Baz, + AttributeFoo('value') +] + +#[A1(1), A1(2), A2(3)] +class Foo { + public function foo(#[A1(5)] $a, #[A1(6)] $b) { } +} + +$object = new #[A1(7)] class () {}; + +function foo( + #[Attribute] $param1, + $param2 +) {} + +$f1 = #[ExampleAttribute] function () {}; + +$ref = new \ReflectionFunction(#[A1] #[A2] function () { }); + +#[DeprecationReason('reason: ')] +function main() {} + +---------------------------------------------------- + +[ + ["comment", "// #[Foo]"], + "\r\n\r\n#", + ["punctuation", "["], + ["punctuation", "]"], + + ["attribute", [ + ["delimiter", "#["], + ["attribute-content", [ + ["comment", "// something ]"], + ["attribute-class-name", "Foo"], + ["punctuation", ","], + ["comment", "/* something\r\n\telse #[] */"], + ["attribute-class-name", "Bar"], + ["comment", "# shell comments aren't confusing at all in here"] + ]], + ["delimiter", "]"] + ]], + + ["attribute", [ + ["delimiter", "#["], + ["attribute-content", [ + ["attribute-class-name", "Foo"], + ["punctuation", "("], + ["punctuation", "["], + ["number", "0"], + ["punctuation", ","], + ["number", "1"], + ["punctuation", "]"], + ["punctuation", ")"] + ]], + ["delimiter", "]"] + ]], + + ["attribute", [ + ["delimiter", "#["], + ["attribute-content", [ + ["attribute-class-name", "Foo"], + ["punctuation", "("], + ["punctuation", "["], + ["number", "1"], + ["operator", "=>"], + ["punctuation", "["], + ["number", "0"], + ["punctuation", ","], + ["number", "1"], + ["punctuation", "]"], + ["punctuation", ","], + ["number", "2"], + ["operator", "=>"], + ["punctuation", "["], + ["number", "2"], + ["punctuation", ","], + ["number", "3"], + ["punctuation", "]"], + ["punctuation", ","], + ["number", "3"], + ["operator", "=>"], + ["punctuation", "["], + ["punctuation", "["], + ["number", "0"], + ["punctuation", ","], + ["number", "1"], + ["punctuation", "]"], + ["punctuation", ","], + ["punctuation", "["], + ["number", "2"], + ["punctuation", ","], + ["number", "3"], + ["punctuation", "]"], + ["punctuation", "]"], + ["punctuation", "]"], + ["punctuation", ")"] + ]], + ["delimiter", "]"] + ]], + + ["attribute", [ + ["delimiter", "#["], + ["attribute-content", [ + ["attribute-class-name", "Foo"] + ]], + ["delimiter", "]"] + ]], + ["attribute", [ + ["delimiter", "#["], + ["attribute-content", [ + ["attribute-class-name", [ + "Foo", + ["punctuation", "\\"], + "Bar", + ["punctuation", "\\"], + "Baz" + ]] + ]], + ["delimiter", "]"] + ]], + ["attribute", [ + ["delimiter", "#["], + ["attribute-content", [ + ["attribute-class-name", "Route"], + ["punctuation", "("], + ["attribute-class-name", "Http"], + ["operator", "::"], + ["constant", "POST"], + ["punctuation", ","], + ["string", "'/products/create'"], + ["punctuation", ","], + ["number", "1"], + ["punctuation", ")"] + ]], + ["delimiter", "]"] + ]], + ["attribute", [ + ["delimiter", "#["], + ["attribute-content", [ + ["attribute-class-name", [ + "Http", + ["punctuation", "\\"], + "Route" + ]], + ["punctuation", "("], + ["attribute-class-name", "Http"], + ["operator", "::"], + ["constant", "POST"], + ["punctuation", ","], + ["string", "'/products/create'"], + ["punctuation", ","], + ["number", "1"], + ["punctuation", ")"], + ["punctuation", ","], + ["attribute-class-name", [ + "Foo", + ["punctuation", "\\"], + "Bar", + ["punctuation", "\\"], + "Baz" + ]], + ["punctuation", ","], + ["attribute-class-name", "AttributeFoo"], + ["punctuation", "("], + ["string", "'value'"], + ["punctuation", ")"] + ]], + ["delimiter", "]"] + ]], + + ["attribute", [ + ["delimiter", "#["], + ["attribute-content", [ + ["attribute-class-name", "A1"], + ["punctuation", "("], + ["number", "1"], + ["punctuation", ")"], + ["punctuation", ","], + ["attribute-class-name", "A1"], + ["punctuation", "("], + ["number", "2"], + ["punctuation", ")"], + ["punctuation", ","], + ["attribute-class-name", "A2"], + ["punctuation", "("], + ["number", "3"], + ["punctuation", ")"] + ]], + ["delimiter", "]"] + ]], + ["keyword", "class"], + ["class-name", "Foo"], + ["punctuation", "{"], + ["keyword", "public"], + ["keyword", "function"], + ["function", "foo"], + ["punctuation", "("], + ["attribute", [ + ["delimiter", "#["], + ["attribute-content", [ + ["attribute-class-name", "A1"], + ["punctuation", "("], + ["number", "5"], + ["punctuation", ")"] + ]], + ["delimiter", "]"] + ]], + ["variable", "$a"], + ["punctuation", ","], + ["attribute", [ + ["delimiter", "#["], + ["attribute-content", [ + ["attribute-class-name", "A1"], + ["punctuation", "("], + ["number", "6"], + ["punctuation", ")"] + ]], + ["delimiter", "]"] + ]], + ["variable", "$b"], + ["punctuation", ")"], + ["punctuation", "{"], + ["punctuation", "}"], + ["punctuation", "}"], + + ["variable", "$object"], + ["operator", "="], + ["keyword", "new"], + ["attribute", [ + ["delimiter", "#["], + ["attribute-content", [ + ["attribute-class-name", "A1"], + ["punctuation", "("], + ["number", "7"], + ["punctuation", ")"] + ]], + ["delimiter", "]"] + ]], + ["keyword", "class"], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", "{"], + ["punctuation", "}"], + ["punctuation", ";"], + + ["keyword", "function"], + ["function", "foo"], + ["punctuation", "("], + ["attribute", [ + ["delimiter", "#["], + ["attribute-content", [ + ["attribute-class-name", "Attribute"] + ]], + ["delimiter", "]"] + ]], + ["variable", "$param1"], + ["punctuation", ","], + ["variable", "$param2"], + ["punctuation", ")"], + ["punctuation", "{"], + ["punctuation", "}"], + + ["variable", "$f1"], + ["operator", "="], + ["attribute", [ + ["delimiter", "#["], + ["attribute-content", [ + ["attribute-class-name", "ExampleAttribute"] + ]], + ["delimiter", "]"] + ]], + ["keyword", "function"], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", "{"], + ["punctuation", "}"], + ["punctuation", ";"], + + ["variable", "$ref"], + ["operator", "="], + ["keyword", "new"], + ["class-name", [ + ["punctuation", "\\"], + "ReflectionFunction" + ]], + ["punctuation", "("], + ["attribute", [ + ["delimiter", "#["], + ["attribute-content", [ + ["attribute-class-name", "A1"] + ]], + ["delimiter", "]"] + ]], + ["attribute", [ + ["delimiter", "#["], + ["attribute-content", [ + ["attribute-class-name", "A2"] + ]], + ["delimiter", "]"] + ]], + ["keyword", "function"], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", "{"], + ["punctuation", "}"], + ["punctuation", ")"], + ["punctuation", ";"], + + ["attribute", [ + ["delimiter", "#["], + ["attribute-content", [ + ["attribute-class-name", "DeprecationReason"], + ["punctuation", "("], + ["string", "'reason: '"], + ["punctuation", ")"] + ]], + ["delimiter", "]"] + ]], + ["keyword", "function"], + ["function", "main"], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", "{"], + ["punctuation", "}"] +] + +---------------------------------------------------- + +Checks for attributes. diff --git a/tests/languages/php/class-name_feature.test b/tests/languages/php/class-name_feature.test index 8693b9adce..8b3b824811 100644 --- a/tests/languages/php/class-name_feature.test +++ b/tests/languages/php/class-name_feature.test @@ -1,14 +1,23 @@ public Foo $a; Foo::bar(); + \Foo::bar(); + \Package\Foo::bar(); function f(Foo $variable): Foo {} + function f(\Foo $variable): \Foo {} + function f(\Package\Foo $variable): \Package\Foo {} + function f($variable): ?Foo {} +function f(Foo|Bar $variable): Foo|Bar {} + +function f(\Package\Foo|\Package\Bar $variable): \Package\Foo|\Package\Bar {} + class Foo extends Bar implements Baz {} class Foo extends \Package\Bar implements App\Baz {} @@ -58,7 +67,8 @@ class Foo extends \Package\Bar implements App\Baz {} ["punctuation", ")"], ["punctuation", ":"], ["class-name", "Foo"], - ["punctuation", "{"], ["punctuation", "}"], + ["punctuation", "{"], + ["punctuation", "}"], ["keyword", "function"], ["function", "f"], @@ -74,7 +84,8 @@ class Foo extends \Package\Bar implements App\Baz {} ["punctuation", "\\"], "Foo" ]], - ["punctuation", "{"], ["punctuation", "}"], + ["punctuation", "{"], + ["punctuation", "}"], ["keyword", "function"], ["function", "f"], @@ -94,7 +105,8 @@ class Foo extends \Package\Bar implements App\Baz {} ["punctuation", "\\"], "Foo" ]], - ["punctuation", "{"], ["punctuation", "}"], + ["punctuation", "{"], + ["punctuation", "}"], ["keyword", "function"], ["function", "f"], @@ -104,7 +116,58 @@ class Foo extends \Package\Bar implements App\Baz {} ["punctuation", ":"], ["operator", "?"], ["class-name", "Foo"], - ["punctuation", "{"], ["punctuation", "}"], + ["punctuation", "{"], + ["punctuation", "}"], + + ["keyword", "function"], + ["function", "f"], + ["punctuation", "("], + ["class-name", "Foo"], + ["operator", "|"], + ["class-name", "Bar"], + ["variable", "$variable"], + ["punctuation", ")"], + ["punctuation", ":"], + ["class-name", "Foo"], + ["operator", "|"], + ["class-name", "Bar"], + ["punctuation", "{"], + ["punctuation", "}"], + + ["keyword", "function"], + ["function", "f"], + ["punctuation", "("], + ["class-name", [ + ["punctuation", "\\"], + "Package", + ["punctuation", "\\"], + "Foo" + ]], + ["operator", "|"], + ["class-name", [ + ["punctuation", "\\"], + "Package", + ["punctuation", "\\"], + "Bar" + ]], + ["variable", "$variable"], + ["punctuation", ")"], + ["punctuation", ":"], + ["class-name", [ + ["punctuation", "\\"], + "Package", + ["punctuation", "\\"], + "Foo" + ]], + ["operator", "|"], + ["class-name", [ + ["punctuation", "\\"], + "Package", + ["punctuation", "\\"], + "Bar" + ]], + ["punctuation", "{"], + ["punctuation", "}"], ["keyword", "class"], ["class-name", "Foo"], @@ -112,7 +175,8 @@ class Foo extends \Package\Bar implements App\Baz {} ["class-name", "Bar"], ["keyword", "implements"], ["class-name", "Baz"], - ["punctuation", "{"], ["punctuation", "}"], + ["punctuation", "{"], + ["punctuation", "}"], ["keyword", "class"], ["class-name", "Foo"], @@ -129,9 +193,10 @@ class Foo extends \Package\Bar implements App\Baz {} ["punctuation", "\\"], "Baz" ]], - ["punctuation", "{"], ["punctuation", "}"] + ["punctuation", "{"], + ["punctuation", "}"] ] ---------------------------------------------------- -Checks for class names. \ No newline at end of file +Checks for class names. diff --git a/tests/languages/php/delimiter_feature.test b/tests/languages/php/delimiter_feature.test index f7bd684679..22e613f835 100644 --- a/tests/languages/php/delimiter_feature.test +++ b/tests/languages/php/delimiter_feature.test @@ -2,6 +2,12 @@ +')] +function main() {} +// php is not ended yet +?> + ---------------------------------------------------- [ @@ -17,6 +23,28 @@ ["delimiter", ""] + ]], + + ["php", [ + ["delimiter", "'"], + ["punctuation", ")"] + ]], + ["delimiter", "]"] + ]], + ["keyword", "function"], + ["function", "main"], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", "{"], + ["punctuation", "}"], + ["comment", "// php is not ended yet"], + ["delimiter", "?>"] ]] ] diff --git a/tests/languages/php/operators_feature.test b/tests/languages/php/operators_feature.test index 33aa7d47e4..58bb1f5af2 100644 --- a/tests/languages/php/operators_feature.test +++ b/tests/languages/php/operators_feature.test @@ -3,6 +3,7 @@ ?? ??= -> +?-> :: ... / @@ -32,6 +33,8 @@ += - -- +>> +<< -= ? ~ @@ -48,6 +51,7 @@ ["operator", "??"], ["operator", "??="], ["operator", "->"], + ["operator", "?->"], ["operator", "::"], ["operator", "..."], ["operator", "/"], @@ -77,6 +81,8 @@ ["operator", "+="], ["operator", "-"], ["operator", "--"], + ["operator", ">>"], + ["operator", "<<"], ["operator", "-="], ["operator", "?"], ["operator", "~"], diff --git a/tests/languages/php/type_feature.test b/tests/languages/php/type_feature.test index c1d69b97e3..196110b445 100644 --- a/tests/languages/php/type_feature.test +++ b/tests/languages/php/type_feature.test @@ -1,17 +1,20 @@ public bool $a; -public boolean $a; public int $a; -public integer $a; public float $a; public string $a; public object $a; public array $a; public mixed $a; +public int|null $a; +public int|false $a; +public false | int $a; (int) $a; (string) $a; (object) $a; (array) $a; +(boolean) $a; +(integer) $a; function f(): int {} function f() :string {} @@ -19,26 +22,31 @@ function f() : object {} function f(): ?array {} function f(): self {} function f(): static {} +function f(): int|null {} +function f(): int|false {} -function foo(int $a, string $b, ? object $c, ?array $d, self $e, static $f) {} +function foo(int $a, string $b, ? object $c, ?array $d, self $e, static $f, int|null $g) {} ---------------------------------------------------- [ ["keyword", "public"], ["keyword", "bool"], ["variable", "$a"], ["punctuation", ";"], - ["keyword", "public"], ["keyword", "boolean"], ["variable", "$a"], ["punctuation", ";"], ["keyword", "public"], ["keyword", "int"], ["variable", "$a"], ["punctuation", ";"], - ["keyword", "public"], ["keyword", "integer"], ["variable", "$a"], ["punctuation", ";"], ["keyword", "public"], ["keyword", "float"], ["variable", "$a"], ["punctuation", ";"], ["keyword", "public"], ["keyword", "string"], ["variable", "$a"], ["punctuation", ";"], ["keyword", "public"], ["keyword", "object"], ["variable", "$a"], ["punctuation", ";"], ["keyword", "public"], ["keyword", "array"], ["variable", "$a"], ["punctuation", ";"], ["keyword", "public"], ["keyword", "mixed"], ["variable", "$a"], ["punctuation", ";"], + ["keyword", "public"], ["keyword", "int"], ["operator", "|"], ["keyword", "null"], ["variable", "$a"], ["punctuation", ";"], + ["keyword", "public"], ["keyword", "int"], ["operator", "|"], ["keyword", "false"], ["variable", "$a"], ["punctuation", ";"], + ["keyword", "public"], ["keyword", "false"], ["operator", "|"], ["keyword", "int"], ["variable", "$a"], ["punctuation", ";"], ["punctuation", "("], ["keyword", "int"], ["punctuation", ")"], ["variable", "$a"], ["punctuation", ";"], ["punctuation", "("], ["keyword", "string"], ["punctuation", ")"], ["variable", "$a"], ["punctuation", ";"], ["punctuation", "("], ["keyword", "object"], ["punctuation", ")"], ["variable", "$a"], ["punctuation", ";"], ["punctuation", "("], ["keyword", "array"], ["punctuation", ")"], ["variable", "$a"], ["punctuation", ";"], + ["punctuation", "("], ["keyword", "boolean"], ["punctuation", ")"], ["variable", "$a"], ["punctuation", ";"], + ["punctuation", "("], ["keyword", "integer"], ["punctuation", ")"], ["variable", "$a"], ["punctuation", ";"], ["keyword", "function"], ["function", "f"], ["punctuation", "("], ["punctuation", ")"], ["punctuation", ":"], ["keyword", "int"], ["punctuation", "{"], ["punctuation", "}"], ["keyword", "function"], ["function", "f"], ["punctuation", "("], ["punctuation", ")"], ["punctuation", ":"], ["keyword", "string"], ["punctuation", "{"], ["punctuation", "}"], @@ -46,6 +54,8 @@ function foo(int $a, string $b, ? object $c, ?array $d, self $e, static $f) {} ["keyword", "function"], ["function", "f"], ["punctuation", "("], ["punctuation", ")"], ["punctuation", ":"], ["operator", "?"], ["keyword", "array"], ["punctuation", "{"], ["punctuation", "}"], ["keyword", "function"], ["function", "f"], ["punctuation", "("], ["punctuation", ")"], ["punctuation", ":"], ["keyword", "self"], ["punctuation", "{"], ["punctuation", "}"], ["keyword", "function"], ["function", "f"], ["punctuation", "("], ["punctuation", ")"], ["punctuation", ":"], ["keyword", "static"], ["punctuation", "{"], ["punctuation", "}"], + ["keyword", "function"], ["function", "f"], ["punctuation", "("], ["punctuation", ")"], ["punctuation", ":"], ["keyword", "int"], ["operator", "|"], ["keyword", "null"], ["punctuation", "{"], ["punctuation", "}"], + ["keyword", "function"], ["function", "f"], ["punctuation", "("], ["punctuation", ")"], ["punctuation", ":"], ["keyword", "int"], ["operator", "|"], ["keyword", "false"], ["punctuation", "{"], ["punctuation", "}"], ["keyword", "function"], ["function", "foo"], ["punctuation", "("], ["keyword", "int"], ["variable", "$a"], ["punctuation", ","], @@ -53,7 +63,8 @@ function foo(int $a, string $b, ? object $c, ?array $d, self $e, static $f) {} ["operator", "?"], ["keyword", "object"], ["variable", "$c"], ["punctuation", ","], ["operator", "?"], ["keyword", "array"], ["variable", "$d"], ["punctuation", ","], ["keyword", "self"], ["variable", "$e"], ["punctuation", ","], - ["keyword", "static"], ["variable", "$f"], + ["keyword", "static"], ["variable", "$f"], ["punctuation", ","], + ["keyword", "int"], ["operator", "|"], ["keyword", "null"], ["variable", "$g"], ["punctuation", ")"], ["punctuation", "{"], ["punctuation", "}"] ] From 093c817594d2468d198d36ec5fa7fda8e13346f6 Mon Sep 17 00:00:00 2001 From: Jeremie Knuesel Date: Fri, 23 Oct 2020 20:58:36 +0200 Subject: [PATCH 0647/1100] Julia: Removed constants that are not exported by default (#2601) * Remove Julia constants that are not exported by default * Julia: build and fix test --- components/prism-julia.js | 2 +- components/prism-julia.min.js | 2 +- tests/languages/julia/constant_feature.test | 13 ++----------- 3 files changed, 4 insertions(+), 13 deletions(-) diff --git a/components/prism-julia.js b/components/prism-julia.js index a71b785064..1fc3b849e6 100644 --- a/components/prism-julia.js +++ b/components/prism-julia.js @@ -27,5 +27,5 @@ Prism.languages.julia = { 'operator': /&&|\|\||[-+*^%÷⊻&$\\]=?|\/[\/=]?|!=?=?|\|[=>]?|<(?:<=?|[=:|])?|>(?:=|>>?=?)?|==?=?|[~≠≤≥'√∛]/, 'punctuation': /::?|[{}[\]();,.?]/, // https://docs.julialang.org/en/v1/base/numbers/#Base.im - 'constant': /\b(?:(?:NaN|Inf)(?:16|32|64)?|im|pi|e|catalan|eulergamma|golden)\b|[πℯγφ]/ + 'constant': /\b(?:(?:NaN|Inf)(?:16|32|64)?|im|pi)\b|[πℯ]/ }; diff --git a/components/prism-julia.min.js b/components/prism-julia.min.js index 7bed6d84a3..460a83eb49 100644 --- a/components/prism-julia.min.js +++ b/components/prism-julia.min.js @@ -1 +1 @@ -Prism.languages.julia={comment:{pattern:/(^|[^\\])(?:#=(?:[^#=]|=(?!#)|#(?!=)|#=(?:[^#=]|=(?!#)|#(?!=))*=#)*=#|#.*)/,lookbehind:!0},regex:{pattern:/r"(?:\\.|[^"\\\r\n])*"[imsx]{0,4}/,greedy:!0},string:{pattern:/"""[\s\S]+?"""|\w*"(?:\\.|[^"\\\r\n])*"|(^|[^\w'])'(?:\\[^\r\n][^'\r\n]*|[^\\\r\n])'|`(?:[^\\`\r\n]|\\.)*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:abstract|baremodule|begin|bitstype|break|catch|ccall|const|continue|do|else|elseif|end|export|finally|for|function|global|if|immutable|import|importall|in|let|local|macro|module|print|println|quote|return|struct|try|type|typealias|using|while)\b/,boolean:/\b(?:true|false)\b/,number:/(?:\b(?=\d)|\B(?=\.))(?:0[box])?(?:[\da-f]+(?:_[\da-f]+)*\.?(?:\d+(?:_\d+)*)?|\.\d+(?:_\d+)*)(?:[efp][+-]?\d+(?:_\d+)*)?j?/i,operator:/&&|\|\||[-+*^%÷⊻&$\\]=?|\/[\/=]?|!=?=?|\|[=>]?|<(?:<=?|[=:|])?|>(?:=|>>?=?)?|==?=?|[~≠≤≥'√∛]/,punctuation:/::?|[{}[\]();,.?]/,constant:/\b(?:(?:NaN|Inf)(?:16|32|64)?|im|pi|e|catalan|eulergamma|golden)\b|[πℯγφ]/}; \ No newline at end of file +Prism.languages.julia={comment:{pattern:/(^|[^\\])(?:#=(?:[^#=]|=(?!#)|#(?!=)|#=(?:[^#=]|=(?!#)|#(?!=))*=#)*=#|#.*)/,lookbehind:!0},regex:{pattern:/r"(?:\\.|[^"\\\r\n])*"[imsx]{0,4}/,greedy:!0},string:{pattern:/"""[\s\S]+?"""|\w*"(?:\\.|[^"\\\r\n])*"|(^|[^\w'])'(?:\\[^\r\n][^'\r\n]*|[^\\\r\n])'|`(?:[^\\`\r\n]|\\.)*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:abstract|baremodule|begin|bitstype|break|catch|ccall|const|continue|do|else|elseif|end|export|finally|for|function|global|if|immutable|import|importall|in|let|local|macro|module|print|println|quote|return|struct|try|type|typealias|using|while)\b/,boolean:/\b(?:true|false)\b/,number:/(?:\b(?=\d)|\B(?=\.))(?:0[box])?(?:[\da-f]+(?:_[\da-f]+)*\.?(?:\d+(?:_\d+)*)?|\.\d+(?:_\d+)*)(?:[efp][+-]?\d+(?:_\d+)*)?j?/i,operator:/&&|\|\||[-+*^%÷⊻&$\\]=?|\/[\/=]?|!=?=?|\|[=>]?|<(?:<=?|[=:|])?|>(?:=|>>?=?)?|==?=?|[~≠≤≥'√∛]/,punctuation:/::?|[{}[\]();,.?]/,constant:/\b(?:(?:NaN|Inf)(?:16|32|64)?|im|pi)\b|[πℯ]/}; \ No newline at end of file diff --git a/tests/languages/julia/constant_feature.test b/tests/languages/julia/constant_feature.test index a79bbd0215..d38ffdfb9e 100644 --- a/tests/languages/julia/constant_feature.test +++ b/tests/languages/julia/constant_feature.test @@ -3,10 +3,7 @@ Inf Inf16 Inf32 Inf64 im pi π -e ℯ -catalan -eulergamma γ -golden φ +ℯ ---------------------------------------------------- @@ -23,13 +20,7 @@ golden φ ["constant", "im"], ["constant", "pi"], ["constant", "π"], - ["constant", "e"], - ["constant", "ℯ"], - ["constant", "catalan"], - ["constant", "eulergamma"], - ["constant", "γ"], - ["constant", "golden"], - ["constant", "φ"] + ["constant", "ℯ"] ] ---------------------------------------------------- From 7cdfe55624c4c04838f738203f632e7b236369c3 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Sat, 24 Oct 2020 17:54:14 +0200 Subject: [PATCH 0648/1100] Line numbers: Fixed null reference (#2605) --- plugins/line-numbers/prism-line-numbers.js | 3 +++ plugins/line-numbers/prism-line-numbers.min.js | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins/line-numbers/prism-line-numbers.js b/plugins/line-numbers/prism-line-numbers.js index 16012f604d..1712ed6bd1 100644 --- a/plugins/line-numbers/prism-line-numbers.js +++ b/plugins/line-numbers/prism-line-numbers.js @@ -33,6 +33,9 @@ } var lineNumberRows = element.querySelector('.line-numbers-rows'); + if (!lineNumberRows) { + return; + } var lineNumberStart = parseInt(element.getAttribute('data-start'), 10) || 1; var lineNumberEnd = lineNumberStart + (lineNumberRows.children.length - 1); diff --git a/plugins/line-numbers/prism-line-numbers.min.js b/plugins/line-numbers/prism-line-numbers.min.js index b0ee977c66..adce92854a 100644 --- a/plugins/line-numbers/prism-line-numbers.min.js +++ b/plugins/line-numbers/prism-line-numbers.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof self&&self.Prism&&self.document){var o="line-numbers",a=/\n(?!$)/g,e=Prism.plugins.lineNumbers={getLine:function(e,n){if("PRE"===e.tagName&&e.classList.contains(o)){var t=e.querySelector(".line-numbers-rows"),i=parseInt(e.getAttribute("data-start"),10)||1,r=i+(t.children.length-1);n");(i=document.createElement("span")).setAttribute("aria-hidden","true"),i.className="line-numbers-rows",i.innerHTML=l,t.hasAttribute("data-start")&&(t.style.counterReset="linenumber "+(parseInt(t.getAttribute("data-start"),10)-1)),e.element.appendChild(i),u([t]),Prism.hooks.run("line-numbers",e)}}}),Prism.hooks.add("line-numbers",function(e){e.plugins=e.plugins||{},e.plugins.lineNumbers=!0})}function u(e){if(0!=(e=e.filter(function(e){var n=t(e)["white-space"];return"pre-wrap"===n||"pre-line"===n})).length){var n=e.map(function(e){var n=e.querySelector("code"),t=e.querySelector(".line-numbers-rows");if(n&&t){var i=e.querySelector(".line-numbers-sizer"),r=n.textContent.split(a);i||((i=document.createElement("span")).className="line-numbers-sizer",n.appendChild(i)),i.innerHTML="0",i.style.display="block";var s=i.getBoundingClientRect().height;return i.innerHTML="",{element:e,lines:r,lineHeights:[],oneLinerHeight:s,sizer:i}}}).filter(Boolean);n.forEach(function(e){var i=e.sizer,n=e.lines,r=e.lineHeights,s=e.oneLinerHeight;r[n.length-1]=void 0,n.forEach(function(e,n){if(e&&1");(i=document.createElement("span")).setAttribute("aria-hidden","true"),i.className="line-numbers-rows",i.innerHTML=l,t.hasAttribute("data-start")&&(t.style.counterReset="linenumber "+(parseInt(t.getAttribute("data-start"),10)-1)),e.element.appendChild(i),u([t]),Prism.hooks.run("line-numbers",e)}}}),Prism.hooks.add("line-numbers",function(e){e.plugins=e.plugins||{},e.plugins.lineNumbers=!0})}function u(e){if(0!=(e=e.filter(function(e){var n=t(e)["white-space"];return"pre-wrap"===n||"pre-line"===n})).length){var n=e.map(function(e){var n=e.querySelector("code"),t=e.querySelector(".line-numbers-rows");if(n&&t){var i=e.querySelector(".line-numbers-sizer"),r=n.textContent.split(a);i||((i=document.createElement("span")).className="line-numbers-sizer",n.appendChild(i)),i.innerHTML="0",i.style.display="block";var s=i.getBoundingClientRect().height;return i.innerHTML="",{element:e,lines:r,lineHeights:[],oneLinerHeight:s,sizer:i}}}).filter(Boolean);n.forEach(function(e){var i=e.sizer,n=e.lines,r=e.lineHeights,s=e.oneLinerHeight;r[n.length-1]=void 0,n.forEach(function(e,n){if(e&&1 Date: Sat, 24 Oct 2020 18:08:21 -0400 Subject: [PATCH 0649/1100] Migrate from TravisCI -> GitHub Actions (#2606) This moves the test suite from Travis -> GitHub Actions. The Workflow is essentially the same as what we had on Travis, but split into two jobs. --- .github/workflows/test.yml | 46 ++++++++++++++++++++++++++++++++++++++ .travis.yml | 30 ------------------------- README.md | 2 +- docs/index.html | 2 +- 4 files changed, 48 insertions(+), 32 deletions(-) create mode 100644 .github/workflows/test.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000000..0e07d03419 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,46 @@ +name: CI + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + tests: + + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [10.x, 12.x, 14.x] + + steps: + - uses: actions/checkout@v2 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + - run: npm ci + - run: npm test + + build: + + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [10.x, 12.x, 14.x] + + steps: + - uses: actions/checkout@v2 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + - run: npm ci + - run: npm run build + - run: | + git add --all && \ + git diff-index --cached HEAD --stat --exit-code || \ + (echo && echo "The above files changed because the build is not up to date." && echo "Please rebuild Prism." && exit 1) diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 1023859023..0000000000 --- a/.travis.yml +++ /dev/null @@ -1,30 +0,0 @@ -language: node_js -node_js: -- '10' -- '12' -- 'node' -# Build all branches -branches: - only: - - gh-pages - - /.*/ -before_install: -- npm i -g npm@latest -install: -- npm ci -before_script: -# Rebuild Prism -- npx gulp -# Detect changes -# First, we stage all changes and then detect if there is anything staged -- git add --all && git diff-index --cached HEAD --stat --exit-code || - (echo && echo "The above files changed because the build is not up to date." && echo "Please rebuild Prism." && exit 1) -script: npm test -deploy: - provider: npm - email: lea@verou.me - api_key: - secure: TjRcXEr7Y/9KRJ4EOEQbd2Ij8hxKj8c/yOpEROy2lTYv6QH9x46nFDgZEE3VHfp/nnBUYpC47dRaSxiUj8H5rtkMNCZrREZu1n1zahmzP6dI6kCj+H3GiY7yw/Jhdx3uvQZHwknW2TJ/YRsLeQsmMSG2HnJobY9Zn4REX5ccP2E= - on: - tags: true - repo: PrismJS/prism diff --git a/README.md b/README.md index 2478355c9d..f5a470413f 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # [Prism](https://prismjs.com/) -[![Build Status](https://travis-ci.org/PrismJS/prism.svg?branch=master)](https://travis-ci.org/PrismJS/prism) +[![Build Status](https://github.com/PrismJS/prism/workflows/CI/badge.svg)](https://github.com/PrismJS/prism/actions) [![npm](https://img.shields.io/npm/dw/prismjs.svg)](https://www.npmjs.com/package/prismjs) Prism is a lightweight, robust, elegant syntax highlighting library. It's a spin-off project from [Dabblet](https://dabblet.com/). diff --git a/docs/index.html b/docs/index.html index 31a9a46c6d..7e64a15db0 100644 --- a/docs/index.html +++ b/docs/index.html @@ -52,7 +52,7 @@

            Home

            Prism

            -

            Build Status +

            Build Status npm

            Prism is a lightweight, robust, elegant syntax highlighting library. It's a spin-off project from Dabblet.

            You can learn more on prismjs.com.

            From c2f6a64426f44497a675cb32dccb079b3eff1609 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Sun, 25 Oct 2020 23:42:25 +0100 Subject: [PATCH 0650/1100] Fixed multiple cases of vulnerable regexes (#2584) --- components/prism-asciidoc.js | 6 +++--- components/prism-asciidoc.min.js | 2 +- components/prism-bash.js | 2 +- components/prism-bash.min.js | 2 +- components/prism-batch.js | 6 +++--- components/prism-batch.min.js | 2 +- components/prism-csharp.js | 2 +- components/prism-csharp.min.js | 2 +- components/prism-eiffel.js | 2 +- components/prism-eiffel.min.js | 2 +- components/prism-elm.js | 2 +- components/prism-elm.min.js | 2 +- components/prism-fortran.js | 2 +- components/prism-fortran.min.js | 2 +- components/prism-ftl.js | 4 ++-- components/prism-ftl.min.js | 2 +- components/prism-gherkin.js | 2 +- components/prism-gherkin.min.js | 2 +- components/prism-haml.js | 4 ++-- components/prism-haml.min.js | 2 +- components/prism-hcl.js | 2 +- components/prism-hcl.min.js | 2 +- components/prism-lisp.js | 2 +- components/prism-lisp.min.js | 2 +- components/prism-lua.js | 4 ++-- components/prism-lua.min.js | 2 +- components/prism-neon.js | 2 +- components/prism-neon.min.js | 2 +- components/prism-nix.js | 4 ++-- components/prism-nix.min.js | 2 +- components/prism-php.js | 2 +- components/prism-php.min.js | 2 +- components/prism-puppet.js | 8 ++++---- components/prism-puppet.min.js | 2 +- components/prism-q.js | 2 +- components/prism-q.min.js | 2 +- components/prism-rest.js | 4 ++-- components/prism-rest.min.js | 2 +- components/prism-ruby.js | 2 +- components/prism-ruby.min.js | 2 +- components/prism-sass.js | 4 ++-- components/prism-sass.min.js | 2 +- components/prism-scss.js | 2 +- components/prism-scss.min.js | 2 +- components/prism-shell-session.js | 2 +- components/prism-shell-session.min.js | 2 +- components/prism-stylus.js | 2 +- components/prism-stylus.min.js | 2 +- components/prism-swift.js | 2 +- components/prism-swift.min.js | 2 +- components/prism-tap.js | 2 +- components/prism-tap.min.js | 2 +- components/prism-textile.js | 2 +- components/prism-textile.min.js | 2 +- components/prism-xeora.js | 4 ++-- components/prism-xeora.min.js | 2 +- 56 files changed, 70 insertions(+), 70 deletions(-) diff --git a/components/prism-asciidoc.js b/components/prism-asciidoc.js index bc0664f1c3..2ad85c83c3 100644 --- a/components/prism-asciidoc.js +++ b/components/prism-asciidoc.js @@ -1,7 +1,7 @@ (function (Prism) { var attributes = { - pattern: /(^[ \t]*)\[(?!\[)(?:(["'$`])(?:(?!\2)[^\\]|\\.)*\2|\[(?:[^\]\\]|\\.)*\]|[^\]\\]|\\.)*\]/m, + pattern: /(^[ \t]*)\[(?!\[)(?:(["'$`])(?:(?!\2)[^\\]|\\.)*\2|\[(?:[^\[\]\\]|\\.)*\]|[^\[\]\\"'$`]|\\.)*\]/m, lookbehind: true, inside: { 'quoted': { @@ -32,7 +32,7 @@ alias: 'comment' }, 'table': { - pattern: /^\|={3,}(?:(?:\r?\n|\r).*)*?(?:\r?\n|\r)\|={3,}$/m, + pattern: /^\|={3,}(?:(?:\r?\n|\r(?!\n)).*)*?(?:\r?\n|\r)\|={3,}$/m, inside: { 'specifiers': { pattern: /(?!\|)(?:(?:(?:\d+(?:\.\d+)?|\.\d+)[+*])?(?:[<^>](?:\.[<^>])?|\.[<^>])?[a-z]*)(?=\|)/, @@ -124,7 +124,7 @@ } ], 'macro': { - pattern: /\b[a-z\d][a-z\d-]*::?(?:(?:\S+)??\[(?:[^\]\\"]|(["'])(?:(?!\1)[^\\]|\\.)*\1|\\.)*\])/, + pattern: /\b[a-z\d][a-z\d-]*::?(?:(?:\S+)??\[(?:[^\]\\"']|(["'])(?:(?!\1)[^\\]|\\.)*\1|\\.)*\])/, inside: { 'function': /^[a-z\d-]+(?=:)/, 'punctuation': /^::?/, diff --git a/components/prism-asciidoc.min.js b/components/prism-asciidoc.min.js index b37a07c92b..31315f660d 100644 --- a/components/prism-asciidoc.min.js +++ b/components/prism-asciidoc.min.js @@ -1 +1 @@ -!function(t){var n={pattern:/(^[ \t]*)\[(?!\[)(?:(["'$`])(?:(?!\2)[^\\]|\\.)*\2|\[(?:[^\]\\]|\\.)*\]|[^\]\\]|\\.)*\]/m,lookbehind:!0,inside:{quoted:{pattern:/([$`])(?:(?!\1)[^\\]|\\.)*\1/,inside:{punctuation:/^[$`]|[$`]$/}},interpreted:{pattern:/'(?:[^'\\]|\\.)*'/,inside:{punctuation:/^'|'$/}},string:/"(?:[^"\\]|\\.)*"/,variable:/\w+(?==)/,punctuation:/^\[|\]$|,/,operator:/=/,"attr-value":/(?!^\s+$).+/}},a=t.languages.asciidoc={"comment-block":{pattern:/^(\/{4,})(?:\r?\n|\r)(?:[\s\S]*(?:\r?\n|\r))??\1/m,alias:"comment"},table:{pattern:/^\|={3,}(?:(?:\r?\n|\r).*)*?(?:\r?\n|\r)\|={3,}$/m,inside:{specifiers:{pattern:/(?!\|)(?:(?:(?:\d+(?:\.\d+)?|\.\d+)[+*])?(?:[<^>](?:\.[<^>])?|\.[<^>])?[a-z]*)(?=\|)/,alias:"attr-value"},punctuation:{pattern:/(^|[^\\])[|!]=*/,lookbehind:!0}}},"passthrough-block":{pattern:/^(\+{4,})(?:\r?\n|\r)(?:[\s\S]*(?:\r?\n|\r))??\1$/m,inside:{punctuation:/^\++|\++$/}},"literal-block":{pattern:/^(-{4,}|\.{4,})(?:\r?\n|\r)(?:[\s\S]*(?:\r?\n|\r))??\1$/m,inside:{punctuation:/^(?:-+|\.+)|(?:-+|\.+)$/}},"other-block":{pattern:/^(--|\*{4,}|_{4,}|={4,})(?:\r?\n|\r)(?:[\s\S]*(?:\r?\n|\r))??\1$/m,inside:{punctuation:/^(?:-+|\*+|_+|=+)|(?:-+|\*+|_+|=+)$/}},"list-punctuation":{pattern:/(^[ \t]*)(?:-|\*{1,5}|\.{1,5}|(?:[a-z]|\d+)\.|[xvi]+\))(?= )/im,lookbehind:!0,alias:"punctuation"},"list-label":{pattern:/(^[ \t]*)[a-z\d].+(?::{2,4}|;;)(?=\s)/im,lookbehind:!0,alias:"symbol"},"indented-block":{pattern:/((\r?\n|\r)\2)([ \t]+)\S.*(?:(?:\r?\n|\r)\3.+)*(?=\2{2}|$)/,lookbehind:!0},comment:/^\/\/.*/m,title:{pattern:/^.+(?:\r?\n|\r)(?:={3,}|-{3,}|~{3,}|\^{3,}|\+{3,})$|^={1,5} +.+|^\.(?![\s.]).*/m,alias:"important",inside:{punctuation:/^(?:\.|=+)|(?:=+|-+|~+|\^+|\++)$/}},"attribute-entry":{pattern:/^:[^:\r\n]+:(?: .*?(?: \+(?:\r?\n|\r).*?)*)?$/m,alias:"tag"},attributes:n,hr:{pattern:/^'{3,}$/m,alias:"punctuation"},"page-break":{pattern:/^<{3,}$/m,alias:"punctuation"},admonition:{pattern:/^(?:TIP|NOTE|IMPORTANT|WARNING|CAUTION):/m,alias:"keyword"},callout:[{pattern:/(^[ \t]*)/m,lookbehind:!0,alias:"symbol"},{pattern:/<\d+>/,alias:"symbol"}],macro:{pattern:/\b[a-z\d][a-z\d-]*::?(?:(?:\S+)??\[(?:[^\]\\"]|(["'])(?:(?!\1)[^\\]|\\.)*\1|\\.)*\])/,inside:{function:/^[a-z\d-]+(?=:)/,punctuation:/^::?/,attributes:{pattern:/(?:\[(?:[^\]\\"]|(["'])(?:(?!\1)[^\\]|\\.)*\1|\\.)*\])/,inside:n.inside}}},inline:{pattern:/(^|[^\\])(?:(?:\B\[(?:[^\]\\"]|(["'])(?:(?!\2)[^\\]|\\.)*\2|\\.)*\])?(?:\b_(?!\s)(?: _|[^_\\\r\n]|\\.)+(?:(?:\r?\n|\r)(?: _|[^_\\\r\n]|\\.)+)*_\b|\B``(?!\s).+?(?:(?:\r?\n|\r).+?)*''\B|\B`(?!\s)(?:[^`'\s]|\s+\S)+['`]\B|\B(['*+#])(?!\s)(?: \3|(?!\3)[^\\\r\n]|\\.)+(?:(?:\r?\n|\r)(?: \3|(?!\3)[^\\\r\n]|\\.)+)*\3\B)|(?:\[(?:[^\]\\"]|(["'])(?:(?!\4)[^\\]|\\.)*\4|\\.)*\])?(?:(__|\*\*|\+\+\+?|##|\$\$|[~^]).+?(?:(?:\r?\n|\r).+?)*\5|\{[^}\r\n]+\}|\[\[\[?.+?(?:(?:\r?\n|\r).+?)*\]?\]\]|<<.+?(?:(?:\r?\n|\r).+?)*>>|\(\(\(?.+?(?:(?:\r?\n|\r).+?)*\)?\)\)))/m,lookbehind:!0,inside:{attributes:n,url:{pattern:/^(?:\[\[\[?.+?\]?\]\]|<<.+?>>)$/,inside:{punctuation:/^(?:\[\[\[?|<<)|(?:\]\]\]?|>>)$/}},"attribute-ref":{pattern:/^\{.+\}$/,inside:{variable:{pattern:/(^\{)[a-z\d,+_-]+/,lookbehind:!0},operator:/^[=?!#%@$]|!(?=[:}])/,punctuation:/^\{|\}$|::?/}},italic:{pattern:/^(['_])[\s\S]+\1$/,inside:{punctuation:/^(?:''?|__?)|(?:''?|__?)$/}},bold:{pattern:/^\*[\s\S]+\*$/,inside:{punctuation:/^\*\*?|\*\*?$/}},punctuation:/^(?:``?|\+{1,3}|##?|\$\$|[~^]|\(\(\(?)|(?:''?|\+{1,3}|##?|\$\$|[~^`]|\)?\)\))$/}},replacement:{pattern:/\((?:C|TM|R)\)/,alias:"builtin"},entity:/&#?[\da-z]{1,8};/i,"line-continuation":{pattern:/(^| )\+$/m,lookbehind:!0,alias:"punctuation"}};function i(t){for(var n={},i=0,e=(t=t.split(" ")).length;i](?:\.[<^>])?|\.[<^>])?[a-z]*)(?=\|)/,alias:"attr-value"},punctuation:{pattern:/(^|[^\\])[|!]=*/,lookbehind:!0}}},"passthrough-block":{pattern:/^(\+{4,})(?:\r?\n|\r)(?:[\s\S]*(?:\r?\n|\r))??\1$/m,inside:{punctuation:/^\++|\++$/}},"literal-block":{pattern:/^(-{4,}|\.{4,})(?:\r?\n|\r)(?:[\s\S]*(?:\r?\n|\r))??\1$/m,inside:{punctuation:/^(?:-+|\.+)|(?:-+|\.+)$/}},"other-block":{pattern:/^(--|\*{4,}|_{4,}|={4,})(?:\r?\n|\r)(?:[\s\S]*(?:\r?\n|\r))??\1$/m,inside:{punctuation:/^(?:-+|\*+|_+|=+)|(?:-+|\*+|_+|=+)$/}},"list-punctuation":{pattern:/(^[ \t]*)(?:-|\*{1,5}|\.{1,5}|(?:[a-z]|\d+)\.|[xvi]+\))(?= )/im,lookbehind:!0,alias:"punctuation"},"list-label":{pattern:/(^[ \t]*)[a-z\d].+(?::{2,4}|;;)(?=\s)/im,lookbehind:!0,alias:"symbol"},"indented-block":{pattern:/((\r?\n|\r)\2)([ \t]+)\S.*(?:(?:\r?\n|\r)\3.+)*(?=\2{2}|$)/,lookbehind:!0},comment:/^\/\/.*/m,title:{pattern:/^.+(?:\r?\n|\r)(?:={3,}|-{3,}|~{3,}|\^{3,}|\+{3,})$|^={1,5} +.+|^\.(?![\s.]).*/m,alias:"important",inside:{punctuation:/^(?:\.|=+)|(?:=+|-+|~+|\^+|\++)$/}},"attribute-entry":{pattern:/^:[^:\r\n]+:(?: .*?(?: \+(?:\r?\n|\r).*?)*)?$/m,alias:"tag"},attributes:n,hr:{pattern:/^'{3,}$/m,alias:"punctuation"},"page-break":{pattern:/^<{3,}$/m,alias:"punctuation"},admonition:{pattern:/^(?:TIP|NOTE|IMPORTANT|WARNING|CAUTION):/m,alias:"keyword"},callout:[{pattern:/(^[ \t]*)/m,lookbehind:!0,alias:"symbol"},{pattern:/<\d+>/,alias:"symbol"}],macro:{pattern:/\b[a-z\d][a-z\d-]*::?(?:(?:\S+)??\[(?:[^\]\\"']|(["'])(?:(?!\1)[^\\]|\\.)*\1|\\.)*\])/,inside:{function:/^[a-z\d-]+(?=:)/,punctuation:/^::?/,attributes:{pattern:/(?:\[(?:[^\]\\"]|(["'])(?:(?!\1)[^\\]|\\.)*\1|\\.)*\])/,inside:n.inside}}},inline:{pattern:/(^|[^\\])(?:(?:\B\[(?:[^\]\\"]|(["'])(?:(?!\2)[^\\]|\\.)*\2|\\.)*\])?(?:\b_(?!\s)(?: _|[^_\\\r\n]|\\.)+(?:(?:\r?\n|\r)(?: _|[^_\\\r\n]|\\.)+)*_\b|\B``(?!\s).+?(?:(?:\r?\n|\r).+?)*''\B|\B`(?!\s)(?:[^`'\s]|\s+\S)+['`]\B|\B(['*+#])(?!\s)(?: \3|(?!\3)[^\\\r\n]|\\.)+(?:(?:\r?\n|\r)(?: \3|(?!\3)[^\\\r\n]|\\.)+)*\3\B)|(?:\[(?:[^\]\\"]|(["'])(?:(?!\4)[^\\]|\\.)*\4|\\.)*\])?(?:(__|\*\*|\+\+\+?|##|\$\$|[~^]).+?(?:(?:\r?\n|\r).+?)*\5|\{[^}\r\n]+\}|\[\[\[?.+?(?:(?:\r?\n|\r).+?)*\]?\]\]|<<.+?(?:(?:\r?\n|\r).+?)*>>|\(\(\(?.+?(?:(?:\r?\n|\r).+?)*\)?\)\)))/m,lookbehind:!0,inside:{attributes:n,url:{pattern:/^(?:\[\[\[?.+?\]?\]\]|<<.+?>>)$/,inside:{punctuation:/^(?:\[\[\[?|<<)|(?:\]\]\]?|>>)$/}},"attribute-ref":{pattern:/^\{.+\}$/,inside:{variable:{pattern:/(^\{)[a-z\d,+_-]+/,lookbehind:!0},operator:/^[=?!#%@$]|!(?=[:}])/,punctuation:/^\{|\}$|::?/}},italic:{pattern:/^(['_])[\s\S]+\1$/,inside:{punctuation:/^(?:''?|__?)|(?:''?|__?)$/}},bold:{pattern:/^\*[\s\S]+\*$/,inside:{punctuation:/^\*\*?|\*\*?$/}},punctuation:/^(?:``?|\+{1,3}|##?|\$\$|[~^]|\(\(\(?)|(?:''?|\+{1,3}|##?|\$\$|[~^`]|\)?\)\))$/}},replacement:{pattern:/\((?:C|TM|R)\)/,alias:"builtin"},entity:/&#?[\da-z]{1,8};/i,"line-continuation":{pattern:/(^| )\+$/m,lookbehind:!0,alias:"punctuation"}};function i(t){for(var n={},i=0,e=(t=t.split(" ")).length;i>=?|<=?|>=?|==?|&&?|&=|\^=?|\|\|?|\|=|\?|:/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+t),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|x[0-9a-fA-F]{1,2}|u[0-9a-fA-F]{4}|U[0-9a-fA-F]{8})/};e.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)\w+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b\w+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+t),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+?)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:a},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:n}},{pattern:/(^|[^\\](?:\\\\)*)(["'])(?:\\[\s\S]|\$\([^)]+\)|`[^`]+`|(?!\2)[^\\])*\2/,lookbehind:!0,greedy:!0,inside:a}],environment:{pattern:RegExp("\\$?"+t),alias:"constant"},variable:a.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|aptitude|apt-cache|apt-get|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:if|then|else|elif|fi|for|while|in|case|esac|function|select|do|done|until)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|break|cd|continue|eval|exec|exit|export|getopts|hash|pwd|readonly|return|shift|test|times|trap|umask|unset|alias|bind|builtin|caller|command|declare|echo|enable|help|let|local|logout|mapfile|printf|read|readarray|source|type|typeset|ulimit|unalias|set|shopt)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:true|false)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|==?|!=?|=~|<<[<-]?|[&\d]?>>|\d?[<>]&?|&[>&]?|\|[&|]?|<=?|>=?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},n.inside=e.languages.bash;for(var s=["comment","function-name","for-or-select","assign-left","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],i=a.variable[1].inside,o=0;o>=?|<=?|>=?|==?|&&?|&=|\^=?|\|\|?|\|=|\?|:/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+t),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|x[0-9a-fA-F]{1,2}|u[0-9a-fA-F]{4}|U[0-9a-fA-F]{8})/};e.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)\w+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b\w+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+t),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+?)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:a},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:n}},{pattern:/(^|[^\\](?:\\\\)*)(["'])(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|(?!\2)[^\\`$])*\2/,lookbehind:!0,greedy:!0,inside:a}],environment:{pattern:RegExp("\\$?"+t),alias:"constant"},variable:a.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|aptitude|apt-cache|apt-get|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:if|then|else|elif|fi|for|while|in|case|esac|function|select|do|done|until)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|break|cd|continue|eval|exec|exit|export|getopts|hash|pwd|readonly|return|shift|test|times|trap|umask|unset|alias|bind|builtin|caller|command|declare|echo|enable|help|let|local|logout|mapfile|printf|read|readarray|source|type|typeset|ulimit|unalias|set|shopt)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:true|false)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|==?|!=?|=~|<<[<-]?|[&\d]?>>|\d?[<>]&?|&[>&]?|\|[&|]?|<=?|>=?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},n.inside=e.languages.bash;for(var s=["comment","function-name","for-or-select","assign-left","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],i=a.variable[1].inside,o=0;o>)?=)/],number:i,operator:/[*\/%+\-&^|]=?|<<=?|>>=?|[!~_=]/,punctuation:/[()',]/}},{pattern:/((?:^|[&(])[ \t]*@?)\w+\b(?:"(?:[\\"]"|[^"])*"(?!")|[^"^&)\r\n]|\^(?:\r\n|[\s\S]))*/im,lookbehind:!0,inside:{keyword:/^\w+\b/i,string:n,parameter:t,label:{pattern:/(^\s*):\S+/m,lookbehind:!0,alias:"property"},variable:r,number:i,operator:/\^/}}],operator:/[&@]/,punctuation:/[()']/}}(); \ No newline at end of file +!function(e){var r=/%%?[~:\w]+%?|!\S+!/,t={pattern:/\/[a-z?]+(?=[ :]|$):?|-[a-z]\b|--[a-z-]+\b/im,alias:"attr-name",inside:{punctuation:/:/}},n=/"(?:[\\"]"|[^"])*"(?!")/,i=/(?:\b|-)\d+\b/;Prism.languages.batch={comment:[/^::.*/m,{pattern:/((?:^|[&(])[ \t]*)rem\b(?:[^^&)\r\n]|\^(?:\r\n|[\s\S]))*/im,lookbehind:!0}],label:{pattern:/^:.*/m,alias:"property"},command:[{pattern:/((?:^|[&(])[ \t]*)for(?: \/[a-z?](?:[ :](?:"[^"]*"|[^\s"/]\S*))?)* \S+ in \([^)]+\) do/im,lookbehind:!0,inside:{keyword:/^for\b|\b(?:in|do)\b/i,string:n,parameter:t,variable:r,number:i,punctuation:/[()',]/}},{pattern:/((?:^|[&(])[ \t]*)if(?: \/[a-z?](?:[ :](?:"[^"]*"|[^\s"/]\S*))?)* (?:not )?(?:cmdextversion \d+|defined \w+|errorlevel \d+|exist \S+|(?:"[^"]*"|[^\s"]\S*)?(?:==| (?:equ|neq|lss|leq|gtr|geq) )(?:"[^"]*"|[^\s"]\S*))/im,lookbehind:!0,inside:{keyword:/^if\b|\b(?:not|cmdextversion|defined|errorlevel|exist)\b/i,string:n,parameter:t,variable:r,number:i,operator:/\^|==|\b(?:equ|neq|lss|leq|gtr|geq)\b/i}},{pattern:/((?:^|[&()])[ \t]*)else\b/im,lookbehind:!0,inside:{keyword:/^else\b/i}},{pattern:/((?:^|[&(])[ \t]*)set(?: \/[a-z](?:[ :](?:"[^"]*"|[^\s"/]\S*))?)* (?:[^^&)\r\n]|\^(?:\r\n|[\s\S]))*/im,lookbehind:!0,inside:{keyword:/^set\b/i,string:n,parameter:t,variable:[r,/\w+(?=(?:[*\/%+\-&^|]|<<|>>)?=)/],number:i,operator:/[*\/%+\-&^|]=?|<<=?|>>=?|[!~_=]/,punctuation:/[()',]/}},{pattern:/((?:^|[&(])[ \t]*@?)\w+\b(?:"(?:[\\"]"|[^"])*"(?!")|[^"^&)\r\n]|\^(?:\r\n|[\s\S]))*/im,lookbehind:!0,inside:{keyword:/^\w+\b/i,string:n,parameter:t,label:{pattern:/(^\s*):\S+/m,lookbehind:!0,alias:"property"},variable:r,number:i,operator:/\^/}}],operator:/[&@]/,punctuation:/[()']/}}(); \ No newline at end of file diff --git a/components/prism-csharp.js b/components/prism-csharp.js index d4bf8c7eb3..0bfbcb7bf4 100644 --- a/components/prism-csharp.js +++ b/components/prism-csharp.js @@ -47,7 +47,7 @@ typeDeclaration: 'class enum interface struct', // contextual keywords // ("var" and "dynamic" are missing because they are used like types) - contextual: 'add alias and ascending async await by descending from get global group into join let nameof not notnull on or orderby partial remove select set unmanaged value when where where', + contextual: 'add alias and ascending async await by descending from get global group into join let nameof not notnull on or orderby partial remove select set unmanaged value when where', // all other keywords other: 'abstract as base break case catch checked const continue default delegate do else event explicit extern finally fixed for foreach goto if implicit in internal is lock namespace new null operator out override params private protected public readonly ref return sealed sizeof stackalloc static switch this throw try typeof unchecked unsafe using virtual volatile while yield' }; diff --git a/components/prism-csharp.min.js b/components/prism-csharp.min.js index 4b3dc42e1d..975126993d 100644 --- a/components/prism-csharp.min.js +++ b/components/prism-csharp.min.js @@ -1 +1 @@ -!function(s){function a(e,s){return e.replace(/<<(\d+)>>/g,function(e,n){return"(?:"+s[+n]+")"})}function t(e,n,s){return RegExp(a(e,n),s||"")}function e(e,n){for(var s=0;s>/g,function(){return"(?:"+e+")"});return e.replace(/<>/g,"[^\\s\\S]")}var n="bool byte char decimal double dynamic float int long object sbyte short string uint ulong ushort var void",r="class enum interface struct",i="add alias and ascending async await by descending from get global group into join let nameof not notnull on or orderby partial remove select set unmanaged value when where where",o="abstract as base break case catch checked const continue default delegate do else event explicit extern finally fixed for foreach goto if implicit in internal is lock namespace new null operator out override params private protected public readonly ref return sealed sizeof stackalloc static switch this throw try typeof unchecked unsafe using virtual volatile while yield";function l(e){return"\\b(?:"+e.trim().replace(/ /g,"|")+")\\b"}var d=l(r),p=RegExp(l(n+" "+r+" "+i+" "+o)),c=l(r+" "+i+" "+o),u=l(n+" "+r+" "+o),g=e("<(?:[^<>;=+\\-*/%&|^]|<>)*>",2),b=e("\\((?:[^()]|<>)*\\)",2),h="@?\\b[A-Za-z_]\\w*\\b",f=a("<<0>>(?:\\s*<<1>>)?",[h,g]),m=a("(?!<<0>>)<<1>>(?:\\s*\\.\\s*<<1>>)*",[c,f]),k="\\[\\s*(?:,\\s*)*\\]",y=a("<<0>>(?:\\s*(?:\\?\\s*)?<<1>>)*(?:\\s*\\?)?",[m,k]),w=a("(?:<<0>>|<<1>>)(?:\\s*(?:\\?\\s*)?<<2>>)*(?:\\s*\\?)?",[a("\\(<<0>>+(?:,<<0>>+)+\\)",[a("[^,()<>[\\];=+\\-*/%&|^]|<<0>>|<<1>>|<<2>>",[g,b,k])]),m,k]),v={keyword:p,punctuation:/[<>()?,.:[\]]/},x="'(?:[^\r\n'\\\\]|\\\\.|\\\\[Uux][\\da-fA-F]{1,8})'",$='"(?:\\\\.|[^\\\\"\r\n])*"';s.languages.csharp=s.languages.extend("clike",{string:[{pattern:t("(^|[^$\\\\])<<0>>",['@"(?:""|\\\\[^]|[^\\\\"])*"(?!")']),lookbehind:!0,greedy:!0},{pattern:t("(^|[^@$\\\\])<<0>>",[$]),lookbehind:!0,greedy:!0},{pattern:RegExp(x),greedy:!0,alias:"character"}],"class-name":[{pattern:t("(\\busing\\s+static\\s+)<<0>>(?=\\s*;)",[m]),lookbehind:!0,inside:v},{pattern:t("(\\busing\\s+<<0>>\\s*=\\s*)<<1>>(?=\\s*;)",[h,w]),lookbehind:!0,inside:v},{pattern:t("(\\busing\\s+)<<0>>(?=\\s*=)",[h]),lookbehind:!0},{pattern:t("(\\b<<0>>\\s+)<<1>>",[d,f]),lookbehind:!0,inside:v},{pattern:t("(\\bcatch\\s*\\(\\s*)<<0>>",[m]),lookbehind:!0,inside:v},{pattern:t("(\\bwhere\\s+)<<0>>",[h]),lookbehind:!0},{pattern:t("(\\b(?:is(?:\\s+not)?|as)\\s+)<<0>>",[y]),lookbehind:!0,inside:v},{pattern:t("\\b<<0>>(?=\\s+(?!<<1>>)<<2>>(?:\\s*[=,;:{)\\]]|\\s+(?:in|when)\\b))",[w,u,h]),inside:v}],keyword:p,number:/(?:\b0(?:x[\da-f_]*[\da-f]|b[01_]*[01])|(?:\B\.\d+(?:_+\d+)*|\b\d+(?:_+\d+)*(?:\.\d+(?:_+\d+)*)?)(?:e[-+]?\d+(?:_+\d+)*)?)(?:ul|lu|[dflmu])?\b/i,operator:/>>=?|<<=?|[-=]>|([-+&|])\1|~|\?\?=?|[-+*/%&|^!=<>]=?/,punctuation:/\?\.?|::|[{}[\];(),.:]/}),s.languages.insertBefore("csharp","number",{range:{pattern:/\.\./,alias:"operator"}}),s.languages.insertBefore("csharp","punctuation",{"named-parameter":{pattern:t("([(,]\\s*)<<0>>(?=\\s*:)",[h]),lookbehind:!0,alias:"punctuation"}}),s.languages.insertBefore("csharp","class-name",{namespace:{pattern:t("(\\b(?:namespace|using)\\s+)<<0>>(?:\\s*\\.\\s*<<0>>)*(?=\\s*[;{])",[h]),lookbehind:!0,inside:{punctuation:/\./}},"type-expression":{pattern:t("(\\b(?:default|typeof|sizeof)\\s*\\(\\s*)(?:[^()\\s]|\\s(?!\\s*\\))|<<0>>)*(?=\\s*\\))",[b]),lookbehind:!0,alias:"class-name",inside:v},"return-type":{pattern:t("<<0>>(?=\\s+(?:<<1>>\\s*(?:=>|[({]|\\.\\s*this\\s*\\[)|this\\s*\\[))",[w,m]),inside:v,alias:"class-name"},"constructor-invocation":{pattern:t("(\\bnew\\s+)<<0>>(?=\\s*[[({])",[w]),lookbehind:!0,inside:v,alias:"class-name"},"generic-method":{pattern:t("<<0>>\\s*<<1>>(?=\\s*\\()",[h,g]),inside:{function:t("^<<0>>",[h]),generic:{pattern:RegExp(g),alias:"class-name",inside:v}}},"type-list":{pattern:t("\\b((?:<<0>>\\s+<<1>>|where\\s+<<2>>)\\s*:\\s*)(?:<<3>>|<<4>>)(?:\\s*,\\s*(?:<<3>>|<<4>>))*(?=\\s*(?:where|[{;]|=>|$))",[d,f,h,w,p.source]),lookbehind:!0,inside:{keyword:p,"class-name":{pattern:RegExp(w),greedy:!0,inside:v},punctuation:/,/}},preprocessor:{pattern:/(^\s*)#.*/m,lookbehind:!0,alias:"property",inside:{directive:{pattern:/(\s*#)\b(?:define|elif|else|endif|endregion|error|if|line|pragma|region|undef|warning)\b/,lookbehind:!0,alias:"keyword"}}}});var _=$+"|"+x,B=a("/(?![*/])|//[^\r\n]*[\r\n]|/\\*(?:[^*]|\\*(?!/))*\\*/|<<0>>",[_]),E=e(a("[^\"'/()]|<<0>>|\\(<>*\\)",[B]),2),R="\\b(?:assembly|event|field|method|module|param|property|return|type)\\b",P=a("<<0>>(?:\\s*\\(<<1>>*\\))?",[m,E]);s.languages.insertBefore("csharp","class-name",{attribute:{pattern:t("((?:^|[^\\s\\w>)?])\\s*\\[\\s*)(?:<<0>>\\s*:\\s*)?<<1>>(?:\\s*,\\s*<<1>>)*(?=\\s*\\])",[R,P]),lookbehind:!0,greedy:!0,inside:{target:{pattern:t("^<<0>>(?=\\s*:)",[R]),alias:"keyword"},"attribute-arguments":{pattern:t("\\(<<0>>*\\)",[E]),inside:s.languages.csharp},"class-name":{pattern:RegExp(m),inside:{punctuation:/\./}},punctuation:/[:,]/}}});var z=":[^}\r\n]+",S=e(a("[^\"'/()]|<<0>>|\\(<>*\\)",[B]),2),j=a("\\{(?!\\{)(?:(?![}:])<<0>>)*<<1>>?\\}",[S,z]),A=e(a("[^\"'/()]|/(?!\\*)|/\\*(?:[^*]|\\*(?!/))*\\*/|<<0>>|\\(<>*\\)",[_]),2),F=a("\\{(?!\\{)(?:(?![}:])<<0>>)*<<1>>?\\}",[A,z]);function U(e,n){return{interpolation:{pattern:t("((?:^|[^{])(?:\\{\\{)*)<<0>>",[e]),lookbehind:!0,inside:{"format-string":{pattern:t("(^\\{(?:(?![}:])<<0>>)*)<<1>>(?=\\}$)",[n,z]),lookbehind:!0,inside:{punctuation:/^:/}},punctuation:/^\{|\}$/,expression:{pattern:/[\s\S]+/,alias:"language-csharp",inside:s.languages.csharp}}},string:/[\s\S]+/}}s.languages.insertBefore("csharp","string",{"interpolation-string":[{pattern:t('(^|[^\\\\])(?:\\$@|@\\$)"(?:""|\\\\[^]|\\{\\{|<<0>>|[^\\\\{"])*"',[j]),lookbehind:!0,greedy:!0,inside:U(j,S)},{pattern:t('(^|[^@\\\\])\\$"(?:\\\\.|\\{\\{|<<0>>|[^\\\\"{])*"',[F]),lookbehind:!0,greedy:!0,inside:U(F,A)}]})}(Prism),Prism.languages.dotnet=Prism.languages.cs=Prism.languages.csharp; \ No newline at end of file +!function(s){function a(e,s){return e.replace(/<<(\d+)>>/g,function(e,n){return"(?:"+s[+n]+")"})}function t(e,n,s){return RegExp(a(e,n),s||"")}function e(e,n){for(var s=0;s>/g,function(){return"(?:"+e+")"});return e.replace(/<>/g,"[^\\s\\S]")}var n="bool byte char decimal double dynamic float int long object sbyte short string uint ulong ushort var void",i="class enum interface struct",r="add alias and ascending async await by descending from get global group into join let nameof not notnull on or orderby partial remove select set unmanaged value when where",o="abstract as base break case catch checked const continue default delegate do else event explicit extern finally fixed for foreach goto if implicit in internal is lock namespace new null operator out override params private protected public readonly ref return sealed sizeof stackalloc static switch this throw try typeof unchecked unsafe using virtual volatile while yield";function l(e){return"\\b(?:"+e.trim().replace(/ /g,"|")+")\\b"}var d=l(i),p=RegExp(l(n+" "+i+" "+r+" "+o)),c=l(i+" "+r+" "+o),u=l(n+" "+i+" "+o),g=e("<(?:[^<>;=+\\-*/%&|^]|<>)*>",2),b=e("\\((?:[^()]|<>)*\\)",2),h="@?\\b[A-Za-z_]\\w*\\b",f=a("<<0>>(?:\\s*<<1>>)?",[h,g]),m=a("(?!<<0>>)<<1>>(?:\\s*\\.\\s*<<1>>)*",[c,f]),k="\\[\\s*(?:,\\s*)*\\]",y=a("<<0>>(?:\\s*(?:\\?\\s*)?<<1>>)*(?:\\s*\\?)?",[m,k]),w=a("(?:<<0>>|<<1>>)(?:\\s*(?:\\?\\s*)?<<2>>)*(?:\\s*\\?)?",[a("\\(<<0>>+(?:,<<0>>+)+\\)",[a("[^,()<>[\\];=+\\-*/%&|^]|<<0>>|<<1>>|<<2>>",[g,b,k])]),m,k]),v={keyword:p,punctuation:/[<>()?,.:[\]]/},x="'(?:[^\r\n'\\\\]|\\\\.|\\\\[Uux][\\da-fA-F]{1,8})'",$='"(?:\\\\.|[^\\\\"\r\n])*"';s.languages.csharp=s.languages.extend("clike",{string:[{pattern:t("(^|[^$\\\\])<<0>>",['@"(?:""|\\\\[^]|[^\\\\"])*"(?!")']),lookbehind:!0,greedy:!0},{pattern:t("(^|[^@$\\\\])<<0>>",[$]),lookbehind:!0,greedy:!0},{pattern:RegExp(x),greedy:!0,alias:"character"}],"class-name":[{pattern:t("(\\busing\\s+static\\s+)<<0>>(?=\\s*;)",[m]),lookbehind:!0,inside:v},{pattern:t("(\\busing\\s+<<0>>\\s*=\\s*)<<1>>(?=\\s*;)",[h,w]),lookbehind:!0,inside:v},{pattern:t("(\\busing\\s+)<<0>>(?=\\s*=)",[h]),lookbehind:!0},{pattern:t("(\\b<<0>>\\s+)<<1>>",[d,f]),lookbehind:!0,inside:v},{pattern:t("(\\bcatch\\s*\\(\\s*)<<0>>",[m]),lookbehind:!0,inside:v},{pattern:t("(\\bwhere\\s+)<<0>>",[h]),lookbehind:!0},{pattern:t("(\\b(?:is(?:\\s+not)?|as)\\s+)<<0>>",[y]),lookbehind:!0,inside:v},{pattern:t("\\b<<0>>(?=\\s+(?!<<1>>)<<2>>(?:\\s*[=,;:{)\\]]|\\s+(?:in|when)\\b))",[w,u,h]),inside:v}],keyword:p,number:/(?:\b0(?:x[\da-f_]*[\da-f]|b[01_]*[01])|(?:\B\.\d+(?:_+\d+)*|\b\d+(?:_+\d+)*(?:\.\d+(?:_+\d+)*)?)(?:e[-+]?\d+(?:_+\d+)*)?)(?:ul|lu|[dflmu])?\b/i,operator:/>>=?|<<=?|[-=]>|([-+&|])\1|~|\?\?=?|[-+*/%&|^!=<>]=?/,punctuation:/\?\.?|::|[{}[\];(),.:]/}),s.languages.insertBefore("csharp","number",{range:{pattern:/\.\./,alias:"operator"}}),s.languages.insertBefore("csharp","punctuation",{"named-parameter":{pattern:t("([(,]\\s*)<<0>>(?=\\s*:)",[h]),lookbehind:!0,alias:"punctuation"}}),s.languages.insertBefore("csharp","class-name",{namespace:{pattern:t("(\\b(?:namespace|using)\\s+)<<0>>(?:\\s*\\.\\s*<<0>>)*(?=\\s*[;{])",[h]),lookbehind:!0,inside:{punctuation:/\./}},"type-expression":{pattern:t("(\\b(?:default|typeof|sizeof)\\s*\\(\\s*)(?:[^()\\s]|\\s(?!\\s*\\))|<<0>>)*(?=\\s*\\))",[b]),lookbehind:!0,alias:"class-name",inside:v},"return-type":{pattern:t("<<0>>(?=\\s+(?:<<1>>\\s*(?:=>|[({]|\\.\\s*this\\s*\\[)|this\\s*\\[))",[w,m]),inside:v,alias:"class-name"},"constructor-invocation":{pattern:t("(\\bnew\\s+)<<0>>(?=\\s*[[({])",[w]),lookbehind:!0,inside:v,alias:"class-name"},"generic-method":{pattern:t("<<0>>\\s*<<1>>(?=\\s*\\()",[h,g]),inside:{function:t("^<<0>>",[h]),generic:{pattern:RegExp(g),alias:"class-name",inside:v}}},"type-list":{pattern:t("\\b((?:<<0>>\\s+<<1>>|where\\s+<<2>>)\\s*:\\s*)(?:<<3>>|<<4>>)(?:\\s*,\\s*(?:<<3>>|<<4>>))*(?=\\s*(?:where|[{;]|=>|$))",[d,f,h,w,p.source]),lookbehind:!0,inside:{keyword:p,"class-name":{pattern:RegExp(w),greedy:!0,inside:v},punctuation:/,/}},preprocessor:{pattern:/(^\s*)#.*/m,lookbehind:!0,alias:"property",inside:{directive:{pattern:/(\s*#)\b(?:define|elif|else|endif|endregion|error|if|line|pragma|region|undef|warning)\b/,lookbehind:!0,alias:"keyword"}}}});var _=$+"|"+x,B=a("/(?![*/])|//[^\r\n]*[\r\n]|/\\*(?:[^*]|\\*(?!/))*\\*/|<<0>>",[_]),E=e(a("[^\"'/()]|<<0>>|\\(<>*\\)",[B]),2),R="\\b(?:assembly|event|field|method|module|param|property|return|type)\\b",P=a("<<0>>(?:\\s*\\(<<1>>*\\))?",[m,E]);s.languages.insertBefore("csharp","class-name",{attribute:{pattern:t("((?:^|[^\\s\\w>)?])\\s*\\[\\s*)(?:<<0>>\\s*:\\s*)?<<1>>(?:\\s*,\\s*<<1>>)*(?=\\s*\\])",[R,P]),lookbehind:!0,greedy:!0,inside:{target:{pattern:t("^<<0>>(?=\\s*:)",[R]),alias:"keyword"},"attribute-arguments":{pattern:t("\\(<<0>>*\\)",[E]),inside:s.languages.csharp},"class-name":{pattern:RegExp(m),inside:{punctuation:/\./}},punctuation:/[:,]/}}});var z=":[^}\r\n]+",S=e(a("[^\"'/()]|<<0>>|\\(<>*\\)",[B]),2),j=a("\\{(?!\\{)(?:(?![}:])<<0>>)*<<1>>?\\}",[S,z]),A=e(a("[^\"'/()]|/(?!\\*)|/\\*(?:[^*]|\\*(?!/))*\\*/|<<0>>|\\(<>*\\)",[_]),2),F=a("\\{(?!\\{)(?:(?![}:])<<0>>)*<<1>>?\\}",[A,z]);function U(e,n){return{interpolation:{pattern:t("((?:^|[^{])(?:\\{\\{)*)<<0>>",[e]),lookbehind:!0,inside:{"format-string":{pattern:t("(^\\{(?:(?![}:])<<0>>)*)<<1>>(?=\\}$)",[n,z]),lookbehind:!0,inside:{punctuation:/^:/}},punctuation:/^\{|\}$/,expression:{pattern:/[\s\S]+/,alias:"language-csharp",inside:s.languages.csharp}}},string:/[\s\S]+/}}s.languages.insertBefore("csharp","string",{"interpolation-string":[{pattern:t('(^|[^\\\\])(?:\\$@|@\\$)"(?:""|\\\\[^]|\\{\\{|<<0>>|[^\\\\{"])*"',[j]),lookbehind:!0,greedy:!0,inside:U(j,S)},{pattern:t('(^|[^@\\\\])\\$"(?:\\\\.|\\{\\{|<<0>>|[^\\\\"{])*"',[F]),lookbehind:!0,greedy:!0,inside:U(F,A)}]})}(Prism),Prism.languages.dotnet=Prism.languages.cs=Prism.languages.csharp; \ No newline at end of file diff --git a/components/prism-eiffel.js b/components/prism-eiffel.js index 7afd7eeada..bd10257334 100644 --- a/components/prism-eiffel.js +++ b/components/prism-eiffel.js @@ -13,7 +13,7 @@ Prism.languages.eiffel = { }, // Single-line string { - pattern: /"(?:%\s*\n\s*%|%.|[^%"\r\n])*"/, + pattern: /"(?:%(?:(?!\n)\s)*\n\s*%|%\S|[^%"\r\n])*"/, greedy: true } ], diff --git a/components/prism-eiffel.min.js b/components/prism-eiffel.min.js index 43f7c14b02..c8fc119b6e 100644 --- a/components/prism-eiffel.min.js +++ b/components/prism-eiffel.min.js @@ -1 +1 @@ -Prism.languages.eiffel={comment:/--.*/,string:[{pattern:/"([^[]*)\[[\s\S]*?\]\1"/,greedy:!0},{pattern:/"([^{]*)\{[\s\S]*?\}\1"/,greedy:!0},{pattern:/"(?:%\s*\n\s*%|%.|[^%"\r\n])*"/,greedy:!0}],char:/'(?:%.|[^%'\r\n])+'/,keyword:/\b(?:across|agent|alias|all|and|attached|as|assign|attribute|check|class|convert|create|Current|debug|deferred|detachable|do|else|elseif|end|ensure|expanded|export|external|feature|from|frozen|if|implies|inherit|inspect|invariant|like|local|loop|not|note|obsolete|old|once|or|Precursor|redefine|rename|require|rescue|Result|retry|select|separate|some|then|undefine|until|variant|Void|when|xor)\b/i,boolean:/\b(?:True|False)\b/i,"class-name":{pattern:/\b[A-Z][\dA-Z_]*\b/,alias:"builtin"},number:[/\b0[xcb][\da-f](?:_*[\da-f])*\b/i,/(?:\b\d(?:_*\d)*)?\.(?:(?:\d(?:_*\d)*)?e[+-]?)?\d(?:_*\d)*\b|\b\d(?:_*\d)*\b\.?/i],punctuation:/:=|<<|>>|\(\||\|\)|->|\.(?=\w)|[{}[\];(),:?]/,operator:/\\\\|\|\.\.\||\.\.|\/[~\/=]?|[><]=?|[-+*^=~]/}; \ No newline at end of file +Prism.languages.eiffel={comment:/--.*/,string:[{pattern:/"([^[]*)\[[\s\S]*?\]\1"/,greedy:!0},{pattern:/"([^{]*)\{[\s\S]*?\}\1"/,greedy:!0},{pattern:/"(?:%(?:(?!\n)\s)*\n\s*%|%\S|[^%"\r\n])*"/,greedy:!0}],char:/'(?:%.|[^%'\r\n])+'/,keyword:/\b(?:across|agent|alias|all|and|attached|as|assign|attribute|check|class|convert|create|Current|debug|deferred|detachable|do|else|elseif|end|ensure|expanded|export|external|feature|from|frozen|if|implies|inherit|inspect|invariant|like|local|loop|not|note|obsolete|old|once|or|Precursor|redefine|rename|require|rescue|Result|retry|select|separate|some|then|undefine|until|variant|Void|when|xor)\b/i,boolean:/\b(?:True|False)\b/i,"class-name":{pattern:/\b[A-Z][\dA-Z_]*\b/,alias:"builtin"},number:[/\b0[xcb][\da-f](?:_*[\da-f])*\b/i,/(?:\b\d(?:_*\d)*)?\.(?:(?:\d(?:_*\d)*)?e[+-]?)?\d(?:_*\d)*\b|\b\d(?:_*\d)*\b\.?/i],punctuation:/:=|<<|>>|\(\||\|\)|->|\.(?=\w)|[{}[\];(),:?]/,operator:/\\\\|\|\.\.\||\.\.|\/[~\/=]?|[><]=?|[-+*^=~]/}; \ No newline at end of file diff --git a/components/prism-elm.js b/components/prism-elm.js index 5c9b095151..2e4a5fb2b9 100644 --- a/components/prism-elm.js +++ b/components/prism-elm.js @@ -11,7 +11,7 @@ Prism.languages.elm = { greedy: true }, { - pattern: /"(?:[^\\"\r\n]|\\(?:[abfnrtv\\"]|\d+|x[0-9a-fA-F]+))*"/, + pattern: /"(?:[^\\"\r\n]|\\.)*"/, greedy: true } ], diff --git a/components/prism-elm.min.js b/components/prism-elm.min.js index 4e0838c704..ee9d8e811c 100644 --- a/components/prism-elm.min.js +++ b/components/prism-elm.min.js @@ -1 +1 @@ -Prism.languages.elm={comment:/--.*|{-[\s\S]*?-}/,char:{pattern:/'(?:[^\\'\r\n]|\\(?:[abfnrtv\\']|\d+|x[0-9a-fA-F]+))'/,greedy:!0},string:[{pattern:/"""[\s\S]*?"""/,greedy:!0},{pattern:/"(?:[^\\"\r\n]|\\(?:[abfnrtv\\"]|\d+|x[0-9a-fA-F]+))*"/,greedy:!0}],import_statement:{pattern:/^\s*import\s+[A-Z]\w*(?:\.[A-Z]\w*)*(?:\s+as\s+(?:[A-Z]\w*)(?:\.[A-Z]\w*)*)?(?:\s+exposing\s+)?/m,inside:{keyword:/\b(?:import|as|exposing)\b/}},keyword:/\b(?:alias|as|case|else|exposing|if|in|infixl|infixr|let|module|of|then|type)\b/,builtin:/\b(?:abs|acos|always|asin|atan|atan2|ceiling|clamp|compare|cos|curry|degrees|e|flip|floor|fromPolar|identity|isInfinite|isNaN|logBase|max|min|negate|never|not|pi|radians|rem|round|sin|sqrt|tan|toFloat|toPolar|toString|truncate|turns|uncurry|xor)\b/,number:/\b(?:\d+(?:\.\d+)?(?:e[+-]?\d+)?|0x[0-9a-f]+)\b/i,operator:/\s\.\s|[+\-/*=.$<>:&|^?%#@~!]{2,}|[+\-/*=$<>:&|^?%#@~!]/,hvariable:/\b(?:[A-Z]\w*\.)*[a-z]\w*\b/,constant:/\b(?:[A-Z]\w*\.)*[A-Z]\w*\b/,punctuation:/[{}[\]|(),.:]/}; \ No newline at end of file +Prism.languages.elm={comment:/--.*|{-[\s\S]*?-}/,char:{pattern:/'(?:[^\\'\r\n]|\\(?:[abfnrtv\\']|\d+|x[0-9a-fA-F]+))'/,greedy:!0},string:[{pattern:/"""[\s\S]*?"""/,greedy:!0},{pattern:/"(?:[^\\"\r\n]|\\.)*"/,greedy:!0}],import_statement:{pattern:/^\s*import\s+[A-Z]\w*(?:\.[A-Z]\w*)*(?:\s+as\s+(?:[A-Z]\w*)(?:\.[A-Z]\w*)*)?(?:\s+exposing\s+)?/m,inside:{keyword:/\b(?:import|as|exposing)\b/}},keyword:/\b(?:alias|as|case|else|exposing|if|in|infixl|infixr|let|module|of|then|type)\b/,builtin:/\b(?:abs|acos|always|asin|atan|atan2|ceiling|clamp|compare|cos|curry|degrees|e|flip|floor|fromPolar|identity|isInfinite|isNaN|logBase|max|min|negate|never|not|pi|radians|rem|round|sin|sqrt|tan|toFloat|toPolar|toString|truncate|turns|uncurry|xor)\b/,number:/\b(?:\d+(?:\.\d+)?(?:e[+-]?\d+)?|0x[0-9a-f]+)\b/i,operator:/\s\.\s|[+\-/*=.$<>:&|^?%#@~!]{2,}|[+\-/*=$<>:&|^?%#@~!]/,hvariable:/\b(?:[A-Z]\w*\.)*[a-z]\w*\b/,constant:/\b(?:[A-Z]\w*\.)*[A-Z]\w*\b/,punctuation:/[{}[\]|(),.:]/}; \ No newline at end of file diff --git a/components/prism-fortran.js b/components/prism-fortran.js index 6cbe762387..e8a1be40eb 100644 --- a/components/prism-fortran.js +++ b/components/prism-fortran.js @@ -4,7 +4,7 @@ Prism.languages.fortran = { alias: 'number' }, 'string': { - pattern: /(?:\w+_)?(['"])(?:\1\1|&(?:\r\n?|\n)(?:\s*!.+(?:\r\n?|\n))?|(?!\1).)*(?:\1|&)/, + pattern: /(?:\w+_)?(['"])(?:\1\1|&(?:\r\n?|\n)(?:[ \t]*!.*(?:\r\n?|\n)|(?![ \t]*!))|(?!\1).)*(?:\1|&)/, inside: { 'comment': { pattern: /(&(?:\r\n?|\n)\s*)!.*/, diff --git a/components/prism-fortran.min.js b/components/prism-fortran.min.js index aa25e86802..180919c5c4 100644 --- a/components/prism-fortran.min.js +++ b/components/prism-fortran.min.js @@ -1 +1 @@ -Prism.languages.fortran={"quoted-number":{pattern:/[BOZ](['"])[A-F0-9]+\1/i,alias:"number"},string:{pattern:/(?:\w+_)?(['"])(?:\1\1|&(?:\r\n?|\n)(?:\s*!.+(?:\r\n?|\n))?|(?!\1).)*(?:\1|&)/,inside:{comment:{pattern:/(&(?:\r\n?|\n)\s*)!.*/,lookbehind:!0}}},comment:{pattern:/!.*/,greedy:!0},boolean:/\.(?:TRUE|FALSE)\.(?:_\w+)?/i,number:/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[ED][+-]?\d+)?(?:_\w+)?/i,keyword:[/\b(?:INTEGER|REAL|DOUBLE ?PRECISION|COMPLEX|CHARACTER|LOGICAL)\b/i,/\b(?:END ?)?(?:BLOCK ?DATA|DO|FILE|FORALL|FUNCTION|IF|INTERFACE|MODULE(?! PROCEDURE)|PROGRAM|SELECT|SUBROUTINE|TYPE|WHERE)\b/i,/\b(?:ALLOCATABLE|ALLOCATE|BACKSPACE|CALL|CASE|CLOSE|COMMON|CONTAINS|CONTINUE|CYCLE|DATA|DEALLOCATE|DIMENSION|DO|END|EQUIVALENCE|EXIT|EXTERNAL|FORMAT|GO ?TO|IMPLICIT(?: NONE)?|INQUIRE|INTENT|INTRINSIC|MODULE PROCEDURE|NAMELIST|NULLIFY|OPEN|OPTIONAL|PARAMETER|POINTER|PRINT|PRIVATE|PUBLIC|READ|RETURN|REWIND|SAVE|SELECT|STOP|TARGET|WHILE|WRITE)\b/i,/\b(?:ASSIGNMENT|DEFAULT|ELEMENTAL|ELSE|ELSEWHERE|ELSEIF|ENTRY|IN|INCLUDE|INOUT|KIND|NULL|ONLY|OPERATOR|OUT|PURE|RECURSIVE|RESULT|SEQUENCE|STAT|THEN|USE)\b/i],operator:[/\*\*|\/\/|=>|[=\/]=|[<>]=?|::|[+\-*=%]|\.[A-Z]+\./i,{pattern:/(^|(?!\().)\/(?!\))/,lookbehind:!0}],punctuation:/\(\/|\/\)|[(),;:&]/}; \ No newline at end of file +Prism.languages.fortran={"quoted-number":{pattern:/[BOZ](['"])[A-F0-9]+\1/i,alias:"number"},string:{pattern:/(?:\w+_)?(['"])(?:\1\1|&(?:\r\n?|\n)(?:[ \t]*!.*(?:\r\n?|\n)|(?![ \t]*!))|(?!\1).)*(?:\1|&)/,inside:{comment:{pattern:/(&(?:\r\n?|\n)\s*)!.*/,lookbehind:!0}}},comment:{pattern:/!.*/,greedy:!0},boolean:/\.(?:TRUE|FALSE)\.(?:_\w+)?/i,number:/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[ED][+-]?\d+)?(?:_\w+)?/i,keyword:[/\b(?:INTEGER|REAL|DOUBLE ?PRECISION|COMPLEX|CHARACTER|LOGICAL)\b/i,/\b(?:END ?)?(?:BLOCK ?DATA|DO|FILE|FORALL|FUNCTION|IF|INTERFACE|MODULE(?! PROCEDURE)|PROGRAM|SELECT|SUBROUTINE|TYPE|WHERE)\b/i,/\b(?:ALLOCATABLE|ALLOCATE|BACKSPACE|CALL|CASE|CLOSE|COMMON|CONTAINS|CONTINUE|CYCLE|DATA|DEALLOCATE|DIMENSION|DO|END|EQUIVALENCE|EXIT|EXTERNAL|FORMAT|GO ?TO|IMPLICIT(?: NONE)?|INQUIRE|INTENT|INTRINSIC|MODULE PROCEDURE|NAMELIST|NULLIFY|OPEN|OPTIONAL|PARAMETER|POINTER|PRINT|PRIVATE|PUBLIC|READ|RETURN|REWIND|SAVE|SELECT|STOP|TARGET|WHILE|WRITE)\b/i,/\b(?:ASSIGNMENT|DEFAULT|ELEMENTAL|ELSE|ELSEWHERE|ELSEIF|ENTRY|IN|INCLUDE|INOUT|KIND|NULL|ONLY|OPERATOR|OUT|PURE|RECURSIVE|RESULT|SEQUENCE|STAT|THEN|USE)\b/i],operator:[/\*\*|\/\/|=>|[=\/]=|[<>]=?|::|[+\-*=%]|\.[A-Z]+\./i,{pattern:/(^|(?!\().)\/(?!\))/,lookbehind:!0}],punctuation:/\(\/|\/\)|[(),;:&]/}; \ No newline at end of file diff --git a/components/prism-ftl.js b/components/prism-ftl.js index 85c039f727..4e5cf00b5c 100644 --- a/components/prism-ftl.js +++ b/components/prism-ftl.js @@ -18,11 +18,11 @@ greedy: true }, { - pattern: RegExp(/("|')(?:(?!\1|\$\{)[^\\]|\\.|\$\{(?:)*?\})*\1/.source.replace(//g, function () { return FTL_EXPR; })), + pattern: RegExp(/("|')(?:(?!\1|\$\{)[^\\]|\\.|\$\{(?:(?!\})(?:))*\})*\1/.source.replace(//g, function () { return FTL_EXPR; })), greedy: true, inside: { 'interpolation': { - pattern: RegExp(/((?:^|[^\\])(?:\\\\)*)\$\{(?:)*?\}/.source.replace(//g, function () { return FTL_EXPR; })), + pattern: RegExp(/((?:^|[^\\])(?:\\\\)*)\$\{(?:(?!\})(?:))*\}/.source.replace(//g, function () { return FTL_EXPR; })), lookbehind: true, inside: { 'interpolation-punctuation': { diff --git a/components/prism-ftl.min.js b/components/prism-ftl.min.js index 8918cb7d84..15862a1b45 100644 --- a/components/prism-ftl.min.js +++ b/components/prism-ftl.min.js @@ -1 +1 @@ -!function(n){for(var i="[^<()\"']|\\((?:)*\\)|<(?!#--)|<#--(?:[^-]|-(?!->))*--\x3e|\"(?:[^\\\\\"]|\\\\.)*\"|'(?:[^\\\\']|\\\\.)*'",e=0;e<2;e++)i=i.replace(//g,function(){return i});i=i.replace(//g,"[^\\s\\S]");var t={comment:/<#--[\s\S]*?-->/,string:[{pattern:/\br("|')(?:(?!\1)[^\\]|\\.)*\1/,greedy:!0},{pattern:RegExp("(\"|')(?:(?!\\1|\\$\\{)[^\\\\]|\\\\.|\\$\\{(?:)*?\\})*\\1".replace(//g,function(){return i})),greedy:!0,inside:{interpolation:{pattern:RegExp("((?:^|[^\\\\])(?:\\\\\\\\)*)\\$\\{(?:)*?\\}".replace(//g,function(){return i})),lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:null}}}}],keyword:/\b(?:as)\b/,boolean:/\b(?:true|false)\b/,"builtin-function":{pattern:/((?:^|[^?])\?\s*)\w+/,lookbehind:!0,alias:"function"},function:/\w+(?=\s*\()/,number:/\d+(?:\.\d+)?/,operator:/\.\.[<*!]?|->|--|\+\+|&&|\|\||\?{1,2}|[-+*/%!=<>]=?|\b(?:gt|gte|lt|lte)\b/,punctuation:/[,;.:()[\]{}]/};t.string[1].inside.interpolation.inside.rest=t,n.languages.ftl={"ftl-comment":{pattern:/^<#--[\s\S]*/,alias:"comment"},"ftl-directive":{pattern:/^<[\s\S]+>$/,inside:{directive:{pattern:/(^<\/?)[#@][a-z]\w*/i,lookbehind:!0,alias:"keyword"},punctuation:/^<\/?|\/?>$/,content:{pattern:/[\s\S]*\S[\s\S]*/,alias:"ftl",inside:t}}},"ftl-interpolation":{pattern:/^\$\{[\s\S]*\}$/,inside:{punctuation:/^\$\{|\}$/,content:{pattern:/[\s\S]*\S[\s\S]*/,alias:"ftl",inside:t}}}},n.hooks.add("before-tokenize",function(e){var t=RegExp("<#--[^]*?--\x3e|)*?>|\\$\\{(?:)*?\\}".replace(//g,function(){return i}),"gi");n.languages["markup-templating"].buildPlaceholders(e,"ftl",t)}),n.hooks.add("after-tokenize",function(e){n.languages["markup-templating"].tokenizePlaceholders(e,"ftl")})}(Prism); \ No newline at end of file +!function(n){for(var i="[^<()\"']|\\((?:)*\\)|<(?!#--)|<#--(?:[^-]|-(?!->))*--\x3e|\"(?:[^\\\\\"]|\\\\.)*\"|'(?:[^\\\\']|\\\\.)*'",e=0;e<2;e++)i=i.replace(//g,function(){return i});i=i.replace(//g,"[^\\s\\S]");var t={comment:/<#--[\s\S]*?-->/,string:[{pattern:/\br("|')(?:(?!\1)[^\\]|\\.)*\1/,greedy:!0},{pattern:RegExp("(\"|')(?:(?!\\1|\\$\\{)[^\\\\]|\\\\.|\\$\\{(?:(?!\\})(?:))*\\})*\\1".replace(//g,function(){return i})),greedy:!0,inside:{interpolation:{pattern:RegExp("((?:^|[^\\\\])(?:\\\\\\\\)*)\\$\\{(?:(?!\\})(?:))*\\}".replace(//g,function(){return i})),lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:null}}}}],keyword:/\b(?:as)\b/,boolean:/\b(?:true|false)\b/,"builtin-function":{pattern:/((?:^|[^?])\?\s*)\w+/,lookbehind:!0,alias:"function"},function:/\w+(?=\s*\()/,number:/\d+(?:\.\d+)?/,operator:/\.\.[<*!]?|->|--|\+\+|&&|\|\||\?{1,2}|[-+*/%!=<>]=?|\b(?:gt|gte|lt|lte)\b/,punctuation:/[,;.:()[\]{}]/};t.string[1].inside.interpolation.inside.rest=t,n.languages.ftl={"ftl-comment":{pattern:/^<#--[\s\S]*/,alias:"comment"},"ftl-directive":{pattern:/^<[\s\S]+>$/,inside:{directive:{pattern:/(^<\/?)[#@][a-z]\w*/i,lookbehind:!0,alias:"keyword"},punctuation:/^<\/?|\/?>$/,content:{pattern:/[\s\S]*\S[\s\S]*/,alias:"ftl",inside:t}}},"ftl-interpolation":{pattern:/^\$\{[\s\S]*\}$/,inside:{punctuation:/^\$\{|\}$/,content:{pattern:/[\s\S]*\S[\s\S]*/,alias:"ftl",inside:t}}}},n.hooks.add("before-tokenize",function(e){var t=RegExp("<#--[^]*?--\x3e|)*?>|\\$\\{(?:)*?\\}".replace(//g,function(){return i}),"gi");n.languages["markup-templating"].buildPlaceholders(e,"ftl",t)}),n.hooks.add("after-tokenize",function(e){n.languages["markup-templating"].tokenizePlaceholders(e,"ftl")})}(Prism); \ No newline at end of file diff --git a/components/prism-gherkin.js b/components/prism-gherkin.js index 9d90042594..ea00710bbc 100644 --- a/components/prism-gherkin.js +++ b/components/prism-gherkin.js @@ -16,7 +16,7 @@ lookbehind: true }, 'feature': { - pattern: /((?:^|\r?\n|\r)[ \t]*)(?:Ability|Ahoy matey!|Arwedd|Aspekt|Besigheid Behoefte|Business Need|Caracteristica|Característica|Egenskab|Egenskap|Eiginleiki|Feature|Fīča|Fitur|Fonctionnalité|Fonksyonalite|Funcionalidade|Funcionalitat|Functionalitate|Funcţionalitate|Funcționalitate|Functionaliteit|Fungsi|Funkcia|Funkcija|Funkcionalitāte|Funkcionalnost|Funkcja|Funksie|Funktionalität|Funktionalitéit|Funzionalità|Hwaet|Hwæt|Jellemző|Karakteristik|laH|Lastnost|Mak|Mogucnost|Mogućnost|Moznosti|Možnosti|OH HAI|Omadus|Ominaisuus|Osobina|Özellik|perbogh|poQbogh malja'|Potrzeba biznesowa|Požadavek|Požiadavka|Pretty much|Qap|Qu'meH 'ut|Savybė|Tính năng|Trajto|Vermoë|Vlastnosť|Właściwość|Značilnost|Δυνατότητα|Λειτουργία|Могућност|Мөмкинлек|Особина|Свойство|Үзенчәлеклелек|Функционал|Функционалност|Функция|Функціонал|תכונה|خاصية|خصوصیت|صلاحیت|کاروبار کی ضرورت|وِیژگی|रूप लेख|ਖਾਸੀਅਤ|ਨਕਸ਼ ਨੁਹਾਰ|ਮੁਹਾਂਦਰਾ|గుణము|ಹೆಚ್ಚಳ|ความต้องการทางธุรกิจ|ความสามารถ|โครงหลัก|기능|フィーチャ|功能|機能):(?:[^:]+(?:\r?\n|\r|$))*/, + pattern: /((?:^|\r?\n|\r)[ \t]*)(?:Ability|Ahoy matey!|Arwedd|Aspekt|Besigheid Behoefte|Business Need|Caracteristica|Característica|Egenskab|Egenskap|Eiginleiki|Feature|Fīča|Fitur|Fonctionnalité|Fonksyonalite|Funcionalidade|Funcionalitat|Functionalitate|Funcţionalitate|Funcționalitate|Functionaliteit|Fungsi|Funkcia|Funkcija|Funkcionalitāte|Funkcionalnost|Funkcja|Funksie|Funktionalität|Funktionalitéit|Funzionalità|Hwaet|Hwæt|Jellemző|Karakteristik|laH|Lastnost|Mak|Mogucnost|Mogućnost|Moznosti|Možnosti|OH HAI|Omadus|Ominaisuus|Osobina|Özellik|perbogh|poQbogh malja'|Potrzeba biznesowa|Požadavek|Požiadavka|Pretty much|Qap|Qu'meH 'ut|Savybė|Tính năng|Trajto|Vermoë|Vlastnosť|Właściwość|Značilnost|Δυνατότητα|Λειτουργία|Могућност|Мөмкинлек|Особина|Свойство|Үзенчәлеклелек|Функционал|Функционалност|Функция|Функціонал|תכונה|خاصية|خصوصیت|صلاحیت|کاروبار کی ضرورت|وِیژگی|रूप लेख|ਖਾਸੀਅਤ|ਨਕਸ਼ ਨੁਹਾਰ|ਮੁਹਾਂਦਰਾ|గుణము|ಹೆಚ್ಚಳ|ความต้องการทางธุรกิจ|ความสามารถ|โครงหลัก|기능|フィーチャ|功能|機能):(?:[^:\r\n]+(?:\r?\n|\r|$))*/, lookbehind: true, inside: { 'important': { diff --git a/components/prism-gherkin.min.js b/components/prism-gherkin.min.js index 0d8ff6acf5..7901eb6985 100644 --- a/components/prism-gherkin.min.js +++ b/components/prism-gherkin.min.js @@ -1 +1 @@ -!function(a){var n="(?:\r?\n|\r)[ \t]*\\|.+\\|.*";Prism.languages.gherkin={pystring:{pattern:/("""|''')[\s\S]+?\1/,alias:"string"},comment:{pattern:/(^[ \t]*)#.*/m,lookbehind:!0},tag:{pattern:/(^[ \t]*)@\S*/m,lookbehind:!0},feature:{pattern:/((?:^|\r?\n|\r)[ \t]*)(?:Ability|Ahoy matey!|Arwedd|Aspekt|Besigheid Behoefte|Business Need|Caracteristica|Característica|Egenskab|Egenskap|Eiginleiki|Feature|Fīča|Fitur|Fonctionnalité|Fonksyonalite|Funcionalidade|Funcionalitat|Functionalitate|Funcţionalitate|Funcționalitate|Functionaliteit|Fungsi|Funkcia|Funkcija|Funkcionalitāte|Funkcionalnost|Funkcja|Funksie|Funktionalität|Funktionalitéit|Funzionalità|Hwaet|Hwæt|Jellemző|Karakteristik|laH|Lastnost|Mak|Mogucnost|Mogućnost|Moznosti|Možnosti|OH HAI|Omadus|Ominaisuus|Osobina|Özellik|perbogh|poQbogh malja'|Potrzeba biznesowa|Požadavek|Požiadavka|Pretty much|Qap|Qu'meH 'ut|Savybė|Tính năng|Trajto|Vermoë|Vlastnosť|Właściwość|Značilnost|Δυνατότητα|Λειτουργία|Могућност|Мөмкинлек|Особина|Свойство|Үзенчәлеклелек|Функционал|Функционалност|Функция|Функціонал|תכונה|خاصية|خصوصیت|صلاحیت|کاروبار کی ضرورت|وِیژگی|रूप लेख|ਖਾਸੀਅਤ|ਨਕਸ਼ ਨੁਹਾਰ|ਮੁਹਾਂਦਰਾ|గుణము|ಹೆಚ್ಚಳ|ความต้องการทางธุรกิจ|ความสามารถ|โครงหลัก|기능|フィーチャ|功能|機能):(?:[^:]+(?:\r?\n|\r|$))*/,lookbehind:!0,inside:{important:{pattern:/(:)[^\r\n]+/,lookbehind:!0},keyword:/[^:\r\n]+:/}},scenario:{pattern:/(^[ \t]*)(?:Abstract Scenario|Abstrakt Scenario|Achtergrond|Aer|Ær|Agtergrond|All y'all|Antecedentes|Antecedents|Atburðarás|Atburðarásir|Awww, look mate|B4|Background|Baggrund|Bakgrund|Bakgrunn|Bakgrunnur|Beispiele|Beispiller|Bối cảnh|Cefndir|Cenario|Cenário|Cenario de Fundo|Cenário de Fundo|Cenarios|Cenários|Contesto|Context|Contexte|Contexto|Conto|Contoh|Contone|Dæmi|Dasar|Dead men tell no tales|Delineacao do Cenario|Delineação do Cenário|Dis is what went down|Dữ liệu|Dyagram senaryo|Dyagram Senaryo|Egzanp|Ejemplos|Eksempler|Ekzemploj|Enghreifftiau|Esbozo do escenario|Escenari|Escenario|Esempi|Esquema de l'escenari|Esquema del escenario|Esquema do Cenario|Esquema do Cenário|Examples|EXAMPLZ|Exempel|Exemple|Exemples|Exemplos|First off|Fono|Forgatókönyv|Forgatókönyv vázlat|Fundo|Geçmiş|ghantoH|Grundlage|Hannergrond|Háttér|Heave to|Istorik|Juhtumid|Keadaan|Khung kịch bản|Khung tình huống|Kịch bản|Koncept|Konsep skenario|Kontèks|Kontekst|Kontekstas|Konteksts|Kontext|Konturo de la scenaro|Latar Belakang|lut|lut chovnatlh|lutmey|Lýsing Atburðarásar|Lýsing Dæma|Menggariskan Senario|MISHUN|MISHUN SRSLY|mo'|Náčrt Scenára|Náčrt Scénáře|Náčrt Scenáru|Oris scenarija|Örnekler|Osnova|Osnova Scenára|Osnova scénáře|Osnutek|Ozadje|Paraugs|Pavyzdžiai|Példák|Piemēri|Plan du scénario|Plan du Scénario|Plan senaryo|Plan Senaryo|Plang vum Szenario|Pozadí|Pozadie|Pozadina|Príklady|Příklady|Primer|Primeri|Primjeri|Przykłady|Raamstsenaarium|Reckon it's like|Rerefons|Scenár|Scénář|Scenarie|Scenarij|Scenarijai|Scenarijaus šablonas|Scenariji|Scenārijs|Scenārijs pēc parauga|Scenarijus|Scenario|Scénario|Scenario Amlinellol|Scenario Outline|Scenario Template|Scenariomal|Scenariomall|Scenarios|Scenariu|Scenariusz|Scenaro|Schema dello scenario|Se ðe|Se the|Se þe|Senario|Senaryo|Senaryo deskripsyon|Senaryo Deskripsyon|Senaryo taslağı|Shiver me timbers|Situācija|Situai|Situasie|Situasie Uiteensetting|Skenario|Skenario konsep|Skica|Structura scenariu|Structură scenariu|Struktura scenarija|Stsenaarium|Swa|Swa hwaer swa|Swa hwær swa|Szablon scenariusza|Szenario|Szenariogrundriss|Tapaukset|Tapaus|Tapausaihio|Taust|Tausta|Template Keadaan|Template Senario|Template Situai|The thing of it is|Tình huống|Variantai|Voorbeelde|Voorbeelden|Wharrimean is|Yo\-ho\-ho|You'll wanna|Założenia|Παραδείγματα|Περιγραφή Σεναρίου|Σενάρια|Σενάριο|Υπόβαθρο|Кереш|Контекст|Концепт|Мисаллар|Мисоллар|Основа|Передумова|Позадина|Предистория|Предыстория|Приклади|Пример|Примери|Примеры|Рамка на сценарий|Скица|Структура сценарија|Структура сценария|Структура сценарію|Сценарий|Сценарий структураси|Сценарийның төзелеше|Сценарији|Сценарио|Сценарій|Тарих|Үрнәкләр|דוגמאות|רקע|תבנית תרחיש|תרחיש|الخلفية|الگوی سناریو|امثلة|پس منظر|زمینه|سناریو|سيناريو|سيناريو مخطط|مثالیں|منظر نامے کا خاکہ|منظرنامہ|نمونه ها|उदाहरण|परिदृश्य|परिदृश्य रूपरेखा|पृष्ठभूमि|ਉਦਾਹਰਨਾਂ|ਪਟਕਥਾ|ਪਟਕਥਾ ਢਾਂਚਾ|ਪਟਕਥਾ ਰੂਪ ਰੇਖਾ|ਪਿਛੋਕੜ|ఉదాహరణలు|కథనం|నేపథ్యం|సన్నివేశం|ಉದಾಹರಣೆಗಳು|ಕಥಾಸಾರಾಂಶ|ವಿವರಣೆ|ಹಿನ್ನೆಲೆ|โครงสร้างของเหตุการณ์|ชุดของตัวอย่าง|ชุดของเหตุการณ์|แนวคิด|สรุปเหตุการณ์|เหตุการณ์|배경|시나리오|시나리오 개요|예|サンプル|シナリオ|シナリオアウトライン|シナリオテンプレ|シナリオテンプレート|テンプレ|例|例子|剧本|剧本大纲|劇本|劇本大綱|场景|场景大纲|場景|場景大綱|背景):[^:\r\n]*/m,lookbehind:!0,inside:{important:{pattern:/(:)[^\r\n]*/,lookbehind:!0},keyword:/[^:\r\n]+:/}},"table-body":{pattern:RegExp("("+n+")(?:"+n+")+"),lookbehind:!0,inside:{outline:{pattern:/<[^>]+?>/,alias:"variable"},td:{pattern:/\s*[^\s|][^|]*/,alias:"string"},punctuation:/\|/}},"table-head":{pattern:RegExp(n),inside:{th:{pattern:/\s*[^\s|][^|]*/,alias:"variable"},punctuation:/\|/}},atrule:{pattern:/(^[ \t]+)(?:'ach|'a|'ej|7|a|A také|A taktiež|A tiež|A zároveň|Aber|Ac|Adott|Akkor|Ak|Aleshores|Ale|Ali|Allora|Alors|Als|Ama|Amennyiben|Amikor|Ampak|an|AN|Ananging|And y'all|And|Angenommen|Anrhegedig a|An|Apabila|Atès|Atesa|Atunci|Avast!|Aye|A|awer|Bagi|Banjur|Bet|Biết|Blimey!|Buh|But at the end of the day I reckon|But y'all|But|BUT|Cal|Când|Cando|Cand|Ce|Cuando|Če|Ða ðe|Ða|Dadas|Dada|Dados|Dado|DaH ghu' bejlu'|dann|Dann|Dano|Dan|Dar|Dat fiind|Data|Date fiind|Date|Dati fiind|Dati|Daţi fiind|Dați fiind|Dato|DEN|Den youse gotta|Dengan|De|Diberi|Diyelim ki|Donada|Donat|Donitaĵo|Do|Dun|Duota|Ðurh|Eeldades|Ef|Eğer ki|Entao|Então|Entón|Entonces|En|Epi|E|És|Etant donnée|Etant donné|Et|Étant données|Étant donnée|Étant donné|Etant données|Etant donnés|Étant donnés|Fakat|Gangway!|Gdy|Gegeben seien|Gegeben sei|Gegeven|Gegewe|ghu' noblu'|Gitt|Given y'all|Given|Givet|Givun|Ha|Cho|I CAN HAZ|In|Ir|It's just unbelievable|I|Ja|Jeśli|Jeżeli|Kadar|Kada|Kad|Kai|Kaj|Když|Keď|Kemudian|Ketika|Khi|Kiedy|Ko|Kuid|Kui|Kun|Lan|latlh|Le sa a|Let go and haul|Le|Lè sa a|Lè|Logo|Lorsqu'<|Lorsque|mä|Maar|Mais|Mając|Majd|Maka|Manawa|Mas|Ma|Menawa|Men|Mutta|Nalikaning|Nalika|Nanging|Når|När|Nato|Nhưng|Niin|Njuk|O zaman|Og|Och|Oletetaan|Onda|Ond|Oraz|Pak|Pero|Però|Podano|Pokiaľ|Pokud|Potem|Potom|Privzeto|Pryd|qaSDI'|Quando|Quand|Quan|Så|Sed|Se|Siis|Sipoze ke|Sipoze Ke|Sipoze|Si|Şi|Și|Soit|Stel|Tada|Tad|Takrat|Tak|Tapi|Ter|Tetapi|Tha the|Tha|Then y'all|Then|Thì|Thurh|Toda|Too right|ugeholl|Und|Un|Và|vaj|Vendar|Ve|wann|Wanneer|WEN|Wenn|When y'all|When|Wtedy|Wun|Y'know|Yeah nah|Yna|Youse know like when|Youse know when youse got|Y|Za predpokladu|Za předpokladu|Zadani|Zadano|Zadan|Zadate|Zadato|Zakładając|Zaradi|Zatati|Þa þe|Þa|Þá|Þegar|Þurh|Αλλά|Δεδομένου|Και|Όταν|Τότε|А також|Агар|Але|Али|Аммо|А|Әгәр|Әйтик|Әмма|Бирок|Ва|Вә|Дадено|Дано|Допустим|Если|Задате|Задати|Задато|И|І|К тому же|Када|Кад|Когато|Когда|Коли|Ләкин|Лекин|Нәтиҗәдә|Нехай|Но|Онда|Припустимо, що|Припустимо|Пусть|Также|Та|Тогда|Тоді|То|Унда|Һәм|Якщо|אבל|אזי|אז|בהינתן|וגם|כאשר|آنگاه|اذاً|اگر|اما|اور|با فرض|بالفرض|بفرض|پھر|تب|ثم|جب|عندما|فرض کیا|لكن|لیکن|متى|هنگامی|و|अगर|और|कदा|किन्तु|चूंकि|जब|तथा|तदा|तब|परन्तु|पर|यदि|ਅਤੇ|ਜਦੋਂ|ਜਿਵੇਂ ਕਿ|ਜੇਕਰ|ਤਦ|ਪਰ|అప్పుడు|ఈ పరిస్థితిలో|కాని|చెప్పబడినది|మరియు|ಆದರೆ|ನಂತರ|ನೀಡಿದ|ಮತ್ತು|ಸ್ಥಿತಿಯನ್ನು|กำหนดให้|ดังนั้น|แต่|เมื่อ|และ|그러면<|그리고<|단<|만약<|만일<|먼저<|조건<|하지만<|かつ<|しかし<|ただし<|ならば<|もし<|並且<|但し<|但是<|假如<|假定<|假設<|假设<|前提<|同时<|同時<|并且<|当<|當<|而且<|那么<|那麼<)(?=[ \t])/m,lookbehind:!0},string:{pattern:/"(?:\\.|[^"\\\r\n])*"|'(?:\\.|[^'\\\r\n])*'/,inside:{outline:{pattern:/<[^>]+?>/,alias:"variable"}}},outline:{pattern:/<[^>]+?>/,alias:"variable"}}}(); \ No newline at end of file +!function(a){var n="(?:\r?\n|\r)[ \t]*\\|.+\\|.*";Prism.languages.gherkin={pystring:{pattern:/("""|''')[\s\S]+?\1/,alias:"string"},comment:{pattern:/(^[ \t]*)#.*/m,lookbehind:!0},tag:{pattern:/(^[ \t]*)@\S*/m,lookbehind:!0},feature:{pattern:/((?:^|\r?\n|\r)[ \t]*)(?:Ability|Ahoy matey!|Arwedd|Aspekt|Besigheid Behoefte|Business Need|Caracteristica|Característica|Egenskab|Egenskap|Eiginleiki|Feature|Fīča|Fitur|Fonctionnalité|Fonksyonalite|Funcionalidade|Funcionalitat|Functionalitate|Funcţionalitate|Funcționalitate|Functionaliteit|Fungsi|Funkcia|Funkcija|Funkcionalitāte|Funkcionalnost|Funkcja|Funksie|Funktionalität|Funktionalitéit|Funzionalità|Hwaet|Hwæt|Jellemző|Karakteristik|laH|Lastnost|Mak|Mogucnost|Mogućnost|Moznosti|Možnosti|OH HAI|Omadus|Ominaisuus|Osobina|Özellik|perbogh|poQbogh malja'|Potrzeba biznesowa|Požadavek|Požiadavka|Pretty much|Qap|Qu'meH 'ut|Savybė|Tính năng|Trajto|Vermoë|Vlastnosť|Właściwość|Značilnost|Δυνατότητα|Λειτουργία|Могућност|Мөмкинлек|Особина|Свойство|Үзенчәлеклелек|Функционал|Функционалност|Функция|Функціонал|תכונה|خاصية|خصوصیت|صلاحیت|کاروبار کی ضرورت|وِیژگی|रूप लेख|ਖਾਸੀਅਤ|ਨਕਸ਼ ਨੁਹਾਰ|ਮੁਹਾਂਦਰਾ|గుణము|ಹೆಚ್ಚಳ|ความต้องการทางธุรกิจ|ความสามารถ|โครงหลัก|기능|フィーチャ|功能|機能):(?:[^:\r\n]+(?:\r?\n|\r|$))*/,lookbehind:!0,inside:{important:{pattern:/(:)[^\r\n]+/,lookbehind:!0},keyword:/[^:\r\n]+:/}},scenario:{pattern:/(^[ \t]*)(?:Abstract Scenario|Abstrakt Scenario|Achtergrond|Aer|Ær|Agtergrond|All y'all|Antecedentes|Antecedents|Atburðarás|Atburðarásir|Awww, look mate|B4|Background|Baggrund|Bakgrund|Bakgrunn|Bakgrunnur|Beispiele|Beispiller|Bối cảnh|Cefndir|Cenario|Cenário|Cenario de Fundo|Cenário de Fundo|Cenarios|Cenários|Contesto|Context|Contexte|Contexto|Conto|Contoh|Contone|Dæmi|Dasar|Dead men tell no tales|Delineacao do Cenario|Delineação do Cenário|Dis is what went down|Dữ liệu|Dyagram senaryo|Dyagram Senaryo|Egzanp|Ejemplos|Eksempler|Ekzemploj|Enghreifftiau|Esbozo do escenario|Escenari|Escenario|Esempi|Esquema de l'escenari|Esquema del escenario|Esquema do Cenario|Esquema do Cenário|Examples|EXAMPLZ|Exempel|Exemple|Exemples|Exemplos|First off|Fono|Forgatókönyv|Forgatókönyv vázlat|Fundo|Geçmiş|ghantoH|Grundlage|Hannergrond|Háttér|Heave to|Istorik|Juhtumid|Keadaan|Khung kịch bản|Khung tình huống|Kịch bản|Koncept|Konsep skenario|Kontèks|Kontekst|Kontekstas|Konteksts|Kontext|Konturo de la scenaro|Latar Belakang|lut|lut chovnatlh|lutmey|Lýsing Atburðarásar|Lýsing Dæma|Menggariskan Senario|MISHUN|MISHUN SRSLY|mo'|Náčrt Scenára|Náčrt Scénáře|Náčrt Scenáru|Oris scenarija|Örnekler|Osnova|Osnova Scenára|Osnova scénáře|Osnutek|Ozadje|Paraugs|Pavyzdžiai|Példák|Piemēri|Plan du scénario|Plan du Scénario|Plan senaryo|Plan Senaryo|Plang vum Szenario|Pozadí|Pozadie|Pozadina|Príklady|Příklady|Primer|Primeri|Primjeri|Przykłady|Raamstsenaarium|Reckon it's like|Rerefons|Scenár|Scénář|Scenarie|Scenarij|Scenarijai|Scenarijaus šablonas|Scenariji|Scenārijs|Scenārijs pēc parauga|Scenarijus|Scenario|Scénario|Scenario Amlinellol|Scenario Outline|Scenario Template|Scenariomal|Scenariomall|Scenarios|Scenariu|Scenariusz|Scenaro|Schema dello scenario|Se ðe|Se the|Se þe|Senario|Senaryo|Senaryo deskripsyon|Senaryo Deskripsyon|Senaryo taslağı|Shiver me timbers|Situācija|Situai|Situasie|Situasie Uiteensetting|Skenario|Skenario konsep|Skica|Structura scenariu|Structură scenariu|Struktura scenarija|Stsenaarium|Swa|Swa hwaer swa|Swa hwær swa|Szablon scenariusza|Szenario|Szenariogrundriss|Tapaukset|Tapaus|Tapausaihio|Taust|Tausta|Template Keadaan|Template Senario|Template Situai|The thing of it is|Tình huống|Variantai|Voorbeelde|Voorbeelden|Wharrimean is|Yo\-ho\-ho|You'll wanna|Założenia|Παραδείγματα|Περιγραφή Σεναρίου|Σενάρια|Σενάριο|Υπόβαθρο|Кереш|Контекст|Концепт|Мисаллар|Мисоллар|Основа|Передумова|Позадина|Предистория|Предыстория|Приклади|Пример|Примери|Примеры|Рамка на сценарий|Скица|Структура сценарија|Структура сценария|Структура сценарію|Сценарий|Сценарий структураси|Сценарийның төзелеше|Сценарији|Сценарио|Сценарій|Тарих|Үрнәкләр|דוגמאות|רקע|תבנית תרחיש|תרחיש|الخلفية|الگوی سناریو|امثلة|پس منظر|زمینه|سناریو|سيناريو|سيناريو مخطط|مثالیں|منظر نامے کا خاکہ|منظرنامہ|نمونه ها|उदाहरण|परिदृश्य|परिदृश्य रूपरेखा|पृष्ठभूमि|ਉਦਾਹਰਨਾਂ|ਪਟਕਥਾ|ਪਟਕਥਾ ਢਾਂਚਾ|ਪਟਕਥਾ ਰੂਪ ਰੇਖਾ|ਪਿਛੋਕੜ|ఉదాహరణలు|కథనం|నేపథ్యం|సన్నివేశం|ಉದಾಹರಣೆಗಳು|ಕಥಾಸಾರಾಂಶ|ವಿವರಣೆ|ಹಿನ್ನೆಲೆ|โครงสร้างของเหตุการณ์|ชุดของตัวอย่าง|ชุดของเหตุการณ์|แนวคิด|สรุปเหตุการณ์|เหตุการณ์|배경|시나리오|시나리오 개요|예|サンプル|シナリオ|シナリオアウトライン|シナリオテンプレ|シナリオテンプレート|テンプレ|例|例子|剧本|剧本大纲|劇本|劇本大綱|场景|场景大纲|場景|場景大綱|背景):[^:\r\n]*/m,lookbehind:!0,inside:{important:{pattern:/(:)[^\r\n]*/,lookbehind:!0},keyword:/[^:\r\n]+:/}},"table-body":{pattern:RegExp("("+n+")(?:"+n+")+"),lookbehind:!0,inside:{outline:{pattern:/<[^>]+?>/,alias:"variable"},td:{pattern:/\s*[^\s|][^|]*/,alias:"string"},punctuation:/\|/}},"table-head":{pattern:RegExp(n),inside:{th:{pattern:/\s*[^\s|][^|]*/,alias:"variable"},punctuation:/\|/}},atrule:{pattern:/(^[ \t]+)(?:'ach|'a|'ej|7|a|A také|A taktiež|A tiež|A zároveň|Aber|Ac|Adott|Akkor|Ak|Aleshores|Ale|Ali|Allora|Alors|Als|Ama|Amennyiben|Amikor|Ampak|an|AN|Ananging|And y'all|And|Angenommen|Anrhegedig a|An|Apabila|Atès|Atesa|Atunci|Avast!|Aye|A|awer|Bagi|Banjur|Bet|Biết|Blimey!|Buh|But at the end of the day I reckon|But y'all|But|BUT|Cal|Când|Cando|Cand|Ce|Cuando|Če|Ða ðe|Ða|Dadas|Dada|Dados|Dado|DaH ghu' bejlu'|dann|Dann|Dano|Dan|Dar|Dat fiind|Data|Date fiind|Date|Dati fiind|Dati|Daţi fiind|Dați fiind|Dato|DEN|Den youse gotta|Dengan|De|Diberi|Diyelim ki|Donada|Donat|Donitaĵo|Do|Dun|Duota|Ðurh|Eeldades|Ef|Eğer ki|Entao|Então|Entón|Entonces|En|Epi|E|És|Etant donnée|Etant donné|Et|Étant données|Étant donnée|Étant donné|Etant données|Etant donnés|Étant donnés|Fakat|Gangway!|Gdy|Gegeben seien|Gegeben sei|Gegeven|Gegewe|ghu' noblu'|Gitt|Given y'all|Given|Givet|Givun|Ha|Cho|I CAN HAZ|In|Ir|It's just unbelievable|I|Ja|Jeśli|Jeżeli|Kadar|Kada|Kad|Kai|Kaj|Když|Keď|Kemudian|Ketika|Khi|Kiedy|Ko|Kuid|Kui|Kun|Lan|latlh|Le sa a|Let go and haul|Le|Lè sa a|Lè|Logo|Lorsqu'<|Lorsque|mä|Maar|Mais|Mając|Majd|Maka|Manawa|Mas|Ma|Menawa|Men|Mutta|Nalikaning|Nalika|Nanging|Når|När|Nato|Nhưng|Niin|Njuk|O zaman|Og|Och|Oletetaan|Onda|Ond|Oraz|Pak|Pero|Però|Podano|Pokiaľ|Pokud|Potem|Potom|Privzeto|Pryd|qaSDI'|Quando|Quand|Quan|Så|Sed|Se|Siis|Sipoze ke|Sipoze Ke|Sipoze|Si|Şi|Și|Soit|Stel|Tada|Tad|Takrat|Tak|Tapi|Ter|Tetapi|Tha the|Tha|Then y'all|Then|Thì|Thurh|Toda|Too right|ugeholl|Und|Un|Và|vaj|Vendar|Ve|wann|Wanneer|WEN|Wenn|When y'all|When|Wtedy|Wun|Y'know|Yeah nah|Yna|Youse know like when|Youse know when youse got|Y|Za predpokladu|Za předpokladu|Zadani|Zadano|Zadan|Zadate|Zadato|Zakładając|Zaradi|Zatati|Þa þe|Þa|Þá|Þegar|Þurh|Αλλά|Δεδομένου|Και|Όταν|Τότε|А також|Агар|Але|Али|Аммо|А|Әгәр|Әйтик|Әмма|Бирок|Ва|Вә|Дадено|Дано|Допустим|Если|Задате|Задати|Задато|И|І|К тому же|Када|Кад|Когато|Когда|Коли|Ләкин|Лекин|Нәтиҗәдә|Нехай|Но|Онда|Припустимо, що|Припустимо|Пусть|Также|Та|Тогда|Тоді|То|Унда|Һәм|Якщо|אבל|אזי|אז|בהינתן|וגם|כאשר|آنگاه|اذاً|اگر|اما|اور|با فرض|بالفرض|بفرض|پھر|تب|ثم|جب|عندما|فرض کیا|لكن|لیکن|متى|هنگامی|و|अगर|और|कदा|किन्तु|चूंकि|जब|तथा|तदा|तब|परन्तु|पर|यदि|ਅਤੇ|ਜਦੋਂ|ਜਿਵੇਂ ਕਿ|ਜੇਕਰ|ਤਦ|ਪਰ|అప్పుడు|ఈ పరిస్థితిలో|కాని|చెప్పబడినది|మరియు|ಆದರೆ|ನಂತರ|ನೀಡಿದ|ಮತ್ತು|ಸ್ಥಿತಿಯನ್ನು|กำหนดให้|ดังนั้น|แต่|เมื่อ|และ|그러면<|그리고<|단<|만약<|만일<|먼저<|조건<|하지만<|かつ<|しかし<|ただし<|ならば<|もし<|並且<|但し<|但是<|假如<|假定<|假設<|假设<|前提<|同时<|同時<|并且<|当<|當<|而且<|那么<|那麼<)(?=[ \t])/m,lookbehind:!0},string:{pattern:/"(?:\\.|[^"\\\r\n])*"|'(?:\\.|[^'\\\r\n])*'/,inside:{outline:{pattern:/<[^>]+?>/,alias:"variable"}}},outline:{pattern:/<[^>]+?>/,alias:"variable"}}}(); \ No newline at end of file diff --git a/components/prism-haml.js b/components/prism-haml.js index 8ac9900ade..cbad48cab9 100644 --- a/components/prism-haml.js +++ b/components/prism-haml.js @@ -52,14 +52,14 @@ }, 'tag': { // Allows for one nested group of braces - pattern: /((?:^|\r?\n|\r)[\t ]*)[%.#][\w\-#.]*[\w\-](?:\([^)]+\)|\{(?:\{[^}]+\}|[^}])+\}|\[[^\]]+\])*[\/<>]*/, + pattern: /((?:^|\r?\n|\r)[\t ]*)[%.#][\w\-#.]*[\w\-](?:\([^)]+\)|\{(?:\{[^}]+\}|[^{}])+\}|\[[^\]]+\])*[\/<>]*/, lookbehind: true, inside: { 'attributes': [ { // Lookbehind tries to prevent interpolations from breaking it all // Allows for one nested group of braces - pattern: /(^|[^#])\{(?:\{[^}]+\}|[^}])+\}/, + pattern: /(^|[^#])\{(?:\{[^}]+\}|[^{}])+\}/, lookbehind: true, inside: Prism.languages.ruby }, diff --git a/components/prism-haml.min.js b/components/prism-haml.min.js index 86a04dcc11..349bfb2393 100644 --- a/components/prism-haml.min.js +++ b/components/prism-haml.min.js @@ -1 +1 @@ -!function(e){e.languages.haml={"multiline-comment":{pattern:/((?:^|\r?\n|\r)([\t ]*))(?:\/|-#).*(?:(?:\r?\n|\r)\2[\t ]+.+)*/,lookbehind:!0,alias:"comment"},"multiline-code":[{pattern:/((?:^|\r?\n|\r)([\t ]*)(?:[~-]|[&!]?=)).*,[\t ]*(?:(?:\r?\n|\r)\2[\t ]+.*,[\t ]*)*(?:(?:\r?\n|\r)\2[\t ]+.+)/,lookbehind:!0,inside:e.languages.ruby},{pattern:/((?:^|\r?\n|\r)([\t ]*)(?:[~-]|[&!]?=)).*\|[\t ]*(?:(?:\r?\n|\r)\2[\t ]+.*\|[\t ]*)*/,lookbehind:!0,inside:e.languages.ruby}],filter:{pattern:/((?:^|\r?\n|\r)([\t ]*)):[\w-]+(?:(?:\r?\n|\r)(?:\2[\t ]+.+|\s*?(?=\r?\n|\r)))+/,lookbehind:!0,inside:{"filter-name":{pattern:/^:[\w-]+/,alias:"variable"}}},markup:{pattern:/((?:^|\r?\n|\r)[\t ]*)<.+/,lookbehind:!0,inside:e.languages.markup},doctype:{pattern:/((?:^|\r?\n|\r)[\t ]*)!!!(?: .+)?/,lookbehind:!0},tag:{pattern:/((?:^|\r?\n|\r)[\t ]*)[%.#][\w\-#.]*[\w\-](?:\([^)]+\)|\{(?:\{[^}]+\}|[^}])+\}|\[[^\]]+\])*[\/<>]*/,lookbehind:!0,inside:{attributes:[{pattern:/(^|[^#])\{(?:\{[^}]+\}|[^}])+\}/,lookbehind:!0,inside:e.languages.ruby},{pattern:/\([^)]+\)/,inside:{"attr-value":{pattern:/(=\s*)(?:"(?:\\.|[^\\"\r\n])*"|[^)\s]+)/,lookbehind:!0},"attr-name":/[\w:-]+(?=\s*!?=|\s*[,)])/,punctuation:/[=(),]/}},{pattern:/\[[^\]]+\]/,inside:e.languages.ruby}],punctuation:/[<>]/}},code:{pattern:/((?:^|\r?\n|\r)[\t ]*(?:[~-]|[&!]?=)).+/,lookbehind:!0,inside:e.languages.ruby},interpolation:{pattern:/#\{[^}]+\}/,inside:{delimiter:{pattern:/^#\{|\}$/,alias:"punctuation"},rest:e.languages.ruby}},punctuation:{pattern:/((?:^|\r?\n|\r)[\t ]*)[~=\-&!]+/,lookbehind:!0}};for(var t=["css",{filter:"coffee",language:"coffeescript"},"erb","javascript","less","markdown","ruby","scss","textile"],n={},r=0,a=t.length;r]*/,lookbehind:!0,inside:{attributes:[{pattern:/(^|[^#])\{(?:\{[^}]+\}|[^{}])+\}/,lookbehind:!0,inside:e.languages.ruby},{pattern:/\([^)]+\)/,inside:{"attr-value":{pattern:/(=\s*)(?:"(?:\\.|[^\\"\r\n])*"|[^)\s]+)/,lookbehind:!0},"attr-name":/[\w:-]+(?=\s*!?=|\s*[,)])/,punctuation:/[=(),]/}},{pattern:/\[[^\]]+\]/,inside:e.languages.ruby}],punctuation:/[<>]/}},code:{pattern:/((?:^|\r?\n|\r)[\t ]*(?:[~-]|[&!]?=)).+/,lookbehind:!0,inside:e.languages.ruby},interpolation:{pattern:/#\{[^}]+\}/,inside:{delimiter:{pattern:/^#\{|\}$/,alias:"punctuation"},rest:e.languages.ruby}},punctuation:{pattern:/((?:^|\r?\n|\r)[\t ]*)[~=\-&!]+/,lookbehind:!0}};for(var t=["css",{filter:"coffee",language:"coffeescript"},"erb","javascript","less","markdown","ruby","scss","textile"],n={},r=0,a=t.length;r@\[\\\]^`{|}~?:]/}}}},number:/\b0x[\da-f]+\b|\b\d+\.?\d*(?:e[+-]?\d+)?/i,boolean:/\b(?:true|false)\b/i,punctuation:/[=\[\]{}]/}; \ No newline at end of file +Prism.languages.hcl={comment:/(?:\/\/|#).*|\/\*[\s\S]*?(?:\*\/|$)/,heredoc:{pattern:/<<-?(\w+)[\s\S]*?^\s*\1/m,greedy:!0,alias:"string"},keyword:[{pattern:/(?:resource|data)\s+(?:"(?:\\[\s\S]|[^\\"])*")(?=\s+"[\w-]+"\s+{)/i,inside:{type:{pattern:/(resource|data|\s+)(?:"(?:\\[\s\S]|[^\\"])*")/i,lookbehind:!0,alias:"variable"}}},{pattern:/(?:provider|provisioner|variable|output|module|backend)\s+(?:[\w-]+|"(?:\\[\s\S]|[^\\"])*")\s+(?={)/i,inside:{type:{pattern:/(provider|provisioner|variable|output|module|backend)\s+(?:[\w-]+|"(?:\\[\s\S]|[^\\"])*")\s+/i,lookbehind:!0,alias:"variable"}}},/[\w-]+(?=\s+{)/],property:[/[\w-\.]+(?=\s*=(?!=))/,/"(?:\\[\s\S]|[^\\"])+"(?=\s*[:=])/],string:{pattern:/"(?:[^\\$"]|\\[\s\S]|\$(?:(?=")|\$+(?!\$)|[^"${])|\$\{(?:[^{}"]|"(?:[^\\"]|\\[\s\S])*")*\})*"/,greedy:!0,inside:{interpolation:{pattern:/(^|[^$])\$\{(?:[^{}"]|"(?:[^\\"]|\\[\s\S])*")*\}/,lookbehind:!0,inside:{type:{pattern:/(\b(?:terraform|var|self|count|module|path|data|local)\b\.)[\w\*]+/i,lookbehind:!0,alias:"variable"},keyword:/\b(?:terraform|var|self|count|module|path|data|local)\b/i,function:/\w+(?=\()/,string:{pattern:/"(?:\\[\s\S]|[^\\"])*"/,greedy:!0},number:/\b0x[\da-f]+\b|\b\d+\.?\d*(?:e[+-]?\d+)?/i,punctuation:/[!\$#%&'()*+,.\/;<=>@\[\\\]^`{|}~?:]/}}}},number:/\b0x[\da-f]+\b|\b\d+\.?\d*(?:e[+-]?\d+)?/i,boolean:/\b(?:true|false)\b/i,punctuation:/[=\[\]{}]/}; \ No newline at end of file diff --git a/components/prism-lisp.js b/components/prism-lisp.js index 3ac0710421..66b499084f 100644 --- a/components/prism-lisp.js +++ b/components/prism-lisp.js @@ -114,7 +114,7 @@ } }, lambda: { - pattern: RegExp(par + 'lambda\\s+\\((?:&?' + symbol + '\\s*)*\\)'), + pattern: RegExp(par + 'lambda\\s+\\(\\s*(?:&?' + symbol + '(?:\\s+&?' + symbol + ')*\\s*)?\\)'), lookbehind: true, inside: { keyword: /^lambda/, diff --git a/components/prism-lisp.min.js b/components/prism-lisp.min.js index 6f721b69b6..886db79e73 100644 --- a/components/prism-lisp.min.js +++ b/components/prism-lisp.min.js @@ -1 +1 @@ -!function(e){function n(e){return RegExp("(\\()"+e+"(?=[\\s\\)])")}function a(e){return RegExp("([\\s([])"+e+"(?=[\\s)])")}var t="[-+*/_~!@$%^=<>{}\\w]+",r="(\\()",i="(?=\\))",s="(?=\\s)",o={heading:{pattern:/;;;.*/,alias:["comment","title"]},comment:/;.*/,string:{pattern:/"(?:[^"\\]|\\.)*"/,greedy:!0,inside:{argument:/[-A-Z]+(?=[.,\s])/,symbol:RegExp("`"+t+"'")}},"quoted-symbol":{pattern:RegExp("#?'"+t),alias:["variable","symbol"]},"lisp-property":{pattern:RegExp(":"+t),alias:"property"},splice:{pattern:RegExp(",@?"+t),alias:["symbol","variable"]},keyword:[{pattern:RegExp(r+"(?:(?:lexical-)?let\\*?|(?:cl-)?letf|if|when|while|unless|cons|cl-loop|and|or|not|cond|setq|error|message|null|require|provide|use-package)"+s),lookbehind:!0},{pattern:RegExp(r+"(?:for|do|collect|return|finally|append|concat|in|by)"+s),lookbehind:!0}],declare:{pattern:n("declare"),lookbehind:!0,alias:"keyword"},interactive:{pattern:n("interactive"),lookbehind:!0,alias:"keyword"},boolean:{pattern:a("(?:t|nil)"),lookbehind:!0},number:{pattern:a("[-+]?\\d+(?:\\.\\d*)?"),lookbehind:!0},defvar:{pattern:RegExp(r+"def(?:var|const|custom|group)\\s+"+t),lookbehind:!0,inside:{keyword:/^def[a-z]+/,variable:RegExp(t)}},defun:{pattern:RegExp(r+"(?:cl-)?(?:defun\\*?|defmacro)\\s+"+t+"\\s+\\([\\s\\S]*?\\)"),lookbehind:!0,inside:{keyword:/^(?:cl-)?def\S+/,arguments:null,function:{pattern:RegExp("(^\\s)"+t),lookbehind:!0},punctuation:/[()]/}},lambda:{pattern:RegExp(r+"lambda\\s+\\((?:&?"+t+"\\s*)*\\)"),lookbehind:!0,inside:{keyword:/^lambda/,arguments:null,punctuation:/[()]/}},car:{pattern:RegExp(r+t),lookbehind:!0},punctuation:[/(?:['`,]?\(|[)\[\]])/,{pattern:/(\s)\.(?=\s)/,lookbehind:!0}]},l={"lisp-marker":RegExp("&[-+*/_~!@$%^=<>{}\\w]+"),rest:{argument:{pattern:RegExp(t),alias:"variable"},varform:{pattern:RegExp(r+t+"\\s+\\S[\\s\\S]*"+i),lookbehind:!0,inside:{string:o.string,boolean:o.boolean,number:o.number,symbol:o.symbol,punctuation:/[()]/}}}},p="\\S+(?:\\s+\\S+)*",d={pattern:RegExp(r+"[\\s\\S]*"+i),lookbehind:!0,inside:{"rest-vars":{pattern:RegExp("&(?:rest|body)\\s+"+p),inside:l},"other-marker-vars":{pattern:RegExp("&(?:optional|aux)\\s+"+p),inside:l},keys:{pattern:RegExp("&key\\s+"+p+"(?:\\s+&allow-other-keys)?"),inside:l},argument:{pattern:RegExp(t),alias:"variable"},punctuation:/[()]/}};o.lambda.inside.arguments=d,o.defun.inside.arguments=e.util.clone(d),o.defun.inside.arguments.inside.sublist=d,e.languages.lisp=o,e.languages.elisp=o,e.languages.emacs=o,e.languages["emacs-lisp"]=o}(Prism); \ No newline at end of file +!function(e){function n(e){return RegExp("(\\()"+e+"(?=[\\s\\)])")}function a(e){return RegExp("([\\s([])"+e+"(?=[\\s)])")}var t="[-+*/_~!@$%^=<>{}\\w]+",r="(\\()",s="(?=\\))",i="(?=\\s)",o={heading:{pattern:/;;;.*/,alias:["comment","title"]},comment:/;.*/,string:{pattern:/"(?:[^"\\]|\\.)*"/,greedy:!0,inside:{argument:/[-A-Z]+(?=[.,\s])/,symbol:RegExp("`"+t+"'")}},"quoted-symbol":{pattern:RegExp("#?'"+t),alias:["variable","symbol"]},"lisp-property":{pattern:RegExp(":"+t),alias:"property"},splice:{pattern:RegExp(",@?"+t),alias:["symbol","variable"]},keyword:[{pattern:RegExp(r+"(?:(?:lexical-)?let\\*?|(?:cl-)?letf|if|when|while|unless|cons|cl-loop|and|or|not|cond|setq|error|message|null|require|provide|use-package)"+i),lookbehind:!0},{pattern:RegExp(r+"(?:for|do|collect|return|finally|append|concat|in|by)"+i),lookbehind:!0}],declare:{pattern:n("declare"),lookbehind:!0,alias:"keyword"},interactive:{pattern:n("interactive"),lookbehind:!0,alias:"keyword"},boolean:{pattern:a("(?:t|nil)"),lookbehind:!0},number:{pattern:a("[-+]?\\d+(?:\\.\\d*)?"),lookbehind:!0},defvar:{pattern:RegExp(r+"def(?:var|const|custom|group)\\s+"+t),lookbehind:!0,inside:{keyword:/^def[a-z]+/,variable:RegExp(t)}},defun:{pattern:RegExp(r+"(?:cl-)?(?:defun\\*?|defmacro)\\s+"+t+"\\s+\\([\\s\\S]*?\\)"),lookbehind:!0,inside:{keyword:/^(?:cl-)?def\S+/,arguments:null,function:{pattern:RegExp("(^\\s)"+t),lookbehind:!0},punctuation:/[()]/}},lambda:{pattern:RegExp(r+"lambda\\s+\\(\\s*(?:&?"+t+"(?:\\s+&?"+t+")*\\s*)?\\)"),lookbehind:!0,inside:{keyword:/^lambda/,arguments:null,punctuation:/[()]/}},car:{pattern:RegExp(r+t),lookbehind:!0},punctuation:[/(?:['`,]?\(|[)\[\]])/,{pattern:/(\s)\.(?=\s)/,lookbehind:!0}]},l={"lisp-marker":RegExp("&[-+*/_~!@$%^=<>{}\\w]+"),rest:{argument:{pattern:RegExp(t),alias:"variable"},varform:{pattern:RegExp(r+t+"\\s+\\S[\\s\\S]*"+s),lookbehind:!0,inside:{string:o.string,boolean:o.boolean,number:o.number,symbol:o.symbol,punctuation:/[()]/}}}},p="\\S+(?:\\s+\\S+)*",d={pattern:RegExp(r+"[\\s\\S]*"+s),lookbehind:!0,inside:{"rest-vars":{pattern:RegExp("&(?:rest|body)\\s+"+p),inside:l},"other-marker-vars":{pattern:RegExp("&(?:optional|aux)\\s+"+p),inside:l},keys:{pattern:RegExp("&key\\s+"+p+"(?:\\s+&allow-other-keys)?"),inside:l},argument:{pattern:RegExp(t),alias:"variable"},punctuation:/[()]/}};o.lambda.inside.arguments=d,o.defun.inside.arguments=e.util.clone(d),o.defun.inside.arguments.inside.sublist=d,e.languages.lisp=o,e.languages.elisp=o,e.languages.emacs=o,e.languages["emacs-lisp"]=o}(Prism); \ No newline at end of file diff --git a/components/prism-lua.js b/components/prism-lua.js index 5e0752b2aa..a786155cba 100644 --- a/components/prism-lua.js +++ b/components/prism-lua.js @@ -2,7 +2,7 @@ Prism.languages.lua = { 'comment': /^#!.+|--(?:\[(=*)\[[\s\S]*?\]\1\]|.*)/m, // \z may be used to skip the following space 'string': { - pattern: /(["'])(?:(?!\1)[^\\\r\n]|\\z(?:\r\n|\s)|\\(?:\r\n|[\s\S]))*\1|\[(=*)\[[\s\S]*?\]\2\]/, + pattern: /(["'])(?:(?!\1)[^\\\r\n]|\\z(?:\r\n|\s)|\\(?:\r\n|[^z]))*\1|\[(=*)\[[\s\S]*?\]\2\]/, greedy: true }, 'number': /\b0x[a-f\d]+\.?[a-f\d]*(?:p[+-]?\d+)?\b|\b\d+(?:\.\B|\.?\d*(?:e[+-]?\d+)?\b)|\B\.\d+(?:e[+-]?\d+)?\b/i, @@ -17,4 +17,4 @@ Prism.languages.lua = { } ], 'punctuation': /[\[\](){},;]|\.+|:+/ -}; \ No newline at end of file +}; diff --git a/components/prism-lua.min.js b/components/prism-lua.min.js index 064e86297e..f6a48846db 100644 --- a/components/prism-lua.min.js +++ b/components/prism-lua.min.js @@ -1 +1 @@ -Prism.languages.lua={comment:/^#!.+|--(?:\[(=*)\[[\s\S]*?\]\1\]|.*)/m,string:{pattern:/(["'])(?:(?!\1)[^\\\r\n]|\\z(?:\r\n|\s)|\\(?:\r\n|[\s\S]))*\1|\[(=*)\[[\s\S]*?\]\2\]/,greedy:!0},number:/\b0x[a-f\d]+\.?[a-f\d]*(?:p[+-]?\d+)?\b|\b\d+(?:\.\B|\.?\d*(?:e[+-]?\d+)?\b)|\B\.\d+(?:e[+-]?\d+)?\b/i,keyword:/\b(?:and|break|do|else|elseif|end|false|for|function|goto|if|in|local|nil|not|or|repeat|return|then|true|until|while)\b/,function:/(?!\d)\w+(?=\s*(?:[({]))/,operator:[/[-+*%^&|#]|\/\/?|<[<=]?|>[>=]?|[=~]=?/,{pattern:/(^|[^.])\.\.(?!\.)/,lookbehind:!0}],punctuation:/[\[\](){},;]|\.+|:+/}; \ No newline at end of file +Prism.languages.lua={comment:/^#!.+|--(?:\[(=*)\[[\s\S]*?\]\1\]|.*)/m,string:{pattern:/(["'])(?:(?!\1)[^\\\r\n]|\\z(?:\r\n|\s)|\\(?:\r\n|[^z]))*\1|\[(=*)\[[\s\S]*?\]\2\]/,greedy:!0},number:/\b0x[a-f\d]+\.?[a-f\d]*(?:p[+-]?\d+)?\b|\b\d+(?:\.\B|\.?\d*(?:e[+-]?\d+)?\b)|\B\.\d+(?:e[+-]?\d+)?\b/i,keyword:/\b(?:and|break|do|else|elseif|end|false|for|function|goto|if|in|local|nil|not|or|repeat|return|then|true|until|while)\b/,function:/(?!\d)\w+(?=\s*(?:[({]))/,operator:[/[-+*%^&|#]|\/\/?|<[<=]?|>[>=]?|[=~]=?/,{pattern:/(^|[^.])\.\.(?!\.)/,lookbehind:!0}],punctuation:/[\[\](){},;]|\.+|:+/}; \ No newline at end of file diff --git a/components/prism-neon.js b/components/prism-neon.js index 4acd10c535..83b37a2a20 100644 --- a/components/prism-neon.js +++ b/components/prism-neon.js @@ -32,7 +32,7 @@ Prism.languages.neon = { greedy: true }, 'literal': { - pattern: /(^|[[{(=:,\s])(?:[^#"\',:=[\]{}()\s`-]|[:-][^"\',=[\]{}()\s])(?:[^,:=\]})(\s]+|:(?![\s,\]})]|$)|[ \t]+[^#,:=\]})(\s])*/, + pattern: /(^|[[{(=:,\s])(?:[^#"\',:=[\]{}()\s`-]|[:-][^"\',=[\]{}()\s])(?:[^,:=\]})(\s]|:(?![\s,\]})]|$)|[ \t]+[^#,:=\]})(\s])*/, lookbehind: true, alias: 'string', }, diff --git a/components/prism-neon.min.js b/components/prism-neon.min.js index 7783ba7310..ab750386a1 100644 --- a/components/prism-neon.min.js +++ b/components/prism-neon.min.js @@ -1 +1 @@ -Prism.languages.neon={comment:{pattern:/#.*/,greedy:!0},datetime:{pattern:/(^|[[{(=:,\s])\d\d\d\d-\d\d?-\d\d?(?:(?:[Tt]| +)\d\d?:\d\d:\d\d(?:\.\d*)? *(?:Z|[-+]\d\d?(?::?\d\d)?)?)?(?=$|[\]}),\s])/,lookbehind:!0,alias:"number"},key:{pattern:/(^|[[{(,\s])[^,:=[\]{}()'"\s]+(?=\s*:(?:$|[\]}),\s])|\s*=)/,lookbehind:!0,alias:"atrule"},number:{pattern:/(^|[[{(=:,\s])[+-]?(?:0x[\da-fA-F]+|0o[0-7]+|0b[01]+|(?:\d+\.?\d*|\.?\d+)(?:[eE][+-]?\d+)?)(?=$|[\]}),:=\s])/,lookbehind:!0},boolean:{pattern:/(^|[[{(=:,\s])(?:true|false|yes|no)(?=$|[\]}),:=\s])/i,lookbehind:!0},null:{pattern:/(^|[[{(=:,\s])(?:null)(?=$|[\]}),:=\s])/i,lookbehind:!0,alias:"keyword"},string:{pattern:/(^|[[{(=:,\s])(?:('''|""")\r?\n(?:(?:[^\r\n]|\r?\n(?![\t ]*\2))*\r?\n)?[\t ]*\2|'[^'\r\n]*'|"(?:\\.|[^\\"\r\n])*")/,lookbehind:!0,greedy:!0},literal:{pattern:/(^|[[{(=:,\s])(?:[^#"\',:=[\]{}()\s`-]|[:-][^"\',=[\]{}()\s])(?:[^,:=\]})(\s]+|:(?![\s,\]})]|$)|[ \t]+[^#,:=\]})(\s])*/,lookbehind:!0,alias:"string"},punctuation:/[,:=[\]{}()-]/}; \ No newline at end of file +Prism.languages.neon={comment:{pattern:/#.*/,greedy:!0},datetime:{pattern:/(^|[[{(=:,\s])\d\d\d\d-\d\d?-\d\d?(?:(?:[Tt]| +)\d\d?:\d\d:\d\d(?:\.\d*)? *(?:Z|[-+]\d\d?(?::?\d\d)?)?)?(?=$|[\]}),\s])/,lookbehind:!0,alias:"number"},key:{pattern:/(^|[[{(,\s])[^,:=[\]{}()'"\s]+(?=\s*:(?:$|[\]}),\s])|\s*=)/,lookbehind:!0,alias:"atrule"},number:{pattern:/(^|[[{(=:,\s])[+-]?(?:0x[\da-fA-F]+|0o[0-7]+|0b[01]+|(?:\d+\.?\d*|\.?\d+)(?:[eE][+-]?\d+)?)(?=$|[\]}),:=\s])/,lookbehind:!0},boolean:{pattern:/(^|[[{(=:,\s])(?:true|false|yes|no)(?=$|[\]}),:=\s])/i,lookbehind:!0},null:{pattern:/(^|[[{(=:,\s])(?:null)(?=$|[\]}),:=\s])/i,lookbehind:!0,alias:"keyword"},string:{pattern:/(^|[[{(=:,\s])(?:('''|""")\r?\n(?:(?:[^\r\n]|\r?\n(?![\t ]*\2))*\r?\n)?[\t ]*\2|'[^'\r\n]*'|"(?:\\.|[^\\"\r\n])*")/,lookbehind:!0,greedy:!0},literal:{pattern:/(^|[[{(=:,\s])(?:[^#"\',:=[\]{}()\s`-]|[:-][^"\',=[\]{}()\s])(?:[^,:=\]})(\s]|:(?![\s,\]})]|$)|[ \t]+[^#,:=\]})(\s])*/,lookbehind:!0,alias:"string"},punctuation:/[,:=[\]{}()-]/}; \ No newline at end of file diff --git a/components/prism-nix.js b/components/prism-nix.js index 84ade924e4..0cd3302304 100644 --- a/components/prism-nix.js +++ b/components/prism-nix.js @@ -6,7 +6,7 @@ Prism.languages.nix = { inside: { 'interpolation': { // The lookbehind ensures the ${} is not preceded by \ or '' - pattern: /(^|(?:^|(?!'').)[^\\])\$\{(?:[^}]|\{[^}]*\})*}/, + pattern: /(^|(?:^|(?!'').)[^\\])\$\{(?:[^{}]|\{[^}]*\})*\}/, lookbehind: true, inside: { 'antiquotation': { @@ -37,4 +37,4 @@ Prism.languages.nix = { 'punctuation': /[{}()[\].,:;]/ }; -Prism.languages.nix.string.inside.interpolation.inside.rest = Prism.languages.nix; \ No newline at end of file +Prism.languages.nix.string.inside.interpolation.inside.rest = Prism.languages.nix; diff --git a/components/prism-nix.min.js b/components/prism-nix.min.js index 518164c4f0..71ac54f8bb 100644 --- a/components/prism-nix.min.js +++ b/components/prism-nix.min.js @@ -1 +1 @@ -Prism.languages.nix={comment:/\/\*[\s\S]*?\*\/|#.*/,string:{pattern:/"(?:[^"\\]|\\[\s\S])*"|''(?:(?!'')[\s\S]|''(?:'|\\|\$\{))*''/,greedy:!0,inside:{interpolation:{pattern:/(^|(?:^|(?!'').)[^\\])\$\{(?:[^}]|\{[^}]*\})*}/,lookbehind:!0,inside:{antiquotation:{pattern:/^\$(?=\{)/,alias:"variable"}}}}},url:[/\b(?:[a-z]{3,7}:\/\/)[\w\-+%~\/.:#=?&]+/,{pattern:/([^\/])(?:[\w\-+%~.:#=?&]*(?!\/\/)[\w\-+%~\/.:#=?&])?(?!\/\/)\/[\w\-+%~\/.:#=?&]*/,lookbehind:!0}],antiquotation:{pattern:/\$(?=\{)/,alias:"variable"},number:/\b\d+\b/,keyword:/\b(?:assert|builtins|else|if|in|inherit|let|null|or|then|with)\b/,function:/\b(?:abort|add|all|any|attrNames|attrValues|baseNameOf|compareVersions|concatLists|currentSystem|deepSeq|derivation|dirOf|div|elem(?:At)?|fetch(?:url|Tarball)|filter(?:Source)?|fromJSON|genList|getAttr|getEnv|hasAttr|hashString|head|import|intersectAttrs|is(?:Attrs|Bool|Function|Int|List|Null|String)|length|lessThan|listToAttrs|map|mul|parseDrvName|pathExists|read(?:Dir|File)|removeAttrs|replaceStrings|seq|sort|stringLength|sub(?:string)?|tail|throw|to(?:File|JSON|Path|String|XML)|trace|typeOf)\b|\bfoldl'\B/,boolean:/\b(?:true|false)\b/,operator:/[=!<>]=?|\+\+?|\|\||&&|\/\/|->?|[?@]/,punctuation:/[{}()[\].,:;]/},Prism.languages.nix.string.inside.interpolation.inside.rest=Prism.languages.nix; \ No newline at end of file +Prism.languages.nix={comment:/\/\*[\s\S]*?\*\/|#.*/,string:{pattern:/"(?:[^"\\]|\\[\s\S])*"|''(?:(?!'')[\s\S]|''(?:'|\\|\$\{))*''/,greedy:!0,inside:{interpolation:{pattern:/(^|(?:^|(?!'').)[^\\])\$\{(?:[^{}]|\{[^}]*\})*\}/,lookbehind:!0,inside:{antiquotation:{pattern:/^\$(?=\{)/,alias:"variable"}}}}},url:[/\b(?:[a-z]{3,7}:\/\/)[\w\-+%~\/.:#=?&]+/,{pattern:/([^\/])(?:[\w\-+%~.:#=?&]*(?!\/\/)[\w\-+%~\/.:#=?&])?(?!\/\/)\/[\w\-+%~\/.:#=?&]*/,lookbehind:!0}],antiquotation:{pattern:/\$(?=\{)/,alias:"variable"},number:/\b\d+\b/,keyword:/\b(?:assert|builtins|else|if|in|inherit|let|null|or|then|with)\b/,function:/\b(?:abort|add|all|any|attrNames|attrValues|baseNameOf|compareVersions|concatLists|currentSystem|deepSeq|derivation|dirOf|div|elem(?:At)?|fetch(?:url|Tarball)|filter(?:Source)?|fromJSON|genList|getAttr|getEnv|hasAttr|hashString|head|import|intersectAttrs|is(?:Attrs|Bool|Function|Int|List|Null|String)|length|lessThan|listToAttrs|map|mul|parseDrvName|pathExists|read(?:Dir|File)|removeAttrs|replaceStrings|seq|sort|stringLength|sub(?:string)?|tail|throw|to(?:File|JSON|Path|String|XML)|trace|typeOf)\b|\bfoldl'\B/,boolean:/\b(?:true|false)\b/,operator:/[=!<>]=?|\+\+?|\|\||&&|\/\/|->?|[?@]/,punctuation:/[{}()[\].,:;]/},Prism.languages.nix.string.inside.interpolation.inside.rest=Prism.languages.nix; \ No newline at end of file diff --git a/components/prism-php.js b/components/prism-php.js index 8c6634dc29..aec6f52a6a 100644 --- a/components/prism-php.js +++ b/components/prism-php.js @@ -15,7 +15,7 @@ /\b[A-Z_][A-Z0-9_]*\b(?!\s*\()/, /\b(?:null)\b/i, ]; - var number = /\b0b[01]+\b|\b0x[\da-f]+\b|(?:\b\d+(?:_\d+)*\.?(?:\d+(?:_\d+)*)*|\B\.\d+)(?:e[+-]?\d+)?/i; + var number = /\b0b[01]+\b|\b0x[\da-f]+\b|(?:\b\d+(?:_\d+)*\.?(?:\d+(?:_\d+)*)?|\B\.\d+)(?:e[+-]?\d+)?/i; var operator = /|\?\?=?|\.{3}|\??->|[!=]=?=?|::|\*\*=?|--|\+\+|&&|\|\||<<|>>|[?~]|[/^|%*&<>.+-]=?/; var punctuation = /[{}\[\](),:;]/; diff --git a/components/prism-php.min.js b/components/prism-php.min.js index f5b86bf85f..c9ffca7d15 100644 --- a/components/prism-php.min.js +++ b/components/prism-php.min.js @@ -1 +1 @@ -!function(a){var e=/\/\*[\s\S]*?\*\/|\/\/.*|#(?!\[).*/,t=[{pattern:/\b(?:false|true)\b/i,alias:"boolean"},/\b[A-Z_][A-Z0-9_]*\b(?!\s*\()/,/\b(?:null)\b/i],i=/\b0b[01]+\b|\b0x[\da-f]+\b|(?:\b\d+(?:_\d+)*\.?(?:\d+(?:_\d+)*)*|\B\.\d+)(?:e[+-]?\d+)?/i,n=/|\?\?=?|\.{3}|\??->|[!=]=?=?|::|\*\*=?|--|\+\+|&&|\|\||<<|>>|[?~]|[/^|%*&<>.+-]=?/,s=/[{}\[\](),:;]/;a.languages.php={delimiter:{pattern:/\?>$|^<\?(?:php(?=\s)|=)?/i,alias:"important"},comment:e,variable:/\$+(?:\w+\b|(?={))/i,package:{pattern:/(namespace\s+|use\s+(?:function\s+)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,lookbehind:!0,inside:{punctuation:/\\/}},keyword:[{pattern:/(\(\s*)\b(?:bool|boolean|int|integer|float|string|object|array)\b(?=\s*\))/i,alias:"type-casting",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)\b(?:bool|int|float|string|object|array(?!\s*\()|mixed|self|static|callable|iterable|(?:null|false)(?=\s*\|))\b(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*[a-z0-9_|]\|\s*)(?:null|false)\b(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*\??\s*)\b(?:bool|int|float|string|object|void|array(?!\s*\()|mixed|self|static|callable|iterable|(?:null|false)(?=\s*\|))\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*\??\s*[a-z0-9_|]\|\s*)(?:null|false)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/\b(?:bool|int|float|string|object|void|array(?!\s*\()|mixed|iterable|(?:null|false)(?=\s*\|))\b/i,alias:"type-declaration",greedy:!0},{pattern:/(\|\s*)(?:null|false)\b/i,alias:"type-declaration",greedy:!0,lookbehind:!0},{pattern:/\b(?:parent|self|static)(?=\s*::)/i,alias:"static-context",greedy:!0},/\b(?:__halt_compiler|abstract|and|array|as|break|callable|case|catch|class|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|eval|exit|extends|final|finally|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|namespace|match|new|or|parent|print|private|protected|public|require|require_once|return|self|static|switch|throw|trait|try|unset|use|var|while|xor|yield)\b/i],"argument-name":/\b[a-z_]\w*(?=\s*:(?!:))/i,"class-name":[{pattern:/(\b(?:class|interface|extends|implements|trait|instanceof|new(?!\s+self|\s+static))\s+|\bcatch\s*\()\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/(\|\s*)\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/\b[a-z_]\w*(?!\\)\b(?=\s*\|)/i,greedy:!0},{pattern:/(\|\s*)(?:\\?\b[a-z_]\w*)+\b/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(?:\\?\b[a-z_]\w*)+\b(?=\s*\|)/i,alias:"class-name-fully-qualified",greedy:!0,inside:{punctuation:/\\/}},{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self\b|\s+static\b))\s+|\bcatch\s*\()(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*\$)/i,alias:"type-declaration",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-declaration"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*::)/i,alias:["class-name-fully-qualified","static-context"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/([(,?]\s*)[a-z_]\w*(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-hint"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(\)\s*:\s*\??\s*)\b[a-z_]\w*(?!\\)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*\??\s*)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:["class-name-fully-qualified","return-type"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:t,function:/\w+\s*(?=\()/,property:{pattern:/(->)[\w]+/,lookbehind:!0},number:i,operator:n,punctuation:s};var l={pattern:/{\$(?:{(?:{[^{}]+}|[^{}]+)}|[^{}])+}|(^|[^\\{])\$+(?:\w+(?:\[[^\r\n\[\]]+\]|->\w+)*)/,lookbehind:!0,inside:a.languages.php},r=[{pattern:/<<<'([^']+)'[\r\n](?:.*[\r\n])*?\1;/,alias:"nowdoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<'[^']+'|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<'?|[';]$/}}}},{pattern:/<<<(?:"([^"]+)"[\r\n](?:.*[\r\n])*?\1;|([a-z_]\w*)[\r\n](?:.*[\r\n])*?\2;)/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<(?:"[^"]+"|[a-z_]\w*)|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<"?|[";]$/}},interpolation:l}},{pattern:/`(?:\\[\s\S]|[^\\`])*`/,alias:"backtick-quoted-string",greedy:!0},{pattern:/'(?:\\[\s\S]|[^\\'])*'/,alias:"single-quoted-string",greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,alias:"double-quoted-string",greedy:!0,inside:{interpolation:l}}];a.languages.insertBefore("php","variable",{string:r}),a.languages.insertBefore("php","variable",{attribute:{pattern:/#\[(?:[^"'\/#]|\/(?![*/])|\/\/.*$|#(?!\[).*$|\/\*(?:[^*]|\*(?!\/))*\*\/|"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*')+\](?=\s*[a-z$#])/im,greedy:!0,inside:{"attribute-content":{pattern:/^(#\[)[\s\S]+(?=]$)/,lookbehind:!0,inside:{comment:e,string:r,"attribute-class-name":[{pattern:/([^:]|^)\b[a-z_]\w*(?!\\)\b/i,alias:"class-name",greedy:!0,lookbehind:!0},{pattern:/([^:]|^)(?:\\?\b[a-z_]\w*)+/i,alias:["class-name","class-name-fully-qualified"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:t,number:i,operator:n,punctuation:s}},delimiter:{pattern:/^#\[|]$/,alias:"punctuation"}}}}),a.hooks.add("before-tokenize",function(e){if(/<\?/.test(e.code)){a.languages["markup-templating"].buildPlaceholders(e,"php",/<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#(?!\[))(?:[^?\n\r]|\?(?!>))*(?=$|\?>|[\r\n])|#\[|\/\*[\s\S]*?(?:\*\/|$))*?(?:\?>|$)/gi)}}),a.hooks.add("after-tokenize",function(e){a.languages["markup-templating"].tokenizePlaceholders(e,"php")})}(Prism); \ No newline at end of file +!function(a){var e=/\/\*[\s\S]*?\*\/|\/\/.*|#(?!\[).*/,t=[{pattern:/\b(?:false|true)\b/i,alias:"boolean"},/\b[A-Z_][A-Z0-9_]*\b(?!\s*\()/,/\b(?:null)\b/i],i=/\b0b[01]+\b|\b0x[\da-f]+\b|(?:\b\d+(?:_\d+)*\.?(?:\d+(?:_\d+)*)?|\B\.\d+)(?:e[+-]?\d+)?/i,n=/|\?\?=?|\.{3}|\??->|[!=]=?=?|::|\*\*=?|--|\+\+|&&|\|\||<<|>>|[?~]|[/^|%*&<>.+-]=?/,s=/[{}\[\](),:;]/;a.languages.php={delimiter:{pattern:/\?>$|^<\?(?:php(?=\s)|=)?/i,alias:"important"},comment:e,variable:/\$+(?:\w+\b|(?={))/i,package:{pattern:/(namespace\s+|use\s+(?:function\s+)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,lookbehind:!0,inside:{punctuation:/\\/}},keyword:[{pattern:/(\(\s*)\b(?:bool|boolean|int|integer|float|string|object|array)\b(?=\s*\))/i,alias:"type-casting",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)\b(?:bool|int|float|string|object|array(?!\s*\()|mixed|self|static|callable|iterable|(?:null|false)(?=\s*\|))\b(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*[a-z0-9_|]\|\s*)(?:null|false)\b(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*\??\s*)\b(?:bool|int|float|string|object|void|array(?!\s*\()|mixed|self|static|callable|iterable|(?:null|false)(?=\s*\|))\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*\??\s*[a-z0-9_|]\|\s*)(?:null|false)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/\b(?:bool|int|float|string|object|void|array(?!\s*\()|mixed|iterable|(?:null|false)(?=\s*\|))\b/i,alias:"type-declaration",greedy:!0},{pattern:/(\|\s*)(?:null|false)\b/i,alias:"type-declaration",greedy:!0,lookbehind:!0},{pattern:/\b(?:parent|self|static)(?=\s*::)/i,alias:"static-context",greedy:!0},/\b(?:__halt_compiler|abstract|and|array|as|break|callable|case|catch|class|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|eval|exit|extends|final|finally|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|namespace|match|new|or|parent|print|private|protected|public|require|require_once|return|self|static|switch|throw|trait|try|unset|use|var|while|xor|yield)\b/i],"argument-name":/\b[a-z_]\w*(?=\s*:(?!:))/i,"class-name":[{pattern:/(\b(?:class|interface|extends|implements|trait|instanceof|new(?!\s+self|\s+static))\s+|\bcatch\s*\()\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/(\|\s*)\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/\b[a-z_]\w*(?!\\)\b(?=\s*\|)/i,greedy:!0},{pattern:/(\|\s*)(?:\\?\b[a-z_]\w*)+\b/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(?:\\?\b[a-z_]\w*)+\b(?=\s*\|)/i,alias:"class-name-fully-qualified",greedy:!0,inside:{punctuation:/\\/}},{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self\b|\s+static\b))\s+|\bcatch\s*\()(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*\$)/i,alias:"type-declaration",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-declaration"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*::)/i,alias:["class-name-fully-qualified","static-context"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/([(,?]\s*)[a-z_]\w*(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-hint"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(\)\s*:\s*\??\s*)\b[a-z_]\w*(?!\\)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*\??\s*)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:["class-name-fully-qualified","return-type"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:t,function:/\w+\s*(?=\()/,property:{pattern:/(->)[\w]+/,lookbehind:!0},number:i,operator:n,punctuation:s};var l={pattern:/{\$(?:{(?:{[^{}]+}|[^{}]+)}|[^{}])+}|(^|[^\\{])\$+(?:\w+(?:\[[^\r\n\[\]]+\]|->\w+)*)/,lookbehind:!0,inside:a.languages.php},r=[{pattern:/<<<'([^']+)'[\r\n](?:.*[\r\n])*?\1;/,alias:"nowdoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<'[^']+'|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<'?|[';]$/}}}},{pattern:/<<<(?:"([^"]+)"[\r\n](?:.*[\r\n])*?\1;|([a-z_]\w*)[\r\n](?:.*[\r\n])*?\2;)/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<(?:"[^"]+"|[a-z_]\w*)|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<"?|[";]$/}},interpolation:l}},{pattern:/`(?:\\[\s\S]|[^\\`])*`/,alias:"backtick-quoted-string",greedy:!0},{pattern:/'(?:\\[\s\S]|[^\\'])*'/,alias:"single-quoted-string",greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,alias:"double-quoted-string",greedy:!0,inside:{interpolation:l}}];a.languages.insertBefore("php","variable",{string:r}),a.languages.insertBefore("php","variable",{attribute:{pattern:/#\[(?:[^"'\/#]|\/(?![*/])|\/\/.*$|#(?!\[).*$|\/\*(?:[^*]|\*(?!\/))*\*\/|"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*')+\](?=\s*[a-z$#])/im,greedy:!0,inside:{"attribute-content":{pattern:/^(#\[)[\s\S]+(?=]$)/,lookbehind:!0,inside:{comment:e,string:r,"attribute-class-name":[{pattern:/([^:]|^)\b[a-z_]\w*(?!\\)\b/i,alias:"class-name",greedy:!0,lookbehind:!0},{pattern:/([^:]|^)(?:\\?\b[a-z_]\w*)+/i,alias:["class-name","class-name-fully-qualified"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:t,number:i,operator:n,punctuation:s}},delimiter:{pattern:/^#\[|]$/,alias:"punctuation"}}}}),a.hooks.add("before-tokenize",function(e){if(/<\?/.test(e.code)){a.languages["markup-templating"].buildPlaceholders(e,"php",/<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#(?!\[))(?:[^?\n\r]|\?(?!>))*(?=$|\?>|[\r\n])|#\[|\/\*[\s\S]*?(?:\*\/|$))*?(?:\?>|$)/gi)}}),a.hooks.add("after-tokenize",function(e){a.languages["markup-templating"].tokenizePlaceholders(e,"php")})}(Prism); \ No newline at end of file diff --git a/components/prism-puppet.js b/components/prism-puppet.js index 246129c2cb..5de0564668 100644 --- a/components/prism-puppet.js +++ b/components/prism-puppet.js @@ -3,7 +3,7 @@ 'heredoc': [ // Matches the content of a quoted heredoc string (subject to interpolation) { - pattern: /(@\("([^"\r\n\/):]+)"(?:\/[nrts$uL]*)?\).*(?:\r?\n|\r))(?:.*(?:\r?\n|\r))*?[ \t]*\|?[ \t]*-?[ \t]*\2/, + pattern: /(@\("([^"\r\n\/):]+)"(?:\/[nrts$uL]*)?\).*(?:\r?\n|\r))(?:.*(?:\r?\n|\r(?!\n)))*?[ \t]*\|?[ \t]*-?[ \t]*\2/, lookbehind: true, alias: 'string', inside: { @@ -14,7 +14,7 @@ }, // Matches the content of an unquoted heredoc string (no interpolation) { - pattern: /(@\(([^"\r\n\/):]+)(?:\/[nrts$uL]*)?\).*(?:\r?\n|\r))(?:.*(?:\r?\n|\r))*?[ \t]*\|?[ \t]*-?[ \t]*\2/, + pattern: /(@\(([^"\r\n\/):]+)(?:\/[nrts$uL]*)?\).*(?:\r?\n|\r))(?:.*(?:\r?\n|\r(?!\n)))*?[ \t]*\|?[ \t]*-?[ \t]*\2/, lookbehind: true, greedy: true, alias: 'string', @@ -63,7 +63,7 @@ }, 'string': { // Allow for one nested level of double quotes inside interpolation - pattern: /(["'])(?:\$\{(?:[^'"}]|(["'])(?:(?!\2)[^\\]|\\[\s\S])*\2)+\}|(?!\1)[^\\]|\\[\s\S])*\1/, + pattern: /(["'])(?:\$\{(?:[^'"}]|(["'])(?:(?!\2)[^\\]|\\[\s\S])*\2)+\}|\$(?!\{)|(?!\1)[^\\$]|\\[\s\S])*\1/, greedy: true, inside: { 'double-quoted': { @@ -133,4 +133,4 @@ ]; Prism.languages.puppet['heredoc'][0].inside.interpolation = interpolation; Prism.languages.puppet['string'].inside['double-quoted'].inside.interpolation = interpolation; -}(Prism)); \ No newline at end of file +}(Prism)); diff --git a/components/prism-puppet.min.js b/components/prism-puppet.min.js index c03ba2f728..f276fa26d7 100644 --- a/components/prism-puppet.min.js +++ b/components/prism-puppet.min.js @@ -1 +1 @@ -!function(e){e.languages.puppet={heredoc:[{pattern:/(@\("([^"\r\n\/):]+)"(?:\/[nrts$uL]*)?\).*(?:\r?\n|\r))(?:.*(?:\r?\n|\r))*?[ \t]*\|?[ \t]*-?[ \t]*\2/,lookbehind:!0,alias:"string",inside:{punctuation:/(?=\S).*\S(?= *$)/}},{pattern:/(@\(([^"\r\n\/):]+)(?:\/[nrts$uL]*)?\).*(?:\r?\n|\r))(?:.*(?:\r?\n|\r))*?[ \t]*\|?[ \t]*-?[ \t]*\2/,lookbehind:!0,greedy:!0,alias:"string",inside:{punctuation:/(?=\S).*\S(?= *$)/}},{pattern:/@\("?(?:[^"\r\n\/):]+)"?(?:\/[nrts$uL]*)?\)/,alias:"string",inside:{punctuation:{pattern:/(\().+?(?=\))/,lookbehind:!0}}}],"multiline-comment":{pattern:/(^|[^\\])\/\*[\s\S]*?\*\//,lookbehind:!0,greedy:!0,alias:"comment"},regex:{pattern:/((?:\bnode\s+|[~=\(\[\{,]\s*|[=+]>\s*|^\s*))\/(?:[^\/\\]|\\[\s\S])+\/(?:[imx]+\b|\B)/,lookbehind:!0,greedy:!0,inside:{"extended-regex":{pattern:/^\/(?:[^\/\\]|\\[\s\S])+\/[im]*x[im]*$/,inside:{comment:/#.*/}}}},comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},string:{pattern:/(["'])(?:\$\{(?:[^'"}]|(["'])(?:(?!\2)[^\\]|\\[\s\S])*\2)+\}|(?!\1)[^\\]|\\[\s\S])*\1/,greedy:!0,inside:{"double-quoted":{pattern:/^"[\s\S]*"$/,inside:{}}}},variable:{pattern:/\$(?:::)?\w+(?:::\w+)*/,inside:{punctuation:/::/}},"attr-name":/(?:\w+|\*)(?=\s*=>)/,function:[{pattern:/(\.)(?!\d)\w+/,lookbehind:!0},/\b(?:contain|debug|err|fail|include|info|notice|realize|require|tag|warning)\b|\b(?!\d)\w+(?=\()/],number:/\b(?:0x[a-f\d]+|\d+(?:\.\d+)?(?:e-?\d+)?)\b/i,boolean:/\b(?:true|false)\b/,keyword:/\b(?:application|attr|case|class|consumes|default|define|else|elsif|function|if|import|inherits|node|private|produces|type|undef|unless)\b/,datatype:{pattern:/\b(?:Any|Array|Boolean|Callable|Catalogentry|Class|Collection|Data|Default|Enum|Float|Hash|Integer|NotUndef|Numeric|Optional|Pattern|Regexp|Resource|Runtime|Scalar|String|Struct|Tuple|Type|Undef|Variant)\b/,alias:"symbol"},operator:/=[=~>]?|![=~]?|<(?:<\|?|[=~|-])?|>[>=]?|->?|~>|\|>?>?|[*\/%+?]|\b(?:and|in|or)\b/,punctuation:/[\[\]{}().,;]|:+/};var n=[{pattern:/(^|[^\\])\$\{(?:[^'"{}]|\{[^}]*\}|(["'])(?:(?!\2)[^\\]|\\[\s\S])*\2)+\}/,lookbehind:!0,inside:{"short-variable":{pattern:/(^\$\{)(?!\w+\()(?:::)?\w+(?:::\w+)*/,lookbehind:!0,alias:"variable",inside:{punctuation:/::/}},delimiter:{pattern:/^\$/,alias:"variable"},rest:e.languages.puppet}},{pattern:/(^|[^\\])\$(?:::)?\w+(?:::\w+)*/,lookbehind:!0,alias:"variable",inside:{punctuation:/::/}}];e.languages.puppet.heredoc[0].inside.interpolation=n,e.languages.puppet.string.inside["double-quoted"].inside.interpolation=n}(Prism); \ No newline at end of file +!function(e){e.languages.puppet={heredoc:[{pattern:/(@\("([^"\r\n\/):]+)"(?:\/[nrts$uL]*)?\).*(?:\r?\n|\r))(?:.*(?:\r?\n|\r(?!\n)))*?[ \t]*\|?[ \t]*-?[ \t]*\2/,lookbehind:!0,alias:"string",inside:{punctuation:/(?=\S).*\S(?= *$)/}},{pattern:/(@\(([^"\r\n\/):]+)(?:\/[nrts$uL]*)?\).*(?:\r?\n|\r))(?:.*(?:\r?\n|\r(?!\n)))*?[ \t]*\|?[ \t]*-?[ \t]*\2/,lookbehind:!0,greedy:!0,alias:"string",inside:{punctuation:/(?=\S).*\S(?= *$)/}},{pattern:/@\("?(?:[^"\r\n\/):]+)"?(?:\/[nrts$uL]*)?\)/,alias:"string",inside:{punctuation:{pattern:/(\().+?(?=\))/,lookbehind:!0}}}],"multiline-comment":{pattern:/(^|[^\\])\/\*[\s\S]*?\*\//,lookbehind:!0,greedy:!0,alias:"comment"},regex:{pattern:/((?:\bnode\s+|[~=\(\[\{,]\s*|[=+]>\s*|^\s*))\/(?:[^\/\\]|\\[\s\S])+\/(?:[imx]+\b|\B)/,lookbehind:!0,greedy:!0,inside:{"extended-regex":{pattern:/^\/(?:[^\/\\]|\\[\s\S])+\/[im]*x[im]*$/,inside:{comment:/#.*/}}}},comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},string:{pattern:/(["'])(?:\$\{(?:[^'"}]|(["'])(?:(?!\2)[^\\]|\\[\s\S])*\2)+\}|\$(?!\{)|(?!\1)[^\\$]|\\[\s\S])*\1/,greedy:!0,inside:{"double-quoted":{pattern:/^"[\s\S]*"$/,inside:{}}}},variable:{pattern:/\$(?:::)?\w+(?:::\w+)*/,inside:{punctuation:/::/}},"attr-name":/(?:\w+|\*)(?=\s*=>)/,function:[{pattern:/(\.)(?!\d)\w+/,lookbehind:!0},/\b(?:contain|debug|err|fail|include|info|notice|realize|require|tag|warning)\b|\b(?!\d)\w+(?=\()/],number:/\b(?:0x[a-f\d]+|\d+(?:\.\d+)?(?:e-?\d+)?)\b/i,boolean:/\b(?:true|false)\b/,keyword:/\b(?:application|attr|case|class|consumes|default|define|else|elsif|function|if|import|inherits|node|private|produces|type|undef|unless)\b/,datatype:{pattern:/\b(?:Any|Array|Boolean|Callable|Catalogentry|Class|Collection|Data|Default|Enum|Float|Hash|Integer|NotUndef|Numeric|Optional|Pattern|Regexp|Resource|Runtime|Scalar|String|Struct|Tuple|Type|Undef|Variant)\b/,alias:"symbol"},operator:/=[=~>]?|![=~]?|<(?:<\|?|[=~|-])?|>[>=]?|->?|~>|\|>?>?|[*\/%+?]|\b(?:and|in|or)\b/,punctuation:/[\[\]{}().,;]|:+/};var n=[{pattern:/(^|[^\\])\$\{(?:[^'"{}]|\{[^}]*\}|(["'])(?:(?!\2)[^\\]|\\[\s\S])*\2)+\}/,lookbehind:!0,inside:{"short-variable":{pattern:/(^\$\{)(?!\w+\()(?:::)?\w+(?:::\w+)*/,lookbehind:!0,alias:"variable",inside:{punctuation:/::/}},delimiter:{pattern:/^\$/,alias:"variable"},rest:e.languages.puppet}},{pattern:/(^|[^\\])\$(?:::)?\w+(?:::\w+)*/,lookbehind:!0,alias:"variable",inside:{punctuation:/::/}}];e.languages.puppet.heredoc[0].inside.interpolation=n,e.languages.puppet.string.inside["double-quoted"].inside.interpolation=n}(Prism); \ No newline at end of file diff --git a/components/prism-q.js b/components/prism-q.js index 283b51127e..a57c455533 100644 --- a/components/prism-q.js +++ b/components/prism-q.js @@ -15,7 +15,7 @@ Prism.languages.q = { // If a / is not matched by a \, the multiline comment is unterminated and continues to end of file. // The / and \ must be the first char on the line, but may be followed by any amount of whitespace. { - pattern: /(^|\r?\n|\r)\/[\t ]*(?:(?:\r?\n|\r)(?:.*(?:\r?\n|\r))*?(?:\\(?=[\t ]*(?:\r?\n|\r))|$)|\S.*)/, + pattern: /(^|\r?\n|\r)\/[\t ]*(?:(?:\r?\n|\r)(?:.*(?:\r?\n|\r(?!\n)))*?(?:\\(?=[\t ]*(?:\r?\n|\r))|$)|\S.*)/, lookbehind: true, greedy: true }, diff --git a/components/prism-q.min.js b/components/prism-q.min.js index e05de737fe..da1d9ae0ff 100644 --- a/components/prism-q.min.js +++ b/components/prism-q.min.js @@ -1 +1 @@ -Prism.languages.q={string:/"(?:\\.|[^"\\\r\n])*"/,comment:[{pattern:/([\t )\]}])\/.*/,lookbehind:!0,greedy:!0},{pattern:/(^|\r?\n|\r)\/[\t ]*(?:(?:\r?\n|\r)(?:.*(?:\r?\n|\r))*?(?:\\(?=[\t ]*(?:\r?\n|\r))|$)|\S.*)/,lookbehind:!0,greedy:!0},{pattern:/^\\[\t ]*(?:\r?\n|\r)[\s\S]+/m,greedy:!0},{pattern:/^#!.+/m,greedy:!0}],symbol:/`(?::\S+|[\w.]*)/,datetime:{pattern:/0N[mdzuvt]|0W[dtz]|\d{4}\.\d\d(?:m|\.\d\d(?:T(?:\d\d(?::\d\d(?::\d\d(?:[.:]\d\d\d)?)?)?)?)?[dz]?)|\d\d:\d\d(?::\d\d(?:[.:]\d\d\d)?)?[uvt]?/,alias:"number"},number:/\b(?![01]:)(?:0[wn]|0W[hj]?|0N[hje]?|0x[\da-fA-F]+|\d+\.?\d*(?:e[+-]?\d+)?[hjfeb]?)/,keyword:/\\\w+\b|\b(?:abs|acos|aj0?|all|and|any|asc|asin|asof|atan|attr|avgs?|binr?|by|ceiling|cols|cor|cos|count|cov|cross|csv|cut|delete|deltas|desc|dev|differ|distinct|div|do|dsave|ej|enlist|eval|except|exec|exit|exp|fby|fills|first|fkeys|flip|floor|from|get|getenv|group|gtime|hclose|hcount|hdel|hopen|hsym|iasc|identity|idesc|if|ij|in|insert|inter|inv|keys?|last|like|list|ljf?|load|log|lower|lsq|ltime|ltrim|mavg|maxs?|mcount|md5|mdev|med|meta|mins?|mmax|mmin|mmu|mod|msum|neg|next|not|null|or|over|parse|peach|pj|plist|prds?|prev|prior|rand|rank|ratios|raze|read0|read1|reciprocal|reval|reverse|rload|rotate|rsave|rtrim|save|scan|scov|sdev|select|set|setenv|show|signum|sin|sqrt|ssr?|string|sublist|sums?|sv|svar|system|tables|tan|til|trim|txf|type|uj|ungroup|union|update|upper|upsert|value|var|views?|vs|wavg|where|while|within|wj1?|wsum|ww|xasc|xbar|xcols?|xdesc|xexp|xgroup|xkey|xlog|xprev|xrank)\b/,adverb:{pattern:/['\/\\]:?|\beach\b/,alias:"function"},verb:{pattern:/(?:\B\.\B|\b[01]:|<[=>]?|>=?|[:+\-*%,!?~=|$&#@^]):?|\b_\b:?/,alias:"operator"},punctuation:/[(){}\[\];.]/}; \ No newline at end of file +Prism.languages.q={string:/"(?:\\.|[^"\\\r\n])*"/,comment:[{pattern:/([\t )\]}])\/.*/,lookbehind:!0,greedy:!0},{pattern:/(^|\r?\n|\r)\/[\t ]*(?:(?:\r?\n|\r)(?:.*(?:\r?\n|\r(?!\n)))*?(?:\\(?=[\t ]*(?:\r?\n|\r))|$)|\S.*)/,lookbehind:!0,greedy:!0},{pattern:/^\\[\t ]*(?:\r?\n|\r)[\s\S]+/m,greedy:!0},{pattern:/^#!.+/m,greedy:!0}],symbol:/`(?::\S+|[\w.]*)/,datetime:{pattern:/0N[mdzuvt]|0W[dtz]|\d{4}\.\d\d(?:m|\.\d\d(?:T(?:\d\d(?::\d\d(?::\d\d(?:[.:]\d\d\d)?)?)?)?)?[dz]?)|\d\d:\d\d(?::\d\d(?:[.:]\d\d\d)?)?[uvt]?/,alias:"number"},number:/\b(?![01]:)(?:0[wn]|0W[hj]?|0N[hje]?|0x[\da-fA-F]+|\d+\.?\d*(?:e[+-]?\d+)?[hjfeb]?)/,keyword:/\\\w+\b|\b(?:abs|acos|aj0?|all|and|any|asc|asin|asof|atan|attr|avgs?|binr?|by|ceiling|cols|cor|cos|count|cov|cross|csv|cut|delete|deltas|desc|dev|differ|distinct|div|do|dsave|ej|enlist|eval|except|exec|exit|exp|fby|fills|first|fkeys|flip|floor|from|get|getenv|group|gtime|hclose|hcount|hdel|hopen|hsym|iasc|identity|idesc|if|ij|in|insert|inter|inv|keys?|last|like|list|ljf?|load|log|lower|lsq|ltime|ltrim|mavg|maxs?|mcount|md5|mdev|med|meta|mins?|mmax|mmin|mmu|mod|msum|neg|next|not|null|or|over|parse|peach|pj|plist|prds?|prev|prior|rand|rank|ratios|raze|read0|read1|reciprocal|reval|reverse|rload|rotate|rsave|rtrim|save|scan|scov|sdev|select|set|setenv|show|signum|sin|sqrt|ssr?|string|sublist|sums?|sv|svar|system|tables|tan|til|trim|txf|type|uj|ungroup|union|update|upper|upsert|value|var|views?|vs|wavg|where|while|within|wj1?|wsum|ww|xasc|xbar|xcols?|xdesc|xexp|xgroup|xkey|xlog|xprev|xrank)\b/,adverb:{pattern:/['\/\\]:?|\beach\b/,alias:"function"},verb:{pattern:/(?:\B\.\B|\b[01]:|<[=>]?|>=?|[:+\-*%,!?~=|$&#@^]):?|\b_\b:?/,alias:"operator"},punctuation:/[(){}\[\];.]/}; \ No newline at end of file diff --git a/components/prism-rest.js b/components/prism-rest.js index d49d11f366..88c043630e 100644 --- a/components/prism-rest.js +++ b/components/prism-rest.js @@ -1,14 +1,14 @@ Prism.languages.rest = { 'table': [ { - pattern: /(\s*)(?:\+[=-]+)+\+(?:\r?\n|\r)(?:\1(?:[+|].+)+[+|](?:\r?\n|\r))+\1(?:\+[=-]+)+\+/, + pattern: /(\s*)(?:\+[=-]+)+\+(?:\r?\n|\r)(?:\1[+|].+[+|](?:\r?\n|\r))+\1(?:\+[=-]+)+\+/, lookbehind: true, inside: { 'punctuation': /\||(?:\+[=-]+)+\+/ } }, { - pattern: /(\s*)(?:=+ +)+=+(?:(?:\r?\n|\r)\1.+)+(?:\r?\n|\r)\1(?:=+ +)+=+(?=(?:\r?\n|\r){2}|\s*$)/, + pattern: /(\s*)=+ [ =]*=(?:(?:\r?\n|\r)\1.+)+(?:\r?\n|\r)\1=+ [ =]*=(?=(?:\r?\n|\r){2}|\s*$)/, lookbehind: true, inside: { 'punctuation': /[=-]+/ diff --git a/components/prism-rest.min.js b/components/prism-rest.min.js index 4052f5a3bf..d26cbc425e 100644 --- a/components/prism-rest.min.js +++ b/components/prism-rest.min.js @@ -1 +1 @@ -Prism.languages.rest={table:[{pattern:/(\s*)(?:\+[=-]+)+\+(?:\r?\n|\r)(?:\1(?:[+|].+)+[+|](?:\r?\n|\r))+\1(?:\+[=-]+)+\+/,lookbehind:!0,inside:{punctuation:/\||(?:\+[=-]+)+\+/}},{pattern:/(\s*)(?:=+ +)+=+(?:(?:\r?\n|\r)\1.+)+(?:\r?\n|\r)\1(?:=+ +)+=+(?=(?:\r?\n|\r){2}|\s*$)/,lookbehind:!0,inside:{punctuation:/[=-]+/}}],"substitution-def":{pattern:/(^\s*\.\. )\|(?:[^|\s](?:[^|]*[^|\s])?)\| [^:]+::/m,lookbehind:!0,inside:{substitution:{pattern:/^\|(?:[^|\s]|[^|\s][^|]*[^|\s])\|/,alias:"attr-value",inside:{punctuation:/^\||\|$/}},directive:{pattern:/( +)[^:]+::/,lookbehind:!0,alias:"function",inside:{punctuation:/::$/}}}},"link-target":[{pattern:/(^\s*\.\. )\[[^\]]+\]/m,lookbehind:!0,alias:"string",inside:{punctuation:/^\[|\]$/}},{pattern:/(^\s*\.\. )_(?:`[^`]+`|(?:[^:\\]|\\.)+):/m,lookbehind:!0,alias:"string",inside:{punctuation:/^_|:$/}}],directive:{pattern:/(^\s*\.\. )[^:]+::/m,lookbehind:!0,alias:"function",inside:{punctuation:/::$/}},comment:{pattern:/(^\s*\.\.)(?:(?: .+)?(?:(?:\r?\n|\r).+)+| .+)(?=(?:\r?\n|\r){2}|$)/m,lookbehind:!0},title:[{pattern:/^(([!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~])\2+)(?:\r?\n|\r).+(?:\r?\n|\r)\1$/m,inside:{punctuation:/^[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~]+|[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~]+$/,important:/.+/}},{pattern:/(^|(?:\r?\n|\r){2}).+(?:\r?\n|\r)([!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~])\2+(?=\r?\n|\r|$)/,lookbehind:!0,inside:{punctuation:/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~]+$/,important:/.+/}}],hr:{pattern:/((?:\r?\n|\r){2})([!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~])\2{3,}(?=(?:\r?\n|\r){2})/,lookbehind:!0,alias:"punctuation"},field:{pattern:/(^\s*):[^:\r\n]+:(?= )/m,lookbehind:!0,alias:"attr-name"},"command-line-option":{pattern:/(^\s*)(?:[+-][a-z\d]|(?:--|\/)[a-z\d-]+)(?:[ =](?:[a-z][\w-]*|<[^<>]+>))?(?:, (?:[+-][a-z\d]|(?:--|\/)[a-z\d-]+)(?:[ =](?:[a-z][\w-]*|<[^<>]+>))?)*(?=(?:\r?\n|\r)? {2,}\S)/im,lookbehind:!0,alias:"symbol"},"literal-block":{pattern:/::(?:\r?\n|\r){2}([ \t]+).+(?:(?:\r?\n|\r)\1.+)*/,inside:{"literal-block-punctuation":{pattern:/^::/,alias:"punctuation"}}},"quoted-literal-block":{pattern:/::(?:\r?\n|\r){2}([!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~]).*(?:(?:\r?\n|\r)\1.*)*/,inside:{"literal-block-punctuation":{pattern:/^(?:::|([!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~])\1*)/m,alias:"punctuation"}}},"list-bullet":{pattern:/(^\s*)(?:[*+\-•‣⁃]|\(?(?:\d+|[a-z]|[ivxdclm]+)\)|(?:\d+|[a-z]|[ivxdclm]+)\.)(?= )/im,lookbehind:!0,alias:"punctuation"},"doctest-block":{pattern:/(^\s*)>>> .+(?:(?:\r?\n|\r).+)*/m,lookbehind:!0,inside:{punctuation:/^>>>/}},inline:[{pattern:/(^|[\s\-:\/'"<(\[{])(?::[^:]+:`.*?`|`.*?`:[^:]+:|(\*\*?|``?|\|)(?!\s).*?[^\s]\2(?=[\s\-.,:;!?\\\/'")\]}]|$))/m,lookbehind:!0,inside:{bold:{pattern:/(^\*\*).+(?=\*\*$)/,lookbehind:!0},italic:{pattern:/(^\*).+(?=\*$)/,lookbehind:!0},"inline-literal":{pattern:/(^``).+(?=``$)/,lookbehind:!0,alias:"symbol"},role:{pattern:/^:[^:]+:|:[^:]+:$/,alias:"function",inside:{punctuation:/^:|:$/}},"interpreted-text":{pattern:/(^`).+(?=`$)/,lookbehind:!0,alias:"attr-value"},substitution:{pattern:/(^\|).+(?=\|$)/,lookbehind:!0,alias:"attr-value"},punctuation:/\*\*?|``?|\|/}}],link:[{pattern:/\[[^\]]+\]_(?=[\s\-.,:;!?\\\/'")\]}]|$)/,alias:"string",inside:{punctuation:/^\[|\]_$/}},{pattern:/(?:\b[a-z\d]+(?:[_.:+][a-z\d]+)*_?_|`[^`]+`_?_|_`[^`]+`)(?=[\s\-.,:;!?\\\/'")\]}]|$)/i,alias:"string",inside:{punctuation:/^_?`|`$|`?_?_$/}}],punctuation:{pattern:/(^\s*)(?:\|(?= |$)|(?:---?|—|\.\.|__)(?= )|\.\.$)/m,lookbehind:!0}}; \ No newline at end of file +Prism.languages.rest={table:[{pattern:/(\s*)(?:\+[=-]+)+\+(?:\r?\n|\r)(?:\1[+|].+[+|](?:\r?\n|\r))+\1(?:\+[=-]+)+\+/,lookbehind:!0,inside:{punctuation:/\||(?:\+[=-]+)+\+/}},{pattern:/(\s*)=+ [ =]*=(?:(?:\r?\n|\r)\1.+)+(?:\r?\n|\r)\1=+ [ =]*=(?=(?:\r?\n|\r){2}|\s*$)/,lookbehind:!0,inside:{punctuation:/[=-]+/}}],"substitution-def":{pattern:/(^\s*\.\. )\|(?:[^|\s](?:[^|]*[^|\s])?)\| [^:]+::/m,lookbehind:!0,inside:{substitution:{pattern:/^\|(?:[^|\s]|[^|\s][^|]*[^|\s])\|/,alias:"attr-value",inside:{punctuation:/^\||\|$/}},directive:{pattern:/( +)[^:]+::/,lookbehind:!0,alias:"function",inside:{punctuation:/::$/}}}},"link-target":[{pattern:/(^\s*\.\. )\[[^\]]+\]/m,lookbehind:!0,alias:"string",inside:{punctuation:/^\[|\]$/}},{pattern:/(^\s*\.\. )_(?:`[^`]+`|(?:[^:\\]|\\.)+):/m,lookbehind:!0,alias:"string",inside:{punctuation:/^_|:$/}}],directive:{pattern:/(^\s*\.\. )[^:]+::/m,lookbehind:!0,alias:"function",inside:{punctuation:/::$/}},comment:{pattern:/(^\s*\.\.)(?:(?: .+)?(?:(?:\r?\n|\r).+)+| .+)(?=(?:\r?\n|\r){2}|$)/m,lookbehind:!0},title:[{pattern:/^(([!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~])\2+)(?:\r?\n|\r).+(?:\r?\n|\r)\1$/m,inside:{punctuation:/^[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~]+|[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~]+$/,important:/.+/}},{pattern:/(^|(?:\r?\n|\r){2}).+(?:\r?\n|\r)([!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~])\2+(?=\r?\n|\r|$)/,lookbehind:!0,inside:{punctuation:/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~]+$/,important:/.+/}}],hr:{pattern:/((?:\r?\n|\r){2})([!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~])\2{3,}(?=(?:\r?\n|\r){2})/,lookbehind:!0,alias:"punctuation"},field:{pattern:/(^\s*):[^:\r\n]+:(?= )/m,lookbehind:!0,alias:"attr-name"},"command-line-option":{pattern:/(^\s*)(?:[+-][a-z\d]|(?:--|\/)[a-z\d-]+)(?:[ =](?:[a-z][\w-]*|<[^<>]+>))?(?:, (?:[+-][a-z\d]|(?:--|\/)[a-z\d-]+)(?:[ =](?:[a-z][\w-]*|<[^<>]+>))?)*(?=(?:\r?\n|\r)? {2,}\S)/im,lookbehind:!0,alias:"symbol"},"literal-block":{pattern:/::(?:\r?\n|\r){2}([ \t]+).+(?:(?:\r?\n|\r)\1.+)*/,inside:{"literal-block-punctuation":{pattern:/^::/,alias:"punctuation"}}},"quoted-literal-block":{pattern:/::(?:\r?\n|\r){2}([!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~]).*(?:(?:\r?\n|\r)\1.*)*/,inside:{"literal-block-punctuation":{pattern:/^(?:::|([!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~])\1*)/m,alias:"punctuation"}}},"list-bullet":{pattern:/(^\s*)(?:[*+\-•‣⁃]|\(?(?:\d+|[a-z]|[ivxdclm]+)\)|(?:\d+|[a-z]|[ivxdclm]+)\.)(?= )/im,lookbehind:!0,alias:"punctuation"},"doctest-block":{pattern:/(^\s*)>>> .+(?:(?:\r?\n|\r).+)*/m,lookbehind:!0,inside:{punctuation:/^>>>/}},inline:[{pattern:/(^|[\s\-:\/'"<(\[{])(?::[^:]+:`.*?`|`.*?`:[^:]+:|(\*\*?|``?|\|)(?!\s).*?[^\s]\2(?=[\s\-.,:;!?\\\/'")\]}]|$))/m,lookbehind:!0,inside:{bold:{pattern:/(^\*\*).+(?=\*\*$)/,lookbehind:!0},italic:{pattern:/(^\*).+(?=\*$)/,lookbehind:!0},"inline-literal":{pattern:/(^``).+(?=``$)/,lookbehind:!0,alias:"symbol"},role:{pattern:/^:[^:]+:|:[^:]+:$/,alias:"function",inside:{punctuation:/^:|:$/}},"interpreted-text":{pattern:/(^`).+(?=`$)/,lookbehind:!0,alias:"attr-value"},substitution:{pattern:/(^\|).+(?=\|$)/,lookbehind:!0,alias:"attr-value"},punctuation:/\*\*?|``?|\|/}}],link:[{pattern:/\[[^\]]+\]_(?=[\s\-.,:;!?\\\/'")\]}]|$)/,alias:"string",inside:{punctuation:/^\[|\]_$/}},{pattern:/(?:\b[a-z\d]+(?:[_.:+][a-z\d]+)*_?_|`[^`]+`_?_|_`[^`]+`)(?=[\s\-.,:;!?\\\/'")\]}]|$)/i,alias:"string",inside:{punctuation:/^_?`|`$|`?_?_$/}}],punctuation:{pattern:/(^\s*)(?:\|(?= |$)|(?:---?|—|\.\.|__)(?= )|\.\.$)/m,lookbehind:!0}}; \ No newline at end of file diff --git a/components/prism-ruby.js b/components/prism-ruby.js index 3c07d481d6..fdb2726df0 100644 --- a/components/prism-ruby.js +++ b/components/prism-ruby.js @@ -94,7 +94,7 @@ } }, { - pattern: /("|')(?:#\{[^}]+\}|\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/, + pattern: /("|')(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|(?!\1)[^\\#\r\n])*\1/, greedy: true, inside: { 'interpolation': interpolation diff --git a/components/prism-ruby.min.js b/components/prism-ruby.min.js index 3d5d4a14b5..6817670b89 100644 --- a/components/prism-ruby.min.js +++ b/components/prism-ruby.min.js @@ -1 +1 @@ -!function(e){e.languages.ruby=e.languages.extend("clike",{comment:[/#.*/,{pattern:/^=begin\s[\s\S]*?^=end/m,greedy:!0}],"class-name":{pattern:/(\b(?:class)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:alias|and|BEGIN|begin|break|case|class|def|define_method|defined|do|each|else|elsif|END|end|ensure|extend|for|if|in|include|module|new|next|nil|not|or|prepend|protected|private|public|raise|redo|require|rescue|retry|return|self|super|then|throw|undef|unless|until|when|while|yield)\b/});var n={pattern:/#\{[^}]+\}/,inside:{delimiter:{pattern:/^#\{|\}$/,alias:"tag"},rest:e.languages.ruby}};delete e.languages.ruby.function,e.languages.insertBefore("ruby","keyword",{regex:[{pattern:RegExp("%r(?:"+["([^a-zA-Z0-9\\s{(\\[<])(?:(?!\\1)[^\\\\]|\\\\[^])*\\1[gim]{0,3}","\\((?:[^()\\\\]|\\\\[^])*\\)[gim]{0,3}","\\{(?:[^#{}\\\\]|#(?:\\{[^}]+\\})?|\\\\[^])*\\}[gim]{0,3}","\\[(?:[^\\[\\]\\\\]|\\\\[^])*\\][gim]{0,3}","<(?:[^<>\\\\]|\\\\[^])*>[gim]{0,3}"].join("|")+")"),greedy:!0,inside:{interpolation:n}},{pattern:/(^|[^/])\/(?!\/)(?:\[[^\r\n\]]+\]|\\.|[^[/\\\r\n])+\/[gim]{0,3}(?=\s*(?:$|[\r\n,.;})]))/,lookbehind:!0,greedy:!0}],variable:/[@$]+[a-zA-Z_]\w*(?:[?!]|\b)/,symbol:{pattern:/(^|[^:]):[a-zA-Z_]\w*(?:[?!]|\b)/,lookbehind:!0},"method-definition":{pattern:/(\bdef\s+)[\w.]+/,lookbehind:!0,inside:{function:/\w+$/,rest:e.languages.ruby}}}),e.languages.insertBefore("ruby","number",{builtin:/\b(?:Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Stat|Fixnum|Float|Hash|Integer|IO|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|String|Struct|TMS|Symbol|ThreadGroup|Thread|Time|TrueClass)\b/,constant:/\b[A-Z]\w*(?:[?!]|\b)/}),e.languages.ruby.string=[{pattern:RegExp("%[qQiIwWxs]?(?:"+["([^a-zA-Z0-9\\s{(\\[<])(?:(?!\\1)[^\\\\]|\\\\[^])*\\1","\\((?:[^()\\\\]|\\\\[^])*\\)","\\{(?:[^#{}\\\\]|#(?:\\{[^}]+\\})?|\\\\[^])*\\}","\\[(?:[^\\[\\]\\\\]|\\\\[^])*\\]","<(?:[^<>\\\\]|\\\\[^])*>"].join("|")+")"),greedy:!0,inside:{interpolation:n}},{pattern:/("|')(?:#\{[^}]+\}|\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0,inside:{interpolation:n}}],e.languages.rb=e.languages.ruby}(Prism); \ No newline at end of file +!function(e){e.languages.ruby=e.languages.extend("clike",{comment:[/#.*/,{pattern:/^=begin\s[\s\S]*?^=end/m,greedy:!0}],"class-name":{pattern:/(\b(?:class)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:alias|and|BEGIN|begin|break|case|class|def|define_method|defined|do|each|else|elsif|END|end|ensure|extend|for|if|in|include|module|new|next|nil|not|or|prepend|protected|private|public|raise|redo|require|rescue|retry|return|self|super|then|throw|undef|unless|until|when|while|yield)\b/});var n={pattern:/#\{[^}]+\}/,inside:{delimiter:{pattern:/^#\{|\}$/,alias:"tag"},rest:e.languages.ruby}};delete e.languages.ruby.function,e.languages.insertBefore("ruby","keyword",{regex:[{pattern:RegExp("%r(?:"+["([^a-zA-Z0-9\\s{(\\[<])(?:(?!\\1)[^\\\\]|\\\\[^])*\\1[gim]{0,3}","\\((?:[^()\\\\]|\\\\[^])*\\)[gim]{0,3}","\\{(?:[^#{}\\\\]|#(?:\\{[^}]+\\})?|\\\\[^])*\\}[gim]{0,3}","\\[(?:[^\\[\\]\\\\]|\\\\[^])*\\][gim]{0,3}","<(?:[^<>\\\\]|\\\\[^])*>[gim]{0,3}"].join("|")+")"),greedy:!0,inside:{interpolation:n}},{pattern:/(^|[^/])\/(?!\/)(?:\[[^\r\n\]]+\]|\\.|[^[/\\\r\n])+\/[gim]{0,3}(?=\s*(?:$|[\r\n,.;})]))/,lookbehind:!0,greedy:!0}],variable:/[@$]+[a-zA-Z_]\w*(?:[?!]|\b)/,symbol:{pattern:/(^|[^:]):[a-zA-Z_]\w*(?:[?!]|\b)/,lookbehind:!0},"method-definition":{pattern:/(\bdef\s+)[\w.]+/,lookbehind:!0,inside:{function:/\w+$/,rest:e.languages.ruby}}}),e.languages.insertBefore("ruby","number",{builtin:/\b(?:Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Stat|Fixnum|Float|Hash|Integer|IO|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|String|Struct|TMS|Symbol|ThreadGroup|Thread|Time|TrueClass)\b/,constant:/\b[A-Z]\w*(?:[?!]|\b)/}),e.languages.ruby.string=[{pattern:RegExp("%[qQiIwWxs]?(?:"+["([^a-zA-Z0-9\\s{(\\[<])(?:(?!\\1)[^\\\\]|\\\\[^])*\\1","\\((?:[^()\\\\]|\\\\[^])*\\)","\\{(?:[^#{}\\\\]|#(?:\\{[^}]+\\})?|\\\\[^])*\\}","\\[(?:[^\\[\\]\\\\]|\\\\[^])*\\]","<(?:[^<>\\\\]|\\\\[^])*>"].join("|")+")"),greedy:!0,inside:{interpolation:n}},{pattern:/("|')(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|(?!\1)[^\\#\r\n])*\1/,greedy:!0,inside:{interpolation:n}}],e.languages.rb=e.languages.ruby}(Prism); \ No newline at end of file diff --git a/components/prism-sass.js b/components/prism-sass.js index 64f2013402..9ec0c6960f 100644 --- a/components/prism-sass.js +++ b/components/prism-sass.js @@ -64,9 +64,9 @@ // what's left should be selectors Prism.languages.insertBefore('sass', 'punctuation', { 'selector': { - pattern: /([ \t]*)\S(?:,?[^,\r\n]+)*(?:,(?:\r?\n|\r)\1[ \t]+\S(?:,?[^,\r\n]+)*)*/, + pattern: /([ \t]*)\S(?:,[^,\r\n]+|[^,\r\n]*)(?:,[^,\r\n]+)*(?:,(?:\r?\n|\r)\1[ \t]+\S(?:,[^,\r\n]+|[^,\r\n]*)(?:,[^,\r\n]+)*)*/, lookbehind: true } }); -}(Prism)); \ No newline at end of file +}(Prism)); diff --git a/components/prism-sass.min.js b/components/prism-sass.min.js index c4601d2a96..d0640da68c 100644 --- a/components/prism-sass.min.js +++ b/components/prism-sass.min.js @@ -1 +1 @@ -!function(e){e.languages.sass=e.languages.extend("css",{comment:{pattern:/^([ \t]*)\/[\/*].*(?:(?:\r?\n|\r)\1[ \t]+.+)*/m,lookbehind:!0}}),e.languages.insertBefore("sass","atrule",{"atrule-line":{pattern:/^(?:[ \t]*)[@+=].+/m,inside:{atrule:/(?:@[\w-]+|[+=])/m}}}),delete e.languages.sass.atrule;var t=/\$[-\w]+|#\{\$[-\w]+\}/,a=[/[+*\/%]|[=!]=|<=?|>=?|\b(?:and|or|not)\b/,{pattern:/(\s+)-(?=\s)/,lookbehind:!0}];e.languages.insertBefore("sass","property",{"variable-line":{pattern:/^[ \t]*\$.+/m,inside:{punctuation:/:/,variable:t,operator:a}},"property-line":{pattern:/^[ \t]*(?:[^:\s]+ *:.*|:[^:\s]+.*)/m,inside:{property:[/[^:\s]+(?=\s*:)/,{pattern:/(:)[^:\s]+/,lookbehind:!0}],punctuation:/:/,variable:t,operator:a,important:e.languages.sass.important}}}),delete e.languages.sass.property,delete e.languages.sass.important,e.languages.insertBefore("sass","punctuation",{selector:{pattern:/([ \t]*)\S(?:,?[^,\r\n]+)*(?:,(?:\r?\n|\r)\1[ \t]+\S(?:,?[^,\r\n]+)*)*/,lookbehind:!0}})}(Prism); \ No newline at end of file +!function(e){e.languages.sass=e.languages.extend("css",{comment:{pattern:/^([ \t]*)\/[\/*].*(?:(?:\r?\n|\r)\1[ \t]+.+)*/m,lookbehind:!0}}),e.languages.insertBefore("sass","atrule",{"atrule-line":{pattern:/^(?:[ \t]*)[@+=].+/m,inside:{atrule:/(?:@[\w-]+|[+=])/m}}}),delete e.languages.sass.atrule;var t=/\$[-\w]+|#\{\$[-\w]+\}/,a=[/[+*\/%]|[=!]=|<=?|>=?|\b(?:and|or|not)\b/,{pattern:/(\s+)-(?=\s)/,lookbehind:!0}];e.languages.insertBefore("sass","property",{"variable-line":{pattern:/^[ \t]*\$.+/m,inside:{punctuation:/:/,variable:t,operator:a}},"property-line":{pattern:/^[ \t]*(?:[^:\s]+ *:.*|:[^:\s]+.*)/m,inside:{property:[/[^:\s]+(?=\s*:)/,{pattern:/(:)[^:\s]+/,lookbehind:!0}],punctuation:/:/,variable:t,operator:a,important:e.languages.sass.important}}}),delete e.languages.sass.property,delete e.languages.sass.important,e.languages.insertBefore("sass","punctuation",{selector:{pattern:/([ \t]*)\S(?:,[^,\r\n]+|[^,\r\n]*)(?:,[^,\r\n]+)*(?:,(?:\r?\n|\r)\1[ \t]+\S(?:,[^,\r\n]+|[^,\r\n]*)(?:,[^,\r\n]+)*)*/,lookbehind:!0}})}(Prism); \ No newline at end of file diff --git a/components/prism-scss.js b/components/prism-scss.js index b284b1fbfa..a92baa90e2 100644 --- a/components/prism-scss.js +++ b/components/prism-scss.js @@ -32,7 +32,7 @@ Prism.languages.scss = Prism.languages.extend('css', { } }, 'property': { - pattern: /(?:[\w-]|\$[-\w]+|#\{\$[-\w]+\})+(?=\s*:)/, + pattern: /(?:[-\w]|\$[-\w]|#\{\$[-\w]+\})+(?=\s*:)/, inside: { 'variable': /\$[-\w]+|#\{\$[-\w]+\}/ } diff --git a/components/prism-scss.min.js b/components/prism-scss.min.js index 48d430c97d..0e106784b4 100644 --- a/components/prism-scss.min.js +++ b/components/prism-scss.min.js @@ -1 +1 @@ -Prism.languages.scss=Prism.languages.extend("css",{comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0},atrule:{pattern:/@[\w-]+(?:\([^()]+\)|[^(])*?(?=\s+[{;])/,inside:{rule:/@[\w-]+/}},url:/(?:[-a-z]+-)?url(?=\()/i,selector:{pattern:/(?=\S)[^@;{}()]?(?:[^@;{}()]|#\{\$[-\w]+\})+(?=\s*\{(?:\}|\s|[^}]+[:{][^}]+))/m,inside:{parent:{pattern:/&/,alias:"important"},placeholder:/%[-\w]+/,variable:/\$[-\w]+|#\{\$[-\w]+\}/}},property:{pattern:/(?:[\w-]|\$[-\w]+|#\{\$[-\w]+\})+(?=\s*:)/,inside:{variable:/\$[-\w]+|#\{\$[-\w]+\}/}}}),Prism.languages.insertBefore("scss","atrule",{keyword:[/@(?:if|else(?: if)?|for|each|while|import|extend|debug|warn|mixin|include|function|return|content)/i,{pattern:/( +)(?:from|through)(?= )/,lookbehind:!0}]}),Prism.languages.insertBefore("scss","important",{variable:/\$[-\w]+|#\{\$[-\w]+\}/}),Prism.languages.insertBefore("scss","function",{placeholder:{pattern:/%[-\w]+/,alias:"selector"},statement:{pattern:/\B!(?:default|optional)\b/i,alias:"keyword"},boolean:/\b(?:true|false)\b/,null:{pattern:/\bnull\b/,alias:"keyword"},operator:{pattern:/(\s)(?:[-+*\/%]|[=!]=|<=?|>=?|and|or|not)(?=\s)/,lookbehind:!0}}),Prism.languages.scss.atrule.inside.rest=Prism.languages.scss; \ No newline at end of file +Prism.languages.scss=Prism.languages.extend("css",{comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0},atrule:{pattern:/@[\w-]+(?:\([^()]+\)|[^(])*?(?=\s+[{;])/,inside:{rule:/@[\w-]+/}},url:/(?:[-a-z]+-)?url(?=\()/i,selector:{pattern:/(?=\S)[^@;{}()]?(?:[^@;{}()]|#\{\$[-\w]+\})+(?=\s*\{(?:\}|\s|[^}]+[:{][^}]+))/m,inside:{parent:{pattern:/&/,alias:"important"},placeholder:/%[-\w]+/,variable:/\$[-\w]+|#\{\$[-\w]+\}/}},property:{pattern:/(?:[-\w]|\$[-\w]|#\{\$[-\w]+\})+(?=\s*:)/,inside:{variable:/\$[-\w]+|#\{\$[-\w]+\}/}}}),Prism.languages.insertBefore("scss","atrule",{keyword:[/@(?:if|else(?: if)?|for|each|while|import|extend|debug|warn|mixin|include|function|return|content)/i,{pattern:/( +)(?:from|through)(?= )/,lookbehind:!0}]}),Prism.languages.insertBefore("scss","important",{variable:/\$[-\w]+|#\{\$[-\w]+\}/}),Prism.languages.insertBefore("scss","function",{placeholder:{pattern:/%[-\w]+/,alias:"selector"},statement:{pattern:/\B!(?:default|optional)\b/i,alias:"keyword"},boolean:/\b(?:true|false)\b/,null:{pattern:/\bnull\b/,alias:"keyword"},operator:{pattern:/(\s)(?:[-+*\/%]|[=!]=|<=?|>=?|and|or|not)(?=\s)/,lookbehind:!0}}),Prism.languages.scss.atrule.inside.rest=Prism.languages.scss; \ No newline at end of file diff --git a/components/prism-shell-session.js b/components/prism-shell-session.js index 1335e13a81..ce0b2fe05e 100644 --- a/components/prism-shell-session.js +++ b/components/prism-shell-session.js @@ -6,7 +6,7 @@ var strings = [ // normal string // 1 capturing group - /(["'])(?:\\[\s\S]|\$\([^)]+\)|`[^`]+`|(?!\1)[^\\])*\1/.source, + /(["'])(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|(?!\1)[^\\`$])*\1/.source, // here doc // 2 capturing groups diff --git a/components/prism-shell-session.min.js b/components/prism-shell-session.min.js index c4f3e7198e..f066a64b2a 100644 --- a/components/prism-shell-session.min.js +++ b/components/prism-shell-session.min.js @@ -1 +1 @@ -!function(s){var n=["([\"'])(?:\\\\[^]|\\$\\([^)]+\\)|`[^`]+`|(?!\\1)[^\\\\])*\\1","<<-?\\s*([\"']?)(\\w+)\\2\\s[^]*?[\r\n]\\3"].join("|");s.languages["shell-session"]={info:{pattern:/^[^\r\n$#*!]+(?=[$#])/m,alias:"punctuation",inside:{path:{pattern:/(:)[\s\S]+/,lookbehind:!0},user:/^[^\s@:$#*!/\\]+@[^\s@:$#*!/\\]+(?=:|$)/,punctuation:/:/}},command:{pattern:RegExp("[$#](?:[^\\\\\r\n'\"<]|\\\\.|<>)+".replace(/<>/g,function(){return n})),greedy:!0,inside:{bash:{pattern:/(^[$#]\s*)[\s\S]+/,lookbehind:!0,alias:"language-bash",inside:s.languages.bash},"shell-symbol":{pattern:/^[$#]/,alias:"important"}}},output:/.(?:.*(?:[\r\n]|.$))*/},s.languages["sh-session"]=s.languages.shellsession=s.languages["shell-session"]}(Prism); \ No newline at end of file +!function(s){var n=["([\"'])(?:\\\\[^]|\\$\\([^)]+\\)|\\$(?!\\()|`[^`]+`|(?!\\1)[^\\\\`$])*\\1","<<-?\\s*([\"']?)(\\w+)\\2\\s[^]*?[\r\n]\\3"].join("|");s.languages["shell-session"]={info:{pattern:/^[^\r\n$#*!]+(?=[$#])/m,alias:"punctuation",inside:{path:{pattern:/(:)[\s\S]+/,lookbehind:!0},user:/^[^\s@:$#*!/\\]+@[^\s@:$#*!/\\]+(?=:|$)/,punctuation:/:/}},command:{pattern:RegExp("[$#](?:[^\\\\\r\n'\"<]|\\\\.|<>)+".replace(/<>/g,function(){return n})),greedy:!0,inside:{bash:{pattern:/(^[$#]\s*)[\s\S]+/,lookbehind:!0,alias:"language-bash",inside:s.languages.bash},"shell-symbol":{pattern:/^[$#]/,alias:"important"}}},output:/.(?:.*(?:[\r\n]|.$))*/},s.languages["sh-session"]=s.languages.shellsession=s.languages["shell-session"]}(Prism); \ No newline at end of file diff --git a/components/prism-stylus.js b/components/prism-stylus.js index dce16acc7a..1156d536a6 100644 --- a/components/prism-stylus.js +++ b/components/prism-stylus.js @@ -122,7 +122,7 @@ // It can span multiple lines. // It must end with a comma or an accolade or have indented content. 'selector': { - pattern: /(^[ \t]*)(?:(?=\S)(?:[^{}\r\n:()]|::?[\w-]+(?:\([^)\r\n]*\))?|\{[^}\r\n]+\})+)(?:(?:\r?\n|\r)(?:\1(?:(?=\S)(?:[^{}\r\n:()]|::?[\w-]+(?:\([^)\r\n]*\))?|\{[^}\r\n]+\})+)))*(?:,$|\{|(?=(?:\r?\n|\r)(?:\{|\1[ \t]+)))/m, + pattern: /(^[ \t]*)(?:(?=\S)(?:[^{}\r\n:()]|::?[\w-]+(?:\([^)\r\n]*\)|(?![\w-]))|\{[^}\r\n]+\})+)(?:(?:\r?\n|\r)(?:\1(?:(?=\S)(?:[^{}\r\n:()]|::?[\w-]+(?:\([^)\r\n]*\)|(?![\w-]))|\{[^}\r\n]+\})+)))*(?:,$|\{|(?=(?:\r?\n|\r)(?:\{|\1[ \t]+)))/m, lookbehind: true, inside: { 'interpolation': inside.interpolation, diff --git a/components/prism-stylus.min.js b/components/prism-stylus.min.js index 72ea652026..84374537d3 100644 --- a/components/prism-stylus.min.js +++ b/components/prism-stylus.min.js @@ -1 +1 @@ -!function(e){var n={pattern:/(\b\d+)(?:%|[a-z]+)/,lookbehind:!0},r={pattern:/(^|[^\w.-])-?\d*\.?\d+/,lookbehind:!0},i={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0},url:{pattern:/url\((["']?).*?\1\)/i,greedy:!0},string:{pattern:/("|')(?:(?!\1)[^\\\r\n]|\\(?:\r\n|[\s\S]))*\1/,greedy:!0},interpolation:null,func:null,important:/\B!(?:important|optional)\b/i,keyword:{pattern:/(^|\s+)(?:(?:if|else|for|return|unless)(?=\s+|$)|@[\w-]+)/,lookbehind:!0},hexcode:/#[\da-f]{3,6}/i,color:[/\b(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)\b/i,{pattern:/\b(?:rgb|hsl)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:rgb|hsl)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,inside:{unit:n,number:r,function:/[\w-]+(?=\()/,punctuation:/[(),]/}}],entity:/\\[\da-f]{1,8}/i,unit:n,boolean:/\b(?:true|false)\b/,operator:[/~|[+!\/%<>?=]=?|[-:]=|\*[*=]?|\.{2,3}|&&|\|\||\B-\B|\b(?:and|in|is(?: a| defined| not|nt)?|not|or)\b/],number:r,punctuation:/[{}()\[\];:,]/};i.interpolation={pattern:/\{[^\r\n}:]+\}/,alias:"variable",inside:{delimiter:{pattern:/^{|}$/,alias:"punctuation"},rest:i}},i.func={pattern:/[\w-]+\([^)]*\).*/,inside:{function:/^[^(]+/,rest:i}},e.languages.stylus={"atrule-declaration":{pattern:/(^\s*)@.+/m,lookbehind:!0,inside:{atrule:/^@[\w-]+/,rest:i}},"variable-declaration":{pattern:/(^[ \t]*)[\w$-]+\s*.?=[ \t]*(?:(?:\{[^}]*\}|.+)|$)/m,lookbehind:!0,inside:{variable:/^\S+/,rest:i}},statement:{pattern:/(^[ \t]*)(?:if|else|for|return|unless)[ \t]+.+/m,lookbehind:!0,inside:{keyword:/^\S+/,rest:i}},"property-declaration":{pattern:/((?:^|\{)([ \t]*))(?:[\w-]|\{[^}\r\n]+\})+(?:\s*:\s*|[ \t]+)[^{\r\n]*(?:;|[^{\r\n,](?=$)(?!(?:\r?\n|\r)(?:\{|\2[ \t]+)))/m,lookbehind:!0,inside:{property:{pattern:/^[^\s:]+/,inside:{interpolation:i.interpolation}},rest:i}},selector:{pattern:/(^[ \t]*)(?:(?=\S)(?:[^{}\r\n:()]|::?[\w-]+(?:\([^)\r\n]*\))?|\{[^}\r\n]+\})+)(?:(?:\r?\n|\r)(?:\1(?:(?=\S)(?:[^{}\r\n:()]|::?[\w-]+(?:\([^)\r\n]*\))?|\{[^}\r\n]+\})+)))*(?:,$|\{|(?=(?:\r?\n|\r)(?:\{|\1[ \t]+)))/m,lookbehind:!0,inside:{interpolation:i.interpolation,comment:i.comment,punctuation:/[{},]/}},func:i.func,string:i.string,comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0,greedy:!0},interpolation:i.interpolation,punctuation:/[{}()\[\];:.]/}}(Prism); \ No newline at end of file +!function(e){var n={pattern:/(\b\d+)(?:%|[a-z]+)/,lookbehind:!0},r={pattern:/(^|[^\w.-])-?\d*\.?\d+/,lookbehind:!0},i={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0},url:{pattern:/url\((["']?).*?\1\)/i,greedy:!0},string:{pattern:/("|')(?:(?!\1)[^\\\r\n]|\\(?:\r\n|[\s\S]))*\1/,greedy:!0},interpolation:null,func:null,important:/\B!(?:important|optional)\b/i,keyword:{pattern:/(^|\s+)(?:(?:if|else|for|return|unless)(?=\s+|$)|@[\w-]+)/,lookbehind:!0},hexcode:/#[\da-f]{3,6}/i,color:[/\b(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)\b/i,{pattern:/\b(?:rgb|hsl)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:rgb|hsl)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,inside:{unit:n,number:r,function:/[\w-]+(?=\()/,punctuation:/[(),]/}}],entity:/\\[\da-f]{1,8}/i,unit:n,boolean:/\b(?:true|false)\b/,operator:[/~|[+!\/%<>?=]=?|[-:]=|\*[*=]?|\.{2,3}|&&|\|\||\B-\B|\b(?:and|in|is(?: a| defined| not|nt)?|not|or)\b/],number:r,punctuation:/[{}()\[\];:,]/};i.interpolation={pattern:/\{[^\r\n}:]+\}/,alias:"variable",inside:{delimiter:{pattern:/^{|}$/,alias:"punctuation"},rest:i}},i.func={pattern:/[\w-]+\([^)]*\).*/,inside:{function:/^[^(]+/,rest:i}},e.languages.stylus={"atrule-declaration":{pattern:/(^\s*)@.+/m,lookbehind:!0,inside:{atrule:/^@[\w-]+/,rest:i}},"variable-declaration":{pattern:/(^[ \t]*)[\w$-]+\s*.?=[ \t]*(?:(?:\{[^}]*\}|.+)|$)/m,lookbehind:!0,inside:{variable:/^\S+/,rest:i}},statement:{pattern:/(^[ \t]*)(?:if|else|for|return|unless)[ \t]+.+/m,lookbehind:!0,inside:{keyword:/^\S+/,rest:i}},"property-declaration":{pattern:/((?:^|\{)([ \t]*))(?:[\w-]|\{[^}\r\n]+\})+(?:\s*:\s*|[ \t]+)[^{\r\n]*(?:;|[^{\r\n,](?=$)(?!(?:\r?\n|\r)(?:\{|\2[ \t]+)))/m,lookbehind:!0,inside:{property:{pattern:/^[^\s:]+/,inside:{interpolation:i.interpolation}},rest:i}},selector:{pattern:/(^[ \t]*)(?:(?=\S)(?:[^{}\r\n:()]|::?[\w-]+(?:\([^)\r\n]*\)|(?![\w-]))|\{[^}\r\n]+\})+)(?:(?:\r?\n|\r)(?:\1(?:(?=\S)(?:[^{}\r\n:()]|::?[\w-]+(?:\([^)\r\n]*\)|(?![\w-]))|\{[^}\r\n]+\})+)))*(?:,$|\{|(?=(?:\r?\n|\r)(?:\{|\1[ \t]+)))/m,lookbehind:!0,inside:{interpolation:i.interpolation,comment:i.comment,punctuation:/[{},]/}},func:i.func,string:i.string,comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0,greedy:!0},interpolation:i.interpolation,punctuation:/[{}()\[\];:.]/}}(Prism); \ No newline at end of file diff --git a/components/prism-swift.js b/components/prism-swift.js index 9f4a0fa4be..c13886cf86 100644 --- a/components/prism-swift.js +++ b/components/prism-swift.js @@ -1,7 +1,7 @@ // issues: nested multiline comments Prism.languages.swift = Prism.languages.extend('clike', { 'string': { - pattern: /("|')(?:\\(?:\((?:[^()]|\([^)]+\))+\)|\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/, + pattern: /("|')(?:\\(?:\((?:[^()]|\([^)]+\))+\)|\r\n|[^(])|(?!\1)[^\\\r\n])*\1/, greedy: true, inside: { 'interpolation': { diff --git a/components/prism-swift.min.js b/components/prism-swift.min.js index 28d03debe9..28cd112d80 100644 --- a/components/prism-swift.min.js +++ b/components/prism-swift.min.js @@ -1 +1 @@ -Prism.languages.swift=Prism.languages.extend("clike",{string:{pattern:/("|')(?:\\(?:\((?:[^()]|\([^)]+\))+\)|\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0,inside:{interpolation:{pattern:/\\\((?:[^()]|\([^)]+\))+\)/,inside:{delimiter:{pattern:/^\\\(|\)$/,alias:"variable"}}}}},keyword:/\b(?:as|associativity|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic(?:Type)?|else|enum|extension|fallthrough|final|for|func|get|guard|if|import|in|infix|init|inout|internal|is|lazy|left|let|mutating|new|none|nonmutating|operator|optional|override|postfix|precedence|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|Self|set|static|struct|subscript|super|switch|throws?|try|Type|typealias|unowned|unsafe|var|weak|where|while|willSet|__(?:COLUMN__|FILE__|FUNCTION__|LINE__))\b/,number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,constant:/\b(?:nil|[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,atrule:/@\b(?:IB(?:Outlet|Designable|Action|Inspectable)|class_protocol|exported|noreturn|NS(?:Copying|Managed)|objc|UIApplicationMain|auto_closure)\b/,builtin:/\b(?:[A-Z]\S+|abs|advance|alignof(?:Value)?|assert|contains|count(?:Elements)?|debugPrint(?:ln)?|distance|drop(?:First|Last)|dump|enumerate|equal|filter|find|first|getVaList|indices|isEmpty|join|last|lexicographicalCompare|map|max(?:Element)?|min(?:Element)?|numericCast|overlaps|partition|print(?:ln)?|reduce|reflect|reverse|sizeof(?:Value)?|sort(?:ed)?|split|startsWith|stride(?:of(?:Value)?)?|suffix|swap|toDebugString|toString|transcode|underestimateCount|unsafeBitCast|with(?:ExtendedLifetime|Unsafe(?:MutablePointers?|Pointers?)|VaList))\b/}),Prism.languages.swift.string.inside.interpolation.inside.rest=Prism.languages.swift; \ No newline at end of file +Prism.languages.swift=Prism.languages.extend("clike",{string:{pattern:/("|')(?:\\(?:\((?:[^()]|\([^)]+\))+\)|\r\n|[^(])|(?!\1)[^\\\r\n])*\1/,greedy:!0,inside:{interpolation:{pattern:/\\\((?:[^()]|\([^)]+\))+\)/,inside:{delimiter:{pattern:/^\\\(|\)$/,alias:"variable"}}}}},keyword:/\b(?:as|associativity|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic(?:Type)?|else|enum|extension|fallthrough|final|for|func|get|guard|if|import|in|infix|init|inout|internal|is|lazy|left|let|mutating|new|none|nonmutating|operator|optional|override|postfix|precedence|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|Self|set|static|struct|subscript|super|switch|throws?|try|Type|typealias|unowned|unsafe|var|weak|where|while|willSet|__(?:COLUMN__|FILE__|FUNCTION__|LINE__))\b/,number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,constant:/\b(?:nil|[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,atrule:/@\b(?:IB(?:Outlet|Designable|Action|Inspectable)|class_protocol|exported|noreturn|NS(?:Copying|Managed)|objc|UIApplicationMain|auto_closure)\b/,builtin:/\b(?:[A-Z]\S+|abs|advance|alignof(?:Value)?|assert|contains|count(?:Elements)?|debugPrint(?:ln)?|distance|drop(?:First|Last)|dump|enumerate|equal|filter|find|first|getVaList|indices|isEmpty|join|last|lexicographicalCompare|map|max(?:Element)?|min(?:Element)?|numericCast|overlaps|partition|print(?:ln)?|reduce|reflect|reverse|sizeof(?:Value)?|sort(?:ed)?|split|startsWith|stride(?:of(?:Value)?)?|suffix|swap|toDebugString|toString|transcode|underestimateCount|unsafeBitCast|with(?:ExtendedLifetime|Unsafe(?:MutablePointers?|Pointers?)|VaList))\b/}),Prism.languages.swift.string.inside.interpolation.inside.rest=Prism.languages.swift; \ No newline at end of file diff --git a/components/prism-tap.js b/components/prism-tap.js index 80e5d3eb78..cc2961477b 100644 --- a/components/prism-tap.js +++ b/components/prism-tap.js @@ -12,7 +12,7 @@ Prism.languages.tap = { punctuation: /[{}]/, directive: /#.*/, yamlish: { - pattern: /(^[^\S\r\n]*)---(?:\r\n?|\n)(?:.*(?:\r\n?|\n))*?[^\S\r\n]*\.\.\.$/m, + pattern: /(^[ \t]*)---[\s\S]*?[\r\n][ \t]*\.\.\.$/m, lookbehind: true, inside: Prism.languages.yaml, alias: 'language-yaml' diff --git a/components/prism-tap.min.js b/components/prism-tap.min.js index 4f14d9bd2a..d5fd4465ce 100644 --- a/components/prism-tap.min.js +++ b/components/prism-tap.min.js @@ -1 +1 @@ -Prism.languages.tap={fail:/not ok[^#{\n\r]*/,pass:/ok[^#{\n\r]*/,pragma:/pragma [+-][a-z]+/,bailout:/bail out!.*/i,version:/TAP version \d+/i,plan:/\d+\.\.\d+(?: +#.*)?/,subtest:{pattern:/# Subtest(?:: .*)?/,greedy:!0},punctuation:/[{}]/,directive:/#.*/,yamlish:{pattern:/(^[^\S\r\n]*)---(?:\r\n?|\n)(?:.*(?:\r\n?|\n))*?[^\S\r\n]*\.\.\.$/m,lookbehind:!0,inside:Prism.languages.yaml,alias:"language-yaml"}}; \ No newline at end of file +Prism.languages.tap={fail:/not ok[^#{\n\r]*/,pass:/ok[^#{\n\r]*/,pragma:/pragma [+-][a-z]+/,bailout:/bail out!.*/i,version:/TAP version \d+/i,plan:/\d+\.\.\d+(?: +#.*)?/,subtest:{pattern:/# Subtest(?:: .*)?/,greedy:!0},punctuation:/[{}]/,directive:/#.*/,yamlish:{pattern:/(^[ \t]*)---[\s\S]*?[\r\n][ \t]*\.\.\.$/m,lookbehind:!0,inside:Prism.languages.yaml,alias:"language-yaml"}}; \ No newline at end of file diff --git a/components/prism-textile.js b/components/prism-textile.js index 71c6fd256b..19b9149d57 100644 --- a/components/prism-textile.js +++ b/components/prism-textile.js @@ -77,7 +77,7 @@ 'table': { // Modifiers can be applied to the row: {color:red}.|1|2|3| // or the cell: |{color:red}.1|2|3| - pattern: withModifier(/^(?:(?:||[<>=^~])+\.\s*)?(?:\|(?:(?:||[<>=^~_]|[\\/]\d+)+\.)?[^|]*)+\|/.source, 'm'), + pattern: withModifier(/^(?:(?:||[<>=^~])+\.\s*)?(?:\|(?:(?:||[<>=^~_]|[\\/]\d+)+\.|(?!(?:||[<>=^~_]|[\\/]\d+)+\.))[^|]*)+\|/.source, 'm'), inside: { 'modifier': { // Modifiers for rows after the first one are diff --git a/components/prism-textile.min.js b/components/prism-textile.min.js index d0a410ecb3..88f93dcdad 100644 --- a/components/prism-textile.min.js +++ b/components/prism-textile.min.js @@ -1 +1 @@ -!function(n){function e(n,e){return RegExp(n.replace(//g,function(){return"(?:\\([^|()\n]+\\)|\\[[^\\]\n]+\\]|\\{[^}\n]+\\})"}).replace(//g,function(){return"(?:\\)|\\((?![^|()\n]+\\)))"}),e||"")}var i={css:{pattern:/\{[^}]+\}/,inside:{rest:n.languages.css}},"class-id":{pattern:/(\()[^)]+(?=\))/,lookbehind:!0,alias:"attr-value"},lang:{pattern:/(\[)[^\]]+(?=\])/,lookbehind:!0,alias:"attr-value"},punctuation:/[\\\/]\d+|\S/},t=n.languages.textile=n.languages.extend("markup",{phrase:{pattern:/(^|\r|\n)\S[\s\S]*?(?=$|\r?\n\r?\n|\r\r)/,lookbehind:!0,inside:{"block-tag":{pattern:e("^[a-z]\\w*(?:||[<>=])*\\."),inside:{modifier:{pattern:e("(^[a-z]\\w*)(?:||[<>=])+(?=\\.)"),lookbehind:!0,inside:i},tag:/^[a-z]\w*/,punctuation:/\.$/}},list:{pattern:e("^[*#]+*\\s+.+","m"),inside:{modifier:{pattern:e("(^[*#]+)+"),lookbehind:!0,inside:i},punctuation:/^[*#]+/}},table:{pattern:e("^(?:(?:||[<>=^~])+\\.\\s*)?(?:\\|(?:(?:||[<>=^~_]|[\\\\/]\\d+)+\\.)?[^|]*)+\\|","m"),inside:{modifier:{pattern:e("(^|\\|(?:\r?\n|\r)?)(?:||[<>=^~_]|[\\\\/]\\d+)+(?=\\.)"),lookbehind:!0,inside:i},punctuation:/\||^\./}},inline:{pattern:e("(^|[^a-zA-Z\\d])(\\*\\*|__|\\?\\?|[*_%@+\\-^~])*.+?\\2(?![a-zA-Z\\d])"),lookbehind:!0,inside:{bold:{pattern:e("(^(\\*\\*?)*).+?(?=\\2)"),lookbehind:!0},italic:{pattern:e("(^(__?)*).+?(?=\\2)"),lookbehind:!0},cite:{pattern:e("(^\\?\\?*).+?(?=\\?\\?)"),lookbehind:!0,alias:"string"},code:{pattern:e("(^@*).+?(?=@)"),lookbehind:!0,alias:"keyword"},inserted:{pattern:e("(^\\+*).+?(?=\\+)"),lookbehind:!0},deleted:{pattern:e("(^-*).+?(?=-)"),lookbehind:!0},span:{pattern:e("(^%*).+?(?=%)"),lookbehind:!0},modifier:{pattern:e("(^\\*\\*|__|\\?\\?|[*_%@+\\-^~])+"),lookbehind:!0,inside:i},punctuation:/[*_%?@+\-^~]+/}},"link-ref":{pattern:/^\[[^\]]+\]\S+$/m,inside:{string:{pattern:/(\[)[^\]]+(?=\])/,lookbehind:!0},url:{pattern:/(\])\S+$/,lookbehind:!0},punctuation:/[\[\]]/}},link:{pattern:e('"*[^"]+":.+?(?=[^\\w/]?(?:\\s|$))'),inside:{text:{pattern:e('(^"*)[^"]+(?=")'),lookbehind:!0},modifier:{pattern:e('(^")+'),lookbehind:!0,inside:i},url:{pattern:/(:).+/,lookbehind:!0},punctuation:/[":]/}},image:{pattern:e("!(?:||[<>=])*[^!\\s()]+(?:\\([^)]+\\))?!(?::.+?(?=[^\\w/]?(?:\\s|$)))?"),inside:{source:{pattern:e("(^!(?:||[<>=])*)[^!\\s()]+(?:\\([^)]+\\))?(?=!)"),lookbehind:!0,alias:"url"},modifier:{pattern:e("(^!)(?:||[<>=])+"),lookbehind:!0,inside:i},url:{pattern:/(:).+/,lookbehind:!0},punctuation:/[!:]/}},footnote:{pattern:/\b\[\d+\]/,alias:"comment",inside:{punctuation:/\[|\]/}},acronym:{pattern:/\b[A-Z\d]+\([^)]+\)/,inside:{comment:{pattern:/(\()[^)]+(?=\))/,lookbehind:!0},punctuation:/[()]/}},mark:{pattern:/\b\((?:TM|R|C)\)/,alias:"comment",inside:{punctuation:/[()]/}}}}}),a=t.phrase.inside,o={inline:a.inline,link:a.link,image:a.image,footnote:a.footnote,acronym:a.acronym,mark:a.mark};t.tag.pattern=/<\/?(?!\d)[a-z0-9]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s'">=]+))?)*\s*\/?>/i;var r=a.inline.inside;r.bold.inside=o,r.italic.inside=o,r.inserted.inside=o,r.deleted.inside=o,r.span.inside=o;var d=a.table.inside;d.inline=o.inline,d.link=o.link,d.image=o.image,d.footnote=o.footnote,d.acronym=o.acronym,d.mark=o.mark}(Prism); \ No newline at end of file +!function(n){function e(n,e){return RegExp(n.replace(//g,function(){return"(?:\\([^|()\n]+\\)|\\[[^\\]\n]+\\]|\\{[^}\n]+\\})"}).replace(//g,function(){return"(?:\\)|\\((?![^|()\n]+\\)))"}),e||"")}var i={css:{pattern:/\{[^}]+\}/,inside:{rest:n.languages.css}},"class-id":{pattern:/(\()[^)]+(?=\))/,lookbehind:!0,alias:"attr-value"},lang:{pattern:/(\[)[^\]]+(?=\])/,lookbehind:!0,alias:"attr-value"},punctuation:/[\\\/]\d+|\S/},t=n.languages.textile=n.languages.extend("markup",{phrase:{pattern:/(^|\r|\n)\S[\s\S]*?(?=$|\r?\n\r?\n|\r\r)/,lookbehind:!0,inside:{"block-tag":{pattern:e("^[a-z]\\w*(?:||[<>=])*\\."),inside:{modifier:{pattern:e("(^[a-z]\\w*)(?:||[<>=])+(?=\\.)"),lookbehind:!0,inside:i},tag:/^[a-z]\w*/,punctuation:/\.$/}},list:{pattern:e("^[*#]+*\\s+.+","m"),inside:{modifier:{pattern:e("(^[*#]+)+"),lookbehind:!0,inside:i},punctuation:/^[*#]+/}},table:{pattern:e("^(?:(?:||[<>=^~])+\\.\\s*)?(?:\\|(?:(?:||[<>=^~_]|[\\\\/]\\d+)+\\.|(?!(?:||[<>=^~_]|[\\\\/]\\d+)+\\.))[^|]*)+\\|","m"),inside:{modifier:{pattern:e("(^|\\|(?:\r?\n|\r)?)(?:||[<>=^~_]|[\\\\/]\\d+)+(?=\\.)"),lookbehind:!0,inside:i},punctuation:/\||^\./}},inline:{pattern:e("(^|[^a-zA-Z\\d])(\\*\\*|__|\\?\\?|[*_%@+\\-^~])*.+?\\2(?![a-zA-Z\\d])"),lookbehind:!0,inside:{bold:{pattern:e("(^(\\*\\*?)*).+?(?=\\2)"),lookbehind:!0},italic:{pattern:e("(^(__?)*).+?(?=\\2)"),lookbehind:!0},cite:{pattern:e("(^\\?\\?*).+?(?=\\?\\?)"),lookbehind:!0,alias:"string"},code:{pattern:e("(^@*).+?(?=@)"),lookbehind:!0,alias:"keyword"},inserted:{pattern:e("(^\\+*).+?(?=\\+)"),lookbehind:!0},deleted:{pattern:e("(^-*).+?(?=-)"),lookbehind:!0},span:{pattern:e("(^%*).+?(?=%)"),lookbehind:!0},modifier:{pattern:e("(^\\*\\*|__|\\?\\?|[*_%@+\\-^~])+"),lookbehind:!0,inside:i},punctuation:/[*_%?@+\-^~]+/}},"link-ref":{pattern:/^\[[^\]]+\]\S+$/m,inside:{string:{pattern:/(\[)[^\]]+(?=\])/,lookbehind:!0},url:{pattern:/(\])\S+$/,lookbehind:!0},punctuation:/[\[\]]/}},link:{pattern:e('"*[^"]+":.+?(?=[^\\w/]?(?:\\s|$))'),inside:{text:{pattern:e('(^"*)[^"]+(?=")'),lookbehind:!0},modifier:{pattern:e('(^")+'),lookbehind:!0,inside:i},url:{pattern:/(:).+/,lookbehind:!0},punctuation:/[":]/}},image:{pattern:e("!(?:||[<>=])*[^!\\s()]+(?:\\([^)]+\\))?!(?::.+?(?=[^\\w/]?(?:\\s|$)))?"),inside:{source:{pattern:e("(^!(?:||[<>=])*)[^!\\s()]+(?:\\([^)]+\\))?(?=!)"),lookbehind:!0,alias:"url"},modifier:{pattern:e("(^!)(?:||[<>=])+"),lookbehind:!0,inside:i},url:{pattern:/(:).+/,lookbehind:!0},punctuation:/[!:]/}},footnote:{pattern:/\b\[\d+\]/,alias:"comment",inside:{punctuation:/\[|\]/}},acronym:{pattern:/\b[A-Z\d]+\([^)]+\)/,inside:{comment:{pattern:/(\()[^)]+(?=\))/,lookbehind:!0},punctuation:/[()]/}},mark:{pattern:/\b\((?:TM|R|C)\)/,alias:"comment",inside:{punctuation:/[()]/}}}}}),a=t.phrase.inside,o={inline:a.inline,link:a.link,image:a.image,footnote:a.footnote,acronym:a.acronym,mark:a.mark};t.tag.pattern=/<\/?(?!\d)[a-z0-9]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s'">=]+))?)*\s*\/?>/i;var r=a.inline.inside;r.bold.inside=o,r.italic.inside=o,r.inserted.inside=o,r.deleted.inside=o,r.span.inside=o;var d=a.table.inside;d.inline=o.inline,d.link=o.link,d.image=o.image,d.footnote=o.footnote,d.acronym=o.acronym,d.mark=o.mark}(Prism); \ No newline at end of file diff --git a/components/prism-xeora.js b/components/prism-xeora.js index 713eeea6c6..7fafe5806b 100644 --- a/components/prism-xeora.js +++ b/components/prism-xeora.js @@ -20,7 +20,7 @@ } }, 'function-inline': { - pattern: /\$F:[-\w.]+\?[-\w.]+(?:,(?:\|?(?:[-#.^+*~]*(?:[\w+][^$]*)|=(?:[\S+][^$]*)|@[-#]*(?:\w+.)[\w+.]+)?)*)?\$/, + pattern: /\$F:[-\w.]+\?[-\w.]+(?:,(?:(?:@[-#]*\w+\.[\w+.]\.*)*\|)*(?:(?:[\w+]|[-#*.~^]+[\w+]|=\S)(?:[^$=]|=+[^=])*=*|(?:@[-#]*\w+\.[\w+.]\.*)+(?:(?:[\w+]|[-#*~^][-#*.~^]*[\w+]|=\S)(?:[^$=]|=+[^=])*=*)?)?)?\$/, inside: { 'variable': { pattern: /(?:[,|])@?(?:#+|[-+*~=^])?[\w.]+/, @@ -40,7 +40,7 @@ alias: 'function' }, 'function-block': { - pattern: /\$XF:{[-\w.]+\?[-\w.]+(?:,(?:\|?(?:[-#.^+*~]*(?:[\w+][^$]*)|=(?:[\S+][^$]*)|@[-#]*(?:\w+.)[\w+.]+)?)*)?}:XF\$/, + pattern: /\$XF:{[-\w.]+\?[-\w.]+(?:,(?:(?:@[-#]*\w+\.[\w+.]\.*)*\|)*(?:(?:[\w+]|[-#*.~^]+[\w+]|=\S)(?:[^$=]|=+[^=])*=*|(?:@[-#]*\w+\.[\w+.]\.*)+(?:(?:[\w+]|[-#*~^][-#*.~^]*[\w+]|=\S)(?:[^$=]|=+[^=])*=*)?)?)?}:XF\$/, inside: { 'punctuation': { pattern: /[$:{}?.,|]/ diff --git a/components/prism-xeora.min.js b/components/prism-xeora.min.js index 4014b3b0bf..5f96eff99e 100644 --- a/components/prism-xeora.min.js +++ b/components/prism-xeora.min.js @@ -1 +1 @@ -!function(n){n.languages.xeora=n.languages.extend("markup",{constant:{pattern:/\$(?:DomainContents|PageRenderDuration)\$/,inside:{punctuation:{pattern:/\$/}}},variable:{pattern:/\$@?(?:#+|[-+*~=^])?[\w.]+\$/,inside:{punctuation:{pattern:/[$.]/},operator:{pattern:/#+|[-+*~=^@]/}}},"function-inline":{pattern:/\$F:[-\w.]+\?[-\w.]+(?:,(?:\|?(?:[-#.^+*~]*(?:[\w+][^$]*)|=(?:[\S+][^$]*)|@[-#]*(?:\w+.)[\w+.]+)?)*)?\$/,inside:{variable:{pattern:/(?:[,|])@?(?:#+|[-+*~=^])?[\w.]+/,inside:{punctuation:{pattern:/[,.|]/},operator:{pattern:/#+|[-+*~=^@]/}}},punctuation:{pattern:/\$\w:|[$:?.,|]/}},alias:"function"},"function-block":{pattern:/\$XF:{[-\w.]+\?[-\w.]+(?:,(?:\|?(?:[-#.^+*~]*(?:[\w+][^$]*)|=(?:[\S+][^$]*)|@[-#]*(?:\w+.)[\w+.]+)?)*)?}:XF\$/,inside:{punctuation:{pattern:/[$:{}?.,|]/}},alias:"function"},"directive-inline":{pattern:/\$\w(?:#\d+\+?)?(?:\[[-\w.]+])?:[-\/\w.]+\$/,inside:{punctuation:{pattern:/\$(?:\w:|C(?:\[|#\d))?|[:{[\]]/,inside:{tag:{pattern:/#\d/}}}},alias:"function"},"directive-block-open":{pattern:/\$\w+:{|\$\w(?:#\d+\+?)?(?:\[[-\w.]+])?:[-\w.]+:{(?:![A-Z]+)?/,inside:{punctuation:{pattern:/\$(?:\w:|C(?:\[|#\d))?|[:{[\]]/,inside:{tag:{pattern:/#\d/}}},attribute:{pattern:/![A-Z]+$/,inside:{punctuation:{pattern:/!/}},alias:"keyword"}},alias:"function"},"directive-block-separator":{pattern:/}:[-\w.]+:{/,inside:{punctuation:{pattern:/[:{}]/}},alias:"function"},"directive-block-close":{pattern:/}:[-\w.]+\$/,inside:{punctuation:{pattern:/[:{}$]/}},alias:"function"}}),n.languages.insertBefore("inside","punctuation",{variable:n.languages.xeora["function-inline"].inside.variable},n.languages.xeora["function-block"]),n.languages.xeoracube=n.languages.xeora}(Prism); \ No newline at end of file +!function(n){n.languages.xeora=n.languages.extend("markup",{constant:{pattern:/\$(?:DomainContents|PageRenderDuration)\$/,inside:{punctuation:{pattern:/\$/}}},variable:{pattern:/\$@?(?:#+|[-+*~=^])?[\w.]+\$/,inside:{punctuation:{pattern:/[$.]/},operator:{pattern:/#+|[-+*~=^@]/}}},"function-inline":{pattern:/\$F:[-\w.]+\?[-\w.]+(?:,(?:(?:@[-#]*\w+\.[\w+.]\.*)*\|)*(?:(?:[\w+]|[-#*.~^]+[\w+]|=\S)(?:[^$=]|=+[^=])*=*|(?:@[-#]*\w+\.[\w+.]\.*)+(?:(?:[\w+]|[-#*~^][-#*.~^]*[\w+]|=\S)(?:[^$=]|=+[^=])*=*)?)?)?\$/,inside:{variable:{pattern:/(?:[,|])@?(?:#+|[-+*~=^])?[\w.]+/,inside:{punctuation:{pattern:/[,.|]/},operator:{pattern:/#+|[-+*~=^@]/}}},punctuation:{pattern:/\$\w:|[$:?.,|]/}},alias:"function"},"function-block":{pattern:/\$XF:{[-\w.]+\?[-\w.]+(?:,(?:(?:@[-#]*\w+\.[\w+.]\.*)*\|)*(?:(?:[\w+]|[-#*.~^]+[\w+]|=\S)(?:[^$=]|=+[^=])*=*|(?:@[-#]*\w+\.[\w+.]\.*)+(?:(?:[\w+]|[-#*~^][-#*.~^]*[\w+]|=\S)(?:[^$=]|=+[^=])*=*)?)?)?}:XF\$/,inside:{punctuation:{pattern:/[$:{}?.,|]/}},alias:"function"},"directive-inline":{pattern:/\$\w(?:#\d+\+?)?(?:\[[-\w.]+])?:[-\/\w.]+\$/,inside:{punctuation:{pattern:/\$(?:\w:|C(?:\[|#\d))?|[:{[\]]/,inside:{tag:{pattern:/#\d/}}}},alias:"function"},"directive-block-open":{pattern:/\$\w+:{|\$\w(?:#\d+\+?)?(?:\[[-\w.]+])?:[-\w.]+:{(?:![A-Z]+)?/,inside:{punctuation:{pattern:/\$(?:\w:|C(?:\[|#\d))?|[:{[\]]/,inside:{tag:{pattern:/#\d/}}},attribute:{pattern:/![A-Z]+$/,inside:{punctuation:{pattern:/!/}},alias:"keyword"}},alias:"function"},"directive-block-separator":{pattern:/}:[-\w.]+:{/,inside:{punctuation:{pattern:/[:{}]/}},alias:"function"},"directive-block-close":{pattern:/}:[-\w.]+\$/,inside:{punctuation:{pattern:/[:{}$]/}},alias:"function"}}),n.languages.insertBefore("inside","punctuation",{variable:n.languages.xeora["function-inline"].inside.variable},n.languages.xeora["function-block"]),n.languages.xeoracube=n.languages.xeora}(Prism); \ No newline at end of file From 00bf00e3ea7261659e7b4aa0316879e145a837a8 Mon Sep 17 00:00:00 2001 From: Daniel Morell Date: Mon, 26 Oct 2020 14:49:26 -0500 Subject: [PATCH 0651/1100] Apache Configuration: Update directive-flag to match '=' (#2612) --- components/prism-apacheconf.js | 2 +- components/prism-apacheconf.min.js | 2 +- tests/languages/apacheconf/directive-flags_feature.test | 6 ++++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/components/prism-apacheconf.js b/components/prism-apacheconf.js index 1b34bd0640..728414b2ce 100644 --- a/components/prism-apacheconf.js +++ b/components/prism-apacheconf.js @@ -33,7 +33,7 @@ Prism.languages.apacheconf = { alias: 'tag' }, 'directive-flags': { - pattern: /\[(?:\w,?)+\]/, + pattern: /\[(?:[\w=],?)+\]/, alias: 'keyword' }, 'string': { diff --git a/components/prism-apacheconf.min.js b/components/prism-apacheconf.min.js index d510e1008b..578cda39c1 100644 --- a/components/prism-apacheconf.min.js +++ b/components/prism-apacheconf.min.js @@ -1 +1 @@ -Prism.languages.apacheconf={comment:/#.*/,"directive-inline":{pattern:/(^\s*)\b(?:AcceptFilter|AcceptPathInfo|AccessFileName|Action|Add(?:Alt|AltByEncoding|AltByType|Charset|DefaultCharset|Description|Encoding|Handler|Icon|IconByEncoding|IconByType|InputFilter|Language|ModuleInfo|OutputFilter|OutputFilterByType|Type)|Alias|AliasMatch|Allow(?:CONNECT|EncodedSlashes|Methods|Override|OverrideList)?|Anonymous(?:_LogEmail|_MustGiveEmail|_NoUserID|_VerifyEmail)?|AsyncRequestWorkerFactor|Auth(?:BasicAuthoritative|BasicFake|BasicProvider|BasicUseDigestAlgorithm|DBDUserPWQuery|DBDUserRealmQuery|DBMGroupFile|DBMType|DBMUserFile|Digest(?:Algorithm|Domain|NonceLifetime|Provider|Qop|ShmemSize)|Form(?:Authoritative|Body|DisableNoStore|FakeBasicAuth|Location|LoginRequiredLocation|LoginSuccessLocation|LogoutLocation|Method|Mimetype|Password|Provider|SitePassphrase|Size|Username)|GroupFile|LDAP(?:AuthorizePrefix|BindAuthoritative|BindDN|BindPassword|CharsetConfig|CompareAsUser|CompareDNOnServer|DereferenceAliases|GroupAttribute|GroupAttributeIsDN|InitialBindAsUser|InitialBindPattern|MaxSubGroupDepth|RemoteUserAttribute|RemoteUserIsDN|SearchAsUser|SubGroupAttribute|SubGroupClass|Url)|Merging|Name|Type|UserFile|nCache(?:Context|Enable|ProvideFor|SOCache|Timeout)|nzFcgiCheckAuthnProvider|nzFcgiDefineProvider|zDBDLoginToReferer|zDBDQuery|zDBDRedirectQuery|zDBMType|zSendForbiddenOnFailure)|BalancerGrowth|BalancerInherit|BalancerMember|BalancerPersist|BrowserMatch|BrowserMatchNoCase|BufferSize|BufferedLogs|CGIDScriptTimeout|CGIMapExtension|Cache(?:DefaultExpire|DetailHeader|DirLength|DirLevels|Disable|Enable|File|Header|IgnoreCacheControl|IgnoreHeaders|IgnoreNoLastMod|IgnoreQueryString|IgnoreURLSessionIdentifiers|KeyBaseURL|LastModifiedFactor|Lock|LockMaxAge|LockPath|MaxExpire|MaxFileSize|MinExpire|MinFileSize|NegotiatedDocs|QuickHandler|ReadSize|ReadTime|Root|Socache(?:MaxSize|MaxTime|MinTime|ReadSize|ReadTime)?|StaleOnError|StoreExpired|StoreNoStore|StorePrivate)|CharsetDefault|CharsetOptions|CharsetSourceEnc|CheckCaseOnly|CheckSpelling|ChrootDir|ContentDigest|CookieDomain|CookieExpires|CookieName|CookieStyle|CookieTracking|CoreDumpDirectory|CustomLog|DBDExptime|DBDInitSQL|DBDKeep|DBDMax|DBDMin|DBDParams|DBDPersist|DBDPrepareSQL|DBDriver|DTracePrivileges|Dav|DavDepthInfinity|DavGenericLockDB|DavLockDB|DavMinTimeout|DefaultIcon|DefaultLanguage|DefaultRuntimeDir|DefaultType|Define|Deflate(?:BufferSize|CompressionLevel|FilterNote|InflateLimitRequestBody|InflateRatio(?:Burst|Limit)|MemLevel|WindowSize)|Deny|DirectoryCheckHandler|DirectoryIndex|DirectoryIndexRedirect|DirectorySlash|DocumentRoot|DumpIOInput|DumpIOOutput|EnableExceptionHook|EnableMMAP|EnableSendfile|Error|ErrorDocument|ErrorLog|ErrorLogFormat|Example|ExpiresActive|ExpiresByType|ExpiresDefault|ExtFilterDefine|ExtFilterOptions|ExtendedStatus|FallbackResource|FileETag|FilterChain|FilterDeclare|FilterProtocol|FilterProvider|FilterTrace|ForceLanguagePriority|ForceType|ForensicLog|GprofDir|GracefulShutdownTimeout|Group|Header|HeaderName|Heartbeat(?:Address|Listen|MaxServers|Storage)|HostnameLookups|ISAPI(?:AppendLogToErrors|AppendLogToQuery|CacheFile|FakeAsync|LogNotSupported|ReadAheadBuffer)|IdentityCheck|IdentityCheckTimeout|ImapBase|ImapDefault|ImapMenu|Include|IncludeOptional|Index(?:HeadInsert|Ignore|IgnoreReset|Options|OrderDefault|StyleSheet)|InputSed|KeepAlive|KeepAliveTimeout|KeptBodySize|LDAP(?:CacheEntries|CacheTTL|ConnectionPoolTTL|ConnectionTimeout|LibraryDebug|OpCacheEntries|OpCacheTTL|ReferralHopLimit|Referrals|Retries|RetryDelay|SharedCacheFile|SharedCacheSize|Timeout|TrustedClientCert|TrustedGlobalCert|TrustedMode|VerifyServerCert)|LanguagePriority|Limit(?:InternalRecursion|Request(?:Body|FieldSize|Fields|Line)|XMLRequestBody)|Listen|ListenBackLog|LoadFile|LoadModule|LogFormat|LogLevel|LogMessage|LuaAuthzProvider|LuaCodeCache|Lua(?:Hook(?:AccessChecker|AuthChecker|CheckUserID|Fixups|InsertFilter|Log|MapToStorage|TranslateName|TypeChecker)|Inherit|InputFilter|MapHandler|OutputFilter|PackageCPath|PackagePath|QuickHandler|Root|Scope)|MMapFile|Max(?:ConnectionsPerChild|KeepAliveRequests|MemFree|RangeOverlaps|RangeReversals|Ranges|RequestWorkers|SpareServers|SpareThreads|Threads)|MergeTrailers|MetaDir|MetaFiles|MetaSuffix|MimeMagicFile|MinSpareServers|MinSpareThreads|ModMimeUsePathInfo|ModemStandard|MultiviewsMatch|Mutex|NWSSLTrustedCerts|NWSSLUpgradeable|NameVirtualHost|NoProxy|Options|Order|OutputSed|PassEnv|PidFile|PrivilegesMode|Protocol|ProtocolEcho|Proxy(?:AddHeaders|BadHeader|Block|Domain|ErrorOverride|ExpressDBMFile|ExpressDBMType|ExpressEnable|FtpDirCharset|FtpEscapeWildcards|FtpListOnWildcard|HTML(?:BufSize|CharsetOut|DocType|Enable|Events|Extended|Fixups|Interp|Links|Meta|StripComments|URLMap)|IOBufferSize|MaxForwards|Pass(?:Inherit|InterpolateEnv|Match|Reverse|ReverseCookieDomain|ReverseCookiePath)?|PreserveHost|ReceiveBufferSize|Remote|RemoteMatch|Requests|SCGIInternalRedirect|SCGISendfile|Set|SourceAddress|Status|Timeout|Via)|RLimitCPU|RLimitMEM|RLimitNPROC|ReadmeName|ReceiveBufferSize|Redirect|RedirectMatch|RedirectPermanent|RedirectTemp|ReflectorHeader|RemoteIP(?:Header|InternalProxy|InternalProxyList|ProxiesHeader|TrustedProxy|TrustedProxyList)|RemoveCharset|RemoveEncoding|RemoveHandler|RemoveInputFilter|RemoveLanguage|RemoveOutputFilter|RemoveType|RequestHeader|RequestReadTimeout|Require|Rewrite(?:Base|Cond|Engine|Map|Options|Rule)|SSIETag|SSIEndTag|SSIErrorMsg|SSILastModified|SSILegacyExprParser|SSIStartTag|SSITimeFormat|SSIUndefinedEcho|SSL(?:CACertificateFile|CACertificatePath|CADNRequestFile|CADNRequestPath|CARevocationCheck|CARevocationFile|CARevocationPath|CertificateChainFile|CertificateFile|CertificateKeyFile|CipherSuite|Compression|CryptoDevice|Engine|FIPS|HonorCipherOrder|InsecureRenegotiation|OCSP(?:DefaultResponder|Enable|OverrideResponder|ResponderTimeout|ResponseMaxAge|ResponseTimeSkew|UseRequestNonce)|OpenSSLConfCmd|Options|PassPhraseDialog|Protocol|Proxy(?:CACertificateFile|CACertificatePath|CARevocation(?:Check|File|Path)|CheckPeer(?:CN|Expire|Name)|CipherSuite|Engine|MachineCertificate(?:ChainFile|File|Path)|Protocol|Verify|VerifyDepth)|RandomSeed|RenegBufferSize|Require|RequireSSL|SRPUnknownUserSeed|SRPVerifierFile|Session(?:Cache|CacheTimeout|TicketKeyFile|Tickets)|Stapling(?:Cache|ErrorCacheTimeout|FakeTryLater|ForceURL|ResponderTimeout|ResponseMaxAge|ResponseTimeSkew|ReturnResponderErrors|StandardCacheTimeout)|StrictSNIVHostCheck|UseStapling|UserName|VerifyClient|VerifyDepth)|Satisfy|ScoreBoardFile|Script(?:Alias|AliasMatch|InterpreterSource|Log|LogBuffer|LogLength|Sock)?|SecureListen|SeeRequestTail|SendBufferSize|Server(?:Admin|Alias|Limit|Name|Path|Root|Signature|Tokens)|Session(?:Cookie(?:Name|Name2|Remove)|Crypto(?:Cipher|Driver|Passphrase|PassphraseFile)|DBD(?:CookieName|CookieName2|CookieRemove|DeleteLabel|InsertLabel|PerUser|SelectLabel|UpdateLabel)|Env|Exclude|Header|Include|MaxAge)?|SetEnv|SetEnvIf|SetEnvIfExpr|SetEnvIfNoCase|SetHandler|SetInputFilter|SetOutputFilter|StartServers|StartThreads|Substitute|Suexec|SuexecUserGroup|ThreadLimit|ThreadStackSize|ThreadsPerChild|TimeOut|TraceEnable|TransferLog|TypesConfig|UnDefine|UndefMacro|UnsetEnv|Use|UseCanonicalName|UseCanonicalPhysicalPort|User|UserDir|VHostCGIMode|VHostCGIPrivs|VHostGroup|VHostPrivs|VHostSecure|VHostUser|Virtual(?:DocumentRoot|ScriptAlias)(?:IP)?|WatchdogInterval|XBitHack|xml2EncAlias|xml2EncDefault|xml2StartParse)\b/im,lookbehind:!0,alias:"property"},"directive-block":{pattern:/<\/?\b(?:Auth[nz]ProviderAlias|Directory|DirectoryMatch|Else|ElseIf|Files|FilesMatch|If|IfDefine|IfModule|IfVersion|Limit|LimitExcept|Location|LocationMatch|Macro|Proxy|Require(?:All|Any|None)|VirtualHost)\b *.*>/i,inside:{"directive-block":{pattern:/^<\/?\w+/,inside:{punctuation:/^<\/?/},alias:"tag"},"directive-block-parameter":{pattern:/.*[^>]/,inside:{punctuation:/:/,string:{pattern:/("|').*\1/,inside:{variable:/[$%]\{?(?:\w\.?[-+:]?)+\}?/}}},alias:"attr-value"},punctuation:/>/},alias:"tag"},"directive-flags":{pattern:/\[(?:\w,?)+\]/,alias:"keyword"},string:{pattern:/("|').*\1/,inside:{variable:/[$%]\{?(?:\w\.?[-+:]?)+\}?/}},variable:/[$%]\{?(?:\w\.?[-+:]?)+\}?/,regex:/\^?.*\$|\^.*\$?/}; \ No newline at end of file +Prism.languages.apacheconf={comment:/#.*/,"directive-inline":{pattern:/(^\s*)\b(?:AcceptFilter|AcceptPathInfo|AccessFileName|Action|Add(?:Alt|AltByEncoding|AltByType|Charset|DefaultCharset|Description|Encoding|Handler|Icon|IconByEncoding|IconByType|InputFilter|Language|ModuleInfo|OutputFilter|OutputFilterByType|Type)|Alias|AliasMatch|Allow(?:CONNECT|EncodedSlashes|Methods|Override|OverrideList)?|Anonymous(?:_LogEmail|_MustGiveEmail|_NoUserID|_VerifyEmail)?|AsyncRequestWorkerFactor|Auth(?:BasicAuthoritative|BasicFake|BasicProvider|BasicUseDigestAlgorithm|DBDUserPWQuery|DBDUserRealmQuery|DBMGroupFile|DBMType|DBMUserFile|Digest(?:Algorithm|Domain|NonceLifetime|Provider|Qop|ShmemSize)|Form(?:Authoritative|Body|DisableNoStore|FakeBasicAuth|Location|LoginRequiredLocation|LoginSuccessLocation|LogoutLocation|Method|Mimetype|Password|Provider|SitePassphrase|Size|Username)|GroupFile|LDAP(?:AuthorizePrefix|BindAuthoritative|BindDN|BindPassword|CharsetConfig|CompareAsUser|CompareDNOnServer|DereferenceAliases|GroupAttribute|GroupAttributeIsDN|InitialBindAsUser|InitialBindPattern|MaxSubGroupDepth|RemoteUserAttribute|RemoteUserIsDN|SearchAsUser|SubGroupAttribute|SubGroupClass|Url)|Merging|Name|Type|UserFile|nCache(?:Context|Enable|ProvideFor|SOCache|Timeout)|nzFcgiCheckAuthnProvider|nzFcgiDefineProvider|zDBDLoginToReferer|zDBDQuery|zDBDRedirectQuery|zDBMType|zSendForbiddenOnFailure)|BalancerGrowth|BalancerInherit|BalancerMember|BalancerPersist|BrowserMatch|BrowserMatchNoCase|BufferSize|BufferedLogs|CGIDScriptTimeout|CGIMapExtension|Cache(?:DefaultExpire|DetailHeader|DirLength|DirLevels|Disable|Enable|File|Header|IgnoreCacheControl|IgnoreHeaders|IgnoreNoLastMod|IgnoreQueryString|IgnoreURLSessionIdentifiers|KeyBaseURL|LastModifiedFactor|Lock|LockMaxAge|LockPath|MaxExpire|MaxFileSize|MinExpire|MinFileSize|NegotiatedDocs|QuickHandler|ReadSize|ReadTime|Root|Socache(?:MaxSize|MaxTime|MinTime|ReadSize|ReadTime)?|StaleOnError|StoreExpired|StoreNoStore|StorePrivate)|CharsetDefault|CharsetOptions|CharsetSourceEnc|CheckCaseOnly|CheckSpelling|ChrootDir|ContentDigest|CookieDomain|CookieExpires|CookieName|CookieStyle|CookieTracking|CoreDumpDirectory|CustomLog|DBDExptime|DBDInitSQL|DBDKeep|DBDMax|DBDMin|DBDParams|DBDPersist|DBDPrepareSQL|DBDriver|DTracePrivileges|Dav|DavDepthInfinity|DavGenericLockDB|DavLockDB|DavMinTimeout|DefaultIcon|DefaultLanguage|DefaultRuntimeDir|DefaultType|Define|Deflate(?:BufferSize|CompressionLevel|FilterNote|InflateLimitRequestBody|InflateRatio(?:Burst|Limit)|MemLevel|WindowSize)|Deny|DirectoryCheckHandler|DirectoryIndex|DirectoryIndexRedirect|DirectorySlash|DocumentRoot|DumpIOInput|DumpIOOutput|EnableExceptionHook|EnableMMAP|EnableSendfile|Error|ErrorDocument|ErrorLog|ErrorLogFormat|Example|ExpiresActive|ExpiresByType|ExpiresDefault|ExtFilterDefine|ExtFilterOptions|ExtendedStatus|FallbackResource|FileETag|FilterChain|FilterDeclare|FilterProtocol|FilterProvider|FilterTrace|ForceLanguagePriority|ForceType|ForensicLog|GprofDir|GracefulShutdownTimeout|Group|Header|HeaderName|Heartbeat(?:Address|Listen|MaxServers|Storage)|HostnameLookups|ISAPI(?:AppendLogToErrors|AppendLogToQuery|CacheFile|FakeAsync|LogNotSupported|ReadAheadBuffer)|IdentityCheck|IdentityCheckTimeout|ImapBase|ImapDefault|ImapMenu|Include|IncludeOptional|Index(?:HeadInsert|Ignore|IgnoreReset|Options|OrderDefault|StyleSheet)|InputSed|KeepAlive|KeepAliveTimeout|KeptBodySize|LDAP(?:CacheEntries|CacheTTL|ConnectionPoolTTL|ConnectionTimeout|LibraryDebug|OpCacheEntries|OpCacheTTL|ReferralHopLimit|Referrals|Retries|RetryDelay|SharedCacheFile|SharedCacheSize|Timeout|TrustedClientCert|TrustedGlobalCert|TrustedMode|VerifyServerCert)|LanguagePriority|Limit(?:InternalRecursion|Request(?:Body|FieldSize|Fields|Line)|XMLRequestBody)|Listen|ListenBackLog|LoadFile|LoadModule|LogFormat|LogLevel|LogMessage|LuaAuthzProvider|LuaCodeCache|Lua(?:Hook(?:AccessChecker|AuthChecker|CheckUserID|Fixups|InsertFilter|Log|MapToStorage|TranslateName|TypeChecker)|Inherit|InputFilter|MapHandler|OutputFilter|PackageCPath|PackagePath|QuickHandler|Root|Scope)|MMapFile|Max(?:ConnectionsPerChild|KeepAliveRequests|MemFree|RangeOverlaps|RangeReversals|Ranges|RequestWorkers|SpareServers|SpareThreads|Threads)|MergeTrailers|MetaDir|MetaFiles|MetaSuffix|MimeMagicFile|MinSpareServers|MinSpareThreads|ModMimeUsePathInfo|ModemStandard|MultiviewsMatch|Mutex|NWSSLTrustedCerts|NWSSLUpgradeable|NameVirtualHost|NoProxy|Options|Order|OutputSed|PassEnv|PidFile|PrivilegesMode|Protocol|ProtocolEcho|Proxy(?:AddHeaders|BadHeader|Block|Domain|ErrorOverride|ExpressDBMFile|ExpressDBMType|ExpressEnable|FtpDirCharset|FtpEscapeWildcards|FtpListOnWildcard|HTML(?:BufSize|CharsetOut|DocType|Enable|Events|Extended|Fixups|Interp|Links|Meta|StripComments|URLMap)|IOBufferSize|MaxForwards|Pass(?:Inherit|InterpolateEnv|Match|Reverse|ReverseCookieDomain|ReverseCookiePath)?|PreserveHost|ReceiveBufferSize|Remote|RemoteMatch|Requests|SCGIInternalRedirect|SCGISendfile|Set|SourceAddress|Status|Timeout|Via)|RLimitCPU|RLimitMEM|RLimitNPROC|ReadmeName|ReceiveBufferSize|Redirect|RedirectMatch|RedirectPermanent|RedirectTemp|ReflectorHeader|RemoteIP(?:Header|InternalProxy|InternalProxyList|ProxiesHeader|TrustedProxy|TrustedProxyList)|RemoveCharset|RemoveEncoding|RemoveHandler|RemoveInputFilter|RemoveLanguage|RemoveOutputFilter|RemoveType|RequestHeader|RequestReadTimeout|Require|Rewrite(?:Base|Cond|Engine|Map|Options|Rule)|SSIETag|SSIEndTag|SSIErrorMsg|SSILastModified|SSILegacyExprParser|SSIStartTag|SSITimeFormat|SSIUndefinedEcho|SSL(?:CACertificateFile|CACertificatePath|CADNRequestFile|CADNRequestPath|CARevocationCheck|CARevocationFile|CARevocationPath|CertificateChainFile|CertificateFile|CertificateKeyFile|CipherSuite|Compression|CryptoDevice|Engine|FIPS|HonorCipherOrder|InsecureRenegotiation|OCSP(?:DefaultResponder|Enable|OverrideResponder|ResponderTimeout|ResponseMaxAge|ResponseTimeSkew|UseRequestNonce)|OpenSSLConfCmd|Options|PassPhraseDialog|Protocol|Proxy(?:CACertificateFile|CACertificatePath|CARevocation(?:Check|File|Path)|CheckPeer(?:CN|Expire|Name)|CipherSuite|Engine|MachineCertificate(?:ChainFile|File|Path)|Protocol|Verify|VerifyDepth)|RandomSeed|RenegBufferSize|Require|RequireSSL|SRPUnknownUserSeed|SRPVerifierFile|Session(?:Cache|CacheTimeout|TicketKeyFile|Tickets)|Stapling(?:Cache|ErrorCacheTimeout|FakeTryLater|ForceURL|ResponderTimeout|ResponseMaxAge|ResponseTimeSkew|ReturnResponderErrors|StandardCacheTimeout)|StrictSNIVHostCheck|UseStapling|UserName|VerifyClient|VerifyDepth)|Satisfy|ScoreBoardFile|Script(?:Alias|AliasMatch|InterpreterSource|Log|LogBuffer|LogLength|Sock)?|SecureListen|SeeRequestTail|SendBufferSize|Server(?:Admin|Alias|Limit|Name|Path|Root|Signature|Tokens)|Session(?:Cookie(?:Name|Name2|Remove)|Crypto(?:Cipher|Driver|Passphrase|PassphraseFile)|DBD(?:CookieName|CookieName2|CookieRemove|DeleteLabel|InsertLabel|PerUser|SelectLabel|UpdateLabel)|Env|Exclude|Header|Include|MaxAge)?|SetEnv|SetEnvIf|SetEnvIfExpr|SetEnvIfNoCase|SetHandler|SetInputFilter|SetOutputFilter|StartServers|StartThreads|Substitute|Suexec|SuexecUserGroup|ThreadLimit|ThreadStackSize|ThreadsPerChild|TimeOut|TraceEnable|TransferLog|TypesConfig|UnDefine|UndefMacro|UnsetEnv|Use|UseCanonicalName|UseCanonicalPhysicalPort|User|UserDir|VHostCGIMode|VHostCGIPrivs|VHostGroup|VHostPrivs|VHostSecure|VHostUser|Virtual(?:DocumentRoot|ScriptAlias)(?:IP)?|WatchdogInterval|XBitHack|xml2EncAlias|xml2EncDefault|xml2StartParse)\b/im,lookbehind:!0,alias:"property"},"directive-block":{pattern:/<\/?\b(?:Auth[nz]ProviderAlias|Directory|DirectoryMatch|Else|ElseIf|Files|FilesMatch|If|IfDefine|IfModule|IfVersion|Limit|LimitExcept|Location|LocationMatch|Macro|Proxy|Require(?:All|Any|None)|VirtualHost)\b *.*>/i,inside:{"directive-block":{pattern:/^<\/?\w+/,inside:{punctuation:/^<\/?/},alias:"tag"},"directive-block-parameter":{pattern:/.*[^>]/,inside:{punctuation:/:/,string:{pattern:/("|').*\1/,inside:{variable:/[$%]\{?(?:\w\.?[-+:]?)+\}?/}}},alias:"attr-value"},punctuation:/>/},alias:"tag"},"directive-flags":{pattern:/\[(?:[\w=],?)+\]/,alias:"keyword"},string:{pattern:/("|').*\1/,inside:{variable:/[$%]\{?(?:\w\.?[-+:]?)+\}?/}},variable:/[$%]\{?(?:\w\.?[-+:]?)+\}?/,regex:/\^?.*\$|\^.*\$?/}; \ No newline at end of file diff --git a/tests/languages/apacheconf/directive-flags_feature.test b/tests/languages/apacheconf/directive-flags_feature.test index 0bb206ecba..69ae37eed4 100644 --- a/tests/languages/apacheconf/directive-flags_feature.test +++ b/tests/languages/apacheconf/directive-flags_feature.test @@ -1,13 +1,15 @@ [OR] [L,QSA] +[L,R=301,NC] ---------------------------------------------------- [ ["directive-flags", "[OR]"], - ["directive-flags", "[L,QSA]"] + ["directive-flags", "[L,QSA]"], + ["directive-flags", "[L,R=301,NC]"] ] ---------------------------------------------------- -Checks for directive flags. \ No newline at end of file +Checks for directive flags. From 8e1f38ff44233dac3db82c2e663d56740563bbbc Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Wed, 4 Nov 2020 11:44:43 +0100 Subject: [PATCH 0652/1100] Website: Updated and improved guide on "Extending Prism" page (#2586) --- extending.html | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/extending.html b/extending.html index 6005a6ed3c..35d7463ac6 100644 --- a/extending.html +++ b/extending.html @@ -129,7 +129,7 @@

            Creating a new language definition

            This will make your language available to the test page, or more precise: your local version of it. You can open your local test.html page in any browser, select your language, and see how your language definition highlights any code you input.

            -

            Note: You have to reload the test page to apply changes made to prism-foo-bar.js but you don't have to rebuild Prism itself. However, if you change components.json (e.g. because you added a dependency) then these changes will not show up until you rebuild Prism.

            +

            Note: You have to reload the test page to apply changes made to prism-foo-bar.js but you don't have to rebuild Prism itself. However, if you change components.json (e.g. because you added a dependency) then these changes will not show up on the test page until you rebuild Prism.

          • Write the language definition.

            @@ -172,7 +172,7 @@

            Creating a new language definition

            }
        • -

          Add some tests.

          +

          Adding tests.

          Create a folder tests/languages/foo-bar/. This is where your test files will live. The test format and how to run tests is described here.

          @@ -184,8 +184,6 @@

          Creating a new language definition

          ---------------------------------------------------- -[ "JSON of the simplified token stream. We will add this later." ] - ---------------------------------------------------- Brief description.
          @@ -197,30 +195,30 @@

          Creating a new language definition

          Add the code to test and a brief description.

        • -

          Verify that your language definition correctly highlights the test code. This can be done using the test page.
          +

          Verify that your language definition correctly highlights the test code. This can be done using your local version of the test page.
          Note: Using the Show tokens options, you see the token stream your language definition created.

        • Once you carefully checked that the test case is handled correctly (i.e. by using the test page), run the following command:

          - npm run test:languages -- --language=foo-bar --pretty -

          This command will check only your test files. The new test will fail because the specified JSON is incorrect but the error message of the failed test will also include the JSON of the simplified token stream Prism created. This is what we're after. Replace the current incorrect JSON with the output labeled Token Stream. (Please also adjust the indentation. We use tabs.)

          + npm run test:languages -- --language=foo-bar --accept +

          This command will take the token stream your language definition currently produces and inserted into the test file. The empty space between the two lines separating the code and the description of test case will be replaced with a simplified version of the token stream.

        • -

          Carefully check that the token stream JSON you just inserted is what you expect.

          +

          Carefully check that the inserted token stream JSON is what you expect.

        • -
        • Re-run npm run test:languages -- --language=foo-bar --pretty to verify that the test passes.
        • +
        • Re-run npm run test:languages -- --language=foo-bar to verify that the test passes.
        • -
        • -

          Run npm test to check that all tests pass, not just your language tests.
          - This will usually pass without problems. If you can't get all the tests to pass, skip this step.

          -
        • Add an example page.

          Create a new file examples/prism-foo-bar.html. This will be the template containing the example markup. Just look at other examples to see how these files are structured.
          We don't have any rules as to what counts as an example, so a single Full example section where you present the highlighting of the major features of the language is enough.

        • +
        • +

          Run npm test to check that all tests pass, not just your language tests.
          + This will usually pass without problems. If you can't get all the tests to pass, skip this step.

          +
        • Run npm run build again.

          From 129faf5cbee3199583d8a97089a8ced954c8899c Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Wed, 4 Nov 2020 11:48:51 +0100 Subject: [PATCH 0653/1100] C: Better class name and macro name detection (#2585) --- components/prism-c.js | 13 +++- components/prism-c.min.js | 2 +- components/prism-opencl.js | 13 +++- components/prism-opencl.min.js | 2 +- tests/languages/c/class-name_feature.test | 22 +++++- tests/languages/c/macro_feature.test | 27 +++++-- .../opencl/builtin-type_feature.test | 71 ++++++++++++++++++ tests/languages/opencl/keyword_feature.test | 74 ++----------------- 8 files changed, 138 insertions(+), 86 deletions(-) create mode 100644 tests/languages/opencl/builtin-type_feature.test diff --git a/components/prism-c.js b/components/prism-c.js index 53245c6d27..9b1d795ab3 100644 --- a/components/prism-c.js +++ b/components/prism-c.js @@ -4,7 +4,7 @@ Prism.languages.c = Prism.languages.extend('clike', { greedy: true }, 'class-name': { - pattern: /(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+/, + pattern: /(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/, lookbehind: true }, 'keyword': /\b(?:__attribute__|_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|asm|typeof|inline|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|union|unsigned|void|volatile|while)\b/, @@ -31,6 +31,17 @@ Prism.languages.insertBefore('c', 'string', { Prism.languages.c['string'] ], 'comment': Prism.languages.c['comment'], + 'macro-name': [ + { + pattern: /(^#\s*define\s+)\w+\b(?!\()/i, + lookbehind: true + }, + { + pattern: /(^#\s*define\s+)\w+\b(?=\()/i, + lookbehind: true, + alias: 'function' + } + ], // highlight macro directives as keywords 'directive': { pattern: /^(#\s*)[a-z]+/, diff --git a/components/prism-c.min.js b/components/prism-c.min.js index 6a4fff5e78..cf57105f89 100644 --- a/components/prism-c.min.js +++ b/components/prism-c.min.js @@ -1 +1 @@ -Prism.languages.c=Prism.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+/,lookbehind:!0},keyword:/\b(?:__attribute__|_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|asm|typeof|inline|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|union|unsigned|void|volatile|while)\b/,function:/[a-z_]\w*(?=\s*\()/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/,number:/(?:\b0x(?:[\da-f]+\.?[\da-f]*|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?)[ful]*/i}),Prism.languages.insertBefore("c","string",{macro:{pattern:/(^\s*)#\s*[a-z]+(?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},Prism.languages.c.string],comment:Prism.languages.c.comment,directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:Prism.languages.c}}},constant:/\b(?:__FILE__|__LINE__|__DATE__|__TIME__|__TIMESTAMP__|__func__|EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|stdin|stdout|stderr)\b/}),delete Prism.languages.c.boolean; \ No newline at end of file +Prism.languages.c=Prism.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:__attribute__|_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|asm|typeof|inline|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|union|unsigned|void|volatile|while)\b/,function:/[a-z_]\w*(?=\s*\()/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/,number:/(?:\b0x(?:[\da-f]+\.?[\da-f]*|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?)[ful]*/i}),Prism.languages.insertBefore("c","string",{macro:{pattern:/(^\s*)#\s*[a-z]+(?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},Prism.languages.c.string],comment:Prism.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:Prism.languages.c}}},constant:/\b(?:__FILE__|__LINE__|__DATE__|__TIME__|__TIMESTAMP__|__func__|EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|stdin|stdout|stderr)\b/}),delete Prism.languages.c.boolean; \ No newline at end of file diff --git a/components/prism-opencl.js b/components/prism-opencl.js index b6247b20b1..347b54924e 100644 --- a/components/prism-opencl.js +++ b/components/prism-opencl.js @@ -2,9 +2,7 @@ /* OpenCL kernel language */ Prism.languages.opencl = Prism.languages.extend('c', { // Extracted from the official specs (2.0) and http://streamcomputing.eu/downloads/?opencl.lang (opencl-keywords, opencl-types) and http://sourceforge.net/tracker/?func=detail&aid=2957794&group_id=95717&atid=612384 (Words2, partly Words3) - // https://www.khronos.org/registry/OpenCL/sdk/2.1/docs/man/xhtml/scalarDataTypes.html - // https://www.khronos.org/registry/OpenCL/sdk/2.1/docs/man/xhtml/otherDataTypes.html - 'keyword': /\b(?:__attribute__|(?:__)?(?:constant|global|kernel|local|private|read_only|read_write|write_only)|_cl_(?:command_queue|context|device_id|event|kernel|mem|platform_id|program|sampler)|auto|break|case|cl_(?:image_format|mem_fence_flags)|clk_event_t|complex|const|continue|default|do|(?:float|double)(?:16(?:x(?:1|16|2|4|8))?|1x(?:1|16|2|4|8)|2(?:x(?:1|16|2|4|8))?|3|4(?:x(?:1|16|2|4|8))?|8(?:x(?:1|16|2|4|8))?)?|else|enum|event_t|extern|for|goto|(?:u?(?:char|short|int|long)|half|quad|bool)(?:2|3|4|8|16)?|if|image(?:1d_(?:array_|buffer_)?t|2d_(?:array_(?:depth_|msaa_depth_|msaa_)?|depth_|msaa_depth_|msaa_)?t|3d_t)|imaginary|inline|intptr_t|ndrange_t|packed|pipe|ptrdiff_t|queue_t|register|reserve_id_t|restrict|return|sampler_t|signed|size_t|sizeof|static|struct|switch|typedef|uintptr_t|uniform|union|unsigned|void|volatile|while)\b/, + 'keyword': /\b(?:__attribute__|(?:__)?(?:constant|global|kernel|local|private|read_only|read_write|write_only)|auto|break|case|complex|const|continue|default|do|(?:float|double)(?:16(?:x(?:1|16|2|4|8))?|1x(?:1|16|2|4|8)|2(?:x(?:1|16|2|4|8))?|3|4(?:x(?:1|16|2|4|8))?|8(?:x(?:1|16|2|4|8))?)?|else|enum|extern|for|goto|(?:u?(?:char|short|int|long)|half|quad|bool)(?:2|3|4|8|16)?|if|imaginary|inline|packed|pipe|register|restrict|return|signed|sizeof|static|struct|switch|typedef|uniform|union|unsigned|void|volatile|while)\b/, // Extracted from http://streamcomputing.eu/downloads/?opencl.lang (opencl-const) // Math Constants: https://www.khronos.org/registry/OpenCL/sdk/2.1/docs/man/xhtml/mathConstants.html // Macros and Limits: https://www.khronos.org/registry/OpenCL/sdk/2.1/docs/man/xhtml/macroLimits.html @@ -16,6 +14,15 @@ 'number': /(?:\b0x(?:[\da-f]+\.?[\da-f]*|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?)[fuhl]*/i }); + Prism.languages.insertBefore('opencl', 'class-name', { + // https://www.khronos.org/registry/OpenCL/sdk/2.1/docs/man/xhtml/scalarDataTypes.html + // https://www.khronos.org/registry/OpenCL/sdk/2.1/docs/man/xhtml/otherDataTypes.html + 'builtin-type': { + pattern: /\b(?:_cl_(?:command_queue|context|device_id|event|kernel|mem|platform_id|program|sampler)|cl_(?:image_format|mem_fence_flags)|clk_event_t|event_t|image(?:1d_(?:array_|buffer_)?t|2d_(?:array_(?:depth_|msaa_depth_|msaa_)?|depth_|msaa_depth_|msaa_)?t|3d_t)|intptr_t|ndrange_t|ptrdiff_t|queue_t|reserve_id_t|sampler_t|size_t|uintptr_t)\b/, + alias: 'keyword' + } + }); + var attributes = { // Extracted from http://streamcomputing.eu/downloads/?opencl_host.lang (opencl-types and opencl-host) 'type-opencl-host': { diff --git a/components/prism-opencl.min.js b/components/prism-opencl.min.js index f70d8615e5..d779e17ff1 100644 --- a/components/prism-opencl.min.js +++ b/components/prism-opencl.min.js @@ -1 +1 @@ -!function(E){E.languages.opencl=E.languages.extend("c",{keyword:/\b(?:__attribute__|(?:__)?(?:constant|global|kernel|local|private|read_only|read_write|write_only)|_cl_(?:command_queue|context|device_id|event|kernel|mem|platform_id|program|sampler)|auto|break|case|cl_(?:image_format|mem_fence_flags)|clk_event_t|complex|const|continue|default|do|(?:float|double)(?:16(?:x(?:1|16|2|4|8))?|1x(?:1|16|2|4|8)|2(?:x(?:1|16|2|4|8))?|3|4(?:x(?:1|16|2|4|8))?|8(?:x(?:1|16|2|4|8))?)?|else|enum|event_t|extern|for|goto|(?:u?(?:char|short|int|long)|half|quad|bool)(?:2|3|4|8|16)?|if|image(?:1d_(?:array_|buffer_)?t|2d_(?:array_(?:depth_|msaa_depth_|msaa_)?|depth_|msaa_depth_|msaa_)?t|3d_t)|imaginary|inline|intptr_t|ndrange_t|packed|pipe|ptrdiff_t|queue_t|register|reserve_id_t|restrict|return|sampler_t|signed|size_t|sizeof|static|struct|switch|typedef|uintptr_t|uniform|union|unsigned|void|volatile|while)\b/,"constant-opencl-kernel":{pattern:/\b(?:CHAR_(?:BIT|MAX|MIN)|CLK_(?:ADDRESS_(?:CLAMP(?:_TO_EDGE)?|NONE|REPEAT)|FILTER_(?:LINEAR|NEAREST)|(?:LOCAL|GLOBAL)_MEM_FENCE|NORMALIZED_COORDS_(?:FALSE|TRUE))|CL_(?:BGRA|(?:HALF_)?FLOAT|INTENSITY|LUMINANCE|A?R?G?B?[Ax]?|(?:(?:UN)?SIGNED|[US]NORM)_(?:INT(?:8|16|32))|UNORM_(?:INT_101010|SHORT_(?:555|565)))|(?:DBL|FLT|HALF)_(?:DIG|EPSILON|MANT_DIG|(?:MIN|MAX)(?:(?:_10)?_EXP)?)|FLT_RADIX|HUGE_VALF?|INFINITY|(?:INT|LONG|SCHAR|SHRT)_(?:MAX|MIN)|(?:UCHAR|USHRT|UINT|ULONG)_MAX|MAXFLOAT|M_(?:[12]_PI|2_SQRTPI|E|LN(?:2|10)|LOG(?:10|2)E?|PI(?:_[24])?|SQRT(?:1_2|2))(?:_F|_H)?|NAN)\b/,alias:"constant"},boolean:/\b(?:false|true)\b/,number:/(?:\b0x(?:[\da-f]+\.?[\da-f]*|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?)[fuhl]*/i});var _={"type-opencl-host":{pattern:/\b(?:cl_(?:GLenum|GLint|GLuin|addressing_mode|bitfield|bool|buffer_create_type|build_status|channel_(?:order|type)|(?:u?(?:char|short|int|long)|float|double)(?:2|3|4|8|16)?|command_(?:queue(?:_info|_properties)?|type)|context(?:_info|_properties)?|device_(?:exec_capabilities|fp_config|id|info|local_mem_type|mem_cache_type|type)|(?:event|sampler)(?:_info)?|filter_mode|half|image_info|kernel(?:_info|_work_group_info)?|map_flags|mem(?:_flags|_info|_object_type)?|platform_(?:id|info)|profiling_info|program(?:_build_info|_info)?))\b/,alias:"keyword"},"boolean-opencl-host":{pattern:/\bCL_(?:TRUE|FALSE)\b/,alias:"boolean"},"constant-opencl-host":{pattern:/\bCL_(?:A|ABGR|ADDRESS_(?:CLAMP(?:_TO_EDGE)?|MIRRORED_REPEAT|NONE|REPEAT)|ARGB|BGRA|BLOCKING|BUFFER_CREATE_TYPE_REGION|BUILD_(?:ERROR|IN_PROGRESS|NONE|PROGRAM_FAILURE|SUCCESS)|COMMAND_(?:ACQUIRE_GL_OBJECTS|BARRIER|COPY_(?:BUFFER(?:_RECT|_TO_IMAGE)?|IMAGE(?:_TO_BUFFER)?)|FILL_(?:BUFFER|IMAGE)|MAP(?:_BUFFER|_IMAGE)|MARKER|MIGRATE(?:_SVM)?_MEM_OBJECTS|NATIVE_KERNEL|NDRANGE_KERNEL|READ_(?:BUFFER(?:_RECT)?|IMAGE)|RELEASE_GL_OBJECTS|SVM_(?:FREE|MAP|MEMCPY|MEMFILL|UNMAP)|TASK|UNMAP_MEM_OBJECT|USER|WRITE_(?:BUFFER(?:_RECT)?|IMAGE))|COMPILER_NOT_AVAILABLE|COMPILE_PROGRAM_FAILURE|COMPLETE|CONTEXT_(?:DEVICES|INTEROP_USER_SYNC|NUM_DEVICES|PLATFORM|PROPERTIES|REFERENCE_COUNT)|DEPTH(?:_STENCIL)?|DEVICE_(?:ADDRESS_BITS|AFFINITY_DOMAIN_(?:L[1-4]_CACHE|NEXT_PARTITIONABLE|NUMA)|AVAILABLE|BUILT_IN_KERNELS|COMPILER_AVAILABLE|DOUBLE_FP_CONFIG|ENDIAN_LITTLE|ERROR_CORRECTION_SUPPORT|EXECUTION_CAPABILITIES|EXTENSIONS|GLOBAL_(?:MEM_(?:CACHELINE_SIZE|CACHE_SIZE|CACHE_TYPE|SIZE)|VARIABLE_PREFERRED_TOTAL_SIZE)|HOST_UNIFIED_MEMORY|IL_VERSION|IMAGE(?:2D_MAX_(?:HEIGHT|WIDTH)|3D_MAX_(?:DEPTH|HEIGHT|WIDTH)|_BASE_ADDRESS_ALIGNMENT|_MAX_ARRAY_SIZE|_MAX_BUFFER_SIZE|_PITCH_ALIGNMENT|_SUPPORT)|LINKER_AVAILABLE|LOCAL_MEM_SIZE|LOCAL_MEM_TYPE|MAX_(?:CLOCK_FREQUENCY|COMPUTE_UNITS|CONSTANT_ARGS|CONSTANT_BUFFER_SIZE|GLOBAL_VARIABLE_SIZE|MEM_ALLOC_SIZE|NUM_SUB_GROUPS|ON_DEVICE_(?:EVENTS|QUEUES)|PARAMETER_SIZE|PIPE_ARGS|READ_IMAGE_ARGS|READ_WRITE_IMAGE_ARGS|SAMPLERS|WORK_GROUP_SIZE|WORK_ITEM_DIMENSIONS|WORK_ITEM_SIZES|WRITE_IMAGE_ARGS)|MEM_BASE_ADDR_ALIGN|MIN_DATA_TYPE_ALIGN_SIZE|NAME|NATIVE_VECTOR_WIDTH_(?:CHAR|DOUBLE|FLOAT|HALF|INT|LONG|SHORT)|NOT_(?:AVAILABLE|FOUND)|OPENCL_C_VERSION|PARENT_DEVICE|PARTITION_(?:AFFINITY_DOMAIN|BY_AFFINITY_DOMAIN|BY_COUNTS|BY_COUNTS_LIST_END|EQUALLY|FAILED|MAX_SUB_DEVICES|PROPERTIES|TYPE)|PIPE_MAX_(?:ACTIVE_RESERVATIONS|PACKET_SIZE)|PLATFORM|PREFERRED_(?:GLOBAL_ATOMIC_ALIGNMENT|INTEROP_USER_SYNC|LOCAL_ATOMIC_ALIGNMENT|PLATFORM_ATOMIC_ALIGNMENT|VECTOR_WIDTH_(?:CHAR|DOUBLE|FLOAT|HALF|INT|LONG|SHORT))|PRINTF_BUFFER_SIZE|PROFILE|PROFILING_TIMER_RESOLUTION|QUEUE_(?:ON_(?:DEVICE_(?:MAX_SIZE|PREFERRED_SIZE|PROPERTIES)|HOST_PROPERTIES)|PROPERTIES)|REFERENCE_COUNT|SINGLE_FP_CONFIG|SUB_GROUP_INDEPENDENT_FORWARD_PROGRESS|SVM_(?:ATOMICS|CAPABILITIES|COARSE_GRAIN_BUFFER|FINE_GRAIN_BUFFER|FINE_GRAIN_SYSTEM)|TYPE(?:_ACCELERATOR|_ALL|_CPU|_CUSTOM|_DEFAULT|_GPU)?|VENDOR(?:_ID)?|VERSION)|DRIVER_VERSION|EVENT_(?:COMMAND_(?:EXECUTION_STATUS|QUEUE|TYPE)|CONTEXT|REFERENCE_COUNT)|EXEC_(?:KERNEL|NATIVE_KERNEL|STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST)|FILTER_(?:LINEAR|NEAREST)|FLOAT|FP_(?:CORRECTLY_ROUNDED_DIVIDE_SQRT|DENORM|FMA|INF_NAN|ROUND_TO_INF|ROUND_TO_NEAREST|ROUND_TO_ZERO|SOFT_FLOAT)|GLOBAL|HALF_FLOAT|IMAGE_(?:ARRAY_SIZE|BUFFER|DEPTH|ELEMENT_SIZE|FORMAT|FORMAT_MISMATCH|FORMAT_NOT_SUPPORTED|HEIGHT|NUM_MIP_LEVELS|NUM_SAMPLES|ROW_PITCH|SLICE_PITCH|WIDTH)|INTENSITY|INVALID_(?:ARG_INDEX|ARG_SIZE|ARG_VALUE|BINARY|BUFFER_SIZE|BUILD_OPTIONS|COMMAND_QUEUE|COMPILER_OPTIONS|CONTEXT|DEVICE|DEVICE_PARTITION_COUNT|DEVICE_QUEUE|DEVICE_TYPE|EVENT|EVENT_WAIT_LIST|GLOBAL_OFFSET|GLOBAL_WORK_SIZE|GL_OBJECT|HOST_PTR|IMAGE_DESCRIPTOR|IMAGE_FORMAT_DESCRIPTOR|IMAGE_SIZE|KERNEL|KERNEL_ARGS|KERNEL_DEFINITION|KERNEL_NAME|LINKER_OPTIONS|MEM_OBJECT|MIP_LEVEL|OPERATION|PIPE_SIZE|PLATFORM|PROGRAM|PROGRAM_EXECUTABLE|PROPERTY|QUEUE_PROPERTIES|SAMPLER|VALUE|WORK_DIMENSION|WORK_GROUP_SIZE|WORK_ITEM_SIZE)|KERNEL_(?:ARG_(?:ACCESS_(?:NONE|QUALIFIER|READ_ONLY|READ_WRITE|WRITE_ONLY)|ADDRESS_(?:CONSTANT|GLOBAL|LOCAL|PRIVATE|QUALIFIER)|INFO_NOT_AVAILABLE|NAME|TYPE_(?:CONST|NAME|NONE|PIPE|QUALIFIER|RESTRICT|VOLATILE))|ATTRIBUTES|COMPILE_NUM_SUB_GROUPS|COMPILE_WORK_GROUP_SIZE|CONTEXT|EXEC_INFO_SVM_FINE_GRAIN_SYSTEM|EXEC_INFO_SVM_PTRS|FUNCTION_NAME|GLOBAL_WORK_SIZE|LOCAL_MEM_SIZE|LOCAL_SIZE_FOR_SUB_GROUP_COUNT|MAX_NUM_SUB_GROUPS|MAX_SUB_GROUP_SIZE_FOR_NDRANGE|NUM_ARGS|PREFERRED_WORK_GROUP_SIZE_MULTIPLE|PRIVATE_MEM_SIZE|PROGRAM|REFERENCE_COUNT|SUB_GROUP_COUNT_FOR_NDRANGE|WORK_GROUP_SIZE)|LINKER_NOT_AVAILABLE|LINK_PROGRAM_FAILURE|LOCAL|LUMINANCE|MAP_(?:FAILURE|READ|WRITE|WRITE_INVALIDATE_REGION)|MEM_(?:ALLOC_HOST_PTR|ASSOCIATED_MEMOBJECT|CONTEXT|COPY_HOST_PTR|COPY_OVERLAP|FLAGS|HOST_NO_ACCESS|HOST_PTR|HOST_READ_ONLY|HOST_WRITE_ONLY|KERNEL_READ_AND_WRITE|MAP_COUNT|OBJECT_(?:ALLOCATION_FAILURE|BUFFER|IMAGE1D|IMAGE1D_ARRAY|IMAGE1D_BUFFER|IMAGE2D|IMAGE2D_ARRAY|IMAGE3D|PIPE)|OFFSET|READ_ONLY|READ_WRITE|REFERENCE_COUNT|SIZE|SVM_ATOMICS|SVM_FINE_GRAIN_BUFFER|TYPE|USES_SVM_POINTER|USE_HOST_PTR|WRITE_ONLY)|MIGRATE_MEM_OBJECT_(?:CONTENT_UNDEFINED|HOST)|MISALIGNED_SUB_BUFFER_OFFSET|NONE|NON_BLOCKING|OUT_OF_(?:HOST_MEMORY|RESOURCES)|PIPE_(?:MAX_PACKETS|PACKET_SIZE)|PLATFORM_(?:EXTENSIONS|HOST_TIMER_RESOLUTION|NAME|PROFILE|VENDOR|VERSION)|PROFILING_(?:COMMAND_(?:COMPLETE|END|QUEUED|START|SUBMIT)|INFO_NOT_AVAILABLE)|PROGRAM_(?:BINARIES|BINARY_SIZES|BINARY_TYPE(?:_COMPILED_OBJECT|_EXECUTABLE|_LIBRARY|_NONE)?|BUILD_(?:GLOBAL_VARIABLE_TOTAL_SIZE|LOG|OPTIONS|STATUS)|CONTEXT|DEVICES|IL|KERNEL_NAMES|NUM_DEVICES|NUM_KERNELS|REFERENCE_COUNT|SOURCE)|QUEUED|QUEUE_(?:CONTEXT|DEVICE|DEVICE_DEFAULT|ON_DEVICE|ON_DEVICE_DEFAULT|OUT_OF_ORDER_EXEC_MODE_ENABLE|PROFILING_ENABLE|PROPERTIES|REFERENCE_COUNT|SIZE)|R|RA|READ_(?:ONLY|WRITE)_CACHE|RG|RGB|RGBA|RGBx|RGx|RUNNING|Rx|SAMPLER_(?:ADDRESSING_MODE|CONTEXT|FILTER_MODE|LOD_MAX|LOD_MIN|MIP_FILTER_MODE|NORMALIZED_COORDS|REFERENCE_COUNT)|(?:UN)?SIGNED_INT(?:8|16|32)|SNORM_INT(?:8|16)|SUBMITTED|SUCCESS|UNORM_INT(?:16|24|8|_101010|_101010_2)|UNORM_SHORT_(?:555|565)|VERSION_(?:1_0|1_1|1_2|2_0|2_1)|sBGRA|sRGB|sRGBA|sRGBx)\b/,alias:"constant"},"function-opencl-host":{pattern:/\bcl(?:BuildProgram|CloneKernel|CompileProgram|Create(?:Buffer|CommandQueue(?:WithProperties)?|Context|ContextFromType|Image|Image2D|Image3D|Kernel|KernelsInProgram|Pipe|ProgramWith(?:Binary|BuiltInKernels|IL|Source)|Sampler|SamplerWithProperties|SubBuffer|SubDevices|UserEvent)|Enqueue(?:(?:Barrier|Marker)(?:WithWaitList)?|Copy(?:Buffer(?:Rect|ToImage)?|Image(?:ToBuffer)?)|(?:Fill|Map)(?:Buffer|Image)|MigrateMemObjects|NDRangeKernel|NativeKernel|(?:Read|Write)(?:Buffer(?:Rect)?|Image)|SVM(?:Free|Map|MemFill|Memcpy|MigrateMem|Unmap)|Task|UnmapMemObject|WaitForEvents)|Finish|Flush|Get(?:CommandQueueInfo|ContextInfo|Device(?:AndHostTimer|IDs|Info)|Event(?:Profiling)?Info|ExtensionFunctionAddress(?:ForPlatform)?|HostTimer|ImageInfo|Kernel(?:ArgInfo|Info|SubGroupInfo|WorkGroupInfo)|MemObjectInfo|PipeInfo|Platform(?:IDs|Info)|Program(?:Build)?Info|SamplerInfo|SupportedImageFormats)|LinkProgram|(?:Release|Retain)(?:CommandQueue|Context|Device|Event|Kernel|MemObject|Program|Sampler)|SVM(?:Alloc|Free)|Set(?:CommandQueueProperty|DefaultDeviceCommandQueue|EventCallback|Kernel(?:Arg(?:SVMPointer)?|ExecInfo)|Kernel|MemObjectDestructorCallback|UserEventStatus)|Unload(?:Platform)?Compiler|WaitForEvents)\b/,alias:"function"}};E.languages.insertBefore("c","keyword",_),E.languages.cpp&&(_["type-opencl-host-cpp"]={pattern:/\b(?:Buffer|BufferGL|BufferRenderGL|CommandQueue|Context|Device|DeviceCommandQueue|EnqueueArgs|Event|Image|Image1D|Image1DArray|Image1DBuffer|Image2D|Image2DArray|Image2DGL|Image3D|Image3DGL|ImageFormat|ImageGL|Kernel|KernelFunctor|LocalSpaceArg|Memory|NDRange|Pipe|Platform|Program|Sampler|SVMAllocator|SVMTraitAtomic|SVMTraitCoarse|SVMTraitFine|SVMTraitReadOnly|SVMTraitReadWrite|SVMTraitWriteOnly|UserEvent)\b/,alias:"keyword"},E.languages.insertBefore("cpp","keyword",_))}(Prism); \ No newline at end of file +!function(E){E.languages.opencl=E.languages.extend("c",{keyword:/\b(?:__attribute__|(?:__)?(?:constant|global|kernel|local|private|read_only|read_write|write_only)|auto|break|case|complex|const|continue|default|do|(?:float|double)(?:16(?:x(?:1|16|2|4|8))?|1x(?:1|16|2|4|8)|2(?:x(?:1|16|2|4|8))?|3|4(?:x(?:1|16|2|4|8))?|8(?:x(?:1|16|2|4|8))?)?|else|enum|extern|for|goto|(?:u?(?:char|short|int|long)|half|quad|bool)(?:2|3|4|8|16)?|if|imaginary|inline|packed|pipe|register|restrict|return|signed|sizeof|static|struct|switch|typedef|uniform|union|unsigned|void|volatile|while)\b/,"constant-opencl-kernel":{pattern:/\b(?:CHAR_(?:BIT|MAX|MIN)|CLK_(?:ADDRESS_(?:CLAMP(?:_TO_EDGE)?|NONE|REPEAT)|FILTER_(?:LINEAR|NEAREST)|(?:LOCAL|GLOBAL)_MEM_FENCE|NORMALIZED_COORDS_(?:FALSE|TRUE))|CL_(?:BGRA|(?:HALF_)?FLOAT|INTENSITY|LUMINANCE|A?R?G?B?[Ax]?|(?:(?:UN)?SIGNED|[US]NORM)_(?:INT(?:8|16|32))|UNORM_(?:INT_101010|SHORT_(?:555|565)))|(?:DBL|FLT|HALF)_(?:DIG|EPSILON|MANT_DIG|(?:MIN|MAX)(?:(?:_10)?_EXP)?)|FLT_RADIX|HUGE_VALF?|INFINITY|(?:INT|LONG|SCHAR|SHRT)_(?:MAX|MIN)|(?:UCHAR|USHRT|UINT|ULONG)_MAX|MAXFLOAT|M_(?:[12]_PI|2_SQRTPI|E|LN(?:2|10)|LOG(?:10|2)E?|PI(?:_[24])?|SQRT(?:1_2|2))(?:_F|_H)?|NAN)\b/,alias:"constant"},boolean:/\b(?:false|true)\b/,number:/(?:\b0x(?:[\da-f]+\.?[\da-f]*|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?)[fuhl]*/i}),E.languages.insertBefore("opencl","class-name",{"builtin-type":{pattern:/\b(?:_cl_(?:command_queue|context|device_id|event|kernel|mem|platform_id|program|sampler)|cl_(?:image_format|mem_fence_flags)|clk_event_t|event_t|image(?:1d_(?:array_|buffer_)?t|2d_(?:array_(?:depth_|msaa_depth_|msaa_)?|depth_|msaa_depth_|msaa_)?t|3d_t)|intptr_t|ndrange_t|ptrdiff_t|queue_t|reserve_id_t|sampler_t|size_t|uintptr_t)\b/,alias:"keyword"}});var _={"type-opencl-host":{pattern:/\b(?:cl_(?:GLenum|GLint|GLuin|addressing_mode|bitfield|bool|buffer_create_type|build_status|channel_(?:order|type)|(?:u?(?:char|short|int|long)|float|double)(?:2|3|4|8|16)?|command_(?:queue(?:_info|_properties)?|type)|context(?:_info|_properties)?|device_(?:exec_capabilities|fp_config|id|info|local_mem_type|mem_cache_type|type)|(?:event|sampler)(?:_info)?|filter_mode|half|image_info|kernel(?:_info|_work_group_info)?|map_flags|mem(?:_flags|_info|_object_type)?|platform_(?:id|info)|profiling_info|program(?:_build_info|_info)?))\b/,alias:"keyword"},"boolean-opencl-host":{pattern:/\bCL_(?:TRUE|FALSE)\b/,alias:"boolean"},"constant-opencl-host":{pattern:/\bCL_(?:A|ABGR|ADDRESS_(?:CLAMP(?:_TO_EDGE)?|MIRRORED_REPEAT|NONE|REPEAT)|ARGB|BGRA|BLOCKING|BUFFER_CREATE_TYPE_REGION|BUILD_(?:ERROR|IN_PROGRESS|NONE|PROGRAM_FAILURE|SUCCESS)|COMMAND_(?:ACQUIRE_GL_OBJECTS|BARRIER|COPY_(?:BUFFER(?:_RECT|_TO_IMAGE)?|IMAGE(?:_TO_BUFFER)?)|FILL_(?:BUFFER|IMAGE)|MAP(?:_BUFFER|_IMAGE)|MARKER|MIGRATE(?:_SVM)?_MEM_OBJECTS|NATIVE_KERNEL|NDRANGE_KERNEL|READ_(?:BUFFER(?:_RECT)?|IMAGE)|RELEASE_GL_OBJECTS|SVM_(?:FREE|MAP|MEMCPY|MEMFILL|UNMAP)|TASK|UNMAP_MEM_OBJECT|USER|WRITE_(?:BUFFER(?:_RECT)?|IMAGE))|COMPILER_NOT_AVAILABLE|COMPILE_PROGRAM_FAILURE|COMPLETE|CONTEXT_(?:DEVICES|INTEROP_USER_SYNC|NUM_DEVICES|PLATFORM|PROPERTIES|REFERENCE_COUNT)|DEPTH(?:_STENCIL)?|DEVICE_(?:ADDRESS_BITS|AFFINITY_DOMAIN_(?:L[1-4]_CACHE|NEXT_PARTITIONABLE|NUMA)|AVAILABLE|BUILT_IN_KERNELS|COMPILER_AVAILABLE|DOUBLE_FP_CONFIG|ENDIAN_LITTLE|ERROR_CORRECTION_SUPPORT|EXECUTION_CAPABILITIES|EXTENSIONS|GLOBAL_(?:MEM_(?:CACHELINE_SIZE|CACHE_SIZE|CACHE_TYPE|SIZE)|VARIABLE_PREFERRED_TOTAL_SIZE)|HOST_UNIFIED_MEMORY|IL_VERSION|IMAGE(?:2D_MAX_(?:HEIGHT|WIDTH)|3D_MAX_(?:DEPTH|HEIGHT|WIDTH)|_BASE_ADDRESS_ALIGNMENT|_MAX_ARRAY_SIZE|_MAX_BUFFER_SIZE|_PITCH_ALIGNMENT|_SUPPORT)|LINKER_AVAILABLE|LOCAL_MEM_SIZE|LOCAL_MEM_TYPE|MAX_(?:CLOCK_FREQUENCY|COMPUTE_UNITS|CONSTANT_ARGS|CONSTANT_BUFFER_SIZE|GLOBAL_VARIABLE_SIZE|MEM_ALLOC_SIZE|NUM_SUB_GROUPS|ON_DEVICE_(?:EVENTS|QUEUES)|PARAMETER_SIZE|PIPE_ARGS|READ_IMAGE_ARGS|READ_WRITE_IMAGE_ARGS|SAMPLERS|WORK_GROUP_SIZE|WORK_ITEM_DIMENSIONS|WORK_ITEM_SIZES|WRITE_IMAGE_ARGS)|MEM_BASE_ADDR_ALIGN|MIN_DATA_TYPE_ALIGN_SIZE|NAME|NATIVE_VECTOR_WIDTH_(?:CHAR|DOUBLE|FLOAT|HALF|INT|LONG|SHORT)|NOT_(?:AVAILABLE|FOUND)|OPENCL_C_VERSION|PARENT_DEVICE|PARTITION_(?:AFFINITY_DOMAIN|BY_AFFINITY_DOMAIN|BY_COUNTS|BY_COUNTS_LIST_END|EQUALLY|FAILED|MAX_SUB_DEVICES|PROPERTIES|TYPE)|PIPE_MAX_(?:ACTIVE_RESERVATIONS|PACKET_SIZE)|PLATFORM|PREFERRED_(?:GLOBAL_ATOMIC_ALIGNMENT|INTEROP_USER_SYNC|LOCAL_ATOMIC_ALIGNMENT|PLATFORM_ATOMIC_ALIGNMENT|VECTOR_WIDTH_(?:CHAR|DOUBLE|FLOAT|HALF|INT|LONG|SHORT))|PRINTF_BUFFER_SIZE|PROFILE|PROFILING_TIMER_RESOLUTION|QUEUE_(?:ON_(?:DEVICE_(?:MAX_SIZE|PREFERRED_SIZE|PROPERTIES)|HOST_PROPERTIES)|PROPERTIES)|REFERENCE_COUNT|SINGLE_FP_CONFIG|SUB_GROUP_INDEPENDENT_FORWARD_PROGRESS|SVM_(?:ATOMICS|CAPABILITIES|COARSE_GRAIN_BUFFER|FINE_GRAIN_BUFFER|FINE_GRAIN_SYSTEM)|TYPE(?:_ACCELERATOR|_ALL|_CPU|_CUSTOM|_DEFAULT|_GPU)?|VENDOR(?:_ID)?|VERSION)|DRIVER_VERSION|EVENT_(?:COMMAND_(?:EXECUTION_STATUS|QUEUE|TYPE)|CONTEXT|REFERENCE_COUNT)|EXEC_(?:KERNEL|NATIVE_KERNEL|STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST)|FILTER_(?:LINEAR|NEAREST)|FLOAT|FP_(?:CORRECTLY_ROUNDED_DIVIDE_SQRT|DENORM|FMA|INF_NAN|ROUND_TO_INF|ROUND_TO_NEAREST|ROUND_TO_ZERO|SOFT_FLOAT)|GLOBAL|HALF_FLOAT|IMAGE_(?:ARRAY_SIZE|BUFFER|DEPTH|ELEMENT_SIZE|FORMAT|FORMAT_MISMATCH|FORMAT_NOT_SUPPORTED|HEIGHT|NUM_MIP_LEVELS|NUM_SAMPLES|ROW_PITCH|SLICE_PITCH|WIDTH)|INTENSITY|INVALID_(?:ARG_INDEX|ARG_SIZE|ARG_VALUE|BINARY|BUFFER_SIZE|BUILD_OPTIONS|COMMAND_QUEUE|COMPILER_OPTIONS|CONTEXT|DEVICE|DEVICE_PARTITION_COUNT|DEVICE_QUEUE|DEVICE_TYPE|EVENT|EVENT_WAIT_LIST|GLOBAL_OFFSET|GLOBAL_WORK_SIZE|GL_OBJECT|HOST_PTR|IMAGE_DESCRIPTOR|IMAGE_FORMAT_DESCRIPTOR|IMAGE_SIZE|KERNEL|KERNEL_ARGS|KERNEL_DEFINITION|KERNEL_NAME|LINKER_OPTIONS|MEM_OBJECT|MIP_LEVEL|OPERATION|PIPE_SIZE|PLATFORM|PROGRAM|PROGRAM_EXECUTABLE|PROPERTY|QUEUE_PROPERTIES|SAMPLER|VALUE|WORK_DIMENSION|WORK_GROUP_SIZE|WORK_ITEM_SIZE)|KERNEL_(?:ARG_(?:ACCESS_(?:NONE|QUALIFIER|READ_ONLY|READ_WRITE|WRITE_ONLY)|ADDRESS_(?:CONSTANT|GLOBAL|LOCAL|PRIVATE|QUALIFIER)|INFO_NOT_AVAILABLE|NAME|TYPE_(?:CONST|NAME|NONE|PIPE|QUALIFIER|RESTRICT|VOLATILE))|ATTRIBUTES|COMPILE_NUM_SUB_GROUPS|COMPILE_WORK_GROUP_SIZE|CONTEXT|EXEC_INFO_SVM_FINE_GRAIN_SYSTEM|EXEC_INFO_SVM_PTRS|FUNCTION_NAME|GLOBAL_WORK_SIZE|LOCAL_MEM_SIZE|LOCAL_SIZE_FOR_SUB_GROUP_COUNT|MAX_NUM_SUB_GROUPS|MAX_SUB_GROUP_SIZE_FOR_NDRANGE|NUM_ARGS|PREFERRED_WORK_GROUP_SIZE_MULTIPLE|PRIVATE_MEM_SIZE|PROGRAM|REFERENCE_COUNT|SUB_GROUP_COUNT_FOR_NDRANGE|WORK_GROUP_SIZE)|LINKER_NOT_AVAILABLE|LINK_PROGRAM_FAILURE|LOCAL|LUMINANCE|MAP_(?:FAILURE|READ|WRITE|WRITE_INVALIDATE_REGION)|MEM_(?:ALLOC_HOST_PTR|ASSOCIATED_MEMOBJECT|CONTEXT|COPY_HOST_PTR|COPY_OVERLAP|FLAGS|HOST_NO_ACCESS|HOST_PTR|HOST_READ_ONLY|HOST_WRITE_ONLY|KERNEL_READ_AND_WRITE|MAP_COUNT|OBJECT_(?:ALLOCATION_FAILURE|BUFFER|IMAGE1D|IMAGE1D_ARRAY|IMAGE1D_BUFFER|IMAGE2D|IMAGE2D_ARRAY|IMAGE3D|PIPE)|OFFSET|READ_ONLY|READ_WRITE|REFERENCE_COUNT|SIZE|SVM_ATOMICS|SVM_FINE_GRAIN_BUFFER|TYPE|USES_SVM_POINTER|USE_HOST_PTR|WRITE_ONLY)|MIGRATE_MEM_OBJECT_(?:CONTENT_UNDEFINED|HOST)|MISALIGNED_SUB_BUFFER_OFFSET|NONE|NON_BLOCKING|OUT_OF_(?:HOST_MEMORY|RESOURCES)|PIPE_(?:MAX_PACKETS|PACKET_SIZE)|PLATFORM_(?:EXTENSIONS|HOST_TIMER_RESOLUTION|NAME|PROFILE|VENDOR|VERSION)|PROFILING_(?:COMMAND_(?:COMPLETE|END|QUEUED|START|SUBMIT)|INFO_NOT_AVAILABLE)|PROGRAM_(?:BINARIES|BINARY_SIZES|BINARY_TYPE(?:_COMPILED_OBJECT|_EXECUTABLE|_LIBRARY|_NONE)?|BUILD_(?:GLOBAL_VARIABLE_TOTAL_SIZE|LOG|OPTIONS|STATUS)|CONTEXT|DEVICES|IL|KERNEL_NAMES|NUM_DEVICES|NUM_KERNELS|REFERENCE_COUNT|SOURCE)|QUEUED|QUEUE_(?:CONTEXT|DEVICE|DEVICE_DEFAULT|ON_DEVICE|ON_DEVICE_DEFAULT|OUT_OF_ORDER_EXEC_MODE_ENABLE|PROFILING_ENABLE|PROPERTIES|REFERENCE_COUNT|SIZE)|R|RA|READ_(?:ONLY|WRITE)_CACHE|RG|RGB|RGBA|RGBx|RGx|RUNNING|Rx|SAMPLER_(?:ADDRESSING_MODE|CONTEXT|FILTER_MODE|LOD_MAX|LOD_MIN|MIP_FILTER_MODE|NORMALIZED_COORDS|REFERENCE_COUNT)|(?:UN)?SIGNED_INT(?:8|16|32)|SNORM_INT(?:8|16)|SUBMITTED|SUCCESS|UNORM_INT(?:16|24|8|_101010|_101010_2)|UNORM_SHORT_(?:555|565)|VERSION_(?:1_0|1_1|1_2|2_0|2_1)|sBGRA|sRGB|sRGBA|sRGBx)\b/,alias:"constant"},"function-opencl-host":{pattern:/\bcl(?:BuildProgram|CloneKernel|CompileProgram|Create(?:Buffer|CommandQueue(?:WithProperties)?|Context|ContextFromType|Image|Image2D|Image3D|Kernel|KernelsInProgram|Pipe|ProgramWith(?:Binary|BuiltInKernels|IL|Source)|Sampler|SamplerWithProperties|SubBuffer|SubDevices|UserEvent)|Enqueue(?:(?:Barrier|Marker)(?:WithWaitList)?|Copy(?:Buffer(?:Rect|ToImage)?|Image(?:ToBuffer)?)|(?:Fill|Map)(?:Buffer|Image)|MigrateMemObjects|NDRangeKernel|NativeKernel|(?:Read|Write)(?:Buffer(?:Rect)?|Image)|SVM(?:Free|Map|MemFill|Memcpy|MigrateMem|Unmap)|Task|UnmapMemObject|WaitForEvents)|Finish|Flush|Get(?:CommandQueueInfo|ContextInfo|Device(?:AndHostTimer|IDs|Info)|Event(?:Profiling)?Info|ExtensionFunctionAddress(?:ForPlatform)?|HostTimer|ImageInfo|Kernel(?:ArgInfo|Info|SubGroupInfo|WorkGroupInfo)|MemObjectInfo|PipeInfo|Platform(?:IDs|Info)|Program(?:Build)?Info|SamplerInfo|SupportedImageFormats)|LinkProgram|(?:Release|Retain)(?:CommandQueue|Context|Device|Event|Kernel|MemObject|Program|Sampler)|SVM(?:Alloc|Free)|Set(?:CommandQueueProperty|DefaultDeviceCommandQueue|EventCallback|Kernel(?:Arg(?:SVMPointer)?|ExecInfo)|Kernel|MemObjectDestructorCallback|UserEventStatus)|Unload(?:Platform)?Compiler|WaitForEvents)\b/,alias:"function"}};E.languages.insertBefore("c","keyword",_),E.languages.cpp&&(_["type-opencl-host-cpp"]={pattern:/\b(?:Buffer|BufferGL|BufferRenderGL|CommandQueue|Context|Device|DeviceCommandQueue|EnqueueArgs|Event|Image|Image1D|Image1DArray|Image1DBuffer|Image2D|Image2DArray|Image2DGL|Image3D|Image3DGL|ImageFormat|ImageGL|Kernel|KernelFunctor|LocalSpaceArg|Memory|NDRange|Pipe|Platform|Program|Sampler|SVMAllocator|SVMTraitAtomic|SVMTraitCoarse|SVMTraitFine|SVMTraitReadOnly|SVMTraitReadWrite|SVMTraitWriteOnly|UserEvent)\b/,alias:"keyword"},E.languages.insertBefore("cpp","keyword",_))}(Prism); \ No newline at end of file diff --git a/tests/languages/c/class-name_feature.test b/tests/languages/c/class-name_feature.test index 2c2e63f420..664611624b 100644 --- a/tests/languages/c/class-name_feature.test +++ b/tests/languages/c/class-name_feature.test @@ -1,16 +1,22 @@ -struct foo -enum bar +struct foo; +enum bar; struct foo var; struct __attribute__ ((aligned (8))) S { short f[3]; }; +// by name +uint32_t foo; +static dtrace_helptrace_t *bar; + ---------------------------------------------------- [ ["keyword", "struct"], ["class-name", "foo"], + ["punctuation", ";"], ["keyword", "enum"], ["class-name", "bar"], + ["punctuation", ";"], ["keyword", "struct"], ["class-name", "foo"], @@ -35,9 +41,19 @@ struct __attribute__ ((aligned (8))) S { short f[3]; }; ["punctuation", "]"], ["punctuation", ";"], ["punctuation", "}"], + ["punctuation", ";"], + + ["comment", "// by name"], + ["class-name", "uint32_t"], + " foo", + ["punctuation", ";"], + ["keyword", "static"], + ["class-name", "dtrace_helptrace_t"], + ["operator", "*"], + "bar", ["punctuation", ";"] ] ---------------------------------------------------- -Checks for structs and enums. +Checks for structs and enums. \ No newline at end of file diff --git a/tests/languages/c/macro_feature.test b/tests/languages/c/macro_feature.test index 8ae3d473ac..5c20083342 100644 --- a/tests/languages/c/macro_feature.test +++ b/tests/languages/c/macro_feature.test @@ -24,6 +24,7 @@ */ 1 #define FOO 1 // trailing comment +#define FOO (1 + 1) #define MAX(a, b) \ ((a) < (b) ? (b) : (a)) @@ -46,8 +47,8 @@ ["macro", [ ["directive-hash", "#"], ["directive", "define"], + ["macro-name", "PG_locked"], ["expression", [ - "PG_locked ", ["number", "0"] ]] ]], @@ -117,9 +118,7 @@ ["macro", [ ["directive-hash", "#"], ["directive", "define"], - ["expression", [ - "FOO " - ]], + ["macro-name", "FOO"], ["comment", "/*\r\n comment\r\n*/"], ["expression", [ ["number", "1"] @@ -129,18 +128,30 @@ ["macro", [ ["directive-hash", "#"], ["directive", "define"], + ["macro-name", "FOO"], ["expression", [ - "FOO ", ["number", "1"] ]], ["comment", "// trailing comment"] ]], + ["macro", [ + ["directive-hash", "#"], + ["directive", "define"], + ["macro-name", "FOO"], + ["expression", [ + ["punctuation", "("], + ["number", "1"], + ["operator", "+"], + ["number", "1"], + ["punctuation", ")"] + ]] + ]], ["macro", [ ["directive-hash", "#"], ["directive", "define"], + ["macro-name", "MAX"], ["expression", [ - ["function", "MAX"], ["punctuation", "("], "a", ["punctuation", ","], @@ -172,8 +183,8 @@ ["macro", [ ["directive-hash", "#"], ["directive", "define"], + ["macro-name", "BAR"], ["expression", [ - ["function", "BAR"], ["punctuation", "("], "s", ["punctuation", ")"], @@ -188,4 +199,4 @@ ---------------------------------------------------- -Checks for macros and paths inside include statements. +Checks for macros and paths inside include statements. \ No newline at end of file diff --git a/tests/languages/opencl/builtin-type_feature.test b/tests/languages/opencl/builtin-type_feature.test new file mode 100644 index 0000000000..e99ada8dd2 --- /dev/null +++ b/tests/languages/opencl/builtin-type_feature.test @@ -0,0 +1,71 @@ +_cl_command_queue +_cl_context +_cl_device_id +_cl_event +_cl_kernel +_cl_mem +_cl_platform_id +_cl_program +_cl_sampler +cl_image_format +cl_mem_fence_flags +clk_event_t +event_t +image1d_array_t +image1d_buffer_t +image1d_t +image2d_array_depth_t +image2d_array_msaa_depth_t +image2d_array_msaa_t +image2d_array_t +image2d_depth_t +image2d_msaa_depth_t +image2d_msaa_t +image2d_t +image3d_t +intptr_t +ndrange_t +ptrdiff_t +queue_t +reserve_id_t +sampler_t +size_t +uintptr_t + +---------------------------------------------------- + +[ + ["builtin-type", "_cl_command_queue"], + ["builtin-type", "_cl_context"], + ["builtin-type", "_cl_device_id"], + ["builtin-type", "_cl_event"], + ["builtin-type", "_cl_kernel"], + ["builtin-type", "_cl_mem"], + ["builtin-type", "_cl_platform_id"], + ["builtin-type", "_cl_program"], + ["builtin-type", "_cl_sampler"], + ["builtin-type", "cl_image_format"], + ["builtin-type", "cl_mem_fence_flags"], + ["builtin-type", "clk_event_t"], + ["builtin-type", "event_t"], + ["builtin-type", "image1d_array_t"], + ["builtin-type", "image1d_buffer_t"], + ["builtin-type", "image1d_t"], + ["builtin-type", "image2d_array_depth_t"], + ["builtin-type", "image2d_array_msaa_depth_t"], + ["builtin-type", "image2d_array_msaa_t"], + ["builtin-type", "image2d_array_t"], + ["builtin-type", "image2d_depth_t"], + ["builtin-type", "image2d_msaa_depth_t"], + ["builtin-type", "image2d_msaa_t"], + ["builtin-type", "image2d_t"], + ["builtin-type", "image3d_t"], + ["builtin-type", "intptr_t"], + ["builtin-type", "ndrange_t"], + ["builtin-type", "ptrdiff_t"], + ["builtin-type", "queue_t"], + ["builtin-type", "reserve_id_t"], + ["builtin-type", "sampler_t"], + ["builtin-type", "size_t"], + ["builtin-type", "uintptr_t"] +] \ No newline at end of file diff --git a/tests/languages/opencl/keyword_feature.test b/tests/languages/opencl/keyword_feature.test index b171c054e5..ffc873d55f 100644 --- a/tests/languages/opencl/keyword_feature.test +++ b/tests/languages/opencl/keyword_feature.test @@ -7,15 +7,6 @@ __private __read_only __read_write __write_only -_cl_command_queue -_cl_context -_cl_device_id -_cl_event -_cl_kernel -_cl_mem -_cl_platform_id -_cl_program -_cl_sampler auto bool bool16 @@ -31,9 +22,6 @@ char2 char3 char4 char8 -cl_image_format -cl_mem_fence_flags -clk_event_t complex const constant @@ -72,7 +60,6 @@ double8x4 double8x8 else enum; -event_t extern float float16 @@ -114,18 +101,6 @@ half3 half4 half8 if -image1d_array_t -image1d_buffer_t -image1d_t -image2d_array_depth_t -image2d_array_msaa_depth_t -image2d_array_msaa_t -image2d_array_t -image2d_depth_t -image2d_msaa_depth_t -image2d_msaa_t -image2d_t -image3d_t imaginary int int16 @@ -133,7 +108,6 @@ int2 int3 int4 int8 -intptr_t kernel local long @@ -142,31 +116,25 @@ long2 long3 long4 long8 -ndrange_t packed pipe private -ptrdiff_t quad quad16 quad2 quad3 quad4 quad8 -queue_t read_only read_write register -reserve_id_t restrict -sampler_t short short16 short2 short3 short4 short8 -size_t static struct; switch @@ -183,7 +151,6 @@ uint2 uint3 uint4 uint8 -uintptr_t ulong ulong16 ulong2 @@ -216,15 +183,6 @@ write_only ["keyword", "__read_only"], ["keyword", "__read_write"], ["keyword", "__write_only"], - ["keyword", "_cl_command_queue"], - ["keyword", "_cl_context"], - ["keyword", "_cl_device_id"], - ["keyword", "_cl_event"], - ["keyword", "_cl_kernel"], - ["keyword", "_cl_mem"], - ["keyword", "_cl_platform_id"], - ["keyword", "_cl_program"], - ["keyword", "_cl_sampler"], ["keyword", "auto"], ["keyword", "bool"], ["keyword", "bool16"], @@ -240,9 +198,6 @@ write_only ["keyword", "char3"], ["keyword", "char4"], ["keyword", "char8"], - ["keyword", "cl_image_format"], - ["keyword", "cl_mem_fence_flags"], - ["keyword", "clk_event_t"], ["keyword", "complex"], ["keyword", "const"], ["keyword", "constant"], @@ -280,8 +235,8 @@ write_only ["keyword", "double8x4"], ["keyword", "double8x8"], ["keyword", "else"], - ["keyword", "enum"], ["punctuation", ";"], - ["keyword", "event_t"], + ["keyword", "enum"], + ["punctuation", ";"], ["keyword", "extern"], ["keyword", "float"], ["keyword", "float16"], @@ -323,18 +278,6 @@ write_only ["keyword", "half4"], ["keyword", "half8"], ["keyword", "if"], - ["keyword", "image1d_array_t"], - ["keyword", "image1d_buffer_t"], - ["keyword", "image1d_t"], - ["keyword", "image2d_array_depth_t"], - ["keyword", "image2d_array_msaa_depth_t"], - ["keyword", "image2d_array_msaa_t"], - ["keyword", "image2d_array_t"], - ["keyword", "image2d_depth_t"], - ["keyword", "image2d_msaa_depth_t"], - ["keyword", "image2d_msaa_t"], - ["keyword", "image2d_t"], - ["keyword", "image3d_t"], ["keyword", "imaginary"], ["keyword", "int"], ["keyword", "int16"], @@ -342,7 +285,6 @@ write_only ["keyword", "int3"], ["keyword", "int4"], ["keyword", "int8"], - ["keyword", "intptr_t"], ["keyword", "kernel"], ["keyword", "local"], ["keyword", "long"], @@ -351,33 +293,28 @@ write_only ["keyword", "long3"], ["keyword", "long4"], ["keyword", "long8"], - ["keyword", "ndrange_t"], ["keyword", "packed"], ["keyword", "pipe"], ["keyword", "private"], - ["keyword", "ptrdiff_t"], ["keyword", "quad"], ["keyword", "quad16"], ["keyword", "quad2"], ["keyword", "quad3"], ["keyword", "quad4"], ["keyword", "quad8"], - ["keyword", "queue_t"], ["keyword", "read_only"], ["keyword", "read_write"], ["keyword", "register"], - ["keyword", "reserve_id_t"], ["keyword", "restrict"], - ["keyword", "sampler_t"], ["keyword", "short"], ["keyword", "short16"], ["keyword", "short2"], ["keyword", "short3"], ["keyword", "short4"], ["keyword", "short8"], - ["keyword", "size_t"], ["keyword", "static"], - ["keyword", "struct"], ["punctuation", ";"], + ["keyword", "struct"], + ["punctuation", ";"], ["keyword", "switch"], ["keyword", "typedef"], ["keyword", "uchar"], @@ -392,7 +329,6 @@ write_only ["keyword", "uint3"], ["keyword", "uint4"], ["keyword", "uint8"], - ["keyword", "uintptr_t"], ["keyword", "ulong"], ["keyword", "ulong16"], ["keyword", "ulong2"], @@ -416,4 +352,4 @@ write_only ---------------------------------------------------- -Checks for all keywords in OpenCL kernel code. +Checks for all keywords in OpenCL kernel code. \ No newline at end of file From 25bdb494c147272167d2b31de5a2af104298b354 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Wed, 4 Nov 2020 11:51:00 +0100 Subject: [PATCH 0654/1100] TSX: Temporary fix for the collisions of JSX tags and TS generics (#2596) --- components/prism-jsx.js | 4 +- components/prism-jsx.min.js | 2 +- components/prism-tsx.js | 13 +- components/prism-tsx.min.js | 2 +- tests/languages/tsx/issue2594.test | 252 +++++++++++++++++++++++++++++ 5 files changed, 267 insertions(+), 6 deletions(-) create mode 100644 tests/languages/tsx/issue2594.test diff --git a/components/prism-jsx.js b/components/prism-jsx.js index 30e6e3f4c6..8c5a868e46 100644 --- a/components/prism-jsx.js +++ b/components/prism-jsx.js @@ -3,10 +3,10 @@ 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.:$-]+(?:=(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s{'">=]+|\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])+\}))?|\{\s*\.{3}\s*[a-z_$][\w$]*(?:\.[a-z_$][\w$]*)*\s*\}))*\s*\/?)?>/i; +Prism.languages.jsx.tag.pattern = /<\/?(?:[\w.:-]+\s*(?:\s+(?:[\w.:$-]+(?:=(?:"(?:\\[^]|[^\\"])*"|'(?:\\[^]|[^\\'])*'|[^\s{'">=]+|\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])+\}))?|\{\s*\.{3}\s*[a-z_$][\w$]*(?:\.[a-z_$][\w$]*)*\s*\}))*\s*\/?)?>/i; Prism.languages.jsx.tag.inside['tag'].pattern = /^<\/?[^\s>\/]*/i; -Prism.languages.jsx.tag.inside['attr-value'].pattern = /=(?!\{)(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s'">]+)/i; +Prism.languages.jsx.tag.inside['attr-value'].pattern = /=(?!\{)(?:"(?:\\[^]|[^\\"])*"|'(?:\\[^]|[^\\'])*'|[^\s'">]+)/i; Prism.languages.jsx.tag.inside['tag'].inside['class-name'] = /^[A-Z]\w*(?:\.[A-Z]\w*)*$/; Prism.languages.insertBefore('inside', 'attr-name', { diff --git a/components/prism-jsx.min.js b/components/prism-jsx.min.js index 81390211bc..a5a35662df 100644 --- a/components/prism-jsx.min.js +++ b/components/prism-jsx.min.js @@ -1 +1 @@ -!function(i){var t=i.util.clone(i.languages.javascript);i.languages.jsx=i.languages.extend("markup",t),i.languages.jsx.tag.pattern=/<\/?(?:[\w.:-]+\s*(?:\s+(?:[\w.:$-]+(?:=(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s{'">=]+|\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])+\}))?|\{\s*\.{3}\s*[a-z_$][\w$]*(?:\.[a-z_$][\w$]*)*\s*\}))*\s*\/?)?>/i,i.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/i,i.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s'">]+)/i,i.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,i.languages.insertBefore("inside","attr-name",{spread:{pattern:/\{\s*\.{3}\s*[a-z_$][\w$]*(?:\.[a-z_$][\w$]*)*\s*\}/,inside:{punctuation:/\.{3}|[{}.]/,"attr-value":/\w+/}}},i.languages.jsx.tag),i.languages.insertBefore("inside","attr-value",{script:{pattern:/=(?:\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])+\})/i,inside:{"script-punctuation":{pattern:/^=(?={)/,alias:"punctuation"},rest:i.languages.jsx},alias:"language-javascript"}},i.languages.jsx.tag);var o=function(t){return t?"string"==typeof t?t:"string"==typeof t.content?t.content:t.content.map(o).join(""):""},p=function(t){for(var n=[],e=0;e"===a.content[a.content.length-1].content||n.push({tagName:o(a.content[0].content[1]),openedBraces:0}):0=]+|\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])+\}))?|\{\s*\.{3}\s*[a-z_$][\w$]*(?:\.[a-z_$][\w$]*)*\s*\}))*\s*\/?)?>/i,i.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/i,i.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:"(?:\\[^]|[^\\"])*"|'(?:\\[^]|[^\\'])*'|[^\s'">]+)/i,i.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,i.languages.insertBefore("inside","attr-name",{spread:{pattern:/\{\s*\.{3}\s*[a-z_$][\w$]*(?:\.[a-z_$][\w$]*)*\s*\}/,inside:{punctuation:/\.{3}|[{}.]/,"attr-value":/\w+/}}},i.languages.jsx.tag),i.languages.insertBefore("inside","attr-value",{script:{pattern:/=(?:\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])+\})/i,inside:{"script-punctuation":{pattern:/^=(?={)/,alias:"punctuation"},rest:i.languages.jsx},alias:"language-javascript"}},i.languages.jsx.tag);var o=function(t){return t?"string"==typeof t?t:"string"==typeof t.content?t.content:t.content.map(o).join(""):""},p=function(t){for(var n=[],e=0;e"===a.content[a.content.length-1].content||n.push({tagName:o(a.content[0].content[1]),openedBraces:0}):0a + b } + +type Bar = Foo; + +function Add2(a, b) { return
          a + b
          } + +function handleSubmit(event: FormEvent) { + event.preventDefault(); +} + +function handleChange(event: ChangeEvent) { + console.log(event.target.value); +} + +function handleClick(event: MouseEvent) { + console.log(event.button); +} + +export default function Form() { + return ( +
          + + +
          + ); +} + +---------------------------------------------------- + +[ + ["keyword", "function"], + ["function", "Add1"], + ["punctuation", "("], + ["parameter", [ + "a", + ["punctuation", ","], + " b" + ]], + ["punctuation", ")"], + ["punctuation", "{"], + ["keyword", "return"], + ["tag", [ + ["tag", [ + ["punctuation", "<"], + "div" + ]], + ["punctuation", ">"] + ]], + ["plain-text", "a + b"], + ["tag", [ + ["tag", [ + ["punctuation", ""] + ]], + ["punctuation", "}"], + + ["keyword", "type"], + ["class-name", [ + "Bar" + ]], + ["operator", "="], + " Foo", + ["operator", "<"], + ["builtin", "string"], + ["operator", ">"], + ["punctuation", ";"], + + ["keyword", "function"], + ["function", "Add2"], + ["punctuation", "("], + ["parameter", [ + "a", + ["punctuation", ","], + " b" + ]], + ["punctuation", ")"], + ["punctuation", "{"], + ["keyword", "return"], + ["tag", [ + ["tag", [ + ["punctuation", "<"], + "div" + ]], + ["punctuation", ">"] + ]], + ["plain-text", "a + b"], + ["tag", [ + ["tag", [ + ["punctuation", ""] + ]], + ["punctuation", "}"], + + ["keyword", "function"], + ["function", "handleSubmit"], + ["punctuation", "("], + ["parameter", [ + "event", + ["operator", ":"], + " FormEvent", + ["operator", "<"], + "HTMLFormElement", + ["operator", ">"] + ]], + ["punctuation", ")"], + ["punctuation", "{"], + "\r\n event", + ["punctuation", "."], + ["function", "preventDefault"], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", ";"], + ["punctuation", "}"], + + ["keyword", "function"], + ["function", "handleChange"], + ["punctuation", "("], + ["parameter", [ + "event", + ["operator", ":"], + " ChangeEvent", + ["operator", "<"], + "HTMLInputElement", + ["operator", ">"] + ]], + ["punctuation", ")"], + ["punctuation", "{"], + ["builtin", "console"], + ["punctuation", "."], + ["function", "log"], + ["punctuation", "("], + "event", + ["punctuation", "."], + "target", + ["punctuation", "."], + "value", + ["punctuation", ")"], + ["punctuation", ";"], + ["punctuation", "}"], + + ["keyword", "function"], + ["function", "handleClick"], + ["punctuation", "("], + ["parameter", [ + "event", + ["operator", ":"], + " MouseEvent" + ]], + ["punctuation", ")"], + ["punctuation", "{"], + ["builtin", "console"], + ["punctuation", "."], + ["function", "log"], + ["punctuation", "("], + "event", + ["punctuation", "."], + "button", + ["punctuation", ")"], + ["punctuation", ";"], + ["punctuation", "}"], + + ["keyword", "export"], + ["keyword", "default"], + ["keyword", "function"], + ["function", "Form"], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", "{"], + ["keyword", "return"], + ["punctuation", "("], + ["tag", [ + ["tag", [ + ["punctuation", "<"], + "form" + ]], + ["attr-name", [ + "onSubmit" + ]], + ["script", [ + ["script-punctuation", "="], + ["punctuation", "{"], + "handleSubmit", + ["punctuation", "}"] + ]], + ["punctuation", ">"] + ]], + ["plain-text", "\r\n "], + ["tag", [ + ["tag", [ + ["punctuation", "<"], + "input" + ]], + ["attr-name", [ + "onChange" + ]], + ["script", [ + ["script-punctuation", "="], + ["punctuation", "{"], + "handleChange", + ["punctuation", "}"] + ]], + ["attr-name", [ + "placeholder" + ]], + ["attr-value", [ + ["punctuation", "="], + ["punctuation", "\""], + "Name", + ["punctuation", "\""] + ]], + ["punctuation", "/>"] + ]], + ["plain-text", "\r\n "], + ["tag", [ + ["tag", [ + ["punctuation", "<"], + "button" + ]], + ["attr-name", [ + "onClick" + ]], + ["script", [ + ["script-punctuation", "="], + ["punctuation", "{"], + "handleClick", + ["punctuation", "}"] + ]], + ["punctuation", ">"] + ]], + ["tag", [ + ["tag", [ + ["punctuation", ""] + ]], + ["plain-text", "\r\n "], + ["tag", [ + ["tag", [ + ["punctuation", ""] + ]], + ["punctuation", ")"], + ["punctuation", ";"], + ["punctuation", "}"] +] \ No newline at end of file From 0df60be1377e12953e16faf7eb84c04088245b1e Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Wed, 4 Nov 2020 17:18:23 +0100 Subject: [PATCH 0655/1100] Tests: Stricter pattern for nice-token-names test (#2588) --- components/prism-elm.js | 24 +++++++++---------- components/prism-elm.min.js | 2 +- components/prism-git.js | 2 +- components/prism-git.min.js | 2 +- components/prism-ocaml.js | 2 +- components/prism-ocaml.min.js | 2 +- ...ure.test => import-statement_feature.test} | 10 ++++---- ..._feature.test => commit-sha1_feature.test} | 8 +++---- ...eature.test => type-variable_feature.test} | 6 ++--- tests/pattern-tests.js | 2 +- 10 files changed, 30 insertions(+), 30 deletions(-) rename tests/languages/elm/{import_statement_feature.test => import-statement_feature.test} (82%) rename tests/languages/git/{commit_sha1_feature.test => commit-sha1_feature.test} (54%) rename tests/languages/ocaml/{type_variable_feature.test => type-variable_feature.test} (56%) diff --git a/components/prism-elm.js b/components/prism-elm.js index 2e4a5fb2b9..ba712f97ab 100644 --- a/components/prism-elm.js +++ b/components/prism-elm.js @@ -1,10 +1,10 @@ Prism.languages.elm = { - comment: /--.*|{-[\s\S]*?-}/, - char: { + 'comment': /--.*|{-[\s\S]*?-}/, + 'char': { pattern: /'(?:[^\\'\r\n]|\\(?:[abfnrtv\\']|\d+|x[0-9a-fA-F]+))'/, greedy: true }, - string: [ + 'string': [ { // Multiline strings are wrapped in triple ". Quotes may appear unescaped. pattern: /"""[\s\S]*?"""/, @@ -15,20 +15,20 @@ Prism.languages.elm = { greedy: true } ], - import_statement: { + 'import-statement': { // The imported or hidden names are not included in this import // statement. This is because we want to highlight those exactly like // we do for the names in the program. pattern: /^\s*import\s+[A-Z]\w*(?:\.[A-Z]\w*)*(?:\s+as\s+(?:[A-Z]\w*)(?:\.[A-Z]\w*)*)?(?:\s+exposing\s+)?/m, inside: { - keyword: /\b(?:import|as|exposing)\b/ + 'keyword': /\b(?:import|as|exposing)\b/ } }, - keyword: /\b(?:alias|as|case|else|exposing|if|in|infixl|infixr|let|module|of|then|type)\b/, + 'keyword': /\b(?:alias|as|case|else|exposing|if|in|infixl|infixr|let|module|of|then|type)\b/, // These are builtin variables only. Constructors are highlighted later as a constant. - builtin: /\b(?:abs|acos|always|asin|atan|atan2|ceiling|clamp|compare|cos|curry|degrees|e|flip|floor|fromPolar|identity|isInfinite|isNaN|logBase|max|min|negate|never|not|pi|radians|rem|round|sin|sqrt|tan|toFloat|toPolar|toString|truncate|turns|uncurry|xor)\b/, + 'builtin': /\b(?:abs|acos|always|asin|atan|atan2|ceiling|clamp|compare|cos|curry|degrees|e|flip|floor|fromPolar|identity|isInfinite|isNaN|logBase|max|min|negate|never|not|pi|radians|rem|round|sin|sqrt|tan|toFloat|toPolar|toString|truncate|turns|uncurry|xor)\b/, // decimal integers and floating point numbers | hexadecimal integers - number: /\b(?:\d+(?:\.\d+)?(?:e[+-]?\d+)?|0x[0-9a-f]+)\b/i, + 'number': /\b(?:\d+(?:\.\d+)?(?:e[+-]?\d+)?|0x[0-9a-f]+)\b/i, // Most of this is needed because of the meaning of a single '.'. // If it stands alone freely, it is the function composition. // It may also be a separator between a module name and an identifier => no @@ -36,9 +36,9 @@ Prism.languages.elm = { // operator too. // Valid operator characters in 0.18: +-/*=.$<>:&|^?%#@~! // Ref: https://groups.google.com/forum/#!msg/elm-dev/0AHSnDdkSkQ/E0SVU70JEQAJ - operator: /\s\.\s|[+\-/*=.$<>:&|^?%#@~!]{2,}|[+\-/*=$<>:&|^?%#@~!]/, + 'operator': /\s\.\s|[+\-/*=.$<>:&|^?%#@~!]{2,}|[+\-/*=$<>:&|^?%#@~!]/, // In Elm, nearly everything is a variable, do not highlight these. - hvariable: /\b(?:[A-Z]\w*\.)*[a-z]\w*\b/, - constant: /\b(?:[A-Z]\w*\.)*[A-Z]\w*\b/, - punctuation: /[{}[\]|(),.:]/ + 'hvariable': /\b(?:[A-Z]\w*\.)*[a-z]\w*\b/, + 'constant': /\b(?:[A-Z]\w*\.)*[A-Z]\w*\b/, + 'punctuation': /[{}[\]|(),.:]/ }; diff --git a/components/prism-elm.min.js b/components/prism-elm.min.js index ee9d8e811c..b574bf8c71 100644 --- a/components/prism-elm.min.js +++ b/components/prism-elm.min.js @@ -1 +1 @@ -Prism.languages.elm={comment:/--.*|{-[\s\S]*?-}/,char:{pattern:/'(?:[^\\'\r\n]|\\(?:[abfnrtv\\']|\d+|x[0-9a-fA-F]+))'/,greedy:!0},string:[{pattern:/"""[\s\S]*?"""/,greedy:!0},{pattern:/"(?:[^\\"\r\n]|\\.)*"/,greedy:!0}],import_statement:{pattern:/^\s*import\s+[A-Z]\w*(?:\.[A-Z]\w*)*(?:\s+as\s+(?:[A-Z]\w*)(?:\.[A-Z]\w*)*)?(?:\s+exposing\s+)?/m,inside:{keyword:/\b(?:import|as|exposing)\b/}},keyword:/\b(?:alias|as|case|else|exposing|if|in|infixl|infixr|let|module|of|then|type)\b/,builtin:/\b(?:abs|acos|always|asin|atan|atan2|ceiling|clamp|compare|cos|curry|degrees|e|flip|floor|fromPolar|identity|isInfinite|isNaN|logBase|max|min|negate|never|not|pi|radians|rem|round|sin|sqrt|tan|toFloat|toPolar|toString|truncate|turns|uncurry|xor)\b/,number:/\b(?:\d+(?:\.\d+)?(?:e[+-]?\d+)?|0x[0-9a-f]+)\b/i,operator:/\s\.\s|[+\-/*=.$<>:&|^?%#@~!]{2,}|[+\-/*=$<>:&|^?%#@~!]/,hvariable:/\b(?:[A-Z]\w*\.)*[a-z]\w*\b/,constant:/\b(?:[A-Z]\w*\.)*[A-Z]\w*\b/,punctuation:/[{}[\]|(),.:]/}; \ No newline at end of file +Prism.languages.elm={comment:/--.*|{-[\s\S]*?-}/,char:{pattern:/'(?:[^\\'\r\n]|\\(?:[abfnrtv\\']|\d+|x[0-9a-fA-F]+))'/,greedy:!0},string:[{pattern:/"""[\s\S]*?"""/,greedy:!0},{pattern:/"(?:[^\\"\r\n]|\\.)*"/,greedy:!0}],"import-statement":{pattern:/^\s*import\s+[A-Z]\w*(?:\.[A-Z]\w*)*(?:\s+as\s+(?:[A-Z]\w*)(?:\.[A-Z]\w*)*)?(?:\s+exposing\s+)?/m,inside:{keyword:/\b(?:import|as|exposing)\b/}},keyword:/\b(?:alias|as|case|else|exposing|if|in|infixl|infixr|let|module|of|then|type)\b/,builtin:/\b(?:abs|acos|always|asin|atan|atan2|ceiling|clamp|compare|cos|curry|degrees|e|flip|floor|fromPolar|identity|isInfinite|isNaN|logBase|max|min|negate|never|not|pi|radians|rem|round|sin|sqrt|tan|toFloat|toPolar|toString|truncate|turns|uncurry|xor)\b/,number:/\b(?:\d+(?:\.\d+)?(?:e[+-]?\d+)?|0x[0-9a-f]+)\b/i,operator:/\s\.\s|[+\-/*=.$<>:&|^?%#@~!]{2,}|[+\-/*=$<>:&|^?%#@~!]/,hvariable:/\b(?:[A-Z]\w*\.)*[a-z]\w*\b/,constant:/\b(?:[A-Z]\w*\.)*[A-Z]\w*\b/,punctuation:/[{}[\]|(),.:]/}; \ No newline at end of file diff --git a/components/prism-git.js b/components/prism-git.js index 54f5ea77a6..d9bee8fcb6 100644 --- a/components/prism-git.js +++ b/components/prism-git.js @@ -64,5 +64,5 @@ Prism.languages.git = { * * Add of a new line */ - 'commit_sha1': /^commit \w{40}$/m + 'commit-sha1': /^commit \w{40}$/m }; diff --git a/components/prism-git.min.js b/components/prism-git.min.js index 8166591050..3d5831a780 100644 --- a/components/prism-git.min.js +++ b/components/prism-git.min.js @@ -1 +1 @@ -Prism.languages.git={comment:/^#.*/m,deleted:/^[-–].*/m,inserted:/^\+.*/m,string:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/m,command:{pattern:/^.*\$ git .*$/m,inside:{parameter:/\s--?\w+/m}},coord:/^@@.*@@$/m,commit_sha1:/^commit \w{40}$/m}; \ No newline at end of file +Prism.languages.git={comment:/^#.*/m,deleted:/^[-–].*/m,inserted:/^\+.*/m,string:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/m,command:{pattern:/^.*\$ git .*$/m,inside:{parameter:/\s--?\w+/m}},coord:/^@@.*@@$/m,"commit-sha1":/^commit \w{40}$/m}; \ No newline at end of file diff --git a/components/prism-ocaml.js b/components/prism-ocaml.js index a13ded0a51..101c82b066 100644 --- a/components/prism-ocaml.js +++ b/components/prism-ocaml.js @@ -19,7 +19,7 @@ Prism.languages.ocaml = { pattern: /\B~\w+/, alias: 'function' }, - 'type_variable': { + 'type-variable': { pattern: /\B'\w+/, alias: 'function' }, diff --git a/components/prism-ocaml.min.js b/components/prism-ocaml.min.js index b4ea3c5b38..016c477dc6 100644 --- a/components/prism-ocaml.min.js +++ b/components/prism-ocaml.min.js @@ -1 +1 @@ -Prism.languages.ocaml={comment:/\(\*[\s\S]*?\*\)/,string:[{pattern:/"(?:\\.|[^\\\r\n"])*"/,greedy:!0},{pattern:/(['`])(?:\\(?:\d+|x[\da-f]+|.)|(?!\1)[^\\\r\n])\1/i,greedy:!0}],number:/\b(?:0x[\da-f][\da-f_]+|(?:0[bo])?\d[\d_]*\.?[\d_]*(?:e[+-]?[\d_]+)?)/i,directive:{pattern:/\B#\w+/,alias:"important"},label:{pattern:/\B~\w+/,alias:"function"},type_variable:{pattern:/\B'\w+/,alias:"function"},variant:{pattern:/`\w+/,alias:"variable"},module:{pattern:/\b[A-Z]\w+/,alias:"variable"},keyword:/\b(?:as|assert|begin|class|constraint|do|done|downto|else|end|exception|external|for|fun|function|functor|if|in|include|inherit|initializer|lazy|let|match|method|module|mutable|new|nonrec|object|of|open|private|rec|sig|struct|then|to|try|type|val|value|virtual|when|where|while|with)\b/,boolean:/\b(?:false|true)\b/,operator:/:=|[=<>@^|&+\-*\/$%!?~][!$%&*+\-.\/:<=>?@^|~]*|\b(?:and|asr|land|lor|lsl|lsr|lxor|mod|or)\b/,punctuation:/[(){}\[\]|.,:;]|\b_\b/}; \ No newline at end of file +Prism.languages.ocaml={comment:/\(\*[\s\S]*?\*\)/,string:[{pattern:/"(?:\\.|[^\\\r\n"])*"/,greedy:!0},{pattern:/(['`])(?:\\(?:\d+|x[\da-f]+|.)|(?!\1)[^\\\r\n])\1/i,greedy:!0}],number:/\b(?:0x[\da-f][\da-f_]+|(?:0[bo])?\d[\d_]*\.?[\d_]*(?:e[+-]?[\d_]+)?)/i,directive:{pattern:/\B#\w+/,alias:"important"},label:{pattern:/\B~\w+/,alias:"function"},"type-variable":{pattern:/\B'\w+/,alias:"function"},variant:{pattern:/`\w+/,alias:"variable"},module:{pattern:/\b[A-Z]\w+/,alias:"variable"},keyword:/\b(?:as|assert|begin|class|constraint|do|done|downto|else|end|exception|external|for|fun|function|functor|if|in|include|inherit|initializer|lazy|let|match|method|module|mutable|new|nonrec|object|of|open|private|rec|sig|struct|then|to|try|type|val|value|virtual|when|where|while|with)\b/,boolean:/\b(?:false|true)\b/,operator:/:=|[=<>@^|&+\-*\/$%!?~][!$%&*+\-.\/:<=>?@^|~]*|\b(?:and|asr|land|lor|lsl|lsr|lxor|mod|or)\b/,punctuation:/[(){}\[\]|.,:;]|\b_\b/}; \ No newline at end of file diff --git a/tests/languages/elm/import_statement_feature.test b/tests/languages/elm/import-statement_feature.test similarity index 82% rename from tests/languages/elm/import_statement_feature.test rename to tests/languages/elm/import-statement_feature.test index c2940362dc..467d25f88e 100644 --- a/tests/languages/elm/import_statement_feature.test +++ b/tests/languages/elm/import-statement_feature.test @@ -7,23 +7,23 @@ import Json.Decode as Json exposing (Decoder) ---------------------------------------------------- [ - ["import_statement", [ + ["import-statement", [ ["keyword", "import"], " Foo" ]], - ["import_statement", [ + ["import-statement", [ ["keyword", "import"], " Foo_42.Bar ", ["keyword", "as"], " Foobar" ]], - ["import_statement", [ + ["import-statement", [ ["keyword", "import"], " Foo.Bar ", ["keyword", "as"], " Foo.Baz" ]], - ["import_statement", [ + ["import-statement", [ ["keyword", "import"], " List ", ["keyword", "exposing"] @@ -31,7 +31,7 @@ import Json.Decode as Json exposing (Decoder) ["punctuation", "("], ["hvariable", "map"], ["punctuation", ")"], - ["import_statement", [ + ["import-statement", [ ["keyword", "import"], " Json.Decode ", ["keyword", "as"], diff --git a/tests/languages/git/commit_sha1_feature.test b/tests/languages/git/commit-sha1_feature.test similarity index 54% rename from tests/languages/git/commit_sha1_feature.test rename to tests/languages/git/commit-sha1_feature.test index fbc58ed2bd..62f3e02f54 100644 --- a/tests/languages/git/commit_sha1_feature.test +++ b/tests/languages/git/commit-sha1_feature.test @@ -5,11 +5,11 @@ commit 3102416a90c431400d2e2a14e707fb7fd6d9e06d ---------------------------------------------------- [ - ["commit_sha1", "commit a11a14ef7e26f2ca62d4b35eac455ce636d0dc09"], - ["commit_sha1", "commit 87edc4ad8c71b95f6e46f736eb98b742859abd95"], - ["commit_sha1", "commit 3102416a90c431400d2e2a14e707fb7fd6d9e06d"] + ["commit-sha1", "commit a11a14ef7e26f2ca62d4b35eac455ce636d0dc09"], + ["commit-sha1", "commit 87edc4ad8c71b95f6e46f736eb98b742859abd95"], + ["commit-sha1", "commit 3102416a90c431400d2e2a14e707fb7fd6d9e06d"] ] ---------------------------------------------------- -Checks for commit SHA1. \ No newline at end of file +Checks for commit SHA1. diff --git a/tests/languages/ocaml/type_variable_feature.test b/tests/languages/ocaml/type-variable_feature.test similarity index 56% rename from tests/languages/ocaml/type_variable_feature.test rename to tests/languages/ocaml/type-variable_feature.test index 7f680e47fe..9c89b8acd4 100644 --- a/tests/languages/ocaml/type_variable_feature.test +++ b/tests/languages/ocaml/type-variable_feature.test @@ -4,10 +4,10 @@ ---------------------------------------------------- [ - ["type_variable", "'Foo"], - ["type_variable", "'bar_42"] + ["type-variable", "'Foo"], + ["type-variable", "'bar_42"] ] ---------------------------------------------------- -Checks for type variables. \ No newline at end of file +Checks for type variables. diff --git a/tests/pattern-tests.js b/tests/pattern-tests.js index cbf1d54eca..15272c9002 100644 --- a/tests/pattern-tests.js +++ b/tests/pattern-tests.js @@ -291,7 +291,7 @@ function testPatterns(Prism) { }); it('- should have nice names and aliases', function () { - const niceName = /^[a-z][a-z\d]*(?:[-_][a-z\d]+)*$/; + const niceName = /^[a-z][a-z\d]*(?:-[a-z\d]+)*$/; function testName(name, desc = 'token name') { if (!niceName.test(name)) { assert.fail(`The ${desc} '${name}' does not match ${niceName}.\n\n` From 89ebb0b7806d7285152cf1ccfebcda471a2f2a65 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Wed, 4 Nov 2020 17:28:20 +0100 Subject: [PATCH 0656/1100] PHP: Removed C-like dependency (#2619) --- components.js | 2 +- components.json | 2 +- plugins/autoloader/prism-autoloader.js | 5 +---- plugins/autoloader/prism-autoloader.min.js | 2 +- 4 files changed, 4 insertions(+), 7 deletions(-) diff --git a/components.js b/components.js index 7d969b4c61..bed22408b9 100644 --- a/components.js +++ b/components.js @@ -1,2 +1,2 @@ -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml","ssml","atom","rss"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","ssml":"SSML","atom":"Atom","rss":"RSS"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","optional":"regex","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"ABNF","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"agda":{"title":"Agda","owner":"xy-ren"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"dkern"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"birb":{"title":"Birb","require":"clike","owner":"Calamity210"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"BNF","alias":"rbnf","aliasTitles":{"rbnf":"RBNF"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"bsl":{"title":"BSL (1C:Enterprise)","alias":"oscript","aliasTitles":{"oscript":"OneScript"},"owner":"Diversus23"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"clojure":{"title":"Clojure","owner":"troglotit"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"cypher":{"title":"Cypher","owner":"RunDevelopment"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dax":{"title":"DAX","owner":"peterbud"},"dhall":{"title":"Dhall","owner":"RunDevelopment"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"EBNF","owner":"RunDevelopment"},"editorconfig":{"title":"EditorConfig","owner":"osipxd"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"c","owner":"Golmote"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","optional":["markdown"],"owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"hlsl":{"title":"HLSL","require":"c","owner":"RunDevelopment"},"http":{"title":"HTTP","optional":["css","javascript","json","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"ignore":{"title":".ignore","owner":"osipxd","alias":["gitignore","hgignore","npmignore"],"aliasTitles":{"gitignore":".gitignore","hgignore":".hgignore","npmignore":".npmignore"}},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike","typescript"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","alias":"webmanifest","aliasTitles":{"webmanifest":"Web App Manifest"},"owner":"CupOfTea696"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"jsstacktrace":{"title":"JS stack trace","owner":"sbrl"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","alias":["kt","kts"],"aliasTitles":{"kts":"Kotlin Script"},"require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"mongodb":{"title":"MongoDB","owner":"airs0urce","require":"javascript"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"naniscript":{"title":"Naninovel Script","owner":"Elringus","alias":"nani"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":["clike","markup-templating"],"owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"purebasic":{"title":"PureBasic","require":"clike","alias":"pbfasm","owner":"HeX0R101"},"purescript":{"title":"PureScript","require":"haskell","alias":"purs","owner":"sriharshachilakapati"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"racket":{"title":"Racket","require":"scheme","alias":"rkt","owner":"RunDevelopment"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","owner":"RunDevelopment"},"renpy":{"title":"Ren'py","alias":"rpy","owner":"HyuchiaDiego"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","alias":["sh-session","shellsession"],"owner":"RunDevelopment"},"smali":{"title":"Smali","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sml":{"title":"SML","alias":"smlnj","aliasTitles":{"smlnj":"SML/NJ"},"owner":"RunDevelopment"},"solidity":{"title":"Solidity (Ethereum)","alias":"sol","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"stan":{"title":"Stan","owner":"RunDevelopment"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","vbnet"],"owner":"RunDevelopment"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"typoscript":{"title":"TypoScript","alias":"tsconfig","aliasTitles":{"tsconfig":"TSConfig"},"owner":"dkern"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","optional":"regex","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":["vb","vba"],"aliasTitles":{"vba":"VBA"},"owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xml-doc":{"title":"XML doc (.net)","require":"markup","modify":["csharp","fsharp","vbnet"],"owner":"RunDevelopment"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"yang":{"title":"YANG","owner":"RunDevelopment"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml","ssml","atom","rss"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","ssml":"SSML","atom":"Atom","rss":"RSS"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","optional":"regex","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"ABNF","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"agda":{"title":"Agda","owner":"xy-ren"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"dkern"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"birb":{"title":"Birb","require":"clike","owner":"Calamity210"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"BNF","alias":"rbnf","aliasTitles":{"rbnf":"RBNF"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"bsl":{"title":"BSL (1C:Enterprise)","alias":"oscript","aliasTitles":{"oscript":"OneScript"},"owner":"Diversus23"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"clojure":{"title":"Clojure","owner":"troglotit"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"cypher":{"title":"Cypher","owner":"RunDevelopment"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dax":{"title":"DAX","owner":"peterbud"},"dhall":{"title":"Dhall","owner":"RunDevelopment"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"EBNF","owner":"RunDevelopment"},"editorconfig":{"title":"EditorConfig","owner":"osipxd"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"c","owner":"Golmote"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","optional":["markdown"],"owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"hlsl":{"title":"HLSL","require":"c","owner":"RunDevelopment"},"http":{"title":"HTTP","optional":["css","javascript","json","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"ignore":{"title":".ignore","owner":"osipxd","alias":["gitignore","hgignore","npmignore"],"aliasTitles":{"gitignore":".gitignore","hgignore":".hgignore","npmignore":".npmignore"}},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike","typescript"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","alias":"webmanifest","aliasTitles":{"webmanifest":"Web App Manifest"},"owner":"CupOfTea696"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"jsstacktrace":{"title":"JS stack trace","owner":"sbrl"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","alias":["kt","kts"],"aliasTitles":{"kts":"Kotlin Script"},"require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"mongodb":{"title":"MongoDB","owner":"airs0urce","require":"javascript"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"naniscript":{"title":"Naninovel Script","owner":"Elringus","alias":"nani"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":"markup-templating","owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"purebasic":{"title":"PureBasic","require":"clike","alias":"pbfasm","owner":"HeX0R101"},"purescript":{"title":"PureScript","require":"haskell","alias":"purs","owner":"sriharshachilakapati"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"racket":{"title":"Racket","require":"scheme","alias":"rkt","owner":"RunDevelopment"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","owner":"RunDevelopment"},"renpy":{"title":"Ren'py","alias":"rpy","owner":"HyuchiaDiego"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","alias":["sh-session","shellsession"],"owner":"RunDevelopment"},"smali":{"title":"Smali","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sml":{"title":"SML","alias":"smlnj","aliasTitles":{"smlnj":"SML/NJ"},"owner":"RunDevelopment"},"solidity":{"title":"Solidity (Ethereum)","alias":"sol","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"stan":{"title":"Stan","owner":"RunDevelopment"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","vbnet"],"owner":"RunDevelopment"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"typoscript":{"title":"TypoScript","alias":"tsconfig","aliasTitles":{"tsconfig":"TSConfig"},"owner":"dkern"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","optional":"regex","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":["vb","vba"],"aliasTitles":{"vba":"VBA"},"owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xml-doc":{"title":"XML doc (.net)","require":"markup","modify":["csharp","fsharp","vbnet"],"owner":"RunDevelopment"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"yang":{"title":"YANG","owner":"RunDevelopment"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; if (typeof module !== 'undefined' && module.exports) { module.exports = components; } \ No newline at end of file diff --git a/components.json b/components.json index 4e6ba36922..bf1935df94 100644 --- a/components.json +++ b/components.json @@ -837,7 +837,7 @@ }, "php": { "title": "PHP", - "require": ["clike", "markup-templating"], + "require": "markup-templating", "owner": "milesj" }, "phpdoc": { diff --git a/plugins/autoloader/prism-autoloader.js b/plugins/autoloader/prism-autoloader.js index 36764c4301..869a284de9 100644 --- a/plugins/autoloader/prism-autoloader.js +++ b/plugins/autoloader/prism-autoloader.js @@ -83,10 +83,7 @@ "objectivec": "c", "opencl": "c", "parser": "markup", - "php": [ - "clike", - "markup-templating" - ], + "php": "markup-templating", "phpdoc": [ "php", "javadoclike" diff --git a/plugins/autoloader/prism-autoloader.min.js b/plugins/autoloader/prism-autoloader.min.js index aae7f91c62..a35487e028 100644 --- a/plugins/autoloader/prism-autoloader.min.js +++ b/plugins/autoloader/prism-autoloader.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof self&&self.Prism&&self.document&&document.createElement){var l={javascript:"clike",actionscript:"javascript",arduino:"cpp",aspnet:["markup","csharp"],birb:"clike",bison:"c",c:"clike",csharp:"clike",cpp:"c",coffeescript:"javascript",crystal:"ruby","css-extras":"css",d:"clike",dart:"clike",django:"markup-templating",ejs:["javascript","markup-templating"],etlua:["lua","markup-templating"],erb:["ruby","markup-templating"],fsharp:"clike","firestore-security-rules":"clike",flow:"javascript",ftl:"markup-templating",gml:"clike",glsl:"c",go:"clike",groovy:"clike",haml:"ruby",handlebars:"markup-templating",haxe:"clike",hlsl:"c",java:"clike",javadoc:["markup","java","javadoclike"],jolie:"clike",jsdoc:["javascript","javadoclike","typescript"],"js-extras":"javascript",json5:"json",jsonp:"json","js-templates":"javascript",kotlin:"clike",latte:["clike","markup-templating","php"],less:"css",lilypond:"scheme",markdown:"markup","markup-templating":"markup",mongodb:"javascript",n4js:"javascript",nginx:"clike",objectivec:"c",opencl:"c",parser:"markup",php:["clike","markup-templating"],phpdoc:["php","javadoclike"],"php-extras":"php",plsql:"sql",processing:"clike",protobuf:"clike",pug:["markup","javascript"],purebasic:"clike",purescript:"haskell",qml:"javascript",qore:"clike",racket:"scheme",jsx:["markup","javascript"],tsx:["jsx","typescript"],reason:"clike",ruby:"clike",sass:"css",scss:"css",scala:"java","shell-session":"bash",smarty:"markup-templating",solidity:"clike",soy:"markup-templating",sparql:"turtle",sqf:"clike",swift:"clike","t4-cs":["t4-templating","csharp"],"t4-vb":["t4-templating","vbnet"],tap:"yaml",tt2:["clike","markup-templating"],textile:"markup",twig:"markup",typescript:"javascript",vala:"clike",vbnet:"basic",velocity:"markup",wiki:"markup",xeora:"markup","xml-doc":"markup",xquery:"markup"},n={html:"markup",xml:"markup",svg:"markup",mathml:"markup",ssml:"markup",atom:"markup",rss:"markup",js:"javascript",g4:"antlr4",adoc:"asciidoc",shell:"bash",shortcode:"bbcode",rbnf:"bnf",oscript:"bsl",cs:"csharp",dotnet:"csharp",coffee:"coffeescript",conc:"concurnas",jinja2:"django","dns-zone":"dns-zone-file",dockerfile:"docker",eta:"ejs",xlsx:"excel-formula",xls:"excel-formula",gamemakerlanguage:"gml",hs:"haskell",gitignore:"ignore",hgignore:"ignore",npmignore:"ignore",webmanifest:"json",kt:"kotlin",kts:"kotlin",tex:"latex",context:"latex",ly:"lilypond",emacs:"lisp",elisp:"lisp","emacs-lisp":"lisp",md:"markdown",moon:"moonscript",n4jsd:"n4js",nani:"naniscript",objc:"objectivec",objectpascal:"pascal",px:"pcaxis",pcode:"peoplecode",pq:"powerquery",mscript:"powerquery",pbfasm:"purebasic",purs:"purescript",py:"python",rkt:"racket",rpy:"renpy",robot:"robotframework",rb:"ruby","sh-session":"shell-session",shellsession:"shell-session",smlnj:"sml",sol:"solidity",sln:"solution-file",rq:"sparql",t4:"t4-cs",trig:"turtle",ts:"typescript",tsconfig:"typoscript",uscript:"unrealscript",uc:"unrealscript",vb:"visual-basic",vba:"visual-basic",xeoracube:"xeora",yml:"yaml"},p={},e="components/",a=Prism.util.currentScript();if(a){var r=/\bplugins\/autoloader\/prism-autoloader\.(?:min\.)?js(?:\?[^\r\n/]*)?$/i,s=/(^|\/)[\w-]+\.(?:min\.)?js(?:\?[^\r\n/]*)?$/i,t=a.getAttribute("data-autoloader-path");if(null!=t)e=t.trim().replace(/\/?$/,"/");else{var i=a.src;r.test(i)?e=i.replace(r,"components/"):s.test(i)&&(e=i.replace(s,"$1components/"))}}var o=Prism.plugins.autoloader={languages_path:e,use_minified:!0,loadLanguages:m};Prism.hooks.add("complete",function(e){var a=e.element,r=e.language;if(a&&r&&"none"!==r){var s=function(e){var a=(e.getAttribute("data-dependencies")||"").trim();if(!a){var r=e.parentElement;r&&"pre"===r.tagName.toLowerCase()&&(a=(r.getAttribute("data-dependencies")||"").trim())}return a?a.split(/\s*,\s*/g):[]}(a);s.push(r),s.every(u)||m(s,function(){Prism.highlightElement(a)})}})}function u(e){if(0<=e.indexOf("!"))return!1;if((e=n[e]||e)in Prism.languages)return!0;var a=p[e];return a&&!a.error&&!1===a.loading}function m(e,a,r){"string"==typeof e&&(e=[e]);var s=e.length,t=0,i=!1;function c(){i||++t===s&&a&&a(e)}0!==s?e.forEach(function(e){!function(a,r,s){var t=0<=a.indexOf("!");function e(){var e=p[a];e||(e=p[a]={callbacks:[]}),e.callbacks.push({success:r,error:s}),!t&&u(a)?k(a,"success"):!t&&e.error?k(a,"error"):!t&&e.loading||(e.loading=!0,e.error=!1,function(e,a,r){var s=document.createElement("script");s.src=e,s.async=!0,s.onload=function(){document.body.removeChild(s),a&&a()},s.onerror=function(){document.body.removeChild(s),r&&r()},document.body.appendChild(s)}(function(e){return o.languages_path+"prism-"+e+(o.use_minified?".min":"")+".js"}(a),function(){e.loading=!1,k(a,"success")},function(){e.loading=!1,e.error=!0,k(a,"error")}))}a=a.replace("!",""),a=n[a]||a;var i=l[a];i&&i.length?m(i,e,s):e()}(e,c,function(){i||(i=!0,r&&r(e))})}):a&&setTimeout(a,0)}function k(e,a){if(p[e]){for(var r=p[e].callbacks,s=0,t=r.length;s Date: Wed, 4 Nov 2020 17:37:13 +0100 Subject: [PATCH 0657/1100] Unescaped Markup: Refactoring (#2445) --- .../prism-unescaped-markup.js | 62 ++++++++++++------- .../prism-unescaped-markup.min.js | 2 +- 2 files changed, 41 insertions(+), 23 deletions(-) diff --git a/plugins/unescaped-markup/prism-unescaped-markup.js b/plugins/unescaped-markup/prism-unescaped-markup.js index 7437090ba9..8ea2d68268 100644 --- a/plugins/unescaped-markup/prism-unescaped-markup.js +++ b/plugins/unescaped-markup/prism-unescaped-markup.js @@ -4,41 +4,59 @@ return; } + // https://developer.mozilla.org/en-US/docs/Web/API/Element/matches#Polyfill + if (!Element.prototype.matches) { + Element.prototype.matches = Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector; + } + + Prism.plugins.UnescapedMarkup = true; Prism.hooks.add('before-highlightall', function (env) { - env.selector += ", [class*='lang-'] script[type='text/plain'], [class*='language-'] script[type='text/plain']" + - ", script[type='text/plain'][class*='lang-'], script[type='text/plain'][class*='language-']"; + env.selector += ', [class*="lang-"] script[type="text/plain"]' + + ', [class*="language-"] script[type="text/plain"]' + + ', script[type="text/plain"][class*="lang-"]' + + ', script[type="text/plain"][class*="language-"]'; }); Prism.hooks.add('before-sanity-check', function (env) { - if ((env.element.matches || env.element.msMatchesSelector).call(env.element, "script[type='text/plain']")) { - var code = document.createElement("code"); - var pre = document.createElement("pre"); - - pre.className = code.className = env.element.className; - - if (env.element.dataset) { - Object.keys(env.element.dataset).forEach(function (key) { - if (Object.prototype.hasOwnProperty.call(env.element.dataset, key)) { - pre.dataset[key] = env.element.dataset[key]; - } - }); - } + /** @type {HTMLElement} */ + var element = env.element; + + if (element.matches('script[type="text/plain"]')) { + // found a - + diff --git a/plugins/diff-highlight/prism-diff-highlight.js b/plugins/diff-highlight/prism-diff-highlight.js index ae38fab6ab..3b912a025d 100644 --- a/plugins/diff-highlight/prism-diff-highlight.js +++ b/plugins/diff-highlight/prism-diff-highlight.js @@ -1,28 +1,33 @@ (function () { - if (typeof Prism === 'undefined' || !Prism.languages['diff']) { + if (typeof Prism === 'undefined') { return; } - var LANGUAGE_REGEX = /diff-([\w-]+)/i; + var LANGUAGE_REGEX = /^diff-([\w-]+)/i; var HTML_TAG = /<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/gi; //this will match a line plus the line break while ignoring the line breaks HTML tags may contain. var HTML_LINE = RegExp(/(?:__|[^\r\n<])*(?:\r\n?|\n|(?:__|[^\r\n<])(?![^\r\n]))/.source.replace(/__/g, function () { return HTML_TAG.source; }), 'gi'); - var PREFIXES = Prism.languages.diff.PREFIXES; - + var warningLogged = false; Prism.hooks.add('before-sanity-check', function (env) { var lang = env.language; if (LANGUAGE_REGEX.test(lang) && !env.grammar) { - env.grammar = Prism.languages[lang] = Prism.languages['diff']; + env.grammar = Prism.languages[lang] = Prism.languages.diff; } }); Prism.hooks.add('before-tokenize', function (env) { + if (!warningLogged && !Prism.languages.diff && !Prism.plugins.autoloader) { + warningLogged = true; + console.warn("Prism's Diff Highlight plugin requires the Diff language definition (prism-diff.js)." + + "Make sure the language definition is loaded or use Prism's Autoloader plugin."); + } + var lang = env.language; if (LANGUAGE_REGEX.test(lang) && !Prism.languages[lang]) { - Prism.languages[lang] = Prism.languages['diff']; + Prism.languages[lang] = Prism.languages.diff; } }); @@ -39,8 +44,10 @@ diffGrammar = Prism.languages[diffLanguage]; } + var PREFIXES = Prism.languages.diff && Prism.languages.diff.PREFIXES; + // one of the diff tokens without any nested tokens - if (env.type in PREFIXES) { + if (PREFIXES && env.type in PREFIXES) { /** @type {string} */ var content = env.content.replace(HTML_TAG, ''); // remove all HTML tags diff --git a/plugins/diff-highlight/prism-diff-highlight.min.js b/plugins/diff-highlight/prism-diff-highlight.min.js index 8d9aefb2cb..8b3160be27 100644 --- a/plugins/diff-highlight/prism-diff-highlight.min.js +++ b/plugins/diff-highlight/prism-diff-highlight.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof Prism&&Prism.languages.diff){var o=/diff-([\w-]+)/i,m=/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/gi,c=RegExp("(?:__|[^\r\n<])*(?:\r\n?|\n|(?:__|[^\r\n<])(?![^\r\n]))".replace(/__/g,function(){return m.source}),"gi"),d=Prism.languages.diff.PREFIXES;Prism.hooks.add("before-sanity-check",function(e){var a=e.language;o.test(a)&&!e.grammar&&(e.grammar=Prism.languages[a]=Prism.languages.diff)}),Prism.hooks.add("before-tokenize",function(e){var a=e.language;o.test(a)&&!Prism.languages[a]&&(Prism.languages[a]=Prism.languages.diff)}),Prism.hooks.add("wrap",function(e){var a,s;if("diff"!==e.language){var n=o.exec(e.language);if(!n)return;a=n[1],s=Prism.languages[a]}if(e.type in d){var r,i=e.content.replace(m,"").replace(/</g,"<").replace(/&/g,"&"),g=i.replace(/(^|[\r\n])./g,"$1");r=s?Prism.highlight(g,s,a):Prism.util.encode(g);var f,t=new Prism.Token("prefix",d[e.type],[/\w+/.exec(e.type)[0]]),u=Prism.Token.stringify(t,e.language),l=[];for(c.lastIndex=0;f=c.exec(r);)l.push(u+f[0]);/(?:^|[\r\n]).$/.test(i)&&l.push(u),e.content=l.join(""),s&&e.classes.push("language-"+a)}})}}(); \ No newline at end of file +!function(){if("undefined"!=typeof Prism){var m=/^diff-([\w-]+)/i,d=/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/gi,c=RegExp("(?:__|[^\r\n<])*(?:\r\n?|\n|(?:__|[^\r\n<])(?![^\r\n]))".replace(/__/g,function(){return d.source}),"gi"),a=!1;Prism.hooks.add("before-sanity-check",function(e){var i=e.language;m.test(i)&&!e.grammar&&(e.grammar=Prism.languages[i]=Prism.languages.diff)}),Prism.hooks.add("before-tokenize",function(e){a||Prism.languages.diff||Prism.plugins.autoloader||(a=!0,console.warn("Prism's Diff Highlight plugin requires the Diff language definition (prism-diff.js).Make sure the language definition is loaded or use Prism's Autoloader plugin."));var i=e.language;m.test(i)&&!Prism.languages[i]&&(Prism.languages[i]=Prism.languages.diff)}),Prism.hooks.add("wrap",function(e){var i,a;if("diff"!==e.language){var s=m.exec(e.language);if(!s)return;i=s[1],a=Prism.languages[i]}var r=Prism.languages.diff&&Prism.languages.diff.PREFIXES;if(r&&e.type in r){var n,g=e.content.replace(d,"").replace(/</g,"<").replace(/&/g,"&"),f=g.replace(/(^|[\r\n])./g,"$1");n=a?Prism.highlight(f,a,i):Prism.util.encode(f);var u,l=new Prism.Token("prefix",r[e.type],[/\w+/.exec(e.type)[0]]),t=Prism.Token.stringify(l,e.language),o=[];for(c.lastIndex=0;u=c.exec(n);)o.push(t+u[0]);/(?:^|[\r\n]).$/.test(g)&&o.push(t),e.content=o.join(""),a&&e.classes.push("language-"+i)}})}}(); \ No newline at end of file From 7951ca249bdcc5859868c89e398dea0ce20fe072 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Wed, 4 Nov 2020 21:54:24 +0100 Subject: [PATCH 0660/1100] Scheme: Fixed function and function-like false positives (#2611) --- components/prism-scheme.js | 12 +++++------ components/prism-scheme.min.js | 2 +- tests/languages/scheme/issue2609.test | 30 +++++++++++++++++++++++++++ 3 files changed, 37 insertions(+), 7 deletions(-) create mode 100644 tests/languages/scheme/issue2609.test diff --git a/components/prism-scheme.js b/components/prism-scheme.js index 176add2fcf..de05b9660c 100644 --- a/components/prism-scheme.js +++ b/components/prism-scheme.js @@ -21,25 +21,25 @@ Prism.languages.scheme = { 'lambda-parameter': [ // https://www.cs.cmu.edu/Groups/AI/html/r4rs/r4rs_6.html#SEC30 { - pattern: /(\(lambda\s+)(?:[^|()'\s]+|\|(?:[^\\|]|\\.)*\|)/, + pattern: /((?:^|[^'`#])\(lambda\s+)(?:[^|()'\s]+|\|(?:[^\\|]|\\.)*\|)/, lookbehind: true }, { - pattern: /(\(lambda\s+\()[^()']+/, + pattern: /((?:^|[^'`#])\(lambda\s+\()[^()']+/, lookbehind: true } ], 'keyword': { - pattern: /(\()(?:begin|case(?:-lambda)?|cond(?:-expand)?|define(?:-library|-macro|-record-type|-syntax|-values)?|defmacro|delay(?:-force)?|do|else|export|except|guard|if|import|include(?:-ci|-library-declarations)?|lambda|let(?:rec)?(?:-syntax|-values|\*)?|let\*-values|only|parameterize|prefix|(?:quasi-?)?quote|rename|set!|syntax-(?:case|rules)|unless|unquote(?:-splicing)?|when)(?=[()\s]|$)/, + pattern: /((?:^|[^'`#])\()(?:begin|case(?:-lambda)?|cond(?:-expand)?|define(?:-library|-macro|-record-type|-syntax|-values)?|defmacro|delay(?:-force)?|do|else|export|except|guard|if|import|include(?:-ci|-library-declarations)?|lambda|let(?:rec)?(?:-syntax|-values|\*)?|let\*-values|only|parameterize|prefix|(?:quasi-?)?quote|rename|set!|syntax-(?:case|rules)|unless|unquote(?:-splicing)?|when)(?=[()\s]|$)/, lookbehind: true }, 'builtin': { // all functions of the base library of R7RS plus some of built-ins of R5Rs - pattern: /(\()(?:abs|and|append|apply|assoc|ass[qv]|binary-port\?|boolean=?\?|bytevector(?:-append|-copy|-copy!|-length|-u8-ref|-u8-set!|\?)?|caar|cadr|call-with-(?:current-continuation|port|values)|call\/cc|car|cdar|cddr|cdr|ceiling|char(?:->integer|-ready\?|\?|<\?|<=\?|=\?|>\?|>=\?)|close-(?:input-port|output-port|port)|complex\?|cons|current-(?:error|input|output)-port|denominator|dynamic-wind|eof-object\??|eq\?|equal\?|eqv\?|error|error-object(?:-irritants|-message|\?)|eval|even\?|exact(?:-integer-sqrt|-integer\?|\?)?|expt|features|file-error\?|floor(?:-quotient|-remainder|\/)?|flush-output-port|for-each|gcd|get-output-(?:bytevector|string)|inexact\??|input-port(?:-open\?|\?)|integer(?:->char|\?)|lcm|length|list(?:->string|->vector|-copy|-ref|-set!|-tail|\?)?|make-(?:bytevector|list|parameter|string|vector)|map|max|member|memq|memv|min|modulo|negative\?|newline|not|null\?|number(?:->string|\?)|numerator|odd\?|open-(?:input|output)-(?:bytevector|string)|or|output-port(?:-open\?|\?)|pair\?|peek-char|peek-u8|port\?|positive\?|procedure\?|quotient|raise|raise-continuable|rational\?|rationalize|read-(?:bytevector|bytevector!|char|error\?|line|string|u8)|real\?|remainder|reverse|round|set-c[ad]r!|square|string(?:->list|->number|->symbol|->utf8|->vector|-append|-copy|-copy!|-fill!|-for-each|-length|-map|-ref|-set!|\?|<\?|<=\?|=\?|>\?|>=\?)?|substring|symbol(?:->string|\?|=\?)|syntax-error|textual-port\?|truncate(?:-quotient|-remainder|\/)?|u8-ready\?|utf8->string|values|vector(?:->list|->string|-append|-copy|-copy!|-fill!|-for-each|-length|-map|-ref|-set!|\?)?|with-exception-handler|write-(?:bytevector|char|string|u8)|zero\?)(?=[()\s]|$)/, + pattern: /((?:^|[^'`#])\()(?:abs|and|append|apply|assoc|ass[qv]|binary-port\?|boolean=?\?|bytevector(?:-append|-copy|-copy!|-length|-u8-ref|-u8-set!|\?)?|caar|cadr|call-with-(?:current-continuation|port|values)|call\/cc|car|cdar|cddr|cdr|ceiling|char(?:->integer|-ready\?|\?|<\?|<=\?|=\?|>\?|>=\?)|close-(?:input-port|output-port|port)|complex\?|cons|current-(?:error|input|output)-port|denominator|dynamic-wind|eof-object\??|eq\?|equal\?|eqv\?|error|error-object(?:-irritants|-message|\?)|eval|even\?|exact(?:-integer-sqrt|-integer\?|\?)?|expt|features|file-error\?|floor(?:-quotient|-remainder|\/)?|flush-output-port|for-each|gcd|get-output-(?:bytevector|string)|inexact\??|input-port(?:-open\?|\?)|integer(?:->char|\?)|lcm|length|list(?:->string|->vector|-copy|-ref|-set!|-tail|\?)?|make-(?:bytevector|list|parameter|string|vector)|map|max|member|memq|memv|min|modulo|negative\?|newline|not|null\?|number(?:->string|\?)|numerator|odd\?|open-(?:input|output)-(?:bytevector|string)|or|output-port(?:-open\?|\?)|pair\?|peek-char|peek-u8|port\?|positive\?|procedure\?|quotient|raise|raise-continuable|rational\?|rationalize|read-(?:bytevector|bytevector!|char|error\?|line|string|u8)|real\?|remainder|reverse|round|set-c[ad]r!|square|string(?:->list|->number|->symbol|->utf8|->vector|-append|-copy|-copy!|-fill!|-for-each|-length|-map|-ref|-set!|\?|<\?|<=\?|=\?|>\?|>=\?)?|substring|symbol(?:->string|\?|=\?)|syntax-error|textual-port\?|truncate(?:-quotient|-remainder|\/)?|u8-ready\?|utf8->string|values|vector(?:->list|->string|-append|-copy|-copy!|-fill!|-for-each|-length|-map|-ref|-set!|\?)?|with-exception-handler|write-(?:bytevector|char|string|u8)|zero\?)(?=[()\s]|$)/, lookbehind: true }, 'operator': { - pattern: /(\()(?:[-+*%/]|[<>]=?|=>?)(?=[()\s]|$)/, + pattern: /((?:^|[^'`#])\()(?:[-+*%/]|[<>]=?|=>?)(?=[()\s]|$)/, lookbehind: true }, 'number': { @@ -66,7 +66,7 @@ Prism.languages.scheme = { lookbehind: true }, 'function': { - pattern: /(\()(?:[^|()'\s]+|\|(?:[^\\|]|\\.)*\|)(?=[()\s]|$)/, + pattern: /((?:^|[^'`#])\()(?:[^|()'\s]+|\|(?:[^\\|]|\\.)*\|)(?=[()\s]|$)/, lookbehind: true }, 'identifier': { diff --git a/components/prism-scheme.min.js b/components/prism-scheme.min.js index db51b867a2..eab22d0a88 100644 --- a/components/prism-scheme.min.js +++ b/components/prism-scheme.min.js @@ -1 +1 @@ -Prism.languages.scheme={comment:/;.*|#;\s*\((?:[^()]|\([^()]*\))*\)|#\|(?:[^#|]|#(?!\|)|\|(?!#)|#\|(?:[^#|]|#(?!\|)|\|(?!#))*\|#)*\|#/,string:{pattern:/"(?:[^"\\]|\\.)*"/,greedy:!0},symbol:{pattern:/'[^()#'\s]+/,greedy:!0},character:{pattern:/#\\(?:[ux][a-fA-F\d]+\b|[-a-zA-Z]+\b|\S)/,greedy:!0,alias:"string"},"lambda-parameter":[{pattern:/(\(lambda\s+)(?:[^|()'\s]+|\|(?:[^\\|]|\\.)*\|)/,lookbehind:!0},{pattern:/(\(lambda\s+\()[^()']+/,lookbehind:!0}],keyword:{pattern:/(\()(?:begin|case(?:-lambda)?|cond(?:-expand)?|define(?:-library|-macro|-record-type|-syntax|-values)?|defmacro|delay(?:-force)?|do|else|export|except|guard|if|import|include(?:-ci|-library-declarations)?|lambda|let(?:rec)?(?:-syntax|-values|\*)?|let\*-values|only|parameterize|prefix|(?:quasi-?)?quote|rename|set!|syntax-(?:case|rules)|unless|unquote(?:-splicing)?|when)(?=[()\s]|$)/,lookbehind:!0},builtin:{pattern:/(\()(?:abs|and|append|apply|assoc|ass[qv]|binary-port\?|boolean=?\?|bytevector(?:-append|-copy|-copy!|-length|-u8-ref|-u8-set!|\?)?|caar|cadr|call-with-(?:current-continuation|port|values)|call\/cc|car|cdar|cddr|cdr|ceiling|char(?:->integer|-ready\?|\?|<\?|<=\?|=\?|>\?|>=\?)|close-(?:input-port|output-port|port)|complex\?|cons|current-(?:error|input|output)-port|denominator|dynamic-wind|eof-object\??|eq\?|equal\?|eqv\?|error|error-object(?:-irritants|-message|\?)|eval|even\?|exact(?:-integer-sqrt|-integer\?|\?)?|expt|features|file-error\?|floor(?:-quotient|-remainder|\/)?|flush-output-port|for-each|gcd|get-output-(?:bytevector|string)|inexact\??|input-port(?:-open\?|\?)|integer(?:->char|\?)|lcm|length|list(?:->string|->vector|-copy|-ref|-set!|-tail|\?)?|make-(?:bytevector|list|parameter|string|vector)|map|max|member|memq|memv|min|modulo|negative\?|newline|not|null\?|number(?:->string|\?)|numerator|odd\?|open-(?:input|output)-(?:bytevector|string)|or|output-port(?:-open\?|\?)|pair\?|peek-char|peek-u8|port\?|positive\?|procedure\?|quotient|raise|raise-continuable|rational\?|rationalize|read-(?:bytevector|bytevector!|char|error\?|line|string|u8)|real\?|remainder|reverse|round|set-c[ad]r!|square|string(?:->list|->number|->symbol|->utf8|->vector|-append|-copy|-copy!|-fill!|-for-each|-length|-map|-ref|-set!|\?|<\?|<=\?|=\?|>\?|>=\?)?|substring|symbol(?:->string|\?|=\?)|syntax-error|textual-port\?|truncate(?:-quotient|-remainder|\/)?|u8-ready\?|utf8->string|values|vector(?:->list|->string|-append|-copy|-copy!|-fill!|-for-each|-length|-map|-ref|-set!|\?)?|with-exception-handler|write-(?:bytevector|char|string|u8)|zero\?)(?=[()\s]|$)/,lookbehind:!0},operator:{pattern:/(\()(?:[-+*%/]|[<>]=?|=>?)(?=[()\s]|$)/,lookbehind:!0},number:{pattern:/(^|[\s()])(?:(?:#d(?:#[ei])?|#[ei](?:#d)?)?[+-]?(?:(?:\d*\.?\d+(?:[eE][+-]?\d+)?|\d+\/\d+)(?:[+-](?:\d*\.?\d+(?:[eE][+-]?\d+)?|\d+\/\d+)i)?|(?:\d*\.?\d+(?:[eE][+-]?\d+)?|\d+\/\d+)i)|(?:#[box](?:#[ei])?|#[ei](?:#[box])?)[+-]?(?:[\da-fA-F]+(?:\/[\da-fA-F]+)?(?:[+-][\da-fA-F]+(?:\/[\da-fA-F]+)?i)?|[\da-fA-F]+(?:\/[\da-fA-F]+)?i))(?=[()\s]|$)/,lookbehind:!0},boolean:{pattern:/(^|[\s()])#(?:[ft]|false|true)(?=[()\s]|$)/,lookbehind:!0},function:{pattern:/(\()(?:[^|()'\s]+|\|(?:[^\\|]|\\.)*\|)(?=[()\s]|$)/,lookbehind:!0},identifier:{pattern:/(^|[\s()])\|(?:[^\\|]|\\.)*\|(?=[()\s]|$)/,lookbehind:!0,greedy:!0},punctuation:/[()']/}; \ No newline at end of file +Prism.languages.scheme={comment:/;.*|#;\s*\((?:[^()]|\([^()]*\))*\)|#\|(?:[^#|]|#(?!\|)|\|(?!#)|#\|(?:[^#|]|#(?!\|)|\|(?!#))*\|#)*\|#/,string:{pattern:/"(?:[^"\\]|\\.)*"/,greedy:!0},symbol:{pattern:/'[^()#'\s]+/,greedy:!0},character:{pattern:/#\\(?:[ux][a-fA-F\d]+\b|[-a-zA-Z]+\b|\S)/,greedy:!0,alias:"string"},"lambda-parameter":[{pattern:/((?:^|[^'`#])\(lambda\s+)(?:[^|()'\s]+|\|(?:[^\\|]|\\.)*\|)/,lookbehind:!0},{pattern:/((?:^|[^'`#])\(lambda\s+\()[^()']+/,lookbehind:!0}],keyword:{pattern:/((?:^|[^'`#])\()(?:begin|case(?:-lambda)?|cond(?:-expand)?|define(?:-library|-macro|-record-type|-syntax|-values)?|defmacro|delay(?:-force)?|do|else|export|except|guard|if|import|include(?:-ci|-library-declarations)?|lambda|let(?:rec)?(?:-syntax|-values|\*)?|let\*-values|only|parameterize|prefix|(?:quasi-?)?quote|rename|set!|syntax-(?:case|rules)|unless|unquote(?:-splicing)?|when)(?=[()\s]|$)/,lookbehind:!0},builtin:{pattern:/((?:^|[^'`#])\()(?:abs|and|append|apply|assoc|ass[qv]|binary-port\?|boolean=?\?|bytevector(?:-append|-copy|-copy!|-length|-u8-ref|-u8-set!|\?)?|caar|cadr|call-with-(?:current-continuation|port|values)|call\/cc|car|cdar|cddr|cdr|ceiling|char(?:->integer|-ready\?|\?|<\?|<=\?|=\?|>\?|>=\?)|close-(?:input-port|output-port|port)|complex\?|cons|current-(?:error|input|output)-port|denominator|dynamic-wind|eof-object\??|eq\?|equal\?|eqv\?|error|error-object(?:-irritants|-message|\?)|eval|even\?|exact(?:-integer-sqrt|-integer\?|\?)?|expt|features|file-error\?|floor(?:-quotient|-remainder|\/)?|flush-output-port|for-each|gcd|get-output-(?:bytevector|string)|inexact\??|input-port(?:-open\?|\?)|integer(?:->char|\?)|lcm|length|list(?:->string|->vector|-copy|-ref|-set!|-tail|\?)?|make-(?:bytevector|list|parameter|string|vector)|map|max|member|memq|memv|min|modulo|negative\?|newline|not|null\?|number(?:->string|\?)|numerator|odd\?|open-(?:input|output)-(?:bytevector|string)|or|output-port(?:-open\?|\?)|pair\?|peek-char|peek-u8|port\?|positive\?|procedure\?|quotient|raise|raise-continuable|rational\?|rationalize|read-(?:bytevector|bytevector!|char|error\?|line|string|u8)|real\?|remainder|reverse|round|set-c[ad]r!|square|string(?:->list|->number|->symbol|->utf8|->vector|-append|-copy|-copy!|-fill!|-for-each|-length|-map|-ref|-set!|\?|<\?|<=\?|=\?|>\?|>=\?)?|substring|symbol(?:->string|\?|=\?)|syntax-error|textual-port\?|truncate(?:-quotient|-remainder|\/)?|u8-ready\?|utf8->string|values|vector(?:->list|->string|-append|-copy|-copy!|-fill!|-for-each|-length|-map|-ref|-set!|\?)?|with-exception-handler|write-(?:bytevector|char|string|u8)|zero\?)(?=[()\s]|$)/,lookbehind:!0},operator:{pattern:/((?:^|[^'`#])\()(?:[-+*%/]|[<>]=?|=>?)(?=[()\s]|$)/,lookbehind:!0},number:{pattern:/(^|[\s()])(?:(?:#d(?:#[ei])?|#[ei](?:#d)?)?[+-]?(?:(?:\d*\.?\d+(?:[eE][+-]?\d+)?|\d+\/\d+)(?:[+-](?:\d*\.?\d+(?:[eE][+-]?\d+)?|\d+\/\d+)i)?|(?:\d*\.?\d+(?:[eE][+-]?\d+)?|\d+\/\d+)i)|(?:#[box](?:#[ei])?|#[ei](?:#[box])?)[+-]?(?:[\da-fA-F]+(?:\/[\da-fA-F]+)?(?:[+-][\da-fA-F]+(?:\/[\da-fA-F]+)?i)?|[\da-fA-F]+(?:\/[\da-fA-F]+)?i))(?=[()\s]|$)/,lookbehind:!0},boolean:{pattern:/(^|[\s()])#(?:[ft]|false|true)(?=[()\s]|$)/,lookbehind:!0},function:{pattern:/((?:^|[^'`#])\()(?:[^|()'\s]+|\|(?:[^\\|]|\\.)*\|)(?=[()\s]|$)/,lookbehind:!0},identifier:{pattern:/(^|[\s()])\|(?:[^\\|]|\\.)*\|(?=[()\s]|$)/,lookbehind:!0,greedy:!0},punctuation:/[()']/}; \ No newline at end of file diff --git a/tests/languages/scheme/issue2609.test b/tests/languages/scheme/issue2609.test new file mode 100644 index 0000000000..88baf594e4 --- /dev/null +++ b/tests/languages/scheme/issue2609.test @@ -0,0 +1,30 @@ +'(foo bar baz) +`(foo bar baz) +#(foo bar baz) +'#(foo bar baz) + +---------------------------------------------------- + +[ + ["punctuation", "'"], + ["punctuation", "("], + "foo bar baz", + ["punctuation", ")"], + "\r\n`", + ["punctuation", "("], + "foo bar baz", + ["punctuation", ")"], + "\r\n#", + ["punctuation", "("], + "foo bar baz", + ["punctuation", ")"], + ["punctuation", "'"], + "#", + ["punctuation", "("], + "foo bar baz", + ["punctuation", ")"] +] + +---------------------------------------------------- + +None of the "foo"s are functions, so they shouldn't be highlighted as such. See #2609 for more details. \ No newline at end of file From 2d3a1267dcceac2824c72a77a8cff0553671aecc Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Fri, 6 Nov 2020 23:50:40 +0100 Subject: [PATCH 0661/1100] Tests: Fixed sorted language list test (#2623) --- tests/dependencies-test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/dependencies-test.js b/tests/dependencies-test.js index 5c525db3b5..64588d563d 100644 --- a/tests/dependencies-test.js +++ b/tests/dependencies-test.js @@ -327,7 +327,7 @@ describe('components.json', function () { return comp; } // a and b have the same intermediate form (e.g. "C" => "C", "C++" => "C", "C#" => "C"). - a.title.toLowerCase().localeCompare(b.title.toLowerCase()) + return a.title.toLowerCase().localeCompare(b.title.toLowerCase()); }); assert.sameOrderedMembers(languages, sorted); From 9df20c5ecef9a64bad180c05e7b32b750099026b Mon Sep 17 00:00:00 2001 From: James DiGioia Date: Mon, 9 Nov 2020 09:33:41 -0500 Subject: [PATCH 0662/1100] Added Dangerfile and provide bundle size info (#2608) --- .github/workflows/danger.yml | 20 + .npmignore | 1 + dangerfile.js | 114 +++++ package-lock.json | 902 +++++++++++++++++++++++++++++++++++ package.json | 2 + 5 files changed, 1039 insertions(+) create mode 100644 .github/workflows/danger.yml create mode 100644 dangerfile.js diff --git a/.github/workflows/danger.yml b/.github/workflows/danger.yml new file mode 100644 index 0000000000..d9b1d97b77 --- /dev/null +++ b/.github/workflows/danger.yml @@ -0,0 +1,20 @@ +name: Danger + +on: + pull_request: + branches: [ master ] + +jobs: + run: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v1 + with: + fetch-depth: 0 + - run: npm ci + - name: Danger + run: npx danger ci + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.npmignore b/.npmignore index c2c324b302..370b11bdac 100644 --- a/.npmignore +++ b/.npmignore @@ -13,6 +13,7 @@ tests/ *.html bower.json composer.json +dangerfile.js gulpfile.js .editorconfig .gitattributes diff --git a/dangerfile.js b/dangerfile.js new file mode 100644 index 0000000000..0a6a7779d1 --- /dev/null +++ b/dangerfile.js @@ -0,0 +1,114 @@ +const { markdown } = require('danger'); +const fs = require('fs').promises; +const gzipSize = require('gzip-size'); +const git = require('simple-git/promise')(__dirname).silent(true); + +// https://stackoverflow.com/questions/15900485/correct-way-to-convert-size-in-bytes-to-kb-mb-gb-in-javascript +const formatBytes = (bytes, decimals = 2) => { + if (bytes === 0) return '0 Bytes'; + + const k = 1000; + const dm = decimals < 0 ? 0 : decimals; + const sizes = ['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB']; + + const i = Math.floor(Math.log(Math.abs(bytes)) / Math.log(k)); + + return parseFloat((bytes / Math.pow(k, i)).toFixed(dm)) + ' ' + sizes[i]; +} + +const maybePlus = (from, to) => from < to ? "+" : ""; + +const absDiff = (from, to) => { + if (from === to) { + return formatBytes(0); + } + + return `${maybePlus(from, to)}${formatBytes(to - from)}`; +} + +const percDiff = (from, to) => { + if (from === to) { + return '0%'; + } + + return `${maybePlus(from, to)}${ + (100 * (to - from) / (from || to)).toFixed(1) + }%`; +} + +const getSummary = (rows, totalMasterFileSize, totalFileSize) => { + const numFiles = rows.length; + const maybeS = rows.length > 0 ? 's' : ''; + const byteDiff = absDiff(totalMasterFileSize, totalFileSize); + const percentDiff = percDiff(totalMasterFileSize, totalFileSize); + + return `A total of ${numFiles} file${maybeS} have changed, with a combined diff of ${byteDiff} (${percentDiff}).`; +} + +const getChangedMinifiedFiles = async () => { + const result = await git.diff(['--name-only', '--no-renames', 'master...']); + + return result + ? result.split(/\r?\n/g).filter(file => file.endsWith('.min.js')) + : []; +}; + +const run = async () => { + // Check if master exists & check it out if not. + const result = await git.branch(['--list', 'master']); + if (result.all.length === 0) { + await git.branch(['master', 'origin/master']); + } + + const minified = await getChangedMinifiedFiles(); + + if (minified.length === 0) { + markdown(`## No JS Changes`); + return; + } + + const rows = []; + let totalFileSize = 0; + let totalMasterFileSize = 0; + + for (const file of minified) { + const [fileContents, fileMasterContents] = await Promise.all([ + fs.readFile(file, 'utf-8').catch(() => ''), + git.show([`master:${file}`]).catch(() => ''), + ]); + + const [fileSize, fileMasterSize] = await Promise.all([ + gzipSize(fileContents), + gzipSize(fileMasterContents), + ]); + + totalFileSize += fileSize; + totalMasterFileSize +=fileMasterSize + + rows.push([ + file, + formatBytes(fileMasterSize), + formatBytes(fileSize), + absDiff(fileMasterSize, fileSize), + percDiff(fileMasterSize, fileSize), + ]); + } + + markdown(`## JS File Size Changes (gzipped) + +${getSummary(rows, totalMasterFileSize, totalFileSize)} + +
          + +| file | master | pull | size diff | % diff | +| --- | --- | --- | --- | --- | +${rows.map(row => `| ${row.join(' | ')} |`).join('\n')} + +
          +`); +} + +run().catch(err => { + console.error(err); + process.exit(1); +}); diff --git a/package-lock.json b/package-lock.json index 0ac26b0894..d22a9454a9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,6 +10,193 @@ "integrity": "sha512-oJtNJCMFdIMwXGmx+KxuaD7i3b8uS7TTFYW/FNG2BT8m+fmGHoiPYoH0Pe3gya07WuFmM5FCDIr1x0irkD/hyA==", "dev": true }, + "@babel/polyfill": { + "version": "7.12.1", + "resolved": "https://registry.npmjs.org/@babel/polyfill/-/polyfill-7.12.1.tgz", + "integrity": "sha512-X0pi0V6gxLi6lFZpGmeNa4zxtwEmCs42isWLNjZZDE0Y8yVfgu0T2OAHlzBbdYlqbW/YXVvoBHpATEM+goCj8g==", + "dev": true, + "requires": { + "core-js": "^2.6.5", + "regenerator-runtime": "^0.13.4" + } + }, + "@octokit/auth-token": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-2.4.2.tgz", + "integrity": "sha512-jE/lE/IKIz2v1+/P0u4fJqv0kYwXOTujKemJMFr6FeopsxlIK3+wKDCJGnysg81XID5TgZQbIfuJ5J0lnTiuyQ==", + "dev": true, + "requires": { + "@octokit/types": "^5.0.0" + } + }, + "@octokit/endpoint": { + "version": "6.0.8", + "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-6.0.8.tgz", + "integrity": "sha512-MuRrgv+bM4Q+e9uEvxAB/Kf+Sj0O2JAOBA131uo1o6lgdq1iS8ejKwtqHgdfY91V3rN9R/hdGKFiQYMzVzVBEQ==", + "dev": true, + "requires": { + "@octokit/types": "^5.0.0", + "is-plain-object": "^5.0.0", + "universal-user-agent": "^6.0.0" + }, + "dependencies": { + "is-plain-object": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz", + "integrity": "sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==", + "dev": true + }, + "universal-user-agent": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-6.0.0.tgz", + "integrity": "sha512-isyNax3wXoKaulPDZWHQqbmIx1k2tb9fb3GGDBRxCscfYV2Ch7WxPArBsFEG8s/safwXTT7H4QGhaIkTp9447w==", + "dev": true + } + } + }, + "@octokit/plugin-paginate-rest": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-1.1.2.tgz", + "integrity": "sha512-jbsSoi5Q1pj63sC16XIUboklNw+8tL9VOnJsWycWYR78TKss5PVpIPb1TUUcMQ+bBh7cY579cVAWmf5qG+dw+Q==", + "dev": true, + "requires": { + "@octokit/types": "^2.0.1" + }, + "dependencies": { + "@octokit/types": { + "version": "2.16.2", + "resolved": "https://registry.npmjs.org/@octokit/types/-/types-2.16.2.tgz", + "integrity": "sha512-O75k56TYvJ8WpAakWwYRN8Bgu60KrmX0z1KqFp1kNiFNkgW+JW+9EBKZ+S33PU6SLvbihqd+3drvPxKK68Ee8Q==", + "dev": true, + "requires": { + "@types/node": ">= 8" + } + } + } + }, + "@octokit/plugin-request-log": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@octokit/plugin-request-log/-/plugin-request-log-1.0.2.tgz", + "integrity": "sha512-oTJSNAmBqyDR41uSMunLQKMX0jmEXbwD1fpz8FG27lScV3RhtGfBa1/BBLym+PxcC16IBlF7KH9vP1BUYxA+Eg==", + "dev": true + }, + "@octokit/plugin-rest-endpoint-methods": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-2.4.0.tgz", + "integrity": "sha512-EZi/AWhtkdfAYi01obpX0DF7U6b1VRr30QNQ5xSFPITMdLSfhcBqjamE3F+sKcxPbD7eZuMHu3Qkk2V+JGxBDQ==", + "dev": true, + "requires": { + "@octokit/types": "^2.0.1", + "deprecation": "^2.3.1" + }, + "dependencies": { + "@octokit/types": { + "version": "2.16.2", + "resolved": "https://registry.npmjs.org/@octokit/types/-/types-2.16.2.tgz", + "integrity": "sha512-O75k56TYvJ8WpAakWwYRN8Bgu60KrmX0z1KqFp1kNiFNkgW+JW+9EBKZ+S33PU6SLvbihqd+3drvPxKK68Ee8Q==", + "dev": true, + "requires": { + "@types/node": ">= 8" + } + } + } + }, + "@octokit/request": { + "version": "5.4.9", + "resolved": "https://registry.npmjs.org/@octokit/request/-/request-5.4.9.tgz", + "integrity": "sha512-CzwVvRyimIM1h2n9pLVYfTDmX9m+KHSgCpqPsY8F1NdEK8IaWqXhSBXsdjOBFZSpEcxNEeg4p0UO9cQ8EnOCLA==", + "dev": true, + "requires": { + "@octokit/endpoint": "^6.0.1", + "@octokit/request-error": "^2.0.0", + "@octokit/types": "^5.0.0", + "deprecation": "^2.0.0", + "is-plain-object": "^5.0.0", + "node-fetch": "^2.6.1", + "once": "^1.4.0", + "universal-user-agent": "^6.0.0" + }, + "dependencies": { + "@octokit/request-error": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-2.0.2.tgz", + "integrity": "sha512-2BrmnvVSV1MXQvEkrb9zwzP0wXFNbPJij922kYBTLIlIafukrGOb+ABBT2+c6wZiuyWDH1K1zmjGQ0toN/wMWw==", + "dev": true, + "requires": { + "@octokit/types": "^5.0.1", + "deprecation": "^2.0.0", + "once": "^1.4.0" + } + }, + "is-plain-object": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz", + "integrity": "sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==", + "dev": true + }, + "universal-user-agent": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-6.0.0.tgz", + "integrity": "sha512-isyNax3wXoKaulPDZWHQqbmIx1k2tb9fb3GGDBRxCscfYV2Ch7WxPArBsFEG8s/safwXTT7H4QGhaIkTp9447w==", + "dev": true + } + } + }, + "@octokit/request-error": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-1.2.1.tgz", + "integrity": "sha512-+6yDyk1EES6WK+l3viRDElw96MvwfJxCt45GvmjDUKWjYIb3PJZQkq3i46TwGwoPD4h8NmTrENmtyA1FwbmhRA==", + "dev": true, + "requires": { + "@octokit/types": "^2.0.0", + "deprecation": "^2.0.0", + "once": "^1.4.0" + }, + "dependencies": { + "@octokit/types": { + "version": "2.16.2", + "resolved": "https://registry.npmjs.org/@octokit/types/-/types-2.16.2.tgz", + "integrity": "sha512-O75k56TYvJ8WpAakWwYRN8Bgu60KrmX0z1KqFp1kNiFNkgW+JW+9EBKZ+S33PU6SLvbihqd+3drvPxKK68Ee8Q==", + "dev": true, + "requires": { + "@types/node": ">= 8" + } + } + } + }, + "@octokit/rest": { + "version": "16.43.2", + "resolved": "https://registry.npmjs.org/@octokit/rest/-/rest-16.43.2.tgz", + "integrity": "sha512-ngDBevLbBTFfrHZeiS7SAMAZ6ssuVmXuya+F/7RaVvlysgGa1JKJkKWY+jV6TCJYcW0OALfJ7nTIGXcBXzycfQ==", + "dev": true, + "requires": { + "@octokit/auth-token": "^2.4.0", + "@octokit/plugin-paginate-rest": "^1.1.1", + "@octokit/plugin-request-log": "^1.0.0", + "@octokit/plugin-rest-endpoint-methods": "2.4.0", + "@octokit/request": "^5.2.0", + "@octokit/request-error": "^1.0.2", + "atob-lite": "^2.0.0", + "before-after-hook": "^2.0.0", + "btoa-lite": "^1.0.0", + "deprecation": "^2.0.0", + "lodash.get": "^4.4.2", + "lodash.set": "^4.3.2", + "lodash.uniq": "^4.5.0", + "octokit-pagination-methods": "^1.1.0", + "once": "^1.4.0", + "universal-user-agent": "^4.0.0" + } + }, + "@octokit/types": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/@octokit/types/-/types-5.5.0.tgz", + "integrity": "sha512-UZ1pErDue6bZNjYOotCNveTXArOMZQFG6hKJfOnGnulVCMcVVi7YIIuuR4WfBhjo7zgpmzn/BkPDnUXtNx+PcQ==", + "dev": true, + "requires": { + "@types/node": ">= 8" + } + }, "@types/events": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/@types/events/-/events-3.0.0.tgz", @@ -45,6 +232,15 @@ "integrity": "sha512-sY5AXXVZv4Y1VACTtR11UJCPHHudgY5i26Qj5TypE6DKlIApbwb5uqhXcJ5UUGbvZNRh7EeIoW+LrJumBsKp7w==", "dev": true }, + "abort-controller": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz", + "integrity": "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==", + "dev": true, + "requires": { + "event-target-shim": "^5.0.0" + } + }, "acorn": { "version": "6.4.1", "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.4.1.tgz", @@ -67,6 +263,15 @@ "integrity": "sha512-OtUw6JUTgxA2QoqqmrmQ7F2NYqiBPi/L2jqHyFtllhOUvXYQXf0Z1CYUinIfyT4bTCGmrA7gX9FvHA81uzCoVw==", "dev": true }, + "agent-base": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-4.3.0.tgz", + "integrity": "sha512-salcGninV0nPrwpGNn4VTXBb1SOuXQBiqbrNXoeizJsHrsL6ERFM2Ne3JUSBWRE6aeNJI2ROP/WEEIDUiDe3cg==", + "dev": true, + "requires": { + "es6-promisify": "^5.0.0" + } + }, "ajv": { "version": "6.10.0", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.10.0.tgz", @@ -332,6 +537,15 @@ "integrity": "sha512-jp/uFnooOiO+L211eZOoSyzpOITMXx1rBITauYykG3BRYPu8h0UcxsPNB04RR5vo4Tyz3+ay17tR6JVf9qzYWg==", "dev": true }, + "async-retry": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/async-retry/-/async-retry-1.2.3.tgz", + "integrity": "sha512-tfDb02Th6CE6pJUF2gjW5ZVjsgwlucVXOEQMvEX9JgSJMs9gAX+Nz3xRuJBKuUYjTSYORqvDBORdAQ3LU59g7Q==", + "dev": true, + "requires": { + "retry": "0.12.0" + } + }, "async-settle": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/async-settle/-/async-settle-1.0.0.tgz", @@ -353,6 +567,12 @@ "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", "dev": true }, + "atob-lite": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/atob-lite/-/atob-lite-2.0.0.tgz", + "integrity": "sha1-D+9a1G8b16hQLGVyfwNn1e5D1pY=", + "dev": true + }, "aws-sign2": { "version": "0.7.0", "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", @@ -461,6 +681,12 @@ "delay": "^4.1.0" } }, + "before-after-hook": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.1.0.tgz", + "integrity": "sha512-IWIbu7pMqyw3EAJHzzHbWa85b6oud/yfKYg5rqB5hNE8CeMi3nX+2C2sj0HswfblST86hpVEOAb9x34NZd6P7A==", + "dev": true + }, "binary-extensions": { "version": "1.13.1", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.13.1.tgz", @@ -540,12 +766,24 @@ "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", "dev": true }, + "btoa-lite": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/btoa-lite/-/btoa-lite-1.0.0.tgz", + "integrity": "sha1-M3dm2hWAEhD92VbCLpxokaudAzc=", + "dev": true + }, "buffer-equal": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/buffer-equal/-/buffer-equal-1.0.0.tgz", "integrity": "sha1-WWFrSYME1Var1GaWayLu2j7KX74=", "dev": true }, + "buffer-equal-constant-time": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", + "integrity": "sha1-+OcRMvf/5uAaXJaXpMbz5I1cyBk=", + "dev": true + }, "buffer-from": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", @@ -790,6 +1028,12 @@ "integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==", "dev": true }, + "colors": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz", + "integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==", + "dev": true + }, "combined-stream": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.7.tgz", @@ -871,6 +1115,12 @@ "is-plain-object": "^2.0.1" } }, + "core-js": { + "version": "2.6.11", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.11.tgz", + "integrity": "sha512-5wjnpaT/3dV+XB4borEsnAYQchn00XSgTAWKDkEqv+K8KevjbzmofK6hfJ9TZIlpj2N0xQpazy7PiRQiWHqzWg==", + "dev": true + }, "core-util-is": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", @@ -915,6 +1165,67 @@ "type": "^1.0.1" } }, + "danger": { + "version": "10.5.0", + "resolved": "https://registry.npmjs.org/danger/-/danger-10.5.0.tgz", + "integrity": "sha512-KUqwc8WFmW4JqPpgG4cssOZQE1aYRj/If/ZX+XNOsMRhxJH5cY9ij6VQH7C/pP64UGqmMNNV6jSsbxOOAWMy4w==", + "dev": true, + "requires": { + "@babel/polyfill": "^7.2.5", + "@octokit/rest": "^16.43.1", + "async-retry": "1.2.3", + "chalk": "^2.3.0", + "commander": "^2.18.0", + "debug": "^4.1.1", + "fast-json-patch": "^3.0.0-1", + "get-stdin": "^6.0.0", + "gitlab": "^10.0.1", + "http-proxy-agent": "^2.1.0", + "https-proxy-agent": "^2.2.1", + "hyperlinker": "^1.0.0", + "json5": "^2.1.0", + "jsonpointer": "^4.0.1", + "jsonwebtoken": "^8.4.0", + "lodash.find": "^4.6.0", + "lodash.includes": "^4.3.0", + "lodash.isobject": "^3.0.2", + "lodash.keys": "^4.0.8", + "lodash.mapvalues": "^4.6.0", + "lodash.memoize": "^4.1.2", + "memfs-or-file-map-to-github-branch": "^1.1.0", + "micromatch": "^3.1.10", + "node-cleanup": "^2.1.2", + "node-fetch": "2.6.1", + "override-require": "^1.1.1", + "p-limit": "^2.1.0", + "parse-diff": "^0.7.0", + "parse-git-config": "^2.0.3", + "parse-github-url": "^1.0.2", + "parse-link-header": "^1.0.1", + "pinpoint": "^1.1.0", + "prettyjson": "^1.2.1", + "readline-sync": "^1.4.9", + "require-from-string": "^2.0.2", + "supports-hyperlinks": "^1.0.1" + }, + "dependencies": { + "debug": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz", + "integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + } + } + }, "dashdash": { "version": "1.14.1", "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", @@ -1085,6 +1396,12 @@ "integrity": "sha512-IofjkYBZaZivn0V8nnsMJGBr4jVLxHDheKSW88PyxS5QC4Vo9ZbZVvhzlSxY87fVq3STR6r+4cGepyHkcWOQSw==", "optional": true }, + "deprecation": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/deprecation/-/deprecation-2.3.1.tgz", + "integrity": "sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ==", + "dev": true + }, "detect-file": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/detect-file/-/detect-file-1.0.0.tgz", @@ -1148,6 +1465,12 @@ "domhandler": "^3.0.0" } }, + "duplexer": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.2.tgz", + "integrity": "sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==", + "dev": true + }, "duplexify": { "version": "3.7.1", "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.7.1.tgz", @@ -1180,6 +1503,15 @@ "safer-buffer": "^2.1.0" } }, + "ecdsa-sig-formatter": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz", + "integrity": "sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==", + "dev": true, + "requires": { + "safe-buffer": "^5.0.1" + } + }, "editions": { "version": "1.3.4", "resolved": "https://registry.npmjs.org/editions/-/editions-1.3.4.tgz", @@ -1263,6 +1595,21 @@ "es6-symbol": "^3.1.1" } }, + "es6-promise": { + "version": "4.2.8", + "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.8.tgz", + "integrity": "sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==", + "dev": true + }, + "es6-promisify": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/es6-promisify/-/es6-promisify-5.0.0.tgz", + "integrity": "sha1-UQnWLz5W6pZ8S2NQWu8IKRyKUgM=", + "dev": true, + "requires": { + "es6-promise": "^4.0.3" + } + }, "es6-symbol": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.3.tgz", @@ -1331,6 +1678,12 @@ "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=", "dev": true }, + "event-target-shim": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz", + "integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==", + "dev": true + }, "execa": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz", @@ -1523,6 +1876,12 @@ "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=", "dev": true }, + "fast-json-patch": { + "version": "3.0.0-1", + "resolved": "https://registry.npmjs.org/fast-json-patch/-/fast-json-patch-3.0.0-1.tgz", + "integrity": "sha512-6pdFb07cknxvPzCeLsFHStEy+MysPJPgZQ9LbQ/2O67unQF93SNqfdSqnPPl71YMHX+AD8gbl7iuoGFzHEdDuw==", + "dev": true + }, "fast-json-stable-stringify": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", @@ -1674,6 +2033,12 @@ "map-cache": "^0.2.2" } }, + "fs-exists-sync": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/fs-exists-sync/-/fs-exists-sync-0.1.0.tgz", + "integrity": "sha1-mC1ok6+RjnLQjeyehnP/K1qNat0=", + "dev": true + }, "fs-mkdirp-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs-mkdirp-stream/-/fs-mkdirp-stream-1.0.0.tgz", @@ -2266,6 +2631,12 @@ "integrity": "sha1-6td0q+5y4gQJQzoGY2YCPdaIekE=", "dev": true }, + "get-stdin": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-6.0.0.tgz", + "integrity": "sha512-jp4tHawyV7+fkkSKyvjuLZswblUtz+SQKzSWnBbii16BuZksJlU1wuBYXY75r+duh/llF1ur6oNwi+2ZzjKZ7g==", + "dev": true + }, "get-stream": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", @@ -2290,6 +2661,56 @@ "assert-plus": "^1.0.0" } }, + "git-config-path": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/git-config-path/-/git-config-path-1.0.1.tgz", + "integrity": "sha1-bTP37WPbDQ4RgTFQO6s6ykfVRmQ=", + "dev": true, + "requires": { + "extend-shallow": "^2.0.1", + "fs-exists-sync": "^0.1.0", + "homedir-polyfill": "^1.0.0" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "gitlab": { + "version": "10.2.1", + "resolved": "https://registry.npmjs.org/gitlab/-/gitlab-10.2.1.tgz", + "integrity": "sha512-z+DxRF1C9uayVbocs9aJkJz+kGy14TSm1noB/rAIEBbXOkOYbjKxyuqJzt+0zeFpXFdgA0yq6DVVbvM7HIfGwg==", + "dev": true, + "requires": { + "form-data": "^2.5.0", + "humps": "^2.0.1", + "ky": "^0.12.0", + "ky-universal": "^0.3.0", + "li": "^1.3.0", + "query-string": "^6.8.2", + "universal-url": "^2.0.0" + }, + "dependencies": { + "form-data": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.5.1.tgz", + "integrity": "sha512-m21N3WOmEEURgk6B9GLOE4RuWOFf28Lhh9qGYeNlGq4VDXUlJy2th2slBNU8Gp8EzloYZOibZJ7t5ecIrFSjVA==", + "dev": true, + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + } + } + } + }, "glob": { "version": "7.1.3", "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", @@ -2591,6 +3012,24 @@ "glogg": "^1.0.0" } }, + "gzip-size": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/gzip-size/-/gzip-size-5.1.1.tgz", + "integrity": "sha512-FNHi6mmoHvs1mxZAds4PpdCS6QG8B4C1krxJsMutgxl5t3+GlRTzzI3NEkifXx2pVsOvJdOGSmIgDhQ55FwdPA==", + "dev": true, + "requires": { + "duplexer": "^0.1.1", + "pify": "^4.0.1" + }, + "dependencies": { + "pify": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "dev": true + } + } + }, "har-schema": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", @@ -2669,6 +3108,12 @@ } } }, + "hasurl": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/hasurl/-/hasurl-1.0.0.tgz", + "integrity": "sha512-43ypUd3DbwyCT01UYpA99AEZxZ4aKtRxWGBHEIbjcOsUghd9YUON0C+JF6isNjaiwC/UF5neaUudy6JS9jZPZQ==", + "dev": true + }, "he": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", @@ -2711,6 +3156,27 @@ "entities": "^2.0.0" } }, + "http-proxy-agent": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-2.1.0.tgz", + "integrity": "sha512-qwHbBLV7WviBl0rQsOzH6o5lwyOIvwp/BdFnvVxXORldu5TmjFfjzBcWUWS5kWAZhmv+JtiDhSuQCp4sBfbIgg==", + "dev": true, + "requires": { + "agent-base": "4", + "debug": "3.1.0" + }, + "dependencies": { + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + } + } + }, "http-signature": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", @@ -2722,6 +3188,45 @@ "sshpk": "^1.7.0" } }, + "https-proxy-agent": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-2.2.4.tgz", + "integrity": "sha512-OmvfoQ53WLjtA9HeYP9RNrWMJzzAz1JGaSFr1nijg0PVR1JaD/xbJq1mdEIIlxGpXp9eSe/O2LgU9DJmTPd0Eg==", + "dev": true, + "requires": { + "agent-base": "^4.3.0", + "debug": "^3.1.0" + }, + "dependencies": { + "debug": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", + "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + } + } + }, + "humps": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/humps/-/humps-2.0.1.tgz", + "integrity": "sha1-3QLqYIG9BWjcXQcxhEY5V7qe+ao=", + "dev": true + }, + "hyperlinker": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/hyperlinker/-/hyperlinker-1.0.0.tgz", + "integrity": "sha512-Ty8UblRWFEcfSuIaajM34LdPXIhbs1ajEX/BBPv24J+enSVaEVY63xQ6lTO9VRYS5LAoghIG0IDJ+p+IPzKUQQ==", + "dev": true + }, "iconv-lite": { "version": "0.4.24", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", @@ -3200,6 +3705,55 @@ "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", "dev": true }, + "json5": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.1.3.tgz", + "integrity": "sha512-KXPvOm8K9IJKFM0bmdn8QXh7udDh1g/giieX0NLCaMnb4hEiVFqnop2ImTXCc5e0/oHz3LTqmHGtExn5hfMkOA==", + "dev": true, + "requires": { + "minimist": "^1.2.5" + }, + "dependencies": { + "minimist": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", + "dev": true + } + } + }, + "jsonpointer": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/jsonpointer/-/jsonpointer-4.1.0.tgz", + "integrity": "sha512-CXcRvMyTlnR53xMcKnuMzfCA5i/nfblTnnr74CZb6C4vG39eu6w51t7nKmU5MfLfbTgGItliNyjO/ciNPDqClg==", + "dev": true + }, + "jsonwebtoken": { + "version": "8.5.1", + "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-8.5.1.tgz", + "integrity": "sha512-XjwVfRS6jTMsqYs0EsuJ4LGxXV14zQybNd4L2r0UvbVnSF9Af8x7p5MzbJ90Ioz/9TI41/hTCvznF/loiSzn8w==", + "dev": true, + "requires": { + "jws": "^3.2.2", + "lodash.includes": "^4.3.0", + "lodash.isboolean": "^3.0.3", + "lodash.isinteger": "^4.0.4", + "lodash.isnumber": "^3.0.3", + "lodash.isplainobject": "^4.0.6", + "lodash.isstring": "^4.0.1", + "lodash.once": "^4.0.0", + "ms": "^2.1.1", + "semver": "^5.6.0" + }, + "dependencies": { + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + } + } + }, "jsprim": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", @@ -3218,6 +3772,27 @@ "integrity": "sha1-h/zPrv/AtozRnVX2cilD+SnqNeo=", "dev": true }, + "jwa": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.4.1.tgz", + "integrity": "sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA==", + "dev": true, + "requires": { + "buffer-equal-constant-time": "1.0.1", + "ecdsa-sig-formatter": "1.0.11", + "safe-buffer": "^5.0.1" + } + }, + "jws": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/jws/-/jws-3.2.2.tgz", + "integrity": "sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA==", + "dev": true, + "requires": { + "jwa": "^1.4.1", + "safe-buffer": "^5.0.1" + } + }, "kind-of": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", @@ -3233,6 +3808,22 @@ "graceful-fs": "^4.1.9" } }, + "ky": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/ky/-/ky-0.12.0.tgz", + "integrity": "sha512-t9b7v3V2fGwAcQnnDDQwKQGF55eWrf4pwi1RN08Fy8b/9GEwV7Ea0xQiaSW6ZbeghBHIwl8kgnla4vVo9seepQ==", + "dev": true + }, + "ky-universal": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/ky-universal/-/ky-universal-0.3.0.tgz", + "integrity": "sha512-CM4Bgb2zZZpsprcjI6DNYTaH3oGHXL2u7BU4DK+lfCuC4snkt9/WRpMYeKbBbXscvKkeqBwzzjFX2WwmKY5K/A==", + "dev": true, + "requires": { + "abort-controller": "^3.0.0", + "node-fetch": "^2.6.0" + } + }, "last-run": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/last-run/-/last-run-1.1.1.tgz", @@ -3280,6 +3871,12 @@ "type-check": "~0.3.2" } }, + "li": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/li/-/li-1.3.0.tgz", + "integrity": "sha1-IsWbyu+qmo7zWc91l4TkvxBq6hs=", + "dev": true + }, "liftoff": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/liftoff/-/liftoff-3.1.0.tgz", @@ -3348,6 +3945,90 @@ "integrity": "sha1-DM8tiRZq8Ds2Y8eWU4t1rG4RTZ0=", "dev": true }, + "lodash.find": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/lodash.find/-/lodash.find-4.6.0.tgz", + "integrity": "sha1-ywcE1Hq3F4n/oN6Ll92Sb7iLE7E=", + "dev": true + }, + "lodash.get": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz", + "integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk=", + "dev": true + }, + "lodash.includes": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/lodash.includes/-/lodash.includes-4.3.0.tgz", + "integrity": "sha1-YLuYqHy5I8aMoeUTJUgzFISfVT8=", + "dev": true + }, + "lodash.isboolean": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz", + "integrity": "sha1-bC4XHbKiV82WgC/UOwGyDV9YcPY=", + "dev": true + }, + "lodash.isinteger": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz", + "integrity": "sha1-YZwK89A/iwTDH1iChAt3sRzWg0M=", + "dev": true + }, + "lodash.isnumber": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz", + "integrity": "sha1-POdoEMWSjQM1IwGsKHMX8RwLH/w=", + "dev": true + }, + "lodash.isobject": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/lodash.isobject/-/lodash.isobject-3.0.2.tgz", + "integrity": "sha1-PI+41bW/S/kK4G4U8qUwpO2TXh0=", + "dev": true + }, + "lodash.isplainobject": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", + "integrity": "sha1-fFJqUtibRcRcxpC4gWO+BJf1UMs=", + "dev": true + }, + "lodash.isstring": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz", + "integrity": "sha1-1SfftUVuynzJu5XV2ur4i6VKVFE=", + "dev": true + }, + "lodash.keys": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/lodash.keys/-/lodash.keys-4.2.0.tgz", + "integrity": "sha1-oIYCrBLk+4P5H8H7ejYKTZujUgU=", + "dev": true + }, + "lodash.mapvalues": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/lodash.mapvalues/-/lodash.mapvalues-4.6.0.tgz", + "integrity": "sha1-G6+lAF3p3W9PJmaMMMo3IwzJaJw=", + "dev": true + }, + "lodash.memoize": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", + "integrity": "sha1-vMbEmkKihA7Zl/Mj6tpezRguC/4=", + "dev": true + }, + "lodash.once": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz", + "integrity": "sha1-DdOXEhPHxW34gJd9UEyI+0cal6w=", + "dev": true + }, + "lodash.set": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/lodash.set/-/lodash.set-4.3.2.tgz", + "integrity": "sha1-2HV7HagH3eJIFrDWqEvqGnYjCyM=", + "dev": true + }, "lodash.sortby": { "version": "4.7.0", "resolved": "https://registry.npmjs.org/lodash.sortby/-/lodash.sortby-4.7.0.tgz", @@ -3373,6 +4054,12 @@ "lodash._reinterpolate": "~3.0.0" } }, + "lodash.uniq": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz", + "integrity": "sha1-0CJTc662Uq3BvILklFM5qEJ1R3M=", + "dev": true + }, "log-symbols": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-2.2.0.tgz", @@ -3382,6 +4069,12 @@ "chalk": "^2.0.1" } }, + "macos-release": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/macos-release/-/macos-release-2.4.1.tgz", + "integrity": "sha512-H/QHeBIN1fIGJX517pvK8IEK53yQOW7YcEI55oYtgjDdoCQQz7eJS94qt5kNrscReEyuD/JcdFCm2XBEcGOITg==", + "dev": true + }, "make-error": { "version": "1.3.5", "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.5.tgz", @@ -3513,6 +4206,15 @@ "p-is-promise": "^2.0.0" } }, + "memfs-or-file-map-to-github-branch": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/memfs-or-file-map-to-github-branch/-/memfs-or-file-map-to-github-branch-1.2.0.tgz", + "integrity": "sha512-PloI9AkRXrLQuBU1s7eYQpl+4hkL0U0h23lddMaJ3ZGUufn8pdNRxd1kCfBqL5gISCFQs78ttXS15e4/f5vcTA==", + "dev": true, + "requires": { + "@octokit/rest": "^16.43.1" + } + }, "micromatch": { "version": "3.1.10", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", @@ -3735,6 +4437,12 @@ "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", "dev": true }, + "node-cleanup": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/node-cleanup/-/node-cleanup-2.1.2.tgz", + "integrity": "sha1-esGavSl+Caf3KnFUXZUbUX5N3iw=", + "dev": true + }, "node-environment-flags": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/node-environment-flags/-/node-environment-flags-1.0.5.tgz", @@ -3753,6 +4461,12 @@ } } }, + "node-fetch": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz", + "integrity": "sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw==", + "dev": true + }, "normalize-package-data": { "version": "2.5.0", "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", @@ -3925,6 +4639,12 @@ "make-iterator": "^1.0.0" } }, + "octokit-pagination-methods": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/octokit-pagination-methods/-/octokit-pagination-methods-1.1.0.tgz", + "integrity": "sha512-fZ4qZdQ2nxJvtcasX7Ghl+WlWS/d9IgnBIwFZXVNNZUmzpno91SX5bc5vuxiuKoCtK78XxGGNuSCrDC7xYB3OQ==", + "dev": true + }, "once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", @@ -3966,6 +4686,22 @@ "lcid": "^1.0.0" } }, + "os-name": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/os-name/-/os-name-3.1.0.tgz", + "integrity": "sha512-h8L+8aNjNcMpo/mAIBPn5PXCM16iyPGjHNWo6U1YO8sJTMHtEtyczI6QJnLoplswm6goopQkqc7OAnjhWcugVg==", + "dev": true, + "requires": { + "macos-release": "^2.2.0", + "windows-release": "^3.1.0" + } + }, + "override-require": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/override-require/-/override-require-1.1.1.tgz", + "integrity": "sha1-auIvresfhQ/7DPTCD/e4fl62UN8=", + "dev": true + }, "p-defer": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/p-defer/-/p-defer-1.0.0.tgz", @@ -4014,6 +4750,12 @@ "integrity": "sha512-H2RyIJ7+A3rjkwKC2l5GGtU4H1vkxKCAGsWasNVd0Set+6i4znxbWy6/j16YDPJDWxhsgZiKAstMEP8wCdSpjA==", "dev": true }, + "parse-diff": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/parse-diff/-/parse-diff-0.7.1.tgz", + "integrity": "sha512-1j3l8IKcy4yRK2W4o9EYvJLSzpAVwz4DXqCewYyx2vEwk2gcf3DBPqc8Fj4XV3K33OYJ08A8fWwyu/ykD/HUSg==", + "dev": true + }, "parse-filepath": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/parse-filepath/-/parse-filepath-1.0.2.tgz", @@ -4025,6 +4767,23 @@ "path-root": "^0.1.1" } }, + "parse-git-config": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/parse-git-config/-/parse-git-config-2.0.3.tgz", + "integrity": "sha512-Js7ueMZOVSZ3tP8C7E3KZiHv6QQl7lnJ+OkbxoaFazzSa2KyEHqApfGbU3XboUgUnq4ZuUmskUpYKTNx01fm5A==", + "dev": true, + "requires": { + "expand-tilde": "^2.0.2", + "git-config-path": "^1.0.1", + "ini": "^1.3.5" + } + }, + "parse-github-url": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/parse-github-url/-/parse-github-url-1.0.2.tgz", + "integrity": "sha512-kgBf6avCbO3Cn6+RnzRGLkUsv4ZVqv/VfAYkRsyBcgkshNvVBkRn1FEZcW0Jb+npXQWm2vHPnnOqFteZxRRGNw==", + "dev": true + }, "parse-json": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", @@ -4034,6 +4793,15 @@ "error-ex": "^1.2.0" } }, + "parse-link-header": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parse-link-header/-/parse-link-header-1.0.1.tgz", + "integrity": "sha1-vt/g0hGK64S+deewJUGeyKYRQKc=", + "dev": true, + "requires": { + "xtend": "~4.0.1" + } + }, "parse-node-version": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/parse-node-version/-/parse-node-version-1.0.1.tgz", @@ -4156,6 +4924,12 @@ "pinkie": "^2.0.0" } }, + "pinpoint": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/pinpoint/-/pinpoint-1.1.0.tgz", + "integrity": "sha1-DPd1eml38b9/ajIge3CeN3OI6HQ=", + "dev": true + }, "pn": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/pn/-/pn-1.1.0.tgz", @@ -4208,6 +4982,24 @@ "integrity": "sha1-t+PqQkNaTJsnWdmeDyAesZWALuE=", "dev": true }, + "prettyjson": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prettyjson/-/prettyjson-1.2.1.tgz", + "integrity": "sha1-/P+rQdGcq0365eV15kJGYZsS0ok=", + "dev": true, + "requires": { + "colors": "^1.1.2", + "minimist": "^1.2.0" + }, + "dependencies": { + "minimist": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", + "dev": true + } + } + }, "process-nextick-args": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", @@ -4265,6 +5057,17 @@ "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==", "dev": true }, + "query-string": { + "version": "6.13.6", + "resolved": "https://registry.npmjs.org/query-string/-/query-string-6.13.6.tgz", + "integrity": "sha512-/WWZ7d9na6s2wMEGdVCVgKWE9Rt7nYyNIf7k8xmHXcesPMlEzicWo3lbYwHyA4wBktI2KrXxxZeACLbE84hvSQ==", + "dev": true, + "requires": { + "decode-uri-component": "^0.2.0", + "split-on-first": "^1.0.0", + "strict-uri-encode": "^2.0.0" + } + }, "read-pkg": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", @@ -4320,6 +5123,12 @@ "readable-stream": "^2.0.2" } }, + "readline-sync": { + "version": "1.4.10", + "resolved": "https://registry.npmjs.org/readline-sync/-/readline-sync-1.4.10.tgz", + "integrity": "sha512-gNva8/6UAe8QYepIQH/jQ2qn91Qj0B9sYjMBBs3QOB8F2CXcKgLxQaJRP76sWVRQt+QU+8fAkCbCvjjMFu7Ycw==", + "dev": true + }, "rechoir": { "version": "0.6.2", "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", @@ -4329,6 +5138,12 @@ "resolve": "^1.1.6" } }, + "regenerator-runtime": { + "version": "0.13.7", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.7.tgz", + "integrity": "sha512-a54FxoJDIr27pgf7IgeQGxmqUNYrcV338lf/6gH456HZ/PhX+5BcwHXG9ajESmwe6WRO0tAzRUrRmNONWgkrew==", + "dev": true + }, "regex-not": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", @@ -4484,6 +5299,12 @@ "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", "dev": true }, + "require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", + "dev": true + }, "require-main-filename": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", @@ -4539,6 +5360,12 @@ "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", "dev": true }, + "retry": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/retry/-/retry-0.12.0.tgz", + "integrity": "sha1-G0KmJmoh8HQh0bC1S33BZ7AcATs=", + "dev": true + }, "rimraf": { "version": "2.6.3", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", @@ -4873,6 +5700,12 @@ "integrity": "sha512-J+FWzZoynJEXGphVIS+XEh3kFSjZX/1i9gFBaWQcB+/tmpe2qUsSBABpcxqxnAxFdiUFEgAX1bjYGQvIZmoz9Q==", "dev": true }, + "split-on-first": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/split-on-first/-/split-on-first-1.1.0.tgz", + "integrity": "sha512-43ZssAJaMusuKWL8sKUBQXHWOpq8d6CfN/u1p4gUzfJkM05C8rxTmYrkIPTXapZpORA6LkkzcUulJ8FqA7Uudw==", + "dev": true + }, "split-string": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", @@ -4956,6 +5789,12 @@ "integrity": "sha512-AiisoFqQ0vbGcZgQPY1cdP2I76glaVA/RauYR4G4thNFgkTqr90yXTo4LYX60Jl+sIlPNHHdGSwo01AvbKUSVQ==", "dev": true }, + "strict-uri-encode": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-2.0.0.tgz", + "integrity": "sha1-ucczDHBChi9rFC3CdLvMWGbONUY=", + "dev": true + }, "string-width": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", @@ -5015,6 +5854,41 @@ "has-flag": "^3.0.0" } }, + "supports-hyperlinks": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/supports-hyperlinks/-/supports-hyperlinks-1.0.1.tgz", + "integrity": "sha512-HHi5kVSefKaJkGYXbDuKbUGRVxqnWGn3J2e39CYcNJEfWciGq2zYtOhXLTlvrOZW1QU7VX67w7fMmWafHX9Pfw==", + "dev": true, + "requires": { + "has-flag": "^2.0.0", + "supports-color": "^5.0.0" + }, + "dependencies": { + "has-flag": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz", + "integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + }, + "dependencies": { + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + } + } + } + } + }, "sver-compat": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/sver-compat/-/sver-compat-1.5.0.tgz", @@ -5287,6 +6161,25 @@ "through2-filter": "^3.0.0" } }, + "universal-url": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/universal-url/-/universal-url-2.0.0.tgz", + "integrity": "sha512-3DLtXdm/G1LQMCnPj+Aw7uDoleQttNHp2g5FnNQKR6cP6taNWS1b/Ehjjx4PVyvejKi3TJyu8iBraKM4q3JQPg==", + "dev": true, + "requires": { + "hasurl": "^1.0.0", + "whatwg-url": "^7.0.0" + } + }, + "universal-user-agent": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-4.0.1.tgz", + "integrity": "sha512-LnST3ebHwVL2aNe4mejI9IQh2HfZ1RLo8Io2HugSif8ekzD1TlWpHpColOB/eh8JHMLkGH3Akqf040I+4ylNxg==", + "dev": true, + "requires": { + "os-name": "^3.1.0" + } + }, "unset-value": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", @@ -5541,6 +6434,15 @@ "string-width": "^1.0.2 || 2" } }, + "windows-release": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/windows-release/-/windows-release-3.3.3.tgz", + "integrity": "sha512-OSOGH1QYiW5yVor9TtmXKQvt2vjQqbYS+DqmsZw+r7xDwLXEeT3JGW0ZppFmHx4diyXmxt238KFR3N9jzevBRg==", + "dev": true, + "requires": { + "execa": "^1.0.0" + } + }, "wordwrap": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", diff --git a/package.json b/package.json index f921f71502..c48a5bd3b1 100755 --- a/package.json +++ b/package.json @@ -33,6 +33,7 @@ }, "devDependencies": { "chai": "^4.2.0", + "danger": "^10.5.0", "del": "^4.1.1", "docdash": "^1.2.0", "gulp": "^4.0.2", @@ -42,6 +43,7 @@ "gulp-rename": "^1.2.0", "gulp-replace": "^1.0.0", "gulp-uglify": "^3.0.1", + "gzip-size": "^5.1.1", "htmlparser2": "^4.0.0", "jsdom": "^13.0.0", "mocha": "^6.2.0", From 8831c70645b47b1858ccda29ee1d1c39e4b7f0ae Mon Sep 17 00:00:00 2001 From: Arend van Beelen jr Date: Thu, 12 Nov 2020 20:43:52 +0100 Subject: [PATCH 0663/1100] Added PromQL language (#2628) --- components.js | 2 +- components.json | 4 + components/prism-promql.js | 99 +++++++++++++++++++ components/prism-promql.min.js | 1 + examples/prism-promql.html | 17 ++++ plugins/show-language/prism-show-language.js | 1 + .../show-language/prism-show-language.min.js | 2 +- .../languages/promql/aggregate_selection.test | 30 ++++++ tests/languages/promql/comment_feature.test | 11 +++ .../languages/promql/subquery_selection.test | 38 +++++++ .../promql/time_series_selection.test | 38 +++++++ 11 files changed, 241 insertions(+), 2 deletions(-) create mode 100644 components/prism-promql.js create mode 100644 components/prism-promql.min.js create mode 100644 examples/prism-promql.html create mode 100644 tests/languages/promql/aggregate_selection.test create mode 100644 tests/languages/promql/comment_feature.test create mode 100644 tests/languages/promql/subquery_selection.test create mode 100644 tests/languages/promql/time_series_selection.test diff --git a/components.js b/components.js index bed22408b9..347beb8cc1 100644 --- a/components.js +++ b/components.js @@ -1,2 +1,2 @@ -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml","ssml","atom","rss"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","ssml":"SSML","atom":"Atom","rss":"RSS"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","optional":"regex","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"ABNF","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"agda":{"title":"Agda","owner":"xy-ren"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"dkern"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"birb":{"title":"Birb","require":"clike","owner":"Calamity210"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"BNF","alias":"rbnf","aliasTitles":{"rbnf":"RBNF"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"bsl":{"title":"BSL (1C:Enterprise)","alias":"oscript","aliasTitles":{"oscript":"OneScript"},"owner":"Diversus23"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"clojure":{"title":"Clojure","owner":"troglotit"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"cypher":{"title":"Cypher","owner":"RunDevelopment"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dax":{"title":"DAX","owner":"peterbud"},"dhall":{"title":"Dhall","owner":"RunDevelopment"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"EBNF","owner":"RunDevelopment"},"editorconfig":{"title":"EditorConfig","owner":"osipxd"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"c","owner":"Golmote"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","optional":["markdown"],"owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"hlsl":{"title":"HLSL","require":"c","owner":"RunDevelopment"},"http":{"title":"HTTP","optional":["css","javascript","json","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"ignore":{"title":".ignore","owner":"osipxd","alias":["gitignore","hgignore","npmignore"],"aliasTitles":{"gitignore":".gitignore","hgignore":".hgignore","npmignore":".npmignore"}},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike","typescript"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","alias":"webmanifest","aliasTitles":{"webmanifest":"Web App Manifest"},"owner":"CupOfTea696"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"jsstacktrace":{"title":"JS stack trace","owner":"sbrl"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","alias":["kt","kts"],"aliasTitles":{"kts":"Kotlin Script"},"require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"mongodb":{"title":"MongoDB","owner":"airs0urce","require":"javascript"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"naniscript":{"title":"Naninovel Script","owner":"Elringus","alias":"nani"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":"markup-templating","owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"purebasic":{"title":"PureBasic","require":"clike","alias":"pbfasm","owner":"HeX0R101"},"purescript":{"title":"PureScript","require":"haskell","alias":"purs","owner":"sriharshachilakapati"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"racket":{"title":"Racket","require":"scheme","alias":"rkt","owner":"RunDevelopment"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","owner":"RunDevelopment"},"renpy":{"title":"Ren'py","alias":"rpy","owner":"HyuchiaDiego"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","alias":["sh-session","shellsession"],"owner":"RunDevelopment"},"smali":{"title":"Smali","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sml":{"title":"SML","alias":"smlnj","aliasTitles":{"smlnj":"SML/NJ"},"owner":"RunDevelopment"},"solidity":{"title":"Solidity (Ethereum)","alias":"sol","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"stan":{"title":"Stan","owner":"RunDevelopment"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","vbnet"],"owner":"RunDevelopment"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"typoscript":{"title":"TypoScript","alias":"tsconfig","aliasTitles":{"tsconfig":"TSConfig"},"owner":"dkern"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","optional":"regex","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":["vb","vba"],"aliasTitles":{"vba":"VBA"},"owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xml-doc":{"title":"XML doc (.net)","require":"markup","modify":["csharp","fsharp","vbnet"],"owner":"RunDevelopment"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"yang":{"title":"YANG","owner":"RunDevelopment"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml","ssml","atom","rss"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","ssml":"SSML","atom":"Atom","rss":"RSS"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","optional":"regex","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"ABNF","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"agda":{"title":"Agda","owner":"xy-ren"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"dkern"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"birb":{"title":"Birb","require":"clike","owner":"Calamity210"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"BNF","alias":"rbnf","aliasTitles":{"rbnf":"RBNF"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"bsl":{"title":"BSL (1C:Enterprise)","alias":"oscript","aliasTitles":{"oscript":"OneScript"},"owner":"Diversus23"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"clojure":{"title":"Clojure","owner":"troglotit"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"cypher":{"title":"Cypher","owner":"RunDevelopment"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dax":{"title":"DAX","owner":"peterbud"},"dhall":{"title":"Dhall","owner":"RunDevelopment"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"EBNF","owner":"RunDevelopment"},"editorconfig":{"title":"EditorConfig","owner":"osipxd"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"c","owner":"Golmote"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","optional":["markdown"],"owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"hlsl":{"title":"HLSL","require":"c","owner":"RunDevelopment"},"http":{"title":"HTTP","optional":["css","javascript","json","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"ignore":{"title":".ignore","owner":"osipxd","alias":["gitignore","hgignore","npmignore"],"aliasTitles":{"gitignore":".gitignore","hgignore":".hgignore","npmignore":".npmignore"}},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike","typescript"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","alias":"webmanifest","aliasTitles":{"webmanifest":"Web App Manifest"},"owner":"CupOfTea696"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"jsstacktrace":{"title":"JS stack trace","owner":"sbrl"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","alias":["kt","kts"],"aliasTitles":{"kts":"Kotlin Script"},"require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"mongodb":{"title":"MongoDB","owner":"airs0urce","require":"javascript"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"naniscript":{"title":"Naninovel Script","owner":"Elringus","alias":"nani"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":"markup-templating","owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"promql":{"title":"PromQL","owner":"arendjr"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"purebasic":{"title":"PureBasic","require":"clike","alias":"pbfasm","owner":"HeX0R101"},"purescript":{"title":"PureScript","require":"haskell","alias":"purs","owner":"sriharshachilakapati"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"racket":{"title":"Racket","require":"scheme","alias":"rkt","owner":"RunDevelopment"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","owner":"RunDevelopment"},"renpy":{"title":"Ren'py","alias":"rpy","owner":"HyuchiaDiego"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","alias":["sh-session","shellsession"],"owner":"RunDevelopment"},"smali":{"title":"Smali","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sml":{"title":"SML","alias":"smlnj","aliasTitles":{"smlnj":"SML/NJ"},"owner":"RunDevelopment"},"solidity":{"title":"Solidity (Ethereum)","alias":"sol","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"stan":{"title":"Stan","owner":"RunDevelopment"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","vbnet"],"owner":"RunDevelopment"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"typoscript":{"title":"TypoScript","alias":"tsconfig","aliasTitles":{"tsconfig":"TSConfig"},"owner":"dkern"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","optional":"regex","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":["vb","vba"],"aliasTitles":{"vba":"VBA"},"owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xml-doc":{"title":"XML doc (.net)","require":"markup","modify":["csharp","fsharp","vbnet"],"owner":"RunDevelopment"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"yang":{"title":"YANG","owner":"RunDevelopment"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; if (typeof module !== 'undefined' && module.exports) { module.exports = components; } \ No newline at end of file diff --git a/components.json b/components.json index bf1935df94..d7985f2742 100644 --- a/components.json +++ b/components.json @@ -875,6 +875,10 @@ "title": "Prolog", "owner": "Golmote" }, + "promql": { + "title": "PromQL", + "owner": "arendjr" + }, "properties": { "title": ".properties", "owner": "Golmote" diff --git a/components/prism-promql.js b/components/prism-promql.js new file mode 100644 index 0000000000..39761cff06 --- /dev/null +++ b/components/prism-promql.js @@ -0,0 +1,99 @@ +// Thanks to: https://github.com/prometheus-community/monaco-promql/blob/master/src/promql/promql.ts +// As well as: https://kausal.co/blog/slate-prism-add-new-syntax-promql/ + +(function (Prism) { + // PromQL Aggregation Operators + // (https://prometheus.io/docs/prometheus/latest/querying/operators/#aggregation-operators) + var aggregations = [ + 'sum', + 'min', + 'max', + 'avg', + 'group', + 'stddev', + 'stdvar', + 'count', + 'count_values', + 'bottomk', + 'topk', + 'quantile' + ]; + + // PromQL vector matching + the by and without clauses + // (https://prometheus.io/docs/prometheus/latest/querying/operators/#vector-matching) + var vectorMatching = [ + 'on', + 'ignoring', + 'group_right', + 'group_left', + 'by', + 'without', + ]; + + // PromQL offset modifier + // (https://prometheus.io/docs/prometheus/latest/querying/basics/#offset-modifier) + var offsetModifier = ['offset']; + + var keywords = aggregations.concat(vectorMatching, offsetModifier); + + Prism.languages.promql = { + 'comment': { + pattern: /(^[ \t]*)#.*/m, + lookbehind: true + }, + 'vector-match': { + // Match the comma-separated label lists inside vector matching: + pattern: new RegExp('((?:' + vectorMatching.join('|') + ')\\s*)\\([^)]*\\)'), + lookbehind: true, + inside: { + 'label-key': { + pattern: /\b[^,]*\b/, + alias: 'attr-name', + }, + 'punctuation': /[(),]/ + }, + }, + 'context-labels': { + pattern: /\{[^{}]*\}/, + inside: { + 'label-key': { + pattern: /\b[a-z_]\w*(?=\s*(?:=~?|![=~]))/, + alias: 'attr-name', + }, + 'label-value': { + pattern: /(["'`])(?:\\[\s\S]|(?!\1)[^\\])*\1/, + greedy: true, + alias: 'attr-value', + }, + 'punctuation': /\{|\}|=~?|![=~]|,/, + }, + }, + 'context-range': [ + { + pattern: /\[[\w\s:]+\]/, // [1m] + inside: { + 'punctuation': /\[|\]|:/, + 'range-duration': { + pattern: /\b(?:\d+(?:[smhdwy]|ms))+\b/i, + alias: 'number', + }, + }, + }, + { + pattern: /(\boffset\s+)\w+/, // offset 1m + lookbehind: true, + inside: { + 'range-duration': { + pattern: /\b(?:\d+(?:[smhdwy]|ms))+\b/i, + alias: 'number', + }, + }, + }, + ], + 'keyword': new RegExp('\\b(?:' + keywords.join('|') + ')\\b', 'i'), + 'function': /\b[a-zA-Z_]\w*(?=\s*\()/i, + 'number': /[-+]?(?:(?:\b\d+(?:\.\d+)?|\B\.\d+)(?:e[-+]?\d+)?\b|\b(?:0x[0-9a-f]+|nan|inf)\b)/i, + 'operator': /[\^*/%+-]|==|!=|<=|<|>=|>|\b(?:and|unless|or)\b/i, + 'punctuation': /[{};()`,.[\]]/, + }; +})(Prism); diff --git a/components/prism-promql.min.js b/components/prism-promql.min.js new file mode 100644 index 0000000000..f76a2e2164 --- /dev/null +++ b/components/prism-promql.min.js @@ -0,0 +1 @@ +!function(t){var n=["on","ignoring","group_right","group_left","by","without"],a=["sum","min","max","avg","group","stddev","stdvar","count","count_values","bottomk","topk","quantile"].concat(n,["offset"]);t.languages.promql={comment:{pattern:/(^[ \t]*)#.*/m,lookbehind:!0},"vector-match":{pattern:new RegExp("((?:"+n.join("|")+")\\s*)\\([^)]*\\)"),lookbehind:!0,inside:{"label-key":{pattern:/\b[^,]*\b/,alias:"attr-name"},punctuation:/[(),]/}},"context-labels":{pattern:/\{[^{}]*\}/,inside:{"label-key":{pattern:/\b[a-z_]\w*(?=\s*(?:=~?|![=~]))/,alias:"attr-name"},"label-value":{pattern:/(["'`])(?:\\[\s\S]|(?!\1)[^\\])*\1/,greedy:!0,alias:"attr-value"},punctuation:/\{|\}|=~?|![=~]|,/}},"context-range":[{pattern:/\[[\w\s:]+\]/,inside:{punctuation:/\[|\]|:/,"range-duration":{pattern:/\b(?:\d+(?:[smhdwy]|ms))+\b/i,alias:"number"}}},{pattern:/(\boffset\s+)\w+/,lookbehind:!0,inside:{"range-duration":{pattern:/\b(?:\d+(?:[smhdwy]|ms))+\b/i,alias:"number"}}}],keyword:new RegExp("\\b(?:"+a.join("|")+")\\b","i"),function:/\b[a-zA-Z_]\w*(?=\s*\()/i,number:/[-+]?(?:(?:\b\d+(?:\.\d+)?|\B\.\d+)(?:e[-+]?\d+)?\b|\b(?:0x[0-9a-f]+|nan|inf)\b)/i,operator:/[\^*/%+-]|==|!=|<=|<|>=|>|\b(?:and|unless|or)\b/i,punctuation:/[{};()`,.[\]]/}}(Prism); \ No newline at end of file diff --git a/examples/prism-promql.html b/examples/prism-promql.html new file mode 100644 index 0000000000..5570bbda63 --- /dev/null +++ b/examples/prism-promql.html @@ -0,0 +1,17 @@ +

          Examples

          +
          # These examples are taken from: https://prometheus.io/docs/prometheus/latest/querying/examples/
          +
          +http_requests_total{job="apiserver", handler="/api/comments"}[5m]
          +
          +http_requests_total{job=~".*server"}
          +
          +max_over_time(deriv(rate(distance_covered_total[5s])[30s:5s])[10m:])
          +
          +sum by (job) (
          +  rate(http_requests_total[5m])
          +)
          +
          +sum by (app, proc) (
          +  instance_memory_limit_bytes - instance_memory_usage_bytes
          +) / 1024 / 1024
          +
          diff --git a/plugins/show-language/prism-show-language.js b/plugins/show-language/prism-show-language.js index 672d991581..9ef73e3544 100644 --- a/plugins/show-language/prism-show-language.js +++ b/plugins/show-language/prism-show-language.js @@ -147,6 +147,7 @@ "pq": "PowerQuery", "mscript": "PowerQuery", "powershell": "PowerShell", + "promql": "PromQL", "properties": ".properties", "protobuf": "Protocol Buffers", "purebasic": "PureBasic", diff --git a/plugins/show-language/prism-show-language.min.js b/plugins/show-language/prism-show-language.min.js index 36298afbcd..85ce5f17b0 100644 --- a/plugins/show-language/prism-show-language.min.js +++ b/plugins/show-language/prism-show-language.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof self&&self.Prism&&self.document)if(Prism.plugins.toolbar){var i={none:"Plain text",html:"HTML",xml:"XML",svg:"SVG",mathml:"MathML",ssml:"SSML",rss:"RSS",css:"CSS",clike:"C-like",js:"JavaScript",abap:"ABAP",abnf:"ABNF",al:"AL",antlr4:"ANTLR4",g4:"ANTLR4",apacheconf:"Apache Configuration",apl:"APL",aql:"AQL",arff:"ARFF",asciidoc:"AsciiDoc",adoc:"AsciiDoc",aspnet:"ASP.NET (C#)",asm6502:"6502 Assembly",autohotkey:"AutoHotkey",autoit:"AutoIt",basic:"BASIC",bbcode:"BBcode",bnf:"BNF",rbnf:"RBNF",bsl:"BSL (1C:Enterprise)",oscript:"OneScript",csharp:"C#",cs:"C#",dotnet:"C#",cpp:"C++",cil:"CIL",cmake:"CMake",coffee:"CoffeeScript",conc:"Concurnas",csp:"Content-Security-Policy","css-extras":"CSS Extras",dax:"DAX",django:"Django/Jinja2",jinja2:"Django/Jinja2","dns-zone-file":"DNS zone file","dns-zone":"DNS zone file",dockerfile:"Docker",ebnf:"EBNF",editorconfig:"EditorConfig",ejs:"EJS",etlua:"Embedded Lua templating",erb:"ERB","excel-formula":"Excel Formula",xlsx:"Excel Formula",xls:"Excel Formula",fsharp:"F#","firestore-security-rules":"Firestore security rules",ftl:"FreeMarker Template Language",gml:"GameMaker Language",gamemakerlanguage:"GameMaker Language",gcode:"G-code",gdscript:"GDScript",gedcom:"GEDCOM",glsl:"GLSL",graphql:"GraphQL",hs:"Haskell",hcl:"HCL",hlsl:"HLSL",http:"HTTP",hpkp:"HTTP Public-Key-Pins",hsts:"HTTP Strict-Transport-Security",ichigojam:"IchigoJam",ignore:".ignore",gitignore:".gitignore",hgignore:".hgignore",npmignore:".npmignore",inform7:"Inform 7",javadoc:"JavaDoc",javadoclike:"JavaDoc-like",javastacktrace:"Java stack trace",jq:"JQ",jsdoc:"JSDoc","js-extras":"JS Extras",json:"JSON",webmanifest:"Web App Manifest",json5:"JSON5",jsonp:"JSONP",jsstacktrace:"JS stack trace","js-templates":"JS Templates",kts:"Kotlin Script",kt:"Kotlin",latex:"LaTeX",tex:"TeX",context:"ConTeXt",lilypond:"LilyPond",ly:"LilyPond",emacs:"Lisp",elisp:"Lisp","emacs-lisp":"Lisp",llvm:"LLVM IR",lolcode:"LOLCODE",md:"Markdown","markup-templating":"Markup templating",matlab:"MATLAB",mel:"MEL",mongodb:"MongoDB",moon:"MoonScript",n1ql:"N1QL",n4js:"N4JS",n4jsd:"N4JS","nand2tetris-hdl":"Nand To Tetris HDL",naniscript:"Naninovel Script",nani:"Naninovel Script",nasm:"NASM",neon:"NEON",nginx:"nginx",nsis:"NSIS",objectivec:"Objective-C",objc:"Objective-C",ocaml:"OCaml",opencl:"OpenCL",parigp:"PARI/GP",objectpascal:"Object Pascal",pcaxis:"PC-Axis",px:"PC-Axis",peoplecode:"PeopleCode",pcode:"PeopleCode",php:"PHP",phpdoc:"PHPDoc","php-extras":"PHP Extras",plsql:"PL/SQL",powerquery:"PowerQuery",pq:"PowerQuery",mscript:"PowerQuery",powershell:"PowerShell",properties:".properties",protobuf:"Protocol Buffers",purebasic:"PureBasic",pbfasm:"PureBasic",purs:"PureScript",py:"Python",q:"Q (kdb+ database)",qml:"QML",rkt:"Racket",jsx:"React JSX",tsx:"React TSX",renpy:"Ren'py",rpy:"Ren'py",rest:"reST (reStructuredText)",robotframework:"Robot Framework",robot:"Robot Framework",rb:"Ruby",sas:"SAS",sass:"Sass (Sass)",scss:"Sass (Scss)","shell-session":"Shell session","sh-session":"Shell session",shellsession:"Shell session",sml:"SML",smlnj:"SML/NJ",solidity:"Solidity (Ethereum)",sol:"Solidity (Ethereum)","solution-file":"Solution file",sln:"Solution file",soy:"Soy (Closure Template)",sparql:"SPARQL",rq:"SPARQL","splunk-spl":"Splunk SPL",sqf:"SQF: Status Quo Function (Arma 3)",sql:"SQL",iecst:"Structured Text (IEC 61131-3)","t4-templating":"T4 templating","t4-cs":"T4 Text Templates (C#)",t4:"T4 Text Templates (C#)","t4-vb":"T4 Text Templates (VB)",tap:"TAP",tt2:"Template Toolkit 2",toml:"TOML",trig:"TriG",ts:"TypeScript",tsconfig:"TSConfig",uscript:"UnrealScript",uc:"UnrealScript",vbnet:"VB.Net",vhdl:"VHDL",vim:"vim","visual-basic":"Visual Basic",vba:"VBA",vb:"Visual Basic",wasm:"WebAssembly",wiki:"Wiki markup",xeoracube:"XeoraCube","xml-doc":"XML doc (.net)",xojo:"Xojo (REALbasic)",xquery:"XQuery",yaml:"YAML",yml:"YAML",yang:"YANG"};Prism.plugins.toolbar.registerButton("show-language",function(e){var a=e.element.parentNode;if(a&&/pre/i.test(a.nodeName)){var s,t=a.getAttribute("data-language")||i[e.language]||((s=e.language)?(s.substring(0,1).toUpperCase()+s.substring(1)).replace(/s(?=cript)/,"S"):s);if(t){var o=document.createElement("span");return o.textContent=t,o}}})}else console.warn("Show Languages plugin loaded before Toolbar plugin.")}(); \ No newline at end of file +!function(){if("undefined"!=typeof self&&self.Prism&&self.document)if(Prism.plugins.toolbar){var r={none:"Plain text",html:"HTML",xml:"XML",svg:"SVG",mathml:"MathML",ssml:"SSML",rss:"RSS",css:"CSS",clike:"C-like",js:"JavaScript",abap:"ABAP",abnf:"ABNF",al:"AL",antlr4:"ANTLR4",g4:"ANTLR4",apacheconf:"Apache Configuration",apl:"APL",aql:"AQL",arff:"ARFF",asciidoc:"AsciiDoc",adoc:"AsciiDoc",aspnet:"ASP.NET (C#)",asm6502:"6502 Assembly",autohotkey:"AutoHotkey",autoit:"AutoIt",basic:"BASIC",bbcode:"BBcode",bnf:"BNF",rbnf:"RBNF",bsl:"BSL (1C:Enterprise)",oscript:"OneScript",csharp:"C#",cs:"C#",dotnet:"C#",cpp:"C++",cil:"CIL",cmake:"CMake",coffee:"CoffeeScript",conc:"Concurnas",csp:"Content-Security-Policy","css-extras":"CSS Extras",dax:"DAX",django:"Django/Jinja2",jinja2:"Django/Jinja2","dns-zone-file":"DNS zone file","dns-zone":"DNS zone file",dockerfile:"Docker",ebnf:"EBNF",editorconfig:"EditorConfig",ejs:"EJS",etlua:"Embedded Lua templating",erb:"ERB","excel-formula":"Excel Formula",xlsx:"Excel Formula",xls:"Excel Formula",fsharp:"F#","firestore-security-rules":"Firestore security rules",ftl:"FreeMarker Template Language",gml:"GameMaker Language",gamemakerlanguage:"GameMaker Language",gcode:"G-code",gdscript:"GDScript",gedcom:"GEDCOM",glsl:"GLSL",graphql:"GraphQL",hs:"Haskell",hcl:"HCL",hlsl:"HLSL",http:"HTTP",hpkp:"HTTP Public-Key-Pins",hsts:"HTTP Strict-Transport-Security",ichigojam:"IchigoJam",ignore:".ignore",gitignore:".gitignore",hgignore:".hgignore",npmignore:".npmignore",inform7:"Inform 7",javadoc:"JavaDoc",javadoclike:"JavaDoc-like",javastacktrace:"Java stack trace",jq:"JQ",jsdoc:"JSDoc","js-extras":"JS Extras",json:"JSON",webmanifest:"Web App Manifest",json5:"JSON5",jsonp:"JSONP",jsstacktrace:"JS stack trace","js-templates":"JS Templates",kts:"Kotlin Script",kt:"Kotlin",latex:"LaTeX",tex:"TeX",context:"ConTeXt",lilypond:"LilyPond",ly:"LilyPond",emacs:"Lisp",elisp:"Lisp","emacs-lisp":"Lisp",llvm:"LLVM IR",lolcode:"LOLCODE",md:"Markdown","markup-templating":"Markup templating",matlab:"MATLAB",mel:"MEL",mongodb:"MongoDB",moon:"MoonScript",n1ql:"N1QL",n4js:"N4JS",n4jsd:"N4JS","nand2tetris-hdl":"Nand To Tetris HDL",naniscript:"Naninovel Script",nani:"Naninovel Script",nasm:"NASM",neon:"NEON",nginx:"nginx",nsis:"NSIS",objectivec:"Objective-C",objc:"Objective-C",ocaml:"OCaml",opencl:"OpenCL",parigp:"PARI/GP",objectpascal:"Object Pascal",pcaxis:"PC-Axis",px:"PC-Axis",peoplecode:"PeopleCode",pcode:"PeopleCode",php:"PHP",phpdoc:"PHPDoc","php-extras":"PHP Extras",plsql:"PL/SQL",powerquery:"PowerQuery",pq:"PowerQuery",mscript:"PowerQuery",powershell:"PowerShell",promql:"PromQL",properties:".properties",protobuf:"Protocol Buffers",purebasic:"PureBasic",pbfasm:"PureBasic",purs:"PureScript",py:"Python",q:"Q (kdb+ database)",qml:"QML",rkt:"Racket",jsx:"React JSX",tsx:"React TSX",renpy:"Ren'py",rpy:"Ren'py",rest:"reST (reStructuredText)",robotframework:"Robot Framework",robot:"Robot Framework",rb:"Ruby",sas:"SAS",sass:"Sass (Sass)",scss:"Sass (Scss)","shell-session":"Shell session","sh-session":"Shell session",shellsession:"Shell session",sml:"SML",smlnj:"SML/NJ",solidity:"Solidity (Ethereum)",sol:"Solidity (Ethereum)","solution-file":"Solution file",sln:"Solution file",soy:"Soy (Closure Template)",sparql:"SPARQL",rq:"SPARQL","splunk-spl":"Splunk SPL",sqf:"SQF: Status Quo Function (Arma 3)",sql:"SQL",iecst:"Structured Text (IEC 61131-3)","t4-templating":"T4 templating","t4-cs":"T4 Text Templates (C#)",t4:"T4 Text Templates (C#)","t4-vb":"T4 Text Templates (VB)",tap:"TAP",tt2:"Template Toolkit 2",toml:"TOML",trig:"TriG",ts:"TypeScript",tsconfig:"TSConfig",uscript:"UnrealScript",uc:"UnrealScript",vbnet:"VB.Net",vhdl:"VHDL",vim:"vim","visual-basic":"Visual Basic",vba:"VBA",vb:"Visual Basic",wasm:"WebAssembly",wiki:"Wiki markup",xeoracube:"XeoraCube","xml-doc":"XML doc (.net)",xojo:"Xojo (REALbasic)",xquery:"XQuery",yaml:"YAML",yml:"YAML",yang:"YANG"};Prism.plugins.toolbar.registerButton("show-language",function(e){var a=e.element.parentNode;if(a&&/pre/i.test(a.nodeName)){var s,t=a.getAttribute("data-language")||r[e.language]||((s=e.language)?(s.substring(0,1).toUpperCase()+s.substring(1)).replace(/s(?=cript)/,"S"):s);if(t){var o=document.createElement("span");return o.textContent=t,o}}})}else console.warn("Show Languages plugin loaded before Toolbar plugin.")}(); \ No newline at end of file diff --git a/tests/languages/promql/aggregate_selection.test b/tests/languages/promql/aggregate_selection.test new file mode 100644 index 0000000000..8e4ea3f05c --- /dev/null +++ b/tests/languages/promql/aggregate_selection.test @@ -0,0 +1,30 @@ +sum by (job) ( + rate(http_requests_total[5m]) +) + +---------------------------------------------------- + +[ + ["keyword", "sum"], + ["keyword", "by"], + ["vector-match", [ + ["punctuation", "("], + ["label-key", "job"], + ["punctuation", ")"] + ]], + ["punctuation", "("], + ["function", "rate"], + ["punctuation", "("], + "http_requests_total", + ["context-range", [ + ["punctuation", "["], + ["range-duration", "5m"], + ["punctuation", "]"] + ]], + ["punctuation", ")"], + ["punctuation", ")"] +] + +---------------------------------------------------- + +Checks aggregate query. diff --git a/tests/languages/promql/comment_feature.test b/tests/languages/promql/comment_feature.test new file mode 100644 index 0000000000..fdd069abcc --- /dev/null +++ b/tests/languages/promql/comment_feature.test @@ -0,0 +1,11 @@ +# These examples are taken from ... + +---------------------------------------------------- + +[ + ["comment", "# These examples are taken from ..."] +] + +---------------------------------------------------- + +Checks for comments. diff --git a/tests/languages/promql/subquery_selection.test b/tests/languages/promql/subquery_selection.test new file mode 100644 index 0000000000..f8340b19c8 --- /dev/null +++ b/tests/languages/promql/subquery_selection.test @@ -0,0 +1,38 @@ +max_over_time(deriv(rate(distance_covered_total[5s])[30s:5s])[10m:]) + +---------------------------------------------------- + +[ + ["function", "max_over_time"], + ["punctuation", "("], + ["function", "deriv"], + ["punctuation", "("], + ["function", "rate"], + ["punctuation", "("], + "distance_covered_total", + ["context-range", [ + ["punctuation", "["], + ["range-duration", "5s"], + ["punctuation", "]"] + ]], + ["punctuation", ")"], + ["context-range", [ + ["punctuation", "["], + ["range-duration", "30s"], + ["punctuation", ":"], + ["range-duration", "5s"], + ["punctuation", "]"] + ]], + ["punctuation", ")"], + ["context-range", [ + ["punctuation", "["], + ["range-duration", "10m"], + ["punctuation", ":"], + ["punctuation", "]"] + ]], + ["punctuation", ")"] +] + +---------------------------------------------------- + +Checks subquery. diff --git a/tests/languages/promql/time_series_selection.test b/tests/languages/promql/time_series_selection.test new file mode 100644 index 0000000000..dc7edbe954 --- /dev/null +++ b/tests/languages/promql/time_series_selection.test @@ -0,0 +1,38 @@ +http_requests_total{job="apiserver", handler="/api/comments"}[5m] + +http_requests_total{job=~".*server"} + +---------------------------------------------------- + +[ + "http_requests_total", + ["context-labels", [ + ["punctuation", "{"], + ["label-key", "job"], + ["punctuation", "="], + ["label-value", "\"apiserver\""], + ["punctuation", ","], + ["label-key", "handler"], + ["punctuation", "="], + ["label-value", "\"/api/comments\""], + ["punctuation", "}"] + ]], + ["context-range", [ + ["punctuation", "["], + ["range-duration", "5m"], + ["punctuation", "]"] + ]], + + "\r\n\r\nhttp_requests_total", + ["context-labels", [ + ["punctuation", "{"], + ["label-key", "job"], + ["punctuation", "=~"], + ["label-value", "\".*server\""], + ["punctuation", "}"] + ]] +] + +---------------------------------------------------- + +Checks simple time series queries. From f217ab75b5ed34d296097da0b2a85e36c618be12 Mon Sep 17 00:00:00 2001 From: nkalinos Date: Fri, 13 Nov 2020 16:45:21 -0700 Subject: [PATCH 0664/1100] README: Grammar adjustments (#2629) --- README.md | 8 ++++---- docs/index.html | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index f5a470413f..960590572c 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ [![Build Status](https://github.com/PrismJS/prism/workflows/CI/badge.svg)](https://github.com/PrismJS/prism/actions) [![npm](https://img.shields.io/npm/dw/prismjs.svg)](https://www.npmjs.com/package/prismjs) -Prism is a lightweight, robust, elegant syntax highlighting library. It's a spin-off project from [Dabblet](https://dabblet.com/). +Prism is a lightweight, robust, and elegant syntax highlighting library. It's a spin-off project from [Dabblet](https://dabblet.com/). You can learn more on [prismjs.com](https://prismjs.com/). @@ -13,14 +13,14 @@ You can learn more on [prismjs.com](https://prismjs.com/). ## Contribute to Prism! -Prism depends on community contributions to expand and cover a wider array of use cases. If you like it, considering giving back by sending a pull request. Here are a few tips: +Prism depends on community contributions to expand and cover a wider array of use cases. If you like it, consider giving back by sending a pull request. Here are a few tips: - Read the [documentation](https://prismjs.com/extending.html). Prism was designed to be extensible. - Do not edit `prism.js`, it’s just the version of Prism used by the Prism website and is built automatically. Limit your changes to the unminified files in the `components/` folder. `prism.js` and all minified files are also generated automatically by our build system. - The build system uses [gulp](https://github.com/gulpjs/gulp) to minify the files and build `prism.js`. With all of Prism's dependencies installed, you just need to run the command `npm run build`. - Please follow the code conventions used in the files already. For example, I use [tabs for indentation and spaces for alignment](http://lea.verou.me/2012/01/why-tabs-are-clearly-superior/). Opening braces are on the same line, closing braces on their own line regardless of construct. There is a space before the opening brace. etc etc. -- Please try to err towards more smaller PRs rather than few huge PRs. If a PR includes changes I want to merge and changes I don't, handling it becomes difficult. -- My time is very limited these days, so it might take a long time to review longer PRs (short ones are usually merged very quickly), especially those modifying the Prism Core. This doesn't mean your PR is rejected. +- Please try to err towards more smaller PRs rather than a few huge PRs. If a PR includes changes that I want to merge and also changes that I don't, handling it becomes difficult. +- My time is very limited these days, so it might take a long time to review bigger PRs (small ones are usually merged very quickly), especially those modifying the Prism Core. This doesn't mean your PR is rejected. - If you contribute a new language definition, you will be responsible for handling bug reports about that language definition. - If you [add a new language definition](https://prismjs.com/extending.html#creating-a-new-language-definition) or plugin, you need to add it to `components.json` as well and rebuild Prism by running `npm run build`, so that it becomes available to the download build page. For new languages, please also add a few [tests](https://prismjs.com/test-suite.html) and an example in the `examples/` folder. - Go to [prism-themes](https://github.com/PrismJS/prism-themes) if you want to add a new theme. diff --git a/docs/index.html b/docs/index.html index 7e64a15db0..38363eceae 100644 --- a/docs/index.html +++ b/docs/index.html @@ -54,19 +54,19 @@

          Home

          Prism

          Build Status npm

          -

          Prism is a lightweight, robust, elegant syntax highlighting library. It's a spin-off project from Dabblet.

          +

          Prism is a lightweight, robust, and elegant syntax highlighting library. It's a spin-off project from Dabblet.

          You can learn more on prismjs.com.

          Why another syntax highlighter?

          More themes for Prism!

          Contribute to Prism!

          -

          Prism depends on community contributions to expand and cover a wider array of use cases. If you like it, considering giving back by sending a pull request. Here are a few tips:

          +

          Prism depends on community contributions to expand and cover a wider array of use cases. If you like it, consider giving back by sending a pull request. Here are a few tips:

          • Read the documentation. Prism was designed to be extensible.
          • Do not edit prism.js, it’s just the version of Prism used by the Prism website and is built automatically. Limit your changes to the unminified files in the components/ folder. prism.js and all minified files are also generated automatically by our build system.
          • The build system uses gulp to minify the files and build prism.js. With all of Prism's dependencies installed, you just need to run the command npm run build.
          • Please follow the code conventions used in the files already. For example, I use tabs for indentation and spaces for alignment. Opening braces are on the same line, closing braces on their own line regardless of construct. There is a space before the opening brace. etc etc.
          • -
          • Please try to err towards more smaller PRs rather than few huge PRs. If a PR includes changes I want to merge and changes I don't, handling it becomes difficult.
          • -
          • My time is very limited these days, so it might take a long time to review longer PRs (short ones are usually merged very quickly), especially those modifying the Prism Core. This doesn't mean your PR is rejected.
          • +
          • Please try to err towards more smaller PRs rather than a few huge PRs. If a PR includes changes that I want to merge and also changes that I don't, handling it becomes difficult.
          • +
          • My time is very limited these days, so it might take a long time to review bigger PRs (small ones are usually merged very quickly), especially those modifying the Prism Core. This doesn't mean your PR is rejected.
          • If you contribute a new language definition, you will be responsible for handling bug reports about that language definition.
          • If you add a new language definition or plugin, you need to add it to components.json as well and rebuild Prism by running npm run build, so that it becomes available to the download build page. For new languages, please also add a few tests and an example in the examples/ folder.
          • Go to prism-themes if you want to add a new theme.
          • From a5107d5c284126143ce9405025946e21bb0b956e Mon Sep 17 00:00:00 2001 From: Osip Fatkullin Date: Sun, 15 Nov 2020 20:28:34 +0300 Subject: [PATCH 0665/1100] Kotlin: Added support for backticks in function names (#2489) --- components/prism-kotlin.js | 10 +++++++--- components/prism-kotlin.min.js | 2 +- tests/languages/kotlin/function_feature.test | 11 ++++++++++- 3 files changed, 18 insertions(+), 5 deletions(-) diff --git a/components/prism-kotlin.js b/components/prism-kotlin.js index ae1a864e7d..3ade990144 100644 --- a/components/prism-kotlin.js +++ b/components/prism-kotlin.js @@ -6,10 +6,14 @@ lookbehind: true }, 'function': [ - /\w+(?=\s*\()/, { - pattern: /(\.)\w+(?=\s*\{)/, - lookbehind: true + pattern: /(?:`[^\r\n`]+`|\w+)(?=\s*\()/, + greedy: true + }, + { + pattern: /(\.)(?:`[^\r\n`]+`|\w+)(?=\s*\{)/, + lookbehind: true, + greedy: true } ], 'number': /\b(?:0[xX][\da-fA-F]+(?:_[\da-fA-F]+)*|0[bB][01]+(?:_[01]+)*|\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?[fFL]?)\b/, diff --git a/components/prism-kotlin.min.js b/components/prism-kotlin.min.js index 45b197e7a0..c6e788a3b2 100644 --- a/components/prism-kotlin.min.js +++ b/components/prism-kotlin.min.js @@ -1 +1 @@ -!function(n){n.languages.kotlin=n.languages.extend("clike",{keyword:{pattern:/(^|[^.])\b(?:abstract|actual|annotation|as|break|by|catch|class|companion|const|constructor|continue|crossinline|data|do|dynamic|else|enum|expect|external|final|finally|for|fun|get|if|import|in|infix|init|inline|inner|interface|internal|is|lateinit|noinline|null|object|open|operator|out|override|package|private|protected|public|reified|return|sealed|set|super|suspend|tailrec|this|throw|to|try|typealias|val|var|vararg|when|where|while)\b/,lookbehind:!0},function:[/\w+(?=\s*\()/,{pattern:/(\.)\w+(?=\s*\{)/,lookbehind:!0}],number:/\b(?:0[xX][\da-fA-F]+(?:_[\da-fA-F]+)*|0[bB][01]+(?:_[01]+)*|\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?[fFL]?)\b/,operator:/\+[+=]?|-[-=>]?|==?=?|!(?:!|==?)?|[\/*%<>]=?|[?:]:?|\.\.|&&|\|\||\b(?:and|inv|or|shl|shr|ushr|xor)\b/}),delete n.languages.kotlin["class-name"],n.languages.insertBefore("kotlin","string",{"raw-string":{pattern:/("""|''')[\s\S]*?\1/,alias:"string"}}),n.languages.insertBefore("kotlin","keyword",{annotation:{pattern:/\B@(?:\w+:)?(?:[A-Z]\w*|\[[^\]]+\])/,alias:"builtin"}}),n.languages.insertBefore("kotlin","function",{label:{pattern:/\w+@|@\w+/,alias:"symbol"}});var e=[{pattern:/\$\{[^}]+\}/,inside:{delimiter:{pattern:/^\$\{|\}$/,alias:"variable"},rest:n.languages.kotlin}},{pattern:/\$\w+/,alias:"variable"}];n.languages.kotlin.string.inside=n.languages.kotlin["raw-string"].inside={interpolation:e},n.languages.kt=n.languages.kotlin,n.languages.kts=n.languages.kotlin}(Prism); \ No newline at end of file +!function(e){e.languages.kotlin=e.languages.extend("clike",{keyword:{pattern:/(^|[^.])\b(?:abstract|actual|annotation|as|break|by|catch|class|companion|const|constructor|continue|crossinline|data|do|dynamic|else|enum|expect|external|final|finally|for|fun|get|if|import|in|infix|init|inline|inner|interface|internal|is|lateinit|noinline|null|object|open|operator|out|override|package|private|protected|public|reified|return|sealed|set|super|suspend|tailrec|this|throw|to|try|typealias|val|var|vararg|when|where|while)\b/,lookbehind:!0},function:[{pattern:/(?:`[^\r\n`]+`|\w+)(?=\s*\()/,greedy:!0},{pattern:/(\.)(?:`[^\r\n`]+`|\w+)(?=\s*\{)/,lookbehind:!0,greedy:!0}],number:/\b(?:0[xX][\da-fA-F]+(?:_[\da-fA-F]+)*|0[bB][01]+(?:_[01]+)*|\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?[fFL]?)\b/,operator:/\+[+=]?|-[-=>]?|==?=?|!(?:!|==?)?|[\/*%<>]=?|[?:]:?|\.\.|&&|\|\||\b(?:and|inv|or|shl|shr|ushr|xor)\b/}),delete e.languages.kotlin["class-name"],e.languages.insertBefore("kotlin","string",{"raw-string":{pattern:/("""|''')[\s\S]*?\1/,alias:"string"}}),e.languages.insertBefore("kotlin","keyword",{annotation:{pattern:/\B@(?:\w+:)?(?:[A-Z]\w*|\[[^\]]+\])/,alias:"builtin"}}),e.languages.insertBefore("kotlin","function",{label:{pattern:/\w+@|@\w+/,alias:"symbol"}});var n=[{pattern:/\$\{[^}]+\}/,inside:{delimiter:{pattern:/^\$\{|\}$/,alias:"variable"},rest:e.languages.kotlin}},{pattern:/\$\w+/,alias:"variable"}];e.languages.kotlin.string.inside=e.languages.kotlin["raw-string"].inside={interpolation:n},e.languages.kt=e.languages.kotlin,e.languages.kts=e.languages.kotlin}(Prism); \ No newline at end of file diff --git a/tests/languages/kotlin/function_feature.test b/tests/languages/kotlin/function_feature.test index 8bfd2b2261..29222ecf0c 100644 --- a/tests/languages/kotlin/function_feature.test +++ b/tests/languages/kotlin/function_feature.test @@ -1,6 +1,10 @@ foo() foo_Bar_42() list.filter {} +`function 1`() +` !"#$%^&()*+,=?@{|}~-_`() +list.`take 1` {} +`make fun`() ---------------------------------------------------- @@ -8,7 +12,12 @@ list.filter {} ["function", "foo"], ["punctuation", "("], ["punctuation", ")"], ["function", "foo_Bar_42"], ["punctuation", "("], ["punctuation", ")"], "\r\nlist", ["punctuation", "."], - ["function", "filter"], ["punctuation", "{"], ["punctuation", "}"] + ["function", "filter"], ["punctuation", "{"], ["punctuation", "}"], + ["function", "`function 1`"], ["punctuation", "("], ["punctuation", ")"], + ["function", "` !\"#$%^&()*+,=?@{|}~-_`"], ["punctuation", "("], ["punctuation", ")"], + "\r\nlist", ["punctuation", "."], + ["function", "`take 1`"], ["punctuation", "{"], ["punctuation", "}"], + ["function", "`make fun`"], ["punctuation", "("], ["punctuation", ")"] ] ---------------------------------------------------- From f0e2b70e23289cf30d3373cf12ba66a6983790ee Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Fri, 20 Nov 2020 17:09:54 +0100 Subject: [PATCH 0666/1100] Added support for Apex (#2622) --- components.js | 2 +- components.json | 5 + components/prism-apex.js | 65 ++++ components/prism-apex.min.js | 1 + examples/prism-apex.html | 152 ++++++++ plugins/autoloader/prism-autoloader.js | 4 + plugins/autoloader/prism-autoloader.min.js | 2 +- tests/languages/apex/annotation_feature.test | 16 + tests/languages/apex/boolean_feature.test | 9 + tests/languages/apex/class-name_feature.test | 334 ++++++++++++++++++ tests/languages/apex/comment_feature.test | 11 + tests/languages/apex/number_feature.test | 15 + tests/languages/apex/operator_feature.test | 64 ++++ tests/languages/apex/punctuation_feature.test | 16 + tests/languages/apex/sql_feature.test | 48 +++ tests/languages/apex/string_feature.test | 13 + tests/languages/apex/trigger_feature.test | 39 ++ 17 files changed, 794 insertions(+), 2 deletions(-) create mode 100644 components/prism-apex.js create mode 100644 components/prism-apex.min.js create mode 100644 examples/prism-apex.html create mode 100644 tests/languages/apex/annotation_feature.test create mode 100644 tests/languages/apex/boolean_feature.test create mode 100644 tests/languages/apex/class-name_feature.test create mode 100644 tests/languages/apex/comment_feature.test create mode 100644 tests/languages/apex/number_feature.test create mode 100644 tests/languages/apex/operator_feature.test create mode 100644 tests/languages/apex/punctuation_feature.test create mode 100644 tests/languages/apex/sql_feature.test create mode 100644 tests/languages/apex/string_feature.test create mode 100644 tests/languages/apex/trigger_feature.test diff --git a/components.js b/components.js index 347beb8cc1..91e666f1ec 100644 --- a/components.js +++ b/components.js @@ -1,2 +1,2 @@ -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml","ssml","atom","rss"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","ssml":"SSML","atom":"Atom","rss":"RSS"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","optional":"regex","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"ABNF","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"agda":{"title":"Agda","owner":"xy-ren"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"dkern"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"birb":{"title":"Birb","require":"clike","owner":"Calamity210"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"BNF","alias":"rbnf","aliasTitles":{"rbnf":"RBNF"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"bsl":{"title":"BSL (1C:Enterprise)","alias":"oscript","aliasTitles":{"oscript":"OneScript"},"owner":"Diversus23"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"clojure":{"title":"Clojure","owner":"troglotit"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"cypher":{"title":"Cypher","owner":"RunDevelopment"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dax":{"title":"DAX","owner":"peterbud"},"dhall":{"title":"Dhall","owner":"RunDevelopment"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"EBNF","owner":"RunDevelopment"},"editorconfig":{"title":"EditorConfig","owner":"osipxd"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"c","owner":"Golmote"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","optional":["markdown"],"owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"hlsl":{"title":"HLSL","require":"c","owner":"RunDevelopment"},"http":{"title":"HTTP","optional":["css","javascript","json","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"ignore":{"title":".ignore","owner":"osipxd","alias":["gitignore","hgignore","npmignore"],"aliasTitles":{"gitignore":".gitignore","hgignore":".hgignore","npmignore":".npmignore"}},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike","typescript"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","alias":"webmanifest","aliasTitles":{"webmanifest":"Web App Manifest"},"owner":"CupOfTea696"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"jsstacktrace":{"title":"JS stack trace","owner":"sbrl"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","alias":["kt","kts"],"aliasTitles":{"kts":"Kotlin Script"},"require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"mongodb":{"title":"MongoDB","owner":"airs0urce","require":"javascript"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"naniscript":{"title":"Naninovel Script","owner":"Elringus","alias":"nani"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":"markup-templating","owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"promql":{"title":"PromQL","owner":"arendjr"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"purebasic":{"title":"PureBasic","require":"clike","alias":"pbfasm","owner":"HeX0R101"},"purescript":{"title":"PureScript","require":"haskell","alias":"purs","owner":"sriharshachilakapati"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"racket":{"title":"Racket","require":"scheme","alias":"rkt","owner":"RunDevelopment"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","owner":"RunDevelopment"},"renpy":{"title":"Ren'py","alias":"rpy","owner":"HyuchiaDiego"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","alias":["sh-session","shellsession"],"owner":"RunDevelopment"},"smali":{"title":"Smali","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sml":{"title":"SML","alias":"smlnj","aliasTitles":{"smlnj":"SML/NJ"},"owner":"RunDevelopment"},"solidity":{"title":"Solidity (Ethereum)","alias":"sol","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"stan":{"title":"Stan","owner":"RunDevelopment"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","vbnet"],"owner":"RunDevelopment"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"typoscript":{"title":"TypoScript","alias":"tsconfig","aliasTitles":{"tsconfig":"TSConfig"},"owner":"dkern"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","optional":"regex","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":["vb","vba"],"aliasTitles":{"vba":"VBA"},"owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xml-doc":{"title":"XML doc (.net)","require":"markup","modify":["csharp","fsharp","vbnet"],"owner":"RunDevelopment"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"yang":{"title":"YANG","owner":"RunDevelopment"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml","ssml","atom","rss"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","ssml":"SSML","atom":"Atom","rss":"RSS"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","optional":"regex","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"ABNF","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"agda":{"title":"Agda","owner":"xy-ren"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apex":{"title":"Apex","require":["clike","sql"],"owner":"RunDevelopment"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"dkern"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"birb":{"title":"Birb","require":"clike","owner":"Calamity210"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"BNF","alias":"rbnf","aliasTitles":{"rbnf":"RBNF"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"bsl":{"title":"BSL (1C:Enterprise)","alias":"oscript","aliasTitles":{"oscript":"OneScript"},"owner":"Diversus23"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"clojure":{"title":"Clojure","owner":"troglotit"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"cypher":{"title":"Cypher","owner":"RunDevelopment"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dax":{"title":"DAX","owner":"peterbud"},"dhall":{"title":"Dhall","owner":"RunDevelopment"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"EBNF","owner":"RunDevelopment"},"editorconfig":{"title":"EditorConfig","owner":"osipxd"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"c","owner":"Golmote"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","optional":["markdown"],"owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"hlsl":{"title":"HLSL","require":"c","owner":"RunDevelopment"},"http":{"title":"HTTP","optional":["css","javascript","json","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"ignore":{"title":".ignore","owner":"osipxd","alias":["gitignore","hgignore","npmignore"],"aliasTitles":{"gitignore":".gitignore","hgignore":".hgignore","npmignore":".npmignore"}},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike","typescript"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","alias":"webmanifest","aliasTitles":{"webmanifest":"Web App Manifest"},"owner":"CupOfTea696"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"jsstacktrace":{"title":"JS stack trace","owner":"sbrl"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","alias":["kt","kts"],"aliasTitles":{"kts":"Kotlin Script"},"require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"mongodb":{"title":"MongoDB","owner":"airs0urce","require":"javascript"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"naniscript":{"title":"Naninovel Script","owner":"Elringus","alias":"nani"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":"markup-templating","owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"promql":{"title":"PromQL","owner":"arendjr"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"purebasic":{"title":"PureBasic","require":"clike","alias":"pbfasm","owner":"HeX0R101"},"purescript":{"title":"PureScript","require":"haskell","alias":"purs","owner":"sriharshachilakapati"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"racket":{"title":"Racket","require":"scheme","alias":"rkt","owner":"RunDevelopment"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","owner":"RunDevelopment"},"renpy":{"title":"Ren'py","alias":"rpy","owner":"HyuchiaDiego"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","alias":["sh-session","shellsession"],"owner":"RunDevelopment"},"smali":{"title":"Smali","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sml":{"title":"SML","alias":"smlnj","aliasTitles":{"smlnj":"SML/NJ"},"owner":"RunDevelopment"},"solidity":{"title":"Solidity (Ethereum)","alias":"sol","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"stan":{"title":"Stan","owner":"RunDevelopment"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","vbnet"],"owner":"RunDevelopment"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"typoscript":{"title":"TypoScript","alias":"tsconfig","aliasTitles":{"tsconfig":"TSConfig"},"owner":"dkern"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","optional":"regex","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":["vb","vba"],"aliasTitles":{"vba":"VBA"},"owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xml-doc":{"title":"XML doc (.net)","require":"markup","modify":["csharp","fsharp","vbnet"],"owner":"RunDevelopment"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"yang":{"title":"YANG","owner":"RunDevelopment"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; if (typeof module !== 'undefined' && module.exports) { module.exports = components; } \ No newline at end of file diff --git a/components.json b/components.json index d7985f2742..bce84a78fc 100644 --- a/components.json +++ b/components.json @@ -112,6 +112,11 @@ "title": "Apache Configuration", "owner": "GuiTeK" }, + "apex": { + "title": "Apex", + "require": ["clike", "sql"], + "owner": "RunDevelopment" + }, "apl": { "title": "APL", "owner": "ngn" diff --git a/components/prism-apex.js b/components/prism-apex.js new file mode 100644 index 0000000000..ae7b25e8ce --- /dev/null +++ b/components/prism-apex.js @@ -0,0 +1,65 @@ +(function (Prism) { + + var keywords = /\b(?:abstract|activate|and|any|array|as|asc|autonomous|begin|bigdecimal|blob|boolean|break|bulk|by|byte|case|cast|catch|char|class|collect|commit|const|continue|currency|date|datetime|decimal|default|delete|desc|do|double|else|end|enum|exception|exit|export|extends|final|finally|float|for|from|global|goto|group|having|hint|if|implements|import|in|inner|insert|instanceof|int|integer|interface|into|join|like|limit|list|long|loop|map|merge|new|not|null|nulls|number|object|of|on|or|outer|override|package|parallel|pragma|private|protected|public|retrieve|return|rollback|select|set|short|sObject|sort|static|string|super|switch|synchronized|system|testmethod|then|this|throw|time|transaction|transient|trigger|try|undelete|update|upsert|using|virtual|void|webservice|when|where|while|get(?=\s*[{};])|(?:after|before)(?=\s+[a-z])|(?:inherited|with|without)\s+sharing)\b/i; + + var className = /\b(?:(?=[a-z_]\w*\s*[<\[])|(?!))[A-Z_]\w*(?:\s*\.\s*[A-Z_]\w*)*\b(?:\s*(?:\[\s*\]|<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>))*/.source + .replace(//g, function () { return keywords.source; }); + /** @param {string} pattern */ + function insertClassName(pattern) { + return RegExp(pattern.replace(//g, function () { return className; }), 'i'); + } + + var classNameInside = { + 'keyword': keywords, + 'punctuation': /[()\[\]{};,:.<>]/ + }; + + Prism.languages.apex = { + 'comment': Prism.languages.clike.comment, + 'string': Prism.languages.clike.string, + 'sql': { + pattern: /((?:[=,({:]|\breturn)\s*)\[[^\[\]]*\]/i, + lookbehind: true, + greedy: true, + alias: 'language-sql', + inside: Prism.languages.sql + }, + + 'annotation': { + pattern: /@\w+\b/, + alias: 'punctuation' + }, + 'class-name': [ + { + pattern: insertClassName(/(\b(?:class|enum|extends|implements|instanceof|interface|new|trigger\s+\w+\s+on)\s+)/.source), + lookbehind: true, + inside: classNameInside + }, + { + // cast + pattern: insertClassName(/(\(\s*)(?=\s*\)\s*[\w(])/.source), + lookbehind: true, + inside: classNameInside + }, + { + // variable/parameter declaration and return types + pattern: insertClassName(/(?=\s*\w+\s*[;=,(){:])/.source), + inside: classNameInside + } + ], + 'trigger': { + pattern: /(\btrigger\s+)\w+\b/i, + lookbehind: true, + alias: 'class-name' + }, + 'keyword': keywords, + 'function': /\b[a-z_]\w*(?=\s*\()/i, + + 'boolean': /\b(?:false|true)\b/i, + + 'number': /(?:\B\.\d+|\b\d+(?:\.\d+|L)?)\b/i, + 'operator': /[!=](?:==?)?|\?\.?|&&|\|\||--|\+\+|[-+*/^&|]=?|:|<{1,3}=?/, + 'punctuation': /[()\[\]{};,.]/ + }; + +})(Prism); diff --git a/components/prism-apex.min.js b/components/prism-apex.min.js new file mode 100644 index 0000000000..b99a3d7b8c --- /dev/null +++ b/components/prism-apex.min.js @@ -0,0 +1 @@ +!function(e){var t=/\b(?:abstract|activate|and|any|array|as|asc|autonomous|begin|bigdecimal|blob|boolean|break|bulk|by|byte|case|cast|catch|char|class|collect|commit|const|continue|currency|date|datetime|decimal|default|delete|desc|do|double|else|end|enum|exception|exit|export|extends|final|finally|float|for|from|global|goto|group|having|hint|if|implements|import|in|inner|insert|instanceof|int|integer|interface|into|join|like|limit|list|long|loop|map|merge|new|not|null|nulls|number|object|of|on|or|outer|override|package|parallel|pragma|private|protected|public|retrieve|return|rollback|select|set|short|sObject|sort|static|string|super|switch|synchronized|system|testmethod|then|this|throw|time|transaction|transient|trigger|try|undelete|update|upsert|using|virtual|void|webservice|when|where|while|get(?=\s*[{};])|(?:after|before)(?=\s+[a-z])|(?:inherited|with|without)\s+sharing)\b/i,n="\\b(?:(?=[a-z_]\\w*\\s*[<\\[])|(?!))[A-Z_]\\w*(?:\\s*\\.\\s*[A-Z_]\\w*)*\\b(?:\\s*(?:\\[\\s*\\]|<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>))*".replace(//g,function(){return t.source});function i(e){return RegExp(e.replace(//g,function(){return n}),"i")}var a={keyword:t,punctuation:/[()\[\]{};,:.<>]/};e.languages.apex={comment:e.languages.clike.comment,string:e.languages.clike.string,sql:{pattern:/((?:[=,({:]|\breturn)\s*)\[[^\[\]]*\]/i,lookbehind:!0,greedy:!0,alias:"language-sql",inside:e.languages.sql},annotation:{pattern:/@\w+\b/,alias:"punctuation"},"class-name":[{pattern:i("(\\b(?:class|enum|extends|implements|instanceof|interface|new|trigger\\s+\\w+\\s+on)\\s+)"),lookbehind:!0,inside:a},{pattern:i("(\\(\\s*)(?=\\s*\\)\\s*[\\w(])"),lookbehind:!0,inside:a},{pattern:i("(?=\\s*\\w+\\s*[;=,(){:])"),inside:a}],trigger:{pattern:/(\btrigger\s+)\w+\b/i,lookbehind:!0,alias:"class-name"},keyword:t,function:/\b[a-z_]\w*(?=\s*\()/i,boolean:/\b(?:false|true)\b/i,number:/(?:\B\.\d+|\b\d+(?:\.\d+|L)?)\b/i,operator:/[!=](?:==?)?|\?\.?|&&|\|\||--|\+\+|[-+*/^&|]=?|:|<{1,3}=?/,punctuation:/[()\[\]{};,.]/}}(Prism); \ No newline at end of file diff --git a/examples/prism-apex.html b/examples/prism-apex.html new file mode 100644 index 0000000000..f942f29da3 --- /dev/null +++ b/examples/prism-apex.html @@ -0,0 +1,152 @@ +

            Full example

            +
            // source: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_shopping_cart_example_code.htm
            +
            +trigger calculate on Item__c (after insert, after update, after delete) {
            +
            +// Use a map because it doesn't allow duplicate values
            +
            +Map<ID, Shipping_Invoice__C> updateMap = new Map<ID, Shipping_Invoice__C>();
            +
            +// Set this integer to -1 if we are deleting
            +Integer subtract ;
            +
            +// Populate the list of items based on trigger type
            +List<Item__c> itemList;
            +	if(trigger.isInsert || trigger.isUpdate){
            +		itemList = Trigger.new;
            +		subtract = 1;
            +	}
            +	else if(trigger.isDelete)
            +	{
            +		// Note -- there is no trigger.new in delete
            +		itemList = trigger.old;
            +		subtract = -1;
            +	}
            +
            +// Access all the information we need in a single query
            +// rather than querying when we need it.
            +// This is a best practice for bulkifying requests
            +
            +set<Id> AllItems = new set<id>();
            +
            +for(item__c i :itemList){
            +// Assert numbers are not negative.
            +// None of the fields would make sense with a negative value
            +
            +System.assert(i.quantity__c > 0, 'Quantity must be positive');
            +System.assert(i.weight__c >= 0, 'Weight must be non-negative');
            +System.assert(i.price__c >= 0, 'Price must be non-negative');
            +
            +// If there is a duplicate Id, it won't get added to a set
            +AllItems.add(i.Shipping_Invoice__C);
            +}
            +
            +// Accessing all shipping invoices associated with the items in the trigger
            +List<Shipping_Invoice__C> AllShippingInvoices = [SELECT Id, ShippingDiscount__c,
            +                   SubTotal__c, TotalWeight__c, Tax__c, GrandTotal__c
            +                   FROM Shipping_Invoice__C WHERE Id IN :AllItems];
            +
            +// Take the list we just populated and put it into a Map.
            +// This will make it easier to look up a shipping invoice
            +// because you must iterate a list, but you can use lookup for a map,
            +Map<ID, Shipping_Invoice__C> SIMap = new Map<ID, Shipping_Invoice__C>();
            +
            +for(Shipping_Invoice__C sc : AllShippingInvoices)
            +{
            +	SIMap.put(sc.id, sc);
            +}
            +
            +// Process the list of items
            +	if(Trigger.isUpdate)
            +	{
            +		// Treat updates like a removal of the old item and addition of the
            +		// revised item rather than figuring out the differences of each field
            +		// and acting accordingly.
            +		// Note updates have both trigger.new and trigger.old
            +		for(Integer x = 0; x < Trigger.old.size(); x++)
            +		{
            +			Shipping_Invoice__C myOrder;
            +			myOrder = SIMap.get(trigger.old[x].Shipping_Invoice__C);
            +
            +			// Decrement the previous value from the subtotal and weight.
            +			myOrder.SubTotal__c -= (trigger.old[x].price__c *
            +			                        trigger.old[x].quantity__c);
            +			myOrder.TotalWeight__c -= (trigger.old[x].weight__c *
            +			                           trigger.old[x].quantity__c);
            +
            +			// Increment the new subtotal and weight.
            +			myOrder.SubTotal__c += (trigger.new[x].price__c *
            +			                        trigger.new[x].quantity__c);
            +			myOrder.TotalWeight__c += (trigger.new[x].weight__c *
            +			                           trigger.new[x].quantity__c);
            +		}
            +
            +		for(Shipping_Invoice__C myOrder : AllShippingInvoices)
            +		{
            +
            +			// Set tax rate to 9.25%  Please note, this is a simple example.
            +			// Generally, you would never hard code values.
            +			// Leveraging Custom Settings for tax rates is a best practice.
            +			// See Custom Settings in the Apex Developer Guide
            +			// for more information.
            +			myOrder.Tax__c = myOrder.Subtotal__c * .0925;
            +
            +			// Reset the shipping discount
            +			myOrder.ShippingDiscount__c = 0;
            +
            +			// Set shipping rate to 75 cents per pound.
            +			// Generally, you would never hard code values.
            +			// Leveraging Custom Settings for the shipping rate is a best practice.
            +			// See Custom Settings in the Apex Developer Guide
            +			// for more information.
            +			myOrder.Shipping__c = (myOrder.totalWeight__c * .75);
            +			myOrder.GrandTotal__c = myOrder.SubTotal__c + myOrder.tax__c +
            +			                        myOrder.Shipping__c;
            +			updateMap.put(myOrder.id, myOrder);
            +		}
            +	}
            +	else
            +	{
            +		for(Item__c itemToProcess : itemList)
            +		{
            +			Shipping_Invoice__C myOrder;
            +
            +			// Look up the correct shipping invoice from the ones we got earlier
            +			myOrder = SIMap.get(itemToProcess.Shipping_Invoice__C);
            +			myOrder.SubTotal__c += (itemToProcess.price__c *
            +			                        itemToProcess.quantity__c * subtract);
            +			myOrder.TotalWeight__c += (itemToProcess.weight__c *
            +			                           itemToProcess.quantity__c * subtract);
            +		}
            +
            +		for(Shipping_Invoice__C myOrder : AllShippingInvoices)
            +		{
            +
            +			// Set tax rate to 9.25%  Please note, this is a simple example.
            +			// Generally, you would never hard code values.
            +			// Leveraging Custom Settings for tax rates is a best practice.
            +			// See Custom Settings in the Apex Developer Guide
            +			// for more information.
            +			myOrder.Tax__c = myOrder.Subtotal__c * .0925;
            +
            +			// Reset shipping discount
            +			myOrder.ShippingDiscount__c = 0;
            +
            +			// Set shipping rate to 75 cents per pound.
            +			// Generally, you would never hard code values.
            +			// Leveraging Custom Settings for the shipping rate is a best practice.
            +			// See Custom Settings in the Apex Developer Guide
            +			// for more information.
            +			myOrder.Shipping__c = (myOrder.totalWeight__c * .75);
            +			myOrder.GrandTotal__c = myOrder.SubTotal__c + myOrder.tax__c +
            +			                        myOrder.Shipping__c;
            +
            +			updateMap.put(myOrder.id, myOrder);
            +
            +		}
            +	}
            +
            +	// Only use one DML update at the end.
            +	// This minimizes the number of DML requests generated from this trigger.
            +	update updateMap.values();
            +}
            diff --git a/plugins/autoloader/prism-autoloader.js b/plugins/autoloader/prism-autoloader.js index 498e3cffe0..48b90c390f 100644 --- a/plugins/autoloader/prism-autoloader.js +++ b/plugins/autoloader/prism-autoloader.js @@ -11,6 +11,10 @@ var lang_dependencies = /*dependencies_placeholder[*/{ "javascript": "clike", "actionscript": "javascript", + "apex": [ + "clike", + "sql" + ], "arduino": "cpp", "aspnet": [ "markup", diff --git a/plugins/autoloader/prism-autoloader.min.js b/plugins/autoloader/prism-autoloader.min.js index 695cf2aec2..dd5b4113ce 100644 --- a/plugins/autoloader/prism-autoloader.min.js +++ b/plugins/autoloader/prism-autoloader.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof self&&self.Prism&&self.document&&document.createElement){var l={javascript:"clike",actionscript:"javascript",arduino:"cpp",aspnet:["markup","csharp"],birb:"clike",bison:"c",c:"clike",csharp:"clike",cpp:"c",coffeescript:"javascript",crystal:"ruby","css-extras":"css",d:"clike",dart:"clike",django:"markup-templating",ejs:["javascript","markup-templating"],etlua:["lua","markup-templating"],erb:["ruby","markup-templating"],fsharp:"clike","firestore-security-rules":"clike",flow:"javascript",ftl:"markup-templating",gml:"clike",glsl:"c",go:"clike",groovy:"clike",haml:"ruby",handlebars:"markup-templating",haxe:"clike",hlsl:"c",java:"clike",javadoc:["markup","java","javadoclike"],jolie:"clike",jsdoc:["javascript","javadoclike","typescript"],"js-extras":"javascript",json5:"json",jsonp:"json","js-templates":"javascript",kotlin:"clike",latte:["clike","markup-templating","php"],less:"css",lilypond:"scheme",markdown:"markup","markup-templating":"markup",mongodb:"javascript",n4js:"javascript",nginx:"clike",objectivec:"c",opencl:"c",parser:"markup",php:"markup-templating",phpdoc:["php","javadoclike"],"php-extras":"php",plsql:"sql",processing:"clike",protobuf:"clike",pug:["markup","javascript"],purebasic:"clike",purescript:"haskell",qml:"javascript",qore:"clike",racket:"scheme",jsx:["markup","javascript"],tsx:["jsx","typescript"],reason:"clike",ruby:"clike",sass:"css",scss:"css",scala:"java","shell-session":"bash",smarty:"markup-templating",solidity:"clike",soy:"markup-templating",sparql:"turtle",sqf:"clike",swift:"clike","t4-cs":["t4-templating","csharp"],"t4-vb":["t4-templating","vbnet"],tap:"yaml",tt2:["clike","markup-templating"],textile:"markup",twig:"markup",typescript:"javascript",vala:"clike",vbnet:"basic",velocity:"markup",wiki:"markup",xeora:"markup","xml-doc":"markup",xquery:"markup"},n={html:"markup",xml:"markup",svg:"markup",mathml:"markup",ssml:"markup",atom:"markup",rss:"markup",js:"javascript",g4:"antlr4",adoc:"asciidoc",shell:"bash",shortcode:"bbcode",rbnf:"bnf",oscript:"bsl",cs:"csharp",dotnet:"csharp",coffee:"coffeescript",conc:"concurnas",jinja2:"django","dns-zone":"dns-zone-file",dockerfile:"docker",eta:"ejs",xlsx:"excel-formula",xls:"excel-formula",gamemakerlanguage:"gml",hs:"haskell",gitignore:"ignore",hgignore:"ignore",npmignore:"ignore",webmanifest:"json",kt:"kotlin",kts:"kotlin",tex:"latex",context:"latex",ly:"lilypond",emacs:"lisp",elisp:"lisp","emacs-lisp":"lisp",md:"markdown",moon:"moonscript",n4jsd:"n4js",nani:"naniscript",objc:"objectivec",objectpascal:"pascal",px:"pcaxis",pcode:"peoplecode",pq:"powerquery",mscript:"powerquery",pbfasm:"purebasic",purs:"purescript",py:"python",rkt:"racket",rpy:"renpy",robot:"robotframework",rb:"ruby","sh-session":"shell-session",shellsession:"shell-session",smlnj:"sml",sol:"solidity",sln:"solution-file",rq:"sparql",t4:"t4-cs",trig:"turtle",ts:"typescript",tsconfig:"typoscript",uscript:"unrealscript",uc:"unrealscript",vb:"visual-basic",vba:"visual-basic",xeoracube:"xeora",yml:"yaml"},p={},e="components/",a=Prism.util.currentScript();if(a){var r=/\bplugins\/autoloader\/prism-autoloader\.(?:min\.)?js(?:\?[^\r\n/]*)?$/i,s=/(^|\/)[\w-]+\.(?:min\.)?js(?:\?[^\r\n/]*)?$/i,t=a.getAttribute("data-autoloader-path");if(null!=t)e=t.trim().replace(/\/?$/,"/");else{var i=a.src;r.test(i)?e=i.replace(r,"components/"):s.test(i)&&(e=i.replace(s,"$1components/"))}}var o=Prism.plugins.autoloader={languages_path:e,use_minified:!0,loadLanguages:m};Prism.hooks.add("complete",function(e){var a=e.element,r=e.language;if(a&&r&&"none"!==r){var s=function(e){var a=(e.getAttribute("data-dependencies")||"").trim();if(!a){var r=e.parentElement;r&&"pre"===r.tagName.toLowerCase()&&(a=(r.getAttribute("data-dependencies")||"").trim())}return a?a.split(/\s*,\s*/g):[]}(a);/^diff-./i.test(r)?(s.push("diff"),s.push(r.substr("diff-".length))):s.push(r),s.every(u)||m(s,function(){Prism.highlightElement(a)})}})}function u(e){if(0<=e.indexOf("!"))return!1;if((e=n[e]||e)in Prism.languages)return!0;var a=p[e];return a&&!a.error&&!1===a.loading}function m(e,a,r){"string"==typeof e&&(e=[e]);var s=e.length,t=0,i=!1;function c(){i||++t===s&&a&&a(e)}0!==s?e.forEach(function(e){!function(a,r,s){var t=0<=a.indexOf("!");function e(){var e=p[a];e||(e=p[a]={callbacks:[]}),e.callbacks.push({success:r,error:s}),!t&&u(a)?k(a,"success"):!t&&e.error?k(a,"error"):!t&&e.loading||(e.loading=!0,e.error=!1,function(e,a,r){var s=document.createElement("script");s.src=e,s.async=!0,s.onload=function(){document.body.removeChild(s),a&&a()},s.onerror=function(){document.body.removeChild(s),r&&r()},document.body.appendChild(s)}(function(e){return o.languages_path+"prism-"+e+(o.use_minified?".min":"")+".js"}(a),function(){e.loading=!1,k(a,"success")},function(){e.loading=!1,e.error=!0,k(a,"error")}))}a=a.replace("!",""),a=n[a]||a;var i=l[a];i&&i.length?m(i,e,s):e()}(e,c,function(){i||(i=!0,r&&r(e))})}):a&&setTimeout(a,0)}function k(e,a){if(p[e]){for(var r=p[e].callbacks,s=0,t=r.length;s itemList; +List>> my_list_2 = new List>>(); +Map updateMap = new Map(); +set AllItems = new set(); + +public Season getSouthernHemisphereSeason(season northernHemisphereSeason) {} + +for(Shipping_Invoice__C sc : AllShippingInvoices){} +public static Integer calculate() {} + +if (sobject instanceof Account) { + Account a = (Account) sobject; +} + +public class myOuterClass {} +public enum MyEnumClass { X, Y } +public class YellowMarker extends Marker {} +interface MySecondInterface extends MyInterface {} +public virtual class InnerClass implements MySecondInterface {} + + +class Foo { + List accs {get; set;} + Integer i {get; set;} +} + + +public with sharing class sharingClass {} +public without sharing class noSharing {} +public inherited sharing class InheritedSharingClass{} + +---------------------------------------------------- + +[ + ["keyword", "Integer"], + " i", + ["punctuation", ";"], + ["keyword", "Integer"], + " i ", + ["operator", "="], + ["punctuation", "("], + ["keyword", "Integer"], + ["punctuation", ")"], + "obj", + ["punctuation", ";"], + ["class-name", [ + ["keyword", "Integer"], + ["punctuation", "["], + ["punctuation", "]"] + ]], + " myInts ", + ["operator", "="], + ["keyword", "new"], + ["class-name", [ + ["keyword", "Integer"], + ["punctuation", "["], + ["punctuation", "]"] + ]], + ["punctuation", "{"], + ["number", "1"], + ["punctuation", ","], + ["number", "2"], + ["punctuation", ","], + ["number", "3"], + ["punctuation", ","], + ["number", "4"], + ["punctuation", ","], + ["number", "5"], + ["punctuation", ","], + ["number", "6"], + ["punctuation", ","], + ["number", "7"], + ["punctuation", ","], + ["number", "8"], + ["punctuation", ","], + ["number", "9"], + ["punctuation", ","], + ["number", "10"], + ["punctuation", "}"], + ["punctuation", ";"], + ["keyword", "Object"], + " obj ", + ["operator", "="], + ["keyword", "new"], + ["class-name", [ + "MyApexClass" + ]], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", ";"], + ["class-name", [ + ["keyword", "list"], + ["punctuation", "<"], + "Item__c", + ["punctuation", ">"] + ]], + " itemList", + ["punctuation", ";"], + ["class-name", [ + ["keyword", "List"], + ["punctuation", "<"], + ["keyword", "List"], + ["punctuation", "<"], + ["keyword", "Set"], + ["punctuation", "<"], + ["keyword", "Integer"], + ["punctuation", ">"], + ["punctuation", ">"], + ["punctuation", ">"] + ]], + " my_list_2 ", + ["operator", "="], + ["keyword", "new"], + ["class-name", [ + ["keyword", "List"], + ["punctuation", "<"], + ["keyword", "List"], + ["punctuation", "<"], + ["keyword", "Set"], + ["punctuation", "<"], + ["keyword", "Integer"], + ["punctuation", ">"], + ["punctuation", ">"], + ["punctuation", ">"] + ]], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", ";"], + ["class-name", [ + ["keyword", "Map"], + ["punctuation", "<"], + "ID", + ["punctuation", ","], + " Shipping_Invoice__C", + ["punctuation", ">"] + ]], + " updateMap ", + ["operator", "="], + ["keyword", "new"], + ["class-name", [ + ["keyword", "Map"], + ["punctuation", "<"], + "ID", + ["punctuation", ","], + " Shipping_Invoice__C", + ["punctuation", ">"] + ]], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", ";"], + ["class-name", [ + ["keyword", "set"], + ["punctuation", "<"], + "Id", + ["punctuation", ">"] + ]], + " AllItems ", + ["operator", "="], + ["keyword", "new"], + ["class-name", [ + ["keyword", "set"], + ["punctuation", "<"], + "id", + ["punctuation", ">"] + ]], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", ";"], + + ["keyword", "public"], + ["class-name", [ + "Season" + ]], + ["function", "getSouthernHemisphereSeason"], + ["punctuation", "("], + ["class-name", [ + "season" + ]], + " northernHemisphereSeason", + ["punctuation", ")"], + ["punctuation", "{"], + ["punctuation", "}"], + + ["keyword", "for"], + ["punctuation", "("], + ["class-name", [ + "Shipping_Invoice__C" + ]], + " sc ", + ["operator", ":"], + " AllShippingInvoices", + ["punctuation", ")"], + ["punctuation", "{"], + ["punctuation", "}"], + ["keyword", "public"], + ["keyword", "static"], + ["keyword", "Integer"], + ["function", "calculate"], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", "{"], + ["punctuation", "}"], + + ["keyword", "if"], + ["punctuation", "("], + ["keyword", "sobject"], + ["keyword", "instanceof"], + ["class-name", [ + "Account" + ]], + ["punctuation", ")"], + ["punctuation", "{"], + ["class-name", [ + "Account" + ]], + " a ", + ["operator", "="], + ["punctuation", "("], + ["class-name", [ + "Account" + ]], + ["punctuation", ")"], + ["keyword", "sobject"], + ["punctuation", ";"], + ["punctuation", "}"], + + ["keyword", "public"], + ["keyword", "class"], + ["class-name", [ + "myOuterClass" + ]], + ["punctuation", "{"], + ["punctuation", "}"], + ["keyword", "public"], + ["keyword", "enum"], + ["class-name", [ + "MyEnumClass" + ]], + ["punctuation", "{"], + " X", + ["punctuation", ","], + " Y ", + ["punctuation", "}"], + ["keyword", "public"], + ["keyword", "class"], + ["class-name", [ + "YellowMarker" + ]], + ["keyword", "extends"], + ["class-name", [ + "Marker" + ]], + ["punctuation", "{"], + ["punctuation", "}"], + ["keyword", "interface"], + ["class-name", [ + "MySecondInterface" + ]], + ["keyword", "extends"], + ["class-name", [ + "MyInterface" + ]], + ["punctuation", "{"], + ["punctuation", "}"], + ["keyword", "public"], + ["keyword", "virtual"], + ["keyword", "class"], + ["class-name", [ + "InnerClass" + ]], + ["keyword", "implements"], + ["class-name", [ + "MySecondInterface" + ]], + ["punctuation", "{"], + ["punctuation", "}"], + + ["keyword", "class"], + ["class-name", [ + "Foo" + ]], + ["punctuation", "{"], + ["class-name", [ + ["keyword", "List"], + ["punctuation", "<"], + "Account", + ["punctuation", ">"] + ]], + " accs ", + ["punctuation", "{"], + ["keyword", "get"], + ["punctuation", ";"], + ["keyword", "set"], + ["punctuation", ";"], + ["punctuation", "}"], + ["keyword", "Integer"], + " i ", + ["punctuation", "{"], + ["keyword", "get"], + ["punctuation", ";"], + ["keyword", "set"], + ["punctuation", ";"], + ["punctuation", "}"], + ["punctuation", "}"], + + ["keyword", "public"], + ["keyword", "with sharing"], + ["keyword", "class"], + ["class-name", [ + "sharingClass" + ]], + ["punctuation", "{"], + ["punctuation", "}"], + ["keyword", "public"], + ["keyword", "without sharing"], + ["keyword", "class"], + ["class-name", [ + "noSharing" + ]], + ["punctuation", "{"], + ["punctuation", "}"], + ["keyword", "public"], + ["keyword", "inherited sharing"], + ["keyword", "class"], + ["class-name", [ + "InheritedSharingClass" + ]], + ["punctuation", "{"], + ["punctuation", "}"] +] \ No newline at end of file diff --git a/tests/languages/apex/comment_feature.test b/tests/languages/apex/comment_feature.test new file mode 100644 index 0000000000..37590c35d1 --- /dev/null +++ b/tests/languages/apex/comment_feature.test @@ -0,0 +1,11 @@ +// comment +/* +comment +*/ + +---------------------------------------------------- + +[ + ["comment", "// comment"], + ["comment", "/*\r\ncomment\r\n*/"] +] \ No newline at end of file diff --git a/tests/languages/apex/number_feature.test b/tests/languages/apex/number_feature.test new file mode 100644 index 0000000000..e2be1e3fd2 --- /dev/null +++ b/tests/languages/apex/number_feature.test @@ -0,0 +1,15 @@ +0 +123 +.123 +21.3 +123L + +---------------------------------------------------- + +[ + ["number", "0"], + ["number", "123"], + ["number", ".123"], + ["number", "21.3"], + ["number", "123L"] +] diff --git a/tests/languages/apex/operator_feature.test b/tests/languages/apex/operator_feature.test new file mode 100644 index 0000000000..e7e8464c32 --- /dev/null +++ b/tests/languages/apex/operator_feature.test @@ -0,0 +1,64 @@ += + ++= *= -= /= +|= &= <<= >>= >>>= + +? : + +&& || +== === < > <= >= != !== + ++ - * / ! +++ -- +& | +^ ^= +<< >> >>> + +?. + +---------------------------------------------------- + +[ + ["operator", "="], + + ["operator", "+="], + ["operator", "*="], + ["operator", "-="], + ["operator", "/="], + ["operator", "|="], + ["operator", "&="], + ["operator", "<<="], + ["operator", ">>="], + ["operator", ">>>="], + + ["operator", "?"], + ["operator", ":"], + + ["operator", "&&"], + ["operator", "||"], + ["operator", "=="], + ["operator", "==="], + ["operator", "<"], + ["operator", ">"], + ["operator", "<="], + ["operator", ">="], + ["operator", "!="], + ["operator", "!=="], + + ["operator", "+"], + ["operator", "-"], + ["operator", "*"], + ["operator", "/"], + ["operator", "!"], + ["operator", "++"], + ["operator", "--"], + ["operator", "&"], + ["operator", "|"], + ["operator", "^"], + ["operator", "^="], + ["operator", "<<"], + ["operator", ">>"], + ["operator", ">>>"], + + ["operator", "?."] +] diff --git a/tests/languages/apex/punctuation_feature.test b/tests/languages/apex/punctuation_feature.test new file mode 100644 index 0000000000..7be7561bec --- /dev/null +++ b/tests/languages/apex/punctuation_feature.test @@ -0,0 +1,16 @@ +( ) [ ] { } +. , ; + +---------------------------------------------------- + +[ + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", "["], + ["punctuation", "]"], + ["punctuation", "{"], + ["punctuation", "}"], + ["punctuation", "."], + ["punctuation", ","], + ["punctuation", ";"] +] diff --git a/tests/languages/apex/sql_feature.test b/tests/languages/apex/sql_feature.test new file mode 100644 index 0000000000..2ade8e615d --- /dev/null +++ b/tests/languages/apex/sql_feature.test @@ -0,0 +1,48 @@ +b = [SELECT Price__c FROM Book__c WHERE Id =:b.Id]; +return [SELECT Name FROM Contact]; + +// don't capture array indexing +a[0].Name = 'Acme'; + +---------------------------------------------------- + +[ + "b ", + ["operator", "="], + ["sql", [ + ["punctuation", "["], + ["keyword", "SELECT"], + " Price__c ", + ["keyword", "FROM"], + " Book__c ", + ["keyword", "WHERE"], + " Id ", + ["operator", "="], + ":b", + ["punctuation", "."], + "Id", + ["punctuation", "]"] + ]], + ["punctuation", ";"], + ["keyword", "return"], + ["sql", [ + ["punctuation", "["], + ["keyword", "SELECT"], + " Name ", + ["keyword", "FROM"], + " Contact", + ["punctuation", "]"] + ]], + ["punctuation", ";"], + + ["comment", "// don't capture array indexing"], + "\r\na", + ["punctuation", "["], + ["number", "0"], + ["punctuation", "]"], + ["punctuation", "."], + "Name ", + ["operator", "="], + ["string", "'Acme'"], + ["punctuation", ";"] +] \ No newline at end of file diff --git a/tests/languages/apex/string_feature.test b/tests/languages/apex/string_feature.test new file mode 100644 index 0000000000..5d6f204ad5 --- /dev/null +++ b/tests/languages/apex/string_feature.test @@ -0,0 +1,13 @@ +'' +' ' +'\'' +'foo\nbar' + +---------------------------------------------------- + +[ + ["string", "''"], + ["string", "' '"], + ["string", "'\\''"], + ["string", "'foo\\nbar'"] +] diff --git a/tests/languages/apex/trigger_feature.test b/tests/languages/apex/trigger_feature.test new file mode 100644 index 0000000000..c59d1f0162 --- /dev/null +++ b/tests/languages/apex/trigger_feature.test @@ -0,0 +1,39 @@ +trigger HelloWorldTrigger on Book__c (before insert) {} + +trigger T1 on Account (before delete, after delete, after undelete) {} + +---------------------------------------------------- + +[ + ["keyword", "trigger"], + ["trigger", "HelloWorldTrigger"], + ["keyword", "on"], + ["class-name", [ + "Book__c" + ]], + ["punctuation", "("], + ["keyword", "before"], + ["keyword", "insert"], + ["punctuation", ")"], + ["punctuation", "{"], + ["punctuation", "}"], + + ["keyword", "trigger"], + ["trigger", "T1"], + ["keyword", "on"], + ["class-name", [ + "Account" + ]], + ["punctuation", "("], + ["keyword", "before"], + ["keyword", "delete"], + ["punctuation", ","], + ["keyword", "after"], + ["keyword", "delete"], + ["punctuation", ","], + ["keyword", "after"], + ["keyword", "undelete"], + ["punctuation", ")"], + ["punctuation", "{"], + ["punctuation", "}"] +] From 8bfcc819b6d013863a57f420e8e26daf366313c2 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Sat, 21 Nov 2020 01:17:39 +0100 Subject: [PATCH 0667/1100] Tests: Better pretty print (#2600) This is a major improvement for the pretty-printer. The main change is that `TokenStreamTransformer.prettyprint` now takes a Prism token stream instead of a simplified token stream. This means that it has a lot more information to work with and it uses that information. It mostly behaves like the old pretty-printer with 3 main differences: 1. Tokens that contain a nested token stream that only contains a single string are printed as one line. Example: `["namespace", ["java"]]` 2. The pretty-printer can now glue tokens together so that they are printed in a single line. Example: `["number", "100"], ["operator", ".."], ["number", "100"]` 3. Line breaks in the input code may now cause empty lines in the output. Previously, only blank strings containing more at least 2 line breaks produce empty lines. This helps readability as it groups tokens together. --- tests/core/greedy.js | 3 +- tests/helper/test-case.js | 23 +- tests/helper/token-stream-transformer.js | 461 ++++++++++++++++++++--- tests/identifier-test.js | 2 +- 4 files changed, 435 insertions(+), 54 deletions(-) diff --git a/tests/core/greedy.js b/tests/core/greedy.js index 812828cbff..f21f87d1e3 100644 --- a/tests/core/greedy.js +++ b/tests/core/greedy.js @@ -3,13 +3,14 @@ const { assert } = require('chai'); const PrismLoader = require('../helper/prism-loader'); const TestCase = require('../helper/test-case'); +const TokenStreamTransformer = require('../helper/token-stream-transformer'); function testTokens({ grammar, code, expected }) { const Prism = PrismLoader.createEmptyPrism(); Prism.languages.test = grammar; - const simpleTokens = TestCase.simpleTokenize(Prism, code, 'test'); + const simpleTokens = TokenStreamTransformer.simplify(TestCase.tokenize(Prism, code, 'test')); assert.deepStrictEqual(simpleTokens, expected); } diff --git a/tests/helper/test-case.js b/tests/helper/test-case.js index a00ceda1aa..e3c6c830f8 100644 --- a/tests/helper/test-case.js +++ b/tests/helper/test-case.js @@ -5,6 +5,10 @@ const { assert } = require("chai"); const PrismLoader = require("./prism-loader"); const TokenStreamTransformer = require("./token-stream-transformer"); +/** + * @typedef {import("./token-stream-transformer").TokenStream} TokenStream + */ + /** * Handles parsing of a test case file. * @@ -58,7 +62,7 @@ module.exports = { const Prism = PrismLoader.createInstance(usedLanguages.languages); // the first language is the main language to highlight - const simplifiedTokenStream = this.simpleTokenize(Prism, testCase.code, usedLanguages.mainLanguage); + const tokenStream = this.tokenize(Prism, testCase.code, usedLanguages.mainLanguage); if (testCase.expectedTokenStream === null) { // the test case doesn't have an expected value @@ -71,7 +75,7 @@ module.exports = { // change the file const lineEnd = (/\r\n/.test(testCase.code) || !/\n/.test(testCase.code)) ? '\r\n' : '\n'; const separator = "\n\n----------------------------------------------------\n\n"; - const pretty = TokenStreamTransformer.prettyprint(simplifiedTokenStream) + const pretty = TokenStreamTransformer.prettyprint(tokenStream) .replace(/^( +)/gm, m => { return "\t".repeat(m.length / 4); }); @@ -80,11 +84,14 @@ module.exports = { if (testCase.comment) { content += separator + testCase.comment; } + //content += '\n' content = content.replace(/\r?\n/g, lineEnd); fs.writeFileSync(filePath, content, "utf-8"); } else { // there is an expected value + const simplifiedTokenStream = TokenStreamTransformer.simplify(tokenStream); + const actual = JSON.stringify(simplifiedTokenStream); const expected = JSON.stringify(testCase.expectedTokenStream); @@ -100,7 +107,7 @@ module.exports = { const columnNumber = expectedJsonLines.pop().length + 1; const lineNumber = testCase.expectedLineOffset + expectedJsonLines.length; - const tokenStreamStr = TokenStreamTransformer.prettyprint(simplifiedTokenStream); + const tokenStreamStr = TokenStreamTransformer.prettyprint(tokenStream); const message = "\n\nActual Token Stream:" + "\n-----------------------------------------\n" + tokenStreamStr + @@ -112,16 +119,16 @@ module.exports = { }, /** - * Returns the simplified token stream of the given code highlighted with `language`. + * Returns the token stream of the given code highlighted with `language`. * * The `before-tokenize` and `after-tokenize` hooks will also be executed. * * @param {import('../../components/prism-core')} Prism The Prism instance which will tokenize `code`. * @param {string} code The code to tokenize. * @param {string} language The language id. - * @returns {Array>} + * @returns {TokenStream} */ - simpleTokenize(Prism, code, language) { + tokenize(Prism, code, language) { const env = { code, grammar: Prism.languages[language], @@ -132,7 +139,7 @@ module.exports = { env.tokens = Prism.tokenize(env.code, env.grammar); Prism.hooks.run('after-tokenize', env); - return TokenStreamTransformer.simplify(env.tokens); + return env.tokens; }, @@ -202,7 +209,7 @@ module.exports = { const code = testCaseParts[0].trim(); const expected = (testCaseParts[1] || '').trim(); - const comment = (testCaseParts[2] || '').trim(); + const comment = (testCaseParts[2] || '').trimStart(); const testCase = { code, diff --git a/tests/helper/token-stream-transformer.js b/tests/helper/token-stream-transformer.js index be5c33f00c..52bb2ed615 100644 --- a/tests/helper/token-stream-transformer.js +++ b/tests/helper/token-stream-transformer.js @@ -1,14 +1,20 @@ -"use strict"; +'use strict'; +/** + * @typedef TokenStreamItem + * @property {string} type + * @property {string | Array} content + * + * @typedef {Array} TokenStream + * + * @typedef {Array} SimplifiedTokenStream + * + * @typedef {Array} PrettyTokenStream + * @typedef {string | LineBreakItem | GlueItem | [string, string | Array]} PrettyTokenStreamItem + */ + module.exports = { - /** - * @typedef TokenStreamItem - * @property {string} type - * @property {string | Array} content - * - * @typedef {Array} SimplifiedTokenStream - */ /** * Simplifies the token stream to ease the matching with the expected token stream. @@ -17,31 +23,20 @@ module.exports = { * * In arrays each value is transformed individually * * Values that are empty (empty arrays or strings only containing whitespace) * - * @param {Array} tokenStream + * @param {TokenStream} tokenStream * @returns {SimplifiedTokenStream} */ simplify: function simplify(tokenStream) { return tokenStream .map(innerSimple) - .filter((value, i, arr) => { - if (typeof value === "string" && !value.trim().length) { - // string contains only spaces - if (i > 0 && i < arr.length - 1 && value.split(/\r\n?|\n/g).length > 2) { - // in a valid token stream there are no adjacent strings, so we know that the previous - // element is a (simplified) token - arr[i - 1]['newline-after'] = true; - } - return false; - } - return true; - }); + .filter(value => !(typeof value === 'string' && isBlank(value))); /** * @param {string | TokenStreamItem} value * @returns {string | [string, string | Array]} */ function innerSimple(value) { - if (typeof value === "object") { + if (typeof value === 'object') { if (Array.isArray(value.content)) { return [value.type, simplify(value.content)]; } else { @@ -54,21 +49,205 @@ module.exports = { }, /** - * - * @param {Readonly} tokenStream - * @param {number} [indentationLevel] + * @param {TokenStream} tokenStream + * @returns {string} */ - prettyprint(tokenStream, indentationLevel = 1) { - const indentChar = ' '; + prettyprint(tokenStream) { + return printPrettyTokenStream(toPrettyTokenStream(tokenStream)); + } +}; + +/** + * This item indicates that one or multiple line breaks are present between the preceding and following items in the + * source token stream. + * + * Only if an item is enabled will it appear in the pretty-printed token stream. + */ +class LineBreakItem { + /** @param {number} sourceCount */ + constructor(sourceCount) { + this.sourceCount = sourceCount; + this.enabled = false; + } +} +/** + * This item indicates the the preceding and following items are to be printed on the same line in the pretty-printed + * token stream. + */ +class GlueItem { } - // can't use tabs because the console will convert one tab to four spaces - const indentation = new Array(indentationLevel + 1).join(indentChar); +/** + * @param {TokenStream} tokenStream + * @returns {PrettyTokenStream} + */ +function toPrettyTokenStream(tokenStream) { + /** @type {PrettyTokenStream} */ + const prettyStream = []; + for (const token of tokenStream) { + if (typeof token === 'string') { + if (isBlank(token)) { + // blank string + const lineBreaks = countLineBreaks(token); + if (lineBreaks > 0) { + prettyStream.push(new LineBreakItem(lineBreaks)); + } + } else { + // might start with line breaks + const startLineBreaks = countLineBreaks(/^\s*/.exec(token)[0]); + if (startLineBreaks > 0) { + prettyStream.push(new LineBreakItem(startLineBreaks)); + } + + prettyStream.push(token); + + const endLineBreaks = countLineBreaks(/\s*$/.exec(token)[0]); + if (endLineBreaks > 0) { + prettyStream.push(new LineBreakItem(endLineBreaks)); + } + } + } else { + prettyStream.push(innerSimple(token)); + } + } + /** + * @param {TokenStreamItem} value + * @returns {[string, string | Array]} + */ + function innerSimple(value) { + if (Array.isArray(value.content)) { + return [value.type, toPrettyTokenStream(value.content)]; + } else { + return [value.type, value.content]; + } + } + + prettyFormat(prettyStream); + return prettyStream; +} + +/** + * @param {PrettyTokenStream} prettyStream + * @returns {void} + */ +function prettyFormat(prettyStream) { + // The maximum number of (glued) tokens per line + const MAX_TOKEN_PER_LINE = 5; + // The maximum number of characters per line + // (this is based on an estimation. The actual output might be longer.) + const MAX_PRINT_WIDTH = 80; + + prettyTrimLineBreaks(prettyStream); + // enable all line breaks with >=2 breaks in the source token stream + prettyEnableLineBreaks(prettyStream, br => br.sourceCount >= 2); + + const ranges = prettySplit(prettyStream, br => br instanceof LineBreakItem && br.enabled); + for (const group of ranges) { + if (prettySomeLineBreak(group, true, br => br.enabled)) { + // Since we just split by enabled line break, only nested line breaks can be enabled. This usually + // indicates complex token streams, so let's just enable all line breaks and call it a day. + prettyEnableLineBreaks(group, () => true); + } else { + // try to optimize for the pattern /{1,MAX_TOKEN_PER_LINE}(\n{1,MAX_TOKEN_PER_LINE})*/ + const lines = prettySplit(group, i => i instanceof LineBreakItem); + + /** + * Returns whether lines can generally be glued together (no line breaks within lines and don't glue with + * nested tokens). + */ + function glueable() { + return lines.every(g => { + if (g.length > 1) { + if (prettyContainsNonTriviallyNested(g)) { + // the token with nested tokens might be glued together with other tokens and we can't allow + // that to happen + return false; + } else { + return true; + } + } else { + // we can safely ignore all tokens that are on their own line + return true; + } + }); + } + function tokensPerLine() { + return lines.map(g => prettyCountTokens(g, true)); + } + /** + * Returns an estimate for the output length each line will have + */ + function widthPerLine() { + return lines.map(g => { + if (g.length > 1) { + return g + .map(item => isToken(item) ? ", ".length + JSON.stringify(item).length : 0) + .reduce((a, b) => a + b, 0) - ", ".length; + } else { + // we don't really care about the print width of a single-token line + return 1; + } + }); + } + + const glueTokens = glueable() + // at most this many tokens per line + && Math.max(...tokensPerLine()) <= MAX_TOKEN_PER_LINE + // the output of each line can be at most this many characters long + && Math.max(...widthPerLine()) <= MAX_PRINT_WIDTH + // We need to have at least 2 lines in this group OR this group isn't the only group in the stream. + // This will prevent all tokens of a really short token stream to be glued together. + && (lines.length > 1 || ranges.length > 1); + + if (glueTokens) { + prettyGlueTogetherAll(prettyStream, group); + } else { + const flatTokenCount = prettyCountTokens(group, false); + const deepTokenCount = prettyCountTokens(group, true); + if ( + // prevent a one-token-per-line situation + flatTokenCount > lines.length && + // require at least 2 tokens per line on average + deepTokenCount >= lines.length * 2 + ) { + prettyEnableLineBreaks(group, () => true); + } + } + } + } +} - let out = ""; - out += "[\n" - tokenStream.forEach((item, i) => { - out += indentation; - let extraNewline = false; +/** + * @param {PrettyTokenStream} prettyStream + * @param {number} [indentationLevel] + * @returns {string} + */ +function printPrettyTokenStream(prettyStream, indentationLevel = 1) { + const indentChar = ' '; + + // can't use tabs because the console will convert one tab to four spaces + const indentation = new Array(indentationLevel + 1).join(indentChar); + + let out = ''; + out += '[\n'; + + let glued = false; + prettyStream.forEach((item, i) => { + if (item instanceof LineBreakItem) { + if (item.enabled) { + out += '\n'; + } + } else if (item instanceof GlueItem) { + out = out.trimEnd(); + if (out[out.length - 1] === ',') { + out += ' '; + } + glued = true; + } else { + if (glued) { + glued = false; + } else { + out += indentation; + } if (typeof item === 'string') { out += JSON.stringify(item); @@ -79,24 +258,218 @@ module.exports = { out += '[' + JSON.stringify(name) + ', '; if (typeof content === 'string') { + // simple string literal + out += JSON.stringify(content); + } else if (content.length === 1 && typeof content[0] === 'string') { + // token stream that only contains a single string literal out += JSON.stringify(content); } else { - out += this.prettyprint(content, indentationLevel + 1); + // token stream + out += printPrettyTokenStream(content, indentationLevel + 1); } out += ']'; - - extraNewline = !!item['newline-after']; } - const lineEnd = (i === tokenStream.length - 1) ? '\n' : ',\n'; + const lineEnd = (i === prettyStream.length - 1) ? '\n' : ',\n'; out += lineEnd; + } + }) + out += indentation.substr(indentChar.length) + ']' + return out; +} - if (extraNewline) { - out += '\n'; +/** + * Returns whether the given string is empty or contains only whitespace characters. + * + * @param {string} str + * @returns {boolean} + */ +function isBlank(str) { + return /^\s*$/.test(str); +} + +/** + * @param {string} str + * @returns {number} + */ +function countLineBreaks(str) { + return str.split(/\r\n?|\n/g).length - 1; +} + +/** + * Trim all line breaks at the start and at the end of the pretty stream. + * + * @param {PrettyTokenStream} prettyStream + * @returns {void} + */ +function prettyTrimLineBreaks(prettyStream) { + let value; + while ((value = prettyStream[0])) { + if (value instanceof LineBreakItem) { + prettyStream.shift(); + } else { + break; + } + } + while ((value = prettyStream[prettyStream.length - 1])) { + if (value instanceof LineBreakItem) { + prettyStream.pop(); + } else { + break; + } + } +} + +/** + * Enables all line breaks in the pretty token stream (but not in nested token stream) that contain at least some + * number of line breaks in the source token stream. + * + * @param {PrettyTokenStream} prettyStream + * @param {(item: LineBreakItem) => boolean} cond + */ +function prettyEnableLineBreaks(prettyStream, cond) { + prettyStream.forEach(token => { + if (token instanceof LineBreakItem && cond(token)) { + token.enabled = true; + } + }); +} + +/** + * Splits the given pretty stream on all items for which `cond` return `true`. The items for which `cond` returns + * `true` will not be part of any of the created streams. No empty streams will be returned. + * + * @param {PrettyTokenStream} prettyStream + * @param {(item: PrettyTokenStreamItem) => boolean} cond + * @returns {PrettyTokenStream[]} + */ +function prettySplit(prettyStream, cond) { + /** @type {PrettyTokenStream[]} */ + const result = []; + /** @type {PrettyTokenStream} */ + let current = []; + for (const item of prettyStream) { + if (cond(item)) { + if (current.length > 0) { + result.push(current); + current = []; } - }) - out += indentation.substr(indentChar.length) + ']' - return out; + } else { + current.push(item); + } } -}; + if (current.length > 0) { + result.push(current); + current = []; + } + return result; +} + +/** + * @param {PrettyTokenStream} prettyStream + * @param {boolean} recursive + * @param {(item: LineBreakItem) => boolean} cond + * @returns {boolean} + */ +function prettySomeLineBreak(prettyStream, recursive, cond) { + for (const item of prettyStream) { + if (item instanceof LineBreakItem && cond(item)) { + return true; + } else if (recursive && isNested(item) && prettySomeLineBreak(item[1], true, cond)) { + return true; + } + } + return false; +} +/** + * @param {PrettyTokenStream} prettyStream + * @returns {boolean} + */ +function prettyContainsNonTriviallyNested(prettyStream) { + for (const item of prettyStream) { + if (isNested(item) && !isTriviallyNested(item)) { + return true; + } + } + return false; +} +/** + * @param {PrettyTokenStream} prettyStream + * @param {boolean} recursive + * @returns {number} + */ +function prettyCountTokens(prettyStream, recursive) { + let count = 0; + for (const item of prettyStream) { + if (isToken(item)) { + count++; + if (recursive && isNested(item) && !isTriviallyNested(item)) { + count += prettyCountTokens(item[1], true); + } + } + } + return count; +} + +/** + * Adds glue between the given tokens in the given stream. + * + * @param {PrettyTokenStream} prettyStream + * @param {string | [string, string | any[]]} prev + * @param {string | [string, string | any[]]} next + */ +function prettyGlueTogether(prettyStream, prev, next) { + // strings may appear more than once in the stream, so we have to search for tokens. + if (typeof prev !== "string") { + let index = prettyStream.indexOf(prev); + if (index === -1 || prettyStream[index + 1] !== next) { + throw new Error('Cannot glue: At least one of the tokens is not part of the given token stream.'); + } + prettyStream.splice(index + 1, 0, new GlueItem()); + } else { + let index = prettyStream.indexOf(next); + if (index === -1 || prettyStream[index - 1] !== prev) { + throw new Error('Cannot glue: At least one of the tokens is not part of the given token stream.'); + } + prettyStream.splice(index, 0, new GlueItem()); + } +} +/** + * Glues together all token in the given slice of the given token stream. + * + * @param {PrettyTokenStream} prettyStream + * @param {PrettyTokenStream} slice + */ +function prettyGlueTogetherAll(prettyStream, slice) { + for (let i = 1, l = slice.length; i < l; i++) { + const prev = slice[i - 1]; + const next = slice[i]; + if (isToken(prev) && isToken(next)) { + prettyGlueTogether(prettyStream, prev, next); + } + } +} + +/** + * @param {PrettyTokenStreamItem} item + * @returns {item is (string | [string, string | any[]])} + */ +function isToken(item) { + return typeof item === 'string' || Array.isArray(item); +} + +/** + * @param {PrettyTokenStreamItem} item + * @returns {item is [string, any[]]} + */ +function isNested(item) { + return Array.isArray(item) && Array.isArray(item[1]); +} +/** + * @param {PrettyTokenStreamItem} item + * @returns {item is [string, [string]]} + */ +function isTriviallyNested(item) { + return isNested(item) && item[1].length === 1 && typeof item[1][0] === 'string'; +} diff --git a/tests/identifier-test.js b/tests/identifier-test.js index 9c90fc5e8d..860375457e 100644 --- a/tests/identifier-test.js +++ b/tests/identifier-test.js @@ -186,7 +186,7 @@ function testLiterals(Prism, lang) { assert.fail( `${name}: Failed to tokenize the ${identifierType} '${ident}' as one or no token.\n` + 'Actual token stream:\n\n' + - TokenStreamTransformer.prettyprint(TokenStreamTransformer.simplify(tokens)) + + TokenStreamTransformer.prettyprint(tokens) + '\n\n' + 'How to fix this:\n' + 'If your language failed any of the identifier tests then some patterns in your language can break identifiers. ' + From deb238a68a2aa3acde45235339fb9c251286bda7 Mon Sep 17 00:00:00 2001 From: Adam Kudrna Date: Mon, 23 Nov 2020 21:07:44 +0100 Subject: [PATCH 0668/1100] SCSS: Added support for Sass modules (#2643) --- components/prism-scss.js | 6 +++++- components/prism-scss.min.js | 2 +- tests/languages/scss/keyword_feature.test | 4 ++-- .../languages/scss/module-modifier_feature.test | 17 +++++++++++++++++ 4 files changed, 25 insertions(+), 4 deletions(-) create mode 100644 tests/languages/scss/module-modifier_feature.test diff --git a/components/prism-scss.js b/components/prism-scss.js index a92baa90e2..a3ed7475d6 100644 --- a/components/prism-scss.js +++ b/components/prism-scss.js @@ -41,7 +41,7 @@ Prism.languages.scss = Prism.languages.extend('css', { Prism.languages.insertBefore('scss', 'atrule', { 'keyword': [ - /@(?:if|else(?: if)?|for|each|while|import|extend|debug|warn|mixin|include|function|return|content)/i, + /@(?:if|else(?: if)?|forward|for|each|while|import|use|extend|debug|warn|mixin|include|function|return|content)\b/i, { pattern: /( +)(?:from|through)(?= )/, lookbehind: true @@ -55,6 +55,10 @@ Prism.languages.insertBefore('scss', 'important', { }); Prism.languages.insertBefore('scss', 'function', { + 'module-modifier': { + pattern: /\b(?:as|with|show|hide)\b/i, + alias: 'keyword' + }, 'placeholder': { pattern: /%[-\w]+/, alias: 'selector' diff --git a/components/prism-scss.min.js b/components/prism-scss.min.js index 0e106784b4..7f54c3b1d0 100644 --- a/components/prism-scss.min.js +++ b/components/prism-scss.min.js @@ -1 +1 @@ -Prism.languages.scss=Prism.languages.extend("css",{comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0},atrule:{pattern:/@[\w-]+(?:\([^()]+\)|[^(])*?(?=\s+[{;])/,inside:{rule:/@[\w-]+/}},url:/(?:[-a-z]+-)?url(?=\()/i,selector:{pattern:/(?=\S)[^@;{}()]?(?:[^@;{}()]|#\{\$[-\w]+\})+(?=\s*\{(?:\}|\s|[^}]+[:{][^}]+))/m,inside:{parent:{pattern:/&/,alias:"important"},placeholder:/%[-\w]+/,variable:/\$[-\w]+|#\{\$[-\w]+\}/}},property:{pattern:/(?:[-\w]|\$[-\w]|#\{\$[-\w]+\})+(?=\s*:)/,inside:{variable:/\$[-\w]+|#\{\$[-\w]+\}/}}}),Prism.languages.insertBefore("scss","atrule",{keyword:[/@(?:if|else(?: if)?|for|each|while|import|extend|debug|warn|mixin|include|function|return|content)/i,{pattern:/( +)(?:from|through)(?= )/,lookbehind:!0}]}),Prism.languages.insertBefore("scss","important",{variable:/\$[-\w]+|#\{\$[-\w]+\}/}),Prism.languages.insertBefore("scss","function",{placeholder:{pattern:/%[-\w]+/,alias:"selector"},statement:{pattern:/\B!(?:default|optional)\b/i,alias:"keyword"},boolean:/\b(?:true|false)\b/,null:{pattern:/\bnull\b/,alias:"keyword"},operator:{pattern:/(\s)(?:[-+*\/%]|[=!]=|<=?|>=?|and|or|not)(?=\s)/,lookbehind:!0}}),Prism.languages.scss.atrule.inside.rest=Prism.languages.scss; \ No newline at end of file +Prism.languages.scss=Prism.languages.extend("css",{comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0},atrule:{pattern:/@[\w-]+(?:\([^()]+\)|[^(])*?(?=\s+[{;])/,inside:{rule:/@[\w-]+/}},url:/(?:[-a-z]+-)?url(?=\()/i,selector:{pattern:/(?=\S)[^@;{}()]?(?:[^@;{}()]|#\{\$[-\w]+\})+(?=\s*\{(?:\}|\s|[^}]+[:{][^}]+))/m,inside:{parent:{pattern:/&/,alias:"important"},placeholder:/%[-\w]+/,variable:/\$[-\w]+|#\{\$[-\w]+\}/}},property:{pattern:/(?:[-\w]|\$[-\w]|#\{\$[-\w]+\})+(?=\s*:)/,inside:{variable:/\$[-\w]+|#\{\$[-\w]+\}/}}}),Prism.languages.insertBefore("scss","atrule",{keyword:[/@(?:if|else(?: if)?|forward|for|each|while|import|use|extend|debug|warn|mixin|include|function|return|content)\b/i,{pattern:/( +)(?:from|through)(?= )/,lookbehind:!0}]}),Prism.languages.insertBefore("scss","important",{variable:/\$[-\w]+|#\{\$[-\w]+\}/}),Prism.languages.insertBefore("scss","function",{"module-modifier":{pattern:/\b(?:as|with|show|hide)\b/i,alias:"keyword"},placeholder:{pattern:/%[-\w]+/,alias:"selector"},statement:{pattern:/\B!(?:default|optional)\b/i,alias:"keyword"},boolean:/\b(?:true|false)\b/,null:{pattern:/\bnull\b/,alias:"keyword"},operator:{pattern:/(\s)(?:[-+*\/%]|[=!]=|<=?|>=?|and|or|not)(?=\s)/,lookbehind:!0}}),Prism.languages.scss.atrule.inside.rest=Prism.languages.scss; \ No newline at end of file diff --git a/tests/languages/scss/keyword_feature.test b/tests/languages/scss/keyword_feature.test index 90ca11d519..be6eadd81e 100644 --- a/tests/languages/scss/keyword_feature.test +++ b/tests/languages/scss/keyword_feature.test @@ -1,6 +1,6 @@ @if @else if @else @for @each @while -@import @extend +@import @extend @use @forward @debug @warn @mixin @include @function @return @content @@ -12,7 +12,7 @@ [ ["keyword", "@if"], ["keyword", "@else if"], ["keyword", "@else"], ["keyword", "@for"], ["keyword", "@each"], ["keyword", "@while"], - ["keyword", "@import"], ["keyword", "@extend"], + ["keyword", "@import"], ["keyword", "@extend"], ["keyword", "@use"], ["keyword", "@forward"], ["keyword", "@debug"], ["keyword", "@warn"], ["keyword", "@mixin"], ["keyword", "@include"], ["keyword", "@function"], ["keyword", "@return"], ["keyword", "@content"], diff --git a/tests/languages/scss/module-modifier_feature.test b/tests/languages/scss/module-modifier_feature.test new file mode 100644 index 0000000000..1aa8615380 --- /dev/null +++ b/tests/languages/scss/module-modifier_feature.test @@ -0,0 +1,17 @@ +@use "foo" as bar; +@use "foo" with ($color: blue); +@forward "foo" show bar; +@forward "foo" hide baz; + +---------------------------------------------------- + +[ + ["keyword", "@use"], ["string", "\"foo\""], ["module-modifier", "as"], " bar", ["punctuation", ";"], + ["keyword", "@use"], ["string", "\"foo\""], ["module-modifier", "with"], ["punctuation", "("], ["property", [["variable", "$color"]]], ["punctuation", ":"], " blue", ["punctuation", ")"], ["punctuation", ";"], + ["keyword", "@forward"], ["string", "\"foo\""], ["module-modifier", "show"], " bar", ["punctuation", ";"], + ["keyword", "@forward"], ["string", "\"foo\""], ["module-modifier", "hide"], " baz", ["punctuation", ";"] +] + +---------------------------------------------------- + +Checks for Sass module modifiers From 3f4ae00dc04e5ff84ed3d73bc59af74699862982 Mon Sep 17 00:00:00 2001 From: dreammaster82 Date: Tue, 24 Nov 2020 19:41:10 +0300 Subject: [PATCH 0669/1100] File Highlight: Fixed IE compatibility problem (#2656) The File Highlight plugin used the `Element#matches` which isn't supported by IE11, so a small polyfill was added. --- plugins/file-highlight/prism-file-highlight.js | 5 +++++ plugins/file-highlight/prism-file-highlight.min.js | 2 +- prism.js | 5 +++++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/plugins/file-highlight/prism-file-highlight.js b/plugins/file-highlight/prism-file-highlight.js index 93db3acb2b..60ca500a72 100644 --- a/plugins/file-highlight/prism-file-highlight.js +++ b/plugins/file-highlight/prism-file-highlight.js @@ -3,6 +3,11 @@ return; } + // https://developer.mozilla.org/en-US/docs/Web/API/Element/matches#Polyfill + if (!Element.prototype.matches) { + Element.prototype.matches = Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector; + } + var Prism = window.Prism; var LOADING_MESSAGE = 'Loading…'; diff --git a/plugins/file-highlight/prism-file-highlight.min.js b/plugins/file-highlight/prism-file-highlight.min.js index 843072dff8..d33e2de1e2 100644 --- a/plugins/file-highlight/prism-file-highlight.min.js +++ b/plugins/file-highlight/prism-file-highlight.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof self&&self.Prism&&self.document){var o=window.Prism,h={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},g="data-src-status",u="loading",c="loaded",d="pre[data-src]:not(["+g+'="'+c+'"]):not(['+g+'="'+u+'"])',n=/\blang(?:uage)?-([\w-]+)\b/i;o.hooks.add("before-highlightall",function(e){e.selector+=", "+d}),o.hooks.add("before-sanity-check",function(e){var t=e.element;if(t.matches(d)){e.code="",t.setAttribute(g,u);var i=t.appendChild(document.createElement("CODE"));i.textContent="Loading…";var n=t.getAttribute("data-src"),a=e.language;if("none"===a){var s=(/\.(\w+)$/.exec(n)||[,"none"])[1];a=h[s]||s}f(i,a),f(t,a);var l=o.plugins.autoloader;l&&l.loadLanguages(a);var r=new XMLHttpRequest;r.open("GET",n,!0),r.onreadystatechange=function(){4==r.readyState&&(r.status<400&&r.responseText?(t.setAttribute(g,c),i.textContent=r.responseText,o.highlightElement(i)):(t.setAttribute(g,"failed"),400<=r.status?i.textContent=function(e,t){return"✖ Error "+e+" while fetching file: "+t}(r.status,r.statusText):i.textContent="✖ Error: File does not exist or is empty"))},r.send(null)}});var e=!(o.plugins.fileHighlight={highlight:function(e){for(var t,i=(e||document).querySelectorAll(d),n=0;t=i[n++];)o.highlightElement(t)}});o.fileHighlight=function(){e||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),e=!0),o.plugins.fileHighlight.highlight.apply(this,arguments)}}function f(e,t){var i=e.className;i=i.replace(n," ")+" language-"+t,e.className=i.replace(/\s+/g," ").trim()}}(); \ No newline at end of file +!function(){if("undefined"!=typeof self&&self.Prism&&self.document){Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var r=window.Prism,h={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},g="data-src-status",c="loading",u="loaded",p="pre[data-src]:not(["+g+'="'+u+'"]):not(['+g+'="'+c+'"])',i=/\blang(?:uage)?-([\w-]+)\b/i;r.hooks.add("before-highlightall",function(e){e.selector+=", "+p}),r.hooks.add("before-sanity-check",function(e){var t=e.element;if(t.matches(p)){e.code="",t.setAttribute(g,c);var n=t.appendChild(document.createElement("CODE"));n.textContent="Loading…";var i=t.getAttribute("data-src"),a=e.language;if("none"===a){var s=(/\.(\w+)$/.exec(i)||[,"none"])[1];a=h[s]||s}d(n,a),d(t,a);var l=r.plugins.autoloader;l&&l.loadLanguages(a);var o=new XMLHttpRequest;o.open("GET",i,!0),o.onreadystatechange=function(){4==o.readyState&&(o.status<400&&o.responseText?(t.setAttribute(g,u),n.textContent=o.responseText,r.highlightElement(n)):(t.setAttribute(g,"failed"),400<=o.status?n.textContent=function(e,t){return"✖ Error "+e+" while fetching file: "+t}(o.status,o.statusText):n.textContent="✖ Error: File does not exist or is empty"))},o.send(null)}});var e=!(r.plugins.fileHighlight={highlight:function(e){for(var t,n=(e||document).querySelectorAll(p),i=0;t=n[i++];)r.highlightElement(t)}});r.fileHighlight=function(){e||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),e=!0),r.plugins.fileHighlight.highlight.apply(this,arguments)}}function d(e,t){var n=e.className;n=n.replace(i," ")+" language-"+t,e.className=n.replace(/\s+/g," ").trim()}}(); \ No newline at end of file diff --git a/prism.js b/prism.js index 487be2bf8b..c25249c8e8 100644 --- a/prism.js +++ b/prism.js @@ -1566,6 +1566,11 @@ Prism.languages.js = Prism.languages.javascript; return; } + // https://developer.mozilla.org/en-US/docs/Web/API/Element/matches#Polyfill + if (!Element.prototype.matches) { + Element.prototype.matches = Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector; + } + var Prism = window.Prism; var LOADING_MESSAGE = 'Loading…'; From 8fa8dd24d58fce36f5cf61b5506a02ff914d95a5 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Wed, 25 Nov 2020 22:59:40 +0100 Subject: [PATCH 0670/1100] Core: Fixed bug with greedy matching (#2632) --- components/prism-core.js | 2 +- components/prism-core.min.js | 2 +- docs/prism-core.js.html | 2 +- prism.js | 2 +- tests/core/greedy.js | 21 +++++++++++++++++++++ 5 files changed, 25 insertions(+), 4 deletions(-) diff --git a/components/prism-core.js b/components/prism-core.js index 9f82910a8f..8b8343b485 100644 --- a/components/prism-core.js +++ b/components/prism-core.js @@ -890,7 +890,7 @@ function matchGrammar(text, tokenList, grammar, startNode, startPos, rematch) { var removeCount = 1; // this is the to parameter of removeBetween - if (greedy && currentNode != tokenList.tail.prev) { + if (greedy) { pattern.lastIndex = pos; var match = pattern.exec(text); if (!match) { diff --git a/components/prism-core.min.js b/components/prism-core.min.js index 267167ed8b..1589f00289 100644 --- a/components/prism-core.min.js +++ b/components/prism-core.min.js @@ -1 +1 @@ -var _self="undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{},Prism=function(u){var c=/\blang(?:uage)?-([\w-]+)\b/i,n=0,M={manual:u.Prism&&u.Prism.manual,disableWorkerMessageHandler:u.Prism&&u.Prism.disableWorkerMessageHandler,util:{encode:function e(n){return n instanceof W?new W(n.type,e(n.content),n.alias):Array.isArray(n)?n.map(e):n.replace(/&/g,"&").replace(/=l.reach);k+=y.value.length,y=y.next){var b=y.value;if(t.length>n.length)return;if(!(b instanceof W)){var x=1;if(h&&y!=t.tail.prev){m.lastIndex=k;var w=m.exec(n);if(!w)break;var A=w.index+(f&&w[1]?w[1].length:0),P=w.index+w[0].length,S=k;for(S+=y.value.length;S<=A;)y=y.next,S+=y.value.length;if(S-=y.value.length,k=S,y.value instanceof W)continue;for(var E=y;E!==t.tail&&(Sl.reach&&(l.reach=j);var C=y.prev;L&&(C=I(t,C,L),k+=L.length),z(t,C,x);var _=new W(o,g?M.tokenize(O,g):O,v,O);y=I(t,C,_),N&&I(t,y,N),1"+a.content+""},!u.document)return u.addEventListener&&(M.disableWorkerMessageHandler||u.addEventListener("message",function(e){var n=JSON.parse(e.data),t=n.language,r=n.code,a=n.immediateClose;u.postMessage(M.highlight(r,M.languages[t],t)),a&&u.close()},!1)),M;var e=M.util.currentScript();function t(){M.manual||M.highlightAll()}if(e&&(M.filename=e.src,e.hasAttribute("data-manual")&&(M.manual=!0)),!M.manual){var r=document.readyState;"loading"===r||"interactive"===r&&e&&e.defer?document.addEventListener("DOMContentLoaded",t):window.requestAnimationFrame?window.requestAnimationFrame(t):window.setTimeout(t,16)}return M}(_self);"undefined"!=typeof module&&module.exports&&(module.exports=Prism),"undefined"!=typeof global&&(global.Prism=Prism); \ No newline at end of file +var _self="undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{},Prism=function(u){var c=/\blang(?:uage)?-([\w-]+)\b/i,n=0,M={manual:u.Prism&&u.Prism.manual,disableWorkerMessageHandler:u.Prism&&u.Prism.disableWorkerMessageHandler,util:{encode:function e(n){return n instanceof W?new W(n.type,e(n.content),n.alias):Array.isArray(n)?n.map(e):n.replace(/&/g,"&").replace(/=l.reach);k+=y.value.length,y=y.next){var b=y.value;if(t.length>n.length)return;if(!(b instanceof W)){var x=1;if(h){m.lastIndex=k;var w=m.exec(n);if(!w)break;var A=w.index+(f&&w[1]?w[1].length:0),P=w.index+w[0].length,S=k;for(S+=y.value.length;S<=A;)y=y.next,S+=y.value.length;if(S-=y.value.length,k=S,y.value instanceof W)continue;for(var E=y;E!==t.tail&&(Sl.reach&&(l.reach=j);var C=y.prev;L&&(C=I(t,C,L),k+=L.length),z(t,C,x);var _=new W(o,g?M.tokenize(O,g):O,v,O);y=I(t,C,_),N&&I(t,y,N),1"+a.content+""},!u.document)return u.addEventListener&&(M.disableWorkerMessageHandler||u.addEventListener("message",function(e){var n=JSON.parse(e.data),t=n.language,r=n.code,a=n.immediateClose;u.postMessage(M.highlight(r,M.languages[t],t)),a&&u.close()},!1)),M;var e=M.util.currentScript();function t(){M.manual||M.highlightAll()}if(e&&(M.filename=e.src,e.hasAttribute("data-manual")&&(M.manual=!0)),!M.manual){var r=document.readyState;"loading"===r||"interactive"===r&&e&&e.defer?document.addEventListener("DOMContentLoaded",t):window.requestAnimationFrame?window.requestAnimationFrame(t):window.setTimeout(t,16)}return M}(_self);"undefined"!=typeof module&&module.exports&&(module.exports=Prism),"undefined"!=typeof global&&(global.Prism=Prism); \ No newline at end of file diff --git a/docs/prism-core.js.html b/docs/prism-core.js.html index fed9633629..f8a5edcd1e 100644 --- a/docs/prism-core.js.html +++ b/docs/prism-core.js.html @@ -943,7 +943,7 @@

            prism-core.js

            var removeCount = 1; // this is the to parameter of removeBetween - if (greedy && currentNode != tokenList.tail.prev) { + if (greedy) { pattern.lastIndex = pos; var match = pattern.exec(text); if (!match) { diff --git a/prism.js b/prism.js index c25249c8e8..02af74b4c8 100644 --- a/prism.js +++ b/prism.js @@ -895,7 +895,7 @@ function matchGrammar(text, tokenList, grammar, startNode, startPos, rematch) { var removeCount = 1; // this is the to parameter of removeBetween - if (greedy && currentNode != tokenList.tail.prev) { + if (greedy) { pattern.lastIndex = pos; var match = pattern.exec(text); if (!match) { diff --git a/tests/core/greedy.js b/tests/core/greedy.js index f21f87d1e3..d7fc9fbcc7 100644 --- a/tests/core/greedy.js +++ b/tests/core/greedy.js @@ -84,4 +84,25 @@ describe('Greedy matching', function () { ] }); }); + + it('should always match tokens against the whole text', function () { + // this is to test for a bug where greedy tokens where matched like non-greedy ones if the token stream ended on + // a string + testTokens({ + grammar: { + 'a': /a/, + 'b': { + pattern: /^b/, + greedy: true + } + }, + code: 'bab', + expected: [ + ["b", "b"], + ["a", "a"], + "b" + ] + }); + }); + }); From 5cf9cfbc41b17abec89b58e7d2d9e9f91a5250d6 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Wed, 25 Nov 2020 23:53:33 +0100 Subject: [PATCH 0671/1100] Markdown: Added support for YAML front matter (#2634) --- components.js | 2 +- components.json | 1 + components/prism-markdown.js | 13 ++++++++ components/prism-markdown.min.js | 2 +- .../front-matter-block_empty_feature.test | 28 +++++++++++++++++ .../markdown/front-matter-block_feature.test | 31 +++++++++++++++++++ .../yaml+markdown/front-matter_feature.test | 24 ++++++++++++++ 7 files changed, 99 insertions(+), 2 deletions(-) create mode 100644 tests/languages/markdown/front-matter-block_empty_feature.test create mode 100644 tests/languages/markdown/front-matter-block_feature.test create mode 100644 tests/languages/yaml+markdown/front-matter_feature.test diff --git a/components.js b/components.js index 91e666f1ec..e2bf26ba5a 100644 --- a/components.js +++ b/components.js @@ -1,2 +1,2 @@ -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml","ssml","atom","rss"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","ssml":"SSML","atom":"Atom","rss":"RSS"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","optional":"regex","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"ABNF","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"agda":{"title":"Agda","owner":"xy-ren"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apex":{"title":"Apex","require":["clike","sql"],"owner":"RunDevelopment"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"dkern"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"birb":{"title":"Birb","require":"clike","owner":"Calamity210"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"BNF","alias":"rbnf","aliasTitles":{"rbnf":"RBNF"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"bsl":{"title":"BSL (1C:Enterprise)","alias":"oscript","aliasTitles":{"oscript":"OneScript"},"owner":"Diversus23"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"clojure":{"title":"Clojure","owner":"troglotit"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"cypher":{"title":"Cypher","owner":"RunDevelopment"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dax":{"title":"DAX","owner":"peterbud"},"dhall":{"title":"Dhall","owner":"RunDevelopment"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"EBNF","owner":"RunDevelopment"},"editorconfig":{"title":"EditorConfig","owner":"osipxd"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"c","owner":"Golmote"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","optional":["markdown"],"owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"hlsl":{"title":"HLSL","require":"c","owner":"RunDevelopment"},"http":{"title":"HTTP","optional":["css","javascript","json","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"ignore":{"title":".ignore","owner":"osipxd","alias":["gitignore","hgignore","npmignore"],"aliasTitles":{"gitignore":".gitignore","hgignore":".hgignore","npmignore":".npmignore"}},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike","typescript"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","alias":"webmanifest","aliasTitles":{"webmanifest":"Web App Manifest"},"owner":"CupOfTea696"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"jsstacktrace":{"title":"JS stack trace","owner":"sbrl"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","alias":["kt","kts"],"aliasTitles":{"kts":"Kotlin Script"},"require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"mongodb":{"title":"MongoDB","owner":"airs0urce","require":"javascript"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"naniscript":{"title":"Naninovel Script","owner":"Elringus","alias":"nani"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":"markup-templating","owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"promql":{"title":"PromQL","owner":"arendjr"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"purebasic":{"title":"PureBasic","require":"clike","alias":"pbfasm","owner":"HeX0R101"},"purescript":{"title":"PureScript","require":"haskell","alias":"purs","owner":"sriharshachilakapati"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"racket":{"title":"Racket","require":"scheme","alias":"rkt","owner":"RunDevelopment"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","owner":"RunDevelopment"},"renpy":{"title":"Ren'py","alias":"rpy","owner":"HyuchiaDiego"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","alias":["sh-session","shellsession"],"owner":"RunDevelopment"},"smali":{"title":"Smali","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sml":{"title":"SML","alias":"smlnj","aliasTitles":{"smlnj":"SML/NJ"},"owner":"RunDevelopment"},"solidity":{"title":"Solidity (Ethereum)","alias":"sol","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"stan":{"title":"Stan","owner":"RunDevelopment"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","vbnet"],"owner":"RunDevelopment"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"typoscript":{"title":"TypoScript","alias":"tsconfig","aliasTitles":{"tsconfig":"TSConfig"},"owner":"dkern"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","optional":"regex","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":["vb","vba"],"aliasTitles":{"vba":"VBA"},"owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xml-doc":{"title":"XML doc (.net)","require":"markup","modify":["csharp","fsharp","vbnet"],"owner":"RunDevelopment"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"yang":{"title":"YANG","owner":"RunDevelopment"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml","ssml","atom","rss"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","ssml":"SSML","atom":"Atom","rss":"RSS"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","optional":"regex","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"ABNF","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"agda":{"title":"Agda","owner":"xy-ren"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apex":{"title":"Apex","require":["clike","sql"],"owner":"RunDevelopment"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"dkern"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"birb":{"title":"Birb","require":"clike","owner":"Calamity210"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"BNF","alias":"rbnf","aliasTitles":{"rbnf":"RBNF"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"bsl":{"title":"BSL (1C:Enterprise)","alias":"oscript","aliasTitles":{"oscript":"OneScript"},"owner":"Diversus23"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"clojure":{"title":"Clojure","owner":"troglotit"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"cypher":{"title":"Cypher","owner":"RunDevelopment"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dax":{"title":"DAX","owner":"peterbud"},"dhall":{"title":"Dhall","owner":"RunDevelopment"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"EBNF","owner":"RunDevelopment"},"editorconfig":{"title":"EditorConfig","owner":"osipxd"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"c","owner":"Golmote"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","optional":["markdown"],"owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"hlsl":{"title":"HLSL","require":"c","owner":"RunDevelopment"},"http":{"title":"HTTP","optional":["css","javascript","json","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"ignore":{"title":".ignore","owner":"osipxd","alias":["gitignore","hgignore","npmignore"],"aliasTitles":{"gitignore":".gitignore","hgignore":".hgignore","npmignore":".npmignore"}},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike","typescript"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","alias":"webmanifest","aliasTitles":{"webmanifest":"Web App Manifest"},"owner":"CupOfTea696"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"jsstacktrace":{"title":"JS stack trace","owner":"sbrl"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","alias":["kt","kts"],"aliasTitles":{"kts":"Kotlin Script"},"require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","optional":"yaml","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"mongodb":{"title":"MongoDB","owner":"airs0urce","require":"javascript"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"naniscript":{"title":"Naninovel Script","owner":"Elringus","alias":"nani"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":"markup-templating","owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"promql":{"title":"PromQL","owner":"arendjr"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"purebasic":{"title":"PureBasic","require":"clike","alias":"pbfasm","owner":"HeX0R101"},"purescript":{"title":"PureScript","require":"haskell","alias":"purs","owner":"sriharshachilakapati"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"racket":{"title":"Racket","require":"scheme","alias":"rkt","owner":"RunDevelopment"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","owner":"RunDevelopment"},"renpy":{"title":"Ren'py","alias":"rpy","owner":"HyuchiaDiego"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","alias":["sh-session","shellsession"],"owner":"RunDevelopment"},"smali":{"title":"Smali","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sml":{"title":"SML","alias":"smlnj","aliasTitles":{"smlnj":"SML/NJ"},"owner":"RunDevelopment"},"solidity":{"title":"Solidity (Ethereum)","alias":"sol","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"stan":{"title":"Stan","owner":"RunDevelopment"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","vbnet"],"owner":"RunDevelopment"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"typoscript":{"title":"TypoScript","alias":"tsconfig","aliasTitles":{"tsconfig":"TSConfig"},"owner":"dkern"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","optional":"regex","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":["vb","vba"],"aliasTitles":{"vba":"VBA"},"owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xml-doc":{"title":"XML doc (.net)","require":"markup","modify":["csharp","fsharp","vbnet"],"owner":"RunDevelopment"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"yang":{"title":"YANG","owner":"RunDevelopment"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; if (typeof module !== 'undefined' && module.exports) { module.exports = components; } \ No newline at end of file diff --git a/components.json b/components.json index bce84a78fc..38de558b7a 100644 --- a/components.json +++ b/components.json @@ -703,6 +703,7 @@ "markdown": { "title": "Markdown", "require": "markup", + "optional": "yaml", "alias": "md", "owner": "Golmote" }, diff --git a/components/prism-markdown.js b/components/prism-markdown.js index 75bc6deacf..c7e48ebe2d 100644 --- a/components/prism-markdown.js +++ b/components/prism-markdown.js @@ -26,6 +26,19 @@ Prism.languages.markdown = Prism.languages.extend('markup', {}); Prism.languages.insertBefore('markdown', 'prolog', { + 'front-matter-block': { + pattern: /(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/, + lookbehind: true, + greedy: true, + inside: { + 'punctuation': /^---|---$/, + 'font-matter': { + pattern: /\S+(?:\s+\S+)*/, + alias: ['yaml', 'language-yaml'], + inside: Prism.languages.yaml + } + } + }, 'blockquote': { // > ... pattern: /^>(?:[\t ]*>)*/m, diff --git a/components/prism-markdown.min.js b/components/prism-markdown.min.js index f4a6da225f..8637ab1ff7 100644 --- a/components/prism-markdown.min.js +++ b/components/prism-markdown.min.js @@ -1 +1 @@ -!function(d){function n(n){return n=n.replace(//g,function(){return"(?:\\\\.|[^\\\\\n\r]|(?:\n|\r\n?)(?!\n|\r\n?))"}),RegExp("((?:^|[^\\\\])(?:\\\\{2})*)(?:"+n+")")}var e="(?:\\\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\\\|\r\n`])+",t="\\|?__(?:\\|__)+\\|?(?:(?:\n|\r\n?)|$)".replace(/__/g,function(){return e}),a="\\|?[ \t]*:?-{3,}:?[ \t]*(?:\\|[ \t]*:?-{3,}:?[ \t]*)+\\|?(?:\n|\r\n?)";d.languages.markdown=d.languages.extend("markup",{}),d.languages.insertBefore("markdown","prolog",{blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+t+a+"(?:"+t+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+t+a+")(?:"+t+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(e),inside:d.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+t+")"+a+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+t+"$"),inside:{"table-header":{pattern:RegExp(e),alias:"important",inside:d.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/``.+?``|`[^`\r\n]+`/,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#+.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n("\\b__(?:(?!_)|_(?:(?!_))+_)+__\\b|\\*\\*(?:(?!\\*)|\\*(?:(?!\\*))+\\*)+\\*\\*"),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n("\\b_(?:(?!_)|__(?:(?!_))+__)+_\\b|\\*(?:(?!\\*)|\\*\\*(?:(?!\\*))+\\*\\*)+\\*"),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n("(~~?)(?:(?!~))+?\\2"),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},url:{pattern:n('!?\\[(?:(?!\\]))+\\](?:\\([^\\s)]+(?:[\t ]+"(?:\\\\.|[^"\\\\])*")?\\)| ?\\[(?:(?!\\]))+\\])'),lookbehind:!0,greedy:!0,inside:{variable:{pattern:/(\[)[^\]]+(?=\]$)/,lookbehind:!0},content:{pattern:/(^!?\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},string:{pattern:/"(?:\\.|[^"\\])*"(?=\)$)/}}}}),["url","bold","italic","strike"].forEach(function(e){["url","bold","italic","strike"].forEach(function(n){e!==n&&(d.languages.markdown[e].inside.content.inside[n]=d.languages.markdown[n])})}),d.hooks.add("after-tokenize",function(n){"markdown"!==n.language&&"md"!==n.language||!function n(e){if(e&&"string"!=typeof e)for(var t=0,a=e.length;t/g,function(){return"(?:\\\\.|[^\\\\\n\r]|(?:\n|\r\n?)(?!\n|\r\n?))"}),RegExp("((?:^|[^\\\\])(?:\\\\{2})*)(?:"+n+")")}var e="(?:\\\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\\\|\r\n`])+",t="\\|?__(?:\\|__)+\\|?(?:(?:\n|\r\n?)|$)".replace(/__/g,function(){return e}),a="\\|?[ \t]*:?-{3,}:?[ \t]*(?:\\|[ \t]*:?-{3,}:?[ \t]*)+\\|?(?:\n|\r\n?)";d.languages.markdown=d.languages.extend("markup",{}),d.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"font-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:d.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+t+a+"(?:"+t+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+t+a+")(?:"+t+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(e),inside:d.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+t+")"+a+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+t+"$"),inside:{"table-header":{pattern:RegExp(e),alias:"important",inside:d.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/``.+?``|`[^`\r\n]+`/,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#+.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n("\\b__(?:(?!_)|_(?:(?!_))+_)+__\\b|\\*\\*(?:(?!\\*)|\\*(?:(?!\\*))+\\*)+\\*\\*"),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n("\\b_(?:(?!_)|__(?:(?!_))+__)+_\\b|\\*(?:(?!\\*)|\\*\\*(?:(?!\\*))+\\*\\*)+\\*"),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n("(~~?)(?:(?!~))+?\\2"),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},url:{pattern:n('!?\\[(?:(?!\\]))+\\](?:\\([^\\s)]+(?:[\t ]+"(?:\\\\.|[^"\\\\])*")?\\)| ?\\[(?:(?!\\]))+\\])'),lookbehind:!0,greedy:!0,inside:{variable:{pattern:/(\[)[^\]]+(?=\]$)/,lookbehind:!0},content:{pattern:/(^!?\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},string:{pattern:/"(?:\\.|[^"\\])*"(?=\)$)/}}}}),["url","bold","italic","strike"].forEach(function(e){["url","bold","italic","strike"].forEach(function(n){e!==n&&(d.languages.markdown[e].inside.content.inside[n]=d.languages.markdown[n])})}),d.hooks.add("after-tokenize",function(n){"markdown"!==n.language&&"md"!==n.language||!function n(e){if(e&&"string"!=typeof e)for(var t=0,a=e.length;t Date: Thu, 26 Nov 2020 00:32:48 +0100 Subject: [PATCH 0672/1100] Core: Moved pattern matching + lookbehind logic into function (#2633) --- components/prism-core.js | 48 ++++++++++++++++++++++-------------- components/prism-core.min.js | 2 +- docs/global.html | 8 +++--- docs/prism-core.js.html | 48 ++++++++++++++++++++++-------------- prism.js | 48 ++++++++++++++++++++++-------------- 5 files changed, 92 insertions(+), 62 deletions(-) diff --git a/components/prism-core.js b/components/prism-core.js index 8b8343b485..29a7952d7b 100644 --- a/components/prism-core.js +++ b/components/prism-core.js @@ -823,6 +823,25 @@ Token.stringify = function stringify(o, language) { return '<' + env.tag + ' class="' + env.classes.join(' ') + '"' + attributes + '>' + env.content + ''; }; +/** + * @param {RegExp} pattern + * @param {number} pos + * @param {string} text + * @param {boolean} lookbehind + * @returns {RegExpExecArray | null} + */ +function matchPattern(pattern, pos, text, lookbehind) { + pattern.lastIndex = pos; + var match = pattern.exec(text); + if (match && lookbehind && match[1]) { + // change the match to remove the text matched by the Prism lookbehind group + var lookbehindLength = match[1].length; + match.index += lookbehindLength; + match[0] = match[0].slice(lookbehindLength); + } + return match; +} + /** * @param {string} text * @param {LinkedList} tokenList @@ -855,7 +874,6 @@ function matchGrammar(text, tokenList, grammar, startNode, startPos, rematch) { inside = patternObj.inside, lookbehind = !!patternObj.lookbehind, greedy = !!patternObj.greedy, - lookbehindLength = 0, alias = patternObj.alias; if (greedy && !patternObj.pattern.global) { @@ -889,15 +907,15 @@ function matchGrammar(text, tokenList, grammar, startNode, startPos, rematch) { } var removeCount = 1; // this is the to parameter of removeBetween + var match; if (greedy) { - pattern.lastIndex = pos; - var match = pattern.exec(text); + match = matchPattern(pattern, pos, text, lookbehind); if (!match) { break; } - var from = match.index + (lookbehind && match[1] ? match[1].length : 0); + var from = match.index; var to = match.index + match[0].length; var p = pos; @@ -931,24 +949,16 @@ function matchGrammar(text, tokenList, grammar, startNode, startPos, rematch) { str = text.slice(pos, p); match.index -= pos; } else { - pattern.lastIndex = 0; - - var match = pattern.exec(str); - } - - if (!match) { - continue; - } - - if (lookbehind) { - lookbehindLength = match[1] ? match[1].length : 0; + match = matchPattern(pattern, 0, str, lookbehind); + if (!match) { + continue; + } } - var from = match.index + lookbehindLength, - matchStr = match[0].slice(lookbehindLength), - to = from + matchStr.length, + var from = match.index, + matchStr = match[0], before = str.slice(0, from), - after = str.slice(to); + after = str.slice(from + matchStr.length); var reach = pos + str.length; if (rematch && reach > rematch.reach) { diff --git a/components/prism-core.min.js b/components/prism-core.min.js index 1589f00289..89173b8a76 100644 --- a/components/prism-core.min.js +++ b/components/prism-core.min.js @@ -1 +1 @@ -var _self="undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{},Prism=function(u){var c=/\blang(?:uage)?-([\w-]+)\b/i,n=0,M={manual:u.Prism&&u.Prism.manual,disableWorkerMessageHandler:u.Prism&&u.Prism.disableWorkerMessageHandler,util:{encode:function e(n){return n instanceof W?new W(n.type,e(n.content),n.alias):Array.isArray(n)?n.map(e):n.replace(/&/g,"&").replace(/=l.reach);k+=y.value.length,y=y.next){var b=y.value;if(t.length>n.length)return;if(!(b instanceof W)){var x=1;if(h){m.lastIndex=k;var w=m.exec(n);if(!w)break;var A=w.index+(f&&w[1]?w[1].length:0),P=w.index+w[0].length,S=k;for(S+=y.value.length;S<=A;)y=y.next,S+=y.value.length;if(S-=y.value.length,k=S,y.value instanceof W)continue;for(var E=y;E!==t.tail&&(Sl.reach&&(l.reach=j);var C=y.prev;L&&(C=I(t,C,L),k+=L.length),z(t,C,x);var _=new W(o,g?M.tokenize(O,g):O,v,O);y=I(t,C,_),N&&I(t,y,N),1"+a.content+""},!u.document)return u.addEventListener&&(M.disableWorkerMessageHandler||u.addEventListener("message",function(e){var n=JSON.parse(e.data),t=n.language,r=n.code,a=n.immediateClose;u.postMessage(M.highlight(r,M.languages[t],t)),a&&u.close()},!1)),M;var e=M.util.currentScript();function t(){M.manual||M.highlightAll()}if(e&&(M.filename=e.src,e.hasAttribute("data-manual")&&(M.manual=!0)),!M.manual){var r=document.readyState;"loading"===r||"interactive"===r&&e&&e.defer?document.addEventListener("DOMContentLoaded",t):window.requestAnimationFrame?window.requestAnimationFrame(t):window.setTimeout(t,16)}return M}(_self);"undefined"!=typeof module&&module.exports&&(module.exports=Prism),"undefined"!=typeof global&&(global.Prism=Prism); \ No newline at end of file +var _self="undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{},Prism=function(u){var c=/\blang(?:uage)?-([\w-]+)\b/i,n=0,_={manual:u.Prism&&u.Prism.manual,disableWorkerMessageHandler:u.Prism&&u.Prism.disableWorkerMessageHandler,util:{encode:function e(n){return n instanceof M?new M(n.type,e(n.content),n.alias):Array.isArray(n)?n.map(e):n.replace(/&/g,"&").replace(/=l.reach);y+=m.value.length,m=m.next){var k=m.value;if(t.length>n.length)return;if(!(k instanceof M)){var b,x=1;if(h){if(!(b=W(p,y,n,f)))break;var w=b.index,A=b.index+b[0].length,P=y;for(P+=m.value.length;P<=w;)m=m.next,P+=m.value.length;if(P-=m.value.length,y=P,m.value instanceof M)continue;for(var S=m;S!==t.tail&&(Pl.reach&&(l.reach=N);var j=m.prev;O&&(j=z(t,j,O),y+=O.length),I(t,j,x);var C=new M(o,g?_.tokenize(E,g):E,d,E);m=z(t,j,C),L&&z(t,m,L),1"+a.content+""},!u.document)return u.addEventListener&&(_.disableWorkerMessageHandler||u.addEventListener("message",function(e){var n=JSON.parse(e.data),t=n.language,r=n.code,a=n.immediateClose;u.postMessage(_.highlight(r,_.languages[t],t)),a&&u.close()},!1)),_;var e=_.util.currentScript();function t(){_.manual||_.highlightAll()}if(e&&(_.filename=e.src,e.hasAttribute("data-manual")&&(_.manual=!0)),!_.manual){var r=document.readyState;"loading"===r||"interactive"===r&&e&&e.defer?document.addEventListener("DOMContentLoaded",t):window.requestAnimationFrame?window.requestAnimationFrame(t):window.setTimeout(t,16)}return _}(_self);"undefined"!=typeof module&&module.exports&&(module.exports=Prism),"undefined"!=typeof global&&(global.Prism=Prism); \ No newline at end of file diff --git a/docs/global.html b/docs/global.html index 380162886a..4838a92ced 100644 --- a/docs/global.html +++ b/docs/global.html @@ -143,7 +143,7 @@

            Grammar

            Source:
            @@ -274,7 +274,7 @@

            GrammarToken

            Source:
            @@ -559,7 +559,7 @@

            High
            Source:
            @@ -713,7 +713,7 @@

            HookCallb
            Source:
            diff --git a/docs/prism-core.js.html b/docs/prism-core.js.html index f8a5edcd1e..ed5112a7fd 100644 --- a/docs/prism-core.js.html +++ b/docs/prism-core.js.html @@ -876,6 +876,25 @@

            prism-core.js

            return '<' + env.tag + ' class="' + env.classes.join(' ') + '"' + attributes + '>' + env.content + '</' + env.tag + '>'; }; +/** + * @param {RegExp} pattern + * @param {number} pos + * @param {string} text + * @param {boolean} lookbehind + * @returns {RegExpExecArray | null} + */ +function matchPattern(pattern, pos, text, lookbehind) { + pattern.lastIndex = pos; + var match = pattern.exec(text); + if (match && lookbehind && match[1]) { + // change the match to remove the text matched by the Prism lookbehind group + var lookbehindLength = match[1].length; + match.index += lookbehindLength; + match[0] = match[0].slice(lookbehindLength); + } + return match; +} + /** * @param {string} text * @param {LinkedList<string | Token>} tokenList @@ -908,7 +927,6 @@

            prism-core.js

            inside = patternObj.inside, lookbehind = !!patternObj.lookbehind, greedy = !!patternObj.greedy, - lookbehindLength = 0, alias = patternObj.alias; if (greedy && !patternObj.pattern.global) { @@ -942,15 +960,15 @@

            prism-core.js

            } var removeCount = 1; // this is the to parameter of removeBetween + var match; if (greedy) { - pattern.lastIndex = pos; - var match = pattern.exec(text); + match = matchPattern(pattern, pos, text, lookbehind); if (!match) { break; } - var from = match.index + (lookbehind && match[1] ? match[1].length : 0); + var from = match.index; var to = match.index + match[0].length; var p = pos; @@ -984,24 +1002,16 @@

            prism-core.js

            str = text.slice(pos, p); match.index -= pos; } else { - pattern.lastIndex = 0; - - var match = pattern.exec(str); - } - - if (!match) { - continue; - } - - if (lookbehind) { - lookbehindLength = match[1] ? match[1].length : 0; + match = matchPattern(pattern, 0, str, lookbehind); + if (!match) { + continue; + } } - var from = match.index + lookbehindLength, - matchStr = match[0].slice(lookbehindLength), - to = from + matchStr.length, + var from = match.index, + matchStr = match[0], before = str.slice(0, from), - after = str.slice(to); + after = str.slice(from + matchStr.length); var reach = pos + str.length; if (rematch && reach > rematch.reach) { diff --git a/prism.js b/prism.js index 02af74b4c8..cab8797b12 100644 --- a/prism.js +++ b/prism.js @@ -828,6 +828,25 @@ Token.stringify = function stringify(o, language) { return '<' + env.tag + ' class="' + env.classes.join(' ') + '"' + attributes + '>' + env.content + ''; }; +/** + * @param {RegExp} pattern + * @param {number} pos + * @param {string} text + * @param {boolean} lookbehind + * @returns {RegExpExecArray | null} + */ +function matchPattern(pattern, pos, text, lookbehind) { + pattern.lastIndex = pos; + var match = pattern.exec(text); + if (match && lookbehind && match[1]) { + // change the match to remove the text matched by the Prism lookbehind group + var lookbehindLength = match[1].length; + match.index += lookbehindLength; + match[0] = match[0].slice(lookbehindLength); + } + return match; +} + /** * @param {string} text * @param {LinkedList} tokenList @@ -860,7 +879,6 @@ function matchGrammar(text, tokenList, grammar, startNode, startPos, rematch) { inside = patternObj.inside, lookbehind = !!patternObj.lookbehind, greedy = !!patternObj.greedy, - lookbehindLength = 0, alias = patternObj.alias; if (greedy && !patternObj.pattern.global) { @@ -894,15 +912,15 @@ function matchGrammar(text, tokenList, grammar, startNode, startPos, rematch) { } var removeCount = 1; // this is the to parameter of removeBetween + var match; if (greedy) { - pattern.lastIndex = pos; - var match = pattern.exec(text); + match = matchPattern(pattern, pos, text, lookbehind); if (!match) { break; } - var from = match.index + (lookbehind && match[1] ? match[1].length : 0); + var from = match.index; var to = match.index + match[0].length; var p = pos; @@ -936,24 +954,16 @@ function matchGrammar(text, tokenList, grammar, startNode, startPos, rematch) { str = text.slice(pos, p); match.index -= pos; } else { - pattern.lastIndex = 0; - - var match = pattern.exec(str); - } - - if (!match) { - continue; - } - - if (lookbehind) { - lookbehindLength = match[1] ? match[1].length : 0; + match = matchPattern(pattern, 0, str, lookbehind); + if (!match) { + continue; + } } - var from = match.index + lookbehindLength, - matchStr = match[0].slice(lookbehindLength), - to = from + matchStr.length, + var from = match.index, + matchStr = match[0], before = str.slice(0, from), - after = str.slice(to); + after = str.slice(from + matchStr.length); var reach = pos + str.length; if (rematch && reach > rematch.reach) { From 0803525b2108630b20ee9d9e6b3dcd47e19beed6 Mon Sep 17 00:00:00 2001 From: Mariano de Achaval Date: Fri, 27 Nov 2020 15:00:35 -0800 Subject: [PATCH 0673/1100] Added support for DataWeave language (#2659) --- components.js | 2 +- components.json | 4 + components/prism-dataweave.js | 41 ++++++ components/prism-dataweave.min.js | 1 + examples/prism-dataweave.html | 39 ++++++ plugins/show-language/prism-show-language.js | 1 + .../show-language/prism-show-language.min.js | 2 +- .../languages/dataweave/boolean_feature.test | 12 ++ .../languages/dataweave/comment_feature.test | 17 +++ tests/languages/dataweave/dates_feature.test | 27 ++++ .../dataweave/functions_feature.test | 28 ++++ .../languages/dataweave/keywords_feature.test | 124 ++++++++++++++++++ tests/languages/dataweave/null_feature.test | 9 ++ tests/languages/dataweave/number_feature.test | 25 ++++ .../dataweave/operators_feature.test | 77 +++++++++++ .../languages/dataweave/property_feature.test | 53 ++++++++ tests/languages/dataweave/regex_feature.test | 15 +++ tests/languages/dataweave/string_feature.test | 27 ++++ 18 files changed, 502 insertions(+), 2 deletions(-) create mode 100644 components/prism-dataweave.js create mode 100644 components/prism-dataweave.min.js create mode 100644 examples/prism-dataweave.html create mode 100644 tests/languages/dataweave/boolean_feature.test create mode 100644 tests/languages/dataweave/comment_feature.test create mode 100644 tests/languages/dataweave/dates_feature.test create mode 100644 tests/languages/dataweave/functions_feature.test create mode 100644 tests/languages/dataweave/keywords_feature.test create mode 100644 tests/languages/dataweave/null_feature.test create mode 100644 tests/languages/dataweave/number_feature.test create mode 100644 tests/languages/dataweave/operators_feature.test create mode 100644 tests/languages/dataweave/property_feature.test create mode 100644 tests/languages/dataweave/regex_feature.test create mode 100644 tests/languages/dataweave/string_feature.test diff --git a/components.js b/components.js index e2bf26ba5a..a0d23dbd7c 100644 --- a/components.js +++ b/components.js @@ -1,2 +1,2 @@ -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml","ssml","atom","rss"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","ssml":"SSML","atom":"Atom","rss":"RSS"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","optional":"regex","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"ABNF","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"agda":{"title":"Agda","owner":"xy-ren"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apex":{"title":"Apex","require":["clike","sql"],"owner":"RunDevelopment"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"dkern"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"birb":{"title":"Birb","require":"clike","owner":"Calamity210"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"BNF","alias":"rbnf","aliasTitles":{"rbnf":"RBNF"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"bsl":{"title":"BSL (1C:Enterprise)","alias":"oscript","aliasTitles":{"oscript":"OneScript"},"owner":"Diversus23"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"clojure":{"title":"Clojure","owner":"troglotit"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"cypher":{"title":"Cypher","owner":"RunDevelopment"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dax":{"title":"DAX","owner":"peterbud"},"dhall":{"title":"Dhall","owner":"RunDevelopment"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"EBNF","owner":"RunDevelopment"},"editorconfig":{"title":"EditorConfig","owner":"osipxd"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"c","owner":"Golmote"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","optional":["markdown"],"owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"hlsl":{"title":"HLSL","require":"c","owner":"RunDevelopment"},"http":{"title":"HTTP","optional":["css","javascript","json","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"ignore":{"title":".ignore","owner":"osipxd","alias":["gitignore","hgignore","npmignore"],"aliasTitles":{"gitignore":".gitignore","hgignore":".hgignore","npmignore":".npmignore"}},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike","typescript"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","alias":"webmanifest","aliasTitles":{"webmanifest":"Web App Manifest"},"owner":"CupOfTea696"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"jsstacktrace":{"title":"JS stack trace","owner":"sbrl"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","alias":["kt","kts"],"aliasTitles":{"kts":"Kotlin Script"},"require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","optional":"yaml","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"mongodb":{"title":"MongoDB","owner":"airs0urce","require":"javascript"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"naniscript":{"title":"Naninovel Script","owner":"Elringus","alias":"nani"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":"markup-templating","owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"promql":{"title":"PromQL","owner":"arendjr"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"purebasic":{"title":"PureBasic","require":"clike","alias":"pbfasm","owner":"HeX0R101"},"purescript":{"title":"PureScript","require":"haskell","alias":"purs","owner":"sriharshachilakapati"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"racket":{"title":"Racket","require":"scheme","alias":"rkt","owner":"RunDevelopment"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","owner":"RunDevelopment"},"renpy":{"title":"Ren'py","alias":"rpy","owner":"HyuchiaDiego"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","alias":["sh-session","shellsession"],"owner":"RunDevelopment"},"smali":{"title":"Smali","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sml":{"title":"SML","alias":"smlnj","aliasTitles":{"smlnj":"SML/NJ"},"owner":"RunDevelopment"},"solidity":{"title":"Solidity (Ethereum)","alias":"sol","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"stan":{"title":"Stan","owner":"RunDevelopment"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","vbnet"],"owner":"RunDevelopment"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"typoscript":{"title":"TypoScript","alias":"tsconfig","aliasTitles":{"tsconfig":"TSConfig"},"owner":"dkern"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","optional":"regex","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":["vb","vba"],"aliasTitles":{"vba":"VBA"},"owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xml-doc":{"title":"XML doc (.net)","require":"markup","modify":["csharp","fsharp","vbnet"],"owner":"RunDevelopment"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"yang":{"title":"YANG","owner":"RunDevelopment"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml","ssml","atom","rss"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","ssml":"SSML","atom":"Atom","rss":"RSS"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","optional":"regex","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"ABNF","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"agda":{"title":"Agda","owner":"xy-ren"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apex":{"title":"Apex","require":["clike","sql"],"owner":"RunDevelopment"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"dkern"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"birb":{"title":"Birb","require":"clike","owner":"Calamity210"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"BNF","alias":"rbnf","aliasTitles":{"rbnf":"RBNF"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"bsl":{"title":"BSL (1C:Enterprise)","alias":"oscript","aliasTitles":{"oscript":"OneScript"},"owner":"Diversus23"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"clojure":{"title":"Clojure","owner":"troglotit"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"cypher":{"title":"Cypher","owner":"RunDevelopment"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dataweave":{"title":"DataWeave","owner":"machaval"},"dax":{"title":"DAX","owner":"peterbud"},"dhall":{"title":"Dhall","owner":"RunDevelopment"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"EBNF","owner":"RunDevelopment"},"editorconfig":{"title":"EditorConfig","owner":"osipxd"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"c","owner":"Golmote"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","optional":["markdown"],"owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"hlsl":{"title":"HLSL","require":"c","owner":"RunDevelopment"},"http":{"title":"HTTP","optional":["css","javascript","json","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"ignore":{"title":".ignore","owner":"osipxd","alias":["gitignore","hgignore","npmignore"],"aliasTitles":{"gitignore":".gitignore","hgignore":".hgignore","npmignore":".npmignore"}},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike","typescript"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","alias":"webmanifest","aliasTitles":{"webmanifest":"Web App Manifest"},"owner":"CupOfTea696"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"jsstacktrace":{"title":"JS stack trace","owner":"sbrl"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","alias":["kt","kts"],"aliasTitles":{"kts":"Kotlin Script"},"require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","optional":"yaml","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"mongodb":{"title":"MongoDB","owner":"airs0urce","require":"javascript"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"naniscript":{"title":"Naninovel Script","owner":"Elringus","alias":"nani"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":"markup-templating","owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"promql":{"title":"PromQL","owner":"arendjr"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"purebasic":{"title":"PureBasic","require":"clike","alias":"pbfasm","owner":"HeX0R101"},"purescript":{"title":"PureScript","require":"haskell","alias":"purs","owner":"sriharshachilakapati"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"racket":{"title":"Racket","require":"scheme","alias":"rkt","owner":"RunDevelopment"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","owner":"RunDevelopment"},"renpy":{"title":"Ren'py","alias":"rpy","owner":"HyuchiaDiego"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","alias":["sh-session","shellsession"],"owner":"RunDevelopment"},"smali":{"title":"Smali","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sml":{"title":"SML","alias":"smlnj","aliasTitles":{"smlnj":"SML/NJ"},"owner":"RunDevelopment"},"solidity":{"title":"Solidity (Ethereum)","alias":"sol","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"stan":{"title":"Stan","owner":"RunDevelopment"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","vbnet"],"owner":"RunDevelopment"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"typoscript":{"title":"TypoScript","alias":"tsconfig","aliasTitles":{"tsconfig":"TSConfig"},"owner":"dkern"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","optional":"regex","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":["vb","vba"],"aliasTitles":{"vba":"VBA"},"owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xml-doc":{"title":"XML doc (.net)","require":"markup","modify":["csharp","fsharp","vbnet"],"owner":"RunDevelopment"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"yang":{"title":"YANG","owner":"RunDevelopment"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; if (typeof module !== 'undefined' && module.exports) { module.exports = components; } \ No newline at end of file diff --git a/components.json b/components.json index 38de558b7a..e2e9845a97 100644 --- a/components.json +++ b/components.json @@ -290,6 +290,10 @@ "require": "clike", "owner": "Golmote" }, + "dataweave": { + "title": "DataWeave", + "owner": "machaval" + }, "dax": { "title": "DAX", "owner": "peterbud" diff --git a/components/prism-dataweave.js b/components/prism-dataweave.js new file mode 100644 index 0000000000..0b03834d0a --- /dev/null +++ b/components/prism-dataweave.js @@ -0,0 +1,41 @@ +(function (Prism) { + Prism.languages.dataweave = { + 'url': /\b[A-Za-z]+:\/\/[\w/:.?=&-]+|\burn:[\w:.?=&-]+/, + 'property': { + pattern: /(?:\w+#)?(?:"(?:\\.|[^\\"\r\n])*"|\w+)(?=\s*[:@])/, + greedy: true + }, + 'string': { + pattern: /(["'`])(?:\\[\s\S]|(?!\1)[^\\])*\1/, + greedy: true + }, + 'mime-type': /\b(?:text|audio|video|application|multipart|image)\/[\w+-]+/, + 'date': { + pattern: /\|[\w:+-]+\|/, + greedy: true + }, + 'comment': [ + { + pattern: /(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/, + lookbehind: true, + greedy: true + }, + { + pattern: /(^|[^\\:])\/\/.*/, + lookbehind: true, + greedy: true + } + ], + 'regex': { + pattern: /\/(?:[^\\\/\r\n]|\\[^\r\n])+\//, + greedy: true + }, + 'function': /\b[A-Za-z_]\w*(?=\s*\()/i, + 'number': /-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i, + 'punctuation': /[{}[\];(),.:@]/, + 'operator': /<<|>>|->|[<>~=]=?|!=|--?-?|\+\+?|\!|\?/, + 'boolean': /\b(?:true|false)\b/, + 'keyword': /\b(?:match|input|output|ns|type|update|null|if|else|using|unless|at|is|as|case|do|fun|var|not|and|or)\b/ + }; + +}(Prism)); diff --git a/components/prism-dataweave.min.js b/components/prism-dataweave.min.js new file mode 100644 index 0000000000..c04dd1c984 --- /dev/null +++ b/components/prism-dataweave.min.js @@ -0,0 +1 @@ +Prism.languages.dataweave={url:/\b[A-Za-z]+:\/\/[\w/:.?=&-]+|\burn:[\w:.?=&-]+/,property:{pattern:/(?:\w+#)?(?:"(?:\\.|[^\\"\r\n])*"|\w+)(?=\s*[:@])/,greedy:!0},string:{pattern:/(["'`])(?:\\[\s\S]|(?!\1)[^\\])*\1/,greedy:!0},"mime-type":/\b(?:text|audio|video|application|multipart|image)\/[\w+-]+/,date:{pattern:/\|[\w:+-]+\|/,greedy:!0},comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],regex:{pattern:/\/(?:[^\\\/\r\n]|\\[^\r\n])+\//,greedy:!0},function:/\b[A-Za-z_]\w*(?=\s*\()/i,number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\];(),.:@]/,operator:/<<|>>|->|[<>~=]=?|!=|--?-?|\+\+?|\!|\?/,boolean:/\b(?:true|false)\b/,keyword:/\b(?:match|input|output|ns|type|update|null|if|else|using|unless|at|is|as|case|do|fun|var|not|and|or)\b/}; \ No newline at end of file diff --git a/examples/prism-dataweave.html b/examples/prism-dataweave.html new file mode 100644 index 0000000000..f66a2da7d2 --- /dev/null +++ b/examples/prism-dataweave.html @@ -0,0 +1,39 @@ +

            Full example

            +
            
            +%dw 2.0
            +input payalod application/json
            +ns ns0 http://localhost.com
            +var a = 123
            +type T = String
            +fun test(a: Number) = a + 123
            +output application/json
            +---
            +{
            +    // This is a comment
            +    /**
            +    This is a multiline comment
            +    **/
            +    name: payload.name,
            +    string: "this",
            +    'another string': true,
            +    "regex": /123/,
            +    fc: test(1),
            +    "dates": |12-12-2020-T12:00:00|,
            +    number: 123,
            +    "null": null,
            +
            +    a: {} match {
            +        case  is {} -> foo.name
            +    },
            +    b: {} update {
            +    case name at .user.name ->  "123"
            +    },
            +    stringMultiLine: "This is a multiline
            +        string
            +    ",
            +    a: if( !true > 2) a else 2,
            +    b: do {
            +            {}
            +        }
            +}
            +
            diff --git a/plugins/show-language/prism-show-language.js b/plugins/show-language/prism-show-language.js index 9ef73e3544..583e714f64 100644 --- a/plugins/show-language/prism-show-language.js +++ b/plugins/show-language/prism-show-language.js @@ -53,6 +53,7 @@ "conc": "Concurnas", "csp": "Content-Security-Policy", "css-extras": "CSS Extras", + "dataweave": "DataWeave", "dax": "DAX", "django": "Django/Jinja2", "jinja2": "Django/Jinja2", diff --git a/plugins/show-language/prism-show-language.min.js b/plugins/show-language/prism-show-language.min.js index 85ce5f17b0..a1df570e5e 100644 --- a/plugins/show-language/prism-show-language.min.js +++ b/plugins/show-language/prism-show-language.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof self&&self.Prism&&self.document)if(Prism.plugins.toolbar){var r={none:"Plain text",html:"HTML",xml:"XML",svg:"SVG",mathml:"MathML",ssml:"SSML",rss:"RSS",css:"CSS",clike:"C-like",js:"JavaScript",abap:"ABAP",abnf:"ABNF",al:"AL",antlr4:"ANTLR4",g4:"ANTLR4",apacheconf:"Apache Configuration",apl:"APL",aql:"AQL",arff:"ARFF",asciidoc:"AsciiDoc",adoc:"AsciiDoc",aspnet:"ASP.NET (C#)",asm6502:"6502 Assembly",autohotkey:"AutoHotkey",autoit:"AutoIt",basic:"BASIC",bbcode:"BBcode",bnf:"BNF",rbnf:"RBNF",bsl:"BSL (1C:Enterprise)",oscript:"OneScript",csharp:"C#",cs:"C#",dotnet:"C#",cpp:"C++",cil:"CIL",cmake:"CMake",coffee:"CoffeeScript",conc:"Concurnas",csp:"Content-Security-Policy","css-extras":"CSS Extras",dax:"DAX",django:"Django/Jinja2",jinja2:"Django/Jinja2","dns-zone-file":"DNS zone file","dns-zone":"DNS zone file",dockerfile:"Docker",ebnf:"EBNF",editorconfig:"EditorConfig",ejs:"EJS",etlua:"Embedded Lua templating",erb:"ERB","excel-formula":"Excel Formula",xlsx:"Excel Formula",xls:"Excel Formula",fsharp:"F#","firestore-security-rules":"Firestore security rules",ftl:"FreeMarker Template Language",gml:"GameMaker Language",gamemakerlanguage:"GameMaker Language",gcode:"G-code",gdscript:"GDScript",gedcom:"GEDCOM",glsl:"GLSL",graphql:"GraphQL",hs:"Haskell",hcl:"HCL",hlsl:"HLSL",http:"HTTP",hpkp:"HTTP Public-Key-Pins",hsts:"HTTP Strict-Transport-Security",ichigojam:"IchigoJam",ignore:".ignore",gitignore:".gitignore",hgignore:".hgignore",npmignore:".npmignore",inform7:"Inform 7",javadoc:"JavaDoc",javadoclike:"JavaDoc-like",javastacktrace:"Java stack trace",jq:"JQ",jsdoc:"JSDoc","js-extras":"JS Extras",json:"JSON",webmanifest:"Web App Manifest",json5:"JSON5",jsonp:"JSONP",jsstacktrace:"JS stack trace","js-templates":"JS Templates",kts:"Kotlin Script",kt:"Kotlin",latex:"LaTeX",tex:"TeX",context:"ConTeXt",lilypond:"LilyPond",ly:"LilyPond",emacs:"Lisp",elisp:"Lisp","emacs-lisp":"Lisp",llvm:"LLVM IR",lolcode:"LOLCODE",md:"Markdown","markup-templating":"Markup templating",matlab:"MATLAB",mel:"MEL",mongodb:"MongoDB",moon:"MoonScript",n1ql:"N1QL",n4js:"N4JS",n4jsd:"N4JS","nand2tetris-hdl":"Nand To Tetris HDL",naniscript:"Naninovel Script",nani:"Naninovel Script",nasm:"NASM",neon:"NEON",nginx:"nginx",nsis:"NSIS",objectivec:"Objective-C",objc:"Objective-C",ocaml:"OCaml",opencl:"OpenCL",parigp:"PARI/GP",objectpascal:"Object Pascal",pcaxis:"PC-Axis",px:"PC-Axis",peoplecode:"PeopleCode",pcode:"PeopleCode",php:"PHP",phpdoc:"PHPDoc","php-extras":"PHP Extras",plsql:"PL/SQL",powerquery:"PowerQuery",pq:"PowerQuery",mscript:"PowerQuery",powershell:"PowerShell",promql:"PromQL",properties:".properties",protobuf:"Protocol Buffers",purebasic:"PureBasic",pbfasm:"PureBasic",purs:"PureScript",py:"Python",q:"Q (kdb+ database)",qml:"QML",rkt:"Racket",jsx:"React JSX",tsx:"React TSX",renpy:"Ren'py",rpy:"Ren'py",rest:"reST (reStructuredText)",robotframework:"Robot Framework",robot:"Robot Framework",rb:"Ruby",sas:"SAS",sass:"Sass (Sass)",scss:"Sass (Scss)","shell-session":"Shell session","sh-session":"Shell session",shellsession:"Shell session",sml:"SML",smlnj:"SML/NJ",solidity:"Solidity (Ethereum)",sol:"Solidity (Ethereum)","solution-file":"Solution file",sln:"Solution file",soy:"Soy (Closure Template)",sparql:"SPARQL",rq:"SPARQL","splunk-spl":"Splunk SPL",sqf:"SQF: Status Quo Function (Arma 3)",sql:"SQL",iecst:"Structured Text (IEC 61131-3)","t4-templating":"T4 templating","t4-cs":"T4 Text Templates (C#)",t4:"T4 Text Templates (C#)","t4-vb":"T4 Text Templates (VB)",tap:"TAP",tt2:"Template Toolkit 2",toml:"TOML",trig:"TriG",ts:"TypeScript",tsconfig:"TSConfig",uscript:"UnrealScript",uc:"UnrealScript",vbnet:"VB.Net",vhdl:"VHDL",vim:"vim","visual-basic":"Visual Basic",vba:"VBA",vb:"Visual Basic",wasm:"WebAssembly",wiki:"Wiki markup",xeoracube:"XeoraCube","xml-doc":"XML doc (.net)",xojo:"Xojo (REALbasic)",xquery:"XQuery",yaml:"YAML",yml:"YAML",yang:"YANG"};Prism.plugins.toolbar.registerButton("show-language",function(e){var a=e.element.parentNode;if(a&&/pre/i.test(a.nodeName)){var s,t=a.getAttribute("data-language")||r[e.language]||((s=e.language)?(s.substring(0,1).toUpperCase()+s.substring(1)).replace(/s(?=cript)/,"S"):s);if(t){var o=document.createElement("span");return o.textContent=t,o}}})}else console.warn("Show Languages plugin loaded before Toolbar plugin.")}(); \ No newline at end of file +!function(){if("undefined"!=typeof self&&self.Prism&&self.document)if(Prism.plugins.toolbar){var r={none:"Plain text",html:"HTML",xml:"XML",svg:"SVG",mathml:"MathML",ssml:"SSML",rss:"RSS",css:"CSS",clike:"C-like",js:"JavaScript",abap:"ABAP",abnf:"ABNF",al:"AL",antlr4:"ANTLR4",g4:"ANTLR4",apacheconf:"Apache Configuration",apl:"APL",aql:"AQL",arff:"ARFF",asciidoc:"AsciiDoc",adoc:"AsciiDoc",aspnet:"ASP.NET (C#)",asm6502:"6502 Assembly",autohotkey:"AutoHotkey",autoit:"AutoIt",basic:"BASIC",bbcode:"BBcode",bnf:"BNF",rbnf:"RBNF",bsl:"BSL (1C:Enterprise)",oscript:"OneScript",csharp:"C#",cs:"C#",dotnet:"C#",cpp:"C++",cil:"CIL",cmake:"CMake",coffee:"CoffeeScript",conc:"Concurnas",csp:"Content-Security-Policy","css-extras":"CSS Extras",dataweave:"DataWeave",dax:"DAX",django:"Django/Jinja2",jinja2:"Django/Jinja2","dns-zone-file":"DNS zone file","dns-zone":"DNS zone file",dockerfile:"Docker",ebnf:"EBNF",editorconfig:"EditorConfig",ejs:"EJS",etlua:"Embedded Lua templating",erb:"ERB","excel-formula":"Excel Formula",xlsx:"Excel Formula",xls:"Excel Formula",fsharp:"F#","firestore-security-rules":"Firestore security rules",ftl:"FreeMarker Template Language",gml:"GameMaker Language",gamemakerlanguage:"GameMaker Language",gcode:"G-code",gdscript:"GDScript",gedcom:"GEDCOM",glsl:"GLSL",graphql:"GraphQL",hs:"Haskell",hcl:"HCL",hlsl:"HLSL",http:"HTTP",hpkp:"HTTP Public-Key-Pins",hsts:"HTTP Strict-Transport-Security",ichigojam:"IchigoJam",ignore:".ignore",gitignore:".gitignore",hgignore:".hgignore",npmignore:".npmignore",inform7:"Inform 7",javadoc:"JavaDoc",javadoclike:"JavaDoc-like",javastacktrace:"Java stack trace",jq:"JQ",jsdoc:"JSDoc","js-extras":"JS Extras",json:"JSON",webmanifest:"Web App Manifest",json5:"JSON5",jsonp:"JSONP",jsstacktrace:"JS stack trace","js-templates":"JS Templates",kts:"Kotlin Script",kt:"Kotlin",latex:"LaTeX",tex:"TeX",context:"ConTeXt",lilypond:"LilyPond",ly:"LilyPond",emacs:"Lisp",elisp:"Lisp","emacs-lisp":"Lisp",llvm:"LLVM IR",lolcode:"LOLCODE",md:"Markdown","markup-templating":"Markup templating",matlab:"MATLAB",mel:"MEL",mongodb:"MongoDB",moon:"MoonScript",n1ql:"N1QL",n4js:"N4JS",n4jsd:"N4JS","nand2tetris-hdl":"Nand To Tetris HDL",naniscript:"Naninovel Script",nani:"Naninovel Script",nasm:"NASM",neon:"NEON",nginx:"nginx",nsis:"NSIS",objectivec:"Objective-C",objc:"Objective-C",ocaml:"OCaml",opencl:"OpenCL",parigp:"PARI/GP",objectpascal:"Object Pascal",pcaxis:"PC-Axis",px:"PC-Axis",peoplecode:"PeopleCode",pcode:"PeopleCode",php:"PHP",phpdoc:"PHPDoc","php-extras":"PHP Extras",plsql:"PL/SQL",powerquery:"PowerQuery",pq:"PowerQuery",mscript:"PowerQuery",powershell:"PowerShell",promql:"PromQL",properties:".properties",protobuf:"Protocol Buffers",purebasic:"PureBasic",pbfasm:"PureBasic",purs:"PureScript",py:"Python",q:"Q (kdb+ database)",qml:"QML",rkt:"Racket",jsx:"React JSX",tsx:"React TSX",renpy:"Ren'py",rpy:"Ren'py",rest:"reST (reStructuredText)",robotframework:"Robot Framework",robot:"Robot Framework",rb:"Ruby",sas:"SAS",sass:"Sass (Sass)",scss:"Sass (Scss)","shell-session":"Shell session","sh-session":"Shell session",shellsession:"Shell session",sml:"SML",smlnj:"SML/NJ",solidity:"Solidity (Ethereum)",sol:"Solidity (Ethereum)","solution-file":"Solution file",sln:"Solution file",soy:"Soy (Closure Template)",sparql:"SPARQL",rq:"SPARQL","splunk-spl":"Splunk SPL",sqf:"SQF: Status Quo Function (Arma 3)",sql:"SQL",iecst:"Structured Text (IEC 61131-3)","t4-templating":"T4 templating","t4-cs":"T4 Text Templates (C#)",t4:"T4 Text Templates (C#)","t4-vb":"T4 Text Templates (VB)",tap:"TAP",tt2:"Template Toolkit 2",toml:"TOML",trig:"TriG",ts:"TypeScript",tsconfig:"TSConfig",uscript:"UnrealScript",uc:"UnrealScript",vbnet:"VB.Net",vhdl:"VHDL",vim:"vim","visual-basic":"Visual Basic",vba:"VBA",vb:"Visual Basic",wasm:"WebAssembly",wiki:"Wiki markup",xeoracube:"XeoraCube","xml-doc":"XML doc (.net)",xojo:"Xojo (REALbasic)",xquery:"XQuery",yaml:"YAML",yml:"YAML",yang:"YANG"};Prism.plugins.toolbar.registerButton("show-language",function(e){var a=e.element.parentNode;if(a&&/pre/i.test(a.nodeName)){var s,t=a.getAttribute("data-language")||r[e.language]||((s=e.language)?(s.substring(0,1).toUpperCase()+s.substring(1)).replace(/s(?=cript)/,"S"):s);if(t){var o=document.createElement("span");return o.textContent=t,o}}})}else console.warn("Show Languages plugin loaded before Toolbar plugin.")}(); \ No newline at end of file diff --git a/tests/languages/dataweave/boolean_feature.test b/tests/languages/dataweave/boolean_feature.test new file mode 100644 index 0000000000..6d1903d869 --- /dev/null +++ b/tests/languages/dataweave/boolean_feature.test @@ -0,0 +1,12 @@ +true +false + +---------------------------------------------------- + +[ + ["boolean", "true"], + ["boolean", "false"] +] + +---------------------------------------------------- +Check for boolean \ No newline at end of file diff --git a/tests/languages/dataweave/comment_feature.test b/tests/languages/dataweave/comment_feature.test new file mode 100644 index 0000000000..6791431849 --- /dev/null +++ b/tests/languages/dataweave/comment_feature.test @@ -0,0 +1,17 @@ +// Line comment "" + /* Block comment */ + /** + * MultiLine Comment + **/ +/* "" */ + +---------------------------------------------------- + +[ + ["comment", "// Line comment \"\"\t"], + ["comment", "/* Block comment */"], + ["comment", "/**\r\n\t* MultiLine Comment\r\n\t**/"], + ["comment", "/* \"\" */"] +] +---------------------------------------------------- +Check for comments \ No newline at end of file diff --git a/tests/languages/dataweave/dates_feature.test b/tests/languages/dataweave/dates_feature.test new file mode 100644 index 0000000000..fb0644e7fc --- /dev/null +++ b/tests/languages/dataweave/dates_feature.test @@ -0,0 +1,27 @@ +|12-12-2001-T12:00:00| +|12-12-2001-T12:00:00+03:00| +|12-12-2001-T12:00:00Z| +|12-12-2001| +|12:00:00| +|12:00:00Z| +|12:00:00-03:00| +|P1D| +|P1Y1D| +|P1Y1D2H3M5S| + +---------------------------------------------------- + +[ + ["date", "|12-12-2001-T12:00:00|"], + ["date", "|12-12-2001-T12:00:00+03:00|"], + ["date", "|12-12-2001-T12:00:00Z|"], + ["date", "|12-12-2001|"], + ["date", "|12:00:00|"], + ["date", "|12:00:00Z|"], + ["date", "|12:00:00-03:00|"], + ["date", "|P1D|"], + ["date", "|P1Y1D|"], + ["date", "|P1Y1D2H3M5S|"] +] +---------------------------------------------------- +Check for date \ No newline at end of file diff --git a/tests/languages/dataweave/functions_feature.test b/tests/languages/dataweave/functions_feature.test new file mode 100644 index 0000000000..42d1abe386 --- /dev/null +++ b/tests/languages/dataweave/functions_feature.test @@ -0,0 +1,28 @@ +myfunction(a, b,123) +payload.myFunction(1,2,3) + +---------------------------------------------------- + +[ + ["function", "myfunction"], + ["punctuation", "("], + "a", + ["punctuation", ","], + " b", + ["punctuation", ","], + ["number", "123"], + ["punctuation", ")"], + + "\npayload", + ["punctuation", "."], + ["function", "myFunction"], + ["punctuation", "("], + ["number", "1"], + ["punctuation", ","], + ["number", "2"], + ["punctuation", ","], + ["number", "3"], + ["punctuation", ")"] +] +---------------------------------------------------- +Check for functions \ No newline at end of file diff --git a/tests/languages/dataweave/keywords_feature.test b/tests/languages/dataweave/keywords_feature.test new file mode 100644 index 0000000000..e936104b63 --- /dev/null +++ b/tests/languages/dataweave/keywords_feature.test @@ -0,0 +1,124 @@ +%dw 2.0 +input payalod application/json +ns ns0 http://localhost.com +var a = 123 +type T = String +fun test(a: Number) = a + 123 +output application/json +--- +{} match { + case a is String -> x as String +} +update { + case a at .name -> +} +if(true or false and not true) do { + +} +else +payload match { + case a is String -> x as String +} + +---------------------------------------------------- + +[ + "%dw ", + ["number", "2.0"], + + ["keyword", "input"], + " payalod ", + ["mime-type", "application/json"], + + ["keyword", "ns"], + " ns0 ", + ["url", "http://localhost.com"], + + ["keyword", "var"], + " a ", + ["operator", "="], + ["number", "123"], + + ["keyword", "type"], + " T ", + ["operator", "="], + " String\n", + + ["keyword", "fun"], + ["function", "test"], + ["punctuation", "("], + ["property", "a"], + ["punctuation", ":"], + " Number", + ["punctuation", ")"], + ["operator", "="], + " a ", + ["operator", "+"], + ["number", "123"], + + ["keyword", "output"], + ["mime-type", "application/json"], + + ["operator", "---"], + + ["punctuation", "{"], + ["punctuation", "}"], + ["keyword", "match"], + ["punctuation", "{"], + + ["keyword", "case"], + " a ", + ["keyword", "is"], + " String ", + ["operator", "->"], + " x ", + ["keyword", "as"], + " String\n", + + ["punctuation", "}"], + + ["keyword", "update"], + ["punctuation", "{"], + + ["keyword", "case"], + " a ", + ["keyword", "at"], + ["punctuation", "."], + "name ", + ["operator", "->"], + + ["punctuation", "}"], + + ["function", "if"], + ["punctuation", "("], + ["boolean", "true"], + ["keyword", "or"], + ["boolean", "false"], + ["keyword", "and"], + ["keyword", "not"], + ["boolean", "true"], + ["punctuation", ")"], + ["keyword", "do"], + ["punctuation", "{"], + + ["punctuation", "}"], + + ["keyword", "else"], + + " \npayload ", + ["keyword", "match"], + ["punctuation", "{"], + + ["keyword", "case"], + " a ", + ["keyword", "is"], + " String ", + ["operator", "->"], + " x ", + ["keyword", "as"], + " String\n", + + ["punctuation", "}"] +] +---------------------------------------------------- +Check for keywords \ No newline at end of file diff --git a/tests/languages/dataweave/null_feature.test b/tests/languages/dataweave/null_feature.test new file mode 100644 index 0000000000..862eca5daa --- /dev/null +++ b/tests/languages/dataweave/null_feature.test @@ -0,0 +1,9 @@ +null + +---------------------------------------------------- + +[ + ["keyword", "null"] +] +---------------------------------------------------- +Check for null \ No newline at end of file diff --git a/tests/languages/dataweave/number_feature.test b/tests/languages/dataweave/number_feature.test new file mode 100644 index 0000000000..a902c641df --- /dev/null +++ b/tests/languages/dataweave/number_feature.test @@ -0,0 +1,25 @@ +0 +123 +3.14159 +5.0e8 +0.2E+2 +47e-5 +-1.23 +-2.34E33 +-4.34E-33 + +---------------------------------------------------- + +[ + ["number", "0"], + ["number", "123"], + ["number", "3.14159"], + ["number", "5.0e8"], + ["number", "0.2E+2"], + ["number", "47e-5"], + ["number", "-1.23"], + ["number", "-2.34E33"], + ["number", "-4.34E-33"] +] +---------------------------------------------------- +Check for number \ No newline at end of file diff --git a/tests/languages/dataweave/operators_feature.test b/tests/languages/dataweave/operators_feature.test new file mode 100644 index 0000000000..a2fee39f53 --- /dev/null +++ b/tests/languages/dataweave/operators_feature.test @@ -0,0 +1,77 @@ +a > b +c < d +a = 1 +a << 1 +b >> 2 +d <= 2 +e >= 3 +f != 4 +g ~= 4 +h == 1 +(a) -> 1 +a ++ b +c -- d +payload.name! +payload.name? + +---------------------------------------------------- + +[ + "a ", + ["operator", ">"], + " b\nc ", + ["operator", "<"], + " d\na ", + ["operator", "="], + ["number", "1"], + + "\na ", + ["operator", "<<"], + ["number", "1"], + + "\nb ", + ["operator", ">>"], + ["number", "2"], + + "\nd ", + ["operator", "<="], + ["number", "2"], + + "\ne ", + ["operator", ">="], + ["number", "3"], + + "\nf ", + ["operator", "!="], + ["number", "4"], + + "\ng ", + ["operator", "~="], + ["number", "4"], + + "\nh ", + ["operator", "=="], + ["number", "1"], + + ["punctuation", "("], + "a", + ["punctuation", ")"], + ["operator", "->"], + ["number", "1"], + + "\na ", + ["operator", "++"], + " b\nc ", + ["operator", "--"], + " d\npayload", + ["punctuation", "."], + "name", + ["operator", "!"], + + "\npayload", + ["punctuation", "."], + "name", + ["operator", "?"] +] +---------------------------------------------------- +Check for operators \ No newline at end of file diff --git a/tests/languages/dataweave/property_feature.test b/tests/languages/dataweave/property_feature.test new file mode 100644 index 0000000000..ee3148ebc3 --- /dev/null +++ b/tests/languages/dataweave/property_feature.test @@ -0,0 +1,53 @@ +{ + a: 123, + "My Name": true, + t#test : true, + "test" @(a: true): 2, + test#"test" @(a: true): 3 +} + +---------------------------------------------------- + +[ + ["punctuation", "{"], + + ["property", "a"], + ["punctuation", ":"], + ["number", "123"], + ["punctuation", ","], + + ["property", "\"My Name\""], + ["punctuation", ":"], + ["boolean", "true"], + ["punctuation", ","], + + ["property", "t#test"], + ["punctuation", ":"], + ["boolean", "true"], + ["punctuation", ","], + + ["property", "\"test\""], + ["punctuation", "@"], + ["punctuation", "("], + ["property", "a"], + ["punctuation", ":"], + ["boolean", "true"], + ["punctuation", ")"], + ["punctuation", ":"], + ["number", "2"], + ["punctuation", ","], + + ["property", "test#\"test\""], + ["punctuation", "@"], + ["punctuation", "("], + ["property", "a"], + ["punctuation", ":"], + ["boolean", "true"], + ["punctuation", ")"], + ["punctuation", ":"], + ["number", "3"], + + ["punctuation", "}"] +] +---------------------------------------------------- +Check for properties \ No newline at end of file diff --git a/tests/languages/dataweave/regex_feature.test b/tests/languages/dataweave/regex_feature.test new file mode 100644 index 0000000000..2ff1190c87 --- /dev/null +++ b/tests/languages/dataweave/regex_feature.test @@ -0,0 +1,15 @@ +/(asd)+?[a-Z]/ +/ / +/\w+\/\s*/ +/([0-1]?[0-9]):([0-5]?[0-9]):([0-5]?[0-9])/ + +---------------------------------------------------- + +[ + ["regex", "/(asd)+?[a-Z]/"], + ["regex", "/ /"], + ["regex", "/\\w+\\/\\s*/"], + ["regex", "/([0-1]?[0-9]):([0-5]?[0-9]):([0-5]?[0-9])/"] +] +---------------------------------------------------- +Check for regex \ No newline at end of file diff --git a/tests/languages/dataweave/string_feature.test b/tests/languages/dataweave/string_feature.test new file mode 100644 index 0000000000..854b3ca8d7 --- /dev/null +++ b/tests/languages/dataweave/string_feature.test @@ -0,0 +1,27 @@ +"" +"foo" +"foo\"bar\"baz" +"\u2642\\" +`hello` +'test' +"this is a multiline +test +that +can +be long" +"This string \r\n Should also \\ \t" + +---------------------------------------------------- + +[ + ["string", "\"\""], + ["string", "\"foo\""], + ["string", "\"foo\\\"bar\\\"baz\""], + ["string", "\"\\u2642\\\\\""], + ["string", "`hello`"], + ["string", "'test'"], + ["string", "\"this is a multiline\r\ntest\r\nthat \r\ncan \r\nbe long\""], + ["string", "\"This string \\r\\n Should also \\\\ \\t\""] +] +---------------------------------------------------- +Check for strings \ No newline at end of file From 0bb4f09646fca387a2042e3a320a563515fd9cd5 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Sat, 28 Nov 2020 23:05:53 +0100 Subject: [PATCH 0674/1100] JavaStackTrace: Added support stack frame element class loaders and modules (#2658) --- components/prism-javastacktrace.js | 54 ++++- components/prism-javastacktrace.min.js | 2 +- .../javastacktrace/stack-frame_feature.test | 201 +++++++++++++++++- 3 files changed, 246 insertions(+), 11 deletions(-) diff --git a/components/prism-javastacktrace.js b/components/prism-javastacktrace.js index 8c1b128ea1..51b4084b96 100644 --- a/components/prism-javastacktrace.js +++ b/components/prism-javastacktrace.js @@ -1,3 +1,6 @@ +// Specification: +// https://docs.oracle.com/en/java/javase/13/docs/api/java.base/java/lang/Throwable.html#printStackTrace() + Prism.languages.javastacktrace = { // java.sql.SQLException: Violation of unique constraint MY_ENTITY_UK_1: duplicate value(s) for column(s) MY_COLUMN in statement [...] @@ -38,12 +41,30 @@ Prism.languages.javastacktrace = { // at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1166) // at org.hsqldb.jdbc.Util.throwError(Unknown Source) here could be some notes + // at java.base/java.lang.Class.forName0(Native Method) // at Util.(Unknown Source) + // at com.foo.loader/foo@9.0/com.foo.Main.run(Main.java:101) + // at com.foo.loader//com.foo.bar.App.run(App.java:12) + // at acme@2.1/org.acme.Lib.test(Lib.java:80) + // at MyClass.mash(MyClass.java:9) + // + // More information: + // https://docs.oracle.com/en/java/javase/13/docs/api/java.base/java/lang/StackTraceElement.html#toString() + // + // A valid Java module name is defined as: + // "A module name consists of one or more Java identifiers (§3.8) separated by "." tokens." + // https://docs.oracle.com/javase/specs/jls/se9/html/jls-6.html#jls-ModuleName + // + // A Java module version is defined by this class: + // https://docs.oracle.com/javase/9/docs/api/java/lang/module/ModuleDescriptor.Version.html + // This is the implementation of the `parse` method in JDK13: + // https://github.com/matcdac/jdk/blob/2305df71d1b7710266ae0956d73927a225132c0f/src/java.base/share/classes/java/lang/module/ModuleDescriptor.java#L1108 + // However, to keep this simple, a version will be matched by the pattern /@[\w$.+-]*/. 'stack-frame': { - pattern: /^[\t ]*at [\w$.]+(?:)?\([^()]*\)/m, + pattern: /^[\t ]*at (?:[\w$./]|@[\w$.+-]*\/)+(?:)?\([^()]*\)/m, inside: { 'keyword': { - pattern: /^(\s*)at/, + pattern: /^(\s*)at(?= )/, lookbehind: true }, 'source': [ @@ -74,8 +95,33 @@ Prism.languages.javastacktrace = { ], 'class-name': /[\w$]+(?=\.(?:|[\w$]+)\()/, 'function': /(?:|[\w$]+)(?=\()/, - 'namespace': /[a-z]\w*/, - 'punctuation': /[.()]/ + 'class-loader': { + pattern: /(\s)[a-z]\w*(?:\.[a-z]\w*)*(?=\/[\w@$.]*\/)/, + lookbehind: true, + alias: 'namespace', + inside: { + 'punctuation': /\./ + } + }, + 'module': { + pattern: /([\s/])[a-z]\w*(?:\.[a-z]\w*)*(?:@[\w$.+-]*)?(?=\/)/, + lookbehind: true, + inside: { + 'version': { + pattern: /(@)[\s\S]+/, + lookbehind: true, + alias: 'number' + }, + 'punctuation': /[@.]/ + } + }, + 'namespace': { + pattern: /(?:[a-z]\w*\.)+/, + inside: { + 'punctuation': /\./ + } + }, + 'punctuation': /[()/.]/ } }, diff --git a/components/prism-javastacktrace.min.js b/components/prism-javastacktrace.min.js index fe64b1c2aa..6c731e264b 100644 --- a/components/prism-javastacktrace.min.js +++ b/components/prism-javastacktrace.min.js @@ -1 +1 @@ -Prism.languages.javastacktrace={summary:{pattern:/^[\t ]*(?:(?:Caused by:|Suppressed:|Exception in thread "[^"]*")[\t ]+)?[\w$.]+(?:\:.*)?$/m,inside:{keyword:{pattern:/^(\s*)(?:(?:Caused by|Suppressed)(?=:)|Exception in thread)/m,lookbehind:!0},string:{pattern:/^(\s*)"[^"]*"/,lookbehind:!0},exceptions:{pattern:/^(:?\s*)[\w$.]+(?=:|$)/,lookbehind:!0,inside:{"class-name":/[\w$]+(?=$|:)/,namespace:/[a-z]\w*/,punctuation:/[.:]/}},message:{pattern:/(:\s*)\S.*/,lookbehind:!0,alias:"string"},punctuation:/[:]/}},"stack-frame":{pattern:/^[\t ]*at [\w$.]+(?:)?\([^()]*\)/m,inside:{keyword:{pattern:/^(\s*)at/,lookbehind:!0},source:[{pattern:/(\()\w+.\w+:\d+(?=\))/,lookbehind:!0,inside:{file:/^\w+\.\w+/,punctuation:/:/,"line-number":{pattern:/\d+/,alias:"number"}}},{pattern:/(\()[^()]*(?=\))/,lookbehind:!0,inside:{keyword:/^(?:Unknown Source|Native Method)$/}}],"class-name":/[\w$]+(?=\.(?:|[\w$]+)\()/,function:/(?:|[\w$]+)(?=\()/,namespace:/[a-z]\w*/,punctuation:/[.()]/}},more:{pattern:/^[\t ]*\.{3} \d+ [a-z]+(?: [a-z]+)*/m,inside:{punctuation:/\.{3}/,number:/\d+/,keyword:/\b[a-z]+(?: [a-z]+)*\b/}}}; \ No newline at end of file +Prism.languages.javastacktrace={summary:{pattern:/^[\t ]*(?:(?:Caused by:|Suppressed:|Exception in thread "[^"]*")[\t ]+)?[\w$.]+(?:\:.*)?$/m,inside:{keyword:{pattern:/^(\s*)(?:(?:Caused by|Suppressed)(?=:)|Exception in thread)/m,lookbehind:!0},string:{pattern:/^(\s*)"[^"]*"/,lookbehind:!0},exceptions:{pattern:/^(:?\s*)[\w$.]+(?=:|$)/,lookbehind:!0,inside:{"class-name":/[\w$]+(?=$|:)/,namespace:/[a-z]\w*/,punctuation:/[.:]/}},message:{pattern:/(:\s*)\S.*/,lookbehind:!0,alias:"string"},punctuation:/[:]/}},"stack-frame":{pattern:/^[\t ]*at (?:[\w$./]|@[\w$.+-]*\/)+(?:)?\([^()]*\)/m,inside:{keyword:{pattern:/^(\s*)at(?= )/,lookbehind:!0},source:[{pattern:/(\()\w+.\w+:\d+(?=\))/,lookbehind:!0,inside:{file:/^\w+\.\w+/,punctuation:/:/,"line-number":{pattern:/\d+/,alias:"number"}}},{pattern:/(\()[^()]*(?=\))/,lookbehind:!0,inside:{keyword:/^(?:Unknown Source|Native Method)$/}}],"class-name":/[\w$]+(?=\.(?:|[\w$]+)\()/,function:/(?:|[\w$]+)(?=\()/,"class-loader":{pattern:/(\s)[a-z]\w*(?:\.[a-z]\w*)*(?=\/[\w@$.]*\/)/,lookbehind:!0,alias:"namespace",inside:{punctuation:/\./}},module:{pattern:/([\s/])[a-z]\w*(?:\.[a-z]\w*)*(?:@[\w$.+-]*)?(?=\/)/,lookbehind:!0,inside:{version:{pattern:/(@)[\s\S]+/,lookbehind:!0,alias:"number"},punctuation:/[@.]/}},namespace:{pattern:/(?:[a-z]\w*\.)+/,inside:{punctuation:/\./}},punctuation:/[()/.]/}},more:{pattern:/^[\t ]*\.{3} \d+ [a-z]+(?: [a-z]+)*/m,inside:{punctuation:/\.{3}/,number:/\d+/,keyword:/\b[a-z]+(?: [a-z]+)*\b/}}}; \ No newline at end of file diff --git a/tests/languages/javastacktrace/stack-frame_feature.test b/tests/languages/javastacktrace/stack-frame_feature.test index b4c400e458..3952815467 100644 --- a/tests/languages/javastacktrace/stack-frame_feature.test +++ b/tests/languages/javastacktrace/stack-frame_feature.test @@ -2,6 +2,15 @@ at Main.main(Main.java:13) at Main.main(Main.java:13) Same but with some additional notes at com.foo.bar.Main$FooBar.main(Native Method) at Main$FooBar.(Unknown Source) + at java.base/java.util.jar.JavaUtilJarAccessImpl.ensureInitialization(JavaUtilJarAccessImpl.java:69) + at java.base/java.lang.Class.forName0(Native Method) +at com.foo.loader/foo@9.0/com.foo.Main.run(Main.java:101) +at com.foo.loader//com.foo.bar.App.run(App.java:12) +at acme@2.1/org.acme.Lib.test(Lib.java:80) +at MyClass.mash(MyClass.java:9) + +// not to forget our swiss friends +at at.foo.bar.Main$FooBar.main(Native Method) ---------------------------------------------------- @@ -37,12 +46,14 @@ at Main$FooBar.(Unknown Source) ["stack-frame", [ ["keyword", "at"], - ["namespace", "com"], - ["punctuation", "."], - ["namespace", "foo"], - ["punctuation", "."], - ["namespace", "bar"], - ["punctuation", "."], + ["namespace", [ + "com", + ["punctuation", "."], + "foo", + ["punctuation", "."], + "bar", + ["punctuation", "."] + ]], ["class-name", "Main$FooBar"], ["punctuation", "."], ["function", "main"], @@ -63,6 +74,184 @@ at Main$FooBar.(Unknown Source) ["keyword", "Unknown Source"] ]], ["punctuation", ")"] + ]], + + ["stack-frame", [ + ["keyword", "at"], + ["module", [ + "java", + ["punctuation", "."], + "base" + ]], + ["punctuation", "/"], + ["namespace", [ + "java", + ["punctuation", "."], + "util", + ["punctuation", "."], + "jar", + ["punctuation", "."] + ]], + ["class-name", "JavaUtilJarAccessImpl"], + ["punctuation", "."], + ["function", "ensureInitialization"], + ["punctuation", "("], + ["source", [ + ["file", "JavaUtilJarAccessImpl.java"], + ["punctuation", ":"], + ["line-number", "69"] + ]], + ["punctuation", ")"] + ]], + + ["stack-frame", [ + ["keyword", "at"], + ["module", [ + "java", + ["punctuation", "."], + "base" + ]], + ["punctuation", "/"], + ["namespace", [ + "java", + ["punctuation", "."], + "lang", + ["punctuation", "."] + ]], + ["class-name", "Class"], + ["punctuation", "."], + ["function", "forName0"], + ["punctuation", "("], + ["source", [ + ["keyword", "Native Method"] + ]], + ["punctuation", ")"] + ]], + + ["stack-frame", [ + ["keyword", "at"], + ["class-loader", [ + "com", + ["punctuation", "."], + "foo", + ["punctuation", "."], + "loader" + ]], + ["punctuation", "/"], + ["module", [ + "foo", + ["punctuation", "@"], + ["version", "9.0"] + ]], + ["punctuation", "/"], + ["namespace", [ + "com", + ["punctuation", "."], + "foo", + ["punctuation", "."] + ]], + ["class-name", "Main"], + ["punctuation", "."], + ["function", "run"], + ["punctuation", "("], + ["source", [ + ["file", "Main.java"], + ["punctuation", ":"], + ["line-number", "101"] + ]], + ["punctuation", ")"] + ]], + + ["stack-frame", [ + ["keyword", "at"], + ["class-loader", [ + "com", + ["punctuation", "."], + "foo", + ["punctuation", "."], + "loader" + ]], + ["punctuation", "/"], + ["punctuation", "/"], + ["namespace", [ + "com", + ["punctuation", "."], + "foo", + ["punctuation", "."], + "bar", + ["punctuation", "."] + ]], + ["class-name", "App"], + ["punctuation", "."], + ["function", "run"], + ["punctuation", "("], + ["source", [ + ["file", "App.java"], + ["punctuation", ":"], + ["line-number", "12"] + ]], + ["punctuation", ")"] + ]], + + ["stack-frame", [ + ["keyword", "at"], + ["module", [ + "acme", + ["punctuation", "@"], + ["version", "2.1"] + ]], + ["punctuation", "/"], + ["namespace", [ + "org", + ["punctuation", "."], + "acme", + ["punctuation", "."] + ]], + ["class-name", "Lib"], + ["punctuation", "."], + ["function", "test"], + ["punctuation", "("], + ["source", [ + ["file", "Lib.java"], + ["punctuation", ":"], + ["line-number", "80"] + ]], + ["punctuation", ")"] + ]], + + ["stack-frame", [ + ["keyword", "at"], + ["class-name", "MyClass"], + ["punctuation", "."], + ["function", "mash"], + ["punctuation", "("], + ["source", [ + ["file", "MyClass.java"], + ["punctuation", ":"], + ["line-number", "9"] + ]], + ["punctuation", ")"] + ]], + + "\n\n// not to forget our swiss friends\n", + ["stack-frame", [ + ["keyword", "at"], + ["namespace", [ + "at", + ["punctuation", "."], + "foo", + ["punctuation", "."], + "bar", + ["punctuation", "."] + ]], + ["class-name", "Main$FooBar"], + ["punctuation", "."], + ["function", "main"], + ["punctuation", "("], + ["source", [ + ["keyword", "Native Method"] + ]], + ["punctuation", ")"] ]] ] From 8e6604956c37a68f7d8a808bef362ee79d4d1708 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Sat, 28 Nov 2020 23:07:22 +0100 Subject: [PATCH 0675/1100] Website: Added and updated documentation (#2654) I updated a few of the entries in the "Full list of features" section (consistent formatting, a bit of grammar, nothing big). For some reason, we had both - "Highlights embedded languages (e.g. CSS inside HTML, JavaScript inside HTML)" and - "Highlights nested languages (CSS in HTML, JavaScript in HTML)" in there. They are sort of the same, so I removed one. I also added a note regarding escaping and gave the manual highlighting section its own heading. --- assets/style.css | 10 ++++------ index.html | 41 +++++++++++++++++++++++++++-------------- 2 files changed, 31 insertions(+), 20 deletions(-) diff --git a/assets/style.css b/assets/style.css index e86e07409a..d9538a830b 100644 --- a/assets/style.css +++ b/assets/style.css @@ -75,11 +75,13 @@ p { } section h1, -h2 { +h2, +h3 { margin: 1em 0 .3em; } -h2 { +h2, +h3 { font-weight: normal; } @@ -141,10 +143,6 @@ footer:before { background-repeat: repeat-x; background-image: linear-gradient(45deg, transparent 34%, white 34%, white 66%, transparent 66%), linear-gradient(135deg, transparent 34%, white 34%, white 66%, transparent 66%); -} - -header { - } header .intro, diff --git a/index.html b/index.html index 5b0b5350e9..7fe63216ba 100644 --- a/index.html +++ b/index.html @@ -95,19 +95,23 @@

            Full list of features

            Prism forces you to use the correct element for marking up code: <code>. On its own for inline code, or inside a <pre> for blocks of code. In addition, the language is defined through the way recommended in the HTML5 draft: through a language-xxxx class. -
          • The language definition is inherited. This means that if multiple code snippets have the same language, you can just define it once, in one of their common ancestors.
          • -
          • Supports parallelism with Web Workers, if available. Disabled by default (why?).
          • -
          • Very easy to extend without modifying the code, due to Prism’s plugin architecture. Multiple hooks are scattered throughout the source.
          • -
          • Very easy to define new languages. Only thing you need is a good understanding of regular expressions
          • -
          • All styling is done through CSS, with sensible class names rather than ugly namespaced abbreviated nonsense.
          • -
          • Wide browser support: Edge, IE11, Firefox, Chrome, Safari, Opera, most Mobile browsers
          • -
          • Highlights embedded languages (e.g. CSS inside HTML, JavaScript inside HTML)
          • -
          • Highlights inline code as well, not just code blocks
          • -
          • Highlights nested languages (CSS in HTML, JavaScript in HTML)
          • -
          • It doesn’t force you to use any Prism-specific markup, not even a Prism-specific class name, only standard markup you should be using anyway. So, you can just try it for a while, remove it if you don’t like it and leave no traces behind.
          • -
          • Highlight specific lines and/or line ranges (requires plugin)
          • -
          • Show invisible characters like tabs, line breaks etc (requires plugin)
          • -
          • Autolink URLs and emails, use Markdown links in comments (requires plugin)
          • +
          • The language-xxxx class is inherited. + This means that if multiple code snippets have the same language, you can just define it once,in one of their common ancestors.
          • +
          • Supports parallelism with Web Workers, if available. + Disabled by default (why?).
          • +
          • Very easy to extend without modifying the code, due to Prism’s plugin architecture. + Multiple hooks are scattered throughout the source.
          • +
          • Very easy to define new languages. + The only thing you need is a good understanding of regular expressions.
          • +
          • All styling is done through CSS, with sensible class names rather than ugly, namespaced, abbreviated nonsense.
          • +
          • Wide browser support: Edge, IE11, Firefox, Chrome, Safari, Opera, most mobile browsers.
          • +
          • Highlights embedded languages (e.g. CSS inside HTML, JavaScript inside HTML).
          • +
          • Highlights inline code as well, not just code blocks.
          • +
          • It doesn’t force you to use any Prism-specific markup, not even a Prism-specific class name, only standard markup you should be using anyway. + So, you can just try it for a while, remove it if you don’t like it and leave no traces behind.
          • +
          • Highlight specific lines and/or line ranges (requires plugin).
          • +
          • Show invisible characters like tabs, line breaks etc (requires plugin).
          • +
          • Autolink URLs and emails, use Markdown links in comments (requires plugin).
          @@ -147,13 +151,22 @@

          Basic usage

          The recommended way to mark up a code block (both for semantics and for Prism) is a <pre> element with a <code> element inside, like so:

          +
          <pre><code class="language-css">p { color: red }</code></pre>
          +

          If you use that pattern, the <pre> will automatically get the language-xxxx class (if it doesn’t already have it) and will be styled as a code block.

          -

          If you want to prevent any elements from being automatically highlighted and instead use the API, you can set Prism.manual to true before the DOMContentLoaded event is fired. By setting the data-manual attribute on the <script> element containing Prism core, this will be done automatically. +

          Note: You have to escape all < and & characters inside <code> elements with &lt; and &amp; respectively, or else the browser might interpret them as an HTML tag or entity. If you have large portions of HTML code, you can use the Unescaped Markup plugin to work around this.

          + +

          Manual highlighting

          + +

          If you want to prevent any elements from being automatically highlighted and instead use the API, you can set Prism.manual to true before the DOMContentLoaded event is fired. By setting the data-manual attribute on the <script> element containing Prism core, this will be done automatically. Example:

          +
          <script src="prism.js" data-manual></script>
          +

          or

          +
          <script>
           window.Prism = window.Prism || {};
           window.Prism.manual = true;
          
          From add3736a57320c8d6d30e58c4f84cef3eef4e8b9 Mon Sep 17 00:00:00 2001
          From: Michael Schmidt 
          Date: Sat, 28 Nov 2020 23:11:58 +0100
          Subject: [PATCH 0676/1100] Unescaped Markup: More doc regarding comments
           (#2652)
          
          This makes the explanation of the usage of comments clearer and gives examples.
          ---
           plugins/unescaped-markup/index.html | 18 +++++++++++++-----
           1 file changed, 13 insertions(+), 5 deletions(-)
          
          diff --git a/plugins/unescaped-markup/index.html b/plugins/unescaped-markup/index.html
          index 5efc7ab795..a0309096e8 100644
          --- a/plugins/unescaped-markup/index.html
          +++ b/plugins/unescaped-markup/index.html
          @@ -24,15 +24,23 @@ 

          How to use

          This plugin provides several methods of achieving the same thing:

            -
          • Instead of using <pre><code> elements, use <script type="text/plain"> -
            <script type="text/plain" class="language-markup">
            +		
          • + Instead of using <pre><code> elements, use <script type="text/plain">: + +
            <script type="text/plain" class="language-markup">
             <p>Example</p>
             </script>
          • -
          • Use a HTML-comment to escape your code -
            <pre class="language-markup"><code><!--
            +		
          • + Use an HTML-comment to escape your code: + +
            <pre class="language-markup"><code><!--
             <p>Example</p>
            ---></code></pre>
          • +--></code></pre>
            + + This will only work if the code element contains exactly one comment and nothing else (not even spaces). + E.g. <code> <!-- some text --></code> and <code>text<!-- more text --></code> will not work. +
          From 8e76a978f60cdb5a9c8b5ca3003110682ba7dc9f Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Sat, 28 Nov 2020 23:23:46 +0100 Subject: [PATCH 0677/1100] Shell-session: Fixed false positives because of links in command output (#2649) --- components/prism-shell-session.js | 30 ++++---- components/prism-shell-session.min.js | 2 +- .../languages/shell-session/info_feature.test | 41 +++++------ tests/languages/shell-session/issue2644.test | 69 +++++++++++++++++++ 4 files changed, 104 insertions(+), 38 deletions(-) create mode 100644 tests/languages/shell-session/issue2644.test diff --git a/components/prism-shell-session.js b/components/prism-shell-session.js index ce0b2fe05e..d3d07af539 100644 --- a/components/prism-shell-session.js +++ b/components/prism-shell-session.js @@ -14,24 +14,24 @@ ].join('|'); Prism.languages['shell-session'] = { - 'info': { - // foo@bar:~/files$ exit - // foo@bar$ exit - pattern: /^[^\r\n$#*!]+(?=[$#])/m, - alias: 'punctuation', - inside: { - 'path': { - pattern: /(:)[\s\S]+/, - lookbehind: true - }, - 'user': /^[^\s@:$#*!/\\]+@[^\s@:$#*!/\\]+(?=:|$)/, - 'punctuation': /:/ - } - }, 'command': { - pattern: RegExp(/[$#](?:[^\\\r\n'"<]|\\.|<>)+/.source.replace(/<>/g, function () { return strings; })), + pattern: RegExp(/^(?:[^\s@:$#*!/\\]+@[^\s@:$#*!/\\]+(?::[^\0-\x1F$#*?"<>:;|]+)?)?[$#](?:[^\\\r\n'"<]|\\.|<>)+/.source.replace(/<>/g, function () { return strings; }), 'm'), greedy: true, inside: { + 'info': { + // foo@bar:~/files$ exit + // foo@bar$ exit + pattern: /^[^#$]+/, + alias: 'punctuation', + inside: { + 'path': { + pattern: /(:)[\s\S]+/, + lookbehind: true + }, + 'user': /^[^:]+/, + 'punctuation': /:/ + } + }, 'bash': { pattern: /(^[$#]\s*)[\s\S]+/, lookbehind: true, diff --git a/components/prism-shell-session.min.js b/components/prism-shell-session.min.js index f066a64b2a..86fc617d64 100644 --- a/components/prism-shell-session.min.js +++ b/components/prism-shell-session.min.js @@ -1 +1 @@ -!function(s){var n=["([\"'])(?:\\\\[^]|\\$\\([^)]+\\)|\\$(?!\\()|`[^`]+`|(?!\\1)[^\\\\`$])*\\1","<<-?\\s*([\"']?)(\\w+)\\2\\s[^]*?[\r\n]\\3"].join("|");s.languages["shell-session"]={info:{pattern:/^[^\r\n$#*!]+(?=[$#])/m,alias:"punctuation",inside:{path:{pattern:/(:)[\s\S]+/,lookbehind:!0},user:/^[^\s@:$#*!/\\]+@[^\s@:$#*!/\\]+(?=:|$)/,punctuation:/:/}},command:{pattern:RegExp("[$#](?:[^\\\\\r\n'\"<]|\\\\.|<>)+".replace(/<>/g,function(){return n})),greedy:!0,inside:{bash:{pattern:/(^[$#]\s*)[\s\S]+/,lookbehind:!0,alias:"language-bash",inside:s.languages.bash},"shell-symbol":{pattern:/^[$#]/,alias:"important"}}},output:/.(?:.*(?:[\r\n]|.$))*/},s.languages["sh-session"]=s.languages.shellsession=s.languages["shell-session"]}(Prism); \ No newline at end of file +!function(s){var n=["([\"'])(?:\\\\[^]|\\$\\([^)]+\\)|\\$(?!\\()|`[^`]+`|(?!\\1)[^\\\\`$])*\\1","<<-?\\s*([\"']?)(\\w+)\\2\\s[^]*?[\r\n]\\3"].join("|");s.languages["shell-session"]={command:{pattern:RegExp('^(?:[^\\s@:$#*!/\\\\]+@[^\\s@:$#*!/\\\\]+(?::[^\0-\\x1F$#*?"<>:;|]+)?)?[$#](?:[^\\\\\r\n\'"<]|\\\\.|<>)+'.replace(/<>/g,function(){return n}),"m"),greedy:!0,inside:{info:{pattern:/^[^#$]+/,alias:"punctuation",inside:{path:{pattern:/(:)[\s\S]+/,lookbehind:!0},user:/^[^:]+/,punctuation:/:/}},bash:{pattern:/(^[$#]\s*)[\s\S]+/,lookbehind:!0,alias:"language-bash",inside:s.languages.bash},"shell-symbol":{pattern:/^[$#]/,alias:"important"}}},output:/.(?:.*(?:[\r\n]|.$))*/},s.languages["sh-session"]=s.languages.shellsession=s.languages["shell-session"]}(Prism); \ No newline at end of file diff --git a/tests/languages/shell-session/info_feature.test b/tests/languages/shell-session/info_feature.test index 446c8b3910..fbb6e4b2b1 100644 --- a/tests/languages/shell-session/info_feature.test +++ b/tests/languages/shell-session/info_feature.test @@ -9,25 +9,24 @@ foo@bar$ exit ---------------------------------------------------- [ - ["info", [ - ["user", "foo@bar"], - ["punctuation", ":"], - ["path", "/var/local"] - ]], ["command", [ + ["info", [ + ["user", "foo@bar"], + ["punctuation", ":"], + ["path", "/var/local"] + ]], ["shell-symbol", "$"], ["bash", [ ["builtin", "cd"], " ~" ]] ]], - - ["info", [ - ["user", "foo@bar"], - ["punctuation", ":"], - ["path", "~"] - ]], ["command", [ + ["info", [ + ["user", "foo@bar"], + ["punctuation", ":"], + ["path", "~"] + ]], ["shell-symbol", "$"], ["bash", [ ["function", "sudo"], @@ -35,13 +34,12 @@ foo@bar$ exit ]] ]], ["output", "[sudo] password for foo:\r\n"], - - ["info", [ - ["user", "root@bar"], - ["punctuation", ":"], - ["path", "~"] - ]], ["command", [ + ["info", [ + ["user", "root@bar"], + ["punctuation", ":"], + ["path", "~"] + ]], ["shell-symbol", "#"], ["bash", [ ["builtin", "echo"], @@ -51,11 +49,10 @@ foo@bar$ exit ]] ]], ["output", "hello!\r\n\r\n"], - - ["info", [ - ["user", "foo@bar"] - ]], ["command", [ + ["info", [ + ["user", "foo@bar"] + ]], ["shell-symbol", "$"], ["bash", [ ["builtin", "exit"] @@ -65,4 +62,4 @@ foo@bar$ exit ---------------------------------------------------- -Checks for the info bash outputs. +Checks for the info bash outputs. \ No newline at end of file diff --git a/tests/languages/shell-session/issue2644.test b/tests/languages/shell-session/issue2644.test new file mode 100644 index 0000000000..ff2c2b2f6a --- /dev/null +++ b/tests/languages/shell-session/issue2644.test @@ -0,0 +1,69 @@ +$ export BORG_PASSCOMMAND="security find-generic-password -a $USER -s borg-passphrase -w" +$ export BORG_RSH="ssh -i ~/.ssh/borg" +$ borg init --encryption=keyfile-blake2 "borg@1.2.3.4:backup" + +By default repositories initialized with this version will produce security +errors if written to with an older version (up to and including Borg 1.0.8). + +If you want to use these older versions, you can disable the check by running: +borg upgrade --disable-tam ssh://borg@1.2.3.4/./backup + +See https://borgbackup.readthedocs.io/en/stable/changes.html#pre-1-0-9-manifest-spoofing-vulnerability for details about the security implications. + +IMPORTANT: you will need both KEY AND PASSPHRASE to access this repo! +Use "borg key export" to export the key, optionally in printable format. +Write down the passphrase. Store both at safe place(s). + +--- + +---------------------------------------------------- + +[ + ["command", [ + ["shell-symbol", "$"], + ["bash", [ + ["builtin", "export"], + ["assign-left", [ + "BORG_PASSCOMMAND" + ]], + ["operator", [ + "=" + ]], + ["string", [ + "\"security find-generic-password -a ", + ["environment", "$USER"], + " -s borg-passphrase -w\"" + ]] + ]] + ]], + ["command", [ + ["shell-symbol", "$"], + ["bash", [ + ["builtin", "export"], + ["assign-left", [ + "BORG_RSH" + ]], + ["operator", [ + "=" + ]], + ["string", [ + "\"ssh -i ~/.ssh/borg\"" + ]] + ]] + ]], + ["command", [ + ["shell-symbol", "$"], + ["bash", [ + "borg init --encryption", + ["operator", [ + "=" + ]], + "keyfile-blake2 ", + ["string", [ + "\"borg@1.2.3.4:backup\"" + ]] + ]] + ]], + + ["output", "By default repositories initialized with this version will produce security\nerrors if written to with an older version (up to and including Borg 1.0.8).\n\nIf you want to use these older versions, you can disable the check by running:\nborg upgrade --disable-tam ssh://borg@1.2.3.4/./backup\n\nSee https://borgbackup.readthedocs.io/en/stable/changes.html#pre-1-0-9-manifest-spoofing-vulnerability for details about the security implications.\n\nIMPORTANT: you will need both KEY AND PASSPHRASE to access this repo!\nUse \"borg key export\" to export the key, optionally in printable format.\nWrite down the passphrase. Store both at safe place(s).\n\n---"] +] \ No newline at end of file From 05afbb105ae6a9e6c59c7727b0d816f212dbcba0 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Sun, 29 Nov 2020 00:12:15 +0100 Subject: [PATCH 0678/1100] Added test for exponential backtracking (#2590) This adds a simple test to detect certain causes of exponential backtracking. --- package-lock.json | 600 ++--------------------------------------- package.json | 1 + tests/pattern-tests.js | 168 +++++++++++- 3 files changed, 189 insertions(+), 580 deletions(-) diff --git a/package-lock.json b/package-lock.json index d22a9454a9..b7667e1657 100644 --- a/package-lock.json +++ b/package-lock.json @@ -699,16 +699,6 @@ "integrity": "sha512-xVNN69YGDghOqCCtA6FI7avYrr02mTJjOgB0/f1VPD3pJC8QEvjTKWc4epDx8AqxxA75NI0QpVM2gPJXUbE4Tg==", "dev": true }, - "bindings": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", - "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", - "dev": true, - "optional": true, - "requires": { - "file-uri-to-path": "1.0.0" - } - }, "bluebird": { "version": "3.7.2", "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", @@ -1894,13 +1884,6 @@ "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", "dev": true }, - "file-uri-to-path": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", - "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==", - "dev": true, - "optional": true - }, "fill-range": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", @@ -2056,562 +2039,11 @@ "dev": true }, "fsevents": { - "version": "1.2.11", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.11.tgz", - "integrity": "sha512-+ux3lx6peh0BpvY0JebGyZoiR4D+oYzdPZMKJwkZ+sFkNJzpL7tXc/wehS49gUAxg3tmMHPHZkA8JU2rhhgDHw==", + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.13.tgz", + "integrity": "sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==", "dev": true, - "optional": true, - "requires": { - "bindings": "^1.5.0", - "nan": "^2.12.1", - "node-pre-gyp": "*" - }, - "dependencies": { - "abbrev": { - "version": "1.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "ansi-regex": { - "version": "2.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "aproba": { - "version": "1.2.0", - "bundled": true, - "dev": true, - "optional": true - }, - "are-we-there-yet": { - "version": "1.1.5", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "delegates": "^1.0.0", - "readable-stream": "^2.0.6" - } - }, - "balanced-match": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "brace-expansion": { - "version": "1.1.11", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "chownr": { - "version": "1.1.3", - "bundled": true, - "dev": true, - "optional": true - }, - "code-point-at": { - "version": "1.1.0", - "bundled": true, - "dev": true, - "optional": true - }, - "concat-map": { - "version": "0.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "console-control-strings": { - "version": "1.1.0", - "bundled": true, - "dev": true, - "optional": true - }, - "core-util-is": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "debug": { - "version": "3.2.6", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "ms": "^2.1.1" - } - }, - "deep-extend": { - "version": "0.6.0", - "bundled": true, - "dev": true, - "optional": true - }, - "delegates": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "detect-libc": { - "version": "1.0.3", - "bundled": true, - "dev": true, - "optional": true - }, - "fs-minipass": { - "version": "1.2.7", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "minipass": "^2.6.0" - } - }, - "fs.realpath": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "gauge": { - "version": "2.7.4", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "aproba": "^1.0.3", - "console-control-strings": "^1.0.0", - "has-unicode": "^2.0.0", - "object-assign": "^4.1.0", - "signal-exit": "^3.0.0", - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1", - "wide-align": "^1.1.0" - } - }, - "glob": { - "version": "7.1.6", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "has-unicode": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "iconv-lite": { - "version": "0.4.24", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "safer-buffer": ">= 2.1.2 < 3" - } - }, - "ignore-walk": { - "version": "3.0.3", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "minimatch": "^3.0.4" - } - }, - "inflight": { - "version": "1.0.6", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.4", - "bundled": true, - "dev": true, - "optional": true - }, - "ini": { - "version": "1.3.5", - "bundled": true, - "dev": true, - "optional": true - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "isarray": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "minimatch": { - "version": "3.0.4", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "minimist": { - "version": "0.0.8", - "bundled": true, - "dev": true, - "optional": true - }, - "minipass": { - "version": "2.9.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "safe-buffer": "^5.1.2", - "yallist": "^3.0.0" - } - }, - "minizlib": { - "version": "1.3.3", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "minipass": "^2.9.0" - } - }, - "mkdirp": { - "version": "0.5.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "minimist": "0.0.8" - } - }, - "ms": { - "version": "2.1.2", - "bundled": true, - "dev": true, - "optional": true - }, - "needle": { - "version": "2.4.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "debug": "^3.2.6", - "iconv-lite": "^0.4.4", - "sax": "^1.2.4" - } - }, - "node-pre-gyp": { - "version": "0.14.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "detect-libc": "^1.0.2", - "mkdirp": "^0.5.1", - "needle": "^2.2.1", - "nopt": "^4.0.1", - "npm-packlist": "^1.1.6", - "npmlog": "^4.0.2", - "rc": "^1.2.7", - "rimraf": "^2.6.1", - "semver": "^5.3.0", - "tar": "^4.4.2" - } - }, - "nopt": { - "version": "4.0.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "abbrev": "1", - "osenv": "^0.1.4" - } - }, - "npm-bundled": { - "version": "1.1.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "npm-normalize-package-bin": "^1.0.1" - } - }, - "npm-normalize-package-bin": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "npm-packlist": { - "version": "1.4.7", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "ignore-walk": "^3.0.1", - "npm-bundled": "^1.0.1" - } - }, - "npmlog": { - "version": "4.1.2", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "are-we-there-yet": "~1.1.2", - "console-control-strings": "~1.1.0", - "gauge": "~2.7.3", - "set-blocking": "~2.0.0" - } - }, - "number-is-nan": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "object-assign": { - "version": "4.1.1", - "bundled": true, - "dev": true, - "optional": true - }, - "once": { - "version": "1.4.0", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "wrappy": "1" - } - }, - "os-homedir": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "os-tmpdir": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "osenv": { - "version": "0.1.5", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "os-homedir": "^1.0.0", - "os-tmpdir": "^1.0.0" - } - }, - "path-is-absolute": { - "version": "1.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "process-nextick-args": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "rc": { - "version": "1.2.8", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "deep-extend": "^0.6.0", - "ini": "~1.3.0", - "minimist": "^1.2.0", - "strip-json-comments": "~2.0.1" - }, - "dependencies": { - "minimist": { - "version": "1.2.0", - "bundled": true, - "dev": true, - "optional": true - } - } - }, - "readable-stream": { - "version": "2.3.6", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "rimraf": { - "version": "2.7.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "glob": "^7.1.3" - } - }, - "safe-buffer": { - "version": "5.1.2", - "bundled": true, - "dev": true, - "optional": true - }, - "safer-buffer": { - "version": "2.1.2", - "bundled": true, - "dev": true, - "optional": true - }, - "sax": { - "version": "1.2.4", - "bundled": true, - "dev": true, - "optional": true - }, - "semver": { - "version": "5.7.1", - "bundled": true, - "dev": true, - "optional": true - }, - "set-blocking": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "optional": true - }, - "signal-exit": { - "version": "3.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "string-width": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - } - }, - "string_decoder": { - "version": "1.1.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "safe-buffer": "~5.1.0" - } - }, - "strip-ansi": { - "version": "3.0.1", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "strip-json-comments": { - "version": "2.0.1", - "bundled": true, - "dev": true, - "optional": true - }, - "tar": { - "version": "4.4.13", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "chownr": "^1.1.1", - "fs-minipass": "^1.2.5", - "minipass": "^2.8.6", - "minizlib": "^1.2.1", - "mkdirp": "^0.5.0", - "safe-buffer": "^5.1.2", - "yallist": "^3.0.3" - } - }, - "util-deprecate": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "wide-align": { - "version": "1.1.3", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "string-width": "^1.0.2 || 2" - } - }, - "wrappy": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "optional": true - }, - "yallist": { - "version": "3.1.1", - "bundled": true, - "dev": true, - "optional": true - } - } + "optional": true }, "function-bind": { "version": "1.1.1", @@ -4399,13 +3831,6 @@ "integrity": "sha512-kDcwXR4PS7caBpuRYYBUz9iVixUk3anO3f5OYFiIPwK/20vCzKCHyKoulbiDY1S53zD2bxUpxN/IJ+TnXjfvxg==", "dev": true }, - "nan": { - "version": "2.14.0", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.0.tgz", - "integrity": "sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg==", - "dev": true, - "optional": true - }, "nanomatch": { "version": "1.2.13", "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", @@ -5138,6 +4563,23 @@ "resolve": "^1.1.6" } }, + "refa": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/refa/-/refa-0.5.0.tgz", + "integrity": "sha512-080Hrd8Z8v9Audgt1WpopjMM8ai1umraSzgMvLxgCEt+B9HhguhKBmQkjnE5+1p5WLtWQdr2rGE2c80gYvi9uQ==", + "dev": true, + "requires": { + "regexpp": "^3.1.0" + }, + "dependencies": { + "regexpp": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.1.0.tgz", + "integrity": "sha512-ZOIzd8yVsQQA7j8GCSlPGXwg5PfmA1mrq0JP4nGhh54LaKN3xdai/vHUDu74pKwV8OxseMS65u2NImosQcSD0Q==", + "dev": true + } + } + }, "regenerator-runtime": { "version": "0.13.7", "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.7.tgz", diff --git a/package.json b/package.json index c48a5bd3b1..337817672a 100755 --- a/package.json +++ b/package.json @@ -48,6 +48,7 @@ "jsdom": "^13.0.0", "mocha": "^6.2.0", "pump": "^3.0.0", + "refa": "0.5.0", "regexpp": "^2.0.1", "simple-git": "^1.107.0", "yargs": "^13.2.2" diff --git a/tests/pattern-tests.js b/tests/pattern-tests.js index 15272c9002..0f6da8e6ce 100644 --- a/tests/pattern-tests.js +++ b/tests/pattern-tests.js @@ -5,7 +5,14 @@ const PrismLoader = require('./helper/prism-loader'); const { BFS, parseRegex } = require('./helper/util'); const { languages } = require('../components.json'); const { visitRegExpAST } = require('regexpp'); +const { JS, Words, NFA } = require('refa'); +/** + * A set of all safe (non-exponentially-backtracking) RegExp literals (string). + * + * @type {Set} + */ +const safeRegexes = new Set(); for (const lang in languages) { if (lang === 'meta') { @@ -52,7 +59,10 @@ for (const lang in languages) { * @param {any} Prism * * @typedef {import("./helper/util").LiteralAST} LiteralAST + * @typedef {import("regexpp/ast").CapturingGroup} CapturingGroup * @typedef {import("regexpp/ast").Element} Element + * @typedef {import("regexpp/ast").Group} Group + * @typedef {import("regexpp/ast").LookaroundAssertion} LookaroundAssertion * @typedef {import("regexpp/ast").Pattern} Pattern */ function testPatterns(Prism) { @@ -132,7 +142,7 @@ function testPatterns(Prism) { * @param {(values: ForEachCapturingGroupCallbackValue) => void} callback * * @typedef ForEachCapturingGroupCallbackValue - * @property {import("regexpp/ast").CapturingGroup} group + * @property {CapturingGroup} group * @property {number} number Note: Starts at 1. */ function forEachCapturingGroup(pattern, callback) { @@ -205,6 +215,32 @@ function testPatterns(Prism) { } } + /** + * Returns whether the given node either is or is a child of what is effectively a Kleene star. + * + * @param {import("regexpp/ast").Node} node + * @returns {boolean} + */ + function underAStar(node) { + if (node.type === "Quantifier" && node.max > 10) { + return true; + } else if (node.parent) { + return underAStar(node.parent); + } else { + return false; + } + } + + /** + * @param {Iterable} iter + * @returns {T | undefined} + * @template T + */ + function firstOf(iter) { + const [first] = iter; + return first; + } + it('- should not match the empty string', function () { forEachPattern(({ pattern, tokenPath }) => { @@ -338,4 +374,134 @@ function testPatterns(Prism) { }); }); + it('- should not cause exponential backtracking', function () { + forEachPattern(({ pattern, ast, tokenPath }) => { + const patternStr = String(pattern); + if (safeRegexes.has(patternStr)) { + // we know that the pattern won't cause exp backtracking because we checked before + return; + } + + const parser = JS.Parser.fromAst(ast); + /** + * Parses the given element and creates its NFA. + * + * @param {import("refa").JS.ParsableElement} element + * @returns {NFA} + */ + function toNFA(element) { + const { expression, maxCharacter } = parser.parseElement(element, { + backreferences: "resolve", + lookarounds: "disable", + }); + return NFA.fromRegex(expression, { maxCharacter }); + } + + /** + * Checks whether the alternatives of the given node are disjoint. If the alternatives are not disjoint + * and the give node is a descendant of an effective Kleene star, then an error will be thrown. + * + * @param {CapturingGroup | Group | LookaroundAssertion} node + * @returns {void} + */ + function checkDisjointAlternatives(node) { + if (!underAStar(node) || node.alternatives.length < 2) { + return; + } + + const alternatives = node.alternatives; + + const total = toNFA(alternatives[0]); + total.withoutEmptyWord(); + for (let i = 1, l = alternatives.length; i < l; i++) { + const a = alternatives[i]; + const current = toNFA(a); + current.withoutEmptyWord(); + + if (!total.isDisjointWith(current)) { + assert.fail(`${tokenPath}: The alternative \`${a.raw}\` is not disjoint with at least one previous alternative.` + + ` This will cause exponential backtracking.` + + `\n\nTo fix this issue, you have to rewrite the ${node.type} \`${node.raw}\`.` + + ` The goal is that all of its alternatives are disjoint.` + + ` This means that if a (sub-)string is matched by the ${node.type}, then only one of its alternatives can match the (sub-)string.` + + `\n\nExample: \`(?:[ab]|\\w|::)+\`` + + `\nThe alternatives of the group are not disjoint because the string "a" can be matched by both \`[ab]\` and \`\\w\`.` + + ` In this example, the pattern can easily be fixed because the \`[ab]\` is a subset of the \`\\w\`, so its enough to remove the \`[ab]\` alternative to get \`(?:\\w|::)+\` as the fixed pattern.` + + `\nIn the real world, patterns can be a lot harder to fix.` + + ` If you are trying to make the tests pass for a pull request but can\'t fix the issue yourself, then make the pull request (or commit) anyway.` + + ` A maintainer will help you.` + + `\n\nFull pattern:\n${pattern}`); + } else if (i !== l - 1) { + total.union(current); + } + } + } + + visitRegExpAST(ast.pattern, { + onCapturingGroupLeave: checkDisjointAlternatives, + onGroupLeave: checkDisjointAlternatives, + onAssertionLeave(node) { + if (node.kind === "lookahead" || node.kind === "lookbehind") { + checkDisjointAlternatives(node); + } + }, + + onQuantifierLeave(node) { + if (node.max < 10) { + return; // not a star + } + if (node.element.type !== "CapturingGroup" && node.element.type !== "Group") { + return; // not a group + } + + // The idea here is the following: + // + // We have found a part `A*` of the regex (`A` is assumed to not accept the empty word). Let `I` be + // the intersection of `A` and `A{2,}`. If `I` is not empty, then there exists a non-empty word `w` + // that is accepted by both `A` and `A{2,}`. That means that there exists some `m>1` for which `w` + // is accepted by `A{m}`. + // This means that there are at least two ways `A*` can accept `w`. It can be accepted as `A` or as + // `A{m}`. Hence there are at least 2^n ways for `A*` to accept the word `w{n}`. This is the main + // requirement for exponential backtracking. + // + // This is actually only a crude approximation for the real analysis that would have to be done. We + // would actually have to check the intersection `A{p}` and `A{p+1,}` for all p>0. However, in most + // cases, the approximation is good enough. + + const nfa = toNFA(node.element); + nfa.withoutEmptyWord(); + const twoStar = nfa.copy(); + twoStar.quantify(2, Infinity); + + if (!nfa.isDisjointWith(twoStar)) { + const word = Words.pickMostReadableWord(firstOf(nfa.intersectionWordSets(twoStar))); + const example = Words.fromUnicodeToString(word); + assert.fail(`${tokenPath}: The quantifier \`${node.raw}\` ambiguous for all words ${JSON.stringify(example)}.repeat(n) for any n>1.` + + ` This will cause exponential backtracking.` + + `\n\nTo fix this issue, you have to rewrite the element (let's call it E) of the quantifier.` + + ` The goal is modify E such that it is disjoint with repetitions of itself.` + + ` This means that if a (sub-)string is matched by E, then it must not be possible for E{2}, E{3}, E{4}, etc. to match that (sub-)string.` + + `\n\nExample 1: \`(?:\\w+|::)+\`` + + `\nThe problem lies in \`\\w+\` because \`\\w+\` and \`(?:\\w+){2}\` are not disjoint as the string "aa" is fully matched by both.` + + ` In this example, the pattern can easily be fixed by changing \`\\w+\` to \`\\w\`.` + + `\nExample 2: \`(?:\\w|Foo)+\`` + + `\nThe problem lies in \`\\w\` and \`Foo\` because the string "Foo" can be matched as either repeating \`\\w\` 3 times or by using the \`Foo\` alternative once.` + + ` In this example, the pattern can easily be fixed because the \`Foo\` alternative is redundant can can be removed.` + + `\nExample 3: \`(?:\\.\\w+(?:<.*?>)?)+\`` + + `\nThe problem lies in \`<.*?>\`. The string ".a<>.a<>" can be matched as either \`\\. \\w < . . . . >\` or \`\\. \\w < > \\. \\w < >\`.` + + ` When it comes to exponential backtracking, it doesn't matter whether a quantifier is greedy or lazy.` + + ` This means that the lazy \`.*?\` can jump over \`>\`.` + + ` In this example, the pattern can easily be fixed because we just have to prevent \`.*?\` jumping over \`>\`.` + + ` This can done by replacing \`<.*?>\` with \`<[^\\r\\n>]*>\`.` + + `\n\nIn the real world, patterns can be a lot harder to fix.` + + ` If you are trying to make this test pass for a pull request but can\'t fix the issue yourself, then make the pull request (or commit) anyway, a maintainer will help you.` + + `\n\nFull pattern:\n${pattern}`); + } + }, + }); + + safeRegexes.add(patternStr); + }); + }); + } From e01ecd00b0ebdae88ceed0095941ee162072a0bc Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Sun, 29 Nov 2020 00:14:35 +0100 Subject: [PATCH 0679/1100] Scheme: Fixed number pattern (#2648) --- components/prism-scheme.js | 191 +++++++++++++-------- components/prism-scheme.min.js | 2 +- tests/languages/racket/number_feature.test | 23 ++- tests/languages/scheme/number_feature.test | 19 +- 4 files changed, 150 insertions(+), 85 deletions(-) diff --git a/components/prism-scheme.js b/components/prism-scheme.js index de05b9660c..eea2ae8a95 100644 --- a/components/prism-scheme.js +++ b/components/prism-scheme.js @@ -1,78 +1,121 @@ -Prism.languages.scheme = { - // this supports "normal" single-line comments: - // ; comment - // and (potentially nested) multiline comments: - // #| comment #| nested |# still comment |# - // (only 1 level of nesting is supported) - 'comment': /;.*|#;\s*\((?:[^()]|\([^()]*\))*\)|#\|(?:[^#|]|#(?!\|)|\|(?!#)|#\|(?:[^#|]|#(?!\|)|\|(?!#))*\|#)*\|#/, - 'string': { - pattern: /"(?:[^"\\]|\\.)*"/, - greedy: true - }, - 'symbol': { - pattern: /'[^()#'\s]+/, - greedy: true - }, - 'character': { - pattern: /#\\(?:[ux][a-fA-F\d]+\b|[-a-zA-Z]+\b|\S)/, - greedy: true, - alias: 'string' - }, - 'lambda-parameter': [ - // https://www.cs.cmu.edu/Groups/AI/html/r4rs/r4rs_6.html#SEC30 - { - pattern: /((?:^|[^'`#])\(lambda\s+)(?:[^|()'\s]+|\|(?:[^\\|]|\\.)*\|)/, +(function (Prism) { + Prism.languages.scheme = { + // this supports "normal" single-line comments: + // ; comment + // and (potentially nested) multiline comments: + // #| comment #| nested |# still comment |# + // (only 1 level of nesting is supported) + 'comment': /;.*|#;\s*\((?:[^()]|\([^()]*\))*\)|#\|(?:[^#|]|#(?!\|)|\|(?!#)|#\|(?:[^#|]|#(?!\|)|\|(?!#))*\|#)*\|#/, + 'string': { + pattern: /"(?:[^"\\]|\\.)*"/, + greedy: true + }, + 'symbol': { + pattern: /'[^()#'\s]+/, + greedy: true + }, + 'character': { + pattern: /#\\(?:[ux][a-fA-F\d]+\b|[-a-zA-Z]+\b|\S)/, + greedy: true, + alias: 'string' + }, + 'lambda-parameter': [ + // https://www.cs.cmu.edu/Groups/AI/html/r4rs/r4rs_6.html#SEC30 + { + pattern: /((?:^|[^'`#])\(lambda\s+)(?:[^|()'\s]+|\|(?:[^\\|]|\\.)*\|)/, + lookbehind: true + }, + { + pattern: /((?:^|[^'`#])\(lambda\s+\()[^()']+/, + lookbehind: true + } + ], + 'keyword': { + pattern: /((?:^|[^'`#])\()(?:begin|case(?:-lambda)?|cond(?:-expand)?|define(?:-library|-macro|-record-type|-syntax|-values)?|defmacro|delay(?:-force)?|do|else|export|except|guard|if|import|include(?:-ci|-library-declarations)?|lambda|let(?:rec)?(?:-syntax|-values|\*)?|let\*-values|only|parameterize|prefix|(?:quasi-?)?quote|rename|set!|syntax-(?:case|rules)|unless|unquote(?:-splicing)?|when)(?=[()\s]|$)/, + lookbehind: true + }, + 'builtin': { + // all functions of the base library of R7RS plus some of built-ins of R5Rs + pattern: /((?:^|[^'`#])\()(?:abs|and|append|apply|assoc|ass[qv]|binary-port\?|boolean=?\?|bytevector(?:-append|-copy|-copy!|-length|-u8-ref|-u8-set!|\?)?|caar|cadr|call-with-(?:current-continuation|port|values)|call\/cc|car|cdar|cddr|cdr|ceiling|char(?:->integer|-ready\?|\?|<\?|<=\?|=\?|>\?|>=\?)|close-(?:input-port|output-port|port)|complex\?|cons|current-(?:error|input|output)-port|denominator|dynamic-wind|eof-object\??|eq\?|equal\?|eqv\?|error|error-object(?:-irritants|-message|\?)|eval|even\?|exact(?:-integer-sqrt|-integer\?|\?)?|expt|features|file-error\?|floor(?:-quotient|-remainder|\/)?|flush-output-port|for-each|gcd|get-output-(?:bytevector|string)|inexact\??|input-port(?:-open\?|\?)|integer(?:->char|\?)|lcm|length|list(?:->string|->vector|-copy|-ref|-set!|-tail|\?)?|make-(?:bytevector|list|parameter|string|vector)|map|max|member|memq|memv|min|modulo|negative\?|newline|not|null\?|number(?:->string|\?)|numerator|odd\?|open-(?:input|output)-(?:bytevector|string)|or|output-port(?:-open\?|\?)|pair\?|peek-char|peek-u8|port\?|positive\?|procedure\?|quotient|raise|raise-continuable|rational\?|rationalize|read-(?:bytevector|bytevector!|char|error\?|line|string|u8)|real\?|remainder|reverse|round|set-c[ad]r!|square|string(?:->list|->number|->symbol|->utf8|->vector|-append|-copy|-copy!|-fill!|-for-each|-length|-map|-ref|-set!|\?|<\?|<=\?|=\?|>\?|>=\?)?|substring|symbol(?:->string|\?|=\?)|syntax-error|textual-port\?|truncate(?:-quotient|-remainder|\/)?|u8-ready\?|utf8->string|values|vector(?:->list|->string|-append|-copy|-copy!|-fill!|-for-each|-length|-map|-ref|-set!|\?)?|with-exception-handler|write-(?:bytevector|char|string|u8)|zero\?)(?=[()\s]|$)/, + lookbehind: true + }, + 'operator': { + pattern: /((?:^|[^'`#])\()(?:[-+*%/]|[<>]=?|=>?)(?=[()\s]|$)/, lookbehind: true }, - { - pattern: /((?:^|[^'`#])\(lambda\s+\()[^()']+/, + 'number': { + // The number pattern from [the R7RS spec](https://small.r7rs.org/attachment/r7rs.pdf). + // + // := ||| + // := + // := (?:@|)?| + // := [+-](?:|(?:inf|nan)\.0)?i + // := [+-]?|[+-](?:inf|nan)\.0 + // := (?:\/)? + // | + // + // := (?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)? + // := + + // := (?:#[ei])?|(?:#[ei])? + // := #b + // := #o + // := (?:#d)? + // := #x + // := [01] + // := [0-7] + // := \d + // := [0-9a-f] + // + // The problem with this grammar is that the resulting regex is way to complex, so we simplify by grouping all + // non-decimal bases together. This results in a decimal (dec) and combined binary, octal, and hexadecimal (box) + // pattern: + pattern: RegExp(SortedBNF({ + '': /\d+(?:\/\d+)?|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?/.source, + '': /[+-]?|[+-](?:inf|nan)\.0/.source, + '': /[+-](?:|(?:inf|nan)\.0)?i/.source, + '': /(?:@|)?|/.source, + '': /(?:#d(?:#[ei])?|#[ei](?:#d)?)?/.source, + + '': /[0-9a-f]+(?:\/[0-9a-f]+)?/.source, + '': /[+-]?|[+-](?:inf|nan)\.0/.source, + '': /[+-](?:|(?:inf|nan)\.0)?i/.source, + '': /(?:@|)?|/.source, + '': /#[box](?:#[ei])?|(?:#[ei])?#[box]/.source, + + '': /(^|[\s()])(?:|)(?=[()\s]|$)/.source, + }), 'i'), lookbehind: true + }, + 'boolean': { + pattern: /(^|[\s()])#(?:[ft]|false|true)(?=[()\s]|$)/, + lookbehind: true + }, + 'function': { + pattern: /((?:^|[^'`#])\()(?:[^|()'\s]+|\|(?:[^\\|]|\\.)*\|)(?=[()\s]|$)/, + lookbehind: true + }, + 'identifier': { + pattern: /(^|[\s()])\|(?:[^\\|]|\\.)*\|(?=[()\s]|$)/, + lookbehind: true, + greedy: true + }, + 'punctuation': /[()']/ + }; + + /** + * Given a topologically sorted BNF grammar, this will return the RegExp source of last rule of the grammar. + * + * @param {Record} grammar + * @returns {string} + */ + function SortedBNF(grammar) { + for (var key in grammar) { + grammar[key] = grammar[key].replace(/<[\w\s]+>/g, function (key) { + return '(?:' + grammar[key].trim() + ')'; + }); } - ], - 'keyword': { - pattern: /((?:^|[^'`#])\()(?:begin|case(?:-lambda)?|cond(?:-expand)?|define(?:-library|-macro|-record-type|-syntax|-values)?|defmacro|delay(?:-force)?|do|else|export|except|guard|if|import|include(?:-ci|-library-declarations)?|lambda|let(?:rec)?(?:-syntax|-values|\*)?|let\*-values|only|parameterize|prefix|(?:quasi-?)?quote|rename|set!|syntax-(?:case|rules)|unless|unquote(?:-splicing)?|when)(?=[()\s]|$)/, - lookbehind: true - }, - 'builtin': { - // all functions of the base library of R7RS plus some of built-ins of R5Rs - pattern: /((?:^|[^'`#])\()(?:abs|and|append|apply|assoc|ass[qv]|binary-port\?|boolean=?\?|bytevector(?:-append|-copy|-copy!|-length|-u8-ref|-u8-set!|\?)?|caar|cadr|call-with-(?:current-continuation|port|values)|call\/cc|car|cdar|cddr|cdr|ceiling|char(?:->integer|-ready\?|\?|<\?|<=\?|=\?|>\?|>=\?)|close-(?:input-port|output-port|port)|complex\?|cons|current-(?:error|input|output)-port|denominator|dynamic-wind|eof-object\??|eq\?|equal\?|eqv\?|error|error-object(?:-irritants|-message|\?)|eval|even\?|exact(?:-integer-sqrt|-integer\?|\?)?|expt|features|file-error\?|floor(?:-quotient|-remainder|\/)?|flush-output-port|for-each|gcd|get-output-(?:bytevector|string)|inexact\??|input-port(?:-open\?|\?)|integer(?:->char|\?)|lcm|length|list(?:->string|->vector|-copy|-ref|-set!|-tail|\?)?|make-(?:bytevector|list|parameter|string|vector)|map|max|member|memq|memv|min|modulo|negative\?|newline|not|null\?|number(?:->string|\?)|numerator|odd\?|open-(?:input|output)-(?:bytevector|string)|or|output-port(?:-open\?|\?)|pair\?|peek-char|peek-u8|port\?|positive\?|procedure\?|quotient|raise|raise-continuable|rational\?|rationalize|read-(?:bytevector|bytevector!|char|error\?|line|string|u8)|real\?|remainder|reverse|round|set-c[ad]r!|square|string(?:->list|->number|->symbol|->utf8|->vector|-append|-copy|-copy!|-fill!|-for-each|-length|-map|-ref|-set!|\?|<\?|<=\?|=\?|>\?|>=\?)?|substring|symbol(?:->string|\?|=\?)|syntax-error|textual-port\?|truncate(?:-quotient|-remainder|\/)?|u8-ready\?|utf8->string|values|vector(?:->list|->string|-append|-copy|-copy!|-fill!|-for-each|-length|-map|-ref|-set!|\?)?|with-exception-handler|write-(?:bytevector|char|string|u8)|zero\?)(?=[()\s]|$)/, - lookbehind: true - }, - 'operator': { - pattern: /((?:^|[^'`#])\()(?:[-+*%/]|[<>]=?|=>?)(?=[()\s]|$)/, - lookbehind: true - }, - 'number': { - // This pattern (apart from the lookarounds) works like this: - // - // Decimal numbers - // := \d*\.?\d+(?:[eE][+-]?\d+)?|\d+\/\d+ - // := (?:[+-]i)?|i - // := (?:#d(?:#[ei])?|#[ei](?:#d)?)? - // := [+-]? - // - // Binary, octal, and hexadecimal numbers - // := [\da-fA-F]+(?:\/[\da-fA-F]+)? - // := (?:[+-]i)?|i - // := #[box](?:#[ei])?|#[ei](?:#[box])? - // := [+-]? - // - // := | - pattern: /(^|[\s()])(?:(?:#d(?:#[ei])?|#[ei](?:#d)?)?[+-]?(?:(?:\d*\.?\d+(?:[eE][+-]?\d+)?|\d+\/\d+)(?:[+-](?:\d*\.?\d+(?:[eE][+-]?\d+)?|\d+\/\d+)i)?|(?:\d*\.?\d+(?:[eE][+-]?\d+)?|\d+\/\d+)i)|(?:#[box](?:#[ei])?|#[ei](?:#[box])?)[+-]?(?:[\da-fA-F]+(?:\/[\da-fA-F]+)?(?:[+-][\da-fA-F]+(?:\/[\da-fA-F]+)?i)?|[\da-fA-F]+(?:\/[\da-fA-F]+)?i))(?=[()\s]|$)/, - lookbehind: true - }, - 'boolean': { - pattern: /(^|[\s()])#(?:[ft]|false|true)(?=[()\s]|$)/, - lookbehind: true - }, - 'function': { - pattern: /((?:^|[^'`#])\()(?:[^|()'\s]+|\|(?:[^\\|]|\\.)*\|)(?=[()\s]|$)/, - lookbehind: true - }, - 'identifier': { - pattern: /(^|[\s()])\|(?:[^\\|]|\\.)*\|(?=[()\s]|$)/, - lookbehind: true, - greedy: true - }, - 'punctuation': /[()']/ -}; + // return the last item + return grammar[key]; + } + +})(Prism); diff --git a/components/prism-scheme.min.js b/components/prism-scheme.min.js index eab22d0a88..0e5467f117 100644 --- a/components/prism-scheme.min.js +++ b/components/prism-scheme.min.js @@ -1 +1 @@ -Prism.languages.scheme={comment:/;.*|#;\s*\((?:[^()]|\([^()]*\))*\)|#\|(?:[^#|]|#(?!\|)|\|(?!#)|#\|(?:[^#|]|#(?!\|)|\|(?!#))*\|#)*\|#/,string:{pattern:/"(?:[^"\\]|\\.)*"/,greedy:!0},symbol:{pattern:/'[^()#'\s]+/,greedy:!0},character:{pattern:/#\\(?:[ux][a-fA-F\d]+\b|[-a-zA-Z]+\b|\S)/,greedy:!0,alias:"string"},"lambda-parameter":[{pattern:/((?:^|[^'`#])\(lambda\s+)(?:[^|()'\s]+|\|(?:[^\\|]|\\.)*\|)/,lookbehind:!0},{pattern:/((?:^|[^'`#])\(lambda\s+\()[^()']+/,lookbehind:!0}],keyword:{pattern:/((?:^|[^'`#])\()(?:begin|case(?:-lambda)?|cond(?:-expand)?|define(?:-library|-macro|-record-type|-syntax|-values)?|defmacro|delay(?:-force)?|do|else|export|except|guard|if|import|include(?:-ci|-library-declarations)?|lambda|let(?:rec)?(?:-syntax|-values|\*)?|let\*-values|only|parameterize|prefix|(?:quasi-?)?quote|rename|set!|syntax-(?:case|rules)|unless|unquote(?:-splicing)?|when)(?=[()\s]|$)/,lookbehind:!0},builtin:{pattern:/((?:^|[^'`#])\()(?:abs|and|append|apply|assoc|ass[qv]|binary-port\?|boolean=?\?|bytevector(?:-append|-copy|-copy!|-length|-u8-ref|-u8-set!|\?)?|caar|cadr|call-with-(?:current-continuation|port|values)|call\/cc|car|cdar|cddr|cdr|ceiling|char(?:->integer|-ready\?|\?|<\?|<=\?|=\?|>\?|>=\?)|close-(?:input-port|output-port|port)|complex\?|cons|current-(?:error|input|output)-port|denominator|dynamic-wind|eof-object\??|eq\?|equal\?|eqv\?|error|error-object(?:-irritants|-message|\?)|eval|even\?|exact(?:-integer-sqrt|-integer\?|\?)?|expt|features|file-error\?|floor(?:-quotient|-remainder|\/)?|flush-output-port|for-each|gcd|get-output-(?:bytevector|string)|inexact\??|input-port(?:-open\?|\?)|integer(?:->char|\?)|lcm|length|list(?:->string|->vector|-copy|-ref|-set!|-tail|\?)?|make-(?:bytevector|list|parameter|string|vector)|map|max|member|memq|memv|min|modulo|negative\?|newline|not|null\?|number(?:->string|\?)|numerator|odd\?|open-(?:input|output)-(?:bytevector|string)|or|output-port(?:-open\?|\?)|pair\?|peek-char|peek-u8|port\?|positive\?|procedure\?|quotient|raise|raise-continuable|rational\?|rationalize|read-(?:bytevector|bytevector!|char|error\?|line|string|u8)|real\?|remainder|reverse|round|set-c[ad]r!|square|string(?:->list|->number|->symbol|->utf8|->vector|-append|-copy|-copy!|-fill!|-for-each|-length|-map|-ref|-set!|\?|<\?|<=\?|=\?|>\?|>=\?)?|substring|symbol(?:->string|\?|=\?)|syntax-error|textual-port\?|truncate(?:-quotient|-remainder|\/)?|u8-ready\?|utf8->string|values|vector(?:->list|->string|-append|-copy|-copy!|-fill!|-for-each|-length|-map|-ref|-set!|\?)?|with-exception-handler|write-(?:bytevector|char|string|u8)|zero\?)(?=[()\s]|$)/,lookbehind:!0},operator:{pattern:/((?:^|[^'`#])\()(?:[-+*%/]|[<>]=?|=>?)(?=[()\s]|$)/,lookbehind:!0},number:{pattern:/(^|[\s()])(?:(?:#d(?:#[ei])?|#[ei](?:#d)?)?[+-]?(?:(?:\d*\.?\d+(?:[eE][+-]?\d+)?|\d+\/\d+)(?:[+-](?:\d*\.?\d+(?:[eE][+-]?\d+)?|\d+\/\d+)i)?|(?:\d*\.?\d+(?:[eE][+-]?\d+)?|\d+\/\d+)i)|(?:#[box](?:#[ei])?|#[ei](?:#[box])?)[+-]?(?:[\da-fA-F]+(?:\/[\da-fA-F]+)?(?:[+-][\da-fA-F]+(?:\/[\da-fA-F]+)?i)?|[\da-fA-F]+(?:\/[\da-fA-F]+)?i))(?=[()\s]|$)/,lookbehind:!0},boolean:{pattern:/(^|[\s()])#(?:[ft]|false|true)(?=[()\s]|$)/,lookbehind:!0},function:{pattern:/((?:^|[^'`#])\()(?:[^|()'\s]+|\|(?:[^\\|]|\\.)*\|)(?=[()\s]|$)/,lookbehind:!0},identifier:{pattern:/(^|[\s()])\|(?:[^\\|]|\\.)*\|(?=[()\s]|$)/,lookbehind:!0,greedy:!0},punctuation:/[()']/}; \ No newline at end of file +Prism.languages.scheme={comment:/;.*|#;\s*\((?:[^()]|\([^()]*\))*\)|#\|(?:[^#|]|#(?!\|)|\|(?!#)|#\|(?:[^#|]|#(?!\|)|\|(?!#))*\|#)*\|#/,string:{pattern:/"(?:[^"\\]|\\.)*"/,greedy:!0},symbol:{pattern:/'[^()#'\s]+/,greedy:!0},character:{pattern:/#\\(?:[ux][a-fA-F\d]+\b|[-a-zA-Z]+\b|\S)/,greedy:!0,alias:"string"},"lambda-parameter":[{pattern:/((?:^|[^'`#])\(lambda\s+)(?:[^|()'\s]+|\|(?:[^\\|]|\\.)*\|)/,lookbehind:!0},{pattern:/((?:^|[^'`#])\(lambda\s+\()[^()']+/,lookbehind:!0}],keyword:{pattern:/((?:^|[^'`#])\()(?:begin|case(?:-lambda)?|cond(?:-expand)?|define(?:-library|-macro|-record-type|-syntax|-values)?|defmacro|delay(?:-force)?|do|else|export|except|guard|if|import|include(?:-ci|-library-declarations)?|lambda|let(?:rec)?(?:-syntax|-values|\*)?|let\*-values|only|parameterize|prefix|(?:quasi-?)?quote|rename|set!|syntax-(?:case|rules)|unless|unquote(?:-splicing)?|when)(?=[()\s]|$)/,lookbehind:!0},builtin:{pattern:/((?:^|[^'`#])\()(?:abs|and|append|apply|assoc|ass[qv]|binary-port\?|boolean=?\?|bytevector(?:-append|-copy|-copy!|-length|-u8-ref|-u8-set!|\?)?|caar|cadr|call-with-(?:current-continuation|port|values)|call\/cc|car|cdar|cddr|cdr|ceiling|char(?:->integer|-ready\?|\?|<\?|<=\?|=\?|>\?|>=\?)|close-(?:input-port|output-port|port)|complex\?|cons|current-(?:error|input|output)-port|denominator|dynamic-wind|eof-object\??|eq\?|equal\?|eqv\?|error|error-object(?:-irritants|-message|\?)|eval|even\?|exact(?:-integer-sqrt|-integer\?|\?)?|expt|features|file-error\?|floor(?:-quotient|-remainder|\/)?|flush-output-port|for-each|gcd|get-output-(?:bytevector|string)|inexact\??|input-port(?:-open\?|\?)|integer(?:->char|\?)|lcm|length|list(?:->string|->vector|-copy|-ref|-set!|-tail|\?)?|make-(?:bytevector|list|parameter|string|vector)|map|max|member|memq|memv|min|modulo|negative\?|newline|not|null\?|number(?:->string|\?)|numerator|odd\?|open-(?:input|output)-(?:bytevector|string)|or|output-port(?:-open\?|\?)|pair\?|peek-char|peek-u8|port\?|positive\?|procedure\?|quotient|raise|raise-continuable|rational\?|rationalize|read-(?:bytevector|bytevector!|char|error\?|line|string|u8)|real\?|remainder|reverse|round|set-c[ad]r!|square|string(?:->list|->number|->symbol|->utf8|->vector|-append|-copy|-copy!|-fill!|-for-each|-length|-map|-ref|-set!|\?|<\?|<=\?|=\?|>\?|>=\?)?|substring|symbol(?:->string|\?|=\?)|syntax-error|textual-port\?|truncate(?:-quotient|-remainder|\/)?|u8-ready\?|utf8->string|values|vector(?:->list|->string|-append|-copy|-copy!|-fill!|-for-each|-length|-map|-ref|-set!|\?)?|with-exception-handler|write-(?:bytevector|char|string|u8)|zero\?)(?=[()\s]|$)/,lookbehind:!0},operator:{pattern:/((?:^|[^'`#])\()(?:[-+*%/]|[<>]=?|=>?)(?=[()\s]|$)/,lookbehind:!0},number:{pattern:RegExp(function(r){for(var e in r)r[e]=r[e].replace(/<[\w\s]+>/g,function(e){return"(?:"+r[e].trim()+")"});return r[e]}({"":"\\d+(?:/\\d+)?|(?:\\d+(?:\\.\\d*)?|\\.\\d+)(?:e[+-]?\\d+)?","":"[+-]?|[+-](?:inf|nan)\\.0","":"[+-](?:|(?:inf|nan)\\.0)?i","":"(?:@|)?|","":"(?:#d(?:#[ei])?|#[ei](?:#d)?)?","":"[0-9a-f]+(?:/[0-9a-f]+)?","":"[+-]?|[+-](?:inf|nan)\\.0","":"[+-](?:|(?:inf|nan)\\.0)?i","":"(?:@|)?|","":"#[box](?:#[ei])?|(?:#[ei])?#[box]","":"(^|[\\s()])(?:|)(?=[()\\s]|$)"}),"i"),lookbehind:!0},boolean:{pattern:/(^|[\s()])#(?:[ft]|false|true)(?=[()\s]|$)/,lookbehind:!0},function:{pattern:/((?:^|[^'`#])\()(?:[^|()'\s]+|\|(?:[^\\|]|\\.)*\|)(?=[()\s]|$)/,lookbehind:!0},identifier:{pattern:/(^|[\s()])\|(?:[^\\|]|\\.)*\|(?=[()\s]|$)/,lookbehind:!0,greedy:!0},punctuation:/[()']/}; \ No newline at end of file diff --git a/tests/languages/racket/number_feature.test b/tests/languages/racket/number_feature.test index 9a517e1a02..01b699fbca 100644 --- a/tests/languages/racket/number_feature.test +++ b/tests/languages/racket/number_feature.test @@ -1,15 +1,21 @@ +123 + (foo 42 +42 -42) (foo 1e3 +1e3 -1e3) (foo 1e+3 1e-3 3.14159 3.14159e-1) (foo 8/3) (foo 3+4i 2.5+0.0i 2.5+0.0i -2.5e4+0.0e4i 3+0i -2e-5i) -(list 10i +10i -10i 10.10i 10+10i 10.10+10.10i 10-10i 10e+10i 10+10e+10i) +(list +10i -10i 10+10i 10.10+10.10i 10-10i 10+10e+10i) (list #d123 #e#d123e-4 #d#i12 #i-1.234i) (list #xBAD #b1110011 #o777) (list #i#x10 #i#x10+10i #b10+10i) +10+i +10+.1i +10+1.i + ; not a number but a symbol (define 1+2 10) @@ -19,6 +25,8 @@ ---------------------------------------------------- [ + ["number", "123"], + ["punctuation", "("], ["function", "foo"], ["number", "42"], @@ -58,14 +66,11 @@ ["punctuation", "("], ["builtin", "list"], - ["number", "10i"], ["number", "+10i"], ["number", "-10i"], - ["number", "10.10i"], ["number", "10+10i"], ["number", "10.10+10.10i"], ["number", "10-10i"], - ["number", "10e+10i"], ["number", "10+10e+10i"], ["punctuation", ")"], @@ -91,8 +96,16 @@ ["number", "#b10+10i"], ["punctuation", ")"], + ["number", "10+i"], + ["number", "10+.1i"], + ["number", "10+1.i"], + ["comment", "; not a number but a symbol"], - ["punctuation", "("], ["keyword", "define"], " 1+2 ", ["number", "10"], ["punctuation", ")"], + ["punctuation", "("], + ["keyword", "define"], + " 1+2 ", + ["number", "10"], + ["punctuation", ")"], ["punctuation", "["], ["function", "foo"], diff --git a/tests/languages/scheme/number_feature.test b/tests/languages/scheme/number_feature.test index 2b51f1b464..2b00dc8492 100644 --- a/tests/languages/scheme/number_feature.test +++ b/tests/languages/scheme/number_feature.test @@ -5,13 +5,17 @@ (foo 1e+3 1e-3 3.14159 3.14159e-1) (foo 8/3) (foo 3+4i 2.5+0.0i 2.5+0.0i -2.5e4+0.0e4i 3+0i -2e-5i) -(list 10i +10i -10i 10.10i 10+10i 10.10+10.10i 10-10i 10e+10i 10+10e+10i) +(list +10i -10i 10+10i 10.10+10.10i 10-10i 10+10e+10i) (list #d123 #e#d123e-4 #d#i12 #i-1.234i) (list #xBAD #b1110011 #o777) (list #i#x10 #i#x10+10i #b10+10i) +10+i +10+.1i +10+1.i + ; not a number but a symbol (define 1+2 10) @@ -59,14 +63,11 @@ ["punctuation", "("], ["builtin", "list"], - ["number", "10i"], ["number", "+10i"], ["number", "-10i"], - ["number", "10.10i"], ["number", "10+10i"], ["number", "10.10+10.10i"], ["number", "10-10i"], - ["number", "10e+10i"], ["number", "10+10e+10i"], ["punctuation", ")"], @@ -92,8 +93,16 @@ ["number", "#b10+10i"], ["punctuation", ")"], + ["number", "10+i"], + ["number", "10+.1i"], + ["number", "10+1.i"], + ["comment", "; not a number but a symbol"], - ["punctuation", "("], ["keyword", "define"], " 1+2 ", ["number", "10"], ["punctuation", ")"] + ["punctuation", "("], + ["keyword", "define"], + " 1+2 ", + ["number", "10"], + ["punctuation", ")"] ] ---------------------------------------------------- From a7ccc16dd259e4f3dbc46f2e5cee49c8b6596e5c Mon Sep 17 00:00:00 2001 From: edukisto <52005215+edukisto@users.noreply.github.com> Date: Mon, 30 Nov 2020 21:14:26 +0300 Subject: [PATCH 0680/1100] CSP: Do not highlight directive names with adjacent hyphens (#2662) CSP tokens used `\b` to assert word boundaries but this is incorrect as CSP tokens may contain hyphens (`-`). This replaces the assertions will lookarounds that address the issue. --- components/prism-csp.js | 3 ++- components/prism-csp.min.js | 2 +- tests/languages/csp/issue2661.test | 11 +++++++++++ 3 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 tests/languages/csp/issue2661.test diff --git a/components/prism-csp.js b/components/prism-csp.js index 861f5a0972..c8facbc30f 100644 --- a/components/prism-csp.js +++ b/components/prism-csp.js @@ -11,7 +11,8 @@ Prism.languages.csp = { 'directive': { - pattern: /\b(?:base-uri|block-all-mixed-content|(?:child|connect|default|font|frame|img|manifest|media|object|script|style|worker)-src|disown-opener|form-action|frame-ancestors|plugin-types|referrer|reflected-xss|report-to|report-uri|require-sri-for|sandbox|upgrade-insecure-requests)\b/i, + pattern: /(^|[^-\da-z])(?:base-uri|block-all-mixed-content|(?:child|connect|default|font|frame|img|manifest|media|object|script|style|worker)-src|disown-opener|form-action|frame-ancestors|plugin-types|referrer|reflected-xss|report-to|report-uri|require-sri-for|sandbox|upgrade-insecure-requests)(?=[^-\da-z]|$)/i, + lookbehind: true, alias: 'keyword' }, 'safe': { diff --git a/components/prism-csp.min.js b/components/prism-csp.min.js index b07a47aca1..6da48ba61d 100644 --- a/components/prism-csp.min.js +++ b/components/prism-csp.min.js @@ -1 +1 @@ -Prism.languages.csp={directive:{pattern:/\b(?:base-uri|block-all-mixed-content|(?:child|connect|default|font|frame|img|manifest|media|object|script|style|worker)-src|disown-opener|form-action|frame-ancestors|plugin-types|referrer|reflected-xss|report-to|report-uri|require-sri-for|sandbox|upgrade-insecure-requests)\b/i,alias:"keyword"},safe:{pattern:/'(?:self|none|strict-dynamic|(?:nonce-|sha(?:256|384|512)-)[a-zA-Z\d+=/]+)'/,alias:"selector"},unsafe:{pattern:/(?:'unsafe-inline'|'unsafe-eval'|'unsafe-hashed-attributes'|\*)/,alias:"function"}}; \ No newline at end of file +Prism.languages.csp={directive:{pattern:/(^|[^-\da-z])(?:base-uri|block-all-mixed-content|(?:child|connect|default|font|frame|img|manifest|media|object|script|style|worker)-src|disown-opener|form-action|frame-ancestors|plugin-types|referrer|reflected-xss|report-to|report-uri|require-sri-for|sandbox|upgrade-insecure-requests)(?=[^-\da-z]|$)/i,lookbehind:!0,alias:"keyword"},safe:{pattern:/'(?:self|none|strict-dynamic|(?:nonce-|sha(?:256|384|512)-)[a-zA-Z\d+=/]+)'/,alias:"selector"},unsafe:{pattern:/(?:'unsafe-inline'|'unsafe-eval'|'unsafe-hashed-attributes'|\*)/,alias:"function"}}; \ No newline at end of file diff --git a/tests/languages/csp/issue2661.test b/tests/languages/csp/issue2661.test new file mode 100644 index 0000000000..1d25bd01f1 --- /dev/null +++ b/tests/languages/csp/issue2661.test @@ -0,0 +1,11 @@ +default-src-is-a-fake; fake-default-src; + +---------------------------------------------------- + +[ + "default-src-is-a-fake; fake-default-src;" +] + +---------------------------------------------------- + +Checks for directive names with adjacent hyphens. From f154134221a291d8db022422a1921e5cb95fbc1d Mon Sep 17 00:00:00 2001 From: edukisto <52005215+edukisto@users.noreply.github.com> Date: Tue, 1 Dec 2020 23:10:29 +0300 Subject: [PATCH 0681/1100] CSP: Added missing directives and keywords (#2664) This adds missing CSP and UISecurity directives and keywords. --- components/prism-csp.js | 11 +++++++---- components/prism-csp.min.js | 2 +- ...rective_with_source_expression_feature.test | 18 ++++++++++++++++-- tests/languages/csp/safe_feature.test | 3 ++- tests/languages/csp/unsafe_feature.test | 10 ++++++++-- 5 files changed, 34 insertions(+), 10 deletions(-) diff --git a/components/prism-csp.js b/components/prism-csp.js index c8facbc30f..72910bc65c 100644 --- a/components/prism-csp.js +++ b/components/prism-csp.js @@ -10,17 +10,20 @@ */ Prism.languages.csp = { - 'directive': { - pattern: /(^|[^-\da-z])(?:base-uri|block-all-mixed-content|(?:child|connect|default|font|frame|img|manifest|media|object|script|style|worker)-src|disown-opener|form-action|frame-ancestors|plugin-types|referrer|reflected-xss|report-to|report-uri|require-sri-for|sandbox|upgrade-insecure-requests)(?=[^-\da-z]|$)/i, + 'directive': { + pattern: /(^|[^-\da-z])(?:base-uri|block-all-mixed-content|(?:child|connect|default|font|frame|img|manifest|media|object|prefetch|script|style|worker)-src|disown-opener|form-action|frame-(?:ancestors|options)|input-protection(?:-(?:clip|selectors))?|navigate-to|plugin-types|policy-uri|referrer|reflected-xss|report-(?:to|uri)|require-sri-for|sandbox|(?:script|style)-src-(?:attr|elem)|upgrade-insecure-requests)(?=[^-\da-z]|$)/i, lookbehind: true, alias: 'keyword' }, 'safe': { - pattern: /'(?:self|none|strict-dynamic|(?:nonce-|sha(?:256|384|512)-)[a-zA-Z\d+=/]+)'/, + // CSP2 hashes and nonces are base64 values. CSP3 accepts both base64 and base64url values. + // See https://tools.ietf.org/html/rfc4648#section-4 + // See https://tools.ietf.org/html/rfc4648#section-5 + pattern: /'(?:deny|none|report-sample|self|strict-dynamic|top-only|(?:nonce|sha(?:256|384|512))-[-+/\d=_a-z]+)'/i, alias: 'selector' }, 'unsafe': { - pattern: /(?:'unsafe-inline'|'unsafe-eval'|'unsafe-hashed-attributes'|\*)/, + pattern: /(?:'unsafe-(?:allow-redirects|dynamic|eval|hash-attributes|hashed-attributes|hashes|inline)'|\*)/i, alias: 'function' } }; \ No newline at end of file diff --git a/components/prism-csp.min.js b/components/prism-csp.min.js index 6da48ba61d..3749b8c10e 100644 --- a/components/prism-csp.min.js +++ b/components/prism-csp.min.js @@ -1 +1 @@ -Prism.languages.csp={directive:{pattern:/(^|[^-\da-z])(?:base-uri|block-all-mixed-content|(?:child|connect|default|font|frame|img|manifest|media|object|script|style|worker)-src|disown-opener|form-action|frame-ancestors|plugin-types|referrer|reflected-xss|report-to|report-uri|require-sri-for|sandbox|upgrade-insecure-requests)(?=[^-\da-z]|$)/i,lookbehind:!0,alias:"keyword"},safe:{pattern:/'(?:self|none|strict-dynamic|(?:nonce-|sha(?:256|384|512)-)[a-zA-Z\d+=/]+)'/,alias:"selector"},unsafe:{pattern:/(?:'unsafe-inline'|'unsafe-eval'|'unsafe-hashed-attributes'|\*)/,alias:"function"}}; \ No newline at end of file +Prism.languages.csp={directive:{pattern:/(^|[^-\da-z])(?:base-uri|block-all-mixed-content|(?:child|connect|default|font|frame|img|manifest|media|object|prefetch|script|style|worker)-src|disown-opener|form-action|frame-(?:ancestors|options)|input-protection(?:-(?:clip|selectors))?|navigate-to|plugin-types|policy-uri|referrer|reflected-xss|report-(?:to|uri)|require-sri-for|sandbox|(?:script|style)-src-(?:attr|elem)|upgrade-insecure-requests)(?=[^-\da-z]|$)/i,lookbehind:!0,alias:"keyword"},safe:{pattern:/'(?:deny|none|report-sample|self|strict-dynamic|top-only|(?:nonce|sha(?:256|384|512))-[-+/\d=_a-z]+)'/i,alias:"selector"},unsafe:{pattern:/(?:'unsafe-(?:allow-redirects|dynamic|eval|hash-attributes|hashed-attributes|hashes|inline)'|\*)/i,alias:"function"}}; \ No newline at end of file diff --git a/tests/languages/csp/directive_with_source_expression_feature.test b/tests/languages/csp/directive_with_source_expression_feature.test index a4db6cd64f..f618d290ad 100644 --- a/tests/languages/csp/directive_with_source_expression_feature.test +++ b/tests/languages/csp/directive_with_source_expression_feature.test @@ -1,10 +1,24 @@ -script-src example.com; +input-protection tolerance=50; input-protection-clip before=60; input-protection-selectors div; policy-uri https://example.com; script-src example.com; script-src-attr 'none'; style-src-elem 'none'; ---------------------------------------------------- [ + ["directive", "input-protection"], + " tolerance=50; ", + ["directive", "input-protection-clip"], + " before=60; ", + ["directive", "input-protection-selectors"], + " div; ", + ["directive", "policy-uri"], + " https://example.com; ", ["directive", "script-src"], - " example.com;" + " example.com; ", + ["directive", "script-src-attr"], + ["safe", "'none'"], + "; ", + ["directive", "style-src-elem"], + ["safe", "'none'"], + ";" ] ---------------------------------------------------- diff --git a/tests/languages/csp/safe_feature.test b/tests/languages/csp/safe_feature.test index 13c9d837b7..f61cc32fdd 100644 --- a/tests/languages/csp/safe_feature.test +++ b/tests/languages/csp/safe_feature.test @@ -1,10 +1,11 @@ -default-src 'none'; style-src 'self' 'strict-dynamic' 'nonce-yeah' 'sha256-EpOpN/ahUF6jhWShDUdy+NvvtaGcu5F7qM6+x2mfkh4='; +default-src 'none' 'report-sample'; style-src 'self' 'strict-dynamic' 'nonce-yeah' 'sha256-EpOpN/ahUF6jhWShDUdy+NvvtaGcu5F7qM6+x2mfkh4='; ---------------------------------------------------- [ ["directive", "default-src"], ["safe", "'none'"], + ["safe", "'report-sample'"], "; ", ["directive", "style-src"], ["safe", "'self'"], diff --git a/tests/languages/csp/unsafe_feature.test b/tests/languages/csp/unsafe_feature.test index e1cf98aa13..758ab58fc0 100644 --- a/tests/languages/csp/unsafe_feature.test +++ b/tests/languages/csp/unsafe_feature.test @@ -1,12 +1,18 @@ -script-src 'unsafe-inline' 'unsafe-eval' 'unsafe-hashed-attributes'; +navigate-to 'unsafe-allow-redirects'; script-src 'unsafe-dynamic' 'unsafe-eval' 'unsafe-hash-attributes' 'unsafe-hashed-attributes' 'unsafe-hashes' 'unsafe-inline'; ---------------------------------------------------- [ + ["directive", "navigate-to"], + ["unsafe", "'unsafe-allow-redirects'"], + "; ", ["directive", "script-src"], - ["unsafe", "'unsafe-inline'"], + ["unsafe", "'unsafe-dynamic'"], ["unsafe", "'unsafe-eval'"], + ["unsafe", "'unsafe-hash-attributes'"], ["unsafe", "'unsafe-hashed-attributes'"], + ["unsafe", "'unsafe-hashes'"], + ["unsafe", "'unsafe-inline'"], ";" ] From 9f82de508dab4944e0b11524fe95f07beaa5b83f Mon Sep 17 00:00:00 2001 From: Lea Verou Date: Thu, 3 Dec 2020 11:09:29 -0500 Subject: [PATCH 0682/1100] thousands -> millions We do have 3 million weekly downloads on npm, so I think "thousands" was quite an understatement at this point. --- assets/templates/header-main.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/templates/header-main.html b/assets/templates/header-main.html index 2db06c85ec..d346d61176 100644 --- a/assets/templates/header-main.html +++ b/assets/templates/header-main.html @@ -4,7 +4,7 @@

          Prism

          Prism is a lightweight, extensible syntax highlighter, built with modern web standards in mind. - It’s used in thousands of websites, including some of those you visit daily. + It’s used in millions of websites, including some of those you visit daily.

          **Description** @@ -22,6 +23,11 @@ A clear and concise description of what is being highlighted incorrectly and how **Code snippet** + +[Test page]() +
          The code being highlighted incorrectly. diff --git a/test.html b/test.html index 55caccfcd7..1c2aef4da1 100644 --- a/test.html +++ b/test.html @@ -91,6 +91,44 @@ margin: 0 1px; } +#options { + position: relative; +} + +.share-wrapper { + position: absolute; + top: 0; + right: 0; + background-color: white; +} +.share-wrapper .hidden-wrapper { + display: none; +} + +.share-wrapper:hover { + top: -.5em; + right: -1em; + width: 300px; + padding: .5em 1em; + outline: 1px solid #888; +} +.share-wrapper:hover .hidden-wrapper { + display: block; +} + +.share-wrapper input { + width: 100%; + box-sizing: border-box; +} + +.share-wrapper button { + border: none; + background: none; + font: inherit; + text-decoration: underline; + cursor: pointer; +} + @@ -115,9 +153,16 @@

          Test drive

          Result:

          -

          +

          -

          + +

          Language:

          @@ -151,18 +196,41 @@

          Test drive

          code = newCode; }; - +function getHashParams() { + return parseUrlParams((location.hash || '').substr(1)); +} +function setHashParams(params) { + location.hash = stringifyUrlParams(params); +} function updateHashLanguage(lang) { - location.hash = lang ? 'language=' + lang : ''; + var params = getHashParams(); + params.language = lang; + setHashParams(params); } function getHashLanguage() { - var match = /[#&]language=([^&]+)/.exec(location.hash); - return match ? match[1] : null; + return getHashParams().language; } function getRadio(lang) { return $('input[name=language][value="' + lang + '"]'); } +function copyShare() { + const link = $('#share-link').href; + try { + navigator.clipboard.writeText(link).then(function () { + $('#copy-share-link').textContent = 'Copied!'; + }, function () { + $('#copy-share-link').textContent = 'Failed to copy!'; + }); + } catch (e) { + $('#copy-share-link').textContent = 'Failed to copy!'; + } + setTimeout(function () { + $('#copy-share-link').textContent = 'Copy to clipboard'; + }, 5000); +} +window.copyShare = copyShare; + window.onhashchange = function () { var input = getRadio(getHashLanguage()); @@ -196,6 +264,7 @@

          Test drive

          code.className = 'language-' + lang; code.textContent = code.textContent; updateHashLanguage(lang); + updateShareLink(); // loadLanguage() returns a promise, so we use highlightCode() // as resolve callback. The promise will be immediately @@ -277,9 +346,14 @@

          Test drive

          var textarea = $('textarea', form); try { - var lastCode = sessionStorage.getItem('test-code'); - if (lastCode) { - textarea.value = lastCode; + var hashText = getHashParams().text; + if (hashText) { + textarea.value = hashText; + } else { + var lastCode = sessionStorage.getItem('test-code'); + if (lastCode) { + textarea.value = lastCode; + } } } catch (e) { // ignore sessionStorage errors @@ -290,6 +364,8 @@

          Test drive

          code.textContent = codeText; highlightCode(); + updateShareLink(); + try { sessionStorage.setItem('test-code', codeText); } catch (error) { @@ -308,8 +384,57 @@

          Test drive

          }; $('#option-show-tokens').onchange(); -})(); +function updateShareLink() { + var params = { + language: /\blang(?:uage)?-([\w-]+)\b/i.exec(code.className)[1], + text: code.textContent, + }; + $('#share-link').href = '#' + stringifyUrlParams(params); + $('#share-link-input').value = $('#share-link').href; +} + + +/** + * @param {Record} params + * @returns {string} + */ +function stringifyUrlParams(params) { + var parts = []; + for (var name in params) { + if (params.hasOwnProperty(name)) { + var value = params[name]; + if (typeof value === 'boolean') { + if (value) { + parts.push(name); + } + } else { + parts.push(name + '=' + encodeURIComponent(value)); + } + } + } + return parts.join('&'); +} +/** + * @param {string} str + * @returns {Record} + */ +function parseUrlParams(str) { + /** @type {Record} */ + var params = {}; + str.split(/&/g).filter(Boolean).forEach(function (part) { + var parts = part.split(/=/); + var name = parts[0]; + if (parts.length === 1) { + params[name] = true; + } else { + params[name] = decodeURIComponent(parts[1]); + } + }); + return params; +} + +})(); From df0738e94ed55612dde4f475a58e87ec4713ee73 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Tue, 22 Dec 2020 19:53:18 +0100 Subject: [PATCH 0692/1100] Test page: Don't trigger ad-blockers with class (#2677) A selector `.share-wrapper` seems to be in one of the common block lists, so I just renamed the wrapper from "share-wrapper" to "link-wrapper". This should prevent ad-blockers from blocking our "Share" link. --- test.html | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/test.html b/test.html index 1c2aef4da1..a3399c39d5 100644 --- a/test.html +++ b/test.html @@ -95,33 +95,33 @@ position: relative; } -.share-wrapper { +.link-wrapper { position: absolute; top: 0; right: 0; background-color: white; } -.share-wrapper .hidden-wrapper { +.link-wrapper .hidden-wrapper { display: none; } -.share-wrapper:hover { +.link-wrapper:hover { top: -.5em; right: -1em; width: 300px; padding: .5em 1em; outline: 1px solid #888; } -.share-wrapper:hover .hidden-wrapper { +.link-wrapper:hover .hidden-wrapper { display: block; } -.share-wrapper input { +.link-wrapper input { width: 100%; box-sizing: border-box; } -.share-wrapper button { +.link-wrapper button { border: none; background: none; font: inherit; @@ -155,7 +155,7 @@

          Test drive

          -

        Please note that the tutorials listed here are not verified to contain correct information. Read at your risk and always check the official documentation here if something doesn’t work :)

        From cf28d1b2cea18d38eb7db1513bffbf4179faf24c Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Sun, 3 Jan 2021 13:12:26 +0100 Subject: [PATCH 0704/1100] JSON: Fixed backtracking issue in Safari (#2691) --- components/prism-json.js | 6 ++++-- components/prism-json.min.js | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/components/prism-json.js b/components/prism-json.js index 07c4ea5dac..f8a2dd62ca 100644 --- a/components/prism-json.js +++ b/components/prism-json.js @@ -1,11 +1,13 @@ // https://www.json.org/json-en.html Prism.languages.json = { 'property': { - pattern: /"(?:\\.|[^\\"\r\n])*"(?=\s*:)/, + pattern: /(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/, + lookbehind: true, greedy: true }, 'string': { - pattern: /"(?:\\.|[^\\"\r\n])*"(?!\s*:)/, + pattern: /(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/, + lookbehind: true, greedy: true }, 'comment': { diff --git a/components/prism-json.min.js b/components/prism-json.min.js index 8315a59a24..9cde53651d 100644 --- a/components/prism-json.min.js +++ b/components/prism-json.min.js @@ -1 +1 @@ -Prism.languages.json={property:{pattern:/"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,greedy:!0},string:{pattern:/"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:true|false)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}},Prism.languages.webmanifest=Prism.languages.json; \ No newline at end of file +Prism.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:true|false)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}},Prism.languages.webmanifest=Prism.languages.json; \ No newline at end of file From 0e61a7e1ac2c8de9548c57c166aeb3161369778d Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Sun, 3 Jan 2021 18:18:28 +0100 Subject: [PATCH 0705/1100] Scheme: Added support for high Unicode characters (#2693) --- components/prism-scheme.js | 2 +- components/prism-scheme.min.js | 2 +- tests/languages/scheme/character_feature.test | 4 +++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/components/prism-scheme.js b/components/prism-scheme.js index eea2ae8a95..77a9255a72 100644 --- a/components/prism-scheme.js +++ b/components/prism-scheme.js @@ -15,7 +15,7 @@ greedy: true }, 'character': { - pattern: /#\\(?:[ux][a-fA-F\d]+\b|[-a-zA-Z]+\b|\S)/, + pattern: /#\\(?:[ux][a-fA-F\d]+\b|[-a-zA-Z]+\b|[\uD800-\uDBFF][\uDC00-\uDFFF]|\S)/, greedy: true, alias: 'string' }, diff --git a/components/prism-scheme.min.js b/components/prism-scheme.min.js index 0e5467f117..4724e88fd3 100644 --- a/components/prism-scheme.min.js +++ b/components/prism-scheme.min.js @@ -1 +1 @@ -Prism.languages.scheme={comment:/;.*|#;\s*\((?:[^()]|\([^()]*\))*\)|#\|(?:[^#|]|#(?!\|)|\|(?!#)|#\|(?:[^#|]|#(?!\|)|\|(?!#))*\|#)*\|#/,string:{pattern:/"(?:[^"\\]|\\.)*"/,greedy:!0},symbol:{pattern:/'[^()#'\s]+/,greedy:!0},character:{pattern:/#\\(?:[ux][a-fA-F\d]+\b|[-a-zA-Z]+\b|\S)/,greedy:!0,alias:"string"},"lambda-parameter":[{pattern:/((?:^|[^'`#])\(lambda\s+)(?:[^|()'\s]+|\|(?:[^\\|]|\\.)*\|)/,lookbehind:!0},{pattern:/((?:^|[^'`#])\(lambda\s+\()[^()']+/,lookbehind:!0}],keyword:{pattern:/((?:^|[^'`#])\()(?:begin|case(?:-lambda)?|cond(?:-expand)?|define(?:-library|-macro|-record-type|-syntax|-values)?|defmacro|delay(?:-force)?|do|else|export|except|guard|if|import|include(?:-ci|-library-declarations)?|lambda|let(?:rec)?(?:-syntax|-values|\*)?|let\*-values|only|parameterize|prefix|(?:quasi-?)?quote|rename|set!|syntax-(?:case|rules)|unless|unquote(?:-splicing)?|when)(?=[()\s]|$)/,lookbehind:!0},builtin:{pattern:/((?:^|[^'`#])\()(?:abs|and|append|apply|assoc|ass[qv]|binary-port\?|boolean=?\?|bytevector(?:-append|-copy|-copy!|-length|-u8-ref|-u8-set!|\?)?|caar|cadr|call-with-(?:current-continuation|port|values)|call\/cc|car|cdar|cddr|cdr|ceiling|char(?:->integer|-ready\?|\?|<\?|<=\?|=\?|>\?|>=\?)|close-(?:input-port|output-port|port)|complex\?|cons|current-(?:error|input|output)-port|denominator|dynamic-wind|eof-object\??|eq\?|equal\?|eqv\?|error|error-object(?:-irritants|-message|\?)|eval|even\?|exact(?:-integer-sqrt|-integer\?|\?)?|expt|features|file-error\?|floor(?:-quotient|-remainder|\/)?|flush-output-port|for-each|gcd|get-output-(?:bytevector|string)|inexact\??|input-port(?:-open\?|\?)|integer(?:->char|\?)|lcm|length|list(?:->string|->vector|-copy|-ref|-set!|-tail|\?)?|make-(?:bytevector|list|parameter|string|vector)|map|max|member|memq|memv|min|modulo|negative\?|newline|not|null\?|number(?:->string|\?)|numerator|odd\?|open-(?:input|output)-(?:bytevector|string)|or|output-port(?:-open\?|\?)|pair\?|peek-char|peek-u8|port\?|positive\?|procedure\?|quotient|raise|raise-continuable|rational\?|rationalize|read-(?:bytevector|bytevector!|char|error\?|line|string|u8)|real\?|remainder|reverse|round|set-c[ad]r!|square|string(?:->list|->number|->symbol|->utf8|->vector|-append|-copy|-copy!|-fill!|-for-each|-length|-map|-ref|-set!|\?|<\?|<=\?|=\?|>\?|>=\?)?|substring|symbol(?:->string|\?|=\?)|syntax-error|textual-port\?|truncate(?:-quotient|-remainder|\/)?|u8-ready\?|utf8->string|values|vector(?:->list|->string|-append|-copy|-copy!|-fill!|-for-each|-length|-map|-ref|-set!|\?)?|with-exception-handler|write-(?:bytevector|char|string|u8)|zero\?)(?=[()\s]|$)/,lookbehind:!0},operator:{pattern:/((?:^|[^'`#])\()(?:[-+*%/]|[<>]=?|=>?)(?=[()\s]|$)/,lookbehind:!0},number:{pattern:RegExp(function(r){for(var e in r)r[e]=r[e].replace(/<[\w\s]+>/g,function(e){return"(?:"+r[e].trim()+")"});return r[e]}({"":"\\d+(?:/\\d+)?|(?:\\d+(?:\\.\\d*)?|\\.\\d+)(?:e[+-]?\\d+)?","":"[+-]?|[+-](?:inf|nan)\\.0","":"[+-](?:|(?:inf|nan)\\.0)?i","":"(?:@|)?|","":"(?:#d(?:#[ei])?|#[ei](?:#d)?)?","":"[0-9a-f]+(?:/[0-9a-f]+)?","":"[+-]?|[+-](?:inf|nan)\\.0","":"[+-](?:|(?:inf|nan)\\.0)?i","":"(?:@|)?|","":"#[box](?:#[ei])?|(?:#[ei])?#[box]","":"(^|[\\s()])(?:|)(?=[()\\s]|$)"}),"i"),lookbehind:!0},boolean:{pattern:/(^|[\s()])#(?:[ft]|false|true)(?=[()\s]|$)/,lookbehind:!0},function:{pattern:/((?:^|[^'`#])\()(?:[^|()'\s]+|\|(?:[^\\|]|\\.)*\|)(?=[()\s]|$)/,lookbehind:!0},identifier:{pattern:/(^|[\s()])\|(?:[^\\|]|\\.)*\|(?=[()\s]|$)/,lookbehind:!0,greedy:!0},punctuation:/[()']/}; \ No newline at end of file +Prism.languages.scheme={comment:/;.*|#;\s*\((?:[^()]|\([^()]*\))*\)|#\|(?:[^#|]|#(?!\|)|\|(?!#)|#\|(?:[^#|]|#(?!\|)|\|(?!#))*\|#)*\|#/,string:{pattern:/"(?:[^"\\]|\\.)*"/,greedy:!0},symbol:{pattern:/'[^()#'\s]+/,greedy:!0},character:{pattern:/#\\(?:[ux][a-fA-F\d]+\b|[-a-zA-Z]+\b|[\uD800-\uDBFF][\uDC00-\uDFFF]|\S)/,greedy:!0,alias:"string"},"lambda-parameter":[{pattern:/((?:^|[^'`#])\(lambda\s+)(?:[^|()'\s]+|\|(?:[^\\|]|\\.)*\|)/,lookbehind:!0},{pattern:/((?:^|[^'`#])\(lambda\s+\()[^()']+/,lookbehind:!0}],keyword:{pattern:/((?:^|[^'`#])\()(?:begin|case(?:-lambda)?|cond(?:-expand)?|define(?:-library|-macro|-record-type|-syntax|-values)?|defmacro|delay(?:-force)?|do|else|export|except|guard|if|import|include(?:-ci|-library-declarations)?|lambda|let(?:rec)?(?:-syntax|-values|\*)?|let\*-values|only|parameterize|prefix|(?:quasi-?)?quote|rename|set!|syntax-(?:case|rules)|unless|unquote(?:-splicing)?|when)(?=[()\s]|$)/,lookbehind:!0},builtin:{pattern:/((?:^|[^'`#])\()(?:abs|and|append|apply|assoc|ass[qv]|binary-port\?|boolean=?\?|bytevector(?:-append|-copy|-copy!|-length|-u8-ref|-u8-set!|\?)?|caar|cadr|call-with-(?:current-continuation|port|values)|call\/cc|car|cdar|cddr|cdr|ceiling|char(?:->integer|-ready\?|\?|<\?|<=\?|=\?|>\?|>=\?)|close-(?:input-port|output-port|port)|complex\?|cons|current-(?:error|input|output)-port|denominator|dynamic-wind|eof-object\??|eq\?|equal\?|eqv\?|error|error-object(?:-irritants|-message|\?)|eval|even\?|exact(?:-integer-sqrt|-integer\?|\?)?|expt|features|file-error\?|floor(?:-quotient|-remainder|\/)?|flush-output-port|for-each|gcd|get-output-(?:bytevector|string)|inexact\??|input-port(?:-open\?|\?)|integer(?:->char|\?)|lcm|length|list(?:->string|->vector|-copy|-ref|-set!|-tail|\?)?|make-(?:bytevector|list|parameter|string|vector)|map|max|member|memq|memv|min|modulo|negative\?|newline|not|null\?|number(?:->string|\?)|numerator|odd\?|open-(?:input|output)-(?:bytevector|string)|or|output-port(?:-open\?|\?)|pair\?|peek-char|peek-u8|port\?|positive\?|procedure\?|quotient|raise|raise-continuable|rational\?|rationalize|read-(?:bytevector|bytevector!|char|error\?|line|string|u8)|real\?|remainder|reverse|round|set-c[ad]r!|square|string(?:->list|->number|->symbol|->utf8|->vector|-append|-copy|-copy!|-fill!|-for-each|-length|-map|-ref|-set!|\?|<\?|<=\?|=\?|>\?|>=\?)?|substring|symbol(?:->string|\?|=\?)|syntax-error|textual-port\?|truncate(?:-quotient|-remainder|\/)?|u8-ready\?|utf8->string|values|vector(?:->list|->string|-append|-copy|-copy!|-fill!|-for-each|-length|-map|-ref|-set!|\?)?|with-exception-handler|write-(?:bytevector|char|string|u8)|zero\?)(?=[()\s]|$)/,lookbehind:!0},operator:{pattern:/((?:^|[^'`#])\()(?:[-+*%/]|[<>]=?|=>?)(?=[()\s]|$)/,lookbehind:!0},number:{pattern:RegExp(function(r){for(var e in r)r[e]=r[e].replace(/<[\w\s]+>/g,function(e){return"(?:"+r[e].trim()+")"});return r[e]}({"":"\\d+(?:/\\d+)?|(?:\\d+(?:\\.\\d*)?|\\.\\d+)(?:e[+-]?\\d+)?","":"[+-]?|[+-](?:inf|nan)\\.0","":"[+-](?:|(?:inf|nan)\\.0)?i","":"(?:@|)?|","":"(?:#d(?:#[ei])?|#[ei](?:#d)?)?","":"[0-9a-f]+(?:/[0-9a-f]+)?","":"[+-]?|[+-](?:inf|nan)\\.0","":"[+-](?:|(?:inf|nan)\\.0)?i","":"(?:@|)?|","":"#[box](?:#[ei])?|(?:#[ei])?#[box]","":"(^|[\\s()])(?:|)(?=[()\\s]|$)"}),"i"),lookbehind:!0},boolean:{pattern:/(^|[\s()])#(?:[ft]|false|true)(?=[()\s]|$)/,lookbehind:!0},function:{pattern:/((?:^|[^'`#])\()(?:[^|()'\s]+|\|(?:[^\\|]|\\.)*\|)(?=[()\s]|$)/,lookbehind:!0},identifier:{pattern:/(^|[\s()])\|(?:[^\\|]|\\.)*\|(?=[()\s]|$)/,lookbehind:!0,greedy:!0},punctuation:/[()']/}; \ No newline at end of file diff --git a/tests/languages/scheme/character_feature.test b/tests/languages/scheme/character_feature.test index f95cb705bf..b699e18993 100644 --- a/tests/languages/scheme/character_feature.test +++ b/tests/languages/scheme/character_feature.test @@ -14,6 +14,7 @@ #\x10FFFF #\λ #\) +#\💩 ---------------------------------------------------- @@ -43,7 +44,8 @@ ["character", "#\\u0041"], ["character", "#\\x10FFFF"], ["character", "#\\λ"], - ["character", "#\\)"] + ["character", "#\\)"], + ["character", "#\\💩"] ] ---------------------------------------------------- From 01af04ed2be7cf18e02997428d3cc19addfc6012 Mon Sep 17 00:00:00 2001 From: Ayesh Karunaratne Date: Thu, 7 Jan 2021 02:01:16 +0700 Subject: [PATCH 0706/1100] PHP: Numeral syntax improvements (#2701) Improves numeral literal handling in the Prism PHP component in two ways: 1. Since PHP 7.4, it is possible to use [underscore numeric separator](https://php.watch/versions/7.4/underscore_numeric_separator). Prism correctly handles this for decimal numbers, but not for binary, octal, and hex numerals although PHP supports the underscore separator for binary, octal, and hex numeric literals as well. 2. In upcoming PHP 8.1, PHP supports an [explicit octal numeral prefix `0o`/`0O`](https://php.watch/versions/8.1/explicit-octal-notation). The existing `0` prefix is not removed. This commit updates the PHP number regex to accommodate both cases above, and expands the tests for new syntax. --- components/prism-php.js | 2 +- components/prism-php.min.js | 2 +- tests/languages/php/number_feature.test | 18 ++++++++++++++++-- 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/components/prism-php.js b/components/prism-php.js index fdd9c7637d..7eb227a2b8 100644 --- a/components/prism-php.js +++ b/components/prism-php.js @@ -15,7 +15,7 @@ /\b[A-Z_][A-Z0-9_]*\b(?!\s*\()/, /\b(?:null)\b/i, ]; - var number = /\b0b[01]+\b|\b0x[\da-f]+\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+)(?:e[+-]?\d+)?/i; + var number = /\b0b[01]+(?:_[01]+)*\b|\b0o[0-7]+(?:_[0-7]+)*\b|\b0x[\da-f]+(?:_[\da-f]+)*\b|(?:\b\d+(?:_\d+)*\.?(?:\d+(?:_\d+)*)?|\B\.\d+)(?:e[+-]?\d+)?/i; var operator = /|\?\?=?|\.{3}|\??->|[!=]=?=?|::|\*\*=?|--|\+\+|&&|\|\||<<|>>|[?~]|[/^|%*&<>.+-]=?/; var punctuation = /[{}\[\](),:;]/; diff --git a/components/prism-php.min.js b/components/prism-php.min.js index 80c53df438..2ef9393aa4 100644 --- a/components/prism-php.min.js +++ b/components/prism-php.min.js @@ -1 +1 @@ -!function(a){var e=/\/\*[\s\S]*?\*\/|\/\/.*|#(?!\[).*/,t=[{pattern:/\b(?:false|true)\b/i,alias:"boolean"},/\b[A-Z_][A-Z0-9_]*\b(?!\s*\()/,/\b(?:null)\b/i],i=/\b0b[01]+\b|\b0x[\da-f]+\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+)(?:e[+-]?\d+)?/i,n=/|\?\?=?|\.{3}|\??->|[!=]=?=?|::|\*\*=?|--|\+\+|&&|\|\||<<|>>|[?~]|[/^|%*&<>.+-]=?/,s=/[{}\[\](),:;]/;a.languages.php={delimiter:{pattern:/\?>$|^<\?(?:php(?=\s)|=)?/i,alias:"important"},comment:e,variable:/\$+(?:\w+\b|(?={))/i,package:{pattern:/(namespace\s+|use\s+(?:function\s+)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,lookbehind:!0,inside:{punctuation:/\\/}},keyword:[{pattern:/(\(\s*)\b(?:bool|boolean|int|integer|float|string|object|array)\b(?=\s*\))/i,alias:"type-casting",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)\b(?:bool|int|float|string|object|array(?!\s*\()|mixed|self|static|callable|iterable|(?:null|false)(?=\s*\|))\b(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*[a-z0-9_|]\|\s*)(?:null|false)\b(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b(?:bool|int|float|string|object|void|array(?!\s*\()|mixed|self|static|callable|iterable|(?:null|false)(?=\s*\|))\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?[a-z0-9_|]\|\s*)(?:null|false)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/\b(?:bool|int|float|string|object|void|array(?!\s*\()|mixed|iterable|(?:null|false)(?=\s*\|))\b/i,alias:"type-declaration",greedy:!0},{pattern:/(\|\s*)(?:null|false)\b/i,alias:"type-declaration",greedy:!0,lookbehind:!0},{pattern:/\b(?:parent|self|static)(?=\s*::)/i,alias:"static-context",greedy:!0},/\b(?:__halt_compiler|abstract|and|array|as|break|callable|case|catch|class|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|eval|exit|extends|final|finally|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|namespace|match|new|or|parent|print|private|protected|public|require|require_once|return|self|static|switch|throw|trait|try|unset|use|var|while|xor|yield)\b/i],"argument-name":/\b[a-z_]\w*(?=\s*:(?!:))/i,"class-name":[{pattern:/(\b(?:class|interface|extends|implements|trait|instanceof|new(?!\s+self|\s+static))\s+|\bcatch\s*\()\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/(\|\s*)\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/\b[a-z_]\w*(?!\\)\b(?=\s*\|)/i,greedy:!0},{pattern:/(\|\s*)(?:\\?\b[a-z_]\w*)+\b/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(?:\\?\b[a-z_]\w*)+\b(?=\s*\|)/i,alias:"class-name-fully-qualified",greedy:!0,inside:{punctuation:/\\/}},{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self\b|\s+static\b))\s+|\bcatch\s*\()(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*\$)/i,alias:"type-declaration",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-declaration"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*::)/i,alias:["class-name-fully-qualified","static-context"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/([(,?]\s*)[a-z_]\w*(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-hint"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b[a-z_]\w*(?!\\)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:["class-name-fully-qualified","return-type"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:t,function:/\w+\s*(?=\()/,property:{pattern:/(->)[\w]+/,lookbehind:!0},number:i,operator:n,punctuation:s};var l={pattern:/{\$(?:{(?:{[^{}]+}|[^{}]+)}|[^{}])+}|(^|[^\\{])\$+(?:\w+(?:\[[^\r\n\[\]]+\]|->\w+)*)/,lookbehind:!0,inside:a.languages.php},r=[{pattern:/<<<'([^']+)'[\r\n](?:.*[\r\n])*?\1;/,alias:"nowdoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<'[^']+'|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<'?|[';]$/}}}},{pattern:/<<<(?:"([^"]+)"[\r\n](?:.*[\r\n])*?\1;|([a-z_]\w*)[\r\n](?:.*[\r\n])*?\2;)/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<(?:"[^"]+"|[a-z_]\w*)|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<"?|[";]$/}},interpolation:l}},{pattern:/`(?:\\[\s\S]|[^\\`])*`/,alias:"backtick-quoted-string",greedy:!0},{pattern:/'(?:\\[\s\S]|[^\\'])*'/,alias:"single-quoted-string",greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,alias:"double-quoted-string",greedy:!0,inside:{interpolation:l}}];a.languages.insertBefore("php","variable",{string:r}),a.languages.insertBefore("php","variable",{attribute:{pattern:/#\[(?:[^"'\/#]|\/(?![*/])|\/\/.*$|#(?!\[).*$|\/\*(?:[^*]|\*(?!\/))*\*\/|"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*')+\](?=\s*[a-z$#])/im,greedy:!0,inside:{"attribute-content":{pattern:/^(#\[)[\s\S]+(?=]$)/,lookbehind:!0,inside:{comment:e,string:r,"attribute-class-name":[{pattern:/([^:]|^)\b[a-z_]\w*(?!\\)\b/i,alias:"class-name",greedy:!0,lookbehind:!0},{pattern:/([^:]|^)(?:\\?\b[a-z_]\w*)+/i,alias:["class-name","class-name-fully-qualified"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:t,number:i,operator:n,punctuation:s}},delimiter:{pattern:/^#\[|]$/,alias:"punctuation"}}}}),a.hooks.add("before-tokenize",function(e){if(/<\?/.test(e.code)){a.languages["markup-templating"].buildPlaceholders(e,"php",/<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#(?!\[))(?:[^?\n\r]|\?(?!>))*(?=$|\?>|[\r\n])|#\[|\/\*(?:[^*]|\*(?!\/))*(?:\*\/|$))*?(?:\?>|$)/gi)}}),a.hooks.add("after-tokenize",function(e){a.languages["markup-templating"].tokenizePlaceholders(e,"php")})}(Prism); \ No newline at end of file +!function(a){var e=/\/\*[\s\S]*?\*\/|\/\/.*|#(?!\[).*/,t=[{pattern:/\b(?:false|true)\b/i,alias:"boolean"},/\b[A-Z_][A-Z0-9_]*\b(?!\s*\()/,/\b(?:null)\b/i],i=/\b0b[01]+(?:_[01]+)*\b|\b0o[0-7]+(?:_[0-7]+)*\b|\b0x[\da-f]+(?:_[\da-f]+)*\b|(?:\b\d+(?:_\d+)*\.?(?:\d+(?:_\d+)*)?|\B\.\d+)(?:e[+-]?\d+)?/i,n=/|\?\?=?|\.{3}|\??->|[!=]=?=?|::|\*\*=?|--|\+\+|&&|\|\||<<|>>|[?~]|[/^|%*&<>.+-]=?/,s=/[{}\[\](),:;]/;a.languages.php={delimiter:{pattern:/\?>$|^<\?(?:php(?=\s)|=)?/i,alias:"important"},comment:e,variable:/\$+(?:\w+\b|(?={))/i,package:{pattern:/(namespace\s+|use\s+(?:function\s+)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,lookbehind:!0,inside:{punctuation:/\\/}},keyword:[{pattern:/(\(\s*)\b(?:bool|boolean|int|integer|float|string|object|array)\b(?=\s*\))/i,alias:"type-casting",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)\b(?:bool|int|float|string|object|array(?!\s*\()|mixed|self|static|callable|iterable|(?:null|false)(?=\s*\|))\b(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*[a-z0-9_|]\|\s*)(?:null|false)\b(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b(?:bool|int|float|string|object|void|array(?!\s*\()|mixed|self|static|callable|iterable|(?:null|false)(?=\s*\|))\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?[a-z0-9_|]\|\s*)(?:null|false)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/\b(?:bool|int|float|string|object|void|array(?!\s*\()|mixed|iterable|(?:null|false)(?=\s*\|))\b/i,alias:"type-declaration",greedy:!0},{pattern:/(\|\s*)(?:null|false)\b/i,alias:"type-declaration",greedy:!0,lookbehind:!0},{pattern:/\b(?:parent|self|static)(?=\s*::)/i,alias:"static-context",greedy:!0},/\b(?:__halt_compiler|abstract|and|array|as|break|callable|case|catch|class|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|eval|exit|extends|final|finally|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|namespace|match|new|or|parent|print|private|protected|public|require|require_once|return|self|static|switch|throw|trait|try|unset|use|var|while|xor|yield)\b/i],"argument-name":/\b[a-z_]\w*(?=\s*:(?!:))/i,"class-name":[{pattern:/(\b(?:class|interface|extends|implements|trait|instanceof|new(?!\s+self|\s+static))\s+|\bcatch\s*\()\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/(\|\s*)\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/\b[a-z_]\w*(?!\\)\b(?=\s*\|)/i,greedy:!0},{pattern:/(\|\s*)(?:\\?\b[a-z_]\w*)+\b/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(?:\\?\b[a-z_]\w*)+\b(?=\s*\|)/i,alias:"class-name-fully-qualified",greedy:!0,inside:{punctuation:/\\/}},{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self\b|\s+static\b))\s+|\bcatch\s*\()(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*\$)/i,alias:"type-declaration",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-declaration"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*::)/i,alias:["class-name-fully-qualified","static-context"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/([(,?]\s*)[a-z_]\w*(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-hint"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b[a-z_]\w*(?!\\)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:["class-name-fully-qualified","return-type"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:t,function:/\w+\s*(?=\()/,property:{pattern:/(->)[\w]+/,lookbehind:!0},number:i,operator:n,punctuation:s};var l={pattern:/{\$(?:{(?:{[^{}]+}|[^{}]+)}|[^{}])+}|(^|[^\\{])\$+(?:\w+(?:\[[^\r\n\[\]]+\]|->\w+)*)/,lookbehind:!0,inside:a.languages.php},r=[{pattern:/<<<'([^']+)'[\r\n](?:.*[\r\n])*?\1;/,alias:"nowdoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<'[^']+'|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<'?|[';]$/}}}},{pattern:/<<<(?:"([^"]+)"[\r\n](?:.*[\r\n])*?\1;|([a-z_]\w*)[\r\n](?:.*[\r\n])*?\2;)/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<(?:"[^"]+"|[a-z_]\w*)|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<"?|[";]$/}},interpolation:l}},{pattern:/`(?:\\[\s\S]|[^\\`])*`/,alias:"backtick-quoted-string",greedy:!0},{pattern:/'(?:\\[\s\S]|[^\\'])*'/,alias:"single-quoted-string",greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,alias:"double-quoted-string",greedy:!0,inside:{interpolation:l}}];a.languages.insertBefore("php","variable",{string:r}),a.languages.insertBefore("php","variable",{attribute:{pattern:/#\[(?:[^"'\/#]|\/(?![*/])|\/\/.*$|#(?!\[).*$|\/\*(?:[^*]|\*(?!\/))*\*\/|"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*')+\](?=\s*[a-z$#])/im,greedy:!0,inside:{"attribute-content":{pattern:/^(#\[)[\s\S]+(?=]$)/,lookbehind:!0,inside:{comment:e,string:r,"attribute-class-name":[{pattern:/([^:]|^)\b[a-z_]\w*(?!\\)\b/i,alias:"class-name",greedy:!0,lookbehind:!0},{pattern:/([^:]|^)(?:\\?\b[a-z_]\w*)+/i,alias:["class-name","class-name-fully-qualified"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:t,number:i,operator:n,punctuation:s}},delimiter:{pattern:/^#\[|]$/,alias:"punctuation"}}}}),a.hooks.add("before-tokenize",function(e){if(/<\?/.test(e.code)){a.languages["markup-templating"].buildPlaceholders(e,"php",/<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#(?!\[))(?:[^?\n\r]|\?(?!>))*(?=$|\?>|[\r\n])|#\[|\/\*(?:[^*]|\*(?!\/))*(?:\*\/|$))*?(?:\?>|$)/gi)}}),a.hooks.add("after-tokenize",function(e){a.languages["markup-templating"].tokenizePlaceholders(e,"php")})}(Prism); \ No newline at end of file diff --git a/tests/languages/php/number_feature.test b/tests/languages/php/number_feature.test index 850930ea03..8333572ae8 100644 --- a/tests/languages/php/number_feature.test +++ b/tests/languages/php/number_feature.test @@ -7,6 +7,13 @@ 0x539 0x1A 0123 +0o123 +0O123 +0b1111_0000_111 +0o1111_0000_123 +0O1111_0000_123 +01111_0000_123 +0xAAAA_FFF_0123 ---------------------------------------------------- @@ -19,9 +26,16 @@ ["number", "0b10100111001"], ["number", "0x539"], ["number", "0x1A"], - ["number", "0123"] + ["number", "0123"], + ["number", "0o123"], + ["number", "0O123"], + ["number", "0b1111_0000_111"], + ["number", "0o1111_0000_123"], + ["number", "0O1111_0000_123"], + ["number", "01111_0000_123"], + ["number", "0xAAAA_FFF_0123"] ] ---------------------------------------------------- -Checks for numbers. \ No newline at end of file +Checks for numbers. From 6e34771fd73065f72cc43efe28a1356ac7fa47b0 Mon Sep 17 00:00:00 2001 From: 0xflotus <0xflotus@gmail.com> Date: Thu, 7 Jan 2021 19:34:18 +0100 Subject: [PATCH 0707/1100] SQL: Added `ILIKE` operator (#2704) Added `ILIKE` operator to sql keyword list and sorted the list alphabetically. --- components/prism-sql.js | 2 +- components/prism-sql.min.js | 2 +- tests/languages/sql/operator_feature.test | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/components/prism-sql.js b/components/prism-sql.js index bb37ff702c..449a2fe199 100644 --- a/components/prism-sql.js +++ b/components/prism-sql.js @@ -19,6 +19,6 @@ Prism.languages.sql = { 'keyword': /\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:_INSERT|COL)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:S|ING)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i, 'boolean': /\b(?:TRUE|FALSE|NULL)\b/i, 'number': /\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i, - 'operator': /[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|IN|LIKE|NOT|OR|IS|DIV|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i, + 'operator': /[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|IN|ILIKE|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i, 'punctuation': /[;[\]()`,.]/ }; diff --git a/components/prism-sql.min.js b/components/prism-sql.min.js index b256396ae3..62e7cb631a 100644 --- a/components/prism-sql.min.js +++ b/components/prism-sql.min.js @@ -1 +1 @@ -Prism.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:_INSERT|COL)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:S|ING)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:TRUE|FALSE|NULL)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|IN|LIKE|NOT|OR|IS|DIV|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/}; \ No newline at end of file +Prism.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:_INSERT|COL)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:S|ING)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:TRUE|FALSE|NULL)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|IN|ILIKE|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/}; \ No newline at end of file diff --git a/tests/languages/sql/operator_feature.test b/tests/languages/sql/operator_feature.test index ec5be04a3c..45510115a4 100644 --- a/tests/languages/sql/operator_feature.test +++ b/tests/languages/sql/operator_feature.test @@ -9,6 +9,7 @@ AND BETWEEN IN +ILIKE LIKE NOT OR @@ -33,6 +34,7 @@ XOR ["operator", "AND"], ["operator", "BETWEEN"], ["operator", "IN"], + ["operator", "ILIKE"], ["operator", "LIKE"], ["operator", "NOT"], ["operator", "OR"], From 729627012e9ca7a3cd99aa49619bda4c0ae0df8e Mon Sep 17 00:00:00 2001 From: Taegon Kim Date: Fri, 8 Jan 2021 22:22:50 +0900 Subject: [PATCH 0708/1100] Added support for V langauge (#2687) --- components.js | 2 +- components.json | 5 + components/prism-v.js | 79 ++++++++++++++ components/prism-v.min.js | 1 + examples/prism-v.html | 91 ++++++++++++++++ plugins/autoloader/prism-autoloader.js | 1 + plugins/autoloader/prism-autoloader.min.js | 2 +- tests/languages/v/boolean_feature.test | 13 +++ tests/languages/v/class-name_feature.test | 41 +++++++ tests/languages/v/function_feature.test | 120 +++++++++++++++++++++ tests/languages/v/keyword_feature.test | 93 ++++++++++++++++ tests/languages/v/number_feature.test | 25 +++++ tests/languages/v/operator_feature.test | 67 ++++++++++++ tests/languages/v/string_feature.test | 47 ++++++++ 14 files changed, 585 insertions(+), 2 deletions(-) create mode 100644 components/prism-v.js create mode 100644 components/prism-v.min.js create mode 100644 examples/prism-v.html create mode 100644 tests/languages/v/boolean_feature.test create mode 100644 tests/languages/v/class-name_feature.test create mode 100644 tests/languages/v/function_feature.test create mode 100644 tests/languages/v/keyword_feature.test create mode 100644 tests/languages/v/number_feature.test create mode 100644 tests/languages/v/operator_feature.test create mode 100644 tests/languages/v/string_feature.test diff --git a/components.js b/components.js index a0d23dbd7c..61a4304917 100644 --- a/components.js +++ b/components.js @@ -1,2 +1,2 @@ -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml","ssml","atom","rss"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","ssml":"SSML","atom":"Atom","rss":"RSS"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","optional":"regex","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"ABNF","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"agda":{"title":"Agda","owner":"xy-ren"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apex":{"title":"Apex","require":["clike","sql"],"owner":"RunDevelopment"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"dkern"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"birb":{"title":"Birb","require":"clike","owner":"Calamity210"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"BNF","alias":"rbnf","aliasTitles":{"rbnf":"RBNF"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"bsl":{"title":"BSL (1C:Enterprise)","alias":"oscript","aliasTitles":{"oscript":"OneScript"},"owner":"Diversus23"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"clojure":{"title":"Clojure","owner":"troglotit"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"cypher":{"title":"Cypher","owner":"RunDevelopment"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dataweave":{"title":"DataWeave","owner":"machaval"},"dax":{"title":"DAX","owner":"peterbud"},"dhall":{"title":"Dhall","owner":"RunDevelopment"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"EBNF","owner":"RunDevelopment"},"editorconfig":{"title":"EditorConfig","owner":"osipxd"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"c","owner":"Golmote"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","optional":["markdown"],"owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"hlsl":{"title":"HLSL","require":"c","owner":"RunDevelopment"},"http":{"title":"HTTP","optional":["css","javascript","json","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"ignore":{"title":".ignore","owner":"osipxd","alias":["gitignore","hgignore","npmignore"],"aliasTitles":{"gitignore":".gitignore","hgignore":".hgignore","npmignore":".npmignore"}},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike","typescript"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","alias":"webmanifest","aliasTitles":{"webmanifest":"Web App Manifest"},"owner":"CupOfTea696"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"jsstacktrace":{"title":"JS stack trace","owner":"sbrl"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","alias":["kt","kts"],"aliasTitles":{"kts":"Kotlin Script"},"require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","optional":"yaml","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"mongodb":{"title":"MongoDB","owner":"airs0urce","require":"javascript"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"naniscript":{"title":"Naninovel Script","owner":"Elringus","alias":"nani"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":"markup-templating","owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"promql":{"title":"PromQL","owner":"arendjr"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"purebasic":{"title":"PureBasic","require":"clike","alias":"pbfasm","owner":"HeX0R101"},"purescript":{"title":"PureScript","require":"haskell","alias":"purs","owner":"sriharshachilakapati"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"racket":{"title":"Racket","require":"scheme","alias":"rkt","owner":"RunDevelopment"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","owner":"RunDevelopment"},"renpy":{"title":"Ren'py","alias":"rpy","owner":"HyuchiaDiego"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","alias":["sh-session","shellsession"],"owner":"RunDevelopment"},"smali":{"title":"Smali","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sml":{"title":"SML","alias":"smlnj","aliasTitles":{"smlnj":"SML/NJ"},"owner":"RunDevelopment"},"solidity":{"title":"Solidity (Ethereum)","alias":"sol","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"stan":{"title":"Stan","owner":"RunDevelopment"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","vbnet"],"owner":"RunDevelopment"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"typoscript":{"title":"TypoScript","alias":"tsconfig","aliasTitles":{"tsconfig":"TSConfig"},"owner":"dkern"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"vala":{"title":"Vala","require":"clike","optional":"regex","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":["vb","vba"],"aliasTitles":{"vba":"VBA"},"owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xml-doc":{"title":"XML doc (.net)","require":"markup","modify":["csharp","fsharp","vbnet"],"owner":"RunDevelopment"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"yang":{"title":"YANG","owner":"RunDevelopment"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml","ssml","atom","rss"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","ssml":"SSML","atom":"Atom","rss":"RSS"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","optional":"regex","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"ABNF","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"agda":{"title":"Agda","owner":"xy-ren"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apex":{"title":"Apex","require":["clike","sql"],"owner":"RunDevelopment"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"dkern"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"birb":{"title":"Birb","require":"clike","owner":"Calamity210"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"BNF","alias":"rbnf","aliasTitles":{"rbnf":"RBNF"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"bsl":{"title":"BSL (1C:Enterprise)","alias":"oscript","aliasTitles":{"oscript":"OneScript"},"owner":"Diversus23"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"clojure":{"title":"Clojure","owner":"troglotit"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"cypher":{"title":"Cypher","owner":"RunDevelopment"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dataweave":{"title":"DataWeave","owner":"machaval"},"dax":{"title":"DAX","owner":"peterbud"},"dhall":{"title":"Dhall","owner":"RunDevelopment"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"EBNF","owner":"RunDevelopment"},"editorconfig":{"title":"EditorConfig","owner":"osipxd"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"c","owner":"Golmote"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","optional":["markdown"],"owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"hlsl":{"title":"HLSL","require":"c","owner":"RunDevelopment"},"http":{"title":"HTTP","optional":["css","javascript","json","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"ignore":{"title":".ignore","owner":"osipxd","alias":["gitignore","hgignore","npmignore"],"aliasTitles":{"gitignore":".gitignore","hgignore":".hgignore","npmignore":".npmignore"}},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike","typescript"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","alias":"webmanifest","aliasTitles":{"webmanifest":"Web App Manifest"},"owner":"CupOfTea696"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"jsstacktrace":{"title":"JS stack trace","owner":"sbrl"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","alias":["kt","kts"],"aliasTitles":{"kts":"Kotlin Script"},"require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","optional":"yaml","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"mongodb":{"title":"MongoDB","owner":"airs0urce","require":"javascript"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"naniscript":{"title":"Naninovel Script","owner":"Elringus","alias":"nani"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":"markup-templating","owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"promql":{"title":"PromQL","owner":"arendjr"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"purebasic":{"title":"PureBasic","require":"clike","alias":"pbfasm","owner":"HeX0R101"},"purescript":{"title":"PureScript","require":"haskell","alias":"purs","owner":"sriharshachilakapati"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"racket":{"title":"Racket","require":"scheme","alias":"rkt","owner":"RunDevelopment"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","owner":"RunDevelopment"},"renpy":{"title":"Ren'py","alias":"rpy","owner":"HyuchiaDiego"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","alias":["sh-session","shellsession"],"owner":"RunDevelopment"},"smali":{"title":"Smali","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sml":{"title":"SML","alias":"smlnj","aliasTitles":{"smlnj":"SML/NJ"},"owner":"RunDevelopment"},"solidity":{"title":"Solidity (Ethereum)","alias":"sol","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"stan":{"title":"Stan","owner":"RunDevelopment"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","vbnet"],"owner":"RunDevelopment"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"typoscript":{"title":"TypoScript","alias":"tsconfig","aliasTitles":{"tsconfig":"TSConfig"},"owner":"dkern"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"v":{"title":"V","require":"clike","owner":"taggon"},"vala":{"title":"Vala","require":"clike","optional":"regex","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":["vb","vba"],"aliasTitles":{"vba":"VBA"},"owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xml-doc":{"title":"XML doc (.net)","require":"markup","modify":["csharp","fsharp","vbnet"],"owner":"RunDevelopment"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"yang":{"title":"YANG","owner":"RunDevelopment"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; if (typeof module !== 'undefined' && module.exports) { module.exports = components; } \ No newline at end of file diff --git a/components.json b/components.json index e2e9845a97..c2fcfd77d5 100644 --- a/components.json +++ b/components.json @@ -1199,6 +1199,11 @@ "alias": ["uscript", "uc"], "owner": "RunDevelopment" }, + "v": { + "title": "V", + "require": "clike", + "owner": "taggon" + }, "vala": { "title": "Vala", "require": "clike", diff --git a/components/prism-v.js b/components/prism-v.js new file mode 100644 index 0000000000..8a7cfde532 --- /dev/null +++ b/components/prism-v.js @@ -0,0 +1,79 @@ +(function(Prism) { + var interpolationExpr = { + pattern: /[\s\S]+/, + inside: null + }; + + Prism.languages.v = Prism.languages.extend('clike', { + 'string': [ + { + pattern: /`(?:\\\`|\\?[^\`]{1,2})`/, // using {1,2} instead of `u` flag for compatibility + alias: 'rune' + }, + { + pattern: /r?(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/, + alias: 'quoted-string', + greedy: true, + inside: { + 'interpolation': { + pattern: /((?:^|[^\\])(?:\\{2})*)\$(?:\{[^{}]*\}|\w+(?:\.\w+(?:\([^\(\)]*\))?|\[[^\[\]]+\])*)/, + lookbehind: true, + inside: { + 'interpolation-variable': { + pattern: /^\$\w[\s\S]*$/, + alias: 'variable' + }, + 'interpolation-punctuation': { + pattern: /^\${|}$/, + alias: 'punctuation' + }, + 'interpolation-expression': interpolationExpr + } + } + } + } + ], + 'class-name': { + pattern: /(\b(?:enum|interface|struct|type)\s+)(?:C\.)?[\w]+/, + lookbehind: true + }, + 'keyword': /(?:\b(?:as|asm|assert|atomic|break|chan|const|continue|defer|else|embed|enum|fn|for|__global|go(?:to)?|if|import|in|interface|is|lock|match|module|mut|none|or|pub|return|rlock|select|shared|sizeof|static|struct|type(?:of)?|union|unsafe)|\$(?:if|else|for)|#(?:include|flag))\b/, + 'number': /\b(?:0x[a-f\d]+(?:_[a-f\d]+)*|0b[01]+(?:_[01]+)*|0o[0-7]+(?:_[0-7]+)*|\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?)\b/i, + 'operator': /~|\?|[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\.?/, + 'builtin': /\b(?:any(?:_int|_float)?|bool|byte(?:ptr)?|charptr|f(?:32|64)|i(?:8|16|nt|64|128)|rune|size_t|string|u(?:16|32|64|128)|voidptr)\b/ + }); + + interpolationExpr.inside = Prism.languages.v; + + Prism.languages.insertBefore('v', 'operator', { + 'attribute': { + pattern: /^\s*\[(?:deprecated|unsafe_fn|typedef|live|inline|flag|ref_only|windows_stdcall|direct_array_access)\]/m, + alias: 'annotation', + inside: { + 'punctuation': /[\[\]]/, + 'keyword': /\w+/ + } + }, + 'generic': { + pattern: /\<\w+\>(?=\s*[\)\{])/, + inside: { + 'punctuation': /[<>]/, + 'class-name': /\w+/ + } + } + }); + + Prism.languages.insertBefore('v', 'function', { + 'generic-function': { + // e.g. foo( ... + pattern: /\w+\s*<\w+>(?=\()/, + inside: { + 'function': /^\w+/, + 'generic': { + pattern: /<\w+>/, + inside: Prism.languages.v.generic.inside + } + } + } + }); +})(Prism); \ No newline at end of file diff --git a/components/prism-v.min.js b/components/prism-v.min.js new file mode 100644 index 0000000000..0c6b4d52cf --- /dev/null +++ b/components/prism-v.min.js @@ -0,0 +1 @@ +!function(e){var n={pattern:/[\s\S]+/,inside:null};e.languages.v=e.languages.extend("clike",{string:[{pattern:/`(?:\\\`|\\?[^\`]{1,2})`/,alias:"rune"},{pattern:/r?(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,alias:"quoted-string",greedy:!0,inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:\{[^{}]*\}|\w+(?:\.\w+(?:\([^\(\)]*\))?|\[[^\[\]]+\])*)/,lookbehind:!0,inside:{"interpolation-variable":{pattern:/^\$\w[\s\S]*$/,alias:"variable"},"interpolation-punctuation":{pattern:/^\${|}$/,alias:"punctuation"},"interpolation-expression":n}}}}],"class-name":{pattern:/(\b(?:enum|interface|struct|type)\s+)(?:C\.)?[\w]+/,lookbehind:!0},keyword:/(?:\b(?:as|asm|assert|atomic|break|chan|const|continue|defer|else|embed|enum|fn|for|__global|go(?:to)?|if|import|in|interface|is|lock|match|module|mut|none|or|pub|return|rlock|select|shared|sizeof|static|struct|type(?:of)?|union|unsafe)|\$(?:if|else|for)|#(?:include|flag))\b/,number:/\b(?:0x[a-f\d]+(?:_[a-f\d]+)*|0b[01]+(?:_[01]+)*|0o[0-7]+(?:_[0-7]+)*|\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?)\b/i,operator:/~|\?|[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\.?/,builtin:/\b(?:any(?:_int|_float)?|bool|byte(?:ptr)?|charptr|f(?:32|64)|i(?:8|16|nt|64|128)|rune|size_t|string|u(?:16|32|64|128)|voidptr)\b/}),n.inside=e.languages.v,e.languages.insertBefore("v","operator",{attribute:{pattern:/^\s*\[(?:deprecated|unsafe_fn|typedef|live|inline|flag|ref_only|windows_stdcall|direct_array_access)\]/m,alias:"annotation",inside:{punctuation:/[\[\]]/,keyword:/\w+/}},generic:{pattern:/\<\w+\>(?=\s*[\)\{])/,inside:{punctuation:/[<>]/,"class-name":/\w+/}}}),e.languages.insertBefore("v","function",{"generic-function":{pattern:/\w+\s*<\w+>(?=\()/,inside:{function:/^\w+/,generic:{pattern:/<\w+>/,inside:e.languages.v.generic.inside}}}})}(Prism); \ No newline at end of file diff --git a/examples/prism-v.html b/examples/prism-v.html new file mode 100644 index 0000000000..1ddb018263 --- /dev/null +++ b/examples/prism-v.html @@ -0,0 +1,91 @@ +

        Comments

        +
        // This is a comment
        +/* This is a comment
        +on multiple lines */
        + +

        Numbers

        +
        123
        +0x7B
        +0b01111011
        +0o173
        +170141183460469231731687303715884105727
        +1_000_000
        +0b0_11
        +3_122.55
        +0xF_F
        +0o17_3
        +72.40
        +072.40
        +2.71828
        +
        + +

        Runes and strings

        +
        '\t'
        +'\000'
        +'\x07'
        +'\u12e4'
        +'\U00101234'
        +`abc`
        +`multi-line
        +string`
        +"Hello, world!"
        +"multi-line
        +string"
        + +

        String interpolation

        +
        'Hello, $name!'
        +"age = $user.age"
        +'can register = ${user.age > 13}'
        +'x = ${x:4.2f}'
        +'[${x:10}]'
        +'[${int(x):-10}]'
        +
        + +

        Struct

        +
        struct Foo {
        +	a int   // private immutable (default)
        +mut:
        +	b int   // private mutable
        +	c int   // (you can list multiple fields with the same access modifier)
        +pub:
        +	d int   // public immutable (readonly)
        +pub mut:
        +	e int   // public, but mutable only in parent module
        +__global:
        +	f int   // public and mutable both inside and outside parent module
        +}           // (not recommended to use, that's why the 'global' keyword
        +			// starts with __)
        +
        + +

        Functions

        +
        func(a, b int, z float64) bool { return a*b < int(z) }
        + +

        Full example

        +
        
        +module mymodule
        +
        +import external_module
        +
        +fn sqr(n int) int {
        +	return n * n
        +}
        +
        +fn run(value int, op fn (int) int) int {
        +	return op(value)
        +}
        +
        +fn main() {
        +	println(run(5, sqr)) // "25"
        +	// Anonymous functions can be declared inside other functions:
        +	double_fn := fn (n int) int {
        +		return n + n
        +	}
        +	println(run(5, double_fn)) // "10"
        +	// Functions can be passed around without assigning them to variables:
        +	res := run(5, fn (n int) int {
        +		return n + n
        +	})
        +
        +	external_module.say_hi()
        +}
        +
        diff --git a/plugins/autoloader/prism-autoloader.js b/plugins/autoloader/prism-autoloader.js index 48b90c390f..c90ee6b3ba 100644 --- a/plugins/autoloader/prism-autoloader.js +++ b/plugins/autoloader/prism-autoloader.js @@ -141,6 +141,7 @@ "textile": "markup", "twig": "markup", "typescript": "javascript", + "v": "clike", "vala": "clike", "vbnet": "basic", "velocity": "markup", diff --git a/plugins/autoloader/prism-autoloader.min.js b/plugins/autoloader/prism-autoloader.min.js index dd5b4113ce..1012adf6c5 100644 --- a/plugins/autoloader/prism-autoloader.min.js +++ b/plugins/autoloader/prism-autoloader.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof self&&self.Prism&&self.document&&document.createElement){var l={javascript:"clike",actionscript:"javascript",apex:["clike","sql"],arduino:"cpp",aspnet:["markup","csharp"],birb:"clike",bison:"c",c:"clike",csharp:"clike",cpp:"c",coffeescript:"javascript",crystal:"ruby","css-extras":"css",d:"clike",dart:"clike",django:"markup-templating",ejs:["javascript","markup-templating"],etlua:["lua","markup-templating"],erb:["ruby","markup-templating"],fsharp:"clike","firestore-security-rules":"clike",flow:"javascript",ftl:"markup-templating",gml:"clike",glsl:"c",go:"clike",groovy:"clike",haml:"ruby",handlebars:"markup-templating",haxe:"clike",hlsl:"c",java:"clike",javadoc:["markup","java","javadoclike"],jolie:"clike",jsdoc:["javascript","javadoclike","typescript"],"js-extras":"javascript",json5:"json",jsonp:"json","js-templates":"javascript",kotlin:"clike",latte:["clike","markup-templating","php"],less:"css",lilypond:"scheme",markdown:"markup","markup-templating":"markup",mongodb:"javascript",n4js:"javascript",nginx:"clike",objectivec:"c",opencl:"c",parser:"markup",php:"markup-templating",phpdoc:["php","javadoclike"],"php-extras":"php",plsql:"sql",processing:"clike",protobuf:"clike",pug:["markup","javascript"],purebasic:"clike",purescript:"haskell",qml:"javascript",qore:"clike",racket:"scheme",jsx:["markup","javascript"],tsx:["jsx","typescript"],reason:"clike",ruby:"clike",sass:"css",scss:"css",scala:"java","shell-session":"bash",smarty:"markup-templating",solidity:"clike",soy:"markup-templating",sparql:"turtle",sqf:"clike",swift:"clike","t4-cs":["t4-templating","csharp"],"t4-vb":["t4-templating","vbnet"],tap:"yaml",tt2:["clike","markup-templating"],textile:"markup",twig:"markup",typescript:"javascript",vala:"clike",vbnet:"basic",velocity:"markup",wiki:"markup",xeora:"markup","xml-doc":"markup",xquery:"markup"},n={html:"markup",xml:"markup",svg:"markup",mathml:"markup",ssml:"markup",atom:"markup",rss:"markup",js:"javascript",g4:"antlr4",adoc:"asciidoc",shell:"bash",shortcode:"bbcode",rbnf:"bnf",oscript:"bsl",cs:"csharp",dotnet:"csharp",coffee:"coffeescript",conc:"concurnas",jinja2:"django","dns-zone":"dns-zone-file",dockerfile:"docker",eta:"ejs",xlsx:"excel-formula",xls:"excel-formula",gamemakerlanguage:"gml",hs:"haskell",gitignore:"ignore",hgignore:"ignore",npmignore:"ignore",webmanifest:"json",kt:"kotlin",kts:"kotlin",tex:"latex",context:"latex",ly:"lilypond",emacs:"lisp",elisp:"lisp","emacs-lisp":"lisp",md:"markdown",moon:"moonscript",n4jsd:"n4js",nani:"naniscript",objc:"objectivec",objectpascal:"pascal",px:"pcaxis",pcode:"peoplecode",pq:"powerquery",mscript:"powerquery",pbfasm:"purebasic",purs:"purescript",py:"python",rkt:"racket",rpy:"renpy",robot:"robotframework",rb:"ruby","sh-session":"shell-session",shellsession:"shell-session",smlnj:"sml",sol:"solidity",sln:"solution-file",rq:"sparql",t4:"t4-cs",trig:"turtle",ts:"typescript",tsconfig:"typoscript",uscript:"unrealscript",uc:"unrealscript",vb:"visual-basic",vba:"visual-basic",xeoracube:"xeora",yml:"yaml"},p={},e="components/",a=Prism.util.currentScript();if(a){var r=/\bplugins\/autoloader\/prism-autoloader\.(?:min\.)?js(?:\?[^\r\n/]*)?$/i,s=/(^|\/)[\w-]+\.(?:min\.)?js(?:\?[^\r\n/]*)?$/i,t=a.getAttribute("data-autoloader-path");if(null!=t)e=t.trim().replace(/\/?$/,"/");else{var i=a.src;r.test(i)?e=i.replace(r,"components/"):s.test(i)&&(e=i.replace(s,"$1components/"))}}var o=Prism.plugins.autoloader={languages_path:e,use_minified:!0,loadLanguages:m};Prism.hooks.add("complete",function(e){var a=e.element,r=e.language;if(a&&r&&"none"!==r){var s=function(e){var a=(e.getAttribute("data-dependencies")||"").trim();if(!a){var r=e.parentElement;r&&"pre"===r.tagName.toLowerCase()&&(a=(r.getAttribute("data-dependencies")||"").trim())}return a?a.split(/\s*,\s*/g):[]}(a);/^diff-./i.test(r)?(s.push("diff"),s.push(r.substr("diff-".length))):s.push(r),s.every(u)||m(s,function(){Prism.highlightElement(a)})}})}function u(e){if(0<=e.indexOf("!"))return!1;if((e=n[e]||e)in Prism.languages)return!0;var a=p[e];return a&&!a.error&&!1===a.loading}function m(e,a,r){"string"==typeof e&&(e=[e]);var s=e.length,t=0,i=!1;function c(){i||++t===s&&a&&a(e)}0!==s?e.forEach(function(e){!function(a,r,s){var t=0<=a.indexOf("!");function e(){var e=p[a];e||(e=p[a]={callbacks:[]}),e.callbacks.push({success:r,error:s}),!t&&u(a)?k(a,"success"):!t&&e.error?k(a,"error"):!t&&e.loading||(e.loading=!0,e.error=!1,function(e,a,r){var s=document.createElement("script");s.src=e,s.async=!0,s.onload=function(){document.body.removeChild(s),a&&a()},s.onerror=function(){document.body.removeChild(s),r&&r()},document.body.appendChild(s)}(function(e){return o.languages_path+"prism-"+e+(o.use_minified?".min":"")+".js"}(a),function(){e.loading=!1,k(a,"success")},function(){e.loading=!1,e.error=!0,k(a,"error")}))}a=a.replace("!",""),a=n[a]||a;var i=l[a];i&&i.length?m(i,e,s):e()}(e,c,function(){i||(i=!0,r&&r(e))})}):a&&setTimeout(a,0)}function k(e,a){if(p[e]){for(var r=p[e].callbacks,s=0,t=r.length;s { } + +---------------------------------------------------- + +[ + ["keyword", "struct"], + ["class-name", "Abc"], + ["punctuation", "{"], + ["punctuation", "}"], + + ["keyword", "type"], + ["class-name", "Alphabet"], + ["operator", "="], + " Abc ", + ["operator", "|"], + " Xyz\r\n", + + ["keyword", "enum"], + ["class-name", "Token"], + ["punctuation", "{"], + ["punctuation", "}"], + + ["keyword", "interface"], + ["class-name", "Speaker"], + ["punctuation", "{"], + ["punctuation", "}"], + + ["keyword", "struct"], + ["class-name", "Repo"], + ["generic", [ + ["punctuation", "<"], + ["class-name", "T"], + ["punctuation", ">"] + ]], + ["punctuation", "{"], + ["punctuation", "}"] +] \ No newline at end of file diff --git a/tests/languages/v/function_feature.test b/tests/languages/v/function_feature.test new file mode 100644 index 0000000000..41e1749c30 --- /dev/null +++ b/tests/languages/v/function_feature.test @@ -0,0 +1,120 @@ +fn init() { } +fn add(x int, y int) int { } +fn sum(a ...int) int { } +fn (mut t MyTime) century() int { } +fn (d Dog) speak() string { } +fn (r Repo) find_user_by_id(id int) ?User { } +fn new_repo(db DB) Repo { } +fn (r Repo) find_by_id(id int) ?T { } + +---------------------------------------------------- + +[ + ["keyword", "fn"], + ["function", "init"], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", "{"], + ["punctuation", "}"], + + ["keyword", "fn"], + ["function", "add"], + ["punctuation", "("], + "x ", + ["builtin", "int"], + ["punctuation", ","], + " y ", + ["builtin", "int"], + ["punctuation", ")"], + ["builtin", "int"], + ["punctuation", "{"], + ["punctuation", "}"], + + ["keyword", "fn"], + ["function", "sum"], + ["punctuation", "("], + "a ", + ["operator", "..."], + ["builtin", "int"], + ["punctuation", ")"], + ["builtin", "int"], + ["punctuation", "{"], + ["punctuation", "}"], + + ["keyword", "fn"], + ["punctuation", "("], + ["keyword", "mut"], + " t MyTime", + ["punctuation", ")"], + ["function", "century"], + ["punctuation", "("], + ["punctuation", ")"], + ["builtin", "int"], + ["punctuation", "{"], + ["punctuation", "}"], + + ["keyword", "fn"], + ["punctuation", "("], + "d Dog", + ["punctuation", ")"], + ["function", "speak"], + ["punctuation", "("], + ["punctuation", ")"], + ["builtin", "string"], + ["punctuation", "{"], + ["punctuation", "}"], + + ["keyword", "fn"], + ["punctuation", "("], + "r Repo", + ["punctuation", ")"], + ["function", "find_user_by_id"], + ["punctuation", "("], + "id ", + ["builtin", "int"], + ["punctuation", ")"], + ["operator", "?"], + "User ", + ["punctuation", "{"], + ["punctuation", "}"], + + ["keyword", "fn"], + ["generic-function", [ + ["function", "new_repo"], + ["generic", [ + ["punctuation", "<"], + ["class-name", "T"], + ["punctuation", ">"] + ]] + ]], + ["punctuation", "("], + "db DB", + ["punctuation", ")"], + " Repo", + ["generic", [ + ["punctuation", "<"], + ["class-name", "T"], + ["punctuation", ">"] + ]], + ["punctuation", "{"], + ["punctuation", "}"], + + ["keyword", "fn"], + ["punctuation", "("], + "r Repo", + ["generic", [ + ["punctuation", "<"], + ["class-name", "T"], + ["punctuation", ">"] + ]], + ["punctuation", ")"], + ["function", "find_by_id"], + ["punctuation", "("], + "id ", + ["builtin", "int"], + ["punctuation", ")"], + ["operator", "?"], + "T ", + ["punctuation", "{"], + ["punctuation", "}"] +] \ No newline at end of file diff --git a/tests/languages/v/keyword_feature.test b/tests/languages/v/keyword_feature.test new file mode 100644 index 0000000000..279ed0d8da --- /dev/null +++ b/tests/languages/v/keyword_feature.test @@ -0,0 +1,93 @@ +as; +asm; +assert; +atomic; +break; +const; +continue; +defer; +else; +embed; +enum;; +fn; +for; +__global; +go; +goto; +if; +import; +in; +interface; +is; +lock; +match; +module; +mut; +none; +or; +pub; +return; +rlock; +select; +shared; +sizeof; +static; +struct; +type;; +typeof; +union; +unsafe; +$if; +$else; +$for; +#include; +#flag; + +---------------------------------------------------- + +[ + ["keyword", "as"], ["punctuation", ";"], + ["keyword", "asm"], ["punctuation", ";"], + ["keyword", "assert"], ["punctuation", ";"], + ["keyword", "atomic"], ["punctuation", ";"], + ["keyword", "break"], ["punctuation", ";"], + ["keyword", "const"], ["punctuation", ";"], + ["keyword", "continue"], ["punctuation", ";"], + ["keyword", "defer"], ["punctuation", ";"], + ["keyword", "else"], ["punctuation", ";"], + ["keyword", "embed"], ["punctuation", ";"], + ["keyword", "enum"], ["punctuation", ";"], ["punctuation", ";"], + ["keyword", "fn"], ["punctuation", ";"], + ["keyword", "for"], ["punctuation", ";"], + ["keyword", "__global"], ["punctuation", ";"], + ["keyword", "go"], ["punctuation", ";"], + ["keyword", "goto"], ["punctuation", ";"], + ["keyword", "if"], ["punctuation", ";"], + ["keyword", "import"], ["punctuation", ";"], + ["keyword", "in"], ["punctuation", ";"], + ["keyword", "interface"], ["punctuation", ";"], + ["keyword", "is"], ["punctuation", ";"], + ["keyword", "lock"], ["punctuation", ";"], + ["keyword", "match"], ["punctuation", ";"], + ["keyword", "module"], ["punctuation", ";"], + ["keyword", "mut"], ["punctuation", ";"], + ["keyword", "none"], ["punctuation", ";"], + ["keyword", "or"], ["punctuation", ";"], + ["keyword", "pub"], ["punctuation", ";"], + ["keyword", "return"], ["punctuation", ";"], + ["keyword", "rlock"], ["punctuation", ";"], + ["keyword", "select"], ["punctuation", ";"], + ["keyword", "shared"], ["punctuation", ";"], + ["keyword", "sizeof"], ["punctuation", ";"], + ["keyword", "static"], ["punctuation", ";"], + ["keyword", "struct"], ["punctuation", ";"], + ["keyword", "type"], ["punctuation", ";"], ["punctuation", ";"], + ["keyword", "typeof"], ["punctuation", ";"], + ["keyword", "union"], ["punctuation", ";"], + ["keyword", "unsafe"], ["punctuation", ";"], + ["keyword", "$if"], ["punctuation", ";"], + ["keyword", "$else"], ["punctuation", ";"], + ["keyword", "$for"], ["punctuation", ";"], + ["keyword", "#include"], ["punctuation", ";"], + ["keyword", "#flag"], ["punctuation", ";"] +] \ No newline at end of file diff --git a/tests/languages/v/number_feature.test b/tests/languages/v/number_feature.test new file mode 100644 index 0000000000..06820c7115 --- /dev/null +++ b/tests/languages/v/number_feature.test @@ -0,0 +1,25 @@ +123 +0x7B +0b01111011 +0o173 +1_000_000 +0xF_F +072.40 +2.71828 + +---------------------------------------------------- + +[ + ["number", "123"], + ["number", "0x7B"], + ["number", "0b01111011"], + ["number", "0o173"], + ["number", "1_000_000"], + ["number", "0xF_F"], + ["number", "072.40"], + ["number", "2.71828"] +] + +---------------------------------------------------- + +Check for numbers \ No newline at end of file diff --git a/tests/languages/v/operator_feature.test b/tests/languages/v/operator_feature.test new file mode 100644 index 0000000000..f7744026cb --- /dev/null +++ b/tests/languages/v/operator_feature.test @@ -0,0 +1,67 @@ ++ +- +* +/ +% +~ +& +| +^ +! +&& +|| +!= +<< +>> +== +< +<= +> +>= ++= +-= +*= +/= +%= +&= +|= +^= +>>= +<<= +:= + +---------------------------------------------------- + +[ + ["operator", "+"], + ["operator", "-"], + ["operator", "*"], + ["operator", "/"], + ["operator", "%"], + ["operator", "~"], + ["operator", "&"], + ["operator", "|"], + ["operator", "^"], + ["operator", "!"], + ["operator", "&&"], + ["operator", "||"], + ["operator", "!="], + ["operator", "<<"], + ["operator", ">>"], + ["operator", "=="], + ["operator", "<"], + ["operator", "<="], + ["operator", ">"], + ["operator", ">="], + ["operator", "+="], + ["operator", "-="], + ["operator", "*="], + ["operator", "/="], + ["operator", "%="], + ["operator", "&="], + ["operator", "|="], + ["operator", "^="], + ["operator", ">>="], + ["operator", "<<="], + ["operator", ":="] +] \ No newline at end of file diff --git a/tests/languages/v/string_feature.test b/tests/languages/v/string_feature.test new file mode 100644 index 0000000000..3040a7fc0d --- /dev/null +++ b/tests/languages/v/string_feature.test @@ -0,0 +1,47 @@ +"https://example.com" +'single quote' +'age = $user.age' +'[${int(x):-10}]' +r'hello\nworld' +`🚀` +`\`` +`Not a Rune` + +---------------------------------------------------- + +[ + ["string", ["\"https://example.com\""]], + ["string", ["'single quote'"]], + ["string", [ + "'age = ", + ["interpolation", [ + ["interpolation-variable", "$user.age"] + ]], + "'" + ]], + ["string", [ + "'[", + ["interpolation", [ + ["interpolation-punctuation", "${"], + ["interpolation-expression", [ + ["function", "int"], + ["punctuation", "("], + "x", + ["punctuation", ")"], + ["punctuation", ":"], + ["operator", "-"], + ["number", "10"] + ]], + ["interpolation-punctuation", "}"] + ]], + "]'" + ]], + ["string", ["r'hello\\nworld'"]], + ["string", "`🚀`"], + ["string", "`\\``"], + "\r\n`Not a Rune`" +] + +---------------------------------------------------- + +Check for strings and string interpolation \ No newline at end of file From 59f725d7d3030853d4ce8fd7f2f6c6760bcc66a3 Mon Sep 17 00:00:00 2001 From: Matthew Lehner Date: Sun, 10 Jan 2021 04:57:59 -0800 Subject: [PATCH 0709/1100] Elixir: Added `defdelagate` keyword and highlighting for function/module names (#2709) --- components/prism-elixir.js | 14 +++++++++- components/prism-elixir.min.js | 2 +- tests/languages/elixir/keyword_feature.test | 10 ++++--- tests/languages/elixir/module_feature.test | 29 +++++++++++++++++++++ 4 files changed, 50 insertions(+), 5 deletions(-) create mode 100644 tests/languages/elixir/module_feature.test diff --git a/components/prism-elixir.js b/components/prism-elixir.js index 793323c4ea..cfad1c8841 100644 --- a/components/prism-elixir.js +++ b/components/prism-elixir.js @@ -55,7 +55,7 @@ Prism.languages.elixir = { alias: 'variable' }, 'number': /\b(?:0[box][a-f\d_]+|\d[\d_]*)(?:\.[\d_]+)?(?:e[+-]?[\d_]+)?\b/i, - 'keyword': /\b(?:after|alias|and|case|catch|cond|def(?:callback|exception|impl|module|p|protocol|struct)?|do|else|end|fn|for|if|import|not|or|require|rescue|try|unless|use|when)\b/, + 'keyword': /\b(?:after|alias|and|case|catch|cond|def(?:callback|exception|impl|module|p|protocol|struct|delegate)?|do|else|end|fn|for|if|import|not|or|require|rescue|try|unless|use|when)\b/, 'boolean': /\b(?:true|false|nil)\b/, 'operator': [ /\bin\b|&&?|\|[|>]?|\\\\|::|\.\.\.?|\+\+?|-[->]?|<[-=>]|>=|!==?|\B!|=(?:==?|[>~])?|[*\/^]/, @@ -73,6 +73,18 @@ Prism.languages.elixir = { 'punctuation': /<<|>>|[.,%\[\]{}()]/ }; +Prism.languages.insertBefore('elixir', 'keyword', { + 'module': { + pattern: /\b(defmodule\s)[A-Z][\w.\\]+/, + lookbehind: true, + alias: 'class-name' + }, + 'function': { + pattern: /\b(defp?\s)[\w.\\]+/, + lookbehind: true + } +}); + Prism.languages.elixir.string.forEach(function(o) { o.inside = { 'interpolation': { diff --git a/components/prism-elixir.min.js b/components/prism-elixir.min.js index 8882992d31..ee6542e41f 100644 --- a/components/prism-elixir.min.js +++ b/components/prism-elixir.min.js @@ -1 +1 @@ -Prism.languages.elixir={comment:/#.*/m,regex:{pattern:/~[rR](?:("""|''')(?:\\[\s\S]|(?!\1)[^\\])+\1|([\/|"'])(?:\\.|(?!\2)[^\\\r\n])+\2|\((?:\\.|[^\\)\r\n])+\)|\[(?:\\.|[^\\\]\r\n])+\]|\{(?:\\.|[^\\}\r\n])+\}|<(?:\\.|[^\\>\r\n])+>)[uismxfr]*/,greedy:!0},string:[{pattern:/~[cCsSwW](?:("""|''')(?:\\[\s\S]|(?!\1)[^\\])+\1|([\/|"'])(?:\\.|(?!\2)[^\\\r\n])+\2|\((?:\\.|[^\\)\r\n])+\)|\[(?:\\.|[^\\\]\r\n])+\]|\{(?:\\.|#\{[^}]+\}|#(?!\{)|[^#\\}\r\n])+\}|<(?:\\.|[^\\>\r\n])+>)[csa]?/,greedy:!0,inside:{}},{pattern:/("""|''')[\s\S]*?\1/,greedy:!0,inside:{}},{pattern:/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0,inside:{}}],atom:{pattern:/(^|[^:]):\w+/,lookbehind:!0,alias:"symbol"},"attr-name":/\w+\??:(?!:)/,capture:{pattern:/(^|[^&])&(?:[^&\s\d()][^\s()]*|(?=\())/,lookbehind:!0,alias:"function"},argument:{pattern:/(^|[^&])&\d+/,lookbehind:!0,alias:"variable"},attribute:{pattern:/@\w+/,alias:"variable"},number:/\b(?:0[box][a-f\d_]+|\d[\d_]*)(?:\.[\d_]+)?(?:e[+-]?[\d_]+)?\b/i,keyword:/\b(?:after|alias|and|case|catch|cond|def(?:callback|exception|impl|module|p|protocol|struct)?|do|else|end|fn|for|if|import|not|or|require|rescue|try|unless|use|when)\b/,boolean:/\b(?:true|false|nil)\b/,operator:[/\bin\b|&&?|\|[|>]?|\\\\|::|\.\.\.?|\+\+?|-[->]?|<[-=>]|>=|!==?|\B!|=(?:==?|[>~])?|[*\/^]/,{pattern:/([^<])<(?!<)/,lookbehind:!0},{pattern:/([^>])>(?!>)/,lookbehind:!0}],punctuation:/<<|>>|[.,%\[\]{}()]/},Prism.languages.elixir.string.forEach(function(e){e.inside={interpolation:{pattern:/#\{[^}]+\}/,inside:{delimiter:{pattern:/^#\{|\}$/,alias:"punctuation"},rest:Prism.languages.elixir}}}}); \ No newline at end of file +Prism.languages.elixir={comment:/#.*/m,regex:{pattern:/~[rR](?:("""|''')(?:\\[\s\S]|(?!\1)[^\\])+\1|([\/|"'])(?:\\.|(?!\2)[^\\\r\n])+\2|\((?:\\.|[^\\)\r\n])+\)|\[(?:\\.|[^\\\]\r\n])+\]|\{(?:\\.|[^\\}\r\n])+\}|<(?:\\.|[^\\>\r\n])+>)[uismxfr]*/,greedy:!0},string:[{pattern:/~[cCsSwW](?:("""|''')(?:\\[\s\S]|(?!\1)[^\\])+\1|([\/|"'])(?:\\.|(?!\2)[^\\\r\n])+\2|\((?:\\.|[^\\)\r\n])+\)|\[(?:\\.|[^\\\]\r\n])+\]|\{(?:\\.|#\{[^}]+\}|#(?!\{)|[^#\\}\r\n])+\}|<(?:\\.|[^\\>\r\n])+>)[csa]?/,greedy:!0,inside:{}},{pattern:/("""|''')[\s\S]*?\1/,greedy:!0,inside:{}},{pattern:/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0,inside:{}}],atom:{pattern:/(^|[^:]):\w+/,lookbehind:!0,alias:"symbol"},"attr-name":/\w+\??:(?!:)/,capture:{pattern:/(^|[^&])&(?:[^&\s\d()][^\s()]*|(?=\())/,lookbehind:!0,alias:"function"},argument:{pattern:/(^|[^&])&\d+/,lookbehind:!0,alias:"variable"},attribute:{pattern:/@\w+/,alias:"variable"},number:/\b(?:0[box][a-f\d_]+|\d[\d_]*)(?:\.[\d_]+)?(?:e[+-]?[\d_]+)?\b/i,keyword:/\b(?:after|alias|and|case|catch|cond|def(?:callback|exception|impl|module|p|protocol|struct|delegate)?|do|else|end|fn|for|if|import|not|or|require|rescue|try|unless|use|when)\b/,boolean:/\b(?:true|false|nil)\b/,operator:[/\bin\b|&&?|\|[|>]?|\\\\|::|\.\.\.?|\+\+?|-[->]?|<[-=>]|>=|!==?|\B!|=(?:==?|[>~])?|[*\/^]/,{pattern:/([^<])<(?!<)/,lookbehind:!0},{pattern:/([^>])>(?!>)/,lookbehind:!0}],punctuation:/<<|>>|[.,%\[\]{}()]/},Prism.languages.insertBefore("elixir","keyword",{module:{pattern:/\b(defmodule\s)[A-Z][\w.\\]+/,lookbehind:!0,alias:"class-name"},function:{pattern:/\b(defp?\s)[\w.\\]+/,lookbehind:!0}}),Prism.languages.elixir.string.forEach(function(e){e.inside={interpolation:{pattern:/#\{[^}]+\}/,inside:{delimiter:{pattern:/^#\{|\}$/,alias:"punctuation"},rest:Prism.languages.elixir}}}}); \ No newline at end of file diff --git a/tests/languages/elixir/keyword_feature.test b/tests/languages/elixir/keyword_feature.test index e1b02a1ae3..6a851f1b24 100644 --- a/tests/languages/elixir/keyword_feature.test +++ b/tests/languages/elixir/keyword_feature.test @@ -3,7 +3,9 @@ catch cond def defcallback defexception defimpl defmodule -defp defprotocol +defp +defprotocol +defdelegate defstruct do else end fn for if import not or @@ -18,7 +20,9 @@ unless use when ["keyword", "defcallback"], ["keyword", "defexception"], ["keyword", "defimpl"], ["keyword", "defmodule"], - ["keyword", "defp"], ["keyword", "defprotocol"], + ["keyword", "defp"], + ["keyword", "defprotocol"], + ["keyword", "defdelegate"], ["keyword", "defstruct"], ["keyword", "do"], ["keyword", "else"], ["keyword", "end"], ["keyword", "fn"], ["keyword", "for"], ["keyword", "if"], ["keyword", "import"], ["keyword", "not"], ["keyword", "or"], @@ -28,4 +32,4 @@ unless use when ---------------------------------------------------- -Checks for all keywords. \ No newline at end of file +Checks for all keywords. diff --git a/tests/languages/elixir/module_feature.test b/tests/languages/elixir/module_feature.test new file mode 100644 index 0000000000..c0236d0bb7 --- /dev/null +++ b/tests/languages/elixir/module_feature.test @@ -0,0 +1,29 @@ +defmodule Math do + def sum(a, b) do + a + b + end +end + +---------------------------------------------------- + +[ + ["keyword", "defmodule"], ["module", "Math"], ["keyword", "do"], + + ["keyword", "def"], + ["function", "sum"], + ["punctuation", "("], + "a", + ["punctuation", ","], + " b", + ["punctuation", ")"], + ["keyword", "do"], + + "\n a ", ["operator", "+"], " b\n ", + + ["keyword", "end"], + ["keyword", "end"] +] + +---------------------------------------------------- + +Checks for all keywords. From 4e7b2a82d733fc705bc4a50192fb1bbe552bc687 Mon Sep 17 00:00:00 2001 From: Jxck Date: Sun, 17 Jan 2021 01:45:05 +0900 Subject: [PATCH 0710/1100] HTTP: Allow root path in request line (#2711) --- components/prism-http.js | 2 +- components/prism-http.min.js | 2 +- tests/languages/http/request-line_feature.test | 7 ++++++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/components/prism-http.js b/components/prism-http.js index 4c20d4eff1..4f37679e35 100644 --- a/components/prism-http.js +++ b/components/prism-http.js @@ -1,7 +1,7 @@ (function (Prism) { Prism.languages.http = { 'request-line': { - pattern: /^(?:POST|GET|PUT|DELETE|OPTIONS|PATCH|TRACE|CONNECT)\s(?:https?:\/\/|\/)\S+\sHTTP\/[0-9.]+/m, + pattern: /^(?:POST|GET|PUT|DELETE|OPTIONS|PATCH|TRACE|CONNECT)\s(?:https?:\/\/|\/)\S*\sHTTP\/[0-9.]+/m, inside: { // HTTP Verb 'property': /^(?:POST|GET|PUT|DELETE|OPTIONS|PATCH|TRACE|CONNECT)\b/, diff --git a/components/prism-http.min.js b/components/prism-http.min.js index 52a14a7c88..5b5b842f2c 100644 --- a/components/prism-http.min.js +++ b/components/prism-http.min.js @@ -1 +1 @@ -!function(t){t.languages.http={"request-line":{pattern:/^(?:POST|GET|PUT|DELETE|OPTIONS|PATCH|TRACE|CONNECT)\s(?:https?:\/\/|\/)\S+\sHTTP\/[0-9.]+/m,inside:{property:/^(?:POST|GET|PUT|DELETE|OPTIONS|PATCH|TRACE|CONNECT)\b/,"attr-name":/:\w+/}},"response-status":{pattern:/^HTTP\/1.[01] \d.*/m,inside:{property:{pattern:/(^HTTP\/1.[01] )\d.*/i,lookbehind:!0}}},"header-name":{pattern:/^[\w-]+:(?=.)/m,alias:"keyword"}};var a,e,n,i=t.languages,p={"application/javascript":i.javascript,"application/json":i.json||i.javascript,"application/xml":i.xml,"text/xml":i.xml,"text/html":i.html,"text/css":i.css},r={"application/json":!0,"application/xml":!0};for(var s in p)if(p[s]){a=a||{};var T=r[s]?(void 0,n=(e=s).replace(/^[a-z]+\//,""),"(?:"+e+"|\\w+/(?:[\\w.-]+\\+)+"+n+"(?![+\\w.-]))"):s;a[s.replace(/\//g,"-")]={pattern:RegExp("(content-type:\\s*"+T+".*)(?:\\r?\\n|\\r){2}[\\s\\S]*","i"),lookbehind:!0,inside:p[s]}}a&&t.languages.insertBefore("http","header-name",a)}(Prism); \ No newline at end of file +!function(t){t.languages.http={"request-line":{pattern:/^(?:POST|GET|PUT|DELETE|OPTIONS|PATCH|TRACE|CONNECT)\s(?:https?:\/\/|\/)\S*\sHTTP\/[0-9.]+/m,inside:{property:/^(?:POST|GET|PUT|DELETE|OPTIONS|PATCH|TRACE|CONNECT)\b/,"attr-name":/:\w+/}},"response-status":{pattern:/^HTTP\/1.[01] \d.*/m,inside:{property:{pattern:/(^HTTP\/1.[01] )\d.*/i,lookbehind:!0}}},"header-name":{pattern:/^[\w-]+:(?=.)/m,alias:"keyword"}};var a,e,n,i=t.languages,p={"application/javascript":i.javascript,"application/json":i.json||i.javascript,"application/xml":i.xml,"text/xml":i.xml,"text/html":i.html,"text/css":i.css},r={"application/json":!0,"application/xml":!0};for(var s in p)if(p[s]){a=a||{};var T=r[s]?(void 0,n=(e=s).replace(/^[a-z]+\//,""),"(?:"+e+"|\\w+/(?:[\\w.-]+\\+)+"+n+"(?![+\\w.-]))"):s;a[s.replace(/\//g,"-")]={pattern:RegExp("(content-type:\\s*"+T+".*)(?:\\r?\\n|\\r){2}[\\s\\S]*","i"),lookbehind:!0,inside:p[s]}}a&&t.languages.insertBefore("http","header-name",a)}(Prism); \ No newline at end of file diff --git a/tests/languages/http/request-line_feature.test b/tests/languages/http/request-line_feature.test index 70db1a9f38..b387625765 100644 --- a/tests/languages/http/request-line_feature.test +++ b/tests/languages/http/request-line_feature.test @@ -7,6 +7,7 @@ PATCH http://example.com HTTP/1.0 TRACE http://example.com HTTP/1.0 CONNECT http://example.com HTTP/1.0 GET /path/to/foo.html HTTP/1.1 +GET / HTTP/1.1 ---------------------------------------------------- @@ -48,9 +49,13 @@ GET /path/to/foo.html HTTP/1.1 ["request-line", [ ["property", "GET"], " /path/to/foo.html HTTP/1.1" + ]], + ["request-line", [ + ["property", "GET"], + " / HTTP/1.1" ]] ] ---------------------------------------------------- -Checks for request lines. \ No newline at end of file +Checks for request lines. From 1f91868e4d9aaddd9e19fd6e0a0794194242aa22 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Sun, 17 Jan 2021 14:29:35 +0100 Subject: [PATCH 0711/1100] Added support for DOT (#2690) --- components.js | 2 +- components.json | 6 + components/prism-dot.js | 77 +++++++++++ components/prism-dot.min.js | 1 + examples/prism-dot.html | 31 +++++ plugins/autoloader/prism-autoloader.js | 1 + plugins/autoloader/prism-autoloader.min.js | 2 +- plugins/show-language/prism-show-language.js | 2 + .../show-language/prism-show-language.min.js | 2 +- .../dot!+markup/attribute_feature.test | 129 ++++++++++++++++++ tests/languages/dot/attribute_feature.test | 53 +++++++ tests/languages/dot/comment_feature.test | 15 ++ tests/languages/dot/graph-name_feature.test | 22 +++ tests/languages/dot/keyword_feature.test | 17 +++ tests/languages/dot/node_feature.test | 34 +++++ tests/languages/dot/operator_feature.test | 9 ++ tests/languages/dot/punctuation_feature.test | 12 ++ 17 files changed, 412 insertions(+), 3 deletions(-) create mode 100644 components/prism-dot.js create mode 100644 components/prism-dot.min.js create mode 100644 examples/prism-dot.html create mode 100644 tests/languages/dot!+markup/attribute_feature.test create mode 100644 tests/languages/dot/attribute_feature.test create mode 100644 tests/languages/dot/comment_feature.test create mode 100644 tests/languages/dot/graph-name_feature.test create mode 100644 tests/languages/dot/keyword_feature.test create mode 100644 tests/languages/dot/node_feature.test create mode 100644 tests/languages/dot/operator_feature.test create mode 100644 tests/languages/dot/punctuation_feature.test diff --git a/components.js b/components.js index 61a4304917..35889c650b 100644 --- a/components.js +++ b/components.js @@ -1,2 +1,2 @@ -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml","ssml","atom","rss"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","ssml":"SSML","atom":"Atom","rss":"RSS"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","optional":"regex","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"ABNF","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"agda":{"title":"Agda","owner":"xy-ren"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apex":{"title":"Apex","require":["clike","sql"],"owner":"RunDevelopment"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"dkern"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"birb":{"title":"Birb","require":"clike","owner":"Calamity210"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"BNF","alias":"rbnf","aliasTitles":{"rbnf":"RBNF"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"bsl":{"title":"BSL (1C:Enterprise)","alias":"oscript","aliasTitles":{"oscript":"OneScript"},"owner":"Diversus23"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"clojure":{"title":"Clojure","owner":"troglotit"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"cypher":{"title":"Cypher","owner":"RunDevelopment"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dataweave":{"title":"DataWeave","owner":"machaval"},"dax":{"title":"DAX","owner":"peterbud"},"dhall":{"title":"Dhall","owner":"RunDevelopment"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"ebnf":{"title":"EBNF","owner":"RunDevelopment"},"editorconfig":{"title":"EditorConfig","owner":"osipxd"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"c","owner":"Golmote"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","optional":["markdown"],"owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"hlsl":{"title":"HLSL","require":"c","owner":"RunDevelopment"},"http":{"title":"HTTP","optional":["css","javascript","json","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"ignore":{"title":".ignore","owner":"osipxd","alias":["gitignore","hgignore","npmignore"],"aliasTitles":{"gitignore":".gitignore","hgignore":".hgignore","npmignore":".npmignore"}},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike","typescript"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","alias":"webmanifest","aliasTitles":{"webmanifest":"Web App Manifest"},"owner":"CupOfTea696"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"jsstacktrace":{"title":"JS stack trace","owner":"sbrl"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","alias":["kt","kts"],"aliasTitles":{"kts":"Kotlin Script"},"require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","optional":"yaml","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"mongodb":{"title":"MongoDB","owner":"airs0urce","require":"javascript"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"naniscript":{"title":"Naninovel Script","owner":"Elringus","alias":"nani"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":"markup-templating","owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"promql":{"title":"PromQL","owner":"arendjr"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"purebasic":{"title":"PureBasic","require":"clike","alias":"pbfasm","owner":"HeX0R101"},"purescript":{"title":"PureScript","require":"haskell","alias":"purs","owner":"sriharshachilakapati"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"racket":{"title":"Racket","require":"scheme","alias":"rkt","owner":"RunDevelopment"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","owner":"RunDevelopment"},"renpy":{"title":"Ren'py","alias":"rpy","owner":"HyuchiaDiego"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","alias":["sh-session","shellsession"],"owner":"RunDevelopment"},"smali":{"title":"Smali","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sml":{"title":"SML","alias":"smlnj","aliasTitles":{"smlnj":"SML/NJ"},"owner":"RunDevelopment"},"solidity":{"title":"Solidity (Ethereum)","alias":"sol","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"stan":{"title":"Stan","owner":"RunDevelopment"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","vbnet"],"owner":"RunDevelopment"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"typoscript":{"title":"TypoScript","alias":"tsconfig","aliasTitles":{"tsconfig":"TSConfig"},"owner":"dkern"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"v":{"title":"V","require":"clike","owner":"taggon"},"vala":{"title":"Vala","require":"clike","optional":"regex","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":["vb","vba"],"aliasTitles":{"vba":"VBA"},"owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xml-doc":{"title":"XML doc (.net)","require":"markup","modify":["csharp","fsharp","vbnet"],"owner":"RunDevelopment"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"yang":{"title":"YANG","owner":"RunDevelopment"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml","ssml","atom","rss"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","ssml":"SSML","atom":"Atom","rss":"RSS"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","optional":"regex","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"ABNF","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"agda":{"title":"Agda","owner":"xy-ren"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apex":{"title":"Apex","require":["clike","sql"],"owner":"RunDevelopment"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"dkern"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"birb":{"title":"Birb","require":"clike","owner":"Calamity210"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"BNF","alias":"rbnf","aliasTitles":{"rbnf":"RBNF"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"bsl":{"title":"BSL (1C:Enterprise)","alias":"oscript","aliasTitles":{"oscript":"OneScript"},"owner":"Diversus23"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"clojure":{"title":"Clojure","owner":"troglotit"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"cypher":{"title":"Cypher","owner":"RunDevelopment"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dataweave":{"title":"DataWeave","owner":"machaval"},"dax":{"title":"DAX","owner":"peterbud"},"dhall":{"title":"Dhall","owner":"RunDevelopment"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"dot":{"title":"DOT (Graphviz)","alias":"gv","optional":"markup","owner":"RunDevelopment"},"ebnf":{"title":"EBNF","owner":"RunDevelopment"},"editorconfig":{"title":"EditorConfig","owner":"osipxd"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"c","owner":"Golmote"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","optional":["markdown"],"owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"hlsl":{"title":"HLSL","require":"c","owner":"RunDevelopment"},"http":{"title":"HTTP","optional":["css","javascript","json","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"ignore":{"title":".ignore","owner":"osipxd","alias":["gitignore","hgignore","npmignore"],"aliasTitles":{"gitignore":".gitignore","hgignore":".hgignore","npmignore":".npmignore"}},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike","typescript"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","alias":"webmanifest","aliasTitles":{"webmanifest":"Web App Manifest"},"owner":"CupOfTea696"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"jsstacktrace":{"title":"JS stack trace","owner":"sbrl"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","alias":["kt","kts"],"aliasTitles":{"kts":"Kotlin Script"},"require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","optional":"yaml","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"mongodb":{"title":"MongoDB","owner":"airs0urce","require":"javascript"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"naniscript":{"title":"Naninovel Script","owner":"Elringus","alias":"nani"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":"markup-templating","owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"promql":{"title":"PromQL","owner":"arendjr"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"purebasic":{"title":"PureBasic","require":"clike","alias":"pbfasm","owner":"HeX0R101"},"purescript":{"title":"PureScript","require":"haskell","alias":"purs","owner":"sriharshachilakapati"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"racket":{"title":"Racket","require":"scheme","alias":"rkt","owner":"RunDevelopment"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","owner":"RunDevelopment"},"renpy":{"title":"Ren'py","alias":"rpy","owner":"HyuchiaDiego"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","alias":["sh-session","shellsession"],"owner":"RunDevelopment"},"smali":{"title":"Smali","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sml":{"title":"SML","alias":"smlnj","aliasTitles":{"smlnj":"SML/NJ"},"owner":"RunDevelopment"},"solidity":{"title":"Solidity (Ethereum)","alias":"sol","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"stan":{"title":"Stan","owner":"RunDevelopment"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","vbnet"],"owner":"RunDevelopment"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"typoscript":{"title":"TypoScript","alias":"tsconfig","aliasTitles":{"tsconfig":"TSConfig"},"owner":"dkern"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"v":{"title":"V","require":"clike","owner":"taggon"},"vala":{"title":"Vala","require":"clike","optional":"regex","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":["vb","vba"],"aliasTitles":{"vba":"VBA"},"owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xml-doc":{"title":"XML doc (.net)","require":"markup","modify":["csharp","fsharp","vbnet"],"owner":"RunDevelopment"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"yang":{"title":"YANG","owner":"RunDevelopment"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; if (typeof module !== 'undefined' && module.exports) { module.exports = components; } \ No newline at end of file diff --git a/components.json b/components.json index c2fcfd77d5..2895dfd0d0 100644 --- a/components.json +++ b/components.json @@ -322,6 +322,12 @@ "alias": "dockerfile", "owner": "JustinBeckwith" }, + "dot": { + "title": "DOT (Graphviz)", + "alias": "gv", + "optional": "markup", + "owner": "RunDevelopment" + }, "ebnf": { "title": "EBNF", "owner": "RunDevelopment" diff --git a/components/prism-dot.js b/components/prism-dot.js new file mode 100644 index 0000000000..327a4b85cf --- /dev/null +++ b/components/prism-dot.js @@ -0,0 +1,77 @@ +// https://www.graphviz.org/doc/info/lang.html + +(function (Prism) { + + var ID = '(?:' + [ + // an identifier + /[a-zA-Z_\x80-\uFFFF][\w\x80-\uFFFF]*/.source, + // a number + /-?(?:\.\d+|\d+(?:\.\d*)?)/.source, + // a double-quoted string + /"[^"\\]*(?:\\[\s\S][^"\\]*)*"/.source, + // HTML-like string + /<(?:[^<>]|(?!)*>/.source + ].join('|') + ')'; + + var IDInside = { + 'markup': { + pattern: /(^<)[\s\S]+(?=>$)/, + lookbehind: true, + alias: ['language-markup', 'language-html', 'language-xml'], + inside: Prism.languages.markup + } + }; + + /** + * @param {string} source + * @param {string} flags + * @returns {RegExp} + */ + function withID(source, flags) { + return RegExp(source.replace(//g, function () { return ID; }), flags); + } + + Prism.languages.dot = { + 'comment': { + pattern: /\/\/.*|\/\*[\s\S]*?\*\/|^#.*/m, + greedy: true + }, + 'graph-name': { + pattern: withID(/(\b(?:digraph|graph|subgraph)[ \t\r\n]+)/.source, 'i'), + lookbehind: true, + greedy: true, + alias: 'class-name', + inside: IDInside + }, + 'attr-value': { + pattern: withID(/(=[ \t\r\n]*)/.source), + lookbehind: true, + greedy: true, + inside: IDInside + }, + 'attr-name': { + pattern: withID(/([\[;, \t\r\n])(?=[ \t\r\n]*=)/.source), + lookbehind: true, + greedy: true, + inside: IDInside + }, + 'keyword': /\b(?:digraph|edge|graph|node|strict|subgraph)\b/i, + 'compass-point': { + pattern: /(:[ \t\r\n]*)(?:[ns][ew]?|[ewc_])(?![\w\x80-\uFFFF])/, + lookbehind: true, + alias: 'builtin' + }, + 'node': { + pattern: withID(/(^|[^-.\w\x80-\uFFFF\\])/.source), + lookbehind: true, + greedy: true, + inside: IDInside + }, + 'operator': /[=:]|-[->]/, + 'punctuation': /[\[\]{};,]/ + }; + + Prism.languages.gv = Prism.languages.dot; + +}(Prism)); + diff --git a/components/prism-dot.min.js b/components/prism-dot.min.js new file mode 100644 index 0000000000..42bb33fb4b --- /dev/null +++ b/components/prism-dot.min.js @@ -0,0 +1 @@ +!function(e){var n="(?:"+["[a-zA-Z_\\x80-\\uFFFF][\\w\\x80-\\uFFFF]*","-?(?:\\.\\d+|\\d+(?:\\.\\d*)?)",'"[^"\\\\]*(?:\\\\[^][^"\\\\]*)*"',"<(?:[^<>]|(?!\x3c!--)<(?:[^<>\"']|\"[^\"]*\"|'[^']*')+>|\x3c!--(?:[^-]|-(?!->))*--\x3e)*>"].join("|")+")",a={markup:{pattern:/(^<)[\s\S]+(?=>$)/,lookbehind:!0,alias:["language-markup","language-html","language-xml"],inside:e.languages.markup}};function r(e,a){return RegExp(e.replace(//g,function(){return n}),a)}e.languages.dot={comment:{pattern:/\/\/.*|\/\*[\s\S]*?\*\/|^#.*/m,greedy:!0},"graph-name":{pattern:r("(\\b(?:digraph|graph|subgraph)[ \t\r\n]+)","i"),lookbehind:!0,greedy:!0,alias:"class-name",inside:a},"attr-value":{pattern:r("(=[ \t\r\n]*)"),lookbehind:!0,greedy:!0,inside:a},"attr-name":{pattern:r("([\\[;, \t\r\n])(?=[ \t\r\n]*=)"),lookbehind:!0,greedy:!0,inside:a},keyword:/\b(?:digraph|edge|graph|node|strict|subgraph)\b/i,"compass-point":{pattern:/(:[ \t\r\n]*)(?:[ns][ew]?|[ewc_])(?![\w\x80-\uFFFF])/,lookbehind:!0,alias:"builtin"},node:{pattern:r("(^|[^-.\\w\\x80-\\uFFFF\\\\])"),lookbehind:!0,greedy:!0,inside:a},operator:/[=:]|-[->]/,punctuation:/[\[\]{};,]/},e.languages.gv=e.languages.dot}(Prism); \ No newline at end of file diff --git a/examples/prism-dot.html b/examples/prism-dot.html new file mode 100644 index 0000000000..21af68c8f3 --- /dev/null +++ b/examples/prism-dot.html @@ -0,0 +1,31 @@ +

        Full example

        +
        // source: http://www.ryandesign.com/canviz/graphs/dot/directed/ctext.gv.txt
        +# Generated Tue Aug 21 10:21:21 GMT 2007 by dot - Graphviz version 2.15.20070819.0440 (Tue Aug 21 09:56:32 GMT 2007)
        +#
        +#
        +# real	0m0.105s
        +# user	0m0.076s
        +# sys	0m0.022s
        +
        +digraph G {
        +	node [label="\N"];
        +	graph [bb="0,0,352,238",
        +		_draw_="c 5 -white C 5 -white P 4 0 0 0 238 352 238 352 0 ",
        +		xdotversion="1.2"];
        +	xyz [label="hello\nworld", color=slateblue, fontsize=24, fontname="Palatino-Italic", style=filled, fontcolor=hotpink, pos="67,191", width="1.64", height="1.29", _draw_="S 6 -filled c 9 -slateblue C 9 -slateblue E 67 191 59 47 ", _ldraw_="F 24.000000 15 -Palatino-Italic c 7 -hotpink T 67 196 0 65 5 -hello F 24.000000 15 -Palatino-Italic c 7 -hotpink T 67 167 0 75 5\
        + -world "];
        +	red [color=red, style=filled, pos="171,191", width="0.75", height="0.50", _draw_="S 6 -filled c 3 -red C 3 -red E 171 191 27 18 ", _ldraw_="F 14.000000 11 -Times-Roman c 5 -black T 171 186 0 24 3 -red "];
        +	green [color=green, style=filled, pos="128,90", width="0.92", height="0.50", _draw_="S 6 -filled c 5 -green C 5 -green E 128 90 33 18 ", _ldraw_="F 14.000000 11 -Times-Roman c 5 -black T 128 85 0 41 5 -green "];
        +	blue [color=blue, style=filled, fontcolor=black, pos="214,90", width="0.78", height="0.50", _draw_="S 6 -filled c 4 -blue C 4 -blue E 214 90 28 18 ", _ldraw_="F 14.000000 11 -Times-Roman c 5 -black T 214 85 0 31 4 -blue "];
        +	cyan [color=cyan, style=filled, pos="214,18", width="0.83", height="0.50", _draw_="S 6 -filled c 4 -cyan C 4 -cyan E 214 18 30 18 ", _ldraw_="F 14.000000 11 -Times-Roman c 5 -black T 214 13 0 34 4 -cyan "];
        +	magenta [color=magenta, style=filled, pos="307,18", width="1.25", height="0.50", _draw_="S 6 -filled c 7 -magenta C 7 -magenta E 307 18 45 18 ", _ldraw_="F 14.000000 11 -Times-Roman c 5 -black T 307 13 0 64 7 -magenta "];
        +	yellow [color=yellow, style=filled, pos="36,18", width="1.00", height="0.50", _draw_="S 6 -filled c 6 -yellow C 6 -yellow E 36 18 36 18 ", _ldraw_="F 14.000000 11 -Times-Roman c 5 -black T 36 13 0 47 6 -yellow "];
        +	orange [color=orange, style=filled, pos="128,18", width="1.06", height="0.50", _draw_="S 6 -filled c 6 -orange C 6 -orange E 128 18 38 18 ", _ldraw_="F 14.000000 11 -Times-Roman c 5 -black T 128 13 0 51 6 -orange "];
        +	red -> green [pos="e,136,108 164,173 157,158 147,135 140,118", _draw_="c 5 -black B 4 164 173 157 158 147 135 140 118 ", _hdraw_="S 5 -solid S 15 -setlinewidth(1) c 5 -black C 5 -black P 3 143 116 136 108 136 119 "];
        +	red -> blue [pos="e,206,108 178,173 185,158 195,135 202,118", _draw_="c 5 -black B 4 178 173 185 158 195 135 202 118 ", _hdraw_="S 5 -solid S 15 -setlinewidth(1) c 5 -black C 5 -black P 3 206 119 206 108 199 116 "];
        +	blue -> cyan [pos="e,214,36 214,72 214,64 214,55 214,46", _draw_="c 5 -black B 4 214 72 214 64 214 55 214 46 ", _hdraw_="S 5 -solid S 15 -setlinewidth(1) c 5 -black C 5 -black P 3 218 46 214 36 211 46 "];
        +	blue -> magenta [pos="e,286,34 232,76 246,66 263,52 278,40", _draw_="c 5 -black B 4 232 76 246 66 263 52 278 40 ", _hdraw_="S 5 -solid S 15 -setlinewidth(1) c 5 -black C 5 -black P 3 280 43 286 34 276 37 "];
        +	green -> yellow [pos="e,56,33 109,75 96,65 78,51 64,40", _draw_="c 5 -black B 4 109 75 96 65 78 51 64 40 ", _hdraw_="S 5 -solid S 15 -setlinewidth(1) c 5 -black C 5 -black P 3 66 37 56 33 61 42 "];
        +	green -> orange [pos="e,128,36 128,72 128,64 128,55 128,46", _draw_="c 5 -black B 4 128 72 128 64 128 55 128 46 ", _hdraw_="S 5 -solid S 15 -setlinewidth(1) c 5 -black C 5 -black P 3 132 46 128 36 125 46 "];
        +}
        +
        diff --git a/plugins/autoloader/prism-autoloader.js b/plugins/autoloader/prism-autoloader.js index c90ee6b3ba..1c02dd7291 100644 --- a/plugins/autoloader/prism-autoloader.js +++ b/plugins/autoloader/prism-autoloader.js @@ -173,6 +173,7 @@ "jinja2": "django", "dns-zone": "dns-zone-file", "dockerfile": "docker", + "gv": "dot", "eta": "ejs", "xlsx": "excel-formula", "xls": "excel-formula", diff --git a/plugins/autoloader/prism-autoloader.min.js b/plugins/autoloader/prism-autoloader.min.js index 1012adf6c5..630424b9d8 100644 --- a/plugins/autoloader/prism-autoloader.min.js +++ b/plugins/autoloader/prism-autoloader.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof self&&self.Prism&&self.document&&document.createElement){var l={javascript:"clike",actionscript:"javascript",apex:["clike","sql"],arduino:"cpp",aspnet:["markup","csharp"],birb:"clike",bison:"c",c:"clike",csharp:"clike",cpp:"c",coffeescript:"javascript",crystal:"ruby","css-extras":"css",d:"clike",dart:"clike",django:"markup-templating",ejs:["javascript","markup-templating"],etlua:["lua","markup-templating"],erb:["ruby","markup-templating"],fsharp:"clike","firestore-security-rules":"clike",flow:"javascript",ftl:"markup-templating",gml:"clike",glsl:"c",go:"clike",groovy:"clike",haml:"ruby",handlebars:"markup-templating",haxe:"clike",hlsl:"c",java:"clike",javadoc:["markup","java","javadoclike"],jolie:"clike",jsdoc:["javascript","javadoclike","typescript"],"js-extras":"javascript",json5:"json",jsonp:"json","js-templates":"javascript",kotlin:"clike",latte:["clike","markup-templating","php"],less:"css",lilypond:"scheme",markdown:"markup","markup-templating":"markup",mongodb:"javascript",n4js:"javascript",nginx:"clike",objectivec:"c",opencl:"c",parser:"markup",php:"markup-templating",phpdoc:["php","javadoclike"],"php-extras":"php",plsql:"sql",processing:"clike",protobuf:"clike",pug:["markup","javascript"],purebasic:"clike",purescript:"haskell",qml:"javascript",qore:"clike",racket:"scheme",jsx:["markup","javascript"],tsx:["jsx","typescript"],reason:"clike",ruby:"clike",sass:"css",scss:"css",scala:"java","shell-session":"bash",smarty:"markup-templating",solidity:"clike",soy:"markup-templating",sparql:"turtle",sqf:"clike",swift:"clike","t4-cs":["t4-templating","csharp"],"t4-vb":["t4-templating","vbnet"],tap:"yaml",tt2:["clike","markup-templating"],textile:"markup",twig:"markup",typescript:"javascript",v:"clike",vala:"clike",vbnet:"basic",velocity:"markup",wiki:"markup",xeora:"markup","xml-doc":"markup",xquery:"markup"},n={html:"markup",xml:"markup",svg:"markup",mathml:"markup",ssml:"markup",atom:"markup",rss:"markup",js:"javascript",g4:"antlr4",adoc:"asciidoc",shell:"bash",shortcode:"bbcode",rbnf:"bnf",oscript:"bsl",cs:"csharp",dotnet:"csharp",coffee:"coffeescript",conc:"concurnas",jinja2:"django","dns-zone":"dns-zone-file",dockerfile:"docker",eta:"ejs",xlsx:"excel-formula",xls:"excel-formula",gamemakerlanguage:"gml",hs:"haskell",gitignore:"ignore",hgignore:"ignore",npmignore:"ignore",webmanifest:"json",kt:"kotlin",kts:"kotlin",tex:"latex",context:"latex",ly:"lilypond",emacs:"lisp",elisp:"lisp","emacs-lisp":"lisp",md:"markdown",moon:"moonscript",n4jsd:"n4js",nani:"naniscript",objc:"objectivec",objectpascal:"pascal",px:"pcaxis",pcode:"peoplecode",pq:"powerquery",mscript:"powerquery",pbfasm:"purebasic",purs:"purescript",py:"python",rkt:"racket",rpy:"renpy",robot:"robotframework",rb:"ruby","sh-session":"shell-session",shellsession:"shell-session",smlnj:"sml",sol:"solidity",sln:"solution-file",rq:"sparql",t4:"t4-cs",trig:"turtle",ts:"typescript",tsconfig:"typoscript",uscript:"unrealscript",uc:"unrealscript",vb:"visual-basic",vba:"visual-basic",xeoracube:"xeora",yml:"yaml"},p={},e="components/",a=Prism.util.currentScript();if(a){var r=/\bplugins\/autoloader\/prism-autoloader\.(?:min\.)?js(?:\?[^\r\n/]*)?$/i,s=/(^|\/)[\w-]+\.(?:min\.)?js(?:\?[^\r\n/]*)?$/i,t=a.getAttribute("data-autoloader-path");if(null!=t)e=t.trim().replace(/\/?$/,"/");else{var i=a.src;r.test(i)?e=i.replace(r,"components/"):s.test(i)&&(e=i.replace(s,"$1components/"))}}var o=Prism.plugins.autoloader={languages_path:e,use_minified:!0,loadLanguages:m};Prism.hooks.add("complete",function(e){var a=e.element,r=e.language;if(a&&r&&"none"!==r){var s=function(e){var a=(e.getAttribute("data-dependencies")||"").trim();if(!a){var r=e.parentElement;r&&"pre"===r.tagName.toLowerCase()&&(a=(r.getAttribute("data-dependencies")||"").trim())}return a?a.split(/\s*,\s*/g):[]}(a);/^diff-./i.test(r)?(s.push("diff"),s.push(r.substr("diff-".length))):s.push(r),s.every(u)||m(s,function(){Prism.highlightElement(a)})}})}function u(e){if(0<=e.indexOf("!"))return!1;if((e=n[e]||e)in Prism.languages)return!0;var a=p[e];return a&&!a.error&&!1===a.loading}function m(e,a,r){"string"==typeof e&&(e=[e]);var s=e.length,t=0,i=!1;function c(){i||++t===s&&a&&a(e)}0!==s?e.forEach(function(e){!function(a,r,s){var t=0<=a.indexOf("!");function e(){var e=p[a];e||(e=p[a]={callbacks:[]}),e.callbacks.push({success:r,error:s}),!t&&u(a)?k(a,"success"):!t&&e.error?k(a,"error"):!t&&e.loading||(e.loading=!0,e.error=!1,function(e,a,r){var s=document.createElement("script");s.src=e,s.async=!0,s.onload=function(){document.body.removeChild(s),a&&a()},s.onerror=function(){document.body.removeChild(s),r&&r()},document.body.appendChild(s)}(function(e){return o.languages_path+"prism-"+e+(o.use_minified?".min":"")+".js"}(a),function(){e.loading=!1,k(a,"success")},function(){e.loading=!1,e.error=!0,k(a,"error")}))}a=a.replace("!",""),a=n[a]||a;var i=l[a];i&&i.length?m(i,e,s):e()}(e,c,function(){i||(i=!0,r&&r(e))})}):a&&setTimeout(a,0)}function k(e,a){if(p[e]){for(var r=p[e].callbacks,s=0,t=r.length;s + leftmid dleright +>] + +---------------------------------------------------- + +[ + ["punctuation", "["], + ["attr-name", ["label"]], + ["operator", "="], + ["attr-value", [ + "<", + ["markup", [ + ["tag", [ + ["tag", [ + ["punctuation", "<"], + "TABLE" + ]], + ["attr-name", ["BORDER"]], + ["attr-value", [ + ["punctuation", "="], + ["punctuation", "\""], + "0", + ["punctuation", "\""] + ]], + ["attr-name", ["CELLBORDER"]], + ["attr-value", [ + ["punctuation", "="], + ["punctuation", "\""], + "1", + ["punctuation", "\""] + ]], + ["attr-name", ["CELLSPACING"]], + ["attr-value", [ + ["punctuation", "="], + ["punctuation", "\""], + "0", + ["punctuation", "\""] + ]], + ["punctuation", ">"] + ]], + + ["tag", [ + ["tag", [ + ["punctuation", "<"], + "TR" + ]], + ["punctuation", ">"] + ]], + ["tag", [ + ["tag", [ + ["punctuation", "<"], + "TD" + ]], + ["punctuation", ">"] + ]], + "left", + ["tag", [ + ["tag", [ + ["punctuation", ""] + ]], + ["tag", [ + ["tag", [ + ["punctuation", "<"], + "TD" + ]], + ["attr-name", ["PORT"]], + ["attr-value", [ + ["punctuation", "="], + ["punctuation", "\""], + "f1", + ["punctuation", "\""] + ]], + ["punctuation", ">"] + ]], + "mid dle", + ["tag", [ + ["tag", [ + ["punctuation", ""] + ]], + ["tag", [ + ["tag", [ + ["punctuation", "<"], + "TD" + ]], + ["attr-name", ["PORT"]], + ["attr-value", [ + ["punctuation", "="], + ["punctuation", "\""], + "f2", + ["punctuation", "\""] + ]], + ["punctuation", ">"] + ]], + "right", + ["tag", [ + ["tag", [ + ["punctuation", ""] + ]], + ["tag", [ + ["tag", [ + ["punctuation", ""] + ]], + + ["tag", [ + ["tag", [ + ["punctuation", ""] + ]] + ]], + ">" + ]], + ["punctuation", "]"] +] \ No newline at end of file diff --git a/tests/languages/dot/attribute_feature.test b/tests/languages/dot/attribute_feature.test new file mode 100644 index 0000000000..25db2c6bd1 --- /dev/null +++ b/tests/languages/dot/attribute_feature.test @@ -0,0 +1,53 @@ +[foo=bar] + +[ + foo = 123; + "graph" = " +some +value", 123 = bar baz = 123 +] + +[label=< + + +
        leftmid dleright
        >] + +---------------------------------------------------- + +[ + ["punctuation", "["], + ["attr-name", ["foo"]], + ["operator", "="], + ["attr-value", ["bar"]], + ["punctuation", "]"], + + ["punctuation", "["], + + ["attr-name", ["foo"]], + ["operator", "="], + ["attr-value", ["123"]], + ["punctuation", ";"], + + ["attr-name", ["\"graph\""]], + ["operator", "="], + ["attr-value", ["\"\r\nsome\r\nvalue\""]], + ["punctuation", ","], + ["attr-name", ["123"]], + ["operator", "="], + ["attr-value", ["bar"]], + ["attr-name", ["baz"]], + ["operator", "="], + ["attr-value", ["123"]], + + ["punctuation", "]"], + + ["punctuation", "["], + ["attr-name", ["label"]], + ["operator", "="], + ["attr-value", [ + "<", + ["markup", "\r\n\r\n \r\n
        leftmid dleright
        "], + ">" + ]], + ["punctuation", "]"] +] \ No newline at end of file diff --git a/tests/languages/dot/comment_feature.test b/tests/languages/dot/comment_feature.test new file mode 100644 index 0000000000..b8102e52be --- /dev/null +++ b/tests/languages/dot/comment_feature.test @@ -0,0 +1,15 @@ +// comment +/* +comment +*/ + +# not really a comment but ignored + +---------------------------------------------------- + +[ + ["comment", "// comment"], + ["comment", "/*\r\ncomment\r\n*/"], + + ["comment", "# not really a comment but ignored"] +] \ No newline at end of file diff --git a/tests/languages/dot/graph-name_feature.test b/tests/languages/dot/graph-name_feature.test new file mode 100644 index 0000000000..de41c7bf42 --- /dev/null +++ b/tests/languages/dot/graph-name_feature.test @@ -0,0 +1,22 @@ +graph ethane {} +digraph foo {} +subgraph bar {} + +---------------------------------------------------- + +[ + ["keyword", "graph"], + ["graph-name", ["ethane"]], + ["punctuation", "{"], + ["punctuation", "}"], + + ["keyword", "digraph"], + ["graph-name", ["foo"]], + ["punctuation", "{"], + ["punctuation", "}"], + + ["keyword", "subgraph"], + ["graph-name", ["bar"]], + ["punctuation", "{"], + ["punctuation", "}"] +] \ No newline at end of file diff --git a/tests/languages/dot/keyword_feature.test b/tests/languages/dot/keyword_feature.test new file mode 100644 index 0000000000..d1a4129528 --- /dev/null +++ b/tests/languages/dot/keyword_feature.test @@ -0,0 +1,17 @@ +digraph; +edge; +graph; +node; +strict; +subgraph; + +---------------------------------------------------- + +[ + ["keyword", "digraph"], ["punctuation", ";"], + ["keyword", "edge"], ["punctuation", ";"], + ["keyword", "graph"], ["punctuation", ";"], + ["keyword", "node"], ["punctuation", ";"], + ["keyword", "strict"], ["punctuation", ";"], + ["keyword", "subgraph"], ["punctuation", ";"] +] diff --git a/tests/languages/dot/node_feature.test b/tests/languages/dot/node_feature.test new file mode 100644 index 0000000000..5ae649bdd4 --- /dev/null +++ b/tests/languages/dot/node_feature.test @@ -0,0 +1,34 @@ +struct1:f1 -> struct2:f0; +struct1:f2 -> struct3:here; + +A:ne -> B:sw + +---------------------------------------------------- + +[ + ["node", ["struct1"]], + ["operator", ":"], + ["node", ["f1"]], + ["operator", "->"], + ["node", ["struct2"]], + ["operator", ":"], + ["node", ["f0"]], + ["punctuation", ";"], + + ["node", ["struct1"]], + ["operator", ":"], + ["node", ["f2"]], + ["operator", "->"], + ["node", ["struct3"]], + ["operator", ":"], + ["node", ["here"]], + ["punctuation", ";"], + + ["node", ["A"]], + ["operator", ":"], + ["compass-point", "ne"], + ["operator", "->"], + ["node", ["B"]], + ["operator", ":"], + ["compass-point", "sw"] +] \ No newline at end of file diff --git a/tests/languages/dot/operator_feature.test b/tests/languages/dot/operator_feature.test new file mode 100644 index 0000000000..8ec3ced9d5 --- /dev/null +++ b/tests/languages/dot/operator_feature.test @@ -0,0 +1,9 @@ +-- -> += : + +---------------------------------------------------- + +[ + ["operator", "--"], ["operator", "->"], + ["operator", "="], ["operator", ":"] +] diff --git a/tests/languages/dot/punctuation_feature.test b/tests/languages/dot/punctuation_feature.test new file mode 100644 index 0000000000..c417a42458 --- /dev/null +++ b/tests/languages/dot/punctuation_feature.test @@ -0,0 +1,12 @@ +[ ] { } ; , + +---------------------------------------------------- + +[ + ["punctuation", "["], + ["punctuation", "]"], + ["punctuation", "{"], + ["punctuation", "}"], + ["punctuation", ";"], + ["punctuation", ","] +] \ No newline at end of file From a5d7178cadb6ae2c34f1cbfc031dd71806dfdcaf Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Sun, 17 Jan 2021 14:34:24 +0100 Subject: [PATCH 0712/1100] F#: Fixed comment false positive (#2703) F# has supports `(*)` to convert an operator into a function. This syntax collides with F# comments and produced false positives for comments. The comment pattern has been adjusted to not match `(*)`. --- components/prism-fsharp.js | 2 +- components/prism-fsharp.min.js | 2 +- tests/languages/fsharp/comment_feature.test | 16 +- tests/languages/fsharp/issue2696.test | 285 ++++++++++++++++++++ 4 files changed, 301 insertions(+), 4 deletions(-) create mode 100644 tests/languages/fsharp/issue2696.test diff --git a/components/prism-fsharp.js b/components/prism-fsharp.js index 442e689d02..4b2ac05d49 100644 --- a/components/prism-fsharp.js +++ b/components/prism-fsharp.js @@ -1,7 +1,7 @@ Prism.languages.fsharp = Prism.languages.extend('clike', { 'comment': [ { - pattern: /(^|[^\\])\(\*[\s\S]*?\*\)/, + pattern: /(^|[^\\])\(\*(?!\))[\s\S]*?\*\)/, lookbehind: true }, { diff --git a/components/prism-fsharp.min.js b/components/prism-fsharp.min.js index c44f1dd501..3153afbb87 100644 --- a/components/prism-fsharp.min.js +++ b/components/prism-fsharp.min.js @@ -1 +1 @@ -Prism.languages.fsharp=Prism.languages.extend("clike",{comment:[{pattern:/(^|[^\\])\(\*[\s\S]*?\*\)/,lookbehind:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0}],string:{pattern:/(?:"""[\s\S]*?"""|@"(?:""|[^"])*"|"(?:\\[\s\S]|[^\\"])*")B?|'(?:[^\\']|\\(?:.|\d{3}|x[a-fA-F\d]{2}|u[a-fA-F\d]{4}|U[a-fA-F\d]{8}))'B?/,greedy:!0},"class-name":{pattern:/(\b(?:exception|inherit|interface|new|of|type)\s+|\w\s*:\s*|\s:\??>\s*)[.\w]+\b(?:\s*(?:->|\*)\s*[.\w]+\b)*(?!\s*[:.])/,lookbehind:!0,inside:{operator:/->|\*/,punctuation:/\./}},keyword:/\b(?:let|return|use|yield)(?:!\B|\b)|\b(?:abstract|and|as|assert|base|begin|class|default|delegate|do|done|downcast|downto|elif|else|end|exception|extern|false|finally|for|fun|function|global|if|in|inherit|inline|interface|internal|lazy|match|member|module|mutable|namespace|new|not|null|of|open|or|override|private|public|rec|select|static|struct|then|to|true|try|type|upcast|val|void|when|while|with|asr|land|lor|lsl|lsr|lxor|mod|sig|atomic|break|checked|component|const|constraint|constructor|continue|eager|event|external|fixed|functor|include|method|mixin|object|parallel|process|protected|pure|sealed|tailcall|trait|virtual|volatile)\b/,number:[/\b0x[\da-fA-F]+(?:un|lf|LF)?\b/,/\b0b[01]+(?:y|uy)?\b/,/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[fm]|e[+-]?\d+)?\b/i,/\b\d+(?:[IlLsy]|u[lsy]?|UL)?\b/],operator:/([<>~&^])\1\1|([*.:<>&])\2|<-|->|[!=:]=|?|\??(?:<=|>=|<>|[-+*/%=<>])\??|[!?^&]|~[+~-]|:>|:\?>?/}),Prism.languages.insertBefore("fsharp","keyword",{preprocessor:{pattern:/^[^\r\n\S]*#.*/m,alias:"property",inside:{directive:{pattern:/(\s*#)\b(?:else|endif|if|light|line|nowarn)\b/,lookbehind:!0,alias:"keyword"}}}}),Prism.languages.insertBefore("fsharp","punctuation",{"computation-expression":{pattern:/[_a-z]\w*(?=\s*\{)/i,alias:"keyword"}}),Prism.languages.insertBefore("fsharp","string",{annotation:{pattern:/\[<.+?>\]/,inside:{punctuation:/^\[<|>\]$/,"class-name":{pattern:/^\w+$|(^|;\s*)[A-Z]\w*(?=\()/,lookbehind:!0},"annotation-content":{pattern:/[\s\S]+/,inside:Prism.languages.fsharp}}}}); \ No newline at end of file +Prism.languages.fsharp=Prism.languages.extend("clike",{comment:[{pattern:/(^|[^\\])\(\*(?!\))[\s\S]*?\*\)/,lookbehind:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0}],string:{pattern:/(?:"""[\s\S]*?"""|@"(?:""|[^"])*"|"(?:\\[\s\S]|[^\\"])*")B?|'(?:[^\\']|\\(?:.|\d{3}|x[a-fA-F\d]{2}|u[a-fA-F\d]{4}|U[a-fA-F\d]{8}))'B?/,greedy:!0},"class-name":{pattern:/(\b(?:exception|inherit|interface|new|of|type)\s+|\w\s*:\s*|\s:\??>\s*)[.\w]+\b(?:\s*(?:->|\*)\s*[.\w]+\b)*(?!\s*[:.])/,lookbehind:!0,inside:{operator:/->|\*/,punctuation:/\./}},keyword:/\b(?:let|return|use|yield)(?:!\B|\b)|\b(?:abstract|and|as|assert|base|begin|class|default|delegate|do|done|downcast|downto|elif|else|end|exception|extern|false|finally|for|fun|function|global|if|in|inherit|inline|interface|internal|lazy|match|member|module|mutable|namespace|new|not|null|of|open|or|override|private|public|rec|select|static|struct|then|to|true|try|type|upcast|val|void|when|while|with|asr|land|lor|lsl|lsr|lxor|mod|sig|atomic|break|checked|component|const|constraint|constructor|continue|eager|event|external|fixed|functor|include|method|mixin|object|parallel|process|protected|pure|sealed|tailcall|trait|virtual|volatile)\b/,number:[/\b0x[\da-fA-F]+(?:un|lf|LF)?\b/,/\b0b[01]+(?:y|uy)?\b/,/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[fm]|e[+-]?\d+)?\b/i,/\b\d+(?:[IlLsy]|u[lsy]?|UL)?\b/],operator:/([<>~&^])\1\1|([*.:<>&])\2|<-|->|[!=:]=|?|\??(?:<=|>=|<>|[-+*/%=<>])\??|[!?^&]|~[+~-]|:>|:\?>?/}),Prism.languages.insertBefore("fsharp","keyword",{preprocessor:{pattern:/^[^\r\n\S]*#.*/m,alias:"property",inside:{directive:{pattern:/(\s*#)\b(?:else|endif|if|light|line|nowarn)\b/,lookbehind:!0,alias:"keyword"}}}}),Prism.languages.insertBefore("fsharp","punctuation",{"computation-expression":{pattern:/[_a-z]\w*(?=\s*\{)/i,alias:"keyword"}}),Prism.languages.insertBefore("fsharp","string",{annotation:{pattern:/\[<.+?>\]/,inside:{punctuation:/^\[<|>\]$/,"class-name":{pattern:/^\w+$|(^|;\s*)[A-Z]\w*(?=\()/,lookbehind:!0},"annotation-content":{pattern:/[\s\S]+/,inside:Prism.languages.fsharp}}}}); \ No newline at end of file diff --git a/tests/languages/fsharp/comment_feature.test b/tests/languages/fsharp/comment_feature.test index ff9170b6b8..44849441ab 100644 --- a/tests/languages/fsharp/comment_feature.test +++ b/tests/languages/fsharp/comment_feature.test @@ -3,14 +3,26 @@ (* foo bar *) +// the next one is not a comment +(*) (*) + ---------------------------------------------------- [ ["comment", "// foobar"], ["comment", "(**)"], - ["comment", "(* foo\r\nbar *)"] + ["comment", "(* foo\r\nbar *)"], + + ["comment", "// the next one is not a comment"], + + ["punctuation", "("], + ["operator", "*"], + ["punctuation", ")"], + ["punctuation", "("], + ["operator", "*"], + ["punctuation", ")"] ] ---------------------------------------------------- -Checks for single-line and multi-line comments. \ No newline at end of file +Checks for single-line and multi-line comments. diff --git a/tests/languages/fsharp/issue2696.test b/tests/languages/fsharp/issue2696.test new file mode 100644 index 0000000000..1e7d26f84b --- /dev/null +++ b/tests/languages/fsharp/issue2696.test @@ -0,0 +1,285 @@ +let score category (dice:Die list) = + let iDice = dice |> List.map int |> List.sortDescending + let diced = iDice |> List.countBy id |> List.sortByDescending snd + let countScore cat = dice |> List.filter (fun d -> d=cat) |> List.length |> (*) (int cat) + let isStraight = iDice.[0] - iDice.[4] = 4 + + match category , List.map snd diced with + | Yacht , [5] -> 50 + | Ones , _ -> countScore Die.One + | Twos , _ -> countScore Die.Two + | Threes , _ -> countScore Die.Three + | Fours , _ -> countScore Die.Four + | Fives , _ -> countScore Die.Five + | Sixes , _ -> countScore Die.Six + | FourOfAKind , [4;1] + | FourOfAKind , [5] -> iDice |> List.head |> (*) 4 + | LittleStraight, [1;1;1;1;1] when isStraight && iDice.[0] = 5 -> 30 + | BigStraight , [1;1;1;1;1] when isStraight && iDice.[0] = 6 -> 30 + | FullHouse , [3;2] + | Choice , _ -> iDice |> List.sum + | _ , _ -> 0 + +---------------------------------------------------- + +[ + ["keyword", "let"], + " score category ", + ["punctuation", "("], + "dice", + ["punctuation", ":"], + ["class-name", ["Die"]], + " list", + ["punctuation", ")"], + ["operator", "="], + + ["keyword", "let"], + " iDice ", + ["operator", "="], + " dice ", + ["operator", "|>"], + " List", + ["punctuation", "."], + "map int ", + ["operator", "|>"], + " List", + ["punctuation", "."], + "sortDescending\r\n ", + + ["keyword", "let"], + " diced ", + ["operator", "="], + " iDice ", + ["operator", "|>"], + " List", + ["punctuation", "."], + "countBy id ", + ["operator", "|>"], + " List", + ["punctuation", "."], + "sortByDescending snd\r\n ", + + ["keyword", "let"], + " countScore cat ", + ["operator", "="], + " dice ", + ["operator", "|>"], + " List", + ["punctuation", "."], + "filter ", + ["punctuation", "("], + ["keyword", "fun"], + " d ", + ["operator", "->"], + " d", + ["operator", "="], + "cat", + ["punctuation", ")"], + ["operator", "|>"], + " List", + ["punctuation", "."], + "length ", + ["operator", "|>"], + ["punctuation", "("], + ["operator", "*"], + ["punctuation", ")"], + ["punctuation", "("], + "int cat", + ["punctuation", ")"], + + ["keyword", "let"], + " isStraight ", + ["operator", "="], + " iDice", + ["punctuation", "."], + ["punctuation", "["], + ["number", "0"], + ["punctuation", "]"], + ["operator", "-"], + " iDice", + ["punctuation", "."], + ["punctuation", "["], + ["number", "4"], + ["punctuation", "]"], + ["operator", "="], + ["number", "4"], + + ["keyword", "match"], + " category ", + ["punctuation", ","], + " List", + ["punctuation", "."], + "map snd diced ", + ["keyword", "with"], + + ["operator", "|"], + " Yacht ", + ["punctuation", ","], + ["punctuation", "["], + ["number", "5"], + ["punctuation", "]"], + ["operator", "->"], + ["number", "50"], + + ["operator", "|"], + " Ones ", + ["punctuation", ","], + " _ ", + ["operator", "->"], + " countScore Die", + ["punctuation", "."], + "One\r\n ", + + ["operator", "|"], + " Twos ", + ["punctuation", ","], + " _ ", + ["operator", "->"], + " countScore Die", + ["punctuation", "."], + "Two\r\n ", + + ["operator", "|"], + " Threes ", + ["punctuation", ","], + " _ ", + ["operator", "->"], + " countScore Die", + ["punctuation", "."], + "Three\r\n ", + + ["operator", "|"], + " Fours ", + ["punctuation", ","], + " _ ", + ["operator", "->"], + " countScore Die", + ["punctuation", "."], + "Four\r\n ", + + ["operator", "|"], + " Fives ", + ["punctuation", ","], + " _ ", + ["operator", "->"], + " countScore Die", + ["punctuation", "."], + "Five\r\n ", + + ["operator", "|"], + " Sixes ", + ["punctuation", ","], + " _ ", + ["operator", "->"], + " countScore Die", + ["punctuation", "."], + "Six\r\n ", + + ["operator", "|"], + " FourOfAKind ", + ["punctuation", ","], + ["punctuation", "["], + ["number", "4"], + ["punctuation", ";"], + ["number", "1"], + ["punctuation", "]"], + + ["operator", "|"], + " FourOfAKind ", + ["punctuation", ","], + ["punctuation", "["], + ["number", "5"], + ["punctuation", "]"], + ["operator", "->"], + " iDice ", + ["operator", "|>"], + " List", + ["punctuation", "."], + "head ", + ["operator", "|>"], + ["punctuation", "("], + ["operator", "*"], + ["punctuation", ")"], + ["number", "4"], + + ["operator", "|"], + " LittleStraight", + ["punctuation", ","], + ["punctuation", "["], + ["number", "1"], + ["punctuation", ";"], + ["number", "1"], + ["punctuation", ";"], + ["number", "1"], + ["punctuation", ";"], + ["number", "1"], + ["punctuation", ";"], + ["number", "1"], + ["punctuation", "]"], + ["keyword", "when"], + " isStraight ", + ["operator", "&&"], + " iDice", + ["punctuation", "."], + ["punctuation", "["], + ["number", "0"], + ["punctuation", "]"], + ["operator", "="], + ["number", "5"], + ["operator", "->"], + ["number", "30"], + + ["operator", "|"], + " BigStraight ", + ["punctuation", ","], + ["punctuation", "["], + ["number", "1"], + ["punctuation", ";"], + ["number", "1"], + ["punctuation", ";"], + ["number", "1"], + ["punctuation", ";"], + ["number", "1"], + ["punctuation", ";"], + ["number", "1"], + ["punctuation", "]"], + ["keyword", "when"], + " isStraight ", + ["operator", "&&"], + " iDice", + ["punctuation", "."], + ["punctuation", "["], + ["number", "0"], + ["punctuation", "]"], + ["operator", "="], + ["number", "6"], + ["operator", "->"], + ["number", "30"], + + ["operator", "|"], + " FullHouse ", + ["punctuation", ","], + ["punctuation", "["], + ["number", "3"], + ["punctuation", ";"], + ["number", "2"], + ["punctuation", "]"], + + ["operator", "|"], + " Choice ", + ["punctuation", ","], + " _ ", + ["operator", "->"], + " iDice ", + ["operator", "|>"], + " List", + ["punctuation", "."], + "sum\r\n ", + + ["operator", "|"], + " _ ", + ["punctuation", ","], + " _ ", + ["operator", "->"], + ["number", "0"] +] \ No newline at end of file From 7a790bf9dcc70325e7d4c8bbfb430b649d401281 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Mon, 18 Jan 2021 14:28:24 +0100 Subject: [PATCH 0713/1100] Copy to clipboard: Fixed highlighting (#2725) The main code block on the page was declared with the wrong language. --- plugins/copy-to-clipboard/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/copy-to-clipboard/index.html b/plugins/copy-to-clipboard/index.html index 01c4e3d8a8..79ebf73067 100644 --- a/plugins/copy-to-clipboard/index.html +++ b/plugins/copy-to-clipboard/index.html @@ -14,7 +14,7 @@ - +
        From 6183fd9b13cc1737422138697211a9c26f1ea005 Mon Sep 17 00:00:00 2001 From: Jxck Date: Tue, 19 Jan 2021 00:43:03 +0900 Subject: [PATCH 0714/1100] HTTP: More granular tokenization (#2722) --- components/prism-http.js | 45 ++++-- components/prism-http.min.js | 2 +- .../languages/http/request-line_feature.test | 130 +++++++++++++----- .../http/response-status_feature.test | 22 +-- 4 files changed, 148 insertions(+), 51 deletions(-) diff --git a/components/prism-http.js b/components/prism-http.js index 4f37679e35..4b8bb84db1 100644 --- a/components/prism-http.js +++ b/components/prism-http.js @@ -1,21 +1,46 @@ (function (Prism) { Prism.languages.http = { 'request-line': { - pattern: /^(?:POST|GET|PUT|DELETE|OPTIONS|PATCH|TRACE|CONNECT)\s(?:https?:\/\/|\/)\S*\sHTTP\/[0-9.]+/m, + pattern: /^(?:GET|HEAD|POST|PUT|DELETE|CONNECT|OPTIONS|TRACE|PATCH|PRI|SEARCH)\s(?:https?:\/\/|\/)\S*\sHTTP\/[0-9.]+/m, inside: { - // HTTP Verb - 'property': /^(?:POST|GET|PUT|DELETE|OPTIONS|PATCH|TRACE|CONNECT)\b/, - // Path or query argument - 'attr-name': /:\w+/ + // HTTP Method + 'method': { + pattern: /^[A-Z]+\b/, + alias: 'property' + }, + // Request Target e.g. http://example.com, /path/to/file + 'request-target': { + pattern: /^(\s)(?:https?:\/\/|\/)\S*(?=\s)/, + lookbehind: true, + alias: 'url' + }, + // HTTP Version + 'http-version': { + pattern: /^(\s)HTTP\/[0-9.]+/, + lookbehind: true, + alias: 'property' + }, } }, 'response-status': { - pattern: /^HTTP\/1.[01] \d.*/m, + pattern: /^HTTP\/[0-9.]+ \d+ .+/m, inside: { - // Status, e.g. 200 OK - 'property': { - pattern: /(^HTTP\/1.[01] )\d.*/i, - lookbehind: true + // HTTP Version + 'http-version': { + pattern: /^HTTP\/[0-9.]+/, + alias: 'property' + }, + // Status Code + 'status-code': { + pattern: /^(\s)\d+(?=\s)/, + lookbehind: true, + alias: 'number' + }, + // Reason Phrase + 'reason-phrase': { + pattern: /^(\s).+/, + lookbehind: true, + alias: 'string' } } }, diff --git a/components/prism-http.min.js b/components/prism-http.min.js index 5b5b842f2c..6df7aaf172 100644 --- a/components/prism-http.min.js +++ b/components/prism-http.min.js @@ -1 +1 @@ -!function(t){t.languages.http={"request-line":{pattern:/^(?:POST|GET|PUT|DELETE|OPTIONS|PATCH|TRACE|CONNECT)\s(?:https?:\/\/|\/)\S*\sHTTP\/[0-9.]+/m,inside:{property:/^(?:POST|GET|PUT|DELETE|OPTIONS|PATCH|TRACE|CONNECT)\b/,"attr-name":/:\w+/}},"response-status":{pattern:/^HTTP\/1.[01] \d.*/m,inside:{property:{pattern:/(^HTTP\/1.[01] )\d.*/i,lookbehind:!0}}},"header-name":{pattern:/^[\w-]+:(?=.)/m,alias:"keyword"}};var a,e,n,i=t.languages,p={"application/javascript":i.javascript,"application/json":i.json||i.javascript,"application/xml":i.xml,"text/xml":i.xml,"text/html":i.html,"text/css":i.css},r={"application/json":!0,"application/xml":!0};for(var s in p)if(p[s]){a=a||{};var T=r[s]?(void 0,n=(e=s).replace(/^[a-z]+\//,""),"(?:"+e+"|\\w+/(?:[\\w.-]+\\+)+"+n+"(?![+\\w.-]))"):s;a[s.replace(/\//g,"-")]={pattern:RegExp("(content-type:\\s*"+T+".*)(?:\\r?\\n|\\r){2}[\\s\\S]*","i"),lookbehind:!0,inside:p[s]}}a&&t.languages.insertBefore("http","header-name",a)}(Prism); \ No newline at end of file +!function(t){t.languages.http={"request-line":{pattern:/^(?:GET|HEAD|POST|PUT|DELETE|CONNECT|OPTIONS|TRACE|PATCH|PRI|SEARCH)\s(?:https?:\/\/|\/)\S*\sHTTP\/[0-9.]+/m,inside:{method:{pattern:/^[A-Z]+\b/,alias:"property"},"request-target":{pattern:/^(\s)(?:https?:\/\/|\/)\S*(?=\s)/,lookbehind:!0,alias:"url"},"http-version":{pattern:/^(\s)HTTP\/[0-9.]+/,lookbehind:!0,alias:"property"}}},"response-status":{pattern:/^HTTP\/[0-9.]+ \d+ .+/m,inside:{"http-version":{pattern:/^HTTP\/[0-9.]+/,alias:"property"},"status-code":{pattern:/^(\s)\d+(?=\s)/,lookbehind:!0,alias:"number"},"reason-phrase":{pattern:/^(\s).+/,lookbehind:!0,alias:"string"}}},"header-name":{pattern:/^[\w-]+:(?=.)/m,alias:"keyword"}};var a,e,s,n=t.languages,r={"application/javascript":n.javascript,"application/json":n.json||n.javascript,"application/xml":n.xml,"text/xml":n.xml,"text/html":n.html,"text/css":n.css},i={"application/json":!0,"application/xml":!0};for(var p in r)if(r[p]){a=a||{};var o=i[p]?(void 0,s=(e=p).replace(/^[a-z]+\//,""),"(?:"+e+"|\\w+/(?:[\\w.-]+\\+)+"+s+"(?![+\\w.-]))"):p;a[p.replace(/\//g,"-")]={pattern:RegExp("(content-type:\\s*"+o+".*)(?:\\r?\\n|\\r){2}[\\s\\S]*","i"),lookbehind:!0,inside:r[p]}}a&&t.languages.insertBefore("http","header-name",a)}(Prism); \ No newline at end of file diff --git a/tests/languages/http/request-line_feature.test b/tests/languages/http/request-line_feature.test index b387625765..b99af72e84 100644 --- a/tests/languages/http/request-line_feature.test +++ b/tests/languages/http/request-line_feature.test @@ -1,58 +1,126 @@ -POST http://example.com HTTP/1.0 -GET http://localhost:9999/foo.html HTTP/1.1 -PUT http://www.example.com HTTP/2.0 -DELETE https://example.com HTTP/1.1 -OPTIONS https://www.example.com HTTP/1.1 -PATCH http://example.com HTTP/1.0 -TRACE http://example.com HTTP/1.0 -CONNECT http://example.com HTTP/1.0 -GET /path/to/foo.html HTTP/1.1 +GET / HTTP/1.0 GET / HTTP/1.1 +GET /path/to/file HTTP/1.1 +GET /path/to/file?a=1&b=2 HTTP/1.1 +GET http://example.com HTTP/1.1 +GET https://example.com HTTP/1.1 +GET https://example.com/ HTTP/1.1 +GET https://example.com/path/to/file?a=1&b=2 HTTP/1.1 +GET https://example.com:443/path/to/file?a=1&b=2 HTTP/1.1 +GET https://user:pass@example.com:443/path/to/file?a=1&b=2 HTTP/1.1 +HEAD / HTTP/1.1 +POST / HTTP/1.1 +PUT / HTTP/1.1 +DELETE / HTTP/1.1 +CONNECT / HTTP/1.1 +OPTIONS / HTTP/1.1 +TRACE / HTTP/1.1 +PATCH / HTTP/1.1 +PRI / HTTP/1.1 +SEARCH / HTTP/1.1 ---------------------------------------------------- [ ["request-line", [ - ["property", "POST"], - " http://example.com HTTP/1.0" + ["method", "GET"], + ["request-target", "/"], + ["http-version", "HTTP/1.0"] ]], ["request-line", [ - ["property", "GET"], - " http://localhost", - ["attr-name", ":9999"], - "/foo.html HTTP/1.1" + ["method", "GET"], + ["request-target", "/"], + ["http-version", "HTTP/1.1"] ]], ["request-line", [ - ["property", "PUT"], - " http://www.example.com HTTP/2.0" + ["method", "GET"], + ["request-target", "/path/to/file"], + ["http-version", "HTTP/1.1"] ]], ["request-line", [ - ["property", "DELETE"], - " https://example.com HTTP/1.1" + ["method", "GET"], + ["request-target", "/path/to/file?a=1&b=2"], + ["http-version", "HTTP/1.1"] ]], ["request-line", [ - ["property", "OPTIONS"], - " https://www.example.com HTTP/1.1" + ["method", "GET"], + ["request-target", "http://example.com"], + ["http-version", "HTTP/1.1"] ]], ["request-line", [ - ["property", "PATCH"], - " http://example.com HTTP/1.0" + ["method", "GET"], + ["request-target", "https://example.com"], + ["http-version", "HTTP/1.1"] ]], ["request-line", [ - ["property", "TRACE"], - " http://example.com HTTP/1.0" + ["method", "GET"], + ["request-target", "https://example.com/"], + ["http-version", "HTTP/1.1"] ]], ["request-line", [ - ["property", "CONNECT"], - " http://example.com HTTP/1.0" + ["method", "GET"], + ["request-target", "https://example.com/path/to/file?a=1&b=2"], + ["http-version", "HTTP/1.1"] ]], ["request-line", [ - ["property", "GET"], - " /path/to/foo.html HTTP/1.1" + ["method", "GET"], + ["request-target", "https://example.com:443/path/to/file?a=1&b=2"], + ["http-version", "HTTP/1.1"] ]], ["request-line", [ - ["property", "GET"], - " / HTTP/1.1" + ["method", "GET"], + ["request-target", "https://user:pass@example.com:443/path/to/file?a=1&b=2"], + ["http-version", "HTTP/1.1"] + ]], + ["request-line", [ + ["method", "HEAD"], + ["request-target", "/"], + ["http-version", "HTTP/1.1"] + ]], + ["request-line", [ + ["method", "POST"], + ["request-target", "/"], + ["http-version", "HTTP/1.1"] + ]], + ["request-line", [ + ["method", "PUT"], + ["request-target", "/"], + ["http-version", "HTTP/1.1"] + ]], + ["request-line", [ + ["method", "DELETE"], + ["request-target", "/"], + ["http-version", "HTTP/1.1"] + ]], + ["request-line", [ + ["method", "CONNECT"], + ["request-target", "/"], + ["http-version", "HTTP/1.1"] + ]], + ["request-line", [ + ["method", "OPTIONS"], + ["request-target", "/"], + ["http-version", "HTTP/1.1"] + ]], + ["request-line", [ + ["method", "TRACE"], + ["request-target", "/"], + ["http-version", "HTTP/1.1"] + ]], + ["request-line", [ + ["method", "PATCH"], + ["request-target", "/"], + ["http-version", "HTTP/1.1"] + ]], + ["request-line", [ + ["method", "PRI"], + ["request-target", "/"], + ["http-version", "HTTP/1.1"] + ]], + ["request-line", [ + ["method", "SEARCH"], + ["request-target", "/"], + ["http-version", "HTTP/1.1"] ]] ] diff --git a/tests/languages/http/response-status_feature.test b/tests/languages/http/response-status_feature.test index 7384ff2a89..c882621ba3 100644 --- a/tests/languages/http/response-status_feature.test +++ b/tests/languages/http/response-status_feature.test @@ -7,23 +7,27 @@ HTTP/1.0 418 I'm a teapot [ ["response-status", [ - "HTTP/1.0 ", - ["property", "200 OK"] + ["http-version", "HTTP/1.0"], + ["status-code", "200"], + ["reason-phrase", "OK"] ]], ["response-status", [ - "HTTP/1.1 ", - ["property", "403 Forbidden"] + ["http-version", "HTTP/1.1"], + ["status-code", "403"], + ["reason-phrase", "Forbidden"] ]], ["response-status", [ - "HTTP/1.1 ", - ["property", "404 Not Found"] + ["http-version", "HTTP/1.1"], + ["status-code", "404"], + ["reason-phrase", "Not Found"] ]], ["response-status", [ - "HTTP/1.0 ", - ["property", "418 I'm a teapot"] + ["http-version", "HTTP/1.0"], + ["status-code", "418"], + ["reason-phrase", "I'm a teapot"] ]] ] ---------------------------------------------------- -Checks for response statuses. \ No newline at end of file +Checks for response statuses. From 04ef309c3045c7f23c78ce36cea72dec945edd6c Mon Sep 17 00:00:00 2001 From: Tom Pavelec <46928405+TomPavelec@users.noreply.github.com> Date: Wed, 20 Jan 2021 20:12:58 +0100 Subject: [PATCH 0715/1100] PHP: Class names at the start of a string are now highlighted correctly (#2731) Some class names at the start of the input string were not detected correctly due to the way greedy matching works. This fixes the issue by splitting the `class-name` rule into two rules, one before and one after the `keyword` rule that interfered and caused the issue. --- components/prism-php.js | 7 ++++++- components/prism-php.min.js | 2 +- tests/languages/php/attribute_feature.test | 2 +- tests/languages/php/class-name_feature.test | 4 ++-- tests/languages/php/issue2614.test | 21 +++++++++++++++++++++ 5 files changed, 31 insertions(+), 5 deletions(-) create mode 100644 tests/languages/php/issue2614.test diff --git a/components/prism-php.js b/components/prism-php.js index 7eb227a2b8..37c1325402 100644 --- a/components/prism-php.js +++ b/components/prism-php.js @@ -33,6 +33,11 @@ 'punctuation': /\\/ } }, + 'class-name-definition': { + pattern: /(\b(?:class|interface|trait)\s+)\b[a-z_]\w*(?!\\)\b/i, + lookbehind: true, + alias: 'class-name' + }, 'keyword': [ { pattern: /(\(\s*)\b(?:bool|boolean|int|integer|float|string|object|array)\b(?=\s*\))/i, @@ -85,7 +90,7 @@ 'argument-name': /\b[a-z_]\w*(?=\s*:(?!:))/i, 'class-name': [ { - pattern: /(\b(?:class|interface|extends|implements|trait|instanceof|new(?!\s+self|\s+static))\s+|\bcatch\s*\()\b[a-z_]\w*(?!\\)\b/i, + pattern: /(\b(?:extends|implements|instanceof|new(?!\s+self|\s+static))\s+|\bcatch\s*\()\b[a-z_]\w*(?!\\)\b/i, greedy: true, lookbehind: true }, diff --git a/components/prism-php.min.js b/components/prism-php.min.js index 2ef9393aa4..4df681f881 100644 --- a/components/prism-php.min.js +++ b/components/prism-php.min.js @@ -1 +1 @@ -!function(a){var e=/\/\*[\s\S]*?\*\/|\/\/.*|#(?!\[).*/,t=[{pattern:/\b(?:false|true)\b/i,alias:"boolean"},/\b[A-Z_][A-Z0-9_]*\b(?!\s*\()/,/\b(?:null)\b/i],i=/\b0b[01]+(?:_[01]+)*\b|\b0o[0-7]+(?:_[0-7]+)*\b|\b0x[\da-f]+(?:_[\da-f]+)*\b|(?:\b\d+(?:_\d+)*\.?(?:\d+(?:_\d+)*)?|\B\.\d+)(?:e[+-]?\d+)?/i,n=/|\?\?=?|\.{3}|\??->|[!=]=?=?|::|\*\*=?|--|\+\+|&&|\|\||<<|>>|[?~]|[/^|%*&<>.+-]=?/,s=/[{}\[\](),:;]/;a.languages.php={delimiter:{pattern:/\?>$|^<\?(?:php(?=\s)|=)?/i,alias:"important"},comment:e,variable:/\$+(?:\w+\b|(?={))/i,package:{pattern:/(namespace\s+|use\s+(?:function\s+)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,lookbehind:!0,inside:{punctuation:/\\/}},keyword:[{pattern:/(\(\s*)\b(?:bool|boolean|int|integer|float|string|object|array)\b(?=\s*\))/i,alias:"type-casting",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)\b(?:bool|int|float|string|object|array(?!\s*\()|mixed|self|static|callable|iterable|(?:null|false)(?=\s*\|))\b(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*[a-z0-9_|]\|\s*)(?:null|false)\b(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b(?:bool|int|float|string|object|void|array(?!\s*\()|mixed|self|static|callable|iterable|(?:null|false)(?=\s*\|))\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?[a-z0-9_|]\|\s*)(?:null|false)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/\b(?:bool|int|float|string|object|void|array(?!\s*\()|mixed|iterable|(?:null|false)(?=\s*\|))\b/i,alias:"type-declaration",greedy:!0},{pattern:/(\|\s*)(?:null|false)\b/i,alias:"type-declaration",greedy:!0,lookbehind:!0},{pattern:/\b(?:parent|self|static)(?=\s*::)/i,alias:"static-context",greedy:!0},/\b(?:__halt_compiler|abstract|and|array|as|break|callable|case|catch|class|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|eval|exit|extends|final|finally|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|namespace|match|new|or|parent|print|private|protected|public|require|require_once|return|self|static|switch|throw|trait|try|unset|use|var|while|xor|yield)\b/i],"argument-name":/\b[a-z_]\w*(?=\s*:(?!:))/i,"class-name":[{pattern:/(\b(?:class|interface|extends|implements|trait|instanceof|new(?!\s+self|\s+static))\s+|\bcatch\s*\()\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/(\|\s*)\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/\b[a-z_]\w*(?!\\)\b(?=\s*\|)/i,greedy:!0},{pattern:/(\|\s*)(?:\\?\b[a-z_]\w*)+\b/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(?:\\?\b[a-z_]\w*)+\b(?=\s*\|)/i,alias:"class-name-fully-qualified",greedy:!0,inside:{punctuation:/\\/}},{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self\b|\s+static\b))\s+|\bcatch\s*\()(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*\$)/i,alias:"type-declaration",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-declaration"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*::)/i,alias:["class-name-fully-qualified","static-context"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/([(,?]\s*)[a-z_]\w*(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-hint"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b[a-z_]\w*(?!\\)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:["class-name-fully-qualified","return-type"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:t,function:/\w+\s*(?=\()/,property:{pattern:/(->)[\w]+/,lookbehind:!0},number:i,operator:n,punctuation:s};var l={pattern:/{\$(?:{(?:{[^{}]+}|[^{}]+)}|[^{}])+}|(^|[^\\{])\$+(?:\w+(?:\[[^\r\n\[\]]+\]|->\w+)*)/,lookbehind:!0,inside:a.languages.php},r=[{pattern:/<<<'([^']+)'[\r\n](?:.*[\r\n])*?\1;/,alias:"nowdoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<'[^']+'|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<'?|[';]$/}}}},{pattern:/<<<(?:"([^"]+)"[\r\n](?:.*[\r\n])*?\1;|([a-z_]\w*)[\r\n](?:.*[\r\n])*?\2;)/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<(?:"[^"]+"|[a-z_]\w*)|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<"?|[";]$/}},interpolation:l}},{pattern:/`(?:\\[\s\S]|[^\\`])*`/,alias:"backtick-quoted-string",greedy:!0},{pattern:/'(?:\\[\s\S]|[^\\'])*'/,alias:"single-quoted-string",greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,alias:"double-quoted-string",greedy:!0,inside:{interpolation:l}}];a.languages.insertBefore("php","variable",{string:r}),a.languages.insertBefore("php","variable",{attribute:{pattern:/#\[(?:[^"'\/#]|\/(?![*/])|\/\/.*$|#(?!\[).*$|\/\*(?:[^*]|\*(?!\/))*\*\/|"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*')+\](?=\s*[a-z$#])/im,greedy:!0,inside:{"attribute-content":{pattern:/^(#\[)[\s\S]+(?=]$)/,lookbehind:!0,inside:{comment:e,string:r,"attribute-class-name":[{pattern:/([^:]|^)\b[a-z_]\w*(?!\\)\b/i,alias:"class-name",greedy:!0,lookbehind:!0},{pattern:/([^:]|^)(?:\\?\b[a-z_]\w*)+/i,alias:["class-name","class-name-fully-qualified"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:t,number:i,operator:n,punctuation:s}},delimiter:{pattern:/^#\[|]$/,alias:"punctuation"}}}}),a.hooks.add("before-tokenize",function(e){if(/<\?/.test(e.code)){a.languages["markup-templating"].buildPlaceholders(e,"php",/<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#(?!\[))(?:[^?\n\r]|\?(?!>))*(?=$|\?>|[\r\n])|#\[|\/\*(?:[^*]|\*(?!\/))*(?:\*\/|$))*?(?:\?>|$)/gi)}}),a.hooks.add("after-tokenize",function(e){a.languages["markup-templating"].tokenizePlaceholders(e,"php")})}(Prism); \ No newline at end of file +!function(a){var e=/\/\*[\s\S]*?\*\/|\/\/.*|#(?!\[).*/,t=[{pattern:/\b(?:false|true)\b/i,alias:"boolean"},/\b[A-Z_][A-Z0-9_]*\b(?!\s*\()/,/\b(?:null)\b/i],i=/\b0b[01]+(?:_[01]+)*\b|\b0o[0-7]+(?:_[0-7]+)*\b|\b0x[\da-f]+(?:_[\da-f]+)*\b|(?:\b\d+(?:_\d+)*\.?(?:\d+(?:_\d+)*)?|\B\.\d+)(?:e[+-]?\d+)?/i,n=/|\?\?=?|\.{3}|\??->|[!=]=?=?|::|\*\*=?|--|\+\+|&&|\|\||<<|>>|[?~]|[/^|%*&<>.+-]=?/,s=/[{}\[\](),:;]/;a.languages.php={delimiter:{pattern:/\?>$|^<\?(?:php(?=\s)|=)?/i,alias:"important"},comment:e,variable:/\$+(?:\w+\b|(?={))/i,package:{pattern:/(namespace\s+|use\s+(?:function\s+)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,lookbehind:!0,inside:{punctuation:/\\/}},"class-name-definition":{pattern:/(\b(?:class|interface|trait)\s+)\b[a-z_]\w*(?!\\)\b/i,lookbehind:!0,alias:"class-name"},keyword:[{pattern:/(\(\s*)\b(?:bool|boolean|int|integer|float|string|object|array)\b(?=\s*\))/i,alias:"type-casting",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)\b(?:bool|int|float|string|object|array(?!\s*\()|mixed|self|static|callable|iterable|(?:null|false)(?=\s*\|))\b(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*[a-z0-9_|]\|\s*)(?:null|false)\b(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b(?:bool|int|float|string|object|void|array(?!\s*\()|mixed|self|static|callable|iterable|(?:null|false)(?=\s*\|))\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?[a-z0-9_|]\|\s*)(?:null|false)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/\b(?:bool|int|float|string|object|void|array(?!\s*\()|mixed|iterable|(?:null|false)(?=\s*\|))\b/i,alias:"type-declaration",greedy:!0},{pattern:/(\|\s*)(?:null|false)\b/i,alias:"type-declaration",greedy:!0,lookbehind:!0},{pattern:/\b(?:parent|self|static)(?=\s*::)/i,alias:"static-context",greedy:!0},/\b(?:__halt_compiler|abstract|and|array|as|break|callable|case|catch|class|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|eval|exit|extends|final|finally|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|namespace|match|new|or|parent|print|private|protected|public|require|require_once|return|self|static|switch|throw|trait|try|unset|use|var|while|xor|yield)\b/i],"argument-name":/\b[a-z_]\w*(?=\s*:(?!:))/i,"class-name":[{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self|\s+static))\s+|\bcatch\s*\()\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/(\|\s*)\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/\b[a-z_]\w*(?!\\)\b(?=\s*\|)/i,greedy:!0},{pattern:/(\|\s*)(?:\\?\b[a-z_]\w*)+\b/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(?:\\?\b[a-z_]\w*)+\b(?=\s*\|)/i,alias:"class-name-fully-qualified",greedy:!0,inside:{punctuation:/\\/}},{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self\b|\s+static\b))\s+|\bcatch\s*\()(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*\$)/i,alias:"type-declaration",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-declaration"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*::)/i,alias:["class-name-fully-qualified","static-context"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/([(,?]\s*)[a-z_]\w*(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-hint"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b[a-z_]\w*(?!\\)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:["class-name-fully-qualified","return-type"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:t,function:/\w+\s*(?=\()/,property:{pattern:/(->)[\w]+/,lookbehind:!0},number:i,operator:n,punctuation:s};var l={pattern:/{\$(?:{(?:{[^{}]+}|[^{}]+)}|[^{}])+}|(^|[^\\{])\$+(?:\w+(?:\[[^\r\n\[\]]+\]|->\w+)*)/,lookbehind:!0,inside:a.languages.php},r=[{pattern:/<<<'([^']+)'[\r\n](?:.*[\r\n])*?\1;/,alias:"nowdoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<'[^']+'|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<'?|[';]$/}}}},{pattern:/<<<(?:"([^"]+)"[\r\n](?:.*[\r\n])*?\1;|([a-z_]\w*)[\r\n](?:.*[\r\n])*?\2;)/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<(?:"[^"]+"|[a-z_]\w*)|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<"?|[";]$/}},interpolation:l}},{pattern:/`(?:\\[\s\S]|[^\\`])*`/,alias:"backtick-quoted-string",greedy:!0},{pattern:/'(?:\\[\s\S]|[^\\'])*'/,alias:"single-quoted-string",greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,alias:"double-quoted-string",greedy:!0,inside:{interpolation:l}}];a.languages.insertBefore("php","variable",{string:r}),a.languages.insertBefore("php","variable",{attribute:{pattern:/#\[(?:[^"'\/#]|\/(?![*/])|\/\/.*$|#(?!\[).*$|\/\*(?:[^*]|\*(?!\/))*\*\/|"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*')+\](?=\s*[a-z$#])/im,greedy:!0,inside:{"attribute-content":{pattern:/^(#\[)[\s\S]+(?=]$)/,lookbehind:!0,inside:{comment:e,string:r,"attribute-class-name":[{pattern:/([^:]|^)\b[a-z_]\w*(?!\\)\b/i,alias:"class-name",greedy:!0,lookbehind:!0},{pattern:/([^:]|^)(?:\\?\b[a-z_]\w*)+/i,alias:["class-name","class-name-fully-qualified"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:t,number:i,operator:n,punctuation:s}},delimiter:{pattern:/^#\[|]$/,alias:"punctuation"}}}}),a.hooks.add("before-tokenize",function(e){if(/<\?/.test(e.code)){a.languages["markup-templating"].buildPlaceholders(e,"php",/<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#(?!\[))(?:[^?\n\r]|\?(?!>))*(?=$|\?>|[\r\n])|#\[|\/\*(?:[^*]|\*(?!\/))*(?:\*\/|$))*?(?:\?>|$)/gi)}}),a.hooks.add("after-tokenize",function(e){a.languages["markup-templating"].tokenizePlaceholders(e,"php")})}(Prism); \ No newline at end of file diff --git a/tests/languages/php/attribute_feature.test b/tests/languages/php/attribute_feature.test index de9816a803..6ce9a187cd 100644 --- a/tests/languages/php/attribute_feature.test +++ b/tests/languages/php/attribute_feature.test @@ -224,7 +224,7 @@ function main() {} ["delimiter", "]"] ]], ["keyword", "class"], - ["class-name", "Foo"], + ["class-name-definition", "Foo"], ["punctuation", "{"], ["keyword", "public"], ["keyword", "function"], diff --git a/tests/languages/php/class-name_feature.test b/tests/languages/php/class-name_feature.test index 8b3b824811..bf3502ae6e 100644 --- a/tests/languages/php/class-name_feature.test +++ b/tests/languages/php/class-name_feature.test @@ -170,7 +170,7 @@ class Foo extends \Package\Bar implements App\Baz {} ["punctuation", "}"], ["keyword", "class"], - ["class-name", "Foo"], + ["class-name-definition", "Foo"], ["keyword", "extends"], ["class-name", "Bar"], ["keyword", "implements"], @@ -179,7 +179,7 @@ class Foo extends \Package\Bar implements App\Baz {} ["punctuation", "}"], ["keyword", "class"], - ["class-name", "Foo"], + ["class-name-definition", "Foo"], ["keyword", "extends"], ["class-name", [ ["punctuation", "\\"], diff --git a/tests/languages/php/issue2614.test b/tests/languages/php/issue2614.test new file mode 100644 index 0000000000..56f4875c10 --- /dev/null +++ b/tests/languages/php/issue2614.test @@ -0,0 +1,21 @@ +class First {} +class Second {} + +---------------------------------------------------- + +[ + ["keyword", "class"], + ["class-name-definition", "First"], + ["punctuation", "{"], + ["punctuation", "}"], + + ["keyword", "class"], + ["class-name-definition", "Second"], + ["punctuation", "{"], + ["punctuation", "}"] +] + + +---------------------------------------------------- + +Checks for issue #2614. \ No newline at end of file From 3f7d74533f68e64c3021e12b9221d2afc8dd012c Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Sun, 24 Jan 2021 15:40:08 +0100 Subject: [PATCH 0716/1100] Added support for ChaiScript (#2706) --- components.js | 2 +- components.json | 5 + components/prism-chaiscript.js | 60 ++++++ components/prism-chaiscript.min.js | 1 + examples/prism-chaiscript.html | 56 ++++++ plugins/autoloader/prism-autoloader.js | 4 + plugins/autoloader/prism-autoloader.min.js | 2 +- .../languages/chaiscript/boolean_feature.test | 9 + .../languages/chaiscript/comment_feature.test | 16 ++ .../chaiscript/function_feature.test | 190 ++++++++++++++++++ .../languages/chaiscript/keyword_feature.test | 47 +++++ .../languages/chaiscript/number_feature.test | 19 ++ .../chaiscript/operator_feature.test | 74 +++++++ .../chaiscript/punctuation_feature.test | 17 ++ .../languages/chaiscript/string_feature.test | 71 +++++++ 15 files changed, 571 insertions(+), 2 deletions(-) create mode 100644 components/prism-chaiscript.js create mode 100644 components/prism-chaiscript.min.js create mode 100644 examples/prism-chaiscript.html create mode 100644 tests/languages/chaiscript/boolean_feature.test create mode 100644 tests/languages/chaiscript/comment_feature.test create mode 100644 tests/languages/chaiscript/function_feature.test create mode 100644 tests/languages/chaiscript/keyword_feature.test create mode 100644 tests/languages/chaiscript/number_feature.test create mode 100644 tests/languages/chaiscript/operator_feature.test create mode 100644 tests/languages/chaiscript/punctuation_feature.test create mode 100644 tests/languages/chaiscript/string_feature.test diff --git a/components.js b/components.js index 35889c650b..c622e503ab 100644 --- a/components.js +++ b/components.js @@ -1,2 +1,2 @@ -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml","ssml","atom","rss"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","ssml":"SSML","atom":"Atom","rss":"RSS"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","optional":"regex","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"ABNF","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"agda":{"title":"Agda","owner":"xy-ren"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apex":{"title":"Apex","require":["clike","sql"],"owner":"RunDevelopment"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"dkern"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"birb":{"title":"Birb","require":"clike","owner":"Calamity210"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"BNF","alias":"rbnf","aliasTitles":{"rbnf":"RBNF"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"bsl":{"title":"BSL (1C:Enterprise)","alias":"oscript","aliasTitles":{"oscript":"OneScript"},"owner":"Diversus23"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cil":{"title":"CIL","owner":"sbrl"},"clojure":{"title":"Clojure","owner":"troglotit"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"cypher":{"title":"Cypher","owner":"RunDevelopment"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dataweave":{"title":"DataWeave","owner":"machaval"},"dax":{"title":"DAX","owner":"peterbud"},"dhall":{"title":"Dhall","owner":"RunDevelopment"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"dot":{"title":"DOT (Graphviz)","alias":"gv","optional":"markup","owner":"RunDevelopment"},"ebnf":{"title":"EBNF","owner":"RunDevelopment"},"editorconfig":{"title":"EditorConfig","owner":"osipxd"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"c","owner":"Golmote"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","optional":["markdown"],"owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"hlsl":{"title":"HLSL","require":"c","owner":"RunDevelopment"},"http":{"title":"HTTP","optional":["css","javascript","json","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"ignore":{"title":".ignore","owner":"osipxd","alias":["gitignore","hgignore","npmignore"],"aliasTitles":{"gitignore":".gitignore","hgignore":".hgignore","npmignore":".npmignore"}},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike","typescript"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","alias":"webmanifest","aliasTitles":{"webmanifest":"Web App Manifest"},"owner":"CupOfTea696"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"jsstacktrace":{"title":"JS stack trace","owner":"sbrl"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","alias":["kt","kts"],"aliasTitles":{"kts":"Kotlin Script"},"require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","optional":"yaml","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"mongodb":{"title":"MongoDB","owner":"airs0urce","require":"javascript"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"naniscript":{"title":"Naninovel Script","owner":"Elringus","alias":"nani"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":"markup-templating","owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"promql":{"title":"PromQL","owner":"arendjr"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"purebasic":{"title":"PureBasic","require":"clike","alias":"pbfasm","owner":"HeX0R101"},"purescript":{"title":"PureScript","require":"haskell","alias":"purs","owner":"sriharshachilakapati"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"racket":{"title":"Racket","require":"scheme","alias":"rkt","owner":"RunDevelopment"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","owner":"RunDevelopment"},"renpy":{"title":"Ren'py","alias":"rpy","owner":"HyuchiaDiego"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","alias":["sh-session","shellsession"],"owner":"RunDevelopment"},"smali":{"title":"Smali","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sml":{"title":"SML","alias":"smlnj","aliasTitles":{"smlnj":"SML/NJ"},"owner":"RunDevelopment"},"solidity":{"title":"Solidity (Ethereum)","alias":"sol","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"stan":{"title":"Stan","owner":"RunDevelopment"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","vbnet"],"owner":"RunDevelopment"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"typoscript":{"title":"TypoScript","alias":"tsconfig","aliasTitles":{"tsconfig":"TSConfig"},"owner":"dkern"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"v":{"title":"V","require":"clike","owner":"taggon"},"vala":{"title":"Vala","require":"clike","optional":"regex","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":["vb","vba"],"aliasTitles":{"vba":"VBA"},"owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xml-doc":{"title":"XML doc (.net)","require":"markup","modify":["csharp","fsharp","vbnet"],"owner":"RunDevelopment"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"yang":{"title":"YANG","owner":"RunDevelopment"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml","ssml","atom","rss"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","ssml":"SSML","atom":"Atom","rss":"RSS"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","optional":"regex","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"ABNF","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"agda":{"title":"Agda","owner":"xy-ren"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apex":{"title":"Apex","require":["clike","sql"],"owner":"RunDevelopment"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"dkern"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"birb":{"title":"Birb","require":"clike","owner":"Calamity210"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"BNF","alias":"rbnf","aliasTitles":{"rbnf":"RBNF"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"bsl":{"title":"BSL (1C:Enterprise)","alias":"oscript","aliasTitles":{"oscript":"OneScript"},"owner":"Diversus23"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"chaiscript":{"title":"ChaiScript","require":["clike","cpp"],"owner":"RunDevelopment"},"cil":{"title":"CIL","owner":"sbrl"},"clojure":{"title":"Clojure","owner":"troglotit"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"cypher":{"title":"Cypher","owner":"RunDevelopment"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dataweave":{"title":"DataWeave","owner":"machaval"},"dax":{"title":"DAX","owner":"peterbud"},"dhall":{"title":"Dhall","owner":"RunDevelopment"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"dot":{"title":"DOT (Graphviz)","alias":"gv","optional":"markup","owner":"RunDevelopment"},"ebnf":{"title":"EBNF","owner":"RunDevelopment"},"editorconfig":{"title":"EditorConfig","owner":"osipxd"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"c","owner":"Golmote"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","optional":["markdown"],"owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"hlsl":{"title":"HLSL","require":"c","owner":"RunDevelopment"},"http":{"title":"HTTP","optional":["css","javascript","json","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"ignore":{"title":".ignore","owner":"osipxd","alias":["gitignore","hgignore","npmignore"],"aliasTitles":{"gitignore":".gitignore","hgignore":".hgignore","npmignore":".npmignore"}},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike","typescript"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","alias":"webmanifest","aliasTitles":{"webmanifest":"Web App Manifest"},"owner":"CupOfTea696"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"jsstacktrace":{"title":"JS stack trace","owner":"sbrl"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","alias":["kt","kts"],"aliasTitles":{"kts":"Kotlin Script"},"require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","optional":"yaml","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"mongodb":{"title":"MongoDB","owner":"airs0urce","require":"javascript"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"naniscript":{"title":"Naninovel Script","owner":"Elringus","alias":"nani"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":"markup-templating","owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"promql":{"title":"PromQL","owner":"arendjr"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"purebasic":{"title":"PureBasic","require":"clike","alias":"pbfasm","owner":"HeX0R101"},"purescript":{"title":"PureScript","require":"haskell","alias":"purs","owner":"sriharshachilakapati"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"racket":{"title":"Racket","require":"scheme","alias":"rkt","owner":"RunDevelopment"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","owner":"RunDevelopment"},"renpy":{"title":"Ren'py","alias":"rpy","owner":"HyuchiaDiego"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","alias":["sh-session","shellsession"],"owner":"RunDevelopment"},"smali":{"title":"Smali","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sml":{"title":"SML","alias":"smlnj","aliasTitles":{"smlnj":"SML/NJ"},"owner":"RunDevelopment"},"solidity":{"title":"Solidity (Ethereum)","alias":"sol","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"stan":{"title":"Stan","owner":"RunDevelopment"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","vbnet"],"owner":"RunDevelopment"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"typoscript":{"title":"TypoScript","alias":"tsconfig","aliasTitles":{"tsconfig":"TSConfig"},"owner":"dkern"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"v":{"title":"V","require":"clike","owner":"taggon"},"vala":{"title":"Vala","require":"clike","optional":"regex","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":["vb","vba"],"aliasTitles":{"vba":"VBA"},"owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xml-doc":{"title":"XML doc (.net)","require":"markup","modify":["csharp","fsharp","vbnet"],"owner":"RunDevelopment"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"yang":{"title":"YANG","owner":"RunDevelopment"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; if (typeof module !== 'undefined' && module.exports) { module.exports = components; } \ No newline at end of file diff --git a/components.json b/components.json index 2895dfd0d0..e166e8ab44 100644 --- a/components.json +++ b/components.json @@ -238,6 +238,11 @@ "require": "c", "owner": "zeitgeist87" }, + "chaiscript": { + "title": "ChaiScript", + "require": ["clike", "cpp"], + "owner": "RunDevelopment" + }, "cil": { "title": "CIL", "owner": "sbrl" diff --git a/components/prism-chaiscript.js b/components/prism-chaiscript.js new file mode 100644 index 0000000000..abfd1b15fa --- /dev/null +++ b/components/prism-chaiscript.js @@ -0,0 +1,60 @@ +Prism.languages.chaiscript = Prism.languages.extend('clike', { + 'string': { + pattern: /(^|[^\\])'(?:[^'\\]|\\[\s\S])*'/, + lookbehind: true, + greedy: true + }, + 'class-name': [ + { + // e.g. class Rectangle { ... } + pattern: /(\bclass\s+)\w+/, + lookbehind: true + }, + { + // e.g. attr Rectangle::height, def Rectangle::area() { ... } + pattern: /(\b(?:attr|def)\s+)\w+(?=\s*::)/, + lookbehind: true + } + ], + 'keyword': /\b(?:attr|auto|break|case|catch|class|continue|def|default|else|finally|for|fun|global|if|return|switch|this|try|var|while)\b/, + 'number': [ + Prism.languages.cpp.number, + /\b(?:Infinity|NaN)\b/ + ], + 'operator': />>=?|<<=?|\|\||&&|:[:=]?|--|\+\+|[=!<>+\-*/%|&^]=?|[?~]|`[^`\r\n]{1,4}`/, +}); + +Prism.languages.insertBefore('chaiscript', 'operator', { + 'parameter-type': { + // e.g. def foo(int x, Vector y) {...} + pattern: /([,(]\s*)\w+(?=\s+\w)/, + lookbehind: true, + alias: 'class-name' + }, +}); + +Prism.languages.insertBefore('chaiscript', 'string', { + 'string-interpolation': { + pattern: /(^|[^\\])"(?:[^"$\\]|\\[\s\S]|\$(?!\{)|\$\{(?:[^{}]|\{(?:[^{}]|\{[^{}]*\})*\})*\})*"/, + lookbehind: true, + greedy: true, + inside: { + 'interpolation': { + pattern: /((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^{}]*\})*\})*\}/, + lookbehind: true, + inside: { + 'interpolation-expression': { + pattern: /(^\$\{)[\s\S]+(?=\}$)/, + lookbehind: true, + inside: Prism.languages.chaiscript + }, + 'interpolation-punctuation': { + pattern: /^\$\{|\}$/, + alias: 'punctuation' + } + } + }, + 'string': /[\s\S]+/ + } + }, +}); diff --git a/components/prism-chaiscript.min.js b/components/prism-chaiscript.min.js new file mode 100644 index 0000000000..cb69cb1c96 --- /dev/null +++ b/components/prism-chaiscript.min.js @@ -0,0 +1 @@ +Prism.languages.chaiscript=Prism.languages.extend("clike",{string:{pattern:/(^|[^\\])'(?:[^'\\]|\\[\s\S])*'/,lookbehind:!0,greedy:!0},"class-name":[{pattern:/(\bclass\s+)\w+/,lookbehind:!0},{pattern:/(\b(?:attr|def)\s+)\w+(?=\s*::)/,lookbehind:!0}],keyword:/\b(?:attr|auto|break|case|catch|class|continue|def|default|else|finally|for|fun|global|if|return|switch|this|try|var|while)\b/,number:[Prism.languages.cpp.number,/\b(?:Infinity|NaN)\b/],operator:/>>=?|<<=?|\|\||&&|:[:=]?|--|\+\+|[=!<>+\-*/%|&^]=?|[?~]|`[^`\r\n]{1,4}`/}),Prism.languages.insertBefore("chaiscript","operator",{"parameter-type":{pattern:/([,(]\s*)\w+(?=\s+\w)/,lookbehind:!0,alias:"class-name"}}),Prism.languages.insertBefore("chaiscript","string",{"string-interpolation":{pattern:/(^|[^\\])"(?:[^"$\\]|\\[\s\S]|\$(?!\{)|\$\{(?:[^{}]|\{(?:[^{}]|\{[^{}]*\})*\})*\})*"/,lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^{}]*\})*\})*\}/,lookbehind:!0,inside:{"interpolation-expression":{pattern:/(^\$\{)[\s\S]+(?=\}$)/,lookbehind:!0,inside:Prism.languages.chaiscript},"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"}}},string:/[\s\S]+/}}}); \ No newline at end of file diff --git a/examples/prism-chaiscript.html b/examples/prism-chaiscript.html new file mode 100644 index 0000000000..a167d39a49 --- /dev/null +++ b/examples/prism-chaiscript.html @@ -0,0 +1,56 @@ +

        Full example

        +
        // http://chaiscript.com/examples.html#ChaiScript_Language_Examples
        +// Source: https://gist.github.com/lefticus/cf058f2927fef68d58e0#file-chaiscript_overview-chai
        +
        +// ChaiScript supports the normal kind of control blocks you've come to expect from
        +// C++ and JavaScript
        +
        +
        +if (5 > 2) {
        +  print("Yup, 5 > 2");
        +} else if (2 > 5) {
        +  // never gonna happen
        +} else {
        +  // really not going to happen
        +}
        +
        +var x = true;
        +
        +while (x)
        +{
        +  print("x was true")
        +  x = false;
        +}
        +
        +for (var i = 1; i < 10; ++i)
        +{
        +  print(i); // prints 1 through 9
        +}
        +
        +
        +// function definition
        +
        +def myFunc(x) {
        +  print(x);
        +}
        +
        +// function definition with function guards
        +def myFunc(x) : x > 2 && x < 5 {
        +  print(to_string(x) + " is between 2 and 5")
        +}
        +
        +def myFunc(x) : x >= 5 {
        +  print(t_string(x) + " is greater than or equal to 5")
        +}
        +
        +myFunc(3)
        +
        +// ChaiScript also supports in string evaluation, which C++ does not
        +
        +print("${3 + 5} is 8");
        +
        +// And dynamic code evaluation
        +
        +var value = eval("4 + 2 + 12");
        +
        +// value is equal to 18
        diff --git a/plugins/autoloader/prism-autoloader.js b/plugins/autoloader/prism-autoloader.js index 1c02dd7291..57d6f7f53e 100644 --- a/plugins/autoloader/prism-autoloader.js +++ b/plugins/autoloader/prism-autoloader.js @@ -25,6 +25,10 @@ "c": "clike", "csharp": "clike", "cpp": "c", + "chaiscript": [ + "clike", + "cpp" + ], "coffeescript": "javascript", "crystal": "ruby", "css-extras": "css", diff --git a/plugins/autoloader/prism-autoloader.min.js b/plugins/autoloader/prism-autoloader.min.js index 630424b9d8..82872e3970 100644 --- a/plugins/autoloader/prism-autoloader.min.js +++ b/plugins/autoloader/prism-autoloader.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof self&&self.Prism&&self.document&&document.createElement){var l={javascript:"clike",actionscript:"javascript",apex:["clike","sql"],arduino:"cpp",aspnet:["markup","csharp"],birb:"clike",bison:"c",c:"clike",csharp:"clike",cpp:"c",coffeescript:"javascript",crystal:"ruby","css-extras":"css",d:"clike",dart:"clike",django:"markup-templating",ejs:["javascript","markup-templating"],etlua:["lua","markup-templating"],erb:["ruby","markup-templating"],fsharp:"clike","firestore-security-rules":"clike",flow:"javascript",ftl:"markup-templating",gml:"clike",glsl:"c",go:"clike",groovy:"clike",haml:"ruby",handlebars:"markup-templating",haxe:"clike",hlsl:"c",java:"clike",javadoc:["markup","java","javadoclike"],jolie:"clike",jsdoc:["javascript","javadoclike","typescript"],"js-extras":"javascript",json5:"json",jsonp:"json","js-templates":"javascript",kotlin:"clike",latte:["clike","markup-templating","php"],less:"css",lilypond:"scheme",markdown:"markup","markup-templating":"markup",mongodb:"javascript",n4js:"javascript",nginx:"clike",objectivec:"c",opencl:"c",parser:"markup",php:"markup-templating",phpdoc:["php","javadoclike"],"php-extras":"php",plsql:"sql",processing:"clike",protobuf:"clike",pug:["markup","javascript"],purebasic:"clike",purescript:"haskell",qml:"javascript",qore:"clike",racket:"scheme",jsx:["markup","javascript"],tsx:["jsx","typescript"],reason:"clike",ruby:"clike",sass:"css",scss:"css",scala:"java","shell-session":"bash",smarty:"markup-templating",solidity:"clike",soy:"markup-templating",sparql:"turtle",sqf:"clike",swift:"clike","t4-cs":["t4-templating","csharp"],"t4-vb":["t4-templating","vbnet"],tap:"yaml",tt2:["clike","markup-templating"],textile:"markup",twig:"markup",typescript:"javascript",v:"clike",vala:"clike",vbnet:"basic",velocity:"markup",wiki:"markup",xeora:"markup","xml-doc":"markup",xquery:"markup"},n={html:"markup",xml:"markup",svg:"markup",mathml:"markup",ssml:"markup",atom:"markup",rss:"markup",js:"javascript",g4:"antlr4",adoc:"asciidoc",shell:"bash",shortcode:"bbcode",rbnf:"bnf",oscript:"bsl",cs:"csharp",dotnet:"csharp",coffee:"coffeescript",conc:"concurnas",jinja2:"django","dns-zone":"dns-zone-file",dockerfile:"docker",gv:"dot",eta:"ejs",xlsx:"excel-formula",xls:"excel-formula",gamemakerlanguage:"gml",hs:"haskell",gitignore:"ignore",hgignore:"ignore",npmignore:"ignore",webmanifest:"json",kt:"kotlin",kts:"kotlin",tex:"latex",context:"latex",ly:"lilypond",emacs:"lisp",elisp:"lisp","emacs-lisp":"lisp",md:"markdown",moon:"moonscript",n4jsd:"n4js",nani:"naniscript",objc:"objectivec",objectpascal:"pascal",px:"pcaxis",pcode:"peoplecode",pq:"powerquery",mscript:"powerquery",pbfasm:"purebasic",purs:"purescript",py:"python",rkt:"racket",rpy:"renpy",robot:"robotframework",rb:"ruby","sh-session":"shell-session",shellsession:"shell-session",smlnj:"sml",sol:"solidity",sln:"solution-file",rq:"sparql",t4:"t4-cs",trig:"turtle",ts:"typescript",tsconfig:"typoscript",uscript:"unrealscript",uc:"unrealscript",vb:"visual-basic",vba:"visual-basic",xeoracube:"xeora",yml:"yaml"},p={},e="components/",a=Prism.util.currentScript();if(a){var r=/\bplugins\/autoloader\/prism-autoloader\.(?:min\.)?js(?:\?[^\r\n/]*)?$/i,s=/(^|\/)[\w-]+\.(?:min\.)?js(?:\?[^\r\n/]*)?$/i,t=a.getAttribute("data-autoloader-path");if(null!=t)e=t.trim().replace(/\/?$/,"/");else{var i=a.src;r.test(i)?e=i.replace(r,"components/"):s.test(i)&&(e=i.replace(s,"$1components/"))}}var o=Prism.plugins.autoloader={languages_path:e,use_minified:!0,loadLanguages:m};Prism.hooks.add("complete",function(e){var a=e.element,r=e.language;if(a&&r&&"none"!==r){var s=function(e){var a=(e.getAttribute("data-dependencies")||"").trim();if(!a){var r=e.parentElement;r&&"pre"===r.tagName.toLowerCase()&&(a=(r.getAttribute("data-dependencies")||"").trim())}return a?a.split(/\s*,\s*/g):[]}(a);/^diff-./i.test(r)?(s.push("diff"),s.push(r.substr("diff-".length))):s.push(r),s.every(u)||m(s,function(){Prism.highlightElement(a)})}})}function u(e){if(0<=e.indexOf("!"))return!1;if((e=n[e]||e)in Prism.languages)return!0;var a=p[e];return a&&!a.error&&!1===a.loading}function m(e,a,r){"string"==typeof e&&(e=[e]);var s=e.length,t=0,i=!1;function c(){i||++t===s&&a&&a(e)}0!==s?e.forEach(function(e){!function(a,r,s){var t=0<=a.indexOf("!");function e(){var e=p[a];e||(e=p[a]={callbacks:[]}),e.callbacks.push({success:r,error:s}),!t&&u(a)?k(a,"success"):!t&&e.error?k(a,"error"):!t&&e.loading||(e.loading=!0,e.error=!1,function(e,a,r){var s=document.createElement("script");s.src=e,s.async=!0,s.onload=function(){document.body.removeChild(s),a&&a()},s.onerror=function(){document.body.removeChild(s),r&&r()},document.body.appendChild(s)}(function(e){return o.languages_path+"prism-"+e+(o.use_minified?".min":"")+".js"}(a),function(){e.loading=!1,k(a,"success")},function(){e.loading=!1,e.error=!0,k(a,"error")}))}a=a.replace("!",""),a=n[a]||a;var i=l[a];i&&i.length?m(i,e,s):e()}(e,c,function(){i||(i=!0,r&&r(e))})}):a&&setTimeout(a,0)}function k(e,a){if(p[e]){for(var r=p[e].callbacks,s=0,t=r.length;s >= +<< >> ++ - +* / % +++ -- - + ! ~ + += := ++= -= *= /= %= <<= >>= &= ^= |= +: :: + +// operator references +`+` + +---------------------------------------------------- + +[ + ["operator", "?"], + + ["operator", "||"], + ["operator", "&&"], + + ["operator", "|"], + ["operator", "^"], + ["operator", "&"], + + ["operator", "=="], + ["operator", "!="], + + ["operator", "<"], + ["operator", "<="], + ["operator", ">"], + ["operator", ">="], + + ["operator", "<<"], + ["operator", ">>"], + + ["operator", "+"], + ["operator", "-"], + + ["operator", "*"], + ["operator", "/"], + ["operator", "%"], + + ["operator", "++"], + ["operator", "--"], + ["operator", "-"], + ["operator", "+"], + ["operator", "!"], + ["operator", "~"], + + ["operator", "="], + ["operator", ":="], + + ["operator", "+="], + ["operator", "-="], + ["operator", "*="], + ["operator", "/="], + ["operator", "%="], + ["operator", "<<="], + ["operator", ">>="], + ["operator", "&="], + ["operator", "^="], + ["operator", "|="], + + ["operator", ":"], + ["operator", "::"], + + ["comment", "// operator references"], + ["operator", "`+`"] +] \ No newline at end of file diff --git a/tests/languages/chaiscript/punctuation_feature.test b/tests/languages/chaiscript/punctuation_feature.test new file mode 100644 index 0000000000..cfdd322901 --- /dev/null +++ b/tests/languages/chaiscript/punctuation_feature.test @@ -0,0 +1,17 @@ +( ) [ ] { } +; , . + +---------------------------------------------------- + +[ + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", "["], + ["punctuation", "]"], + ["punctuation", "{"], + ["punctuation", "}"], + + ["punctuation", ";"], + ["punctuation", ","], + ["punctuation", "."] +] \ No newline at end of file diff --git a/tests/languages/chaiscript/string_feature.test b/tests/languages/chaiscript/string_feature.test new file mode 100644 index 0000000000..fdc72461da --- /dev/null +++ b/tests/languages/chaiscript/string_feature.test @@ -0,0 +1,71 @@ +"string" +"lhs: ${lhs}, rhs: ${rhs}" +"${3 + 5} is 8" +"method_missing(${i}, ${name}), ${v.size()} params" + +'f' + +---------------------------------------------------- + +[ + ["string-interpolation", [ + ["string", "\"string\""] + ]], + ["string-interpolation", [ + ["string", "\"lhs: "], + ["interpolation", [ + ["interpolation-punctuation", "${"], + ["interpolation-expression", ["lhs"]], + ["interpolation-punctuation", "}"] + ]], + ["string", ", rhs: "], + ["interpolation", [ + ["interpolation-punctuation", "${"], + ["interpolation-expression", ["rhs"]], + ["interpolation-punctuation", "}"] + ]], + ["string", "\""] + ]], + ["string-interpolation", [ + ["string", "\""], + ["interpolation", [ + ["interpolation-punctuation", "${"], + ["interpolation-expression", [ + ["number", "3"], + ["operator", "+"], + ["number", "5"] + ]], + ["interpolation-punctuation", "}"] + ]], + ["string", " is 8\""] + ]], + ["string-interpolation", [ + ["string", "\"method_missing("], + ["interpolation", [ + ["interpolation-punctuation", "${"], + ["interpolation-expression", ["i"]], + ["interpolation-punctuation", "}"] + ]], + ["string", ", "], + ["interpolation", [ + ["interpolation-punctuation", "${"], + ["interpolation-expression", ["name"]], + ["interpolation-punctuation", "}"] + ]], + ["string", "), "], + ["interpolation", [ + ["interpolation-punctuation", "${"], + ["interpolation-expression", [ + "v", + ["punctuation", "."], + ["function", "size"], + ["punctuation", "("], + ["punctuation", ")"] + ]], + ["interpolation-punctuation", "}"] + ]], + ["string", " params\""] + ]], + + ["string", "'f'"] +] \ No newline at end of file From b37987d3b7f10da0b3d8a76e94a5fe862d07ac2c Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Sun, 24 Jan 2021 15:42:50 +0100 Subject: [PATCH 0717/1100] Core: Fixed greedy rematching reach bug (#2705) --- components/prism-core.js | 12 +++- components/prism-core.min.js | 2 +- docs/global.html | 8 +-- docs/prism-core.js.html | 12 +++- prism.js | 12 +++- tests/languages/javascript/issue2694.test | 70 +++++++++++++++++++++++ 6 files changed, 105 insertions(+), 11 deletions(-) create mode 100644 tests/languages/javascript/issue2694.test diff --git a/components/prism-core.js b/components/prism-core.js index 29a7952d7b..acc60d6fa6 100644 --- a/components/prism-core.js +++ b/components/prism-core.js @@ -984,10 +984,18 @@ function matchGrammar(text, tokenList, grammar, startNode, startPos, rematch) { if (removeCount > 1) { // at least one Token object was removed, so we have to do some rematching // this can only happen if the current pattern is greedy - matchGrammar(text, tokenList, grammar, currentNode.prev, pos, { + + /** @type {RematchOptions} */ + var nestedRematch = { cause: token + ',' + j, reach: reach - }); + }; + matchGrammar(text, tokenList, grammar, currentNode.prev, pos, nestedRematch); + + // the reach might have been extended because of the rematching + if (rematch && nestedRematch.reach > rematch.reach) { + rematch.reach = nestedRematch.reach; + } } } } diff --git a/components/prism-core.min.js b/components/prism-core.min.js index 89173b8a76..38bfc4e4b1 100644 --- a/components/prism-core.min.js +++ b/components/prism-core.min.js @@ -1 +1 @@ -var _self="undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{},Prism=function(u){var c=/\blang(?:uage)?-([\w-]+)\b/i,n=0,_={manual:u.Prism&&u.Prism.manual,disableWorkerMessageHandler:u.Prism&&u.Prism.disableWorkerMessageHandler,util:{encode:function e(n){return n instanceof M?new M(n.type,e(n.content),n.alias):Array.isArray(n)?n.map(e):n.replace(/&/g,"&").replace(/=l.reach);y+=m.value.length,m=m.next){var k=m.value;if(t.length>n.length)return;if(!(k instanceof M)){var b,x=1;if(h){if(!(b=W(p,y,n,f)))break;var w=b.index,A=b.index+b[0].length,P=y;for(P+=m.value.length;P<=w;)m=m.next,P+=m.value.length;if(P-=m.value.length,y=P,m.value instanceof M)continue;for(var S=m;S!==t.tail&&(Pl.reach&&(l.reach=N);var j=m.prev;O&&(j=z(t,j,O),y+=O.length),I(t,j,x);var C=new M(o,g?_.tokenize(E,g):E,d,E);m=z(t,j,C),L&&z(t,m,L),1"+a.content+""},!u.document)return u.addEventListener&&(_.disableWorkerMessageHandler||u.addEventListener("message",function(e){var n=JSON.parse(e.data),t=n.language,r=n.code,a=n.immediateClose;u.postMessage(_.highlight(r,_.languages[t],t)),a&&u.close()},!1)),_;var e=_.util.currentScript();function t(){_.manual||_.highlightAll()}if(e&&(_.filename=e.src,e.hasAttribute("data-manual")&&(_.manual=!0)),!_.manual){var r=document.readyState;"loading"===r||"interactive"===r&&e&&e.defer?document.addEventListener("DOMContentLoaded",t):window.requestAnimationFrame?window.requestAnimationFrame(t):window.setTimeout(t,16)}return _}(_self);"undefined"!=typeof module&&module.exports&&(module.exports=Prism),"undefined"!=typeof global&&(global.Prism=Prism); \ No newline at end of file +var _self="undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{},Prism=function(u){var c=/\blang(?:uage)?-([\w-]+)\b/i,n=0,M={manual:u.Prism&&u.Prism.manual,disableWorkerMessageHandler:u.Prism&&u.Prism.disableWorkerMessageHandler,util:{encode:function e(n){return n instanceof W?new W(n.type,e(n.content),n.alias):Array.isArray(n)?n.map(e):n.replace(/&/g,"&").replace(/=l.reach);y+=m.value.length,m=m.next){var k=m.value;if(r.length>n.length)return;if(!(k instanceof W)){var b,x=1;if(h){if(!(b=z(p,y,n,f)))break;var w=b.index,A=b.index+b[0].length,P=y;for(P+=m.value.length;P<=w;)m=m.next,P+=m.value.length;if(P-=m.value.length,y=P,m.value instanceof W)continue;for(var S=m;S!==r.tail&&(Pl.reach&&(l.reach=N);var j=m.prev;O&&(j=I(r,j,O),y+=O.length),q(r,j,x);var C=new W(o,g?M.tokenize(E,g):E,d,E);if(m=I(r,j,C),L&&I(r,m,L),1l.reach&&(l.reach=_.reach)}}}}}}(e,a,n,a.head,0),function(e){var n=[],r=e.head.next;for(;r!==e.tail;)n.push(r.value),r=r.next;return n}(a)},hooks:{all:{},add:function(e,n){var r=M.hooks.all;r[e]=r[e]||[],r[e].push(n)},run:function(e,n){var r=M.hooks.all[e];if(r&&r.length)for(var t,a=0;t=r[a++];)t(n)}},Token:W};function W(e,n,r,t){this.type=e,this.content=n,this.alias=r,this.length=0|(t||"").length}function z(e,n,r,t){e.lastIndex=n;var a=e.exec(r);if(a&&t&&a[1]){var i=a[1].length;a.index+=i,a[0]=a[0].slice(i)}return a}function i(){var e={value:null,prev:null,next:null},n={value:null,prev:e,next:null};e.next=n,this.head=e,this.tail=n,this.length=0}function I(e,n,r){var t=n.next,a={value:r,prev:n,next:t};return n.next=a,t.prev=a,e.length++,a}function q(e,n,r){for(var t=n.next,a=0;a"+a.content+""},!u.document)return u.addEventListener&&(M.disableWorkerMessageHandler||u.addEventListener("message",function(e){var n=JSON.parse(e.data),r=n.language,t=n.code,a=n.immediateClose;u.postMessage(M.highlight(t,M.languages[r],r)),a&&u.close()},!1)),M;var e=M.util.currentScript();function r(){M.manual||M.highlightAll()}if(e&&(M.filename=e.src,e.hasAttribute("data-manual")&&(M.manual=!0)),!M.manual){var t=document.readyState;"loading"===t||"interactive"===t&&e&&e.defer?document.addEventListener("DOMContentLoaded",r):window.requestAnimationFrame?window.requestAnimationFrame(r):window.setTimeout(r,16)}return M}(_self);"undefined"!=typeof module&&module.exports&&(module.exports=Prism),"undefined"!=typeof global&&(global.Prism=Prism); \ No newline at end of file diff --git a/docs/global.html b/docs/global.html index 4838a92ced..c71bc32473 100644 --- a/docs/global.html +++ b/docs/global.html @@ -143,7 +143,7 @@

        Grammar

        Source:
        @@ -274,7 +274,7 @@

        GrammarToken

        Source:
        @@ -559,7 +559,7 @@

        High
        Source:
        @@ -713,7 +713,7 @@

        HookCallb
        Source:
        diff --git a/docs/prism-core.js.html b/docs/prism-core.js.html index ed5112a7fd..f17df7f3dc 100644 --- a/docs/prism-core.js.html +++ b/docs/prism-core.js.html @@ -1037,10 +1037,18 @@

        prism-core.js

        if (removeCount > 1) { // at least one Token object was removed, so we have to do some rematching // this can only happen if the current pattern is greedy - matchGrammar(text, tokenList, grammar, currentNode.prev, pos, { + + /** @type {RematchOptions} */ + var nestedRematch = { cause: token + ',' + j, reach: reach - }); + }; + matchGrammar(text, tokenList, grammar, currentNode.prev, pos, nestedRematch); + + // the reach might have been extended because of the rematching + if (rematch && nestedRematch.reach > rematch.reach) { + rematch.reach = nestedRematch.reach; + } } } } diff --git a/prism.js b/prism.js index 03688507c1..fdc707a4cd 100644 --- a/prism.js +++ b/prism.js @@ -989,10 +989,18 @@ function matchGrammar(text, tokenList, grammar, startNode, startPos, rematch) { if (removeCount > 1) { // at least one Token object was removed, so we have to do some rematching // this can only happen if the current pattern is greedy - matchGrammar(text, tokenList, grammar, currentNode.prev, pos, { + + /** @type {RematchOptions} */ + var nestedRematch = { cause: token + ',' + j, reach: reach - }); + }; + matchGrammar(text, tokenList, grammar, currentNode.prev, pos, nestedRematch); + + // the reach might have been extended because of the rematching + if (rematch && nestedRematch.reach > rematch.reach) { + rematch.reach = nestedRematch.reach; + } } } } diff --git a/tests/languages/javascript/issue2694.test b/tests/languages/javascript/issue2694.test new file mode 100644 index 0000000000..53c06c9a2a --- /dev/null +++ b/tests/languages/javascript/issue2694.test @@ -0,0 +1,70 @@ +replace(/'/, `'`) + +const var1 = `this is fine`; +const var2 = `this is fine`; + +// `load bearing comment` + +const var3 = `break starts here`; +const var4 = `break ends here`; + +---------------------------------------------------- + +[ + ["function", "replace"], + ["punctuation", "("], + ["regex", [ + ["regex-delimiter", "/"], + ["regex-source", "'"], + ["regex-delimiter", "/"] + ]], + ["punctuation", ","], + ["template-string", [ + ["template-punctuation", "`"], + ["string", "'"], + ["template-punctuation", "`"] + ]], + ["punctuation", ")"], + + ["keyword", "const"], + " var1 ", + ["operator", "="], + ["template-string", [ + ["template-punctuation", "`"], + ["string", "this is fine"], + ["template-punctuation", "`"] + ]], + ["punctuation", ";"], + + ["keyword", "const"], + " var2 ", + ["operator", "="], + ["template-string", [ + ["template-punctuation", "`"], + ["string", "this is fine"], + ["template-punctuation", "`"] + ]], + ["punctuation", ";"], + + ["comment", "// `load bearing comment`"], + + ["keyword", "const"], + " var3 ", + ["operator", "="], + ["template-string", [ + ["template-punctuation", "`"], + ["string", "break starts here"], + ["template-punctuation", "`"] + ]], + ["punctuation", ";"], + + ["keyword", "const"], + " var4 ", + ["operator", "="], + ["template-string", [ + ["template-punctuation", "`"], + ["string", "break ends here"], + ["template-punctuation", "`"] + ]], + ["punctuation", ";"] +] \ No newline at end of file From bbc77d19e134caf3151ba364dc1703ed731ff150 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Sun, 24 Jan 2021 15:51:37 +0100 Subject: [PATCH 0718/1100] Added support for URIs (#2708) --- components.js | 2 +- components.json | 11 +- components/prism-http.js | 3 +- components/prism-http.min.js | 2 +- components/prism-uri.js | 96 +++++++++++ components/prism-uri.min.js | 1 + examples/prism-uri.html | 13 ++ plugins/autoloader/prism-autoloader.js | 1 + plugins/autoloader/prism-autoloader.min.js | 2 +- plugins/show-language/prism-show-language.js | 2 + .../show-language/prism-show-language.min.js | 2 +- .../http!+uri/request-line_feature.test | 162 ++++++++++++++++++ .../languages/http/request-line_feature.test | 116 +++---------- tests/languages/uri/authority_feature.test | 88 ++++++++++ tests/languages/uri/full.test | 124 ++++++++++++++ tests/languages/uri/query_feature.test | 78 +++++++++ tests/languages/uri/relative.test | 54 ++++++ tests/languages/uri/scheme_feature.test | 45 +++++ 18 files changed, 708 insertions(+), 94 deletions(-) create mode 100644 components/prism-uri.js create mode 100644 components/prism-uri.min.js create mode 100644 examples/prism-uri.html create mode 100644 tests/languages/http!+uri/request-line_feature.test create mode 100644 tests/languages/uri/authority_feature.test create mode 100644 tests/languages/uri/full.test create mode 100644 tests/languages/uri/query_feature.test create mode 100644 tests/languages/uri/relative.test create mode 100644 tests/languages/uri/scheme_feature.test diff --git a/components.js b/components.js index c622e503ab..d5cadb94dd 100644 --- a/components.js +++ b/components.js @@ -1,2 +1,2 @@ -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml","ssml","atom","rss"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","ssml":"SSML","atom":"Atom","rss":"RSS"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","optional":"regex","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"ABNF","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"agda":{"title":"Agda","owner":"xy-ren"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apex":{"title":"Apex","require":["clike","sql"],"owner":"RunDevelopment"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"dkern"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"birb":{"title":"Birb","require":"clike","owner":"Calamity210"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"BNF","alias":"rbnf","aliasTitles":{"rbnf":"RBNF"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"bsl":{"title":"BSL (1C:Enterprise)","alias":"oscript","aliasTitles":{"oscript":"OneScript"},"owner":"Diversus23"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"chaiscript":{"title":"ChaiScript","require":["clike","cpp"],"owner":"RunDevelopment"},"cil":{"title":"CIL","owner":"sbrl"},"clojure":{"title":"Clojure","owner":"troglotit"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"cypher":{"title":"Cypher","owner":"RunDevelopment"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dataweave":{"title":"DataWeave","owner":"machaval"},"dax":{"title":"DAX","owner":"peterbud"},"dhall":{"title":"Dhall","owner":"RunDevelopment"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"dot":{"title":"DOT (Graphviz)","alias":"gv","optional":"markup","owner":"RunDevelopment"},"ebnf":{"title":"EBNF","owner":"RunDevelopment"},"editorconfig":{"title":"EditorConfig","owner":"osipxd"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"c","owner":"Golmote"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","optional":["markdown"],"owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"hlsl":{"title":"HLSL","require":"c","owner":"RunDevelopment"},"http":{"title":"HTTP","optional":["css","javascript","json","markup"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"ignore":{"title":".ignore","owner":"osipxd","alias":["gitignore","hgignore","npmignore"],"aliasTitles":{"gitignore":".gitignore","hgignore":".hgignore","npmignore":".npmignore"}},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike","typescript"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","alias":"webmanifest","aliasTitles":{"webmanifest":"Web App Manifest"},"owner":"CupOfTea696"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"jsstacktrace":{"title":"JS stack trace","owner":"sbrl"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","alias":["kt","kts"],"aliasTitles":{"kts":"Kotlin Script"},"require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","optional":"yaml","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"mongodb":{"title":"MongoDB","owner":"airs0urce","require":"javascript"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"naniscript":{"title":"Naninovel Script","owner":"Elringus","alias":"nani"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":"markup-templating","owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"promql":{"title":"PromQL","owner":"arendjr"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"purebasic":{"title":"PureBasic","require":"clike","alias":"pbfasm","owner":"HeX0R101"},"purescript":{"title":"PureScript","require":"haskell","alias":"purs","owner":"sriharshachilakapati"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"racket":{"title":"Racket","require":"scheme","alias":"rkt","owner":"RunDevelopment"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","owner":"RunDevelopment"},"renpy":{"title":"Ren'py","alias":"rpy","owner":"HyuchiaDiego"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","alias":["sh-session","shellsession"],"owner":"RunDevelopment"},"smali":{"title":"Smali","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sml":{"title":"SML","alias":"smlnj","aliasTitles":{"smlnj":"SML/NJ"},"owner":"RunDevelopment"},"solidity":{"title":"Solidity (Ethereum)","alias":"sol","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"stan":{"title":"Stan","owner":"RunDevelopment"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","vbnet"],"owner":"RunDevelopment"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"typoscript":{"title":"TypoScript","alias":"tsconfig","aliasTitles":{"tsconfig":"TSConfig"},"owner":"dkern"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"v":{"title":"V","require":"clike","owner":"taggon"},"vala":{"title":"Vala","require":"clike","optional":"regex","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":["vb","vba"],"aliasTitles":{"vba":"VBA"},"owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xml-doc":{"title":"XML doc (.net)","require":"markup","modify":["csharp","fsharp","vbnet"],"owner":"RunDevelopment"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"yang":{"title":"YANG","owner":"RunDevelopment"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml","ssml","atom","rss"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","ssml":"SSML","atom":"Atom","rss":"RSS"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","optional":"regex","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"ABNF","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"agda":{"title":"Agda","owner":"xy-ren"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apex":{"title":"Apex","require":["clike","sql"],"owner":"RunDevelopment"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"dkern"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"birb":{"title":"Birb","require":"clike","owner":"Calamity210"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"BNF","alias":"rbnf","aliasTitles":{"rbnf":"RBNF"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"bsl":{"title":"BSL (1C:Enterprise)","alias":"oscript","aliasTitles":{"oscript":"OneScript"},"owner":"Diversus23"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"chaiscript":{"title":"ChaiScript","require":["clike","cpp"],"owner":"RunDevelopment"},"cil":{"title":"CIL","owner":"sbrl"},"clojure":{"title":"Clojure","owner":"troglotit"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"cypher":{"title":"Cypher","owner":"RunDevelopment"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dataweave":{"title":"DataWeave","owner":"machaval"},"dax":{"title":"DAX","owner":"peterbud"},"dhall":{"title":"Dhall","owner":"RunDevelopment"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"dot":{"title":"DOT (Graphviz)","alias":"gv","optional":"markup","owner":"RunDevelopment"},"ebnf":{"title":"EBNF","owner":"RunDevelopment"},"editorconfig":{"title":"EditorConfig","owner":"osipxd"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"c","owner":"Golmote"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","optional":["markdown"],"owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"hlsl":{"title":"HLSL","require":"c","owner":"RunDevelopment"},"http":{"title":"HTTP","optional":["css","javascript","json","markup","uri"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"ignore":{"title":".ignore","owner":"osipxd","alias":["gitignore","hgignore","npmignore"],"aliasTitles":{"gitignore":".gitignore","hgignore":".hgignore","npmignore":".npmignore"}},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike","typescript"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","alias":"webmanifest","aliasTitles":{"webmanifest":"Web App Manifest"},"owner":"CupOfTea696"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"jsstacktrace":{"title":"JS stack trace","owner":"sbrl"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","alias":["kt","kts"],"aliasTitles":{"kts":"Kotlin Script"},"require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","optional":"yaml","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"mongodb":{"title":"MongoDB","owner":"airs0urce","require":"javascript"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"naniscript":{"title":"Naninovel Script","owner":"Elringus","alias":"nani"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":"markup-templating","owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"promql":{"title":"PromQL","owner":"arendjr"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"purebasic":{"title":"PureBasic","require":"clike","alias":"pbfasm","owner":"HeX0R101"},"purescript":{"title":"PureScript","require":"haskell","alias":"purs","owner":"sriharshachilakapati"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"racket":{"title":"Racket","require":"scheme","alias":"rkt","owner":"RunDevelopment"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","owner":"RunDevelopment"},"renpy":{"title":"Ren'py","alias":"rpy","owner":"HyuchiaDiego"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","alias":["sh-session","shellsession"],"owner":"RunDevelopment"},"smali":{"title":"Smali","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sml":{"title":"SML","alias":"smlnj","aliasTitles":{"smlnj":"SML/NJ"},"owner":"RunDevelopment"},"solidity":{"title":"Solidity (Ethereum)","alias":"sol","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"stan":{"title":"Stan","owner":"RunDevelopment"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","vbnet"],"owner":"RunDevelopment"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"typoscript":{"title":"TypoScript","alias":"tsconfig","aliasTitles":{"tsconfig":"TSConfig"},"owner":"dkern"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"uri":{"title":"URI","alias":"url","aliasTitles":{"url":"URL"},"owner":"RunDevelopment"},"v":{"title":"V","require":"clike","owner":"taggon"},"vala":{"title":"Vala","require":"clike","optional":"regex","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":["vb","vba"],"aliasTitles":{"vba":"VBA"},"owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xml-doc":{"title":"XML doc (.net)","require":"markup","modify":["csharp","fsharp","vbnet"],"owner":"RunDevelopment"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"yang":{"title":"YANG","owner":"RunDevelopment"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; if (typeof module !== 'undefined' && module.exports) { module.exports = components; } \ No newline at end of file diff --git a/components.json b/components.json index e166e8ab44..626758a184 100644 --- a/components.json +++ b/components.json @@ -501,7 +501,8 @@ "css", "javascript", "json", - "markup" + "markup", + "uri" ], "owner": "danielgtaylor" }, @@ -1210,6 +1211,14 @@ "alias": ["uscript", "uc"], "owner": "RunDevelopment" }, + "uri": { + "title": "URI", + "alias": "url", + "aliasTitles": { + "url": "URL" + }, + "owner": "RunDevelopment" + }, "v": { "title": "V", "require": "clike", diff --git a/components/prism-http.js b/components/prism-http.js index 4b8bb84db1..d8310a72a8 100644 --- a/components/prism-http.js +++ b/components/prism-http.js @@ -12,7 +12,8 @@ 'request-target': { pattern: /^(\s)(?:https?:\/\/|\/)\S*(?=\s)/, lookbehind: true, - alias: 'url' + alias: 'url', + inside: Prism.languages.uri }, // HTTP Version 'http-version': { diff --git a/components/prism-http.min.js b/components/prism-http.min.js index 6df7aaf172..955fbc5f63 100644 --- a/components/prism-http.min.js +++ b/components/prism-http.min.js @@ -1 +1 @@ -!function(t){t.languages.http={"request-line":{pattern:/^(?:GET|HEAD|POST|PUT|DELETE|CONNECT|OPTIONS|TRACE|PATCH|PRI|SEARCH)\s(?:https?:\/\/|\/)\S*\sHTTP\/[0-9.]+/m,inside:{method:{pattern:/^[A-Z]+\b/,alias:"property"},"request-target":{pattern:/^(\s)(?:https?:\/\/|\/)\S*(?=\s)/,lookbehind:!0,alias:"url"},"http-version":{pattern:/^(\s)HTTP\/[0-9.]+/,lookbehind:!0,alias:"property"}}},"response-status":{pattern:/^HTTP\/[0-9.]+ \d+ .+/m,inside:{"http-version":{pattern:/^HTTP\/[0-9.]+/,alias:"property"},"status-code":{pattern:/^(\s)\d+(?=\s)/,lookbehind:!0,alias:"number"},"reason-phrase":{pattern:/^(\s).+/,lookbehind:!0,alias:"string"}}},"header-name":{pattern:/^[\w-]+:(?=.)/m,alias:"keyword"}};var a,e,s,n=t.languages,r={"application/javascript":n.javascript,"application/json":n.json||n.javascript,"application/xml":n.xml,"text/xml":n.xml,"text/html":n.html,"text/css":n.css},i={"application/json":!0,"application/xml":!0};for(var p in r)if(r[p]){a=a||{};var o=i[p]?(void 0,s=(e=p).replace(/^[a-z]+\//,""),"(?:"+e+"|\\w+/(?:[\\w.-]+\\+)+"+s+"(?![+\\w.-]))"):p;a[p.replace(/\//g,"-")]={pattern:RegExp("(content-type:\\s*"+o+".*)(?:\\r?\\n|\\r){2}[\\s\\S]*","i"),lookbehind:!0,inside:r[p]}}a&&t.languages.insertBefore("http","header-name",a)}(Prism); \ No newline at end of file +!function(t){t.languages.http={"request-line":{pattern:/^(?:GET|HEAD|POST|PUT|DELETE|CONNECT|OPTIONS|TRACE|PATCH|PRI|SEARCH)\s(?:https?:\/\/|\/)\S*\sHTTP\/[0-9.]+/m,inside:{method:{pattern:/^[A-Z]+\b/,alias:"property"},"request-target":{pattern:/^(\s)(?:https?:\/\/|\/)\S*(?=\s)/,lookbehind:!0,alias:"url",inside:t.languages.uri},"http-version":{pattern:/^(\s)HTTP\/[0-9.]+/,lookbehind:!0,alias:"property"}}},"response-status":{pattern:/^HTTP\/[0-9.]+ \d+ .+/m,inside:{"http-version":{pattern:/^HTTP\/[0-9.]+/,alias:"property"},"status-code":{pattern:/^(\s)\d+(?=\s)/,lookbehind:!0,alias:"number"},"reason-phrase":{pattern:/^(\s).+/,lookbehind:!0,alias:"string"}}},"header-name":{pattern:/^[\w-]+:(?=.)/m,alias:"keyword"}};var a,e,s,n=t.languages,i={"application/javascript":n.javascript,"application/json":n.json||n.javascript,"application/xml":n.xml,"text/xml":n.xml,"text/html":n.html,"text/css":n.css},r={"application/json":!0,"application/xml":!0};for(var p in i)if(i[p]){a=a||{};var o=r[p]?(void 0,s=(e=p).replace(/^[a-z]+\//,""),"(?:"+e+"|\\w+/(?:[\\w.-]+\\+)+"+s+"(?![+\\w.-]))"):p;a[p.replace(/\//g,"-")]={pattern:RegExp("(content-type:\\s*"+o+".*)(?:\\r?\\n|\\r){2}[\\s\\S]*","i"),lookbehind:!0,inside:i[p]}}a&&t.languages.insertBefore("http","header-name",a)}(Prism); \ No newline at end of file diff --git a/components/prism-uri.js b/components/prism-uri.js new file mode 100644 index 0000000000..cdbf8dba3b --- /dev/null +++ b/components/prism-uri.js @@ -0,0 +1,96 @@ +// https://tools.ietf.org/html/rfc3986#appendix-A + +Prism.languages.uri = { + 'scheme': { + pattern: /^[a-z][a-z0-9+.-]*:/im, + greedy: true, + inside: { + 'scheme-delimiter': /:$/ + } + }, + 'fragment': { + pattern: /#[\w\-.~!$&'()*+,;=%:@/?]*/, + inside: { + 'fragment-delimiter': /^#/ + } + }, + 'query': { + pattern: /\?[\w\-.~!$&'()*+,;=%:@/?]*/, + inside: { + 'query-delimiter': { + pattern: /^\?/, + greedy: true + }, + 'pair-delimiter': /[&;]/, + 'pair': { + pattern: /^[^=][\s\S]*/, + inside: { + 'key': /^[^=]+/, + 'value': { + pattern: /(^=)[\s\S]+/, + lookbehind: true + } + } + } + } + }, + 'authority': { + pattern: RegExp( + /^\/\//.source + // [ userinfo "@" ] + + /(?:[\w\-.~!$&'()*+,;=%:]*@)?/.source + // host + + ( + '(?:' + // IP-literal + + /\[(?:[0-9a-fA-F:.]{2,48}|v[0-9a-fA-F]+\.[\w\-.~!$&'()*+,;=]+)\]/.source + + '|' + // IPv4address or registered name + + /[\w\-.~!$&'()*+,;=%]*/.source + + ')' + ) + // [ ":" port ] + + /(?::\d*)?/.source, + 'm' + ), + inside: { + 'authority-delimiter': /^\/\//, + 'user-info-segment': { + pattern: /^[\w\-.~!$&'()*+,;=%:]*@/, + inside: { + 'user-info-delimiter': /@$/, + 'user-info': /^[\w\-.~!$&'()*+,;=%:]+/ + } + }, + 'port-segment': { + pattern: /:\d*$/, + inside: { + 'port-delimiter': /^:/, + 'port': /^\d+/ + } + }, + 'host': { + pattern: /[\s\S]+/, + inside: { + 'ip-literal': { + pattern: /^\[[\s\S]+\]$/, + inside: { + 'ip-literal-delimiter': /^\[|\]$/, + 'ipv-future': /^v[\s\S]+/, + 'ipv6-address': /^[\s\S]+/ + } + }, + 'ipv4-address': /^(?:(?:[03-9]\d?|[12]\d{0,2})\.){3}(?:[03-9]\d?|[12]{0,2})$/ + } + } + } + }, + 'path': { + pattern: /^[\w\-.~!$&'()*+,;=%:@/]+/m, + inside: { + 'path-separator': /\// + } + } +}; + +Prism.languages.url = Prism.languages.uri; diff --git a/components/prism-uri.min.js b/components/prism-uri.min.js new file mode 100644 index 0000000000..aecc7c8ff0 --- /dev/null +++ b/components/prism-uri.min.js @@ -0,0 +1 @@ +Prism.languages.uri={scheme:{pattern:/^[a-z][a-z0-9+.-]*:/im,greedy:!0,inside:{"scheme-delimiter":/:$/}},fragment:{pattern:/#[\w\-.~!$&'()*+,;=%:@/?]*/,inside:{"fragment-delimiter":/^#/}},query:{pattern:/\?[\w\-.~!$&'()*+,;=%:@/?]*/,inside:{"query-delimiter":{pattern:/^\?/,greedy:!0},"pair-delimiter":/[&;]/,pair:{pattern:/^[^=][\s\S]*/,inside:{key:/^[^=]+/,value:{pattern:/(^=)[\s\S]+/,lookbehind:!0}}}}},authority:{pattern:RegExp("^//(?:[\\w\\-.~!$&'()*+,;=%:]*@)?(?:\\[(?:[0-9a-fA-F:.]{2,48}|v[0-9a-fA-F]+\\.[\\w\\-.~!$&'()*+,;=]+)\\]|[\\w\\-.~!$&'()*+,;=%]*)(?::\\d*)?","m"),inside:{"authority-delimiter":/^\/\//,"user-info-segment":{pattern:/^[\w\-.~!$&'()*+,;=%:]*@/,inside:{"user-info-delimiter":/@$/,"user-info":/^[\w\-.~!$&'()*+,;=%:]+/}},"port-segment":{pattern:/:\d*$/,inside:{"port-delimiter":/^:/,port:/^\d+/}},host:{pattern:/[\s\S]+/,inside:{"ip-literal":{pattern:/^\[[\s\S]+\]$/,inside:{"ip-literal-delimiter":/^\[|\]$/,"ipv-future":/^v[\s\S]+/,"ipv6-address":/^[\s\S]+/}},"ipv4-address":/^(?:(?:[03-9]\d?|[12]\d{0,2})\.){3}(?:[03-9]\d?|[12]{0,2})$/}}}},path:{pattern:/^[\w\-.~!$&'()*+,;=%:@/]+/m,inside:{"path-separator":/\//}}},Prism.languages.url=Prism.languages.uri; \ No newline at end of file diff --git a/examples/prism-uri.html b/examples/prism-uri.html new file mode 100644 index 0000000000..da6dc04bec --- /dev/null +++ b/examples/prism-uri.html @@ -0,0 +1,13 @@ +

        Full example

        +
        https://john.doe@www.example.com:123/forum/questions/?tag=networking&order=newest#top
        +https://example.com/path/resource.txt#fragment
        +ldap://[2001:db8::7]/c=GB?objectClass?one
        +mailto:John.Doe@example.com
        +news:comp.infosystems.www.servers.unix
        +tel:+1-816-555-1212
        +telnet://192.0.2.16:80/
        +urn:oasis:names:specification:docbook:dtd:xml:4.1.2
        +//example.com/path/resource.txt
        +/path/resource.txt
        +path/resource.txt
        +
        diff --git a/plugins/autoloader/prism-autoloader.js b/plugins/autoloader/prism-autoloader.js index 57d6f7f53e..78e46e0ba8 100644 --- a/plugins/autoloader/prism-autoloader.js +++ b/plugins/autoloader/prism-autoloader.js @@ -224,6 +224,7 @@ "tsconfig": "typoscript", "uscript": "unrealscript", "uc": "unrealscript", + "url": "uri", "vb": "visual-basic", "vba": "visual-basic", "xeoracube": "xeora", diff --git a/plugins/autoloader/prism-autoloader.min.js b/plugins/autoloader/prism-autoloader.min.js index 82872e3970..aa4eb62478 100644 --- a/plugins/autoloader/prism-autoloader.min.js +++ b/plugins/autoloader/prism-autoloader.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof self&&self.Prism&&self.document&&document.createElement){var l={javascript:"clike",actionscript:"javascript",apex:["clike","sql"],arduino:"cpp",aspnet:["markup","csharp"],birb:"clike",bison:"c",c:"clike",csharp:"clike",cpp:"c",chaiscript:["clike","cpp"],coffeescript:"javascript",crystal:"ruby","css-extras":"css",d:"clike",dart:"clike",django:"markup-templating",ejs:["javascript","markup-templating"],etlua:["lua","markup-templating"],erb:["ruby","markup-templating"],fsharp:"clike","firestore-security-rules":"clike",flow:"javascript",ftl:"markup-templating",gml:"clike",glsl:"c",go:"clike",groovy:"clike",haml:"ruby",handlebars:"markup-templating",haxe:"clike",hlsl:"c",java:"clike",javadoc:["markup","java","javadoclike"],jolie:"clike",jsdoc:["javascript","javadoclike","typescript"],"js-extras":"javascript",json5:"json",jsonp:"json","js-templates":"javascript",kotlin:"clike",latte:["clike","markup-templating","php"],less:"css",lilypond:"scheme",markdown:"markup","markup-templating":"markup",mongodb:"javascript",n4js:"javascript",nginx:"clike",objectivec:"c",opencl:"c",parser:"markup",php:"markup-templating",phpdoc:["php","javadoclike"],"php-extras":"php",plsql:"sql",processing:"clike",protobuf:"clike",pug:["markup","javascript"],purebasic:"clike",purescript:"haskell",qml:"javascript",qore:"clike",racket:"scheme",jsx:["markup","javascript"],tsx:["jsx","typescript"],reason:"clike",ruby:"clike",sass:"css",scss:"css",scala:"java","shell-session":"bash",smarty:"markup-templating",solidity:"clike",soy:"markup-templating",sparql:"turtle",sqf:"clike",swift:"clike","t4-cs":["t4-templating","csharp"],"t4-vb":["t4-templating","vbnet"],tap:"yaml",tt2:["clike","markup-templating"],textile:"markup",twig:"markup",typescript:"javascript",v:"clike",vala:"clike",vbnet:"basic",velocity:"markup",wiki:"markup",xeora:"markup","xml-doc":"markup",xquery:"markup"},n={html:"markup",xml:"markup",svg:"markup",mathml:"markup",ssml:"markup",atom:"markup",rss:"markup",js:"javascript",g4:"antlr4",adoc:"asciidoc",shell:"bash",shortcode:"bbcode",rbnf:"bnf",oscript:"bsl",cs:"csharp",dotnet:"csharp",coffee:"coffeescript",conc:"concurnas",jinja2:"django","dns-zone":"dns-zone-file",dockerfile:"docker",gv:"dot",eta:"ejs",xlsx:"excel-formula",xls:"excel-formula",gamemakerlanguage:"gml",hs:"haskell",gitignore:"ignore",hgignore:"ignore",npmignore:"ignore",webmanifest:"json",kt:"kotlin",kts:"kotlin",tex:"latex",context:"latex",ly:"lilypond",emacs:"lisp",elisp:"lisp","emacs-lisp":"lisp",md:"markdown",moon:"moonscript",n4jsd:"n4js",nani:"naniscript",objc:"objectivec",objectpascal:"pascal",px:"pcaxis",pcode:"peoplecode",pq:"powerquery",mscript:"powerquery",pbfasm:"purebasic",purs:"purescript",py:"python",rkt:"racket",rpy:"renpy",robot:"robotframework",rb:"ruby","sh-session":"shell-session",shellsession:"shell-session",smlnj:"sml",sol:"solidity",sln:"solution-file",rq:"sparql",t4:"t4-cs",trig:"turtle",ts:"typescript",tsconfig:"typoscript",uscript:"unrealscript",uc:"unrealscript",vb:"visual-basic",vba:"visual-basic",xeoracube:"xeora",yml:"yaml"},p={},e="components/",a=Prism.util.currentScript();if(a){var r=/\bplugins\/autoloader\/prism-autoloader\.(?:min\.)?js(?:\?[^\r\n/]*)?$/i,s=/(^|\/)[\w-]+\.(?:min\.)?js(?:\?[^\r\n/]*)?$/i,t=a.getAttribute("data-autoloader-path");if(null!=t)e=t.trim().replace(/\/?$/,"/");else{var i=a.src;r.test(i)?e=i.replace(r,"components/"):s.test(i)&&(e=i.replace(s,"$1components/"))}}var o=Prism.plugins.autoloader={languages_path:e,use_minified:!0,loadLanguages:m};Prism.hooks.add("complete",function(e){var a=e.element,r=e.language;if(a&&r&&"none"!==r){var s=function(e){var a=(e.getAttribute("data-dependencies")||"").trim();if(!a){var r=e.parentElement;r&&"pre"===r.tagName.toLowerCase()&&(a=(r.getAttribute("data-dependencies")||"").trim())}return a?a.split(/\s*,\s*/g):[]}(a);/^diff-./i.test(r)?(s.push("diff"),s.push(r.substr("diff-".length))):s.push(r),s.every(u)||m(s,function(){Prism.highlightElement(a)})}})}function u(e){if(0<=e.indexOf("!"))return!1;if((e=n[e]||e)in Prism.languages)return!0;var a=p[e];return a&&!a.error&&!1===a.loading}function m(e,a,r){"string"==typeof e&&(e=[e]);var s=e.length,t=0,i=!1;function c(){i||++t===s&&a&&a(e)}0!==s?e.forEach(function(e){!function(a,r,s){var t=0<=a.indexOf("!");function e(){var e=p[a];e||(e=p[a]={callbacks:[]}),e.callbacks.push({success:r,error:s}),!t&&u(a)?k(a,"success"):!t&&e.error?k(a,"error"):!t&&e.loading||(e.loading=!0,e.error=!1,function(e,a,r){var s=document.createElement("script");s.src=e,s.async=!0,s.onload=function(){document.body.removeChild(s),a&&a()},s.onerror=function(){document.body.removeChild(s),r&&r()},document.body.appendChild(s)}(function(e){return o.languages_path+"prism-"+e+(o.use_minified?".min":"")+".js"}(a),function(){e.loading=!1,k(a,"success")},function(){e.loading=!1,e.error=!0,k(a,"error")}))}a=a.replace("!",""),a=n[a]||a;var i=l[a];i&&i.length?m(i,e,s):e()}(e,c,function(){i||(i=!0,r&&r(e))})}):a&&setTimeout(a,0)}function k(e,a){if(p[e]){for(var r=p[e].callbacks,s=0,t=r.length;s Date: Wed, 27 Jan 2021 21:13:03 +0100 Subject: [PATCH 0719/1100] Added support for PSL, PATROL Scripting Language (#2739) --- components.js | 2 +- components.json | 4 + components/prism-psl.js | 36 ++ components/prism-psl.min.js | 1 + examples/prism-psl.html | 43 ++ plugins/show-language/prism-show-language.js | 1 + .../show-language/prism-show-language.min.js | 2 +- tests/languages/psl/builtin_feature.test | 369 ++++++++++++++++++ tests/languages/psl/comment_feature.test | 23 ++ tests/languages/psl/constant_feature.test | 107 +++++ .../psl/function-foreach_feature.test | 37 ++ tests/languages/psl/heredoc_feature.test | 21 + tests/languages/psl/keyword_feature.test | 55 +++ tests/languages/psl/number_feature.test | 23 ++ tests/languages/psl/operator_feature.test | 189 +++++++++ tests/languages/psl/overall_feature.test | 60 +++ tests/languages/psl/string_feature.test | 32 ++ tests/languages/psl/variable_feature.test | 15 + 18 files changed, 1018 insertions(+), 2 deletions(-) create mode 100644 components/prism-psl.js create mode 100644 components/prism-psl.min.js create mode 100644 examples/prism-psl.html create mode 100644 tests/languages/psl/builtin_feature.test create mode 100644 tests/languages/psl/comment_feature.test create mode 100644 tests/languages/psl/constant_feature.test create mode 100644 tests/languages/psl/function-foreach_feature.test create mode 100644 tests/languages/psl/heredoc_feature.test create mode 100644 tests/languages/psl/keyword_feature.test create mode 100644 tests/languages/psl/number_feature.test create mode 100644 tests/languages/psl/operator_feature.test create mode 100644 tests/languages/psl/overall_feature.test create mode 100644 tests/languages/psl/string_feature.test create mode 100644 tests/languages/psl/variable_feature.test diff --git a/components.js b/components.js index d5cadb94dd..0c40b4c2b6 100644 --- a/components.js +++ b/components.js @@ -1,2 +1,2 @@ -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml","ssml","atom","rss"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","ssml":"SSML","atom":"Atom","rss":"RSS"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","optional":"regex","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"ABNF","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"agda":{"title":"Agda","owner":"xy-ren"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apex":{"title":"Apex","require":["clike","sql"],"owner":"RunDevelopment"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"dkern"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"birb":{"title":"Birb","require":"clike","owner":"Calamity210"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"BNF","alias":"rbnf","aliasTitles":{"rbnf":"RBNF"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"bsl":{"title":"BSL (1C:Enterprise)","alias":"oscript","aliasTitles":{"oscript":"OneScript"},"owner":"Diversus23"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"chaiscript":{"title":"ChaiScript","require":["clike","cpp"],"owner":"RunDevelopment"},"cil":{"title":"CIL","owner":"sbrl"},"clojure":{"title":"Clojure","owner":"troglotit"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"cypher":{"title":"Cypher","owner":"RunDevelopment"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dataweave":{"title":"DataWeave","owner":"machaval"},"dax":{"title":"DAX","owner":"peterbud"},"dhall":{"title":"Dhall","owner":"RunDevelopment"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"dot":{"title":"DOT (Graphviz)","alias":"gv","optional":"markup","owner":"RunDevelopment"},"ebnf":{"title":"EBNF","owner":"RunDevelopment"},"editorconfig":{"title":"EditorConfig","owner":"osipxd"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"c","owner":"Golmote"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","optional":["markdown"],"owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"hlsl":{"title":"HLSL","require":"c","owner":"RunDevelopment"},"http":{"title":"HTTP","optional":["css","javascript","json","markup","uri"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"ignore":{"title":".ignore","owner":"osipxd","alias":["gitignore","hgignore","npmignore"],"aliasTitles":{"gitignore":".gitignore","hgignore":".hgignore","npmignore":".npmignore"}},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike","typescript"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","alias":"webmanifest","aliasTitles":{"webmanifest":"Web App Manifest"},"owner":"CupOfTea696"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"jsstacktrace":{"title":"JS stack trace","owner":"sbrl"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","alias":["kt","kts"],"aliasTitles":{"kts":"Kotlin Script"},"require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","optional":"yaml","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"mongodb":{"title":"MongoDB","owner":"airs0urce","require":"javascript"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"naniscript":{"title":"Naninovel Script","owner":"Elringus","alias":"nani"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":"markup-templating","owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"promql":{"title":"PromQL","owner":"arendjr"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"purebasic":{"title":"PureBasic","require":"clike","alias":"pbfasm","owner":"HeX0R101"},"purescript":{"title":"PureScript","require":"haskell","alias":"purs","owner":"sriharshachilakapati"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"racket":{"title":"Racket","require":"scheme","alias":"rkt","owner":"RunDevelopment"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","owner":"RunDevelopment"},"renpy":{"title":"Ren'py","alias":"rpy","owner":"HyuchiaDiego"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","alias":["sh-session","shellsession"],"owner":"RunDevelopment"},"smali":{"title":"Smali","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sml":{"title":"SML","alias":"smlnj","aliasTitles":{"smlnj":"SML/NJ"},"owner":"RunDevelopment"},"solidity":{"title":"Solidity (Ethereum)","alias":"sol","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"stan":{"title":"Stan","owner":"RunDevelopment"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","vbnet"],"owner":"RunDevelopment"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"typoscript":{"title":"TypoScript","alias":"tsconfig","aliasTitles":{"tsconfig":"TSConfig"},"owner":"dkern"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"uri":{"title":"URI","alias":"url","aliasTitles":{"url":"URL"},"owner":"RunDevelopment"},"v":{"title":"V","require":"clike","owner":"taggon"},"vala":{"title":"Vala","require":"clike","optional":"regex","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":["vb","vba"],"aliasTitles":{"vba":"VBA"},"owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xml-doc":{"title":"XML doc (.net)","require":"markup","modify":["csharp","fsharp","vbnet"],"owner":"RunDevelopment"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"yang":{"title":"YANG","owner":"RunDevelopment"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml","ssml","atom","rss"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","ssml":"SSML","atom":"Atom","rss":"RSS"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","optional":"regex","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"ABNF","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"agda":{"title":"Agda","owner":"xy-ren"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apex":{"title":"Apex","require":["clike","sql"],"owner":"RunDevelopment"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"dkern"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"birb":{"title":"Birb","require":"clike","owner":"Calamity210"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"BNF","alias":"rbnf","aliasTitles":{"rbnf":"RBNF"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"bsl":{"title":"BSL (1C:Enterprise)","alias":"oscript","aliasTitles":{"oscript":"OneScript"},"owner":"Diversus23"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"chaiscript":{"title":"ChaiScript","require":["clike","cpp"],"owner":"RunDevelopment"},"cil":{"title":"CIL","owner":"sbrl"},"clojure":{"title":"Clojure","owner":"troglotit"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"cypher":{"title":"Cypher","owner":"RunDevelopment"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dataweave":{"title":"DataWeave","owner":"machaval"},"dax":{"title":"DAX","owner":"peterbud"},"dhall":{"title":"Dhall","owner":"RunDevelopment"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"dot":{"title":"DOT (Graphviz)","alias":"gv","optional":"markup","owner":"RunDevelopment"},"ebnf":{"title":"EBNF","owner":"RunDevelopment"},"editorconfig":{"title":"EditorConfig","owner":"osipxd"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"c","owner":"Golmote"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","optional":["markdown"],"owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"hlsl":{"title":"HLSL","require":"c","owner":"RunDevelopment"},"http":{"title":"HTTP","optional":["css","javascript","json","markup","uri"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"ignore":{"title":".ignore","owner":"osipxd","alias":["gitignore","hgignore","npmignore"],"aliasTitles":{"gitignore":".gitignore","hgignore":".hgignore","npmignore":".npmignore"}},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike","typescript"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","alias":"webmanifest","aliasTitles":{"webmanifest":"Web App Manifest"},"owner":"CupOfTea696"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"jsstacktrace":{"title":"JS stack trace","owner":"sbrl"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","alias":["kt","kts"],"aliasTitles":{"kts":"Kotlin Script"},"require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","optional":"yaml","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"mongodb":{"title":"MongoDB","owner":"airs0urce","require":"javascript"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"naniscript":{"title":"Naninovel Script","owner":"Elringus","alias":"nani"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"psl":{"title":"PATROL Scripting Language","owner":"bertysentry"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":"markup-templating","owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"promql":{"title":"PromQL","owner":"arendjr"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"purebasic":{"title":"PureBasic","require":"clike","alias":"pbfasm","owner":"HeX0R101"},"purescript":{"title":"PureScript","require":"haskell","alias":"purs","owner":"sriharshachilakapati"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"racket":{"title":"Racket","require":"scheme","alias":"rkt","owner":"RunDevelopment"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","owner":"RunDevelopment"},"renpy":{"title":"Ren'py","alias":"rpy","owner":"HyuchiaDiego"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","alias":["sh-session","shellsession"],"owner":"RunDevelopment"},"smali":{"title":"Smali","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sml":{"title":"SML","alias":"smlnj","aliasTitles":{"smlnj":"SML/NJ"},"owner":"RunDevelopment"},"solidity":{"title":"Solidity (Ethereum)","alias":"sol","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"stan":{"title":"Stan","owner":"RunDevelopment"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","vbnet"],"owner":"RunDevelopment"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"typoscript":{"title":"TypoScript","alias":"tsconfig","aliasTitles":{"tsconfig":"TSConfig"},"owner":"dkern"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"uri":{"title":"URI","alias":"url","aliasTitles":{"url":"URL"},"owner":"RunDevelopment"},"v":{"title":"V","require":"clike","owner":"taggon"},"vala":{"title":"Vala","require":"clike","optional":"regex","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":["vb","vba"],"aliasTitles":{"vba":"VBA"},"owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xml-doc":{"title":"XML doc (.net)","require":"markup","modify":["csharp","fsharp","vbnet"],"owner":"RunDevelopment"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"yang":{"title":"YANG","owner":"RunDevelopment"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; if (typeof module !== 'undefined' && module.exports) { module.exports = components; } \ No newline at end of file diff --git a/components.json b/components.json index 626758a184..99fb66ec17 100644 --- a/components.json +++ b/components.json @@ -843,6 +843,10 @@ "title": "Pascaligo", "owner": "DefinitelyNotAGoat" }, + "psl": { + "title": "PATROL Scripting Language", + "owner": "bertysentry" + }, "pcaxis": { "title": "PC-Axis", "alias": "px", diff --git a/components/prism-psl.js b/components/prism-psl.js new file mode 100644 index 0000000000..a62635ed87 --- /dev/null +++ b/components/prism-psl.js @@ -0,0 +1,36 @@ +Prism.languages.psl = { + 'comment': { + pattern: /#.*/, + greedy: true + }, + 'string': { + pattern: /"(?:\\.|[^\\"])*"/, + greedy: true, + inside: { + 'symbol': /\\[ntrbA-Z"\\]/ + } + }, + 'heredoc-string': { + pattern: /<<<([a-zA-Z_]\w*)[\r\n](?:.*[\r\n])*?\1\b/, + alias: 'string', + greedy: true + }, + 'keyword': /\b(?:__multi|__single|case|default|do|else|elsif|exit|export|for|foreach|function|if|last|line|local|next|requires|return|switch|until|while|word)\b/, + 'constant': /\b(?:ALARM|CHART_ADD_GRAPH|CHART_DELETE_GRAPH|CHART_DESTROY|CHART_LOAD|CHART_PRINT|EOF|FALSE|False|false|NO|No|no|OFFLINE|OK|PSL_PROF_LOG|R_CHECK_HORIZ|R_CHECK_VERT|R_CLICKER|R_COLUMN|R_FRAME|R_ICON|R_LABEL|R_LABEL_CENTER|R_LIST_MULTIPLE|R_LIST_MULTIPLE_ND|R_LIST_SINGLE|R_LIST_SINGLE_ND|R_MENU|R_POPUP|R_POPUP_SCROLLED|R_RADIO_HORIZ|R_RADIO_VERT|R_ROW|R_SCALE_HORIZ|R_SCALE_VERT|R_SPINNER|R_TEXT_FIELD|R_TEXT_FIELD_LABEL|R_TOGGLE|TRIM_LEADING|TRIM_LEADING_AND_TRAILING|TRIM_REDUNDANT|TRIM_TRAILING|TRUE|True|true|VOID|WARN)\b/, + 'variable': /\b(?:errno|exit_status|PslDebug)\b/, + 'builtin': { + pattern: /\b(?:acos|add_diary|annotate|annotate_get|asctime|asin|atan|atexit|ascii_to_ebcdic|batch_set|blackout|cat|ceil|chan_exists|change_state|close|code_cvt|cond_signal|cond_wait|console_type|convert_base|convert_date|convert_locale_date|cos|cosh|create|destroy_lock|dump_hist|date|destroy|difference|dget_text|dcget_text|ebcdic_to_ascii|encrypt|event_archive|event_catalog_get|event_check|event_query|event_range_manage|event_range_query|event_report|event_schedule|event_trigger|event_trigger2|execute|exists|exp|fabs|floor|fmod|full_discovery|file|fopen|ftell|fseek|grep|get_vars|getenv|get|get_chan_info|get_ranges|get_text|gethostinfo|getpid|getpname|history_get_retention|history|index|int|is_var|intersection|isnumber|internal|in_transition|join|kill|length|lines|lock|lock_info|log|loge|log10|matchline|msg_check|msg_get_format|msg_get_severity|msg_printf|msg_sprintf|ntharg|num_consoles|nthargf|nthline|nthlinef|num_bytes|print|proc_exists|process|popen|printf|pconfig|poplines|pow|PslExecute|PslFunctionCall|PslFunctionExists|PslSetOptions|random|read|readln|refresh_parameters|remote_check|remote_close|remote_event_query|remote_event_trigger|remote_file_send|remote_open|remove|replace|rindex|sec_check_priv|sec_store_get|sec_store_set|set_alarm_ranges|set_locale|share|sin|sinh|sleep|sopen|sqrt|srandom|subset|set|substr|system|sprintf|sort|subset|snmp_agent_config|_snmp_debug|snmp_agent_stop|snmp_agent_start|snmp_h_set|snmp_h_get_next|snmp_h_get|snmp_set|snmp_walk|snmp_get_next|snmp_get|snmp_config|snmp_close|snmp_open|snmp_trap_receive|snmp_trap_ignore|snmp_trap_listen|snmp_trap_send|snmp_trap_raise_std_trap|snmp_trap_register_im|splitline|strcasecmp|str_repeat|trim|tail|tan|tanh|time|tmpnam|tolower|toupper|trace_psl_process|text_domain|unlock|unique|union|unset|va_arg|va_start|write)\b/, + alias: 'builtin-function' + }, + 'foreach-variable': { + pattern: /(\bforeach\s+(?:(?:\w+\b|"(?:\\.|[^\\"])*")\s+){0,2})[_a-zA-Z]\w*(?=\s*\()/, + lookbehind: true, + greedy: true + }, + 'function': { + pattern: /\b[_a-z]\w*\b(?=\s*\()/i, + }, + 'number': /\b(?:0x[0-9a-f]+|[0-9]+(?:\.[0-9]+)?)\b/i, + 'operator': /--|\+\+|&&=?|\|\|=?|<<=?|>>=?|[=!]~|[-+*/%&|^!=<>]=?|\.|[:?]/, + 'punctuation': /[(){}\[\];,]/ +}; diff --git a/components/prism-psl.min.js b/components/prism-psl.min.js new file mode 100644 index 0000000000..6ba8696797 --- /dev/null +++ b/components/prism-psl.min.js @@ -0,0 +1 @@ +Prism.languages.psl={comment:{pattern:/#.*/,greedy:!0},string:{pattern:/"(?:\\.|[^\\"])*"/,greedy:!0,inside:{symbol:/\\[ntrbA-Z"\\]/}},"heredoc-string":{pattern:/<<<([a-zA-Z_]\w*)[\r\n](?:.*[\r\n])*?\1\b/,alias:"string",greedy:!0},keyword:/\b(?:__multi|__single|case|default|do|else|elsif|exit|export|for|foreach|function|if|last|line|local|next|requires|return|switch|until|while|word)\b/,constant:/\b(?:ALARM|CHART_ADD_GRAPH|CHART_DELETE_GRAPH|CHART_DESTROY|CHART_LOAD|CHART_PRINT|EOF|FALSE|False|false|NO|No|no|OFFLINE|OK|PSL_PROF_LOG|R_CHECK_HORIZ|R_CHECK_VERT|R_CLICKER|R_COLUMN|R_FRAME|R_ICON|R_LABEL|R_LABEL_CENTER|R_LIST_MULTIPLE|R_LIST_MULTIPLE_ND|R_LIST_SINGLE|R_LIST_SINGLE_ND|R_MENU|R_POPUP|R_POPUP_SCROLLED|R_RADIO_HORIZ|R_RADIO_VERT|R_ROW|R_SCALE_HORIZ|R_SCALE_VERT|R_SPINNER|R_TEXT_FIELD|R_TEXT_FIELD_LABEL|R_TOGGLE|TRIM_LEADING|TRIM_LEADING_AND_TRAILING|TRIM_REDUNDANT|TRIM_TRAILING|TRUE|True|true|VOID|WARN)\b/,variable:/\b(?:errno|exit_status|PslDebug)\b/,builtin:{pattern:/\b(?:acos|add_diary|annotate|annotate_get|asctime|asin|atan|atexit|ascii_to_ebcdic|batch_set|blackout|cat|ceil|chan_exists|change_state|close|code_cvt|cond_signal|cond_wait|console_type|convert_base|convert_date|convert_locale_date|cos|cosh|create|destroy_lock|dump_hist|date|destroy|difference|dget_text|dcget_text|ebcdic_to_ascii|encrypt|event_archive|event_catalog_get|event_check|event_query|event_range_manage|event_range_query|event_report|event_schedule|event_trigger|event_trigger2|execute|exists|exp|fabs|floor|fmod|full_discovery|file|fopen|ftell|fseek|grep|get_vars|getenv|get|get_chan_info|get_ranges|get_text|gethostinfo|getpid|getpname|history_get_retention|history|index|int|is_var|intersection|isnumber|internal|in_transition|join|kill|length|lines|lock|lock_info|log|loge|log10|matchline|msg_check|msg_get_format|msg_get_severity|msg_printf|msg_sprintf|ntharg|num_consoles|nthargf|nthline|nthlinef|num_bytes|print|proc_exists|process|popen|printf|pconfig|poplines|pow|PslExecute|PslFunctionCall|PslFunctionExists|PslSetOptions|random|read|readln|refresh_parameters|remote_check|remote_close|remote_event_query|remote_event_trigger|remote_file_send|remote_open|remove|replace|rindex|sec_check_priv|sec_store_get|sec_store_set|set_alarm_ranges|set_locale|share|sin|sinh|sleep|sopen|sqrt|srandom|subset|set|substr|system|sprintf|sort|subset|snmp_agent_config|_snmp_debug|snmp_agent_stop|snmp_agent_start|snmp_h_set|snmp_h_get_next|snmp_h_get|snmp_set|snmp_walk|snmp_get_next|snmp_get|snmp_config|snmp_close|snmp_open|snmp_trap_receive|snmp_trap_ignore|snmp_trap_listen|snmp_trap_send|snmp_trap_raise_std_trap|snmp_trap_register_im|splitline|strcasecmp|str_repeat|trim|tail|tan|tanh|time|tmpnam|tolower|toupper|trace_psl_process|text_domain|unlock|unique|union|unset|va_arg|va_start|write)\b/,alias:"builtin-function"},"foreach-variable":{pattern:/(\bforeach\s+(?:(?:\w+\b|"(?:\\.|[^\\"])*")\s+){0,2})[_a-zA-Z]\w*(?=\s*\()/,lookbehind:!0,greedy:!0},function:{pattern:/\b[_a-z]\w*\b(?=\s*\()/i},number:/\b(?:0x[0-9a-f]+|[0-9]+(?:\.[0-9]+)?)\b/i,operator:/--|\+\+|&&=?|\|\|=?|<<=?|>>=?|[=!]~|[-+*/%&|^!=<>]=?|\.|[:?]/,punctuation:/[(){}\[\];,]/}; \ No newline at end of file diff --git a/examples/prism-psl.html b/examples/prism-psl.html new file mode 100644 index 0000000000..daee2b952c --- /dev/null +++ b/examples/prism-psl.html @@ -0,0 +1,43 @@ +

        Strings

        +
        # PSL Strings are properly rendered
        +print("Hello, World!");
        +
        +# Escaped sequences are highlighted too
        +print("Goodbye \H\H\H\H\H\H\H\HHello, World!\n");
        +
        +# Multi-line strings are supported
        +print("multi
        +line");
        +
        + +

        Numbers

        +
        a = 1;
        +b = 2.5;
        +c = 0xff;
        +
        + +

        PSL Built-in Functions

        +
        p = nthargf(process(".*"), 1, " \t", "\n");
        +lock("test");
        +execute("OS", "pwd");
        +
        + +

        PSL Keywords

        +
        foreach entry (["aaa", "bbb", "ccc"]) {
        +	if (grep("[bc]", entry)) {
        +		last;
        +	}
        +}
        +
        + +

        PSL Constants

        +
        set("/CLASS/inst/paramA/state", WARN);
        +if (true) {
        +	PslDebug = -1;
        +}
        +output = execute("OS", "echo test");
        +if (errno) {
        +	print(ALARM." with errno=".errno."\n");
        +}
        +print(trim(output, "\n\r\t ", TRIM_LEADING_AND_TRAILING));
        +
        \ No newline at end of file diff --git a/plugins/show-language/prism-show-language.js b/plugins/show-language/prism-show-language.js index 459724aa7d..824ec1614f 100644 --- a/plugins/show-language/prism-show-language.js +++ b/plugins/show-language/prism-show-language.js @@ -138,6 +138,7 @@ "opencl": "OpenCL", "parigp": "PARI/GP", "objectpascal": "Object Pascal", + "psl": "PATROL Scripting Language", "pcaxis": "PC-Axis", "px": "PC-Axis", "peoplecode": "PeopleCode", diff --git a/plugins/show-language/prism-show-language.min.js b/plugins/show-language/prism-show-language.min.js index 0a55782536..d51829e66d 100644 --- a/plugins/show-language/prism-show-language.min.js +++ b/plugins/show-language/prism-show-language.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof self&&self.Prism&&self.document)if(Prism.plugins.toolbar){var r={none:"Plain text",html:"HTML",xml:"XML",svg:"SVG",mathml:"MathML",ssml:"SSML",rss:"RSS",css:"CSS",clike:"C-like",js:"JavaScript",abap:"ABAP",abnf:"ABNF",al:"AL",antlr4:"ANTLR4",g4:"ANTLR4",apacheconf:"Apache Configuration",apl:"APL",aql:"AQL",arff:"ARFF",asciidoc:"AsciiDoc",adoc:"AsciiDoc",aspnet:"ASP.NET (C#)",asm6502:"6502 Assembly",autohotkey:"AutoHotkey",autoit:"AutoIt",basic:"BASIC",bbcode:"BBcode",bnf:"BNF",rbnf:"RBNF",bsl:"BSL (1C:Enterprise)",oscript:"OneScript",csharp:"C#",cs:"C#",dotnet:"C#",cpp:"C++",cil:"CIL",cmake:"CMake",coffee:"CoffeeScript",conc:"Concurnas",csp:"Content-Security-Policy","css-extras":"CSS Extras",dataweave:"DataWeave",dax:"DAX",django:"Django/Jinja2",jinja2:"Django/Jinja2","dns-zone-file":"DNS zone file","dns-zone":"DNS zone file",dockerfile:"Docker",dot:"DOT (Graphviz)",gv:"DOT (Graphviz)",ebnf:"EBNF",editorconfig:"EditorConfig",ejs:"EJS",etlua:"Embedded Lua templating",erb:"ERB","excel-formula":"Excel Formula",xlsx:"Excel Formula",xls:"Excel Formula",fsharp:"F#","firestore-security-rules":"Firestore security rules",ftl:"FreeMarker Template Language",gml:"GameMaker Language",gamemakerlanguage:"GameMaker Language",gcode:"G-code",gdscript:"GDScript",gedcom:"GEDCOM",glsl:"GLSL",graphql:"GraphQL",hs:"Haskell",hcl:"HCL",hlsl:"HLSL",http:"HTTP",hpkp:"HTTP Public-Key-Pins",hsts:"HTTP Strict-Transport-Security",ichigojam:"IchigoJam",ignore:".ignore",gitignore:".gitignore",hgignore:".hgignore",npmignore:".npmignore",inform7:"Inform 7",javadoc:"JavaDoc",javadoclike:"JavaDoc-like",javastacktrace:"Java stack trace",jq:"JQ",jsdoc:"JSDoc","js-extras":"JS Extras",json:"JSON",webmanifest:"Web App Manifest",json5:"JSON5",jsonp:"JSONP",jsstacktrace:"JS stack trace","js-templates":"JS Templates",kts:"Kotlin Script",kt:"Kotlin",latex:"LaTeX",tex:"TeX",context:"ConTeXt",lilypond:"LilyPond",ly:"LilyPond",emacs:"Lisp",elisp:"Lisp","emacs-lisp":"Lisp",llvm:"LLVM IR",lolcode:"LOLCODE",md:"Markdown","markup-templating":"Markup templating",matlab:"MATLAB",mel:"MEL",mongodb:"MongoDB",moon:"MoonScript",n1ql:"N1QL",n4js:"N4JS",n4jsd:"N4JS","nand2tetris-hdl":"Nand To Tetris HDL",naniscript:"Naninovel Script",nani:"Naninovel Script",nasm:"NASM",neon:"NEON",nginx:"nginx",nsis:"NSIS",objectivec:"Objective-C",objc:"Objective-C",ocaml:"OCaml",opencl:"OpenCL",parigp:"PARI/GP",objectpascal:"Object Pascal",pcaxis:"PC-Axis",px:"PC-Axis",peoplecode:"PeopleCode",pcode:"PeopleCode",php:"PHP",phpdoc:"PHPDoc","php-extras":"PHP Extras",plsql:"PL/SQL",powerquery:"PowerQuery",pq:"PowerQuery",mscript:"PowerQuery",powershell:"PowerShell",promql:"PromQL",properties:".properties",protobuf:"Protocol Buffers",purebasic:"PureBasic",pbfasm:"PureBasic",purs:"PureScript",py:"Python",q:"Q (kdb+ database)",qml:"QML",rkt:"Racket",jsx:"React JSX",tsx:"React TSX",renpy:"Ren'py",rpy:"Ren'py",rest:"reST (reStructuredText)",robotframework:"Robot Framework",robot:"Robot Framework",rb:"Ruby",sas:"SAS",sass:"Sass (Sass)",scss:"Sass (Scss)","shell-session":"Shell session","sh-session":"Shell session",shellsession:"Shell session",sml:"SML",smlnj:"SML/NJ",solidity:"Solidity (Ethereum)",sol:"Solidity (Ethereum)","solution-file":"Solution file",sln:"Solution file",soy:"Soy (Closure Template)",sparql:"SPARQL",rq:"SPARQL","splunk-spl":"Splunk SPL",sqf:"SQF: Status Quo Function (Arma 3)",sql:"SQL",iecst:"Structured Text (IEC 61131-3)","t4-templating":"T4 templating","t4-cs":"T4 Text Templates (C#)",t4:"T4 Text Templates (C#)","t4-vb":"T4 Text Templates (VB)",tap:"TAP",tt2:"Template Toolkit 2",toml:"TOML",trig:"TriG",ts:"TypeScript",tsconfig:"TSConfig",uscript:"UnrealScript",uc:"UnrealScript",uri:"URI",url:"URL",vbnet:"VB.Net",vhdl:"VHDL",vim:"vim","visual-basic":"Visual Basic",vba:"VBA",vb:"Visual Basic",wasm:"WebAssembly",wiki:"Wiki markup",xeoracube:"XeoraCube","xml-doc":"XML doc (.net)",xojo:"Xojo (REALbasic)",xquery:"XQuery",yaml:"YAML",yml:"YAML",yang:"YANG"};Prism.plugins.toolbar.registerButton("show-language",function(e){var a=e.element.parentNode;if(a&&/pre/i.test(a.nodeName)){var t,s=a.getAttribute("data-language")||r[e.language]||((t=e.language)?(t.substring(0,1).toUpperCase()+t.substring(1)).replace(/s(?=cript)/,"S"):t);if(s){var o=document.createElement("span");return o.textContent=s,o}}})}else console.warn("Show Languages plugin loaded before Toolbar plugin.")}(); \ No newline at end of file +!function(){if("undefined"!=typeof self&&self.Prism&&self.document)if(Prism.plugins.toolbar){var r={none:"Plain text",html:"HTML",xml:"XML",svg:"SVG",mathml:"MathML",ssml:"SSML",rss:"RSS",css:"CSS",clike:"C-like",js:"JavaScript",abap:"ABAP",abnf:"ABNF",al:"AL",antlr4:"ANTLR4",g4:"ANTLR4",apacheconf:"Apache Configuration",apl:"APL",aql:"AQL",arff:"ARFF",asciidoc:"AsciiDoc",adoc:"AsciiDoc",aspnet:"ASP.NET (C#)",asm6502:"6502 Assembly",autohotkey:"AutoHotkey",autoit:"AutoIt",basic:"BASIC",bbcode:"BBcode",bnf:"BNF",rbnf:"RBNF",bsl:"BSL (1C:Enterprise)",oscript:"OneScript",csharp:"C#",cs:"C#",dotnet:"C#",cpp:"C++",cil:"CIL",cmake:"CMake",coffee:"CoffeeScript",conc:"Concurnas",csp:"Content-Security-Policy","css-extras":"CSS Extras",dataweave:"DataWeave",dax:"DAX",django:"Django/Jinja2",jinja2:"Django/Jinja2","dns-zone-file":"DNS zone file","dns-zone":"DNS zone file",dockerfile:"Docker",dot:"DOT (Graphviz)",gv:"DOT (Graphviz)",ebnf:"EBNF",editorconfig:"EditorConfig",ejs:"EJS",etlua:"Embedded Lua templating",erb:"ERB","excel-formula":"Excel Formula",xlsx:"Excel Formula",xls:"Excel Formula",fsharp:"F#","firestore-security-rules":"Firestore security rules",ftl:"FreeMarker Template Language",gml:"GameMaker Language",gamemakerlanguage:"GameMaker Language",gcode:"G-code",gdscript:"GDScript",gedcom:"GEDCOM",glsl:"GLSL",graphql:"GraphQL",hs:"Haskell",hcl:"HCL",hlsl:"HLSL",http:"HTTP",hpkp:"HTTP Public-Key-Pins",hsts:"HTTP Strict-Transport-Security",ichigojam:"IchigoJam",ignore:".ignore",gitignore:".gitignore",hgignore:".hgignore",npmignore:".npmignore",inform7:"Inform 7",javadoc:"JavaDoc",javadoclike:"JavaDoc-like",javastacktrace:"Java stack trace",jq:"JQ",jsdoc:"JSDoc","js-extras":"JS Extras",json:"JSON",webmanifest:"Web App Manifest",json5:"JSON5",jsonp:"JSONP",jsstacktrace:"JS stack trace","js-templates":"JS Templates",kts:"Kotlin Script",kt:"Kotlin",latex:"LaTeX",tex:"TeX",context:"ConTeXt",lilypond:"LilyPond",ly:"LilyPond",emacs:"Lisp",elisp:"Lisp","emacs-lisp":"Lisp",llvm:"LLVM IR",lolcode:"LOLCODE",md:"Markdown","markup-templating":"Markup templating",matlab:"MATLAB",mel:"MEL",mongodb:"MongoDB",moon:"MoonScript",n1ql:"N1QL",n4js:"N4JS",n4jsd:"N4JS","nand2tetris-hdl":"Nand To Tetris HDL",naniscript:"Naninovel Script",nani:"Naninovel Script",nasm:"NASM",neon:"NEON",nginx:"nginx",nsis:"NSIS",objectivec:"Objective-C",objc:"Objective-C",ocaml:"OCaml",opencl:"OpenCL",parigp:"PARI/GP",objectpascal:"Object Pascal",psl:"PATROL Scripting Language",pcaxis:"PC-Axis",px:"PC-Axis",peoplecode:"PeopleCode",pcode:"PeopleCode",php:"PHP",phpdoc:"PHPDoc","php-extras":"PHP Extras",plsql:"PL/SQL",powerquery:"PowerQuery",pq:"PowerQuery",mscript:"PowerQuery",powershell:"PowerShell",promql:"PromQL",properties:".properties",protobuf:"Protocol Buffers",purebasic:"PureBasic",pbfasm:"PureBasic",purs:"PureScript",py:"Python",q:"Q (kdb+ database)",qml:"QML",rkt:"Racket",jsx:"React JSX",tsx:"React TSX",renpy:"Ren'py",rpy:"Ren'py",rest:"reST (reStructuredText)",robotframework:"Robot Framework",robot:"Robot Framework",rb:"Ruby",sas:"SAS",sass:"Sass (Sass)",scss:"Sass (Scss)","shell-session":"Shell session","sh-session":"Shell session",shellsession:"Shell session",sml:"SML",smlnj:"SML/NJ",solidity:"Solidity (Ethereum)",sol:"Solidity (Ethereum)","solution-file":"Solution file",sln:"Solution file",soy:"Soy (Closure Template)",sparql:"SPARQL",rq:"SPARQL","splunk-spl":"Splunk SPL",sqf:"SQF: Status Quo Function (Arma 3)",sql:"SQL",iecst:"Structured Text (IEC 61131-3)","t4-templating":"T4 templating","t4-cs":"T4 Text Templates (C#)",t4:"T4 Text Templates (C#)","t4-vb":"T4 Text Templates (VB)",tap:"TAP",tt2:"Template Toolkit 2",toml:"TOML",trig:"TriG",ts:"TypeScript",tsconfig:"TSConfig",uscript:"UnrealScript",uc:"UnrealScript",uri:"URI",url:"URL",vbnet:"VB.Net",vhdl:"VHDL",vim:"vim","visual-basic":"Visual Basic",vba:"VBA",vb:"Visual Basic",wasm:"WebAssembly",wiki:"Wiki markup",xeoracube:"XeoraCube","xml-doc":"XML doc (.net)",xojo:"Xojo (REALbasic)",xquery:"XQuery",yaml:"YAML",yml:"YAML",yang:"YANG"};Prism.plugins.toolbar.registerButton("show-language",function(e){var a=e.element.parentNode;if(a&&/pre/i.test(a.nodeName)){var t,s=a.getAttribute("data-language")||r[e.language]||((t=e.language)?(t.substring(0,1).toUpperCase()+t.substring(1)).replace(/s(?=cript)/,"S"):t);if(s){var o=document.createElement("span");return o.textContent=s,o}}})}else console.warn("Show Languages plugin loaded before Toolbar plugin.")}(); \ No newline at end of file diff --git a/tests/languages/psl/builtin_feature.test b/tests/languages/psl/builtin_feature.test new file mode 100644 index 0000000000..40259ea2bf --- /dev/null +++ b/tests/languages/psl/builtin_feature.test @@ -0,0 +1,369 @@ +acos +add_diary +annotate +annotate_get +asctime +asin +atan +atexit +ascii_to_ebcdic +batch_set +blackout +cat +ceil +chan_exists +change_state +close +code_cvt +cond_signal +cond_wait +console_type +convert_base +convert_date +convert_locale_date +cos +cosh +create +destroy_lock +dump_hist +date +destroy +difference +dget_text +dcget_text +ebcdic_to_ascii +encrypt +event_archive +event_catalog_get +event_check +event_query +event_range_manage +event_range_query +event_report +event_schedule +event_trigger +event_trigger2 +execute +exists +exp +fabs +floor +fmod +full_discovery +file +fopen +ftell +fseek +grep +get_vars +getenv +get +get_chan_info +get_ranges +get_text +gethostinfo +getpid +getpname +history_get_retention +history +index +int +is_var +intersection +isnumber +internal +in_transition +join +kill +length +lines +lock +lock_info +log +loge +log10 +matchline +msg_check +msg_get_format +msg_get_severity +msg_printf +msg_sprintf +ntharg +num_consoles +nthargf +nthline +nthlinef +num_bytes +print +proc_exists +process +popen +printf +pconfig +poplines +pow +PslExecute +PslFunctionCall +PslFunctionExists +PslSetOptions +random +read +readln +refresh_parameters +remote_check +remote_close +remote_event_query +remote_event_trigger +remote_file_send +remote_open +remove +replace +rindex +sec_check_priv +sec_store_get +sec_store_set +set_alarm_ranges +set_locale +share +sin +sinh +sleep +sopen +sqrt +srandom +subset +set +substr +system +sprintf +sort +subset +snmp_agent_config +_snmp_debug +snmp_agent_stop +snmp_agent_start +snmp_h_set +snmp_h_get_next +snmp_h_get +snmp_set +snmp_walk +snmp_get_next +snmp_get +snmp_config +snmp_close +snmp_open +snmp_trap_receive +snmp_trap_ignore +snmp_trap_listen +snmp_trap_send +snmp_trap_raise_std_trap +snmp_trap_register_im +splitline +strcasecmp +str_repeat +trim +tail +tan +tanh +time +tmpnam +tolower +toupper +trace_psl_process +text_domain +unlock +unique +union +unset +va_arg +va_start +write + +---------------------------------------------------- + +[ + ["builtin", "acos"], + ["builtin", "add_diary"], + ["builtin", "annotate"], + ["builtin", "annotate_get"], + ["builtin", "asctime"], + ["builtin", "asin"], + ["builtin", "atan"], + ["builtin", "atexit"], + ["builtin", "ascii_to_ebcdic"], + ["builtin", "batch_set"], + ["builtin", "blackout"], + ["builtin", "cat"], + ["builtin", "ceil"], + ["builtin", "chan_exists"], + ["builtin", "change_state"], + ["builtin", "close"], + ["builtin", "code_cvt"], + ["builtin", "cond_signal"], + ["builtin", "cond_wait"], + ["builtin", "console_type"], + ["builtin", "convert_base"], + ["builtin", "convert_date"], + ["builtin", "convert_locale_date"], + ["builtin", "cos"], + ["builtin", "cosh"], + ["builtin", "create"], + ["builtin", "destroy_lock"], + ["builtin", "dump_hist"], + ["builtin", "date"], + ["builtin", "destroy"], + ["builtin", "difference"], + ["builtin", "dget_text"], + ["builtin", "dcget_text"], + ["builtin", "ebcdic_to_ascii"], + ["builtin", "encrypt"], + ["builtin", "event_archive"], + ["builtin", "event_catalog_get"], + ["builtin", "event_check"], + ["builtin", "event_query"], + ["builtin", "event_range_manage"], + ["builtin", "event_range_query"], + ["builtin", "event_report"], + ["builtin", "event_schedule"], + ["builtin", "event_trigger"], + ["builtin", "event_trigger2"], + ["builtin", "execute"], + ["builtin", "exists"], + ["builtin", "exp"], + ["builtin", "fabs"], + ["builtin", "floor"], + ["builtin", "fmod"], + ["builtin", "full_discovery"], + ["builtin", "file"], + ["builtin", "fopen"], + ["builtin", "ftell"], + ["builtin", "fseek"], + ["builtin", "grep"], + ["builtin", "get_vars"], + ["builtin", "getenv"], + ["builtin", "get"], + ["builtin", "get_chan_info"], + ["builtin", "get_ranges"], + ["builtin", "get_text"], + ["builtin", "gethostinfo"], + ["builtin", "getpid"], + ["builtin", "getpname"], + ["builtin", "history_get_retention"], + ["builtin", "history"], + ["builtin", "index"], + ["builtin", "int"], + ["builtin", "is_var"], + ["builtin", "intersection"], + ["builtin", "isnumber"], + ["builtin", "internal"], + ["builtin", "in_transition"], + ["builtin", "join"], + ["builtin", "kill"], + ["builtin", "length"], + ["builtin", "lines"], + ["builtin", "lock"], + ["builtin", "lock_info"], + ["builtin", "log"], + ["builtin", "loge"], + ["builtin", "log10"], + ["builtin", "matchline"], + ["builtin", "msg_check"], + ["builtin", "msg_get_format"], + ["builtin", "msg_get_severity"], + ["builtin", "msg_printf"], + ["builtin", "msg_sprintf"], + ["builtin", "ntharg"], + ["builtin", "num_consoles"], + ["builtin", "nthargf"], + ["builtin", "nthline"], + ["builtin", "nthlinef"], + ["builtin", "num_bytes"], + ["builtin", "print"], + ["builtin", "proc_exists"], + ["builtin", "process"], + ["builtin", "popen"], + ["builtin", "printf"], + ["builtin", "pconfig"], + ["builtin", "poplines"], + ["builtin", "pow"], + ["builtin", "PslExecute"], + ["builtin", "PslFunctionCall"], + ["builtin", "PslFunctionExists"], + ["builtin", "PslSetOptions"], + ["builtin", "random"], + ["builtin", "read"], + ["builtin", "readln"], + ["builtin", "refresh_parameters"], + ["builtin", "remote_check"], + ["builtin", "remote_close"], + ["builtin", "remote_event_query"], + ["builtin", "remote_event_trigger"], + ["builtin", "remote_file_send"], + ["builtin", "remote_open"], + ["builtin", "remove"], + ["builtin", "replace"], + ["builtin", "rindex"], + ["builtin", "sec_check_priv"], + ["builtin", "sec_store_get"], + ["builtin", "sec_store_set"], + ["builtin", "set_alarm_ranges"], + ["builtin", "set_locale"], + ["builtin", "share"], + ["builtin", "sin"], + ["builtin", "sinh"], + ["builtin", "sleep"], + ["builtin", "sopen"], + ["builtin", "sqrt"], + ["builtin", "srandom"], + ["builtin", "subset"], + ["builtin", "set"], + ["builtin", "substr"], + ["builtin", "system"], + ["builtin", "sprintf"], + ["builtin", "sort"], + ["builtin", "subset"], + ["builtin", "snmp_agent_config"], + ["builtin", "_snmp_debug"], + ["builtin", "snmp_agent_stop"], + ["builtin", "snmp_agent_start"], + ["builtin", "snmp_h_set"], + ["builtin", "snmp_h_get_next"], + ["builtin", "snmp_h_get"], + ["builtin", "snmp_set"], + ["builtin", "snmp_walk"], + ["builtin", "snmp_get_next"], + ["builtin", "snmp_get"], + ["builtin", "snmp_config"], + ["builtin", "snmp_close"], + ["builtin", "snmp_open"], + ["builtin", "snmp_trap_receive"], + ["builtin", "snmp_trap_ignore"], + ["builtin", "snmp_trap_listen"], + ["builtin", "snmp_trap_send"], + ["builtin", "snmp_trap_raise_std_trap"], + ["builtin", "snmp_trap_register_im"], + ["builtin", "splitline"], + ["builtin", "strcasecmp"], + ["builtin", "str_repeat"], + ["builtin", "trim"], + ["builtin", "tail"], + ["builtin", "tan"], + ["builtin", "tanh"], + ["builtin", "time"], + ["builtin", "tmpnam"], + ["builtin", "tolower"], + ["builtin", "toupper"], + ["builtin", "trace_psl_process"], + ["builtin", "text_domain"], + ["builtin", "unlock"], + ["builtin", "unique"], + ["builtin", "union"], + ["builtin", "unset"], + ["builtin", "va_arg"], + ["builtin", "va_start"], + ["builtin", "write"] +] + +---------------------------------------------------- + +Test for PSL built-in functions \ No newline at end of file diff --git a/tests/languages/psl/comment_feature.test b/tests/languages/psl/comment_feature.test new file mode 100644 index 0000000000..71f9686a3a --- /dev/null +++ b/tests/languages/psl/comment_feature.test @@ -0,0 +1,23 @@ +# Comment +# This is not a "string" +# This is not a <<>=2 +1^=2 +1*=2 +1/=2 +1%=2 +1|=2 +1&=2 +1||2 +1&&2 +1|2 +1^2 +1&2 +1!=2 +1==2 +1=~2 +1!~2 +1<2 +1<=2 +1>2 +1>=2 +1<<2 +1>>2 +1+2 +1*2 +1/2 +1%2 +"a"."b" +1-2 +!1 +1++2 +1--2 +1?2:3 + +---------------------------------------------------- + +[ + ["number", "1"], + ["operator", "="], + ["number", "2"], + + ["number", "1"], + ["operator", "+="], + ["number", "2"], + + ["number", "1"], + ["operator", "-="], + ["number", "2"], + + ["number", "1"], + ["operator", "<<="], + ["number", "2"], + + ["number", "1"], + ["operator", ">>="], + ["number", "2"], + + ["number", "1"], + ["operator", "^="], + ["number", "2"], + + ["number", "1"], + ["operator", "*="], + ["number", "2"], + + ["number", "1"], + ["operator", "/="], + ["number", "2"], + + ["number", "1"], + ["operator", "%="], + ["number", "2"], + + ["number", "1"], + ["operator", "|="], + ["number", "2"], + + ["number", "1"], + ["operator", "&="], + ["number", "2"], + + ["number", "1"], + ["operator", "||"], + ["number", "2"], + + ["number", "1"], + ["operator", "&&"], + ["number", "2"], + + ["number", "1"], + ["operator", "|"], + ["number", "2"], + + ["number", "1"], + ["operator", "^"], + ["number", "2"], + + ["number", "1"], + ["operator", "&"], + ["number", "2"], + + ["number", "1"], + ["operator", "!="], + ["number", "2"], + + ["number", "1"], + ["operator", "=="], + ["number", "2"], + + ["number", "1"], + ["operator", "=~"], + ["number", "2"], + + ["number", "1"], + ["operator", "!~"], + ["number", "2"], + + ["number", "1"], + ["operator", "<"], + ["number", "2"], + + ["number", "1"], + ["operator", "<="], + ["number", "2"], + + ["number", "1"], + ["operator", ">"], + ["number", "2"], + + ["number", "1"], + ["operator", ">="], + ["number", "2"], + + ["number", "1"], + ["operator", "<<"], + ["number", "2"], + + ["number", "1"], + ["operator", ">>"], + ["number", "2"], + + ["number", "1"], + ["operator", "+"], + ["number", "2"], + + ["number", "1"], + ["operator", "*"], + ["number", "2"], + + ["number", "1"], + ["operator", "/"], + ["number", "2"], + + ["number", "1"], + ["operator", "%"], + ["number", "2"], + + ["string", ["\"a\""]], + ["operator", "."], + ["string", ["\"b\""]], + + ["number", "1"], + ["operator", "-"], + ["number", "2"], + + ["operator", "!"], + ["number", "1"], + + ["number", "1"], + ["operator", "++"], + ["number", "2"], + + ["number", "1"], + ["operator", "--"], + ["number", "2"], + + ["number", "1"], + ["operator", "?"], + ["number", "2"], + ["operator", ":"], + ["number", "3"] +] + +---------------------------------------------------- + +Test for oper1tors \ No newline at end of file diff --git a/tests/languages/psl/overall_feature.test b/tests/languages/psl/overall_feature.test new file mode 100644 index 0000000000..554152eed2 --- /dev/null +++ b/tests/languages/psl/overall_feature.test @@ -0,0 +1,60 @@ +function test(limit) { + for (i = 0 ; i < limit ; i++) { + s = s + i; # s has not been initialized! + } + print(s."\n"); +} + +---------------------------------------------------- + +[ + ["keyword", "function"], + ["function", "test"], + ["punctuation", "("], + "limit", + ["punctuation", ")"], + ["punctuation", "{"], + + ["keyword", "for"], + ["punctuation", "("], + "i ", + ["operator", "="], + ["number", "0"], + ["punctuation", ";"], + " i ", + ["operator", "<"], + " limit ", + ["punctuation", ";"], + " i", + ["operator", "++"], + ["punctuation", ")"], + ["punctuation", "{"], + + "\r\n\t\ts ", + ["operator", "="], + " s ", + ["operator", "+"], + " i", + ["punctuation", ";"], + ["comment", "# s has not been initialized!"], + + ["punctuation", "}"], + + ["builtin", "print"], + ["punctuation", "("], + "s", + ["operator", "."], + ["string", [ + "\"", + ["symbol", "\\n"], + "\"" + ]], + ["punctuation", ")"], + ["punctuation", ";"], + + ["punctuation", "}"] +] + +---------------------------------------------------- + +General test for the most common PSL statements, all mixed together \ No newline at end of file diff --git a/tests/languages/psl/string_feature.test b/tests/languages/psl/string_feature.test new file mode 100644 index 0000000000..bf53d41fbc --- /dev/null +++ b/tests/languages/psl/string_feature.test @@ -0,0 +1,32 @@ +"abc" +"a \"bc\"" +"a\nbc" +"a\invalid" +"foo # not a comment" +"multi +line string" + +---------------------------------------------------- + +[ + ["string", ["\"abc\""]], + ["string", [ + "\"a ", + ["symbol", "\\\""], + "bc", + ["symbol", "\\\""], + "\"" + ]], + ["string", [ + "\"a", + ["symbol", "\\n"], + "bc\"" + ]], + ["string", ["\"a\\invalid\""]], + ["string", ["\"foo # not a comment\""]], + ["string", ["\"multi\r\nline string\""]] +] + +---------------------------------------------------- + +Test for strings \ No newline at end of file diff --git a/tests/languages/psl/variable_feature.test b/tests/languages/psl/variable_feature.test new file mode 100644 index 0000000000..6982ddfd48 --- /dev/null +++ b/tests/languages/psl/variable_feature.test @@ -0,0 +1,15 @@ +errno +exit_status +PslDebug + +---------------------------------------------------- + +[ + ["variable", "errno"], + ["variable", "exit_status"], + ["variable", "PslDebug"] +] + +---------------------------------------------------- + +Test for variables \ No newline at end of file From 93dd83c2b607e8a5ac5baabef88a3ca1dd71c5f9 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Fri, 29 Jan 2021 14:47:05 +0100 Subject: [PATCH 0720/1100] Docker: Improvements (#2720) --- components/prism-docker.js | 108 ++++++++-- components/prism-docker.min.js | 2 +- .../languages/docker/instruction_feature.test | 186 ++++++++++++++++++ tests/languages/docker/keyword_feature.test | 110 +++++++++-- tests/languages/docker/options_feature.test | 89 +++++++++ tests/languages/docker/string_feature.test | 52 +++-- tests/languages/docker/variable_feature.test | 62 ++++++ 7 files changed, 562 insertions(+), 47 deletions(-) create mode 100644 tests/languages/docker/instruction_feature.test create mode 100644 tests/languages/docker/options_feature.test create mode 100644 tests/languages/docker/variable_feature.test diff --git a/components/prism-docker.js b/components/prism-docker.js index 270e66c554..2c8c7740aa 100644 --- a/components/prism-docker.js +++ b/components/prism-docker.js @@ -1,14 +1,98 @@ -Prism.languages.docker = { - 'keyword': { - pattern: /(^\s*)(?:ADD|ARG|CMD|COPY|ENTRYPOINT|ENV|EXPOSE|FROM|HEALTHCHECK|LABEL|MAINTAINER|ONBUILD|RUN|SHELL|STOPSIGNAL|USER|VOLUME|WORKDIR)(?=\s)/mi, - lookbehind: true - }, - 'string': /("|')(?:(?!\1)[^\\\r\n]|\\(?:\r\n|[\s\S]))*\1/, - 'comment': { - pattern: /#.*/, +(function (Prism) { + + // Many of the following regexes will contain negated lookaheads like `[ \t]+(?![ \t])`. This is a trick to ensure + // that quantifiers behave *atomically*. Atomic quantifiers are necessary to prevent exponential backtracking. + + var spaceAfterBackSlash = /\\[\r\n](?:\s|\\[\r\n]|#.*(?!.))*(?![\s#]|\\[\r\n])/.source; + // At least one space, comment, or line break + var space = /(?:[ \t]+(?![ \t])(?:)?|)/.source + .replace(//g, function () { return spaceAfterBackSlash; }); + + var string = /"(?:[^"\\\r\n]|\\(?:\r\n|[\s\S]))*"|'(?:[^'\\\r\n]|\\(?:\r\n|[\s\S]))*'/.source; + var option = /--[\w-]+=(?:|(?!["'])(?:[^\s\\]|\\.)+)/.source.replace(//g, function () { return string; }); + + var stringRule = { + pattern: RegExp(string), + greedy: true + }; + var commentRule = { + pattern: /(^[ \t]*)#.*/m, + lookbehind: true, greedy: true - }, - 'punctuation': /---|\.\.\.|[:[\]{}\-,|>?]/ -}; + }; + + /** + * @param {string} source + * @param {string} flags + * @returns {RegExp} + */ + function re(source, flags) { + source = source + .replace(//g, function () { return option; }) + .replace(//g, function () { return space; }); + + return RegExp(source, flags); + } + + Prism.languages.docker = { + 'instruction': { + pattern: /(^[ \t]*)(?:ADD|ARG|CMD|COPY|ENTRYPOINT|ENV|EXPOSE|FROM|HEALTHCHECK|LABEL|MAINTAINER|ONBUILD|RUN|SHELL|STOPSIGNAL|USER|VOLUME|WORKDIR)(?=\s)(?:\\.|[^\r\n\\])*(?:\\$(?:\s|#.*$)*(?![\s#])(?:\\.|[^\r\n\\])*)*/mi, + lookbehind: true, + greedy: true, + inside: { + 'options': { + pattern: re(/(^(?:ONBUILD)?\w+)(?:)*/.source, 'i'), + lookbehind: true, + greedy: true, + inside: { + 'property': { + pattern: /(^|\s)--[\w-]+/, + lookbehind: true + }, + 'string': [ + stringRule, + { + pattern: /(=)(?!["'])(?:[^\s\\]|\\.)+/, + lookbehind: true + } + ], + 'operator': /\\$/m, + 'punctuation': /=/ + } + }, + 'keyword': [ + { + // https://docs.docker.com/engine/reference/builder/#healthcheck + pattern: re(/(^(?:ONBUILD)?HEALTHCHECK(?:)*)(?:CMD|NONE)\b/.source, 'i'), + lookbehind: true, + greedy: true + }, + { + // https://docs.docker.com/engine/reference/builder/#from + pattern: re(/(^(?:ONBUILD)?FROM(?:)*(?!--)[^ \t\\]+)AS/.source, 'i'), + lookbehind: true, + greedy: true + }, + { + // https://docs.docker.com/engine/reference/builder/#onbuild + pattern: re(/(^ONBUILD)\w+/.source, 'i'), + lookbehind: true, + greedy: true + }, + { + pattern: /^\w+/, + greedy: true + } + ], + 'comment': commentRule, + 'string': stringRule, + 'variable': /\$(?:\w+|\{[^{}"'\\]*\})/, + 'operator': /\\$/m + } + }, + 'comment': commentRule + }; + + Prism.languages.dockerfile = Prism.languages.docker; -Prism.languages.dockerfile = Prism.languages.docker; +}(Prism)); diff --git a/components/prism-docker.min.js b/components/prism-docker.min.js index 9c1b73ff6d..3d23e8a719 100644 --- a/components/prism-docker.min.js +++ b/components/prism-docker.min.js @@ -1 +1 @@ -Prism.languages.docker={keyword:{pattern:/(^\s*)(?:ADD|ARG|CMD|COPY|ENTRYPOINT|ENV|EXPOSE|FROM|HEALTHCHECK|LABEL|MAINTAINER|ONBUILD|RUN|SHELL|STOPSIGNAL|USER|VOLUME|WORKDIR)(?=\s)/im,lookbehind:!0},string:/("|')(?:(?!\1)[^\\\r\n]|\\(?:\r\n|[\s\S]))*\1/,comment:{pattern:/#.*/,greedy:!0},punctuation:/---|\.\.\.|[:[\]{}\-,|>?]/},Prism.languages.dockerfile=Prism.languages.docker; \ No newline at end of file +!function(e){var r="(?:[ \t]+(?![ \t])(?:)?|)".replace(//g,function(){return"\\\\[\r\n](?:\\s|\\\\[\r\n]|#.*(?!.))*(?![\\s#]|\\\\[\r\n])"}),n="\"(?:[^\"\\\\\r\n]|\\\\(?:\r\n|[^]))*\"|'(?:[^'\\\\\r\n]|\\\\(?:\r\n|[^]))*'",t="--[\\w-]+=(?:|(?![\"'])(?:[^\\s\\\\]|\\\\.)+)".replace(//g,function(){return n}),o={pattern:RegExp(n),greedy:!0},i={pattern:/(^[ \t]*)#.*/m,lookbehind:!0,greedy:!0};function a(e,n){return e=e.replace(//g,function(){return t}).replace(//g,function(){return r}),RegExp(e,n)}e.languages.docker={instruction:{pattern:/(^[ \t]*)(?:ADD|ARG|CMD|COPY|ENTRYPOINT|ENV|EXPOSE|FROM|HEALTHCHECK|LABEL|MAINTAINER|ONBUILD|RUN|SHELL|STOPSIGNAL|USER|VOLUME|WORKDIR)(?=\s)(?:\\.|[^\r\n\\])*(?:\\$(?:\s|#.*$)*(?![\s#])(?:\\.|[^\r\n\\])*)*/im,lookbehind:!0,greedy:!0,inside:{options:{pattern:a("(^(?:ONBUILD)?\\w+)(?:)*","i"),lookbehind:!0,greedy:!0,inside:{property:{pattern:/(^|\s)--[\w-]+/,lookbehind:!0},string:[o,{pattern:/(=)(?!["'])(?:[^\s\\]|\\.)+/,lookbehind:!0}],operator:/\\$/m,punctuation:/=/}},keyword:[{pattern:a("(^(?:ONBUILD)?HEALTHCHECK(?:)*)(?:CMD|NONE)\\b","i"),lookbehind:!0,greedy:!0},{pattern:a("(^(?:ONBUILD)?FROM(?:)*(?!--)[^ \t\\\\]+)AS","i"),lookbehind:!0,greedy:!0},{pattern:a("(^ONBUILD)\\w+","i"),lookbehind:!0,greedy:!0},{pattern:/^\w+/,greedy:!0}],comment:i,string:o,variable:/\$(?:\w+|\{[^{}"'\\]*\})/,operator:/\\$/m}},comment:i},e.languages.dockerfile=e.languages.docker}(Prism); \ No newline at end of file diff --git a/tests/languages/docker/instruction_feature.test b/tests/languages/docker/instruction_feature.test new file mode 100644 index 0000000000..49179c194b --- /dev/null +++ b/tests/languages/docker/instruction_feature.test @@ -0,0 +1,186 @@ +RUN apt-get \ +update && apt-get \ +#comment +# +\ +\ + + +install git -y #not-a-comment \ +something + +RUN echo hello \ +# comment +world + + # this is a comment-line + RUN echo hello +RUN echo world + +RUN echo "\ + hello\ + world" + +LABEL multi.label1="value1" \ + multi.label2="value2" \ + other="value3" + +EXPOSE 80/udp + +ENV MY_NAME="John Doe" +ENV MY_NAME="John Doe" MY_DOG=Rex\ The\ Dog \ + MY_CAT=fluffy + +ADD hom?.txt /mydir/ + +ENTRYPOINT ["executable", "param1", "param2"] + +FROM debian:stable +RUN apt-get update && apt-get install -y --force-yes apache2 +EXPOSE 80 443 +VOLUME ["/var/www", "/var/log/apache2", "/etc/apache2"] +ENTRYPOINT ["/usr/sbin/apache2ctl", "-D", "FOREGROUND"] + +ENTRYPOINT [ "/path/myprocess", \ + "arg1", \ + "arg2" \ +] + +---------------------------------------------------- + +[ + ["instruction", [ + ["keyword", "RUN"], " apt-get ", ["operator", "\\"], + "\r\nupdate && apt-get ", ["operator", "\\"], + ["comment", "#comment"], + ["comment", "#"], + ["operator", "\\"], + ["operator", "\\"], + + "\r\n\r\n\r\ninstall git -y #not-a-comment ", ["operator", "\\"], + "\r\nsomething" + ]], + + ["instruction", [ + ["keyword", "RUN"], " echo hello ", ["operator", "\\"], + ["comment", "# comment"], + "\r\nworld" + ]], + + ["comment", "# this is a comment-line"], + ["instruction", [ + ["keyword", "RUN"], + " echo hello" + ]], + ["instruction", [ + ["keyword", "RUN"], + " echo world" + ]], + + ["instruction", [ + ["keyword", "RUN"], + " echo ", + ["string", "\"\\\r\n hello\\\r\n world\""] + ]], + + ["instruction", [ + ["keyword", "LABEL"], + " multi.label1=", + ["string", "\"value1\""], + ["operator", "\\"], + + "\r\n multi.label2=", + ["string", "\"value2\""], + ["operator", "\\"], + + "\r\n other=", + ["string", "\"value3\""] + ]], + + ["instruction", [ + ["keyword", "EXPOSE"], + " 80/udp" + ]], + + ["instruction", [ + ["keyword", "ENV"], + " MY_NAME=", + ["string", "\"John Doe\""] + ]], + + ["instruction", [ + ["keyword", "ENV"], + " MY_NAME=", + ["string", "\"John Doe\""], + " MY_DOG=Rex\\ The\\ Dog ", + ["operator", "\\"], + + "\r\n MY_CAT=fluffy" + ]], + + ["instruction", [ + ["keyword", "ADD"], + " hom?.txt /mydir/" + ]], + + ["instruction", [ + ["keyword", "ENTRYPOINT"], + " [", + ["string", "\"executable\""], + ", ", + ["string", "\"param1\""], + ", ", + ["string", "\"param2\""], + "]" + ]], + + ["instruction", [ + ["keyword", "FROM"], + " debian:stable" + ]], + ["instruction", [ + ["keyword", "RUN"], + " apt-get update && apt-get install -y --force-yes apache2" + ]], + ["instruction", [ + ["keyword", "EXPOSE"], + " 80 443" + ]], + ["instruction", [ + ["keyword", "VOLUME"], + " [", + ["string", "\"/var/www\""], + ", ", + ["string", "\"/var/log/apache2\""], + ", ", + ["string", "\"/etc/apache2\""], + "]" + ]], + ["instruction", [ + ["keyword", "ENTRYPOINT"], + " [", + ["string", "\"/usr/sbin/apache2ctl\""], + ", ", + ["string", "\"-D\""], + ", ", + ["string", "\"FOREGROUND\""], + "]" + ]], + + ["instruction", [ + ["keyword", "ENTRYPOINT"], + " [ ", + ["string", "\"/path/myprocess\""], + ", ", + ["operator", "\\"], + + ["string", "\"arg1\""], + ", ", + ["operator", "\\"], + + ["string", "\"arg2\""], + ["operator", "\\"], + + "\r\n]" + ]] +] \ No newline at end of file diff --git a/tests/languages/docker/keyword_feature.test b/tests/languages/docker/keyword_feature.test index a36a7e00b6..5330a6221e 100644 --- a/tests/languages/docker/keyword_feature.test +++ b/tests/languages/docker/keyword_feature.test @@ -1,5 +1,6 @@ ONBUILD ADD . /app/src FROM ubuntu +FROM ubuntu AS build MAINTAINER SvenDowideit@home.org.au RUN cd /tmp EXPOSE 5900 @@ -9,6 +10,7 @@ VOLUME /myvol USER daemon WORKDIR /a HEALTHCHECK CMD echo "foo" +HEALTHCHECK NONE LABEL version="1.0" ENTRYPOINT ["top", "-b"] ARG user1 @@ -18,28 +20,94 @@ STOPSIGNAL signal ---------------------------------------------------- [ - ["keyword", "ONBUILD"], ["keyword", "ADD"], " . /app/src\r\n", - ["keyword", "FROM"], " ubuntu\r\n", - ["keyword", "MAINTAINER"], " SvenDowideit@home.org.au\r\n", - ["keyword", "RUN"], " cd /tmp\r\n", - ["keyword", "EXPOSE"], " 5900\r\n", - ["keyword", "ENV"], " myName John Doe\r\n", - ["keyword", "COPY"], " hom* /mydir/\r\n", - ["keyword", "VOLUME"], " /myvol\r\n", - ["keyword", "USER"], " daemon\r\n", - ["keyword", "WORKDIR"], " /a\r\n", - ["keyword", "HEALTHCHECK"], ["keyword", "CMD"], " echo ", ["string", "\"foo\""], - ["keyword", "LABEL"], " version=", ["string", "\"1.0\""], - ["keyword", "ENTRYPOINT"], - ["punctuation", "["], ["string", "\"top\""], ["punctuation", ","], - ["string", "\"-b\""], ["punctuation", "]"], - ["keyword", "ARG"], " user1\r\n", - ["keyword", "SHELL"], - ["punctuation", "["], ["string", "\"powershell\""], ["punctuation", ","], - ["string", "\"-command\""], ["punctuation", "]"], - ["keyword", "STOPSIGNAL"], " signal" + ["instruction", [ + ["keyword", "ONBUILD"], + ["keyword", "ADD"], + " . /app/src" + ]], + ["instruction", [ + ["keyword", "FROM"], + " ubuntu" + ]], + ["instruction", [ + ["keyword", "FROM"], + " ubuntu ", + ["keyword", "AS"], + " build" + ]], + ["instruction", [ + ["keyword", "MAINTAINER"], + " SvenDowideit@home.org.au" + ]], + ["instruction", [ + ["keyword", "RUN"], + " cd /tmp" + ]], + ["instruction", [ + ["keyword", "EXPOSE"], + " 5900" + ]], + ["instruction", [ + ["keyword", "ENV"], + " myName John Doe" + ]], + ["instruction", [ + ["keyword", "COPY"], + " hom* /mydir/" + ]], + ["instruction", [ + ["keyword", "VOLUME"], + " /myvol" + ]], + ["instruction", [ + ["keyword", "USER"], + " daemon" + ]], + ["instruction", [ + ["keyword", "WORKDIR"], + " /a" + ]], + ["instruction", [ + ["keyword", "HEALTHCHECK"], + ["keyword", "CMD"], + " echo ", + ["string", "\"foo\""] + ]], + ["instruction", [ + ["keyword", "HEALTHCHECK"], + ["keyword", "NONE"] + ]], + ["instruction", [ + ["keyword", "LABEL"], + " version=", + ["string", "\"1.0\""] + ]], + ["instruction", [ + ["keyword", "ENTRYPOINT"], + " [", + ["string", "\"top\""], + ", ", + ["string", "\"-b\""], + "]" + ]], + ["instruction", [ + ["keyword", "ARG"], + " user1" + ]], + ["instruction", [ + ["keyword", "SHELL"], + " [", + ["string", "\"powershell\""], + ", ", + ["string", "\"-command\""], + "]" + ]], + ["instruction", [ + ["keyword", "STOPSIGNAL"], + " signal" + ]] ] ---------------------------------------------------- -Checks for keywords. \ No newline at end of file +Checks for keywords. diff --git a/tests/languages/docker/options_feature.test b/tests/languages/docker/options_feature.test new file mode 100644 index 0000000000..03f4841ce5 --- /dev/null +++ b/tests/languages/docker/options_feature.test @@ -0,0 +1,89 @@ +ADD --chown=1 files* /somedir/ +COPY --chown=1 files* /somedir/ + +HEALTHCHECK --interval=5m --timeout=3s \ + CMD foo + +ONBUILD HEALTHCHECK --interval=5m --timeout=3s \ + CMD foo + +HEALTHCHECK \ + --interval=5m \ + --timeout=3s \ + CMD foo + +---------------------------------------------------- + +[ + ["instruction", [ + ["keyword", "ADD"], + ["options", [ + ["property", "--chown"], + ["punctuation", "="], + ["string", "1"] + ]], + " files* /somedir/" + ]], + ["instruction", [ + ["keyword", "COPY"], + ["options", [ + ["property", "--chown"], + ["punctuation", "="], + ["string", "1"] + ]], + " files* /somedir/" + ]], + + ["instruction", [ + ["keyword", "HEALTHCHECK"], + ["options", [ + ["property", "--interval"], + ["punctuation", "="], + ["string", "5m"], + ["property", "--timeout"], + ["punctuation", "="], + ["string", "3s"] + ]], + ["operator", "\\"], + + ["keyword", "CMD"], + " foo" + ]], + + ["instruction", [ + ["keyword", "ONBUILD"], + ["keyword", "HEALTHCHECK"], + ["options", [ + ["property", "--interval"], + ["punctuation", "="], + ["string", "5m"], + ["property", "--timeout"], + ["punctuation", "="], + ["string", "3s"] + ]], + ["operator", "\\"], + + ["keyword", "CMD"], + " foo" + ]], + + ["instruction", [ + ["keyword", "HEALTHCHECK"], + ["operator", "\\"], + + ["options", [ + ["property", "--interval"], + ["punctuation", "="], + ["string", "5m"], + ["operator", "\\"], + + ["property", "--timeout"], + ["punctuation", "="], + ["string", "3s"] + ]], + ["operator", "\\"], + + ["keyword", "CMD"], + " foo" + ]] +] \ No newline at end of file diff --git a/tests/languages/docker/string_feature.test b/tests/languages/docker/string_feature.test index e131f02136..9f7b812f4c 100644 --- a/tests/languages/docker/string_feature.test +++ b/tests/languages/docker/string_feature.test @@ -1,23 +1,49 @@ -"" -"fo\"obar" -"foo\ +RUN echo "" +RUN echo "fo\"obar" +RUN echo "foo\ bar" -'' -'fo\'obar' -'foo\ + +RUN echo '' +RUN echo 'fo\'obar' +RUN echo 'foo\ bar' ---------------------------------------------------- [ - ["string", "\"\""], - ["string", "\"fo\\\"obar\""], - ["string", "\"foo\\\r\nbar\""], - ["string", "''"], - ["string", "'fo\\'obar'"], - ["string", "'foo\\\r\nbar'"] + ["instruction", [ + ["keyword", "RUN"], + " echo ", + ["string", "\"\""] + ]], + ["instruction", [ + ["keyword", "RUN"], + " echo ", + ["string", "\"fo\\\"obar\""] + ]], + ["instruction", [ + ["keyword", "RUN"], + " echo ", + ["string", "\"foo\\\r\nbar\""] + ]], + + ["instruction", [ + ["keyword", "RUN"], + " echo ", + ["string", "''"] + ]], + ["instruction", [ + ["keyword", "RUN"], + " echo ", + ["string", "'fo\\'obar'"] + ]], + ["instruction", [ + ["keyword", "RUN"], + " echo ", + ["string", "'foo\\\r\nbar'"] + ]] ] ---------------------------------------------------- -Checks for strings. \ No newline at end of file +Checks for strings. diff --git a/tests/languages/docker/variable_feature.test b/tests/languages/docker/variable_feature.test new file mode 100644 index 0000000000..53067767e9 --- /dev/null +++ b/tests/languages/docker/variable_feature.test @@ -0,0 +1,62 @@ +FROM busybox +USER ${user:-some_user} +ARG user +USER $user +RUN echo $CONT_IMG_VER + +ARG CODE_VERSION=latest +FROM base:${CODE_VERSION} +CMD /code/run-app + +FROM extras:${CODE_VERSION} +CMD /code/run-extras + +---------------------------------------------------- + +[ + ["instruction", [ + ["keyword", "FROM"], + " busybox" + ]], + ["instruction", [ + ["keyword", "USER"], + ["variable", "${user:-some_user}"] + ]], + ["instruction", [ + ["keyword", "ARG"], + " user" + ]], + ["instruction", [ + ["keyword", "USER"], + ["variable", "$user"] + ]], + ["instruction", [ + ["keyword", "RUN"], + " echo ", + ["variable", "$CONT_IMG_VER"] + ]], + + ["instruction", [ + ["keyword", "ARG"], + " CODE_VERSION=latest" + ]], + ["instruction", [ + ["keyword", "FROM"], + " base:", + ["variable", "${CODE_VERSION}"] + ]], + ["instruction", [ + ["keyword", "CMD"], + " /code/run-app" + ]], + + ["instruction", [ + ["keyword", "FROM"], + " extras:", + ["variable", "${CODE_VERSION}"] + ]], + ["instruction", [ + ["keyword", "CMD"], + " /code/run-extras" + ]] +] \ No newline at end of file From 022f90a0bf8ac7e40373d1b783354715b0a1020f Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Fri, 29 Jan 2021 14:49:40 +0100 Subject: [PATCH 0721/1100] JavaScript: Improved contextual keywords (#2713) --- components/prism-javascript.js | 4 +- components/prism-javascript.min.js | 2 +- prism.js | 4 +- .../languages/javascript/keyword_feature.test | 198 ++++++++++++++++-- 4 files changed, 181 insertions(+), 27 deletions(-) diff --git a/components/prism-javascript.js b/components/prism-javascript.js index 2b057bfea1..4ffee11173 100644 --- a/components/prism-javascript.js +++ b/components/prism-javascript.js @@ -8,11 +8,11 @@ Prism.languages.javascript = Prism.languages.extend('clike', { ], 'keyword': [ { - pattern: /((?:^|})\s*)(?:catch|finally)\b/, + pattern: /((?:^|})\s*)catch\b/, lookbehind: true }, { - pattern: /(^|[^.]|\.\.\.\s*)\b(?:as|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|(?:get|set)(?=\s*[\[$\w\xA0-\uFFFF])|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/, + pattern: /(^|[^.]|\.\.\.\s*)\b(?:as|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/, lookbehind: true }, ], diff --git a/components/prism-javascript.min.js b/components/prism-javascript.min.js index 4a170a47b9..101a051dff 100644 --- a/components/prism-javascript.min.js +++ b/components/prism-javascript.min.js @@ -1 +1 @@ -Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:prototype|constructor))/,lookbehind:!0}],keyword:[{pattern:/((?:^|})\s*)(?:catch|finally)\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|(?:get|set)(?=\s*[\[$\w\xA0-\uFFFF])|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:/\b(?:(?:0[xX](?:[\dA-Fa-f](?:_[\dA-Fa-f])?)+|0[bB](?:[01](?:_[01])?)+|0[oO](?:[0-7](?:_[0-7])?)+)n?|(?:\d(?:_\d)?)+n|NaN|Infinity)\b|(?:\b(?:\d(?:_\d)?)+\.?(?:\d(?:_\d)?)*|\B\.(?:\d(?:_\d)?)+)(?:[Ee][+-]?(?:\d(?:_\d)?)+)?/,operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/,Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)\/(?:\[(?:[^\]\\\r\n]|\\.)*]|\\.|[^/\\\[\r\n])+\/[gimyus]{0,6}(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/,lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:Prism.languages.regex},"regex-flags":/[a-z]+$/,"regex-delimiter":/^\/|\/$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),Prism.languages.insertBefore("javascript","string",{"template-string":{pattern:/`(?:\\[\s\S]|\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}|(?!\${)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\${|}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}}}),Prism.languages.markup&&Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.js=Prism.languages.javascript; \ No newline at end of file +Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:prototype|constructor))/,lookbehind:!0}],keyword:[{pattern:/((?:^|})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:/\b(?:(?:0[xX](?:[\dA-Fa-f](?:_[\dA-Fa-f])?)+|0[bB](?:[01](?:_[01])?)+|0[oO](?:[0-7](?:_[0-7])?)+)n?|(?:\d(?:_\d)?)+n|NaN|Infinity)\b|(?:\b(?:\d(?:_\d)?)+\.?(?:\d(?:_\d)?)*|\B\.(?:\d(?:_\d)?)+)(?:[Ee][+-]?(?:\d(?:_\d)?)+)?/,operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/,Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)\/(?:\[(?:[^\]\\\r\n]|\\.)*]|\\.|[^/\\\[\r\n])+\/[gimyus]{0,6}(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/,lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:Prism.languages.regex},"regex-flags":/[a-z]+$/,"regex-delimiter":/^\/|\/$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),Prism.languages.insertBefore("javascript","string",{"template-string":{pattern:/`(?:\\[\s\S]|\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}|(?!\${)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\${|}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}}}),Prism.languages.markup&&Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.js=Prism.languages.javascript; \ No newline at end of file diff --git a/prism.js b/prism.js index fdc707a4cd..cf200fb420 100644 --- a/prism.js +++ b/prism.js @@ -1483,11 +1483,11 @@ Prism.languages.javascript = Prism.languages.extend('clike', { ], 'keyword': [ { - pattern: /((?:^|})\s*)(?:catch|finally)\b/, + pattern: /((?:^|})\s*)catch\b/, lookbehind: true }, { - pattern: /(^|[^.]|\.\.\.\s*)\b(?:as|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|(?:get|set)(?=\s*[\[$\w\xA0-\uFFFF])|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/, + pattern: /(^|[^.]|\.\.\.\s*)\b(?:as|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/, lookbehind: true }, ], diff --git a/tests/languages/javascript/keyword_feature.test b/tests/languages/javascript/keyword_feature.test index c5ae92ad74..431af5baf6 100644 --- a/tests/languages/javascript/keyword_feature.test +++ b/tests/languages/javascript/keyword_feature.test @@ -1,27 +1,67 @@ -catch finally; -async function; - -as; await; break; case; -class; const; continue; debugger; -default; delete; do; else; enum; -export; extends; for; -from; if; implements; -import; in; instanceof; interface; let; -new; null; of; package; private; -protected; public; return; static; -super; switch; this; throw; try; -typeof; undefined; var; void; while; -with; yield; +as; +await; +break; +case; +class; +const; +continue; +debugger; +default; +delete; +do; +else; +enum; +export; +extends; +for; +if; +implements; +import; +in; +instanceof; +interface; +let; +new; +null; +of; +package; +private; +protected; +public; +return; +static; +super; +switch; +this; +throw; +try; +typeof; +undefined; +var; +void; +while; +with; +yield; ----------------------------------------------------- +// contextual keywords -[ - ["keyword", "catch"], - ["keyword", "finally"], ["punctuation", ";"], +try {} catch {} finally {} +try {} catch (e) {} finally {} +async function (){} +async a => {} +async (a,b,c) => {} +import {} from "foo" +import {} from 'foo' +class { get foo(){} set baz(){} get [value](){} } - ["keyword", "async"], - ["keyword", "function"], ["punctuation", ";"], +// variables, not keywords + +const { async, from, to } = bar; +promise.catch(foo).finally(bar); + +---------------------------------------------------- +[ ["keyword", "as"], ["punctuation", ";"], ["keyword", "await"], ["punctuation", ";"], ["keyword", "break"], ["punctuation", ";"], @@ -38,7 +78,6 @@ with; yield; ["keyword", "export"], ["punctuation", ";"], ["keyword", "extends"], ["punctuation", ";"], ["keyword", "for"], ["punctuation", ";"], - ["keyword", "from"], ["punctuation", ";"], ["keyword", "if"], ["punctuation", ";"], ["keyword", "implements"], ["punctuation", ";"], ["keyword", "import"], ["punctuation", ";"], @@ -66,7 +105,122 @@ with; yield; ["keyword", "void"], ["punctuation", ";"], ["keyword", "while"], ["punctuation", ";"], ["keyword", "with"], ["punctuation", ";"], - ["keyword", "yield"], ["punctuation", ";"] + ["keyword", "yield"], ["punctuation", ";"], + + ["comment", "// contextual keywords"], + + ["keyword", "try"], + ["punctuation", "{"], + ["punctuation", "}"], + ["keyword", "catch"], + ["punctuation", "{"], + ["punctuation", "}"], + ["keyword", "finally"], + ["punctuation", "{"], + ["punctuation", "}"], + + ["keyword", "try"], + ["punctuation", "{"], + ["punctuation", "}"], + ["keyword", "catch"], + ["punctuation", "("], + "e", + ["punctuation", ")"], + ["punctuation", "{"], + ["punctuation", "}"], + ["keyword", "finally"], + ["punctuation", "{"], + ["punctuation", "}"], + + ["keyword", "async"], + ["keyword", "function"], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", "{"], + ["punctuation", "}"], + + ["keyword", "async"], + ["parameter", ["a"]], + ["operator", "=>"], + ["punctuation", "{"], + ["punctuation", "}"], + + ["keyword", "async"], + ["punctuation", "("], + ["parameter", [ + "a", + ["punctuation", ","], + "b", + ["punctuation", ","], + "c" + ]], + ["punctuation", ")"], + ["operator", "=>"], + ["punctuation", "{"], + ["punctuation", "}"], + + ["keyword", "import"], + ["punctuation", "{"], + ["punctuation", "}"], + ["keyword", "from"], + ["string", "\"foo\""], + + ["keyword", "import"], + ["punctuation", "{"], + ["punctuation", "}"], + ["keyword", "from"], + ["string", "'foo'"], + + ["keyword", "class"], + ["punctuation", "{"], + ["keyword", "get"], + ["function", "foo"], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", "{"], + ["punctuation", "}"], + ["keyword", "set"], + ["function", "baz"], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", "{"], + ["punctuation", "}"], + ["keyword", "get"], + ["punctuation", "["], + "value", + ["punctuation", "]"], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", "{"], + ["punctuation", "}"], + ["punctuation", "}"], + + ["comment", "// variables, not keywords"], + + ["keyword", "const"], + ["punctuation", "{"], + " async", + ["punctuation", ","], + " from", + ["punctuation", ","], + " to ", + ["punctuation", "}"], + ["operator", "="], + " bar", + ["punctuation", ";"], + + "\r\npromise", + ["punctuation", "."], + ["function", "catch"], + ["punctuation", "("], + "foo", + ["punctuation", ")"], + ["punctuation", "."], + ["function", "finally"], + ["punctuation", "("], + "bar", + ["punctuation", ")"], + ["punctuation", ";"] ] ---------------------------------------------------- From 30b0444fcd72b1bb3bd0ec02b395a1d2bf1f93e1 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Fri, 29 Jan 2021 14:52:23 +0100 Subject: [PATCH 0722/1100] JSX: Added support for comments inside tags (#2728) --- components/prism-jsx.js | 7 +- components/prism-jsx.min.js | 2 +- tests/languages/jsx/issue2727.test | 820 +++++++++++++++++++++++++++++ 3 files changed, 827 insertions(+), 2 deletions(-) create mode 100644 tests/languages/jsx/issue2727.test diff --git a/components/prism-jsx.js b/components/prism-jsx.js index 0cb443f2e1..bb87e1ff66 100644 --- a/components/prism-jsx.js +++ b/components/prism-jsx.js @@ -3,11 +3,16 @@ var javascript = Prism.util.clone(Prism.languages.javascript); Prism.languages.jsx = Prism.languages.extend('markup', javascript); -Prism.languages.jsx.tag.pattern = /<\/?(?:[\w.:-]+(?:\s+(?:[\w.:$-]+(?:=(?:"(?:\\[^]|[^\\"])*"|'(?:\\[^]|[^\\'])*'|[^\s{'">=]+|\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])+\}))?|\{\s*\.{3}\s*[a-z_$][\w$]*(?:\.[a-z_$][\w$]*)*\s*\}))*\s*\/?)?>/i; +Prism.languages.jsx.tag.pattern = RegExp( + /<\/?(?:[\w.:-]+(?:+(?:[\w.:$-]+(?:=(?:"(?:\\[^]|[^\\"])*"|'(?:\\[^]|[^\\'])*'|[^\s{'"/>=]+|\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])+\}))?|\{*\.{3}*[a-z_$][\w$]*(?:\.[a-z_$][\w$]*)**\}))**\/?)?>/.source + .replace(//g, function () { return /(?:\s|\/\/.*(?!.)|\/\*(?:[^*]|\*(?!\/))\*\/)/.source }), + 'i' +); Prism.languages.jsx.tag.inside['tag'].pattern = /^<\/?[^\s>\/]*/i; Prism.languages.jsx.tag.inside['attr-value'].pattern = /=(?!\{)(?:"(?:\\[^]|[^\\"])*"|'(?:\\[^]|[^\\'])*'|[^\s'">]+)/i; Prism.languages.jsx.tag.inside['tag'].inside['class-name'] = /^[A-Z]\w*(?:\.[A-Z]\w*)*$/; +Prism.languages.jsx.tag.inside['comment'] = javascript['comment']; Prism.languages.insertBefore('inside', 'attr-name', { 'spread': { diff --git a/components/prism-jsx.min.js b/components/prism-jsx.min.js index f007918692..acb789ee38 100644 --- a/components/prism-jsx.min.js +++ b/components/prism-jsx.min.js @@ -1 +1 @@ -!function(i){var t=i.util.clone(i.languages.javascript);i.languages.jsx=i.languages.extend("markup",t),i.languages.jsx.tag.pattern=/<\/?(?:[\w.:-]+(?:\s+(?:[\w.:$-]+(?:=(?:"(?:\\[^]|[^\\"])*"|'(?:\\[^]|[^\\'])*'|[^\s{'">=]+|\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])+\}))?|\{\s*\.{3}\s*[a-z_$][\w$]*(?:\.[a-z_$][\w$]*)*\s*\}))*\s*\/?)?>/i,i.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/i,i.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:"(?:\\[^]|[^\\"])*"|'(?:\\[^]|[^\\'])*'|[^\s'">]+)/i,i.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,i.languages.insertBefore("inside","attr-name",{spread:{pattern:/\{\s*\.{3}\s*[a-z_$][\w$]*(?:\.[a-z_$][\w$]*)*\s*\}/,inside:{punctuation:/\.{3}|[{}.]/,"attr-value":/\w+/}}},i.languages.jsx.tag),i.languages.insertBefore("inside","attr-value",{script:{pattern:/=(?:\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])+\})/i,inside:{"script-punctuation":{pattern:/^=(?={)/,alias:"punctuation"},rest:i.languages.jsx},alias:"language-javascript"}},i.languages.jsx.tag);var o=function(t){return t?"string"==typeof t?t:"string"==typeof t.content?t.content:t.content.map(o).join(""):""},p=function(t){for(var n=[],e=0;e"===a.content[a.content.length-1].content||n.push({tagName:o(a.content[0].content[1]),openedBraces:0}):0+(?:[\\w.:$-]+(?:=(?:\"(?:\\\\[^]|[^\\\\\"])*\"|'(?:\\\\[^]|[^\\\\'])*'|[^\\s{'\"/>=]+|\\{(?:\\{(?:\\{[^{}]*\\}|[^{}])*\\}|[^{}])+\\}))?|\\{*\\.{3}*[a-z_$][\\w$]*(?:\\.[a-z_$][\\w$]*)**\\}))**/?)?>".replace(//g,function(){return"(?:\\s|//.*(?!.)|/\\*(?:[^*]|\\*(?!/))\\*/)"}),"i"),i.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/i,i.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:"(?:\\[^]|[^\\"])*"|'(?:\\[^]|[^\\'])*'|[^\s'">]+)/i,i.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,i.languages.jsx.tag.inside.comment=t.comment,i.languages.insertBefore("inside","attr-name",{spread:{pattern:/\{\s*\.{3}\s*[a-z_$][\w$]*(?:\.[a-z_$][\w$]*)*\s*\}/,inside:{punctuation:/\.{3}|[{}.]/,"attr-value":/\w+/}}},i.languages.jsx.tag),i.languages.insertBefore("inside","attr-value",{script:{pattern:/=(?:\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])+\})/i,inside:{"script-punctuation":{pattern:/^=(?={)/,alias:"punctuation"},rest:i.languages.jsx},alias:"language-javascript"}},i.languages.jsx.tag);var o=function(t){return t?"string"==typeof t?t:"string"==typeof t.content?t.content:t.content.map(o).join(""):""},c=function(t){for(var n=[],e=0;e"===a.content[a.content.length-1].content||n.push({tagName:o(a.content[0].content[1]),openedBraces:0}):0 + + console.log('bang')} + /> + + console.log(bool)} // true or false + /> + + console.log('bang')} + /> + + + + console.log(bool)} + onChange={(i) => console.log(`My value is ${i}`)} // 0 - this.props.fidelity + /> + + console.log(`My value is ${i}`)} + /> + + console.log(`My value is ${i}`)} // 0 - this.props.fidelity + /> + + console.log('bang')} + // mode 1 onClick + onClick={(bool) => console.log(bool)} + /> + + console.log(bool)} + /> + + console.log(`My index/item is ${x}`)} + /> + + + ) +} + +---------------------------------------------------- + +[ + ["keyword", "import"], " React ", ["keyword", "from"], ["string", "'react'"], + + ["keyword", "import"], + ["operator", "*"], + ["keyword", "as"], + " MaxMSP ", + ["keyword", "from"], + ["string", "'maxmsp-gui'"], + + ["keyword", "import"], + ["string", "'maxmsp-gui/dist/index.css'"], + + ["keyword", "export"], + ["keyword", "default"], + ["keyword", "function"], + ["function", "App"], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", "{"], + + ["keyword", "return"], + ["punctuation", "("], + + ["tag", [ + ["tag", [ + ["punctuation", "<"], + ["class-name", "React.Fragment"] + ]], + ["punctuation", ">"] + ]], + ["plain-text", "\r\n\r\n "], + ["tag", [ + ["tag", [ + ["punctuation", "<"], + ["class-name", "MaxMSP.Bang"] + ]], + + ["attr-name", ["ariaLabel"]], + ["attr-value", [ + ["punctuation", "="], + ["punctuation", "'"], + "set the aria-label tag", + ["punctuation", "'"] + ]], + ["comment", "// defaults to the object name"], + + ["attr-name", ["ariaPressed"]], + ["script", [ + ["script-punctuation", "="], + ["punctuation", "{"], + ["boolean", "true"], + ["operator", "||"], + ["boolean", "false"], + ["punctuation", "}"] + ]], + ["comment", "// default null"], + + ["attr-name", ["onClick"]], + ["script", [ + ["script-punctuation", "="], + ["punctuation", "{"], + ["punctuation", "("], + ["punctuation", ")"], + ["operator", "=>"], + " console", + ["punctuation", "."], + ["function", "log"], + ["punctuation", "("], + ["string", "'bang'"], + ["punctuation", ")"], + ["punctuation", "}"] + ]], + + ["punctuation", "/>"] + ]], + ["plain-text", "\r\n\r\n "], + ["tag", [ + ["tag", [ + ["punctuation", "<"], + ["class-name", "MaxMSP.Ezdac"] + ]], + + ["attr-name", ["ariaLabel"]], + ["attr-value", [ + ["punctuation", "="], + ["punctuation", "'"], + "set the aria-label tag", + ["punctuation", "'"] + ]], + ["comment", "// defaults to the object name"], + + ["attr-name", ["value"]], + ["script", [ + ["script-punctuation", "="], + ["punctuation", "{"], + ["boolean", "true"], + ["operator", "||"], + ["boolean", "false"], + ["punctuation", "}"] + ]], + ["comment", "// default false"], + + ["attr-name", ["onClick"]], + ["script", [ + ["script-punctuation", "="], + ["punctuation", "{"], + ["punctuation", "("], + ["parameter", ["bool"]], + ["punctuation", ")"], + ["operator", "=>"], + " console", + ["punctuation", "."], + ["function", "log"], + ["punctuation", "("], + "bool", + ["punctuation", ")"], + ["punctuation", "}"] + ]], + ["comment", "// true or false"], + + ["punctuation", "/>"] + ]], + ["plain-text", "\r\n\r\n "], + ["tag", [ + ["tag", [ + ["punctuation", "<"], + ["class-name", "MaxMSP.Message"] + ]], + + ["attr-name", ["ariaLabel"]], + ["attr-value", [ + ["punctuation", "="], + ["punctuation", "'"], + "set the aria-label tag", + ["punctuation", "'"] + ]], + ["comment", "// defaults to the object name"], + + ["attr-name", ["ariaPressed"]], + ["script", [ + ["script-punctuation", "="], + ["punctuation", "{"], + ["boolean", "true"], + ["operator", "||"], + ["boolean", "false"], + ["punctuation", "}"] + ]], + ["comment", "// default null"], + + ["attr-name", ["text"]], + ["attr-value", [ + ["punctuation", "="], + ["punctuation", "'"], + "What does the message say?", + ["punctuation", "'"] + ]], + + ["attr-name", ["onClick"]], + ["script", [ + ["script-punctuation", "="], + ["punctuation", "{"], + ["punctuation", "("], + ["punctuation", ")"], + ["operator", "=>"], + " console", + ["punctuation", "."], + ["function", "log"], + ["punctuation", "("], + ["string", "'bang'"], + ["punctuation", ")"], + ["punctuation", "}"] + ]], + + ["punctuation", "/>"] + ]], + ["plain-text", "\r\n\r\n "], + ["tag", [ + ["tag", [ + ["punctuation", "<"], + ["class-name", "MaxMSP.Object"] + ]], + + ["attr-name", ["inactive"]], + ["script", [ + ["script-punctuation", "="], + ["punctuation", "{"], + ["boolean", "true"], + ["operator", "||"], + ["boolean", "false"], + ["punctuation", "}"] + ]], + ["comment", "// default false"], + + ["attr-name", ["text"]], + ["attr-value", [ + ["punctuation", "="], + ["punctuation", "'"], + "What is the object called?", + ["punctuation", "'"] + ]], + + ["punctuation", "/>"] + ]], + ["plain-text", "\r\n\r\n "], + ["tag", [ + ["tag", [ + ["punctuation", "<"], + ["class-name", "MaxMSP.Playbar"] + ]], + + ["attr-name", ["ariaLabel"]], + ["attr-value", [ + ["punctuation", "="], + ["punctuation", "'"], + "set the aria-label tag", + ["punctuation", "'"] + ]], + ["comment", "// defaults to the object name"], + + ["attr-name", ["fidelity"]], + ["script", [ + ["script-punctuation", "="], + ["punctuation", "{"], + ["number", "100"], + ["punctuation", "}"] + ]], + ["comment", "// max output of slider, default 100"], + + ["attr-name", ["inactive"]], + ["script", [ + ["script-punctuation", "="], + ["punctuation", "{"], + ["boolean", "true"], + ["operator", "||"], + ["boolean", "false"], + ["punctuation", "}"] + ]], + ["comment", "// diable user interaction, default false"], + + ["attr-name", ["setPlaying"]], + ["script", [ + ["script-punctuation", "="], + ["punctuation", "{"], + ["boolean", "true"], + ["operator", "||"], + ["boolean", "false"], + ["punctuation", "}"] + ]], + ["comment", "// set isPlaying externally"], + + ["attr-name", ["value"]], + ["script", [ + ["script-punctuation", "="], + ["punctuation", "{"], + ["number", "50"], + ["punctuation", "}"] + ]], + ["comment", "// inital/updated state, 0 to this.props.fidelity, default 0"], + + ["attr-name", ["width"]], + ["script", [ + ["script-punctuation", "="], + ["punctuation", "{"], + ["number", "200"], + ["punctuation", "}"] + ]], + ["comment", "// width of the slider in pixels, default 200"], + + ["attr-name", ["isPlaying"]], + ["script", [ + ["script-punctuation", "="], + ["punctuation", "{"], + ["punctuation", "("], + ["parameter", ["bool"]], + ["punctuation", ")"], + ["operator", "=>"], + " console", + ["punctuation", "."], + ["function", "log"], + ["punctuation", "("], + "bool", + ["punctuation", ")"], + ["punctuation", "}"] + ]], + + ["attr-name", ["onChange"]], + ["script", [ + ["script-punctuation", "="], + ["punctuation", "{"], + ["punctuation", "("], + ["parameter", ["i"]], + ["punctuation", ")"], + ["operator", "=>"], + " console", + ["punctuation", "."], + ["function", "log"], + ["punctuation", "("], + ["template-string", [ + ["template-punctuation", "`"], + ["string", "My value is "], + ["interpolation", [ + ["interpolation-punctuation", "${"], + "i", + ["interpolation-punctuation", "}"] + ]], + ["template-punctuation", "`"] + ]], + ["punctuation", ")"], + ["punctuation", "}"] + ]], + ["comment", "// 0 - this.props.fidelity"], + + ["punctuation", "/>"] + ]], + ["plain-text", "\r\n\r\n "], + ["tag", [ + ["tag", [ + ["punctuation", "<"], + ["class-name", "MaxMSP.RadioGroup"] + ]], + + ["attr-name", ["ariaLabel"]], + ["attr-value", [ + ["punctuation", "="], + ["punctuation", "'"], + "set the aria-label tag", + ["punctuation", "'"] + ]], + ["comment", "// defaults to the object name"], + + ["attr-name", ["items"]], + ["script", [ + ["script-punctuation", "="], + ["punctuation", "{"], + ["punctuation", "["], + ["string", "'array'"], + ["punctuation", ","], + ["string", "'of'"], + ["punctuation", ","], + ["string", "'items'"], + ["punctuation", "]"], + ["punctuation", "}"] + ]], + ["comment", "// this sets the amount of radiobuttons, strings create text alongside each button"], + + ["attr-name", ["spacing"]], + ["script", [ + ["script-punctuation", "="], + ["punctuation", "{"], + ["number", "24"], + ["punctuation", "}"] + ]], + ["comment", "// the height of each button in pixels, defualt 20"], + + ["attr-name", ["value"]], + ["script", [ + ["script-punctuation", "="], + ["punctuation", "{"], + "i", + ["punctuation", "}"] + ]], + ["comment", "// this.props.items[i], default 0"], + + ["attr-name", ["onClick"]], + ["script", [ + ["script-punctuation", "="], + ["punctuation", "{"], + ["punctuation", "("], + ["parameter", ["i"]], + ["punctuation", ")"], + ["operator", "=>"], + " console", + ["punctuation", "."], + ["function", "log"], + ["punctuation", "("], + ["template-string", [ + ["template-punctuation", "`"], + ["string", "My value is "], + ["interpolation", [ + ["interpolation-punctuation", "${"], + "i", + ["interpolation-punctuation", "}"] + ]], + ["template-punctuation", "`"] + ]], + ["punctuation", ")"], + ["punctuation", "}"] + ]], + + ["punctuation", "/>"] + ]], + ["plain-text", "\r\n\r\n "], + ["tag", [ + ["tag", [ + ["punctuation", "<"], + ["class-name", "MaxMSP.Slider"] + ]], + + ["attr-name", ["ariaLabel"]], + ["attr-value", [ + ["punctuation", "="], + ["punctuation", "'"], + "set the aria-label tag", + ["punctuation", "'"] + ]], + ["comment", "// defaults to the object name"], + + ["attr-name", ["fidelity"]], + ["script", [ + ["script-punctuation", "="], + ["punctuation", "{"], + ["number", "100"], + ["punctuation", "}"] + ]], + ["comment", "// max output of slider, default 100"], + + ["attr-name", ["length"]], + ["script", [ + ["script-punctuation", "="], + ["punctuation", "{"], + ["number", "200"], + ["punctuation", "}"] + ]], + ["comment", "// width of the slider in pixels, default 200"], + + ["attr-name", ["value"]], + ["script", [ + ["script-punctuation", "="], + ["punctuation", "{"], + ["number", "50"], + ["punctuation", "}"] + ]], + ["comment", "// inital/updated state, 0 to this.props.fidelity, default 0"], + + ["attr-name", ["onChange"]], + ["script", [ + ["script-punctuation", "="], + ["punctuation", "{"], + ["punctuation", "("], + ["parameter", ["i"]], + ["punctuation", ")"], + ["operator", "=>"], + " console", + ["punctuation", "."], + ["function", "log"], + ["punctuation", "("], + ["template-string", [ + ["template-punctuation", "`"], + ["string", "My value is "], + ["interpolation", [ + ["interpolation-punctuation", "${"], + "i", + ["interpolation-punctuation", "}"] + ]], + ["template-punctuation", "`"] + ]], + ["punctuation", ")"], + ["punctuation", "}"] + ]], + ["comment", "// 0 - this.props.fidelity"], + + ["punctuation", "/>"] + ]], + ["plain-text", "\r\n\r\n "], + ["tag", [ + ["tag", [ + ["punctuation", "<"], + ["class-name", "MaxMSP.TextButton"] + ]], + + ["attr-name", ["ariaLabel"]], + ["attr-value", [ + ["punctuation", "="], + ["punctuation", "'"], + "set the aria-label tag", + ["punctuation", "'"] + ]], + ["comment", "// defaults to the object name"], + + ["attr-name", ["ariaPressed"]], + ["script", [ + ["script-punctuation", "="], + ["punctuation", "{"], + ["boolean", "true"], + ["operator", "||"], + ["boolean", "false"], + ["punctuation", "}"] + ]], + ["comment", "// default null, for mode 'false' only"], + + ["attr-name", ["inactive"]], + ["script", [ + ["script-punctuation", "="], + ["punctuation", "{"], + ["boolean", "true"], + ["operator", "||"], + ["boolean", "false"], + ["punctuation", "}"] + ]], + ["comment", "// diable user interaction, default false"], + + ["attr-name", ["mode"]], + ["script", [ + ["script-punctuation", "="], + ["punctuation", "{"], + ["boolean", "true"], + ["operator", "||"], + ["boolean", "false"], + ["punctuation", "}"] + ]], + ["comment", "// true for toggle, false for bang, default false"], + + ["attr-name", ["text"]], + ["attr-value", [ + ["punctuation", "="], + ["punctuation", "'"], + "What does the textbutton say?", + ["punctuation", "'"] + ]], + + ["attr-name", ["toggleText"]], + ["attr-value", [ + ["punctuation", "="], + ["punctuation", "'"], + "What does the toggled textbutton say?", + ["punctuation", "'"] + ]], + + ["attr-name", ["value"]], + ["script", [ + ["script-punctuation", "="], + ["punctuation", "{"], + ["boolean", "true"], + ["operator", "||"], + ["boolean", "false"], + ["punctuation", "}"] + ]], + ["comment", "// default false, for mode 'true' only"], + + ["comment", "// mode 0 onClick"], + + ["attr-name", ["onClick"]], + ["script", [ + ["script-punctuation", "="], + ["punctuation", "{"], + ["punctuation", "("], + ["punctuation", ")"], + ["operator", "=>"], + " console", + ["punctuation", "."], + ["function", "log"], + ["punctuation", "("], + ["string", "'bang'"], + ["punctuation", ")"], + ["punctuation", "}"] + ]], + + ["comment", "// mode 1 onClick"], + + ["attr-name", ["onClick"]], + ["script", [ + ["script-punctuation", "="], + ["punctuation", "{"], + ["punctuation", "("], + ["parameter", ["bool"]], + ["punctuation", ")"], + ["operator", "=>"], + " console", + ["punctuation", "."], + ["function", "log"], + ["punctuation", "("], + "bool", + ["punctuation", ")"], + ["punctuation", "}"] + ]], + + ["punctuation", "/>"] + ]], + ["plain-text", "\r\n\r\n "], + ["tag", [ + ["tag", [ + ["punctuation", "<"], + ["class-name", "MaxMSP.Toggle"] + ]], + + ["attr-name", ["ariaLabel"]], + ["attr-value", [ + ["punctuation", "="], + ["punctuation", "'"], + "set the aria-label tag", + ["punctuation", "'"] + ]], + ["comment", "// defaults to the object name"], + + ["attr-name", ["value"]], + ["script", [ + ["script-punctuation", "="], + ["punctuation", "{"], + ["boolean", "true"], + ["operator", "||"], + ["boolean", "false"], + ["punctuation", "}"] + ]], + ["comment", "// default false"], + + ["attr-name", ["onClick"]], + ["script", [ + ["script-punctuation", "="], + ["punctuation", "{"], + ["punctuation", "("], + ["parameter", ["bool"]], + ["punctuation", ")"], + ["operator", "=>"], + " console", + ["punctuation", "."], + ["function", "log"], + ["punctuation", "("], + "bool", + ["punctuation", ")"], + ["punctuation", "}"] + ]], + + ["punctuation", "/>"] + ]], + ["plain-text", "\r\n\r\n "], + ["tag", [ + ["tag", [ + ["punctuation", "<"], + ["class-name", "MaxMSP.Umenu"] + ]], + + ["attr-name", ["ariaLabel"]], + ["attr-value", [ + ["punctuation", "="], + ["punctuation", "'"], + "set the aria-label tag", + ["punctuation", "'"] + ]], + ["comment", "// defaults to the object name"], + + ["attr-name", ["items"]], + ["script", [ + ["script-punctuation", "="], + ["punctuation", "{"], + ["punctuation", "["], + ["string", "'array'"], + ["punctuation", ","], + ["string", "'of'"], + ["punctuation", ","], + ["string", "'items'"], + ["punctuation", "]"], + ["punctuation", "}"] + ]], + + ["attr-name", ["outputSymbol"]], + ["script", [ + ["script-punctuation", "="], + ["punctuation", "{"], + ["boolean", "true"], + ["operator", "||"], + ["boolean", "false"], + ["punctuation", "}"] + ]], + ["comment", "// true for symbol false for int, default false"], + + ["attr-name", ["value"]], + ["script", [ + ["script-punctuation", "="], + ["punctuation", "{"], + "i", + ["punctuation", "}"] + ]], + ["comment", "// this.props.items[i], default 0"], + + ["attr-name", ["width"]], + ["script", [ + ["script-punctuation", "="], + ["punctuation", "{"], + ["number", "200"], + ["punctuation", "}"] + ]], + ["comment", "// width of the umenu in pixels, default 100"], + + ["attr-name", ["onChange"]], + ["script", [ + ["script-punctuation", "="], + ["punctuation", "{"], + ["punctuation", "("], + ["parameter", ["x"]], + ["punctuation", ")"], + ["operator", "=>"], + " console", + ["punctuation", "."], + ["function", "log"], + ["punctuation", "("], + ["template-string", [ + ["template-punctuation", "`"], + ["string", "My index/item is "], + ["interpolation", [ + ["interpolation-punctuation", "${"], + "x", + ["interpolation-punctuation", "}"] + ]], + ["template-punctuation", "`"] + ]], + ["punctuation", ")"], + ["punctuation", "}"] + ]], + + ["punctuation", "/>"] + ]], + ["plain-text", "\r\n\r\n "], + ["tag", [ + ["tag", [ + ["punctuation", ""] + ]], + + ["punctuation", ")"], + + ["punctuation", "}"] +] \ No newline at end of file From 2b355c98720b7c4f697200d666ddfdcfc3350dbe Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Fri, 29 Jan 2021 14:57:36 +0100 Subject: [PATCH 0723/1100] Markdown: Workaround for incorrect highlighting due to double `wrap` hook (#2719) The hook that highlights code blocks in markdown code was unable to handle code blocks that were highlighted already. The hook can now handle any existing markup in markdown code blocks. --- components/prism-markdown.js | 6 ++++-- components/prism-markdown.min.js | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/components/prism-markdown.js b/components/prism-markdown.js index d0f35812bb..5c2ca6f91c 100644 --- a/components/prism-markdown.js +++ b/components/prism-markdown.js @@ -347,8 +347,10 @@ }); } } else { - // reverse Prism.util.encode - var code = env.content.replace(/</g, '<').replace(/&/g, '&'); + // get the textContent of the given env HTML + var tempContainer = document.createElement('div'); + tempContainer.innerHTML = env.content; + var code = tempContainer.textContent; env.content = Prism.highlight(code, grammar, codeLang); } diff --git a/components/prism-markdown.min.js b/components/prism-markdown.min.js index 8e761db472..3d23f8811f 100644 --- a/components/prism-markdown.min.js +++ b/components/prism-markdown.min.js @@ -1 +1 @@ -!function(d){function n(n){return n=n.replace(//g,function(){return"(?:\\\\.|[^\\\\\n\r]|(?:\n|\r\n?)(?!\n|\r\n?))"}),RegExp("((?:^|[^\\\\])(?:\\\\{2})*)(?:"+n+")")}var e="(?:\\\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\\\|\r\n`])+",t="\\|?__(?:\\|__)+\\|?(?:(?:\n|\r\n?)|(?![^]))".replace(/__/g,function(){return e}),a="\\|?[ \t]*:?-{3,}:?[ \t]*(?:\\|[ \t]*:?-{3,}:?[ \t]*)+\\|?(?:\n|\r\n?)";d.languages.markdown=d.languages.extend("markup",{}),d.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"font-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:d.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+t+a+"(?:"+t+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+t+a+")(?:"+t+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(e),inside:d.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+t+")"+a+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+t+"$"),inside:{"table-header":{pattern:RegExp(e),alias:"important",inside:d.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/``.+?``|`[^`\r\n]+`/,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n("\\b__(?:(?!_)|_(?:(?!_))+_)+__\\b|\\*\\*(?:(?!\\*)|\\*(?:(?!\\*))+\\*)+\\*\\*"),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n("\\b_(?:(?!_)|__(?:(?!_))+__)+_\\b|\\*(?:(?!\\*)|\\*\\*(?:(?!\\*))+\\*\\*)+\\*"),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n("(~~?)(?:(?!~))+?\\2"),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},url:{pattern:n('!?\\[(?:(?!\\]))+\\](?:\\([^\\s)]+(?:[\t ]+"(?:\\\\.|[^"\\\\])*")?\\)|[ \t]?\\[(?:(?!\\]))+\\])'),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach(function(e){["url","bold","italic","strike"].forEach(function(n){e!==n&&(d.languages.markdown[e].inside.content.inside[n]=d.languages.markdown[n])})}),d.hooks.add("after-tokenize",function(n){"markdown"!==n.language&&"md"!==n.language||!function n(e){if(e&&"string"!=typeof e)for(var t=0,a=e.length;t/g,function(){return"(?:\\\\.|[^\\\\\n\r]|(?:\n|\r\n?)(?!\n|\r\n?))"}),RegExp("((?:^|[^\\\\])(?:\\\\{2})*)(?:"+n+")")}var e="(?:\\\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\\\|\r\n`])+",t="\\|?__(?:\\|__)+\\|?(?:(?:\n|\r\n?)|(?![^]))".replace(/__/g,function(){return e}),a="\\|?[ \t]*:?-{3,}:?[ \t]*(?:\\|[ \t]*:?-{3,}:?[ \t]*)+\\|?(?:\n|\r\n?)";u.languages.markdown=u.languages.extend("markup",{}),u.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"font-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:u.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+t+a+"(?:"+t+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+t+a+")(?:"+t+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(e),inside:u.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+t+")"+a+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+t+"$"),inside:{"table-header":{pattern:RegExp(e),alias:"important",inside:u.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/``.+?``|`[^`\r\n]+`/,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n("\\b__(?:(?!_)|_(?:(?!_))+_)+__\\b|\\*\\*(?:(?!\\*)|\\*(?:(?!\\*))+\\*)+\\*\\*"),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n("\\b_(?:(?!_)|__(?:(?!_))+__)+_\\b|\\*(?:(?!\\*)|\\*\\*(?:(?!\\*))+\\*\\*)+\\*"),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n("(~~?)(?:(?!~))+?\\2"),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},url:{pattern:n('!?\\[(?:(?!\\]))+\\](?:\\([^\\s)]+(?:[\t ]+"(?:\\\\.|[^"\\\\])*")?\\)|[ \t]?\\[(?:(?!\\]))+\\])'),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach(function(e){["url","bold","italic","strike"].forEach(function(n){e!==n&&(u.languages.markdown[e].inside.content.inside[n]=u.languages.markdown[n])})}),u.hooks.add("after-tokenize",function(n){"markdown"!==n.language&&"md"!==n.language||!function n(e){if(e&&"string"!=typeof e)for(var t=0,a=e.length;t Date: Fri, 29 Jan 2021 15:01:24 +0100 Subject: [PATCH 0724/1100] Added support for Squirrel (#2721) --- components.js | 2 +- components.json | 5 + components/prism-squirrel.js | 46 +++++++++ components/prism-squirrel.min.js | 1 + examples/prism-squirrel.html | 57 ++++++++++++ plugins/autoloader/prism-autoloader.js | 1 + plugins/autoloader/prism-autoloader.min.js | 2 +- .../languages/squirrel/attribute_feature.test | 93 +++++++++++++++++++ tests/languages/squirrel/boolean_feature.test | 9 ++ .../squirrel/class-name_feature.test | 45 +++++++++ tests/languages/squirrel/comment_feature.test | 15 +++ .../languages/squirrel/function_feature.test | 44 +++++++++ tests/languages/squirrel/keyword_feature.test | 75 +++++++++++++++ tests/languages/squirrel/number_feature.test | 21 +++++ .../languages/squirrel/operator_feature.test | 46 +++++++++ .../squirrel/punctuation_feature.test | 17 ++++ tests/languages/squirrel/string_feature.test | 37 ++++++++ 17 files changed, 514 insertions(+), 2 deletions(-) create mode 100644 components/prism-squirrel.js create mode 100644 components/prism-squirrel.min.js create mode 100644 examples/prism-squirrel.html create mode 100644 tests/languages/squirrel/attribute_feature.test create mode 100644 tests/languages/squirrel/boolean_feature.test create mode 100644 tests/languages/squirrel/class-name_feature.test create mode 100644 tests/languages/squirrel/comment_feature.test create mode 100644 tests/languages/squirrel/function_feature.test create mode 100644 tests/languages/squirrel/keyword_feature.test create mode 100644 tests/languages/squirrel/number_feature.test create mode 100644 tests/languages/squirrel/operator_feature.test create mode 100644 tests/languages/squirrel/punctuation_feature.test create mode 100644 tests/languages/squirrel/string_feature.test diff --git a/components.js b/components.js index 0c40b4c2b6..69c73aa229 100644 --- a/components.js +++ b/components.js @@ -1,2 +1,2 @@ -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml","ssml","atom","rss"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","ssml":"SSML","atom":"Atom","rss":"RSS"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","optional":"regex","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"ABNF","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"agda":{"title":"Agda","owner":"xy-ren"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apex":{"title":"Apex","require":["clike","sql"],"owner":"RunDevelopment"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"dkern"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"birb":{"title":"Birb","require":"clike","owner":"Calamity210"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"BNF","alias":"rbnf","aliasTitles":{"rbnf":"RBNF"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"bsl":{"title":"BSL (1C:Enterprise)","alias":"oscript","aliasTitles":{"oscript":"OneScript"},"owner":"Diversus23"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"chaiscript":{"title":"ChaiScript","require":["clike","cpp"],"owner":"RunDevelopment"},"cil":{"title":"CIL","owner":"sbrl"},"clojure":{"title":"Clojure","owner":"troglotit"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"cypher":{"title":"Cypher","owner":"RunDevelopment"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dataweave":{"title":"DataWeave","owner":"machaval"},"dax":{"title":"DAX","owner":"peterbud"},"dhall":{"title":"Dhall","owner":"RunDevelopment"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"dot":{"title":"DOT (Graphviz)","alias":"gv","optional":"markup","owner":"RunDevelopment"},"ebnf":{"title":"EBNF","owner":"RunDevelopment"},"editorconfig":{"title":"EditorConfig","owner":"osipxd"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"c","owner":"Golmote"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","optional":["markdown"],"owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"hlsl":{"title":"HLSL","require":"c","owner":"RunDevelopment"},"http":{"title":"HTTP","optional":["css","javascript","json","markup","uri"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"ignore":{"title":".ignore","owner":"osipxd","alias":["gitignore","hgignore","npmignore"],"aliasTitles":{"gitignore":".gitignore","hgignore":".hgignore","npmignore":".npmignore"}},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike","typescript"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","alias":"webmanifest","aliasTitles":{"webmanifest":"Web App Manifest"},"owner":"CupOfTea696"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"jsstacktrace":{"title":"JS stack trace","owner":"sbrl"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","alias":["kt","kts"],"aliasTitles":{"kts":"Kotlin Script"},"require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","optional":"yaml","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"mongodb":{"title":"MongoDB","owner":"airs0urce","require":"javascript"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"naniscript":{"title":"Naninovel Script","owner":"Elringus","alias":"nani"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"psl":{"title":"PATROL Scripting Language","owner":"bertysentry"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":"markup-templating","owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"promql":{"title":"PromQL","owner":"arendjr"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"purebasic":{"title":"PureBasic","require":"clike","alias":"pbfasm","owner":"HeX0R101"},"purescript":{"title":"PureScript","require":"haskell","alias":"purs","owner":"sriharshachilakapati"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"racket":{"title":"Racket","require":"scheme","alias":"rkt","owner":"RunDevelopment"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","owner":"RunDevelopment"},"renpy":{"title":"Ren'py","alias":"rpy","owner":"HyuchiaDiego"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","alias":["sh-session","shellsession"],"owner":"RunDevelopment"},"smali":{"title":"Smali","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sml":{"title":"SML","alias":"smlnj","aliasTitles":{"smlnj":"SML/NJ"},"owner":"RunDevelopment"},"solidity":{"title":"Solidity (Ethereum)","alias":"sol","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"stan":{"title":"Stan","owner":"RunDevelopment"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","vbnet"],"owner":"RunDevelopment"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"typoscript":{"title":"TypoScript","alias":"tsconfig","aliasTitles":{"tsconfig":"TSConfig"},"owner":"dkern"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"uri":{"title":"URI","alias":"url","aliasTitles":{"url":"URL"},"owner":"RunDevelopment"},"v":{"title":"V","require":"clike","owner":"taggon"},"vala":{"title":"Vala","require":"clike","optional":"regex","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":["vb","vba"],"aliasTitles":{"vba":"VBA"},"owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xml-doc":{"title":"XML doc (.net)","require":"markup","modify":["csharp","fsharp","vbnet"],"owner":"RunDevelopment"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"yang":{"title":"YANG","owner":"RunDevelopment"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml","ssml","atom","rss"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","ssml":"SSML","atom":"Atom","rss":"RSS"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","optional":"regex","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"ABNF","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"agda":{"title":"Agda","owner":"xy-ren"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apex":{"title":"Apex","require":["clike","sql"],"owner":"RunDevelopment"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"dkern"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"birb":{"title":"Birb","require":"clike","owner":"Calamity210"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"BNF","alias":"rbnf","aliasTitles":{"rbnf":"RBNF"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"bsl":{"title":"BSL (1C:Enterprise)","alias":"oscript","aliasTitles":{"oscript":"OneScript"},"owner":"Diversus23"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"chaiscript":{"title":"ChaiScript","require":["clike","cpp"],"owner":"RunDevelopment"},"cil":{"title":"CIL","owner":"sbrl"},"clojure":{"title":"Clojure","owner":"troglotit"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"cypher":{"title":"Cypher","owner":"RunDevelopment"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dataweave":{"title":"DataWeave","owner":"machaval"},"dax":{"title":"DAX","owner":"peterbud"},"dhall":{"title":"Dhall","owner":"RunDevelopment"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"dot":{"title":"DOT (Graphviz)","alias":"gv","optional":"markup","owner":"RunDevelopment"},"ebnf":{"title":"EBNF","owner":"RunDevelopment"},"editorconfig":{"title":"EditorConfig","owner":"osipxd"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"c","owner":"Golmote"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","optional":["markdown"],"owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"hlsl":{"title":"HLSL","require":"c","owner":"RunDevelopment"},"http":{"title":"HTTP","optional":["css","javascript","json","markup","uri"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"ignore":{"title":".ignore","owner":"osipxd","alias":["gitignore","hgignore","npmignore"],"aliasTitles":{"gitignore":".gitignore","hgignore":".hgignore","npmignore":".npmignore"}},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike","typescript"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","alias":"webmanifest","aliasTitles":{"webmanifest":"Web App Manifest"},"owner":"CupOfTea696"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"jsstacktrace":{"title":"JS stack trace","owner":"sbrl"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","alias":["kt","kts"],"aliasTitles":{"kts":"Kotlin Script"},"require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","optional":"yaml","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"mongodb":{"title":"MongoDB","owner":"airs0urce","require":"javascript"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"naniscript":{"title":"Naninovel Script","owner":"Elringus","alias":"nani"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"psl":{"title":"PATROL Scripting Language","owner":"bertysentry"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":"markup-templating","owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"promql":{"title":"PromQL","owner":"arendjr"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"purebasic":{"title":"PureBasic","require":"clike","alias":"pbfasm","owner":"HeX0R101"},"purescript":{"title":"PureScript","require":"haskell","alias":"purs","owner":"sriharshachilakapati"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"racket":{"title":"Racket","require":"scheme","alias":"rkt","owner":"RunDevelopment"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","owner":"RunDevelopment"},"renpy":{"title":"Ren'py","alias":"rpy","owner":"HyuchiaDiego"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","alias":["sh-session","shellsession"],"owner":"RunDevelopment"},"smali":{"title":"Smali","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sml":{"title":"SML","alias":"smlnj","aliasTitles":{"smlnj":"SML/NJ"},"owner":"RunDevelopment"},"solidity":{"title":"Solidity (Ethereum)","alias":"sol","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"squirrel":{"title":"Squirrel","require":"clike","owner":"RunDevelopment"},"stan":{"title":"Stan","owner":"RunDevelopment"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","vbnet"],"owner":"RunDevelopment"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"typoscript":{"title":"TypoScript","alias":"tsconfig","aliasTitles":{"tsconfig":"TSConfig"},"owner":"dkern"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"uri":{"title":"URI","alias":"url","aliasTitles":{"url":"URL"},"owner":"RunDevelopment"},"v":{"title":"V","require":"clike","owner":"taggon"},"vala":{"title":"Vala","require":"clike","optional":"regex","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":["vb","vba"],"aliasTitles":{"vba":"VBA"},"owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xml-doc":{"title":"XML doc (.net)","require":"markup","modify":["csharp","fsharp","vbnet"],"owner":"RunDevelopment"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"yang":{"title":"YANG","owner":"RunDevelopment"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; if (typeof module !== 'undefined' && module.exports) { module.exports = components; } \ No newline at end of file diff --git a/components.json b/components.json index 99fb66ec17..a0ac3f5ceb 100644 --- a/components.json +++ b/components.json @@ -1126,6 +1126,11 @@ "title": "SQL", "owner": "multipetros" }, + "squirrel": { + "title": "Squirrel", + "require": "clike", + "owner": "RunDevelopment" + }, "stan": { "title": "Stan", "owner": "RunDevelopment" diff --git a/components/prism-squirrel.js b/components/prism-squirrel.js new file mode 100644 index 0000000000..2116258e15 --- /dev/null +++ b/components/prism-squirrel.js @@ -0,0 +1,46 @@ +Prism.languages.squirrel = Prism.languages.extend('clike', { + 'comment': [ + Prism.languages.clike['comment'][0], + { + pattern: /(^|[^\\:])(?:\/\/|#).*/, + lookbehind: true, + greedy: true + } + ], + 'string': [ + { + pattern: /(^|[^\\"'@])(?:@"(?:[^"]|"")*"(?!")|"(?:[^\\\r\n"]|\\.)*")/, + lookbehind: true, + greedy: true + }, + { + pattern: /(^|[^\\"'])'(?:[^\\']|\\(?:[xuU][0-9a-fA-F]{0,8}|[^]))'/, + lookbehind: true, + greedy: true + } + ], + + 'class-name': { + pattern: /(\b(?:class|enum|extends|instanceof)\s+)\w+(?:\.\w+)*/, + lookbehind: true, + inside: { + 'punctuation': /\./ + } + }, + 'keyword': /\b(?:base|break|case|catch|class|clone|const|constructor|continue|default|delete|else|enum|extends|for|foreach|function|if|in|instanceof|local|null|resume|return|static|switch|this|throw|try|typeof|while|yield|__LINE__|__FILE__)\b/, + + 'number': /\b(?:0x[0-9a-fA-F]+|\d+(?:\.(?:\d+|[eE][+-]?\d+))?)\b/, + 'operator': /\+\+|--|<=>|<[-<]|>>>?|&&?|\|\|?|[-+*/%!=<>]=?|[~^]|::?/, + 'punctuation': /[(){}\[\],;.]/ +}); + +Prism.languages.insertBefore('squirrel', 'operator', { + 'attribute-punctuation': { + pattern: /<\/|\/>/, + alias: 'important' + }, + 'lambda': { + pattern: /@(?=\()/, + alias: 'operator' + } +}); diff --git a/components/prism-squirrel.min.js b/components/prism-squirrel.min.js new file mode 100644 index 0000000000..09b78ec75f --- /dev/null +++ b/components/prism-squirrel.min.js @@ -0,0 +1 @@ +Prism.languages.squirrel=Prism.languages.extend("clike",{comment:[Prism.languages.clike.comment[0],{pattern:/(^|[^\\:])(?:\/\/|#).*/,lookbehind:!0,greedy:!0}],string:[{pattern:/(^|[^\\"'@])(?:@"(?:[^"]|"")*"(?!")|"(?:[^\\\r\n"]|\\.)*")/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\"'])'(?:[^\\']|\\(?:[xuU][0-9a-fA-F]{0,8}|[^]))'/,lookbehind:!0,greedy:!0}],"class-name":{pattern:/(\b(?:class|enum|extends|instanceof)\s+)\w+(?:\.\w+)*/,lookbehind:!0,inside:{punctuation:/\./}},keyword:/\b(?:base|break|case|catch|class|clone|const|constructor|continue|default|delete|else|enum|extends|for|foreach|function|if|in|instanceof|local|null|resume|return|static|switch|this|throw|try|typeof|while|yield|__LINE__|__FILE__)\b/,number:/\b(?:0x[0-9a-fA-F]+|\d+(?:\.(?:\d+|[eE][+-]?\d+))?)\b/,operator:/\+\+|--|<=>|<[-<]|>>>?|&&?|\|\|?|[-+*/%!=<>]=?|[~^]|::?/,punctuation:/[(){}\[\],;.]/}),Prism.languages.insertBefore("squirrel","operator",{"attribute-punctuation":{pattern:/<\/|\/>/,alias:"important"},lambda:{pattern:/@(?=\()/,alias:"operator"}}); \ No newline at end of file diff --git a/examples/prism-squirrel.html b/examples/prism-squirrel.html new file mode 100644 index 0000000000..14ff2d6af3 --- /dev/null +++ b/examples/prism-squirrel.html @@ -0,0 +1,57 @@ +

        Full example

        +
         // source: http://www.squirrel-lang.org/#look
        +
        +local table = {
        +	a = "10"
        +	subtable = {
        +		array = [1,2,3]
        +	},
        +	[10 + 123] = "expression index"
        +}
        +
        +local array=[ 1, 2, 3, { a = 10, b = "string" } ];
        +
        +foreach (i,val in array)
        +{
        +	::print("the type of val is"+typeof val);
        +}
        +
        +/////////////////////////////////////////////
        +
        +class Entity
        +{
        +	constructor(etype,entityname)
        +	{
        +		name = entityname;
        +		type = etype;
        +	}
        +
        +	x = 0;
        +	y = 0;
        +	z = 0;
        +	name = null;
        +	type = null;
        +}
        +
        +function Entity::MoveTo(newx,newy,newz)
        +{
        +	x = newx;
        +	y = newy;
        +	z = newz;
        +}
        +
        +class Player extends Entity {
        +	constructor(entityname)
        +	{
        +		base.constructor("Player",entityname)
        +	}
        +	function DoDomething()
        +	{
        +		::print("something");
        +	}
        +
        +}
        +
        +local newplayer = Player("da playar");
        +
        +newplayer.MoveTo(100,200,300);
        diff --git a/plugins/autoloader/prism-autoloader.js b/plugins/autoloader/prism-autoloader.js index 78e46e0ba8..d3bf933402 100644 --- a/plugins/autoloader/prism-autoloader.js +++ b/plugins/autoloader/prism-autoloader.js @@ -128,6 +128,7 @@ "soy": "markup-templating", "sparql": "turtle", "sqf": "clike", + "squirrel": "clike", "swift": "clike", "t4-cs": [ "t4-templating", diff --git a/plugins/autoloader/prism-autoloader.min.js b/plugins/autoloader/prism-autoloader.min.js index aa4eb62478..bc149d2131 100644 --- a/plugins/autoloader/prism-autoloader.min.js +++ b/plugins/autoloader/prism-autoloader.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof self&&self.Prism&&self.document&&document.createElement){var l={javascript:"clike",actionscript:"javascript",apex:["clike","sql"],arduino:"cpp",aspnet:["markup","csharp"],birb:"clike",bison:"c",c:"clike",csharp:"clike",cpp:"c",chaiscript:["clike","cpp"],coffeescript:"javascript",crystal:"ruby","css-extras":"css",d:"clike",dart:"clike",django:"markup-templating",ejs:["javascript","markup-templating"],etlua:["lua","markup-templating"],erb:["ruby","markup-templating"],fsharp:"clike","firestore-security-rules":"clike",flow:"javascript",ftl:"markup-templating",gml:"clike",glsl:"c",go:"clike",groovy:"clike",haml:"ruby",handlebars:"markup-templating",haxe:"clike",hlsl:"c",java:"clike",javadoc:["markup","java","javadoclike"],jolie:"clike",jsdoc:["javascript","javadoclike","typescript"],"js-extras":"javascript",json5:"json",jsonp:"json","js-templates":"javascript",kotlin:"clike",latte:["clike","markup-templating","php"],less:"css",lilypond:"scheme",markdown:"markup","markup-templating":"markup",mongodb:"javascript",n4js:"javascript",nginx:"clike",objectivec:"c",opencl:"c",parser:"markup",php:"markup-templating",phpdoc:["php","javadoclike"],"php-extras":"php",plsql:"sql",processing:"clike",protobuf:"clike",pug:["markup","javascript"],purebasic:"clike",purescript:"haskell",qml:"javascript",qore:"clike",racket:"scheme",jsx:["markup","javascript"],tsx:["jsx","typescript"],reason:"clike",ruby:"clike",sass:"css",scss:"css",scala:"java","shell-session":"bash",smarty:"markup-templating",solidity:"clike",soy:"markup-templating",sparql:"turtle",sqf:"clike",swift:"clike","t4-cs":["t4-templating","csharp"],"t4-vb":["t4-templating","vbnet"],tap:"yaml",tt2:["clike","markup-templating"],textile:"markup",twig:"markup",typescript:"javascript",v:"clike",vala:"clike",vbnet:"basic",velocity:"markup",wiki:"markup",xeora:"markup","xml-doc":"markup",xquery:"markup"},n={html:"markup",xml:"markup",svg:"markup",mathml:"markup",ssml:"markup",atom:"markup",rss:"markup",js:"javascript",g4:"antlr4",adoc:"asciidoc",shell:"bash",shortcode:"bbcode",rbnf:"bnf",oscript:"bsl",cs:"csharp",dotnet:"csharp",coffee:"coffeescript",conc:"concurnas",jinja2:"django","dns-zone":"dns-zone-file",dockerfile:"docker",gv:"dot",eta:"ejs",xlsx:"excel-formula",xls:"excel-formula",gamemakerlanguage:"gml",hs:"haskell",gitignore:"ignore",hgignore:"ignore",npmignore:"ignore",webmanifest:"json",kt:"kotlin",kts:"kotlin",tex:"latex",context:"latex",ly:"lilypond",emacs:"lisp",elisp:"lisp","emacs-lisp":"lisp",md:"markdown",moon:"moonscript",n4jsd:"n4js",nani:"naniscript",objc:"objectivec",objectpascal:"pascal",px:"pcaxis",pcode:"peoplecode",pq:"powerquery",mscript:"powerquery",pbfasm:"purebasic",purs:"purescript",py:"python",rkt:"racket",rpy:"renpy",robot:"robotframework",rb:"ruby","sh-session":"shell-session",shellsession:"shell-session",smlnj:"sml",sol:"solidity",sln:"solution-file",rq:"sparql",t4:"t4-cs",trig:"turtle",ts:"typescript",tsconfig:"typoscript",uscript:"unrealscript",uc:"unrealscript",url:"uri",vb:"visual-basic",vba:"visual-basic",xeoracube:"xeora",yml:"yaml"},p={},e="components/",a=Prism.util.currentScript();if(a){var r=/\bplugins\/autoloader\/prism-autoloader\.(?:min\.)?js(?:\?[^\r\n/]*)?$/i,s=/(^|\/)[\w-]+\.(?:min\.)?js(?:\?[^\r\n/]*)?$/i,t=a.getAttribute("data-autoloader-path");if(null!=t)e=t.trim().replace(/\/?$/,"/");else{var i=a.src;r.test(i)?e=i.replace(r,"components/"):s.test(i)&&(e=i.replace(s,"$1components/"))}}var o=Prism.plugins.autoloader={languages_path:e,use_minified:!0,loadLanguages:m};Prism.hooks.add("complete",function(e){var a=e.element,r=e.language;if(a&&r&&"none"!==r){var s=function(e){var a=(e.getAttribute("data-dependencies")||"").trim();if(!a){var r=e.parentElement;r&&"pre"===r.tagName.toLowerCase()&&(a=(r.getAttribute("data-dependencies")||"").trim())}return a?a.split(/\s*,\s*/g):[]}(a);/^diff-./i.test(r)?(s.push("diff"),s.push(r.substr("diff-".length))):s.push(r),s.every(u)||m(s,function(){Prism.highlightElement(a)})}})}function u(e){if(0<=e.indexOf("!"))return!1;if((e=n[e]||e)in Prism.languages)return!0;var a=p[e];return a&&!a.error&&!1===a.loading}function m(e,a,r){"string"==typeof e&&(e=[e]);var s=e.length,t=0,i=!1;function c(){i||++t===s&&a&&a(e)}0!==s?e.forEach(function(e){!function(a,r,s){var t=0<=a.indexOf("!");function e(){var e=p[a];e||(e=p[a]={callbacks:[]}),e.callbacks.push({success:r,error:s}),!t&&u(a)?k(a,"success"):!t&&e.error?k(a,"error"):!t&&e.loading||(e.loading=!0,e.error=!1,function(e,a,r){var s=document.createElement("script");s.src=e,s.async=!0,s.onload=function(){document.body.removeChild(s),a&&a()},s.onerror=function(){document.body.removeChild(s),r&&r()},document.body.appendChild(s)}(function(e){return o.languages_path+"prism-"+e+(o.use_minified?".min":"")+".js"}(a),function(){e.loading=!1,k(a,"success")},function(){e.loading=!1,e.error=!0,k(a,"error")}))}a=a.replace("!",""),a=n[a]||a;var i=l[a];i&&i.length?m(i,e,s):e()}(e,c,function(){i||(i=!0,r&&r(e))})}):a&&setTimeout(a,0)}function k(e,a){if(p[e]){for(var r=p[e].callbacks,s=0,t=r.length;s{ + //attributes of PrintTesty + function PrintTesty() + { + foreach(i,val in testy) + { + ::print("idx = "+i+" = "+val+" \n"); + } + } + //attributes of testy + testy = null; +} + +---------------------------------------------------- + +[ + ["keyword", "class"], + ["class-name", ["Foo"]], + ["attribute-punctuation", ""], + ["punctuation", "{"], + + ["attribute-punctuation", ""], + ["comment", "//attributes of PrintTesty"], + + ["keyword", "function"], + ["function", "PrintTesty"], + ["punctuation", "("], + ["punctuation", ")"], + + ["punctuation", "{"], + + ["keyword", "foreach"], + ["punctuation", "("], + "i", + ["punctuation", ","], + "val ", + ["keyword", "in"], + " testy", + ["punctuation", ")"], + + ["punctuation", "{"], + + ["operator", "::"], + ["function", "print"], + ["punctuation", "("], + ["string", "\"idx = \""], + ["operator", "+"], + "i", + ["operator", "+"], + ["string", "\" = \""], + ["operator", "+"], + "val", + ["operator", "+"], + ["string", "\" \\n\""], + ["punctuation", ")"], + ["punctuation", ";"], + + ["punctuation", "}"], + + ["punctuation", "}"], + + ["attribute-punctuation", ""], + ["comment", "//attributes of testy"], + + "\r\n testy ", + ["operator", "="], + ["keyword", "null"], + ["punctuation", ";"], + + ["punctuation", "}"] +] \ No newline at end of file diff --git a/tests/languages/squirrel/boolean_feature.test b/tests/languages/squirrel/boolean_feature.test new file mode 100644 index 0000000000..ad3882b9ef --- /dev/null +++ b/tests/languages/squirrel/boolean_feature.test @@ -0,0 +1,9 @@ +false +true + +---------------------------------------------------- + +[ + ["boolean", "false"], + ["boolean", "true"] +] \ No newline at end of file diff --git a/tests/languages/squirrel/class-name_feature.test b/tests/languages/squirrel/class-name_feature.test new file mode 100644 index 0000000000..091dd06760 --- /dev/null +++ b/tests/languages/squirrel/class-name_feature.test @@ -0,0 +1,45 @@ +class Foo {} +class FakeNamespace.Utils.SuperClass {} +class SuperFoo extends Foo {} +log(b instanceof Kid); +enum Stuff {} + +---------------------------------------------------- + +[ + ["keyword", "class"], + ["class-name", ["Foo"]], + ["punctuation", "{"], + ["punctuation", "}"], + + ["keyword", "class"], + ["class-name", [ + "FakeNamespace", + ["punctuation", "."], + "Utils", + ["punctuation", "."], + "SuperClass" + ]], + ["punctuation", "{"], + ["punctuation", "}"], + + ["keyword", "class"], + ["class-name", ["SuperFoo"]], + ["keyword", "extends"], + ["class-name", ["Foo"]], + ["punctuation", "{"], + ["punctuation", "}"], + + ["function", "log"], + ["punctuation", "("], + "b ", + ["keyword", "instanceof"], + ["class-name", ["Kid"]], + ["punctuation", ")"], + ["punctuation", ";"], + + ["keyword", "enum"], + ["class-name", ["Stuff"]], + ["punctuation", "{"], + ["punctuation", "}"] +] \ No newline at end of file diff --git a/tests/languages/squirrel/comment_feature.test b/tests/languages/squirrel/comment_feature.test new file mode 100644 index 0000000000..e782b73f87 --- /dev/null +++ b/tests/languages/squirrel/comment_feature.test @@ -0,0 +1,15 @@ +/* +this is +a multiline comment. +this lines will be ignored by the compiler +*/ +//this is a single line comment. this line will be ignored by the compiler +# this is also a single line comment. + +---------------------------------------------------- + +[ + ["comment", "/*\r\nthis is\r\na multiline comment.\r\nthis lines will be ignored by the compiler\r\n*/"], + ["comment", "//this is a single line comment. this line will be ignored by the compiler"], + ["comment", "# this is also a single line comment."] +] \ No newline at end of file diff --git a/tests/languages/squirrel/function_feature.test b/tests/languages/squirrel/function_feature.test new file mode 100644 index 0000000000..df6c22882e --- /dev/null +++ b/tests/languages/squirrel/function_feature.test @@ -0,0 +1,44 @@ +function abc(a,b,c) {} +function(a,b,c) {} +local myexp = @(a,b) a + b; + +---------------------------------------------------- + +[ + ["keyword", "function"], + ["function", "abc"], + ["punctuation", "("], + "a", + ["punctuation", ","], + "b", + ["punctuation", ","], + "c", + ["punctuation", ")"], + ["punctuation", "{"], + ["punctuation", "}"], + + ["keyword", "function"], + ["punctuation", "("], + "a", + ["punctuation", ","], + "b", + ["punctuation", ","], + "c", + ["punctuation", ")"], + ["punctuation", "{"], + ["punctuation", "}"], + + ["keyword", "local"], + " myexp ", + ["operator", "="], + ["lambda", "@"], + ["punctuation", "("], + "a", + ["punctuation", ","], + "b", + ["punctuation", ")"], + " a ", + ["operator", "+"], + " b", + ["punctuation", ";"] +] \ No newline at end of file diff --git a/tests/languages/squirrel/keyword_feature.test b/tests/languages/squirrel/keyword_feature.test new file mode 100644 index 0000000000..e68623e9ea --- /dev/null +++ b/tests/languages/squirrel/keyword_feature.test @@ -0,0 +1,75 @@ +base; +break; +case; +catch; +class; +clone; +const; +constructor; +continue; +default; +delete; +else; +enum; +extends; +for; +foreach; +function; +if; +in; +instanceof; +local; +null; +resume; +return; +static; +switch; +this; +throw; +try; +typeof; +while; +yield; + +__LINE__ +__FILE__ + +---------------------------------------------------- + +[ + ["keyword", "base"], ["punctuation", ";"], + ["keyword", "break"], ["punctuation", ";"], + ["keyword", "case"], ["punctuation", ";"], + ["keyword", "catch"], ["punctuation", ";"], + ["keyword", "class"], ["punctuation", ";"], + ["keyword", "clone"], ["punctuation", ";"], + ["keyword", "const"], ["punctuation", ";"], + ["keyword", "constructor"], ["punctuation", ";"], + ["keyword", "continue"], ["punctuation", ";"], + ["keyword", "default"], ["punctuation", ";"], + ["keyword", "delete"], ["punctuation", ";"], + ["keyword", "else"], ["punctuation", ";"], + ["keyword", "enum"], ["punctuation", ";"], + ["keyword", "extends"], ["punctuation", ";"], + ["keyword", "for"], ["punctuation", ";"], + ["keyword", "foreach"], ["punctuation", ";"], + ["keyword", "function"], ["punctuation", ";"], + ["keyword", "if"], ["punctuation", ";"], + ["keyword", "in"], ["punctuation", ";"], + ["keyword", "instanceof"], ["punctuation", ";"], + ["keyword", "local"], ["punctuation", ";"], + ["keyword", "null"], ["punctuation", ";"], + ["keyword", "resume"], ["punctuation", ";"], + ["keyword", "return"], ["punctuation", ";"], + ["keyword", "static"], ["punctuation", ";"], + ["keyword", "switch"], ["punctuation", ";"], + ["keyword", "this"], ["punctuation", ";"], + ["keyword", "throw"], ["punctuation", ";"], + ["keyword", "try"], ["punctuation", ";"], + ["keyword", "typeof"], ["punctuation", ";"], + ["keyword", "while"], ["punctuation", ";"], + ["keyword", "yield"], ["punctuation", ";"], + + ["keyword", "__LINE__"], + ["keyword", "__FILE__"] +] \ No newline at end of file diff --git a/tests/languages/squirrel/number_feature.test b/tests/languages/squirrel/number_feature.test new file mode 100644 index 0000000000..7faa2ad06e --- /dev/null +++ b/tests/languages/squirrel/number_feature.test @@ -0,0 +1,21 @@ +0 +34 +0xFF00A120 +0753 +1.52 +0.234 +1.e2 +1.e-2 + +---------------------------------------------------- + +[ + ["number", "0"], + ["number", "34"], + ["number", "0xFF00A120"], + ["number", "0753"], + ["number", "1.52"], + ["number", "0.234"], + ["number", "1.e2"], + ["number", "1.e-2"] +] \ No newline at end of file diff --git a/tests/languages/squirrel/operator_feature.test b/tests/languages/squirrel/operator_feature.test new file mode 100644 index 0000000000..98efe19e9a --- /dev/null +++ b/tests/languages/squirrel/operator_feature.test @@ -0,0 +1,46 @@ +! != || == && >= <= > <=> + ++ - / * % ++= -= /= *= %= +++ -- + +<- = +& ^ | ~ +>> << >>> + +: :: + +---------------------------------------------------- + +[ + ["operator", "!"], + ["operator", "!="], + ["operator", "||"], + ["operator", "=="], + ["operator", "&&"], + ["operator", ">="], + ["operator", "<="], + ["operator", ">"], + ["operator", "<=>"], + + ["operator", "+"], + ["operator", "-"], + ["operator", "/"], + ["operator", "*"], + ["operator", "%"], + + ["operator", "+="], + ["operator", "-="], + ["operator", "/="], + ["operator", "*="], + ["operator", "%="], + + ["operator", "++"], + ["operator", "--"], + + ["operator", "<-"], ["operator", "="], + ["operator", "&"], ["operator", "^"], ["operator", "|"], ["operator", "~"], + ["operator", ">>"], ["operator", "<<"], ["operator", ">>>"], + + ["operator", ":"], ["operator", "::"] +] \ No newline at end of file diff --git a/tests/languages/squirrel/punctuation_feature.test b/tests/languages/squirrel/punctuation_feature.test new file mode 100644 index 0000000000..6d0eb671c7 --- /dev/null +++ b/tests/languages/squirrel/punctuation_feature.test @@ -0,0 +1,17 @@ +{ } [ ] ( ) +, ; . + +---------------------------------------------------- + +[ + ["punctuation", "{"], + ["punctuation", "}"], + ["punctuation", "["], + ["punctuation", "]"], + ["punctuation", "("], + ["punctuation", ")"], + + ["punctuation", ","], + ["punctuation", ";"], + ["punctuation", "."] +] \ No newline at end of file diff --git a/tests/languages/squirrel/string_feature.test b/tests/languages/squirrel/string_feature.test new file mode 100644 index 0000000000..70dd41a7e0 --- /dev/null +++ b/tests/languages/squirrel/string_feature.test @@ -0,0 +1,37 @@ +"" +"I'm a string" +"I'm a wonderful string\n" + +@"" +@"I'm a verbatim string" +@" I'm a +multiline verbatim string +" + +@" + this is a multiline string + it will ""embed"" all the new line + characters +" + +'w' +'\'' +'\x41' '\u0041' '\U00000041' + +---------------------------------------------------- + +[ + ["string", "\"\""], + ["string", "\"I'm a string\""], + ["string", "\"I'm a wonderful string\\n\""], + + ["string", "@\"\""], + ["string", "@\"I'm a verbatim string\""], + ["string", "@\" I'm a\r\nmultiline verbatim string\r\n\""], + + ["string", "@\"\r\n this is a multiline string\r\n it will \"\"embed\"\" all the new line\r\n characters\r\n\""], + + ["string", "'w'"], + ["string", "'\\''"], + ["string", "'\\x41'"], ["string", "'\\u0041'"], ["string", "'\\U00000041'"] +] \ No newline at end of file From 2cb909e1a52371ee98eacb1441a55f3daaa2ed60 Mon Sep 17 00:00:00 2001 From: edukisto <52005215+edukisto@users.noreply.github.com> Date: Sun, 31 Jan 2021 19:03:55 +0300 Subject: [PATCH 0725/1100] Make copy-to-clipboard configurable with multiple attributes (#2723) Resolves #1438. Makes the `copy-to-clipboard` plugin consider the following HTML attributes: - `data-prismjs-copy`, - `data-prismjs-copy-error`, - `data-prismjs-copy-success`, - `data-prismjs-copy-timeout`. Use those attributes to translate the toolbar for the plugin. --- plugins/copy-to-clipboard/index.html | 162 +++++++++++++++++- .../prism-copy-to-clipboard.js | 52 ++++-- .../prism-copy-to-clipboard.min.js | 2 +- 3 files changed, 200 insertions(+), 16 deletions(-) diff --git a/plugins/copy-to-clipboard/index.html b/plugins/copy-to-clipboard/index.html index 79ebf73067..e8cf3e3105 100644 --- a/plugins/copy-to-clipboard/index.html +++ b/plugins/copy-to-clipboard/index.html @@ -20,19 +20,171 @@

        How to use

        -

        In addition to including the plugin file with your PrismJS build, ensure Clipboard.js is loaded before the plugin.

        -

        The simplest way to include Clipboard.js is to use any of the - recommended CDNs. If you're using Browserify, Clipboard.js will be loaded automatically +

        The plugin depends on clipboard.js and the Prism Toolbar plugin. In addition to including the plugin file with your PrismJS build, ensure they are loaded before the plugin.

        + +

        The simplest way to include clipboard.js is to use any of the + recommended CDNs. If you're using Browserify, clipboard.js will be loaded automatically if it's included in your package.json. - If you don't load Clipboard.js yourself, the plugin will load it from a CDN for you.

        + If you don't load clipboard.js yourself, the plugin will load it from a CDN for you.

        +
        + +
        +

        Settings

        + +

        By default, the plugin shows messages in English and sets a 5-second timeout after a click. You can use the following HTML5 data attributes to override the default settings:

        + +
          +
        • data-prismjs-copy — default message displayed by Copy to Clipboard;
        • +
        • data-prismjs-copy-error — a message displayed after failing copying, prompting the user to press Ctrl+C;
        • +
        • data-prismjs-copy-success — a message displayed after a successful copying;
        • +
        • data-prismjs-copy-timeout — a timeout (in milliseconds) after copying. Once the timeout passed, the success or error message will revert back to the default message. The value should be a non-negative integer.
        • +
        + +

        The plugin traverses up the DOM tree to find each of these attributes. The search starts at every pre code element and stops at the closest ancestor element that has a desired attribute or at the worst case, at the html element.

        + +

        Warning! Although possible, you definitely shouldn't add these attributes to the html element, because a human-readable text should be placed after the character encoding declaration (<meta charset="...">), and the latter must be serialized completely within the first 512 (in older browsers) or 1024 bytes of the document. Consider using the body element or one of its descendants.

        +
        + +
        +

        Examples

        + +

        Sharing

        + +

        The following code blocks show modified messages and both use a half-second timeout. The other settings are set to default.

        + +

        Source code:

        + +
        <body data-prismjs-copy-timeout="500">
        +	<pre><code class="language-js" data-prismjs-copy="Copy the JavaScript snippet!">console.log('Hello, world!');</code></pre>
        +
        +	<pre><code class="language-c" data-prismjs-copy="Copy the C snippet!">int main() {
        +	return 0;
        +}</code></pre>
        +</body>
        + +

        Output:

        + +
        +
        console.log('Hello, world!');
        + +
        int main() {
        +	return 0;
        +}
        +
        + +

        Inheritance

        + +

        The plugin always use the closest ancestor element that has a desired attribute, so it's possible to override any setting on any descendant. In the following example, the baz message is used. The other settings are set to default.

        + +

        Source code:

        + +
        <body data-prismjs-copy="foo">
        +	<main data-prismjs-copy="bar">
        +		<pre><code class="language-c" data-prismjs-copy="baz">int main() {
        +	return 0;
        +}</code></pre>
        +	</main>
        +</body>
        + +

        Output:

        + +
        +
        +
        int main() {
        +	return 0;
        +}
        +
        +
        + +

        i18n

        + +

        You can use the data attributes for internationalization.

        + +

        The following code blocks use shared messages in Russian and the default 5-second timeout.

        + +

        Source code:

        + +
        <!DOCTYPE html>
        +<html lang="ru">
        +<!-- The head is omitted. -->
        +<body
        +	data-prismjs-copy="Скопировать"
        +	data-prismjs-copy-error="Нажмите Ctrl+C, чтобы скопировать"
        +	data-prismjs-copy-success="Скопировано!"
        +>
        +	<pre><code class="language-c">int main() {
        +	return 0;
        +}</code></pre>
        +
        +	<pre><code class="language-js">console.log('Hello, world!');</code></pre>
        +</body>
        +</html>
        + +

        Output:

        + +
        +
        int main() {
        +	return 0;
        +}
        + +
        console.log('Hello, world!');
        +
        + +

        The next HTML document is in English, but some code blocks show messages in Russian and simplified Mainland Chinese. The other settings are set to default.

        + +

        Source code:

        + +
        <!DOCTYPE html>
        +<html lang="en"><!-- The head is omitted. -->
        +<body>
        +	<pre><code class="language-js">console.log('Hello, world!');</code></pre>
        +
        +	<pre
        +		lang="ru"
        +		data-prismjs-copy="Скопировать"
        +		data-prismjs-copy-error="Нажмите Ctrl+C, чтобы скопировать"
        +		data-prismjs-copy-success="Скопировано!"
        +	><code class="language-js">console.log('Привет, мир!');</code></pre>
        +
        +	<pre
        +		lang="zh-Hans-CN"
        +		data-prismjs-copy="复制文本"
        +		data-prismjs-copy-error="按Ctrl+C复制"
        +		data-prismjs-copy-success="文本已复制!"
        +	><code class="language-js">console.log('你好,世界!');</code></pre>
        +</body>
        +</html>
        + +

        Output:

        + +
        +
        console.log('Hello, world!');
        + +
        console.log('Привет, мир!');
        -
        
        +		
        console.log('你好,世界!');
        +
        + diff --git a/plugins/copy-to-clipboard/prism-copy-to-clipboard.js b/plugins/copy-to-clipboard/prism-copy-to-clipboard.js index b7ae254c7e..8ebf659856 100644 --- a/plugins/copy-to-clipboard/prism-copy-to-clipboard.js +++ b/plugins/copy-to-clipboard/prism-copy-to-clipboard.js @@ -1,4 +1,4 @@ -(function(){ +(function () { if (typeof self === 'undefined' || !self.Prism || !self.document) { return; } @@ -21,7 +21,7 @@ var script = document.createElement('script'); var head = document.querySelector('head'); - script.onload = function() { + script.onload = function () { ClipboardJS = window.ClipboardJS; if (ClipboardJS) { @@ -35,13 +35,45 @@ head.appendChild(script); } + /** + * Traverses up the DOM tree to find data attributes that override the default plugin settings. + * + * @param {Element} startElement An element to start from. + * @returns {Settings} The plugin settings. + * @typedef {Record<"copy" | "copy-error" | "copy-success" | "copy-timeout", string | number>} Settings + */ + function getSettings(startElement) { + /** @type {Settings} */ + var settings = { + 'copy': 'Copy', + 'copy-error': 'Press Ctrl+C to copy', + 'copy-success': 'Copied!', + 'copy-timeout': 5000 + }; + + var prefix = 'data-prismjs-'; + for (var key in settings) { + var attr = prefix + key; + var element = startElement; + while (element && !element.hasAttribute(attr)) { + element = element.parentElement; + } + if (element) { + settings[key] = element.getAttribute(attr); + } + } + return settings; + } + Prism.plugins.toolbar.registerButton('copy-to-clipboard', function (env) { + var element = env.element; + + var settings = getSettings(element); + var linkCopy = document.createElement('button'); - linkCopy.textContent = 'Copy'; + linkCopy.textContent = settings['copy']; linkCopy.setAttribute('type', 'button'); - var element = env.element; - if (!ClipboardJS) { callbacks.push(registerClipboard); } else { @@ -57,13 +89,13 @@ } }); - clip.on('success', function() { - linkCopy.textContent = 'Copied!'; + clip.on('success', function () { + linkCopy.textContent = settings['copy-success']; resetText(); }); clip.on('error', function () { - linkCopy.textContent = 'Press Ctrl+C to copy'; + linkCopy.textContent = settings['copy-error']; resetText(); }); @@ -71,8 +103,8 @@ function resetText() { setTimeout(function () { - linkCopy.textContent = 'Copy'; - }, 5000); + linkCopy.textContent = settings['copy']; + }, settings['copy-timeout']); } }); })(); diff --git a/plugins/copy-to-clipboard/prism-copy-to-clipboard.min.js b/plugins/copy-to-clipboard/prism-copy-to-clipboard.min.js index 75e2f715a2..3a03d17678 100644 --- a/plugins/copy-to-clipboard/prism-copy-to-clipboard.min.js +++ b/plugins/copy-to-clipboard/prism-copy-to-clipboard.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof self&&self.Prism&&self.document)if(Prism.plugins.toolbar){var i=window.ClipboardJS||void 0;i||"function"!=typeof require||(i=require("clipboard"));var u=[];if(!i){var t=document.createElement("script"),e=document.querySelector("head");t.onload=function(){if(i=window.ClipboardJS)for(;u.length;)u.pop()()},t.src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.0/clipboard.min.js",e.appendChild(t)}Prism.plugins.toolbar.registerButton("copy-to-clipboard",function(t){var e=document.createElement("button");e.textContent="Copy",e.setAttribute("type","button");var o=t.element;return i?n():u.push(n),e;function n(){var t=new i(e,{text:function(){return o.textContent}});t.on("success",function(){e.textContent="Copied!",r()}),t.on("error",function(){e.textContent="Press Ctrl+C to copy",r()})}function r(){setTimeout(function(){e.textContent="Copy"},5e3)}})}else console.warn("Copy to Clipboard plugin loaded before Toolbar plugin.")}(); \ No newline at end of file +!function(){if("undefined"!=typeof self&&self.Prism&&self.document)if(Prism.plugins.toolbar){var c=window.ClipboardJS||void 0;c||"function"!=typeof require||(c=require("clipboard"));var u=[];if(!c){var t=document.createElement("script"),o=document.querySelector("head");t.onload=function(){if(c=window.ClipboardJS)for(;u.length;)u.pop()()},t.src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.0/clipboard.min.js",o.appendChild(t)}Prism.plugins.toolbar.registerButton("copy-to-clipboard",function(t){var o=t.element,e=function(t){var o={copy:"Copy","copy-error":"Press Ctrl+C to copy","copy-success":"Copied!","copy-timeout":5e3};for(var e in o){for(var n="data-prismjs-"+e,r=t;r&&!r.hasAttribute(n);)r=r.parentElement;r&&(o[e]=r.getAttribute(n))}return o}(o),n=document.createElement("button");return n.textContent=e.copy,n.setAttribute("type","button"),c?r():u.push(r),n;function r(){var t=new c(n,{text:function(){return o.textContent}});t.on("success",function(){n.textContent=e["copy-success"],i()}),t.on("error",function(){n.textContent=e["copy-error"],i()})}function i(){setTimeout(function(){n.textContent=e.copy},e["copy-timeout"])}})}else console.warn("Copy to Clipboard plugin loaded before Toolbar plugin.")}(); \ No newline at end of file From 266cc7002e54dae674817ab06a02c2c15ed64a6f Mon Sep 17 00:00:00 2001 From: edukisto <52005215+edukisto@users.noreply.github.com> Date: Mon, 1 Feb 2021 15:18:06 +0300 Subject: [PATCH 0726/1100] Readme: Update link to Chinese translation (#2749) --- README.md | 2 +- docs/index.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index de6a96e2cc..1c7737fd5d 100644 --- a/README.md +++ b/README.md @@ -29,4 +29,4 @@ Thank you so much for contributing!! ## Translations -* [简体中文](https://www.awesomes.cn/repo/PrismJS/prism) (temporarily unavailable; see copy [here](https://deepmind.t-salon.cc/article/113)) +* [简体中文](https://www.awesomes.cn/repo/PrismJS/prism) (if unavailable, see [here](https://deepmind.t-salon.cc/article/113)) diff --git a/docs/index.html b/docs/index.html index 44894cfc29..fbd88233cf 100644 --- a/docs/index.html +++ b/docs/index.html @@ -74,7 +74,7 @@

        Contribute to Prism!

        Thank you so much for contributing!!

        Translations

        From ec9767d6ba70f26a15092f305bf142b420f1a097 Mon Sep 17 00:00:00 2001 From: Dym Sohin Date: Thu, 4 Feb 2021 17:17:43 +0100 Subject: [PATCH 0727/1100] Website: Updated URL in Autolinker example (#2751) --- plugins/autolinker/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/autolinker/index.html b/plugins/autolinker/index.html index c1ac1abff2..6612767065 100644 --- a/plugins/autolinker/index.html +++ b/plugins/autolinker/index.html @@ -48,7 +48,7 @@

        CSS

        HTML

        <!-- Links in HTML, woo!
         Lea Verou http://lea.verou.me or, with Markdown, [Lea Verou](http://lea.verou.me) -->
        -<img src="http://prismjs.com/img/spectrum.png" alt="In attributes too!" />
        +<img src="https://prismjs.com/assets/img/spectrum.png" alt="In attributes too!" />
         <p>Autolinking in raw text: http://prismjs.com</p>
        From ccc73ab75fb43f0e7d4ed6b6d3145e00e843b0ba Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Sun, 7 Feb 2021 14:52:25 +0100 Subject: [PATCH 0728/1100] Line Highlight: Fixed linkable line numbers not being initialized (#2732) --- plugins/line-highlight/index.html | 2 +- .../line-highlight/prism-line-highlight.js | 113 ++++++++++-------- .../prism-line-highlight.min.js | 2 +- 3 files changed, 65 insertions(+), 52 deletions(-) diff --git a/plugins/line-highlight/index.html b/plugins/line-highlight/index.html index 099e505d9d..8ade641bef 100644 --- a/plugins/line-highlight/index.html +++ b/plugins/line-highlight/index.html @@ -81,7 +81,7 @@

        Compatible with Line numbers

        With linkable line numbers

        -
        
        +	
        
         
         
         
        diff --git a/plugins/line-highlight/prism-line-highlight.js b/plugins/line-highlight/prism-line-highlight.js
        index 7cd9006ff9..e850159c70 100644
        --- a/plugins/line-highlight/prism-line-highlight.js
        +++ b/plugins/line-highlight/prism-line-highlight.js
        @@ -4,6 +4,9 @@
         		return;
         	}
         
        +	var LINE_NUMBERS_CLASS = 'line-numbers';
        +	var LINKABLE_LINE_NUMBERS_CLASS = 'linkable-line-numbers';
        +
         	/**
         	 * @param {string} selector
         	 * @param {ParentNode} [container]
        @@ -21,8 +24,7 @@
         	 * @returns {boolean}
         	 */
         	function hasClass(element, className) {
        -		className = " " + className + " ";
        -		return (" " + element.className + " ").replace(/[\n\t]/g, " ").indexOf(className) > -1
        +		return element.classList.contains(className);
         	}
         
         	/**
        @@ -82,6 +84,32 @@
         			- pxToNumber(parentStyle.paddingTop);
         	}
         
        +	/**
        +	 * Returns whether the Line Highlight plugin is active for the given element.
        +	 *
        +	 * If this function returns `false`, do not call `highlightLines` for the given element.
        +	 *
        +	 * @param {HTMLElement | null | undefined} pre
        +	 * @returns {boolean}
        +	 */
        +	function isActiveFor(pre) {
        +		if (!pre || !/pre/i.test(pre.nodeName)) {
        +			return false;
        +		}
        +
        +		if (pre.hasAttribute('data-line')) {
        +			return true;
        +		}
        +
        +		if (pre.id && Prism.util.isActive(pre, LINKABLE_LINE_NUMBERS_CLASS)) {
        +			// Technically, the line numbers plugin is also necessary but this plugin doesn't control the classes of
        +			// the line numbers plugin, so we can't assume that they are present.
        +			return true;
        +		}
        +
        +		return false;
        +	}
        +
         	/**
         	 * Highlights the lines of the given pre.
         	 *
        @@ -94,14 +122,14 @@
         	 * @returns {() => void}
         	 */
         	function highlightLines(pre, lines, classes) {
        -		lines = typeof lines === 'string' ? lines : pre.getAttribute('data-line');
        +		lines = typeof lines === 'string' ? lines : (pre.getAttribute('data-line') || '');
         
         		var ranges = lines.replace(/\s+/g, '').split(',').filter(Boolean);
         		var offset = +pre.getAttribute('data-line-offset') || 0;
         
         		var parseMethod = isLineHeightRounded() ? parseInt : parseFloat;
         		var lineHeight = parseMethod(getComputedStyle(pre).lineHeight);
        -		var hasLineNumbers = hasClass(pre, 'line-numbers');
        +		var hasLineNumbers = Prism.util.isActive(pre, LINE_NUMBERS_CLASS);
         		var codeElement = pre.querySelector('code');
         		var parentElement = hasLineNumbers ? pre : codeElement || pre;
         		var mutateActions = /** @type {(() => void)[]} */ ([]);
        @@ -173,49 +201,36 @@
         		});
         
         		var id = pre.id;
        -		if (hasLineNumbers && id) {
        +		if (hasLineNumbers && Prism.util.isActive(pre, LINKABLE_LINE_NUMBERS_CLASS) && id) {
         			// This implements linkable line numbers. Linkable line numbers use Line Highlight to create a link to a
         			// specific line. For this to work, the pre element has to:
         			//  1) have line numbers,
         			//  2) have the `linkable-line-numbers` class or an ascendant that has that class, and
         			//  3) have an id.
         
        -			var linkableLineNumbersClass = 'linkable-line-numbers';
        -			var linkableLineNumbers = false;
        -			var node = pre;
        -			while (node) {
        -				if (hasClass(node, linkableLineNumbersClass)) {
        -					linkableLineNumbers = true;
        -					break;
        -				}
        -				node = node.parentElement;
        -			}
        -
        -			if (linkableLineNumbers) {
        -				if (!hasClass(pre, linkableLineNumbersClass)) {
        -					// add class to pre
        -					mutateActions.push(function () {
        -						pre.className = (pre.className + ' ' + linkableLineNumbersClass).trim();
        -					});
        -				}
        -
        -				var start = parseInt(pre.getAttribute('data-start') || '1');
        -
        -				// iterate all line number spans
        -				$$('.line-numbers-rows > span', pre).forEach(function (lineSpan, i) {
        -					var lineNumber = i + start;
        -					lineSpan.onclick = function () {
        -						var hash = id + '.' + lineNumber;
        -
        -						// this will prevent scrolling since the span is obviously in view
        -						scrollIntoView = false;
        -						location.hash = hash;
        -						setTimeout(function () {
        -							scrollIntoView = true;
        -						}, 1);
        -					};
        +			if (!hasClass(pre, LINKABLE_LINE_NUMBERS_CLASS)) {
        +				// add class to pre
        +				mutateActions.push(function () {
        +					pre.classList.add(LINKABLE_LINE_NUMBERS_CLASS);
         				});
         			}
        +
        +			var start = parseInt(pre.getAttribute('data-start') || '1');
        +
        +			// iterate all line number spans
        +			$$('.line-numbers-rows > span', pre).forEach(function (lineSpan, i) {
        +				var lineNumber = i + start;
        +				lineSpan.onclick = function () {
        +					var hash = id + '.' + lineNumber;
        +
        +					// this will prevent scrolling since the span is obviously in view
        +					scrollIntoView = false;
        +					location.hash = hash;
        +					setTimeout(function () {
        +						scrollIntoView = true;
        +					}, 1);
        +				};
        +			});
         		}
         
         		return function () {
        @@ -261,9 +276,7 @@
         
         	Prism.hooks.add('before-sanity-check', function (env) {
         		var pre = env.element.parentElement;
        -		var lines = pre && pre.getAttribute('data-line');
        -
        -		if (!pre || !lines || !/pre/i.test(pre.nodeName)) {
        +		if (!isActiveFor(pre)) {
         			return;
         		}
         
        @@ -287,9 +300,7 @@
         
         	Prism.hooks.add('complete', function completeHook(env) {
         		var pre = env.element.parentElement;
        -		var lines = pre && pre.getAttribute('data-line');
        -
        -		if (!pre || !lines || !/pre/i.test(pre.nodeName)) {
        +		if (!isActiveFor(pre)) {
         			return;
         		}
         
        @@ -298,10 +309,10 @@
         		var hasLineNumbers = Prism.plugins.lineNumbers;
         		var isLineNumbersLoaded = env.plugins && env.plugins.lineNumbers;
         
        -		if (hasClass(pre, 'line-numbers') && hasLineNumbers && !isLineNumbersLoaded) {
        +		if (hasClass(pre, LINE_NUMBERS_CLASS) && hasLineNumbers && !isLineNumbersLoaded) {
         			Prism.hooks.add('line-numbers', completeHook);
         		} else {
        -			var mutateDom = highlightLines(pre, lines);
        +			var mutateDom = highlightLines(pre);
         			mutateDom();
         			fakeTimer = setTimeout(applyHash, 1);
         		}
        @@ -309,9 +320,11 @@
         
         	window.addEventListener('hashchange', applyHash);
         	window.addEventListener('resize', function () {
        -		var actions = $$('pre[data-line]').map(function (pre) {
        -			return highlightLines(pre);
        -		});
        +		var actions = $$('pre')
        +			.filter(isActiveFor)
        +			.map(function (pre) {
        +				return highlightLines(pre);
        +			});
         		actions.forEach(callFunction);
         	});
         
        diff --git a/plugins/line-highlight/prism-line-highlight.min.js b/plugins/line-highlight/prism-line-highlight.min.js
        index d2b049ec86..d3707e2a31 100644
        --- a/plugins/line-highlight/prism-line-highlight.min.js
        +++ b/plugins/line-highlight/prism-line-highlight.min.js
        @@ -1 +1 @@
        -!function(){if("undefined"!=typeof self&&self.Prism&&self.document&&document.querySelector){var t,s=function(){if(void 0===t){var e=document.createElement("div");e.style.fontSize="13px",e.style.lineHeight="1.5",e.style.padding="0",e.style.border="0",e.innerHTML=" 
         ",document.body.appendChild(e),t=38===e.offsetHeight,document.body.removeChild(e)}return t},b=!0,a=0;Prism.hooks.add("before-sanity-check",function(e){var t=e.element.parentElement,n=t&&t.getAttribute("data-line");if(t&&n&&/pre/i.test(t.nodeName)){var i=0;v(".line-highlight",t).forEach(function(e){i+=e.textContent.length,e.parentNode.removeChild(e)}),i&&/^( \n)+$/.test(e.code.slice(-i))&&(e.code=e.code.slice(0,-i))}}),Prism.hooks.add("complete",function e(t){var n=t.element.parentElement,i=n&&n.getAttribute("data-line");if(n&&i&&/pre/i.test(n.nodeName)){clearTimeout(a);var r=Prism.plugins.lineNumbers,o=t.plugins&&t.plugins.lineNumbers;if(y(n,"line-numbers")&&r&&!o)Prism.hooks.add("line-numbers",e);else l(n,i)(),a=setTimeout(u,1)}}),window.addEventListener("hashchange",u),window.addEventListener("resize",function(){v("pre[data-line]").map(function(e){return l(e)}).forEach(E)})}function v(e,t){return Array.prototype.slice.call((t||document).querySelectorAll(e))}function y(e,t){return t=" "+t+" ",-1<(" "+e.className+" ").replace(/[\n\t]/g," ").indexOf(t)}function E(e){e()}function l(u,e,d){var t=(e="string"==typeof e?e:u.getAttribute("data-line")).replace(/\s+/g,"").split(",").filter(Boolean),c=+u.getAttribute("data-line-offset")||0,f=(s()?parseInt:parseFloat)(getComputedStyle(u).lineHeight),p=y(u,"line-numbers"),n=u.querySelector("code"),m=p?u:n||u,h=[],g=n&&m!=n?function(e,t){var n=getComputedStyle(e),i=getComputedStyle(t);function r(e){return+e.substr(0,e.length-2)}return t.offsetTop+r(i.borderTopWidth)+r(i.paddingTop)-r(n.paddingTop)}(u,n):0;t.forEach(function(e){var t=e.split("-"),n=+t[0],i=+t[1]||n,r=u.querySelector('.line-highlight[data-range="'+e+'"]')||document.createElement("div");if(h.push(function(){r.setAttribute("aria-hidden","true"),r.setAttribute("data-range",e),r.className=(d||"")+" line-highlight"}),p&&Prism.plugins.lineNumbers){var o=Prism.plugins.lineNumbers.getLine(u,n),a=Prism.plugins.lineNumbers.getLine(u,i);if(o){var l=o.offsetTop+g+"px";h.push(function(){r.style.top=l})}if(a){var s=a.offsetTop-o.offsetTop+a.offsetHeight+"px";h.push(function(){r.style.height=s})}}else h.push(function(){r.setAttribute("data-start",String(n)),n span",u).forEach(function(e,t){var n=t+l;e.onclick=function(){var e=i+"."+n;b=!1,location.hash=e,setTimeout(function(){b=!0},1)}})}}return function(){h.forEach(E)}}function u(){var e=location.hash.slice(1);v(".temporary.line-highlight").forEach(function(e){e.parentNode.removeChild(e)});var t=(e.match(/\.([\d,-]+)$/)||[,""])[1];if(t&&!document.getElementById(e)){var n=e.slice(0,e.lastIndexOf(".")),i=document.getElementById(n);if(i)i.hasAttribute("data-line")||i.setAttribute("data-line",""),l(i,t,"temporary ")(),b&&document.querySelector(".temporary.line-highlight").scrollIntoView()}}}(); \ No newline at end of file +!function(){if("undefined"!=typeof self&&self.Prism&&self.document&&document.querySelector){var t,o="line-numbers",s="linkable-line-numbers",a=function(){if(void 0===t){var e=document.createElement("div");e.style.fontSize="13px",e.style.lineHeight="1.5",e.style.padding="0",e.style.border="0",e.innerHTML=" 
         ",document.body.appendChild(e),t=38===e.offsetHeight,document.body.removeChild(e)}return t},l=!0,u=0;Prism.hooks.add("before-sanity-check",function(e){var t=e.element.parentElement;if(c(t)){var n=0;v(".line-highlight",t).forEach(function(e){n+=e.textContent.length,e.parentNode.removeChild(e)}),n&&/^( \n)+$/.test(e.code.slice(-n))&&(e.code=e.code.slice(0,-n))}}),Prism.hooks.add("complete",function e(t){var n=t.element.parentElement;if(c(n)){clearTimeout(u);var i=Prism.plugins.lineNumbers,r=t.plugins&&t.plugins.lineNumbers;if(b(n,o)&&i&&!r)Prism.hooks.add("line-numbers",e);else d(n)(),u=setTimeout(f,1)}}),window.addEventListener("hashchange",f),window.addEventListener("resize",function(){v("pre").filter(c).map(function(e){return d(e)}).forEach(y)})}function v(e,t){return Array.prototype.slice.call((t||document).querySelectorAll(e))}function b(e,t){return e.classList.contains(t)}function y(e){e()}function c(e){return!(!e||!/pre/i.test(e.nodeName))&&(!!e.hasAttribute("data-line")||!(!e.id||!Prism.util.isActive(e,s)))}function d(u,e,c){var t=(e="string"==typeof e?e:u.getAttribute("data-line")||"").replace(/\s+/g,"").split(",").filter(Boolean),d=+u.getAttribute("data-line-offset")||0,f=(a()?parseInt:parseFloat)(getComputedStyle(u).lineHeight),p=Prism.util.isActive(u,o),n=u.querySelector("code"),h=p?u:n||u,m=[],g=n&&h!=n?function(e,t){var n=getComputedStyle(e),i=getComputedStyle(t);function r(e){return+e.substr(0,e.length-2)}return t.offsetTop+r(i.borderTopWidth)+r(i.paddingTop)-r(n.paddingTop)}(u,n):0;t.forEach(function(e){var t=e.split("-"),n=+t[0],i=+t[1]||n,r=u.querySelector('.line-highlight[data-range="'+e+'"]')||document.createElement("div");if(m.push(function(){r.setAttribute("aria-hidden","true"),r.setAttribute("data-range",e),r.className=(c||"")+" line-highlight"}),p&&Prism.plugins.lineNumbers){var o=Prism.plugins.lineNumbers.getLine(u,n),s=Prism.plugins.lineNumbers.getLine(u,i);if(o){var a=o.offsetTop+g+"px";m.push(function(){r.style.top=a})}if(s){var l=s.offsetTop-o.offsetTop+s.offsetHeight+"px";m.push(function(){r.style.height=l})}}else m.push(function(){r.setAttribute("data-start",String(n)),n span",u).forEach(function(e,t){var n=t+r;e.onclick=function(){var e=i+"."+n;l=!1,location.hash=e,setTimeout(function(){l=!0},1)}})}return function(){m.forEach(y)}}function f(){var e=location.hash.slice(1);v(".temporary.line-highlight").forEach(function(e){e.parentNode.removeChild(e)});var t=(e.match(/\.([\d,-]+)$/)||[,""])[1];if(t&&!document.getElementById(e)){var n=e.slice(0,e.lastIndexOf(".")),i=document.getElementById(n);if(i)i.hasAttribute("data-line")||i.setAttribute("data-line",""),d(i,t,"temporary ")(),l&&document.querySelector(".temporary.line-highlight").scrollIntoView()}}}(); \ No newline at end of file From 1dfc8271b23218c89b7d8121ad80f2846f4e9daf Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Sun, 7 Feb 2021 14:54:09 +0100 Subject: [PATCH 0729/1100] HTTP: Fixed body not being highlighted (#2734) --- components/prism-http.js | 2 +- components/prism-http.min.js | 2 +- .../languages/javascript+http/issue2733.test | 112 ++++++++++++++++++ tests/languages/json+http/issue2733.test | 112 ++++++++++++++++++ tests/languages/markup+http/issue2733.test | 85 +++++++++++++ 5 files changed, 311 insertions(+), 2 deletions(-) create mode 100644 tests/languages/javascript+http/issue2733.test create mode 100644 tests/languages/json+http/issue2733.test create mode 100644 tests/languages/markup+http/issue2733.test diff --git a/components/prism-http.js b/components/prism-http.js index d8310a72a8..4dea0e4865 100644 --- a/components/prism-http.js +++ b/components/prism-http.js @@ -90,7 +90,7 @@ var pattern = suffixTypes[contentType] ? getSuffixPattern(contentType) : contentType; options[contentType.replace(/\//g, '-')] = { - pattern: RegExp('(content-type:\\s*' + pattern + '.*)(?:\\r?\\n|\\r){2}[\\s\\S]*', 'i'), + pattern: RegExp('(content-type:\\s*' + pattern + '(?:(?:\\r\\n?|\\n).+)*)(?:\\r?\\n|\\r){2}[\\s\\S]*', 'i'), lookbehind: true, inside: httpLanguages[contentType] }; diff --git a/components/prism-http.min.js b/components/prism-http.min.js index 955fbc5f63..4549361429 100644 --- a/components/prism-http.min.js +++ b/components/prism-http.min.js @@ -1 +1 @@ -!function(t){t.languages.http={"request-line":{pattern:/^(?:GET|HEAD|POST|PUT|DELETE|CONNECT|OPTIONS|TRACE|PATCH|PRI|SEARCH)\s(?:https?:\/\/|\/)\S*\sHTTP\/[0-9.]+/m,inside:{method:{pattern:/^[A-Z]+\b/,alias:"property"},"request-target":{pattern:/^(\s)(?:https?:\/\/|\/)\S*(?=\s)/,lookbehind:!0,alias:"url",inside:t.languages.uri},"http-version":{pattern:/^(\s)HTTP\/[0-9.]+/,lookbehind:!0,alias:"property"}}},"response-status":{pattern:/^HTTP\/[0-9.]+ \d+ .+/m,inside:{"http-version":{pattern:/^HTTP\/[0-9.]+/,alias:"property"},"status-code":{pattern:/^(\s)\d+(?=\s)/,lookbehind:!0,alias:"number"},"reason-phrase":{pattern:/^(\s).+/,lookbehind:!0,alias:"string"}}},"header-name":{pattern:/^[\w-]+:(?=.)/m,alias:"keyword"}};var a,e,s,n=t.languages,i={"application/javascript":n.javascript,"application/json":n.json||n.javascript,"application/xml":n.xml,"text/xml":n.xml,"text/html":n.html,"text/css":n.css},r={"application/json":!0,"application/xml":!0};for(var p in i)if(i[p]){a=a||{};var o=r[p]?(void 0,s=(e=p).replace(/^[a-z]+\//,""),"(?:"+e+"|\\w+/(?:[\\w.-]+\\+)+"+s+"(?![+\\w.-]))"):p;a[p.replace(/\//g,"-")]={pattern:RegExp("(content-type:\\s*"+o+".*)(?:\\r?\\n|\\r){2}[\\s\\S]*","i"),lookbehind:!0,inside:i[p]}}a&&t.languages.insertBefore("http","header-name",a)}(Prism); \ No newline at end of file +!function(t){t.languages.http={"request-line":{pattern:/^(?:GET|HEAD|POST|PUT|DELETE|CONNECT|OPTIONS|TRACE|PATCH|PRI|SEARCH)\s(?:https?:\/\/|\/)\S*\sHTTP\/[0-9.]+/m,inside:{method:{pattern:/^[A-Z]+\b/,alias:"property"},"request-target":{pattern:/^(\s)(?:https?:\/\/|\/)\S*(?=\s)/,lookbehind:!0,alias:"url",inside:t.languages.uri},"http-version":{pattern:/^(\s)HTTP\/[0-9.]+/,lookbehind:!0,alias:"property"}}},"response-status":{pattern:/^HTTP\/[0-9.]+ \d+ .+/m,inside:{"http-version":{pattern:/^HTTP\/[0-9.]+/,alias:"property"},"status-code":{pattern:/^(\s)\d+(?=\s)/,lookbehind:!0,alias:"number"},"reason-phrase":{pattern:/^(\s).+/,lookbehind:!0,alias:"string"}}},"header-name":{pattern:/^[\w-]+:(?=.)/m,alias:"keyword"}};var a,e,s,n=t.languages,r={"application/javascript":n.javascript,"application/json":n.json||n.javascript,"application/xml":n.xml,"text/xml":n.xml,"text/html":n.html,"text/css":n.css},i={"application/json":!0,"application/xml":!0};for(var p in r)if(r[p]){a=a||{};var o=i[p]?(void 0,s=(e=p).replace(/^[a-z]+\//,""),"(?:"+e+"|\\w+/(?:[\\w.-]+\\+)+"+s+"(?![+\\w.-]))"):p;a[p.replace(/\//g,"-")]={pattern:RegExp("(content-type:\\s*"+o+"(?:(?:\\r\\n?|\\n).+)*)(?:\\r?\\n|\\r){2}[\\s\\S]*","i"),lookbehind:!0,inside:r[p]}}a&&t.languages.insertBefore("http","header-name",a)}(Prism); \ No newline at end of file diff --git a/tests/languages/javascript+http/issue2733.test b/tests/languages/javascript+http/issue2733.test new file mode 100644 index 0000000000..cdd0e2e827 --- /dev/null +++ b/tests/languages/javascript+http/issue2733.test @@ -0,0 +1,112 @@ +HTTP/1.1 200 OK +connection: keep-alive +content-type: application/json +date: Sat, 23 Jan 2021 20:36:14 GMT +keep-alive: timeout=60 +transfer-encoding: chunked + +{ + "id": 1, + "name": "John Doe", + "userName": "jdoe", + "email": "whatever@something.zzz", + "phone": "1234567890", + "birthDate": "1878-05-06", + "address": { + "street": "Fake St", + "street2": "Apt. 556", + "city": "Gwenborough", + "state": "ZZ", + "zip": "12345" + } +} + +---------------------------------------------------- + +[ + ["response-status", [ + ["http-version", "HTTP/1.1"], + ["status-code", "200"], + ["reason-phrase", "OK"] + ]], + + ["header-name", "connection:"], + " keep-alive\r\n", + + ["header-name", "content-type:"], + " application/json\r\n", + + ["header-name", "date:"], + " Sat, 23 Jan 2021 20:36:14 GMT\r\n", + + ["header-name", "keep-alive:"], + " timeout=60\r\n", + + ["header-name", "transfer-encoding:"], + " chunked", + ["application-json", [ + ["punctuation", "{"], + + ["string", "\"id\""], + ["operator", ":"], + ["number", "1"], + ["punctuation", ","], + + ["string", "\"name\""], + ["operator", ":"], + ["string", "\"John Doe\""], + ["punctuation", ","], + + ["string", "\"userName\""], + ["operator", ":"], + ["string", "\"jdoe\""], + ["punctuation", ","], + + ["string", "\"email\""], + ["operator", ":"], + ["string", "\"whatever@something.zzz\""], + ["punctuation", ","], + + ["string", "\"phone\""], + ["operator", ":"], + ["string", "\"1234567890\""], + ["punctuation", ","], + + ["string", "\"birthDate\""], + ["operator", ":"], + ["string", "\"1878-05-06\""], + ["punctuation", ","], + + ["string", "\"address\""], + ["operator", ":"], + ["punctuation", "{"], + + ["string", "\"street\""], + ["operator", ":"], + ["string", "\"Fake St\""], + ["punctuation", ","], + + ["string", "\"street2\""], + ["operator", ":"], + ["string", "\"Apt. 556\""], + ["punctuation", ","], + + ["string", "\"city\""], + ["operator", ":"], + ["string", "\"Gwenborough\""], + ["punctuation", ","], + + ["string", "\"state\""], + ["operator", ":"], + ["string", "\"ZZ\""], + ["punctuation", ","], + + ["string", "\"zip\""], + ["operator", ":"], + ["string", "\"12345\""], + + ["punctuation", "}"], + + ["punctuation", "}"] + ]] +] \ No newline at end of file diff --git a/tests/languages/json+http/issue2733.test b/tests/languages/json+http/issue2733.test new file mode 100644 index 0000000000..024da6bbd1 --- /dev/null +++ b/tests/languages/json+http/issue2733.test @@ -0,0 +1,112 @@ +HTTP/1.1 200 OK +connection: keep-alive +content-type: application/json +date: Sat, 23 Jan 2021 20:36:14 GMT +keep-alive: timeout=60 +transfer-encoding: chunked + +{ + "id": 1, + "name": "John Doe", + "userName": "jdoe", + "email": "whatever@something.zzz", + "phone": "1234567890", + "birthDate": "1878-05-06", + "address": { + "street": "Fake St", + "street2": "Apt. 556", + "city": "Gwenborough", + "state": "ZZ", + "zip": "12345" + } +} + +---------------------------------------------------- + +[ + ["response-status", [ + ["http-version", "HTTP/1.1"], + ["status-code", "200"], + ["reason-phrase", "OK"] + ]], + + ["header-name", "connection:"], + " keep-alive\r\n", + + ["header-name", "content-type:"], + " application/json\r\n", + + ["header-name", "date:"], + " Sat, 23 Jan 2021 20:36:14 GMT\r\n", + + ["header-name", "keep-alive:"], + " timeout=60\r\n", + + ["header-name", "transfer-encoding:"], + " chunked", + ["application-json", [ + ["punctuation", "{"], + + ["property", "\"id\""], + ["operator", ":"], + ["number", "1"], + ["punctuation", ","], + + ["property", "\"name\""], + ["operator", ":"], + ["string", "\"John Doe\""], + ["punctuation", ","], + + ["property", "\"userName\""], + ["operator", ":"], + ["string", "\"jdoe\""], + ["punctuation", ","], + + ["property", "\"email\""], + ["operator", ":"], + ["string", "\"whatever@something.zzz\""], + ["punctuation", ","], + + ["property", "\"phone\""], + ["operator", ":"], + ["string", "\"1234567890\""], + ["punctuation", ","], + + ["property", "\"birthDate\""], + ["operator", ":"], + ["string", "\"1878-05-06\""], + ["punctuation", ","], + + ["property", "\"address\""], + ["operator", ":"], + ["punctuation", "{"], + + ["property", "\"street\""], + ["operator", ":"], + ["string", "\"Fake St\""], + ["punctuation", ","], + + ["property", "\"street2\""], + ["operator", ":"], + ["string", "\"Apt. 556\""], + ["punctuation", ","], + + ["property", "\"city\""], + ["operator", ":"], + ["string", "\"Gwenborough\""], + ["punctuation", ","], + + ["property", "\"state\""], + ["operator", ":"], + ["string", "\"ZZ\""], + ["punctuation", ","], + + ["property", "\"zip\""], + ["operator", ":"], + ["string", "\"12345\""], + + ["punctuation", "}"], + + ["punctuation", "}"] + ]] +] \ No newline at end of file diff --git a/tests/languages/markup+http/issue2733.test b/tests/languages/markup+http/issue2733.test new file mode 100644 index 0000000000..01b7c2b5d2 --- /dev/null +++ b/tests/languages/markup+http/issue2733.test @@ -0,0 +1,85 @@ +HTTP/1.1 200 OK +connection: keep-alive +content-type: application/xml +date: Sat, 23 Jan 2021 20:36:14 GMT +keep-alive: timeout=60 +transfer-encoding: chunked + + + Data + More Data + + +---------------------------------------------------- + +[ + ["response-status", [ + ["http-version", "HTTP/1.1"], + ["status-code", "200"], + ["reason-phrase", "OK"] + ]], + + ["header-name", "connection:"], + " keep-alive\r\n", + + ["header-name", "content-type:"], + " application/xml\r\n", + + ["header-name", "date:"], + " Sat, 23 Jan 2021 20:36:14 GMT\r\n", + + ["header-name", "keep-alive:"], + " timeout=60\r\n", + + ["header-name", "transfer-encoding:"], + " chunked", + ["application-xml", [ + ["tag", [ + ["tag", [ + ["punctuation", "<"], + "xml" + ]], + ["punctuation", ">"] + ]], + + ["tag", [ + ["tag", [ + ["punctuation", "<"], + "one" + ]], + ["punctuation", ">"] + ]], + "Data", + ["tag", [ + ["tag", [ + ["punctuation", ""] + ]], + + ["tag", [ + ["tag", [ + ["punctuation", "<"], + "two" + ]], + ["punctuation", ">"] + ]], + "More Data", + ["tag", [ + ["tag", [ + ["punctuation", ""] + ]], + + ["tag", [ + ["tag", [ + ["punctuation", ""] + ]] + ]] +] \ No newline at end of file From 9f59f52d52aed1fb1b073c862d79c9a6da37af58 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Sun, 7 Feb 2021 16:21:13 +0100 Subject: [PATCH 0730/1100] JSX: Added support for general spread expressions (#2754) --- components/prism-jsx.js | 34 +++++--- components/prism-jsx.min.js | 2 +- tests/languages/jsx/issue1236.test | 6 +- tests/languages/jsx/issue2753.test | 103 ++++++++++++++++++++++++ tests/languages/jsx/spread_in_tags.test | 90 +++++++++++++++++++-- tests/languages/jsx/tag_feature.test | 23 +++--- tests/languages/tsx/tag_feature.test | 31 ++++--- 7 files changed, 246 insertions(+), 43 deletions(-) create mode 100644 tests/languages/jsx/issue2753.test diff --git a/components/prism-jsx.js b/components/prism-jsx.js index bb87e1ff66..bc39f1bbd7 100644 --- a/components/prism-jsx.js +++ b/components/prism-jsx.js @@ -2,11 +2,28 @@ var javascript = Prism.util.clone(Prism.languages.javascript); +var space = /(?:\s|\/\/.*(?!.)|\/\*(?:[^*]|\*(?!\/))\*\/)/.source; +var braces = /(?:\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])*\})/.source; +var spread = /(?:\{*\.{3}(?:[^{}]|)*\})/.source; + +/** + * @param {string} source + * @param {string} [flags] + */ +function re(source, flags) { + source = source + .replace(//g, function () { return space; }) + .replace(//g, function () { return braces; }) + .replace(//g, function () { return spread; }); + return RegExp(source, flags); +} + +spread = re(spread).source; + + Prism.languages.jsx = Prism.languages.extend('markup', javascript); -Prism.languages.jsx.tag.pattern = RegExp( - /<\/?(?:[\w.:-]+(?:+(?:[\w.:$-]+(?:=(?:"(?:\\[^]|[^\\"])*"|'(?:\\[^]|[^\\'])*'|[^\s{'"/>=]+|\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])+\}))?|\{*\.{3}*[a-z_$][\w$]*(?:\.[a-z_$][\w$]*)**\}))**\/?)?>/.source - .replace(//g, function () { return /(?:\s|\/\/.*(?!.)|\/\*(?:[^*]|\*(?!\/))\*\/)/.source }), - 'i' +Prism.languages.jsx.tag.pattern = re( + /<\/?(?:[\w.:-]+(?:+(?:[\w.:$-]+(?:=(?:"(?:\\[^]|[^\\"])*"|'(?:\\[^]|[^\\'])*'|[^\s{'"/>=]+|))?|))**\/?)?>/.source ); Prism.languages.jsx.tag.inside['tag'].pattern = /^<\/?[^\s>\/]*/i; @@ -16,18 +33,15 @@ Prism.languages.jsx.tag.inside['comment'] = javascript['comment']; Prism.languages.insertBefore('inside', 'attr-name', { 'spread': { - pattern: /\{\s*\.{3}\s*[a-z_$][\w$]*(?:\.[a-z_$][\w$]*)*\s*\}/, - inside: { - 'punctuation': /\.{3}|[{}.]/, - 'attr-value': /\w+/ - } + pattern: re(//.source), + inside: Prism.languages.jsx } }, Prism.languages.jsx.tag); Prism.languages.insertBefore('inside', 'attr-value',{ 'script': { // Allow for two levels of nesting - pattern: /=(?:\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])+\})/i, + pattern: re(/=/.source), inside: { 'script-punctuation': { pattern: /^=(?={)/, diff --git a/components/prism-jsx.min.js b/components/prism-jsx.min.js index acb789ee38..3844e6c32d 100644 --- a/components/prism-jsx.min.js +++ b/components/prism-jsx.min.js @@ -1 +1 @@ -!function(i){var t=i.util.clone(i.languages.javascript);i.languages.jsx=i.languages.extend("markup",t),i.languages.jsx.tag.pattern=RegExp("+(?:[\\w.:$-]+(?:=(?:\"(?:\\\\[^]|[^\\\\\"])*\"|'(?:\\\\[^]|[^\\\\'])*'|[^\\s{'\"/>=]+|\\{(?:\\{(?:\\{[^{}]*\\}|[^{}])*\\}|[^{}])+\\}))?|\\{*\\.{3}*[a-z_$][\\w$]*(?:\\.[a-z_$][\\w$]*)**\\}))**/?)?>".replace(//g,function(){return"(?:\\s|//.*(?!.)|/\\*(?:[^*]|\\*(?!/))\\*/)"}),"i"),i.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/i,i.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:"(?:\\[^]|[^\\"])*"|'(?:\\[^]|[^\\'])*'|[^\s'">]+)/i,i.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,i.languages.jsx.tag.inside.comment=t.comment,i.languages.insertBefore("inside","attr-name",{spread:{pattern:/\{\s*\.{3}\s*[a-z_$][\w$]*(?:\.[a-z_$][\w$]*)*\s*\}/,inside:{punctuation:/\.{3}|[{}.]/,"attr-value":/\w+/}}},i.languages.jsx.tag),i.languages.insertBefore("inside","attr-value",{script:{pattern:/=(?:\{(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])+\})/i,inside:{"script-punctuation":{pattern:/^=(?={)/,alias:"punctuation"},rest:i.languages.jsx},alias:"language-javascript"}},i.languages.jsx.tag);var o=function(t){return t?"string"==typeof t?t:"string"==typeof t.content?t.content:t.content.map(o).join(""):""},c=function(t){for(var n=[],e=0;e"===a.content[a.content.length-1].content||n.push({tagName:o(a.content[0].content[1]),openedBraces:0}):0*\\.{3}(?:[^{}]|)*\\})";function n(t,n){return t=t.replace(//g,function(){return"(?:\\s|//.*(?!.)|/\\*(?:[^*]|\\*(?!/))\\*/)"}).replace(//g,function(){return"(?:\\{(?:\\{(?:\\{[^{}]*\\}|[^{}])*\\}|[^{}])*\\})"}).replace(//g,function(){return e}),RegExp(t,n)}e=n(e).source,o.languages.jsx=o.languages.extend("markup",t),o.languages.jsx.tag.pattern=n("+(?:[\\w.:$-]+(?:=(?:\"(?:\\\\[^]|[^\\\\\"])*\"|'(?:\\\\[^]|[^\\\\'])*'|[^\\s{'\"/>=]+|))?|))**/?)?>"),o.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/i,o.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:"(?:\\[^]|[^\\"])*"|'(?:\\[^]|[^\\'])*'|[^\s'">]+)/i,o.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,o.languages.jsx.tag.inside.comment=t.comment,o.languages.insertBefore("inside","attr-name",{spread:{pattern:n(""),inside:o.languages.jsx}},o.languages.jsx.tag),o.languages.insertBefore("inside","attr-value",{script:{pattern:n("="),inside:{"script-punctuation":{pattern:/^=(?={)/,alias:"punctuation"},rest:o.languages.jsx},alias:"language-javascript"}},o.languages.jsx.tag);var i=function(t){return t?"string"==typeof t?t:"string"==typeof t.content?t.content:t.content.map(i).join(""):""},r=function(t){for(var n=[],e=0;e"===a.content[a.content.length-1].content||n.push({tagName:i(a.content[0].content[1]),openedBraces:0}):0"] diff --git a/tests/languages/jsx/issue2753.test b/tests/languages/jsx/issue2753.test new file mode 100644 index 0000000000..5a9342426d --- /dev/null +++ b/tests/languages/jsx/issue2753.test @@ -0,0 +1,103 @@ +const Test = () => { + return ( +
        + + +
        + ) +} + +---------------------------------------------------- + +[ + ["keyword", "const"], + ["function-variable", "Test"], + ["operator", "="], + ["punctuation", "("], + ["punctuation", ")"], + ["operator", "=>"], + ["punctuation", "{"], + + ["keyword", "return"], + ["punctuation", "("], + + ["tag", [ + ["tag", [ + ["punctuation", "<"], + "div" + ]], + ["punctuation", ">"] + ]], + ["plain-text", "\r\n "], + ["tag", [ + ["tag", [ + ["punctuation", "<"], + ["class-name", "Button"] + ]], + ["spread", [ + ["punctuation", "{"], + ["operator", "..."], + ["punctuation", "{"], + "onClick", + ["punctuation", ","], + " disabled", + ["punctuation", "}"], + ["punctuation", "}"] + ]], + ["punctuation", ">"] + ]], + ["plain-text", "\r\n Click (Wrong Highlighting)\r\n "], + ["tag", [ + ["tag", [ + ["punctuation", ""] + ]], + ["plain-text", "\r\n "], + ["tag", [ + ["tag", [ + ["punctuation", "<"], + ["class-name", "Button"] + ]], + ["attr-name", ["onClick"]], + ["script", [ + ["script-punctuation", "="], + ["punctuation", "{"], + "onClick", + ["punctuation", "}"] + ]], + ["attr-name", ["disabled"]], + ["script", [ + ["script-punctuation", "="], + ["punctuation", "{"], + "disabled", + ["punctuation", "}"] + ]], + ["punctuation", ">"] + ]], + ["plain-text", "\r\n Click (Correct highlighting)\r\n "], + ["tag", [ + ["tag", [ + ["punctuation", ""] + ]], + ["plain-text", "\r\n "], + ["tag", [ + ["tag", [ + ["punctuation", ""] + ]], + + ["punctuation", ")"], + + ["punctuation", "}"] +] \ No newline at end of file diff --git a/tests/languages/jsx/spread_in_tags.test b/tests/languages/jsx/spread_in_tags.test index 3ec4eebbe3..49faaf4270 100644 --- a/tests/languages/jsx/spread_in_tags.test +++ b/tests/languages/jsx/spread_in_tags.test @@ -1,6 +1,9 @@
        +
        +
        +
        ---------------------------------------------------- @@ -12,8 +15,8 @@ ]], ["spread", [ ["punctuation", "{"], - ["punctuation", "..."], - ["attr-value", "foo"], + ["operator", "..."], + "foo", ["punctuation", "}"] ]], ["punctuation", ">"] @@ -25,6 +28,74 @@ ]], ["punctuation", ">"] ]], + + ["tag", [ + ["tag", [ + ["punctuation", "<"], + "div" + ]], + ["spread", [ + ["punctuation", "{"], + ["operator", "..."], + "foo ", + ["punctuation", "}"] + ]], + ["punctuation", ">"] + ]], + ["tag", [ + ["tag", [ + ["punctuation", ""] + ]], + + ["tag", [ + ["tag", [ + ["punctuation", "<"], + "div" + ]], + ["spread", [ + ["punctuation", "{"], + ["operator", "..."], + " foo ", + ["punctuation", "}"] + ]], + ["punctuation", ">"] + ]], + ["tag", [ + ["tag", [ + ["punctuation", ""] + ]], + + ["tag", [ + ["tag", [ + ["punctuation", "<"], + "div" + ]], + ["spread", [ + ["punctuation", "{"], + ["operator", "..."], + ["punctuation", "{"], + "onClick", + ["punctuation", ","], + " disabled", + ["punctuation", "}"], + ["punctuation", "}"] + ]], + ["punctuation", ">"] + ]], + ["tag", [ + ["tag", [ + ["punctuation", ""] + ]], + ["tag", [ ["tag", [ ["punctuation", "<"], @@ -32,8 +103,10 @@ ]], ["spread", [ ["punctuation", "{"], - ["punctuation", "..."], - ["attr-value", "foo"], + ["operator", "..."], + ["function", "foo"], + ["punctuation", "("], + ["punctuation", ")"], ["punctuation", "}"] ]], ["punctuation", ">"] @@ -45,6 +118,7 @@ ]], ["punctuation", ">"] ]], + ["tag", [ ["tag", [ ["punctuation", "<"], @@ -52,8 +126,12 @@ ]], ["spread", [ ["punctuation", "{"], - ["punctuation", "..."], - ["attr-value", "foo"], + ["operator", "..."], + ["punctuation", "("], + "foo ", + ["operator", "??"], + " bar", + ["punctuation", ")"], ["punctuation", "}"] ]], ["punctuation", ">"] diff --git a/tests/languages/jsx/tag_feature.test b/tests/languages/jsx/tag_feature.test index 9255ea1e44..c76952c872 100644 --- a/tests/languages/jsx/tag_feature.test +++ b/tests/languages/jsx/tag_feature.test @@ -36,14 +36,15 @@ var myElement = ; ]], ["attr-name", ["someProperty"]], ["script", [ - ["script-punctuation", "="], - ["punctuation", "{"], - ["boolean", "true"], - ["punctuation", "}"] + ["script-punctuation", "="], + ["punctuation", "{"], + ["boolean", "true"], + ["punctuation", "}"] ]], ["punctuation", "/>"] ]], ["punctuation", ";"], + ["tag", [ ["tag", [ ["punctuation", "<"], @@ -51,8 +52,8 @@ var myElement = ; ]], ["spread", [ ["punctuation", "{"], - ["punctuation", "..."], - ["attr-value", "foo"], + ["operator", "..."], + "foo", ["punctuation", "}"] ]], ["punctuation", ">"] @@ -64,6 +65,7 @@ var myElement = ; ]], ["punctuation", ">"] ]], + ["tag", [ ["tag", [ ["punctuation", "<"] @@ -77,6 +79,7 @@ var myElement = ; ]], ["punctuation", ">"] ]], + ["tag", [ ["tag", [ ["punctuation", "<"], @@ -84,10 +87,10 @@ var myElement = ; ]], ["attr-name", ["leaf"]], ["script", [ - ["script-punctuation", "="], - ["punctuation", "{"], - ["boolean", "true"], - ["punctuation", "}"] + ["script-punctuation", "="], + ["punctuation", "{"], + ["boolean", "true"], + ["punctuation", "}"] ]], ["punctuation", ">"] ]], diff --git a/tests/languages/tsx/tag_feature.test b/tests/languages/tsx/tag_feature.test index 97e8e7127a..3008a30eea 100644 --- a/tests/languages/tsx/tag_feature.test +++ b/tests/languages/tsx/tag_feature.test @@ -40,14 +40,15 @@ class Test extends Component { ]], ["attr-name", ["someProperty"]], ["script", [ - ["script-punctuation", "="], - ["punctuation", "{"], - ["boolean", "true"], - ["punctuation", "}"] + ["script-punctuation", "="], + ["punctuation", "{"], + ["boolean", "true"], + ["punctuation", "}"] ]], ["punctuation", "/>"] ]], ["punctuation", ";"], + ["tag", [ ["tag", [ ["punctuation", "<"], @@ -55,8 +56,8 @@ class Test extends Component { ]], ["spread", [ ["punctuation", "{"], - ["punctuation", "..."], - ["attr-value", "foo"], + ["operator", "..."], + "foo", ["punctuation", "}"] ]], ["punctuation", "/>"] @@ -69,10 +70,10 @@ class Test extends Component { ]], ["attr-name", ["leaf"]], ["script", [ - ["script-punctuation", "="], - ["punctuation", "{"], - ["boolean", "true"], - ["punctuation", "}"] + ["script-punctuation", "="], + ["punctuation", "{"], + ["boolean", "true"], + ["punctuation", "}"] ]], ["punctuation", ">"] ]], @@ -84,16 +85,18 @@ class Test extends Component { ["punctuation", ">"] ]], - ["keyword", "class"], + ["keyword", "class"], ["class-name", ["Test"]], ["keyword", "extends"], ["class-name", ["Component"]], ["punctuation", "{"], + ["function", "render"], ["punctuation", "("], ["punctuation", ")"], ["punctuation", "{"], - ["keyword","return"], + + ["keyword", "return"], ["tag", [ ["tag", [ ["punctuation", "<"], @@ -119,8 +122,10 @@ class Test extends Component { ["punctuation", ">"] ]], ["punctuation", ";"], + ["punctuation", "}"], - ["punctuation","}"] + + ["punctuation", "}"] ] ---------------------------------------------------- From cf354ef5a758951110162b75b0395345f0f4b6b8 Mon Sep 17 00:00:00 2001 From: Tim Roesner <13894518+timroesner@users.noreply.github.com> Date: Thu, 11 Feb 2021 10:17:35 -0800 Subject: [PATCH 0731/1100] Swift: Added `some` keyword (#2756) --- components/prism-swift.js | 2 +- components/prism-swift.min.js | 2 +- tests/languages/swift/keyword_feature.test | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/components/prism-swift.js b/components/prism-swift.js index c13886cf86..ac4866fc04 100644 --- a/components/prism-swift.js +++ b/components/prism-swift.js @@ -16,7 +16,7 @@ Prism.languages.swift = Prism.languages.extend('clike', { } } }, - 'keyword': /\b(?:as|associativity|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic(?:Type)?|else|enum|extension|fallthrough|final|for|func|get|guard|if|import|in|infix|init|inout|internal|is|lazy|left|let|mutating|new|none|nonmutating|operator|optional|override|postfix|precedence|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|Self|set|static|struct|subscript|super|switch|throws?|try|Type|typealias|unowned|unsafe|var|weak|where|while|willSet|__(?:COLUMN__|FILE__|FUNCTION__|LINE__))\b/, + 'keyword': /\b(?:as|associativity|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic(?:Type)?|else|enum|extension|fallthrough|final|for|func|get|guard|if|import|in|infix|init|inout|internal|is|lazy|left|let|mutating|new|none|nonmutating|operator|optional|override|postfix|precedence|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|Self|set|some|static|struct|subscript|super|switch|throws?|try|Type|typealias|unowned|unsafe|var|weak|where|while|willSet|__(?:COLUMN__|FILE__|FUNCTION__|LINE__))\b/, 'number': /\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i, 'constant': /\b(?:nil|[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/, 'atrule': /@\b(?:IB(?:Outlet|Designable|Action|Inspectable)|class_protocol|exported|noreturn|NS(?:Copying|Managed)|objc|UIApplicationMain|auto_closure)\b/, diff --git a/components/prism-swift.min.js b/components/prism-swift.min.js index 28cd112d80..335e555311 100644 --- a/components/prism-swift.min.js +++ b/components/prism-swift.min.js @@ -1 +1 @@ -Prism.languages.swift=Prism.languages.extend("clike",{string:{pattern:/("|')(?:\\(?:\((?:[^()]|\([^)]+\))+\)|\r\n|[^(])|(?!\1)[^\\\r\n])*\1/,greedy:!0,inside:{interpolation:{pattern:/\\\((?:[^()]|\([^)]+\))+\)/,inside:{delimiter:{pattern:/^\\\(|\)$/,alias:"variable"}}}}},keyword:/\b(?:as|associativity|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic(?:Type)?|else|enum|extension|fallthrough|final|for|func|get|guard|if|import|in|infix|init|inout|internal|is|lazy|left|let|mutating|new|none|nonmutating|operator|optional|override|postfix|precedence|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|Self|set|static|struct|subscript|super|switch|throws?|try|Type|typealias|unowned|unsafe|var|weak|where|while|willSet|__(?:COLUMN__|FILE__|FUNCTION__|LINE__))\b/,number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,constant:/\b(?:nil|[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,atrule:/@\b(?:IB(?:Outlet|Designable|Action|Inspectable)|class_protocol|exported|noreturn|NS(?:Copying|Managed)|objc|UIApplicationMain|auto_closure)\b/,builtin:/\b(?:[A-Z]\S+|abs|advance|alignof(?:Value)?|assert|contains|count(?:Elements)?|debugPrint(?:ln)?|distance|drop(?:First|Last)|dump|enumerate|equal|filter|find|first|getVaList|indices|isEmpty|join|last|lexicographicalCompare|map|max(?:Element)?|min(?:Element)?|numericCast|overlaps|partition|print(?:ln)?|reduce|reflect|reverse|sizeof(?:Value)?|sort(?:ed)?|split|startsWith|stride(?:of(?:Value)?)?|suffix|swap|toDebugString|toString|transcode|underestimateCount|unsafeBitCast|with(?:ExtendedLifetime|Unsafe(?:MutablePointers?|Pointers?)|VaList))\b/}),Prism.languages.swift.string.inside.interpolation.inside.rest=Prism.languages.swift; \ No newline at end of file +Prism.languages.swift=Prism.languages.extend("clike",{string:{pattern:/("|')(?:\\(?:\((?:[^()]|\([^)]+\))+\)|\r\n|[^(])|(?!\1)[^\\\r\n])*\1/,greedy:!0,inside:{interpolation:{pattern:/\\\((?:[^()]|\([^)]+\))+\)/,inside:{delimiter:{pattern:/^\\\(|\)$/,alias:"variable"}}}}},keyword:/\b(?:as|associativity|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic(?:Type)?|else|enum|extension|fallthrough|final|for|func|get|guard|if|import|in|infix|init|inout|internal|is|lazy|left|let|mutating|new|none|nonmutating|operator|optional|override|postfix|precedence|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|Self|set|some|static|struct|subscript|super|switch|throws?|try|Type|typealias|unowned|unsafe|var|weak|where|while|willSet|__(?:COLUMN__|FILE__|FUNCTION__|LINE__))\b/,number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,constant:/\b(?:nil|[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,atrule:/@\b(?:IB(?:Outlet|Designable|Action|Inspectable)|class_protocol|exported|noreturn|NS(?:Copying|Managed)|objc|UIApplicationMain|auto_closure)\b/,builtin:/\b(?:[A-Z]\S+|abs|advance|alignof(?:Value)?|assert|contains|count(?:Elements)?|debugPrint(?:ln)?|distance|drop(?:First|Last)|dump|enumerate|equal|filter|find|first|getVaList|indices|isEmpty|join|last|lexicographicalCompare|map|max(?:Element)?|min(?:Element)?|numericCast|overlaps|partition|print(?:ln)?|reduce|reflect|reverse|sizeof(?:Value)?|sort(?:ed)?|split|startsWith|stride(?:of(?:Value)?)?|suffix|swap|toDebugString|toString|transcode|underestimateCount|unsafeBitCast|with(?:ExtendedLifetime|Unsafe(?:MutablePointers?|Pointers?)|VaList))\b/}),Prism.languages.swift.string.inside.interpolation.inside.rest=Prism.languages.swift; \ No newline at end of file diff --git a/tests/languages/swift/keyword_feature.test b/tests/languages/swift/keyword_feature.test index 75fb886640..13304315d4 100644 --- a/tests/languages/swift/keyword_feature.test +++ b/tests/languages/swift/keyword_feature.test @@ -55,6 +55,7 @@ safe self Self set +some static struct subscript @@ -137,6 +138,7 @@ __LINE__ ["keyword", "self"], ["keyword", "Self"], ["keyword", "set"], + ["keyword", "some"], ["keyword", "static"], ["keyword", "struct"], ["keyword", "subscript"], From 0feb266f4695810317b4f0fbafc810623df07023 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Fri, 12 Feb 2021 15:08:57 +0100 Subject: [PATCH 0732/1100] Dangerfile: Fixed how changed files are determined (#2757) --- dangerfile.js | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/dangerfile.js b/dangerfile.js index 02d8df8156..23e10750da 100644 --- a/dangerfile.js +++ b/dangerfile.js @@ -24,6 +24,25 @@ function readPRFile(path) { return git.show([`pr:${path}`]); } +/** + * Returns the relative paths of all files changed in the PR. + * + * @returns {Promise} + */ +const getChangedFiles = async () => { + // Determine the merge base between master and the PR branch. + // If files changed in master since PR was branched they would show in the diff otherwise. + // https://stackoverflow.com/questions/25071579/list-all-files-changed-in-a-pull-request-in-git-github + const mergeBase = await git.raw(['merge-base', 'pr', 'HEAD']); + const result = await git.diff(['--name-only', '--no-renames', 'pr', mergeBase]); + return (result || '').split(/\r?\n/g); +}; + +const getChangedMinifiedFiles = async () => { + const changed = await getChangedFiles(); + return changed.filter(file => file.endsWith('.min.js')); +}; + // https://stackoverflow.com/questions/15900485/correct-way-to-convert-size-in-bytes-to-kb-mb-gb-in-javascript const formatBytes = (bytes, decimals = 2) => { if (bytes === 0) return '0 Bytes'; @@ -64,11 +83,6 @@ const getSummary = (rows, totalMasterFileSize, totalFileSize) => { return `A total of ${numFiles} file${maybeS} have changed, with a combined diff of ${byteDiff} (${percentDiff}).`; } -const getChangedMinifiedFiles = async () => { - const result = await git.diff(['--name-only', '--no-renames', 'pr', 'HEAD']); - return (result || '').split(/\r?\n/g).filter(file => file.endsWith('.min.js')); -}; - const run = async () => { const minified = await getChangedMinifiedFiles(); From 45b0e82a3d9ac5bcc74a5b69b7f1fe5697029b13 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Fri, 12 Feb 2021 21:30:45 +0100 Subject: [PATCH 0733/1100] Dangerfile: Trim merge base (#2761) --- dangerfile.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dangerfile.js b/dangerfile.js index 23e10750da..8063393244 100644 --- a/dangerfile.js +++ b/dangerfile.js @@ -33,9 +33,9 @@ const getChangedFiles = async () => { // Determine the merge base between master and the PR branch. // If files changed in master since PR was branched they would show in the diff otherwise. // https://stackoverflow.com/questions/25071579/list-all-files-changed-in-a-pull-request-in-git-github - const mergeBase = await git.raw(['merge-base', 'pr', 'HEAD']); + const mergeBase = (await git.raw(['merge-base', 'pr', 'HEAD'])).trim(); const result = await git.diff(['--name-only', '--no-renames', 'pr', mergeBase]); - return (result || '').split(/\r?\n/g); + return (result || '').trim().split(/\r?\n/g); }; const getChangedMinifiedFiles = async () => { From 3419fb7778b70cd17f66f8d803f0f380d70503df Mon Sep 17 00:00:00 2001 From: edukisto <52005215+edukisto@users.noreply.github.com> Date: Sat, 13 Feb 2021 17:14:46 +0300 Subject: [PATCH 0734/1100] Added KuMir (#2760) --- components.js | 2 +- components.json | 5 + components/prism-kumir.js | 102 ++++++++++++++++++ components/prism-kumir.min.js | 1 + examples/prism-kumir.html | 61 +++++++++++ plugins/autoloader/prism-autoloader.js | 1 + plugins/autoloader/prism-autoloader.min.js | 2 +- plugins/show-language/prism-show-language.js | 2 + .../show-language/prism-show-language.min.js | 2 +- tests/languages/kumir/boolean_feature.test | 13 +++ tests/languages/kumir/comment_feature.test | 27 +++++ tests/languages/kumir/keyword_feature.test | 35 ++++++ tests/languages/kumir/name_feature.test | 19 ++++ tests/languages/kumir/number_feature.test | 35 ++++++ tests/languages/kumir/operator_feature.test | 37 +++++++ tests/languages/kumir/prolog_feature.test | 27 +++++ .../languages/kumir/punctuation_feature.test | 25 +++++ tests/languages/kumir/string_feature.test | 35 ++++++ tests/languages/kumir/type_feature.test | 19 ++++ 19 files changed, 447 insertions(+), 3 deletions(-) create mode 100644 components/prism-kumir.js create mode 100644 components/prism-kumir.min.js create mode 100644 examples/prism-kumir.html create mode 100644 tests/languages/kumir/boolean_feature.test create mode 100644 tests/languages/kumir/comment_feature.test create mode 100644 tests/languages/kumir/keyword_feature.test create mode 100644 tests/languages/kumir/name_feature.test create mode 100644 tests/languages/kumir/number_feature.test create mode 100644 tests/languages/kumir/operator_feature.test create mode 100644 tests/languages/kumir/prolog_feature.test create mode 100644 tests/languages/kumir/punctuation_feature.test create mode 100644 tests/languages/kumir/string_feature.test create mode 100644 tests/languages/kumir/type_feature.test diff --git a/components.js b/components.js index 69c73aa229..ffaa26586e 100644 --- a/components.js +++ b/components.js @@ -1,2 +1,2 @@ -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml","ssml","atom","rss"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","ssml":"SSML","atom":"Atom","rss":"RSS"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","optional":"regex","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"ABNF","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"agda":{"title":"Agda","owner":"xy-ren"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apex":{"title":"Apex","require":["clike","sql"],"owner":"RunDevelopment"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"dkern"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"birb":{"title":"Birb","require":"clike","owner":"Calamity210"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"BNF","alias":"rbnf","aliasTitles":{"rbnf":"RBNF"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"bsl":{"title":"BSL (1C:Enterprise)","alias":"oscript","aliasTitles":{"oscript":"OneScript"},"owner":"Diversus23"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"chaiscript":{"title":"ChaiScript","require":["clike","cpp"],"owner":"RunDevelopment"},"cil":{"title":"CIL","owner":"sbrl"},"clojure":{"title":"Clojure","owner":"troglotit"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"cypher":{"title":"Cypher","owner":"RunDevelopment"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dataweave":{"title":"DataWeave","owner":"machaval"},"dax":{"title":"DAX","owner":"peterbud"},"dhall":{"title":"Dhall","owner":"RunDevelopment"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"dot":{"title":"DOT (Graphviz)","alias":"gv","optional":"markup","owner":"RunDevelopment"},"ebnf":{"title":"EBNF","owner":"RunDevelopment"},"editorconfig":{"title":"EditorConfig","owner":"osipxd"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"c","owner":"Golmote"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","optional":["markdown"],"owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"hlsl":{"title":"HLSL","require":"c","owner":"RunDevelopment"},"http":{"title":"HTTP","optional":["css","javascript","json","markup","uri"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"ignore":{"title":".ignore","owner":"osipxd","alias":["gitignore","hgignore","npmignore"],"aliasTitles":{"gitignore":".gitignore","hgignore":".hgignore","npmignore":".npmignore"}},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike","typescript"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","alias":"webmanifest","aliasTitles":{"webmanifest":"Web App Manifest"},"owner":"CupOfTea696"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"jsstacktrace":{"title":"JS stack trace","owner":"sbrl"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","alias":["kt","kts"],"aliasTitles":{"kts":"Kotlin Script"},"require":"clike","owner":"Golmote"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","optional":"yaml","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"mongodb":{"title":"MongoDB","owner":"airs0urce","require":"javascript"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"naniscript":{"title":"Naninovel Script","owner":"Elringus","alias":"nani"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"psl":{"title":"PATROL Scripting Language","owner":"bertysentry"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":"markup-templating","owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"promql":{"title":"PromQL","owner":"arendjr"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"purebasic":{"title":"PureBasic","require":"clike","alias":"pbfasm","owner":"HeX0R101"},"purescript":{"title":"PureScript","require":"haskell","alias":"purs","owner":"sriharshachilakapati"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"racket":{"title":"Racket","require":"scheme","alias":"rkt","owner":"RunDevelopment"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","owner":"RunDevelopment"},"renpy":{"title":"Ren'py","alias":"rpy","owner":"HyuchiaDiego"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","alias":["sh-session","shellsession"],"owner":"RunDevelopment"},"smali":{"title":"Smali","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sml":{"title":"SML","alias":"smlnj","aliasTitles":{"smlnj":"SML/NJ"},"owner":"RunDevelopment"},"solidity":{"title":"Solidity (Ethereum)","alias":"sol","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"squirrel":{"title":"Squirrel","require":"clike","owner":"RunDevelopment"},"stan":{"title":"Stan","owner":"RunDevelopment"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","vbnet"],"owner":"RunDevelopment"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"typoscript":{"title":"TypoScript","alias":"tsconfig","aliasTitles":{"tsconfig":"TSConfig"},"owner":"dkern"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"uri":{"title":"URI","alias":"url","aliasTitles":{"url":"URL"},"owner":"RunDevelopment"},"v":{"title":"V","require":"clike","owner":"taggon"},"vala":{"title":"Vala","require":"clike","optional":"regex","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":["vb","vba"],"aliasTitles":{"vba":"VBA"},"owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xml-doc":{"title":"XML doc (.net)","require":"markup","modify":["csharp","fsharp","vbnet"],"owner":"RunDevelopment"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"yang":{"title":"YANG","owner":"RunDevelopment"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml","ssml","atom","rss"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","ssml":"SSML","atom":"Atom","rss":"RSS"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","optional":"regex","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"ABNF","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"agda":{"title":"Agda","owner":"xy-ren"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apex":{"title":"Apex","require":["clike","sql"],"owner":"RunDevelopment"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"dkern"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"birb":{"title":"Birb","require":"clike","owner":"Calamity210"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"BNF","alias":"rbnf","aliasTitles":{"rbnf":"RBNF"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"bsl":{"title":"BSL (1C:Enterprise)","alias":"oscript","aliasTitles":{"oscript":"OneScript"},"owner":"Diversus23"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"chaiscript":{"title":"ChaiScript","require":["clike","cpp"],"owner":"RunDevelopment"},"cil":{"title":"CIL","owner":"sbrl"},"clojure":{"title":"Clojure","owner":"troglotit"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"cypher":{"title":"Cypher","owner":"RunDevelopment"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dataweave":{"title":"DataWeave","owner":"machaval"},"dax":{"title":"DAX","owner":"peterbud"},"dhall":{"title":"Dhall","owner":"RunDevelopment"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"dot":{"title":"DOT (Graphviz)","alias":"gv","optional":"markup","owner":"RunDevelopment"},"ebnf":{"title":"EBNF","owner":"RunDevelopment"},"editorconfig":{"title":"EditorConfig","owner":"osipxd"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"c","owner":"Golmote"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","optional":["markdown"],"owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"hlsl":{"title":"HLSL","require":"c","owner":"RunDevelopment"},"http":{"title":"HTTP","optional":["css","javascript","json","markup","uri"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"ignore":{"title":".ignore","owner":"osipxd","alias":["gitignore","hgignore","npmignore"],"aliasTitles":{"gitignore":".gitignore","hgignore":".hgignore","npmignore":".npmignore"}},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike","typescript"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","alias":"webmanifest","aliasTitles":{"webmanifest":"Web App Manifest"},"owner":"CupOfTea696"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"jsstacktrace":{"title":"JS stack trace","owner":"sbrl"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","alias":["kt","kts"],"aliasTitles":{"kts":"Kotlin Script"},"require":"clike","owner":"Golmote"},"kumir":{"title":"KuMir (КуМир)","alias":"kum","owner":"edukisto"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","optional":"yaml","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"mongodb":{"title":"MongoDB","owner":"airs0urce","require":"javascript"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"naniscript":{"title":"Naninovel Script","owner":"Elringus","alias":"nani"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"psl":{"title":"PATROL Scripting Language","owner":"bertysentry"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":"markup-templating","owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"promql":{"title":"PromQL","owner":"arendjr"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"purebasic":{"title":"PureBasic","require":"clike","alias":"pbfasm","owner":"HeX0R101"},"purescript":{"title":"PureScript","require":"haskell","alias":"purs","owner":"sriharshachilakapati"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"racket":{"title":"Racket","require":"scheme","alias":"rkt","owner":"RunDevelopment"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","owner":"RunDevelopment"},"renpy":{"title":"Ren'py","alias":"rpy","owner":"HyuchiaDiego"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","alias":["sh-session","shellsession"],"owner":"RunDevelopment"},"smali":{"title":"Smali","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sml":{"title":"SML","alias":"smlnj","aliasTitles":{"smlnj":"SML/NJ"},"owner":"RunDevelopment"},"solidity":{"title":"Solidity (Ethereum)","alias":"sol","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"squirrel":{"title":"Squirrel","require":"clike","owner":"RunDevelopment"},"stan":{"title":"Stan","owner":"RunDevelopment"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","vbnet"],"owner":"RunDevelopment"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"typoscript":{"title":"TypoScript","alias":"tsconfig","aliasTitles":{"tsconfig":"TSConfig"},"owner":"dkern"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"uri":{"title":"URI","alias":"url","aliasTitles":{"url":"URL"},"owner":"RunDevelopment"},"v":{"title":"V","require":"clike","owner":"taggon"},"vala":{"title":"Vala","require":"clike","optional":"regex","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":["vb","vba"],"aliasTitles":{"vba":"VBA"},"owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xml-doc":{"title":"XML doc (.net)","require":"markup","modify":["csharp","fsharp","vbnet"],"owner":"RunDevelopment"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"yang":{"title":"YANG","owner":"RunDevelopment"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; if (typeof module !== 'undefined' && module.exports) { module.exports = components; } \ No newline at end of file diff --git a/components.json b/components.json index a0ac3f5ceb..56e635cd0d 100644 --- a/components.json +++ b/components.json @@ -661,6 +661,11 @@ "require": "clike", "owner": "Golmote" }, + "kumir": { + "title": "KuMir (КуМир)", + "alias": "kum", + "owner": "edukisto" + }, "latex": { "title": "LaTeX", "alias": ["tex", "context"], diff --git a/components/prism-kumir.js b/components/prism-kumir.js new file mode 100644 index 0000000000..76fa06c1d8 --- /dev/null +++ b/components/prism-kumir.js @@ -0,0 +1,102 @@ +(function (Prism) { + + /** + * Regular expression for characters that are not allowed in identifiers. + * @type {String} + */ + var nonId = /\s\x00-\x1f\x22-\x2f\x3a-\x3f\x5b-\x5e\x60\x7b-\x7e/.source; + + /** + * Surround a regular expression for IDs with patterns for non-ID sequences. + * @param {String} pattern A regular expression for identifiers. + * @param {String} [flags] The regular expression flags. + * @returns {RegExp} A wrapped regular expression for identifiers. + */ + function wrapId(pattern, flags) { + return RegExp(pattern.replace(//g, nonId), flags); + } + + Prism.languages.kumir = { + 'comment': { + pattern: /\|.*/ + }, + + 'prolog': { + pattern: /#.*/, + greedy: true + }, + + 'string': { + pattern: /"[^\n\r"]*"|'[^\n\r']*'/, + greedy: true + }, + + 'boolean': { + pattern: wrapId(/(^|[])(?:да|нет)(?=[]|$)/.source), + lookbehind: true + }, + + 'operator-word': { + pattern: wrapId(/(^|[])(?:и|или|не)(?=[]|$)/.source), + lookbehind: true, + alias: 'keyword' + }, + + 'system-variable': { + pattern: wrapId(/(^|[])знач(?=[]|$)/.source), + lookbehind: true, + alias: 'keyword' + }, + + 'type': [ + { + pattern: wrapId(/(^|[])(?:вещ|лит|лог|сим|цел)(?:\x20*таб)?(?=[]|$)/.source), + lookbehind: true, + alias: 'builtin' + }, + { + pattern: wrapId(/(^|[])(?:компл|сканкод|файл|цвет)(?=[]|$)/.source), + lookbehind: true, + alias: 'important' + } + ], + + /** + * Should be performed after searching for type names because of "таб". + * "таб" is a reserved word, but never used without a preceding type name. + * "НАЗНАЧИТЬ", "Фввод", and "Фвывод" are not reserved words. + */ + 'keyword': { + pattern: wrapId(/(^|[])(?:алг|арг(?:\x20*рез)?|ввод|ВКЛЮЧИТЬ|вс[её]|выбор|вывод|выход|дано|для|до|дс|если|иначе|исп|использовать|кон(?:(?:\x20+|_)исп)?|кц(?:(?:\x20+|_)при)?|надо|нач|нс|нц|от|пауза|пока|при|раза?|рез|стоп|таб|то|утв|шаг)(?=[]|$)/.source), + lookbehind: true + }, + + /** Should be performed after searching for reserved words. */ + 'name': { + pattern: wrapId(/(^|[])[^\d][^]*(?:\x20+[^]+)*(?=[]|$)/.source), + lookbehind: true + }, + + /** Should be performed after searching for names. */ + 'number': { + pattern: wrapId(/(^|[])(?:\B\$[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)(?=[]|$)/.source, 'i'), + lookbehind: true + }, + + /** Should be performed after searching for words. */ + 'punctuation': /:=|[(),:;\[\]]/, + + /** + * Should be performed after searching for + * - numeric constants (because of "+" and "-"); + * - punctuation marks (because of ":=" and "="). + */ + 'operator-char': { + pattern: /\*\*?|<[=>]?|>=?|[-+/=]/, + alias: 'operator' + } + }; + + Prism.languages.kum = Prism.languages.kumir; + +}(Prism)); diff --git a/components/prism-kumir.min.js b/components/prism-kumir.min.js new file mode 100644 index 0000000000..ec3a4df13b --- /dev/null +++ b/components/prism-kumir.min.js @@ -0,0 +1 @@ +!function(n){function o(n,o){return RegExp(n.replace(//g,"\\s\\x00-\\x1f\\x22-\\x2f\\x3a-\\x3f\\x5b-\\x5e\\x60\\x7b-\\x7e"),o)}n.languages.kumir={comment:{pattern:/\|.*/},prolog:{pattern:/#.*/,greedy:!0},string:{pattern:/"[^\n\r"]*"|'[^\n\r']*'/,greedy:!0},boolean:{pattern:o("(^|[])(?:да|нет)(?=[]|$)"),lookbehind:!0},"operator-word":{pattern:o("(^|[])(?:и|или|не)(?=[]|$)"),lookbehind:!0,alias:"keyword"},"system-variable":{pattern:o("(^|[])знач(?=[]|$)"),lookbehind:!0,alias:"keyword"},type:[{pattern:o("(^|[])(?:вещ|лит|лог|сим|цел)(?:\\x20*таб)?(?=[]|$)"),lookbehind:!0,alias:"builtin"},{pattern:o("(^|[])(?:компл|сканкод|файл|цвет)(?=[]|$)"),lookbehind:!0,alias:"important"}],keyword:{pattern:o("(^|[])(?:алг|арг(?:\\x20*рез)?|ввод|ВКЛЮЧИТЬ|вс[её]|выбор|вывод|выход|дано|для|до|дс|если|иначе|исп|использовать|кон(?:(?:\\x20+|_)исп)?|кц(?:(?:\\x20+|_)при)?|надо|нач|нс|нц|от|пауза|пока|при|раза?|рез|стоп|таб|то|утв|шаг)(?=[]|$)"),lookbehind:!0},name:{pattern:o("(^|[])[^\\d][^]*(?:\\x20+[^]+)*(?=[]|$)"),lookbehind:!0},number:{pattern:o("(^|[])(?:\\B\\$[\\da-f]+\\b|(?:\\b\\d+(?:\\.\\d*)?|\\B\\.\\d+)(?:e[+-]?\\d+)?)(?=[]|$)","i"),lookbehind:!0},punctuation:/:=|[(),:;\[\]]/,"operator-char":{pattern:/\*\*?|<[=>]?|>=?|[-+/=]/,alias:"operator"}},n.languages.kum=n.languages.kumir}(Prism); \ No newline at end of file diff --git a/examples/prism-kumir.html b/examples/prism-kumir.html new file mode 100644 index 0000000000..4d0af70a7f --- /dev/null +++ b/examples/prism-kumir.html @@ -0,0 +1,61 @@ +

        Example

        + +
        алг
        +нач
        +  | Решение квадратного уравнения.
        +  вещ a, b, c
        +  вещ таб корни[1:2]
        +  цел индекс, число корней
        +  вывод "Укажите первый коэффициент: "
        +  ввод a
        +  вывод нс, "Укажите второй коэффициент: "
        +  ввод b
        +  вывод нс, "Укажите свободный член: "
        +  ввод c
        +  решить квур(a, b, c, число корней, корни)
        +  если число корней = -1
        +    то
        +      вывод нс, "Первый коэффициент не может быть равен нулю.", нс
        +    иначе
        +      если число корней = 0
        +        то
        +          вывод нс, "Уравнение не имеет корней.", нс
        +        иначе
        +          если число корней = 1
        +            то
        +              вывод нс, "Уравнение имеет один корень.", нс
        +              вывод "x = ", корни[1], нс
        +            иначе
        +              вывод нс, "Уравнение имеет два корня.", нс
        +              нц для индекс от 1 до число корней шаг 1
        +                вывод "x", индекс, " = ", корни[индекс], нс
        +              кц
        +          все
        +      все
        +  все
        +кон
        +
        +алг решить квур(арг вещ a, b, c, арг рез цел число корней, арг рез вещ таб корни[1:2])
        +нач
        +  вещ дискриминант
        +  если a = 0
        +    то
        +      число корней := -1
        +    иначе
        +      дискриминант := b**2 - 4 * a * c
        +      если дискриминант > 0
        +        то
        +          корни[1] := (-b - sqrt(дискриминант)) / (2 * a)
        +          корни[2] := (-b + sqrt(дискриминант)) / (2 * a)
        +          число корней := 2
        +        иначе
        +          если дискриминант = 0
        +            то
        +              корни[1] := -b / (2 * a)
        +              число корней := 1
        +            иначе
        +              число корней := 0
        +          все
        +      все
        +  все
        +кон
        diff --git a/plugins/autoloader/prism-autoloader.js b/plugins/autoloader/prism-autoloader.js index d3bf933402..14c11d724c 100644 --- a/plugins/autoloader/prism-autoloader.js +++ b/plugins/autoloader/prism-autoloader.js @@ -190,6 +190,7 @@ "webmanifest": "json", "kt": "kotlin", "kts": "kotlin", + "kum": "kumir", "tex": "latex", "context": "latex", "ly": "lilypond", diff --git a/plugins/autoloader/prism-autoloader.min.js b/plugins/autoloader/prism-autoloader.min.js index bc149d2131..84dede833c 100644 --- a/plugins/autoloader/prism-autoloader.min.js +++ b/plugins/autoloader/prism-autoloader.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof self&&self.Prism&&self.document&&document.createElement){var l={javascript:"clike",actionscript:"javascript",apex:["clike","sql"],arduino:"cpp",aspnet:["markup","csharp"],birb:"clike",bison:"c",c:"clike",csharp:"clike",cpp:"c",chaiscript:["clike","cpp"],coffeescript:"javascript",crystal:"ruby","css-extras":"css",d:"clike",dart:"clike",django:"markup-templating",ejs:["javascript","markup-templating"],etlua:["lua","markup-templating"],erb:["ruby","markup-templating"],fsharp:"clike","firestore-security-rules":"clike",flow:"javascript",ftl:"markup-templating",gml:"clike",glsl:"c",go:"clike",groovy:"clike",haml:"ruby",handlebars:"markup-templating",haxe:"clike",hlsl:"c",java:"clike",javadoc:["markup","java","javadoclike"],jolie:"clike",jsdoc:["javascript","javadoclike","typescript"],"js-extras":"javascript",json5:"json",jsonp:"json","js-templates":"javascript",kotlin:"clike",latte:["clike","markup-templating","php"],less:"css",lilypond:"scheme",markdown:"markup","markup-templating":"markup",mongodb:"javascript",n4js:"javascript",nginx:"clike",objectivec:"c",opencl:"c",parser:"markup",php:"markup-templating",phpdoc:["php","javadoclike"],"php-extras":"php",plsql:"sql",processing:"clike",protobuf:"clike",pug:["markup","javascript"],purebasic:"clike",purescript:"haskell",qml:"javascript",qore:"clike",racket:"scheme",jsx:["markup","javascript"],tsx:["jsx","typescript"],reason:"clike",ruby:"clike",sass:"css",scss:"css",scala:"java","shell-session":"bash",smarty:"markup-templating",solidity:"clike",soy:"markup-templating",sparql:"turtle",sqf:"clike",squirrel:"clike",swift:"clike","t4-cs":["t4-templating","csharp"],"t4-vb":["t4-templating","vbnet"],tap:"yaml",tt2:["clike","markup-templating"],textile:"markup",twig:"markup",typescript:"javascript",v:"clike",vala:"clike",vbnet:"basic",velocity:"markup",wiki:"markup",xeora:"markup","xml-doc":"markup",xquery:"markup"},n={html:"markup",xml:"markup",svg:"markup",mathml:"markup",ssml:"markup",atom:"markup",rss:"markup",js:"javascript",g4:"antlr4",adoc:"asciidoc",shell:"bash",shortcode:"bbcode",rbnf:"bnf",oscript:"bsl",cs:"csharp",dotnet:"csharp",coffee:"coffeescript",conc:"concurnas",jinja2:"django","dns-zone":"dns-zone-file",dockerfile:"docker",gv:"dot",eta:"ejs",xlsx:"excel-formula",xls:"excel-formula",gamemakerlanguage:"gml",hs:"haskell",gitignore:"ignore",hgignore:"ignore",npmignore:"ignore",webmanifest:"json",kt:"kotlin",kts:"kotlin",tex:"latex",context:"latex",ly:"lilypond",emacs:"lisp",elisp:"lisp","emacs-lisp":"lisp",md:"markdown",moon:"moonscript",n4jsd:"n4js",nani:"naniscript",objc:"objectivec",objectpascal:"pascal",px:"pcaxis",pcode:"peoplecode",pq:"powerquery",mscript:"powerquery",pbfasm:"purebasic",purs:"purescript",py:"python",rkt:"racket",rpy:"renpy",robot:"robotframework",rb:"ruby","sh-session":"shell-session",shellsession:"shell-session",smlnj:"sml",sol:"solidity",sln:"solution-file",rq:"sparql",t4:"t4-cs",trig:"turtle",ts:"typescript",tsconfig:"typoscript",uscript:"unrealscript",uc:"unrealscript",url:"uri",vb:"visual-basic",vba:"visual-basic",xeoracube:"xeora",yml:"yaml"},p={},e="components/",a=Prism.util.currentScript();if(a){var r=/\bplugins\/autoloader\/prism-autoloader\.(?:min\.)?js(?:\?[^\r\n/]*)?$/i,s=/(^|\/)[\w-]+\.(?:min\.)?js(?:\?[^\r\n/]*)?$/i,t=a.getAttribute("data-autoloader-path");if(null!=t)e=t.trim().replace(/\/?$/,"/");else{var i=a.src;r.test(i)?e=i.replace(r,"components/"):s.test(i)&&(e=i.replace(s,"$1components/"))}}var o=Prism.plugins.autoloader={languages_path:e,use_minified:!0,loadLanguages:m};Prism.hooks.add("complete",function(e){var a=e.element,r=e.language;if(a&&r&&"none"!==r){var s=function(e){var a=(e.getAttribute("data-dependencies")||"").trim();if(!a){var r=e.parentElement;r&&"pre"===r.tagName.toLowerCase()&&(a=(r.getAttribute("data-dependencies")||"").trim())}return a?a.split(/\s*,\s*/g):[]}(a);/^diff-./i.test(r)?(s.push("diff"),s.push(r.substr("diff-".length))):s.push(r),s.every(u)||m(s,function(){Prism.highlightElement(a)})}})}function u(e){if(0<=e.indexOf("!"))return!1;if((e=n[e]||e)in Prism.languages)return!0;var a=p[e];return a&&!a.error&&!1===a.loading}function m(e,a,r){"string"==typeof e&&(e=[e]);var s=e.length,t=0,i=!1;function c(){i||++t===s&&a&&a(e)}0!==s?e.forEach(function(e){!function(a,r,s){var t=0<=a.indexOf("!");function e(){var e=p[a];e||(e=p[a]={callbacks:[]}),e.callbacks.push({success:r,error:s}),!t&&u(a)?k(a,"success"):!t&&e.error?k(a,"error"):!t&&e.loading||(e.loading=!0,e.error=!1,function(e,a,r){var s=document.createElement("script");s.src=e,s.async=!0,s.onload=function(){document.body.removeChild(s),a&&a()},s.onerror=function(){document.body.removeChild(s),r&&r()},document.body.appendChild(s)}(function(e){return o.languages_path+"prism-"+e+(o.use_minified?".min":"")+".js"}(a),function(){e.loading=!1,k(a,"success")},function(){e.loading=!1,e.error=!0,k(a,"error")}))}a=a.replace("!",""),a=n[a]||a;var i=l[a];i&&i.length?m(i,e,s):e()}(e,c,function(){i||(i=!0,r&&r(e))})}):a&&setTimeout(a,0)}function k(e,a){if(p[e]){for(var r=p[e].callbacks,s=0,t=r.length;s += +> +>= +и +или +не + +---------------------------------------------------- + +[ + ["operator-char", "*"], + ["operator-char", "**"], + ["operator-char", "+"], + ["operator-char", "-"], + ["operator-char", "/"], + ["operator-char", "<"], + ["operator-char", "<="], + ["operator-char", "<>"], + ["operator-char", "="], + ["operator-char", ">"], + ["operator-char", ">="], + ["operator-word", "и"], + ["operator-word", "или"], + ["operator-word", "не"] +] + +---------------------------------------------------- + +Checks for operators. diff --git a/tests/languages/kumir/prolog_feature.test b/tests/languages/kumir/prolog_feature.test new file mode 100644 index 0000000000..9e6bc61492 --- /dev/null +++ b/tests/languages/kumir/prolog_feature.test @@ -0,0 +1,27 @@ + #foo +# +# foo bar baz +#"" +## +#'' +#+1 +#| +#алг + +---------------------------------------------------- + +[ + ["prolog", "#foo"], + ["prolog", "#"], + ["prolog", "# foo bar baz"], + ["prolog", "#\"\""], + ["prolog", "##"], + ["prolog", "#''"], + ["prolog", "#+1"], + ["prolog", "#|"], + ["prolog", "#алг"] +] + +---------------------------------------------------- + +Checks for prologs. diff --git a/tests/languages/kumir/punctuation_feature.test b/tests/languages/kumir/punctuation_feature.test new file mode 100644 index 0000000000..66108873e9 --- /dev/null +++ b/tests/languages/kumir/punctuation_feature.test @@ -0,0 +1,25 @@ +( +) +, +: +:= +; +[ +] + +---------------------------------------------------- + +[ + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", ","], + ["punctuation", ":"], + ["punctuation", ":="], + ["punctuation", ";"], + ["punctuation", "["], + ["punctuation", "]"] +] + +---------------------------------------------------- + +Checks for punctuation marks. diff --git a/tests/languages/kumir/string_feature.test b/tests/languages/kumir/string_feature.test new file mode 100644 index 0000000000..da1db61ec0 --- /dev/null +++ b/tests/languages/kumir/string_feature.test @@ -0,0 +1,35 @@ +"" +"#" +"'" +"256/273" +"foo 'bar' baz" +"|" +"алг" +'"' +'' +'256/273' +'foo "bar" baz' +'|' +'алг' + +---------------------------------------------------- + +[ + ["string", "\"\""], + ["string", "\"#\""], + ["string", "\"'\""], + ["string", "\"256/273\""], + ["string", "\"foo 'bar' baz\""], + ["string", "\"|\""], + ["string", "\"алг\""], + ["string", "'\"'"], + ["string", "''"], + ["string", "'256/273'"], + ["string", "'foo \"bar\" baz'"], + ["string", "'|'"], + ["string", "'алг'"] +] + +---------------------------------------------------- + +Checks for strings. diff --git a/tests/languages/kumir/type_feature.test b/tests/languages/kumir/type_feature.test new file mode 100644 index 0000000000..d5e6731f14 --- /dev/null +++ b/tests/languages/kumir/type_feature.test @@ -0,0 +1,19 @@ +вещ +цел +цел таб +цел таб +целтаб + +---------------------------------------------------- + +[ + ["type", "вещ"], + ["type", "цел"], + ["type", "цел таб"], + ["type", "цел таб"], + ["type", "целтаб"] +] + +---------------------------------------------------- + +Checks for data type names. From f79b0eefbb437714c325211aa52e270f1787965d Mon Sep 17 00:00:00 2001 From: Ayesh Karunaratne Date: Thu, 18 Feb 2021 20:35:36 +0700 Subject: [PATCH 0735/1100] PHP: Added support for PHP 8.1 enums (#2752) --- components/prism-php.js | 4 ++-- components/prism-php.min.js | 2 +- tests/languages/php/class-name_feature.test | 9 +++++++++ 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/components/prism-php.js b/components/prism-php.js index 37c1325402..52293f128e 100644 --- a/components/prism-php.js +++ b/components/prism-php.js @@ -34,7 +34,7 @@ } }, 'class-name-definition': { - pattern: /(\b(?:class|interface|trait)\s+)\b[a-z_]\w*(?!\\)\b/i, + pattern: /(\b(?:class|enum|interface|trait)\s+)\b[a-z_]\w*(?!\\)\b/i, lookbehind: true, alias: 'class-name' }, @@ -85,7 +85,7 @@ alias: 'static-context', greedy: true }, - /\b(?:__halt_compiler|abstract|and|array|as|break|callable|case|catch|class|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|eval|exit|extends|final|finally|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|namespace|match|new|or|parent|print|private|protected|public|require|require_once|return|self|static|switch|throw|trait|try|unset|use|var|while|xor|yield)\b/i + /\b(?:__halt_compiler|abstract|and|array|as|break|callable|case|catch|class|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|enum|eval|exit|extends|final|finally|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|namespace|match|new|or|parent|print|private|protected|public|require|require_once|return|self|static|switch|throw|trait|try|unset|use|var|while|xor|yield)\b/i ], 'argument-name': /\b[a-z_]\w*(?=\s*:(?!:))/i, 'class-name': [ diff --git a/components/prism-php.min.js b/components/prism-php.min.js index 4df681f881..bf06e87dbc 100644 --- a/components/prism-php.min.js +++ b/components/prism-php.min.js @@ -1 +1 @@ -!function(a){var e=/\/\*[\s\S]*?\*\/|\/\/.*|#(?!\[).*/,t=[{pattern:/\b(?:false|true)\b/i,alias:"boolean"},/\b[A-Z_][A-Z0-9_]*\b(?!\s*\()/,/\b(?:null)\b/i],i=/\b0b[01]+(?:_[01]+)*\b|\b0o[0-7]+(?:_[0-7]+)*\b|\b0x[\da-f]+(?:_[\da-f]+)*\b|(?:\b\d+(?:_\d+)*\.?(?:\d+(?:_\d+)*)?|\B\.\d+)(?:e[+-]?\d+)?/i,n=/|\?\?=?|\.{3}|\??->|[!=]=?=?|::|\*\*=?|--|\+\+|&&|\|\||<<|>>|[?~]|[/^|%*&<>.+-]=?/,s=/[{}\[\](),:;]/;a.languages.php={delimiter:{pattern:/\?>$|^<\?(?:php(?=\s)|=)?/i,alias:"important"},comment:e,variable:/\$+(?:\w+\b|(?={))/i,package:{pattern:/(namespace\s+|use\s+(?:function\s+)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,lookbehind:!0,inside:{punctuation:/\\/}},"class-name-definition":{pattern:/(\b(?:class|interface|trait)\s+)\b[a-z_]\w*(?!\\)\b/i,lookbehind:!0,alias:"class-name"},keyword:[{pattern:/(\(\s*)\b(?:bool|boolean|int|integer|float|string|object|array)\b(?=\s*\))/i,alias:"type-casting",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)\b(?:bool|int|float|string|object|array(?!\s*\()|mixed|self|static|callable|iterable|(?:null|false)(?=\s*\|))\b(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*[a-z0-9_|]\|\s*)(?:null|false)\b(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b(?:bool|int|float|string|object|void|array(?!\s*\()|mixed|self|static|callable|iterable|(?:null|false)(?=\s*\|))\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?[a-z0-9_|]\|\s*)(?:null|false)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/\b(?:bool|int|float|string|object|void|array(?!\s*\()|mixed|iterable|(?:null|false)(?=\s*\|))\b/i,alias:"type-declaration",greedy:!0},{pattern:/(\|\s*)(?:null|false)\b/i,alias:"type-declaration",greedy:!0,lookbehind:!0},{pattern:/\b(?:parent|self|static)(?=\s*::)/i,alias:"static-context",greedy:!0},/\b(?:__halt_compiler|abstract|and|array|as|break|callable|case|catch|class|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|eval|exit|extends|final|finally|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|namespace|match|new|or|parent|print|private|protected|public|require|require_once|return|self|static|switch|throw|trait|try|unset|use|var|while|xor|yield)\b/i],"argument-name":/\b[a-z_]\w*(?=\s*:(?!:))/i,"class-name":[{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self|\s+static))\s+|\bcatch\s*\()\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/(\|\s*)\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/\b[a-z_]\w*(?!\\)\b(?=\s*\|)/i,greedy:!0},{pattern:/(\|\s*)(?:\\?\b[a-z_]\w*)+\b/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(?:\\?\b[a-z_]\w*)+\b(?=\s*\|)/i,alias:"class-name-fully-qualified",greedy:!0,inside:{punctuation:/\\/}},{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self\b|\s+static\b))\s+|\bcatch\s*\()(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*\$)/i,alias:"type-declaration",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-declaration"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*::)/i,alias:["class-name-fully-qualified","static-context"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/([(,?]\s*)[a-z_]\w*(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-hint"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b[a-z_]\w*(?!\\)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:["class-name-fully-qualified","return-type"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:t,function:/\w+\s*(?=\()/,property:{pattern:/(->)[\w]+/,lookbehind:!0},number:i,operator:n,punctuation:s};var l={pattern:/{\$(?:{(?:{[^{}]+}|[^{}]+)}|[^{}])+}|(^|[^\\{])\$+(?:\w+(?:\[[^\r\n\[\]]+\]|->\w+)*)/,lookbehind:!0,inside:a.languages.php},r=[{pattern:/<<<'([^']+)'[\r\n](?:.*[\r\n])*?\1;/,alias:"nowdoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<'[^']+'|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<'?|[';]$/}}}},{pattern:/<<<(?:"([^"]+)"[\r\n](?:.*[\r\n])*?\1;|([a-z_]\w*)[\r\n](?:.*[\r\n])*?\2;)/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<(?:"[^"]+"|[a-z_]\w*)|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<"?|[";]$/}},interpolation:l}},{pattern:/`(?:\\[\s\S]|[^\\`])*`/,alias:"backtick-quoted-string",greedy:!0},{pattern:/'(?:\\[\s\S]|[^\\'])*'/,alias:"single-quoted-string",greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,alias:"double-quoted-string",greedy:!0,inside:{interpolation:l}}];a.languages.insertBefore("php","variable",{string:r}),a.languages.insertBefore("php","variable",{attribute:{pattern:/#\[(?:[^"'\/#]|\/(?![*/])|\/\/.*$|#(?!\[).*$|\/\*(?:[^*]|\*(?!\/))*\*\/|"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*')+\](?=\s*[a-z$#])/im,greedy:!0,inside:{"attribute-content":{pattern:/^(#\[)[\s\S]+(?=]$)/,lookbehind:!0,inside:{comment:e,string:r,"attribute-class-name":[{pattern:/([^:]|^)\b[a-z_]\w*(?!\\)\b/i,alias:"class-name",greedy:!0,lookbehind:!0},{pattern:/([^:]|^)(?:\\?\b[a-z_]\w*)+/i,alias:["class-name","class-name-fully-qualified"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:t,number:i,operator:n,punctuation:s}},delimiter:{pattern:/^#\[|]$/,alias:"punctuation"}}}}),a.hooks.add("before-tokenize",function(e){if(/<\?/.test(e.code)){a.languages["markup-templating"].buildPlaceholders(e,"php",/<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#(?!\[))(?:[^?\n\r]|\?(?!>))*(?=$|\?>|[\r\n])|#\[|\/\*(?:[^*]|\*(?!\/))*(?:\*\/|$))*?(?:\?>|$)/gi)}}),a.hooks.add("after-tokenize",function(e){a.languages["markup-templating"].tokenizePlaceholders(e,"php")})}(Prism); \ No newline at end of file +!function(a){var e=/\/\*[\s\S]*?\*\/|\/\/.*|#(?!\[).*/,t=[{pattern:/\b(?:false|true)\b/i,alias:"boolean"},/\b[A-Z_][A-Z0-9_]*\b(?!\s*\()/,/\b(?:null)\b/i],i=/\b0b[01]+(?:_[01]+)*\b|\b0o[0-7]+(?:_[0-7]+)*\b|\b0x[\da-f]+(?:_[\da-f]+)*\b|(?:\b\d+(?:_\d+)*\.?(?:\d+(?:_\d+)*)?|\B\.\d+)(?:e[+-]?\d+)?/i,n=/|\?\?=?|\.{3}|\??->|[!=]=?=?|::|\*\*=?|--|\+\+|&&|\|\||<<|>>|[?~]|[/^|%*&<>.+-]=?/,s=/[{}\[\](),:;]/;a.languages.php={delimiter:{pattern:/\?>$|^<\?(?:php(?=\s)|=)?/i,alias:"important"},comment:e,variable:/\$+(?:\w+\b|(?={))/i,package:{pattern:/(namespace\s+|use\s+(?:function\s+)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,lookbehind:!0,inside:{punctuation:/\\/}},"class-name-definition":{pattern:/(\b(?:class|enum|interface|trait)\s+)\b[a-z_]\w*(?!\\)\b/i,lookbehind:!0,alias:"class-name"},keyword:[{pattern:/(\(\s*)\b(?:bool|boolean|int|integer|float|string|object|array)\b(?=\s*\))/i,alias:"type-casting",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)\b(?:bool|int|float|string|object|array(?!\s*\()|mixed|self|static|callable|iterable|(?:null|false)(?=\s*\|))\b(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*[a-z0-9_|]\|\s*)(?:null|false)\b(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b(?:bool|int|float|string|object|void|array(?!\s*\()|mixed|self|static|callable|iterable|(?:null|false)(?=\s*\|))\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?[a-z0-9_|]\|\s*)(?:null|false)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/\b(?:bool|int|float|string|object|void|array(?!\s*\()|mixed|iterable|(?:null|false)(?=\s*\|))\b/i,alias:"type-declaration",greedy:!0},{pattern:/(\|\s*)(?:null|false)\b/i,alias:"type-declaration",greedy:!0,lookbehind:!0},{pattern:/\b(?:parent|self|static)(?=\s*::)/i,alias:"static-context",greedy:!0},/\b(?:__halt_compiler|abstract|and|array|as|break|callable|case|catch|class|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|enum|eval|exit|extends|final|finally|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|namespace|match|new|or|parent|print|private|protected|public|require|require_once|return|self|static|switch|throw|trait|try|unset|use|var|while|xor|yield)\b/i],"argument-name":/\b[a-z_]\w*(?=\s*:(?!:))/i,"class-name":[{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self|\s+static))\s+|\bcatch\s*\()\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/(\|\s*)\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/\b[a-z_]\w*(?!\\)\b(?=\s*\|)/i,greedy:!0},{pattern:/(\|\s*)(?:\\?\b[a-z_]\w*)+\b/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(?:\\?\b[a-z_]\w*)+\b(?=\s*\|)/i,alias:"class-name-fully-qualified",greedy:!0,inside:{punctuation:/\\/}},{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self\b|\s+static\b))\s+|\bcatch\s*\()(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*\$)/i,alias:"type-declaration",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-declaration"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*::)/i,alias:["class-name-fully-qualified","static-context"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/([(,?]\s*)[a-z_]\w*(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-hint"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b[a-z_]\w*(?!\\)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:["class-name-fully-qualified","return-type"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:t,function:/\w+\s*(?=\()/,property:{pattern:/(->)[\w]+/,lookbehind:!0},number:i,operator:n,punctuation:s};var l={pattern:/{\$(?:{(?:{[^{}]+}|[^{}]+)}|[^{}])+}|(^|[^\\{])\$+(?:\w+(?:\[[^\r\n\[\]]+\]|->\w+)*)/,lookbehind:!0,inside:a.languages.php},r=[{pattern:/<<<'([^']+)'[\r\n](?:.*[\r\n])*?\1;/,alias:"nowdoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<'[^']+'|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<'?|[';]$/}}}},{pattern:/<<<(?:"([^"]+)"[\r\n](?:.*[\r\n])*?\1;|([a-z_]\w*)[\r\n](?:.*[\r\n])*?\2;)/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<(?:"[^"]+"|[a-z_]\w*)|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<"?|[";]$/}},interpolation:l}},{pattern:/`(?:\\[\s\S]|[^\\`])*`/,alias:"backtick-quoted-string",greedy:!0},{pattern:/'(?:\\[\s\S]|[^\\'])*'/,alias:"single-quoted-string",greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,alias:"double-quoted-string",greedy:!0,inside:{interpolation:l}}];a.languages.insertBefore("php","variable",{string:r}),a.languages.insertBefore("php","variable",{attribute:{pattern:/#\[(?:[^"'\/#]|\/(?![*/])|\/\/.*$|#(?!\[).*$|\/\*(?:[^*]|\*(?!\/))*\*\/|"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*')+\](?=\s*[a-z$#])/im,greedy:!0,inside:{"attribute-content":{pattern:/^(#\[)[\s\S]+(?=]$)/,lookbehind:!0,inside:{comment:e,string:r,"attribute-class-name":[{pattern:/([^:]|^)\b[a-z_]\w*(?!\\)\b/i,alias:"class-name",greedy:!0,lookbehind:!0},{pattern:/([^:]|^)(?:\\?\b[a-z_]\w*)+/i,alias:["class-name","class-name-fully-qualified"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:t,number:i,operator:n,punctuation:s}},delimiter:{pattern:/^#\[|]$/,alias:"punctuation"}}}}),a.hooks.add("before-tokenize",function(e){if(/<\?/.test(e.code)){a.languages["markup-templating"].buildPlaceholders(e,"php",/<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#(?!\[))(?:[^?\n\r]|\?(?!>))*(?=$|\?>|[\r\n])|#\[|\/\*(?:[^*]|\*(?!\/))*(?:\*\/|$))*?(?:\?>|$)/gi)}}),a.hooks.add("after-tokenize",function(e){a.languages["markup-templating"].tokenizePlaceholders(e,"php")})}(Prism); \ No newline at end of file diff --git a/tests/languages/php/class-name_feature.test b/tests/languages/php/class-name_feature.test index bf3502ae6e..2755dc32d4 100644 --- a/tests/languages/php/class-name_feature.test +++ b/tests/languages/php/class-name_feature.test @@ -22,6 +22,8 @@ class Foo extends Bar implements Baz {} class Foo extends \Package\Bar implements App\Baz {} +enum Foo implements Bar {} + ---------------------------------------------------- [ @@ -194,6 +196,13 @@ class Foo extends \Package\Bar implements App\Baz {} "Baz" ]], ["punctuation", "{"], + ["punctuation", "}"], + + ["keyword", "enum"], + ["class-name-definition", "Foo"], + ["keyword", "implements"], + ["class-name", "Bar"], + ["punctuation", "{"], ["punctuation", "}"] ] From b0a6ec85ef6fbdc835a760d1dc37e68eeeccae71 Mon Sep 17 00:00:00 2001 From: "Matthew J. Clemente" Date: Fri, 19 Feb 2021 11:11:51 -0500 Subject: [PATCH 0736/1100] Added support for CFScript (#2771) --- components.js | 2 +- components.json | 6 + components/prism-cfscript.js | 44 ++++++ components/prism-cfscript.min.js | 1 + examples/prism-cfscript.html | 43 ++++++ plugins/autoloader/prism-autoloader.js | 2 + plugins/autoloader/prism-autoloader.min.js | 2 +- plugins/show-language/prism-show-language.js | 2 + .../show-language/prism-show-language.min.js | 2 +- tests/languages/cfscript/comment_feature.test | 23 +++ .../cfscript/function-variable_feature.test | 137 ++++++++++++++++++ tests/languages/cfscript/keyword_feature.test | 71 +++++++++ .../languages/cfscript/operator_feature.test | 71 +++++++++ tests/languages/cfscript/scope_feature.test | 29 ++++ tests/languages/cfscript/type_feature.test | 35 +++++ 15 files changed, 467 insertions(+), 3 deletions(-) create mode 100644 components/prism-cfscript.js create mode 100644 components/prism-cfscript.min.js create mode 100644 examples/prism-cfscript.html create mode 100644 tests/languages/cfscript/comment_feature.test create mode 100644 tests/languages/cfscript/function-variable_feature.test create mode 100644 tests/languages/cfscript/keyword_feature.test create mode 100644 tests/languages/cfscript/operator_feature.test create mode 100644 tests/languages/cfscript/scope_feature.test create mode 100644 tests/languages/cfscript/type_feature.test diff --git a/components.js b/components.js index ffaa26586e..7a36dffc23 100644 --- a/components.js +++ b/components.js @@ -1,2 +1,2 @@ -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml","ssml","atom","rss"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","ssml":"SSML","atom":"Atom","rss":"RSS"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","optional":"regex","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"ABNF","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"agda":{"title":"Agda","owner":"xy-ren"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apex":{"title":"Apex","require":["clike","sql"],"owner":"RunDevelopment"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"dkern"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"birb":{"title":"Birb","require":"clike","owner":"Calamity210"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"BNF","alias":"rbnf","aliasTitles":{"rbnf":"RBNF"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"bsl":{"title":"BSL (1C:Enterprise)","alias":"oscript","aliasTitles":{"oscript":"OneScript"},"owner":"Diversus23"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"chaiscript":{"title":"ChaiScript","require":["clike","cpp"],"owner":"RunDevelopment"},"cil":{"title":"CIL","owner":"sbrl"},"clojure":{"title":"Clojure","owner":"troglotit"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"cypher":{"title":"Cypher","owner":"RunDevelopment"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dataweave":{"title":"DataWeave","owner":"machaval"},"dax":{"title":"DAX","owner":"peterbud"},"dhall":{"title":"Dhall","owner":"RunDevelopment"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"dot":{"title":"DOT (Graphviz)","alias":"gv","optional":"markup","owner":"RunDevelopment"},"ebnf":{"title":"EBNF","owner":"RunDevelopment"},"editorconfig":{"title":"EditorConfig","owner":"osipxd"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"c","owner":"Golmote"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","optional":["markdown"],"owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"hlsl":{"title":"HLSL","require":"c","owner":"RunDevelopment"},"http":{"title":"HTTP","optional":["css","javascript","json","markup","uri"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"ignore":{"title":".ignore","owner":"osipxd","alias":["gitignore","hgignore","npmignore"],"aliasTitles":{"gitignore":".gitignore","hgignore":".hgignore","npmignore":".npmignore"}},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike","typescript"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","alias":"webmanifest","aliasTitles":{"webmanifest":"Web App Manifest"},"owner":"CupOfTea696"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"jsstacktrace":{"title":"JS stack trace","owner":"sbrl"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","alias":["kt","kts"],"aliasTitles":{"kts":"Kotlin Script"},"require":"clike","owner":"Golmote"},"kumir":{"title":"KuMir (КуМир)","alias":"kum","owner":"edukisto"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","optional":"yaml","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"mongodb":{"title":"MongoDB","owner":"airs0urce","require":"javascript"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"naniscript":{"title":"Naninovel Script","owner":"Elringus","alias":"nani"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"psl":{"title":"PATROL Scripting Language","owner":"bertysentry"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":"markup-templating","owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"promql":{"title":"PromQL","owner":"arendjr"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"purebasic":{"title":"PureBasic","require":"clike","alias":"pbfasm","owner":"HeX0R101"},"purescript":{"title":"PureScript","require":"haskell","alias":"purs","owner":"sriharshachilakapati"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"racket":{"title":"Racket","require":"scheme","alias":"rkt","owner":"RunDevelopment"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","owner":"RunDevelopment"},"renpy":{"title":"Ren'py","alias":"rpy","owner":"HyuchiaDiego"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","alias":["sh-session","shellsession"],"owner":"RunDevelopment"},"smali":{"title":"Smali","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sml":{"title":"SML","alias":"smlnj","aliasTitles":{"smlnj":"SML/NJ"},"owner":"RunDevelopment"},"solidity":{"title":"Solidity (Ethereum)","alias":"sol","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"squirrel":{"title":"Squirrel","require":"clike","owner":"RunDevelopment"},"stan":{"title":"Stan","owner":"RunDevelopment"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","vbnet"],"owner":"RunDevelopment"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"typoscript":{"title":"TypoScript","alias":"tsconfig","aliasTitles":{"tsconfig":"TSConfig"},"owner":"dkern"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"uri":{"title":"URI","alias":"url","aliasTitles":{"url":"URL"},"owner":"RunDevelopment"},"v":{"title":"V","require":"clike","owner":"taggon"},"vala":{"title":"Vala","require":"clike","optional":"regex","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":["vb","vba"],"aliasTitles":{"vba":"VBA"},"owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xml-doc":{"title":"XML doc (.net)","require":"markup","modify":["csharp","fsharp","vbnet"],"owner":"RunDevelopment"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"yang":{"title":"YANG","owner":"RunDevelopment"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml","ssml","atom","rss"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","ssml":"SSML","atom":"Atom","rss":"RSS"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","optional":"regex","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"ABNF","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"agda":{"title":"Agda","owner":"xy-ren"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apex":{"title":"Apex","require":["clike","sql"],"owner":"RunDevelopment"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"dkern"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"birb":{"title":"Birb","require":"clike","owner":"Calamity210"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"BNF","alias":"rbnf","aliasTitles":{"rbnf":"RBNF"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"bsl":{"title":"BSL (1C:Enterprise)","alias":"oscript","aliasTitles":{"oscript":"OneScript"},"owner":"Diversus23"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cfscript":{"title":"CFScript","require":"clike","alias":"cfc","owner":"mjclemente"},"chaiscript":{"title":"ChaiScript","require":["clike","cpp"],"owner":"RunDevelopment"},"cil":{"title":"CIL","owner":"sbrl"},"clojure":{"title":"Clojure","owner":"troglotit"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"cypher":{"title":"Cypher","owner":"RunDevelopment"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dataweave":{"title":"DataWeave","owner":"machaval"},"dax":{"title":"DAX","owner":"peterbud"},"dhall":{"title":"Dhall","owner":"RunDevelopment"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"dot":{"title":"DOT (Graphviz)","alias":"gv","optional":"markup","owner":"RunDevelopment"},"ebnf":{"title":"EBNF","owner":"RunDevelopment"},"editorconfig":{"title":"EditorConfig","owner":"osipxd"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"c","owner":"Golmote"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","optional":["markdown"],"owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"hlsl":{"title":"HLSL","require":"c","owner":"RunDevelopment"},"http":{"title":"HTTP","optional":["css","javascript","json","markup","uri"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"ignore":{"title":".ignore","owner":"osipxd","alias":["gitignore","hgignore","npmignore"],"aliasTitles":{"gitignore":".gitignore","hgignore":".hgignore","npmignore":".npmignore"}},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike","typescript"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","alias":"webmanifest","aliasTitles":{"webmanifest":"Web App Manifest"},"owner":"CupOfTea696"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"jsstacktrace":{"title":"JS stack trace","owner":"sbrl"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","alias":["kt","kts"],"aliasTitles":{"kts":"Kotlin Script"},"require":"clike","owner":"Golmote"},"kumir":{"title":"KuMir (КуМир)","alias":"kum","owner":"edukisto"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","optional":"yaml","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"mongodb":{"title":"MongoDB","owner":"airs0urce","require":"javascript"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"naniscript":{"title":"Naninovel Script","owner":"Elringus","alias":"nani"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"psl":{"title":"PATROL Scripting Language","owner":"bertysentry"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":"markup-templating","owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"promql":{"title":"PromQL","owner":"arendjr"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"purebasic":{"title":"PureBasic","require":"clike","alias":"pbfasm","owner":"HeX0R101"},"purescript":{"title":"PureScript","require":"haskell","alias":"purs","owner":"sriharshachilakapati"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"racket":{"title":"Racket","require":"scheme","alias":"rkt","owner":"RunDevelopment"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","owner":"RunDevelopment"},"renpy":{"title":"Ren'py","alias":"rpy","owner":"HyuchiaDiego"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","alias":["sh-session","shellsession"],"owner":"RunDevelopment"},"smali":{"title":"Smali","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sml":{"title":"SML","alias":"smlnj","aliasTitles":{"smlnj":"SML/NJ"},"owner":"RunDevelopment"},"solidity":{"title":"Solidity (Ethereum)","alias":"sol","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"squirrel":{"title":"Squirrel","require":"clike","owner":"RunDevelopment"},"stan":{"title":"Stan","owner":"RunDevelopment"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","vbnet"],"owner":"RunDevelopment"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"typoscript":{"title":"TypoScript","alias":"tsconfig","aliasTitles":{"tsconfig":"TSConfig"},"owner":"dkern"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"uri":{"title":"URI","alias":"url","aliasTitles":{"url":"URL"},"owner":"RunDevelopment"},"v":{"title":"V","require":"clike","owner":"taggon"},"vala":{"title":"Vala","require":"clike","optional":"regex","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":["vb","vba"],"aliasTitles":{"vba":"VBA"},"owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xml-doc":{"title":"XML doc (.net)","require":"markup","modify":["csharp","fsharp","vbnet"],"owner":"RunDevelopment"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"yang":{"title":"YANG","owner":"RunDevelopment"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; if (typeof module !== 'undefined' && module.exports) { module.exports = components; } \ No newline at end of file diff --git a/components.json b/components.json index 56e635cd0d..6c728466c3 100644 --- a/components.json +++ b/components.json @@ -238,6 +238,12 @@ "require": "c", "owner": "zeitgeist87" }, + "cfscript": { + "title": "CFScript", + "require": "clike", + "alias": "cfc", + "owner": "mjclemente" + }, "chaiscript": { "title": "ChaiScript", "require": ["clike", "cpp"], diff --git a/components/prism-cfscript.js b/components/prism-cfscript.js new file mode 100644 index 0000000000..1a4ac5bd54 --- /dev/null +++ b/components/prism-cfscript.js @@ -0,0 +1,44 @@ +// https://cfdocs.org/script +Prism.languages.cfscript = Prism.languages.extend('clike', { + 'comment': [ + { + pattern: /(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/, + lookbehind: true, + inside: { + 'annotation': { + pattern: /(?:^|[^.])@[\w\.]+/, + alias: 'punctuation' + } + } + }, + { + pattern: /(^|[^\\:])\/\/.*/, + lookbehind: true, + greedy: true + } + ], + 'keyword': /\b(?:abstract|break|catch|component|continue|default|do|else|extends|final|finally|for|function|if|in|include|package|private|property|public|remote|required|rethrow|return|static|switch|throw|try|var|while|xml)\b(?!\s*\=)/, + 'operator': [ + /\+\+|--|&&|\|\||::|=>|[!=]==|<=?|>=?|[-+*/%&|^!=<>]=?|\?(?:\.|:)?|[?:]/, + /\b(?:and|contains|eq|equal|eqv|gt|gte|imp|is|lt|lte|mod|not|or|xor)\b/ + ], + 'scope': { + pattern: /\b(?:application|arguments|cgi|client|cookie|local|session|super|this|variables)\b/, + alias: 'global' + }, + 'type': { + pattern: /\b(?:any|array|binary|boolean|date|guid|numeric|query|string|struct|uuid|void|xml)\b/, + alias: 'builtin' + } +}); + +Prism.languages.insertBefore('cfscript', 'keyword', { + // This must be declared before keyword because we use "function" inside the lookahead + 'function-variable': { + pattern: /[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/, + alias: 'function' + } +}); + +delete Prism.languages.cfscript['class-name']; +Prism.languages.cfc = Prism.languages['cfscript']; diff --git a/components/prism-cfscript.min.js b/components/prism-cfscript.min.js new file mode 100644 index 0000000000..b9c04e6ff4 --- /dev/null +++ b/components/prism-cfscript.min.js @@ -0,0 +1 @@ +Prism.languages.cfscript=Prism.languages.extend("clike",{comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,inside:{annotation:{pattern:/(?:^|[^.])@[\w\.]+/,alias:"punctuation"}}},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],keyword:/\b(?:abstract|break|catch|component|continue|default|do|else|extends|final|finally|for|function|if|in|include|package|private|property|public|remote|required|rethrow|return|static|switch|throw|try|var|while|xml)\b(?!\s*\=)/,operator:[/\+\+|--|&&|\|\||::|=>|[!=]==|<=?|>=?|[-+*/%&|^!=<>]=?|\?(?:\.|:)?|[?:]/,/\b(?:and|contains|eq|equal|eqv|gt|gte|imp|is|lt|lte|mod|not|or|xor)\b/],scope:{pattern:/\b(?:application|arguments|cgi|client|cookie|local|session|super|this|variables)\b/,alias:"global"},type:{pattern:/\b(?:any|array|binary|boolean|date|guid|numeric|query|string|struct|uuid|void|xml)\b/,alias:"builtin"}}),Prism.languages.insertBefore("cfscript","keyword",{"function-variable":{pattern:/[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"}}),delete Prism.languages.cfscript["class-name"],Prism.languages.cfc=Prism.languages.cfscript; \ No newline at end of file diff --git a/examples/prism-cfscript.html b/examples/prism-cfscript.html new file mode 100644 index 0000000000..6a0a771bb0 --- /dev/null +++ b/examples/prism-cfscript.html @@ -0,0 +1,43 @@ +

        Comments

        +
        // This is a comment
        +
        +/* This is a comment
        +on multiple lines */
        +
        +/**
        +* This is a Javadoc style comment
        +*
        +* @hint This is an annotation
        +*/
        +
        + +

        Functions

        +
        public boolean function myFunc(required any arg) {
        +  return true;
        +}
        + +

        Full example

        +
        component accessors="true" {
        +  property type="string" name="prop1" default="";
        +  property string prop2;
        +  function init(){
        +    this.prop3 = 12;
        +    return this;
        +  }
        +
        +  /**
        +  * @hint Annotations supported
        +  * @foo.hint
        +  */
        +  public any function build( required foo, color="blue", boolean bar=true ){
        +    arguments.foo = {
        +      'name' : "something",
        +      test = true
        +    }
        +    var foobar = function( required string baz, x=true, y=false ){
        +      return "bar!";
        +    };
        +    return foo;
        +  }
        +}
        +
        diff --git a/plugins/autoloader/prism-autoloader.js b/plugins/autoloader/prism-autoloader.js index 14c11d724c..5267c4ee05 100644 --- a/plugins/autoloader/prism-autoloader.js +++ b/plugins/autoloader/prism-autoloader.js @@ -25,6 +25,7 @@ "c": "clike", "csharp": "clike", "cpp": "c", + "cfscript": "clike", "chaiscript": [ "clike", "cpp" @@ -173,6 +174,7 @@ "oscript": "bsl", "cs": "csharp", "dotnet": "csharp", + "cfc": "cfscript", "coffee": "coffeescript", "conc": "concurnas", "jinja2": "django", diff --git a/plugins/autoloader/prism-autoloader.min.js b/plugins/autoloader/prism-autoloader.min.js index 84dede833c..1e50eeffd9 100644 --- a/plugins/autoloader/prism-autoloader.min.js +++ b/plugins/autoloader/prism-autoloader.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof self&&self.Prism&&self.document&&document.createElement){var l={javascript:"clike",actionscript:"javascript",apex:["clike","sql"],arduino:"cpp",aspnet:["markup","csharp"],birb:"clike",bison:"c",c:"clike",csharp:"clike",cpp:"c",chaiscript:["clike","cpp"],coffeescript:"javascript",crystal:"ruby","css-extras":"css",d:"clike",dart:"clike",django:"markup-templating",ejs:["javascript","markup-templating"],etlua:["lua","markup-templating"],erb:["ruby","markup-templating"],fsharp:"clike","firestore-security-rules":"clike",flow:"javascript",ftl:"markup-templating",gml:"clike",glsl:"c",go:"clike",groovy:"clike",haml:"ruby",handlebars:"markup-templating",haxe:"clike",hlsl:"c",java:"clike",javadoc:["markup","java","javadoclike"],jolie:"clike",jsdoc:["javascript","javadoclike","typescript"],"js-extras":"javascript",json5:"json",jsonp:"json","js-templates":"javascript",kotlin:"clike",latte:["clike","markup-templating","php"],less:"css",lilypond:"scheme",markdown:"markup","markup-templating":"markup",mongodb:"javascript",n4js:"javascript",nginx:"clike",objectivec:"c",opencl:"c",parser:"markup",php:"markup-templating",phpdoc:["php","javadoclike"],"php-extras":"php",plsql:"sql",processing:"clike",protobuf:"clike",pug:["markup","javascript"],purebasic:"clike",purescript:"haskell",qml:"javascript",qore:"clike",racket:"scheme",jsx:["markup","javascript"],tsx:["jsx","typescript"],reason:"clike",ruby:"clike",sass:"css",scss:"css",scala:"java","shell-session":"bash",smarty:"markup-templating",solidity:"clike",soy:"markup-templating",sparql:"turtle",sqf:"clike",squirrel:"clike",swift:"clike","t4-cs":["t4-templating","csharp"],"t4-vb":["t4-templating","vbnet"],tap:"yaml",tt2:["clike","markup-templating"],textile:"markup",twig:"markup",typescript:"javascript",v:"clike",vala:"clike",vbnet:"basic",velocity:"markup",wiki:"markup",xeora:"markup","xml-doc":"markup",xquery:"markup"},n={html:"markup",xml:"markup",svg:"markup",mathml:"markup",ssml:"markup",atom:"markup",rss:"markup",js:"javascript",g4:"antlr4",adoc:"asciidoc",shell:"bash",shortcode:"bbcode",rbnf:"bnf",oscript:"bsl",cs:"csharp",dotnet:"csharp",coffee:"coffeescript",conc:"concurnas",jinja2:"django","dns-zone":"dns-zone-file",dockerfile:"docker",gv:"dot",eta:"ejs",xlsx:"excel-formula",xls:"excel-formula",gamemakerlanguage:"gml",hs:"haskell",gitignore:"ignore",hgignore:"ignore",npmignore:"ignore",webmanifest:"json",kt:"kotlin",kts:"kotlin",kum:"kumir",tex:"latex",context:"latex",ly:"lilypond",emacs:"lisp",elisp:"lisp","emacs-lisp":"lisp",md:"markdown",moon:"moonscript",n4jsd:"n4js",nani:"naniscript",objc:"objectivec",objectpascal:"pascal",px:"pcaxis",pcode:"peoplecode",pq:"powerquery",mscript:"powerquery",pbfasm:"purebasic",purs:"purescript",py:"python",rkt:"racket",rpy:"renpy",robot:"robotframework",rb:"ruby","sh-session":"shell-session",shellsession:"shell-session",smlnj:"sml",sol:"solidity",sln:"solution-file",rq:"sparql",t4:"t4-cs",trig:"turtle",ts:"typescript",tsconfig:"typoscript",uscript:"unrealscript",uc:"unrealscript",url:"uri",vb:"visual-basic",vba:"visual-basic",xeoracube:"xeora",yml:"yaml"},p={},e="components/",a=Prism.util.currentScript();if(a){var r=/\bplugins\/autoloader\/prism-autoloader\.(?:min\.)?js(?:\?[^\r\n/]*)?$/i,s=/(^|\/)[\w-]+\.(?:min\.)?js(?:\?[^\r\n/]*)?$/i,t=a.getAttribute("data-autoloader-path");if(null!=t)e=t.trim().replace(/\/?$/,"/");else{var i=a.src;r.test(i)?e=i.replace(r,"components/"):s.test(i)&&(e=i.replace(s,"$1components/"))}}var o=Prism.plugins.autoloader={languages_path:e,use_minified:!0,loadLanguages:m};Prism.hooks.add("complete",function(e){var a=e.element,r=e.language;if(a&&r&&"none"!==r){var s=function(e){var a=(e.getAttribute("data-dependencies")||"").trim();if(!a){var r=e.parentElement;r&&"pre"===r.tagName.toLowerCase()&&(a=(r.getAttribute("data-dependencies")||"").trim())}return a?a.split(/\s*,\s*/g):[]}(a);/^diff-./i.test(r)?(s.push("diff"),s.push(r.substr("diff-".length))):s.push(r),s.every(u)||m(s,function(){Prism.highlightElement(a)})}})}function u(e){if(0<=e.indexOf("!"))return!1;if((e=n[e]||e)in Prism.languages)return!0;var a=p[e];return a&&!a.error&&!1===a.loading}function m(e,a,r){"string"==typeof e&&(e=[e]);var s=e.length,t=0,i=!1;function c(){i||++t===s&&a&&a(e)}0!==s?e.forEach(function(e){!function(a,r,s){var t=0<=a.indexOf("!");function e(){var e=p[a];e||(e=p[a]={callbacks:[]}),e.callbacks.push({success:r,error:s}),!t&&u(a)?k(a,"success"):!t&&e.error?k(a,"error"):!t&&e.loading||(e.loading=!0,e.error=!1,function(e,a,r){var s=document.createElement("script");s.src=e,s.async=!0,s.onload=function(){document.body.removeChild(s),a&&a()},s.onerror=function(){document.body.removeChild(s),r&&r()},document.body.appendChild(s)}(function(e){return o.languages_path+"prism-"+e+(o.use_minified?".min":"")+".js"}(a),function(){e.loading=!1,k(a,"success")},function(){e.loading=!1,e.error=!0,k(a,"error")}))}a=a.replace("!",""),a=n[a]||a;var i=l[a];i&&i.length?m(i,e,s):e()}(e,c,function(){i||(i=!0,r&&r(e))})}):a&&setTimeout(a,0)}function k(e,a){if(p[e]){for(var r=p[e].callbacks,s=0,t=r.length;s x +fooBar = ( x, y ) => x +ಠ_ಠ = () => {} +d = function Example({ props: { a: _A, b} } = Props) {} +f = function (x = fun()) {} +l = (x = fun(), y) => {} +a = function () {}, b = () => {} + +---------------------------------------------------- + +[ + ["function-variable", "foo"], + ["operator", "="], + ["keyword", "function"], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", "{"], + ["punctuation", "}"], + + ["function-variable", "foo"], + ["operator", "="], + ["keyword", "function"], + ["punctuation", "("], + " x", + ["punctuation", ","], + " y", + ["punctuation", ")"], + ["punctuation", "{"], + ["punctuation", "}"], + + ["punctuation", "{"], + ["function-variable", "foo"], + ["operator", ":"], + ["keyword", "function"], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", "{"], + ["punctuation", "}"], + ["punctuation", "}"], + + ["function-variable", "fooBar"], + ["operator", "="], + " x ", + ["operator", "=>"], + " x\r\n", + + ["function-variable", "fooBar"], + ["operator", "="], + ["punctuation", "("], + " x", + ["punctuation", ","], + " y ", + ["punctuation", ")"], + ["operator", "=>"], + " x\r\n", + + ["function-variable", "ಠ_ಠ"], + ["operator", "="], + ["punctuation", "("], + ["punctuation", ")"], + ["operator", "=>"], + ["punctuation", "{"], + ["punctuation", "}"], + + ["function-variable", "d"], + ["operator", "="], + ["keyword", "function"], + ["function", "Example"], + ["punctuation", "("], + ["punctuation", "{"], + " props", + ["operator", ":"], + ["punctuation", "{"], + " a", + ["operator", ":"], + " _A", + ["punctuation", ","], + " b", + ["punctuation", "}"], + ["punctuation", "}"], + ["operator", "="], + " Props", + ["punctuation", ")"], + ["punctuation", "{"], + ["punctuation", "}"], + + ["function-variable", "f"], + ["operator", "="], + ["keyword", "function"], + ["punctuation", "("], + "x ", + ["operator", "="], + ["function", "fun"], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", ")"], + ["punctuation", "{"], + ["punctuation", "}"], + + ["function-variable", "l"], + ["operator", "="], + ["punctuation", "("], + "x ", + ["operator", "="], + ["function", "fun"], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", ","], + " y", + ["punctuation", ")"], + ["operator", "=>"], + ["punctuation", "{"], + ["punctuation", "}"], + + ["function-variable", "a"], + ["operator", "="], + ["keyword", "function"], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", "{"], + ["punctuation", "}"], + ["punctuation", ","], + ["function-variable", "b"], + ["operator", "="], + ["punctuation", "("], + ["punctuation", ")"], + ["operator", "=>"], + ["punctuation", "{"], + ["punctuation", "}"] +] + +---------------------------------------------------- + +Checks for variables obviously containing functions. diff --git a/tests/languages/cfscript/keyword_feature.test b/tests/languages/cfscript/keyword_feature.test new file mode 100644 index 0000000000..0791a3bf9d --- /dev/null +++ b/tests/languages/cfscript/keyword_feature.test @@ -0,0 +1,71 @@ +abstract +break +catch +component +continue +default +do +else +extends +final +finally +for +function +if +in +include +package +private +property +public +remote +required +rethrow +return +static +switch +throw +try +var +while +xml + +---------------------------------------------------- + +[ + ["keyword", "abstract"], + ["keyword", "break"], + ["keyword", "catch"], + ["keyword", "component"], + ["keyword", "continue"], + ["keyword", "default"], + ["keyword", "do"], + ["keyword", "else"], + ["keyword", "extends"], + ["keyword", "final"], + ["keyword", "finally"], + ["keyword", "for"], + ["keyword", "function"], + ["keyword", "if"], + ["keyword", "in"], + ["keyword", "include"], + ["keyword", "package"], + ["keyword", "private"], + ["keyword", "property"], + ["keyword", "public"], + ["keyword", "remote"], + ["keyword", "required"], + ["keyword", "rethrow"], + ["keyword", "return"], + ["keyword", "static"], + ["keyword", "switch"], + ["keyword", "throw"], + ["keyword", "try"], + ["keyword", "var"], + ["keyword", "while"], + ["keyword", "xml"] +] + +---------------------------------------------------- + +Checks for all keywords. diff --git a/tests/languages/cfscript/operator_feature.test b/tests/languages/cfscript/operator_feature.test new file mode 100644 index 0000000000..54fe40ae53 --- /dev/null +++ b/tests/languages/cfscript/operator_feature.test @@ -0,0 +1,71 @@ ++ ++ += +- -- -= +! != +< <= +> >= += == +=== !== +& && &= +| || +: :: +? ?. ?: +^ ^= +* *= +/ /= +% %= + +and +contains +eq +equal +eqv +gt +gte +imp +is +lt +lte +mod +not +or +xor + +---------------------------------------------------- + +[ + ["operator", "+"], ["operator", "++"], ["operator", "+="], + ["operator", "-"], ["operator", "--"], ["operator", "-="], + ["operator", "!"], ["operator", "!="], + ["operator", "<"], ["operator", "<="], + ["operator", ">"], ["operator", ">="], + ["operator", "="], ["operator", "=="], + ["operator", "==="], ["operator", "!=="], + ["operator", "&"], ["operator", "&&"], ["operator", "&="], + ["operator", "|"], ["operator", "||"], + ["operator", ":"], ["operator", "::"], + ["operator", "?"], ["operator", "?."], ["operator", "?:"], + ["operator", "^"], ["operator", "^="], + ["operator", "*"], ["operator", "*="], + ["operator", "/"], ["operator", "/="], + ["operator", "%"], ["operator", "%="], + + ["operator", "and"], + ["operator", "contains"], + ["operator", "eq"], + ["operator", "equal"], + ["operator", "eqv"], + ["operator", "gt"], + ["operator", "gte"], + ["operator", "imp"], + ["operator", "is"], + ["operator", "lt"], + ["operator", "lte"], + ["operator", "mod"], + ["operator", "not"], + ["operator", "or"], + ["operator", "xor"] +] + +---------------------------------------------------- + +Checks for all operators. diff --git a/tests/languages/cfscript/scope_feature.test b/tests/languages/cfscript/scope_feature.test new file mode 100644 index 0000000000..70dfb96d8a --- /dev/null +++ b/tests/languages/cfscript/scope_feature.test @@ -0,0 +1,29 @@ +application +arguments +cgi +client +cookie +local +session +super +this +variables + +---------------------------------------------------- + +[ + ["scope", "application"], + ["scope", "arguments"], + ["scope", "cgi"], + ["scope", "client"], + ["scope", "cookie"], + ["scope", "local"], + ["scope", "session"], + ["scope", "super"], + ["scope", "this"], + ["scope", "variables"] +] + +---------------------------------------------------- + +Checks for all scopes. diff --git a/tests/languages/cfscript/type_feature.test b/tests/languages/cfscript/type_feature.test new file mode 100644 index 0000000000..b87a21a8a6 --- /dev/null +++ b/tests/languages/cfscript/type_feature.test @@ -0,0 +1,35 @@ +any +array +binary +boolean +date +guid +numeric +query +string +struct +uuid +void +xml + +---------------------------------------------------- + +[ + ["type", "any"], + ["type", "array"], + ["type", "binary"], + ["type", "boolean"], + ["type", "date"], + ["type", "guid"], + ["type", "numeric"], + ["type", "query"], + ["type", "string"], + ["type", "struct"], + ["type", "uuid"], + ["type", "void"], + ["keyword", "xml"] +] + +---------------------------------------------------- + +Checks for all types. From 8019e2f6751842b5e2d86f7601d45974116b7036 Mon Sep 17 00:00:00 2001 From: Tom Pavelec <46928405+TomPavelec@users.noreply.github.com> Date: Fri, 19 Feb 2021 17:41:31 +0100 Subject: [PATCH 0737/1100] PHP: Improved constant support for PHP 8.1 enums (#2770) This improves the highlighting of PHP 8.1 enums and class constants. --- components/prism-php.js | 17 ++++++- components/prism-php.min.js | 2 +- tests/languages/latte/html_feature.test | 2 +- tests/languages/latte/n-attr_feature.test | 4 +- tests/languages/php/class-name_feature.test | 9 ---- tests/languages/php/constant_feature.test | 54 ++++++++++++++++++++- tests/languages/php/enum_feature.test | 52 ++++++++++++++++++++ 7 files changed, 124 insertions(+), 16 deletions(-) create mode 100644 tests/languages/php/enum_feature.test diff --git a/components/prism-php.js b/components/prism-php.js index 52293f128e..e11cd9cdea 100644 --- a/components/prism-php.js +++ b/components/prism-php.js @@ -12,8 +12,18 @@ pattern: /\b(?:false|true)\b/i, alias: 'boolean' }, - /\b[A-Z_][A-Z0-9_]*\b(?!\s*\()/, + { + pattern: /(::\s*)\b[a-z_]\w*\b(?!\s*\()/i, + greedy: true, + lookbehind: true, + }, + { + pattern: /(\b(?:case|const)\s+)\b[a-z_]\w*(?=\s*[;=])/i, + greedy: true, + lookbehind: true, + }, /\b(?:null)\b/i, + /\b[A-Z_][A-Z0-9_]*\b(?!\s*\()/, ]; var number = /\b0b[01]+(?:_[01]+)*\b|\b0o[0-7]+(?:_[0-7]+)*\b|\b0x[\da-f]+(?:_[\da-f]+)*\b|(?:\b\d+(?:_\d+)*\.?(?:\d+(?:_\d+)*)?|\B\.\d+)(?:e[+-]?\d+)?/i; var operator = /|\?\?=?|\.{3}|\??->|[!=]=?=?|::|\*\*=?|--|\+\+|&&|\|\||<<|>>|[?~]|[/^|%*&<>.+-]=?/; @@ -87,7 +97,10 @@ }, /\b(?:__halt_compiler|abstract|and|array|as|break|callable|case|catch|class|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|enum|eval|exit|extends|final|finally|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|namespace|match|new|or|parent|print|private|protected|public|require|require_once|return|self|static|switch|throw|trait|try|unset|use|var|while|xor|yield)\b/i ], - 'argument-name': /\b[a-z_]\w*(?=\s*:(?!:))/i, + 'argument-name': { + pattern: /([(,]\s+)\b[a-z_]\w*(?=\s*:(?!:))/i, + lookbehind: true + }, 'class-name': [ { pattern: /(\b(?:extends|implements|instanceof|new(?!\s+self|\s+static))\s+|\bcatch\s*\()\b[a-z_]\w*(?!\\)\b/i, diff --git a/components/prism-php.min.js b/components/prism-php.min.js index bf06e87dbc..c3b051295a 100644 --- a/components/prism-php.min.js +++ b/components/prism-php.min.js @@ -1 +1 @@ -!function(a){var e=/\/\*[\s\S]*?\*\/|\/\/.*|#(?!\[).*/,t=[{pattern:/\b(?:false|true)\b/i,alias:"boolean"},/\b[A-Z_][A-Z0-9_]*\b(?!\s*\()/,/\b(?:null)\b/i],i=/\b0b[01]+(?:_[01]+)*\b|\b0o[0-7]+(?:_[0-7]+)*\b|\b0x[\da-f]+(?:_[\da-f]+)*\b|(?:\b\d+(?:_\d+)*\.?(?:\d+(?:_\d+)*)?|\B\.\d+)(?:e[+-]?\d+)?/i,n=/|\?\?=?|\.{3}|\??->|[!=]=?=?|::|\*\*=?|--|\+\+|&&|\|\||<<|>>|[?~]|[/^|%*&<>.+-]=?/,s=/[{}\[\](),:;]/;a.languages.php={delimiter:{pattern:/\?>$|^<\?(?:php(?=\s)|=)?/i,alias:"important"},comment:e,variable:/\$+(?:\w+\b|(?={))/i,package:{pattern:/(namespace\s+|use\s+(?:function\s+)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,lookbehind:!0,inside:{punctuation:/\\/}},"class-name-definition":{pattern:/(\b(?:class|enum|interface|trait)\s+)\b[a-z_]\w*(?!\\)\b/i,lookbehind:!0,alias:"class-name"},keyword:[{pattern:/(\(\s*)\b(?:bool|boolean|int|integer|float|string|object|array)\b(?=\s*\))/i,alias:"type-casting",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)\b(?:bool|int|float|string|object|array(?!\s*\()|mixed|self|static|callable|iterable|(?:null|false)(?=\s*\|))\b(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*[a-z0-9_|]\|\s*)(?:null|false)\b(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b(?:bool|int|float|string|object|void|array(?!\s*\()|mixed|self|static|callable|iterable|(?:null|false)(?=\s*\|))\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?[a-z0-9_|]\|\s*)(?:null|false)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/\b(?:bool|int|float|string|object|void|array(?!\s*\()|mixed|iterable|(?:null|false)(?=\s*\|))\b/i,alias:"type-declaration",greedy:!0},{pattern:/(\|\s*)(?:null|false)\b/i,alias:"type-declaration",greedy:!0,lookbehind:!0},{pattern:/\b(?:parent|self|static)(?=\s*::)/i,alias:"static-context",greedy:!0},/\b(?:__halt_compiler|abstract|and|array|as|break|callable|case|catch|class|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|enum|eval|exit|extends|final|finally|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|namespace|match|new|or|parent|print|private|protected|public|require|require_once|return|self|static|switch|throw|trait|try|unset|use|var|while|xor|yield)\b/i],"argument-name":/\b[a-z_]\w*(?=\s*:(?!:))/i,"class-name":[{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self|\s+static))\s+|\bcatch\s*\()\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/(\|\s*)\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/\b[a-z_]\w*(?!\\)\b(?=\s*\|)/i,greedy:!0},{pattern:/(\|\s*)(?:\\?\b[a-z_]\w*)+\b/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(?:\\?\b[a-z_]\w*)+\b(?=\s*\|)/i,alias:"class-name-fully-qualified",greedy:!0,inside:{punctuation:/\\/}},{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self\b|\s+static\b))\s+|\bcatch\s*\()(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*\$)/i,alias:"type-declaration",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-declaration"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*::)/i,alias:["class-name-fully-qualified","static-context"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/([(,?]\s*)[a-z_]\w*(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-hint"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b[a-z_]\w*(?!\\)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:["class-name-fully-qualified","return-type"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:t,function:/\w+\s*(?=\()/,property:{pattern:/(->)[\w]+/,lookbehind:!0},number:i,operator:n,punctuation:s};var l={pattern:/{\$(?:{(?:{[^{}]+}|[^{}]+)}|[^{}])+}|(^|[^\\{])\$+(?:\w+(?:\[[^\r\n\[\]]+\]|->\w+)*)/,lookbehind:!0,inside:a.languages.php},r=[{pattern:/<<<'([^']+)'[\r\n](?:.*[\r\n])*?\1;/,alias:"nowdoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<'[^']+'|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<'?|[';]$/}}}},{pattern:/<<<(?:"([^"]+)"[\r\n](?:.*[\r\n])*?\1;|([a-z_]\w*)[\r\n](?:.*[\r\n])*?\2;)/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<(?:"[^"]+"|[a-z_]\w*)|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<"?|[";]$/}},interpolation:l}},{pattern:/`(?:\\[\s\S]|[^\\`])*`/,alias:"backtick-quoted-string",greedy:!0},{pattern:/'(?:\\[\s\S]|[^\\'])*'/,alias:"single-quoted-string",greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,alias:"double-quoted-string",greedy:!0,inside:{interpolation:l}}];a.languages.insertBefore("php","variable",{string:r}),a.languages.insertBefore("php","variable",{attribute:{pattern:/#\[(?:[^"'\/#]|\/(?![*/])|\/\/.*$|#(?!\[).*$|\/\*(?:[^*]|\*(?!\/))*\*\/|"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*')+\](?=\s*[a-z$#])/im,greedy:!0,inside:{"attribute-content":{pattern:/^(#\[)[\s\S]+(?=]$)/,lookbehind:!0,inside:{comment:e,string:r,"attribute-class-name":[{pattern:/([^:]|^)\b[a-z_]\w*(?!\\)\b/i,alias:"class-name",greedy:!0,lookbehind:!0},{pattern:/([^:]|^)(?:\\?\b[a-z_]\w*)+/i,alias:["class-name","class-name-fully-qualified"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:t,number:i,operator:n,punctuation:s}},delimiter:{pattern:/^#\[|]$/,alias:"punctuation"}}}}),a.hooks.add("before-tokenize",function(e){if(/<\?/.test(e.code)){a.languages["markup-templating"].buildPlaceholders(e,"php",/<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#(?!\[))(?:[^?\n\r]|\?(?!>))*(?=$|\?>|[\r\n])|#\[|\/\*(?:[^*]|\*(?!\/))*(?:\*\/|$))*?(?:\?>|$)/gi)}}),a.hooks.add("after-tokenize",function(e){a.languages["markup-templating"].tokenizePlaceholders(e,"php")})}(Prism); \ No newline at end of file +!function(a){var e=/\/\*[\s\S]*?\*\/|\/\/.*|#(?!\[).*/,t=[{pattern:/\b(?:false|true)\b/i,alias:"boolean"},{pattern:/(::\s*)\b[a-z_]\w*\b(?!\s*\()/i,greedy:!0,lookbehind:!0},{pattern:/(\b(?:case|const)\s+)\b[a-z_]\w*(?=\s*[;=])/i,greedy:!0,lookbehind:!0},/\b(?:null)\b/i,/\b[A-Z_][A-Z0-9_]*\b(?!\s*\()/],i=/\b0b[01]+(?:_[01]+)*\b|\b0o[0-7]+(?:_[0-7]+)*\b|\b0x[\da-f]+(?:_[\da-f]+)*\b|(?:\b\d+(?:_\d+)*\.?(?:\d+(?:_\d+)*)?|\B\.\d+)(?:e[+-]?\d+)?/i,n=/|\?\?=?|\.{3}|\??->|[!=]=?=?|::|\*\*=?|--|\+\+|&&|\|\||<<|>>|[?~]|[/^|%*&<>.+-]=?/,s=/[{}\[\](),:;]/;a.languages.php={delimiter:{pattern:/\?>$|^<\?(?:php(?=\s)|=)?/i,alias:"important"},comment:e,variable:/\$+(?:\w+\b|(?={))/i,package:{pattern:/(namespace\s+|use\s+(?:function\s+)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,lookbehind:!0,inside:{punctuation:/\\/}},"class-name-definition":{pattern:/(\b(?:class|enum|interface|trait)\s+)\b[a-z_]\w*(?!\\)\b/i,lookbehind:!0,alias:"class-name"},keyword:[{pattern:/(\(\s*)\b(?:bool|boolean|int|integer|float|string|object|array)\b(?=\s*\))/i,alias:"type-casting",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)\b(?:bool|int|float|string|object|array(?!\s*\()|mixed|self|static|callable|iterable|(?:null|false)(?=\s*\|))\b(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*[a-z0-9_|]\|\s*)(?:null|false)\b(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b(?:bool|int|float|string|object|void|array(?!\s*\()|mixed|self|static|callable|iterable|(?:null|false)(?=\s*\|))\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?[a-z0-9_|]\|\s*)(?:null|false)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/\b(?:bool|int|float|string|object|void|array(?!\s*\()|mixed|iterable|(?:null|false)(?=\s*\|))\b/i,alias:"type-declaration",greedy:!0},{pattern:/(\|\s*)(?:null|false)\b/i,alias:"type-declaration",greedy:!0,lookbehind:!0},{pattern:/\b(?:parent|self|static)(?=\s*::)/i,alias:"static-context",greedy:!0},/\b(?:__halt_compiler|abstract|and|array|as|break|callable|case|catch|class|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|enum|eval|exit|extends|final|finally|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|namespace|match|new|or|parent|print|private|protected|public|require|require_once|return|self|static|switch|throw|trait|try|unset|use|var|while|xor|yield)\b/i],"argument-name":{pattern:/([(,]\s+)\b[a-z_]\w*(?=\s*:(?!:))/i,lookbehind:!0},"class-name":[{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self|\s+static))\s+|\bcatch\s*\()\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/(\|\s*)\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/\b[a-z_]\w*(?!\\)\b(?=\s*\|)/i,greedy:!0},{pattern:/(\|\s*)(?:\\?\b[a-z_]\w*)+\b/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(?:\\?\b[a-z_]\w*)+\b(?=\s*\|)/i,alias:"class-name-fully-qualified",greedy:!0,inside:{punctuation:/\\/}},{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self\b|\s+static\b))\s+|\bcatch\s*\()(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*\$)/i,alias:"type-declaration",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-declaration"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*::)/i,alias:["class-name-fully-qualified","static-context"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/([(,?]\s*)[a-z_]\w*(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-hint"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b[a-z_]\w*(?!\\)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:["class-name-fully-qualified","return-type"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:t,function:/\w+\s*(?=\()/,property:{pattern:/(->)[\w]+/,lookbehind:!0},number:i,operator:n,punctuation:s};var l={pattern:/{\$(?:{(?:{[^{}]+}|[^{}]+)}|[^{}])+}|(^|[^\\{])\$+(?:\w+(?:\[[^\r\n\[\]]+\]|->\w+)*)/,lookbehind:!0,inside:a.languages.php},r=[{pattern:/<<<'([^']+)'[\r\n](?:.*[\r\n])*?\1;/,alias:"nowdoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<'[^']+'|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<'?|[';]$/}}}},{pattern:/<<<(?:"([^"]+)"[\r\n](?:.*[\r\n])*?\1;|([a-z_]\w*)[\r\n](?:.*[\r\n])*?\2;)/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<(?:"[^"]+"|[a-z_]\w*)|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<"?|[";]$/}},interpolation:l}},{pattern:/`(?:\\[\s\S]|[^\\`])*`/,alias:"backtick-quoted-string",greedy:!0},{pattern:/'(?:\\[\s\S]|[^\\'])*'/,alias:"single-quoted-string",greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,alias:"double-quoted-string",greedy:!0,inside:{interpolation:l}}];a.languages.insertBefore("php","variable",{string:r}),a.languages.insertBefore("php","variable",{attribute:{pattern:/#\[(?:[^"'\/#]|\/(?![*/])|\/\/.*$|#(?!\[).*$|\/\*(?:[^*]|\*(?!\/))*\*\/|"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*')+\](?=\s*[a-z$#])/im,greedy:!0,inside:{"attribute-content":{pattern:/^(#\[)[\s\S]+(?=]$)/,lookbehind:!0,inside:{comment:e,string:r,"attribute-class-name":[{pattern:/([^:]|^)\b[a-z_]\w*(?!\\)\b/i,alias:"class-name",greedy:!0,lookbehind:!0},{pattern:/([^:]|^)(?:\\?\b[a-z_]\w*)+/i,alias:["class-name","class-name-fully-qualified"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:t,number:i,operator:n,punctuation:s}},delimiter:{pattern:/^#\[|]$/,alias:"punctuation"}}}}),a.hooks.add("before-tokenize",function(e){if(/<\?/.test(e.code)){a.languages["markup-templating"].buildPlaceholders(e,"php",/<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#(?!\[))(?:[^?\n\r]|\?(?!>))*(?=$|\?>|[\r\n])|#\[|\/\*(?:[^*]|\*(?!\/))*(?:\*\/|$))*?(?:\?>|$)/gi)}}),a.hooks.add("after-tokenize",function(e){a.languages["markup-templating"].tokenizePlaceholders(e,"php")})}(Prism); \ No newline at end of file diff --git a/tests/languages/latte/html_feature.test b/tests/languages/latte/html_feature.test index 437d0ad944..d6534973bb 100644 --- a/tests/languages/latte/html_feature.test +++ b/tests/languages/latte/html_feature.test @@ -15,7 +15,7 @@ ["tag", [["tag", [["punctuation", "<"], "a"]], ["attr-name", ["href"]], ["attr-value", [["punctuation", "="], ["punctuation", "\""], ["latte", [["ld", [["punctuation", "{"], ["tag", "link"]]], - ["php", [["argument-name", "Post"], ["punctuation", ":"], ["class-name", "show"], ["variable", "$post"], ["operator", "->"], ["property", "id"]]], + ["php", ["Post", ["punctuation", ":"], ["class-name", "show"], ["variable", "$post"], ["operator", "->"], ["property", "id"]]], ["rd", [["punctuation", "}"]]]]], ["punctuation", "\""]]], ["punctuation", ">"]]], ["latte", [["ld", [["punctuation", "{"]]], ["php", [["variable", "$post"], ["operator", "->"], ["property", "title"]]], ["rd", [["punctuation", "}"]]]]], diff --git a/tests/languages/latte/n-attr_feature.test b/tests/languages/latte/n-attr_feature.test index 4126431d1b..3effa4630c 100644 --- a/tests/languages/latte/n-attr_feature.test +++ b/tests/languages/latte/n-attr_feature.test @@ -9,13 +9,13 @@ [ ["tag", [["tag", [["punctuation", "<"], "a"]], ["n-attr", [["attr-name", "n:href"], - ["attr-value", [["punctuation", "="], ["punctuation", "\""], ["php", [["argument-name", "Post"], ["punctuation", ":"], ["class-name", "show"], ["variable", "$post"], ["operator", "->"], ["property", "id"]]], ["punctuation", "\""]]]]], + ["attr-value", [["punctuation", "="], ["punctuation", "\""], ["php", ["Post", ["punctuation", ":"], ["class-name", "show"], ["variable", "$post"], ["operator", "->"], ["property", "id"]]], ["punctuation", "\""]]]]], ["punctuation", ">"]]], "link", ["tag", [["tag", [["punctuation", ""]]], ["tag", [["tag", [["punctuation", "<"], "a"]], ["n-attr", [["attr-name", "n:href"], - ["attr-value", [["punctuation", "="], ["punctuation", "\""], ["php", [["argument-name", "Post"], ["punctuation", ":"], ["class-name", "show"], ["variable", "$post"], ["operator", "->"], ["property", "id"]]], ["punctuation", "\""]]]]], + ["attr-value", [["punctuation", "="], ["punctuation", "\""], ["php", ["Post", ["punctuation", ":"], ["class-name", "show"], ["variable", "$post"], ["operator", "->"], ["property", "id"]]], ["punctuation", "\""]]]]], ["punctuation", ">"]]], "link", ["tag", [["tag", [["punctuation", ""]]], diff --git a/tests/languages/php/class-name_feature.test b/tests/languages/php/class-name_feature.test index 2755dc32d4..bf3502ae6e 100644 --- a/tests/languages/php/class-name_feature.test +++ b/tests/languages/php/class-name_feature.test @@ -22,8 +22,6 @@ class Foo extends Bar implements Baz {} class Foo extends \Package\Bar implements App\Baz {} -enum Foo implements Bar {} - ---------------------------------------------------- [ @@ -196,13 +194,6 @@ enum Foo implements Bar {} "Baz" ]], ["punctuation", "{"], - ["punctuation", "}"], - - ["keyword", "enum"], - ["class-name-definition", "Foo"], - ["keyword", "implements"], - ["class-name", "Bar"], - ["punctuation", "{"], ["punctuation", "}"] ] diff --git a/tests/languages/php/constant_feature.test b/tests/languages/php/constant_feature.test index 32ecaf0197..9cde9cb3cf 100644 --- a/tests/languages/php/constant_feature.test +++ b/tests/languages/php/constant_feature.test @@ -5,6 +5,22 @@ AZ PRISM FOOBAR_42 +class Foo{ + const BAR = 1; + const baz = 2; +} + +Foo::BAR; +Foo::baz; + + +switch ($i) { + case NULL: + break; + case X: + break; +} + ---------------------------------------------------- [ @@ -13,7 +29,43 @@ FOOBAR_42 ["constant", "X"], ["constant", "AZ"], ["constant", "PRISM"], - ["constant", "FOOBAR_42"] + ["constant", "FOOBAR_42"], + + ["keyword", "class"], + ["class-name-definition", "Foo"], + ["punctuation", "{"], + ["keyword", "const"], + ["constant", "BAR"], + ["operator", "="], + ["number", "1"], + ["punctuation", ";"], + ["keyword", "const"], + ["constant", "baz"], + ["operator", "="], + ["number", "2"], + ["punctuation", ";"], + ["punctuation", "}"], + + ["class-name", "Foo"], ["operator", "::"], ["constant", "BAR"], ["punctuation", ";"], + ["class-name", "Foo"], ["operator", "::"], ["constant", "baz"], ["punctuation", ";"], + + ["keyword", "switch"], + ["punctuation", "("], + ["variable", "$i"], + ["punctuation", ")"], + ["punctuation", "{"], + ["keyword", "case"], + ["constant", "NULL"], + ["punctuation", ":"], + ["keyword", "break"], + ["punctuation", ";"], + ["keyword", "case"], + ["constant", "X"], + ["punctuation", ":"], + ["keyword", "break"], + ["punctuation", ";"], + ["punctuation", "}"] + ] ---------------------------------------------------- diff --git a/tests/languages/php/enum_feature.test b/tests/languages/php/enum_feature.test new file mode 100644 index 0000000000..4d84e32f03 --- /dev/null +++ b/tests/languages/php/enum_feature.test @@ -0,0 +1,52 @@ +enum Foo implements Bar {} + +enum Suit { + case Hearts; + case Diamonds = 'D'; +} + +$val = Suit::Diamonds; + +Suit::Spades->name; + +---------------------------------------------------- + +[ + ["keyword", "enum"], + ["class-name-definition", "Foo"], + ["keyword", "implements"], + ["class-name", "Bar"], + ["punctuation", "{"], + ["punctuation", "}"], + + ["keyword", "enum"], + ["class-name-definition", "Suit"], + ["punctuation", "{"], + ["keyword", "case"], + ["constant", "Hearts"], + ["punctuation", ";"], + ["keyword", "case"], + ["constant", "Diamonds"], + ["operator", "="], + ["string", "'D'"], + ["punctuation", ";"], + ["punctuation", "}"], + + ["variable", "$val"], + ["operator", "="], + ["class-name", "Suit"], + ["operator", "::"], + ["constant", "Diamonds"], + ["punctuation", ";"], + + ["class-name", "Suit"], + ["operator", "::"], + ["constant", "Spades"], + ["operator", "->"], + ["property", "name"], + ["punctuation", ";"] +] + +---------------------------------------------------- + +Checks for enums. From e931441537878142adb3020cb1e38aeea9f79430 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=CE=BAeen?= <3han5chou7@gmail.com> Date: Tue, 23 Feb 2021 20:44:32 +0900 Subject: [PATCH 0738/1100] Added support for Idris (#2755) --- components.js | 2 +- components.json | 6 ++ components/prism-idris.js | 13 +++++ components/prism-idris.min.js | 1 + examples/prism-idris.html | 56 +++++++++++++++++++ plugins/autoloader/prism-autoloader.js | 2 + plugins/autoloader/prism-autoloader.min.js | 2 +- plugins/show-language/prism-show-language.js | 1 + .../show-language/prism-show-language.min.js | 2 +- tests/languages/idris/char_feature.test | 17 ++++++ tests/languages/idris/comment_feature.test | 19 +++++++ tests/languages/idris/constant_feature.test | 15 +++++ tests/languages/idris/hvariable_feature.test | 15 +++++ .../idris/import_statement_feature.test | 12 ++++ tests/languages/idris/keyword_feature.test | 17 ++++++ tests/languages/idris/number_feature.test | 23 ++++++++ tests/languages/idris/operator_feature.test | 37 ++++++++++++ tests/languages/idris/string_feature.test | 19 +++++++ 18 files changed, 256 insertions(+), 3 deletions(-) create mode 100644 components/prism-idris.js create mode 100644 components/prism-idris.min.js create mode 100644 examples/prism-idris.html create mode 100644 tests/languages/idris/char_feature.test create mode 100644 tests/languages/idris/comment_feature.test create mode 100644 tests/languages/idris/constant_feature.test create mode 100644 tests/languages/idris/hvariable_feature.test create mode 100644 tests/languages/idris/import_statement_feature.test create mode 100644 tests/languages/idris/keyword_feature.test create mode 100644 tests/languages/idris/number_feature.test create mode 100644 tests/languages/idris/operator_feature.test create mode 100644 tests/languages/idris/string_feature.test diff --git a/components.js b/components.js index 7a36dffc23..11813bdf3f 100644 --- a/components.js +++ b/components.js @@ -1,2 +1,2 @@ -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml","ssml","atom","rss"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","ssml":"SSML","atom":"Atom","rss":"RSS"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","optional":"regex","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"ABNF","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"agda":{"title":"Agda","owner":"xy-ren"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apex":{"title":"Apex","require":["clike","sql"],"owner":"RunDevelopment"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"dkern"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"birb":{"title":"Birb","require":"clike","owner":"Calamity210"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"BNF","alias":"rbnf","aliasTitles":{"rbnf":"RBNF"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"bsl":{"title":"BSL (1C:Enterprise)","alias":"oscript","aliasTitles":{"oscript":"OneScript"},"owner":"Diversus23"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cfscript":{"title":"CFScript","require":"clike","alias":"cfc","owner":"mjclemente"},"chaiscript":{"title":"ChaiScript","require":["clike","cpp"],"owner":"RunDevelopment"},"cil":{"title":"CIL","owner":"sbrl"},"clojure":{"title":"Clojure","owner":"troglotit"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"cypher":{"title":"Cypher","owner":"RunDevelopment"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dataweave":{"title":"DataWeave","owner":"machaval"},"dax":{"title":"DAX","owner":"peterbud"},"dhall":{"title":"Dhall","owner":"RunDevelopment"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"dot":{"title":"DOT (Graphviz)","alias":"gv","optional":"markup","owner":"RunDevelopment"},"ebnf":{"title":"EBNF","owner":"RunDevelopment"},"editorconfig":{"title":"EditorConfig","owner":"osipxd"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"c","owner":"Golmote"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","optional":["markdown"],"owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"hlsl":{"title":"HLSL","require":"c","owner":"RunDevelopment"},"http":{"title":"HTTP","optional":["css","javascript","json","markup","uri"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"ignore":{"title":".ignore","owner":"osipxd","alias":["gitignore","hgignore","npmignore"],"aliasTitles":{"gitignore":".gitignore","hgignore":".hgignore","npmignore":".npmignore"}},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike","typescript"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","alias":"webmanifest","aliasTitles":{"webmanifest":"Web App Manifest"},"owner":"CupOfTea696"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"jsstacktrace":{"title":"JS stack trace","owner":"sbrl"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","alias":["kt","kts"],"aliasTitles":{"kts":"Kotlin Script"},"require":"clike","owner":"Golmote"},"kumir":{"title":"KuMir (КуМир)","alias":"kum","owner":"edukisto"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","optional":"yaml","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"mongodb":{"title":"MongoDB","owner":"airs0urce","require":"javascript"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"naniscript":{"title":"Naninovel Script","owner":"Elringus","alias":"nani"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"psl":{"title":"PATROL Scripting Language","owner":"bertysentry"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":"markup-templating","owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"promql":{"title":"PromQL","owner":"arendjr"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"purebasic":{"title":"PureBasic","require":"clike","alias":"pbfasm","owner":"HeX0R101"},"purescript":{"title":"PureScript","require":"haskell","alias":"purs","owner":"sriharshachilakapati"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"racket":{"title":"Racket","require":"scheme","alias":"rkt","owner":"RunDevelopment"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","owner":"RunDevelopment"},"renpy":{"title":"Ren'py","alias":"rpy","owner":"HyuchiaDiego"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","alias":["sh-session","shellsession"],"owner":"RunDevelopment"},"smali":{"title":"Smali","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sml":{"title":"SML","alias":"smlnj","aliasTitles":{"smlnj":"SML/NJ"},"owner":"RunDevelopment"},"solidity":{"title":"Solidity (Ethereum)","alias":"sol","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"squirrel":{"title":"Squirrel","require":"clike","owner":"RunDevelopment"},"stan":{"title":"Stan","owner":"RunDevelopment"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","vbnet"],"owner":"RunDevelopment"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"typoscript":{"title":"TypoScript","alias":"tsconfig","aliasTitles":{"tsconfig":"TSConfig"},"owner":"dkern"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"uri":{"title":"URI","alias":"url","aliasTitles":{"url":"URL"},"owner":"RunDevelopment"},"v":{"title":"V","require":"clike","owner":"taggon"},"vala":{"title":"Vala","require":"clike","optional":"regex","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":["vb","vba"],"aliasTitles":{"vba":"VBA"},"owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xml-doc":{"title":"XML doc (.net)","require":"markup","modify":["csharp","fsharp","vbnet"],"owner":"RunDevelopment"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"yang":{"title":"YANG","owner":"RunDevelopment"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml","ssml","atom","rss"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","ssml":"SSML","atom":"Atom","rss":"RSS"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","optional":"regex","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"ABNF","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"agda":{"title":"Agda","owner":"xy-ren"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apex":{"title":"Apex","require":["clike","sql"],"owner":"RunDevelopment"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"dkern"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"birb":{"title":"Birb","require":"clike","owner":"Calamity210"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"BNF","alias":"rbnf","aliasTitles":{"rbnf":"RBNF"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"bsl":{"title":"BSL (1C:Enterprise)","alias":"oscript","aliasTitles":{"oscript":"OneScript"},"owner":"Diversus23"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cfscript":{"title":"CFScript","require":"clike","alias":"cfc","owner":"mjclemente"},"chaiscript":{"title":"ChaiScript","require":["clike","cpp"],"owner":"RunDevelopment"},"cil":{"title":"CIL","owner":"sbrl"},"clojure":{"title":"Clojure","owner":"troglotit"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"cypher":{"title":"Cypher","owner":"RunDevelopment"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dataweave":{"title":"DataWeave","owner":"machaval"},"dax":{"title":"DAX","owner":"peterbud"},"dhall":{"title":"Dhall","owner":"RunDevelopment"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"dot":{"title":"DOT (Graphviz)","alias":"gv","optional":"markup","owner":"RunDevelopment"},"ebnf":{"title":"EBNF","owner":"RunDevelopment"},"editorconfig":{"title":"EditorConfig","owner":"osipxd"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"c","owner":"Golmote"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","optional":["markdown"],"owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"hlsl":{"title":"HLSL","require":"c","owner":"RunDevelopment"},"http":{"title":"HTTP","optional":["css","javascript","json","markup","uri"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"idris":{"title":"Idris","alias":"idr","owner":"KeenS","require":"haskell"},"ignore":{"title":".ignore","owner":"osipxd","alias":["gitignore","hgignore","npmignore"],"aliasTitles":{"gitignore":".gitignore","hgignore":".hgignore","npmignore":".npmignore"}},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike","typescript"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","alias":"webmanifest","aliasTitles":{"webmanifest":"Web App Manifest"},"owner":"CupOfTea696"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"jsstacktrace":{"title":"JS stack trace","owner":"sbrl"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","alias":["kt","kts"],"aliasTitles":{"kts":"Kotlin Script"},"require":"clike","owner":"Golmote"},"kumir":{"title":"KuMir (КуМир)","alias":"kum","owner":"edukisto"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","optional":"yaml","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"mongodb":{"title":"MongoDB","owner":"airs0urce","require":"javascript"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"naniscript":{"title":"Naninovel Script","owner":"Elringus","alias":"nani"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"psl":{"title":"PATROL Scripting Language","owner":"bertysentry"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":"markup-templating","owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"promql":{"title":"PromQL","owner":"arendjr"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"purebasic":{"title":"PureBasic","require":"clike","alias":"pbfasm","owner":"HeX0R101"},"purescript":{"title":"PureScript","require":"haskell","alias":"purs","owner":"sriharshachilakapati"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"racket":{"title":"Racket","require":"scheme","alias":"rkt","owner":"RunDevelopment"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","owner":"RunDevelopment"},"renpy":{"title":"Ren'py","alias":"rpy","owner":"HyuchiaDiego"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","alias":["sh-session","shellsession"],"owner":"RunDevelopment"},"smali":{"title":"Smali","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sml":{"title":"SML","alias":"smlnj","aliasTitles":{"smlnj":"SML/NJ"},"owner":"RunDevelopment"},"solidity":{"title":"Solidity (Ethereum)","alias":"sol","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"squirrel":{"title":"Squirrel","require":"clike","owner":"RunDevelopment"},"stan":{"title":"Stan","owner":"RunDevelopment"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","vbnet"],"owner":"RunDevelopment"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"typoscript":{"title":"TypoScript","alias":"tsconfig","aliasTitles":{"tsconfig":"TSConfig"},"owner":"dkern"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"uri":{"title":"URI","alias":"url","aliasTitles":{"url":"URL"},"owner":"RunDevelopment"},"v":{"title":"V","require":"clike","owner":"taggon"},"vala":{"title":"Vala","require":"clike","optional":"regex","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":["vb","vba"],"aliasTitles":{"vba":"VBA"},"owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xml-doc":{"title":"XML doc (.net)","require":"markup","modify":["csharp","fsharp","vbnet"],"owner":"RunDevelopment"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"yang":{"title":"YANG","owner":"RunDevelopment"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; if (typeof module !== 'undefined' && module.exports) { module.exports = components; } \ No newline at end of file diff --git a/components.json b/components.json index 6c728466c3..191f43d0a1 100644 --- a/components.json +++ b/components.json @@ -528,6 +528,12 @@ "title": "Icon", "owner": "Golmote" }, + "idris": { + "title": "Idris", + "alias": "idr", + "owner": "KeenS", + "require": "haskell" + }, "ignore": { "title": ".ignore", "owner": "osipxd", diff --git a/components/prism-idris.js b/components/prism-idris.js new file mode 100644 index 0000000000..5924baa6dd --- /dev/null +++ b/components/prism-idris.js @@ -0,0 +1,13 @@ +Prism.languages.idris = Prism.languages.extend('haskell', { + 'comment': { + pattern: /(?:(?:--|\|\|\|).*$|{-[\s\S]*?-})/m, + }, + 'keyword': /\b(?:Type|case|class|codata|constructor|corecord|data|do|dsl|else|export|if|implementation|implicit|import|impossible|in|infix|infixl|infixr|instance|interface|let|module|mutual|namespace|of|parameters|partial|postulate|private|proof|public|quoteGoal|record|rewrite|syntax|then|total|using|where|with)\b/, + 'import-statement': { + pattern: /(^\s*)import\s+(?:[A-Z][\w']*)(?:\.[A-Z][\w']*)*/m, + lookbehind: true + }, + 'builtin': undefined +}); + +Prism.languages.idr = Prism.languages.idris; diff --git a/components/prism-idris.min.js b/components/prism-idris.min.js new file mode 100644 index 0000000000..da0ab48bc4 --- /dev/null +++ b/components/prism-idris.min.js @@ -0,0 +1 @@ +Prism.languages.idris=Prism.languages.extend("haskell",{comment:{pattern:/(?:(?:--|\|\|\|).*$|{-[\s\S]*?-})/m},keyword:/\b(?:Type|case|class|codata|constructor|corecord|data|do|dsl|else|export|if|implementation|implicit|import|impossible|in|infix|infixl|infixr|instance|interface|let|module|mutual|namespace|of|parameters|partial|postulate|private|proof|public|quoteGoal|record|rewrite|syntax|then|total|using|where|with)\b/,"import-statement":{pattern:/(^\s*)import\s+(?:[A-Z][\w']*)(?:\.[A-Z][\w']*)*/m,lookbehind:!0},builtin:void 0}),Prism.languages.idr=Prism.languages.idris; \ No newline at end of file diff --git a/examples/prism-idris.html b/examples/prism-idris.html new file mode 100644 index 0000000000..558f1fa8ca --- /dev/null +++ b/examples/prism-idris.html @@ -0,0 +1,56 @@ +

        Comments

        +
        -- Single line comment
        +{- Multi-line
        +comment -}
        + +

        Strings and characters

        +
        'a'
        +'\n'
        +'\^A'
        +'\^]'
        +'\NUL'
        +'\23'
        +'\o75'
        +'\xFE'
        + +

        Numbers

        +
        42
        +123.456
        +123.456e-789
        +1e+3
        +0o74
        +0XAF
        + +

        Larger example

        +
        module Main
        +
        +import Data.Vect
        +
        +-- this is comment
        +record Person where
        +  constructor MkPerson2
        +  age : Integer
        +  name : String
        +
        +||| identity function
        +id : a -> a
        +id x = x
        +
        +{-
        +Bool type can be defined in
        +userland
        +-}
        +data Bool = True | False
        +
        +implementation Show Bool where
        +  show True = "True"
        +  show False = "False"
        +
        +not : Bool -> Bool
        +not b = case b of
        +          True  => False
        +          False => True
        +
        +vect3 : Vect 3 Int
        +vect3 = with Vect (1 :: 2 :: 3 :: Nil)
        +
        diff --git a/plugins/autoloader/prism-autoloader.js b/plugins/autoloader/prism-autoloader.js index 5267c4ee05..7cedab113f 100644 --- a/plugins/autoloader/prism-autoloader.js +++ b/plugins/autoloader/prism-autoloader.js @@ -60,6 +60,7 @@ "handlebars": "markup-templating", "haxe": "clike", "hlsl": "c", + "idris": "haskell", "java": "clike", "javadoc": [ "markup", @@ -186,6 +187,7 @@ "xls": "excel-formula", "gamemakerlanguage": "gml", "hs": "haskell", + "idr": "idris", "gitignore": "ignore", "hgignore": "ignore", "npmignore": "ignore", diff --git a/plugins/autoloader/prism-autoloader.min.js b/plugins/autoloader/prism-autoloader.min.js index 1e50eeffd9..a15be00534 100644 --- a/plugins/autoloader/prism-autoloader.min.js +++ b/plugins/autoloader/prism-autoloader.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof self&&self.Prism&&self.document&&document.createElement){var l={javascript:"clike",actionscript:"javascript",apex:["clike","sql"],arduino:"cpp",aspnet:["markup","csharp"],birb:"clike",bison:"c",c:"clike",csharp:"clike",cpp:"c",cfscript:"clike",chaiscript:["clike","cpp"],coffeescript:"javascript",crystal:"ruby","css-extras":"css",d:"clike",dart:"clike",django:"markup-templating",ejs:["javascript","markup-templating"],etlua:["lua","markup-templating"],erb:["ruby","markup-templating"],fsharp:"clike","firestore-security-rules":"clike",flow:"javascript",ftl:"markup-templating",gml:"clike",glsl:"c",go:"clike",groovy:"clike",haml:"ruby",handlebars:"markup-templating",haxe:"clike",hlsl:"c",java:"clike",javadoc:["markup","java","javadoclike"],jolie:"clike",jsdoc:["javascript","javadoclike","typescript"],"js-extras":"javascript",json5:"json",jsonp:"json","js-templates":"javascript",kotlin:"clike",latte:["clike","markup-templating","php"],less:"css",lilypond:"scheme",markdown:"markup","markup-templating":"markup",mongodb:"javascript",n4js:"javascript",nginx:"clike",objectivec:"c",opencl:"c",parser:"markup",php:"markup-templating",phpdoc:["php","javadoclike"],"php-extras":"php",plsql:"sql",processing:"clike",protobuf:"clike",pug:["markup","javascript"],purebasic:"clike",purescript:"haskell",qml:"javascript",qore:"clike",racket:"scheme",jsx:["markup","javascript"],tsx:["jsx","typescript"],reason:"clike",ruby:"clike",sass:"css",scss:"css",scala:"java","shell-session":"bash",smarty:"markup-templating",solidity:"clike",soy:"markup-templating",sparql:"turtle",sqf:"clike",squirrel:"clike",swift:"clike","t4-cs":["t4-templating","csharp"],"t4-vb":["t4-templating","vbnet"],tap:"yaml",tt2:["clike","markup-templating"],textile:"markup",twig:"markup",typescript:"javascript",v:"clike",vala:"clike",vbnet:"basic",velocity:"markup",wiki:"markup",xeora:"markup","xml-doc":"markup",xquery:"markup"},n={html:"markup",xml:"markup",svg:"markup",mathml:"markup",ssml:"markup",atom:"markup",rss:"markup",js:"javascript",g4:"antlr4",adoc:"asciidoc",shell:"bash",shortcode:"bbcode",rbnf:"bnf",oscript:"bsl",cs:"csharp",dotnet:"csharp",cfc:"cfscript",coffee:"coffeescript",conc:"concurnas",jinja2:"django","dns-zone":"dns-zone-file",dockerfile:"docker",gv:"dot",eta:"ejs",xlsx:"excel-formula",xls:"excel-formula",gamemakerlanguage:"gml",hs:"haskell",gitignore:"ignore",hgignore:"ignore",npmignore:"ignore",webmanifest:"json",kt:"kotlin",kts:"kotlin",kum:"kumir",tex:"latex",context:"latex",ly:"lilypond",emacs:"lisp",elisp:"lisp","emacs-lisp":"lisp",md:"markdown",moon:"moonscript",n4jsd:"n4js",nani:"naniscript",objc:"objectivec",objectpascal:"pascal",px:"pcaxis",pcode:"peoplecode",pq:"powerquery",mscript:"powerquery",pbfasm:"purebasic",purs:"purescript",py:"python",rkt:"racket",rpy:"renpy",robot:"robotframework",rb:"ruby","sh-session":"shell-session",shellsession:"shell-session",smlnj:"sml",sol:"solidity",sln:"solution-file",rq:"sparql",t4:"t4-cs",trig:"turtle",ts:"typescript",tsconfig:"typoscript",uscript:"unrealscript",uc:"unrealscript",url:"uri",vb:"visual-basic",vba:"visual-basic",xeoracube:"xeora",yml:"yaml"},p={},e="components/",a=Prism.util.currentScript();if(a){var r=/\bplugins\/autoloader\/prism-autoloader\.(?:min\.)?js(?:\?[^\r\n/]*)?$/i,s=/(^|\/)[\w-]+\.(?:min\.)?js(?:\?[^\r\n/]*)?$/i,t=a.getAttribute("data-autoloader-path");if(null!=t)e=t.trim().replace(/\/?$/,"/");else{var i=a.src;r.test(i)?e=i.replace(r,"components/"):s.test(i)&&(e=i.replace(s,"$1components/"))}}var o=Prism.plugins.autoloader={languages_path:e,use_minified:!0,loadLanguages:m};Prism.hooks.add("complete",function(e){var a=e.element,r=e.language;if(a&&r&&"none"!==r){var s=function(e){var a=(e.getAttribute("data-dependencies")||"").trim();if(!a){var r=e.parentElement;r&&"pre"===r.tagName.toLowerCase()&&(a=(r.getAttribute("data-dependencies")||"").trim())}return a?a.split(/\s*,\s*/g):[]}(a);/^diff-./i.test(r)?(s.push("diff"),s.push(r.substr("diff-".length))):s.push(r),s.every(u)||m(s,function(){Prism.highlightElement(a)})}})}function u(e){if(0<=e.indexOf("!"))return!1;if((e=n[e]||e)in Prism.languages)return!0;var a=p[e];return a&&!a.error&&!1===a.loading}function m(e,a,r){"string"==typeof e&&(e=[e]);var s=e.length,t=0,i=!1;function c(){i||++t===s&&a&&a(e)}0!==s?e.forEach(function(e){!function(a,r,s){var t=0<=a.indexOf("!");function e(){var e=p[a];e||(e=p[a]={callbacks:[]}),e.callbacks.push({success:r,error:s}),!t&&u(a)?k(a,"success"):!t&&e.error?k(a,"error"):!t&&e.loading||(e.loading=!0,e.error=!1,function(e,a,r){var s=document.createElement("script");s.src=e,s.async=!0,s.onload=function(){document.body.removeChild(s),a&&a()},s.onerror=function(){document.body.removeChild(s),r&&r()},document.body.appendChild(s)}(function(e){return o.languages_path+"prism-"+e+(o.use_minified?".min":"")+".js"}(a),function(){e.loading=!1,k(a,"success")},function(){e.loading=!1,e.error=!0,k(a,"error")}))}a=a.replace("!",""),a=n[a]||a;var i=l[a];i&&i.length?m(i,e,s):e()}(e,c,function(){i||(i=!0,r&&r(e))})}):a&&setTimeout(a,0)}function k(e,a){if(p[e]){for(var r=p[e].callbacks,s=0,t=r.length;s= > \ | +++ : !! +\\ <- -> += :: => +>> >>= >@> +~ ! @ + +---------------------------------------------------- + +[ + ["operator", ".."], + ["hvariable", "reverse"], ["operator", " . "], ["hvariable", "sort"], + ["operator", "`foo`"], + ["operator", "`Foo.bar`"], + ["operator", "+"], ["operator", "-"], ["operator", "*"], ["operator", "/"], + ["operator", "^"], ["operator", "^^"], ["operator", "**"], + ["operator", "&&"], ["operator", "||"], + ["operator", "<"], ["operator", "<="], ["operator", "=="], ["operator", "/="], + ["operator", ">="], ["operator", ">"], ["operator", "\\"], ["operator", "|"], + ["operator", "++"], ["operator", ":"], ["operator", "!!"], + ["operator", "\\\\"], ["operator", "<-"], ["operator", "->"], + ["operator", "="], ["operator", "::"], ["operator", "=>"], + ["operator", ">>"], ["operator", ">>="], ["operator", ">@>"], + ["operator", "~"], ["operator", "!"], ["operator", "@"] +] + +---------------------------------------------------- + +Checks for operators. \ No newline at end of file diff --git a/tests/languages/idris/string_feature.test b/tests/languages/idris/string_feature.test new file mode 100644 index 0000000000..49c2cfbf23 --- /dev/null +++ b/tests/languages/idris/string_feature.test @@ -0,0 +1,19 @@ +"" +"fo\"o" +"foo \ + \ bar" +"foo -- comment \ + \ bar" + +---------------------------------------------------- + +[ + ["string", "\"\""], + ["string", "\"fo\\\"o\""], + ["string", "\"foo \\\r\n \\ bar\""], + ["string", "\"foo -- comment \\\r\n \\ bar\""] +] + +---------------------------------------------------- + +Checks for strings. \ No newline at end of file From 88fa72cfe29fd63a9058d563fcd69f53a760743e Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Fri, 26 Feb 2021 13:43:27 +0100 Subject: [PATCH 0739/1100] C++: Added missing keywords and modules (#2763) --- components/prism-cpp.js | 23 ++++- components/prism-cpp.min.js | 2 +- tests/languages/cpp/keyword_feature.test | 8 ++ tests/languages/cpp/module_feature.test | 116 +++++++++++++++++++++++ 4 files changed, 147 insertions(+), 2 deletions(-) create mode 100644 tests/languages/cpp/module_feature.test diff --git a/components/prism-cpp.js b/components/prism-cpp.js index cf14d49b64..55a2fae60e 100644 --- a/components/prism-cpp.js +++ b/components/prism-cpp.js @@ -1,6 +1,7 @@ (function (Prism) { - var keyword = /\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char8_t|char16_t|char32_t|class|compl|concept|const|consteval|constexpr|constinit|const_cast|continue|co_await|co_return|co_yield|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|float|for|friend|goto|if|inline|int|int8_t|int16_t|int32_t|int64_t|uint8_t|uint16_t|uint32_t|uint64_t|long|mutable|namespace|new|noexcept|nullptr|operator|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/; + var keyword = /\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char8_t|char16_t|char32_t|class|compl|concept|const|consteval|constexpr|constinit|const_cast|continue|co_await|co_return|co_yield|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int8_t|int16_t|int32_t|int64_t|uint8_t|uint16_t|uint32_t|uint64_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/; + var modName = /\b(?!)\w+(?:\s*\.\s*\w+)*\b/.source.replace(//g, function () { return keyword.source; }) Prism.languages.cpp = Prism.languages.extend('c', { 'class-name': [ @@ -31,6 +32,26 @@ }); Prism.languages.insertBefore('cpp', 'string', { + 'module': { + // https://en.cppreference.com/w/cpp/language/modules + pattern: RegExp( + /(\b(?:module|import)\s+)/.source + + '(?:' + + // header-name + /"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source + + '|' + + // module name or partition or both + /(?:\s*:\s*)?|:\s*/.source.replace(//g, function () { return modName; }) + + ')' + ), + lookbehind: true, + greedy: true, + inside: { + 'string': /^[<"][\s\S]+/, + 'operator': /:/, + 'punctuation': /\./ + } + }, 'raw-string': { pattern: /R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/, alias: 'string', diff --git a/components/prism-cpp.min.js b/components/prism-cpp.min.js index 7ab1f0d4ea..16f98cc5cc 100644 --- a/components/prism-cpp.min.js +++ b/components/prism-cpp.min.js @@ -1 +1 @@ -!function(e){var t=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char8_t|char16_t|char32_t|class|compl|concept|const|consteval|constexpr|constinit|const_cast|continue|co_await|co_return|co_yield|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|float|for|friend|goto|if|inline|int|int8_t|int16_t|int32_t|int64_t|uint8_t|uint16_t|uint32_t|uint64_t|long|mutable|namespace|new|noexcept|nullptr|operator|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/;e.languages.cpp=e.languages.extend("c",{"class-name":[{pattern:RegExp("(\\b(?:class|concept|enum|struct|typename)\\s+)(?!)\\w+".replace(//g,function(){return t.source})),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:t,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:true|false)\b/}),e.languages.insertBefore("cpp","string",{"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),e.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:e.languages.extend("cpp",{})}}),e.languages.insertBefore("inside","operator",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},e.languages.cpp["base-clause"])}(Prism); \ No newline at end of file +!function(e){var t=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char8_t|char16_t|char32_t|class|compl|concept|const|consteval|constexpr|constinit|const_cast|continue|co_await|co_return|co_yield|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int8_t|int16_t|int32_t|int64_t|uint8_t|uint16_t|uint32_t|uint64_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,n="\\b(?!)\\w+(?:\\s*\\.\\s*\\w+)*\\b".replace(//g,function(){return t.source});e.languages.cpp=e.languages.extend("c",{"class-name":[{pattern:RegExp("(\\b(?:class|concept|enum|struct|typename)\\s+)(?!)\\w+".replace(//g,function(){return t.source})),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:t,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:true|false)\b/}),e.languages.insertBefore("cpp","string",{module:{pattern:RegExp('(\\b(?:module|import)\\s+)(?:"(?:\\\\(?:\r\n|[^])|[^"\\\\\r\n])*"|<[^<>\r\n]*>|'+"(?:\\s*:\\s*)?|:\\s*".replace(//g,function(){return n})+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),e.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:e.languages.extend("cpp",{})}}),e.languages.insertBefore("inside","operator",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},e.languages.cpp["base-clause"])}(Prism); \ No newline at end of file diff --git a/tests/languages/cpp/keyword_feature.test b/tests/languages/cpp/keyword_feature.test index ac72b6a31d..69c90b55df 100644 --- a/tests/languages/cpp/keyword_feature.test +++ b/tests/languages/cpp/keyword_feature.test @@ -33,20 +33,24 @@ enum; explicit export extern +final float for friend goto if +import; inline int long +module; mutable namespace new noexcept nullptr operator +override private protected public @@ -125,20 +129,24 @@ uint64_t ["keyword", "explicit"], ["keyword", "export"], ["keyword", "extern"], + ["keyword", "final"], ["keyword", "float"], ["keyword", "for"], ["keyword", "friend"], ["keyword", "goto"], ["keyword", "if"], + ["keyword", "import"], ["punctuation", ";"], ["keyword", "inline"], ["keyword", "int"], ["keyword", "long"], + ["keyword", "module"], ["punctuation", ";"], ["keyword", "mutable"], ["keyword", "namespace"], ["keyword", "new"], ["keyword", "noexcept"], ["keyword", "nullptr"], ["keyword", "operator"], + ["keyword", "override"], ["keyword", "private"], ["keyword", "protected"], ["keyword", "public"], diff --git a/tests/languages/cpp/module_feature.test b/tests/languages/cpp/module_feature.test new file mode 100644 index 0000000000..b6675c3d4e --- /dev/null +++ b/tests/languages/cpp/module_feature.test @@ -0,0 +1,116 @@ +export module speech; + +export const char* get_phrase_en() { + return "Hello, world!"; +} + +export module speech; + +export import :english; +export import :spanish; + +export module speech:english; + +import speech; +import :PrivWidget; + +import ; +import ; +import "foo.h"; +import ; + +module : private; + +---------------------------------------------------- + +[ + ["keyword", "export"], + ["keyword", "module"], + ["module", ["speech"]], + ["punctuation", ";"], + + ["keyword", "export"], + ["keyword", "const"], + ["keyword", "char"], + ["operator", "*"], + ["function", "get_phrase_en"], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", "{"], + + ["keyword", "return"], + ["string", "\"Hello, world!\""], + ["punctuation", ";"], + + ["punctuation", "}"], + + ["keyword", "export"], + ["keyword", "module"], + ["module", ["speech"]], + ["punctuation", ";"], + + ["keyword", "export"], + ["keyword", "import"], + ["module", [ + ["operator", ":"], + "english" + ]], + ["punctuation", ";"], + + ["keyword", "export"], + ["keyword", "import"], + ["module", [ + ["operator", ":"], + "spanish" + ]], + ["punctuation", ";"], + + ["keyword", "export"], + ["keyword", "module"], + ["module", [ + "speech", + ["operator", ":"], + "english" + ]], + ["punctuation", ";"], + + ["keyword", "import"], + ["module", ["speech"]], + ["punctuation", ";"], + + ["keyword", "import"], + ["module", [ + ["operator", ":"], + "PrivWidget" + ]], + ["punctuation", ";"], + + ["keyword", "import"], + ["module", [ + ["string", ""] + ]], + ["punctuation", ";"], + + ["keyword", "import"], + ["module", [ + ["string", ""] + ]], + ["punctuation", ";"], + + ["keyword", "import"], + ["module", [ + ["string", "\"foo.h\""] + ]], + ["punctuation", ";"], + + ["keyword", "import"], + ["module", [ + ["string", ""] + ]], + ["punctuation", ";"], + + ["keyword", "module"], + ["operator", ":"], + ["keyword", "private"], + ["punctuation", ";"] +] \ No newline at end of file From e6c0d298a381d945eb9c326aee3fd59560b4a472 Mon Sep 17 00:00:00 2001 From: Samuel Gordalina Date: Tue, 2 Mar 2021 01:49:34 -0800 Subject: [PATCH 0740/1100] Elixir: Added missing keyword and other improvements (#2773) --- components/prism-elixir.js | 37 ++++++------ components/prism-elixir.min.js | 2 +- tests/languages/elixir/attribute_feature.test | 6 +- tests/languages/elixir/capture_feature.test | 42 +++++++++++--- tests/languages/elixir/doc_feature.test | 56 +++++++++++++++++++ tests/languages/elixir/issue1392.test | 6 +- tests/languages/elixir/issue775.test | 13 +++-- tests/languages/elixir/keyword_feature.test | 4 +- 8 files changed, 124 insertions(+), 42 deletions(-) create mode 100644 tests/languages/elixir/doc_feature.test diff --git a/components/prism-elixir.js b/components/prism-elixir.js index cfad1c8841..868e1fc732 100644 --- a/components/prism-elixir.js +++ b/components/prism-elixir.js @@ -1,5 +1,15 @@ Prism.languages.elixir = { - 'comment': /#.*/m, + 'doc': { + pattern: /@(?:doc|moduledoc)\s+(?:("""|''')[\s\S]*?\1|("|')(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2)/, + inside: { + 'attribute': /^@\w+/, + 'string': /['"][\s\S]+/ + } + }, + 'comment': { + pattern: /#.*/m, + greedy: true + }, // ~r"""foo""" (multi-line), ~r'''foo''' (multi-line), ~r/foo/, ~r|foo|, ~r"foo", ~r'foo', ~r(foo), ~r[foo], ~r{foo}, ~r 'regex': { pattern: /~[rR](?:("""|''')(?:\\[\s\S]|(?!\1)[^\\])+\1|([\/|"'])(?:\\.|(?!\2)[^\\\r\n])+\2|\((?:\\.|[^\\)\r\n])+\)|\[(?:\\.|[^\\\]\r\n])+\]|\{(?:\\.|[^\\}\r\n])+\}|<(?:\\.|[^\\>\r\n])+>)[uismxfr]*/, @@ -36,14 +46,12 @@ Prism.languages.elixir = { lookbehind: true, alias: 'symbol' }, + 'module': { + pattern: /\b[A-Z]\w*\b/, + alias: 'class-name' + }, // Look-ahead prevents bad highlighting of the :: operator 'attr-name': /\w+\??:(?!:)/, - 'capture': { - // Look-behind prevents bad highlighting of the && operator - pattern: /(^|[^&])&(?:[^&\s\d()][^\s()]*|(?=\())/, - lookbehind: true, - alias: 'function' - }, 'argument': { // Look-behind prevents bad highlighting of the && operator pattern: /(^|[^&])&\d+/, @@ -54,8 +62,9 @@ Prism.languages.elixir = { pattern: /@\w+/, alias: 'variable' }, + 'function': /\b[_a-zA-Z]\w*[?!]?(?:(?=\s*(?:\.\s*)?\()|(?=\/\d+))/, 'number': /\b(?:0[box][a-f\d_]+|\d[\d_]*)(?:\.[\d_]+)?(?:e[+-]?[\d_]+)?\b/i, - 'keyword': /\b(?:after|alias|and|case|catch|cond|def(?:callback|exception|impl|module|p|protocol|struct|delegate)?|do|else|end|fn|for|if|import|not|or|require|rescue|try|unless|use|when)\b/, + 'keyword': /\b(?:after|alias|and|case|catch|cond|def(?:callback|exception|impl|module|p|protocol|struct|delegate)?|do|else|end|fn|for|if|import|not|or|raise|require|rescue|try|unless|use|when)\b/, 'boolean': /\b(?:true|false|nil)\b/, 'operator': [ /\bin\b|&&?|\|[|>]?|\\\\|::|\.\.\.?|\+\+?|-[->]?|<[-=>]|>=|!==?|\B!|=(?:==?|[>~])?|[*\/^]/, @@ -73,18 +82,6 @@ Prism.languages.elixir = { 'punctuation': /<<|>>|[.,%\[\]{}()]/ }; -Prism.languages.insertBefore('elixir', 'keyword', { - 'module': { - pattern: /\b(defmodule\s)[A-Z][\w.\\]+/, - lookbehind: true, - alias: 'class-name' - }, - 'function': { - pattern: /\b(defp?\s)[\w.\\]+/, - lookbehind: true - } -}); - Prism.languages.elixir.string.forEach(function(o) { o.inside = { 'interpolation': { diff --git a/components/prism-elixir.min.js b/components/prism-elixir.min.js index ee6542e41f..83f6871ed9 100644 --- a/components/prism-elixir.min.js +++ b/components/prism-elixir.min.js @@ -1 +1 @@ -Prism.languages.elixir={comment:/#.*/m,regex:{pattern:/~[rR](?:("""|''')(?:\\[\s\S]|(?!\1)[^\\])+\1|([\/|"'])(?:\\.|(?!\2)[^\\\r\n])+\2|\((?:\\.|[^\\)\r\n])+\)|\[(?:\\.|[^\\\]\r\n])+\]|\{(?:\\.|[^\\}\r\n])+\}|<(?:\\.|[^\\>\r\n])+>)[uismxfr]*/,greedy:!0},string:[{pattern:/~[cCsSwW](?:("""|''')(?:\\[\s\S]|(?!\1)[^\\])+\1|([\/|"'])(?:\\.|(?!\2)[^\\\r\n])+\2|\((?:\\.|[^\\)\r\n])+\)|\[(?:\\.|[^\\\]\r\n])+\]|\{(?:\\.|#\{[^}]+\}|#(?!\{)|[^#\\}\r\n])+\}|<(?:\\.|[^\\>\r\n])+>)[csa]?/,greedy:!0,inside:{}},{pattern:/("""|''')[\s\S]*?\1/,greedy:!0,inside:{}},{pattern:/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0,inside:{}}],atom:{pattern:/(^|[^:]):\w+/,lookbehind:!0,alias:"symbol"},"attr-name":/\w+\??:(?!:)/,capture:{pattern:/(^|[^&])&(?:[^&\s\d()][^\s()]*|(?=\())/,lookbehind:!0,alias:"function"},argument:{pattern:/(^|[^&])&\d+/,lookbehind:!0,alias:"variable"},attribute:{pattern:/@\w+/,alias:"variable"},number:/\b(?:0[box][a-f\d_]+|\d[\d_]*)(?:\.[\d_]+)?(?:e[+-]?[\d_]+)?\b/i,keyword:/\b(?:after|alias|and|case|catch|cond|def(?:callback|exception|impl|module|p|protocol|struct|delegate)?|do|else|end|fn|for|if|import|not|or|require|rescue|try|unless|use|when)\b/,boolean:/\b(?:true|false|nil)\b/,operator:[/\bin\b|&&?|\|[|>]?|\\\\|::|\.\.\.?|\+\+?|-[->]?|<[-=>]|>=|!==?|\B!|=(?:==?|[>~])?|[*\/^]/,{pattern:/([^<])<(?!<)/,lookbehind:!0},{pattern:/([^>])>(?!>)/,lookbehind:!0}],punctuation:/<<|>>|[.,%\[\]{}()]/},Prism.languages.insertBefore("elixir","keyword",{module:{pattern:/\b(defmodule\s)[A-Z][\w.\\]+/,lookbehind:!0,alias:"class-name"},function:{pattern:/\b(defp?\s)[\w.\\]+/,lookbehind:!0}}),Prism.languages.elixir.string.forEach(function(e){e.inside={interpolation:{pattern:/#\{[^}]+\}/,inside:{delimiter:{pattern:/^#\{|\}$/,alias:"punctuation"},rest:Prism.languages.elixir}}}}); \ No newline at end of file +Prism.languages.elixir={doc:{pattern:/@(?:doc|moduledoc)\s+(?:("""|''')[\s\S]*?\1|("|')(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2)/,inside:{attribute:/^@\w+/,string:/['"][\s\S]+/}},comment:{pattern:/#.*/m,greedy:!0},regex:{pattern:/~[rR](?:("""|''')(?:\\[\s\S]|(?!\1)[^\\])+\1|([\/|"'])(?:\\.|(?!\2)[^\\\r\n])+\2|\((?:\\.|[^\\)\r\n])+\)|\[(?:\\.|[^\\\]\r\n])+\]|\{(?:\\.|[^\\}\r\n])+\}|<(?:\\.|[^\\>\r\n])+>)[uismxfr]*/,greedy:!0},string:[{pattern:/~[cCsSwW](?:("""|''')(?:\\[\s\S]|(?!\1)[^\\])+\1|([\/|"'])(?:\\.|(?!\2)[^\\\r\n])+\2|\((?:\\.|[^\\)\r\n])+\)|\[(?:\\.|[^\\\]\r\n])+\]|\{(?:\\.|#\{[^}]+\}|#(?!\{)|[^#\\}\r\n])+\}|<(?:\\.|[^\\>\r\n])+>)[csa]?/,greedy:!0,inside:{}},{pattern:/("""|''')[\s\S]*?\1/,greedy:!0,inside:{}},{pattern:/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0,inside:{}}],atom:{pattern:/(^|[^:]):\w+/,lookbehind:!0,alias:"symbol"},module:{pattern:/\b[A-Z]\w*\b/,alias:"class-name"},"attr-name":/\w+\??:(?!:)/,argument:{pattern:/(^|[^&])&\d+/,lookbehind:!0,alias:"variable"},attribute:{pattern:/@\w+/,alias:"variable"},function:/\b[_a-zA-Z]\w*[?!]?(?:(?=\s*(?:\.\s*)?\()|(?=\/\d+))/,number:/\b(?:0[box][a-f\d_]+|\d[\d_]*)(?:\.[\d_]+)?(?:e[+-]?[\d_]+)?\b/i,keyword:/\b(?:after|alias|and|case|catch|cond|def(?:callback|exception|impl|module|p|protocol|struct|delegate)?|do|else|end|fn|for|if|import|not|or|raise|require|rescue|try|unless|use|when)\b/,boolean:/\b(?:true|false|nil)\b/,operator:[/\bin\b|&&?|\|[|>]?|\\\\|::|\.\.\.?|\+\+?|-[->]?|<[-=>]|>=|!==?|\B!|=(?:==?|[>~])?|[*\/^]/,{pattern:/([^<])<(?!<)/,lookbehind:!0},{pattern:/([^>])>(?!>)/,lookbehind:!0}],punctuation:/<<|>>|[.,%\[\]{}()]/},Prism.languages.elixir.string.forEach(function(e){e.inside={interpolation:{pattern:/#\{[^}]+\}/,inside:{delimiter:{pattern:/^#\{|\}$/,alias:"punctuation"},rest:Prism.languages.elixir}}}}); \ No newline at end of file diff --git a/tests/languages/elixir/attribute_feature.test b/tests/languages/elixir/attribute_feature.test index 273c2a402f..52c0bc1c6d 100644 --- a/tests/languages/elixir/attribute_feature.test +++ b/tests/languages/elixir/attribute_feature.test @@ -8,12 +8,10 @@ foobar [ ["attribute", "@vsn"], ["number", "2"], - ["attribute", "@moduledoc"], ["string", [ - "\"\"\"\r\nfoobar\r\n\"\"\"" - ]], + ["doc", [ ["attribute", "@moduledoc" ], [ "string", "\"\"\"\r\nfoobar\r\n\"\"\"" ] ] ], ["attribute", "@tag"], ["atom", ":external"] ] ---------------------------------------------------- -Checks for module attributes. \ No newline at end of file +Checks for module attributes. diff --git a/tests/languages/elixir/capture_feature.test b/tests/languages/elixir/capture_feature.test index 8a64b66154..caa9473be9 100644 --- a/tests/languages/elixir/capture_feature.test +++ b/tests/languages/elixir/capture_feature.test @@ -1,28 +1,56 @@ +&Math.zero?(0) fun = &Math.zero?/1 (&is_function/1).(fun) fun = &(&1 + 1) &List.flatten(&1, &2) +fun = &Math.zero?/invalid + ---------------------------------------------------- [ - "fun ", ["operator", "="], - ["capture", "&Math.zero?/1"], + ["operator", "&"], + ["module", "Math"], + ["punctuation", "."], + ["function", "zero?" ], ["punctuation", "("], - ["capture", "&is_function/1"], + ["number", "0"], + ["punctuation", ")"], + "\r\nfun ", ["operator", "="], + ["operator", "&"], + ["module", "Math"], + ["punctuation", "."], + ["function", "zero?" ], + ["operator", "/"], + ["number", "1"], + ["punctuation", "("], + ["operator", "&"], + ["function", "is_function"], + ["operator", "/"], + ["number", "1"], ["punctuation", ")"], ["punctuation", "."], ["punctuation", "("], "fun", ["punctuation", ")"], "\r\nfun ", ["operator", "="], - ["capture", "&"], + ["operator", "&"], ["punctuation", "("], ["argument", "&1"], ["operator", "+"], ["number", "1"], ["punctuation", ")"], - ["capture", "&List.flatten"], + ["operator", "&"], + ["module", "List"], + ["punctuation", "."], ["function", "flatten"], ["punctuation", "("], ["argument", "&1"], ["punctuation", ","], ["argument", "&2"], - ["punctuation", ")"] + ["punctuation", ")"], + "\r\n\r\nfun ", + [ "operator", "=" ], + [ "operator", "&" ], + [ "module", "Math" ], + [ "punctuation", "." ], + "zero?", + [ "operator", "/" ], + "invalid" ] ---------------------------------------------------- -Checks for function capturing and arguments. \ No newline at end of file +Checks for function capturing and arguments. diff --git a/tests/languages/elixir/doc_feature.test b/tests/languages/elixir/doc_feature.test new file mode 100644 index 0000000000..27e8ceadbb --- /dev/null +++ b/tests/languages/elixir/doc_feature.test @@ -0,0 +1,56 @@ +@doc "single" +@doc 'single' +@doc """triple""" +@doc '''triple''' +@doc ''' +multiline +''' +@doc """ +multiline +""" +@doc since: "1.3.0" +@doc deprecated: "phased out" + +@moduledoc "single" +@moduledoc 'single' +@moduledoc """triple""" +@moduledoc '''triple''' +@moduledoc ''' +multiline +''' +@moduledoc """ +multiline +""" +@moduledoc since: "1.3.0" +@moduledoc deprecated: "phased out" + +---------------------------------------------------- + +[ + [ "doc", [ [ "attribute", "@doc" ], [ "string", "\"single\"" ] ] ], + [ "doc", [ [ "attribute", "@doc" ], [ "string", "'single'" ] ] ], + [ "doc", [ [ "attribute", "@doc" ], [ "string", "\"\"\"triple\"\"\"" ] ] ], + [ "doc", [ [ "attribute", "@doc" ], [ "string", "'''triple'''" ] ] ], + [ "doc", [ [ "attribute", "@doc" ], [ "string", "'''\nmultiline\n'''" ] ] ], + [ "doc", [ [ "attribute", "@doc" ], [ "string", "\"\"\"\nmultiline\n\"\"\"" ] ] ], + [ "attribute", "@doc" ], + [ "attr-name", "since:" ], + [ "string", [ "\"1.3.0\"" ] ], + [ "attribute", "@doc" ], + [ "attr-name", "deprecated:" ], + [ "string", [ "\"phased out\"" ] ], + [ "doc", [ [ "attribute", "@moduledoc" ], [ "string", "\"single\"" ] ] ], + [ "doc", [ [ "attribute", "@moduledoc" ], [ "string", "'single'" ] ] ], + [ "doc", [ [ "attribute", "@moduledoc" ], [ "string", "\"\"\"triple\"\"\"" ] ] ], + [ "doc", [ [ "attribute", "@moduledoc" ], [ "string", "'''triple'''" ] ] ], + [ "doc", [ [ "attribute", "@moduledoc" ], [ "string", "'''\nmultiline\n'''" ] ] ], + [ "doc", [ [ "attribute", "@moduledoc" ], [ "string", "\"\"\"\nmultiline\n\"\"\"" ] ] ], + [ "attribute", "@moduledoc" ], + [ "attr-name", "since:" ], + [ "string", [ "\"1.3.0\"" ] ], + [ "attribute", "@moduledoc" ], + [ "attr-name", "deprecated:" ], + [ "string", [ "\"phased out\"" ] ] +] + +---------------------------------------------------- diff --git a/tests/languages/elixir/issue1392.test b/tests/languages/elixir/issue1392.test index c7d20a8366..1c0c93b3aa 100644 --- a/tests/languages/elixir/issue1392.test +++ b/tests/languages/elixir/issue1392.test @@ -3,9 +3,9 @@ String.upcase(@fixed) ---------------------------------------------------- [ - "String", + ["module", "String"], ["punctuation", "."], - "upcase", + ["function", "upcase"], ["punctuation", "("], ["attribute", "@fixed"], ["punctuation", ")"] @@ -13,4 +13,4 @@ String.upcase(@fixed) ---------------------------------------------------- -Ensure module attributes don't consume punctuation. \ No newline at end of file +Ensure module attributes don't consume punctuation. diff --git a/tests/languages/elixir/issue775.test b/tests/languages/elixir/issue775.test index d3243f80a8..9804bba6d9 100644 --- a/tests/languages/elixir/issue775.test +++ b/tests/languages/elixir/issue775.test @@ -5,13 +5,16 @@ ---------------------------------------------------- [ - ["attribute", "@doc"], - ["string", [ - "\"\"\"\r\n## Parameters\r\n\"\"\"" - ]] + [ + "doc", + [ + [ "attribute", "@doc" ], + [ "string", "\"\"\"\r\n## Parameters\r\n\"\"\"" ] + ] + ] ] ---------------------------------------------------- Ensures that markdown headers are not highlighted as comments inside strings. -See #775 for details. \ No newline at end of file +See #775 for details. diff --git a/tests/languages/elixir/keyword_feature.test b/tests/languages/elixir/keyword_feature.test index 6a851f1b24..c4f56fed67 100644 --- a/tests/languages/elixir/keyword_feature.test +++ b/tests/languages/elixir/keyword_feature.test @@ -9,7 +9,7 @@ defdelegate defstruct do else end fn for if import not or -require rescue try +raise require rescue try unless use when ---------------------------------------------------- @@ -26,7 +26,7 @@ unless use when ["keyword", "defstruct"], ["keyword", "do"], ["keyword", "else"], ["keyword", "end"], ["keyword", "fn"], ["keyword", "for"], ["keyword", "if"], ["keyword", "import"], ["keyword", "not"], ["keyword", "or"], - ["keyword", "require"], ["keyword", "rescue"], ["keyword", "try"], + ["keyword", "raise"], ["keyword", "require"], ["keyword", "rescue"], ["keyword", "try"], ["keyword", "unless"], ["keyword", "use"], ["keyword", "when"] ] From 42d24fa2607df63aacfc7dbdcc99b458d4656cf2 Mon Sep 17 00:00:00 2001 From: edukisto <52005215+edukisto@users.noreply.github.com> Date: Tue, 2 Mar 2021 13:03:17 +0300 Subject: [PATCH 0741/1100] INI: Consistently mimic Win32 INI parsing (#2779) --- components/prism-ini.js | 45 ++++++++-- components/prism-ini.min.js | 2 +- tests/languages/ini/comment_feature.test | 65 ++++++++++---- tests/languages/ini/header_feature.test | 86 ++++++++++++++++++ tests/languages/ini/key_value_feature.test | 90 ++++++++++++++----- ..._feature.test => punctuation_feature.test} | 24 +++-- 6 files changed, 255 insertions(+), 57 deletions(-) create mode 100644 tests/languages/ini/header_feature.test rename tests/languages/ini/{selector_feature.test => punctuation_feature.test} (51%) diff --git a/components/prism-ini.js b/components/prism-ini.js index c7b45a8ba4..e950caf96a 100644 --- a/components/prism-ini.js +++ b/components/prism-ini.js @@ -1,11 +1,42 @@ Prism.languages.ini= { - 'comment': /^[ \t]*[;#].*$/m, - 'selector': /^[ \t]*\[.*?\]/m, - 'constant': /^[ \t]*[^\s=]+?(?=[ \t]*=)/m, - 'attr-value': { - pattern: /=.*/, + + /** + * The component mimics the behavior of the Win32 API parser. + * + * @see {@link https://github.com/PrismJS/prism/issues/2775#issuecomment-787477723} + */ + + 'comment': { + pattern: /(^[ \f\t\v]*)[#;][^\n\r]*/m, + lookbehind: true + }, + 'header': { + pattern: /(^[ \f\t\v]*)\[[^\n\r\]]*\]?/m, + lookbehind: true, inside: { - 'punctuation': /^[=]/ + 'section-name': { + pattern: /(^\[[ \f\t\v]*)[^ \f\t\v\]]+(?:[ \f\t\v]+[^ \f\t\v\]]+)*/, + lookbehind: true, + alias: 'selector' + }, + 'punctuation': /\[|\]/ } - } + }, + 'key': { + pattern: /(^[ \f\t\v]*)[^ \f\n\r\t\v=]+(?:[ \f\t\v]+[^ \f\n\r\t\v=]+)*(?=[ \f\t\v]*=)/m, + lookbehind: true, + alias: 'attr-name' + }, + 'value': { + pattern: /(=[ \f\t\v]*)[^ \f\n\r\t\v]+(?:[ \f\t\v]+[^ \f\n\r\t\v]+)*/, + lookbehind: true, + alias: 'attr-value', + inside: { + 'inner-value': { + pattern: /^("|').+(?=\1$)/, + lookbehind: true + } + } + }, + 'punctuation': /=/ }; diff --git a/components/prism-ini.min.js b/components/prism-ini.min.js index 620cdb55b4..a4e2d8e09b 100644 --- a/components/prism-ini.min.js +++ b/components/prism-ini.min.js @@ -1 +1 @@ -Prism.languages.ini={comment:/^[ \t]*[;#].*$/m,selector:/^[ \t]*\[.*?\]/m,constant:/^[ \t]*[^\s=]+?(?=[ \t]*=)/m,"attr-value":{pattern:/=.*/,inside:{punctuation:/^[=]/}}}; \ No newline at end of file +Prism.languages.ini={comment:{pattern:/(^[ \f\t\v]*)[#;][^\n\r]*/m,lookbehind:!0},header:{pattern:/(^[ \f\t\v]*)\[[^\n\r\]]*\]?/m,lookbehind:!0,inside:{"section-name":{pattern:/(^\[[ \f\t\v]*)[^ \f\t\v\]]+(?:[ \f\t\v]+[^ \f\t\v\]]+)*/,lookbehind:!0,alias:"selector"},punctuation:/\[|\]/}},key:{pattern:/(^[ \f\t\v]*)[^ \f\n\r\t\v=]+(?:[ \f\t\v]+[^ \f\n\r\t\v=]+)*(?=[ \f\t\v]*=)/m,lookbehind:!0,alias:"attr-name"},value:{pattern:/(=[ \f\t\v]*)[^ \f\n\r\t\v]+(?:[ \f\t\v]+[^ \f\n\r\t\v]+)*/,lookbehind:!0,alias:"attr-value",inside:{"inner-value":{pattern:/^("|').+(?=\1$)/,lookbehind:!0}}},punctuation:/=/}; \ No newline at end of file diff --git a/tests/languages/ini/comment_feature.test b/tests/languages/ini/comment_feature.test index 30e373c63a..48e1d39db0 100644 --- a/tests/languages/ini/comment_feature.test +++ b/tests/languages/ini/comment_feature.test @@ -1,15 +1,50 @@ -; -; foobar -# foobar - ----------------------------------------------------- - -[ - ["comment", ";"], - ["comment", "; foobar"], - ["comment", "# foobar"] -] - ----------------------------------------------------- - -Checks for comments. + # + ; + # + ; +# +# +# +#; +#[foo] +#foo=bar +#foobar +; +; +; +;# +;[foo] +;foo=bar +;foobar +foo#bar +foobar# +foo;bar +foobar; + +---------------------------------------------------- + +[ + ["comment", "#"], + ["comment", ";"], + ["comment", "#"], + ["comment", ";"], + ["comment", "#"], + ["comment", "#\t"], + ["comment", "# "], + ["comment", "#;"], + ["comment", "#[foo]"], + ["comment", "#foo=bar"], + ["comment", "#foobar"], + ["comment", ";"], + ["comment", ";\t"], + ["comment", "; "], + ["comment", ";#"], + ["comment", ";[foo]"], + ["comment", ";foo=bar"], + ["comment", ";foobar"], + "\nfoo#bar\nfoobar#\nfoo;bar\nfoobar;" +] + +---------------------------------------------------- + +Checks for comments. diff --git a/tests/languages/ini/header_feature.test b/tests/languages/ini/header_feature.test new file mode 100644 index 0000000000..9f0df51ac4 --- /dev/null +++ b/tests/languages/ini/header_feature.test @@ -0,0 +1,86 @@ + [foo1] +[ "foo2" ] +[ foo3 ] +[" foo4 "] +["foo5 bar5"] +["foo6"] +[foo7 +[foo8 bar8] +[foo9[bar9] +[foo10] +[foo11]bar11] + +---------------------------------------------------- + +[ + ["header", [ + ["punctuation", "["], + ["section-name", "foo1"], + ["punctuation", "]"] + ]], + + ["header", [ + ["punctuation", "["], + ["section-name", "\"foo2\""], + ["punctuation", "]"] + ]], + + ["header", [ + ["punctuation", "["], + ["section-name", "foo3"], + ["punctuation", "]"] + ]], + + ["header", [ + ["punctuation", "["], + ["section-name", "\" foo4 \""], + ["punctuation", "]"] + ]], + + ["header", [ + ["punctuation", "["], + ["section-name", "\"foo5 bar5\""], + ["punctuation", "]"] + ]], + + ["header", [ + ["punctuation", "["], + ["section-name", "\"foo6\""], + ["punctuation", "]"] + ]], + + ["header", [ + ["punctuation", "["], + ["section-name", "foo7"] + ]], + + ["header", [ + ["punctuation", "["], + ["section-name", "foo8 bar8"], + ["punctuation", "]"] + ]], + + ["header", [ + ["punctuation", "["], + ["section-name", "foo9[bar9"], + ["punctuation", "]"] + ]], + + ["header", [ + ["punctuation", "["], + ["section-name", "foo10"], + ["punctuation", "]"] + ]], + + ["header", [ + ["punctuation", "["], + ["section-name", "foo11"], + ["punctuation", "]"] + ]], + + "bar11]" +] + +---------------------------------------------------- + +Checks for headers (and section names). diff --git a/tests/languages/ini/key_value_feature.test b/tests/languages/ini/key_value_feature.test index 5d25d9d3cf..f39988bd45 100644 --- a/tests/languages/ini/key_value_feature.test +++ b/tests/languages/ini/key_value_feature.test @@ -1,21 +1,69 @@ -foo=Bar Baz -foobar=42 - ----------------------------------------------------- - -[ - ["constant", "foo"], - ["attr-value", [ - ["punctuation", "="], - "Bar Baz" - ]], - ["constant", "foobar"], - ["attr-value", [ - ["punctuation", "="], - "42" - ]] -] - ----------------------------------------------------- - -Checks for key/value pairs. \ No newline at end of file + bar1 = + "bar2" = + 'bar3' = + bar4 = +" bar5 "= +"bar6"= +' bar7 '= +'bar8'= += baz9 += "baz10" += 'baz11' += baz12 +=" baz13 " +="b14"a14"z14" +="baz15" +="baz16 +=' baz17 ' +='baz18' +=b19"a19"z19 +=b20"az20 +=ba21"z21 +=baz22 +=baz23" +bar24 +bar25 baz25=qux25 +bar26= +bar27==baz27 +bar28=baz28 +bar29=baz29 qux29 +bar30=baz30=qux30 + +---------------------------------------------------- + +[ + ["key", "bar1"], ["punctuation", "="], + ["key", "\"bar2\""], ["punctuation", "="], + ["key", "'bar3'"], ["punctuation", "="], + ["key", "bar4"], ["punctuation", "="], + ["key", "\" bar5 \""], ["punctuation", "="], + ["key", "\"bar6\""], ["punctuation", "="], + ["key", "' bar7 '"], ["punctuation", "="], + ["key", "'bar8'"], ["punctuation", "="], + ["punctuation", "="], ["value", ["baz9"]], + ["punctuation", "="], ["value", ["\"", ["inner-value", "baz10"], "\""]], + ["punctuation", "="], ["value", ["'", ["inner-value", "baz11"], "'"]], + ["punctuation", "="], ["value", ["baz12"]], + ["punctuation", "="], ["value", ["\"", ["inner-value", " baz13 "], "\""]], + ["punctuation", "="], ["value", ["\"", ["inner-value", "b14\"a14\"z14"], "\""]], + ["punctuation", "="], ["value", ["\"", ["inner-value", "baz15"], "\""]], + ["punctuation", "="], ["value", ["\"baz16"]], + ["punctuation", "="], ["value", ["'", ["inner-value", " baz17 "], "'"]], + ["punctuation", "="], ["value", ["'", ["inner-value", "baz18"], "'"]], + ["punctuation", "="], ["value", ["b19\"a19\"z19"]], + ["punctuation", "="], ["value", ["b20\"az20"]], + ["punctuation", "="], ["value", ["ba21\"z21"]], + ["punctuation", "="], ["value", ["baz22"]], + ["punctuation", "="], ["value", ["baz23\""]], + "\nbar24\n", + ["key", "bar25 baz25"], ["punctuation", "="], ["value", ["qux25"]], + ["key", "bar26"], ["punctuation", "="], + ["key", "bar27"], ["punctuation", "="], ["value", ["=baz27"]], + ["key", "bar28"], ["punctuation", "="], ["value", ["baz28"]], + ["key", "bar29"], ["punctuation", "="], ["value", ["baz29 qux29"]], + ["key", "bar30"], ["punctuation", "="], ["value", ["baz30=qux30"]] +] + +---------------------------------------------------- + +Checks for key-value pairs. diff --git a/tests/languages/ini/selector_feature.test b/tests/languages/ini/punctuation_feature.test similarity index 51% rename from tests/languages/ini/selector_feature.test rename to tests/languages/ini/punctuation_feature.test index 3158a665da..c72a16d0a1 100644 --- a/tests/languages/ini/selector_feature.test +++ b/tests/languages/ini/punctuation_feature.test @@ -1,13 +1,11 @@ -[owner] -[foobar] - ----------------------------------------------------- - -[ - ["selector", "[owner]"], - ["selector", "[foobar]"] -] - ----------------------------------------------------- - -Checks for section titles. \ No newline at end of file += + +---------------------------------------------------- + +[ + ["punctuation", "="] +] + +---------------------------------------------------- + +Checks for punctuation marks. From d85e30da6755fdbe7f8559f8e75d122297167018 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Fri, 5 Mar 2021 16:38:11 +0100 Subject: [PATCH 0742/1100] Updated refa + fixed 2 cases of exp backtracking (#2774) --- components/prism-asciidoc.js | 4 ++-- components/prism-asciidoc.min.js | 2 +- components/prism-perl.js | 2 +- components/prism-perl.min.js | 2 +- package-lock.json | 6 +++--- package.json | 2 +- tests/pattern-tests.js | 30 +++++++++++++++++++++++++----- 7 files changed, 34 insertions(+), 14 deletions(-) diff --git a/components/prism-asciidoc.js b/components/prism-asciidoc.js index 8f49ff15fd..486ca12fff 100644 --- a/components/prism-asciidoc.js +++ b/components/prism-asciidoc.js @@ -129,7 +129,7 @@ 'function': /^[a-z\d-]+(?=:)/, 'punctuation': /^::?/, 'attributes': { - pattern: /(?:\[(?:[^\]\\"]|(["'])(?:(?!\1)[^\\]|\\.)*\1|\\.)*\])/, + pattern: /(?:\[(?:[^\]\\"']|(["'])(?:(?!\1)[^\\]|\\.)*\1|\\.)*\])/, inside: attributes.inside } } @@ -149,7 +149,7 @@ Those do not have the restrictions of the constrained quotes. They are, in order: __emphasis__, **strong**, ++monospace++, +++passthrough+++, ##unquoted##, $$passthrough$$, ~subscript~, ^superscript^, {attribute-reference}, [[anchor]], [[[bibliography anchor]]], <>, (((indexes))) and ((indexes)) */ - pattern: /(^|[^\\])(?:(?:\B\[(?:[^\]\\"]|(["'])(?:(?!\2)[^\\]|\\.)*\2|\\.)*\])?(?:\b_(?!\s)(?: _|[^_\\\r\n]|\\.)+(?:(?:\r?\n|\r)(?: _|[^_\\\r\n]|\\.)+)*_\b|\B``(?!\s).+?(?:(?:\r?\n|\r).+?)*''\B|\B`(?!\s)(?:[^`'\s]|\s+\S)+['`]\B|\B(['*+#])(?!\s)(?: \3|(?!\3)[^\\\r\n]|\\.)+(?:(?:\r?\n|\r)(?: \3|(?!\3)[^\\\r\n]|\\.)+)*\3\B)|(?:\[(?:[^\]\\"]|(["'])(?:(?!\4)[^\\]|\\.)*\4|\\.)*\])?(?:(__|\*\*|\+\+\+?|##|\$\$|[~^]).+?(?:(?:\r?\n|\r).+?)*\5|\{[^}\r\n]+\}|\[\[\[?.+?(?:(?:\r?\n|\r).+?)*\]?\]\]|<<.+?(?:(?:\r?\n|\r).+?)*>>|\(\(\(?.+?(?:(?:\r?\n|\r).+?)*\)?\)\)))/m, + pattern: /(^|[^\\])(?:(?:\B\[(?:[^\]\\"']|(["'])(?:(?!\2)[^\\]|\\.)*\2|\\.)*\])?(?:\b_(?!\s)(?: _|[^_\\\r\n]|\\.)+(?:(?:\r?\n|\r)(?: _|[^_\\\r\n]|\\.)+)*_\b|\B``(?!\s).+?(?:(?:\r?\n|\r).+?)*''\B|\B`(?!\s)(?:[^`'\s]|\s+\S)+['`]\B|\B(['*+#])(?!\s)(?: \3|(?!\3)[^\\\r\n]|\\.)+(?:(?:\r?\n|\r)(?: \3|(?!\3)[^\\\r\n]|\\.)+)*\3\B)|(?:\[(?:[^\]\\"']|(["'])(?:(?!\4)[^\\]|\\.)*\4|\\.)*\])?(?:(__|\*\*|\+\+\+?|##|\$\$|[~^]).+?(?:(?:\r?\n|\r).+?)*\5|\{[^}\r\n]+\}|\[\[\[?.+?(?:(?:\r?\n|\r).+?)*\]?\]\]|<<.+?(?:(?:\r?\n|\r).+?)*>>|\(\(\(?.+?(?:(?:\r?\n|\r).+?)*\)?\)\)))/m, lookbehind: true, inside: { 'attributes': attributes, diff --git a/components/prism-asciidoc.min.js b/components/prism-asciidoc.min.js index 3867cc7ad8..9df76136b9 100644 --- a/components/prism-asciidoc.min.js +++ b/components/prism-asciidoc.min.js @@ -1 +1 @@ -!function(t){var n={pattern:/(^[ \t]*)\[(?!\[)(?:(["'$`])(?:(?!\2)[^\\]|\\.)*\2|\[(?:[^\[\]\\]|\\.)*\]|[^\[\]\\"'$`]|\\.)*\]/m,lookbehind:!0,inside:{quoted:{pattern:/([$`])(?:(?!\1)[^\\]|\\.)*\1/,inside:{punctuation:/^[$`]|[$`]$/}},interpreted:{pattern:/'(?:[^'\\]|\\.)*'/,inside:{punctuation:/^'|'$/}},string:/"(?:[^"\\]|\\.)*"/,variable:/\w+(?==)/,punctuation:/^\[|\]$|,/,operator:/=/,"attr-value":/(?!^\s+$).+/}},a=t.languages.asciidoc={"comment-block":{pattern:/^(\/{4,})(?:\r?\n|\r)(?:[\s\S]*(?:\r?\n|\r))??\1/m,alias:"comment"},table:{pattern:/^\|={3,}(?:(?:\r?\n|\r(?!\n)).*)*?(?:\r?\n|\r)\|={3,}$/m,inside:{specifiers:{pattern:/(?!\|)(?:(?:(?:\d+(?:\.\d+)?|\.\d+)[+*])?(?:[<^>](?:\.[<^>])?|\.[<^>])?[a-z]*)(?=\|)/,alias:"attr-value"},punctuation:{pattern:/(^|[^\\])[|!]=*/,lookbehind:!0}}},"passthrough-block":{pattern:/^(\+{4,})(?:\r?\n|\r)(?:[\s\S]*(?:\r?\n|\r))??\1$/m,inside:{punctuation:/^\++|\++$/}},"literal-block":{pattern:/^(-{4,}|\.{4,})(?:\r?\n|\r)(?:[\s\S]*(?:\r?\n|\r))??\1$/m,inside:{punctuation:/^(?:-+|\.+)|(?:-+|\.+)$/}},"other-block":{pattern:/^(--|\*{4,}|_{4,}|={4,})(?:\r?\n|\r)(?:[\s\S]*(?:\r?\n|\r))??\1$/m,inside:{punctuation:/^(?:-+|\*+|_+|=+)|(?:-+|\*+|_+|=+)$/}},"list-punctuation":{pattern:/(^[ \t]*)(?:-|\*{1,5}|\.{1,5}|(?:[a-z]|\d+)\.|[xvi]+\))(?= )/im,lookbehind:!0,alias:"punctuation"},"list-label":{pattern:/(^[ \t]*)[a-z\d].+(?::{2,4}|;;)(?=\s)/im,lookbehind:!0,alias:"symbol"},"indented-block":{pattern:/((\r?\n|\r)\2)([ \t]+)\S.*(?:(?:\r?\n|\r)\3.+)*(?=\2{2}|$)/,lookbehind:!0},comment:/^\/\/.*/m,title:{pattern:/^.+(?:\r?\n|\r)(?:={3,}|-{3,}|~{3,}|\^{3,}|\+{3,})$|^={1,5} .+|^\.(?![\s.]).*/m,alias:"important",inside:{punctuation:/^(?:\.|=+)|(?:=+|-+|~+|\^+|\++)$/}},"attribute-entry":{pattern:/^:[^:\r\n]+:(?: .*?(?: \+(?:\r?\n|\r).*?)*)?$/m,alias:"tag"},attributes:n,hr:{pattern:/^'{3,}$/m,alias:"punctuation"},"page-break":{pattern:/^<{3,}$/m,alias:"punctuation"},admonition:{pattern:/^(?:TIP|NOTE|IMPORTANT|WARNING|CAUTION):/m,alias:"keyword"},callout:[{pattern:/(^[ \t]*)/m,lookbehind:!0,alias:"symbol"},{pattern:/<\d+>/,alias:"symbol"}],macro:{pattern:/\b[a-z\d][a-z\d-]*::?(?:[^\s\[\]]*\[(?:[^\]\\"']|(["'])(?:(?!\1)[^\\]|\\.)*\1|\\.)*\])/,inside:{function:/^[a-z\d-]+(?=:)/,punctuation:/^::?/,attributes:{pattern:/(?:\[(?:[^\]\\"]|(["'])(?:(?!\1)[^\\]|\\.)*\1|\\.)*\])/,inside:n.inside}}},inline:{pattern:/(^|[^\\])(?:(?:\B\[(?:[^\]\\"]|(["'])(?:(?!\2)[^\\]|\\.)*\2|\\.)*\])?(?:\b_(?!\s)(?: _|[^_\\\r\n]|\\.)+(?:(?:\r?\n|\r)(?: _|[^_\\\r\n]|\\.)+)*_\b|\B``(?!\s).+?(?:(?:\r?\n|\r).+?)*''\B|\B`(?!\s)(?:[^`'\s]|\s+\S)+['`]\B|\B(['*+#])(?!\s)(?: \3|(?!\3)[^\\\r\n]|\\.)+(?:(?:\r?\n|\r)(?: \3|(?!\3)[^\\\r\n]|\\.)+)*\3\B)|(?:\[(?:[^\]\\"]|(["'])(?:(?!\4)[^\\]|\\.)*\4|\\.)*\])?(?:(__|\*\*|\+\+\+?|##|\$\$|[~^]).+?(?:(?:\r?\n|\r).+?)*\5|\{[^}\r\n]+\}|\[\[\[?.+?(?:(?:\r?\n|\r).+?)*\]?\]\]|<<.+?(?:(?:\r?\n|\r).+?)*>>|\(\(\(?.+?(?:(?:\r?\n|\r).+?)*\)?\)\)))/m,lookbehind:!0,inside:{attributes:n,url:{pattern:/^(?:\[\[\[?.+?\]?\]\]|<<.+?>>)$/,inside:{punctuation:/^(?:\[\[\[?|<<)|(?:\]\]\]?|>>)$/}},"attribute-ref":{pattern:/^\{.+\}$/,inside:{variable:{pattern:/(^\{)[a-z\d,+_-]+/,lookbehind:!0},operator:/^[=?!#%@$]|!(?=[:}])/,punctuation:/^\{|\}$|::?/}},italic:{pattern:/^(['_])[\s\S]+\1$/,inside:{punctuation:/^(?:''?|__?)|(?:''?|__?)$/}},bold:{pattern:/^\*[\s\S]+\*$/,inside:{punctuation:/^\*\*?|\*\*?$/}},punctuation:/^(?:``?|\+{1,3}|##?|\$\$|[~^]|\(\(\(?)|(?:''?|\+{1,3}|##?|\$\$|[~^`]|\)?\)\))$/}},replacement:{pattern:/\((?:C|TM|R)\)/,alias:"builtin"},entity:/&#?[\da-z]{1,8};/i,"line-continuation":{pattern:/(^| )\+$/m,lookbehind:!0,alias:"punctuation"}};function i(t){for(var n={},i=0,e=(t=t.split(" ")).length;i](?:\.[<^>])?|\.[<^>])?[a-z]*)(?=\|)/,alias:"attr-value"},punctuation:{pattern:/(^|[^\\])[|!]=*/,lookbehind:!0}}},"passthrough-block":{pattern:/^(\+{4,})(?:\r?\n|\r)(?:[\s\S]*(?:\r?\n|\r))??\1$/m,inside:{punctuation:/^\++|\++$/}},"literal-block":{pattern:/^(-{4,}|\.{4,})(?:\r?\n|\r)(?:[\s\S]*(?:\r?\n|\r))??\1$/m,inside:{punctuation:/^(?:-+|\.+)|(?:-+|\.+)$/}},"other-block":{pattern:/^(--|\*{4,}|_{4,}|={4,})(?:\r?\n|\r)(?:[\s\S]*(?:\r?\n|\r))??\1$/m,inside:{punctuation:/^(?:-+|\*+|_+|=+)|(?:-+|\*+|_+|=+)$/}},"list-punctuation":{pattern:/(^[ \t]*)(?:-|\*{1,5}|\.{1,5}|(?:[a-z]|\d+)\.|[xvi]+\))(?= )/im,lookbehind:!0,alias:"punctuation"},"list-label":{pattern:/(^[ \t]*)[a-z\d].+(?::{2,4}|;;)(?=\s)/im,lookbehind:!0,alias:"symbol"},"indented-block":{pattern:/((\r?\n|\r)\2)([ \t]+)\S.*(?:(?:\r?\n|\r)\3.+)*(?=\2{2}|$)/,lookbehind:!0},comment:/^\/\/.*/m,title:{pattern:/^.+(?:\r?\n|\r)(?:={3,}|-{3,}|~{3,}|\^{3,}|\+{3,})$|^={1,5} .+|^\.(?![\s.]).*/m,alias:"important",inside:{punctuation:/^(?:\.|=+)|(?:=+|-+|~+|\^+|\++)$/}},"attribute-entry":{pattern:/^:[^:\r\n]+:(?: .*?(?: \+(?:\r?\n|\r).*?)*)?$/m,alias:"tag"},attributes:n,hr:{pattern:/^'{3,}$/m,alias:"punctuation"},"page-break":{pattern:/^<{3,}$/m,alias:"punctuation"},admonition:{pattern:/^(?:TIP|NOTE|IMPORTANT|WARNING|CAUTION):/m,alias:"keyword"},callout:[{pattern:/(^[ \t]*)/m,lookbehind:!0,alias:"symbol"},{pattern:/<\d+>/,alias:"symbol"}],macro:{pattern:/\b[a-z\d][a-z\d-]*::?(?:[^\s\[\]]*\[(?:[^\]\\"']|(["'])(?:(?!\1)[^\\]|\\.)*\1|\\.)*\])/,inside:{function:/^[a-z\d-]+(?=:)/,punctuation:/^::?/,attributes:{pattern:/(?:\[(?:[^\]\\"']|(["'])(?:(?!\1)[^\\]|\\.)*\1|\\.)*\])/,inside:n.inside}}},inline:{pattern:/(^|[^\\])(?:(?:\B\[(?:[^\]\\"']|(["'])(?:(?!\2)[^\\]|\\.)*\2|\\.)*\])?(?:\b_(?!\s)(?: _|[^_\\\r\n]|\\.)+(?:(?:\r?\n|\r)(?: _|[^_\\\r\n]|\\.)+)*_\b|\B``(?!\s).+?(?:(?:\r?\n|\r).+?)*''\B|\B`(?!\s)(?:[^`'\s]|\s+\S)+['`]\B|\B(['*+#])(?!\s)(?: \3|(?!\3)[^\\\r\n]|\\.)+(?:(?:\r?\n|\r)(?: \3|(?!\3)[^\\\r\n]|\\.)+)*\3\B)|(?:\[(?:[^\]\\"']|(["'])(?:(?!\4)[^\\]|\\.)*\4|\\.)*\])?(?:(__|\*\*|\+\+\+?|##|\$\$|[~^]).+?(?:(?:\r?\n|\r).+?)*\5|\{[^}\r\n]+\}|\[\[\[?.+?(?:(?:\r?\n|\r).+?)*\]?\]\]|<<.+?(?:(?:\r?\n|\r).+?)*>>|\(\(\(?.+?(?:(?:\r?\n|\r).+?)*\)?\)\)))/m,lookbehind:!0,inside:{attributes:n,url:{pattern:/^(?:\[\[\[?.+?\]?\]\]|<<.+?>>)$/,inside:{punctuation:/^(?:\[\[\[?|<<)|(?:\]\]\]?|>>)$/}},"attribute-ref":{pattern:/^\{.+\}$/,inside:{variable:{pattern:/(^\{)[a-z\d,+_-]+/,lookbehind:!0},operator:/^[=?!#%@$]|!(?=[:}])/,punctuation:/^\{|\}$|::?/}},italic:{pattern:/^(['_])[\s\S]+\1$/,inside:{punctuation:/^(?:''?|__?)|(?:''?|__?)$/}},bold:{pattern:/^\*[\s\S]+\*$/,inside:{punctuation:/^\*\*?|\*\*?$/}},punctuation:/^(?:``?|\+{1,3}|##?|\$\$|[~^]|\(\(\(?)|(?:''?|\+{1,3}|##?|\$\$|[~^`]|\)?\)\))$/}},replacement:{pattern:/\((?:C|TM|R)\)/,alias:"builtin"},entity:/&#?[\da-z]{1,8};/i,"line-continuation":{pattern:/(^| )\+$/m,lookbehind:!0,alias:"punctuation"}};function i(t){for(var n={},i=0,e=(t=t.split(" ")).length;i\\]|\\[\s\S])*>/,greedy:!0},{pattern:/("|`)(?:(?!\1)[^\\]|\\[\s\S])*\1/,greedy:!0},{pattern:/'(?:[^'\\\r\n]|\\.)*'/,greedy:!0}],regex:[{pattern:/\b(?:m|qr)\s*([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1[msixpodualngc]*/,greedy:!0},{pattern:/\b(?:m|qr)\s+([a-zA-Z0-9])(?:(?!\1)[^\\]|\\[\s\S])*\1[msixpodualngc]*/,greedy:!0},{pattern:/\b(?:m|qr)\s*\((?:[^()\\]|\\[\s\S])*\)[msixpodualngc]*/,greedy:!0},{pattern:/\b(?:m|qr)\s*\{(?:[^{}\\]|\\[\s\S])*\}[msixpodualngc]*/,greedy:!0},{pattern:/\b(?:m|qr)\s*\[(?:[^[\]\\]|\\[\s\S])*\][msixpodualngc]*/,greedy:!0},{pattern:/\b(?:m|qr)\s*<(?:[^<>\\]|\\[\s\S])*>[msixpodualngc]*/,greedy:!0},{pattern:/(^|[^-]\b)(?:s|tr|y)\s*([^a-zA-Z0-9\s{(\[<])(?:(?!\2)[^\\]|\\[\s\S])*\2(?:(?!\2)[^\\]|\\[\s\S])*\2[msixpodualngcer]*/,lookbehind:!0,greedy:!0},{pattern:/(^|[^-]\b)(?:s|tr|y)\s+([a-zA-Z0-9])(?:(?!\2)[^\\]|\\[\s\S])*\2(?:(?!\2)[^\\]|\\[\s\S])*\2[msixpodualngcer]*/,lookbehind:!0,greedy:!0},{pattern:/(^|[^-]\b)(?:s|tr|y)\s*\((?:[^()\\]|\\[\s\S])*\)\s*\((?:[^()\\]|\\[\s\S])*\)[msixpodualngcer]*/,lookbehind:!0,greedy:!0},{pattern:/(^|[^-]\b)(?:s|tr|y)\s*\{(?:[^{}\\]|\\[\s\S])*\}\s*\{(?:[^{}\\]|\\[\s\S])*\}[msixpodualngcer]*/,lookbehind:!0,greedy:!0},{pattern:/(^|[^-]\b)(?:s|tr|y)\s*\[(?:[^[\]\\]|\\[\s\S])*\]\s*\[(?:[^[\]\\]|\\[\s\S])*\][msixpodualngcer]*/,lookbehind:!0,greedy:!0},{pattern:/(^|[^-]\b)(?:s|tr|y)\s*<(?:[^<>\\]|\\[\s\S])*>\s*<(?:[^<>\\]|\\[\s\S])*>[msixpodualngcer]*/,lookbehind:!0,greedy:!0},{pattern:/\/(?:[^\/\\\r\n]|\\.)*\/[msixpodualngc]*(?=\s*(?:$|[\r\n,.;})&|\-+*~<>!?^]|(?:lt|gt|le|ge|eq|ne|cmp|not|and|or|xor|x)\b))/,greedy:!0}],variable:[/[&*$@%]\{\^[A-Z]+\}/,/[&*$@%]\^[A-Z_]/,/[&*$@%]#?(?=\{)/,/[&*$@%]#?(?:(?:::)*'?(?!\d)[\w$]+)+(?:::)*/i,/[&*$@%]\d+/,/(?!%=)[$@%][!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~]/],filehandle:{pattern:/<(?![<=])\S*>|\b_\b/,alias:"symbol"},vstring:{pattern:/v\d+(?:\.\d+)*|\d+(?:\.\d+){2,}/,alias:"string"},function:{pattern:/sub [a-z0-9_]+/i,inside:{keyword:/sub/}},keyword:/\b(?:any|break|continue|default|delete|die|do|else|elsif|eval|for|foreach|given|goto|if|last|local|my|next|our|package|print|redo|require|return|say|state|sub|switch|undef|unless|until|use|when|while)\b/,number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)\b/,operator:/-[rwxoRWXOezsfdlpSbctugkTBMAC]\b|\+[+=]?|-[-=>]?|\*\*?=?|\/\/?=?|=[=~>]?|~[~=]?|\|\|?=?|&&?=?|<(?:=>?|<=?)?|>>?=?|![~=]?|[%^]=?|\.(?:=|\.\.?)?|[\\?]|\bx(?:=|\b)|\b(?:lt|gt|le|ge|eq|ne|cmp|not|and|or|xor)\b/,punctuation:/[{}[\];(),:]/}; \ No newline at end of file +Prism.languages.perl={comment:[{pattern:/(^\s*)=\w[\s\S]*?=cut.*/m,lookbehind:!0},{pattern:/(^|[^\\$])#.*/,lookbehind:!0}],string:[{pattern:/\b(?:q|qq|qx|qw)\s*([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1/,greedy:!0},{pattern:/\b(?:q|qq|qx|qw)\s+([a-zA-Z0-9])(?:(?!\1)[^\\]|\\[\s\S])*\1/,greedy:!0},{pattern:/\b(?:q|qq|qx|qw)\s*\((?:[^()\\]|\\[\s\S])*\)/,greedy:!0},{pattern:/\b(?:q|qq|qx|qw)\s*\{(?:[^{}\\]|\\[\s\S])*\}/,greedy:!0},{pattern:/\b(?:q|qq|qx|qw)\s*\[(?:[^[\]\\]|\\[\s\S])*\]/,greedy:!0},{pattern:/\b(?:q|qq|qx|qw)\s*<(?:[^<>\\]|\\[\s\S])*>/,greedy:!0},{pattern:/("|`)(?:(?!\1)[^\\]|\\[\s\S])*\1/,greedy:!0},{pattern:/'(?:[^'\\\r\n]|\\.)*'/,greedy:!0}],regex:[{pattern:/\b(?:m|qr)\s*([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1[msixpodualngc]*/,greedy:!0},{pattern:/\b(?:m|qr)\s+([a-zA-Z0-9])(?:(?!\1)[^\\]|\\[\s\S])*\1[msixpodualngc]*/,greedy:!0},{pattern:/\b(?:m|qr)\s*\((?:[^()\\]|\\[\s\S])*\)[msixpodualngc]*/,greedy:!0},{pattern:/\b(?:m|qr)\s*\{(?:[^{}\\]|\\[\s\S])*\}[msixpodualngc]*/,greedy:!0},{pattern:/\b(?:m|qr)\s*\[(?:[^[\]\\]|\\[\s\S])*\][msixpodualngc]*/,greedy:!0},{pattern:/\b(?:m|qr)\s*<(?:[^<>\\]|\\[\s\S])*>[msixpodualngc]*/,greedy:!0},{pattern:/(^|[^-]\b)(?:s|tr|y)\s*([^a-zA-Z0-9\s{(\[<])(?:(?!\2)[^\\]|\\[\s\S])*\2(?:(?!\2)[^\\]|\\[\s\S])*\2[msixpodualngcer]*/,lookbehind:!0,greedy:!0},{pattern:/(^|[^-]\b)(?:s|tr|y)\s+([a-zA-Z0-9])(?:(?!\2)[^\\]|\\[\s\S])*\2(?:(?!\2)[^\\]|\\[\s\S])*\2[msixpodualngcer]*/,lookbehind:!0,greedy:!0},{pattern:/(^|[^-]\b)(?:s|tr|y)\s*\((?:[^()\\]|\\[\s\S])*\)\s*\((?:[^()\\]|\\[\s\S])*\)[msixpodualngcer]*/,lookbehind:!0,greedy:!0},{pattern:/(^|[^-]\b)(?:s|tr|y)\s*\{(?:[^{}\\]|\\[\s\S])*\}\s*\{(?:[^{}\\]|\\[\s\S])*\}[msixpodualngcer]*/,lookbehind:!0,greedy:!0},{pattern:/(^|[^-]\b)(?:s|tr|y)\s*\[(?:[^[\]\\]|\\[\s\S])*\]\s*\[(?:[^[\]\\]|\\[\s\S])*\][msixpodualngcer]*/,lookbehind:!0,greedy:!0},{pattern:/(^|[^-]\b)(?:s|tr|y)\s*<(?:[^<>\\]|\\[\s\S])*>\s*<(?:[^<>\\]|\\[\s\S])*>[msixpodualngcer]*/,lookbehind:!0,greedy:!0},{pattern:/\/(?:[^\/\\\r\n]|\\.)*\/[msixpodualngc]*(?=\s*(?:$|[\r\n,.;})&|\-+*~<>!?^]|(?:lt|gt|le|ge|eq|ne|cmp|not|and|or|xor|x)\b))/,greedy:!0}],variable:[/[&*$@%]\{\^[A-Z]+\}/,/[&*$@%]\^[A-Z_]/,/[&*$@%]#?(?=\{)/,/[&*$@%]#?(?:(?:::)*'?(?!\d)[\w$]+(?![\w$]))+(?:::)*/i,/[&*$@%]\d+/,/(?!%=)[$@%][!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~]/],filehandle:{pattern:/<(?![<=])\S*>|\b_\b/,alias:"symbol"},vstring:{pattern:/v\d+(?:\.\d+)*|\d+(?:\.\d+){2,}/,alias:"string"},function:{pattern:/sub [a-z0-9_]+/i,inside:{keyword:/sub/}},keyword:/\b(?:any|break|continue|default|delete|die|do|else|elsif|eval|for|foreach|given|goto|if|last|local|my|next|our|package|print|redo|require|return|say|state|sub|switch|undef|unless|until|use|when|while)\b/,number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)\b/,operator:/-[rwxoRWXOezsfdlpSbctugkTBMAC]\b|\+[+=]?|-[-=>]?|\*\*?=?|\/\/?=?|=[=~>]?|~[~=]?|\|\|?=?|&&?=?|<(?:=>?|<=?)?|>>?=?|![~=]?|[%^]=?|\.(?:=|\.\.?)?|[\\?]|\bx(?:=|\b)|\b(?:lt|gt|le|ge|eq|ne|cmp|not|and|or|xor)\b/,punctuation:/[{}[\];(),:]/}; \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 9517cf7cbf..1a678c50f4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5368,9 +5368,9 @@ } }, "refa": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/refa/-/refa-0.5.0.tgz", - "integrity": "sha512-080Hrd8Z8v9Audgt1WpopjMM8ai1umraSzgMvLxgCEt+B9HhguhKBmQkjnE5+1p5WLtWQdr2rGE2c80gYvi9uQ==", + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/refa/-/refa-0.7.0.tgz", + "integrity": "sha512-1QvdsiF7+bHLTiSlsl9CVP3K2+SpiG1dzJGf757sETf8PDLcV+D+hzAT7Nux8Qh1/lF+eE3AZqupBaWeshDx0g==", "dev": true, "requires": { "regexpp": "^3.1.0" diff --git a/package.json b/package.json index 8ae1fbfd6d..a9fd2d37fa 100755 --- a/package.json +++ b/package.json @@ -50,7 +50,7 @@ "jsdom": "^13.0.0", "mocha": "^6.2.0", "pump": "^3.0.0", - "refa": "0.5.0", + "refa": "^0.7.0", "regexpp": "^2.0.1", "scslre": "^0.1.1", "simple-git": "^1.107.0", diff --git a/tests/pattern-tests.js b/tests/pattern-tests.js index d95be22da1..6d66273310 100644 --- a/tests/pattern-tests.js +++ b/tests/pattern-tests.js @@ -5,7 +5,7 @@ const PrismLoader = require('./helper/prism-loader'); const { BFS, parseRegex } = require('./helper/util'); const { languages } = require('../components.json'); const { visitRegExpAST } = require('regexpp'); -const { JS, Words, NFA } = require('refa'); +const { transform, combineTransformers, JS, Words, NFA, Transformers } = require('refa'); const scslre = require('scslre'); /** @@ -383,6 +383,22 @@ function testPatterns(Prism) { }); it('- should not cause exponential backtracking', function () { + /** @type {Transformers.CreationOptions} */ + const options = { + ignoreOrder: true, + ignoreAmbiguity: true + }; + const transformer = combineTransformers([ + Transformers.inline(options), + Transformers.removeDeadBranches(options), + Transformers.unionCharacters(options), + Transformers.moveUpEmpty(options), + Transformers.nestedQuantifiers(options), + Transformers.sortAssertions(options), + Transformers.removeUnnecessaryAssertions(options), + Transformers.applyAssertions(options), + ]); + forEachPattern(({ pattern, ast, tokenPath }) => { const patternStr = String(pattern); if (expoSafeRegexes.has(patternStr)) { @@ -398,11 +414,15 @@ function testPatterns(Prism) { * @returns {NFA} */ function toNFA(element) { - const { expression, maxCharacter } = parser.parseElement(element, { - backreferences: "resolve", - lookarounds: "disable", + let { expression, maxCharacter } = parser.parseElement(element, { + maxBackreferenceWords: 1000, + backreferences: "disable" }); - return NFA.fromRegex(expression, { maxCharacter }); + + // try to remove assertions + expression = transform(transformer, expression); + + return NFA.fromRegex(expression, { maxCharacter }, { assertions: "disable" }); } /** From bf4e7ba968938a893340f7ebd43fbb895f49610f Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Fri, 5 Mar 2021 16:44:13 +0100 Subject: [PATCH 0743/1100] Added support for ICU message format (#2745) --- components.js | 2 +- components.json | 4 + components/prism-icu-message-format.js | 148 +++++++ components/prism-icu-message-format.min.js | 1 + examples/prism-icu-message-format.html | 22 + plugins/show-language/prism-show-language.js | 1 + .../show-language/prism-show-language.min.js | 2 +- .../arg-skeleton_feature.test | 51 +++ .../choice-style_feature.test | 105 +++++ .../plural-style_feature.test | 375 ++++++++++++++++++ .../select-style_feature.test | 157 ++++++++ 11 files changed, 866 insertions(+), 2 deletions(-) create mode 100644 components/prism-icu-message-format.js create mode 100644 components/prism-icu-message-format.min.js create mode 100644 examples/prism-icu-message-format.html create mode 100644 tests/languages/icu-message-format/arg-skeleton_feature.test create mode 100644 tests/languages/icu-message-format/choice-style_feature.test create mode 100644 tests/languages/icu-message-format/plural-style_feature.test create mode 100644 tests/languages/icu-message-format/select-style_feature.test diff --git a/components.js b/components.js index 11813bdf3f..dcd35b94b7 100644 --- a/components.js +++ b/components.js @@ -1,2 +1,2 @@ -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml","ssml","atom","rss"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","ssml":"SSML","atom":"Atom","rss":"RSS"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","optional":"regex","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"ABNF","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"agda":{"title":"Agda","owner":"xy-ren"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apex":{"title":"Apex","require":["clike","sql"],"owner":"RunDevelopment"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"dkern"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"birb":{"title":"Birb","require":"clike","owner":"Calamity210"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"BNF","alias":"rbnf","aliasTitles":{"rbnf":"RBNF"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"bsl":{"title":"BSL (1C:Enterprise)","alias":"oscript","aliasTitles":{"oscript":"OneScript"},"owner":"Diversus23"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cfscript":{"title":"CFScript","require":"clike","alias":"cfc","owner":"mjclemente"},"chaiscript":{"title":"ChaiScript","require":["clike","cpp"],"owner":"RunDevelopment"},"cil":{"title":"CIL","owner":"sbrl"},"clojure":{"title":"Clojure","owner":"troglotit"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"cypher":{"title":"Cypher","owner":"RunDevelopment"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dataweave":{"title":"DataWeave","owner":"machaval"},"dax":{"title":"DAX","owner":"peterbud"},"dhall":{"title":"Dhall","owner":"RunDevelopment"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"dot":{"title":"DOT (Graphviz)","alias":"gv","optional":"markup","owner":"RunDevelopment"},"ebnf":{"title":"EBNF","owner":"RunDevelopment"},"editorconfig":{"title":"EditorConfig","owner":"osipxd"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"c","owner":"Golmote"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","optional":["markdown"],"owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"hlsl":{"title":"HLSL","require":"c","owner":"RunDevelopment"},"http":{"title":"HTTP","optional":["css","javascript","json","markup","uri"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"idris":{"title":"Idris","alias":"idr","owner":"KeenS","require":"haskell"},"ignore":{"title":".ignore","owner":"osipxd","alias":["gitignore","hgignore","npmignore"],"aliasTitles":{"gitignore":".gitignore","hgignore":".hgignore","npmignore":".npmignore"}},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike","typescript"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","alias":"webmanifest","aliasTitles":{"webmanifest":"Web App Manifest"},"owner":"CupOfTea696"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"jsstacktrace":{"title":"JS stack trace","owner":"sbrl"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","alias":["kt","kts"],"aliasTitles":{"kts":"Kotlin Script"},"require":"clike","owner":"Golmote"},"kumir":{"title":"KuMir (КуМир)","alias":"kum","owner":"edukisto"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","optional":"yaml","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"mongodb":{"title":"MongoDB","owner":"airs0urce","require":"javascript"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"naniscript":{"title":"Naninovel Script","owner":"Elringus","alias":"nani"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"psl":{"title":"PATROL Scripting Language","owner":"bertysentry"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":"markup-templating","owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"promql":{"title":"PromQL","owner":"arendjr"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"purebasic":{"title":"PureBasic","require":"clike","alias":"pbfasm","owner":"HeX0R101"},"purescript":{"title":"PureScript","require":"haskell","alias":"purs","owner":"sriharshachilakapati"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"racket":{"title":"Racket","require":"scheme","alias":"rkt","owner":"RunDevelopment"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","owner":"RunDevelopment"},"renpy":{"title":"Ren'py","alias":"rpy","owner":"HyuchiaDiego"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","alias":["sh-session","shellsession"],"owner":"RunDevelopment"},"smali":{"title":"Smali","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sml":{"title":"SML","alias":"smlnj","aliasTitles":{"smlnj":"SML/NJ"},"owner":"RunDevelopment"},"solidity":{"title":"Solidity (Ethereum)","alias":"sol","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"squirrel":{"title":"Squirrel","require":"clike","owner":"RunDevelopment"},"stan":{"title":"Stan","owner":"RunDevelopment"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","vbnet"],"owner":"RunDevelopment"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"typoscript":{"title":"TypoScript","alias":"tsconfig","aliasTitles":{"tsconfig":"TSConfig"},"owner":"dkern"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"uri":{"title":"URI","alias":"url","aliasTitles":{"url":"URL"},"owner":"RunDevelopment"},"v":{"title":"V","require":"clike","owner":"taggon"},"vala":{"title":"Vala","require":"clike","optional":"regex","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":["vb","vba"],"aliasTitles":{"vba":"VBA"},"owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xml-doc":{"title":"XML doc (.net)","require":"markup","modify":["csharp","fsharp","vbnet"],"owner":"RunDevelopment"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"yang":{"title":"YANG","owner":"RunDevelopment"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml","ssml","atom","rss"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","ssml":"SSML","atom":"Atom","rss":"RSS"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","optional":"regex","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"ABNF","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"agda":{"title":"Agda","owner":"xy-ren"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apex":{"title":"Apex","require":["clike","sql"],"owner":"RunDevelopment"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"dkern"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"birb":{"title":"Birb","require":"clike","owner":"Calamity210"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"BNF","alias":"rbnf","aliasTitles":{"rbnf":"RBNF"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"bsl":{"title":"BSL (1C:Enterprise)","alias":"oscript","aliasTitles":{"oscript":"OneScript"},"owner":"Diversus23"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cfscript":{"title":"CFScript","require":"clike","alias":"cfc","owner":"mjclemente"},"chaiscript":{"title":"ChaiScript","require":["clike","cpp"],"owner":"RunDevelopment"},"cil":{"title":"CIL","owner":"sbrl"},"clojure":{"title":"Clojure","owner":"troglotit"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"cypher":{"title":"Cypher","owner":"RunDevelopment"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dataweave":{"title":"DataWeave","owner":"machaval"},"dax":{"title":"DAX","owner":"peterbud"},"dhall":{"title":"Dhall","owner":"RunDevelopment"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"dot":{"title":"DOT (Graphviz)","alias":"gv","optional":"markup","owner":"RunDevelopment"},"ebnf":{"title":"EBNF","owner":"RunDevelopment"},"editorconfig":{"title":"EditorConfig","owner":"osipxd"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"c","owner":"Golmote"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","optional":["markdown"],"owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"hlsl":{"title":"HLSL","require":"c","owner":"RunDevelopment"},"http":{"title":"HTTP","optional":["css","javascript","json","markup","uri"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"icu-message-format":{"title":"ICU Message Format","owner":"RunDevelopment"},"idris":{"title":"Idris","alias":"idr","owner":"KeenS","require":"haskell"},"ignore":{"title":".ignore","owner":"osipxd","alias":["gitignore","hgignore","npmignore"],"aliasTitles":{"gitignore":".gitignore","hgignore":".hgignore","npmignore":".npmignore"}},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike","typescript"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","alias":"webmanifest","aliasTitles":{"webmanifest":"Web App Manifest"},"owner":"CupOfTea696"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"jsstacktrace":{"title":"JS stack trace","owner":"sbrl"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","alias":["kt","kts"],"aliasTitles":{"kts":"Kotlin Script"},"require":"clike","owner":"Golmote"},"kumir":{"title":"KuMir (КуМир)","alias":"kum","owner":"edukisto"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","optional":"yaml","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"mongodb":{"title":"MongoDB","owner":"airs0urce","require":"javascript"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"naniscript":{"title":"Naninovel Script","owner":"Elringus","alias":"nani"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"psl":{"title":"PATROL Scripting Language","owner":"bertysentry"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":"markup-templating","owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"promql":{"title":"PromQL","owner":"arendjr"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"purebasic":{"title":"PureBasic","require":"clike","alias":"pbfasm","owner":"HeX0R101"},"purescript":{"title":"PureScript","require":"haskell","alias":"purs","owner":"sriharshachilakapati"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"racket":{"title":"Racket","require":"scheme","alias":"rkt","owner":"RunDevelopment"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","owner":"RunDevelopment"},"renpy":{"title":"Ren'py","alias":"rpy","owner":"HyuchiaDiego"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","alias":["sh-session","shellsession"],"owner":"RunDevelopment"},"smali":{"title":"Smali","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sml":{"title":"SML","alias":"smlnj","aliasTitles":{"smlnj":"SML/NJ"},"owner":"RunDevelopment"},"solidity":{"title":"Solidity (Ethereum)","alias":"sol","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"squirrel":{"title":"Squirrel","require":"clike","owner":"RunDevelopment"},"stan":{"title":"Stan","owner":"RunDevelopment"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","vbnet"],"owner":"RunDevelopment"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"typoscript":{"title":"TypoScript","alias":"tsconfig","aliasTitles":{"tsconfig":"TSConfig"},"owner":"dkern"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"uri":{"title":"URI","alias":"url","aliasTitles":{"url":"URL"},"owner":"RunDevelopment"},"v":{"title":"V","require":"clike","owner":"taggon"},"vala":{"title":"Vala","require":"clike","optional":"regex","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":["vb","vba"],"aliasTitles":{"vba":"VBA"},"owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xml-doc":{"title":"XML doc (.net)","require":"markup","modify":["csharp","fsharp","vbnet"],"owner":"RunDevelopment"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"yang":{"title":"YANG","owner":"RunDevelopment"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; if (typeof module !== 'undefined' && module.exports) { module.exports = components; } \ No newline at end of file diff --git a/components.json b/components.json index 191f43d0a1..7eb2c72de1 100644 --- a/components.json +++ b/components.json @@ -528,6 +528,10 @@ "title": "Icon", "owner": "Golmote" }, + "icu-message-format": { + "title": "ICU Message Format", + "owner": "RunDevelopment" + }, "idris": { "title": "Idris", "alias": "idr", diff --git a/components/prism-icu-message-format.js b/components/prism-icu-message-format.js new file mode 100644 index 0000000000..c5dfeb8aa6 --- /dev/null +++ b/components/prism-icu-message-format.js @@ -0,0 +1,148 @@ +// https://unicode-org.github.io/icu/userguide/format_parse/messages/ +// https://unicode-org.github.io/icu-docs/apidoc/released/icu4j/com/ibm/icu/text/MessageFormat.html + +(function (Prism) { + + /** + * @param {string} source + * @param {number} level + * @returns {string} + */ + function nested(source, level) { + if (level <= 0) { + return /[]/.source; + } else { + return source.replace(//g, function () { return nested(source, level - 1) }); + } + } + + var stringPattern = /'[{}:=,](?:[^']|'')*'(?!')/; + + var escape = { + pattern: /''/, + greedy: true, + alias: 'operator' + }; + var string = { + pattern: stringPattern, + greedy: true, + inside: { + 'escape': escape + } + }; + + var argumentSource = nested( + /\{(?:[^{}']|'(?![{},'])|''||)*\}/.source + .replace(//g, function () { return stringPattern.source; }), + 8 + ); + + var nestedMessage = { + pattern: RegExp(argumentSource), + inside: { + 'message': { + pattern: /^(\{)[\s\S]+(?=\}$)/, + lookbehind: true, + inside: null // see below + }, + 'message-delimiter': { + pattern: /./, + alias: 'punctuation' + } + } + }; + + Prism.languages['icu-message-format'] = { + 'argument': { + pattern: RegExp(argumentSource), + greedy: true, + inside: { + 'content': { + pattern: /^(\{)[\s\S]+(?=\}$)/, + lookbehind: true, + inside: { + 'argument-name': { + pattern: /^(\s*)[^{}:=,\s]+/, + lookbehind: true + }, + 'choice-style': { + // https://unicode-org.github.io/icu-docs/apidoc/released/icu4c/classicu_1_1ChoiceFormat.html#details + pattern: /^(\s*,\s*choice\s*,\s*)\S(?:[\s\S]*\S)?/, + lookbehind: true, + inside: { + 'punctuation': /\|/, + 'range': { + pattern: /^(\s*)[+-]?(?:\d+(?:\.\d*)?|\u221e)\s*[<#\u2264]/, + lookbehind: true, + inside: { + 'operator': /[<#\u2264]/, + 'number': /\S+/ + } + }, + rest: null // see below + } + }, + 'plural-style': { + // https://unicode-org.github.io/icu-docs/apidoc/released/icu4j/com/ibm/icu/text/PluralFormat.html#:~:text=Patterns%20and%20Their%20Interpretation + pattern: /^(\s*,\s*(?:plural|selectordinal)\s*,\s*)\S(?:[\s\S]*\S)?/, + lookbehind: true, + inside: { + 'offset': /^offset:\s*\d+/, + 'nested-message': nestedMessage, + 'selector': { + pattern: /=\d+|[^{}:=,\s]+/, + inside: { + 'keyword': /^(?:zero|one|two|few|many|other)$/ + } + } + } + }, + 'select-style': { + // https://unicode-org.github.io/icu-docs/apidoc/released/icu4j/com/ibm/icu/text/SelectFormat.html#:~:text=Patterns%20and%20Their%20Interpretation + pattern: /^(\s*,\s*select\s*,\s*)\S(?:[\s\S]*\S)?/, + lookbehind: true, + inside: { + 'nested-message': nestedMessage, + 'selector': { + pattern: /[^{}:=,\s]+/, + inside: { + 'keyword': /^other$/ + } + } + } + }, + 'keyword': /\b(?:choice|plural|select|selectordinal)\b/, + 'arg-type': { + pattern: /\b(?:number|date|time|spellout|ordinal|duration)\b/, + alias: 'keyword' + }, + 'arg-skeleton': { + pattern: /(,\s*)::[^{}:=,\s]+/, + lookbehind: true + }, + 'arg-style': { + pattern: /(,\s*)(?:short|medium|long|full|integer|currency|percent)(?=\s*$)/, + lookbehind: true + }, + 'arg-style-text': { + pattern: RegExp(/(^\s*,\s*(?=\S))/.source + nested(/(?:[^{}']|'[^']*'|\{(?:)?\})+/.source, 8) + '$'), + lookbehind: true, + alias: 'string' + }, + 'punctuation': /,/ + } + }, + 'argument-delimiter': { + pattern: /./, + alias: 'operator' + } + } + }, + 'escape': escape, + 'string': string + }; + + nestedMessage.inside.message.inside = Prism.languages['icu-message-format']; + Prism.languages['icu-message-format'].argument.inside.content.inside['choice-style'].inside.rest = Prism.languages['icu-message-format']; + +}(Prism)); diff --git a/components/prism-icu-message-format.min.js b/components/prism-icu-message-format.min.js new file mode 100644 index 0000000000..a00d626e34 --- /dev/null +++ b/components/prism-icu-message-format.min.js @@ -0,0 +1 @@ +!function(e){function s(e,t){return t<=0?"[]":e.replace(//g,function(){return s(e,t-1)})}var t=/'[{}:=,](?:[^']|'')*'(?!')/,n={pattern:/''/,greedy:!0,alias:"operator"},r={pattern:t,greedy:!0,inside:{escape:n}},a=s("\\{(?:[^{}']|'(?![{},'])|''||)*\\}".replace(//g,function(){return t.source}),8),i={pattern:RegExp(a),inside:{message:{pattern:/^(\{)[\s\S]+(?=\}$)/,lookbehind:!0,inside:null},"message-delimiter":{pattern:/./,alias:"punctuation"}}};e.languages["icu-message-format"]={argument:{pattern:RegExp(a),greedy:!0,inside:{content:{pattern:/^(\{)[\s\S]+(?=\}$)/,lookbehind:!0,inside:{"argument-name":{pattern:/^(\s*)[^{}:=,\s]+/,lookbehind:!0},"choice-style":{pattern:/^(\s*,\s*choice\s*,\s*)\S(?:[\s\S]*\S)?/,lookbehind:!0,inside:{punctuation:/\|/,range:{pattern:/^(\s*)[+-]?(?:\d+(?:\.\d*)?|\u221e)\s*[<#\u2264]/,lookbehind:!0,inside:{operator:/[<#\u2264]/,number:/\S+/}},rest:null}},"plural-style":{pattern:/^(\s*,\s*(?:plural|selectordinal)\s*,\s*)\S(?:[\s\S]*\S)?/,lookbehind:!0,inside:{offset:/^offset:\s*\d+/,"nested-message":i,selector:{pattern:/=\d+|[^{}:=,\s]+/,inside:{keyword:/^(?:zero|one|two|few|many|other)$/}}}},"select-style":{pattern:/^(\s*,\s*select\s*,\s*)\S(?:[\s\S]*\S)?/,lookbehind:!0,inside:{"nested-message":i,selector:{pattern:/[^{}:=,\s]+/,inside:{keyword:/^other$/}}}},keyword:/\b(?:choice|plural|select|selectordinal)\b/,"arg-type":{pattern:/\b(?:number|date|time|spellout|ordinal|duration)\b/,alias:"keyword"},"arg-skeleton":{pattern:/(,\s*)::[^{}:=,\s]+/,lookbehind:!0},"arg-style":{pattern:/(,\s*)(?:short|medium|long|full|integer|currency|percent)(?=\s*$)/,lookbehind:!0},"arg-style-text":{pattern:RegExp("(^\\s*,\\s*(?=\\S))"+s("(?:[^{}']|'[^']*'|\\{(?:)?\\})+",8)+"$"),lookbehind:!0,alias:"string"},punctuation:/,/}},"argument-delimiter":{pattern:/./,alias:"operator"}}},escape:n,string:r},i.inside.message.inside=e.languages["icu-message-format"],e.languages["icu-message-format"].argument.inside.content.inside["choice-style"].inside.rest=e.languages["icu-message-format"]}(Prism); \ No newline at end of file diff --git a/examples/prism-icu-message-format.html b/examples/prism-icu-message-format.html new file mode 100644 index 0000000000..691aa47e21 --- /dev/null +++ b/examples/prism-icu-message-format.html @@ -0,0 +1,22 @@ +

        Full example

        +
        https://unicode-org.github.io/icu/userguide/format_parse/messages/
        +
        +{gender_of_host, select,
        +  female {
        +    {num_guests, plural, offset:1
        +      =0 {{host} does not give a party.}
        +      =1 {{host} invites {guest} to her party.}
        +      =2 {{host} invites {guest} and one other person to her party.}
        +      other {{host} invites {guest} and # other people to her party.}}}
        +  male {
        +    {num_guests, plural, offset:1
        +      =0 {{host} does not give a party.}
        +      =1 {{host} invites {guest} to his party.}
        +      =2 {{host} invites {guest} and one other person to his party.}
        +      other {{host} invites {guest} and # other people to his party.}}}
        +  other {
        +    {num_guests, plural, offset:1
        +      =0 {{host} does not give a party.}
        +      =1 {{host} invites {guest} to their party.}
        +      =2 {{host} invites {guest} and one other person to their party.}
        +      other {{host} invites {guest} and # other people to their party.}}}}
        diff --git a/plugins/show-language/prism-show-language.js b/plugins/show-language/prism-show-language.js index 5864e056da..30fa3b9afc 100644 --- a/plugins/show-language/prism-show-language.js +++ b/plugins/show-language/prism-show-language.js @@ -89,6 +89,7 @@ "hpkp": "HTTP Public-Key-Pins", "hsts": "HTTP Strict-Transport-Security", "ichigojam": "IchigoJam", + "icu-message-format": "ICU Message Format", "idr": "Idris", "ignore": ".ignore", "gitignore": ".gitignore", diff --git a/plugins/show-language/prism-show-language.min.js b/plugins/show-language/prism-show-language.min.js index 5bee0c08da..052b40a821 100644 --- a/plugins/show-language/prism-show-language.min.js +++ b/plugins/show-language/prism-show-language.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof self&&self.Prism&&self.document)if(Prism.plugins.toolbar){var r={none:"Plain text",html:"HTML",xml:"XML",svg:"SVG",mathml:"MathML",ssml:"SSML",rss:"RSS",css:"CSS",clike:"C-like",js:"JavaScript",abap:"ABAP",abnf:"ABNF",al:"AL",antlr4:"ANTLR4",g4:"ANTLR4",apacheconf:"Apache Configuration",apl:"APL",aql:"AQL",arff:"ARFF",asciidoc:"AsciiDoc",adoc:"AsciiDoc",aspnet:"ASP.NET (C#)",asm6502:"6502 Assembly",autohotkey:"AutoHotkey",autoit:"AutoIt",basic:"BASIC",bbcode:"BBcode",bnf:"BNF",rbnf:"RBNF",bsl:"BSL (1C:Enterprise)",oscript:"OneScript",csharp:"C#",cs:"C#",dotnet:"C#",cpp:"C++",cfscript:"CFScript",cfc:"CFScript",cil:"CIL",cmake:"CMake",coffee:"CoffeeScript",conc:"Concurnas",csp:"Content-Security-Policy","css-extras":"CSS Extras",dataweave:"DataWeave",dax:"DAX",django:"Django/Jinja2",jinja2:"Django/Jinja2","dns-zone-file":"DNS zone file","dns-zone":"DNS zone file",dockerfile:"Docker",dot:"DOT (Graphviz)",gv:"DOT (Graphviz)",ebnf:"EBNF",editorconfig:"EditorConfig",ejs:"EJS",etlua:"Embedded Lua templating",erb:"ERB","excel-formula":"Excel Formula",xlsx:"Excel Formula",xls:"Excel Formula",fsharp:"F#","firestore-security-rules":"Firestore security rules",ftl:"FreeMarker Template Language",gml:"GameMaker Language",gamemakerlanguage:"GameMaker Language",gcode:"G-code",gdscript:"GDScript",gedcom:"GEDCOM",glsl:"GLSL",graphql:"GraphQL",hs:"Haskell",hcl:"HCL",hlsl:"HLSL",http:"HTTP",hpkp:"HTTP Public-Key-Pins",hsts:"HTTP Strict-Transport-Security",ichigojam:"IchigoJam",idr:"Idris",ignore:".ignore",gitignore:".gitignore",hgignore:".hgignore",npmignore:".npmignore",inform7:"Inform 7",javadoc:"JavaDoc",javadoclike:"JavaDoc-like",javastacktrace:"Java stack trace",jq:"JQ",jsdoc:"JSDoc","js-extras":"JS Extras",json:"JSON",webmanifest:"Web App Manifest",json5:"JSON5",jsonp:"JSONP",jsstacktrace:"JS stack trace","js-templates":"JS Templates",kts:"Kotlin Script",kt:"Kotlin",kumir:"KuMir (КуМир)",kum:"KuMir (КуМир)",latex:"LaTeX",tex:"TeX",context:"ConTeXt",lilypond:"LilyPond",ly:"LilyPond",emacs:"Lisp",elisp:"Lisp","emacs-lisp":"Lisp",llvm:"LLVM IR",lolcode:"LOLCODE",md:"Markdown","markup-templating":"Markup templating",matlab:"MATLAB",mel:"MEL",mongodb:"MongoDB",moon:"MoonScript",n1ql:"N1QL",n4js:"N4JS",n4jsd:"N4JS","nand2tetris-hdl":"Nand To Tetris HDL",naniscript:"Naninovel Script",nani:"Naninovel Script",nasm:"NASM",neon:"NEON",nginx:"nginx",nsis:"NSIS",objectivec:"Objective-C",objc:"Objective-C",ocaml:"OCaml",opencl:"OpenCL",parigp:"PARI/GP",objectpascal:"Object Pascal",psl:"PATROL Scripting Language",pcaxis:"PC-Axis",px:"PC-Axis",peoplecode:"PeopleCode",pcode:"PeopleCode",php:"PHP",phpdoc:"PHPDoc","php-extras":"PHP Extras",plsql:"PL/SQL",powerquery:"PowerQuery",pq:"PowerQuery",mscript:"PowerQuery",powershell:"PowerShell",promql:"PromQL",properties:".properties",protobuf:"Protocol Buffers",purebasic:"PureBasic",pbfasm:"PureBasic",purs:"PureScript",py:"Python",q:"Q (kdb+ database)",qml:"QML",rkt:"Racket",jsx:"React JSX",tsx:"React TSX",renpy:"Ren'py",rpy:"Ren'py",rest:"reST (reStructuredText)",robotframework:"Robot Framework",robot:"Robot Framework",rb:"Ruby",sas:"SAS",sass:"Sass (Sass)",scss:"Sass (Scss)","shell-session":"Shell session","sh-session":"Shell session",shellsession:"Shell session",sml:"SML",smlnj:"SML/NJ",solidity:"Solidity (Ethereum)",sol:"Solidity (Ethereum)","solution-file":"Solution file",sln:"Solution file",soy:"Soy (Closure Template)",sparql:"SPARQL",rq:"SPARQL","splunk-spl":"Splunk SPL",sqf:"SQF: Status Quo Function (Arma 3)",sql:"SQL",iecst:"Structured Text (IEC 61131-3)","t4-templating":"T4 templating","t4-cs":"T4 Text Templates (C#)",t4:"T4 Text Templates (C#)","t4-vb":"T4 Text Templates (VB)",tap:"TAP",tt2:"Template Toolkit 2",toml:"TOML",trig:"TriG",ts:"TypeScript",tsconfig:"TSConfig",uscript:"UnrealScript",uc:"UnrealScript",uri:"URI",url:"URL",vbnet:"VB.Net",vhdl:"VHDL",vim:"vim","visual-basic":"Visual Basic",vba:"VBA",vb:"Visual Basic",wasm:"WebAssembly",wiki:"Wiki markup",xeoracube:"XeoraCube","xml-doc":"XML doc (.net)",xojo:"Xojo (REALbasic)",xquery:"XQuery",yaml:"YAML",yml:"YAML",yang:"YANG"};Prism.plugins.toolbar.registerButton("show-language",function(e){var a=e.element.parentNode;if(a&&/pre/i.test(a.nodeName)){var t,s=a.getAttribute("data-language")||r[e.language]||((t=e.language)?(t.substring(0,1).toUpperCase()+t.substring(1)).replace(/s(?=cript)/,"S"):t);if(s){var o=document.createElement("span");return o.textContent=s,o}}})}else console.warn("Show Languages plugin loaded before Toolbar plugin.")}(); \ No newline at end of file +!function(){if("undefined"!=typeof self&&self.Prism&&self.document)if(Prism.plugins.toolbar){var r={none:"Plain text",html:"HTML",xml:"XML",svg:"SVG",mathml:"MathML",ssml:"SSML",rss:"RSS",css:"CSS",clike:"C-like",js:"JavaScript",abap:"ABAP",abnf:"ABNF",al:"AL",antlr4:"ANTLR4",g4:"ANTLR4",apacheconf:"Apache Configuration",apl:"APL",aql:"AQL",arff:"ARFF",asciidoc:"AsciiDoc",adoc:"AsciiDoc",aspnet:"ASP.NET (C#)",asm6502:"6502 Assembly",autohotkey:"AutoHotkey",autoit:"AutoIt",basic:"BASIC",bbcode:"BBcode",bnf:"BNF",rbnf:"RBNF",bsl:"BSL (1C:Enterprise)",oscript:"OneScript",csharp:"C#",cs:"C#",dotnet:"C#",cpp:"C++",cfscript:"CFScript",cfc:"CFScript",cil:"CIL",cmake:"CMake",coffee:"CoffeeScript",conc:"Concurnas",csp:"Content-Security-Policy","css-extras":"CSS Extras",dataweave:"DataWeave",dax:"DAX",django:"Django/Jinja2",jinja2:"Django/Jinja2","dns-zone-file":"DNS zone file","dns-zone":"DNS zone file",dockerfile:"Docker",dot:"DOT (Graphviz)",gv:"DOT (Graphviz)",ebnf:"EBNF",editorconfig:"EditorConfig",ejs:"EJS",etlua:"Embedded Lua templating",erb:"ERB","excel-formula":"Excel Formula",xlsx:"Excel Formula",xls:"Excel Formula",fsharp:"F#","firestore-security-rules":"Firestore security rules",ftl:"FreeMarker Template Language",gml:"GameMaker Language",gamemakerlanguage:"GameMaker Language",gcode:"G-code",gdscript:"GDScript",gedcom:"GEDCOM",glsl:"GLSL",graphql:"GraphQL",hs:"Haskell",hcl:"HCL",hlsl:"HLSL",http:"HTTP",hpkp:"HTTP Public-Key-Pins",hsts:"HTTP Strict-Transport-Security",ichigojam:"IchigoJam","icu-message-format":"ICU Message Format",idr:"Idris",ignore:".ignore",gitignore:".gitignore",hgignore:".hgignore",npmignore:".npmignore",inform7:"Inform 7",javadoc:"JavaDoc",javadoclike:"JavaDoc-like",javastacktrace:"Java stack trace",jq:"JQ",jsdoc:"JSDoc","js-extras":"JS Extras",json:"JSON",webmanifest:"Web App Manifest",json5:"JSON5",jsonp:"JSONP",jsstacktrace:"JS stack trace","js-templates":"JS Templates",kts:"Kotlin Script",kt:"Kotlin",kumir:"KuMir (КуМир)",kum:"KuMir (КуМир)",latex:"LaTeX",tex:"TeX",context:"ConTeXt",lilypond:"LilyPond",ly:"LilyPond",emacs:"Lisp",elisp:"Lisp","emacs-lisp":"Lisp",llvm:"LLVM IR",lolcode:"LOLCODE",md:"Markdown","markup-templating":"Markup templating",matlab:"MATLAB",mel:"MEL",mongodb:"MongoDB",moon:"MoonScript",n1ql:"N1QL",n4js:"N4JS",n4jsd:"N4JS","nand2tetris-hdl":"Nand To Tetris HDL",naniscript:"Naninovel Script",nani:"Naninovel Script",nasm:"NASM",neon:"NEON",nginx:"nginx",nsis:"NSIS",objectivec:"Objective-C",objc:"Objective-C",ocaml:"OCaml",opencl:"OpenCL",parigp:"PARI/GP",objectpascal:"Object Pascal",psl:"PATROL Scripting Language",pcaxis:"PC-Axis",px:"PC-Axis",peoplecode:"PeopleCode",pcode:"PeopleCode",php:"PHP",phpdoc:"PHPDoc","php-extras":"PHP Extras",plsql:"PL/SQL",powerquery:"PowerQuery",pq:"PowerQuery",mscript:"PowerQuery",powershell:"PowerShell",promql:"PromQL",properties:".properties",protobuf:"Protocol Buffers",purebasic:"PureBasic",pbfasm:"PureBasic",purs:"PureScript",py:"Python",q:"Q (kdb+ database)",qml:"QML",rkt:"Racket",jsx:"React JSX",tsx:"React TSX",renpy:"Ren'py",rpy:"Ren'py",rest:"reST (reStructuredText)",robotframework:"Robot Framework",robot:"Robot Framework",rb:"Ruby",sas:"SAS",sass:"Sass (Sass)",scss:"Sass (Scss)","shell-session":"Shell session","sh-session":"Shell session",shellsession:"Shell session",sml:"SML",smlnj:"SML/NJ",solidity:"Solidity (Ethereum)",sol:"Solidity (Ethereum)","solution-file":"Solution file",sln:"Solution file",soy:"Soy (Closure Template)",sparql:"SPARQL",rq:"SPARQL","splunk-spl":"Splunk SPL",sqf:"SQF: Status Quo Function (Arma 3)",sql:"SQL",iecst:"Structured Text (IEC 61131-3)","t4-templating":"T4 templating","t4-cs":"T4 Text Templates (C#)",t4:"T4 Text Templates (C#)","t4-vb":"T4 Text Templates (VB)",tap:"TAP",tt2:"Template Toolkit 2",toml:"TOML",trig:"TriG",ts:"TypeScript",tsconfig:"TSConfig",uscript:"UnrealScript",uc:"UnrealScript",uri:"URI",url:"URL",vbnet:"VB.Net",vhdl:"VHDL",vim:"vim","visual-basic":"Visual Basic",vba:"VBA",vb:"Visual Basic",wasm:"WebAssembly",wiki:"Wiki markup",xeoracube:"XeoraCube","xml-doc":"XML doc (.net)",xojo:"Xojo (REALbasic)",xquery:"XQuery",yaml:"YAML",yml:"YAML",yang:"YANG"};Prism.plugins.toolbar.registerButton("show-language",function(e){var a=e.element.parentNode;if(a&&/pre/i.test(a.nodeName)){var s,t=a.getAttribute("data-language")||r[e.language]||((s=e.language)?(s.substring(0,1).toUpperCase()+s.substring(1)).replace(/s(?=cript)/,"S"):s);if(t){var o=document.createElement("span");return o.textContent=t,o}}})}else console.warn("Show Languages plugin loaded before Toolbar plugin.")}(); \ No newline at end of file diff --git a/tests/languages/icu-message-format/arg-skeleton_feature.test b/tests/languages/icu-message-format/arg-skeleton_feature.test new file mode 100644 index 0000000000..c198ea362b --- /dev/null +++ b/tests/languages/icu-message-format/arg-skeleton_feature.test @@ -0,0 +1,51 @@ +At {1,time,::jmm} on {1,date,::dMMMM}, there was {2} on planet {3,number,integer}. + +---------------------------------------------------- + +[ + "At ", + ["argument", [ + ["argument-delimiter", "{"], + ["content", [ + ["argument-name", "1"], + ["punctuation", ","], + ["arg-type", "time"], + ["punctuation", ","], + ["arg-skeleton", "::jmm"] + ]], + ["argument-delimiter", "}"] + ]], + " on ", + ["argument", [ + ["argument-delimiter", "{"], + ["content", [ + ["argument-name", "1"], + ["punctuation", ","], + ["arg-type", "date"], + ["punctuation", ","], + ["arg-skeleton", "::dMMMM"] + ]], + ["argument-delimiter", "}"] + ]], + ", there was ", + ["argument", [ + ["argument-delimiter", "{"], + ["content", [ + ["argument-name", "2"] + ]], + ["argument-delimiter", "}"] + ]], + " on planet ", + ["argument", [ + ["argument-delimiter", "{"], + ["content", [ + ["argument-name", "3"], + ["punctuation", ","], + ["arg-type", "number"], + ["punctuation", ","], + ["arg-style", "integer"] + ]], + ["argument-delimiter", "}"] + ]], + "." +] \ No newline at end of file diff --git a/tests/languages/icu-message-format/choice-style_feature.test b/tests/languages/icu-message-format/choice-style_feature.test new file mode 100644 index 0000000000..0778367cb4 --- /dev/null +++ b/tests/languages/icu-message-format/choice-style_feature.test @@ -0,0 +1,105 @@ +The disk {1} contains {0,choice,0#no files|1#one file|1<{0,number,integer} files} + +{3, choice, -1#is negative| 0#is zero or fraction | 1#is one |1.0 Date: Fri, 5 Mar 2021 23:16:57 +0100 Subject: [PATCH 0744/1100] Website: Improved basic usage section (#2777) --- index.html | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/index.html b/index.html index 46a4269f4d..b70dce5d5a 100644 --- a/index.html +++ b/index.html @@ -144,10 +144,6 @@

        Basic usage

        Prism does its best to encourage good authoring practices. Therefore, it only works with <code> elements, since marking up code without a <code> element is semantically invalid. According to the HTML5 spec, the recommended way to define a code language is a language-xxxx class, which is what Prism uses. Alternatively, Prism also supports a shorter version: lang-xxxx.

        -

        To make things easier however, Prism assumes that this language definition is inherited. Therefore, if multiple <code> elements have the same language, you can add the language-xxxx class on one of their common ancestors. - This way, you can also define a document-wide default language, by adding a language-xxxx class on the <body> or <html> element.

        - -

        If you want to opt-out of highlighting for a <code> element that is a descendant of an element with a declared code language, you can add the class language-none to it (or any non-existing language, really).

        The recommended way to mark up a code block (both for semantics and for Prism) is a <pre> element with a <code> element inside, like so:

        @@ -156,7 +152,18 @@

        Basic usage

        If you use that pattern, the <pre> will automatically get the language-xxxx class (if it doesn’t already have it) and will be styled as a code block.

        -

        Note: You have to escape all < and & characters inside <code> elements with &lt; and &amp; respectively, or else the browser might interpret them as an HTML tag or entity. If you have large portions of HTML code, you can use the Unescaped Markup plugin to work around this.

        +

        Inline code snippets are done like this:

        + +
        <code class="language-css">p { color: red }</code>
        + +

        Note: You have to escape all < and & characters inside <code> elements (code blocks and inline snippets) with &lt; and &amp; respectively, or else the browser might interpret them as an HTML tag or entity. If you have large portions of HTML code, you can use the Unescaped Markup plugin to work around this.

        + +

        Language inheritance

        + +

        To make things easier however, Prism assumes that the language class is inherited. Therefore, if multiple <code> elements have the same language, you can add the language-xxxx class on one of their common ancestors. + This way, you can also define a document-wide default language, by adding a language-xxxx class on the <body> or <html> element.

        + +

        If you want to opt-out of highlighting a <code> element that inherits its language, you can add the language-none class to it. The none language can also be inherited to disable highlighting for the element with the class and all of its descendants.

        Manual highlighting

        From 970674cf4200049b028e16c30122cb4504c89598 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Fri, 5 Mar 2021 23:23:17 +0100 Subject: [PATCH 0745/1100] Added support for plaintext (#2738) --- components/prism-core.js | 11 +++++++++++ components/prism-core.min.js | 2 +- docs/Prism.hooks.html | 6 +++--- docs/Prism.html | 12 ++++++------ docs/Prism.languages.html | 6 +++--- docs/Token.html | 8 ++++---- docs/global.html | 10 +++++----- docs/prism-core.js.html | 11 +++++++++++ gulpfile.js/index.js | 6 +++++- index.html | 2 ++ plugins/show-language/prism-show-language.js | 4 ++++ plugins/show-language/prism-show-language.min.js | 2 +- prism.js | 11 +++++++++++ 13 files changed, 67 insertions(+), 24 deletions(-) diff --git a/components/prism-core.js b/components/prism-core.js index acc60d6fa6..d7367099da 100644 --- a/components/prism-core.js +++ b/components/prism-core.js @@ -22,6 +22,9 @@ var Prism = (function (_self){ var lang = /\blang(?:uage)?-([\w-]+)\b/i; var uniqueId = 0; +// The grammar object for plaintext +var plainTextGrammar = {}; + var _ = { /** @@ -255,6 +258,14 @@ var _ = { * @public */ languages: { + /** + * The grammar for plain, unformatted text. + */ + plain: plainTextGrammar, + plaintext: plainTextGrammar, + text: plainTextGrammar, + txt: plainTextGrammar, + /** * Creates a deep copy of the language with the given id and appends the given tokens. * diff --git a/components/prism-core.min.js b/components/prism-core.min.js index 38bfc4e4b1..1723237c3c 100644 --- a/components/prism-core.min.js +++ b/components/prism-core.min.js @@ -1 +1 @@ -var _self="undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{},Prism=function(u){var c=/\blang(?:uage)?-([\w-]+)\b/i,n=0,M={manual:u.Prism&&u.Prism.manual,disableWorkerMessageHandler:u.Prism&&u.Prism.disableWorkerMessageHandler,util:{encode:function e(n){return n instanceof W?new W(n.type,e(n.content),n.alias):Array.isArray(n)?n.map(e):n.replace(/&/g,"&").replace(/=l.reach);y+=m.value.length,m=m.next){var k=m.value;if(r.length>n.length)return;if(!(k instanceof W)){var b,x=1;if(h){if(!(b=z(p,y,n,f)))break;var w=b.index,A=b.index+b[0].length,P=y;for(P+=m.value.length;P<=w;)m=m.next,P+=m.value.length;if(P-=m.value.length,y=P,m.value instanceof W)continue;for(var S=m;S!==r.tail&&(Pl.reach&&(l.reach=N);var j=m.prev;O&&(j=I(r,j,O),y+=O.length),q(r,j,x);var C=new W(o,g?M.tokenize(E,g):E,d,E);if(m=I(r,j,C),L&&I(r,m,L),1l.reach&&(l.reach=_.reach)}}}}}}(e,a,n,a.head,0),function(e){var n=[],r=e.head.next;for(;r!==e.tail;)n.push(r.value),r=r.next;return n}(a)},hooks:{all:{},add:function(e,n){var r=M.hooks.all;r[e]=r[e]||[],r[e].push(n)},run:function(e,n){var r=M.hooks.all[e];if(r&&r.length)for(var t,a=0;t=r[a++];)t(n)}},Token:W};function W(e,n,r,t){this.type=e,this.content=n,this.alias=r,this.length=0|(t||"").length}function z(e,n,r,t){e.lastIndex=n;var a=e.exec(r);if(a&&t&&a[1]){var i=a[1].length;a.index+=i,a[0]=a[0].slice(i)}return a}function i(){var e={value:null,prev:null,next:null},n={value:null,prev:e,next:null};e.next=n,this.head=e,this.tail=n,this.length=0}function I(e,n,r){var t=n.next,a={value:r,prev:n,next:t};return n.next=a,t.prev=a,e.length++,a}function q(e,n,r){for(var t=n.next,a=0;a"+a.content+""},!u.document)return u.addEventListener&&(M.disableWorkerMessageHandler||u.addEventListener("message",function(e){var n=JSON.parse(e.data),r=n.language,t=n.code,a=n.immediateClose;u.postMessage(M.highlight(t,M.languages[r],r)),a&&u.close()},!1)),M;var e=M.util.currentScript();function r(){M.manual||M.highlightAll()}if(e&&(M.filename=e.src,e.hasAttribute("data-manual")&&(M.manual=!0)),!M.manual){var t=document.readyState;"loading"===t||"interactive"===t&&e&&e.defer?document.addEventListener("DOMContentLoaded",r):window.requestAnimationFrame?window.requestAnimationFrame(r):window.setTimeout(r,16)}return M}(_self);"undefined"!=typeof module&&module.exports&&(module.exports=Prism),"undefined"!=typeof global&&(global.Prism=Prism); \ No newline at end of file +var _self="undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{},Prism=function(u){var c=/\blang(?:uage)?-([\w-]+)\b/i,n=0,e={},M={manual:u.Prism&&u.Prism.manual,disableWorkerMessageHandler:u.Prism&&u.Prism.disableWorkerMessageHandler,util:{encode:function e(n){return n instanceof W?new W(n.type,e(n.content),n.alias):Array.isArray(n)?n.map(e):n.replace(/&/g,"&").replace(/=l.reach);y+=m.value.length,m=m.next){var k=m.value;if(t.length>n.length)return;if(!(k instanceof W)){var b,x=1;if(h){if(!(b=z(p,y,n,f)))break;var w=b.index,A=b.index+b[0].length,P=y;for(P+=m.value.length;P<=w;)m=m.next,P+=m.value.length;if(P-=m.value.length,y=P,m.value instanceof W)continue;for(var S=m;S!==t.tail&&(Pl.reach&&(l.reach=N);var j=m.prev;O&&(j=I(t,j,O),y+=O.length),q(t,j,x);var C=new W(o,g?M.tokenize(E,g):E,d,E);if(m=I(t,j,C),L&&I(t,m,L),1l.reach&&(l.reach=_.reach)}}}}}}(e,a,n,a.head,0),function(e){var n=[],t=e.head.next;for(;t!==e.tail;)n.push(t.value),t=t.next;return n}(a)},hooks:{all:{},add:function(e,n){var t=M.hooks.all;t[e]=t[e]||[],t[e].push(n)},run:function(e,n){var t=M.hooks.all[e];if(t&&t.length)for(var r,a=0;r=t[a++];)r(n)}},Token:W};function W(e,n,t,r){this.type=e,this.content=n,this.alias=t,this.length=0|(r||"").length}function z(e,n,t,r){e.lastIndex=n;var a=e.exec(t);if(a&&r&&a[1]){var i=a[1].length;a.index+=i,a[0]=a[0].slice(i)}return a}function i(){var e={value:null,prev:null,next:null},n={value:null,prev:e,next:null};e.next=n,this.head=e,this.tail=n,this.length=0}function I(e,n,t){var r=n.next,a={value:t,prev:n,next:r};return n.next=a,r.prev=a,e.length++,a}function q(e,n,t){for(var r=n.next,a=0;a"+a.content+""},!u.document)return u.addEventListener&&(M.disableWorkerMessageHandler||u.addEventListener("message",function(e){var n=JSON.parse(e.data),t=n.language,r=n.code,a=n.immediateClose;u.postMessage(M.highlight(r,M.languages[t],t)),a&&u.close()},!1)),M;var t=M.util.currentScript();function r(){M.manual||M.highlightAll()}if(t&&(M.filename=t.src,t.hasAttribute("data-manual")&&(M.manual=!0)),!M.manual){var a=document.readyState;"loading"===a||"interactive"===a&&t&&t.defer?document.addEventListener("DOMContentLoaded",r):window.requestAnimationFrame?window.requestAnimationFrame(r):window.setTimeout(r,16)}return M}(_self);"undefined"!=typeof module&&module.exports&&(module.exports=Prism),"undefined"!=typeof global&&(global.Prism=Prism); \ No newline at end of file diff --git a/docs/Prism.hooks.html b/docs/Prism.hooks.html index 28f00aad29..31e525f469 100644 --- a/docs/Prism.hooks.html +++ b/docs/Prism.hooks.html @@ -73,7 +73,7 @@

        Source:
        @@ -152,7 +152,7 @@

        (static) addSource:
        @@ -314,7 +314,7 @@

        (static) runSource:
        diff --git a/docs/Prism.html b/docs/Prism.html index c1a9a500e8..b61e07f6a1 100644 --- a/docs/Prism.html +++ b/docs/Prism.html @@ -166,7 +166,7 @@

        (static) manua
        Source:
        @@ -263,7 +263,7 @@

        (static) hi
        Source:
        @@ -480,7 +480,7 @@

        (static) Source:
        @@ -676,7 +676,7 @@

        (static) <
        Source:
        @@ -911,7 +911,7 @@

        (static) Source:
        @@ -1157,7 +1157,7 @@

        (static) tok
        Source:
        diff --git a/docs/Prism.languages.html b/docs/Prism.languages.html index 2145781194..34d849cbc9 100644 --- a/docs/Prism.languages.html +++ b/docs/Prism.languages.html @@ -73,7 +73,7 @@

        Source:
        @@ -154,7 +154,7 @@

        (static) exten
        Source:
        @@ -354,7 +354,7 @@

        (static) Source:
        diff --git a/docs/Token.html b/docs/Token.html index 44e767db0c..8bd43e28d3 100644 --- a/docs/Token.html +++ b/docs/Token.html @@ -80,7 +80,7 @@

        new TokenSource:
        @@ -364,7 +364,7 @@

        aliasSource:
        @@ -447,7 +447,7 @@

        contentSource:
        @@ -524,7 +524,7 @@

        typeSource:
        diff --git a/docs/global.html b/docs/global.html index c71bc32473..689a70efe4 100644 --- a/docs/global.html +++ b/docs/global.html @@ -143,7 +143,7 @@

        Grammar

        Source:
        @@ -274,7 +274,7 @@

        GrammarToken

        Source:
        @@ -559,7 +559,7 @@

        High
        Source:
        @@ -713,7 +713,7 @@

        HookCallb
        Source:
        @@ -859,7 +859,7 @@

        TokenStream

        Source:
        diff --git a/docs/prism-core.js.html b/docs/prism-core.js.html index f17df7f3dc..9dbb4c0548 100644 --- a/docs/prism-core.js.html +++ b/docs/prism-core.js.html @@ -75,6 +75,9 @@

        prism-core.js

        var lang = /\blang(?:uage)?-([\w-]+)\b/i; var uniqueId = 0; +// The grammar object for plaintext +var plainTextGrammar = {}; + var _ = { /** @@ -308,6 +311,14 @@

        prism-core.js

        * @public */ languages: { + /** + * The grammar for plain, unformatted text. + */ + plain: plainTextGrammar, + plaintext: plainTextGrammar, + text: plainTextGrammar, + txt: plainTextGrammar, + /** * Creates a deep copy of the language with the given id and appends the given tokens. * diff --git a/gulpfile.js/index.js b/gulpfile.js/index.js index db351b96d9..f2412c6f5e 100644 --- a/gulpfile.js/index.js +++ b/gulpfile.js/index.js @@ -162,7 +162,11 @@ async function languagePlugins() { /** @type {Record} */ const nonNullLanguageMap = { - 'none': 'Plain text' + 'none': 'Plain text', + 'plain': 'Plain text', + 'plaintext': 'Plain text', + 'text': 'Plain text', + 'txt': 'Plain text' }; for (const id in languagesMap) { const title = languagesMap[id]; diff --git a/index.html b/index.html index b70dce5d5a..607847e4a4 100644 --- a/index.html +++ b/index.html @@ -165,6 +165,8 @@

        Language inheritance

        If you want to opt-out of highlighting a <code> element that inherits its language, you can add the language-none class to it. The none language can also be inherited to disable highlighting for the element with the class and all of its descendants.

        +

        If you want to opt-out of highlighting but still use plugins like Show Invisibles, add use language-plain class instead.

        +

        Manual highlighting

        If you want to prevent any elements from being automatically highlighted and instead use the API, you can set Prism.manual to true before the DOMContentLoaded event is fired. By setting the data-manual attribute on the <script> element containing Prism core, this will be done automatically. diff --git a/plugins/show-language/prism-show-language.js b/plugins/show-language/prism-show-language.js index 30fa3b9afc..18b39810fa 100644 --- a/plugins/show-language/prism-show-language.js +++ b/plugins/show-language/prism-show-language.js @@ -13,6 +13,10 @@ // The languages map is built automatically with gulp var Languages = /*languages_placeholder[*/{ "none": "Plain text", + "plain": "Plain text", + "plaintext": "Plain text", + "text": "Plain text", + "txt": "Plain text", "html": "HTML", "xml": "XML", "svg": "SVG", diff --git a/plugins/show-language/prism-show-language.min.js b/plugins/show-language/prism-show-language.min.js index 052b40a821..22db936717 100644 --- a/plugins/show-language/prism-show-language.min.js +++ b/plugins/show-language/prism-show-language.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof self&&self.Prism&&self.document)if(Prism.plugins.toolbar){var r={none:"Plain text",html:"HTML",xml:"XML",svg:"SVG",mathml:"MathML",ssml:"SSML",rss:"RSS",css:"CSS",clike:"C-like",js:"JavaScript",abap:"ABAP",abnf:"ABNF",al:"AL",antlr4:"ANTLR4",g4:"ANTLR4",apacheconf:"Apache Configuration",apl:"APL",aql:"AQL",arff:"ARFF",asciidoc:"AsciiDoc",adoc:"AsciiDoc",aspnet:"ASP.NET (C#)",asm6502:"6502 Assembly",autohotkey:"AutoHotkey",autoit:"AutoIt",basic:"BASIC",bbcode:"BBcode",bnf:"BNF",rbnf:"RBNF",bsl:"BSL (1C:Enterprise)",oscript:"OneScript",csharp:"C#",cs:"C#",dotnet:"C#",cpp:"C++",cfscript:"CFScript",cfc:"CFScript",cil:"CIL",cmake:"CMake",coffee:"CoffeeScript",conc:"Concurnas",csp:"Content-Security-Policy","css-extras":"CSS Extras",dataweave:"DataWeave",dax:"DAX",django:"Django/Jinja2",jinja2:"Django/Jinja2","dns-zone-file":"DNS zone file","dns-zone":"DNS zone file",dockerfile:"Docker",dot:"DOT (Graphviz)",gv:"DOT (Graphviz)",ebnf:"EBNF",editorconfig:"EditorConfig",ejs:"EJS",etlua:"Embedded Lua templating",erb:"ERB","excel-formula":"Excel Formula",xlsx:"Excel Formula",xls:"Excel Formula",fsharp:"F#","firestore-security-rules":"Firestore security rules",ftl:"FreeMarker Template Language",gml:"GameMaker Language",gamemakerlanguage:"GameMaker Language",gcode:"G-code",gdscript:"GDScript",gedcom:"GEDCOM",glsl:"GLSL",graphql:"GraphQL",hs:"Haskell",hcl:"HCL",hlsl:"HLSL",http:"HTTP",hpkp:"HTTP Public-Key-Pins",hsts:"HTTP Strict-Transport-Security",ichigojam:"IchigoJam","icu-message-format":"ICU Message Format",idr:"Idris",ignore:".ignore",gitignore:".gitignore",hgignore:".hgignore",npmignore:".npmignore",inform7:"Inform 7",javadoc:"JavaDoc",javadoclike:"JavaDoc-like",javastacktrace:"Java stack trace",jq:"JQ",jsdoc:"JSDoc","js-extras":"JS Extras",json:"JSON",webmanifest:"Web App Manifest",json5:"JSON5",jsonp:"JSONP",jsstacktrace:"JS stack trace","js-templates":"JS Templates",kts:"Kotlin Script",kt:"Kotlin",kumir:"KuMir (КуМир)",kum:"KuMir (КуМир)",latex:"LaTeX",tex:"TeX",context:"ConTeXt",lilypond:"LilyPond",ly:"LilyPond",emacs:"Lisp",elisp:"Lisp","emacs-lisp":"Lisp",llvm:"LLVM IR",lolcode:"LOLCODE",md:"Markdown","markup-templating":"Markup templating",matlab:"MATLAB",mel:"MEL",mongodb:"MongoDB",moon:"MoonScript",n1ql:"N1QL",n4js:"N4JS",n4jsd:"N4JS","nand2tetris-hdl":"Nand To Tetris HDL",naniscript:"Naninovel Script",nani:"Naninovel Script",nasm:"NASM",neon:"NEON",nginx:"nginx",nsis:"NSIS",objectivec:"Objective-C",objc:"Objective-C",ocaml:"OCaml",opencl:"OpenCL",parigp:"PARI/GP",objectpascal:"Object Pascal",psl:"PATROL Scripting Language",pcaxis:"PC-Axis",px:"PC-Axis",peoplecode:"PeopleCode",pcode:"PeopleCode",php:"PHP",phpdoc:"PHPDoc","php-extras":"PHP Extras",plsql:"PL/SQL",powerquery:"PowerQuery",pq:"PowerQuery",mscript:"PowerQuery",powershell:"PowerShell",promql:"PromQL",properties:".properties",protobuf:"Protocol Buffers",purebasic:"PureBasic",pbfasm:"PureBasic",purs:"PureScript",py:"Python",q:"Q (kdb+ database)",qml:"QML",rkt:"Racket",jsx:"React JSX",tsx:"React TSX",renpy:"Ren'py",rpy:"Ren'py",rest:"reST (reStructuredText)",robotframework:"Robot Framework",robot:"Robot Framework",rb:"Ruby",sas:"SAS",sass:"Sass (Sass)",scss:"Sass (Scss)","shell-session":"Shell session","sh-session":"Shell session",shellsession:"Shell session",sml:"SML",smlnj:"SML/NJ",solidity:"Solidity (Ethereum)",sol:"Solidity (Ethereum)","solution-file":"Solution file",sln:"Solution file",soy:"Soy (Closure Template)",sparql:"SPARQL",rq:"SPARQL","splunk-spl":"Splunk SPL",sqf:"SQF: Status Quo Function (Arma 3)",sql:"SQL",iecst:"Structured Text (IEC 61131-3)","t4-templating":"T4 templating","t4-cs":"T4 Text Templates (C#)",t4:"T4 Text Templates (C#)","t4-vb":"T4 Text Templates (VB)",tap:"TAP",tt2:"Template Toolkit 2",toml:"TOML",trig:"TriG",ts:"TypeScript",tsconfig:"TSConfig",uscript:"UnrealScript",uc:"UnrealScript",uri:"URI",url:"URL",vbnet:"VB.Net",vhdl:"VHDL",vim:"vim","visual-basic":"Visual Basic",vba:"VBA",vb:"Visual Basic",wasm:"WebAssembly",wiki:"Wiki markup",xeoracube:"XeoraCube","xml-doc":"XML doc (.net)",xojo:"Xojo (REALbasic)",xquery:"XQuery",yaml:"YAML",yml:"YAML",yang:"YANG"};Prism.plugins.toolbar.registerButton("show-language",function(e){var a=e.element.parentNode;if(a&&/pre/i.test(a.nodeName)){var s,t=a.getAttribute("data-language")||r[e.language]||((s=e.language)?(s.substring(0,1).toUpperCase()+s.substring(1)).replace(/s(?=cript)/,"S"):s);if(t){var o=document.createElement("span");return o.textContent=t,o}}})}else console.warn("Show Languages plugin loaded before Toolbar plugin.")}(); \ No newline at end of file +!function(){if("undefined"!=typeof self&&self.Prism&&self.document)if(Prism.plugins.toolbar){var i={none:"Plain text",plain:"Plain text",plaintext:"Plain text",text:"Plain text",txt:"Plain text",html:"HTML",xml:"XML",svg:"SVG",mathml:"MathML",ssml:"SSML",rss:"RSS",css:"CSS",clike:"C-like",js:"JavaScript",abap:"ABAP",abnf:"ABNF",al:"AL",antlr4:"ANTLR4",g4:"ANTLR4",apacheconf:"Apache Configuration",apl:"APL",aql:"AQL",arff:"ARFF",asciidoc:"AsciiDoc",adoc:"AsciiDoc",aspnet:"ASP.NET (C#)",asm6502:"6502 Assembly",autohotkey:"AutoHotkey",autoit:"AutoIt",basic:"BASIC",bbcode:"BBcode",bnf:"BNF",rbnf:"RBNF",bsl:"BSL (1C:Enterprise)",oscript:"OneScript",csharp:"C#",cs:"C#",dotnet:"C#",cpp:"C++",cfscript:"CFScript",cfc:"CFScript",cil:"CIL",cmake:"CMake",coffee:"CoffeeScript",conc:"Concurnas",csp:"Content-Security-Policy","css-extras":"CSS Extras",dataweave:"DataWeave",dax:"DAX",django:"Django/Jinja2",jinja2:"Django/Jinja2","dns-zone-file":"DNS zone file","dns-zone":"DNS zone file",dockerfile:"Docker",dot:"DOT (Graphviz)",gv:"DOT (Graphviz)",ebnf:"EBNF",editorconfig:"EditorConfig",ejs:"EJS",etlua:"Embedded Lua templating",erb:"ERB","excel-formula":"Excel Formula",xlsx:"Excel Formula",xls:"Excel Formula",fsharp:"F#","firestore-security-rules":"Firestore security rules",ftl:"FreeMarker Template Language",gml:"GameMaker Language",gamemakerlanguage:"GameMaker Language",gcode:"G-code",gdscript:"GDScript",gedcom:"GEDCOM",glsl:"GLSL",graphql:"GraphQL",hs:"Haskell",hcl:"HCL",hlsl:"HLSL",http:"HTTP",hpkp:"HTTP Public-Key-Pins",hsts:"HTTP Strict-Transport-Security",ichigojam:"IchigoJam","icu-message-format":"ICU Message Format",idr:"Idris",ignore:".ignore",gitignore:".gitignore",hgignore:".hgignore",npmignore:".npmignore",inform7:"Inform 7",javadoc:"JavaDoc",javadoclike:"JavaDoc-like",javastacktrace:"Java stack trace",jq:"JQ",jsdoc:"JSDoc","js-extras":"JS Extras",json:"JSON",webmanifest:"Web App Manifest",json5:"JSON5",jsonp:"JSONP",jsstacktrace:"JS stack trace","js-templates":"JS Templates",kts:"Kotlin Script",kt:"Kotlin",kumir:"KuMir (КуМир)",kum:"KuMir (КуМир)",latex:"LaTeX",tex:"TeX",context:"ConTeXt",lilypond:"LilyPond",ly:"LilyPond",emacs:"Lisp",elisp:"Lisp","emacs-lisp":"Lisp",llvm:"LLVM IR",lolcode:"LOLCODE",md:"Markdown","markup-templating":"Markup templating",matlab:"MATLAB",mel:"MEL",mongodb:"MongoDB",moon:"MoonScript",n1ql:"N1QL",n4js:"N4JS",n4jsd:"N4JS","nand2tetris-hdl":"Nand To Tetris HDL",naniscript:"Naninovel Script",nani:"Naninovel Script",nasm:"NASM",neon:"NEON",nginx:"nginx",nsis:"NSIS",objectivec:"Objective-C",objc:"Objective-C",ocaml:"OCaml",opencl:"OpenCL",parigp:"PARI/GP",objectpascal:"Object Pascal",psl:"PATROL Scripting Language",pcaxis:"PC-Axis",px:"PC-Axis",peoplecode:"PeopleCode",pcode:"PeopleCode",php:"PHP",phpdoc:"PHPDoc","php-extras":"PHP Extras",plsql:"PL/SQL",powerquery:"PowerQuery",pq:"PowerQuery",mscript:"PowerQuery",powershell:"PowerShell",promql:"PromQL",properties:".properties",protobuf:"Protocol Buffers",purebasic:"PureBasic",pbfasm:"PureBasic",purs:"PureScript",py:"Python",q:"Q (kdb+ database)",qml:"QML",rkt:"Racket",jsx:"React JSX",tsx:"React TSX",renpy:"Ren'py",rpy:"Ren'py",rest:"reST (reStructuredText)",robotframework:"Robot Framework",robot:"Robot Framework",rb:"Ruby",sas:"SAS",sass:"Sass (Sass)",scss:"Sass (Scss)","shell-session":"Shell session","sh-session":"Shell session",shellsession:"Shell session",sml:"SML",smlnj:"SML/NJ",solidity:"Solidity (Ethereum)",sol:"Solidity (Ethereum)","solution-file":"Solution file",sln:"Solution file",soy:"Soy (Closure Template)",sparql:"SPARQL",rq:"SPARQL","splunk-spl":"Splunk SPL",sqf:"SQF: Status Quo Function (Arma 3)",sql:"SQL",iecst:"Structured Text (IEC 61131-3)","t4-templating":"T4 templating","t4-cs":"T4 Text Templates (C#)",t4:"T4 Text Templates (C#)","t4-vb":"T4 Text Templates (VB)",tap:"TAP",tt2:"Template Toolkit 2",toml:"TOML",trig:"TriG",ts:"TypeScript",tsconfig:"TSConfig",uscript:"UnrealScript",uc:"UnrealScript",uri:"URI",url:"URL",vbnet:"VB.Net",vhdl:"VHDL",vim:"vim","visual-basic":"Visual Basic",vba:"VBA",vb:"Visual Basic",wasm:"WebAssembly",wiki:"Wiki markup",xeoracube:"XeoraCube","xml-doc":"XML doc (.net)",xojo:"Xojo (REALbasic)",xquery:"XQuery",yaml:"YAML",yml:"YAML",yang:"YANG"};Prism.plugins.toolbar.registerButton("show-language",function(e){var t=e.element.parentNode;if(t&&/pre/i.test(t.nodeName)){var a,s=t.getAttribute("data-language")||i[e.language]||((a=e.language)?(a.substring(0,1).toUpperCase()+a.substring(1)).replace(/s(?=cript)/,"S"):a);if(s){var o=document.createElement("span");return o.textContent=s,o}}})}else console.warn("Show Languages plugin loaded before Toolbar plugin.")}(); \ No newline at end of file diff --git a/prism.js b/prism.js index cf200fb420..d4d1597246 100644 --- a/prism.js +++ b/prism.js @@ -27,6 +27,9 @@ var Prism = (function (_self){ var lang = /\blang(?:uage)?-([\w-]+)\b/i; var uniqueId = 0; +// The grammar object for plaintext +var plainTextGrammar = {}; + var _ = { /** @@ -260,6 +263,14 @@ var _ = { * @public */ languages: { + /** + * The grammar for plain, unformatted text. + */ + plain: plainTextGrammar, + plaintext: plainTextGrammar, + text: plainTextGrammar, + txt: plainTextGrammar, + /** * Creates a deep copy of the language with the given id and appends the given tokens. * From 8dbbbb35d6fb90ce8ebdd2c884077a53e72597f0 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Fri, 5 Mar 2021 23:38:23 +0100 Subject: [PATCH 0746/1100] Markup: Added support for DOM event attributes (#2702) --- components/prism-css.js | 29 +------ components/prism-css.min.js | 2 +- components/prism-javascript.js | 7 ++ components/prism-javascript.min.js | 2 +- components/prism-jsx.js | 2 +- components/prism-jsx.min.js | 2 +- components/prism-markup.js | 44 ++++++++++ components/prism-markup.min.js | 2 +- prism.js | 80 ++++++++++++------- .../languages/markup!+css/css_inclusion.test | 20 ++--- .../javascript_inclusion.test | 43 ++++++++++ .../markup+css+wiki/table-tag_feature.test | 16 ++-- .../languages/php!+css-extras/issue2008.test | 4 +- 13 files changed, 168 insertions(+), 85 deletions(-) diff --git a/components/prism-css.js b/components/prism-css.js index 0206098d38..4286d80b38 100644 --- a/components/prism-css.js +++ b/components/prism-css.js @@ -49,34 +49,7 @@ var markup = Prism.languages.markup; if (markup) { markup.tag.addInlined('style', 'css'); - - Prism.languages.insertBefore('inside', 'attr-value', { - 'style-attr': { - pattern: /(^|["'\s])style\s*=\s*(?:"[^"]*"|'[^']*')/i, - lookbehind: true, - inside: { - 'attr-value': { - pattern: /=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/, - inside: { - 'style': { - pattern: /(["'])[\s\S]+(?=["']$)/, - lookbehind: true, - alias: 'language-css', - inside: Prism.languages.css - }, - 'punctuation': [ - { - pattern: /^=/, - alias: 'attr-equals' - }, - /"|'/ - ] - } - }, - 'attr-name': /^style/i - } - } - }, markup.tag); + markup.tag.addAttribute('style', 'css'); } }(Prism)); diff --git a/components/prism-css.min.js b/components/prism-css.min.js index b81979f54c..b773d908b8 100644 --- a/components/prism-css.min.js +++ b/components/prism-css.min.js @@ -1 +1 @@ -!function(s){var e=/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/;s.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:/@[\w-](?:[^;{\s]|\s+(?![\s{]))*(?:;|(?=\s*\{))/,inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+e.source+"|(?:[^\\\\\r\n()\"']|\\\\[^])*)\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+e.source+"$"),alias:"url"}}},selector:RegExp("[^{}\\s](?:[^{};\"'\\s]|\\s+(?![\\s{])|"+e.source+")*(?=\\s*\\{)"),string:{pattern:e,greedy:!0},property:/(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,important:/!important\b/i,function:/[-a-z0-9]+(?=\()/i,punctuation:/[(){};:,]/},s.languages.css.atrule.inside.rest=s.languages.css;var t=s.languages.markup;t&&(t.tag.addInlined("style","css"),s.languages.insertBefore("inside","attr-value",{"style-attr":{pattern:/(^|["'\s])style\s*=\s*(?:"[^"]*"|'[^']*')/i,lookbehind:!0,inside:{"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{style:{pattern:/(["'])[\s\S]+(?=["']$)/,lookbehind:!0,alias:"language-css",inside:s.languages.css},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}},"attr-name":/^style/i}}},t.tag))}(Prism); \ No newline at end of file +!function(s){var e=/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/;s.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:/@[\w-](?:[^;{\s]|\s+(?![\s{]))*(?:;|(?=\s*\{))/,inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+e.source+"|(?:[^\\\\\r\n()\"']|\\\\[^])*)\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+e.source+"$"),alias:"url"}}},selector:RegExp("[^{}\\s](?:[^{};\"'\\s]|\\s+(?![\\s{])|"+e.source+")*(?=\\s*\\{)"),string:{pattern:e,greedy:!0},property:/(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,important:/!important\b/i,function:/[-a-z0-9]+(?=\()/i,punctuation:/[(){};:,]/},s.languages.css.atrule.inside.rest=s.languages.css;var t=s.languages.markup;t&&(t.tag.addInlined("style","css"),t.tag.addAttribute("style","css"))}(Prism); \ No newline at end of file diff --git a/components/prism-javascript.js b/components/prism-javascript.js index 4ffee11173..96721ec3f4 100644 --- a/components/prism-javascript.js +++ b/components/prism-javascript.js @@ -96,6 +96,13 @@ Prism.languages.insertBefore('javascript', 'string', { if (Prism.languages.markup) { Prism.languages.markup.tag.addInlined('script', 'javascript'); + + // add attribute support for all DOM events. + // https://developer.mozilla.org/en-US/docs/Web/Events#Standard_events + Prism.languages.markup.tag.addAttribute( + /on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source, + 'javascript' + ); } Prism.languages.js = Prism.languages.javascript; diff --git a/components/prism-javascript.min.js b/components/prism-javascript.min.js index 101a051dff..ec55d3cd6c 100644 --- a/components/prism-javascript.min.js +++ b/components/prism-javascript.min.js @@ -1 +1 @@ -Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:prototype|constructor))/,lookbehind:!0}],keyword:[{pattern:/((?:^|})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:/\b(?:(?:0[xX](?:[\dA-Fa-f](?:_[\dA-Fa-f])?)+|0[bB](?:[01](?:_[01])?)+|0[oO](?:[0-7](?:_[0-7])?)+)n?|(?:\d(?:_\d)?)+n|NaN|Infinity)\b|(?:\b(?:\d(?:_\d)?)+\.?(?:\d(?:_\d)?)*|\B\.(?:\d(?:_\d)?)+)(?:[Ee][+-]?(?:\d(?:_\d)?)+)?/,operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/,Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)\/(?:\[(?:[^\]\\\r\n]|\\.)*]|\\.|[^/\\\[\r\n])+\/[gimyus]{0,6}(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/,lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:Prism.languages.regex},"regex-flags":/[a-z]+$/,"regex-delimiter":/^\/|\/$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),Prism.languages.insertBefore("javascript","string",{"template-string":{pattern:/`(?:\\[\s\S]|\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}|(?!\${)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\${|}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}}}),Prism.languages.markup&&Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.js=Prism.languages.javascript; \ No newline at end of file +Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:prototype|constructor))/,lookbehind:!0}],keyword:[{pattern:/((?:^|})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:/\b(?:(?:0[xX](?:[\dA-Fa-f](?:_[\dA-Fa-f])?)+|0[bB](?:[01](?:_[01])?)+|0[oO](?:[0-7](?:_[0-7])?)+)n?|(?:\d(?:_\d)?)+n|NaN|Infinity)\b|(?:\b(?:\d(?:_\d)?)+\.?(?:\d(?:_\d)?)*|\B\.(?:\d(?:_\d)?)+)(?:[Ee][+-]?(?:\d(?:_\d)?)+)?/,operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/,Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)\/(?:\[(?:[^\]\\\r\n]|\\.)*]|\\.|[^/\\\[\r\n])+\/[gimyus]{0,6}(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/,lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:Prism.languages.regex},"regex-flags":/[a-z]+$/,"regex-delimiter":/^\/|\/$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),Prism.languages.insertBefore("javascript","string",{"template-string":{pattern:/`(?:\\[\s\S]|\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}|(?!\${)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\${|}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}}}),Prism.languages.markup&&(Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.markup.tag.addAttribute("on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)","javascript")),Prism.languages.js=Prism.languages.javascript; \ No newline at end of file diff --git a/components/prism-jsx.js b/components/prism-jsx.js index bc39f1bbd7..434e695a32 100644 --- a/components/prism-jsx.js +++ b/components/prism-jsx.js @@ -38,7 +38,7 @@ Prism.languages.insertBefore('inside', 'attr-name', { } }, Prism.languages.jsx.tag); -Prism.languages.insertBefore('inside', 'attr-value',{ +Prism.languages.insertBefore('inside', 'special-attr',{ 'script': { // Allow for two levels of nesting pattern: re(/=/.source), diff --git a/components/prism-jsx.min.js b/components/prism-jsx.min.js index 3844e6c32d..f15a241b56 100644 --- a/components/prism-jsx.min.js +++ b/components/prism-jsx.min.js @@ -1 +1 @@ -!function(o){var t=o.util.clone(o.languages.javascript),e="(?:\\{*\\.{3}(?:[^{}]|)*\\})";function n(t,n){return t=t.replace(//g,function(){return"(?:\\s|//.*(?!.)|/\\*(?:[^*]|\\*(?!/))\\*/)"}).replace(//g,function(){return"(?:\\{(?:\\{(?:\\{[^{}]*\\}|[^{}])*\\}|[^{}])*\\})"}).replace(//g,function(){return e}),RegExp(t,n)}e=n(e).source,o.languages.jsx=o.languages.extend("markup",t),o.languages.jsx.tag.pattern=n("+(?:[\\w.:$-]+(?:=(?:\"(?:\\\\[^]|[^\\\\\"])*\"|'(?:\\\\[^]|[^\\\\'])*'|[^\\s{'\"/>=]+|))?|))**/?)?>"),o.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/i,o.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:"(?:\\[^]|[^\\"])*"|'(?:\\[^]|[^\\'])*'|[^\s'">]+)/i,o.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,o.languages.jsx.tag.inside.comment=t.comment,o.languages.insertBefore("inside","attr-name",{spread:{pattern:n(""),inside:o.languages.jsx}},o.languages.jsx.tag),o.languages.insertBefore("inside","attr-value",{script:{pattern:n("="),inside:{"script-punctuation":{pattern:/^=(?={)/,alias:"punctuation"},rest:o.languages.jsx},alias:"language-javascript"}},o.languages.jsx.tag);var i=function(t){return t?"string"==typeof t?t:"string"==typeof t.content?t.content:t.content.map(i).join(""):""},r=function(t){for(var n=[],e=0;e"===a.content[a.content.length-1].content||n.push({tagName:i(a.content[0].content[1]),openedBraces:0}):0*\\.{3}(?:[^{}]|)*\\})";function n(t,n){return t=t.replace(//g,function(){return"(?:\\s|//.*(?!.)|/\\*(?:[^*]|\\*(?!/))\\*/)"}).replace(//g,function(){return"(?:\\{(?:\\{(?:\\{[^{}]*\\}|[^{}])*\\}|[^{}])*\\})"}).replace(//g,function(){return e}),RegExp(t,n)}e=n(e).source,i.languages.jsx=i.languages.extend("markup",t),i.languages.jsx.tag.pattern=n("+(?:[\\w.:$-]+(?:=(?:\"(?:\\\\[^]|[^\\\\\"])*\"|'(?:\\\\[^]|[^\\\\'])*'|[^\\s{'\"/>=]+|))?|))**/?)?>"),i.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/i,i.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:"(?:\\[^]|[^\\"])*"|'(?:\\[^]|[^\\'])*'|[^\s'">]+)/i,i.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,i.languages.jsx.tag.inside.comment=t.comment,i.languages.insertBefore("inside","attr-name",{spread:{pattern:n(""),inside:i.languages.jsx}},i.languages.jsx.tag),i.languages.insertBefore("inside","special-attr",{script:{pattern:n("="),inside:{"script-punctuation":{pattern:/^=(?={)/,alias:"punctuation"},rest:i.languages.jsx},alias:"language-javascript"}},i.languages.jsx.tag);var o=function(t){return t?"string"==typeof t?t:"string"==typeof t.content?t.content:t.content.map(o).join(""):""},r=function(t){for(var n=[],e=0;e"===a.content[a.content.length-1].content||n.push({tagName:o(a.content[0].content[1]),openedBraces:0}):0\/:]+:/ } }, + 'special-attr': [], 'attr-value': { pattern: /=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/, inside: { @@ -119,6 +120,49 @@ Object.defineProperty(Prism.languages.markup.tag, 'addInlined', { Prism.languages.insertBefore('markup', 'cdata', def); } }); +Object.defineProperty(Prism.languages.markup.tag, 'addAttribute', { + /** + * Adds an pattern to highlight languages embedded in HTML attributes. + * + * An example of an inlined language is CSS with `style` attributes. + * + * @param {string} attrName The name of the tag that contains the inlined language. This name will be treated as + * case insensitive. + * @param {string} lang The language key. + * @example + * addAttribute('style', 'css'); + */ + value: function (attrName, lang) { + Prism.languages.markup.tag.inside['special-attr'].push({ + pattern: RegExp( + /(^|["'\s])/.source + '(?:' + attrName + ')' + /\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source, + 'i' + ), + lookbehind: true, + inside: { + 'attr-name': /^[^\s=]+/, + 'attr-value': { + pattern: /=[\s\S]+/, + inside: { + 'value': { + pattern: /(=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/, + lookbehind: true, + alias: [lang, 'language-' + lang], + inside: Prism.languages[lang] + }, + 'punctuation': [ + { + pattern: /^=/, + alias: 'attr-equals' + }, + /"|'/ + ] + } + } + } + }); + } +}); Prism.languages.html = Prism.languages.markup; Prism.languages.mathml = Prism.languages.markup; diff --git a/components/prism-markup.min.js b/components/prism-markup.min.js index 104441a774..08d352668b 100644 --- a/components/prism-markup.min.js +++ b/components/prism-markup.min.js @@ -1 +1 @@ -Prism.languages.markup={comment://,prolog:/<\?[\s\S]+?\?>/,doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^$|[[\]]/,"doctype-tag":/^DOCTYPE/,name:/[^\s<>'"]+/}},cdata://i,tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},Prism.languages.markup.tag.inside["attr-value"].inside.entity=Prism.languages.markup.entity,Prism.languages.markup.doctype.inside["internal-subset"].inside=Prism.languages.markup,Prism.hooks.add("wrap",function(a){"entity"===a.type&&(a.attributes.title=a.content.replace(/&/,"&"))}),Object.defineProperty(Prism.languages.markup.tag,"addInlined",{value:function(a,e){var s={};s["language-"+e]={pattern:/(^$)/i,lookbehind:!0,inside:Prism.languages[e]},s.cdata=/^$/i;var n={"included-cdata":{pattern://i,inside:s}};n["language-"+e]={pattern:/[\s\S]+/,inside:Prism.languages[e]};var t={};t[a]={pattern:RegExp("(<__[^>]*>)(?:))*\\]\\]>|(?!)".replace(/__/g,function(){return a}),"i"),lookbehind:!0,greedy:!0,inside:n},Prism.languages.insertBefore("markup","cdata",t)}}),Prism.languages.html=Prism.languages.markup,Prism.languages.mathml=Prism.languages.markup,Prism.languages.svg=Prism.languages.markup,Prism.languages.xml=Prism.languages.extend("markup",{}),Prism.languages.ssml=Prism.languages.xml,Prism.languages.atom=Prism.languages.xml,Prism.languages.rss=Prism.languages.xml; \ No newline at end of file +Prism.languages.markup={comment://,prolog:/<\?[\s\S]+?\?>/,doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^$|[[\]]/,"doctype-tag":/^DOCTYPE/,name:/[^\s<>'"]+/}},cdata://i,tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},Prism.languages.markup.tag.inside["attr-value"].inside.entity=Prism.languages.markup.entity,Prism.languages.markup.doctype.inside["internal-subset"].inside=Prism.languages.markup,Prism.hooks.add("wrap",function(a){"entity"===a.type&&(a.attributes.title=a.content.replace(/&/,"&"))}),Object.defineProperty(Prism.languages.markup.tag,"addInlined",{value:function(a,e){var s={};s["language-"+e]={pattern:/(^$)/i,lookbehind:!0,inside:Prism.languages[e]},s.cdata=/^$/i;var t={"included-cdata":{pattern://i,inside:s}};t["language-"+e]={pattern:/[\s\S]+/,inside:Prism.languages[e]};var n={};n[a]={pattern:RegExp("(<__[^>]*>)(?:))*\\]\\]>|(?!)".replace(/__/g,function(){return a}),"i"),lookbehind:!0,greedy:!0,inside:t},Prism.languages.insertBefore("markup","cdata",n)}}),Object.defineProperty(Prism.languages.markup.tag,"addAttribute",{value:function(a,e){Prism.languages.markup.tag.inside["special-attr"].push({pattern:RegExp("(^|[\"'\\s])(?:"+a+")\\s*=\\s*(?:\"[^\"]*\"|'[^']*'|[^\\s'\">=]+(?=[\\s>]))","i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[e,"language-"+e],inside:Prism.languages[e]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),Prism.languages.html=Prism.languages.markup,Prism.languages.mathml=Prism.languages.markup,Prism.languages.svg=Prism.languages.markup,Prism.languages.xml=Prism.languages.extend("markup",{}),Prism.languages.ssml=Prism.languages.xml,Prism.languages.atom=Prism.languages.xml,Prism.languages.rss=Prism.languages.xml; \ No newline at end of file diff --git a/prism.js b/prism.js index d4d1597246..19e34a1463 100644 --- a/prism.js +++ b/prism.js @@ -1258,6 +1258,7 @@ Prism.languages.markup = { 'namespace': /^[^\s>\/:]+:/ } }, + 'special-attr': [], 'attr-value': { pattern: /=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/, inside: { @@ -1344,6 +1345,49 @@ Object.defineProperty(Prism.languages.markup.tag, 'addInlined', { Prism.languages.insertBefore('markup', 'cdata', def); } }); +Object.defineProperty(Prism.languages.markup.tag, 'addAttribute', { + /** + * Adds an pattern to highlight languages embedded in HTML attributes. + * + * An example of an inlined language is CSS with `style` attributes. + * + * @param {string} attrName The name of the tag that contains the inlined language. This name will be treated as + * case insensitive. + * @param {string} lang The language key. + * @example + * addAttribute('style', 'css'); + */ + value: function (attrName, lang) { + Prism.languages.markup.tag.inside['special-attr'].push({ + pattern: RegExp( + /(^|["'\s])/.source + '(?:' + attrName + ')' + /\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source, + 'i' + ), + lookbehind: true, + inside: { + 'attr-name': /^[^\s=]+/, + 'attr-value': { + pattern: /=[\s\S]+/, + inside: { + 'value': { + pattern: /(=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/, + lookbehind: true, + alias: [lang, 'language-' + lang], + inside: Prism.languages[lang] + }, + 'punctuation': [ + { + pattern: /^=/, + alias: 'attr-equals' + }, + /"|'/ + ] + } + } + } + }); + } +}); Prism.languages.html = Prism.languages.markup; Prism.languages.mathml = Prism.languages.markup; @@ -1410,34 +1454,7 @@ Prism.languages.rss = Prism.languages.xml; var markup = Prism.languages.markup; if (markup) { markup.tag.addInlined('style', 'css'); - - Prism.languages.insertBefore('inside', 'attr-value', { - 'style-attr': { - pattern: /(^|["'\s])style\s*=\s*(?:"[^"]*"|'[^']*')/i, - lookbehind: true, - inside: { - 'attr-value': { - pattern: /=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/, - inside: { - 'style': { - pattern: /(["'])[\s\S]+(?=["']$)/, - lookbehind: true, - alias: 'language-css', - inside: Prism.languages.css - }, - 'punctuation': [ - { - pattern: /^=/, - alias: 'attr-equals' - }, - /"|'/ - ] - } - }, - 'attr-name': /^style/i - } - } - }, markup.tag); + markup.tag.addAttribute('style', 'css'); } }(Prism)); @@ -1582,6 +1599,13 @@ Prism.languages.insertBefore('javascript', 'string', { if (Prism.languages.markup) { Prism.languages.markup.tag.addInlined('script', 'javascript'); + + // add attribute support for all DOM events. + // https://developer.mozilla.org/en-US/docs/Web/Events#Standard_events + Prism.languages.markup.tag.addAttribute( + /on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source, + 'javascript' + ); } Prism.languages.js = Prism.languages.javascript; diff --git a/tests/languages/markup!+css/css_inclusion.test b/tests/languages/markup!+css/css_inclusion.test index a29a6f6dea..84631ab746 100644 --- a/tests/languages/markup!+css/css_inclusion.test +++ b/tests/languages/markup!+css/css_inclusion.test @@ -35,12 +35,8 @@ foo { ]], ["style", [ ["language-css", [ - ["selector", "foo"], - ["punctuation", "{"], - ["property", "bar"], - ["punctuation", ":"], - " baz", - ["punctuation", ";"], + ["selector", "foo"], ["punctuation", "{"], + ["property", "bar"], ["punctuation", ":"], " baz", ["punctuation", ";"], ["punctuation", "}"] ]] ]], @@ -68,12 +64,8 @@ foo { ["included-cdata", [ ["cdata", ""] @@ -97,12 +89,12 @@ foo { ["punctuation", "<"], "foo" ]], - ["style-attr", [ + ["special-attr", [ ["attr-name", "style"], ["attr-value", [ ["punctuation", "="], ["punctuation", "\""], - ["style", [ + ["value", [ ["property", "bar"], ["punctuation", ":"], "baz", diff --git a/tests/languages/markup!+javascript/javascript_inclusion.test b/tests/languages/markup!+javascript/javascript_inclusion.test index 098e8c1e61..ccff9d0e81 100644 --- a/tests/languages/markup!+javascript/javascript_inclusion.test +++ b/tests/languages/markup!+javascript/javascript_inclusion.test @@ -12,6 +12,9 @@ let foo = ''; "foo" + + + ---------------------------------------------------- [ @@ -107,6 +110,46 @@ let foo = ''; "script" ]], ["punctuation", ">"] + ]], + + ["tag", [ + ["tag", [ + ["punctuation", "<"], + "foo" + ]], + ["special-attr", [ + ["attr-name", "onclick"], + ["attr-value", [ + ["punctuation", "="], + ["punctuation", "\""], + ["value", [ + ["keyword", "this"], + ["punctuation", "."], + "textContent", + ["operator", "="], + ["string", "'Clicked!'"] + ]], + ["punctuation", "\""] + ]] + ]], + ["punctuation", ">"] + ]], + ["tag", [ + ["tag", [ + ["punctuation", "<"], + "foo" + ]], + ["attr-name", ["mouseover"]], + ["attr-value", [ + ["punctuation", "="], + ["punctuation", "\""], + "this.textContent=", + ["punctuation", "'"], + "Over!", + ["punctuation", "'"], + ["punctuation", "\""] + ]], + ["punctuation", ">"] ]] ] diff --git a/tests/languages/markup+css+wiki/table-tag_feature.test b/tests/languages/markup+css+wiki/table-tag_feature.test index 8f8f61e24b..a17b2ad4e6 100644 --- a/tests/languages/markup+css+wiki/table-tag_feature.test +++ b/tests/languages/markup+css+wiki/table-tag_feature.test @@ -67,12 +67,12 @@ baz ["punctuation", "{|"], ["punctuation", "!"], ["table-tag", [ - ["style-attr", [ + ["special-attr", [ ["attr-name", "style"], ["attr-value", [ ["punctuation", "="], ["punctuation", "\""], - ["style", [ + ["value", [ ["property", "text-align"], ["punctuation", ":"], "left", @@ -94,12 +94,12 @@ baz ["punctuation", "{|"], ["punctuation", "!"], ["table-tag", [ - ["style-attr", [ + ["special-attr", [ ["attr-name", "style"], ["attr-value", [ ["punctuation", "="], ["punctuation", "\""], - ["style", [ + ["value", [ ["property", "color"], ["punctuation", ":"], "red", @@ -112,12 +112,12 @@ baz ]], " Foo ", ["punctuation", "!!"], ["table-tag", [ - ["style-attr", [ + ["special-attr", [ ["attr-name", "style"], ["attr-value", [ ["punctuation", "="], ["punctuation", "\""], - ["style", [ + ["value", [ ["property", "color"], ["punctuation", ":"], "blue", @@ -133,12 +133,12 @@ baz ["punctuation", "|"], " foo ", ["punctuation", "||"], ["table-tag", [ - ["style-attr", [ + ["special-attr", [ ["attr-name", "style"], ["attr-value", [ ["punctuation", "="], ["punctuation", "\""], - ["style", [ + ["value", [ ["property", "font-weight"], ["punctuation", ":"], "bold", diff --git a/tests/languages/php!+css-extras/issue2008.test b/tests/languages/php!+css-extras/issue2008.test index 3dc9d01e5e..ca5b7cff78 100644 --- a/tests/languages/php!+css-extras/issue2008.test +++ b/tests/languages/php!+css-extras/issue2008.test @@ -8,12 +8,12 @@ ["punctuation", "<"], "img" ]], - ["style-attr", [ + ["special-attr", [ ["attr-name", "style"], ["attr-value", [ ["punctuation", "="], ["punctuation", "\""], - ["style", [ + ["value", [ ["property", "width"], ["punctuation", ":"], ["php", [ From e38986f9557bc850340a5d6ba824da9439b9977d Mon Sep 17 00:00:00 2001 From: JordanSh <51442161+JordanSh@users.noreply.github.com> Date: Sun, 7 Mar 2021 20:34:29 +0200 Subject: [PATCH 0747/1100] Added support for Rego (#2624) --- components.js | 2 +- components.json | 4 + components/prism-rego.js | 30 +++ components/prism-rego.min.js | 1 + examples/prism-rego.html | 44 ++++ tests/languages/rego/boolean_feature.test | 13 ++ tests/languages/rego/comment_feature.test | 13 ++ tests/languages/rego/function_feature.test | 173 +++++++++++++++ tests/languages/rego/keyword_feature.test | 31 +++ tests/languages/rego/number_feature.test | 23 ++ tests/languages/rego/operator_feature.test | 35 +++ tests/languages/rego/property_feature.test | 208 ++++++++++++++++++ tests/languages/rego/punctuation_feature.test | 17 ++ tests/languages/rego/string_feature.test | 43 ++++ 14 files changed, 636 insertions(+), 1 deletion(-) create mode 100644 components/prism-rego.js create mode 100644 components/prism-rego.min.js create mode 100644 examples/prism-rego.html create mode 100644 tests/languages/rego/boolean_feature.test create mode 100644 tests/languages/rego/comment_feature.test create mode 100644 tests/languages/rego/function_feature.test create mode 100644 tests/languages/rego/keyword_feature.test create mode 100644 tests/languages/rego/number_feature.test create mode 100644 tests/languages/rego/operator_feature.test create mode 100644 tests/languages/rego/property_feature.test create mode 100644 tests/languages/rego/punctuation_feature.test create mode 100644 tests/languages/rego/string_feature.test diff --git a/components.js b/components.js index dcd35b94b7..1ff7f99926 100644 --- a/components.js +++ b/components.js @@ -1,2 +1,2 @@ -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml","ssml","atom","rss"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","ssml":"SSML","atom":"Atom","rss":"RSS"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","optional":"regex","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"ABNF","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"agda":{"title":"Agda","owner":"xy-ren"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apex":{"title":"Apex","require":["clike","sql"],"owner":"RunDevelopment"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"dkern"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"birb":{"title":"Birb","require":"clike","owner":"Calamity210"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"BNF","alias":"rbnf","aliasTitles":{"rbnf":"RBNF"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"bsl":{"title":"BSL (1C:Enterprise)","alias":"oscript","aliasTitles":{"oscript":"OneScript"},"owner":"Diversus23"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cfscript":{"title":"CFScript","require":"clike","alias":"cfc","owner":"mjclemente"},"chaiscript":{"title":"ChaiScript","require":["clike","cpp"],"owner":"RunDevelopment"},"cil":{"title":"CIL","owner":"sbrl"},"clojure":{"title":"Clojure","owner":"troglotit"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"cypher":{"title":"Cypher","owner":"RunDevelopment"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dataweave":{"title":"DataWeave","owner":"machaval"},"dax":{"title":"DAX","owner":"peterbud"},"dhall":{"title":"Dhall","owner":"RunDevelopment"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"dot":{"title":"DOT (Graphviz)","alias":"gv","optional":"markup","owner":"RunDevelopment"},"ebnf":{"title":"EBNF","owner":"RunDevelopment"},"editorconfig":{"title":"EditorConfig","owner":"osipxd"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"c","owner":"Golmote"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","optional":["markdown"],"owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"hlsl":{"title":"HLSL","require":"c","owner":"RunDevelopment"},"http":{"title":"HTTP","optional":["css","javascript","json","markup","uri"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"icu-message-format":{"title":"ICU Message Format","owner":"RunDevelopment"},"idris":{"title":"Idris","alias":"idr","owner":"KeenS","require":"haskell"},"ignore":{"title":".ignore","owner":"osipxd","alias":["gitignore","hgignore","npmignore"],"aliasTitles":{"gitignore":".gitignore","hgignore":".hgignore","npmignore":".npmignore"}},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike","typescript"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","alias":"webmanifest","aliasTitles":{"webmanifest":"Web App Manifest"},"owner":"CupOfTea696"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"jsstacktrace":{"title":"JS stack trace","owner":"sbrl"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","alias":["kt","kts"],"aliasTitles":{"kts":"Kotlin Script"},"require":"clike","owner":"Golmote"},"kumir":{"title":"KuMir (КуМир)","alias":"kum","owner":"edukisto"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","optional":"yaml","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"mongodb":{"title":"MongoDB","owner":"airs0urce","require":"javascript"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"naniscript":{"title":"Naninovel Script","owner":"Elringus","alias":"nani"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"psl":{"title":"PATROL Scripting Language","owner":"bertysentry"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":"markup-templating","owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"promql":{"title":"PromQL","owner":"arendjr"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"purebasic":{"title":"PureBasic","require":"clike","alias":"pbfasm","owner":"HeX0R101"},"purescript":{"title":"PureScript","require":"haskell","alias":"purs","owner":"sriharshachilakapati"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"racket":{"title":"Racket","require":"scheme","alias":"rkt","owner":"RunDevelopment"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","owner":"RunDevelopment"},"renpy":{"title":"Ren'py","alias":"rpy","owner":"HyuchiaDiego"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","alias":["sh-session","shellsession"],"owner":"RunDevelopment"},"smali":{"title":"Smali","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sml":{"title":"SML","alias":"smlnj","aliasTitles":{"smlnj":"SML/NJ"},"owner":"RunDevelopment"},"solidity":{"title":"Solidity (Ethereum)","alias":"sol","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"squirrel":{"title":"Squirrel","require":"clike","owner":"RunDevelopment"},"stan":{"title":"Stan","owner":"RunDevelopment"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","vbnet"],"owner":"RunDevelopment"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"typoscript":{"title":"TypoScript","alias":"tsconfig","aliasTitles":{"tsconfig":"TSConfig"},"owner":"dkern"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"uri":{"title":"URI","alias":"url","aliasTitles":{"url":"URL"},"owner":"RunDevelopment"},"v":{"title":"V","require":"clike","owner":"taggon"},"vala":{"title":"Vala","require":"clike","optional":"regex","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":["vb","vba"],"aliasTitles":{"vba":"VBA"},"owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xml-doc":{"title":"XML doc (.net)","require":"markup","modify":["csharp","fsharp","vbnet"],"owner":"RunDevelopment"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"yang":{"title":"YANG","owner":"RunDevelopment"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml","ssml","atom","rss"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","ssml":"SSML","atom":"Atom","rss":"RSS"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","optional":"regex","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"ABNF","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"agda":{"title":"Agda","owner":"xy-ren"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apex":{"title":"Apex","require":["clike","sql"],"owner":"RunDevelopment"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"dkern"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"birb":{"title":"Birb","require":"clike","owner":"Calamity210"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"BNF","alias":"rbnf","aliasTitles":{"rbnf":"RBNF"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"bsl":{"title":"BSL (1C:Enterprise)","alias":"oscript","aliasTitles":{"oscript":"OneScript"},"owner":"Diversus23"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cfscript":{"title":"CFScript","require":"clike","alias":"cfc","owner":"mjclemente"},"chaiscript":{"title":"ChaiScript","require":["clike","cpp"],"owner":"RunDevelopment"},"cil":{"title":"CIL","owner":"sbrl"},"clojure":{"title":"Clojure","owner":"troglotit"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"cypher":{"title":"Cypher","owner":"RunDevelopment"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dataweave":{"title":"DataWeave","owner":"machaval"},"dax":{"title":"DAX","owner":"peterbud"},"dhall":{"title":"Dhall","owner":"RunDevelopment"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"dot":{"title":"DOT (Graphviz)","alias":"gv","optional":"markup","owner":"RunDevelopment"},"ebnf":{"title":"EBNF","owner":"RunDevelopment"},"editorconfig":{"title":"EditorConfig","owner":"osipxd"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"c","owner":"Golmote"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","optional":["markdown"],"owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"hlsl":{"title":"HLSL","require":"c","owner":"RunDevelopment"},"http":{"title":"HTTP","optional":["css","javascript","json","markup","uri"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"icu-message-format":{"title":"ICU Message Format","owner":"RunDevelopment"},"idris":{"title":"Idris","alias":"idr","owner":"KeenS","require":"haskell"},"ignore":{"title":".ignore","owner":"osipxd","alias":["gitignore","hgignore","npmignore"],"aliasTitles":{"gitignore":".gitignore","hgignore":".hgignore","npmignore":".npmignore"}},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike","typescript"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","alias":"webmanifest","aliasTitles":{"webmanifest":"Web App Manifest"},"owner":"CupOfTea696"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"jsstacktrace":{"title":"JS stack trace","owner":"sbrl"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","alias":["kt","kts"],"aliasTitles":{"kts":"Kotlin Script"},"require":"clike","owner":"Golmote"},"kumir":{"title":"KuMir (КуМир)","alias":"kum","owner":"edukisto"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","optional":"yaml","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"mongodb":{"title":"MongoDB","owner":"airs0urce","require":"javascript"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"naniscript":{"title":"Naninovel Script","owner":"Elringus","alias":"nani"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"psl":{"title":"PATROL Scripting Language","owner":"bertysentry"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":"markup-templating","owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"promql":{"title":"PromQL","owner":"arendjr"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"purebasic":{"title":"PureBasic","require":"clike","alias":"pbfasm","owner":"HeX0R101"},"purescript":{"title":"PureScript","require":"haskell","alias":"purs","owner":"sriharshachilakapati"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"racket":{"title":"Racket","require":"scheme","alias":"rkt","owner":"RunDevelopment"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","owner":"RunDevelopment"},"rego":{"title":"Rego","owner":"JordanSh"},"renpy":{"title":"Ren'py","alias":"rpy","owner":"HyuchiaDiego"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","alias":["sh-session","shellsession"],"owner":"RunDevelopment"},"smali":{"title":"Smali","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sml":{"title":"SML","alias":"smlnj","aliasTitles":{"smlnj":"SML/NJ"},"owner":"RunDevelopment"},"solidity":{"title":"Solidity (Ethereum)","alias":"sol","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"squirrel":{"title":"Squirrel","require":"clike","owner":"RunDevelopment"},"stan":{"title":"Stan","owner":"RunDevelopment"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","vbnet"],"owner":"RunDevelopment"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"typoscript":{"title":"TypoScript","alias":"tsconfig","aliasTitles":{"tsconfig":"TSConfig"},"owner":"dkern"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"uri":{"title":"URI","alias":"url","aliasTitles":{"url":"URL"},"owner":"RunDevelopment"},"v":{"title":"V","require":"clike","owner":"taggon"},"vala":{"title":"Vala","require":"clike","optional":"regex","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":["vb","vba"],"aliasTitles":{"vba":"VBA"},"owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xml-doc":{"title":"XML doc (.net)","require":"markup","modify":["csharp","fsharp","vbnet"],"owner":"RunDevelopment"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"yang":{"title":"YANG","owner":"RunDevelopment"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; if (typeof module !== 'undefined' && module.exports) { module.exports = components; } \ No newline at end of file diff --git a/components.json b/components.json index 7eb2c72de1..a70db25399 100644 --- a/components.json +++ b/components.json @@ -1028,6 +1028,10 @@ "title": "Regex", "owner": "RunDevelopment" }, + "rego": { + "title": "Rego", + "owner": "JordanSh" + }, "renpy": { "title": "Ren'py", "alias": "rpy", diff --git a/components/prism-rego.js b/components/prism-rego.js new file mode 100644 index 0000000000..f1d3eb5bba --- /dev/null +++ b/components/prism-rego.js @@ -0,0 +1,30 @@ +// https://www.openpolicyagent.org/docs/latest/policy-reference/ + +Prism.languages.rego = { + 'comment': /#.*/, + 'property': { + pattern: /(^|[^\\.])(?:"(?:\\.|[^\\"\r\n])*"|`[^`]*`|\b[a-z_]\w*\b)(?=\s*:(?!=))/i, + lookbehind: true, + greedy: true + }, + 'string': { + pattern: /(^|[^\\])"(?:\\.|[^\\"\r\n])*"|`[^`]*`/, + lookbehind: true, + greedy: true + }, + + 'keyword': /\b(?:as|default|else|import|package|not|null|some|with|set(?=\s*\())\b/, + 'boolean': /\b(?:true|false)\b/, + + 'function': { + pattern: /\b[a-z_]\w*\b(?:\s*\.\s*\b[a-z_]\w*\b)*(?=\s*\()/i, + inside: { + 'namespace': /\b\w+\b(?=\s*\.)/, + 'punctuation': /\./ + } + }, + + 'number': /-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i, + 'operator': /[-+*/%|&]|[<>:=]=?|!=|\b_\b/, + 'punctuation': /[,;.\[\]{}()]/ +}; diff --git a/components/prism-rego.min.js b/components/prism-rego.min.js new file mode 100644 index 0000000000..cb26f18560 --- /dev/null +++ b/components/prism-rego.min.js @@ -0,0 +1 @@ +Prism.languages.rego={comment:/#.*/,property:{pattern:/(^|[^\\.])(?:"(?:\\.|[^\\"\r\n])*"|`[^`]*`|\b[a-z_]\w*\b)(?=\s*:(?!=))/i,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"|`[^`]*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:as|default|else|import|package|not|null|some|with|set(?=\s*\())\b/,boolean:/\b(?:true|false)\b/,function:{pattern:/\b[a-z_]\w*\b(?:\s*\.\s*\b[a-z_]\w*\b)*(?=\s*\()/i,inside:{namespace:/\b\w+\b(?=\s*\.)/,punctuation:/\./}},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,operator:/[-+*/%|&]|[<>:=]=?|!=|\b_\b/,punctuation:/[,;.\[\]{}()]/}; \ No newline at end of file diff --git a/examples/prism-rego.html b/examples/prism-rego.html new file mode 100644 index 0000000000..d8050a366e --- /dev/null +++ b/examples/prism-rego.html @@ -0,0 +1,44 @@ +

        Full example

        +
        # Role-based Access Control (RBAC)
        +
        +# By default, deny requests.
        +default allow = false
        +
        +# Allow admins to do anything.
        +allow {
        +	user_is_admin
        +}
        +
        +# Allow the action if the user is granted permission to perform the action.
        +allow {
        +	# Find grants for the user.
        +	some grant
        +	user_is_granted[grant]
        +
        +	# Check if the grant permits the action.
        +	input.action == grant.action
        +	input.type == grant.type
        +}
        +
        +# user_is_admin is true if...
        +user_is_admin {
        +
        +	# for some `i`...
        +	some i
        +
        +	# "admin" is the `i`-th element in the user->role mappings for the identified user.
        +	data.user_roles[input.user][i] == "admin"
        +}
        +
        +# user_is_granted is a set of grants for the user identified in the request.
        +# The `grant` will be contained if the set `user_is_granted` for every...
        +user_is_granted[grant] {
        +	some i, j
        +
        +	# `role` assigned an element of the user_roles for this user...
        +	role := data.user_roles[input.user][i]
        +
        +	# `grant` assigned a single grant from the grants list for 'role'...
        +	grant := data.role_grants[role][j]
        +}
        +
        diff --git a/tests/languages/rego/boolean_feature.test b/tests/languages/rego/boolean_feature.test new file mode 100644 index 0000000000..f1ddac690c --- /dev/null +++ b/tests/languages/rego/boolean_feature.test @@ -0,0 +1,13 @@ +true +false + +---------------------------------------------------- + +[ + ["boolean", "true"], + ["boolean", "false"] +] + +---------------------------------------------------- + +Checks for booleans. diff --git a/tests/languages/rego/comment_feature.test b/tests/languages/rego/comment_feature.test new file mode 100644 index 0000000000..054d6023d1 --- /dev/null +++ b/tests/languages/rego/comment_feature.test @@ -0,0 +1,13 @@ +# +# foobar + +---------------------------------------------------- + +[ + ["comment", "#"], + ["comment", "# foobar"] +] + +---------------------------------------------------- + +Checks for comments. \ No newline at end of file diff --git a/tests/languages/rego/function_feature.test b/tests/languages/rego/function_feature.test new file mode 100644 index 0000000000..96a66aacb8 --- /dev/null +++ b/tests/languages/rego/function_feature.test @@ -0,0 +1,173 @@ +object.remove({"a": {"b": {"c": 2}}, "x": 123}, {"a": 1}) == {"x": 123} + +output := is_set(x) +output := intersection(set[set]) +output := regex.match(pattern, value) +output := glob.match("*.github.com", [], "api.github.com") +output := bits.rsh(x, s) +output := io.jwt.verify_ps384(string, certificate) + +io.jwt.encode_sign({ + "typ": "JWT", + "alg": "HS256"}, + {}, { + "kty": "oct", + "k": "AyM1SysPpbyDfgZld3umj1qzKObwVMkoqQ-EstJQLr_T-1qS0gZH75aKtMN3Yj0iPS4hcgUuTwjAzZr1Z9CAow" +}) + +---------------------------------------------------- + +[ + ["function", [ + ["namespace", "object"], + ["punctuation", "."], + "remove" + ]], + ["punctuation", "("], + ["punctuation", "{"], + ["property", "\"a\""], + ["operator", ":"], + ["punctuation", "{"], + ["property", "\"b\""], + ["operator", ":"], + ["punctuation", "{"], + ["property", "\"c\""], + ["operator", ":"], + ["number", "2"], + ["punctuation", "}"], + ["punctuation", "}"], + ["punctuation", ","], + ["property", "\"x\""], + ["operator", ":"], + ["number", "123"], + ["punctuation", "}"], + ["punctuation", ","], + ["punctuation", "{"], + ["property", "\"a\""], + ["operator", ":"], + ["number", "1"], + ["punctuation", "}"], + ["punctuation", ")"], + ["operator", "=="], + ["punctuation", "{"], + ["property", "\"x\""], + ["operator", ":"], + ["number", "123"], + ["punctuation", "}"], + + "\r\n\r\noutput ", + ["operator", ":="], + ["function", ["is_set"]], + ["punctuation", "("], + "x", + ["punctuation", ")"], + + "\r\noutput ", + ["operator", ":="], + ["function", ["intersection"]], + ["punctuation", "("], + "set", + ["punctuation", "["], + "set", + ["punctuation", "]"], + ["punctuation", ")"], + + "\r\noutput ", + ["operator", ":="], + ["function", [ + ["namespace", "regex"], + ["punctuation", "."], + "match" + ]], + ["punctuation", "("], + "pattern", + ["punctuation", ","], + " value", + ["punctuation", ")"], + + "\r\noutput ", + ["operator", ":="], + ["function", [ + ["namespace", "glob"], + ["punctuation", "."], + "match" + ]], + ["punctuation", "("], + ["string", "\"*.github.com\""], + ["punctuation", ","], + ["punctuation", "["], + ["punctuation", "]"], + ["punctuation", ","], + ["string", "\"api.github.com\""], + ["punctuation", ")"], + + "\r\noutput ", + ["operator", ":="], + ["function", [ + ["namespace", "bits"], + ["punctuation", "."], + "rsh" + ]], + ["punctuation", "("], + "x", + ["punctuation", ","], + " s", + ["punctuation", ")"], + + "\r\noutput ", + ["operator", ":="], + ["function", [ + ["namespace", "io"], + ["punctuation", "."], + ["namespace", "jwt"], + ["punctuation", "."], + "verify_ps384" + ]], + ["punctuation", "("], + "string", + ["punctuation", ","], + " certificate", + ["punctuation", ")"], + + ["function", [ + ["namespace", "io"], + ["punctuation", "."], + ["namespace", "jwt"], + ["punctuation", "."], + "encode_sign" + ]], + ["punctuation", "("], + ["punctuation", "{"], + + ["property", "\"typ\""], + ["operator", ":"], + ["string", "\"JWT\""], + ["punctuation", ","], + + ["property", "\"alg\""], + ["operator", ":"], + ["string", "\"HS256\""], + ["punctuation", "}"], + ["punctuation", ","], + + ["punctuation", "{"], + ["punctuation", "}"], + ["punctuation", ","], + ["punctuation", "{"], + + ["property", "\"kty\""], + ["operator", ":"], + ["string", "\"oct\""], + ["punctuation", ","], + + ["property", "\"k\""], + ["operator", ":"], + ["string", "\"AyM1SysPpbyDfgZld3umj1qzKObwVMkoqQ-EstJQLr_T-1qS0gZH75aKtMN3Yj0iPS4hcgUuTwjAzZr1Z9CAow\""], + + ["punctuation", "}"], + ["punctuation", ")"] +] + +---------------------------------------------------- + +Checks for all functions. diff --git a/tests/languages/rego/keyword_feature.test b/tests/languages/rego/keyword_feature.test new file mode 100644 index 0000000000..5a8e3faac6 --- /dev/null +++ b/tests/languages/rego/keyword_feature.test @@ -0,0 +1,31 @@ +as +default +else +import +package +not +null +some +with + +set() + +---------------------------------------------------- + +[ + ["keyword", "as"], + ["keyword", "default"], + ["keyword", "else"], + ["keyword", "import"], + ["keyword", "package"], + ["keyword", "not"], + ["keyword", "null"], + ["keyword", "some"], + ["keyword", "with"], + + ["keyword", "set"], ["punctuation", "("], ["punctuation", ")"] +] + +---------------------------------------------------- + +Checks for all keywords. diff --git a/tests/languages/rego/number_feature.test b/tests/languages/rego/number_feature.test new file mode 100644 index 0000000000..1643b010d4 --- /dev/null +++ b/tests/languages/rego/number_feature.test @@ -0,0 +1,23 @@ +0 +123 +3.14159 +5.0e8 +0.2E+2 +47e-5 +-1.23 +-2.34E33 +-4.34E-33 + +---------------------------------------------------- + +[ + ["number", "0"], + ["number", "123"], + ["number", "3.14159"], + ["number", "5.0e8"], + ["number", "0.2E+2"], + ["number", "47e-5"], + ["number", "-1.23"], + ["number", "-2.34E33"], + ["number", "-4.34E-33"] +] diff --git a/tests/languages/rego/operator_feature.test b/tests/languages/rego/operator_feature.test new file mode 100644 index 0000000000..4cd86375cd --- /dev/null +++ b/tests/languages/rego/operator_feature.test @@ -0,0 +1,35 @@ +:= = : +== != < <= > >= ++ - / * % +& | +_ + +---------------------------------------------------- + +[ + ["operator", ":="], + ["operator", "="], + ["operator", ":"], + + ["operator", "=="], + ["operator", "!="], + ["operator", "<"], + ["operator", "<="], + ["operator", ">"], + ["operator", ">="], + + ["operator", "+"], + ["operator", "-"], + ["operator", "/"], + ["operator", "*"], + ["operator", "%"], + + ["operator", "&"], + ["operator", "|"], + + ["operator", "_"] +] + +---------------------------------------------------- + +Checks for operators. diff --git a/tests/languages/rego/property_feature.test b/tests/languages/rego/property_feature.test new file mode 100644 index 0000000000..b9a1ffdb94 --- /dev/null +++ b/tests/languages/rego/property_feature.test @@ -0,0 +1,208 @@ +instances[instance] { + server := sites[_].servers[_] + instance := {"address": server.hostname, "name": server.name} +} { + container := containers[_] + instance := {"address": container.ipaddress, "name": container.name} +} + +apps := [ + { + "name": "web", + "servers": ["web-0", "web-1", "web-1000", "web-1001", "web-dev"] + }, + { + "name": "mysql", + "servers": ["db-0", "db-1000"] + }, + { + "name": "mongodb", + "servers": ["db-dev"] + } +] + +not allow with input as {"user": "charlie", "method": "GET"} with data.roles as {"dev": ["bob"]} + +allow with input as {"user": "charlie", "method": "GET"} with data.roles as {"dev": ["charlie"]} + +---------------------------------------------------- + +[ + "instances", + ["punctuation", "["], + "instance", + ["punctuation", "]"], + ["punctuation", "{"], + + "\r\n server ", + ["operator", ":="], + " sites", + ["punctuation", "["], + ["operator", "_"], + ["punctuation", "]"], + ["punctuation", "."], + "servers", + ["punctuation", "["], + ["operator", "_"], + ["punctuation", "]"], + + "\r\n instance ", + ["operator", ":="], + ["punctuation", "{"], + ["property", "\"address\""], + ["operator", ":"], + " server", + ["punctuation", "."], + "hostname", + ["punctuation", ","], + ["property", "\"name\""], + ["operator", ":"], + " server", + ["punctuation", "."], + "name", + ["punctuation", "}"], + + ["punctuation", "}"], + ["punctuation", "{"], + + "\r\n container ", + ["operator", ":="], + " containers", + ["punctuation", "["], + ["operator", "_"], + ["punctuation", "]"], + + "\r\n instance ", + ["operator", ":="], + ["punctuation", "{"], + ["property", "\"address\""], + ["operator", ":"], + " container", + ["punctuation", "."], + "ipaddress", + ["punctuation", ","], + ["property", "\"name\""], + ["operator", ":"], + " container", + ["punctuation", "."], + "name", + ["punctuation", "}"], + + ["punctuation", "}"], + + "\r\n\r\napps ", + ["operator", ":="], + ["punctuation", "["], + + ["punctuation", "{"], + + ["property", "\"name\""], + ["operator", ":"], + ["string", "\"web\""], + ["punctuation", ","], + + ["property", "\"servers\""], + ["operator", ":"], + ["punctuation", "["], + ["string", "\"web-0\""], + ["punctuation", ","], + ["string", "\"web-1\""], + ["punctuation", ","], + ["string", "\"web-1000\""], + ["punctuation", ","], + ["string", "\"web-1001\""], + ["punctuation", ","], + ["string", "\"web-dev\""], + ["punctuation", "]"], + + ["punctuation", "}"], + ["punctuation", ","], + + ["punctuation", "{"], + + ["property", "\"name\""], + ["operator", ":"], + ["string", "\"mysql\""], + ["punctuation", ","], + + ["property", "\"servers\""], + ["operator", ":"], + ["punctuation", "["], + ["string", "\"db-0\""], + ["punctuation", ","], + ["string", "\"db-1000\""], + ["punctuation", "]"], + + ["punctuation", "}"], + ["punctuation", ","], + + ["punctuation", "{"], + + ["property", "\"name\""], + ["operator", ":"], + ["string", "\"mongodb\""], + ["punctuation", ","], + + ["property", "\"servers\""], + ["operator", ":"], + ["punctuation", "["], + ["string", "\"db-dev\""], + ["punctuation", "]"], + + ["punctuation", "}"], + + ["punctuation", "]"], + + ["keyword", "not"], + " allow ", + ["keyword", "with"], + " input ", + ["keyword", "as"], + ["punctuation", "{"], + ["property", "\"user\""], + ["operator", ":"], + ["string", "\"charlie\""], + ["punctuation", ","], + ["property", "\"method\""], + ["operator", ":"], + ["string", "\"GET\""], + ["punctuation", "}"], + ["keyword", "with"], + " data", + ["punctuation", "."], + "roles ", + ["keyword", "as"], + ["punctuation", "{"], + ["property", "\"dev\""], + ["operator", ":"], + ["punctuation", "["], + ["string", "\"bob\""], + ["punctuation", "]"], + ["punctuation", "}"], + + "\r\n\r\nallow ", + ["keyword", "with"], + " input ", + ["keyword", "as"], + ["punctuation", "{"], + ["property", "\"user\""], + ["operator", ":"], + ["string", "\"charlie\""], + ["punctuation", ","], + ["property", "\"method\""], + ["operator", ":"], + ["string", "\"GET\""], + ["punctuation", "}"], + ["keyword", "with"], + " data", + ["punctuation", "."], + "roles ", + ["keyword", "as"], + ["punctuation", "{"], + ["property", "\"dev\""], + ["operator", ":"], + ["punctuation", "["], + ["string", "\"charlie\""], + ["punctuation", "]"], + ["punctuation", "}"] +] \ No newline at end of file diff --git a/tests/languages/rego/punctuation_feature.test b/tests/languages/rego/punctuation_feature.test new file mode 100644 index 0000000000..f2b4f4ccf2 --- /dev/null +++ b/tests/languages/rego/punctuation_feature.test @@ -0,0 +1,17 @@ +, ; . +( ) [ ] { } + +---------------------------------------------------- + +[ + ["punctuation", ","], + ["punctuation", ";"], + ["punctuation", "."], + + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", "["], + ["punctuation", "]"], + ["punctuation", "{"], + ["punctuation", "}"] +] diff --git a/tests/languages/rego/string_feature.test b/tests/languages/rego/string_feature.test new file mode 100644 index 0000000000..4773a0a36d --- /dev/null +++ b/tests/languages/rego/string_feature.test @@ -0,0 +1,43 @@ +"" +"foo\"bar" +`raw-string` + +jwks = `{ + "keys": [{ + "kty":"EC", + "crv":"P-256", + "x":"z8J91ghFy5o6f2xZ4g8LsLH7u2wEpT2ntj8loahnlsE", + "y":"7bdeXLH61KrGWRdh7ilnbcGQACxykaPKfmBccTHIOUo" + }] +}` + +cert = `-----BEGIN CERTIFICATE----- +MIIBcDCCARagAwIBAgIJAMZmuGSIfvgzMAoGCCqGSM49BAMCMBMxETAPBgNVBAMM +CHdoYXRldmVyMB4XDTE4MDgxMDE0Mjg1NFoXDTE4MDkwOTE0Mjg1NFowEzERMA8G +A1UEAwwId2hhdGV2ZXIwWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAATPwn3WCEXL +mjp/bFniDwuwsfu7bASlPae2PyWhqGeWwe23Xlyx+tSqxlkXYe4pZ23BkAAscpGj +yn5gXHExyDlKo1MwUTAdBgNVHQ4EFgQUElRjSoVgKjUqY5AXz2o74cLzzS8wHwYD +VR0jBBgwFoAUElRjSoVgKjUqY5AXz2o74cLzzS8wDwYDVR0TAQH/BAUwAwEB/zAK +BggqhkjOPQQDAgNIADBFAiEA4yQ/88ZrUX68c6kOe9G11u8NUaUzd8pLOtkKhniN +OHoCIHmNX37JOqTcTzGn2u9+c8NlnvZ0uDvsd1BmKPaUmjmm +-----END CERTIFICATE-----` + +---------------------------------------------------- + +[ + ["string", "\"\""], + ["string", "\"foo\\\"bar\""], + ["string", "`raw-string`"], + + "\r\n\r\njwks ", + ["operator", "="], + ["string", "`{\r\n \"keys\": [{\r\n \"kty\":\"EC\",\r\n \"crv\":\"P-256\",\r\n \"x\":\"z8J91ghFy5o6f2xZ4g8LsLH7u2wEpT2ntj8loahnlsE\",\r\n \"y\":\"7bdeXLH61KrGWRdh7ilnbcGQACxykaPKfmBccTHIOUo\"\r\n }]\r\n}`"], + + "\r\n\r\ncert ", + ["operator", "="], + ["string", "`-----BEGIN CERTIFICATE-----\r\nMIIBcDCCARagAwIBAgIJAMZmuGSIfvgzMAoGCCqGSM49BAMCMBMxETAPBgNVBAMM\r\nCHdoYXRldmVyMB4XDTE4MDgxMDE0Mjg1NFoXDTE4MDkwOTE0Mjg1NFowEzERMA8G\r\nA1UEAwwId2hhdGV2ZXIwWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAATPwn3WCEXL\r\nmjp/bFniDwuwsfu7bASlPae2PyWhqGeWwe23Xlyx+tSqxlkXYe4pZ23BkAAscpGj\r\nyn5gXHExyDlKo1MwUTAdBgNVHQ4EFgQUElRjSoVgKjUqY5AXz2o74cLzzS8wHwYD\r\nVR0jBBgwFoAUElRjSoVgKjUqY5AXz2o74cLzzS8wDwYDVR0TAQH/BAUwAwEB/zAK\r\nBggqhkjOPQQDAgNIADBFAiEA4yQ/88ZrUX68c6kOe9G11u8NUaUzd8pLOtkKhniN\r\nOHoCIHmNX37JOqTcTzGn2u9+c8NlnvZ0uDvsd1BmKPaUmjmm\r\n-----END CERTIFICATE-----`"] +] + +---------------------------------------------------- + +Checks for strings. From a68f1fb6e23143ada9676fa6f66af72a3b1eebe8 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Wed, 10 Mar 2021 11:28:50 +0100 Subject: [PATCH 0748/1100] VB.Net: Improved strings, comments, and punctuation (#2782) --- components/prism-vbnet.js | 11 +++++++-- components/prism-vbnet.min.js | 2 +- tests/languages/vbnet/issue2781.test | 24 +++++++++++++++++++ .../languages/vbnet/punctuation_feature.test | 15 ++++++++++++ tests/languages/vbnet/string_feature.test | 17 +++++++++++++ 5 files changed, 66 insertions(+), 3 deletions(-) create mode 100644 tests/languages/vbnet/issue2781.test create mode 100644 tests/languages/vbnet/punctuation_feature.test create mode 100644 tests/languages/vbnet/string_feature.test diff --git a/components/prism-vbnet.js b/components/prism-vbnet.js index 495f198601..464c9e1723 100644 --- a/components/prism-vbnet.js +++ b/components/prism-vbnet.js @@ -8,8 +8,15 @@ Prism.languages.vbnet = Prism.languages.extend("basic", { }, { pattern: /(^|[^\\:])'.*/, - lookbehind: true + lookbehind: true, + greedy: true } ], - 'keyword': /(?:\b(?:ADDHANDLER|ADDRESSOF|ALIAS|AND|ANDALSO|AS|BEEP|BLOAD|BOOLEAN|BSAVE|BYREF|BYTE|BYVAL|CALL(?: ABSOLUTE)?|CASE|CATCH|CBOOL|CBYTE|CCHAR|CDATE|CDEC|CDBL|CHAIN|CHAR|CHDIR|CINT|CLASS|CLEAR|CLNG|CLOSE|CLS|COBJ|COM|COMMON|CONST|CONTINUE|CSBYTE|CSHORT|CSNG|CSTR|CTYPE|CUINT|CULNG|CUSHORT|DATA|DATE|DECIMAL|DECLARE|DEFAULT|DEF(?: FN| SEG|DBL|INT|LNG|SNG|STR)|DELEGATE|DIM|DIRECTCAST|DO|DOUBLE|ELSE|ELSEIF|END|ENUM|ENVIRON|ERASE|ERROR|EVENT|EXIT|FALSE|FIELD|FILES|FINALLY|FOR(?: EACH)?|FRIEND|FUNCTION|GET|GETTYPE|GETXMLNAMESPACE|GLOBAL|GOSUB|GOTO|HANDLES|IF|IMPLEMENTS|IMPORTS|IN|INHERITS|INPUT|INTEGER|INTERFACE|IOCTL|IS|ISNOT|KEY|KILL|LINE INPUT|LET|LIB|LIKE|LOCATE|LOCK|LONG|LOOP|LSET|ME|MKDIR|MOD|MODULE|MUSTINHERIT|MUSTOVERRIDE|MYBASE|MYCLASS|NAME|NAMESPACE|NARROWING|NEW|NEXT|NOT|NOTHING|NOTINHERITABLE|NOTOVERRIDABLE|OBJECT|OF|OFF|ON(?: COM| ERROR| KEY| TIMER)?|OPERATOR|OPEN|OPTION(?: BASE)?|OPTIONAL|OR|ORELSE|OUT|OVERLOADS|OVERRIDABLE|OVERRIDES|PARAMARRAY|PARTIAL|POKE|PRIVATE|PROPERTY|PROTECTED|PUBLIC|PUT|RAISEEVENT|READ|READONLY|REDIM|REM|REMOVEHANDLER|RESTORE|RESUME|RETURN|RMDIR|RSET|RUN|SBYTE|SELECT(?: CASE)?|SET|SHADOWS|SHARED|SHORT|SINGLE|SHELL|SLEEP|STATIC|STEP|STOP|STRING|STRUCTURE|SUB|SYNCLOCK|SWAP|SYSTEM|THEN|THROW|TIMER|TO|TROFF|TRON|TRUE|TRY|TRYCAST|TYPE|TYPEOF|UINTEGER|ULONG|UNLOCK|UNTIL|USHORT|USING|VIEW PRINT|WAIT|WEND|WHEN|WHILE|WIDENING|WITH|WITHEVENTS|WRITE|WRITEONLY|XOR)|\B(?:#CONST|#ELSE|#ELSEIF|#END|#IF))(?:\$|\b)/i + 'string': { + pattern: /(^|[^"])"(?:""|[^"])*"(?!")/i, + lookbehind: true, + greedy: true + }, + 'keyword': /(?:\b(?:ADDHANDLER|ADDRESSOF|ALIAS|AND|ANDALSO|AS|BEEP|BLOAD|BOOLEAN|BSAVE|BYREF|BYTE|BYVAL|CALL(?: ABSOLUTE)?|CASE|CATCH|CBOOL|CBYTE|CCHAR|CDATE|CDEC|CDBL|CHAIN|CHAR|CHDIR|CINT|CLASS|CLEAR|CLNG|CLOSE|CLS|COBJ|COM|COMMON|CONST|CONTINUE|CSBYTE|CSHORT|CSNG|CSTR|CTYPE|CUINT|CULNG|CUSHORT|DATA|DATE|DECIMAL|DECLARE|DEFAULT|DEF(?: FN| SEG|DBL|INT|LNG|SNG|STR)|DELEGATE|DIM|DIRECTCAST|DO|DOUBLE|ELSE|ELSEIF|END|ENUM|ENVIRON|ERASE|ERROR|EVENT|EXIT|FALSE|FIELD|FILES|FINALLY|FOR(?: EACH)?|FRIEND|FUNCTION|GET|GETTYPE|GETXMLNAMESPACE|GLOBAL|GOSUB|GOTO|HANDLES|IF|IMPLEMENTS|IMPORTS|IN|INHERITS|INPUT|INTEGER|INTERFACE|IOCTL|IS|ISNOT|KEY|KILL|LINE INPUT|LET|LIB|LIKE|LOCATE|LOCK|LONG|LOOP|LSET|ME|MKDIR|MOD|MODULE|MUSTINHERIT|MUSTOVERRIDE|MYBASE|MYCLASS|NAME|NAMESPACE|NARROWING|NEW|NEXT|NOT|NOTHING|NOTINHERITABLE|NOTOVERRIDABLE|OBJECT|OF|OFF|ON(?: COM| ERROR| KEY| TIMER)?|OPERATOR|OPEN|OPTION(?: BASE)?|OPTIONAL|OR|ORELSE|OUT|OVERLOADS|OVERRIDABLE|OVERRIDES|PARAMARRAY|PARTIAL|POKE|PRIVATE|PROPERTY|PROTECTED|PUBLIC|PUT|RAISEEVENT|READ|READONLY|REDIM|REM|REMOVEHANDLER|RESTORE|RESUME|RETURN|RMDIR|RSET|RUN|SBYTE|SELECT(?: CASE)?|SET|SHADOWS|SHARED|SHORT|SINGLE|SHELL|SLEEP|STATIC|STEP|STOP|STRING|STRUCTURE|SUB|SYNCLOCK|SWAP|SYSTEM|THEN|THROW|TIMER|TO|TROFF|TRON|TRUE|TRY|TRYCAST|TYPE|TYPEOF|UINTEGER|ULONG|UNLOCK|UNTIL|USHORT|USING|VIEW PRINT|WAIT|WEND|WHEN|WHILE|WIDENING|WITH|WITHEVENTS|WRITE|WRITEONLY|XOR)|\B(?:#CONST|#ELSE|#ELSEIF|#END|#IF))(?:\$|\b)/i, + 'punctuation': /[,;:(){}]/ }); diff --git a/components/prism-vbnet.min.js b/components/prism-vbnet.min.js index af47bf8c45..c45f14c128 100644 --- a/components/prism-vbnet.min.js +++ b/components/prism-vbnet.min.js @@ -1 +1 @@ -Prism.languages.vbnet=Prism.languages.extend("basic",{comment:[{pattern:/(?:!|REM\b).+/i,inside:{keyword:/^REM/i}},{pattern:/(^|[^\\:])'.*/,lookbehind:!0}],keyword:/(?:\b(?:ADDHANDLER|ADDRESSOF|ALIAS|AND|ANDALSO|AS|BEEP|BLOAD|BOOLEAN|BSAVE|BYREF|BYTE|BYVAL|CALL(?: ABSOLUTE)?|CASE|CATCH|CBOOL|CBYTE|CCHAR|CDATE|CDEC|CDBL|CHAIN|CHAR|CHDIR|CINT|CLASS|CLEAR|CLNG|CLOSE|CLS|COBJ|COM|COMMON|CONST|CONTINUE|CSBYTE|CSHORT|CSNG|CSTR|CTYPE|CUINT|CULNG|CUSHORT|DATA|DATE|DECIMAL|DECLARE|DEFAULT|DEF(?: FN| SEG|DBL|INT|LNG|SNG|STR)|DELEGATE|DIM|DIRECTCAST|DO|DOUBLE|ELSE|ELSEIF|END|ENUM|ENVIRON|ERASE|ERROR|EVENT|EXIT|FALSE|FIELD|FILES|FINALLY|FOR(?: EACH)?|FRIEND|FUNCTION|GET|GETTYPE|GETXMLNAMESPACE|GLOBAL|GOSUB|GOTO|HANDLES|IF|IMPLEMENTS|IMPORTS|IN|INHERITS|INPUT|INTEGER|INTERFACE|IOCTL|IS|ISNOT|KEY|KILL|LINE INPUT|LET|LIB|LIKE|LOCATE|LOCK|LONG|LOOP|LSET|ME|MKDIR|MOD|MODULE|MUSTINHERIT|MUSTOVERRIDE|MYBASE|MYCLASS|NAME|NAMESPACE|NARROWING|NEW|NEXT|NOT|NOTHING|NOTINHERITABLE|NOTOVERRIDABLE|OBJECT|OF|OFF|ON(?: COM| ERROR| KEY| TIMER)?|OPERATOR|OPEN|OPTION(?: BASE)?|OPTIONAL|OR|ORELSE|OUT|OVERLOADS|OVERRIDABLE|OVERRIDES|PARAMARRAY|PARTIAL|POKE|PRIVATE|PROPERTY|PROTECTED|PUBLIC|PUT|RAISEEVENT|READ|READONLY|REDIM|REM|REMOVEHANDLER|RESTORE|RESUME|RETURN|RMDIR|RSET|RUN|SBYTE|SELECT(?: CASE)?|SET|SHADOWS|SHARED|SHORT|SINGLE|SHELL|SLEEP|STATIC|STEP|STOP|STRING|STRUCTURE|SUB|SYNCLOCK|SWAP|SYSTEM|THEN|THROW|TIMER|TO|TROFF|TRON|TRUE|TRY|TRYCAST|TYPE|TYPEOF|UINTEGER|ULONG|UNLOCK|UNTIL|USHORT|USING|VIEW PRINT|WAIT|WEND|WHEN|WHILE|WIDENING|WITH|WITHEVENTS|WRITE|WRITEONLY|XOR)|\B(?:#CONST|#ELSE|#ELSEIF|#END|#IF))(?:\$|\b)/i}); \ No newline at end of file +Prism.languages.vbnet=Prism.languages.extend("basic",{comment:[{pattern:/(?:!|REM\b).+/i,inside:{keyword:/^REM/i}},{pattern:/(^|[^\\:])'.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(^|[^"])"(?:""|[^"])*"(?!")/i,lookbehind:!0,greedy:!0},keyword:/(?:\b(?:ADDHANDLER|ADDRESSOF|ALIAS|AND|ANDALSO|AS|BEEP|BLOAD|BOOLEAN|BSAVE|BYREF|BYTE|BYVAL|CALL(?: ABSOLUTE)?|CASE|CATCH|CBOOL|CBYTE|CCHAR|CDATE|CDEC|CDBL|CHAIN|CHAR|CHDIR|CINT|CLASS|CLEAR|CLNG|CLOSE|CLS|COBJ|COM|COMMON|CONST|CONTINUE|CSBYTE|CSHORT|CSNG|CSTR|CTYPE|CUINT|CULNG|CUSHORT|DATA|DATE|DECIMAL|DECLARE|DEFAULT|DEF(?: FN| SEG|DBL|INT|LNG|SNG|STR)|DELEGATE|DIM|DIRECTCAST|DO|DOUBLE|ELSE|ELSEIF|END|ENUM|ENVIRON|ERASE|ERROR|EVENT|EXIT|FALSE|FIELD|FILES|FINALLY|FOR(?: EACH)?|FRIEND|FUNCTION|GET|GETTYPE|GETXMLNAMESPACE|GLOBAL|GOSUB|GOTO|HANDLES|IF|IMPLEMENTS|IMPORTS|IN|INHERITS|INPUT|INTEGER|INTERFACE|IOCTL|IS|ISNOT|KEY|KILL|LINE INPUT|LET|LIB|LIKE|LOCATE|LOCK|LONG|LOOP|LSET|ME|MKDIR|MOD|MODULE|MUSTINHERIT|MUSTOVERRIDE|MYBASE|MYCLASS|NAME|NAMESPACE|NARROWING|NEW|NEXT|NOT|NOTHING|NOTINHERITABLE|NOTOVERRIDABLE|OBJECT|OF|OFF|ON(?: COM| ERROR| KEY| TIMER)?|OPERATOR|OPEN|OPTION(?: BASE)?|OPTIONAL|OR|ORELSE|OUT|OVERLOADS|OVERRIDABLE|OVERRIDES|PARAMARRAY|PARTIAL|POKE|PRIVATE|PROPERTY|PROTECTED|PUBLIC|PUT|RAISEEVENT|READ|READONLY|REDIM|REM|REMOVEHANDLER|RESTORE|RESUME|RETURN|RMDIR|RSET|RUN|SBYTE|SELECT(?: CASE)?|SET|SHADOWS|SHARED|SHORT|SINGLE|SHELL|SLEEP|STATIC|STEP|STOP|STRING|STRUCTURE|SUB|SYNCLOCK|SWAP|SYSTEM|THEN|THROW|TIMER|TO|TROFF|TRON|TRUE|TRY|TRYCAST|TYPE|TYPEOF|UINTEGER|ULONG|UNLOCK|UNTIL|USHORT|USING|VIEW PRINT|WAIT|WEND|WHEN|WHILE|WIDENING|WITH|WITHEVENTS|WRITE|WRITEONLY|XOR)|\B(?:#CONST|#ELSE|#ELSEIF|#END|#IF))(?:\$|\b)/i,punctuation:/[,;:(){}]/}); \ No newline at end of file diff --git a/tests/languages/vbnet/issue2781.test b/tests/languages/vbnet/issue2781.test new file mode 100644 index 0000000000..4e8441bf8d --- /dev/null +++ b/tests/languages/vbnet/issue2781.test @@ -0,0 +1,24 @@ +bob = new SqlCommand("Select * from test Where Code=@Code"); +bob = new SqlCommand("Select * from test Where Code=Code"); + +---------------------------------------------------- + +[ + "bob ", + ["operator", "="], + ["keyword", "new"], + " SqlCommand", + ["punctuation", "("], + ["string", "\"Select * from test Where Code=@Code\""], + ["punctuation", ")"], + ["punctuation", ";"], + + "\nbob ", + ["operator", "="], + ["keyword", "new"], + " SqlCommand", + ["punctuation", "("], + ["string", "\"Select * from test Where Code=Code\""], + ["punctuation", ")"], + ["punctuation", ";"] +] \ No newline at end of file diff --git a/tests/languages/vbnet/punctuation_feature.test b/tests/languages/vbnet/punctuation_feature.test new file mode 100644 index 0000000000..762103bc35 --- /dev/null +++ b/tests/languages/vbnet/punctuation_feature.test @@ -0,0 +1,15 @@ +, ; : +( ) { } + +---------------------------------------------------- + +[ + ["punctuation", ","], + ["punctuation", ";"], + ["punctuation", ":"], + + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", "{"], + ["punctuation", "}"] +] \ No newline at end of file diff --git a/tests/languages/vbnet/string_feature.test b/tests/languages/vbnet/string_feature.test new file mode 100644 index 0000000000..4cb31fe4f0 --- /dev/null +++ b/tests/languages/vbnet/string_feature.test @@ -0,0 +1,17 @@ +Dim x = "hello +world" + +Console.WriteLine("Message: {0}", message) + +---------------------------------------------------- + +[ + ["keyword", "Dim"], " x ", ["operator", "="], ["string", "\"hello\nworld\""], + + "\n\nConsole.WriteLine", + ["punctuation", "("], + ["string", "\"Message: {0}\""], + ["punctuation", ","], + " message", + ["punctuation", ")"] +] \ No newline at end of file From 99a21dc52bd054bbc5786ba1cc52457ad729d69a Mon Sep 17 00:00:00 2001 From: edukisto <52005215+edukisto@users.noreply.github.com> Date: Sat, 13 Mar 2021 18:11:19 +0300 Subject: [PATCH 0749/1100] Added support for False (#2802) --- components.js | 2 +- components.json | 4 ++ components/prism-false.js | 32 ++++++++++ components/prism-false.min.js | 1 + examples/prism-false.html | 52 +++++++++++++++ tests/identifier-test.js | 5 ++ .../false/assembler_code_feature.test | 13 ++++ .../false/character_code_feature.test | 16 +++++ tests/languages/false/comment_feature.test | 26 ++++++++ tests/languages/false/operator_feature.test | 59 +++++++++++++++++ .../languages/false/punctuation_feature.test | 13 ++++ tests/languages/false/string_feature.test | 22 +++++++ tests/languages/false/variable_feature.test | 63 +++++++++++++++++++ 13 files changed, 307 insertions(+), 1 deletion(-) create mode 100644 components/prism-false.js create mode 100644 components/prism-false.min.js create mode 100644 examples/prism-false.html create mode 100644 tests/languages/false/assembler_code_feature.test create mode 100644 tests/languages/false/character_code_feature.test create mode 100644 tests/languages/false/comment_feature.test create mode 100644 tests/languages/false/operator_feature.test create mode 100644 tests/languages/false/punctuation_feature.test create mode 100644 tests/languages/false/string_feature.test create mode 100644 tests/languages/false/variable_feature.test diff --git a/components.js b/components.js index 1ff7f99926..29fc5c99d5 100644 --- a/components.js +++ b/components.js @@ -1,2 +1,2 @@ -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml","ssml","atom","rss"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","ssml":"SSML","atom":"Atom","rss":"RSS"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","optional":"regex","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"ABNF","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"agda":{"title":"Agda","owner":"xy-ren"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apex":{"title":"Apex","require":["clike","sql"],"owner":"RunDevelopment"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"dkern"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"birb":{"title":"Birb","require":"clike","owner":"Calamity210"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"BNF","alias":"rbnf","aliasTitles":{"rbnf":"RBNF"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"bsl":{"title":"BSL (1C:Enterprise)","alias":"oscript","aliasTitles":{"oscript":"OneScript"},"owner":"Diversus23"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cfscript":{"title":"CFScript","require":"clike","alias":"cfc","owner":"mjclemente"},"chaiscript":{"title":"ChaiScript","require":["clike","cpp"],"owner":"RunDevelopment"},"cil":{"title":"CIL","owner":"sbrl"},"clojure":{"title":"Clojure","owner":"troglotit"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"cypher":{"title":"Cypher","owner":"RunDevelopment"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dataweave":{"title":"DataWeave","owner":"machaval"},"dax":{"title":"DAX","owner":"peterbud"},"dhall":{"title":"Dhall","owner":"RunDevelopment"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"dot":{"title":"DOT (Graphviz)","alias":"gv","optional":"markup","owner":"RunDevelopment"},"ebnf":{"title":"EBNF","owner":"RunDevelopment"},"editorconfig":{"title":"EditorConfig","owner":"osipxd"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"c","owner":"Golmote"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","optional":["markdown"],"owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"hlsl":{"title":"HLSL","require":"c","owner":"RunDevelopment"},"http":{"title":"HTTP","optional":["css","javascript","json","markup","uri"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"icu-message-format":{"title":"ICU Message Format","owner":"RunDevelopment"},"idris":{"title":"Idris","alias":"idr","owner":"KeenS","require":"haskell"},"ignore":{"title":".ignore","owner":"osipxd","alias":["gitignore","hgignore","npmignore"],"aliasTitles":{"gitignore":".gitignore","hgignore":".hgignore","npmignore":".npmignore"}},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike","typescript"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","alias":"webmanifest","aliasTitles":{"webmanifest":"Web App Manifest"},"owner":"CupOfTea696"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"jsstacktrace":{"title":"JS stack trace","owner":"sbrl"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","alias":["kt","kts"],"aliasTitles":{"kts":"Kotlin Script"},"require":"clike","owner":"Golmote"},"kumir":{"title":"KuMir (КуМир)","alias":"kum","owner":"edukisto"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","optional":"yaml","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"mongodb":{"title":"MongoDB","owner":"airs0urce","require":"javascript"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"naniscript":{"title":"Naninovel Script","owner":"Elringus","alias":"nani"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"psl":{"title":"PATROL Scripting Language","owner":"bertysentry"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":"markup-templating","owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"promql":{"title":"PromQL","owner":"arendjr"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"purebasic":{"title":"PureBasic","require":"clike","alias":"pbfasm","owner":"HeX0R101"},"purescript":{"title":"PureScript","require":"haskell","alias":"purs","owner":"sriharshachilakapati"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"racket":{"title":"Racket","require":"scheme","alias":"rkt","owner":"RunDevelopment"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","owner":"RunDevelopment"},"rego":{"title":"Rego","owner":"JordanSh"},"renpy":{"title":"Ren'py","alias":"rpy","owner":"HyuchiaDiego"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","alias":["sh-session","shellsession"],"owner":"RunDevelopment"},"smali":{"title":"Smali","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sml":{"title":"SML","alias":"smlnj","aliasTitles":{"smlnj":"SML/NJ"},"owner":"RunDevelopment"},"solidity":{"title":"Solidity (Ethereum)","alias":"sol","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"squirrel":{"title":"Squirrel","require":"clike","owner":"RunDevelopment"},"stan":{"title":"Stan","owner":"RunDevelopment"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","vbnet"],"owner":"RunDevelopment"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"typoscript":{"title":"TypoScript","alias":"tsconfig","aliasTitles":{"tsconfig":"TSConfig"},"owner":"dkern"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"uri":{"title":"URI","alias":"url","aliasTitles":{"url":"URL"},"owner":"RunDevelopment"},"v":{"title":"V","require":"clike","owner":"taggon"},"vala":{"title":"Vala","require":"clike","optional":"regex","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":["vb","vba"],"aliasTitles":{"vba":"VBA"},"owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xml-doc":{"title":"XML doc (.net)","require":"markup","modify":["csharp","fsharp","vbnet"],"owner":"RunDevelopment"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"yang":{"title":"YANG","owner":"RunDevelopment"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml","ssml","atom","rss"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","ssml":"SSML","atom":"Atom","rss":"RSS"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","optional":"regex","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"ABNF","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"agda":{"title":"Agda","owner":"xy-ren"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apex":{"title":"Apex","require":["clike","sql"],"owner":"RunDevelopment"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"dkern"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"birb":{"title":"Birb","require":"clike","owner":"Calamity210"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"BNF","alias":"rbnf","aliasTitles":{"rbnf":"RBNF"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"bsl":{"title":"BSL (1C:Enterprise)","alias":"oscript","aliasTitles":{"oscript":"OneScript"},"owner":"Diversus23"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cfscript":{"title":"CFScript","require":"clike","alias":"cfc","owner":"mjclemente"},"chaiscript":{"title":"ChaiScript","require":["clike","cpp"],"owner":"RunDevelopment"},"cil":{"title":"CIL","owner":"sbrl"},"clojure":{"title":"Clojure","owner":"troglotit"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"cypher":{"title":"Cypher","owner":"RunDevelopment"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dataweave":{"title":"DataWeave","owner":"machaval"},"dax":{"title":"DAX","owner":"peterbud"},"dhall":{"title":"Dhall","owner":"RunDevelopment"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"dot":{"title":"DOT (Graphviz)","alias":"gv","optional":"markup","owner":"RunDevelopment"},"ebnf":{"title":"EBNF","owner":"RunDevelopment"},"editorconfig":{"title":"EditorConfig","owner":"osipxd"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"false":{"title":"False","owner":"edukisto"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"c","owner":"Golmote"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","optional":["markdown"],"owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"hlsl":{"title":"HLSL","require":"c","owner":"RunDevelopment"},"http":{"title":"HTTP","optional":["css","javascript","json","markup","uri"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"icu-message-format":{"title":"ICU Message Format","owner":"RunDevelopment"},"idris":{"title":"Idris","alias":"idr","owner":"KeenS","require":"haskell"},"ignore":{"title":".ignore","owner":"osipxd","alias":["gitignore","hgignore","npmignore"],"aliasTitles":{"gitignore":".gitignore","hgignore":".hgignore","npmignore":".npmignore"}},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike","typescript"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","alias":"webmanifest","aliasTitles":{"webmanifest":"Web App Manifest"},"owner":"CupOfTea696"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"jsstacktrace":{"title":"JS stack trace","owner":"sbrl"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","alias":["kt","kts"],"aliasTitles":{"kts":"Kotlin Script"},"require":"clike","owner":"Golmote"},"kumir":{"title":"KuMir (КуМир)","alias":"kum","owner":"edukisto"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","optional":"yaml","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"mongodb":{"title":"MongoDB","owner":"airs0urce","require":"javascript"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"naniscript":{"title":"Naninovel Script","owner":"Elringus","alias":"nani"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"psl":{"title":"PATROL Scripting Language","owner":"bertysentry"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":"markup-templating","owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"promql":{"title":"PromQL","owner":"arendjr"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"purebasic":{"title":"PureBasic","require":"clike","alias":"pbfasm","owner":"HeX0R101"},"purescript":{"title":"PureScript","require":"haskell","alias":"purs","owner":"sriharshachilakapati"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"racket":{"title":"Racket","require":"scheme","alias":"rkt","owner":"RunDevelopment"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","owner":"RunDevelopment"},"rego":{"title":"Rego","owner":"JordanSh"},"renpy":{"title":"Ren'py","alias":"rpy","owner":"HyuchiaDiego"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","alias":["sh-session","shellsession"],"owner":"RunDevelopment"},"smali":{"title":"Smali","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sml":{"title":"SML","alias":"smlnj","aliasTitles":{"smlnj":"SML/NJ"},"owner":"RunDevelopment"},"solidity":{"title":"Solidity (Ethereum)","alias":"sol","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"squirrel":{"title":"Squirrel","require":"clike","owner":"RunDevelopment"},"stan":{"title":"Stan","owner":"RunDevelopment"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","vbnet"],"owner":"RunDevelopment"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"typoscript":{"title":"TypoScript","alias":"tsconfig","aliasTitles":{"tsconfig":"TSConfig"},"owner":"dkern"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"uri":{"title":"URI","alias":"url","aliasTitles":{"url":"URL"},"owner":"RunDevelopment"},"v":{"title":"V","require":"clike","owner":"taggon"},"vala":{"title":"Vala","require":"clike","optional":"regex","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":["vb","vba"],"aliasTitles":{"vba":"VBA"},"owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xml-doc":{"title":"XML doc (.net)","require":"markup","modify":["csharp","fsharp","vbnet"],"owner":"RunDevelopment"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"yang":{"title":"YANG","owner":"RunDevelopment"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; if (typeof module !== 'undefined' && module.exports) { module.exports = components; } \ No newline at end of file diff --git a/components.json b/components.json index a70db25399..468b6e72f2 100644 --- a/components.json +++ b/components.json @@ -396,6 +396,10 @@ "title": "Factor", "owner": "catb0t" }, + "false": { + "title": "False", + "owner": "edukisto" + }, "firestore-security-rules": { "title": "Firestore security rules", "require": "clike", diff --git a/components/prism-false.js b/components/prism-false.js new file mode 100644 index 0000000000..f95af6efcd --- /dev/null +++ b/components/prism-false.js @@ -0,0 +1,32 @@ +(function (Prism) { + /** + * Based on the manual by Wouter van Oortmerssen. + * + * @see {@link https://github.com/PrismJS/prism/issues/2801#issue-829717504} + */ + Prism.languages['false'] = { + 'comment': { + pattern: /\{[^}]*\}/ + }, + 'string': { + pattern: /"[^"]*"/, + greedy: true + }, + 'character-code': { + pattern: /'[\S\s]/, + alias: 'number' + }, + 'assembler-code': { + pattern: /\d+`/, + alias: 'important' + }, + 'number': /\d+/, + 'operator': /[-!#$%&'*+,./:;=>?@\\^_`|~ßø]/, + 'punctuation': /\[|\]/, + 'variable': /[a-z]/, + 'non-standard': { + pattern: /[()?@\\^_`|~ßø]/,punctuation:/\[|\]/,variable:/[a-z]/,"non-standard":{pattern:/[()Hello, world!

        + +
        "Hello, world!"
        + +

        Lambda functions

        + +

        Increment

        + +
        5 [7+]! . {Outputs 12.}
        + +

        Square numbers

        + +
        [$*] s: 7s;! . {Outputs 49.}
        + +

        Conditions

        + +

        Equal, less, or greater than

        + +
        5x:
        +7y:
        +x;y;=
        +$
        +x;
        +.
        +[" equals "]?
        +~[
        +    x;y;>
        +    $
        +    [" is greater than "]?
        +    ~[" is less than "]?
        +]?
        +y;
        +.
        + +

        Loops

        + +

        English alphabet

        + +
        'Ai: 'Zm: 1m;+ m: [m;i;>][i;, 1i;+ i:]#
        + +

        Ten Green Bottles

        + +
        [$ . " green bottle" 1> ["s"]? ".
        +"] f:
        +10n: [n;0>][n;f;! n;1- n:]#
        + +

        User input

        + +

        Reverse a string

        + +
        "Enter the string character by character (or a space to finish):
        +"0i: [ß ^ $ 32=~][i;1+ i:]# % "Reverse: " [i;0>][, i;1- i:]#
        diff --git a/tests/identifier-test.js b/tests/identifier-test.js index 860375457e..8f288780b1 100644 --- a/tests/identifier-test.js +++ b/tests/identifier-test.js @@ -35,6 +35,11 @@ const testOptions = { template: false }, + 'false': { + word: false, + template: false + }, + // LilyPond doesn't tokenize based on words 'lilypond': { word: false, diff --git a/tests/languages/false/assembler_code_feature.test b/tests/languages/false/assembler_code_feature.test new file mode 100644 index 0000000000..22eec549f4 --- /dev/null +++ b/tests/languages/false/assembler_code_feature.test @@ -0,0 +1,13 @@ +0` +65535` + +---------------------------------------------------- + +[ + ["assembler-code", "0`"], + ["assembler-code", "65535`"] +] + +---------------------------------------------------- + +Checks for assembler codes. diff --git a/tests/languages/false/character_code_feature.test b/tests/languages/false/character_code_feature.test new file mode 100644 index 0000000000..2280f35e66 --- /dev/null +++ b/tests/languages/false/character_code_feature.test @@ -0,0 +1,16 @@ +' +' +' +'' + +---------------------------------------------------- + +[ + ["character-code", "'\n"], ["character-code", "'\t"], + ["character-code", "' "], + ["character-code", "''"] +] + +---------------------------------------------------- + +Checks for character codes. diff --git a/tests/languages/false/comment_feature.test b/tests/languages/false/comment_feature.test new file mode 100644 index 0000000000..13f4aff1cd --- /dev/null +++ b/tests/languages/false/comment_feature.test @@ -0,0 +1,26 @@ +{ +} +{!#$%&'*+,-./:;=>?@[\]^_`|~ßø} +{""} +{foo} +{{} +{} +{}{} +{}} + +---------------------------------------------------- + +[ + ["comment", "{\n}"], + ["comment", "{!#$%&'*+,-./:;=>?@[\\]^_`|~ßø}"], + ["comment", "{\"\"}"], + ["comment", "{foo}"], + ["comment", "{{}"], + ["comment", "{}"], + ["comment", "{}"], ["comment", "{}"], + ["comment", "{}"], "}" +] + +---------------------------------------------------- + +Checks for comments. diff --git a/tests/languages/false/operator_feature.test b/tests/languages/false/operator_feature.test new file mode 100644 index 0000000000..6b23f50e15 --- /dev/null +++ b/tests/languages/false/operator_feature.test @@ -0,0 +1,59 @@ +! +# +$ +% +& +* ++ +, +- +. +/ +: +; += +> +? +@ +\ +^ +_ +` +| +~ +ß +ø + +---------------------------------------------------- + +[ + ["operator", "!"], + ["operator", "#"], + ["operator", "$"], + ["operator", "%"], + ["operator", "&"], + ["operator", "*"], + ["operator", "+"], + ["operator", ","], + ["operator", "-"], + ["operator", "."], + ["operator", "/"], + ["operator", ":"], + ["operator", ";"], + ["operator", "="], + ["operator", ">"], + ["operator", "?"], + ["operator", "@"], + ["operator", "\\"], + ["operator", "^"], + ["operator", "_"], + ["operator", "`"], + ["operator", "|"], + ["operator", "~"], + ["operator", "ß"], + ["operator", "ø"] +] + +---------------------------------------------------- + +Checks for operators. diff --git a/tests/languages/false/punctuation_feature.test b/tests/languages/false/punctuation_feature.test new file mode 100644 index 0000000000..d447862c08 --- /dev/null +++ b/tests/languages/false/punctuation_feature.test @@ -0,0 +1,13 @@ +[ +] + +---------------------------------------------------- + +[ + ["punctuation", "["], + ["punctuation", "]"] +] + +---------------------------------------------------- + +Checks for punctuation marks. diff --git a/tests/languages/false/string_feature.test b/tests/languages/false/string_feature.test new file mode 100644 index 0000000000..b9baf89236 --- /dev/null +++ b/tests/languages/false/string_feature.test @@ -0,0 +1,22 @@ +" +" +"!#$%&'*+,-./:;=>?@[\]^_`|~ßø" +"" +"""" +"foo" +"{}" + +---------------------------------------------------- + +[ + ["string", "\"\n\""], + ["string", "\"!#$%&'*+,-./:;=>?@[\\]^_`|~ßø\""], + ["string", "\"\""], + ["string", "\"\""], ["string", "\"\""], + ["string", "\"foo\""], + ["string", "\"{}\""] +] + +---------------------------------------------------- + +Checks for strings. diff --git a/tests/languages/false/variable_feature.test b/tests/languages/false/variable_feature.test new file mode 100644 index 0000000000..01f09bbf2a --- /dev/null +++ b/tests/languages/false/variable_feature.test @@ -0,0 +1,63 @@ +a +b +c +d +e +f +g +h +i +j +k +l +m +n +o +p +q +r +s +t +u +v +w +x +y +z +zzz + +---------------------------------------------------- + +[ + ["variable", "a"], + ["variable", "b"], + ["variable", "c"], + ["variable", "d"], + ["variable", "e"], + ["variable", "f"], + ["variable", "g"], + ["variable", "h"], + ["variable", "i"], + ["variable", "j"], + ["variable", "k"], + ["variable", "l"], + ["variable", "m"], + ["variable", "n"], + ["variable", "o"], + ["variable", "p"], + ["variable", "q"], + ["variable", "r"], + ["variable", "s"], + ["variable", "t"], + ["variable", "u"], + ["variable", "v"], + ["variable", "w"], + ["variable", "x"], + ["variable", "y"], + ["variable", "z"], + ["variable", "z"], ["variable", "z"], ["variable", "z"] +] + +---------------------------------------------------- + +Checks for variables. From 459365ecc110ba205d84286a6d8cd6895778881f Mon Sep 17 00:00:00 2001 From: XojoGermany <1276539+XojoGermany@users.noreply.github.com> Date: Wed, 17 Mar 2021 00:43:23 +0100 Subject: [PATCH 0750/1100] Xojo: Added missing keywords (#2805) --- components/prism-xojo.js | 4 +- components/prism-xojo.min.js | 2 +- tests/languages/xojo/keyword_feature.test | 100 +++++++++++++++++++++- 3 files changed, 102 insertions(+), 4 deletions(-) diff --git a/components/prism-xojo.js b/components/prism-xojo.js index 47bfe791d3..32d2618a34 100644 --- a/components/prism-xojo.js +++ b/components/prism-xojo.js @@ -14,7 +14,7 @@ Prism.languages.xojo = { /&[bchou][a-z\d]+/i ], 'symbol': /#(?:If|Else|ElseIf|Endif|Pragma)\b/i, - 'keyword': /\b(?:AddHandler|App|Array|As(?:signs)?|By(?:Ref|Val)|Break|Call|Case|Catch|Const|Continue|CurrentMethodName|Declare|Dim|Do(?:wnTo)?|Each|Else(?:If)?|End|Exit|Extends|False|Finally|For|Global|If|In|Lib|Loop|Me|Next|Nil|Optional|ParamArray|Raise(?:Event)?|ReDim|Rem|RemoveHandler|Return|Select|Self|Soft|Static|Step|Super|Then|To|True|Try|Ubound|Until|Using|Wend|While)\b/i, + 'keyword': /\b(?:AddHandler|App|Array|As(?:signs)?|Auto|By(?:Ref|Val)|Boolean|Break|Byte|Call|Case|Catch|CFStringRef|CGFloat|Class|Color|Const|Continue|CString|Currency|CurrentMethodName|Declare|Delegate|Dim|Do(?:uble|wnTo)?|Each|Else(?:If)?|End|Enumeration|Event|Exception|Exit|Extends|False|Finally|For|Function|Get|GetTypeInfo|Global|GOTO|If|Implements|In|Inherits|Int(?:erface|eger|8|16|32|64)?|Lib|Loop|Me|Module|Next|Nil|Object|Optional|OSType|ParamArray|Private|Property|Protected|PString|Ptr|Raise(?:Event)?|ReDim|Rem|RemoveHandler|Return|Select|Self|Set|Single|Shared|Short|Soft|Static|Step|String|Sub|Super|Text|Then|To|True|Try|Ubound|UInt(?:eger|8|16|32|64)?|Until|Using|Var(?:iant)?|Wend|While|WindowPtr|WString)\b/i, 'operator': /<[=>]?|>=?|[+\-*\/\\^=]|\b(?:AddressOf|And|Ctype|IsA?|Mod|New|Not|Or|Xor|WeakAddressOf)\b/i, 'punctuation': /[.,;:()]/ -}; +}; \ No newline at end of file diff --git a/components/prism-xojo.min.js b/components/prism-xojo.min.js index 2f07a90b56..a897cf4b2c 100644 --- a/components/prism-xojo.min.js +++ b/components/prism-xojo.min.js @@ -1 +1 @@ -Prism.languages.xojo={comment:{pattern:/(?:'|\/\/|Rem\b).+/i,inside:{keyword:/^Rem/i}},string:{pattern:/"(?:""|[^"])*"/,greedy:!0},number:[/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:E[+-]?\d+)?/i,/&[bchou][a-z\d]+/i],symbol:/#(?:If|Else|ElseIf|Endif|Pragma)\b/i,keyword:/\b(?:AddHandler|App|Array|As(?:signs)?|By(?:Ref|Val)|Break|Call|Case|Catch|Const|Continue|CurrentMethodName|Declare|Dim|Do(?:wnTo)?|Each|Else(?:If)?|End|Exit|Extends|False|Finally|For|Global|If|In|Lib|Loop|Me|Next|Nil|Optional|ParamArray|Raise(?:Event)?|ReDim|Rem|RemoveHandler|Return|Select|Self|Soft|Static|Step|Super|Then|To|True|Try|Ubound|Until|Using|Wend|While)\b/i,operator:/<[=>]?|>=?|[+\-*\/\\^=]|\b(?:AddressOf|And|Ctype|IsA?|Mod|New|Not|Or|Xor|WeakAddressOf)\b/i,punctuation:/[.,;:()]/}; \ No newline at end of file +Prism.languages.xojo={comment:{pattern:/(?:'|\/\/|Rem\b).+/i,inside:{keyword:/^Rem/i}},string:{pattern:/"(?:""|[^"])*"/,greedy:!0},number:[/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:E[+-]?\d+)?/i,/&[bchou][a-z\d]+/i],symbol:/#(?:If|Else|ElseIf|Endif|Pragma)\b/i,keyword:/\b(?:AddHandler|App|Array|As(?:signs)?|Auto|By(?:Ref|Val)|Boolean|Break|Byte|Call|Case|Catch|CFStringRef|CGFloat|Class|Color|Const|Continue|CString|Currency|CurrentMethodName|Declare|Delegate|Dim|Do(?:uble|wnTo)?|Each|Else(?:If)?|End|Enumeration|Event|Exception|Exit|Extends|False|Finally|For|Function|Get|GetTypeInfo|Global|GOTO|If|Implements|In|Inherits|Int(?:erface|eger|8|16|32|64)?|Lib|Loop|Me|Module|Next|Nil|Object|Optional|OSType|ParamArray|Private|Property|Protected|PString|Ptr|Raise(?:Event)?|ReDim|Rem|RemoveHandler|Return|Select|Self|Set|Single|Shared|Short|Soft|Static|Step|String|Sub|Super|Text|Then|To|True|Try|Ubound|UInt(?:eger|8|16|32|64)?|Until|Using|Var(?:iant)?|Wend|While|WindowPtr|WString)\b/i,operator:/<[=>]?|>=?|[+\-*\/\\^=]|\b(?:AddressOf|And|Ctype|IsA?|Mod|New|Not|Or|Xor|WeakAddressOf)\b/i,punctuation:/[.,;:()]/}; \ No newline at end of file diff --git a/tests/languages/xojo/keyword_feature.test b/tests/languages/xojo/keyword_feature.test index 52a419b245..afef7ae416 100644 --- a/tests/languages/xojo/keyword_feature.test +++ b/tests/languages/xojo/keyword_feature.test @@ -3,38 +3,71 @@ App Array As Assigns +Auto +Boolean ByRef +Byte ByVal Break Call Case Catch +CFStringRef +CGFloat +Class +Color Const Continue +CString +Currency CurrentMethodName Declare +Delegate Dim Do +Double DownTo Each Else ElseIf End +Enumeration +Event +Exception Exit Extends False Finally For +Function +Get +GetTypeInfo Global +GOTO If +Implements In +Inherits +Integer +Interface +Int8 +Int16 +Int32 +Int64 Lib Loop Me +Module Next Nil +Object Optional ParamArray +Private +Property +Protected +PString +Ptr Raise RaiseEvent ReDim @@ -43,19 +76,35 @@ RemoveHandler Return Select Self +Set +Single +Shared +Short Soft Static Step +String +Sub Super +Text Then To True Try Ubound +UInteger +UInt8 +UInt16 +UInt32 +UInt64 Until Using +Var +Variant Wend While +WindowPtr +WString ---------------------------------------------------- @@ -65,38 +114,71 @@ While ["keyword", "Array"], ["keyword", "As"], ["keyword", "Assigns"], + ["keyword", "Auto"], + ["keyword", "Boolean"], ["keyword", "ByRef"], + ["keyword", "Byte"], ["keyword", "ByVal"], ["keyword", "Break"], ["keyword", "Call"], ["keyword", "Case"], ["keyword", "Catch"], + ["keyword", "CFStringRef"], + ["keyword", "CGFloat"], + ["keyword", "Class"], + ["keyword", "Color"], ["keyword", "Const"], ["keyword", "Continue"], + ["keyword", "CString"], + ["keyword", "Currency"], ["keyword", "CurrentMethodName"], ["keyword", "Declare"], + ["keyword", "Delegate"], ["keyword", "Dim"], ["keyword", "Do"], + ["keyword", "Double"], ["keyword", "DownTo"], ["keyword", "Each"], ["keyword", "Else"], ["keyword", "ElseIf"], ["keyword", "End"], + ["keyword", "Enumeration"], + ["keyword", "Event"], + ["keyword", "Exception"], ["keyword", "Exit"], ["keyword", "Extends"], ["keyword", "False"], ["keyword", "Finally"], ["keyword", "For"], + ["keyword", "Function"], + ["keyword", "Get"], + ["keyword", "GetTypeInfo"], ["keyword", "Global"], + ["keyword", "GOTO"], ["keyword", "If"], + ["keyword", "Implements"], ["keyword", "In"], + ["keyword", "Inherits"], + ["keyword", "Integer"], + ["keyword", "Interface"], + ["keyword", "Int8"], + ["keyword", "Int16"], + ["keyword", "Int32"], + ["keyword", "Int64"], ["keyword", "Lib"], ["keyword", "Loop"], ["keyword", "Me"], + ["keyword", "Module"], ["keyword", "Next"], ["keyword", "Nil"], + ["keyword", "Object"], ["keyword", "Optional"], ["keyword", "ParamArray"], + ["keyword", "Private"], + ["keyword", "Property"], + ["keyword", "Protected"], + ["keyword", "PString"], + ["keyword", "Ptr"], ["keyword", "Raise"], ["keyword", "RaiseEvent"], ["keyword", "ReDim"], @@ -105,19 +187,35 @@ While ["keyword", "Return"], ["keyword", "Select"], ["keyword", "Self"], + ["keyword", "Set"], + ["keyword", "Single"], + ["keyword", "Shared"], + ["keyword", "Short"], ["keyword", "Soft"], ["keyword", "Static"], ["keyword", "Step"], + ["keyword", "String"], + ["keyword", "Sub"], ["keyword", "Super"], + ["keyword", "Text"], ["keyword", "Then"], ["keyword", "To"], ["keyword", "True"], ["keyword", "Try"], ["keyword", "Ubound"], + ["keyword", "UInteger"], + ["keyword", "UInt8"], + ["keyword", "UInt16"], + ["keyword", "UInt32"], + ["keyword", "UInt64"], ["keyword", "Until"], ["keyword", "Using"], + ["keyword", "Var"], + ["keyword", "Variant"], ["keyword", "Wend"], - ["keyword", "While"] + ["keyword", "While"], + ["keyword", "WindowPtr"], + ["keyword", "WString"] ] ---------------------------------------------------- From d5e14e1ab8139bc204500ef172deb3909f3d35a6 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Wed, 17 Mar 2021 11:10:56 +0100 Subject: [PATCH 0751/1100] Copy to clipboard: Removed ClipboardJS dependency (#2784) --- package-lock.json | 38 ------ package.json | 3 - plugins/copy-to-clipboard/index.html | 7 +- .../prism-copy-to-clipboard.js | 112 ++++++++++++------ .../prism-copy-to-clipboard.min.js | 2 +- 5 files changed, 77 insertions(+), 85 deletions(-) diff --git a/package-lock.json b/package-lock.json index 1a678c50f4..a93c8168f6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1025,17 +1025,6 @@ } } }, - "clipboard": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/clipboard/-/clipboard-2.0.4.tgz", - "integrity": "sha512-Vw26VSLRpJfBofiVaFb/I8PVfdI1OxKcYShe6fm0sP/DtmiWQNCjhM/okTvdCo0G+lMMm1rMYbk4IK4x1X+kgQ==", - "optional": true, - "requires": { - "good-listener": "^1.2.2", - "select": "^1.1.2", - "tiny-emitter": "^2.0.0" - } - }, "cliui": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", @@ -1563,12 +1552,6 @@ "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", "dev": true }, - "delegate": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/delegate/-/delegate-3.2.0.tgz", - "integrity": "sha512-IofjkYBZaZivn0V8nnsMJGBr4jVLxHDheKSW88PyxS5QC4Vo9ZbZVvhzlSxY87fVq3STR6r+4cGepyHkcWOQSw==", - "optional": true - }, "deprecation": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/deprecation/-/deprecation-2.3.1.tgz", @@ -2545,15 +2528,6 @@ "sparkles": "^1.0.0" } }, - "good-listener": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/good-listener/-/good-listener-1.2.2.tgz", - "integrity": "sha1-1TswzfkxPf+33JoNR3CWqm0UXFA=", - "optional": true, - "requires": { - "delegate": "^3.1.2" - } - }, "graceful-fs": { "version": "4.2.3", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.3.tgz", @@ -5730,12 +5704,6 @@ "integrity": "sha1-8aAymzCLIh+uN7mXTz1XjQypmeM=", "dev": true }, - "select": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/select/-/select-1.1.2.tgz", - "integrity": "sha1-DnNQrN7ICxEIUoeG7B1EGNEbOW0=", - "optional": true - }, "semver": { "version": "5.6.0", "resolved": "https://registry.npmjs.org/semver/-/semver-5.6.0.tgz", @@ -6308,12 +6276,6 @@ "integrity": "sha1-dkpaEa9QVhkhsTPztE5hhofg9cM=", "dev": true }, - "tiny-emitter": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/tiny-emitter/-/tiny-emitter-2.1.0.tgz", - "integrity": "sha512-NB6Dk1A9xgQPMoGqC5CVXn123gWyte215ONT5Pp5a0yt4nlEoO1ZWeCwpncaekPHXO60i47ihFnZPiRPjRMq4Q==", - "optional": true - }, "tmp": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.1.0.tgz", diff --git a/package.json b/package.json index a9fd2d37fa..1c13095f60 100755 --- a/package.json +++ b/package.json @@ -29,9 +29,6 @@ "author": "Lea Verou", "license": "MIT", "readmeFilename": "README.md", - "optionalDependencies": { - "clipboard": "^2.0.0" - }, "devDependencies": { "chai": "^4.2.0", "danger": "^10.5.0", diff --git a/plugins/copy-to-clipboard/index.html b/plugins/copy-to-clipboard/index.html index e8cf3e3105..9fdd6c568d 100644 --- a/plugins/copy-to-clipboard/index.html +++ b/plugins/copy-to-clipboard/index.html @@ -21,12 +21,7 @@

        How to use

        -

        The plugin depends on clipboard.js and the Prism Toolbar plugin. In addition to including the plugin file with your PrismJS build, ensure they are loaded before the plugin.

        - -

        The simplest way to include clipboard.js is to use any of the - recommended CDNs. If you're using Browserify, clipboard.js will be loaded automatically - if it's included in your package.json. - If you don't load clipboard.js yourself, the plugin will load it from a CDN for you.

        +

        The plugin depends on the Prism Toolbar plugin. In addition to including the plugin file with your PrismJS build, ensure it is loaded before the plugin.

        diff --git a/plugins/copy-to-clipboard/prism-copy-to-clipboard.js b/plugins/copy-to-clipboard/prism-copy-to-clipboard.js index 8ebf659856..d6e744fca9 100644 --- a/plugins/copy-to-clipboard/prism-copy-to-clipboard.js +++ b/plugins/copy-to-clipboard/prism-copy-to-clipboard.js @@ -9,30 +9,73 @@ return; } - var ClipboardJS = window.ClipboardJS || undefined; - - if (!ClipboardJS && typeof require === 'function') { - ClipboardJS = require('clipboard'); + /** + * When the given elements is clicked by the user, the given text will be copied to clipboard. + * + * @param {HTMLElement} element + * @param {CopyInfo} copyInfo + * + * @typedef CopyInfo + * @property {() => string} getText + * @property {() => void} success + * @property {(reason: unknown) => void} error + */ + function registerClipboard(element, copyInfo) { + element.addEventListener('click', function () { + copyTextToClipboard(copyInfo); + }); } - var callbacks = []; + // https://stackoverflow.com/a/30810322/7595472 + + /** @param {CopyInfo} copyInfo */ + function fallbackCopyTextToClipboard(copyInfo) { + var textArea = document.createElement("textarea"); + textArea.value = copyInfo.getText(); - if (!ClipboardJS) { - var script = document.createElement('script'); - var head = document.querySelector('head'); + // Avoid scrolling to bottom + textArea.style.top = "0"; + textArea.style.left = "0"; + textArea.style.position = "fixed"; - script.onload = function () { - ClipboardJS = window.ClipboardJS; + document.body.appendChild(textArea); + textArea.focus(); + textArea.select(); - if (ClipboardJS) { - while (callbacks.length) { - callbacks.pop()(); + try { + var successful = document.execCommand('copy'); + setTimeout(function () { + if (successful) { + copyInfo.success(); + } else { + copyInfo.error(); } - } - }; + }, 1); + } catch (err) { + setTimeout(function () { + copyInfo.error(err); + }, 1); + } - script.src = 'https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.0/clipboard.min.js'; - head.appendChild(script); + document.body.removeChild(textArea); + } + /** @param {CopyInfo} copyInfo */ + function copyTextToClipboard(copyInfo) { + if (navigator.clipboard) { + navigator.clipboard.writeText(copyInfo.getText()).then(copyInfo.success, copyInfo.error); + } else { + fallbackCopyTextToClipboard(copyInfo); + } + } + + /** + * Selects the text content of the given element. + * + * @param {Element} element + */ + function selectElementText(element) { + // https://stackoverflow.com/a/20079910/7595472 + window.getSelection().selectAllChildren(element) } /** @@ -74,32 +117,27 @@ linkCopy.textContent = settings['copy']; linkCopy.setAttribute('type', 'button'); - if (!ClipboardJS) { - callbacks.push(registerClipboard); - } else { - registerClipboard(); - } - - return linkCopy; - - function registerClipboard() { - var clip = new ClipboardJS(linkCopy, { - 'text': function () { - return element.textContent; - } - }); - - clip.on('success', function () { + registerClipboard(linkCopy, { + getText: function () { + return element.textContent; + }, + success: function () { linkCopy.textContent = settings['copy-success']; resetText(); - }); - clip.on('error', function () { + }, + error: function () { linkCopy.textContent = settings['copy-error']; + setTimeout(function () { + selectElementText(element); + }, 1); + resetText(); - }); - } + } + }); + + return linkCopy; function resetText() { setTimeout(function () { diff --git a/plugins/copy-to-clipboard/prism-copy-to-clipboard.min.js b/plugins/copy-to-clipboard/prism-copy-to-clipboard.min.js index 3a03d17678..d45ee5f21a 100644 --- a/plugins/copy-to-clipboard/prism-copy-to-clipboard.min.js +++ b/plugins/copy-to-clipboard/prism-copy-to-clipboard.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof self&&self.Prism&&self.document)if(Prism.plugins.toolbar){var c=window.ClipboardJS||void 0;c||"function"!=typeof require||(c=require("clipboard"));var u=[];if(!c){var t=document.createElement("script"),o=document.querySelector("head");t.onload=function(){if(c=window.ClipboardJS)for(;u.length;)u.pop()()},t.src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.0/clipboard.min.js",o.appendChild(t)}Prism.plugins.toolbar.registerButton("copy-to-clipboard",function(t){var o=t.element,e=function(t){var o={copy:"Copy","copy-error":"Press Ctrl+C to copy","copy-success":"Copied!","copy-timeout":5e3};for(var e in o){for(var n="data-prismjs-"+e,r=t;r&&!r.hasAttribute(n);)r=r.parentElement;r&&(o[e]=r.getAttribute(n))}return o}(o),n=document.createElement("button");return n.textContent=e.copy,n.setAttribute("type","button"),c?r():u.push(r),n;function r(){var t=new c(n,{text:function(){return o.textContent}});t.on("success",function(){n.textContent=e["copy-success"],i()}),t.on("error",function(){n.textContent=e["copy-error"],i()})}function i(){setTimeout(function(){n.textContent=e.copy},e["copy-timeout"])}})}else console.warn("Copy to Clipboard plugin loaded before Toolbar plugin.")}(); \ No newline at end of file +!function(){function c(t,e){t.addEventListener("click",function(){!function(t){navigator.clipboard?navigator.clipboard.writeText(t.getText()).then(t.success,t.error):function(e){var t=document.createElement("textarea");t.value=e.getText(),t.style.top="0",t.style.left="0",t.style.position="fixed",document.body.appendChild(t),t.focus(),t.select();try{var o=document.execCommand("copy");setTimeout(function(){o?e.success():e.error()},1)}catch(t){setTimeout(function(){e.error(t)},1)}document.body.removeChild(t)}(t)}(e)})}"undefined"!=typeof self&&self.Prism&&self.document&&(Prism.plugins.toolbar?Prism.plugins.toolbar.registerButton("copy-to-clipboard",function(t){var e=t.element,o=function(t){var e={copy:"Copy","copy-error":"Press Ctrl+C to copy","copy-success":"Copied!","copy-timeout":5e3};for(var o in e){for(var n="data-prismjs-"+o,r=t;r&&!r.hasAttribute(n);)r=r.parentElement;r&&(e[o]=r.getAttribute(n))}return e}(e),n=document.createElement("button");return n.textContent=o.copy,n.setAttribute("type","button"),c(n,{getText:function(){return e.textContent},success:function(){n.textContent=o["copy-success"],r()},error:function(){n.textContent=o["copy-error"],setTimeout(function(){!function(t){window.getSelection().selectAllChildren(t)}(e)},1),r()}}),n;function r(){setTimeout(function(){n.textContent=o.copy},o["copy-timeout"])}}):console.warn("Copy to Clipboard plugin loaded before Toolbar plugin."))}(); \ No newline at end of file From d298d46e139f7f00599f775de8d38b46dce05164 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Wed, 17 Mar 2021 11:13:07 +0100 Subject: [PATCH 0752/1100] Previewers: Use `classList` instead of `className` (#2787) --- plugins/previewers/prism-previewers.js | 25 ++++++++++++---------- plugins/previewers/prism-previewers.min.js | 2 +- 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/plugins/previewers/prism-previewers.js b/plugins/previewers/prism-previewers.js index d77ecbc007..78c6afaf8d 100644 --- a/plugins/previewers/prism-previewers.js +++ b/plugins/previewers/prism-previewers.js @@ -485,9 +485,9 @@ }; }; - var tokenRegexp = /(?:^|\s)token(?=$|\s)/; - var activeRegexp = /(?:^|\s)active(?=$|\s)/g; - var flippedRegexp = /(?:^|\s)flipped(?=$|\s)/g; + var TOKEN_CLASS = 'token'; + var ACTIVE_CLASS = 'active'; + var FLIPPED_CLASS = 'flipped'; /** * Previewer constructor @@ -500,7 +500,6 @@ var Previewer = function (type, updater, supportedLanguages, initializer) { this._elt = null; this._type = type; - this._clsRegexp = RegExp('(?:^|\\s)' + type + '(?=$|\\s)'); this._token = null; this.updater = updater; this._mouseout = this.mouseout.bind(this); @@ -543,6 +542,10 @@ } }; + /** + * @param {Element} token + * @returns {boolean} + */ Previewer.prototype.isDisabled = function (token) { do { if (token.hasAttribute && token.hasAttribute('data-previewers')) { @@ -555,14 +558,14 @@ /** * Checks the class name of each hovered element - * @param token + * @param {Element} token */ Previewer.prototype.check = function (token) { - if (tokenRegexp.test(token.className) && this.isDisabled(token)) { + if (token.classList.contains(TOKEN_CLASS) && this.isDisabled(token)) { return; } do { - if (tokenRegexp.test(token.className) && this._clsRegexp.test(token.className)) { + if (token.classList && token.classList.contains(TOKEN_CLASS) && token.classList.contains(this._type)) { break; } } while(token = token.parentNode); @@ -597,14 +600,14 @@ this._token.addEventListener('mouseout', this._mouseout, false); var offset = getOffset(this._token); - this._elt.className += ' active'; + this._elt.classList.add(ACTIVE_CLASS); if (offset.top - this._elt.offsetHeight > 0) { - this._elt.className = this._elt.className.replace(flippedRegexp, ''); + this._elt.classList.remove(FLIPPED_CLASS); this._elt.style.top = offset.top + 'px'; this._elt.style.bottom = ''; } else { - this._elt.className += ' flipped'; + this._elt.classList.add(FLIPPED_CLASS); this._elt.style.bottom = offset.bottom + 'px'; this._elt.style.top = ''; } @@ -619,7 +622,7 @@ * Hides the previewer. */ Previewer.prototype.hide = function () { - this._elt.className = this._elt.className.replace(activeRegexp, ''); + this._elt.classList.remove(ACTIVE_CLASS); }; /** diff --git a/plugins/previewers/prism-previewers.min.js b/plugins/previewers/prism-previewers.min.js index dd4422255b..a3fa7cd3a2 100644 --- a/plugins/previewers/prism-previewers.min.js +++ b/plugins/previewers/prism-previewers.min.js @@ -1 +1 @@ -!function(){if(("undefined"==typeof self||self.Prism)&&self.document&&Function.prototype.bind){var r,s,o={gradient:{create:(r={},s=function(e){if(r[e])return r[e];var s=e.match(/^(\b|\B-[a-z]{1,10}-)((?:repeating-)?(?:linear|radial)-gradient)/),t=s&&s[1],i=s&&s[2],a=e.replace(/^(?:\b|\B-[a-z]{1,10}-)(?:repeating-)?(?:linear|radial)-gradient\(|\)$/g,"").split(/\s*,\s*/);return 0<=i.indexOf("linear")?r[e]=function(e,s,t){var i="180deg";return/^(?:-?(?:\d+(?:\.\d+)?|\.\d+)(?:deg|rad)|to\b|top|right|bottom|left)/.test(t[0])&&(i=t.shift()).indexOf("to ")<0&&(0<=i.indexOf("top")?i=0<=i.indexOf("left")?"to bottom right":0<=i.indexOf("right")?"to bottom left":"to bottom":0<=i.indexOf("bottom")?i=0<=i.indexOf("left")?"to top right":0<=i.indexOf("right")?"to top left":"to top":0<=i.indexOf("left")?i="to right":0<=i.indexOf("right")?i="to left":e&&(0<=i.indexOf("deg")?i=90-parseFloat(i)+"deg":0<=i.indexOf("rad")&&(i=Math.PI/2-parseFloat(i)+"rad"))),s+"("+i+","+t.join(",")+")"}(t,i,a):0<=i.indexOf("radial")?r[e]=function(e,s,t){if(t[0].indexOf("at")<0){var i="center",a="ellipse",r="farthest-corner";if(/\bcenter|top|right|bottom|left\b|^\d+/.test(t[0])&&(i=t.shift().replace(/\s*-?\d+(?:rad|deg)\s*/,"")),/\bcircle|ellipse|closest|farthest|contain|cover\b/.test(t[0])){var n=t.shift().split(/\s+/);!n[0]||"circle"!==n[0]&&"ellipse"!==n[0]||(a=n.shift()),n[0]&&(r=n.shift()),"cover"===r?r="farthest-corner":"contain"===r&&(r="clothest-side")}return s+"("+a+" "+r+" at "+i+","+t.join(",")+")"}return s+"("+t.join(",")+")"}(0,i,a):r[e]=i+"("+a.join(",")+")"},function(){new Prism.plugins.Previewer("gradient",function(e){return this.firstChild.style.backgroundImage="",this.firstChild.style.backgroundImage=s(e),!!this.firstChild.style.backgroundImage},"*",function(){this._elt.innerHTML="
        "})}),tokens:{gradient:{pattern:/(?:\b|\B-[a-z]{1,10}-)(?:repeating-)?(?:linear|radial)-gradient\((?:(?:rgb|hsl)a?\(.+?\)|[^\)])+\)/gi,inside:{function:/[\w-]+(?=\()/,punctuation:/[(),]/}}},languages:{css:!0,less:!0,sass:[{lang:"sass",before:"punctuation",inside:"inside",root:Prism.languages.sass&&Prism.languages.sass["variable-line"]},{lang:"sass",before:"punctuation",inside:"inside",root:Prism.languages.sass&&Prism.languages.sass["property-line"]}],scss:!0,stylus:[{lang:"stylus",before:"func",inside:"rest",root:Prism.languages.stylus&&Prism.languages.stylus["property-declaration"].inside},{lang:"stylus",before:"func",inside:"rest",root:Prism.languages.stylus&&Prism.languages.stylus["variable-declaration"].inside}]}},angle:{create:function(){new Prism.plugins.Previewer("angle",function(e){var s,t,i=parseFloat(e),a=e.match(/[a-z]+$/i);if(!i||!a)return!1;switch(a=a[0]){case"deg":s=360;break;case"grad":s=400;break;case"rad":s=2*Math.PI;break;case"turn":s=1}return t=100*i/s,t%=100,this[(i<0?"set":"remove")+"Attribute"]("data-negative",""),this.querySelector("circle").style.strokeDasharray=Math.abs(t)+",500",!0},"*",function(){this._elt.innerHTML=''})},tokens:{angle:/(?:\b|\B-|(?=\B\.))(?:\d+(?:\.\d+)?|\.\d+)(?:deg|g?rad|turn)\b/i},languages:{css:!0,less:!0,markup:{lang:"markup",before:"punctuation",inside:"inside",root:Prism.languages.markup&&Prism.languages.markup.tag.inside["attr-value"]},sass:[{lang:"sass",inside:"inside",root:Prism.languages.sass&&Prism.languages.sass["property-line"]},{lang:"sass",before:"operator",inside:"inside",root:Prism.languages.sass&&Prism.languages.sass["variable-line"]}],scss:!0,stylus:[{lang:"stylus",before:"func",inside:"rest",root:Prism.languages.stylus&&Prism.languages.stylus["property-declaration"].inside},{lang:"stylus",before:"func",inside:"rest",root:Prism.languages.stylus&&Prism.languages.stylus["variable-declaration"].inside}]}},color:{create:function(){new Prism.plugins.Previewer("color",function(e){return this.style.backgroundColor="",this.style.backgroundColor=e,!!this.style.backgroundColor})},tokens:{color:[Prism.languages.css.hexcode].concat(Prism.languages.css.color)},languages:{css:!1,less:!0,markup:{lang:"markup",before:"punctuation",inside:"inside",root:Prism.languages.markup&&Prism.languages.markup.tag.inside["attr-value"]},sass:[{lang:"sass",before:"punctuation",inside:"inside",root:Prism.languages.sass&&Prism.languages.sass["variable-line"]},{lang:"sass",inside:"inside",root:Prism.languages.sass&&Prism.languages.sass["property-line"]}],scss:!1,stylus:[{lang:"stylus",before:"hexcode",inside:"rest",root:Prism.languages.stylus&&Prism.languages.stylus["property-declaration"].inside},{lang:"stylus",before:"hexcode",inside:"rest",root:Prism.languages.stylus&&Prism.languages.stylus["variable-declaration"].inside}]}},easing:{create:function(){new Prism.plugins.Previewer("easing",function(e){var s=(e={linear:"0,0,1,1",ease:".25,.1,.25,1","ease-in":".42,0,1,1","ease-out":"0,0,.58,1","ease-in-out":".42,0,.58,1"}[e]||e).match(/-?(?:\d+(?:\.\d+)?|\.\d+)/g);if(4!==s.length)return!1;s=s.map(function(e,s){return 100*(s%2?1-e:e)}),this.querySelector("path").setAttribute("d","M0,100 C"+s[0]+","+s[1]+", "+s[2]+","+s[3]+", 100,0");var t=this.querySelectorAll("line");return t[0].setAttribute("x2",s[0]),t[0].setAttribute("y2",s[1]),t[1].setAttribute("x2",s[2]),t[1].setAttribute("y2",s[3]),!0},"*",function(){this._elt.innerHTML=''})},tokens:{easing:{pattern:/\bcubic-bezier\((?:-?(?:\d+(?:\.\d+)?|\.\d+),\s*){3}-?(?:\d+(?:\.\d+)?|\.\d+)\)\B|\b(?:linear|ease(?:-in)?(?:-out)?)(?=\s|[;}]|$)/i,inside:{function:/[\w-]+(?=\()/,punctuation:/[(),]/}}},languages:{css:!0,less:!0,sass:[{lang:"sass",inside:"inside",before:"punctuation",root:Prism.languages.sass&&Prism.languages.sass["variable-line"]},{lang:"sass",inside:"inside",root:Prism.languages.sass&&Prism.languages.sass["property-line"]}],scss:!0,stylus:[{lang:"stylus",before:"hexcode",inside:"rest",root:Prism.languages.stylus&&Prism.languages.stylus["property-declaration"].inside},{lang:"stylus",before:"hexcode",inside:"rest",root:Prism.languages.stylus&&Prism.languages.stylus["variable-declaration"].inside}]}},time:{create:function(){new Prism.plugins.Previewer("time",function(e){var s=parseFloat(e),t=e.match(/[a-z]+$/i);return!(!s||!t)&&(t=t[0],this.querySelector("circle").style.animationDuration=2*s+t,!0)},"*",function(){this._elt.innerHTML=''})},tokens:{time:/(?:\b|\B-|(?=\B\.))(?:\d+(?:\.\d+)?|\.\d+)m?s\b/i},languages:{css:!0,less:!0,markup:{lang:"markup",before:"punctuation",inside:"inside",root:Prism.languages.markup&&Prism.languages.markup.tag.inside["attr-value"]},sass:[{lang:"sass",inside:"inside",root:Prism.languages.sass&&Prism.languages.sass["property-line"]},{lang:"sass",before:"operator",inside:"inside",root:Prism.languages.sass&&Prism.languages.sass["variable-line"]}],scss:!0,stylus:[{lang:"stylus",before:"hexcode",inside:"rest",root:Prism.languages.stylus&&Prism.languages.stylus["property-declaration"].inside},{lang:"stylus",before:"hexcode",inside:"rest",root:Prism.languages.stylus&&Prism.languages.stylus["variable-declaration"].inside}]}}},t=/(?:^|\s)token(?=$|\s)/,e=/(?:^|\s)active(?=$|\s)/g,i=/(?:^|\s)flipped(?=$|\s)/g,n=function(e,s,t,i){this._elt=null,this._type=e,this._clsRegexp=RegExp("(?:^|\\s)"+e+"(?=$|\\s)"),this._token=null,this.updater=s,this._mouseout=this.mouseout.bind(this),this.initializer=i;var a=this;t||(t=["*"]),Array.isArray(t)||(t=[t]),t.forEach(function(e){"string"!=typeof e&&(e=e.lang),n.byLanguages[e]||(n.byLanguages[e]=[]),n.byLanguages[e].indexOf(a)<0&&n.byLanguages[e].push(a)}),n.byType[e]=this};for(var a in n.prototype.init=function(){this._elt||(this._elt=document.createElement("div"),this._elt.className="prism-previewer prism-previewer-"+this._type,document.body.appendChild(this._elt),this.initializer&&this.initializer())},n.prototype.isDisabled=function(e){do{if(e.hasAttribute&&e.hasAttribute("data-previewers"))return-1===(e.getAttribute("data-previewers")||"").split(/\s+/).indexOf(this._type)}while(e=e.parentNode);return!1},n.prototype.check=function(e){if(!t.test(e.className)||!this.isDisabled(e)){do{if(t.test(e.className)&&this._clsRegexp.test(e.className))break}while(e=e.parentNode);e&&e!==this._token&&(this._token=e,this.show())}},n.prototype.mouseout=function(){this._token.removeEventListener("mouseout",this._mouseout,!1),this._token=null,this.hide()},n.prototype.show=function(){if(this._elt||this.init(),this._token)if(this.updater.call(this._elt,this._token.textContent)){this._token.addEventListener("mouseout",this._mouseout,!1);var e=function(e){var s=e.getBoundingClientRect(),t=s.left,i=s.top,a=document.documentElement.getBoundingClientRect();return t-=a.left,{top:i-=a.top,right:innerWidth-t-s.width,bottom:innerHeight-i-s.height,left:t,width:s.width,height:s.height}}(this._token);this._elt.className+=" active",0"})}),tokens:{gradient:{pattern:/(?:\b|\B-[a-z]{1,10}-)(?:repeating-)?(?:linear|radial)-gradient\((?:(?:rgb|hsl)a?\(.+?\)|[^\)])+\)/gi,inside:{function:/[\w-]+(?=\()/,punctuation:/[(),]/}}},languages:{css:!0,less:!0,sass:[{lang:"sass",before:"punctuation",inside:"inside",root:Prism.languages.sass&&Prism.languages.sass["variable-line"]},{lang:"sass",before:"punctuation",inside:"inside",root:Prism.languages.sass&&Prism.languages.sass["property-line"]}],scss:!0,stylus:[{lang:"stylus",before:"func",inside:"rest",root:Prism.languages.stylus&&Prism.languages.stylus["property-declaration"].inside},{lang:"stylus",before:"func",inside:"rest",root:Prism.languages.stylus&&Prism.languages.stylus["variable-declaration"].inside}]}},angle:{create:function(){new Prism.plugins.Previewer("angle",function(e){var s,t,i=parseFloat(e),a=e.match(/[a-z]+$/i);if(!i||!a)return!1;switch(a=a[0]){case"deg":s=360;break;case"grad":s=400;break;case"rad":s=2*Math.PI;break;case"turn":s=1}return t=100*i/s,t%=100,this[(i<0?"set":"remove")+"Attribute"]("data-negative",""),this.querySelector("circle").style.strokeDasharray=Math.abs(t)+",500",!0},"*",function(){this._elt.innerHTML=''})},tokens:{angle:/(?:\b|\B-|(?=\B\.))(?:\d+(?:\.\d+)?|\.\d+)(?:deg|g?rad|turn)\b/i},languages:{css:!0,less:!0,markup:{lang:"markup",before:"punctuation",inside:"inside",root:Prism.languages.markup&&Prism.languages.markup.tag.inside["attr-value"]},sass:[{lang:"sass",inside:"inside",root:Prism.languages.sass&&Prism.languages.sass["property-line"]},{lang:"sass",before:"operator",inside:"inside",root:Prism.languages.sass&&Prism.languages.sass["variable-line"]}],scss:!0,stylus:[{lang:"stylus",before:"func",inside:"rest",root:Prism.languages.stylus&&Prism.languages.stylus["property-declaration"].inside},{lang:"stylus",before:"func",inside:"rest",root:Prism.languages.stylus&&Prism.languages.stylus["variable-declaration"].inside}]}},color:{create:function(){new Prism.plugins.Previewer("color",function(e){return this.style.backgroundColor="",this.style.backgroundColor=e,!!this.style.backgroundColor})},tokens:{color:[Prism.languages.css.hexcode].concat(Prism.languages.css.color)},languages:{css:!1,less:!0,markup:{lang:"markup",before:"punctuation",inside:"inside",root:Prism.languages.markup&&Prism.languages.markup.tag.inside["attr-value"]},sass:[{lang:"sass",before:"punctuation",inside:"inside",root:Prism.languages.sass&&Prism.languages.sass["variable-line"]},{lang:"sass",inside:"inside",root:Prism.languages.sass&&Prism.languages.sass["property-line"]}],scss:!1,stylus:[{lang:"stylus",before:"hexcode",inside:"rest",root:Prism.languages.stylus&&Prism.languages.stylus["property-declaration"].inside},{lang:"stylus",before:"hexcode",inside:"rest",root:Prism.languages.stylus&&Prism.languages.stylus["variable-declaration"].inside}]}},easing:{create:function(){new Prism.plugins.Previewer("easing",function(e){var s=(e={linear:"0,0,1,1",ease:".25,.1,.25,1","ease-in":".42,0,1,1","ease-out":"0,0,.58,1","ease-in-out":".42,0,.58,1"}[e]||e).match(/-?(?:\d+(?:\.\d+)?|\.\d+)/g);if(4!==s.length)return!1;s=s.map(function(e,s){return 100*(s%2?1-e:e)}),this.querySelector("path").setAttribute("d","M0,100 C"+s[0]+","+s[1]+", "+s[2]+","+s[3]+", 100,0");var t=this.querySelectorAll("line");return t[0].setAttribute("x2",s[0]),t[0].setAttribute("y2",s[1]),t[1].setAttribute("x2",s[2]),t[1].setAttribute("y2",s[3]),!0},"*",function(){this._elt.innerHTML=''})},tokens:{easing:{pattern:/\bcubic-bezier\((?:-?(?:\d+(?:\.\d+)?|\.\d+),\s*){3}-?(?:\d+(?:\.\d+)?|\.\d+)\)\B|\b(?:linear|ease(?:-in)?(?:-out)?)(?=\s|[;}]|$)/i,inside:{function:/[\w-]+(?=\()/,punctuation:/[(),]/}}},languages:{css:!0,less:!0,sass:[{lang:"sass",inside:"inside",before:"punctuation",root:Prism.languages.sass&&Prism.languages.sass["variable-line"]},{lang:"sass",inside:"inside",root:Prism.languages.sass&&Prism.languages.sass["property-line"]}],scss:!0,stylus:[{lang:"stylus",before:"hexcode",inside:"rest",root:Prism.languages.stylus&&Prism.languages.stylus["property-declaration"].inside},{lang:"stylus",before:"hexcode",inside:"rest",root:Prism.languages.stylus&&Prism.languages.stylus["variable-declaration"].inside}]}},time:{create:function(){new Prism.plugins.Previewer("time",function(e){var s=parseFloat(e),t=e.match(/[a-z]+$/i);return!(!s||!t)&&(t=t[0],this.querySelector("circle").style.animationDuration=2*s+t,!0)},"*",function(){this._elt.innerHTML=''})},tokens:{time:/(?:\b|\B-|(?=\B\.))(?:\d+(?:\.\d+)?|\.\d+)m?s\b/i},languages:{css:!0,less:!0,markup:{lang:"markup",before:"punctuation",inside:"inside",root:Prism.languages.markup&&Prism.languages.markup.tag.inside["attr-value"]},sass:[{lang:"sass",inside:"inside",root:Prism.languages.sass&&Prism.languages.sass["property-line"]},{lang:"sass",before:"operator",inside:"inside",root:Prism.languages.sass&&Prism.languages.sass["variable-line"]}],scss:!0,stylus:[{lang:"stylus",before:"hexcode",inside:"rest",root:Prism.languages.stylus&&Prism.languages.stylus["property-declaration"].inside},{lang:"stylus",before:"hexcode",inside:"rest",root:Prism.languages.stylus&&Prism.languages.stylus["variable-declaration"].inside}]}}},t="token",i="active",a="flipped",n=function(e,s,t,i){this._elt=null,this._type=e,this._token=null,this.updater=s,this._mouseout=this.mouseout.bind(this),this.initializer=i;var a=this;t||(t=["*"]),Array.isArray(t)||(t=[t]),t.forEach(function(e){"string"!=typeof e&&(e=e.lang),n.byLanguages[e]||(n.byLanguages[e]=[]),n.byLanguages[e].indexOf(a)<0&&n.byLanguages[e].push(a)}),n.byType[e]=this};for(var e in n.prototype.init=function(){this._elt||(this._elt=document.createElement("div"),this._elt.className="prism-previewer prism-previewer-"+this._type,document.body.appendChild(this._elt),this.initializer&&this.initializer())},n.prototype.isDisabled=function(e){do{if(e.hasAttribute&&e.hasAttribute("data-previewers"))return-1===(e.getAttribute("data-previewers")||"").split(/\s+/).indexOf(this._type)}while(e=e.parentNode);return!1},n.prototype.check=function(e){if(!e.classList.contains(t)||!this.isDisabled(e)){do{if(e.classList&&e.classList.contains(t)&&e.classList.contains(this._type))break}while(e=e.parentNode);e&&e!==this._token&&(this._token=e,this.show())}},n.prototype.mouseout=function(){this._token.removeEventListener("mouseout",this._mouseout,!1),this._token=null,this.hide()},n.prototype.show=function(){if(this._elt||this.init(),this._token)if(this.updater.call(this._elt,this._token.textContent)){this._token.addEventListener("mouseout",this._mouseout,!1);var e=function(e){var s=e.getBoundingClientRect(),t=s.left,i=s.top,a=document.documentElement.getBoundingClientRect();return t-=a.left,{top:i-=a.top,right:innerWidth-t-s.width,bottom:innerHeight-i-s.height,left:t,width:s.width,height:s.height}}(this._token);this._elt.classList.add(i),0 Date: Wed, 17 Mar 2021 11:21:02 +0100 Subject: [PATCH 0753/1100] Bash: Fixed single-quoted strings (#2792) --- components/prism-bash.js | 17 +++- components/prism-bash.min.js | 2 +- components/prism-shell-session.js | 9 +- components/prism-shell-session.min.js | 2 +- tests/languages/bash/assign-left_feature.test | 6 +- .../bash/entities_in_strings_feature.test | 65 ++++++++++--- tests/languages/bash/issue2436.test | 24 +++++ tests/languages/bash/string_feature.test | 93 ++++--------------- .../shell-session/command_string_feature.test | 33 ++----- 9 files changed, 132 insertions(+), 119 deletions(-) create mode 100644 tests/languages/bash/issue2436.test diff --git a/components/prism-bash.js b/components/prism-bash.js index fc34d92633..a48b864014 100644 --- a/components/prism-bash.js +++ b/components/prism-bash.js @@ -133,10 +133,25 @@ }, // “Normal” string { - pattern: /(^|[^\\](?:\\\\)*)(["'])(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|(?!\2)[^\\`$])*\2/, + // https://www.gnu.org/software/bash/manual/html_node/Double-Quotes.html + pattern: /(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/, lookbehind: true, greedy: true, inside: insideString + }, + { + // https://www.gnu.org/software/bash/manual/html_node/Single-Quotes.html + pattern: /(^|[^$\\])'[^']*'/, + lookbehind: true, + greedy: true + }, + { + // https://www.gnu.org/software/bash/manual/html_node/ANSI_002dC-Quoting.html + pattern: /\$'(?:[^'\\]|\\[\s\S])*'/, + greedy: true, + inside: { + 'entity': insideString.entity + } } ], 'environment': { diff --git a/components/prism-bash.min.js b/components/prism-bash.min.js index dd4d97ff3b..81650901e6 100644 --- a/components/prism-bash.min.js +++ b/components/prism-bash.min.js @@ -1 +1 @@ -!function(e){var t="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",n={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},a={bash:n,environment:{pattern:RegExp("\\$"+t),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--?|-=|\+\+?|\+=|!=?|~|\*\*?|\*=|\/=?|%=?|<<=?|>>=?|<=?|>=?|==?|&&?|&=|\^=?|\|\|?|\|=|\?|:/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+t),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|x[0-9a-fA-F]{1,2}|u[0-9a-fA-F]{4}|U[0-9a-fA-F]{8})/};e.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)\w+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b\w+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+t),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+?)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:a},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:n}},{pattern:/(^|[^\\](?:\\\\)*)(["'])(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|(?!\2)[^\\`$])*\2/,lookbehind:!0,greedy:!0,inside:a}],environment:{pattern:RegExp("\\$?"+t),alias:"constant"},variable:a.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|aptitude|apt-cache|apt-get|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:if|then|else|elif|fi|for|while|in|case|esac|function|select|do|done|until)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|break|cd|continue|eval|exec|exit|export|getopts|hash|pwd|readonly|return|shift|test|times|trap|umask|unset|alias|bind|builtin|caller|command|declare|echo|enable|help|let|local|logout|mapfile|printf|read|readarray|source|type|typeset|ulimit|unalias|set|shopt)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:true|false)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|==?|!=?|=~|<<[<-]?|[&\d]?>>|\d?[<>]&?|&[>&]?|\|[&|]?|<=?|>=?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},n.inside=e.languages.bash;for(var s=["comment","function-name","for-or-select","assign-left","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],i=a.variable[1].inside,o=0;o>=?|<=?|>=?|==?|&&?|&=|\^=?|\|\|?|\|=|\?|:/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+t),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|x[0-9a-fA-F]{1,2}|u[0-9a-fA-F]{4}|U[0-9a-fA-F]{8})/};e.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)\w+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b\w+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+t),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+?)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:a},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:n}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:a},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:a.entity}}],environment:{pattern:RegExp("\\$?"+t),alias:"constant"},variable:a.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|aptitude|apt-cache|apt-get|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:if|then|else|elif|fi|for|while|in|case|esac|function|select|do|done|until)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|break|cd|continue|eval|exec|exit|export|getopts|hash|pwd|readonly|return|shift|test|times|trap|umask|unset|alias|bind|builtin|caller|command|declare|echo|enable|help|let|local|logout|mapfile|printf|read|readarray|source|type|typeset|ulimit|unalias|set|shopt)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:true|false)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|==?|!=?|=~|<<[<-]?|[&\d]?>>|\d?[<>]&?|&[>&]?|\|[&|]?|<=?|>=?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},n.inside=e.languages.bash;for(var s=["comment","function-name","for-or-select","assign-left","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],i=a.variable[1].inside,o=0;o:;|]+)?|[^\0-\x1F$#*?"<>:;|]+)?[$#](?:[^\\\r\n'"<]|\\.|<>)+/.source.replace(/<>/g, function () { return strings; }), 'm'), + pattern: RegExp(/^(?:[^\s@:$#*!/\\]+@[^\s@:$#*!/\\]+(?::[^\0-\x1F$#*?"<>:;|]+)?|[^\0-\x1F$#*?"<>:;|]+)?[$#](?:[^\\\r\n'"<$]|\\.|\$(?!')|<>)+/.source.replace(/<>/g, function () { return strings; }), 'm'), greedy: true, inside: { 'info': { diff --git a/components/prism-shell-session.min.js b/components/prism-shell-session.min.js index b21959cd63..d0ca81759f 100644 --- a/components/prism-shell-session.min.js +++ b/components/prism-shell-session.min.js @@ -1 +1 @@ -!function(s){var n=["([\"'])(?:\\\\[^]|\\$\\([^)]+\\)|\\$(?!\\()|`[^`]+`|(?!\\1)[^\\\\`$])*\\1","<<-?\\s*([\"']?)(\\w+)\\2\\s[^]*?[\r\n]\\3"].join("|");s.languages["shell-session"]={command:{pattern:RegExp('^(?:[^\\s@:$#*!/\\\\]+@[^\\s@:$#*!/\\\\]+(?::[^\0-\\x1F$#*?"<>:;|]+)?|[^\0-\\x1F$#*?"<>:;|]+)?[$#](?:[^\\\\\r\n\'"<]|\\\\.|<>)+'.replace(/<>/g,function(){return n}),"m"),greedy:!0,inside:{info:{pattern:/^[^#$]+/,alias:"punctuation",inside:{user:/^[^\s@:$#*!/\\]+@[^\s@:$#*!/\\]+/,punctuation:/:/,path:/[\s\S]+/}},bash:{pattern:/(^[$#]\s*)\S[\s\S]*/,lookbehind:!0,alias:"language-bash",inside:s.languages.bash},"shell-symbol":{pattern:/^[$#]/,alias:"important"}}},output:/.(?:.*(?:[\r\n]|.$))*/},s.languages["sh-session"]=s.languages.shellsession=s.languages["shell-session"]}(Prism); \ No newline at end of file +!function(s){var n=['"(?:\\\\[^]|\\$\\([^)]+\\)|\\$(?!\\()|`[^`]+`|[^"\\\\`$])*"',"'[^']*'","\\$'(?:[^'\\\\]|\\\\[^])*'","<<-?\\s*([\"']?)(\\w+)\\1\\s[^]*?[\r\n]\\2"].join("|");s.languages["shell-session"]={command:{pattern:RegExp('^(?:[^\\s@:$#*!/\\\\]+@[^\\s@:$#*!/\\\\]+(?::[^\0-\\x1F$#*?"<>:;|]+)?|[^\0-\\x1F$#*?"<>:;|]+)?[$#](?:[^\\\\\r\n\'"<$]|\\\\.|\\$(?!\')|<>)+'.replace(/<>/g,function(){return n}),"m"),greedy:!0,inside:{info:{pattern:/^[^#$]+/,alias:"punctuation",inside:{user:/^[^\s@:$#*!/\\]+@[^\s@:$#*!/\\]+/,punctuation:/:/,path:/[\s\S]+/}},bash:{pattern:/(^[$#]\s*)\S[\s\S]*/,lookbehind:!0,alias:"language-bash",inside:s.languages.bash},"shell-symbol":{pattern:/^[$#]/,alias:"important"}}},output:/.(?:.*(?:[\r\n]|.$))*/},s.languages["sh-session"]=s.languages.shellsession=s.languages["shell-session"]}(Prism); \ No newline at end of file diff --git a/tests/languages/bash/assign-left_feature.test b/tests/languages/bash/assign-left_feature.test index e21364696e..54b64a5ba9 100644 --- a/tests/languages/bash/assign-left_feature.test +++ b/tests/languages/bash/assign-left_feature.test @@ -8,13 +8,15 @@ foo+=('xyz') ["assign-left", ["foo"]], ["operator", ["="]], ["number", "12"], + ["assign-left", ["bar"]], ["operator", ["+="]], - ["string", ["'xyz'"]], + ["string", "'xyz'"], + ["assign-left", ["foo"]], ["operator", ["+="]], ["punctuation", "("], - ["string", ["'xyz'"]], + ["string", "'xyz'"], ["punctuation", ")"] ] diff --git a/tests/languages/bash/entities_in_strings_feature.test b/tests/languages/bash/entities_in_strings_feature.test index be4a544275..f4d7dcb911 100644 --- a/tests/languages/bash/entities_in_strings_feature.test +++ b/tests/languages/bash/entities_in_strings_feature.test @@ -1,24 +1,63 @@ -'1\a2\b3\c4\e5\f6\n7\r8\t9\v' -'1234\056789' -'abc\xdef' -'123\456789' -'\uABCDEFG' +$'1\a2\b3\c4\e5\f6\n7\r8\t9\v' +$'1234\056789' +$'123\456789' +"abc\xdef" +"\uABCDEFG" "a\"b" +'1\a2\b3\c4\e5\f6\n7\r8\t9\v' + ---------------------------------------------------- [ ["string", [ - "'1", ["entity", "\\a"], "2", ["entity", "\\b"], "3", ["entity", "\\c"], - "4", ["entity", "\\e"], "5", ["entity", "\\f"], "6", ["entity", "\\n"], - "7", ["entity", "\\r"], "8", ["entity", "\\t"], "9", ["entity", "\\v"], + "$'1", + ["entity", "\\a"], + "2", + ["entity", "\\b"], + "3", + ["entity", "\\c"], + "4", + ["entity", "\\e"], + "5", + ["entity", "\\f"], + "6", + ["entity", "\\n"], + "7", + ["entity", "\\r"], + "8", + ["entity", "\\t"], + "9", + ["entity", "\\v"], "'" ]], - ["string", ["'1234", ["entity", "\\056"], "789'"]], - ["string", ["'abc", ["entity", "\\xde"], "f'"]], - ["string", ["'123", ["entity", "\\456"], "789'"]], - ["string", ["'", ["entity", "\\uABCD"], "EFG'"]], - ["string", ["\"a", ["entity", "\\\""], "b\""]] + ["string", [ + "$'1234", + ["entity", "\\056"], + "789'" + ]], + ["string", [ + "$'123", + ["entity", "\\456"], + "789'" + ]], + ["string", [ + "\"abc", + ["entity", "\\xde"], + "f\"" + ]], + ["string", [ + "\"", + ["entity", "\\uABCD"], + "EFG\"" + ]], + ["string", [ + "\"a", + ["entity", "\\\""], + "b\"" + ]], + + ["string", "'1\\a2\\b3\\c4\\e5\\f6\\n7\\r8\\t9\\v'"] ] ---------------------------------------------------- diff --git a/tests/languages/bash/issue2436.test b/tests/languages/bash/issue2436.test new file mode 100644 index 0000000000..76568aac62 --- /dev/null +++ b/tests/languages/bash/issue2436.test @@ -0,0 +1,24 @@ +echo $'module.exports = {\n extends: [\n // add more generic rulesets here, such as:\n // 'eslint:recommended',\n "plugin:vue/vue3-recommended",\n "prettier",\n "prettier/vue",\n ],\n rules: {\n // override/add rules settings here, such as:\n // 'vue/no-unused-vars': 'error'\n },\n};' > .eslintrc.js + +---------------------------------------------------- + +[ + ["builtin", "echo"], + ["string", [ + "$'module.exports = {", + ["entity", "\\n"], + " extends: [", + ["entity", "\\n"], + " // add more generic rulesets here, such as:", + ["entity", "\\n"], + " // '" + ]], + "eslint:recommended", + ["string", "',\\n \"plugin:vue/vue3-recommended\",\\n \"prettier\",\\n \"prettier/vue\",\\n ],\\n rules: {\\n // override/add rules settings here, such as:\\n // '"], + "vue/no-unused-vars", + ["string", "': '"], + "error", + ["string", "'\\n },\\n};'"], + ["operator", [">"]], + " .eslintrc.js" +] \ No newline at end of file diff --git a/tests/languages/bash/string_feature.test b/tests/languages/bash/string_feature.test index b82afd001d..bdcfc762fe 100644 --- a/tests/languages/bash/string_feature.test +++ b/tests/languages/bash/string_feature.test @@ -47,30 +47,14 @@ STRING_END ---------------------------------------------------- [ - ["string", [ - "\"\"" - ]], - ["string", [ - "''" - ]], - ["string", [ - "\"foo\"" - ]], - ["string", [ - "'foo'" - ]], - ["string", [ - "\"foo\r\nbar\"" - ]], - ["string", [ - "'foo\r\nbar'" - ]], - ["string", [ - "\"'foo'\"" - ]], - ["string", [ - "'\"bar\"'" - ]], + ["string", ["\"\""]], + ["string", "''"], + ["string", ["\"foo\""]], + ["string", "'foo'"], + ["string", ["\"foo\r\nbar\""]], + ["string", "'foo\r\nbar'"], + ["string", ["\"'foo'\""]], + ["string", "'\"bar\"'"], ["string", [ "\"", ["variable", "$@"], @@ -78,67 +62,30 @@ STRING_END ]], ["string", [ "\"", - ["variable", [ - "${foo}" - ]], + ["variable", ["${foo}"]], "\"" ]], - ["punctuation", "\\"], - ["punctuation", "\\"], - ["string", [ - "\"foo\"" - ]], - ["punctuation", "\\"], - "'a ", - ["comment", "# ' not a string"], + ["punctuation", "\\"], ["punctuation", "\\"], ["string", ["\"foo\""]], + ["punctuation", "\\"], "'a ", ["comment", "# ' not a string"], - ["operator", [ - "<<" - ]], - ["string", [ - "STRING_END\r\nfoo\r\nbar\r\nSTRING_END" - ]], + ["operator", ["<<"]], ["string", ["STRING_END\r\nfoo\r\nbar\r\nSTRING_END"]], - ["operator", [ - "<<-" - ]], - ["string", [ - "STRING_END\r\nfoo\r\nbar\r\nSTRING_END" - ]], + ["operator", ["<<-"]], ["string", ["STRING_END\r\nfoo\r\nbar\r\nSTRING_END"]], - ["operator", [ - "<<" - ]], + ["operator", ["<<"]], ["string", [ - "EOF\r\nfoo ", - ["variable", "$@"], + "EOF\r\nfoo ", ["variable", "$@"], "\r\nbar\r\nEOF" ]], - ["operator", [ - "<<" - ]], - ["string", [ - "'EOF'\r\n'single quoted string'\r\n\"double quoted string\"\r\nEOF" - ]], + ["operator", ["<<"]], + ["string", ["'EOF'\r\n'single quoted string'\r\n\"double quoted string\"\r\nEOF"]], - ["operator", [ - "<<" - ]], - ["string", [ - "\"EOF\"\r\nfoo\r\n$bar\r\nEOF" - ]], + ["operator", ["<<"]], ["string", ["\"EOF\"\r\nfoo\r\n$bar\r\nEOF"]], - ["operator", [ - "<<" - ]], - ["string", [ - "STRING_END\r\n# comment\r\nSTRING_END" - ]], + ["operator", ["<<"]], ["string", ["STRING_END\r\n# comment\r\nSTRING_END"]], - ["string", [ - "\" # comment \"" - ]] + ["string", ["\" # comment \""]] ] ---------------------------------------------------- diff --git a/tests/languages/shell-session/command_string_feature.test b/tests/languages/shell-session/command_string_feature.test index a896f118e8..854314b8bb 100644 --- a/tests/languages/shell-session/command_string_feature.test +++ b/tests/languages/shell-session/command_string_feature.test @@ -28,9 +28,7 @@ EOF ["shell-symbol", "$"], ["bash", [ ["builtin", "echo"], - ["string", [ - "'Foo\r\n> Bar'" - ]] + ["string", "'Foo\r\n> Bar'"] ]] ]], @@ -38,9 +36,7 @@ EOF ["shell-symbol", "$"], ["bash", [ ["builtin", "echo"], - ["string", [ - "\"Foo\r\n> Bar\"" - ]] + ["string", ["\"Foo\r\n> Bar\""]] ]] ]], @@ -48,12 +44,8 @@ EOF ["shell-symbol", "$"], ["bash", [ ["builtin", "echo"], - ["operator", [ - "<<-" - ]], - ["string", [ - "STRING_END\r\nfoo\r\nbar\r\nSTRING_END" - ]] + ["operator", ["<<-"]], + ["string", ["STRING_END\r\nfoo\r\nbar\r\nSTRING_END"]] ]] ]], @@ -61,12 +53,8 @@ EOF ["shell-symbol", "$"], ["bash", [ ["builtin", "echo"], - ["operator", [ - "<<-" - ]], - ["string", [ - "\"STRING_END\"\r\nfoo\r\nbar\r\nSTRING_END" - ]] + ["operator", ["<<-"]], + ["string", ["\"STRING_END\"\r\nfoo\r\nbar\r\nSTRING_END"]] ]] ]], @@ -84,17 +72,14 @@ EOF ["shell-symbol", "$"], ["bash", [ ["function", "cat"], - ["operator", [ - "<<" - ]], + ["operator", ["<<"]], ["string", [ "\"EOF\"", ["bash", [ - ["operator", [ - ">" - ]], + ["operator", [">"]], " /etc/ipsec.secrets" ]], + "\r\n: RSA vpn-server-a.key\r\n# : RSA vpn-server-b.key\r\nEOF" ]] ]] From 5943f4cb95c6710e6bdc505f5c56a9714132ea6f Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Wed, 17 Mar 2021 11:40:37 +0100 Subject: [PATCH 0754/1100] Nginx: Complete rewrite (#2793) --- components.js | 2 +- components.json | 3 +- components/prism-nginx.js | 63 +- components/prism-nginx.min.js | 2 +- plugins/autoloader/prism-autoloader.js | 1 - plugins/autoloader/prism-autoloader.min.js | 2 +- tests/languages/nginx/boolean_feature.test | 25 + tests/languages/nginx/comment_feature.test | 144 +++- tests/languages/nginx/directive_feature.test | 186 +++++ tests/languages/nginx/keyword_feature.test | 719 ------------------- tests/languages/nginx/number_feature.test | 78 ++ tests/languages/nginx/string_feature.test | 116 +++ tests/languages/nginx/variable_feature.test | 148 +++- 13 files changed, 746 insertions(+), 743 deletions(-) create mode 100644 tests/languages/nginx/boolean_feature.test create mode 100644 tests/languages/nginx/directive_feature.test delete mode 100644 tests/languages/nginx/keyword_feature.test create mode 100644 tests/languages/nginx/number_feature.test create mode 100644 tests/languages/nginx/string_feature.test diff --git a/components.js b/components.js index 29fc5c99d5..e9117779a7 100644 --- a/components.js +++ b/components.js @@ -1,2 +1,2 @@ -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml","ssml","atom","rss"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","ssml":"SSML","atom":"Atom","rss":"RSS"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","optional":"regex","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"ABNF","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"agda":{"title":"Agda","owner":"xy-ren"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apex":{"title":"Apex","require":["clike","sql"],"owner":"RunDevelopment"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"dkern"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"birb":{"title":"Birb","require":"clike","owner":"Calamity210"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"BNF","alias":"rbnf","aliasTitles":{"rbnf":"RBNF"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"bsl":{"title":"BSL (1C:Enterprise)","alias":"oscript","aliasTitles":{"oscript":"OneScript"},"owner":"Diversus23"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cfscript":{"title":"CFScript","require":"clike","alias":"cfc","owner":"mjclemente"},"chaiscript":{"title":"ChaiScript","require":["clike","cpp"],"owner":"RunDevelopment"},"cil":{"title":"CIL","owner":"sbrl"},"clojure":{"title":"Clojure","owner":"troglotit"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"cypher":{"title":"Cypher","owner":"RunDevelopment"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dataweave":{"title":"DataWeave","owner":"machaval"},"dax":{"title":"DAX","owner":"peterbud"},"dhall":{"title":"Dhall","owner":"RunDevelopment"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"dot":{"title":"DOT (Graphviz)","alias":"gv","optional":"markup","owner":"RunDevelopment"},"ebnf":{"title":"EBNF","owner":"RunDevelopment"},"editorconfig":{"title":"EditorConfig","owner":"osipxd"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"false":{"title":"False","owner":"edukisto"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"c","owner":"Golmote"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","optional":["markdown"],"owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"hlsl":{"title":"HLSL","require":"c","owner":"RunDevelopment"},"http":{"title":"HTTP","optional":["css","javascript","json","markup","uri"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"icu-message-format":{"title":"ICU Message Format","owner":"RunDevelopment"},"idris":{"title":"Idris","alias":"idr","owner":"KeenS","require":"haskell"},"ignore":{"title":".ignore","owner":"osipxd","alias":["gitignore","hgignore","npmignore"],"aliasTitles":{"gitignore":".gitignore","hgignore":".hgignore","npmignore":".npmignore"}},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike","typescript"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","alias":"webmanifest","aliasTitles":{"webmanifest":"Web App Manifest"},"owner":"CupOfTea696"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"jsstacktrace":{"title":"JS stack trace","owner":"sbrl"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","alias":["kt","kts"],"aliasTitles":{"kts":"Kotlin Script"},"require":"clike","owner":"Golmote"},"kumir":{"title":"KuMir (КуМир)","alias":"kum","owner":"edukisto"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","optional":"yaml","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"mongodb":{"title":"MongoDB","owner":"airs0urce","require":"javascript"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"naniscript":{"title":"Naninovel Script","owner":"Elringus","alias":"nani"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nginx":{"title":"nginx","owner":"westonganger","require":"clike"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"psl":{"title":"PATROL Scripting Language","owner":"bertysentry"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":"markup-templating","owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"promql":{"title":"PromQL","owner":"arendjr"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"purebasic":{"title":"PureBasic","require":"clike","alias":"pbfasm","owner":"HeX0R101"},"purescript":{"title":"PureScript","require":"haskell","alias":"purs","owner":"sriharshachilakapati"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"racket":{"title":"Racket","require":"scheme","alias":"rkt","owner":"RunDevelopment"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","owner":"RunDevelopment"},"rego":{"title":"Rego","owner":"JordanSh"},"renpy":{"title":"Ren'py","alias":"rpy","owner":"HyuchiaDiego"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","alias":["sh-session","shellsession"],"owner":"RunDevelopment"},"smali":{"title":"Smali","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sml":{"title":"SML","alias":"smlnj","aliasTitles":{"smlnj":"SML/NJ"},"owner":"RunDevelopment"},"solidity":{"title":"Solidity (Ethereum)","alias":"sol","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"squirrel":{"title":"Squirrel","require":"clike","owner":"RunDevelopment"},"stan":{"title":"Stan","owner":"RunDevelopment"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","vbnet"],"owner":"RunDevelopment"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"typoscript":{"title":"TypoScript","alias":"tsconfig","aliasTitles":{"tsconfig":"TSConfig"},"owner":"dkern"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"uri":{"title":"URI","alias":"url","aliasTitles":{"url":"URL"},"owner":"RunDevelopment"},"v":{"title":"V","require":"clike","owner":"taggon"},"vala":{"title":"Vala","require":"clike","optional":"regex","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":["vb","vba"],"aliasTitles":{"vba":"VBA"},"owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xml-doc":{"title":"XML doc (.net)","require":"markup","modify":["csharp","fsharp","vbnet"],"owner":"RunDevelopment"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"yang":{"title":"YANG","owner":"RunDevelopment"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml","ssml","atom","rss"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","ssml":"SSML","atom":"Atom","rss":"RSS"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","optional":"regex","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"ABNF","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"agda":{"title":"Agda","owner":"xy-ren"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apex":{"title":"Apex","require":["clike","sql"],"owner":"RunDevelopment"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"dkern"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"birb":{"title":"Birb","require":"clike","owner":"Calamity210"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"BNF","alias":"rbnf","aliasTitles":{"rbnf":"RBNF"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"bsl":{"title":"BSL (1C:Enterprise)","alias":"oscript","aliasTitles":{"oscript":"OneScript"},"owner":"Diversus23"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cfscript":{"title":"CFScript","require":"clike","alias":"cfc","owner":"mjclemente"},"chaiscript":{"title":"ChaiScript","require":["clike","cpp"],"owner":"RunDevelopment"},"cil":{"title":"CIL","owner":"sbrl"},"clojure":{"title":"Clojure","owner":"troglotit"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"cypher":{"title":"Cypher","owner":"RunDevelopment"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dataweave":{"title":"DataWeave","owner":"machaval"},"dax":{"title":"DAX","owner":"peterbud"},"dhall":{"title":"Dhall","owner":"RunDevelopment"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"dot":{"title":"DOT (Graphviz)","alias":"gv","optional":"markup","owner":"RunDevelopment"},"ebnf":{"title":"EBNF","owner":"RunDevelopment"},"editorconfig":{"title":"EditorConfig","owner":"osipxd"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"false":{"title":"False","owner":"edukisto"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"c","owner":"Golmote"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","optional":["markdown"],"owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"hlsl":{"title":"HLSL","require":"c","owner":"RunDevelopment"},"http":{"title":"HTTP","optional":["css","javascript","json","markup","uri"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"icu-message-format":{"title":"ICU Message Format","owner":"RunDevelopment"},"idris":{"title":"Idris","alias":"idr","owner":"KeenS","require":"haskell"},"ignore":{"title":".ignore","owner":"osipxd","alias":["gitignore","hgignore","npmignore"],"aliasTitles":{"gitignore":".gitignore","hgignore":".hgignore","npmignore":".npmignore"}},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike","typescript"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","alias":"webmanifest","aliasTitles":{"webmanifest":"Web App Manifest"},"owner":"CupOfTea696"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"jsstacktrace":{"title":"JS stack trace","owner":"sbrl"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","alias":["kt","kts"],"aliasTitles":{"kts":"Kotlin Script"},"require":"clike","owner":"Golmote"},"kumir":{"title":"KuMir (КуМир)","alias":"kum","owner":"edukisto"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","optional":"yaml","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"mongodb":{"title":"MongoDB","owner":"airs0urce","require":"javascript"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"naniscript":{"title":"Naninovel Script","owner":"Elringus","alias":"nani"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nginx":{"title":"nginx","owner":"volado"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"psl":{"title":"PATROL Scripting Language","owner":"bertysentry"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":"markup-templating","owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"promql":{"title":"PromQL","owner":"arendjr"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"purebasic":{"title":"PureBasic","require":"clike","alias":"pbfasm","owner":"HeX0R101"},"purescript":{"title":"PureScript","require":"haskell","alias":"purs","owner":"sriharshachilakapati"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"racket":{"title":"Racket","require":"scheme","alias":"rkt","owner":"RunDevelopment"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","owner":"RunDevelopment"},"rego":{"title":"Rego","owner":"JordanSh"},"renpy":{"title":"Ren'py","alias":"rpy","owner":"HyuchiaDiego"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","alias":["sh-session","shellsession"],"owner":"RunDevelopment"},"smali":{"title":"Smali","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sml":{"title":"SML","alias":"smlnj","aliasTitles":{"smlnj":"SML/NJ"},"owner":"RunDevelopment"},"solidity":{"title":"Solidity (Ethereum)","alias":"sol","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"squirrel":{"title":"Squirrel","require":"clike","owner":"RunDevelopment"},"stan":{"title":"Stan","owner":"RunDevelopment"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","vbnet"],"owner":"RunDevelopment"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"typoscript":{"title":"TypoScript","alias":"tsconfig","aliasTitles":{"tsconfig":"TSConfig"},"owner":"dkern"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"uri":{"title":"URI","alias":"url","aliasTitles":{"url":"URL"},"owner":"RunDevelopment"},"v":{"title":"V","require":"clike","owner":"taggon"},"vala":{"title":"Vala","require":"clike","optional":"regex","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":["vb","vba"],"aliasTitles":{"vba":"VBA"},"owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xml-doc":{"title":"XML doc (.net)","require":"markup","modify":["csharp","fsharp","vbnet"],"owner":"RunDevelopment"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"yang":{"title":"YANG","owner":"RunDevelopment"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; if (typeof module !== 'undefined' && module.exports) { module.exports = components; } \ No newline at end of file diff --git a/components.json b/components.json index 468b6e72f2..eb36d0282d 100644 --- a/components.json +++ b/components.json @@ -809,8 +809,7 @@ }, "nginx": { "title": "nginx", - "owner": "westonganger", - "require": "clike" + "owner": "volado" }, "nim": { "title": "Nim", diff --git a/components/prism-nginx.js b/components/prism-nginx.js index c9a7ccc37b..98b97f7b38 100644 --- a/components/prism-nginx.js +++ b/components/prism-nginx.js @@ -1,11 +1,52 @@ -Prism.languages.nginx = Prism.languages.extend('clike', { - 'comment': { - pattern: /(^|[^"{\\])#.*/, - lookbehind: true - }, - 'keyword': /\b(?:CONTENT_|DOCUMENT_|GATEWAY_|HTTP_|HTTPS|if_not_empty|PATH_|QUERY_|REDIRECT_|REMOTE_|REQUEST_|SCGI|SCRIPT_|SERVER_|http|events|accept_mutex|accept_mutex_delay|access_log|add_after_body|add_before_body|add_header|addition_types|aio|alias|allow|ancient_browser|ancient_browser_value|auth|auth_basic|auth_basic_user_file|auth_http|auth_http_header|auth_http_timeout|autoindex|autoindex_exact_size|autoindex_localtime|break|charset|charset_map|charset_types|chunked_transfer_encoding|client_body_buffer_size|client_body_in_file_only|client_body_in_single_buffer|client_body_temp_path|client_body_timeout|client_header_buffer_size|client_header_timeout|client_max_body_size|connection_pool_size|create_full_put_path|daemon|dav_access|dav_methods|debug_connection|debug_points|default_type|deny|devpoll_changes|devpoll_events|directio|directio_alignment|disable_symlinks|empty_gif|env|epoll_events|error_log|error_page|expires|fastcgi_buffer_size|fastcgi_buffers|fastcgi_busy_buffers_size|fastcgi_cache|fastcgi_cache_bypass|fastcgi_cache_key|fastcgi_cache_lock|fastcgi_cache_lock_timeout|fastcgi_cache_methods|fastcgi_cache_min_uses|fastcgi_cache_path|fastcgi_cache_purge|fastcgi_cache_use_stale|fastcgi_cache_valid|fastcgi_connect_timeout|fastcgi_hide_header|fastcgi_ignore_client_abort|fastcgi_ignore_headers|fastcgi_index|fastcgi_intercept_errors|fastcgi_keep_conn|fastcgi_max_temp_file_size|fastcgi_next_upstream|fastcgi_no_cache|fastcgi_param|fastcgi_pass|fastcgi_pass_header|fastcgi_read_timeout|fastcgi_redirect_errors|fastcgi_send_timeout|fastcgi_split_path_info|fastcgi_store|fastcgi_store_access|fastcgi_temp_file_write_size|fastcgi_temp_path|flv|geo|geoip_city|geoip_country|google_perftools_profiles|gzip|gzip_buffers|gzip_comp_level|gzip_disable|gzip_http_version|gzip_min_length|gzip_proxied|gzip_static|gzip_types|gzip_vary|if|if_modified_since|ignore_invalid_headers|image_filter|image_filter_buffer|image_filter_jpeg_quality|image_filter_sharpen|image_filter_transparency|imap_capabilities|imap_client_buffer|include|index|internal|ip_hash|keepalive|keepalive_disable|keepalive_requests|keepalive_timeout|kqueue_changes|kqueue_events|large_client_header_buffers|limit_conn|limit_conn_log_level|limit_conn_zone|limit_except|limit_rate|limit_rate_after|limit_req|limit_req_log_level|limit_req_zone|limit_zone|lingering_close|lingering_time|lingering_timeout|listen|location|lock_file|log_format|log_format_combined|log_not_found|log_subrequest|map|map_hash_bucket_size|map_hash_max_size|master_process|max_ranges|memcached_buffer_size|memcached_connect_timeout|memcached_next_upstream|memcached_pass|memcached_read_timeout|memcached_send_timeout|merge_slashes|min_delete_depth|modern_browser|modern_browser_value|mp4|mp4_buffer_size|mp4_max_buffer_size|msie_padding|msie_refresh|multi_accept|open_file_cache|open_file_cache_errors|open_file_cache_min_uses|open_file_cache_valid|open_log_file_cache|optimize_server_names|override_charset|pcre_jit|perl|perl_modules|perl_require|perl_set|pid|pop3_auth|pop3_capabilities|port_in_redirect|post_action|postpone_output|protocol|proxy|proxy_buffer|proxy_buffer_size|proxy_buffering|proxy_buffers|proxy_busy_buffers_size|proxy_cache|proxy_cache_bypass|proxy_cache_key|proxy_cache_lock|proxy_cache_lock_timeout|proxy_cache_methods|proxy_cache_min_uses|proxy_cache_path|proxy_cache_use_stale|proxy_cache_valid|proxy_connect_timeout|proxy_cookie_domain|proxy_cookie_path|proxy_headers_hash_bucket_size|proxy_headers_hash_max_size|proxy_hide_header|proxy_http_version|proxy_ignore_client_abort|proxy_ignore_headers|proxy_intercept_errors|proxy_max_temp_file_size|proxy_method|proxy_next_upstream|proxy_no_cache|proxy_pass|proxy_pass_error_message|proxy_pass_header|proxy_pass_request_body|proxy_pass_request_headers|proxy_read_timeout|proxy_redirect|proxy_redirect_errors|proxy_send_lowat|proxy_send_timeout|proxy_set_body|proxy_set_header|proxy_ssl_session_reuse|proxy_store|proxy_store_access|proxy_temp_file_write_size|proxy_temp_path|proxy_timeout|proxy_upstream_fail_timeout|proxy_upstream_max_fails|random_index|read_ahead|real_ip_header|recursive_error_pages|request_pool_size|reset_timedout_connection|resolver|resolver_timeout|return|rewrite|root|rtsig_overflow_events|rtsig_overflow_test|rtsig_overflow_threshold|rtsig_signo|satisfy|satisfy_any|secure_link_secret|send_lowat|send_timeout|sendfile|sendfile_max_chunk|server|server_name|server_name_in_redirect|server_names_hash_bucket_size|server_names_hash_max_size|server_tokens|set|set_real_ip_from|smtp_auth|smtp_capabilities|so_keepalive|source_charset|split_clients|ssi|ssi_silent_errors|ssi_types|ssi_value_length|ssl|ssl_certificate|ssl_certificate_key|ssl_ciphers|ssl_client_certificate|ssl_crl|ssl_dhparam|ssl_engine|ssl_prefer_server_ciphers|ssl_protocols|ssl_session_cache|ssl_session_timeout|ssl_verify_client|ssl_verify_depth|starttls|stub_status|sub_filter|sub_filter_once|sub_filter_types|tcp_nodelay|tcp_nopush|timeout|timer_resolution|try_files|types|types_hash_bucket_size|types_hash_max_size|underscores_in_headers|uninitialized_variable_warn|upstream|use|user|userid|userid_domain|userid_expires|userid_name|userid_p3p|userid_path|userid_service|valid_referers|variables_hash_bucket_size|variables_hash_max_size|worker_connections|worker_cpu_affinity|worker_priority|worker_processes|worker_rlimit_core|worker_rlimit_nofile|worker_rlimit_sigpending|working_directory|xclient|xml_entities|xslt_entities|xslt_stylesheet|xslt_types|ssl_session_tickets|ssl_stapling|ssl_stapling_verify|ssl_ecdh_curve|ssl_trusted_certificate|more_set_headers|ssl_early_data)\b/i -}); - -Prism.languages.insertBefore('nginx', 'keyword', { - 'variable': /\$[a-z_]+/i -}); +(function (Prism) { + + var variable = /\$(?:\w[a-z\d]*(?:_[^\x00-\x1F\s"'\\()$]*)?|\{[^}\s"'\\]+\})/i; + + Prism.languages.nginx = { + 'comment': { + pattern: /(^|[\s{};])#.*/, + lookbehind: true + }, + 'directive': { + pattern: /(^|\s)\w(?:[^;{}"'\\\s]|\\.|"(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*'|\s+(?:#.*(?!.)|(?![#\s])))*?(?=\s*[;{])/, + lookbehind: true, + greedy: true, + inside: { + 'string': { + pattern: /((?:^|[^\\])(?:\\\\)*)(?:"(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*')/, + lookbehind: true, + inside: { + 'escape': { + pattern: /\\["'\\nrt]/, + alias: 'entity' + }, + 'variable': variable + } + }, + 'comment': { + pattern: /(\s)#.*/, + lookbehind: true, + greedy: true + }, + 'keyword': { + pattern: /^\S+/, + greedy: true + }, + + // other patterns + + 'boolean': { + pattern: /(\s)(?:off|on)(?!\S)/, + lookbehind: true + }, + 'number': { + pattern: /(\s)\d+[a-z]*(?!\S)/i, + lookbehind: true + }, + 'variable': variable + } + }, + 'punctuation': /[{};]/ + }; + +}(Prism)); diff --git a/components/prism-nginx.min.js b/components/prism-nginx.min.js index 0c1d62aa8c..51dabc8ef5 100644 --- a/components/prism-nginx.min.js +++ b/components/prism-nginx.min.js @@ -1 +1 @@ -Prism.languages.nginx=Prism.languages.extend("clike",{comment:{pattern:/(^|[^"{\\])#.*/,lookbehind:!0},keyword:/\b(?:CONTENT_|DOCUMENT_|GATEWAY_|HTTP_|HTTPS|if_not_empty|PATH_|QUERY_|REDIRECT_|REMOTE_|REQUEST_|SCGI|SCRIPT_|SERVER_|http|events|accept_mutex|accept_mutex_delay|access_log|add_after_body|add_before_body|add_header|addition_types|aio|alias|allow|ancient_browser|ancient_browser_value|auth|auth_basic|auth_basic_user_file|auth_http|auth_http_header|auth_http_timeout|autoindex|autoindex_exact_size|autoindex_localtime|break|charset|charset_map|charset_types|chunked_transfer_encoding|client_body_buffer_size|client_body_in_file_only|client_body_in_single_buffer|client_body_temp_path|client_body_timeout|client_header_buffer_size|client_header_timeout|client_max_body_size|connection_pool_size|create_full_put_path|daemon|dav_access|dav_methods|debug_connection|debug_points|default_type|deny|devpoll_changes|devpoll_events|directio|directio_alignment|disable_symlinks|empty_gif|env|epoll_events|error_log|error_page|expires|fastcgi_buffer_size|fastcgi_buffers|fastcgi_busy_buffers_size|fastcgi_cache|fastcgi_cache_bypass|fastcgi_cache_key|fastcgi_cache_lock|fastcgi_cache_lock_timeout|fastcgi_cache_methods|fastcgi_cache_min_uses|fastcgi_cache_path|fastcgi_cache_purge|fastcgi_cache_use_stale|fastcgi_cache_valid|fastcgi_connect_timeout|fastcgi_hide_header|fastcgi_ignore_client_abort|fastcgi_ignore_headers|fastcgi_index|fastcgi_intercept_errors|fastcgi_keep_conn|fastcgi_max_temp_file_size|fastcgi_next_upstream|fastcgi_no_cache|fastcgi_param|fastcgi_pass|fastcgi_pass_header|fastcgi_read_timeout|fastcgi_redirect_errors|fastcgi_send_timeout|fastcgi_split_path_info|fastcgi_store|fastcgi_store_access|fastcgi_temp_file_write_size|fastcgi_temp_path|flv|geo|geoip_city|geoip_country|google_perftools_profiles|gzip|gzip_buffers|gzip_comp_level|gzip_disable|gzip_http_version|gzip_min_length|gzip_proxied|gzip_static|gzip_types|gzip_vary|if|if_modified_since|ignore_invalid_headers|image_filter|image_filter_buffer|image_filter_jpeg_quality|image_filter_sharpen|image_filter_transparency|imap_capabilities|imap_client_buffer|include|index|internal|ip_hash|keepalive|keepalive_disable|keepalive_requests|keepalive_timeout|kqueue_changes|kqueue_events|large_client_header_buffers|limit_conn|limit_conn_log_level|limit_conn_zone|limit_except|limit_rate|limit_rate_after|limit_req|limit_req_log_level|limit_req_zone|limit_zone|lingering_close|lingering_time|lingering_timeout|listen|location|lock_file|log_format|log_format_combined|log_not_found|log_subrequest|map|map_hash_bucket_size|map_hash_max_size|master_process|max_ranges|memcached_buffer_size|memcached_connect_timeout|memcached_next_upstream|memcached_pass|memcached_read_timeout|memcached_send_timeout|merge_slashes|min_delete_depth|modern_browser|modern_browser_value|mp4|mp4_buffer_size|mp4_max_buffer_size|msie_padding|msie_refresh|multi_accept|open_file_cache|open_file_cache_errors|open_file_cache_min_uses|open_file_cache_valid|open_log_file_cache|optimize_server_names|override_charset|pcre_jit|perl|perl_modules|perl_require|perl_set|pid|pop3_auth|pop3_capabilities|port_in_redirect|post_action|postpone_output|protocol|proxy|proxy_buffer|proxy_buffer_size|proxy_buffering|proxy_buffers|proxy_busy_buffers_size|proxy_cache|proxy_cache_bypass|proxy_cache_key|proxy_cache_lock|proxy_cache_lock_timeout|proxy_cache_methods|proxy_cache_min_uses|proxy_cache_path|proxy_cache_use_stale|proxy_cache_valid|proxy_connect_timeout|proxy_cookie_domain|proxy_cookie_path|proxy_headers_hash_bucket_size|proxy_headers_hash_max_size|proxy_hide_header|proxy_http_version|proxy_ignore_client_abort|proxy_ignore_headers|proxy_intercept_errors|proxy_max_temp_file_size|proxy_method|proxy_next_upstream|proxy_no_cache|proxy_pass|proxy_pass_error_message|proxy_pass_header|proxy_pass_request_body|proxy_pass_request_headers|proxy_read_timeout|proxy_redirect|proxy_redirect_errors|proxy_send_lowat|proxy_send_timeout|proxy_set_body|proxy_set_header|proxy_ssl_session_reuse|proxy_store|proxy_store_access|proxy_temp_file_write_size|proxy_temp_path|proxy_timeout|proxy_upstream_fail_timeout|proxy_upstream_max_fails|random_index|read_ahead|real_ip_header|recursive_error_pages|request_pool_size|reset_timedout_connection|resolver|resolver_timeout|return|rewrite|root|rtsig_overflow_events|rtsig_overflow_test|rtsig_overflow_threshold|rtsig_signo|satisfy|satisfy_any|secure_link_secret|send_lowat|send_timeout|sendfile|sendfile_max_chunk|server|server_name|server_name_in_redirect|server_names_hash_bucket_size|server_names_hash_max_size|server_tokens|set|set_real_ip_from|smtp_auth|smtp_capabilities|so_keepalive|source_charset|split_clients|ssi|ssi_silent_errors|ssi_types|ssi_value_length|ssl|ssl_certificate|ssl_certificate_key|ssl_ciphers|ssl_client_certificate|ssl_crl|ssl_dhparam|ssl_engine|ssl_prefer_server_ciphers|ssl_protocols|ssl_session_cache|ssl_session_timeout|ssl_verify_client|ssl_verify_depth|starttls|stub_status|sub_filter|sub_filter_once|sub_filter_types|tcp_nodelay|tcp_nopush|timeout|timer_resolution|try_files|types|types_hash_bucket_size|types_hash_max_size|underscores_in_headers|uninitialized_variable_warn|upstream|use|user|userid|userid_domain|userid_expires|userid_name|userid_p3p|userid_path|userid_service|valid_referers|variables_hash_bucket_size|variables_hash_max_size|worker_connections|worker_cpu_affinity|worker_priority|worker_processes|worker_rlimit_core|worker_rlimit_nofile|worker_rlimit_sigpending|working_directory|xclient|xml_entities|xslt_entities|xslt_stylesheet|xslt_types|ssl_session_tickets|ssl_stapling|ssl_stapling_verify|ssl_ecdh_curve|ssl_trusted_certificate|more_set_headers|ssl_early_data)\b/i}),Prism.languages.insertBefore("nginx","keyword",{variable:/\$[a-z_]+/i}); \ No newline at end of file +!function(e){var n=/\$(?:\w[a-z\d]*(?:_[^\x00-\x1F\s"'\\()$]*)?|\{[^}\s"'\\]+\})/i;Prism.languages.nginx={comment:{pattern:/(^|[\s{};])#.*/,lookbehind:!0},directive:{pattern:/(^|\s)\w(?:[^;{}"'\\\s]|\\.|"(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*'|\s+(?:#.*(?!.)|(?![#\s])))*?(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:{string:{pattern:/((?:^|[^\\])(?:\\\\)*)(?:"(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*')/,lookbehind:!0,inside:{escape:{pattern:/\\["'\\nrt]/,alias:"entity"},variable:n}},comment:{pattern:/(\s)#.*/,lookbehind:!0,greedy:!0},keyword:{pattern:/^\S+/,greedy:!0},boolean:{pattern:/(\s)(?:off|on)(?!\S)/,lookbehind:!0},number:{pattern:/(\s)\d+[a-z]*(?!\S)/i,lookbehind:!0},variable:n}},punctuation:/[{};]/}}(); \ No newline at end of file diff --git a/plugins/autoloader/prism-autoloader.js b/plugins/autoloader/prism-autoloader.js index 7cedab113f..34a93a114b 100644 --- a/plugins/autoloader/prism-autoloader.js +++ b/plugins/autoloader/prism-autoloader.js @@ -89,7 +89,6 @@ "markup-templating": "markup", "mongodb": "javascript", "n4js": "javascript", - "nginx": "clike", "objectivec": "c", "opencl": "c", "parser": "markup", diff --git a/plugins/autoloader/prism-autoloader.min.js b/plugins/autoloader/prism-autoloader.min.js index a15be00534..0741fb4d27 100644 --- a/plugins/autoloader/prism-autoloader.min.js +++ b/plugins/autoloader/prism-autoloader.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof self&&self.Prism&&self.document&&document.createElement){var l={javascript:"clike",actionscript:"javascript",apex:["clike","sql"],arduino:"cpp",aspnet:["markup","csharp"],birb:"clike",bison:"c",c:"clike",csharp:"clike",cpp:"c",cfscript:"clike",chaiscript:["clike","cpp"],coffeescript:"javascript",crystal:"ruby","css-extras":"css",d:"clike",dart:"clike",django:"markup-templating",ejs:["javascript","markup-templating"],etlua:["lua","markup-templating"],erb:["ruby","markup-templating"],fsharp:"clike","firestore-security-rules":"clike",flow:"javascript",ftl:"markup-templating",gml:"clike",glsl:"c",go:"clike",groovy:"clike",haml:"ruby",handlebars:"markup-templating",haxe:"clike",hlsl:"c",idris:"haskell",java:"clike",javadoc:["markup","java","javadoclike"],jolie:"clike",jsdoc:["javascript","javadoclike","typescript"],"js-extras":"javascript",json5:"json",jsonp:"json","js-templates":"javascript",kotlin:"clike",latte:["clike","markup-templating","php"],less:"css",lilypond:"scheme",markdown:"markup","markup-templating":"markup",mongodb:"javascript",n4js:"javascript",nginx:"clike",objectivec:"c",opencl:"c",parser:"markup",php:"markup-templating",phpdoc:["php","javadoclike"],"php-extras":"php",plsql:"sql",processing:"clike",protobuf:"clike",pug:["markup","javascript"],purebasic:"clike",purescript:"haskell",qml:"javascript",qore:"clike",racket:"scheme",jsx:["markup","javascript"],tsx:["jsx","typescript"],reason:"clike",ruby:"clike",sass:"css",scss:"css",scala:"java","shell-session":"bash",smarty:"markup-templating",solidity:"clike",soy:"markup-templating",sparql:"turtle",sqf:"clike",squirrel:"clike",swift:"clike","t4-cs":["t4-templating","csharp"],"t4-vb":["t4-templating","vbnet"],tap:"yaml",tt2:["clike","markup-templating"],textile:"markup",twig:"markup",typescript:"javascript",v:"clike",vala:"clike",vbnet:"basic",velocity:"markup",wiki:"markup",xeora:"markup","xml-doc":"markup",xquery:"markup"},n={html:"markup",xml:"markup",svg:"markup",mathml:"markup",ssml:"markup",atom:"markup",rss:"markup",js:"javascript",g4:"antlr4",adoc:"asciidoc",shell:"bash",shortcode:"bbcode",rbnf:"bnf",oscript:"bsl",cs:"csharp",dotnet:"csharp",cfc:"cfscript",coffee:"coffeescript",conc:"concurnas",jinja2:"django","dns-zone":"dns-zone-file",dockerfile:"docker",gv:"dot",eta:"ejs",xlsx:"excel-formula",xls:"excel-formula",gamemakerlanguage:"gml",hs:"haskell",idr:"idris",gitignore:"ignore",hgignore:"ignore",npmignore:"ignore",webmanifest:"json",kt:"kotlin",kts:"kotlin",kum:"kumir",tex:"latex",context:"latex",ly:"lilypond",emacs:"lisp",elisp:"lisp","emacs-lisp":"lisp",md:"markdown",moon:"moonscript",n4jsd:"n4js",nani:"naniscript",objc:"objectivec",objectpascal:"pascal",px:"pcaxis",pcode:"peoplecode",pq:"powerquery",mscript:"powerquery",pbfasm:"purebasic",purs:"purescript",py:"python",rkt:"racket",rpy:"renpy",robot:"robotframework",rb:"ruby","sh-session":"shell-session",shellsession:"shell-session",smlnj:"sml",sol:"solidity",sln:"solution-file",rq:"sparql",t4:"t4-cs",trig:"turtle",ts:"typescript",tsconfig:"typoscript",uscript:"unrealscript",uc:"unrealscript",url:"uri",vb:"visual-basic",vba:"visual-basic",xeoracube:"xeora",yml:"yaml"},p={},e="components/",a=Prism.util.currentScript();if(a){var r=/\bplugins\/autoloader\/prism-autoloader\.(?:min\.)?js(?:\?[^\r\n/]*)?$/i,s=/(^|\/)[\w-]+\.(?:min\.)?js(?:\?[^\r\n/]*)?$/i,i=a.getAttribute("data-autoloader-path");if(null!=i)e=i.trim().replace(/\/?$/,"/");else{var t=a.src;r.test(t)?e=t.replace(r,"components/"):s.test(t)&&(e=t.replace(s,"$1components/"))}}var o=Prism.plugins.autoloader={languages_path:e,use_minified:!0,loadLanguages:m};Prism.hooks.add("complete",function(e){var a=e.element,r=e.language;if(a&&r&&"none"!==r){var s=function(e){var a=(e.getAttribute("data-dependencies")||"").trim();if(!a){var r=e.parentElement;r&&"pre"===r.tagName.toLowerCase()&&(a=(r.getAttribute("data-dependencies")||"").trim())}return a?a.split(/\s*,\s*/g):[]}(a);/^diff-./i.test(r)?(s.push("diff"),s.push(r.substr("diff-".length))):s.push(r),s.every(u)||m(s,function(){Prism.highlightElement(a)})}})}function u(e){if(0<=e.indexOf("!"))return!1;if((e=n[e]||e)in Prism.languages)return!0;var a=p[e];return a&&!a.error&&!1===a.loading}function m(e,a,r){"string"==typeof e&&(e=[e]);var s=e.length,i=0,t=!1;function c(){t||++i===s&&a&&a(e)}0!==s?e.forEach(function(e){!function(a,r,s){var i=0<=a.indexOf("!");function e(){var e=p[a];e||(e=p[a]={callbacks:[]}),e.callbacks.push({success:r,error:s}),!i&&u(a)?k(a,"success"):!i&&e.error?k(a,"error"):!i&&e.loading||(e.loading=!0,e.error=!1,function(e,a,r){var s=document.createElement("script");s.src=e,s.async=!0,s.onload=function(){document.body.removeChild(s),a&&a()},s.onerror=function(){document.body.removeChild(s),r&&r()},document.body.appendChild(s)}(function(e){return o.languages_path+"prism-"+e+(o.use_minified?".min":"")+".js"}(a),function(){e.loading=!1,k(a,"success")},function(){e.loading=!1,e.error=!0,k(a,"error")}))}a=a.replace("!",""),a=n[a]||a;var t=l[a];t&&t.length?m(t,e,s):e()}(e,c,function(){t||(t=!0,r&&r(e))})}):a&&setTimeout(a,0)}function k(e,a){if(p[e]){for(var r=p[e].callbacks,s=0,i=r.length;s Date: Wed, 17 Mar 2021 11:48:40 +0100 Subject: [PATCH 0755/1100] Copy to Clipboard: Added support for custom styles (#2789) --- plugins/copy-to-clipboard/index.html | 22 ++++++++++++++++++- .../prism-copy-to-clipboard.js | 20 ++++++++++++----- .../prism-copy-to-clipboard.min.js | 2 +- 3 files changed, 36 insertions(+), 8 deletions(-) diff --git a/plugins/copy-to-clipboard/index.html b/plugins/copy-to-clipboard/index.html index 9fdd6c568d..60058c1711 100644 --- a/plugins/copy-to-clipboard/index.html +++ b/plugins/copy-to-clipboard/index.html @@ -14,7 +14,7 @@ - +
        @@ -41,6 +41,26 @@

        Settings

        Warning! Although possible, you definitely shouldn't add these attributes to the html element, because a human-readable text should be placed after the character encoding declaration (<meta charset="...">), and the latter must be serialized completely within the first 512 (in older browsers) or 1024 bytes of the document. Consider using the body element or one of its descendants.

        +
        +

        Styling

        + +

        This plugin supports customizing the style of the copy button. To understand how this is done, let's look at the HTML structure of the copy button:

        + +
        <button class="copy-to-clipboard-button" type="button" data-copy-state="copy">
        +	<span>Copy</span>
        +</button>
        + +

        The copy-to-clipboard-button class can be used to select the button. The data-copy-state attribute indicates the current state of the plugin with the 3 possible states being:

        + +
          +
        • data-copy-state="copy" — default state;
        • +
        • data-copy-state="copy-error" — the state after failing copying;
        • +
        • data-copy-state="copy-success" — the state after successful copying;
        • +
        + +

        These 3 states should be conveyed to the user either by different styling or displaying the button text.

        +
        +

        Examples

        diff --git a/plugins/copy-to-clipboard/prism-copy-to-clipboard.js b/plugins/copy-to-clipboard/prism-copy-to-clipboard.js index d6e744fca9..b304eb1374 100644 --- a/plugins/copy-to-clipboard/prism-copy-to-clipboard.js +++ b/plugins/copy-to-clipboard/prism-copy-to-clipboard.js @@ -114,20 +114,24 @@ var settings = getSettings(element); var linkCopy = document.createElement('button'); - linkCopy.textContent = settings['copy']; + linkCopy.className = 'copy-to-clipboard-button'; linkCopy.setAttribute('type', 'button'); + var linkSpan = document.createElement('span'); + linkCopy.appendChild(linkSpan); + + setState('copy'); registerClipboard(linkCopy, { getText: function () { return element.textContent; }, success: function () { - linkCopy.textContent = settings['copy-success']; + setState('copy-success'); resetText(); }, error: function () { - linkCopy.textContent = settings['copy-error']; + setState('copy-error'); setTimeout(function () { selectElementText(element); @@ -140,9 +144,13 @@ return linkCopy; function resetText() { - setTimeout(function () { - linkCopy.textContent = settings['copy']; - }, settings['copy-timeout']); + setTimeout(function () { setState('copy'); }, settings['copy-timeout']); + } + + /** @param {"copy" | "copy-error" | "copy-success"} state */ + function setState(state) { + linkSpan.textContent = settings[state]; + linkCopy.setAttribute('data-copy-state', state); } }); })(); diff --git a/plugins/copy-to-clipboard/prism-copy-to-clipboard.min.js b/plugins/copy-to-clipboard/prism-copy-to-clipboard.min.js index d45ee5f21a..26b45fe97c 100644 --- a/plugins/copy-to-clipboard/prism-copy-to-clipboard.min.js +++ b/plugins/copy-to-clipboard/prism-copy-to-clipboard.min.js @@ -1 +1 @@ -!function(){function c(t,e){t.addEventListener("click",function(){!function(t){navigator.clipboard?navigator.clipboard.writeText(t.getText()).then(t.success,t.error):function(e){var t=document.createElement("textarea");t.value=e.getText(),t.style.top="0",t.style.left="0",t.style.position="fixed",document.body.appendChild(t),t.focus(),t.select();try{var o=document.execCommand("copy");setTimeout(function(){o?e.success():e.error()},1)}catch(t){setTimeout(function(){e.error(t)},1)}document.body.removeChild(t)}(t)}(e)})}"undefined"!=typeof self&&self.Prism&&self.document&&(Prism.plugins.toolbar?Prism.plugins.toolbar.registerButton("copy-to-clipboard",function(t){var e=t.element,o=function(t){var e={copy:"Copy","copy-error":"Press Ctrl+C to copy","copy-success":"Copied!","copy-timeout":5e3};for(var o in e){for(var n="data-prismjs-"+o,r=t;r&&!r.hasAttribute(n);)r=r.parentElement;r&&(e[o]=r.getAttribute(n))}return e}(e),n=document.createElement("button");return n.textContent=o.copy,n.setAttribute("type","button"),c(n,{getText:function(){return e.textContent},success:function(){n.textContent=o["copy-success"],r()},error:function(){n.textContent=o["copy-error"],setTimeout(function(){!function(t){window.getSelection().selectAllChildren(t)}(e)},1),r()}}),n;function r(){setTimeout(function(){n.textContent=o.copy},o["copy-timeout"])}}):console.warn("Copy to Clipboard plugin loaded before Toolbar plugin."))}(); \ No newline at end of file +!function(){function u(t,e){t.addEventListener("click",function(){!function(t){navigator.clipboard?navigator.clipboard.writeText(t.getText()).then(t.success,t.error):function(e){var t=document.createElement("textarea");t.value=e.getText(),t.style.top="0",t.style.left="0",t.style.position="fixed",document.body.appendChild(t),t.focus(),t.select();try{var o=document.execCommand("copy");setTimeout(function(){o?e.success():e.error()},1)}catch(t){setTimeout(function(){e.error(t)},1)}document.body.removeChild(t)}(t)}(e)})}"undefined"!=typeof self&&self.Prism&&self.document&&(Prism.plugins.toolbar?Prism.plugins.toolbar.registerButton("copy-to-clipboard",function(t){var e=t.element,o=function(t){var e={copy:"Copy","copy-error":"Press Ctrl+C to copy","copy-success":"Copied!","copy-timeout":5e3};for(var o in e){for(var n="data-prismjs-"+o,r=t;r&&!r.hasAttribute(n);)r=r.parentElement;r&&(e[o]=r.getAttribute(n))}return e}(e),n=document.createElement("button");n.className="copy-to-clipboard-button",n.setAttribute("type","button");var r=document.createElement("span");return n.appendChild(r),i("copy"),u(n,{getText:function(){return e.textContent},success:function(){i("copy-success"),c()},error:function(){i("copy-error"),setTimeout(function(){!function(t){window.getSelection().selectAllChildren(t)}(e)},1),c()}}),n;function c(){setTimeout(function(){i("copy")},o["copy-timeout"])}function i(t){r.textContent=o[t],n.setAttribute("data-copy-state",t)}}):console.warn("Copy to Clipboard plugin loaded before Toolbar plugin."))}(); \ No newline at end of file From 933af805eb164959f57c082bf13307317811f7ae Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Wed, 17 Mar 2021 11:54:14 +0100 Subject: [PATCH 0756/1100] Tests: Stricter `components.json` tests (#2758) --- components.js | 2 +- components.json | 2 +- tests/dependencies-test.js | 140 ++++++++++++++++++++++++++++++------- 3 files changed, 118 insertions(+), 26 deletions(-) diff --git a/components.js b/components.js index e9117779a7..e2896d3a60 100644 --- a/components.js +++ b/components.js @@ -1,2 +1,2 @@ -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml","ssml","atom","rss"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","ssml":"SSML","atom":"Atom","rss":"RSS"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","optional":"regex","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"ABNF","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"agda":{"title":"Agda","owner":"xy-ren"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apex":{"title":"Apex","require":["clike","sql"],"owner":"RunDevelopment"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"dkern"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"birb":{"title":"Birb","require":"clike","owner":"Calamity210"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"BNF","alias":"rbnf","aliasTitles":{"rbnf":"RBNF"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"bsl":{"title":"BSL (1C:Enterprise)","alias":"oscript","aliasTitles":{"oscript":"OneScript"},"owner":"Diversus23"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cfscript":{"title":"CFScript","require":"clike","alias":"cfc","owner":"mjclemente"},"chaiscript":{"title":"ChaiScript","require":["clike","cpp"],"owner":"RunDevelopment"},"cil":{"title":"CIL","owner":"sbrl"},"clojure":{"title":"Clojure","owner":"troglotit"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"cypher":{"title":"Cypher","owner":"RunDevelopment"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dataweave":{"title":"DataWeave","owner":"machaval"},"dax":{"title":"DAX","owner":"peterbud"},"dhall":{"title":"Dhall","owner":"RunDevelopment"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"dot":{"title":"DOT (Graphviz)","alias":"gv","optional":"markup","owner":"RunDevelopment"},"ebnf":{"title":"EBNF","owner":"RunDevelopment"},"editorconfig":{"title":"EditorConfig","owner":"osipxd"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"false":{"title":"False","owner":"edukisto"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"c","owner":"Golmote"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","optional":["markdown"],"owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"hlsl":{"title":"HLSL","require":"c","owner":"RunDevelopment"},"http":{"title":"HTTP","optional":["css","javascript","json","markup","uri"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"icu-message-format":{"title":"ICU Message Format","owner":"RunDevelopment"},"idris":{"title":"Idris","alias":"idr","owner":"KeenS","require":"haskell"},"ignore":{"title":".ignore","owner":"osipxd","alias":["gitignore","hgignore","npmignore"],"aliasTitles":{"gitignore":".gitignore","hgignore":".hgignore","npmignore":".npmignore"}},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike","typescript"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","alias":"webmanifest","aliasTitles":{"webmanifest":"Web App Manifest"},"owner":"CupOfTea696"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"jsstacktrace":{"title":"JS stack trace","owner":"sbrl"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","alias":["kt","kts"],"aliasTitles":{"kts":"Kotlin Script"},"require":"clike","owner":"Golmote"},"kumir":{"title":"KuMir (КуМир)","alias":"kum","owner":"edukisto"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","optional":"yaml","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"mongodb":{"title":"MongoDB","owner":"airs0urce","require":"javascript"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"naniscript":{"title":"Naninovel Script","owner":"Elringus","alias":"nani"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nginx":{"title":"nginx","owner":"volado"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"psl":{"title":"PATROL Scripting Language","owner":"bertysentry"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":"markup-templating","owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"promql":{"title":"PromQL","owner":"arendjr"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"purebasic":{"title":"PureBasic","require":"clike","alias":"pbfasm","owner":"HeX0R101"},"purescript":{"title":"PureScript","require":"haskell","alias":"purs","owner":"sriharshachilakapati"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"racket":{"title":"Racket","require":"scheme","alias":"rkt","owner":"RunDevelopment"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","owner":"RunDevelopment"},"rego":{"title":"Rego","owner":"JordanSh"},"renpy":{"title":"Ren'py","alias":"rpy","owner":"HyuchiaDiego"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","alias":["sh-session","shellsession"],"owner":"RunDevelopment"},"smali":{"title":"Smali","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sml":{"title":"SML","alias":"smlnj","aliasTitles":{"smlnj":"SML/NJ"},"owner":"RunDevelopment"},"solidity":{"title":"Solidity (Ethereum)","alias":"sol","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"squirrel":{"title":"Squirrel","require":"clike","owner":"RunDevelopment"},"stan":{"title":"Stan","owner":"RunDevelopment"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","vbnet"],"owner":"RunDevelopment"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"typoscript":{"title":"TypoScript","alias":"tsconfig","aliasTitles":{"tsconfig":"TSConfig"},"owner":"dkern"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"uri":{"title":"URI","alias":"url","aliasTitles":{"url":"URL"},"owner":"RunDevelopment"},"v":{"title":"V","require":"clike","owner":"taggon"},"vala":{"title":"Vala","require":"clike","optional":"regex","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":["vb","vba"],"aliasTitles":{"vba":"VBA"},"owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xml-doc":{"title":"XML doc (.net)","require":"markup","modify":["csharp","fsharp","vbnet"],"owner":"RunDevelopment"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"yang":{"title":"YANG","owner":"RunDevelopment"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml","ssml","atom","rss"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","ssml":"SSML","atom":"Atom","rss":"RSS"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","optional":"regex","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"ABNF","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"agda":{"title":"Agda","owner":"xy-ren"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apex":{"title":"Apex","require":["clike","sql"],"owner":"RunDevelopment"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"dkern"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"birb":{"title":"Birb","require":"clike","owner":"Calamity210"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"BNF","alias":"rbnf","aliasTitles":{"rbnf":"RBNF"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"bsl":{"title":"BSL (1C:Enterprise)","alias":"oscript","aliasTitles":{"oscript":"OneScript"},"owner":"Diversus23"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cfscript":{"title":"CFScript","require":"clike","alias":"cfc","owner":"mjclemente"},"chaiscript":{"title":"ChaiScript","require":["clike","cpp"],"owner":"RunDevelopment"},"cil":{"title":"CIL","owner":"sbrl"},"clojure":{"title":"Clojure","owner":"troglotit"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"cypher":{"title":"Cypher","owner":"RunDevelopment"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dataweave":{"title":"DataWeave","owner":"machaval"},"dax":{"title":"DAX","owner":"peterbud"},"dhall":{"title":"Dhall","owner":"RunDevelopment"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"dot":{"title":"DOT (Graphviz)","alias":"gv","optional":"markup","owner":"RunDevelopment"},"ebnf":{"title":"EBNF","owner":"RunDevelopment"},"editorconfig":{"title":"EditorConfig","owner":"osipxd"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"false":{"title":"False","owner":"edukisto"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"c","owner":"Golmote"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","optional":"markdown","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"hlsl":{"title":"HLSL","require":"c","owner":"RunDevelopment"},"http":{"title":"HTTP","optional":["css","javascript","json","markup","uri"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"icu-message-format":{"title":"ICU Message Format","owner":"RunDevelopment"},"idris":{"title":"Idris","alias":"idr","owner":"KeenS","require":"haskell"},"ignore":{"title":".ignore","owner":"osipxd","alias":["gitignore","hgignore","npmignore"],"aliasTitles":{"gitignore":".gitignore","hgignore":".hgignore","npmignore":".npmignore"}},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike","typescript"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","alias":"webmanifest","aliasTitles":{"webmanifest":"Web App Manifest"},"owner":"CupOfTea696"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"jsstacktrace":{"title":"JS stack trace","owner":"sbrl"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","alias":["kt","kts"],"aliasTitles":{"kts":"Kotlin Script"},"require":"clike","owner":"Golmote"},"kumir":{"title":"KuMir (КуМир)","alias":"kum","owner":"edukisto"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","optional":"yaml","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"mongodb":{"title":"MongoDB","owner":"airs0urce","require":"javascript"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"naniscript":{"title":"Naninovel Script","owner":"Elringus","alias":"nani"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nginx":{"title":"nginx","owner":"volado"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"psl":{"title":"PATROL Scripting Language","owner":"bertysentry"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":"markup-templating","owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"promql":{"title":"PromQL","owner":"arendjr"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"purebasic":{"title":"PureBasic","require":"clike","alias":"pbfasm","owner":"HeX0R101"},"purescript":{"title":"PureScript","require":"haskell","alias":"purs","owner":"sriharshachilakapati"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"racket":{"title":"Racket","require":"scheme","alias":"rkt","owner":"RunDevelopment"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","owner":"RunDevelopment"},"rego":{"title":"Rego","owner":"JordanSh"},"renpy":{"title":"Ren'py","alias":"rpy","owner":"HyuchiaDiego"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","alias":["sh-session","shellsession"],"owner":"RunDevelopment"},"smali":{"title":"Smali","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sml":{"title":"SML","alias":"smlnj","aliasTitles":{"smlnj":"SML/NJ"},"owner":"RunDevelopment"},"solidity":{"title":"Solidity (Ethereum)","alias":"sol","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"squirrel":{"title":"Squirrel","require":"clike","owner":"RunDevelopment"},"stan":{"title":"Stan","owner":"RunDevelopment"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","vbnet"],"owner":"RunDevelopment"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"typoscript":{"title":"TypoScript","alias":"tsconfig","aliasTitles":{"tsconfig":"TSConfig"},"owner":"dkern"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"uri":{"title":"URI","alias":"url","aliasTitles":{"url":"URL"},"owner":"RunDevelopment"},"v":{"title":"V","require":"clike","owner":"taggon"},"vala":{"title":"Vala","require":"clike","optional":"regex","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":["vb","vba"],"aliasTitles":{"vba":"VBA"},"owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xml-doc":{"title":"XML doc (.net)","require":"markup","modify":["csharp","fsharp","vbnet"],"owner":"RunDevelopment"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"yang":{"title":"YANG","owner":"RunDevelopment"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; if (typeof module !== 'undefined' && module.exports) { module.exports = components; } \ No newline at end of file diff --git a/components.json b/components.json index eb36d0282d..70270401d9 100644 --- a/components.json +++ b/components.json @@ -457,7 +457,7 @@ }, "graphql": { "title": "GraphQL", - "optional": ["markdown"], + "optional": "markdown", "owner": "Golmote" }, "groovy": { diff --git a/tests/dependencies-test.js b/tests/dependencies-test.js index 64588d563d..78395398c3 100644 --- a/tests/dependencies-test.js +++ b/tests/dependencies-test.js @@ -246,22 +246,25 @@ describe('Dependency logic', function () { describe('components.json', function () { - it('- should be valid', function () { - try { - const allIds = []; - for (const category in components) { - Object.keys(components[category]).forEach(id => allIds.push(id)); - } - // and an alias, so we force the lazy alias resolver to check all aliases - allIds.push('js'); - - getLoader(components, allIds).getIds(); - } catch (error) { - assert.fail(error.toString()); + /** + * @param {T | T[] | undefined | null} value + * @returns {T[]} + * @template T + */ + function toArray(value) { + if (Array.isArray(value)) { + return value; + } else if (value == undefined) { + return []; + } else { + return [value]; } - }); + } - it('- should not have redundant optional dependencies', function () { + /** + * @param {(entry: import("../dependencies").ComponentEntry, id: string, entries: Object) => void} consumeFn + */ + function forEachEntry(consumeFn) { /** @type {Object} */ const entries = {}; @@ -274,18 +277,43 @@ describe('components.json', function () { } } - function toArray(value) { - if (Array.isArray(value)) { - return value; - } else if (value == undefined) { - return []; - } else { - return [value]; + for (const id in entries) { + consumeFn(entries[id], id, entries); + } + } + + const entryProperties = [ + "title", + "description", + "alias", + "aliasTitles", + "owner", + + "require", + "optional", + "modify", + + "noCSS", + "option" + ]; + + it('- should be valid', function () { + try { + const allIds = []; + for (const category in components) { + Object.keys(components[category]).forEach(id => allIds.push(id)); } + // and an alias, so we force the lazy alias resolver to check all aliases + allIds.push('js'); + + getLoader(components, allIds).getIds(); + } catch (error) { + assert.fail(error.toString()); } + }); - for (const id in entries) { - const entry = entries[id]; + it('- should not have redundant optional dependencies', function () { + forEachEntry((entry, id) => { const optional = new Set(toArray(entry.optional)); for (const modifyId of toArray(entry.modify)) { @@ -298,7 +326,7 @@ describe('components.json', function () { assert.fail(`The component "${id}" has declared "${requireId}" as both optional and require.`) } } - } + }); }); it('- should have a sorted language list', function () { @@ -333,4 +361,68 @@ describe('components.json', function () { assert.sameOrderedMembers(languages, sorted); }); + it('- should not have single-element or empty arrays', function () { + /** @type {keyof import("../dependencies").ComponentEntry} */ + const properties = ["alias", "optional", "require", "modify"]; + + forEachEntry((entry, id) => { + for (const prop of properties) { + const value = entry[prop]; + if (Array.isArray(value)) { + if (value.length === 0) { + assert.fail( + `The component "${id}" defines an empty array for "${prop}".` + + ` Please remove the "${prop}" property.` + ); + } else if (value.length === 1) { + assert.fail( + `The component "${id}" defines a single-empty array for "${prop}".` + + ` Please replace the array with its element.` + + `\n\t${JSON.stringify(prop)}: ${JSON.stringify(value[0])}` + ); + } + } + } + }); + }); + + it('- should only have alias titles for valid aliases', function () { + forEachEntry((entry, id) => { + const title = entry.title; + const alias = toArray(entry.alias); + const aliasTitles = entry.aliasTitles; + + for (const key in aliasTitles) { + if (alias.indexOf(key) === -1) { + assert.fail( + `Component "${id}":` + + ` The alias ${JSON.stringify(key)} in "aliasTitles" is not defined in "alias".` + ); + } + if (aliasTitles[key] === title) { + assert.fail( + `Component "${id}":` + + ` The alias title for ${JSON.stringify(key)} is the same as the normal title.` + + ` Remove the alias title or choose a different alias title.` + ); + } + } + }); + }); + + it('- should not have unknown properties', function () { + const knownProperties = new Set(entryProperties); + + forEachEntry((entry, id) => { + for (const prop in entry) { + if (!knownProperties.has(prop)) { + assert.fail( + `Component "${id}":` + + ` The property ${JSON.stringify(prop)} is not supported by Prism.` + ); + } + } + }); + }); + }); From d0bcd0741dd67df57c71aed7d3fe80c9395e246c Mon Sep 17 00:00:00 2001 From: Brian Egan Date: Wed, 17 Mar 2021 16:54:04 +0100 Subject: [PATCH 0757/1100] Dart: Improved support for classes & generics (#2810) --- components/prism-dart.js | 87 ++++++++++++++----- components/prism-dart.min.js | 2 +- tests/languages/dart/class-name_feature.test | 91 ++++++++++++++++++++ tests/languages/dart/keyword_feature.test | 6 +- tests/languages/dart/operator_feature.test | 16 ++-- 5 files changed, 167 insertions(+), 35 deletions(-) create mode 100644 tests/languages/dart/class-name_feature.test diff --git a/components/prism-dart.js b/components/prism-dart.js index cd4230a40d..0101e4640e 100644 --- a/components/prism-dart.js +++ b/components/prism-dart.js @@ -1,24 +1,67 @@ -Prism.languages.dart = Prism.languages.extend('clike', { - 'string': [ - { - pattern: /r?("""|''')[\s\S]*?\1/, - greedy: true - }, - { - pattern: /r?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/, - greedy: true - } - ], - 'keyword': [ +(function (Prism) { + var keywords = [ /\b(?:async|sync|yield)\*/, - /\b(?:abstract|assert|async|await|break|case|catch|class|const|continue|covariant|default|deferred|do|dynamic|else|enum|export|extension|external|extends|factory|final|finally|for|Function|get|hide|if|implements|interface|import|in|library|mixin|new|null|on|operator|part|rethrow|return|set|show|static|super|switch|sync|this|throw|try|typedef|var|void|while|with|yield)\b/ - ], - 'operator': /\bis!|\b(?:as|is)\b|\+\+|--|&&|\|\||<<=?|>>=?|~(?:\/=?)?|[+\-*\/%&^|=!<>]=?|\?/ -}); + /\b(?:abstract|assert|async|await|break|case|catch|class|const|continue|covariant|default|deferred|do|dynamic|else|enum|export|extension|external|extends|factory|final|finally|for|get|hide|if|implements|interface|import|in|library|mixin|new|null|on|operator|part|rethrow|return|set|show|static|super|switch|sync|this|throw|try|typedef|var|void|while|with|yield)\b/ + ]; + + // Handles named imports, such as http.Client + var packagePrefix = /(^|[^\w.])(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source; + + // based on the dart naming conventions + var className = { + pattern: RegExp(packagePrefix + /[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source), + lookbehind: true, + inside: { + 'namespace': { + pattern: /^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/, + inside: { + 'punctuation': /\./ + } + }, + } + }; -Prism.languages.insertBefore('dart','function',{ - 'metadata': { - pattern: /@\w+/, - alias: 'symbol' - } -}); + Prism.languages.dart = Prism.languages.extend('clike', { + 'string': [ + { + pattern: /r?("""|''')[\s\S]*?\1/, + greedy: true + }, + { + pattern: /r?(["'])(?:\\.|(?!\1)[^\\\r\n])*\1/, + greedy: true + } + ], + 'class-name': [ + className, + { + // variables and parameters + // this to support class names (or generic parameters) which do not contain a lower case letter (also works for methods) + pattern: RegExp(packagePrefix + /[A-Z]\w*(?=\s+\w+\s*[;,=()])/.source), + lookbehind: true, + inside: className.inside + } + ], + 'keyword': keywords, + 'operator': /\bis!|\b(?:as|is)\b|\+\+|--|&&|\|\||<<=?|>>=?|~(?:\/=?)?|[+\-*\/%&^|=!<>]=?|\?/ + }); + + Prism.languages.insertBefore('dart','function',{ + 'metadata': { + pattern: /@\w+/, + alias: 'symbol' + } + }); + + Prism.languages.insertBefore('dart','class-name',{ + 'generics': { + pattern: /<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<[\w\s,.&?]*>)*>)*>)*>/, + inside: { + 'class-name': className, + 'keyword': keywords, + 'punctuation': /[<>(),.:]/, + 'operator': /[?&|]/ + } + }, + }); +}(Prism)); diff --git a/components/prism-dart.min.js b/components/prism-dart.min.js index 1a6bfbd71f..03e935bdb4 100644 --- a/components/prism-dart.min.js +++ b/components/prism-dart.min.js @@ -1 +1 @@ -Prism.languages.dart=Prism.languages.extend("clike",{string:[{pattern:/r?("""|''')[\s\S]*?\1/,greedy:!0},{pattern:/r?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0}],keyword:[/\b(?:async|sync|yield)\*/,/\b(?:abstract|assert|async|await|break|case|catch|class|const|continue|covariant|default|deferred|do|dynamic|else|enum|export|extension|external|extends|factory|final|finally|for|Function|get|hide|if|implements|interface|import|in|library|mixin|new|null|on|operator|part|rethrow|return|set|show|static|super|switch|sync|this|throw|try|typedef|var|void|while|with|yield)\b/],operator:/\bis!|\b(?:as|is)\b|\+\+|--|&&|\|\||<<=?|>>=?|~(?:\/=?)?|[+\-*\/%&^|=!<>]=?|\?/}),Prism.languages.insertBefore("dart","function",{metadata:{pattern:/@\w+/,alias:"symbol"}}); \ No newline at end of file +!function(e){var a=[/\b(?:async|sync|yield)\*/,/\b(?:abstract|assert|async|await|break|case|catch|class|const|continue|covariant|default|deferred|do|dynamic|else|enum|export|extension|external|extends|factory|final|finally|for|get|hide|if|implements|interface|import|in|library|mixin|new|null|on|operator|part|rethrow|return|set|show|static|super|switch|sync|this|throw|try|typedef|var|void|while|with|yield)\b/],t="(^|[^\\w.])(?:[a-z]\\w*\\s*\\.\\s*)*(?:[A-Z]\\w*\\s*\\.\\s*)*",s={pattern:RegExp(t+"[A-Z](?:[\\d_A-Z]*[a-z]\\w*)?\\b"),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}}}};e.languages.dart=e.languages.extend("clike",{string:[{pattern:/r?("""|''')[\s\S]*?\1/,greedy:!0},{pattern:/r?(["'])(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0}],"class-name":[s,{pattern:RegExp(t+"[A-Z]\\w*(?=\\s+\\w+\\s*[;,=()])"),lookbehind:!0,inside:s.inside}],keyword:a,operator:/\bis!|\b(?:as|is)\b|\+\+|--|&&|\|\||<<=?|>>=?|~(?:\/=?)?|[+\-*\/%&^|=!<>]=?|\?/}),e.languages.insertBefore("dart","function",{metadata:{pattern:/@\w+/,alias:"symbol"}}),e.languages.insertBefore("dart","class-name",{generics:{pattern:/<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<[\w\s,.&?]*>)*>)*>)*>/,inside:{"class-name":s,keyword:a,punctuation:/[<>(),.:]/,operator:/[?&|]/}}})}(Prism); \ No newline at end of file diff --git a/tests/languages/dart/class-name_feature.test b/tests/languages/dart/class-name_feature.test new file mode 100644 index 0000000000..f13f8cdb8b --- /dev/null +++ b/tests/languages/dart/class-name_feature.test @@ -0,0 +1,91 @@ +class Foo with ns.Bar { + const Foo(this.bar); + + final Bar bar; + + Baz baz(ns.Bat bat) { + return Baz(bat); + } + +} + +---------------------------------------------------- + +[ + ["keyword", "class"], + ["class-name", ["Foo"]], + ["keyword", "with"], + ["class-name", [ + ["namespace", [ + "ns", + ["punctuation", "."] + ]], + "Bar" + ]], + ["punctuation", "{"], + + ["keyword", "const"], + ["class-name", ["Foo"]], + ["punctuation", "("], + ["keyword", "this"], + ["punctuation", "."], + "bar", + ["punctuation", ")"], + ["punctuation", ";"], + + ["keyword", "final"], + ["class-name", ["Bar"]], + " bar", + ["punctuation", ";"], + + ["class-name", ["Baz"]], + ["generics", [ + ["punctuation", "<"], + ["class-name", [ + ["namespace", [ + "ns", + ["punctuation", "."] + ]], + "Bat" + ]], + ["punctuation", ">"] + ]], + ["function", "baz"], + ["punctuation", "("], + ["class-name", [ + ["namespace", [ + "ns", + ["punctuation", "."] + ]], + "Bat" + ]], + " bat", + ["punctuation", ")"], + ["punctuation", "{"], + ["keyword", "return"], + ["class-name", [ + "Baz" + ]], + ["generics", [ + ["punctuation", "<"], + ["class-name", [ + ["namespace", [ + "ns", + ["punctuation", "."] + ]], + "Bat" + ]], + ["punctuation", ">"] + ]], + ["punctuation", "("], + "bat", + ["punctuation", ")"], + ["punctuation", ";"], + ["punctuation", "}"], + + ["punctuation", "}"] +] + +---------------------------------------------------- + +Checks class names and generics diff --git a/tests/languages/dart/keyword_feature.test b/tests/languages/dart/keyword_feature.test index bc78ce3e11..745f75e9e8 100644 --- a/tests/languages/dart/keyword_feature.test +++ b/tests/languages/dart/keyword_feature.test @@ -7,7 +7,7 @@ continue covariant default deferred do dynamic else enum export extension external extends; -factory final finally for Function +factory final finally for get hide if implements; interface; @@ -34,7 +34,7 @@ void while with yield ["keyword", "do"], ["keyword", "dynamic"], ["keyword", "else"], ["keyword", "enum"], ["keyword", "export"], ["keyword", "extension"], ["keyword", "external"], ["keyword", "extends"], ["punctuation", ";"], - ["keyword", "factory"], ["keyword", "final"], ["keyword", "finally"], ["keyword", "for"], ["keyword", "Function"], + ["keyword", "factory"], ["keyword", "final"], ["keyword", "finally"], ["keyword", "for"], ["keyword", "get"], ["keyword", "hide"], ["keyword", "if"], ["keyword", "implements"], ["punctuation", ";"], ["keyword", "interface"], ["punctuation", ";"], @@ -51,4 +51,4 @@ void while with yield ---------------------------------------------------- -Checks for all keywords. \ No newline at end of file +Checks for all keywords. diff --git a/tests/languages/dart/operator_feature.test b/tests/languages/dart/operator_feature.test index 5d631fd0bb..01993d9ed4 100644 --- a/tests/languages/dart/operator_feature.test +++ b/tests/languages/dart/operator_feature.test @@ -1,14 +1,13 @@ ++ -- * / % ~/ + - ! ~ -<< >> ? -& ^ | ->= > <= < +< << <= <<= +> >> >= >>= +& ^ | ? as is is! == != && || = *= /= ~/= %= += -= -<<= >>= &= ^= |= ---------------------------------------------------- @@ -17,17 +16,16 @@ as is is! ["operator", "++"], ["operator", "--"], ["operator", "*"], ["operator", "/"], ["operator", "%"], ["operator", "~/"], ["operator", "+"], ["operator", "-"], ["operator", "!"], ["operator", "~"], - ["operator", "<<"], ["operator", ">>"], ["operator", "?"], - ["operator", "&"], ["operator", "^"], ["operator", "|"], - ["operator", ">="], ["operator", ">"], ["operator", "<="], ["operator", "<"], + ["operator", "<"], ["operator", "<<"], ["operator", "<="], ["operator", "<<="], + ["operator", ">"], ["operator", ">>"], ["operator", ">="], ["operator", ">>="], + ["operator", "&"], ["operator", "^"], ["operator", "|"], ["operator", "?"], ["operator", "as"], ["operator", "is"], ["operator", "is!"], ["operator", "=="], ["operator", "!="], ["operator", "&&"], ["operator", "||"], ["operator", "="], ["operator", "*="], ["operator", "/="], ["operator", "~/="], ["operator", "%="], ["operator", "+="], ["operator", "-="], - ["operator", "<<="], ["operator", ">>="], ["operator", "&="], ["operator", "^="], ["operator", "|="] ] ---------------------------------------------------- -Checks for all operators. \ No newline at end of file +Checks for all operators. From e32e043bf05a6163cd1b06711ba66db8323c9fc7 Mon Sep 17 00:00:00 2001 From: XojoGermany <1276539+XojoGermany@users.noreply.github.com> Date: Wed, 17 Mar 2021 17:03:48 +0100 Subject: [PATCH 0758/1100] Xojo: Added last missing Keyword "Selector" (#2807) --- components/prism-xojo.js | 2 +- components/prism-xojo.min.js | 2 +- tests/languages/xojo/keyword_feature.test | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/components/prism-xojo.js b/components/prism-xojo.js index 32d2618a34..9c6671e7fc 100644 --- a/components/prism-xojo.js +++ b/components/prism-xojo.js @@ -14,7 +14,7 @@ Prism.languages.xojo = { /&[bchou][a-z\d]+/i ], 'symbol': /#(?:If|Else|ElseIf|Endif|Pragma)\b/i, - 'keyword': /\b(?:AddHandler|App|Array|As(?:signs)?|Auto|By(?:Ref|Val)|Boolean|Break|Byte|Call|Case|Catch|CFStringRef|CGFloat|Class|Color|Const|Continue|CString|Currency|CurrentMethodName|Declare|Delegate|Dim|Do(?:uble|wnTo)?|Each|Else(?:If)?|End|Enumeration|Event|Exception|Exit|Extends|False|Finally|For|Function|Get|GetTypeInfo|Global|GOTO|If|Implements|In|Inherits|Int(?:erface|eger|8|16|32|64)?|Lib|Loop|Me|Module|Next|Nil|Object|Optional|OSType|ParamArray|Private|Property|Protected|PString|Ptr|Raise(?:Event)?|ReDim|Rem|RemoveHandler|Return|Select|Self|Set|Single|Shared|Short|Soft|Static|Step|String|Sub|Super|Text|Then|To|True|Try|Ubound|UInt(?:eger|8|16|32|64)?|Until|Using|Var(?:iant)?|Wend|While|WindowPtr|WString)\b/i, + 'keyword': /\b(?:AddHandler|App|Array|As(?:signs)?|Auto|By(?:Ref|Val)|Boolean|Break|Byte|Call|Case|Catch|CFStringRef|CGFloat|Class|Color|Const|Continue|CString|Currency|CurrentMethodName|Declare|Delegate|Dim|Do(?:uble|wnTo)?|Each|Else(?:If)?|End|Enumeration|Event|Exception|Exit|Extends|False|Finally|For|Function|Get|GetTypeInfo|Global|GOTO|If|Implements|In|Inherits|Int(?:erface|eger|8|16|32|64)?|Lib|Loop|Me|Module|Next|Nil|Object|Optional|OSType|ParamArray|Private|Property|Protected|PString|Ptr|Raise(?:Event)?|ReDim|Rem|RemoveHandler|Return|Select(?:or)?|Self|Set|Single|Shared|Short|Soft|Static|Step|String|Sub|Super|Text|Then|To|True|Try|Ubound|UInt(?:eger|8|16|32|64)?|Until|Using|Var(?:iant)?|Wend|While|WindowPtr|WString)\b/i, 'operator': /<[=>]?|>=?|[+\-*\/\\^=]|\b(?:AddressOf|And|Ctype|IsA?|Mod|New|Not|Or|Xor|WeakAddressOf)\b/i, 'punctuation': /[.,;:()]/ }; \ No newline at end of file diff --git a/components/prism-xojo.min.js b/components/prism-xojo.min.js index a897cf4b2c..e2b92c08c7 100644 --- a/components/prism-xojo.min.js +++ b/components/prism-xojo.min.js @@ -1 +1 @@ -Prism.languages.xojo={comment:{pattern:/(?:'|\/\/|Rem\b).+/i,inside:{keyword:/^Rem/i}},string:{pattern:/"(?:""|[^"])*"/,greedy:!0},number:[/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:E[+-]?\d+)?/i,/&[bchou][a-z\d]+/i],symbol:/#(?:If|Else|ElseIf|Endif|Pragma)\b/i,keyword:/\b(?:AddHandler|App|Array|As(?:signs)?|Auto|By(?:Ref|Val)|Boolean|Break|Byte|Call|Case|Catch|CFStringRef|CGFloat|Class|Color|Const|Continue|CString|Currency|CurrentMethodName|Declare|Delegate|Dim|Do(?:uble|wnTo)?|Each|Else(?:If)?|End|Enumeration|Event|Exception|Exit|Extends|False|Finally|For|Function|Get|GetTypeInfo|Global|GOTO|If|Implements|In|Inherits|Int(?:erface|eger|8|16|32|64)?|Lib|Loop|Me|Module|Next|Nil|Object|Optional|OSType|ParamArray|Private|Property|Protected|PString|Ptr|Raise(?:Event)?|ReDim|Rem|RemoveHandler|Return|Select|Self|Set|Single|Shared|Short|Soft|Static|Step|String|Sub|Super|Text|Then|To|True|Try|Ubound|UInt(?:eger|8|16|32|64)?|Until|Using|Var(?:iant)?|Wend|While|WindowPtr|WString)\b/i,operator:/<[=>]?|>=?|[+\-*\/\\^=]|\b(?:AddressOf|And|Ctype|IsA?|Mod|New|Not|Or|Xor|WeakAddressOf)\b/i,punctuation:/[.,;:()]/}; \ No newline at end of file +Prism.languages.xojo={comment:{pattern:/(?:'|\/\/|Rem\b).+/i,inside:{keyword:/^Rem/i}},string:{pattern:/"(?:""|[^"])*"/,greedy:!0},number:[/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:E[+-]?\d+)?/i,/&[bchou][a-z\d]+/i],symbol:/#(?:If|Else|ElseIf|Endif|Pragma)\b/i,keyword:/\b(?:AddHandler|App|Array|As(?:signs)?|Auto|By(?:Ref|Val)|Boolean|Break|Byte|Call|Case|Catch|CFStringRef|CGFloat|Class|Color|Const|Continue|CString|Currency|CurrentMethodName|Declare|Delegate|Dim|Do(?:uble|wnTo)?|Each|Else(?:If)?|End|Enumeration|Event|Exception|Exit|Extends|False|Finally|For|Function|Get|GetTypeInfo|Global|GOTO|If|Implements|In|Inherits|Int(?:erface|eger|8|16|32|64)?|Lib|Loop|Me|Module|Next|Nil|Object|Optional|OSType|ParamArray|Private|Property|Protected|PString|Ptr|Raise(?:Event)?|ReDim|Rem|RemoveHandler|Return|Select(?:or)?|Self|Set|Single|Shared|Short|Soft|Static|Step|String|Sub|Super|Text|Then|To|True|Try|Ubound|UInt(?:eger|8|16|32|64)?|Until|Using|Var(?:iant)?|Wend|While|WindowPtr|WString)\b/i,operator:/<[=>]?|>=?|[+\-*\/\\^=]|\b(?:AddressOf|And|Ctype|IsA?|Mod|New|Not|Or|Xor|WeakAddressOf)\b/i,punctuation:/[.,;:()]/}; \ No newline at end of file diff --git a/tests/languages/xojo/keyword_feature.test b/tests/languages/xojo/keyword_feature.test index afef7ae416..f611dcfb3d 100644 --- a/tests/languages/xojo/keyword_feature.test +++ b/tests/languages/xojo/keyword_feature.test @@ -75,6 +75,7 @@ Rem RemoveHandler Return Select +Selector Self Set Single @@ -186,6 +187,7 @@ WString ["keyword", "RemoveHandler"], ["keyword", "Return"], ["keyword", "Select"], + ["keyword", "Selector"], ["keyword", "Self"], ["keyword", "Set"], ["keyword", "Single"], From f84c49c5eae1aecbbb8bc9249c48136c341b556f Mon Sep 17 00:00:00 2001 From: Dmitry Surkov Date: Thu, 18 Mar 2021 16:54:08 +0300 Subject: [PATCH 0759/1100] Added support for Nevod (#2798) --- components.js | 2 +- components.json | 4 + components/prism-nevod.js | 125 ++++++++++++++++++++ components/prism-nevod.min.js | 1 + examples/prism-nevod.html | 59 +++++++++ tests/identifier-test.js | 6 + tests/languages/nevod/comment_feature.test | 20 ++++ tests/languages/nevod/keyword_feature.test | 15 +++ tests/languages/nevod/operator_feature.test | 25 ++++ tests/languages/nevod/string_feature.test | 27 +++++ 10 files changed, 283 insertions(+), 1 deletion(-) create mode 100644 components/prism-nevod.js create mode 100644 components/prism-nevod.min.js create mode 100644 examples/prism-nevod.html create mode 100644 tests/languages/nevod/comment_feature.test create mode 100644 tests/languages/nevod/keyword_feature.test create mode 100644 tests/languages/nevod/operator_feature.test create mode 100644 tests/languages/nevod/string_feature.test diff --git a/components.js b/components.js index e2896d3a60..abf1e97f08 100644 --- a/components.js +++ b/components.js @@ -1,2 +1,2 @@ -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml","ssml","atom","rss"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","ssml":"SSML","atom":"Atom","rss":"RSS"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","optional":"regex","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"ABNF","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"agda":{"title":"Agda","owner":"xy-ren"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apex":{"title":"Apex","require":["clike","sql"],"owner":"RunDevelopment"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"dkern"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"birb":{"title":"Birb","require":"clike","owner":"Calamity210"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"BNF","alias":"rbnf","aliasTitles":{"rbnf":"RBNF"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"bsl":{"title":"BSL (1C:Enterprise)","alias":"oscript","aliasTitles":{"oscript":"OneScript"},"owner":"Diversus23"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cfscript":{"title":"CFScript","require":"clike","alias":"cfc","owner":"mjclemente"},"chaiscript":{"title":"ChaiScript","require":["clike","cpp"],"owner":"RunDevelopment"},"cil":{"title":"CIL","owner":"sbrl"},"clojure":{"title":"Clojure","owner":"troglotit"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"cypher":{"title":"Cypher","owner":"RunDevelopment"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dataweave":{"title":"DataWeave","owner":"machaval"},"dax":{"title":"DAX","owner":"peterbud"},"dhall":{"title":"Dhall","owner":"RunDevelopment"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"dot":{"title":"DOT (Graphviz)","alias":"gv","optional":"markup","owner":"RunDevelopment"},"ebnf":{"title":"EBNF","owner":"RunDevelopment"},"editorconfig":{"title":"EditorConfig","owner":"osipxd"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"false":{"title":"False","owner":"edukisto"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"c","owner":"Golmote"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","optional":"markdown","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"hlsl":{"title":"HLSL","require":"c","owner":"RunDevelopment"},"http":{"title":"HTTP","optional":["css","javascript","json","markup","uri"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"icu-message-format":{"title":"ICU Message Format","owner":"RunDevelopment"},"idris":{"title":"Idris","alias":"idr","owner":"KeenS","require":"haskell"},"ignore":{"title":".ignore","owner":"osipxd","alias":["gitignore","hgignore","npmignore"],"aliasTitles":{"gitignore":".gitignore","hgignore":".hgignore","npmignore":".npmignore"}},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike","typescript"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","alias":"webmanifest","aliasTitles":{"webmanifest":"Web App Manifest"},"owner":"CupOfTea696"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"jsstacktrace":{"title":"JS stack trace","owner":"sbrl"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","alias":["kt","kts"],"aliasTitles":{"kts":"Kotlin Script"},"require":"clike","owner":"Golmote"},"kumir":{"title":"KuMir (КуМир)","alias":"kum","owner":"edukisto"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","optional":"yaml","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"mongodb":{"title":"MongoDB","owner":"airs0urce","require":"javascript"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"naniscript":{"title":"Naninovel Script","owner":"Elringus","alias":"nani"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nginx":{"title":"nginx","owner":"volado"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"psl":{"title":"PATROL Scripting Language","owner":"bertysentry"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":"markup-templating","owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"promql":{"title":"PromQL","owner":"arendjr"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"purebasic":{"title":"PureBasic","require":"clike","alias":"pbfasm","owner":"HeX0R101"},"purescript":{"title":"PureScript","require":"haskell","alias":"purs","owner":"sriharshachilakapati"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"racket":{"title":"Racket","require":"scheme","alias":"rkt","owner":"RunDevelopment"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","owner":"RunDevelopment"},"rego":{"title":"Rego","owner":"JordanSh"},"renpy":{"title":"Ren'py","alias":"rpy","owner":"HyuchiaDiego"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","alias":["sh-session","shellsession"],"owner":"RunDevelopment"},"smali":{"title":"Smali","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sml":{"title":"SML","alias":"smlnj","aliasTitles":{"smlnj":"SML/NJ"},"owner":"RunDevelopment"},"solidity":{"title":"Solidity (Ethereum)","alias":"sol","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"squirrel":{"title":"Squirrel","require":"clike","owner":"RunDevelopment"},"stan":{"title":"Stan","owner":"RunDevelopment"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","vbnet"],"owner":"RunDevelopment"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"typoscript":{"title":"TypoScript","alias":"tsconfig","aliasTitles":{"tsconfig":"TSConfig"},"owner":"dkern"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"uri":{"title":"URI","alias":"url","aliasTitles":{"url":"URL"},"owner":"RunDevelopment"},"v":{"title":"V","require":"clike","owner":"taggon"},"vala":{"title":"Vala","require":"clike","optional":"regex","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":["vb","vba"],"aliasTitles":{"vba":"VBA"},"owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xml-doc":{"title":"XML doc (.net)","require":"markup","modify":["csharp","fsharp","vbnet"],"owner":"RunDevelopment"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"yang":{"title":"YANG","owner":"RunDevelopment"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml","ssml","atom","rss"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","ssml":"SSML","atom":"Atom","rss":"RSS"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","optional":"regex","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"ABNF","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"agda":{"title":"Agda","owner":"xy-ren"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apex":{"title":"Apex","require":["clike","sql"],"owner":"RunDevelopment"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"dkern"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"birb":{"title":"Birb","require":"clike","owner":"Calamity210"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"BNF","alias":"rbnf","aliasTitles":{"rbnf":"RBNF"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"bsl":{"title":"BSL (1C:Enterprise)","alias":"oscript","aliasTitles":{"oscript":"OneScript"},"owner":"Diversus23"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cfscript":{"title":"CFScript","require":"clike","alias":"cfc","owner":"mjclemente"},"chaiscript":{"title":"ChaiScript","require":["clike","cpp"],"owner":"RunDevelopment"},"cil":{"title":"CIL","owner":"sbrl"},"clojure":{"title":"Clojure","owner":"troglotit"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"cypher":{"title":"Cypher","owner":"RunDevelopment"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dataweave":{"title":"DataWeave","owner":"machaval"},"dax":{"title":"DAX","owner":"peterbud"},"dhall":{"title":"Dhall","owner":"RunDevelopment"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"dot":{"title":"DOT (Graphviz)","alias":"gv","optional":"markup","owner":"RunDevelopment"},"ebnf":{"title":"EBNF","owner":"RunDevelopment"},"editorconfig":{"title":"EditorConfig","owner":"osipxd"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"false":{"title":"False","owner":"edukisto"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"c","owner":"Golmote"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","optional":"markdown","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"hlsl":{"title":"HLSL","require":"c","owner":"RunDevelopment"},"http":{"title":"HTTP","optional":["css","javascript","json","markup","uri"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"icu-message-format":{"title":"ICU Message Format","owner":"RunDevelopment"},"idris":{"title":"Idris","alias":"idr","owner":"KeenS","require":"haskell"},"ignore":{"title":".ignore","owner":"osipxd","alias":["gitignore","hgignore","npmignore"],"aliasTitles":{"gitignore":".gitignore","hgignore":".hgignore","npmignore":".npmignore"}},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike","typescript"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","alias":"webmanifest","aliasTitles":{"webmanifest":"Web App Manifest"},"owner":"CupOfTea696"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"jsstacktrace":{"title":"JS stack trace","owner":"sbrl"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","alias":["kt","kts"],"aliasTitles":{"kts":"Kotlin Script"},"require":"clike","owner":"Golmote"},"kumir":{"title":"KuMir (КуМир)","alias":"kum","owner":"edukisto"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","optional":"yaml","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"mongodb":{"title":"MongoDB","owner":"airs0urce","require":"javascript"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"naniscript":{"title":"Naninovel Script","owner":"Elringus","alias":"nani"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nevod":{"title":"Nevod","owner":"nezaboodka"},"nginx":{"title":"nginx","owner":"volado"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"psl":{"title":"PATROL Scripting Language","owner":"bertysentry"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":"markup-templating","owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"promql":{"title":"PromQL","owner":"arendjr"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"purebasic":{"title":"PureBasic","require":"clike","alias":"pbfasm","owner":"HeX0R101"},"purescript":{"title":"PureScript","require":"haskell","alias":"purs","owner":"sriharshachilakapati"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"racket":{"title":"Racket","require":"scheme","alias":"rkt","owner":"RunDevelopment"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","owner":"RunDevelopment"},"rego":{"title":"Rego","owner":"JordanSh"},"renpy":{"title":"Ren'py","alias":"rpy","owner":"HyuchiaDiego"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","alias":["sh-session","shellsession"],"owner":"RunDevelopment"},"smali":{"title":"Smali","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sml":{"title":"SML","alias":"smlnj","aliasTitles":{"smlnj":"SML/NJ"},"owner":"RunDevelopment"},"solidity":{"title":"Solidity (Ethereum)","alias":"sol","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"squirrel":{"title":"Squirrel","require":"clike","owner":"RunDevelopment"},"stan":{"title":"Stan","owner":"RunDevelopment"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","vbnet"],"owner":"RunDevelopment"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"typoscript":{"title":"TypoScript","alias":"tsconfig","aliasTitles":{"tsconfig":"TSConfig"},"owner":"dkern"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"uri":{"title":"URI","alias":"url","aliasTitles":{"url":"URL"},"owner":"RunDevelopment"},"v":{"title":"V","require":"clike","owner":"taggon"},"vala":{"title":"Vala","require":"clike","optional":"regex","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":["vb","vba"],"aliasTitles":{"vba":"VBA"},"owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xml-doc":{"title":"XML doc (.net)","require":"markup","modify":["csharp","fsharp","vbnet"],"owner":"RunDevelopment"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"yang":{"title":"YANG","owner":"RunDevelopment"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; if (typeof module !== 'undefined' && module.exports) { module.exports = components; } \ No newline at end of file diff --git a/components.json b/components.json index 70270401d9..bf655d3d3b 100644 --- a/components.json +++ b/components.json @@ -807,6 +807,10 @@ "title": "NEON", "owner": "nette" }, + "nevod": { + "title": "Nevod", + "owner": "nezaboodka" + }, "nginx": { "title": "nginx", "owner": "volado" diff --git a/components/prism-nevod.js b/components/prism-nevod.js new file mode 100644 index 0000000000..6a8d216f94 --- /dev/null +++ b/components/prism-nevod.js @@ -0,0 +1,125 @@ +Prism.languages.nevod = { + 'comment': /\/\/.*|(?:\/\*[\s\S]*?(?:\*\/|$))/, + 'string': { + pattern: /(?:"(?:""|[^"])*"(?!")|'(?:''|[^'])*'(?!'))!?\*?/, + greedy: true, + inside: { + 'string-attrs': /!$|!\*$|\*$/, + }, + }, + 'namespace': { + pattern: /(@namespace\s+)[a-zA-Z0-9\-.]+(?=\s*{)/, + lookbehind: true, + }, + 'pattern': { + pattern: /(@pattern\s+)?#?[a-zA-Z0-9\-.]+(?:\s*[(]\s*(?:~\s*)?[a-zA-Z0-9\-.]+\s*(?:,\s*(?:~\s*)?[a-zA-Z0-9\-.]*)*[)])?(?=\s*=)/, + lookbehind: true, + inside: { + 'pattern-name': { + pattern: /^#?[a-zA-Z0-9\-.]+/, + alias: 'class-name', + }, + 'fields': { + pattern: /\(.*\)/, + inside: { + 'field-name': { + pattern: /[a-zA-Z0-9\-.]+/, + alias: 'variable', + }, + 'punctuation': /[,()]/, + 'operator': { + pattern: /~/, + alias: 'field-hidden-mark', + }, + }, + }, + }, + }, + 'search': { + pattern: /(@search\s+|#)[a-zA-Z0-9\-.]+(?:\.\*)?(?=\s*;)/, + alias: 'function', + lookbehind: true, + }, + 'keyword': /@(?:require|namespace|pattern|search|inside|outside|having|where)\b/, + 'standard-pattern': { + pattern: /\b(?:Word|Punct|Symbol|Space|LineBreak|Start|End|Alpha|AlphaNum|Num|NumAlpha|Blank|WordBreak|Any)(?:\([a-zA-Z0-9\-.,\s+]*\))?/, + inside: { + 'standard-pattern-name': { + pattern: /^[a-zA-Z0-9\-.]+/, + alias: 'builtin', + }, + 'quantifier': { + pattern: /\b\d+(?:\s*\+|\s*-\s*\d+)?(?!\w)/, + alias: 'number', + }, + 'standard-pattern-attr': { + pattern: /[a-zA-Z0-9\-.]+/, + alias: 'builtin', + }, + 'punctuation': /[,()]/, + }, + }, + 'quantifier': { + pattern: /\b\d+(?:\s*\+|\s*-\s*\d+)?(?!\w)/, + alias: 'number', + }, + 'operator': [ + { + pattern: /=/, + alias: 'pattern-def', + }, + { + pattern: /&/, + alias: 'conjunction', + }, + { + pattern: /~/, + alias: 'exception', + }, + { + pattern: /\?/, + alias: 'optionality', + }, + { + pattern: /[[\]]/, + alias: 'repetition', + }, + { + pattern: /[{}]/, + alias: 'variation', + }, + { + pattern: /[+_]/, + alias: 'sequence', + }, + { + pattern: /\.{2,3}/, + alias: 'span', + }, + ], + 'field-capture': [ + { + pattern: /([a-zA-Z0-9\-.]+\s*\()\s*[a-zA-Z0-9\-.]+\s*:\s*[a-zA-Z0-9\-.]+(?:\s*,\s*[a-zA-Z0-9\-.]+\s*:\s*[a-zA-Z0-9\-.]+)*(?=\s*\))/, + lookbehind: true, + inside: { + 'field-name': { + pattern: /[a-zA-Z0-9\-.]+/, + alias: 'variable', + }, + 'colon': /:/, + }, + }, + { + pattern: /[a-zA-Z0-9\-.]+\s*:/, + inside: { + 'field-name': { + pattern: /[a-zA-Z0-9\-.]+/, + alias: 'variable', + }, + 'colon': /:/, + }, + }, + ], + 'punctuation': /[:;,()]/, + 'name': /[a-zA-Z0-9\-.]+/ +} diff --git a/components/prism-nevod.min.js b/components/prism-nevod.min.js new file mode 100644 index 0000000000..ed3181d82e --- /dev/null +++ b/components/prism-nevod.min.js @@ -0,0 +1 @@ +Prism.languages.nevod={comment:/\/\/.*|(?:\/\*[\s\S]*?(?:\*\/|$))/,string:{pattern:/(?:"(?:""|[^"])*"(?!")|'(?:''|[^'])*'(?!'))!?\*?/,greedy:!0,inside:{"string-attrs":/!$|!\*$|\*$/}},namespace:{pattern:/(@namespace\s+)[a-zA-Z0-9\-.]+(?=\s*{)/,lookbehind:!0},pattern:{pattern:/(@pattern\s+)?#?[a-zA-Z0-9\-.]+(?:\s*[(]\s*(?:~\s*)?[a-zA-Z0-9\-.]+\s*(?:,\s*(?:~\s*)?[a-zA-Z0-9\-.]*)*[)])?(?=\s*=)/,lookbehind:!0,inside:{"pattern-name":{pattern:/^#?[a-zA-Z0-9\-.]+/,alias:"class-name"},fields:{pattern:/\(.*\)/,inside:{"field-name":{pattern:/[a-zA-Z0-9\-.]+/,alias:"variable"},punctuation:/[,()]/,operator:{pattern:/~/,alias:"field-hidden-mark"}}}}},search:{pattern:/(@search\s+|#)[a-zA-Z0-9\-.]+(?:\.\*)?(?=\s*;)/,alias:"function",lookbehind:!0},keyword:/@(?:require|namespace|pattern|search|inside|outside|having|where)\b/,"standard-pattern":{pattern:/\b(?:Word|Punct|Symbol|Space|LineBreak|Start|End|Alpha|AlphaNum|Num|NumAlpha|Blank|WordBreak|Any)(?:\([a-zA-Z0-9\-.,\s+]*\))?/,inside:{"standard-pattern-name":{pattern:/^[a-zA-Z0-9\-.]+/,alias:"builtin"},quantifier:{pattern:/\b\d+(?:\s*\+|\s*-\s*\d+)?(?!\w)/,alias:"number"},"standard-pattern-attr":{pattern:/[a-zA-Z0-9\-.]+/,alias:"builtin"},punctuation:/[,()]/}},quantifier:{pattern:/\b\d+(?:\s*\+|\s*-\s*\d+)?(?!\w)/,alias:"number"},operator:[{pattern:/=/,alias:"pattern-def"},{pattern:/&/,alias:"conjunction"},{pattern:/~/,alias:"exception"},{pattern:/\?/,alias:"optionality"},{pattern:/[[\]]/,alias:"repetition"},{pattern:/[{}]/,alias:"variation"},{pattern:/[+_]/,alias:"sequence"},{pattern:/\.{2,3}/,alias:"span"}],"field-capture":[{pattern:/([a-zA-Z0-9\-.]+\s*\()\s*[a-zA-Z0-9\-.]+\s*:\s*[a-zA-Z0-9\-.]+(?:\s*,\s*[a-zA-Z0-9\-.]+\s*:\s*[a-zA-Z0-9\-.]+)*(?=\s*\))/,lookbehind:!0,inside:{"field-name":{pattern:/[a-zA-Z0-9\-.]+/,alias:"variable"},colon:/:/}},{pattern:/[a-zA-Z0-9\-.]+\s*:/,inside:{"field-name":{pattern:/[a-zA-Z0-9\-.]+/,alias:"variable"},colon:/:/}}],punctuation:/[:;,()]/,name:/[a-zA-Z0-9\-.]+/}; \ No newline at end of file diff --git a/examples/prism-nevod.html b/examples/prism-nevod.html new file mode 100644 index 0000000000..a9d4cf1a5f --- /dev/null +++ b/examples/prism-nevod.html @@ -0,0 +1,59 @@ +

        Comment

        +
        /* This is
        +multi-line
        +comment */
        +// This is single-line comment
        + +

        String

        +
        "text in double quotes"
        +'text in single quotes'
        +'case-sensitive text'!
        +'text ''Nevod'' in quotes'
        +"text ""Nevod"" in double quotes"
        +'text prefix'*
        +'case-sensitive text prefix'!*
        + +

        Keyword

        +
        @inside
        +@outside
        +@having
        +@search
        +@where
        + +

        Package Import

        +
        @require "Common/DateTime.np"
        +@require "Common/Url.np"
        + +

        Namespace

        +
        @namespace My { }
        +@namespace My.Domain { }
        + +

        Pattern

        +
        @pattern #Percentage = Num + ?Space + {'%', 'pct.', 'pct', 'percent'};
        +@pattern #GUID = Word(8) + [3 '-' + Word(4)] + '-' + Word(12);
        +@pattern #HashTag = '#' + {AlphaNum, Alpha, '_'} + [0+ {Word, '_'}];
        + +

        Full Example

        +
        @namespace Common
        +{
        +  @search @pattern Url(Domain, Path, Query, Anchor) =
        +    Method + Domain:Url.Domain + ?Port + ?Path:Url.Path +
        +    ?Query:Url.Query + ?Anchor:Url.Anchor
        +  @where
        +  {
        +    Method = {'http', 'https' , 'ftp', 'mailto', 'file', 'data', 'irc'} + '://';
        +    Domain = Word + [1+ '.' + Word + [0+ {Word, '_', '-'}]];
        +    Port = ':' + Num;
        +    Path = ?'/' + [0+ {Word, '/', '_', '+', '-', '%', '.'}];
        +    Query = '?' + ?(Param + [0+ '&' + Param])
        +    @where
        +    {
        +      Param = Identifier + '=' + Identifier
        +      @where
        +      {
        +        Identifier = {Alpha, AlphaNum, '_'} + [0+ {Word, '_'}];
        +      };
        +    };
        +    Anchor(Value) = '#' + Value:{Word};
        +  };
        +}
        \ No newline at end of file diff --git a/tests/identifier-test.js b/tests/identifier-test.js index 8f288780b1..680f0aac70 100644 --- a/tests/identifier-test.js +++ b/tests/identifier-test.js @@ -46,6 +46,12 @@ const testOptions = { number: false, template: false, }, + + // Nevod uses underscore symbol as operator and allows hyphen to be part of identifier + 'nevod': { + word: false, + template: false, + }, }; /** @type {Record} */ diff --git a/tests/languages/nevod/comment_feature.test b/tests/languages/nevod/comment_feature.test new file mode 100644 index 0000000000..95e8ccf8bd --- /dev/null +++ b/tests/languages/nevod/comment_feature.test @@ -0,0 +1,20 @@ +/* Comment */ +/* Multi-line +comment */ +/**/ +// +// Single-line comment + +---------------------------------------------------- + +[ + ["comment", "/* Comment */"], + ["comment", "/* Multi-line\r\ncomment */"], + ["comment", "/**/"], + ["comment", "//"], + ["comment", "// Single-line comment"] +] + +---------------------------------------------------- + +Checks for comments. \ No newline at end of file diff --git a/tests/languages/nevod/keyword_feature.test b/tests/languages/nevod/keyword_feature.test new file mode 100644 index 0000000000..0c241d95e2 --- /dev/null +++ b/tests/languages/nevod/keyword_feature.test @@ -0,0 +1,15 @@ +@require @namespace @pattern @search +@inside @outside @having +@where + +---------------------------------------------------- + +[ + ["keyword", "@require"], ["keyword", "@namespace"], ["keyword", "@pattern"], ["keyword", "@search"], + ["keyword", "@inside"], ["keyword", "@outside"], ["keyword", "@having"], + ["keyword", "@where"] +] + +---------------------------------------------------- + +Checks for all keywords. \ No newline at end of file diff --git a/tests/languages/nevod/operator_feature.test b/tests/languages/nevod/operator_feature.test new file mode 100644 index 0000000000..62fb61b1ae --- /dev/null +++ b/tests/languages/nevod/operator_feature.test @@ -0,0 +1,25 @@ +( , ) ; ++ _ +.. ... +[ 0-5 ] +& +~ +? +{} + +---------------------------------------------------- + +[ + ["punctuation", "("], ["punctuation", ","], ["punctuation", ")"], ["punctuation", ";"], + ["operator", "+"], ["operator", "_"], + ["operator", ".."], ["operator", "..."], + ["operator", "["], ["quantifier", "0-5"], ["operator", "]"], + ["operator", "&"], + ["operator", "~"], + ["operator", "?"], + ["operator", "{"], ["operator", "}"] +] + +---------------------------------------------------- + +Checks for operators. \ No newline at end of file diff --git a/tests/languages/nevod/string_feature.test b/tests/languages/nevod/string_feature.test new file mode 100644 index 0000000000..568f7db33b --- /dev/null +++ b/tests/languages/nevod/string_feature.test @@ -0,0 +1,27 @@ +"text in double quotes" +"" +'text in single quotes' +'case-sensitive text'! +'text ''Nevod'' in quotes' +"text ""Nevod"" in double quotes" +'text prefix'* +'case-sensitive text prefix'!* +'' + +---------------------------------------------------- + +[ + ["string", ["\"text in double quotes\""]], + ["string", ["\"\""]], + ["string", ["'text in single quotes'"]], + ["string", ["'case-sensitive text'", ["string-attrs", "!"]]], + ["string", ["'text ''Nevod'' in quotes'"]], + ["string", ["\"text \"\"Nevod\"\" in double quotes\""]], + ["string", ["'text prefix'", ["string-attrs", "*"]]], + ["string", ["'case-sensitive text prefix'", ["string-attrs", "!*"]]], + ["string", ["''"]] +] + +---------------------------------------------------- + +Checks for various text strings. \ No newline at end of file From f9b69528f965ea8a2fdd50dac7c28d221c71a2ec Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Sun, 21 Mar 2021 16:41:33 +0100 Subject: [PATCH 0760/1100] Added support for CSV (#2794) --- components.js | 2 +- components.json | 4 + components/prism-csv.js | 6 ++ components/prism-csv.min.js | 1 + examples/prism-csv.html | 7 ++ plugins/show-language/prism-show-language.js | 1 + .../show-language/prism-show-language.min.js | 2 +- tests/languages/csv/value.test | 99 +++++++++++++++++++ 8 files changed, 120 insertions(+), 2 deletions(-) create mode 100644 components/prism-csv.js create mode 100644 components/prism-csv.min.js create mode 100644 examples/prism-csv.html create mode 100644 tests/languages/csv/value.test diff --git a/components.js b/components.js index abf1e97f08..bc679acb29 100644 --- a/components.js +++ b/components.js @@ -1,2 +1,2 @@ -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml","ssml","atom","rss"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","ssml":"SSML","atom":"Atom","rss":"RSS"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","optional":"regex","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"ABNF","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"agda":{"title":"Agda","owner":"xy-ren"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apex":{"title":"Apex","require":["clike","sql"],"owner":"RunDevelopment"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"dkern"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"birb":{"title":"Birb","require":"clike","owner":"Calamity210"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"BNF","alias":"rbnf","aliasTitles":{"rbnf":"RBNF"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"bsl":{"title":"BSL (1C:Enterprise)","alias":"oscript","aliasTitles":{"oscript":"OneScript"},"owner":"Diversus23"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cfscript":{"title":"CFScript","require":"clike","alias":"cfc","owner":"mjclemente"},"chaiscript":{"title":"ChaiScript","require":["clike","cpp"],"owner":"RunDevelopment"},"cil":{"title":"CIL","owner":"sbrl"},"clojure":{"title":"Clojure","owner":"troglotit"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"cypher":{"title":"Cypher","owner":"RunDevelopment"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dataweave":{"title":"DataWeave","owner":"machaval"},"dax":{"title":"DAX","owner":"peterbud"},"dhall":{"title":"Dhall","owner":"RunDevelopment"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"dot":{"title":"DOT (Graphviz)","alias":"gv","optional":"markup","owner":"RunDevelopment"},"ebnf":{"title":"EBNF","owner":"RunDevelopment"},"editorconfig":{"title":"EditorConfig","owner":"osipxd"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"false":{"title":"False","owner":"edukisto"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"c","owner":"Golmote"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","optional":"markdown","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"hlsl":{"title":"HLSL","require":"c","owner":"RunDevelopment"},"http":{"title":"HTTP","optional":["css","javascript","json","markup","uri"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"icu-message-format":{"title":"ICU Message Format","owner":"RunDevelopment"},"idris":{"title":"Idris","alias":"idr","owner":"KeenS","require":"haskell"},"ignore":{"title":".ignore","owner":"osipxd","alias":["gitignore","hgignore","npmignore"],"aliasTitles":{"gitignore":".gitignore","hgignore":".hgignore","npmignore":".npmignore"}},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike","typescript"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","alias":"webmanifest","aliasTitles":{"webmanifest":"Web App Manifest"},"owner":"CupOfTea696"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"jsstacktrace":{"title":"JS stack trace","owner":"sbrl"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","alias":["kt","kts"],"aliasTitles":{"kts":"Kotlin Script"},"require":"clike","owner":"Golmote"},"kumir":{"title":"KuMir (КуМир)","alias":"kum","owner":"edukisto"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","optional":"yaml","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"mongodb":{"title":"MongoDB","owner":"airs0urce","require":"javascript"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"naniscript":{"title":"Naninovel Script","owner":"Elringus","alias":"nani"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nevod":{"title":"Nevod","owner":"nezaboodka"},"nginx":{"title":"nginx","owner":"volado"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"psl":{"title":"PATROL Scripting Language","owner":"bertysentry"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":"markup-templating","owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"promql":{"title":"PromQL","owner":"arendjr"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"purebasic":{"title":"PureBasic","require":"clike","alias":"pbfasm","owner":"HeX0R101"},"purescript":{"title":"PureScript","require":"haskell","alias":"purs","owner":"sriharshachilakapati"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"racket":{"title":"Racket","require":"scheme","alias":"rkt","owner":"RunDevelopment"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","owner":"RunDevelopment"},"rego":{"title":"Rego","owner":"JordanSh"},"renpy":{"title":"Ren'py","alias":"rpy","owner":"HyuchiaDiego"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","alias":["sh-session","shellsession"],"owner":"RunDevelopment"},"smali":{"title":"Smali","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sml":{"title":"SML","alias":"smlnj","aliasTitles":{"smlnj":"SML/NJ"},"owner":"RunDevelopment"},"solidity":{"title":"Solidity (Ethereum)","alias":"sol","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"squirrel":{"title":"Squirrel","require":"clike","owner":"RunDevelopment"},"stan":{"title":"Stan","owner":"RunDevelopment"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","vbnet"],"owner":"RunDevelopment"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"typoscript":{"title":"TypoScript","alias":"tsconfig","aliasTitles":{"tsconfig":"TSConfig"},"owner":"dkern"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"uri":{"title":"URI","alias":"url","aliasTitles":{"url":"URL"},"owner":"RunDevelopment"},"v":{"title":"V","require":"clike","owner":"taggon"},"vala":{"title":"Vala","require":"clike","optional":"regex","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":["vb","vba"],"aliasTitles":{"vba":"VBA"},"owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xml-doc":{"title":"XML doc (.net)","require":"markup","modify":["csharp","fsharp","vbnet"],"owner":"RunDevelopment"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"yang":{"title":"YANG","owner":"RunDevelopment"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml","ssml","atom","rss"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","ssml":"SSML","atom":"Atom","rss":"RSS"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","optional":"regex","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"ABNF","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"agda":{"title":"Agda","owner":"xy-ren"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apex":{"title":"Apex","require":["clike","sql"],"owner":"RunDevelopment"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"dkern"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"birb":{"title":"Birb","require":"clike","owner":"Calamity210"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"BNF","alias":"rbnf","aliasTitles":{"rbnf":"RBNF"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"bsl":{"title":"BSL (1C:Enterprise)","alias":"oscript","aliasTitles":{"oscript":"OneScript"},"owner":"Diversus23"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cfscript":{"title":"CFScript","require":"clike","alias":"cfc","owner":"mjclemente"},"chaiscript":{"title":"ChaiScript","require":["clike","cpp"],"owner":"RunDevelopment"},"cil":{"title":"CIL","owner":"sbrl"},"clojure":{"title":"Clojure","owner":"troglotit"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"csv":{"title":"CSV","owner":"RunDevelopment"},"cypher":{"title":"Cypher","owner":"RunDevelopment"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dataweave":{"title":"DataWeave","owner":"machaval"},"dax":{"title":"DAX","owner":"peterbud"},"dhall":{"title":"Dhall","owner":"RunDevelopment"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"dot":{"title":"DOT (Graphviz)","alias":"gv","optional":"markup","owner":"RunDevelopment"},"ebnf":{"title":"EBNF","owner":"RunDevelopment"},"editorconfig":{"title":"EditorConfig","owner":"osipxd"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"false":{"title":"False","owner":"edukisto"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"c","owner":"Golmote"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","optional":"markdown","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"hlsl":{"title":"HLSL","require":"c","owner":"RunDevelopment"},"http":{"title":"HTTP","optional":["css","javascript","json","markup","uri"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"icu-message-format":{"title":"ICU Message Format","owner":"RunDevelopment"},"idris":{"title":"Idris","alias":"idr","owner":"KeenS","require":"haskell"},"ignore":{"title":".ignore","owner":"osipxd","alias":["gitignore","hgignore","npmignore"],"aliasTitles":{"gitignore":".gitignore","hgignore":".hgignore","npmignore":".npmignore"}},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike","typescript"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","alias":"webmanifest","aliasTitles":{"webmanifest":"Web App Manifest"},"owner":"CupOfTea696"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"jsstacktrace":{"title":"JS stack trace","owner":"sbrl"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","alias":["kt","kts"],"aliasTitles":{"kts":"Kotlin Script"},"require":"clike","owner":"Golmote"},"kumir":{"title":"KuMir (КуМир)","alias":"kum","owner":"edukisto"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","optional":"yaml","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"mongodb":{"title":"MongoDB","owner":"airs0urce","require":"javascript"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"naniscript":{"title":"Naninovel Script","owner":"Elringus","alias":"nani"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nevod":{"title":"Nevod","owner":"nezaboodka"},"nginx":{"title":"nginx","owner":"volado"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"psl":{"title":"PATROL Scripting Language","owner":"bertysentry"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":"markup-templating","owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"promql":{"title":"PromQL","owner":"arendjr"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"purebasic":{"title":"PureBasic","require":"clike","alias":"pbfasm","owner":"HeX0R101"},"purescript":{"title":"PureScript","require":"haskell","alias":"purs","owner":"sriharshachilakapati"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"racket":{"title":"Racket","require":"scheme","alias":"rkt","owner":"RunDevelopment"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","owner":"RunDevelopment"},"rego":{"title":"Rego","owner":"JordanSh"},"renpy":{"title":"Ren'py","alias":"rpy","owner":"HyuchiaDiego"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","alias":["sh-session","shellsession"],"owner":"RunDevelopment"},"smali":{"title":"Smali","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sml":{"title":"SML","alias":"smlnj","aliasTitles":{"smlnj":"SML/NJ"},"owner":"RunDevelopment"},"solidity":{"title":"Solidity (Ethereum)","alias":"sol","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"squirrel":{"title":"Squirrel","require":"clike","owner":"RunDevelopment"},"stan":{"title":"Stan","owner":"RunDevelopment"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","vbnet"],"owner":"RunDevelopment"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"typoscript":{"title":"TypoScript","alias":"tsconfig","aliasTitles":{"tsconfig":"TSConfig"},"owner":"dkern"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"uri":{"title":"URI","alias":"url","aliasTitles":{"url":"URL"},"owner":"RunDevelopment"},"v":{"title":"V","require":"clike","owner":"taggon"},"vala":{"title":"Vala","require":"clike","optional":"regex","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":["vb","vba"],"aliasTitles":{"vba":"VBA"},"owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xml-doc":{"title":"XML doc (.net)","require":"markup","modify":["csharp","fsharp","vbnet"],"owner":"RunDevelopment"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"yang":{"title":"YANG","owner":"RunDevelopment"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; if (typeof module !== 'undefined' && module.exports) { module.exports = components; } \ No newline at end of file diff --git a/components.json b/components.json index bf655d3d3b..c1dd63b97c 100644 --- a/components.json +++ b/components.json @@ -287,6 +287,10 @@ "modify": "css", "owner": "milesj" }, + "csv": { + "title": "CSV", + "owner": "RunDevelopment" + }, "cypher": { "title": "Cypher", "owner": "RunDevelopment" diff --git a/components/prism-csv.js b/components/prism-csv.js new file mode 100644 index 0000000000..1251683c24 --- /dev/null +++ b/components/prism-csv.js @@ -0,0 +1,6 @@ +// https://tools.ietf.org/html/rfc4180 + +Prism.languages.csv = { + 'value': /[^\r\n,"]+|"(?:[^"]|"")*"(?!")/, + 'punctuation': /,/ +}; diff --git a/components/prism-csv.min.js b/components/prism-csv.min.js new file mode 100644 index 0000000000..259e1da569 --- /dev/null +++ b/components/prism-csv.min.js @@ -0,0 +1 @@ +Prism.languages.csv={value:/[^\r\n,"]+|"(?:[^"]|"")*"(?!")/,punctuation:/,/}; \ No newline at end of file diff --git a/examples/prism-csv.html b/examples/prism-csv.html new file mode 100644 index 0000000000..cbba8d9dcc --- /dev/null +++ b/examples/prism-csv.html @@ -0,0 +1,7 @@ +

        Full example

        +
        Year,Make,Model,Description,Price
        +1997,Ford,E350,"ac, abs, moon",3000.00
        +1999,Chevy,"Venture ""Extended Edition""","",4900.00
        +1999,Chevy,"Venture ""Extended Edition, Very Large""",,5000.00
        +1996,Jeep,Grand Cherokee,"MUST SELL!
        +air, moon roof, loaded",4799.00
        diff --git a/plugins/show-language/prism-show-language.js b/plugins/show-language/prism-show-language.js index 18b39810fa..a4253b9d6a 100644 --- a/plugins/show-language/prism-show-language.js +++ b/plugins/show-language/prism-show-language.js @@ -59,6 +59,7 @@ "conc": "Concurnas", "csp": "Content-Security-Policy", "css-extras": "CSS Extras", + "csv": "CSV", "dataweave": "DataWeave", "dax": "DAX", "django": "Django/Jinja2", diff --git a/plugins/show-language/prism-show-language.min.js b/plugins/show-language/prism-show-language.min.js index 22db936717..b1f135bc30 100644 --- a/plugins/show-language/prism-show-language.min.js +++ b/plugins/show-language/prism-show-language.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof self&&self.Prism&&self.document)if(Prism.plugins.toolbar){var i={none:"Plain text",plain:"Plain text",plaintext:"Plain text",text:"Plain text",txt:"Plain text",html:"HTML",xml:"XML",svg:"SVG",mathml:"MathML",ssml:"SSML",rss:"RSS",css:"CSS",clike:"C-like",js:"JavaScript",abap:"ABAP",abnf:"ABNF",al:"AL",antlr4:"ANTLR4",g4:"ANTLR4",apacheconf:"Apache Configuration",apl:"APL",aql:"AQL",arff:"ARFF",asciidoc:"AsciiDoc",adoc:"AsciiDoc",aspnet:"ASP.NET (C#)",asm6502:"6502 Assembly",autohotkey:"AutoHotkey",autoit:"AutoIt",basic:"BASIC",bbcode:"BBcode",bnf:"BNF",rbnf:"RBNF",bsl:"BSL (1C:Enterprise)",oscript:"OneScript",csharp:"C#",cs:"C#",dotnet:"C#",cpp:"C++",cfscript:"CFScript",cfc:"CFScript",cil:"CIL",cmake:"CMake",coffee:"CoffeeScript",conc:"Concurnas",csp:"Content-Security-Policy","css-extras":"CSS Extras",dataweave:"DataWeave",dax:"DAX",django:"Django/Jinja2",jinja2:"Django/Jinja2","dns-zone-file":"DNS zone file","dns-zone":"DNS zone file",dockerfile:"Docker",dot:"DOT (Graphviz)",gv:"DOT (Graphviz)",ebnf:"EBNF",editorconfig:"EditorConfig",ejs:"EJS",etlua:"Embedded Lua templating",erb:"ERB","excel-formula":"Excel Formula",xlsx:"Excel Formula",xls:"Excel Formula",fsharp:"F#","firestore-security-rules":"Firestore security rules",ftl:"FreeMarker Template Language",gml:"GameMaker Language",gamemakerlanguage:"GameMaker Language",gcode:"G-code",gdscript:"GDScript",gedcom:"GEDCOM",glsl:"GLSL",graphql:"GraphQL",hs:"Haskell",hcl:"HCL",hlsl:"HLSL",http:"HTTP",hpkp:"HTTP Public-Key-Pins",hsts:"HTTP Strict-Transport-Security",ichigojam:"IchigoJam","icu-message-format":"ICU Message Format",idr:"Idris",ignore:".ignore",gitignore:".gitignore",hgignore:".hgignore",npmignore:".npmignore",inform7:"Inform 7",javadoc:"JavaDoc",javadoclike:"JavaDoc-like",javastacktrace:"Java stack trace",jq:"JQ",jsdoc:"JSDoc","js-extras":"JS Extras",json:"JSON",webmanifest:"Web App Manifest",json5:"JSON5",jsonp:"JSONP",jsstacktrace:"JS stack trace","js-templates":"JS Templates",kts:"Kotlin Script",kt:"Kotlin",kumir:"KuMir (КуМир)",kum:"KuMir (КуМир)",latex:"LaTeX",tex:"TeX",context:"ConTeXt",lilypond:"LilyPond",ly:"LilyPond",emacs:"Lisp",elisp:"Lisp","emacs-lisp":"Lisp",llvm:"LLVM IR",lolcode:"LOLCODE",md:"Markdown","markup-templating":"Markup templating",matlab:"MATLAB",mel:"MEL",mongodb:"MongoDB",moon:"MoonScript",n1ql:"N1QL",n4js:"N4JS",n4jsd:"N4JS","nand2tetris-hdl":"Nand To Tetris HDL",naniscript:"Naninovel Script",nani:"Naninovel Script",nasm:"NASM",neon:"NEON",nginx:"nginx",nsis:"NSIS",objectivec:"Objective-C",objc:"Objective-C",ocaml:"OCaml",opencl:"OpenCL",parigp:"PARI/GP",objectpascal:"Object Pascal",psl:"PATROL Scripting Language",pcaxis:"PC-Axis",px:"PC-Axis",peoplecode:"PeopleCode",pcode:"PeopleCode",php:"PHP",phpdoc:"PHPDoc","php-extras":"PHP Extras",plsql:"PL/SQL",powerquery:"PowerQuery",pq:"PowerQuery",mscript:"PowerQuery",powershell:"PowerShell",promql:"PromQL",properties:".properties",protobuf:"Protocol Buffers",purebasic:"PureBasic",pbfasm:"PureBasic",purs:"PureScript",py:"Python",q:"Q (kdb+ database)",qml:"QML",rkt:"Racket",jsx:"React JSX",tsx:"React TSX",renpy:"Ren'py",rpy:"Ren'py",rest:"reST (reStructuredText)",robotframework:"Robot Framework",robot:"Robot Framework",rb:"Ruby",sas:"SAS",sass:"Sass (Sass)",scss:"Sass (Scss)","shell-session":"Shell session","sh-session":"Shell session",shellsession:"Shell session",sml:"SML",smlnj:"SML/NJ",solidity:"Solidity (Ethereum)",sol:"Solidity (Ethereum)","solution-file":"Solution file",sln:"Solution file",soy:"Soy (Closure Template)",sparql:"SPARQL",rq:"SPARQL","splunk-spl":"Splunk SPL",sqf:"SQF: Status Quo Function (Arma 3)",sql:"SQL",iecst:"Structured Text (IEC 61131-3)","t4-templating":"T4 templating","t4-cs":"T4 Text Templates (C#)",t4:"T4 Text Templates (C#)","t4-vb":"T4 Text Templates (VB)",tap:"TAP",tt2:"Template Toolkit 2",toml:"TOML",trig:"TriG",ts:"TypeScript",tsconfig:"TSConfig",uscript:"UnrealScript",uc:"UnrealScript",uri:"URI",url:"URL",vbnet:"VB.Net",vhdl:"VHDL",vim:"vim","visual-basic":"Visual Basic",vba:"VBA",vb:"Visual Basic",wasm:"WebAssembly",wiki:"Wiki markup",xeoracube:"XeoraCube","xml-doc":"XML doc (.net)",xojo:"Xojo (REALbasic)",xquery:"XQuery",yaml:"YAML",yml:"YAML",yang:"YANG"};Prism.plugins.toolbar.registerButton("show-language",function(e){var t=e.element.parentNode;if(t&&/pre/i.test(t.nodeName)){var a,s=t.getAttribute("data-language")||i[e.language]||((a=e.language)?(a.substring(0,1).toUpperCase()+a.substring(1)).replace(/s(?=cript)/,"S"):a);if(s){var o=document.createElement("span");return o.textContent=s,o}}})}else console.warn("Show Languages plugin loaded before Toolbar plugin.")}(); \ No newline at end of file +!function(){if("undefined"!=typeof self&&self.Prism&&self.document)if(Prism.plugins.toolbar){var i={none:"Plain text",plain:"Plain text",plaintext:"Plain text",text:"Plain text",txt:"Plain text",html:"HTML",xml:"XML",svg:"SVG",mathml:"MathML",ssml:"SSML",rss:"RSS",css:"CSS",clike:"C-like",js:"JavaScript",abap:"ABAP",abnf:"ABNF",al:"AL",antlr4:"ANTLR4",g4:"ANTLR4",apacheconf:"Apache Configuration",apl:"APL",aql:"AQL",arff:"ARFF",asciidoc:"AsciiDoc",adoc:"AsciiDoc",aspnet:"ASP.NET (C#)",asm6502:"6502 Assembly",autohotkey:"AutoHotkey",autoit:"AutoIt",basic:"BASIC",bbcode:"BBcode",bnf:"BNF",rbnf:"RBNF",bsl:"BSL (1C:Enterprise)",oscript:"OneScript",csharp:"C#",cs:"C#",dotnet:"C#",cpp:"C++",cfscript:"CFScript",cfc:"CFScript",cil:"CIL",cmake:"CMake",coffee:"CoffeeScript",conc:"Concurnas",csp:"Content-Security-Policy","css-extras":"CSS Extras",csv:"CSV",dataweave:"DataWeave",dax:"DAX",django:"Django/Jinja2",jinja2:"Django/Jinja2","dns-zone-file":"DNS zone file","dns-zone":"DNS zone file",dockerfile:"Docker",dot:"DOT (Graphviz)",gv:"DOT (Graphviz)",ebnf:"EBNF",editorconfig:"EditorConfig",ejs:"EJS",etlua:"Embedded Lua templating",erb:"ERB","excel-formula":"Excel Formula",xlsx:"Excel Formula",xls:"Excel Formula",fsharp:"F#","firestore-security-rules":"Firestore security rules",ftl:"FreeMarker Template Language",gml:"GameMaker Language",gamemakerlanguage:"GameMaker Language",gcode:"G-code",gdscript:"GDScript",gedcom:"GEDCOM",glsl:"GLSL",graphql:"GraphQL",hs:"Haskell",hcl:"HCL",hlsl:"HLSL",http:"HTTP",hpkp:"HTTP Public-Key-Pins",hsts:"HTTP Strict-Transport-Security",ichigojam:"IchigoJam","icu-message-format":"ICU Message Format",idr:"Idris",ignore:".ignore",gitignore:".gitignore",hgignore:".hgignore",npmignore:".npmignore",inform7:"Inform 7",javadoc:"JavaDoc",javadoclike:"JavaDoc-like",javastacktrace:"Java stack trace",jq:"JQ",jsdoc:"JSDoc","js-extras":"JS Extras",json:"JSON",webmanifest:"Web App Manifest",json5:"JSON5",jsonp:"JSONP",jsstacktrace:"JS stack trace","js-templates":"JS Templates",kts:"Kotlin Script",kt:"Kotlin",kumir:"KuMir (КуМир)",kum:"KuMir (КуМир)",latex:"LaTeX",tex:"TeX",context:"ConTeXt",lilypond:"LilyPond",ly:"LilyPond",emacs:"Lisp",elisp:"Lisp","emacs-lisp":"Lisp",llvm:"LLVM IR",lolcode:"LOLCODE",md:"Markdown","markup-templating":"Markup templating",matlab:"MATLAB",mel:"MEL",mongodb:"MongoDB",moon:"MoonScript",n1ql:"N1QL",n4js:"N4JS",n4jsd:"N4JS","nand2tetris-hdl":"Nand To Tetris HDL",naniscript:"Naninovel Script",nani:"Naninovel Script",nasm:"NASM",neon:"NEON",nginx:"nginx",nsis:"NSIS",objectivec:"Objective-C",objc:"Objective-C",ocaml:"OCaml",opencl:"OpenCL",parigp:"PARI/GP",objectpascal:"Object Pascal",psl:"PATROL Scripting Language",pcaxis:"PC-Axis",px:"PC-Axis",peoplecode:"PeopleCode",pcode:"PeopleCode",php:"PHP",phpdoc:"PHPDoc","php-extras":"PHP Extras",plsql:"PL/SQL",powerquery:"PowerQuery",pq:"PowerQuery",mscript:"PowerQuery",powershell:"PowerShell",promql:"PromQL",properties:".properties",protobuf:"Protocol Buffers",purebasic:"PureBasic",pbfasm:"PureBasic",purs:"PureScript",py:"Python",q:"Q (kdb+ database)",qml:"QML",rkt:"Racket",jsx:"React JSX",tsx:"React TSX",renpy:"Ren'py",rpy:"Ren'py",rest:"reST (reStructuredText)",robotframework:"Robot Framework",robot:"Robot Framework",rb:"Ruby",sas:"SAS",sass:"Sass (Sass)",scss:"Sass (Scss)","shell-session":"Shell session","sh-session":"Shell session",shellsession:"Shell session",sml:"SML",smlnj:"SML/NJ",solidity:"Solidity (Ethereum)",sol:"Solidity (Ethereum)","solution-file":"Solution file",sln:"Solution file",soy:"Soy (Closure Template)",sparql:"SPARQL",rq:"SPARQL","splunk-spl":"Splunk SPL",sqf:"SQF: Status Quo Function (Arma 3)",sql:"SQL",iecst:"Structured Text (IEC 61131-3)","t4-templating":"T4 templating","t4-cs":"T4 Text Templates (C#)",t4:"T4 Text Templates (C#)","t4-vb":"T4 Text Templates (VB)",tap:"TAP",tt2:"Template Toolkit 2",toml:"TOML",trig:"TriG",ts:"TypeScript",tsconfig:"TSConfig",uscript:"UnrealScript",uc:"UnrealScript",uri:"URI",url:"URL",vbnet:"VB.Net",vhdl:"VHDL",vim:"vim","visual-basic":"Visual Basic",vba:"VBA",vb:"Visual Basic",wasm:"WebAssembly",wiki:"Wiki markup",xeoracube:"XeoraCube","xml-doc":"XML doc (.net)",xojo:"Xojo (REALbasic)",xquery:"XQuery",yaml:"YAML",yml:"YAML",yang:"YANG"};Prism.plugins.toolbar.registerButton("show-language",function(e){var t=e.element.parentNode;if(t&&/pre/i.test(t.nodeName)){var a,s=t.getAttribute("data-language")||i[e.language]||((a=e.language)?(a.substring(0,1).toUpperCase()+a.substring(1)).replace(/s(?=cript)/,"S"):a);if(s){var o=document.createElement("span");return o.textContent=s,o}}})}else console.warn("Show Languages plugin loaded before Toolbar plugin.")}(); \ No newline at end of file diff --git a/tests/languages/csv/value.test b/tests/languages/csv/value.test new file mode 100644 index 0000000000..230d655ab2 --- /dev/null +++ b/tests/languages/csv/value.test @@ -0,0 +1,99 @@ +aaa,bbb,ccc +zzz,yyy,xxx + +"aaa","bbb","ccc" + +"aaa","b +bb","ccc" + +"aaa","b""bb","ccc" + +Year,Make,Model,Description,Price +1997,Ford,E350,"ac, abs, moon",3000.00 +1999,Chevy,"Venture ""Extended Edition""","",4900.00 +1999,Chevy,"Venture ""Extended Edition, Very Large""",,5000.00 +1996,Jeep,Grand Cherokee,"MUST SELL! +air, moon roof, loaded",4799.00 + +---------------------------------------------------- + +[ + ["value", "aaa"], + ["punctuation", ","], + ["value", "bbb"], + ["punctuation", ","], + ["value", "ccc"], + + ["value", "zzz"], + ["punctuation", ","], + ["value", "yyy"], + ["punctuation", ","], + ["value", "xxx"], + + ["value", "\"aaa\""], + ["punctuation", ","], + ["value", "\"bbb\""], + ["punctuation", ","], + ["value", "\"ccc\""], + + ["value", "\"aaa\""], + ["punctuation", ","], + ["value", "\"b\r\nbb\""], + ["punctuation", ","], + ["value", "\"ccc\""], + + ["value", "\"aaa\""], + ["punctuation", ","], + ["value", "\"b\"\"bb\""], + ["punctuation", ","], + ["value", "\"ccc\""], + + ["value", "Year"], + ["punctuation", ","], + ["value", "Make"], + ["punctuation", ","], + ["value", "Model"], + ["punctuation", ","], + ["value", "Description"], + ["punctuation", ","], + ["value", "Price"], + + ["value", "1997"], + ["punctuation", ","], + ["value", "Ford"], + ["punctuation", ","], + ["value", "E350"], + ["punctuation", ","], + ["value", "\"ac, abs, moon\""], + ["punctuation", ","], + ["value", "3000.00"], + + ["value", "1999"], + ["punctuation", ","], + ["value", "Chevy"], + ["punctuation", ","], + ["value", "\"Venture \"\"Extended Edition\"\"\""], + ["punctuation", ","], + ["value", "\"\""], + ["punctuation", ","], + ["value", "4900.00"], + + ["value", "1999"], + ["punctuation", ","], + ["value", "Chevy"], + ["punctuation", ","], + ["value", "\"Venture \"\"Extended Edition, Very Large\"\"\""], + ["punctuation", ","], + ["punctuation", ","], + ["value", "5000.00"], + + ["value", "1996"], + ["punctuation", ","], + ["value", "Jeep"], + ["punctuation", ","], + ["value", "Grand Cherokee"], + ["punctuation", ","], + ["value", "\"MUST SELL!\r\nair, moon roof, loaded\""], + ["punctuation", ","], + ["value", "4799.00"] +] \ No newline at end of file From 1a2347a3b6e075bdbde85328d525d4417a75e2f9 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Sun, 21 Mar 2021 16:44:25 +0100 Subject: [PATCH 0761/1100] Added support for OpenQasm (#2797) --- components.js | 2 +- components.json | 5 ++ components/prism-openqasm.js | 23 ++++++ components/prism-openqasm.min.js | 1 + examples/prism-openqasm.html | 43 ++++++++++ plugins/autoloader/prism-autoloader.js | 1 + plugins/autoloader/prism-autoloader.min.js | 2 +- plugins/show-language/prism-show-language.js | 2 + .../show-language/prism-show-language.min.js | 2 +- .../openqasm/class-name_feature.test | 29 +++++++ tests/languages/openqasm/comment_feature.test | 13 +++ .../languages/openqasm/constant_feature.test | 9 +++ tests/languages/openqasm/keyword_feature.test | 79 +++++++++++++++++++ tests/languages/openqasm/number_feature.test | 23 ++++++ .../languages/openqasm/operator_feature.test | 56 +++++++++++++ tests/languages/openqasm/string_feature.test | 9 +++ 16 files changed, 296 insertions(+), 3 deletions(-) create mode 100644 components/prism-openqasm.js create mode 100644 components/prism-openqasm.min.js create mode 100644 examples/prism-openqasm.html create mode 100644 tests/languages/openqasm/class-name_feature.test create mode 100644 tests/languages/openqasm/comment_feature.test create mode 100644 tests/languages/openqasm/constant_feature.test create mode 100644 tests/languages/openqasm/keyword_feature.test create mode 100644 tests/languages/openqasm/number_feature.test create mode 100644 tests/languages/openqasm/operator_feature.test create mode 100644 tests/languages/openqasm/string_feature.test diff --git a/components.js b/components.js index bc679acb29..6c3d55dd41 100644 --- a/components.js +++ b/components.js @@ -1,2 +1,2 @@ -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml","ssml","atom","rss"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","ssml":"SSML","atom":"Atom","rss":"RSS"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","optional":"regex","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"ABNF","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"agda":{"title":"Agda","owner":"xy-ren"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apex":{"title":"Apex","require":["clike","sql"],"owner":"RunDevelopment"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"dkern"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"birb":{"title":"Birb","require":"clike","owner":"Calamity210"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"BNF","alias":"rbnf","aliasTitles":{"rbnf":"RBNF"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"bsl":{"title":"BSL (1C:Enterprise)","alias":"oscript","aliasTitles":{"oscript":"OneScript"},"owner":"Diversus23"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cfscript":{"title":"CFScript","require":"clike","alias":"cfc","owner":"mjclemente"},"chaiscript":{"title":"ChaiScript","require":["clike","cpp"],"owner":"RunDevelopment"},"cil":{"title":"CIL","owner":"sbrl"},"clojure":{"title":"Clojure","owner":"troglotit"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"csv":{"title":"CSV","owner":"RunDevelopment"},"cypher":{"title":"Cypher","owner":"RunDevelopment"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dataweave":{"title":"DataWeave","owner":"machaval"},"dax":{"title":"DAX","owner":"peterbud"},"dhall":{"title":"Dhall","owner":"RunDevelopment"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"dot":{"title":"DOT (Graphviz)","alias":"gv","optional":"markup","owner":"RunDevelopment"},"ebnf":{"title":"EBNF","owner":"RunDevelopment"},"editorconfig":{"title":"EditorConfig","owner":"osipxd"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"false":{"title":"False","owner":"edukisto"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"c","owner":"Golmote"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","optional":"markdown","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"hlsl":{"title":"HLSL","require":"c","owner":"RunDevelopment"},"http":{"title":"HTTP","optional":["css","javascript","json","markup","uri"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"icu-message-format":{"title":"ICU Message Format","owner":"RunDevelopment"},"idris":{"title":"Idris","alias":"idr","owner":"KeenS","require":"haskell"},"ignore":{"title":".ignore","owner":"osipxd","alias":["gitignore","hgignore","npmignore"],"aliasTitles":{"gitignore":".gitignore","hgignore":".hgignore","npmignore":".npmignore"}},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike","typescript"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","alias":"webmanifest","aliasTitles":{"webmanifest":"Web App Manifest"},"owner":"CupOfTea696"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"jsstacktrace":{"title":"JS stack trace","owner":"sbrl"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","alias":["kt","kts"],"aliasTitles":{"kts":"Kotlin Script"},"require":"clike","owner":"Golmote"},"kumir":{"title":"KuMir (КуМир)","alias":"kum","owner":"edukisto"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","optional":"yaml","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"mongodb":{"title":"MongoDB","owner":"airs0urce","require":"javascript"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"naniscript":{"title":"Naninovel Script","owner":"Elringus","alias":"nani"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nevod":{"title":"Nevod","owner":"nezaboodka"},"nginx":{"title":"nginx","owner":"volado"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"psl":{"title":"PATROL Scripting Language","owner":"bertysentry"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":"markup-templating","owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"promql":{"title":"PromQL","owner":"arendjr"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"purebasic":{"title":"PureBasic","require":"clike","alias":"pbfasm","owner":"HeX0R101"},"purescript":{"title":"PureScript","require":"haskell","alias":"purs","owner":"sriharshachilakapati"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"racket":{"title":"Racket","require":"scheme","alias":"rkt","owner":"RunDevelopment"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","owner":"RunDevelopment"},"rego":{"title":"Rego","owner":"JordanSh"},"renpy":{"title":"Ren'py","alias":"rpy","owner":"HyuchiaDiego"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","alias":["sh-session","shellsession"],"owner":"RunDevelopment"},"smali":{"title":"Smali","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sml":{"title":"SML","alias":"smlnj","aliasTitles":{"smlnj":"SML/NJ"},"owner":"RunDevelopment"},"solidity":{"title":"Solidity (Ethereum)","alias":"sol","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"squirrel":{"title":"Squirrel","require":"clike","owner":"RunDevelopment"},"stan":{"title":"Stan","owner":"RunDevelopment"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","vbnet"],"owner":"RunDevelopment"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"typoscript":{"title":"TypoScript","alias":"tsconfig","aliasTitles":{"tsconfig":"TSConfig"},"owner":"dkern"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"uri":{"title":"URI","alias":"url","aliasTitles":{"url":"URL"},"owner":"RunDevelopment"},"v":{"title":"V","require":"clike","owner":"taggon"},"vala":{"title":"Vala","require":"clike","optional":"regex","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":["vb","vba"],"aliasTitles":{"vba":"VBA"},"owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xml-doc":{"title":"XML doc (.net)","require":"markup","modify":["csharp","fsharp","vbnet"],"owner":"RunDevelopment"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"yang":{"title":"YANG","owner":"RunDevelopment"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml","ssml","atom","rss"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","ssml":"SSML","atom":"Atom","rss":"RSS"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","optional":"regex","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"ABNF","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"agda":{"title":"Agda","owner":"xy-ren"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apex":{"title":"Apex","require":["clike","sql"],"owner":"RunDevelopment"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"dkern"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"birb":{"title":"Birb","require":"clike","owner":"Calamity210"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"BNF","alias":"rbnf","aliasTitles":{"rbnf":"RBNF"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"bsl":{"title":"BSL (1C:Enterprise)","alias":"oscript","aliasTitles":{"oscript":"OneScript"},"owner":"Diversus23"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cfscript":{"title":"CFScript","require":"clike","alias":"cfc","owner":"mjclemente"},"chaiscript":{"title":"ChaiScript","require":["clike","cpp"],"owner":"RunDevelopment"},"cil":{"title":"CIL","owner":"sbrl"},"clojure":{"title":"Clojure","owner":"troglotit"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"csv":{"title":"CSV","owner":"RunDevelopment"},"cypher":{"title":"Cypher","owner":"RunDevelopment"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dataweave":{"title":"DataWeave","owner":"machaval"},"dax":{"title":"DAX","owner":"peterbud"},"dhall":{"title":"Dhall","owner":"RunDevelopment"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"dot":{"title":"DOT (Graphviz)","alias":"gv","optional":"markup","owner":"RunDevelopment"},"ebnf":{"title":"EBNF","owner":"RunDevelopment"},"editorconfig":{"title":"EditorConfig","owner":"osipxd"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"false":{"title":"False","owner":"edukisto"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"c","owner":"Golmote"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","optional":"markdown","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"hlsl":{"title":"HLSL","require":"c","owner":"RunDevelopment"},"http":{"title":"HTTP","optional":["css","javascript","json","markup","uri"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"icu-message-format":{"title":"ICU Message Format","owner":"RunDevelopment"},"idris":{"title":"Idris","alias":"idr","owner":"KeenS","require":"haskell"},"ignore":{"title":".ignore","owner":"osipxd","alias":["gitignore","hgignore","npmignore"],"aliasTitles":{"gitignore":".gitignore","hgignore":".hgignore","npmignore":".npmignore"}},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike","typescript"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","alias":"webmanifest","aliasTitles":{"webmanifest":"Web App Manifest"},"owner":"CupOfTea696"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"jsstacktrace":{"title":"JS stack trace","owner":"sbrl"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","alias":["kt","kts"],"aliasTitles":{"kts":"Kotlin Script"},"require":"clike","owner":"Golmote"},"kumir":{"title":"KuMir (КуМир)","alias":"kum","owner":"edukisto"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","optional":"yaml","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"mongodb":{"title":"MongoDB","owner":"airs0urce","require":"javascript"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"naniscript":{"title":"Naninovel Script","owner":"Elringus","alias":"nani"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nevod":{"title":"Nevod","owner":"nezaboodka"},"nginx":{"title":"nginx","owner":"volado"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"openqasm":{"title":"OpenQasm","alias":"qasm","owner":"RunDevelopment"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"psl":{"title":"PATROL Scripting Language","owner":"bertysentry"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":"markup-templating","owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"promql":{"title":"PromQL","owner":"arendjr"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"purebasic":{"title":"PureBasic","require":"clike","alias":"pbfasm","owner":"HeX0R101"},"purescript":{"title":"PureScript","require":"haskell","alias":"purs","owner":"sriharshachilakapati"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"racket":{"title":"Racket","require":"scheme","alias":"rkt","owner":"RunDevelopment"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","owner":"RunDevelopment"},"rego":{"title":"Rego","owner":"JordanSh"},"renpy":{"title":"Ren'py","alias":"rpy","owner":"HyuchiaDiego"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","alias":["sh-session","shellsession"],"owner":"RunDevelopment"},"smali":{"title":"Smali","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sml":{"title":"SML","alias":"smlnj","aliasTitles":{"smlnj":"SML/NJ"},"owner":"RunDevelopment"},"solidity":{"title":"Solidity (Ethereum)","alias":"sol","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"squirrel":{"title":"Squirrel","require":"clike","owner":"RunDevelopment"},"stan":{"title":"Stan","owner":"RunDevelopment"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","vbnet"],"owner":"RunDevelopment"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"typoscript":{"title":"TypoScript","alias":"tsconfig","aliasTitles":{"tsconfig":"TSConfig"},"owner":"dkern"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"uri":{"title":"URI","alias":"url","aliasTitles":{"url":"URL"},"owner":"RunDevelopment"},"v":{"title":"V","require":"clike","owner":"taggon"},"vala":{"title":"Vala","require":"clike","optional":"regex","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":["vb","vba"],"aliasTitles":{"vba":"VBA"},"owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xml-doc":{"title":"XML doc (.net)","require":"markup","modify":["csharp","fsharp","vbnet"],"owner":"RunDevelopment"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"yang":{"title":"YANG","owner":"RunDevelopment"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; if (typeof module !== 'undefined' && module.exports) { module.exports = components; } \ No newline at end of file diff --git a/components.json b/components.json index c1dd63b97c..1fafc5af22 100644 --- a/components.json +++ b/components.json @@ -850,6 +850,11 @@ ], "owner": "Milania1" }, + "openqasm": { + "title": "OpenQasm", + "alias": "qasm", + "owner": "RunDevelopment" + }, "oz": { "title": "Oz", "owner": "Golmote" diff --git a/components/prism-openqasm.js b/components/prism-openqasm.js new file mode 100644 index 0000000000..90048a90f8 --- /dev/null +++ b/components/prism-openqasm.js @@ -0,0 +1,23 @@ +// https://qiskit.github.io/openqasm/grammar/index.html + +Prism.languages.openqasm = { + 'comment': /\/\*[\s\S]*?\*\/|\/\/.*/, + 'string': { + pattern: /"[^"\r\n\t]*"|'[^'\r\n\t]*'/, + greedy: true + }, + + 'keyword': /\b(?:barrier|boxas|boxto|break|const|continue|ctrl|def|defcal|defcalgrammar|delay|else|end|for|gate|gphase|if|in|include|inv|kernel|lengthof|let|measure|pow|reset|return|rotary|stretchinf|while|CX|OPENQASM|U)\b|#pragma\b/, + 'class-name': /\b(?:angle|bit|bool|creg|fixed|float|int|length|qreg|qubit|stretch|uint)\b/, + 'function': /\b(?:sin|cos|tan|exp|ln|sqrt|rotl|rotr|popcount)\b(?=\s*\()/, + + 'constant': /\b(?:pi|tau|euler)\b|[π𝜏ℇ]/, + 'number': { + pattern: /(^|[^.\w$])(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?(?:dt|ns|us|µs|ms|s)?/i, + lookbehind: true + }, + 'operator': /->|>>=?|<<=?|&&|\|\||\+\+|--|[!=<>&|~^+\-*/%]=?|@/, + 'punctuation': /[(){}\[\];,:.]/ +}; + +Prism.languages.qasm = Prism.languages.openqasm; diff --git a/components/prism-openqasm.min.js b/components/prism-openqasm.min.js new file mode 100644 index 0000000000..695a80832b --- /dev/null +++ b/components/prism-openqasm.min.js @@ -0,0 +1 @@ +Prism.languages.openqasm={comment:/\/\*[\s\S]*?\*\/|\/\/.*/,string:{pattern:/"[^"\r\n\t]*"|'[^'\r\n\t]*'/,greedy:!0},keyword:/\b(?:barrier|boxas|boxto|break|const|continue|ctrl|def|defcal|defcalgrammar|delay|else|end|for|gate|gphase|if|in|include|inv|kernel|lengthof|let|measure|pow|reset|return|rotary|stretchinf|while|CX|OPENQASM|U)\b|#pragma\b/,"class-name":/\b(?:angle|bit|bool|creg|fixed|float|int|length|qreg|qubit|stretch|uint)\b/,function:/\b(?:sin|cos|tan|exp|ln|sqrt|rotl|rotr|popcount)\b(?=\s*\()/,constant:/\b(?:pi|tau|euler)\b|[π𝜏ℇ]/,number:{pattern:/(^|[^.\w$])(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?(?:dt|ns|us|µs|ms|s)?/i,lookbehind:!0},operator:/->|>>=?|<<=?|&&|\|\||\+\+|--|[!=<>&|~^+\-*/%]=?|@/,punctuation:/[(){}\[\];,:.]/},Prism.languages.qasm=Prism.languages.openqasm; \ No newline at end of file diff --git a/examples/prism-openqasm.html b/examples/prism-openqasm.html new file mode 100644 index 0000000000..35ab2fc921 --- /dev/null +++ b/examples/prism-openqasm.html @@ -0,0 +1,43 @@ +

        Full example

        +
        // https://github.com/Qiskit/openqasm
        +/*
        + * Repeat-until-success circuit for Rz(theta),
        + * cos(theta-pi)=3/5, from Nielsen and Chuang, Chapter 4.
        + */
        +OPENQASM 3;
        +include "stdgates.inc";
        +
        +/*
        + * Applies identity if out is 01, 10, or 11 and a Z-rotation by
        + * theta + pi where cos(theta)=3/5 if out is 00.
        + * The 00 outcome occurs with probability 5/8.
        + */
        +def segment qubit[2]:anc, qubit:psi -> bit[2] {
        +  bit[2] b;
        +  reset anc;
        +  h anc;
        +  ccx anc[0], anc[1], psi;
        +  s psi;
        +  ccx anc[0], anc[1], psi;
        +  z psi;
        +  h anc;
        +  measure anc -> b;
        +  return b;
        +}
        +
        +qubit input;
        +qubit ancilla[2];
        +bit flags[2] = "11";
        +bit output;
        +
        +reset input;
        +h input;
        +
        +// braces are optional in this case
        +while(int(flags) != 0) {
        +  flags = segment ancilla, input;
        +}
        +rz(pi - arccos(3 / 5)) input;
        +h input;
        +output = measure input;  // should get zero
        +
        diff --git a/plugins/autoloader/prism-autoloader.js b/plugins/autoloader/prism-autoloader.js index 34a93a114b..9886e3ea1a 100644 --- a/plugins/autoloader/prism-autoloader.js +++ b/plugins/autoloader/prism-autoloader.js @@ -205,6 +205,7 @@ "n4jsd": "n4js", "nani": "naniscript", "objc": "objectivec", + "qasm": "openqasm", "objectpascal": "pascal", "px": "pcaxis", "pcode": "peoplecode", diff --git a/plugins/autoloader/prism-autoloader.min.js b/plugins/autoloader/prism-autoloader.min.js index 0741fb4d27..1d62fa2bbc 100644 --- a/plugins/autoloader/prism-autoloader.min.js +++ b/plugins/autoloader/prism-autoloader.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof self&&self.Prism&&self.document&&document.createElement){var l={javascript:"clike",actionscript:"javascript",apex:["clike","sql"],arduino:"cpp",aspnet:["markup","csharp"],birb:"clike",bison:"c",c:"clike",csharp:"clike",cpp:"c",cfscript:"clike",chaiscript:["clike","cpp"],coffeescript:"javascript",crystal:"ruby","css-extras":"css",d:"clike",dart:"clike",django:"markup-templating",ejs:["javascript","markup-templating"],etlua:["lua","markup-templating"],erb:["ruby","markup-templating"],fsharp:"clike","firestore-security-rules":"clike",flow:"javascript",ftl:"markup-templating",gml:"clike",glsl:"c",go:"clike",groovy:"clike",haml:"ruby",handlebars:"markup-templating",haxe:"clike",hlsl:"c",idris:"haskell",java:"clike",javadoc:["markup","java","javadoclike"],jolie:"clike",jsdoc:["javascript","javadoclike","typescript"],"js-extras":"javascript",json5:"json",jsonp:"json","js-templates":"javascript",kotlin:"clike",latte:["clike","markup-templating","php"],less:"css",lilypond:"scheme",markdown:"markup","markup-templating":"markup",mongodb:"javascript",n4js:"javascript",objectivec:"c",opencl:"c",parser:"markup",php:"markup-templating",phpdoc:["php","javadoclike"],"php-extras":"php",plsql:"sql",processing:"clike",protobuf:"clike",pug:["markup","javascript"],purebasic:"clike",purescript:"haskell",qml:"javascript",qore:"clike",racket:"scheme",jsx:["markup","javascript"],tsx:["jsx","typescript"],reason:"clike",ruby:"clike",sass:"css",scss:"css",scala:"java","shell-session":"bash",smarty:"markup-templating",solidity:"clike",soy:"markup-templating",sparql:"turtle",sqf:"clike",squirrel:"clike",swift:"clike","t4-cs":["t4-templating","csharp"],"t4-vb":["t4-templating","vbnet"],tap:"yaml",tt2:["clike","markup-templating"],textile:"markup",twig:"markup",typescript:"javascript",v:"clike",vala:"clike",vbnet:"basic",velocity:"markup",wiki:"markup",xeora:"markup","xml-doc":"markup",xquery:"markup"},n={html:"markup",xml:"markup",svg:"markup",mathml:"markup",ssml:"markup",atom:"markup",rss:"markup",js:"javascript",g4:"antlr4",adoc:"asciidoc",shell:"bash",shortcode:"bbcode",rbnf:"bnf",oscript:"bsl",cs:"csharp",dotnet:"csharp",cfc:"cfscript",coffee:"coffeescript",conc:"concurnas",jinja2:"django","dns-zone":"dns-zone-file",dockerfile:"docker",gv:"dot",eta:"ejs",xlsx:"excel-formula",xls:"excel-formula",gamemakerlanguage:"gml",hs:"haskell",idr:"idris",gitignore:"ignore",hgignore:"ignore",npmignore:"ignore",webmanifest:"json",kt:"kotlin",kts:"kotlin",kum:"kumir",tex:"latex",context:"latex",ly:"lilypond",emacs:"lisp",elisp:"lisp","emacs-lisp":"lisp",md:"markdown",moon:"moonscript",n4jsd:"n4js",nani:"naniscript",objc:"objectivec",objectpascal:"pascal",px:"pcaxis",pcode:"peoplecode",pq:"powerquery",mscript:"powerquery",pbfasm:"purebasic",purs:"purescript",py:"python",rkt:"racket",rpy:"renpy",robot:"robotframework",rb:"ruby","sh-session":"shell-session",shellsession:"shell-session",smlnj:"sml",sol:"solidity",sln:"solution-file",rq:"sparql",t4:"t4-cs",trig:"turtle",ts:"typescript",tsconfig:"typoscript",uscript:"unrealscript",uc:"unrealscript",url:"uri",vb:"visual-basic",vba:"visual-basic",xeoracube:"xeora",yml:"yaml"},p={},e="components/",a=Prism.util.currentScript();if(a){var r=/\bplugins\/autoloader\/prism-autoloader\.(?:min\.)?js(?:\?[^\r\n/]*)?$/i,s=/(^|\/)[\w-]+\.(?:min\.)?js(?:\?[^\r\n/]*)?$/i,i=a.getAttribute("data-autoloader-path");if(null!=i)e=i.trim().replace(/\/?$/,"/");else{var t=a.src;r.test(t)?e=t.replace(r,"components/"):s.test(t)&&(e=t.replace(s,"$1components/"))}}var o=Prism.plugins.autoloader={languages_path:e,use_minified:!0,loadLanguages:m};Prism.hooks.add("complete",function(e){var a=e.element,r=e.language;if(a&&r&&"none"!==r){var s=function(e){var a=(e.getAttribute("data-dependencies")||"").trim();if(!a){var r=e.parentElement;r&&"pre"===r.tagName.toLowerCase()&&(a=(r.getAttribute("data-dependencies")||"").trim())}return a?a.split(/\s*,\s*/g):[]}(a);/^diff-./i.test(r)?(s.push("diff"),s.push(r.substr("diff-".length))):s.push(r),s.every(u)||m(s,function(){Prism.highlightElement(a)})}})}function u(e){if(0<=e.indexOf("!"))return!1;if((e=n[e]||e)in Prism.languages)return!0;var a=p[e];return a&&!a.error&&!1===a.loading}function m(e,a,r){"string"==typeof e&&(e=[e]);var s=e.length,i=0,t=!1;function c(){t||++i===s&&a&&a(e)}0!==s?e.forEach(function(e){!function(a,r,s){var i=0<=a.indexOf("!");function e(){var e=p[a];e||(e=p[a]={callbacks:[]}),e.callbacks.push({success:r,error:s}),!i&&u(a)?k(a,"success"):!i&&e.error?k(a,"error"):!i&&e.loading||(e.loading=!0,e.error=!1,function(e,a,r){var s=document.createElement("script");s.src=e,s.async=!0,s.onload=function(){document.body.removeChild(s),a&&a()},s.onerror=function(){document.body.removeChild(s),r&&r()},document.body.appendChild(s)}(function(e){return o.languages_path+"prism-"+e+(o.use_minified?".min":"")+".js"}(a),function(){e.loading=!1,k(a,"success")},function(){e.loading=!1,e.error=!0,k(a,"error")}))}a=a.replace("!",""),a=n[a]||a;var t=l[a];t&&t.length?m(t,e,s):e()}(e,c,function(){t||(t=!0,r&&r(e))})}):a&&setTimeout(a,0)}function k(e,a){if(p[e]){for(var r=p[e].callbacks,s=0,i=r.length;s < >= <= == != + +& | ~ ^ << >> +&= |= ~= ^= <<= >>= + +! && || + += -> @ + ++ - * / % ++= -= *= /= %= +++ -- + +---------------------------------------------------- + +[ + ["operator", ">"], + ["operator", "<"], + ["operator", ">="], + ["operator", "<="], + ["operator", "=="], + ["operator", "!="], + + ["operator", "&"], + ["operator", "|"], + ["operator", "~"], + ["operator", "^"], + ["operator", "<<"], + ["operator", ">>"], + + ["operator", "&="], + ["operator", "|="], + ["operator", "~="], + ["operator", "^="], + ["operator", "<<="], + ["operator", ">>="], + + ["operator", "!"], ["operator", "&&"], ["operator", "||"], + + ["operator", "="], ["operator", "->"], ["operator", "@"], + + ["operator", "+"], + ["operator", "-"], + ["operator", "*"], + ["operator", "/"], + ["operator", "%"], + + ["operator", "+="], + ["operator", "-="], + ["operator", "*="], + ["operator", "/="], + ["operator", "%="], + + ["operator", "++"], + ["operator", "--"] +] \ No newline at end of file diff --git a/tests/languages/openqasm/string_feature.test b/tests/languages/openqasm/string_feature.test new file mode 100644 index 0000000000..78eae93ac7 --- /dev/null +++ b/tests/languages/openqasm/string_feature.test @@ -0,0 +1,9 @@ +"foo" +'bar' + +---------------------------------------------------- + +[ + ["string", "\"foo\""], + ["string", "'bar'"] +] \ No newline at end of file From 2bc6475be02290c04695ff6819982e402c767ff1 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Sun, 21 Mar 2021 16:47:49 +0100 Subject: [PATCH 0762/1100] Added support for Generic log files (#2796) --- components.js | 2 +- components.json | 4 + components/prism-log.js | 108 +++ components/prism-log.min.js | 1 + examples/prism-log.html | 10 + plugins/show-language/prism-show-language.js | 1 + .../show-language/prism-show-language.min.js | 2 +- tests/languages/log/_discord.test | 420 ++++++++++ tests/languages/log/_docker.test | 335 ++++++++ tests/languages/log/_java_stack_trace.test | 762 ++++++++++++++++++ tests/languages/log/_minecraft.test | 419 ++++++++++ tests/languages/log/_nginx.test | 141 ++++ tests/languages/log/_npm_console.test | 83 ++ tests/languages/log/_npm_log.test | 401 +++++++++ tests/languages/log/_table.test | 523 ++++++++++++ tests/languages/log/_tomcat.test | 162 ++++ tests/languages/log/_windows.test | 278 +++++++ tests/languages/log/date_feature.test | 27 + tests/languages/log/hash_feature.test | 9 + tests/languages/log/level_feature.test | 57 ++ tests/languages/log/number_feature.test | 41 + tests/languages/log/path_feature.test | 34 + tests/languages/log/property_feature.test | 100 +++ tests/languages/log/separator_feature.test | 50 ++ tests/languages/log/string_feature.test | 39 + tests/languages/log/time_feature.test | 25 + tests/languages/log/url_feature.test | 30 + tests/languages/log/uuid_feature.test | 9 + 28 files changed, 4071 insertions(+), 2 deletions(-) create mode 100644 components/prism-log.js create mode 100644 components/prism-log.min.js create mode 100644 examples/prism-log.html create mode 100644 tests/languages/log/_discord.test create mode 100644 tests/languages/log/_docker.test create mode 100644 tests/languages/log/_java_stack_trace.test create mode 100644 tests/languages/log/_minecraft.test create mode 100644 tests/languages/log/_nginx.test create mode 100644 tests/languages/log/_npm_console.test create mode 100644 tests/languages/log/_npm_log.test create mode 100644 tests/languages/log/_table.test create mode 100644 tests/languages/log/_tomcat.test create mode 100644 tests/languages/log/_windows.test create mode 100644 tests/languages/log/date_feature.test create mode 100644 tests/languages/log/hash_feature.test create mode 100644 tests/languages/log/level_feature.test create mode 100644 tests/languages/log/number_feature.test create mode 100644 tests/languages/log/path_feature.test create mode 100644 tests/languages/log/property_feature.test create mode 100644 tests/languages/log/separator_feature.test create mode 100644 tests/languages/log/string_feature.test create mode 100644 tests/languages/log/time_feature.test create mode 100644 tests/languages/log/url_feature.test create mode 100644 tests/languages/log/uuid_feature.test diff --git a/components.js b/components.js index 6c3d55dd41..edf269e5b8 100644 --- a/components.js +++ b/components.js @@ -1,2 +1,2 @@ -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml","ssml","atom","rss"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","ssml":"SSML","atom":"Atom","rss":"RSS"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","optional":"regex","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"ABNF","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"agda":{"title":"Agda","owner":"xy-ren"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apex":{"title":"Apex","require":["clike","sql"],"owner":"RunDevelopment"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"dkern"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"birb":{"title":"Birb","require":"clike","owner":"Calamity210"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"BNF","alias":"rbnf","aliasTitles":{"rbnf":"RBNF"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"bsl":{"title":"BSL (1C:Enterprise)","alias":"oscript","aliasTitles":{"oscript":"OneScript"},"owner":"Diversus23"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cfscript":{"title":"CFScript","require":"clike","alias":"cfc","owner":"mjclemente"},"chaiscript":{"title":"ChaiScript","require":["clike","cpp"],"owner":"RunDevelopment"},"cil":{"title":"CIL","owner":"sbrl"},"clojure":{"title":"Clojure","owner":"troglotit"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"csv":{"title":"CSV","owner":"RunDevelopment"},"cypher":{"title":"Cypher","owner":"RunDevelopment"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dataweave":{"title":"DataWeave","owner":"machaval"},"dax":{"title":"DAX","owner":"peterbud"},"dhall":{"title":"Dhall","owner":"RunDevelopment"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"dot":{"title":"DOT (Graphviz)","alias":"gv","optional":"markup","owner":"RunDevelopment"},"ebnf":{"title":"EBNF","owner":"RunDevelopment"},"editorconfig":{"title":"EditorConfig","owner":"osipxd"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"false":{"title":"False","owner":"edukisto"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"c","owner":"Golmote"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","optional":"markdown","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"hlsl":{"title":"HLSL","require":"c","owner":"RunDevelopment"},"http":{"title":"HTTP","optional":["css","javascript","json","markup","uri"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"icu-message-format":{"title":"ICU Message Format","owner":"RunDevelopment"},"idris":{"title":"Idris","alias":"idr","owner":"KeenS","require":"haskell"},"ignore":{"title":".ignore","owner":"osipxd","alias":["gitignore","hgignore","npmignore"],"aliasTitles":{"gitignore":".gitignore","hgignore":".hgignore","npmignore":".npmignore"}},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike","typescript"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","alias":"webmanifest","aliasTitles":{"webmanifest":"Web App Manifest"},"owner":"CupOfTea696"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"jsstacktrace":{"title":"JS stack trace","owner":"sbrl"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","alias":["kt","kts"],"aliasTitles":{"kts":"Kotlin Script"},"require":"clike","owner":"Golmote"},"kumir":{"title":"KuMir (КуМир)","alias":"kum","owner":"edukisto"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","optional":"yaml","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"mongodb":{"title":"MongoDB","owner":"airs0urce","require":"javascript"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"naniscript":{"title":"Naninovel Script","owner":"Elringus","alias":"nani"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nevod":{"title":"Nevod","owner":"nezaboodka"},"nginx":{"title":"nginx","owner":"volado"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"openqasm":{"title":"OpenQasm","alias":"qasm","owner":"RunDevelopment"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"psl":{"title":"PATROL Scripting Language","owner":"bertysentry"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":"markup-templating","owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"promql":{"title":"PromQL","owner":"arendjr"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"purebasic":{"title":"PureBasic","require":"clike","alias":"pbfasm","owner":"HeX0R101"},"purescript":{"title":"PureScript","require":"haskell","alias":"purs","owner":"sriharshachilakapati"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"racket":{"title":"Racket","require":"scheme","alias":"rkt","owner":"RunDevelopment"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","owner":"RunDevelopment"},"rego":{"title":"Rego","owner":"JordanSh"},"renpy":{"title":"Ren'py","alias":"rpy","owner":"HyuchiaDiego"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","alias":["sh-session","shellsession"],"owner":"RunDevelopment"},"smali":{"title":"Smali","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sml":{"title":"SML","alias":"smlnj","aliasTitles":{"smlnj":"SML/NJ"},"owner":"RunDevelopment"},"solidity":{"title":"Solidity (Ethereum)","alias":"sol","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"squirrel":{"title":"Squirrel","require":"clike","owner":"RunDevelopment"},"stan":{"title":"Stan","owner":"RunDevelopment"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","vbnet"],"owner":"RunDevelopment"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"typoscript":{"title":"TypoScript","alias":"tsconfig","aliasTitles":{"tsconfig":"TSConfig"},"owner":"dkern"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"uri":{"title":"URI","alias":"url","aliasTitles":{"url":"URL"},"owner":"RunDevelopment"},"v":{"title":"V","require":"clike","owner":"taggon"},"vala":{"title":"Vala","require":"clike","optional":"regex","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":["vb","vba"],"aliasTitles":{"vba":"VBA"},"owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xml-doc":{"title":"XML doc (.net)","require":"markup","modify":["csharp","fsharp","vbnet"],"owner":"RunDevelopment"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"yang":{"title":"YANG","owner":"RunDevelopment"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml","ssml","atom","rss"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","ssml":"SSML","atom":"Atom","rss":"RSS"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","optional":"regex","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"ABNF","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"agda":{"title":"Agda","owner":"xy-ren"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apex":{"title":"Apex","require":["clike","sql"],"owner":"RunDevelopment"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"dkern"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"birb":{"title":"Birb","require":"clike","owner":"Calamity210"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"BNF","alias":"rbnf","aliasTitles":{"rbnf":"RBNF"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"bsl":{"title":"BSL (1C:Enterprise)","alias":"oscript","aliasTitles":{"oscript":"OneScript"},"owner":"Diversus23"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cfscript":{"title":"CFScript","require":"clike","alias":"cfc","owner":"mjclemente"},"chaiscript":{"title":"ChaiScript","require":["clike","cpp"],"owner":"RunDevelopment"},"cil":{"title":"CIL","owner":"sbrl"},"clojure":{"title":"Clojure","owner":"troglotit"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"csv":{"title":"CSV","owner":"RunDevelopment"},"cypher":{"title":"Cypher","owner":"RunDevelopment"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dataweave":{"title":"DataWeave","owner":"machaval"},"dax":{"title":"DAX","owner":"peterbud"},"dhall":{"title":"Dhall","owner":"RunDevelopment"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"dot":{"title":"DOT (Graphviz)","alias":"gv","optional":"markup","owner":"RunDevelopment"},"ebnf":{"title":"EBNF","owner":"RunDevelopment"},"editorconfig":{"title":"EditorConfig","owner":"osipxd"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"false":{"title":"False","owner":"edukisto"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"c","owner":"Golmote"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","optional":"markdown","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"hlsl":{"title":"HLSL","require":"c","owner":"RunDevelopment"},"http":{"title":"HTTP","optional":["css","javascript","json","markup","uri"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"icu-message-format":{"title":"ICU Message Format","owner":"RunDevelopment"},"idris":{"title":"Idris","alias":"idr","owner":"KeenS","require":"haskell"},"ignore":{"title":".ignore","owner":"osipxd","alias":["gitignore","hgignore","npmignore"],"aliasTitles":{"gitignore":".gitignore","hgignore":".hgignore","npmignore":".npmignore"}},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike","typescript"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","alias":"webmanifest","aliasTitles":{"webmanifest":"Web App Manifest"},"owner":"CupOfTea696"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"jsstacktrace":{"title":"JS stack trace","owner":"sbrl"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","alias":["kt","kts"],"aliasTitles":{"kts":"Kotlin Script"},"require":"clike","owner":"Golmote"},"kumir":{"title":"KuMir (КуМир)","alias":"kum","owner":"edukisto"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"log":{"title":"Log file","owner":"RunDevelopment"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","optional":"yaml","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"mongodb":{"title":"MongoDB","owner":"airs0urce","require":"javascript"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"naniscript":{"title":"Naninovel Script","owner":"Elringus","alias":"nani"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nevod":{"title":"Nevod","owner":"nezaboodka"},"nginx":{"title":"nginx","owner":"volado"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"openqasm":{"title":"OpenQasm","alias":"qasm","owner":"RunDevelopment"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"psl":{"title":"PATROL Scripting Language","owner":"bertysentry"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":"markup-templating","owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"promql":{"title":"PromQL","owner":"arendjr"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"purebasic":{"title":"PureBasic","require":"clike","alias":"pbfasm","owner":"HeX0R101"},"purescript":{"title":"PureScript","require":"haskell","alias":"purs","owner":"sriharshachilakapati"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"racket":{"title":"Racket","require":"scheme","alias":"rkt","owner":"RunDevelopment"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","owner":"RunDevelopment"},"rego":{"title":"Rego","owner":"JordanSh"},"renpy":{"title":"Ren'py","alias":"rpy","owner":"HyuchiaDiego"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","alias":["sh-session","shellsession"],"owner":"RunDevelopment"},"smali":{"title":"Smali","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sml":{"title":"SML","alias":"smlnj","aliasTitles":{"smlnj":"SML/NJ"},"owner":"RunDevelopment"},"solidity":{"title":"Solidity (Ethereum)","alias":"sol","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"squirrel":{"title":"Squirrel","require":"clike","owner":"RunDevelopment"},"stan":{"title":"Stan","owner":"RunDevelopment"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","vbnet"],"owner":"RunDevelopment"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"typoscript":{"title":"TypoScript","alias":"tsconfig","aliasTitles":{"tsconfig":"TSConfig"},"owner":"dkern"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"uri":{"title":"URI","alias":"url","aliasTitles":{"url":"URL"},"owner":"RunDevelopment"},"v":{"title":"V","require":"clike","owner":"taggon"},"vala":{"title":"Vala","require":"clike","optional":"regex","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":["vb","vba"],"aliasTitles":{"vba":"VBA"},"owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xml-doc":{"title":"XML doc (.net)","require":"markup","modify":["csharp","fsharp","vbnet"],"owner":"RunDevelopment"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"yang":{"title":"YANG","owner":"RunDevelopment"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; if (typeof module !== 'undefined' && module.exports) { module.exports = components; } \ No newline at end of file diff --git a/components.json b/components.json index 1fafc5af22..836c4f6521 100644 --- a/components.json +++ b/components.json @@ -733,6 +733,10 @@ "title": "LLVM IR", "owner": "porglezomp" }, + "log": { + "title": "Log file", + "owner": "RunDevelopment" + }, "lolcode": { "title": "LOLCODE", "owner": "Golmote" diff --git a/components/prism-log.js b/components/prism-log.js new file mode 100644 index 0000000000..da04bc7ab2 --- /dev/null +++ b/components/prism-log.js @@ -0,0 +1,108 @@ +// This is a language definition for generic log files. +// Since there is no one log format, this language definition has to support all formats to some degree. +// +// Based on https://github.com/MTDL9/vim-log-highlighting + +Prism.languages.log = { + 'string': { + // Single-quoted strings must not be confused with plain text. E.g. Can't isn't Susan's Chris' toy + pattern: /"(?:[^"\\\r\n]|\\.)*"|'(?![st] | \w)(?:[^'\\\r\n]|\\.)*'/, + greedy: true, + }, + + 'level': [ + { + pattern: /\b(?:ALERT|CRIT|CRITICAL|EMERG|EMERGENCY|ERR|ERROR|FAILURE|FATAL|SEVERE)\b/, + alias: ['error', 'important'] + }, + { + pattern: /\b(?:WARN|WARNING)\b/, + alias: ['warning', 'important'] + }, + { + pattern: /\b(?:DISPLAY|INFO|NOTICE|STATUS)\b/, + alias: ['info', 'keyword'] + }, + { + pattern: /\b(?:DEBUG|FINE)\b/, + alias: ['debug', 'keyword'] + }, + { + pattern: /\b(?:FINER|FINEST|TRACE|VERBOSE)\b/, + alias: ['trace', 'comment'] + } + ], + + 'property': { + pattern: /((?:^|[\]|])[ \t]*)[a-z_](?:[\w-]|\b\/\b)*(?:[. ]\(?\w(?:[\w-]|\b\/\b)*\)?)*:(?=\s)/im, + lookbehind: true + }, + + 'separator': { + pattern: /(^|[^-+])-{3,}|={3,}|\*{3,}|- - /m, + lookbehind: true, + alias: 'comment' + }, + + 'url': /\b(?:https?|ftp|file):\/\/[^\s|,;'"]*[^\s|,;'">.]/, + 'email': { + pattern: /(^|\s)[-\w+.]+@[a-z][a-z0-9-]*(?:\.[a-z][a-z0-9-]*)+(?=\s)/, + lookbehind: true, + alias: 'url' + }, + + 'ip-address': { + pattern: /\b(?:\d{1,3}(?:\.\d{1,3}){3})\b/i, + alias: 'constant' + }, + 'mac-address': { + pattern: /\b[a-f0-9]{2}(?::[a-f0-9]{2}){5}\b/i, + alias: 'constant' + }, + 'domain': { + pattern: /(^|\s)[a-z][a-z0-9-]*(?:\.[a-z][a-z0-9-]*)*\.[a-z][a-z0-9-]+(?=\s)/, + lookbehind: true, + alias: 'constant' + }, + + 'uuid': { + pattern: /\b\w{8}-\w{4}-\w{4}-\w{4}-\w{12}\b/, + alias: 'constant' + }, + 'hash': { + pattern: /\b(?:[a-f0-9]{32}){1,2}\b/i, + alias: 'constant' + }, + + 'file-path': { + pattern: /\b[a-z]:[\\/][^\s|,;:(){}\[\]"']+|(^|[\s:\[\](>|])\.{0,2}\/\w[^\s|,;:(){}\[\]"']*/i, + lookbehind: true, + greedy: true, + alias: 'string' + }, + + 'date': { + pattern: RegExp( + /\b\d{4}[-/]\d{2}[-/]\d{2}T(?=\d{1,2}:)/.source + + '|' + + /\b\d{1,4}[-/ ](?:\d{1,2}|Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)[-/ ]\d{2,4}T?\b/.source + + '|' + + /\b(?:(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun)(?:\s{1,2}(?:Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec))?|Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s{1,2}\d{1,2}\b/.source, + 'i' + ), + alias: 'number' + }, + 'time': { + pattern: /\b\d{1,2}:\d{1,2}:\d{1,2}(?:[.,:]\d+)?(?:\s?[+-]\d{2,4}|Z)?\b/, + alias: 'number' + }, + + 'boolean': /\b(?:true|false|null)\b/i, + 'number': { + pattern: /(^|[^.\w])(?:0x[a-f0-9]+|0o[0-7]+|0b[01]+|v?\d[\da-f]*(?:\.\d+)*(?:e[+-]?\d+)?[a-z]{0,3}\b)\b(?!\.\w)/i, + lookbehind: true + }, + + 'operator': /[;:?<=>~/@!$%&+\-|^(){}*#]/, + 'punctuation': /[\[\].,]/ +}; diff --git a/components/prism-log.min.js b/components/prism-log.min.js new file mode 100644 index 0000000000..a81f0d536c --- /dev/null +++ b/components/prism-log.min.js @@ -0,0 +1 @@ +Prism.languages.log={string:{pattern:/"(?:[^"\\\r\n]|\\.)*"|'(?![st] | \w)(?:[^'\\\r\n]|\\.)*'/,greedy:!0},level:[{pattern:/\b(?:ALERT|CRIT|CRITICAL|EMERG|EMERGENCY|ERR|ERROR|FAILURE|FATAL|SEVERE)\b/,alias:["error","important"]},{pattern:/\b(?:WARN|WARNING)\b/,alias:["warning","important"]},{pattern:/\b(?:DISPLAY|INFO|NOTICE|STATUS)\b/,alias:["info","keyword"]},{pattern:/\b(?:DEBUG|FINE)\b/,alias:["debug","keyword"]},{pattern:/\b(?:FINER|FINEST|TRACE|VERBOSE)\b/,alias:["trace","comment"]}],property:{pattern:/((?:^|[\]|])[ \t]*)[a-z_](?:[\w-]|\b\/\b)*(?:[. ]\(?\w(?:[\w-]|\b\/\b)*\)?)*:(?=\s)/im,lookbehind:!0},separator:{pattern:/(^|[^-+])-{3,}|={3,}|\*{3,}|- - /m,lookbehind:!0,alias:"comment"},url:/\b(?:https?|ftp|file):\/\/[^\s|,;'"]*[^\s|,;'">.]/,email:{pattern:/(^|\s)[-\w+.]+@[a-z][a-z0-9-]*(?:\.[a-z][a-z0-9-]*)+(?=\s)/,lookbehind:!0,alias:"url"},"ip-address":{pattern:/\b(?:\d{1,3}(?:\.\d{1,3}){3})\b/i,alias:"constant"},"mac-address":{pattern:/\b[a-f0-9]{2}(?::[a-f0-9]{2}){5}\b/i,alias:"constant"},domain:{pattern:/(^|\s)[a-z][a-z0-9-]*(?:\.[a-z][a-z0-9-]*)*\.[a-z][a-z0-9-]+(?=\s)/,lookbehind:!0,alias:"constant"},uuid:{pattern:/\b\w{8}-\w{4}-\w{4}-\w{4}-\w{12}\b/,alias:"constant"},hash:{pattern:/\b(?:[a-f0-9]{32}){1,2}\b/i,alias:"constant"},"file-path":{pattern:/\b[a-z]:[\\/][^\s|,;:(){}\[\]"']+|(^|[\s:\[\](>|])\.{0,2}\/\w[^\s|,;:(){}\[\]"']*/i,lookbehind:!0,greedy:!0,alias:"string"},date:{pattern:RegExp("\\b\\d{4}[-/]\\d{2}[-/]\\d{2}T(?=\\d{1,2}:)|\\b\\d{1,4}[-/ ](?:\\d{1,2}|Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)[-/ ]\\d{2,4}T?\\b|\\b(?:(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun)(?:\\s{1,2}(?:Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec))?|Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\\s{1,2}\\d{1,2}\\b","i"),alias:"number"},time:{pattern:/\b\d{1,2}:\d{1,2}:\d{1,2}(?:[.,:]\d+)?(?:\s?[+-]\d{2,4}|Z)?\b/,alias:"number"},boolean:/\b(?:true|false|null)\b/i,number:{pattern:/(^|[^.\w])(?:0x[a-f0-9]+|0o[0-7]+|0b[01]+|v?\d[\da-f]*(?:\.\d+)*(?:e[+-]?\d+)?[a-z]{0,3}\b)\b(?!\.\w)/i,lookbehind:!0},operator:/[;:?<=>~/@!$%&+\-|^(){}*#]/,punctuation:/[\[\].,]/}; \ No newline at end of file diff --git a/examples/prism-log.html b/examples/prism-log.html new file mode 100644 index 0000000000..efb1d4f43d --- /dev/null +++ b/examples/prism-log.html @@ -0,0 +1,10 @@ +

        Nginx example

        +
        /47.29.201.179 - - [28/Feb/2019:13:17:10 +0000] "GET /?p=1 HTTP/2.0" 200 5316 "https://domain1.com/?p=1" "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.119 Safari/537.36" "2.75"
        +
        Mar 19 22:10:18 xxxxxx journal: xxxxxxx.mylabserver.com nginx: photos.example.com 127.0.0.1 - - [19/Mar/2018:22:10:18 +0000] "GET / HTTP/1.1" 200 1863 "-" "curl/7.29.0" "-"
        +Mar 19 22:10:24 xxxxxxx journal: xxxxxxxx.mylabserver.com nginx: photos.example.com 127.0.0.1 - - [19/Mar/2018:22:10:24 +0000] "GET / HTTP/1.1" 200 53324 "-" "curl/7.29.0" "-"
        +
        TLSv1.2 AES128-SHA 1.1.1.1 "Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0"
        +TLSv1.2 ECDHE-RSA-AES128-GCM-SHA256 2.2.2.2 "Mozilla/5.0 (iPhone; CPU iPhone OS 9_1 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Version/9.0 Mobile/13B143 Safari/601.1"
        +TLSv1.2 ECDHE-RSA-AES128-GCM-SHA256 3.3.3.3 "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:58.0) Gecko/20100101 Firefox/58.0"
        +TLSv1.2 ECDHE-RSA-AES128-GCM-SHA256 4.4.4.4 "Mozilla/5.0 (Android 4.4.2; Tablet; rv:65.0) Gecko/65.0 Firefox/65.0"
        +TLSv1 AES128-SHA 5.5.5.5 "Mozilla/5.0 (Android 4.4.2; Tablet; rv:65.0) Gecko/65.0 Firefox/65.0"
        +TLSv1.2 ECDHE-RSA-CHACHA20-POLY1305 6.6.6.6 "Mozilla/5.0 (Linux; U; Android 5.0.2; en-US; XT1068 Build/LXB22.46-28) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/57.0.2987.108 UCBrowser/12.10.2.1164 Mobile Safari/537.36"
        diff --git a/plugins/show-language/prism-show-language.js b/plugins/show-language/prism-show-language.js index 8e1a034ce9..5db7031b11 100644 --- a/plugins/show-language/prism-show-language.js +++ b/plugins/show-language/prism-show-language.js @@ -126,6 +126,7 @@ "elisp": "Lisp", "emacs-lisp": "Lisp", "llvm": "LLVM IR", + "log": "Log file", "lolcode": "LOLCODE", "md": "Markdown", "markup-templating": "Markup templating", diff --git a/plugins/show-language/prism-show-language.min.js b/plugins/show-language/prism-show-language.min.js index 209b527fec..a5e67f1fc5 100644 --- a/plugins/show-language/prism-show-language.min.js +++ b/plugins/show-language/prism-show-language.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof self&&self.Prism&&self.document)if(Prism.plugins.toolbar){var i={none:"Plain text",plain:"Plain text",plaintext:"Plain text",text:"Plain text",txt:"Plain text",html:"HTML",xml:"XML",svg:"SVG",mathml:"MathML",ssml:"SSML",rss:"RSS",css:"CSS",clike:"C-like",js:"JavaScript",abap:"ABAP",abnf:"ABNF",al:"AL",antlr4:"ANTLR4",g4:"ANTLR4",apacheconf:"Apache Configuration",apl:"APL",aql:"AQL",arff:"ARFF",asciidoc:"AsciiDoc",adoc:"AsciiDoc",aspnet:"ASP.NET (C#)",asm6502:"6502 Assembly",autohotkey:"AutoHotkey",autoit:"AutoIt",basic:"BASIC",bbcode:"BBcode",bnf:"BNF",rbnf:"RBNF",bsl:"BSL (1C:Enterprise)",oscript:"OneScript",csharp:"C#",cs:"C#",dotnet:"C#",cpp:"C++",cfscript:"CFScript",cfc:"CFScript",cil:"CIL",cmake:"CMake",coffee:"CoffeeScript",conc:"Concurnas",csp:"Content-Security-Policy","css-extras":"CSS Extras",csv:"CSV",dataweave:"DataWeave",dax:"DAX",django:"Django/Jinja2",jinja2:"Django/Jinja2","dns-zone-file":"DNS zone file","dns-zone":"DNS zone file",dockerfile:"Docker",dot:"DOT (Graphviz)",gv:"DOT (Graphviz)",ebnf:"EBNF",editorconfig:"EditorConfig",ejs:"EJS",etlua:"Embedded Lua templating",erb:"ERB","excel-formula":"Excel Formula",xlsx:"Excel Formula",xls:"Excel Formula",fsharp:"F#","firestore-security-rules":"Firestore security rules",ftl:"FreeMarker Template Language",gml:"GameMaker Language",gamemakerlanguage:"GameMaker Language",gcode:"G-code",gdscript:"GDScript",gedcom:"GEDCOM",glsl:"GLSL",graphql:"GraphQL",hs:"Haskell",hcl:"HCL",hlsl:"HLSL",http:"HTTP",hpkp:"HTTP Public-Key-Pins",hsts:"HTTP Strict-Transport-Security",ichigojam:"IchigoJam","icu-message-format":"ICU Message Format",idr:"Idris",ignore:".ignore",gitignore:".gitignore",hgignore:".hgignore",npmignore:".npmignore",inform7:"Inform 7",javadoc:"JavaDoc",javadoclike:"JavaDoc-like",javastacktrace:"Java stack trace",jq:"JQ",jsdoc:"JSDoc","js-extras":"JS Extras",json:"JSON",webmanifest:"Web App Manifest",json5:"JSON5",jsonp:"JSONP",jsstacktrace:"JS stack trace","js-templates":"JS Templates",kts:"Kotlin Script",kt:"Kotlin",kumir:"KuMir (КуМир)",kum:"KuMir (КуМир)",latex:"LaTeX",tex:"TeX",context:"ConTeXt",lilypond:"LilyPond",ly:"LilyPond",emacs:"Lisp",elisp:"Lisp","emacs-lisp":"Lisp",llvm:"LLVM IR",lolcode:"LOLCODE",md:"Markdown","markup-templating":"Markup templating",matlab:"MATLAB",mel:"MEL",mongodb:"MongoDB",moon:"MoonScript",n1ql:"N1QL",n4js:"N4JS",n4jsd:"N4JS","nand2tetris-hdl":"Nand To Tetris HDL",naniscript:"Naninovel Script",nani:"Naninovel Script",nasm:"NASM",neon:"NEON",nginx:"nginx",nsis:"NSIS",objectivec:"Objective-C",objc:"Objective-C",ocaml:"OCaml",opencl:"OpenCL",openqasm:"OpenQasm",qasm:"OpenQasm",parigp:"PARI/GP",objectpascal:"Object Pascal",psl:"PATROL Scripting Language",pcaxis:"PC-Axis",px:"PC-Axis",peoplecode:"PeopleCode",pcode:"PeopleCode",php:"PHP",phpdoc:"PHPDoc","php-extras":"PHP Extras",plsql:"PL/SQL",powerquery:"PowerQuery",pq:"PowerQuery",mscript:"PowerQuery",powershell:"PowerShell",promql:"PromQL",properties:".properties",protobuf:"Protocol Buffers",purebasic:"PureBasic",pbfasm:"PureBasic",purs:"PureScript",py:"Python",q:"Q (kdb+ database)",qml:"QML",rkt:"Racket",jsx:"React JSX",tsx:"React TSX",renpy:"Ren'py",rpy:"Ren'py",rest:"reST (reStructuredText)",robotframework:"Robot Framework",robot:"Robot Framework",rb:"Ruby",sas:"SAS",sass:"Sass (Sass)",scss:"Sass (Scss)","shell-session":"Shell session","sh-session":"Shell session",shellsession:"Shell session",sml:"SML",smlnj:"SML/NJ",solidity:"Solidity (Ethereum)",sol:"Solidity (Ethereum)","solution-file":"Solution file",sln:"Solution file",soy:"Soy (Closure Template)",sparql:"SPARQL",rq:"SPARQL","splunk-spl":"Splunk SPL",sqf:"SQF: Status Quo Function (Arma 3)",sql:"SQL",iecst:"Structured Text (IEC 61131-3)","t4-templating":"T4 templating","t4-cs":"T4 Text Templates (C#)",t4:"T4 Text Templates (C#)","t4-vb":"T4 Text Templates (VB)",tap:"TAP",tt2:"Template Toolkit 2",toml:"TOML",trig:"TriG",ts:"TypeScript",tsconfig:"TSConfig",uscript:"UnrealScript",uc:"UnrealScript",uri:"URI",url:"URL",vbnet:"VB.Net",vhdl:"VHDL",vim:"vim","visual-basic":"Visual Basic",vba:"VBA",vb:"Visual Basic",wasm:"WebAssembly",wiki:"Wiki markup",xeoracube:"XeoraCube","xml-doc":"XML doc (.net)",xojo:"Xojo (REALbasic)",xquery:"XQuery",yaml:"YAML",yml:"YAML",yang:"YANG"};Prism.plugins.toolbar.registerButton("show-language",function(e){var a=e.element.parentNode;if(a&&/pre/i.test(a.nodeName)){var t,s=a.getAttribute("data-language")||i[e.language]||((t=e.language)?(t.substring(0,1).toUpperCase()+t.substring(1)).replace(/s(?=cript)/,"S"):t);if(s){var o=document.createElement("span");return o.textContent=s,o}}})}else console.warn("Show Languages plugin loaded before Toolbar plugin.")}(); \ No newline at end of file +!function(){if("undefined"!=typeof self&&self.Prism&&self.document)if(Prism.plugins.toolbar){var i={none:"Plain text",plain:"Plain text",plaintext:"Plain text",text:"Plain text",txt:"Plain text",html:"HTML",xml:"XML",svg:"SVG",mathml:"MathML",ssml:"SSML",rss:"RSS",css:"CSS",clike:"C-like",js:"JavaScript",abap:"ABAP",abnf:"ABNF",al:"AL",antlr4:"ANTLR4",g4:"ANTLR4",apacheconf:"Apache Configuration",apl:"APL",aql:"AQL",arff:"ARFF",asciidoc:"AsciiDoc",adoc:"AsciiDoc",aspnet:"ASP.NET (C#)",asm6502:"6502 Assembly",autohotkey:"AutoHotkey",autoit:"AutoIt",basic:"BASIC",bbcode:"BBcode",bnf:"BNF",rbnf:"RBNF",bsl:"BSL (1C:Enterprise)",oscript:"OneScript",csharp:"C#",cs:"C#",dotnet:"C#",cpp:"C++",cfscript:"CFScript",cfc:"CFScript",cil:"CIL",cmake:"CMake",coffee:"CoffeeScript",conc:"Concurnas",csp:"Content-Security-Policy","css-extras":"CSS Extras",csv:"CSV",dataweave:"DataWeave",dax:"DAX",django:"Django/Jinja2",jinja2:"Django/Jinja2","dns-zone-file":"DNS zone file","dns-zone":"DNS zone file",dockerfile:"Docker",dot:"DOT (Graphviz)",gv:"DOT (Graphviz)",ebnf:"EBNF",editorconfig:"EditorConfig",ejs:"EJS",etlua:"Embedded Lua templating",erb:"ERB","excel-formula":"Excel Formula",xlsx:"Excel Formula",xls:"Excel Formula",fsharp:"F#","firestore-security-rules":"Firestore security rules",ftl:"FreeMarker Template Language",gml:"GameMaker Language",gamemakerlanguage:"GameMaker Language",gcode:"G-code",gdscript:"GDScript",gedcom:"GEDCOM",glsl:"GLSL",graphql:"GraphQL",hs:"Haskell",hcl:"HCL",hlsl:"HLSL",http:"HTTP",hpkp:"HTTP Public-Key-Pins",hsts:"HTTP Strict-Transport-Security",ichigojam:"IchigoJam","icu-message-format":"ICU Message Format",idr:"Idris",ignore:".ignore",gitignore:".gitignore",hgignore:".hgignore",npmignore:".npmignore",inform7:"Inform 7",javadoc:"JavaDoc",javadoclike:"JavaDoc-like",javastacktrace:"Java stack trace",jq:"JQ",jsdoc:"JSDoc","js-extras":"JS Extras",json:"JSON",webmanifest:"Web App Manifest",json5:"JSON5",jsonp:"JSONP",jsstacktrace:"JS stack trace","js-templates":"JS Templates",kts:"Kotlin Script",kt:"Kotlin",kumir:"KuMir (КуМир)",kum:"KuMir (КуМир)",latex:"LaTeX",tex:"TeX",context:"ConTeXt",lilypond:"LilyPond",ly:"LilyPond",emacs:"Lisp",elisp:"Lisp","emacs-lisp":"Lisp",llvm:"LLVM IR",log:"Log file",lolcode:"LOLCODE",md:"Markdown","markup-templating":"Markup templating",matlab:"MATLAB",mel:"MEL",mongodb:"MongoDB",moon:"MoonScript",n1ql:"N1QL",n4js:"N4JS",n4jsd:"N4JS","nand2tetris-hdl":"Nand To Tetris HDL",naniscript:"Naninovel Script",nani:"Naninovel Script",nasm:"NASM",neon:"NEON",nginx:"nginx",nsis:"NSIS",objectivec:"Objective-C",objc:"Objective-C",ocaml:"OCaml",opencl:"OpenCL",openqasm:"OpenQasm",qasm:"OpenQasm",parigp:"PARI/GP",objectpascal:"Object Pascal",psl:"PATROL Scripting Language",pcaxis:"PC-Axis",px:"PC-Axis",peoplecode:"PeopleCode",pcode:"PeopleCode",php:"PHP",phpdoc:"PHPDoc","php-extras":"PHP Extras",plsql:"PL/SQL",powerquery:"PowerQuery",pq:"PowerQuery",mscript:"PowerQuery",powershell:"PowerShell",promql:"PromQL",properties:".properties",protobuf:"Protocol Buffers",purebasic:"PureBasic",pbfasm:"PureBasic",purs:"PureScript",py:"Python",q:"Q (kdb+ database)",qml:"QML",rkt:"Racket",jsx:"React JSX",tsx:"React TSX",renpy:"Ren'py",rpy:"Ren'py",rest:"reST (reStructuredText)",robotframework:"Robot Framework",robot:"Robot Framework",rb:"Ruby",sas:"SAS",sass:"Sass (Sass)",scss:"Sass (Scss)","shell-session":"Shell session","sh-session":"Shell session",shellsession:"Shell session",sml:"SML",smlnj:"SML/NJ",solidity:"Solidity (Ethereum)",sol:"Solidity (Ethereum)","solution-file":"Solution file",sln:"Solution file",soy:"Soy (Closure Template)",sparql:"SPARQL",rq:"SPARQL","splunk-spl":"Splunk SPL",sqf:"SQF: Status Quo Function (Arma 3)",sql:"SQL",iecst:"Structured Text (IEC 61131-3)","t4-templating":"T4 templating","t4-cs":"T4 Text Templates (C#)",t4:"T4 Text Templates (C#)","t4-vb":"T4 Text Templates (VB)",tap:"TAP",tt2:"Template Toolkit 2",toml:"TOML",trig:"TriG",ts:"TypeScript",tsconfig:"TSConfig",uscript:"UnrealScript",uc:"UnrealScript",uri:"URI",url:"URL",vbnet:"VB.Net",vhdl:"VHDL",vim:"vim","visual-basic":"Visual Basic",vba:"VBA",vb:"Visual Basic",wasm:"WebAssembly",wiki:"Wiki markup",xeoracube:"XeoraCube","xml-doc":"XML doc (.net)",xojo:"Xojo (REALbasic)",xquery:"XQuery",yaml:"YAML",yml:"YAML",yang:"YANG"};Prism.plugins.toolbar.registerButton("show-language",function(e){var a=e.element.parentNode;if(a&&/pre/i.test(a.nodeName)){var t,s=a.getAttribute("data-language")||i[e.language]||((t=e.language)?(t.substring(0,1).toUpperCase()+t.substring(1)).replace(/s(?=cript)/,"S"):t);if(s){var o=document.createElement("span");return o.textContent=s,o}}})}else console.warn("Show Languages plugin loaded before Toolbar plugin.")}(); \ No newline at end of file diff --git a/tests/languages/log/_discord.test b/tests/languages/log/_discord.test new file mode 100644 index 0000000000..064e815667 --- /dev/null +++ b/tests/languages/log/_discord.test @@ -0,0 +1,420 @@ +[2020-12-07][23:26:36][DEBUG][discord_dispatch::application_manager:195] App started. version="1.10.5" +[2020-12-07][23:26:36][DEBUG][discord_dispatch::application_manager:1030] Searching for applications. install_path=AbsolutePath { path_buf: "C:\\Users\\micha\\AppData\\Local\\DiscordGames" } +[2020-12-07][23:26:36][WARN][discord_dispatch::application_manager:1034] Failed to read install path. path=AbsolutePath { path_buf: "C:\\Users\\micha\\AppData\\Local\\DiscordGames" } error=Os { code: 3, kind: NotFound, message: "Das System kann den angegebenen Pfad nicht finden." } +[2020-12-09][17:25:53][DEBUG][discord_dispatch::application_manager:195] App started. version="1.10.5" +[2020-12-09][17:25:53][DEBUG][discord_dispatch::application_manager:1030] Searching for applications. install_path=AbsolutePath { path_buf: "C:\\Users\\micha\\AppData\\Local\\DiscordGames" } +[2020-12-09][17:25:53][WARN][discord_dispatch::application_manager:1034] Failed to read install path. path=AbsolutePath { path_buf: "C:\\Users\\micha\\AppData\\Local\\DiscordGames" } error=Os { code: 3, kind: NotFound, message: "Das System kann den angegebenen Pfad nicht finden." } +[2020-12-10][12:30:59][DEBUG][discord_dispatch::application_manager:195] App started. version="1.10.5" +[2020-12-10][12:30:59][DEBUG][discord_dispatch::application_manager:1030] Searching for applications. install_path=AbsolutePath { path_buf: "C:\\Users\\micha\\AppData\\Local\\DiscordGames" } +[2020-12-10][12:30:59][WARN][discord_dispatch::application_manager:1034] Failed to read install path. path=AbsolutePath { path_buf: "C:\\Users\\micha\\AppData\\Local\\DiscordGames" } error=Os { code: 3, kind: NotFound, message: "Das System kann den angegebenen Pfad nicht finden." } +[2020-12-10][21:42:22][DEBUG][discord_dispatch::application_manager:195] App started. version="1.10.5" +[2020-12-10][21:42:22][DEBUG][discord_dispatch::application_manager:1030] Searching for applications. install_path=AbsolutePath { path_buf: "C:\\Users\\micha\\AppData\\Local\\DiscordGames" } +[2020-12-10][21:42:22][WARN][discord_dispatch::application_manager:1034] Failed to read install path. path=AbsolutePath { path_buf: "C:\\Users\\micha\\AppData\\Local\\DiscordGames" } error=Os { code: 3, kind: NotFound, message: "Das System kann den angegebenen Pfad nicht finden." } +[2020-12-11][13:05:13][DEBUG][discord_dispatch::application_manager:195] App started. version="1.10.5" + +---------------------------------------------------- + +[ + ["punctuation", "["], + ["date", "2020-12-07"], + ["punctuation", "]"], + ["punctuation", "["], + ["time", "23:26:36"], + ["punctuation", "]"], + ["punctuation", "["], + ["level", "DEBUG"], + ["punctuation", "]"], + ["punctuation", "["], + "discord_dispatch", + ["operator", ":"], + ["operator", ":"], + "application_manager", + ["operator", ":"], + ["number", "195"], + ["punctuation", "]"], + " App started", + ["punctuation", "."], + " version", + ["operator", "="], + ["string", "\"1.10.5\""], + + ["punctuation", "["], + ["date", "2020-12-07"], + ["punctuation", "]"], + ["punctuation", "["], + ["time", "23:26:36"], + ["punctuation", "]"], + ["punctuation", "["], + ["level", "DEBUG"], + ["punctuation", "]"], + ["punctuation", "["], + "discord_dispatch", + ["operator", ":"], + ["operator", ":"], + "application_manager", + ["operator", ":"], + ["number", "1030"], + ["punctuation", "]"], + " Searching for applications", + ["punctuation", "."], + " install_path", + ["operator", "="], + "AbsolutePath ", + ["operator", "{"], + " path_buf", + ["operator", ":"], + ["string", "\"C:\\\\Users\\\\micha\\\\AppData\\\\Local\\\\DiscordGames\""], + ["operator", "}"], + + ["punctuation", "["], + ["date", "2020-12-07"], + ["punctuation", "]"], + ["punctuation", "["], + ["time", "23:26:36"], + ["punctuation", "]"], + ["punctuation", "["], + ["level", "WARN"], + ["punctuation", "]"], + ["punctuation", "["], + "discord_dispatch", + ["operator", ":"], + ["operator", ":"], + "application_manager", + ["operator", ":"], + ["number", "1034"], + ["punctuation", "]"], + " Failed to read install path", + ["punctuation", "."], + " path", + ["operator", "="], + "AbsolutePath ", + ["operator", "{"], + " path_buf", + ["operator", ":"], + ["string", "\"C:\\\\Users\\\\micha\\\\AppData\\\\Local\\\\DiscordGames\""], + ["operator", "}"], + " error", + ["operator", "="], + "Os ", + ["operator", "{"], + " code", + ["operator", ":"], + ["number", "3"], + ["punctuation", ","], + " kind", + ["operator", ":"], + " NotFound", + ["punctuation", ","], + " message", + ["operator", ":"], + ["string", "\"Das System kann den angegebenen Pfad nicht finden.\""], + ["operator", "}"], + + ["punctuation", "["], + ["date", "2020-12-09"], + ["punctuation", "]"], + ["punctuation", "["], + ["time", "17:25:53"], + ["punctuation", "]"], + ["punctuation", "["], + ["level", "DEBUG"], + ["punctuation", "]"], + ["punctuation", "["], + "discord_dispatch", + ["operator", ":"], + ["operator", ":"], + "application_manager", + ["operator", ":"], + ["number", "195"], + ["punctuation", "]"], + " App started", + ["punctuation", "."], + " version", + ["operator", "="], + ["string", "\"1.10.5\""], + + ["punctuation", "["], + ["date", "2020-12-09"], + ["punctuation", "]"], + ["punctuation", "["], + ["time", "17:25:53"], + ["punctuation", "]"], + ["punctuation", "["], + ["level", "DEBUG"], + ["punctuation", "]"], + ["punctuation", "["], + "discord_dispatch", + ["operator", ":"], + ["operator", ":"], + "application_manager", + ["operator", ":"], + ["number", "1030"], + ["punctuation", "]"], + " Searching for applications", + ["punctuation", "."], + " install_path", + ["operator", "="], + "AbsolutePath ", + ["operator", "{"], + " path_buf", + ["operator", ":"], + ["string", "\"C:\\\\Users\\\\micha\\\\AppData\\\\Local\\\\DiscordGames\""], + ["operator", "}"], + + ["punctuation", "["], + ["date", "2020-12-09"], + ["punctuation", "]"], + ["punctuation", "["], + ["time", "17:25:53"], + ["punctuation", "]"], + ["punctuation", "["], + ["level", "WARN"], + ["punctuation", "]"], + ["punctuation", "["], + "discord_dispatch", + ["operator", ":"], + ["operator", ":"], + "application_manager", + ["operator", ":"], + ["number", "1034"], + ["punctuation", "]"], + " Failed to read install path", + ["punctuation", "."], + " path", + ["operator", "="], + "AbsolutePath ", + ["operator", "{"], + " path_buf", + ["operator", ":"], + ["string", "\"C:\\\\Users\\\\micha\\\\AppData\\\\Local\\\\DiscordGames\""], + ["operator", "}"], + " error", + ["operator", "="], + "Os ", + ["operator", "{"], + " code", + ["operator", ":"], + ["number", "3"], + ["punctuation", ","], + " kind", + ["operator", ":"], + " NotFound", + ["punctuation", ","], + " message", + ["operator", ":"], + ["string", "\"Das System kann den angegebenen Pfad nicht finden.\""], + ["operator", "}"], + + ["punctuation", "["], + ["date", "2020-12-10"], + ["punctuation", "]"], + ["punctuation", "["], + ["time", "12:30:59"], + ["punctuation", "]"], + ["punctuation", "["], + ["level", "DEBUG"], + ["punctuation", "]"], + ["punctuation", "["], + "discord_dispatch", + ["operator", ":"], + ["operator", ":"], + "application_manager", + ["operator", ":"], + ["number", "195"], + ["punctuation", "]"], + " App started", + ["punctuation", "."], + " version", + ["operator", "="], + ["string", "\"1.10.5\""], + + ["punctuation", "["], + ["date", "2020-12-10"], + ["punctuation", "]"], + ["punctuation", "["], + ["time", "12:30:59"], + ["punctuation", "]"], + ["punctuation", "["], + ["level", "DEBUG"], + ["punctuation", "]"], + ["punctuation", "["], + "discord_dispatch", + ["operator", ":"], + ["operator", ":"], + "application_manager", + ["operator", ":"], + ["number", "1030"], + ["punctuation", "]"], + " Searching for applications", + ["punctuation", "."], + " install_path", + ["operator", "="], + "AbsolutePath ", + ["operator", "{"], + " path_buf", + ["operator", ":"], + ["string", "\"C:\\\\Users\\\\micha\\\\AppData\\\\Local\\\\DiscordGames\""], + ["operator", "}"], + + ["punctuation", "["], + ["date", "2020-12-10"], + ["punctuation", "]"], + ["punctuation", "["], + ["time", "12:30:59"], + ["punctuation", "]"], + ["punctuation", "["], + ["level", "WARN"], + ["punctuation", "]"], + ["punctuation", "["], + "discord_dispatch", + ["operator", ":"], + ["operator", ":"], + "application_manager", + ["operator", ":"], + ["number", "1034"], + ["punctuation", "]"], + " Failed to read install path", + ["punctuation", "."], + " path", + ["operator", "="], + "AbsolutePath ", + ["operator", "{"], + " path_buf", + ["operator", ":"], + ["string", "\"C:\\\\Users\\\\micha\\\\AppData\\\\Local\\\\DiscordGames\""], + ["operator", "}"], + " error", + ["operator", "="], + "Os ", + ["operator", "{"], + " code", + ["operator", ":"], + ["number", "3"], + ["punctuation", ","], + " kind", + ["operator", ":"], + " NotFound", + ["punctuation", ","], + " message", + ["operator", ":"], + ["string", "\"Das System kann den angegebenen Pfad nicht finden.\""], + ["operator", "}"], + + ["punctuation", "["], + ["date", "2020-12-10"], + ["punctuation", "]"], + ["punctuation", "["], + ["time", "21:42:22"], + ["punctuation", "]"], + ["punctuation", "["], + ["level", "DEBUG"], + ["punctuation", "]"], + ["punctuation", "["], + "discord_dispatch", + ["operator", ":"], + ["operator", ":"], + "application_manager", + ["operator", ":"], + ["number", "195"], + ["punctuation", "]"], + " App started", + ["punctuation", "."], + " version", + ["operator", "="], + ["string", "\"1.10.5\""], + + ["punctuation", "["], + ["date", "2020-12-10"], + ["punctuation", "]"], + ["punctuation", "["], + ["time", "21:42:22"], + ["punctuation", "]"], + ["punctuation", "["], + ["level", "DEBUG"], + ["punctuation", "]"], + ["punctuation", "["], + "discord_dispatch", + ["operator", ":"], + ["operator", ":"], + "application_manager", + ["operator", ":"], + ["number", "1030"], + ["punctuation", "]"], + " Searching for applications", + ["punctuation", "."], + " install_path", + ["operator", "="], + "AbsolutePath ", + ["operator", "{"], + " path_buf", + ["operator", ":"], + ["string", "\"C:\\\\Users\\\\micha\\\\AppData\\\\Local\\\\DiscordGames\""], + ["operator", "}"], + + ["punctuation", "["], + ["date", "2020-12-10"], + ["punctuation", "]"], + ["punctuation", "["], + ["time", "21:42:22"], + ["punctuation", "]"], + ["punctuation", "["], + ["level", "WARN"], + ["punctuation", "]"], + ["punctuation", "["], + "discord_dispatch", + ["operator", ":"], + ["operator", ":"], + "application_manager", + ["operator", ":"], + ["number", "1034"], + ["punctuation", "]"], + " Failed to read install path", + ["punctuation", "."], + " path", + ["operator", "="], + "AbsolutePath ", + ["operator", "{"], + " path_buf", + ["operator", ":"], + ["string", "\"C:\\\\Users\\\\micha\\\\AppData\\\\Local\\\\DiscordGames\""], + ["operator", "}"], + " error", + ["operator", "="], + "Os ", + ["operator", "{"], + " code", + ["operator", ":"], + ["number", "3"], + ["punctuation", ","], + " kind", + ["operator", ":"], + " NotFound", + ["punctuation", ","], + " message", + ["operator", ":"], + ["string", "\"Das System kann den angegebenen Pfad nicht finden.\""], + ["operator", "}"], + + ["punctuation", "["], + ["date", "2020-12-11"], + ["punctuation", "]"], + ["punctuation", "["], + ["time", "13:05:13"], + ["punctuation", "]"], + ["punctuation", "["], + ["level", "DEBUG"], + ["punctuation", "]"], + ["punctuation", "["], + "discord_dispatch", + ["operator", ":"], + ["operator", ":"], + "application_manager", + ["operator", ":"], + ["number", "195"], + ["punctuation", "]"], + " App started", + ["punctuation", "."], + " version", + ["operator", "="], + ["string", "\"1.10.5\""] +] \ No newline at end of file diff --git a/tests/languages/log/_docker.test b/tests/languages/log/_docker.test new file mode 100644 index 0000000000..ff5b5fd552 --- /dev/null +++ b/tests/languages/log/_docker.test @@ -0,0 +1,335 @@ +2021-01-12T13:38:16Z containerd time="2021-01-12T13:38:16.314696100Z" level=info msg="starting containerd" revision=269548fa27e0089a8b8278fc4fc781d7f65a939b version=v1.4.3 +2021-01-12T13:38:16Z containerd time="2021-01-12T13:38:16.314743500Z" level=debug msg="changing OOM score to -500" +2021-01-12T13:38:16Z containerd time="2021-01-12T13:38:16.336716900Z" level=info msg="loading plugin \"io.containerd.content.v1.content\"..." type=io.containerd.content.v1 +2021-01-12T13:38:16Z containerd time="2021-01-12T13:38:16.336891100Z" level=info msg="loading plugin \"io.containerd.snapshotter.v1.aufs\"..." type=io.containerd.snapshotter.v1 +2021-01-12T13:38:16Z containerd time="2021-01-12T13:38:16.338482500Z" level=info msg="skip loading plugin \"io.containerd.snapshotter.v1.aufs\"..." error="aufs is not supported (modprobe aufs failed: exit status 1 \"modprobe: can't change directory to '4.19.128-microsoft-standard': No such file or directory\\n\"): skip plugin" type=io.containerd.snapshotter.v1 +2021-01-12T13:38:16Z containerd time="2021-01-12T13:38:16.338523700Z" level=info msg="loading plugin \"io.containerd.snapshotter.v1.btrfs\"..." type=io.containerd.snapshotter.v1 +2021-01-12T13:38:16Z containerd time="2021-01-12T13:38:16.338835400Z" level=info msg="skip loading plugin \"io.containerd.snapshotter.v1.btrfs\"..." error="path /var/lib/desktop-containerd/daemon/io.containerd.snapshotter.v1.btrfs (ext4) must be a btrfs filesystem to be used with the btrfs snapshotter: skip plugin" type=io.containerd.snapshotter.v1 + +2021-03-05T17:58:29Z kmsg (977696) - 2021-03-05T17:58:28.2836488Z: init: (141) ERROR: StartHostListener:356: write failed 32 +2021-03-05T17:58:30Z kmsg (977697) - 2021-03-05T17:58:29.2863708Z: init: (141) ERROR: StartHostListener:356: write failed 32 +2021-03-05T17:58:31Z kmsg (977698) - 2021-03-05T17:58:30.2888998Z: init: (141) ERROR: StartHostListener:356: write failed 32 +2021-03-05T17:58:32Z kmsg (977699) - 2021-03-05T17:58:31.2917718Z: init: (141) ERROR: StartHostListener:356: write failed 32 +2021-03-05T17:58:33Z kmsg (977700) - 2021-03-05T17:58:32.2944488Z: init: (141) ERROR: StartHostListener:356: write failed 32 +2021-03-05T17:58:34Z kmsg (977701) - 2021-03-05T17:58:33.2979438Z: init: (141) ERROR: StartHostListener:356: write failed 32 + +time="2021-01-12T14:38:11+01:00" level=info msg="🍀 socket server listening : \\\\.\\pipe\\dockerGuiToDriver" +time="2021-01-12T14:38:13+01:00" level=info msg="NewSharer: WSL2 engine is enabled so no file sharer is required." +time="2021-01-12T14:38:13+01:00" level=info msg=waitForDockerUp +time="2021-01-12T14:38:13+01:00" level=info msg="🍀 socket server starting : \\\\.\\pipe\\dockerGuiToDriver" + +---------------------------------------------------- + +[ + ["date", "2021-01-12T"], + ["time", "13:38:16Z"], + " containerd time", + ["operator", "="], + ["string", "\"2021-01-12T13:38:16.314696100Z\""], + " level", + ["operator", "="], + "info msg", + ["operator", "="], + ["string", "\"starting containerd\""], + " revision", + ["operator", "="], + ["number", "269548fa27e0089a8b8278fc4fc781d7f65a939b"], + " version", + ["operator", "="], + ["number", "v1.4.3"], + + ["date", "2021-01-12T"], + ["time", "13:38:16Z"], + " containerd time", + ["operator", "="], + ["string", "\"2021-01-12T13:38:16.314743500Z\""], + " level", + ["operator", "="], + "debug msg", + ["operator", "="], + ["string", "\"changing OOM score to -500\""], + + ["date", "2021-01-12T"], + ["time", "13:38:16Z"], + " containerd time", + ["operator", "="], + ["string", "\"2021-01-12T13:38:16.336716900Z\""], + " level", + ["operator", "="], + "info msg", + ["operator", "="], + ["string", "\"loading plugin \\\"io.containerd.content.v1.content\\\"...\""], + " type", + ["operator", "="], + "io", + ["punctuation", "."], + "containerd", + ["punctuation", "."], + "content", + ["punctuation", "."], + "v1\r\n", + + ["date", "2021-01-12T"], + ["time", "13:38:16Z"], + " containerd time", + ["operator", "="], + ["string", "\"2021-01-12T13:38:16.336891100Z\""], + " level", + ["operator", "="], + "info msg", + ["operator", "="], + ["string", "\"loading plugin \\\"io.containerd.snapshotter.v1.aufs\\\"...\""], + " type", + ["operator", "="], + "io", + ["punctuation", "."], + "containerd", + ["punctuation", "."], + "snapshotter", + ["punctuation", "."], + "v1\r\n", + + ["date", "2021-01-12T"], + ["time", "13:38:16Z"], + " containerd time", + ["operator", "="], + ["string", "\"2021-01-12T13:38:16.338482500Z\""], + " level", + ["operator", "="], + "info msg", + ["operator", "="], + ["string", "\"skip loading plugin \\\"io.containerd.snapshotter.v1.aufs\\\"...\""], + " error", + ["operator", "="], + ["string", "\"aufs is not supported (modprobe aufs failed: exit status 1 \\\"modprobe: can't change directory to '4.19.128-microsoft-standard': No such file or directory\\\\n\\\"): skip plugin\""], + " type", + ["operator", "="], + "io", + ["punctuation", "."], + "containerd", + ["punctuation", "."], + "snapshotter", + ["punctuation", "."], + "v1\r\n", + + ["date", "2021-01-12T"], + ["time", "13:38:16Z"], + " containerd time", + ["operator", "="], + ["string", "\"2021-01-12T13:38:16.338523700Z\""], + " level", + ["operator", "="], + "info msg", + ["operator", "="], + ["string", "\"loading plugin \\\"io.containerd.snapshotter.v1.btrfs\\\"...\""], + " type", + ["operator", "="], + "io", + ["punctuation", "."], + "containerd", + ["punctuation", "."], + "snapshotter", + ["punctuation", "."], + "v1\r\n", + + ["date", "2021-01-12T"], + ["time", "13:38:16Z"], + " containerd time", + ["operator", "="], + ["string", "\"2021-01-12T13:38:16.338835400Z\""], + " level", + ["operator", "="], + "info msg", + ["operator", "="], + ["string", "\"skip loading plugin \\\"io.containerd.snapshotter.v1.btrfs\\\"...\""], + " error", + ["operator", "="], + ["string", "\"path /var/lib/desktop-containerd/daemon/io.containerd.snapshotter.v1.btrfs (ext4) must be a btrfs filesystem to be used with the btrfs snapshotter: skip plugin\""], + " type", + ["operator", "="], + "io", + ["punctuation", "."], + "containerd", + ["punctuation", "."], + "snapshotter", + ["punctuation", "."], + "v1\r\n\r\n", + + ["date", "2021-03-05T"], + ["time", "17:58:29Z"], + " kmsg ", + ["operator", "("], + ["number", "977696"], + ["operator", ")"], + ["operator", "-"], + ["date", "2021-03-05T"], + ["time", "17:58:28.2836488Z"], + ["operator", ":"], + " init", + ["operator", ":"], + ["operator", "("], + ["number", "141"], + ["operator", ")"], + ["level", "ERROR"], + ["operator", ":"], + " StartHostListener", + ["operator", ":"], + ["number", "356"], + ["operator", ":"], + " write failed ", + ["number", "32"], + + ["date", "2021-03-05T"], + ["time", "17:58:30Z"], + " kmsg ", + ["operator", "("], + ["number", "977697"], + ["operator", ")"], + ["operator", "-"], + ["date", "2021-03-05T"], + ["time", "17:58:29.2863708Z"], + ["operator", ":"], + " init", + ["operator", ":"], + ["operator", "("], + ["number", "141"], + ["operator", ")"], + ["level", "ERROR"], + ["operator", ":"], + " StartHostListener", + ["operator", ":"], + ["number", "356"], + ["operator", ":"], + " write failed ", + ["number", "32"], + + ["date", "2021-03-05T"], + ["time", "17:58:31Z"], + " kmsg ", + ["operator", "("], + ["number", "977698"], + ["operator", ")"], + ["operator", "-"], + ["date", "2021-03-05T"], + ["time", "17:58:30.2888998Z"], + ["operator", ":"], + " init", + ["operator", ":"], + ["operator", "("], + ["number", "141"], + ["operator", ")"], + ["level", "ERROR"], + ["operator", ":"], + " StartHostListener", + ["operator", ":"], + ["number", "356"], + ["operator", ":"], + " write failed ", + ["number", "32"], + + ["date", "2021-03-05T"], + ["time", "17:58:32Z"], + " kmsg ", + ["operator", "("], + ["number", "977699"], + ["operator", ")"], + ["operator", "-"], + ["date", "2021-03-05T"], + ["time", "17:58:31.2917718Z"], + ["operator", ":"], + " init", + ["operator", ":"], + ["operator", "("], + ["number", "141"], + ["operator", ")"], + ["level", "ERROR"], + ["operator", ":"], + " StartHostListener", + ["operator", ":"], + ["number", "356"], + ["operator", ":"], + " write failed ", + ["number", "32"], + + ["date", "2021-03-05T"], + ["time", "17:58:33Z"], + " kmsg ", + ["operator", "("], + ["number", "977700"], + ["operator", ")"], + ["operator", "-"], + ["date", "2021-03-05T"], + ["time", "17:58:32.2944488Z"], + ["operator", ":"], + " init", + ["operator", ":"], + ["operator", "("], + ["number", "141"], + ["operator", ")"], + ["level", "ERROR"], + ["operator", ":"], + " StartHostListener", + ["operator", ":"], + ["number", "356"], + ["operator", ":"], + " write failed ", + ["number", "32"], + + ["date", "2021-03-05T"], + ["time", "17:58:34Z"], + " kmsg ", + ["operator", "("], + ["number", "977701"], + ["operator", ")"], + ["operator", "-"], + ["date", "2021-03-05T"], + ["time", "17:58:33.2979438Z"], + ["operator", ":"], + " init", + ["operator", ":"], + ["operator", "("], + ["number", "141"], + ["operator", ")"], + ["level", "ERROR"], + ["operator", ":"], + " StartHostListener", + ["operator", ":"], + ["number", "356"], + ["operator", ":"], + " write failed ", + ["number", "32"], + + "\r\n\r\ntime", + ["operator", "="], + ["string", "\"2021-01-12T14:38:11+01:00\""], + " level", + ["operator", "="], + "info msg", + ["operator", "="], + ["string", "\"🍀 socket server listening : \\\\\\\\.\\\\pipe\\\\dockerGuiToDriver\""], + + "\r\ntime", + ["operator", "="], + ["string", "\"2021-01-12T14:38:13+01:00\""], + " level", + ["operator", "="], + "info msg", + ["operator", "="], + ["string", "\"NewSharer: WSL2 engine is enabled so no file sharer is required.\""], + + "\r\ntime", + ["operator", "="], + ["string", "\"2021-01-12T14:38:13+01:00\""], + " level", + ["operator", "="], + "info msg", + ["operator", "="], + "waitForDockerUp\r\ntime", + ["operator", "="], + ["string", "\"2021-01-12T14:38:13+01:00\""], + " level", + ["operator", "="], + "info msg", + ["operator", "="], + ["string", "\"🍀 socket server starting : \\\\\\\\.\\\\pipe\\\\dockerGuiToDriver\""] +] \ No newline at end of file diff --git a/tests/languages/log/_java_stack_trace.test b/tests/languages/log/_java_stack_trace.test new file mode 100644 index 0000000000..2b974a8b9b --- /dev/null +++ b/tests/languages/log/_java_stack_trace.test @@ -0,0 +1,762 @@ +java.net.BindException: Address already in use + at sun.nio.ch.Net.bind0(Native Method) ~[na:1.8.0_171] + at sun.nio.ch.Net.bind(Net.java:433) ~[na:1.8.0_171] + at sun.nio.ch.Net.bind(Net.java:425) ~[na:1.8.0_171] + at sun.nio.ch.ServeISocketChannelImpl.bind(ServerSocketChannellmpl.java:223) ~[na:1.8.0_171] + +org.apache.maven.lifecycle.LifecycleExecutionException: Error installing artifact's metadata: Error while deploying metadata: Failed to transfer file: http://repo.xxxx.com/foo/bar.pom. Return code is: 500 + at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:564) + at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:480) + at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:459) + at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:311) + at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:278) + at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:143) + at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334) + at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125) + at org.apache.maven.cli.MavenCli.main(MavenCli.java:280) + at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) + at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) + at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) + at java.lang.reflect.Method.invoke(Method.java:585) + at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) + at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) + at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430) + at org.codehaus.classworlds.Launcher.main(Launcher.java:375) +Caused by: org.apache.maven.plugin.MojoExecutionException: Error installing artifact's metadata: Error while deploying metadata: Failed to transfer file: http://repo.xxxx.com/foo/bar.pom. Return code is: 500 + at org.apache.maven.plugin.deploy.DeployMojo.execute(DeployMojo.java:174) + at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:443) + at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:539) + ... 16 more +Caused by: org.apache.maven.artifact.deployer.ArtifactDeploymentException: Error installing artifact's metadata: Error while deploying metadata: Failed to transfer file: http://repo.xxxx.com/foo/bar.pom. Return code is: 500 + at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:102) + at org.apache.maven.plugin.deploy.DeployMojo.execute(DeployMojo.java:162) + ... 18 more +Caused by: org.apache.maven.artifact.repository.metadata.RepositoryMetadataDeploymentException: Error while deploying metadata: Failed to transfer file: http://repo.xxxx.com/foo/bar.pom. Return code is: 500 + at org.apache.maven.artifact.repository.metadata.DefaultRepositoryMetadataManager.deploy(DefaultRepositoryMetadataManager.java:441) + at org.apache.maven.artifact.deployer.DefaultArtifactDeployer.deploy(DefaultArtifactDeployer.java:86) + ... 19 more +Caused by: org.apache.maven.wagon.TransferFailedException: Failed to transfer file: http://repo.xxxx.com/foo/bar.pom. Return code is: 500 + at org.apache.maven.wagon.providers.http.LightweightHttpWagon.put(LightweightHttpWagon.java:172) + at org.apache.maven.artifact.manager.DefaultWagonManager.putRemoteFile(DefaultWagonManager.java:237) + at org.apache.maven.artifact.manager.DefaultWagonManager.putArtifactMetadata(DefaultWagonManager.java:162) + at org.apache.maven.artifact.repository.metadata.DefaultRepositoryMetadataManager.deploy(DefaultRepositoryMetadataManager.java:437) + ... 20 more + +---------------------------------------------------- + +[ + ["property", "java.net.BindException:"], + " Address already in use\r\n\tat sun", + ["punctuation", "."], + "nio", + ["punctuation", "."], + "ch", + ["punctuation", "."], + "Net", + ["punctuation", "."], + "bind0", + ["operator", "("], + "Native Method", + ["operator", ")"], + ["operator", "~"], + ["punctuation", "["], + "na", + ["operator", ":"], + "1", + ["punctuation", "."], + "8", + ["punctuation", "."], + "0_171", + ["punctuation", "]"], + + "\r\n\tat sun", + ["punctuation", "."], + "nio", + ["punctuation", "."], + "ch", + ["punctuation", "."], + "Net", + ["punctuation", "."], + "bind", + ["operator", "("], + "Net", + ["punctuation", "."], + "java", + ["operator", ":"], + ["number", "433"], + ["operator", ")"], + ["operator", "~"], + ["punctuation", "["], + "na", + ["operator", ":"], + "1", + ["punctuation", "."], + "8", + ["punctuation", "."], + "0_171", + ["punctuation", "]"], + + "\r\n\tat sun", + ["punctuation", "."], + "nio", + ["punctuation", "."], + "ch", + ["punctuation", "."], + "Net", + ["punctuation", "."], + "bind", + ["operator", "("], + "Net", + ["punctuation", "."], + "java", + ["operator", ":"], + ["number", "425"], + ["operator", ")"], + ["operator", "~"], + ["punctuation", "["], + "na", + ["operator", ":"], + "1", + ["punctuation", "."], + "8", + ["punctuation", "."], + "0_171", + ["punctuation", "]"], + + "\r\n\tat sun", + ["punctuation", "."], + "nio", + ["punctuation", "."], + "ch", + ["punctuation", "."], + "ServeISocketChannelImpl", + ["punctuation", "."], + "bind", + ["operator", "("], + "ServerSocketChannellmpl", + ["punctuation", "."], + "java", + ["operator", ":"], + ["number", "223"], + ["operator", ")"], + ["operator", "~"], + ["punctuation", "["], + "na", + ["operator", ":"], + "1", + ["punctuation", "."], + "8", + ["punctuation", "."], + "0_171", + ["punctuation", "]"], + + ["property", "org.apache.maven.lifecycle.LifecycleExecutionException:"], + " Error installing artifact's metadata", + ["operator", ":"], + " Error while deploying metadata", + ["operator", ":"], + " Failed to transfer file", + ["operator", ":"], + ["url", "http://repo.xxxx.com/foo/bar.pom"], + ["punctuation", "."], + " Return code is", + ["operator", ":"], + ["number", "500"], + + "\r\n at org", + ["punctuation", "."], + "apache", + ["punctuation", "."], + "maven", + ["punctuation", "."], + "lifecycle", + ["punctuation", "."], + "DefaultLifecycleExecutor", + ["punctuation", "."], + "executeGoals", + ["operator", "("], + "DefaultLifecycleExecutor", + ["punctuation", "."], + "java", + ["operator", ":"], + ["number", "564"], + ["operator", ")"], + + "\r\n at org", + ["punctuation", "."], + "apache", + ["punctuation", "."], + "maven", + ["punctuation", "."], + "lifecycle", + ["punctuation", "."], + "DefaultLifecycleExecutor", + ["punctuation", "."], + "executeGoalWithLifecycle", + ["operator", "("], + "DefaultLifecycleExecutor", + ["punctuation", "."], + "java", + ["operator", ":"], + ["number", "480"], + ["operator", ")"], + + "\r\n at org", + ["punctuation", "."], + "apache", + ["punctuation", "."], + "maven", + ["punctuation", "."], + "lifecycle", + ["punctuation", "."], + "DefaultLifecycleExecutor", + ["punctuation", "."], + "executeGoal", + ["operator", "("], + "DefaultLifecycleExecutor", + ["punctuation", "."], + "java", + ["operator", ":"], + ["number", "459"], + ["operator", ")"], + + "\r\n at org", + ["punctuation", "."], + "apache", + ["punctuation", "."], + "maven", + ["punctuation", "."], + "lifecycle", + ["punctuation", "."], + "DefaultLifecycleExecutor", + ["punctuation", "."], + "executeGoalAndHandleFailures", + ["operator", "("], + "DefaultLifecycleExecutor", + ["punctuation", "."], + "java", + ["operator", ":"], + ["number", "311"], + ["operator", ")"], + + "\r\n at org", + ["punctuation", "."], + "apache", + ["punctuation", "."], + "maven", + ["punctuation", "."], + "lifecycle", + ["punctuation", "."], + "DefaultLifecycleExecutor", + ["punctuation", "."], + "executeTaskSegments", + ["operator", "("], + "DefaultLifecycleExecutor", + ["punctuation", "."], + "java", + ["operator", ":"], + ["number", "278"], + ["operator", ")"], + + "\r\n at org", + ["punctuation", "."], + "apache", + ["punctuation", "."], + "maven", + ["punctuation", "."], + "lifecycle", + ["punctuation", "."], + "DefaultLifecycleExecutor", + ["punctuation", "."], + "execute", + ["operator", "("], + "DefaultLifecycleExecutor", + ["punctuation", "."], + "java", + ["operator", ":"], + ["number", "143"], + ["operator", ")"], + + "\r\n at org", + ["punctuation", "."], + "apache", + ["punctuation", "."], + "maven", + ["punctuation", "."], + "DefaultMaven", + ["punctuation", "."], + "doExecute", + ["operator", "("], + "DefaultMaven", + ["punctuation", "."], + "java", + ["operator", ":"], + ["number", "334"], + ["operator", ")"], + + "\r\n at org", + ["punctuation", "."], + "apache", + ["punctuation", "."], + "maven", + ["punctuation", "."], + "DefaultMaven", + ["punctuation", "."], + "execute", + ["operator", "("], + "DefaultMaven", + ["punctuation", "."], + "java", + ["operator", ":"], + ["number", "125"], + ["operator", ")"], + + "\r\n at org", + ["punctuation", "."], + "apache", + ["punctuation", "."], + "maven", + ["punctuation", "."], + "cli", + ["punctuation", "."], + "MavenCli", + ["punctuation", "."], + "main", + ["operator", "("], + "MavenCli", + ["punctuation", "."], + "java", + ["operator", ":"], + ["number", "280"], + ["operator", ")"], + + "\r\n at sun", + ["punctuation", "."], + "reflect", + ["punctuation", "."], + "NativeMethodAccessorImpl", + ["punctuation", "."], + "invoke0", + ["operator", "("], + "Native Method", + ["operator", ")"], + + "\r\n at sun", + ["punctuation", "."], + "reflect", + ["punctuation", "."], + "NativeMethodAccessorImpl", + ["punctuation", "."], + "invoke", + ["operator", "("], + "NativeMethodAccessorImpl", + ["punctuation", "."], + "java", + ["operator", ":"], + ["number", "39"], + ["operator", ")"], + + "\r\n at sun", + ["punctuation", "."], + "reflect", + ["punctuation", "."], + "DelegatingMethodAccessorImpl", + ["punctuation", "."], + "invoke", + ["operator", "("], + "DelegatingMethodAccessorImpl", + ["punctuation", "."], + "java", + ["operator", ":"], + ["number", "25"], + ["operator", ")"], + + "\r\n at java", + ["punctuation", "."], + "lang", + ["punctuation", "."], + "reflect", + ["punctuation", "."], + "Method", + ["punctuation", "."], + "invoke", + ["operator", "("], + "Method", + ["punctuation", "."], + "java", + ["operator", ":"], + ["number", "585"], + ["operator", ")"], + + "\r\n at org", + ["punctuation", "."], + "codehaus", + ["punctuation", "."], + "classworlds", + ["punctuation", "."], + "Launcher", + ["punctuation", "."], + "launchEnhanced", + ["operator", "("], + "Launcher", + ["punctuation", "."], + "java", + ["operator", ":"], + ["number", "315"], + ["operator", ")"], + + "\r\n at org", + ["punctuation", "."], + "codehaus", + ["punctuation", "."], + "classworlds", + ["punctuation", "."], + "Launcher", + ["punctuation", "."], + "launch", + ["operator", "("], + "Launcher", + ["punctuation", "."], + "java", + ["operator", ":"], + ["number", "255"], + ["operator", ")"], + + "\r\n at org", + ["punctuation", "."], + "codehaus", + ["punctuation", "."], + "classworlds", + ["punctuation", "."], + "Launcher", + ["punctuation", "."], + "mainWithExitCode", + ["operator", "("], + "Launcher", + ["punctuation", "."], + "java", + ["operator", ":"], + ["number", "430"], + ["operator", ")"], + + "\r\n at org", + ["punctuation", "."], + "codehaus", + ["punctuation", "."], + "classworlds", + ["punctuation", "."], + "Launcher", + ["punctuation", "."], + "main", + ["operator", "("], + "Launcher", + ["punctuation", "."], + "java", + ["operator", ":"], + ["number", "375"], + ["operator", ")"], + + ["property", "Caused by:"], + ["property", "org.apache.maven.plugin.MojoExecutionException:"], + " Error installing artifact's metadata", + ["operator", ":"], + " Error while deploying metadata", + ["operator", ":"], + " Failed to transfer file", + ["operator", ":"], + ["url", "http://repo.xxxx.com/foo/bar.pom"], + ["punctuation", "."], + " Return code is", + ["operator", ":"], + ["number", "500"], + + "\r\n at org", + ["punctuation", "."], + "apache", + ["punctuation", "."], + "maven", + ["punctuation", "."], + "plugin", + ["punctuation", "."], + "deploy", + ["punctuation", "."], + "DeployMojo", + ["punctuation", "."], + "execute", + ["operator", "("], + "DeployMojo", + ["punctuation", "."], + "java", + ["operator", ":"], + ["number", "174"], + ["operator", ")"], + + "\r\n at org", + ["punctuation", "."], + "apache", + ["punctuation", "."], + "maven", + ["punctuation", "."], + "plugin", + ["punctuation", "."], + "DefaultPluginManager", + ["punctuation", "."], + "executeMojo", + ["operator", "("], + "DefaultPluginManager", + ["punctuation", "."], + "java", + ["operator", ":"], + ["number", "443"], + ["operator", ")"], + + "\r\n at org", + ["punctuation", "."], + "apache", + ["punctuation", "."], + "maven", + ["punctuation", "."], + "lifecycle", + ["punctuation", "."], + "DefaultLifecycleExecutor", + ["punctuation", "."], + "executeGoals", + ["operator", "("], + "DefaultLifecycleExecutor", + ["punctuation", "."], + "java", + ["operator", ":"], + ["number", "539"], + ["operator", ")"], + + ["punctuation", "."], + ["punctuation", "."], + ["punctuation", "."], + ["number", "16"], + " more\r\n", + + ["property", "Caused by:"], + ["property", "org.apache.maven.artifact.deployer.ArtifactDeploymentException:"], + " Error installing artifact's metadata", + ["operator", ":"], + " Error while deploying metadata", + ["operator", ":"], + " Failed to transfer file", + ["operator", ":"], + ["url", "http://repo.xxxx.com/foo/bar.pom"], + ["punctuation", "."], + " Return code is", + ["operator", ":"], + ["number", "500"], + + "\r\n at org", + ["punctuation", "."], + "apache", + ["punctuation", "."], + "maven", + ["punctuation", "."], + "artifact", + ["punctuation", "."], + "deployer", + ["punctuation", "."], + "DefaultArtifactDeployer", + ["punctuation", "."], + "deploy", + ["operator", "("], + "DefaultArtifactDeployer", + ["punctuation", "."], + "java", + ["operator", ":"], + ["number", "102"], + ["operator", ")"], + + "\r\n at org", + ["punctuation", "."], + "apache", + ["punctuation", "."], + "maven", + ["punctuation", "."], + "plugin", + ["punctuation", "."], + "deploy", + ["punctuation", "."], + "DeployMojo", + ["punctuation", "."], + "execute", + ["operator", "("], + "DeployMojo", + ["punctuation", "."], + "java", + ["operator", ":"], + ["number", "162"], + ["operator", ")"], + + ["punctuation", "."], + ["punctuation", "."], + ["punctuation", "."], + ["number", "18"], + " more\r\n", + + ["property", "Caused by:"], + ["property", "org.apache.maven.artifact.repository.metadata.RepositoryMetadataDeploymentException:"], + ["property", "Error while deploying metadata:"], + ["property", "Failed to transfer file:"], + ["url", "http://repo.xxxx.com/foo/bar.pom"], + ["punctuation", "."], + " Return code is", + ["operator", ":"], + ["number", "500"], + + "\r\n at org", + ["punctuation", "."], + "apache", + ["punctuation", "."], + "maven", + ["punctuation", "."], + "artifact", + ["punctuation", "."], + "repository", + ["punctuation", "."], + "metadata", + ["punctuation", "."], + "DefaultRepositoryMetadataManager", + ["punctuation", "."], + "deploy", + ["operator", "("], + "DefaultRepositoryMetadataManager", + ["punctuation", "."], + "java", + ["operator", ":"], + ["number", "441"], + ["operator", ")"], + + "\r\n at org", + ["punctuation", "."], + "apache", + ["punctuation", "."], + "maven", + ["punctuation", "."], + "artifact", + ["punctuation", "."], + "deployer", + ["punctuation", "."], + "DefaultArtifactDeployer", + ["punctuation", "."], + "deploy", + ["operator", "("], + "DefaultArtifactDeployer", + ["punctuation", "."], + "java", + ["operator", ":"], + ["number", "86"], + ["operator", ")"], + + ["punctuation", "."], + ["punctuation", "."], + ["punctuation", "."], + ["number", "19"], + " more\r\n", + + ["property", "Caused by:"], + ["property", "org.apache.maven.wagon.TransferFailedException:"], + ["property", "Failed to transfer file:"], + ["url", "http://repo.xxxx.com/foo/bar.pom"], + ["punctuation", "."], + " Return code is", + ["operator", ":"], + ["number", "500"], + + "\r\n at org", + ["punctuation", "."], + "apache", + ["punctuation", "."], + "maven", + ["punctuation", "."], + "wagon", + ["punctuation", "."], + "providers", + ["punctuation", "."], + "http", + ["punctuation", "."], + "LightweightHttpWagon", + ["punctuation", "."], + "put", + ["operator", "("], + "LightweightHttpWagon", + ["punctuation", "."], + "java", + ["operator", ":"], + ["number", "172"], + ["operator", ")"], + + "\r\n at org", + ["punctuation", "."], + "apache", + ["punctuation", "."], + "maven", + ["punctuation", "."], + "artifact", + ["punctuation", "."], + "manager", + ["punctuation", "."], + "DefaultWagonManager", + ["punctuation", "."], + "putRemoteFile", + ["operator", "("], + "DefaultWagonManager", + ["punctuation", "."], + "java", + ["operator", ":"], + ["number", "237"], + ["operator", ")"], + + "\r\n at org", + ["punctuation", "."], + "apache", + ["punctuation", "."], + "maven", + ["punctuation", "."], + "artifact", + ["punctuation", "."], + "manager", + ["punctuation", "."], + "DefaultWagonManager", + ["punctuation", "."], + "putArtifactMetadata", + ["operator", "("], + "DefaultWagonManager", + ["punctuation", "."], + "java", + ["operator", ":"], + ["number", "162"], + ["operator", ")"], + + "\r\n at org", + ["punctuation", "."], + "apache", + ["punctuation", "."], + "maven", + ["punctuation", "."], + "artifact", + ["punctuation", "."], + "repository", + ["punctuation", "."], + "metadata", + ["punctuation", "."], + "DefaultRepositoryMetadataManager", + ["punctuation", "."], + "deploy", + ["operator", "("], + "DefaultRepositoryMetadataManager", + ["punctuation", "."], + "java", + ["operator", ":"], + ["number", "437"], + ["operator", ")"], + + ["punctuation", "."], + ["punctuation", "."], + ["punctuation", "."], + ["number", "20"], + " more" +] \ No newline at end of file diff --git a/tests/languages/log/_minecraft.test b/tests/languages/log/_minecraft.test new file mode 100644 index 0000000000..9c388d5508 --- /dev/null +++ b/tests/languages/log/_minecraft.test @@ -0,0 +1,419 @@ +[07:28:17] [Server thread/INFO] [net.minecraft.server.dedicated.DedicatedServer]: Starting minecraft server version 1.12.2 +[07:28:17] [Server thread/INFO] [FML]: MinecraftForge v14.23.5.2847 Initialized +[07:28:17] [Server thread/INFO] [FML]: Starts to replace vanilla recipe ingredients with ore ingredients. +[07:28:18] [Server thread/INFO] [FML]: Invalid recipe found with multiple oredict ingredients in the same ingredient... +[07:28:19] [Server thread/INFO] [FML]: Replaced 1227 ore ingredients +[07:28:19] [Server thread/INFO] [FML]: Searching /home/minecraft/multicraft/servers/server99505/./mods for mods +[07:28:21] [Server thread/INFO] [FML]: Forge Mod Loader has identified 5 mods to load +[07:28:21] [Server thread/WARN] [FML]: Missing English translation for FML: assets/fml/lang/en_us.lang +[07:28:21] [Server thread/FATAL] [FML]: net.minecraftforge.fml.common.MissingModsException: Mod thaumcraft (Thaumcraft) requires [baubles@[1.5.2,)] +[07:28:21] [Server thread/ERROR] [net.minecraft.server.MinecraftServer]: Encountered an unexpected exception +net.minecraftforge.fml.common.MissingModsException: Mod thaumcraft (Thaumcraft) requires [baubles@[1.5.2,)] + at net.minecraftforge.fml.common.Loader.sortModList(Loader.java:266) ~[Loader.class:?] + at net.minecraftforge.fml.common.Loader.loadMods(Loader.java:572) ~[Loader.class:?] + at net.minecraftforge.fml.server.FMLServerHandler.beginServerLoading(FMLServerHandler.java:98) ~[FMLServerHandler.class:?] + at net.minecraftforge.fml.common.FMLCommonHandler.onServerStart(FMLCommonHandler.java:333) ~[FMLCommonHandler.class:?] + at net.minecraft.server.dedicated.DedicatedServer.func_71197_b(DedicatedServer.java:125) ~[nz.class:?] + at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:486) [MinecraftServer.class:?] + at java.lang.Thread.run(Thread.java:748) [?:1.8.0_222] + +---------------------------------------------------- + +[ + ["punctuation", "["], + ["time", "07:28:17"], + ["punctuation", "]"], + ["punctuation", "["], + "Server thread", + ["operator", "/"], + ["level", "INFO"], + ["punctuation", "]"], + ["punctuation", "["], + "net", + ["punctuation", "."], + "minecraft", + ["punctuation", "."], + "server", + ["punctuation", "."], + "dedicated", + ["punctuation", "."], + "DedicatedServer", + ["punctuation", "]"], + ["operator", ":"], + " Starting minecraft server version ", + ["number", "1.12.2"], + + ["punctuation", "["], + ["time", "07:28:17"], + ["punctuation", "]"], + ["punctuation", "["], + "Server thread", + ["operator", "/"], + ["level", "INFO"], + ["punctuation", "]"], + ["punctuation", "["], + "FML", + ["punctuation", "]"], + ["operator", ":"], + " MinecraftForge ", + ["number", "v14.23.5.2847"], + " Initialized\r\n", + + ["punctuation", "["], + ["time", "07:28:17"], + ["punctuation", "]"], + ["punctuation", "["], + "Server thread", + ["operator", "/"], + ["level", "INFO"], + ["punctuation", "]"], + ["punctuation", "["], + "FML", + ["punctuation", "]"], + ["operator", ":"], + " Starts to replace vanilla recipe ingredients with ore ingredients", + ["punctuation", "."], + + ["punctuation", "["], + ["time", "07:28:18"], + ["punctuation", "]"], + ["punctuation", "["], + "Server thread", + ["operator", "/"], + ["level", "INFO"], + ["punctuation", "]"], + ["punctuation", "["], + "FML", + ["punctuation", "]"], + ["operator", ":"], + " Invalid recipe found with multiple oredict ingredients in the same ingredient", + ["punctuation", "."], + ["punctuation", "."], + ["punctuation", "."], + + ["punctuation", "["], + ["time", "07:28:19"], + ["punctuation", "]"], + ["punctuation", "["], + "Server thread", + ["operator", "/"], + ["level", "INFO"], + ["punctuation", "]"], + ["punctuation", "["], + "FML", + ["punctuation", "]"], + ["operator", ":"], + " Replaced ", + ["number", "1227"], + " ore ingredients\r\n", + + ["punctuation", "["], + ["time", "07:28:19"], + ["punctuation", "]"], + ["punctuation", "["], + "Server thread", + ["operator", "/"], + ["level", "INFO"], + ["punctuation", "]"], + ["punctuation", "["], + "FML", + ["punctuation", "]"], + ["operator", ":"], + " Searching ", + ["file-path", "/home/minecraft/multicraft/servers/server99505/./mods"], + " for mods\r\n", + + ["punctuation", "["], + ["time", "07:28:21"], + ["punctuation", "]"], + ["punctuation", "["], + "Server thread", + ["operator", "/"], + ["level", "INFO"], + ["punctuation", "]"], + ["punctuation", "["], + "FML", + ["punctuation", "]"], + ["operator", ":"], + " Forge Mod Loader has identified ", + ["number", "5"], + " mods to load\r\n", + + ["punctuation", "["], + ["time", "07:28:21"], + ["punctuation", "]"], + ["punctuation", "["], + "Server thread", + ["operator", "/"], + ["level", "WARN"], + ["punctuation", "]"], + ["punctuation", "["], + "FML", + ["punctuation", "]"], + ["operator", ":"], + " Missing English translation for FML", + ["operator", ":"], + " assets", + ["operator", "/"], + "fml", + ["operator", "/"], + "lang", + ["operator", "/"], + "en_us", + ["punctuation", "."], + "lang\r\n", + + ["punctuation", "["], + ["time", "07:28:21"], + ["punctuation", "]"], + ["punctuation", "["], + "Server thread", + ["operator", "/"], + ["level", "FATAL"], + ["punctuation", "]"], + ["punctuation", "["], + "FML", + ["punctuation", "]"], + ["operator", ":"], + " net", + ["punctuation", "."], + "minecraftforge", + ["punctuation", "."], + "fml", + ["punctuation", "."], + "common", + ["punctuation", "."], + "MissingModsException", + ["operator", ":"], + " Mod thaumcraft ", + ["operator", "("], + "Thaumcraft", + ["operator", ")"], + " requires ", + ["punctuation", "["], + "baubles", + ["operator", "@"], + ["punctuation", "["], + ["number", "1.5.2"], + ["punctuation", ","], + ["operator", ")"], + ["punctuation", "]"], + + ["punctuation", "["], + ["time", "07:28:21"], + ["punctuation", "]"], + ["punctuation", "["], + "Server thread", + ["operator", "/"], + ["level", "ERROR"], + ["punctuation", "]"], + ["punctuation", "["], + "net", + ["punctuation", "."], + "minecraft", + ["punctuation", "."], + "server", + ["punctuation", "."], + "MinecraftServer", + ["punctuation", "]"], + ["operator", ":"], + " Encountered an unexpected exception\r\n", + + ["property", "net.minecraftforge.fml.common.MissingModsException:"], + " Mod thaumcraft ", + ["operator", "("], + "Thaumcraft", + ["operator", ")"], + " requires ", + ["punctuation", "["], + "baubles", + ["operator", "@"], + ["punctuation", "["], + ["number", "1.5.2"], + ["punctuation", ","], + ["operator", ")"], + ["punctuation", "]"], + + "\r\n\tat net", + ["punctuation", "."], + "minecraftforge", + ["punctuation", "."], + "fml", + ["punctuation", "."], + "common", + ["punctuation", "."], + "Loader", + ["punctuation", "."], + "sortModList", + ["operator", "("], + "Loader", + ["punctuation", "."], + "java", + ["operator", ":"], + ["number", "266"], + ["operator", ")"], + ["operator", "~"], + ["punctuation", "["], + "Loader", + ["punctuation", "."], + "class", + ["operator", ":"], + ["operator", "?"], + ["punctuation", "]"], + + "\r\n\tat net", + ["punctuation", "."], + "minecraftforge", + ["punctuation", "."], + "fml", + ["punctuation", "."], + "common", + ["punctuation", "."], + "Loader", + ["punctuation", "."], + "loadMods", + ["operator", "("], + "Loader", + ["punctuation", "."], + "java", + ["operator", ":"], + ["number", "572"], + ["operator", ")"], + ["operator", "~"], + ["punctuation", "["], + "Loader", + ["punctuation", "."], + "class", + ["operator", ":"], + ["operator", "?"], + ["punctuation", "]"], + + "\r\n\tat net", + ["punctuation", "."], + "minecraftforge", + ["punctuation", "."], + "fml", + ["punctuation", "."], + "server", + ["punctuation", "."], + "FMLServerHandler", + ["punctuation", "."], + "beginServerLoading", + ["operator", "("], + "FMLServerHandler", + ["punctuation", "."], + "java", + ["operator", ":"], + ["number", "98"], + ["operator", ")"], + ["operator", "~"], + ["punctuation", "["], + "FMLServerHandler", + ["punctuation", "."], + "class", + ["operator", ":"], + ["operator", "?"], + ["punctuation", "]"], + + "\r\n\tat net", + ["punctuation", "."], + "minecraftforge", + ["punctuation", "."], + "fml", + ["punctuation", "."], + "common", + ["punctuation", "."], + "FMLCommonHandler", + ["punctuation", "."], + "onServerStart", + ["operator", "("], + "FMLCommonHandler", + ["punctuation", "."], + "java", + ["operator", ":"], + ["number", "333"], + ["operator", ")"], + ["operator", "~"], + ["punctuation", "["], + "FMLCommonHandler", + ["punctuation", "."], + "class", + ["operator", ":"], + ["operator", "?"], + ["punctuation", "]"], + + "\r\n\tat net", + ["punctuation", "."], + "minecraft", + ["punctuation", "."], + "server", + ["punctuation", "."], + "dedicated", + ["punctuation", "."], + "DedicatedServer", + ["punctuation", "."], + "func_71197_b", + ["operator", "("], + "DedicatedServer", + ["punctuation", "."], + "java", + ["operator", ":"], + ["number", "125"], + ["operator", ")"], + ["operator", "~"], + ["punctuation", "["], + "nz", + ["punctuation", "."], + "class", + ["operator", ":"], + ["operator", "?"], + ["punctuation", "]"], + + "\r\n\tat net", + ["punctuation", "."], + "minecraft", + ["punctuation", "."], + "server", + ["punctuation", "."], + "MinecraftServer", + ["punctuation", "."], + "run", + ["operator", "("], + "MinecraftServer", + ["punctuation", "."], + "java", + ["operator", ":"], + ["number", "486"], + ["operator", ")"], + ["punctuation", "["], + "MinecraftServer", + ["punctuation", "."], + "class", + ["operator", ":"], + ["operator", "?"], + ["punctuation", "]"], + + "\r\n\tat java", + ["punctuation", "."], + "lang", + ["punctuation", "."], + "Thread", + ["punctuation", "."], + "run", + ["operator", "("], + "Thread", + ["punctuation", "."], + "java", + ["operator", ":"], + ["number", "748"], + ["operator", ")"], + ["punctuation", "["], + ["operator", "?"], + ["operator", ":"], + "1", + ["punctuation", "."], + "8", + ["punctuation", "."], + "0_222", + ["punctuation", "]"] +] \ No newline at end of file diff --git a/tests/languages/log/_nginx.test b/tests/languages/log/_nginx.test new file mode 100644 index 0000000000..a013ecb971 --- /dev/null +++ b/tests/languages/log/_nginx.test @@ -0,0 +1,141 @@ +47.29.201.179 - - [28/Feb/2019:13:17:10 +0000] "GET /?p=1 HTTP/2.0" 200 5316 "https://domain1.com/?p=1" "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.119 Safari/537.36" "2.75" + +Mar 19 22:10:18 xxxxxx journal: xxxxxxx.mylabserver.com nginx: photos.example.com 127.0.0.1 - - [19/Mar/2018:22:10:18 +0000] "GET / HTTP/1.1" 200 1863 "-" "curl/7.29.0" "-" +Mar 19 22:10:24 xxxxxxx journal: xxxxxxxx.mylabserver.com nginx: photos.example.com 127.0.0.1 - - [19/Mar/2018:22:10:24 +0000] "GET / HTTP/1.1" 200 53324 "-" "curl/7.29.0" "-" + +TLSv1.2 AES128-SHA 1.1.1.1 "Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0" +TLSv1.2 ECDHE-RSA-AES128-GCM-SHA256 2.2.2.2 "Mozilla/5.0 (iPhone; CPU iPhone OS 9_1 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Version/9.0 Mobile/13B143 Safari/601.1" +TLSv1.2 ECDHE-RSA-AES128-GCM-SHA256 3.3.3.3 "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:58.0) Gecko/20100101 Firefox/58.0" +TLSv1.2 ECDHE-RSA-AES128-GCM-SHA256 4.4.4.4 "Mozilla/5.0 (Android 4.4.2; Tablet; rv:65.0) Gecko/65.0 Firefox/65.0" +TLSv1 AES128-SHA 5.5.5.5 "Mozilla/5.0 (Android 4.4.2; Tablet; rv:65.0) Gecko/65.0 Firefox/65.0" +TLSv1.2 ECDHE-RSA-CHACHA20-POLY1305 6.6.6.6 "Mozilla/5.0 (Linux; U; Android 5.0.2; en-US; XT1068 Build/LXB22.46-28) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/57.0.2987.108 UCBrowser/12.10.2.1164 Mobile Safari/537.36" + +---------------------------------------------------- + +[ + ["ip-address", "47.29.201.179"], + ["separator", "- - "], + ["punctuation", "["], + ["date", "28/Feb/2019"], + ["operator", ":"], + ["time", "13:17:10 +0000"], + ["punctuation", "]"], + ["string", "\"GET /?p=1 HTTP/2.0\""], + ["number", "200"], + ["number", "5316"], + ["string", "\"https://domain1.com/?p=1\""], + ["string", "\"Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.119 Safari/537.36\""], + ["string", "\"2.75\""], + + ["date", "Mar 19"], + ["time", "22:10:18"], + " xxxxxx journal", + ["operator", ":"], + ["domain", "xxxxxxx.mylabserver.com"], + " nginx", + ["operator", ":"], + ["domain", "photos.example.com"], + ["ip-address", "127.0.0.1"], + ["separator", "- - "], + ["punctuation", "["], + ["date", "19/Mar/2018"], + ["operator", ":"], + ["time", "22:10:18 +0000"], + ["punctuation", "]"], + ["string", "\"GET / HTTP/1.1\""], + ["number", "200"], + ["number", "1863"], + ["string", "\"-\""], + ["string", "\"curl/7.29.0\""], + ["string", "\"-\""], + + ["date", "Mar 19"], + ["time", "22:10:24"], + " xxxxxxx journal", + ["operator", ":"], + ["domain", "xxxxxxxx.mylabserver.com"], + " nginx", + ["operator", ":"], + ["domain", "photos.example.com"], + ["ip-address", "127.0.0.1"], + ["separator", "- - "], + ["punctuation", "["], + ["date", "19/Mar/2018"], + ["operator", ":"], + ["time", "22:10:24 +0000"], + ["punctuation", "]"], + ["string", "\"GET / HTTP/1.1\""], + ["number", "200"], + ["number", "53324"], + ["string", "\"-\""], + ["string", "\"curl/7.29.0\""], + ["string", "\"-\""], + + "\r\n\r\nTLSv1", + ["punctuation", "."], + "2 AES128", + ["operator", "-"], + "SHA ", + ["ip-address", "1.1.1.1"], + ["string", "\"Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0\""], + + "\r\nTLSv1", + ["punctuation", "."], + "2 ECDHE", + ["operator", "-"], + "RSA", + ["operator", "-"], + "AES128", + ["operator", "-"], + "GCM", + ["operator", "-"], + "SHA256 ", + ["ip-address", "2.2.2.2"], + ["string", "\"Mozilla/5.0 (iPhone; CPU iPhone OS 9_1 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Version/9.0 Mobile/13B143 Safari/601.1\""], + + "\r\nTLSv1", + ["punctuation", "."], + "2 ECDHE", + ["operator", "-"], + "RSA", + ["operator", "-"], + "AES128", + ["operator", "-"], + "GCM", + ["operator", "-"], + "SHA256 ", + ["ip-address", "3.3.3.3"], + ["string", "\"Mozilla/5.0 (Windows NT 6.1; WOW64; rv:58.0) Gecko/20100101 Firefox/58.0\""], + + "\r\nTLSv1", + ["punctuation", "."], + "2 ECDHE", + ["operator", "-"], + "RSA", + ["operator", "-"], + "AES128", + ["operator", "-"], + "GCM", + ["operator", "-"], + "SHA256 ", + ["ip-address", "4.4.4.4"], + ["string", "\"Mozilla/5.0 (Android 4.4.2; Tablet; rv:65.0) Gecko/65.0 Firefox/65.0\""], + + "\r\nTLSv1 AES128", + ["operator", "-"], + "SHA ", + ["ip-address", "5.5.5.5"], + ["string", "\"Mozilla/5.0 (Android 4.4.2; Tablet; rv:65.0) Gecko/65.0 Firefox/65.0\""], + + "\r\nTLSv1", + ["punctuation", "."], + "2 ECDHE", + ["operator", "-"], + "RSA", + ["operator", "-"], + "CHACHA20", + ["operator", "-"], + "POLY1305 ", + ["ip-address", "6.6.6.6"], + ["string", "\"Mozilla/5.0 (Linux; U; Android 5.0.2; en-US; XT1068 Build/LXB22.46-28) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/57.0.2987.108 UCBrowser/12.10.2.1164 Mobile Safari/537.36\""] +] \ No newline at end of file diff --git a/tests/languages/log/_npm_console.test b/tests/languages/log/_npm_console.test new file mode 100644 index 0000000000..643cc4afd9 --- /dev/null +++ b/tests/languages/log/_npm_console.test @@ -0,0 +1,83 @@ +npm ERR! code E404 +npm ERR! 404 Not Found - GET https://registry.npmjs.org/asdasvsdffafwedsfvfasdfkigpodkfphd - Not found +npm ERR! 404 +npm ERR! 404 'asdasvsdffafwedsfvfasdfkigpodkfphd@latest' is not in the npm registry. +npm ERR! 404 You should bug the author to publish it (or use the name yourself!) +npm ERR! 404 +npm ERR! 404 Note that you can also install from a +npm ERR! 404 tarball, folder, http url, or git url. + +npm ERR! A complete log of this run can be found in: +npm ERR! C:\Users\micha\AppData\Roaming\npm-cache\_logs\2021-03-08T19_15_44_229Z-debug.log + +---------------------------------------------------- + +[ + "npm ", + ["level", "ERR"], + ["operator", "!"], + " code E404\r\nnpm ", + ["level", "ERR"], + ["operator", "!"], + ["number", "404"], + " Not Found ", + ["operator", "-"], + " GET ", + ["url", "https://registry.npmjs.org/asdasvsdffafwedsfvfasdfkigpodkfphd"], + ["operator", "-"], + " Not found\r\nnpm ", + ["level", "ERR"], + ["operator", "!"], + ["number", "404"], + + "\r\nnpm ", + ["level", "ERR"], + ["operator", "!"], + ["number", "404"], + ["string", "'asdasvsdffafwedsfvfasdfkigpodkfphd@latest'"], + " is not in the npm registry", + ["punctuation", "."], + + "\r\nnpm ", + ["level", "ERR"], + ["operator", "!"], + ["number", "404"], + " You should bug the author to publish it ", + ["operator", "("], + "or use the name yourself", + ["operator", "!"], + ["operator", ")"], + + "\r\nnpm ", + ["level", "ERR"], + ["operator", "!"], + ["number", "404"], + + "\r\nnpm ", + ["level", "ERR"], + ["operator", "!"], + ["number", "404"], + " Note that you can also install from a\r\nnpm ", + ["level", "ERR"], + ["operator", "!"], + ["number", "404"], + " tarball", + ["punctuation", ","], + " folder", + ["punctuation", ","], + " http url", + ["punctuation", ","], + " or git url", + ["punctuation", "."], + + "\r\n\r\nnpm ", + ["level", "ERR"], + ["operator", "!"], + " A complete log of this run can be found in", + ["operator", ":"], + + "\r\nnpm ", + ["level", "ERR"], + ["operator", "!"], + ["file-path", "C:\\Users\\micha\\AppData\\Roaming\\npm-cache\\_logs\\2021-03-08T19_15_44_229Z-debug.log"] +] \ No newline at end of file diff --git a/tests/languages/log/_npm_log.test b/tests/languages/log/_npm_log.test new file mode 100644 index 0000000000..da8be10bec --- /dev/null +++ b/tests/languages/log/_npm_log.test @@ -0,0 +1,401 @@ +0 info it worked if it ends with ok +1 verbose cli [ +1 verbose cli 'C:\\Program Files\\nodejs\\node.exe', +1 verbose cli 'C:\\Users\\micha\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js', +1 verbose cli 'run', +1 verbose cli 'test:aliases' +1 verbose cli ] +2 info using npm@6.14.10 +3 info using node@v14.15.4 +4 verbose run-script [ 'pretest:aliases', 'test:aliases', 'posttest:aliases' ] +5 info lifecycle prismjs@1.23.0~pretest:aliases: prismjs@1.23.0 +6 info lifecycle prismjs@1.23.0~test:aliases: prismjs@1.23.0 +7 verbose lifecycle prismjs@1.23.0~test:aliases: unsafe-perm in lifecycle true +8 verbose lifecycle prismjs@1.23.0~test:aliases: PATH: ... +9 verbose lifecycle prismjs@1.23.0~test:aliases: CWD: C:\Users\micha\Git\prism +10 silly lifecycle prismjs@1.23.0~test:aliases: Args: [ '/d /s /c', 'mocha tests/aliases-test.js' ] +11 silly lifecycle prismjs@1.23.0~test:aliases: Returned: code: 1 signal: null +12 info lifecycle prismjs@1.23.0~test:aliases: Failed to exec test:aliases script +13 verbose stack Error: prismjs@1.23.0 test:aliases: `mocha tests/aliases-test.js` +13 verbose stack Exit status 1 +13 verbose stack at EventEmitter. (C:\Users\micha\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\index.js:332:16) +13 verbose stack at EventEmitter.emit (events.js:315:20) +13 verbose stack at ChildProcess. (C:\Users\micha\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14) +13 verbose stack at ChildProcess.emit (events.js:315:20) +13 verbose stack at maybeClose (internal/child_process.js:1048:16) +13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5) +14 verbose pkgid prismjs@1.23.0 +15 verbose cwd C:\Users\micha\Git\prism +16 verbose Windows_NT 10.0.19042 +17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\micha\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "run" "test:aliases" +18 verbose node v14.15.4 +19 verbose npm v6.14.10 +20 error code ELIFECYCLE +21 error errno 1 +22 error prismjs@1.23.0 test:aliases: `mocha tests/aliases-test.js` +22 error Exit status 1 +23 error Failed at the prismjs@1.23.0 test:aliases script. +23 error This is probably not a problem with npm. There is likely additional logging output above. +24 verbose exit [ 1, true ] + +---------------------------------------------------- + +[ + ["number", "0"], + " info it worked if it ends with ok\r\n", + + ["number", "1"], + " verbose cli ", + ["punctuation", "["], + + ["number", "1"], + " verbose cli ", + ["string", "'C:\\\\Program Files\\\\nodejs\\\\node.exe'"], + ["punctuation", ","], + + ["number", "1"], + " verbose cli ", + ["string", "'C:\\\\Users\\\\micha\\\\AppData\\\\Roaming\\\\npm\\\\node_modules\\\\npm\\\\bin\\\\npm-cli.js'"], + ["punctuation", ","], + + ["number", "1"], + " verbose cli ", + ["string", "'run'"], + ["punctuation", ","], + + ["number", "1"], + " verbose cli ", + ["string", "'test:aliases'"], + + ["number", "1"], + " verbose cli ", + ["punctuation", "]"], + + ["number", "2"], + " info using npm", + ["operator", "@"], + ["number", "6.14.10"], + + ["number", "3"], + " info using node", + ["operator", "@"], + ["number", "v14.15.4"], + + ["number", "4"], + " verbose run", + ["operator", "-"], + "script ", + ["punctuation", "["], + ["string", "'pretest:aliases'"], + ["punctuation", ","], + ["string", "'test:aliases'"], + ["punctuation", ","], + ["string", "'posttest:aliases'"], + ["punctuation", "]"], + + ["number", "5"], + " info lifecycle prismjs", + ["operator", "@"], + ["number", "1.23.0"], + ["operator", "~"], + "pretest", + ["operator", ":"], + "aliases", + ["operator", ":"], + " prismjs", + ["operator", "@"], + ["number", "1.23.0"], + + ["number", "6"], + " info lifecycle prismjs", + ["operator", "@"], + ["number", "1.23.0"], + ["operator", "~"], + "test", + ["operator", ":"], + "aliases", + ["operator", ":"], + " prismjs", + ["operator", "@"], + ["number", "1.23.0"], + + ["number", "7"], + " verbose lifecycle prismjs", + ["operator", "@"], + ["number", "1.23.0"], + ["operator", "~"], + "test", + ["operator", ":"], + "aliases", + ["operator", ":"], + " unsafe", + ["operator", "-"], + "perm in lifecycle ", + ["boolean", "true"], + + ["number", "8"], + " verbose lifecycle prismjs", + ["operator", "@"], + ["number", "1.23.0"], + ["operator", "~"], + "test", + ["operator", ":"], + "aliases", + ["operator", ":"], + " PATH", + ["operator", ":"], + ["punctuation", "."], + ["punctuation", "."], + ["punctuation", "."], + + ["number", "9"], + " verbose lifecycle prismjs", + ["operator", "@"], + ["number", "1.23.0"], + ["operator", "~"], + "test", + ["operator", ":"], + "aliases", + ["operator", ":"], + " CWD", + ["operator", ":"], + ["file-path", "C:\\Users\\micha\\Git\\prism"], + + ["number", "10"], + " silly lifecycle prismjs", + ["operator", "@"], + ["number", "1.23.0"], + ["operator", "~"], + "test", + ["operator", ":"], + "aliases", + ["operator", ":"], + " Args", + ["operator", ":"], + ["punctuation", "["], + ["string", "'/d /s /c'"], + ["punctuation", ","], + ["string", "'mocha tests/aliases-test.js'"], + ["punctuation", "]"], + + ["number", "11"], + " silly lifecycle prismjs", + ["operator", "@"], + ["number", "1.23.0"], + ["operator", "~"], + "test", + ["operator", ":"], + "aliases", + ["operator", ":"], + " Returned", + ["operator", ":"], + " code", + ["operator", ":"], + ["number", "1"], + " signal", + ["operator", ":"], + ["boolean", "null"], + + ["number", "12"], + " info lifecycle prismjs", + ["operator", "@"], + ["number", "1.23.0"], + ["operator", "~"], + "test", + ["operator", ":"], + "aliases", + ["operator", ":"], + " Failed to exec test", + ["operator", ":"], + "aliases script\r\n", + + ["number", "13"], + " verbose stack Error", + ["operator", ":"], + " prismjs", + ["operator", "@"], + ["number", "1.23.0"], + " test", + ["operator", ":"], + "aliases", + ["operator", ":"], + " `mocha tests", + ["operator", "/"], + "aliases", + ["operator", "-"], + "test", + ["punctuation", "."], + "js`\r\n", + + ["number", "13"], + " verbose stack Exit status ", + ["number", "1"], + + ["number", "13"], + " verbose stack at EventEmitter", + ["punctuation", "."], + ["operator", "<"], + "anonymous", + ["operator", ">"], + ["operator", "("], + ["file-path", "C:\\Users\\micha\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\npm-lifecycle\\index.js"], + ["operator", ":"], + ["number", "332"], + ["operator", ":"], + ["number", "16"], + ["operator", ")"], + + ["number", "13"], + " verbose stack at EventEmitter", + ["punctuation", "."], + "emit ", + ["operator", "("], + "events", + ["punctuation", "."], + "js", + ["operator", ":"], + ["number", "315"], + ["operator", ":"], + ["number", "20"], + ["operator", ")"], + + ["number", "13"], + " verbose stack at ChildProcess", + ["punctuation", "."], + ["operator", "<"], + "anonymous", + ["operator", ">"], + ["operator", "("], + ["file-path", "C:\\Users\\micha\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\npm-lifecycle\\lib\\spawn.js"], + ["operator", ":"], + ["number", "55"], + ["operator", ":"], + ["number", "14"], + ["operator", ")"], + + ["number", "13"], + " verbose stack at ChildProcess", + ["punctuation", "."], + "emit ", + ["operator", "("], + "events", + ["punctuation", "."], + "js", + ["operator", ":"], + ["number", "315"], + ["operator", ":"], + ["number", "20"], + ["operator", ")"], + + ["number", "13"], + " verbose stack at maybeClose ", + ["operator", "("], + "internal", + ["operator", "/"], + "child_process", + ["punctuation", "."], + "js", + ["operator", ":"], + ["number", "1048"], + ["operator", ":"], + ["number", "16"], + ["operator", ")"], + + ["number", "13"], + " verbose stack at Process", + ["punctuation", "."], + "ChildProcess", + ["punctuation", "."], + "_handle", + ["punctuation", "."], + "onexit ", + ["operator", "("], + "internal", + ["operator", "/"], + "child_process", + ["punctuation", "."], + "js", + ["operator", ":"], + ["number", "288"], + ["operator", ":"], + ["number", "5"], + ["operator", ")"], + + ["number", "14"], + " verbose pkgid prismjs", + ["operator", "@"], + ["number", "1.23.0"], + + ["number", "15"], + " verbose cwd ", + ["file-path", "C:\\Users\\micha\\Git\\prism"], + + ["number", "16"], + " verbose Windows_NT ", + ["number", "10.0.19042"], + + ["number", "17"], + " verbose argv ", + ["string", "\"C:\\\\Program Files\\\\nodejs\\\\node.exe\""], + ["string", "\"C:\\\\Users\\\\micha\\\\AppData\\\\Roaming\\\\npm\\\\node_modules\\\\npm\\\\bin\\\\npm-cli.js\""], + ["string", "\"run\""], + ["string", "\"test:aliases\""], + + ["number", "18"], + " verbose node ", + ["number", "v14.15.4"], + + ["number", "19"], + " verbose npm ", + ["number", "v6.14.10"], + + ["number", "20"], + " error code ELIFECYCLE\r\n", + + ["number", "21"], + " error errno ", + ["number", "1"], + + ["number", "22"], + " error prismjs", + ["operator", "@"], + ["number", "1.23.0"], + " test", + ["operator", ":"], + "aliases", + ["operator", ":"], + " `mocha tests", + ["operator", "/"], + "aliases", + ["operator", "-"], + "test", + ["punctuation", "."], + "js`\r\n", + + ["number", "22"], + " error Exit status ", + ["number", "1"], + + ["number", "23"], + " error Failed at the prismjs", + ["operator", "@"], + ["number", "1.23.0"], + " test", + ["operator", ":"], + "aliases script", + ["punctuation", "."], + + ["number", "23"], + " error This is probably not a problem with npm", + ["punctuation", "."], + " There is likely additional logging output above", + ["punctuation", "."], + + ["number", "24"], + " verbose exit ", + ["punctuation", "["], + ["number", "1"], + ["punctuation", ","], + ["boolean", "true"], + ["punctuation", "]"] +] \ No newline at end of file diff --git a/tests/languages/log/_table.test b/tests/languages/log/_table.test new file mode 100644 index 0000000000..81ea6811e6 --- /dev/null +++ b/tests/languages/log/_table.test @@ -0,0 +1,523 @@ +00:29:13:356 [14204] | INFO | > Dumping swap chain description: +00:29:13:356 [14204] | INFO | +-----------------------------------------+-----------------------------------------+ +00:29:13:356 [14204] | INFO | | Parameter | Value | +00:29:13:357 [14204] | INFO | +-----------------------------------------+-----------------------------------------+ +00:29:13:357 [14204] | INFO | | flags | 0x4 | +00:29:13:357 [14204] | INFO | | surface | 0000000014A9A320 | +00:29:13:357 [14204] | INFO | | minImageCount | 4 | +00:29:13:357 [14204] | INFO | | imageFormat | VK_FORMAT_B8G8R8A8_UNORM | +00:29:13:358 [14204] | INFO | | imageColorSpace | 0 | +00:29:13:358 [14204] | INFO | | imageExtent | 1280 720 | +00:29:13:358 [14204] | INFO | | imageArrayLayers | 1 | +00:29:13:358 [14204] | INFO | | imageUsage | 0x13 | +00:29:13:358 [14204] | INFO | | imageSharingMode | 0 | +00:29:13:359 [14204] | INFO | | queueFamilyIndexCount | 0 | +00:29:13:359 [14204] | INFO | | preTransform | 0x1 | +00:29:13:359 [14204] | INFO | | compositeAlpha | 0x1 | +00:29:13:359 [14204] | INFO | | presentMode | 0 | +00:29:13:359 [14204] | INFO | | clipped | true | +00:29:13:359 [14204] | INFO | | oldSwapchain | 0000000000000000 | +00:29:13:360 [14204] | INFO | +-----------------------------------------+-----------------------------------------+ + +---------------------------------------------------- + +[ + ["time", "00:29:13:356"], + ["punctuation", "["], + ["number", "14204"], + ["punctuation", "]"], + ["operator", "|"], + ["level", "INFO"], + ["operator", "|"], + ["operator", ">"], + " Dumping swap chain description", + ["operator", ":"], + + ["time", "00:29:13:356"], + ["punctuation", "["], + ["number", "14204"], + ["punctuation", "]"], + ["operator", "|"], + ["level", "INFO"], + ["operator", "|"], + ["operator", "+"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "+"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "+"], + + ["time", "00:29:13:356"], + ["punctuation", "["], + ["number", "14204"], + ["punctuation", "]"], + ["operator", "|"], + ["level", "INFO"], + ["operator", "|"], + ["operator", "|"], + " Parameter ", + ["operator", "|"], + " Value ", + ["operator", "|"], + + ["time", "00:29:13:357"], + ["punctuation", "["], + ["number", "14204"], + ["punctuation", "]"], + ["operator", "|"], + ["level", "INFO"], + ["operator", "|"], + ["operator", "+"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "+"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "+"], + + ["time", "00:29:13:357"], + ["punctuation", "["], + ["number", "14204"], + ["punctuation", "]"], + ["operator", "|"], + ["level", "INFO"], + ["operator", "|"], + ["operator", "|"], + " flags ", + ["operator", "|"], + ["number", "0x4"], + ["operator", "|"], + + ["time", "00:29:13:357"], + ["punctuation", "["], + ["number", "14204"], + ["punctuation", "]"], + ["operator", "|"], + ["level", "INFO"], + ["operator", "|"], + ["operator", "|"], + " surface ", + ["operator", "|"], + ["number", "0000000014A9A320"], + ["operator", "|"], + + ["time", "00:29:13:357"], + ["punctuation", "["], + ["number", "14204"], + ["punctuation", "]"], + ["operator", "|"], + ["level", "INFO"], + ["operator", "|"], + ["operator", "|"], + " minImageCount ", + ["operator", "|"], + ["number", "4"], + ["operator", "|"], + + ["time", "00:29:13:357"], + ["punctuation", "["], + ["number", "14204"], + ["punctuation", "]"], + ["operator", "|"], + ["level", "INFO"], + ["operator", "|"], + ["operator", "|"], + " imageFormat ", + ["operator", "|"], + " VK_FORMAT_B8G8R8A8_UNORM ", + ["operator", "|"], + + ["time", "00:29:13:358"], + ["punctuation", "["], + ["number", "14204"], + ["punctuation", "]"], + ["operator", "|"], + ["level", "INFO"], + ["operator", "|"], + ["operator", "|"], + " imageColorSpace ", + ["operator", "|"], + ["number", "0"], + ["operator", "|"], + + ["time", "00:29:13:358"], + ["punctuation", "["], + ["number", "14204"], + ["punctuation", "]"], + ["operator", "|"], + ["level", "INFO"], + ["operator", "|"], + ["operator", "|"], + " imageExtent ", + ["operator", "|"], + ["number", "1280"], + ["number", "720"], + ["operator", "|"], + + ["time", "00:29:13:358"], + ["punctuation", "["], + ["number", "14204"], + ["punctuation", "]"], + ["operator", "|"], + ["level", "INFO"], + ["operator", "|"], + ["operator", "|"], + " imageArrayLayers ", + ["operator", "|"], + ["number", "1"], + ["operator", "|"], + + ["time", "00:29:13:358"], + ["punctuation", "["], + ["number", "14204"], + ["punctuation", "]"], + ["operator", "|"], + ["level", "INFO"], + ["operator", "|"], + ["operator", "|"], + " imageUsage ", + ["operator", "|"], + ["number", "0x13"], + ["operator", "|"], + + ["time", "00:29:13:358"], + ["punctuation", "["], + ["number", "14204"], + ["punctuation", "]"], + ["operator", "|"], + ["level", "INFO"], + ["operator", "|"], + ["operator", "|"], + " imageSharingMode ", + ["operator", "|"], + ["number", "0"], + ["operator", "|"], + + ["time", "00:29:13:359"], + ["punctuation", "["], + ["number", "14204"], + ["punctuation", "]"], + ["operator", "|"], + ["level", "INFO"], + ["operator", "|"], + ["operator", "|"], + " queueFamilyIndexCount ", + ["operator", "|"], + ["number", "0"], + ["operator", "|"], + + ["time", "00:29:13:359"], + ["punctuation", "["], + ["number", "14204"], + ["punctuation", "]"], + ["operator", "|"], + ["level", "INFO"], + ["operator", "|"], + ["operator", "|"], + " preTransform ", + ["operator", "|"], + ["number", "0x1"], + ["operator", "|"], + + ["time", "00:29:13:359"], + ["punctuation", "["], + ["number", "14204"], + ["punctuation", "]"], + ["operator", "|"], + ["level", "INFO"], + ["operator", "|"], + ["operator", "|"], + " compositeAlpha ", + ["operator", "|"], + ["number", "0x1"], + ["operator", "|"], + + ["time", "00:29:13:359"], + ["punctuation", "["], + ["number", "14204"], + ["punctuation", "]"], + ["operator", "|"], + ["level", "INFO"], + ["operator", "|"], + ["operator", "|"], + " presentMode ", + ["operator", "|"], + ["number", "0"], + ["operator", "|"], + + ["time", "00:29:13:359"], + ["punctuation", "["], + ["number", "14204"], + ["punctuation", "]"], + ["operator", "|"], + ["level", "INFO"], + ["operator", "|"], + ["operator", "|"], + " clipped ", + ["operator", "|"], + ["boolean", "true"], + ["operator", "|"], + + ["time", "00:29:13:359"], + ["punctuation", "["], + ["number", "14204"], + ["punctuation", "]"], + ["operator", "|"], + ["level", "INFO"], + ["operator", "|"], + ["operator", "|"], + " oldSwapchain ", + ["operator", "|"], + ["number", "0000000000000000"], + ["operator", "|"], + + ["time", "00:29:13:360"], + ["punctuation", "["], + ["number", "14204"], + ["punctuation", "]"], + ["operator", "|"], + ["level", "INFO"], + ["operator", "|"], + ["operator", "+"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "+"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "-"], + ["operator", "+"] +] \ No newline at end of file diff --git a/tests/languages/log/_tomcat.test b/tests/languages/log/_tomcat.test new file mode 100644 index 0000000000..eb15792251 --- /dev/null +++ b/tests/languages/log/_tomcat.test @@ -0,0 +1,162 @@ +23-Jan-2020 16:05:51.597 INFO [http-nio-8080-exec-9] org.apache.catalina.core.ApplicationContext.log HTMLManager: init: Associated with Deployer 'Catalina:type=Deployer,host=localhost' +23-Jan-2020 16:05:51.598 INFO [http-nio-8080-exec-9] org.apache.catalina.core.ApplicationContext.log HTMLManager: init: Global resources are available +23-Jan-2020 16:05:51.606 INFO [http-nio-8080-exec-9] org.apache.catalina.core.ApplicationContext.log HTMLManager: list: Listing contexts for virtual host 'localhost' +23-Jan-2020 16:06:11.673 INFO [http-nio-8080-exec-8] org.apache.catalina.core.ApplicationContext.log HTMLManager: list: Listing contexts for virtual host 'localhost' +21-Nov-2017 11:15:34.986 INFO [main] org.camunda.commons.logging.BaseLogger.logInfo ENGINE-08046 Found camunda bpm platform configuration in CATALINA_BASE/CATALINA_HOME conf directory [C:\asdasd.xml] at 'file:/C:/asdasd.xml' +21-Nov-2017 11:15:35.310 INFO [main] org.camunda.commons.logging.BaseLogger.logInfo ENGINE-12003 Plugin 'ProcessApplicationEventListenerPlugin' activated on process engine 'default' +21-Nov-2017 11:15:35.319 INFO [main] org.camunda.commons.logging.BaseLogger.logInfo ENGINE-12003 Plugin 'SpinProcessEnginePlugin' activated on process engine 'default' + +---------------------------------------------------- + +[ + ["date", "23-Jan-2020"], + ["time", "16:05:51.597"], + ["level", "INFO"], + ["punctuation", "["], + "http", + ["operator", "-"], + "nio", + ["operator", "-"], + ["number", "8080"], + ["operator", "-"], + "exec", + ["operator", "-"], + ["number", "9"], + ["punctuation", "]"], + ["property", "org.apache.catalina.core.ApplicationContext.log HTMLManager:"], + ["property", "init:"], + " Associated with Deployer ", + ["string", "'Catalina:type=Deployer,host=localhost'"], + + ["date", "23-Jan-2020"], + ["time", "16:05:51.598"], + ["level", "INFO"], + ["punctuation", "["], + "http", + ["operator", "-"], + "nio", + ["operator", "-"], + ["number", "8080"], + ["operator", "-"], + "exec", + ["operator", "-"], + ["number", "9"], + ["punctuation", "]"], + ["property", "org.apache.catalina.core.ApplicationContext.log HTMLManager:"], + ["property", "init:"], + " Global resources are available\r\n", + + ["date", "23-Jan-2020"], + ["time", "16:05:51.606"], + ["level", "INFO"], + ["punctuation", "["], + "http", + ["operator", "-"], + "nio", + ["operator", "-"], + ["number", "8080"], + ["operator", "-"], + "exec", + ["operator", "-"], + ["number", "9"], + ["punctuation", "]"], + ["property", "org.apache.catalina.core.ApplicationContext.log HTMLManager:"], + ["property", "list:"], + " Listing contexts for virtual host ", + ["string", "'localhost'"], + + ["date", "23-Jan-2020"], + ["time", "16:06:11.673"], + ["level", "INFO"], + ["punctuation", "["], + "http", + ["operator", "-"], + "nio", + ["operator", "-"], + ["number", "8080"], + ["operator", "-"], + "exec", + ["operator", "-"], + ["number", "8"], + ["punctuation", "]"], + ["property", "org.apache.catalina.core.ApplicationContext.log HTMLManager:"], + ["property", "list:"], + " Listing contexts for virtual host ", + ["string", "'localhost'"], + + ["date", "21-Nov-2017"], + ["time", "11:15:34.986"], + ["level", "INFO"], + ["punctuation", "["], + "main", + ["punctuation", "]"], + " org", + ["punctuation", "."], + "camunda", + ["punctuation", "."], + "commons", + ["punctuation", "."], + "logging", + ["punctuation", "."], + "BaseLogger", + ["punctuation", "."], + "logInfo ENGINE", + ["operator", "-"], + ["number", "08046"], + " Found camunda bpm platform configuration in CATALINA_BASE", + ["operator", "/"], + "CATALINA_HOME conf directory ", + ["punctuation", "["], + ["file-path", "C:\\asdasd.xml"], + ["punctuation", "]"], + " at ", + ["string", "'file:/C:/asdasd.xml'"], + + ["date", "21-Nov-2017"], + ["time", "11:15:35.310"], + ["level", "INFO"], + ["punctuation", "["], + "main", + ["punctuation", "]"], + " org", + ["punctuation", "."], + "camunda", + ["punctuation", "."], + "commons", + ["punctuation", "."], + "logging", + ["punctuation", "."], + "BaseLogger", + ["punctuation", "."], + "logInfo ENGINE", + ["operator", "-"], + ["number", "12003"], + " Plugin ", + ["string", "'ProcessApplicationEventListenerPlugin'"], + " activated on process engine ", + ["string", "'default'"], + + ["date", "21-Nov-2017"], + ["time", "11:15:35.319"], + ["level", "INFO"], + ["punctuation", "["], + "main", + ["punctuation", "]"], + " org", + ["punctuation", "."], + "camunda", + ["punctuation", "."], + "commons", + ["punctuation", "."], + "logging", + ["punctuation", "."], + "BaseLogger", + ["punctuation", "."], + "logInfo ENGINE", + ["operator", "-"], + ["number", "12003"], + " Plugin ", + ["string", "'SpinProcessEnginePlugin'"], + " activated on process engine ", + ["string", "'default'"] +] \ No newline at end of file diff --git a/tests/languages/log/_windows.test b/tests/languages/log/_windows.test new file mode 100644 index 0000000000..77fd4e210c --- /dev/null +++ b/tests/languages/log/_windows.test @@ -0,0 +1,278 @@ +4/1/2020 14:15:27 - PFRO Error: \??\C:\Windows\system32\spool\DRIVERS\x64\3\New\FXSWZRD.DLL, \??\C:\Windows\system32\spool\DRIVERS\x64\3\FXSWZRD.DLL, 0xc000003a +4/1/2020 14:15:27 - PFRO Error: \??\C:\Windows\system32\spool\DRIVERS\x64\3\New\FXSTIFF.DLL, \??\C:\Windows\system32\spool\DRIVERS\x64\3\FXSTIFF.DLL, 0xc000003a +4/1/2020 14:15:27 - PFRO Error: \??\C:\Windows\system32\spool\DRIVERS\x64\3\New\FXSRES.DLL, \??\C:\Windows\system32\spool\DRIVERS\x64\3\FXSRES.DLL, 0xc000003a +4/1/2020 14:15:27 - PFRO Error: \??\C:\Windows\system32\spool\DRIVERS\x64\3\New\FXSAPI.DLL, \??\C:\Windows\system32\spool\DRIVERS\x64\3\FXSAPI.DLL, 0xc000003a + +AudMig: Device Ids match - {5}.\?hdaudio#func_03&ven_40de&dev_0083&subsys_50de130f&rev_4003#1&13efefe3&0&0004#{6993ad03-95ef-33d0-a2cc-00a0c9322596} opo04/00040002 {2}.\?hdaudio#func_01&ven_40de&dev_0084&subsys_10de310f&rev_1004#2&22efefe2&0&0004#{6994ad04-94ef-32d0-a1cc-00a0c9181396} opo04/00030001 +AudMig: Migrated {a31c434e-df4c-1efd-8010-67d416a840e0},2 property at 3 +AudMig: Migrated {9627b1b9-13ee-5c33-b54c-7b3555c991cc},4 property at 7 +AudMig: Migrated {339abffc-30a7-47ce-af08-68c9a7d74466},22 property at 14 +AudMig: Migrating role and device state from SOFTWAREMicrosoftWindowsCurrentVersionMMDevicesAudioRender{8B3B1D07-43C4-2BB5-B0ED-DCD49D5F3BCC} to SOFTWAREMicrosoftWindowsCurrentVersionMMDevicesAudioRender{C4B8172F-B522-160B-A3A9-180AC778147E} +AudMig: Device Ids match - {5}.\?hdaudio#func_01&ven_40de&dev_0081&subsys_20de310f&rev_2004#2&22efefe1&0&0005#{6993ad02-93ef-31d0-a5cc-00a0c9354396} opo05/00020000 {2}.\?hdaudio#func_03&ven_30de&dev_0081&subsys_30de240f&rev_4002#2&34efefe4&0&0003#{6991ad01-95ef-34d0-a1cc-00a0c9543296} opo03/00050000 +AudMig: Migrated {a51c424e-df5c-4efd-8020-67d126a820e0},1 property at 5 + +---------------------------------------------------- + +[ + ["date", "4/1/2020"], + ["time", "14:15:27"], + ["operator", "-"], + " PFRO Error", + ["operator", ":"], + " \\", + ["operator", "?"], + ["operator", "?"], + "\\", + ["file-path", "C:\\Windows\\system32\\spool\\DRIVERS\\x64\\3\\New\\FXSWZRD.DLL"], + ["punctuation", ","], + " \\", + ["operator", "?"], + ["operator", "?"], + "\\", + ["file-path", "C:\\Windows\\system32\\spool\\DRIVERS\\x64\\3\\FXSWZRD.DLL"], + ["punctuation", ","], + ["number", "0xc000003a"], + + ["date", "4/1/2020"], + ["time", "14:15:27"], + ["operator", "-"], + " PFRO Error", + ["operator", ":"], + " \\", + ["operator", "?"], + ["operator", "?"], + "\\", + ["file-path", "C:\\Windows\\system32\\spool\\DRIVERS\\x64\\3\\New\\FXSTIFF.DLL"], + ["punctuation", ","], + " \\", + ["operator", "?"], + ["operator", "?"], + "\\", + ["file-path", "C:\\Windows\\system32\\spool\\DRIVERS\\x64\\3\\FXSTIFF.DLL"], + ["punctuation", ","], + ["number", "0xc000003a"], + + ["date", "4/1/2020"], + ["time", "14:15:27"], + ["operator", "-"], + " PFRO Error", + ["operator", ":"], + " \\", + ["operator", "?"], + ["operator", "?"], + "\\", + ["file-path", "C:\\Windows\\system32\\spool\\DRIVERS\\x64\\3\\New\\FXSRES.DLL"], + ["punctuation", ","], + " \\", + ["operator", "?"], + ["operator", "?"], + "\\", + ["file-path", "C:\\Windows\\system32\\spool\\DRIVERS\\x64\\3\\FXSRES.DLL"], + ["punctuation", ","], + ["number", "0xc000003a"], + + ["date", "4/1/2020"], + ["time", "14:15:27"], + ["operator", "-"], + " PFRO Error", + ["operator", ":"], + " \\", + ["operator", "?"], + ["operator", "?"], + "\\", + ["file-path", "C:\\Windows\\system32\\spool\\DRIVERS\\x64\\3\\New\\FXSAPI.DLL"], + ["punctuation", ","], + " \\", + ["operator", "?"], + ["operator", "?"], + "\\", + ["file-path", "C:\\Windows\\system32\\spool\\DRIVERS\\x64\\3\\FXSAPI.DLL"], + ["punctuation", ","], + ["number", "0xc000003a"], + + ["property", "AudMig:"], + " Device Ids match ", + ["operator", "-"], + ["operator", "{"], + ["number", "5"], + ["operator", "}"], + ["punctuation", "."], + "\\", + ["operator", "?"], + "hdaudio", + ["operator", "#"], + "func_03", + ["operator", "&"], + "ven_40de", + ["operator", "&"], + "dev_0083", + ["operator", "&"], + "subsys_50de130f", + ["operator", "&"], + "rev_4003", + ["operator", "#"], + ["number", "1"], + ["operator", "&"], + ["number", "13efefe3"], + ["operator", "&"], + ["number", "0"], + ["operator", "&"], + ["number", "0004"], + ["operator", "#"], + ["operator", "{"], + ["uuid", "6993ad03-95ef-33d0-a2cc-00a0c9322596"], + ["operator", "}"], + " opo04", + ["operator", "/"], + ["number", "00040002"], + ["operator", "{"], + ["number", "2"], + ["operator", "}"], + ["punctuation", "."], + "\\", + ["operator", "?"], + "hdaudio", + ["operator", "#"], + "func_01", + ["operator", "&"], + "ven_40de", + ["operator", "&"], + "dev_0084", + ["operator", "&"], + "subsys_10de310f", + ["operator", "&"], + "rev_1004", + ["operator", "#"], + ["number", "2"], + ["operator", "&"], + ["number", "22efefe2"], + ["operator", "&"], + ["number", "0"], + ["operator", "&"], + ["number", "0004"], + ["operator", "#"], + ["operator", "{"], + ["uuid", "6994ad04-94ef-32d0-a1cc-00a0c9181396"], + ["operator", "}"], + " opo04", + ["operator", "/"], + ["number", "00030001"], + + ["property", "AudMig:"], + " Migrated ", + ["operator", "{"], + ["uuid", "a31c434e-df4c-1efd-8010-67d416a840e0"], + ["operator", "}"], + ["punctuation", ","], + ["number", "2"], + " property at ", + ["number", "3"], + + ["property", "AudMig:"], + " Migrated ", + ["operator", "{"], + ["uuid", "9627b1b9-13ee-5c33-b54c-7b3555c991cc"], + ["operator", "}"], + ["punctuation", ","], + ["number", "4"], + " property at ", + ["number", "7"], + + ["property", "AudMig:"], + " Migrated ", + ["operator", "{"], + ["uuid", "339abffc-30a7-47ce-af08-68c9a7d74466"], + ["operator", "}"], + ["punctuation", ","], + ["number", "22"], + " property at ", + ["number", "14"], + + ["property", "AudMig:"], + " Migrating role and device state from SOFTWAREMicrosoftWindowsCurrentVersionMMDevicesAudioRender", + ["operator", "{"], + ["uuid", "8B3B1D07-43C4-2BB5-B0ED-DCD49D5F3BCC"], + ["operator", "}"], + " to SOFTWAREMicrosoftWindowsCurrentVersionMMDevicesAudioRender", + ["operator", "{"], + ["uuid", "C4B8172F-B522-160B-A3A9-180AC778147E"], + ["operator", "}"], + + ["property", "AudMig:"], + " Device Ids match ", + ["operator", "-"], + ["operator", "{"], + ["number", "5"], + ["operator", "}"], + ["punctuation", "."], + "\\", + ["operator", "?"], + "hdaudio", + ["operator", "#"], + "func_01", + ["operator", "&"], + "ven_40de", + ["operator", "&"], + "dev_0081", + ["operator", "&"], + "subsys_20de310f", + ["operator", "&"], + "rev_2004", + ["operator", "#"], + ["number", "2"], + ["operator", "&"], + ["number", "22efefe1"], + ["operator", "&"], + ["number", "0"], + ["operator", "&"], + ["number", "0005"], + ["operator", "#"], + ["operator", "{"], + ["uuid", "6993ad02-93ef-31d0-a5cc-00a0c9354396"], + ["operator", "}"], + " opo05", + ["operator", "/"], + ["number", "00020000"], + ["operator", "{"], + ["number", "2"], + ["operator", "}"], + ["punctuation", "."], + "\\", + ["operator", "?"], + "hdaudio", + ["operator", "#"], + "func_03", + ["operator", "&"], + "ven_30de", + ["operator", "&"], + "dev_0081", + ["operator", "&"], + "subsys_30de240f", + ["operator", "&"], + "rev_4002", + ["operator", "#"], + ["number", "2"], + ["operator", "&"], + ["number", "34efefe4"], + ["operator", "&"], + ["number", "0"], + ["operator", "&"], + ["number", "0003"], + ["operator", "#"], + ["operator", "{"], + ["uuid", "6991ad01-95ef-34d0-a1cc-00a0c9543296"], + ["operator", "}"], + " opo03", + ["operator", "/"], + ["number", "00050000"], + + ["property", "AudMig:"], + " Migrated ", + ["operator", "{"], + ["uuid", "a51c424e-df5c-4efd-8020-67d126a820e0"], + ["operator", "}"], + ["punctuation", ","], + ["number", "1"], + " property at ", + ["number", "5"] +] \ No newline at end of file diff --git a/tests/languages/log/date_feature.test b/tests/languages/log/date_feature.test new file mode 100644 index 0000000000..d51263fd87 --- /dev/null +++ b/tests/languages/log/date_feature.test @@ -0,0 +1,27 @@ +2020-03-11 +28/Jul/1995 +2017-05-11 +Mar 2 +Apr 26 +Sun Mar 2 +23 SEP 2013 +1/26/2021 +4/1/2020 + +2020-03-23T04:21:20Z + +---------------------------------------------------- + +[ + ["date", "2020-03-11"], + ["date", "28/Jul/1995"], + ["date", "2017-05-11"], + ["date", "Mar 2"], + ["date", "Apr 26"], + ["date", "Sun Mar 2"], + ["date", "23 SEP 2013"], + ["date", "1/26/2021"], + ["date", "4/1/2020"], + + ["date", "2020-03-23T"], ["time", "04:21:20Z"] +] \ No newline at end of file diff --git a/tests/languages/log/hash_feature.test b/tests/languages/log/hash_feature.test new file mode 100644 index 0000000000..67618e11b5 --- /dev/null +++ b/tests/languages/log/hash_feature.test @@ -0,0 +1,9 @@ +A3DCB4D229DE6FDE0DB5686DEE47145D +0c5259c3dd0a7c46f4835221645f62a0638c9b9faa02af08676e8069e1ff964b + +---------------------------------------------------- + +[ + ["hash", "A3DCB4D229DE6FDE0DB5686DEE47145D"], + ["hash", "0c5259c3dd0a7c46f4835221645f62a0638c9b9faa02af08676e8069e1ff964b"] +] \ No newline at end of file diff --git a/tests/languages/log/level_feature.test b/tests/languages/log/level_feature.test new file mode 100644 index 0000000000..ab47dbb8db --- /dev/null +++ b/tests/languages/log/level_feature.test @@ -0,0 +1,57 @@ +ALERT +CRIT +CRITICAL +EMERG +EMERGENCY +ERR +ERROR +FAILURE +FATAL +SEVERE + +WARN +WARNING + +DISPLAY +INFO +NOTICE +STATUS + +DEBUG +FINE + +FINER +FINEST +TRACE +VERBOSE + +---------------------------------------------------- + +[ + ["level", "ALERT"], + ["level", "CRIT"], + ["level", "CRITICAL"], + ["level", "EMERG"], + ["level", "EMERGENCY"], + ["level", "ERR"], + ["level", "ERROR"], + ["level", "FAILURE"], + ["level", "FATAL"], + ["level", "SEVERE"], + + ["level", "WARN"], + ["level", "WARNING"], + + ["level", "DISPLAY"], + ["level", "INFO"], + ["level", "NOTICE"], + ["level", "STATUS"], + + ["level", "DEBUG"], + ["level", "FINE"], + + ["level", "FINER"], + ["level", "FINEST"], + ["level", "TRACE"], + ["level", "VERBOSE"] +] \ No newline at end of file diff --git a/tests/languages/log/number_feature.test b/tests/languages/log/number_feature.test new file mode 100644 index 0000000000..39740e1ab9 --- /dev/null +++ b/tests/languages/log/number_feature.test @@ -0,0 +1,41 @@ +123 +213.456 +0000000014A9A320 + +0xff +0x3000 +0b01010 +0o777 + +1.2 +v1.2 +v1.2.3 + +32ms +3.70GHz +0.000000s +59.951Hz +1TB + +---------------------------------------------------- + +[ + ["number", "123"], + ["number", "213.456"], + ["number", "0000000014A9A320"], + + ["number", "0xff"], + ["number", "0x3000"], + ["number", "0b01010"], + ["number", "0o777"], + + ["number", "1.2"], + ["number", "v1.2"], + ["number", "v1.2.3"], + + ["number", "32ms"], + ["number", "3.70GHz"], + ["number", "0.000000s"], + ["number", "59.951Hz"], + ["number", "1TB"] +] \ No newline at end of file diff --git a/tests/languages/log/path_feature.test b/tests/languages/log/path_feature.test new file mode 100644 index 0000000000..01221a4fc6 --- /dev/null +++ b/tests/languages/log/path_feature.test @@ -0,0 +1,34 @@ +c:/texlive/texmf-dist/tex/latex/latexconfig/graphics.cfg +C:\stuff\workspace\quickpoll\quickpollEJB\pom.xml +C:\WINDOWS\system32\DRIVERS\storahci.sys + +/USR/SBIN/CRON +/etc/ppp/ip-down + +/usr/share/doc/tama/examples/tama-nanny.exp 2>/dev/null >/dev/null + +/usr/local/lib/node_modules/npm/lib/utils/spawn.js:24:14 + +---------------------------------------------------- + +[ + ["file-path", "c:/texlive/texmf-dist/tex/latex/latexconfig/graphics.cfg"], + ["file-path", "C:\\stuff\\workspace\\quickpoll\\quickpollEJB\\pom.xml"], + ["file-path", "C:\\WINDOWS\\system32\\DRIVERS\\storahci.sys"], + + ["file-path", "/USR/SBIN/CRON"], + ["file-path", "/etc/ppp/ip-down"], + + ["file-path", "/usr/share/doc/tama/examples/tama-nanny.exp"], + ["number", "2"], + ["operator", ">"], + ["file-path", "/dev/null"], + ["operator", ">"], + ["file-path", "/dev/null"], + + ["file-path", "/usr/local/lib/node_modules/npm/lib/utils/spawn.js"], + ["operator", ":"], + ["number", "24"], + ["operator", ":"], + ["number", "14"] +] \ No newline at end of file diff --git a/tests/languages/log/property_feature.test b/tests/languages/log/property_feature.test new file mode 100644 index 0000000000..dfe4784759 --- /dev/null +++ b/tests/languages/log/property_feature.test @@ -0,0 +1,100 @@ +[1119/000645.591:ERROR:process_info.cc(329)] VirtualQueryEx: Zugriff verweigert (0x5) + +Video: + Renderer: Vulkan + Resolution: 1280x720 + Aspect ratio: 16:9 + Frame limit: Auto + Vulkan: + Adapter: GeForce GTX 1080 Ti + Force FIFO present mode: false + Force primitive restart flag: false + Force Disable Exclusive Fullscreen Mode: false + Performance Overlay: + Enabled: false + Enable Framerate Graph: false + Enable Frametime Graph: false + Detail level: Medium + Metrics update interval (ms): 350 + Font size (px): 10 + Body Color (hex): "#FFE138FF" + Body Background (hex): "#002339FF" + Title Color (hex): "#F26C24FF" + Title Background (hex): "#00000000" + Shader Compilation Hint: + Position X (px): 20 + Position Y (px): 690 + +[2020-06-11 16:12:02.642] [DISPLAY] [Main ] [main] Build type: FMB + +Min/Max Sample Rate: 100, 200000 + +---------------------------------------------------- + +[ + ["punctuation", "["], + ["number", "1119"], + ["operator", "/"], + ["number", "000645.591"], + ["operator", ":"], + ["level", "ERROR"], + ["operator", ":"], + "process_info", + ["punctuation", "."], + "cc", + ["operator", "("], + ["number", "329"], + ["operator", ")"], + ["punctuation", "]"], + ["property", "VirtualQueryEx:"], + " Zugriff verweigert ", + ["operator", "("], + ["number", "0x5"], + ["operator", ")"], + + ["property", "Video:"], + ["property", "Renderer:"], " Vulkan\r\n ", + ["property", "Resolution:"], " 1280x720\r\n ", + ["property", "Aspect ratio:"], ["number", "16"], ["operator", ":"], ["number", "9"], + ["property", "Frame limit:"], " Auto\r\n ", + ["property", "Vulkan:"], + ["property", "Adapter:"], " GeForce GTX ", ["number", "1080"], " Ti\r\n ", + ["property", "Force FIFO present mode:"], ["boolean", "false"], + ["property", "Force primitive restart flag:"], ["boolean", "false"], + ["property", "Force Disable Exclusive Fullscreen Mode:"], ["boolean", "false"], + ["property", "Performance Overlay:"], + ["property", "Enabled:"], ["boolean", "false"], + ["property", "Enable Framerate Graph:"], ["boolean", "false"], + ["property", "Enable Frametime Graph:"], ["boolean", "false"], + ["property", "Detail level:"], " Medium\r\n ", + ["property", "Metrics update interval (ms):"], ["number", "350"], + ["property", "Font size (px):"], ["number", "10"], + ["property", "Body Color (hex):"], ["string", "\"#FFE138FF\""], + ["property", "Body Background (hex):"], ["string", "\"#002339FF\""], + ["property", "Title Color (hex):"], ["string", "\"#F26C24FF\""], + ["property", "Title Background (hex):"], ["string", "\"#00000000\""], + ["property", "Shader Compilation Hint:"], + ["property", "Position X (px):"], ["number", "20"], + ["property", "Position Y (px):"], ["number", "690"], + + ["punctuation", "["], + ["date", "2020-06-11"], + ["time", "16:12:02.642"], + ["punctuation", "]"], + ["punctuation", "["], + ["level", "DISPLAY"], + ["punctuation", "]"], + ["punctuation", "["], + "Main ", + ["punctuation", "]"], + ["punctuation", "["], + "main", + ["punctuation", "]"], + ["property", "Build type:"], + " FMB\r\n\r\n", + + ["property", "Min/Max Sample Rate:"], + ["number", "100"], + ["punctuation", ","], + ["number", "200000"] +] \ No newline at end of file diff --git a/tests/languages/log/separator_feature.test b/tests/languages/log/separator_feature.test new file mode 100644 index 0000000000..ddc0fd2243 --- /dev/null +++ b/tests/languages/log/separator_feature.test @@ -0,0 +1,50 @@ +----- + +sysadm.bda.nasa.gov - - [28/Jul/1995:13:30:20 -0400] "GET /elv/endba11.gif HTTP/1.0" 200 306 + +2017-05-11 15:05:28.889 INFO 30284 --- [ost-staItStop-1] o.s.web.context.ContextLoadeI : Root WebApplicationContext: initialization completed in 911 ms + +---------------------------------------------------- + +[ + ["separator", "-----"], + + ["domain", "sysadm.bda.nasa.gov"], + ["separator", "- - "], + ["punctuation", "["], + ["date", "28/Jul/1995"], + ["operator", ":"], + ["time", "13:30:20 -0400"], + ["punctuation", "]"], + ["string", "\"GET /elv/endba11.gif HTTP/1.0\""], + ["number", "200"], + ["number", "306"], + + ["date", "2017-05-11"], + ["time", "15:05:28.889"], + ["level", "INFO"], + ["number", "30284"], + ["separator", "---"], + ["punctuation", "["], + "ost", + ["operator", "-"], + "staItStop", + ["operator", "-"], + ["number", "1"], + ["punctuation", "]"], + " o", + ["punctuation", "."], + "s", + ["punctuation", "."], + "web", + ["punctuation", "."], + "context", + ["punctuation", "."], + "ContextLoadeI ", + ["operator", ":"], + " Root WebApplicationContext", + ["operator", ":"], + " initialization completed in ", + ["number", "911"], + " ms" +] \ No newline at end of file diff --git a/tests/languages/log/string_feature.test b/tests/languages/log/string_feature.test new file mode 100644 index 0000000000..76ae838cb5 --- /dev/null +++ b/tests/languages/log/string_feature.test @@ -0,0 +1,39 @@ +"GET /history/apollo/images/apollo-log01.gif HTTP/1.0" +"{[/],methods=[GET]}" + +TLSv1.2 ECDHE-RSA-AES128-GCM-SHA256 2.2.2.2 "Mozilla/5.0 (iPhone; CPU iPhone OS 9_1 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Version/9.0 Mobile/13B143 Safari/601.1" + +13 error argv "/usr/local/bin/node" "/usr/local/bin/npm" "start" + +This isn't a string but this is: 'string' + +---------------------------------------------------- + +[ + ["string", "\"GET /history/apollo/images/apollo-log01.gif HTTP/1.0\""], + ["string", "\"{[/],methods=[GET]}\""], + + "\r\n\r\nTLSv1", + ["punctuation", "."], + "2 ECDHE", + ["operator", "-"], + "RSA", + ["operator", "-"], + "AES128", + ["operator", "-"], + "GCM", + ["operator", "-"], + "SHA256 ", + ["ip-address", "2.2.2.2"], + ["string", "\"Mozilla/5.0 (iPhone; CPU iPhone OS 9_1 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Version/9.0 Mobile/13B143 Safari/601.1\""], + + ["number", "13"], + " error argv ", + ["string", "\"/usr/local/bin/node\""], + ["string", "\"/usr/local/bin/npm\""], + ["string", "\"start\""], + + "\r\n\r\nThis isn't a string but this is", + ["operator", ":"], + ["string", "'string'"] +] \ No newline at end of file diff --git a/tests/languages/log/time_feature.test b/tests/languages/log/time_feature.test new file mode 100644 index 0000000000..0e88f3422f --- /dev/null +++ b/tests/languages/log/time_feature.test @@ -0,0 +1,25 @@ +9:52:58 +15:05:28.889 +19:38:12,729 +00:29:13:038 +13:30:12 + +13:30:19 -0400 +13:30:15 +9400 + +2020-03-23T04:21:20Z + +---------------------------------------------------- + +[ + ["time", "9:52:58"], + ["time", "15:05:28.889"], + ["time", "19:38:12,729"], + ["time", "00:29:13:038"], + ["time", "13:30:12"], + + ["time", "13:30:19 -0400"], + ["time", "13:30:15 +9400"], + + ["date", "2020-03-23T"], ["time", "04:21:20Z"] +] \ No newline at end of file diff --git a/tests/languages/log/url_feature.test b/tests/languages/log/url_feature.test new file mode 100644 index 0000000000..4562b7645d --- /dev/null +++ b/tests/languages/log/url_feature.test @@ -0,0 +1,30 @@ +http://66.140.25.157:802/ +file://c:/repository + +Foo + +- Mapping virtual host: http://download.spinetix.com/spxjslibs + +Failed to transfer file: http://repo.xxxx.com/foo/bar.pom. Return code is + +---------------------------------------------------- + +[ + ["url", "http://66.140.25.157:802/"], + ["url", "file://c:/repository"], + + "\r\n\r\nFoo ", + ["operator", "<"], + ["url", "https://foo.bar/contact.html"], + ["operator", ">"], + + ["operator", "-"], + " Mapping virtual host", + ["operator", ":"], + ["url", "http://download.spinetix.com/spxjslibs"], + + ["property", "Failed to transfer file:"], + ["url", "http://repo.xxxx.com/foo/bar.pom"], + ["punctuation", "."], + " Return code is" +] \ No newline at end of file diff --git a/tests/languages/log/uuid_feature.test b/tests/languages/log/uuid_feature.test new file mode 100644 index 0000000000..cf7a1716e0 --- /dev/null +++ b/tests/languages/log/uuid_feature.test @@ -0,0 +1,9 @@ +86695F12-340E-4F04-9FD3-9253DD327460 +F9F19DA5-3B09-4B2F-9D89-C64753E3EAAB + +---------------------------------------------------- + +[ + ["uuid", "86695F12-340E-4F04-9FD3-9253DD327460"], + ["uuid", "F9F19DA5-3B09-4B2F-9D89-C64753E3EAAB"] +] \ No newline at end of file From 7e5f78ffd5c7c8d3a72582df867994eccd014fed Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Sun, 21 Mar 2021 16:50:31 +0100 Subject: [PATCH 0763/1100] Added support for COBOL (#2800) --- components.js | 2 +- components.json | 4 + components/prism-cobol.js | 53 ++++++++ components/prism-cobol.min.js | 1 + examples/prism-cobol.html | 26 ++++ plugins/show-language/prism-show-language.js | 1 + .../show-language/prism-show-language.min.js | 2 +- tests/languages/cobol/boolean_feature.test | 9 ++ tests/languages/cobol/class-name_feature.test | 84 ++++++++++++ tests/languages/cobol/comment_feature.test | 11 ++ tests/languages/cobol/level_feature.test | 126 ++++++++++++++++++ tests/languages/cobol/number_feature.test | 23 ++++ tests/languages/cobol/operator_feature.test | 21 +++ .../languages/cobol/punctuation_feature.test | 9 ++ tests/languages/cobol/string_feature.test | 13 ++ 15 files changed, 383 insertions(+), 2 deletions(-) create mode 100644 components/prism-cobol.js create mode 100644 components/prism-cobol.min.js create mode 100644 examples/prism-cobol.html create mode 100644 tests/languages/cobol/boolean_feature.test create mode 100644 tests/languages/cobol/class-name_feature.test create mode 100644 tests/languages/cobol/comment_feature.test create mode 100644 tests/languages/cobol/level_feature.test create mode 100644 tests/languages/cobol/number_feature.test create mode 100644 tests/languages/cobol/operator_feature.test create mode 100644 tests/languages/cobol/punctuation_feature.test create mode 100644 tests/languages/cobol/string_feature.test diff --git a/components.js b/components.js index edf269e5b8..3f18020000 100644 --- a/components.js +++ b/components.js @@ -1,2 +1,2 @@ -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml","ssml","atom","rss"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","ssml":"SSML","atom":"Atom","rss":"RSS"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","optional":"regex","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"ABNF","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"agda":{"title":"Agda","owner":"xy-ren"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apex":{"title":"Apex","require":["clike","sql"],"owner":"RunDevelopment"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"dkern"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"birb":{"title":"Birb","require":"clike","owner":"Calamity210"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"BNF","alias":"rbnf","aliasTitles":{"rbnf":"RBNF"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"bsl":{"title":"BSL (1C:Enterprise)","alias":"oscript","aliasTitles":{"oscript":"OneScript"},"owner":"Diversus23"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cfscript":{"title":"CFScript","require":"clike","alias":"cfc","owner":"mjclemente"},"chaiscript":{"title":"ChaiScript","require":["clike","cpp"],"owner":"RunDevelopment"},"cil":{"title":"CIL","owner":"sbrl"},"clojure":{"title":"Clojure","owner":"troglotit"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"csv":{"title":"CSV","owner":"RunDevelopment"},"cypher":{"title":"Cypher","owner":"RunDevelopment"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dataweave":{"title":"DataWeave","owner":"machaval"},"dax":{"title":"DAX","owner":"peterbud"},"dhall":{"title":"Dhall","owner":"RunDevelopment"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"dot":{"title":"DOT (Graphviz)","alias":"gv","optional":"markup","owner":"RunDevelopment"},"ebnf":{"title":"EBNF","owner":"RunDevelopment"},"editorconfig":{"title":"EditorConfig","owner":"osipxd"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"false":{"title":"False","owner":"edukisto"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"c","owner":"Golmote"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","optional":"markdown","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"hlsl":{"title":"HLSL","require":"c","owner":"RunDevelopment"},"http":{"title":"HTTP","optional":["css","javascript","json","markup","uri"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"icu-message-format":{"title":"ICU Message Format","owner":"RunDevelopment"},"idris":{"title":"Idris","alias":"idr","owner":"KeenS","require":"haskell"},"ignore":{"title":".ignore","owner":"osipxd","alias":["gitignore","hgignore","npmignore"],"aliasTitles":{"gitignore":".gitignore","hgignore":".hgignore","npmignore":".npmignore"}},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike","typescript"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","alias":"webmanifest","aliasTitles":{"webmanifest":"Web App Manifest"},"owner":"CupOfTea696"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"jsstacktrace":{"title":"JS stack trace","owner":"sbrl"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","alias":["kt","kts"],"aliasTitles":{"kts":"Kotlin Script"},"require":"clike","owner":"Golmote"},"kumir":{"title":"KuMir (КуМир)","alias":"kum","owner":"edukisto"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"log":{"title":"Log file","owner":"RunDevelopment"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","optional":"yaml","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"mongodb":{"title":"MongoDB","owner":"airs0urce","require":"javascript"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"naniscript":{"title":"Naninovel Script","owner":"Elringus","alias":"nani"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nevod":{"title":"Nevod","owner":"nezaboodka"},"nginx":{"title":"nginx","owner":"volado"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"openqasm":{"title":"OpenQasm","alias":"qasm","owner":"RunDevelopment"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"psl":{"title":"PATROL Scripting Language","owner":"bertysentry"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":"markup-templating","owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"promql":{"title":"PromQL","owner":"arendjr"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"purebasic":{"title":"PureBasic","require":"clike","alias":"pbfasm","owner":"HeX0R101"},"purescript":{"title":"PureScript","require":"haskell","alias":"purs","owner":"sriharshachilakapati"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"racket":{"title":"Racket","require":"scheme","alias":"rkt","owner":"RunDevelopment"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","owner":"RunDevelopment"},"rego":{"title":"Rego","owner":"JordanSh"},"renpy":{"title":"Ren'py","alias":"rpy","owner":"HyuchiaDiego"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","alias":["sh-session","shellsession"],"owner":"RunDevelopment"},"smali":{"title":"Smali","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sml":{"title":"SML","alias":"smlnj","aliasTitles":{"smlnj":"SML/NJ"},"owner":"RunDevelopment"},"solidity":{"title":"Solidity (Ethereum)","alias":"sol","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"squirrel":{"title":"Squirrel","require":"clike","owner":"RunDevelopment"},"stan":{"title":"Stan","owner":"RunDevelopment"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","vbnet"],"owner":"RunDevelopment"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"typoscript":{"title":"TypoScript","alias":"tsconfig","aliasTitles":{"tsconfig":"TSConfig"},"owner":"dkern"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"uri":{"title":"URI","alias":"url","aliasTitles":{"url":"URL"},"owner":"RunDevelopment"},"v":{"title":"V","require":"clike","owner":"taggon"},"vala":{"title":"Vala","require":"clike","optional":"regex","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":["vb","vba"],"aliasTitles":{"vba":"VBA"},"owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xml-doc":{"title":"XML doc (.net)","require":"markup","modify":["csharp","fsharp","vbnet"],"owner":"RunDevelopment"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"yang":{"title":"YANG","owner":"RunDevelopment"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml","ssml","atom","rss"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","ssml":"SSML","atom":"Atom","rss":"RSS"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","optional":"regex","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"ABNF","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"agda":{"title":"Agda","owner":"xy-ren"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apex":{"title":"Apex","require":["clike","sql"],"owner":"RunDevelopment"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"dkern"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"birb":{"title":"Birb","require":"clike","owner":"Calamity210"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"BNF","alias":"rbnf","aliasTitles":{"rbnf":"RBNF"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"bsl":{"title":"BSL (1C:Enterprise)","alias":"oscript","aliasTitles":{"oscript":"OneScript"},"owner":"Diversus23"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cfscript":{"title":"CFScript","require":"clike","alias":"cfc","owner":"mjclemente"},"chaiscript":{"title":"ChaiScript","require":["clike","cpp"],"owner":"RunDevelopment"},"cil":{"title":"CIL","owner":"sbrl"},"clojure":{"title":"Clojure","owner":"troglotit"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"cobol":{"title":"COBOL","owner":"RunDevelopment"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"csv":{"title":"CSV","owner":"RunDevelopment"},"cypher":{"title":"Cypher","owner":"RunDevelopment"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dataweave":{"title":"DataWeave","owner":"machaval"},"dax":{"title":"DAX","owner":"peterbud"},"dhall":{"title":"Dhall","owner":"RunDevelopment"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"dot":{"title":"DOT (Graphviz)","alias":"gv","optional":"markup","owner":"RunDevelopment"},"ebnf":{"title":"EBNF","owner":"RunDevelopment"},"editorconfig":{"title":"EditorConfig","owner":"osipxd"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"false":{"title":"False","owner":"edukisto"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"c","owner":"Golmote"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","optional":"markdown","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"hlsl":{"title":"HLSL","require":"c","owner":"RunDevelopment"},"http":{"title":"HTTP","optional":["css","javascript","json","markup","uri"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"icu-message-format":{"title":"ICU Message Format","owner":"RunDevelopment"},"idris":{"title":"Idris","alias":"idr","owner":"KeenS","require":"haskell"},"ignore":{"title":".ignore","owner":"osipxd","alias":["gitignore","hgignore","npmignore"],"aliasTitles":{"gitignore":".gitignore","hgignore":".hgignore","npmignore":".npmignore"}},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike","typescript"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","alias":"webmanifest","aliasTitles":{"webmanifest":"Web App Manifest"},"owner":"CupOfTea696"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"jsstacktrace":{"title":"JS stack trace","owner":"sbrl"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","alias":["kt","kts"],"aliasTitles":{"kts":"Kotlin Script"},"require":"clike","owner":"Golmote"},"kumir":{"title":"KuMir (КуМир)","alias":"kum","owner":"edukisto"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"log":{"title":"Log file","owner":"RunDevelopment"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","optional":"yaml","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"mongodb":{"title":"MongoDB","owner":"airs0urce","require":"javascript"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"naniscript":{"title":"Naninovel Script","owner":"Elringus","alias":"nani"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nevod":{"title":"Nevod","owner":"nezaboodka"},"nginx":{"title":"nginx","owner":"volado"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"openqasm":{"title":"OpenQasm","alias":"qasm","owner":"RunDevelopment"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"psl":{"title":"PATROL Scripting Language","owner":"bertysentry"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":"markup-templating","owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"promql":{"title":"PromQL","owner":"arendjr"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"purebasic":{"title":"PureBasic","require":"clike","alias":"pbfasm","owner":"HeX0R101"},"purescript":{"title":"PureScript","require":"haskell","alias":"purs","owner":"sriharshachilakapati"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"racket":{"title":"Racket","require":"scheme","alias":"rkt","owner":"RunDevelopment"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","owner":"RunDevelopment"},"rego":{"title":"Rego","owner":"JordanSh"},"renpy":{"title":"Ren'py","alias":"rpy","owner":"HyuchiaDiego"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","alias":["sh-session","shellsession"],"owner":"RunDevelopment"},"smali":{"title":"Smali","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sml":{"title":"SML","alias":"smlnj","aliasTitles":{"smlnj":"SML/NJ"},"owner":"RunDevelopment"},"solidity":{"title":"Solidity (Ethereum)","alias":"sol","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"squirrel":{"title":"Squirrel","require":"clike","owner":"RunDevelopment"},"stan":{"title":"Stan","owner":"RunDevelopment"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","vbnet"],"owner":"RunDevelopment"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"typoscript":{"title":"TypoScript","alias":"tsconfig","aliasTitles":{"tsconfig":"TSConfig"},"owner":"dkern"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"uri":{"title":"URI","alias":"url","aliasTitles":{"url":"URL"},"owner":"RunDevelopment"},"v":{"title":"V","require":"clike","owner":"taggon"},"vala":{"title":"Vala","require":"clike","optional":"regex","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":["vb","vba"],"aliasTitles":{"vba":"VBA"},"owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xml-doc":{"title":"XML doc (.net)","require":"markup","modify":["csharp","fsharp","vbnet"],"owner":"RunDevelopment"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"yang":{"title":"YANG","owner":"RunDevelopment"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; if (typeof module !== 'undefined' && module.exports) { module.exports = components; } \ No newline at end of file diff --git a/components.json b/components.json index 836c4f6521..e7ea448605 100644 --- a/components.json +++ b/components.json @@ -261,6 +261,10 @@ "title": "CMake", "owner": "mjrogozinski" }, + "cobol": { + "title": "COBOL", + "owner": "RunDevelopment" + }, "coffeescript": { "title": "CoffeeScript", "require": "javascript", diff --git a/components/prism-cobol.js b/components/prism-cobol.js new file mode 100644 index 0000000000..6ad0ac80c9 --- /dev/null +++ b/components/prism-cobol.js @@ -0,0 +1,53 @@ +Prism.languages.cobol = { + 'comment': { + pattern: /\*>.*|(^[ \t]*)\*.*/m, + lookbehind: true, + greedy: true + }, + 'string': { + pattern: /[xzgn]?(?:"(?:[^\r\n"]|"")*"(?!")|'(?:[^\r\n']|'')*'(?!'))/i, + greedy: true + }, + + 'level': { + pattern: /(^[ \t]*)\d+\b/m, + lookbehind: true, + greedy: true, + alias: 'number' + }, + + 'class-name': { + // https://github.com/antlr/grammars-v4/blob/42edd5b687d183b5fa679e858a82297bd27141e7/cobol85/Cobol85.g4#L1015 + pattern: /(\bpic(?:ture)?\s+)(?:(?:[-\w$/,:*+<>]|\.(?!\s|$))(?:\(\d+\))?)+/i, + lookbehind: true, + inside: { + 'number': { + pattern: /(\()\d+/, + lookbehind: true + }, + 'punctuation': /[()]/ + } + }, + + 'keyword': { + pattern: /(^|[^\w-])(?:ABORT|ACCEPT|ACCESS|ADD|ADDRESS|ADVANCING|AFTER|ALIGNED|ALL|ALPHABET|ALPHABETIC|ALPHABETIC-LOWER|ALPHABETIC-UPPER|ALPHANUMERIC|ALPHANUMERIC-EDITED|ALSO|ALTER|ALTERNATE|ANY|ARE|AREA|AREAS|AS|ASCENDING|ASCII|ASSIGN|ASSOCIATED-DATA|ASSOCIATED-DATA-LENGTH|AT|ATTRIBUTE|AUTHOR|AUTO|AUTO-SKIP|BACKGROUND-COLOR|BACKGROUND-COLOUR|BASIS|BEEP|BEFORE|BEGINNING|BELL|BINARY|BIT|BLANK|BLINK|BLOCK|BOUNDS|BOTTOM|BY|BYFUNCTION|BYTITLE|CALL|CANCEL|CAPABLE|CCSVERSION|CD|CF|CH|CHAINING|CHANGED|CHANNEL|CHARACTER|CHARACTERS|CLASS|CLASS-ID|CLOCK-UNITS|CLOSE|CLOSE-DISPOSITION|COBOL|CODE|CODE-SET|COLLATING|COL|COLUMN|COM-REG|COMMA|COMMITMENT|COMMON|COMMUNICATION|COMP|COMP-1|COMP-2|COMP-3|COMP-4|COMP-5|COMPUTATIONAL|COMPUTATIONAL-1|COMPUTATIONAL-2|COMPUTATIONAL-3|COMPUTATIONAL-4|COMPUTATIONAL-5|COMPUTE|CONFIGURATION|CONTAINS|CONTENT|CONTINUE|CONTROL|CONTROL-POINT|CONTROLS|CONVENTION|CONVERTING|COPY|CORR|CORRESPONDING|COUNT|CRUNCH|CURRENCY|CURSOR|DATA|DATA-BASE|DATE|DATE-COMPILED|DATE-WRITTEN|DAY|DAY-OF-WEEK|DBCS|DE|DEBUG-CONTENTS|DEBUG-ITEM|DEBUG-LINE|DEBUG-NAME|DEBUG-SUB-1|DEBUG-SUB-2|DEBUG-SUB-3|DEBUGGING|DECIMAL-POINT|DECLARATIVES|DEFAULT|DEFAULT-DISPLAY|DEFINITION|DELETE|DELIMITED|DELIMITER|DEPENDING|DESCENDING|DESTINATION|DETAIL|DFHRESP|DFHVALUE|DISABLE|DISK|DISPLAY|DISPLAY-1|DIVIDE|DIVISION|DONTCARE|DOUBLE|DOWN|DUPLICATES|DYNAMIC|EBCDIC|EGCS|EGI|ELSE|EMI|EMPTY-CHECK|ENABLE|END|END-ACCEPT|END-ADD|END-CALL|END-COMPUTE|END-DELETE|END-DIVIDE|END-EVALUATE|END-IF|END-MULTIPLY|END-OF-PAGE|END-PERFORM|END-READ|END-RECEIVE|END-RETURN|END-REWRITE|END-SEARCH|END-START|END-STRING|END-SUBTRACT|END-UNSTRING|END-WRITE|ENDING|ENTER|ENTRY|ENTRY-PROCEDURE|ENVIRONMENT|EOP|ERASE|ERROR|EOL|EOS|ESCAPE|ESI|EVALUATE|EVENT|EVERY|EXCEPTION|EXCLUSIVE|EXHIBIT|EXIT|EXPORT|EXTEND|EXTENDED|EXTERNAL|FD|FILE|FILE-CONTROL|FILLER|FINAL|FIRST|FOOTING|FOR|FOREGROUND-COLOR|FOREGROUND-COLOUR|FROM|FULL|FUNCTION|FUNCTIONNAME|FUNCTION-POINTER|GENERATE|GOBACK|GIVING|GLOBAL|GO|GRID|GROUP|HEADING|HIGHLIGHT|HIGH-VALUE|HIGH-VALUES|I-O|I-O-CONTROL|ID|IDENTIFICATION|IF|IMPLICIT|IMPORT|IN|INDEX|INDEXED|INDICATE|INITIAL|INITIALIZE|INITIATE|INPUT|INPUT-OUTPUT|INSPECT|INSTALLATION|INTEGER|INTO|INVALID|INVOKE|IS|JUST|JUSTIFIED|KANJI|KEPT|KEY|KEYBOARD|LABEL|LANGUAGE|LAST|LB|LD|LEADING|LEFT|LEFTLINE|LENGTH|LENGTH-CHECK|LIBACCESS|LIBPARAMETER|LIBRARY|LIMIT|LIMITS|LINAGE|LINAGE-COUNTER|LINE|LINES|LINE-COUNTER|LINKAGE|LIST|LOCAL|LOCAL-STORAGE|LOCK|LONG-DATE|LONG-TIME|LOWER|LOWLIGHT|LOW-VALUE|LOW-VALUES|MEMORY|MERGE|MESSAGE|MMDDYYYY|MODE|MODULES|MORE-LABELS|MOVE|MULTIPLE|MULTIPLY|NAMED|NATIONAL|NATIONAL-EDITED|NATIVE|NEGATIVE|NETWORK|NEXT|NO|NO-ECHO|NULL|NULLS|NUMBER|NUMERIC|NUMERIC-DATE|NUMERIC-EDITED|NUMERIC-TIME|OBJECT-COMPUTER|OCCURS|ODT|OF|OFF|OMITTED|ON|OPEN|OPTIONAL|ORDER|ORDERLY|ORGANIZATION|OTHER|OUTPUT|OVERFLOW|OVERLINE|OWN|PACKED-DECIMAL|PADDING|PAGE|PAGE-COUNTER|PASSWORD|PERFORM|PF|PH|PIC|PICTURE|PLUS|POINTER|POSITION|POSITIVE|PORT|PRINTER|PRINTING|PRIVATE|PROCEDURE|PROCEDURE-POINTER|PROCEDURES|PROCEED|PROCESS|PROGRAM|PROGRAM-ID|PROGRAM-LIBRARY|PROMPT|PURGE|QUEUE|QUOTE|QUOTES|RANDOM|READER|REMOTE|RD|REAL|READ|RECEIVE|RECEIVED|RECORD|RECORDING|RECORDS|RECURSIVE|REDEFINES|REEL|REF|REFERENCE|REFERENCES|RELATIVE|RELEASE|REMAINDER|REMARKS|REMOVAL|REMOVE|RENAMES|REPLACE|REPLACING|REPORT|REPORTING|REPORTS|REQUIRED|RERUN|RESERVE|REVERSE-VIDEO|RESET|RETURN|RETURN-CODE|RETURNING|REVERSED|REWIND|REWRITE|RF|RH|RIGHT|ROUNDED|RUN|SAME|SAVE|SCREEN|SD|SEARCH|SECTION|SECURE|SECURITY|SEGMENT|SEGMENT-LIMIT|SELECT|SEND|SENTENCE|SEPARATE|SEQUENCE|SEQUENTIAL|SET|SHARED|SHAREDBYALL|SHAREDBYRUNUNIT|SHARING|SHIFT-IN|SHIFT-OUT|SHORT-DATE|SIGN|SIZE|SORT|SORT-CONTROL|SORT-CORE-SIZE|SORT-FILE-SIZE|SORT-MERGE|SORT-MESSAGE|SORT-MODE-SIZE|SORT-RETURN|SOURCE|SOURCE-COMPUTER|SPACE|SPACES|SPECIAL-NAMES|STANDARD|STANDARD-1|STANDARD-2|START|STATUS|STOP|STRING|SUB-QUEUE-1|SUB-QUEUE-2|SUB-QUEUE-3|SUBTRACT|SUM|SUPPRESS|SYMBOL|SYMBOLIC|SYNC|SYNCHRONIZED|TABLE|TALLY|TALLYING|TASK|TAPE|TERMINAL|TERMINATE|TEST|TEXT|THEN|THREAD|THREAD-LOCAL|THROUGH|THRU|TIME|TIMER|TIMES|TITLE|TO|TODAYS-DATE|TODAYS-NAME|TOP|TRAILING|TRUNCATED|TYPE|TYPEDEF|UNDERLINE|UNIT|UNSTRING|UNTIL|UP|UPON|USAGE|USE|USING|VALUE|VALUES|VARYING|VIRTUAL|WAIT|WHEN|WHEN-COMPILED|WITH|WORDS|WORKING-STORAGE|WRITE|YEAR|YYYYMMDD|YYYYDDD|ZERO-FILL|ZEROS|ZEROES)(?![\w-])/i, + lookbehind: true + }, + + 'boolean': { + pattern: /(^|[^\w-])(?:false|true)(?![\w-])/i, + lookbehind: true + }, + 'number': { + pattern: /(^|[^\w-])(?:[+-]?(?:(?:\d+(?:[.,]\d+)?|[.,]\d+)(?:e[+-]?\d+)?|zero))(?![\w-])/i, + lookbehind: true + }, + 'operator': [ + /<>|[<>]=?|[=+*/&]/, + { + pattern: /(^|[^\w-])(?:-|and|equal|greater|less|not|or|than)(?![\w-])/i, + lookbehind: true + } + ], + 'punctuation': /[.:,()]/ +}; diff --git a/components/prism-cobol.min.js b/components/prism-cobol.min.js new file mode 100644 index 0000000000..b45cafe377 --- /dev/null +++ b/components/prism-cobol.min.js @@ -0,0 +1 @@ +Prism.languages.cobol={comment:{pattern:/\*>.*|(^[ \t]*)\*.*/m,lookbehind:!0,greedy:!0},string:{pattern:/[xzgn]?(?:"(?:[^\r\n"]|"")*"(?!")|'(?:[^\r\n']|'')*'(?!'))/i,greedy:!0},level:{pattern:/(^[ \t]*)\d+\b/m,lookbehind:!0,greedy:!0,alias:"number"},"class-name":{pattern:/(\bpic(?:ture)?\s+)(?:(?:[-\w$/,:*+<>]|\.(?!\s|$))(?:\(\d+\))?)+/i,lookbehind:!0,inside:{number:{pattern:/(\()\d+/,lookbehind:!0},punctuation:/[()]/}},keyword:{pattern:/(^|[^\w-])(?:ABORT|ACCEPT|ACCESS|ADD|ADDRESS|ADVANCING|AFTER|ALIGNED|ALL|ALPHABET|ALPHABETIC|ALPHABETIC-LOWER|ALPHABETIC-UPPER|ALPHANUMERIC|ALPHANUMERIC-EDITED|ALSO|ALTER|ALTERNATE|ANY|ARE|AREA|AREAS|AS|ASCENDING|ASCII|ASSIGN|ASSOCIATED-DATA|ASSOCIATED-DATA-LENGTH|AT|ATTRIBUTE|AUTHOR|AUTO|AUTO-SKIP|BACKGROUND-COLOR|BACKGROUND-COLOUR|BASIS|BEEP|BEFORE|BEGINNING|BELL|BINARY|BIT|BLANK|BLINK|BLOCK|BOUNDS|BOTTOM|BY|BYFUNCTION|BYTITLE|CALL|CANCEL|CAPABLE|CCSVERSION|CD|CF|CH|CHAINING|CHANGED|CHANNEL|CHARACTER|CHARACTERS|CLASS|CLASS-ID|CLOCK-UNITS|CLOSE|CLOSE-DISPOSITION|COBOL|CODE|CODE-SET|COLLATING|COL|COLUMN|COM-REG|COMMA|COMMITMENT|COMMON|COMMUNICATION|COMP|COMP-1|COMP-2|COMP-3|COMP-4|COMP-5|COMPUTATIONAL|COMPUTATIONAL-1|COMPUTATIONAL-2|COMPUTATIONAL-3|COMPUTATIONAL-4|COMPUTATIONAL-5|COMPUTE|CONFIGURATION|CONTAINS|CONTENT|CONTINUE|CONTROL|CONTROL-POINT|CONTROLS|CONVENTION|CONVERTING|COPY|CORR|CORRESPONDING|COUNT|CRUNCH|CURRENCY|CURSOR|DATA|DATA-BASE|DATE|DATE-COMPILED|DATE-WRITTEN|DAY|DAY-OF-WEEK|DBCS|DE|DEBUG-CONTENTS|DEBUG-ITEM|DEBUG-LINE|DEBUG-NAME|DEBUG-SUB-1|DEBUG-SUB-2|DEBUG-SUB-3|DEBUGGING|DECIMAL-POINT|DECLARATIVES|DEFAULT|DEFAULT-DISPLAY|DEFINITION|DELETE|DELIMITED|DELIMITER|DEPENDING|DESCENDING|DESTINATION|DETAIL|DFHRESP|DFHVALUE|DISABLE|DISK|DISPLAY|DISPLAY-1|DIVIDE|DIVISION|DONTCARE|DOUBLE|DOWN|DUPLICATES|DYNAMIC|EBCDIC|EGCS|EGI|ELSE|EMI|EMPTY-CHECK|ENABLE|END|END-ACCEPT|END-ADD|END-CALL|END-COMPUTE|END-DELETE|END-DIVIDE|END-EVALUATE|END-IF|END-MULTIPLY|END-OF-PAGE|END-PERFORM|END-READ|END-RECEIVE|END-RETURN|END-REWRITE|END-SEARCH|END-START|END-STRING|END-SUBTRACT|END-UNSTRING|END-WRITE|ENDING|ENTER|ENTRY|ENTRY-PROCEDURE|ENVIRONMENT|EOP|ERASE|ERROR|EOL|EOS|ESCAPE|ESI|EVALUATE|EVENT|EVERY|EXCEPTION|EXCLUSIVE|EXHIBIT|EXIT|EXPORT|EXTEND|EXTENDED|EXTERNAL|FD|FILE|FILE-CONTROL|FILLER|FINAL|FIRST|FOOTING|FOR|FOREGROUND-COLOR|FOREGROUND-COLOUR|FROM|FULL|FUNCTION|FUNCTIONNAME|FUNCTION-POINTER|GENERATE|GOBACK|GIVING|GLOBAL|GO|GRID|GROUP|HEADING|HIGHLIGHT|HIGH-VALUE|HIGH-VALUES|I-O|I-O-CONTROL|ID|IDENTIFICATION|IF|IMPLICIT|IMPORT|IN|INDEX|INDEXED|INDICATE|INITIAL|INITIALIZE|INITIATE|INPUT|INPUT-OUTPUT|INSPECT|INSTALLATION|INTEGER|INTO|INVALID|INVOKE|IS|JUST|JUSTIFIED|KANJI|KEPT|KEY|KEYBOARD|LABEL|LANGUAGE|LAST|LB|LD|LEADING|LEFT|LEFTLINE|LENGTH|LENGTH-CHECK|LIBACCESS|LIBPARAMETER|LIBRARY|LIMIT|LIMITS|LINAGE|LINAGE-COUNTER|LINE|LINES|LINE-COUNTER|LINKAGE|LIST|LOCAL|LOCAL-STORAGE|LOCK|LONG-DATE|LONG-TIME|LOWER|LOWLIGHT|LOW-VALUE|LOW-VALUES|MEMORY|MERGE|MESSAGE|MMDDYYYY|MODE|MODULES|MORE-LABELS|MOVE|MULTIPLE|MULTIPLY|NAMED|NATIONAL|NATIONAL-EDITED|NATIVE|NEGATIVE|NETWORK|NEXT|NO|NO-ECHO|NULL|NULLS|NUMBER|NUMERIC|NUMERIC-DATE|NUMERIC-EDITED|NUMERIC-TIME|OBJECT-COMPUTER|OCCURS|ODT|OF|OFF|OMITTED|ON|OPEN|OPTIONAL|ORDER|ORDERLY|ORGANIZATION|OTHER|OUTPUT|OVERFLOW|OVERLINE|OWN|PACKED-DECIMAL|PADDING|PAGE|PAGE-COUNTER|PASSWORD|PERFORM|PF|PH|PIC|PICTURE|PLUS|POINTER|POSITION|POSITIVE|PORT|PRINTER|PRINTING|PRIVATE|PROCEDURE|PROCEDURE-POINTER|PROCEDURES|PROCEED|PROCESS|PROGRAM|PROGRAM-ID|PROGRAM-LIBRARY|PROMPT|PURGE|QUEUE|QUOTE|QUOTES|RANDOM|READER|REMOTE|RD|REAL|READ|RECEIVE|RECEIVED|RECORD|RECORDING|RECORDS|RECURSIVE|REDEFINES|REEL|REF|REFERENCE|REFERENCES|RELATIVE|RELEASE|REMAINDER|REMARKS|REMOVAL|REMOVE|RENAMES|REPLACE|REPLACING|REPORT|REPORTING|REPORTS|REQUIRED|RERUN|RESERVE|REVERSE-VIDEO|RESET|RETURN|RETURN-CODE|RETURNING|REVERSED|REWIND|REWRITE|RF|RH|RIGHT|ROUNDED|RUN|SAME|SAVE|SCREEN|SD|SEARCH|SECTION|SECURE|SECURITY|SEGMENT|SEGMENT-LIMIT|SELECT|SEND|SENTENCE|SEPARATE|SEQUENCE|SEQUENTIAL|SET|SHARED|SHAREDBYALL|SHAREDBYRUNUNIT|SHARING|SHIFT-IN|SHIFT-OUT|SHORT-DATE|SIGN|SIZE|SORT|SORT-CONTROL|SORT-CORE-SIZE|SORT-FILE-SIZE|SORT-MERGE|SORT-MESSAGE|SORT-MODE-SIZE|SORT-RETURN|SOURCE|SOURCE-COMPUTER|SPACE|SPACES|SPECIAL-NAMES|STANDARD|STANDARD-1|STANDARD-2|START|STATUS|STOP|STRING|SUB-QUEUE-1|SUB-QUEUE-2|SUB-QUEUE-3|SUBTRACT|SUM|SUPPRESS|SYMBOL|SYMBOLIC|SYNC|SYNCHRONIZED|TABLE|TALLY|TALLYING|TASK|TAPE|TERMINAL|TERMINATE|TEST|TEXT|THEN|THREAD|THREAD-LOCAL|THROUGH|THRU|TIME|TIMER|TIMES|TITLE|TO|TODAYS-DATE|TODAYS-NAME|TOP|TRAILING|TRUNCATED|TYPE|TYPEDEF|UNDERLINE|UNIT|UNSTRING|UNTIL|UP|UPON|USAGE|USE|USING|VALUE|VALUES|VARYING|VIRTUAL|WAIT|WHEN|WHEN-COMPILED|WITH|WORDS|WORKING-STORAGE|WRITE|YEAR|YYYYMMDD|YYYYDDD|ZERO-FILL|ZEROS|ZEROES)(?![\w-])/i,lookbehind:!0},boolean:{pattern:/(^|[^\w-])(?:false|true)(?![\w-])/i,lookbehind:!0},number:{pattern:/(^|[^\w-])(?:[+-]?(?:(?:\d+(?:[.,]\d+)?|[.,]\d+)(?:e[+-]?\d+)?|zero))(?![\w-])/i,lookbehind:!0},operator:[/<>|[<>]=?|[=+*/&]/,{pattern:/(^|[^\w-])(?:-|and|equal|greater|less|not|or|than)(?![\w-])/i,lookbehind:!0}],punctuation:/[.:,()]/}; \ No newline at end of file diff --git a/examples/prism-cobol.html b/examples/prism-cobol.html new file mode 100644 index 0000000000..c807cf10c8 --- /dev/null +++ b/examples/prism-cobol.html @@ -0,0 +1,26 @@ +

        Full example

        +
               *> https://en.wikipedia.org/w/index.php?title=COBOL&oldid=1011483106
        +       RD  sales-report
        +           PAGE LIMITS 60 LINES
        +           FIRST DETAIL 3
        +           CONTROLS seller-name.
        +
        +       01  TYPE PAGE HEADING.
        +           03  COL 1                    VALUE "Sales Report".
        +           03  COL 74                   VALUE "Page".
        +           03  COL 79                   PIC Z9 SOURCE PAGE-COUNTER.
        +
        +       01  sales-on-day TYPE DETAIL, LINE + 1.
        +           03  COL 3                    VALUE "Sales on".
        +           03  COL 12                   PIC 99/99/9999 SOURCE sales-date.
        +           03  COL 21                   VALUE "were".
        +           03  COL 26                   PIC $$$$9.99 SOURCE sales-amount.
        +
        +       01  invalid-sales TYPE DETAIL, LINE + 1.
        +           03  COL 3                    VALUE "INVALID RECORD:".
        +           03  COL 19                   PIC X(34) SOURCE sales-record.
        +
        +       01  TYPE CONTROL HEADING seller-name, LINE + 2.
        +           03  COL 1                    VALUE "Seller:".
        +           03  COL 9                    PIC X(30) SOURCE seller-name.
        +
        diff --git a/plugins/show-language/prism-show-language.js b/plugins/show-language/prism-show-language.js index 5db7031b11..fe8cc0f00b 100644 --- a/plugins/show-language/prism-show-language.js +++ b/plugins/show-language/prism-show-language.js @@ -55,6 +55,7 @@ "cfc": "CFScript", "cil": "CIL", "cmake": "CMake", + "cobol": "COBOL", "coffee": "CoffeeScript", "conc": "Concurnas", "csp": "Content-Security-Policy", diff --git a/plugins/show-language/prism-show-language.min.js b/plugins/show-language/prism-show-language.min.js index a5e67f1fc5..d246333008 100644 --- a/plugins/show-language/prism-show-language.min.js +++ b/plugins/show-language/prism-show-language.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof self&&self.Prism&&self.document)if(Prism.plugins.toolbar){var i={none:"Plain text",plain:"Plain text",plaintext:"Plain text",text:"Plain text",txt:"Plain text",html:"HTML",xml:"XML",svg:"SVG",mathml:"MathML",ssml:"SSML",rss:"RSS",css:"CSS",clike:"C-like",js:"JavaScript",abap:"ABAP",abnf:"ABNF",al:"AL",antlr4:"ANTLR4",g4:"ANTLR4",apacheconf:"Apache Configuration",apl:"APL",aql:"AQL",arff:"ARFF",asciidoc:"AsciiDoc",adoc:"AsciiDoc",aspnet:"ASP.NET (C#)",asm6502:"6502 Assembly",autohotkey:"AutoHotkey",autoit:"AutoIt",basic:"BASIC",bbcode:"BBcode",bnf:"BNF",rbnf:"RBNF",bsl:"BSL (1C:Enterprise)",oscript:"OneScript",csharp:"C#",cs:"C#",dotnet:"C#",cpp:"C++",cfscript:"CFScript",cfc:"CFScript",cil:"CIL",cmake:"CMake",coffee:"CoffeeScript",conc:"Concurnas",csp:"Content-Security-Policy","css-extras":"CSS Extras",csv:"CSV",dataweave:"DataWeave",dax:"DAX",django:"Django/Jinja2",jinja2:"Django/Jinja2","dns-zone-file":"DNS zone file","dns-zone":"DNS zone file",dockerfile:"Docker",dot:"DOT (Graphviz)",gv:"DOT (Graphviz)",ebnf:"EBNF",editorconfig:"EditorConfig",ejs:"EJS",etlua:"Embedded Lua templating",erb:"ERB","excel-formula":"Excel Formula",xlsx:"Excel Formula",xls:"Excel Formula",fsharp:"F#","firestore-security-rules":"Firestore security rules",ftl:"FreeMarker Template Language",gml:"GameMaker Language",gamemakerlanguage:"GameMaker Language",gcode:"G-code",gdscript:"GDScript",gedcom:"GEDCOM",glsl:"GLSL",graphql:"GraphQL",hs:"Haskell",hcl:"HCL",hlsl:"HLSL",http:"HTTP",hpkp:"HTTP Public-Key-Pins",hsts:"HTTP Strict-Transport-Security",ichigojam:"IchigoJam","icu-message-format":"ICU Message Format",idr:"Idris",ignore:".ignore",gitignore:".gitignore",hgignore:".hgignore",npmignore:".npmignore",inform7:"Inform 7",javadoc:"JavaDoc",javadoclike:"JavaDoc-like",javastacktrace:"Java stack trace",jq:"JQ",jsdoc:"JSDoc","js-extras":"JS Extras",json:"JSON",webmanifest:"Web App Manifest",json5:"JSON5",jsonp:"JSONP",jsstacktrace:"JS stack trace","js-templates":"JS Templates",kts:"Kotlin Script",kt:"Kotlin",kumir:"KuMir (КуМир)",kum:"KuMir (КуМир)",latex:"LaTeX",tex:"TeX",context:"ConTeXt",lilypond:"LilyPond",ly:"LilyPond",emacs:"Lisp",elisp:"Lisp","emacs-lisp":"Lisp",llvm:"LLVM IR",log:"Log file",lolcode:"LOLCODE",md:"Markdown","markup-templating":"Markup templating",matlab:"MATLAB",mel:"MEL",mongodb:"MongoDB",moon:"MoonScript",n1ql:"N1QL",n4js:"N4JS",n4jsd:"N4JS","nand2tetris-hdl":"Nand To Tetris HDL",naniscript:"Naninovel Script",nani:"Naninovel Script",nasm:"NASM",neon:"NEON",nginx:"nginx",nsis:"NSIS",objectivec:"Objective-C",objc:"Objective-C",ocaml:"OCaml",opencl:"OpenCL",openqasm:"OpenQasm",qasm:"OpenQasm",parigp:"PARI/GP",objectpascal:"Object Pascal",psl:"PATROL Scripting Language",pcaxis:"PC-Axis",px:"PC-Axis",peoplecode:"PeopleCode",pcode:"PeopleCode",php:"PHP",phpdoc:"PHPDoc","php-extras":"PHP Extras",plsql:"PL/SQL",powerquery:"PowerQuery",pq:"PowerQuery",mscript:"PowerQuery",powershell:"PowerShell",promql:"PromQL",properties:".properties",protobuf:"Protocol Buffers",purebasic:"PureBasic",pbfasm:"PureBasic",purs:"PureScript",py:"Python",q:"Q (kdb+ database)",qml:"QML",rkt:"Racket",jsx:"React JSX",tsx:"React TSX",renpy:"Ren'py",rpy:"Ren'py",rest:"reST (reStructuredText)",robotframework:"Robot Framework",robot:"Robot Framework",rb:"Ruby",sas:"SAS",sass:"Sass (Sass)",scss:"Sass (Scss)","shell-session":"Shell session","sh-session":"Shell session",shellsession:"Shell session",sml:"SML",smlnj:"SML/NJ",solidity:"Solidity (Ethereum)",sol:"Solidity (Ethereum)","solution-file":"Solution file",sln:"Solution file",soy:"Soy (Closure Template)",sparql:"SPARQL",rq:"SPARQL","splunk-spl":"Splunk SPL",sqf:"SQF: Status Quo Function (Arma 3)",sql:"SQL",iecst:"Structured Text (IEC 61131-3)","t4-templating":"T4 templating","t4-cs":"T4 Text Templates (C#)",t4:"T4 Text Templates (C#)","t4-vb":"T4 Text Templates (VB)",tap:"TAP",tt2:"Template Toolkit 2",toml:"TOML",trig:"TriG",ts:"TypeScript",tsconfig:"TSConfig",uscript:"UnrealScript",uc:"UnrealScript",uri:"URI",url:"URL",vbnet:"VB.Net",vhdl:"VHDL",vim:"vim","visual-basic":"Visual Basic",vba:"VBA",vb:"Visual Basic",wasm:"WebAssembly",wiki:"Wiki markup",xeoracube:"XeoraCube","xml-doc":"XML doc (.net)",xojo:"Xojo (REALbasic)",xquery:"XQuery",yaml:"YAML",yml:"YAML",yang:"YANG"};Prism.plugins.toolbar.registerButton("show-language",function(e){var a=e.element.parentNode;if(a&&/pre/i.test(a.nodeName)){var t,s=a.getAttribute("data-language")||i[e.language]||((t=e.language)?(t.substring(0,1).toUpperCase()+t.substring(1)).replace(/s(?=cript)/,"S"):t);if(s){var o=document.createElement("span");return o.textContent=s,o}}})}else console.warn("Show Languages plugin loaded before Toolbar plugin.")}(); \ No newline at end of file +!function(){if("undefined"!=typeof self&&self.Prism&&self.document)if(Prism.plugins.toolbar){var i={none:"Plain text",plain:"Plain text",plaintext:"Plain text",text:"Plain text",txt:"Plain text",html:"HTML",xml:"XML",svg:"SVG",mathml:"MathML",ssml:"SSML",rss:"RSS",css:"CSS",clike:"C-like",js:"JavaScript",abap:"ABAP",abnf:"ABNF",al:"AL",antlr4:"ANTLR4",g4:"ANTLR4",apacheconf:"Apache Configuration",apl:"APL",aql:"AQL",arff:"ARFF",asciidoc:"AsciiDoc",adoc:"AsciiDoc",aspnet:"ASP.NET (C#)",asm6502:"6502 Assembly",autohotkey:"AutoHotkey",autoit:"AutoIt",basic:"BASIC",bbcode:"BBcode",bnf:"BNF",rbnf:"RBNF",bsl:"BSL (1C:Enterprise)",oscript:"OneScript",csharp:"C#",cs:"C#",dotnet:"C#",cpp:"C++",cfscript:"CFScript",cfc:"CFScript",cil:"CIL",cmake:"CMake",cobol:"COBOL",coffee:"CoffeeScript",conc:"Concurnas",csp:"Content-Security-Policy","css-extras":"CSS Extras",csv:"CSV",dataweave:"DataWeave",dax:"DAX",django:"Django/Jinja2",jinja2:"Django/Jinja2","dns-zone-file":"DNS zone file","dns-zone":"DNS zone file",dockerfile:"Docker",dot:"DOT (Graphviz)",gv:"DOT (Graphviz)",ebnf:"EBNF",editorconfig:"EditorConfig",ejs:"EJS",etlua:"Embedded Lua templating",erb:"ERB","excel-formula":"Excel Formula",xlsx:"Excel Formula",xls:"Excel Formula",fsharp:"F#","firestore-security-rules":"Firestore security rules",ftl:"FreeMarker Template Language",gml:"GameMaker Language",gamemakerlanguage:"GameMaker Language",gcode:"G-code",gdscript:"GDScript",gedcom:"GEDCOM",glsl:"GLSL",graphql:"GraphQL",hs:"Haskell",hcl:"HCL",hlsl:"HLSL",http:"HTTP",hpkp:"HTTP Public-Key-Pins",hsts:"HTTP Strict-Transport-Security",ichigojam:"IchigoJam","icu-message-format":"ICU Message Format",idr:"Idris",ignore:".ignore",gitignore:".gitignore",hgignore:".hgignore",npmignore:".npmignore",inform7:"Inform 7",javadoc:"JavaDoc",javadoclike:"JavaDoc-like",javastacktrace:"Java stack trace",jq:"JQ",jsdoc:"JSDoc","js-extras":"JS Extras",json:"JSON",webmanifest:"Web App Manifest",json5:"JSON5",jsonp:"JSONP",jsstacktrace:"JS stack trace","js-templates":"JS Templates",kts:"Kotlin Script",kt:"Kotlin",kumir:"KuMir (КуМир)",kum:"KuMir (КуМир)",latex:"LaTeX",tex:"TeX",context:"ConTeXt",lilypond:"LilyPond",ly:"LilyPond",emacs:"Lisp",elisp:"Lisp","emacs-lisp":"Lisp",llvm:"LLVM IR",log:"Log file",lolcode:"LOLCODE",md:"Markdown","markup-templating":"Markup templating",matlab:"MATLAB",mel:"MEL",mongodb:"MongoDB",moon:"MoonScript",n1ql:"N1QL",n4js:"N4JS",n4jsd:"N4JS","nand2tetris-hdl":"Nand To Tetris HDL",naniscript:"Naninovel Script",nani:"Naninovel Script",nasm:"NASM",neon:"NEON",nginx:"nginx",nsis:"NSIS",objectivec:"Objective-C",objc:"Objective-C",ocaml:"OCaml",opencl:"OpenCL",openqasm:"OpenQasm",qasm:"OpenQasm",parigp:"PARI/GP",objectpascal:"Object Pascal",psl:"PATROL Scripting Language",pcaxis:"PC-Axis",px:"PC-Axis",peoplecode:"PeopleCode",pcode:"PeopleCode",php:"PHP",phpdoc:"PHPDoc","php-extras":"PHP Extras",plsql:"PL/SQL",powerquery:"PowerQuery",pq:"PowerQuery",mscript:"PowerQuery",powershell:"PowerShell",promql:"PromQL",properties:".properties",protobuf:"Protocol Buffers",purebasic:"PureBasic",pbfasm:"PureBasic",purs:"PureScript",py:"Python",q:"Q (kdb+ database)",qml:"QML",rkt:"Racket",jsx:"React JSX",tsx:"React TSX",renpy:"Ren'py",rpy:"Ren'py",rest:"reST (reStructuredText)",robotframework:"Robot Framework",robot:"Robot Framework",rb:"Ruby",sas:"SAS",sass:"Sass (Sass)",scss:"Sass (Scss)","shell-session":"Shell session","sh-session":"Shell session",shellsession:"Shell session",sml:"SML",smlnj:"SML/NJ",solidity:"Solidity (Ethereum)",sol:"Solidity (Ethereum)","solution-file":"Solution file",sln:"Solution file",soy:"Soy (Closure Template)",sparql:"SPARQL",rq:"SPARQL","splunk-spl":"Splunk SPL",sqf:"SQF: Status Quo Function (Arma 3)",sql:"SQL",iecst:"Structured Text (IEC 61131-3)","t4-templating":"T4 templating","t4-cs":"T4 Text Templates (C#)",t4:"T4 Text Templates (C#)","t4-vb":"T4 Text Templates (VB)",tap:"TAP",tt2:"Template Toolkit 2",toml:"TOML",trig:"TriG",ts:"TypeScript",tsconfig:"TSConfig",uscript:"UnrealScript",uc:"UnrealScript",uri:"URI",url:"URL",vbnet:"VB.Net",vhdl:"VHDL",vim:"vim","visual-basic":"Visual Basic",vba:"VBA",vb:"Visual Basic",wasm:"WebAssembly",wiki:"Wiki markup",xeoracube:"XeoraCube","xml-doc":"XML doc (.net)",xojo:"Xojo (REALbasic)",xquery:"XQuery",yaml:"YAML",yml:"YAML",yang:"YANG"};Prism.plugins.toolbar.registerButton("show-language",function(e){var a=e.element.parentNode;if(a&&/pre/i.test(a.nodeName)){var t,s=a.getAttribute("data-language")||i[e.language]||((t=e.language)?(t.substring(0,1).toUpperCase()+t.substring(1)).replace(/s(?=cript)/,"S"):t);if(s){var o=document.createElement("span");return o.textContent=s,o}}})}else console.warn("Show Languages plugin loaded before Toolbar plugin.")}(); \ No newline at end of file diff --git a/tests/languages/cobol/boolean_feature.test b/tests/languages/cobol/boolean_feature.test new file mode 100644 index 0000000000..fb3632f821 --- /dev/null +++ b/tests/languages/cobol/boolean_feature.test @@ -0,0 +1,9 @@ +false False FALSE +true True TRUE + +---------------------------------------------------- + +[ + ["boolean", "false"], ["boolean", "False"], ["boolean", "FALSE"], + ["boolean", "true"], ["boolean", "True"], ["boolean", "TRUE"] +] \ No newline at end of file diff --git a/tests/languages/cobol/class-name_feature.test b/tests/languages/cobol/class-name_feature.test new file mode 100644 index 0000000000..30bcccf6fc --- /dev/null +++ b/tests/languages/cobol/class-name_feature.test @@ -0,0 +1,84 @@ +PIC 99/99/9999 SOURCE sales-date. +PIC $$$$9.99 SOURCE sales-amount. +PIC X(34) SOURCE sales-record. + +pic 9 usage computational value is 5. +pic 99 value is 10. + +pic x(2) +pic a(20). + +greeting pic x(12) value is "Hello World". + +---------------------------------------------------- + +[ + ["keyword", "PIC"], + ["class-name", ["99/99/9999"]], + ["keyword", "SOURCE"], + " sales-date", + ["punctuation", "."], + + ["keyword", "PIC"], + ["class-name", ["$$$$9.99"]], + ["keyword", "SOURCE"], + " sales-amount", + ["punctuation", "."], + + ["keyword", "PIC"], + ["class-name", [ + "X", + ["punctuation", "("], + ["number", "34"], + ["punctuation", ")"] + ]], + ["keyword", "SOURCE"], + " sales-record", + ["punctuation", "."], + + ["keyword", "pic"], + ["class-name", ["9"]], + ["keyword", "usage"], + ["keyword", "computational"], + ["keyword", "value"], + ["keyword", "is"], + ["number", "5"], + ["punctuation", "."], + + ["keyword", "pic"], + ["class-name", ["99"]], + ["keyword", "value"], + ["keyword", "is"], + ["number", "10"], + ["punctuation", "."], + + ["keyword", "pic"], + ["class-name", [ + "x", + ["punctuation", "("], + ["number", "2"], + ["punctuation", ")"] + ]], + + ["keyword", "pic"], + ["class-name", [ + "a", + ["punctuation", "("], + ["number", "20"], + ["punctuation", ")"] + ]], + ["punctuation", "."], + + "\n\ngreeting ", + ["keyword", "pic"], + ["class-name", [ + "x", + ["punctuation", "("], + ["number", "12"], + ["punctuation", ")"] + ]], + ["keyword", "value"], + ["keyword", "is"], + ["string", "\"Hello World\""], + ["punctuation", "."] +] \ No newline at end of file diff --git a/tests/languages/cobol/comment_feature.test b/tests/languages/cobol/comment_feature.test new file mode 100644 index 0000000000..5eb1b8d563 --- /dev/null +++ b/tests/languages/cobol/comment_feature.test @@ -0,0 +1,11 @@ +*> comment + +* temporary variables in computational usage. + +---------------------------------------------------- + +[ + ["comment", "*> comment"], + + ["comment", "* temporary variables in computational usage."] +] \ No newline at end of file diff --git a/tests/languages/cobol/level_feature.test b/tests/languages/cobol/level_feature.test new file mode 100644 index 0000000000..8e3640f3a9 --- /dev/null +++ b/tests/languages/cobol/level_feature.test @@ -0,0 +1,126 @@ +01 ServiceRecord. + 05 SSN pic 9(9). + 05 Name. + 10 GivenName pic a(20). + 10 FamilyName pic a(20). + 05 Rank. + 10 RankType pic a(1) + 88 ValidRankType value 'O' 'E' 'W'. + 88 Enlisted value 'E'. + 88 WarrantOfficer value 'W'. + 88 CommissionedOfficer value 'W'. + 10 Grade pic x(2) + 88 ValidGrade value '1' '2' '3' '4' '5' '6' '7' '8' '9' '10' '1E' '2E' '3E'. + +---------------------------------------------------- + +[ + ["level", "01"], + " ServiceRecord", + ["punctuation", "."], + + ["level", "05"], + " SSN ", + ["keyword", "pic"], + ["class-name", [ + "9", + ["punctuation", "("], + ["number", "9"], + ["punctuation", ")"] + ]], + ["punctuation", "."], + + ["level", "05"], + " Name", + ["punctuation", "."], + + ["level", "10"], + " GivenName ", + ["keyword", "pic"], + ["class-name", [ + "a", + ["punctuation", "("], + ["number", "20"], + ["punctuation", ")"] + ]], + ["punctuation", "."], + + ["level", "10"], + " FamilyName ", + ["keyword", "pic"], + ["class-name", [ + "a", + ["punctuation", "("], + ["number", "20"], + ["punctuation", ")"] + ]], + ["punctuation", "."], + + ["level", "05"], + " Rank", + ["punctuation", "."], + + ["level", "10"], + " RankType ", + ["keyword", "pic"], + ["class-name", [ + "a", + ["punctuation", "("], + ["number", "1"], + ["punctuation", ")"] + ]], + + ["level", "88"], + " ValidRankType ", + ["keyword", "value"], + ["string", "'O'"], + ["string", "'E'"], + ["string", "'W'"], + ["punctuation", "."], + + ["level", "88"], + " Enlisted ", + ["keyword", "value"], + ["string", "'E'"], + ["punctuation", "."], + + ["level", "88"], + " WarrantOfficer ", + ["keyword", "value"], + ["string", "'W'"], + ["punctuation", "."], + + ["level", "88"], + " CommissionedOfficer ", + ["keyword", "value"], + ["string", "'W'"], + ["punctuation", "."], + + ["level", "10"], + " Grade ", + ["keyword", "pic"], + ["class-name", [ + "x", + ["punctuation", "("], + ["number", "2"], + ["punctuation", ")"] + ]], + + ["level", "88"], + " ValidGrade ", + ["keyword", "value"], + ["string", "'1'"], + ["string", "'2'"], + ["string", "'3'"], + ["string", "'4'"], + ["string", "'5'"], + ["string", "'6'"], + ["string", "'7'"], + ["string", "'8'"], + ["string", "'9'"], + ["string", "'10'"], + ["string", "'1E'"], + ["string", "'2E'"], + ["string", "'3E'"], + ["punctuation", "."] +] \ No newline at end of file diff --git a/tests/languages/cobol/number_feature.test b/tests/languages/cobol/number_feature.test new file mode 100644 index 0000000000..4a73f1e502 --- /dev/null +++ b/tests/languages/cobol/number_feature.test @@ -0,0 +1,23 @@ +zero Zero ZERO + += 0 += 123 += .4e-5 += +3e5 += -43 + +x"ff" + +---------------------------------------------------- + +[ + ["number", "zero"], ["number", "Zero"], ["number", "ZERO"], + + ["operator", "="], ["number", "0"], + ["operator", "="], ["number", "123"], + ["operator", "="], ["number", ".4e-5"], + ["operator", "="], ["number", "+3e5"], + ["operator", "="], ["number", "-43"], + + ["string", "x\"ff\""] +] \ No newline at end of file diff --git a/tests/languages/cobol/operator_feature.test b/tests/languages/cobol/operator_feature.test new file mode 100644 index 0000000000..872ccc8832 --- /dev/null +++ b/tests/languages/cobol/operator_feature.test @@ -0,0 +1,21 @@ ++ - * / += <> < <= > >= +& + +---------------------------------------------------- + +[ + ["operator", "+"], + ["operator", "-"], + ["operator", "*"], + ["operator", "/"], + + ["operator", "="], + ["operator", "<>"], + ["operator", "<"], + ["operator", "<="], + ["operator", ">"], + ["operator", ">="], + + ["operator", "&"] +] \ No newline at end of file diff --git a/tests/languages/cobol/punctuation_feature.test b/tests/languages/cobol/punctuation_feature.test new file mode 100644 index 0000000000..5d033d5a1c --- /dev/null +++ b/tests/languages/cobol/punctuation_feature.test @@ -0,0 +1,9 @@ +( ) +. : , + +---------------------------------------------------- + +[ + ["punctuation", "("], ["punctuation", ")"], + ["punctuation", "."], ["punctuation", ":"], ["punctuation", ","] +] \ No newline at end of file diff --git a/tests/languages/cobol/string_feature.test b/tests/languages/cobol/string_feature.test new file mode 100644 index 0000000000..705f1c4c1f --- /dev/null +++ b/tests/languages/cobol/string_feature.test @@ -0,0 +1,13 @@ +"" +'' +"foo""bar" +'foo''bar' + +---------------------------------------------------- + +[ + ["string", "\"\""], + ["string", "''"], + ["string", "\"foo\"\"bar\""], + ["string", "'foo''bar'"] +] \ No newline at end of file From dbf70515587dfcc03a722f460c700c8c7bb10826 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Sun, 21 Mar 2021 16:58:13 +0100 Subject: [PATCH 0764/1100] Core: Add `tabindex` to code blocks to enable keyboard navigation (#2799) --- components/prism-core.js | 6 ++++++ components/prism-core.min.js | 2 +- docs/Prism.hooks.html | 6 +++--- docs/Prism.html | 4 ++-- docs/Token.html | 8 ++++---- docs/global.html | 10 +++++----- docs/prism-core.js.html | 6 ++++++ prism.js | 6 ++++++ 8 files changed, 33 insertions(+), 15 deletions(-) diff --git a/components/prism-core.js b/components/prism-core.js index d7367099da..9a75c71741 100644 --- a/components/prism-core.js +++ b/components/prism-core.js @@ -558,6 +558,12 @@ var _ = { _.hooks.run('before-sanity-check', env); + // plugins may change/add the parent/element + parent = env.element.parentElement; + if (parent && parent.nodeName.toLowerCase() === 'pre' && !parent.hasAttribute('tabindex')) { + parent.setAttribute('tabindex', '0'); + } + if (!env.code) { _.hooks.run('complete', env); callback && callback.call(env.element); diff --git a/components/prism-core.min.js b/components/prism-core.min.js index 1723237c3c..e1a5842c3a 100644 --- a/components/prism-core.min.js +++ b/components/prism-core.min.js @@ -1 +1 @@ -var _self="undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{},Prism=function(u){var c=/\blang(?:uage)?-([\w-]+)\b/i,n=0,e={},M={manual:u.Prism&&u.Prism.manual,disableWorkerMessageHandler:u.Prism&&u.Prism.disableWorkerMessageHandler,util:{encode:function e(n){return n instanceof W?new W(n.type,e(n.content),n.alias):Array.isArray(n)?n.map(e):n.replace(/&/g,"&").replace(/=l.reach);y+=m.value.length,m=m.next){var k=m.value;if(t.length>n.length)return;if(!(k instanceof W)){var b,x=1;if(h){if(!(b=z(p,y,n,f)))break;var w=b.index,A=b.index+b[0].length,P=y;for(P+=m.value.length;P<=w;)m=m.next,P+=m.value.length;if(P-=m.value.length,y=P,m.value instanceof W)continue;for(var S=m;S!==t.tail&&(Pl.reach&&(l.reach=N);var j=m.prev;O&&(j=I(t,j,O),y+=O.length),q(t,j,x);var C=new W(o,g?M.tokenize(E,g):E,d,E);if(m=I(t,j,C),L&&I(t,m,L),1l.reach&&(l.reach=_.reach)}}}}}}(e,a,n,a.head,0),function(e){var n=[],t=e.head.next;for(;t!==e.tail;)n.push(t.value),t=t.next;return n}(a)},hooks:{all:{},add:function(e,n){var t=M.hooks.all;t[e]=t[e]||[],t[e].push(n)},run:function(e,n){var t=M.hooks.all[e];if(t&&t.length)for(var r,a=0;r=t[a++];)r(n)}},Token:W};function W(e,n,t,r){this.type=e,this.content=n,this.alias=t,this.length=0|(r||"").length}function z(e,n,t,r){e.lastIndex=n;var a=e.exec(t);if(a&&r&&a[1]){var i=a[1].length;a.index+=i,a[0]=a[0].slice(i)}return a}function i(){var e={value:null,prev:null,next:null},n={value:null,prev:e,next:null};e.next=n,this.head=e,this.tail=n,this.length=0}function I(e,n,t){var r=n.next,a={value:t,prev:n,next:r};return n.next=a,r.prev=a,e.length++,a}function q(e,n,t){for(var r=n.next,a=0;a"+a.content+""},!u.document)return u.addEventListener&&(M.disableWorkerMessageHandler||u.addEventListener("message",function(e){var n=JSON.parse(e.data),t=n.language,r=n.code,a=n.immediateClose;u.postMessage(M.highlight(r,M.languages[t],t)),a&&u.close()},!1)),M;var t=M.util.currentScript();function r(){M.manual||M.highlightAll()}if(t&&(M.filename=t.src,t.hasAttribute("data-manual")&&(M.manual=!0)),!M.manual){var a=document.readyState;"loading"===a||"interactive"===a&&t&&t.defer?document.addEventListener("DOMContentLoaded",r):window.requestAnimationFrame?window.requestAnimationFrame(r):window.setTimeout(r,16)}return M}(_self);"undefined"!=typeof module&&module.exports&&(module.exports=Prism),"undefined"!=typeof global&&(global.Prism=Prism); \ No newline at end of file +var _self="undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{},Prism=function(u){var c=/\blang(?:uage)?-([\w-]+)\b/i,n=0,e={},M={manual:u.Prism&&u.Prism.manual,disableWorkerMessageHandler:u.Prism&&u.Prism.disableWorkerMessageHandler,util:{encode:function e(n){return n instanceof W?new W(n.type,e(n.content),n.alias):Array.isArray(n)?n.map(e):n.replace(/&/g,"&").replace(/=l.reach);y+=m.value.length,m=m.next){var b=m.value;if(t.length>n.length)return;if(!(b instanceof W)){var k,x=1;if(h){if(!(k=z(v,y,n,f)))break;var w=k.index,A=k.index+k[0].length,P=y;for(P+=m.value.length;P<=w;)m=m.next,P+=m.value.length;if(P-=m.value.length,y=P,m.value instanceof W)continue;for(var E=m;E!==t.tail&&(Pl.reach&&(l.reach=N);var j=m.prev;O&&(j=I(t,j,O),y+=O.length),q(t,j,x);var C=new W(o,g?M.tokenize(S,g):S,d,S);if(m=I(t,j,C),L&&I(t,m,L),1l.reach&&(l.reach=_.reach)}}}}}}(e,a,n,a.head,0),function(e){var n=[],t=e.head.next;for(;t!==e.tail;)n.push(t.value),t=t.next;return n}(a)},hooks:{all:{},add:function(e,n){var t=M.hooks.all;t[e]=t[e]||[],t[e].push(n)},run:function(e,n){var t=M.hooks.all[e];if(t&&t.length)for(var r,a=0;r=t[a++];)r(n)}},Token:W};function W(e,n,t,r){this.type=e,this.content=n,this.alias=t,this.length=0|(r||"").length}function z(e,n,t,r){e.lastIndex=n;var a=e.exec(t);if(a&&r&&a[1]){var i=a[1].length;a.index+=i,a[0]=a[0].slice(i)}return a}function i(){var e={value:null,prev:null,next:null},n={value:null,prev:e,next:null};e.next=n,this.head=e,this.tail=n,this.length=0}function I(e,n,t){var r=n.next,a={value:t,prev:n,next:r};return n.next=a,r.prev=a,e.length++,a}function q(e,n,t){for(var r=n.next,a=0;a"+a.content+""},!u.document)return u.addEventListener&&(M.disableWorkerMessageHandler||u.addEventListener("message",function(e){var n=JSON.parse(e.data),t=n.language,r=n.code,a=n.immediateClose;u.postMessage(M.highlight(r,M.languages[t],t)),a&&u.close()},!1)),M;var t=M.util.currentScript();function r(){M.manual||M.highlightAll()}if(t&&(M.filename=t.src,t.hasAttribute("data-manual")&&(M.manual=!0)),!M.manual){var a=document.readyState;"loading"===a||"interactive"===a&&t&&t.defer?document.addEventListener("DOMContentLoaded",r):window.requestAnimationFrame?window.requestAnimationFrame(r):window.setTimeout(r,16)}return M}(_self);"undefined"!=typeof module&&module.exports&&(module.exports=Prism),"undefined"!=typeof global&&(global.Prism=Prism); \ No newline at end of file diff --git a/docs/Prism.hooks.html b/docs/Prism.hooks.html index 31e525f469..851bd8df2c 100644 --- a/docs/Prism.hooks.html +++ b/docs/Prism.hooks.html @@ -73,7 +73,7 @@

        Source:
        @@ -152,7 +152,7 @@

        (static) addSource:
        @@ -314,7 +314,7 @@

        (static) runSource:
        diff --git a/docs/Prism.html b/docs/Prism.html index b61e07f6a1..89b73d0c77 100644 --- a/docs/Prism.html +++ b/docs/Prism.html @@ -263,7 +263,7 @@

        (static) hi
        Source:
        @@ -1157,7 +1157,7 @@

        (static) tok
        Source:
        diff --git a/docs/Token.html b/docs/Token.html index 8bd43e28d3..d32782852f 100644 --- a/docs/Token.html +++ b/docs/Token.html @@ -80,7 +80,7 @@

        new TokenSource:
        @@ -364,7 +364,7 @@

        aliasSource:
        @@ -447,7 +447,7 @@

        contentSource:
        @@ -524,7 +524,7 @@

        typeSource:
        diff --git a/docs/global.html b/docs/global.html index 689a70efe4..afcfd9f0e6 100644 --- a/docs/global.html +++ b/docs/global.html @@ -143,7 +143,7 @@

        Grammar

        Source:
        @@ -274,7 +274,7 @@

        GrammarToken

        Source:
        @@ -559,7 +559,7 @@

        High
        Source:
        @@ -713,7 +713,7 @@

        HookCallb
        Source:
        @@ -859,7 +859,7 @@

        TokenStream

        Source:
        diff --git a/docs/prism-core.js.html b/docs/prism-core.js.html index 9dbb4c0548..53f95c1263 100644 --- a/docs/prism-core.js.html +++ b/docs/prism-core.js.html @@ -611,6 +611,12 @@

        prism-core.js

        _.hooks.run('before-sanity-check', env); + // plugins may change/add the parent/element + parent = env.element.parentElement; + if (parent && parent.nodeName.toLowerCase() === 'pre' && !parent.hasAttribute('tabindex')) { + parent.setAttribute('tabindex', '0'); + } + if (!env.code) { _.hooks.run('complete', env); callback && callback.call(env.element); diff --git a/prism.js b/prism.js index 19e34a1463..1ba0d239c1 100644 --- a/prism.js +++ b/prism.js @@ -563,6 +563,12 @@ var _ = { _.hooks.run('before-sanity-check', env); + // plugins may change/add the parent/element + parent = env.element.parentElement; + if (parent && parent.nodeName.toLowerCase() === 'pre' && !parent.hasAttribute('tabindex')) { + parent.setAttribute('tabindex', '0'); + } + if (!env.code) { _.hooks.run('complete', env); callback && callback.call(env.element); From 9b784ebff73c9f5d1d0cb178ca69071902f23789 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Sun, 21 Mar 2021 17:07:17 +0100 Subject: [PATCH 0765/1100] Website: Added MySQL to "Used by" section (#2785) --- assets/img/logo-mysql.png | Bin 0 -> 8678 bytes index.html | 1 + 2 files changed, 1 insertion(+) create mode 100644 assets/img/logo-mysql.png diff --git a/assets/img/logo-mysql.png b/assets/img/logo-mysql.png new file mode 100644 index 0000000000000000000000000000000000000000..d6f13280451780caaa049cca72ab55d9d1326fdf GIT binary patch literal 8678 zcmaJ{WmFtZ)5TpDx8NE=a0nV$Ab8N=i@Uq~;<7j)1lQmi+*#b+U4py&$MgR??~j=} zedcym_pLj9YUWggl7bW_8YvnK3=F1>w1mpL?S8)sP>|m5SOA*ocLVFJA|(b>G4|o$ zeSlyN{0@YHsg6Z|Hbi_MqdG`yIln{SXJK{25-`aIz`#&@%SZr!c<7yEpnK4LtLs<1 zp&PDAn@0e^Dkqg@-;0ViMSj}C^8s%>HdD20it?t)Olc{dxn8&~$|q!+01@=FBH_S# z7v%vPxw%Y{iujb-G)z^g@-;1;c7;co{_cvLsV=kEbXrzLBvgC>Ovv;2P) zGH8Oj4A_Y=kp8Ek=A>yPQ%9@6GHTcB+|^_)ZCdHy{R3)O;6EbcUJ@L16~~bTsN>ex zW>#uARkz-Xxj8j~^N9;KdvsrE;n~4eDhu4rKS7RP=5MbkC)OMPIv?C>Uky4w2&JGi zB|oR!j_2^cSV*bvNBnH^D9ohRCbX2_u@vCfOTFA&A(;Z)G;K<&VC8{_ww zRGjzKByN;$&(gb2IXDfK?p61Dnhj+1)={t`dyJbIsttOX;Mwx~Gk8q65Cb(oE{qlX zw9VNM;4#g**Xpz7`g>q%RnyI{^_$wCrDEHJt~;k<$^Oi5&CoVl-p^e_ZfeWrcwcr^ ze~U*?N0#+DzHhASn})}@8is)4ztnAOkl>1cwuDn)z)EMGwWZZ)?EWRDM}6-5Ruif+ z9NX=#$*#=^LrcM4eDDhC-kpCM-6G$pa67gym9^8_5_s+PIN%Hs4CyD&ToQL7YfsLD zmkr(+nDlSQFBw>ZqmuOtX~Ev?rQ%Nx8RkS@7%Aq?o&+fhti3DUZ>Jx4hp34$V{w9$ zLxsI?{ma*PNZXg!YlCk9IZ3n9DWKv8%u_lVXKtvZEk3Z z8@)$05~SQZdU`?f4OPo`N4P046dd0@dUNPvQ69+HnOe4>d#KG`b$F*O0wdpuPP=`$ zF2%!E=E#!I6QWUx06%uI;@sDG%kmb8JdSm3SVQq*LECHyp(^`eCj8PJ>dhG3F^i5yrXy z0SdlCs^}fS6)IuW^q^tq^CFhHu&fYX_usfs%nV(VC~l`jI%)0?)+{qo8BDwPidfHX zsFJ;!$!-V8++7lYrxYt%N1e+h4U5iVucePYDtwdV)-t>RvDIHLty_64=7rydDs&p+ z6F5Jx^*~8YxJh-dFfj-Uy4zE#=$QAW2q_oldVX8)e?vaPd6RoS%-^b=MQIX;?lD9?_MnJ4 zpWke(eXn?`$*vI1e*lvpSmW#_%D!d_zBq!O>fSo@vW~BRX6vO811-=%E>_1tm_LYj z4k{7Ii}$`f@2>z+5aVv*VM_{Q0FmQ~+go5i)iQ?C^dasxj}@WKo}kY+sx`X7)ECQz zwG-h=hTDO!LUVpu*5lWd9_i3pq+6*O0y9Yqic4A_q6lKiqeJ*7i3z!;TjX~~>X{^Z z6f;Liv?!zCIQ?B~05;wAp)x&*?AHO2GagXTB$l=&UqxZywIQ&Dl^s06f^pMTj#`PO zskj$QXg5^MTHKSRMZBTyJL4aqC8PI!PtXcm9l`;g02!RY?&qh^b686;JEH49y@dAH zF8ENQ9uCLg1e?*c{F7`q>VT^{C>ypqV$n)_A=dBM`XV$&F9`Y8YTAz?#q-Fh~c z=C|hjf7PO_Hy1pV*~q{TSG@S2|3eT^k8OV9Jq>WSpn4g~)+3Wlz&+v~#r;V<0z+TFzc&_$8!XzignL!*O(SJZK}VrO`2Lg&jHxDq&3td|P)SZiPiY7# zb5Q4tJm&6hwEm9^Nfke2l9k^JQ(E3exRTDmO!bG%Y!%h_iC@?-P8+5iYLvbelj}TI z-Q}?FJaO0b-(nu}KvBeMYb+5KkHF^^o+1AFysX%#25dBUtH3t1cWTr@=(VuNK_nG> zy2Zod%&2Dsx1V?TV{ykyvi0!ZJ+n#Q!1*cA;;1(KNb%W6=8MxVF0ABaye#;gi=i`NX{0oG`iTBjPv&pQDj>BHvgYe|I2Q`PM>pfpa zf8u%Dp{3}}{VntGO&`Xb2mXLzC!Ifi#(8%ep3Q%kpB)BXy5!;vkm%0ygKqbl#Qsxj zEHOgJ;ZH?xbK9i_e*WP7x215hSjB)yH}HZrF0}pdeJcvNO$^8?&u2ZZGfhWzU5STW z=?h)+KJDt~oHZFGVY=@SNt3SB;cjO6gRhj6;4*im?{V}kZqi3a?Sz?~SL!j=l&f-SS zH_lcN5b?NIxS-w;dy4C~ZbuhGTl%V+2EjXvv`}8S)yqG7EJEgEgFa zC*2gGiT+#Gn~oaxJ9jtH*?Nxuao&M;`bM&{2k2U~zViH_eB_UKvqVLYB@rw~&~xwW zTcRB?_zwGwi`vl1F(abx6T>;CG3NXwMgLxnG=In9VcmOd7Qp-khGW^AhvR=zi*t?HPxK4Q?9UinFQ0Sgm?J>bE$~O-+}Q*; zJD}9%!q3I!wEHVFdorL?$JBOj9_Vi;C^AK>oy}jauMTxUi7Y##@|e?>7~D8#h~SN_ zWg7iANd?Bqclz{1)ng!A-B%bp@kxhI1hyXRTq=dC;gO~?TVa|)`GPMOwT`*CA3 zcenH$p|BIGVFWQM&}-$91)mlrnRln?W3P>(=&E<_Tfpns*~RB)3hGwvXvoC%xh5ZN zj=M3ND0S?)zF|^^B6CDQBQ+~u!vkL3nogN1--T}t9pUOZh2gwV=KA(`mR4auRY)oh zhV#OhjL)~|Ni0QO*_#Kw0;8%BC-XhV#!&n-N~6spnIadh1uVZjbZen?(a5lKbLVWc>o&x-fM)lCaCJw$qWq3>La{Nu8=QvCmfDK~HbnKf?R{#z zbgL=Lvy`)+^Vc(9z#_z8+Xc^BpqN&f|_WH6CO z<&2D_i=37JV{6qD=Rf?1`YY~sir#LeW&8yAG1W%Ktg$)`$1bEyrnQMx(A_w99)gl#lp4Y-ys!#8rV8QLj4PT)F#M1rn{I)>QktFFs#=qt;90c)Q zV9{;K0yA&s4GHJZ$P+4uDi3&^01cGMx-T^tRl-$=mE2xyD_>6l(Nx5wM1n8sr~4sR z3%V)=&9G zYOPsce+K|RpmNa?lcxQ^MLHh@J)>w*rrlQAva|Dw7$^n3=kXK#GJj;H{uY=dH;%1_ zygEX~_YUbq={>kQ)_+AIHyBp&hH?Zv5$k?&>{z}I3V-K(2Lj%8sK;?7C{8nfiR+($csh(ciYkNpXi``}l!XD!xkKom7=25?@v2dpZRjlf$s&x`tpti|(t{G{c|#w2`La$jY($NTbmFNn1kA5eE@rX|wlp5zK*~1Asd$%Z70~#k!c96A059FX z&79ql#OsXXITBWfs3tq77(V!b^v}k6m;N{}?&%i+FNV!el}xD@74?K470gO;JQcFW z5lMEm&)vUuR`oCtmTjz=#Jk$+oZb3wvk?woYu?G&G_|u>5ITEH*&_`il!RsdMtZ>{ zdFFNUf1U9GR*~R{y^l9n4C=H%_gDdB4euSR?;I&uJuBnpffL{%%~k-lSXe`juN z_H`SHF8LV|wJC4WPTB|l>??7Ow$(*cC?#pP|G&eeJd=Y6@Sn*Msu}Mmgoe`x%M}bi=1W6_N zf)6uhE4cspwn>HR&QzQ|`BWfXYV^#3=d7j_fBi__#35XguCT$aZxQeYtC8o|x9h~B zsPyHOcspylh|kyi9|AC($x1o%Wzed8!02=0kbKuEZ#FvoM{S~tWV9mk-yq$^4`>8F1xPpAk<&7OHMR!VWe>Jq&7 zO&{qK62p(%zvE;LK@KSOXqKB(b8_BBa%5Ep+@r@QE5}M`G4k>TQw^+^OV`GjG%;_4 z@CQP=x0|Bt?@a7$&PG=z*90$0$JQcr?iYE;BSu1eL`-7=PfmNm4pgE4!cLIQ>^jjU zx-wD&nGs^+B3th36s^WhGW$eIvxd#@eL?e+i4SP=Y`adkF|*zx5gl|sQs*WI9uF=; zG2cob;P*`wJCSwJGj7De z)Aj)1j`B4TQK%DX$&p+*kq@)bN*>Z5ySE6B>Z=A~D{!?kH+nj5*Ck(cac=jDQWQ(T@%hO;O*)8qQVCMT6a!mzS^F5QVf&`{T+ozO9sG`e}X6Md_As zz&0*ERQ{!%PyU_hA333N2Z{h|QOHHyNK+Mg$vbhb56Z3&6#P*$ac1U z^(sa;ijSM2oaw%2DP;{YPe}eIbw;<+bszKN*jQ`J71(CTgdYt5UXNXR`=q8Y)&%rV zk5%j;-CV}0r)gA37R6CEP2K#>p}G)dN|w?@bYnFM8R|BG2_zIwIDNqjh(PyAaE@ddRk zJz*hr19>oe>##k`hMiyRuE!sr$1sgVf+xcXX2~hL>X<&TnYLEDho}n{g8? z!nC@Q-h_>;*ztd29d!YM3jp2At;`j9qxTP79W@>%)1_}_`jcGVPOn0T^P2T;Tjz}q z1pOfpDwhl4KR?SU7L6yU<1;IN*(0SQ&v3!X^cp(iB3sZds%r8>c&QJoBRhD;S`h53_!dfSPg{i0RZw5dQji$V_uTx(6nsfE zANfTiDC{9hOd4(iRqQ@`<4k;Z6ts&DoE8x_7kv9r7_v3J@vj?p1j{sZk5qArw z)Nw^me+O*wFW$T6N$h$OF9+SDE6Nk!&vLlL`X$-8AKd-q20xi=@7yd_SICmR4oH@7 z<=n2>^u`1c%tU%H>N5Fh1qKd7*igh4oBqw@{6asAAG&)sshKX=((-YF>(c+#9rY3a z@1;3{fpFwPM%Z&7oVF)%kgPgZNldQ_o4AyOIx0+bmr5BP9bo9$&6C6*J{j0h%q%;i zWU_>d-T70sG&c&HU!PF6SW>ksV?Xz+&HQjFtD(e?Sh3k6;pf)QxJ2pA@?6Mc7}WLn z^PX{Vck%J&y&!aGGkimDL^tVBl_GIwEwL%mKkNux7~|XIQ*Oun| znP_$q!rr>}K@BydS*Vt<3MBh0$Awe7k+TO!FI*w|kpZ_}1xdvI2n}pzLE>#=E0adeS4)i#XVTm z_y`%)h3kn`1=x@0HiWf+>%++nCXm14IT`xBpMyUBi7?)m)1|h6o}v!%g2wm2y2@==-*z~kw52M_S{inp(t>hhGGliaPoIPYi@J$iGT3ZR z%!>DKe;*lD9Ac?MjG7e+7P@w97gaB8E@Q7!#d|h{QLn)JdQyxi1zZe`a7VbzoWxTND_Tb}LGxfGO$OMx_gN zoks769PFS&rDzGZ4yG%)(Q6si53BeY$dbT3=zz_Y4z{C78-i0|r`~Dyz;0L8x7c+; z#&~KN=z%vbLCl_;?=BSJA6R8WDB!AMukjfxBeEn4t4NULG~cTDr&!9f+I+;GfM0hY zMMQZ}?{h@xqaWD}RB1$#LfLuWVl9t`)ODKuD|RvmIe$=((Z00&3SCG@R=FN|)^_>g zMa5RK$!eqz4=?w@ZIjek+Yf9_o4ZmejhqWSxpM8R52OyyY?cHWo%2=k;*8P;2VetK zkH#NJJLrQHy7vNh7`4D(qdS)vNcKO}4vrVU-t5zIG|IWU5r?CGj5OD_9f0oKe^o|~ zOOVHGfSyjHg6$IhR|83af6R)^gExD~ebh*r0W|u;321fFUOJpS(iv0|)9wv)am+UPU4hzEK-Ak38re)X+gbAI;0f1kC2n$)tCF&>k1ckP1l=Fyb=|G zE1|)$Xrrved{;a z3f>+fFs^X(Fm@yv2<;&YAlw$ zXYd-{%&?h2J^I@niJvv>l&Lc6AtoXMFhe_^M@L{}Zd^Qn*im(Wd+?`4luC`nGvu!e z?XFn93e5J*#X0QrT?vAL={S;LecwFmO<6#(%NI_S{i(9Ee|8N9*ZOHbDC@{$JQI$S z*EIE^3J_QFeo8u((b9V{^E0|jIi3#!vlfaZn|;c&dG^!ieHO50|DbyQ z8&g7uWWeKJz5bix2+P?vth-~l^dY%AyQoI1ru!1>qm4AeB9@SdVH2mj3Ny(l)Ijjw zU2|Fun$ZQKFOV5f)THpyyK_I_WRQoL!UB>t{>j~=1f>n`` zWJo*xDuEIaQvPg&N8?esO|nPYZhs_gl4ND#R`z58#6^C|82skWJ)aNQ3ct-nH6{My z4k}XP1LflnXz(yNH`(^0Msk#X?`?_Qy-V6LD^5za-`^hvky}Go!iUHV@Lo!YiHWdKA z>t!dM-uOQ&na1wS!?xOXi?RURenB zE8N7xk7nUH1cOSdJ~TV?XONGUG=4yOzOqWT!B0K?lIhKz(Sr-VU^X99f9iWZzj4G{ z#MVFu3IlopS>DK~`6jNKI$9It<%~xgQ&1l4W=?0M?HP&s^!Z^8ea^ zwRRih`#vARK>P6#%at)}?EQPi6^=DmVsuy(R%FMb!5S z*TH_P)bE=&q4MqZ%4*7@Wqee88_l3wRKTYv`ByPl#?6tuwlB3@jIGyC%~u#dyYuBP z8D}o|eujm@uD|W+;x15o2$cF}L7_vVD0!&F<|UJiQZz*Le;bK2sFL=0;KX0f?WGny z-i&2$4hajB{@$3K{Tq8ErC`PZXA45hKG^*$-mvh~J(K$s<}tn#b302iB1+bnB%P?r zs|)U#ovzO4Fw=ed-bE_D3cZ~*_q6M^dGJxEZi8)3D8W&JJT6;Uh!TCO%&p-9D_Xkt z3of}@27#m$|1q34PAFD)Y#6bYDB%;_KW|?8qU!yr{ZhLRz^)FY>*(8MZ9;*ZZR7Hz zOG(6Rj33JqhKtBUTsvk3q2)1_XQ`cioGg-l-w^D)fba^2;XrCZ3%=sDd`hH*W3(m* z=ceqA>UQ1N+@uqsED-~>u#T*C{bG|AbY-#;PruHyx`ZxEit|o+cXx7`S3irLh;L3X ze6;6JU4-D5;1`5@u%BJ;PJR6qgKJ=zoRJsHE4Pdjxj+BFT%c`fmGZ_*Py_lJ?MUXG zQy}c<3rzfg5&FDZlx0Y#_3fsx7^q2cya&#eKP~2J9IyF0$rQ@0P)Hl!H5Z`8&@Xsb zKOoTTYjzU*ZN2SuX3lpm&LwsOcxXPoy&7gP=@uKO`WYN!N4HwRxqvl?_hXscnNBM% z?CGCxHd5Bf_Uh;IDN_Qu4G9Wg2AnKw4+d?@nWNvK69>$pSwh5X0D=@^YNepbwmkPs zTsh4Jcmz=qTumfE4@>%RrdK7h=fXWhI41d!)tgs3)*@?MYVJNLHw#Fv4D!p`L zq*`22#j@!i&mXkQgKTBN}r_$lTp+5tQ-@1ic^BA9E zvvu#d`=bp6HR-^%*+ZBD7QqIN2AdVNU!2SHKd9%3bRsH4bx37UI){GYJWAf?&i%^% zjQ9t1E4YfE=UP^r+57p%jyX5B7C_bBuLN5-t*hvudlxv?Ud-gJbr_mVjZzQK29SLA z5%4VgDWzrJm{2A)j-s%{!OijMI}e!hgIybwm;-;gu4^+69J~cUsed By

        Drupal React Stripe + MySQL

        From cb22016872f52384123d329d88ec677878cb42f8 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Sun, 21 Mar 2021 17:21:15 +0100 Subject: [PATCH 0766/1100] Readme: Added Node and npm version requirements (#2790) --- README.md | 7 +++++++ docs/index.html | 6 ++++++ 2 files changed, 13 insertions(+) diff --git a/README.md b/README.md index 1c7737fd5d..3ff12273c8 100644 --- a/README.md +++ b/README.md @@ -27,6 +27,13 @@ Prism depends on community contributions to expand and cover a wider array of us Thank you so much for contributing!! +### Software requirements + +Prism will run on [almost any browser](https://prismjs.com/#features-full) and Node.js version but you need the following software to contribute: + +- Node.js >= 10.x +- npm >= 6.x + ## Translations * [简体中文](https://www.awesomes.cn/repo/PrismJS/prism) (if unavailable, see [here](https://deepmind.t-salon.cc/article/113)) diff --git a/docs/index.html b/docs/index.html index fbd88233cf..9c1b31287a 100644 --- a/docs/index.html +++ b/docs/index.html @@ -72,6 +72,12 @@

        Contribute to Prism!

      • Go to prism-themes if you want to add a new theme.
      • Thank you so much for contributing!!

        +

        Software requirements

        +

        Prism will run on almost any browser and Node.js version but you need the following software to contribute:

        +
          +
        • Node.js >= 10.x
        • +
        • npm >= 6.x
        • +

        Translations

        • 简体中文 (if unavailable, see here)
        • From 9633564289c0720d54c06501a51ba8bc4a399777 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Sun, 21 Mar 2021 17:22:54 +0100 Subject: [PATCH 0767/1100] Plugins: Consistent Prism check (#2788) --- plugins/autolinker/prism-autolinker.js | 5 +- plugins/autolinker/prism-autolinker.min.js | 2 +- plugins/autoloader/prism-autoloader.js | 3 +- plugins/autoloader/prism-autoloader.min.js | 2 +- plugins/command-line/prism-command-line.js | 2 +- .../command-line/prism-command-line.min.js | 2 +- .../prism-copy-to-clipboard.js | 3 +- .../prism-copy-to-clipboard.min.js | 2 +- plugins/custom-class/prism-custom-class.js | 5 +- .../custom-class/prism-custom-class.min.js | 2 +- .../prism-data-uri-highlight.js | 5 +- .../prism-data-uri-highlight.min.js | 2 +- .../download-button/prism-download-button.js | 3 +- .../prism-download-button.min.js | 2 +- .../file-highlight/prism-file-highlight.js | 3 +- .../prism-file-highlight.min.js | 2 +- .../prism-filter-highlight-all.js | 2 +- .../prism-filter-highlight-all.min.js | 2 +- .../prism-highlight-keywords.js | 5 +- .../prism-highlight-keywords.min.js | 2 +- plugins/inline-color/prism-inline-color.js | 2 +- .../inline-color/prism-inline-color.min.js | 2 +- .../jsonp-highlight/prism-jsonp-highlight.js | 3 +- .../prism-jsonp-highlight.min.js | 2 +- plugins/keep-markup/prism-keep-markup.js | 2 +- plugins/keep-markup/prism-keep-markup.min.js | 2 +- .../line-highlight/prism-line-highlight.js | 2 +- .../prism-line-highlight.min.js | 2 +- plugins/line-numbers/prism-line-numbers.js | 2 +- .../line-numbers/prism-line-numbers.min.js | 2 +- plugins/match-braces/prism-match-braces.js | 2 +- .../match-braces/prism-match-braces.min.js | 2 +- .../prism-normalize-whitespace.js | 4 + .../prism-normalize-whitespace.min.js | 2 +- plugins/previewers/prism-previewers.js | 5 +- plugins/previewers/prism-previewers.min.js | 2 +- .../prism-remove-initial-line-feed.js | 2 +- .../prism-remove-initial-line-feed.min.js | 2 +- .../show-invisibles/prism-show-invisibles.js | 5 +- .../prism-show-invisibles.min.js | 2 +- plugins/show-language/prism-show-language.js | 2 +- .../show-language/prism-show-language.min.js | 2 +- plugins/toolbar/prism-toolbar.js | 3 +- plugins/toolbar/prism-toolbar.min.js | 2 +- plugins/treeview/prism-treeview.js | 121 +++++++++--------- plugins/treeview/prism-treeview.min.js | 2 +- .../prism-unescaped-markup.js | 2 +- .../prism-unescaped-markup.min.js | 2 +- plugins/wpd/prism-wpd.js | 45 +++---- plugins/wpd/prism-wpd.min.js | 2 +- prism.js | 3 +- 51 files changed, 144 insertions(+), 147 deletions(-) diff --git a/plugins/autolinker/prism-autolinker.js b/plugins/autolinker/prism-autolinker.js index ed70c1dca7..51e9a2a820 100644 --- a/plugins/autolinker/prism-autolinker.js +++ b/plugins/autolinker/prism-autolinker.js @@ -1,9 +1,6 @@ (function(){ -if ( - typeof self !== 'undefined' && !self.Prism || - typeof global !== 'undefined' && !global.Prism -) { +if (typeof Prism === 'undefined') { return; } diff --git a/plugins/autolinker/prism-autolinker.min.js b/plugins/autolinker/prism-autolinker.min.js index 91a2567b15..92e25e4bcf 100644 --- a/plugins/autolinker/prism-autolinker.min.js +++ b/plugins/autolinker/prism-autolinker.min.js @@ -1 +1 @@ -!function(){if(("undefined"==typeof self||self.Prism)&&("undefined"==typeof global||global.Prism)){var t=/\b([a-z]{3,7}:\/\/|tel:)[\w\-+%~/.:=&@]+(?:\?[\w\-+%~/.:=?&!$'()*,;@]*)?(?:#[\w\-+%~/.:#=?&!$'()*,;@]*)?/,r=/\b\S+@[\w.]+[a-z]{2}/,a=/\[([^\]]+)]\(([^)]+)\)/,l=["comment","url","attr-value","string"];Prism.plugins.autolinker={processGrammar:function(i){i&&!i["url-link"]&&(Prism.languages.DFS(i,function(i,n,e){-1s.length&&(a=s.length),a--;for(var r=--n;r<=a;r++)o[r]=s[r],s[r]=""}});else if(i)for(var l=0;l',r);else n=d('',r);var o=document.createElement("span");o.className=p,o.innerHTML=n;for(var i=t.outputLines||[],l=0,m=i.length;ls.length&&(a=s.length),a--;for(var r=--n;r<=a;r++)o[r]=s[r],s[r]=""}});else if(i)for(var l=0;l',r);else n=f('',r);var o=document.createElement("span");o.className=d,o.innerHTML=n;for(var i=t.outputLines||[],l=0,m=i.length;l\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/g,c=/^#?((?:[\da-f]){3,4}|(?:[\da-f]{2}){3,4})$/i,f=[function(n){var r=c.exec(n);if(r){for(var o=6<=(n=r[1]).length?2:1,e=n.length/o,s=1==o?1/15:1/255,t=[],i=0;i';n.content=i+o}})}}(); \ No newline at end of file +!function(){if("undefined"!=typeof Prism&&"undefined"!=typeof document){var a=/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/g,c=/^#?((?:[\da-f]){3,4}|(?:[\da-f]{2}){3,4})$/i,l=[function(n){var r=c.exec(n);if(r){for(var o=6<=(n=r[1]).length?2:1,s=n.length/o,e=1==o?1/15:1/255,t=[],i=0;i';n.content=i+o}})}}(); \ No newline at end of file diff --git a/plugins/jsonp-highlight/prism-jsonp-highlight.js b/plugins/jsonp-highlight/prism-jsonp-highlight.js index 3312e99ae9..27a693e6aa 100644 --- a/plugins/jsonp-highlight/prism-jsonp-highlight.js +++ b/plugins/jsonp-highlight/prism-jsonp-highlight.js @@ -1,5 +1,6 @@ (function () { - if (typeof self === 'undefined' || !self.Prism || !self.document) { + + if (typeof Prism === 'undefined' || typeof document === 'undefined') { return; } diff --git a/plugins/jsonp-highlight/prism-jsonp-highlight.min.js b/plugins/jsonp-highlight/prism-jsonp-highlight.min.js index e647679723..fc92a7d71b 100644 --- a/plugins/jsonp-highlight/prism-jsonp-highlight.min.js +++ b/plugins/jsonp-highlight/prism-jsonp-highlight.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof self&&self.Prism&&self.document){var c=[];t(function(t,e){if(t&&t.meta&&t.data){if(t.meta.status&&400<=t.meta.status)return"Error: "+(t.data.message||t.meta.status);if("string"==typeof t.data.content)return"function"==typeof atob?atob(t.data.content.replace(/\s/g,"")):"Your browser cannot decode base64"}return null},"github"),t(function(t,e){if(t&&t.meta&&t.data&&t.data.files){if(t.meta.status&&400<=t.meta.status)return"Error: "+(t.data.message||t.meta.status);var n=t.data.files,a=e.getAttribute("data-filename");if(null==a)for(var r in n)if(n.hasOwnProperty(r)){a=r;break}return void 0!==n[a]?n[a].content:"Error: unknown or missing gist file "+a}return null},"gist"),t(function(t,e){return t&&t.node&&"string"==typeof t.data?t.data:null},"bitbucket");var m=0,p="data-jsonp-status",g="loading",h="loaded",v="failed",b="pre[data-jsonp]:not(["+p+'="'+h+'"]):not(['+p+'="'+g+'"])';Prism.hooks.add("before-highlightall",function(t){t.selector+=", "+b}),Prism.hooks.add("before-sanity-check",function(t){var r=t.element;if(r.matches(b)){t.code="",r.setAttribute(p,g);var i=r.appendChild(document.createElement("CODE"));i.textContent="Loading…";var e=t.language;i.className="language-"+e;var n=Prism.plugins.autoloader;n&&n.loadLanguages(e);var a=r.getAttribute("data-adapter"),o=null;if(a){if("function"!=typeof window[a])return r.setAttribute(p,v),void(i.textContent=function(t){return'✖ Error: JSONP adapter function "'+t+"\" doesn't exist"}(a));o=window[a]}var u="prismjsonp"+m++,s=document.createElement("a"),f=s.href=r.getAttribute("data-jsonp");s.href+=(s.search?"&":"?")+(r.getAttribute("data-callback")||"callback")+"="+u;var l=setTimeout(function(){r.setAttribute(p,v),i.textContent=function(t){return"✖ Error: Timeout loading "+t}(f)},Prism.plugins.jsonphighlight.timeout),d=document.createElement("script");d.src=s.href,window[u]=function(t){document.head.removeChild(d),clearTimeout(l),delete window[u];var e=null;if(o)e=o(t,r);else for(var n=0,a=c.length;nn.node.posOpen&&(n.nodeStart=d,n.nodeStartPos=n.node.posOpen-n.pos),n.nodeStart&&n.pos+d.data.length>=n.node.posClose&&(n.nodeEnd=d,n.nodeEndPos=n.node.posClose-n.pos),n.pos+=d.data.length);if(n.nodeStart&&n.nodeEnd){var r=document.createRange();return r.setStart(n.nodeStart,n.nodeStartPos),r.setEnd(n.nodeEnd,n.nodeEndPos),n.node.clone.appendChild(r.extractContents()),r.insertNode(n.node.clone),r.detach(),!1}}return!0};n.keepMarkup.forEach(function(e){a(n.element,{node:e,pos:0})}),n.highlightedCode=n.element.innerHTML}})); \ No newline at end of file +"undefined"!=typeof Prism&&"undefined"!=typeof document&&document.createRange&&(Prism.plugins.KeepMarkup=!0,Prism.hooks.add("before-highlight",function(e){if(e.element.children.length&&Prism.util.isActive(e.element,"keep-markup",!0)){var a=0,s=[],p=function(e,n){var o={};n||(o.clone=e.cloneNode(!1),o.posOpen=a,s.push(o));for(var t=0,d=e.childNodes.length;tn.node.posOpen&&(n.nodeStart=d,n.nodeStartPos=n.node.posOpen-n.pos),n.nodeStart&&n.pos+d.data.length>=n.node.posClose&&(n.nodeEnd=d,n.nodeEndPos=n.node.posClose-n.pos),n.pos+=d.data.length);if(n.nodeStart&&n.nodeEnd){var r=document.createRange();return r.setStart(n.nodeStart,n.nodeStartPos),r.setEnd(n.nodeEnd,n.nodeEndPos),n.node.clone.appendChild(r.extractContents()),r.insertNode(n.node.clone),r.detach(),!1}}return!0};n.keepMarkup.forEach(function(e){a(n.element,{node:e,pos:0})}),n.highlightedCode=n.element.innerHTML}})); \ No newline at end of file diff --git a/plugins/line-highlight/prism-line-highlight.js b/plugins/line-highlight/prism-line-highlight.js index e850159c70..1735e7cac1 100644 --- a/plugins/line-highlight/prism-line-highlight.js +++ b/plugins/line-highlight/prism-line-highlight.js @@ -1,6 +1,6 @@ (function () { - if (typeof self === 'undefined' || !self.Prism || !self.document || !document.querySelector) { + if (typeof Prism === 'undefined' || typeof document === 'undefined' || !document.querySelector) { return; } diff --git a/plugins/line-highlight/prism-line-highlight.min.js b/plugins/line-highlight/prism-line-highlight.min.js index d3707e2a31..2b6f73b1a2 100644 --- a/plugins/line-highlight/prism-line-highlight.min.js +++ b/plugins/line-highlight/prism-line-highlight.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof self&&self.Prism&&self.document&&document.querySelector){var t,o="line-numbers",s="linkable-line-numbers",a=function(){if(void 0===t){var e=document.createElement("div");e.style.fontSize="13px",e.style.lineHeight="1.5",e.style.padding="0",e.style.border="0",e.innerHTML=" 
           ",document.body.appendChild(e),t=38===e.offsetHeight,document.body.removeChild(e)}return t},l=!0,u=0;Prism.hooks.add("before-sanity-check",function(e){var t=e.element.parentElement;if(c(t)){var n=0;v(".line-highlight",t).forEach(function(e){n+=e.textContent.length,e.parentNode.removeChild(e)}),n&&/^( \n)+$/.test(e.code.slice(-n))&&(e.code=e.code.slice(0,-n))}}),Prism.hooks.add("complete",function e(t){var n=t.element.parentElement;if(c(n)){clearTimeout(u);var i=Prism.plugins.lineNumbers,r=t.plugins&&t.plugins.lineNumbers;if(b(n,o)&&i&&!r)Prism.hooks.add("line-numbers",e);else d(n)(),u=setTimeout(f,1)}}),window.addEventListener("hashchange",f),window.addEventListener("resize",function(){v("pre").filter(c).map(function(e){return d(e)}).forEach(y)})}function v(e,t){return Array.prototype.slice.call((t||document).querySelectorAll(e))}function b(e,t){return e.classList.contains(t)}function y(e){e()}function c(e){return!(!e||!/pre/i.test(e.nodeName))&&(!!e.hasAttribute("data-line")||!(!e.id||!Prism.util.isActive(e,s)))}function d(u,e,c){var t=(e="string"==typeof e?e:u.getAttribute("data-line")||"").replace(/\s+/g,"").split(",").filter(Boolean),d=+u.getAttribute("data-line-offset")||0,f=(a()?parseInt:parseFloat)(getComputedStyle(u).lineHeight),p=Prism.util.isActive(u,o),n=u.querySelector("code"),h=p?u:n||u,m=[],g=n&&h!=n?function(e,t){var n=getComputedStyle(e),i=getComputedStyle(t);function r(e){return+e.substr(0,e.length-2)}return t.offsetTop+r(i.borderTopWidth)+r(i.paddingTop)-r(n.paddingTop)}(u,n):0;t.forEach(function(e){var t=e.split("-"),n=+t[0],i=+t[1]||n,r=u.querySelector('.line-highlight[data-range="'+e+'"]')||document.createElement("div");if(m.push(function(){r.setAttribute("aria-hidden","true"),r.setAttribute("data-range",e),r.className=(c||"")+" line-highlight"}),p&&Prism.plugins.lineNumbers){var o=Prism.plugins.lineNumbers.getLine(u,n),s=Prism.plugins.lineNumbers.getLine(u,i);if(o){var a=o.offsetTop+g+"px";m.push(function(){r.style.top=a})}if(s){var l=s.offsetTop-o.offsetTop+s.offsetHeight+"px";m.push(function(){r.style.height=l})}}else m.push(function(){r.setAttribute("data-start",String(n)),n span",u).forEach(function(e,t){var n=t+r;e.onclick=function(){var e=i+"."+n;l=!1,location.hash=e,setTimeout(function(){l=!0},1)}})}return function(){m.forEach(y)}}function f(){var e=location.hash.slice(1);v(".temporary.line-highlight").forEach(function(e){e.parentNode.removeChild(e)});var t=(e.match(/\.([\d,-]+)$/)||[,""])[1];if(t&&!document.getElementById(e)){var n=e.slice(0,e.lastIndexOf(".")),i=document.getElementById(n);if(i)i.hasAttribute("data-line")||i.setAttribute("data-line",""),d(i,t,"temporary ")(),l&&document.querySelector(".temporary.line-highlight").scrollIntoView()}}}(); \ No newline at end of file +!function(){if("undefined"!=typeof Prism&&"undefined"!=typeof document&&document.querySelector){var t,o="line-numbers",s="linkable-line-numbers",a=function(){if(void 0===t){var e=document.createElement("div");e.style.fontSize="13px",e.style.lineHeight="1.5",e.style.padding="0",e.style.border="0",e.innerHTML=" 
           ",document.body.appendChild(e),t=38===e.offsetHeight,document.body.removeChild(e)}return t},l=!0,u=0;Prism.hooks.add("before-sanity-check",function(e){var t=e.element.parentElement;if(c(t)){var n=0;v(".line-highlight",t).forEach(function(e){n+=e.textContent.length,e.parentNode.removeChild(e)}),n&&/^( \n)+$/.test(e.code.slice(-n))&&(e.code=e.code.slice(0,-n))}}),Prism.hooks.add("complete",function e(t){var n=t.element.parentElement;if(c(n)){clearTimeout(u);var i=Prism.plugins.lineNumbers,r=t.plugins&&t.plugins.lineNumbers;if(b(n,o)&&i&&!r)Prism.hooks.add("line-numbers",e);else d(n)(),u=setTimeout(f,1)}}),window.addEventListener("hashchange",f),window.addEventListener("resize",function(){v("pre").filter(c).map(function(e){return d(e)}).forEach(y)})}function v(e,t){return Array.prototype.slice.call((t||document).querySelectorAll(e))}function b(e,t){return e.classList.contains(t)}function y(e){e()}function c(e){return!(!e||!/pre/i.test(e.nodeName))&&(!!e.hasAttribute("data-line")||!(!e.id||!Prism.util.isActive(e,s)))}function d(u,e,c){var t=(e="string"==typeof e?e:u.getAttribute("data-line")||"").replace(/\s+/g,"").split(",").filter(Boolean),d=+u.getAttribute("data-line-offset")||0,f=(a()?parseInt:parseFloat)(getComputedStyle(u).lineHeight),p=Prism.util.isActive(u,o),n=u.querySelector("code"),h=p?u:n||u,m=[],g=n&&h!=n?function(e,t){var n=getComputedStyle(e),i=getComputedStyle(t);function r(e){return+e.substr(0,e.length-2)}return t.offsetTop+r(i.borderTopWidth)+r(i.paddingTop)-r(n.paddingTop)}(u,n):0;t.forEach(function(e){var t=e.split("-"),n=+t[0],i=+t[1]||n,r=u.querySelector('.line-highlight[data-range="'+e+'"]')||document.createElement("div");if(m.push(function(){r.setAttribute("aria-hidden","true"),r.setAttribute("data-range",e),r.className=(c||"")+" line-highlight"}),p&&Prism.plugins.lineNumbers){var o=Prism.plugins.lineNumbers.getLine(u,n),s=Prism.plugins.lineNumbers.getLine(u,i);if(o){var a=o.offsetTop+g+"px";m.push(function(){r.style.top=a})}if(s){var l=s.offsetTop-o.offsetTop+s.offsetHeight+"px";m.push(function(){r.style.height=l})}}else m.push(function(){r.setAttribute("data-start",String(n)),n span",u).forEach(function(e,t){var n=t+r;e.onclick=function(){var e=i+"."+n;l=!1,location.hash=e,setTimeout(function(){l=!0},1)}})}return function(){m.forEach(y)}}function f(){var e=location.hash.slice(1);v(".temporary.line-highlight").forEach(function(e){e.parentNode.removeChild(e)});var t=(e.match(/\.([\d,-]+)$/)||[,""])[1];if(t&&!document.getElementById(e)){var n=e.slice(0,e.lastIndexOf(".")),i=document.getElementById(n);if(i)i.hasAttribute("data-line")||i.setAttribute("data-line",""),d(i,t,"temporary ")(),l&&document.querySelector(".temporary.line-highlight").scrollIntoView()}}}(); \ No newline at end of file diff --git a/plugins/line-numbers/prism-line-numbers.js b/plugins/line-numbers/prism-line-numbers.js index 1712ed6bd1..a6d82ef9c6 100644 --- a/plugins/line-numbers/prism-line-numbers.js +++ b/plugins/line-numbers/prism-line-numbers.js @@ -1,6 +1,6 @@ (function () { - if (typeof self === 'undefined' || !self.Prism || !self.document) { + if (typeof Prism === 'undefined' || typeof document === 'undefined') { return; } diff --git a/plugins/line-numbers/prism-line-numbers.min.js b/plugins/line-numbers/prism-line-numbers.min.js index adce92854a..9206fc314b 100644 --- a/plugins/line-numbers/prism-line-numbers.min.js +++ b/plugins/line-numbers/prism-line-numbers.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof self&&self.Prism&&self.document){var o="line-numbers",a=/\n(?!$)/g,e=Prism.plugins.lineNumbers={getLine:function(e,n){if("PRE"===e.tagName&&e.classList.contains(o)){var t=e.querySelector(".line-numbers-rows");if(t){var i=parseInt(e.getAttribute("data-start"),10)||1,r=i+(t.children.length-1);n");(i=document.createElement("span")).setAttribute("aria-hidden","true"),i.className="line-numbers-rows",i.innerHTML=l,t.hasAttribute("data-start")&&(t.style.counterReset="linenumber "+(parseInt(t.getAttribute("data-start"),10)-1)),e.element.appendChild(i),u([t]),Prism.hooks.run("line-numbers",e)}}}),Prism.hooks.add("line-numbers",function(e){e.plugins=e.plugins||{},e.plugins.lineNumbers=!0})}function u(e){if(0!=(e=e.filter(function(e){var n=t(e)["white-space"];return"pre-wrap"===n||"pre-line"===n})).length){var n=e.map(function(e){var n=e.querySelector("code"),t=e.querySelector(".line-numbers-rows");if(n&&t){var i=e.querySelector(".line-numbers-sizer"),r=n.textContent.split(a);i||((i=document.createElement("span")).className="line-numbers-sizer",n.appendChild(i)),i.innerHTML="0",i.style.display="block";var s=i.getBoundingClientRect().height;return i.innerHTML="",{element:e,lines:r,lineHeights:[],oneLinerHeight:s,sizer:i}}}).filter(Boolean);n.forEach(function(e){var i=e.sizer,n=e.lines,r=e.lineHeights,s=e.oneLinerHeight;r[n.length-1]=void 0,n.forEach(function(e,n){if(e&&1");(i=document.createElement("span")).setAttribute("aria-hidden","true"),i.className="line-numbers-rows",i.innerHTML=l,t.hasAttribute("data-start")&&(t.style.counterReset="linenumber "+(parseInt(t.getAttribute("data-start"),10)-1)),e.element.appendChild(i),u([t]),Prism.hooks.run("line-numbers",e)}}}),Prism.hooks.add("line-numbers",function(e){e.plugins=e.plugins||{},e.plugins.lineNumbers=!0})}function u(e){if(0!=(e=e.filter(function(e){var n=t(e)["white-space"];return"pre-wrap"===n||"pre-line"===n})).length){var n=e.map(function(e){var n=e.querySelector("code"),t=e.querySelector(".line-numbers-rows");if(n&&t){var i=e.querySelector(".line-numbers-sizer"),r=n.textContent.split(a);i||((i=document.createElement("span")).className="line-numbers-sizer",n.appendChild(i)),i.innerHTML="0",i.style.display="block";var s=i.getBoundingClientRect().height;return i.innerHTML="",{element:e,lines:r,lineHeights:[],oneLinerHeight:s,sizer:i}}}).filter(Boolean);n.forEach(function(e){var i=e.sizer,n=e.lines,r=e.lineHeights,s=e.oneLinerHeight;r[n.length-1]=void 0,n.forEach(function(e,n){if(e&&1"})}),tokens:{gradient:{pattern:/(?:\b|\B-[a-z]{1,10}-)(?:repeating-)?(?:linear|radial)-gradient\((?:(?:rgb|hsl)a?\(.+?\)|[^\)])+\)/gi,inside:{function:/[\w-]+(?=\()/,punctuation:/[(),]/}}},languages:{css:!0,less:!0,sass:[{lang:"sass",before:"punctuation",inside:"inside",root:Prism.languages.sass&&Prism.languages.sass["variable-line"]},{lang:"sass",before:"punctuation",inside:"inside",root:Prism.languages.sass&&Prism.languages.sass["property-line"]}],scss:!0,stylus:[{lang:"stylus",before:"func",inside:"rest",root:Prism.languages.stylus&&Prism.languages.stylus["property-declaration"].inside},{lang:"stylus",before:"func",inside:"rest",root:Prism.languages.stylus&&Prism.languages.stylus["variable-declaration"].inside}]}},angle:{create:function(){new Prism.plugins.Previewer("angle",function(e){var s,t,i=parseFloat(e),a=e.match(/[a-z]+$/i);if(!i||!a)return!1;switch(a=a[0]){case"deg":s=360;break;case"grad":s=400;break;case"rad":s=2*Math.PI;break;case"turn":s=1}return t=100*i/s,t%=100,this[(i<0?"set":"remove")+"Attribute"]("data-negative",""),this.querySelector("circle").style.strokeDasharray=Math.abs(t)+",500",!0},"*",function(){this._elt.innerHTML=''})},tokens:{angle:/(?:\b|\B-|(?=\B\.))(?:\d+(?:\.\d+)?|\.\d+)(?:deg|g?rad|turn)\b/i},languages:{css:!0,less:!0,markup:{lang:"markup",before:"punctuation",inside:"inside",root:Prism.languages.markup&&Prism.languages.markup.tag.inside["attr-value"]},sass:[{lang:"sass",inside:"inside",root:Prism.languages.sass&&Prism.languages.sass["property-line"]},{lang:"sass",before:"operator",inside:"inside",root:Prism.languages.sass&&Prism.languages.sass["variable-line"]}],scss:!0,stylus:[{lang:"stylus",before:"func",inside:"rest",root:Prism.languages.stylus&&Prism.languages.stylus["property-declaration"].inside},{lang:"stylus",before:"func",inside:"rest",root:Prism.languages.stylus&&Prism.languages.stylus["variable-declaration"].inside}]}},color:{create:function(){new Prism.plugins.Previewer("color",function(e){return this.style.backgroundColor="",this.style.backgroundColor=e,!!this.style.backgroundColor})},tokens:{color:[Prism.languages.css.hexcode].concat(Prism.languages.css.color)},languages:{css:!1,less:!0,markup:{lang:"markup",before:"punctuation",inside:"inside",root:Prism.languages.markup&&Prism.languages.markup.tag.inside["attr-value"]},sass:[{lang:"sass",before:"punctuation",inside:"inside",root:Prism.languages.sass&&Prism.languages.sass["variable-line"]},{lang:"sass",inside:"inside",root:Prism.languages.sass&&Prism.languages.sass["property-line"]}],scss:!1,stylus:[{lang:"stylus",before:"hexcode",inside:"rest",root:Prism.languages.stylus&&Prism.languages.stylus["property-declaration"].inside},{lang:"stylus",before:"hexcode",inside:"rest",root:Prism.languages.stylus&&Prism.languages.stylus["variable-declaration"].inside}]}},easing:{create:function(){new Prism.plugins.Previewer("easing",function(e){var s=(e={linear:"0,0,1,1",ease:".25,.1,.25,1","ease-in":".42,0,1,1","ease-out":"0,0,.58,1","ease-in-out":".42,0,.58,1"}[e]||e).match(/-?(?:\d+(?:\.\d+)?|\.\d+)/g);if(4!==s.length)return!1;s=s.map(function(e,s){return 100*(s%2?1-e:e)}),this.querySelector("path").setAttribute("d","M0,100 C"+s[0]+","+s[1]+", "+s[2]+","+s[3]+", 100,0");var t=this.querySelectorAll("line");return t[0].setAttribute("x2",s[0]),t[0].setAttribute("y2",s[1]),t[1].setAttribute("x2",s[2]),t[1].setAttribute("y2",s[3]),!0},"*",function(){this._elt.innerHTML=''})},tokens:{easing:{pattern:/\bcubic-bezier\((?:-?(?:\d+(?:\.\d+)?|\.\d+),\s*){3}-?(?:\d+(?:\.\d+)?|\.\d+)\)\B|\b(?:linear|ease(?:-in)?(?:-out)?)(?=\s|[;}]|$)/i,inside:{function:/[\w-]+(?=\()/,punctuation:/[(),]/}}},languages:{css:!0,less:!0,sass:[{lang:"sass",inside:"inside",before:"punctuation",root:Prism.languages.sass&&Prism.languages.sass["variable-line"]},{lang:"sass",inside:"inside",root:Prism.languages.sass&&Prism.languages.sass["property-line"]}],scss:!0,stylus:[{lang:"stylus",before:"hexcode",inside:"rest",root:Prism.languages.stylus&&Prism.languages.stylus["property-declaration"].inside},{lang:"stylus",before:"hexcode",inside:"rest",root:Prism.languages.stylus&&Prism.languages.stylus["variable-declaration"].inside}]}},time:{create:function(){new Prism.plugins.Previewer("time",function(e){var s=parseFloat(e),t=e.match(/[a-z]+$/i);return!(!s||!t)&&(t=t[0],this.querySelector("circle").style.animationDuration=2*s+t,!0)},"*",function(){this._elt.innerHTML=''})},tokens:{time:/(?:\b|\B-|(?=\B\.))(?:\d+(?:\.\d+)?|\.\d+)m?s\b/i},languages:{css:!0,less:!0,markup:{lang:"markup",before:"punctuation",inside:"inside",root:Prism.languages.markup&&Prism.languages.markup.tag.inside["attr-value"]},sass:[{lang:"sass",inside:"inside",root:Prism.languages.sass&&Prism.languages.sass["property-line"]},{lang:"sass",before:"operator",inside:"inside",root:Prism.languages.sass&&Prism.languages.sass["variable-line"]}],scss:!0,stylus:[{lang:"stylus",before:"hexcode",inside:"rest",root:Prism.languages.stylus&&Prism.languages.stylus["property-declaration"].inside},{lang:"stylus",before:"hexcode",inside:"rest",root:Prism.languages.stylus&&Prism.languages.stylus["variable-declaration"].inside}]}}},t="token",i="active",a="flipped",n=function(e,s,t,i){this._elt=null,this._type=e,this._token=null,this.updater=s,this._mouseout=this.mouseout.bind(this),this.initializer=i;var a=this;t||(t=["*"]),Array.isArray(t)||(t=[t]),t.forEach(function(e){"string"!=typeof e&&(e=e.lang),n.byLanguages[e]||(n.byLanguages[e]=[]),n.byLanguages[e].indexOf(a)<0&&n.byLanguages[e].push(a)}),n.byType[e]=this};for(var e in n.prototype.init=function(){this._elt||(this._elt=document.createElement("div"),this._elt.className="prism-previewer prism-previewer-"+this._type,document.body.appendChild(this._elt),this.initializer&&this.initializer())},n.prototype.isDisabled=function(e){do{if(e.hasAttribute&&e.hasAttribute("data-previewers"))return-1===(e.getAttribute("data-previewers")||"").split(/\s+/).indexOf(this._type)}while(e=e.parentNode);return!1},n.prototype.check=function(e){if(!e.classList.contains(t)||!this.isDisabled(e)){do{if(e.classList&&e.classList.contains(t)&&e.classList.contains(this._type))break}while(e=e.parentNode);e&&e!==this._token&&(this._token=e,this.show())}},n.prototype.mouseout=function(){this._token.removeEventListener("mouseout",this._mouseout,!1),this._token=null,this.hide()},n.prototype.show=function(){if(this._elt||this.init(),this._token)if(this.updater.call(this._elt,this._token.textContent)){this._token.addEventListener("mouseout",this._mouseout,!1);var e=function(e){var s=e.getBoundingClientRect(),t=s.left,i=s.top,a=document.documentElement.getBoundingClientRect();return t-=a.left,{top:i-=a.top,right:innerWidth-t-s.width,bottom:innerHeight-i-s.height,left:t,width:s.width,height:s.height}}(this._token);this._elt.classList.add(i),0"})}),tokens:{gradient:{pattern:/(?:\b|\B-[a-z]{1,10}-)(?:repeating-)?(?:linear|radial)-gradient\((?:(?:rgb|hsl)a?\(.+?\)|[^\)])+\)/gi,inside:{function:/[\w-]+(?=\()/,punctuation:/[(),]/}}},languages:{css:!0,less:!0,sass:[{lang:"sass",before:"punctuation",inside:"inside",root:Prism.languages.sass&&Prism.languages.sass["variable-line"]},{lang:"sass",before:"punctuation",inside:"inside",root:Prism.languages.sass&&Prism.languages.sass["property-line"]}],scss:!0,stylus:[{lang:"stylus",before:"func",inside:"rest",root:Prism.languages.stylus&&Prism.languages.stylus["property-declaration"].inside},{lang:"stylus",before:"func",inside:"rest",root:Prism.languages.stylus&&Prism.languages.stylus["variable-declaration"].inside}]}},angle:{create:function(){new Prism.plugins.Previewer("angle",function(e){var s,t,i=parseFloat(e),a=e.match(/[a-z]+$/i);if(!i||!a)return!1;switch(a=a[0]){case"deg":s=360;break;case"grad":s=400;break;case"rad":s=2*Math.PI;break;case"turn":s=1}return t=100*i/s,t%=100,this[(i<0?"set":"remove")+"Attribute"]("data-negative",""),this.querySelector("circle").style.strokeDasharray=Math.abs(t)+",500",!0},"*",function(){this._elt.innerHTML=''})},tokens:{angle:/(?:\b|\B-|(?=\B\.))(?:\d+(?:\.\d+)?|\.\d+)(?:deg|g?rad|turn)\b/i},languages:{css:!0,less:!0,markup:{lang:"markup",before:"punctuation",inside:"inside",root:Prism.languages.markup&&Prism.languages.markup.tag.inside["attr-value"]},sass:[{lang:"sass",inside:"inside",root:Prism.languages.sass&&Prism.languages.sass["property-line"]},{lang:"sass",before:"operator",inside:"inside",root:Prism.languages.sass&&Prism.languages.sass["variable-line"]}],scss:!0,stylus:[{lang:"stylus",before:"func",inside:"rest",root:Prism.languages.stylus&&Prism.languages.stylus["property-declaration"].inside},{lang:"stylus",before:"func",inside:"rest",root:Prism.languages.stylus&&Prism.languages.stylus["variable-declaration"].inside}]}},color:{create:function(){new Prism.plugins.Previewer("color",function(e){return this.style.backgroundColor="",this.style.backgroundColor=e,!!this.style.backgroundColor})},tokens:{color:[Prism.languages.css.hexcode].concat(Prism.languages.css.color)},languages:{css:!1,less:!0,markup:{lang:"markup",before:"punctuation",inside:"inside",root:Prism.languages.markup&&Prism.languages.markup.tag.inside["attr-value"]},sass:[{lang:"sass",before:"punctuation",inside:"inside",root:Prism.languages.sass&&Prism.languages.sass["variable-line"]},{lang:"sass",inside:"inside",root:Prism.languages.sass&&Prism.languages.sass["property-line"]}],scss:!1,stylus:[{lang:"stylus",before:"hexcode",inside:"rest",root:Prism.languages.stylus&&Prism.languages.stylus["property-declaration"].inside},{lang:"stylus",before:"hexcode",inside:"rest",root:Prism.languages.stylus&&Prism.languages.stylus["variable-declaration"].inside}]}},easing:{create:function(){new Prism.plugins.Previewer("easing",function(e){var s=(e={linear:"0,0,1,1",ease:".25,.1,.25,1","ease-in":".42,0,1,1","ease-out":"0,0,.58,1","ease-in-out":".42,0,.58,1"}[e]||e).match(/-?(?:\d+(?:\.\d+)?|\.\d+)/g);if(4!==s.length)return!1;s=s.map(function(e,s){return 100*(s%2?1-e:e)}),this.querySelector("path").setAttribute("d","M0,100 C"+s[0]+","+s[1]+", "+s[2]+","+s[3]+", 100,0");var t=this.querySelectorAll("line");return t[0].setAttribute("x2",s[0]),t[0].setAttribute("y2",s[1]),t[1].setAttribute("x2",s[2]),t[1].setAttribute("y2",s[3]),!0},"*",function(){this._elt.innerHTML=''})},tokens:{easing:{pattern:/\bcubic-bezier\((?:-?(?:\d+(?:\.\d+)?|\.\d+),\s*){3}-?(?:\d+(?:\.\d+)?|\.\d+)\)\B|\b(?:linear|ease(?:-in)?(?:-out)?)(?=\s|[;}]|$)/i,inside:{function:/[\w-]+(?=\()/,punctuation:/[(),]/}}},languages:{css:!0,less:!0,sass:[{lang:"sass",inside:"inside",before:"punctuation",root:Prism.languages.sass&&Prism.languages.sass["variable-line"]},{lang:"sass",inside:"inside",root:Prism.languages.sass&&Prism.languages.sass["property-line"]}],scss:!0,stylus:[{lang:"stylus",before:"hexcode",inside:"rest",root:Prism.languages.stylus&&Prism.languages.stylus["property-declaration"].inside},{lang:"stylus",before:"hexcode",inside:"rest",root:Prism.languages.stylus&&Prism.languages.stylus["variable-declaration"].inside}]}},time:{create:function(){new Prism.plugins.Previewer("time",function(e){var s=parseFloat(e),t=e.match(/[a-z]+$/i);return!(!s||!t)&&(t=t[0],this.querySelector("circle").style.animationDuration=2*s+t,!0)},"*",function(){this._elt.innerHTML=''})},tokens:{time:/(?:\b|\B-|(?=\B\.))(?:\d+(?:\.\d+)?|\.\d+)m?s\b/i},languages:{css:!0,less:!0,markup:{lang:"markup",before:"punctuation",inside:"inside",root:Prism.languages.markup&&Prism.languages.markup.tag.inside["attr-value"]},sass:[{lang:"sass",inside:"inside",root:Prism.languages.sass&&Prism.languages.sass["property-line"]},{lang:"sass",before:"operator",inside:"inside",root:Prism.languages.sass&&Prism.languages.sass["variable-line"]}],scss:!0,stylus:[{lang:"stylus",before:"hexcode",inside:"rest",root:Prism.languages.stylus&&Prism.languages.stylus["property-declaration"].inside},{lang:"stylus",before:"hexcode",inside:"rest",root:Prism.languages.stylus&&Prism.languages.stylus["variable-declaration"].inside}]}}},t="token",i="active",a="flipped",r=function(e,s,t,i){this._elt=null,this._type=e,this._token=null,this.updater=s,this._mouseout=this.mouseout.bind(this),this.initializer=i;var a=this;t||(t=["*"]),Array.isArray(t)||(t=[t]),t.forEach(function(e){"string"!=typeof e&&(e=e.lang),r.byLanguages[e]||(r.byLanguages[e]=[]),r.byLanguages[e].indexOf(a)<0&&r.byLanguages[e].push(a)}),r.byType[e]=this};for(var e in r.prototype.init=function(){this._elt||(this._elt=document.createElement("div"),this._elt.className="prism-previewer prism-previewer-"+this._type,document.body.appendChild(this._elt),this.initializer&&this.initializer())},r.prototype.isDisabled=function(e){do{if(e.hasAttribute&&e.hasAttribute("data-previewers"))return-1===(e.getAttribute("data-previewers")||"").split(/\s+/).indexOf(this._type)}while(e=e.parentNode);return!1},r.prototype.check=function(e){if(!e.classList.contains(t)||!this.isDisabled(e)){do{if(e.classList&&e.classList.contains(t)&&e.classList.contains(this._type))break}while(e=e.parentNode);e&&e!==this._token&&(this._token=e,this.show())}},r.prototype.mouseout=function(){this._token.removeEventListener("mouseout",this._mouseout,!1),this._token=null,this.hide()},r.prototype.show=function(){if(this._elt||this.init(),this._token)if(this.updater.call(this._elt,this._token.textContent)){this._token.addEventListener("mouseout",this._mouseout,!1);var e=function(e){var s=e.getBoundingClientRect(),t=s.left,i=s.top,a=document.documentElement.getBoundingClientRect();return t-=a.left,{top:i-=a.top,right:innerWidth-t-s.width,bottom:innerHeight-i-s.height,left:t,width:s.width,height:s.height}}(this._token);this._elt.classList.add(i),0 /, +(function () { + + if (typeof Prism === 'undefined') { + return; + } + + Prism.languages.treeview = { + 'treeview-part': { + pattern: /^.+/m, + inside: { + 'entry-line': [ + { + pattern: /\|-- |├── /, + alias: 'line-h' + }, + { + pattern: /\| |│ /, + alias: 'line-v' + }, + { + pattern: /`-- |└── /, + alias: 'line-v-last' + }, + { + pattern: / {4}/, + alias: 'line-v-gap' + } + ], + 'entry-name': { + pattern: /.*\S.*/, + inside: { + // symlink + 'operator': / -> /, + } } } } - } -}; - -Prism.hooks.add('wrap', function (env) { - if (env.language === 'treeview' && env.type === 'entry-name') { - var classes = env.classes; - - var folderPattern = /(^|[^\\])\/\s*$/; - if (folderPattern.test(env.content)) { - // folder - - // remove trailing / - env.content = env.content.replace(folderPattern, '$1'); - classes.push('dir'); - } else { - // file - - // remove trailing file marker - env.content = env.content.replace(/(^|[^\\])[=*|]\s*$/, '$1'); - - var parts = env.content.toLowerCase().replace(/\s+/g, '').split('.'); - while (parts.length > 1) { - parts.shift(); - // Ex. 'foo.min.js' would become 'foo.min.js' - classes.push('ext-' + parts.join('-')); + }; + + Prism.hooks.add('wrap', function (env) { + if (env.language === 'treeview' && env.type === 'entry-name') { + var classes = env.classes; + + var folderPattern = /(^|[^\\])\/\s*$/; + if (folderPattern.test(env.content)) { + // folder + + // remove trailing / + env.content = env.content.replace(folderPattern, '$1'); + classes.push('dir'); + } else { + // file + + // remove trailing file marker + env.content = env.content.replace(/(^|[^\\])[=*|]\s*$/, '$1'); + + var parts = env.content.toLowerCase().replace(/\s+/g, '').split('.'); + while (parts.length > 1) { + parts.shift(); + // Ex. 'foo.min.js' would become 'foo.min.js' + classes.push('ext-' + parts.join('-')); + } } - } - if (env.content[0] === '.') { - classes.push('dotfile'); + if (env.content[0] === '.') { + classes.push('dotfile'); + } } - } -}); + }); +}()); diff --git a/plugins/treeview/prism-treeview.min.js b/plugins/treeview/prism-treeview.min.js index 8c2283ada1..8a5aaef3d7 100644 --- a/plugins/treeview/prism-treeview.min.js +++ b/plugins/treeview/prism-treeview.min.js @@ -1 +1 @@ -Prism.languages.treeview={"treeview-part":{pattern:/^.+/m,inside:{"entry-line":[{pattern:/\|-- |├── /,alias:"line-h"},{pattern:/\| |│ /,alias:"line-v"},{pattern:/`-- |└── /,alias:"line-v-last"},{pattern:/ {4}/,alias:"line-v-gap"}],"entry-name":{pattern:/.*\S.*/,inside:{operator:/ -> /}}}}},Prism.hooks.add("wrap",function(e){if("treeview"===e.language&&"entry-name"===e.type){var t=e.classes,n=/(^|[^\\])\/\s*$/;if(n.test(e.content))e.content=e.content.replace(n,"$1"),t.push("dir");else{e.content=e.content.replace(/(^|[^\\])[=*|]\s*$/,"$1");for(var a=e.content.toLowerCase().replace(/\s+/g,"").split(".");1 /}}}}},Prism.hooks.add("wrap",function(e){if("treeview"===e.language&&"entry-name"===e.type){var t=e.classes,n=/(^|[^\\])\/\s*$/;if(n.test(e.content))e.content=e.content.replace(n,"$1"),t.push("dir");else{e.content=e.content.replace(/(^|[^\\])[=*|]\s*$/,"$1");for(var a=e.content.toLowerCase().replace(/\s+/g,"").split(".");1|>)/gi,"<\/script>"),c.appendChild(a),t.parentNode.replaceChild(c,t),void(e.element=a)}if(!e.code){var n=t.childNodes;1===n.length&&"#comment"==n[0].nodeName&&(t.textContent=e.code=n[0].textContent)}})); \ No newline at end of file +"undefined"!=typeof Prism&&"undefined"!=typeof document&&(Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector),Prism.plugins.UnescapedMarkup=!0,Prism.hooks.add("before-highlightall",function(e){e.selector+=', [class*="lang-"] script[type="text/plain"], [class*="language-"] script[type="text/plain"], script[type="text/plain"][class*="lang-"], script[type="text/plain"][class*="language-"]'}),Prism.hooks.add("before-sanity-check",function(e){var t=e.element;if(t.matches('script[type="text/plain"]')){var a=document.createElement("code"),c=document.createElement("pre");c.className=a.className=t.className;var n=t.dataset;return Object.keys(n||{}).forEach(function(e){Object.prototype.hasOwnProperty.call(n,e)&&(c.dataset[e]=n[e])}),a.textContent=e.code=e.code.replace(/<\/script(?:>|>)/gi,"<\/script>"),c.appendChild(a),t.parentNode.replaceChild(c,t),void(e.element=a)}if(!e.code){var o=t.childNodes;1===o.length&&"#comment"==o[0].nodeName&&(t.textContent=e.code=o[0].textContent)}})); \ No newline at end of file diff --git a/plugins/wpd/prism-wpd.js b/plugins/wpd/prism-wpd.js index dc147d4f65..b612396971 100644 --- a/plugins/wpd/prism-wpd.js +++ b/plugins/wpd/prism-wpd.js @@ -1,9 +1,6 @@ (function(){ -if ( - typeof self !== 'undefined' && !self.Prism || - typeof global !== 'undefined' && !global.Prism -) { +if (typeof Prism === 'undefined') { return; } @@ -28,20 +25,20 @@ if (Prism.languages.css) { if (Prism.languages.markup) { Prism.languages.markup.tag.inside.tag.inside['tag-id'] = /[\w-]+/; - + var Tags = { HTML: { - 'a': 1, 'abbr': 1, 'acronym': 1, 'b': 1, 'basefont': 1, 'bdo': 1, 'big': 1, 'blink': 1, 'cite': 1, 'code': 1, 'dfn': 1, 'em': 1, 'kbd': 1, 'i': 1, - 'rp': 1, 'rt': 1, 'ruby': 1, 's': 1, 'samp': 1, 'small': 1, 'spacer': 1, 'strike': 1, 'strong': 1, 'sub': 1, 'sup': 1, 'time': 1, 'tt': 1, 'u': 1, + 'a': 1, 'abbr': 1, 'acronym': 1, 'b': 1, 'basefont': 1, 'bdo': 1, 'big': 1, 'blink': 1, 'cite': 1, 'code': 1, 'dfn': 1, 'em': 1, 'kbd': 1, 'i': 1, + 'rp': 1, 'rt': 1, 'ruby': 1, 's': 1, 'samp': 1, 'small': 1, 'spacer': 1, 'strike': 1, 'strong': 1, 'sub': 1, 'sup': 1, 'time': 1, 'tt': 1, 'u': 1, 'var': 1, 'wbr': 1, 'noframes': 1, 'summary': 1, 'command': 1, 'dt': 1, 'dd': 1, 'figure': 1, 'figcaption': 1, 'center': 1, 'section': 1, 'nav': 1, 'article': 1, 'aside': 1, 'hgroup': 1, 'header': 1, 'footer': 1, 'address': 1, 'noscript': 1, 'isIndex': 1, 'main': 1, 'mark': 1, 'marquee': 1, 'meter': 1, 'menu': 1 }, SVG: { - 'animateColor': 1, 'animateMotion': 1, 'animateTransform': 1, 'glyph': 1, 'feBlend': 1, 'feColorMatrix': 1, 'feComponentTransfer': 1, - 'feFuncR': 1, 'feFuncG': 1, 'feFuncB': 1, 'feFuncA': 1, 'feComposite': 1, 'feConvolveMatrix': 1, 'feDiffuseLighting': 1, 'feDisplacementMap': 1, - 'feFlood': 1, 'feGaussianBlur': 1, 'feImage': 1, 'feMerge': 1, 'feMergeNode': 1, 'feMorphology': 1, 'feOffset': 1, 'feSpecularLighting': 1, - 'feTile': 1, 'feTurbulence': 1, 'feDistantLight': 1, 'fePointLight': 1, 'feSpotLight': 1, 'linearGradient': 1, 'radialGradient': 1, 'altGlyph': 1, + 'animateColor': 1, 'animateMotion': 1, 'animateTransform': 1, 'glyph': 1, 'feBlend': 1, 'feColorMatrix': 1, 'feComponentTransfer': 1, + 'feFuncR': 1, 'feFuncG': 1, 'feFuncB': 1, 'feFuncA': 1, 'feComposite': 1, 'feConvolveMatrix': 1, 'feDiffuseLighting': 1, 'feDisplacementMap': 1, + 'feFlood': 1, 'feGaussianBlur': 1, 'feImage': 1, 'feMerge': 1, 'feMergeNode': 1, 'feMorphology': 1, 'feOffset': 1, 'feSpecularLighting': 1, + 'feTile': 1, 'feTurbulence': 1, 'feDistantLight': 1, 'fePointLight': 1, 'feSpotLight': 1, 'linearGradient': 1, 'radialGradient': 1, 'altGlyph': 1, 'textPath': 1, 'tref': 1, 'altglyph': 1, 'textpath': 1, 'altglyphdef': 1, 'altglyphitem': 1, 'clipPath': 1, 'color-profile': 1, 'cursor': 1, 'font-face': 1, 'font-face-format': 1, 'font-face-name': 1, 'font-face-src': 1, 'font-face-uri': 1, 'foreignObject': 1, 'glyphRef': 1, 'hkern': 1, 'vkern': 1 @@ -56,8 +53,8 @@ Prism.hooks.add('wrap', function(env) { if ((env.type == 'tag-id' || (env.type == 'property' && env.content.indexOf('-') != 0) || (env.type == 'rule'&& env.content.indexOf('@-') != 0) - || (env.type == 'pseudo-class'&& env.content.indexOf(':-') != 0) - || (env.type == 'pseudo-element'&& env.content.indexOf('::-') != 0) + || (env.type == 'pseudo-class'&& env.content.indexOf(':-') != 0) + || (env.type == 'pseudo-element'&& env.content.indexOf('::-') != 0) || (env.type == 'attr-name' && env.content.indexOf('data-') != 0) ) && env.content.indexOf('<') === -1 ) { @@ -119,7 +116,7 @@ Prism.hooks.add('wrap', function(env) { function getLanguage(tag) { var tagL = tag.toLowerCase(); - + if (Tags.HTML[tagL]) { return 'html'; } @@ -129,30 +126,30 @@ function getLanguage(tag) { else if (Tags.MathML[tag]) { return 'mathml'; } - + // Not in dictionary, perform check if (Tags.HTML[tagL] !== 0 && typeof document !== 'undefined') { var htmlInterface = (document.createElement(tag).toString().match(/\[object HTML(.+)Element\]/) || [])[1]; - + if (htmlInterface && htmlInterface != 'Unknown') { Tags.HTML[tagL] = 1; return 'html'; } } - + Tags.HTML[tagL] = 0; - + if (Tags.SVG[tag] !== 0 && typeof document !== 'undefined') { var svgInterface = (document.createElementNS('http://www.w3.org/2000/svg', tag).toString().match(/\[object SVG(.+)Element\]/) || [])[1]; - + if (svgInterface && svgInterface != 'Unknown') { Tags.SVG[tag] = 1; return 'svg'; } } - + Tags.SVG[tag] = 0; - + // Lame way to detect MathML, but browsers don’t expose interface names there :( if (Tags.MathML[tag] !== 0) { if (tag.indexOf('m') === 0) { @@ -160,10 +157,10 @@ function getLanguage(tag) { return 'mathml'; } } - + Tags.MathML[tag] = 0; - + return null; } -})(); \ No newline at end of file +})(); diff --git a/plugins/wpd/prism-wpd.min.js b/plugins/wpd/prism-wpd.min.js index 878572db19..4d2f395544 100644 --- a/plugins/wpd/prism-wpd.min.js +++ b/plugins/wpd/prism-wpd.min.js @@ -1 +1 @@ -!function(){if(("undefined"==typeof self||self.Prism)&&("undefined"==typeof global||global.Prism)){if(Prism.languages.css&&(Prism.languages.css.selector.pattern?(Prism.languages.css.selector.inside["pseudo-class"]=/:[\w-]+/,Prism.languages.css.selector.inside["pseudo-element"]=/::[\w-]+/):Prism.languages.css.selector={pattern:Prism.languages.css.selector,inside:{"pseudo-class":/:[\w-]+/,"pseudo-element":/::[\w-]+/}}),Prism.languages.markup){Prism.languages.markup.tag.inside.tag.inside["tag-id"]=/[\w-]+/;var s={HTML:{a:1,abbr:1,acronym:1,b:1,basefont:1,bdo:1,big:1,blink:1,cite:1,code:1,dfn:1,em:1,kbd:1,i:1,rp:1,rt:1,ruby:1,s:1,samp:1,small:1,spacer:1,strike:1,strong:1,sub:1,sup:1,time:1,tt:1,u:1,var:1,wbr:1,noframes:1,summary:1,command:1,dt:1,dd:1,figure:1,figcaption:1,center:1,section:1,nav:1,article:1,aside:1,hgroup:1,header:1,footer:1,address:1,noscript:1,isIndex:1,main:1,mark:1,marquee:1,meter:1,menu:1},SVG:{animateColor:1,animateMotion:1,animateTransform:1,glyph:1,feBlend:1,feColorMatrix:1,feComponentTransfer:1,feFuncR:1,feFuncG:1,feFuncB:1,feFuncA:1,feComposite:1,feConvolveMatrix:1,feDiffuseLighting:1,feDisplacementMap:1,feFlood:1,feGaussianBlur:1,feImage:1,feMerge:1,feMergeNode:1,feMorphology:1,feOffset:1,feSpecularLighting:1,feTile:1,feTurbulence:1,feDistantLight:1,fePointLight:1,feSpotLight:1,linearGradient:1,radialGradient:1,altGlyph:1,textPath:1,tref:1,altglyph:1,textpath:1,altglyphdef:1,altglyphitem:1,clipPath:1,"color-profile":1,cursor:1,"font-face":1,"font-face-format":1,"font-face-name":1,"font-face-src":1,"font-face-uri":1,foreignObject:1,glyphRef:1,hkern:1,vkern:1},MathML:{}}}var a;Prism.hooks.add("wrap",function(e){if(("tag-id"==e.type||"property"==e.type&&0!=e.content.indexOf("-")||"rule"==e.type&&0!=e.content.indexOf("@-")||"pseudo-class"==e.type&&0!=e.content.indexOf(":-")||"pseudo-element"==e.type&&0!=e.content.indexOf("::-")||"attr-name"==e.type&&0!=e.content.indexOf("data-"))&&-1===e.content.indexOf("<")&&("css"==e.language||"scss"==e.language||"markup"==e.language)){var t="https://webplatform.github.io/docs/",n=e.content;if("css"==e.language||"scss"==e.language)t+="css/","property"==e.type?t+="properties/":"rule"==e.type?(t+="atrules/",n=n.substring(1)):"pseudo-class"==e.type?(t+="selectors/pseudo-classes/",n=n.substring(1)):"pseudo-element"==e.type&&(t+="selectors/pseudo-elements/",n=n.substring(2));else if("markup"==e.language)if("tag-id"==e.type){if(!(a=function(e){var t=e.toLowerCase();{if(s.HTML[t])return"html";if(s.SVG[e])return"svg";if(s.MathML[e])return"mathml"}if(0!==s.HTML[t]&&"undefined"!=typeof document){var n=(document.createElement(e).toString().match(/\[object HTML(.+)Element\]/)||[])[1];if(n&&"Unknown"!=n)return s.HTML[t]=1,"html"}if((s.HTML[t]=0)!==s.SVG[e]&&"undefined"!=typeof document){var a=(document.createElementNS("http://www.w3.org/2000/svg",e).toString().match(/\[object SVG(.+)Element\]/)||[])[1];if(a&&"Unknown"!=a)return s.SVG[e]=1,"svg"}if((s.SVG[e]=0)!==s.MathML[e]&&0===e.indexOf("m"))return s.MathML[e]=1,"mathml";return s.MathML[e]=0,null}(e.content)||a))return;t+=a+"/elements/"}else if("attr-name"==e.type){if(!a)return;t+=a+"/attributes/"}t+=n,e.tag="a",e.attributes.href=t,e.attributes.target="_blank"}})}}(); \ No newline at end of file +!function(){if("undefined"!=typeof Prism){if(Prism.languages.css&&(Prism.languages.css.selector.pattern?(Prism.languages.css.selector.inside["pseudo-class"]=/:[\w-]+/,Prism.languages.css.selector.inside["pseudo-element"]=/::[\w-]+/):Prism.languages.css.selector={pattern:Prism.languages.css.selector,inside:{"pseudo-class":/:[\w-]+/,"pseudo-element":/::[\w-]+/}}),Prism.languages.markup){Prism.languages.markup.tag.inside.tag.inside["tag-id"]=/[\w-]+/;var s={HTML:{a:1,abbr:1,acronym:1,b:1,basefont:1,bdo:1,big:1,blink:1,cite:1,code:1,dfn:1,em:1,kbd:1,i:1,rp:1,rt:1,ruby:1,s:1,samp:1,small:1,spacer:1,strike:1,strong:1,sub:1,sup:1,time:1,tt:1,u:1,var:1,wbr:1,noframes:1,summary:1,command:1,dt:1,dd:1,figure:1,figcaption:1,center:1,section:1,nav:1,article:1,aside:1,hgroup:1,header:1,footer:1,address:1,noscript:1,isIndex:1,main:1,mark:1,marquee:1,meter:1,menu:1},SVG:{animateColor:1,animateMotion:1,animateTransform:1,glyph:1,feBlend:1,feColorMatrix:1,feComponentTransfer:1,feFuncR:1,feFuncG:1,feFuncB:1,feFuncA:1,feComposite:1,feConvolveMatrix:1,feDiffuseLighting:1,feDisplacementMap:1,feFlood:1,feGaussianBlur:1,feImage:1,feMerge:1,feMergeNode:1,feMorphology:1,feOffset:1,feSpecularLighting:1,feTile:1,feTurbulence:1,feDistantLight:1,fePointLight:1,feSpotLight:1,linearGradient:1,radialGradient:1,altGlyph:1,textPath:1,tref:1,altglyph:1,textpath:1,altglyphdef:1,altglyphitem:1,clipPath:1,"color-profile":1,cursor:1,"font-face":1,"font-face-format":1,"font-face-name":1,"font-face-src":1,"font-face-uri":1,foreignObject:1,glyphRef:1,hkern:1,vkern:1},MathML:{}}}var a;Prism.hooks.add("wrap",function(e){if(("tag-id"==e.type||"property"==e.type&&0!=e.content.indexOf("-")||"rule"==e.type&&0!=e.content.indexOf("@-")||"pseudo-class"==e.type&&0!=e.content.indexOf(":-")||"pseudo-element"==e.type&&0!=e.content.indexOf("::-")||"attr-name"==e.type&&0!=e.content.indexOf("data-"))&&-1===e.content.indexOf("<")&&("css"==e.language||"scss"==e.language||"markup"==e.language)){var t="https://webplatform.github.io/docs/",n=e.content;if("css"==e.language||"scss"==e.language)t+="css/","property"==e.type?t+="properties/":"rule"==e.type?(t+="atrules/",n=n.substring(1)):"pseudo-class"==e.type?(t+="selectors/pseudo-classes/",n=n.substring(1)):"pseudo-element"==e.type&&(t+="selectors/pseudo-elements/",n=n.substring(2));else if("markup"==e.language)if("tag-id"==e.type){if(!(a=function(e){var t=e.toLowerCase();{if(s.HTML[t])return"html";if(s.SVG[e])return"svg";if(s.MathML[e])return"mathml"}if(0!==s.HTML[t]&&"undefined"!=typeof document){var n=(document.createElement(e).toString().match(/\[object HTML(.+)Element\]/)||[])[1];if(n&&"Unknown"!=n)return s.HTML[t]=1,"html"}if((s.HTML[t]=0)!==s.SVG[e]&&"undefined"!=typeof document){var a=(document.createElementNS("http://www.w3.org/2000/svg",e).toString().match(/\[object SVG(.+)Element\]/)||[])[1];if(a&&"Unknown"!=a)return s.SVG[e]=1,"svg"}if((s.SVG[e]=0)!==s.MathML[e]&&0===e.indexOf("m"))return s.MathML[e]=1,"mathml";return s.MathML[e]=0,null}(e.content)||a))return;t+=a+"/elements/"}else if("attr-name"==e.type){if(!a)return;t+=a+"/attributes/"}t+=n,e.tag="a",e.attributes.href=t,e.attributes.target="_blank"}})}}(); \ No newline at end of file diff --git a/prism.js b/prism.js index 1ba0d239c1..c869ff6adc 100644 --- a/prism.js +++ b/prism.js @@ -1622,7 +1622,8 @@ Prism.languages.js = Prism.languages.javascript; ********************************************** */ (function () { - if (typeof self === 'undefined' || !self.Prism || !self.document) { + + if (typeof Prism === 'undefined' || typeof document === 'undefined') { return; } From 7e51b99c86991b669435c51f80d6b16b9131fc6f Mon Sep 17 00:00:00 2001 From: Christian Zosel Date: Sun, 21 Mar 2021 18:54:16 +0100 Subject: [PATCH 0768/1100] Added support for Jexl (#2764) --- components.js | 2 +- components.json | 4 + components/prism-jexl.js | 14 +++ components/prism-jexl.min.js | 1 + examples/prism-jexl.html | 8 ++ tests/languages/jexl/boolean_feature.test | 13 +++ tests/languages/jexl/function_feature.test | 96 +++++++++++++++++++++ tests/languages/jexl/keyword_feature.test | 23 +++++ tests/languages/jexl/number_feature.test | 15 ++++ tests/languages/jexl/operator_feature.test | 33 +++++++ tests/languages/jexl/string_feature.test | 35 ++++++++ tests/languages/jexl/transform_feature.test | 55 ++++++++++++ 12 files changed, 298 insertions(+), 1 deletion(-) create mode 100644 components/prism-jexl.js create mode 100644 components/prism-jexl.min.js create mode 100644 examples/prism-jexl.html create mode 100644 tests/languages/jexl/boolean_feature.test create mode 100644 tests/languages/jexl/function_feature.test create mode 100644 tests/languages/jexl/keyword_feature.test create mode 100644 tests/languages/jexl/number_feature.test create mode 100644 tests/languages/jexl/operator_feature.test create mode 100644 tests/languages/jexl/string_feature.test create mode 100644 tests/languages/jexl/transform_feature.test diff --git a/components.js b/components.js index 3f18020000..37bde575f6 100644 --- a/components.js +++ b/components.js @@ -1,2 +1,2 @@ -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml","ssml","atom","rss"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","ssml":"SSML","atom":"Atom","rss":"RSS"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","optional":"regex","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"ABNF","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"agda":{"title":"Agda","owner":"xy-ren"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apex":{"title":"Apex","require":["clike","sql"],"owner":"RunDevelopment"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"dkern"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"birb":{"title":"Birb","require":"clike","owner":"Calamity210"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"BNF","alias":"rbnf","aliasTitles":{"rbnf":"RBNF"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"bsl":{"title":"BSL (1C:Enterprise)","alias":"oscript","aliasTitles":{"oscript":"OneScript"},"owner":"Diversus23"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cfscript":{"title":"CFScript","require":"clike","alias":"cfc","owner":"mjclemente"},"chaiscript":{"title":"ChaiScript","require":["clike","cpp"],"owner":"RunDevelopment"},"cil":{"title":"CIL","owner":"sbrl"},"clojure":{"title":"Clojure","owner":"troglotit"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"cobol":{"title":"COBOL","owner":"RunDevelopment"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"csv":{"title":"CSV","owner":"RunDevelopment"},"cypher":{"title":"Cypher","owner":"RunDevelopment"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dataweave":{"title":"DataWeave","owner":"machaval"},"dax":{"title":"DAX","owner":"peterbud"},"dhall":{"title":"Dhall","owner":"RunDevelopment"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"dot":{"title":"DOT (Graphviz)","alias":"gv","optional":"markup","owner":"RunDevelopment"},"ebnf":{"title":"EBNF","owner":"RunDevelopment"},"editorconfig":{"title":"EditorConfig","owner":"osipxd"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"false":{"title":"False","owner":"edukisto"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"c","owner":"Golmote"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","optional":"markdown","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"hlsl":{"title":"HLSL","require":"c","owner":"RunDevelopment"},"http":{"title":"HTTP","optional":["css","javascript","json","markup","uri"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"icu-message-format":{"title":"ICU Message Format","owner":"RunDevelopment"},"idris":{"title":"Idris","alias":"idr","owner":"KeenS","require":"haskell"},"ignore":{"title":".ignore","owner":"osipxd","alias":["gitignore","hgignore","npmignore"],"aliasTitles":{"gitignore":".gitignore","hgignore":".hgignore","npmignore":".npmignore"}},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike","typescript"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","alias":"webmanifest","aliasTitles":{"webmanifest":"Web App Manifest"},"owner":"CupOfTea696"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"jsstacktrace":{"title":"JS stack trace","owner":"sbrl"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","alias":["kt","kts"],"aliasTitles":{"kts":"Kotlin Script"},"require":"clike","owner":"Golmote"},"kumir":{"title":"KuMir (КуМир)","alias":"kum","owner":"edukisto"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"log":{"title":"Log file","owner":"RunDevelopment"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","optional":"yaml","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"mongodb":{"title":"MongoDB","owner":"airs0urce","require":"javascript"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"naniscript":{"title":"Naninovel Script","owner":"Elringus","alias":"nani"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nevod":{"title":"Nevod","owner":"nezaboodka"},"nginx":{"title":"nginx","owner":"volado"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"openqasm":{"title":"OpenQasm","alias":"qasm","owner":"RunDevelopment"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"psl":{"title":"PATROL Scripting Language","owner":"bertysentry"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":"markup-templating","owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"promql":{"title":"PromQL","owner":"arendjr"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"purebasic":{"title":"PureBasic","require":"clike","alias":"pbfasm","owner":"HeX0R101"},"purescript":{"title":"PureScript","require":"haskell","alias":"purs","owner":"sriharshachilakapati"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"racket":{"title":"Racket","require":"scheme","alias":"rkt","owner":"RunDevelopment"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","owner":"RunDevelopment"},"rego":{"title":"Rego","owner":"JordanSh"},"renpy":{"title":"Ren'py","alias":"rpy","owner":"HyuchiaDiego"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","alias":["sh-session","shellsession"],"owner":"RunDevelopment"},"smali":{"title":"Smali","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sml":{"title":"SML","alias":"smlnj","aliasTitles":{"smlnj":"SML/NJ"},"owner":"RunDevelopment"},"solidity":{"title":"Solidity (Ethereum)","alias":"sol","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"squirrel":{"title":"Squirrel","require":"clike","owner":"RunDevelopment"},"stan":{"title":"Stan","owner":"RunDevelopment"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","vbnet"],"owner":"RunDevelopment"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"typoscript":{"title":"TypoScript","alias":"tsconfig","aliasTitles":{"tsconfig":"TSConfig"},"owner":"dkern"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"uri":{"title":"URI","alias":"url","aliasTitles":{"url":"URL"},"owner":"RunDevelopment"},"v":{"title":"V","require":"clike","owner":"taggon"},"vala":{"title":"Vala","require":"clike","optional":"regex","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":["vb","vba"],"aliasTitles":{"vba":"VBA"},"owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xml-doc":{"title":"XML doc (.net)","require":"markup","modify":["csharp","fsharp","vbnet"],"owner":"RunDevelopment"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"yang":{"title":"YANG","owner":"RunDevelopment"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml","ssml","atom","rss"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","ssml":"SSML","atom":"Atom","rss":"RSS"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","optional":"regex","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"ABNF","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"agda":{"title":"Agda","owner":"xy-ren"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apex":{"title":"Apex","require":["clike","sql"],"owner":"RunDevelopment"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"dkern"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"birb":{"title":"Birb","require":"clike","owner":"Calamity210"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"BNF","alias":"rbnf","aliasTitles":{"rbnf":"RBNF"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"bsl":{"title":"BSL (1C:Enterprise)","alias":"oscript","aliasTitles":{"oscript":"OneScript"},"owner":"Diversus23"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cfscript":{"title":"CFScript","require":"clike","alias":"cfc","owner":"mjclemente"},"chaiscript":{"title":"ChaiScript","require":["clike","cpp"],"owner":"RunDevelopment"},"cil":{"title":"CIL","owner":"sbrl"},"clojure":{"title":"Clojure","owner":"troglotit"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"cobol":{"title":"COBOL","owner":"RunDevelopment"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"csv":{"title":"CSV","owner":"RunDevelopment"},"cypher":{"title":"Cypher","owner":"RunDevelopment"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dataweave":{"title":"DataWeave","owner":"machaval"},"dax":{"title":"DAX","owner":"peterbud"},"dhall":{"title":"Dhall","owner":"RunDevelopment"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"dot":{"title":"DOT (Graphviz)","alias":"gv","optional":"markup","owner":"RunDevelopment"},"ebnf":{"title":"EBNF","owner":"RunDevelopment"},"editorconfig":{"title":"EditorConfig","owner":"osipxd"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"false":{"title":"False","owner":"edukisto"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"c","owner":"Golmote"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","optional":"markdown","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"hlsl":{"title":"HLSL","require":"c","owner":"RunDevelopment"},"http":{"title":"HTTP","optional":["css","javascript","json","markup","uri"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"icu-message-format":{"title":"ICU Message Format","owner":"RunDevelopment"},"idris":{"title":"Idris","alias":"idr","owner":"KeenS","require":"haskell"},"ignore":{"title":".ignore","owner":"osipxd","alias":["gitignore","hgignore","npmignore"],"aliasTitles":{"gitignore":".gitignore","hgignore":".hgignore","npmignore":".npmignore"}},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jexl":{"title":"Jexl","owner":"czosel"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike","typescript"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","alias":"webmanifest","aliasTitles":{"webmanifest":"Web App Manifest"},"owner":"CupOfTea696"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"jsstacktrace":{"title":"JS stack trace","owner":"sbrl"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","alias":["kt","kts"],"aliasTitles":{"kts":"Kotlin Script"},"require":"clike","owner":"Golmote"},"kumir":{"title":"KuMir (КуМир)","alias":"kum","owner":"edukisto"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"log":{"title":"Log file","owner":"RunDevelopment"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","optional":"yaml","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"mongodb":{"title":"MongoDB","owner":"airs0urce","require":"javascript"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"naniscript":{"title":"Naninovel Script","owner":"Elringus","alias":"nani"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nevod":{"title":"Nevod","owner":"nezaboodka"},"nginx":{"title":"nginx","owner":"volado"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"openqasm":{"title":"OpenQasm","alias":"qasm","owner":"RunDevelopment"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"psl":{"title":"PATROL Scripting Language","owner":"bertysentry"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":"markup-templating","owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"promql":{"title":"PromQL","owner":"arendjr"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"purebasic":{"title":"PureBasic","require":"clike","alias":"pbfasm","owner":"HeX0R101"},"purescript":{"title":"PureScript","require":"haskell","alias":"purs","owner":"sriharshachilakapati"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"racket":{"title":"Racket","require":"scheme","alias":"rkt","owner":"RunDevelopment"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","owner":"RunDevelopment"},"rego":{"title":"Rego","owner":"JordanSh"},"renpy":{"title":"Ren'py","alias":"rpy","owner":"HyuchiaDiego"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","alias":["sh-session","shellsession"],"owner":"RunDevelopment"},"smali":{"title":"Smali","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sml":{"title":"SML","alias":"smlnj","aliasTitles":{"smlnj":"SML/NJ"},"owner":"RunDevelopment"},"solidity":{"title":"Solidity (Ethereum)","alias":"sol","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"squirrel":{"title":"Squirrel","require":"clike","owner":"RunDevelopment"},"stan":{"title":"Stan","owner":"RunDevelopment"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","vbnet"],"owner":"RunDevelopment"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"typoscript":{"title":"TypoScript","alias":"tsconfig","aliasTitles":{"tsconfig":"TSConfig"},"owner":"dkern"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"uri":{"title":"URI","alias":"url","aliasTitles":{"url":"URL"},"owner":"RunDevelopment"},"v":{"title":"V","require":"clike","owner":"taggon"},"vala":{"title":"Vala","require":"clike","optional":"regex","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":["vb","vba"],"aliasTitles":{"vba":"VBA"},"owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xml-doc":{"title":"XML doc (.net)","require":"markup","modify":["csharp","fsharp","vbnet"],"owner":"RunDevelopment"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"yang":{"title":"YANG","owner":"RunDevelopment"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; if (typeof module !== 'undefined' && module.exports) { module.exports = components; } \ No newline at end of file diff --git a/components.json b/components.json index e7ea448605..8777a13da5 100644 --- a/components.json +++ b/components.json @@ -605,6 +605,10 @@ "title": "Java stack trace", "owner": "RunDevelopment" }, + "jexl": { + "title": "Jexl", + "owner": "czosel" + }, "jolie": { "title": "Jolie", "require": "clike", diff --git a/components/prism-jexl.js b/components/prism-jexl.js new file mode 100644 index 0000000000..a2dda2b821 --- /dev/null +++ b/components/prism-jexl.js @@ -0,0 +1,14 @@ +Prism.languages.jexl = { + 'string': /(["'])(?:\\[\s\S]|(?!\1)[^\\])*\1/, + 'transform': { + pattern: /(\|\s*)[a-zA-Zа-яА-Я_\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF$][a-zA-Zа-яА-Я0-9_\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF$]*/, + alias: "function", + lookbehind: true + }, + 'function': /[a-zA-Zа-яА-Я_\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF$][a-zA-Zа-яА-Я0-9_\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF$]*\s*(?=\()/, + 'number': /\b\d+(?:\.\d+)?\b|\B\.\d+\b/, + 'operator': /[<>!]=?|-|\+|&&|==|\|\|?|\/\/?|[?:*^%]/, + 'boolean': /\b(?:true|false)\b/, + 'keyword': /\bin\b/, + 'punctuation': /[{}[\](),.]/, +}; diff --git a/components/prism-jexl.min.js b/components/prism-jexl.min.js new file mode 100644 index 0000000000..92648f33da --- /dev/null +++ b/components/prism-jexl.min.js @@ -0,0 +1 @@ +Prism.languages.jexl={string:/(["'])(?:\\[\s\S]|(?!\1)[^\\])*\1/,transform:{pattern:/(\|\s*)[a-zA-Zа-яА-Я_\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF$][a-zA-Zа-яА-Я0-9_\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF$]*/,alias:"function",lookbehind:!0},function:/[a-zA-Zа-яА-Я_\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF$][a-zA-Zа-яА-Я0-9_\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF$]*\s*(?=\()/,number:/\b\d+(?:\.\d+)?\b|\B\.\d+\b/,operator:/[<>!]=?|-|\+|&&|==|\|\|?|\/\/?|[?:*^%]/,boolean:/\b(?:true|false)\b/,keyword:/\bin\b/,punctuation:/[{}[\](),.]/}; \ No newline at end of file diff --git a/examples/prism-jexl.html b/examples/prism-jexl.html new file mode 100644 index 0000000000..0c5a77e916 --- /dev/null +++ b/examples/prism-jexl.html @@ -0,0 +1,8 @@ +

          Full example

          +
          
          +[
          +  fun(1,2),
          +  { obj: "1" }.obj,
          +  ctx|transform
          +]|join(", ")
          +
          diff --git a/tests/languages/jexl/boolean_feature.test b/tests/languages/jexl/boolean_feature.test new file mode 100644 index 0000000000..4019c444f8 --- /dev/null +++ b/tests/languages/jexl/boolean_feature.test @@ -0,0 +1,13 @@ +true +false + +---------------------------------------------------- + +[ + ["boolean", "true"], + ["boolean", "false"] +] + +---------------------------------------------------- + +Checks for booleans. \ No newline at end of file diff --git a/tests/languages/jexl/function_feature.test b/tests/languages/jexl/function_feature.test new file mode 100644 index 0000000000..37a325e041 --- /dev/null +++ b/tests/languages/jexl/function_feature.test @@ -0,0 +1,96 @@ +foo() +foo () +foo +() +foo . bar () +foo_bar() +foo_bar ( ) +f42() +_() +$() +ä() +Ý() +foo({ x: 1 }) +foo({ y: fun() }) +foo(bar()) + +---------------------------------------------------- + +[ + ["function", "foo"], + ["punctuation", "("], + ["punctuation", ")"], + + ["function", "foo "], + ["punctuation", "("], + ["punctuation", ")"], + + ["function", "foo\r\n"], + ["punctuation", "("], + ["punctuation", ")"], + + "\r\nfoo ", + ["punctuation", "."], + ["function", "bar "], + ["punctuation", "("], + ["punctuation", ")"], + + ["function", "foo_bar"], + ["punctuation", "("], + ["punctuation", ")"], + + ["function", "foo_bar "], + ["punctuation", "("], + ["punctuation", ")"], + + ["function", "f42"], + ["punctuation", "("], + ["punctuation", ")"], + + ["function", "_"], + ["punctuation", "("], + ["punctuation", ")"], + + ["function", "$"], + ["punctuation", "("], + ["punctuation", ")"], + + ["function", "ä"], + ["punctuation", "("], + ["punctuation", ")"], + + ["function", "Ý"], + ["punctuation", "("], + ["punctuation", ")"], + + ["function", "foo"], + ["punctuation", "("], + ["punctuation", "{"], + " x", + ["operator", ":"], + ["number", "1"], + ["punctuation", "}"], + ["punctuation", ")"], + + ["function", "foo"], + ["punctuation", "("], + ["punctuation", "{"], + " y", + ["operator", ":"], + ["function", "fun"], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", "}"], + ["punctuation", ")"], + + ["function", "foo"], + ["punctuation", "("], + ["function", "bar"], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", ")"] +] + +---------------------------------------------------- + +Checks for functions. Also checks for unicode characters in identifiers. diff --git a/tests/languages/jexl/keyword_feature.test b/tests/languages/jexl/keyword_feature.test new file mode 100644 index 0000000000..4dc6bc035f --- /dev/null +++ b/tests/languages/jexl/keyword_feature.test @@ -0,0 +1,23 @@ +in +"foo" in ["foo"] +"f" in "foo" + +---------------------------------------------------- + +[ + ["keyword", "in"], + + ["string", "\"foo\""], + ["keyword", "in"], + ["punctuation", "["], + ["string", "\"foo\""], + ["punctuation", "]"], + + ["string", "\"f\""], + ["keyword", "in"], + ["string", "\"foo\""] +] + +---------------------------------------------------- + +Checks for all keywords. diff --git a/tests/languages/jexl/number_feature.test b/tests/languages/jexl/number_feature.test new file mode 100644 index 0000000000..6ef7af7cb7 --- /dev/null +++ b/tests/languages/jexl/number_feature.test @@ -0,0 +1,15 @@ +42 +3.14159 +-5.7 + +---------------------------------------------------- + +[ + ["number", "42"], + ["number", "3.14159"], + ["operator", "-"], ["number", "5.7"] +] + +---------------------------------------------------- + +Checks for integers and floats. Negative numbers are handled differently than in Jexl for simplicity: In Jexl, the minus sign in "-1" is parsed as an operator in "1-1" and as part of the number literal in ("-1"). diff --git a/tests/languages/jexl/operator_feature.test b/tests/languages/jexl/operator_feature.test new file mode 100644 index 0000000000..c534dab044 --- /dev/null +++ b/tests/languages/jexl/operator_feature.test @@ -0,0 +1,33 @@ +- ++ +< <= +> >= +== +! != +&& || +* +/ // +^ +? : +% + +---------------------------------------------------- + +[ + ["operator", "-"], + ["operator", "+"], + ["operator", "<"], ["operator", "<="], + ["operator", ">"], ["operator", ">="], + ["operator", "=="], + ["operator", "!"], ["operator", "!="], + ["operator", "&&"], ["operator", "||"], + ["operator", "*"], + ["operator", "/"], ["operator", "//"], + ["operator", "^"], + ["operator", "?"], ["operator", ":"], + ["operator", "%"] +] + +---------------------------------------------------- + +Checks for all operators. diff --git a/tests/languages/jexl/string_feature.test b/tests/languages/jexl/string_feature.test new file mode 100644 index 0000000000..c95ee0ef88 --- /dev/null +++ b/tests/languages/jexl/string_feature.test @@ -0,0 +1,35 @@ +'a' +'ä' +'本' +'À' +'\'' +'""' +'Hello, +world!' + +"\n" +"\"" +"Hello, +world!" +"日本語" + +---------------------------------------------------- + +[ + ["string", "'a'"], + ["string", "'ä'"], + ["string", "'本'"], + ["string", "'À'"], + ["string", "'\\''"], + ["string", "'\"\"'"], + ["string", "'Hello,\r\nworld!'"], + + ["string", "\"\\n\""], + ["string", "\"\\\"\""], + ["string", "\"Hello,\r\nworld!\""], + ["string", "\"日本語\""] +] + +---------------------------------------------------- + +Jexl strings can contain special characters, and even linebreaks. \ No newline at end of file diff --git a/tests/languages/jexl/transform_feature.test b/tests/languages/jexl/transform_feature.test new file mode 100644 index 0000000000..576a793c2f --- /dev/null +++ b/tests/languages/jexl/transform_feature.test @@ -0,0 +1,55 @@ +"foo"|bar +"foo"| bar +"foo" +| +bar + +foo|Ý + +foo|bar() +foo|bar(1,2) +foo|bar( +1,2 +) + +---------------------------------------------------- + +[ + ["string", "\"foo\""], ["operator", "|"], ["transform", "bar"], + ["string", "\"foo\""], ["operator", "|"], ["transform", "bar"], + ["string", "\"foo\""], + ["operator", "|"], + ["transform", "bar"], + + "\r\n\r\nfoo", ["operator", "|"], ["transform", "Ý"], + + "\r\n\r\nfoo", + ["operator", "|"], + ["transform", "bar"], + ["punctuation", "("], + ["punctuation", ")"], + + "\r\nfoo", + ["operator", "|"], + ["transform", "bar"], + ["punctuation", "("], + ["number", "1"], + ["punctuation", ","], + ["number", "2"], + ["punctuation", ")"], + + "\r\nfoo", + ["operator", "|"], + ["transform", "bar"], + ["punctuation", "("], + + ["number", "1"], + ["punctuation", ","], + ["number", "2"], + + ["punctuation", ")"] +] + +---------------------------------------------------- + +Checks for transforms. Transforms follow the same naming rules as functions. From ebbbfd471b1688106adfa686a17151744a4affc4 Mon Sep 17 00:00:00 2001 From: XojoGermany <1276539+XojoGermany@users.noreply.github.com> Date: Mon, 22 Mar 2021 13:03:36 +0100 Subject: [PATCH 0769/1100] Xojo: `REM` is no longer highlighted as a keyword in comments (#2823) REM was incorrectly identified as a keyword. This has been fixed. REM is now recognized as a comment. --- components/prism-xojo.js | 7 ++----- components/prism-xojo.min.js | 2 +- tests/languages/xojo/comment_feature.test | 6 +++--- tests/languages/xojo/keyword_feature.test | 2 -- 4 files changed, 6 insertions(+), 11 deletions(-) diff --git a/components/prism-xojo.js b/components/prism-xojo.js index 9c6671e7fc..a1a514b60e 100644 --- a/components/prism-xojo.js +++ b/components/prism-xojo.js @@ -1,9 +1,6 @@ Prism.languages.xojo = { 'comment': { - pattern: /(?:'|\/\/|Rem\b).+/i, - inside: { - 'keyword': /^Rem/i - } + pattern: /(?:'|\/\/|Rem\b).+/i }, 'string': { pattern: /"(?:""|[^"])*"/, @@ -14,7 +11,7 @@ Prism.languages.xojo = { /&[bchou][a-z\d]+/i ], 'symbol': /#(?:If|Else|ElseIf|Endif|Pragma)\b/i, - 'keyword': /\b(?:AddHandler|App|Array|As(?:signs)?|Auto|By(?:Ref|Val)|Boolean|Break|Byte|Call|Case|Catch|CFStringRef|CGFloat|Class|Color|Const|Continue|CString|Currency|CurrentMethodName|Declare|Delegate|Dim|Do(?:uble|wnTo)?|Each|Else(?:If)?|End|Enumeration|Event|Exception|Exit|Extends|False|Finally|For|Function|Get|GetTypeInfo|Global|GOTO|If|Implements|In|Inherits|Int(?:erface|eger|8|16|32|64)?|Lib|Loop|Me|Module|Next|Nil|Object|Optional|OSType|ParamArray|Private|Property|Protected|PString|Ptr|Raise(?:Event)?|ReDim|Rem|RemoveHandler|Return|Select(?:or)?|Self|Set|Single|Shared|Short|Soft|Static|Step|String|Sub|Super|Text|Then|To|True|Try|Ubound|UInt(?:eger|8|16|32|64)?|Until|Using|Var(?:iant)?|Wend|While|WindowPtr|WString)\b/i, + 'keyword': /\b(?:AddHandler|App|Array|As(?:signs)?|Auto|By(?:Ref|Val)|Boolean|Break|Byte|Call|Case|Catch|CFStringRef|CGFloat|Class|Color|Const|Continue|CString|Currency|CurrentMethodName|Declare|Delegate|Dim|Do(?:uble|wnTo)?|Each|Else(?:If)?|End|Enumeration|Event|Exception|Exit|Extends|False|Finally|For|Function|Get|GetTypeInfo|Global|GOTO|If|Implements|In|Inherits|Int(?:erface|eger|8|16|32|64)?|Lib|Loop|Me|Module|Next|Nil|Object|Optional|OSType|ParamArray|Private|Property|Protected|PString|Ptr|Raise(?:Event)?|ReDim|RemoveHandler|Return|Select(?:or)?|Self|Set|Single|Shared|Short|Soft|Static|Step|String|Sub|Super|Text|Then|To|True|Try|Ubound|UInt(?:eger|8|16|32|64)?|Until|Using|Var(?:iant)?|Wend|While|WindowPtr|WString)\b/i, 'operator': /<[=>]?|>=?|[+\-*\/\\^=]|\b(?:AddressOf|And|Ctype|IsA?|Mod|New|Not|Or|Xor|WeakAddressOf)\b/i, 'punctuation': /[.,;:()]/ }; \ No newline at end of file diff --git a/components/prism-xojo.min.js b/components/prism-xojo.min.js index e2b92c08c7..0748cb6aed 100644 --- a/components/prism-xojo.min.js +++ b/components/prism-xojo.min.js @@ -1 +1 @@ -Prism.languages.xojo={comment:{pattern:/(?:'|\/\/|Rem\b).+/i,inside:{keyword:/^Rem/i}},string:{pattern:/"(?:""|[^"])*"/,greedy:!0},number:[/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:E[+-]?\d+)?/i,/&[bchou][a-z\d]+/i],symbol:/#(?:If|Else|ElseIf|Endif|Pragma)\b/i,keyword:/\b(?:AddHandler|App|Array|As(?:signs)?|Auto|By(?:Ref|Val)|Boolean|Break|Byte|Call|Case|Catch|CFStringRef|CGFloat|Class|Color|Const|Continue|CString|Currency|CurrentMethodName|Declare|Delegate|Dim|Do(?:uble|wnTo)?|Each|Else(?:If)?|End|Enumeration|Event|Exception|Exit|Extends|False|Finally|For|Function|Get|GetTypeInfo|Global|GOTO|If|Implements|In|Inherits|Int(?:erface|eger|8|16|32|64)?|Lib|Loop|Me|Module|Next|Nil|Object|Optional|OSType|ParamArray|Private|Property|Protected|PString|Ptr|Raise(?:Event)?|ReDim|Rem|RemoveHandler|Return|Select(?:or)?|Self|Set|Single|Shared|Short|Soft|Static|Step|String|Sub|Super|Text|Then|To|True|Try|Ubound|UInt(?:eger|8|16|32|64)?|Until|Using|Var(?:iant)?|Wend|While|WindowPtr|WString)\b/i,operator:/<[=>]?|>=?|[+\-*\/\\^=]|\b(?:AddressOf|And|Ctype|IsA?|Mod|New|Not|Or|Xor|WeakAddressOf)\b/i,punctuation:/[.,;:()]/}; \ No newline at end of file +Prism.languages.xojo={comment:{pattern:/(?:'|\/\/|Rem\b).+/i},string:{pattern:/"(?:""|[^"])*"/,greedy:!0},number:[/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:E[+-]?\d+)?/i,/&[bchou][a-z\d]+/i],symbol:/#(?:If|Else|ElseIf|Endif|Pragma)\b/i,keyword:/\b(?:AddHandler|App|Array|As(?:signs)?|Auto|By(?:Ref|Val)|Boolean|Break|Byte|Call|Case|Catch|CFStringRef|CGFloat|Class|Color|Const|Continue|CString|Currency|CurrentMethodName|Declare|Delegate|Dim|Do(?:uble|wnTo)?|Each|Else(?:If)?|End|Enumeration|Event|Exception|Exit|Extends|False|Finally|For|Function|Get|GetTypeInfo|Global|GOTO|If|Implements|In|Inherits|Int(?:erface|eger|8|16|32|64)?|Lib|Loop|Me|Module|Next|Nil|Object|Optional|OSType|ParamArray|Private|Property|Protected|PString|Ptr|Raise(?:Event)?|ReDim|RemoveHandler|Return|Select(?:or)?|Self|Set|Single|Shared|Short|Soft|Static|Step|String|Sub|Super|Text|Then|To|True|Try|Ubound|UInt(?:eger|8|16|32|64)?|Until|Using|Var(?:iant)?|Wend|While|WindowPtr|WString)\b/i,operator:/<[=>]?|>=?|[+\-*\/\\^=]|\b(?:AddressOf|And|Ctype|IsA?|Mod|New|Not|Or|Xor|WeakAddressOf)\b/i,punctuation:/[.,;:()]/}; \ No newline at end of file diff --git a/tests/languages/xojo/comment_feature.test b/tests/languages/xojo/comment_feature.test index c980136164..9e66f29171 100644 --- a/tests/languages/xojo/comment_feature.test +++ b/tests/languages/xojo/comment_feature.test @@ -5,9 +5,9 @@ Rem Foobar ---------------------------------------------------- [ - ["comment", ["' Foobar"]], - ["comment", ["// Foobar"]], - ["comment", [["keyword", "Rem"], " Foobar"]] + ["comment", "' Foobar"], + ["comment", "// Foobar"], + ["comment", "Rem Foobar"] ] ---------------------------------------------------- diff --git a/tests/languages/xojo/keyword_feature.test b/tests/languages/xojo/keyword_feature.test index f611dcfb3d..dd9e565d50 100644 --- a/tests/languages/xojo/keyword_feature.test +++ b/tests/languages/xojo/keyword_feature.test @@ -71,7 +71,6 @@ Ptr Raise RaiseEvent ReDim -Rem RemoveHandler Return Select @@ -183,7 +182,6 @@ WString ["keyword", "Raise"], ["keyword", "RaiseEvent"], ["keyword", "ReDim"], - ["keyword", "Rem"], ["keyword", "RemoveHandler"], ["keyword", "Return"], ["keyword", "Select"], From 1b63cd01c95a0e97761a6f0ceb1b5d69b0a53a20 Mon Sep 17 00:00:00 2001 From: Vyron Vasileiadis Date: Tue, 23 Mar 2021 14:04:45 +0200 Subject: [PATCH 0770/1100] =?UTF-8?q?=CE=91dded=20support=20for=20Q#=20(#2?= =?UTF-8?q?804)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components.js | 2 +- components.json | 6 + components/prism-qsharp.js | 132 ++++++++++++++++++ components/prism-qsharp.min.js | 1 + examples/prism-qsharp.html | 33 +++++ plugins/autoloader/prism-autoloader.js | 2 + plugins/autoloader/prism-autoloader.min.js | 2 +- plugins/show-language/prism-show-language.js | 2 + .../show-language/prism-show-language.min.js | 2 +- tests/languages/qsharp/comments_feature.test | 23 +++ .../qsharp/if_with_function_feature.test | 24 ++++ tests/languages/qsharp/namespace_feature.test | 30 ++++ tests/languages/qsharp/operators_feature.test | 32 +++++ .../variable_assignment_numbers_feature.test | 30 ++++ 14 files changed, 318 insertions(+), 3 deletions(-) create mode 100644 components/prism-qsharp.js create mode 100644 components/prism-qsharp.min.js create mode 100644 examples/prism-qsharp.html create mode 100644 tests/languages/qsharp/comments_feature.test create mode 100644 tests/languages/qsharp/if_with_function_feature.test create mode 100644 tests/languages/qsharp/namespace_feature.test create mode 100644 tests/languages/qsharp/operators_feature.test create mode 100644 tests/languages/qsharp/variable_assignment_numbers_feature.test diff --git a/components.js b/components.js index 37bde575f6..b89d7a2867 100644 --- a/components.js +++ b/components.js @@ -1,2 +1,2 @@ -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml","ssml","atom","rss"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","ssml":"SSML","atom":"Atom","rss":"RSS"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","optional":"regex","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"ABNF","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"agda":{"title":"Agda","owner":"xy-ren"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apex":{"title":"Apex","require":["clike","sql"],"owner":"RunDevelopment"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"dkern"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"birb":{"title":"Birb","require":"clike","owner":"Calamity210"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"BNF","alias":"rbnf","aliasTitles":{"rbnf":"RBNF"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"bsl":{"title":"BSL (1C:Enterprise)","alias":"oscript","aliasTitles":{"oscript":"OneScript"},"owner":"Diversus23"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cfscript":{"title":"CFScript","require":"clike","alias":"cfc","owner":"mjclemente"},"chaiscript":{"title":"ChaiScript","require":["clike","cpp"],"owner":"RunDevelopment"},"cil":{"title":"CIL","owner":"sbrl"},"clojure":{"title":"Clojure","owner":"troglotit"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"cobol":{"title":"COBOL","owner":"RunDevelopment"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"csv":{"title":"CSV","owner":"RunDevelopment"},"cypher":{"title":"Cypher","owner":"RunDevelopment"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dataweave":{"title":"DataWeave","owner":"machaval"},"dax":{"title":"DAX","owner":"peterbud"},"dhall":{"title":"Dhall","owner":"RunDevelopment"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"dot":{"title":"DOT (Graphviz)","alias":"gv","optional":"markup","owner":"RunDevelopment"},"ebnf":{"title":"EBNF","owner":"RunDevelopment"},"editorconfig":{"title":"EditorConfig","owner":"osipxd"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"false":{"title":"False","owner":"edukisto"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"c","owner":"Golmote"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","optional":"markdown","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"hlsl":{"title":"HLSL","require":"c","owner":"RunDevelopment"},"http":{"title":"HTTP","optional":["css","javascript","json","markup","uri"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"icu-message-format":{"title":"ICU Message Format","owner":"RunDevelopment"},"idris":{"title":"Idris","alias":"idr","owner":"KeenS","require":"haskell"},"ignore":{"title":".ignore","owner":"osipxd","alias":["gitignore","hgignore","npmignore"],"aliasTitles":{"gitignore":".gitignore","hgignore":".hgignore","npmignore":".npmignore"}},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jexl":{"title":"Jexl","owner":"czosel"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike","typescript"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","alias":"webmanifest","aliasTitles":{"webmanifest":"Web App Manifest"},"owner":"CupOfTea696"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"jsstacktrace":{"title":"JS stack trace","owner":"sbrl"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","alias":["kt","kts"],"aliasTitles":{"kts":"Kotlin Script"},"require":"clike","owner":"Golmote"},"kumir":{"title":"KuMir (КуМир)","alias":"kum","owner":"edukisto"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"log":{"title":"Log file","owner":"RunDevelopment"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","optional":"yaml","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"mongodb":{"title":"MongoDB","owner":"airs0urce","require":"javascript"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"naniscript":{"title":"Naninovel Script","owner":"Elringus","alias":"nani"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nevod":{"title":"Nevod","owner":"nezaboodka"},"nginx":{"title":"nginx","owner":"volado"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"openqasm":{"title":"OpenQasm","alias":"qasm","owner":"RunDevelopment"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"psl":{"title":"PATROL Scripting Language","owner":"bertysentry"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":"markup-templating","owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"promql":{"title":"PromQL","owner":"arendjr"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"purebasic":{"title":"PureBasic","require":"clike","alias":"pbfasm","owner":"HeX0R101"},"purescript":{"title":"PureScript","require":"haskell","alias":"purs","owner":"sriharshachilakapati"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"racket":{"title":"Racket","require":"scheme","alias":"rkt","owner":"RunDevelopment"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","owner":"RunDevelopment"},"rego":{"title":"Rego","owner":"JordanSh"},"renpy":{"title":"Ren'py","alias":"rpy","owner":"HyuchiaDiego"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","alias":["sh-session","shellsession"],"owner":"RunDevelopment"},"smali":{"title":"Smali","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sml":{"title":"SML","alias":"smlnj","aliasTitles":{"smlnj":"SML/NJ"},"owner":"RunDevelopment"},"solidity":{"title":"Solidity (Ethereum)","alias":"sol","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"squirrel":{"title":"Squirrel","require":"clike","owner":"RunDevelopment"},"stan":{"title":"Stan","owner":"RunDevelopment"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","vbnet"],"owner":"RunDevelopment"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"typoscript":{"title":"TypoScript","alias":"tsconfig","aliasTitles":{"tsconfig":"TSConfig"},"owner":"dkern"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"uri":{"title":"URI","alias":"url","aliasTitles":{"url":"URL"},"owner":"RunDevelopment"},"v":{"title":"V","require":"clike","owner":"taggon"},"vala":{"title":"Vala","require":"clike","optional":"regex","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":["vb","vba"],"aliasTitles":{"vba":"VBA"},"owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xml-doc":{"title":"XML doc (.net)","require":"markup","modify":["csharp","fsharp","vbnet"],"owner":"RunDevelopment"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"yang":{"title":"YANG","owner":"RunDevelopment"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml","ssml","atom","rss"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","ssml":"SSML","atom":"Atom","rss":"RSS"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","optional":"regex","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"ABNF","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"agda":{"title":"Agda","owner":"xy-ren"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apex":{"title":"Apex","require":["clike","sql"],"owner":"RunDevelopment"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"dkern"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"birb":{"title":"Birb","require":"clike","owner":"Calamity210"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"BNF","alias":"rbnf","aliasTitles":{"rbnf":"RBNF"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"bsl":{"title":"BSL (1C:Enterprise)","alias":"oscript","aliasTitles":{"oscript":"OneScript"},"owner":"Diversus23"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cfscript":{"title":"CFScript","require":"clike","alias":"cfc","owner":"mjclemente"},"chaiscript":{"title":"ChaiScript","require":["clike","cpp"],"owner":"RunDevelopment"},"cil":{"title":"CIL","owner":"sbrl"},"clojure":{"title":"Clojure","owner":"troglotit"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"cobol":{"title":"COBOL","owner":"RunDevelopment"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"csv":{"title":"CSV","owner":"RunDevelopment"},"cypher":{"title":"Cypher","owner":"RunDevelopment"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dataweave":{"title":"DataWeave","owner":"machaval"},"dax":{"title":"DAX","owner":"peterbud"},"dhall":{"title":"Dhall","owner":"RunDevelopment"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"dot":{"title":"DOT (Graphviz)","alias":"gv","optional":"markup","owner":"RunDevelopment"},"ebnf":{"title":"EBNF","owner":"RunDevelopment"},"editorconfig":{"title":"EditorConfig","owner":"osipxd"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"false":{"title":"False","owner":"edukisto"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"c","owner":"Golmote"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","optional":"markdown","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"hlsl":{"title":"HLSL","require":"c","owner":"RunDevelopment"},"http":{"title":"HTTP","optional":["css","javascript","json","markup","uri"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"icu-message-format":{"title":"ICU Message Format","owner":"RunDevelopment"},"idris":{"title":"Idris","alias":"idr","owner":"KeenS","require":"haskell"},"ignore":{"title":".ignore","owner":"osipxd","alias":["gitignore","hgignore","npmignore"],"aliasTitles":{"gitignore":".gitignore","hgignore":".hgignore","npmignore":".npmignore"}},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jexl":{"title":"Jexl","owner":"czosel"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike","typescript"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","alias":"webmanifest","aliasTitles":{"webmanifest":"Web App Manifest"},"owner":"CupOfTea696"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"jsstacktrace":{"title":"JS stack trace","owner":"sbrl"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","alias":["kt","kts"],"aliasTitles":{"kts":"Kotlin Script"},"require":"clike","owner":"Golmote"},"kumir":{"title":"KuMir (КуМир)","alias":"kum","owner":"edukisto"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"log":{"title":"Log file","owner":"RunDevelopment"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","optional":"yaml","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"mongodb":{"title":"MongoDB","owner":"airs0urce","require":"javascript"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"naniscript":{"title":"Naninovel Script","owner":"Elringus","alias":"nani"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nevod":{"title":"Nevod","owner":"nezaboodka"},"nginx":{"title":"nginx","owner":"volado"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"openqasm":{"title":"OpenQasm","alias":"qasm","owner":"RunDevelopment"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"psl":{"title":"PATROL Scripting Language","owner":"bertysentry"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":"markup-templating","owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"promql":{"title":"PromQL","owner":"arendjr"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"purebasic":{"title":"PureBasic","require":"clike","alias":"pbfasm","owner":"HeX0R101"},"purescript":{"title":"PureScript","require":"haskell","alias":"purs","owner":"sriharshachilakapati"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"qsharp":{"title":"Q#","require":"clike","alias":"qs","owner":"fedonman"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"racket":{"title":"Racket","require":"scheme","alias":"rkt","owner":"RunDevelopment"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","owner":"RunDevelopment"},"rego":{"title":"Rego","owner":"JordanSh"},"renpy":{"title":"Ren'py","alias":"rpy","owner":"HyuchiaDiego"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","alias":["sh-session","shellsession"],"owner":"RunDevelopment"},"smali":{"title":"Smali","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sml":{"title":"SML","alias":"smlnj","aliasTitles":{"smlnj":"SML/NJ"},"owner":"RunDevelopment"},"solidity":{"title":"Solidity (Ethereum)","alias":"sol","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"squirrel":{"title":"Squirrel","require":"clike","owner":"RunDevelopment"},"stan":{"title":"Stan","owner":"RunDevelopment"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","vbnet"],"owner":"RunDevelopment"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"typoscript":{"title":"TypoScript","alias":"tsconfig","aliasTitles":{"tsconfig":"TSConfig"},"owner":"dkern"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"uri":{"title":"URI","alias":"url","aliasTitles":{"url":"URL"},"owner":"RunDevelopment"},"v":{"title":"V","require":"clike","owner":"taggon"},"vala":{"title":"Vala","require":"clike","optional":"regex","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":["vb","vba"],"aliasTitles":{"vba":"VBA"},"owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xml-doc":{"title":"XML doc (.net)","require":"markup","modify":["csharp","fsharp","vbnet"],"owner":"RunDevelopment"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"yang":{"title":"YANG","owner":"RunDevelopment"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; if (typeof module !== 'undefined' && module.exports) { module.exports = components; } \ No newline at end of file diff --git a/components.json b/components.json index 8777a13da5..559ace8c6e 100644 --- a/components.json +++ b/components.json @@ -1009,6 +1009,12 @@ "alias": "py", "owner": "multipetros" }, + "qsharp": { + "title": "Q#", + "require": "clike", + "alias": "qs", + "owner": "fedonman" + }, "q": { "title": "Q (kdb+ database)", "owner": "Golmote" diff --git a/components/prism-qsharp.js b/components/prism-qsharp.js new file mode 100644 index 0000000000..25198db35f --- /dev/null +++ b/components/prism-qsharp.js @@ -0,0 +1,132 @@ +(function (Prism) { + + /** + * Replaces all placeholders "<>" of given pattern with the n-th replacement (zero based). + * + * Note: This is a simple text based replacement. Be careful when using backreferences! + * + * @param {string} pattern the given pattern. + * @param {string[]} replacements a list of replacement which can be inserted into the given pattern. + * @returns {string} the pattern with all placeholders replaced with their corresponding replacements. + * @example replace(/a<<0>>a/.source, [/b+/.source]) === /a(?:b+)a/.source + */ + function replace(pattern, replacements) { + return pattern.replace(/<<(\d+)>>/g, function (m, index) { + return '(?:' + replacements[+index] + ')'; + }); + } + /** + * @param {string} pattern + * @param {string[]} replacements + * @param {string} [flags] + * @returns {RegExp} + */ + function re(pattern, replacements, flags) { + return RegExp(replace(pattern, replacements), flags || ''); + } + + /** + * Creates a nested pattern where all occurrences of the string `<>` are replaced with the pattern itself. + * + * @param {string} pattern + * @param {number} depthLog2 + * @returns {string} + */ + function nested(pattern, depthLog2) { + for (var i = 0; i < depthLog2; i++) { + pattern = pattern.replace(/<>/g, function () { return '(?:' + pattern + ')'; }); + } + return pattern.replace(/<>/g, '[^\\s\\S]'); + } + + // https://docs.microsoft.com/en-us/azure/quantum/user-guide/language/typesystem/ + // https://github.com/microsoft/qsharp-language/tree/main/Specifications/Language/5_Grammar + var keywordKinds = { + // keywords which represent a return or variable type + type: 'Adj BigInt Bool Ctl Double false Int One Pauli PauliI PauliX PauliY PauliZ Qubit Range Result String true Unit Zero', + // all other keywords + other: 'Adjoint adjoint apply as auto body borrow borrowing Controlled controlled distribute elif else fail fixup for function if in internal intrinsic invert is let mutable namespace new newtype open operation repeat return self set until use using while within' + } + // keywords + function keywordsToPattern(words) { + return '\\b(?:' + words.trim().replace(/ /g, '|') + ')\\b'; + } + var keywords = RegExp(keywordsToPattern(keywordKinds.type + ' ' + keywordKinds.other)); + + // types + var identifier = /\b[A-Za-z_]\w*\b/.source; + var qualifiedName = replace(/<<0>>(?:\s*\.\s*<<0>>)*/.source, [identifier]); + + var typeInside = { + 'keyword': keywords, + 'punctuation': /[<>()?,.:[\]]/ + }; + + // strings + var regularString = /"(?:\\.|[^\\"])*"/.source; + + Prism.languages.qsharp = Prism.languages.extend('clike', { + 'comment': /\/\/.*/, + 'string': [ + { + pattern: re(/(^|[^$\\])<<0>>/.source, [regularString]), + lookbehind: true, + greedy: true + } + ], + 'class-name': [ + { + // open Microsoft.Quantum.Canon; + // open Microsoft.Quantum.Canon as CN; + pattern: re(/(\b(?:as|open)\s+)<<0>>(?=\s*(?:;|as\b))/.source, [qualifiedName]), + lookbehind: true, + inside: typeInside + }, + { + // namespace Quantum.App1; + pattern: re(/(\bnamespace\s+)<<0>>(?=\s*{)/.source, [qualifiedName]), + lookbehind: true, + inside: typeInside + }, + ], + 'keyword': keywords, + 'number': /(?:\b0(?:x[\da-f]+|b[01]+|o[0-7]+)|(?:\B\.\d+|\b\d+(?:\.\d*)?)(?:e[-+]?\d+)?)l?\b/i, + 'operator': /\band=|\bor=|\band\b|\bor\b|\bnot\b|<[-=]|[-=]>|>>>=?|<<<=?|\^\^\^=?|\|\|\|=?|&&&=?|w\/=?|~~~|[*\/+\-^=!%]=?/, + 'punctuation': /::|[{}[\];(),.:]/ + }); + + Prism.languages.insertBefore('qsharp', 'number', { + 'range': { + pattern: /\.\./, + alias: 'operator' + } + }); + + // single line + var interpolationExpr = nested(replace(/\{(?:[^"{}]|<<0>>|<>)*\}/.source, [regularString]), 2); + + Prism.languages.insertBefore('qsharp', 'string', { + 'interpolation-string': { + pattern: re(/\$"(?:\\.|<<0>>|[^\\"{])*"/.source, [interpolationExpr]), + greedy: true, + inside: { + 'interpolation': { + pattern: re(/((?:^|[^\\])(?:\\\\)*)<<0>>/.source, [interpolationExpr]), + lookbehind: true, + inside: { + 'punctuation': /^\{|\}$/, + 'expression': { + pattern: /[\s\S]+/, + alias: 'language-qsharp', + inside: Prism.languages.qsharp + } + } + }, + 'string': /[\s\S]+/ + } + } + }); + +}(Prism)); + +Prism.languages.qs = Prism.languages.qsharp; diff --git a/components/prism-qsharp.min.js b/components/prism-qsharp.min.js new file mode 100644 index 0000000000..e83d592712 --- /dev/null +++ b/components/prism-qsharp.min.js @@ -0,0 +1 @@ +!function(e){function a(e,r){return e.replace(/<<(\d+)>>/g,function(e,n){return"(?:"+r[+n]+")"})}function n(e,n,r){return RegExp(a(e,n),r||"")}var r=RegExp("\\b(?:"+("Adj BigInt Bool Ctl Double false Int One Pauli PauliI PauliX PauliY PauliZ Qubit Range Result String true Unit Zero"+" "+"Adjoint adjoint apply as auto body borrow borrowing Controlled controlled distribute elif else fail fixup for function if in internal intrinsic invert is let mutable namespace new newtype open operation repeat return self set until use using while within").trim().replace(/ /g,"|")+")\\b"),t=a("<<0>>(?:\\s*\\.\\s*<<0>>)*",["\\b[A-Za-z_]\\w*\\b"]),i={keyword:r,punctuation:/[<>()?,.:[\]]/},s='"(?:\\\\.|[^\\\\"])*"';e.languages.qsharp=e.languages.extend("clike",{comment:/\/\/.*/,string:[{pattern:n("(^|[^$\\\\])<<0>>",[s]),lookbehind:!0,greedy:!0}],"class-name":[{pattern:n("(\\b(?:as|open)\\s+)<<0>>(?=\\s*(?:;|as\\b))",[t]),lookbehind:!0,inside:i},{pattern:n("(\\bnamespace\\s+)<<0>>(?=\\s*{)",[t]),lookbehind:!0,inside:i}],keyword:r,number:/(?:\b0(?:x[\da-f]+|b[01]+|o[0-7]+)|(?:\B\.\d+|\b\d+(?:\.\d*)?)(?:e[-+]?\d+)?)l?\b/i,operator:/\band=|\bor=|\band\b|\bor\b|\bnot\b|<[-=]|[-=]>|>>>=?|<<<=?|\^\^\^=?|\|\|\|=?|&&&=?|w\/=?|~~~|[*\/+\-^=!%]=?/,punctuation:/::|[{}[\];(),.:]/}),e.languages.insertBefore("qsharp","number",{range:{pattern:/\.\./,alias:"operator"}});var o=function(e,n){for(var r=0;r>/g,function(){return"(?:"+e+")"});return e.replace(/<>/g,"[^\\s\\S]")}(a('\\{(?:[^"{}]|<<0>>|<>)*\\}',[s]),2);e.languages.insertBefore("qsharp","string",{"interpolation-string":{pattern:n('\\$"(?:\\\\.|<<0>>|[^\\\\"{])*"',[o]),greedy:!0,inside:{interpolation:{pattern:n("((?:^|[^\\\\])(?:\\\\\\\\)*)<<0>>",[o]),lookbehind:!0,inside:{punctuation:/^\{|\}$/,expression:{pattern:/[\s\S]+/,alias:"language-qsharp",inside:e.languages.qsharp}}},string:/[\s\S]+/}}})}(Prism),Prism.languages.qs=Prism.languages.qsharp; \ No newline at end of file diff --git a/examples/prism-qsharp.html b/examples/prism-qsharp.html new file mode 100644 index 0000000000..eec88a8966 --- /dev/null +++ b/examples/prism-qsharp.html @@ -0,0 +1,33 @@ +

          Full example

          +
          namespace Bell {
          +  open Microsoft.Quantum.Canon;
          +  open Microsoft.Quantum.Intrinsic;
          +
          +  operation SetQubitState(desired : Result, target : Qubit) : Unit {
          +      if desired != M(target) {
          +          X(target);
          +      }
          +  }
          +
          +  @EntryPoint()
          +  operation TestBellState(count : Int, initial : Result) : (Int, Int) {
          +
          +      mutable numOnes = 0;
          +      use qubit = Qubit();
          +      for test in 1..count {
          +          SetQubitState(initial, qubit);
          +          let res = M(qubit);        
          +
          +          // Count the number of ones we saw:
          +          if res == One {
          +                set numOnes += 1;
          +          }
          +      }
          +
          +      SetQubitState(Zero, qubit); 
          +
          +  // Return number of times we saw a |0> and number of times we saw a |1>
          +  Message("Test results (# of 0s, # of 1s): ");
          +  return (count - numOnes, numOnes);
          +  }
          +}
          diff --git a/plugins/autoloader/prism-autoloader.js b/plugins/autoloader/prism-autoloader.js index a95ee71a63..6a54c92ab2 100644 --- a/plugins/autoloader/prism-autoloader.js +++ b/plugins/autoloader/prism-autoloader.js @@ -108,6 +108,7 @@ ], "purebasic": "clike", "purescript": "haskell", + "qsharp": "clike", "qml": "javascript", "qore": "clike", "racket": "scheme", @@ -215,6 +216,7 @@ "pbfasm": "purebasic", "purs": "purescript", "py": "python", + "qs": "qsharp", "rkt": "racket", "rpy": "renpy", "robot": "robotframework", diff --git a/plugins/autoloader/prism-autoloader.min.js b/plugins/autoloader/prism-autoloader.min.js index 135e0b87d1..ed5517dec9 100644 --- a/plugins/autoloader/prism-autoloader.min.js +++ b/plugins/autoloader/prism-autoloader.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof Prism&&"undefined"!=typeof document){var l={javascript:"clike",actionscript:"javascript",apex:["clike","sql"],arduino:"cpp",aspnet:["markup","csharp"],birb:"clike",bison:"c",c:"clike",csharp:"clike",cpp:"c",cfscript:"clike",chaiscript:["clike","cpp"],coffeescript:"javascript",crystal:"ruby","css-extras":"css",d:"clike",dart:"clike",django:"markup-templating",ejs:["javascript","markup-templating"],etlua:["lua","markup-templating"],erb:["ruby","markup-templating"],fsharp:"clike","firestore-security-rules":"clike",flow:"javascript",ftl:"markup-templating",gml:"clike",glsl:"c",go:"clike",groovy:"clike",haml:"ruby",handlebars:"markup-templating",haxe:"clike",hlsl:"c",idris:"haskell",java:"clike",javadoc:["markup","java","javadoclike"],jolie:"clike",jsdoc:["javascript","javadoclike","typescript"],"js-extras":"javascript",json5:"json",jsonp:"json","js-templates":"javascript",kotlin:"clike",latte:["clike","markup-templating","php"],less:"css",lilypond:"scheme",markdown:"markup","markup-templating":"markup",mongodb:"javascript",n4js:"javascript",objectivec:"c",opencl:"c",parser:"markup",php:"markup-templating",phpdoc:["php","javadoclike"],"php-extras":"php",plsql:"sql",processing:"clike",protobuf:"clike",pug:["markup","javascript"],purebasic:"clike",purescript:"haskell",qml:"javascript",qore:"clike",racket:"scheme",jsx:["markup","javascript"],tsx:["jsx","typescript"],reason:"clike",ruby:"clike",sass:"css",scss:"css",scala:"java","shell-session":"bash",smarty:"markup-templating",solidity:"clike",soy:"markup-templating",sparql:"turtle",sqf:"clike",squirrel:"clike",swift:"clike","t4-cs":["t4-templating","csharp"],"t4-vb":["t4-templating","vbnet"],tap:"yaml",tt2:["clike","markup-templating"],textile:"markup",twig:"markup",typescript:"javascript",v:"clike",vala:"clike",vbnet:"basic",velocity:"markup",wiki:"markup",xeora:"markup","xml-doc":"markup",xquery:"markup"},n={html:"markup",xml:"markup",svg:"markup",mathml:"markup",ssml:"markup",atom:"markup",rss:"markup",js:"javascript",g4:"antlr4",adoc:"asciidoc",shell:"bash",shortcode:"bbcode",rbnf:"bnf",oscript:"bsl",cs:"csharp",dotnet:"csharp",cfc:"cfscript",coffee:"coffeescript",conc:"concurnas",jinja2:"django","dns-zone":"dns-zone-file",dockerfile:"docker",gv:"dot",eta:"ejs",xlsx:"excel-formula",xls:"excel-formula",gamemakerlanguage:"gml",hs:"haskell",idr:"idris",gitignore:"ignore",hgignore:"ignore",npmignore:"ignore",webmanifest:"json",kt:"kotlin",kts:"kotlin",kum:"kumir",tex:"latex",context:"latex",ly:"lilypond",emacs:"lisp",elisp:"lisp","emacs-lisp":"lisp",md:"markdown",moon:"moonscript",n4jsd:"n4js",nani:"naniscript",objc:"objectivec",qasm:"openqasm",objectpascal:"pascal",px:"pcaxis",pcode:"peoplecode",pq:"powerquery",mscript:"powerquery",pbfasm:"purebasic",purs:"purescript",py:"python",rkt:"racket",rpy:"renpy",robot:"robotframework",rb:"ruby","sh-session":"shell-session",shellsession:"shell-session",smlnj:"sml",sol:"solidity",sln:"solution-file",rq:"sparql",t4:"t4-cs",trig:"turtle",ts:"typescript",tsconfig:"typoscript",uscript:"unrealscript",uc:"unrealscript",url:"uri",vb:"visual-basic",vba:"visual-basic",xeoracube:"xeora",yml:"yaml"},p={},e="components/",a=Prism.util.currentScript();if(a){var r=/\bplugins\/autoloader\/prism-autoloader\.(?:min\.)?js(?:\?[^\r\n/]*)?$/i,s=/(^|\/)[\w-]+\.(?:min\.)?js(?:\?[^\r\n/]*)?$/i,i=a.getAttribute("data-autoloader-path");if(null!=i)e=i.trim().replace(/\/?$/,"/");else{var t=a.src;r.test(t)?e=t.replace(r,"components/"):s.test(t)&&(e=t.replace(s,"$1components/"))}}var o=Prism.plugins.autoloader={languages_path:e,use_minified:!0,loadLanguages:m};Prism.hooks.add("complete",function(e){var a=e.element,r=e.language;if(a&&r&&"none"!==r){var s=function(e){var a=(e.getAttribute("data-dependencies")||"").trim();if(!a){var r=e.parentElement;r&&"pre"===r.tagName.toLowerCase()&&(a=(r.getAttribute("data-dependencies")||"").trim())}return a?a.split(/\s*,\s*/g):[]}(a);/^diff-./i.test(r)?(s.push("diff"),s.push(r.substr("diff-".length))):s.push(r),s.every(u)||m(s,function(){Prism.highlightElement(a)})}})}function u(e){if(0<=e.indexOf("!"))return!1;if((e=n[e]||e)in Prism.languages)return!0;var a=p[e];return a&&!a.error&&!1===a.loading}function m(e,a,r){"string"==typeof e&&(e=[e]);var s=e.length,i=0,t=!1;function c(){t||++i===s&&a&&a(e)}0!==s?e.forEach(function(e){!function(a,r,s){var i=0<=a.indexOf("!");function e(){var e=p[a];e||(e=p[a]={callbacks:[]}),e.callbacks.push({success:r,error:s}),!i&&u(a)?k(a,"success"):!i&&e.error?k(a,"error"):!i&&e.loading||(e.loading=!0,e.error=!1,function(e,a,r){var s=document.createElement("script");s.src=e,s.async=!0,s.onload=function(){document.body.removeChild(s),a&&a()},s.onerror=function(){document.body.removeChild(s),r&&r()},document.body.appendChild(s)}(function(e){return o.languages_path+"prism-"+e+(o.use_minified?".min":"")+".js"}(a),function(){e.loading=!1,k(a,"success")},function(){e.loading=!1,e.error=!0,k(a,"error")}))}a=a.replace("!",""),a=n[a]||a;var t=l[a];t&&t.length?m(t,e,s):e()}(e,c,function(){t||(t=!0,r&&r(e))})}):a&&setTimeout(a,0)}function k(e,a){if(p[e]){for(var r=p[e].callbacks,s=0,i=r.length;s state. + +use qubit = Qubit(); + +---------------------------------------------------- + +[ + ["comment", "// The following using block creates a fresh qubit and initializes it"], + ["comment", "// in the |0> state."], + ["keyword", "use"], + " qubit ", + ["operator", "="], + ["keyword", "Qubit"], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", ";"] +] + + +---------------------------------------------------- + +Checks for comments diff --git a/tests/languages/qsharp/if_with_function_feature.test b/tests/languages/qsharp/if_with_function_feature.test new file mode 100644 index 0000000000..b14475452e --- /dev/null +++ b/tests/languages/qsharp/if_with_function_feature.test @@ -0,0 +1,24 @@ +if result == One { + X(qubit); +} + +---------------------------------------------------- + +[ + ["keyword", "if"], + " result ", + ["operator", "=="], + ["keyword", "One"], + ["punctuation", "{"], + ["function", "X"], + ["punctuation", "("], + "qubit", + ["punctuation", ")"], + ["punctuation", ";"], + ["punctuation", "}"] +] + + +---------------------------------------------------- + +Checks for if, equality and function diff --git a/tests/languages/qsharp/namespace_feature.test b/tests/languages/qsharp/namespace_feature.test new file mode 100644 index 0000000000..eb66389776 --- /dev/null +++ b/tests/languages/qsharp/namespace_feature.test @@ -0,0 +1,30 @@ +namespace Quantum.App1 { + open Microsoft.Quantum.Canon; +} + +---------------------------------------------------- + +[ + ["keyword", "namespace"], + ["class-name", [ + "Quantum", + ["punctuation", "."], + "App1" + ]], + ["punctuation", "{"], + ["keyword", "open"], + ["class-name", [ + "Microsoft", + ["punctuation", "."], + "Quantum", + ["punctuation", "."], + "Canon" + ]], + ["punctuation", ";"], + ["punctuation", "}"] +] + + +---------------------------------------------------- + +Checks for namespace declaration and import diff --git a/tests/languages/qsharp/operators_feature.test b/tests/languages/qsharp/operators_feature.test new file mode 100644 index 0000000000..c73affac14 --- /dev/null +++ b/tests/languages/qsharp/operators_feature.test @@ -0,0 +1,32 @@ +and or not +and= or= +<- <= -> => +* / + - = ^ ! % +*= /= += -= == ^= != %= +>>> >>>= <<< <<<= +^^^ ^^^= +||| |||= +&&& &&&= +w/ w/= +~~~ + +---------------------------------------------------- + +[ + ["operator", "and"], ["operator", "or"], ["operator", "not"], + ["operator", "and="], ["operator", "or="], + ["operator", "<-"], ["operator", "<="], ["operator", "->"], ["operator", "=>"], + ["operator", "*"], ["operator", "/"], ["operator", "+"], ["operator", "-"], ["operator", "="], ["operator", "^"], ["operator", "!"], ["operator", "%"], + ["operator", "*="], ["operator", "/="], ["operator", "+="], ["operator", "-="], ["operator", "=="], ["operator", "^="], ["operator", "!="], ["operator", "%="], + ["operator", ">>>"], ["operator", ">>>="], ["operator", "<<<"], ["operator", "<<<="], + ["operator", "^^^"], ["operator", "^^^="], + ["operator", "|||"], ["operator", "|||="], + ["operator", "&&&"], ["operator", "&&&="], + ["operator", "w/"], ["operator", "w/="], + ["operator", "~~~"] +] + + +---------------------------------------------------- + +Checks for opertors diff --git a/tests/languages/qsharp/variable_assignment_numbers_feature.test b/tests/languages/qsharp/variable_assignment_numbers_feature.test new file mode 100644 index 0000000000..5308b9a87a --- /dev/null +++ b/tests/languages/qsharp/variable_assignment_numbers_feature.test @@ -0,0 +1,30 @@ +let var1 = 3; +mutable var2 = 5L; +set var2 = var2 + 1.5; + +---------------------------------------------------- + +[ + ["keyword", "let"], + " var1 ", + ["operator", "="], + ["number", "3"], + ["punctuation", ";"], + ["keyword", "mutable"], + " var2 ", + ["operator", "="], + ["number", "5L"], + ["punctuation", ";"], + ["keyword", "set"], + " var2 ", + ["operator", "="], + " var2 ", + ["operator", "+"], + ["number", "1.5"], + ["punctuation", ";"] +] + + +---------------------------------------------------- + +Checks for variable assignment and numbers From 53d34b2211ac213c3d19699693eb2f9537764dec Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Tue, 23 Mar 2021 15:55:40 +0100 Subject: [PATCH 0771/1100] File Highlight: Fixed Prism check (#2827) --- plugins/file-highlight/prism-file-highlight.js | 2 -- plugins/file-highlight/prism-file-highlight.min.js | 2 +- prism.js | 2 -- 3 files changed, 1 insertion(+), 5 deletions(-) diff --git a/plugins/file-highlight/prism-file-highlight.js b/plugins/file-highlight/prism-file-highlight.js index 1b7eb9d23e..79893a83b9 100644 --- a/plugins/file-highlight/prism-file-highlight.js +++ b/plugins/file-highlight/prism-file-highlight.js @@ -9,8 +9,6 @@ Element.prototype.matches = Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector; } - var Prism = window.Prism; - var LOADING_MESSAGE = 'Loading…'; var FAILURE_MESSAGE = function (status, message) { return '✖ Error ' + status + ' while fetching file: ' + message; diff --git a/plugins/file-highlight/prism-file-highlight.min.js b/plugins/file-highlight/prism-file-highlight.min.js index ebbfff3a2c..24de20476b 100644 --- a/plugins/file-highlight/prism-file-highlight.min.js +++ b/plugins/file-highlight/prism-file-highlight.min.js @@ -1 +1 @@ -!function(){if(void 0!==r&&"undefined"!=typeof document){Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var r=window.Prism,h={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},g="data-src-status",c="loading",u="loaded",p="pre[data-src]:not(["+g+'="'+u+'"]):not(['+g+'="'+c+'"])',i=/\blang(?:uage)?-([\w-]+)\b/i;r.hooks.add("before-highlightall",function(e){e.selector+=", "+p}),r.hooks.add("before-sanity-check",function(e){var t=e.element;if(t.matches(p)){e.code="",t.setAttribute(g,c);var n=t.appendChild(document.createElement("CODE"));n.textContent="Loading…";var i=t.getAttribute("data-src"),a=e.language;if("none"===a){var o=(/\.(\w+)$/.exec(i)||[,"none"])[1];a=h[o]||o}d(n,a),d(t,a);var s=r.plugins.autoloader;s&&s.loadLanguages(a);var l=new XMLHttpRequest;l.open("GET",i,!0),l.onreadystatechange=function(){4==l.readyState&&(l.status<400&&l.responseText?(t.setAttribute(g,u),n.textContent=l.responseText,r.highlightElement(n)):(t.setAttribute(g,"failed"),400<=l.status?n.textContent=function(e,t){return"✖ Error "+e+" while fetching file: "+t}(l.status,l.statusText):n.textContent="✖ Error: File does not exist or is empty"))},l.send(null)}});var e=!(r.plugins.fileHighlight={highlight:function(e){for(var t,n=(e||document).querySelectorAll(p),i=0;t=n[i++];)r.highlightElement(t)}});r.fileHighlight=function(){e||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),e=!0),r.plugins.fileHighlight.highlight.apply(this,arguments)}}function d(e,t){var n=e.className;n=n.replace(i," ")+" language-"+t,e.className=n.replace(/\s+/g," ").trim()}}(); \ No newline at end of file +!function(){if("undefined"!=typeof Prism&&"undefined"!=typeof document){Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var o={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},h="data-src-status",g="loading",c="loaded",u="pre[data-src]:not(["+h+'="'+c+'"]):not(['+h+'="'+g+'"])',n=/\blang(?:uage)?-([\w-]+)\b/i;Prism.hooks.add("before-highlightall",function(e){e.selector+=", "+u}),Prism.hooks.add("before-sanity-check",function(e){var t=e.element;if(t.matches(u)){e.code="",t.setAttribute(h,g);var i=t.appendChild(document.createElement("CODE"));i.textContent="Loading…";var n=t.getAttribute("data-src"),s=e.language;if("none"===s){var a=(/\.(\w+)$/.exec(n)||[,"none"])[1];s=o[a]||a}p(i,s),p(t,s);var r=Prism.plugins.autoloader;r&&r.loadLanguages(s);var l=new XMLHttpRequest;l.open("GET",n,!0),l.onreadystatechange=function(){4==l.readyState&&(l.status<400&&l.responseText?(t.setAttribute(h,c),i.textContent=l.responseText,Prism.highlightElement(i)):(t.setAttribute(h,"failed"),400<=l.status?i.textContent=function(e,t){return"✖ Error "+e+" while fetching file: "+t}(l.status,l.statusText):i.textContent="✖ Error: File does not exist or is empty"))},l.send(null)}});var e=!(Prism.plugins.fileHighlight={highlight:function(e){for(var t,i=(e||document).querySelectorAll(u),n=0;t=i[n++];)Prism.highlightElement(t)}});Prism.fileHighlight=function(){e||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),e=!0),Prism.plugins.fileHighlight.highlight.apply(this,arguments)}}function p(e,t){var i=e.className;i=i.replace(n," ")+" language-"+t,e.className=i.replace(/\s+/g," ").trim()}}(); \ No newline at end of file diff --git a/prism.js b/prism.js index c869ff6adc..95455b4963 100644 --- a/prism.js +++ b/prism.js @@ -1632,8 +1632,6 @@ Prism.languages.js = Prism.languages.javascript; Element.prototype.matches = Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector; } - var Prism = window.Prism; - var LOADING_MESSAGE = 'Loading…'; var FAILURE_MESSAGE = function (status, message) { return '✖ Error ' + status + ' while fetching file: ' + message; From 41e25d3ca36af32ccf11b06a01dc2d0e4b74cfa5 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Thu, 25 Mar 2021 12:42:58 +0100 Subject: [PATCH 0772/1100] Added support for Coq (#2803) --- components.js | 2 +- components.json | 4 + components/prism-coq.js | 54 ++ components/prism-coq.min.js | 1 + examples/prism-coq.html | 45 ++ tests/languages/coq/attribute_feature.test | 73 +++ tests/languages/coq/comment_feature.test | 17 + tests/languages/coq/keyword_feature.test | 547 +++++++++++++++++++ tests/languages/coq/number_feature.test | 33 ++ tests/languages/coq/operator_feature.test | 83 +++ tests/languages/coq/punctuation_feature.test | 35 ++ tests/languages/coq/string_feature.test | 9 + 12 files changed, 902 insertions(+), 1 deletion(-) create mode 100644 components/prism-coq.js create mode 100644 components/prism-coq.min.js create mode 100644 examples/prism-coq.html create mode 100644 tests/languages/coq/attribute_feature.test create mode 100644 tests/languages/coq/comment_feature.test create mode 100644 tests/languages/coq/keyword_feature.test create mode 100644 tests/languages/coq/number_feature.test create mode 100644 tests/languages/coq/operator_feature.test create mode 100644 tests/languages/coq/punctuation_feature.test create mode 100644 tests/languages/coq/string_feature.test diff --git a/components.js b/components.js index b89d7a2867..7b7e6852c1 100644 --- a/components.js +++ b/components.js @@ -1,2 +1,2 @@ -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml","ssml","atom","rss"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","ssml":"SSML","atom":"Atom","rss":"RSS"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","optional":"regex","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"ABNF","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"agda":{"title":"Agda","owner":"xy-ren"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apex":{"title":"Apex","require":["clike","sql"],"owner":"RunDevelopment"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"dkern"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"birb":{"title":"Birb","require":"clike","owner":"Calamity210"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"BNF","alias":"rbnf","aliasTitles":{"rbnf":"RBNF"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"bsl":{"title":"BSL (1C:Enterprise)","alias":"oscript","aliasTitles":{"oscript":"OneScript"},"owner":"Diversus23"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cfscript":{"title":"CFScript","require":"clike","alias":"cfc","owner":"mjclemente"},"chaiscript":{"title":"ChaiScript","require":["clike","cpp"],"owner":"RunDevelopment"},"cil":{"title":"CIL","owner":"sbrl"},"clojure":{"title":"Clojure","owner":"troglotit"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"cobol":{"title":"COBOL","owner":"RunDevelopment"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"csv":{"title":"CSV","owner":"RunDevelopment"},"cypher":{"title":"Cypher","owner":"RunDevelopment"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dataweave":{"title":"DataWeave","owner":"machaval"},"dax":{"title":"DAX","owner":"peterbud"},"dhall":{"title":"Dhall","owner":"RunDevelopment"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"dot":{"title":"DOT (Graphviz)","alias":"gv","optional":"markup","owner":"RunDevelopment"},"ebnf":{"title":"EBNF","owner":"RunDevelopment"},"editorconfig":{"title":"EditorConfig","owner":"osipxd"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"false":{"title":"False","owner":"edukisto"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"c","owner":"Golmote"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","optional":"markdown","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"hlsl":{"title":"HLSL","require":"c","owner":"RunDevelopment"},"http":{"title":"HTTP","optional":["css","javascript","json","markup","uri"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"icu-message-format":{"title":"ICU Message Format","owner":"RunDevelopment"},"idris":{"title":"Idris","alias":"idr","owner":"KeenS","require":"haskell"},"ignore":{"title":".ignore","owner":"osipxd","alias":["gitignore","hgignore","npmignore"],"aliasTitles":{"gitignore":".gitignore","hgignore":".hgignore","npmignore":".npmignore"}},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jexl":{"title":"Jexl","owner":"czosel"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike","typescript"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","alias":"webmanifest","aliasTitles":{"webmanifest":"Web App Manifest"},"owner":"CupOfTea696"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"jsstacktrace":{"title":"JS stack trace","owner":"sbrl"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","alias":["kt","kts"],"aliasTitles":{"kts":"Kotlin Script"},"require":"clike","owner":"Golmote"},"kumir":{"title":"KuMir (КуМир)","alias":"kum","owner":"edukisto"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"log":{"title":"Log file","owner":"RunDevelopment"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","optional":"yaml","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"mongodb":{"title":"MongoDB","owner":"airs0urce","require":"javascript"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"naniscript":{"title":"Naninovel Script","owner":"Elringus","alias":"nani"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nevod":{"title":"Nevod","owner":"nezaboodka"},"nginx":{"title":"nginx","owner":"volado"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"openqasm":{"title":"OpenQasm","alias":"qasm","owner":"RunDevelopment"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"psl":{"title":"PATROL Scripting Language","owner":"bertysentry"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":"markup-templating","owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"promql":{"title":"PromQL","owner":"arendjr"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"purebasic":{"title":"PureBasic","require":"clike","alias":"pbfasm","owner":"HeX0R101"},"purescript":{"title":"PureScript","require":"haskell","alias":"purs","owner":"sriharshachilakapati"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"qsharp":{"title":"Q#","require":"clike","alias":"qs","owner":"fedonman"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"racket":{"title":"Racket","require":"scheme","alias":"rkt","owner":"RunDevelopment"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","owner":"RunDevelopment"},"rego":{"title":"Rego","owner":"JordanSh"},"renpy":{"title":"Ren'py","alias":"rpy","owner":"HyuchiaDiego"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","alias":["sh-session","shellsession"],"owner":"RunDevelopment"},"smali":{"title":"Smali","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sml":{"title":"SML","alias":"smlnj","aliasTitles":{"smlnj":"SML/NJ"},"owner":"RunDevelopment"},"solidity":{"title":"Solidity (Ethereum)","alias":"sol","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"squirrel":{"title":"Squirrel","require":"clike","owner":"RunDevelopment"},"stan":{"title":"Stan","owner":"RunDevelopment"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","vbnet"],"owner":"RunDevelopment"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"typoscript":{"title":"TypoScript","alias":"tsconfig","aliasTitles":{"tsconfig":"TSConfig"},"owner":"dkern"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"uri":{"title":"URI","alias":"url","aliasTitles":{"url":"URL"},"owner":"RunDevelopment"},"v":{"title":"V","require":"clike","owner":"taggon"},"vala":{"title":"Vala","require":"clike","optional":"regex","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":["vb","vba"],"aliasTitles":{"vba":"VBA"},"owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xml-doc":{"title":"XML doc (.net)","require":"markup","modify":["csharp","fsharp","vbnet"],"owner":"RunDevelopment"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"yang":{"title":"YANG","owner":"RunDevelopment"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml","ssml","atom","rss"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","ssml":"SSML","atom":"Atom","rss":"RSS"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","optional":"regex","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"ABNF","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"agda":{"title":"Agda","owner":"xy-ren"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apex":{"title":"Apex","require":["clike","sql"],"owner":"RunDevelopment"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"dkern"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"birb":{"title":"Birb","require":"clike","owner":"Calamity210"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"BNF","alias":"rbnf","aliasTitles":{"rbnf":"RBNF"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"bsl":{"title":"BSL (1C:Enterprise)","alias":"oscript","aliasTitles":{"oscript":"OneScript"},"owner":"Diversus23"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cfscript":{"title":"CFScript","require":"clike","alias":"cfc","owner":"mjclemente"},"chaiscript":{"title":"ChaiScript","require":["clike","cpp"],"owner":"RunDevelopment"},"cil":{"title":"CIL","owner":"sbrl"},"clojure":{"title":"Clojure","owner":"troglotit"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"cobol":{"title":"COBOL","owner":"RunDevelopment"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"coq":{"title":"Coq","owner":"RunDevelopment"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"csv":{"title":"CSV","owner":"RunDevelopment"},"cypher":{"title":"Cypher","owner":"RunDevelopment"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dataweave":{"title":"DataWeave","owner":"machaval"},"dax":{"title":"DAX","owner":"peterbud"},"dhall":{"title":"Dhall","owner":"RunDevelopment"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"dot":{"title":"DOT (Graphviz)","alias":"gv","optional":"markup","owner":"RunDevelopment"},"ebnf":{"title":"EBNF","owner":"RunDevelopment"},"editorconfig":{"title":"EditorConfig","owner":"osipxd"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"false":{"title":"False","owner":"edukisto"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"c","owner":"Golmote"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","optional":"markdown","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"hlsl":{"title":"HLSL","require":"c","owner":"RunDevelopment"},"http":{"title":"HTTP","optional":["css","javascript","json","markup","uri"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"icu-message-format":{"title":"ICU Message Format","owner":"RunDevelopment"},"idris":{"title":"Idris","alias":"idr","owner":"KeenS","require":"haskell"},"ignore":{"title":".ignore","owner":"osipxd","alias":["gitignore","hgignore","npmignore"],"aliasTitles":{"gitignore":".gitignore","hgignore":".hgignore","npmignore":".npmignore"}},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jexl":{"title":"Jexl","owner":"czosel"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike","typescript"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","alias":"webmanifest","aliasTitles":{"webmanifest":"Web App Manifest"},"owner":"CupOfTea696"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"jsstacktrace":{"title":"JS stack trace","owner":"sbrl"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","alias":["kt","kts"],"aliasTitles":{"kts":"Kotlin Script"},"require":"clike","owner":"Golmote"},"kumir":{"title":"KuMir (КуМир)","alias":"kum","owner":"edukisto"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"log":{"title":"Log file","owner":"RunDevelopment"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","optional":"yaml","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"mongodb":{"title":"MongoDB","owner":"airs0urce","require":"javascript"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"naniscript":{"title":"Naninovel Script","owner":"Elringus","alias":"nani"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nevod":{"title":"Nevod","owner":"nezaboodka"},"nginx":{"title":"nginx","owner":"volado"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"openqasm":{"title":"OpenQasm","alias":"qasm","owner":"RunDevelopment"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"psl":{"title":"PATROL Scripting Language","owner":"bertysentry"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":"markup-templating","owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"promql":{"title":"PromQL","owner":"arendjr"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"purebasic":{"title":"PureBasic","require":"clike","alias":"pbfasm","owner":"HeX0R101"},"purescript":{"title":"PureScript","require":"haskell","alias":"purs","owner":"sriharshachilakapati"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"qsharp":{"title":"Q#","require":"clike","alias":"qs","owner":"fedonman"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"racket":{"title":"Racket","require":"scheme","alias":"rkt","owner":"RunDevelopment"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","owner":"RunDevelopment"},"rego":{"title":"Rego","owner":"JordanSh"},"renpy":{"title":"Ren'py","alias":"rpy","owner":"HyuchiaDiego"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","alias":["sh-session","shellsession"],"owner":"RunDevelopment"},"smali":{"title":"Smali","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sml":{"title":"SML","alias":"smlnj","aliasTitles":{"smlnj":"SML/NJ"},"owner":"RunDevelopment"},"solidity":{"title":"Solidity (Ethereum)","alias":"sol","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"squirrel":{"title":"Squirrel","require":"clike","owner":"RunDevelopment"},"stan":{"title":"Stan","owner":"RunDevelopment"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","vbnet"],"owner":"RunDevelopment"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"typoscript":{"title":"TypoScript","alias":"tsconfig","aliasTitles":{"tsconfig":"TSConfig"},"owner":"dkern"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"uri":{"title":"URI","alias":"url","aliasTitles":{"url":"URL"},"owner":"RunDevelopment"},"v":{"title":"V","require":"clike","owner":"taggon"},"vala":{"title":"Vala","require":"clike","optional":"regex","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":["vb","vba"],"aliasTitles":{"vba":"VBA"},"owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xml-doc":{"title":"XML doc (.net)","require":"markup","modify":["csharp","fsharp","vbnet"],"owner":"RunDevelopment"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"yang":{"title":"YANG","owner":"RunDevelopment"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; if (typeof module !== 'undefined' && module.exports) { module.exports = components; } \ No newline at end of file diff --git a/components.json b/components.json index 559ace8c6e..2e2f6d4174 100644 --- a/components.json +++ b/components.json @@ -280,6 +280,10 @@ "title": "Content-Security-Policy", "owner": "ScottHelme" }, + "coq": { + "title": "Coq", + "owner": "RunDevelopment" + }, "crystal": { "title": "Crystal", "require": "ruby", diff --git a/components/prism-coq.js b/components/prism-coq.js new file mode 100644 index 0000000000..55a16b46e8 --- /dev/null +++ b/components/prism-coq.js @@ -0,0 +1,54 @@ +(function (Prism) { + + // https://github.com/coq/coq + + var commentSource = /\(\*(?:[^(*]|\((?!\*)|\*(?!\))|)*\*\)/.source; + for (var i = 0; i < 2; i++) { + commentSource = commentSource.replace(//g, function () { return commentSource; }); + } + commentSource = commentSource.replace(//g, '[]'); + + Prism.languages.coq = { + 'comment': RegExp(commentSource), + 'string': { + pattern: /"(?:[^"]|"")*"(?!")/, + greedy: true + }, + 'attribute': [ + { + pattern: RegExp( + /#\[(?:[^\]("]|"(?:[^"]|"")*"(?!")|\((?!\*)|)*\]/.source + .replace(//g, function () { return commentSource; }) + ), + greedy: true, + alias: 'attr-name', + inside: { + 'comment': RegExp(commentSource), + 'string': { + pattern: /"(?:[^"]|"")*"(?!")/, + greedy: true + }, + + 'operator': /=/, + 'punctuation': /^#\[|\]$|[,()]/ + } + }, + { + pattern: /\b(?:Cumulative|Global|Local|Monomorphic|NonCumulative|Polymorphic|Private|Program)\b/, + alias: 'attr-name' + } + ], + + 'keyword': /\b(?:_|Abort|About|Add|Admit|Admitted|All|apply|Arguments|as|As|Assumptions|at|Axiom|Axioms|Back|BackTo|Backtrace|Bind|BinOp|BinOpSpec|BinRel|Blacklist|by|Canonical|Case|Cd|Check|Class|Classes|Close|Coercion|Coercions|cofix|CoFixpoint|CoInductive|Collection|Combined|Compute|Conjecture|Conjectures|Constant|Constants|Constraint|Constructors|Context|Corollary|Create|CstOp|Custom|Cut|Debug|Declare|Defined|Definition|Delimit|Dependencies|Dependent|Derive|Diffs|Drop|Elimination|else|end|End|Entry|Equality|Eval|Example|Existential|Existentials|Existing|exists|exists2|Export|Extern|Extraction|Fact|Fail|Field|File|Firstorder|fix|Fixpoint|Flags|Focus|for|forall|From|fun|Funclass|Function|Functional|GC|Generalizable|Goal|Grab|Grammar|Graph|Guarded|Haskell|Heap|Hide|Hint|HintDb|Hints|Hypotheses|Hypothesis|Identity|if|IF|Immediate|Implicit|Implicits|Import|in|Include|Induction|Inductive|Infix|Info|Initial|InjTyp|Inline|Inspect|Instance|Instances|Intro|Intros|Inversion|Inversion_clear|JSON|Language|Left|Lemma|let|Let|Lia|Libraries|Library|Load|LoadPath|Locate|Ltac|Ltac2|match|Match|measure|Method|Minimality|ML|Module|Modules|Morphism|move|Next|NoInline|Notation|Number|Obligation|Obligations|OCaml|Opaque|Open|Optimize|Parameter|Parameters|Parametric|Path|Paths|Prenex|Preterm|Primitive|Print|Profile|Projections|Proof|Prop|PropBinOp|Property|PropOp|Proposition|PropUOp|Pwd|Qed|Quit|Rec|Record|Recursive|Redirect|Reduction|Register|Relation|Remark|Remove|removed|Require|Reserved|Reset|Resolve|Restart|return|Rewrite|Right|Ring|Rings|Saturate|Save|Scheme|Scope|Scopes|Search|SearchHead|SearchPattern|SearchRewrite|Section|Separate|Set|Setoid|Show|Signatures|Solve|Solver|Sort|Sortclass|Sorted|Spec|SProp|Step|Strategies|Strategy|String|struct|Structure|SubClass|Subgraph|SuchThat|Tactic|Term|TestCompile|then|Theorem|Time|Timeout|To|Transparent|Type|Typeclasses|Types|Typing|Undelimit|Undo|Unfocus|Unfocused|Unfold|Universe|Universes|UnOp|UnOpSpec|Unshelve|using|Variable|Variables|Variant|Verbose|View|Visibility|wf|where|with|Zify)\b/, + + 'number': /\b(?:0x[a-f0-9][a-f0-9_]*(?:\.[a-f0-9_]+)?(?:p[+-]?\d[\d_]*)?|\d[\d_]*(?:\.[\d_]+)?(?:e[+-]?\d[\d_]*)?)\b/i, + + 'punct': { + pattern: /@\{|\{\||\[=|:>/, + alias: 'punctuation' + }, + 'operator': /\/\\|\\\/|\.{2,3}|:{1,2}=|\*\*|[-=]>|<(?:->?|[+:=>]|<:)|>(?:=|->)|\|[-|]?|[-!%&*+/<=>?@^~']/, + 'punctuation': /\.\(|`\(|@\{|`\{|\{\||\[=|:>|[:.,;(){}\[\]]/ + }; + +}(Prism)); diff --git a/components/prism-coq.min.js b/components/prism-coq.min.js new file mode 100644 index 0000000000..dc34424010 --- /dev/null +++ b/components/prism-coq.min.js @@ -0,0 +1 @@ +!function(e){for(var t="\\(\\*(?:[^(*]|\\((?!\\*)|\\*(?!\\))|)*\\*\\)",i=0;i<2;i++)t=t.replace(//g,function(){return t});t=t.replace(//g,"[]"),e.languages.coq={comment:RegExp(t),string:{pattern:/"(?:[^"]|"")*"(?!")/,greedy:!0},attribute:[{pattern:RegExp('#\\[(?:[^\\]("]|"(?:[^"]|"")*"(?!")|\\((?!\\*)|)*\\]'.replace(//g,function(){return t})),greedy:!0,alias:"attr-name",inside:{comment:RegExp(t),string:{pattern:/"(?:[^"]|"")*"(?!")/,greedy:!0},operator:/=/,punctuation:/^#\[|\]$|[,()]/}},{pattern:/\b(?:Cumulative|Global|Local|Monomorphic|NonCumulative|Polymorphic|Private|Program)\b/,alias:"attr-name"}],keyword:/\b(?:_|Abort|About|Add|Admit|Admitted|All|apply|Arguments|as|As|Assumptions|at|Axiom|Axioms|Back|BackTo|Backtrace|Bind|BinOp|BinOpSpec|BinRel|Blacklist|by|Canonical|Case|Cd|Check|Class|Classes|Close|Coercion|Coercions|cofix|CoFixpoint|CoInductive|Collection|Combined|Compute|Conjecture|Conjectures|Constant|Constants|Constraint|Constructors|Context|Corollary|Create|CstOp|Custom|Cut|Debug|Declare|Defined|Definition|Delimit|Dependencies|Dependent|Derive|Diffs|Drop|Elimination|else|end|End|Entry|Equality|Eval|Example|Existential|Existentials|Existing|exists|exists2|Export|Extern|Extraction|Fact|Fail|Field|File|Firstorder|fix|Fixpoint|Flags|Focus|for|forall|From|fun|Funclass|Function|Functional|GC|Generalizable|Goal|Grab|Grammar|Graph|Guarded|Haskell|Heap|Hide|Hint|HintDb|Hints|Hypotheses|Hypothesis|Identity|if|IF|Immediate|Implicit|Implicits|Import|in|Include|Induction|Inductive|Infix|Info|Initial|InjTyp|Inline|Inspect|Instance|Instances|Intro|Intros|Inversion|Inversion_clear|JSON|Language|Left|Lemma|let|Let|Lia|Libraries|Library|Load|LoadPath|Locate|Ltac|Ltac2|match|Match|measure|Method|Minimality|ML|Module|Modules|Morphism|move|Next|NoInline|Notation|Number|Obligation|Obligations|OCaml|Opaque|Open|Optimize|Parameter|Parameters|Parametric|Path|Paths|Prenex|Preterm|Primitive|Print|Profile|Projections|Proof|Prop|PropBinOp|Property|PropOp|Proposition|PropUOp|Pwd|Qed|Quit|Rec|Record|Recursive|Redirect|Reduction|Register|Relation|Remark|Remove|removed|Require|Reserved|Reset|Resolve|Restart|return|Rewrite|Right|Ring|Rings|Saturate|Save|Scheme|Scope|Scopes|Search|SearchHead|SearchPattern|SearchRewrite|Section|Separate|Set|Setoid|Show|Signatures|Solve|Solver|Sort|Sortclass|Sorted|Spec|SProp|Step|Strategies|Strategy|String|struct|Structure|SubClass|Subgraph|SuchThat|Tactic|Term|TestCompile|then|Theorem|Time|Timeout|To|Transparent|Type|Typeclasses|Types|Typing|Undelimit|Undo|Unfocus|Unfocused|Unfold|Universe|Universes|UnOp|UnOpSpec|Unshelve|using|Variable|Variables|Variant|Verbose|View|Visibility|wf|where|with|Zify)\b/,number:/\b(?:0x[a-f0-9][a-f0-9_]*(?:\.[a-f0-9_]+)?(?:p[+-]?\d[\d_]*)?|\d[\d_]*(?:\.[\d_]+)?(?:e[+-]?\d[\d_]*)?)\b/i,punct:{pattern:/@\{|\{\||\[=|:>/,alias:"punctuation"},operator:/\/\\|\\\/|\.{2,3}|:{1,2}=|\*\*|[-=]>|<(?:->?|[+:=>]|<:)|>(?:=|->)|\|[-|]?|[-!%&*+/<=>?@^~']/,punctuation:/\.\(|`\(|@\{|`\{|\{\||\[=|:>|[:.,;(){}\[\]]/}}(Prism); \ No newline at end of file diff --git a/examples/prism-coq.html b/examples/prism-coq.html new file mode 100644 index 0000000000..1e9b51db32 --- /dev/null +++ b/examples/prism-coq.html @@ -0,0 +1,45 @@ +

          Full example

          +
          (* Source: https://coq.inria.fr/a-short-introduction-to-coq *)
          +
          +Inductive seq : nat -> Set :=
          +| niln : seq 0
          +| consn : forall n : nat, nat -> seq n -> seq (S n).
          +
          +Fixpoint length (n : nat) (s : seq n) {struct s} : nat :=
          +  match s with
          +  | niln => 0
          +  | consn i _ s' => S (length i s')
          +  end.
          +
          +Theorem length_corr : forall (n : nat) (s : seq n), length n s = n.
          +Proof.
          +  intros n s.
          +
          +  (* reasoning by induction over s. Then, we have two new goals
          +     corresponding on the case analysis about s (either it is
          +     niln or some consn *)
          +  induction s.
          +
          +    (* We are in the case where s is void. We can reduce the
          +       term: length 0 niln *)
          +    simpl.
          +
          +    (* We obtain the goal 0 = 0. *)
          +    trivial.
          +
          +    (* now, we treat the case s = consn n e s with induction
          +       hypothesis IHs *)
          +    simpl.
          +
          +    (* The induction hypothesis has type length n s = n.
          +       So we can use it to perform some rewriting in the goal: *)
          +    rewrite IHs.
          +
          +    (* Now the goal is the trivial equality: S n = S n *)
          +    trivial.
          +
          +  (* Now all sub cases are closed, we perform the ultimate
          +     step: typing the term built using tactics and save it as
          +     a witness of the theorem. *)
          +Qed.
          +
          diff --git a/tests/languages/coq/attribute_feature.test b/tests/languages/coq/attribute_feature.test new file mode 100644 index 0000000000..a4636681ea --- /dev/null +++ b/tests/languages/coq/attribute_feature.test @@ -0,0 +1,73 @@ +#[program] +#[program=yes] +#[deprecated(since="8.9.0")] +#[local, universes(polymorphic)] +#[universes(polymorphic(foo,bar))] +#[canonical=yes, canonical=no] +#[ export ] + +---------------------------------------------------- + +[ + ["attribute", [ + ["punctuation", "#["], + "program", + ["punctuation", "]"] + ]], + ["attribute", [ + ["punctuation", "#["], + "program", + ["operator", "="], + "yes", + ["punctuation", "]"] + ]], + ["attribute", [ + ["punctuation", "#["], + "deprecated", + ["punctuation", "("], + "since", + ["operator", "="], + ["string", "\"8.9.0\""], + ["punctuation", ")"], + ["punctuation", "]"] + ]], + ["attribute", [ + ["punctuation", "#["], + "local", + ["punctuation", ","], + " universes", + ["punctuation", "("], + "polymorphic", + ["punctuation", ")"], + ["punctuation", "]"] + ]], + ["attribute", [ + ["punctuation", "#["], + "universes", + ["punctuation", "("], + "polymorphic", + ["punctuation", "("], + "foo", + ["punctuation", ","], + "bar", + ["punctuation", ")"], + ["punctuation", ")"], + ["punctuation", "]"] + ]], + ["attribute", [ + ["punctuation", "#["], + "canonical", + ["operator", "="], + "yes", + ["punctuation", ","], + " canonical", + ["operator", "="], + "no", + ["punctuation", "]"] + ]], + ["attribute", [ + ["punctuation", "#["], + " export ", + ["punctuation", "]"] + ]] +] \ No newline at end of file diff --git a/tests/languages/coq/comment_feature.test b/tests/languages/coq/comment_feature.test new file mode 100644 index 0000000000..9564560a59 --- /dev/null +++ b/tests/languages/coq/comment_feature.test @@ -0,0 +1,17 @@ +(**) +(* comment *) +(* + comment + *) + +(* comments (* can be (* nested *) *) *) + +---------------------------------------------------- + +[ + ["comment", "(**)"], + ["comment", "(* comment *)"], + ["comment", "(*\r\n comment\r\n *)"], + + ["comment", "(* comments (* can be (* nested *) *) *)"] +] \ No newline at end of file diff --git a/tests/languages/coq/keyword_feature.test b/tests/languages/coq/keyword_feature.test new file mode 100644 index 0000000000..8e17324efe --- /dev/null +++ b/tests/languages/coq/keyword_feature.test @@ -0,0 +1,547 @@ +_ +Abort +About +Add +Admit +Admitted +All +apply +Arguments +as +As +Assumptions +at +Axiom +Axioms +Back +BackTo +Backtrace +Bind +BinOp +BinOpSpec +BinRel +Blacklist +by +Canonical +Case +Cd +Check +Class +Classes +Close +Coercion +Coercions +cofix +CoFixpoint +CoInductive +Collection +Combined +Compute +Conjecture +Conjectures +Constant +Constants +Constraint +Constructors +Context +Corollary +Create +CstOp +Custom +Cut +Debug +Declare +Defined +Definition +Delimit +Dependencies +Dependent +Derive +Diffs +Drop +Elimination +else +end +End +Entry +Equality +Eval +Example +Existential +Existentials +Existing +exists +exists2 +Export +Extern +Extraction +Fact +Fail +Field +File +Firstorder +fix +Fixpoint +Flags +Focus +for +forall +From +fun +Funclass +Function +Functional +GC +Generalizable +Goal +Grab +Grammar +Graph +Guarded +Haskell +Heap +Hide +Hint +HintDb +Hints +Hypotheses +Hypothesis +Identity +if +IF +Immediate +Implicit +Implicits +Import +in +Include +Induction +Inductive +Infix +Info +Initial +InjTyp +Inline +Inspect +Instance +Instances +Intro +Intros +Inversion +Inversion_clear +JSON +Language +Left +Lemma +let +Let +Lia +Libraries +Library +Load +LoadPath +Locate +Ltac +Ltac2 +match +Match +measure +Method +Minimality +ML +Module +Modules +Morphism +move +Next +NoInline +Notation +Number +Obligation +Obligations +OCaml +Opaque +Open +Optimize +Parameter +Parameters +Parametric +Path +Paths +Prenex +Preterm +Primitive +Print +Profile +Projections +Proof +Prop +PropBinOp +Property +PropOp +Proposition +PropUOp +Pwd +Qed +Quit +Rec +Record +Recursive +Redirect +Reduction +Register +Relation +Remark +Remove +removed +Require +Reserved +Reset +Resolve +Restart +return +Rewrite +Right +Ring +Rings +Saturate +Save +Scheme +Scope +Scopes +Search +SearchHead +SearchPattern +SearchRewrite +Section +Separate +Set +Setoid +Show +Signatures +Solve +Solver +Sort +Sortclass +Sorted +Spec +SProp +Step +Strategies +Strategy +String +struct +Structure +SubClass +Subgraph +SuchThat +Tactic +Term +TestCompile +then +Theorem +Time +Timeout +To +Transparent +Type +Typeclasses +Types +Typing +Undelimit +Undo +Unfocus +Unfocused +Unfold +Universe +Universes +UnOp +UnOpSpec +Unshelve +using +Variable +Variables +Variant +Verbose +View +Visibility +wf +where +with +Zify + +---------------------------------------------------- + +[ + ["keyword", "_"], + ["keyword", "Abort"], + ["keyword", "About"], + ["keyword", "Add"], + ["keyword", "Admit"], + ["keyword", "Admitted"], + ["keyword", "All"], + ["keyword", "apply"], + ["keyword", "Arguments"], + ["keyword", "as"], + ["keyword", "As"], + ["keyword", "Assumptions"], + ["keyword", "at"], + ["keyword", "Axiom"], + ["keyword", "Axioms"], + ["keyword", "Back"], + ["keyword", "BackTo"], + ["keyword", "Backtrace"], + ["keyword", "Bind"], + ["keyword", "BinOp"], + ["keyword", "BinOpSpec"], + ["keyword", "BinRel"], + ["keyword", "Blacklist"], + ["keyword", "by"], + ["keyword", "Canonical"], + ["keyword", "Case"], + ["keyword", "Cd"], + ["keyword", "Check"], + ["keyword", "Class"], + ["keyword", "Classes"], + ["keyword", "Close"], + ["keyword", "Coercion"], + ["keyword", "Coercions"], + ["keyword", "cofix"], + ["keyword", "CoFixpoint"], + ["keyword", "CoInductive"], + ["keyword", "Collection"], + ["keyword", "Combined"], + ["keyword", "Compute"], + ["keyword", "Conjecture"], + ["keyword", "Conjectures"], + ["keyword", "Constant"], + ["keyword", "Constants"], + ["keyword", "Constraint"], + ["keyword", "Constructors"], + ["keyword", "Context"], + ["keyword", "Corollary"], + ["keyword", "Create"], + ["keyword", "CstOp"], + ["keyword", "Custom"], + ["keyword", "Cut"], + ["keyword", "Debug"], + ["keyword", "Declare"], + ["keyword", "Defined"], + ["keyword", "Definition"], + ["keyword", "Delimit"], + ["keyword", "Dependencies"], + ["keyword", "Dependent"], + ["keyword", "Derive"], + ["keyword", "Diffs"], + ["keyword", "Drop"], + ["keyword", "Elimination"], + ["keyword", "else"], + ["keyword", "end"], + ["keyword", "End"], + ["keyword", "Entry"], + ["keyword", "Equality"], + ["keyword", "Eval"], + ["keyword", "Example"], + ["keyword", "Existential"], + ["keyword", "Existentials"], + ["keyword", "Existing"], + ["keyword", "exists"], + ["keyword", "exists2"], + ["keyword", "Export"], + ["keyword", "Extern"], + ["keyword", "Extraction"], + ["keyword", "Fact"], + ["keyword", "Fail"], + ["keyword", "Field"], + ["keyword", "File"], + ["keyword", "Firstorder"], + ["keyword", "fix"], + ["keyword", "Fixpoint"], + ["keyword", "Flags"], + ["keyword", "Focus"], + ["keyword", "for"], + ["keyword", "forall"], + ["keyword", "From"], + ["keyword", "fun"], + ["keyword", "Funclass"], + ["keyword", "Function"], + ["keyword", "Functional"], + ["keyword", "GC"], + ["keyword", "Generalizable"], + ["keyword", "Goal"], + ["keyword", "Grab"], + ["keyword", "Grammar"], + ["keyword", "Graph"], + ["keyword", "Guarded"], + ["keyword", "Haskell"], + ["keyword", "Heap"], + ["keyword", "Hide"], + ["keyword", "Hint"], + ["keyword", "HintDb"], + ["keyword", "Hints"], + ["keyword", "Hypotheses"], + ["keyword", "Hypothesis"], + ["keyword", "Identity"], + ["keyword", "if"], + ["keyword", "IF"], + ["keyword", "Immediate"], + ["keyword", "Implicit"], + ["keyword", "Implicits"], + ["keyword", "Import"], + ["keyword", "in"], + ["keyword", "Include"], + ["keyword", "Induction"], + ["keyword", "Inductive"], + ["keyword", "Infix"], + ["keyword", "Info"], + ["keyword", "Initial"], + ["keyword", "InjTyp"], + ["keyword", "Inline"], + ["keyword", "Inspect"], + ["keyword", "Instance"], + ["keyword", "Instances"], + ["keyword", "Intro"], + ["keyword", "Intros"], + ["keyword", "Inversion"], + ["keyword", "Inversion_clear"], + ["keyword", "JSON"], + ["keyword", "Language"], + ["keyword", "Left"], + ["keyword", "Lemma"], + ["keyword", "let"], + ["keyword", "Let"], + ["keyword", "Lia"], + ["keyword", "Libraries"], + ["keyword", "Library"], + ["keyword", "Load"], + ["keyword", "LoadPath"], + ["keyword", "Locate"], + ["keyword", "Ltac"], + ["keyword", "Ltac2"], + ["keyword", "match"], + ["keyword", "Match"], + ["keyword", "measure"], + ["keyword", "Method"], + ["keyword", "Minimality"], + ["keyword", "ML"], + ["keyword", "Module"], + ["keyword", "Modules"], + ["keyword", "Morphism"], + ["keyword", "move"], + ["keyword", "Next"], + ["keyword", "NoInline"], + ["keyword", "Notation"], + ["keyword", "Number"], + ["keyword", "Obligation"], + ["keyword", "Obligations"], + ["keyword", "OCaml"], + ["keyword", "Opaque"], + ["keyword", "Open"], + ["keyword", "Optimize"], + ["keyword", "Parameter"], + ["keyword", "Parameters"], + ["keyword", "Parametric"], + ["keyword", "Path"], + ["keyword", "Paths"], + ["keyword", "Prenex"], + ["keyword", "Preterm"], + ["keyword", "Primitive"], + ["keyword", "Print"], + ["keyword", "Profile"], + ["keyword", "Projections"], + ["keyword", "Proof"], + ["keyword", "Prop"], + ["keyword", "PropBinOp"], + ["keyword", "Property"], + ["keyword", "PropOp"], + ["keyword", "Proposition"], + ["keyword", "PropUOp"], + ["keyword", "Pwd"], + ["keyword", "Qed"], + ["keyword", "Quit"], + ["keyword", "Rec"], + ["keyword", "Record"], + ["keyword", "Recursive"], + ["keyword", "Redirect"], + ["keyword", "Reduction"], + ["keyword", "Register"], + ["keyword", "Relation"], + ["keyword", "Remark"], + ["keyword", "Remove"], + ["keyword", "removed"], + ["keyword", "Require"], + ["keyword", "Reserved"], + ["keyword", "Reset"], + ["keyword", "Resolve"], + ["keyword", "Restart"], + ["keyword", "return"], + ["keyword", "Rewrite"], + ["keyword", "Right"], + ["keyword", "Ring"], + ["keyword", "Rings"], + ["keyword", "Saturate"], + ["keyword", "Save"], + ["keyword", "Scheme"], + ["keyword", "Scope"], + ["keyword", "Scopes"], + ["keyword", "Search"], + ["keyword", "SearchHead"], + ["keyword", "SearchPattern"], + ["keyword", "SearchRewrite"], + ["keyword", "Section"], + ["keyword", "Separate"], + ["keyword", "Set"], + ["keyword", "Setoid"], + ["keyword", "Show"], + ["keyword", "Signatures"], + ["keyword", "Solve"], + ["keyword", "Solver"], + ["keyword", "Sort"], + ["keyword", "Sortclass"], + ["keyword", "Sorted"], + ["keyword", "Spec"], + ["keyword", "SProp"], + ["keyword", "Step"], + ["keyword", "Strategies"], + ["keyword", "Strategy"], + ["keyword", "String"], + ["keyword", "struct"], + ["keyword", "Structure"], + ["keyword", "SubClass"], + ["keyword", "Subgraph"], + ["keyword", "SuchThat"], + ["keyword", "Tactic"], + ["keyword", "Term"], + ["keyword", "TestCompile"], + ["keyword", "then"], + ["keyword", "Theorem"], + ["keyword", "Time"], + ["keyword", "Timeout"], + ["keyword", "To"], + ["keyword", "Transparent"], + ["keyword", "Type"], + ["keyword", "Typeclasses"], + ["keyword", "Types"], + ["keyword", "Typing"], + ["keyword", "Undelimit"], + ["keyword", "Undo"], + ["keyword", "Unfocus"], + ["keyword", "Unfocused"], + ["keyword", "Unfold"], + ["keyword", "Universe"], + ["keyword", "Universes"], + ["keyword", "UnOp"], + ["keyword", "UnOpSpec"], + ["keyword", "Unshelve"], + ["keyword", "using"], + ["keyword", "Variable"], + ["keyword", "Variables"], + ["keyword", "Variant"], + ["keyword", "Verbose"], + ["keyword", "View"], + ["keyword", "Visibility"], + ["keyword", "wf"], + ["keyword", "where"], + ["keyword", "with"], + ["keyword", "Zify"] +] \ No newline at end of file diff --git a/tests/languages/coq/number_feature.test b/tests/languages/coq/number_feature.test new file mode 100644 index 0000000000..3027ea8b35 --- /dev/null +++ b/tests/languages/coq/number_feature.test @@ -0,0 +1,33 @@ +0 +123 +123.456 +123.456e65 +123.456e+65 +1_2_3.4_5_6e-6_5 +1_2_3e-6_5 + +0x0 +0X0 +0xbad.345e +0xbad.345ep54 +0xbad.345ep+54 +0xb_a_d.3_4_5_ep-5_4 + +---------------------------------------------------- + +[ + ["number", "0"], + ["number", "123"], + ["number", "123.456"], + ["number", "123.456e65"], + ["number", "123.456e+65"], + ["number", "1_2_3.4_5_6e-6_5"], + ["number", "1_2_3e-6_5"], + + ["number", "0x0"], + ["number", "0X0"], + ["number", "0xbad.345e"], + ["number", "0xbad.345ep54"], + ["number", "0xbad.345ep+54"], + ["number", "0xb_a_d.3_4_5_ep-5_4"] +] \ No newline at end of file diff --git a/tests/languages/coq/operator_feature.test b/tests/languages/coq/operator_feature.test new file mode 100644 index 0000000000..227cf1943a --- /dev/null +++ b/tests/languages/coq/operator_feature.test @@ -0,0 +1,83 @@ +-> ++ +< +<- +<-> +<: +<+ +<<: +<= += +=> +> +>-> +>= +| +|- +|| +@ +* +** +/ +/\ +\/ +& +% +- +! +? +^ +~ + +.. +... + +::= +:= += + +' + +---------------------------------------------------- + +[ + ["operator", "->"], + ["operator", "+"], + ["operator", "<"], + ["operator", "<-"], + ["operator", "<->"], + ["operator", "<:"], + ["operator", "<+"], + ["operator", "<<:"], + ["operator", "<="], + ["operator", "="], + ["operator", "=>"], + ["operator", ">"], + ["operator", ">->"], + ["operator", ">="], + ["operator", "|"], + ["operator", "|-"], + ["operator", "||"], + ["operator", "@"], + ["operator", "*"], + ["operator", "**"], + ["operator", "/"], + ["operator", "/\\"], + ["operator", "\\/"], + ["operator", "&"], + ["operator", "%"], + ["operator", "-"], + ["operator", "!"], + ["operator", "?"], + ["operator", "^"], + ["operator", "~"], + + ["operator", ".."], + ["operator", "..."], + + ["operator", "::="], + ["operator", ":="], + ["operator", "="], + + ["operator", "'"] +] \ No newline at end of file diff --git a/tests/languages/coq/punctuation_feature.test b/tests/languages/coq/punctuation_feature.test new file mode 100644 index 0000000000..6d4579d9cb --- /dev/null +++ b/tests/languages/coq/punctuation_feature.test @@ -0,0 +1,35 @@ +, ; . +( ) .( `( +{ } @{ } `{ } {| } +[ ] [= ] + +: :> + +---------------------------------------------------- + +[ + ["punctuation", ","], + ["punctuation", ";"], + ["punctuation", "."], + + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", ".("], + ["punctuation", "`("], + + ["punctuation", "{"], + ["punctuation", "}"], + ["punct", "@{"], + ["punctuation", "}"], + ["punctuation", "`{"], + ["punctuation", "}"], + ["punct", "{|"], + ["punctuation", "}"], + + ["punctuation", "["], + ["punctuation", "]"], + ["punct", "[="], + ["punctuation", "]"], + + ["punctuation", ":"], ["punct", ":>"] +] \ No newline at end of file diff --git a/tests/languages/coq/string_feature.test b/tests/languages/coq/string_feature.test new file mode 100644 index 0000000000..c03f3f51cf --- /dev/null +++ b/tests/languages/coq/string_feature.test @@ -0,0 +1,9 @@ +"" +"foo""bar" + +---------------------------------------------------- + +[ + ["string", "\"\""], + ["string", "\"foo\"\"bar\""] +] \ No newline at end of file From 7cd9e7948516d455bf19c3bc9e1b7bc840f3febf Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Fri, 26 Mar 2021 12:59:04 +0100 Subject: [PATCH 0773/1100] Added link to Q&A to issue templates (#2834) --- .github/ISSUE_TEMPLATE/config.yml | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/config.yml diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000000..5987d5973a --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,4 @@ +contact_links: + - name: Questions and Help + url: https://github.com/PrismJS/prism/discussions/categories/q-a + about: This issue tracker is not for support questions. Please refer to the Prism's Discussion tab. From 772d42bec006e7d0d028a29daff84db9ccc8dfbc Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Fri, 26 Mar 2021 13:16:16 +0100 Subject: [PATCH 0774/1100] Added ESLint with minimal config (#2831) --- .eslintrc.js | 122 +++ .github/workflows/test.yml | 13 + .npmignore | 1 + assets/code.js | 20 +- assets/download.js | 20 +- components/prism-abap.js | 4 +- components/prism-bsl.js | 2 + components/prism-coffeescript.js | 10 +- components/prism-core.js | 5 +- components/prism-js-templates.js | 2 +- components/prism-naniscript.js | 2 +- components/prism-nsis.js | 2 +- components/prism-openqasm.js | 2 +- components/prism-openqasm.min.js | 2 +- components/prism-parser.js | 2 +- components/prism-parser.min.js | 2 +- components/prism-pure.js | 1 + components/prism-robotframework.js | 8 +- components/prism-robotframework.min.js | 2 +- dependencies.js | 4 +- docs/global.html | 8 +- docs/prism-core.js.html | 5 +- gulpfile.js/index.js | 2 +- package-lock.json | 761 ++++++++++++++++++ package.json | 3 + plugins/autolinker/prism-autolinker.js | 2 +- plugins/autoloader/prism-autoloader.js | 2 +- .../jsonp-highlight/prism-jsonp-highlight.js | 5 +- .../prism-jsonp-highlight.min.js | 2 +- .../prism-normalize-whitespace.js | 12 +- .../show-invisibles/prism-show-invisibles.js | 2 + plugins/toolbar/prism-toolbar.js | 2 +- plugins/treeview/prism-treeview.js | 2 +- plugins/treeview/prism-treeview.min.js | 2 +- prism.js | 5 +- tests/helper/prism-loader.js | 1 - tests/pattern-tests.js | 3 +- tests/plugins/keep-markup/test.js | 1 + 38 files changed, 979 insertions(+), 67 deletions(-) create mode 100644 .eslintrc.js diff --git a/.eslintrc.js b/.eslintrc.js new file mode 100644 index 0000000000..c5b2c2a409 --- /dev/null +++ b/.eslintrc.js @@ -0,0 +1,122 @@ +/** @type {import('eslint').Linter.Config} */ +module.exports = { + extends: 'eslint:recommended', + rules: { + // I turned this rule off because we use `hasOwnProperty` in a lot of places + // TODO: Think about re-enabling this rule + 'no-prototype-builtins': 'off', + // TODO: Think about re-enabling this rule + 'no-cond-assign': 'off', + // TODO: Think about re-enabling this rule + 'no-inner-declarations': 'off', + // TODO: Think about re-enabling this rule + 'no-sparse-arrays': 'off', + + // turning off some regex rules + // these are supposed to protect against accidental use but we need those quite often + 'no-control-regex': 'off', + 'no-empty-character-class': 'off', + 'no-useless-escape': 'off' + }, + ignorePatterns: [ + '*.min.js', + 'vendor/', + 'utopia.js', + 'docs/', + 'components.js', + 'prism.js', + 'node_modules' + ], + + overrides: [ + { + // Languages and plugins + files: [ + 'components/*.js', + 'plugins/*/prism-*.js' + ], + excludedFiles: 'components/index.js', + env: { + browser: true, + node: true, + worker: true + }, + globals: { + 'Prism': true + } + }, + { + // `loadLanguages` function for Node.js + files: 'components/index.js', + env: { + es6: true, + node: true + }, + parserOptions: { + ecmaVersion: 6 + }, + globals: { + 'Prism': true + } + }, + { + // Gulp and Danger + files: 'dependencies.js', + env: { + browser: true, + node: true + } + }, + { + // The scripts that run on our website + files: 'assets/*.js', + env: { + browser: true + }, + globals: { + 'components': true, + 'getLoader': true, + 'PrefixFree': true, + 'Prism': true, + 'Promise': true, + 'saveAs': true, + '$': true, + '$$': true, + '$u': true + } + }, + { + // Test files + files: 'tests/**', + env: { + es6: true, + mocha: true, + node: true + }, + parserOptions: { + ecmaVersion: 2018 + } + }, + { + // Gulp and Danger + files: [ + 'gulpfile.js/**', + 'dangerfile.js' + ], + env: { + es6: true, + node: true + }, + parserOptions: { + ecmaVersion: 2018 + } + }, + { + // This file + files: '.eslintrc.js', + env: { + node: true + } + }, + ] +}; diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0e07d03419..21fdfe0be0 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -44,3 +44,16 @@ jobs: git add --all && \ git diff-index --cached HEAD --stat --exit-code || \ (echo && echo "The above files changed because the build is not up to date." && echo "Please rebuild Prism." && exit 1) + + lint: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Use Node.js 14.x + uses: actions/setup-node@v1 + with: + node-version: 14.x + - run: npm ci + - run: npm run lint diff --git a/.npmignore b/.npmignore index 0e00a36ac0..fdbc02a99b 100644 --- a/.npmignore +++ b/.npmignore @@ -19,3 +19,4 @@ gulpfile.js .editorconfig .gitattributes .travis.yml +.eslintrc.js diff --git a/assets/code.js b/assets/code.js index e2da68aae8..1b8ccccb4d 100644 --- a/assets/code.js +++ b/assets/code.js @@ -11,9 +11,9 @@ $$('[data-plugin-header]').forEach(function (element) { }); $$('[data-src][data-type="text/html"]').forEach(function(element) { - var src = element.getAttribute('data-src'), - html = element.getAttribute('data-type') === 'text/html', - contentProperty = html ? 'innerHTML' : 'textContent'; + var src = element.getAttribute('data-src'); + var html = element.getAttribute('data-type') === 'text/html'; + var contentProperty = html ? 'innerHTML' : 'textContent'; $u.xhr({ url: src, @@ -24,12 +24,12 @@ $$('[data-src][data-type="text/html"]').forEach(function(element) { // Run JS $$('script', element).forEach(function (script) { - var after = script.nextSibling, parent = script.parentNode; + var parent = script.parentNode; parent.removeChild(script); document.head.appendChild(script); }); } - catch (e) {} + catch (e) { /* noop */ } } }); }); @@ -43,9 +43,9 @@ $$('[data-src][data-type="text/html"]').forEach(function(element) { var toc = document.createElement('ol'); $$('body > section > h1').forEach(function(h1) { - var section = h1.parentNode, - text = h1.textContent, - id = h1.id || section.id; + var section = h1.parentNode; + var text = h1.textContent; + var id = h1.id || section.id; // Assign id if one does not exist if (!id) { @@ -128,8 +128,8 @@ if (toc.children.length > 0) { if(!style.width) { // calc not supported - var header = $('header'), - footer = $('footer'); + var header = $('header'); + var footer = $('footer'); function calculatePadding() { header.style.padding = diff --git a/assets/download.js b/assets/download.js index cfd1d16a05..fba5920044 100644 --- a/assets/download.js +++ b/assets/download.js @@ -40,9 +40,9 @@ function toArray(value) { var hstr = window.location.hash.match(/(?:languages|plugins)=[-+\w]+|themes=[-\w]+/g); if (hstr) { hstr.forEach(function(str) { - var kv = str.split('=', 2), - category = kv[0], - ids = kv[1].split('+'); + var kv = str.split('=', 2); + var category = kv[0]; + var ids = kv[1].split('+'); if (category !== 'meta' && category !== 'core' && components[category]) { for (var id in components[category]) { if (components[category][id].option) { @@ -54,6 +54,7 @@ if (hstr) { if (themeInput) { themeInput.checked = true; } + // eslint-disable-next-line no-undef setTheme(ids[0]); } var makeDefault = function (id) { @@ -314,8 +315,8 @@ function getFilesSizes() { continue; } - var distro = all[id].files[minified? 'minified' : 'dev'], - files = distro.paths; + var distro = all[id].files[minified? 'minified' : 'dev']; + var files = distro.paths; files.forEach(function (filepath) { var file = cache[filepath] = cache[filepath] || {}; @@ -380,8 +381,8 @@ function update(updatedCategory, updatedId){ if (cache[path]) { var file = cache[path]; - var type = path.match(/\.(\w+)$/)[1], - size = file.size || 0; + var type = path.match(/\.(\w+)$/)[1]; + var size = file.size || 0; if (info.enabled) { @@ -408,6 +409,7 @@ function update(updatedCategory, updatedId){ if (themeInput) { themeInput.checked = true; } + // eslint-disable-next-line no-undef setTheme(updatedId); } } @@ -581,8 +583,8 @@ function buildCode(promises) { promises = finalPromises; // build - var i = 0, - l = promises.length; + var i = 0; + var l = promises.length; var code = {js: '', css: ''}; var errors = []; diff --git a/components/prism-abap.js b/components/prism-abap.js index 4ee1350956..e598ccef15 100644 --- a/components/prism-abap.js +++ b/components/prism-abap.js @@ -40,8 +40,8 @@ Prism.languages.abap = { lookbehind: true, alias: "punctuation" }, { - /* Special tokens used do delimit string templates */ - pattern: /[|{}]/, + /* Special tokens used do delimit string templates */ + pattern: /[|{}]/, alias: "punctuation" }], 'punctuation' : /[,.:()]/ diff --git a/components/prism-bsl.js b/components/prism-bsl.js index f53a873606..b595552661 100644 --- a/components/prism-bsl.js +++ b/components/prism-bsl.js @@ -1,3 +1,5 @@ +/* eslint-disable no-misleading-character-class */ + // 1C:Enterprise // https://github.com/Diversus23/ // diff --git a/components/prism-coffeescript.js b/components/prism-coffeescript.js index f1d52fb369..f17f85bdff 100644 --- a/components/prism-coffeescript.js +++ b/components/prism-coffeescript.js @@ -1,11 +1,11 @@ (function(Prism) { // Ignore comments starting with { to privilege string interpolation highlighting -var comment = /#(?!\{).+/, - interpolation = { - pattern: /#\{[^}]+\}/, - alias: 'variable' - }; +var comment = /#(?!\{).+/; +var interpolation = { + pattern: /#\{[^}]+\}/, + alias: 'variable' +}; Prism.languages.coffeescript = Prism.languages.extend('javascript', { 'comment': comment, diff --git a/components/prism-core.js b/components/prism-core.js index 9a75c71741..a394de6bc4 100644 --- a/components/prism-core.js +++ b/components/prism-core.js @@ -426,8 +426,8 @@ var _ = { if (o.hasOwnProperty(i)) { callback.call(o, i, o[i], type || i); - var property = o[i], - propertyType = _.util.type(property); + var property = o[i]; + var propertyType = _.util.type(property); if (propertyType === 'Object' && !visited[objId(property)]) { visited[objId(property)] = true; @@ -972,6 +972,7 @@ function matchGrammar(text, tokenList, grammar, startNode, startPos, rematch) { } } + // eslint-disable-next-line no-redeclare var from = match.index, matchStr = match[0], before = str.slice(0, from), diff --git a/components/prism-js-templates.js b/components/prism-js-templates.js index d4b9f69b75..ac34b95812 100644 --- a/components/prism-js-templates.js +++ b/components/prism-js-templates.js @@ -170,7 +170,7 @@ var interpolationExpression = token.content; var placeholder; - while (code.indexOf(placeholder = getPlaceholder(placeholderCounter++, language)) !== -1) { } + while (code.indexOf(placeholder = getPlaceholder(placeholderCounter++, language)) !== -1) { /* noop */ } placeholderMap[placeholder] = interpolationExpression; return placeholder; } diff --git a/components/prism-naniscript.js b/components/prism-naniscript.js index 8f63e5356b..406d17e014 100644 --- a/components/prism-naniscript.js +++ b/components/prism-naniscript.js @@ -151,7 +151,7 @@ } } return stack.length === 0; - }; + } /** * @param {string | Token | (string | Token)[]} token diff --git a/components/prism-nsis.js b/components/prism-nsis.js index 563700adf1..60c34b88c4 100644 --- a/components/prism-nsis.js +++ b/components/prism-nsis.js @@ -16,7 +16,7 @@ pattern: /(^\s*)(?:Abort|Add(?:BrandingImage|Size)|AdvSplash|Allow(?:RootDirInstall|SkipFiles)|AutoCloseWindow|Banner|BG(?:Font|Gradient|Image)|BrandingText|BringToFront|Call(?:InstDLL)?|Caption|ChangeUI|CheckBitmap|ClearErrors|CompletedText|ComponentText|CopyFiles|CRCCheck|Create(?:Directory|Font|ShortCut)|Delete(?:INISec|INIStr|RegKey|RegValue)?|Detail(?:Print|sButtonText)|Dialer|Dir(?:Text|Var|Verify)|EnableWindow|Enum(?:RegKey|RegValue)|Exch|Exec(?:Shell(?:Wait)?|Wait)?|ExpandEnvStrings|File(?:BufSize|Close|ErrorText|Open|Read|ReadByte|ReadUTF16LE|ReadWord|WriteUTF16LE|Seek|Write|WriteByte|WriteWord)?|Find(?:Close|First|Next|Window)|FlushINI|Get(?:CurInstType|CurrentAddress|DlgItem|DLLVersion(?:Local)?|ErrorLevel|FileTime(?:Local)?|FullPathName|Function(?:Address|End)?|InstDirError|LabelAddress|TempFileName)|Goto|HideWindow|Icon|If(?:Abort|Errors|FileExists|RebootFlag|Silent)|InitPluginsDir|Install(?:ButtonText|Colors|Dir(?:RegKey)?)|InstProgressFlags|Inst(?:Type(?:GetText|SetText)?)|Int(?:64|Ptr)?CmpU?|Int(?:64)?Fmt|Int(?:Ptr)?Op|IsWindow|Lang(?:DLL|String)|License(?:BkColor|Data|ForceSelection|LangString|Text)|LoadLanguageFile|LockWindow|Log(?:Set|Text)|Manifest(?:DPIAware|SupportedOS)|Math|MessageBox|MiscButtonText|Name|Nop|ns(?:Dialogs|Exec)|NSISdl|OutFile|Page(?:Callbacks)?|PE(?:DllCharacteristics|SubsysVer)|Pop|Push|Quit|Read(?:EnvStr|INIStr|RegDWORD|RegStr)|Reboot|RegDLL|Rename|RequestExecutionLevel|ReserveFile|Return|RMDir|SearchPath|Section(?:End|GetFlags|GetInstTypes|GetSize|GetText|Group|In|SetFlags|SetInstTypes|SetSize|SetText)?|SendMessage|Set(?:AutoClose|BrandingImage|Compress|Compressor(?:DictSize)?|CtlColors|CurInstType|DatablockOptimize|DateSave|Details(?:Print|View)|ErrorLevel|Errors|FileAttributes|Font|OutPath|Overwrite|PluginUnload|RebootFlag|RegView|ShellVarContext|Silent)|Show(?:InstDetails|UninstDetails|Window)|Silent(?:Install|UnInstall)|Sleep|SpaceTexts|Splash|StartMenu|Str(?:CmpS?|Cpy|Len)|SubCaption|System|Unicode|Uninstall(?:ButtonText|Caption|Icon|SubCaption|Text)|UninstPage|UnRegDLL|UserInfo|Var|VI(?:AddVersionKey|FileVersion|ProductVersion)|VPatch|WindowIcon|Write(?:INIStr|Reg(?:Bin|DWORD|ExpandStr|MultiStr|None|Str)|Uninstaller)|XPStyle)\b/m, lookbehind: true }, - 'property': /\b(?:admin|all|auto|both|colored|false|force|hide|highest|lastused|leave|listonly|none|normal|notset|off|on|open|print|show|silent|silentlog|smooth|textonly|true|user|ARCHIVE|FILE_(?:ATTRIBUTE_ARCHIVE|ATTRIBUTE_NORMAL|ATTRIBUTE_OFFLINE|ATTRIBUTE_READONLY|ATTRIBUTE_SYSTEM|ATTRIBUTE_TEMPORARY)|HK(?:(?:CR|CU|LM)(?:32|64)?|DD|PD|U)|HKEY_(?:CLASSES_ROOT|CURRENT_CONFIG|CURRENT_USER|DYN_DATA|LOCAL_MACHINE|PERFORMANCE_DATA|USERS)|ID(?:ABORT|CANCEL|IGNORE|NO|OK|RETRY|YES)|MB_(?:ABORTRETRYIGNORE|DEFBUTTON1|DEFBUTTON2|DEFBUTTON3|DEFBUTTON4|ICONEXCLAMATION|ICONINFORMATION|ICONQUESTION|ICONSTOP|OK|OKCANCEL|RETRYCANCEL|RIGHT|RTLREADING|SETFOREGROUND|TOPMOST|USERICON|YESNO)|NORMAL|OFFLINE|READONLY|SHCTX|SHELL_CONTEXT|SYSTEM|TEMPORARY)\b/, + 'property': /\b(?:admin|all|auto|both|colored|false|force|hide|highest|lastused|leave|listonly|none|normal|notset|off|on|open|print|show|silent|silentlog|smooth|textonly|true|user|ARCHIVE|FILE_(?:ATTRIBUTE_ARCHIVE|ATTRIBUTE_NORMAL|ATTRIBUTE_OFFLINE|ATTRIBUTE_READONLY|ATTRIBUTE_SYSTEM|ATTRIBUTE_TEMPORARY)|HK(?:(?:CR|CU|LM)(?:32|64)?|DD|PD|U)|HKEY_(?:CLASSES_ROOT|CURRENT_CONFIG|CURRENT_USER|DYN_DATA|LOCAL_MACHINE|PERFORMANCE_DATA|USERS)|ID(?:ABORT|CANCEL|IGNORE|NO|OK|RETRY|YES)|MB_(?:ABORTRETRYIGNORE|DEFBUTTON1|DEFBUTTON2|DEFBUTTON3|DEFBUTTON4|ICONEXCLAMATION|ICONINFORMATION|ICONQUESTION|ICONSTOP|OK|OKCANCEL|RETRYCANCEL|RIGHT|RTLREADING|SETFOREGROUND|TOPMOST|USERICON|YESNO)|NORMAL|OFFLINE|READONLY|SHCTX|SHELL_CONTEXT|SYSTEM|TEMPORARY)\b/, 'constant': /\${[\w\.:\^-]+}|\$\([\w\.:\^-]+\)/i, 'variable': /\$\w+/i, 'number': /\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/, diff --git a/components/prism-openqasm.js b/components/prism-openqasm.js index 90048a90f8..9d24deb96f 100644 --- a/components/prism-openqasm.js +++ b/components/prism-openqasm.js @@ -11,7 +11,7 @@ Prism.languages.openqasm = { 'class-name': /\b(?:angle|bit|bool|creg|fixed|float|int|length|qreg|qubit|stretch|uint)\b/, 'function': /\b(?:sin|cos|tan|exp|ln|sqrt|rotl|rotr|popcount)\b(?=\s*\()/, - 'constant': /\b(?:pi|tau|euler)\b|[π𝜏ℇ]/, + 'constant': /\b(?:pi|tau|euler)\b|π|𝜏|ℇ/, 'number': { pattern: /(^|[^.\w$])(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?(?:dt|ns|us|µs|ms|s)?/i, lookbehind: true diff --git a/components/prism-openqasm.min.js b/components/prism-openqasm.min.js index 695a80832b..ff18c65930 100644 --- a/components/prism-openqasm.min.js +++ b/components/prism-openqasm.min.js @@ -1 +1 @@ -Prism.languages.openqasm={comment:/\/\*[\s\S]*?\*\/|\/\/.*/,string:{pattern:/"[^"\r\n\t]*"|'[^'\r\n\t]*'/,greedy:!0},keyword:/\b(?:barrier|boxas|boxto|break|const|continue|ctrl|def|defcal|defcalgrammar|delay|else|end|for|gate|gphase|if|in|include|inv|kernel|lengthof|let|measure|pow|reset|return|rotary|stretchinf|while|CX|OPENQASM|U)\b|#pragma\b/,"class-name":/\b(?:angle|bit|bool|creg|fixed|float|int|length|qreg|qubit|stretch|uint)\b/,function:/\b(?:sin|cos|tan|exp|ln|sqrt|rotl|rotr|popcount)\b(?=\s*\()/,constant:/\b(?:pi|tau|euler)\b|[π𝜏ℇ]/,number:{pattern:/(^|[^.\w$])(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?(?:dt|ns|us|µs|ms|s)?/i,lookbehind:!0},operator:/->|>>=?|<<=?|&&|\|\||\+\+|--|[!=<>&|~^+\-*/%]=?|@/,punctuation:/[(){}\[\];,:.]/},Prism.languages.qasm=Prism.languages.openqasm; \ No newline at end of file +Prism.languages.openqasm={comment:/\/\*[\s\S]*?\*\/|\/\/.*/,string:{pattern:/"[^"\r\n\t]*"|'[^'\r\n\t]*'/,greedy:!0},keyword:/\b(?:barrier|boxas|boxto|break|const|continue|ctrl|def|defcal|defcalgrammar|delay|else|end|for|gate|gphase|if|in|include|inv|kernel|lengthof|let|measure|pow|reset|return|rotary|stretchinf|while|CX|OPENQASM|U)\b|#pragma\b/,"class-name":/\b(?:angle|bit|bool|creg|fixed|float|int|length|qreg|qubit|stretch|uint)\b/,function:/\b(?:sin|cos|tan|exp|ln|sqrt|rotl|rotr|popcount)\b(?=\s*\()/,constant:/\b(?:pi|tau|euler)\b|π|𝜏|ℇ/,number:{pattern:/(^|[^.\w$])(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?(?:dt|ns|us|µs|ms|s)?/i,lookbehind:!0},operator:/->|>>=?|<<=?|&&|\|\||\+\+|--|[!=<>&|~^+\-*/%]=?|@/,punctuation:/[(){}\[\];,:.]/},Prism.languages.qasm=Prism.languages.openqasm; \ No newline at end of file diff --git a/components/prism-parser.js b/components/prism-parser.js index 059ea819a3..0502b76d0c 100644 --- a/components/prism-parser.js +++ b/components/prism-parser.js @@ -58,7 +58,7 @@ } }); - parser = Prism.languages.insertBefore('inside', 'punctuation', { + Prism.languages.insertBefore('inside', 'punctuation', { 'expression': parser.expression, 'keyword': parser.keyword, 'variable': parser.variable, diff --git a/components/prism-parser.min.js b/components/prism-parser.min.js index 63c8203657..640f4de706 100644 --- a/components/prism-parser.min.js +++ b/components/prism-parser.min.js @@ -1 +1 @@ -!function(e){var n=e.languages.parser=e.languages.extend("markup",{keyword:{pattern:/(^|[^^])(?:\^(?:case|eval|for|if|switch|throw)\b|@(?:BASE|CLASS|GET(?:_DEFAULT)?|OPTIONS|SET_DEFAULT|USE)\b)/,lookbehind:!0},variable:{pattern:/(^|[^^])\B\$(?:\w+|(?=[.{]))(?:(?:\.|::?)\w+)*(?:\.|::?)?/,lookbehind:!0,inside:{punctuation:/\.|:+/}},function:{pattern:/(^|[^^])\B[@^]\w+(?:(?:\.|::?)\w+)*(?:\.|::?)?/,lookbehind:!0,inside:{keyword:{pattern:/(^@)(?:GET_|SET_)/,lookbehind:!0},punctuation:/\.|:+/}},escape:{pattern:/\^(?:[$^;@()\[\]{}"':]|#[a-f\d]*)/i,alias:"builtin"},punctuation:/[\[\](){};]/});n=e.languages.insertBefore("parser","keyword",{"parser-comment":{pattern:/(\s)#.*/,lookbehind:!0,alias:"comment"},expression:{pattern:/(^|[^^])\((?:[^()]|\((?:[^()]|\((?:[^()])*\))*\))*\)/,greedy:!0,lookbehind:!0,inside:{string:{pattern:/(^|[^^])(["'])(?:(?!\2)[^^]|\^[\s\S])*\2/,lookbehind:!0},keyword:n.keyword,variable:n.variable,function:n.function,boolean:/\b(?:true|false)\b/,number:/\b(?:0x[a-f\d]+|\d+(?:\.\d*)?(?:e[+-]?\d+)?)\b/i,escape:n.escape,operator:/[~+*\/\\%]|!(?:\|\|?|=)?|&&?|\|\|?|==|<[<=]?|>[>=]?|-[fd]?|\b(?:def|eq|ge|gt|in|is|le|lt|ne)\b/,punctuation:n.punctuation}}}),n=e.languages.insertBefore("inside","punctuation",{expression:n.expression,keyword:n.keyword,variable:n.variable,function:n.function,escape:n.escape,"parser-punctuation":{pattern:n.punctuation,alias:"punctuation"}},n.tag.inside["attr-value"])}(Prism); \ No newline at end of file +!function(e){var n=e.languages.parser=e.languages.extend("markup",{keyword:{pattern:/(^|[^^])(?:\^(?:case|eval|for|if|switch|throw)\b|@(?:BASE|CLASS|GET(?:_DEFAULT)?|OPTIONS|SET_DEFAULT|USE)\b)/,lookbehind:!0},variable:{pattern:/(^|[^^])\B\$(?:\w+|(?=[.{]))(?:(?:\.|::?)\w+)*(?:\.|::?)?/,lookbehind:!0,inside:{punctuation:/\.|:+/}},function:{pattern:/(^|[^^])\B[@^]\w+(?:(?:\.|::?)\w+)*(?:\.|::?)?/,lookbehind:!0,inside:{keyword:{pattern:/(^@)(?:GET_|SET_)/,lookbehind:!0},punctuation:/\.|:+/}},escape:{pattern:/\^(?:[$^;@()\[\]{}"':]|#[a-f\d]*)/i,alias:"builtin"},punctuation:/[\[\](){};]/});n=e.languages.insertBefore("parser","keyword",{"parser-comment":{pattern:/(\s)#.*/,lookbehind:!0,alias:"comment"},expression:{pattern:/(^|[^^])\((?:[^()]|\((?:[^()]|\((?:[^()])*\))*\))*\)/,greedy:!0,lookbehind:!0,inside:{string:{pattern:/(^|[^^])(["'])(?:(?!\2)[^^]|\^[\s\S])*\2/,lookbehind:!0},keyword:n.keyword,variable:n.variable,function:n.function,boolean:/\b(?:true|false)\b/,number:/\b(?:0x[a-f\d]+|\d+(?:\.\d*)?(?:e[+-]?\d+)?)\b/i,escape:n.escape,operator:/[~+*\/\\%]|!(?:\|\|?|=)?|&&?|\|\|?|==|<[<=]?|>[>=]?|-[fd]?|\b(?:def|eq|ge|gt|in|is|le|lt|ne)\b/,punctuation:n.punctuation}}}),e.languages.insertBefore("inside","punctuation",{expression:n.expression,keyword:n.keyword,variable:n.variable,function:n.function,escape:n.escape,"parser-punctuation":{pattern:n.punctuation,alias:"punctuation"}},n.tag.inside["attr-value"])}(Prism); \ No newline at end of file diff --git a/components/prism-pure.js b/components/prism-pure.js index c916365da3..accfac46e4 100644 --- a/components/prism-pure.js +++ b/components/prism-pure.js @@ -44,6 +44,7 @@ alias: 'builtin' }, // Any combination of operator chars can be an operator + // eslint-disable-next-line no-misleading-character-class 'operator': /(?:[!"#$%&'*+,\-.\/:<=>?@\\^`|~\u00a1-\u00bf\u00d7-\u00f7\u20d0-\u2bff]|\b_+\b)+|\b(?:and|div|mod|not|or)\b/, // FIXME: How can we prevent | and , to be highlighted as operator when they are used alone? 'punctuation': /[(){}\[\];,|]/ diff --git a/components/prism-robotframework.js b/components/prism-robotframework.js index df925ff3be..8e043452eb 100644 --- a/components/prism-robotframework.js +++ b/components/prism-robotframework.js @@ -28,7 +28,7 @@ } extendecInside['tag'] = { - pattern: /([\r\n](?: |\t)[ \t]*)\[[-\w]+\]/, + pattern: /([\r\n](?: {2}|\t)[ \t]*)\[[-\w]+\]/, lookbehind: true, inside: { 'punctuation': /\[|\]/ @@ -46,7 +46,7 @@ var docTag = { - pattern: /(\[Documentation\](?: |\t)[ \t]*)(?![ \t]|#)(?:.|(?:\r\n?|\n)[ \t]*\.{3})+/, + pattern: /(\[Documentation\](?: {2}|\t)[ \t]*)(?![ \t]|#)(?:.|(?:\r\n?|\n)[ \t]*\.{3})+/, lookbehind: true, alias: 'string' }; @@ -61,7 +61,7 @@ }; var testPropertyLike = { - pattern: /([\r\n](?: |\t)[ \t]*)(?!\[|\.{3}|#)(?:\S(?:[ \t]\S)*)+/, + pattern: /([\r\n](?: {2}|\t)[ \t]*)(?!\[|\.{3}|#)(?:\S(?:[ \t]\S)*)+/, lookbehind: true, inside: { 'variable': variable @@ -71,7 +71,7 @@ Prism.languages['robotframework'] = { 'settings': createSection('Settings', { 'documentation': { - pattern: /([\r\n] ?Documentation(?: |\t)[ \t]*)(?![ \t]|#)(?:.|(?:\r\n?|\n)[ \t]*\.{3})+/, + pattern: /([\r\n] ?Documentation(?: {2}|\t)[ \t]*)(?![ \t]|#)(?:.|(?:\r\n?|\n)[ \t]*\.{3})+/, lookbehind: true, alias: 'string' }, diff --git a/components/prism-robotframework.min.js b/components/prism-robotframework.min.js index 0e388aa70c..bfaec75744 100644 --- a/components/prism-robotframework.min.js +++ b/components/prism-robotframework.min.js @@ -1 +1 @@ -!function(t){var r={pattern:/(^[ \t]*| {2}|\t)#.*/m,lookbehind:!0,greedy:!0},o={pattern:/((?:^|[^\\])(?:\\{2})*)[$@&%]\{(?:[^{}\r\n]|\{[^{}\r\n]*\})*\}/,lookbehind:!0,inside:{punctuation:/^[$@&%]\{|\}$/}};function n(t,n){var e={"section-header":{pattern:/^ ?\*{3}.+?\*{3}/,alias:"keyword"}};for(var a in n)e[a]=n[a];return e.tag={pattern:/([\r\n](?: |\t)[ \t]*)\[[-\w]+\]/,lookbehind:!0,inside:{punctuation:/\[|\]/}},e.variable=o,e.comment=r,{pattern:RegExp("^ ?\\*{3}[ \t]*[ \t]*\\*{3}(?:.|[\r\n](?!\\*{3}))*".replace(//g,function(){return t}),"im"),alias:"section",inside:e}}var e={pattern:/(\[Documentation\](?: |\t)[ \t]*)(?![ \t]|#)(?:.|(?:\r\n?|\n)[ \t]*\.{3})+/,lookbehind:!0,alias:"string"},a={pattern:/([\r\n] ?)(?!#)(?:\S(?:[ \t]\S)*)+/,lookbehind:!0,alias:"function",inside:{variable:o}},i={pattern:/([\r\n](?: |\t)[ \t]*)(?!\[|\.{3}|#)(?:\S(?:[ \t]\S)*)+/,lookbehind:!0,inside:{variable:o}};t.languages.robotframework={settings:n("Settings",{documentation:{pattern:/([\r\n] ?Documentation(?: |\t)[ \t]*)(?![ \t]|#)(?:.|(?:\r\n?|\n)[ \t]*\.{3})+/,lookbehind:!0,alias:"string"},property:{pattern:/([\r\n] ?)(?!\.{3}|#)(?:\S(?:[ \t]\S)*)+/,lookbehind:!0}}),variables:n("Variables"),"test-cases":n("Test Cases",{"test-name":a,documentation:e,property:i}),keywords:n("Keywords",{"keyword-name":a,documentation:e,property:i}),tasks:n("Tasks",{"task-name":a,documentation:e,property:i}),comment:r},t.languages.robot=t.languages.robotframework}(Prism); \ No newline at end of file +!function(t){var r={pattern:/(^[ \t]*| {2}|\t)#.*/m,lookbehind:!0,greedy:!0},o={pattern:/((?:^|[^\\])(?:\\{2})*)[$@&%]\{(?:[^{}\r\n]|\{[^{}\r\n]*\})*\}/,lookbehind:!0,inside:{punctuation:/^[$@&%]\{|\}$/}};function n(t,n){var e={"section-header":{pattern:/^ ?\*{3}.+?\*{3}/,alias:"keyword"}};for(var a in n)e[a]=n[a];return e.tag={pattern:/([\r\n](?: {2}|\t)[ \t]*)\[[-\w]+\]/,lookbehind:!0,inside:{punctuation:/\[|\]/}},e.variable=o,e.comment=r,{pattern:RegExp("^ ?\\*{3}[ \t]*[ \t]*\\*{3}(?:.|[\r\n](?!\\*{3}))*".replace(//g,function(){return t}),"im"),alias:"section",inside:e}}var e={pattern:/(\[Documentation\](?: {2}|\t)[ \t]*)(?![ \t]|#)(?:.|(?:\r\n?|\n)[ \t]*\.{3})+/,lookbehind:!0,alias:"string"},a={pattern:/([\r\n] ?)(?!#)(?:\S(?:[ \t]\S)*)+/,lookbehind:!0,alias:"function",inside:{variable:o}},i={pattern:/([\r\n](?: {2}|\t)[ \t]*)(?!\[|\.{3}|#)(?:\S(?:[ \t]\S)*)+/,lookbehind:!0,inside:{variable:o}};t.languages.robotframework={settings:n("Settings",{documentation:{pattern:/([\r\n] ?Documentation(?: {2}|\t)[ \t]*)(?![ \t]|#)(?:.|(?:\r\n?|\n)[ \t]*\.{3})+/,lookbehind:!0,alias:"string"},property:{pattern:/([\r\n] ?)(?!\.{3}|#)(?:\S(?:[ \t]\S)*)+/,lookbehind:!0}}),variables:n("Variables"),"test-cases":n("Test Cases",{"test-name":a,documentation:e,property:i}),keywords:n("Keywords",{"keyword-name":a,documentation:e,property:i}),tasks:n("Tasks",{"task-name":a,documentation:e,property:i}),comment:r},t.languages.robot=t.languages.robotframework}(Prism); \ No newline at end of file diff --git a/dependencies.js b/dependencies.js index 8b8a85c989..7eeb8d15bc 100644 --- a/dependencies.js +++ b/dependencies.js @@ -224,8 +224,8 @@ var getLoader = (function () { * @template T */ function loadComponentsInOrder(dependencyResolver, ids, loadComponent, chainer) { - const series = chainer ? chainer.series : undefined; - const parallel = chainer ? chainer.parallel : noop; + var series = chainer ? chainer.series : undefined; + var parallel = chainer ? chainer.parallel : noop; /** @type {Object} */ var cache = {}; diff --git a/docs/global.html b/docs/global.html index afcfd9f0e6..4dc4720ff8 100644 --- a/docs/global.html +++ b/docs/global.html @@ -143,7 +143,7 @@

          Grammar

          Source:
          @@ -274,7 +274,7 @@

          GrammarToken

          Source:
          @@ -559,7 +559,7 @@

          High
          Source:
          @@ -713,7 +713,7 @@

          HookCallb
          Source:
          diff --git a/docs/prism-core.js.html b/docs/prism-core.js.html index 53f95c1263..b98ec14d2a 100644 --- a/docs/prism-core.js.html +++ b/docs/prism-core.js.html @@ -479,8 +479,8 @@

          prism-core.js

          if (o.hasOwnProperty(i)) { callback.call(o, i, o[i], type || i); - var property = o[i], - propertyType = _.util.type(property); + var property = o[i]; + var propertyType = _.util.type(property); if (propertyType === 'Object' && !visited[objId(property)]) { visited[objId(property)] = true; @@ -1025,6 +1025,7 @@

          prism-core.js

          } } + // eslint-disable-next-line no-redeclare var from = match.index, matchStr = match[0], before = str.slice(0, from), diff --git a/gulpfile.js/index.js b/gulpfile.js/index.js index f2412c6f5e..048b290ea6 100644 --- a/gulpfile.js/index.js +++ b/gulpfile.js/index.js @@ -34,7 +34,7 @@ function inlineRegexSource() { /\/((?:[^\n\r[\\\/]|\\.|\[(?:[^\n\r\\\]]|\\.)*\])+)\/\s*\.\s*source\b/g, (m, source) => { // escape backslashes - source = source.replace(/\\(.)|\[(\\s\\S|\\S\\s)\]/g, function (m, g1, g2) { + source = source.replace(/\\(.)|\[(?:\\s\\S|\\S\\s)\]/g, function (m, g1) { if (g1) { // characters like /\n/ can just be kept as "\n" instead of being escaped to "\\n" if (/[nrt0/]/.test(g1)) { diff --git a/package-lock.json b/package-lock.json index a93c8168f6..38c7480af1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4,6 +4,32 @@ "lockfileVersion": 1, "requires": true, "dependencies": { + "@babel/code-frame": { + "version": "7.12.11", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.11.tgz", + "integrity": "sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw==", + "dev": true, + "requires": { + "@babel/highlight": "^7.10.4" + } + }, + "@babel/helper-validator-identifier": { + "version": "7.12.11", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.12.11.tgz", + "integrity": "sha512-np/lG3uARFybkoHokJUmf1QfEvRVCPbmQeUQpKow5cQ3xWrV9i3rUHodKDJPQfTVX61qKi+UdYk8kik84n7XOw==", + "dev": true + }, + "@babel/highlight": { + "version": "7.13.10", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.13.10.tgz", + "integrity": "sha512-5aPpe5XQPzflQrFwL1/QoeHkP2MsA4JCntcXHRhEsdsfPVkvPi2w7Qix4iV7t5S/oC9OodGrggd8aco1g3SZFg==", + "dev": true, + "requires": { + "@babel/helper-validator-identifier": "^7.12.11", + "chalk": "^2.0.0", + "js-tokens": "^4.0.0" + } + }, "@babel/parser": { "version": "7.10.3", "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.10.3.tgz", @@ -20,6 +46,89 @@ "regenerator-runtime": "^0.13.4" } }, + "@eslint/eslintrc": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.4.0.tgz", + "integrity": "sha512-2ZPCc+uNbjV5ERJr+aKSPRwZgKd2z11x0EgLvb1PURmUrn9QNRXFqje0Ldq454PfAVyaJYyrDvvIKSFP4NnBog==", + "dev": true, + "requires": { + "ajv": "^6.12.4", + "debug": "^4.1.1", + "espree": "^7.3.0", + "globals": "^12.1.0", + "ignore": "^4.0.6", + "import-fresh": "^3.2.1", + "js-yaml": "^3.13.1", + "minimatch": "^3.0.4", + "strip-json-comments": "^3.1.1" + }, + "dependencies": { + "ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "requires": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "debug": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true + }, + "globals": { + "version": "12.4.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-12.4.0.tgz", + "integrity": "sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg==", + "dev": true, + "requires": { + "type-fest": "^0.8.1" + } + }, + "import-fresh": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "dev": true, + "requires": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true + }, + "strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true + } + } + }, "@mrmlnc/readdir-enhanced": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/@mrmlnc/readdir-enhanced/-/readdir-enhanced-2.2.1.tgz", @@ -279,6 +388,12 @@ "acorn-walk": "^6.0.1" } }, + "acorn-jsx": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.1.tgz", + "integrity": "sha512-K0Ptm/47OKfQRpNQ2J/oIN/3QYiK6FwW+eJbILhsdxh2WTLdl+30o8aGdTbm5JbffpFFAg/g+zi1E+jvJha5ng==", + "dev": true + }, "acorn-walk": { "version": "6.1.1", "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-6.1.1.tgz", @@ -553,6 +668,12 @@ "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=", "dev": true }, + "astral-regex": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", + "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", + "dev": true + }, "async": { "version": "2.6.3", "resolved": "https://registry.npmjs.org/async/-/async-2.6.3.tgz", @@ -1602,6 +1723,15 @@ "integrity": "sha512-IYZbgYthPTspgqYeciRJNPhSwL51yer7HAwDXhF5p+H7mTDbPvY3PCk/QDjNxdPCpWkaJVFC4t7iCNB/t9E5Kw==", "dev": true }, + "doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "dev": true, + "requires": { + "esutils": "^2.0.2" + } + }, "dom-serializer": { "version": "0.2.2", "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.2.2.tgz", @@ -1735,6 +1865,23 @@ "once": "^1.4.0" } }, + "enquirer": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", + "integrity": "sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==", + "dev": true, + "requires": { + "ansi-colors": "^4.1.1" + }, + "dependencies": { + "ansi-colors": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", + "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", + "dev": true + } + } + }, "entities": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/entities/-/entities-2.0.0.tgz", @@ -1862,12 +2009,362 @@ } } }, + "eslint": { + "version": "7.22.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.22.0.tgz", + "integrity": "sha512-3VawOtjSJUQiiqac8MQc+w457iGLfuNGLFn8JmF051tTKbh5/x/0vlcEj8OgDCaw7Ysa2Jn8paGshV7x2abKXg==", + "dev": true, + "requires": { + "@babel/code-frame": "7.12.11", + "@eslint/eslintrc": "^0.4.0", + "ajv": "^6.10.0", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.0.1", + "doctrine": "^3.0.0", + "enquirer": "^2.3.5", + "eslint-scope": "^5.1.1", + "eslint-utils": "^2.1.0", + "eslint-visitor-keys": "^2.0.0", + "espree": "^7.3.1", + "esquery": "^1.4.0", + "esutils": "^2.0.2", + "file-entry-cache": "^6.0.1", + "functional-red-black-tree": "^1.0.1", + "glob-parent": "^5.0.0", + "globals": "^13.6.0", + "ignore": "^4.0.6", + "import-fresh": "^3.0.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "js-yaml": "^3.13.1", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.4.1", + "lodash": "^4.17.21", + "minimatch": "^3.0.4", + "natural-compare": "^1.4.0", + "optionator": "^0.9.1", + "progress": "^2.0.0", + "regexpp": "^3.1.0", + "semver": "^7.2.1", + "strip-ansi": "^6.0.0", + "strip-json-comments": "^3.1.0", + "table": "^6.0.4", + "text-table": "^0.2.0", + "v8-compile-cache": "^2.0.3" + }, + "dependencies": { + "ansi-regex": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", + "dev": true + }, + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", + "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "requires": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + } + }, + "debug": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "requires": { + "is-glob": "^4.0.1" + } + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "import-fresh": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "dev": true, + "requires": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + } + }, + "levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "dev": true, + "requires": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + } + }, + "lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "dev": true + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "optionator": { + "version": "0.9.1", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", + "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", + "dev": true, + "requires": { + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.3" + } + }, + "path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true + }, + "prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "dev": true + }, + "regexpp": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.1.0.tgz", + "integrity": "sha512-ZOIzd8yVsQQA7j8GCSlPGXwg5PfmA1mrq0JP4nGhh54LaKN3xdai/vHUDu74pKwV8OxseMS65u2NImosQcSD0Q==", + "dev": true + }, + "resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true + }, + "semver": { + "version": "7.3.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", + "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } + }, + "shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "requires": { + "shebang-regex": "^3.0.0" + } + }, + "shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true + }, + "strip-ansi": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "dev": true, + "requires": { + "ansi-regex": "^5.0.0" + } + }, + "strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + }, + "type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "dev": true, + "requires": { + "prelude-ls": "^1.2.1" + } + }, + "which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + } + } + }, + "eslint-scope": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", + "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", + "dev": true, + "requires": { + "esrecurse": "^4.3.0", + "estraverse": "^4.1.1" + } + }, + "eslint-utils": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", + "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", + "dev": true, + "requires": { + "eslint-visitor-keys": "^1.1.0" + }, + "dependencies": { + "eslint-visitor-keys": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", + "dev": true + } + } + }, + "eslint-visitor-keys": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.0.0.tgz", + "integrity": "sha512-QudtT6av5WXels9WjIM7qz1XD1cWGvX4gGXvp/zBn9nXG02D0utdU3Em2m/QjTnrsk6bBjmCygl3rmj118msQQ==", + "dev": true + }, + "espree": { + "version": "7.3.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-7.3.1.tgz", + "integrity": "sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g==", + "dev": true, + "requires": { + "acorn": "^7.4.0", + "acorn-jsx": "^5.3.1", + "eslint-visitor-keys": "^1.3.0" + }, + "dependencies": { + "acorn": { + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", + "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", + "dev": true + }, + "eslint-visitor-keys": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", + "dev": true + } + } + }, "esprima": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/esprima/-/esprima-3.1.3.tgz", "integrity": "sha1-/cpRzuYTOJXjyI1TXOSdv/YqRjM=", "dev": true }, + "esquery": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz", + "integrity": "sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==", + "dev": true, + "requires": { + "estraverse": "^5.1.0" + }, + "dependencies": { + "estraverse": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", + "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", + "dev": true + } + } + }, + "esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "requires": { + "estraverse": "^5.2.0" + }, + "dependencies": { + "estraverse": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", + "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", + "dev": true + } + } + }, "estraverse": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz", @@ -2116,6 +2613,15 @@ "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", "dev": true }, + "file-entry-cache": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", + "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", + "dev": true, + "requires": { + "flat-cache": "^3.0.4" + } + }, "file-uri-to-path": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", @@ -2204,6 +2710,33 @@ } } }, + "flat-cache": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", + "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", + "dev": true, + "requires": { + "flatted": "^3.1.0", + "rimraf": "^3.0.2" + }, + "dependencies": { + "rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + } + } + }, + "flatted": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.1.1.tgz", + "integrity": "sha512-zAoAQiudy+r5SvnSw3KJy5os/oRJYHzrzja/tBDqrZtNhUw8bt6y8OBzMWcjWr+8liV8Eb6yOhw8WZ7VFZ5ZzA==", + "dev": true + }, "flush-write-stream": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/flush-write-stream/-/flush-write-stream-1.1.1.tgz", @@ -2311,6 +2844,12 @@ "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", "dev": true }, + "functional-red-black-tree": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", + "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", + "dev": true + }, "geometry-interfaces": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/geometry-interfaces/-/geometry-interfaces-1.1.4.tgz", @@ -2506,6 +3045,23 @@ "which": "^1.2.14" } }, + "globals": { + "version": "13.7.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.7.0.tgz", + "integrity": "sha512-Aipsz6ZKRxa/xQkZhNg0qIWXT6x6rD46f6x/PCnBomlttdIyAPak4YD9jTmKpZ72uROSMU87qJtcgpgHaVchiA==", + "dev": true, + "requires": { + "type-fest": "^0.20.2" + }, + "dependencies": { + "type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true + } + } + }, "globby": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/globby/-/globby-6.1.0.tgz", @@ -2992,6 +3548,12 @@ } } }, + "imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", + "dev": true + }, "indent-string": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-3.2.0.tgz", @@ -3346,6 +3908,12 @@ "textextensions": "2" } }, + "js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true + }, "js-yaml": { "version": "3.13.1", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", @@ -3868,6 +4436,15 @@ "signal-exit": "^3.0.0" } }, + "lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "requires": { + "yallist": "^4.0.0" + } + }, "macos-release": { "version": "2.4.1", "resolved": "https://registry.npmjs.org/macos-release/-/macos-release-2.4.1.tgz", @@ -4405,6 +4982,12 @@ "to-regex": "^3.0.1" } }, + "natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", + "dev": true + }, "neatequal": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/neatequal/-/neatequal-1.0.0.tgz", @@ -4887,6 +5470,23 @@ "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==", "dev": true }, + "parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "requires": { + "callsites": "^3.0.0" + }, + "dependencies": { + "callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true + } + } + }, "parse-diff": { "version": "0.7.1", "resolved": "https://registry.npmjs.org/parse-diff/-/parse-diff-0.7.1.tgz", @@ -5193,6 +5793,12 @@ "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", "dev": true }, + "progress": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", + "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", + "dev": true + }, "psl": { "version": "1.1.31", "resolved": "https://registry.npmjs.org/psl/-/psl-1.1.31.tgz", @@ -5801,6 +6407,49 @@ "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==", "dev": true }, + "slice-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", + "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", + "dev": true, + "requires": { + "ansi-styles": "^4.0.0", + "astral-regex": "^2.0.0", + "is-fullwidth-code-point": "^3.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true + } + } + }, "snapdragon": { "version": "0.8.2", "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", @@ -6238,12 +6887,100 @@ "integrity": "sha1-rifbOPZgp64uHDt9G8KQgZuFGeY=", "dev": true }, + "table": { + "version": "6.0.7", + "resolved": "https://registry.npmjs.org/table/-/table-6.0.7.tgz", + "integrity": "sha512-rxZevLGTUzWna/qBLObOe16kB2RTnnbhciwgPbMMlazz1yZGVEgnZK762xyVdVznhqxrfCeBMmMkgOOaPwjH7g==", + "dev": true, + "requires": { + "ajv": "^7.0.2", + "lodash": "^4.17.20", + "slice-ansi": "^4.0.0", + "string-width": "^4.2.0" + }, + "dependencies": { + "ajv": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-7.2.3.tgz", + "integrity": "sha512-idv5WZvKVXDqKralOImQgPM9v6WOdLNa0IY3B3doOjw/YxRGT8I+allIJ6kd7Uaj+SF1xZUSU+nPM5aDNBVtnw==", + "dev": true, + "requires": { + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.2.2" + } + }, + "ansi-regex": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", + "dev": true + }, + "emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true + }, + "json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "dev": true + }, + "lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "dev": true + }, + "string-width": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", + "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==", + "dev": true, + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.0" + } + }, + "strip-ansi": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "dev": true, + "requires": { + "ansi-regex": "^5.0.0" + } + } + } + }, "taffydb": { "version": "2.6.2", "resolved": "https://registry.npmjs.org/taffydb/-/taffydb-2.6.2.tgz", "integrity": "sha1-fLy2S1oUG2ou/CxdLGe04VCyomg=", "dev": true }, + "text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", + "dev": true + }, "textextensions": { "version": "2.4.0", "resolved": "https://registry.npmjs.org/textextensions/-/textextensions-2.4.0.tgz", @@ -6434,6 +7171,12 @@ "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", "dev": true }, + "type-fest": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", + "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", + "dev": true + }, "typedarray": { "version": "0.0.6", "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", @@ -6640,6 +7383,12 @@ "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==", "dev": true }, + "v8-compile-cache": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz", + "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==", + "dev": true + }, "v8flags": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/v8flags/-/v8flags-3.1.3.tgz", @@ -6914,6 +7663,12 @@ "execa": "^1.0.0" } }, + "word-wrap": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", + "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", + "dev": true + }, "wordwrap": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", @@ -6997,6 +7752,12 @@ "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=", "dev": true }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, "yargs": { "version": "13.2.2", "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.2.2.tgz", diff --git a/package.json b/package.json index 1c13095f60..c8a9e94463 100755 --- a/package.json +++ b/package.json @@ -7,6 +7,8 @@ "scripts": { "build": "gulp", "start": "http-server -c-1", + "lint": "eslint .", + "lint:fix": "eslint . --fix", "test:aliases": "mocha tests/aliases-test.js", "test:core": "mocha tests/core/**/*.js", "test:dependencies": "mocha tests/dependencies-test.js", @@ -34,6 +36,7 @@ "danger": "^10.5.0", "del": "^4.1.1", "docdash": "^1.2.0", + "eslint": "^7.22.0", "gulp": "^4.0.2", "gulp-concat": "^2.3.4", "gulp-header": "^2.0.7", diff --git a/plugins/autolinker/prism-autolinker.js b/plugins/autolinker/prism-autolinker.js index 51e9a2a820..62cd1e11a3 100644 --- a/plugins/autolinker/prism-autolinker.js +++ b/plugins/autolinker/prism-autolinker.js @@ -71,7 +71,7 @@ Prism.hooks.add('wrap', function(env) { // Silently catch any error thrown by decodeURIComponent (#1186) try { env.content = decodeURIComponent(env.content); - } catch(e) {} + } catch(e) { /* noop */ } } }); diff --git a/plugins/autoloader/prism-autoloader.js b/plugins/autoloader/prism-autoloader.js index 6a54c92ab2..7134d8215b 100644 --- a/plugins/autoloader/prism-autoloader.js +++ b/plugins/autoloader/prism-autoloader.js @@ -443,7 +443,7 @@ languageCallback(lang, 'error'); }); } - }; + } var dependencies = lang_dependencies[lang]; if (dependencies && dependencies.length) { diff --git a/plugins/jsonp-highlight/prism-jsonp-highlight.js b/plugins/jsonp-highlight/prism-jsonp-highlight.js index 27a693e6aa..81d2833961 100644 --- a/plugins/jsonp-highlight/prism-jsonp-highlight.js +++ b/plugins/jsonp-highlight/prism-jsonp-highlight.js @@ -50,6 +50,7 @@ } } else if (typeof adapter === "string") { + // eslint-disable-next-line no-redeclare for (var i = 0, item; item = adapters[i++];) { if (item.name === adapter) { return item.adapter; @@ -78,7 +79,7 @@ } } - registerAdapter(function github(rsp, el) { + registerAdapter(function github(rsp) { if (rsp && rsp.meta && rsp.data) { if (rsp.meta.status && rsp.meta.status >= 400) { return "Error: " + (rsp.data.message || rsp.meta.status); @@ -118,7 +119,7 @@ } return null; }, 'gist'); - registerAdapter(function bitbucket(rsp, el) { + registerAdapter(function bitbucket(rsp) { if (rsp && rsp.node && typeof (rsp.data) === "string") { return rsp.data; } diff --git a/plugins/jsonp-highlight/prism-jsonp-highlight.min.js b/plugins/jsonp-highlight/prism-jsonp-highlight.min.js index fc92a7d71b..dde26c0144 100644 --- a/plugins/jsonp-highlight/prism-jsonp-highlight.min.js +++ b/plugins/jsonp-highlight/prism-jsonp-highlight.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof Prism&&"undefined"!=typeof document){var c=[];t(function(t,e){if(t&&t.meta&&t.data){if(t.meta.status&&400<=t.meta.status)return"Error: "+(t.data.message||t.meta.status);if("string"==typeof t.data.content)return"function"==typeof atob?atob(t.data.content.replace(/\s/g,"")):"Your browser cannot decode base64"}return null},"github"),t(function(t,e){if(t&&t.meta&&t.data&&t.data.files){if(t.meta.status&&400<=t.meta.status)return"Error: "+(t.data.message||t.meta.status);var n=t.data.files,a=e.getAttribute("data-filename");if(null==a)for(var r in n)if(n.hasOwnProperty(r)){a=r;break}return void 0!==n[a]?n[a].content:"Error: unknown or missing gist file "+a}return null},"gist"),t(function(t,e){return t&&t.node&&"string"==typeof t.data?t.data:null},"bitbucket");var m=0,p="data-jsonp-status",g="loading",h="loaded",v="failed",b="pre[data-jsonp]:not(["+p+'="'+h+'"]):not(['+p+'="'+g+'"])';Prism.hooks.add("before-highlightall",function(t){t.selector+=", "+b}),Prism.hooks.add("before-sanity-check",function(t){var r=t.element;if(r.matches(b)){t.code="",r.setAttribute(p,g);var i=r.appendChild(document.createElement("CODE"));i.textContent="Loading…";var e=t.language;i.className="language-"+e;var n=Prism.plugins.autoloader;n&&n.loadLanguages(e);var a=r.getAttribute("data-adapter"),o=null;if(a){if("function"!=typeof window[a])return r.setAttribute(p,v),void(i.textContent=function(t){return'✖ Error: JSONP adapter function "'+t+"\" doesn't exist"}(a));o=window[a]}var u="prismjsonp"+m++,s=document.createElement("a"),d=s.href=r.getAttribute("data-jsonp");s.href+=(s.search?"&":"?")+(r.getAttribute("data-callback")||"callback")+"="+u;var f=setTimeout(function(){r.setAttribute(p,v),i.textContent=function(t){return"✖ Error: Timeout loading "+t}(d)},Prism.plugins.jsonphighlight.timeout),l=document.createElement("script");l.src=s.href,window[u]=function(t){document.head.removeChild(l),clearTimeout(f),delete window[u];var e=null;if(o)e=o(t,r);else for(var n=0,a=c.length;n tag into the tag for (var i = 0; i < children.length; ++i) { diff --git a/plugins/show-invisibles/prism-show-invisibles.js b/plugins/show-invisibles/prism-show-invisibles.js index 735add9df1..152064e3e2 100644 --- a/plugins/show-invisibles/prism-show-invisibles.js +++ b/plugins/show-invisibles/prism-show-invisibles.js @@ -41,6 +41,7 @@ break; default: // 'Object' + // eslint-disable-next-line no-redeclare var inside = value.inside || (value.inside = {}); addInvisibles(inside); break; @@ -64,6 +65,7 @@ } } + // eslint-disable-next-line no-redeclare for (var name in grammar) { if (grammar.hasOwnProperty(name) && !invisibles[name]) { if (name === 'rest') { diff --git a/plugins/toolbar/prism-toolbar.js b/plugins/toolbar/prism-toolbar.js index 51da74f766..98ba9004b2 100644 --- a/plugins/toolbar/prism-toolbar.js +++ b/plugins/toolbar/prism-toolbar.js @@ -154,7 +154,7 @@ try { // Any normal text will blow up this selector. template = document.querySelector('template#' + text); - } catch (e) {} + } catch (e) { /* noop */ } if (template) { element = template.content; diff --git a/plugins/treeview/prism-treeview.js b/plugins/treeview/prism-treeview.js index ac248a32f8..945668320a 100644 --- a/plugins/treeview/prism-treeview.js +++ b/plugins/treeview/prism-treeview.js @@ -14,7 +14,7 @@ alias: 'line-h' }, { - pattern: /\| |│ /, + pattern: /\| {3}|│ {3}/, alias: 'line-v' }, { diff --git a/plugins/treeview/prism-treeview.min.js b/plugins/treeview/prism-treeview.min.js index 8a5aaef3d7..7c59a60f75 100644 --- a/plugins/treeview/prism-treeview.min.js +++ b/plugins/treeview/prism-treeview.min.js @@ -1 +1 @@ -"undefined"!=typeof Prism&&(Prism.languages.treeview={"treeview-part":{pattern:/^.+/m,inside:{"entry-line":[{pattern:/\|-- |├── /,alias:"line-h"},{pattern:/\| |│ /,alias:"line-v"},{pattern:/`-- |└── /,alias:"line-v-last"},{pattern:/ {4}/,alias:"line-v-gap"}],"entry-name":{pattern:/.*\S.*/,inside:{operator:/ -> /}}}}},Prism.hooks.add("wrap",function(e){if("treeview"===e.language&&"entry-name"===e.type){var t=e.classes,n=/(^|[^\\])\/\s*$/;if(n.test(e.content))e.content=e.content.replace(n,"$1"),t.push("dir");else{e.content=e.content.replace(/(^|[^\\])[=*|]\s*$/,"$1");for(var a=e.content.toLowerCase().replace(/\s+/g,"").split(".");1 /}}}}},Prism.hooks.add("wrap",function(e){if("treeview"===e.language&&"entry-name"===e.type){var t=e.classes,n=/(^|[^\\])\/\s*$/;if(n.test(e.content))e.content=e.content.replace(n,"$1"),t.push("dir");else{e.content=e.content.replace(/(^|[^\\])[=*|]\s*$/,"$1");for(var a=e.content.toLowerCase().replace(/\s+/g,"").split(".");1= 2) { diff --git a/tests/plugins/keep-markup/test.js b/tests/plugins/keep-markup/test.js index bb0e78b34b..d3f168e1ab 100644 --- a/tests/plugins/keep-markup/test.js +++ b/tests/plugins/keep-markup/test.js @@ -1,3 +1,4 @@ +/* eslint-disable no-undef */ const expect = require('chai').expect; const jsdom = require('jsdom') const { JSDOM } = jsdom From e4ad22ad72bc30ab0e95ec32f26f351477dc369a Mon Sep 17 00:00:00 2001 From: Harry Marr Date: Fri, 26 Mar 2021 08:35:23 -0400 Subject: [PATCH 0775/1100] Bash: Accept hyphens in function names (#2832) --- components/prism-bash.js | 4 ++-- components/prism-bash.min.js | 2 +- tests/languages/bash/function-name_feature.test | 7 +++++++ 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/components/prism-bash.js b/components/prism-bash.js index a48b864014..7f0f9e4a31 100644 --- a/components/prism-bash.js +++ b/components/prism-bash.js @@ -83,13 +83,13 @@ // but not “foo {” { // a) and c) - pattern: /(\bfunction\s+)\w+(?=(?:\s*\(?:\s*\))?\s*\{)/, + pattern: /(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/, lookbehind: true, alias: 'function' }, { // b) - pattern: /\b\w+(?=\s*\(\s*\)\s*\{)/, + pattern: /\b[\w-]+(?=\s*\(\s*\)\s*\{)/, alias: 'function' } ], diff --git a/components/prism-bash.min.js b/components/prism-bash.min.js index 81650901e6..9ddb5f80a6 100644 --- a/components/prism-bash.min.js +++ b/components/prism-bash.min.js @@ -1 +1 @@ -!function(e){var t="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",n={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},a={bash:n,environment:{pattern:RegExp("\\$"+t),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--?|-=|\+\+?|\+=|!=?|~|\*\*?|\*=|\/=?|%=?|<<=?|>>=?|<=?|>=?|==?|&&?|&=|\^=?|\|\|?|\|=|\?|:/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+t),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|x[0-9a-fA-F]{1,2}|u[0-9a-fA-F]{4}|U[0-9a-fA-F]{8})/};e.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)\w+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b\w+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+t),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+?)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:a},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:n}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:a},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:a.entity}}],environment:{pattern:RegExp("\\$?"+t),alias:"constant"},variable:a.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|aptitude|apt-cache|apt-get|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:if|then|else|elif|fi|for|while|in|case|esac|function|select|do|done|until)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|break|cd|continue|eval|exec|exit|export|getopts|hash|pwd|readonly|return|shift|test|times|trap|umask|unset|alias|bind|builtin|caller|command|declare|echo|enable|help|let|local|logout|mapfile|printf|read|readarray|source|type|typeset|ulimit|unalias|set|shopt)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:true|false)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|==?|!=?|=~|<<[<-]?|[&\d]?>>|\d?[<>]&?|&[>&]?|\|[&|]?|<=?|>=?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},n.inside=e.languages.bash;for(var s=["comment","function-name","for-or-select","assign-left","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],i=a.variable[1].inside,o=0;o>=?|<=?|>=?|==?|&&?|&=|\^=?|\|\|?|\|=|\?|:/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+t),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|x[0-9a-fA-F]{1,2}|u[0-9a-fA-F]{4}|U[0-9a-fA-F]{8})/};e.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+t),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+?)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:a},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:n}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:a},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:a.entity}}],environment:{pattern:RegExp("\\$?"+t),alias:"constant"},variable:a.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|aptitude|apt-cache|apt-get|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:if|then|else|elif|fi|for|while|in|case|esac|function|select|do|done|until)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|break|cd|continue|eval|exec|exit|export|getopts|hash|pwd|readonly|return|shift|test|times|trap|umask|unset|alias|bind|builtin|caller|command|declare|echo|enable|help|let|local|logout|mapfile|printf|read|readarray|source|type|typeset|ulimit|unalias|set|shopt)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:true|false)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|==?|!=?|=~|<<[<-]?|[&\d]?>>|\d?[<>]&?|&[>&]?|\|[&|]?|<=?|>=?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},n.inside=e.languages.bash;for(var s=["comment","function-name","for-or-select","assign-left","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],i=a.variable[1].inside,o=0;o Date: Sun, 28 Mar 2021 18:55:07 +0200 Subject: [PATCH 0776/1100] JavaScript: Added hashbang and private getters/setters (#2815) --- components/prism-javascript.js | 7 +- components/prism-javascript.min.js | 2 +- prism.js | 7 +- .../javascript/getter-setter_feature.test | 236 +++++++++--------- .../javascript/hashbang_feature.test | 23 ++ 5 files changed, 157 insertions(+), 118 deletions(-) create mode 100644 tests/languages/javascript/hashbang_feature.test diff --git a/components/prism-javascript.js b/components/prism-javascript.js index 96721ec3f4..93363a05d0 100644 --- a/components/prism-javascript.js +++ b/components/prism-javascript.js @@ -12,7 +12,7 @@ Prism.languages.javascript = Prism.languages.extend('clike', { lookbehind: true }, { - pattern: /(^|[^.]|\.\.\.\s*)\b(?:as|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/, + pattern: /(^|[^.]|\.\.\.\s*)\b(?:as|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/, lookbehind: true }, ], @@ -70,6 +70,11 @@ Prism.languages.insertBefore('javascript', 'keyword', { }); Prism.languages.insertBefore('javascript', 'string', { + 'hashbang': { + pattern: /^#!.*/, + greedy: true, + alias: 'comment' + }, 'template-string': { pattern: /`(?:\\[\s\S]|\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}|(?!\${)[^\\`])*`/, greedy: true, diff --git a/components/prism-javascript.min.js b/components/prism-javascript.min.js index ec55d3cd6c..5c800c3dfb 100644 --- a/components/prism-javascript.min.js +++ b/components/prism-javascript.min.js @@ -1 +1 @@ -Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:prototype|constructor))/,lookbehind:!0}],keyword:[{pattern:/((?:^|})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:/\b(?:(?:0[xX](?:[\dA-Fa-f](?:_[\dA-Fa-f])?)+|0[bB](?:[01](?:_[01])?)+|0[oO](?:[0-7](?:_[0-7])?)+)n?|(?:\d(?:_\d)?)+n|NaN|Infinity)\b|(?:\b(?:\d(?:_\d)?)+\.?(?:\d(?:_\d)?)*|\B\.(?:\d(?:_\d)?)+)(?:[Ee][+-]?(?:\d(?:_\d)?)+)?/,operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/,Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)\/(?:\[(?:[^\]\\\r\n]|\\.)*]|\\.|[^/\\\[\r\n])+\/[gimyus]{0,6}(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/,lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:Prism.languages.regex},"regex-flags":/[a-z]+$/,"regex-delimiter":/^\/|\/$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),Prism.languages.insertBefore("javascript","string",{"template-string":{pattern:/`(?:\\[\s\S]|\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}|(?!\${)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\${|}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}}}),Prism.languages.markup&&(Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.markup.tag.addAttribute("on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)","javascript")),Prism.languages.js=Prism.languages.javascript; \ No newline at end of file +Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:prototype|constructor))/,lookbehind:!0}],keyword:[{pattern:/((?:^|})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:/\b(?:(?:0[xX](?:[\dA-Fa-f](?:_[\dA-Fa-f])?)+|0[bB](?:[01](?:_[01])?)+|0[oO](?:[0-7](?:_[0-7])?)+)n?|(?:\d(?:_\d)?)+n|NaN|Infinity)\b|(?:\b(?:\d(?:_\d)?)+\.?(?:\d(?:_\d)?)*|\B\.(?:\d(?:_\d)?)+)(?:[Ee][+-]?(?:\d(?:_\d)?)+)?/,operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/,Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)\/(?:\[(?:[^\]\\\r\n]|\\.)*]|\\.|[^/\\\[\r\n])+\/[gimyus]{0,6}(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/,lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:Prism.languages.regex},"regex-flags":/[a-z]+$/,"regex-delimiter":/^\/|\/$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),Prism.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}|(?!\${)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\${|}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}}}),Prism.languages.markup&&(Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.markup.tag.addAttribute("on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)","javascript")),Prism.languages.js=Prism.languages.javascript; \ No newline at end of file diff --git a/prism.js b/prism.js index f7ec30d731..5982d5ca4f 100644 --- a/prism.js +++ b/prism.js @@ -1522,7 +1522,7 @@ Prism.languages.javascript = Prism.languages.extend('clike', { lookbehind: true }, { - pattern: /(^|[^.]|\.\.\.\s*)\b(?:as|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/, + pattern: /(^|[^.]|\.\.\.\s*)\b(?:as|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/, lookbehind: true }, ], @@ -1580,6 +1580,11 @@ Prism.languages.insertBefore('javascript', 'keyword', { }); Prism.languages.insertBefore('javascript', 'string', { + 'hashbang': { + pattern: /^#!.*/, + greedy: true, + alias: 'comment' + }, 'template-string': { pattern: /`(?:\\[\s\S]|\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}|(?!\${)[^\\`])*`/, greedy: true, diff --git a/tests/languages/javascript/getter-setter_feature.test b/tests/languages/javascript/getter-setter_feature.test index a86a7dc661..6063b09b6b 100644 --- a/tests/languages/javascript/getter-setter_feature.test +++ b/tests/languages/javascript/getter-setter_feature.test @@ -1,115 +1,121 @@ -const obj = { - get name() { return 'bar'; }, - get [expr]() { return 'bar'; }, - async get name() { return 'bar'; }, - set name(val) { }, - set [expr](val) { }, - async set [expr](val) { }, -}; - -// not keywords -get(); -set(foo); - ----------------------------------------------------- - -[ - ["keyword", "const"], - " obj ", - ["operator", "="], - ["punctuation", "{"], - - ["keyword", "get"], - ["function", "name"], - ["punctuation", "("], - ["punctuation", ")"], - ["punctuation", "{"], - ["keyword", "return"], - ["string", "'bar'"], - ["punctuation", ";"], - ["punctuation", "}"], - ["punctuation", ","], - - ["keyword", "get"], - ["punctuation", "["], - "expr", - ["punctuation", "]"], - ["punctuation", "("], - ["punctuation", ")"], - ["punctuation", "{"], - ["keyword", "return"], - ["string", "'bar'"], - ["punctuation", ";"], - ["punctuation", "}"], - ["punctuation", ","], - - ["keyword", "async"], - ["keyword", "get"], - ["function", "name"], - ["punctuation", "("], - ["punctuation", ")"], - ["punctuation", "{"], - ["keyword", "return"], - ["string", "'bar'"], - ["punctuation", ";"], - ["punctuation", "}"], - ["punctuation", ","], - - ["keyword", "set"], - ["function", "name"], - ["punctuation", "("], - ["parameter", [ - "val" - ]], - ["punctuation", ")"], - ["punctuation", "{"], - ["punctuation", "}"], - ["punctuation", ","], - - ["keyword", "set"], - ["punctuation", "["], - "expr", - ["punctuation", "]"], - ["punctuation", "("], - ["parameter", [ - "val" - ]], - ["punctuation", ")"], - ["punctuation", "{"], - ["punctuation", "}"], - ["punctuation", ","], - - ["keyword", "async"], - ["keyword", "set"], - ["punctuation", "["], - "expr", - ["punctuation", "]"], - ["punctuation", "("], - ["parameter", [ - "val" - ]], - ["punctuation", ")"], - ["punctuation", "{"], - ["punctuation", "}"], - ["punctuation", ","], - - ["punctuation", "}"], - ["punctuation", ";"], - - ["comment", "// not keywords"], - - ["function", "get"], - ["punctuation", "("], - ["punctuation", ")"], - ["punctuation", ";"], - - ["function", "set"], - ["punctuation", "("], - "foo", - ["punctuation", ")"], - ["punctuation", ";"] -] - ----------------------------------------------------- - -Checks for getters and setters. +const obj = { + get name() { return 'bar'; }, + get [expr]() { return 'bar'; }, + async get name() { return 'bar'; }, + set name(val) { }, + set [expr](val) { }, + async set [expr](val) { }, + get #x() { return #xValue; }, +}; + +// not keywords +get(); +set(foo); + +---------------------------------------------------- + +[ + ["keyword", "const"], + " obj ", + ["operator", "="], + ["punctuation", "{"], + + ["keyword", "get"], + ["function", "name"], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", "{"], + ["keyword", "return"], + ["string", "'bar'"], + ["punctuation", ";"], + ["punctuation", "}"], + ["punctuation", ","], + + ["keyword", "get"], + ["punctuation", "["], + "expr", + ["punctuation", "]"], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", "{"], + ["keyword", "return"], + ["string", "'bar'"], + ["punctuation", ";"], + ["punctuation", "}"], + ["punctuation", ","], + + ["keyword", "async"], + ["keyword", "get"], + ["function", "name"], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", "{"], + ["keyword", "return"], + ["string", "'bar'"], + ["punctuation", ";"], + ["punctuation", "}"], + ["punctuation", ","], + + ["keyword", "set"], + ["function", "name"], + ["punctuation", "("], + ["parameter", ["val"]], + ["punctuation", ")"], + ["punctuation", "{"], + ["punctuation", "}"], + ["punctuation", ","], + + ["keyword", "set"], + ["punctuation", "["], + "expr", + ["punctuation", "]"], + ["punctuation", "("], + ["parameter", ["val"]], + ["punctuation", ")"], + ["punctuation", "{"], + ["punctuation", "}"], + ["punctuation", ","], + + ["keyword", "async"], + ["keyword", "set"], + ["punctuation", "["], + "expr", + ["punctuation", "]"], + ["punctuation", "("], + ["parameter", ["val"]], + ["punctuation", ")"], + ["punctuation", "{"], + ["punctuation", "}"], + ["punctuation", ","], + + ["keyword", "get"], + ["function", "#x"], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", "{"], + ["keyword", "return"], + " #xValue", + ["punctuation", ";"], + ["punctuation", "}"], + ["punctuation", ","], + + ["punctuation", "}"], + ["punctuation", ";"], + + ["comment", "// not keywords"], + + ["function", "get"], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", ";"], + + ["function", "set"], + ["punctuation", "("], + "foo", + ["punctuation", ")"], + ["punctuation", ";"] +] + +---------------------------------------------------- + +Checks for getters and setters. diff --git a/tests/languages/javascript/hashbang_feature.test b/tests/languages/javascript/hashbang_feature.test new file mode 100644 index 0000000000..ba423f33f0 --- /dev/null +++ b/tests/languages/javascript/hashbang_feature.test @@ -0,0 +1,23 @@ +#!/usr/bin/env node +// in the Script Goal +'use strict'; +console.log(1); + +---------------------------------------------------- + +[ + ["hashbang", "#!/usr/bin/env node"], + + ["comment", "// in the Script Goal"], + + ["string", "'use strict'"], + ["punctuation", ";"], + + "\r\nconsole", + ["punctuation", "."], + ["function", "log"], + ["punctuation", "("], + ["number", "1"], + ["punctuation", ")"], + ["punctuation", ";"] +] \ No newline at end of file From 4f03d5dd8506b882a195068f66606eadba1ba311 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 30 Mar 2021 18:59:41 +0000 Subject: [PATCH 0777/1100] Bump y18n from 3.2.1 to 3.2.2 (#2840) --- package-lock.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index 38c7480af1..06946179b8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7747,9 +7747,9 @@ "dev": true }, "y18n": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", - "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=", + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.2.tgz", + "integrity": "sha512-uGZHXkHnhF0XeeAPgnKfPv1bgKAYyVvmNL1xlKsPYZPaIHxGti2hHqvOCQv71XMsLxu1QjergkqogUnms5D3YQ==", "dev": true }, "yallist": { @@ -7909,9 +7909,9 @@ "dev": true }, "y18n": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", - "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.1.tgz", + "integrity": "sha512-wNcy4NvjMYL8gogWWYAO7ZFWFfHcbdbE57tZO8e4cbpj8tfUcwrwqSl3ad8HxpYWCdXcJUCeKKZS62Av1affwQ==", "dev": true }, "yargs-parser": { From 1c6c0bf37b43de21ca695f293e94c42a696d8380 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Tue, 30 Mar 2021 21:10:23 +0200 Subject: [PATCH 0778/1100] Scheme: Added bracket support (#2813) --- components/prism-racket.js | 49 +--- components/prism-racket.min.js | 2 +- components/prism-scheme.js | 24 +- components/prism-scheme.min.js | 2 +- tests/languages/scheme/builtin_feature.test | 10 +- tests/languages/scheme/comment_feature.test | 4 + tests/languages/scheme/function_feature.test | 94 ++++++- tests/languages/scheme/issue2811.test | 27 ++ tests/languages/scheme/keyword_feature.test | 249 ++++++++++++++---- .../scheme/lambda_parameter_feature.test | 12 + tests/languages/scheme/number_feature.test | 5 + tests/languages/scheme/operator_feature.test | 12 +- 12 files changed, 369 insertions(+), 121 deletions(-) create mode 100644 tests/languages/scheme/issue2811.test diff --git a/components/prism-racket.js b/components/prism-racket.js index f5eaac2b35..af3478060e 100644 --- a/components/prism-racket.js +++ b/components/prism-racket.js @@ -2,58 +2,11 @@ Prism.languages.racket = Prism.languages.extend('scheme', { 'lambda-parameter': { // the racket lambda syntax is a lot more complex, so we won't even attempt to capture it. // this will just prevent false positives of the `function` pattern - pattern: /(\(lambda\s+\()[^()'\s]+/, + pattern: /([(\[]lambda\s+[(\[])[^()\[\]'\s]+/, lookbehind: true } }); -// Add brackets to racket -// The basic idea here is to go through all pattens of Scheme and replace all occurrences of "(" with the union of "(" -// and "["; Similar for ")". This is a bit tricky because "(" can be escaped or inside a character set. Both cases -// have to be handled differently and, of course, we don't want to destroy groups, so we can only replace literal "(" -// and ")". -// To do this, we use a regular expression which will parse any JS regular expression. It works because regexes are -// matches from left to right and already matched text cannot be matched again. We use this to first capture all -// escaped characters (not really, we don't get escape sequences but we don't need them). Because we already captured -// all escaped characters, we know that any "[" character is the start of a character set, so we match that character -// set whole. -// With the regex parsed, we only have to replace all escaped "(" (they cannot be unescaped outside of character sets) -// with /[([]/ and replace all "(" inside character sets. -// Note: This method does not work for "(" that are escaped like this /\x28/ or this /\u0028/. -Prism.languages.DFS(Prism.languages.racket, function (key, value) { - if (Prism.util.type(value) === 'RegExp') { - var source = value.source.replace(/\\(.)|\[\^?((?:\\.|[^\\\]])*)\]/g, function (m, g1, g2) { - if (g1) { - if (g1 === '(') { - // replace all '(' characters outside character sets - return '[([]'; - } - if (g1 === ')') { - // replace all ')' characters outside character sets - return '[)\\]]'; - } - } - if (g2) { - var prefix = m[1] === '^' ? '[^' : '['; - return prefix + g2.replace(/\\(.)|[()]/g, function (m, g1) { - if (m === '(' || g1 === '(') { - // replace all '(' characters inside character sets - return '(['; - } - if (m === ')' || g1 === ')') { - // replace all ')' characters inside character sets - return ')\\]'; - } - return m; - }) + ']'; - } - return m; - }); - - this[key] = RegExp(source, value.flags); - } -}); - Prism.languages.insertBefore('racket', 'string', { 'lang': { pattern: /^#lang.+/m, diff --git a/components/prism-racket.min.js b/components/prism-racket.min.js index 5a3e25e8ca..5f3c44d039 100644 --- a/components/prism-racket.min.js +++ b/components/prism-racket.min.js @@ -1 +1 @@ -Prism.languages.racket=Prism.languages.extend("scheme",{"lambda-parameter":{pattern:/(\(lambda\s+\()[^()'\s]+/,lookbehind:!0}}),Prism.languages.DFS(Prism.languages.racket,function(e,a){if("RegExp"===Prism.util.type(a)){var r=a.source.replace(/\\(.)|\[\^?((?:\\.|[^\\\]])*)\]/g,function(e,a,r){if(a){if("("===a)return"[([]";if(")"===a)return"[)\\]]"}return r?("^"===e[1]?"[^":"[")+r.replace(/\\(.)|[()]/g,function(e,a){return"("===e||"("===a?"([":")"===e||")"===a?")\\]":e})+"]":e});this[e]=RegExp(r,a.flags)}}),Prism.languages.insertBefore("racket","string",{lang:{pattern:/^#lang.+/m,greedy:!0,alias:"keyword"}}),Prism.languages.rkt=Prism.languages.racket; \ No newline at end of file +Prism.languages.racket=Prism.languages.extend("scheme",{"lambda-parameter":{pattern:/([(\[]lambda\s+[(\[])[^()\[\]'\s]+/,lookbehind:!0}}),Prism.languages.insertBefore("racket","string",{lang:{pattern:/^#lang.+/m,greedy:!0,alias:"keyword"}}),Prism.languages.rkt=Prism.languages.racket; \ No newline at end of file diff --git a/components/prism-scheme.js b/components/prism-scheme.js index 77a9255a72..a035d98a71 100644 --- a/components/prism-scheme.js +++ b/components/prism-scheme.js @@ -5,13 +5,13 @@ // and (potentially nested) multiline comments: // #| comment #| nested |# still comment |# // (only 1 level of nesting is supported) - 'comment': /;.*|#;\s*\((?:[^()]|\([^()]*\))*\)|#\|(?:[^#|]|#(?!\|)|\|(?!#)|#\|(?:[^#|]|#(?!\|)|\|(?!#))*\|#)*\|#/, + 'comment': /;.*|#;\s*(?:\((?:[^()]|\([^()]*\))*\)|\[(?:[^\[\]]|\[[^\[\]]*\])*\])|#\|(?:[^#|]|#(?!\|)|\|(?!#)|#\|(?:[^#|]|#(?!\|)|\|(?!#))*\|#)*\|#/, 'string': { pattern: /"(?:[^"\\]|\\.)*"/, greedy: true }, 'symbol': { - pattern: /'[^()#'\s]+/, + pattern: /'[^()\[\]#'\s]+/, greedy: true }, 'character': { @@ -22,25 +22,25 @@ 'lambda-parameter': [ // https://www.cs.cmu.edu/Groups/AI/html/r4rs/r4rs_6.html#SEC30 { - pattern: /((?:^|[^'`#])\(lambda\s+)(?:[^|()'\s]+|\|(?:[^\\|]|\\.)*\|)/, + pattern: /((?:^|[^'`#])[(\[]lambda\s+)(?:[^|()\[\]'\s]+|\|(?:[^\\|]|\\.)*\|)/, lookbehind: true }, { - pattern: /((?:^|[^'`#])\(lambda\s+\()[^()']+/, + pattern: /((?:^|[^'`#])[(\[]lambda\s+[(\[])[^()\[\]']+/, lookbehind: true } ], 'keyword': { - pattern: /((?:^|[^'`#])\()(?:begin|case(?:-lambda)?|cond(?:-expand)?|define(?:-library|-macro|-record-type|-syntax|-values)?|defmacro|delay(?:-force)?|do|else|export|except|guard|if|import|include(?:-ci|-library-declarations)?|lambda|let(?:rec)?(?:-syntax|-values|\*)?|let\*-values|only|parameterize|prefix|(?:quasi-?)?quote|rename|set!|syntax-(?:case|rules)|unless|unquote(?:-splicing)?|when)(?=[()\s]|$)/, + pattern: /((?:^|[^'`#])[(\[])(?:begin|case(?:-lambda)?|cond(?:-expand)?|define(?:-library|-macro|-record-type|-syntax|-values)?|defmacro|delay(?:-force)?|do|else|export|except|guard|if|import|include(?:-ci|-library-declarations)?|lambda|let(?:rec)?(?:-syntax|-values|\*)?|let\*-values|only|parameterize|prefix|(?:quasi-?)?quote|rename|set!|syntax-(?:case|rules)|unless|unquote(?:-splicing)?|when)(?=[()\[\]\s]|$)/, lookbehind: true }, 'builtin': { // all functions of the base library of R7RS plus some of built-ins of R5Rs - pattern: /((?:^|[^'`#])\()(?:abs|and|append|apply|assoc|ass[qv]|binary-port\?|boolean=?\?|bytevector(?:-append|-copy|-copy!|-length|-u8-ref|-u8-set!|\?)?|caar|cadr|call-with-(?:current-continuation|port|values)|call\/cc|car|cdar|cddr|cdr|ceiling|char(?:->integer|-ready\?|\?|<\?|<=\?|=\?|>\?|>=\?)|close-(?:input-port|output-port|port)|complex\?|cons|current-(?:error|input|output)-port|denominator|dynamic-wind|eof-object\??|eq\?|equal\?|eqv\?|error|error-object(?:-irritants|-message|\?)|eval|even\?|exact(?:-integer-sqrt|-integer\?|\?)?|expt|features|file-error\?|floor(?:-quotient|-remainder|\/)?|flush-output-port|for-each|gcd|get-output-(?:bytevector|string)|inexact\??|input-port(?:-open\?|\?)|integer(?:->char|\?)|lcm|length|list(?:->string|->vector|-copy|-ref|-set!|-tail|\?)?|make-(?:bytevector|list|parameter|string|vector)|map|max|member|memq|memv|min|modulo|negative\?|newline|not|null\?|number(?:->string|\?)|numerator|odd\?|open-(?:input|output)-(?:bytevector|string)|or|output-port(?:-open\?|\?)|pair\?|peek-char|peek-u8|port\?|positive\?|procedure\?|quotient|raise|raise-continuable|rational\?|rationalize|read-(?:bytevector|bytevector!|char|error\?|line|string|u8)|real\?|remainder|reverse|round|set-c[ad]r!|square|string(?:->list|->number|->symbol|->utf8|->vector|-append|-copy|-copy!|-fill!|-for-each|-length|-map|-ref|-set!|\?|<\?|<=\?|=\?|>\?|>=\?)?|substring|symbol(?:->string|\?|=\?)|syntax-error|textual-port\?|truncate(?:-quotient|-remainder|\/)?|u8-ready\?|utf8->string|values|vector(?:->list|->string|-append|-copy|-copy!|-fill!|-for-each|-length|-map|-ref|-set!|\?)?|with-exception-handler|write-(?:bytevector|char|string|u8)|zero\?)(?=[()\s]|$)/, + pattern: /((?:^|[^'`#])[(\[])(?:abs|and|append|apply|assoc|ass[qv]|binary-port\?|boolean=?\?|bytevector(?:-append|-copy|-copy!|-length|-u8-ref|-u8-set!|\?)?|caar|cadr|call-with-(?:current-continuation|port|values)|call\/cc|car|cdar|cddr|cdr|ceiling|char(?:->integer|-ready\?|\?|<\?|<=\?|=\?|>\?|>=\?)|close-(?:input-port|output-port|port)|complex\?|cons|current-(?:error|input|output)-port|denominator|dynamic-wind|eof-object\??|eq\?|equal\?|eqv\?|error|error-object(?:-irritants|-message|\?)|eval|even\?|exact(?:-integer-sqrt|-integer\?|\?)?|expt|features|file-error\?|floor(?:-quotient|-remainder|\/)?|flush-output-port|for-each|gcd|get-output-(?:bytevector|string)|inexact\??|input-port(?:-open\?|\?)|integer(?:->char|\?)|lcm|length|list(?:->string|->vector|-copy|-ref|-set!|-tail|\?)?|make-(?:bytevector|list|parameter|string|vector)|map|max|member|memq|memv|min|modulo|negative\?|newline|not|null\?|number(?:->string|\?)|numerator|odd\?|open-(?:input|output)-(?:bytevector|string)|or|output-port(?:-open\?|\?)|pair\?|peek-char|peek-u8|port\?|positive\?|procedure\?|quotient|raise|raise-continuable|rational\?|rationalize|read-(?:bytevector|bytevector!|char|error\?|line|string|u8)|real\?|remainder|reverse|round|set-c[ad]r!|square|string(?:->list|->number|->symbol|->utf8|->vector|-append|-copy|-copy!|-fill!|-for-each|-length|-map|-ref|-set!|\?|<\?|<=\?|=\?|>\?|>=\?)?|substring|symbol(?:->string|\?|=\?)|syntax-error|textual-port\?|truncate(?:-quotient|-remainder|\/)?|u8-ready\?|utf8->string|values|vector(?:->list|->string|-append|-copy|-copy!|-fill!|-for-each|-length|-map|-ref|-set!|\?)?|with-exception-handler|write-(?:bytevector|char|string|u8)|zero\?)(?=[()\[\]\s]|$)/, lookbehind: true }, 'operator': { - pattern: /((?:^|[^'`#])\()(?:[-+*%/]|[<>]=?|=>?)(?=[()\s]|$)/, + pattern: /((?:^|[^'`#])[(\[])(?:[-+*%/]|[<>]=?|=>?)(?=[()\[\]\s]|$)/, lookbehind: true }, 'number': { @@ -82,24 +82,24 @@ '': /(?:@|)?|/.source, '': /#[box](?:#[ei])?|(?:#[ei])?#[box]/.source, - '': /(^|[\s()])(?:|)(?=[()\s]|$)/.source, + '': /(^|[()\[\]\s])(?:|)(?=[()\[\]\s]|$)/.source, }), 'i'), lookbehind: true }, 'boolean': { - pattern: /(^|[\s()])#(?:[ft]|false|true)(?=[()\s]|$)/, + pattern: /(^|[()\[\]\s])#(?:[ft]|false|true)(?=[()\[\]\s]|$)/, lookbehind: true }, 'function': { - pattern: /((?:^|[^'`#])\()(?:[^|()'\s]+|\|(?:[^\\|]|\\.)*\|)(?=[()\s]|$)/, + pattern: /((?:^|[^'`#])[(\[])(?:[^|()\[\]'\s]+|\|(?:[^\\|]|\\.)*\|)(?=[()\[\]\s]|$)/, lookbehind: true }, 'identifier': { - pattern: /(^|[\s()])\|(?:[^\\|]|\\.)*\|(?=[()\s]|$)/, + pattern: /(^|[()\[\]\s])\|(?:[^\\|]|\\.)*\|(?=[()\[\]\s]|$)/, lookbehind: true, greedy: true }, - 'punctuation': /[()']/ + 'punctuation': /[()\[\]']/ }; /** diff --git a/components/prism-scheme.min.js b/components/prism-scheme.min.js index 4724e88fd3..8970718a18 100644 --- a/components/prism-scheme.min.js +++ b/components/prism-scheme.min.js @@ -1 +1 @@ -Prism.languages.scheme={comment:/;.*|#;\s*\((?:[^()]|\([^()]*\))*\)|#\|(?:[^#|]|#(?!\|)|\|(?!#)|#\|(?:[^#|]|#(?!\|)|\|(?!#))*\|#)*\|#/,string:{pattern:/"(?:[^"\\]|\\.)*"/,greedy:!0},symbol:{pattern:/'[^()#'\s]+/,greedy:!0},character:{pattern:/#\\(?:[ux][a-fA-F\d]+\b|[-a-zA-Z]+\b|[\uD800-\uDBFF][\uDC00-\uDFFF]|\S)/,greedy:!0,alias:"string"},"lambda-parameter":[{pattern:/((?:^|[^'`#])\(lambda\s+)(?:[^|()'\s]+|\|(?:[^\\|]|\\.)*\|)/,lookbehind:!0},{pattern:/((?:^|[^'`#])\(lambda\s+\()[^()']+/,lookbehind:!0}],keyword:{pattern:/((?:^|[^'`#])\()(?:begin|case(?:-lambda)?|cond(?:-expand)?|define(?:-library|-macro|-record-type|-syntax|-values)?|defmacro|delay(?:-force)?|do|else|export|except|guard|if|import|include(?:-ci|-library-declarations)?|lambda|let(?:rec)?(?:-syntax|-values|\*)?|let\*-values|only|parameterize|prefix|(?:quasi-?)?quote|rename|set!|syntax-(?:case|rules)|unless|unquote(?:-splicing)?|when)(?=[()\s]|$)/,lookbehind:!0},builtin:{pattern:/((?:^|[^'`#])\()(?:abs|and|append|apply|assoc|ass[qv]|binary-port\?|boolean=?\?|bytevector(?:-append|-copy|-copy!|-length|-u8-ref|-u8-set!|\?)?|caar|cadr|call-with-(?:current-continuation|port|values)|call\/cc|car|cdar|cddr|cdr|ceiling|char(?:->integer|-ready\?|\?|<\?|<=\?|=\?|>\?|>=\?)|close-(?:input-port|output-port|port)|complex\?|cons|current-(?:error|input|output)-port|denominator|dynamic-wind|eof-object\??|eq\?|equal\?|eqv\?|error|error-object(?:-irritants|-message|\?)|eval|even\?|exact(?:-integer-sqrt|-integer\?|\?)?|expt|features|file-error\?|floor(?:-quotient|-remainder|\/)?|flush-output-port|for-each|gcd|get-output-(?:bytevector|string)|inexact\??|input-port(?:-open\?|\?)|integer(?:->char|\?)|lcm|length|list(?:->string|->vector|-copy|-ref|-set!|-tail|\?)?|make-(?:bytevector|list|parameter|string|vector)|map|max|member|memq|memv|min|modulo|negative\?|newline|not|null\?|number(?:->string|\?)|numerator|odd\?|open-(?:input|output)-(?:bytevector|string)|or|output-port(?:-open\?|\?)|pair\?|peek-char|peek-u8|port\?|positive\?|procedure\?|quotient|raise|raise-continuable|rational\?|rationalize|read-(?:bytevector|bytevector!|char|error\?|line|string|u8)|real\?|remainder|reverse|round|set-c[ad]r!|square|string(?:->list|->number|->symbol|->utf8|->vector|-append|-copy|-copy!|-fill!|-for-each|-length|-map|-ref|-set!|\?|<\?|<=\?|=\?|>\?|>=\?)?|substring|symbol(?:->string|\?|=\?)|syntax-error|textual-port\?|truncate(?:-quotient|-remainder|\/)?|u8-ready\?|utf8->string|values|vector(?:->list|->string|-append|-copy|-copy!|-fill!|-for-each|-length|-map|-ref|-set!|\?)?|with-exception-handler|write-(?:bytevector|char|string|u8)|zero\?)(?=[()\s]|$)/,lookbehind:!0},operator:{pattern:/((?:^|[^'`#])\()(?:[-+*%/]|[<>]=?|=>?)(?=[()\s]|$)/,lookbehind:!0},number:{pattern:RegExp(function(r){for(var e in r)r[e]=r[e].replace(/<[\w\s]+>/g,function(e){return"(?:"+r[e].trim()+")"});return r[e]}({"":"\\d+(?:/\\d+)?|(?:\\d+(?:\\.\\d*)?|\\.\\d+)(?:e[+-]?\\d+)?","":"[+-]?|[+-](?:inf|nan)\\.0","":"[+-](?:|(?:inf|nan)\\.0)?i","":"(?:@|)?|","":"(?:#d(?:#[ei])?|#[ei](?:#d)?)?","":"[0-9a-f]+(?:/[0-9a-f]+)?","":"[+-]?|[+-](?:inf|nan)\\.0","":"[+-](?:|(?:inf|nan)\\.0)?i","":"(?:@|)?|","":"#[box](?:#[ei])?|(?:#[ei])?#[box]","":"(^|[\\s()])(?:|)(?=[()\\s]|$)"}),"i"),lookbehind:!0},boolean:{pattern:/(^|[\s()])#(?:[ft]|false|true)(?=[()\s]|$)/,lookbehind:!0},function:{pattern:/((?:^|[^'`#])\()(?:[^|()'\s]+|\|(?:[^\\|]|\\.)*\|)(?=[()\s]|$)/,lookbehind:!0},identifier:{pattern:/(^|[\s()])\|(?:[^\\|]|\\.)*\|(?=[()\s]|$)/,lookbehind:!0,greedy:!0},punctuation:/[()']/}; \ No newline at end of file +Prism.languages.scheme={comment:/;.*|#;\s*(?:\((?:[^()]|\([^()]*\))*\)|\[(?:[^\[\]]|\[[^\[\]]*\])*\])|#\|(?:[^#|]|#(?!\|)|\|(?!#)|#\|(?:[^#|]|#(?!\|)|\|(?!#))*\|#)*\|#/,string:{pattern:/"(?:[^"\\]|\\.)*"/,greedy:!0},symbol:{pattern:/'[^()\[\]#'\s]+/,greedy:!0},character:{pattern:/#\\(?:[ux][a-fA-F\d]+\b|[-a-zA-Z]+\b|[\uD800-\uDBFF][\uDC00-\uDFFF]|\S)/,greedy:!0,alias:"string"},"lambda-parameter":[{pattern:/((?:^|[^'`#])[(\[]lambda\s+)(?:[^|()\[\]'\s]+|\|(?:[^\\|]|\\.)*\|)/,lookbehind:!0},{pattern:/((?:^|[^'`#])[(\[]lambda\s+[(\[])[^()\[\]']+/,lookbehind:!0}],keyword:{pattern:/((?:^|[^'`#])[(\[])(?:begin|case(?:-lambda)?|cond(?:-expand)?|define(?:-library|-macro|-record-type|-syntax|-values)?|defmacro|delay(?:-force)?|do|else|export|except|guard|if|import|include(?:-ci|-library-declarations)?|lambda|let(?:rec)?(?:-syntax|-values|\*)?|let\*-values|only|parameterize|prefix|(?:quasi-?)?quote|rename|set!|syntax-(?:case|rules)|unless|unquote(?:-splicing)?|when)(?=[()\[\]\s]|$)/,lookbehind:!0},builtin:{pattern:/((?:^|[^'`#])[(\[])(?:abs|and|append|apply|assoc|ass[qv]|binary-port\?|boolean=?\?|bytevector(?:-append|-copy|-copy!|-length|-u8-ref|-u8-set!|\?)?|caar|cadr|call-with-(?:current-continuation|port|values)|call\/cc|car|cdar|cddr|cdr|ceiling|char(?:->integer|-ready\?|\?|<\?|<=\?|=\?|>\?|>=\?)|close-(?:input-port|output-port|port)|complex\?|cons|current-(?:error|input|output)-port|denominator|dynamic-wind|eof-object\??|eq\?|equal\?|eqv\?|error|error-object(?:-irritants|-message|\?)|eval|even\?|exact(?:-integer-sqrt|-integer\?|\?)?|expt|features|file-error\?|floor(?:-quotient|-remainder|\/)?|flush-output-port|for-each|gcd|get-output-(?:bytevector|string)|inexact\??|input-port(?:-open\?|\?)|integer(?:->char|\?)|lcm|length|list(?:->string|->vector|-copy|-ref|-set!|-tail|\?)?|make-(?:bytevector|list|parameter|string|vector)|map|max|member|memq|memv|min|modulo|negative\?|newline|not|null\?|number(?:->string|\?)|numerator|odd\?|open-(?:input|output)-(?:bytevector|string)|or|output-port(?:-open\?|\?)|pair\?|peek-char|peek-u8|port\?|positive\?|procedure\?|quotient|raise|raise-continuable|rational\?|rationalize|read-(?:bytevector|bytevector!|char|error\?|line|string|u8)|real\?|remainder|reverse|round|set-c[ad]r!|square|string(?:->list|->number|->symbol|->utf8|->vector|-append|-copy|-copy!|-fill!|-for-each|-length|-map|-ref|-set!|\?|<\?|<=\?|=\?|>\?|>=\?)?|substring|symbol(?:->string|\?|=\?)|syntax-error|textual-port\?|truncate(?:-quotient|-remainder|\/)?|u8-ready\?|utf8->string|values|vector(?:->list|->string|-append|-copy|-copy!|-fill!|-for-each|-length|-map|-ref|-set!|\?)?|with-exception-handler|write-(?:bytevector|char|string|u8)|zero\?)(?=[()\[\]\s]|$)/,lookbehind:!0},operator:{pattern:/((?:^|[^'`#])[(\[])(?:[-+*%/]|[<>]=?|=>?)(?=[()\[\]\s]|$)/,lookbehind:!0},number:{pattern:RegExp(function(r){for(var e in r)r[e]=r[e].replace(/<[\w\s]+>/g,function(e){return"(?:"+r[e].trim()+")"});return r[e]}({"":"\\d+(?:/\\d+)?|(?:\\d+(?:\\.\\d*)?|\\.\\d+)(?:e[+-]?\\d+)?","":"[+-]?|[+-](?:inf|nan)\\.0","":"[+-](?:|(?:inf|nan)\\.0)?i","":"(?:@|)?|","":"(?:#d(?:#[ei])?|#[ei](?:#d)?)?","":"[0-9a-f]+(?:/[0-9a-f]+)?","":"[+-]?|[+-](?:inf|nan)\\.0","":"[+-](?:|(?:inf|nan)\\.0)?i","":"(?:@|)?|","":"#[box](?:#[ei])?|(?:#[ei])?#[box]","":"(^|[()\\[\\]\\s])(?:|)(?=[()\\[\\]\\s]|$)"}),"i"),lookbehind:!0},boolean:{pattern:/(^|[()\[\]\s])#(?:[ft]|false|true)(?=[()\[\]\s]|$)/,lookbehind:!0},function:{pattern:/((?:^|[^'`#])[(\[])(?:[^|()\[\]'\s]+|\|(?:[^\\|]|\\.)*\|)(?=[()\[\]\s]|$)/,lookbehind:!0},identifier:{pattern:/(^|[()\[\]\s])\|(?:[^\\|]|\\.)*\|(?=[()\[\]\s]|$)/,lookbehind:!0,greedy:!0},punctuation:/[()\[\]']/}; \ No newline at end of file diff --git a/tests/languages/scheme/builtin_feature.test b/tests/languages/scheme/builtin_feature.test index 1a3706f4b4..72bda723e1 100644 --- a/tests/languages/scheme/builtin_feature.test +++ b/tests/languages/scheme/builtin_feature.test @@ -194,6 +194,10 @@ (write-u8 (zero? +; with brackets +[map +[max + ---------------------------------------------------- [ @@ -391,7 +395,11 @@ ["punctuation", "("], ["builtin", "write-char"], ["punctuation", "("], ["builtin", "write-string"], ["punctuation", "("], ["builtin", "write-u8"], - ["punctuation", "("], ["builtin", "zero?"] + ["punctuation", "("], ["builtin", "zero?"], + + ["comment", "; with brackets"], + ["punctuation", "["], ["builtin", "map"], + ["punctuation", "["], ["builtin", "max"] ] ---------------------------------------------------- diff --git a/tests/languages/scheme/comment_feature.test b/tests/languages/scheme/comment_feature.test index af9bef0320..90ae5e8f5d 100644 --- a/tests/languages/scheme/comment_feature.test +++ b/tests/languages/scheme/comment_feature.test @@ -3,6 +3,8 @@ #;(foo bar) #; (foo) +#;[foo bar] +#; [foo] #| comment @@ -17,6 +19,8 @@ ["comment", "#;(foo bar)"], ["comment", "#; (foo)"], + ["comment", "#;[foo bar]"], + ["comment", "#; [foo]"], ["comment", "#|\r\n comment\r\n #| nested comment |#\r\n|#"] ] diff --git a/tests/languages/scheme/function_feature.test b/tests/languages/scheme/function_feature.test index bbd3259920..cd470914ae 100644 --- a/tests/languages/scheme/function_feature.test +++ b/tests/languages/scheme/function_feature.test @@ -7,17 +7,95 @@ (defined foo) (|some name| foo) +[fl= 1 2] +[flmin 2 3] +[inexact->exact 3] +[!fact] +[** 10] +[** +[defined foo] +[|some name| foo] + ---------------------------------------------------- [ - ["punctuation", "("], ["function", "fl="], ["number", "1"], ["number", "2"], ["punctuation", ")"], - ["punctuation", "("], ["function", "flmin"], ["number", "2"], ["number", "3"], ["punctuation", ")"], - ["punctuation", "("], ["function", "inexact->exact"], ["number", "3"], ["punctuation", ")"], - ["punctuation", "("], ["function", "!fact"], ["punctuation", ")"], - ["punctuation", "("], ["function", "**"], ["number", "10"], ["punctuation", ")"], - ["punctuation", "("], ["function", "**"], - ["punctuation", "("], ["function", "defined"], " foo", ["punctuation", ")"], - ["punctuation", "("], ["function", "|some name|"], " foo", ["punctuation", ")"] + ["punctuation", "("], + ["function", "fl="], + ["number", "1"], + ["number", "2"], + ["punctuation", ")"], + + ["punctuation", "("], + ["function", "flmin"], + ["number", "2"], + ["number", "3"], + ["punctuation", ")"], + + ["punctuation", "("], + ["function", "inexact->exact"], + ["number", "3"], + ["punctuation", ")"], + + ["punctuation", "("], + ["function", "!fact"], + ["punctuation", ")"], + + ["punctuation", "("], + ["function", "**"], + ["number", "10"], + ["punctuation", ")"], + + ["punctuation", "("], + ["function", "**"], + + ["punctuation", "("], + ["function", "defined"], + " foo", + ["punctuation", ")"], + + ["punctuation", "("], + ["function", "|some name|"], + " foo", + ["punctuation", ")"], + + ["punctuation", "["], + ["function", "fl="], + ["number", "1"], + ["number", "2"], + ["punctuation", "]"], + + ["punctuation", "["], + ["function", "flmin"], + ["number", "2"], + ["number", "3"], + ["punctuation", "]"], + + ["punctuation", "["], + ["function", "inexact->exact"], + ["number", "3"], + ["punctuation", "]"], + + ["punctuation", "["], + ["function", "!fact"], + ["punctuation", "]"], + + ["punctuation", "["], + ["function", "**"], + ["number", "10"], + ["punctuation", "]"], + + ["punctuation", "["], + ["function", "**"], + + ["punctuation", "["], + ["function", "defined"], + " foo", + ["punctuation", "]"], + + ["punctuation", "["], + ["function", "|some name|"], + " foo", + ["punctuation", "]"] ] ---------------------------------------------------- diff --git a/tests/languages/scheme/issue2811.test b/tests/languages/scheme/issue2811.test new file mode 100644 index 0000000000..16211fd696 --- /dev/null +++ b/tests/languages/scheme/issue2811.test @@ -0,0 +1,27 @@ +(let ([x 10] + [y 20]) + (+ x y)) + +---------------------------------------------------- + +[ + ["punctuation", "("], + ["keyword", "let"], + ["punctuation", "("], + ["punctuation", "["], + ["function", "x"], + ["number", "10"], + ["punctuation", "]"], + + ["punctuation", "["], + ["function", "y"], + ["number", "20"], + ["punctuation", "]"], + ["punctuation", ")"], + + ["punctuation", "("], + ["operator", "+"], + " x y", + ["punctuation", ")"], + ["punctuation", ")"] +] \ No newline at end of file diff --git a/tests/languages/scheme/keyword_feature.test b/tests/languages/scheme/keyword_feature.test index 2d6e82f5cf..25ffc29917 100644 --- a/tests/languages/scheme/keyword_feature.test +++ b/tests/languages/scheme/keyword_feature.test @@ -47,57 +47,210 @@ (unquote-splicing) (when) +; with brackets + +[if] +[when] + ---------------------------------------------------- [ - ["punctuation", "("], ["keyword", "begin"], ["punctuation", ")"], - ["punctuation", "("], ["keyword", "case"], ["punctuation", ")"], - ["punctuation", "("], ["keyword", "case-lambda"], ["punctuation", ")"], - ["punctuation", "("], ["keyword", "cond"], ["punctuation", ")"], - ["punctuation", "("], ["keyword", "cond-expand"], ["punctuation", ")"], - ["punctuation", "("], ["keyword", "define-library"], ["punctuation", ")"], - ["punctuation", "("], ["keyword", "define-macro"], ["punctuation", ")"], - ["punctuation", "("], ["keyword", "define-record-type"], ["punctuation", ")"], - ["punctuation", "("], ["keyword", "define-syntax"], ["punctuation", ")"], - ["punctuation", "("], ["keyword", "define-values"], ["punctuation", ")"], - ["punctuation", "("], ["keyword", "define"], ["punctuation", ")"], - ["punctuation", "("], ["keyword", "defmacro"], ["punctuation", ")"], - ["punctuation", "("], ["keyword", "delay-force"], ["punctuation", ")"], - ["punctuation", "("], ["keyword", "delay"], ["punctuation", ")"], - ["punctuation", "("], ["keyword", "do"], ["punctuation", ")"], - ["punctuation", "("], ["keyword", "else"], ["punctuation", ")"], - ["punctuation", "("], ["keyword", "export"], ["punctuation", ")"], - ["punctuation", "("], ["keyword", "except"], ["punctuation", ")"], - ["punctuation", "("], ["keyword", "guard"], ["punctuation", ")"], - ["punctuation", "("], ["keyword", "if"], ["punctuation", ")"], - ["punctuation", "("], ["keyword", "import"], ["punctuation", ")"], - ["punctuation", "("], ["keyword", "include"], ["punctuation", ")"], - ["punctuation", "("], ["keyword", "include-ci"], ["punctuation", ")"], - ["punctuation", "("], ["keyword", "include-library-declarations"], ["punctuation", ")"], - ["punctuation", "("], ["keyword", "lambda"], ["punctuation", ")"], - ["punctuation", "("], ["keyword", "let-syntax"], ["punctuation", ")"], - ["punctuation", "("], ["keyword", "let-values"], ["punctuation", ")"], - ["punctuation", "("], ["keyword", "let"], ["punctuation", ")"], - ["punctuation", "("], ["keyword", "let*-values"], ["punctuation", ")"], - ["punctuation", "("], ["keyword", "let*"], ["punctuation", ")"], - ["punctuation", "("], ["keyword", "letrec-syntax"], ["punctuation", ")"], - ["punctuation", "("], ["keyword", "letrec-values"], ["punctuation", ")"], - ["punctuation", "("], ["keyword", "letrec"], ["punctuation", ")"], - ["punctuation", "("], ["keyword", "letrec*"], ["punctuation", ")"], - ["punctuation", "("], ["keyword", "only"], ["punctuation", ")"], - ["punctuation", "("], ["keyword", "parameterize"], ["punctuation", ")"], - ["punctuation", "("], ["keyword", "prefix"], ["punctuation", ")"], - ["punctuation", "("], ["keyword", "quasi-quote"], ["punctuation", ")"], - ["punctuation", "("], ["keyword", "quasiquote"], ["punctuation", ")"], - ["punctuation", "("], ["keyword", "quote"], ["punctuation", ")"], - ["punctuation", "("], ["keyword", "rename"], ["punctuation", ")"], - ["punctuation", "("], ["keyword", "set!"], ["punctuation", ")"], - ["punctuation", "("], ["keyword", "syntax-case"], ["punctuation", ")"], - ["punctuation", "("], ["keyword", "syntax-rules"], ["punctuation", ")"], - ["punctuation", "("], ["keyword", "unless"], ["punctuation", ")"], - ["punctuation", "("], ["keyword", "unquote"], ["punctuation", ")"], - ["punctuation", "("], ["keyword", "unquote-splicing"], ["punctuation", ")"], - ["punctuation", "("], ["keyword", "when"], ["punctuation", ")"] + ["punctuation", "("], + ["keyword", "begin"], + ["punctuation", ")"], + + ["punctuation", "("], + ["keyword", "case"], + ["punctuation", ")"], + + ["punctuation", "("], + ["keyword", "case-lambda"], + ["punctuation", ")"], + + ["punctuation", "("], + ["keyword", "cond"], + ["punctuation", ")"], + + ["punctuation", "("], + ["keyword", "cond-expand"], + ["punctuation", ")"], + + ["punctuation", "("], + ["keyword", "define-library"], + ["punctuation", ")"], + + ["punctuation", "("], + ["keyword", "define-macro"], + ["punctuation", ")"], + + ["punctuation", "("], + ["keyword", "define-record-type"], + ["punctuation", ")"], + + ["punctuation", "("], + ["keyword", "define-syntax"], + ["punctuation", ")"], + + ["punctuation", "("], + ["keyword", "define-values"], + ["punctuation", ")"], + + ["punctuation", "("], + ["keyword", "define"], + ["punctuation", ")"], + + ["punctuation", "("], + ["keyword", "defmacro"], + ["punctuation", ")"], + + ["punctuation", "("], + ["keyword", "delay-force"], + ["punctuation", ")"], + + ["punctuation", "("], + ["keyword", "delay"], + ["punctuation", ")"], + + ["punctuation", "("], + ["keyword", "do"], + ["punctuation", ")"], + + ["punctuation", "("], + ["keyword", "else"], + ["punctuation", ")"], + + ["punctuation", "("], + ["keyword", "export"], + ["punctuation", ")"], + + ["punctuation", "("], + ["keyword", "except"], + ["punctuation", ")"], + + ["punctuation", "("], + ["keyword", "guard"], + ["punctuation", ")"], + + ["punctuation", "("], + ["keyword", "if"], + ["punctuation", ")"], + + ["punctuation", "("], + ["keyword", "import"], + ["punctuation", ")"], + + ["punctuation", "("], + ["keyword", "include"], + ["punctuation", ")"], + + ["punctuation", "("], + ["keyword", "include-ci"], + ["punctuation", ")"], + + ["punctuation", "("], + ["keyword", "include-library-declarations"], + ["punctuation", ")"], + + ["punctuation", "("], + ["keyword", "lambda"], + ["punctuation", ")"], + + ["punctuation", "("], + ["keyword", "let-syntax"], + ["punctuation", ")"], + + ["punctuation", "("], + ["keyword", "let-values"], + ["punctuation", ")"], + + ["punctuation", "("], + ["keyword", "let"], + ["punctuation", ")"], + + ["punctuation", "("], + ["keyword", "let*-values"], + ["punctuation", ")"], + + ["punctuation", "("], + ["keyword", "let*"], + ["punctuation", ")"], + + ["punctuation", "("], + ["keyword", "letrec-syntax"], + ["punctuation", ")"], + + ["punctuation", "("], + ["keyword", "letrec-values"], + ["punctuation", ")"], + + ["punctuation", "("], + ["keyword", "letrec"], + ["punctuation", ")"], + + ["punctuation", "("], + ["keyword", "letrec*"], + ["punctuation", ")"], + + ["punctuation", "("], + ["keyword", "only"], + ["punctuation", ")"], + + ["punctuation", "("], + ["keyword", "parameterize"], + ["punctuation", ")"], + + ["punctuation", "("], + ["keyword", "prefix"], + ["punctuation", ")"], + + ["punctuation", "("], + ["keyword", "quasi-quote"], + ["punctuation", ")"], + + ["punctuation", "("], + ["keyword", "quasiquote"], + ["punctuation", ")"], + + ["punctuation", "("], + ["keyword", "quote"], + ["punctuation", ")"], + + ["punctuation", "("], + ["keyword", "rename"], + ["punctuation", ")"], + + ["punctuation", "("], + ["keyword", "set!"], + ["punctuation", ")"], + + ["punctuation", "("], + ["keyword", "syntax-case"], + ["punctuation", ")"], + + ["punctuation", "("], + ["keyword", "syntax-rules"], + ["punctuation", ")"], + + ["punctuation", "("], + ["keyword", "unless"], + ["punctuation", ")"], + + ["punctuation", "("], + ["keyword", "unquote"], + ["punctuation", ")"], + + ["punctuation", "("], + ["keyword", "unquote-splicing"], + ["punctuation", ")"], + + ["punctuation", "("], + ["keyword", "when"], + ["punctuation", ")"], + + ["comment", "; with brackets"], + + ["punctuation", "["], ["keyword", "if"], ["punctuation", "]"], + ["punctuation", "["], ["keyword", "when"], ["punctuation", "]"] ] ---------------------------------------------------- diff --git a/tests/languages/scheme/lambda_parameter_feature.test b/tests/languages/scheme/lambda_parameter_feature.test index bbc7a22ffa..2e56e03af1 100644 --- a/tests/languages/scheme/lambda_parameter_feature.test +++ b/tests/languages/scheme/lambda_parameter_feature.test @@ -5,6 +5,7 @@ (lambda (x) x) (lambda (foo bar) (concat foo bar)) +(lambda [foo bar] (concat foo bar)) ---------------------------------------------------- @@ -38,6 +39,17 @@ ["function", "concat"], " foo bar", ["punctuation", ")"], + ["punctuation", ")"], + + ["punctuation", "("], + ["keyword", "lambda"], + ["punctuation", "["], + ["lambda-parameter", "foo bar"], + ["punctuation", "]"], + ["punctuation", "("], + ["function", "concat"], + " foo bar", + ["punctuation", ")"], ["punctuation", ")"] ] diff --git a/tests/languages/scheme/number_feature.test b/tests/languages/scheme/number_feature.test index 2b00dc8492..0520d669c2 100644 --- a/tests/languages/scheme/number_feature.test +++ b/tests/languages/scheme/number_feature.test @@ -12,6 +12,8 @@ (list #xBAD #b1110011 #o777) (list #i#x10 #i#x10+10i #b10+10i) +[list 123] + 10+i 10+.1i 10+1.i @@ -93,11 +95,14 @@ ["number", "#b10+10i"], ["punctuation", ")"], + ["punctuation", "["], ["builtin", "list"], ["number", "123"], ["punctuation", "]"], + ["number", "10+i"], ["number", "10+.1i"], ["number", "10+1.i"], ["comment", "; not a number but a symbol"], + ["punctuation", "("], ["keyword", "define"], " 1+2 ", diff --git a/tests/languages/scheme/operator_feature.test b/tests/languages/scheme/operator_feature.test index 5904c1a3ed..245f0a2ac4 100644 --- a/tests/languages/scheme/operator_feature.test +++ b/tests/languages/scheme/operator_feature.test @@ -10,6 +10,10 @@ (= (=> +; with brackets +[= +[=> + ---------------------------------------------------- [ @@ -23,9 +27,13 @@ ["punctuation", "("], ["operator", ">"], ["punctuation", "("], ["operator", ">="], ["punctuation", "("], ["operator", "="], - ["punctuation", "("], ["operator", "=>"] + ["punctuation", "("], ["operator", "=>"], + + ["comment", "; with brackets"], + ["punctuation", "["], ["operator", "="], + ["punctuation", "["], ["operator", "=>"] ] ---------------------------------------------------- -Checks for operators. \ No newline at end of file +Checks for operators. From ea82478dfc6d22a39d6eca1881d9f88122b05035 Mon Sep 17 00:00:00 2001 From: Simran Date: Thu, 1 Apr 2021 14:25:59 +0200 Subject: [PATCH 0779/1100] AQL: Update for ArangoDB 3.8 (#2842) - Add `K_PATHS` and `WINDOW` keywords - Support binary and hexadecimal number literals --- components/prism-aql.js | 8 ++++++-- components/prism-aql.min.js | 2 +- tests/languages/aql/keyword_feature.test | 4 ++++ tests/languages/aql/number_feature.test | 6 +++++- 4 files changed, 16 insertions(+), 4 deletions(-) diff --git a/components/prism-aql.js b/components/prism-aql.js index 2de15228c3..4a338eb63b 100644 --- a/components/prism-aql.js +++ b/components/prism-aql.js @@ -15,7 +15,7 @@ Prism.languages.aql = { pattern: /(\bWITH\s+)COUNT(?=\s+INTO\b)/i, lookbehind: true }, - /\b(?:AGGREGATE|ALL|AND|ANY|ASC|COLLECT|DESC|DISTINCT|FILTER|FOR|GRAPH|IN|INBOUND|INSERT|INTO|K_SHORTEST_PATHS|LET|LIKE|LIMIT|NONE|NOT|NULL|OR|OUTBOUND|REMOVE|REPLACE|RETURN|SHORTEST_PATH|SORT|UPDATE|UPSERT|WITH)\b/i, + /\b(?:AGGREGATE|ALL|AND|ANY|ASC|COLLECT|DESC|DISTINCT|FILTER|FOR|GRAPH|IN|INBOUND|INSERT|INTO|K_PATHS|K_SHORTEST_PATHS|LET|LIKE|LIMIT|NONE|NOT|NULL|OR|OUTBOUND|REMOVE|REPLACE|RETURN|SHORTEST_PATH|SORT|UPDATE|UPSERT|WINDOW|WITH)\b/i, // pseudo keywords get a lookbehind to avoid false positives { pattern: /(^|[^\w.[])(?:KEEP|PRUNE|SEARCH|TO)\b/i, @@ -35,7 +35,11 @@ Prism.languages.aql = { pattern: /\.\./, alias: 'operator' }, - 'number': /(?:\B\.\d+|\b(?:0|[1-9]\d*)(?:\.\d+)?)(?:e[+-]?\d+)?/i, + 'number': [ + /\b0b[01]+/i, + /\b0x[0-9a-f]+/i, + /(?:\B\.\d+|\b(?:0|[1-9]\d*)(?:\.\d+)?)(?:e[+-]?\d+)?/i + ], 'operator': /\*{2,}|[=!]~|[!=<>]=?|&&|\|\||[-+*/%]/, 'punctuation': /::|[?.:,;()[\]{}]/ }; diff --git a/components/prism-aql.min.js b/components/prism-aql.min.js index 5fa9a63cd0..596c72b89e 100644 --- a/components/prism-aql.min.js +++ b/components/prism-aql.min.js @@ -1 +1 @@ -Prism.languages.aql={comment:/\/\/.*|\/\*[\s\S]*?\*\//,property:{pattern:/([{,]\s*)(?:(?!\d)\w+|(["'´`])(?:(?!\2)[^\\\r\n]|\\.)*\2)(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(["'´`])(?:(?!\1)[^\\\r\n]|\\.)*\1/,greedy:!0},variable:/@@?\w+/,keyword:[{pattern:/(\bWITH\s+)COUNT(?=\s+INTO\b)/i,lookbehind:!0},/\b(?:AGGREGATE|ALL|AND|ANY|ASC|COLLECT|DESC|DISTINCT|FILTER|FOR|GRAPH|IN|INBOUND|INSERT|INTO|K_SHORTEST_PATHS|LET|LIKE|LIMIT|NONE|NOT|NULL|OR|OUTBOUND|REMOVE|REPLACE|RETURN|SHORTEST_PATH|SORT|UPDATE|UPSERT|WITH)\b/i,{pattern:/(^|[^\w.[])(?:KEEP|PRUNE|SEARCH|TO)\b/i,lookbehind:!0},{pattern:/(^|[^\w.[])(?:CURRENT|NEW|OLD)\b/,lookbehind:!0},{pattern:/\bOPTIONS(?=\s*{)/i}],function:/(?!\d)\w+(?=\s*\()/,boolean:/(?:true|false)/i,range:{pattern:/\.\./,alias:"operator"},number:/(?:\B\.\d+|\b(?:0|[1-9]\d*)(?:\.\d+)?)(?:e[+-]?\d+)?/i,operator:/\*{2,}|[=!]~|[!=<>]=?|&&|\|\||[-+*/%]/,punctuation:/::|[?.:,;()[\]{}]/}; \ No newline at end of file +Prism.languages.aql={comment:/\/\/.*|\/\*[\s\S]*?\*\//,property:{pattern:/([{,]\s*)(?:(?!\d)\w+|(["'´`])(?:(?!\2)[^\\\r\n]|\\.)*\2)(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(["'´`])(?:(?!\1)[^\\\r\n]|\\.)*\1/,greedy:!0},variable:/@@?\w+/,keyword:[{pattern:/(\bWITH\s+)COUNT(?=\s+INTO\b)/i,lookbehind:!0},/\b(?:AGGREGATE|ALL|AND|ANY|ASC|COLLECT|DESC|DISTINCT|FILTER|FOR|GRAPH|IN|INBOUND|INSERT|INTO|K_PATHS|K_SHORTEST_PATHS|LET|LIKE|LIMIT|NONE|NOT|NULL|OR|OUTBOUND|REMOVE|REPLACE|RETURN|SHORTEST_PATH|SORT|UPDATE|UPSERT|WINDOW|WITH)\b/i,{pattern:/(^|[^\w.[])(?:KEEP|PRUNE|SEARCH|TO)\b/i,lookbehind:!0},{pattern:/(^|[^\w.[])(?:CURRENT|NEW|OLD)\b/,lookbehind:!0},{pattern:/\bOPTIONS(?=\s*{)/i}],function:/(?!\d)\w+(?=\s*\()/,boolean:/(?:true|false)/i,range:{pattern:/\.\./,alias:"operator"},number:[/\b0b[01]+/i,/\b0x[0-9a-f]+/i,/(?:\B\.\d+|\b(?:0|[1-9]\d*)(?:\.\d+)?)(?:e[+-]?\d+)?/i],operator:/\*{2,}|[=!]~|[!=<>]=?|&&|\|\||[-+*/%]/,punctuation:/::|[?.:,;()[\]{}]/}; \ No newline at end of file diff --git a/tests/languages/aql/keyword_feature.test b/tests/languages/aql/keyword_feature.test index 204d45785e..d095cb4ae9 100644 --- a/tests/languages/aql/keyword_feature.test +++ b/tests/languages/aql/keyword_feature.test @@ -16,6 +16,7 @@ IN INBOUND INSERT INTO +K_PATHS K_SHORTEST_PATHS LET LIKE @@ -32,6 +33,7 @@ SHORTEST_PATH SORT UPDATE UPSERT +WINDOW WITH KEEP @@ -69,6 +71,7 @@ OPTIONS ["keyword", "INBOUND"], ["keyword", "INSERT"], ["keyword", "INTO"], + ["keyword", "K_PATHS"], ["keyword", "K_SHORTEST_PATHS"], ["keyword", "LET"], ["keyword", "LIKE"], @@ -85,6 +88,7 @@ OPTIONS ["keyword", "SORT"], ["keyword", "UPDATE"], ["keyword", "UPSERT"], + ["keyword", "WINDOW"], ["keyword", "WITH"], ["keyword", "KEEP"], diff --git a/tests/languages/aql/number_feature.test b/tests/languages/aql/number_feature.test index b4720e08ad..4fd7800bf8 100644 --- a/tests/languages/aql/number_feature.test +++ b/tests/languages/aql/number_feature.test @@ -6,6 +6,8 @@ .5 4.87e103 4.87E103 +0b10101110 +0xabcdef02 ---------------------------------------------------- @@ -17,7 +19,9 @@ ["number", "0.5"], ["number", ".5"], ["number", "4.87e103"], - ["number", "4.87E103"] + ["number", "4.87E103"], + ["number", "0b10101110"], + ["number", "0xabcdef02"] ] ---------------------------------------------------- From 4c8b855d763b78fd65506f6f3d43355a156f03b5 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Sat, 3 Apr 2021 11:06:21 +0200 Subject: [PATCH 0780/1100] Tests: Added `--insert` and `--update` parameters to language test (#2809) --- test-suite.html | 51 ++++++++++++++++------ tests/helper/test-case.js | 55 ++++++++++++++---------- tests/helper/token-stream-transformer.js | 16 +++---- tests/run.js | 5 ++- 4 files changed, 81 insertions(+), 46 deletions(-) diff --git a/test-suite.html b/test-suite.html index e1079901ab..4fccf27cda 100644 --- a/test-suite.html +++ b/test-suite.html @@ -85,22 +85,20 @@

          Creating your test case file

          Writing your test

          -

          The structure of a test case file is as follows:

          -
          
          -... language snippet...
          -----
          -... the simplified token stream you expect ...
          -

          Your file is built up of two or three sections, separated by ten or more dashes -, starting at the begin of the line:

          +

          A test case file is built up of two or three sections separated by ten or more dashes - starting at the begin of the line. The sections are the following:

          +
          1. Your language snippet. The code you want to tokenize using Prism. (required)
          2. The simplified token stream you expect. Needs to be valid JSON. (optional)
            - If there no token stream defined, the test case will fail unless the --accept flag is present when running the test command (e.g. npm run test:languages -- --accept). If the flag is present and there is no expected token stream, the runner will insert the actual token stream into the test case file, changing it. + Instead of manually inserting the expected token stream yourself, prefer using the npm run test:languages -- --insert command. You can read more about this and related commands here.
            + If there no token stream defined, the test case will fail unless the --insert or --update flag is present when running the test command.
          3. -
          4. A comment explaining the test case. (optional)
          5. +
          6. A brief comment explaining the test case. (optional)
          -

          The easiest way would be to look at an existing test file:

          + +

          Here is an example:

          var a = 5;
           
           ----------------------------------------------------
          @@ -117,21 +115,48 @@ 

          Writing your test

          This is a comment explaining this test case.
          -

          The easy way

          +

          The easy way to write tests

          The easy way to create one or multiple new test case(s) is this:

            -
          1. Create a new file for a new test case in tests/languages/${language}.
          2. +
          3. Create a new test case file tests/languages/{language}/{test-case}.test.
          4. Insert the code you want to test (and nothing more).
          5. Repeat the first two steps for as many test cases as you want.
          6. -
          7. Run npm run test:languages -- --accept.
          8. +
          9. Run npm run test:languages -- --insert.
          10. +
          11. Done.
          12. +
          + +

          Updating existing test case files is easy too!

          + +
            +
          1. Run npm run test:languages -- --update.
          2. Done.

          This works by making the test runner insert the actual token stream of you test code as the expected token stream. Carefully check that the inserted token stream is actually what you expect or else the test is meaningless!

          -

          Optionally, you can then also add comments to test cases.

          +

          More details about the command can be found here.

          + +

          Insert and update expected token streams

          + +

          When creating and changing languages, their test files have to be updated to properly test the language. The rather tedious task of updating test files can be automated using the following commands:

          + +
            +
          • +
            npm run test:languages -- --insert
            + +

            This will insert the current actual token stream into all test files without an expected token stream. Test files that have an expected token stream are not affected.

            + +

            This command is intended to be used when you want to create new test files while not updating existing ones.

            +
          • +
          • +
            npm run test:languages -- --update
            + +

            Updates (overwrites) the expected token stream of all failing test files and all test files that do not have an expected token stream. The language tests are guaranteed to pass after running this command.

            +
          • +
          +

          Keep in mind: Both commands make it easy to create/update test files but this doesn't mean that the tests will be correct. Always carefully check the inserted/updated token streams!

          Explaining the simplified token stream

          diff --git a/tests/helper/test-case.js b/tests/helper/test-case.js index e3c6c830f8..acc75f2f17 100644 --- a/tests/helper/test-case.js +++ b/tests/helper/test-case.js @@ -53,9 +53,9 @@ module.exports = { * * @param {string} languageIdentifier * @param {string} filePath - * @param {boolean} acceptEmpty + * @param {"none" | "insert" | "update"} updateMode */ - runTestCase(languageIdentifier, filePath, acceptEmpty) { + runTestCase(languageIdentifier, filePath, updateMode) { const testCase = this.parseTestCaseFile(filePath); const usedLanguages = this.parseLanguageNames(languageIdentifier); @@ -64,30 +64,31 @@ module.exports = { // the first language is the main language to highlight const tokenStream = this.tokenize(Prism, testCase.code, usedLanguages.mainLanguage); - if (testCase.expectedTokenStream === null) { - // the test case doesn't have an expected value - if (!acceptEmpty) { - throw new Error('This test case doesn\'t have an expected toke n stream.' - + ' Either add the JSON of a token stream or run \`npm run test:languages -- --accept\`' - + ' to automatically add the current token stream.'); - } - + function updateFile() { // change the file const lineEnd = (/\r\n/.test(testCase.code) || !/\n/.test(testCase.code)) ? '\r\n' : '\n'; - const separator = "\n\n----------------------------------------------------\n\n"; - const pretty = TokenStreamTransformer.prettyprint(tokenStream) - .replace(/^( +)/gm, m => { - return "\t".repeat(m.length / 4); - }); + const separator = '\n\n----------------------------------------------------\n\n'; + const pretty = TokenStreamTransformer.prettyprint(tokenStream, '\t'); let content = testCase.code + separator + pretty; - if (testCase.comment) { - content += separator + testCase.comment; + if (testCase.comment.trim()) { + content += separator + testCase.comment.trim(); } - //content += '\n' + content += '\n' content = content.replace(/\r?\n/g, lineEnd); - fs.writeFileSync(filePath, content, "utf-8"); + fs.writeFileSync(filePath, content, 'utf-8'); + } + + if (testCase.expectedTokenStream === null) { + // the test case doesn't have an expected value + if (updateMode === 'none') { + throw new Error('This test case doesn\'t have an expected token stream.' + + ' Either add the JSON of a token stream or run \`npm run test:languages -- --insert\`' + + ' to automatically add the current token stream.'); + } + + updateFile(); } else { // there is an expected value const simplifiedTokenStream = TokenStreamTransformer.simplify(tokenStream); @@ -100,6 +101,11 @@ module.exports = { return; } + if (updateMode === 'update') { + updateFile(); + return; + } + // The index of the first difference between the expected token stream and the actual token stream. // The index is in the raw expected token stream JSON of the test case. const diffIndex = translateIndexIgnoreSpaces(testCase.expectedJson, expected, firstDiff(expected, actual)); @@ -108,11 +114,14 @@ module.exports = { const lineNumber = testCase.expectedLineOffset + expectedJsonLines.length; const tokenStreamStr = TokenStreamTransformer.prettyprint(tokenStream); - const message = "\n\nActual Token Stream:" + - "\n-----------------------------------------\n" + + const message = `\nThe expected token stream differs from the actual token stream.` + + ` Either change the ${usedLanguages.mainLanguage} language or update the expected token stream.` + + ` Run \`npm run test:languages -- --update\` to update all missing or incorrect expected token streams.` + + `\n\n\nActual Token Stream:` + + `\n-----------------------------------------\n` + tokenStreamStr + - "\n-----------------------------------------\n" + - "File: " + filePath + ":" + lineNumber + ":" + columnNumber + "\n\n"; + `\n-----------------------------------------\n` + + `File: ${filePath}:${lineNumber}:${columnNumber}\n\n`; assert.deepEqual(simplifiedTokenStream, testCase.expectedTokenStream, testCase.comment + message); } diff --git a/tests/helper/token-stream-transformer.js b/tests/helper/token-stream-transformer.js index 52bb2ed615..834c98b353 100644 --- a/tests/helper/token-stream-transformer.js +++ b/tests/helper/token-stream-transformer.js @@ -50,10 +50,11 @@ module.exports = { /** * @param {TokenStream} tokenStream + * @param {string} [indentation] * @returns {string} */ - prettyprint(tokenStream) { - return printPrettyTokenStream(toPrettyTokenStream(tokenStream)); + prettyprint(tokenStream, indentation) { + return printPrettyTokenStream(toPrettyTokenStream(tokenStream), undefined, indentation); } }; @@ -219,13 +220,12 @@ function prettyFormat(prettyStream) { /** * @param {PrettyTokenStream} prettyStream * @param {number} [indentationLevel] + * @param {string} [indentationChar] * @returns {string} */ -function printPrettyTokenStream(prettyStream, indentationLevel = 1) { - const indentChar = ' '; - +function printPrettyTokenStream(prettyStream, indentationLevel = 1, indentationChar = ' ') { // can't use tabs because the console will convert one tab to four spaces - const indentation = new Array(indentationLevel + 1).join(indentChar); + const indentation = new Array(indentationLevel + 1).join(indentationChar); let out = ''; out += '[\n'; @@ -265,7 +265,7 @@ function printPrettyTokenStream(prettyStream, indentationLevel = 1) { out += JSON.stringify(content); } else { // token stream - out += printPrettyTokenStream(content, indentationLevel + 1); + out += printPrettyTokenStream(content, indentationLevel + 1, indentationChar); } out += ']'; @@ -275,7 +275,7 @@ function printPrettyTokenStream(prettyStream, indentationLevel = 1) { out += lineEnd; } }) - out += indentation.substr(indentChar.length) + ']' + out += indentation.substr(indentationChar.length) + ']' return out; } diff --git a/tests/run.js b/tests/run.js index 4803dde72b..ace86f0424 100644 --- a/tests/run.js +++ b/tests/run.js @@ -12,7 +12,8 @@ const testSuite = // load complete test suite : TestDiscovery.loadAllTests(__dirname + "/languages"); -const accept = !!argv.accept; +const insert = !!argv.accept || !!argv.insert; +const update = !!argv.update; // define tests for all tests in all languages in the test suite for (const language in testSuite) { @@ -29,7 +30,7 @@ for (const language in testSuite) { it("– should pass test case '" + fileName + "'", function () { if (path.extname(filePath) === '.test') { - TestCase.runTestCase(language, filePath, accept); + TestCase.runTestCase(language, filePath, update ? "update" : insert ? "insert" : "none"); } else { TestCase.runTestsWithHooks(language, require(filePath)); } From 01b7b6f704fd8c1197f3b8a45c9c038bd92afe01 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Sat, 3 Apr 2021 11:08:56 +0200 Subject: [PATCH 0781/1100] Copy to Clipboard: Fixed `clipboard.writeText` not working inside iFrames (#2826) --- plugins/copy-to-clipboard/prism-copy-to-clipboard.js | 5 ++++- plugins/copy-to-clipboard/prism-copy-to-clipboard.min.js | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/plugins/copy-to-clipboard/prism-copy-to-clipboard.js b/plugins/copy-to-clipboard/prism-copy-to-clipboard.js index 151c2df223..7b1aa2bdf2 100644 --- a/plugins/copy-to-clipboard/prism-copy-to-clipboard.js +++ b/plugins/copy-to-clipboard/prism-copy-to-clipboard.js @@ -63,7 +63,10 @@ /** @param {CopyInfo} copyInfo */ function copyTextToClipboard(copyInfo) { if (navigator.clipboard) { - navigator.clipboard.writeText(copyInfo.getText()).then(copyInfo.success, copyInfo.error); + navigator.clipboard.writeText(copyInfo.getText()).then(copyInfo.success, function() { + // try the fallback in case `writeText` didn't work + fallbackCopyTextToClipboard(copyInfo); + }); } else { fallbackCopyTextToClipboard(copyInfo); } diff --git a/plugins/copy-to-clipboard/prism-copy-to-clipboard.min.js b/plugins/copy-to-clipboard/prism-copy-to-clipboard.min.js index 1405007a90..4604e93994 100644 --- a/plugins/copy-to-clipboard/prism-copy-to-clipboard.min.js +++ b/plugins/copy-to-clipboard/prism-copy-to-clipboard.min.js @@ -1 +1 @@ -!function(){function u(t,e){t.addEventListener("click",function(){!function(t){navigator.clipboard?navigator.clipboard.writeText(t.getText()).then(t.success,t.error):function(e){var t=document.createElement("textarea");t.value=e.getText(),t.style.top="0",t.style.left="0",t.style.position="fixed",document.body.appendChild(t),t.focus(),t.select();try{var o=document.execCommand("copy");setTimeout(function(){o?e.success():e.error()},1)}catch(t){setTimeout(function(){e.error(t)},1)}document.body.removeChild(t)}(t)}(e)})}"undefined"!=typeof Prism&&"undefined"!=typeof document&&(Prism.plugins.toolbar?Prism.plugins.toolbar.registerButton("copy-to-clipboard",function(t){var e=t.element,o=function(t){var e={copy:"Copy","copy-error":"Press Ctrl+C to copy","copy-success":"Copied!","copy-timeout":5e3};for(var o in e){for(var n="data-prismjs-"+o,r=t;r&&!r.hasAttribute(n);)r=r.parentElement;r&&(e[o]=r.getAttribute(n))}return e}(e),n=document.createElement("button");n.className="copy-to-clipboard-button",n.setAttribute("type","button");var r=document.createElement("span");return n.appendChild(r),i("copy"),u(n,{getText:function(){return e.textContent},success:function(){i("copy-success"),c()},error:function(){i("copy-error"),setTimeout(function(){!function(t){window.getSelection().selectAllChildren(t)}(e)},1),c()}}),n;function c(){setTimeout(function(){i("copy")},o["copy-timeout"])}function i(t){r.textContent=o[t],n.setAttribute("data-copy-state",t)}}):console.warn("Copy to Clipboard plugin loaded before Toolbar plugin."))}(); \ No newline at end of file +!function(){function u(t,e){t.addEventListener("click",function(){!function(t){navigator.clipboard?navigator.clipboard.writeText(t.getText()).then(t.success,function(){o(t)}):o(t)}(e)})}function o(e){var t=document.createElement("textarea");t.value=e.getText(),t.style.top="0",t.style.left="0",t.style.position="fixed",document.body.appendChild(t),t.focus(),t.select();try{var o=document.execCommand("copy");setTimeout(function(){o?e.success():e.error()},1)}catch(t){setTimeout(function(){e.error(t)},1)}document.body.removeChild(t)}"undefined"!=typeof Prism&&"undefined"!=typeof document&&(Prism.plugins.toolbar?Prism.plugins.toolbar.registerButton("copy-to-clipboard",function(t){var e=t.element,o=function(t){var e={copy:"Copy","copy-error":"Press Ctrl+C to copy","copy-success":"Copied!","copy-timeout":5e3};for(var o in e){for(var n="data-prismjs-"+o,c=t;c&&!c.hasAttribute(n);)c=c.parentElement;c&&(e[o]=c.getAttribute(n))}return e}(e),n=document.createElement("button");n.className="copy-to-clipboard-button",n.setAttribute("type","button");var c=document.createElement("span");return n.appendChild(c),i("copy"),u(n,{getText:function(){return e.textContent},success:function(){i("copy-success"),r()},error:function(){i("copy-error"),setTimeout(function(){!function(t){window.getSelection().selectAllChildren(t)}(e)},1),r()}}),n;function r(){setTimeout(function(){i("copy")},o["copy-timeout"])}function i(t){c.textContent=o[t],n.setAttribute("data-copy-state",t)}}):console.warn("Copy to Clipboard plugin loaded before Toolbar plugin."))}(); \ No newline at end of file From 31cc2142f9b36490ec040d4ccf1403bfbc7813f9 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Sat, 3 Apr 2021 11:10:00 +0200 Subject: [PATCH 0782/1100] TypeScript: Added support for decorators (#2820) --- components/prism-typescript.js | 10 ++ components/prism-typescript.min.js | 2 +- .../typescript/decorator_feature.test | 121 ++++++++++++++++++ tests/languages/typescript/issue2819.test | 38 ++++++ 4 files changed, 170 insertions(+), 1 deletion(-) create mode 100644 tests/languages/typescript/decorator_feature.test create mode 100644 tests/languages/typescript/issue2819.test diff --git a/components/prism-typescript.js b/components/prism-typescript.js index 1192a5414b..37fef14c67 100644 --- a/components/prism-typescript.js +++ b/components/prism-typescript.js @@ -22,6 +22,16 @@ Prism.languages.typescript['class-name'].inside = typeInside; Prism.languages.insertBefore('typescript', 'function', { + 'decorator': { + pattern: /@[$\w\xA0-\uFFFF]+/, + inside: { + 'at': { + pattern: /^@/, + alias: 'operator' + }, + 'function': /^[\s\S]+/ + } + }, 'generic-function': { // e.g. foo( ... pattern: /#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/, diff --git a/components/prism-typescript.min.js b/components/prism-typescript.min.js index 67f988f3b5..d7dc6ff144 100644 --- a/components/prism-typescript.min.js +++ b/components/prism-typescript.min.js @@ -1 +1 @@ -!function(e){e.languages.typescript=e.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},keyword:/\b(?:abstract|as|asserts|async|await|break|case|catch|class|const|constructor|continue|debugger|declare|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|is|keyof|let|module|namespace|new|null|of|package|private|protected|public|readonly|return|require|set|static|super|switch|this|throw|try|type|typeof|undefined|var|void|while|with|yield)\b/,builtin:/\b(?:string|Function|any|number|boolean|Array|symbol|console|Promise|unknown|never)\b/}),delete e.languages.typescript.parameter;var n=e.languages.extend("typescript",{});delete n["class-name"],e.languages.typescript["class-name"].inside=n,e.languages.insertBefore("typescript","function",{"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:n}}}}),e.languages.ts=e.languages.typescript}(Prism); \ No newline at end of file +!function(e){e.languages.typescript=e.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},keyword:/\b(?:abstract|as|asserts|async|await|break|case|catch|class|const|constructor|continue|debugger|declare|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|is|keyof|let|module|namespace|new|null|of|package|private|protected|public|readonly|return|require|set|static|super|switch|this|throw|try|type|typeof|undefined|var|void|while|with|yield)\b/,builtin:/\b(?:string|Function|any|number|boolean|Array|symbol|console|Promise|unknown|never)\b/}),delete e.languages.typescript.parameter;var t=e.languages.extend("typescript",{});delete t["class-name"],e.languages.typescript["class-name"].inside=t,e.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:t}}}}),e.languages.ts=e.languages.typescript}(Prism); \ No newline at end of file diff --git a/tests/languages/typescript/decorator_feature.test b/tests/languages/typescript/decorator_feature.test new file mode 100644 index 0000000000..9fc7975792 --- /dev/null +++ b/tests/languages/typescript/decorator_feature.test @@ -0,0 +1,121 @@ +@f @g x + +@f +@g +x + +@sealed +class ExampleClass { + + @first() + @second() + method() {} + + @enumerable(false) + greet() { + return "Hello, " + this.greeting; + } + + @configurable(false) + get y() { + return this._y; + } + +} + +---------------------------------------------------- + +[ + ["decorator", [ + ["at", "@"], + ["function", "f"] + ]], + ["decorator", [ + ["at", "@"], + ["function", "g"] + ]], + " x\r\n\r\n", + + ["decorator", [ + ["at", "@"], + ["function", "f"] + ]], + ["decorator", [ + ["at", "@"], + ["function", "g"] + ]], + "\r\nx\r\n\r\n", + + ["decorator", [ + ["at", "@"], + ["function", "sealed"] + ]], + ["keyword", "class"], ["class-name", ["ExampleClass"]], ["punctuation", "{"], + + ["decorator", [ + ["at", "@"], + ["function", "first"] + ]], + ["punctuation", "("], + ["punctuation", ")"], + + ["decorator", [ + ["at", "@"], + ["function", "second"] + ]], + ["punctuation", "("], + ["punctuation", ")"], + + ["function", "method"], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", "{"], + ["punctuation", "}"], + + ["decorator", [ + ["at", "@"], + ["function", "enumerable"] + ]], + ["punctuation", "("], + ["boolean", "false"], + ["punctuation", ")"], + + ["function", "greet"], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", "{"], + + ["keyword", "return"], + ["string", "\"Hello, \""], + ["operator", "+"], + ["keyword", "this"], + ["punctuation", "."], + "greeting", + ["punctuation", ";"], + + ["punctuation", "}"], + + ["decorator", [ + ["at", "@"], + ["function", "configurable"] + ]], + ["punctuation", "("], + ["boolean", "false"], + ["punctuation", ")"], + + ["keyword", "get"], + ["function", "y"], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", "{"], + + ["keyword", "return"], + ["keyword", "this"], + ["punctuation", "."], + "_y", + ["punctuation", ";"], + + ["punctuation", "}"], + + ["punctuation", "}"] +] \ No newline at end of file diff --git a/tests/languages/typescript/issue2819.test b/tests/languages/typescript/issue2819.test new file mode 100644 index 0000000000..a2fd061dfc --- /dev/null +++ b/tests/languages/typescript/issue2819.test @@ -0,0 +1,38 @@ +@Component({ + selector: 'my-app', + template: `
          Hello World!
          ` +}) +export class AppComponent {} + +---------------------------------------------------- + +[ + ["decorator", [ + ["at", "@"], + ["function", "Component"] + ]], + ["punctuation", "("], + ["punctuation", "{"], + + "\r\n selector", + ["operator", ":"], + ["string", "'my-app'"], + ["punctuation", ","], + + "\r\n template", + ["operator", ":"], + ["template-string", [ + ["template-punctuation", "`"], + ["string", "
          Hello World!
          "], + ["template-punctuation", "`"] + ]], + + ["punctuation", "}"], + ["punctuation", ")"], + + ["keyword", "export"], + ["keyword", "class"], + ["class-name", ["AppComponent"]], + ["punctuation", "{"], + ["punctuation", "}"] +] \ No newline at end of file From 7e8cd40d720814f8bdd5abc843dabdc72cb2aab8 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Sat, 3 Apr 2021 11:14:13 +0200 Subject: [PATCH 0783/1100] PHP: Fixed methods with keyword names + minor improvements (#2818) --- components/prism-php.js | 36 +- components/prism-php.min.js | 2 +- tests/languages/php/attribute_feature.test | 619 ++++++++++---------- tests/languages/php/class-name_feature.test | 12 +- tests/languages/php/delimiter_feature.test | 8 +- tests/languages/php/function_feature.test | 136 +++++ tests/languages/php/keyword_feature.test | 18 +- tests/languages/php/type_feature.test | 236 ++++++-- 8 files changed, 703 insertions(+), 364 deletions(-) create mode 100644 tests/languages/php/function_feature.test diff --git a/components/prism-php.js b/components/prism-php.js index e11cd9cdea..3db55c2aad 100644 --- a/components/prism-php.js +++ b/components/prism-php.js @@ -48,6 +48,11 @@ lookbehind: true, alias: 'class-name' }, + 'function-definition': { + pattern: /(\bfunction\s+)[a-z_]\w*(?=\s*\()/i, + lookbehind: true, + alias: 'function' + }, 'keyword': [ { pattern: /(\(\s*)\b(?:bool|boolean|int|integer|float|string|object|array)\b(?=\s*\))/i, @@ -95,7 +100,21 @@ alias: 'static-context', greedy: true }, - /\b(?:__halt_compiler|abstract|and|array|as|break|callable|case|catch|class|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|enum|eval|exit|extends|final|finally|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|namespace|match|new|or|parent|print|private|protected|public|require|require_once|return|self|static|switch|throw|trait|try|unset|use|var|while|xor|yield)\b/i + { + // yield from + pattern: /(\byield\s+)from\b/i, + lookbehind: true + }, + // `class` is always a keyword unlike other keywords + /\bclass\b/i, + { + // https://www.php.net/manual/en/reserved.keywords.php + // + // keywords cannot be preceded by "->" + // the complex lookbehind means `(?|::)\s*)` + pattern: /((?:^|[^\s>:]|(?:^|[^-])>|(?:^|[^:]):)\s*)\b(?:__halt_compiler|abstract|and|array|as|break|callable|case|catch|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|enum|eval|exit|extends|final|finally|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|namespace|match|new|or|parent|print|private|protected|public|require|require_once|return|self|static|switch|throw|trait|try|unset|use|var|while|xor|yield)\b/i, + lookbehind: true + } ], 'argument-name': { pattern: /([(,]\s+)\b[a-z_]\w*(?=\s*:(?!:))/i, @@ -200,9 +219,9 @@ } ], 'constant': constant, - 'function': /\w+\s*(?=\()/, + 'function': /\b\w+(?=\s*\()/, 'property': { - pattern: /(->)[\w]+/, + pattern: /(->\s*)\w+/, lookbehind: true }, 'number': number, @@ -243,7 +262,7 @@ 'punctuation': /^<<<"?|[";]$/ } }, - 'interpolation': string_interpolation // See below + 'interpolation': string_interpolation } }, { @@ -261,16 +280,13 @@ alias: 'double-quoted-string', greedy: true, inside: { - 'interpolation': string_interpolation // See below + 'interpolation': string_interpolation } } ]; Prism.languages.insertBefore('php', 'variable', { 'string': string, - }); - - Prism.languages.insertBefore('php', 'variable', { 'attribute': { pattern: /#\[(?:[^"'\/#]|\/(?![*/])|\/\/.*$|#(?!\[).*$|\/\*(?:[^*]|\*(?!\/))*\*\/|"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*')+\](?=\s*[a-z$#])/mi, greedy: true, @@ -316,7 +332,7 @@ }, }); - Prism.hooks.add('before-tokenize', function(env) { + Prism.hooks.add('before-tokenize', function (env) { if (!/<\?/.test(env.code)) { return; } @@ -325,7 +341,7 @@ Prism.languages['markup-templating'].buildPlaceholders(env, 'php', phpPattern); }); - Prism.hooks.add('after-tokenize', function(env) { + Prism.hooks.add('after-tokenize', function (env) { Prism.languages['markup-templating'].tokenizePlaceholders(env, 'php'); }); diff --git a/components/prism-php.min.js b/components/prism-php.min.js index c3b051295a..31a56ebb16 100644 --- a/components/prism-php.min.js +++ b/components/prism-php.min.js @@ -1 +1 @@ -!function(a){var e=/\/\*[\s\S]*?\*\/|\/\/.*|#(?!\[).*/,t=[{pattern:/\b(?:false|true)\b/i,alias:"boolean"},{pattern:/(::\s*)\b[a-z_]\w*\b(?!\s*\()/i,greedy:!0,lookbehind:!0},{pattern:/(\b(?:case|const)\s+)\b[a-z_]\w*(?=\s*[;=])/i,greedy:!0,lookbehind:!0},/\b(?:null)\b/i,/\b[A-Z_][A-Z0-9_]*\b(?!\s*\()/],i=/\b0b[01]+(?:_[01]+)*\b|\b0o[0-7]+(?:_[0-7]+)*\b|\b0x[\da-f]+(?:_[\da-f]+)*\b|(?:\b\d+(?:_\d+)*\.?(?:\d+(?:_\d+)*)?|\B\.\d+)(?:e[+-]?\d+)?/i,n=/|\?\?=?|\.{3}|\??->|[!=]=?=?|::|\*\*=?|--|\+\+|&&|\|\||<<|>>|[?~]|[/^|%*&<>.+-]=?/,s=/[{}\[\](),:;]/;a.languages.php={delimiter:{pattern:/\?>$|^<\?(?:php(?=\s)|=)?/i,alias:"important"},comment:e,variable:/\$+(?:\w+\b|(?={))/i,package:{pattern:/(namespace\s+|use\s+(?:function\s+)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,lookbehind:!0,inside:{punctuation:/\\/}},"class-name-definition":{pattern:/(\b(?:class|enum|interface|trait)\s+)\b[a-z_]\w*(?!\\)\b/i,lookbehind:!0,alias:"class-name"},keyword:[{pattern:/(\(\s*)\b(?:bool|boolean|int|integer|float|string|object|array)\b(?=\s*\))/i,alias:"type-casting",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)\b(?:bool|int|float|string|object|array(?!\s*\()|mixed|self|static|callable|iterable|(?:null|false)(?=\s*\|))\b(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*[a-z0-9_|]\|\s*)(?:null|false)\b(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b(?:bool|int|float|string|object|void|array(?!\s*\()|mixed|self|static|callable|iterable|(?:null|false)(?=\s*\|))\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?[a-z0-9_|]\|\s*)(?:null|false)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/\b(?:bool|int|float|string|object|void|array(?!\s*\()|mixed|iterable|(?:null|false)(?=\s*\|))\b/i,alias:"type-declaration",greedy:!0},{pattern:/(\|\s*)(?:null|false)\b/i,alias:"type-declaration",greedy:!0,lookbehind:!0},{pattern:/\b(?:parent|self|static)(?=\s*::)/i,alias:"static-context",greedy:!0},/\b(?:__halt_compiler|abstract|and|array|as|break|callable|case|catch|class|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|enum|eval|exit|extends|final|finally|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|namespace|match|new|or|parent|print|private|protected|public|require|require_once|return|self|static|switch|throw|trait|try|unset|use|var|while|xor|yield)\b/i],"argument-name":{pattern:/([(,]\s+)\b[a-z_]\w*(?=\s*:(?!:))/i,lookbehind:!0},"class-name":[{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self|\s+static))\s+|\bcatch\s*\()\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/(\|\s*)\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/\b[a-z_]\w*(?!\\)\b(?=\s*\|)/i,greedy:!0},{pattern:/(\|\s*)(?:\\?\b[a-z_]\w*)+\b/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(?:\\?\b[a-z_]\w*)+\b(?=\s*\|)/i,alias:"class-name-fully-qualified",greedy:!0,inside:{punctuation:/\\/}},{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self\b|\s+static\b))\s+|\bcatch\s*\()(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*\$)/i,alias:"type-declaration",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-declaration"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*::)/i,alias:["class-name-fully-qualified","static-context"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/([(,?]\s*)[a-z_]\w*(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-hint"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b[a-z_]\w*(?!\\)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:["class-name-fully-qualified","return-type"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:t,function:/\w+\s*(?=\()/,property:{pattern:/(->)[\w]+/,lookbehind:!0},number:i,operator:n,punctuation:s};var l={pattern:/{\$(?:{(?:{[^{}]+}|[^{}]+)}|[^{}])+}|(^|[^\\{])\$+(?:\w+(?:\[[^\r\n\[\]]+\]|->\w+)*)/,lookbehind:!0,inside:a.languages.php},r=[{pattern:/<<<'([^']+)'[\r\n](?:.*[\r\n])*?\1;/,alias:"nowdoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<'[^']+'|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<'?|[';]$/}}}},{pattern:/<<<(?:"([^"]+)"[\r\n](?:.*[\r\n])*?\1;|([a-z_]\w*)[\r\n](?:.*[\r\n])*?\2;)/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<(?:"[^"]+"|[a-z_]\w*)|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<"?|[";]$/}},interpolation:l}},{pattern:/`(?:\\[\s\S]|[^\\`])*`/,alias:"backtick-quoted-string",greedy:!0},{pattern:/'(?:\\[\s\S]|[^\\'])*'/,alias:"single-quoted-string",greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,alias:"double-quoted-string",greedy:!0,inside:{interpolation:l}}];a.languages.insertBefore("php","variable",{string:r}),a.languages.insertBefore("php","variable",{attribute:{pattern:/#\[(?:[^"'\/#]|\/(?![*/])|\/\/.*$|#(?!\[).*$|\/\*(?:[^*]|\*(?!\/))*\*\/|"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*')+\](?=\s*[a-z$#])/im,greedy:!0,inside:{"attribute-content":{pattern:/^(#\[)[\s\S]+(?=]$)/,lookbehind:!0,inside:{comment:e,string:r,"attribute-class-name":[{pattern:/([^:]|^)\b[a-z_]\w*(?!\\)\b/i,alias:"class-name",greedy:!0,lookbehind:!0},{pattern:/([^:]|^)(?:\\?\b[a-z_]\w*)+/i,alias:["class-name","class-name-fully-qualified"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:t,number:i,operator:n,punctuation:s}},delimiter:{pattern:/^#\[|]$/,alias:"punctuation"}}}}),a.hooks.add("before-tokenize",function(e){if(/<\?/.test(e.code)){a.languages["markup-templating"].buildPlaceholders(e,"php",/<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#(?!\[))(?:[^?\n\r]|\?(?!>))*(?=$|\?>|[\r\n])|#\[|\/\*(?:[^*]|\*(?!\/))*(?:\*\/|$))*?(?:\?>|$)/gi)}}),a.hooks.add("after-tokenize",function(e){a.languages["markup-templating"].tokenizePlaceholders(e,"php")})}(Prism); \ No newline at end of file +!function(a){var e=/\/\*[\s\S]*?\*\/|\/\/.*|#(?!\[).*/,t=[{pattern:/\b(?:false|true)\b/i,alias:"boolean"},{pattern:/(::\s*)\b[a-z_]\w*\b(?!\s*\()/i,greedy:!0,lookbehind:!0},{pattern:/(\b(?:case|const)\s+)\b[a-z_]\w*(?=\s*[;=])/i,greedy:!0,lookbehind:!0},/\b(?:null)\b/i,/\b[A-Z_][A-Z0-9_]*\b(?!\s*\()/],i=/\b0b[01]+(?:_[01]+)*\b|\b0o[0-7]+(?:_[0-7]+)*\b|\b0x[\da-f]+(?:_[\da-f]+)*\b|(?:\b\d+(?:_\d+)*\.?(?:\d+(?:_\d+)*)?|\B\.\d+)(?:e[+-]?\d+)?/i,n=/|\?\?=?|\.{3}|\??->|[!=]=?=?|::|\*\*=?|--|\+\+|&&|\|\||<<|>>|[?~]|[/^|%*&<>.+-]=?/,s=/[{}\[\](),:;]/;a.languages.php={delimiter:{pattern:/\?>$|^<\?(?:php(?=\s)|=)?/i,alias:"important"},comment:e,variable:/\$+(?:\w+\b|(?={))/i,package:{pattern:/(namespace\s+|use\s+(?:function\s+)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,lookbehind:!0,inside:{punctuation:/\\/}},"class-name-definition":{pattern:/(\b(?:class|enum|interface|trait)\s+)\b[a-z_]\w*(?!\\)\b/i,lookbehind:!0,alias:"class-name"},"function-definition":{pattern:/(\bfunction\s+)[a-z_]\w*(?=\s*\()/i,lookbehind:!0,alias:"function"},keyword:[{pattern:/(\(\s*)\b(?:bool|boolean|int|integer|float|string|object|array)\b(?=\s*\))/i,alias:"type-casting",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)\b(?:bool|int|float|string|object|array(?!\s*\()|mixed|self|static|callable|iterable|(?:null|false)(?=\s*\|))\b(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*[a-z0-9_|]\|\s*)(?:null|false)\b(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b(?:bool|int|float|string|object|void|array(?!\s*\()|mixed|self|static|callable|iterable|(?:null|false)(?=\s*\|))\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?[a-z0-9_|]\|\s*)(?:null|false)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/\b(?:bool|int|float|string|object|void|array(?!\s*\()|mixed|iterable|(?:null|false)(?=\s*\|))\b/i,alias:"type-declaration",greedy:!0},{pattern:/(\|\s*)(?:null|false)\b/i,alias:"type-declaration",greedy:!0,lookbehind:!0},{pattern:/\b(?:parent|self|static)(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(\byield\s+)from\b/i,lookbehind:!0},/\bclass\b/i,{pattern:/((?:^|[^\s>:]|(?:^|[^-])>|(?:^|[^:]):)\s*)\b(?:__halt_compiler|abstract|and|array|as|break|callable|case|catch|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|enum|eval|exit|extends|final|finally|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|namespace|match|new|or|parent|print|private|protected|public|require|require_once|return|self|static|switch|throw|trait|try|unset|use|var|while|xor|yield)\b/i,lookbehind:!0}],"argument-name":{pattern:/([(,]\s+)\b[a-z_]\w*(?=\s*:(?!:))/i,lookbehind:!0},"class-name":[{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self|\s+static))\s+|\bcatch\s*\()\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/(\|\s*)\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/\b[a-z_]\w*(?!\\)\b(?=\s*\|)/i,greedy:!0},{pattern:/(\|\s*)(?:\\?\b[a-z_]\w*)+\b/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(?:\\?\b[a-z_]\w*)+\b(?=\s*\|)/i,alias:"class-name-fully-qualified",greedy:!0,inside:{punctuation:/\\/}},{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self\b|\s+static\b))\s+|\bcatch\s*\()(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*\$)/i,alias:"type-declaration",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-declaration"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*::)/i,alias:["class-name-fully-qualified","static-context"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/([(,?]\s*)[a-z_]\w*(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-hint"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b[a-z_]\w*(?!\\)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:["class-name-fully-qualified","return-type"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:t,function:/\b\w+(?=\s*\()/,property:{pattern:/(->\s*)\w+/,lookbehind:!0},number:i,operator:n,punctuation:s};var l={pattern:/{\$(?:{(?:{[^{}]+}|[^{}]+)}|[^{}])+}|(^|[^\\{])\$+(?:\w+(?:\[[^\r\n\[\]]+\]|->\w+)*)/,lookbehind:!0,inside:a.languages.php},r=[{pattern:/<<<'([^']+)'[\r\n](?:.*[\r\n])*?\1;/,alias:"nowdoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<'[^']+'|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<'?|[';]$/}}}},{pattern:/<<<(?:"([^"]+)"[\r\n](?:.*[\r\n])*?\1;|([a-z_]\w*)[\r\n](?:.*[\r\n])*?\2;)/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<(?:"[^"]+"|[a-z_]\w*)|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<"?|[";]$/}},interpolation:l}},{pattern:/`(?:\\[\s\S]|[^\\`])*`/,alias:"backtick-quoted-string",greedy:!0},{pattern:/'(?:\\[\s\S]|[^\\'])*'/,alias:"single-quoted-string",greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,alias:"double-quoted-string",greedy:!0,inside:{interpolation:l}}];a.languages.insertBefore("php","variable",{string:r,attribute:{pattern:/#\[(?:[^"'\/#]|\/(?![*/])|\/\/.*$|#(?!\[).*$|\/\*(?:[^*]|\*(?!\/))*\*\/|"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*')+\](?=\s*[a-z$#])/im,greedy:!0,inside:{"attribute-content":{pattern:/^(#\[)[\s\S]+(?=]$)/,lookbehind:!0,inside:{comment:e,string:r,"attribute-class-name":[{pattern:/([^:]|^)\b[a-z_]\w*(?!\\)\b/i,alias:"class-name",greedy:!0,lookbehind:!0},{pattern:/([^:]|^)(?:\\?\b[a-z_]\w*)+/i,alias:["class-name","class-name-fully-qualified"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:t,number:i,operator:n,punctuation:s}},delimiter:{pattern:/^#\[|]$/,alias:"punctuation"}}}}),a.hooks.add("before-tokenize",function(e){if(/<\?/.test(e.code)){a.languages["markup-templating"].buildPlaceholders(e,"php",/<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#(?!\[))(?:[^?\n\r]|\?(?!>))*(?=$|\?>|[\r\n])|#\[|\/\*(?:[^*]|\*(?!\/))*(?:\*\/|$))*?(?:\?>|$)/gi)}}),a.hooks.add("after-tokenize",function(e){a.languages["markup-templating"].tokenizePlaceholders(e,"php")})}(Prism); \ No newline at end of file diff --git a/tests/languages/php/attribute_feature.test b/tests/languages/php/attribute_feature.test index 6ce9a187cd..a7c2956ae7 100644 --- a/tests/languages/php/attribute_feature.test +++ b/tests/languages/php/attribute_feature.test @@ -57,306 +57,325 @@ function main() {} ---------------------------------------------------- [ - ["comment", "// #[Foo]"], - "\r\n\r\n#", - ["punctuation", "["], - ["punctuation", "]"], - - ["attribute", [ - ["delimiter", "#["], - ["attribute-content", [ - ["comment", "// something ]"], - ["attribute-class-name", "Foo"], - ["punctuation", ","], - ["comment", "/* something\r\n\telse #[] */"], - ["attribute-class-name", "Bar"], - ["comment", "# shell comments aren't confusing at all in here"] - ]], - ["delimiter", "]"] - ]], - - ["attribute", [ - ["delimiter", "#["], - ["attribute-content", [ - ["attribute-class-name", "Foo"], - ["punctuation", "("], - ["punctuation", "["], - ["number", "0"], - ["punctuation", ","], - ["number", "1"], - ["punctuation", "]"], - ["punctuation", ")"] - ]], - ["delimiter", "]"] - ]], - - ["attribute", [ - ["delimiter", "#["], - ["attribute-content", [ - ["attribute-class-name", "Foo"], - ["punctuation", "("], - ["punctuation", "["], - ["number", "1"], - ["operator", "=>"], - ["punctuation", "["], - ["number", "0"], - ["punctuation", ","], - ["number", "1"], - ["punctuation", "]"], - ["punctuation", ","], - ["number", "2"], - ["operator", "=>"], - ["punctuation", "["], - ["number", "2"], - ["punctuation", ","], - ["number", "3"], - ["punctuation", "]"], - ["punctuation", ","], - ["number", "3"], - ["operator", "=>"], - ["punctuation", "["], - ["punctuation", "["], - ["number", "0"], - ["punctuation", ","], - ["number", "1"], - ["punctuation", "]"], - ["punctuation", ","], - ["punctuation", "["], - ["number", "2"], - ["punctuation", ","], - ["number", "3"], - ["punctuation", "]"], - ["punctuation", "]"], - ["punctuation", "]"], - ["punctuation", ")"] - ]], - ["delimiter", "]"] - ]], - - ["attribute", [ - ["delimiter", "#["], - ["attribute-content", [ - ["attribute-class-name", "Foo"] - ]], - ["delimiter", "]"] - ]], - ["attribute", [ - ["delimiter", "#["], - ["attribute-content", [ - ["attribute-class-name", [ - "Foo", - ["punctuation", "\\"], - "Bar", - ["punctuation", "\\"], - "Baz" - ]] - ]], - ["delimiter", "]"] - ]], - ["attribute", [ - ["delimiter", "#["], - ["attribute-content", [ - ["attribute-class-name", "Route"], - ["punctuation", "("], - ["attribute-class-name", "Http"], - ["operator", "::"], - ["constant", "POST"], - ["punctuation", ","], - ["string", "'/products/create'"], - ["punctuation", ","], - ["number", "1"], - ["punctuation", ")"] - ]], - ["delimiter", "]"] - ]], - ["attribute", [ - ["delimiter", "#["], - ["attribute-content", [ - ["attribute-class-name", [ - "Http", - ["punctuation", "\\"], - "Route" - ]], - ["punctuation", "("], - ["attribute-class-name", "Http"], - ["operator", "::"], - ["constant", "POST"], - ["punctuation", ","], - ["string", "'/products/create'"], - ["punctuation", ","], - ["number", "1"], - ["punctuation", ")"], - ["punctuation", ","], - ["attribute-class-name", [ - "Foo", - ["punctuation", "\\"], - "Bar", - ["punctuation", "\\"], - "Baz" - ]], - ["punctuation", ","], - ["attribute-class-name", "AttributeFoo"], - ["punctuation", "("], - ["string", "'value'"], - ["punctuation", ")"] - ]], - ["delimiter", "]"] - ]], - - ["attribute", [ - ["delimiter", "#["], - ["attribute-content", [ - ["attribute-class-name", "A1"], - ["punctuation", "("], - ["number", "1"], - ["punctuation", ")"], - ["punctuation", ","], - ["attribute-class-name", "A1"], - ["punctuation", "("], - ["number", "2"], - ["punctuation", ")"], - ["punctuation", ","], - ["attribute-class-name", "A2"], - ["punctuation", "("], - ["number", "3"], - ["punctuation", ")"] - ]], - ["delimiter", "]"] - ]], - ["keyword", "class"], - ["class-name-definition", "Foo"], - ["punctuation", "{"], - ["keyword", "public"], - ["keyword", "function"], - ["function", "foo"], - ["punctuation", "("], - ["attribute", [ - ["delimiter", "#["], - ["attribute-content", [ - ["attribute-class-name", "A1"], - ["punctuation", "("], - ["number", "5"], - ["punctuation", ")"] - ]], - ["delimiter", "]"] - ]], - ["variable", "$a"], - ["punctuation", ","], - ["attribute", [ - ["delimiter", "#["], - ["attribute-content", [ - ["attribute-class-name", "A1"], - ["punctuation", "("], - ["number", "6"], - ["punctuation", ")"] - ]], - ["delimiter", "]"] - ]], - ["variable", "$b"], - ["punctuation", ")"], - ["punctuation", "{"], - ["punctuation", "}"], - ["punctuation", "}"], - - ["variable", "$object"], - ["operator", "="], - ["keyword", "new"], - ["attribute", [ - ["delimiter", "#["], - ["attribute-content", [ - ["attribute-class-name", "A1"], - ["punctuation", "("], - ["number", "7"], - ["punctuation", ")"] - ]], - ["delimiter", "]"] - ]], - ["keyword", "class"], - ["punctuation", "("], - ["punctuation", ")"], - ["punctuation", "{"], - ["punctuation", "}"], - ["punctuation", ";"], - - ["keyword", "function"], - ["function", "foo"], - ["punctuation", "("], - ["attribute", [ - ["delimiter", "#["], - ["attribute-content", [ - ["attribute-class-name", "Attribute"] - ]], - ["delimiter", "]"] - ]], - ["variable", "$param1"], - ["punctuation", ","], - ["variable", "$param2"], - ["punctuation", ")"], - ["punctuation", "{"], - ["punctuation", "}"], - - ["variable", "$f1"], - ["operator", "="], - ["attribute", [ - ["delimiter", "#["], - ["attribute-content", [ - ["attribute-class-name", "ExampleAttribute"] - ]], - ["delimiter", "]"] - ]], - ["keyword", "function"], - ["punctuation", "("], - ["punctuation", ")"], - ["punctuation", "{"], - ["punctuation", "}"], - ["punctuation", ";"], - - ["variable", "$ref"], - ["operator", "="], - ["keyword", "new"], - ["class-name", [ - ["punctuation", "\\"], - "ReflectionFunction" - ]], - ["punctuation", "("], - ["attribute", [ - ["delimiter", "#["], - ["attribute-content", [ - ["attribute-class-name", "A1"] - ]], - ["delimiter", "]"] - ]], - ["attribute", [ - ["delimiter", "#["], - ["attribute-content", [ - ["attribute-class-name", "A2"] - ]], - ["delimiter", "]"] - ]], - ["keyword", "function"], - ["punctuation", "("], - ["punctuation", ")"], - ["punctuation", "{"], - ["punctuation", "}"], - ["punctuation", ")"], - ["punctuation", ";"], - - ["attribute", [ - ["delimiter", "#["], - ["attribute-content", [ - ["attribute-class-name", "DeprecationReason"], - ["punctuation", "("], - ["string", "'reason: '"], - ["punctuation", ")"] - ]], - ["delimiter", "]"] - ]], - ["keyword", "function"], - ["function", "main"], - ["punctuation", "("], - ["punctuation", ")"], - ["punctuation", "{"], - ["punctuation", "}"] + ["comment", "// #[Foo]"], + + "\r\n\r\n#", ["punctuation", "["], ["punctuation", "]"], + + ["attribute", [ + ["delimiter", "#["], + ["attribute-content", [ + ["comment", "// something ]"], + ["attribute-class-name", "Foo"], ["punctuation", ","], + ["comment", "/* something\r\n\telse #[] */"], + ["attribute-class-name", "Bar"], + ["comment", "# shell comments aren't confusing at all in here"] + ]], + ["delimiter", "]"] + ]], + + ["attribute", [ + ["delimiter", "#["], + ["attribute-content", [ + ["attribute-class-name", "Foo"], + ["punctuation", "("], + ["punctuation", "["], + ["number", "0"], + ["punctuation", ","], + ["number", "1"], + ["punctuation", "]"], + ["punctuation", ")"] + ]], + ["delimiter", "]"] + ]], + + ["attribute", [ + ["delimiter", "#["], + ["attribute-content", [ + ["attribute-class-name", "Foo"], + ["punctuation", "("], + + ["punctuation", "["], + + ["number", "1"], + ["operator", "=>"], + ["punctuation", "["], + ["number", "0"], + ["punctuation", ","], + ["number", "1"], + ["punctuation", "]"], + ["punctuation", ","], + + ["number", "2"], + ["operator", "=>"], + ["punctuation", "["], + ["number", "2"], + ["punctuation", ","], + ["number", "3"], + ["punctuation", "]"], + ["punctuation", ","], + + ["number", "3"], + ["operator", "=>"], + ["punctuation", "["], + + ["punctuation", "["], + ["number", "0"], + ["punctuation", ","], + ["number", "1"], + ["punctuation", "]"], + ["punctuation", ","], + + ["punctuation", "["], + ["number", "2"], + ["punctuation", ","], + ["number", "3"], + ["punctuation", "]"], + + ["punctuation", "]"], + + ["punctuation", "]"], + + ["punctuation", ")"] + ]], + ["delimiter", "]"] + ]], + + ["attribute", [ + ["delimiter", "#["], + ["attribute-content", [ + ["attribute-class-name", "Foo"] + ]], + ["delimiter", "]"] + ]], + + ["attribute", [ + ["delimiter", "#["], + ["attribute-content", [ + ["attribute-class-name", [ + "Foo", + ["punctuation", "\\"], + "Bar", + ["punctuation", "\\"], + "Baz" + ]] + ]], + ["delimiter", "]"] + ]], + + ["attribute", [ + ["delimiter", "#["], + ["attribute-content", [ + ["attribute-class-name", "Route"], + ["punctuation", "("], + ["attribute-class-name", "Http"], + ["operator", "::"], + ["constant", "POST"], + ["punctuation", ","], + ["string", "'/products/create'"], + ["punctuation", ","], + ["number", "1"], + ["punctuation", ")"] + ]], + ["delimiter", "]"] + ]], + + ["attribute", [ + ["delimiter", "#["], + ["attribute-content", [ + ["attribute-class-name", [ + "Http", + ["punctuation", "\\"], + "Route" + ]], + ["punctuation", "("], + ["attribute-class-name", "Http"], + ["operator", "::"], + ["constant", "POST"], + ["punctuation", ","], + ["string", "'/products/create'"], + ["punctuation", ","], + ["number", "1"], + ["punctuation", ")"], + ["punctuation", ","], + + ["attribute-class-name", [ + "Foo", + ["punctuation", "\\"], + "Bar", + ["punctuation", "\\"], + "Baz" + ]], + ["punctuation", ","], + + ["attribute-class-name", "AttributeFoo"], + ["punctuation", "("], + ["string", "'value'"], + ["punctuation", ")"] + ]], + ["delimiter", "]"] + ]], + + ["attribute", [ + ["delimiter", "#["], + ["attribute-content", [ + ["attribute-class-name", "A1"], + ["punctuation", "("], + ["number", "1"], + ["punctuation", ")"], + ["punctuation", ","], + ["attribute-class-name", "A1"], + ["punctuation", "("], + ["number", "2"], + ["punctuation", ")"], + ["punctuation", ","], + ["attribute-class-name", "A2"], + ["punctuation", "("], + ["number", "3"], + ["punctuation", ")"] + ]], + ["delimiter", "]"] + ]], + + ["keyword", "class"], + ["class-name-definition", "Foo"], + ["punctuation", "{"], + + ["keyword", "public"], + ["keyword", "function"], + ["function-definition", "foo"], + ["punctuation", "("], + ["attribute", [ + ["delimiter", "#["], + ["attribute-content", [ + ["attribute-class-name", "A1"], + ["punctuation", "("], + ["number", "5"], + ["punctuation", ")"] + ]], + ["delimiter", "]"] + ]], + ["variable", "$a"], + ["punctuation", ","], + ["attribute", [ + ["delimiter", "#["], + ["attribute-content", [ + ["attribute-class-name", "A1"], + ["punctuation", "("], + ["number", "6"], + ["punctuation", ")"] + ]], + ["delimiter", "]"] + ]], + ["variable", "$b"], + ["punctuation", ")"], + ["punctuation", "{"], + ["punctuation", "}"], + + ["punctuation", "}"], + + ["variable", "$object"], + ["operator", "="], + ["keyword", "new"], + ["attribute", [ + ["delimiter", "#["], + ["attribute-content", [ + ["attribute-class-name", "A1"], + ["punctuation", "("], + ["number", "7"], + ["punctuation", ")"] + ]], + ["delimiter", "]"] + ]], + ["keyword", "class"], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", "{"], + ["punctuation", "}"], + ["punctuation", ";"], + + ["keyword", "function"], + ["function-definition", "foo"], + ["punctuation", "("], + + ["attribute", [ + ["delimiter", "#["], + ["attribute-content", [ + ["attribute-class-name", "Attribute"] + ]], + ["delimiter", "]"] + ]], + ["variable", "$param1"], + ["punctuation", ","], + + ["variable", "$param2"], + + ["punctuation", ")"], + ["punctuation", "{"], + ["punctuation", "}"], + + ["variable", "$f1"], + ["operator", "="], + ["attribute", [ + ["delimiter", "#["], + ["attribute-content", [ + ["attribute-class-name", "ExampleAttribute"] + ]], + ["delimiter", "]"] + ]], + ["keyword", "function"], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", "{"], + ["punctuation", "}"], + ["punctuation", ";"], + + ["variable", "$ref"], + ["operator", "="], + ["keyword", "new"], + ["class-name", [ + ["punctuation", "\\"], + "ReflectionFunction" + ]], + ["punctuation", "("], + ["attribute", [ + ["delimiter", "#["], + ["attribute-content", [ + ["attribute-class-name", "A1"] + ]], + ["delimiter", "]"] + ]], + ["attribute", [ + ["delimiter", "#["], + ["attribute-content", [ + ["attribute-class-name", "A2"] + ]], + ["delimiter", "]"] + ]], + ["keyword", "function"], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", "{"], + ["punctuation", "}"], + ["punctuation", ")"], + ["punctuation", ";"], + + ["attribute", [ + ["delimiter", "#["], + ["attribute-content", [ + ["attribute-class-name", "DeprecationReason"], + ["punctuation", "("], + ["string", "'reason: '"], + ["punctuation", ")"] + ]], + ["delimiter", "]"] + ]], + + ["keyword", "function"], + ["function-definition", "main"], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", "{"], + ["punctuation", "}"] ] ---------------------------------------------------- diff --git a/tests/languages/php/class-name_feature.test b/tests/languages/php/class-name_feature.test index bf3502ae6e..09f5432e7a 100644 --- a/tests/languages/php/class-name_feature.test +++ b/tests/languages/php/class-name_feature.test @@ -60,7 +60,7 @@ class Foo extends \Package\Bar implements App\Baz {} ["punctuation", ";"], ["keyword", "function"], - ["function", "f"], + ["function-definition", "f"], ["punctuation", "("], ["class-name", "Foo"], ["variable", "$variable"], @@ -71,7 +71,7 @@ class Foo extends \Package\Bar implements App\Baz {} ["punctuation", "}"], ["keyword", "function"], - ["function", "f"], + ["function-definition", "f"], ["punctuation", "("], ["class-name", [ ["punctuation", "\\"], @@ -88,7 +88,7 @@ class Foo extends \Package\Bar implements App\Baz {} ["punctuation", "}"], ["keyword", "function"], - ["function", "f"], + ["function-definition", "f"], ["punctuation", "("], ["class-name", [ ["punctuation", "\\"], @@ -109,7 +109,7 @@ class Foo extends \Package\Bar implements App\Baz {} ["punctuation", "}"], ["keyword", "function"], - ["function", "f"], + ["function-definition", "f"], ["punctuation", "("], ["variable", "$variable"], ["punctuation", ")"], @@ -120,7 +120,7 @@ class Foo extends \Package\Bar implements App\Baz {} ["punctuation", "}"], ["keyword", "function"], - ["function", "f"], + ["function-definition", "f"], ["punctuation", "("], ["class-name", "Foo"], ["operator", "|"], @@ -135,7 +135,7 @@ class Foo extends \Package\Bar implements App\Baz {} ["punctuation", "}"], ["keyword", "function"], - ["function", "f"], + ["function-definition", "f"], ["punctuation", "("], ["class-name", [ ["punctuation", "\\"], diff --git a/tests/languages/php/delimiter_feature.test b/tests/languages/php/delimiter_feature.test index 22e613f835..506214ded5 100644 --- a/tests/languages/php/delimiter_feature.test +++ b/tests/languages/php/delimiter_feature.test @@ -27,6 +27,7 @@ function main() {} ["php", [ ["delimiter", ""] + + ["delimiter", "?>"] ]] ] diff --git a/tests/languages/php/function_feature.test b/tests/languages/php/function_feature.test new file mode 100644 index 0000000000..d04d07d985 --- /dev/null +++ b/tests/languages/php/function_feature.test @@ -0,0 +1,136 @@ +class A { + function __call() {} +} + +$a = new A(); +$a->if(); // it's allowed to call a magic method with keyword since forever in PHP + +class A { + function if() {} // error before 7.0, allowed now +} + +$variable->foreach(); // this "foreach" is a method +$variable->method(); // this is also a method +$var->match() + +foreach ($list as $value) { // this "foreach" is a keyword +} + +Test::foreach(); // this is "foreach" static method +Test::method(); // this is "method" static method + +// The only exception: class +$variable->class(); // this "class" should be interpreted as "keyword" +Test::class; // This "class" should still be a keyword + +---------------------------------------------------- + +[ + ["keyword", "class"], + ["class-name-definition", "A"], + ["punctuation", "{"], + + ["keyword", "function"], + ["function-definition", "__call"], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", "{"], + ["punctuation", "}"], + + ["punctuation", "}"], + + ["variable", "$a"], + ["operator", "="], + ["keyword", "new"], + ["class-name", "A"], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", ";"], + + ["variable", "$a"], + ["operator", "->"], + ["function", "if"], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", ";"], + ["comment", "// it's allowed to call a magic method with keyword since forever in PHP"], + + ["keyword", "class"], + ["class-name-definition", "A"], + ["punctuation", "{"], + + ["keyword", "function"], + ["function-definition", "if"], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", "{"], + ["punctuation", "}"], + ["comment", "// error before 7.0, allowed now"], + + ["punctuation", "}"], + + ["variable", "$variable"], + ["operator", "->"], + ["function", "foreach"], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", ";"], + ["comment", "// this \"foreach\" is a method"], + + ["variable", "$variable"], + ["operator", "->"], + ["function", "method"], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", ";"], + ["comment", "// this is also a method"], + + ["variable", "$var"], + ["operator", "->"], + ["function", "match"], + ["punctuation", "("], + ["punctuation", ")"], + + ["keyword", "foreach"], + ["punctuation", "("], + ["variable", "$list"], + ["keyword", "as"], + ["variable", "$value"], + ["punctuation", ")"], + ["punctuation", "{"], + ["comment", "// this \"foreach\" is a keyword"], + + ["punctuation", "}"], + + ["class-name", "Test"], + ["operator", "::"], + ["function", "foreach"], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", ";"], + ["comment", "// this is \"foreach\" static method"], + + ["class-name", "Test"], + ["operator", "::"], + ["function", "method"], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", ";"], + ["comment", "// this is \"method\" static method"], + + ["comment", "// The only exception: class"], + + ["variable", "$variable"], + ["operator", "->"], + ["keyword", "class"], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", ";"], + ["comment", "// this \"class\" should be interpreted as \"keyword\""], + + ["class-name", "Test"], + ["operator", "::"], + ["keyword", "class"], + ["punctuation", ";"], + ["comment", "// This \"class\" should still be a keyword"] +] \ No newline at end of file diff --git a/tests/languages/php/keyword_feature.test b/tests/languages/php/keyword_feature.test index 88d5e2bbbc..0c4789f3b2 100644 --- a/tests/languages/php/keyword_feature.test +++ b/tests/languages/php/keyword_feature.test @@ -49,7 +49,7 @@ match new; or parent -parent:: +parent::; print private protected @@ -59,9 +59,9 @@ require_once return self new self -self:: +self::; static -static:: +static::; switch throw trait; @@ -72,6 +72,7 @@ var while xor yield +yield from ---------------------------------------------------- @@ -127,7 +128,7 @@ yield ["keyword", "new"], ["punctuation", ";"], ["keyword", "or"], ["keyword", "parent"], - ["keyword", "parent"], ["operator", "::"], + ["keyword", "parent"], ["operator", "::"], ["punctuation", ";"], ["keyword", "print"], ["keyword", "private"], ["keyword", "protected"], @@ -137,9 +138,9 @@ yield ["keyword", "return"], ["keyword", "self"], ["keyword", "new"], ["keyword", "self"], - ["keyword", "self"], ["operator", "::"], + ["keyword", "self"], ["operator", "::"], ["punctuation", ";"], ["keyword", "static"], - ["keyword", "static"], ["operator", "::"], + ["keyword", "static"], ["operator", "::"], ["punctuation", ";"], ["keyword", "switch"], ["keyword", "throw"], ["keyword", "trait"], ["punctuation", ";"], @@ -149,9 +150,10 @@ yield ["keyword", "var"], ["keyword", "while"], ["keyword", "xor"], - ["keyword", "yield"] + ["keyword", "yield"], + ["keyword", "yield"], ["keyword", "from"] ] ---------------------------------------------------- -Checks for comments. \ No newline at end of file +Checks for keywords. diff --git a/tests/languages/php/type_feature.test b/tests/languages/php/type_feature.test index 196110b445..eab7dc1ad3 100644 --- a/tests/languages/php/type_feature.test +++ b/tests/languages/php/type_feature.test @@ -30,45 +30,207 @@ function foo(int $a, string $b, ? object $c, ?array $d, self $e, static $f, int ---------------------------------------------------- [ - ["keyword", "public"], ["keyword", "bool"], ["variable", "$a"], ["punctuation", ";"], - ["keyword", "public"], ["keyword", "int"], ["variable", "$a"], ["punctuation", ";"], - ["keyword", "public"], ["keyword", "float"], ["variable", "$a"], ["punctuation", ";"], - ["keyword", "public"], ["keyword", "string"], ["variable", "$a"], ["punctuation", ";"], - ["keyword", "public"], ["keyword", "object"], ["variable", "$a"], ["punctuation", ";"], - ["keyword", "public"], ["keyword", "array"], ["variable", "$a"], ["punctuation", ";"], - ["keyword", "public"], ["keyword", "mixed"], ["variable", "$a"], ["punctuation", ";"], - ["keyword", "public"], ["keyword", "int"], ["operator", "|"], ["keyword", "null"], ["variable", "$a"], ["punctuation", ";"], - ["keyword", "public"], ["keyword", "int"], ["operator", "|"], ["keyword", "false"], ["variable", "$a"], ["punctuation", ";"], - ["keyword", "public"], ["keyword", "false"], ["operator", "|"], ["keyword", "int"], ["variable", "$a"], ["punctuation", ";"], - - ["punctuation", "("], ["keyword", "int"], ["punctuation", ")"], ["variable", "$a"], ["punctuation", ";"], - ["punctuation", "("], ["keyword", "string"], ["punctuation", ")"], ["variable", "$a"], ["punctuation", ";"], - ["punctuation", "("], ["keyword", "object"], ["punctuation", ")"], ["variable", "$a"], ["punctuation", ";"], - ["punctuation", "("], ["keyword", "array"], ["punctuation", ")"], ["variable", "$a"], ["punctuation", ";"], - ["punctuation", "("], ["keyword", "boolean"], ["punctuation", ")"], ["variable", "$a"], ["punctuation", ";"], - ["punctuation", "("], ["keyword", "integer"], ["punctuation", ")"], ["variable", "$a"], ["punctuation", ";"], - - ["keyword", "function"], ["function", "f"], ["punctuation", "("], ["punctuation", ")"], ["punctuation", ":"], ["keyword", "int"], ["punctuation", "{"], ["punctuation", "}"], - ["keyword", "function"], ["function", "f"], ["punctuation", "("], ["punctuation", ")"], ["punctuation", ":"], ["keyword", "string"], ["punctuation", "{"], ["punctuation", "}"], - ["keyword", "function"], ["function", "f"], ["punctuation", "("], ["punctuation", ")"], ["punctuation", ":"], ["keyword", "object"], ["punctuation", "{"], ["punctuation", "}"], - ["keyword", "function"], ["function", "f"], ["punctuation", "("], ["punctuation", ")"], ["punctuation", ":"], ["operator", "?"], ["keyword", "array"], ["punctuation", "{"], ["punctuation", "}"], - ["keyword", "function"], ["function", "f"], ["punctuation", "("], ["punctuation", ")"], ["punctuation", ":"], ["keyword", "self"], ["punctuation", "{"], ["punctuation", "}"], - ["keyword", "function"], ["function", "f"], ["punctuation", "("], ["punctuation", ")"], ["punctuation", ":"], ["keyword", "static"], ["punctuation", "{"], ["punctuation", "}"], - ["keyword", "function"], ["function", "f"], ["punctuation", "("], ["punctuation", ")"], ["punctuation", ":"], ["keyword", "int"], ["operator", "|"], ["keyword", "null"], ["punctuation", "{"], ["punctuation", "}"], - ["keyword", "function"], ["function", "f"], ["punctuation", "("], ["punctuation", ")"], ["punctuation", ":"], ["keyword", "int"], ["operator", "|"], ["keyword", "false"], ["punctuation", "{"], ["punctuation", "}"], - - ["keyword", "function"], ["function", "foo"], ["punctuation", "("], - ["keyword", "int"], ["variable", "$a"], ["punctuation", ","], - ["keyword", "string"], ["variable", "$b"], ["punctuation", ","], - ["operator", "?"], ["keyword", "object"], ["variable", "$c"], ["punctuation", ","], - ["operator", "?"], ["keyword", "array"], ["variable", "$d"], ["punctuation", ","], - ["keyword", "self"], ["variable", "$e"], ["punctuation", ","], - ["keyword", "static"], ["variable", "$f"], ["punctuation", ","], - ["keyword", "int"], ["operator", "|"], ["keyword", "null"], ["variable", "$g"], + ["keyword", "public"], + ["keyword", "bool"], + ["variable", "$a"], + ["punctuation", ";"], + + ["keyword", "public"], + ["keyword", "int"], + ["variable", "$a"], + ["punctuation", ";"], + + ["keyword", "public"], + ["keyword", "float"], + ["variable", "$a"], + ["punctuation", ";"], + + ["keyword", "public"], + ["keyword", "string"], + ["variable", "$a"], + ["punctuation", ";"], + + ["keyword", "public"], + ["keyword", "object"], + ["variable", "$a"], + ["punctuation", ";"], + + ["keyword", "public"], + ["keyword", "array"], + ["variable", "$a"], + ["punctuation", ";"], + + ["keyword", "public"], + ["keyword", "mixed"], + ["variable", "$a"], + ["punctuation", ";"], + + ["keyword", "public"], + ["keyword", "int"], + ["operator", "|"], + ["keyword", "null"], + ["variable", "$a"], + ["punctuation", ";"], + + ["keyword", "public"], + ["keyword", "int"], + ["operator", "|"], + ["keyword", "false"], + ["variable", "$a"], + ["punctuation", ";"], + + ["keyword", "public"], + ["keyword", "false"], + ["operator", "|"], + ["keyword", "int"], + ["variable", "$a"], + ["punctuation", ";"], + + ["punctuation", "("], + ["keyword", "int"], + ["punctuation", ")"], + ["variable", "$a"], + ["punctuation", ";"], + + ["punctuation", "("], + ["keyword", "string"], + ["punctuation", ")"], + ["variable", "$a"], + ["punctuation", ";"], + + ["punctuation", "("], + ["keyword", "object"], + ["punctuation", ")"], + ["variable", "$a"], + ["punctuation", ";"], + + ["punctuation", "("], + ["keyword", "array"], + ["punctuation", ")"], + ["variable", "$a"], + ["punctuation", ";"], + + ["punctuation", "("], + ["keyword", "boolean"], + ["punctuation", ")"], + ["variable", "$a"], + ["punctuation", ";"], + + ["punctuation", "("], + ["keyword", "integer"], + ["punctuation", ")"], + ["variable", "$a"], + ["punctuation", ";"], + + ["keyword", "function"], + ["function-definition", "f"], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", ":"], + ["keyword", "int"], + ["punctuation", "{"], + ["punctuation", "}"], + + ["keyword", "function"], + ["function-definition", "f"], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", ":"], + ["keyword", "string"], + ["punctuation", "{"], + ["punctuation", "}"], + + ["keyword", "function"], + ["function-definition", "f"], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", ":"], + ["keyword", "object"], + ["punctuation", "{"], + ["punctuation", "}"], + + ["keyword", "function"], + ["function-definition", "f"], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", ":"], + ["operator", "?"], + ["keyword", "array"], + ["punctuation", "{"], + ["punctuation", "}"], + + ["keyword", "function"], + ["function-definition", "f"], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", ":"], + ["keyword", "self"], + ["punctuation", "{"], + ["punctuation", "}"], + + ["keyword", "function"], + ["function-definition", "f"], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", ":"], + ["keyword", "static"], + ["punctuation", "{"], + ["punctuation", "}"], + + ["keyword", "function"], + ["function-definition", "f"], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", ":"], + ["keyword", "int"], + ["operator", "|"], + ["keyword", "null"], + ["punctuation", "{"], + ["punctuation", "}"], + + ["keyword", "function"], + ["function-definition", "f"], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", ":"], + ["keyword", "int"], + ["operator", "|"], + ["keyword", "false"], + ["punctuation", "{"], + ["punctuation", "}"], + + ["keyword", "function"], + ["function-definition", "foo"], + ["punctuation", "("], + ["keyword", "int"], + ["variable", "$a"], + ["punctuation", ","], + ["keyword", "string"], + ["variable", "$b"], + ["punctuation", ","], + ["operator", "?"], + ["keyword", "object"], + ["variable", "$c"], + ["punctuation", ","], + ["operator", "?"], + ["keyword", "array"], + ["variable", "$d"], + ["punctuation", ","], + ["keyword", "self"], + ["variable", "$e"], + ["punctuation", ","], + ["keyword", "static"], + ["variable", "$f"], + ["punctuation", ","], + ["keyword", "int"], + ["operator", "|"], + ["keyword", "null"], + ["variable", "$g"], ["punctuation", ")"], - ["punctuation", "{"], ["punctuation", "}"] + ["punctuation", "{"], + ["punctuation", "}"] ] ---------------------------------------------------- -Checks for types. \ No newline at end of file +Checks for types. From 3df62fd031f87f1dcab0eb632b0a526099007248 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Sat, 3 Apr 2021 11:30:05 +0200 Subject: [PATCH 0784/1100] C++: Added support for generic functions and made `::` punctuation (#2814) --- components/prism-cpp.js | 26 +++++- components/prism-cpp.min.js | 2 +- tests/languages/cpp/base-clause_feature.test | 17 +++- tests/languages/cpp/class-name_feature.test | 13 ++- tests/languages/cpp/function_feature.test | 93 ++++++++++++++++++++ tests/languages/cpp/issue2347.test | 6 +- tests/languages/cpp/operator_feature.test | 3 +- tests/languages/cpp/punctuation_feature.test | 18 ++++ 8 files changed, 161 insertions(+), 17 deletions(-) create mode 100644 tests/languages/cpp/function_feature.test create mode 100644 tests/languages/cpp/punctuation_feature.test diff --git a/components/prism-cpp.js b/components/prism-cpp.js index 55a2fae60e..b771da11ca 100644 --- a/components/prism-cpp.js +++ b/components/prism-cpp.js @@ -27,7 +27,7 @@ pattern: /(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i, greedy: true }, - 'operator': />>=?|<<=?|->|([-+&|:])\1|[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/, + 'operator': />>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/, 'boolean': /\b(?:true|false)\b/ }); @@ -59,6 +59,27 @@ } }); + Prism.languages.insertBefore('cpp', 'keyword', { + 'generic-function': { + pattern: /\b[a-z_]\w*\s*<(?:[^<>]|<(?:[^<>])*>)*>(?=\s*\()/i, + inside: { + 'function': /^\w+/, + 'generic': { + pattern: /<[\s\S]+/, + alias: 'class-name', + inside: Prism.languages.cpp + } + } + } + }); + + Prism.languages.insertBefore('cpp', 'operator', { + 'double-colon': { + pattern: /::/, + alias: 'punctuation' + } + }); + Prism.languages.insertBefore('cpp', 'class-name', { // the base clause is an optional list of parent classes // https://en.cppreference.com/w/cpp/language/class @@ -69,7 +90,8 @@ inside: Prism.languages.extend('cpp', {}) } }); - Prism.languages.insertBefore('inside', 'operator', { + + Prism.languages.insertBefore('inside', 'double-colon', { // All untokenized words that are not namespaces should be class names 'class-name': /\b[a-z_]\w*\b(?!\s*::)/i }, Prism.languages.cpp['base-clause']); diff --git a/components/prism-cpp.min.js b/components/prism-cpp.min.js index 16f98cc5cc..9c21ed3a9b 100644 --- a/components/prism-cpp.min.js +++ b/components/prism-cpp.min.js @@ -1 +1 @@ -!function(e){var t=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char8_t|char16_t|char32_t|class|compl|concept|const|consteval|constexpr|constinit|const_cast|continue|co_await|co_return|co_yield|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int8_t|int16_t|int32_t|int64_t|uint8_t|uint16_t|uint32_t|uint64_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,n="\\b(?!)\\w+(?:\\s*\\.\\s*\\w+)*\\b".replace(//g,function(){return t.source});e.languages.cpp=e.languages.extend("c",{"class-name":[{pattern:RegExp("(\\b(?:class|concept|enum|struct|typename)\\s+)(?!)\\w+".replace(//g,function(){return t.source})),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:t,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:true|false)\b/}),e.languages.insertBefore("cpp","string",{module:{pattern:RegExp('(\\b(?:module|import)\\s+)(?:"(?:\\\\(?:\r\n|[^])|[^"\\\\\r\n])*"|<[^<>\r\n]*>|'+"(?:\\s*:\\s*)?|:\\s*".replace(//g,function(){return n})+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),e.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:e.languages.extend("cpp",{})}}),e.languages.insertBefore("inside","operator",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},e.languages.cpp["base-clause"])}(Prism); \ No newline at end of file +!function(e){var t=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char8_t|char16_t|char32_t|class|compl|concept|const|consteval|constexpr|constinit|const_cast|continue|co_await|co_return|co_yield|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int8_t|int16_t|int32_t|int64_t|uint8_t|uint16_t|uint32_t|uint64_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,n="\\b(?!)\\w+(?:\\s*\\.\\s*\\w+)*\\b".replace(//g,function(){return t.source});e.languages.cpp=e.languages.extend("c",{"class-name":[{pattern:RegExp("(\\b(?:class|concept|enum|struct|typename)\\s+)(?!)\\w+".replace(//g,function(){return t.source})),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:t,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:true|false)\b/}),e.languages.insertBefore("cpp","string",{module:{pattern:RegExp('(\\b(?:module|import)\\s+)(?:"(?:\\\\(?:\r\n|[^])|[^"\\\\\r\n])*"|<[^<>\r\n]*>|'+"(?:\\s*:\\s*)?|:\\s*".replace(//g,function(){return n})+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),e.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b[a-z_]\w*\s*<(?:[^<>]|<(?:[^<>])*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:e.languages.cpp}}}}),e.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),e.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:e.languages.extend("cpp",{})}}),e.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},e.languages.cpp["base-clause"])}(Prism); \ No newline at end of file diff --git a/tests/languages/cpp/base-clause_feature.test b/tests/languages/cpp/base-clause_feature.test index 4d9247bbc4..260a7099e3 100644 --- a/tests/languages/cpp/base-clause_feature.test +++ b/tests/languages/cpp/base-clause_feature.test @@ -18,6 +18,7 @@ class service : private Transport // comment ["punctuation", "{"], ["punctuation", "}"], ["punctuation", ";"], + ["keyword", "struct"], ["class-name", "Derived"], ["operator", ":"], @@ -27,6 +28,7 @@ class service : private Transport // comment ["punctuation", "{"], ["punctuation", "}"], ["punctuation", ";"], + ["keyword", "struct"], ["class-name", "Derived"], ["operator", ":"], @@ -35,6 +37,7 @@ class service : private Transport // comment ["class-name", "Base"] ]], ["punctuation", ";"], + ["keyword", "class"], ["class-name", "X"], ["operator", ":"], @@ -46,6 +49,7 @@ class service : private Transport // comment ["punctuation", "{"], ["punctuation", "}"], ["punctuation", ";"], + ["keyword", "class"], ["class-name", "Y"], ["operator", ":"], @@ -57,18 +61,20 @@ class service : private Transport // comment ["punctuation", "{"], ["punctuation", "}"], ["punctuation", ";"], + ["keyword", "class"], ["class-name", "Y"], ["operator", ":"], ["base-clause", [ ["keyword", "virtual"], " baz", - ["operator", "::"], + ["double-colon", "::"], ["class-name", "B"] ]], ["punctuation", "{"], ["punctuation", "}"], ["punctuation", ";"], + ["keyword", "class"], ["class-name", "Z"], ["operator", ":"], @@ -77,11 +83,12 @@ class service : private Transport // comment ["class-name", "B"], ["operator", "<"], "foo", - ["operator", "::"], + ["double-colon", "::"], ["class-name", "T"], ["operator", ">"] ]], ["punctuation", ";"], + ["keyword", "struct"], ["class-name", "AA"], ["operator", ":"], @@ -91,14 +98,15 @@ class service : private Transport // comment ["class-name", "Y"], ["punctuation", ","], " foo", - ["operator", "::"], + ["double-colon", "::"], "bar", - ["operator", "::"], + ["double-colon", "::"], ["class-name", "Z"] ]], ["punctuation", "{"], ["punctuation", "}"], ["punctuation", ";"], + ["keyword", "class"], ["class-name", "service"], ["operator", ":"], @@ -107,6 +115,7 @@ class service : private Transport // comment ["class-name", "Transport"], ["comment", "// comment"] ]], + ["punctuation", "{"], ["punctuation", "}"], ["punctuation", ";"] diff --git a/tests/languages/cpp/class-name_feature.test b/tests/languages/cpp/class-name_feature.test index 3e5a42fc48..086f6af2af 100644 --- a/tests/languages/cpp/class-name_feature.test +++ b/tests/languages/cpp/class-name_feature.test @@ -4,6 +4,7 @@ concept Foo_bar struct foo enum bar enum class FooBar + template void Foo::bar() {} @@ -19,12 +20,16 @@ void Foo::bar() {} ["keyword", "struct"], ["class-name", "foo"], ["keyword", "enum"], ["class-name", "bar"], ["keyword", "enum"], ["keyword", "class"], ["class-name", "FooBar"], - ["keyword", "template"], ["operator", "<"], ["keyword", "typename"], ["class-name", "FooBar"], ["operator", ">"], + ["keyword", "template"], + ["operator", "<"], + ["keyword", "typename"], + ["class-name", "FooBar"], + ["operator", ">"], ["keyword", "void"], ["class-name", "Foo"], - ["operator", "::"], + ["double-colon", "::"], ["function", "bar"], ["punctuation", "("], ["punctuation", ")"], @@ -32,7 +37,7 @@ void Foo::bar() {} ["punctuation", "}"], ["class-name", "Foo"], - ["operator", "::"], + ["double-colon", "::"], ["operator", "~"], ["function", "Foo"], ["punctuation", "("], @@ -45,7 +50,7 @@ void Foo::bar() {} ["operator", "<"], ["keyword", "int"], ["operator", ">"], - ["operator", "::"], + ["double-colon", "::"], ["function", "bar"], ["punctuation", "("], ["punctuation", ")"], diff --git a/tests/languages/cpp/function_feature.test b/tests/languages/cpp/function_feature.test new file mode 100644 index 0000000000..2968199382 --- /dev/null +++ b/tests/languages/cpp/function_feature.test @@ -0,0 +1,93 @@ +foo(); +line.substr(0, separator_index); +boost::trim(key); +bpo::value() +bpo::value>()->multitoken() +std::make_unique(std::move(entries)); + +---------------------------------------------------- + +[ + ["function", "foo"], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", ";"], + + "\r\nline", + ["punctuation", "."], + ["function", "substr"], + ["punctuation", "("], + ["number", "0"], + ["punctuation", ","], + " separator_index", + ["punctuation", ")"], + ["punctuation", ";"], + + "\r\nboost", + ["double-colon", "::"], + ["function", "trim"], + ["punctuation", "("], + "key", + ["punctuation", ")"], + ["punctuation", ";"], + + "\r\nbpo", + ["double-colon", "::"], + ["generic-function", [ + ["function", "value"], + ["generic", [ + ["operator", "<"], + "std", + ["double-colon", "::"], + "string", + ["operator", ">"] + ]] + ]], + ["punctuation", "("], + ["punctuation", ")"], + + "\r\nbpo", + ["double-colon", "::"], + ["generic-function", [ + ["function", "value"], + ["generic", [ + ["operator", "<"], + "std", + ["double-colon", "::"], + "vector", + ["operator", "<"], + "std", + ["double-colon", "::"], + "string", + ["operator", ">>"] + ]] + ]], + ["punctuation", "("], + ["punctuation", ")"], + ["operator", "->"], + ["function", "multitoken"], + ["punctuation", "("], + ["punctuation", ")"], + + "\r\nstd", + ["double-colon", "::"], + ["generic-function", [ + ["function", "make_unique"], + ["generic", [ + ["operator", "<"], + "service", + ["double-colon", "::"], + "UniqueMap", + ["operator", ">"] + ]] + ]], + ["punctuation", "("], + "std", + ["double-colon", "::"], + ["function", "move"], + ["punctuation", "("], + "entries", + ["punctuation", ")"], + ["punctuation", ")"], + ["punctuation", ";"] +] \ No newline at end of file diff --git a/tests/languages/cpp/issue2347.test b/tests/languages/cpp/issue2347.test index 9f302201b6..d6bf174ffc 100644 --- a/tests/languages/cpp/issue2347.test +++ b/tests/languages/cpp/issue2347.test @@ -40,7 +40,7 @@ void MainWindow::changeWindowTitle() ["keyword", "void"], ["class-name", "MainWindow"], - ["operator", "::"], + ["double-colon", "::"], ["function", "changeWindowTitle"], ["punctuation", "("], ["punctuation", ")"], @@ -67,6 +67,4 @@ void MainWindow::changeWindowTitle() ["punctuation", ";"], ["punctuation", "}"] -] - ----------------------------------------------------- +] \ No newline at end of file diff --git a/tests/languages/cpp/operator_feature.test b/tests/languages/cpp/operator_feature.test index 83b002e82e..c619b3aac3 100644 --- a/tests/languages/cpp/operator_feature.test +++ b/tests/languages/cpp/operator_feature.test @@ -3,7 +3,7 @@ ~ & | ^ += -= *= /= %= >>= <<= &= |= ^= ! && || --> :: +-> ? : = == != < > <= >= <=> and and_eq bitand bitor not not_eq or or_eq xor xor_eq @@ -43,7 +43,6 @@ and and_eq bitand bitor not not_eq or or_eq xor xor_eq ["operator", "||"], ["operator", "->"], - ["operator", "::"], ["operator", "?"], ["operator", ":"], diff --git a/tests/languages/cpp/punctuation_feature.test b/tests/languages/cpp/punctuation_feature.test new file mode 100644 index 0000000000..5ea8918234 --- /dev/null +++ b/tests/languages/cpp/punctuation_feature.test @@ -0,0 +1,18 @@ +( ) [ ] { } +, ; . :: + +---------------------------------------------------- + +[ + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", "["], + ["punctuation", "]"], + ["punctuation", "{"], + ["punctuation", "}"], + + ["punctuation", ","], + ["punctuation", ";"], + ["punctuation", "."], + ["double-colon", "::"] +] \ No newline at end of file From 5bc405e7b4d3acb809336eb5e2fd958d30ca0e2f Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Sat, 3 Apr 2021 11:30:37 +0200 Subject: [PATCH 0785/1100] Tests: Fixed pretty print incorrectly calculating print width (#2821) --- tests/helper/token-stream-transformer.js | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/tests/helper/token-stream-transformer.js b/tests/helper/token-stream-transformer.js index 834c98b353..db0c6acaf1 100644 --- a/tests/helper/token-stream-transformer.js +++ b/tests/helper/token-stream-transformer.js @@ -79,9 +79,10 @@ class GlueItem { } /** * @param {TokenStream} tokenStream + * @param {number} [level] * @returns {PrettyTokenStream} */ -function toPrettyTokenStream(tokenStream) { +function toPrettyTokenStream(tokenStream, level = 0) { /** @type {PrettyTokenStream} */ const prettyStream = []; for (const token of tokenStream) { @@ -116,26 +117,27 @@ function toPrettyTokenStream(tokenStream) { */ function innerSimple(value) { if (Array.isArray(value.content)) { - return [value.type, toPrettyTokenStream(value.content)]; + return [value.type, toPrettyTokenStream(value.content, level + 1)]; } else { return [value.type, value.content]; } } - prettyFormat(prettyStream); + prettyFormat(prettyStream, (level + 1) * 4); return prettyStream; } /** * @param {PrettyTokenStream} prettyStream + * @param {number} indentationWidth * @returns {void} */ -function prettyFormat(prettyStream) { +function prettyFormat(prettyStream, indentationWidth) { // The maximum number of (glued) tokens per line const MAX_TOKEN_PER_LINE = 5; // The maximum number of characters per line // (this is based on an estimation. The actual output might be longer.) - const MAX_PRINT_WIDTH = 80; + const MAX_PRINT_WIDTH = 80 - indentationWidth; prettyTrimLineBreaks(prettyStream); // enable all line breaks with >=2 breaks in the source token stream @@ -181,7 +183,17 @@ function prettyFormat(prettyStream) { return lines.map(g => { if (g.length > 1) { return g - .map(item => isToken(item) ? ", ".length + JSON.stringify(item).length : 0) + .map(item => { + if (isToken(item)) { + if (typeof item === "string") { + return ", ".length + JSON.stringify(item).length; + } else { + return ", ".length + JSON.stringify(item).length + " ".length; + } + } else { + return 0; + } + }) .reduce((a, b) => a + b, 0) - ", ".length; } else { // we don't really care about the print width of a single-token line From 4ec7535c82a384a8149720e48d038e6e622478fa Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Sat, 3 Apr 2021 11:35:15 +0200 Subject: [PATCH 0786/1100] Java: Improved generics (#2812) --- components/prism-java.js | 2 +- components/prism-java.min.js | 2 +- tests/languages/java/generics_feature.test | 200 +++++++++++++++++---- 3 files changed, 168 insertions(+), 36 deletions(-) diff --git a/components/prism-java.js b/components/prism-java.js index 16a3346ffd..86f1844c5f 100644 --- a/components/prism-java.js +++ b/components/prism-java.js @@ -62,7 +62,7 @@ alias: 'punctuation' }, 'generics': { - pattern: /<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<[\w\s,.&?]*>)*>)*>)*>/, + pattern: /<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/, inside: { 'class-name': className, 'keyword': keywords, diff --git a/components/prism-java.min.js b/components/prism-java.min.js index 21a5b50534..26a914f2a6 100644 --- a/components/prism-java.min.js +++ b/components/prism-java.min.js @@ -1 +1 @@ -!function(e){var t=/\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/,n="(^|[^\\w.])(?:[a-z]\\w*\\s*\\.\\s*)*(?:[A-Z]\\w*\\s*\\.\\s*)*",a={pattern:RegExp(n+"[A-Z](?:[\\d_A-Z]*[a-z]\\w*)?\\b"),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}},punctuation:/\./}};e.languages.java=e.languages.extend("clike",{"class-name":[a,{pattern:RegExp(n+"[A-Z]\\w*(?=\\s+\\w+\\s*[;,=())])"),lookbehind:!0,inside:a.inside}],keyword:t,function:[e.languages.clike.function,{pattern:/(\:\:\s*)[a-z_]\w*/,lookbehind:!0}],number:/\b0b[01][01_]*L?\b|\b0x(?:\.[\da-f_p+-]+|[\da-f_]+(?:\.[\da-f_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,lookbehind:!0}}),e.languages.insertBefore("java","string",{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:"string"}}),e.languages.insertBefore("java","class-name",{annotation:{pattern:/(^|[^.])@\w+(?:\s*\.\s*\w+)*/,lookbehind:!0,alias:"punctuation"},generics:{pattern:/<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<[\w\s,.&?]*>)*>)*>)*>/,inside:{"class-name":a,keyword:t,punctuation:/[<>(),.:]/,operator:/[?&|]/}},namespace:{pattern:RegExp("(\\b(?:exports|import(?:\\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\\s+)(?!)[a-z]\\w*(?:\\.[a-z]\\w*)*\\.?".replace(//g,function(){return t.source})),lookbehind:!0,inside:{punctuation:/\./}}})}(Prism); \ No newline at end of file +!function(e){var t=/\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/,n="(^|[^\\w.])(?:[a-z]\\w*\\s*\\.\\s*)*(?:[A-Z]\\w*\\s*\\.\\s*)*",a={pattern:RegExp(n+"[A-Z](?:[\\d_A-Z]*[a-z]\\w*)?\\b"),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}},punctuation:/\./}};e.languages.java=e.languages.extend("clike",{"class-name":[a,{pattern:RegExp(n+"[A-Z]\\w*(?=\\s+\\w+\\s*[;,=())])"),lookbehind:!0,inside:a.inside}],keyword:t,function:[e.languages.clike.function,{pattern:/(\:\:\s*)[a-z_]\w*/,lookbehind:!0}],number:/\b0b[01][01_]*L?\b|\b0x(?:\.[\da-f_p+-]+|[\da-f_]+(?:\.[\da-f_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,lookbehind:!0}}),e.languages.insertBefore("java","string",{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:"string"}}),e.languages.insertBefore("java","class-name",{annotation:{pattern:/(^|[^.])@\w+(?:\s*\.\s*\w+)*/,lookbehind:!0,alias:"punctuation"},generics:{pattern:/<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/,inside:{"class-name":a,keyword:t,punctuation:/[<>(),.:]/,operator:/[?&|]/}},namespace:{pattern:RegExp("(\\b(?:exports|import(?:\\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\\s+)(?!)[a-z]\\w*(?:\\.[a-z]\\w*)*\\.?".replace(//g,function(){return t.source})),lookbehind:!0,inside:{punctuation:/\./}}})}(Prism); \ No newline at end of file diff --git a/tests/languages/java/generics_feature.test b/tests/languages/java/generics_feature.test index 12d9fb6231..7944a7ee8e 100644 --- a/tests/languages/java/generics_feature.test +++ b/tests/languages/java/generics_feature.test @@ -2,19 +2,30 @@ public class Solo {} Solo val = new Solo<>(); Duo dual = new Duo(12.2585, 'C'); +List list +List nums = ints; +List list +Entry pair = Entry.twice("Hello"); + +public class Entry {} +class D {} + +public void throwMeConditional(boolean conditional, T exception) throws T {} + + T instantiateElementType(List arg) {} + +// not generics +if (a<6&&b>6){} + ---------------------------------------------------- [ ["keyword", "public"], ["keyword", "class"], - ["class-name", [ - "Solo" - ]], + ["class-name", ["Solo"]], ["generics", [ ["punctuation", "<"], - ["class-name", [ - "T" - ]], + ["class-name", ["T"]], ["keyword", "extends"], ["class-name", [ ["namespace", [ @@ -32,22 +43,16 @@ Duo dual = new Duo(12.2585, 'C'); ["punctuation", "{"], ["punctuation", "}"], - ["class-name", [ - "Solo" - ]], + ["class-name", ["Solo"]], ["generics", [ ["punctuation", "<"], - ["class-name", [ - "Integer" - ]], + ["class-name", ["Integer"]], ["punctuation", ">"] ]], " val ", ["operator", "="], ["keyword", "new"], - ["class-name", [ - "Solo" - ]], + ["class-name", ["Solo"]], ["generics", [ ["punctuation", "<"], ["punctuation", ">"] @@ -56,35 +61,23 @@ Duo dual = new Duo(12.2585, 'C'); ["punctuation", ")"], ["punctuation", ";"], - ["class-name", [ - "Duo" - ]], + ["class-name", ["Duo"]], ["generics", [ ["punctuation", "<"], - ["class-name", [ - "Double" - ]], + ["class-name", ["Double"]], ["punctuation", ","], - ["class-name", [ - "Character" - ]], + ["class-name", ["Character"]], ["punctuation", ">"] ]], " dual ", ["operator", "="], ["keyword", "new"], - ["class-name", [ - "Duo" - ]], + ["class-name", ["Duo"]], ["generics", [ ["punctuation", "<"], - ["class-name", [ - "Double" - ]], + ["class-name", ["Double"]], ["punctuation", ","], - ["class-name", [ - "Character" - ]], + ["class-name", ["Character"]], ["punctuation", ">"] ]], ["punctuation", "("], @@ -92,7 +85,146 @@ Duo dual = new Duo(12.2585, 'C'); ["punctuation", ","], ["string", "'C'"], ["punctuation", ")"], - ["punctuation", ";"] + ["punctuation", ";"], + + ["class-name", ["List"]], + ["generics", [ + ["punctuation", "<"], + ["operator", "?"], + ["punctuation", ">"] + ]], + " list\r\n", + + ["class-name", ["List"]], + ["generics", [ + ["punctuation", "<"], + ["operator", "?"], + ["keyword", "extends"], + ["class-name", ["Number"]], + ["punctuation", ">"] + ]], + " nums ", + ["operator", "="], + " ints", + ["punctuation", ";"], + + ["class-name", ["List"]], + ["generics", [ + ["punctuation", "<"], + ["operator", "?"], + ["keyword", "super"], + ["class-name", ["Integer"]], + ["punctuation", ">"] + ]], + " list\r\n", + + ["class-name", ["Entry"]], + ["generics", [ + ["punctuation", "<"], + ["class-name", ["String"]], + ["punctuation", ","], + ["class-name", ["String"]], + ["punctuation", ">"] + ]], + " pair ", + ["operator", "="], + ["class-name", ["Entry"]], + ["punctuation", "."], + ["generics", [ + ["punctuation", "<"], + ["class-name", ["String"]], + ["punctuation", ">"] + ]], + ["function", "twice"], + ["punctuation", "("], + ["string", "\"Hello\""], + ["punctuation", ")"], + ["punctuation", ";"], + + ["keyword", "public"], + ["keyword", "class"], + ["class-name", ["Entry"]], + ["generics", [ + ["punctuation", "<"], + ["class-name", ["KeyType"]], + ["punctuation", ","], + ["class-name", ["ValueType"]], + ["punctuation", ">"] + ]], + ["punctuation", "{"], + ["punctuation", "}"], + + ["keyword", "class"], + ["class-name", ["D"]], + ["generics", [ + ["punctuation", "<"], + ["class-name", ["T"]], + ["keyword", "extends"], + ["class-name", ["A"]], + ["operator", "&"], + ["class-name", ["B"]], + ["operator", "&"], + ["class-name", ["C"]], + ["punctuation", ">"] + ]], + ["punctuation", "{"], + ["punctuation", "}"], + + ["keyword", "public"], + ["generics", [ + ["punctuation", "<"], + ["class-name", ["T"]], + ["keyword", "extends"], + ["class-name", ["Throwable"]], + ["punctuation", ">"] + ]], + ["keyword", "void"], + ["function", "throwMeConditional"], + ["punctuation", "("], + ["keyword", "boolean"], + " conditional", + ["punctuation", ","], + ["class-name", ["T"]], + " exception", + ["punctuation", ")"], + ["keyword", "throws"], + ["class-name", ["T"]], + ["punctuation", "{"], + ["punctuation", "}"], + + ["generics", [ + ["punctuation", "<"], + ["class-name", ["T"]], + ["punctuation", ">"] + ]], + ["class-name", ["T"]], + ["function", "instantiateElementType"], + ["punctuation", "("], + ["class-name", ["List"]], + ["generics", [ + ["punctuation", "<"], + ["class-name", ["T"]], + ["punctuation", ">"] + ]], + " arg", + ["punctuation", ")"], + ["punctuation", "{"], + ["punctuation", "}"], + + ["comment", "// not generics"], + + ["keyword", "if"], + ["punctuation", "("], + "a", + ["operator", "<"], + ["number", "6"], + ["operator", "&&"], + "b", + ["operator", ">"], + ["number", "6"], + ["punctuation", ")"], + ["punctuation", "{"], + ["punctuation", "}"] ] ---------------------------------------------------- From f08c2f7f7c041d84a04b7c03d4083fa6466bd5cc Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Sat, 3 Apr 2021 11:36:51 +0200 Subject: [PATCH 0787/1100] Ruby: Added missing regex interpolation (#2841) --- components/prism-ruby.js | 7 +- components/prism-ruby.min.js | 2 +- tests/languages/ruby/regex_feature.test | 126 ++++++++++++++++++------ 3 files changed, 103 insertions(+), 32 deletions(-) diff --git a/components/prism-ruby.js b/components/prism-ruby.js index fdb2726df0..fe4e0efd1b 100644 --- a/components/prism-ruby.js +++ b/components/prism-ruby.js @@ -53,9 +53,12 @@ } }, { - pattern: /(^|[^/])\/(?!\/)(?:\[[^\r\n\]]+\]|\\.|[^[/\\\r\n])+\/[gim]{0,3}(?=\s*(?:$|[\r\n,.;})]))/, + pattern: /(^|[^/])\/(?!\/)(?:\[[^\r\n\]]+\]|\\.|[^[/\\\r\n])+\/[gim]{0,3}(?=\s*(?:$|[\r\n,.;})#]))/, lookbehind: true, - greedy: true + greedy: true, + inside: { + 'interpolation': interpolation + } } ], 'variable': /[@$]+[a-zA-Z_]\w*(?:[?!]|\b)/, diff --git a/components/prism-ruby.min.js b/components/prism-ruby.min.js index 6817670b89..949e439324 100644 --- a/components/prism-ruby.min.js +++ b/components/prism-ruby.min.js @@ -1 +1 @@ -!function(e){e.languages.ruby=e.languages.extend("clike",{comment:[/#.*/,{pattern:/^=begin\s[\s\S]*?^=end/m,greedy:!0}],"class-name":{pattern:/(\b(?:class)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:alias|and|BEGIN|begin|break|case|class|def|define_method|defined|do|each|else|elsif|END|end|ensure|extend|for|if|in|include|module|new|next|nil|not|or|prepend|protected|private|public|raise|redo|require|rescue|retry|return|self|super|then|throw|undef|unless|until|when|while|yield)\b/});var n={pattern:/#\{[^}]+\}/,inside:{delimiter:{pattern:/^#\{|\}$/,alias:"tag"},rest:e.languages.ruby}};delete e.languages.ruby.function,e.languages.insertBefore("ruby","keyword",{regex:[{pattern:RegExp("%r(?:"+["([^a-zA-Z0-9\\s{(\\[<])(?:(?!\\1)[^\\\\]|\\\\[^])*\\1[gim]{0,3}","\\((?:[^()\\\\]|\\\\[^])*\\)[gim]{0,3}","\\{(?:[^#{}\\\\]|#(?:\\{[^}]+\\})?|\\\\[^])*\\}[gim]{0,3}","\\[(?:[^\\[\\]\\\\]|\\\\[^])*\\][gim]{0,3}","<(?:[^<>\\\\]|\\\\[^])*>[gim]{0,3}"].join("|")+")"),greedy:!0,inside:{interpolation:n}},{pattern:/(^|[^/])\/(?!\/)(?:\[[^\r\n\]]+\]|\\.|[^[/\\\r\n])+\/[gim]{0,3}(?=\s*(?:$|[\r\n,.;})]))/,lookbehind:!0,greedy:!0}],variable:/[@$]+[a-zA-Z_]\w*(?:[?!]|\b)/,symbol:{pattern:/(^|[^:]):[a-zA-Z_]\w*(?:[?!]|\b)/,lookbehind:!0},"method-definition":{pattern:/(\bdef\s+)[\w.]+/,lookbehind:!0,inside:{function:/\w+$/,rest:e.languages.ruby}}}),e.languages.insertBefore("ruby","number",{builtin:/\b(?:Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Stat|Fixnum|Float|Hash|Integer|IO|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|String|Struct|TMS|Symbol|ThreadGroup|Thread|Time|TrueClass)\b/,constant:/\b[A-Z]\w*(?:[?!]|\b)/}),e.languages.ruby.string=[{pattern:RegExp("%[qQiIwWxs]?(?:"+["([^a-zA-Z0-9\\s{(\\[<])(?:(?!\\1)[^\\\\]|\\\\[^])*\\1","\\((?:[^()\\\\]|\\\\[^])*\\)","\\{(?:[^#{}\\\\]|#(?:\\{[^}]+\\})?|\\\\[^])*\\}","\\[(?:[^\\[\\]\\\\]|\\\\[^])*\\]","<(?:[^<>\\\\]|\\\\[^])*>"].join("|")+")"),greedy:!0,inside:{interpolation:n}},{pattern:/("|')(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|(?!\1)[^\\#\r\n])*\1/,greedy:!0,inside:{interpolation:n}}],e.languages.rb=e.languages.ruby}(Prism); \ No newline at end of file +!function(e){e.languages.ruby=e.languages.extend("clike",{comment:[/#.*/,{pattern:/^=begin\s[\s\S]*?^=end/m,greedy:!0}],"class-name":{pattern:/(\b(?:class)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:alias|and|BEGIN|begin|break|case|class|def|define_method|defined|do|each|else|elsif|END|end|ensure|extend|for|if|in|include|module|new|next|nil|not|or|prepend|protected|private|public|raise|redo|require|rescue|retry|return|self|super|then|throw|undef|unless|until|when|while|yield)\b/});var n={pattern:/#\{[^}]+\}/,inside:{delimiter:{pattern:/^#\{|\}$/,alias:"tag"},rest:e.languages.ruby}};delete e.languages.ruby.function,e.languages.insertBefore("ruby","keyword",{regex:[{pattern:RegExp("%r(?:"+["([^a-zA-Z0-9\\s{(\\[<])(?:(?!\\1)[^\\\\]|\\\\[^])*\\1[gim]{0,3}","\\((?:[^()\\\\]|\\\\[^])*\\)[gim]{0,3}","\\{(?:[^#{}\\\\]|#(?:\\{[^}]+\\})?|\\\\[^])*\\}[gim]{0,3}","\\[(?:[^\\[\\]\\\\]|\\\\[^])*\\][gim]{0,3}","<(?:[^<>\\\\]|\\\\[^])*>[gim]{0,3}"].join("|")+")"),greedy:!0,inside:{interpolation:n}},{pattern:/(^|[^/])\/(?!\/)(?:\[[^\r\n\]]+\]|\\.|[^[/\\\r\n])+\/[gim]{0,3}(?=\s*(?:$|[\r\n,.;})#]))/,lookbehind:!0,greedy:!0,inside:{interpolation:n}}],variable:/[@$]+[a-zA-Z_]\w*(?:[?!]|\b)/,symbol:{pattern:/(^|[^:]):[a-zA-Z_]\w*(?:[?!]|\b)/,lookbehind:!0},"method-definition":{pattern:/(\bdef\s+)[\w.]+/,lookbehind:!0,inside:{function:/\w+$/,rest:e.languages.ruby}}}),e.languages.insertBefore("ruby","number",{builtin:/\b(?:Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Stat|Fixnum|Float|Hash|Integer|IO|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|String|Struct|TMS|Symbol|ThreadGroup|Thread|Time|TrueClass)\b/,constant:/\b[A-Z]\w*(?:[?!]|\b)/}),e.languages.ruby.string=[{pattern:RegExp("%[qQiIwWxs]?(?:"+["([^a-zA-Z0-9\\s{(\\[<])(?:(?!\\1)[^\\\\]|\\\\[^])*\\1","\\((?:[^()\\\\]|\\\\[^])*\\)","\\{(?:[^#{}\\\\]|#(?:\\{[^}]+\\})?|\\\\[^])*\\}","\\[(?:[^\\[\\]\\\\]|\\\\[^])*\\]","<(?:[^<>\\\\]|\\\\[^])*>"].join("|")+")"),greedy:!0,inside:{interpolation:n}},{pattern:/("|')(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|(?!\1)[^\\#\r\n])*\1/,greedy:!0,inside:{interpolation:n}}],e.languages.rb=e.languages.ruby}(Prism); \ No newline at end of file diff --git a/tests/languages/ruby/regex_feature.test b/tests/languages/ruby/regex_feature.test index 0dee02d34d..f0fbdfb8c0 100644 --- a/tests/languages/ruby/regex_feature.test +++ b/tests/languages/ruby/regex_feature.test @@ -1,45 +1,113 @@ /[foo]\/bar/gim /[bar]/, /./i; +/foo#{bar}/; %r!foo?bar#{39+3}! %r(foo?bar#{39+3}) %r{foo?bar#{39+3}} %r[foo?bar#{39+3}] %r +/foo/ # comment +/foo#{bar}/ # comment + ---------------------------------------------------- [ - ["regex", "/[foo]\\/bar/gim"], - ["regex", "/[bar]/"], ["punctuation", ","], - ["regex", "/./i"], ["punctuation", ";"], - ["regex", ["%r!foo?bar", ["interpolation", [ - ["delimiter", "#{"], - ["number", "39"], ["operator", "+"], ["number", "3"], - ["delimiter", "}"] - ]], "!"]], - ["regex", ["%r(foo?bar", ["interpolation", [ - ["delimiter", "#{"], - ["number", "39"], ["operator", "+"], ["number", "3"], - ["delimiter", "}"] - ]], ")"]], - ["regex", ["%r{foo?bar", ["interpolation", [ - ["delimiter", "#{"], - ["number", "39"], ["operator", "+"], ["number", "3"], - ["delimiter", "}"] - ]], "}"]], - ["regex", ["%r[foo?bar", ["interpolation", [ - ["delimiter", "#{"], - ["number", "39"], ["operator", "+"], ["number", "3"], - ["delimiter", "}"] - ]], "]"]], - ["regex", ["%r"]] + ["regex", ["/[foo]\\/bar/gim"]], + + ["regex", ["/[bar]/"]], + ["punctuation", ","], + + ["regex", ["/./i"]], + ["punctuation", ";"], + + ["regex", [ + "/foo", + ["interpolation", [ + ["delimiter", "#{"], + "bar", + ["delimiter", "}"] + ]], + "/" + ]], + ["punctuation", ";"], + + ["regex", [ + "%r!foo?bar", + ["interpolation", [ + ["delimiter", "#{"], + ["number", "39"], + ["operator", "+"], + ["number", "3"], + ["delimiter", "}"] + ]], + "!" + ]], + + ["regex", [ + "%r(foo?bar", + ["interpolation", [ + ["delimiter", "#{"], + ["number", "39"], + ["operator", "+"], + ["number", "3"], + ["delimiter", "}"] + ]], + ")" + ]], + + ["regex", [ + "%r{foo?bar", + ["interpolation", [ + ["delimiter", "#{"], + ["number", "39"], + ["operator", "+"], + ["number", "3"], + ["delimiter", "}"] + ]], + "}" + ]], + + ["regex", [ + "%r[foo?bar", + ["interpolation", [ + ["delimiter", "#{"], + ["number", "39"], + ["operator", "+"], + ["number", "3"], + ["delimiter", "}"] + ]], + "]" + ]], + + ["regex", [ + "%r" + ]], + + ["regex", ["/foo/"]], + ["comment", "# comment"], + + ["regex", [ + "/foo", + ["interpolation", [ + ["delimiter", "#{"], + "bar", + ["delimiter", "}"] + ]], + "/" + ]], + ["comment", "# comment"] ] ---------------------------------------------------- -Checks for regex. \ No newline at end of file +Checks for regex. From 48ab42b360b35083167c5d95bea1d859cf6ecab7 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Sat, 3 Apr 2021 12:47:16 +0200 Subject: [PATCH 0788/1100] ESLint: Added `root` to config to prevent warning (#2846) --- .eslintrc.js | 1 + 1 file changed, 1 insertion(+) diff --git a/.eslintrc.js b/.eslintrc.js index c5b2c2a409..0f868d9b58 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,5 +1,6 @@ /** @type {import('eslint').Linter.Config} */ module.exports = { + root: true, extends: 'eslint:recommended', rules: { // I turned this rule off because we use `hasOwnProperty` in a lot of places From 3786f3965cb433cb16d9a2f467337916c28eb8db Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Sat, 3 Apr 2021 13:28:14 +0200 Subject: [PATCH 0789/1100] Ruby: Added missing regex flags (#2845) --- components/prism-ruby.js | 14 ++++++------- components/prism-ruby.min.js | 2 +- tests/languages/ruby/regex_feature.test | 27 ++++++++++++++++++++++++- 3 files changed, 34 insertions(+), 9 deletions(-) diff --git a/components/prism-ruby.js b/components/prism-ruby.js index fe4e0efd1b..9e220142d7 100644 --- a/components/prism-ruby.js +++ b/components/prism-ruby.js @@ -40,20 +40,20 @@ 'regex': [ { pattern: RegExp(/%r/.source + '(?:' + [ - /([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1[gim]{0,3}/.source, - /\((?:[^()\\]|\\[\s\S])*\)[gim]{0,3}/.source, + /([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1/.source, + /\((?:[^()\\]|\\[\s\S])*\)/.source, // Here we need to specifically allow interpolation - /\{(?:[^#{}\\]|#(?:\{[^}]+\})?|\\[\s\S])*\}[gim]{0,3}/.source, - /\[(?:[^\[\]\\]|\\[\s\S])*\][gim]{0,3}/.source, - /<(?:[^<>\\]|\\[\s\S])*>[gim]{0,3}/.source - ].join('|') + ')'), + /\{(?:[^#{}\\]|#(?:\{[^}]+\})?|\\[\s\S])*\}/.source, + /\[(?:[^\[\]\\]|\\[\s\S])*\]/.source, + /<(?:[^<>\\]|\\[\s\S])*>/.source + ].join('|') + ')' + /[egimnosux]{0,6}/.source), greedy: true, inside: { 'interpolation': interpolation } }, { - pattern: /(^|[^/])\/(?!\/)(?:\[[^\r\n\]]+\]|\\.|[^[/\\\r\n])+\/[gim]{0,3}(?=\s*(?:$|[\r\n,.;})#]))/, + pattern: /(^|[^/])\/(?!\/)(?:\[[^\r\n\]]+\]|\\.|[^[/\\\r\n])+\/[egimnosux]{0,6}(?=\s*(?:$|[\r\n,.;})#]))/, lookbehind: true, greedy: true, inside: { diff --git a/components/prism-ruby.min.js b/components/prism-ruby.min.js index 949e439324..fb967df66d 100644 --- a/components/prism-ruby.min.js +++ b/components/prism-ruby.min.js @@ -1 +1 @@ -!function(e){e.languages.ruby=e.languages.extend("clike",{comment:[/#.*/,{pattern:/^=begin\s[\s\S]*?^=end/m,greedy:!0}],"class-name":{pattern:/(\b(?:class)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:alias|and|BEGIN|begin|break|case|class|def|define_method|defined|do|each|else|elsif|END|end|ensure|extend|for|if|in|include|module|new|next|nil|not|or|prepend|protected|private|public|raise|redo|require|rescue|retry|return|self|super|then|throw|undef|unless|until|when|while|yield)\b/});var n={pattern:/#\{[^}]+\}/,inside:{delimiter:{pattern:/^#\{|\}$/,alias:"tag"},rest:e.languages.ruby}};delete e.languages.ruby.function,e.languages.insertBefore("ruby","keyword",{regex:[{pattern:RegExp("%r(?:"+["([^a-zA-Z0-9\\s{(\\[<])(?:(?!\\1)[^\\\\]|\\\\[^])*\\1[gim]{0,3}","\\((?:[^()\\\\]|\\\\[^])*\\)[gim]{0,3}","\\{(?:[^#{}\\\\]|#(?:\\{[^}]+\\})?|\\\\[^])*\\}[gim]{0,3}","\\[(?:[^\\[\\]\\\\]|\\\\[^])*\\][gim]{0,3}","<(?:[^<>\\\\]|\\\\[^])*>[gim]{0,3}"].join("|")+")"),greedy:!0,inside:{interpolation:n}},{pattern:/(^|[^/])\/(?!\/)(?:\[[^\r\n\]]+\]|\\.|[^[/\\\r\n])+\/[gim]{0,3}(?=\s*(?:$|[\r\n,.;})#]))/,lookbehind:!0,greedy:!0,inside:{interpolation:n}}],variable:/[@$]+[a-zA-Z_]\w*(?:[?!]|\b)/,symbol:{pattern:/(^|[^:]):[a-zA-Z_]\w*(?:[?!]|\b)/,lookbehind:!0},"method-definition":{pattern:/(\bdef\s+)[\w.]+/,lookbehind:!0,inside:{function:/\w+$/,rest:e.languages.ruby}}}),e.languages.insertBefore("ruby","number",{builtin:/\b(?:Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Stat|Fixnum|Float|Hash|Integer|IO|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|String|Struct|TMS|Symbol|ThreadGroup|Thread|Time|TrueClass)\b/,constant:/\b[A-Z]\w*(?:[?!]|\b)/}),e.languages.ruby.string=[{pattern:RegExp("%[qQiIwWxs]?(?:"+["([^a-zA-Z0-9\\s{(\\[<])(?:(?!\\1)[^\\\\]|\\\\[^])*\\1","\\((?:[^()\\\\]|\\\\[^])*\\)","\\{(?:[^#{}\\\\]|#(?:\\{[^}]+\\})?|\\\\[^])*\\}","\\[(?:[^\\[\\]\\\\]|\\\\[^])*\\]","<(?:[^<>\\\\]|\\\\[^])*>"].join("|")+")"),greedy:!0,inside:{interpolation:n}},{pattern:/("|')(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|(?!\1)[^\\#\r\n])*\1/,greedy:!0,inside:{interpolation:n}}],e.languages.rb=e.languages.ruby}(Prism); \ No newline at end of file +!function(e){e.languages.ruby=e.languages.extend("clike",{comment:[/#.*/,{pattern:/^=begin\s[\s\S]*?^=end/m,greedy:!0}],"class-name":{pattern:/(\b(?:class)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:alias|and|BEGIN|begin|break|case|class|def|define_method|defined|do|each|else|elsif|END|end|ensure|extend|for|if|in|include|module|new|next|nil|not|or|prepend|protected|private|public|raise|redo|require|rescue|retry|return|self|super|then|throw|undef|unless|until|when|while|yield)\b/});var n={pattern:/#\{[^}]+\}/,inside:{delimiter:{pattern:/^#\{|\}$/,alias:"tag"},rest:e.languages.ruby}};delete e.languages.ruby.function,e.languages.insertBefore("ruby","keyword",{regex:[{pattern:RegExp("%r(?:"+["([^a-zA-Z0-9\\s{(\\[<])(?:(?!\\1)[^\\\\]|\\\\[^])*\\1","\\((?:[^()\\\\]|\\\\[^])*\\)","\\{(?:[^#{}\\\\]|#(?:\\{[^}]+\\})?|\\\\[^])*\\}","\\[(?:[^\\[\\]\\\\]|\\\\[^])*\\]","<(?:[^<>\\\\]|\\\\[^])*>"].join("|")+")[egimnosux]{0,6}"),greedy:!0,inside:{interpolation:n}},{pattern:/(^|[^/])\/(?!\/)(?:\[[^\r\n\]]+\]|\\.|[^[/\\\r\n])+\/[egimnosux]{0,6}(?=\s*(?:$|[\r\n,.;})#]))/,lookbehind:!0,greedy:!0,inside:{interpolation:n}}],variable:/[@$]+[a-zA-Z_]\w*(?:[?!]|\b)/,symbol:{pattern:/(^|[^:]):[a-zA-Z_]\w*(?:[?!]|\b)/,lookbehind:!0},"method-definition":{pattern:/(\bdef\s+)[\w.]+/,lookbehind:!0,inside:{function:/\w+$/,rest:e.languages.ruby}}}),e.languages.insertBefore("ruby","number",{builtin:/\b(?:Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Stat|Fixnum|Float|Hash|Integer|IO|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|String|Struct|TMS|Symbol|ThreadGroup|Thread|Time|TrueClass)\b/,constant:/\b[A-Z]\w*(?:[?!]|\b)/}),e.languages.ruby.string=[{pattern:RegExp("%[qQiIwWxs]?(?:"+["([^a-zA-Z0-9\\s{(\\[<])(?:(?!\\1)[^\\\\]|\\\\[^])*\\1","\\((?:[^()\\\\]|\\\\[^])*\\)","\\{(?:[^#{}\\\\]|#(?:\\{[^}]+\\})?|\\\\[^])*\\}","\\[(?:[^\\[\\]\\\\]|\\\\[^])*\\]","<(?:[^<>\\\\]|\\\\[^])*>"].join("|")+")"),greedy:!0,inside:{interpolation:n}},{pattern:/("|')(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|(?!\1)[^\\#\r\n])*\1/,greedy:!0,inside:{interpolation:n}}],e.languages.rb=e.languages.ruby}(Prism); \ No newline at end of file diff --git a/tests/languages/ruby/regex_feature.test b/tests/languages/ruby/regex_feature.test index f0fbdfb8c0..aa035ffdd6 100644 --- a/tests/languages/ruby/regex_feature.test +++ b/tests/languages/ruby/regex_feature.test @@ -2,6 +2,7 @@ /[bar]/, /./i; /foo#{bar}/; +/ab+c/ix %r!foo?bar#{39+3}! %r(foo?bar#{39+3}) %r{foo?bar#{39+3}} @@ -11,6 +12,17 @@ /foo/ # comment /foo#{bar}/ # comment +# flags +/abc/e +/abc/g +/abc/i +/abc/m +/abc/n +/abc/o +/abc/s +/abc/u +/abc/x + ---------------------------------------------------- [ @@ -33,6 +45,8 @@ ]], ["punctuation", ";"], + ["regex", ["/ab+c/ix"]], + ["regex", [ "%r!foo?bar", ["interpolation", [ @@ -105,7 +119,18 @@ ]], "/" ]], - ["comment", "# comment"] + ["comment", "# comment"], + + ["comment", "# flags"], + ["regex", ["/abc/e"]], + ["regex", ["/abc/g"]], + ["regex", ["/abc/i"]], + ["regex", ["/abc/m"]], + ["regex", ["/abc/n"]], + ["regex", ["/abc/o"]], + ["regex", ["/abc/s"]], + ["regex", ["/abc/u"]], + ["regex", ["/abc/x"]] ] ---------------------------------------------------- From e0ee93f138b7da294a28db50b97c22977fdfc8ed Mon Sep 17 00:00:00 2001 From: Daniel Wilkowski Date: Wed, 14 Apr 2021 15:23:06 +0200 Subject: [PATCH 0790/1100] PHP: Added missing PHP 7.4 `fn` keyword (#2858) --- components/prism-php.js | 2 +- components/prism-php.min.js | 2 +- tests/languages/php/keyword_feature.test | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/components/prism-php.js b/components/prism-php.js index 3db55c2aad..813a55c590 100644 --- a/components/prism-php.js +++ b/components/prism-php.js @@ -112,7 +112,7 @@ // // keywords cannot be preceded by "->" // the complex lookbehind means `(?|::)\s*)` - pattern: /((?:^|[^\s>:]|(?:^|[^-])>|(?:^|[^:]):)\s*)\b(?:__halt_compiler|abstract|and|array|as|break|callable|case|catch|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|enum|eval|exit|extends|final|finally|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|namespace|match|new|or|parent|print|private|protected|public|require|require_once|return|self|static|switch|throw|trait|try|unset|use|var|while|xor|yield)\b/i, + pattern: /((?:^|[^\s>:]|(?:^|[^-])>|(?:^|[^:]):)\s*)\b(?:__halt_compiler|abstract|and|array|as|break|callable|case|catch|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|enum|eval|exit|extends|final|finally|fn|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|namespace|match|new|or|parent|print|private|protected|public|require|require_once|return|self|static|switch|throw|trait|try|unset|use|var|while|xor|yield)\b/i, lookbehind: true } ], diff --git a/components/prism-php.min.js b/components/prism-php.min.js index 31a56ebb16..22456a7159 100644 --- a/components/prism-php.min.js +++ b/components/prism-php.min.js @@ -1 +1 @@ -!function(a){var e=/\/\*[\s\S]*?\*\/|\/\/.*|#(?!\[).*/,t=[{pattern:/\b(?:false|true)\b/i,alias:"boolean"},{pattern:/(::\s*)\b[a-z_]\w*\b(?!\s*\()/i,greedy:!0,lookbehind:!0},{pattern:/(\b(?:case|const)\s+)\b[a-z_]\w*(?=\s*[;=])/i,greedy:!0,lookbehind:!0},/\b(?:null)\b/i,/\b[A-Z_][A-Z0-9_]*\b(?!\s*\()/],i=/\b0b[01]+(?:_[01]+)*\b|\b0o[0-7]+(?:_[0-7]+)*\b|\b0x[\da-f]+(?:_[\da-f]+)*\b|(?:\b\d+(?:_\d+)*\.?(?:\d+(?:_\d+)*)?|\B\.\d+)(?:e[+-]?\d+)?/i,n=/|\?\?=?|\.{3}|\??->|[!=]=?=?|::|\*\*=?|--|\+\+|&&|\|\||<<|>>|[?~]|[/^|%*&<>.+-]=?/,s=/[{}\[\](),:;]/;a.languages.php={delimiter:{pattern:/\?>$|^<\?(?:php(?=\s)|=)?/i,alias:"important"},comment:e,variable:/\$+(?:\w+\b|(?={))/i,package:{pattern:/(namespace\s+|use\s+(?:function\s+)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,lookbehind:!0,inside:{punctuation:/\\/}},"class-name-definition":{pattern:/(\b(?:class|enum|interface|trait)\s+)\b[a-z_]\w*(?!\\)\b/i,lookbehind:!0,alias:"class-name"},"function-definition":{pattern:/(\bfunction\s+)[a-z_]\w*(?=\s*\()/i,lookbehind:!0,alias:"function"},keyword:[{pattern:/(\(\s*)\b(?:bool|boolean|int|integer|float|string|object|array)\b(?=\s*\))/i,alias:"type-casting",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)\b(?:bool|int|float|string|object|array(?!\s*\()|mixed|self|static|callable|iterable|(?:null|false)(?=\s*\|))\b(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*[a-z0-9_|]\|\s*)(?:null|false)\b(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b(?:bool|int|float|string|object|void|array(?!\s*\()|mixed|self|static|callable|iterable|(?:null|false)(?=\s*\|))\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?[a-z0-9_|]\|\s*)(?:null|false)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/\b(?:bool|int|float|string|object|void|array(?!\s*\()|mixed|iterable|(?:null|false)(?=\s*\|))\b/i,alias:"type-declaration",greedy:!0},{pattern:/(\|\s*)(?:null|false)\b/i,alias:"type-declaration",greedy:!0,lookbehind:!0},{pattern:/\b(?:parent|self|static)(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(\byield\s+)from\b/i,lookbehind:!0},/\bclass\b/i,{pattern:/((?:^|[^\s>:]|(?:^|[^-])>|(?:^|[^:]):)\s*)\b(?:__halt_compiler|abstract|and|array|as|break|callable|case|catch|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|enum|eval|exit|extends|final|finally|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|namespace|match|new|or|parent|print|private|protected|public|require|require_once|return|self|static|switch|throw|trait|try|unset|use|var|while|xor|yield)\b/i,lookbehind:!0}],"argument-name":{pattern:/([(,]\s+)\b[a-z_]\w*(?=\s*:(?!:))/i,lookbehind:!0},"class-name":[{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self|\s+static))\s+|\bcatch\s*\()\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/(\|\s*)\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/\b[a-z_]\w*(?!\\)\b(?=\s*\|)/i,greedy:!0},{pattern:/(\|\s*)(?:\\?\b[a-z_]\w*)+\b/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(?:\\?\b[a-z_]\w*)+\b(?=\s*\|)/i,alias:"class-name-fully-qualified",greedy:!0,inside:{punctuation:/\\/}},{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self\b|\s+static\b))\s+|\bcatch\s*\()(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*\$)/i,alias:"type-declaration",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-declaration"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*::)/i,alias:["class-name-fully-qualified","static-context"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/([(,?]\s*)[a-z_]\w*(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-hint"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b[a-z_]\w*(?!\\)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:["class-name-fully-qualified","return-type"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:t,function:/\b\w+(?=\s*\()/,property:{pattern:/(->\s*)\w+/,lookbehind:!0},number:i,operator:n,punctuation:s};var l={pattern:/{\$(?:{(?:{[^{}]+}|[^{}]+)}|[^{}])+}|(^|[^\\{])\$+(?:\w+(?:\[[^\r\n\[\]]+\]|->\w+)*)/,lookbehind:!0,inside:a.languages.php},r=[{pattern:/<<<'([^']+)'[\r\n](?:.*[\r\n])*?\1;/,alias:"nowdoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<'[^']+'|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<'?|[';]$/}}}},{pattern:/<<<(?:"([^"]+)"[\r\n](?:.*[\r\n])*?\1;|([a-z_]\w*)[\r\n](?:.*[\r\n])*?\2;)/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<(?:"[^"]+"|[a-z_]\w*)|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<"?|[";]$/}},interpolation:l}},{pattern:/`(?:\\[\s\S]|[^\\`])*`/,alias:"backtick-quoted-string",greedy:!0},{pattern:/'(?:\\[\s\S]|[^\\'])*'/,alias:"single-quoted-string",greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,alias:"double-quoted-string",greedy:!0,inside:{interpolation:l}}];a.languages.insertBefore("php","variable",{string:r,attribute:{pattern:/#\[(?:[^"'\/#]|\/(?![*/])|\/\/.*$|#(?!\[).*$|\/\*(?:[^*]|\*(?!\/))*\*\/|"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*')+\](?=\s*[a-z$#])/im,greedy:!0,inside:{"attribute-content":{pattern:/^(#\[)[\s\S]+(?=]$)/,lookbehind:!0,inside:{comment:e,string:r,"attribute-class-name":[{pattern:/([^:]|^)\b[a-z_]\w*(?!\\)\b/i,alias:"class-name",greedy:!0,lookbehind:!0},{pattern:/([^:]|^)(?:\\?\b[a-z_]\w*)+/i,alias:["class-name","class-name-fully-qualified"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:t,number:i,operator:n,punctuation:s}},delimiter:{pattern:/^#\[|]$/,alias:"punctuation"}}}}),a.hooks.add("before-tokenize",function(e){if(/<\?/.test(e.code)){a.languages["markup-templating"].buildPlaceholders(e,"php",/<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#(?!\[))(?:[^?\n\r]|\?(?!>))*(?=$|\?>|[\r\n])|#\[|\/\*(?:[^*]|\*(?!\/))*(?:\*\/|$))*?(?:\?>|$)/gi)}}),a.hooks.add("after-tokenize",function(e){a.languages["markup-templating"].tokenizePlaceholders(e,"php")})}(Prism); \ No newline at end of file +!function(a){var e=/\/\*[\s\S]*?\*\/|\/\/.*|#(?!\[).*/,t=[{pattern:/\b(?:false|true)\b/i,alias:"boolean"},{pattern:/(::\s*)\b[a-z_]\w*\b(?!\s*\()/i,greedy:!0,lookbehind:!0},{pattern:/(\b(?:case|const)\s+)\b[a-z_]\w*(?=\s*[;=])/i,greedy:!0,lookbehind:!0},/\b(?:null)\b/i,/\b[A-Z_][A-Z0-9_]*\b(?!\s*\()/],i=/\b0b[01]+(?:_[01]+)*\b|\b0o[0-7]+(?:_[0-7]+)*\b|\b0x[\da-f]+(?:_[\da-f]+)*\b|(?:\b\d+(?:_\d+)*\.?(?:\d+(?:_\d+)*)?|\B\.\d+)(?:e[+-]?\d+)?/i,n=/|\?\?=?|\.{3}|\??->|[!=]=?=?|::|\*\*=?|--|\+\+|&&|\|\||<<|>>|[?~]|[/^|%*&<>.+-]=?/,s=/[{}\[\](),:;]/;a.languages.php={delimiter:{pattern:/\?>$|^<\?(?:php(?=\s)|=)?/i,alias:"important"},comment:e,variable:/\$+(?:\w+\b|(?={))/i,package:{pattern:/(namespace\s+|use\s+(?:function\s+)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,lookbehind:!0,inside:{punctuation:/\\/}},"class-name-definition":{pattern:/(\b(?:class|enum|interface|trait)\s+)\b[a-z_]\w*(?!\\)\b/i,lookbehind:!0,alias:"class-name"},"function-definition":{pattern:/(\bfunction\s+)[a-z_]\w*(?=\s*\()/i,lookbehind:!0,alias:"function"},keyword:[{pattern:/(\(\s*)\b(?:bool|boolean|int|integer|float|string|object|array)\b(?=\s*\))/i,alias:"type-casting",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)\b(?:bool|int|float|string|object|array(?!\s*\()|mixed|self|static|callable|iterable|(?:null|false)(?=\s*\|))\b(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*[a-z0-9_|]\|\s*)(?:null|false)\b(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b(?:bool|int|float|string|object|void|array(?!\s*\()|mixed|self|static|callable|iterable|(?:null|false)(?=\s*\|))\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?[a-z0-9_|]\|\s*)(?:null|false)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/\b(?:bool|int|float|string|object|void|array(?!\s*\()|mixed|iterable|(?:null|false)(?=\s*\|))\b/i,alias:"type-declaration",greedy:!0},{pattern:/(\|\s*)(?:null|false)\b/i,alias:"type-declaration",greedy:!0,lookbehind:!0},{pattern:/\b(?:parent|self|static)(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(\byield\s+)from\b/i,lookbehind:!0},/\bclass\b/i,{pattern:/((?:^|[^\s>:]|(?:^|[^-])>|(?:^|[^:]):)\s*)\b(?:__halt_compiler|abstract|and|array|as|break|callable|case|catch|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|enum|eval|exit|extends|final|finally|fn|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|namespace|match|new|or|parent|print|private|protected|public|require|require_once|return|self|static|switch|throw|trait|try|unset|use|var|while|xor|yield)\b/i,lookbehind:!0}],"argument-name":{pattern:/([(,]\s+)\b[a-z_]\w*(?=\s*:(?!:))/i,lookbehind:!0},"class-name":[{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self|\s+static))\s+|\bcatch\s*\()\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/(\|\s*)\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/\b[a-z_]\w*(?!\\)\b(?=\s*\|)/i,greedy:!0},{pattern:/(\|\s*)(?:\\?\b[a-z_]\w*)+\b/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(?:\\?\b[a-z_]\w*)+\b(?=\s*\|)/i,alias:"class-name-fully-qualified",greedy:!0,inside:{punctuation:/\\/}},{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self\b|\s+static\b))\s+|\bcatch\s*\()(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*\$)/i,alias:"type-declaration",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-declaration"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*::)/i,alias:["class-name-fully-qualified","static-context"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/([(,?]\s*)[a-z_]\w*(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-hint"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b[a-z_]\w*(?!\\)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:["class-name-fully-qualified","return-type"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:t,function:/\b\w+(?=\s*\()/,property:{pattern:/(->\s*)\w+/,lookbehind:!0},number:i,operator:n,punctuation:s};var l={pattern:/{\$(?:{(?:{[^{}]+}|[^{}]+)}|[^{}])+}|(^|[^\\{])\$+(?:\w+(?:\[[^\r\n\[\]]+\]|->\w+)*)/,lookbehind:!0,inside:a.languages.php},r=[{pattern:/<<<'([^']+)'[\r\n](?:.*[\r\n])*?\1;/,alias:"nowdoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<'[^']+'|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<'?|[';]$/}}}},{pattern:/<<<(?:"([^"]+)"[\r\n](?:.*[\r\n])*?\1;|([a-z_]\w*)[\r\n](?:.*[\r\n])*?\2;)/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<(?:"[^"]+"|[a-z_]\w*)|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<"?|[";]$/}},interpolation:l}},{pattern:/`(?:\\[\s\S]|[^\\`])*`/,alias:"backtick-quoted-string",greedy:!0},{pattern:/'(?:\\[\s\S]|[^\\'])*'/,alias:"single-quoted-string",greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,alias:"double-quoted-string",greedy:!0,inside:{interpolation:l}}];a.languages.insertBefore("php","variable",{string:r,attribute:{pattern:/#\[(?:[^"'\/#]|\/(?![*/])|\/\/.*$|#(?!\[).*$|\/\*(?:[^*]|\*(?!\/))*\*\/|"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*')+\](?=\s*[a-z$#])/im,greedy:!0,inside:{"attribute-content":{pattern:/^(#\[)[\s\S]+(?=]$)/,lookbehind:!0,inside:{comment:e,string:r,"attribute-class-name":[{pattern:/([^:]|^)\b[a-z_]\w*(?!\\)\b/i,alias:"class-name",greedy:!0,lookbehind:!0},{pattern:/([^:]|^)(?:\\?\b[a-z_]\w*)+/i,alias:["class-name","class-name-fully-qualified"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:t,number:i,operator:n,punctuation:s}},delimiter:{pattern:/^#\[|]$/,alias:"punctuation"}}}}),a.hooks.add("before-tokenize",function(e){if(/<\?/.test(e.code)){a.languages["markup-templating"].buildPlaceholders(e,"php",/<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#(?!\[))(?:[^?\n\r]|\?(?!>))*(?=$|\?>|[\r\n])|#\[|\/\*(?:[^*]|\*(?!\/))*(?:\*\/|$))*?(?:\?>|$)/gi)}}),a.hooks.add("after-tokenize",function(e){a.languages["markup-templating"].tokenizePlaceholders(e,"php")})}(Prism); \ No newline at end of file diff --git a/tests/languages/php/keyword_feature.test b/tests/languages/php/keyword_feature.test index 0c4789f3b2..b7febd3576 100644 --- a/tests/languages/php/keyword_feature.test +++ b/tests/languages/php/keyword_feature.test @@ -30,6 +30,7 @@ exit extends; final finally +fn for foreach function @@ -109,6 +110,7 @@ yield from ["keyword", "extends"], ["punctuation", ";"], ["keyword", "final"], ["keyword", "finally"], + ["keyword", "fn"], ["keyword", "for"], ["keyword", "foreach"], ["keyword", "function"], From bb1eca949c930e4df446067be87cab537a6b26ba Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Sat, 17 Apr 2021 22:21:15 +0200 Subject: [PATCH 0791/1100] ESLint: Fail CI if there are warnings (#2847) --- .github/workflows/test.yml | 2 +- package.json | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 21fdfe0be0..d6794f964b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -56,4 +56,4 @@ jobs: with: node-version: 14.x - run: npm ci - - run: npm run lint + - run: npm run lint:ci diff --git a/package.json b/package.json index c8a9e94463..a6b14e013e 100755 --- a/package.json +++ b/package.json @@ -9,6 +9,7 @@ "start": "http-server -c-1", "lint": "eslint .", "lint:fix": "eslint . --fix", + "lint:ci": "eslint . --max-warnings 0", "test:aliases": "mocha tests/aliases-test.js", "test:core": "mocha tests/core/**/*.js", "test:dependencies": "mocha tests/dependencies-test.js", From 9cae4461612ad86782328063a24d7e2362c6e4e9 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Sat, 17 Apr 2021 22:26:40 +0200 Subject: [PATCH 0792/1100] ESLint: Added quotes rule (#2835) --- .eslintrc.js | 3 + assets/code.js | 4 +- assets/download.js | 18 ++-- assets/examples.js | 2 +- components/prism-abap.js | 6 +- components/prism-aspnet.js | 2 +- components/prism-autoit.js | 24 ++--- components/prism-bash.js | 8 +- components/prism-diff.js | 4 +- components/prism-jexl.js | 2 +- components/prism-kotlin.js | 2 +- components/prism-less.js | 2 +- components/prism-naniscript.js | 4 +- components/prism-pascaligo.js | 2 +- components/prism-peoplecode.js | 2 +- components/prism-smarty.js | 4 +- components/prism-vbnet.js | 2 +- components/prism-xeora.js | 2 +- components/prism-xquery.js | 2 +- dangerfile.js | 2 +- dependencies.js | 2 +- gulpfile.js/changelog.js | 4 +- gulpfile.js/docs.js | 2 +- gulpfile.js/index.js | 4 +- gulpfile.js/paths.js | 2 +- plugins/autoloader/prism-autoloader.js | 4 + plugins/command-line/prism-command-line.js | 4 +- .../prism-copy-to-clipboard.js | 8 +- .../prism-highlight-keywords.js | 2 +- .../jsonp-highlight/prism-jsonp-highlight.js | 28 +++--- .../prism-normalize-whitespace.js | 4 +- plugins/show-language/prism-show-language.js | 4 + tests/aliases-test.js | 4 +- tests/core/greedy.js | 28 +++--- tests/dependencies-test.js | 26 ++--- tests/helper/checks.js | 8 +- tests/helper/prism-loader.js | 14 +-- tests/helper/test-case.js | 22 ++--- tests/helper/test-discovery.js | 6 +- tests/helper/token-stream-transformer.js | 10 +- tests/identifier-test.js | 4 +- tests/pattern-tests.js | 14 +-- tests/plugins/keep-markup/test.js | 2 +- tests/run.js | 16 ++-- tests/testrunner-tests.js | 96 +++++++++---------- 45 files changed, 213 insertions(+), 202 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 0f868d9b58..d9782df5c7 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -3,6 +3,9 @@ module.exports = { root: true, extends: 'eslint:recommended', rules: { + // stylistic rules + 'quotes': ['warn', 'single', { avoidEscape: true, allowTemplateLiterals: true }], + // I turned this rule off because we use `hasOwnProperty` in a lot of places // TODO: Think about re-enabling this rule 'no-prototype-builtins': 'off', diff --git a/assets/code.js b/assets/code.js index 1b8ccccb4d..70c42b575c 100644 --- a/assets/code.js +++ b/assets/code.js @@ -186,7 +186,7 @@ for (var id in themes) { $u.element.create('input', { properties: { type: 'radio', - name: "theme", + name: 'theme', id: 'theme=' + id, checked: current === id, value: id, @@ -261,7 +261,7 @@ Prism && Prism.hooks.add('complete', function (env) { // transfer margin of pre to wrapper wrapper.style.margin = window.getComputedStyle(pre).margin; - pre.style.margin = "0"; + pre.style.margin = '0'; }); }); diff --git a/assets/download.js b/assets/download.js index fba5920044..a7bbd8756b 100644 --- a/assets/download.js +++ b/assets/download.js @@ -194,7 +194,7 @@ for (var category in components) { for (var alias in lang.aliasTitles) if (lang.aliasTitles.hasOwnProperty(alias)) titles.push(lang.aliasTitles[alias]); - return titles.join(" + "); + return titles.join(' + '); } var label = $u.element.create('label', { @@ -506,18 +506,18 @@ function generateCode(){ $u.element.contents(error, errors); } - var redownloadUrl = window.location.href.split("#")[0] + "#"; + var redownloadUrl = window.location.href.split('#')[0] + '#'; for (var category in redownload) { - redownloadUrl += category + "=" + redownload[category].join('+') + "&"; + redownloadUrl += category + '=' + redownload[category].join('+') + '&'; } - redownloadUrl = redownloadUrl.replace(/&$/,""); + redownloadUrl = redownloadUrl.replace(/&$/,''); window.location.replace(redownloadUrl); - var versionComment = "/* PrismJS " + version + "\n" + redownloadUrl + " */"; + var versionComment = '/* PrismJS ' + version + '\n' + redownloadUrl + ' */'; for (var type in code) { (function (type) { - var text = versionComment + "\n" + code[type]; + var text = versionComment + '\n' + code[type]; var fileName = 'prism.' + type; var codeElement = $('#download-' + type + ' code'); @@ -533,7 +533,7 @@ function generateCode(){ $('#download-' + type + ' .download-button').onclick = function () { - saveAs(new Blob([text], { type: "application/octet-stream;charset=utf-8" }), fileName); + saveAs(new Blob([text], { type: 'application/octet-stream;charset=utf-8' }), fileName); }; })(type); } @@ -562,7 +562,7 @@ function buildCode(promises) { var toSortMap = {}; promises.forEach(function (p) { - if (p.category == "core" || p.category == "themes") { + if (p.category == 'core' || p.category == 'themes') { finalPromises.push(p); } else { var infos = toSortMap[p.id]; @@ -576,7 +576,7 @@ function buildCode(promises) { // this assumes that the ids in `toSortMap` are complete under transitive requirements getLoader(components, Object.keys(toSortMap)).getIds().forEach(function (id) { if (!toSortMap[id]) { - console.error(id + " not found."); + console.error(id + ' not found.'); } finalPromises.push.apply(finalPromises, toSortMap[id]); }); diff --git a/assets/examples.js b/assets/examples.js index ccf1607ce7..4ce38bcaa5 100644 --- a/assets/examples.js +++ b/assets/examples.js @@ -232,7 +232,7 @@ function getDependenciesOfLanguage(lang) { return []; } - return ($u.type(components.languages[lang].require) === "array") + return ($u.type(components.languages[lang].require) === 'array') ? components.languages[lang].require : [components.languages[lang].require]; } diff --git a/components/prism-abap.js b/components/prism-abap.js index e598ccef15..64ae744c33 100644 --- a/components/prism-abap.js +++ b/components/prism-abap.js @@ -32,17 +32,17 @@ Prism.languages.abap = { pattern: /(\s)&&?(?=\s)/, lookbehind: true, /* The official editor highlights */ - alias: "keyword" + alias: 'keyword' }, 'token-operator' : [{ /* Special operators used to access structure components, class methods/attributes, etc. */ pattern: /(\w)(?:->?|=>|[~|{}])(?=\w)/, lookbehind: true, - alias: "punctuation" + alias: 'punctuation' }, { /* Special tokens used do delimit string templates */ pattern: /[|{}]/, - alias: "punctuation" + alias: 'punctuation' }], 'punctuation' : /[,.:()]/ }; \ No newline at end of file diff --git a/components/prism-aspnet.js b/components/prism-aspnet.js index 2e0f17afed..590e31edd8 100644 --- a/components/prism-aspnet.js +++ b/components/prism-aspnet.js @@ -28,7 +28,7 @@ Prism.languages.aspnet.tag.pattern = /<(?!%)\/?[^\s>\/]+(?:\s+[^\s>\/=]+(?:=(?:( // match directives of attribute value foo="<% Bar %>" Prism.languages.insertBefore('inside', 'punctuation', { 'directive': Prism.languages.aspnet['directive'] -}, Prism.languages.aspnet.tag.inside["attr-value"]); +}, Prism.languages.aspnet.tag.inside['attr-value']); Prism.languages.insertBefore('aspnet', 'comment', { 'asp-comment': { diff --git a/components/prism-autoit.js b/components/prism-autoit.js index 0dfb63dcc2..553d7cfcd7 100644 --- a/components/prism-autoit.js +++ b/components/prism-autoit.js @@ -1,5 +1,5 @@ Prism.languages.autoit = { - "comment": [ + 'comment': [ /;.*/, { // The multi-line comments delimiters can actually be commented out with ";" @@ -7,28 +7,28 @@ Prism.languages.autoit = { lookbehind: true } ], - "url": { + 'url': { pattern: /(^\s*#include\s+)(?:<[^\r\n>]+>|"[^\r\n"]+")/m, lookbehind: true }, - "string": { + 'string': { pattern: /(["'])(?:\1\1|(?!\1)[^\r\n])*\1/, greedy: true, inside: { - "variable": /([%$@])\w+\1/ + 'variable': /([%$@])\w+\1/ } }, - "directive": { + 'directive': { pattern: /(^\s*)#\w+/m, lookbehind: true, alias: 'keyword' }, - "function": /\b\w+(?=\()/, + 'function': /\b\w+(?=\()/, // Variables and macros - "variable": /[$@]\w+/, - "keyword": /\b(?:Case|Const|Continue(?:Case|Loop)|Default|Dim|Do|Else(?:If)?|End(?:Func|If|Select|Switch|With)|Enum|Exit(?:Loop)?|For|Func|Global|If|In|Local|Next|Null|ReDim|Select|Static|Step|Switch|Then|To|Until|Volatile|WEnd|While|With)\b/i, - "number": /\b(?:0x[\da-f]+|\d+(?:\.\d+)?(?:e[+-]?\d+)?)\b/i, - "boolean": /\b(?:True|False)\b/i, - "operator": /<[=>]?|[-+*\/=&>]=?|[?^]|\b(?:And|Or|Not)\b/i, - "punctuation": /[\[\]().,:]/ + 'variable': /[$@]\w+/, + 'keyword': /\b(?:Case|Const|Continue(?:Case|Loop)|Default|Dim|Do|Else(?:If)?|End(?:Func|If|Select|Switch|With)|Enum|Exit(?:Loop)?|For|Func|Global|If|In|Local|Next|Null|ReDim|Select|Static|Step|Switch|Then|To|Until|Volatile|WEnd|While|With)\b/i, + 'number': /\b(?:0x[\da-f]+|\d+(?:\.\d+)?(?:e[+-]?\d+)?)\b/i, + 'boolean': /\b(?:True|False)\b/i, + 'operator': /<[=>]?|[-+*\/=&>]=?|[?^]|\b(?:And|Or|Not)\b/i, + 'punctuation': /[\[\]().,:]/ }; diff --git a/components/prism-bash.js b/components/prism-bash.js index 7f0f9e4a31..9487408843 100644 --- a/components/prism-bash.js +++ b/components/prism-bash.js @@ -15,7 +15,7 @@ var insideString = { 'bash': commandAfterHeredoc, 'environment': { - pattern: RegExp("\\$" + envVars), + pattern: RegExp('\\$' + envVars), alias: 'constant' }, 'variable': [ @@ -55,7 +55,7 @@ 'operator': /:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/, 'punctuation': /[\[\]]/, 'environment': { - pattern: RegExp("(\\{)" + envVars), + pattern: RegExp('(\\{)' + envVars), lookbehind: true, alias: 'constant' } @@ -105,7 +105,7 @@ pattern: /(^|[\s;|&]|[<>]\()\w+(?=\+?=)/, inside: { 'environment': { - pattern: RegExp("(^|[\\s;|&]|[<>]\\()" + envVars), + pattern: RegExp('(^|[\\s;|&]|[<>]\\()' + envVars), lookbehind: true, alias: 'constant' } @@ -155,7 +155,7 @@ } ], 'environment': { - pattern: RegExp("\\$?" + envVars), + pattern: RegExp('\\$?' + envVars), alias: 'constant' }, 'variable': insideString.variable, diff --git a/components/prism-diff.js b/components/prism-diff.js index 12a06f184c..eadf69758c 100644 --- a/components/prism-diff.js +++ b/components/prism-diff.js @@ -35,8 +35,8 @@ if (!/^\w+$/.test(name)) { // "deleted-sign" -> "deleted" alias.push(/\w+/.exec(name)[0]); } - if (name === "diff") { - alias.push("bold"); + if (name === 'diff') { + alias.push('bold'); } Prism.languages.diff[name] = { diff --git a/components/prism-jexl.js b/components/prism-jexl.js index a2dda2b821..b539287b6b 100644 --- a/components/prism-jexl.js +++ b/components/prism-jexl.js @@ -2,7 +2,7 @@ Prism.languages.jexl = { 'string': /(["'])(?:\\[\s\S]|(?!\1)[^\\])*\1/, 'transform': { pattern: /(\|\s*)[a-zA-Zа-яА-Я_\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF$][a-zA-Zа-яА-Я0-9_\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF$]*/, - alias: "function", + alias: 'function', lookbehind: true }, 'function': /[a-zA-Zа-яА-Я_\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF$][a-zA-Zа-яА-Я0-9_\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF$]*\s*(?=\()/, diff --git a/components/prism-kotlin.js b/components/prism-kotlin.js index 3ade990144..8e57a3e7b6 100644 --- a/components/prism-kotlin.js +++ b/components/prism-kotlin.js @@ -20,7 +20,7 @@ 'operator': /\+[+=]?|-[-=>]?|==?=?|!(?:!|==?)?|[\/*%<>]=?|[?:]:?|\.\.|&&|\|\||\b(?:and|inv|or|shl|shr|ushr|xor)\b/ }); - delete Prism.languages.kotlin["class-name"]; + delete Prism.languages.kotlin['class-name']; Prism.languages.insertBefore('kotlin', 'string', { 'raw-string': { diff --git a/components/prism-less.js b/components/prism-less.js index 5be11e08ae..67c968fca6 100644 --- a/components/prism-less.js +++ b/components/prism-less.js @@ -39,7 +39,7 @@ Prism.languages.insertBefore('less', 'property', { { pattern: /@[\w-]+\s*:/, inside: { - "punctuation": /:/ + 'punctuation': /:/ } }, diff --git a/components/prism-naniscript.js b/components/prism-naniscript.js index 406d17e014..7d797d976d 100644 --- a/components/prism-naniscript.js +++ b/components/prism-naniscript.js @@ -122,7 +122,7 @@ /** @type {(Token | string)[]} */ var tokens = env.tokens; tokens.forEach(function (token) { - if (typeof token !== "string" && token.type === 'generic-text') { + if (typeof token !== 'string' && token.type === 'generic-text') { var content = getTextContent(token); if (!isBracketsBalanced(content)) { token.type = 'bad-line'; @@ -137,7 +137,7 @@ * @returns {boolean} */ function isBracketsBalanced(input) { - var brackets = "[]{}"; + var brackets = '[]{}'; var stack = []; for (var i = 0; i < input.length; i++) { var bracket = input[i]; diff --git a/components/prism-pascaligo.js b/components/prism-pascaligo.js index 5e5eed033a..ab9f15e4f5 100644 --- a/components/prism-pascaligo.js +++ b/components/prism-pascaligo.js @@ -55,7 +55,7 @@ return accum; }, {}); - pascaligo["class-name"].forEach(function (p) { + pascaligo['class-name'].forEach(function (p) { p.inside = classNameInside; }); diff --git a/components/prism-peoplecode.js b/components/prism-peoplecode.js index b7db0f7648..16f93e7d6f 100644 --- a/components/prism-peoplecode.js +++ b/components/prism-peoplecode.js @@ -8,7 +8,7 @@ Prism.languages.peoplecode = { /<\*(?:[^<*]|\*(?!>)|<(?!\*)|<\*(?:(?!\*>)[\s\S])*\*>)*\*>/.source, // /+ +/ comments /\/\+[\s\S]*?\+\//.source, - ].join("|")), + ].join('|')), 'string': { pattern: /'(?:''|[^'\r\n])*'(?!')|"(?:""|[^"\r\n])*"(?!")/, greedy: true diff --git a/components/prism-smarty.js b/components/prism-smarty.js index 3cd6dedb99..658f04dea6 100644 --- a/components/prism-smarty.js +++ b/components/prism-smarty.js @@ -37,11 +37,11 @@ // Value is made optional because it may have already been tokenized pattern: /\w+\s*=\s*(?:(?!\d)\w+)?/, inside: { - "variable": { + 'variable': { pattern: /(=\s*)(?!\d)\w+/, lookbehind: true }, - "operator": /=/ + 'operator': /=/ } }, 'punctuation': [ diff --git a/components/prism-vbnet.js b/components/prism-vbnet.js index 464c9e1723..5878e3ac70 100644 --- a/components/prism-vbnet.js +++ b/components/prism-vbnet.js @@ -1,4 +1,4 @@ -Prism.languages.vbnet = Prism.languages.extend("basic", { +Prism.languages.vbnet = Prism.languages.extend('basic', { 'comment': [ { pattern: /(?:!|REM\b).+/i, diff --git a/components/prism-xeora.js b/components/prism-xeora.js index 7fafe5806b..fec952b444 100644 --- a/components/prism-xeora.js +++ b/components/prism-xeora.js @@ -107,7 +107,7 @@ Prism.languages.insertBefore('inside', 'punctuation', { 'variable': Prism.languages.xeora['function-inline'].inside['variable'] - }, Prism.languages.xeora["function-block"]); + }, Prism.languages.xeora['function-block']); Prism.languages.xeoracube = Prism.languages.xeora; diff --git a/components/prism-xquery.js b/components/prism-xquery.js index d5a02ffa1d..8541263bd5 100644 --- a/components/prism-xquery.js +++ b/components/prism-xquery.js @@ -4,7 +4,7 @@ 'xquery-comment': { pattern: /\(:[\s\S]*?:\)/, greedy: true, - alias: "comment" + alias: 'comment' }, 'string': { pattern: /(["'])(?:\1\1|(?!\1)[\s\S])*\1/, diff --git a/dangerfile.js b/dangerfile.js index 8063393244..76f4d155bf 100644 --- a/dangerfile.js +++ b/dangerfile.js @@ -56,7 +56,7 @@ const formatBytes = (bytes, decimals = 2) => { return parseFloat((bytes / Math.pow(k, i)).toFixed(dm)) + ' ' + sizes[i]; } -const maybePlus = (from, to) => from < to ? "+" : ""; +const maybePlus = (from, to) => from < to ? '+' : ''; const absDiff = (from, to) => { if (from === to) { diff --git a/dependencies.js b/dependencies.js index 7eeb8d15bc..a9e25c3dd0 100644 --- a/dependencies.js +++ b/dependencies.js @@ -1,4 +1,4 @@ -"use strict"; +'use strict'; /** * @typedef {Object} Components diff --git a/gulpfile.js/changelog.js b/gulpfile.js/changelog.js index 9e88d7c8db..984dc6754a 100644 --- a/gulpfile.js/changelog.js +++ b/gulpfile.js/changelog.js @@ -1,4 +1,4 @@ -"use strict"; +'use strict'; const { src, dest } = require('gulp'); @@ -230,7 +230,7 @@ async function changes() { if (change.mode === 'A' && change.file.startsWith('components/prism-')) { const lang = change.file.match(/prism-([\w-]+)\.js$/)[1]; const entry = languages[lang] || { - title: "REMOVED LANGUAGE " + lang, + title: 'REMOVED LANGUAGE ' + lang, }; const titles = [entry.title]; if (entry.aliasTitles) { diff --git a/gulpfile.js/docs.js b/gulpfile.js/docs.js index b23956445e..1e5b1c88fd 100644 --- a/gulpfile.js/docs.js +++ b/gulpfile.js/docs.js @@ -1,4 +1,4 @@ -"use strict"; +'use strict'; const { src, dest, series } = require('gulp'); const replace = require('gulp-replace'); diff --git a/gulpfile.js/index.js b/gulpfile.js/index.js index 048b290ea6..93b61b1a62 100644 --- a/gulpfile.js/index.js +++ b/gulpfile.js/index.js @@ -1,4 +1,4 @@ -"use strict"; +'use strict'; const { src, dest, series, parallel, watch } = require('gulp'); @@ -45,7 +45,7 @@ function inlineRegexSource() { } return '\\\\' + g1; } else { - return "[^]"; + return '[^]'; } }); // escape single quotes diff --git a/gulpfile.js/paths.js b/gulpfile.js/paths.js index 1d5b7a3f38..9ce69ed561 100644 --- a/gulpfile.js/paths.js +++ b/gulpfile.js/paths.js @@ -1,4 +1,4 @@ -"use strict"; +'use strict'; module.exports = { componentsFile: 'components.json', diff --git a/plugins/autoloader/prism-autoloader.js b/plugins/autoloader/prism-autoloader.js index 7134d8215b..2da746f88c 100644 --- a/plugins/autoloader/prism-autoloader.js +++ b/plugins/autoloader/prism-autoloader.js @@ -4,6 +4,8 @@ return; } + /* eslint-disable */ + /** * The dependencies map is built automatically with gulp. * @@ -240,6 +242,8 @@ "yml": "yaml" }/*]*/; + /* eslint-enable */ + /** * @typedef LangDataItem * @property {{ success?: () => void, error?: () => void }[]} callbacks diff --git a/plugins/command-line/prism-command-line.js b/plugins/command-line/prism-command-line.js index f63bb1f377..31a3fc6f4d 100644 --- a/plugins/command-line/prism-command-line.js +++ b/plugins/command-line/prism-command-line.js @@ -8,7 +8,7 @@ var PROMPT_CLASS = 'command-line-prompt'; /** @type {(str: string, prefix: string) => boolean} */ - var startsWith = "".startsWith + var startsWith = ''.startsWith ? function (s, p) { return s.startsWith(p); } : function (s, p) { return s.indexOf(p) === 0; }; @@ -22,7 +22,7 @@ * @returns {string} */ function repeat(str, times) { - var s = ""; + var s = ''; for (var i = 0; i < times; i++) { s += str; } diff --git a/plugins/copy-to-clipboard/prism-copy-to-clipboard.js b/plugins/copy-to-clipboard/prism-copy-to-clipboard.js index 7b1aa2bdf2..04d69c8bf1 100644 --- a/plugins/copy-to-clipboard/prism-copy-to-clipboard.js +++ b/plugins/copy-to-clipboard/prism-copy-to-clipboard.js @@ -31,13 +31,13 @@ /** @param {CopyInfo} copyInfo */ function fallbackCopyTextToClipboard(copyInfo) { - var textArea = document.createElement("textarea"); + var textArea = document.createElement('textarea'); textArea.value = copyInfo.getText(); // Avoid scrolling to bottom - textArea.style.top = "0"; - textArea.style.left = "0"; - textArea.style.position = "fixed"; + textArea.style.top = '0'; + textArea.style.left = '0'; + textArea.style.position = 'fixed'; document.body.appendChild(textArea); textArea.focus(); diff --git a/plugins/highlight-keywords/prism-highlight-keywords.js b/plugins/highlight-keywords/prism-highlight-keywords.js index 5143b4b472..8743094e5c 100644 --- a/plugins/highlight-keywords/prism-highlight-keywords.js +++ b/plugins/highlight-keywords/prism-highlight-keywords.js @@ -5,7 +5,7 @@ if (typeof Prism === 'undefined') { } Prism.hooks.add('wrap', function(env) { - if (env.type !== "keyword") { + if (env.type !== 'keyword') { return; } env.classes.push('keyword-' + env.content); diff --git a/plugins/jsonp-highlight/prism-jsonp-highlight.js b/plugins/jsonp-highlight/prism-jsonp-highlight.js index 81d2833961..605ee332ef 100644 --- a/plugins/jsonp-highlight/prism-jsonp-highlight.js +++ b/plugins/jsonp-highlight/prism-jsonp-highlight.js @@ -29,7 +29,7 @@ */ function registerAdapter(adapter, name) { name = name || adapter.name; - if (typeof adapter === "function" && !getAdapter(adapter) && !getAdapter(name)) { + if (typeof adapter === 'function' && !getAdapter(adapter) && !getAdapter(name)) { adapters.push({ adapter: adapter, name: name }); } } @@ -42,14 +42,14 @@ * @returns {Adapter} A registered adapter or `null`. */ function getAdapter(adapter) { - if (typeof adapter === "function") { + if (typeof adapter === 'function') { for (var i = 0, item; item = adapters[i++];) { if (item.adapter.valueOf() === adapter.valueOf()) { return item.adapter; } } } - else if (typeof adapter === "string") { + else if (typeof adapter === 'string') { // eslint-disable-next-line no-redeclare for (var i = 0, item; item = adapters[i++];) { if (item.name === adapter) { @@ -66,10 +66,10 @@ * @param {string|Function} adapter The adapter itself or the name of an adapter. */ function removeAdapter(adapter) { - if (typeof adapter === "string") { + if (typeof adapter === 'string') { adapter = getAdapter(adapter); } - if (typeof adapter === "function") { + if (typeof adapter === 'function') { var index = adapters.findIndex(function (item) { return item.adapter === adapter; }); @@ -82,12 +82,12 @@ registerAdapter(function github(rsp) { if (rsp && rsp.meta && rsp.data) { if (rsp.meta.status && rsp.meta.status >= 400) { - return "Error: " + (rsp.data.message || rsp.meta.status); + return 'Error: ' + (rsp.data.message || rsp.meta.status); } - else if (typeof (rsp.data.content) === "string") { - return typeof (atob) === "function" - ? atob(rsp.data.content.replace(/\s/g, "")) - : "Your browser cannot decode base64"; + else if (typeof (rsp.data.content) === 'string') { + return typeof (atob) === 'function' + ? atob(rsp.data.content.replace(/\s/g, '')) + : 'Your browser cannot decode base64'; } } return null; @@ -95,11 +95,11 @@ registerAdapter(function gist(rsp, el) { if (rsp && rsp.meta && rsp.data && rsp.data.files) { if (rsp.meta.status && rsp.meta.status >= 400) { - return "Error: " + (rsp.data.message || rsp.meta.status); + return 'Error: ' + (rsp.data.message || rsp.meta.status); } var files = rsp.data.files; - var filename = el.getAttribute("data-filename"); + var filename = el.getAttribute('data-filename'); if (filename == null) { // Maybe in the future we can somehow render all files // But the standard + @@ -172,7 +172,7 @@

          Customize your download

          - + diff --git a/examples.html b/examples.html index e1942a2b37..6ce28fe6ec 100644 --- a/examples.html +++ b/examples.html @@ -43,7 +43,7 @@ padding-left: 40px; } - + @@ -99,7 +99,7 @@

          Per language examples

          - + diff --git a/extending.html b/extending.html index 35d7463ac6..eb6a561d26 100644 --- a/extending.html +++ b/extending.html @@ -8,7 +8,7 @@ - + - + @@ -123,7 +123,7 @@

          How can I use different highlighting for tokens with the same name in differ
          - + + @@ -318,7 +318,7 @@

          Credits

          - + diff --git a/known-failures.html b/known-failures.html index 11e2cf8001..fb4a53802d 100644 --- a/known-failures.html +++ b/known-failures.html @@ -19,7 +19,7 @@ columns: 4; } - + @@ -374,7 +374,7 @@

          Workarounds

          - + diff --git a/plugins/autolinker/index.html b/plugins/autolinker/index.html index 6612767065..b4e4a282c7 100644 --- a/plugins/autolinker/index.html +++ b/plugins/autolinker/index.html @@ -9,7 +9,7 @@ - + @@ -56,7 +56,7 @@

          HTML

          - + diff --git a/plugins/autoloader/index.html b/plugins/autoloader/index.html index 6a8187f84e..708be5e06e 100644 --- a/plugins/autoloader/index.html +++ b/plugins/autoloader/index.html @@ -22,7 +22,7 @@ content: ' [Generating... ' attr(data-progress) '%]'; } - + @@ -141,7 +141,7 @@

          Markdown

          - + diff --git a/plugins/command-line/index.html b/plugins/command-line/index.html index bb16498d01..04398bbb24 100644 --- a/plugins/command-line/index.html +++ b/plugins/command-line/index.html @@ -9,7 +9,7 @@ - + @@ -96,7 +96,7 @@

          Windows PowerShell With Output

          - + diff --git a/plugins/copy-to-clipboard/index.html b/plugins/copy-to-clipboard/index.html index 60058c1711..0abc5d49d0 100644 --- a/plugins/copy-to-clipboard/index.html +++ b/plugins/copy-to-clipboard/index.html @@ -9,7 +9,7 @@ - + @@ -202,7 +202,7 @@

          i18n

          - + diff --git a/plugins/custom-class/index.html b/plugins/custom-class/index.html index f453e15f49..ec94c122d8 100644 --- a/plugins/custom-class/index.html +++ b/plugins/custom-class/index.html @@ -8,7 +8,7 @@ - + @@ -178,7 +178,7 @@

          Add new classes

          - + diff --git a/plugins/data-uri-highlight/index.html b/plugins/data-uri-highlight/index.html index 30b581b513..0c986aae69 100644 --- a/plugins/data-uri-highlight/index.html +++ b/plugins/data-uri-highlight/index.html @@ -9,7 +9,7 @@ - + @@ -46,7 +46,7 @@

          Example

          - + diff --git a/plugins/diff-highlight/index.html b/plugins/diff-highlight/index.html index c0d6d887e4..d94f9c3d0c 100644 --- a/plugins/diff-highlight/index.html +++ b/plugins/diff-highlight/index.html @@ -9,7 +9,7 @@ - + @@ -91,7 +91,7 @@

          Example

          - + diff --git a/plugins/download-button/index.html b/plugins/download-button/index.html index d0236bc1a8..2f7c29c91f 100644 --- a/plugins/download-button/index.html +++ b/plugins/download-button/index.html @@ -9,7 +9,7 @@ - + @@ -44,7 +44,7 @@

          Examples

          - + diff --git a/plugins/file-highlight/index.html b/plugins/file-highlight/index.html index 1b41d66a25..7452bf752d 100644 --- a/plugins/file-highlight/index.html +++ b/plugins/file-highlight/index.html @@ -8,7 +8,7 @@ - + @@ -49,7 +49,7 @@

          Examples

          - + diff --git a/plugins/filter-highlight-all/index.html b/plugins/filter-highlight-all/index.html index bca36e1ae0..58523c593e 100644 --- a/plugins/filter-highlight-all/index.html +++ b/plugins/filter-highlight-all/index.html @@ -8,7 +8,7 @@ - + @@ -127,7 +127,7 @@

          Examples

          - + diff --git a/plugins/highlight-keywords/index.html b/plugins/highlight-keywords/index.html index c07ba4f608..bbce365715 100644 --- a/plugins/highlight-keywords/index.html +++ b/plugins/highlight-keywords/index.html @@ -8,7 +8,7 @@ - + - + @@ -66,7 +66,7 @@

          HTML (Markup)

          - + diff --git a/plugins/jsonp-highlight/index.html b/plugins/jsonp-highlight/index.html index d281adf18e..14b0278ee7 100644 --- a/plugins/jsonp-highlight/index.html +++ b/plugins/jsonp-highlight/index.html @@ -8,7 +8,7 @@ - + @@ -160,7 +160,7 @@

          Examples

          - + diff --git a/plugins/keep-markup/index.html b/plugins/keep-markup/index.html index 9075b58fa6..01d52692d2 100644 --- a/plugins/keep-markup/index.html +++ b/plugins/keep-markup/index.html @@ -22,7 +22,7 @@ } - + @@ -70,7 +70,7 @@

          Examples

          - + diff --git a/plugins/line-highlight/index.html b/plugins/line-highlight/index.html index 8ade641bef..f06b5a53a1 100644 --- a/plugins/line-highlight/index.html +++ b/plugins/line-highlight/index.html @@ -10,7 +10,7 @@ - + @@ -90,7 +90,7 @@

          With linkable line numbers

          - + diff --git a/plugins/line-numbers/index.html b/plugins/line-numbers/index.html index e1a1994f49..a6c93b1ace 100644 --- a/plugins/line-numbers/index.html +++ b/plugins/line-numbers/index.html @@ -9,7 +9,7 @@ - + @@ -75,7 +75,7 @@

          Soft wrap support

          - + diff --git a/plugins/match-braces/index.html b/plugins/match-braces/index.html index 9a0770fa48..47fd9a8f66 100644 --- a/plugins/match-braces/index.html +++ b/plugins/match-braces/index.html @@ -9,7 +9,7 @@ - + @@ -64,7 +64,7 @@

          Lisp with rainbow braces 🌈 but without hover

          - + diff --git a/plugins/normalize-whitespace/index.html b/plugins/normalize-whitespace/index.html index bc2b0ab024..ce049d8f55 100644 --- a/plugins/normalize-whitespace/index.html +++ b/plugins/normalize-whitespace/index.html @@ -21,7 +21,7 @@ } - + @@ -167,7 +167,7 @@

          Examples

          - + diff --git a/plugins/previewers/index.html b/plugins/previewers/index.html index cfefff6b18..7dde3d97ef 100644 --- a/plugins/previewers/index.html +++ b/plugins/previewers/index.html @@ -9,7 +9,7 @@ - + @@ -220,7 +220,7 @@

          new Prism.plugins.Previewer(type, updater, - + diff --git a/plugins/remove-initial-line-feed/index.html b/plugins/remove-initial-line-feed/index.html index 95490b28c4..172fc1e881 100644 --- a/plugins/remove-initial-line-feed/index.html +++ b/plugins/remove-initial-line-feed/index.html @@ -8,7 +8,7 @@ - + @@ -45,7 +45,7 @@

          With the class added

          - + diff --git a/plugins/show-invisibles/index.html b/plugins/show-invisibles/index.html index 19138a0d78..664a1b94e6 100644 --- a/plugins/show-invisibles/index.html +++ b/plugins/show-invisibles/index.html @@ -9,7 +9,7 @@ - + @@ -32,7 +32,7 @@

          Examples

          - + diff --git a/plugins/show-language/index.html b/plugins/show-language/index.html index 660f38f7d9..e947c72c99 100644 --- a/plugins/show-language/index.html +++ b/plugins/show-language/index.html @@ -9,7 +9,7 @@ - + @@ -43,7 +43,7 @@

          Plain text

          - + diff --git a/plugins/toolbar/index.html b/plugins/toolbar/index.html index e85db09654..6c5b88c152 100644 --- a/plugins/toolbar/index.html +++ b/plugins/toolbar/index.html @@ -9,7 +9,7 @@ - + @@ -100,7 +100,7 @@

          Ordering buttons

          - + + @@ -75,7 +75,7 @@

          How to use

          - + diff --git a/plugins/unescaped-markup/index.html b/plugins/unescaped-markup/index.html index a0309096e8..c066d7cce0 100644 --- a/plugins/unescaped-markup/index.html +++ b/plugins/unescaped-markup/index.html @@ -10,7 +10,7 @@ - + @@ -60,7 +60,7 @@

          Examples

          - + @@ -164,7 +164,7 @@

          FAQ

          - + @@ -190,7 +190,7 @@

          FAQ

          - + diff --git a/plugins/wpd/index.html b/plugins/wpd/index.html index 3cae97c4cc..0cb0b3565c 100644 --- a/plugins/wpd/index.html +++ b/plugins/wpd/index.html @@ -9,7 +9,7 @@ - + @@ -55,7 +55,7 @@

          SVG

          - + diff --git a/test-suite.html b/test-suite.html index 4fccf27cda..79fed5e6e7 100644 --- a/test-suite.html +++ b/test-suite.html @@ -7,7 +7,7 @@ Running the test suite ▲ Prism - + @@ -207,7 +207,7 @@

          Internal structure

          - + diff --git a/test.html b/test.html index a3399c39d5..0f363e8b47 100644 --- a/test.html +++ b/test.html @@ -130,7 +130,7 @@ } - + @@ -171,7 +171,7 @@

          Test drive

          - + From 531514048a1dbfabe9ae983dab49bb4239589469 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Sat, 1 May 2021 18:01:07 +0200 Subject: [PATCH 0807/1100] Tests: Exhaustive pattern tests (#2688) --- components/prism-erb.js | 2 +- components/prism-erb.min.js | 2 +- tests/pattern-tests.js | 846 ++++++++++++++++++++++-------------- 3 files changed, 511 insertions(+), 339 deletions(-) diff --git a/components/prism-erb.js b/components/prism-erb.js index 132f4f56d1..989d56f35f 100644 --- a/components/prism-erb.js +++ b/components/prism-erb.js @@ -9,7 +9,7 @@ }); Prism.hooks.add('before-tokenize', function (env) { - var erbPattern = /<%=?(?:[^\r\n]|[\r\n](?!=begin)|[\r\n]=begin\s[\s\S]*?^=end)+?%>/gm; + var erbPattern = /<%=?(?:[^\r\n]|[\r\n](?!=begin)|[\r\n]=begin\s(?:[^\r\n]|[\r\n](?!=end))*[\r\n]=end)+?%>/gm; Prism.languages['markup-templating'].buildPlaceholders(env, 'erb', erbPattern); }); diff --git a/components/prism-erb.min.js b/components/prism-erb.min.js index 25d3c27b6b..a9ca5e42a1 100644 --- a/components/prism-erb.min.js +++ b/components/prism-erb.min.js @@ -1 +1 @@ -!function(n){n.languages.erb=n.languages.extend("ruby",{}),n.languages.insertBefore("erb","comment",{delimiter:{pattern:/^<%=?|%>$/,alias:"punctuation"}}),n.hooks.add("before-tokenize",function(e){n.languages["markup-templating"].buildPlaceholders(e,"erb",/<%=?(?:[^\r\n]|[\r\n](?!=begin)|[\r\n]=begin\s[\s\S]*?^=end)+?%>/gm)}),n.hooks.add("after-tokenize",function(e){n.languages["markup-templating"].tokenizePlaceholders(e,"erb")})}(Prism); \ No newline at end of file +!function(n){n.languages.erb=n.languages.extend("ruby",{}),n.languages.insertBefore("erb","comment",{delimiter:{pattern:/^<%=?|%>$/,alias:"punctuation"}}),n.hooks.add("before-tokenize",function(e){n.languages["markup-templating"].buildPlaceholders(e,"erb",/<%=?(?:[^\r\n]|[\r\n](?!=begin)|[\r\n]=begin\s(?:[^\r\n]|[\r\n](?!=end))*[\r\n]=end)+?%>/gm)}),n.hooks.add("after-tokenize",function(e){n.languages["markup-templating"].tokenizePlaceholders(e,"erb")})}(Prism); \ No newline at end of file diff --git a/tests/pattern-tests.js b/tests/pattern-tests.js index bf1ac4fcdd..90535e4489 100644 --- a/tests/pattern-tests.js +++ b/tests/pattern-tests.js @@ -1,26 +1,41 @@ +// @ts-check 'use strict'; const { assert } = require('chai'); const PrismLoader = require('./helper/prism-loader'); +const TestDiscovery = require('./helper/test-discovery'); +const TestCase = require('./helper/test-case'); const { BFS, parseRegex } = require('./helper/util'); const { languages } = require('../components.json'); const { visitRegExpAST } = require('regexpp'); const { transform, combineTransformers, JS, Words, NFA, Transformers } = require('refa'); const scslre = require('scslre'); +const path = require('path'); /** - * A set of all safe (non-exponentially backtracking) RegExp literals (string). + * A map from language id to a list of code snippets in that language. * - * @type {Set} + * @type {Map} */ -const expoSafeRegexes = new Set(); +const testSnippets = new Map(); +const testSuite = TestDiscovery.loadAllTests(__dirname + '/languages'); +for (const languageIdentifier in testSuite) { + const lang = TestCase.parseLanguageNames(languageIdentifier).mainLanguage; + let snippets = testSnippets.get(lang); + if (snippets === undefined) { + snippets = []; + testSnippets.set(lang, snippets); + } + + for (const file of testSuite[languageIdentifier]) { + if (path.extname(file) === '.test') { + snippets.push(TestCase.parseTestCaseFile(file).code); + } else { + snippets.push(...Object.keys(require(file))); + } + } +} -/** - * A set of all safe (non-polynomially backtracking) RegExp literals (string). - * - * @type {Set} - */ -const polySafeRegexes = new Set(); for (const lang in languages) { if (lang === 'meta') { @@ -29,19 +44,9 @@ for (const lang in languages) { describe(`Patterns of '${lang}'`, function () { const Prism = PrismLoader.createInstance(lang); - testPatterns(Prism); + testPatterns(Prism, lang); }); - function toArray(value) { - if (Array.isArray(value)) { - return value; - } else if (value != null) { - return [value]; - } else { - return []; - } - } - let optional = toArray(languages[lang].optional); let modify = toArray(languages[lang].modify); @@ -56,7 +61,7 @@ for (const lang in languages) { describe(name, function () { const Prism = PrismLoader.createInstance([...optional, ...modify, lang]); - testPatterns(Prism); + testPatterns(Prism, lang); }); } } @@ -65,6 +70,7 @@ for (const lang in languages) { * Tests all patterns in the given Prism instance. * * @param {any} Prism + * @param {string} mainLanguage * * @typedef {import("./helper/util").LiteralAST} LiteralAST * @typedef {import("regexpp/ast").CapturingGroup} CapturingGroup @@ -73,7 +79,40 @@ for (const lang in languages) { * @typedef {import("regexpp/ast").LookaroundAssertion} LookaroundAssertion * @typedef {import("regexpp/ast").Pattern} Pattern */ -function testPatterns(Prism) { +function testPatterns(Prism, mainLanguage) { + + /** + * Returns a list of relevant languages in the Prism instance. + * + * The list does not included readonly dependencies and aliases. + * + * @returns {string[]} + */ + function getRelevantLanguages() { + return [mainLanguage, ...toArray(languages[mainLanguage].modify)] + .filter(lang => lang in Prism.languages); + } + + /** + * @param {string} root + * @param {Parameters[1]>[0]} path + * @returns {string} + */ + function BFSPathToString(root, path) { + let pathStr = root; + for (const { key } of path) { + if (!key) { + // do nothing + } else if (/^\d+$/.test(key)) { + pathStr += `[${key}]`; + } else if (/^[a-z]\w*$/i.test(key)) { + pathStr += `.${key}`; + } else { + pathStr += `[${JSON.stringify(key)}]`; + } + } + return pathStr; + } /** * Invokes the given function on every pattern in `Prism.languages`. @@ -94,49 +133,73 @@ function testPatterns(Prism) { * @property {(message: string) => void} reportError */ function forEachPattern(callback) { + const visited = new Set(); const errors = []; - BFS(Prism.languages, path => { - const { key, value } = path[path.length - 1]; - - let tokenPath = 'Prism.languages'; - for (const { key } of path) { - if (!key) { - // do nothing - } else if (/^\d+$/.test(key)) { - tokenPath += `[${key}]`; - } else if (/^[a-z]\w*$/i.test(key)) { - tokenPath += `.${key}`; - } else { - tokenPath += `[${JSON.stringify(key)}]`; - } + /** + * @param {object} root + * @param {string} rootStr + */ + function traverse(root, rootStr) { + if (visited.has(root)) { + return; } + visited.add(root); - if (Object.prototype.toString.call(value) == '[object RegExp]') { - try { - let ast; + BFS(root, path => { + const { key, value } = path[path.length - 1]; + visited.add(value); + + const tokenPath = BFSPathToString(rootStr, path); + + if (Object.prototype.toString.call(value) == '[object RegExp]') { try { - ast = parseRegex(value); + let ast; + try { + ast = parseRegex(value); + } catch (error) { + throw new SyntaxError(`Invalid RegExp at ${tokenPath}\n\n${error.message}`); + } + + const parent = path.length > 1 ? path[path.length - 2].value : undefined; + callback({ + pattern: value, + ast, + tokenPath, + name: key, + parent, + path, + lookbehind: key === 'pattern' && parent && !!parent.lookbehind, + reportError: message => errors.push(message) + }); } catch (error) { - throw new SyntaxError(`Invalid RegExp at ${tokenPath}\n\n${error.message}`); + errors.push(error); } - - const parent = path.length > 1 ? path[path.length - 2].value : undefined; - callback({ - pattern: value, - ast, - tokenPath, - name: key, - parent, - path, - lookbehind: key === 'pattern' && parent && !!parent.lookbehind, - reportError: message => errors.push(message) - }); - } catch (error) { - errors.push(error); } + }); + } + + // static analysis + traverse(Prism.languages, 'Prism.languages'); + + // dynamic analysis + for (const lang of getRelevantLanguages()) { + const snippets = testSnippets.get(lang); + const grammar = Prism.languages[lang]; + + const oldTokenize = Prism.tokenize; + Prism.tokenize = function (_, grammar) { + const result = oldTokenize.apply(this, arguments); + traverse(grammar, lang + ': '); + return result; + }; + + for (const snippet of (snippets || [])) { + Prism.highlight(snippet, grammar, lang); } - }); + + Prism.tokenize = oldTokenize; + } if (errors.length > 0) { throw new Error(errors.map(e => String(e.message || e)).join('\n\n')); @@ -165,91 +228,6 @@ function testPatterns(Prism) { }); } - /** - * Returns whether the given element will always have zero width meaning that it doesn't consume characters. - * - * @param {Element} element - * @returns {boolean} - */ - function isAlwaysZeroWidth(element) { - switch (element.type) { - case 'Assertion': - // assertions == ^, $, \b, lookarounds - return true; - case 'Quantifier': - return element.max === 0 || isAlwaysZeroWidth(element.element); - case 'CapturingGroup': - case 'Group': - // every element in every alternative has to be of zero length - return element.alternatives.every(alt => alt.elements.every(isAlwaysZeroWidth)); - case 'Backreference': - // on if the group referred to is of zero length - return isAlwaysZeroWidth(element.resolved); - default: - return false; // what's left are characters - } - } - - /** - * Returns whether the given element will always at the start of the whole match. - * - * @param {Element} element - * @returns {boolean} - */ - function isFirstMatch(element) { - const parent = element.parent; - switch (parent.type) { - case 'Alternative': { - // all elements before this element have to of zero length - if (!parent.elements.slice(0, parent.elements.indexOf(element)).every(isAlwaysZeroWidth)) { - return false; - } - const grandParent = parent.parent; - if (grandParent.type === 'Pattern') { - return true; - } else { - return isFirstMatch(grandParent); - } - } - - case 'Quantifier': - if (parent.max >= 2) { - return false; - } else { - return isFirstMatch(parent); - } - - default: - throw new Error(`Internal error: The given node should not be a '${element.type}'.`); - } - } - - /** - * Returns whether the given node either is or is a child of what is effectively a Kleene star. - * - * @param {import("regexpp/ast").Node} node - * @returns {boolean} - */ - function underAStar(node) { - if (node.type === 'Quantifier' && node.max > 10) { - return true; - } else if (node.parent) { - return underAStar(node.parent); - } else { - return false; - } - } - - /** - * @param {Iterable} iter - * @returns {T | undefined} - * @template T - */ - function firstOf(iter) { - const [first] = iter; - return first; - } - it('- should not match the empty string', function () { forEachPattern(({ pattern, tokenPath }) => { @@ -384,221 +362,370 @@ function testPatterns(Prism) { }); it('- should not cause exponential backtracking', function () { - /** @type {Transformers.CreationOptions} */ - const options = { - ignoreOrder: true, - ignoreAmbiguity: true - }; - const transformer = combineTransformers([ - Transformers.inline(options), - Transformers.removeDeadBranches(options), - Transformers.unionCharacters(options), - Transformers.moveUpEmpty(options), - Transformers.nestedQuantifiers(options), - Transformers.sortAssertions(options), - Transformers.removeUnnecessaryAssertions(options), - Transformers.applyAssertions(options), - ]); - - forEachPattern(({ pattern, ast, tokenPath }) => { - const patternStr = String(pattern); - if (expoSafeRegexes.has(patternStr)) { - // we know that the pattern won't cause exp backtracking because we checked before - return; - } + replaceRegExpProto(exec => { + return function (input) { + checkExponentialBacktracking('', this); + return exec.call(this, input); + }; + }, () => { + forEachPattern(({ pattern, ast, tokenPath }) => { + checkExponentialBacktracking(tokenPath, pattern, ast); + }); + }); + }); - const parser = JS.Parser.fromAst(ast); - /** - * Parses the given element and creates its NFA. - * - * @param {import("refa").JS.ParsableElement} element - * @returns {NFA} - */ - function toNFA(element) { - let { expression, maxCharacter } = parser.parseElement(element, { - maxBackreferenceWords: 1000, - backreferences: 'disable' - }); + it('- should not cause polynomial backtracking', function () { + replaceRegExpProto(exec => { + return function (input) { + checkPolynomialBacktracking('', this); + return exec.call(this, input); + }; + }, () => { + forEachPattern(({ pattern, ast, tokenPath }) => { + checkPolynomialBacktracking(tokenPath, pattern, ast); + }); + }); + }); - // try to remove assertions - expression = transform(transformer, expression); +} - return NFA.fromRegex(expression, { maxCharacter }, { assertions: 'disable' }); - } - /** - * Checks whether the alternatives of the given node are disjoint. If the alternatives are not disjoint - * and the give node is a descendant of an effective Kleene star, then an error will be thrown. - * - * @param {CapturingGroup | Group | LookaroundAssertion} node - * @returns {void} - */ - function checkDisjointAlternatives(node) { - if (!underAStar(node) || node.alternatives.length < 2) { - return; - } +/** + * Returns whether the given element will always have zero width meaning that it doesn't consume characters. + * + * @param {Element} element + * @returns {boolean} + */ +function isAlwaysZeroWidth(element) { + switch (element.type) { + case 'Assertion': + // assertions == ^, $, \b, lookarounds + return true; + case 'Quantifier': + return element.max === 0 || isAlwaysZeroWidth(element.element); + case 'CapturingGroup': + case 'Group': + // every element in every alternative has to be of zero length + return element.alternatives.every(alt => alt.elements.every(isAlwaysZeroWidth)); + case 'Backreference': + // on if the group referred to is of zero length + return isAlwaysZeroWidth(element.resolved); + default: + return false; // what's left are characters + } +} - const alternatives = node.alternatives; - - const total = toNFA(alternatives[0]); - total.withoutEmptyWord(); - for (let i = 1, l = alternatives.length; i < l; i++) { - const a = alternatives[i]; - const current = toNFA(a); - current.withoutEmptyWord(); - - if (!total.isDisjointWith(current)) { - assert.fail(`${tokenPath}: The alternative \`${a.raw}\` is not disjoint with at least one previous alternative.` - + ` This will cause exponential backtracking.` - + `\n\nTo fix this issue, you have to rewrite the ${node.type} \`${node.raw}\`.` - + ` The goal is that all of its alternatives are disjoint.` - + ` This means that if a (sub-)string is matched by the ${node.type}, then only one of its alternatives can match the (sub-)string.` - + `\n\nExample: \`(?:[ab]|\\w|::)+\`` - + `\nThe alternatives of the group are not disjoint because the string "a" can be matched by both \`[ab]\` and \`\\w\`.` - + ` In this example, the pattern can easily be fixed because the \`[ab]\` is a subset of the \`\\w\`, so its enough to remove the \`[ab]\` alternative to get \`(?:\\w|::)+\` as the fixed pattern.` - + `\nIn the real world, patterns can be a lot harder to fix.` - + ` If you are trying to make the tests pass for a pull request but can\'t fix the issue yourself, then make the pull request (or commit) anyway.` - + ` A maintainer will help you.` - + `\n\nFull pattern:\n${pattern}`); - } else if (i !== l - 1) { - total.union(current); - } - } +/** + * Returns whether the given element will always at the start of the whole match. + * + * @param {Element} element + * @returns {boolean} + */ +function isFirstMatch(element) { + const parent = element.parent; + switch (parent.type) { + case 'Alternative': { + // all elements before this element have to of zero length + if (!parent.elements.slice(0, parent.elements.indexOf(element)).every(isAlwaysZeroWidth)) { + return false; } + const grandParent = parent.parent; + if (grandParent.type === 'Pattern') { + return true; + } else { + return isFirstMatch(grandParent); + } + } - visitRegExpAST(ast.pattern, { - onCapturingGroupLeave: checkDisjointAlternatives, - onGroupLeave: checkDisjointAlternatives, - onAssertionLeave(node) { - if (node.kind === 'lookahead' || node.kind === 'lookbehind') { - checkDisjointAlternatives(node); - } - }, + case 'Quantifier': + if (parent.max >= 2) { + return false; + } else { + return isFirstMatch(parent); + } - onQuantifierLeave(node) { - if (node.max < 10) { - return; // not a star - } - if (node.element.type !== 'CapturingGroup' && node.element.type !== 'Group') { - return; // not a group - } + default: + throw new Error(`Internal error: The given node should not be a '${element.type}'.`); + } +} - // The idea here is the following: - // - // We have found a part `A*` of the regex (`A` is assumed to not accept the empty word). Let `I` be - // the intersection of `A` and `A{2,}`. If `I` is not empty, then there exists a non-empty word `w` - // that is accepted by both `A` and `A{2,}`. That means that there exists some `m>1` for which `w` - // is accepted by `A{m}`. - // This means that there are at least two ways `A*` can accept `w`. It can be accepted as `A` or as - // `A{m}`. Hence there are at least 2^n ways for `A*` to accept the word `w{n}`. This is the main - // requirement for exponential backtracking. - // - // This is actually only a crude approximation for the real analysis that would have to be done. We - // would actually have to check the intersection `A{p}` and `A{p+1,}` for all p>0. However, in most - // cases, the approximation is good enough. - - const nfa = toNFA(node.element); - nfa.withoutEmptyWord(); - const twoStar = nfa.copy(); - twoStar.quantify(2, Infinity); - - if (!nfa.isDisjointWith(twoStar)) { - const word = Words.pickMostReadableWord(firstOf(nfa.intersectionWordSets(twoStar))); - const example = Words.fromUnicodeToString(word); - assert.fail(`${tokenPath}: The quantifier \`${node.raw}\` ambiguous for all words ${JSON.stringify(example)}.repeat(n) for any n>1.` - + ` This will cause exponential backtracking.` - + `\n\nTo fix this issue, you have to rewrite the element (let's call it E) of the quantifier.` - + ` The goal is modify E such that it is disjoint with repetitions of itself.` - + ` This means that if a (sub-)string is matched by E, then it must not be possible for E{2}, E{3}, E{4}, etc. to match that (sub-)string.` - + `\n\nExample 1: \`(?:\\w+|::)+\`` - + `\nThe problem lies in \`\\w+\` because \`\\w+\` and \`(?:\\w+){2}\` are not disjoint as the string "aa" is fully matched by both.` - + ` In this example, the pattern can easily be fixed by changing \`\\w+\` to \`\\w\`.` - + `\nExample 2: \`(?:\\w|Foo)+\`` - + `\nThe problem lies in \`\\w\` and \`Foo\` because the string "Foo" can be matched as either repeating \`\\w\` 3 times or by using the \`Foo\` alternative once.` - + ` In this example, the pattern can easily be fixed because the \`Foo\` alternative is redundant can can be removed.` - + `\nExample 3: \`(?:\\.\\w+(?:<.*?>)?)+\`` - + `\nThe problem lies in \`<.*?>\`. The string ".a<>.a<>" can be matched as either \`\\. \\w < . . . . >\` or \`\\. \\w < > \\. \\w < >\`.` - + ` When it comes to exponential backtracking, it doesn't matter whether a quantifier is greedy or lazy.` - + ` This means that the lazy \`.*?\` can jump over \`>\`.` - + ` In this example, the pattern can easily be fixed because we just have to prevent \`.*?\` jumping over \`>\`.` - + ` This can done by replacing \`<.*?>\` with \`<[^\\r\\n>]*>\`.` - + `\n\nIn the real world, patterns can be a lot harder to fix.` - + ` If you are trying to make this test pass for a pull request but can\'t fix the issue yourself, then make the pull request (or commit) anyway, a maintainer will help you.` - + `\n\nFull pattern:\n${pattern}`); - } - }, - }); +/** + * Returns whether the given node either is or is a child of what is effectively a Kleene star. + * + * @param {import("regexpp/ast").Node} node + * @returns {boolean} + */ +function underAStar(node) { + if (node.type === 'Quantifier' && node.max > 10) { + return true; + } else if (node.parent) { + return underAStar(node.parent); + } else { + return false; + } +} + +/** + * @param {Iterable} iter + * @returns {T | undefined} + * @template T + */ +function firstOf(iter) { + const [first] = iter; + return first; +} + +/** + * A set of all safe (non-exponentially backtracking) RegExp literals (string). + * + * @type {Set} + */ +const expoSafeRegexes = new Set(); - expoSafeRegexes.add(patternStr); +/** @type {Transformers.CreationOptions} */ +const options = { + ignoreOrder: true, + ignoreAmbiguity: true +}; +const transformer = combineTransformers([ + Transformers.inline(options), + Transformers.removeDeadBranches(options), + Transformers.unionCharacters(options), + Transformers.moveUpEmpty(options), + Transformers.nestedQuantifiers(options), + Transformers.sortAssertions(options), + Transformers.removeUnnecessaryAssertions(options), + Transformers.applyAssertions(options), +]); + + +/** + * @param {string} path + * @param {RegExp} pattern + * @param {LiteralAST} [ast] + * @returns {void} + */ +function checkExponentialBacktracking(path, pattern, ast) { + if (expoSafeRegexes.has(pattern)) { + // we know that the pattern won't cause exp backtracking because we checked before + return; + } + const patternStr = String(pattern); + if (expoSafeRegexes.has(patternStr)) { + // we know that the pattern won't cause exp backtracking because we checked before + return; + } + + if (!ast) { + ast = parseRegex(pattern); + } + + const parser = JS.Parser.fromAst(ast); + /** + * Parses the given element and creates its NFA. + * + * @param {import("refa").JS.ParsableElement} element + * @returns {NFA} + */ + function toNFA(element) { + let { expression, maxCharacter } = parser.parseElement(element, { + maxBackreferenceWords: 1000, + backreferences: 'disable' }); - }); - it('- should not cause polynomial backtracking', function () { - forEachPattern(({ pattern, ast, tokenPath }) => { - const patternStr = String(pattern); - if (polySafeRegexes.has(patternStr)) { - // we know that the pattern won't cause poly backtracking because we checked before - return; + return NFA.fromRegex(transform(transformer, expression), { maxCharacter }, { assertions: 'disable' }); + } + + /** + * Checks whether the alternatives of the given node are disjoint. If the alternatives are not disjoint + * and the give node is a descendant of an effective Kleene star, then an error will be thrown. + * + * @param {CapturingGroup | Group | LookaroundAssertion} node + * @returns {void} + */ + function checkDisjointAlternatives(node) { + if (!underAStar(node) || node.alternatives.length < 2) { + return; + } + + const alternatives = node.alternatives; + + const total = toNFA(alternatives[0]); + total.withoutEmptyWord(); + for (let i = 1, l = alternatives.length; i < l; i++) { + const a = alternatives[i]; + const current = toNFA(a); + current.withoutEmptyWord(); + + if (!total.isDisjointWith(current)) { + assert.fail(`${path}: The alternative \`${a.raw}\` is not disjoint with at least one previous alternative.` + + ` This will cause exponential backtracking.` + + `\n\nTo fix this issue, you have to rewrite the ${node.type} \`${node.raw}\`.` + + ` The goal is that all of its alternatives are disjoint.` + + ` This means that if a (sub-)string is matched by the ${node.type}, then only one of its alternatives can match the (sub-)string.` + + `\n\nExample: \`(?:[ab]|\\w|::)+\`` + + `\nThe alternatives of the group are not disjoint because the string "a" can be matched by both \`[ab]\` and \`\\w\`.` + + ` In this example, the pattern can easily be fixed because the \`[ab]\` is a subset of the \`\\w\`, so its enough to remove the \`[ab]\` alternative to get \`(?:\\w|::)+\` as the fixed pattern.` + + `\nIn the real world, patterns can be a lot harder to fix.` + + ` If you are trying to make the tests pass for a pull request but can\'t fix the issue yourself, then make the pull request (or commit) anyway.` + + ` A maintainer will help you.` + + `\n\nFull pattern:\n${pattern}`); + } else if (i !== l - 1) { + total.union(current); } + } + } - const result = scslre.analyse(ast, { maxReports: 1, reportTypes: { 'Move': false } }); - if (result.reports.length > 0) { - const report = result.reports[0]; - - let rangeOffset; - let rangeStr; - let rangeHighlight; - - switch (report.type) { - case 'Trade': { - const start = Math.min(report.startQuant.start, report.endQuant.start); - const end = Math.max(report.startQuant.end, report.endQuant.end); - rangeOffset = start + 1; - rangeStr = patternStr.substring(start + 1, end + 1); - rangeHighlight = highlight([ - { ...report.startQuant, label: 'start' }, - { ...report.endQuant, label: 'end' } - ], -start); - break; - } - case 'Self': { - rangeOffset = report.parentQuant.start + 1; - rangeStr = patternStr.substring(report.parentQuant.start + 1, report.parentQuant.end + 1); - rangeHighlight = highlight([{ ...report.quant, label: 'self' }], -report.parentQuant.start); - break; - } - case 'Move': { - rangeOffset = 1; - rangeStr = patternStr.substring(1, report.quant.end + 1); - rangeHighlight = highlight([report.quant]); - break; - } - default: - throw new Error('Invalid report type "' + report.type + '". This should never happen.'); - } + visitRegExpAST(ast.pattern, { + onCapturingGroupLeave: checkDisjointAlternatives, + onGroupLeave: checkDisjointAlternatives, + onAssertionLeave(node) { + if (node.kind === 'lookahead' || node.kind === 'lookbehind') { + checkDisjointAlternatives(node); + } + }, - const attackChar = `/${report.character.literal.source}/${report.character.literal.flags}`; - const fixed = report.fix(); - - assert.fail( - `${tokenPath}: ${report.exponential ? 'Exponential' : 'Polynomial'} backtracking. ` - + `By repeating any character that matches ${attackChar}, an attack string can be created.` - + `\n` - + `\n${indent(rangeStr)}` - + `\n${indent(rangeHighlight)}` - + `\n` - + `\nFull pattern:` - + `\n${patternStr}` - + `\n${indent(rangeHighlight, ' '.repeat(rangeOffset))}` - + `\n` - + `\n` + (fixed ? `Fixed:\n/${fixed.source}/${fixed.flags}` : `Fix not available.`) - ); + onQuantifierLeave(node) { + if (node.max < 10) { + return; // not a star + } + if (node.element.type !== 'CapturingGroup' && node.element.type !== 'Group') { + return; // not a group } - polySafeRegexes.add(patternStr); - }); + // The idea here is the following: + // + // We have found a part `A*` of the regex (`A` is assumed to not accept the empty word). Let `I` be + // the intersection of `A` and `A{2,}`. If `I` is not empty, then there exists a non-empty word `w` + // that is accepted by both `A` and `A{2,}`. That means that there exists some `m>1` for which `w` + // is accepted by `A{m}`. + // This means that there are at least two ways `A*` can accept `w`. It can be accepted as `A` or as + // `A{m}`. Hence there are at least 2^n ways for `A*` to accept the word `w{n}`. This is the main + // requirement for exponential backtracking. + // + // This is actually only a crude approximation for the real analysis that would have to be done. We + // would actually have to check the intersection `A{p}` and `A{p+1,}` for all p>0. However, in most + // cases, the approximation is good enough. + + const nfa = toNFA(node.element); + nfa.withoutEmptyWord(); + const twoStar = nfa.copy(); + twoStar.quantify(2, Infinity); + + if (!nfa.isDisjointWith(twoStar)) { + const word = Words.pickMostReadableWord(firstOf(nfa.intersectionWordSets(twoStar))); + const example = Words.fromUnicodeToString(word); + assert.fail(`${path}: The quantifier \`${node.raw}\` ambiguous for all words ${JSON.stringify(example)}.repeat(n) for any n>1.` + + ` This will cause exponential backtracking.` + + `\n\nTo fix this issue, you have to rewrite the element (let's call it E) of the quantifier.` + + ` The goal is modify E such that it is disjoint with repetitions of itself.` + + ` This means that if a (sub-)string is matched by E, then it must not be possible for E{2}, E{3}, E{4}, etc. to match that (sub-)string.` + + `\n\nExample 1: \`(?:\\w+|::)+\`` + + `\nThe problem lies in \`\\w+\` because \`\\w+\` and \`(?:\\w+){2}\` are not disjoint as the string "aa" is fully matched by both.` + + ` In this example, the pattern can easily be fixed by changing \`\\w+\` to \`\\w\`.` + + `\nExample 2: \`(?:\\w|Foo)+\`` + + `\nThe problem lies in \`\\w\` and \`Foo\` because the string "Foo" can be matched as either repeating \`\\w\` 3 times or by using the \`Foo\` alternative once.` + + ` In this example, the pattern can easily be fixed because the \`Foo\` alternative is redundant can can be removed.` + + `\nExample 3: \`(?:\\.\\w+(?:<.*?>)?)+\`` + + `\nThe problem lies in \`<.*?>\`. The string ".a<>.a<>" can be matched as either \`\\. \\w < . . . . >\` or \`\\. \\w < > \\. \\w < >\`.` + + ` When it comes to exponential backtracking, it doesn't matter whether a quantifier is greedy or lazy.` + + ` This means that the lazy \`.*?\` can jump over \`>\`.` + + ` In this example, the pattern can easily be fixed because we just have to prevent \`.*?\` jumping over \`>\`.` + + ` This can done by replacing \`<.*?>\` with \`<[^\\r\\n>]*>\`.` + + `\n\nIn the real world, patterns can be a lot harder to fix.` + + ` If you are trying to make this test pass for a pull request but can\'t fix the issue yourself, then make the pull request (or commit) anyway, a maintainer will help you.` + + `\n\nFull pattern:\n${pattern}`); + } + }, }); + expoSafeRegexes.add(pattern); + expoSafeRegexes.add(patternStr); +} + +/** + * A set of all safe (non-polynomially backtracking) RegExp literals (string). + * + * @type {Set} + */ +const polySafeRegexes = new Set(); +/** + * @param {string} path + * @param {RegExp} pattern + * @param {LiteralAST} [ast] + * @returns {void} + */ +function checkPolynomialBacktracking(path, pattern, ast) { + if (polySafeRegexes.has(pattern)) { + // we know that the pattern won't cause poly backtracking because we checked before + return; + } + const patternStr = String(pattern); + if (polySafeRegexes.has(patternStr)) { + // we know that the pattern won't cause poly backtracking because we checked before + return; + } + + if (!ast) { + ast = parseRegex(pattern); + } + + const result = scslre.analyse(ast, { maxReports: 1, reportTypes: { 'Move': false } }); + if (result.reports.length > 0) { + const report = result.reports[0]; + + let rangeOffset; + let rangeStr; + let rangeHighlight; + + switch (report.type) { + case 'Trade': { + const start = Math.min(report.startQuant.start, report.endQuant.start); + const end = Math.max(report.startQuant.end, report.endQuant.end); + rangeOffset = start + 1; + rangeStr = patternStr.substring(start + 1, end + 1); + rangeHighlight = highlight([ + { ...report.startQuant, label: 'start' }, + { ...report.endQuant, label: 'end' } + ], -start); + break; + } + case 'Self': { + rangeOffset = report.parentQuant.start + 1; + rangeStr = patternStr.substring(report.parentQuant.start + 1, report.parentQuant.end + 1); + rangeHighlight = highlight([{ ...report.quant, label: 'self' }], -report.parentQuant.start); + break; + } + case 'Move': { + rangeOffset = 1; + rangeStr = patternStr.substring(1, report.quant.end + 1); + rangeHighlight = highlight([report.quant]); + break; + } + default: + throw new Error('Invalid report type. This should never happen.'); + } + + const attackChar = `/${report.character.literal.source}/${report.character.literal.flags}`; + const fixed = report.fix(); + + assert.fail( + `${path}: ${report.exponential ? 'Exponential' : 'Polynomial'} backtracking. ` + + `By repeating any character that matches ${attackChar}, an attack string can be created.` + + `\n` + + `\n${indent(rangeStr)}` + + `\n${indent(rangeHighlight)}` + + `\n` + + `\nFull pattern:` + + `\n${patternStr}` + + `\n${indent(rangeHighlight, ' '.repeat(rangeOffset))}` + + `\n` + + `\n` + (fixed ? `Fixed:\n/${fixed.source}/${fixed.flags}` : `Fix not available.`) + ); + } + + polySafeRegexes.add(pattern); + polySafeRegexes.add(patternStr); } /** @@ -609,6 +736,7 @@ function testPatterns(Prism) { * @typedef Highlight * @property {number} start * @property {number} end + * @property {string} [label] */ function highlight(highlights, offset = 0) { highlights.sort((a, b) => a.start - b.start); @@ -646,3 +774,47 @@ function highlight(highlights, offset = 0) { function indent(str, amount = ' ') { return str.split(/\r?\n/g).map(m => m === '' ? '' : amount + m).join('\n'); } + +/** + * @param {(exec: RegExp["exec"]) => RegExp["exec"]} execSupplier + * @param {() => void} fn + */ +function replaceRegExpProto(execSupplier, fn) { + const oldExec = RegExp.prototype.exec; + const oldTest = RegExp.prototype.test; + const newExec = execSupplier(oldExec); + + RegExp.prototype.exec = newExec; + RegExp.prototype.test = function (input) { + return newExec.call(this, input) !== null; + }; + + let error; + try { + fn(); + } catch (e) { + error = e; + } + + RegExp.prototype.exec = oldExec; + RegExp.prototype.test = oldTest; + + if (error) { + throw error; + } +} + +/** + * @param {undefined | null | T | T[]} value + * @returns {T[]} + * @template T + */ +function toArray(value) { + if (Array.isArray(value)) { + return value; + } else if (value != null) { + return [value]; + } else { + return []; + } +} From 4492c5ceecf47ef6990a9ff9c6498766d2c4f738 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Mon, 3 May 2021 15:25:52 +0200 Subject: [PATCH 0808/1100] Tests: Test discovery should ignore unsupported file extensions (#2886) --- tests/helper/test-discovery.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/helper/test-discovery.js b/tests/helper/test-discovery.js index 9380e342b1..09657fcdcb 100644 --- a/tests/helper/test-discovery.js +++ b/tests/helper/test-discovery.js @@ -3,6 +3,7 @@ const fs = require('fs'); const path = require('path'); +const SUPPORTED_TEST_FILE_EXT = new Set('.js', '.test'); module.exports = { @@ -94,7 +95,8 @@ module.exports = { getAllFiles(src) { return fs.readdirSync(src) .filter(fileName => { - return fs.statSync(path.join(src, fileName)).isFile(); + return SUPPORTED_TEST_FILE_EXT.has(path.extname(fileName)) + && fs.statSync(path.join(src, fileName)).isFile(); }) .map(fileName => { return path.join(src, fileName); From a9a199b6eb308ab64a3924ce65eb2497a9882be4 Mon Sep 17 00:00:00 2001 From: RunDevelopment Date: Mon, 3 May 2021 22:56:44 +0200 Subject: [PATCH 0809/1100] Tests: Fixed languages test discovery --- tests/helper/test-discovery.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/helper/test-discovery.js b/tests/helper/test-discovery.js index 09657fcdcb..c52fb25e6d 100644 --- a/tests/helper/test-discovery.js +++ b/tests/helper/test-discovery.js @@ -3,7 +3,7 @@ const fs = require('fs'); const path = require('path'); -const SUPPORTED_TEST_FILE_EXT = new Set('.js', '.test'); +const SUPPORTED_TEST_FILE_EXT = new Set(['.js', '.test']); module.exports = { From cda976b1b76f6adb0e0b5e692db3b30404093e15 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Tue, 4 May 2021 16:46:50 +0200 Subject: [PATCH 0810/1100] Shell sessions: Fixed multi-line commands (#2872) --- components/prism-shell-session.js | 10 ++++++- components/prism-shell-session.min.js | 2 +- tests/languages/shell-session/issue2871.test | 30 ++++++++++++++++++++ 3 files changed, 40 insertions(+), 2 deletions(-) create mode 100644 tests/languages/shell-session/issue2871.test diff --git a/components/prism-shell-session.js b/components/prism-shell-session.js index 91ef9ea5a8..97487552d2 100644 --- a/components/prism-shell-session.js +++ b/components/prism-shell-session.js @@ -16,7 +16,15 @@ Prism.languages['shell-session'] = { 'command': { - pattern: RegExp(/^(?:[^\s@:$#*!/\\]+@[^\s@:$#*!/\\]+(?::[^\0-\x1F$#*?"<>:;|]+)?|[^\0-\x1F$#*?"<>:;|]+)?[$#](?:[^\\\r\n'"<$]|\\.|\$(?!')|<>)+/.source.replace(/<>/g, function () { return strings; }), 'm'), + pattern: RegExp( + // user info + /^(?:[^\s@:$#*!/\\]+@[^\s@:$#*!/\\]+(?::[^\0-\x1F$#*?"<>:;|]+)?|[^\0-\x1F$#*?"<>:;|]+)?/.source + + // shell symbol + /[$#]/.source + + // bash command + /(?:[^\\\r\n'"<$]|\\(?:[^\r]|\r\n?)|\$(?!')|<>)+/.source.replace(/<>/g, function () { return strings; }), + 'm' + ), greedy: true, inside: { 'info': { diff --git a/components/prism-shell-session.min.js b/components/prism-shell-session.min.js index d0ca81759f..4967676907 100644 --- a/components/prism-shell-session.min.js +++ b/components/prism-shell-session.min.js @@ -1 +1 @@ -!function(s){var n=['"(?:\\\\[^]|\\$\\([^)]+\\)|\\$(?!\\()|`[^`]+`|[^"\\\\`$])*"',"'[^']*'","\\$'(?:[^'\\\\]|\\\\[^])*'","<<-?\\s*([\"']?)(\\w+)\\1\\s[^]*?[\r\n]\\2"].join("|");s.languages["shell-session"]={command:{pattern:RegExp('^(?:[^\\s@:$#*!/\\\\]+@[^\\s@:$#*!/\\\\]+(?::[^\0-\\x1F$#*?"<>:;|]+)?|[^\0-\\x1F$#*?"<>:;|]+)?[$#](?:[^\\\\\r\n\'"<$]|\\\\.|\\$(?!\')|<>)+'.replace(/<>/g,function(){return n}),"m"),greedy:!0,inside:{info:{pattern:/^[^#$]+/,alias:"punctuation",inside:{user:/^[^\s@:$#*!/\\]+@[^\s@:$#*!/\\]+/,punctuation:/:/,path:/[\s\S]+/}},bash:{pattern:/(^[$#]\s*)\S[\s\S]*/,lookbehind:!0,alias:"language-bash",inside:s.languages.bash},"shell-symbol":{pattern:/^[$#]/,alias:"important"}}},output:/.(?:.*(?:[\r\n]|.$))*/},s.languages["sh-session"]=s.languages.shellsession=s.languages["shell-session"]}(Prism); \ No newline at end of file +!function(s){var n=['"(?:\\\\[^]|\\$\\([^)]+\\)|\\$(?!\\()|`[^`]+`|[^"\\\\`$])*"',"'[^']*'","\\$'(?:[^'\\\\]|\\\\[^])*'","<<-?\\s*([\"']?)(\\w+)\\1\\s[^]*?[\r\n]\\2"].join("|");s.languages["shell-session"]={command:{pattern:RegExp('^(?:[^\\s@:$#*!/\\\\]+@[^\\s@:$#*!/\\\\]+(?::[^\0-\\x1F$#*?"<>:;|]+)?|[^\0-\\x1F$#*?"<>:;|]+)?[$#]'+"(?:[^\\\\\r\n'\"<$]|\\\\(?:[^\r]|\r\n?)|\\$(?!')|<>)+".replace(/<>/g,function(){return n}),"m"),greedy:!0,inside:{info:{pattern:/^[^#$]+/,alias:"punctuation",inside:{user:/^[^\s@:$#*!/\\]+@[^\s@:$#*!/\\]+/,punctuation:/:/,path:/[\s\S]+/}},bash:{pattern:/(^[$#]\s*)\S[\s\S]*/,lookbehind:!0,alias:"language-bash",inside:s.languages.bash},"shell-symbol":{pattern:/^[$#]/,alias:"important"}}},output:/.(?:.*(?:[\r\n]|.$))*/},s.languages["sh-session"]=s.languages.shellsession=s.languages["shell-session"]}(Prism); \ No newline at end of file diff --git a/tests/languages/shell-session/issue2871.test b/tests/languages/shell-session/issue2871.test new file mode 100644 index 0000000000..01af2774e5 --- /dev/null +++ b/tests/languages/shell-session/issue2871.test @@ -0,0 +1,30 @@ +fyu@home $ sudo ls -l ~/.config 's' && \ + echo 'hello' +drwxr-xr-x - franklinyu 26 Sep 2020 asciinema +drwxr-xr-x - franklinyu 26 Jan 2020 'bash' +hello + +---------------------------------------------------- + +[ + ["command", [ + ["info", [ + ["user", "fyu@home"], + ["path", " "] + ]], + ["shell-symbol", "$"], + ["bash", [ + ["function", "sudo"], + ["function", "ls"], + " -l ~/.config ", + ["string", "'s'"], + ["operator", ["&&"]], + ["punctuation", "\\"], + + ["builtin", "echo"], + ["string", "'hello'"] + ]] + ]], + + ["output", "drwxr-xr-x - franklinyu 26 Sep 2020 asciinema\r\ndrwxr-xr-x - franklinyu 26 Jan 2020 'bash'\r\nhello"] +] From 439763519946312eb089003473373c58195e32ad Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Tue, 4 May 2021 19:00:33 +0200 Subject: [PATCH 0811/1100] Handlebars: Added `hbs` alias (#2874) --- components.js | 2 +- components.json | 1 + components/prism-handlebars.js | 2 ++ components/prism-handlebars.min.js | 2 +- plugins/autoloader/prism-autoloader.js | 1 + plugins/autoloader/prism-autoloader.min.js | 2 +- plugins/show-language/prism-show-language.js | 1 + plugins/show-language/prism-show-language.min.js | 2 +- 8 files changed, 9 insertions(+), 4 deletions(-) diff --git a/components.js b/components.js index 7b7e6852c1..77f2e5c26d 100644 --- a/components.js +++ b/components.js @@ -1,2 +1,2 @@ -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml","ssml","atom","rss"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","ssml":"SSML","atom":"Atom","rss":"RSS"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","optional":"regex","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"ABNF","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"agda":{"title":"Agda","owner":"xy-ren"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apex":{"title":"Apex","require":["clike","sql"],"owner":"RunDevelopment"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"dkern"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"birb":{"title":"Birb","require":"clike","owner":"Calamity210"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"BNF","alias":"rbnf","aliasTitles":{"rbnf":"RBNF"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"bsl":{"title":"BSL (1C:Enterprise)","alias":"oscript","aliasTitles":{"oscript":"OneScript"},"owner":"Diversus23"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cfscript":{"title":"CFScript","require":"clike","alias":"cfc","owner":"mjclemente"},"chaiscript":{"title":"ChaiScript","require":["clike","cpp"],"owner":"RunDevelopment"},"cil":{"title":"CIL","owner":"sbrl"},"clojure":{"title":"Clojure","owner":"troglotit"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"cobol":{"title":"COBOL","owner":"RunDevelopment"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"coq":{"title":"Coq","owner":"RunDevelopment"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"csv":{"title":"CSV","owner":"RunDevelopment"},"cypher":{"title":"Cypher","owner":"RunDevelopment"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dataweave":{"title":"DataWeave","owner":"machaval"},"dax":{"title":"DAX","owner":"peterbud"},"dhall":{"title":"Dhall","owner":"RunDevelopment"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"dot":{"title":"DOT (Graphviz)","alias":"gv","optional":"markup","owner":"RunDevelopment"},"ebnf":{"title":"EBNF","owner":"RunDevelopment"},"editorconfig":{"title":"EditorConfig","owner":"osipxd"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"false":{"title":"False","owner":"edukisto"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"c","owner":"Golmote"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","optional":"markdown","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"hlsl":{"title":"HLSL","require":"c","owner":"RunDevelopment"},"http":{"title":"HTTP","optional":["css","javascript","json","markup","uri"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"icu-message-format":{"title":"ICU Message Format","owner":"RunDevelopment"},"idris":{"title":"Idris","alias":"idr","owner":"KeenS","require":"haskell"},"ignore":{"title":".ignore","owner":"osipxd","alias":["gitignore","hgignore","npmignore"],"aliasTitles":{"gitignore":".gitignore","hgignore":".hgignore","npmignore":".npmignore"}},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jexl":{"title":"Jexl","owner":"czosel"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike","typescript"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","alias":"webmanifest","aliasTitles":{"webmanifest":"Web App Manifest"},"owner":"CupOfTea696"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"jsstacktrace":{"title":"JS stack trace","owner":"sbrl"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","alias":["kt","kts"],"aliasTitles":{"kts":"Kotlin Script"},"require":"clike","owner":"Golmote"},"kumir":{"title":"KuMir (КуМир)","alias":"kum","owner":"edukisto"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"log":{"title":"Log file","owner":"RunDevelopment"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","optional":"yaml","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"mongodb":{"title":"MongoDB","owner":"airs0urce","require":"javascript"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"naniscript":{"title":"Naninovel Script","owner":"Elringus","alias":"nani"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nevod":{"title":"Nevod","owner":"nezaboodka"},"nginx":{"title":"nginx","owner":"volado"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"openqasm":{"title":"OpenQasm","alias":"qasm","owner":"RunDevelopment"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"psl":{"title":"PATROL Scripting Language","owner":"bertysentry"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":"markup-templating","owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"promql":{"title":"PromQL","owner":"arendjr"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"purebasic":{"title":"PureBasic","require":"clike","alias":"pbfasm","owner":"HeX0R101"},"purescript":{"title":"PureScript","require":"haskell","alias":"purs","owner":"sriharshachilakapati"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"qsharp":{"title":"Q#","require":"clike","alias":"qs","owner":"fedonman"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"racket":{"title":"Racket","require":"scheme","alias":"rkt","owner":"RunDevelopment"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","owner":"RunDevelopment"},"rego":{"title":"Rego","owner":"JordanSh"},"renpy":{"title":"Ren'py","alias":"rpy","owner":"HyuchiaDiego"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","alias":["sh-session","shellsession"],"owner":"RunDevelopment"},"smali":{"title":"Smali","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sml":{"title":"SML","alias":"smlnj","aliasTitles":{"smlnj":"SML/NJ"},"owner":"RunDevelopment"},"solidity":{"title":"Solidity (Ethereum)","alias":"sol","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"squirrel":{"title":"Squirrel","require":"clike","owner":"RunDevelopment"},"stan":{"title":"Stan","owner":"RunDevelopment"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","vbnet"],"owner":"RunDevelopment"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"typoscript":{"title":"TypoScript","alias":"tsconfig","aliasTitles":{"tsconfig":"TSConfig"},"owner":"dkern"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"uri":{"title":"URI","alias":"url","aliasTitles":{"url":"URL"},"owner":"RunDevelopment"},"v":{"title":"V","require":"clike","owner":"taggon"},"vala":{"title":"Vala","require":"clike","optional":"regex","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":["vb","vba"],"aliasTitles":{"vba":"VBA"},"owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xml-doc":{"title":"XML doc (.net)","require":"markup","modify":["csharp","fsharp","vbnet"],"owner":"RunDevelopment"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"yang":{"title":"YANG","owner":"RunDevelopment"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml","ssml","atom","rss"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","ssml":"SSML","atom":"Atom","rss":"RSS"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","optional":"regex","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"ABNF","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"agda":{"title":"Agda","owner":"xy-ren"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apex":{"title":"Apex","require":["clike","sql"],"owner":"RunDevelopment"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"dkern"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"birb":{"title":"Birb","require":"clike","owner":"Calamity210"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"BNF","alias":"rbnf","aliasTitles":{"rbnf":"RBNF"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"bsl":{"title":"BSL (1C:Enterprise)","alias":"oscript","aliasTitles":{"oscript":"OneScript"},"owner":"Diversus23"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cfscript":{"title":"CFScript","require":"clike","alias":"cfc","owner":"mjclemente"},"chaiscript":{"title":"ChaiScript","require":["clike","cpp"],"owner":"RunDevelopment"},"cil":{"title":"CIL","owner":"sbrl"},"clojure":{"title":"Clojure","owner":"troglotit"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"cobol":{"title":"COBOL","owner":"RunDevelopment"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"coq":{"title":"Coq","owner":"RunDevelopment"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"csv":{"title":"CSV","owner":"RunDevelopment"},"cypher":{"title":"Cypher","owner":"RunDevelopment"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dataweave":{"title":"DataWeave","owner":"machaval"},"dax":{"title":"DAX","owner":"peterbud"},"dhall":{"title":"Dhall","owner":"RunDevelopment"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"dot":{"title":"DOT (Graphviz)","alias":"gv","optional":"markup","owner":"RunDevelopment"},"ebnf":{"title":"EBNF","owner":"RunDevelopment"},"editorconfig":{"title":"EditorConfig","owner":"osipxd"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"false":{"title":"False","owner":"edukisto"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"c","owner":"Golmote"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","optional":"markdown","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","alias":"hbs","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"hlsl":{"title":"HLSL","require":"c","owner":"RunDevelopment"},"http":{"title":"HTTP","optional":["css","javascript","json","markup","uri"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"icu-message-format":{"title":"ICU Message Format","owner":"RunDevelopment"},"idris":{"title":"Idris","alias":"idr","owner":"KeenS","require":"haskell"},"ignore":{"title":".ignore","owner":"osipxd","alias":["gitignore","hgignore","npmignore"],"aliasTitles":{"gitignore":".gitignore","hgignore":".hgignore","npmignore":".npmignore"}},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jexl":{"title":"Jexl","owner":"czosel"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike","typescript"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","alias":"webmanifest","aliasTitles":{"webmanifest":"Web App Manifest"},"owner":"CupOfTea696"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"jsstacktrace":{"title":"JS stack trace","owner":"sbrl"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup"],"owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","alias":["kt","kts"],"aliasTitles":{"kts":"Kotlin Script"},"require":"clike","owner":"Golmote"},"kumir":{"title":"KuMir (КуМир)","alias":"kum","owner":"edukisto"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"log":{"title":"Log file","owner":"RunDevelopment"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","optional":"yaml","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"mongodb":{"title":"MongoDB","owner":"airs0urce","require":"javascript"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"naniscript":{"title":"Naninovel Script","owner":"Elringus","alias":"nani"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nevod":{"title":"Nevod","owner":"nezaboodka"},"nginx":{"title":"nginx","owner":"volado"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"openqasm":{"title":"OpenQasm","alias":"qasm","owner":"RunDevelopment"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"psl":{"title":"PATROL Scripting Language","owner":"bertysentry"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":"markup-templating","owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"promql":{"title":"PromQL","owner":"arendjr"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"purebasic":{"title":"PureBasic","require":"clike","alias":"pbfasm","owner":"HeX0R101"},"purescript":{"title":"PureScript","require":"haskell","alias":"purs","owner":"sriharshachilakapati"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"qsharp":{"title":"Q#","require":"clike","alias":"qs","owner":"fedonman"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"racket":{"title":"Racket","require":"scheme","alias":"rkt","owner":"RunDevelopment"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","owner":"RunDevelopment"},"rego":{"title":"Rego","owner":"JordanSh"},"renpy":{"title":"Ren'py","alias":"rpy","owner":"HyuchiaDiego"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","alias":["sh-session","shellsession"],"owner":"RunDevelopment"},"smali":{"title":"Smali","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sml":{"title":"SML","alias":"smlnj","aliasTitles":{"smlnj":"SML/NJ"},"owner":"RunDevelopment"},"solidity":{"title":"Solidity (Ethereum)","alias":"sol","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"squirrel":{"title":"Squirrel","require":"clike","owner":"RunDevelopment"},"stan":{"title":"Stan","owner":"RunDevelopment"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","require":"clike","owner":"chrischares"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","vbnet"],"owner":"RunDevelopment"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"typoscript":{"title":"TypoScript","alias":"tsconfig","aliasTitles":{"tsconfig":"TSConfig"},"owner":"dkern"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"uri":{"title":"URI","alias":"url","aliasTitles":{"url":"URL"},"owner":"RunDevelopment"},"v":{"title":"V","require":"clike","owner":"taggon"},"vala":{"title":"Vala","require":"clike","optional":"regex","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":["vb","vba"],"aliasTitles":{"vba":"VBA"},"owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xml-doc":{"title":"XML doc (.net)","require":"markup","modify":["csharp","fsharp","vbnet"],"owner":"RunDevelopment"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"yang":{"title":"YANG","owner":"RunDevelopment"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; if (typeof module !== 'undefined' && module.exports) { module.exports = components; } \ No newline at end of file diff --git a/components.json b/components.json index 2e2f6d4174..f48e4c2f9b 100644 --- a/components.json +++ b/components.json @@ -496,6 +496,7 @@ "handlebars": { "title": "Handlebars", "require": "markup-templating", + "alias": "hbs", "owner": "Golmote" }, "haskell": { diff --git a/components/prism-handlebars.js b/components/prism-handlebars.js index fbf4f1dcab..c8fdf2c36a 100644 --- a/components/prism-handlebars.js +++ b/components/prism-handlebars.js @@ -34,4 +34,6 @@ Prism.languages['markup-templating'].tokenizePlaceholders(env, 'handlebars'); }); + Prism.languages.hbs = Prism.languages.handlebars; + }(Prism)); diff --git a/components/prism-handlebars.min.js b/components/prism-handlebars.min.js index c375dc5bec..e51960e360 100644 --- a/components/prism-handlebars.min.js +++ b/components/prism-handlebars.min.js @@ -1 +1 @@ -!function(e){e.languages.handlebars={comment:/\{\{![\s\S]*?\}\}/,delimiter:{pattern:/^\{\{\{?|\}\}\}?$/i,alias:"punctuation"},string:/(["'])(?:\\.|(?!\1)[^\\\r\n])*\1/,number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee][+-]?\d+)?/,boolean:/\b(?:true|false)\b/,block:{pattern:/^(\s*(?:~\s*)?)[#\/]\S+?(?=\s*(?:~\s*)?$|\s)/i,lookbehind:!0,alias:"keyword"},brackets:{pattern:/\[[^\]]+\]/,inside:{punctuation:/\[|\]/,variable:/[\s\S]+/}},punctuation:/[!"#%&':()*+,.\/;<=>@\[\\\]^`{|}~]/,variable:/[^!"#%&'()*+,\/;<=>@\[\\\]^`{|}~\s]+/},e.hooks.add("before-tokenize",function(a){e.languages["markup-templating"].buildPlaceholders(a,"handlebars",/\{\{\{[\s\S]+?\}\}\}|\{\{[\s\S]+?\}\}/g)}),e.hooks.add("after-tokenize",function(a){e.languages["markup-templating"].tokenizePlaceholders(a,"handlebars")})}(Prism); \ No newline at end of file +!function(e){e.languages.handlebars={comment:/\{\{![\s\S]*?\}\}/,delimiter:{pattern:/^\{\{\{?|\}\}\}?$/i,alias:"punctuation"},string:/(["'])(?:\\.|(?!\1)[^\\\r\n])*\1/,number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee][+-]?\d+)?/,boolean:/\b(?:true|false)\b/,block:{pattern:/^(\s*(?:~\s*)?)[#\/]\S+?(?=\s*(?:~\s*)?$|\s)/i,lookbehind:!0,alias:"keyword"},brackets:{pattern:/\[[^\]]+\]/,inside:{punctuation:/\[|\]/,variable:/[\s\S]+/}},punctuation:/[!"#%&':()*+,.\/;<=>@\[\\\]^`{|}~]/,variable:/[^!"#%&'()*+,\/;<=>@\[\\\]^`{|}~\s]+/},e.hooks.add("before-tokenize",function(a){e.languages["markup-templating"].buildPlaceholders(a,"handlebars",/\{\{\{[\s\S]+?\}\}\}|\{\{[\s\S]+?\}\}/g)}),e.hooks.add("after-tokenize",function(a){e.languages["markup-templating"].tokenizePlaceholders(a,"handlebars")}),e.languages.hbs=e.languages.handlebars}(Prism); \ No newline at end of file diff --git a/plugins/autoloader/prism-autoloader.js b/plugins/autoloader/prism-autoloader.js index 035e47f1e9..c7b4d9559a 100644 --- a/plugins/autoloader/prism-autoloader.js +++ b/plugins/autoloader/prism-autoloader.js @@ -189,6 +189,7 @@ "xlsx": "excel-formula", "xls": "excel-formula", "gamemakerlanguage": "gml", + "hbs": "handlebars", "hs": "haskell", "idr": "idris", "gitignore": "ignore", diff --git a/plugins/autoloader/prism-autoloader.min.js b/plugins/autoloader/prism-autoloader.min.js index ed5517dec9..f529a2461a 100644 --- a/plugins/autoloader/prism-autoloader.min.js +++ b/plugins/autoloader/prism-autoloader.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof Prism&&"undefined"!=typeof document){var l={javascript:"clike",actionscript:"javascript",apex:["clike","sql"],arduino:"cpp",aspnet:["markup","csharp"],birb:"clike",bison:"c",c:"clike",csharp:"clike",cpp:"c",cfscript:"clike",chaiscript:["clike","cpp"],coffeescript:"javascript",crystal:"ruby","css-extras":"css",d:"clike",dart:"clike",django:"markup-templating",ejs:["javascript","markup-templating"],etlua:["lua","markup-templating"],erb:["ruby","markup-templating"],fsharp:"clike","firestore-security-rules":"clike",flow:"javascript",ftl:"markup-templating",gml:"clike",glsl:"c",go:"clike",groovy:"clike",haml:"ruby",handlebars:"markup-templating",haxe:"clike",hlsl:"c",idris:"haskell",java:"clike",javadoc:["markup","java","javadoclike"],jolie:"clike",jsdoc:["javascript","javadoclike","typescript"],"js-extras":"javascript",json5:"json",jsonp:"json","js-templates":"javascript",kotlin:"clike",latte:["clike","markup-templating","php"],less:"css",lilypond:"scheme",markdown:"markup","markup-templating":"markup",mongodb:"javascript",n4js:"javascript",objectivec:"c",opencl:"c",parser:"markup",php:"markup-templating",phpdoc:["php","javadoclike"],"php-extras":"php",plsql:"sql",processing:"clike",protobuf:"clike",pug:["markup","javascript"],purebasic:"clike",purescript:"haskell",qsharp:"clike",qml:"javascript",qore:"clike",racket:"scheme",jsx:["markup","javascript"],tsx:["jsx","typescript"],reason:"clike",ruby:"clike",sass:"css",scss:"css",scala:"java","shell-session":"bash",smarty:"markup-templating",solidity:"clike",soy:"markup-templating",sparql:"turtle",sqf:"clike",squirrel:"clike",swift:"clike","t4-cs":["t4-templating","csharp"],"t4-vb":["t4-templating","vbnet"],tap:"yaml",tt2:["clike","markup-templating"],textile:"markup",twig:"markup",typescript:"javascript",v:"clike",vala:"clike",vbnet:"basic",velocity:"markup",wiki:"markup",xeora:"markup","xml-doc":"markup",xquery:"markup"},p={html:"markup",xml:"markup",svg:"markup",mathml:"markup",ssml:"markup",atom:"markup",rss:"markup",js:"javascript",g4:"antlr4",adoc:"asciidoc",shell:"bash",shortcode:"bbcode",rbnf:"bnf",oscript:"bsl",cs:"csharp",dotnet:"csharp",cfc:"cfscript",coffee:"coffeescript",conc:"concurnas",jinja2:"django","dns-zone":"dns-zone-file",dockerfile:"docker",gv:"dot",eta:"ejs",xlsx:"excel-formula",xls:"excel-formula",gamemakerlanguage:"gml",hs:"haskell",idr:"idris",gitignore:"ignore",hgignore:"ignore",npmignore:"ignore",webmanifest:"json",kt:"kotlin",kts:"kotlin",kum:"kumir",tex:"latex",context:"latex",ly:"lilypond",emacs:"lisp",elisp:"lisp","emacs-lisp":"lisp",md:"markdown",moon:"moonscript",n4jsd:"n4js",nani:"naniscript",objc:"objectivec",qasm:"openqasm",objectpascal:"pascal",px:"pcaxis",pcode:"peoplecode",pq:"powerquery",mscript:"powerquery",pbfasm:"purebasic",purs:"purescript",py:"python",qs:"qsharp",rkt:"racket",rpy:"renpy",robot:"robotframework",rb:"ruby","sh-session":"shell-session",shellsession:"shell-session",smlnj:"sml",sol:"solidity",sln:"solution-file",rq:"sparql",t4:"t4-cs",trig:"turtle",ts:"typescript",tsconfig:"typoscript",uscript:"unrealscript",uc:"unrealscript",url:"uri",vb:"visual-basic",vba:"visual-basic",xeoracube:"xeora",yml:"yaml"},n={},e="components/",a=Prism.util.currentScript();if(a){var r=/\bplugins\/autoloader\/prism-autoloader\.(?:min\.)?js(?:\?[^\r\n/]*)?$/i,s=/(^|\/)[\w-]+\.(?:min\.)?js(?:\?[^\r\n/]*)?$/i,i=a.getAttribute("data-autoloader-path");if(null!=i)e=i.trim().replace(/\/?$/,"/");else{var t=a.src;r.test(t)?e=t.replace(r,"components/"):s.test(t)&&(e=t.replace(s,"$1components/"))}}var o=Prism.plugins.autoloader={languages_path:e,use_minified:!0,loadLanguages:m};Prism.hooks.add("complete",function(e){var a=e.element,r=e.language;if(a&&r&&"none"!==r){var s=function(e){var a=(e.getAttribute("data-dependencies")||"").trim();if(!a){var r=e.parentElement;r&&"pre"===r.tagName.toLowerCase()&&(a=(r.getAttribute("data-dependencies")||"").trim())}return a?a.split(/\s*,\s*/g):[]}(a);/^diff-./i.test(r)?(s.push("diff"),s.push(r.substr("diff-".length))):s.push(r),s.every(u)||m(s,function(){Prism.highlightElement(a)})}})}function u(e){if(0<=e.indexOf("!"))return!1;if((e=p[e]||e)in Prism.languages)return!0;var a=n[e];return a&&!a.error&&!1===a.loading}function m(e,a,r){"string"==typeof e&&(e=[e]);var s=e.length,i=0,t=!1;function c(){t||++i===s&&a&&a(e)}0!==s?e.forEach(function(e){!function(a,r,s){var i=0<=a.indexOf("!");function e(){var e=n[a];e||(e=n[a]={callbacks:[]}),e.callbacks.push({success:r,error:s}),!i&&u(a)?k(a,"success"):!i&&e.error?k(a,"error"):!i&&e.loading||(e.loading=!0,e.error=!1,function(e,a,r){var s=document.createElement("script");s.src=e,s.async=!0,s.onload=function(){document.body.removeChild(s),a&&a()},s.onerror=function(){document.body.removeChild(s),r&&r()},document.body.appendChild(s)}(function(e){return o.languages_path+"prism-"+e+(o.use_minified?".min":"")+".js"}(a),function(){e.loading=!1,k(a,"success")},function(){e.loading=!1,e.error=!0,k(a,"error")}))}a=a.replace("!",""),a=p[a]||a;var t=l[a];t&&t.length?m(t,e,s):e()}(e,c,function(){t||(t=!0,r&&r(e))})}):a&&setTimeout(a,0)}function k(e,a){if(n[e]){for(var r=n[e].callbacks,s=0,i=r.length;s Date: Fri, 7 May 2021 21:21:59 +0200 Subject: [PATCH 0812/1100] Tests: Fixed polynomial backtracking test (#2891) --- tests/helper/util.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/helper/util.js b/tests/helper/util.js index c5efc8ebcf..29208db40d 100644 --- a/tests/helper/util.js +++ b/tests/helper/util.js @@ -9,7 +9,7 @@ const { RegExpParser } = require('regexpp'); */ -const parser = new RegExpParser({ strict: false, ecmaVersion: 5 }); +const parser = new RegExpParser(); /** @type {Map} */ const astCache = new Map(); From db183421ca5c775d294aa51b555f9634eb1df219 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 7 May 2021 19:34:48 +0000 Subject: [PATCH 0813/1100] Bump hosted-git-info from 2.8.5 to 2.8.9 (#2892) --- package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index f13f064186..ecd0ef8a4d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3444,9 +3444,9 @@ } }, "hosted-git-info": { - "version": "2.8.5", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.5.tgz", - "integrity": "sha512-kssjab8CvdXfcXMXVcvsXum4Hwdq9XGtRD3TteMEvEbq0LXyiNQr6AprqKqfeaDXze7SxWvRxdpwE6ku7ikLkg==", + "version": "2.8.9", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", + "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", "dev": true }, "html-encoding-sniffer": { From 9068680c73396c1b8145f177fb0137ea21faae9e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 8 May 2021 10:41:52 +0000 Subject: [PATCH 0814/1100] Bump lodash from 4.17.19 to 4.17.21 (#2893) --- package-lock.json | 24 +++--------------------- 1 file changed, 3 insertions(+), 21 deletions(-) diff --git a/package-lock.json b/package-lock.json index ecd0ef8a4d..90a6fb250e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2155,12 +2155,6 @@ "type-check": "~0.4.0" } }, - "lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", - "dev": true - }, "ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", @@ -2297,12 +2291,6 @@ "ms": "2.1.2" } }, - "lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", - "dev": true - }, "ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", @@ -4360,9 +4348,9 @@ } }, "lodash": { - "version": "4.17.19", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz", - "integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==", + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", "dev": true }, "lodash._reinterpolate": { @@ -7016,12 +7004,6 @@ "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", "dev": true }, - "lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", - "dev": true - }, "string-width": { "version": "4.2.2", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", From 74edb4e5f644a8c63b95d6a59c65533cab90e387 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Fri, 14 May 2021 12:40:12 +0200 Subject: [PATCH 0815/1100] ESLint: Added indent rule (#2881) --- .eslintrc.js | 4 +- assets/code.js | 332 +-- assets/download.js | 1032 ++++----- assets/examples.js | 392 ++-- components/prism-bro.js | 4 +- components/prism-coffeescript.js | 154 +- components/prism-core.js | 1936 ++++++++--------- components/prism-crystal.js | 38 +- components/prism-dataweave.js | 76 +- components/prism-dax.js | 50 +- components/prism-jsx.js | 250 +-- components/prism-nsis.js | 2 +- components/prism-powerquery.js | 96 +- docs/prism-core.js.html | 1936 ++++++++--------- plugins/autolinker/prism-autolinker.js | 116 +- .../diff-highlight/prism-diff-highlight.js | 4 +- .../prism-highlight-keywords.js | 16 +- .../line-highlight/prism-line-highlight.js | 4 +- .../prism-normalize-whitespace.js | 342 +-- plugins/previewers/prism-previewers.js | 4 +- .../prism-remove-initial-line-feed.js | 30 +- plugins/toolbar/prism-toolbar.js | 2 +- plugins/wpd/prism-wpd.js | 254 +-- prism.js | 1934 ++++++++-------- 24 files changed, 4505 insertions(+), 4503 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 06da4e1111..af23f5b0fe 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -10,17 +10,19 @@ module.exports = { 'brace-style': ['warn', '1tbs', { allowSingleLine: true }], 'no-tabs': ['warn', { allowIndentationTabs: true }], 'no-var': 'error', + 'one-var': ['warn', 'never'], 'quotes': ['warn', 'single', { avoidEscape: true, allowTemplateLiterals: true }], 'semi': 'warn', 'wrap-iife': 'warn', - // spaces + // spaces and indentation 'arrow-spacing': 'warn', 'block-spacing': 'warn', 'comma-spacing': 'warn', 'computed-property-spacing': 'warn', 'func-call-spacing': 'warn', 'generator-star-spacing': 'warn', + 'indent': ['warn', 'tab', { SwitchCase: 1 }], 'key-spacing': 'warn', 'keyword-spacing': 'warn', 'no-multi-spaces': ['warn', { ignoreEOLComments: true }], diff --git a/assets/code.js b/assets/code.js index 03492e92bb..5c10d0559b 100644 --- a/assets/code.js +++ b/assets/code.js @@ -1,37 +1,37 @@ (function () { -if (!document.body.addEventListener) { - return; -} + if (!document.body.addEventListener) { + return; + } -$$('[data-plugin-header]').forEach(function (element) { - var plugin = components.plugins[element.getAttribute('data-plugin-header')]; - element.innerHTML = '
          \n' + $$('[data-plugin-header]').forEach(function (element) { + var plugin = components.plugins[element.getAttribute('data-plugin-header')]; + element.innerHTML = '
          \n' + '

          ' + plugin.title + '

          \n

          ' + plugin.description + '

          '; -}); - -$$('[data-src][data-type="text/html"]').forEach(function (element) { - var src = element.getAttribute('data-src'); - var html = element.getAttribute('data-type') === 'text/html'; - var contentProperty = html ? 'innerHTML' : 'textContent'; - - $u.xhr({ - url: src, - callback: function (xhr) { - try { - element[contentProperty] = xhr.responseText; - - // Run JS - - $$('script', element).forEach(function (script) { - var parent = script.parentNode; - parent.removeChild(script); - document.head.appendChild(script); - }); - } catch (e) { /* noop */ } - } }); -}); + + $$('[data-src][data-type="text/html"]').forEach(function (element) { + var src = element.getAttribute('data-src'); + var html = element.getAttribute('data-type') === 'text/html'; + var contentProperty = html ? 'innerHTML' : 'textContent'; + + $u.xhr({ + url: src, + callback: function (xhr) { + try { + element[contentProperty] = xhr.responseText; + + // Run JS + + $$('script', element).forEach(function (script) { + var parent = script.parentNode; + parent.removeChild(script); + document.head.appendChild(script); + }); + } catch (e) { /* noop */ } + } + }); + }); }()); @@ -39,63 +39,63 @@ $$('[data-src][data-type="text/html"]').forEach(function (element) { * Table of contents */ (function () { -var toc = document.createElement('ol'); + var toc = document.createElement('ol'); -$$('body > section > h1').forEach(function (h1) { - var section = h1.parentNode; - var text = h1.textContent; - var id = h1.id || section.id; + $$('body > section > h1').forEach(function (h1) { + var section = h1.parentNode; + var text = h1.textContent; + var id = h1.id || section.id; - // Assign id if one does not exist - if (!id) { - id = text.toLowerCase(); + // Assign id if one does not exist + if (!id) { + id = text.toLowerCase(); - // Replace spaces with hyphens, only keep first 10 words - id = id.split(/\s+/g, 10).join('-'); + // Replace spaces with hyphens, only keep first 10 words + id = id.split(/\s+/g, 10).join('-'); - // Remove non-word characters - id = id.replace(/[^\w-]/g, ''); + // Remove non-word characters + id = id.replace(/[^\w-]/g, ''); - section.id = id; - } + section.id = id; + } - // Linkify heading text - if (h1.children.length === 0) { - h1.innerHTML = ''; + // Linkify heading text + if (h1.children.length === 0) { + h1.innerHTML = ''; - $u.element.create('a', { - properties: { - href: window.location.pathname + '#' + id + $u.element.create('a', { + properties: { + href: window.location.pathname + '#' + id + }, + contents: text, + inside: h1 + }); + } + + $u.element.create('li', { + contents: { + tag: 'a', + properties: { + href: window.location.pathname + '#' + (h1.id || section.id) + }, + contents: text }, - contents: text, - inside: h1 + inside: toc }); - } + }); - $u.element.create('li', { - contents: { - tag: 'a', + if (toc.children.length > 0) { + $u.element.create('section', { properties: { - href: window.location.pathname + '#' + (h1.id || section.id) + id: 'toc' }, - contents: text - }, - inside: toc - }); -}); - -if (toc.children.length > 0) { - $u.element.create('section', { - properties: { - id: 'toc' - }, - contents: [{ - tag: 'h1', - contents: 'On this page' - }, toc], - before: $('body > section') - }); -} + contents: [{ + tag: 'h1', + contents: 'On this page' + }, toc], + before: $('body > section') + }); + } }()); @@ -145,124 +145,124 @@ if (toc.children.length > 0) { // so it can be accessed from download.js var setTheme; (function () { -var p = $u.element.create('p', { - properties: { - id: 'theme' - }, - contents: { - tag: 'p', - contents: 'Theme:' - }, - after: '.intro' -}); + var p = $u.element.create('p', { + properties: { + id: 'theme' + }, + contents: { + tag: 'p', + contents: 'Theme:' + }, + after: '.intro' + }); -var themes = components.themes; -var current = (location.search.match(/theme=([\w-]+)/) || [])[1]; + var themes = components.themes; + var current = (location.search.match(/theme=([\w-]+)/) || [])[1]; -if (!(current in themes)) { - current = undefined; -} + if (!(current in themes)) { + current = undefined; + } -if (current === undefined) { - var stored = localStorage.getItem('theme'); + if (current === undefined) { + var stored = localStorage.getItem('theme'); - current = stored in themes ? stored : 'prism'; -} + current = stored in themes ? stored : 'prism'; + } -setTheme = function (id) { - var link = $$('link[href^="themes/prism"]')[0]; + setTheme = function (id) { + var link = $$('link[href^="themes/prism"]')[0]; - link.href = themes.meta.path.replace(/\{id}/g, id); - localStorage.setItem('theme', id); -}; + link.href = themes.meta.path.replace(/\{id}/g, id); + localStorage.setItem('theme', id); + }; -for (var id in themes) { + for (var id in themes) { - if (id === 'meta') { - continue; - } + if (id === 'meta') { + continue; + } - $u.element.create('input', { - properties: { - type: 'radio', - name: 'theme', - id: 'theme=' + id, - checked: current === id, - value: id, - onclick: function () { - setTheme(this.value); - } - }, - inside: p - }); + $u.element.create('input', { + properties: { + type: 'radio', + name: 'theme', + id: 'theme=' + id, + checked: current === id, + value: id, + onclick: function () { + setTheme(this.value); + } + }, + inside: p + }); - $u.element.create('label', { - properties: { - htmlFor: 'theme=' + id - }, - contents: themes[id].title || themes[id], - inside: p - }); -} + $u.element.create('label', { + properties: { + htmlFor: 'theme=' + id + }, + contents: themes[id].title || themes[id], + inside: p + }); + } -setTheme(current); + setTheme(current); }()); (function () { -function listPlugins(ul) { - for (var id in components.plugins) { - if (id == 'meta') { - continue; - } + function listPlugins(ul) { + for (var id in components.plugins) { + if (id == 'meta') { + continue; + } - var plugin = components.plugins[id]; + var plugin = components.plugins[id]; - var li = $u.element.create('li', { - contents: [ - { - tag: 'a', - prop: { - href: 'plugins/' + id + var li = $u.element.create('li', { + contents: [ + { + tag: 'a', + prop: { + href: 'plugins/' + id + }, + contents: plugin.title || plugin }, - contents: plugin.title || plugin - }, - { - tag: 'br' - } - ], - inside: ul - }); - - var desc = document.createElement('div'); - desc.innerHTML = plugin.description; - li.appendChild(desc); + { + tag: 'br' + } + ], + inside: ul + }); + + var desc = document.createElement('div'); + desc.innerHTML = plugin.description; + li.appendChild(desc); + } } -} -$$('.plugin-list').forEach(listPlugins); + $$('.plugin-list').forEach(listPlugins); -// small polyfill for Element#matches -if (!Element.prototype.matches) { - Element.prototype.matches = Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector; -} + // small polyfill for Element#matches + if (!Element.prototype.matches) { + Element.prototype.matches = Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector; + } -Prism && Prism.hooks.add('complete', function (env) { - var element = env.element; + Prism && Prism.hooks.add('complete', function (env) { + var element = env.element; - requestAnimationFrame(function () { - if (!element.matches('div.code-toolbar > pre > code')) { - return; - } + requestAnimationFrame(function () { + if (!element.matches('div.code-toolbar > pre > code')) { + return; + } - var pre = element.parentElement; - var wrapper = pre.parentElement; + var pre = element.parentElement; + var wrapper = pre.parentElement; - // transfer margin of pre to wrapper - wrapper.style.margin = window.getComputedStyle(pre).margin; - pre.style.margin = '0'; + // transfer margin of pre to wrapper + wrapper.style.margin = window.getComputedStyle(pre).margin; + pre.style.margin = '0'; + }); }); -}); }()); diff --git a/assets/download.js b/assets/download.js index 47b6864099..2d8855cefa 100644 --- a/assets/download.js +++ b/assets/download.js @@ -4,622 +4,622 @@ (function () { -var cache = {}; -var form = $('form'); -var minified = true; - -var dependencies = {}; - -var treeURL = 'https://api.github.com/repos/PrismJS/prism/git/trees/master?recursive=1'; -var treePromise = new Promise(function (resolve) { - $u.xhr({ - url: treeURL, - callback: function (xhr) { - if (xhr.status < 400) { - resolve(JSON.parse(xhr.responseText).tree); + var cache = {}; + var form = $('form'); + var minified = true; + + var dependencies = {}; + + var treeURL = 'https://api.github.com/repos/PrismJS/prism/git/trees/master?recursive=1'; + var treePromise = new Promise(function (resolve) { + $u.xhr({ + url: treeURL, + callback: function (xhr) { + if (xhr.status < 400) { + resolve(JSON.parse(xhr.responseText).tree); + } } - } + }); }); -}); -/** - * Converts the given value into an array. - * - * @param {T | T[] | null | undefined} value - * @returns {T[]} - * @template T - */ -function toArray(value) { - if (Array.isArray(value)) { - return value; - } else { - return value == null ? [] : [value]; + /** + * Converts the given value into an array. + * + * @param {T | T[] | null | undefined} value + * @returns {T[]} + * @template T + */ + function toArray(value) { + if (Array.isArray(value)) { + return value; + } else { + return value == null ? [] : [value]; + } } -} - -var hstr = window.location.hash.match(/(?:languages|plugins)=[-+\w]+|themes=[-\w]+/g); -if (hstr) { - hstr.forEach(function (str) { - var kv = str.split('=', 2); - var category = kv[0]; - var ids = kv[1].split('+'); - if (category !== 'meta' && category !== 'core' && components[category]) { - for (var id in components[category]) { - if (components[category][id].option) { - delete components[category][id].option; + + var hstr = window.location.hash.match(/(?:languages|plugins)=[-+\w]+|themes=[-\w]+/g); + if (hstr) { + hstr.forEach(function (str) { + var kv = str.split('=', 2); + var category = kv[0]; + var ids = kv[1].split('+'); + if (category !== 'meta' && category !== 'core' && components[category]) { + for (var id in components[category]) { + if (components[category][id].option) { + delete components[category][id].option; + } } - } - if (category === 'themes' && ids.length) { - var themeInput = $('#theme input[value="' + ids[0] + '"]'); - if (themeInput) { - themeInput.checked = true; + if (category === 'themes' && ids.length) { + var themeInput = $('#theme input[value="' + ids[0] + '"]'); + if (themeInput) { + themeInput.checked = true; + } + // eslint-disable-next-line no-undef + setTheme(ids[0]); } - // eslint-disable-next-line no-undef - setTheme(ids[0]); - } - var makeDefault = function (id) { - if (id !== 'meta') { - if (components[category][id]) { - if (components[category][id].option !== 'default') { - if (typeof components[category][id] === 'string') { - components[category][id] = { title: components[category][id] }; + var makeDefault = function (id) { + if (id !== 'meta') { + if (components[category][id]) { + if (components[category][id].option !== 'default') { + if (typeof components[category][id] === 'string') { + components[category][id] = { title: components[category][id] }; + } + components[category][id].option = 'default'; } - components[category][id].option = 'default'; - } - toArray(components[category][id].require).forEach(makeDefault); + toArray(components[category][id].require).forEach(makeDefault); + } } - } - }; - ids.forEach(makeDefault); - } - }); -} - -// Stay compatible with old querystring feature -var qstr = window.location.search.match(/(?:languages|plugins)=[-+\w]+|themes=[-\w]+/g); -if (qstr && !hstr) { - window.location.hash = window.location.search.replace(/^\?/, ''); - window.location.search = ''; -} - -var storedTheme = localStorage.getItem('theme'); - -for (var category in components) { - var all = components[category]; - - all.meta.section = $u.element.create('section', { - className: 'options', - id: 'category-' + category, - contents: { - tag: 'h1', - contents: category.charAt(0).toUpperCase() + category.slice(1) - }, - inside: '#components' - }); + }; + ids.forEach(makeDefault); + } + }); + } - if (all.meta.addCheckAll) { - $u.element.create('label', { - attributes: { - 'data-id': 'check-all-' + category + // Stay compatible with old querystring feature + var qstr = window.location.search.match(/(?:languages|plugins)=[-+\w]+|themes=[-\w]+/g); + if (qstr && !hstr) { + window.location.hash = window.location.search.replace(/^\?/, ''); + window.location.search = ''; + } + + var storedTheme = localStorage.getItem('theme'); + + for (var category in components) { + var all = components[category]; + + all.meta.section = $u.element.create('section', { + className: 'options', + id: 'category-' + category, + contents: { + tag: 'h1', + contents: category.charAt(0).toUpperCase() + category.slice(1) }, - contents: [ - { - tag: 'input', - properties: { - type: 'checkbox', - name: 'check-all-' + category, - value: '', - checked: false, - onclick: (function (category, all) { - return function () { - var checkAll = this; - $$('input[name="download-' + category + '"]').forEach(function (input) { - all[input.value].enabled = input.checked = checkAll.checked; - }); - - update(category); - }; - }(category, all)) - } - }, - 'Select/unselect all' - ], - inside: all.meta.section + inside: '#components' }); - } - for (var id in all) { - if (id === 'meta') { - continue; + if (all.meta.addCheckAll) { + $u.element.create('label', { + attributes: { + 'data-id': 'check-all-' + category + }, + contents: [ + { + tag: 'input', + properties: { + type: 'checkbox', + name: 'check-all-' + category, + value: '', + checked: false, + onclick: (function (category, all) { + return function () { + var checkAll = this; + $$('input[name="download-' + category + '"]').forEach(function (input) { + all[input.value].enabled = input.checked = checkAll.checked; + }); + + update(category); + }; + }(category, all)) + } + }, + 'Select/unselect all' + ], + inside: all.meta.section + }); } - var checked = false, disabled = false; - var option = all[id].option || all.meta.option; + for (var id in all) { + if (id === 'meta') { + continue; + } - switch (option) { - case 'mandatory': disabled = true; // fallthrough - case 'default': checked = true; - } - if (category === 'themes' && storedTheme) { - checked = id === storedTheme; - } + var checked = false; var disabled = false; + var option = all[id].option || all.meta.option; - var filepath = all.meta.path.replace(/\{id}/g, id); - - var info = all[id] = { - title: all[id].title || all[id], - aliasTitles: all[id].aliasTitles, - noCSS: all[id].noCSS || all.meta.noCSS, - noJS: all[id].noJS || all.meta.noJS, - enabled: checked, - require: toArray(all[id].require), - after: toArray(all[id].after), - modify: toArray(all[id].modify), - owner: all[id].owner, - files: { - minified: { - paths: [], - size: 0 - }, - dev: { - paths: [], - size: 0 - } + switch (option) { + case 'mandatory': disabled = true; // fallthrough + case 'default': checked = true; + } + if (category === 'themes' && storedTheme) { + checked = id === storedTheme; } - }; - info.require.forEach(function (v) { - dependencies[v] = (dependencies[v] || []).concat(id); - }); + var filepath = all.meta.path.replace(/\{id}/g, id); + + var info = all[id] = { + title: all[id].title || all[id], + aliasTitles: all[id].aliasTitles, + noCSS: all[id].noCSS || all.meta.noCSS, + noJS: all[id].noJS || all.meta.noJS, + enabled: checked, + require: toArray(all[id].require), + after: toArray(all[id].after), + modify: toArray(all[id].modify), + owner: all[id].owner, + files: { + minified: { + paths: [], + size: 0 + }, + dev: { + paths: [], + size: 0 + } + } + }; - if (!all[id].noJS && !/\.css$/.test(filepath)) { - info.files.minified.paths.push(filepath.replace(/(\.js)?$/, '.min.js')); - info.files.dev.paths.push(filepath.replace(/(\.js)?$/, '.js')); - } + info.require.forEach(function (v) { + dependencies[v] = (dependencies[v] || []).concat(id); + }); + if (!all[id].noJS && !/\.css$/.test(filepath)) { + info.files.minified.paths.push(filepath.replace(/(\.js)?$/, '.min.js')); + info.files.dev.paths.push(filepath.replace(/(\.js)?$/, '.js')); + } - if ((!all[id].noCSS && !/\.js$/.test(filepath)) || /\.css$/.test(filepath)) { - var cssFile = filepath.replace(/(\.css)?$/, '.css'); - info.files.minified.paths.push(cssFile); - info.files.dev.paths.push(cssFile); - } + if ((!all[id].noCSS && !/\.js$/.test(filepath)) || /\.css$/.test(filepath)) { + var cssFile = filepath.replace(/(\.css)?$/, '.css'); - function getLanguageTitle(lang) { - if (!lang.aliasTitles) - return lang.title; + info.files.minified.paths.push(cssFile); + info.files.dev.paths.push(cssFile); + } - var titles = [lang.title]; - for (var alias in lang.aliasTitles) - if (lang.aliasTitles.hasOwnProperty(alias)) - titles.push(lang.aliasTitles[alias]); - return titles.join(' + '); - } + function getLanguageTitle(lang) { + if (!lang.aliasTitles) + return lang.title; - var label = $u.element.create('label', { - attributes: { - 'data-id': id - }, - contents: [ - { - tag: 'input', - properties: { - type: all.meta.exclusive ? 'radio' : 'checkbox', - name: 'download-' + category, - value: id, - checked: checked, - disabled: disabled, - onclick: (function (id, category, all) { - return function () { - $$('input[name="' + this.name + '"]').forEach(function (input) { - all[input.value].enabled = input.checked; - }); - - if (all[id].require && this.checked) { - all[id].require.forEach(function (v) { - var input = $('label[data-id="' + v + '"] > input'); - input.checked = true; - - input.onclick(); + var titles = [lang.title]; + for (var alias in lang.aliasTitles) + if (lang.aliasTitles.hasOwnProperty(alias)) + titles.push(lang.aliasTitles[alias]); + return titles.join(' + '); + } + + var label = $u.element.create('label', { + attributes: { + 'data-id': id + }, + contents: [ + { + tag: 'input', + properties: { + type: all.meta.exclusive ? 'radio' : 'checkbox', + name: 'download-' + category, + value: id, + checked: checked, + disabled: disabled, + onclick: (function (id, category, all) { + return function () { + $$('input[name="' + this.name + '"]').forEach(function (input) { + all[input.value].enabled = input.checked; }); - } - if (dependencies[id] && !this.checked) { // It’s required by others - dependencies[id].forEach(function (dependent) { - var input = $('label[data-id="' + dependent + '"] > input'); - input.checked = false; + if (all[id].require && this.checked) { + all[id].require.forEach(function (v) { + var input = $('label[data-id="' + v + '"] > input'); + input.checked = true; - input.onclick(); - }); - } + input.onclick(); + }); + } - update(category, id); - }; - }(id, category, all)) - } - }, - all.meta.link ? { - tag: 'a', - properties: { - href: all.meta.link.replace(/\{id}/g, id), - className: 'name' - }, - contents: info.title - } : { - tag: 'span', - properties: { - className: 'name' + if (dependencies[id] && !this.checked) { // It’s required by others + dependencies[id].forEach(function (dependent) { + var input = $('label[data-id="' + dependent + '"] > input'); + input.checked = false; + + input.onclick(); + }); + } + + update(category, id); + }; + }(id, category, all)) + } }, - contents: getLanguageTitle(info) - }, - ' ', - all[id].owner ? { - tag: 'a', - properties: { - href: 'https://github.com/' + all[id].owner, - className: 'owner', - target: '_blank' + all.meta.link ? { + tag: 'a', + properties: { + href: all.meta.link.replace(/\{id}/g, id), + className: 'name' + }, + contents: info.title + } : { + tag: 'span', + properties: { + className: 'name' + }, + contents: getLanguageTitle(info) }, - contents: all[id].owner - } : ' ', - { - tag: 'strong', - className: 'filesize' - } - ], - inside: all.meta.section - }); + ' ', + all[id].owner ? { + tag: 'a', + properties: { + href: 'https://github.com/' + all[id].owner, + className: 'owner', + target: '_blank' + }, + contents: all[id].owner + } : ' ', + { + tag: 'strong', + className: 'filesize' + } + ], + inside: all.meta.section + }); - // Add click events on main theme selector too. - (function (label) { - if (category === 'themes') { - var themeInput = $('#theme input[value="' + id + '"]'); - var input = $('input', label); - if (themeInput) { - var themeInputOnclick = themeInput.onclick; - themeInput.onclick = function () { - input.checked = true; - input.onclick(); - themeInputOnclick && themeInputOnclick.call(themeInput); - }; + // Add click events on main theme selector too. + (function (label) { + if (category === 'themes') { + var themeInput = $('#theme input[value="' + id + '"]'); + var input = $('input', label); + if (themeInput) { + var themeInputOnclick = themeInput.onclick; + themeInput.onclick = function () { + input.checked = true; + input.onclick(); + themeInputOnclick && themeInputOnclick.call(themeInput); + }; + } } - } - }(label)); + }(label)); + } } -} -form.elements.compression[0].onclick = -form.elements.compression[1].onclick = function () { - minified = !!+this.value; + form.elements.compression[0].onclick = + form.elements.compression[1].onclick = function () { + minified = !!+this.value; - getFilesSizes(); -}; + getFilesSizes(); + }; -function getFileSize(filepath) { - return treePromise.then(function (tree) { - for (var i = 0, l = tree.length; i < l; i++) { - if (tree[i].path === filepath) { - return tree[i].size; + function getFileSize(filepath) { + return treePromise.then(function (tree) { + for (var i = 0, l = tree.length; i < l; i++) { + if (tree[i].path === filepath) { + return tree[i].size; + } } - } - }); -} + }); + } -function getFilesSizes() { - for (var category in components) { - var all = components[category]; + function getFilesSizes() { + for (var category in components) { + var all = components[category]; - for (var id in all) { - if (id === 'meta') { - continue; - } + for (var id in all) { + if (id === 'meta') { + continue; + } - var distro = all[id].files[minified ? 'minified' : 'dev']; - var files = distro.paths; + var distro = all[id].files[minified ? 'minified' : 'dev']; + var files = distro.paths; - files.forEach(function (filepath) { - var file = cache[filepath] = cache[filepath] || {}; + files.forEach(function (filepath) { + var file = cache[filepath] = cache[filepath] || {}; - if (!file.size) { + if (!file.size) { - (function (category, id) { - getFileSize(filepath).then(function (size) { - if (size) { - file.size = size; - distro.size += file.size; + (function (category, id) { + getFileSize(filepath).then(function (size) { + if (size) { + file.size = size; + distro.size += file.size; - update(category, id); - } - }); - }(category, id)); - } else { - update(category, id); - } - }); + update(category, id); + } + }); + }(category, id)); + } else { + update(category, id); + } + }); + } } } -} -getFilesSizes(); + getFilesSizes(); -function getFileContents(filepath) { - return new Promise(function (resolve, reject) { - $u.xhr({ - url: filepath, - callback: function (xhr) { - if (xhr.status < 400 && xhr.responseText) { - resolve(xhr.responseText); - } else { - reject(); + function getFileContents(filepath) { + return new Promise(function (resolve, reject) { + $u.xhr({ + url: filepath, + callback: function (xhr) { + if (xhr.status < 400 && xhr.responseText) { + resolve(xhr.responseText); + } else { + reject(); + } } - } + }); }); - }); -} + } -function prettySize(size) { - return Math.round(100 * size / 1024) / 100 + 'KB'; -} + function prettySize(size) { + return Math.round(100 * size / 1024) / 100 + 'KB'; + } -function update(updatedCategory, updatedId) { - // Update total size - var total = { js: 0, css: 0 }, updated = { js: 0, css: 0 }; + function update(updatedCategory, updatedId) { + // Update total size + var total = { js: 0, css: 0 }; var updated = { js: 0, css: 0 }; - for (var category in components) { - var all = components[category]; - var allChecked = true; + for (var category in components) { + var all = components[category]; + var allChecked = true; - for (var id in all) { - var info = all[id]; + for (var id in all) { + var info = all[id]; + + if (info.enabled || id == updatedId) { + var distro = info.files[minified ? 'minified' : 'dev']; - if (info.enabled || id == updatedId) { - var distro = info.files[minified ? 'minified' : 'dev']; + distro.paths.forEach(function (path) { + if (cache[path]) { + var file = cache[path]; - distro.paths.forEach(function (path) { - if (cache[path]) { - var file = cache[path]; + var type = path.match(/\.(\w+)$/)[1]; + var size = file.size || 0; - var type = path.match(/\.(\w+)$/)[1]; - var size = file.size || 0; + if (info.enabled) { - if (info.enabled) { + if (!file.contentsPromise) { + file.contentsPromise = getFileContents(path); + } - if (!file.contentsPromise) { - file.contentsPromise = getFileContents(path); + total[type] += size; } - total[type] += size; + if (id == updatedId) { + updated[type] += size; + } } + }); + } + if (id !== 'meta' && !info.enabled) { + allChecked = false; + } - if (id == updatedId) { - updated[type] += size; - } + // Select main theme + if (category === 'themes' && id === updatedId && info.enabled) { + var themeInput = $('#theme input[value="' + updatedId + '"]'); + if (themeInput) { + themeInput.checked = true; } - }); - } - if (id !== 'meta' && !info.enabled) { - allChecked = false; - } - - // Select main theme - if (category === 'themes' && id === updatedId && info.enabled) { - var themeInput = $('#theme input[value="' + updatedId + '"]'); - if (themeInput) { - themeInput.checked = true; + // eslint-disable-next-line no-undef + setTheme(updatedId); } - // eslint-disable-next-line no-undef - setTheme(updatedId); } - } - if (all.meta.addCheckAll) { - $('input[name="check-all-' + category + '"]').checked = allChecked; + if (all.meta.addCheckAll) { + $('input[name="check-all-' + category + '"]').checked = allChecked; + } } - } - total.all = total.js + total.css; + total.all = total.js + total.css; - if (updatedId) { - updated.all = updated.js + updated.css; + if (updatedId) { + updated.all = updated.js + updated.css; - $u.element.prop($('label[data-id="' + updatedId + '"] .filesize'), { - textContent: prettySize(updated.all), - title: (updated.js ? Math.round(100 * updated.js / updated.all) + '% JavaScript' : '') + - (updated.js && updated.css ? ' + ' : '') + - (updated.css ? Math.round(100 * updated.css / updated.all) + '% CSS' : '') - }); - } - - $('#filesize').textContent = prettySize(total.all); + $u.element.prop($('label[data-id="' + updatedId + '"] .filesize'), { + textContent: prettySize(updated.all), + title: (updated.js ? Math.round(100 * updated.js / updated.all) + '% JavaScript' : '') + + (updated.js && updated.css ? ' + ' : '') + + (updated.css ? Math.round(100 * updated.css / updated.all) + '% CSS' : '') + }); + } - $u.element.prop($('#percent-js'), { - textContent: Math.round(100 * total.js / total.all) + '%', - title: prettySize(total.js) - }); + $('#filesize').textContent = prettySize(total.all); - $u.element.prop($('#percent-css'), { - textContent: Math.round(100 * total.css / total.all) + '%', - title: prettySize(total.css) - }); + $u.element.prop($('#percent-js'), { + textContent: Math.round(100 * total.js / total.all) + '%', + title: prettySize(total.js) + }); - delayedGenerateCode(); -} + $u.element.prop($('#percent-css'), { + textContent: Math.round(100 * total.css / total.all) + '%', + title: prettySize(total.css) + }); -var timerId = 0; -// "debounce" multiple rapid requests to generate and highlight code -function delayedGenerateCode() { - if (timerId !== 0) { - clearTimeout(timerId); + delayedGenerateCode(); } - timerId = setTimeout(generateCode, 500); -} -function generateCode() { - /** @type {CodePromiseInfo[]} */ - var promises = []; - var redownload = {}; + var timerId = 0; + // "debounce" multiple rapid requests to generate and highlight code + function delayedGenerateCode() { + if (timerId !== 0) { + clearTimeout(timerId); + } + timerId = setTimeout(generateCode, 500); + } - for (var category in components) { - for (var id in components[category]) { - if (id === 'meta') { - continue; - } + function generateCode() { + /** @type {CodePromiseInfo[]} */ + var promises = []; + var redownload = {}; - var info = components[category][id]; - if (info.enabled) { - if (category !== 'core') { - redownload[category] = redownload[category] || []; - redownload[category].push(id); + for (var category in components) { + for (var id in components[category]) { + if (id === 'meta') { + continue; } - info.files[minified ? 'minified' : 'dev'].paths.forEach(function (path) { - if (cache[path]) { - var type = path.match(/\.(\w+)$/)[1]; - - promises.push({ - contentsPromise: cache[path].contentsPromise, - id: id, - category: category, - path: path, - type: type - }); + + var info = components[category][id]; + if (info.enabled) { + if (category !== 'core') { + redownload[category] = redownload[category] || []; + redownload[category].push(id); } - }); + info.files[minified ? 'minified' : 'dev'].paths.forEach(function (path) { + if (cache[path]) { + var type = path.match(/\.(\w+)$/)[1]; + + promises.push({ + contentsPromise: cache[path].contentsPromise, + id: id, + category: category, + path: path, + type: type + }); + } + }); + } } } - } - - // Hide error message if visible - var error = $('#download .error'); - error.style.display = ''; - - Promise.all([buildCode(promises), getVersion()]).then(function (arr) { - var res = arr[0]; - var version = arr[1]; - var code = res.code; - var errors = res.errors; - if (errors.length) { - error.style.display = 'block'; - error.innerHTML = ''; - $u.element.contents(error, errors); - } + // Hide error message if visible + var error = $('#download .error'); + error.style.display = ''; - var redownloadUrl = window.location.href.split('#')[0] + '#'; - for (var category in redownload) { - redownloadUrl += category + '=' + redownload[category].join('+') + '&'; - } - redownloadUrl = redownloadUrl.replace(/&$/, ''); - window.location.replace(redownloadUrl); + Promise.all([buildCode(promises), getVersion()]).then(function (arr) { + var res = arr[0]; + var version = arr[1]; + var code = res.code; + var errors = res.errors; - var versionComment = '/* PrismJS ' + version + '\n' + redownloadUrl + ' */'; + if (errors.length) { + error.style.display = 'block'; + error.innerHTML = ''; + $u.element.contents(error, errors); + } - for (var type in code) { - (function (type) { - var text = versionComment + '\n' + code[type]; - var fileName = 'prism.' + type; + var redownloadUrl = window.location.href.split('#')[0] + '#'; + for (var category in redownload) { + redownloadUrl += category + '=' + redownload[category].join('+') + '&'; + } + redownloadUrl = redownloadUrl.replace(/&$/, ''); + window.location.replace(redownloadUrl); - var codeElement = $('#download-' + type + ' code'); - var pre = codeElement.parentElement; + var versionComment = '/* PrismJS ' + version + '\n' + redownloadUrl + ' */'; - var newCode = document.createElement('CODE'); - newCode.className = codeElement.className; - newCode.textContent = text; + for (var type in code) { + (function (type) { + var text = versionComment + '\n' + code[type]; + var fileName = 'prism.' + type; - Prism.highlightElement(newCode, true, function () { - pre.replaceChild(newCode, codeElement); - }); + var codeElement = $('#download-' + type + ' code'); + var pre = codeElement.parentElement; + var newCode = document.createElement('CODE'); + newCode.className = codeElement.className; + newCode.textContent = text; - $('#download-' + type + ' .download-button').onclick = function () { - saveAs(new Blob([text], { type: 'application/octet-stream;charset=utf-8' }), fileName); - }; - }(type)); - } - }); -} + Prism.highlightElement(newCode, true, function () { + pre.replaceChild(newCode, codeElement); + }); -/** - * Returns a promise of the code of the Prism bundle. - * - * @param {CodePromiseInfo[]} promises - * @returns {Promise<{ code: { js: string, css: string }, errors: HTMLElement[] }>} - * - * @typedef CodePromiseInfo - * @property {Promise} contentsPromise - * @property {string} id - * @property {string} category - * @property {string} path - * @property {string} type - */ -function buildCode(promises) { - // sort the promises - /** @type {CodePromiseInfo[]} */ - var finalPromises = []; - /** @type {Object} */ - var toSortMap = {}; + $('#download-' + type + ' .download-button').onclick = function () { + saveAs(new Blob([text], { type: 'application/octet-stream;charset=utf-8' }), fileName); + }; + }(type)); + } + }); + } - promises.forEach(function (p) { - if (p.category == 'core' || p.category == 'themes') { - finalPromises.push(p); - } else { - var infos = toSortMap[p.id]; - if (!infos) { - toSortMap[p.id] = infos = []; + /** + * Returns a promise of the code of the Prism bundle. + * + * @param {CodePromiseInfo[]} promises + * @returns {Promise<{ code: { js: string, css: string }, errors: HTMLElement[] }>} + * + * @typedef CodePromiseInfo + * @property {Promise} contentsPromise + * @property {string} id + * @property {string} category + * @property {string} path + * @property {string} type + */ + function buildCode(promises) { + // sort the promises + + /** @type {CodePromiseInfo[]} */ + var finalPromises = []; + /** @type {Object} */ + var toSortMap = {}; + + promises.forEach(function (p) { + if (p.category == 'core' || p.category == 'themes') { + finalPromises.push(p); + } else { + var infos = toSortMap[p.id]; + if (!infos) { + toSortMap[p.id] = infos = []; + } + infos.push(p); } - infos.push(p); - } - }); + }); - // this assumes that the ids in `toSortMap` are complete under transitive requirements - getLoader(components, Object.keys(toSortMap)).getIds().forEach(function (id) { - if (!toSortMap[id]) { - console.error(id + ' not found.'); - } - finalPromises.push.apply(finalPromises, toSortMap[id]); - }); - promises = finalPromises; - - // build - var i = 0; - var l = promises.length; - var code = { js: '', css: '' }; - var errors = []; - - var f = function (resolve) { - if (i < l) { - var p = promises[i]; - p.contentsPromise.then(function (contents) { - code[p.type] += contents + (p.type === 'js' && !/;\s*$/.test(contents) ? ';' : '') + '\n'; - i++; - f(resolve); - }); - p.contentsPromise['catch'](function () { - errors.push($u.element.create({ - tag: 'p', - prop: { - textContent: 'An error occurred while fetching the file "' + p.path + '".' - } - })); - i++; - f(resolve); - }); - } else { - resolve({ code: code, errors: errors }); - } - }; + // this assumes that the ids in `toSortMap` are complete under transitive requirements + getLoader(components, Object.keys(toSortMap)).getIds().forEach(function (id) { + if (!toSortMap[id]) { + console.error(id + ' not found.'); + } + finalPromises.push.apply(finalPromises, toSortMap[id]); + }); + promises = finalPromises; + + // build + var i = 0; + var l = promises.length; + var code = { js: '', css: '' }; + var errors = []; + + var f = function (resolve) { + if (i < l) { + var p = promises[i]; + p.contentsPromise.then(function (contents) { + code[p.type] += contents + (p.type === 'js' && !/;\s*$/.test(contents) ? ';' : '') + '\n'; + i++; + f(resolve); + }); + p.contentsPromise['catch'](function () { + errors.push($u.element.create({ + tag: 'p', + prop: { + textContent: 'An error occurred while fetching the file "' + p.path + '".' + } + })); + i++; + f(resolve); + }); + } else { + resolve({ code: code, errors: errors }); + } + }; - return new Promise(f); -} + return new Promise(f); + } -/** - * @returns {Promise} - */ -function getVersion() { - return getFileContents('./package.json').then(function (jsonStr) { - return JSON.parse(jsonStr).version; - }); -} + /** + * @returns {Promise} + */ + function getVersion() { + return getFileContents('./package.json').then(function (jsonStr) { + return JSON.parse(jsonStr).version; + }); + } }()); diff --git a/assets/examples.js b/assets/examples.js index f4708b38be..0601ff32bf 100644 --- a/assets/examples.js +++ b/assets/examples.js @@ -4,237 +4,237 @@ (function () { -var examples = {}; - -var treeURL = 'https://api.github.com/repos/PrismJS/prism/git/trees/master?recursive=1'; -var treePromise = new Promise(function (resolve) { - $u.xhr({ - url: treeURL, - callback: function (xhr) { - if (xhr.status < 400) { - resolve(JSON.parse(xhr.responseText).tree); + var examples = {}; + + var treeURL = 'https://api.github.com/repos/PrismJS/prism/git/trees/master?recursive=1'; + var treePromise = new Promise(function (resolve) { + $u.xhr({ + url: treeURL, + callback: function (xhr) { + if (xhr.status < 400) { + resolve(JSON.parse(xhr.responseText).tree); + } } - } + }); }); -}); -var languages = components.languages; + var languages = components.languages; -Promise.all(Object.keys(languages).filter(function (id) { return id !== 'meta'; }).map(function (id) { - var language = languages[id]; + Promise.all(Object.keys(languages).filter(function (id) { return id !== 'meta'; }).map(function (id) { + var language = languages[id]; - language.enabled = language.option === 'default'; - language.path = languages.meta.path.replace(/\{id}/g, id) + '.js'; - language.examplesPath = languages.meta.examplesPath.replace(/\{id}/g, id) + '.html'; + language.enabled = language.option === 'default'; + language.path = languages.meta.path.replace(/\{id}/g, id) + '.js'; + language.examplesPath = languages.meta.examplesPath.replace(/\{id}/g, id) + '.html'; - return fileExists(language.examplesPath).then(function (exists) { - return { id: id, exists: exists }; - }); -})).then(function (values) { - values.forEach(function (result) { - var id = result.id; - var exists = result.exists; - var language = languages[id]; - var checked = language.enabled; - - $u.element.create('label', { - attributes: { - 'data-id': id, - 'title': !exists ? 'No examples are available for this language.' : '' - }, - className: !exists ? 'unavailable' : '', - contents: [ - { - tag: 'input', - properties: { - type: 'checkbox', - name: 'language', - value: id, - checked: checked && exists, - disabled: !exists, - onclick: function () { - $$('input[name="' + this.name + '"]').forEach(function (input) { - languages[input.value].enabled = input.checked; - }); - - update(id); - } - } - }, - language.title - ], - inside: '#languages' + return fileExists(language.examplesPath).then(function (exists) { + return { id: id, exists: exists }; }); - examples[id] = $u.element.create('section', { - 'id': 'language-' + id, - 'className': 'language-' + id, - inside: '#examples' + })).then(function (values) { + values.forEach(function (result) { + var id = result.id; + var exists = result.exists; + var language = languages[id]; + var checked = language.enabled; + + $u.element.create('label', { + attributes: { + 'data-id': id, + 'title': !exists ? 'No examples are available for this language.' : '' + }, + className: !exists ? 'unavailable' : '', + contents: [ + { + tag: 'input', + properties: { + type: 'checkbox', + name: 'language', + value: id, + checked: checked && exists, + disabled: !exists, + onclick: function () { + $$('input[name="' + this.name + '"]').forEach(function (input) { + languages[input.value].enabled = input.checked; + }); + + update(id); + } + } + }, + language.title + ], + inside: '#languages' + }); + examples[id] = $u.element.create('section', { + 'id': 'language-' + id, + 'className': 'language-' + id, + inside: '#examples' + }); + if (checked) { + update(id); + } }); - if (checked) { - update(id); - } }); -}); -function fileExists(filepath) { - return treePromise.then(function (tree) { - for (var i = 0, l = tree.length; i < l; i++) { - if (tree[i].path === filepath) { - return true; + function fileExists(filepath) { + return treePromise.then(function (tree) { + for (var i = 0, l = tree.length; i < l; i++) { + if (tree[i].path === filepath) { + return true; + } } - } - // on localhost: The missing example might be for a new language - if (location.hostname === 'localhost' || location.hostname === '127.0.0.1') { - return getFileContents(filepath).then(function () { return true; }, function () { return false; }); - } + // on localhost: The missing example might be for a new language + if (location.hostname === 'localhost' || location.hostname === '127.0.0.1') { + return getFileContents(filepath).then(function () { return true; }, function () { return false; }); + } - return false; - }); -} + return false; + }); + } -function getFileContents(filepath) { - return new Promise(function (resolve, reject) { - $u.xhr({ - url: filepath, - callback: function (xhr) { - if (xhr.status < 400 && xhr.responseText) { - resolve(xhr.responseText); - } else { - reject(); + function getFileContents(filepath) { + return new Promise(function (resolve, reject) { + $u.xhr({ + url: filepath, + callback: function (xhr) { + if (xhr.status < 400 && xhr.responseText) { + resolve(xhr.responseText); + } else { + reject(); + } } - } + }); }); - }); -} - -function buildContentsHeader(id) { - function toArray(value) { - if (Array.isArray(value)) { - return value; - } else if (value != null) { - return [value]; - } else { - return []; - } } - var language = languages[id]; - var header = '

          ' + language.title + '

          '; - - if (language.alias) { - var alias = toArray(language.alias); + function buildContentsHeader(id) { + function toArray(value) { + if (Array.isArray(value)) { + return value; + } else if (value != null) { + return [value]; + } else { + return []; + } + } - header += '

          To use this language, use one of the following classes:

          '; - header += '
          • "language-' + id + '"
          • '; - alias.forEach(function (alias) { - header += '
          • "language-' + alias + '"
          • '; - }); - header += '
          '; - } else { - header += '

          To use this language, use the class "language-' + id + '".

          '; - } + var language = languages[id]; + var header = '

          ' + language.title + '

          '; - function wrapCode(text) { - return '' + text + ''; - } + if (language.alias) { + var alias = toArray(language.alias); - var deps = []; - if (language.require) { - deps.push('requires ' + toArray(language.require).map(wrapCode).join(', ')); - } - if (language.optional) { - deps.push('optionally uses ' + toArray(language.optional).map(wrapCode).join(', ')); - } - if (language.modify) { - deps.push('modifies ' + toArray(language.modify).map(wrapCode).join(', ')); - } - if (deps.length) { - header += '

          '; - header += 'Dependencies:'; - header += ' This component'; - if (deps.length === 1) { - header += ' ' + deps[0] + '.'; - } else { - header += ':'; - header += '

            '; - deps.forEach(function (text) { - header += '
          • ' + text + '.
          • '; + header += '

            To use this language, use one of the following classes:

            '; + header += '
            • "language-' + id + '"
            • '; + alias.forEach(function (alias) { + header += '
            • "language-' + alias + '"
            • '; }); header += '
            '; + } else { + header += '

            To use this language, use the class "language-' + id + '".

            '; } - header += '

            '; - } - return header; -} + function wrapCode(text) { + return '' + text + ''; + } -function update(id) { - var language = languages[id]; - if (language.enabled) { - if (!language.examplesPromise) { - language.examplesPromise = getFileContents(language.examplesPath); + var deps = []; + if (language.require) { + deps.push('requires ' + toArray(language.require).map(wrapCode).join(', ')); + } + if (language.optional) { + deps.push('optionally uses ' + toArray(language.optional).map(wrapCode).join(', ')); + } + if (language.modify) { + deps.push('modifies ' + toArray(language.modify).map(wrapCode).join(', ')); + } + if (deps.length) { + header += '

            '; + header += 'Dependencies:'; + header += ' This component'; + if (deps.length === 1) { + header += ' ' + deps[0] + '.'; + } else { + header += ':'; + header += '

              '; + deps.forEach(function (text) { + header += '
            • ' + text + '.
            • '; + }); + header += '
            '; + } + header += '

            '; } - language.examplesPromise.then(function (contents) { - examples[id].innerHTML = buildContentsHeader(id) + contents; - loadLanguage(id).then(function () { - Prism.highlightAllUnder(examples[id]); - }); - }); - } else { - examples[id].innerHTML = ''; + return header; } -} -/** - * Loads a language, including all dependencies - * - * @param {string} lang the language to load - * @returns {Promise} the promise which resolves as soon as everything is loaded - */ -function loadLanguage(lang) { - // at first we need to fetch all dependencies for the main language - // Note: we need to do this, even if the main language already is loaded (just to be sure..) - // - // We load an array of all dependencies and call recursively this function on each entry - // - // dependencies is now an (possibly empty) array of loading-promises - var dependencies = getDependenciesOfLanguage(lang).map(loadLanguage); - - // We create a promise, which will resolve, as soon as all dependencies are loaded. - // They need to be fully loaded because the main language may extend them. - return Promise.all(dependencies) - .then(function () { - - // If the main language itself isn't already loaded, load it now - // and return the newly created promise (we chain the promises). - // If the language is already loaded, just do nothing - the next .then() - // will immediately be called - if (!Prism.languages[lang]) { - return new Promise(function (resolve) { - $u.script('components/prism-' + lang + '.js', resolve); - }); + function update(id) { + var language = languages[id]; + if (language.enabled) { + if (!language.examplesPromise) { + language.examplesPromise = getFileContents(language.examplesPath); } - }); -} + language.examplesPromise.then(function (contents) { + examples[id].innerHTML = buildContentsHeader(id) + contents; + loadLanguage(id).then(function () { + Prism.highlightAllUnder(examples[id]); + }); + }); + } else { + examples[id].innerHTML = ''; + } + } -/** - * Returns all dependencies (as identifiers) of a specific language - * - * @param {string} lang - * @returns {string[]} the list of dependencies. Empty if the language has none. - */ -function getDependenciesOfLanguage(lang) { - if (!components.languages[lang] || !components.languages[lang].require) { - return []; + /** + * Loads a language, including all dependencies + * + * @param {string} lang the language to load + * @returns {Promise} the promise which resolves as soon as everything is loaded + */ + function loadLanguage(lang) { + // at first we need to fetch all dependencies for the main language + // Note: we need to do this, even if the main language already is loaded (just to be sure..) + // + // We load an array of all dependencies and call recursively this function on each entry + // + // dependencies is now an (possibly empty) array of loading-promises + var dependencies = getDependenciesOfLanguage(lang).map(loadLanguage); + + // We create a promise, which will resolve, as soon as all dependencies are loaded. + // They need to be fully loaded because the main language may extend them. + return Promise.all(dependencies) + .then(function () { + + // If the main language itself isn't already loaded, load it now + // and return the newly created promise (we chain the promises). + // If the language is already loaded, just do nothing - the next .then() + // will immediately be called + if (!Prism.languages[lang]) { + return new Promise(function (resolve) { + $u.script('components/prism-' + lang + '.js', resolve); + }); + } + }); } - return ($u.type(components.languages[lang].require) === 'array') - ? components.languages[lang].require - : [components.languages[lang].require]; -} + + /** + * Returns all dependencies (as identifiers) of a specific language + * + * @param {string} lang + * @returns {string[]} the list of dependencies. Empty if the language has none. + */ + function getDependenciesOfLanguage(lang) { + if (!components.languages[lang] || !components.languages[lang].require) { + return []; + } + + return ($u.type(components.languages[lang].require) === 'array') + ? components.languages[lang].require + : [components.languages[lang].require]; + } }()); diff --git a/components/prism-bro.js b/components/prism-bro.js index 3de66eea1d..c7e4554bca 100644 --- a/components/prism-bro.js +++ b/components/prism-bro.js @@ -3,8 +3,8 @@ Prism.languages.bro = { 'comment': { pattern: /(^|[^\\$])#.*/, lookbehind: true, - inside: { - 'italic': /\b(?:TODO|FIXME|XXX)\b/ + inside: { + 'italic': /\b(?:TODO|FIXME|XXX)\b/ } }, diff --git a/components/prism-coffeescript.js b/components/prism-coffeescript.js index 933c4a688a..72fe0b8ba6 100644 --- a/components/prism-coffeescript.js +++ b/components/prism-coffeescript.js @@ -1,96 +1,96 @@ (function (Prism) { -// Ignore comments starting with { to privilege string interpolation highlighting -var comment = /#(?!\{).+/; -var interpolation = { - pattern: /#\{[^}]+\}/, - alias: 'variable' -}; - -Prism.languages.coffeescript = Prism.languages.extend('javascript', { - 'comment': comment, - 'string': [ + // Ignore comments starting with { to privilege string interpolation highlighting + var comment = /#(?!\{).+/; + var interpolation = { + pattern: /#\{[^}]+\}/, + alias: 'variable' + }; - // Strings are multiline - { - pattern: /'(?:\\[\s\S]|[^\\'])*'/, - greedy: true - }, + Prism.languages.coffeescript = Prism.languages.extend('javascript', { + 'comment': comment, + 'string': [ - { // Strings are multiline - pattern: /"(?:\\[\s\S]|[^\\"])*"/, - greedy: true, - inside: { - 'interpolation': interpolation + { + pattern: /'(?:\\[\s\S]|[^\\'])*'/, + greedy: true + }, + + { + // Strings are multiline + pattern: /"(?:\\[\s\S]|[^\\"])*"/, + greedy: true, + inside: { + 'interpolation': interpolation + } } + ], + 'keyword': /\b(?:and|break|by|catch|class|continue|debugger|delete|do|each|else|extend|extends|false|finally|for|if|in|instanceof|is|isnt|let|loop|namespace|new|no|not|null|of|off|on|or|own|return|super|switch|then|this|throw|true|try|typeof|undefined|unless|until|when|while|window|with|yes|yield)\b/, + 'class-member': { + pattern: /@(?!\d)\w+/, + alias: 'variable' } - ], - 'keyword': /\b(?:and|break|by|catch|class|continue|debugger|delete|do|each|else|extend|extends|false|finally|for|if|in|instanceof|is|isnt|let|loop|namespace|new|no|not|null|of|off|on|or|own|return|super|switch|then|this|throw|true|try|typeof|undefined|unless|until|when|while|window|with|yes|yield)\b/, - 'class-member': { - pattern: /@(?!\d)\w+/, - alias: 'variable' - } -}); + }); -Prism.languages.insertBefore('coffeescript', 'comment', { - 'multiline-comment': { - pattern: /###[\s\S]+?###/, - alias: 'comment' - }, - - // Block regexp can contain comments and interpolation - 'block-regex': { - pattern: /\/{3}[\s\S]*?\/{3}/, - alias: 'regex', - inside: { - 'comment': comment, - 'interpolation': interpolation - } - } -}); + Prism.languages.insertBefore('coffeescript', 'comment', { + 'multiline-comment': { + pattern: /###[\s\S]+?###/, + alias: 'comment' + }, -Prism.languages.insertBefore('coffeescript', 'string', { - 'inline-javascript': { - pattern: /`(?:\\[\s\S]|[^\\`])*`/, - inside: { - 'delimiter': { - pattern: /^`|`$/, - alias: 'punctuation' - }, - 'script': { - pattern: /[\s\S]+/, - alias: 'language-javascript', - inside: Prism.languages.javascript + // Block regexp can contain comments and interpolation + 'block-regex': { + pattern: /\/{3}[\s\S]*?\/{3}/, + alias: 'regex', + inside: { + 'comment': comment, + 'interpolation': interpolation } } - }, + }); - // Block strings - 'multiline-string': [ - { - pattern: /'''[\s\S]*?'''/, - greedy: true, - alias: 'string' - }, - { - pattern: /"""[\s\S]*?"""/, - greedy: true, - alias: 'string', + Prism.languages.insertBefore('coffeescript', 'string', { + 'inline-javascript': { + pattern: /`(?:\\[\s\S]|[^\\`])*`/, inside: { - interpolation: interpolation + 'delimiter': { + pattern: /^`|`$/, + alias: 'punctuation' + }, + 'script': { + pattern: /[\s\S]+/, + alias: 'language-javascript', + inside: Prism.languages.javascript + } } - } - ] + }, + + // Block strings + 'multiline-string': [ + { + pattern: /'''[\s\S]*?'''/, + greedy: true, + alias: 'string' + }, + { + pattern: /"""[\s\S]*?"""/, + greedy: true, + alias: 'string', + inside: { + interpolation: interpolation + } + } + ] -}); + }); -Prism.languages.insertBefore('coffeescript', 'keyword', { - // Object property - 'property': /(?!\d)\w+(?=\s*:(?!:))/ -}); + Prism.languages.insertBefore('coffeescript', 'keyword', { + // Object property + 'property': /(?!\d)\w+(?=\s*:(?!:))/ + }); -delete Prism.languages.coffeescript['template-string']; + delete Prism.languages.coffeescript['template-string']; -Prism.languages.coffee = Prism.languages.coffeescript; + Prism.languages.coffee = Prism.languages.coffeescript; }(Prism)); diff --git a/components/prism-core.js b/components/prism-core.js index 965e3a269f..776c292164 100644 --- a/components/prism-core.js +++ b/components/prism-core.js @@ -4,8 +4,8 @@ var _self = (typeof window !== 'undefined') ? window // if in browser : ( (typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope) - ? self // if in worker - : {} // if in node js + ? self // if in worker + : {} // if in node js ); /** @@ -18,1147 +18,1147 @@ var _self = (typeof window !== 'undefined') */ var Prism = (function (_self) { -// Private helper vars -var lang = /\blang(?:uage)?-([\w-]+)\b/i; -var uniqueId = 0; + // Private helper vars + var lang = /\blang(?:uage)?-([\w-]+)\b/i; + var uniqueId = 0; -// The grammar object for plaintext -var plainTextGrammar = {}; + // The grammar object for plaintext + var plainTextGrammar = {}; -var _ = { - /** - * By default, Prism will attempt to highlight all code elements (by calling {@link Prism.highlightAll}) on the - * current page after the page finished loading. This might be a problem if e.g. you wanted to asynchronously load - * additional languages or plugins yourself. - * - * By setting this value to `true`, Prism will not automatically highlight all code elements on the page. - * - * You obviously have to change this value before the automatic highlighting started. To do this, you can add an - * empty Prism object into the global scope before loading the Prism script like this: - * - * ```js - * window.Prism = window.Prism || {}; - * Prism.manual = true; - * // add a new + + + + + + +
            +
            + +

            Benchmark

            +

            Prism has a benchmark suite which can be run and extended similar to the test suite.

            +
            + +
            +

            Running a benchmark

            + +
            npm run benchmark
            + +

            By default, the benchmark will be run for the current local version of your repository (the one which is currently checkout) and the PrismJS master branch.

            + +

            All options in benchmark/config.json can be changed by either directly editing the file or by passing arguments to the run command. I.e. you can overwrite the default maxTime value with 10s by running the following command:

            + +
            npm run benchmark -- --maxTime=10
            + +
            +

            Running a benchmark for specific languages

            + +

            To run the tests only for a certain set of languages, you can use the language option:

            +
            npm run benchmark -- --language=javascript,markup
            +
            +
            + +
            +

            Remotes

            + +

            Remotes all you to compare different branches from different repos or the same repo. Repos can be the PrismJS repo or any your fork.

            + +

            All remotes are specified under the remotes section in benchmark/config.json. To add a new remote, add an object with the repo and branch properties to the array. Note: if the branch property is not specified, the master branch will be used.
            + Example:

            + +
            {
            +	repo: 'https://github.com/MyUserName/prism.git',
            +	branch: 'feature-1'
            +}
            + +

            To remove a remote, simply remove (delete or comment out) its entry in the remotes array.

            +
            + +
            +

            Cases

            + +

            A case is a collection of files where each file will be benchmarked with all candidates (local + remotes) and a specific language.

            + +

            The language of a case is determined by its key in the cases object in benchmark/config.json where the key has to have the same format as the directory names in tests/languages/. Example:

            +
            cases: {
            +	'css!+css-extras': ...
            +}
            + +

            The files of a case can be specified by:

            + +
              +
            • +

              Specifying the URI of files. A URI is either an HTTPS URL or a file path relative to ./benchmark/.

              +
              cases: {
              +	'css': {
              +		files: [
              +			'style.css',
              +			'https://foo.com/main.css'
              +		]
              +	}
              +}
              +
            • +
            • +

              Using extends to copy all files from another case.

              +
              cases: {
              +	'css': { files: [ 'style.css' ] },
              +	'css!+css-extras': {
              +		extends: 'css'
              +	}
              +}
              +
            • +
            +
            + +
            +

            Output explained

            + +

            The output of a benchmark might look like this:

            + +
            Found 1 cases with 2 files in total.
            +Test 3 candidates on tokenize
            +Estimated duration: 1m 0s
            + +

            The first few lines give some information on the benchmark which is about to be run. This includes the number of cases (here 1), the total number of files in all cases (here 2), the number of candidates (here 3), the test function (here tokenize), and a time estimate for how long the benchmark will take (here 1 minute).

            + +

            What follows are the results for all cases and their files:

            + +
            json
            +
            +  components.json (25 kB)
            +  | local                         5.45ms ± 13% 138smp
            +  | PrismJS@master                4.92ms ±  2% 145smp
            +  | RunDevelopment@greedy-fix     5.62ms ±  4% 128smp
            +  package-lock.json (189 kB)
            +  | local                       117.75ms ± 27% 27smp
            +  | PrismJS@master              121.40ms ± 32% 29smp
            +  | RunDevelopment@greedy-fix   190.79ms ± 41% 20smp
            + +

            A case starts with its key (here json) and is followed by all of its files (here components.json and package-lock.json). Under each file, the results for local and all remotes are shown. To explain the meaning of the values, let's pick a single line:

            + + PrismJS@master 121.40ms ± 32% 29smp + +

            First comes the name of the remote (here PrismJS@master) followed by the mean of all samples, the relative margin of error, and the number of samples.

            + +

            The last part of the output is a small summary of all cases which simply counts how many times a candidate has been the best or worst for a file.

            + +
            summary
            +                             best  worst
            +  local                         1      1
            +  PrismJS@master                0      1
            +  RunDevelopment@greedy-fix     1      0
            +
            + + +
            + + + + + + + + + diff --git a/benchmark/benchmark.js b/benchmark/benchmark.js new file mode 100644 index 0000000000..ebbfac1a07 --- /dev/null +++ b/benchmark/benchmark.js @@ -0,0 +1,454 @@ +// @ts-check + +const fs = require('fs'); +const path = require('path'); +const crypto = require('crypto'); +const { argv } = require('yargs'); +const fetch = require('node-fetch').default; +const Benchmark = require('benchmark'); +const simpleGit = require('simple-git/promise'); +const { parseLanguageNames } = require('../tests/helper/test-case'); + + +/** + * @param {import("./config").Config} config + */ +async function runBenchmark(config) { + const cases = await getCases(config); + const candidates = await getCandidates(config); + const maxCandidateNameLength = candidates.reduce((a, c) => Math.max(a, c.name.length), 0); + + const totalNumberOfCaseFiles = cases.reduce((a, c) => a + c.files.length, 0); + console.log(`Found ${cases.length} cases with ${totalNumberOfCaseFiles} files in total.`); + console.log(`Test ${candidates.length} candidates with Prism.${config.options.testFunction}`); + const estimate = candidates.length * totalNumberOfCaseFiles * config.options.maxTime; + console.log(`Estimated duration: ${Math.floor(estimate / 60)}m ${Math.floor(estimate % 60)}s`); + + /** + * @type {Summary[]} + * + * @typedef {{ best: number; worst: number, relative: number[], avgRelative?: number }} Summary + */ + const totalSummary = Array.from({ length: candidates.length }, () => ({ best: 0, worst: 0, relative: [] })); + + for (const $case of cases) { + + console.log(); + console.log(`\x1b[90m${'-'.repeat(60)}\x1b[0m`); + console.log(); + if ($case.id !== $case.language) { + console.log(`${$case.id} (${$case.language})`); + } else { + console.log($case.id); + } + console.log(); + + // prepare candidates + const warmupCode = await fs.promises.readFile($case.files[0].path, 'utf8'); + /** @type {[string, (code: string) => void][]} */ + const candidateFunctions = candidates.map(({ name, setup }) => { + const fn = setup($case.language, $case.languages); + fn(warmupCode); // warmup + return [name, fn]; + }); + + + // bench all files + for (const caseFile of $case.files) { + console.log(` ${caseFile.uri} \x1b[90m(${Math.round(caseFile.size / 1024)} kB)\x1b[0m`); + + const code = await fs.promises.readFile(caseFile.path, 'utf8'); + + const results = measureCandidates(candidateFunctions.map(([name, fn]) => [name, () => fn(code)]), { + maxTime: config.options.maxTime, + minSamples: 1, + delay: 0, + }); + + const min = results.reduce((a, c) => Math.min(a, c.stats.mean), Infinity); + const max = results.reduce((a, c) => Math.max(a, c.stats.mean), -Infinity); + const minIndex = results.findIndex(x => x.stats.mean === min); + const maxIndex = results.findIndex(x => x.stats.mean === max); + + totalSummary[minIndex].best++; + totalSummary[maxIndex].worst++; + + const best = getBest(results); + const worst = getWorst(results); + + results.forEach((r, index) => { + const name = r.name.padEnd(maxCandidateNameLength, ' '); + const mean = (r.stats.mean * 1000).toFixed(2).padStart(8) + 'ms'; + const r_moe = (100 * r.stats.moe / r.stats.mean).toFixed(0).padStart(3) + '%'; + const smp = r.stats.sample.length.toString().padStart(4) + 'smp'; + + const relativeMean = r.stats.mean / min; + totalSummary[index].relative.push(relativeMean); + const relative = relativeMean === 1 ? ' '.repeat(5) : (relativeMean.toFixed(2) + 'x').padStart(5); + + const color = r === best ? '\x1b[32m' : r === worst ? '\x1b[31m' : '\x1b[0m'; + + console.log(` \x1b[90m| ${color}${name} ${mean} ±${r_moe} ${smp} ${relative}\x1b[0m`); + }); + } + } + + // total summary + console.log(); + console.log(`\x1b[90m${'-'.repeat(60)}\x1b[0m`); + console.log(); + console.log('summary'); + console.log(`${' '.repeat(maxCandidateNameLength + 2)} \x1b[90mbest worst relative\x1b[0m`); + + totalSummary.forEach(s => { + s.avgRelative = s.relative.reduce((a, c) => a + c, 0) / s.relative.length; + }); + const minAvgRelative = totalSummary.reduce((a, c) => Math.min(a, c.avgRelative), Infinity); + + totalSummary.forEach((s, i) => { + const name = candidates[i].name.padEnd(maxCandidateNameLength, ' '); + const best = String(s.best).padStart('best'.length); + const worst = String(s.worst).padStart('worst'.length); + const relative = ((s.avgRelative / minAvgRelative).toFixed(2) + 'x').padStart('relative'.length); + + console.log(` ${name} ${best} ${worst} ${relative}`); + }); +} + +function getConfig() { + const base = require('./config.js'); + + const args = /** @type {Record} */(argv); + + if (typeof args.testFunction === 'string') { + // @ts-ignore + base.options.testFunction = args.testFunction; + } + if (typeof args.maxTime === 'number') { + base.options.maxTime = args.maxTime; + } + if (typeof args.language === 'string') { + base.options.language = args.language; + } + if (typeof args.remotesOnly === 'boolean') { + base.options.remotesOnly = args.remotesOnly; + } + + return base; +} + +/** + * @param {import("./config").Config} config + * @returns {Promise} + * + * @typedef Case + * @property {string} id + * @property {string} language The main language. + * @property {string[]} languages All languages that have to be loaded. + * @property {FileInfo[]} files + */ +async function getCases(config) { + /** @type {Map>} */ + const caseFileCache = new Map(); + + /** + * Returns all files of the test case with the given id. + * + * @param {string} id + * @returns {Promise>} + */ + async function getCaseFiles(id) { + if (caseFileCache.has(id)) { + return caseFileCache.get(id); + } + + const caseEntry = config.cases[id]; + if (!caseEntry) { + throw new Error(`Unknown case "${id}"`); + } + + /** @type {Set} */ + const files = new Set(); + caseFileCache.set(id, files); + + await Promise.all(toArray(caseEntry.files).map(async uri => { + files.add(await getFileInfo(uri)); + })); + for (const extendId of toArray(caseEntry.extends)) { + (await getCaseFiles(extendId)).forEach(info => files.add(info)); + } + + return files; + } + + /** + * Returns whether the case is enabled by the options provided by the user. + * + * @param {string[]} languages + * @returns {boolean} + */ + function isEnabled(languages) { + if (config.options.language) { + // test whether the given languages contain any of the required languages + const required = new Set(config.options.language.split(/,/g).filter(Boolean)); + return languages.some(l => required.has(l)); + } + + return true; + } + + /** @type {Case[]} */ + const cases = []; + for (const id of Object.keys(config.cases)) { + const parsed = parseLanguageNames(id); + + if (!isEnabled(parsed.languages)) { + continue; + } + + cases.push({ + id, + language: parsed.mainLanguage, + languages: parsed.languages, + files: [...await getCaseFiles(id)].sort((a, b) => a.uri.localeCompare(b.uri)), + }); + } + + cases.sort((a, b) => a.id.localeCompare(b.id)); + + return cases; +} + +/** @type {Map>} */ +const fileInfoCache = new Map(); +/** + * Returns the path and other information for the given file identifier. + * + * @param {string} uri + * @returns {Promise} + * + * @typedef {{ uri: string, path: string, size: number }} FileInfo + */ +function getFileInfo(uri) { + let info = fileInfoCache.get(uri); + if (info === undefined) { + info = getFileInfoUncached(uri); + fileInfoCache.set(uri, info); + } + return info; +} +/** + * @param {string} uri + * @returns {Promise} + */ +async function getFileInfoUncached(uri) { + const p = await getFilePath(uri); + const stat = await fs.promises.stat(p); + if (stat.isFile()) { + return { + uri, + path: p, + size: stat.size + }; + } else { + throw new Error(`Unknown file "${uri}"`); + } +} +/** + * Returns the local path of the given file identifier. + * + * @param {string} uri + * @returns {Promise} + */ +async function getFilePath(uri) { + if (/^https:\/\//.test(uri)) { + // it's a URL, so let's download the file (if not downloaded already) + const downloadDir = path.join(__dirname, 'downloads'); + await fs.promises.mkdir(downloadDir, { recursive: true }); + + // file path + const hash = crypto.createHash('md5').update(uri).digest('hex'); + const localPath = path.resolve(downloadDir, hash + '-' + /[-\w\.]*$/.exec(uri)[0]); + + if (!fs.existsSync(localPath)) { + // download file + console.log(`Downloading ${uri}...`); + await fs.promises.writeFile(localPath, await fetch(uri).then(r => r.text()), 'utf8'); + } + + return localPath; + } + + // assume that it's a local file + return path.resolve(__dirname, uri); +} + +/** + * @param {Iterable<[string, () => void]>} candidates + * @param {import("benchmark").Options} [options] + * @returns {Result[]} + * + * @typedef {{ name: string, stats: import("benchmark").Stats }} Result + */ +function measureCandidates(candidates, options) { + const suite = new Benchmark.Suite('temp name'); + + for (const [name, fn] of candidates) { + suite.add(name, fn, options); + } + + /** @type {Result[]} */ + const results = []; + + suite.on('cycle', event => { + results.push({ + name: event.target.name, + stats: event.target.stats + }); + }).run(); + + return results; +} + +/** + * @param {Result[]} results + * @returns {Result | null} + */ +function getBest(results) { + if (results.length >= 2) { + const sorted = [...results].sort((a, b) => a.stats.mean - b.stats.mean); + const best = sorted[0].stats; + const secondBest = sorted[1].stats; + + // basically, it's only the best if the two means plus their moe are disjoint + if (best.mean + best.moe + secondBest.moe < secondBest.mean) { + return sorted[0]; + } + } + + return null; +} +/** + * @param {Result[]} results + * @returns {Result | null} + */ +function getWorst(results) { + if (results.length >= 2) { + const sorted = [...results].sort((a, b) => b.stats.mean - a.stats.mean); + const worst = sorted[0].stats; + const secondWorst = sorted[1].stats; + + // basically, it's only the best if the two means plus their moe are disjoint + // (moe = margin of error; https://benchmarkjs.com/docs#stats_moe) + if (worst.mean - worst.moe - secondWorst.moe > secondWorst.mean) { + return sorted[0]; + } + } + + return null; +} + +/** + * Create a new test function from the given Prism instance. + * + * @param {any} Prism + * @param {string} mainLanguage + * @param {string} testFunction + * @returns {(code: string) => void} + */ +function createTestFunction(Prism, mainLanguage, testFunction) { + if (testFunction === 'tokenize') { + return (code) => { + Prism.tokenize(code, Prism.languages[mainLanguage]); + }; + } else if (testFunction === 'highlight') { + return (code) => { + Prism.highlight(code, Prism.languages[mainLanguage], mainLanguage); + }; + } else { + throw new Error(`Unknown test function "${testFunction}"`); + } + +} + +/** + * @param {import("./config").Config} config + * @returns {Promise} + * + * @typedef Candidate + * @property {string} name + * @property {(mainLanguage: string, languages: string[]) => (code: string) => void} setup + */ +async function getCandidates(config) { + /** @type {Candidate[]} */ + const candidates = []; + + // local + if (!config.options.remotesOnly) { + const localPrismLoader = require('../tests/helper/prism-loader'); + candidates.push({ + name: 'local', + setup(mainLanguage, languages) { + const Prism = localPrismLoader.createInstance(languages); + return createTestFunction(Prism, mainLanguage, config.options.testFunction); + } + }); + } + + // remotes + + // prepare base directory + const remoteBaseDir = path.join(__dirname, 'remotes'); + await fs.promises.mkdir(remoteBaseDir, { recursive: true }); + + const baseGit = simpleGit(remoteBaseDir); + + for (const remote of config.remotes) { + const user = /[^/]+(?=\/prism.git)/.exec(remote.repo); + const branch = remote.branch || 'master'; + const remoteName = `${user}@${branch}`; + const remoteDir = path.join(remoteBaseDir, `${user}@${branch}`); + + let remoteGit; + if (!fs.existsSync(remoteDir)) { + console.log(`Cloning ${remote.repo}`); + await baseGit.clone(remote.repo, remoteName); + remoteGit = simpleGit(remoteDir); + } else { + remoteGit = simpleGit(remoteDir); + await remoteGit.fetch('origin', branch); // get latest version of branch + } + await remoteGit.checkout(branch); // switch to branch + + const remotePrismLoader = require(path.join(remoteDir, 'tests/helper/prism-loader')); + candidates.push({ + name: remoteName, + setup(mainLanguage, languages) { + const Prism = remotePrismLoader.createInstance(languages); + return createTestFunction(Prism, mainLanguage, config.options.testFunction); + } + }); + } + + return candidates; +} + +/** + * A utility function that converts the given optional array-like value into an array. + * + * @param {T[] | T | undefined | null} value + * @returns {readonly T[]} + * @template T + */ +function toArray(value) { + if (Array.isArray(value)) { + return value; + } else if (value != undefined) { + return [value]; + } else { + return []; + } +} + + +runBenchmark(getConfig()); diff --git a/benchmark/config.js b/benchmark/config.js new file mode 100644 index 0000000000..1fcf386bf2 --- /dev/null +++ b/benchmark/config.js @@ -0,0 +1,104 @@ +/** + * @type {Config} + * + * @typedef Config + * @property {ConfigOptions} options + * @property {ConfigRemote[]} remotes + * @property {Object} cases + * + * @typedef ConfigOptions + * @property {'tokenize' | 'highlight'} testFunction + * @property {number} maxTime in seconds + * @property {string} [language] An optional comma separated list of languages than, if defined, will be the only + * languages for which the benchmark will be run. + * @property {boolean} [remotesOnly=false] Whether the benchmark will only run with remotes. If `true`, the local + * project will be ignored + * + * @typedef ConfigRemote + * @property {string} repo + * @property {string} [branch='master'] + * + * @typedef ConfigCase + * @property {string | string[]} [extends] + * @property {string | string[]} [files] + */ +const config = { + options: { + testFunction: 'tokenize', + maxTime: 3, + remotesOnly: false + }, + + remotes: [ + /** + * This will checkout a specific branch from a given repo. + * + * If no branch is specified, the master branch will be used. + */ + + { + repo: 'https://github.com/PrismJS/prism.git' + }, + /*{ + repo: 'https://github.com//prism.git', + branch: 'some-brach-you-want-to-test' + },*/ + ], + + cases: { + 'css': { + files: [ + '../assets/style.css' + ] + }, + 'css!+css-extras': { extends: 'css' }, + 'javascript': { + extends: 'json', + files: [ + 'https://cdnjs.cloudflare.com/ajax/libs/prism/1.20.0/prism.js', + 'https://cdnjs.cloudflare.com/ajax/libs/prism/1.20.0/prism.min.js', + 'https://code.jquery.com/jquery-3.4.1.js', + 'https://code.jquery.com/jquery-3.4.1.min.js', + '../assets/vendor/utopia.js' + ] + }, + 'json': { + files: [ + '../components.json', + '../package-lock.json' + ] + }, + 'markup': { + files: [ + '../download.html', + '../index.html', + 'https://github.com/PrismJS/prism', // the PrismJS/prism GitHub page + ] + }, + 'markup!+css+javascript': { extends: 'markup' }, + 'c': { + files: [ + 'https://raw.githubusercontent.com/git/git/master/remote.h', + 'https://raw.githubusercontent.com/git/git/master/remote.c', + 'https://raw.githubusercontent.com/git/git/master/mergesort.c', + 'https://raw.githubusercontent.com/git/git/master/mergesort.h' + ] + }, + 'ruby': { + files: [ + 'https://raw.githubusercontent.com/rails/rails/master/actionview/lib/action_view/base.rb', + 'https://raw.githubusercontent.com/rails/rails/master/actionview/lib/action_view/layouts.rb', + 'https://raw.githubusercontent.com/rails/rails/master/actionview/lib/action_view/template.rb', + ] + }, + 'rust': { + files: [ + 'https://raw.githubusercontent.com/rust-lang/regex/master/src/utf8.rs', + 'https://raw.githubusercontent.com/rust-lang/regex/master/src/compile.rs', + 'https://raw.githubusercontent.com/rust-lang/regex/master/src/lib.rs' + ] + } + } +}; + +module.exports = config; diff --git a/bower.json b/bower.json index e95a3213e0..86b55dd2d3 100644 --- a/bower.json +++ b/bower.json @@ -17,6 +17,7 @@ "assets", "docs", "tests", + "benchmark", "CNAME", "*.html", "*.svg" diff --git a/package-lock.json b/package-lock.json index 66c970b707..afb60308c1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -351,6 +351,38 @@ "integrity": "sha512-5tabW/i+9mhrfEOUcLDu2xBPsHJ+X5Orqy9FKpale3SjDA17j5AEpYq5vfy3oAeAHGcvANRCO3NV3d2D6q3NiA==", "dev": true }, + "@types/node-fetch": { + "version": "2.5.7", + "resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.5.7.tgz", + "integrity": "sha512-o2WVNf5UhWRkxlf6eq+jMZDu7kjgpgJfl4xVNlvryc95O/6F2ld8ztKX+qu+Rjyet93WAWm5LjeX9H5FGkODvw==", + "dev": true, + "requires": { + "@types/node": "*", + "form-data": "^3.0.0" + }, + "dependencies": { + "combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "dev": true, + "requires": { + "delayed-stream": "~1.0.0" + } + }, + "form-data": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.0.tgz", + "integrity": "sha512-CKMFDglpbMi6PyN+brwB9Q/GOw0eAnsrEZDgcsH5Krhz5Od/haKHAX0NmQfha2zPPz0JpWzA7GJHGSnvCRLWsg==", + "dev": true, + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + } + } + } + }, "a-sync-waterfall": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/a-sync-waterfall/-/a-sync-waterfall-1.0.1.tgz", @@ -863,6 +895,16 @@ "integrity": "sha512-IWIbu7pMqyw3EAJHzzHbWa85b6oud/yfKYg5rqB5hNE8CeMi3nX+2C2sj0HswfblST86hpVEOAb9x34NZd6P7A==", "dev": true }, + "benchmark": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/benchmark/-/benchmark-2.1.4.tgz", + "integrity": "sha1-CfPeMckWQl1JjMLuVloOvzwqVik=", + "dev": true, + "requires": { + "lodash": "^4.17.4", + "platform": "^1.3.3" + } + }, "binary-extensions": { "version": "1.13.1", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.13.1.tgz", @@ -5916,6 +5958,12 @@ "integrity": "sha1-DPd1eml38b9/ajIge3CeN3OI6HQ=", "dev": true }, + "platform": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/platform/-/platform-1.3.6.tgz", + "integrity": "sha512-fnWVljUchTro6RiCFvCXBbNhJc2NijN7oIQxbwsyL0buWJPG85v81ehlHI9fXrJsMNgTofEoWIQeClKpgxFLrg==", + "dev": true + }, "pn": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/pn/-/pn-1.1.0.tgz", diff --git a/package.json b/package.json index a598a93262..afea4802c9 100755 --- a/package.json +++ b/package.json @@ -5,6 +5,7 @@ "main": "prism.js", "style": "themes/prism.css", "scripts": { + "benchmark": "node benchmark/benchmark.js", "build": "gulp", "start": "http-server -c-1", "lint": "eslint . --cache", @@ -33,6 +34,8 @@ "license": "MIT", "readmeFilename": "README.md", "devDependencies": { + "@types/node-fetch": "^2.5.5", + "benchmark": "^2.1.4", "chai": "^4.2.0", "danger": "^10.5.0", "del": "^4.1.1", @@ -52,6 +55,7 @@ "http-server": "^0.12.3", "jsdom": "^13.0.0", "mocha": "^6.2.0", + "node-fetch": "^2.6.0", "npm-run-all": "^4.1.5", "pump": "^3.0.0", "refa": "^0.9.1", From 4e9338acee10bfc68eb650f18c3517ba5f543a3c Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Fri, 27 Aug 2021 18:41:39 +0200 Subject: [PATCH 0885/1100] ESLint: Added `regexp/no-super-linear-backtracking` rule (#3040) --- .eslintrc.js | 5 +++-- components/prism-core.js | 2 +- components/prism-core.min.js | 2 +- components/prism-kumir.js | 1 + components/prism-textile.js | 10 ++++++++++ docs/prism-core.js.html | 2 +- gulpfile.js/changelog.js | 1 + prism.js | 2 +- 8 files changed, 19 insertions(+), 6 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 5002ad9c32..0d98692033 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -56,17 +56,18 @@ module.exports = { 'jsdoc/require-property-name': 'warn', // regexp - 'regexp/no-empty-capturing-group': 'error', 'regexp/no-dupe-disjunctions': 'error', 'regexp/no-empty-alternative': 'error', + 'regexp/no-empty-capturing-group': 'error', 'regexp/no-empty-lookarounds-assertion': 'error', 'regexp/no-lazy-ends': 'error', 'regexp/no-obscure-range': 'error', 'regexp/no-optional-assertion': 'error', 'regexp/no-standalone-backslash': 'error', + 'regexp/no-super-linear-backtracking': 'error', + 'regexp/no-unused-capturing-group': 'error', 'regexp/no-zero-quantifier': 'error', 'regexp/optimal-lookaround-quantifier': 'error', - 'regexp/no-unused-capturing-group': 'error', 'regexp/match-any': 'warn', 'regexp/negation': 'warn', diff --git a/components/prism-core.js b/components/prism-core.js index 776c292164..cf77da513b 100644 --- a/components/prism-core.js +++ b/components/prism-core.js @@ -201,7 +201,7 @@ var Prism = (function (_self) { // at _.util.currentScript (http://localhost/components/prism-core.js:119:5) // at Global code (http://localhost/components/prism-core.js:606:1) - var src = (/at [^(\r\n]*\((.*):.+:.+\)$/i.exec(err.stack) || [])[1]; + var src = (/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(err.stack) || [])[1]; if (src) { var scripts = document.getElementsByTagName('script'); for (var i in scripts) { diff --git a/components/prism-core.min.js b/components/prism-core.min.js index e1a5842c3a..4ff2c0fc71 100644 --- a/components/prism-core.min.js +++ b/components/prism-core.min.js @@ -1 +1 @@ -var _self="undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{},Prism=function(u){var c=/\blang(?:uage)?-([\w-]+)\b/i,n=0,e={},M={manual:u.Prism&&u.Prism.manual,disableWorkerMessageHandler:u.Prism&&u.Prism.disableWorkerMessageHandler,util:{encode:function e(n){return n instanceof W?new W(n.type,e(n.content),n.alias):Array.isArray(n)?n.map(e):n.replace(/&/g,"&").replace(/=l.reach);y+=m.value.length,m=m.next){var b=m.value;if(t.length>n.length)return;if(!(b instanceof W)){var k,x=1;if(h){if(!(k=z(v,y,n,f)))break;var w=k.index,A=k.index+k[0].length,P=y;for(P+=m.value.length;P<=w;)m=m.next,P+=m.value.length;if(P-=m.value.length,y=P,m.value instanceof W)continue;for(var E=m;E!==t.tail&&(Pl.reach&&(l.reach=N);var j=m.prev;O&&(j=I(t,j,O),y+=O.length),q(t,j,x);var C=new W(o,g?M.tokenize(S,g):S,d,S);if(m=I(t,j,C),L&&I(t,m,L),1l.reach&&(l.reach=_.reach)}}}}}}(e,a,n,a.head,0),function(e){var n=[],t=e.head.next;for(;t!==e.tail;)n.push(t.value),t=t.next;return n}(a)},hooks:{all:{},add:function(e,n){var t=M.hooks.all;t[e]=t[e]||[],t[e].push(n)},run:function(e,n){var t=M.hooks.all[e];if(t&&t.length)for(var r,a=0;r=t[a++];)r(n)}},Token:W};function W(e,n,t,r){this.type=e,this.content=n,this.alias=t,this.length=0|(r||"").length}function z(e,n,t,r){e.lastIndex=n;var a=e.exec(t);if(a&&r&&a[1]){var i=a[1].length;a.index+=i,a[0]=a[0].slice(i)}return a}function i(){var e={value:null,prev:null,next:null},n={value:null,prev:e,next:null};e.next=n,this.head=e,this.tail=n,this.length=0}function I(e,n,t){var r=n.next,a={value:t,prev:n,next:r};return n.next=a,r.prev=a,e.length++,a}function q(e,n,t){for(var r=n.next,a=0;a"+a.content+""},!u.document)return u.addEventListener&&(M.disableWorkerMessageHandler||u.addEventListener("message",function(e){var n=JSON.parse(e.data),t=n.language,r=n.code,a=n.immediateClose;u.postMessage(M.highlight(r,M.languages[t],t)),a&&u.close()},!1)),M;var t=M.util.currentScript();function r(){M.manual||M.highlightAll()}if(t&&(M.filename=t.src,t.hasAttribute("data-manual")&&(M.manual=!0)),!M.manual){var a=document.readyState;"loading"===a||"interactive"===a&&t&&t.defer?document.addEventListener("DOMContentLoaded",r):window.requestAnimationFrame?window.requestAnimationFrame(r):window.setTimeout(r,16)}return M}(_self);"undefined"!=typeof module&&module.exports&&(module.exports=Prism),"undefined"!=typeof global&&(global.Prism=Prism); \ No newline at end of file +var _self="undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{},Prism=function(u){var c=/\blang(?:uage)?-([\w-]+)\b/i,n=0,e={},M={manual:u.Prism&&u.Prism.manual,disableWorkerMessageHandler:u.Prism&&u.Prism.disableWorkerMessageHandler,util:{encode:function e(n){return n instanceof W?new W(n.type,e(n.content),n.alias):Array.isArray(n)?n.map(e):n.replace(/&/g,"&").replace(/=l.reach);y+=m.value.length,m=m.next){var b=m.value;if(t.length>n.length)return;if(!(b instanceof W)){var k,x=1;if(h){if(!(k=z(v,y,n,f)))break;var w=k.index,A=k.index+k[0].length,P=y;for(P+=m.value.length;P<=w;)m=m.next,P+=m.value.length;if(P-=m.value.length,y=P,m.value instanceof W)continue;for(var E=m;E!==t.tail&&(Pl.reach&&(l.reach=N);var j=m.prev;O&&(j=I(t,j,O),y+=O.length),q(t,j,x);var C=new W(o,g?M.tokenize(S,g):S,d,S);if(m=I(t,j,C),L&&I(t,m,L),1l.reach&&(l.reach=_.reach)}}}}}}(e,a,n,a.head,0),function(e){var n=[],t=e.head.next;for(;t!==e.tail;)n.push(t.value),t=t.next;return n}(a)},hooks:{all:{},add:function(e,n){var t=M.hooks.all;t[e]=t[e]||[],t[e].push(n)},run:function(e,n){var t=M.hooks.all[e];if(t&&t.length)for(var r,a=0;r=t[a++];)r(n)}},Token:W};function W(e,n,t,r){this.type=e,this.content=n,this.alias=t,this.length=0|(r||"").length}function z(e,n,t,r){e.lastIndex=n;var a=e.exec(t);if(a&&r&&a[1]){var i=a[1].length;a.index+=i,a[0]=a[0].slice(i)}return a}function i(){var e={value:null,prev:null,next:null},n={value:null,prev:e,next:null};e.next=n,this.head=e,this.tail=n,this.length=0}function I(e,n,t){var r=n.next,a={value:t,prev:n,next:r};return n.next=a,r.prev=a,e.length++,a}function q(e,n,t){for(var r=n.next,a=0;a"+a.content+""},!u.document)return u.addEventListener&&(M.disableWorkerMessageHandler||u.addEventListener("message",function(e){var n=JSON.parse(e.data),t=n.language,r=n.code,a=n.immediateClose;u.postMessage(M.highlight(r,M.languages[t],t)),a&&u.close()},!1)),M;var t=M.util.currentScript();function r(){M.manual||M.highlightAll()}if(t&&(M.filename=t.src,t.hasAttribute("data-manual")&&(M.manual=!0)),!M.manual){var a=document.readyState;"loading"===a||"interactive"===a&&t&&t.defer?document.addEventListener("DOMContentLoaded",r):window.requestAnimationFrame?window.requestAnimationFrame(r):window.setTimeout(r,16)}return M}(_self);"undefined"!=typeof module&&module.exports&&(module.exports=Prism),"undefined"!=typeof global&&(global.Prism=Prism); \ No newline at end of file diff --git a/components/prism-kumir.js b/components/prism-kumir.js index 565427f79f..679574078b 100644 --- a/components/prism-kumir.js +++ b/components/prism-kumir.js @@ -76,6 +76,7 @@ /** Should be performed after searching for reserved words. */ 'name': { + // eslint-disable-next-line regexp/no-super-linear-backtracking pattern: wrapId(/(^|[])[^\d][^]*(?:\x20+[^]+)*(?=[]|$)/.source), lookbehind: true }, diff --git a/components/prism-textile.js b/components/prism-textile.js index e96e601e6e..26d7ef32bf 100644 --- a/components/prism-textile.js +++ b/components/prism-textile.js @@ -91,6 +91,7 @@ }, 'inline': { + // eslint-disable-next-line regexp/no-super-linear-backtracking pattern: withModifier(/(^|[^a-zA-Z\d])(\*\*|__|\?\?|[*_%@+\-^~])*.+?\2(?![a-zA-Z\d])/.source), lookbehind: true, inside: { @@ -98,18 +99,21 @@ // *bold*, **bold** 'bold': { + // eslint-disable-next-line regexp/no-super-linear-backtracking pattern: withModifier(/(^(\*\*?)*).+?(?=\2)/.source), lookbehind: true }, // _italic_, __italic__ 'italic': { + // eslint-disable-next-line regexp/no-super-linear-backtracking pattern: withModifier(/(^(__?)*).+?(?=\2)/.source), lookbehind: true }, // ??cite?? 'cite': { + // eslint-disable-next-line regexp/no-super-linear-backtracking pattern: withModifier(/(^\?\?*).+?(?=\?\?)/.source), lookbehind: true, alias: 'string' @@ -117,6 +121,7 @@ // @code@ 'code': { + // eslint-disable-next-line regexp/no-super-linear-backtracking pattern: withModifier(/(^@*).+?(?=@)/.source), lookbehind: true, alias: 'keyword' @@ -124,18 +129,21 @@ // +inserted+ 'inserted': { + // eslint-disable-next-line regexp/no-super-linear-backtracking pattern: withModifier(/(^\+*).+?(?=\+)/.source), lookbehind: true }, // -deleted- 'deleted': { + // eslint-disable-next-line regexp/no-super-linear-backtracking pattern: withModifier(/(^-*).+?(?=-)/.source), lookbehind: true }, // %span% 'span': { + // eslint-disable-next-line regexp/no-super-linear-backtracking pattern: withModifier(/(^%*).+?(?=%)/.source), lookbehind: true }, @@ -168,9 +176,11 @@ // "text":http://example.com // "text":link-ref 'link': { + // eslint-disable-next-line regexp/no-super-linear-backtracking pattern: withModifier(/"*[^"]+":.+?(?=[^\w/]?(?:\s|$))/.source), inside: { 'text': { + // eslint-disable-next-line regexp/no-super-linear-backtracking pattern: withModifier(/(^"*)[^"]+(?=")/.source), lookbehind: true }, diff --git a/docs/prism-core.js.html b/docs/prism-core.js.html index 8c6e5ee416..6d6654abc3 100644 --- a/docs/prism-core.js.html +++ b/docs/prism-core.js.html @@ -254,7 +254,7 @@

            prism-core.js

            // at _.util.currentScript (http://localhost/components/prism-core.js:119:5) // at Global code (http://localhost/components/prism-core.js:606:1) - var src = (/at [^(\r\n]*\((.*):.+:.+\)$/i.exec(err.stack) || [])[1]; + var src = (/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(err.stack) || [])[1]; if (src) { var scripts = document.getElementsByTagName('script'); for (var i in scripts) { diff --git a/gulpfile.js/changelog.js b/gulpfile.js/changelog.js index f4d65e6408..d945d0fd27 100644 --- a/gulpfile.js/changelog.js +++ b/gulpfile.js/changelog.js @@ -58,6 +58,7 @@ function createSortedArray(compareFn) { * @typedef {"A" | "C" | "D" | "M" | "R" | "T" | "U" | "X" | "B"} ChangeMode */ async function getCommitInfo(line) { + // eslint-disable-next-line regexp/no-super-linear-backtracking const [, hash, message] = /^([a-f\d]+)\s+(.*)$/i.exec(line); /* The output looks like this: diff --git a/prism.js b/prism.js index c17bcff46c..2358d68c29 100644 --- a/prism.js +++ b/prism.js @@ -206,7 +206,7 @@ var Prism = (function (_self) { // at _.util.currentScript (http://localhost/components/prism-core.js:119:5) // at Global code (http://localhost/components/prism-core.js:606:1) - var src = (/at [^(\r\n]*\((.*):.+:.+\)$/i.exec(err.stack) || [])[1]; + var src = (/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(err.stack) || [])[1]; if (src) { var scripts = document.getElementsByTagName('script'); for (var i in scripts) { From 5de8947f15cecf5f0496ecbe9ec7c68441665a45 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Wed, 1 Sep 2021 14:04:46 +0200 Subject: [PATCH 0886/1100] C++: Fixed generic function false positive (#3043) --- components/prism-cpp.js | 2 +- components/prism-cpp.min.js | 2 +- tests/languages/cpp/issue3042.test | 126 +++++++++++++++++++++++++++++ 3 files changed, 128 insertions(+), 2 deletions(-) create mode 100644 tests/languages/cpp/issue3042.test diff --git a/components/prism-cpp.js b/components/prism-cpp.js index 033eba6f37..cffefb0c49 100644 --- a/components/prism-cpp.js +++ b/components/prism-cpp.js @@ -61,7 +61,7 @@ Prism.languages.insertBefore('cpp', 'keyword', { 'generic-function': { - pattern: /\b[a-z_]\w*\s*<(?:[^<>]|<(?:[^<>])*>)*>(?=\s*\()/i, + pattern: /\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i, inside: { 'function': /^\w+/, 'generic': { diff --git a/components/prism-cpp.min.js b/components/prism-cpp.min.js index 03920d5346..ee8582639d 100644 --- a/components/prism-cpp.min.js +++ b/components/prism-cpp.min.js @@ -1 +1 @@ -!function(e){var t=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char8_t|char16_t|char32_t|class|compl|concept|const|consteval|constexpr|constinit|const_cast|continue|co_await|co_return|co_yield|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int8_t|int16_t|int32_t|int64_t|uint8_t|uint16_t|uint32_t|uint64_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,n="\\b(?!)\\w+(?:\\s*\\.\\s*\\w+)*\\b".replace(//g,function(){return t.source});e.languages.cpp=e.languages.extend("c",{"class-name":[{pattern:RegExp("(\\b(?:class|concept|enum|struct|typename)\\s+)(?!)\\w+".replace(//g,function(){return t.source})),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:t,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:true|false)\b/}),e.languages.insertBefore("cpp","string",{module:{pattern:RegExp('(\\b(?:module|import)\\s+)(?:"(?:\\\\(?:\r\n|[^])|[^"\\\\\r\n])*"|<[^<>\r\n]*>|'+"(?:\\s*:\\s*)?|:\\s*".replace(//g,function(){return n})+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),e.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b[a-z_]\w*\s*<(?:[^<>]|<(?:[^<>])*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:e.languages.cpp}}}}),e.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),e.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:e.languages.extend("cpp",{})}}),e.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},e.languages.cpp["base-clause"])}(Prism); \ No newline at end of file +!function(e){var t=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char8_t|char16_t|char32_t|class|compl|concept|const|consteval|constexpr|constinit|const_cast|continue|co_await|co_return|co_yield|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int8_t|int16_t|int32_t|int64_t|uint8_t|uint16_t|uint32_t|uint64_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,n="\\b(?!)\\w+(?:\\s*\\.\\s*\\w+)*\\b".replace(//g,function(){return t.source});e.languages.cpp=e.languages.extend("c",{"class-name":[{pattern:RegExp("(\\b(?:class|concept|enum|struct|typename)\\s+)(?!)\\w+".replace(//g,function(){return t.source})),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:t,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:true|false)\b/}),e.languages.insertBefore("cpp","string",{module:{pattern:RegExp('(\\b(?:module|import)\\s+)(?:"(?:\\\\(?:\r\n|[^])|[^"\\\\\r\n])*"|<[^<>\r\n]*>|'+"(?:\\s*:\\s*)?|:\\s*".replace(//g,function(){return n})+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),e.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:e.languages.cpp}}}}),e.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),e.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:e.languages.extend("cpp",{})}}),e.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},e.languages.cpp["base-clause"])}(Prism); \ No newline at end of file diff --git a/tests/languages/cpp/issue3042.test b/tests/languages/cpp/issue3042.test new file mode 100644 index 0000000000..ab5c47b4df --- /dev/null +++ b/tests/languages/cpp/issue3042.test @@ -0,0 +1,126 @@ +class Foo +{ +public: + + friend bool operator== (const Foo& f1, const Foo& f2); + friend bool operator!= (const Foo& f1, const Foo& f2); + + friend bool operator< (const Foo& f1, const Foo& f2); + friend bool operator> (const Foo& f1, const Foo& f2); + + friend bool operator<= (const Foo& f1, const Foo& f2); + friend bool operator>= (const Foo& f1, const Foo& f2); +}; + +---------------------------------------------------- + +[ + ["keyword", "class"], ["class-name", "Foo"], + ["punctuation", "{"], + ["keyword", "public"], ["operator", ":"], + + ["keyword", "friend"], + ["keyword", "bool"], + ["keyword", "operator"], + ["operator", "=="], + ["punctuation", "("], + ["keyword", "const"], + " Foo", + ["operator", "&"], + " f1", + ["punctuation", ","], + ["keyword", "const"], + " Foo", + ["operator", "&"], + " f2", + ["punctuation", ")"], + ["punctuation", ";"], + + ["keyword", "friend"], + ["keyword", "bool"], + ["keyword", "operator"], + ["operator", "!="], + ["punctuation", "("], + ["keyword", "const"], + " Foo", + ["operator", "&"], + " f1", + ["punctuation", ","], + ["keyword", "const"], + " Foo", + ["operator", "&"], + " f2", + ["punctuation", ")"], + ["punctuation", ";"], + + ["keyword", "friend"], + ["keyword", "bool"], + ["keyword", "operator"], + ["operator", "<"], + ["punctuation", "("], + ["keyword", "const"], + " Foo", + ["operator", "&"], + " f1", + ["punctuation", ","], + ["keyword", "const"], + " Foo", + ["operator", "&"], + " f2", + ["punctuation", ")"], + ["punctuation", ";"], + + ["keyword", "friend"], + ["keyword", "bool"], + ["keyword", "operator"], + ["operator", ">"], + ["punctuation", "("], + ["keyword", "const"], + " Foo", + ["operator", "&"], + " f1", + ["punctuation", ","], + ["keyword", "const"], + " Foo", + ["operator", "&"], + " f2", + ["punctuation", ")"], + ["punctuation", ";"], + + ["keyword", "friend"], + ["keyword", "bool"], + ["keyword", "operator"], + ["operator", "<="], + ["punctuation", "("], + ["keyword", "const"], + " Foo", + ["operator", "&"], + " f1", + ["punctuation", ","], + ["keyword", "const"], + " Foo", + ["operator", "&"], + " f2", + ["punctuation", ")"], + ["punctuation", ";"], + + ["keyword", "friend"], + ["keyword", "bool"], + ["keyword", "operator"], + ["operator", ">="], + ["punctuation", "("], + ["keyword", "const"], + " Foo", + ["operator", "&"], + " f1", + ["punctuation", ","], + ["keyword", "const"], + " Foo", + ["operator", "&"], + " f2", + ["punctuation", ")"], + ["punctuation", ";"], + + ["punctuation", "}"], + ["punctuation", ";"] +] From 4f97b82bd481c0dd3139f6c905ae6ff4b13c952b Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Wed, 1 Sep 2021 18:08:02 +0200 Subject: [PATCH 0887/1100] Added support for GN (#3062) --- components.js | 2 +- components.json | 5 ++ components/prism-gn.js | 51 ++++++++++++++ components/prism-gn.min.js | 1 + examples/prism-gn.html | 24 +++++++ plugins/autoloader/prism-autoloader.js | 1 + plugins/autoloader/prism-autoloader.min.js | 2 +- plugins/show-language/prism-show-language.js | 2 + .../show-language/prism-show-language.min.js | 2 +- tests/languages/gn/boolean_feature.test | 8 +++ tests/languages/gn/comment_feature.test | 7 ++ tests/languages/gn/function_feature.test | 9 +++ tests/languages/gn/number_feature.test | 11 +++ tests/languages/gn/operator_feature.test | 29 ++++++++ tests/languages/gn/punctuation_feature.test | 16 +++++ tests/languages/gn/string_feature.test | 70 +++++++++++++++++++ 16 files changed, 237 insertions(+), 3 deletions(-) create mode 100644 components/prism-gn.js create mode 100644 components/prism-gn.min.js create mode 100644 examples/prism-gn.html create mode 100644 tests/languages/gn/boolean_feature.test create mode 100644 tests/languages/gn/comment_feature.test create mode 100644 tests/languages/gn/function_feature.test create mode 100644 tests/languages/gn/number_feature.test create mode 100644 tests/languages/gn/operator_feature.test create mode 100644 tests/languages/gn/punctuation_feature.test create mode 100644 tests/languages/gn/string_feature.test diff --git a/components.js b/components.js index 9db3b606fe..107b7d2c7c 100644 --- a/components.js +++ b/components.js @@ -1,2 +1,2 @@ -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml","ssml","atom","rss"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","ssml":"SSML","atom":"Atom","rss":"RSS"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","optional":"regex","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"ABNF","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"agda":{"title":"Agda","owner":"xy-ren"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apex":{"title":"Apex","require":["clike","sql"],"owner":"RunDevelopment"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"dkern"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"bicep":{"title":"Bicep","owner":"johnnyreilly"},"birb":{"title":"Birb","require":"clike","owner":"Calamity210"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"BNF","alias":"rbnf","aliasTitles":{"rbnf":"RBNF"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"bsl":{"title":"BSL (1C:Enterprise)","alias":"oscript","aliasTitles":{"oscript":"OneScript"},"owner":"Diversus23"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cfscript":{"title":"CFScript","require":"clike","alias":"cfc","owner":"mjclemente"},"chaiscript":{"title":"ChaiScript","require":["clike","cpp"],"owner":"RunDevelopment"},"cil":{"title":"CIL","owner":"sbrl"},"clojure":{"title":"Clojure","owner":"troglotit"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"cobol":{"title":"COBOL","owner":"RunDevelopment"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"coq":{"title":"Coq","owner":"RunDevelopment"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"csv":{"title":"CSV","owner":"RunDevelopment"},"cypher":{"title":"Cypher","owner":"RunDevelopment"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dataweave":{"title":"DataWeave","owner":"machaval"},"dax":{"title":"DAX","owner":"peterbud"},"dhall":{"title":"Dhall","owner":"RunDevelopment"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"dot":{"title":"DOT (Graphviz)","alias":"gv","optional":"markup","owner":"RunDevelopment"},"ebnf":{"title":"EBNF","owner":"RunDevelopment"},"editorconfig":{"title":"EditorConfig","owner":"osipxd"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"false":{"title":"False","owner":"edukisto"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"c","owner":"Golmote"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","optional":"markdown","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","alias":"hbs","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"hlsl":{"title":"HLSL","require":"c","owner":"RunDevelopment"},"hoon":{"title":"Hoon","owner":"matildepark"},"http":{"title":"HTTP","optional":["css","javascript","json","markup","uri"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"icu-message-format":{"title":"ICU Message Format","owner":"RunDevelopment"},"idris":{"title":"Idris","alias":"idr","owner":"KeenS","require":"haskell"},"ignore":{"title":".ignore","owner":"osipxd","alias":["gitignore","hgignore","npmignore"],"aliasTitles":{"gitignore":".gitignore","hgignore":".hgignore","npmignore":".npmignore"}},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jexl":{"title":"Jexl","owner":"czosel"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike","typescript"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","alias":"webmanifest","aliasTitles":{"webmanifest":"Web App Manifest"},"owner":"CupOfTea696"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"jsstacktrace":{"title":"JS stack trace","owner":"sbrl"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup","sql"],"owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","alias":["kt","kts"],"aliasTitles":{"kts":"Kotlin Script"},"require":"clike","owner":"Golmote"},"kumir":{"title":"KuMir (КуМир)","alias":"kum","owner":"edukisto"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","require":"markup-templating","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"log":{"title":"Log file","optional":"javastacktrace","owner":"RunDevelopment"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","optional":"yaml","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"mongodb":{"title":"MongoDB","owner":"airs0urce","require":"javascript"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"naniscript":{"title":"Naninovel Script","owner":"Elringus","alias":"nani"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nevod":{"title":"Nevod","owner":"nezaboodka"},"nginx":{"title":"nginx","owner":"volado"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"openqasm":{"title":"OpenQasm","alias":"qasm","owner":"RunDevelopment"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"psl":{"title":"PATROL Scripting Language","owner":"bertysentry"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":"markup-templating","owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"promql":{"title":"PromQL","owner":"arendjr"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"purebasic":{"title":"PureBasic","require":"clike","alias":"pbfasm","owner":"HeX0R101"},"purescript":{"title":"PureScript","require":"haskell","alias":"purs","owner":"sriharshachilakapati"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"qsharp":{"title":"Q#","require":"clike","alias":"qs","owner":"fedonman"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"racket":{"title":"Racket","require":"scheme","alias":"rkt","owner":"RunDevelopment"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","owner":"RunDevelopment"},"rego":{"title":"Rego","owner":"JordanSh"},"renpy":{"title":"Ren'py","alias":"rpy","owner":"HyuchiaDiego"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","optional":"css-extras","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","alias":["sh-session","shellsession"],"owner":"RunDevelopment"},"smali":{"title":"Smali","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sml":{"title":"SML","alias":"smlnj","aliasTitles":{"smlnj":"SML/NJ"},"owner":"RunDevelopment"},"solidity":{"title":"Solidity (Ethereum)","alias":"sol","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"squirrel":{"title":"Squirrel","require":"clike","owner":"RunDevelopment"},"stan":{"title":"Stan","owner":"RunDevelopment"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","owner":"chrischares"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","vbnet"],"owner":"RunDevelopment"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"typoscript":{"title":"TypoScript","alias":"tsconfig","aliasTitles":{"tsconfig":"TSConfig"},"owner":"dkern"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"uri":{"title":"URI","alias":"url","aliasTitles":{"url":"URL"},"owner":"RunDevelopment"},"v":{"title":"V","require":"clike","owner":"taggon"},"vala":{"title":"Vala","require":"clike","optional":"regex","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":["vb","vba"],"aliasTitles":{"vba":"VBA"},"owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"wolfram":{"title":"Wolfram language","alias":["mathematica","nb","wl"],"aliasTitles":{"mathematica":"Mathematica","nb":"Mathematica Notebook"},"owner":"msollami"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xml-doc":{"title":"XML doc (.net)","require":"markup","modify":["csharp","fsharp","vbnet"],"owner":"RunDevelopment"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"yang":{"title":"YANG","owner":"RunDevelopment"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml","ssml","atom","rss"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","ssml":"SSML","atom":"Atom","rss":"RSS"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","optional":"regex","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"ABNF","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"agda":{"title":"Agda","owner":"xy-ren"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apex":{"title":"Apex","require":["clike","sql"],"owner":"RunDevelopment"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"dkern"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"bicep":{"title":"Bicep","owner":"johnnyreilly"},"birb":{"title":"Birb","require":"clike","owner":"Calamity210"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"BNF","alias":"rbnf","aliasTitles":{"rbnf":"RBNF"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"bsl":{"title":"BSL (1C:Enterprise)","alias":"oscript","aliasTitles":{"oscript":"OneScript"},"owner":"Diversus23"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cfscript":{"title":"CFScript","require":"clike","alias":"cfc","owner":"mjclemente"},"chaiscript":{"title":"ChaiScript","require":["clike","cpp"],"owner":"RunDevelopment"},"cil":{"title":"CIL","owner":"sbrl"},"clojure":{"title":"Clojure","owner":"troglotit"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"cobol":{"title":"COBOL","owner":"RunDevelopment"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"coq":{"title":"Coq","owner":"RunDevelopment"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"csv":{"title":"CSV","owner":"RunDevelopment"},"cypher":{"title":"Cypher","owner":"RunDevelopment"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dataweave":{"title":"DataWeave","owner":"machaval"},"dax":{"title":"DAX","owner":"peterbud"},"dhall":{"title":"Dhall","owner":"RunDevelopment"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"dot":{"title":"DOT (Graphviz)","alias":"gv","optional":"markup","owner":"RunDevelopment"},"ebnf":{"title":"EBNF","owner":"RunDevelopment"},"editorconfig":{"title":"EditorConfig","owner":"osipxd"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"false":{"title":"False","owner":"edukisto"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"c","owner":"Golmote"},"gn":{"title":"GN","alias":"gni","owner":"RunDevelopment"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","optional":"markdown","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","alias":"hbs","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"hlsl":{"title":"HLSL","require":"c","owner":"RunDevelopment"},"hoon":{"title":"Hoon","owner":"matildepark"},"http":{"title":"HTTP","optional":["css","javascript","json","markup","uri"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"icu-message-format":{"title":"ICU Message Format","owner":"RunDevelopment"},"idris":{"title":"Idris","alias":"idr","owner":"KeenS","require":"haskell"},"ignore":{"title":".ignore","owner":"osipxd","alias":["gitignore","hgignore","npmignore"],"aliasTitles":{"gitignore":".gitignore","hgignore":".hgignore","npmignore":".npmignore"}},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jexl":{"title":"Jexl","owner":"czosel"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike","typescript"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","alias":"webmanifest","aliasTitles":{"webmanifest":"Web App Manifest"},"owner":"CupOfTea696"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"jsstacktrace":{"title":"JS stack trace","owner":"sbrl"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup","sql"],"owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","alias":["kt","kts"],"aliasTitles":{"kts":"Kotlin Script"},"require":"clike","owner":"Golmote"},"kumir":{"title":"KuMir (КуМир)","alias":"kum","owner":"edukisto"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","require":"markup-templating","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"log":{"title":"Log file","optional":"javastacktrace","owner":"RunDevelopment"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","optional":"yaml","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"mongodb":{"title":"MongoDB","owner":"airs0urce","require":"javascript"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"naniscript":{"title":"Naninovel Script","owner":"Elringus","alias":"nani"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nevod":{"title":"Nevod","owner":"nezaboodka"},"nginx":{"title":"nginx","owner":"volado"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"openqasm":{"title":"OpenQasm","alias":"qasm","owner":"RunDevelopment"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"psl":{"title":"PATROL Scripting Language","owner":"bertysentry"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":"markup-templating","owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"promql":{"title":"PromQL","owner":"arendjr"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"purebasic":{"title":"PureBasic","require":"clike","alias":"pbfasm","owner":"HeX0R101"},"purescript":{"title":"PureScript","require":"haskell","alias":"purs","owner":"sriharshachilakapati"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"qsharp":{"title":"Q#","require":"clike","alias":"qs","owner":"fedonman"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"racket":{"title":"Racket","require":"scheme","alias":"rkt","owner":"RunDevelopment"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","owner":"RunDevelopment"},"rego":{"title":"Rego","owner":"JordanSh"},"renpy":{"title":"Ren'py","alias":"rpy","owner":"HyuchiaDiego"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","optional":"css-extras","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","alias":["sh-session","shellsession"],"owner":"RunDevelopment"},"smali":{"title":"Smali","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sml":{"title":"SML","alias":"smlnj","aliasTitles":{"smlnj":"SML/NJ"},"owner":"RunDevelopment"},"solidity":{"title":"Solidity (Ethereum)","alias":"sol","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"squirrel":{"title":"Squirrel","require":"clike","owner":"RunDevelopment"},"stan":{"title":"Stan","owner":"RunDevelopment"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","owner":"chrischares"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","vbnet"],"owner":"RunDevelopment"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"typoscript":{"title":"TypoScript","alias":"tsconfig","aliasTitles":{"tsconfig":"TSConfig"},"owner":"dkern"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"uri":{"title":"URI","alias":"url","aliasTitles":{"url":"URL"},"owner":"RunDevelopment"},"v":{"title":"V","require":"clike","owner":"taggon"},"vala":{"title":"Vala","require":"clike","optional":"regex","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":["vb","vba"],"aliasTitles":{"vba":"VBA"},"owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"wolfram":{"title":"Wolfram language","alias":["mathematica","nb","wl"],"aliasTitles":{"mathematica":"Mathematica","nb":"Mathematica Notebook"},"owner":"msollami"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xml-doc":{"title":"XML doc (.net)","require":"markup","modify":["csharp","fsharp","vbnet"],"owner":"RunDevelopment"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"yang":{"title":"YANG","owner":"RunDevelopment"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; if (typeof module !== 'undefined' && module.exports) { module.exports = components; } \ No newline at end of file diff --git a/components.json b/components.json index 248326607d..289216c954 100644 --- a/components.json +++ b/components.json @@ -466,6 +466,11 @@ "require": "c", "owner": "Golmote" }, + "gn": { + "title": "GN", + "alias": "gni", + "owner": "RunDevelopment" + }, "go": { "title": "Go", "require": "clike", diff --git a/components/prism-gn.js b/components/prism-gn.js new file mode 100644 index 0000000000..4f27c042d7 --- /dev/null +++ b/components/prism-gn.js @@ -0,0 +1,51 @@ +// https://gn.googlesource.com/gn/+/refs/heads/main/docs/reference.md#grammar + +Prism.languages.gn = { + 'comment': { + pattern: /#.*/, + greedy: true + }, + 'string-literal': { + pattern: /(^|[^\\"])"(?:[^\r\n"\\]|\\.)*"/, + lookbehind: true, + greedy: true, + inside: { + 'interpolation': { + pattern: /((?:^|[^\\])(?:\\{2})*)\$(?:\{[\s\S]*?\}|[a-zA-Z_]\w*|0x[a-fA-F0-9]{2})/, + lookbehind: true, + inside: { + 'number': /^\$0x[\s\S]{2}$/, + 'variable': /^\$\w+$/, + 'interpolation-punctuation': { + pattern: /^\$\{|\}$/, + alias: 'punctuation' + }, + 'expression': { + pattern: /[\s\S]+/, + inside: null // see below + } + } + }, + 'string': /[\s\S]+/ + } + }, + + 'keyword': /\b(?:else|if)\b/, + 'boolean': /\b(?:true|false)\b/, + 'builtin-function': { + // a few functions get special highlighting to improve readability + pattern: /\b(?:assert|defined|foreach|import|pool|print|template|tool|toolchain)(?=\s*\()/i, + alias: 'keyword' + }, + 'function': /\b[a-z_]\w*(?=\s*\()/i, + 'constant': /\b(?:current_cpu|current_os|current_toolchain|default_toolchain|host_cpu|host_os|root_build_dir|root_gen_dir|root_out_dir|target_cpu|target_gen_dir|target_out_dir|target_os)\b/, + + 'number': /-?\b\d+\b/, + + 'operator': /[-+!=<>]=?|&&|\|\|/, + 'punctuation': /[(){}[\],.]/ +}; + +Prism.languages.gn['string-literal'].inside['interpolation'].inside['expression'].inside = Prism.languages.gn; + +Prism.languages.gni = Prism.languages.gn; diff --git a/components/prism-gn.min.js b/components/prism-gn.min.js new file mode 100644 index 0000000000..0c28cb1e39 --- /dev/null +++ b/components/prism-gn.min.js @@ -0,0 +1 @@ +Prism.languages.gn={comment:{pattern:/#.*/,greedy:!0},"string-literal":{pattern:/(^|[^\\"])"(?:[^\r\n"\\]|\\.)*"/,lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:\{[\s\S]*?\}|[a-zA-Z_]\w*|0x[a-fA-F0-9]{2})/,lookbehind:!0,inside:{number:/^\$0x[\s\S]{2}$/,variable:/^\$\w+$/,"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},expression:{pattern:/[\s\S]+/,inside:null}}},string:/[\s\S]+/}},keyword:/\b(?:else|if)\b/,boolean:/\b(?:true|false)\b/,"builtin-function":{pattern:/\b(?:assert|defined|foreach|import|pool|print|template|tool|toolchain)(?=\s*\()/i,alias:"keyword"},function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:current_cpu|current_os|current_toolchain|default_toolchain|host_cpu|host_os|root_build_dir|root_gen_dir|root_out_dir|target_cpu|target_gen_dir|target_out_dir|target_os)\b/,number:/-?\b\d+\b/,operator:/[-+!=<>]=?|&&|\|\|/,punctuation:/[(){}[\],.]/},Prism.languages.gn["string-literal"].inside.interpolation.inside.expression.inside=Prism.languages.gn,Prism.languages.gni=Prism.languages.gn; \ No newline at end of file diff --git a/examples/prism-gn.html b/examples/prism-gn.html new file mode 100644 index 0000000000..d0a7fa7200 --- /dev/null +++ b/examples/prism-gn.html @@ -0,0 +1,24 @@ +

            Full example

            +
            # Source: https://gn.googlesource.com/gn/+/main/docs/cross_compiles.md
            +
            +declare_args() {
            +  # Applies only to toolchains targeting target_cpu.
            +  sysroot = ""
            +}
            +
            +config("my_config") {
            +  # Uses current_cpu because compile flags are toolchain-dependent.
            +  if (current_cpu == "arm") {
            +    defines = [ "CPU_IS_32_BIT" ]
            +  } else {
            +    defines = [ "CPU_IS_64_BIT" ]
            +  }
            +  # Compares current_cpu with target_cpu to see whether current_toolchain
            +  # has the same architecture as target_toolchain.
            +  if (sysroot != "" && current_cpu == target_cpu) {
            +    cflags = [
            +      "-isysroot",
            +      sysroot,
            +    ]
            +  }
            +}
            diff --git a/plugins/autoloader/prism-autoloader.js b/plugins/autoloader/prism-autoloader.js index b8b5343175..3f5e61e05e 100644 --- a/plugins/autoloader/prism-autoloader.js +++ b/plugins/autoloader/prism-autoloader.js @@ -189,6 +189,7 @@ "xlsx": "excel-formula", "xls": "excel-formula", "gamemakerlanguage": "gml", + "gni": "gn", "hbs": "handlebars", "hs": "haskell", "idr": "idris", diff --git a/plugins/autoloader/prism-autoloader.min.js b/plugins/autoloader/prism-autoloader.min.js index 7c2cd3e0ee..a04b6d1bda 100644 --- a/plugins/autoloader/prism-autoloader.min.js +++ b/plugins/autoloader/prism-autoloader.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof Prism&&"undefined"!=typeof document){var l={javascript:"clike",actionscript:"javascript",apex:["clike","sql"],arduino:"cpp",aspnet:["markup","csharp"],birb:"clike",bison:"c",c:"clike",csharp:"clike",cpp:"c",cfscript:"clike",chaiscript:["clike","cpp"],coffeescript:"javascript",crystal:"ruby","css-extras":"css",d:"clike",dart:"clike",django:"markup-templating",ejs:["javascript","markup-templating"],etlua:["lua","markup-templating"],erb:["ruby","markup-templating"],fsharp:"clike","firestore-security-rules":"clike",flow:"javascript",ftl:"markup-templating",gml:"clike",glsl:"c",go:"clike",groovy:"clike",haml:"ruby",handlebars:"markup-templating",haxe:"clike",hlsl:"c",idris:"haskell",java:"clike",javadoc:["markup","java","javadoclike"],jolie:"clike",jsdoc:["javascript","javadoclike","typescript"],"js-extras":"javascript",json5:"json",jsonp:"json","js-templates":"javascript",kotlin:"clike",latte:["clike","markup-templating","php"],less:"css",lilypond:"scheme",liquid:"markup-templating",markdown:"markup","markup-templating":"markup",mongodb:"javascript",n4js:"javascript",objectivec:"c",opencl:"c",parser:"markup",php:"markup-templating",phpdoc:["php","javadoclike"],"php-extras":"php",plsql:"sql",processing:"clike",protobuf:"clike",pug:["markup","javascript"],purebasic:"clike",purescript:"haskell",qsharp:"clike",qml:"javascript",qore:"clike",racket:"scheme",jsx:["markup","javascript"],tsx:["jsx","typescript"],reason:"clike",ruby:"clike",sass:"css",scss:"css",scala:"java","shell-session":"bash",smarty:"markup-templating",solidity:"clike",soy:"markup-templating",sparql:"turtle",sqf:"clike",squirrel:"clike","t4-cs":["t4-templating","csharp"],"t4-vb":["t4-templating","vbnet"],tap:"yaml",tt2:["clike","markup-templating"],textile:"markup",twig:"markup",typescript:"javascript",v:"clike",vala:"clike",vbnet:"basic",velocity:"markup",wiki:"markup",xeora:"markup","xml-doc":"markup",xquery:"markup"},n={html:"markup",xml:"markup",svg:"markup",mathml:"markup",ssml:"markup",atom:"markup",rss:"markup",js:"javascript",g4:"antlr4",adoc:"asciidoc",shell:"bash",shortcode:"bbcode",rbnf:"bnf",oscript:"bsl",cs:"csharp",dotnet:"csharp",cfc:"cfscript",coffee:"coffeescript",conc:"concurnas",jinja2:"django","dns-zone":"dns-zone-file",dockerfile:"docker",gv:"dot",eta:"ejs",xlsx:"excel-formula",xls:"excel-formula",gamemakerlanguage:"gml",hbs:"handlebars",hs:"haskell",idr:"idris",gitignore:"ignore",hgignore:"ignore",npmignore:"ignore",webmanifest:"json",kt:"kotlin",kts:"kotlin",kum:"kumir",tex:"latex",context:"latex",ly:"lilypond",emacs:"lisp",elisp:"lisp","emacs-lisp":"lisp",md:"markdown",moon:"moonscript",n4jsd:"n4js",nani:"naniscript",objc:"objectivec",qasm:"openqasm",objectpascal:"pascal",px:"pcaxis",pcode:"peoplecode",pq:"powerquery",mscript:"powerquery",pbfasm:"purebasic",purs:"purescript",py:"python",qs:"qsharp",rkt:"racket",rpy:"renpy",robot:"robotframework",rb:"ruby","sh-session":"shell-session",shellsession:"shell-session",smlnj:"sml",sol:"solidity",sln:"solution-file",rq:"sparql",t4:"t4-cs",trig:"turtle",ts:"typescript",tsconfig:"typoscript",uscript:"unrealscript",uc:"unrealscript",url:"uri",vb:"visual-basic",vba:"visual-basic",mathematica:"wolfram",nb:"wolfram",wl:"wolfram",xeoracube:"xeora",yml:"yaml"},p={},e="components/",a=Prism.util.currentScript();if(a){var r=/\bplugins\/autoloader\/prism-autoloader\.(?:min\.)?js(?:\?[^\r\n/]*)?$/i,s=/(^|\/)[\w-]+\.(?:min\.)?js(?:\?[^\r\n/]*)?$/i,i=a.getAttribute("data-autoloader-path");if(null!=i)e=i.trim().replace(/\/?$/,"/");else{var t=a.src;r.test(t)?e=t.replace(r,"components/"):s.test(t)&&(e=t.replace(s,"$1components/"))}}var o=Prism.plugins.autoloader={languages_path:e,use_minified:!0,loadLanguages:m};Prism.hooks.add("complete",function(e){var a=e.element,r=e.language;if(a&&r&&"none"!==r){var s=function(e){var a=(e.getAttribute("data-dependencies")||"").trim();if(!a){var r=e.parentElement;r&&"pre"===r.tagName.toLowerCase()&&(a=(r.getAttribute("data-dependencies")||"").trim())}return a?a.split(/\s*,\s*/g):[]}(a);/^diff-./i.test(r)?(s.push("diff"),s.push(r.substr("diff-".length))):s.push(r),s.every(u)||m(s,function(){Prism.highlightElement(a)})}})}function u(e){if(0<=e.indexOf("!"))return!1;if((e=n[e]||e)in Prism.languages)return!0;var a=p[e];return a&&!a.error&&!1===a.loading}function m(e,a,r){"string"==typeof e&&(e=[e]);var s=e.length,i=0,t=!1;function c(){t||++i===s&&a&&a(e)}0!==s?e.forEach(function(e){!function(a,r,s){var i=0<=a.indexOf("!");function e(){var e=p[a];e||(e=p[a]={callbacks:[]}),e.callbacks.push({success:r,error:s}),!i&&u(a)?k(a,"success"):!i&&e.error?k(a,"error"):!i&&e.loading||(e.loading=!0,e.error=!1,function(e,a,r){var s=document.createElement("script");s.src=e,s.async=!0,s.onload=function(){document.body.removeChild(s),a&&a()},s.onerror=function(){document.body.removeChild(s),r&&r()},document.body.appendChild(s)}(function(e){return o.languages_path+"prism-"+e+(o.use_minified?".min":"")+".js"}(a),function(){e.loading=!1,k(a,"success")},function(){e.loading=!1,e.error=!0,k(a,"error")}))}a=a.replace("!",""),a=n[a]||a;var t=l[a];t&&t.length?m(t,e,s):e()}(e,c,function(){t||(t=!0,r&&r(e))})}):a&&setTimeout(a,0)}function k(e,a){if(p[e]){for(var r=p[e].callbacks,s=0,i=r.length;s <= => +! = +&& || + +---------------------------------------------------- + +[ + ["operator", "+"], + ["operator", "+="], + + ["operator", "-"], + ["operator", "-="], + + ["operator", "=="], + ["operator", "!="], + ["operator", "<"], + ["operator", ">"], + ["operator", "<="], + ["operator", "="], + ["operator", ">"], + + ["operator", "!"], + ["operator", "="], + + ["operator", "&&"], + ["operator", "||"] +] diff --git a/tests/languages/gn/punctuation_feature.test b/tests/languages/gn/punctuation_feature.test new file mode 100644 index 0000000000..2f83bd4cfb --- /dev/null +++ b/tests/languages/gn/punctuation_feature.test @@ -0,0 +1,16 @@ +( ) [ ] { } +, . + +---------------------------------------------------- + +[ + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", "["], + ["punctuation", "]"], + ["punctuation", "{"], + ["punctuation", "}"], + + ["punctuation", ","], + ["punctuation", "."] +] diff --git a/tests/languages/gn/string_feature.test b/tests/languages/gn/string_feature.test new file mode 100644 index 0000000000..322dd572b2 --- /dev/null +++ b/tests/languages/gn/string_feature.test @@ -0,0 +1,70 @@ +"" +"foo" +".$output_extension" +"$0xFF" +"$var_one/$var_two" +"${var_one}" +"$root_out_dir/lib${_output_name}${_shlib_extension}" + +---------------------------------------------------- + +[ + ["string-literal", [ + ["string", "\"\""] + ]], + ["string-literal", [ + ["string", "\"foo\""] + ]], + ["string-literal", [ + ["string", "\"."], + ["interpolation", [ + ["variable", "$output_extension"] + ]], + ["string", "\""] + ]], + ["string-literal", [ + ["string", "\""], + ["interpolation", [ + ["number", "$0xFF"] + ]], + ["string", "\""] + ]], + ["string-literal", [ + ["string", "\""], + ["interpolation", [ + ["variable", "$var_one"] + ]], + ["string", "/"], + ["interpolation", [ + ["variable", "$var_two"] + ]], + ["string", "\""] + ]], + ["string-literal", [ + ["string", "\""], + ["interpolation", [ + ["interpolation-punctuation", "${"], + ["expression", ["var_one"]], + ["interpolation-punctuation", "}"] + ]], + ["string", "\""] + ]], + ["string-literal", [ + ["string", "\""], + ["interpolation", [ + ["variable", "$root_out_dir"] + ]], + ["string", "/lib"], + ["interpolation", [ + ["interpolation-punctuation", "${"], + ["expression", ["_output_name"]], + ["interpolation-punctuation", "}"] + ]], + ["interpolation", [ + ["interpolation-punctuation", "${"], + ["expression", ["_shlib_extension"]], + ["interpolation-punctuation", "}"] + ]], + ["string", "\""] + ]] +] From 35b88fcff867a075baccb66fafb24ca9b0dd01fa Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Mon, 6 Sep 2021 17:51:54 +0200 Subject: [PATCH 0888/1100] Shell-session: Fixed command false positives (#3048) * Shell-session: Fixed command false positives * Fixed comments and `<` characters --- components/prism-shell-session.js | 17 +++- components/prism-shell-session.min.js | 2 +- .../shell-session/command_string_feature.test | 30 +++++- .../languages/shell-session/issue3047_1.test | 96 +++++++++++++++++++ .../languages/shell-session/issue3047_2.test | 43 +++++++++ 5 files changed, 181 insertions(+), 7 deletions(-) create mode 100644 tests/languages/shell-session/issue3047_1.test create mode 100644 tests/languages/shell-session/issue3047_2.test diff --git a/components/prism-shell-session.js b/components/prism-shell-session.js index 9ec763fdec..1b67ed76cf 100644 --- a/components/prism-shell-session.js +++ b/components/prism-shell-session.js @@ -18,11 +18,22 @@ 'command': { pattern: RegExp( // user info - /^(?:[^\s@:$#%*!/\\]+@[^\r\n@:$#%*!/\\]+(?::[^\0-\x1F$#%*?"<>:;|]+)?|[^\0-\x1F$#%*?"<>@:;|]+)?/.source + + /^/.source + + '(?:' + + ( + // ":" ( )? + /[^\s@:$#%*!/\\]+@[^\r\n@:$#%*!/\\]+(?::[^\0-\x1F$#%*?"<>:;|]+)?/.source + + '|' + + // + // Since the path pattern is quite general, we will require it to start with a special character to + // prevent false positives. + /[/~.][^\0-\x1F$#%*?"<>@:;|]*/.source + ) + + ')?' + // shell symbol - /[$#%]/.source + + /[$#%](?=\s)/.source + // bash command - /(?:[^\\\r\n'"<$]|\\(?:[^\r]|\r\n?)|\$(?!')|<>)+/.source.replace(/<>/g, function () { return strings; }), + /(?:[^\\\r\n \t'"<$]|[ \t](?:(?!#)|#.*$)|\\(?:[^\r]|\r\n?)|\$(?!')|<(?!<)|<>)+/.source.replace(/<>/g, function () { return strings; }), 'm' ), greedy: true, diff --git a/components/prism-shell-session.min.js b/components/prism-shell-session.min.js index 208c65f865..74810323c7 100644 --- a/components/prism-shell-session.min.js +++ b/components/prism-shell-session.min.js @@ -1 +1 @@ -!function(s){var n=['"(?:\\\\[^]|\\$\\([^)]+\\)|\\$(?!\\()|`[^`]+`|[^"\\\\`$])*"',"'[^']*'","\\$'(?:[^'\\\\]|\\\\[^])*'","<<-?\\s*([\"']?)(\\w+)\\1\\s[^]*?[\r\n]\\2"].join("|");s.languages["shell-session"]={command:{pattern:RegExp('^(?:[^\\s@:$#%*!/\\\\]+@[^\r\n@:$#%*!/\\\\]+(?::[^\0-\\x1F$#%*?"<>:;|]+)?|[^\0-\\x1F$#%*?"<>@:;|]+)?[$#%]'+"(?:[^\\\\\r\n'\"<$]|\\\\(?:[^\r]|\r\n?)|\\$(?!')|<>)+".replace(/<>/g,function(){return n}),"m"),greedy:!0,inside:{info:{pattern:/^[^#$%]+/,alias:"punctuation",inside:{user:/^[^\s@:$#%*!/\\]+@[^\r\n@:$#%*!/\\]+/,punctuation:/:/,path:/[\s\S]+/}},bash:{pattern:/(^[$#%]\s*)\S[\s\S]*/,lookbehind:!0,alias:"language-bash",inside:s.languages.bash},"shell-symbol":{pattern:/^[$#%]/,alias:"important"}}},output:/.(?:.*(?:[\r\n]|.$))*/},s.languages["sh-session"]=s.languages.shellsession=s.languages["shell-session"]}(Prism); \ No newline at end of file +!function(s){var n=['"(?:\\\\[^]|\\$\\([^)]+\\)|\\$(?!\\()|`[^`]+`|[^"\\\\`$])*"',"'[^']*'","\\$'(?:[^'\\\\]|\\\\[^])*'","<<-?\\s*([\"']?)(\\w+)\\1\\s[^]*?[\r\n]\\2"].join("|");s.languages["shell-session"]={command:{pattern:RegExp('^(?:[^\\s@:$#%*!/\\\\]+@[^\r\n@:$#%*!/\\\\]+(?::[^\0-\\x1F$#%*?"<>:;|]+)?|[/~.][^\0-\\x1F$#%*?"<>@:;|]*)?[$#%](?=\\s)'+"(?:[^\\\\\r\n \t'\"<$]|[ \t](?:(?!#)|#.*$)|\\\\(?:[^\r]|\r\n?)|\\$(?!')|<(?!<)|<>)+".replace(/<>/g,function(){return n}),"m"),greedy:!0,inside:{info:{pattern:/^[^#$%]+/,alias:"punctuation",inside:{user:/^[^\s@:$#%*!/\\]+@[^\r\n@:$#%*!/\\]+/,punctuation:/:/,path:/[\s\S]+/}},bash:{pattern:/(^[$#%]\s*)\S[\s\S]*/,lookbehind:!0,alias:"language-bash",inside:s.languages.bash},"shell-symbol":{pattern:/^[$#%]/,alias:"important"}}},output:/.(?:.*(?:[\r\n]|.$))*/},s.languages["sh-session"]=s.languages.shellsession=s.languages["shell-session"]}(Prism); \ No newline at end of file diff --git a/tests/languages/shell-session/command_string_feature.test b/tests/languages/shell-session/command_string_feature.test index 854314b8bb..930d0b62ca 100644 --- a/tests/languages/shell-session/command_string_feature.test +++ b/tests/languages/shell-session/command_string_feature.test @@ -21,6 +21,9 @@ $ cat << "EOF" > /etc/ipsec.secrets # : RSA vpn-server-b.key EOF +$ LC_ALL=C tr -cd 'a-zA-Z0-9_-;:!?.@\\*/#%$' < /dev/random | head -c 8 +y_#!$U48 + ---------------------------------------------------- [ @@ -64,10 +67,10 @@ EOF ["builtin", "echo"], ["punctuation", "\\"], "'a ", - ["comment", "# "] + ["comment", "# '"] ]] ]], - ["output", "'\r\n\r\n"], + ["command", [ ["shell-symbol", "$"], ["bash", [ @@ -83,7 +86,28 @@ EOF "\r\n: RSA vpn-server-a.key\r\n# : RSA vpn-server-b.key\r\nEOF" ]] ]] - ]] + ]], + + ["command", [ + ["shell-symbol", "$"], + ["bash", [ + ["assign-left", [ + ["environment", "LC_ALL"] + ]], + ["operator", ["="]], + "C ", + ["function", "tr"], + " -cd ", + ["string", "'a-zA-Z0-9_-;:!?.@\\\\*/#%$'"], + ["operator", ["<"]], + " /dev/random ", + ["operator", ["|"]], + ["function", "head"], + " -c ", + ["number", "8"] + ]] + ]], + ["output", "y_#!$U48"] ] ---------------------------------------------------- diff --git a/tests/languages/shell-session/issue3047_1.test b/tests/languages/shell-session/issue3047_1.test new file mode 100644 index 0000000000..ca9eec6be4 --- /dev/null +++ b/tests/languages/shell-session/issue3047_1.test @@ -0,0 +1,96 @@ +$ diskutil list +/dev/disk0 (internal, physical): + #: TYPE NAME SIZE IDENTIFIER + 0: GUID_partition_scheme *500.3 GB disk0 + 1: EFI EFI 209.7 MB disk0s1 + 2: Apple_APFS Container disk1 500.1 GB disk0s2 + +/dev/disk1 (synthesized): + #: TYPE NAME SIZE IDENTIFIER + 0: APFS Container Scheme - +500.1 GB disk1 + Physical Store disk0s2 + 1: APFS Volume Macintosh HD - Data 340.9 GB disk1s1 + 2: APFS Volume Preboot 85.9 MB disk1s2 + 3: APFS Volume Recovery 529.0 MB disk1s3 + 4: APFS Volume VM 3.2 GB disk1s4 + 5: APFS Volume Macintosh HD 11.3 GB disk1s5 + +/dev/disk2 (internal, physical): + #: TYPE NAME SIZE IDENTIFIER + 0: FDisk_partition_scheme *15.9 GB disk2 + 1: Windows_FAT_32 boot 268.4 MB disk2s1 + 2: Linux 15.7 GB disk2s2 + +$ sudo diskutil unmount /dev/diskn +disk2 was already unmounted or it has a partitioning scheme so use "diskutil unmountDisk" instead + +$ sudo diskutil unmountDisk /dev/diskn (if previous step fails) +Unmount of all volumes on disk2 was successful + +$ sudo dd bs=1m if=$HOME/Downloads/tails-amd64-4.18.img of=/dev/rdiskn +1131+0 records in +1131+0 records out +1185939456 bytes transferred in 44.708618 secs (26525970 bytes/sec) + +$ sudo diskutil unmountDisk /dev/diskn +Unmount of all volumes on disk2 was successful + +---------------------------------------------------- + +[ + ["command", [ + ["shell-symbol", "$"], + ["bash", ["diskutil list"]] + ]], + + ["output", "/dev/disk0 (internal, physical):\r\n #: TYPE NAME SIZE IDENTIFIER\r\n 0: GUID_partition_scheme *500.3 GB disk0\r\n 1: EFI EFI 209.7 MB disk0s1\r\n 2: Apple_APFS Container disk1 500.1 GB disk0s2\r\n\r\n/dev/disk1 (synthesized):\r\n #: TYPE NAME SIZE IDENTIFIER\r\n 0: APFS Container Scheme - +500.1 GB disk1\r\n Physical Store disk0s2\r\n 1: APFS Volume Macintosh HD - Data 340.9 GB disk1s1\r\n 2: APFS Volume Preboot 85.9 MB disk1s2\r\n 3: APFS Volume Recovery 529.0 MB disk1s3\r\n 4: APFS Volume VM 3.2 GB disk1s4\r\n 5: APFS Volume Macintosh HD 11.3 GB disk1s5\r\n\r\n/dev/disk2 (internal, physical):\r\n #: TYPE NAME SIZE IDENTIFIER\r\n 0: FDisk_partition_scheme *15.9 GB disk2\r\n 1: Windows_FAT_32 boot 268.4 MB disk2s1\r\n 2: Linux 15.7 GB disk2s2\r\n\r\n"], + ["command", [ + ["shell-symbol", "$"], + ["bash", [ + ["function", "sudo"], + " diskutil unmount /dev/diskn" + ]] + ]], + + ["output", "disk2 was already unmounted or it has a partitioning scheme so use \"diskutil unmountDisk\" instead\r\n\r\n"], + ["command", [ + ["shell-symbol", "$"], + ["bash", [ + ["function", "sudo"], + " diskutil unmountDisk /dev/diskn ", + ["punctuation", "("], + "if previous step fails", + ["punctuation", ")"] + ]] + ]], + + ["output", "Unmount of all volumes on disk2 was successful\r\n\r\n"], + ["command", [ + ["shell-symbol", "$"], + ["bash", [ + ["function", "sudo"], + ["function", "dd"], + ["assign-left", ["bs"]], + ["operator", ["="]], + "1m ", + ["assign-left", ["if"]], + ["operator", ["="]], + ["environment", "$HOME"], + "/Downloads/tails-amd64-4.18.img ", + ["assign-left", ["of"]], + ["operator", ["="]], + "/dev/rdiskn" + ]] + ]], + + ["output", "1131+0 records in\r\n1131+0 records out\r\n1185939456 bytes transferred in 44.708618 secs (26525970 bytes/sec)\r\n\r\n"], + ["command", [ + ["shell-symbol", "$"], + ["bash", [ + ["function", "sudo"], + " diskutil unmountDisk /dev/diskn" + ]] + ]], + + ["output", "Unmount of all volumes on disk2 was successful"] +] diff --git a/tests/languages/shell-session/issue3047_2.test b/tests/languages/shell-session/issue3047_2.test new file mode 100644 index 0000000000..40e03e67d9 --- /dev/null +++ b/tests/languages/shell-session/issue3047_2.test @@ -0,0 +1,43 @@ +$ gpg --card-status +Reader ...........: Yubico YubiKey CCID +Application ID ...: D******************************* +Application type .: OpenPGP +Version ..........: 0.0 +Manufacturer .....: Yubico +Serial number ....: 1******* +Name of cardholder: John Doe +Language prefs ...: en +Salutation .......: +URL of public key : [not set] +Login data .......: john@example.net +Signature PIN ....: not forced +Key attributes ...: ed25519 cv25519 ed25519 +Max. PIN lengths .: 127 127 127 +PIN retry counter : 3 0 3 +Signature counter : 0 +KDF setting ......: off +UIF setting ......: Sign=on Decrypt=on Auth=on +Signature key ....: ACE1 3F15 90C1 A8C9 D942 51E3 02ED C61B 6543 509B + created ....: 2021-07-21 18:44:34 +Encryption key....: 0524 00F4 8E1D 085A F3E1 61EC D463 4E0D 6E2D D8BF + created ....: 2021-07-21 18:44:52 +Authentication key: A27B 582F 1F62 03BA 549B 3D44 1E7B 69B2 38FF A21B + created ....: 2021-07-21 18:45:13 +General key info..: sub ed25519/0x02EDC61B6543509B 2021-07-21 John Doe +sec# ed25519/0xC2709D13BAB4763C created: 2021-07-21 expires: never +ssb> ed25519/0x02EDC61B6543509B created: 2021-07-21 expires: 2022-07-21 + card-no: 0006 1******* +ssb> cv25519/0xD4634E0D6E2DD8BF created: 2021-07-21 expires: 2022-07-21 + card-no: 0006 1******* +ssb> ed25519/0x1E7B69B238FFA21B created: 2021-07-21 expires: 2022-07-21 + card-no: 0006 1******* + +---------------------------------------------------- + +[ + ["command", [ + ["shell-symbol", "$"], + ["bash", ["gpg --card-status"]] + ]], + ["output", "Reader ...........: Yubico YubiKey CCID\r\nApplication ID ...: D*******************************\r\nApplication type .: OpenPGP\r\nVersion ..........: 0.0\r\nManufacturer .....: Yubico\r\nSerial number ....: 1*******\r\nName of cardholder: John Doe\r\nLanguage prefs ...: en\r\nSalutation .......:\r\nURL of public key : [not set]\r\nLogin data .......: john@example.net\r\nSignature PIN ....: not forced\r\nKey attributes ...: ed25519 cv25519 ed25519\r\nMax. PIN lengths .: 127 127 127\r\nPIN retry counter : 3 0 3\r\nSignature counter : 0\r\nKDF setting ......: off\r\nUIF setting ......: Sign=on Decrypt=on Auth=on\r\nSignature key ....: ACE1 3F15 90C1 A8C9 D942 51E3 02ED C61B 6543 509B\r\n created ....: 2021-07-21 18:44:34\r\nEncryption key....: 0524 00F4 8E1D 085A F3E1 61EC D463 4E0D 6E2D D8BF\r\n created ....: 2021-07-21 18:44:52\r\nAuthentication key: A27B 582F 1F62 03BA 549B 3D44 1E7B 69B2 38FF A21B\r\n created ....: 2021-07-21 18:45:13\r\nGeneral key info..: sub ed25519/0x02EDC61B6543509B 2021-07-21 John Doe \r\nsec# ed25519/0xC2709D13BAB4763C created: 2021-07-21 expires: never\r\nssb> ed25519/0x02EDC61B6543509B created: 2021-07-21 expires: 2022-07-21\r\n card-no: 0006 1*******\r\nssb> cv25519/0xD4634E0D6E2DD8BF created: 2021-07-21 expires: 2022-07-21\r\n card-no: 0006 1*******\r\nssb> ed25519/0x1E7B69B238FFA21B created: 2021-07-21 expires: 2022-07-21\r\n card-no: 0006 1*******"] +] From 247fd9a38f952b7597f4bf2b4ee573f1bfd01cd6 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Mon, 6 Sep 2021 17:54:33 +0200 Subject: [PATCH 0889/1100] Highlight Keywords: More documentation (#3049) --- components.js | 2 +- components.json | 2 +- plugins/highlight-keywords/index.html | 19 +++++++++++++++++-- 3 files changed, 19 insertions(+), 4 deletions(-) diff --git a/components.js b/components.js index 107b7d2c7c..dbb6155633 100644 --- a/components.js +++ b/components.js @@ -1,2 +1,2 @@ -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml","ssml","atom","rss"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","ssml":"SSML","atom":"Atom","rss":"RSS"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","optional":"regex","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"ABNF","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"agda":{"title":"Agda","owner":"xy-ren"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apex":{"title":"Apex","require":["clike","sql"],"owner":"RunDevelopment"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"dkern"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"bicep":{"title":"Bicep","owner":"johnnyreilly"},"birb":{"title":"Birb","require":"clike","owner":"Calamity210"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"BNF","alias":"rbnf","aliasTitles":{"rbnf":"RBNF"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"bsl":{"title":"BSL (1C:Enterprise)","alias":"oscript","aliasTitles":{"oscript":"OneScript"},"owner":"Diversus23"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cfscript":{"title":"CFScript","require":"clike","alias":"cfc","owner":"mjclemente"},"chaiscript":{"title":"ChaiScript","require":["clike","cpp"],"owner":"RunDevelopment"},"cil":{"title":"CIL","owner":"sbrl"},"clojure":{"title":"Clojure","owner":"troglotit"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"cobol":{"title":"COBOL","owner":"RunDevelopment"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"coq":{"title":"Coq","owner":"RunDevelopment"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"csv":{"title":"CSV","owner":"RunDevelopment"},"cypher":{"title":"Cypher","owner":"RunDevelopment"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dataweave":{"title":"DataWeave","owner":"machaval"},"dax":{"title":"DAX","owner":"peterbud"},"dhall":{"title":"Dhall","owner":"RunDevelopment"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"dot":{"title":"DOT (Graphviz)","alias":"gv","optional":"markup","owner":"RunDevelopment"},"ebnf":{"title":"EBNF","owner":"RunDevelopment"},"editorconfig":{"title":"EditorConfig","owner":"osipxd"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"false":{"title":"False","owner":"edukisto"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"c","owner":"Golmote"},"gn":{"title":"GN","alias":"gni","owner":"RunDevelopment"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","optional":"markdown","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","alias":"hbs","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"hlsl":{"title":"HLSL","require":"c","owner":"RunDevelopment"},"hoon":{"title":"Hoon","owner":"matildepark"},"http":{"title":"HTTP","optional":["css","javascript","json","markup","uri"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"icu-message-format":{"title":"ICU Message Format","owner":"RunDevelopment"},"idris":{"title":"Idris","alias":"idr","owner":"KeenS","require":"haskell"},"ignore":{"title":".ignore","owner":"osipxd","alias":["gitignore","hgignore","npmignore"],"aliasTitles":{"gitignore":".gitignore","hgignore":".hgignore","npmignore":".npmignore"}},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jexl":{"title":"Jexl","owner":"czosel"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike","typescript"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","alias":"webmanifest","aliasTitles":{"webmanifest":"Web App Manifest"},"owner":"CupOfTea696"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"jsstacktrace":{"title":"JS stack trace","owner":"sbrl"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup","sql"],"owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","alias":["kt","kts"],"aliasTitles":{"kts":"Kotlin Script"},"require":"clike","owner":"Golmote"},"kumir":{"title":"KuMir (КуМир)","alias":"kum","owner":"edukisto"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","require":"markup-templating","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"log":{"title":"Log file","optional":"javastacktrace","owner":"RunDevelopment"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","optional":"yaml","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"mongodb":{"title":"MongoDB","owner":"airs0urce","require":"javascript"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"naniscript":{"title":"Naninovel Script","owner":"Elringus","alias":"nani"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nevod":{"title":"Nevod","owner":"nezaboodka"},"nginx":{"title":"nginx","owner":"volado"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"openqasm":{"title":"OpenQasm","alias":"qasm","owner":"RunDevelopment"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"psl":{"title":"PATROL Scripting Language","owner":"bertysentry"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":"markup-templating","owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"promql":{"title":"PromQL","owner":"arendjr"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"purebasic":{"title":"PureBasic","require":"clike","alias":"pbfasm","owner":"HeX0R101"},"purescript":{"title":"PureScript","require":"haskell","alias":"purs","owner":"sriharshachilakapati"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"qsharp":{"title":"Q#","require":"clike","alias":"qs","owner":"fedonman"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"racket":{"title":"Racket","require":"scheme","alias":"rkt","owner":"RunDevelopment"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","owner":"RunDevelopment"},"rego":{"title":"Rego","owner":"JordanSh"},"renpy":{"title":"Ren'py","alias":"rpy","owner":"HyuchiaDiego"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","optional":"css-extras","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","alias":["sh-session","shellsession"],"owner":"RunDevelopment"},"smali":{"title":"Smali","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sml":{"title":"SML","alias":"smlnj","aliasTitles":{"smlnj":"SML/NJ"},"owner":"RunDevelopment"},"solidity":{"title":"Solidity (Ethereum)","alias":"sol","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"squirrel":{"title":"Squirrel","require":"clike","owner":"RunDevelopment"},"stan":{"title":"Stan","owner":"RunDevelopment"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","owner":"chrischares"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","vbnet"],"owner":"RunDevelopment"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"typoscript":{"title":"TypoScript","alias":"tsconfig","aliasTitles":{"tsconfig":"TSConfig"},"owner":"dkern"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"uri":{"title":"URI","alias":"url","aliasTitles":{"url":"URL"},"owner":"RunDevelopment"},"v":{"title":"V","require":"clike","owner":"taggon"},"vala":{"title":"Vala","require":"clike","optional":"regex","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":["vb","vba"],"aliasTitles":{"vba":"VBA"},"owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"wolfram":{"title":"Wolfram language","alias":["mathematica","nb","wl"],"aliasTitles":{"mathematica":"Mathematica","nb":"Mathematica Notebook"},"owner":"msollami"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xml-doc":{"title":"XML doc (.net)","require":"markup","modify":["csharp","fsharp","vbnet"],"owner":"RunDevelopment"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"yang":{"title":"YANG","owner":"RunDevelopment"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml","ssml","atom","rss"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","ssml":"SSML","atom":"Atom","rss":"RSS"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","optional":"regex","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"ABNF","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"agda":{"title":"Agda","owner":"xy-ren"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apex":{"title":"Apex","require":["clike","sql"],"owner":"RunDevelopment"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"dkern"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"bicep":{"title":"Bicep","owner":"johnnyreilly"},"birb":{"title":"Birb","require":"clike","owner":"Calamity210"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"BNF","alias":"rbnf","aliasTitles":{"rbnf":"RBNF"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"bsl":{"title":"BSL (1C:Enterprise)","alias":"oscript","aliasTitles":{"oscript":"OneScript"},"owner":"Diversus23"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cfscript":{"title":"CFScript","require":"clike","alias":"cfc","owner":"mjclemente"},"chaiscript":{"title":"ChaiScript","require":["clike","cpp"],"owner":"RunDevelopment"},"cil":{"title":"CIL","owner":"sbrl"},"clojure":{"title":"Clojure","owner":"troglotit"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"cobol":{"title":"COBOL","owner":"RunDevelopment"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"coq":{"title":"Coq","owner":"RunDevelopment"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"csv":{"title":"CSV","owner":"RunDevelopment"},"cypher":{"title":"Cypher","owner":"RunDevelopment"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dataweave":{"title":"DataWeave","owner":"machaval"},"dax":{"title":"DAX","owner":"peterbud"},"dhall":{"title":"Dhall","owner":"RunDevelopment"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"dot":{"title":"DOT (Graphviz)","alias":"gv","optional":"markup","owner":"RunDevelopment"},"ebnf":{"title":"EBNF","owner":"RunDevelopment"},"editorconfig":{"title":"EditorConfig","owner":"osipxd"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"false":{"title":"False","owner":"edukisto"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"c","owner":"Golmote"},"gn":{"title":"GN","alias":"gni","owner":"RunDevelopment"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","optional":"markdown","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","alias":"hbs","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"hlsl":{"title":"HLSL","require":"c","owner":"RunDevelopment"},"hoon":{"title":"Hoon","owner":"matildepark"},"http":{"title":"HTTP","optional":["css","javascript","json","markup","uri"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"icu-message-format":{"title":"ICU Message Format","owner":"RunDevelopment"},"idris":{"title":"Idris","alias":"idr","owner":"KeenS","require":"haskell"},"ignore":{"title":".ignore","owner":"osipxd","alias":["gitignore","hgignore","npmignore"],"aliasTitles":{"gitignore":".gitignore","hgignore":".hgignore","npmignore":".npmignore"}},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jexl":{"title":"Jexl","owner":"czosel"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike","typescript"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","alias":"webmanifest","aliasTitles":{"webmanifest":"Web App Manifest"},"owner":"CupOfTea696"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"jsstacktrace":{"title":"JS stack trace","owner":"sbrl"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup","sql"],"owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","alias":["kt","kts"],"aliasTitles":{"kts":"Kotlin Script"},"require":"clike","owner":"Golmote"},"kumir":{"title":"KuMir (КуМир)","alias":"kum","owner":"edukisto"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","require":"markup-templating","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"log":{"title":"Log file","optional":"javastacktrace","owner":"RunDevelopment"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","optional":"yaml","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"mongodb":{"title":"MongoDB","owner":"airs0urce","require":"javascript"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"naniscript":{"title":"Naninovel Script","owner":"Elringus","alias":"nani"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nevod":{"title":"Nevod","owner":"nezaboodka"},"nginx":{"title":"nginx","owner":"volado"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"openqasm":{"title":"OpenQasm","alias":"qasm","owner":"RunDevelopment"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"psl":{"title":"PATROL Scripting Language","owner":"bertysentry"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":"markup-templating","owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"promql":{"title":"PromQL","owner":"arendjr"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"purebasic":{"title":"PureBasic","require":"clike","alias":"pbfasm","owner":"HeX0R101"},"purescript":{"title":"PureScript","require":"haskell","alias":"purs","owner":"sriharshachilakapati"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"qsharp":{"title":"Q#","require":"clike","alias":"qs","owner":"fedonman"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"racket":{"title":"Racket","require":"scheme","alias":"rkt","owner":"RunDevelopment"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","owner":"RunDevelopment"},"rego":{"title":"Rego","owner":"JordanSh"},"renpy":{"title":"Ren'py","alias":"rpy","owner":"HyuchiaDiego"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","optional":"css-extras","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","alias":["sh-session","shellsession"],"owner":"RunDevelopment"},"smali":{"title":"Smali","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sml":{"title":"SML","alias":"smlnj","aliasTitles":{"smlnj":"SML/NJ"},"owner":"RunDevelopment"},"solidity":{"title":"Solidity (Ethereum)","alias":"sol","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"squirrel":{"title":"Squirrel","require":"clike","owner":"RunDevelopment"},"stan":{"title":"Stan","owner":"RunDevelopment"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","owner":"chrischares"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","vbnet"],"owner":"RunDevelopment"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"typoscript":{"title":"TypoScript","alias":"tsconfig","aliasTitles":{"tsconfig":"TSConfig"},"owner":"dkern"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"uri":{"title":"URI","alias":"url","aliasTitles":{"url":"URL"},"owner":"RunDevelopment"},"v":{"title":"V","require":"clike","owner":"taggon"},"vala":{"title":"Vala","require":"clike","optional":"regex","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":["vb","vba"],"aliasTitles":{"vba":"VBA"},"owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"wolfram":{"title":"Wolfram language","alias":["mathematica","nb","wl"],"aliasTitles":{"mathematica":"Mathematica","nb":"Mathematica Notebook"},"owner":"msollami"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xml-doc":{"title":"XML doc (.net)","require":"markup","modify":["csharp","fsharp","vbnet"],"owner":"RunDevelopment"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"yang":{"title":"YANG","owner":"RunDevelopment"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword for fine-grained highlighting.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; if (typeof module !== 'undefined' && module.exports) { module.exports = components; } \ No newline at end of file diff --git a/components.json b/components.json index 289216c954..12f88243a9 100644 --- a/components.json +++ b/components.json @@ -1465,7 +1465,7 @@ }, "highlight-keywords": { "title": "Highlight Keywords", - "description": "Adds special CSS classes for each keyword matched in the code. For example, the keyword if will have the class keyword-if as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.", + "description": "Adds special CSS classes for each keyword for fine-grained highlighting.", "owner": "vkbansal", "noCSS": true }, diff --git a/plugins/highlight-keywords/index.html b/plugins/highlight-keywords/index.html index bbce365715..ee9ffaecc0 100644 --- a/plugins/highlight-keywords/index.html +++ b/plugins/highlight-keywords/index.html @@ -13,20 +13,35 @@ /* * Custom keyword styles */ - .token.keyword.keyword-return, .token.keyword.keyword-if{ + .token.keyword.keyword-return, .token.keyword.keyword-if { + /* Set the color to a nice red. */ color: #f92672; } - +
            +
            +

            How to use

            + +

            This plugin adds a special class for every keyword, so keyword-specific styles can be applied. These special classes allow for fine-grained control over the appearance of keywords using your own CSS rules.

            + +

            For example, the keyword if will have the class keyword-if added. A CSS rule used to apply special highlighting could look like this:

            + +
            .token.keyword.keyword-if { /* styles for 'if' */ }
            + +

            Note: This plugin does not come with CSS styles. You have to define the keyword-specific CSS rules yourself.

            +
            +

            Examples

            +

            This example shows the plugin in action. The keywords if and return will be highlighted in red. The color of all other keywords will be determined by the current theme. The CSS rules used to implement the keyword-specific highlighting can be seen in the HTML file below.

            +

            JavaScript

            
             
            
            From 87e5a376442e02b27dadc86762d7f8fa7de3dd1a Mon Sep 17 00:00:00 2001
            From: Michael Schmidt 
            Date: Mon, 6 Sep 2021 20:16:52 +0200
            Subject: [PATCH 0890/1100] Added support for Apache Avro IDL (#3051)
            
            ---
             components.js                                 |  2 +-
             components.json                               |  5 ++
             components/prism-avro-idl.js                  | 57 ++++++++++++++
             components/prism-avro-idl.min.js              |  1 +
             examples/prism-avro-idl.html                  | 44 +++++++++++
             plugins/autoloader/prism-autoloader.js        |  1 +
             plugins/autoloader/prism-autoloader.min.js    |  2 +-
             plugins/show-language/prism-show-language.js  |  2 +
             .../show-language/prism-show-language.min.js  |  2 +-
             .../avro-idl/annotation_feature.test          | 76 +++++++++++++++++++
             .../avro-idl/class-name_feature.test          | 52 +++++++++++++
             tests/languages/avro-idl/comment_feature.test | 15 ++++
             .../languages/avro-idl/function_feature.test  | 57 ++++++++++++++
             tests/languages/avro-idl/keyword_feature.test | 65 ++++++++++++++++
             tests/languages/avro-idl/number_feature.test  | 43 +++++++++++
             .../languages/avro-idl/operator_feature.test  |  7 ++
             .../avro-idl/punctuation_feature.test         | 20 +++++
             tests/languages/avro-idl/string_feature.test  | 21 +++++
             18 files changed, 469 insertions(+), 3 deletions(-)
             create mode 100644 components/prism-avro-idl.js
             create mode 100644 components/prism-avro-idl.min.js
             create mode 100644 examples/prism-avro-idl.html
             create mode 100644 tests/languages/avro-idl/annotation_feature.test
             create mode 100644 tests/languages/avro-idl/class-name_feature.test
             create mode 100644 tests/languages/avro-idl/comment_feature.test
             create mode 100644 tests/languages/avro-idl/function_feature.test
             create mode 100644 tests/languages/avro-idl/keyword_feature.test
             create mode 100644 tests/languages/avro-idl/number_feature.test
             create mode 100644 tests/languages/avro-idl/operator_feature.test
             create mode 100644 tests/languages/avro-idl/punctuation_feature.test
             create mode 100644 tests/languages/avro-idl/string_feature.test
            
            diff --git a/components.js b/components.js
            index dbb6155633..8961f000c7 100644
            --- a/components.js
            +++ b/components.js
            @@ -1,2 +1,2 @@
            -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml","ssml","atom","rss"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","ssml":"SSML","atom":"Atom","rss":"RSS"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","optional":"regex","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"ABNF","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"agda":{"title":"Agda","owner":"xy-ren"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apex":{"title":"Apex","require":["clike","sql"],"owner":"RunDevelopment"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"dkern"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"bicep":{"title":"Bicep","owner":"johnnyreilly"},"birb":{"title":"Birb","require":"clike","owner":"Calamity210"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"BNF","alias":"rbnf","aliasTitles":{"rbnf":"RBNF"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"bsl":{"title":"BSL (1C:Enterprise)","alias":"oscript","aliasTitles":{"oscript":"OneScript"},"owner":"Diversus23"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cfscript":{"title":"CFScript","require":"clike","alias":"cfc","owner":"mjclemente"},"chaiscript":{"title":"ChaiScript","require":["clike","cpp"],"owner":"RunDevelopment"},"cil":{"title":"CIL","owner":"sbrl"},"clojure":{"title":"Clojure","owner":"troglotit"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"cobol":{"title":"COBOL","owner":"RunDevelopment"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"coq":{"title":"Coq","owner":"RunDevelopment"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"csv":{"title":"CSV","owner":"RunDevelopment"},"cypher":{"title":"Cypher","owner":"RunDevelopment"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dataweave":{"title":"DataWeave","owner":"machaval"},"dax":{"title":"DAX","owner":"peterbud"},"dhall":{"title":"Dhall","owner":"RunDevelopment"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"dot":{"title":"DOT (Graphviz)","alias":"gv","optional":"markup","owner":"RunDevelopment"},"ebnf":{"title":"EBNF","owner":"RunDevelopment"},"editorconfig":{"title":"EditorConfig","owner":"osipxd"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"false":{"title":"False","owner":"edukisto"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"c","owner":"Golmote"},"gn":{"title":"GN","alias":"gni","owner":"RunDevelopment"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","optional":"markdown","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","alias":"hbs","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"hlsl":{"title":"HLSL","require":"c","owner":"RunDevelopment"},"hoon":{"title":"Hoon","owner":"matildepark"},"http":{"title":"HTTP","optional":["css","javascript","json","markup","uri"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"icu-message-format":{"title":"ICU Message Format","owner":"RunDevelopment"},"idris":{"title":"Idris","alias":"idr","owner":"KeenS","require":"haskell"},"ignore":{"title":".ignore","owner":"osipxd","alias":["gitignore","hgignore","npmignore"],"aliasTitles":{"gitignore":".gitignore","hgignore":".hgignore","npmignore":".npmignore"}},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jexl":{"title":"Jexl","owner":"czosel"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike","typescript"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","alias":"webmanifest","aliasTitles":{"webmanifest":"Web App Manifest"},"owner":"CupOfTea696"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"jsstacktrace":{"title":"JS stack trace","owner":"sbrl"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup","sql"],"owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","alias":["kt","kts"],"aliasTitles":{"kts":"Kotlin Script"},"require":"clike","owner":"Golmote"},"kumir":{"title":"KuMir (КуМир)","alias":"kum","owner":"edukisto"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","require":"markup-templating","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"log":{"title":"Log file","optional":"javastacktrace","owner":"RunDevelopment"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","optional":"yaml","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"mongodb":{"title":"MongoDB","owner":"airs0urce","require":"javascript"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"naniscript":{"title":"Naninovel Script","owner":"Elringus","alias":"nani"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nevod":{"title":"Nevod","owner":"nezaboodka"},"nginx":{"title":"nginx","owner":"volado"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"openqasm":{"title":"OpenQasm","alias":"qasm","owner":"RunDevelopment"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"psl":{"title":"PATROL Scripting Language","owner":"bertysentry"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":"markup-templating","owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"promql":{"title":"PromQL","owner":"arendjr"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"purebasic":{"title":"PureBasic","require":"clike","alias":"pbfasm","owner":"HeX0R101"},"purescript":{"title":"PureScript","require":"haskell","alias":"purs","owner":"sriharshachilakapati"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"qsharp":{"title":"Q#","require":"clike","alias":"qs","owner":"fedonman"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"racket":{"title":"Racket","require":"scheme","alias":"rkt","owner":"RunDevelopment"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","owner":"RunDevelopment"},"rego":{"title":"Rego","owner":"JordanSh"},"renpy":{"title":"Ren'py","alias":"rpy","owner":"HyuchiaDiego"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","optional":"css-extras","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","alias":["sh-session","shellsession"],"owner":"RunDevelopment"},"smali":{"title":"Smali","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sml":{"title":"SML","alias":"smlnj","aliasTitles":{"smlnj":"SML/NJ"},"owner":"RunDevelopment"},"solidity":{"title":"Solidity (Ethereum)","alias":"sol","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"squirrel":{"title":"Squirrel","require":"clike","owner":"RunDevelopment"},"stan":{"title":"Stan","owner":"RunDevelopment"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","owner":"chrischares"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","vbnet"],"owner":"RunDevelopment"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"typoscript":{"title":"TypoScript","alias":"tsconfig","aliasTitles":{"tsconfig":"TSConfig"},"owner":"dkern"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"uri":{"title":"URI","alias":"url","aliasTitles":{"url":"URL"},"owner":"RunDevelopment"},"v":{"title":"V","require":"clike","owner":"taggon"},"vala":{"title":"Vala","require":"clike","optional":"regex","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":["vb","vba"],"aliasTitles":{"vba":"VBA"},"owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"wolfram":{"title":"Wolfram language","alias":["mathematica","nb","wl"],"aliasTitles":{"mathematica":"Mathematica","nb":"Mathematica Notebook"},"owner":"msollami"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xml-doc":{"title":"XML doc (.net)","require":"markup","modify":["csharp","fsharp","vbnet"],"owner":"RunDevelopment"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"yang":{"title":"YANG","owner":"RunDevelopment"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword for fine-grained highlighting.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}};
            +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml","ssml","atom","rss"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","ssml":"SSML","atom":"Atom","rss":"RSS"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","optional":"regex","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"ABNF","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"agda":{"title":"Agda","owner":"xy-ren"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apex":{"title":"Apex","require":["clike","sql"],"owner":"RunDevelopment"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"dkern"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"avro-idl":{"title":"Avro IDL","alias":"avdl","owner":"RunDevelopment"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"bicep":{"title":"Bicep","owner":"johnnyreilly"},"birb":{"title":"Birb","require":"clike","owner":"Calamity210"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"BNF","alias":"rbnf","aliasTitles":{"rbnf":"RBNF"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"bsl":{"title":"BSL (1C:Enterprise)","alias":"oscript","aliasTitles":{"oscript":"OneScript"},"owner":"Diversus23"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cfscript":{"title":"CFScript","require":"clike","alias":"cfc","owner":"mjclemente"},"chaiscript":{"title":"ChaiScript","require":["clike","cpp"],"owner":"RunDevelopment"},"cil":{"title":"CIL","owner":"sbrl"},"clojure":{"title":"Clojure","owner":"troglotit"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"cobol":{"title":"COBOL","owner":"RunDevelopment"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"coq":{"title":"Coq","owner":"RunDevelopment"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"csv":{"title":"CSV","owner":"RunDevelopment"},"cypher":{"title":"Cypher","owner":"RunDevelopment"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dataweave":{"title":"DataWeave","owner":"machaval"},"dax":{"title":"DAX","owner":"peterbud"},"dhall":{"title":"Dhall","owner":"RunDevelopment"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"dot":{"title":"DOT (Graphviz)","alias":"gv","optional":"markup","owner":"RunDevelopment"},"ebnf":{"title":"EBNF","owner":"RunDevelopment"},"editorconfig":{"title":"EditorConfig","owner":"osipxd"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"false":{"title":"False","owner":"edukisto"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"c","owner":"Golmote"},"gn":{"title":"GN","alias":"gni","owner":"RunDevelopment"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","optional":"markdown","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","alias":"hbs","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"hlsl":{"title":"HLSL","require":"c","owner":"RunDevelopment"},"hoon":{"title":"Hoon","owner":"matildepark"},"http":{"title":"HTTP","optional":["css","javascript","json","markup","uri"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"icu-message-format":{"title":"ICU Message Format","owner":"RunDevelopment"},"idris":{"title":"Idris","alias":"idr","owner":"KeenS","require":"haskell"},"ignore":{"title":".ignore","owner":"osipxd","alias":["gitignore","hgignore","npmignore"],"aliasTitles":{"gitignore":".gitignore","hgignore":".hgignore","npmignore":".npmignore"}},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jexl":{"title":"Jexl","owner":"czosel"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike","typescript"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","alias":"webmanifest","aliasTitles":{"webmanifest":"Web App Manifest"},"owner":"CupOfTea696"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"jsstacktrace":{"title":"JS stack trace","owner":"sbrl"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup","sql"],"owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","alias":["kt","kts"],"aliasTitles":{"kts":"Kotlin Script"},"require":"clike","owner":"Golmote"},"kumir":{"title":"KuMir (КуМир)","alias":"kum","owner":"edukisto"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","require":"markup-templating","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"log":{"title":"Log file","optional":"javastacktrace","owner":"RunDevelopment"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","optional":"yaml","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"mongodb":{"title":"MongoDB","owner":"airs0urce","require":"javascript"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"naniscript":{"title":"Naninovel Script","owner":"Elringus","alias":"nani"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nevod":{"title":"Nevod","owner":"nezaboodka"},"nginx":{"title":"nginx","owner":"volado"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"openqasm":{"title":"OpenQasm","alias":"qasm","owner":"RunDevelopment"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"psl":{"title":"PATROL Scripting Language","owner":"bertysentry"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":"markup-templating","owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"promql":{"title":"PromQL","owner":"arendjr"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"purebasic":{"title":"PureBasic","require":"clike","alias":"pbfasm","owner":"HeX0R101"},"purescript":{"title":"PureScript","require":"haskell","alias":"purs","owner":"sriharshachilakapati"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"qsharp":{"title":"Q#","require":"clike","alias":"qs","owner":"fedonman"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"racket":{"title":"Racket","require":"scheme","alias":"rkt","owner":"RunDevelopment"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","owner":"RunDevelopment"},"rego":{"title":"Rego","owner":"JordanSh"},"renpy":{"title":"Ren'py","alias":"rpy","owner":"HyuchiaDiego"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","optional":"css-extras","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","alias":["sh-session","shellsession"],"owner":"RunDevelopment"},"smali":{"title":"Smali","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sml":{"title":"SML","alias":"smlnj","aliasTitles":{"smlnj":"SML/NJ"},"owner":"RunDevelopment"},"solidity":{"title":"Solidity (Ethereum)","alias":"sol","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"squirrel":{"title":"Squirrel","require":"clike","owner":"RunDevelopment"},"stan":{"title":"Stan","owner":"RunDevelopment"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","owner":"chrischares"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","vbnet"],"owner":"RunDevelopment"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"typoscript":{"title":"TypoScript","alias":"tsconfig","aliasTitles":{"tsconfig":"TSConfig"},"owner":"dkern"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"uri":{"title":"URI","alias":"url","aliasTitles":{"url":"URL"},"owner":"RunDevelopment"},"v":{"title":"V","require":"clike","owner":"taggon"},"vala":{"title":"Vala","require":"clike","optional":"regex","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":["vb","vba"],"aliasTitles":{"vba":"VBA"},"owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"wolfram":{"title":"Wolfram language","alias":["mathematica","nb","wl"],"aliasTitles":{"mathematica":"Mathematica","nb":"Mathematica Notebook"},"owner":"msollami"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xml-doc":{"title":"XML doc (.net)","require":"markup","modify":["csharp","fsharp","vbnet"],"owner":"RunDevelopment"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"yang":{"title":"YANG","owner":"RunDevelopment"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword for fine-grained highlighting.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}};
             if (typeof module !== 'undefined' && module.exports) { module.exports = components; }
            \ No newline at end of file
            diff --git a/components.json b/components.json
            index 12f88243a9..bcfe6f62ce 100644
            --- a/components.json
            +++ b/components.json
            @@ -160,6 +160,11 @@
             			"title": "AutoIt",
             			"owner": "Golmote"
             		},
            +		"avro-idl": {
            +			"title":"Avro IDL",
            +			"alias": "avdl",
            +			"owner": "RunDevelopment"
            +		},
             		"bash": {
             			"title": "Bash",
             			"alias": "shell",
            diff --git a/components/prism-avro-idl.js b/components/prism-avro-idl.js
            new file mode 100644
            index 0000000000..107192e06e
            --- /dev/null
            +++ b/components/prism-avro-idl.js
            @@ -0,0 +1,57 @@
            +// GitHub: https://github.com/apache/avro
            +// Docs: https://avro.apache.org/docs/current/idl.html
            +
            +Prism.languages['avro-idl'] = {
            +	'comment': {
            +		pattern: /\/\/.*|\/\*[\s\S]*?\*\//,
            +		greedy: true
            +	},
            +	'string': [
            +		{
            +			pattern: /(^|[^\\])"(?:[^\r\n"\\]|\\.)*"/,
            +			lookbehind: true,
            +			greedy: true
            +		},
            +		{
            +			pattern: /(^|[^\\])'(?:[^\r\n'\\]|\\(?:[\s\S]|\d{1,3}))'/,
            +			lookbehind: true,
            +			greedy: true
            +		}
            +	],
            +
            +	'annotation': {
            +		pattern: /@(?:[$\w.-]|`[^\r\n`]+`)+/,
            +		greedy: true,
            +		alias: 'function'
            +	},
            +	'function-identifier': {
            +		pattern: /`[^\r\n`]+`(?=\s*\()/,
            +		greedy: true,
            +		alias: 'function'
            +	},
            +	'identifier': {
            +		pattern: /`[^\r\n`]+`/,
            +		greedy: true
            +	},
            +
            +	'class-name': {
            +		pattern: /(\b(?:enum|error|protocol|record|throws)\b\s+)[$\w]+/,
            +		lookbehind: true,
            +		greedy: true
            +	},
            +	'keyword': /\b(?:array|boolean|bytes|date|decimal|double|enum|error|false|fixed|float|idl|import|int|local_timestamp_ms|long|map|null|oneway|protocol|record|schema|string|throws|time_ms|timestamp_ms|true|union|uuid|void)\b/,
            +	'function': /\b[a-z_]\w*(?=\s*\()/i,
            +
            +	'number': [
            +		{
            +			pattern: /(^|[^\w.])-?(?:(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|0x(?:[a-f0-9]+(?:\.[a-f0-9]*)?|\.[a-f0-9]+)(?:p[+-]?\d+)?)[dfl]?(?![\w.])/i,
            +			lookbehind: true
            +		},
            +		/-?\b(?:NaN|Infinity)\b/
            +	],
            +
            +	'operator': /=/,
            +	'punctuation': /[()\[\]{}<>.:,;-]/
            +};
            +
            +Prism.languages.avdl = Prism.languages['avro-idl'];
            diff --git a/components/prism-avro-idl.min.js b/components/prism-avro-idl.min.js
            new file mode 100644
            index 0000000000..c3fac63428
            --- /dev/null
            +++ b/components/prism-avro-idl.min.js
            @@ -0,0 +1 @@
            +Prism.languages["avro-idl"]={comment:{pattern:/\/\/.*|\/\*[\s\S]*?\*\//,greedy:!0},string:[{pattern:/(^|[^\\])"(?:[^\r\n"\\]|\\.)*"/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\])'(?:[^\r\n'\\]|\\(?:[\s\S]|\d{1,3}))'/,lookbehind:!0,greedy:!0}],annotation:{pattern:/@(?:[$\w.-]|`[^\r\n`]+`)+/,greedy:!0,alias:"function"},"function-identifier":{pattern:/`[^\r\n`]+`(?=\s*\()/,greedy:!0,alias:"function"},identifier:{pattern:/`[^\r\n`]+`/,greedy:!0},"class-name":{pattern:/(\b(?:enum|error|protocol|record|throws)\b\s+)[$\w]+/,lookbehind:!0,greedy:!0},keyword:/\b(?:array|boolean|bytes|date|decimal|double|enum|error|false|fixed|float|idl|import|int|local_timestamp_ms|long|map|null|oneway|protocol|record|schema|string|throws|time_ms|timestamp_ms|true|union|uuid|void)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:[{pattern:/(^|[^\w.])-?(?:(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|0x(?:[a-f0-9]+(?:\.[a-f0-9]*)?|\.[a-f0-9]+)(?:p[+-]?\d+)?)[dfl]?(?![\w.])/i,lookbehind:!0},/-?\b(?:NaN|Infinity)\b/],operator:/=/,punctuation:/[()\[\]{}<>.:,;-]/},Prism.languages.avdl=Prism.languages["avro-idl"];
            \ No newline at end of file
            diff --git a/examples/prism-avro-idl.html b/examples/prism-avro-idl.html
            new file mode 100644
            index 0000000000..d6572b7130
            --- /dev/null
            +++ b/examples/prism-avro-idl.html
            @@ -0,0 +1,44 @@
            +

            Full example

            +
            // Source: https://avro.apache.org/docs/current/idl.html#example
            +
            +/**
            + * An example protocol in Avro IDL
            + */
            +@namespace("org.apache.avro.test")
            +protocol Simple {
            +
            +	@aliases(["org.foo.KindOf"])
            +	enum Kind {
            +		FOO,
            +		BAR, // the bar enum value
            +		BAZ
            +	}
            +
            +	fixed MD5(16);
            +
            +	record TestRecord {
            +		@order("ignore")
            +		string name;
            +
            +		@order("descending")
            +		Kind kind;
            +
            +		MD5 hash;
            +
            +		union { MD5, null} @aliases(["hash"]) nullableHash;
            +
            +		array<long> arrayOfLongs;
            +	}
            +
            +	error TestError {
            +		string message;
            +	}
            +
            +	string hello(string greeting);
            +	TestRecord echo(TestRecord `record`);
            +	int add(int arg1, int arg2);
            +	bytes echoBytes(bytes data);
            +	void `error`() throws TestError;
            +	void ping() oneway;
            +}
            +
            diff --git a/plugins/autoloader/prism-autoloader.js b/plugins/autoloader/prism-autoloader.js index 3f5e61e05e..ddefe74218 100644 --- a/plugins/autoloader/prism-autoloader.js +++ b/plugins/autoloader/prism-autoloader.js @@ -172,6 +172,7 @@ "js": "javascript", "g4": "antlr4", "adoc": "asciidoc", + "avdl": "avro-idl", "shell": "bash", "shortcode": "bbcode", "rbnf": "bnf", diff --git a/plugins/autoloader/prism-autoloader.min.js b/plugins/autoloader/prism-autoloader.min.js index a04b6d1bda..d5ca7c04dd 100644 --- a/plugins/autoloader/prism-autoloader.min.js +++ b/plugins/autoloader/prism-autoloader.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof Prism&&"undefined"!=typeof document){var l={javascript:"clike",actionscript:"javascript",apex:["clike","sql"],arduino:"cpp",aspnet:["markup","csharp"],birb:"clike",bison:"c",c:"clike",csharp:"clike",cpp:"c",cfscript:"clike",chaiscript:["clike","cpp"],coffeescript:"javascript",crystal:"ruby","css-extras":"css",d:"clike",dart:"clike",django:"markup-templating",ejs:["javascript","markup-templating"],etlua:["lua","markup-templating"],erb:["ruby","markup-templating"],fsharp:"clike","firestore-security-rules":"clike",flow:"javascript",ftl:"markup-templating",gml:"clike",glsl:"c",go:"clike",groovy:"clike",haml:"ruby",handlebars:"markup-templating",haxe:"clike",hlsl:"c",idris:"haskell",java:"clike",javadoc:["markup","java","javadoclike"],jolie:"clike",jsdoc:["javascript","javadoclike","typescript"],"js-extras":"javascript",json5:"json",jsonp:"json","js-templates":"javascript",kotlin:"clike",latte:["clike","markup-templating","php"],less:"css",lilypond:"scheme",liquid:"markup-templating",markdown:"markup","markup-templating":"markup",mongodb:"javascript",n4js:"javascript",objectivec:"c",opencl:"c",parser:"markup",php:"markup-templating",phpdoc:["php","javadoclike"],"php-extras":"php",plsql:"sql",processing:"clike",protobuf:"clike",pug:["markup","javascript"],purebasic:"clike",purescript:"haskell",qsharp:"clike",qml:"javascript",qore:"clike",racket:"scheme",jsx:["markup","javascript"],tsx:["jsx","typescript"],reason:"clike",ruby:"clike",sass:"css",scss:"css",scala:"java","shell-session":"bash",smarty:"markup-templating",solidity:"clike",soy:"markup-templating",sparql:"turtle",sqf:"clike",squirrel:"clike","t4-cs":["t4-templating","csharp"],"t4-vb":["t4-templating","vbnet"],tap:"yaml",tt2:["clike","markup-templating"],textile:"markup",twig:"markup",typescript:"javascript",v:"clike",vala:"clike",vbnet:"basic",velocity:"markup",wiki:"markup",xeora:"markup","xml-doc":"markup",xquery:"markup"},n={html:"markup",xml:"markup",svg:"markup",mathml:"markup",ssml:"markup",atom:"markup",rss:"markup",js:"javascript",g4:"antlr4",adoc:"asciidoc",shell:"bash",shortcode:"bbcode",rbnf:"bnf",oscript:"bsl",cs:"csharp",dotnet:"csharp",cfc:"cfscript",coffee:"coffeescript",conc:"concurnas",jinja2:"django","dns-zone":"dns-zone-file",dockerfile:"docker",gv:"dot",eta:"ejs",xlsx:"excel-formula",xls:"excel-formula",gamemakerlanguage:"gml",gni:"gn",hbs:"handlebars",hs:"haskell",idr:"idris",gitignore:"ignore",hgignore:"ignore",npmignore:"ignore",webmanifest:"json",kt:"kotlin",kts:"kotlin",kum:"kumir",tex:"latex",context:"latex",ly:"lilypond",emacs:"lisp",elisp:"lisp","emacs-lisp":"lisp",md:"markdown",moon:"moonscript",n4jsd:"n4js",nani:"naniscript",objc:"objectivec",qasm:"openqasm",objectpascal:"pascal",px:"pcaxis",pcode:"peoplecode",pq:"powerquery",mscript:"powerquery",pbfasm:"purebasic",purs:"purescript",py:"python",qs:"qsharp",rkt:"racket",rpy:"renpy",robot:"robotframework",rb:"ruby","sh-session":"shell-session",shellsession:"shell-session",smlnj:"sml",sol:"solidity",sln:"solution-file",rq:"sparql",t4:"t4-cs",trig:"turtle",ts:"typescript",tsconfig:"typoscript",uscript:"unrealscript",uc:"unrealscript",url:"uri",vb:"visual-basic",vba:"visual-basic",mathematica:"wolfram",nb:"wolfram",wl:"wolfram",xeoracube:"xeora",yml:"yaml"},p={},e="components/",a=Prism.util.currentScript();if(a){var r=/\bplugins\/autoloader\/prism-autoloader\.(?:min\.)?js(?:\?[^\r\n/]*)?$/i,s=/(^|\/)[\w-]+\.(?:min\.)?js(?:\?[^\r\n/]*)?$/i,i=a.getAttribute("data-autoloader-path");if(null!=i)e=i.trim().replace(/\/?$/,"/");else{var t=a.src;r.test(t)?e=t.replace(r,"components/"):s.test(t)&&(e=t.replace(s,"$1components/"))}}var o=Prism.plugins.autoloader={languages_path:e,use_minified:!0,loadLanguages:m};Prism.hooks.add("complete",function(e){var a=e.element,r=e.language;if(a&&r&&"none"!==r){var s=function(e){var a=(e.getAttribute("data-dependencies")||"").trim();if(!a){var r=e.parentElement;r&&"pre"===r.tagName.toLowerCase()&&(a=(r.getAttribute("data-dependencies")||"").trim())}return a?a.split(/\s*,\s*/g):[]}(a);/^diff-./i.test(r)?(s.push("diff"),s.push(r.substr("diff-".length))):s.push(r),s.every(u)||m(s,function(){Prism.highlightElement(a)})}})}function u(e){if(0<=e.indexOf("!"))return!1;if((e=n[e]||e)in Prism.languages)return!0;var a=p[e];return a&&!a.error&&!1===a.loading}function m(e,a,r){"string"==typeof e&&(e=[e]);var s=e.length,i=0,t=!1;function c(){t||++i===s&&a&&a(e)}0!==s?e.forEach(function(e){!function(a,r,s){var i=0<=a.indexOf("!");function e(){var e=p[a];e||(e=p[a]={callbacks:[]}),e.callbacks.push({success:r,error:s}),!i&&u(a)?k(a,"success"):!i&&e.error?k(a,"error"):!i&&e.loading||(e.loading=!0,e.error=!1,function(e,a,r){var s=document.createElement("script");s.src=e,s.async=!0,s.onload=function(){document.body.removeChild(s),a&&a()},s.onerror=function(){document.body.removeChild(s),r&&r()},document.body.appendChild(s)}(function(e){return o.languages_path+"prism-"+e+(o.use_minified?".min":"")+".js"}(a),function(){e.loading=!1,k(a,"success")},function(){e.loading=!1,e.error=!0,k(a,"error")}))}a=a.replace("!",""),a=n[a]||a;var t=l[a];t&&t.length?m(t,e,s):e()}(e,c,function(){t||(t=!0,r&&r(e))})}):a&&setTimeout(a,0)}function k(e,a){if(p[e]){for(var r=p[e].callbacks,s=0,i=r.length;s myStrings; + +@namespace("org.apache.avro.firstNamespace") + +union { MD5, null} @aliases(["hash"]) nullableHash; + +---------------------------------------------------- + +[ + ["keyword", "record"], + ["class-name", "MyRecord"], + ["punctuation", "{"], + + ["keyword", "string"], + ["annotation", "@order"], + ["punctuation", "("], + ["string", "\"ascending\""], + ["punctuation", ")"], + " myAscendingSortField", + ["punctuation", ";"], + + ["keyword", "string"], + ["annotation", "@order"], + ["punctuation", "("], + ["string", "\"descending\""], + ["punctuation", ")"], + " myDescendingField", + ["punctuation", ";"], + + ["keyword", "string"], + ["annotation", "@order"], + ["punctuation", "("], + ["string", "\"ignore\""], + ["punctuation", ")"], + " myIgnoredField", + ["punctuation", ";"], + + ["punctuation", "}"], + + ["annotation", "@java-class"], + ["punctuation", "("], + ["string", "\"java.util.ArrayList\""], + ["punctuation", ")"], + ["keyword", "array"], + ["punctuation", "<"], + ["keyword", "string"], + ["punctuation", ">"], + " myStrings", + ["punctuation", ";"], + + ["annotation", "@namespace"], + ["punctuation", "("], + ["string", "\"org.apache.avro.firstNamespace\""], + ["punctuation", ")"], + + ["keyword", "union"], + ["punctuation", "{"], + " MD5", + ["punctuation", ","], + ["keyword", "null"], + ["punctuation", "}"], + ["annotation", "@aliases"], + ["punctuation", "("], + ["punctuation", "["], + ["string", "\"hash\""], + ["punctuation", "]"], + ["punctuation", ")"], + " nullableHash", + ["punctuation", ";"] +] diff --git a/tests/languages/avro-idl/class-name_feature.test b/tests/languages/avro-idl/class-name_feature.test new file mode 100644 index 0000000000..4e4e549aa2 --- /dev/null +++ b/tests/languages/avro-idl/class-name_feature.test @@ -0,0 +1,52 @@ +protocol MyProto { + @namespace("org.apache.avro.someOtherNamespace") + record Foo {} + + record Bar {} + + enum Kind { + FOO, + BAR, // the bar enum value + BAZ + } + + error TestError { + string message; + } + +} + +---------------------------------------------------- + +[ + ["keyword", "protocol"], + ["class-name", "MyProto"], + ["punctuation", "{"], + + ["annotation", "@namespace"], + ["punctuation", "("], + ["string", "\"org.apache.avro.someOtherNamespace\""], + ["punctuation", ")"], + + ["keyword", "record"], + ["class-name", "Foo"], + ["punctuation", "{"], + ["punctuation", "}"], + + ["keyword", "record"], + ["class-name", "Bar"], + ["punctuation", "{"], + ["punctuation", "}"], + + ["keyword", "enum"], ["class-name", "Kind"], ["punctuation", "{"], + "\r\n FOO", ["punctuation", ","], + "\r\n BAR", ["punctuation", ","], ["comment", "// the bar enum value"], + "\r\n BAZ\r\n ", + ["punctuation", "}"], + + ["keyword", "error"], ["class-name", "TestError"], ["punctuation", "{"], + ["keyword", "string"], " message", ["punctuation", ";"], + ["punctuation", "}"], + + ["punctuation", "}"] +] diff --git a/tests/languages/avro-idl/comment_feature.test b/tests/languages/avro-idl/comment_feature.test new file mode 100644 index 0000000000..8a6e067fbe --- /dev/null +++ b/tests/languages/avro-idl/comment_feature.test @@ -0,0 +1,15 @@ +/* comment */ +/* + comment + */ + +// comment + +---------------------------------------------------- + +[ + ["comment", "/* comment */"], + ["comment", "/*\r\n comment\r\n */"], + + ["comment", "// comment"] +] diff --git a/tests/languages/avro-idl/function_feature.test b/tests/languages/avro-idl/function_feature.test new file mode 100644 index 0000000000..3f1dae07dd --- /dev/null +++ b/tests/languages/avro-idl/function_feature.test @@ -0,0 +1,57 @@ +int add(int foo, int bar = 0); + +void logMessage(string message); + +void goKaboom() throws Kaboom; + +void fireAndForget(string message) oneway; + +void `error`(); + +---------------------------------------------------- + +[ + ["keyword", "int"], + ["function", "add"], + ["punctuation", "("], + ["keyword", "int"], + " foo", + ["punctuation", ","], + ["keyword", "int"], + " bar ", + ["operator", "="], + ["number", "0"], + ["punctuation", ")"], + ["punctuation", ";"], + + ["keyword", "void"], + ["function", "logMessage"], + ["punctuation", "("], + ["keyword", "string"], + " message", + ["punctuation", ")"], + ["punctuation", ";"], + + ["keyword", "void"], + ["function", "goKaboom"], + ["punctuation", "("], + ["punctuation", ")"], + ["keyword", "throws"], + ["class-name", "Kaboom"], + ["punctuation", ";"], + + ["keyword", "void"], + ["function", "fireAndForget"], + ["punctuation", "("], + ["keyword", "string"], + " message", + ["punctuation", ")"], + ["keyword", "oneway"], + ["punctuation", ";"], + + ["keyword", "void"], + ["function-identifier", "`error`"], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", ";"] +] diff --git a/tests/languages/avro-idl/keyword_feature.test b/tests/languages/avro-idl/keyword_feature.test new file mode 100644 index 0000000000..e1ede9c750 --- /dev/null +++ b/tests/languages/avro-idl/keyword_feature.test @@ -0,0 +1,65 @@ +array; +boolean; +bytes; +date; +decimal; +double; +enum; +error; +false; +fixed; +float; +idl; +import; +int; +local_timestamp_ms; +long; +map; +null; +oneway; +protocol; +record; +schema; +string; +throws; +time_ms; +timestamp_ms; +true; +union; +uuid; +void; + +---------------------------------------------------- + +[ + ["keyword", "array"], ["punctuation", ";"], + ["keyword", "boolean"], ["punctuation", ";"], + ["keyword", "bytes"], ["punctuation", ";"], + ["keyword", "date"], ["punctuation", ";"], + ["keyword", "decimal"], ["punctuation", ";"], + ["keyword", "double"], ["punctuation", ";"], + ["keyword", "enum"], ["punctuation", ";"], + ["keyword", "error"], ["punctuation", ";"], + ["keyword", "false"], ["punctuation", ";"], + ["keyword", "fixed"], ["punctuation", ";"], + ["keyword", "float"], ["punctuation", ";"], + ["keyword", "idl"], ["punctuation", ";"], + ["keyword", "import"], ["punctuation", ";"], + ["keyword", "int"], ["punctuation", ";"], + ["keyword", "local_timestamp_ms"], ["punctuation", ";"], + ["keyword", "long"], ["punctuation", ";"], + ["keyword", "map"], ["punctuation", ";"], + ["keyword", "null"], ["punctuation", ";"], + ["keyword", "oneway"], ["punctuation", ";"], + ["keyword", "protocol"], ["punctuation", ";"], + ["keyword", "record"], ["punctuation", ";"], + ["keyword", "schema"], ["punctuation", ";"], + ["keyword", "string"], ["punctuation", ";"], + ["keyword", "throws"], ["punctuation", ";"], + ["keyword", "time_ms"], ["punctuation", ";"], + ["keyword", "timestamp_ms"], ["punctuation", ";"], + ["keyword", "true"], ["punctuation", ";"], + ["keyword", "union"], ["punctuation", ";"], + ["keyword", "uuid"], ["punctuation", ";"], + ["keyword", "void"], ["punctuation", ";"] +] diff --git a/tests/languages/avro-idl/number_feature.test b/tests/languages/avro-idl/number_feature.test new file mode 100644 index 0000000000..87869c9b4d --- /dev/null +++ b/tests/languages/avro-idl/number_feature.test @@ -0,0 +1,43 @@ +0 +123 +0xFFF +-0 +-123 +-0xFF +12343324234L +0xFFFFFFFFFl + +0.342e4 +0.342e-4f +0.342e-4d +.324 +123. +0x.2Fp+323f +0x234.p+323d + +NaN +Infinity + +---------------------------------------------------- + +[ + ["number", "0"], + ["number", "123"], + ["number", "0xFFF"], + ["number", "-0"], + ["number", "-123"], + ["number", "-0xFF"], + ["number", "12343324234L"], + ["number", "0xFFFFFFFFFl"], + + ["number", "0.342e4"], + ["number", "0.342e-4f"], + ["number", "0.342e-4d"], + ["number", ".324"], + ["number", "123."], + ["number", "0x.2Fp+323f"], + ["number", "0x234.p+323d"], + + ["number", "NaN"], + ["number", "Infinity"] +] diff --git a/tests/languages/avro-idl/operator_feature.test b/tests/languages/avro-idl/operator_feature.test new file mode 100644 index 0000000000..27b9165afc --- /dev/null +++ b/tests/languages/avro-idl/operator_feature.test @@ -0,0 +1,7 @@ += + +---------------------------------------------------- + +[ + ["operator", "="] +] diff --git a/tests/languages/avro-idl/punctuation_feature.test b/tests/languages/avro-idl/punctuation_feature.test new file mode 100644 index 0000000000..f73a56287d --- /dev/null +++ b/tests/languages/avro-idl/punctuation_feature.test @@ -0,0 +1,20 @@ +( ) [ ] { } < > +. : , ; + +---------------------------------------------------- + +[ + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", "["], + ["punctuation", "]"], + ["punctuation", "{"], + ["punctuation", "}"], + ["punctuation", "<"], + ["punctuation", ">"], + + ["punctuation", "."], + ["punctuation", ":"], + ["punctuation", ","], + ["punctuation", ";"] +] diff --git a/tests/languages/avro-idl/string_feature.test b/tests/languages/avro-idl/string_feature.test new file mode 100644 index 0000000000..1811a33dd5 --- /dev/null +++ b/tests/languages/avro-idl/string_feature.test @@ -0,0 +1,21 @@ +"" +"foo" +"\"" +"\n\n" + +'f' +'\n' +'\34' + +---------------------------------------------------- + +[ + ["string", "\"\""], + ["string", "\"foo\""], + ["string", "\"\\\"\""], + ["string", "\"\\n\\n\""], + + ["string", "'f'"], + ["string", "'\\n'"], + ["string", "'\\34'"] +] From 8df825e061b6efd3157cab6de5711a78a159ed36 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Mon, 6 Sep 2021 20:20:57 +0200 Subject: [PATCH 0891/1100] Added support for Systemd configuration files (#3053) --- components.js | 2 +- components.json | 4 + components/prism-systemd.js | 74 +++++++++++++++++++ components/prism-systemd.min.js | 1 + examples/prism-systemd.html | 20 +++++ plugins/show-language/prism-show-language.js | 1 + .../show-language/prism-show-language.min.js | 2 +- tests/languages/systemd/boolean_feature.test | 46 ++++++++++++ tests/languages/systemd/comment_feature.test | 9 +++ tests/languages/systemd/key_feature.test | 9 +++ tests/languages/systemd/section_feature.test | 11 +++ tests/languages/systemd/value_feature.test | 49 ++++++++++++ 12 files changed, 226 insertions(+), 2 deletions(-) create mode 100644 components/prism-systemd.js create mode 100644 components/prism-systemd.min.js create mode 100644 examples/prism-systemd.html create mode 100644 tests/languages/systemd/boolean_feature.test create mode 100644 tests/languages/systemd/comment_feature.test create mode 100644 tests/languages/systemd/key_feature.test create mode 100644 tests/languages/systemd/section_feature.test create mode 100644 tests/languages/systemd/value_feature.test diff --git a/components.js b/components.js index 8961f000c7..239bc3d674 100644 --- a/components.js +++ b/components.js @@ -1,2 +1,2 @@ -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml","ssml","atom","rss"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","ssml":"SSML","atom":"Atom","rss":"RSS"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","optional":"regex","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"ABNF","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"agda":{"title":"Agda","owner":"xy-ren"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apex":{"title":"Apex","require":["clike","sql"],"owner":"RunDevelopment"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"dkern"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"avro-idl":{"title":"Avro IDL","alias":"avdl","owner":"RunDevelopment"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"bicep":{"title":"Bicep","owner":"johnnyreilly"},"birb":{"title":"Birb","require":"clike","owner":"Calamity210"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"BNF","alias":"rbnf","aliasTitles":{"rbnf":"RBNF"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"bsl":{"title":"BSL (1C:Enterprise)","alias":"oscript","aliasTitles":{"oscript":"OneScript"},"owner":"Diversus23"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cfscript":{"title":"CFScript","require":"clike","alias":"cfc","owner":"mjclemente"},"chaiscript":{"title":"ChaiScript","require":["clike","cpp"],"owner":"RunDevelopment"},"cil":{"title":"CIL","owner":"sbrl"},"clojure":{"title":"Clojure","owner":"troglotit"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"cobol":{"title":"COBOL","owner":"RunDevelopment"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"coq":{"title":"Coq","owner":"RunDevelopment"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"csv":{"title":"CSV","owner":"RunDevelopment"},"cypher":{"title":"Cypher","owner":"RunDevelopment"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dataweave":{"title":"DataWeave","owner":"machaval"},"dax":{"title":"DAX","owner":"peterbud"},"dhall":{"title":"Dhall","owner":"RunDevelopment"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"dot":{"title":"DOT (Graphviz)","alias":"gv","optional":"markup","owner":"RunDevelopment"},"ebnf":{"title":"EBNF","owner":"RunDevelopment"},"editorconfig":{"title":"EditorConfig","owner":"osipxd"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"false":{"title":"False","owner":"edukisto"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"c","owner":"Golmote"},"gn":{"title":"GN","alias":"gni","owner":"RunDevelopment"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","optional":"markdown","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","alias":"hbs","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"hlsl":{"title":"HLSL","require":"c","owner":"RunDevelopment"},"hoon":{"title":"Hoon","owner":"matildepark"},"http":{"title":"HTTP","optional":["css","javascript","json","markup","uri"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"icu-message-format":{"title":"ICU Message Format","owner":"RunDevelopment"},"idris":{"title":"Idris","alias":"idr","owner":"KeenS","require":"haskell"},"ignore":{"title":".ignore","owner":"osipxd","alias":["gitignore","hgignore","npmignore"],"aliasTitles":{"gitignore":".gitignore","hgignore":".hgignore","npmignore":".npmignore"}},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jexl":{"title":"Jexl","owner":"czosel"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike","typescript"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","alias":"webmanifest","aliasTitles":{"webmanifest":"Web App Manifest"},"owner":"CupOfTea696"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"jsstacktrace":{"title":"JS stack trace","owner":"sbrl"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup","sql"],"owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","alias":["kt","kts"],"aliasTitles":{"kts":"Kotlin Script"},"require":"clike","owner":"Golmote"},"kumir":{"title":"KuMir (КуМир)","alias":"kum","owner":"edukisto"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","require":"markup-templating","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"log":{"title":"Log file","optional":"javastacktrace","owner":"RunDevelopment"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","optional":"yaml","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"mongodb":{"title":"MongoDB","owner":"airs0urce","require":"javascript"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"naniscript":{"title":"Naninovel Script","owner":"Elringus","alias":"nani"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nevod":{"title":"Nevod","owner":"nezaboodka"},"nginx":{"title":"nginx","owner":"volado"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"openqasm":{"title":"OpenQasm","alias":"qasm","owner":"RunDevelopment"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"psl":{"title":"PATROL Scripting Language","owner":"bertysentry"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":"markup-templating","owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"promql":{"title":"PromQL","owner":"arendjr"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"purebasic":{"title":"PureBasic","require":"clike","alias":"pbfasm","owner":"HeX0R101"},"purescript":{"title":"PureScript","require":"haskell","alias":"purs","owner":"sriharshachilakapati"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"qsharp":{"title":"Q#","require":"clike","alias":"qs","owner":"fedonman"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"racket":{"title":"Racket","require":"scheme","alias":"rkt","owner":"RunDevelopment"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","owner":"RunDevelopment"},"rego":{"title":"Rego","owner":"JordanSh"},"renpy":{"title":"Ren'py","alias":"rpy","owner":"HyuchiaDiego"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","optional":"css-extras","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","alias":["sh-session","shellsession"],"owner":"RunDevelopment"},"smali":{"title":"Smali","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sml":{"title":"SML","alias":"smlnj","aliasTitles":{"smlnj":"SML/NJ"},"owner":"RunDevelopment"},"solidity":{"title":"Solidity (Ethereum)","alias":"sol","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"squirrel":{"title":"Squirrel","require":"clike","owner":"RunDevelopment"},"stan":{"title":"Stan","owner":"RunDevelopment"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","owner":"chrischares"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","vbnet"],"owner":"RunDevelopment"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"typoscript":{"title":"TypoScript","alias":"tsconfig","aliasTitles":{"tsconfig":"TSConfig"},"owner":"dkern"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"uri":{"title":"URI","alias":"url","aliasTitles":{"url":"URL"},"owner":"RunDevelopment"},"v":{"title":"V","require":"clike","owner":"taggon"},"vala":{"title":"Vala","require":"clike","optional":"regex","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":["vb","vba"],"aliasTitles":{"vba":"VBA"},"owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"wolfram":{"title":"Wolfram language","alias":["mathematica","nb","wl"],"aliasTitles":{"mathematica":"Mathematica","nb":"Mathematica Notebook"},"owner":"msollami"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xml-doc":{"title":"XML doc (.net)","require":"markup","modify":["csharp","fsharp","vbnet"],"owner":"RunDevelopment"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"yang":{"title":"YANG","owner":"RunDevelopment"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword for fine-grained highlighting.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml","ssml","atom","rss"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","ssml":"SSML","atom":"Atom","rss":"RSS"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","optional":"regex","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"ABNF","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"agda":{"title":"Agda","owner":"xy-ren"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apex":{"title":"Apex","require":["clike","sql"],"owner":"RunDevelopment"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"dkern"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"avro-idl":{"title":"Avro IDL","alias":"avdl","owner":"RunDevelopment"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"bicep":{"title":"Bicep","owner":"johnnyreilly"},"birb":{"title":"Birb","require":"clike","owner":"Calamity210"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"BNF","alias":"rbnf","aliasTitles":{"rbnf":"RBNF"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"bsl":{"title":"BSL (1C:Enterprise)","alias":"oscript","aliasTitles":{"oscript":"OneScript"},"owner":"Diversus23"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cfscript":{"title":"CFScript","require":"clike","alias":"cfc","owner":"mjclemente"},"chaiscript":{"title":"ChaiScript","require":["clike","cpp"],"owner":"RunDevelopment"},"cil":{"title":"CIL","owner":"sbrl"},"clojure":{"title":"Clojure","owner":"troglotit"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"cobol":{"title":"COBOL","owner":"RunDevelopment"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"coq":{"title":"Coq","owner":"RunDevelopment"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"csv":{"title":"CSV","owner":"RunDevelopment"},"cypher":{"title":"Cypher","owner":"RunDevelopment"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dataweave":{"title":"DataWeave","owner":"machaval"},"dax":{"title":"DAX","owner":"peterbud"},"dhall":{"title":"Dhall","owner":"RunDevelopment"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"dot":{"title":"DOT (Graphviz)","alias":"gv","optional":"markup","owner":"RunDevelopment"},"ebnf":{"title":"EBNF","owner":"RunDevelopment"},"editorconfig":{"title":"EditorConfig","owner":"osipxd"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"false":{"title":"False","owner":"edukisto"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"c","owner":"Golmote"},"gn":{"title":"GN","alias":"gni","owner":"RunDevelopment"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","optional":"markdown","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","alias":"hbs","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"hlsl":{"title":"HLSL","require":"c","owner":"RunDevelopment"},"hoon":{"title":"Hoon","owner":"matildepark"},"http":{"title":"HTTP","optional":["css","javascript","json","markup","uri"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"icu-message-format":{"title":"ICU Message Format","owner":"RunDevelopment"},"idris":{"title":"Idris","alias":"idr","owner":"KeenS","require":"haskell"},"ignore":{"title":".ignore","owner":"osipxd","alias":["gitignore","hgignore","npmignore"],"aliasTitles":{"gitignore":".gitignore","hgignore":".hgignore","npmignore":".npmignore"}},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jexl":{"title":"Jexl","owner":"czosel"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike","typescript"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","alias":"webmanifest","aliasTitles":{"webmanifest":"Web App Manifest"},"owner":"CupOfTea696"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"jsstacktrace":{"title":"JS stack trace","owner":"sbrl"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup","sql"],"owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","alias":["kt","kts"],"aliasTitles":{"kts":"Kotlin Script"},"require":"clike","owner":"Golmote"},"kumir":{"title":"KuMir (КуМир)","alias":"kum","owner":"edukisto"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","require":"markup-templating","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"log":{"title":"Log file","optional":"javastacktrace","owner":"RunDevelopment"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","optional":"yaml","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"mongodb":{"title":"MongoDB","owner":"airs0urce","require":"javascript"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"naniscript":{"title":"Naninovel Script","owner":"Elringus","alias":"nani"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nevod":{"title":"Nevod","owner":"nezaboodka"},"nginx":{"title":"nginx","owner":"volado"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"openqasm":{"title":"OpenQasm","alias":"qasm","owner":"RunDevelopment"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"psl":{"title":"PATROL Scripting Language","owner":"bertysentry"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":"markup-templating","owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"promql":{"title":"PromQL","owner":"arendjr"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"purebasic":{"title":"PureBasic","require":"clike","alias":"pbfasm","owner":"HeX0R101"},"purescript":{"title":"PureScript","require":"haskell","alias":"purs","owner":"sriharshachilakapati"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"qsharp":{"title":"Q#","require":"clike","alias":"qs","owner":"fedonman"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"racket":{"title":"Racket","require":"scheme","alias":"rkt","owner":"RunDevelopment"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","owner":"RunDevelopment"},"rego":{"title":"Rego","owner":"JordanSh"},"renpy":{"title":"Ren'py","alias":"rpy","owner":"HyuchiaDiego"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","optional":"css-extras","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","alias":["sh-session","shellsession"],"owner":"RunDevelopment"},"smali":{"title":"Smali","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sml":{"title":"SML","alias":"smlnj","aliasTitles":{"smlnj":"SML/NJ"},"owner":"RunDevelopment"},"solidity":{"title":"Solidity (Ethereum)","alias":"sol","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"squirrel":{"title":"Squirrel","require":"clike","owner":"RunDevelopment"},"stan":{"title":"Stan","owner":"RunDevelopment"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","owner":"chrischares"},"systemd":{"title":"Systemd configuration file","owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","vbnet"],"owner":"RunDevelopment"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"typoscript":{"title":"TypoScript","alias":"tsconfig","aliasTitles":{"tsconfig":"TSConfig"},"owner":"dkern"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"uri":{"title":"URI","alias":"url","aliasTitles":{"url":"URL"},"owner":"RunDevelopment"},"v":{"title":"V","require":"clike","owner":"taggon"},"vala":{"title":"Vala","require":"clike","optional":"regex","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":["vb","vba"],"aliasTitles":{"vba":"VBA"},"owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"wolfram":{"title":"Wolfram language","alias":["mathematica","nb","wl"],"aliasTitles":{"mathematica":"Mathematica","nb":"Mathematica Notebook"},"owner":"msollami"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xml-doc":{"title":"XML doc (.net)","require":"markup","modify":["csharp","fsharp","vbnet"],"owner":"RunDevelopment"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"yang":{"title":"YANG","owner":"RunDevelopment"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword for fine-grained highlighting.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; if (typeof module !== 'undefined' && module.exports) { module.exports = components; } \ No newline at end of file diff --git a/components.json b/components.json index bcfe6f62ce..2bc9c0e30e 100644 --- a/components.json +++ b/components.json @@ -1233,6 +1233,10 @@ "title": "Swift", "owner": "chrischares" }, + "systemd": { + "title": "Systemd configuration file", + "owner": "RunDevelopment" + }, "t4-templating": { "title": "T4 templating", "owner": "RunDevelopment" diff --git a/components/prism-systemd.js b/components/prism-systemd.js new file mode 100644 index 0000000000..1c48bfe7ed --- /dev/null +++ b/components/prism-systemd.js @@ -0,0 +1,74 @@ +// https://www.freedesktop.org/software/systemd/man/systemd.syntax.html + +(function (Prism) { + + var comment = { + pattern: /^[;#].*/m, + greedy: true + }; + + var quotesSource = /"(?:[^\r\n"\\]|\\(?:[^\r]|\r\n?))*"(?!\S)/.source; + + Prism.languages.systemd = { + 'comment': comment, + + 'section': { + pattern: /^\[[^\n\r\[\]]*\](?=[ \t]*$)/m, + greedy: true, + inside: { + 'punctuation': /^\[|\]$/, + 'section-name': { + pattern: /[\s\S]+/, + alias: 'selector' + }, + } + }, + + 'key': { + pattern: /^[^\s=]+(?=[ \t]*=)/m, + greedy: true, + alias: 'attr-name' + }, + 'value': { + // This pattern is quite complex because of two properties: + // 1) Quotes (strings) must be preceded by a space. Since we can't use lookbehinds, we have to "resolve" + // the lookbehind. You will see this in the main loop where spaces are handled separately. + // 2) Line continuations. + // After line continuations, empty lines and comments are ignored so we have to consume them. + pattern: RegExp( + /(=[ \t]*(?!\s))/.source + + // the value either starts with quotes or not + '(?:' + quotesSource + '|(?=[^"\r\n]))' + + // main loop + '(?:' + ( + /[^\s\\]/.source + + // handle spaces separately because of quotes + '|' + '[ \t]+(?:(?![ \t"])|' + quotesSource + ')' + + // line continuation + '|' + /\\[\r\n]+(?:[#;].*[\r\n]+)*(?![#;])/.source + ) + + ')*' + ), + lookbehind: true, + greedy: true, + alias: 'attr-value', + inside: { + 'comment': comment, + 'quoted': { + pattern: RegExp(/(^|\s)/.source + quotesSource), + lookbehind: true, + greedy: true, + }, + 'punctuation': /\\$/m, + + 'boolean': { + pattern: /^(?:false|no|off|on|true|yes)$/, + greedy: true + } + } + }, + + 'operator': /=/ + }; + +}(Prism)); diff --git a/components/prism-systemd.min.js b/components/prism-systemd.min.js new file mode 100644 index 0000000000..694cc4fbbc --- /dev/null +++ b/components/prism-systemd.min.js @@ -0,0 +1 @@ +!function(e){var t={pattern:/^[;#].*/m,greedy:!0},n='"(?:[^\r\n"\\\\]|\\\\(?:[^\r]|\r\n?))*"(?!\\S)';Prism.languages.systemd={comment:t,section:{pattern:/^\[[^\n\r\[\]]*\](?=[ \t]*$)/m,greedy:!0,inside:{punctuation:/^\[|\]$/,"section-name":{pattern:/[\s\S]+/,alias:"selector"}}},key:{pattern:/^[^\s=]+(?=[ \t]*=)/m,greedy:!0,alias:"attr-name"},value:{pattern:RegExp("(=[ \t]*(?!\\s))(?:"+n+'|(?=[^"\r\n]))(?:[^\\s\\\\]|[ \t]+(?:(?![ \t"])|'+n+")|\\\\[\r\n]+(?:[#;].*[\r\n]+)*(?![#;]))*"),lookbehind:!0,greedy:!0,alias:"attr-value",inside:{comment:t,quoted:{pattern:RegExp("(^|\\s)"+n),lookbehind:!0,greedy:!0},punctuation:/\\$/m,boolean:{pattern:/^(?:false|no|off|on|true|yes)$/,greedy:!0}}},operator:/=/}}(); \ No newline at end of file diff --git a/examples/prism-systemd.html b/examples/prism-systemd.html new file mode 100644 index 0000000000..082ff8b54d --- /dev/null +++ b/examples/prism-systemd.html @@ -0,0 +1,20 @@ +

            Full example

            +
            # Source: https://www.freedesktop.org/software/systemd/man/systemd.syntax.html
            +
            +[Section A]
            +KeyOne=value 1
            +KeyTwo=value 2
            +
            +# a comment
            +
            +[Section B]
            +Setting="something" "some thing" "…"
            +KeyTwo=value 2 \
            +       value 2 continued
            +
            +[Section C]
            +KeyThree=value 3\
            +# this line is ignored
            +; this line is ignored too
            +       value 3 continued
            +
            diff --git a/plugins/show-language/prism-show-language.js b/plugins/show-language/prism-show-language.js index 98f2c135ec..7d38145f4a 100644 --- a/plugins/show-language/prism-show-language.js +++ b/plugins/show-language/prism-show-language.js @@ -212,6 +212,7 @@ "sqf": "SQF: Status Quo Function (Arma 3)", "sql": "SQL", "iecst": "Structured Text (IEC 61131-3)", + "systemd": "Systemd configuration file", "t4-templating": "T4 templating", "t4-cs": "T4 Text Templates (C#)", "t4": "T4 Text Templates (C#)", diff --git a/plugins/show-language/prism-show-language.min.js b/plugins/show-language/prism-show-language.min.js index 1bf3df7bb9..58e4f48831 100644 --- a/plugins/show-language/prism-show-language.min.js +++ b/plugins/show-language/prism-show-language.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof Prism&&"undefined"!=typeof document)if(Prism.plugins.toolbar){var i={none:"Plain text",plain:"Plain text",plaintext:"Plain text",text:"Plain text",txt:"Plain text",html:"HTML",xml:"XML",svg:"SVG",mathml:"MathML",ssml:"SSML",rss:"RSS",css:"CSS",clike:"C-like",js:"JavaScript",abap:"ABAP",abnf:"ABNF",al:"AL",antlr4:"ANTLR4",g4:"ANTLR4",apacheconf:"Apache Configuration",apl:"APL",aql:"AQL",arff:"ARFF",asciidoc:"AsciiDoc",adoc:"AsciiDoc",aspnet:"ASP.NET (C#)",asm6502:"6502 Assembly",autohotkey:"AutoHotkey",autoit:"AutoIt","avro-idl":"Avro IDL",avdl:"Avro IDL",basic:"BASIC",bbcode:"BBcode",bnf:"BNF",rbnf:"RBNF",bsl:"BSL (1C:Enterprise)",oscript:"OneScript",csharp:"C#",cs:"C#",dotnet:"C#",cpp:"C++",cfscript:"CFScript",cfc:"CFScript",cil:"CIL",cmake:"CMake",cobol:"COBOL",coffee:"CoffeeScript",conc:"Concurnas",csp:"Content-Security-Policy","css-extras":"CSS Extras",csv:"CSV",dataweave:"DataWeave",dax:"DAX",django:"Django/Jinja2",jinja2:"Django/Jinja2","dns-zone-file":"DNS zone file","dns-zone":"DNS zone file",dockerfile:"Docker",dot:"DOT (Graphviz)",gv:"DOT (Graphviz)",ebnf:"EBNF",editorconfig:"EditorConfig",ejs:"EJS",etlua:"Embedded Lua templating",erb:"ERB","excel-formula":"Excel Formula",xlsx:"Excel Formula",xls:"Excel Formula",fsharp:"F#","firestore-security-rules":"Firestore security rules",ftl:"FreeMarker Template Language",gml:"GameMaker Language",gamemakerlanguage:"GameMaker Language",gcode:"G-code",gdscript:"GDScript",gedcom:"GEDCOM",glsl:"GLSL",gn:"GN",gni:"GN",graphql:"GraphQL",hbs:"Handlebars",hs:"Haskell",hcl:"HCL",hlsl:"HLSL",http:"HTTP",hpkp:"HTTP Public-Key-Pins",hsts:"HTTP Strict-Transport-Security",ichigojam:"IchigoJam","icu-message-format":"ICU Message Format",idr:"Idris",ignore:".ignore",gitignore:".gitignore",hgignore:".hgignore",npmignore:".npmignore",inform7:"Inform 7",javadoc:"JavaDoc",javadoclike:"JavaDoc-like",javastacktrace:"Java stack trace",jq:"JQ",jsdoc:"JSDoc","js-extras":"JS Extras",json:"JSON",webmanifest:"Web App Manifest",json5:"JSON5",jsonp:"JSONP",jsstacktrace:"JS stack trace","js-templates":"JS Templates",kts:"Kotlin Script",kt:"Kotlin",kumir:"KuMir (КуМир)",kum:"KuMir (КуМир)",latex:"LaTeX",tex:"TeX",context:"ConTeXt",lilypond:"LilyPond",ly:"LilyPond",emacs:"Lisp",elisp:"Lisp","emacs-lisp":"Lisp",llvm:"LLVM IR",log:"Log file",lolcode:"LOLCODE",md:"Markdown","markup-templating":"Markup templating",matlab:"MATLAB",mel:"MEL",mongodb:"MongoDB",moon:"MoonScript",n1ql:"N1QL",n4js:"N4JS",n4jsd:"N4JS","nand2tetris-hdl":"Nand To Tetris HDL",naniscript:"Naninovel Script",nani:"Naninovel Script",nasm:"NASM",neon:"NEON",nginx:"nginx",nsis:"NSIS",objectivec:"Objective-C",objc:"Objective-C",ocaml:"OCaml",opencl:"OpenCL",openqasm:"OpenQasm",qasm:"OpenQasm",parigp:"PARI/GP",objectpascal:"Object Pascal",psl:"PATROL Scripting Language",pcaxis:"PC-Axis",px:"PC-Axis",peoplecode:"PeopleCode",pcode:"PeopleCode",php:"PHP",phpdoc:"PHPDoc","php-extras":"PHP Extras",plsql:"PL/SQL",powerquery:"PowerQuery",pq:"PowerQuery",mscript:"PowerQuery",powershell:"PowerShell",promql:"PromQL",properties:".properties",protobuf:"Protocol Buffers",purebasic:"PureBasic",pbfasm:"PureBasic",purs:"PureScript",py:"Python",qsharp:"Q#",qs:"Q#",q:"Q (kdb+ database)",qml:"QML",rkt:"Racket",jsx:"React JSX",tsx:"React TSX",renpy:"Ren'py",rpy:"Ren'py",rest:"reST (reStructuredText)",robotframework:"Robot Framework",robot:"Robot Framework",rb:"Ruby",sas:"SAS",sass:"Sass (Sass)",scss:"Sass (Scss)","shell-session":"Shell session","sh-session":"Shell session",shellsession:"Shell session",sml:"SML",smlnj:"SML/NJ",solidity:"Solidity (Ethereum)",sol:"Solidity (Ethereum)","solution-file":"Solution file",sln:"Solution file",soy:"Soy (Closure Template)",sparql:"SPARQL",rq:"SPARQL","splunk-spl":"Splunk SPL",sqf:"SQF: Status Quo Function (Arma 3)",sql:"SQL",iecst:"Structured Text (IEC 61131-3)","t4-templating":"T4 templating","t4-cs":"T4 Text Templates (C#)",t4:"T4 Text Templates (C#)","t4-vb":"T4 Text Templates (VB)",tap:"TAP",tt2:"Template Toolkit 2",toml:"TOML",trig:"TriG",ts:"TypeScript",tsconfig:"TSConfig",uscript:"UnrealScript",uc:"UnrealScript",uri:"URI",url:"URL",vbnet:"VB.Net",vhdl:"VHDL",vim:"vim","visual-basic":"Visual Basic",vba:"VBA",vb:"Visual Basic",wasm:"WebAssembly",wiki:"Wiki markup",wolfram:"Wolfram language",nb:"Mathematica Notebook",wl:"Wolfram language",xeoracube:"XeoraCube","xml-doc":"XML doc (.net)",xojo:"Xojo (REALbasic)",xquery:"XQuery",yaml:"YAML",yml:"YAML",yang:"YANG"};Prism.plugins.toolbar.registerButton("show-language",function(e){var a=e.element.parentNode;if(a&&/pre/i.test(a.nodeName)){var t,s=a.getAttribute("data-language")||i[e.language]||((t=e.language)?(t.substring(0,1).toUpperCase()+t.substring(1)).replace(/s(?=cript)/,"S"):t);if(s){var o=document.createElement("span");return o.textContent=s,o}}})}else console.warn("Show Languages plugin loaded before Toolbar plugin.")}(); \ No newline at end of file +!function(){if("undefined"!=typeof Prism&&"undefined"!=typeof document)if(Prism.plugins.toolbar){var i={none:"Plain text",plain:"Plain text",plaintext:"Plain text",text:"Plain text",txt:"Plain text",html:"HTML",xml:"XML",svg:"SVG",mathml:"MathML",ssml:"SSML",rss:"RSS",css:"CSS",clike:"C-like",js:"JavaScript",abap:"ABAP",abnf:"ABNF",al:"AL",antlr4:"ANTLR4",g4:"ANTLR4",apacheconf:"Apache Configuration",apl:"APL",aql:"AQL",arff:"ARFF",asciidoc:"AsciiDoc",adoc:"AsciiDoc",aspnet:"ASP.NET (C#)",asm6502:"6502 Assembly",autohotkey:"AutoHotkey",autoit:"AutoIt","avro-idl":"Avro IDL",avdl:"Avro IDL",basic:"BASIC",bbcode:"BBcode",bnf:"BNF",rbnf:"RBNF",bsl:"BSL (1C:Enterprise)",oscript:"OneScript",csharp:"C#",cs:"C#",dotnet:"C#",cpp:"C++",cfscript:"CFScript",cfc:"CFScript",cil:"CIL",cmake:"CMake",cobol:"COBOL",coffee:"CoffeeScript",conc:"Concurnas",csp:"Content-Security-Policy","css-extras":"CSS Extras",csv:"CSV",dataweave:"DataWeave",dax:"DAX",django:"Django/Jinja2",jinja2:"Django/Jinja2","dns-zone-file":"DNS zone file","dns-zone":"DNS zone file",dockerfile:"Docker",dot:"DOT (Graphviz)",gv:"DOT (Graphviz)",ebnf:"EBNF",editorconfig:"EditorConfig",ejs:"EJS",etlua:"Embedded Lua templating",erb:"ERB","excel-formula":"Excel Formula",xlsx:"Excel Formula",xls:"Excel Formula",fsharp:"F#","firestore-security-rules":"Firestore security rules",ftl:"FreeMarker Template Language",gml:"GameMaker Language",gamemakerlanguage:"GameMaker Language",gcode:"G-code",gdscript:"GDScript",gedcom:"GEDCOM",glsl:"GLSL",gn:"GN",gni:"GN",graphql:"GraphQL",hbs:"Handlebars",hs:"Haskell",hcl:"HCL",hlsl:"HLSL",http:"HTTP",hpkp:"HTTP Public-Key-Pins",hsts:"HTTP Strict-Transport-Security",ichigojam:"IchigoJam","icu-message-format":"ICU Message Format",idr:"Idris",ignore:".ignore",gitignore:".gitignore",hgignore:".hgignore",npmignore:".npmignore",inform7:"Inform 7",javadoc:"JavaDoc",javadoclike:"JavaDoc-like",javastacktrace:"Java stack trace",jq:"JQ",jsdoc:"JSDoc","js-extras":"JS Extras",json:"JSON",webmanifest:"Web App Manifest",json5:"JSON5",jsonp:"JSONP",jsstacktrace:"JS stack trace","js-templates":"JS Templates",kts:"Kotlin Script",kt:"Kotlin",kumir:"KuMir (КуМир)",kum:"KuMir (КуМир)",latex:"LaTeX",tex:"TeX",context:"ConTeXt",lilypond:"LilyPond",ly:"LilyPond",emacs:"Lisp",elisp:"Lisp","emacs-lisp":"Lisp",llvm:"LLVM IR",log:"Log file",lolcode:"LOLCODE",md:"Markdown","markup-templating":"Markup templating",matlab:"MATLAB",mel:"MEL",mongodb:"MongoDB",moon:"MoonScript",n1ql:"N1QL",n4js:"N4JS",n4jsd:"N4JS","nand2tetris-hdl":"Nand To Tetris HDL",naniscript:"Naninovel Script",nani:"Naninovel Script",nasm:"NASM",neon:"NEON",nginx:"nginx",nsis:"NSIS",objectivec:"Objective-C",objc:"Objective-C",ocaml:"OCaml",opencl:"OpenCL",openqasm:"OpenQasm",qasm:"OpenQasm",parigp:"PARI/GP",objectpascal:"Object Pascal",psl:"PATROL Scripting Language",pcaxis:"PC-Axis",px:"PC-Axis",peoplecode:"PeopleCode",pcode:"PeopleCode",php:"PHP",phpdoc:"PHPDoc","php-extras":"PHP Extras",plsql:"PL/SQL",powerquery:"PowerQuery",pq:"PowerQuery",mscript:"PowerQuery",powershell:"PowerShell",promql:"PromQL",properties:".properties",protobuf:"Protocol Buffers",purebasic:"PureBasic",pbfasm:"PureBasic",purs:"PureScript",py:"Python",qsharp:"Q#",qs:"Q#",q:"Q (kdb+ database)",qml:"QML",rkt:"Racket",jsx:"React JSX",tsx:"React TSX",renpy:"Ren'py",rpy:"Ren'py",rest:"reST (reStructuredText)",robotframework:"Robot Framework",robot:"Robot Framework",rb:"Ruby",sas:"SAS",sass:"Sass (Sass)",scss:"Sass (Scss)","shell-session":"Shell session","sh-session":"Shell session",shellsession:"Shell session",sml:"SML",smlnj:"SML/NJ",solidity:"Solidity (Ethereum)",sol:"Solidity (Ethereum)","solution-file":"Solution file",sln:"Solution file",soy:"Soy (Closure Template)",sparql:"SPARQL",rq:"SPARQL","splunk-spl":"Splunk SPL",sqf:"SQF: Status Quo Function (Arma 3)",sql:"SQL",iecst:"Structured Text (IEC 61131-3)",systemd:"Systemd configuration file","t4-templating":"T4 templating","t4-cs":"T4 Text Templates (C#)",t4:"T4 Text Templates (C#)","t4-vb":"T4 Text Templates (VB)",tap:"TAP",tt2:"Template Toolkit 2",toml:"TOML",trig:"TriG",ts:"TypeScript",tsconfig:"TSConfig",uscript:"UnrealScript",uc:"UnrealScript",uri:"URI",url:"URL",vbnet:"VB.Net",vhdl:"VHDL",vim:"vim","visual-basic":"Visual Basic",vba:"VBA",vb:"Visual Basic",wasm:"WebAssembly",wiki:"Wiki markup",wolfram:"Wolfram language",nb:"Mathematica Notebook",wl:"Wolfram language",xeoracube:"XeoraCube","xml-doc":"XML doc (.net)",xojo:"Xojo (REALbasic)",xquery:"XQuery",yaml:"YAML",yml:"YAML",yang:"YANG"};Prism.plugins.toolbar.registerButton("show-language",function(e){var a=e.element.parentNode;if(a&&/pre/i.test(a.nodeName)){var t,s=a.getAttribute("data-language")||i[e.language]||((t=e.language)?(t.substring(0,1).toUpperCase()+t.substring(1)).replace(/s(?=cript)/,"S"):t);if(s){var o=document.createElement("span");return o.textContent=s,o}}})}else console.warn("Show Languages plugin loaded before Toolbar plugin.")}(); \ No newline at end of file diff --git a/tests/languages/systemd/boolean_feature.test b/tests/languages/systemd/boolean_feature.test new file mode 100644 index 0000000000..a260308560 --- /dev/null +++ b/tests/languages/systemd/boolean_feature.test @@ -0,0 +1,46 @@ +foo=on +foo=true +foo=yes +foo=off +foo=false +foo=no + +---------------------------------------------------- + +[ + ["key", "foo"], + ["operator", "="], + ["value", [ + ["boolean", "on"] + ]], + + ["key", "foo"], + ["operator", "="], + ["value", [ + ["boolean", "true"] + ]], + + ["key", "foo"], + ["operator", "="], + ["value", [ + ["boolean", "yes"] + ]], + + ["key", "foo"], + ["operator", "="], + ["value", [ + ["boolean", "off"] + ]], + + ["key", "foo"], + ["operator", "="], + ["value", [ + ["boolean", "false"] + ]], + + ["key", "foo"], + ["operator", "="], + ["value", [ + ["boolean", "no"] + ]] +] diff --git a/tests/languages/systemd/comment_feature.test b/tests/languages/systemd/comment_feature.test new file mode 100644 index 0000000000..d564a17ae1 --- /dev/null +++ b/tests/languages/systemd/comment_feature.test @@ -0,0 +1,9 @@ +# comment +; comment + +---------------------------------------------------- + +[ + ["comment", "# comment"], + ["comment", "; comment"] +] diff --git a/tests/languages/systemd/key_feature.test b/tests/languages/systemd/key_feature.test new file mode 100644 index 0000000000..cf3ffab4d6 --- /dev/null +++ b/tests/languages/systemd/key_feature.test @@ -0,0 +1,9 @@ +foo= +foo = + +---------------------------------------------------- + +[ + ["key", "foo"], ["operator", "="], + ["key", "foo"], ["operator", "="] +] diff --git a/tests/languages/systemd/section_feature.test b/tests/languages/systemd/section_feature.test new file mode 100644 index 0000000000..9c6a00b59b --- /dev/null +++ b/tests/languages/systemd/section_feature.test @@ -0,0 +1,11 @@ +[Section Foo] + +---------------------------------------------------- + +[ + ["section", [ + ["punctuation", "["], + ["section-name", "Section Foo"], + ["punctuation", "]"] + ]] +] diff --git a/tests/languages/systemd/value_feature.test b/tests/languages/systemd/value_feature.test new file mode 100644 index 0000000000..acdac052b1 --- /dev/null +++ b/tests/languages/systemd/value_feature.test @@ -0,0 +1,49 @@ +foo= value 2 + +foo="something" "some thing" "…" +foo= "something" "some thing" "…" +foo=value 2 \ + value 2 continued + +foo=value 3\ +# this line is ignored +; this line is ignored too + value 3 continued + +---------------------------------------------------- + +[ + ["key", "foo"], ["operator", "="], ["value", ["value 2"]], + + ["key", "foo"], + ["operator", "="], + ["value", [ + ["quoted", "\"something\""], + ["quoted", "\"some thing\""], + ["quoted", "\"…\""] + ]], + + ["key", "foo"], + ["operator", "="], + ["value", [ + ["quoted", "\"something\""], + ["quoted", "\"some thing\""], + ["quoted", "\"…\""] + ]], + + ["key", "foo"], + ["operator", "="], + ["value", [ + "value 2 ", ["punctuation", "\\"], + "\r\n value 2 continued" + ]], + + ["key", "foo"], + ["operator", "="], + ["value", [ + "value 3", ["punctuation", "\\"], + ["comment", "# this line is ignored"], + ["comment", "; this line is ignored too"], + "\r\n value 3 continued" + ]] +] From 148c1eca2f1a8d76b62c8f11569e959faec59772 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Mon, 6 Sep 2021 20:24:27 +0200 Subject: [PATCH 0892/1100] Added support for Mermaid (#3050) --- components.js | 2 +- components.json | 4 + components/prism-mermaid.js | 113 +++ components/prism-mermaid.min.js | 1 + examples/prism-mermaid.html | 25 + tests/languages/mermaid/arrow_feature.test | 125 +++ tests/languages/mermaid/comment_feature.test | 7 + .../languages/mermaid/full_classdiagram.test | 656 ++++++++++++ tests/languages/mermaid/full_erdiagram.test | 168 ++++ tests/languages/mermaid/full_flowchart.test | 930 ++++++++++++++++++ .../mermaid/full_sequencediagram.test | 389 ++++++++ .../languages/mermaid/full_statediagram.test | 430 ++++++++ .../mermaid/inter-arrow-label_feature.test | 62 ++ tests/languages/mermaid/operator_feature.test | 11 + 14 files changed, 2922 insertions(+), 1 deletion(-) create mode 100644 components/prism-mermaid.js create mode 100644 components/prism-mermaid.min.js create mode 100644 examples/prism-mermaid.html create mode 100644 tests/languages/mermaid/arrow_feature.test create mode 100644 tests/languages/mermaid/comment_feature.test create mode 100644 tests/languages/mermaid/full_classdiagram.test create mode 100644 tests/languages/mermaid/full_erdiagram.test create mode 100644 tests/languages/mermaid/full_flowchart.test create mode 100644 tests/languages/mermaid/full_sequencediagram.test create mode 100644 tests/languages/mermaid/full_statediagram.test create mode 100644 tests/languages/mermaid/inter-arrow-label_feature.test create mode 100644 tests/languages/mermaid/operator_feature.test diff --git a/components.js b/components.js index 239bc3d674..b56c91ce0a 100644 --- a/components.js +++ b/components.js @@ -1,2 +1,2 @@ -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml","ssml","atom","rss"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","ssml":"SSML","atom":"Atom","rss":"RSS"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","optional":"regex","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"ABNF","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"agda":{"title":"Agda","owner":"xy-ren"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apex":{"title":"Apex","require":["clike","sql"],"owner":"RunDevelopment"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"dkern"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"avro-idl":{"title":"Avro IDL","alias":"avdl","owner":"RunDevelopment"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"bicep":{"title":"Bicep","owner":"johnnyreilly"},"birb":{"title":"Birb","require":"clike","owner":"Calamity210"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"BNF","alias":"rbnf","aliasTitles":{"rbnf":"RBNF"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"bsl":{"title":"BSL (1C:Enterprise)","alias":"oscript","aliasTitles":{"oscript":"OneScript"},"owner":"Diversus23"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cfscript":{"title":"CFScript","require":"clike","alias":"cfc","owner":"mjclemente"},"chaiscript":{"title":"ChaiScript","require":["clike","cpp"],"owner":"RunDevelopment"},"cil":{"title":"CIL","owner":"sbrl"},"clojure":{"title":"Clojure","owner":"troglotit"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"cobol":{"title":"COBOL","owner":"RunDevelopment"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"coq":{"title":"Coq","owner":"RunDevelopment"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"csv":{"title":"CSV","owner":"RunDevelopment"},"cypher":{"title":"Cypher","owner":"RunDevelopment"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dataweave":{"title":"DataWeave","owner":"machaval"},"dax":{"title":"DAX","owner":"peterbud"},"dhall":{"title":"Dhall","owner":"RunDevelopment"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"dot":{"title":"DOT (Graphviz)","alias":"gv","optional":"markup","owner":"RunDevelopment"},"ebnf":{"title":"EBNF","owner":"RunDevelopment"},"editorconfig":{"title":"EditorConfig","owner":"osipxd"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"false":{"title":"False","owner":"edukisto"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"c","owner":"Golmote"},"gn":{"title":"GN","alias":"gni","owner":"RunDevelopment"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","optional":"markdown","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","alias":"hbs","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"hlsl":{"title":"HLSL","require":"c","owner":"RunDevelopment"},"hoon":{"title":"Hoon","owner":"matildepark"},"http":{"title":"HTTP","optional":["css","javascript","json","markup","uri"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"icu-message-format":{"title":"ICU Message Format","owner":"RunDevelopment"},"idris":{"title":"Idris","alias":"idr","owner":"KeenS","require":"haskell"},"ignore":{"title":".ignore","owner":"osipxd","alias":["gitignore","hgignore","npmignore"],"aliasTitles":{"gitignore":".gitignore","hgignore":".hgignore","npmignore":".npmignore"}},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jexl":{"title":"Jexl","owner":"czosel"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike","typescript"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","alias":"webmanifest","aliasTitles":{"webmanifest":"Web App Manifest"},"owner":"CupOfTea696"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"jsstacktrace":{"title":"JS stack trace","owner":"sbrl"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup","sql"],"owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","alias":["kt","kts"],"aliasTitles":{"kts":"Kotlin Script"},"require":"clike","owner":"Golmote"},"kumir":{"title":"KuMir (КуМир)","alias":"kum","owner":"edukisto"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","require":"markup-templating","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"log":{"title":"Log file","optional":"javastacktrace","owner":"RunDevelopment"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","optional":"yaml","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mizar":{"title":"Mizar","owner":"Golmote"},"mongodb":{"title":"MongoDB","owner":"airs0urce","require":"javascript"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"naniscript":{"title":"Naninovel Script","owner":"Elringus","alias":"nani"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nevod":{"title":"Nevod","owner":"nezaboodka"},"nginx":{"title":"nginx","owner":"volado"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"openqasm":{"title":"OpenQasm","alias":"qasm","owner":"RunDevelopment"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"psl":{"title":"PATROL Scripting Language","owner":"bertysentry"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":"markup-templating","owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"promql":{"title":"PromQL","owner":"arendjr"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"purebasic":{"title":"PureBasic","require":"clike","alias":"pbfasm","owner":"HeX0R101"},"purescript":{"title":"PureScript","require":"haskell","alias":"purs","owner":"sriharshachilakapati"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"qsharp":{"title":"Q#","require":"clike","alias":"qs","owner":"fedonman"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"racket":{"title":"Racket","require":"scheme","alias":"rkt","owner":"RunDevelopment"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","owner":"RunDevelopment"},"rego":{"title":"Rego","owner":"JordanSh"},"renpy":{"title":"Ren'py","alias":"rpy","owner":"HyuchiaDiego"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","optional":"css-extras","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","alias":["sh-session","shellsession"],"owner":"RunDevelopment"},"smali":{"title":"Smali","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sml":{"title":"SML","alias":"smlnj","aliasTitles":{"smlnj":"SML/NJ"},"owner":"RunDevelopment"},"solidity":{"title":"Solidity (Ethereum)","alias":"sol","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"squirrel":{"title":"Squirrel","require":"clike","owner":"RunDevelopment"},"stan":{"title":"Stan","owner":"RunDevelopment"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","owner":"chrischares"},"systemd":{"title":"Systemd configuration file","owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","vbnet"],"owner":"RunDevelopment"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"typoscript":{"title":"TypoScript","alias":"tsconfig","aliasTitles":{"tsconfig":"TSConfig"},"owner":"dkern"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"uri":{"title":"URI","alias":"url","aliasTitles":{"url":"URL"},"owner":"RunDevelopment"},"v":{"title":"V","require":"clike","owner":"taggon"},"vala":{"title":"Vala","require":"clike","optional":"regex","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":["vb","vba"],"aliasTitles":{"vba":"VBA"},"owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"wolfram":{"title":"Wolfram language","alias":["mathematica","nb","wl"],"aliasTitles":{"mathematica":"Mathematica","nb":"Mathematica Notebook"},"owner":"msollami"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xml-doc":{"title":"XML doc (.net)","require":"markup","modify":["csharp","fsharp","vbnet"],"owner":"RunDevelopment"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"yang":{"title":"YANG","owner":"RunDevelopment"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword for fine-grained highlighting.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml","ssml","atom","rss"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","ssml":"SSML","atom":"Atom","rss":"RSS"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","optional":"regex","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"ABNF","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"agda":{"title":"Agda","owner":"xy-ren"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apex":{"title":"Apex","require":["clike","sql"],"owner":"RunDevelopment"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"dkern"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"avro-idl":{"title":"Avro IDL","alias":"avdl","owner":"RunDevelopment"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"bicep":{"title":"Bicep","owner":"johnnyreilly"},"birb":{"title":"Birb","require":"clike","owner":"Calamity210"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"BNF","alias":"rbnf","aliasTitles":{"rbnf":"RBNF"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"bsl":{"title":"BSL (1C:Enterprise)","alias":"oscript","aliasTitles":{"oscript":"OneScript"},"owner":"Diversus23"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cfscript":{"title":"CFScript","require":"clike","alias":"cfc","owner":"mjclemente"},"chaiscript":{"title":"ChaiScript","require":["clike","cpp"],"owner":"RunDevelopment"},"cil":{"title":"CIL","owner":"sbrl"},"clojure":{"title":"Clojure","owner":"troglotit"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"cobol":{"title":"COBOL","owner":"RunDevelopment"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"coq":{"title":"Coq","owner":"RunDevelopment"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"csv":{"title":"CSV","owner":"RunDevelopment"},"cypher":{"title":"Cypher","owner":"RunDevelopment"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dataweave":{"title":"DataWeave","owner":"machaval"},"dax":{"title":"DAX","owner":"peterbud"},"dhall":{"title":"Dhall","owner":"RunDevelopment"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"dot":{"title":"DOT (Graphviz)","alias":"gv","optional":"markup","owner":"RunDevelopment"},"ebnf":{"title":"EBNF","owner":"RunDevelopment"},"editorconfig":{"title":"EditorConfig","owner":"osipxd"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"false":{"title":"False","owner":"edukisto"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"c","owner":"Golmote"},"gn":{"title":"GN","alias":"gni","owner":"RunDevelopment"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","optional":"markdown","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","alias":"hbs","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"hlsl":{"title":"HLSL","require":"c","owner":"RunDevelopment"},"hoon":{"title":"Hoon","owner":"matildepark"},"http":{"title":"HTTP","optional":["css","javascript","json","markup","uri"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"icu-message-format":{"title":"ICU Message Format","owner":"RunDevelopment"},"idris":{"title":"Idris","alias":"idr","owner":"KeenS","require":"haskell"},"ignore":{"title":".ignore","owner":"osipxd","alias":["gitignore","hgignore","npmignore"],"aliasTitles":{"gitignore":".gitignore","hgignore":".hgignore","npmignore":".npmignore"}},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jexl":{"title":"Jexl","owner":"czosel"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike","typescript"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","alias":"webmanifest","aliasTitles":{"webmanifest":"Web App Manifest"},"owner":"CupOfTea696"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"jsstacktrace":{"title":"JS stack trace","owner":"sbrl"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup","sql"],"owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","alias":["kt","kts"],"aliasTitles":{"kts":"Kotlin Script"},"require":"clike","owner":"Golmote"},"kumir":{"title":"KuMir (КуМир)","alias":"kum","owner":"edukisto"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","require":"markup-templating","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"log":{"title":"Log file","optional":"javastacktrace","owner":"RunDevelopment"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","optional":"yaml","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mermaid":{"title":"Mermaid","owner":"RunDevelopment"},"mizar":{"title":"Mizar","owner":"Golmote"},"mongodb":{"title":"MongoDB","owner":"airs0urce","require":"javascript"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"naniscript":{"title":"Naninovel Script","owner":"Elringus","alias":"nani"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nevod":{"title":"Nevod","owner":"nezaboodka"},"nginx":{"title":"nginx","owner":"volado"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"openqasm":{"title":"OpenQasm","alias":"qasm","owner":"RunDevelopment"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"psl":{"title":"PATROL Scripting Language","owner":"bertysentry"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":"markup-templating","owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"promql":{"title":"PromQL","owner":"arendjr"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"purebasic":{"title":"PureBasic","require":"clike","alias":"pbfasm","owner":"HeX0R101"},"purescript":{"title":"PureScript","require":"haskell","alias":"purs","owner":"sriharshachilakapati"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"qsharp":{"title":"Q#","require":"clike","alias":"qs","owner":"fedonman"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"racket":{"title":"Racket","require":"scheme","alias":"rkt","owner":"RunDevelopment"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","owner":"RunDevelopment"},"rego":{"title":"Rego","owner":"JordanSh"},"renpy":{"title":"Ren'py","alias":"rpy","owner":"HyuchiaDiego"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","optional":"css-extras","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","alias":["sh-session","shellsession"],"owner":"RunDevelopment"},"smali":{"title":"Smali","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sml":{"title":"SML","alias":"smlnj","aliasTitles":{"smlnj":"SML/NJ"},"owner":"RunDevelopment"},"solidity":{"title":"Solidity (Ethereum)","alias":"sol","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"squirrel":{"title":"Squirrel","require":"clike","owner":"RunDevelopment"},"stan":{"title":"Stan","owner":"RunDevelopment"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","owner":"chrischares"},"systemd":{"title":"Systemd configuration file","owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","vbnet"],"owner":"RunDevelopment"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"typoscript":{"title":"TypoScript","alias":"tsconfig","aliasTitles":{"tsconfig":"TSConfig"},"owner":"dkern"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"uri":{"title":"URI","alias":"url","aliasTitles":{"url":"URL"},"owner":"RunDevelopment"},"v":{"title":"V","require":"clike","owner":"taggon"},"vala":{"title":"Vala","require":"clike","optional":"regex","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":["vb","vba"],"aliasTitles":{"vba":"VBA"},"owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"wolfram":{"title":"Wolfram language","alias":["mathematica","nb","wl"],"aliasTitles":{"mathematica":"Mathematica","nb":"Mathematica Notebook"},"owner":"msollami"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xml-doc":{"title":"XML doc (.net)","require":"markup","modify":["csharp","fsharp","vbnet"],"owner":"RunDevelopment"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"yang":{"title":"YANG","owner":"RunDevelopment"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword for fine-grained highlighting.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; if (typeof module !== 'undefined' && module.exports) { module.exports = components; } \ No newline at end of file diff --git a/components.json b/components.json index 2bc9c0e30e..6b17a85f6f 100644 --- a/components.json +++ b/components.json @@ -803,6 +803,10 @@ "title": "MEL", "owner": "Golmote" }, + "mermaid": { + "title": "Mermaid", + "owner": "RunDevelopment" + }, "mizar": { "title": "Mizar", "owner": "Golmote" diff --git a/components/prism-mermaid.js b/components/prism-mermaid.js new file mode 100644 index 0000000000..4950ebf1ae --- /dev/null +++ b/components/prism-mermaid.js @@ -0,0 +1,113 @@ +Prism.languages.mermaid = { + 'comment': { + pattern: /%%.*/, + greedy: true + }, + + 'style': { + pattern: /^([ \t]*(?:classDef|linkStyle|style)[ \t]+[\w$-]+[ \t]+)\w.*[^\s;]/m, + lookbehind: true, + inside: { + 'property': /\b\w[\w-]*(?=[ \t]*:)/, + 'operator': /:/, + 'punctuation': /,/ + } + }, + + 'inter-arrow-label': { + pattern: /([^<>ox.=-])(?:-[-.]|==)(?![<>ox.=-])[ \t]*(?:"[^"\r\n]*"|[^\s".=-](?:[^\r\n.=-]*[^\s.=-])?)[ \t]*(?:\.+->?|--+[->]|==+[=>])(?![<>ox.=-])/, + lookbehind: true, + greedy: true, + inside: { + 'arrow': { + pattern: /(?:\.+->?|--+[->]|==+[=>])$/, + alias: 'operator' + }, + 'label': { + pattern: /^([\s\S]{2}[ \t]*)\S(?:[\s\S]*\S)?/, + lookbehind: true, + alias: 'property' + }, + 'arrow-head': { + pattern: /^\S+/, + alias: ['arrow', 'operator'] + } + } + }, + + 'arrow': [ + // This might look complex but it really isn't. + // There are many possible arrows (see tests) and it's impossible to fit all of them into one pattern. The + // problem is that we only have one lookbehind per pattern. However, we cannot disallow too many arrow + // characters in the one lookbehind because that would create too many false negatives. So we have to split the + // arrows into different patterns. + { + // ER diagram + pattern: /(^|[^{}|o.-])[|}][|o](?:--|\.\.)[|o][|{](?![{}|o.-])/, + lookbehind: true, + alias: 'operator' + }, + { + // flow chart + // (?:==+|--+|-\.*-) + pattern: /(^|[^<>ox.=-])(?:[ox]?|(?:==+|--+|-\.*-)[>ox]|===+|---+|-\.+-)(?![<>ox.=-])/, + lookbehind: true, + alias: 'operator' + }, + { + // sequence diagram + pattern: /(^|[^<>()x-])(?:--?(?:>>|[x>)])(?![<>()x])|(?:<<|[x<(])--?(?!-))/, + lookbehind: true, + alias: 'operator' + }, + { + // class diagram + pattern: /(^|[^<>|*o.-])(?:[*o]--|--[*o]|<\|?(?:--|\.\.)|(?:--|\.\.)\|?>|--|\.\.)(?![<>|*o.-])/, + lookbehind: true, + alias: 'operator' + }, + ], + + 'label': { + pattern: /(^|[^|<])\|(?:[^\r\n"|]|"[^"\r\n]*")+\|/, + lookbehind: true, + greedy: true, + alias: 'property' + }, + + 'text': { + pattern: /(?:[(\[{]+|\b>)(?:[^\r\n"()\[\]{}]|"[^"\r\n]*")+(?:[)\]}]+|>)/, + alias: 'string' + }, + 'string': { + pattern: /"[^"\r\n]*"/, + greedy: true + }, + + 'annotation': { + pattern: /<<(?:abstract|choice|enumeration|fork|interface|join|service)>>|\[\[(?:choice|fork|join)\]\]/i, + alias: 'important' + }, + + 'keyword': [ + // This language has both case-sensitive and case-insensitive keywords + { + pattern: /(^[ \t]*)(?:action|callback|class|classDef|classDiagram|click|direction|erDiagram|flowchart|gantt|gitGraph|graph|journey|link|linkStyle|pie|requirementDiagram|sequenceDiagram|stateDiagram|stateDiagram-v2|style|subgraph)(?![\w$-])/m, + lookbehind: true, + greedy: true + }, + { + pattern: /(^[ \t]*)(?:activate|alt|and|as|autonumber|deactivate|else|end(?:[ \t]+note)?|loop|opt|par|participant|rect|state|note[ \t]+(?:over|(?:left|right)[ \t]+of))(?![\w$-])/im, + lookbehind: true, + greedy: true + } + ], + + 'entity': /#[a-z0-9]+;/, + + 'operator': { + pattern: /(\w[ \t]*)&(?=[ \t]*\w)|:::|:/, + lookbehind: true + }, + 'punctuation': /[(){};]/ +}; diff --git a/components/prism-mermaid.min.js b/components/prism-mermaid.min.js new file mode 100644 index 0000000000..054b4350b0 --- /dev/null +++ b/components/prism-mermaid.min.js @@ -0,0 +1 @@ +Prism.languages.mermaid={comment:{pattern:/%%.*/,greedy:!0},style:{pattern:/^([ \t]*(?:classDef|linkStyle|style)[ \t]+[\w$-]+[ \t]+)\w.*[^\s;]/m,lookbehind:!0,inside:{property:/\b\w[\w-]*(?=[ \t]*:)/,operator:/:/,punctuation:/,/}},"inter-arrow-label":{pattern:/([^<>ox.=-])(?:-[-.]|==)(?![<>ox.=-])[ \t]*(?:"[^"\r\n]*"|[^\s".=-](?:[^\r\n.=-]*[^\s.=-])?)[ \t]*(?:\.+->?|--+[->]|==+[=>])(?![<>ox.=-])/,lookbehind:!0,greedy:!0,inside:{arrow:{pattern:/(?:\.+->?|--+[->]|==+[=>])$/,alias:"operator"},label:{pattern:/^([\s\S]{2}[ \t]*)\S(?:[\s\S]*\S)?/,lookbehind:!0,alias:"property"},"arrow-head":{pattern:/^\S+/,alias:["arrow","operator"]}}},arrow:[{pattern:/(^|[^{}|o.-])[|}][|o](?:--|\.\.)[|o][|{](?![{}|o.-])/,lookbehind:!0,alias:"operator"},{pattern:/(^|[^<>ox.=-])(?:[ox]?|(?:==+|--+|-\.*-)[>ox]|===+|---+|-\.+-)(?![<>ox.=-])/,lookbehind:!0,alias:"operator"},{pattern:/(^|[^<>()x-])(?:--?(?:>>|[x>)])(?![<>()x])|(?:<<|[x<(])--?(?!-))/,lookbehind:!0,alias:"operator"},{pattern:/(^|[^<>|*o.-])(?:[*o]--|--[*o]|<\|?(?:--|\.\.)|(?:--|\.\.)\|?>|--|\.\.)(?![<>|*o.-])/,lookbehind:!0,alias:"operator"}],label:{pattern:/(^|[^|<])\|(?:[^\r\n"|]|"[^"\r\n]*")+\|/,lookbehind:!0,greedy:!0,alias:"property"},text:{pattern:/(?:[(\[{]+|\b>)(?:[^\r\n"()\[\]{}]|"[^"\r\n]*")+(?:[)\]}]+|>)/,alias:"string"},string:{pattern:/"[^"\r\n]*"/,greedy:!0},annotation:{pattern:/<<(?:abstract|choice|enumeration|fork|interface|join|service)>>|\[\[(?:choice|fork|join)\]\]/i,alias:"important"},keyword:[{pattern:/(^[ \t]*)(?:action|callback|class|classDef|classDiagram|click|direction|erDiagram|flowchart|gantt|gitGraph|graph|journey|link|linkStyle|pie|requirementDiagram|sequenceDiagram|stateDiagram|stateDiagram-v2|style|subgraph)(?![\w$-])/m,lookbehind:!0,greedy:!0},{pattern:/(^[ \t]*)(?:activate|alt|and|as|autonumber|deactivate|else|end(?:[ \t]+note)?|loop|opt|par|participant|rect|state|note[ \t]+(?:over|(?:left|right)[ \t]+of))(?![\w$-])/im,lookbehind:!0,greedy:!0}],entity:/#[a-z0-9]+;/,operator:{pattern:/(\w[ \t]*)&(?=[ \t]*\w)|:::|:/,lookbehind:!0},punctuation:/[(){};]/}; \ No newline at end of file diff --git a/examples/prism-mermaid.html b/examples/prism-mermaid.html new file mode 100644 index 0000000000..c379bf27b5 --- /dev/null +++ b/examples/prism-mermaid.html @@ -0,0 +1,25 @@ +

            Full example

            +
            %% https://github.com/mermaid-js/mermaid/blob/develop/docs/examples.md#larger-flowchart-with-some-styling
            +
            +graph TB
            +	sq[Square shape] --> ci((Circle shape))
            +
            +	subgraph A
            +		od>Odd shape]-- Two line<br/>edge comment --> ro
            +		di{Diamond with <br/> line break} -.-> ro(Rounded<br>square<br>shape)
            +		di==>ro2(Rounded square shape)
            +	end
            +
            +	%% Notice that no text in shape are added here instead that is appended further down
            +	e --> od3>Really long text with linebreak<br>in an Odd shape]
            +
            +	%% Comments after double percent signs
            +	e((Inner / circle<br>and some odd <br>special characters)) --> f(,.?!+-*ز)
            +
            +	cyr[Cyrillic]-->cyr2((Circle shape Начало));
            +
            +	classDef green fill:#9f6,stroke:#333,stroke-width:2px;
            +	classDef orange fill:#f96,stroke:#333,stroke-width:4px;
            +	class sq,e green
            +	class di orange
            +
            diff --git a/tests/languages/mermaid/arrow_feature.test b/tests/languages/mermaid/arrow_feature.test new file mode 100644 index 0000000000..6205a313ff --- /dev/null +++ b/tests/languages/mermaid/arrow_feature.test @@ -0,0 +1,125 @@ +%% flow chart + +--- ---- ----- +--> ---> ----> +<-- <--- <---- +=== ==== ===== +==> ===> ====> +<== <=== <==== +-.- -..- -...- +-.-> -..-> -...-> +<-.- <-..- <-...- +--x ---x ----x +--x -.-x -..-x +x-- x--- x---- +x-- x-.- x-..- +--o ---o ----o +--o -.-o -..-o +o-- o--- o---- +o-- o-.- o-..- + +<--> <----> <-..-> <====> +x--x x----x x-..-x x====x +o--o o----o o-..-o o====o + +%% sequence diagram + +-> --> ->> -->> +<- <-- <<- <<-- +-x --x -) --) +x- x-- (- (-- + +%% class diagram + +<|-- *-- o-- <-- <.. <|.. +--|> --* --o --> ..> ..|> +-- .. + +%% ER diagram + +|o--o| |o..o| +||--|| ||..|| +}o--o{ }o..o{ +}|--|{ }|..|{ + +|o--o| |o..o| +||--o{ ||..o{ +}o--|{ }o..|{ +}|--|| }|..|| + +---------------------------------------------------- + +[ + ["comment", "%% flow chart"], + + ["arrow", "---"], ["arrow", "----"], ["arrow", "-----"], + ["arrow", "-->"], ["arrow", "--->"], ["arrow", "---->"], + ["arrow", "<--"], ["arrow", "<---"], ["arrow", "<----"], + ["arrow", "==="], ["arrow", "===="], ["arrow", "====="], + ["arrow", "==>"], ["arrow", "===>"], ["arrow", "====>"], + ["arrow", "<=="], ["arrow", "<==="], ["arrow", "<===="], + ["arrow", "-.-"], ["arrow", "-..-"], ["arrow", "-...-"], + ["arrow", "-.->"], ["arrow", "-..->"], ["arrow", "-...->"], + ["arrow", "<-.-"], ["arrow", "<-..-"], ["arrow", "<-...-"], + ["arrow", "--x"], ["arrow", "---x"], ["arrow", "----x"], + ["arrow", "--x"], ["arrow", "-.-x"], ["arrow", "-..-x"], + ["arrow", "x--"], ["arrow", "x---"], ["arrow", "x----"], + ["arrow", "x--"], ["arrow", "x-.-"], ["arrow", "x-..-"], + ["arrow", "--o"], ["arrow", "---o"], ["arrow", "----o"], + ["arrow", "--o"], ["arrow", "-.-o"], ["arrow", "-..-o"], + ["arrow", "o--"], ["arrow", "o---"], ["arrow", "o----"], + ["arrow", "o--"], ["arrow", "o-.-"], ["arrow", "o-..-"], + + ["arrow", "<-->"], + ["arrow", "<---->"], + ["arrow", "<-..->"], + ["arrow", "<====>"], + + ["arrow", "x--x"], + ["arrow", "x----x"], + ["arrow", "x-..-x"], + ["arrow", "x====x"], + + ["arrow", "o--o"], + ["arrow", "o----o"], + ["arrow", "o-..-o"], + ["arrow", "o====o"], + + ["comment", "%% sequence diagram"], + + ["arrow", "->"], ["arrow", "-->"], ["arrow", "->>"], ["arrow", "-->>"], + ["arrow", "<-"], ["arrow", "<--"], ["arrow", "<<-"], ["arrow", "<<--"], + ["arrow", "-x"], ["arrow", "--x"], ["arrow", "-)"], ["arrow", "--)"], + ["arrow", "x-"], ["arrow", "x--"], ["arrow", "(-"], ["arrow", "(--"], + + ["comment", "%% class diagram"], + + ["arrow", "<|--"], + ["arrow", "*--"], + ["arrow", "o--"], + ["arrow", "<--"], + ["arrow", "<.."], + ["arrow", "<|.."], + + ["arrow", "--|>"], + ["arrow", "--*"], + ["arrow", "--o"], + ["arrow", "-->"], + ["arrow", "..>"], + ["arrow", "..|>"], + + ["arrow", "--"], + ["arrow", ".."], + + ["comment", "%% ER diagram"], + + ["arrow", "|o--o|"], ["arrow", "|o..o|"], + ["arrow", "||--||"], ["arrow", "||..||"], + ["arrow", "}o--o{"], ["arrow", "}o..o{"], + ["arrow", "}|--|{"], ["arrow", "}|..|{"], + + ["arrow", "|o--o|"], ["arrow", "|o..o|"], + ["arrow", "||--o{"], ["arrow", "||..o{"], + ["arrow", "}o--|{"], ["arrow", "}o..|{"], + ["arrow", "}|--||"], ["arrow", "}|..||"] +] diff --git a/tests/languages/mermaid/comment_feature.test b/tests/languages/mermaid/comment_feature.test new file mode 100644 index 0000000000..90b8493fba --- /dev/null +++ b/tests/languages/mermaid/comment_feature.test @@ -0,0 +1,7 @@ +%% comment + +---------------------------------------------------- + +[ + ["comment", "%% comment"] +] diff --git a/tests/languages/mermaid/full_classdiagram.test b/tests/languages/mermaid/full_classdiagram.test new file mode 100644 index 0000000000..e612373f67 --- /dev/null +++ b/tests/languages/mermaid/full_classdiagram.test @@ -0,0 +1,656 @@ +classDiagram + Animal <|-- Duck + Animal <|-- Fish + Animal <|-- Zebra + Animal : +int age + Animal : +String gender + Animal: +isMammal() + Animal: +mate() + class Duck{ + +String beakColor + +swim() + +quack() + } + class Fish{ + -int sizeInFeet + -canEat() + } + class Zebra{ + +bool is_wild + +run() + } + +classDiagram + class BankAccount + BankAccount : +String owner + BankAccount : +Bigdecimal balance + BankAccount : +deposit(amount) + BankAccount : +withdrawl(amount) + +classDiagram + class Animal + Vehicle <|-- Car + +class BankAccount + BankAccount : +String owner + BankAccount : +BigDecimal balance + BankAccount : +deposit(amount) + BankAccount : +withdrawal(amount) + +class BankAccount{ + +String owner + +BigDecimal balance + +deposit(amount) + +withdrawl(amount) +} + +class BankAccount{ + +String owner + +BigDecimal balance + +deposit(amount) bool + +withdrawl(amount) int +} + +classDiagram +class Square~Shape~{ + int id + List~int~ position + setPoints(List~int~ points) + getPoints() List~int~ +} + +Square : -List~string~ messages +Square : +setMessages(List~string~ messages) +Square : +getMessages() List~string~ + +classDiagram +classA <|-- classB +classC *-- classD +classE o-- classF +classG <-- classH +classI -- classJ +classK <.. classL +classM <|.. classN +classO .. classP + +classDiagram +classA --|> classB : Inheritance +classC --* classD : Composition +classE --o classF : Aggregation +classG --> classH : Association +classI -- classJ : Link(Solid) +classK ..> classL : Dependency +classM ..|> classN : Realization +classO .. classP : Link(Dashed) + +classDiagram +classA <|-- classB : implements +classC *-- classD : composition +classE o-- classF : association + +classDiagram + Customer "1" --> "*" Ticket + Student "1" --> "1..*" Course + Galaxy --> "many" Star : Contains + +classDiagram +class Shape +<> Shape + +classDiagram +class Shape{ + <> + noOfVertices + draw() +} +class Color{ + <> + RED + BLUE + GREEN + WHITE + BLACK +} + +classDiagram +%% This whole line is a comment classDiagram class Shape <> +class Shape{ + <> + noOfVertices + draw() +} + +classDiagram + direction RL + class Student { + -idCard : IdCard + } + class IdCard{ + -id : int + -name : string + } + class Bike{ + -id : int + -name : string + } + Student "1" --o "1" IdCard : carries + Student "1" --o "1" Bike : rides + +action className "reference" "tooltip" +click className call callback() "tooltip" +click className href "url" "tooltip" + +classDiagram +class Shape +link Shape "http://www.github.com" "This is a tooltip for a link" +class Shape2 +click Shape2 href "http://www.github.com" "This is a tooltip for a link" + +classDiagram +class Shape +callback Shape "callbackFunction" "This is a tooltip for a callback" +class Shape2 +click Shape2 call callbackFunction() "This is a tooltip for a callback" + +classDiagram +Animal <|-- Duck +Animal <|-- Fish +Animal <|-- Zebra +Animal : +int age +Animal : +String gender +Animal: +isMammal() +Animal: +mate() +class Duck{ + +String beakColor + +swim() + +quack() + } +class Fish{ + -int sizeInFeet + -canEat() + } +class Zebra{ + +bool is_wild + +run() + } + + callback Duck callback "Tooltip" + link Zebra "http://www.github.com" "This is a link" + +classDiagram + class Animal:::cssClass + +classDiagram + class Animal:::cssClass { + -int sizeInFeet + -canEat() + } + +---------------------------------------------------- + +[ + ["keyword", "classDiagram"], + + "\r\n Animal ", + ["arrow", "<|--"], + " Duck\r\n Animal ", + ["arrow", "<|--"], + " Fish\r\n Animal ", + ["arrow", "<|--"], + " Zebra\r\n Animal ", + ["operator", ":"], + " +int age\r\n Animal ", + ["operator", ":"], + " +String gender\r\n Animal", + ["operator", ":"], + " +isMammal", + ["punctuation", "("], + ["punctuation", ")"], + + "\r\n Animal", + ["operator", ":"], + " +mate", + ["punctuation", "("], + ["punctuation", ")"], + + ["keyword", "class"], + " Duck", + ["punctuation", "{"], + + "\r\n +String beakColor\r\n +swim", + ["punctuation", "("], + ["punctuation", ")"], + + "\r\n +quack", + ["punctuation", "("], + ["punctuation", ")"], + + ["punctuation", "}"], + + ["keyword", "class"], + " Fish", + ["punctuation", "{"], + + "\r\n -int sizeInFeet\r\n -canEat", + ["punctuation", "("], + ["punctuation", ")"], + + ["punctuation", "}"], + + ["keyword", "class"], + " Zebra", + ["punctuation", "{"], + + "\r\n +bool is_wild\r\n +run", + ["punctuation", "("], + ["punctuation", ")"], + + ["punctuation", "}"], + + ["keyword", "classDiagram"], + + ["keyword", "class"], + " BankAccount\r\n BankAccount ", + ["operator", ":"], + " +String owner\r\n BankAccount ", + ["operator", ":"], + " +Bigdecimal balance\r\n BankAccount ", + ["operator", ":"], + " +deposit", + ["text", "(amount)"], + + "\r\n BankAccount ", + ["operator", ":"], + " +withdrawl", + ["text", "(amount)"], + + ["keyword", "classDiagram"], + + ["keyword", "class"], + " Animal\r\n Vehicle ", + ["arrow", "<|--"], + " Car\r\n\r\n", + + ["keyword", "class"], + " BankAccount\r\n BankAccount ", + ["operator", ":"], + " +String owner\r\n BankAccount ", + ["operator", ":"], + " +BigDecimal balance\r\n BankAccount ", + ["operator", ":"], + " +deposit", + ["text", "(amount)"], + + "\r\n BankAccount ", + ["operator", ":"], + " +withdrawal", + ["text", "(amount)"], + + ["keyword", "class"], + " BankAccount", + ["punctuation", "{"], + + "\r\n +String owner\r\n +BigDecimal balance\r\n +deposit", + ["text", "(amount)"], + + "\r\n +withdrawl", + ["text", "(amount)"], + + ["punctuation", "}"], + + ["keyword", "class"], + " BankAccount", + ["punctuation", "{"], + + "\r\n +String owner\r\n +BigDecimal balance\r\n +deposit", + ["text", "(amount)"], + " bool\r\n +withdrawl", + ["text", "(amount)"], + " int\r\n", + + ["punctuation", "}"], + + ["keyword", "classDiagram"], + + ["keyword", "class"], + " Square~Shape~", + ["punctuation", "{"], + + "\r\n int id\r\n List~int~ position\r\n setPoints", + ["text", "(List~int~ points)"], + + "\r\n getPoints", + ["punctuation", "("], + ["punctuation", ")"], + " List~int~\r\n", + + ["punctuation", "}"], + + "\r\n\r\nSquare ", + ["operator", ":"], + " -List~string~ messages\r\nSquare ", + ["operator", ":"], + " +setMessages", + ["text", "(List~string~ messages)"], + + "\r\nSquare ", + ["operator", ":"], + " +getMessages", + ["punctuation", "("], + ["punctuation", ")"], + " List~string~\r\n\r\n", + + ["keyword", "classDiagram"], + + "\r\nclassA ", + ["arrow", "<|--"], + " classB\r\nclassC ", + ["arrow", "*--"], + " classD\r\nclassE ", + ["arrow", "o--"], + " classF\r\nclassG ", + ["arrow", "<--"], + " classH\r\nclassI ", + ["arrow", "--"], + " classJ\r\nclassK ", + ["arrow", "<.."], + " classL\r\nclassM ", + ["arrow", "<|.."], + " classN\r\nclassO ", + ["arrow", ".."], + " classP\r\n\r\n", + + ["keyword", "classDiagram"], + + "\r\nclassA ", + ["arrow", "--|>"], + " classB ", + ["operator", ":"], + " Inheritance\r\nclassC ", + ["arrow", "--*"], + " classD ", + ["operator", ":"], + " Composition\r\nclassE ", + ["arrow", "--o"], + " classF ", + ["operator", ":"], + " Aggregation\r\nclassG ", + ["arrow", "-->"], + " classH ", + ["operator", ":"], + " Association\r\nclassI ", + ["arrow", "--"], + " classJ ", + ["operator", ":"], + " Link", + ["text", "(Solid)"], + + "\r\nclassK ", + ["arrow", "..>"], + " classL ", + ["operator", ":"], + " Dependency\r\nclassM ", + ["arrow", "..|>"], + " classN ", + ["operator", ":"], + " Realization\r\nclassO ", + ["arrow", ".."], + " classP ", + ["operator", ":"], + " Link", + ["text", "(Dashed)"], + + ["keyword", "classDiagram"], + + "\r\nclassA ", + ["arrow", "<|--"], + " classB ", + ["operator", ":"], + " implements\r\nclassC ", + ["arrow", "*--"], + " classD ", + ["operator", ":"], + " composition\r\nclassE ", + ["arrow", "o--"], + " classF ", + ["operator", ":"], + " association\r\n\r\n", + + ["keyword", "classDiagram"], + + "\r\n Customer ", + ["string", "\"1\""], + ["arrow", "-->"], + ["string", "\"*\""], + " Ticket\r\n Student ", + ["string", "\"1\""], + ["arrow", "-->"], + ["string", "\"1..*\""], + " Course\r\n Galaxy ", + ["arrow", "-->"], + ["string", "\"many\""], + " Star ", + ["operator", ":"], + " Contains\r\n\r\n", + + ["keyword", "classDiagram"], + ["keyword", "class"], " Shape\r\n", + ["annotation", "<>"], " Shape\r\n\r\n", + + ["keyword", "classDiagram"], + ["keyword", "class"], + " Shape", + ["punctuation", "{"], + ["annotation", "<>"], + "\r\n noOfVertices\r\n draw", + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", "}"], + ["keyword", "class"], + " Color", + ["punctuation", "{"], + ["annotation", "<>"], + "\r\n RED\r\n BLUE\r\n GREEN\r\n WHITE\r\n BLACK\r\n", + ["punctuation", "}"], + + ["keyword", "classDiagram"], + ["comment", "%% This whole line is a comment classDiagram class Shape <>"], + ["keyword", "class"], + " Shape", + ["punctuation", "{"], + ["annotation", "<>"], + "\r\n noOfVertices\r\n draw", + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", "}"], + + ["keyword", "classDiagram"], + + ["keyword", "direction"], + " RL\r\n ", + + ["keyword", "class"], + " Student ", + ["punctuation", "{"], + + "\r\n -idCard ", + ["operator", ":"], + " IdCard\r\n ", + + ["punctuation", "}"], + + ["keyword", "class"], + " IdCard", + ["punctuation", "{"], + + "\r\n -id ", + ["operator", ":"], + " int\r\n -name ", + ["operator", ":"], + " string\r\n ", + + ["punctuation", "}"], + + ["keyword", "class"], + " Bike", + ["punctuation", "{"], + + "\r\n -id ", + ["operator", ":"], + " int\r\n -name ", + ["operator", ":"], + " string\r\n ", + + ["punctuation", "}"], + + "\r\n Student ", + ["string", "\"1\""], + ["arrow", "--o"], + ["string", "\"1\""], + " IdCard ", + ["operator", ":"], + " carries\r\n Student ", + ["string", "\"1\""], + ["arrow", "--o"], + ["string", "\"1\""], + " Bike ", + ["operator", ":"], + " rides\r\n\r\n", + + ["keyword", "action"], + " className ", + ["string", "\"reference\""], + ["string", "\"tooltip\""], + + ["keyword", "click"], + " className call callback", + ["punctuation", "("], + ["punctuation", ")"], + ["string", "\"tooltip\""], + + ["keyword", "click"], + " className href ", + ["string", "\"url\""], + ["string", "\"tooltip\""], + + ["keyword", "classDiagram"], + + ["keyword", "class"], + " Shape\r\n", + + ["keyword", "link"], + " Shape ", + ["string", "\"http://www.github.com\""], + ["string", "\"This is a tooltip for a link\""], + + ["keyword", "class"], + " Shape2\r\n", + + ["keyword", "click"], + " Shape2 href ", + ["string", "\"http://www.github.com\""], + ["string", "\"This is a tooltip for a link\""], + + ["keyword", "classDiagram"], + + ["keyword", "class"], + " Shape\r\n", + + ["keyword", "callback"], + " Shape ", + ["string", "\"callbackFunction\""], + ["string", "\"This is a tooltip for a callback\""], + + ["keyword", "class"], + " Shape2\r\n", + + ["keyword", "click"], + " Shape2 call callbackFunction", + ["punctuation", "("], + ["punctuation", ")"], + ["string", "\"This is a tooltip for a callback\""], + + ["keyword", "classDiagram"], + + "\r\nAnimal ", + ["arrow", "<|--"], + " Duck\r\nAnimal ", + ["arrow", "<|--"], + " Fish\r\nAnimal ", + ["arrow", "<|--"], + " Zebra\r\nAnimal ", + ["operator", ":"], + " +int age\r\nAnimal ", + ["operator", ":"], + " +String gender\r\nAnimal", + ["operator", ":"], + " +isMammal", + ["punctuation", "("], + ["punctuation", ")"], + + "\r\nAnimal", + ["operator", ":"], + " +mate", + ["punctuation", "("], + ["punctuation", ")"], + + ["keyword", "class"], + " Duck", + ["punctuation", "{"], + + "\r\n +String beakColor\r\n +swim", + ["punctuation", "("], + ["punctuation", ")"], + + "\r\n +quack", + ["punctuation", "("], + ["punctuation", ")"], + + ["punctuation", "}"], + + ["keyword", "class"], + " Fish", + ["punctuation", "{"], + + "\r\n -int sizeInFeet\r\n -canEat", + ["punctuation", "("], + ["punctuation", ")"], + + ["punctuation", "}"], + + ["keyword", "class"], + " Zebra", + ["punctuation", "{"], + + "\r\n +bool is_wild\r\n +run", + ["punctuation", "("], + ["punctuation", ")"], + + ["punctuation", "}"], + + ["keyword", "callback"], + " Duck callback ", + ["string", "\"Tooltip\""], + + ["keyword", "link"], + " Zebra ", + ["string", "\"http://www.github.com\""], + ["string", "\"This is a link\""], + + ["keyword", "classDiagram"], + ["keyword", "class"], " Animal", ["operator", ":::"], "cssClass\r\n\r\n", + + ["keyword", "classDiagram"], + + ["keyword", "class"], + " Animal", + ["operator", ":::"], + "cssClass ", + ["punctuation", "{"], + + "\r\n -int sizeInFeet\r\n -canEat", + ["punctuation", "("], + ["punctuation", ")"], + + ["punctuation", "}"] +] diff --git a/tests/languages/mermaid/full_erdiagram.test b/tests/languages/mermaid/full_erdiagram.test new file mode 100644 index 0000000000..c88f2d46c6 --- /dev/null +++ b/tests/languages/mermaid/full_erdiagram.test @@ -0,0 +1,168 @@ +erDiagram + CUSTOMER ||--o{ ORDER : places + ORDER ||--|{ LINE-ITEM : contains + CUSTOMER }|..|{ DELIVERY-ADDRESS : uses + +erDiagram + CUSTOMER ||--o{ ORDER : places + CUSTOMER { + string name + string custNumber + string sector + } + ORDER ||--|{ LINE-ITEM : contains + ORDER { + int orderNumber + string deliveryAddress + } + LINE-ITEM { + string productCode + int quantity + float pricePerUnit + } + +PROPERTY ||--|{ ROOM : contains + +CAR ||--o{ NAMED-DRIVER : allows + PERSON ||--o{ NAMED-DRIVER : is + +erDiagram + CAR ||--o{ NAMED-DRIVER : allows + CAR { + string registrationNumber + string make + string model + } + PERSON ||--o{ NAMED-DRIVER : is + PERSON { + string firstName + string lastName + int age + } + +erDiagram + CAR ||--o{ NAMED-DRIVER : allows + CAR { + string registrationNumber + string make + string model + } + PERSON ||--o{ NAMED-DRIVER : is + PERSON { + string firstName + string lastName + int age + } + +---------------------------------------------------- + +[ + ["keyword", "erDiagram"], + + "\r\n CUSTOMER ", + ["arrow", "||--o{"], + " ORDER ", + ["operator", ":"], + " places\r\n ORDER ", + ["arrow", "||--|{"], + " LINE-ITEM ", + ["operator", ":"], + " contains\r\n CUSTOMER ", + ["arrow", "}|..|{"], + " DELIVERY-ADDRESS ", + ["operator", ":"], + " uses\r\n\r\n", + + ["keyword", "erDiagram"], + + "\r\n CUSTOMER ", + ["arrow", "||--o{"], + " ORDER ", + ["operator", ":"], + " places\r\n CUSTOMER ", + ["punctuation", "{"], + + "\r\n string name\r\n string custNumber\r\n string sector\r\n ", + + ["punctuation", "}"], + + "\r\n ORDER ", + ["arrow", "||--|{"], + " LINE-ITEM ", + ["operator", ":"], + " contains\r\n ORDER ", + ["punctuation", "{"], + + "\r\n int orderNumber\r\n string deliveryAddress\r\n ", + + ["punctuation", "}"], + + "\r\n LINE-ITEM ", + ["punctuation", "{"], + + "\r\n string productCode\r\n int quantity\r\n float pricePerUnit\r\n ", + + ["punctuation", "}"], + + "\r\n\r\nPROPERTY ", + ["arrow", "||--|{"], + " ROOM ", + ["operator", ":"], + " contains\r\n\r\nCAR ", + ["arrow", "||--o{"], + " NAMED-DRIVER ", + ["operator", ":"], + " allows\r\n PERSON ", + ["arrow", "||--o{"], + " NAMED-DRIVER ", + ["operator", ":"], + " is\r\n\r\n", + + ["keyword", "erDiagram"], + + "\r\n CAR ", + ["arrow", "||--o{"], + " NAMED-DRIVER ", + ["operator", ":"], + " allows\r\n CAR ", + ["punctuation", "{"], + + "\r\n string registrationNumber\r\n string make\r\n string model\r\n ", + + ["punctuation", "}"], + + "\r\n PERSON ", + ["arrow", "||--o{"], + " NAMED-DRIVER ", + ["operator", ":"], + " is\r\n PERSON ", + ["punctuation", "{"], + + "\r\n string firstName\r\n string lastName\r\n int age\r\n ", + + ["punctuation", "}"], + + ["keyword", "erDiagram"], + + "\r\n CAR ", + ["arrow", "||--o{"], + " NAMED-DRIVER ", + ["operator", ":"], + " allows\r\n CAR ", + ["punctuation", "{"], + + "\r\n string registrationNumber\r\n string make\r\n string model\r\n ", + + ["punctuation", "}"], + + "\r\n PERSON ", + ["arrow", "||--o{"], + " NAMED-DRIVER ", + ["operator", ":"], + " is\r\n PERSON ", + ["punctuation", "{"], + + "\r\n string firstName\r\n string lastName\r\n int age\r\n ", + + ["punctuation", "}"] +] diff --git a/tests/languages/mermaid/full_flowchart.test b/tests/languages/mermaid/full_flowchart.test new file mode 100644 index 0000000000..948af017cb --- /dev/null +++ b/tests/languages/mermaid/full_flowchart.test @@ -0,0 +1,930 @@ +flowchart LR + id + +flowchart LR + id1[This is the text in the box] + +flowchart TD + Start --> Stop + +flowchart LR + Start --> Stop + +flowchart LR + id1(This is the text in the box) + +flowchart LR + id1([This is the text in the box]) + +flowchart LR + id1[[This is the text in the box]] + +flowchart LR + id1[(Database)] + +flowchart LR + id1((This is the text in the circle)) + +flowchart LR + id1>This is the text in the box] + +flowchart LR + id1{This is the text in the box} + +flowchart LR + id1{{This is the text in the box}} + +flowchart TD + id1[/This is the text in the box/] + +flowchart TD + id1[\This is the text in the box\] + +flowchart TD + A[/Christmas\] + +flowchart TD + B[\Go shopping/] + +flowchart LR + A-->B + +flowchart LR + A --- B + +flowchart LR + A-- This is the text! ---B + +flowchart LR + A---|This is the text|B + +flowchart LR + A-->|text|B + +flowchart LR + A-- text -->B + +flowchart LR; + A-.->B; + +flowchart LR + A-. text .-> B + +flowchart LR + A ==> B + +flowchart LR + A == text ==> B + +flowchart LR + A -- text --> B -- text2 --> C + +flowchart LR + a --> b & c--> d + +flowchart TB + A & B--> C & D + +flowchart TB + A --> C + A --> D + B --> C + B --> D + +flowchart LR + A --o B + B --x C + +flowchart LR + A o--o B + B <--> C + C x--x D + +flowchart TD + A[Start] --> B{Is it?}; + B -->|Yes| C[OK]; + C --> D[Rethink]; + D --> B; + B ---->|No| E[End]; + +flowchart TD + A[Start] --> B{Is it?}; + B -- Yes --> C[OK]; + C --> D[Rethink]; + D --> B; + B -- No ----> E[End]; + +flowchart LR + id1["This is the (text) in the box"] + +flowchart LR + A["A double quote:#quot;"] -->B["A dec char:#9829;"] + +subgraph title + graph definition +end + +flowchart TB + c1-->a2 + subgraph one + a1-->a2 + end + subgraph two + b1-->b2 + end + subgraph three + c1-->c2 + end + +flowchart TB + c1-->a2 + subgraph ide1 [one] + a1-->a2 + end + +flowchart TB + c1-->a2 + subgraph one + a1-->a2 + end + subgraph two + b1-->b2 + end + subgraph three + c1-->c2 + end + one --> two + three --> two + two --> c2 + +flowchart LR + subgraph TOP + direction TB + subgraph B1 + direction RL + i1 -->f1 + end + subgraph B2 + direction BT + i2 -->f2 + end + end + A --> TOP --> B + B1 --> B2 + +click nodeId callback +click nodeId call callback() + +flowchart LR; + A-->B; + B-->C; + C-->D; + click A callback "Tooltip for a callback" + click B "http://www.github.com" "This is a tooltip for a link" + click A call callback() "Tooltip for a callback" + click B href "http://www.github.com" "This is a tooltip for a link" + +flowchart LR; + A-->B; + B-->C; + C-->D; + D-->E; + click A "http://www.github.com" _blank + click B "http://www.github.com" "Open this in a new tab" _blank + click C href "http://www.github.com" _blank + click D href "http://www.github.com" "Open this in a new tab" _blank + +flowchart LR +%% this is a comment A -- text --> B{node} + A -- text --> B -- text2 --> C + +linkStyle 3 stroke:#ff3,stroke-width:4px,color:red; + +flowchart LR + id1(Start)-->id2(Stop) + style id1 fill:#f9f,stroke:#333,stroke-width:4px + style id2 fill:#bbf,stroke:#f66,stroke-width:2px,color:#fff,stroke-dasharray: 5 5 + +classDef className fill:#f9f,stroke:#333,stroke-width:4px; + +class nodeId1 className; + +class nodeId1,nodeId2 className; + +flowchart LR + A:::someclass --> B + classDef someclass fill:#f96; + +flowchart LR; + A-->B[AAABBB]; + B-->D; + class A cssClass; + +classDef default fill:#f9f,stroke:#333,stroke-width:4px; + +flowchart TD + B["fa:fa-twitter for peace"] + B-->C[fa:fa-ban forbidden] + B-->D(fa:fa-spinner); + B-->E(A fa:fa-camera-retro perhaps?); + +flowchart LR + A[Hard edge] -->|Link text| B(Round edge) + B --> C{Decision} + C -->|One| D[Result one] + C -->|Two| E[Result two] + + flowchart LR; + A-->B; + B-->C; + C-->D; + click A callback "Tooltip" + click B "http://www.github.com" "This is a link" + click C call callback() "Tooltip" + click D href "http://www.github.com" "This is a link" + +---------------------------------------------------- + +[ + ["keyword", "flowchart"], " LR\r\n id\r\n\r\n", + + ["keyword", "flowchart"], + " LR\r\n id1", + ["text", "[This is the text in the box]"], + + ["keyword", "flowchart"], + " TD\r\n Start ", + ["arrow", "-->"], + " Stop\r\n\r\n", + + ["keyword", "flowchart"], + " LR\r\n Start ", + ["arrow", "-->"], + " Stop\r\n\r\n", + + ["keyword", "flowchart"], + " LR\r\n id1", + ["text", "(This is the text in the box)"], + + ["keyword", "flowchart"], + " LR\r\n id1", + ["text", "([This is the text in the box])"], + + ["keyword", "flowchart"], + " LR\r\n id1", + ["text", "[[This is the text in the box]]"], + + ["keyword", "flowchart"], " LR\r\n id1", ["text", "[(Database)]"], + + ["keyword", "flowchart"], + " LR\r\n id1", + ["text", "((This is the text in the circle))"], + + ["keyword", "flowchart"], + " LR\r\n id1", + ["text", ">This is the text in the box]"], + + ["keyword", "flowchart"], + " LR\r\n id1", + ["text", "{This is the text in the box}"], + + ["keyword", "flowchart"], + " LR\r\n id1", + ["text", "{{This is the text in the box}}"], + + ["keyword", "flowchart"], + " TD\r\n id1", + ["text", "[/This is the text in the box/]"], + + ["keyword", "flowchart"], + " TD\r\n id1", + ["text", "[\\This is the text in the box\\]"], + + ["keyword", "flowchart"], " TD\r\n A", ["text", "[/Christmas\\]"], + + ["keyword", "flowchart"], " TD\r\n B", ["text", "[\\Go shopping/]"], + + ["keyword", "flowchart"], " LR\r\n A", ["arrow", "-->"], "B\r\n\r\n", + + ["keyword", "flowchart"], " LR\r\n A ", ["arrow", "---"], " B\r\n\r\n", + + ["keyword", "flowchart"], + " LR\r\n A", + ["inter-arrow-label", [ + ["arrow-head", "--"], + ["label", "This is the text!"], + ["arrow", "---"] + ]], + "B\r\n\r\n", + + ["keyword", "flowchart"], + " LR\r\n A", + ["arrow", "---"], + ["label", "|This is the text|"], + "B\r\n\r\n", + + ["keyword", "flowchart"], + " LR\r\n A", + ["arrow", "-->"], + ["label", "|text|"], + "B\r\n\r\n", + + ["keyword", "flowchart"], + " LR\r\n A", + ["inter-arrow-label", [ + ["arrow-head", "--"], + ["label", "text"], + ["arrow", "-->"] + ]], + "B\r\n\r\n", + + ["keyword", "flowchart"], " LR", ["punctuation", ";"], + "\r\n A", ["arrow", "-.->"], "B", ["punctuation", ";"], + + ["keyword", "flowchart"], + " LR\r\n A", + ["inter-arrow-label", [ + ["arrow-head", "-."], + ["label", "text"], + ["arrow", ".->"] + ]], + " B\r\n\r\n", + + ["keyword", "flowchart"], " LR\r\n A ", ["arrow", "==>"], " B\r\n\r\n", + + ["keyword", "flowchart"], + " LR\r\n A ", + ["inter-arrow-label", [ + ["arrow-head", "=="], + ["label", "text"], + ["arrow", "==>"] + ]], + " B\r\n\r\n", + + ["keyword", "flowchart"], + " LR\r\n A ", + ["inter-arrow-label", [ + ["arrow-head", "--"], + ["label", "text"], + ["arrow", "-->"] + ]], + " B ", + ["inter-arrow-label", [ + ["arrow-head", "--"], + ["label", "text2"], + ["arrow", "-->"] + ]], + " C\r\n\r\n", + + ["keyword", "flowchart"], + " LR\r\n a ", + ["arrow", "-->"], + " b ", + ["operator", "&"], + " c", + ["arrow", "-->"], + " d\r\n\r\n", + + ["keyword", "flowchart"], + " TB\r\n A ", + ["operator", "&"], + " B", + ["arrow", "-->"], + " C ", + ["operator", "&"], + " D\r\n\r\n", + + ["keyword", "flowchart"], + " TB\r\n A ", + ["arrow", "-->"], + " C\r\n A ", + ["arrow", "-->"], + " D\r\n B ", + ["arrow", "-->"], + " C\r\n B ", + ["arrow", "-->"], + " D\r\n\r\n", + + ["keyword", "flowchart"], + " LR\r\n A ", + ["arrow", "--o"], + " B\r\n B ", + ["arrow", "--x"], + " C\r\n\r\n", + + ["keyword", "flowchart"], + " LR\r\n A ", + ["arrow", "o--o"], + " B\r\n B ", + ["arrow", "<-->"], + " C\r\n C ", + ["arrow", "x--x"], + " D\r\n\r\n", + + ["keyword", "flowchart"], + " TD\r\n A", + ["text", "[Start]"], + ["arrow", "-->"], + " B", + ["text", "{Is it?}"], + ["punctuation", ";"], + + "\r\n B ", + ["arrow", "-->"], + ["label", "|Yes|"], + " C", + ["text", "[OK]"], + ["punctuation", ";"], + + "\r\n C ", + ["arrow", "-->"], + " D", + ["text", "[Rethink]"], + ["punctuation", ";"], + + "\r\n D ", + ["arrow", "-->"], + " B", + ["punctuation", ";"], + + "\r\n B ", + ["arrow", "---->"], + ["label", "|No|"], + " E", + ["text", "[End]"], + ["punctuation", ";"], + + ["keyword", "flowchart"], + " TD\r\n A", + ["text", "[Start]"], + ["arrow", "-->"], + " B", + ["text", "{Is it?}"], + ["punctuation", ";"], + + "\r\n B ", + ["inter-arrow-label", [ + ["arrow-head", "--"], + ["label", "Yes"], + ["arrow", "-->"] + ]], + " C", + ["text", "[OK]"], + ["punctuation", ";"], + + "\r\n C ", + ["arrow", "-->"], + " D", + ["text", "[Rethink]"], + ["punctuation", ";"], + + "\r\n D ", + ["arrow", "-->"], + " B", + ["punctuation", ";"], + + "\r\n B ", + ["inter-arrow-label", [ + ["arrow-head", "--"], + ["label", "No"], + ["arrow", "---->"] + ]], + " E", + ["text", "[End]"], + ["punctuation", ";"], + + ["keyword", "flowchart"], + " LR\r\n id1", + ["text", "[\"This is the (text) in the box\"]"], + + ["keyword", "flowchart"], + " LR\r\n A", + ["text", "[\"A double quote:#quot;\"]"], + ["arrow", "-->"], + "B", + ["text", "[\"A dec char:#9829;\"]"], + + ["keyword", "subgraph"], " title\r\n ", + ["keyword", "graph"], " definition\r\n", + ["keyword", "end"], + + ["keyword", "flowchart"], " TB\r\n c1", ["arrow", "-->"], "a2\r\n ", + ["keyword", "subgraph"], " one\r\n a1", ["arrow", "-->"], "a2\r\n ", + ["keyword", "end"], + ["keyword", "subgraph"], " two\r\n b1", ["arrow", "-->"], "b2\r\n ", + ["keyword", "end"], + ["keyword", "subgraph"], " three\r\n c1", ["arrow", "-->"], "c2\r\n ", + ["keyword", "end"], + + ["keyword", "flowchart"], " TB\r\n c1", ["arrow", "-->"], "a2\r\n ", + ["keyword", "subgraph"], " ide1 ", ["text", "[one]"], + "\r\n a1", ["arrow", "-->"], "a2\r\n ", + ["keyword", "end"], + + ["keyword", "flowchart"], + " TB\r\n c1", + ["arrow", "-->"], + "a2\r\n ", + + ["keyword", "subgraph"], + " one\r\n a1", + ["arrow", "-->"], + "a2\r\n ", + + ["keyword", "end"], + + ["keyword", "subgraph"], + " two\r\n b1", + ["arrow", "-->"], + "b2\r\n ", + + ["keyword", "end"], + + ["keyword", "subgraph"], + " three\r\n c1", + ["arrow", "-->"], + "c2\r\n ", + + ["keyword", "end"], + + "\r\n one ", + ["arrow", "-->"], + " two\r\n three ", + ["arrow", "-->"], + " two\r\n two ", + ["arrow", "-->"], + " c2\r\n\r\n", + + ["keyword", "flowchart"], + " LR\r\n ", + + ["keyword", "subgraph"], + " TOP\r\n ", + + ["keyword", "direction"], + " TB\r\n ", + + ["keyword", "subgraph"], + " B1\r\n ", + + ["keyword", "direction"], + " RL\r\n i1 ", + ["arrow", "-->"], + "f1\r\n ", + + ["keyword", "end"], + + ["keyword", "subgraph"], + " B2\r\n ", + + ["keyword", "direction"], + " BT\r\n i2 ", + ["arrow", "-->"], + "f2\r\n ", + + ["keyword", "end"], + + ["keyword", "end"], + + "\r\n A ", + ["arrow", "-->"], + " TOP ", + ["arrow", "-->"], + " B\r\n B1 ", + ["arrow", "-->"], + " B2\r\n\r\n", + + ["keyword", "click"], + " nodeId callback\r\n", + + ["keyword", "click"], + " nodeId call callback", + ["punctuation", "("], + ["punctuation", ")"], + + ["keyword", "flowchart"], + " LR", + ["punctuation", ";"], + + "\r\n A", + ["arrow", "-->"], + "B", + ["punctuation", ";"], + + "\r\n B", + ["arrow", "-->"], + "C", + ["punctuation", ";"], + + "\r\n C", + ["arrow", "-->"], + "D", + ["punctuation", ";"], + + ["keyword", "click"], + " A callback ", + ["string", "\"Tooltip for a callback\""], + + ["keyword", "click"], + " B ", + ["string", "\"http://www.github.com\""], + ["string", "\"This is a tooltip for a link\""], + + ["keyword", "click"], + " A call callback", + ["punctuation", "("], + ["punctuation", ")"], + ["string", "\"Tooltip for a callback\""], + + ["keyword", "click"], + " B href ", + ["string", "\"http://www.github.com\""], + ["string", "\"This is a tooltip for a link\""], + + ["keyword", "flowchart"], + " LR", + ["punctuation", ";"], + + "\r\n A", + ["arrow", "-->"], + "B", + ["punctuation", ";"], + + "\r\n B", + ["arrow", "-->"], + "C", + ["punctuation", ";"], + + "\r\n C", + ["arrow", "-->"], + "D", + ["punctuation", ";"], + + "\r\n D", + ["arrow", "-->"], + "E", + ["punctuation", ";"], + + ["keyword", "click"], + " A ", + ["string", "\"http://www.github.com\""], + " _blank\r\n ", + + ["keyword", "click"], + " B ", + ["string", "\"http://www.github.com\""], + ["string", "\"Open this in a new tab\""], + " _blank\r\n ", + + ["keyword", "click"], + " C href ", + ["string", "\"http://www.github.com\""], + " _blank\r\n ", + + ["keyword", "click"], + " D href ", + ["string", "\"http://www.github.com\""], + ["string", "\"Open this in a new tab\""], + " _blank\r\n\r\n", + + ["keyword", "flowchart"], + " LR\r\n", + + ["comment", "%% this is a comment A -- text --> B{node}"], + + "\r\n A ", + ["inter-arrow-label", [ + ["arrow-head", "--"], + ["label", "text"], + ["arrow", "-->"] + ]], + " B ", + ["inter-arrow-label", [ + ["arrow-head", "--"], + ["label", "text2"], + ["arrow", "-->"] + ]], + " C\r\n\r\n", + + ["keyword", "linkStyle"], + " 3 ", + ["style", [ + ["property", "stroke"], + ["operator", ":"], + "#ff3", + ["punctuation", ","], + ["property", "stroke-width"], + ["operator", ":"], + "4px", + ["punctuation", ","], + ["property", "color"], + ["operator", ":"], + "red" + ]], + ["punctuation", ";"], + + ["keyword", "flowchart"], + " LR\r\n id1", + ["text", "(Start)"], + ["arrow", "-->"], + "id2", + ["text", "(Stop)"], + + ["keyword", "style"], + " id1 ", + ["style", [ + ["property", "fill"], + ["operator", ":"], + "#f9f", + ["punctuation", ","], + ["property", "stroke"], + ["operator", ":"], + "#333", + ["punctuation", ","], + ["property", "stroke-width"], + ["operator", ":"], + "4px" + ]], + + ["keyword", "style"], + " id2 ", + ["style", [ + ["property", "fill"], + ["operator", ":"], + "#bbf", + ["punctuation", ","], + ["property", "stroke"], + ["operator", ":"], + "#f66", + ["punctuation", ","], + ["property", "stroke-width"], + ["operator", ":"], + "2px", + ["punctuation", ","], + ["property", "color"], + ["operator", ":"], + "#fff", + ["punctuation", ","], + ["property", "stroke-dasharray"], + ["operator", ":"], + " 5 5" + ]], + + ["keyword", "classDef"], + " className ", + ["style", [ + ["property", "fill"], + ["operator", ":"], + "#f9f", + ["punctuation", ","], + ["property", "stroke"], + ["operator", ":"], + "#333", + ["punctuation", ","], + ["property", "stroke-width"], + ["operator", ":"], + "4px" + ]], + ["punctuation", ";"], + + ["keyword", "class"], " nodeId1 className", ["punctuation", ";"], + + ["keyword", "class"], " nodeId1,nodeId2 className", ["punctuation", ";"], + + ["keyword", "flowchart"], + " LR\r\n A", + ["operator", ":::"], + "someclass ", + ["arrow", "-->"], + " B\r\n ", + + ["keyword", "classDef"], + " someclass ", + ["style", [ + ["property", "fill"], + ["operator", ":"], + "#f96" + ]], + ["punctuation", ";"], + + ["keyword", "flowchart"], + " LR", + ["punctuation", ";"], + + "\r\n A", + ["arrow", "-->"], + "B", + ["text", "[AAABBB]"], + ["punctuation", ";"], + + "\r\n B", + ["arrow", "-->"], + "D", + ["punctuation", ";"], + + ["keyword", "class"], + " A cssClass", + ["punctuation", ";"], + + ["keyword", "classDef"], + " default ", + ["style", [ + ["property", "fill"], + ["operator", ":"], + "#f9f", + ["punctuation", ","], + ["property", "stroke"], + ["operator", ":"], + "#333", + ["punctuation", ","], + ["property", "stroke-width"], + ["operator", ":"], + "4px" + ]], + ["punctuation", ";"], + + ["keyword", "flowchart"], + " TD\r\n B", + ["text", "[\"fa:fa-twitter for peace\"]"], + + "\r\n B", + ["arrow", "-->"], + "C", + ["text", "[fa:fa-ban forbidden]"], + + "\r\n B", + ["arrow", "-->"], + "D", + ["text", "(fa:fa-spinner)"], + ["punctuation", ";"], + + "\r\n B", + ["arrow", "-->"], + "E", + ["text", "(A fa:fa-camera-retro perhaps?)"], + ["punctuation", ";"], + + ["keyword", "flowchart"], + " LR\r\n A", + ["text", "[Hard edge]"], + ["arrow", "-->"], + ["label", "|Link text|"], + " B", + ["text", "(Round edge)"], + + "\r\n B ", + ["arrow", "-->"], + " C", + ["text", "{Decision}"], + + "\r\n C ", + ["arrow", "-->"], + ["label", "|One|"], + " D", + ["text", "[Result one]"], + + "\r\n C ", + ["arrow", "-->"], + ["label", "|Two|"], + " E", + ["text", "[Result two]"], + + ["keyword", "flowchart"], + " LR", + ["punctuation", ";"], + + "\r\n A", + ["arrow", "-->"], + "B", + ["punctuation", ";"], + + "\r\n B", + ["arrow", "-->"], + "C", + ["punctuation", ";"], + + "\r\n C", + ["arrow", "-->"], + "D", + ["punctuation", ";"], + + ["keyword", "click"], + " A callback ", + ["string", "\"Tooltip\""], + + ["keyword", "click"], + " B ", + ["string", "\"http://www.github.com\""], + ["string", "\"This is a link\""], + + ["keyword", "click"], + " C call callback", + ["punctuation", "("], + ["punctuation", ")"], + ["string", "\"Tooltip\""], + + ["keyword", "click"], + " D href ", + ["string", "\"http://www.github.com\""], + ["string", "\"This is a link\""] +] diff --git a/tests/languages/mermaid/full_sequencediagram.test b/tests/languages/mermaid/full_sequencediagram.test new file mode 100644 index 0000000000..ec954bc24d --- /dev/null +++ b/tests/languages/mermaid/full_sequencediagram.test @@ -0,0 +1,389 @@ +sequenceDiagram + Alice->>John: Hello John, how are you? + John-->>Alice: Great! + Alice-)John: See you later! + +sequenceDiagram + participant John + participant Alice + Alice->>John: Hello John, how are you? + John-->>Alice: Great! + +sequenceDiagram + participant A as Alice + participant J as John + A->>J: Hello John, how are you? + J->>A: Great! + +[Actor][Arrow][Actor]:Message text + +sequenceDiagram + Alice->>John: Hello John, how are you? + activate John + John-->>Alice: Great! + deactivate John + +sequenceDiagram + Alice->>+John: Hello John, how are you? + John-->>-Alice: Great! + +sequenceDiagram + Alice->>+John: Hello John, how are you? + Alice->>+John: John, can you hear me? + John-->>-Alice: Hi Alice, I can hear you! + John-->>-Alice: I feel great! + +sequenceDiagram + participant John + Note right of John: Text in note + +sequenceDiagram + Alice->John: Hello John, how are you? + Note over Alice,John: A typical interaction + +loop Loop text +... statements ... +end + +sequenceDiagram + Alice->John: Hello John, how are you? + loop Every minute + John-->Alice: Great! + end + +alt Describing text +... statements ... +else +... statements ... +end + +opt Describing text +... statements ... +end + +sequenceDiagram + Alice->>Bob: Hello Bob, how are you? + alt is sick + Bob->>Alice: Not so good :( + else is well + Bob->>Alice: Feeling fresh like a daisy + end + opt Extra response + Bob->>Alice: Thanks for asking + end + +par [Action 1] +... statements ... +and [Action 2] +... statements ... +and [Action N] +... statements ... +end + +rect rgb(0, 255, 0) +... content ... +end + +rect rgba(0, 0, 255, .1) +... content ... +end + +sequenceDiagram + Alice->>John: Hello John, how are you? + %% this is a comment + John-->>Alice: Great! + +sequenceDiagram + A->>B: I #9829; you! + B->>A: I #9829; you #infin; times more! + +sequenceDiagram + autonumber + Alice->>John: Hello John, how are you? + loop Healthcheck + John->>John: Fight against hypochondria + end + Note right of John: Rational thoughts! + John-->>Alice: Great! + John->>Bob: How about you? + Bob-->>John: Jolly good! + +---------------------------------------------------- + +[ + ["keyword", "sequenceDiagram"], + + "\r\n Alice", + ["arrow", "->>"], + "John", + ["operator", ":"], + " Hello John, how are you?\r\n John", + ["arrow", "-->>"], + "Alice", + ["operator", ":"], + " Great!\r\n Alice", + ["arrow", "-)"], + "John", + ["operator", ":"], + " See you later!\r\n\r\n", + + ["keyword", "sequenceDiagram"], + + ["keyword", "participant"], + " John\r\n ", + + ["keyword", "participant"], + " Alice\r\n Alice", + ["arrow", "->>"], + "John", + ["operator", ":"], + " Hello John, how are you?\r\n John", + ["arrow", "-->>"], + "Alice", + ["operator", ":"], + " Great!\r\n\r\n", + + ["keyword", "sequenceDiagram"], + + ["keyword", "participant"], + " A as Alice\r\n ", + + ["keyword", "participant"], + " J as John\r\n A", + ["arrow", "->>"], + "J", + ["operator", ":"], + " Hello John, how are you?\r\n J", + ["arrow", "->>"], + "A", + ["operator", ":"], + " Great!\r\n\r\n", + + ["text", "[Actor]"], + ["text", "[Arrow]"], + ["text", "[Actor]"], + ["operator", ":"], + "Message text\r\n\r\n", + + ["keyword", "sequenceDiagram"], + + "\r\n Alice", + ["arrow", "->>"], + "John", + ["operator", ":"], + " Hello John, how are you?\r\n ", + + ["keyword", "activate"], + " John\r\n John", + ["arrow", "-->>"], + "Alice", + ["operator", ":"], + " Great!\r\n ", + + ["keyword", "deactivate"], + " John\r\n\r\n", + + ["keyword", "sequenceDiagram"], + + "\r\n Alice", + ["arrow", "->>"], + "+John", + ["operator", ":"], + " Hello John, how are you?\r\n John", + ["arrow", "-->>"], + "-Alice", + ["operator", ":"], + " Great!\r\n\r\n", + + ["keyword", "sequenceDiagram"], + + "\r\n Alice", + ["arrow", "->>"], + "+John", + ["operator", ":"], + " Hello John, how are you?\r\n Alice", + ["arrow", "->>"], + "+John", + ["operator", ":"], + " John, can you hear me?\r\n John", + ["arrow", "-->>"], + "-Alice", + ["operator", ":"], + " Hi Alice, I can hear you!\r\n John", + ["arrow", "-->>"], + "-Alice", + ["operator", ":"], + " I feel great!\r\n\r\n", + + ["keyword", "sequenceDiagram"], + + ["keyword", "participant"], + " John\r\n ", + + ["keyword", "Note right of"], + " John", + ["operator", ":"], + " Text in note\r\n\r\n", + + ["keyword", "sequenceDiagram"], + + "\r\n Alice", + ["arrow", "->"], + "John", + ["operator", ":"], + " Hello John, how are you?\r\n ", + + ["keyword", "Note over"], + " Alice,John", + ["operator", ":"], + " A typical interaction\r\n\r\n", + + ["keyword", "loop"], " Loop text\r\n... statements ...\r\n", + ["keyword", "end"], + + ["keyword", "sequenceDiagram"], + + "\r\n Alice", + ["arrow", "->"], + "John", + ["operator", ":"], + " Hello John, how are you?\r\n ", + + ["keyword", "loop"], + " Every minute\r\n John", + ["arrow", "-->"], + "Alice", + ["operator", ":"], + " Great!\r\n ", + + ["keyword", "end"], + + ["keyword", "alt"], " Describing text\r\n... statements ...\r\n", + ["keyword", "else"], + "\r\n... statements ...\r\n", + ["keyword", "end"], + + ["keyword", "opt"], " Describing text\r\n... statements ...\r\n", + ["keyword", "end"], + + ["keyword", "sequenceDiagram"], + + "\r\n Alice", + ["arrow", "->>"], + "Bob", + ["operator", ":"], + " Hello Bob, how are you?\r\n ", + + ["keyword", "alt"], + " is sick\r\n Bob", + ["arrow", "->>"], + "Alice", + ["operator", ":"], + " Not so good ", + ["operator", ":"], + ["punctuation", "("], + + ["keyword", "else"], + " is well\r\n Bob", + ["arrow", "->>"], + "Alice", + ["operator", ":"], + " Feeling fresh like a daisy\r\n ", + + ["keyword", "end"], + + ["keyword", "opt"], + " Extra response\r\n Bob", + ["arrow", "->>"], + "Alice", + ["operator", ":"], + " Thanks for asking\r\n ", + + ["keyword", "end"], + + ["keyword", "par"], ["text", "[Action 1]"], + "\r\n... statements ...\r\n", + ["keyword", "and"], ["text", "[Action 2]"], + "\r\n... statements ...\r\n", + ["keyword", "and"], ["text", "[Action N]"], + "\r\n... statements ...\r\n", + ["keyword", "end"], + + ["keyword", "rect"], " rgb", ["text", "(0, 255, 0)"], + "\r\n... content ...\r\n", + ["keyword", "end"], + + ["keyword", "rect"], " rgba", ["text", "(0, 0, 255, .1)"], + "\r\n... content ...\r\n", + ["keyword", "end"], + + ["keyword", "sequenceDiagram"], + + "\r\n Alice", + ["arrow", "->>"], + "John", + ["operator", ":"], + " Hello John, how are you?\r\n ", + + ["comment", "%% this is a comment"], + + "\r\n John", + ["arrow", "-->>"], + "Alice", + ["operator", ":"], + " Great!\r\n\r\n", + + ["keyword", "sequenceDiagram"], + + "\r\n A", + ["arrow", "->>"], + "B", + ["operator", ":"], + " I ", + ["entity", "#9829;"], + " you!\r\n B", + ["arrow", "->>"], + "A", + ["operator", ":"], + " I ", + ["entity", "#9829;"], + " you ", + ["entity", "#infin;"], + " times more!\r\n\r\n", + + ["keyword", "sequenceDiagram"], + + ["keyword", "autonumber"], + + "\r\n Alice", + ["arrow", "->>"], + "John", + ["operator", ":"], + " Hello John, how are you?\r\n ", + + ["keyword", "loop"], + " Healthcheck\r\n John", + ["arrow", "->>"], + "John", + ["operator", ":"], + " Fight against hypochondria\r\n ", + + ["keyword", "end"], + + ["keyword", "Note right of"], + " John", + ["operator", ":"], + " Rational thoughts!\r\n John", + ["arrow", "-->>"], + "Alice", + ["operator", ":"], + " Great!\r\n John", + ["arrow", "->>"], + "Bob", + ["operator", ":"], + " How about you?\r\n Bob", + ["arrow", "-->>"], + "John", + ["operator", ":"], + " Jolly good!" +] diff --git a/tests/languages/mermaid/full_statediagram.test b/tests/languages/mermaid/full_statediagram.test new file mode 100644 index 0000000000..a5d1f27bf4 --- /dev/null +++ b/tests/languages/mermaid/full_statediagram.test @@ -0,0 +1,430 @@ +stateDiagram-v2 + [*] --> Still + Still --> [*] + + Still --> Moving + Moving --> Still + Moving --> Crash + Crash --> [*] + +stateDiagram-v2 + s1 --> s2 + +stateDiagram-v2 + s1 --> s2: A transition + +stateDiagram-v2 + [*] --> s1 + s1 --> [*] + +stateDiagram-v2 + [*] --> First + state First { + [*] --> second + second --> [*] + } + +stateDiagram-v2 + [*] --> First + + state First { + [*] --> Second + + state Second { + [*] --> second + second --> Third + + state Third { + [*] --> third + third --> [*] + } + } + } + +stateDiagram-v2 + [*] --> First + First --> Second + First --> Third + + state First { + [*] --> fir + fir --> [*] + } + state Second { + [*] --> sec + sec --> [*] + } + state Third { + [*] --> thi + thi --> [*] + } + +stateDiagram-v2 + state if_state <> + [*] --> IsPositive + IsPositive --> if_state + if_state --> False: if n < 0 + if_state --> True : if n >= 0 + +stateDiagram-v2 + state fork_state <> + [*] --> fork_state + fork_state --> State2 + fork_state --> State3 + + state join_state <> + State2 --> join_state + State3 --> join_state + join_state --> State4 + State4 --> [*] + +stateDiagram-v2 + State1: The state with a note + note right of State1 + Important information! You can write + notes. + end note + State1 --> State2 + note left of State2 : This is the note to the left. + +stateDiagram-v2 + [*] --> Active + + state Active { + [*] --> NumLockOff + NumLockOff --> NumLockOn : EvNumLockPressed + NumLockOn --> NumLockOff : EvNumLockPressed + -- + [*] --> CapsLockOff + CapsLockOff --> CapsLockOn : EvCapsLockPressed + CapsLockOn --> CapsLockOff : EvCapsLockPressed + -- + [*] --> ScrollLockOff + ScrollLockOff --> ScrollLockOn : EvScrollLockPressed + ScrollLockOn --> ScrollLockOff : EvScrollLockPressed + } + +stateDiagram + direction LR + [*] --> A + A --> B + B --> C + state B { + direction LR + a --> b + } + B --> D + +stateDiagram-v2 + [*] --> Still + Still --> [*] +%% this is a comment + Still --> Moving + Moving --> Still %% another comment + Moving --> Crash + Crash --> [*] + +---------------------------------------------------- + +[ + ["keyword", "stateDiagram-v2"], + + ["text", "[*]"], + ["arrow", "-->"], + " Still\r\n Still ", + ["arrow", "-->"], + ["text", "[*]"], + + "\r\n\r\n Still ", + ["arrow", "-->"], + " Moving\r\n Moving ", + ["arrow", "-->"], + " Still\r\n Moving ", + ["arrow", "-->"], + " Crash\r\n Crash ", + ["arrow", "-->"], + ["text", "[*]"], + + ["keyword", "stateDiagram-v2"], + "\r\n s1 ", ["arrow", "-->"], " s2\r\n\r\n", + + ["keyword", "stateDiagram-v2"], + + "\r\n s1 ", + ["arrow", "-->"], + " s2", + ["operator", ":"], + " A transition\r\n\r\n", + + ["keyword", "stateDiagram-v2"], + + ["text", "[*]"], + ["arrow", "-->"], + " s1\r\n s1 ", + ["arrow", "-->"], + ["text", "[*]"], + + ["keyword", "stateDiagram-v2"], + + ["text", "[*]"], + ["arrow", "-->"], + " First\r\n ", + + ["keyword", "state"], + " First ", + ["punctuation", "{"], + + ["text", "[*]"], + ["arrow", "-->"], + " second\r\n second ", + ["arrow", "-->"], + ["text", "[*]"], + + ["punctuation", "}"], + + ["keyword", "stateDiagram-v2"], + ["text", "[*]"], ["arrow", "-->"], " First\r\n\r\n ", + + ["keyword", "state"], " First ", ["punctuation", "{"], + ["text", "[*]"], ["arrow", "-->"], " Second\r\n\r\n ", + + ["keyword", "state"], + " Second ", + ["punctuation", "{"], + + ["text", "[*]"], + ["arrow", "-->"], + " second\r\n second ", + ["arrow", "-->"], + " Third\r\n\r\n ", + + ["keyword", "state"], + " Third ", + ["punctuation", "{"], + + ["text", "[*]"], + ["arrow", "-->"], + " third\r\n third ", + ["arrow", "-->"], + ["text", "[*]"], + + ["punctuation", "}"], + + ["punctuation", "}"], + + ["punctuation", "}"], + + ["keyword", "stateDiagram-v2"], + + ["text", "[*]"], + ["arrow", "-->"], + " First\r\n First ", + ["arrow", "-->"], + " Second\r\n First ", + ["arrow", "-->"], + " Third\r\n\r\n ", + + ["keyword", "state"], + " First ", + ["punctuation", "{"], + + ["text", "[*]"], + ["arrow", "-->"], + " fir\r\n fir ", + ["arrow", "-->"], + ["text", "[*]"], + + ["punctuation", "}"], + + ["keyword", "state"], + " Second ", + ["punctuation", "{"], + + ["text", "[*]"], + ["arrow", "-->"], + " sec\r\n sec ", + ["arrow", "-->"], + ["text", "[*]"], + + ["punctuation", "}"], + + ["keyword", "state"], + " Third ", + ["punctuation", "{"], + + ["text", "[*]"], + ["arrow", "-->"], + " thi\r\n thi ", + ["arrow", "-->"], + ["text", "[*]"], + + ["punctuation", "}"], + + ["keyword", "stateDiagram-v2"], + + ["keyword", "state"], + " if_state ", + ["annotation", "<>"], + + ["text", "[*]"], + ["arrow", "-->"], + " IsPositive\r\n IsPositive ", + ["arrow", "-->"], + " if_state\r\n if_state ", + ["arrow", "-->"], + " False", + ["operator", ":"], + " if n < 0\r\n if_state ", + ["arrow", "-->"], + " True ", + ["operator", ":"], + " if n >= 0\r\n\r\n", + + ["keyword", "stateDiagram-v2"], + + ["keyword", "state"], + " fork_state ", + ["annotation", "<>"], + + ["text", "[*]"], + ["arrow", "-->"], + " fork_state\r\n fork_state ", + ["arrow", "-->"], + " State2\r\n fork_state ", + ["arrow", "-->"], + " State3\r\n\r\n ", + + ["keyword", "state"], + " join_state ", + ["annotation", "<>"], + + "\r\n State2 ", + ["arrow", "-->"], + " join_state\r\n State3 ", + ["arrow", "-->"], + " join_state\r\n join_state ", + ["arrow", "-->"], + " State4\r\n State4 ", + ["arrow", "-->"], + ["text", "[*]"], + + ["keyword", "stateDiagram-v2"], + + "\r\n State1", + ["operator", ":"], + " The state with a note\r\n ", + + ["keyword", "note right of"], + " State1\r\n Important information! You can write\r\n notes.\r\n ", + + ["keyword", "end note"], + + "\r\n State1 ", + ["arrow", "-->"], + " State2\r\n ", + + ["keyword", "note left of"], + " State2 ", + ["operator", ":"], + " This is the note to the left.\r\n\r\n", + + ["keyword", "stateDiagram-v2"], + ["text", "[*]"], ["arrow", "-->"], " Active\r\n\r\n ", + + ["keyword", "state"], + " Active ", + ["punctuation", "{"], + + ["text", "[*]"], + ["arrow", "-->"], + " NumLockOff\r\n NumLockOff ", + ["arrow", "-->"], + " NumLockOn ", + ["operator", ":"], + " EvNumLockPressed\r\n NumLockOn ", + ["arrow", "-->"], + " NumLockOff ", + ["operator", ":"], + " EvNumLockPressed\r\n ", + + ["arrow", "--"], + + ["text", "[*]"], + ["arrow", "-->"], + " CapsLockOff\r\n CapsLockOff ", + ["arrow", "-->"], + " CapsLockOn ", + ["operator", ":"], + " EvCapsLockPressed\r\n CapsLockOn ", + ["arrow", "-->"], + " CapsLockOff ", + ["operator", ":"], + " EvCapsLockPressed\r\n ", + + ["arrow", "--"], + + ["text", "[*]"], + ["arrow", "-->"], + " ScrollLockOff\r\n ScrollLockOff ", + ["arrow", "-->"], + " ScrollLockOn ", + ["operator", ":"], + " EvScrollLockPressed\r\n ScrollLockOn ", + ["arrow", "-->"], + " ScrollLockOff ", + ["operator", ":"], + " EvScrollLockPressed\r\n ", + + ["punctuation", "}"], + + ["keyword", "stateDiagram"], + + ["keyword", "direction"], + " LR\r\n ", + + ["text", "[*]"], + ["arrow", "-->"], + " A\r\n A ", + ["arrow", "-->"], + " B\r\n B ", + ["arrow", "-->"], + " C\r\n ", + + ["keyword", "state"], + " B ", + ["punctuation", "{"], + + ["keyword", "direction"], + " LR\r\n a ", + ["arrow", "-->"], + " b\r\n ", + + ["punctuation", "}"], + + "\r\n B ", + ["arrow", "-->"], + " D\r\n\r\n", + + ["keyword", "stateDiagram-v2"], + + ["text", "[*]"], + ["arrow", "-->"], + " Still\r\n Still ", + ["arrow", "-->"], + ["text", "[*]"], + + ["comment", "%% this is a comment"], + + "\r\n Still ", + ["arrow", "-->"], + " Moving\r\n Moving ", + ["arrow", "-->"], + " Still ", + ["comment", "%% another comment"], + + "\r\n Moving ", + ["arrow", "-->"], + " Crash\r\n Crash ", + ["arrow", "-->"], + ["text", "[*]"] +] diff --git a/tests/languages/mermaid/inter-arrow-label_feature.test b/tests/languages/mermaid/inter-arrow-label_feature.test new file mode 100644 index 0000000000..8c07daf5a3 --- /dev/null +++ b/tests/languages/mermaid/inter-arrow-label_feature.test @@ -0,0 +1,62 @@ +A -.s .- C +A -. s .- C +A -. "asdasd" .- C +A -- "asdasd" --> C +A -- "asdasd" --> C +A -- "asdasd" .- C +A -- "asdasd" === C +A -- "asdasd" ==> C + +---------------------------------------------------- + +[ + "A ", + ["inter-arrow-label", [ + ["arrow-head", "-."], + ["label", "s"], + ["arrow", ".-"] + ]], + " C\r\nA ", + ["inter-arrow-label", [ + ["arrow-head", "-."], + ["label", "s"], + ["arrow", ".-"] + ]], + " C\r\nA ", + ["inter-arrow-label", [ + ["arrow-head", "-."], + ["label", "\"asdasd\""], + ["arrow", ".-"] + ]], + " C\r\nA ", + ["inter-arrow-label", [ + ["arrow-head", "--"], + ["label", "\"asdasd\""], + ["arrow", "-->"] + ]], + " C\r\nA ", + ["inter-arrow-label", [ + ["arrow-head", "--"], + ["label", "\"asdasd\""], + ["arrow", "-->"] + ]], + " C\r\nA ", + ["inter-arrow-label", [ + ["arrow-head", "--"], + ["label", "\"asdasd\""], + ["arrow", ".-"] + ]], + " C\r\nA ", + ["inter-arrow-label", [ + ["arrow-head", "--"], + ["label", "\"asdasd\""], + ["arrow", "==="] + ]], + " C\r\nA ", + ["inter-arrow-label", [ + ["arrow-head", "--"], + ["label", "\"asdasd\""], + ["arrow", "==>"] + ]], + " C" +] diff --git a/tests/languages/mermaid/operator_feature.test b/tests/languages/mermaid/operator_feature.test new file mode 100644 index 0000000000..7ee9a5fbe6 --- /dev/null +++ b/tests/languages/mermaid/operator_feature.test @@ -0,0 +1,11 @@ +A & B + +: ::: + +---------------------------------------------------- + +[ + "A ", ["operator", "&"], " B\r\n\r\n", + + ["operator", ":"], ["operator", ":::"] +] From 8d0b74b521c02284119c8825badf92a588715635 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Sun, 12 Sep 2021 19:52:23 +0200 Subject: [PATCH 0893/1100] Clojure: Improved tokenization (#3056) --- components/prism-clojure.js | 30 +++++++++++++++---- components/prism-clojure.min.js | 2 +- tests/languages/clojure/function_feature.test | 13 ++++++++ tests/languages/clojure/number_feature.test | 27 +++++++++++++++++ .../clojure/operator_and_punctuation.test | 20 ------------- tests/languages/clojure/operator_feature.test | 11 +++++++ .../clojure/punctuation_feature.test | 15 ++++++++++ tests/languages/clojure/symbol_feature.test | 11 +++++++ 8 files changed, 102 insertions(+), 27 deletions(-) create mode 100644 tests/languages/clojure/function_feature.test create mode 100644 tests/languages/clojure/number_feature.test delete mode 100644 tests/languages/clojure/operator_and_punctuation.test create mode 100644 tests/languages/clojure/operator_feature.test create mode 100644 tests/languages/clojure/punctuation_feature.test create mode 100644 tests/languages/clojure/symbol_feature.test diff --git a/components/prism-clojure.js b/components/prism-clojure.js index 9c16d32ffe..7077e78a02 100644 --- a/components/prism-clojure.js +++ b/components/prism-clojure.js @@ -1,16 +1,34 @@ // Copied from https://github.com/jeluard/prism-clojure Prism.languages.clojure = { - 'comment': /;.*/, - 'string': { - pattern: /"(?:[^"\\]|\\.)*"/, + 'comment': { + pattern: /;.*/, greedy: true }, - 'operator': /(?:::|[:|'])\b[a-z][\w*+!?-]*\b/i, //used for symbols and keywords + 'string': [ + { + pattern: /"(?:[^"\\]|\\.)*"/, + greedy: true + }, + // characters + /\\\w+/ + ], + 'symbol': { + pattern: /(^|[\s()\[\]{},])::?[\w*+!?'<>=/.-]+/, + lookbehind: true + }, 'keyword': { - pattern: /([^\w+*'?-])(?:def|if|do|let|\.\.|quote|var|->>|->|fn|loop|recur|throw|try|monitor-enter|\.|new|set!|def-|defn|defn-|defmacro|defmulti|defmethod|defstruct|defonce|declare|definline|definterface|defprotocol|==|defrecord|>=|deftype|<=|defproject|ns|\*|\+|-|\/|<|=|>|accessor|agent|agent-errors|aget|alength|all-ns|alter|and|append-child|apply|array-map|aset|aset-boolean|aset-byte|aset-char|aset-double|aset-float|aset-int|aset-long|aset-short|assert|assoc|await|await-for|bean|binding|bit-and|bit-not|bit-or|bit-shift-left|bit-shift-right|bit-xor|boolean|branch\?|butlast|byte|cast|char|children|class|clear-agent-errors|comment|commute|comp|comparator|complement|concat|conj|cons|constantly|cond|if-not|construct-proxy|contains\?|count|create-ns|create-struct|cycle|dec|deref|difference|disj|dissoc|distinct|doall|doc|dorun|doseq|dosync|dotimes|doto|double|down|drop|drop-while|edit|end\?|ensure|eval|every\?|false\?|ffirst|file-seq|filter|find|find-doc|find-ns|find-var|first|float|flush|for|fnseq|frest|gensym|get-proxy-class|get|hash-map|hash-set|identical\?|identity|if-let|import|in-ns|inc|index|insert-child|insert-left|insert-right|inspect-table|inspect-tree|instance\?|int|interleave|intersection|into|into-array|iterate|join|key|keys|keyword|keyword\?|last|lazy-cat|lazy-cons|left|lefts|line-seq|list\*|list|load|load-file|locking|long|macroexpand|macroexpand-1|make-array|make-node|map|map-invert|map\?|mapcat|max|max-key|memfn|merge|merge-with|meta|min|min-key|name|namespace|neg\?|newline|next|nil\?|node|not|not-any\?|not-every\?|not=|ns-imports|ns-interns|ns-map|ns-name|ns-publics|ns-refers|ns-resolve|ns-unmap|nth|nthrest|or|parse|partial|path|peek|pop|pos\?|pr|pr-str|print|print-str|println|println-str|prn|prn-str|project|proxy|proxy-mappings|quot|rand|rand-int|range|re-find|re-groups|re-matcher|re-matches|re-pattern|re-seq|read|read-line|reduce|ref|ref-set|refer|rem|remove|remove-method|remove-ns|rename|rename-keys|repeat|replace|replicate|resolve|rest|resultset-seq|reverse|rfirst|right|rights|root|rrest|rseq|second|select|select-keys|send|send-off|seq|seq-zip|seq\?|set|short|slurp|some|sort|sort-by|sorted-map|sorted-map-by|sorted-set|special-symbol\?|split-at|split-with|str|string\?|struct|struct-map|subs|subvec|symbol|symbol\?|sync|take|take-nth|take-while|test|time|to-array|to-array-2d|tree-seq|true\?|union|up|update-proxy|val|vals|var-get|var-set|var\?|vector|vector-zip|vector\?|when|when-first|when-let|when-not|with-local-vars|with-meta|with-open|with-out-str|xml-seq|xml-zip|zero\?|zipmap|zipper)(?=[^\w+*'?-])/, + pattern: /(\()(?:-|->|->>|\.|\.\.|\*|\/|\+|<|<=|=|==|>|>=|accessor|agent|agent-errors|aget|alength|all-ns|alter|and|append-child|apply|array-map|aset|aset-boolean|aset-byte|aset-char|aset-double|aset-float|aset-int|aset-long|aset-short|assert|assoc|await|await-for|bean|binding|bit-and|bit-not|bit-or|bit-shift-left|bit-shift-right|bit-xor|boolean|branch\?|butlast|byte|cast|char|children|class|clear-agent-errors|comment|commute|comp|comparator|complement|concat|cond|conj|cons|constantly|construct-proxy|contains\?|count|create-ns|create-struct|cycle|dec|declare|def|def-|definline|definterface|defmacro|defmethod|defmulti|defn|defn-|defonce|defproject|defprotocol|defrecord|defstruct|deftype|deref|difference|disj|dissoc|distinct|do|doall|doc|dorun|doseq|dosync|dotimes|doto|double|down|drop|drop-while|edit|end\?|ensure|eval|every\?|false\?|ffirst|file-seq|filter|find|find-doc|find-ns|find-var|first|float|flush|fn|fnseq|for|frest|gensym|get|get-proxy-class|hash-map|hash-set|identical\?|identity|if|if-let|if-not|import|in-ns|inc|index|insert-child|insert-left|insert-right|inspect-table|inspect-tree|instance\?|int|interleave|intersection|into|into-array|iterate|join|key|keys|keyword|keyword\?|last|lazy-cat|lazy-cons|left|lefts|let|line-seq|list|list\*|load|load-file|locking|long|loop|macroexpand|macroexpand-1|make-array|make-node|map|map-invert|map\?|mapcat|max|max-key|memfn|merge|merge-with|meta|min|min-key|monitor-enter|name|namespace|neg\?|new|newline|next|nil\?|node|not|not-any\?|not-every\?|not=|ns|ns-imports|ns-interns|ns-map|ns-name|ns-publics|ns-refers|ns-resolve|ns-unmap|nth|nthrest|or|parse|partial|path|peek|pop|pos\?|pr|pr-str|print|print-str|println|println-str|prn|prn-str|project|proxy|proxy-mappings|quot|quote|rand|rand-int|range|re-find|re-groups|re-matcher|re-matches|re-pattern|re-seq|read|read-line|recur|reduce|ref|ref-set|refer|rem|remove|remove-method|remove-ns|rename|rename-keys|repeat|replace|replicate|resolve|rest|resultset-seq|reverse|rfirst|right|rights|root|rrest|rseq|second|select|select-keys|send|send-off|seq|seq-zip|seq\?|set|set!|short|slurp|some|sort|sort-by|sorted-map|sorted-map-by|sorted-set|special-symbol\?|split-at|split-with|str|string\?|struct|struct-map|subs|subvec|symbol|symbol\?|sync|take|take-nth|take-while|test|throw|time|to-array|to-array-2d|tree-seq|true\?|try|union|up|update-proxy|val|vals|var|var-get|var-set|var\?|vector|vector-zip|vector\?|when|when-first|when-let|when-not|with-local-vars|with-meta|with-open|with-out-str|xml-seq|xml-zip|zero\?|zipmap|zipper)(?=[\s)]|$)/, lookbehind: true }, 'boolean': /\b(?:true|false|nil)\b/, - 'number': /\b[\da-f]+\b/i, + 'number': { + pattern: /(^|[^\w$@])(?:\d+(?:[/.]\d+)?(?:e[+-]?\d+)?|0x[a-f0-9]+|[1-9]\d?r[a-z0-9]+)[lmn]?(?![\w$@])/i, + lookbehind: true + }, + 'function': { + pattern: /((?:^|[^'])\()[\w*+!?'<>=/.-]+(?=[\s)]|$)/, + lookbehind: true + }, + 'operator': /[#@^`~]/, 'punctuation': /[{}\[\](),]/ }; diff --git a/components/prism-clojure.min.js b/components/prism-clojure.min.js index 666e2b0df9..2437df95e0 100644 --- a/components/prism-clojure.min.js +++ b/components/prism-clojure.min.js @@ -1 +1 @@ -Prism.languages.clojure={comment:/;.*/,string:{pattern:/"(?:[^"\\]|\\.)*"/,greedy:!0},operator:/(?:::|[:|'])\b[a-z][\w*+!?-]*\b/i,keyword:{pattern:/([^\w+*'?-])(?:def|if|do|let|\.\.|quote|var|->>|->|fn|loop|recur|throw|try|monitor-enter|\.|new|set!|def-|defn|defn-|defmacro|defmulti|defmethod|defstruct|defonce|declare|definline|definterface|defprotocol|==|defrecord|>=|deftype|<=|defproject|ns|\*|\+|-|\/|<|=|>|accessor|agent|agent-errors|aget|alength|all-ns|alter|and|append-child|apply|array-map|aset|aset-boolean|aset-byte|aset-char|aset-double|aset-float|aset-int|aset-long|aset-short|assert|assoc|await|await-for|bean|binding|bit-and|bit-not|bit-or|bit-shift-left|bit-shift-right|bit-xor|boolean|branch\?|butlast|byte|cast|char|children|class|clear-agent-errors|comment|commute|comp|comparator|complement|concat|conj|cons|constantly|cond|if-not|construct-proxy|contains\?|count|create-ns|create-struct|cycle|dec|deref|difference|disj|dissoc|distinct|doall|doc|dorun|doseq|dosync|dotimes|doto|double|down|drop|drop-while|edit|end\?|ensure|eval|every\?|false\?|ffirst|file-seq|filter|find|find-doc|find-ns|find-var|first|float|flush|for|fnseq|frest|gensym|get-proxy-class|get|hash-map|hash-set|identical\?|identity|if-let|import|in-ns|inc|index|insert-child|insert-left|insert-right|inspect-table|inspect-tree|instance\?|int|interleave|intersection|into|into-array|iterate|join|key|keys|keyword|keyword\?|last|lazy-cat|lazy-cons|left|lefts|line-seq|list\*|list|load|load-file|locking|long|macroexpand|macroexpand-1|make-array|make-node|map|map-invert|map\?|mapcat|max|max-key|memfn|merge|merge-with|meta|min|min-key|name|namespace|neg\?|newline|next|nil\?|node|not|not-any\?|not-every\?|not=|ns-imports|ns-interns|ns-map|ns-name|ns-publics|ns-refers|ns-resolve|ns-unmap|nth|nthrest|or|parse|partial|path|peek|pop|pos\?|pr|pr-str|print|print-str|println|println-str|prn|prn-str|project|proxy|proxy-mappings|quot|rand|rand-int|range|re-find|re-groups|re-matcher|re-matches|re-pattern|re-seq|read|read-line|reduce|ref|ref-set|refer|rem|remove|remove-method|remove-ns|rename|rename-keys|repeat|replace|replicate|resolve|rest|resultset-seq|reverse|rfirst|right|rights|root|rrest|rseq|second|select|select-keys|send|send-off|seq|seq-zip|seq\?|set|short|slurp|some|sort|sort-by|sorted-map|sorted-map-by|sorted-set|special-symbol\?|split-at|split-with|str|string\?|struct|struct-map|subs|subvec|symbol|symbol\?|sync|take|take-nth|take-while|test|time|to-array|to-array-2d|tree-seq|true\?|union|up|update-proxy|val|vals|var-get|var-set|var\?|vector|vector-zip|vector\?|when|when-first|when-let|when-not|with-local-vars|with-meta|with-open|with-out-str|xml-seq|xml-zip|zero\?|zipmap|zipper)(?=[^\w+*'?-])/,lookbehind:!0},boolean:/\b(?:true|false|nil)\b/,number:/\b[\da-f]+\b/i,punctuation:/[{}\[\](),]/}; \ No newline at end of file +Prism.languages.clojure={comment:{pattern:/;.*/,greedy:!0},string:[{pattern:/"(?:[^"\\]|\\.)*"/,greedy:!0},/\\\w+/],symbol:{pattern:/(^|[\s()\[\]{},])::?[\w*+!?'<>=/.-]+/,lookbehind:!0},keyword:{pattern:/(\()(?:-|->|->>|\.|\.\.|\*|\/|\+|<|<=|=|==|>|>=|accessor|agent|agent-errors|aget|alength|all-ns|alter|and|append-child|apply|array-map|aset|aset-boolean|aset-byte|aset-char|aset-double|aset-float|aset-int|aset-long|aset-short|assert|assoc|await|await-for|bean|binding|bit-and|bit-not|bit-or|bit-shift-left|bit-shift-right|bit-xor|boolean|branch\?|butlast|byte|cast|char|children|class|clear-agent-errors|comment|commute|comp|comparator|complement|concat|cond|conj|cons|constantly|construct-proxy|contains\?|count|create-ns|create-struct|cycle|dec|declare|def|def-|definline|definterface|defmacro|defmethod|defmulti|defn|defn-|defonce|defproject|defprotocol|defrecord|defstruct|deftype|deref|difference|disj|dissoc|distinct|do|doall|doc|dorun|doseq|dosync|dotimes|doto|double|down|drop|drop-while|edit|end\?|ensure|eval|every\?|false\?|ffirst|file-seq|filter|find|find-doc|find-ns|find-var|first|float|flush|fn|fnseq|for|frest|gensym|get|get-proxy-class|hash-map|hash-set|identical\?|identity|if|if-let|if-not|import|in-ns|inc|index|insert-child|insert-left|insert-right|inspect-table|inspect-tree|instance\?|int|interleave|intersection|into|into-array|iterate|join|key|keys|keyword|keyword\?|last|lazy-cat|lazy-cons|left|lefts|let|line-seq|list|list\*|load|load-file|locking|long|loop|macroexpand|macroexpand-1|make-array|make-node|map|map-invert|map\?|mapcat|max|max-key|memfn|merge|merge-with|meta|min|min-key|monitor-enter|name|namespace|neg\?|new|newline|next|nil\?|node|not|not-any\?|not-every\?|not=|ns|ns-imports|ns-interns|ns-map|ns-name|ns-publics|ns-refers|ns-resolve|ns-unmap|nth|nthrest|or|parse|partial|path|peek|pop|pos\?|pr|pr-str|print|print-str|println|println-str|prn|prn-str|project|proxy|proxy-mappings|quot|quote|rand|rand-int|range|re-find|re-groups|re-matcher|re-matches|re-pattern|re-seq|read|read-line|recur|reduce|ref|ref-set|refer|rem|remove|remove-method|remove-ns|rename|rename-keys|repeat|replace|replicate|resolve|rest|resultset-seq|reverse|rfirst|right|rights|root|rrest|rseq|second|select|select-keys|send|send-off|seq|seq-zip|seq\?|set|set!|short|slurp|some|sort|sort-by|sorted-map|sorted-map-by|sorted-set|special-symbol\?|split-at|split-with|str|string\?|struct|struct-map|subs|subvec|symbol|symbol\?|sync|take|take-nth|take-while|test|throw|time|to-array|to-array-2d|tree-seq|true\?|try|union|up|update-proxy|val|vals|var|var-get|var-set|var\?|vector|vector-zip|vector\?|when|when-first|when-let|when-not|with-local-vars|with-meta|with-open|with-out-str|xml-seq|xml-zip|zero\?|zipmap|zipper)(?=[\s)]|$)/,lookbehind:!0},boolean:/\b(?:true|false|nil)\b/,number:{pattern:/(^|[^\w$@])(?:\d+(?:[/.]\d+)?(?:e[+-]?\d+)?|0x[a-f0-9]+|[1-9]\d?r[a-z0-9]+)[lmn]?(?![\w$@])/i,lookbehind:!0},function:{pattern:/((?:^|[^'])\()[\w*+!?'<>=/.-]+(?=[\s)]|$)/,lookbehind:!0},operator:/[#@^`~]/,punctuation:/[{}\[\](),]/}; \ No newline at end of file diff --git a/tests/languages/clojure/function_feature.test b/tests/languages/clojure/function_feature.test new file mode 100644 index 0000000000..28fd4a5f83 --- /dev/null +++ b/tests/languages/clojure/function_feature.test @@ -0,0 +1,13 @@ +(foo args) + +; not a function +'(a b c) + +---------------------------------------------------- + +[ + ["punctuation", "("], ["function", "foo"], " args", ["punctuation", ")"], + + ["comment", "; not a function"], + "\r\n'", ["punctuation", "("], "a b c", ["punctuation", ")"] +] diff --git a/tests/languages/clojure/number_feature.test b/tests/languages/clojure/number_feature.test new file mode 100644 index 0000000000..7ca0213914 --- /dev/null +++ b/tests/languages/clojure/number_feature.test @@ -0,0 +1,27 @@ +123 +01234 +0xFFF +2r0101011 +8r52 +36r16 +1.0 +1M +2/3 +0.6666666666666666 +36786883868216818816N + +---------------------------------------------------- + +[ + ["number", "123"], + ["number", "01234"], + ["number", "0xFFF"], + ["number", "2r0101011"], + ["number", "8r52"], + ["number", "36r16"], + ["number", "1.0"], + ["number", "1M"], + ["number", "2/3"], + ["number", "0.6666666666666666"], + ["number", "36786883868216818816N"] +] diff --git a/tests/languages/clojure/operator_and_punctuation.test b/tests/languages/clojure/operator_and_punctuation.test deleted file mode 100644 index e90acb631d..0000000000 --- a/tests/languages/clojure/operator_and_punctuation.test +++ /dev/null @@ -1,20 +0,0 @@ -(::example [x y] (:kebab-case x y)) - ----------------------------------------------------- - -[ - ["punctuation", "("], - ["operator", "::example"], - ["punctuation", "["], - "x y", - ["punctuation", "]"], - ["punctuation", "("], - ["operator", ":kebab-case"], - " x y", - ["punctuation", ")"], - ["punctuation", ")"] -] - ----------------------------------------------------- - -Checks for operators and punctuation. \ No newline at end of file diff --git a/tests/languages/clojure/operator_feature.test b/tests/languages/clojure/operator_feature.test new file mode 100644 index 0000000000..7c57567c97 --- /dev/null +++ b/tests/languages/clojure/operator_feature.test @@ -0,0 +1,11 @@ +# @ ^ ` ~ + +---------------------------------------------------- + +[ + ["operator", "#"], + ["operator", "@"], + ["operator", "^"], + ["operator", "`"], + ["operator", "~"] +] diff --git a/tests/languages/clojure/punctuation_feature.test b/tests/languages/clojure/punctuation_feature.test new file mode 100644 index 0000000000..ea9bbc2188 --- /dev/null +++ b/tests/languages/clojure/punctuation_feature.test @@ -0,0 +1,15 @@ +{ } [ ] ( ) +, + +---------------------------------------------------- + +[ + ["punctuation", "{"], + ["punctuation", "}"], + ["punctuation", "["], + ["punctuation", "]"], + ["punctuation", "("], + ["punctuation", ")"], + + ["punctuation", ","] +] diff --git a/tests/languages/clojure/symbol_feature.test b/tests/languages/clojure/symbol_feature.test new file mode 100644 index 0000000000..e43df4fd9c --- /dev/null +++ b/tests/languages/clojure/symbol_feature.test @@ -0,0 +1,11 @@ +:foo +:foo/bar-baz +::foo + +---------------------------------------------------- + +[ + ["symbol", ":foo"], + ["symbol", ":foo/bar-baz"], + ["symbol", "::foo"] +] From 23cd9b655bc5f0289cfec79c5d89192708a32604 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Sun, 12 Sep 2021 19:52:44 +0200 Subject: [PATCH 0894/1100] Added support for GAP (CAS) (#3054) --- components.js | 2 +- components.json | 4 + components/prism-gap.js | 54 +++++ components/prism-gap.min.js | 1 + examples/prism-gap.html | 15 ++ plugins/show-language/prism-show-language.js | 1 + .../show-language/prism-show-language.min.js | 2 +- tests/languages/gap/boolean_feature.test | 9 + tests/languages/gap/comment_feature.test | 7 + tests/languages/gap/keyword_feature.test | 71 ++++++ tests/languages/gap/number_feature.test | 43 ++++ tests/languages/gap/operator_feature.test | 34 +++ tests/languages/gap/punctuation_feature.test | 18 ++ tests/languages/gap/shell_feature.test | 216 ++++++++++++++++++ tests/languages/gap/string_feature.test | 27 +++ 15 files changed, 502 insertions(+), 2 deletions(-) create mode 100644 components/prism-gap.js create mode 100644 components/prism-gap.min.js create mode 100644 examples/prism-gap.html create mode 100644 tests/languages/gap/boolean_feature.test create mode 100644 tests/languages/gap/comment_feature.test create mode 100644 tests/languages/gap/keyword_feature.test create mode 100644 tests/languages/gap/number_feature.test create mode 100644 tests/languages/gap/operator_feature.test create mode 100644 tests/languages/gap/punctuation_feature.test create mode 100644 tests/languages/gap/shell_feature.test create mode 100644 tests/languages/gap/string_feature.test diff --git a/components.js b/components.js index b56c91ce0a..f249e282c1 100644 --- a/components.js +++ b/components.js @@ -1,2 +1,2 @@ -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml","ssml","atom","rss"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","ssml":"SSML","atom":"Atom","rss":"RSS"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","optional":"regex","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"ABNF","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"agda":{"title":"Agda","owner":"xy-ren"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apex":{"title":"Apex","require":["clike","sql"],"owner":"RunDevelopment"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"dkern"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"avro-idl":{"title":"Avro IDL","alias":"avdl","owner":"RunDevelopment"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"bicep":{"title":"Bicep","owner":"johnnyreilly"},"birb":{"title":"Birb","require":"clike","owner":"Calamity210"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"BNF","alias":"rbnf","aliasTitles":{"rbnf":"RBNF"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"bsl":{"title":"BSL (1C:Enterprise)","alias":"oscript","aliasTitles":{"oscript":"OneScript"},"owner":"Diversus23"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cfscript":{"title":"CFScript","require":"clike","alias":"cfc","owner":"mjclemente"},"chaiscript":{"title":"ChaiScript","require":["clike","cpp"],"owner":"RunDevelopment"},"cil":{"title":"CIL","owner":"sbrl"},"clojure":{"title":"Clojure","owner":"troglotit"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"cobol":{"title":"COBOL","owner":"RunDevelopment"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"coq":{"title":"Coq","owner":"RunDevelopment"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"csv":{"title":"CSV","owner":"RunDevelopment"},"cypher":{"title":"Cypher","owner":"RunDevelopment"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dataweave":{"title":"DataWeave","owner":"machaval"},"dax":{"title":"DAX","owner":"peterbud"},"dhall":{"title":"Dhall","owner":"RunDevelopment"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"dot":{"title":"DOT (Graphviz)","alias":"gv","optional":"markup","owner":"RunDevelopment"},"ebnf":{"title":"EBNF","owner":"RunDevelopment"},"editorconfig":{"title":"EditorConfig","owner":"osipxd"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"false":{"title":"False","owner":"edukisto"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"c","owner":"Golmote"},"gn":{"title":"GN","alias":"gni","owner":"RunDevelopment"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","optional":"markdown","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","alias":"hbs","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"hlsl":{"title":"HLSL","require":"c","owner":"RunDevelopment"},"hoon":{"title":"Hoon","owner":"matildepark"},"http":{"title":"HTTP","optional":["css","javascript","json","markup","uri"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"icu-message-format":{"title":"ICU Message Format","owner":"RunDevelopment"},"idris":{"title":"Idris","alias":"idr","owner":"KeenS","require":"haskell"},"ignore":{"title":".ignore","owner":"osipxd","alias":["gitignore","hgignore","npmignore"],"aliasTitles":{"gitignore":".gitignore","hgignore":".hgignore","npmignore":".npmignore"}},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jexl":{"title":"Jexl","owner":"czosel"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike","typescript"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","alias":"webmanifest","aliasTitles":{"webmanifest":"Web App Manifest"},"owner":"CupOfTea696"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"jsstacktrace":{"title":"JS stack trace","owner":"sbrl"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup","sql"],"owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","alias":["kt","kts"],"aliasTitles":{"kts":"Kotlin Script"},"require":"clike","owner":"Golmote"},"kumir":{"title":"KuMir (КуМир)","alias":"kum","owner":"edukisto"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","require":"markup-templating","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"log":{"title":"Log file","optional":"javastacktrace","owner":"RunDevelopment"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","optional":"yaml","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mermaid":{"title":"Mermaid","owner":"RunDevelopment"},"mizar":{"title":"Mizar","owner":"Golmote"},"mongodb":{"title":"MongoDB","owner":"airs0urce","require":"javascript"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"naniscript":{"title":"Naninovel Script","owner":"Elringus","alias":"nani"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nevod":{"title":"Nevod","owner":"nezaboodka"},"nginx":{"title":"nginx","owner":"volado"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"openqasm":{"title":"OpenQasm","alias":"qasm","owner":"RunDevelopment"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"psl":{"title":"PATROL Scripting Language","owner":"bertysentry"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":"markup-templating","owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"promql":{"title":"PromQL","owner":"arendjr"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"purebasic":{"title":"PureBasic","require":"clike","alias":"pbfasm","owner":"HeX0R101"},"purescript":{"title":"PureScript","require":"haskell","alias":"purs","owner":"sriharshachilakapati"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"qsharp":{"title":"Q#","require":"clike","alias":"qs","owner":"fedonman"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"racket":{"title":"Racket","require":"scheme","alias":"rkt","owner":"RunDevelopment"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","owner":"RunDevelopment"},"rego":{"title":"Rego","owner":"JordanSh"},"renpy":{"title":"Ren'py","alias":"rpy","owner":"HyuchiaDiego"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","optional":"css-extras","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","alias":["sh-session","shellsession"],"owner":"RunDevelopment"},"smali":{"title":"Smali","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sml":{"title":"SML","alias":"smlnj","aliasTitles":{"smlnj":"SML/NJ"},"owner":"RunDevelopment"},"solidity":{"title":"Solidity (Ethereum)","alias":"sol","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"squirrel":{"title":"Squirrel","require":"clike","owner":"RunDevelopment"},"stan":{"title":"Stan","owner":"RunDevelopment"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","owner":"chrischares"},"systemd":{"title":"Systemd configuration file","owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","vbnet"],"owner":"RunDevelopment"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"typoscript":{"title":"TypoScript","alias":"tsconfig","aliasTitles":{"tsconfig":"TSConfig"},"owner":"dkern"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"uri":{"title":"URI","alias":"url","aliasTitles":{"url":"URL"},"owner":"RunDevelopment"},"v":{"title":"V","require":"clike","owner":"taggon"},"vala":{"title":"Vala","require":"clike","optional":"regex","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":["vb","vba"],"aliasTitles":{"vba":"VBA"},"owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"wolfram":{"title":"Wolfram language","alias":["mathematica","nb","wl"],"aliasTitles":{"mathematica":"Mathematica","nb":"Mathematica Notebook"},"owner":"msollami"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xml-doc":{"title":"XML doc (.net)","require":"markup","modify":["csharp","fsharp","vbnet"],"owner":"RunDevelopment"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"yang":{"title":"YANG","owner":"RunDevelopment"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword for fine-grained highlighting.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml","ssml","atom","rss"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","ssml":"SSML","atom":"Atom","rss":"RSS"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","optional":"regex","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"ABNF","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"agda":{"title":"Agda","owner":"xy-ren"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apex":{"title":"Apex","require":["clike","sql"],"owner":"RunDevelopment"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"dkern"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"avro-idl":{"title":"Avro IDL","alias":"avdl","owner":"RunDevelopment"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"bicep":{"title":"Bicep","owner":"johnnyreilly"},"birb":{"title":"Birb","require":"clike","owner":"Calamity210"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"BNF","alias":"rbnf","aliasTitles":{"rbnf":"RBNF"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"bsl":{"title":"BSL (1C:Enterprise)","alias":"oscript","aliasTitles":{"oscript":"OneScript"},"owner":"Diversus23"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cfscript":{"title":"CFScript","require":"clike","alias":"cfc","owner":"mjclemente"},"chaiscript":{"title":"ChaiScript","require":["clike","cpp"],"owner":"RunDevelopment"},"cil":{"title":"CIL","owner":"sbrl"},"clojure":{"title":"Clojure","owner":"troglotit"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"cobol":{"title":"COBOL","owner":"RunDevelopment"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"coq":{"title":"Coq","owner":"RunDevelopment"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"csv":{"title":"CSV","owner":"RunDevelopment"},"cypher":{"title":"Cypher","owner":"RunDevelopment"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dataweave":{"title":"DataWeave","owner":"machaval"},"dax":{"title":"DAX","owner":"peterbud"},"dhall":{"title":"Dhall","owner":"RunDevelopment"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"dot":{"title":"DOT (Graphviz)","alias":"gv","optional":"markup","owner":"RunDevelopment"},"ebnf":{"title":"EBNF","owner":"RunDevelopment"},"editorconfig":{"title":"EditorConfig","owner":"osipxd"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"false":{"title":"False","owner":"edukisto"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"gap":{"title":"GAP (CAS)","owner":"RunDevelopment"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"c","owner":"Golmote"},"gn":{"title":"GN","alias":"gni","owner":"RunDevelopment"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","optional":"markdown","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","alias":"hbs","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"hlsl":{"title":"HLSL","require":"c","owner":"RunDevelopment"},"hoon":{"title":"Hoon","owner":"matildepark"},"http":{"title":"HTTP","optional":["css","javascript","json","markup","uri"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"icu-message-format":{"title":"ICU Message Format","owner":"RunDevelopment"},"idris":{"title":"Idris","alias":"idr","owner":"KeenS","require":"haskell"},"ignore":{"title":".ignore","owner":"osipxd","alias":["gitignore","hgignore","npmignore"],"aliasTitles":{"gitignore":".gitignore","hgignore":".hgignore","npmignore":".npmignore"}},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jexl":{"title":"Jexl","owner":"czosel"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike","typescript"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","alias":"webmanifest","aliasTitles":{"webmanifest":"Web App Manifest"},"owner":"CupOfTea696"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"jsstacktrace":{"title":"JS stack trace","owner":"sbrl"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup","sql"],"owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","alias":["kt","kts"],"aliasTitles":{"kts":"Kotlin Script"},"require":"clike","owner":"Golmote"},"kumir":{"title":"KuMir (КуМир)","alias":"kum","owner":"edukisto"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","require":"markup-templating","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"log":{"title":"Log file","optional":"javastacktrace","owner":"RunDevelopment"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","optional":"yaml","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mermaid":{"title":"Mermaid","owner":"RunDevelopment"},"mizar":{"title":"Mizar","owner":"Golmote"},"mongodb":{"title":"MongoDB","owner":"airs0urce","require":"javascript"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"naniscript":{"title":"Naninovel Script","owner":"Elringus","alias":"nani"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nevod":{"title":"Nevod","owner":"nezaboodka"},"nginx":{"title":"nginx","owner":"volado"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"openqasm":{"title":"OpenQasm","alias":"qasm","owner":"RunDevelopment"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"psl":{"title":"PATROL Scripting Language","owner":"bertysentry"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":"markup-templating","owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"promql":{"title":"PromQL","owner":"arendjr"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"purebasic":{"title":"PureBasic","require":"clike","alias":"pbfasm","owner":"HeX0R101"},"purescript":{"title":"PureScript","require":"haskell","alias":"purs","owner":"sriharshachilakapati"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"qsharp":{"title":"Q#","require":"clike","alias":"qs","owner":"fedonman"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"racket":{"title":"Racket","require":"scheme","alias":"rkt","owner":"RunDevelopment"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","owner":"RunDevelopment"},"rego":{"title":"Rego","owner":"JordanSh"},"renpy":{"title":"Ren'py","alias":"rpy","owner":"HyuchiaDiego"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","optional":"css-extras","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","alias":["sh-session","shellsession"],"owner":"RunDevelopment"},"smali":{"title":"Smali","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sml":{"title":"SML","alias":"smlnj","aliasTitles":{"smlnj":"SML/NJ"},"owner":"RunDevelopment"},"solidity":{"title":"Solidity (Ethereum)","alias":"sol","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"squirrel":{"title":"Squirrel","require":"clike","owner":"RunDevelopment"},"stan":{"title":"Stan","owner":"RunDevelopment"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","owner":"chrischares"},"systemd":{"title":"Systemd configuration file","owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","vbnet"],"owner":"RunDevelopment"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"typoscript":{"title":"TypoScript","alias":"tsconfig","aliasTitles":{"tsconfig":"TSConfig"},"owner":"dkern"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"uri":{"title":"URI","alias":"url","aliasTitles":{"url":"URL"},"owner":"RunDevelopment"},"v":{"title":"V","require":"clike","owner":"taggon"},"vala":{"title":"Vala","require":"clike","optional":"regex","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":["vb","vba"],"aliasTitles":{"vba":"VBA"},"owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"wolfram":{"title":"Wolfram language","alias":["mathematica","nb","wl"],"aliasTitles":{"mathematica":"Mathematica","nb":"Mathematica Notebook"},"owner":"msollami"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xml-doc":{"title":"XML doc (.net)","require":"markup","modify":["csharp","fsharp","vbnet"],"owner":"RunDevelopment"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"yang":{"title":"YANG","owner":"RunDevelopment"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword for fine-grained highlighting.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; if (typeof module !== 'undefined' && module.exports) { module.exports = components; } \ No newline at end of file diff --git a/components.json b/components.json index 6b17a85f6f..e0578bcf9e 100644 --- a/components.json +++ b/components.json @@ -446,6 +446,10 @@ "require": "clike", "owner": "LiarOnce" }, + "gap": { + "title": "GAP (CAS)", + "owner": "RunDevelopment" + }, "gcode": { "title": "G-code", "owner": "RunDevelopment" diff --git a/components/prism-gap.js b/components/prism-gap.js new file mode 100644 index 0000000000..be53a6eca7 --- /dev/null +++ b/components/prism-gap.js @@ -0,0 +1,54 @@ +// https://www.gap-system.org/Manuals/doc/ref/chap4.html +// https://www.gap-system.org/Manuals/doc/ref/chap27.html + +Prism.languages.gap = { + 'shell': { + pattern: /^gap>[\s\S]*?(?=^gap>|$(?![\s\S]))/m, + greedy: true, + inside: { + 'gap': { + pattern: /^(gap>).+(?:(?:\r(?:\n|(?!\n))|\n)>.*)*/, + lookbehind: true, + inside: null // see below + }, + 'punctuation': /^gap>/ + } + }, + + 'comment': { + pattern: /#.*/, + greedy: true + }, + 'string': { + pattern: /(^|[^\\'"])(?:'(?:[^\r\n\\']|\\.){1,10}'|"(?:[^\r\n\\"]|\\.)*"(?!")|"""[\s\S]*?""")/, + lookbehind: true, + greedy: true, + inside: { + 'continuation': { + pattern: /([\r\n])>/, + lookbehind: true, + alias: 'punctuation' + } + } + }, + + 'keyword': /\b(?:Assert|Info|IsBound|QUIT|TryNextMethod|Unbind|and|atomic|break|continue|do|elif|else|end|fi|for|function|if|in|local|mod|not|od|or|quit|readonly|readwrite|rec|repeat|return|then|until|while)\b/, + 'boolean': /\b(?:false|true)\b/, + + 'function': /\b[a-z_]\w*(?=\s*\()/i, + + 'number': { + pattern: /(^|[^\w.]|\.\.)(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?(?:_[a-z]?)?(?=$|[^\w.]|\.\.)/, + lookbehind: true + }, + + 'continuation': { + pattern: /([\r\n])>/, + lookbehind: true, + alias: 'punctuation' + }, + 'operator': /->|[-+*/^~=!]|<>|[<>]=?|:=|\.\./, + 'punctuation': /[()[\]{},;.:]/ +}; + +Prism.languages.gap.shell.inside.gap.inside = Prism.languages.gap; diff --git a/components/prism-gap.min.js b/components/prism-gap.min.js new file mode 100644 index 0000000000..af65ff2eb4 --- /dev/null +++ b/components/prism-gap.min.js @@ -0,0 +1 @@ +Prism.languages.gap={shell:{pattern:/^gap>[\s\S]*?(?=^gap>|$(?![\s\S]))/m,greedy:!0,inside:{gap:{pattern:/^(gap>).+(?:(?:\r(?:\n|(?!\n))|\n)>.*)*/,lookbehind:!0,inside:null},punctuation:/^gap>/}},comment:{pattern:/#.*/,greedy:!0},string:{pattern:/(^|[^\\'"])(?:'(?:[^\r\n\\']|\\.){1,10}'|"(?:[^\r\n\\"]|\\.)*"(?!")|"""[\s\S]*?""")/,lookbehind:!0,greedy:!0,inside:{continuation:{pattern:/([\r\n])>/,lookbehind:!0,alias:"punctuation"}}},keyword:/\b(?:Assert|Info|IsBound|QUIT|TryNextMethod|Unbind|and|atomic|break|continue|do|elif|else|end|fi|for|function|if|in|local|mod|not|od|or|quit|readonly|readwrite|rec|repeat|return|then|until|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:{pattern:/(^|[^\w.]|\.\.)(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?(?:_[a-z]?)?(?=$|[^\w.]|\.\.)/,lookbehind:!0},continuation:{pattern:/([\r\n])>/,lookbehind:!0,alias:"punctuation"},operator:/->|[-+*/^~=!]|<>|[<>]=?|:=|\.\./,punctuation:/[()[\]{},;.:]/},Prism.languages.gap.shell.inside.gap.inside=Prism.languages.gap; \ No newline at end of file diff --git a/examples/prism-gap.html b/examples/prism-gap.html new file mode 100644 index 0000000000..01e3f08cd7 --- /dev/null +++ b/examples/prism-gap.html @@ -0,0 +1,15 @@ +

            Full example

            +
            # Source: https://www.gap-system.org/Manuals/doc/ref/chap4.html#X815F71EA7BC0EB6F
            +gap> fib := function ( n )
            +>     local f1, f2, f3, i;
            +>     f1 := 1; f2 := 1;
            +>     for i in [3..n] do
            +>       f3 := f1 + f2;
            +>       f1 := f2;
            +>       f2 := f3;
            +>     od;
            +>     return f2;
            +>   end;;
            +gap> List( [1..10], fib );
            +[ 1, 1, 2, 3, 5, 8, 13, 21, 34, 55 ]
            +
            diff --git a/plugins/show-language/prism-show-language.js b/plugins/show-language/prism-show-language.js index 7d38145f4a..15945f4228 100644 --- a/plugins/show-language/prism-show-language.js +++ b/plugins/show-language/prism-show-language.js @@ -87,6 +87,7 @@ "ftl": "FreeMarker Template Language", "gml": "GameMaker Language", "gamemakerlanguage": "GameMaker Language", + "gap": "GAP (CAS)", "gcode": "G-code", "gdscript": "GDScript", "gedcom": "GEDCOM", diff --git a/plugins/show-language/prism-show-language.min.js b/plugins/show-language/prism-show-language.min.js index 58e4f48831..4f7ecafa40 100644 --- a/plugins/show-language/prism-show-language.min.js +++ b/plugins/show-language/prism-show-language.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof Prism&&"undefined"!=typeof document)if(Prism.plugins.toolbar){var i={none:"Plain text",plain:"Plain text",plaintext:"Plain text",text:"Plain text",txt:"Plain text",html:"HTML",xml:"XML",svg:"SVG",mathml:"MathML",ssml:"SSML",rss:"RSS",css:"CSS",clike:"C-like",js:"JavaScript",abap:"ABAP",abnf:"ABNF",al:"AL",antlr4:"ANTLR4",g4:"ANTLR4",apacheconf:"Apache Configuration",apl:"APL",aql:"AQL",arff:"ARFF",asciidoc:"AsciiDoc",adoc:"AsciiDoc",aspnet:"ASP.NET (C#)",asm6502:"6502 Assembly",autohotkey:"AutoHotkey",autoit:"AutoIt","avro-idl":"Avro IDL",avdl:"Avro IDL",basic:"BASIC",bbcode:"BBcode",bnf:"BNF",rbnf:"RBNF",bsl:"BSL (1C:Enterprise)",oscript:"OneScript",csharp:"C#",cs:"C#",dotnet:"C#",cpp:"C++",cfscript:"CFScript",cfc:"CFScript",cil:"CIL",cmake:"CMake",cobol:"COBOL",coffee:"CoffeeScript",conc:"Concurnas",csp:"Content-Security-Policy","css-extras":"CSS Extras",csv:"CSV",dataweave:"DataWeave",dax:"DAX",django:"Django/Jinja2",jinja2:"Django/Jinja2","dns-zone-file":"DNS zone file","dns-zone":"DNS zone file",dockerfile:"Docker",dot:"DOT (Graphviz)",gv:"DOT (Graphviz)",ebnf:"EBNF",editorconfig:"EditorConfig",ejs:"EJS",etlua:"Embedded Lua templating",erb:"ERB","excel-formula":"Excel Formula",xlsx:"Excel Formula",xls:"Excel Formula",fsharp:"F#","firestore-security-rules":"Firestore security rules",ftl:"FreeMarker Template Language",gml:"GameMaker Language",gamemakerlanguage:"GameMaker Language",gcode:"G-code",gdscript:"GDScript",gedcom:"GEDCOM",glsl:"GLSL",gn:"GN",gni:"GN",graphql:"GraphQL",hbs:"Handlebars",hs:"Haskell",hcl:"HCL",hlsl:"HLSL",http:"HTTP",hpkp:"HTTP Public-Key-Pins",hsts:"HTTP Strict-Transport-Security",ichigojam:"IchigoJam","icu-message-format":"ICU Message Format",idr:"Idris",ignore:".ignore",gitignore:".gitignore",hgignore:".hgignore",npmignore:".npmignore",inform7:"Inform 7",javadoc:"JavaDoc",javadoclike:"JavaDoc-like",javastacktrace:"Java stack trace",jq:"JQ",jsdoc:"JSDoc","js-extras":"JS Extras",json:"JSON",webmanifest:"Web App Manifest",json5:"JSON5",jsonp:"JSONP",jsstacktrace:"JS stack trace","js-templates":"JS Templates",kts:"Kotlin Script",kt:"Kotlin",kumir:"KuMir (КуМир)",kum:"KuMir (КуМир)",latex:"LaTeX",tex:"TeX",context:"ConTeXt",lilypond:"LilyPond",ly:"LilyPond",emacs:"Lisp",elisp:"Lisp","emacs-lisp":"Lisp",llvm:"LLVM IR",log:"Log file",lolcode:"LOLCODE",md:"Markdown","markup-templating":"Markup templating",matlab:"MATLAB",mel:"MEL",mongodb:"MongoDB",moon:"MoonScript",n1ql:"N1QL",n4js:"N4JS",n4jsd:"N4JS","nand2tetris-hdl":"Nand To Tetris HDL",naniscript:"Naninovel Script",nani:"Naninovel Script",nasm:"NASM",neon:"NEON",nginx:"nginx",nsis:"NSIS",objectivec:"Objective-C",objc:"Objective-C",ocaml:"OCaml",opencl:"OpenCL",openqasm:"OpenQasm",qasm:"OpenQasm",parigp:"PARI/GP",objectpascal:"Object Pascal",psl:"PATROL Scripting Language",pcaxis:"PC-Axis",px:"PC-Axis",peoplecode:"PeopleCode",pcode:"PeopleCode",php:"PHP",phpdoc:"PHPDoc","php-extras":"PHP Extras",plsql:"PL/SQL",powerquery:"PowerQuery",pq:"PowerQuery",mscript:"PowerQuery",powershell:"PowerShell",promql:"PromQL",properties:".properties",protobuf:"Protocol Buffers",purebasic:"PureBasic",pbfasm:"PureBasic",purs:"PureScript",py:"Python",qsharp:"Q#",qs:"Q#",q:"Q (kdb+ database)",qml:"QML",rkt:"Racket",jsx:"React JSX",tsx:"React TSX",renpy:"Ren'py",rpy:"Ren'py",rest:"reST (reStructuredText)",robotframework:"Robot Framework",robot:"Robot Framework",rb:"Ruby",sas:"SAS",sass:"Sass (Sass)",scss:"Sass (Scss)","shell-session":"Shell session","sh-session":"Shell session",shellsession:"Shell session",sml:"SML",smlnj:"SML/NJ",solidity:"Solidity (Ethereum)",sol:"Solidity (Ethereum)","solution-file":"Solution file",sln:"Solution file",soy:"Soy (Closure Template)",sparql:"SPARQL",rq:"SPARQL","splunk-spl":"Splunk SPL",sqf:"SQF: Status Quo Function (Arma 3)",sql:"SQL",iecst:"Structured Text (IEC 61131-3)",systemd:"Systemd configuration file","t4-templating":"T4 templating","t4-cs":"T4 Text Templates (C#)",t4:"T4 Text Templates (C#)","t4-vb":"T4 Text Templates (VB)",tap:"TAP",tt2:"Template Toolkit 2",toml:"TOML",trig:"TriG",ts:"TypeScript",tsconfig:"TSConfig",uscript:"UnrealScript",uc:"UnrealScript",uri:"URI",url:"URL",vbnet:"VB.Net",vhdl:"VHDL",vim:"vim","visual-basic":"Visual Basic",vba:"VBA",vb:"Visual Basic",wasm:"WebAssembly",wiki:"Wiki markup",wolfram:"Wolfram language",nb:"Mathematica Notebook",wl:"Wolfram language",xeoracube:"XeoraCube","xml-doc":"XML doc (.net)",xojo:"Xojo (REALbasic)",xquery:"XQuery",yaml:"YAML",yml:"YAML",yang:"YANG"};Prism.plugins.toolbar.registerButton("show-language",function(e){var a=e.element.parentNode;if(a&&/pre/i.test(a.nodeName)){var t,s=a.getAttribute("data-language")||i[e.language]||((t=e.language)?(t.substring(0,1).toUpperCase()+t.substring(1)).replace(/s(?=cript)/,"S"):t);if(s){var o=document.createElement("span");return o.textContent=s,o}}})}else console.warn("Show Languages plugin loaded before Toolbar plugin.")}(); \ No newline at end of file +!function(){if("undefined"!=typeof Prism&&"undefined"!=typeof document)if(Prism.plugins.toolbar){var i={none:"Plain text",plain:"Plain text",plaintext:"Plain text",text:"Plain text",txt:"Plain text",html:"HTML",xml:"XML",svg:"SVG",mathml:"MathML",ssml:"SSML",rss:"RSS",css:"CSS",clike:"C-like",js:"JavaScript",abap:"ABAP",abnf:"ABNF",al:"AL",antlr4:"ANTLR4",g4:"ANTLR4",apacheconf:"Apache Configuration",apl:"APL",aql:"AQL",arff:"ARFF",asciidoc:"AsciiDoc",adoc:"AsciiDoc",aspnet:"ASP.NET (C#)",asm6502:"6502 Assembly",autohotkey:"AutoHotkey",autoit:"AutoIt","avro-idl":"Avro IDL",avdl:"Avro IDL",basic:"BASIC",bbcode:"BBcode",bnf:"BNF",rbnf:"RBNF",bsl:"BSL (1C:Enterprise)",oscript:"OneScript",csharp:"C#",cs:"C#",dotnet:"C#",cpp:"C++",cfscript:"CFScript",cfc:"CFScript",cil:"CIL",cmake:"CMake",cobol:"COBOL",coffee:"CoffeeScript",conc:"Concurnas",csp:"Content-Security-Policy","css-extras":"CSS Extras",csv:"CSV",dataweave:"DataWeave",dax:"DAX",django:"Django/Jinja2",jinja2:"Django/Jinja2","dns-zone-file":"DNS zone file","dns-zone":"DNS zone file",dockerfile:"Docker",dot:"DOT (Graphviz)",gv:"DOT (Graphviz)",ebnf:"EBNF",editorconfig:"EditorConfig",ejs:"EJS",etlua:"Embedded Lua templating",erb:"ERB","excel-formula":"Excel Formula",xlsx:"Excel Formula",xls:"Excel Formula",fsharp:"F#","firestore-security-rules":"Firestore security rules",ftl:"FreeMarker Template Language",gml:"GameMaker Language",gamemakerlanguage:"GameMaker Language",gap:"GAP (CAS)",gcode:"G-code",gdscript:"GDScript",gedcom:"GEDCOM",glsl:"GLSL",gn:"GN",gni:"GN",graphql:"GraphQL",hbs:"Handlebars",hs:"Haskell",hcl:"HCL",hlsl:"HLSL",http:"HTTP",hpkp:"HTTP Public-Key-Pins",hsts:"HTTP Strict-Transport-Security",ichigojam:"IchigoJam","icu-message-format":"ICU Message Format",idr:"Idris",ignore:".ignore",gitignore:".gitignore",hgignore:".hgignore",npmignore:".npmignore",inform7:"Inform 7",javadoc:"JavaDoc",javadoclike:"JavaDoc-like",javastacktrace:"Java stack trace",jq:"JQ",jsdoc:"JSDoc","js-extras":"JS Extras",json:"JSON",webmanifest:"Web App Manifest",json5:"JSON5",jsonp:"JSONP",jsstacktrace:"JS stack trace","js-templates":"JS Templates",kts:"Kotlin Script",kt:"Kotlin",kumir:"KuMir (КуМир)",kum:"KuMir (КуМир)",latex:"LaTeX",tex:"TeX",context:"ConTeXt",lilypond:"LilyPond",ly:"LilyPond",emacs:"Lisp",elisp:"Lisp","emacs-lisp":"Lisp",llvm:"LLVM IR",log:"Log file",lolcode:"LOLCODE",md:"Markdown","markup-templating":"Markup templating",matlab:"MATLAB",mel:"MEL",mongodb:"MongoDB",moon:"MoonScript",n1ql:"N1QL",n4js:"N4JS",n4jsd:"N4JS","nand2tetris-hdl":"Nand To Tetris HDL",naniscript:"Naninovel Script",nani:"Naninovel Script",nasm:"NASM",neon:"NEON",nginx:"nginx",nsis:"NSIS",objectivec:"Objective-C",objc:"Objective-C",ocaml:"OCaml",opencl:"OpenCL",openqasm:"OpenQasm",qasm:"OpenQasm",parigp:"PARI/GP",objectpascal:"Object Pascal",psl:"PATROL Scripting Language",pcaxis:"PC-Axis",px:"PC-Axis",peoplecode:"PeopleCode",pcode:"PeopleCode",php:"PHP",phpdoc:"PHPDoc","php-extras":"PHP Extras",plsql:"PL/SQL",powerquery:"PowerQuery",pq:"PowerQuery",mscript:"PowerQuery",powershell:"PowerShell",promql:"PromQL",properties:".properties",protobuf:"Protocol Buffers",purebasic:"PureBasic",pbfasm:"PureBasic",purs:"PureScript",py:"Python",qsharp:"Q#",qs:"Q#",q:"Q (kdb+ database)",qml:"QML",rkt:"Racket",jsx:"React JSX",tsx:"React TSX",renpy:"Ren'py",rpy:"Ren'py",rest:"reST (reStructuredText)",robotframework:"Robot Framework",robot:"Robot Framework",rb:"Ruby",sas:"SAS",sass:"Sass (Sass)",scss:"Sass (Scss)","shell-session":"Shell session","sh-session":"Shell session",shellsession:"Shell session",sml:"SML",smlnj:"SML/NJ",solidity:"Solidity (Ethereum)",sol:"Solidity (Ethereum)","solution-file":"Solution file",sln:"Solution file",soy:"Soy (Closure Template)",sparql:"SPARQL",rq:"SPARQL","splunk-spl":"Splunk SPL",sqf:"SQF: Status Quo Function (Arma 3)",sql:"SQL",iecst:"Structured Text (IEC 61131-3)",systemd:"Systemd configuration file","t4-templating":"T4 templating","t4-cs":"T4 Text Templates (C#)",t4:"T4 Text Templates (C#)","t4-vb":"T4 Text Templates (VB)",tap:"TAP",tt2:"Template Toolkit 2",toml:"TOML",trig:"TriG",ts:"TypeScript",tsconfig:"TSConfig",uscript:"UnrealScript",uc:"UnrealScript",uri:"URI",url:"URL",vbnet:"VB.Net",vhdl:"VHDL",vim:"vim","visual-basic":"Visual Basic",vba:"VBA",vb:"Visual Basic",wasm:"WebAssembly",wiki:"Wiki markup",wolfram:"Wolfram language",nb:"Mathematica Notebook",wl:"Wolfram language",xeoracube:"XeoraCube","xml-doc":"XML doc (.net)",xojo:"Xojo (REALbasic)",xquery:"XQuery",yaml:"YAML",yml:"YAML",yang:"YANG"};Prism.plugins.toolbar.registerButton("show-language",function(e){var a=e.element.parentNode;if(a&&/pre/i.test(a.nodeName)){var t,s=a.getAttribute("data-language")||i[e.language]||((t=e.language)?(t.substring(0,1).toUpperCase()+t.substring(1)).replace(/s(?=cript)/,"S"):t);if(s){var o=document.createElement("span");return o.textContent=s,o}}})}else console.warn("Show Languages plugin loaded before Toolbar plugin.")}(); \ No newline at end of file diff --git a/tests/languages/gap/boolean_feature.test b/tests/languages/gap/boolean_feature.test new file mode 100644 index 0000000000..dfd85e24f0 --- /dev/null +++ b/tests/languages/gap/boolean_feature.test @@ -0,0 +1,9 @@ +false +true + +---------------------------------------------------- + +[ + ["boolean", "false"], + ["boolean", "true"] +] diff --git a/tests/languages/gap/comment_feature.test b/tests/languages/gap/comment_feature.test new file mode 100644 index 0000000000..7883a734b3 --- /dev/null +++ b/tests/languages/gap/comment_feature.test @@ -0,0 +1,7 @@ +# comment + +---------------------------------------------------- + +[ + ["comment", "# comment"] +] diff --git a/tests/languages/gap/keyword_feature.test b/tests/languages/gap/keyword_feature.test new file mode 100644 index 0000000000..613244f401 --- /dev/null +++ b/tests/languages/gap/keyword_feature.test @@ -0,0 +1,71 @@ +Assert; +Info; +IsBound; +QUIT; +TryNextMethod; +Unbind; +and; +atomic; +break; +continue; +do; +elif; +else; +end; +fi; +for; +function; +if; +in; +local; +mod; +not; +od; +or; +quit; +readonly; +readwrite; +rec; +repeat; +return; +then; +until; +while; + +---------------------------------------------------- + +[ + ["keyword", "Assert"], ["punctuation", ";"], + ["keyword", "Info"], ["punctuation", ";"], + ["keyword", "IsBound"], ["punctuation", ";"], + ["keyword", "QUIT"], ["punctuation", ";"], + ["keyword", "TryNextMethod"], ["punctuation", ";"], + ["keyword", "Unbind"], ["punctuation", ";"], + ["keyword", "and"], ["punctuation", ";"], + ["keyword", "atomic"], ["punctuation", ";"], + ["keyword", "break"], ["punctuation", ";"], + ["keyword", "continue"], ["punctuation", ";"], + ["keyword", "do"], ["punctuation", ";"], + ["keyword", "elif"], ["punctuation", ";"], + ["keyword", "else"], ["punctuation", ";"], + ["keyword", "end"], ["punctuation", ";"], + ["keyword", "fi"], ["punctuation", ";"], + ["keyword", "for"], ["punctuation", ";"], + ["keyword", "function"], ["punctuation", ";"], + ["keyword", "if"], ["punctuation", ";"], + ["keyword", "in"], ["punctuation", ";"], + ["keyword", "local"], ["punctuation", ";"], + ["keyword", "mod"], ["punctuation", ";"], + ["keyword", "not"], ["punctuation", ";"], + ["keyword", "od"], ["punctuation", ";"], + ["keyword", "or"], ["punctuation", ";"], + ["keyword", "quit"], ["punctuation", ";"], + ["keyword", "readonly"], ["punctuation", ";"], + ["keyword", "readwrite"], ["punctuation", ";"], + ["keyword", "rec"], ["punctuation", ";"], + ["keyword", "repeat"], ["punctuation", ";"], + ["keyword", "return"], ["punctuation", ";"], + ["keyword", "then"], ["punctuation", ";"], + ["keyword", "until"], ["punctuation", ";"], + ["keyword", "while"], ["punctuation", ";"] +] diff --git a/tests/languages/gap/number_feature.test b/tests/languages/gap/number_feature.test new file mode 100644 index 0000000000..56b232e3fd --- /dev/null +++ b/tests/languages/gap/number_feature.test @@ -0,0 +1,43 @@ +0 +123134523423423412345132123123432744839127384723987497 ++123123 +-245435 + +66/123 +66/-123 + +3.14 +6.62606896e-34 +.1 +.1e1 +-.999 +1._ +1._l + +[1..100] + +---------------------------------------------------- + +[ + ["number", "0"], + ["number", "123134523423423412345132123123432744839127384723987497"], + ["operator", "+"], ["number", "123123"], + ["operator", "-"], ["number", "245435"], + + ["number", "66"], ["operator", "/"], ["number", "123"], + ["number", "66"], ["operator", "/"], ["operator", "-"], ["number", "123"], + + ["number", "3.14"], + ["number", "6.62606896e-34"], + ["number", ".1"], + ["number", ".1e1"], + ["operator", "-"], ["number", ".999"], + ["number", "1._"], + ["number", "1._l"], + + ["punctuation", "["], + ["number", "1"], + ["operator", ".."], + ["number", "100"], + ["punctuation", "]"] +] diff --git a/tests/languages/gap/operator_feature.test b/tests/languages/gap/operator_feature.test new file mode 100644 index 0000000000..3c0625cbbe --- /dev/null +++ b/tests/languages/gap/operator_feature.test @@ -0,0 +1,34 @@ ++ - * / ^ ~ += <> < > <= >= +:= .. -> + +!. ![ !{ + +---------------------------------------------------- + +[ + ["operator", "+"], + ["operator", "-"], + ["operator", "*"], + ["operator", "/"], + ["operator", "^"], + ["operator", "~"], + + ["operator", "="], + ["operator", "<>"], + ["operator", "<"], + ["operator", ">"], + ["operator", "<="], + ["operator", ">="], + + ["operator", ":="], + ["operator", ".."], + ["operator", "->"], + + ["operator", "!"], + ["punctuation", "."], + ["operator", "!"], + ["punctuation", "["], + ["operator", "!"], + ["punctuation", "{"] +] diff --git a/tests/languages/gap/punctuation_feature.test b/tests/languages/gap/punctuation_feature.test new file mode 100644 index 0000000000..1713f5143c --- /dev/null +++ b/tests/languages/gap/punctuation_feature.test @@ -0,0 +1,18 @@ +( ) [ ] { } +, ; . : + +---------------------------------------------------- + +[ + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", "["], + ["punctuation", "]"], + ["punctuation", "{"], + ["punctuation", "}"], + + ["punctuation", ","], + ["punctuation", ";"], + ["punctuation", "."], + ["punctuation", ":"] +] diff --git a/tests/languages/gap/shell_feature.test b/tests/languages/gap/shell_feature.test new file mode 100644 index 0000000000..fbab6e61b9 --- /dev/null +++ b/tests/languages/gap/shell_feature.test @@ -0,0 +1,216 @@ +gap> i := 0;; s := 0;; +gap> while s <= 200 do +> i := i + 1; s := s + i^2; +> od; +gap> s; +204 +gap> l := [ 1, 2, 3, 4, 5, 6 ];; +gap> for i in l do +> Print( i, " " ); +> l := []; +> od; Print( "\n" ); +1 2 3 4 5 6 +gap> g := Group((1,2,3),(1,2)); +Group([ (1,2,3), (1,2) ]) +gap> for x in g do +> if Order(x) = 3 then +> continue; +> fi; Print(x,"\n"); od; +() +(2,3) +(1,3) +(1,2) +gap> continue; +Syntax error: 'continue' statement not enclosed in a loop + +---------------------------------------------------- + +[ + ["shell", [ + ["punctuation", "gap>"], + ["gap", [ + " i ", + ["operator", ":="], + ["number", "0"], + ["punctuation", ";"], + ["punctuation", ";"], + " s ", + ["operator", ":="], + ["number", "0"], + ["punctuation", ";"], + ["punctuation", ";"] + ]] + ]], + ["shell", [ + ["punctuation", "gap>"], + ["gap", [ + ["keyword", "while"], + " s ", + ["operator", "<="], + ["number", "200"], + ["keyword", "do"], + + ["continuation", ">"], + " i ", + ["operator", ":="], + " i ", + ["operator", "+"], + ["number", "1"], + ["punctuation", ";"], + " s ", + ["operator", ":="], + " s ", + ["operator", "+"], + " i", + ["operator", "^"], + ["number", "2"], + ["punctuation", ";"], + + ["continuation", ">"], + ["keyword", "od"], + ["punctuation", ";"] + ]] + ]], + ["shell", [ + ["punctuation", "gap>"], + ["gap", [ + " s", + ["punctuation", ";"] + ]], + + "\r\n204\r\n" + ]], + ["shell", [ + ["punctuation", "gap>"], + ["gap", [ + " l ", + ["operator", ":="], + ["punctuation", "["], + ["number", "1"], + ["punctuation", ","], + ["number", "2"], + ["punctuation", ","], + ["number", "3"], + ["punctuation", ","], + ["number", "4"], + ["punctuation", ","], + ["number", "5"], + ["punctuation", ","], + ["number", "6"], + ["punctuation", "]"], + ["punctuation", ";"], + ["punctuation", ";"] + ]] + ]], + ["shell", [ + ["punctuation", "gap>"], + ["gap", [ + ["keyword", "for"], + " i ", + ["keyword", "in"], + " l ", + ["keyword", "do"], + + ["continuation", ">"], + ["function", "Print"], + ["punctuation", "("], + " i", + ["punctuation", ","], + ["string", ["\" \""]], + ["punctuation", ")"], + ["punctuation", ";"], + + ["continuation", ">"], + " l ", + ["operator", ":="], + ["punctuation", "["], + ["punctuation", "]"], + ["punctuation", ";"], + + ["continuation", ">"], + ["keyword", "od"], + ["punctuation", ";"], + ["function", "Print"], + ["punctuation", "("], + ["string", ["\"\\n\""]], + ["punctuation", ")"], + ["punctuation", ";"] + ]], + + "\r\n1 2 3 4 5 6\r\n" + ]], + ["shell", [ + ["punctuation", "gap>"], + ["gap", [ + " g ", + ["operator", ":="], + ["function", "Group"], + ["punctuation", "("], + ["punctuation", "("], + ["number", "1"], + ["punctuation", ","], + ["number", "2"], + ["punctuation", ","], + ["number", "3"], + ["punctuation", ")"], + ["punctuation", ","], + ["punctuation", "("], + ["number", "1"], + ["punctuation", ","], + ["number", "2"], + ["punctuation", ")"], + ["punctuation", ")"], + ["punctuation", ";"] + ]], + + "\r\nGroup([ (1,2,3), (1,2) ])\r\n" + ]], + ["shell", [ + ["punctuation", "gap>"], + ["gap", [ + ["keyword", "for"], + " x ", + ["keyword", "in"], + " g ", + ["keyword", "do"], + + ["continuation", ">"], + ["keyword", "if"], + ["function", "Order"], + ["punctuation", "("], + "x", + ["punctuation", ")"], + ["operator", "="], + ["number", "3"], + ["keyword", "then"], + + ["continuation", ">"], + ["keyword", "continue"], + ["punctuation", ";"], + + ["continuation", ">"], + ["keyword", "fi"], + ["punctuation", ";"], + ["function", "Print"], + ["punctuation", "("], + "x", + ["punctuation", ","], + ["string", ["\"\\n\""]], + ["punctuation", ")"], + ["punctuation", ";"], + ["keyword", "od"], + ["punctuation", ";"] + ]], + + "\r\n()\r\n(2,3)\r\n(1,3)\r\n(1,2)\r\n" + ]], + ["shell", [ + ["punctuation", "gap>"], + ["gap", [ + ["keyword", "continue"], + ["punctuation", ";"] + ]], + + "\r\nSyntax error: 'continue' statement not enclosed in a loop" + ]] +] diff --git a/tests/languages/gap/string_feature.test b/tests/languages/gap/string_feature.test new file mode 100644 index 0000000000..880b38fa78 --- /dev/null +++ b/tests/languages/gap/string_feature.test @@ -0,0 +1,27 @@ +'f' +'\n' + +"" +"foo" +"\"" + +"""""" +""" foo """ +""" +foo +""" + +---------------------------------------------------- + +[ + ["string", ["'f'"]], + ["string", ["'\\n'"]], + + ["string", ["\"\""]], + ["string", ["\"foo\""]], + ["string", ["\"\\\"\""]], + + ["string", ["\"\"\"\"\"\""]], + ["string", ["\"\"\" foo \"\"\""]], + ["string", ["\"\"\"\r\nfoo\r\n\"\"\""]] +] From a1b67ce342b334a5036f63e0dfd5a0d68f3bc285 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Sun, 12 Sep 2021 19:57:47 +0200 Subject: [PATCH 0895/1100] Added support for Magma (CAS) (#3055) --- components.js | 2 +- components.json | 4 + components/prism-magma.js | 35 ++++ components/prism-magma.min.js | 1 + examples/prism-magma.html | 34 ++++ plugins/show-language/prism-show-language.js | 1 + .../show-language/prism-show-language.min.js | 2 +- tests/languages/magma/boolean_feature.test | 9 + tests/languages/magma/comment_feature.test | 13 ++ tests/languages/magma/generator_feature.test | 36 ++++ tests/languages/magma/keyword_feature.test | 177 ++++++++++++++++++ tests/languages/magma/number_feature.test | 17 ++ tests/languages/magma/operator_feature.test | 25 +++ .../languages/magma/punctuation_feature.test | 20 ++ tests/languages/magma/string_feature.test | 13 ++ 15 files changed, 387 insertions(+), 2 deletions(-) create mode 100644 components/prism-magma.js create mode 100644 components/prism-magma.min.js create mode 100644 examples/prism-magma.html create mode 100644 tests/languages/magma/boolean_feature.test create mode 100644 tests/languages/magma/comment_feature.test create mode 100644 tests/languages/magma/generator_feature.test create mode 100644 tests/languages/magma/keyword_feature.test create mode 100644 tests/languages/magma/number_feature.test create mode 100644 tests/languages/magma/operator_feature.test create mode 100644 tests/languages/magma/punctuation_feature.test create mode 100644 tests/languages/magma/string_feature.test diff --git a/components.js b/components.js index f249e282c1..d221041e58 100644 --- a/components.js +++ b/components.js @@ -1,2 +1,2 @@ -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml","ssml","atom","rss"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","ssml":"SSML","atom":"Atom","rss":"RSS"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","optional":"regex","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"ABNF","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"agda":{"title":"Agda","owner":"xy-ren"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apex":{"title":"Apex","require":["clike","sql"],"owner":"RunDevelopment"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"dkern"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"avro-idl":{"title":"Avro IDL","alias":"avdl","owner":"RunDevelopment"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"bicep":{"title":"Bicep","owner":"johnnyreilly"},"birb":{"title":"Birb","require":"clike","owner":"Calamity210"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"BNF","alias":"rbnf","aliasTitles":{"rbnf":"RBNF"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"bsl":{"title":"BSL (1C:Enterprise)","alias":"oscript","aliasTitles":{"oscript":"OneScript"},"owner":"Diversus23"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cfscript":{"title":"CFScript","require":"clike","alias":"cfc","owner":"mjclemente"},"chaiscript":{"title":"ChaiScript","require":["clike","cpp"],"owner":"RunDevelopment"},"cil":{"title":"CIL","owner":"sbrl"},"clojure":{"title":"Clojure","owner":"troglotit"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"cobol":{"title":"COBOL","owner":"RunDevelopment"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"coq":{"title":"Coq","owner":"RunDevelopment"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"csv":{"title":"CSV","owner":"RunDevelopment"},"cypher":{"title":"Cypher","owner":"RunDevelopment"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dataweave":{"title":"DataWeave","owner":"machaval"},"dax":{"title":"DAX","owner":"peterbud"},"dhall":{"title":"Dhall","owner":"RunDevelopment"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"dot":{"title":"DOT (Graphviz)","alias":"gv","optional":"markup","owner":"RunDevelopment"},"ebnf":{"title":"EBNF","owner":"RunDevelopment"},"editorconfig":{"title":"EditorConfig","owner":"osipxd"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"false":{"title":"False","owner":"edukisto"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"gap":{"title":"GAP (CAS)","owner":"RunDevelopment"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"c","owner":"Golmote"},"gn":{"title":"GN","alias":"gni","owner":"RunDevelopment"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","optional":"markdown","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","alias":"hbs","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"hlsl":{"title":"HLSL","require":"c","owner":"RunDevelopment"},"hoon":{"title":"Hoon","owner":"matildepark"},"http":{"title":"HTTP","optional":["css","javascript","json","markup","uri"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"icu-message-format":{"title":"ICU Message Format","owner":"RunDevelopment"},"idris":{"title":"Idris","alias":"idr","owner":"KeenS","require":"haskell"},"ignore":{"title":".ignore","owner":"osipxd","alias":["gitignore","hgignore","npmignore"],"aliasTitles":{"gitignore":".gitignore","hgignore":".hgignore","npmignore":".npmignore"}},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jexl":{"title":"Jexl","owner":"czosel"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike","typescript"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","alias":"webmanifest","aliasTitles":{"webmanifest":"Web App Manifest"},"owner":"CupOfTea696"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"jsstacktrace":{"title":"JS stack trace","owner":"sbrl"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup","sql"],"owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","alias":["kt","kts"],"aliasTitles":{"kts":"Kotlin Script"},"require":"clike","owner":"Golmote"},"kumir":{"title":"KuMir (КуМир)","alias":"kum","owner":"edukisto"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","require":"markup-templating","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"log":{"title":"Log file","optional":"javastacktrace","owner":"RunDevelopment"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","optional":"yaml","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mermaid":{"title":"Mermaid","owner":"RunDevelopment"},"mizar":{"title":"Mizar","owner":"Golmote"},"mongodb":{"title":"MongoDB","owner":"airs0urce","require":"javascript"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"naniscript":{"title":"Naninovel Script","owner":"Elringus","alias":"nani"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nevod":{"title":"Nevod","owner":"nezaboodka"},"nginx":{"title":"nginx","owner":"volado"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"openqasm":{"title":"OpenQasm","alias":"qasm","owner":"RunDevelopment"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"psl":{"title":"PATROL Scripting Language","owner":"bertysentry"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":"markup-templating","owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"promql":{"title":"PromQL","owner":"arendjr"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"purebasic":{"title":"PureBasic","require":"clike","alias":"pbfasm","owner":"HeX0R101"},"purescript":{"title":"PureScript","require":"haskell","alias":"purs","owner":"sriharshachilakapati"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"qsharp":{"title":"Q#","require":"clike","alias":"qs","owner":"fedonman"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"racket":{"title":"Racket","require":"scheme","alias":"rkt","owner":"RunDevelopment"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","owner":"RunDevelopment"},"rego":{"title":"Rego","owner":"JordanSh"},"renpy":{"title":"Ren'py","alias":"rpy","owner":"HyuchiaDiego"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","optional":"css-extras","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","alias":["sh-session","shellsession"],"owner":"RunDevelopment"},"smali":{"title":"Smali","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sml":{"title":"SML","alias":"smlnj","aliasTitles":{"smlnj":"SML/NJ"},"owner":"RunDevelopment"},"solidity":{"title":"Solidity (Ethereum)","alias":"sol","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"squirrel":{"title":"Squirrel","require":"clike","owner":"RunDevelopment"},"stan":{"title":"Stan","owner":"RunDevelopment"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","owner":"chrischares"},"systemd":{"title":"Systemd configuration file","owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","vbnet"],"owner":"RunDevelopment"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"typoscript":{"title":"TypoScript","alias":"tsconfig","aliasTitles":{"tsconfig":"TSConfig"},"owner":"dkern"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"uri":{"title":"URI","alias":"url","aliasTitles":{"url":"URL"},"owner":"RunDevelopment"},"v":{"title":"V","require":"clike","owner":"taggon"},"vala":{"title":"Vala","require":"clike","optional":"regex","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":["vb","vba"],"aliasTitles":{"vba":"VBA"},"owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"wolfram":{"title":"Wolfram language","alias":["mathematica","nb","wl"],"aliasTitles":{"mathematica":"Mathematica","nb":"Mathematica Notebook"},"owner":"msollami"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xml-doc":{"title":"XML doc (.net)","require":"markup","modify":["csharp","fsharp","vbnet"],"owner":"RunDevelopment"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"yang":{"title":"YANG","owner":"RunDevelopment"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword for fine-grained highlighting.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml","ssml","atom","rss"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","ssml":"SSML","atom":"Atom","rss":"RSS"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","optional":"regex","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"ABNF","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"agda":{"title":"Agda","owner":"xy-ren"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apex":{"title":"Apex","require":["clike","sql"],"owner":"RunDevelopment"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"dkern"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"avro-idl":{"title":"Avro IDL","alias":"avdl","owner":"RunDevelopment"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"bicep":{"title":"Bicep","owner":"johnnyreilly"},"birb":{"title":"Birb","require":"clike","owner":"Calamity210"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"BNF","alias":"rbnf","aliasTitles":{"rbnf":"RBNF"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"bsl":{"title":"BSL (1C:Enterprise)","alias":"oscript","aliasTitles":{"oscript":"OneScript"},"owner":"Diversus23"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cfscript":{"title":"CFScript","require":"clike","alias":"cfc","owner":"mjclemente"},"chaiscript":{"title":"ChaiScript","require":["clike","cpp"],"owner":"RunDevelopment"},"cil":{"title":"CIL","owner":"sbrl"},"clojure":{"title":"Clojure","owner":"troglotit"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"cobol":{"title":"COBOL","owner":"RunDevelopment"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"coq":{"title":"Coq","owner":"RunDevelopment"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"csv":{"title":"CSV","owner":"RunDevelopment"},"cypher":{"title":"Cypher","owner":"RunDevelopment"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dataweave":{"title":"DataWeave","owner":"machaval"},"dax":{"title":"DAX","owner":"peterbud"},"dhall":{"title":"Dhall","owner":"RunDevelopment"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"dot":{"title":"DOT (Graphviz)","alias":"gv","optional":"markup","owner":"RunDevelopment"},"ebnf":{"title":"EBNF","owner":"RunDevelopment"},"editorconfig":{"title":"EditorConfig","owner":"osipxd"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"false":{"title":"False","owner":"edukisto"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"gap":{"title":"GAP (CAS)","owner":"RunDevelopment"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"c","owner":"Golmote"},"gn":{"title":"GN","alias":"gni","owner":"RunDevelopment"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","optional":"markdown","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","alias":"hbs","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"hlsl":{"title":"HLSL","require":"c","owner":"RunDevelopment"},"hoon":{"title":"Hoon","owner":"matildepark"},"http":{"title":"HTTP","optional":["css","javascript","json","markup","uri"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"icu-message-format":{"title":"ICU Message Format","owner":"RunDevelopment"},"idris":{"title":"Idris","alias":"idr","owner":"KeenS","require":"haskell"},"ignore":{"title":".ignore","owner":"osipxd","alias":["gitignore","hgignore","npmignore"],"aliasTitles":{"gitignore":".gitignore","hgignore":".hgignore","npmignore":".npmignore"}},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jexl":{"title":"Jexl","owner":"czosel"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike","typescript"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","alias":"webmanifest","aliasTitles":{"webmanifest":"Web App Manifest"},"owner":"CupOfTea696"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"jsstacktrace":{"title":"JS stack trace","owner":"sbrl"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup","sql"],"owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","alias":["kt","kts"],"aliasTitles":{"kts":"Kotlin Script"},"require":"clike","owner":"Golmote"},"kumir":{"title":"KuMir (КуМир)","alias":"kum","owner":"edukisto"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","require":"markup-templating","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"log":{"title":"Log file","optional":"javastacktrace","owner":"RunDevelopment"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"magma":{"title":"Magma (CAS)","owner":"RunDevelopment"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","optional":"yaml","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mermaid":{"title":"Mermaid","owner":"RunDevelopment"},"mizar":{"title":"Mizar","owner":"Golmote"},"mongodb":{"title":"MongoDB","owner":"airs0urce","require":"javascript"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"naniscript":{"title":"Naninovel Script","owner":"Elringus","alias":"nani"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nevod":{"title":"Nevod","owner":"nezaboodka"},"nginx":{"title":"nginx","owner":"volado"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"openqasm":{"title":"OpenQasm","alias":"qasm","owner":"RunDevelopment"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"psl":{"title":"PATROL Scripting Language","owner":"bertysentry"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":"markup-templating","owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"promql":{"title":"PromQL","owner":"arendjr"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"purebasic":{"title":"PureBasic","require":"clike","alias":"pbfasm","owner":"HeX0R101"},"purescript":{"title":"PureScript","require":"haskell","alias":"purs","owner":"sriharshachilakapati"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"qsharp":{"title":"Q#","require":"clike","alias":"qs","owner":"fedonman"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"racket":{"title":"Racket","require":"scheme","alias":"rkt","owner":"RunDevelopment"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","owner":"RunDevelopment"},"rego":{"title":"Rego","owner":"JordanSh"},"renpy":{"title":"Ren'py","alias":"rpy","owner":"HyuchiaDiego"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","optional":"css-extras","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","alias":["sh-session","shellsession"],"owner":"RunDevelopment"},"smali":{"title":"Smali","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sml":{"title":"SML","alias":"smlnj","aliasTitles":{"smlnj":"SML/NJ"},"owner":"RunDevelopment"},"solidity":{"title":"Solidity (Ethereum)","alias":"sol","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"squirrel":{"title":"Squirrel","require":"clike","owner":"RunDevelopment"},"stan":{"title":"Stan","owner":"RunDevelopment"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","owner":"chrischares"},"systemd":{"title":"Systemd configuration file","owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","vbnet"],"owner":"RunDevelopment"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"typoscript":{"title":"TypoScript","alias":"tsconfig","aliasTitles":{"tsconfig":"TSConfig"},"owner":"dkern"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"uri":{"title":"URI","alias":"url","aliasTitles":{"url":"URL"},"owner":"RunDevelopment"},"v":{"title":"V","require":"clike","owner":"taggon"},"vala":{"title":"Vala","require":"clike","optional":"regex","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":["vb","vba"],"aliasTitles":{"vba":"VBA"},"owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"wolfram":{"title":"Wolfram language","alias":["mathematica","nb","wl"],"aliasTitles":{"mathematica":"Mathematica","nb":"Mathematica Notebook"},"owner":"msollami"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xml-doc":{"title":"XML doc (.net)","require":"markup","modify":["csharp","fsharp","vbnet"],"owner":"RunDevelopment"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"yang":{"title":"YANG","owner":"RunDevelopment"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword for fine-grained highlighting.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; if (typeof module !== 'undefined' && module.exports) { module.exports = components; } \ No newline at end of file diff --git a/components.json b/components.json index e0578bcf9e..b1fcc12f7d 100644 --- a/components.json +++ b/components.json @@ -783,6 +783,10 @@ "title": "Lua", "owner": "Golmote" }, + "magma": { + "title": "Magma (CAS)", + "owner": "RunDevelopment" + }, "makefile": { "title": "Makefile", "owner": "Golmote" diff --git a/components/prism-magma.js b/components/prism-magma.js new file mode 100644 index 0000000000..ddfda80efb --- /dev/null +++ b/components/prism-magma.js @@ -0,0 +1,35 @@ +Prism.languages.magma = { + 'output': { + pattern: /^(>.*(?:\r(?:\n|(?!\n))|\n))(?!>)(?:.+|(?:\r(?:\n|(?!\n))|\n)(?!>).*)(?:(?:\r(?:\n|(?!\n))|\n)(?!>).*)*/m, + lookbehind: true, + greedy: true + }, + + 'comment': { + pattern: /\/\/.*|\/\*[\s\S]*?\*\//, + greedy: true + }, + 'string': { + pattern: /(^|[^\\"])"(?:[^\r\n\\"]|\\.)*"/, + lookbehind: true, + greedy: true + }, + + // http://magma.maths.usyd.edu.au/magma/handbook/text/82 + 'keyword': /\b(?:_|adj|and|assert|assert2|assert3|assigned|break|by|case|cat|catch|clear|cmpeq|cmpne|continue|declare|default|delete|diff|div|do|elif|else|end|eq|error|eval|exists|exit|for|forall|forward|fprintf|freeze|function|ge|gt|if|iload|import|in|intrinsic|is|join|le|load|local|lt|meet|mod|ne|not|notadj|notin|notsubset|or|print|printf|procedure|quit|random|read|readi|repeat|require|requirege|requirerange|restore|return|save|sdiff|select|subset|then|time|to|try|until|vprint|vprintf|vtime|when|where|while|xor)\b/, + 'boolean': /\b(?:false|true)\b/, + + 'generator': { + pattern: /\b[a-z_]\w*(?=\s*<)/i, + alias: 'class-name' + }, + 'function': /\b[a-z_]\w*(?=\s*\()/i, + + 'number': { + pattern: /(^|[^\w.]|\.\.)(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?(?:_[a-z]?)?(?=$|[^\w.]|\.\.)/, + lookbehind: true + }, + + 'operator': /->|[-+*/^~!|#=]|:=|\.\./, + 'punctuation': /[()[\]{}<>,;.:]/ +}; diff --git a/components/prism-magma.min.js b/components/prism-magma.min.js new file mode 100644 index 0000000000..93898f77ab --- /dev/null +++ b/components/prism-magma.min.js @@ -0,0 +1 @@ +Prism.languages.magma={output:{pattern:/^(>.*(?:\r(?:\n|(?!\n))|\n))(?!>)(?:.+|(?:\r(?:\n|(?!\n))|\n)(?!>).*)(?:(?:\r(?:\n|(?!\n))|\n)(?!>).*)*/m,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?\*\//,greedy:!0},string:{pattern:/(^|[^\\"])"(?:[^\r\n\\"]|\\.)*"/,lookbehind:!0,greedy:!0},keyword:/\b(?:_|adj|and|assert|assert2|assert3|assigned|break|by|case|cat|catch|clear|cmpeq|cmpne|continue|declare|default|delete|diff|div|do|elif|else|end|eq|error|eval|exists|exit|for|forall|forward|fprintf|freeze|function|ge|gt|if|iload|import|in|intrinsic|is|join|le|load|local|lt|meet|mod|ne|not|notadj|notin|notsubset|or|print|printf|procedure|quit|random|read|readi|repeat|require|requirege|requirerange|restore|return|save|sdiff|select|subset|then|time|to|try|until|vprint|vprintf|vtime|when|where|while|xor)\b/,boolean:/\b(?:false|true)\b/,generator:{pattern:/\b[a-z_]\w*(?=\s*<)/i,alias:"class-name"},function:/\b[a-z_]\w*(?=\s*\()/i,number:{pattern:/(^|[^\w.]|\.\.)(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?(?:_[a-z]?)?(?=$|[^\w.]|\.\.)/,lookbehind:!0},operator:/->|[-+*/^~!|#=]|:=|\.\./,punctuation:/[()[\]{}<>,;.:]/}; \ No newline at end of file diff --git a/examples/prism-magma.html b/examples/prism-magma.html new file mode 100644 index 0000000000..558e819f0a --- /dev/null +++ b/examples/prism-magma.html @@ -0,0 +1,34 @@ +

            Full example

            +
            // Source: http://magma.maths.usyd.edu.au/magma/handbook/text/115#963
            +> D := Denominator;
            +> N := Numerator;
            +> farey := function(n)
            +>    f := [ RationalField() | 0, 1/n ];
            +>    p := 0;
            +>    q := 1;
            +>    while p/q lt 1 do
            +>       p := ( D(f[#f-1]) + n) div D(f[#f]) * N(f[#f])  - N(f[#f-1]);
            +>       q := ( D(f[#f-1]) + n) div D(f[#f]) * D(f[#f])  - D(f[#f-1]);
            +>       Append(~f, p/q);
            +>    end while;
            +>    return f;
            +> end function;
            +> function farey(n)
            +>    if n eq 1 then
            +>       return [RationalField() | 0, 1 ];
            +>    else
            +>       f := farey(n-1);
            +>       i := 0;
            +>       while i lt #f-1 do
            +>          i +:= 1;
            +>          if D(f[i]) + D(f[i+1]) eq n then
            +>             Insert( ~f, i+1, (N(f[i]) + N(f[i+1]))/(D(f[i]) + D(f[i+1])));
            +>          end if;
            +>       end while;
            +>       return f;
            +>    end if;
            +> end function;
            +> farey := func< n |
            +>               Sort(Setseq({ a/b : a in { 0..n }, b in { 1..n } | a le b }))>;
            +> farey(6);
            +[ 0, 1/6, 1/5, 1/4, 1/3, 2/5, 1/2, 3/5, 2/3, 3/4, 4/5, 5/6, 1 ]
            diff --git a/plugins/show-language/prism-show-language.js b/plugins/show-language/prism-show-language.js index 15945f4228..d1c2ecca6e 100644 --- a/plugins/show-language/prism-show-language.js +++ b/plugins/show-language/prism-show-language.js @@ -137,6 +137,7 @@ "llvm": "LLVM IR", "log": "Log file", "lolcode": "LOLCODE", + "magma": "Magma (CAS)", "md": "Markdown", "markup-templating": "Markup templating", "matlab": "MATLAB", diff --git a/plugins/show-language/prism-show-language.min.js b/plugins/show-language/prism-show-language.min.js index 4f7ecafa40..2fa9eabade 100644 --- a/plugins/show-language/prism-show-language.min.js +++ b/plugins/show-language/prism-show-language.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof Prism&&"undefined"!=typeof document)if(Prism.plugins.toolbar){var i={none:"Plain text",plain:"Plain text",plaintext:"Plain text",text:"Plain text",txt:"Plain text",html:"HTML",xml:"XML",svg:"SVG",mathml:"MathML",ssml:"SSML",rss:"RSS",css:"CSS",clike:"C-like",js:"JavaScript",abap:"ABAP",abnf:"ABNF",al:"AL",antlr4:"ANTLR4",g4:"ANTLR4",apacheconf:"Apache Configuration",apl:"APL",aql:"AQL",arff:"ARFF",asciidoc:"AsciiDoc",adoc:"AsciiDoc",aspnet:"ASP.NET (C#)",asm6502:"6502 Assembly",autohotkey:"AutoHotkey",autoit:"AutoIt","avro-idl":"Avro IDL",avdl:"Avro IDL",basic:"BASIC",bbcode:"BBcode",bnf:"BNF",rbnf:"RBNF",bsl:"BSL (1C:Enterprise)",oscript:"OneScript",csharp:"C#",cs:"C#",dotnet:"C#",cpp:"C++",cfscript:"CFScript",cfc:"CFScript",cil:"CIL",cmake:"CMake",cobol:"COBOL",coffee:"CoffeeScript",conc:"Concurnas",csp:"Content-Security-Policy","css-extras":"CSS Extras",csv:"CSV",dataweave:"DataWeave",dax:"DAX",django:"Django/Jinja2",jinja2:"Django/Jinja2","dns-zone-file":"DNS zone file","dns-zone":"DNS zone file",dockerfile:"Docker",dot:"DOT (Graphviz)",gv:"DOT (Graphviz)",ebnf:"EBNF",editorconfig:"EditorConfig",ejs:"EJS",etlua:"Embedded Lua templating",erb:"ERB","excel-formula":"Excel Formula",xlsx:"Excel Formula",xls:"Excel Formula",fsharp:"F#","firestore-security-rules":"Firestore security rules",ftl:"FreeMarker Template Language",gml:"GameMaker Language",gamemakerlanguage:"GameMaker Language",gap:"GAP (CAS)",gcode:"G-code",gdscript:"GDScript",gedcom:"GEDCOM",glsl:"GLSL",gn:"GN",gni:"GN",graphql:"GraphQL",hbs:"Handlebars",hs:"Haskell",hcl:"HCL",hlsl:"HLSL",http:"HTTP",hpkp:"HTTP Public-Key-Pins",hsts:"HTTP Strict-Transport-Security",ichigojam:"IchigoJam","icu-message-format":"ICU Message Format",idr:"Idris",ignore:".ignore",gitignore:".gitignore",hgignore:".hgignore",npmignore:".npmignore",inform7:"Inform 7",javadoc:"JavaDoc",javadoclike:"JavaDoc-like",javastacktrace:"Java stack trace",jq:"JQ",jsdoc:"JSDoc","js-extras":"JS Extras",json:"JSON",webmanifest:"Web App Manifest",json5:"JSON5",jsonp:"JSONP",jsstacktrace:"JS stack trace","js-templates":"JS Templates",kts:"Kotlin Script",kt:"Kotlin",kumir:"KuMir (КуМир)",kum:"KuMir (КуМир)",latex:"LaTeX",tex:"TeX",context:"ConTeXt",lilypond:"LilyPond",ly:"LilyPond",emacs:"Lisp",elisp:"Lisp","emacs-lisp":"Lisp",llvm:"LLVM IR",log:"Log file",lolcode:"LOLCODE",md:"Markdown","markup-templating":"Markup templating",matlab:"MATLAB",mel:"MEL",mongodb:"MongoDB",moon:"MoonScript",n1ql:"N1QL",n4js:"N4JS",n4jsd:"N4JS","nand2tetris-hdl":"Nand To Tetris HDL",naniscript:"Naninovel Script",nani:"Naninovel Script",nasm:"NASM",neon:"NEON",nginx:"nginx",nsis:"NSIS",objectivec:"Objective-C",objc:"Objective-C",ocaml:"OCaml",opencl:"OpenCL",openqasm:"OpenQasm",qasm:"OpenQasm",parigp:"PARI/GP",objectpascal:"Object Pascal",psl:"PATROL Scripting Language",pcaxis:"PC-Axis",px:"PC-Axis",peoplecode:"PeopleCode",pcode:"PeopleCode",php:"PHP",phpdoc:"PHPDoc","php-extras":"PHP Extras",plsql:"PL/SQL",powerquery:"PowerQuery",pq:"PowerQuery",mscript:"PowerQuery",powershell:"PowerShell",promql:"PromQL",properties:".properties",protobuf:"Protocol Buffers",purebasic:"PureBasic",pbfasm:"PureBasic",purs:"PureScript",py:"Python",qsharp:"Q#",qs:"Q#",q:"Q (kdb+ database)",qml:"QML",rkt:"Racket",jsx:"React JSX",tsx:"React TSX",renpy:"Ren'py",rpy:"Ren'py",rest:"reST (reStructuredText)",robotframework:"Robot Framework",robot:"Robot Framework",rb:"Ruby",sas:"SAS",sass:"Sass (Sass)",scss:"Sass (Scss)","shell-session":"Shell session","sh-session":"Shell session",shellsession:"Shell session",sml:"SML",smlnj:"SML/NJ",solidity:"Solidity (Ethereum)",sol:"Solidity (Ethereum)","solution-file":"Solution file",sln:"Solution file",soy:"Soy (Closure Template)",sparql:"SPARQL",rq:"SPARQL","splunk-spl":"Splunk SPL",sqf:"SQF: Status Quo Function (Arma 3)",sql:"SQL",iecst:"Structured Text (IEC 61131-3)",systemd:"Systemd configuration file","t4-templating":"T4 templating","t4-cs":"T4 Text Templates (C#)",t4:"T4 Text Templates (C#)","t4-vb":"T4 Text Templates (VB)",tap:"TAP",tt2:"Template Toolkit 2",toml:"TOML",trig:"TriG",ts:"TypeScript",tsconfig:"TSConfig",uscript:"UnrealScript",uc:"UnrealScript",uri:"URI",url:"URL",vbnet:"VB.Net",vhdl:"VHDL",vim:"vim","visual-basic":"Visual Basic",vba:"VBA",vb:"Visual Basic",wasm:"WebAssembly",wiki:"Wiki markup",wolfram:"Wolfram language",nb:"Mathematica Notebook",wl:"Wolfram language",xeoracube:"XeoraCube","xml-doc":"XML doc (.net)",xojo:"Xojo (REALbasic)",xquery:"XQuery",yaml:"YAML",yml:"YAML",yang:"YANG"};Prism.plugins.toolbar.registerButton("show-language",function(e){var a=e.element.parentNode;if(a&&/pre/i.test(a.nodeName)){var t,s=a.getAttribute("data-language")||i[e.language]||((t=e.language)?(t.substring(0,1).toUpperCase()+t.substring(1)).replace(/s(?=cript)/,"S"):t);if(s){var o=document.createElement("span");return o.textContent=s,o}}})}else console.warn("Show Languages plugin loaded before Toolbar plugin.")}(); \ No newline at end of file +!function(){if("undefined"!=typeof Prism&&"undefined"!=typeof document)if(Prism.plugins.toolbar){var i={none:"Plain text",plain:"Plain text",plaintext:"Plain text",text:"Plain text",txt:"Plain text",html:"HTML",xml:"XML",svg:"SVG",mathml:"MathML",ssml:"SSML",rss:"RSS",css:"CSS",clike:"C-like",js:"JavaScript",abap:"ABAP",abnf:"ABNF",al:"AL",antlr4:"ANTLR4",g4:"ANTLR4",apacheconf:"Apache Configuration",apl:"APL",aql:"AQL",arff:"ARFF",asciidoc:"AsciiDoc",adoc:"AsciiDoc",aspnet:"ASP.NET (C#)",asm6502:"6502 Assembly",autohotkey:"AutoHotkey",autoit:"AutoIt","avro-idl":"Avro IDL",avdl:"Avro IDL",basic:"BASIC",bbcode:"BBcode",bnf:"BNF",rbnf:"RBNF",bsl:"BSL (1C:Enterprise)",oscript:"OneScript",csharp:"C#",cs:"C#",dotnet:"C#",cpp:"C++",cfscript:"CFScript",cfc:"CFScript",cil:"CIL",cmake:"CMake",cobol:"COBOL",coffee:"CoffeeScript",conc:"Concurnas",csp:"Content-Security-Policy","css-extras":"CSS Extras",csv:"CSV",dataweave:"DataWeave",dax:"DAX",django:"Django/Jinja2",jinja2:"Django/Jinja2","dns-zone-file":"DNS zone file","dns-zone":"DNS zone file",dockerfile:"Docker",dot:"DOT (Graphviz)",gv:"DOT (Graphviz)",ebnf:"EBNF",editorconfig:"EditorConfig",ejs:"EJS",etlua:"Embedded Lua templating",erb:"ERB","excel-formula":"Excel Formula",xlsx:"Excel Formula",xls:"Excel Formula",fsharp:"F#","firestore-security-rules":"Firestore security rules",ftl:"FreeMarker Template Language",gml:"GameMaker Language",gamemakerlanguage:"GameMaker Language",gap:"GAP (CAS)",gcode:"G-code",gdscript:"GDScript",gedcom:"GEDCOM",glsl:"GLSL",gn:"GN",gni:"GN",graphql:"GraphQL",hbs:"Handlebars",hs:"Haskell",hcl:"HCL",hlsl:"HLSL",http:"HTTP",hpkp:"HTTP Public-Key-Pins",hsts:"HTTP Strict-Transport-Security",ichigojam:"IchigoJam","icu-message-format":"ICU Message Format",idr:"Idris",ignore:".ignore",gitignore:".gitignore",hgignore:".hgignore",npmignore:".npmignore",inform7:"Inform 7",javadoc:"JavaDoc",javadoclike:"JavaDoc-like",javastacktrace:"Java stack trace",jq:"JQ",jsdoc:"JSDoc","js-extras":"JS Extras",json:"JSON",webmanifest:"Web App Manifest",json5:"JSON5",jsonp:"JSONP",jsstacktrace:"JS stack trace","js-templates":"JS Templates",kts:"Kotlin Script",kt:"Kotlin",kumir:"KuMir (КуМир)",kum:"KuMir (КуМир)",latex:"LaTeX",tex:"TeX",context:"ConTeXt",lilypond:"LilyPond",ly:"LilyPond",emacs:"Lisp",elisp:"Lisp","emacs-lisp":"Lisp",llvm:"LLVM IR",log:"Log file",lolcode:"LOLCODE",magma:"Magma (CAS)",md:"Markdown","markup-templating":"Markup templating",matlab:"MATLAB",mel:"MEL",mongodb:"MongoDB",moon:"MoonScript",n1ql:"N1QL",n4js:"N4JS",n4jsd:"N4JS","nand2tetris-hdl":"Nand To Tetris HDL",naniscript:"Naninovel Script",nani:"Naninovel Script",nasm:"NASM",neon:"NEON",nginx:"nginx",nsis:"NSIS",objectivec:"Objective-C",objc:"Objective-C",ocaml:"OCaml",opencl:"OpenCL",openqasm:"OpenQasm",qasm:"OpenQasm",parigp:"PARI/GP",objectpascal:"Object Pascal",psl:"PATROL Scripting Language",pcaxis:"PC-Axis",px:"PC-Axis",peoplecode:"PeopleCode",pcode:"PeopleCode",php:"PHP",phpdoc:"PHPDoc","php-extras":"PHP Extras",plsql:"PL/SQL",powerquery:"PowerQuery",pq:"PowerQuery",mscript:"PowerQuery",powershell:"PowerShell",promql:"PromQL",properties:".properties",protobuf:"Protocol Buffers",purebasic:"PureBasic",pbfasm:"PureBasic",purs:"PureScript",py:"Python",qsharp:"Q#",qs:"Q#",q:"Q (kdb+ database)",qml:"QML",rkt:"Racket",jsx:"React JSX",tsx:"React TSX",renpy:"Ren'py",rpy:"Ren'py",rest:"reST (reStructuredText)",robotframework:"Robot Framework",robot:"Robot Framework",rb:"Ruby",sas:"SAS",sass:"Sass (Sass)",scss:"Sass (Scss)","shell-session":"Shell session","sh-session":"Shell session",shellsession:"Shell session",sml:"SML",smlnj:"SML/NJ",solidity:"Solidity (Ethereum)",sol:"Solidity (Ethereum)","solution-file":"Solution file",sln:"Solution file",soy:"Soy (Closure Template)",sparql:"SPARQL",rq:"SPARQL","splunk-spl":"Splunk SPL",sqf:"SQF: Status Quo Function (Arma 3)",sql:"SQL",iecst:"Structured Text (IEC 61131-3)",systemd:"Systemd configuration file","t4-templating":"T4 templating","t4-cs":"T4 Text Templates (C#)",t4:"T4 Text Templates (C#)","t4-vb":"T4 Text Templates (VB)",tap:"TAP",tt2:"Template Toolkit 2",toml:"TOML",trig:"TriG",ts:"TypeScript",tsconfig:"TSConfig",uscript:"UnrealScript",uc:"UnrealScript",uri:"URI",url:"URL",vbnet:"VB.Net",vhdl:"VHDL",vim:"vim","visual-basic":"Visual Basic",vba:"VBA",vb:"Visual Basic",wasm:"WebAssembly",wiki:"Wiki markup",wolfram:"Wolfram language",nb:"Mathematica Notebook",wl:"Wolfram language",xeoracube:"XeoraCube","xml-doc":"XML doc (.net)",xojo:"Xojo (REALbasic)",xquery:"XQuery",yaml:"YAML",yml:"YAML",yang:"YANG"};Prism.plugins.toolbar.registerButton("show-language",function(e){var a=e.element.parentNode;if(a&&/pre/i.test(a.nodeName)){var t,s=a.getAttribute("data-language")||i[e.language]||((t=e.language)?(t.substring(0,1).toUpperCase()+t.substring(1)).replace(/s(?=cript)/,"S"):t);if(s){var o=document.createElement("span");return o.textContent=s,o}}})}else console.warn("Show Languages plugin loaded before Toolbar plugin.")}(); \ No newline at end of file diff --git a/tests/languages/magma/boolean_feature.test b/tests/languages/magma/boolean_feature.test new file mode 100644 index 0000000000..d342140d7b --- /dev/null +++ b/tests/languages/magma/boolean_feature.test @@ -0,0 +1,9 @@ +true +false + +---------------------------------------------------- + +[ + ["boolean", "true"], + ["boolean", "false"] +] diff --git a/tests/languages/magma/comment_feature.test b/tests/languages/magma/comment_feature.test new file mode 100644 index 0000000000..861791f743 --- /dev/null +++ b/tests/languages/magma/comment_feature.test @@ -0,0 +1,13 @@ +// comment + +/* + comment + */ + +---------------------------------------------------- + +[ + ["comment", "// comment"], + + ["comment", "/*\r\n comment\r\n */"] +] diff --git a/tests/languages/magma/generator_feature.test b/tests/languages/magma/generator_feature.test new file mode 100644 index 0000000000..2e1728c8d4 --- /dev/null +++ b/tests/languages/magma/generator_feature.test @@ -0,0 +1,36 @@ +G := Group; + +---------------------------------------------------- + +[ + ["generator", "G"], + ["punctuation", "<"], + "a", + ["punctuation", ","], + " b", + ["punctuation", ">"], + ["operator", ":="], + ["generator", "Group"], + ["punctuation", "<"], + "a", + ["punctuation", ","], + " b ", + ["operator", "|"], + " a", + ["operator", "^"], + ["number", "2"], + ["operator", "="], + " b", + ["operator", "^"], + ["number", "3"], + ["operator", "="], + " a", + ["operator", "^"], + "b", + ["operator", "*"], + "b", + ["operator", "^"], + ["number", "2"], + ["punctuation", ">"], + ["punctuation", ";"] +] diff --git a/tests/languages/magma/keyword_feature.test b/tests/languages/magma/keyword_feature.test new file mode 100644 index 0000000000..7cdc58cdb3 --- /dev/null +++ b/tests/languages/magma/keyword_feature.test @@ -0,0 +1,177 @@ +_; +adj; +and; +assert; +assert2; +assert3; +assigned; +break; +by; +case; +cat; +catch; +clear; +cmpeq; +cmpne; +continue; +declare; +default; +delete; +diff; +div; +do; +elif; +else; +end; +eq; +error; +eval; +exists; +exit; +for; +forall; +forward; +fprintf; +freeze; +function; +ge; +gt; +if; +iload; +import; +in; +intrinsic; +is; +join; +le; +load; +local; +lt; +meet; +mod; +ne; +not; +notadj; +notin; +notsubset; +or; +print; +printf; +procedure; +quit; +random; +read; +readi; +repeat; +require; +requirege; +requirerange; +restore; +return; +save; +sdiff; +select; +subset; +then; +time; +to; +try; +until; +vprint; +vprintf; +vtime; +when; +where; +while; +xor; + +---------------------------------------------------- + +[ + ["keyword", "_"], ["punctuation", ";"], + ["keyword", "adj"], ["punctuation", ";"], + ["keyword", "and"], ["punctuation", ";"], + ["keyword", "assert"], ["punctuation", ";"], + ["keyword", "assert2"], ["punctuation", ";"], + ["keyword", "assert3"], ["punctuation", ";"], + ["keyword", "assigned"], ["punctuation", ";"], + ["keyword", "break"], ["punctuation", ";"], + ["keyword", "by"], ["punctuation", ";"], + ["keyword", "case"], ["punctuation", ";"], + ["keyword", "cat"], ["punctuation", ";"], + ["keyword", "catch"], ["punctuation", ";"], + ["keyword", "clear"], ["punctuation", ";"], + ["keyword", "cmpeq"], ["punctuation", ";"], + ["keyword", "cmpne"], ["punctuation", ";"], + ["keyword", "continue"], ["punctuation", ";"], + ["keyword", "declare"], ["punctuation", ";"], + ["keyword", "default"], ["punctuation", ";"], + ["keyword", "delete"], ["punctuation", ";"], + ["keyword", "diff"], ["punctuation", ";"], + ["keyword", "div"], ["punctuation", ";"], + ["keyword", "do"], ["punctuation", ";"], + ["keyword", "elif"], ["punctuation", ";"], + ["keyword", "else"], ["punctuation", ";"], + ["keyword", "end"], ["punctuation", ";"], + ["keyword", "eq"], ["punctuation", ";"], + ["keyword", "error"], ["punctuation", ";"], + ["keyword", "eval"], ["punctuation", ";"], + ["keyword", "exists"], ["punctuation", ";"], + ["keyword", "exit"], ["punctuation", ";"], + ["keyword", "for"], ["punctuation", ";"], + ["keyword", "forall"], ["punctuation", ";"], + ["keyword", "forward"], ["punctuation", ";"], + ["keyword", "fprintf"], ["punctuation", ";"], + ["keyword", "freeze"], ["punctuation", ";"], + ["keyword", "function"], ["punctuation", ";"], + ["keyword", "ge"], ["punctuation", ";"], + ["keyword", "gt"], ["punctuation", ";"], + ["keyword", "if"], ["punctuation", ";"], + ["keyword", "iload"], ["punctuation", ";"], + ["keyword", "import"], ["punctuation", ";"], + ["keyword", "in"], ["punctuation", ";"], + ["keyword", "intrinsic"], ["punctuation", ";"], + ["keyword", "is"], ["punctuation", ";"], + ["keyword", "join"], ["punctuation", ";"], + ["keyword", "le"], ["punctuation", ";"], + ["keyword", "load"], ["punctuation", ";"], + ["keyword", "local"], ["punctuation", ";"], + ["keyword", "lt"], ["punctuation", ";"], + ["keyword", "meet"], ["punctuation", ";"], + ["keyword", "mod"], ["punctuation", ";"], + ["keyword", "ne"], ["punctuation", ";"], + ["keyword", "not"], ["punctuation", ";"], + ["keyword", "notadj"], ["punctuation", ";"], + ["keyword", "notin"], ["punctuation", ";"], + ["keyword", "notsubset"], ["punctuation", ";"], + ["keyword", "or"], ["punctuation", ";"], + ["keyword", "print"], ["punctuation", ";"], + ["keyword", "printf"], ["punctuation", ";"], + ["keyword", "procedure"], ["punctuation", ";"], + ["keyword", "quit"], ["punctuation", ";"], + ["keyword", "random"], ["punctuation", ";"], + ["keyword", "read"], ["punctuation", ";"], + ["keyword", "readi"], ["punctuation", ";"], + ["keyword", "repeat"], ["punctuation", ";"], + ["keyword", "require"], ["punctuation", ";"], + ["keyword", "requirege"], ["punctuation", ";"], + ["keyword", "requirerange"], ["punctuation", ";"], + ["keyword", "restore"], ["punctuation", ";"], + ["keyword", "return"], ["punctuation", ";"], + ["keyword", "save"], ["punctuation", ";"], + ["keyword", "sdiff"], ["punctuation", ";"], + ["keyword", "select"], ["punctuation", ";"], + ["keyword", "subset"], ["punctuation", ";"], + ["keyword", "then"], ["punctuation", ";"], + ["keyword", "time"], ["punctuation", ";"], + ["keyword", "to"], ["punctuation", ";"], + ["keyword", "try"], ["punctuation", ";"], + ["keyword", "until"], ["punctuation", ";"], + ["keyword", "vprint"], ["punctuation", ";"], + ["keyword", "vprintf"], ["punctuation", ";"], + ["keyword", "vtime"], ["punctuation", ";"], + ["keyword", "when"], ["punctuation", ";"], + ["keyword", "where"], ["punctuation", ";"], + ["keyword", "while"], ["punctuation", ";"], + ["keyword", "xor"], ["punctuation", ";"] +] diff --git a/tests/languages/magma/number_feature.test b/tests/languages/magma/number_feature.test new file mode 100644 index 0000000000..ca029eb7ee --- /dev/null +++ b/tests/languages/magma/number_feature.test @@ -0,0 +1,17 @@ +123 +-123 + +1.234 + +0..100 + +---------------------------------------------------- + +[ + ["number", "123"], + ["operator", "-"], ["number", "123"], + + ["number", "1.234"], + + ["number", "0"], ["operator", ".."], ["number", "100"] +] diff --git a/tests/languages/magma/operator_feature.test b/tests/languages/magma/operator_feature.test new file mode 100644 index 0000000000..8411ae2bc3 --- /dev/null +++ b/tests/languages/magma/operator_feature.test @@ -0,0 +1,25 @@ ++ - * / ^ ~ ! += +:= -> .. +| # + +---------------------------------------------------- + +[ + ["operator", "+"], + ["operator", "-"], + ["operator", "*"], + ["operator", "/"], + ["operator", "^"], + ["operator", "~"], + ["operator", "!"], + + ["operator", "="], + + ["operator", ":="], + ["operator", "->"], + ["operator", ".."], + + ["operator", "|"], + ["operator", "#"] +] diff --git a/tests/languages/magma/punctuation_feature.test b/tests/languages/magma/punctuation_feature.test new file mode 100644 index 0000000000..f9cb42a344 --- /dev/null +++ b/tests/languages/magma/punctuation_feature.test @@ -0,0 +1,20 @@ +( ) [ ] { } < > +, ; . : + +---------------------------------------------------- + +[ + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", "["], + ["punctuation", "]"], + ["punctuation", "{"], + ["punctuation", "}"], + ["punctuation", "<"], + ["punctuation", ">"], + + ["punctuation", ","], + ["punctuation", ";"], + ["punctuation", "."], + ["punctuation", ":"] +] diff --git a/tests/languages/magma/string_feature.test b/tests/languages/magma/string_feature.test new file mode 100644 index 0000000000..d93a89eabe --- /dev/null +++ b/tests/languages/magma/string_feature.test @@ -0,0 +1,13 @@ +"" +"foo" +"\"" +"\n\n" + +---------------------------------------------------- + +[ + ["string", "\"\""], + ["string", "\"foo\""], + ["string", "\"\\\"\""], + ["string", "\"\\n\\n\""] +] From d216e602f38e3ff9acec69962b40ada07322e076 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Sun, 12 Sep 2021 20:00:45 +0200 Subject: [PATCH 0896/1100] Tests: Improved dection of empty patterns (#3058) --- components/prism-asciidoc.js | 2 +- components/prism-asciidoc.min.js | 2 +- components/prism-promql.js | 2 +- components/prism-promql.min.js | 2 +- package.json | 1 + tests/pattern-tests.js | 100 ++++++++++++++----------------- 6 files changed, 49 insertions(+), 60 deletions(-) diff --git a/components/prism-asciidoc.js b/components/prism-asciidoc.js index 486ca12fff..8909f14b33 100644 --- a/components/prism-asciidoc.js +++ b/components/prism-asciidoc.js @@ -35,7 +35,7 @@ pattern: /^\|={3,}(?:(?:\r?\n|\r(?!\n)).*)*?(?:\r?\n|\r)\|={3,}$/m, inside: { 'specifiers': { - pattern: /(?!\|)(?:(?:(?:\d+(?:\.\d+)?|\.\d+)[+*])?(?:[<^>](?:\.[<^>])?|\.[<^>])?[a-z]*)(?=\|)/, + pattern: /(?:(?:(?:\d+(?:\.\d+)?|\.\d+)[+*](?:[<^>](?:\.[<^>])?|\.[<^>])?|[<^>](?:\.[<^>])?|\.[<^>])[a-z]*|[a-z]+)(?=\|)/, alias: 'attr-value' }, 'punctuation': { diff --git a/components/prism-asciidoc.min.js b/components/prism-asciidoc.min.js index 9df76136b9..dc59cbf3b0 100644 --- a/components/prism-asciidoc.min.js +++ b/components/prism-asciidoc.min.js @@ -1 +1 @@ -!function(t){var n={pattern:/(^[ \t]*)\[(?!\[)(?:(["'$`])(?:(?!\2)[^\\]|\\.)*\2|\[(?:[^\[\]\\]|\\.)*\]|[^\[\]\\"'$`]|\\.)*\]/m,lookbehind:!0,inside:{quoted:{pattern:/([$`])(?:(?!\1)[^\\]|\\.)*\1/,inside:{punctuation:/^[$`]|[$`]$/}},interpreted:{pattern:/'(?:[^'\\]|\\.)*'/,inside:{punctuation:/^'|'$/}},string:/"(?:[^"\\]|\\.)*"/,variable:/\w+(?==)/,punctuation:/^\[|\]$|,/,operator:/=/,"attr-value":/(?!^\s+$).+/}},a=t.languages.asciidoc={"comment-block":{pattern:/^(\/{4,})(?:\r?\n|\r)(?:[\s\S]*(?:\r?\n|\r))??\1/m,alias:"comment"},table:{pattern:/^\|={3,}(?:(?:\r?\n|\r(?!\n)).*)*?(?:\r?\n|\r)\|={3,}$/m,inside:{specifiers:{pattern:/(?!\|)(?:(?:(?:\d+(?:\.\d+)?|\.\d+)[+*])?(?:[<^>](?:\.[<^>])?|\.[<^>])?[a-z]*)(?=\|)/,alias:"attr-value"},punctuation:{pattern:/(^|[^\\])[|!]=*/,lookbehind:!0}}},"passthrough-block":{pattern:/^(\+{4,})(?:\r?\n|\r)(?:[\s\S]*(?:\r?\n|\r))??\1$/m,inside:{punctuation:/^\++|\++$/}},"literal-block":{pattern:/^(-{4,}|\.{4,})(?:\r?\n|\r)(?:[\s\S]*(?:\r?\n|\r))??\1$/m,inside:{punctuation:/^(?:-+|\.+)|(?:-+|\.+)$/}},"other-block":{pattern:/^(--|\*{4,}|_{4,}|={4,})(?:\r?\n|\r)(?:[\s\S]*(?:\r?\n|\r))??\1$/m,inside:{punctuation:/^(?:-+|\*+|_+|=+)|(?:-+|\*+|_+|=+)$/}},"list-punctuation":{pattern:/(^[ \t]*)(?:-|\*{1,5}|\.{1,5}|(?:[a-z]|\d+)\.|[xvi]+\))(?= )/im,lookbehind:!0,alias:"punctuation"},"list-label":{pattern:/(^[ \t]*)[a-z\d].+(?::{2,4}|;;)(?=\s)/im,lookbehind:!0,alias:"symbol"},"indented-block":{pattern:/((\r?\n|\r)\2)([ \t]+)\S.*(?:(?:\r?\n|\r)\3.+)*(?=\2{2}|$)/,lookbehind:!0},comment:/^\/\/.*/m,title:{pattern:/^.+(?:\r?\n|\r)(?:={3,}|-{3,}|~{3,}|\^{3,}|\+{3,})$|^={1,5} .+|^\.(?![\s.]).*/m,alias:"important",inside:{punctuation:/^(?:\.|=+)|(?:=+|-+|~+|\^+|\++)$/}},"attribute-entry":{pattern:/^:[^:\r\n]+:(?: .*?(?: \+(?:\r?\n|\r).*?)*)?$/m,alias:"tag"},attributes:n,hr:{pattern:/^'{3,}$/m,alias:"punctuation"},"page-break":{pattern:/^<{3,}$/m,alias:"punctuation"},admonition:{pattern:/^(?:TIP|NOTE|IMPORTANT|WARNING|CAUTION):/m,alias:"keyword"},callout:[{pattern:/(^[ \t]*)/m,lookbehind:!0,alias:"symbol"},{pattern:/<\d+>/,alias:"symbol"}],macro:{pattern:/\b[a-z\d][a-z\d-]*::?(?:[^\s\[\]]*\[(?:[^\]\\"']|(["'])(?:(?!\1)[^\\]|\\.)*\1|\\.)*\])/,inside:{function:/^[a-z\d-]+(?=:)/,punctuation:/^::?/,attributes:{pattern:/(?:\[(?:[^\]\\"']|(["'])(?:(?!\1)[^\\]|\\.)*\1|\\.)*\])/,inside:n.inside}}},inline:{pattern:/(^|[^\\])(?:(?:\B\[(?:[^\]\\"']|(["'])(?:(?!\2)[^\\]|\\.)*\2|\\.)*\])?(?:\b_(?!\s)(?: _|[^_\\\r\n]|\\.)+(?:(?:\r?\n|\r)(?: _|[^_\\\r\n]|\\.)+)*_\b|\B``(?!\s).+?(?:(?:\r?\n|\r).+?)*''\B|\B`(?!\s)(?:[^`'\s]|\s+\S)+['`]\B|\B(['*+#])(?!\s)(?: \3|(?!\3)[^\\\r\n]|\\.)+(?:(?:\r?\n|\r)(?: \3|(?!\3)[^\\\r\n]|\\.)+)*\3\B)|(?:\[(?:[^\]\\"']|(["'])(?:(?!\4)[^\\]|\\.)*\4|\\.)*\])?(?:(__|\*\*|\+\+\+?|##|\$\$|[~^]).+?(?:(?:\r?\n|\r).+?)*\5|\{[^}\r\n]+\}|\[\[\[?.+?(?:(?:\r?\n|\r).+?)*\]?\]\]|<<.+?(?:(?:\r?\n|\r).+?)*>>|\(\(\(?.+?(?:(?:\r?\n|\r).+?)*\)?\)\)))/m,lookbehind:!0,inside:{attributes:n,url:{pattern:/^(?:\[\[\[?.+?\]?\]\]|<<.+?>>)$/,inside:{punctuation:/^(?:\[\[\[?|<<)|(?:\]\]\]?|>>)$/}},"attribute-ref":{pattern:/^\{.+\}$/,inside:{variable:{pattern:/(^\{)[a-z\d,+_-]+/,lookbehind:!0},operator:/^[=?!#%@$]|!(?=[:}])/,punctuation:/^\{|\}$|::?/}},italic:{pattern:/^(['_])[\s\S]+\1$/,inside:{punctuation:/^(?:''?|__?)|(?:''?|__?)$/}},bold:{pattern:/^\*[\s\S]+\*$/,inside:{punctuation:/^\*\*?|\*\*?$/}},punctuation:/^(?:``?|\+{1,3}|##?|\$\$|[~^]|\(\(\(?)|(?:''?|\+{1,3}|##?|\$\$|[~^`]|\)?\)\))$/}},replacement:{pattern:/\((?:C|TM|R)\)/,alias:"builtin"},entity:/&#?[\da-z]{1,8};/i,"line-continuation":{pattern:/(^| )\+$/m,lookbehind:!0,alias:"punctuation"}};function i(t){for(var n={},i=0,e=(t=t.split(" ")).length;i](?:\.[<^>])?|\.[<^>])?|[<^>](?:\.[<^>])?|\.[<^>])[a-z]*|[a-z]+)(?=\|)/,alias:"attr-value"},punctuation:{pattern:/(^|[^\\])[|!]=*/,lookbehind:!0}}},"passthrough-block":{pattern:/^(\+{4,})(?:\r?\n|\r)(?:[\s\S]*(?:\r?\n|\r))??\1$/m,inside:{punctuation:/^\++|\++$/}},"literal-block":{pattern:/^(-{4,}|\.{4,})(?:\r?\n|\r)(?:[\s\S]*(?:\r?\n|\r))??\1$/m,inside:{punctuation:/^(?:-+|\.+)|(?:-+|\.+)$/}},"other-block":{pattern:/^(--|\*{4,}|_{4,}|={4,})(?:\r?\n|\r)(?:[\s\S]*(?:\r?\n|\r))??\1$/m,inside:{punctuation:/^(?:-+|\*+|_+|=+)|(?:-+|\*+|_+|=+)$/}},"list-punctuation":{pattern:/(^[ \t]*)(?:-|\*{1,5}|\.{1,5}|(?:[a-z]|\d+)\.|[xvi]+\))(?= )/im,lookbehind:!0,alias:"punctuation"},"list-label":{pattern:/(^[ \t]*)[a-z\d].+(?::{2,4}|;;)(?=\s)/im,lookbehind:!0,alias:"symbol"},"indented-block":{pattern:/((\r?\n|\r)\2)([ \t]+)\S.*(?:(?:\r?\n|\r)\3.+)*(?=\2{2}|$)/,lookbehind:!0},comment:/^\/\/.*/m,title:{pattern:/^.+(?:\r?\n|\r)(?:={3,}|-{3,}|~{3,}|\^{3,}|\+{3,})$|^={1,5} .+|^\.(?![\s.]).*/m,alias:"important",inside:{punctuation:/^(?:\.|=+)|(?:=+|-+|~+|\^+|\++)$/}},"attribute-entry":{pattern:/^:[^:\r\n]+:(?: .*?(?: \+(?:\r?\n|\r).*?)*)?$/m,alias:"tag"},attributes:n,hr:{pattern:/^'{3,}$/m,alias:"punctuation"},"page-break":{pattern:/^<{3,}$/m,alias:"punctuation"},admonition:{pattern:/^(?:TIP|NOTE|IMPORTANT|WARNING|CAUTION):/m,alias:"keyword"},callout:[{pattern:/(^[ \t]*)/m,lookbehind:!0,alias:"symbol"},{pattern:/<\d+>/,alias:"symbol"}],macro:{pattern:/\b[a-z\d][a-z\d-]*::?(?:[^\s\[\]]*\[(?:[^\]\\"']|(["'])(?:(?!\1)[^\\]|\\.)*\1|\\.)*\])/,inside:{function:/^[a-z\d-]+(?=:)/,punctuation:/^::?/,attributes:{pattern:/(?:\[(?:[^\]\\"']|(["'])(?:(?!\1)[^\\]|\\.)*\1|\\.)*\])/,inside:n.inside}}},inline:{pattern:/(^|[^\\])(?:(?:\B\[(?:[^\]\\"']|(["'])(?:(?!\2)[^\\]|\\.)*\2|\\.)*\])?(?:\b_(?!\s)(?: _|[^_\\\r\n]|\\.)+(?:(?:\r?\n|\r)(?: _|[^_\\\r\n]|\\.)+)*_\b|\B``(?!\s).+?(?:(?:\r?\n|\r).+?)*''\B|\B`(?!\s)(?:[^`'\s]|\s+\S)+['`]\B|\B(['*+#])(?!\s)(?: \3|(?!\3)[^\\\r\n]|\\.)+(?:(?:\r?\n|\r)(?: \3|(?!\3)[^\\\r\n]|\\.)+)*\3\B)|(?:\[(?:[^\]\\"']|(["'])(?:(?!\4)[^\\]|\\.)*\4|\\.)*\])?(?:(__|\*\*|\+\+\+?|##|\$\$|[~^]).+?(?:(?:\r?\n|\r).+?)*\5|\{[^}\r\n]+\}|\[\[\[?.+?(?:(?:\r?\n|\r).+?)*\]?\]\]|<<.+?(?:(?:\r?\n|\r).+?)*>>|\(\(\(?.+?(?:(?:\r?\n|\r).+?)*\)?\)\)))/m,lookbehind:!0,inside:{attributes:n,url:{pattern:/^(?:\[\[\[?.+?\]?\]\]|<<.+?>>)$/,inside:{punctuation:/^(?:\[\[\[?|<<)|(?:\]\]\]?|>>)$/}},"attribute-ref":{pattern:/^\{.+\}$/,inside:{variable:{pattern:/(^\{)[a-z\d,+_-]+/,lookbehind:!0},operator:/^[=?!#%@$]|!(?=[:}])/,punctuation:/^\{|\}$|::?/}},italic:{pattern:/^(['_])[\s\S]+\1$/,inside:{punctuation:/^(?:''?|__?)|(?:''?|__?)$/}},bold:{pattern:/^\*[\s\S]+\*$/,inside:{punctuation:/^\*\*?|\*\*?$/}},punctuation:/^(?:``?|\+{1,3}|##?|\$\$|[~^]|\(\(\(?)|(?:''?|\+{1,3}|##?|\$\$|[~^`]|\)?\)\))$/}},replacement:{pattern:/\((?:C|TM|R)\)/,alias:"builtin"},entity:/&#?[\da-z]{1,8};/i,"line-continuation":{pattern:/(^| )\+$/m,lookbehind:!0,alias:"punctuation"}};function i(t){for(var n={},i=0,e=(t=t.split(" ")).length;i=|>|\b(?:and|unless|or)\b/i,punctuation:/[{};()`,.[\]]/}}(Prism); \ No newline at end of file +!function(t){var n=["on","ignoring","group_right","group_left","by","without"],a=["sum","min","max","avg","group","stddev","stdvar","count","count_values","bottomk","topk","quantile"].concat(n,["offset"]);t.languages.promql={comment:{pattern:/(^[ \t]*)#.*/m,lookbehind:!0},"vector-match":{pattern:new RegExp("((?:"+n.join("|")+")\\s*)\\([^)]*\\)"),lookbehind:!0,inside:{"label-key":{pattern:/\b[^,]+\b/,alias:"attr-name"},punctuation:/[(),]/}},"context-labels":{pattern:/\{[^{}]*\}/,inside:{"label-key":{pattern:/\b[a-z_]\w*(?=\s*(?:=|![=~]))/,alias:"attr-name"},"label-value":{pattern:/(["'`])(?:\\[\s\S]|(?!\1)[^\\])*\1/,greedy:!0,alias:"attr-value"},punctuation:/\{|\}|=~?|![=~]|,/}},"context-range":[{pattern:/\[[\w\s:]+\]/,inside:{punctuation:/\[|\]|:/,"range-duration":{pattern:/\b(?:\d+(?:[smhdwy]|ms))+\b/i,alias:"number"}}},{pattern:/(\boffset\s+)\w+/,lookbehind:!0,inside:{"range-duration":{pattern:/\b(?:\d+(?:[smhdwy]|ms))+\b/i,alias:"number"}}}],keyword:new RegExp("\\b(?:"+a.join("|")+")\\b","i"),function:/\b[a-z_]\w*(?=\s*\()/i,number:/[-+]?(?:(?:\b\d+(?:\.\d+)?|\B\.\d+)(?:e[-+]?\d+)?\b|\b(?:0x[0-9a-f]+|nan|inf)\b)/i,operator:/[\^*/%+-]|==|!=|<=|<|>=|>|\b(?:and|unless|or)\b/i,punctuation:/[{};()`,.[\]]/}}(Prism); \ No newline at end of file diff --git a/package.json b/package.json index afea4802c9..2c5190094d 100755 --- a/package.json +++ b/package.json @@ -59,6 +59,7 @@ "npm-run-all": "^4.1.5", "pump": "^3.0.0", "refa": "^0.9.1", + "regexp-ast-analysis": "^0.2.4", "regexpp": "^3.2.0", "scslre": "^0.1.6", "simple-git": "^1.107.0", diff --git a/tests/pattern-tests.js b/tests/pattern-tests.js index 282021a171..5ebaaa64bb 100644 --- a/tests/pattern-tests.js +++ b/tests/pattern-tests.js @@ -12,6 +12,7 @@ const { transform, combineTransformers, getIntersectionWordSets, JS, Words, NFA, const scslre = require('scslre'); const path = require('path'); const { argv } = require('yargs'); +const RAA = require('regexp-ast-analysis'); /** * A map from language id to a list of code snippets in that language. @@ -130,6 +131,7 @@ function testPatterns(Prism, mainLanguage) { * @property {string} name * @property {any} parent * @property {boolean} lookbehind Whether the first capturing group of the pattern is a Prism lookbehind group. + * @property {CapturingGroup | undefined} lookbehindGroup * @property {{ key: string, value: any }[]} path * @property {(message: string) => void} reportError */ @@ -163,6 +165,8 @@ function testPatterns(Prism, mainLanguage) { } const parent = path.length > 1 ? path[path.length - 2].value : undefined; + const lookbehind = key === 'pattern' && parent && !!parent.lookbehind; + const lookbehindGroup = lookbehind ? getFirstCapturingGroup(ast.pattern) : undefined; callback({ pattern: value, ast, @@ -170,7 +174,8 @@ function testPatterns(Prism, mainLanguage) { name: key, parent, path, - lookbehind: key === 'pattern' && parent && !!parent.lookbehind, + lookbehind, + lookbehindGroup, reportError: message => errors.push(message) }); } catch (error) { @@ -231,9 +236,10 @@ function testPatterns(Prism, mainLanguage) { it('- should not match the empty string', function () { - forEachPattern(({ pattern, tokenPath }) => { + forEachPattern(({ ast, pattern, tokenPath }) => { // test for empty string - assert.notMatch('', pattern, `${tokenPath}: ${pattern} should not match the empty string.\n\n` + const empty = RAA.isPotentiallyZeroLength(ast.pattern.alternatives); + assert.isFalse(empty, `${tokenPath}: ${pattern} should not match the empty string.\n\n` + `Patterns that do match the empty string can potentially cause infinitely many empty tokens. ` + `Make sure that all patterns always consume at least one character.`); }); @@ -256,47 +262,37 @@ function testPatterns(Prism, mainLanguage) { }); it('- should not have lookbehind groups that can be preceded by other some characters', function () { - forEachPattern(({ ast, tokenPath, lookbehind }) => { - if (!lookbehind) { - return; + forEachPattern(({ tokenPath, lookbehindGroup }) => { + if (lookbehindGroup && !isFirstMatch(lookbehindGroup)) { + assert.fail(`${tokenPath}: The lookbehind group ${lookbehindGroup.raw} might be preceded by some characters.\n\n` + + `Prism assumes that the lookbehind group, if captured, is the first thing matched by the regex. ` + + `If characters might precede the lookbehind group (e.g. /a?(b)c/), then Prism cannot correctly apply the lookbehind correctly in all cases.\n` + + `To fix this, either remove the preceding characters or include them in the lookbehind group.`); } - forEachCapturingGroup(ast.pattern, ({ group, number }) => { - if (number === 1 && !isFirstMatch(group)) { - assert.fail(`${tokenPath}: The lookbehind group ${group.raw} might be preceded by some characters.\n\n` - + `Prism assumes that the lookbehind group, if captured, is the first thing matched by the regex. ` - + `If characters might precede the lookbehind group (e.g. /a?(b)c/), then Prism cannot correctly apply the lookbehind correctly in all cases.\n` - + `To fix this, either remove the preceding characters or include them in the lookbehind group.`); - } - }); }); }); it('- should not have lookbehind groups that only have zero-width alternatives', function () { - forEachPattern(({ ast, tokenPath, lookbehind, reportError }) => { - if (!lookbehind) { - return; + forEachPattern(({ tokenPath, lookbehindGroup, reportError }) => { + if (lookbehindGroup && RAA.isZeroLength(lookbehindGroup)) { + const groupContent = lookbehindGroup.raw.substr(1, lookbehindGroup.raw.length - 2); + const replacement = lookbehindGroup.alternatives.length === 1 ? groupContent : `(?:${groupContent})`; + reportError(`${tokenPath}: The lookbehind group ${lookbehindGroup.raw} does not consume characters.\n\n` + + `Therefor it is not necessary to use a lookbehind group.\n` + + `To fix this, replace the lookbehind group with ${replacement} and remove the 'lookbehind' property.`); } - forEachCapturingGroup(ast.pattern, ({ group, number }) => { - if (number === 1 && isAlwaysZeroWidth(group)) { - const groupContent = group.raw.substr(1, group.raw.length - 2); - const replacement = group.alternatives.length === 1 ? groupContent : `(?:${groupContent})`; - reportError(`${tokenPath}: The lookbehind group ${group.raw} does not consume characters.\n\n` - + `Therefor it is not necessary to use a lookbehind group.\n` - + `To fix this, replace the lookbehind group with ${replacement} and remove the 'lookbehind' property.`); - } - }); }); }); it('- should not have unused capturing groups', function () { - forEachPattern(({ ast, tokenPath, lookbehind, reportError }) => { + forEachPattern(({ ast, tokenPath, lookbehindGroup, reportError }) => { forEachCapturingGroup(ast.pattern, ({ group, number }) => { - const isLookbehindGroup = lookbehind && number === 1; + const isLookbehindGroup = group === lookbehindGroup; if (group.references.length === 0 && !isLookbehindGroup) { const fixes = []; fixes.push(`Make this group a non-capturing group ('(?:...)' instead of '(...)'). (It's usually this option.)`); fixes.push(`Reference this group with a backreference (use '\\${number}' for this).`); - if (number === 1 && !lookbehind) { + if (number === 1 && !lookbehindGroup) { if (isFirstMatch(group)) { fixes.push(`Add a 'lookbehind: true' declaration.`); } else { @@ -392,28 +388,26 @@ function testPatterns(Prism, mainLanguage) { /** - * Returns whether the given element will always have zero width meaning that it doesn't consume characters. + * Returns the first capturing group in the given pattern. * - * @param {Element} element - * @returns {boolean} + * @param {Pattern} pattern + * @returns {CapturingGroup | undefined} */ -function isAlwaysZeroWidth(element) { - switch (element.type) { - case 'Assertion': - // assertions == ^, $, \b, lookarounds - return true; - case 'Quantifier': - return element.max === 0 || isAlwaysZeroWidth(element.element); - case 'CapturingGroup': - case 'Group': - // every element in every alternative has to be of zero length - return element.alternatives.every(alt => alt.elements.every(isAlwaysZeroWidth)); - case 'Backreference': - // on if the group referred to is of zero length - return isAlwaysZeroWidth(element.resolved); - default: - return false; // what's left are characters +function getFirstCapturingGroup(pattern) { + let cap = undefined; + + try { + visitRegExpAST(pattern, { + onCapturingGroupEnter(node) { + cap = node; + throw new Error('stop'); + } + }); + } catch (error) { + // ignore errors } + + return cap; } /** @@ -427,7 +421,7 @@ function isFirstMatch(element) { switch (parent.type) { case 'Alternative': { // all elements before this element have to of zero length - if (!parent.elements.slice(0, parent.elements.indexOf(element)).every(isAlwaysZeroWidth)) { + if (!parent.elements.slice(0, parent.elements.indexOf(element)).every(RAA.isZeroLength)) { return false; } const grandParent = parent.parent; @@ -457,13 +451,7 @@ function isFirstMatch(element) { * @returns {boolean} */ function underAStar(node) { - if (node.type === 'Quantifier' && node.max > 10) { - return true; - } else if (node.parent) { - return underAStar(node.parent); - } else { - return false; - } + return RAA.getEffectiveMaximumRepetition(node) > 10; } /** From 0ff371bb4775a131634f47d0fe85794c547232f9 Mon Sep 17 00:00:00 2001 From: ready-research <72916209+ready-research@users.noreply.github.com> Date: Wed, 15 Sep 2021 15:18:53 +0530 Subject: [PATCH 0897/1100] Markup: Fixed ReDoS (#3078) --- components/prism-markup.js | 2 +- components/prism-markup.min.js | 2 +- prism.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/components/prism-markup.js b/components/prism-markup.js index f73fc31448..58d8b352ed 100644 --- a/components/prism-markup.js +++ b/components/prism-markup.js @@ -1,5 +1,5 @@ Prism.languages.markup = { - 'comment': //, + 'comment': //, 'prolog': /<\?[\s\S]+?\?>/, 'doctype': { // https://www.w3.org/TR/xml/#NT-doctypedecl diff --git a/components/prism-markup.min.js b/components/prism-markup.min.js index cf5b9c02bc..2c33388bb6 100644 --- a/components/prism-markup.min.js +++ b/components/prism-markup.min.js @@ -1 +1 @@ -Prism.languages.markup={comment://,prolog:/<\?[\s\S]+?\?>/,doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^$|[[\]]/,"doctype-tag":/^DOCTYPE/,name:/[^\s<>'"]+/}},cdata://i,tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},Prism.languages.markup.tag.inside["attr-value"].inside.entity=Prism.languages.markup.entity,Prism.languages.markup.doctype.inside["internal-subset"].inside=Prism.languages.markup,Prism.hooks.add("wrap",function(a){"entity"===a.type&&(a.attributes.title=a.content.replace(/&/,"&"))}),Object.defineProperty(Prism.languages.markup.tag,"addInlined",{value:function(a,e){var s={};s["language-"+e]={pattern:/(^$)/i,lookbehind:!0,inside:Prism.languages[e]},s.cdata=/^$/i;var t={"included-cdata":{pattern://i,inside:s}};t["language-"+e]={pattern:/[\s\S]+/,inside:Prism.languages[e]};var n={};n[a]={pattern:RegExp("(<__[^>]*>)(?:))*\\]\\]>|(?!)".replace(/__/g,function(){return a}),"i"),lookbehind:!0,greedy:!0,inside:t},Prism.languages.insertBefore("markup","cdata",n)}}),Object.defineProperty(Prism.languages.markup.tag,"addAttribute",{value:function(a,e){Prism.languages.markup.tag.inside["special-attr"].push({pattern:RegExp("(^|[\"'\\s])(?:"+a+")\\s*=\\s*(?:\"[^\"]*\"|'[^']*'|[^\\s'\">=]+(?=[\\s>]))","i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[e,"language-"+e],inside:Prism.languages[e]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),Prism.languages.html=Prism.languages.markup,Prism.languages.mathml=Prism.languages.markup,Prism.languages.svg=Prism.languages.markup,Prism.languages.xml=Prism.languages.extend("markup",{}),Prism.languages.ssml=Prism.languages.xml,Prism.languages.atom=Prism.languages.xml,Prism.languages.rss=Prism.languages.xml; \ No newline at end of file +Prism.languages.markup={comment://,prolog:/<\?[\s\S]+?\?>/,doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^$|[[\]]/,"doctype-tag":/^DOCTYPE/,name:/[^\s<>'"]+/}},cdata://i,tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},Prism.languages.markup.tag.inside["attr-value"].inside.entity=Prism.languages.markup.entity,Prism.languages.markup.doctype.inside["internal-subset"].inside=Prism.languages.markup,Prism.hooks.add("wrap",function(a){"entity"===a.type&&(a.attributes.title=a.content.replace(/&/,"&"))}),Object.defineProperty(Prism.languages.markup.tag,"addInlined",{value:function(a,e){var s={};s["language-"+e]={pattern:/(^$)/i,lookbehind:!0,inside:Prism.languages[e]},s.cdata=/^$/i;var t={"included-cdata":{pattern://i,inside:s}};t["language-"+e]={pattern:/[\s\S]+/,inside:Prism.languages[e]};var n={};n[a]={pattern:RegExp("(<__[^>]*>)(?:))*\\]\\]>|(?!)".replace(/__/g,function(){return a}),"i"),lookbehind:!0,greedy:!0,inside:t},Prism.languages.insertBefore("markup","cdata",n)}}),Object.defineProperty(Prism.languages.markup.tag,"addAttribute",{value:function(a,e){Prism.languages.markup.tag.inside["special-attr"].push({pattern:RegExp("(^|[\"'\\s])(?:"+a+")\\s*=\\s*(?:\"[^\"]*\"|'[^']*'|[^\\s'\">=]+(?=[\\s>]))","i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[e,"language-"+e],inside:Prism.languages[e]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),Prism.languages.html=Prism.languages.markup,Prism.languages.mathml=Prism.languages.markup,Prism.languages.svg=Prism.languages.markup,Prism.languages.xml=Prism.languages.extend("markup",{}),Prism.languages.ssml=Prism.languages.xml,Prism.languages.atom=Prism.languages.xml,Prism.languages.rss=Prism.languages.xml; \ No newline at end of file diff --git a/prism.js b/prism.js index 2358d68c29..05d9a99d0b 100644 --- a/prism.js +++ b/prism.js @@ -1231,7 +1231,7 @@ if (typeof global !== 'undefined') { ********************************************** */ Prism.languages.markup = { - 'comment': //, + 'comment': //, 'prolog': /<\?[\s\S]+?\?>/, 'doctype': { // https://www.w3.org/TR/xml/#NT-doctypedecl From c7b6a7f6a514143fa4a32774775e4b91676ce91d Mon Sep 17 00:00:00 2001 From: Wei Ting <59229084+hoonweiting@users.noreply.github.com> Date: Thu, 16 Sep 2021 01:40:17 +0800 Subject: [PATCH 0898/1100] Previewers: Ensure popup is visible across themes (#3080) --- plugins/previewers/prism-previewers.css | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/previewers/prism-previewers.css b/plugins/previewers/prism-previewers.css index b36988c2bf..2d5e9570c0 100644 --- a/plugins/previewers/prism-previewers.css +++ b/plugins/previewers/prism-previewers.css @@ -13,6 +13,7 @@ width: 32px; height: 32px; margin-left: -16px; + z-index: 10; opacity: 0; -webkit-transition: opacity .25s; From 52e8cee97ad9e54c5095dc2e695cf8b50697f8fc Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Wed, 15 Sep 2021 20:03:41 +0200 Subject: [PATCH 0899/1100] Markup: Made most patterns greedy (#3065) --- components/prism-markup.js | 17 +++++++++++++---- components/prism-markup.min.js | 2 +- prism.js | 17 +++++++++++++---- 3 files changed, 27 insertions(+), 9 deletions(-) diff --git a/components/prism-markup.js b/components/prism-markup.js index 58d8b352ed..7d4d2e2b4f 100644 --- a/components/prism-markup.js +++ b/components/prism-markup.js @@ -1,6 +1,12 @@ Prism.languages.markup = { - 'comment': //, - 'prolog': /<\?[\s\S]+?\?>/, + 'comment': { + pattern: //, + greedy: true + }, + 'prolog': { + pattern: /<\?[\s\S]+?\?>/, + greedy: true + }, 'doctype': { // https://www.w3.org/TR/xml/#NT-doctypedecl pattern: /"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i, @@ -17,11 +23,14 @@ Prism.languages.markup = { greedy: true }, 'punctuation': /^$|[[\]]/, - 'doctype-tag': /^DOCTYPE/, + 'doctype-tag': /^DOCTYPE/i, 'name': /[^\s<>'"]+/ } }, - 'cdata': //i, + 'cdata': { + pattern: //i, + greedy: true + }, 'tag': { pattern: /<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/, greedy: true, diff --git a/components/prism-markup.min.js b/components/prism-markup.min.js index 2c33388bb6..738b2decd8 100644 --- a/components/prism-markup.min.js +++ b/components/prism-markup.min.js @@ -1 +1 @@ -Prism.languages.markup={comment://,prolog:/<\?[\s\S]+?\?>/,doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^$|[[\]]/,"doctype-tag":/^DOCTYPE/,name:/[^\s<>'"]+/}},cdata://i,tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},Prism.languages.markup.tag.inside["attr-value"].inside.entity=Prism.languages.markup.entity,Prism.languages.markup.doctype.inside["internal-subset"].inside=Prism.languages.markup,Prism.hooks.add("wrap",function(a){"entity"===a.type&&(a.attributes.title=a.content.replace(/&/,"&"))}),Object.defineProperty(Prism.languages.markup.tag,"addInlined",{value:function(a,e){var s={};s["language-"+e]={pattern:/(^$)/i,lookbehind:!0,inside:Prism.languages[e]},s.cdata=/^$/i;var t={"included-cdata":{pattern://i,inside:s}};t["language-"+e]={pattern:/[\s\S]+/,inside:Prism.languages[e]};var n={};n[a]={pattern:RegExp("(<__[^>]*>)(?:))*\\]\\]>|(?!)".replace(/__/g,function(){return a}),"i"),lookbehind:!0,greedy:!0,inside:t},Prism.languages.insertBefore("markup","cdata",n)}}),Object.defineProperty(Prism.languages.markup.tag,"addAttribute",{value:function(a,e){Prism.languages.markup.tag.inside["special-attr"].push({pattern:RegExp("(^|[\"'\\s])(?:"+a+")\\s*=\\s*(?:\"[^\"]*\"|'[^']*'|[^\\s'\">=]+(?=[\\s>]))","i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[e,"language-"+e],inside:Prism.languages[e]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),Prism.languages.html=Prism.languages.markup,Prism.languages.mathml=Prism.languages.markup,Prism.languages.svg=Prism.languages.markup,Prism.languages.xml=Prism.languages.extend("markup",{}),Prism.languages.ssml=Prism.languages.xml,Prism.languages.atom=Prism.languages.xml,Prism.languages.rss=Prism.languages.xml; \ No newline at end of file +Prism.languages.markup={comment:{pattern://,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern://i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},Prism.languages.markup.tag.inside["attr-value"].inside.entity=Prism.languages.markup.entity,Prism.languages.markup.doctype.inside["internal-subset"].inside=Prism.languages.markup,Prism.hooks.add("wrap",function(a){"entity"===a.type&&(a.attributes.title=a.content.replace(/&/,"&"))}),Object.defineProperty(Prism.languages.markup.tag,"addInlined",{value:function(a,e){var s={};s["language-"+e]={pattern:/(^$)/i,lookbehind:!0,inside:Prism.languages[e]},s.cdata=/^$/i;var t={"included-cdata":{pattern://i,inside:s}};t["language-"+e]={pattern:/[\s\S]+/,inside:Prism.languages[e]};var n={};n[a]={pattern:RegExp("(<__[^>]*>)(?:))*\\]\\]>|(?!)".replace(/__/g,function(){return a}),"i"),lookbehind:!0,greedy:!0,inside:t},Prism.languages.insertBefore("markup","cdata",n)}}),Object.defineProperty(Prism.languages.markup.tag,"addAttribute",{value:function(a,e){Prism.languages.markup.tag.inside["special-attr"].push({pattern:RegExp("(^|[\"'\\s])(?:"+a+")\\s*=\\s*(?:\"[^\"]*\"|'[^']*'|[^\\s'\">=]+(?=[\\s>]))","i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[e,"language-"+e],inside:Prism.languages[e]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),Prism.languages.html=Prism.languages.markup,Prism.languages.mathml=Prism.languages.markup,Prism.languages.svg=Prism.languages.markup,Prism.languages.xml=Prism.languages.extend("markup",{}),Prism.languages.ssml=Prism.languages.xml,Prism.languages.atom=Prism.languages.xml,Prism.languages.rss=Prism.languages.xml; \ No newline at end of file diff --git a/prism.js b/prism.js index 05d9a99d0b..6a72563cec 100644 --- a/prism.js +++ b/prism.js @@ -1231,8 +1231,14 @@ if (typeof global !== 'undefined') { ********************************************** */ Prism.languages.markup = { - 'comment': //, - 'prolog': /<\?[\s\S]+?\?>/, + 'comment': { + pattern: //, + greedy: true + }, + 'prolog': { + pattern: /<\?[\s\S]+?\?>/, + greedy: true + }, 'doctype': { // https://www.w3.org/TR/xml/#NT-doctypedecl pattern: /"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|)*\]\s*)?>/i, @@ -1249,11 +1255,14 @@ Prism.languages.markup = { greedy: true }, 'punctuation': /^$|[[\]]/, - 'doctype-tag': /^DOCTYPE/, + 'doctype-tag': /^DOCTYPE/i, 'name': /[^\s<>'"]+/ } }, - 'cdata': //i, + 'cdata': { + pattern: //i, + greedy: true + }, 'tag': { pattern: /<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/, greedy: true, From ffb2043909d7e40a41fab0077444ab80d2517b89 Mon Sep 17 00:00:00 2001 From: Wei Ting <59229084+hoonweiting@users.noreply.github.com> Date: Thu, 16 Sep 2021 02:11:57 +0800 Subject: [PATCH 0900/1100] Twilight theme: Increase selector specificities of plugin overrides (#3081) --- themes/prism-twilight.css | 36 +++--------------------------------- 1 file changed, 3 insertions(+), 33 deletions(-) diff --git a/themes/prism-twilight.css b/themes/prism-twilight.css index 941d6d7f4d..63cc4c6b86 100644 --- a/themes/prism-twilight.css +++ b/themes/prism-twilight.css @@ -140,11 +140,6 @@ code[class*="language-"]::selection, code[class*="language-"] ::selection { cursor: help; } -pre[data-line] { - padding: 1em 0 1em 3em; - position: relative; -} - /* Markup */ .language-markup .token.tag, .language-markup .token.attr-name, @@ -158,42 +153,17 @@ pre[data-line] { z-index: 1; } -.line-highlight { +.line-highlight.line-highlight { background: hsla(0, 0%, 33%, 0.25); /* #545454 */ background: linear-gradient(to right, hsla(0, 0%, 33%, .1) 70%, hsla(0, 0%, 33%, 0)); /* #545454 */ border-bottom: 1px dashed hsl(0, 0%, 33%); /* #545454 */ border-top: 1px dashed hsl(0, 0%, 33%); /* #545454 */ - left: 0; - line-height: inherit; margin-top: 0.75em; /* Same as .prism’s padding-top */ - padding: inherit 0; - pointer-events: none; - position: absolute; - right: 0; - white-space: pre; z-index: 0; } -.line-highlight:before, -.line-highlight[data-end]:after { +.line-highlight.line-highlight:before, +.line-highlight.line-highlight[data-end]:after { background-color: hsl(215, 15%, 59%); /* #8794A6 */ - border-radius: 999px; - box-shadow: 0 1px white; color: hsl(24, 20%, 95%); /* #F5F2F0 */ - content: attr(data-start); - font: bold 65%/1.5 sans-serif; - left: .6em; - min-width: 1em; - padding: 0 .5em; - position: absolute; - text-align: center; - text-shadow: none; - top: .4em; - vertical-align: .3em; -} - -.line-highlight[data-end]:after { - bottom: .4em; - content: attr(data-end); - top: auto; } From 746a4b1adff68045307e768f47a5a430b85f03d7 Mon Sep 17 00:00:00 2001 From: Zach Date: Wed, 15 Sep 2021 12:34:31 -0700 Subject: [PATCH 0901/1100] Added AviSynth language definition (#3071) --- components.js | 2 +- components.json | 5 + components/prism-avisynth.js | 188 ++++++++ components/prism-avisynth.min.js | 1 + examples/prism-avisynth.html | 24 + plugins/autoloader/prism-autoloader.js | 1 + plugins/autoloader/prism-autoloader.min.js | 2 +- plugins/show-language/prism-show-language.js | 2 + .../show-language/prism-show-language.min.js | 2 +- .../avisynth/clipproperties_feature.test | 117 +++++ .../comments_strings_predefines_feature.test | 131 ++++++ .../avisynth/intenalfuncs_feature.test | 391 ++++++++++++++++ .../avisynth/internalfilters_feature.test | 429 ++++++++++++++++++ ...keywords_constants_bools_last_feature.test | 78 ++++ .../operators_numbers_punctuation.test | 88 ++++ .../avisynth/types_arguments_feature.test | 119 +++++ .../avisynth/userfunctions_feature.test | 53 +++ 17 files changed, 1630 insertions(+), 3 deletions(-) create mode 100644 components/prism-avisynth.js create mode 100644 components/prism-avisynth.min.js create mode 100644 examples/prism-avisynth.html create mode 100644 tests/languages/avisynth/clipproperties_feature.test create mode 100644 tests/languages/avisynth/comments_strings_predefines_feature.test create mode 100644 tests/languages/avisynth/intenalfuncs_feature.test create mode 100644 tests/languages/avisynth/internalfilters_feature.test create mode 100644 tests/languages/avisynth/keywords_constants_bools_last_feature.test create mode 100644 tests/languages/avisynth/operators_numbers_punctuation.test create mode 100644 tests/languages/avisynth/types_arguments_feature.test create mode 100644 tests/languages/avisynth/userfunctions_feature.test diff --git a/components.js b/components.js index d221041e58..b9e4eb1873 100644 --- a/components.js +++ b/components.js @@ -1,2 +1,2 @@ -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml","ssml","atom","rss"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","ssml":"SSML","atom":"Atom","rss":"RSS"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","optional":"regex","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"ABNF","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"agda":{"title":"Agda","owner":"xy-ren"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apex":{"title":"Apex","require":["clike","sql"],"owner":"RunDevelopment"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"dkern"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"avro-idl":{"title":"Avro IDL","alias":"avdl","owner":"RunDevelopment"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"bicep":{"title":"Bicep","owner":"johnnyreilly"},"birb":{"title":"Birb","require":"clike","owner":"Calamity210"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"BNF","alias":"rbnf","aliasTitles":{"rbnf":"RBNF"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"bsl":{"title":"BSL (1C:Enterprise)","alias":"oscript","aliasTitles":{"oscript":"OneScript"},"owner":"Diversus23"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cfscript":{"title":"CFScript","require":"clike","alias":"cfc","owner":"mjclemente"},"chaiscript":{"title":"ChaiScript","require":["clike","cpp"],"owner":"RunDevelopment"},"cil":{"title":"CIL","owner":"sbrl"},"clojure":{"title":"Clojure","owner":"troglotit"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"cobol":{"title":"COBOL","owner":"RunDevelopment"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"coq":{"title":"Coq","owner":"RunDevelopment"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"csv":{"title":"CSV","owner":"RunDevelopment"},"cypher":{"title":"Cypher","owner":"RunDevelopment"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dataweave":{"title":"DataWeave","owner":"machaval"},"dax":{"title":"DAX","owner":"peterbud"},"dhall":{"title":"Dhall","owner":"RunDevelopment"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"dot":{"title":"DOT (Graphviz)","alias":"gv","optional":"markup","owner":"RunDevelopment"},"ebnf":{"title":"EBNF","owner":"RunDevelopment"},"editorconfig":{"title":"EditorConfig","owner":"osipxd"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"false":{"title":"False","owner":"edukisto"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"gap":{"title":"GAP (CAS)","owner":"RunDevelopment"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"c","owner":"Golmote"},"gn":{"title":"GN","alias":"gni","owner":"RunDevelopment"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","optional":"markdown","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","alias":"hbs","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"hlsl":{"title":"HLSL","require":"c","owner":"RunDevelopment"},"hoon":{"title":"Hoon","owner":"matildepark"},"http":{"title":"HTTP","optional":["css","javascript","json","markup","uri"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"icu-message-format":{"title":"ICU Message Format","owner":"RunDevelopment"},"idris":{"title":"Idris","alias":"idr","owner":"KeenS","require":"haskell"},"ignore":{"title":".ignore","owner":"osipxd","alias":["gitignore","hgignore","npmignore"],"aliasTitles":{"gitignore":".gitignore","hgignore":".hgignore","npmignore":".npmignore"}},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jexl":{"title":"Jexl","owner":"czosel"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike","typescript"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","alias":"webmanifest","aliasTitles":{"webmanifest":"Web App Manifest"},"owner":"CupOfTea696"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"jsstacktrace":{"title":"JS stack trace","owner":"sbrl"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup","sql"],"owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","alias":["kt","kts"],"aliasTitles":{"kts":"Kotlin Script"},"require":"clike","owner":"Golmote"},"kumir":{"title":"KuMir (КуМир)","alias":"kum","owner":"edukisto"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","require":"markup-templating","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"log":{"title":"Log file","optional":"javastacktrace","owner":"RunDevelopment"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"magma":{"title":"Magma (CAS)","owner":"RunDevelopment"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","optional":"yaml","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mermaid":{"title":"Mermaid","owner":"RunDevelopment"},"mizar":{"title":"Mizar","owner":"Golmote"},"mongodb":{"title":"MongoDB","owner":"airs0urce","require":"javascript"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"naniscript":{"title":"Naninovel Script","owner":"Elringus","alias":"nani"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nevod":{"title":"Nevod","owner":"nezaboodka"},"nginx":{"title":"nginx","owner":"volado"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"openqasm":{"title":"OpenQasm","alias":"qasm","owner":"RunDevelopment"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"psl":{"title":"PATROL Scripting Language","owner":"bertysentry"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":"markup-templating","owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"promql":{"title":"PromQL","owner":"arendjr"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"purebasic":{"title":"PureBasic","require":"clike","alias":"pbfasm","owner":"HeX0R101"},"purescript":{"title":"PureScript","require":"haskell","alias":"purs","owner":"sriharshachilakapati"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"qsharp":{"title":"Q#","require":"clike","alias":"qs","owner":"fedonman"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"racket":{"title":"Racket","require":"scheme","alias":"rkt","owner":"RunDevelopment"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","owner":"RunDevelopment"},"rego":{"title":"Rego","owner":"JordanSh"},"renpy":{"title":"Ren'py","alias":"rpy","owner":"HyuchiaDiego"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","optional":"css-extras","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","alias":["sh-session","shellsession"],"owner":"RunDevelopment"},"smali":{"title":"Smali","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sml":{"title":"SML","alias":"smlnj","aliasTitles":{"smlnj":"SML/NJ"},"owner":"RunDevelopment"},"solidity":{"title":"Solidity (Ethereum)","alias":"sol","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"squirrel":{"title":"Squirrel","require":"clike","owner":"RunDevelopment"},"stan":{"title":"Stan","owner":"RunDevelopment"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","owner":"chrischares"},"systemd":{"title":"Systemd configuration file","owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","vbnet"],"owner":"RunDevelopment"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"typoscript":{"title":"TypoScript","alias":"tsconfig","aliasTitles":{"tsconfig":"TSConfig"},"owner":"dkern"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"uri":{"title":"URI","alias":"url","aliasTitles":{"url":"URL"},"owner":"RunDevelopment"},"v":{"title":"V","require":"clike","owner":"taggon"},"vala":{"title":"Vala","require":"clike","optional":"regex","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":["vb","vba"],"aliasTitles":{"vba":"VBA"},"owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"wolfram":{"title":"Wolfram language","alias":["mathematica","nb","wl"],"aliasTitles":{"mathematica":"Mathematica","nb":"Mathematica Notebook"},"owner":"msollami"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xml-doc":{"title":"XML doc (.net)","require":"markup","modify":["csharp","fsharp","vbnet"],"owner":"RunDevelopment"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"yang":{"title":"YANG","owner":"RunDevelopment"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword for fine-grained highlighting.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml","ssml","atom","rss"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","ssml":"SSML","atom":"Atom","rss":"RSS"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","optional":"regex","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"ABNF","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"agda":{"title":"Agda","owner":"xy-ren"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apex":{"title":"Apex","require":["clike","sql"],"owner":"RunDevelopment"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"dkern"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"avisynth":{"title":"AviSynth","alias":"avs","owner":"Zinfidel"},"avro-idl":{"title":"Avro IDL","alias":"avdl","owner":"RunDevelopment"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"bicep":{"title":"Bicep","owner":"johnnyreilly"},"birb":{"title":"Birb","require":"clike","owner":"Calamity210"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"BNF","alias":"rbnf","aliasTitles":{"rbnf":"RBNF"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"bsl":{"title":"BSL (1C:Enterprise)","alias":"oscript","aliasTitles":{"oscript":"OneScript"},"owner":"Diversus23"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cfscript":{"title":"CFScript","require":"clike","alias":"cfc","owner":"mjclemente"},"chaiscript":{"title":"ChaiScript","require":["clike","cpp"],"owner":"RunDevelopment"},"cil":{"title":"CIL","owner":"sbrl"},"clojure":{"title":"Clojure","owner":"troglotit"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"cobol":{"title":"COBOL","owner":"RunDevelopment"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"coq":{"title":"Coq","owner":"RunDevelopment"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"csv":{"title":"CSV","owner":"RunDevelopment"},"cypher":{"title":"Cypher","owner":"RunDevelopment"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dataweave":{"title":"DataWeave","owner":"machaval"},"dax":{"title":"DAX","owner":"peterbud"},"dhall":{"title":"Dhall","owner":"RunDevelopment"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"dot":{"title":"DOT (Graphviz)","alias":"gv","optional":"markup","owner":"RunDevelopment"},"ebnf":{"title":"EBNF","owner":"RunDevelopment"},"editorconfig":{"title":"EditorConfig","owner":"osipxd"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"false":{"title":"False","owner":"edukisto"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"gap":{"title":"GAP (CAS)","owner":"RunDevelopment"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"c","owner":"Golmote"},"gn":{"title":"GN","alias":"gni","owner":"RunDevelopment"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","optional":"markdown","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","alias":"hbs","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"hlsl":{"title":"HLSL","require":"c","owner":"RunDevelopment"},"hoon":{"title":"Hoon","owner":"matildepark"},"http":{"title":"HTTP","optional":["css","javascript","json","markup","uri"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"icu-message-format":{"title":"ICU Message Format","owner":"RunDevelopment"},"idris":{"title":"Idris","alias":"idr","owner":"KeenS","require":"haskell"},"ignore":{"title":".ignore","owner":"osipxd","alias":["gitignore","hgignore","npmignore"],"aliasTitles":{"gitignore":".gitignore","hgignore":".hgignore","npmignore":".npmignore"}},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jexl":{"title":"Jexl","owner":"czosel"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike","typescript"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","alias":"webmanifest","aliasTitles":{"webmanifest":"Web App Manifest"},"owner":"CupOfTea696"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"jsstacktrace":{"title":"JS stack trace","owner":"sbrl"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup","sql"],"owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","alias":["kt","kts"],"aliasTitles":{"kts":"Kotlin Script"},"require":"clike","owner":"Golmote"},"kumir":{"title":"KuMir (КуМир)","alias":"kum","owner":"edukisto"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","require":"markup-templating","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"log":{"title":"Log file","optional":"javastacktrace","owner":"RunDevelopment"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"magma":{"title":"Magma (CAS)","owner":"RunDevelopment"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","optional":"yaml","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mermaid":{"title":"Mermaid","owner":"RunDevelopment"},"mizar":{"title":"Mizar","owner":"Golmote"},"mongodb":{"title":"MongoDB","owner":"airs0urce","require":"javascript"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"naniscript":{"title":"Naninovel Script","owner":"Elringus","alias":"nani"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nevod":{"title":"Nevod","owner":"nezaboodka"},"nginx":{"title":"nginx","owner":"volado"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"openqasm":{"title":"OpenQasm","alias":"qasm","owner":"RunDevelopment"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"psl":{"title":"PATROL Scripting Language","owner":"bertysentry"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":"markup-templating","owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"promql":{"title":"PromQL","owner":"arendjr"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"purebasic":{"title":"PureBasic","require":"clike","alias":"pbfasm","owner":"HeX0R101"},"purescript":{"title":"PureScript","require":"haskell","alias":"purs","owner":"sriharshachilakapati"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"qsharp":{"title":"Q#","require":"clike","alias":"qs","owner":"fedonman"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"racket":{"title":"Racket","require":"scheme","alias":"rkt","owner":"RunDevelopment"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","owner":"RunDevelopment"},"rego":{"title":"Rego","owner":"JordanSh"},"renpy":{"title":"Ren'py","alias":"rpy","owner":"HyuchiaDiego"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","optional":"css-extras","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","alias":["sh-session","shellsession"],"owner":"RunDevelopment"},"smali":{"title":"Smali","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sml":{"title":"SML","alias":"smlnj","aliasTitles":{"smlnj":"SML/NJ"},"owner":"RunDevelopment"},"solidity":{"title":"Solidity (Ethereum)","alias":"sol","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"squirrel":{"title":"Squirrel","require":"clike","owner":"RunDevelopment"},"stan":{"title":"Stan","owner":"RunDevelopment"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","owner":"chrischares"},"systemd":{"title":"Systemd configuration file","owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","vbnet"],"owner":"RunDevelopment"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"typoscript":{"title":"TypoScript","alias":"tsconfig","aliasTitles":{"tsconfig":"TSConfig"},"owner":"dkern"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"uri":{"title":"URI","alias":"url","aliasTitles":{"url":"URL"},"owner":"RunDevelopment"},"v":{"title":"V","require":"clike","owner":"taggon"},"vala":{"title":"Vala","require":"clike","optional":"regex","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":["vb","vba"],"aliasTitles":{"vba":"VBA"},"owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"wolfram":{"title":"Wolfram language","alias":["mathematica","nb","wl"],"aliasTitles":{"mathematica":"Mathematica","nb":"Mathematica Notebook"},"owner":"msollami"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xml-doc":{"title":"XML doc (.net)","require":"markup","modify":["csharp","fsharp","vbnet"],"owner":"RunDevelopment"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"yang":{"title":"YANG","owner":"RunDevelopment"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword for fine-grained highlighting.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; if (typeof module !== 'undefined' && module.exports) { module.exports = components; } \ No newline at end of file diff --git a/components.json b/components.json index b1fcc12f7d..b602f58a4f 100644 --- a/components.json +++ b/components.json @@ -160,6 +160,11 @@ "title": "AutoIt", "owner": "Golmote" }, + "avisynth": { + "title": "AviSynth", + "alias": "avs", + "owner": "Zinfidel" + }, "avro-idl": { "title":"Avro IDL", "alias": "avdl", diff --git a/components/prism-avisynth.js b/components/prism-avisynth.js new file mode 100644 index 0000000000..09332f1c6b --- /dev/null +++ b/components/prism-avisynth.js @@ -0,0 +1,188 @@ +// http://avisynth.nl/index.php/The_full_AviSynth_grammar +(function (Prism) { + + function replace(pattern, replacements) { + return pattern.replace(/<<(\d+)>>/g, function (m, index) { + return replacements[+index]; + }); + } + + function re(pattern, replacements, flags) { + return RegExp(replace(pattern, replacements), flags || ''); + } + + var types = /clip|int|float|string|bool|val/.source; + var internals = [ + // bools + /is(?:bool|clip|float|int|string)|defined|(?:var|(?:internal)?function)?exists?/.source, + // control + /apply|assert|default|eval|import|select|nop|undefined/.source, + // global + /set(?:memorymax|cachemode|maxcpu|workingdir|planarlegacyalignment)|opt_(?:allowfloataudio|usewaveextensible|dwchannelmask|avipadscanlines|vdubplanarhack|enable_(?:v210|y3_10_10|y3_10_16|b64a|planartopackedrgb))/.source, + // conv + /hex(?:value)?|value/.source, + // numeric + /max|min|muldiv|floor|ceil|round|fmod|pi|exp|log(?:10)?|pow|sqrt|abs|sign|frac|rand|spline|continued(?:numerator|denominator)?/.source, + // trig + /a?sinh?|a?cosh?|a?tan[2h]?/.source, + // bit + /(?:bit(?:and|not|x?or|[lr]?shift[aslu]?|sh[lr]|sa[lr]|[lr]rotatel?|ro[rl]|te?st|set(?:count)?|cl(?:ea)?r|ch(?:an)?ge?))/.source, + // runtime + /average(?:luma|chroma[uv]|[bgr])|(?:luma|chroma[uv]|rgb|[rgb]|[yuv](?=difference(?:fromprevious|tonext)))difference(?:fromprevious|tonext)?|[yuvrgb]plane(?:median|min|max|minmaxdifference)/.source, + // script + /script(?:name(?:utf8)?|file(?:utf8)?|dir(?:utf8)?)|setlogparams|logmsg|getprocessinfo/.source, + // string + /[lu]case|str(?:toutf8|fromutf8|len|cmpi?)|(?:rev|left|right|mid|find|replace|fill)str|format|trim(?:left|right|all)|chr|ord|time/.source, + // version + /version(?:number|string)|isversionorgreater/.source, + // helper + /buildpixeltype|colorspacenametopixeltype/.source, + // avsplus + /setfiltermtmode|prefetch|addautoloaddir|on(?:cpu|cuda)/.source + ].join('|'); + var properties = [ + // content + /has(?:audio|video)/.source, + // resolution + /width|height/.source, + // framerate + /frame(?:count|rate)|framerate(?:numerator|denominator)/.source, + // interlacing + /is(?:field|frame)based|getparity/.source, + // color format + /pixeltype|is(?:planar(?:rgba?)?|interleaved|rgb(?:24|32|48|64)?|y(?:8|u(?:y2|va?))?|yv(?:12|16|24|411)|420|422|444|packedrgb)|hasalpha|componentsize|numcomponents|bitspercomponent/.source, + // audio + /audio(?:rate|duration|length(?:[fs]|lo|hi)?|channels|bits)|isaudio(?:float|int)/.source + ].join('|'); + var filters = [ + // source + /avi(?:file)?source|opendmlsource|directshowsource|image(?:reader|source|sourceanim)|segmented(?:avisource|directshowsource)|wavsource/.source, + // color + /coloryuv|convertto(?:RGB(?:24|32|48|64)|(?:planar)?RGBA?|Y8?|YV(?:12|16|24|411)|YUVA?(?:444|422|420|411)|YUY2)|convertbacktoyuy2|fixluminance|gr[ae]yscale|invert|levels|limiter|mergea?rgb|merge(?:luma|chroma)|rgbadjust|show(?:red|green|blue|alpha)|swapuv|tweak|[uv]toy8?|ytouv/.source, + // overlay + /(?:colorkey|reset)mask|mask(?:hs)?|layer|merge|overlay|subtract/.source, + // geometry + /addborders|crop(?:bottom)?|flip(?:horizontal|vertical)|letterbox|(?:horizontal|vertical)?reduceby2|(?:bicubic|bilinear|blackman|gauss|lanczos|lanczos4|point|sinc|spline(?:16|36|64))resize|skewrows|turn(?:left|right|180)/.source, + // pixel + /blur|sharpen|generalconvolution|(?:spatial|temporal)soften|fixbrokenchromaupsampling/.source, + // timeline + /trim|(?:un)?alignedsplice|(?:assume|assumescaled|change|convert)FPS|(?:delete|duplicate)frame|dissolve|fade(?:in|out|io)[02]?|freezeframe|interleave|loop|reverse|select(?:even|odd|(?:range)?every)/.source, + // interlace + /assume(?:frame|field)based|assume[bt]ff|bob|complementparity|doubleweave|peculiarblend|pulldown|separate(?:columns|rows|fields)|swapfields|weave(?:columns|rows)?/.source, + // audio + /amplify(?:db)?|assumesamplerate|audiodub(?:ex)?|audiotrim|convertaudioto(?:(?:8|16|24|32)bit|float)|converttomono|delayaudio|ensurevbrmp3sync|get(?:left|right)?channel|kill(?:audio|video)|mergechannels|mixaudio|monotostereo|normalize|resampleaudio|supereq|ssrc|timestretch/.source, + // conditional + /conditional(?:filter|select|reader)|frameevaluate|scriptclip|writefile(?:if|start|end)?|animate|applyrange|tcp(?:server|source)/.source, + // export + /imagewriter/.source, + // debug + /subtitle|blankclip|blackness|colorbars(?:hd)?|compare|dumpfiltergraph|setgraphanalysis|echo|histogram|info|messageclip|preroll|showfiveversions|show(?:framenumber|smpte|time)|stack(?:horizontal|vertical)|tone|version/.source + ].join('|'); + var allinternals = [internals, properties, filters].join('|'); + + Prism.languages.avisynth = { + 'comment': [ + { + // Matches [* *] nestable block comments, but only supports 1 level of nested comments + // /\[\*(?:[^\[*]|\[(?!\*)|\*(?!\])|)*\*\]/ + pattern: /(^|[^\\])\[\*(?:[^\[*]|\[(?!\*)|\*(?!\])|\[\*(?:[^\[*]|\[(?!\*)|\*(?!\]))*\*\])*\*\]/, + lookbehind: true, + greedy: true + }, + { + // Matches /* */ block comments + pattern: /(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/, + lookbehind: true, + greedy: true + }, + { + // Matches # comments + pattern: /(^|[^\\$])#.*/, + lookbehind: true, + greedy: true + } + ], + + // Handle before strings because optional arguments are surrounded by double quotes + 'argument': { + pattern: re(/\b(?:<<0>>)\s+("?)\w+\1/.source, [types], 'i'), + inside: { + 'keyword': /^\w+/ + } + }, + + // Optional argument assignment + 'argument-label': { + pattern: /([,(][\s\\]*)\w+\s*=(?!=)/, + lookbehind: true, + inside: { + 'argument-name': { + pattern: /^\w+/, + alias: 'punctuation' + }, + 'punctuation': /=$/ + } + }, + + 'string': [ + { + // triple double-quoted + pattern: /"""[\s\S]*?"""/, + greedy: true, + }, + { + // single double-quoted + pattern: /"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/, + greedy: true, + inside: { + 'constant': { + // These *are* case-sensitive! + pattern: /\b(?:DEFAULT_MT_MODE|(?:SCRIPT|MAINSCRIPT|PROGRAM)DIR|(?:USER|MACHINE)_(?:PLUS|CLASSIC)_PLUGINS)\b/ + } + } + } + ], + + // The special "last" variable that takes the value of the last implicitly returned clip + 'variable': /\b(?:last)\b/i, + + 'boolean': /\b(?:true|false|yes|no)\b/i, + + 'keyword': /\b(?:function|global|return|try|catch|if|else|while|for|__END__)\b/i, + + 'constant': /\bMT_(?:NICE_FILTER|MULTI_INSTANCE|SERIALIZED|SPECIAL_MT)\b/, + + // AviSynth's internal functions, filters, and properties + 'builtin-function': { + pattern: re(/\b(?:<<0>>)\b/.source, [allinternals], 'i'), + alias: 'function' + }, + + 'type-cast': { + pattern: re(/\b(?:<<0>>)(?=\s*\()/.source, [types], 'i'), + alias: 'keyword' + }, + + // External/user-defined filters + 'function': { + pattern: /\b[a-z_]\w*(?=\s*\()|(\.)[a-z_]\w*\b/i, + lookbehind: true + }, + + // Matches a \ as the first or last character on a line + 'line-continuation': { + pattern: /(^[ \t]*)\\|\\(?=[ \t]*$)/m, + lookbehind: true, + alias: 'punctuation' + }, + + 'number': /\B\$(?:[\da-f]{6}|[\da-f]{8})\b|(?:(?:\b|\B-)\d+(?:\.\d*)?\b|\B\.\d+\b)/i, + + 'operator': /\+\+?|[!=<>]=?|&&|\|\||[?:*/%-]/, + + 'punctuation': /[{}\[\]();,.]/ + }; + + Prism.languages.avs = Prism.languages.avisynth; + +}(Prism)); diff --git a/components/prism-avisynth.min.js b/components/prism-avisynth.min.js new file mode 100644 index 0000000000..4fa150c833 --- /dev/null +++ b/components/prism-avisynth.min.js @@ -0,0 +1 @@ +!function(e){function a(e,a,r){return RegExp(function(e,r){return e.replace(/<<(\d+)>>/g,function(e,a){return r[+a]})}(e,a),r||"")}var r="clip|int|float|string|bool|val",t=[["is(?:bool|clip|float|int|string)|defined|(?:var|(?:internal)?function)?exists?","apply|assert|default|eval|import|select|nop|undefined","set(?:memorymax|cachemode|maxcpu|workingdir|planarlegacyalignment)|opt_(?:allowfloataudio|usewaveextensible|dwchannelmask|avipadscanlines|vdubplanarhack|enable_(?:v210|y3_10_10|y3_10_16|b64a|planartopackedrgb))","hex(?:value)?|value","max|min|muldiv|floor|ceil|round|fmod|pi|exp|log(?:10)?|pow|sqrt|abs|sign|frac|rand|spline|continued(?:numerator|denominator)?","a?sinh?|a?cosh?|a?tan[2h]?","(?:bit(?:and|not|x?or|[lr]?shift[aslu]?|sh[lr]|sa[lr]|[lr]rotatel?|ro[rl]|te?st|set(?:count)?|cl(?:ea)?r|ch(?:an)?ge?))","average(?:luma|chroma[uv]|[bgr])|(?:luma|chroma[uv]|rgb|[rgb]|[yuv](?=difference(?:fromprevious|tonext)))difference(?:fromprevious|tonext)?|[yuvrgb]plane(?:median|min|max|minmaxdifference)","script(?:name(?:utf8)?|file(?:utf8)?|dir(?:utf8)?)|setlogparams|logmsg|getprocessinfo","[lu]case|str(?:toutf8|fromutf8|len|cmpi?)|(?:rev|left|right|mid|find|replace|fill)str|format|trim(?:left|right|all)|chr|ord|time","version(?:number|string)|isversionorgreater","buildpixeltype|colorspacenametopixeltype","setfiltermtmode|prefetch|addautoloaddir|on(?:cpu|cuda)"].join("|"),["has(?:audio|video)","width|height","frame(?:count|rate)|framerate(?:numerator|denominator)","is(?:field|frame)based|getparity","pixeltype|is(?:planar(?:rgba?)?|interleaved|rgb(?:24|32|48|64)?|y(?:8|u(?:y2|va?))?|yv(?:12|16|24|411)|420|422|444|packedrgb)|hasalpha|componentsize|numcomponents|bitspercomponent","audio(?:rate|duration|length(?:[fs]|lo|hi)?|channels|bits)|isaudio(?:float|int)"].join("|"),["avi(?:file)?source|opendmlsource|directshowsource|image(?:reader|source|sourceanim)|segmented(?:avisource|directshowsource)|wavsource","coloryuv|convertto(?:RGB(?:24|32|48|64)|(?:planar)?RGBA?|Y8?|YV(?:12|16|24|411)|YUVA?(?:444|422|420|411)|YUY2)|convertbacktoyuy2|fixluminance|gr[ae]yscale|invert|levels|limiter|mergea?rgb|merge(?:luma|chroma)|rgbadjust|show(?:red|green|blue|alpha)|swapuv|tweak|[uv]toy8?|ytouv","(?:colorkey|reset)mask|mask(?:hs)?|layer|merge|overlay|subtract","addborders|crop(?:bottom)?|flip(?:horizontal|vertical)|letterbox|(?:horizontal|vertical)?reduceby2|(?:bicubic|bilinear|blackman|gauss|lanczos|lanczos4|point|sinc|spline(?:16|36|64))resize|skewrows|turn(?:left|right|180)","blur|sharpen|generalconvolution|(?:spatial|temporal)soften|fixbrokenchromaupsampling","trim|(?:un)?alignedsplice|(?:assume|assumescaled|change|convert)FPS|(?:delete|duplicate)frame|dissolve|fade(?:in|out|io)[02]?|freezeframe|interleave|loop|reverse|select(?:even|odd|(?:range)?every)","assume(?:frame|field)based|assume[bt]ff|bob|complementparity|doubleweave|peculiarblend|pulldown|separate(?:columns|rows|fields)|swapfields|weave(?:columns|rows)?","amplify(?:db)?|assumesamplerate|audiodub(?:ex)?|audiotrim|convertaudioto(?:(?:8|16|24|32)bit|float)|converttomono|delayaudio|ensurevbrmp3sync|get(?:left|right)?channel|kill(?:audio|video)|mergechannels|mixaudio|monotostereo|normalize|resampleaudio|supereq|ssrc|timestretch","conditional(?:filter|select|reader)|frameevaluate|scriptclip|writefile(?:if|start|end)?|animate|applyrange|tcp(?:server|source)","imagewriter","subtitle|blankclip|blackness|colorbars(?:hd)?|compare|dumpfiltergraph|setgraphanalysis|echo|histogram|info|messageclip|preroll|showfiveversions|show(?:framenumber|smpte|time)|stack(?:horizontal|vertical)|tone|version"].join("|")].join("|");e.languages.avisynth={comment:[{pattern:/(^|[^\\])\[\*(?:[^\[*]|\[(?!\*)|\*(?!\])|\[\*(?:[^\[*]|\[(?!\*)|\*(?!\]))*\*\])*\*\]/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\$])#.*/,lookbehind:!0,greedy:!0}],argument:{pattern:a('\\b(?:<<0>>)\\s+("?)\\w+\\1',[r],"i"),inside:{keyword:/^\w+/}},"argument-label":{pattern:/([,(][\s\\]*)\w+\s*=(?!=)/,lookbehind:!0,inside:{"argument-name":{pattern:/^\w+/,alias:"punctuation"},punctuation:/=$/}},string:[{pattern:/"""[\s\S]*?"""/,greedy:!0},{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0,inside:{constant:{pattern:/\b(?:DEFAULT_MT_MODE|(?:SCRIPT|MAINSCRIPT|PROGRAM)DIR|(?:USER|MACHINE)_(?:PLUS|CLASSIC)_PLUGINS)\b/}}}],variable:/\b(?:last)\b/i,boolean:/\b(?:true|false|yes|no)\b/i,keyword:/\b(?:function|global|return|try|catch|if|else|while|for|__END__)\b/i,constant:/\bMT_(?:NICE_FILTER|MULTI_INSTANCE|SERIALIZED|SPECIAL_MT)\b/,"builtin-function":{pattern:a("\\b(?:<<0>>)\\b",[t],"i"),alias:"function"},"type-cast":{pattern:a("\\b(?:<<0>>)(?=\\s*\\()",[r],"i"),alias:"keyword"},function:{pattern:/\b[a-z_]\w*(?=\s*\()|(\.)[a-z_]\w*\b/i,lookbehind:!0},"line-continuation":{pattern:/(^[ \t]*)\\|\\(?=[ \t]*$)/m,lookbehind:!0,alias:"punctuation"},number:/\B\$(?:[\da-f]{6}|[\da-f]{8})\b|(?:(?:\b|\B-)\d+(?:\.\d*)?\b|\B\.\d+\b)/i,operator:/\+\+?|[!=<>]=?|&&|\|\||[?:*/%-]/,punctuation:/[{}\[\]();,.]/},e.languages.avs=e.languages.avisynth}(Prism); \ No newline at end of file diff --git a/examples/prism-avisynth.html b/examples/prism-avisynth.html new file mode 100644 index 0000000000..e78fecd9e9 --- /dev/null +++ b/examples/prism-avisynth.html @@ -0,0 +1,24 @@ +

            Full Example

            +
            /*
            + * Example AviSynth script for PrismJS demonstration.
            + * By Zinfidel
            + */
            +
            +SetFilterMTMode("DEFAULT_MT_MODE", MT_MULTI_INSTANCE)
            +AddAutoloadDir("MAINSCRIPTDIR/programs/plugins")
            +
            +# Multiplies clip size and changes aspect ratio to 4:3
            +function CorrectAspectRatio(clip c, int scaleFactor, bool "useNearestNeighbor") {
            +    useNearestNeighbor = default(useNearestNeighbor, false)
            +    stretchFactor = (c.Height * (4 / 3)) / c.Width
            +
            +    return useNearestNeighbor \
            +        ? c.PointResize(c.Width * scaleFactor * stretchFactor, c.Height * scaleFactor) \
            +        : c.Lanczos4Resize(c.Width * scaleFactor * stretchFactor, c.Height * scaleFactor)
            +}
            +
            +AviSource("myclip.avi")
            +last.CorrectAspectRatio(3, yes)
            +
            +
            +Prefetch(4)
            \ No newline at end of file diff --git a/plugins/autoloader/prism-autoloader.js b/plugins/autoloader/prism-autoloader.js index ddefe74218..fe1b3b0b04 100644 --- a/plugins/autoloader/prism-autoloader.js +++ b/plugins/autoloader/prism-autoloader.js @@ -172,6 +172,7 @@ "js": "javascript", "g4": "antlr4", "adoc": "asciidoc", + "avs": "avisynth", "avdl": "avro-idl", "shell": "bash", "shortcode": "bbcode", diff --git a/plugins/autoloader/prism-autoloader.min.js b/plugins/autoloader/prism-autoloader.min.js index d5ca7c04dd..29790e15d7 100644 --- a/plugins/autoloader/prism-autoloader.min.js +++ b/plugins/autoloader/prism-autoloader.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof Prism&&"undefined"!=typeof document){var l={javascript:"clike",actionscript:"javascript",apex:["clike","sql"],arduino:"cpp",aspnet:["markup","csharp"],birb:"clike",bison:"c",c:"clike",csharp:"clike",cpp:"c",cfscript:"clike",chaiscript:["clike","cpp"],coffeescript:"javascript",crystal:"ruby","css-extras":"css",d:"clike",dart:"clike",django:"markup-templating",ejs:["javascript","markup-templating"],etlua:["lua","markup-templating"],erb:["ruby","markup-templating"],fsharp:"clike","firestore-security-rules":"clike",flow:"javascript",ftl:"markup-templating",gml:"clike",glsl:"c",go:"clike",groovy:"clike",haml:"ruby",handlebars:"markup-templating",haxe:"clike",hlsl:"c",idris:"haskell",java:"clike",javadoc:["markup","java","javadoclike"],jolie:"clike",jsdoc:["javascript","javadoclike","typescript"],"js-extras":"javascript",json5:"json",jsonp:"json","js-templates":"javascript",kotlin:"clike",latte:["clike","markup-templating","php"],less:"css",lilypond:"scheme",liquid:"markup-templating",markdown:"markup","markup-templating":"markup",mongodb:"javascript",n4js:"javascript",objectivec:"c",opencl:"c",parser:"markup",php:"markup-templating",phpdoc:["php","javadoclike"],"php-extras":"php",plsql:"sql",processing:"clike",protobuf:"clike",pug:["markup","javascript"],purebasic:"clike",purescript:"haskell",qsharp:"clike",qml:"javascript",qore:"clike",racket:"scheme",jsx:["markup","javascript"],tsx:["jsx","typescript"],reason:"clike",ruby:"clike",sass:"css",scss:"css",scala:"java","shell-session":"bash",smarty:"markup-templating",solidity:"clike",soy:"markup-templating",sparql:"turtle",sqf:"clike",squirrel:"clike","t4-cs":["t4-templating","csharp"],"t4-vb":["t4-templating","vbnet"],tap:"yaml",tt2:["clike","markup-templating"],textile:"markup",twig:"markup",typescript:"javascript",v:"clike",vala:"clike",vbnet:"basic",velocity:"markup",wiki:"markup",xeora:"markup","xml-doc":"markup",xquery:"markup"},n={html:"markup",xml:"markup",svg:"markup",mathml:"markup",ssml:"markup",atom:"markup",rss:"markup",js:"javascript",g4:"antlr4",adoc:"asciidoc",avdl:"avro-idl",shell:"bash",shortcode:"bbcode",rbnf:"bnf",oscript:"bsl",cs:"csharp",dotnet:"csharp",cfc:"cfscript",coffee:"coffeescript",conc:"concurnas",jinja2:"django","dns-zone":"dns-zone-file",dockerfile:"docker",gv:"dot",eta:"ejs",xlsx:"excel-formula",xls:"excel-formula",gamemakerlanguage:"gml",gni:"gn",hbs:"handlebars",hs:"haskell",idr:"idris",gitignore:"ignore",hgignore:"ignore",npmignore:"ignore",webmanifest:"json",kt:"kotlin",kts:"kotlin",kum:"kumir",tex:"latex",context:"latex",ly:"lilypond",emacs:"lisp",elisp:"lisp","emacs-lisp":"lisp",md:"markdown",moon:"moonscript",n4jsd:"n4js",nani:"naniscript",objc:"objectivec",qasm:"openqasm",objectpascal:"pascal",px:"pcaxis",pcode:"peoplecode",pq:"powerquery",mscript:"powerquery",pbfasm:"purebasic",purs:"purescript",py:"python",qs:"qsharp",rkt:"racket",rpy:"renpy",robot:"robotframework",rb:"ruby","sh-session":"shell-session",shellsession:"shell-session",smlnj:"sml",sol:"solidity",sln:"solution-file",rq:"sparql",t4:"t4-cs",trig:"turtle",ts:"typescript",tsconfig:"typoscript",uscript:"unrealscript",uc:"unrealscript",url:"uri",vb:"visual-basic",vba:"visual-basic",mathematica:"wolfram",nb:"wolfram",wl:"wolfram",xeoracube:"xeora",yml:"yaml"},p={},e="components/",a=Prism.util.currentScript();if(a){var r=/\bplugins\/autoloader\/prism-autoloader\.(?:min\.)?js(?:\?[^\r\n/]*)?$/i,s=/(^|\/)[\w-]+\.(?:min\.)?js(?:\?[^\r\n/]*)?$/i,i=a.getAttribute("data-autoloader-path");if(null!=i)e=i.trim().replace(/\/?$/,"/");else{var t=a.src;r.test(t)?e=t.replace(r,"components/"):s.test(t)&&(e=t.replace(s,"$1components/"))}}var o=Prism.plugins.autoloader={languages_path:e,use_minified:!0,loadLanguages:m};Prism.hooks.add("complete",function(e){var a=e.element,r=e.language;if(a&&r&&"none"!==r){var s=function(e){var a=(e.getAttribute("data-dependencies")||"").trim();if(!a){var r=e.parentElement;r&&"pre"===r.tagName.toLowerCase()&&(a=(r.getAttribute("data-dependencies")||"").trim())}return a?a.split(/\s*,\s*/g):[]}(a);/^diff-./i.test(r)?(s.push("diff"),s.push(r.substr("diff-".length))):s.push(r),s.every(u)||m(s,function(){Prism.highlightElement(a)})}})}function u(e){if(0<=e.indexOf("!"))return!1;if((e=n[e]||e)in Prism.languages)return!0;var a=p[e];return a&&!a.error&&!1===a.loading}function m(e,a,r){"string"==typeof e&&(e=[e]);var s=e.length,i=0,t=!1;function c(){t||++i===s&&a&&a(e)}0!==s?e.forEach(function(e){!function(a,r,s){var i=0<=a.indexOf("!");function e(){var e=p[a];e||(e=p[a]={callbacks:[]}),e.callbacks.push({success:r,error:s}),!i&&u(a)?k(a,"success"):!i&&e.error?k(a,"error"):!i&&e.loading||(e.loading=!0,e.error=!1,function(e,a,r){var s=document.createElement("script");s.src=e,s.async=!0,s.onload=function(){document.body.removeChild(s),a&&a()},s.onerror=function(){document.body.removeChild(s),r&&r()},document.body.appendChild(s)}(function(e){return o.languages_path+"prism-"+e+(o.use_minified?".min":"")+".js"}(a),function(){e.loading=!1,k(a,"success")},function(){e.loading=!1,e.error=!0,k(a,"error")}))}a=a.replace("!",""),a=n[a]||a;var t=l[a];t&&t.length?m(t,e,s):e()}(e,c,function(){t||(t=!0,r&&r(e))})}):a&&setTimeout(a,0)}function k(e,a){if(p[e]){for(var r=p[e].callbacks,s=0,i=r.length;s +>= += +== +&& +|| +? +: +% +/ +* + +$abcdef +$89abcdef +123.89032 +.902834 + +$9abcdef +a$123456a + +() +{} +[] +; +, +. +\ + +\ 1.0 \ + +1.0 \ 1.0 + +---------------------------------------------------- + +[ + ["operator", "+"], + ["operator", "++"], + ["operator", "-"], + ["operator", "!"], + ["operator", "!="], + ["operator", "<"], + ["operator", "<="], + ["operator", ">"], + ["operator", ">="], + ["operator", "="], + ["operator", "=="], + ["operator", "&&"], + ["operator", "||"], + ["operator", "?"], + ["operator", ":"], + ["operator", "%"], + ["operator", "/"], + ["operator", "*"], + + ["number", "$abcdef"], + ["number", "$89abcdef"], + ["number", "123.89032"], + ["number", ".902834"], + + "\r\n\r\n$9abcdef\r\na$123456a\r\n\r\n", + + ["punctuation", "("], ["punctuation", ")"], + ["punctuation", "{"], ["punctuation", "}"], + ["punctuation", "["], ["punctuation", "]"], + ["punctuation", ";"], + ["punctuation", ","], + ["punctuation", "."], + ["line-continuation", "\\"], + + ["line-continuation", "\\"], ["number", "1.0"], ["line-continuation", "\\"], + + ["number", "1.0"], " \\ ", ["number", "1.0"] +] + +---------------------------------------------------- + +Numbers can be specified in decimal form, with or without a leading value. So 0.0 and .0 both work. +Numbers can also be specified as 6- or 8- digit hexadecimal strings for colors. They begin with a $. +Numbers can not be bounded by words. + +Line continuations must be either the first or last character in a line, less some whitespace. diff --git a/tests/languages/avisynth/types_arguments_feature.test b/tests/languages/avisynth/types_arguments_feature.test new file mode 100644 index 0000000000..aa1660b227 --- /dev/null +++ b/tests/languages/avisynth/types_arguments_feature.test @@ -0,0 +1,119 @@ +function test(clip input, int interleavedFields, float precision, string "floatingDesync", bool "useQTGMC", val "chromaNoise") +{ + castTest = clip(chromaNoise) + castTest = int(chromaNoise) + castTest = float(chromaNoise) + castTest = string(chromaNoise) + castTest = bool(chromaNoise) + castTest = val(chromaNoise) + + return interleavedClip +} + +test(5, 0.5, floatingDesync="progressive") + +---------------------------------------------------- + +[ + ["keyword", "function"], + ["function", "test"], + ["punctuation", "("], + ["argument", [ + ["keyword", "clip"], + " input" + ]], + ["punctuation", ","], + ["argument", [ + ["keyword", "int"], + " interleavedFields" + ]], + ["punctuation", ","], + ["argument", [ + ["keyword", "float"], + " precision" + ]], + ["punctuation", ","], + ["argument", [ + ["keyword", "string"], + " \"floatingDesync\"" + ]], + ["punctuation", ","], + ["argument", [ + ["keyword", "bool"], + " \"useQTGMC\"" + ]], + ["punctuation", ","], + ["argument", [ + ["keyword", "val"], + " \"chromaNoise\"" + ]], + ["punctuation", ")"], + + ["punctuation", "{"], + + "\r\n\tcastTest ", + ["operator", "="], + ["type-cast", "clip"], + ["punctuation", "("], + "chromaNoise", + ["punctuation", ")"], + + "\r\n\tcastTest ", + ["operator", "="], + ["type-cast", "int"], + ["punctuation", "("], + "chromaNoise", + ["punctuation", ")"], + + "\r\n\tcastTest ", + ["operator", "="], + ["type-cast", "float"], + ["punctuation", "("], + "chromaNoise", + ["punctuation", ")"], + + "\r\n\tcastTest ", + ["operator", "="], + ["type-cast", "string"], + ["punctuation", "("], + "chromaNoise", + ["punctuation", ")"], + + "\r\n\tcastTest ", + ["operator", "="], + ["type-cast", "bool"], + ["punctuation", "("], + "chromaNoise", + ["punctuation", ")"], + + "\r\n\tcastTest ", + ["operator", "="], + ["type-cast", "val"], + ["punctuation", "("], + "chromaNoise", + ["punctuation", ")"], + + ["keyword", "return"], " interleavedClip\r\n", + ["punctuation", "}"], + + ["function", "test"], + ["punctuation", "("], + ["number", "5"], + ["punctuation", ","], + ["number", "0.5"], + ["punctuation", ","], + ["argument-label", [ + ["argument-name", "floatingDesync"], + ["punctuation", "="] + ]], + ["string", ["\"progressive\""]], + ["punctuation", ")"] +] + +---------------------------------------------------- + +Optional arguments check for preceeding types to match before getting matched as a string, and should not be matched as strings. +Incidental names of types in an arguments list (such as "interleavedFields" containing "int") should not get highlighted. +Types can be used as casts, and should not be highlighted as user-functions. +Incidental names of types elsewhere (such as "interleavedClip" in a function body) should not get highlighted. +Explicitly-named optional arguments in function calls get lowlighted (including the '='). diff --git a/tests/languages/avisynth/userfunctions_feature.test b/tests/languages/avisynth/userfunctions_feature.test new file mode 100644 index 0000000000..d6226cd996 --- /dev/null +++ b/tests/languages/avisynth/userfunctions_feature.test @@ -0,0 +1,53 @@ +function CustomUserFunction() { + +QTGMC() +last.QTGMC +last.QTGMC() + +QTGMC +1func() +last.1func +last.1func() + +---------------------------------------------------- + +[ + ["keyword", "function"], + ["function", "CustomUserFunction"], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", "{"], + + ["function", "QTGMC"], + ["punctuation", "("], + ["punctuation", ")"], + + ["variable", "last"], + ["punctuation", "."], + ["function", "QTGMC"], + + ["variable", "last"], + ["punctuation", "."], + ["function", "QTGMC"], + ["punctuation", "("], + ["punctuation", ")"], + + "\r\n\r\nQTGMC\r\n1func", + ["punctuation", "("], + ["punctuation", ")"], + + ["variable", "last"], + ["punctuation", "."], + "1func\r\n", + + ["variable", "last"], + ["punctuation", "."], + "1func", + ["punctuation", "("], + ["punctuation", ")"] +] + +---------------------------------------------------- + +Valid identifiers (starts with [a-zA-Z_]) proceeding a '.', preceeding a '(', or both are user/external functions. +User/external functions that don't match the above are technically valid but indistinguisable from variables. From 4fbdd2f8f8b8e5d068a748bb85c32137028fc4fa Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Wed, 15 Sep 2021 21:39:09 +0200 Subject: [PATCH 0902/1100] Added support for MAXScript (#3060) --- components.js | 2 +- components.json | 4 + components/prism-maxscript.js | 52 +++++++++ components/prism-maxscript.min.js | 1 + examples/prism-maxscript.html | 33 ++++++ plugins/show-language/prism-show-language.js | 1 + .../show-language/prism-show-language.min.js | 2 +- .../languages/maxscript/boolean_feature.test | 7 ++ tests/languages/maxscript/color_feature.test | 23 ++++ .../languages/maxscript/comment_feature.test | 29 +++++ .../languages/maxscript/constant_feature.test | 15 +++ .../languages/maxscript/function_feature.test | 96 ++++++++++++++++ .../languages/maxscript/keyword_feature.test | 105 ++++++++++++++++++ tests/languages/maxscript/number_feature.test | 21 ++++ .../languages/maxscript/operator_feature.test | 32 ++++++ tests/languages/maxscript/path_feature.test | 89 +++++++++++++++ .../maxscript/punctuation_feature.test | 25 +++++ tests/languages/maxscript/string_feature.test | 17 +++ tests/languages/maxscript/time_feature.test | 21 ++++ 19 files changed, 573 insertions(+), 2 deletions(-) create mode 100644 components/prism-maxscript.js create mode 100644 components/prism-maxscript.min.js create mode 100644 examples/prism-maxscript.html create mode 100644 tests/languages/maxscript/boolean_feature.test create mode 100644 tests/languages/maxscript/color_feature.test create mode 100644 tests/languages/maxscript/comment_feature.test create mode 100644 tests/languages/maxscript/constant_feature.test create mode 100644 tests/languages/maxscript/function_feature.test create mode 100644 tests/languages/maxscript/keyword_feature.test create mode 100644 tests/languages/maxscript/number_feature.test create mode 100644 tests/languages/maxscript/operator_feature.test create mode 100644 tests/languages/maxscript/path_feature.test create mode 100644 tests/languages/maxscript/punctuation_feature.test create mode 100644 tests/languages/maxscript/string_feature.test create mode 100644 tests/languages/maxscript/time_feature.test diff --git a/components.js b/components.js index b9e4eb1873..429c613e84 100644 --- a/components.js +++ b/components.js @@ -1,2 +1,2 @@ -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml","ssml","atom","rss"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","ssml":"SSML","atom":"Atom","rss":"RSS"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","optional":"regex","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"ABNF","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"agda":{"title":"Agda","owner":"xy-ren"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apex":{"title":"Apex","require":["clike","sql"],"owner":"RunDevelopment"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"dkern"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"avisynth":{"title":"AviSynth","alias":"avs","owner":"Zinfidel"},"avro-idl":{"title":"Avro IDL","alias":"avdl","owner":"RunDevelopment"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"bicep":{"title":"Bicep","owner":"johnnyreilly"},"birb":{"title":"Birb","require":"clike","owner":"Calamity210"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"BNF","alias":"rbnf","aliasTitles":{"rbnf":"RBNF"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"bsl":{"title":"BSL (1C:Enterprise)","alias":"oscript","aliasTitles":{"oscript":"OneScript"},"owner":"Diversus23"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cfscript":{"title":"CFScript","require":"clike","alias":"cfc","owner":"mjclemente"},"chaiscript":{"title":"ChaiScript","require":["clike","cpp"],"owner":"RunDevelopment"},"cil":{"title":"CIL","owner":"sbrl"},"clojure":{"title":"Clojure","owner":"troglotit"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"cobol":{"title":"COBOL","owner":"RunDevelopment"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"coq":{"title":"Coq","owner":"RunDevelopment"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"csv":{"title":"CSV","owner":"RunDevelopment"},"cypher":{"title":"Cypher","owner":"RunDevelopment"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dataweave":{"title":"DataWeave","owner":"machaval"},"dax":{"title":"DAX","owner":"peterbud"},"dhall":{"title":"Dhall","owner":"RunDevelopment"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"dot":{"title":"DOT (Graphviz)","alias":"gv","optional":"markup","owner":"RunDevelopment"},"ebnf":{"title":"EBNF","owner":"RunDevelopment"},"editorconfig":{"title":"EditorConfig","owner":"osipxd"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"false":{"title":"False","owner":"edukisto"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"gap":{"title":"GAP (CAS)","owner":"RunDevelopment"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"c","owner":"Golmote"},"gn":{"title":"GN","alias":"gni","owner":"RunDevelopment"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","optional":"markdown","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","alias":"hbs","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"hlsl":{"title":"HLSL","require":"c","owner":"RunDevelopment"},"hoon":{"title":"Hoon","owner":"matildepark"},"http":{"title":"HTTP","optional":["css","javascript","json","markup","uri"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"icu-message-format":{"title":"ICU Message Format","owner":"RunDevelopment"},"idris":{"title":"Idris","alias":"idr","owner":"KeenS","require":"haskell"},"ignore":{"title":".ignore","owner":"osipxd","alias":["gitignore","hgignore","npmignore"],"aliasTitles":{"gitignore":".gitignore","hgignore":".hgignore","npmignore":".npmignore"}},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jexl":{"title":"Jexl","owner":"czosel"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike","typescript"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","alias":"webmanifest","aliasTitles":{"webmanifest":"Web App Manifest"},"owner":"CupOfTea696"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"jsstacktrace":{"title":"JS stack trace","owner":"sbrl"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup","sql"],"owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","alias":["kt","kts"],"aliasTitles":{"kts":"Kotlin Script"},"require":"clike","owner":"Golmote"},"kumir":{"title":"KuMir (КуМир)","alias":"kum","owner":"edukisto"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","require":"markup-templating","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"log":{"title":"Log file","optional":"javastacktrace","owner":"RunDevelopment"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"magma":{"title":"Magma (CAS)","owner":"RunDevelopment"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","optional":"yaml","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"mel":{"title":"MEL","owner":"Golmote"},"mermaid":{"title":"Mermaid","owner":"RunDevelopment"},"mizar":{"title":"Mizar","owner":"Golmote"},"mongodb":{"title":"MongoDB","owner":"airs0urce","require":"javascript"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"naniscript":{"title":"Naninovel Script","owner":"Elringus","alias":"nani"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nevod":{"title":"Nevod","owner":"nezaboodka"},"nginx":{"title":"nginx","owner":"volado"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"openqasm":{"title":"OpenQasm","alias":"qasm","owner":"RunDevelopment"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"psl":{"title":"PATROL Scripting Language","owner":"bertysentry"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":"markup-templating","owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"promql":{"title":"PromQL","owner":"arendjr"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"purebasic":{"title":"PureBasic","require":"clike","alias":"pbfasm","owner":"HeX0R101"},"purescript":{"title":"PureScript","require":"haskell","alias":"purs","owner":"sriharshachilakapati"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"qsharp":{"title":"Q#","require":"clike","alias":"qs","owner":"fedonman"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"racket":{"title":"Racket","require":"scheme","alias":"rkt","owner":"RunDevelopment"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","owner":"RunDevelopment"},"rego":{"title":"Rego","owner":"JordanSh"},"renpy":{"title":"Ren'py","alias":"rpy","owner":"HyuchiaDiego"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","optional":"css-extras","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","alias":["sh-session","shellsession"],"owner":"RunDevelopment"},"smali":{"title":"Smali","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sml":{"title":"SML","alias":"smlnj","aliasTitles":{"smlnj":"SML/NJ"},"owner":"RunDevelopment"},"solidity":{"title":"Solidity (Ethereum)","alias":"sol","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"squirrel":{"title":"Squirrel","require":"clike","owner":"RunDevelopment"},"stan":{"title":"Stan","owner":"RunDevelopment"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","owner":"chrischares"},"systemd":{"title":"Systemd configuration file","owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","vbnet"],"owner":"RunDevelopment"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"typoscript":{"title":"TypoScript","alias":"tsconfig","aliasTitles":{"tsconfig":"TSConfig"},"owner":"dkern"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"uri":{"title":"URI","alias":"url","aliasTitles":{"url":"URL"},"owner":"RunDevelopment"},"v":{"title":"V","require":"clike","owner":"taggon"},"vala":{"title":"Vala","require":"clike","optional":"regex","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":["vb","vba"],"aliasTitles":{"vba":"VBA"},"owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"wolfram":{"title":"Wolfram language","alias":["mathematica","nb","wl"],"aliasTitles":{"mathematica":"Mathematica","nb":"Mathematica Notebook"},"owner":"msollami"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xml-doc":{"title":"XML doc (.net)","require":"markup","modify":["csharp","fsharp","vbnet"],"owner":"RunDevelopment"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"yang":{"title":"YANG","owner":"RunDevelopment"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword for fine-grained highlighting.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml","ssml","atom","rss"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","ssml":"SSML","atom":"Atom","rss":"RSS"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","optional":"regex","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"ABNF","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"agda":{"title":"Agda","owner":"xy-ren"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apex":{"title":"Apex","require":["clike","sql"],"owner":"RunDevelopment"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"dkern"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"avisynth":{"title":"AviSynth","alias":"avs","owner":"Zinfidel"},"avro-idl":{"title":"Avro IDL","alias":"avdl","owner":"RunDevelopment"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"bicep":{"title":"Bicep","owner":"johnnyreilly"},"birb":{"title":"Birb","require":"clike","owner":"Calamity210"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"BNF","alias":"rbnf","aliasTitles":{"rbnf":"RBNF"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"bsl":{"title":"BSL (1C:Enterprise)","alias":"oscript","aliasTitles":{"oscript":"OneScript"},"owner":"Diversus23"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cfscript":{"title":"CFScript","require":"clike","alias":"cfc","owner":"mjclemente"},"chaiscript":{"title":"ChaiScript","require":["clike","cpp"],"owner":"RunDevelopment"},"cil":{"title":"CIL","owner":"sbrl"},"clojure":{"title":"Clojure","owner":"troglotit"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"cobol":{"title":"COBOL","owner":"RunDevelopment"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"coq":{"title":"Coq","owner":"RunDevelopment"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"csv":{"title":"CSV","owner":"RunDevelopment"},"cypher":{"title":"Cypher","owner":"RunDevelopment"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dataweave":{"title":"DataWeave","owner":"machaval"},"dax":{"title":"DAX","owner":"peterbud"},"dhall":{"title":"Dhall","owner":"RunDevelopment"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"dot":{"title":"DOT (Graphviz)","alias":"gv","optional":"markup","owner":"RunDevelopment"},"ebnf":{"title":"EBNF","owner":"RunDevelopment"},"editorconfig":{"title":"EditorConfig","owner":"osipxd"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"false":{"title":"False","owner":"edukisto"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"gap":{"title":"GAP (CAS)","owner":"RunDevelopment"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"c","owner":"Golmote"},"gn":{"title":"GN","alias":"gni","owner":"RunDevelopment"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","optional":"markdown","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","alias":"hbs","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"hlsl":{"title":"HLSL","require":"c","owner":"RunDevelopment"},"hoon":{"title":"Hoon","owner":"matildepark"},"http":{"title":"HTTP","optional":["css","javascript","json","markup","uri"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"icu-message-format":{"title":"ICU Message Format","owner":"RunDevelopment"},"idris":{"title":"Idris","alias":"idr","owner":"KeenS","require":"haskell"},"ignore":{"title":".ignore","owner":"osipxd","alias":["gitignore","hgignore","npmignore"],"aliasTitles":{"gitignore":".gitignore","hgignore":".hgignore","npmignore":".npmignore"}},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jexl":{"title":"Jexl","owner":"czosel"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike","typescript"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","alias":"webmanifest","aliasTitles":{"webmanifest":"Web App Manifest"},"owner":"CupOfTea696"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"jsstacktrace":{"title":"JS stack trace","owner":"sbrl"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup","sql"],"owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","alias":["kt","kts"],"aliasTitles":{"kts":"Kotlin Script"},"require":"clike","owner":"Golmote"},"kumir":{"title":"KuMir (КуМир)","alias":"kum","owner":"edukisto"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","require":"markup-templating","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"log":{"title":"Log file","optional":"javastacktrace","owner":"RunDevelopment"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"magma":{"title":"Magma (CAS)","owner":"RunDevelopment"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","optional":"yaml","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"maxscript":{"title":"MAXScript","owner":"RunDevelopment"},"mel":{"title":"MEL","owner":"Golmote"},"mermaid":{"title":"Mermaid","owner":"RunDevelopment"},"mizar":{"title":"Mizar","owner":"Golmote"},"mongodb":{"title":"MongoDB","owner":"airs0urce","require":"javascript"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"naniscript":{"title":"Naninovel Script","owner":"Elringus","alias":"nani"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nevod":{"title":"Nevod","owner":"nezaboodka"},"nginx":{"title":"nginx","owner":"volado"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"openqasm":{"title":"OpenQasm","alias":"qasm","owner":"RunDevelopment"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"psl":{"title":"PATROL Scripting Language","owner":"bertysentry"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":"markup-templating","owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"promql":{"title":"PromQL","owner":"arendjr"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"purebasic":{"title":"PureBasic","require":"clike","alias":"pbfasm","owner":"HeX0R101"},"purescript":{"title":"PureScript","require":"haskell","alias":"purs","owner":"sriharshachilakapati"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"qsharp":{"title":"Q#","require":"clike","alias":"qs","owner":"fedonman"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"racket":{"title":"Racket","require":"scheme","alias":"rkt","owner":"RunDevelopment"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","owner":"RunDevelopment"},"rego":{"title":"Rego","owner":"JordanSh"},"renpy":{"title":"Ren'py","alias":"rpy","owner":"HyuchiaDiego"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","optional":"css-extras","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","alias":["sh-session","shellsession"],"owner":"RunDevelopment"},"smali":{"title":"Smali","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sml":{"title":"SML","alias":"smlnj","aliasTitles":{"smlnj":"SML/NJ"},"owner":"RunDevelopment"},"solidity":{"title":"Solidity (Ethereum)","alias":"sol","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"squirrel":{"title":"Squirrel","require":"clike","owner":"RunDevelopment"},"stan":{"title":"Stan","owner":"RunDevelopment"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","owner":"chrischares"},"systemd":{"title":"Systemd configuration file","owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","vbnet"],"owner":"RunDevelopment"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"typoscript":{"title":"TypoScript","alias":"tsconfig","aliasTitles":{"tsconfig":"TSConfig"},"owner":"dkern"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"uri":{"title":"URI","alias":"url","aliasTitles":{"url":"URL"},"owner":"RunDevelopment"},"v":{"title":"V","require":"clike","owner":"taggon"},"vala":{"title":"Vala","require":"clike","optional":"regex","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":["vb","vba"],"aliasTitles":{"vba":"VBA"},"owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"wolfram":{"title":"Wolfram language","alias":["mathematica","nb","wl"],"aliasTitles":{"mathematica":"Mathematica","nb":"Mathematica Notebook"},"owner":"msollami"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xml-doc":{"title":"XML doc (.net)","require":"markup","modify":["csharp","fsharp","vbnet"],"owner":"RunDevelopment"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"yang":{"title":"YANG","owner":"RunDevelopment"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword for fine-grained highlighting.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; if (typeof module !== 'undefined' && module.exports) { module.exports = components; } \ No newline at end of file diff --git a/components.json b/components.json index b602f58a4f..b327593205 100644 --- a/components.json +++ b/components.json @@ -812,6 +812,10 @@ "title": "MATLAB", "owner": "Golmote" }, + "maxscript": { + "title": "MAXScript", + "owner": "RunDevelopment" + }, "mel": { "title": "MEL", "owner": "Golmote" diff --git a/components/prism-maxscript.js b/components/prism-maxscript.js new file mode 100644 index 0000000000..21ff28e82f --- /dev/null +++ b/components/prism-maxscript.js @@ -0,0 +1,52 @@ +Prism.languages.maxscript = { + 'comment': { + pattern: /\/\*[\s\S]*?(?:\*\/|$)|--.*/, + greedy: true + }, + 'string': { + pattern: /(^|[^"\\@])(?:"(?:[^"\\]|\\[\s\S])*"|@"[^"]*")/, + lookbehind: true, + greedy: true + }, + 'path': { + pattern: /\$(?:[\w/\\.*?]|'[^']*')*/, + greedy: true, + alias: 'string' + }, + + 'function-definition': { + pattern: /(\b(?:function|fn)\s+)\w+\b/, + lookbehind: true, + alias: 'function' + }, + + 'argument': { + pattern: /\b[a-z_]\w*(?=:)/i, + alias: 'attr-name' + }, + + 'keyword': /\b(?:about|and|animate|as|at|attributes|by|case|catch|collect|continue|coordsys|do|else|exit|fn|for|from|function|global|if|in|local|macroscript|mapped|max|not|of|off|on|or|parameters|persistent|plugin|rcmenu|return|rollout|set|struct|then|throw|to|tool|try|undo|utility|when|where|while|with)\b/i, + 'boolean': /\b(?:true|false|on|off)\b/, + + 'time': { + pattern: /(^|[^\w.])(?:(?:(?:\d+(?:\.\d*)?|\.\d+)(?:[eEdD][+-]\d+|[LP])?[msft])+|\d+:\d+(?:\.\d*)?)(?![\w.:])/, + lookbehind: true, + alias: 'number' + }, + 'number': [ + { + pattern: /(^|[^\w.])(?:(?:\d+(?:\.\d*)?|\.\d+)(?:[eEdD][+-]\d+|[LP])?|0x[a-fA-F0-9]+)(?![\w.:])/, + lookbehind: true + }, + /\b(?:e|pi)\b/ + ], + + 'constant': /\b(?:black|blue|brown|gray|green|orange|red|white|yellow)\b/, + 'color': { + pattern: /\b(?:dontcollect|ok|silentValue|undefined|unsupplied)\b/i, + alias: 'constant' + }, + + 'operator': /[-+*/<>=!]=?|[&^]|#(?!\()/, + 'punctuation': /[()\[\]{}.:,;]|#(?=\()|\\$/m +}; diff --git a/components/prism-maxscript.min.js b/components/prism-maxscript.min.js new file mode 100644 index 0000000000..1587ead56e --- /dev/null +++ b/components/prism-maxscript.min.js @@ -0,0 +1 @@ +Prism.languages.maxscript={comment:{pattern:/\/\*[\s\S]*?(?:\*\/|$)|--.*/,greedy:!0},string:{pattern:/(^|[^"\\@])(?:"(?:[^"\\]|\\[\s\S])*"|@"[^"]*")/,lookbehind:!0,greedy:!0},path:{pattern:/\$(?:[\w/\\.*?]|'[^']*')*/,greedy:!0,alias:"string"},"function-definition":{pattern:/(\b(?:function|fn)\s+)\w+\b/,lookbehind:!0,alias:"function"},argument:{pattern:/\b[a-z_]\w*(?=:)/i,alias:"attr-name"},keyword:/\b(?:about|and|animate|as|at|attributes|by|case|catch|collect|continue|coordsys|do|else|exit|fn|for|from|function|global|if|in|local|macroscript|mapped|max|not|of|off|on|or|parameters|persistent|plugin|rcmenu|return|rollout|set|struct|then|throw|to|tool|try|undo|utility|when|where|while|with)\b/i,boolean:/\b(?:true|false|on|off)\b/,time:{pattern:/(^|[^\w.])(?:(?:(?:\d+(?:\.\d*)?|\.\d+)(?:[eEdD][+-]\d+|[LP])?[msft])+|\d+:\d+(?:\.\d*)?)(?![\w.:])/,lookbehind:!0,alias:"number"},number:[{pattern:/(^|[^\w.])(?:(?:\d+(?:\.\d*)?|\.\d+)(?:[eEdD][+-]\d+|[LP])?|0x[a-fA-F0-9]+)(?![\w.:])/,lookbehind:!0},/\b(?:e|pi)\b/],constant:/\b(?:black|blue|brown|gray|green|orange|red|white|yellow)\b/,color:{pattern:/\b(?:dontcollect|ok|silentValue|undefined|unsupplied)\b/i,alias:"constant"},operator:/[-+*/<>=!]=?|[&^]|#(?!\()/,punctuation:/[()\[\]{}.:,;]|#(?=\()|\\$/m}; \ No newline at end of file diff --git a/examples/prism-maxscript.html b/examples/prism-maxscript.html new file mode 100644 index 0000000000..08bd94483c --- /dev/null +++ b/examples/prism-maxscript.html @@ -0,0 +1,33 @@ +

            Strings

            +
            -- Source: https://help.autodesk.com/view/MAXDEV/2022/ENU/?guid=GUID-5E5E1A71-24E2-4605-9720-2178B941DECC
            +
            +plugin RenderEffect MonoChrome
            +name:"MonoChrome"
            +classID:#(0x9e6e9e77, 0xbe815df4)
            +(
            +rollout about_rollout "About..."
            +(
            +  label about_label "MonoChrome Filter"
            +)
            +on apply r_image progressCB: do
            +(
            +  progressCB.setTitle "MonoChrome Effect"
            +  local oldEscapeEnable = escapeEnable
            +  escapeEnable = false
            +  bmp_w = r_image.width
            +  bmp_h = r_image.height
            +  for y = 0 to bmp_h-1 do
            +  (
            +    if progressCB.progress y (bmp_h-1) then exit
            +    pixel_line = getPixels r_image [0,y] bmp_w
            +    for x = 1 to bmp_w do
            +    (
            +      p_v = pixel_line[x].value
            +      pixel_line[x] = color p_v p_v p_v pixel_line[x].alpha
            +    )--end x loop
            +    setPixels r_image [0,y] pixel_line
            +  )--end y loop
            +  escapeEnable = oldEscapeEnable
            +)--end on apply
            +)--end plugin
            +
            diff --git a/plugins/show-language/prism-show-language.js b/plugins/show-language/prism-show-language.js index 707bdac66c..1714da4e0e 100644 --- a/plugins/show-language/prism-show-language.js +++ b/plugins/show-language/prism-show-language.js @@ -143,6 +143,7 @@ "md": "Markdown", "markup-templating": "Markup templating", "matlab": "MATLAB", + "maxscript": "MAXScript", "mel": "MEL", "mongodb": "MongoDB", "moon": "MoonScript", diff --git a/plugins/show-language/prism-show-language.min.js b/plugins/show-language/prism-show-language.min.js index 4e14770733..abcec87f07 100644 --- a/plugins/show-language/prism-show-language.min.js +++ b/plugins/show-language/prism-show-language.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof Prism&&"undefined"!=typeof document)if(Prism.plugins.toolbar){var i={none:"Plain text",plain:"Plain text",plaintext:"Plain text",text:"Plain text",txt:"Plain text",html:"HTML",xml:"XML",svg:"SVG",mathml:"MathML",ssml:"SSML",rss:"RSS",css:"CSS",clike:"C-like",js:"JavaScript",abap:"ABAP",abnf:"ABNF",al:"AL",antlr4:"ANTLR4",g4:"ANTLR4",apacheconf:"Apache Configuration",apl:"APL",aql:"AQL",arff:"ARFF",asciidoc:"AsciiDoc",adoc:"AsciiDoc",aspnet:"ASP.NET (C#)",asm6502:"6502 Assembly",autohotkey:"AutoHotkey",autoit:"AutoIt",avisynth:"AviSynth",avs:"AviSynth","avro-idl":"Avro IDL",avdl:"Avro IDL",basic:"BASIC",bbcode:"BBcode",bnf:"BNF",rbnf:"RBNF",bsl:"BSL (1C:Enterprise)",oscript:"OneScript",csharp:"C#",cs:"C#",dotnet:"C#",cpp:"C++",cfscript:"CFScript",cfc:"CFScript",cil:"CIL",cmake:"CMake",cobol:"COBOL",coffee:"CoffeeScript",conc:"Concurnas",csp:"Content-Security-Policy","css-extras":"CSS Extras",csv:"CSV",dataweave:"DataWeave",dax:"DAX",django:"Django/Jinja2",jinja2:"Django/Jinja2","dns-zone-file":"DNS zone file","dns-zone":"DNS zone file",dockerfile:"Docker",dot:"DOT (Graphviz)",gv:"DOT (Graphviz)",ebnf:"EBNF",editorconfig:"EditorConfig",ejs:"EJS",etlua:"Embedded Lua templating",erb:"ERB","excel-formula":"Excel Formula",xlsx:"Excel Formula",xls:"Excel Formula",fsharp:"F#","firestore-security-rules":"Firestore security rules",ftl:"FreeMarker Template Language",gml:"GameMaker Language",gamemakerlanguage:"GameMaker Language",gap:"GAP (CAS)",gcode:"G-code",gdscript:"GDScript",gedcom:"GEDCOM",glsl:"GLSL",gn:"GN",gni:"GN",graphql:"GraphQL",hbs:"Handlebars",hs:"Haskell",hcl:"HCL",hlsl:"HLSL",http:"HTTP",hpkp:"HTTP Public-Key-Pins",hsts:"HTTP Strict-Transport-Security",ichigojam:"IchigoJam","icu-message-format":"ICU Message Format",idr:"Idris",ignore:".ignore",gitignore:".gitignore",hgignore:".hgignore",npmignore:".npmignore",inform7:"Inform 7",javadoc:"JavaDoc",javadoclike:"JavaDoc-like",javastacktrace:"Java stack trace",jq:"JQ",jsdoc:"JSDoc","js-extras":"JS Extras",json:"JSON",webmanifest:"Web App Manifest",json5:"JSON5",jsonp:"JSONP",jsstacktrace:"JS stack trace","js-templates":"JS Templates",kts:"Kotlin Script",kt:"Kotlin",kumir:"KuMir (КуМир)",kum:"KuMir (КуМир)",latex:"LaTeX",tex:"TeX",context:"ConTeXt",lilypond:"LilyPond",ly:"LilyPond",emacs:"Lisp",elisp:"Lisp","emacs-lisp":"Lisp",llvm:"LLVM IR",log:"Log file",lolcode:"LOLCODE",magma:"Magma (CAS)",md:"Markdown","markup-templating":"Markup templating",matlab:"MATLAB",mel:"MEL",mongodb:"MongoDB",moon:"MoonScript",n1ql:"N1QL",n4js:"N4JS",n4jsd:"N4JS","nand2tetris-hdl":"Nand To Tetris HDL",naniscript:"Naninovel Script",nani:"Naninovel Script",nasm:"NASM",neon:"NEON",nginx:"nginx",nsis:"NSIS",objectivec:"Objective-C",objc:"Objective-C",ocaml:"OCaml",opencl:"OpenCL",openqasm:"OpenQasm",qasm:"OpenQasm",parigp:"PARI/GP",objectpascal:"Object Pascal",psl:"PATROL Scripting Language",pcaxis:"PC-Axis",px:"PC-Axis",peoplecode:"PeopleCode",pcode:"PeopleCode",php:"PHP",phpdoc:"PHPDoc","php-extras":"PHP Extras",plsql:"PL/SQL",powerquery:"PowerQuery",pq:"PowerQuery",mscript:"PowerQuery",powershell:"PowerShell",promql:"PromQL",properties:".properties",protobuf:"Protocol Buffers",purebasic:"PureBasic",pbfasm:"PureBasic",purs:"PureScript",py:"Python",qsharp:"Q#",qs:"Q#",q:"Q (kdb+ database)",qml:"QML",rkt:"Racket",jsx:"React JSX",tsx:"React TSX",renpy:"Ren'py",rpy:"Ren'py",rest:"reST (reStructuredText)",robotframework:"Robot Framework",robot:"Robot Framework",rb:"Ruby",sas:"SAS",sass:"Sass (Sass)",scss:"Sass (Scss)","shell-session":"Shell session","sh-session":"Shell session",shellsession:"Shell session",sml:"SML",smlnj:"SML/NJ",solidity:"Solidity (Ethereum)",sol:"Solidity (Ethereum)","solution-file":"Solution file",sln:"Solution file",soy:"Soy (Closure Template)",sparql:"SPARQL",rq:"SPARQL","splunk-spl":"Splunk SPL",sqf:"SQF: Status Quo Function (Arma 3)",sql:"SQL",iecst:"Structured Text (IEC 61131-3)",systemd:"Systemd configuration file","t4-templating":"T4 templating","t4-cs":"T4 Text Templates (C#)",t4:"T4 Text Templates (C#)","t4-vb":"T4 Text Templates (VB)",tap:"TAP",tt2:"Template Toolkit 2",toml:"TOML",trig:"TriG",ts:"TypeScript",tsconfig:"TSConfig",uscript:"UnrealScript",uc:"UnrealScript",uri:"URI",url:"URL",vbnet:"VB.Net",vhdl:"VHDL",vim:"vim","visual-basic":"Visual Basic",vba:"VBA",vb:"Visual Basic",wasm:"WebAssembly",wiki:"Wiki markup",wolfram:"Wolfram language",nb:"Mathematica Notebook",wl:"Wolfram language",xeoracube:"XeoraCube","xml-doc":"XML doc (.net)",xojo:"Xojo (REALbasic)",xquery:"XQuery",yaml:"YAML",yml:"YAML",yang:"YANG"};Prism.plugins.toolbar.registerButton("show-language",function(e){var a=e.element.parentNode;if(a&&/pre/i.test(a.nodeName)){var t,s=a.getAttribute("data-language")||i[e.language]||((t=e.language)?(t.substring(0,1).toUpperCase()+t.substring(1)).replace(/s(?=cript)/,"S"):t);if(s){var o=document.createElement("span");return o.textContent=s,o}}})}else console.warn("Show Languages plugin loaded before Toolbar plugin.")}(); \ No newline at end of file +!function(){if("undefined"!=typeof Prism&&"undefined"!=typeof document)if(Prism.plugins.toolbar){var i={none:"Plain text",plain:"Plain text",plaintext:"Plain text",text:"Plain text",txt:"Plain text",html:"HTML",xml:"XML",svg:"SVG",mathml:"MathML",ssml:"SSML",rss:"RSS",css:"CSS",clike:"C-like",js:"JavaScript",abap:"ABAP",abnf:"ABNF",al:"AL",antlr4:"ANTLR4",g4:"ANTLR4",apacheconf:"Apache Configuration",apl:"APL",aql:"AQL",arff:"ARFF",asciidoc:"AsciiDoc",adoc:"AsciiDoc",aspnet:"ASP.NET (C#)",asm6502:"6502 Assembly",autohotkey:"AutoHotkey",autoit:"AutoIt",avisynth:"AviSynth",avs:"AviSynth","avro-idl":"Avro IDL",avdl:"Avro IDL",basic:"BASIC",bbcode:"BBcode",bnf:"BNF",rbnf:"RBNF",bsl:"BSL (1C:Enterprise)",oscript:"OneScript",csharp:"C#",cs:"C#",dotnet:"C#",cpp:"C++",cfscript:"CFScript",cfc:"CFScript",cil:"CIL",cmake:"CMake",cobol:"COBOL",coffee:"CoffeeScript",conc:"Concurnas",csp:"Content-Security-Policy","css-extras":"CSS Extras",csv:"CSV",dataweave:"DataWeave",dax:"DAX",django:"Django/Jinja2",jinja2:"Django/Jinja2","dns-zone-file":"DNS zone file","dns-zone":"DNS zone file",dockerfile:"Docker",dot:"DOT (Graphviz)",gv:"DOT (Graphviz)",ebnf:"EBNF",editorconfig:"EditorConfig",ejs:"EJS",etlua:"Embedded Lua templating",erb:"ERB","excel-formula":"Excel Formula",xlsx:"Excel Formula",xls:"Excel Formula",fsharp:"F#","firestore-security-rules":"Firestore security rules",ftl:"FreeMarker Template Language",gml:"GameMaker Language",gamemakerlanguage:"GameMaker Language",gap:"GAP (CAS)",gcode:"G-code",gdscript:"GDScript",gedcom:"GEDCOM",glsl:"GLSL",gn:"GN",gni:"GN",graphql:"GraphQL",hbs:"Handlebars",hs:"Haskell",hcl:"HCL",hlsl:"HLSL",http:"HTTP",hpkp:"HTTP Public-Key-Pins",hsts:"HTTP Strict-Transport-Security",ichigojam:"IchigoJam","icu-message-format":"ICU Message Format",idr:"Idris",ignore:".ignore",gitignore:".gitignore",hgignore:".hgignore",npmignore:".npmignore",inform7:"Inform 7",javadoc:"JavaDoc",javadoclike:"JavaDoc-like",javastacktrace:"Java stack trace",jq:"JQ",jsdoc:"JSDoc","js-extras":"JS Extras",json:"JSON",webmanifest:"Web App Manifest",json5:"JSON5",jsonp:"JSONP",jsstacktrace:"JS stack trace","js-templates":"JS Templates",kts:"Kotlin Script",kt:"Kotlin",kumir:"KuMir (КуМир)",kum:"KuMir (КуМир)",latex:"LaTeX",tex:"TeX",context:"ConTeXt",lilypond:"LilyPond",ly:"LilyPond",emacs:"Lisp",elisp:"Lisp","emacs-lisp":"Lisp",llvm:"LLVM IR",log:"Log file",lolcode:"LOLCODE",magma:"Magma (CAS)",md:"Markdown","markup-templating":"Markup templating",matlab:"MATLAB",maxscript:"MAXScript",mel:"MEL",mongodb:"MongoDB",moon:"MoonScript",n1ql:"N1QL",n4js:"N4JS",n4jsd:"N4JS","nand2tetris-hdl":"Nand To Tetris HDL",naniscript:"Naninovel Script",nani:"Naninovel Script",nasm:"NASM",neon:"NEON",nginx:"nginx",nsis:"NSIS",objectivec:"Objective-C",objc:"Objective-C",ocaml:"OCaml",opencl:"OpenCL",openqasm:"OpenQasm",qasm:"OpenQasm",parigp:"PARI/GP",objectpascal:"Object Pascal",psl:"PATROL Scripting Language",pcaxis:"PC-Axis",px:"PC-Axis",peoplecode:"PeopleCode",pcode:"PeopleCode",php:"PHP",phpdoc:"PHPDoc","php-extras":"PHP Extras",plsql:"PL/SQL",powerquery:"PowerQuery",pq:"PowerQuery",mscript:"PowerQuery",powershell:"PowerShell",promql:"PromQL",properties:".properties",protobuf:"Protocol Buffers",purebasic:"PureBasic",pbfasm:"PureBasic",purs:"PureScript",py:"Python",qsharp:"Q#",qs:"Q#",q:"Q (kdb+ database)",qml:"QML",rkt:"Racket",jsx:"React JSX",tsx:"React TSX",renpy:"Ren'py",rpy:"Ren'py",rest:"reST (reStructuredText)",robotframework:"Robot Framework",robot:"Robot Framework",rb:"Ruby",sas:"SAS",sass:"Sass (Sass)",scss:"Sass (Scss)","shell-session":"Shell session","sh-session":"Shell session",shellsession:"Shell session",sml:"SML",smlnj:"SML/NJ",solidity:"Solidity (Ethereum)",sol:"Solidity (Ethereum)","solution-file":"Solution file",sln:"Solution file",soy:"Soy (Closure Template)",sparql:"SPARQL",rq:"SPARQL","splunk-spl":"Splunk SPL",sqf:"SQF: Status Quo Function (Arma 3)",sql:"SQL",iecst:"Structured Text (IEC 61131-3)",systemd:"Systemd configuration file","t4-templating":"T4 templating","t4-cs":"T4 Text Templates (C#)",t4:"T4 Text Templates (C#)","t4-vb":"T4 Text Templates (VB)",tap:"TAP",tt2:"Template Toolkit 2",toml:"TOML",trig:"TriG",ts:"TypeScript",tsconfig:"TSConfig",uscript:"UnrealScript",uc:"UnrealScript",uri:"URI",url:"URL",vbnet:"VB.Net",vhdl:"VHDL",vim:"vim","visual-basic":"Visual Basic",vba:"VBA",vb:"Visual Basic",wasm:"WebAssembly",wiki:"Wiki markup",wolfram:"Wolfram language",nb:"Mathematica Notebook",wl:"Wolfram language",xeoracube:"XeoraCube","xml-doc":"XML doc (.net)",xojo:"Xojo (REALbasic)",xquery:"XQuery",yaml:"YAML",yml:"YAML",yang:"YANG"};Prism.plugins.toolbar.registerButton("show-language",function(e){var a=e.element.parentNode;if(a&&/pre/i.test(a.nodeName)){var t,s=a.getAttribute("data-language")||i[e.language]||((t=e.language)?(t.substring(0,1).toUpperCase()+t.substring(1)).replace(/s(?=cript)/,"S"):t);if(s){var o=document.createElement("span");return o.textContent=s,o}}})}else console.warn("Show Languages plugin loaded before Toolbar plugin.")}(); \ No newline at end of file diff --git a/tests/languages/maxscript/boolean_feature.test b/tests/languages/maxscript/boolean_feature.test new file mode 100644 index 0000000000..6d7dfb5191 --- /dev/null +++ b/tests/languages/maxscript/boolean_feature.test @@ -0,0 +1,7 @@ +true false + +---------------------------------------------------- + +[ + ["boolean", "true"], ["boolean", "false"] +] diff --git a/tests/languages/maxscript/color_feature.test b/tests/languages/maxscript/color_feature.test new file mode 100644 index 0000000000..df3b1150c4 --- /dev/null +++ b/tests/languages/maxscript/color_feature.test @@ -0,0 +1,23 @@ +black +blue +brown +gray +green +orange +red +white +yellow + +---------------------------------------------------- + +[ + ["constant", "black"], + ["constant", "blue"], + ["constant", "brown"], + ["constant", "gray"], + ["constant", "green"], + ["constant", "orange"], + ["constant", "red"], + ["constant", "white"], + ["constant", "yellow"] +] diff --git a/tests/languages/maxscript/comment_feature.test b/tests/languages/maxscript/comment_feature.test new file mode 100644 index 0000000000..8d088d07ec --- /dev/null +++ b/tests/languages/maxscript/comment_feature.test @@ -0,0 +1,29 @@ +/* this is a long comment +blah blah +print "debug 1" -- code commented out +more comments +*/ + +for i in 1 to 10 do(/* messageBox "in loop"; */frabulate i ) + +-- comment + +---------------------------------------------------- + +[ + ["comment", "/* this is a long comment\r\nblah blah\r\nprint \"debug 1\" -- code commented out\r\nmore comments\r\n*/"], + + ["keyword", "for"], + " i ", + ["keyword", "in"], + ["number", "1"], + ["keyword", "to"], + ["number", "10"], + ["keyword", "do"], + ["punctuation", "("], + ["comment", "/* messageBox \"in loop\"; */"], + "frabulate i ", + ["punctuation", ")"], + + ["comment", "-- comment"] +] diff --git a/tests/languages/maxscript/constant_feature.test b/tests/languages/maxscript/constant_feature.test new file mode 100644 index 0000000000..e3a82dc998 --- /dev/null +++ b/tests/languages/maxscript/constant_feature.test @@ -0,0 +1,15 @@ +dontcollect +ok +silentValue +undefined +unsupplied + +---------------------------------------------------- + +[ + ["color", "dontcollect"], + ["color", "ok"], + ["color", "silentValue"], + ["color", "undefined"], + ["color", "unsupplied"] +] diff --git a/tests/languages/maxscript/function_feature.test b/tests/languages/maxscript/function_feature.test new file mode 100644 index 0000000000..6395e994b7 --- /dev/null +++ b/tests/languages/maxscript/function_feature.test @@ -0,0 +1,96 @@ +function my_add a b = a + b + +fn factorial n = if n <= 0 then 1 else n * factorial (n - 1) + +mapped function rand_color x = + x.wireColor = random (color 0 0 0) (color 255 255 255) + +fn starfield count extent:[200,200,200] pos:[0,0,0] = + ( + -- something + ) + +---------------------------------------------------- + +[ + ["keyword", "function"], + ["function-definition", "my_add"], + " a b ", + ["operator", "="], + " a ", + ["operator", "+"], + " b\r\n\r\n", + + ["keyword", "fn"], + ["function-definition", "factorial"], + " n ", + ["operator", "="], + ["keyword", "if"], + " n ", + ["operator", "<="], + ["number", "0"], + ["keyword", "then"], + ["number", "1"], + ["keyword", "else"], + " n ", + ["operator", "*"], + " factorial ", + ["punctuation", "("], + "n ", + ["operator", "-"], + ["number", "1"], + ["punctuation", ")"], + + ["keyword", "mapped"], + ["keyword", "function"], + ["function-definition", "rand_color"], + " x ", + ["operator", "="], + + "\r\n x", + ["punctuation", "."], + "wireColor ", + ["operator", "="], + " random ", + ["punctuation", "("], + "color ", + ["number", "0"], + ["number", "0"], + ["number", "0"], + ["punctuation", ")"], + ["punctuation", "("], + "color ", + ["number", "255"], + ["number", "255"], + ["number", "255"], + ["punctuation", ")"], + + ["keyword", "fn"], + ["function-definition", "starfield"], + " count ", + ["argument", "extent"], + ["punctuation", ":"], + ["punctuation", "["], + ["number", "200"], + ["punctuation", ","], + ["number", "200"], + ["punctuation", ","], + ["number", "200"], + ["punctuation", "]"], + ["argument", "pos"], + ["punctuation", ":"], + ["punctuation", "["], + ["number", "0"], + ["punctuation", ","], + ["number", "0"], + ["punctuation", ","], + ["number", "0"], + ["punctuation", "]"], + ["operator", "="], + + ["punctuation", "("], + + ["comment", "-- something"], + + ["punctuation", ")"] +] diff --git a/tests/languages/maxscript/keyword_feature.test b/tests/languages/maxscript/keyword_feature.test new file mode 100644 index 0000000000..200aac37ca --- /dev/null +++ b/tests/languages/maxscript/keyword_feature.test @@ -0,0 +1,105 @@ +about; +and; +animate; +as; +at; +attributes; +by; +case; +catch; +collect; +continue; +coordsys; +do; +else; +exit; +fn; +for; +from; +function; +global; +if; +in; +local; +macroscript; +mapped; +max; +not; +of; +off; +on; +or; +parameters; +persistent; +plugin; +rcmenu; +return; +rollout; +set; +struct; +then; +throw; +to; +tool; +try; +undo; +utility; +when; +where; +while; +with; + +---------------------------------------------------- + +[ + ["keyword", "about"], ["punctuation", ";"], + ["keyword", "and"], ["punctuation", ";"], + ["keyword", "animate"], ["punctuation", ";"], + ["keyword", "as"], ["punctuation", ";"], + ["keyword", "at"], ["punctuation", ";"], + ["keyword", "attributes"], ["punctuation", ";"], + ["keyword", "by"], ["punctuation", ";"], + ["keyword", "case"], ["punctuation", ";"], + ["keyword", "catch"], ["punctuation", ";"], + ["keyword", "collect"], ["punctuation", ";"], + ["keyword", "continue"], ["punctuation", ";"], + ["keyword", "coordsys"], ["punctuation", ";"], + ["keyword", "do"], ["punctuation", ";"], + ["keyword", "else"], ["punctuation", ";"], + ["keyword", "exit"], ["punctuation", ";"], + ["keyword", "fn"], ["punctuation", ";"], + ["keyword", "for"], ["punctuation", ";"], + ["keyword", "from"], ["punctuation", ";"], + ["keyword", "function"], ["punctuation", ";"], + ["keyword", "global"], ["punctuation", ";"], + ["keyword", "if"], ["punctuation", ";"], + ["keyword", "in"], ["punctuation", ";"], + ["keyword", "local"], ["punctuation", ";"], + ["keyword", "macroscript"], ["punctuation", ";"], + ["keyword", "mapped"], ["punctuation", ";"], + ["keyword", "max"], ["punctuation", ";"], + ["keyword", "not"], ["punctuation", ";"], + ["keyword", "of"], ["punctuation", ";"], + ["keyword", "off"], ["punctuation", ";"], + ["keyword", "on"], ["punctuation", ";"], + ["keyword", "or"], ["punctuation", ";"], + ["keyword", "parameters"], ["punctuation", ";"], + ["keyword", "persistent"], ["punctuation", ";"], + ["keyword", "plugin"], ["punctuation", ";"], + ["keyword", "rcmenu"], ["punctuation", ";"], + ["keyword", "return"], ["punctuation", ";"], + ["keyword", "rollout"], ["punctuation", ";"], + ["keyword", "set"], ["punctuation", ";"], + ["keyword", "struct"], ["punctuation", ";"], + ["keyword", "then"], ["punctuation", ";"], + ["keyword", "throw"], ["punctuation", ";"], + ["keyword", "to"], ["punctuation", ";"], + ["keyword", "tool"], ["punctuation", ";"], + ["keyword", "try"], ["punctuation", ";"], + ["keyword", "undo"], ["punctuation", ";"], + ["keyword", "utility"], ["punctuation", ";"], + ["keyword", "when"], ["punctuation", ";"], + ["keyword", "where"], ["punctuation", ";"], + ["keyword", "while"], ["punctuation", ";"], + ["keyword", "with"], ["punctuation", ";"] +] diff --git a/tests/languages/maxscript/number_feature.test b/tests/languages/maxscript/number_feature.test new file mode 100644 index 0000000000..83344a4765 --- /dev/null +++ b/tests/languages/maxscript/number_feature.test @@ -0,0 +1,21 @@ +123 +123.45 +-0.00345 +1.0e-6 +0x0E +.1 + +e pi + +---------------------------------------------------- + +[ + ["number", "123"], + ["number", "123.45"], + ["operator", "-"], ["number", "0.00345"], + ["number", "1.0e-6"], + ["number", "0x0E"], + ["number", ".1"], + + ["number", "e"], ["number", "pi"] +] diff --git a/tests/languages/maxscript/operator_feature.test b/tests/languages/maxscript/operator_feature.test new file mode 100644 index 0000000000..e09006ecc1 --- /dev/null +++ b/tests/languages/maxscript/operator_feature.test @@ -0,0 +1,32 @@ ++ - * / ++= -= *= /= + += +== != < <= > >= + +^ & # + +---------------------------------------------------- + +[ + ["operator", "+"], + ["operator", "-"], + ["operator", "*"], + ["operator", "/"], + + ["operator", "+="], + ["operator", "-="], + ["operator", "*="], + ["operator", "/="], + + ["operator", "="], + + ["operator", "=="], + ["operator", "!="], + ["operator", "<"], + ["operator", "<="], + ["operator", ">"], + ["operator", ">="], + + ["operator", "^"], ["operator", "&"], ["operator", "#"] +] diff --git a/tests/languages/maxscript/path_feature.test b/tests/languages/maxscript/path_feature.test new file mode 100644 index 0000000000..f57f10720c --- /dev/null +++ b/tests/languages/maxscript/path_feature.test @@ -0,0 +1,89 @@ +$box01 -- object named 'box01' +$torso/left_up_arm/left_low_arm -- hierarchy path name +$*box* -- all objects with 'box' in +-- the name +$torso/* -- all the direct children of +-- $torso +$helpers/d* -- all helper objects whose name starts with 'd' + +$dummy/head/neck +$dummy/* +$neck* +$box0? +$dummy/*/* +$dummy/.../box* +$dummy...* +$*box*.position += [10, 10, 0] + +$.pos = [0,0,0] +hide $ +rotate $ 35 z_axis + +$'a silly name!!' +$'what the \*' +bodyPart=$'Bip01 L UpperArm' +bodyPart=$Bip01_L_UpperArm + +---------------------------------------------------- + +[ + ["path", "$box01"], + ["comment", "-- object named 'box01'"], + ["path", "$torso/left_up_arm/left_low_arm"], + ["comment", "-- hierarchy path name"], + ["path", "$*box*"], + ["comment", "-- all objects with 'box' in"], + ["comment", "-- the name"], + ["path", "$torso/*"], + ["comment", "-- all the direct children of"], + ["comment", "-- $torso"], + ["path", "$helpers/d*"], + ["comment", "-- all helper objects whose name starts with 'd'"], + + ["path", "$dummy/head/neck"], + + ["path", "$dummy/*"], + + ["path", "$neck*"], + + ["path", "$box0?"], + + ["path", "$dummy/*/*"], + + ["path", "$dummy/.../box*"], + + ["path", "$dummy...*"], + + ["path", "$*box*.position"], + ["operator", "+="], + ["punctuation", "["], + ["number", "10"], + ["punctuation", ","], + ["number", "10"], + ["punctuation", ","], + ["number", "0"], + ["punctuation", "]"], + + ["path", "$.pos"], + ["operator", "="], + ["punctuation", "["], + ["number", "0"], + ["punctuation", ","], + ["number", "0"], + ["punctuation", ","], + ["number", "0"], + ["punctuation", "]"], + + "\r\nhide ", + ["path", "$"], + + "\r\nrotate ", + ["path", "$"], + ["number", "35"], + " z_axis\r\n\r\n", + + ["path", "$'a silly name!!'"], + ["path", "$'what the \\*'"], + "\r\nbodyPart", ["operator", "="], ["path", "$'Bip01 L UpperArm'"], + "\r\nbodyPart", ["operator", "="], ["path", "$Bip01_L_UpperArm"] +] diff --git a/tests/languages/maxscript/punctuation_feature.test b/tests/languages/maxscript/punctuation_feature.test new file mode 100644 index 0000000000..136dc90685 --- /dev/null +++ b/tests/languages/maxscript/punctuation_feature.test @@ -0,0 +1,25 @@ +( ) [ ] { } +. : , ; +#( +\ + +---------------------------------------------------- + +[ + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", "["], + ["punctuation", "]"], + ["punctuation", "{"], + ["punctuation", "}"], + + ["punctuation", "."], + ["punctuation", ":"], + ["punctuation", ","], + ["punctuation", ";"], + + ["punctuation", "#"], + ["punctuation", "("], + + ["punctuation", "\\"] +] diff --git a/tests/languages/maxscript/string_feature.test b/tests/languages/maxscript/string_feature.test new file mode 100644 index 0000000000..f2bf20ae12 --- /dev/null +++ b/tests/languages/maxscript/string_feature.test @@ -0,0 +1,17 @@ +"" +"foo should be quoted like this: \"foo\" and a new line: \n" +"Twas brillig and the slithy tobes +did gyre and gimbol in the wabe +or something like that..." +"g:\\3dsmax25\\scenes" +@"g:\temp\newfolder\render" + +---------------------------------------------------- + +[ + ["string", "\"\""], + ["string", "\"foo should be quoted like this: \\\"foo\\\" and a new line: \\n\""], + ["string", "\"Twas brillig and the slithy tobes\r\ndid gyre and gimbol in the wabe\r\nor something like that...\""], + ["string", "\"g:\\\\3dsmax25\\\\scenes\""], + ["string", "@\"g:\\temp\\newfolder\\render\""] +] diff --git a/tests/languages/maxscript/time_feature.test b/tests/languages/maxscript/time_feature.test new file mode 100644 index 0000000000..0405771f5c --- /dev/null +++ b/tests/languages/maxscript/time_feature.test @@ -0,0 +1,21 @@ +2.5s +1m15s +2m30s5f2t +125f +18.25f +1f20t +2:10.0 +0:0.29 + +---------------------------------------------------- + +[ + ["time", "2.5s"], + ["time", "1m15s"], + ["time", "2m30s5f2t"], + ["time", "125f"], + ["time", "18.25f"], + ["time", "1f20t"], + ["time", "2:10.0"], + ["time", "0:0.29"] +] From 6a356d253aedf73c1167e84e2ad722cc1378a824 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Wed, 15 Sep 2021 21:41:32 +0200 Subject: [PATCH 0903/1100] Added support for Wren (#3063) --- components.js | 2 +- components.json | 4 + components/prism-wren.js | 100 ++++++++++++++++++ components/prism-wren.min.js | 1 + examples/prism-wren.html | 17 +++ tests/languages/wren/attribute_feature.test | 91 ++++++++++++++++ tests/languages/wren/boolean_feature.test | 9 ++ tests/languages/wren/class-name_feature.test | 35 ++++++ tests/languages/wren/comment_feature.test | 21 ++++ tests/languages/wren/function_feature.test | 19 ++++ tests/languages/wren/hashbang_feature.test | 7 ++ tests/languages/wren/keyword_feature.test | 45 ++++++++ tests/languages/wren/number_feature.test | 25 +++++ tests/languages/wren/operator_feature.test | 55 ++++++++++ tests/languages/wren/punctuation_feature.test | 17 +++ tests/languages/wren/string_feature.test | 60 +++++++++++ 16 files changed, 507 insertions(+), 1 deletion(-) create mode 100644 components/prism-wren.js create mode 100644 components/prism-wren.min.js create mode 100644 examples/prism-wren.html create mode 100644 tests/languages/wren/attribute_feature.test create mode 100644 tests/languages/wren/boolean_feature.test create mode 100644 tests/languages/wren/class-name_feature.test create mode 100644 tests/languages/wren/comment_feature.test create mode 100644 tests/languages/wren/function_feature.test create mode 100644 tests/languages/wren/hashbang_feature.test create mode 100644 tests/languages/wren/keyword_feature.test create mode 100644 tests/languages/wren/number_feature.test create mode 100644 tests/languages/wren/operator_feature.test create mode 100644 tests/languages/wren/punctuation_feature.test create mode 100644 tests/languages/wren/string_feature.test diff --git a/components.js b/components.js index 429c613e84..5552bb20ef 100644 --- a/components.js +++ b/components.js @@ -1,2 +1,2 @@ -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml","ssml","atom","rss"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","ssml":"SSML","atom":"Atom","rss":"RSS"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","optional":"regex","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"ABNF","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"agda":{"title":"Agda","owner":"xy-ren"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apex":{"title":"Apex","require":["clike","sql"],"owner":"RunDevelopment"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"dkern"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"avisynth":{"title":"AviSynth","alias":"avs","owner":"Zinfidel"},"avro-idl":{"title":"Avro IDL","alias":"avdl","owner":"RunDevelopment"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"bicep":{"title":"Bicep","owner":"johnnyreilly"},"birb":{"title":"Birb","require":"clike","owner":"Calamity210"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"BNF","alias":"rbnf","aliasTitles":{"rbnf":"RBNF"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"bsl":{"title":"BSL (1C:Enterprise)","alias":"oscript","aliasTitles":{"oscript":"OneScript"},"owner":"Diversus23"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cfscript":{"title":"CFScript","require":"clike","alias":"cfc","owner":"mjclemente"},"chaiscript":{"title":"ChaiScript","require":["clike","cpp"],"owner":"RunDevelopment"},"cil":{"title":"CIL","owner":"sbrl"},"clojure":{"title":"Clojure","owner":"troglotit"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"cobol":{"title":"COBOL","owner":"RunDevelopment"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"coq":{"title":"Coq","owner":"RunDevelopment"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"csv":{"title":"CSV","owner":"RunDevelopment"},"cypher":{"title":"Cypher","owner":"RunDevelopment"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dataweave":{"title":"DataWeave","owner":"machaval"},"dax":{"title":"DAX","owner":"peterbud"},"dhall":{"title":"Dhall","owner":"RunDevelopment"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"dot":{"title":"DOT (Graphviz)","alias":"gv","optional":"markup","owner":"RunDevelopment"},"ebnf":{"title":"EBNF","owner":"RunDevelopment"},"editorconfig":{"title":"EditorConfig","owner":"osipxd"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"false":{"title":"False","owner":"edukisto"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"gap":{"title":"GAP (CAS)","owner":"RunDevelopment"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"c","owner":"Golmote"},"gn":{"title":"GN","alias":"gni","owner":"RunDevelopment"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","optional":"markdown","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","alias":"hbs","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"hlsl":{"title":"HLSL","require":"c","owner":"RunDevelopment"},"hoon":{"title":"Hoon","owner":"matildepark"},"http":{"title":"HTTP","optional":["css","javascript","json","markup","uri"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"icu-message-format":{"title":"ICU Message Format","owner":"RunDevelopment"},"idris":{"title":"Idris","alias":"idr","owner":"KeenS","require":"haskell"},"ignore":{"title":".ignore","owner":"osipxd","alias":["gitignore","hgignore","npmignore"],"aliasTitles":{"gitignore":".gitignore","hgignore":".hgignore","npmignore":".npmignore"}},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jexl":{"title":"Jexl","owner":"czosel"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike","typescript"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","alias":"webmanifest","aliasTitles":{"webmanifest":"Web App Manifest"},"owner":"CupOfTea696"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"jsstacktrace":{"title":"JS stack trace","owner":"sbrl"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup","sql"],"owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","alias":["kt","kts"],"aliasTitles":{"kts":"Kotlin Script"},"require":"clike","owner":"Golmote"},"kumir":{"title":"KuMir (КуМир)","alias":"kum","owner":"edukisto"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","require":"markup-templating","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"log":{"title":"Log file","optional":"javastacktrace","owner":"RunDevelopment"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"magma":{"title":"Magma (CAS)","owner":"RunDevelopment"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","optional":"yaml","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"maxscript":{"title":"MAXScript","owner":"RunDevelopment"},"mel":{"title":"MEL","owner":"Golmote"},"mermaid":{"title":"Mermaid","owner":"RunDevelopment"},"mizar":{"title":"Mizar","owner":"Golmote"},"mongodb":{"title":"MongoDB","owner":"airs0urce","require":"javascript"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"naniscript":{"title":"Naninovel Script","owner":"Elringus","alias":"nani"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nevod":{"title":"Nevod","owner":"nezaboodka"},"nginx":{"title":"nginx","owner":"volado"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"openqasm":{"title":"OpenQasm","alias":"qasm","owner":"RunDevelopment"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"psl":{"title":"PATROL Scripting Language","owner":"bertysentry"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":"markup-templating","owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"promql":{"title":"PromQL","owner":"arendjr"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"purebasic":{"title":"PureBasic","require":"clike","alias":"pbfasm","owner":"HeX0R101"},"purescript":{"title":"PureScript","require":"haskell","alias":"purs","owner":"sriharshachilakapati"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"qsharp":{"title":"Q#","require":"clike","alias":"qs","owner":"fedonman"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"racket":{"title":"Racket","require":"scheme","alias":"rkt","owner":"RunDevelopment"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","owner":"RunDevelopment"},"rego":{"title":"Rego","owner":"JordanSh"},"renpy":{"title":"Ren'py","alias":"rpy","owner":"HyuchiaDiego"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","optional":"css-extras","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","alias":["sh-session","shellsession"],"owner":"RunDevelopment"},"smali":{"title":"Smali","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sml":{"title":"SML","alias":"smlnj","aliasTitles":{"smlnj":"SML/NJ"},"owner":"RunDevelopment"},"solidity":{"title":"Solidity (Ethereum)","alias":"sol","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"squirrel":{"title":"Squirrel","require":"clike","owner":"RunDevelopment"},"stan":{"title":"Stan","owner":"RunDevelopment"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","owner":"chrischares"},"systemd":{"title":"Systemd configuration file","owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","vbnet"],"owner":"RunDevelopment"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"typoscript":{"title":"TypoScript","alias":"tsconfig","aliasTitles":{"tsconfig":"TSConfig"},"owner":"dkern"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"uri":{"title":"URI","alias":"url","aliasTitles":{"url":"URL"},"owner":"RunDevelopment"},"v":{"title":"V","require":"clike","owner":"taggon"},"vala":{"title":"Vala","require":"clike","optional":"regex","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":["vb","vba"],"aliasTitles":{"vba":"VBA"},"owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"wolfram":{"title":"Wolfram language","alias":["mathematica","nb","wl"],"aliasTitles":{"mathematica":"Mathematica","nb":"Mathematica Notebook"},"owner":"msollami"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xml-doc":{"title":"XML doc (.net)","require":"markup","modify":["csharp","fsharp","vbnet"],"owner":"RunDevelopment"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"yang":{"title":"YANG","owner":"RunDevelopment"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword for fine-grained highlighting.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml","ssml","atom","rss"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","ssml":"SSML","atom":"Atom","rss":"RSS"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","optional":"regex","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"ABNF","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"agda":{"title":"Agda","owner":"xy-ren"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apex":{"title":"Apex","require":["clike","sql"],"owner":"RunDevelopment"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"dkern"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"avisynth":{"title":"AviSynth","alias":"avs","owner":"Zinfidel"},"avro-idl":{"title":"Avro IDL","alias":"avdl","owner":"RunDevelopment"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"bicep":{"title":"Bicep","owner":"johnnyreilly"},"birb":{"title":"Birb","require":"clike","owner":"Calamity210"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"BNF","alias":"rbnf","aliasTitles":{"rbnf":"RBNF"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"bsl":{"title":"BSL (1C:Enterprise)","alias":"oscript","aliasTitles":{"oscript":"OneScript"},"owner":"Diversus23"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cfscript":{"title":"CFScript","require":"clike","alias":"cfc","owner":"mjclemente"},"chaiscript":{"title":"ChaiScript","require":["clike","cpp"],"owner":"RunDevelopment"},"cil":{"title":"CIL","owner":"sbrl"},"clojure":{"title":"Clojure","owner":"troglotit"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"cobol":{"title":"COBOL","owner":"RunDevelopment"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"coq":{"title":"Coq","owner":"RunDevelopment"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"csv":{"title":"CSV","owner":"RunDevelopment"},"cypher":{"title":"Cypher","owner":"RunDevelopment"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dataweave":{"title":"DataWeave","owner":"machaval"},"dax":{"title":"DAX","owner":"peterbud"},"dhall":{"title":"Dhall","owner":"RunDevelopment"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"dot":{"title":"DOT (Graphviz)","alias":"gv","optional":"markup","owner":"RunDevelopment"},"ebnf":{"title":"EBNF","owner":"RunDevelopment"},"editorconfig":{"title":"EditorConfig","owner":"osipxd"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"false":{"title":"False","owner":"edukisto"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"gap":{"title":"GAP (CAS)","owner":"RunDevelopment"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"c","owner":"Golmote"},"gn":{"title":"GN","alias":"gni","owner":"RunDevelopment"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","optional":"markdown","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","alias":"hbs","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"hlsl":{"title":"HLSL","require":"c","owner":"RunDevelopment"},"hoon":{"title":"Hoon","owner":"matildepark"},"http":{"title":"HTTP","optional":["css","javascript","json","markup","uri"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"icu-message-format":{"title":"ICU Message Format","owner":"RunDevelopment"},"idris":{"title":"Idris","alias":"idr","owner":"KeenS","require":"haskell"},"ignore":{"title":".ignore","owner":"osipxd","alias":["gitignore","hgignore","npmignore"],"aliasTitles":{"gitignore":".gitignore","hgignore":".hgignore","npmignore":".npmignore"}},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jexl":{"title":"Jexl","owner":"czosel"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike","typescript"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","alias":"webmanifest","aliasTitles":{"webmanifest":"Web App Manifest"},"owner":"CupOfTea696"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"jsstacktrace":{"title":"JS stack trace","owner":"sbrl"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup","sql"],"owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","alias":["kt","kts"],"aliasTitles":{"kts":"Kotlin Script"},"require":"clike","owner":"Golmote"},"kumir":{"title":"KuMir (КуМир)","alias":"kum","owner":"edukisto"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","require":"markup-templating","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"log":{"title":"Log file","optional":"javastacktrace","owner":"RunDevelopment"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"magma":{"title":"Magma (CAS)","owner":"RunDevelopment"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","optional":"yaml","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"maxscript":{"title":"MAXScript","owner":"RunDevelopment"},"mel":{"title":"MEL","owner":"Golmote"},"mermaid":{"title":"Mermaid","owner":"RunDevelopment"},"mizar":{"title":"Mizar","owner":"Golmote"},"mongodb":{"title":"MongoDB","owner":"airs0urce","require":"javascript"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"naniscript":{"title":"Naninovel Script","owner":"Elringus","alias":"nani"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nevod":{"title":"Nevod","owner":"nezaboodka"},"nginx":{"title":"nginx","owner":"volado"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"openqasm":{"title":"OpenQasm","alias":"qasm","owner":"RunDevelopment"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"psl":{"title":"PATROL Scripting Language","owner":"bertysentry"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":"markup-templating","owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"promql":{"title":"PromQL","owner":"arendjr"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"purebasic":{"title":"PureBasic","require":"clike","alias":"pbfasm","owner":"HeX0R101"},"purescript":{"title":"PureScript","require":"haskell","alias":"purs","owner":"sriharshachilakapati"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"qsharp":{"title":"Q#","require":"clike","alias":"qs","owner":"fedonman"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"racket":{"title":"Racket","require":"scheme","alias":"rkt","owner":"RunDevelopment"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","owner":"RunDevelopment"},"rego":{"title":"Rego","owner":"JordanSh"},"renpy":{"title":"Ren'py","alias":"rpy","owner":"HyuchiaDiego"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","optional":"css-extras","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","alias":["sh-session","shellsession"],"owner":"RunDevelopment"},"smali":{"title":"Smali","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sml":{"title":"SML","alias":"smlnj","aliasTitles":{"smlnj":"SML/NJ"},"owner":"RunDevelopment"},"solidity":{"title":"Solidity (Ethereum)","alias":"sol","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"squirrel":{"title":"Squirrel","require":"clike","owner":"RunDevelopment"},"stan":{"title":"Stan","owner":"RunDevelopment"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","owner":"chrischares"},"systemd":{"title":"Systemd configuration file","owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","vbnet"],"owner":"RunDevelopment"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"typoscript":{"title":"TypoScript","alias":"tsconfig","aliasTitles":{"tsconfig":"TSConfig"},"owner":"dkern"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"uri":{"title":"URI","alias":"url","aliasTitles":{"url":"URL"},"owner":"RunDevelopment"},"v":{"title":"V","require":"clike","owner":"taggon"},"vala":{"title":"Vala","require":"clike","optional":"regex","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":["vb","vba"],"aliasTitles":{"vba":"VBA"},"owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"wolfram":{"title":"Wolfram language","alias":["mathematica","nb","wl"],"aliasTitles":{"mathematica":"Mathematica","nb":"Mathematica Notebook"},"owner":"msollami"},"wren":{"title":"Wren","owner":"clsource"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xml-doc":{"title":"XML doc (.net)","require":"markup","modify":["csharp","fsharp","vbnet"],"owner":"RunDevelopment"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"yang":{"title":"YANG","owner":"RunDevelopment"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword for fine-grained highlighting.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; if (typeof module !== 'undefined' && module.exports) { module.exports = components; } \ No newline at end of file diff --git a/components.json b/components.json index b327593205..a0341b16a5 100644 --- a/components.json +++ b/components.json @@ -1401,6 +1401,10 @@ }, "owner": "msollami" }, + "wren": { + "title": "Wren", + "owner": "clsource" + }, "xeora": { "title": "Xeora", "require": "markup", diff --git a/components/prism-wren.js b/components/prism-wren.js new file mode 100644 index 0000000000..5ce7ea6906 --- /dev/null +++ b/components/prism-wren.js @@ -0,0 +1,100 @@ +// https://wren.io/ + +Prism.languages.wren = { + // Multiline comments in Wren can have nested multiline comments + // Comments: // and /* */ + 'comment': [ + { + // support 3 levels of nesting + // regex: \/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|)*\*\/ + pattern: /\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|\/\*(?:[^*/]|\*(?!\/)|\/(?!\*))*\*\/)*\*\/)*\*\//, + greedy: true + }, + { + pattern: /(^|[^\\:])\/\/.*/, + lookbehind: true, + greedy: true + } + ], + + // Triple quoted strings are multiline but cannot have interpolation (raw strings) + // Based on prism-python.js + 'triple-quoted-string': { + pattern: /"""[\s\S]*?"""/, + greedy: true, + alias: 'string' + }, + + // see below + 'string-literal': null, + + // #!/usr/bin/env wren on the first line + 'hashbang': { + pattern: /^#!\/.+/, + greedy: true, + alias: 'comment' + }, + + // Attributes are special keywords to add meta data to classes + 'attribute': { + // #! attributes are stored in class properties + // #!myvar = true + // #attributes are not stored and dismissed at compilation + pattern: /#!?[ \t\u3000]*\w+/, + alias: 'keyword' + }, + 'class-name': [ + { + // class definition + // class Meta {} + pattern: /(\bclass\s+)\w+/, + lookbehind: true + }, + // A class must always start with an uppercase. + // File.read + /\b[A-Z][a-z\d_]*\b/, + ], + + // A constant can be a variable, class, property or method. Just named in all uppercase letters + 'constant': /\b[A-Z][A-Z\d_]*\b/, + + 'null': { + pattern: /\bnull\b/, + alias: 'keyword' + }, + 'keyword': /\b(?:as|break|class|construct|continue|else|for|foreign|if|import|in|is|return|static|super|this|var|while)\b/, + 'boolean': /\b(?:true|false)\b/, + 'number': /\b(?:0x[\da-f]+|\d+(?:\.\d+)?(?:e[+-]?\d+)?)\b/i, + + // Functions can be Class.method() + 'function': /\b[a-z_]\w*(?=\s*[({])/i, + + 'operator': /<<|>>|[=!<>]=?|&&|\|\||[-+*/%~^&|?:]|\.{2,3}/, + 'punctuation': /[\[\](){}.,;]/, +}; + +Prism.languages.wren['string-literal'] = { + // A single quote string is multiline and can have interpolation (similar to JS backticks ``) + pattern: /(^|[^\\"])"(?:[^\\"%]|\\[\s\S]|%(?!\()|%\((?:[^()]|\((?:[^()]|\([^)]*\))*\))*\))*"/, + lookbehind: true, + greedy: true, + inside: { + 'interpolation': { + // "%(interpolation)" + pattern: /((?:^|[^\\])(?:\\{2})*)%\((?:[^()]|\((?:[^()]|\([^)]*\))*\))*\)/, + lookbehind: true, + inside: { + 'expression': { + pattern: /^(%\()[\s\S]+(?=\)$)/, + lookbehind: true, + inside: Prism.languages.wren + }, + 'interpolation-punctuation': { + pattern: /^%\(|\)$/, + alias: 'punctuation' + }, + } + }, + 'string': /[\s\S]+/ + } +}; diff --git a/components/prism-wren.min.js b/components/prism-wren.min.js new file mode 100644 index 0000000000..09ca7d1e16 --- /dev/null +++ b/components/prism-wren.min.js @@ -0,0 +1 @@ +Prism.languages.wren={comment:[{pattern:/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|\/\*(?:[^*/]|\*(?!\/)|\/(?!\*))*\*\/)*\*\/)*\*\//,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],"triple-quoted-string":{pattern:/"""[\s\S]*?"""/,greedy:!0,alias:"string"},"string-literal":null,hashbang:{pattern:/^#!\/.+/,greedy:!0,alias:"comment"},attribute:{pattern:/#!?[ \t\u3000]*\w+/,alias:"keyword"},"class-name":[{pattern:/(\bclass\s+)\w+/,lookbehind:!0},/\b[A-Z][a-z\d_]*\b/],constant:/\b[A-Z][A-Z\d_]*\b/,null:{pattern:/\bnull\b/,alias:"keyword"},keyword:/\b(?:as|break|class|construct|continue|else|for|foreign|if|import|in|is|return|static|super|this|var|while)\b/,boolean:/\b(?:true|false)\b/,number:/\b(?:0x[\da-f]+|\d+(?:\.\d+)?(?:e[+-]?\d+)?)\b/i,function:/\b[a-z_]\w*(?=\s*[({])/i,operator:/<<|>>|[=!<>]=?|&&|\|\||[-+*/%~^&|?:]|\.{2,3}/,punctuation:/[\[\](){}.,;]/},Prism.languages.wren["string-literal"]={pattern:/(^|[^\\"])"(?:[^\\"%]|\\[\s\S]|%(?!\()|%\((?:[^()]|\((?:[^()]|\([^)]*\))*\))*\))*"/,lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)%\((?:[^()]|\((?:[^()]|\([^)]*\))*\))*\)/,lookbehind:!0,inside:{expression:{pattern:/^(%\()[\s\S]+(?=\)$)/,lookbehind:!0,inside:Prism.languages.wren},"interpolation-punctuation":{pattern:/^%\(|\)$/,alias:"punctuation"}}},string:/[\s\S]+/}}; \ No newline at end of file diff --git a/examples/prism-wren.html b/examples/prism-wren.html new file mode 100644 index 0000000000..bce7637be6 --- /dev/null +++ b/examples/prism-wren.html @@ -0,0 +1,17 @@ +

            Full example

            +
            // Source: https://wren.io/
            +
            +System.print("Hello, world!")
            +
            +class Wren {
            +  flyTo(city) {
            +    System.print("Flying to %(city)")
            +  }
            +}
            +
            +var adjectives = Fiber.new {
            +  ["small", "clean", "fast"].each {|word| Fiber.yield(word) }
            +}
            +
            +while (!adjectives.isDone) System.print(adjectives.call())
            +
            diff --git a/tests/languages/wren/attribute_feature.test b/tests/languages/wren/attribute_feature.test new file mode 100644 index 0000000000..43383abd2b --- /dev/null +++ b/tests/languages/wren/attribute_feature.test @@ -0,0 +1,91 @@ +#hidden = true +class Example {} + +#key +#key = value +#group( + multiple, + lines = true, + lines = 0 +) +class Example { + #test(skip = true, iterations = 32) + doStuff() {} +} + +#doc = "not runtime data" +#!runtimeAccess = true +#!maxIterations = 16 + +---------------------------------------------------- + +[ + ["attribute", "#hidden"], + ["operator", "="], + ["boolean", "true"], + + ["keyword", "class"], + ["class-name", "Example"], + ["punctuation", "{"], + ["punctuation", "}"], + + ["attribute", "#key"], + + ["attribute", "#key"], + ["operator", "="], + " value\r\n", + + ["attribute", "#group"], + ["punctuation", "("], + + "\r\n multiple", + ["punctuation", ","], + + "\r\n lines ", + ["operator", "="], + ["boolean", "true"], + ["punctuation", ","], + + "\r\n lines ", + ["operator", "="], + ["number", "0"], + + ["punctuation", ")"], + + ["keyword", "class"], + ["class-name", "Example"], + ["punctuation", "{"], + + ["attribute", "#test"], + ["punctuation", "("], + "skip ", + ["operator", "="], + ["boolean", "true"], + ["punctuation", ","], + " iterations ", + ["operator", "="], + ["number", "32"], + ["punctuation", ")"], + + ["function", "doStuff"], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", "{"], + ["punctuation", "}"], + + ["punctuation", "}"], + + ["attribute", "#doc"], + ["operator", "="], + ["string-literal", [ + ["string", "\"not runtime data\""] + ]], + + ["attribute", "#!runtimeAccess"], + ["operator", "="], + ["boolean", "true"], + + ["attribute", "#!maxIterations"], + ["operator", "="], + ["number", "16"] +] diff --git a/tests/languages/wren/boolean_feature.test b/tests/languages/wren/boolean_feature.test new file mode 100644 index 0000000000..d342140d7b --- /dev/null +++ b/tests/languages/wren/boolean_feature.test @@ -0,0 +1,9 @@ +true +false + +---------------------------------------------------- + +[ + ["boolean", "true"], + ["boolean", "false"] +] diff --git a/tests/languages/wren/class-name_feature.test b/tests/languages/wren/class-name_feature.test new file mode 100644 index 0000000000..e2e70d94d7 --- /dev/null +++ b/tests/languages/wren/class-name_feature.test @@ -0,0 +1,35 @@ +Foo.bar() + +import "beverages" for Coffee, Tea + +class Foo {} +class foo {} + +---------------------------------------------------- + +[ + ["class-name", "Foo"], + ["punctuation", "."], + ["function", "bar"], + ["punctuation", "("], + ["punctuation", ")"], + + ["keyword", "import"], + ["string-literal", [ + ["string", "\"beverages\""] + ]], + ["keyword", "for"], + ["class-name", "Coffee"], + ["punctuation", ","], + ["class-name", "Tea"], + + ["keyword", "class"], + ["class-name", "Foo"], + ["punctuation", "{"], + ["punctuation", "}"], + + ["keyword", "class"], + ["class-name", "foo"], + ["punctuation", "{"], + ["punctuation", "}"] +] diff --git a/tests/languages/wren/comment_feature.test b/tests/languages/wren/comment_feature.test new file mode 100644 index 0000000000..e68f0796af --- /dev/null +++ b/tests/languages/wren/comment_feature.test @@ -0,0 +1,21 @@ +// comment + +/**/ +/* comment */ + +/* +/* +nested comment +*/ +*/ + +---------------------------------------------------- + +[ + ["comment", "// comment"], + + ["comment", "/**/"], + ["comment", "/* comment */"], + + ["comment", "/*\r\n/*\r\nnested comment\r\n*/\r\n*/"] +] diff --git a/tests/languages/wren/function_feature.test b/tests/languages/wren/function_feature.test new file mode 100644 index 0000000000..ccde12e120 --- /dev/null +++ b/tests/languages/wren/function_feature.test @@ -0,0 +1,19 @@ +foo() + +foo {|x| x * 2} + +---------------------------------------------------- + +[ + ["function", "foo"], ["punctuation", "("], ["punctuation", ")"], + + ["function", "foo"], + ["punctuation", "{"], + ["operator", "|"], + "x", + ["operator", "|"], + " x ", + ["operator", "*"], + ["number", "2"], + ["punctuation", "}"] +] diff --git a/tests/languages/wren/hashbang_feature.test b/tests/languages/wren/hashbang_feature.test new file mode 100644 index 0000000000..cd9e4a669f --- /dev/null +++ b/tests/languages/wren/hashbang_feature.test @@ -0,0 +1,7 @@ +#!/usr/bin/env wren + +---------------------------------------------------- + +[ + ["hashbang", "#!/usr/bin/env wren"] +] diff --git a/tests/languages/wren/keyword_feature.test b/tests/languages/wren/keyword_feature.test new file mode 100644 index 0000000000..23f1ee9007 --- /dev/null +++ b/tests/languages/wren/keyword_feature.test @@ -0,0 +1,45 @@ +as; +break; +class; +construct; +continue; +else; +for; +foreign; +if; +import; +in; +is; +return; +static; +super; +this; +var; +while; + +null + +---------------------------------------------------- + +[ + ["keyword", "as"], ["punctuation", ";"], + ["keyword", "break"], ["punctuation", ";"], + ["keyword", "class"], ["punctuation", ";"], + ["keyword", "construct"], ["punctuation", ";"], + ["keyword", "continue"], ["punctuation", ";"], + ["keyword", "else"], ["punctuation", ";"], + ["keyword", "for"], ["punctuation", ";"], + ["keyword", "foreign"], ["punctuation", ";"], + ["keyword", "if"], ["punctuation", ";"], + ["keyword", "import"], ["punctuation", ";"], + ["keyword", "in"], ["punctuation", ";"], + ["keyword", "is"], ["punctuation", ";"], + ["keyword", "return"], ["punctuation", ";"], + ["keyword", "static"], ["punctuation", ";"], + ["keyword", "super"], ["punctuation", ";"], + ["keyword", "this"], ["punctuation", ";"], + ["keyword", "var"], ["punctuation", ";"], + ["keyword", "while"], ["punctuation", ";"], + + ["null", "null"] +] diff --git a/tests/languages/wren/number_feature.test b/tests/languages/wren/number_feature.test new file mode 100644 index 0000000000..7b34e9f4a9 --- /dev/null +++ b/tests/languages/wren/number_feature.test @@ -0,0 +1,25 @@ +0 +1234 +-5678 +3.14159 +1.0 +-12.34 +0.0314159e02 +0.0314159e+02 +314.159e-02 +0xcaffe2 + +---------------------------------------------------- + +[ + ["number", "0"], + ["number", "1234"], + ["operator", "-"], ["number", "5678"], + ["number", "3.14159"], + ["number", "1.0"], + ["operator", "-"], ["number", "12.34"], + ["number", "0.0314159e02"], + ["number", "0.0314159e+02"], + ["number", "314.159e-02"], + ["number", "0xcaffe2"] +] diff --git a/tests/languages/wren/operator_feature.test b/tests/languages/wren/operator_feature.test new file mode 100644 index 0000000000..3693ebd94b --- /dev/null +++ b/tests/languages/wren/operator_feature.test @@ -0,0 +1,55 @@ +! ~ - +* / % + - +.. ... +<< >> +< <= > >= == != +& ^ | += + +&& || +? : + +1..2 1...3 + +---------------------------------------------------- + +[ + ["operator", "!"], + ["operator", "~"], + ["operator", "-"], + + ["operator", "*"], + ["operator", "/"], + ["operator", "%"], + ["operator", "+"], + ["operator", "-"], + + ["operator", ".."], + ["operator", "..."], + + ["operator", "<<"], + ["operator", ">>"], + + ["operator", "<"], + ["operator", "<="], + ["operator", ">"], + ["operator", ">="], + ["operator", "=="], + ["operator", "!="], + + ["operator", "&"], + ["operator", "^"], + ["operator", "|"], + + ["operator", "="], + + ["operator", "&&"], ["operator", "||"], + ["operator", "?"], ["operator", ":"], + + ["number", "1"], + ["operator", ".."], + ["number", "2"], + ["number", "1"], + ["operator", "..."], + ["number", "3"] +] diff --git a/tests/languages/wren/punctuation_feature.test b/tests/languages/wren/punctuation_feature.test new file mode 100644 index 0000000000..472d052f1b --- /dev/null +++ b/tests/languages/wren/punctuation_feature.test @@ -0,0 +1,17 @@ +( ) [ ] { } +, ; . + +---------------------------------------------------- + +[ + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", "["], + ["punctuation", "]"], + ["punctuation", "{"], + ["punctuation", "}"], + + ["punctuation", ","], + ["punctuation", ";"], + ["punctuation", "."] +] diff --git a/tests/languages/wren/string_feature.test b/tests/languages/wren/string_feature.test new file mode 100644 index 0000000000..acbd2e7acd --- /dev/null +++ b/tests/languages/wren/string_feature.test @@ -0,0 +1,60 @@ +"" +"\"\\" +"foo +bar" + +"""""" +""" +foo +bar +""" +""" + { + "hello": "wren", + "from" : "json" + } +""" + +"foo %(bar)" +"foo * %(1 + 2) ~= bar" + +---------------------------------------------------- + +[ + ["string-literal", [ + ["string", "\"\""] + ]], + ["string-literal", [ + ["string", "\"\\\"\\\\\""] + ]], + ["string-literal", [ + ["string", "\"foo\r\nbar\""] + ]], + + ["triple-quoted-string", "\"\"\"\"\"\""], + ["triple-quoted-string", "\"\"\"\r\nfoo\r\nbar\r\n\"\"\""], + ["triple-quoted-string", "\"\"\"\r\n {\r\n \"hello\": \"wren\",\r\n \"from\" : \"json\"\r\n }\r\n\"\"\""], + + ["string-literal", [ + ["string", "\"foo "], + ["interpolation", [ + ["interpolation-punctuation", "%("], + ["expression", ["bar"]], + ["interpolation-punctuation", ")"] + ]], + ["string", "\""] + ]], + ["string-literal", [ + ["string", "\"foo * "], + ["interpolation", [ + ["interpolation-punctuation", "%("], + ["expression", [ + ["number", "1"], + ["operator", "+"], + ["number", "2"] + ]], + ["interpolation-punctuation", ")"] + ]], + ["string", " ~= bar\""] + ]] +] From 4433ccfc0c2623bcef8b6dd214ffdb55245dbbc9 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Wed, 15 Sep 2021 21:43:55 +0200 Subject: [PATCH 0904/1100] Added support for ASP.NET Razor (#3064) --- components.js | 2 +- components.json | 12 + components/prism-cshtml.js | 183 ++++ components/prism-cshtml.min.js | 1 + examples/prism-cshtml.html | 36 + plugins/autoloader/prism-autoloader.js | 5 + plugins/autoloader/prism-autoloader.min.js | 2 +- plugins/show-language/prism-show-language.js | 2 + .../show-language/prism-show-language.min.js | 2 +- tests/languages/cshtml/block_feature.test | 899 ++++++++++++++++++ .../languages/cshtml/code-block_feature.test | 327 +++++++ tests/languages/cshtml/comment_feature.test | 30 + tests/languages/cshtml/value_feature.test | 346 +++++++ 13 files changed, 1844 insertions(+), 3 deletions(-) create mode 100644 components/prism-cshtml.js create mode 100644 components/prism-cshtml.min.js create mode 100644 examples/prism-cshtml.html create mode 100644 tests/languages/cshtml/block_feature.test create mode 100644 tests/languages/cshtml/code-block_feature.test create mode 100644 tests/languages/cshtml/comment_feature.test create mode 100644 tests/languages/cshtml/value_feature.test diff --git a/components.js b/components.js index 5552bb20ef..864f8ad57e 100644 --- a/components.js +++ b/components.js @@ -1,2 +1,2 @@ -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml","ssml","atom","rss"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","ssml":"SSML","atom":"Atom","rss":"RSS"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","optional":"regex","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"ABNF","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"agda":{"title":"Agda","owner":"xy-ren"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apex":{"title":"Apex","require":["clike","sql"],"owner":"RunDevelopment"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"dkern"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"avisynth":{"title":"AviSynth","alias":"avs","owner":"Zinfidel"},"avro-idl":{"title":"Avro IDL","alias":"avdl","owner":"RunDevelopment"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"bicep":{"title":"Bicep","owner":"johnnyreilly"},"birb":{"title":"Birb","require":"clike","owner":"Calamity210"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"BNF","alias":"rbnf","aliasTitles":{"rbnf":"RBNF"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"bsl":{"title":"BSL (1C:Enterprise)","alias":"oscript","aliasTitles":{"oscript":"OneScript"},"owner":"Diversus23"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cfscript":{"title":"CFScript","require":"clike","alias":"cfc","owner":"mjclemente"},"chaiscript":{"title":"ChaiScript","require":["clike","cpp"],"owner":"RunDevelopment"},"cil":{"title":"CIL","owner":"sbrl"},"clojure":{"title":"Clojure","owner":"troglotit"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"cobol":{"title":"COBOL","owner":"RunDevelopment"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"coq":{"title":"Coq","owner":"RunDevelopment"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"csv":{"title":"CSV","owner":"RunDevelopment"},"cypher":{"title":"Cypher","owner":"RunDevelopment"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dataweave":{"title":"DataWeave","owner":"machaval"},"dax":{"title":"DAX","owner":"peterbud"},"dhall":{"title":"Dhall","owner":"RunDevelopment"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"dot":{"title":"DOT (Graphviz)","alias":"gv","optional":"markup","owner":"RunDevelopment"},"ebnf":{"title":"EBNF","owner":"RunDevelopment"},"editorconfig":{"title":"EditorConfig","owner":"osipxd"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"false":{"title":"False","owner":"edukisto"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"gap":{"title":"GAP (CAS)","owner":"RunDevelopment"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"c","owner":"Golmote"},"gn":{"title":"GN","alias":"gni","owner":"RunDevelopment"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","optional":"markdown","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","alias":"hbs","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"hlsl":{"title":"HLSL","require":"c","owner":"RunDevelopment"},"hoon":{"title":"Hoon","owner":"matildepark"},"http":{"title":"HTTP","optional":["css","javascript","json","markup","uri"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"icu-message-format":{"title":"ICU Message Format","owner":"RunDevelopment"},"idris":{"title":"Idris","alias":"idr","owner":"KeenS","require":"haskell"},"ignore":{"title":".ignore","owner":"osipxd","alias":["gitignore","hgignore","npmignore"],"aliasTitles":{"gitignore":".gitignore","hgignore":".hgignore","npmignore":".npmignore"}},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jexl":{"title":"Jexl","owner":"czosel"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike","typescript"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","alias":"webmanifest","aliasTitles":{"webmanifest":"Web App Manifest"},"owner":"CupOfTea696"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"jsstacktrace":{"title":"JS stack trace","owner":"sbrl"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup","sql"],"owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","alias":["kt","kts"],"aliasTitles":{"kts":"Kotlin Script"},"require":"clike","owner":"Golmote"},"kumir":{"title":"KuMir (КуМир)","alias":"kum","owner":"edukisto"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","require":"markup-templating","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"log":{"title":"Log file","optional":"javastacktrace","owner":"RunDevelopment"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"magma":{"title":"Magma (CAS)","owner":"RunDevelopment"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","optional":"yaml","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"maxscript":{"title":"MAXScript","owner":"RunDevelopment"},"mel":{"title":"MEL","owner":"Golmote"},"mermaid":{"title":"Mermaid","owner":"RunDevelopment"},"mizar":{"title":"Mizar","owner":"Golmote"},"mongodb":{"title":"MongoDB","owner":"airs0urce","require":"javascript"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"naniscript":{"title":"Naninovel Script","owner":"Elringus","alias":"nani"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nevod":{"title":"Nevod","owner":"nezaboodka"},"nginx":{"title":"nginx","owner":"volado"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"openqasm":{"title":"OpenQasm","alias":"qasm","owner":"RunDevelopment"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"psl":{"title":"PATROL Scripting Language","owner":"bertysentry"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":"markup-templating","owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"promql":{"title":"PromQL","owner":"arendjr"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"purebasic":{"title":"PureBasic","require":"clike","alias":"pbfasm","owner":"HeX0R101"},"purescript":{"title":"PureScript","require":"haskell","alias":"purs","owner":"sriharshachilakapati"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"qsharp":{"title":"Q#","require":"clike","alias":"qs","owner":"fedonman"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"racket":{"title":"Racket","require":"scheme","alias":"rkt","owner":"RunDevelopment"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","owner":"RunDevelopment"},"rego":{"title":"Rego","owner":"JordanSh"},"renpy":{"title":"Ren'py","alias":"rpy","owner":"HyuchiaDiego"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","optional":"css-extras","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","alias":["sh-session","shellsession"],"owner":"RunDevelopment"},"smali":{"title":"Smali","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sml":{"title":"SML","alias":"smlnj","aliasTitles":{"smlnj":"SML/NJ"},"owner":"RunDevelopment"},"solidity":{"title":"Solidity (Ethereum)","alias":"sol","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"squirrel":{"title":"Squirrel","require":"clike","owner":"RunDevelopment"},"stan":{"title":"Stan","owner":"RunDevelopment"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","owner":"chrischares"},"systemd":{"title":"Systemd configuration file","owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","vbnet"],"owner":"RunDevelopment"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"typoscript":{"title":"TypoScript","alias":"tsconfig","aliasTitles":{"tsconfig":"TSConfig"},"owner":"dkern"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"uri":{"title":"URI","alias":"url","aliasTitles":{"url":"URL"},"owner":"RunDevelopment"},"v":{"title":"V","require":"clike","owner":"taggon"},"vala":{"title":"Vala","require":"clike","optional":"regex","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":["vb","vba"],"aliasTitles":{"vba":"VBA"},"owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"wolfram":{"title":"Wolfram language","alias":["mathematica","nb","wl"],"aliasTitles":{"mathematica":"Mathematica","nb":"Mathematica Notebook"},"owner":"msollami"},"wren":{"title":"Wren","owner":"clsource"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xml-doc":{"title":"XML doc (.net)","require":"markup","modify":["csharp","fsharp","vbnet"],"owner":"RunDevelopment"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"yang":{"title":"YANG","owner":"RunDevelopment"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword for fine-grained highlighting.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml","ssml","atom","rss"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","ssml":"SSML","atom":"Atom","rss":"RSS"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","optional":"regex","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"ABNF","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"agda":{"title":"Agda","owner":"xy-ren"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apex":{"title":"Apex","require":["clike","sql"],"owner":"RunDevelopment"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"dkern"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"avisynth":{"title":"AviSynth","alias":"avs","owner":"Zinfidel"},"avro-idl":{"title":"Avro IDL","alias":"avdl","owner":"RunDevelopment"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"bicep":{"title":"Bicep","owner":"johnnyreilly"},"birb":{"title":"Birb","require":"clike","owner":"Calamity210"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"BNF","alias":"rbnf","aliasTitles":{"rbnf":"RBNF"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"bsl":{"title":"BSL (1C:Enterprise)","alias":"oscript","aliasTitles":{"oscript":"OneScript"},"owner":"Diversus23"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cfscript":{"title":"CFScript","require":"clike","alias":"cfc","owner":"mjclemente"},"chaiscript":{"title":"ChaiScript","require":["clike","cpp"],"owner":"RunDevelopment"},"cil":{"title":"CIL","owner":"sbrl"},"clojure":{"title":"Clojure","owner":"troglotit"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"cobol":{"title":"COBOL","owner":"RunDevelopment"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"coq":{"title":"Coq","owner":"RunDevelopment"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"csv":{"title":"CSV","owner":"RunDevelopment"},"cypher":{"title":"Cypher","owner":"RunDevelopment"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dataweave":{"title":"DataWeave","owner":"machaval"},"dax":{"title":"DAX","owner":"peterbud"},"dhall":{"title":"Dhall","owner":"RunDevelopment"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"dot":{"title":"DOT (Graphviz)","alias":"gv","optional":"markup","owner":"RunDevelopment"},"ebnf":{"title":"EBNF","owner":"RunDevelopment"},"editorconfig":{"title":"EditorConfig","owner":"osipxd"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"false":{"title":"False","owner":"edukisto"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"gap":{"title":"GAP (CAS)","owner":"RunDevelopment"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"c","owner":"Golmote"},"gn":{"title":"GN","alias":"gni","owner":"RunDevelopment"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","optional":"markdown","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","alias":"hbs","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"hlsl":{"title":"HLSL","require":"c","owner":"RunDevelopment"},"hoon":{"title":"Hoon","owner":"matildepark"},"http":{"title":"HTTP","optional":["css","javascript","json","markup","uri"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"icu-message-format":{"title":"ICU Message Format","owner":"RunDevelopment"},"idris":{"title":"Idris","alias":"idr","owner":"KeenS","require":"haskell"},"ignore":{"title":".ignore","owner":"osipxd","alias":["gitignore","hgignore","npmignore"],"aliasTitles":{"gitignore":".gitignore","hgignore":".hgignore","npmignore":".npmignore"}},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jexl":{"title":"Jexl","owner":"czosel"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike","typescript"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","alias":"webmanifest","aliasTitles":{"webmanifest":"Web App Manifest"},"owner":"CupOfTea696"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"jsstacktrace":{"title":"JS stack trace","owner":"sbrl"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup","sql"],"owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","alias":["kt","kts"],"aliasTitles":{"kts":"Kotlin Script"},"require":"clike","owner":"Golmote"},"kumir":{"title":"KuMir (КуМир)","alias":"kum","owner":"edukisto"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","require":"markup-templating","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"log":{"title":"Log file","optional":"javastacktrace","owner":"RunDevelopment"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"magma":{"title":"Magma (CAS)","owner":"RunDevelopment"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","optional":"yaml","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"maxscript":{"title":"MAXScript","owner":"RunDevelopment"},"mel":{"title":"MEL","owner":"Golmote"},"mermaid":{"title":"Mermaid","owner":"RunDevelopment"},"mizar":{"title":"Mizar","owner":"Golmote"},"mongodb":{"title":"MongoDB","owner":"airs0urce","require":"javascript"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"naniscript":{"title":"Naninovel Script","owner":"Elringus","alias":"nani"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nevod":{"title":"Nevod","owner":"nezaboodka"},"nginx":{"title":"nginx","owner":"volado"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"openqasm":{"title":"OpenQasm","alias":"qasm","owner":"RunDevelopment"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"psl":{"title":"PATROL Scripting Language","owner":"bertysentry"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":"markup-templating","owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"promql":{"title":"PromQL","owner":"arendjr"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"purebasic":{"title":"PureBasic","require":"clike","alias":"pbfasm","owner":"HeX0R101"},"purescript":{"title":"PureScript","require":"haskell","alias":"purs","owner":"sriharshachilakapati"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"qsharp":{"title":"Q#","require":"clike","alias":"qs","owner":"fedonman"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"racket":{"title":"Racket","require":"scheme","alias":"rkt","owner":"RunDevelopment"},"cshtml":{"title":"Razor C#","alias":"razor","require":["markup","csharp"],"optional":["css","css-extras","javascript","js-extras"],"owner":"RunDevelopment"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","owner":"RunDevelopment"},"rego":{"title":"Rego","owner":"JordanSh"},"renpy":{"title":"Ren'py","alias":"rpy","owner":"HyuchiaDiego"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","optional":"css-extras","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","alias":["sh-session","shellsession"],"owner":"RunDevelopment"},"smali":{"title":"Smali","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sml":{"title":"SML","alias":"smlnj","aliasTitles":{"smlnj":"SML/NJ"},"owner":"RunDevelopment"},"solidity":{"title":"Solidity (Ethereum)","alias":"sol","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"squirrel":{"title":"Squirrel","require":"clike","owner":"RunDevelopment"},"stan":{"title":"Stan","owner":"RunDevelopment"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","owner":"chrischares"},"systemd":{"title":"Systemd configuration file","owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","vbnet"],"owner":"RunDevelopment"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"typoscript":{"title":"TypoScript","alias":"tsconfig","aliasTitles":{"tsconfig":"TSConfig"},"owner":"dkern"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"uri":{"title":"URI","alias":"url","aliasTitles":{"url":"URL"},"owner":"RunDevelopment"},"v":{"title":"V","require":"clike","owner":"taggon"},"vala":{"title":"Vala","require":"clike","optional":"regex","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":["vb","vba"],"aliasTitles":{"vba":"VBA"},"owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"wolfram":{"title":"Wolfram language","alias":["mathematica","nb","wl"],"aliasTitles":{"mathematica":"Mathematica","nb":"Mathematica Notebook"},"owner":"msollami"},"wren":{"title":"Wren","owner":"clsource"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xml-doc":{"title":"XML doc (.net)","require":"markup","modify":["csharp","fsharp","vbnet"],"owner":"RunDevelopment"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"yang":{"title":"YANG","owner":"RunDevelopment"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword for fine-grained highlighting.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; if (typeof module !== 'undefined' && module.exports) { module.exports = components; } \ No newline at end of file diff --git a/components.json b/components.json index a0341b16a5..86c0daca32 100644 --- a/components.json +++ b/components.json @@ -1086,6 +1086,18 @@ "alias": "rkt", "owner": "RunDevelopment" }, + "cshtml": { + "title": "Razor C#", + "alias": "razor", + "require": ["markup", "csharp"], + "optional":[ + "css", + "css-extras", + "javascript", + "js-extras" + ], + "owner": "RunDevelopment" + }, "jsx": { "title": "React JSX", "require": ["markup", "javascript"], diff --git a/components/prism-cshtml.js b/components/prism-cshtml.js new file mode 100644 index 0000000000..a917626aa0 --- /dev/null +++ b/components/prism-cshtml.js @@ -0,0 +1,183 @@ +// Docs: +// https://docs.microsoft.com/en-us/aspnet/core/razor-pages/?view=aspnetcore-5.0&tabs=visual-studio +// https://docs.microsoft.com/en-us/aspnet/core/mvc/views/razor?view=aspnetcore-5.0 + +(function (Prism) { + + var commentLike = /\/(?![/*])|\/\/.*[\r\n]|\/\*[^*]*(?:\*(?!\/)[^*]*)*\*\//.source; + var stringLike = + /@(?!")|"(?:[^\r\n\\"]|\\.)*"|@"(?:[^\\"]|""|\\[\s\S])*"(?!")/.source + + '|' + + /'(?:(?:[^\r\n'\\]|\\.|\\[Uux][\da-fA-F]{1,8})'|(?=[^\\](?!')))/.source; + + /** + * Creates a nested pattern where all occurrences of the string `<>` are replaced with the pattern itself. + * + * @param {string} pattern + * @param {number} depthLog2 + * @returns {string} + */ + function nested(pattern, depthLog2) { + for (var i = 0; i < depthLog2; i++) { + pattern = pattern.replace(//g, function () { return '(?:' + pattern + ')'; }); + } + return pattern + .replace(//g, '[^\\s\\S]') + .replace(//g, '(?:' + stringLike + ')') + .replace(//g, '(?:' + commentLike + ')'); + } + + var round = nested(/\((?:[^()'"@/]|||)*\)/.source, 2); + var square = nested(/\[(?:[^\[\]'"@/]|||)*\]/.source, 2); + var curly = nested(/\{(?:[^{}'"@/]|||)*\}/.source, 2); + var angle = nested(/<(?:[^<>'"@/]|||)*>/.source, 2); + + // Note about the above bracket patterns: + // They all ignore HTML expressions that might be in the C# code. This is a problem because HTML (like strings and + // comments) is parsed differently. This is a huge problem because HTML might contain brackets and quotes which + // messes up the bracket and string counting implemented by the above patterns. + // + // This problem is not fixable because 1) HTML expression are highly context sensitive and very difficult to detect + // and 2) they require one capturing group at every nested level. See the `tagRegion` pattern to admire the + // complexity of an HTML expression. + // + // To somewhat alleviate the problem a bit, the patterns for characters (e.g. 'a') is very permissive, it also + // allows invalid characters to support HTML expressions like this:

            That's it!

            . + + var tagAttrs = /(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?/.source; + var tagContent = /(?!\d)[^\s>\/=$<%]+/.source + tagAttrs + /\s*\/?>/.source; + var tagRegion = + /\B@?/.source + + '(?:' + + /<([a-zA-Z][\w:]*)/.source + tagAttrs + /\s*>/.source + + '(?:' + + ( + /[^<]/.source + + '|' + + // all tags that are not the start tag + // eslint-disable-next-line regexp/strict + /<\/?(?!\1\b)/.source + tagContent + + '|' + + // nested start tag + nested( + // eslint-disable-next-line regexp/strict + /<\1/.source + tagAttrs + /\s*>/.source + + '(?:' + + ( + /[^<]/.source + + '|' + + // all tags that are not the start tag + // eslint-disable-next-line regexp/strict + /<\/?(?!\1\b)/.source + tagContent + + '|' + + '' + ) + + ')*' + + // eslint-disable-next-line regexp/strict + /<\/\1\s*>/.source, + 2 + ) + ) + + ')*' + + // eslint-disable-next-line regexp/strict + /<\/\1\s*>/.source + + '|' + + //g,function(){return"(?:"+e+")"});return e.replace(//g,"[^\\s\\S]").replace(//g,'(?:@(?!")|"(?:[^\r\n\\\\"]|\\\\.)*"|@"(?:[^\\\\"]|""|\\\\[^])*"(?!")|'+"'(?:(?:[^\r\n'\\\\]|\\\\.|\\\\[Uux][\\da-fA-F]{1,8})'|(?=[^\\\\](?!'))))").replace(//g,"(?:/(?![/*])|//.*[\r\n]|/\\*[^*]*(?:\\*(?!/)[^*]*)*\\*/)")}var a=s("\\((?:[^()'\"@/]|||)*\\)",2),r=s("\\[(?:[^\\[\\]'\"@/]|||)*\\]",2),t=s("\\{(?:[^{}'\"@/]|||)*\\}",2),n=s("<(?:[^<>'\"@/]|||)*>",2),l="(?:\\s(?:\\s*[^\\s>/=]+(?:\\s*=\\s*(?:\"[^\"]*\"|'[^']*'|[^\\s'\">=]+(?=[\\s>]))|(?=[\\s/>])))+)?",i="(?!\\d)[^\\s>/=$<%]+"+l+"\\s*/?>",o="\\B@?(?:<([a-zA-Z][\\w:]*)"+l+"\\s*>(?:[^<]|(?:[^<]|)*",2)+")*|<"+i+")";e.languages.cshtml=e.languages.extend("markup",{});var g={pattern:/\S[\s\S]*/,alias:"language-csharp",inside:e.languages.insertBefore("csharp","string",{html:{pattern:RegExp(o),greedy:!0,inside:e.languages.cshtml}},{csharp:e.languages.extend("csharp",{})})};e.languages.insertBefore("cshtml","prolog",{"razor-comment":{pattern:/@\*[\s\S]*?\*@/,greedy:!0,alias:"comment"},block:{pattern:RegExp("(^|[^@])@(?:"+[t,"(?:code|functions)\\s*"+t,"(?:for|foreach|lock|switch|using|while)\\s*"+a+"\\s*"+t,"do\\s*"+t+"\\s*while\\s*"+a+"(?:\\s*;)?","try\\s*"+t+"\\s*catch\\s*"+a+"\\s*"+t+"\\s*finally\\s*"+t,"if\\s*"+a+"\\s*"+t+"(?:\\s*else(?:\\s+if\\s*"+a+")?\\s*"+t+")*"].join("|")+")"),lookbehind:!0,greedy:!0,inside:{keyword:/^@\w*/,csharp:g}},directive:{pattern:/^([ \t]*)@(?:addTagHelper|attribute|implements|inherits|inject|layout|model|namespace|page|preservewhitespace|removeTagHelper|section|tagHelperPrefix|using)(?=\s).*/m,lookbehind:!0,greedy:!0,inside:{keyword:/^@\w+/,csharp:g}},value:{pattern:RegExp("(^|[^@])@(?:await\\b\\s*)?(?:\\w+\\b|"+a+")(?:[?!]?\\.\\w+\\b|"+a+"|"+r+"|"+n+a+")*"),lookbehind:!0,greedy:!0,alias:"variable",inside:{keyword:/^@/,csharp:g}},"delegate-operator":{pattern:/(^|[^@])@(?=<)/,lookbehind:!0,alias:"operator"}}),e.languages.razor=e.languages.cshtml}(Prism); \ No newline at end of file diff --git a/examples/prism-cshtml.html b/examples/prism-cshtml.html new file mode 100644 index 0000000000..cc11eeb9ae --- /dev/null +++ b/examples/prism-cshtml.html @@ -0,0 +1,36 @@ +

            Full example

            +
            @* Source: https://docs.microsoft.com/en-us/aspnet/core/razor-pages/?view=aspnetcore-5.0&tabs=visual-studio#the-home-page *@
            +
            +@page
            +@model RazorPagesContacts.Pages.Customers.IndexModel
            +@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
            +
            +<h1>Contacts home page</h1>
            +<form method="post">
            +	<table class="table">
            +		<thead>
            +			<tr>
            +				<th>ID</th>
            +				<th>Name</th>
            +				<th></th>
            +			</tr>
            +		</thead>
            +		<tbody>
            +			@foreach (var contact in Model.Customer)
            +			{
            +				<tr>
            +					<td> @contact.Id  </td>
            +					<td>@contact.Name</td>
            +					<td>
            +						<a asp-page="./Edit" asp-route-id="@contact.Id">Edit</a> |
            +						<button type="submit" asp-page-handler="delete"
            +								asp-route-id="@contact.Id">delete
            +						</button>
            +					</td>
            +				</tr>
            +			}
            +		</tbody>
            +	</table>
            +	<a asp-page="Create">Create New</a>
            +</form>
            +
            diff --git a/plugins/autoloader/prism-autoloader.js b/plugins/autoloader/prism-autoloader.js index fe1b3b0b04..ae93dc13af 100644 --- a/plugins/autoloader/prism-autoloader.js +++ b/plugins/autoloader/prism-autoloader.js @@ -115,6 +115,10 @@ "qml": "javascript", "qore": "clike", "racket": "scheme", + "cshtml": [ + "markup", + "csharp" + ], "jsx": [ "markup", "javascript" @@ -224,6 +228,7 @@ "py": "python", "qs": "qsharp", "rkt": "racket", + "razor": "cshtml", "rpy": "renpy", "robot": "robotframework", "rb": "ruby", diff --git a/plugins/autoloader/prism-autoloader.min.js b/plugins/autoloader/prism-autoloader.min.js index 29790e15d7..6cd311883e 100644 --- a/plugins/autoloader/prism-autoloader.min.js +++ b/plugins/autoloader/prism-autoloader.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof Prism&&"undefined"!=typeof document){var l={javascript:"clike",actionscript:"javascript",apex:["clike","sql"],arduino:"cpp",aspnet:["markup","csharp"],birb:"clike",bison:"c",c:"clike",csharp:"clike",cpp:"c",cfscript:"clike",chaiscript:["clike","cpp"],coffeescript:"javascript",crystal:"ruby","css-extras":"css",d:"clike",dart:"clike",django:"markup-templating",ejs:["javascript","markup-templating"],etlua:["lua","markup-templating"],erb:["ruby","markup-templating"],fsharp:"clike","firestore-security-rules":"clike",flow:"javascript",ftl:"markup-templating",gml:"clike",glsl:"c",go:"clike",groovy:"clike",haml:"ruby",handlebars:"markup-templating",haxe:"clike",hlsl:"c",idris:"haskell",java:"clike",javadoc:["markup","java","javadoclike"],jolie:"clike",jsdoc:["javascript","javadoclike","typescript"],"js-extras":"javascript",json5:"json",jsonp:"json","js-templates":"javascript",kotlin:"clike",latte:["clike","markup-templating","php"],less:"css",lilypond:"scheme",liquid:"markup-templating",markdown:"markup","markup-templating":"markup",mongodb:"javascript",n4js:"javascript",objectivec:"c",opencl:"c",parser:"markup",php:"markup-templating",phpdoc:["php","javadoclike"],"php-extras":"php",plsql:"sql",processing:"clike",protobuf:"clike",pug:["markup","javascript"],purebasic:"clike",purescript:"haskell",qsharp:"clike",qml:"javascript",qore:"clike",racket:"scheme",jsx:["markup","javascript"],tsx:["jsx","typescript"],reason:"clike",ruby:"clike",sass:"css",scss:"css",scala:"java","shell-session":"bash",smarty:"markup-templating",solidity:"clike",soy:"markup-templating",sparql:"turtle",sqf:"clike",squirrel:"clike","t4-cs":["t4-templating","csharp"],"t4-vb":["t4-templating","vbnet"],tap:"yaml",tt2:["clike","markup-templating"],textile:"markup",twig:"markup",typescript:"javascript",v:"clike",vala:"clike",vbnet:"basic",velocity:"markup",wiki:"markup",xeora:"markup","xml-doc":"markup",xquery:"markup"},n={html:"markup",xml:"markup",svg:"markup",mathml:"markup",ssml:"markup",atom:"markup",rss:"markup",js:"javascript",g4:"antlr4",adoc:"asciidoc",avs:"avisynth",avdl:"avro-idl",shell:"bash",shortcode:"bbcode",rbnf:"bnf",oscript:"bsl",cs:"csharp",dotnet:"csharp",cfc:"cfscript",coffee:"coffeescript",conc:"concurnas",jinja2:"django","dns-zone":"dns-zone-file",dockerfile:"docker",gv:"dot",eta:"ejs",xlsx:"excel-formula",xls:"excel-formula",gamemakerlanguage:"gml",gni:"gn",hbs:"handlebars",hs:"haskell",idr:"idris",gitignore:"ignore",hgignore:"ignore",npmignore:"ignore",webmanifest:"json",kt:"kotlin",kts:"kotlin",kum:"kumir",tex:"latex",context:"latex",ly:"lilypond",emacs:"lisp",elisp:"lisp","emacs-lisp":"lisp",md:"markdown",moon:"moonscript",n4jsd:"n4js",nani:"naniscript",objc:"objectivec",qasm:"openqasm",objectpascal:"pascal",px:"pcaxis",pcode:"peoplecode",pq:"powerquery",mscript:"powerquery",pbfasm:"purebasic",purs:"purescript",py:"python",qs:"qsharp",rkt:"racket",rpy:"renpy",robot:"robotframework",rb:"ruby","sh-session":"shell-session",shellsession:"shell-session",smlnj:"sml",sol:"solidity",sln:"solution-file",rq:"sparql",t4:"t4-cs",trig:"turtle",ts:"typescript",tsconfig:"typoscript",uscript:"unrealscript",uc:"unrealscript",url:"uri",vb:"visual-basic",vba:"visual-basic",mathematica:"wolfram",nb:"wolfram",wl:"wolfram",xeoracube:"xeora",yml:"yaml"},p={},e="components/",a=Prism.util.currentScript();if(a){var r=/\bplugins\/autoloader\/prism-autoloader\.(?:min\.)?js(?:\?[^\r\n/]*)?$/i,s=/(^|\/)[\w-]+\.(?:min\.)?js(?:\?[^\r\n/]*)?$/i,i=a.getAttribute("data-autoloader-path");if(null!=i)e=i.trim().replace(/\/?$/,"/");else{var t=a.src;r.test(t)?e=t.replace(r,"components/"):s.test(t)&&(e=t.replace(s,"$1components/"))}}var o=Prism.plugins.autoloader={languages_path:e,use_minified:!0,loadLanguages:m};Prism.hooks.add("complete",function(e){var a=e.element,r=e.language;if(a&&r&&"none"!==r){var s=function(e){var a=(e.getAttribute("data-dependencies")||"").trim();if(!a){var r=e.parentElement;r&&"pre"===r.tagName.toLowerCase()&&(a=(r.getAttribute("data-dependencies")||"").trim())}return a?a.split(/\s*,\s*/g):[]}(a);/^diff-./i.test(r)?(s.push("diff"),s.push(r.substr("diff-".length))):s.push(r),s.every(u)||m(s,function(){Prism.highlightElement(a)})}})}function u(e){if(0<=e.indexOf("!"))return!1;if((e=n[e]||e)in Prism.languages)return!0;var a=p[e];return a&&!a.error&&!1===a.loading}function m(e,a,r){"string"==typeof e&&(e=[e]);var s=e.length,i=0,t=!1;function c(){t||++i===s&&a&&a(e)}0!==s?e.forEach(function(e){!function(a,r,s){var i=0<=a.indexOf("!");function e(){var e=p[a];e||(e=p[a]={callbacks:[]}),e.callbacks.push({success:r,error:s}),!i&&u(a)?k(a,"success"):!i&&e.error?k(a,"error"):!i&&e.loading||(e.loading=!0,e.error=!1,function(e,a,r){var s=document.createElement("script");s.src=e,s.async=!0,s.onload=function(){document.body.removeChild(s),a&&a()},s.onerror=function(){document.body.removeChild(s),r&&r()},document.body.appendChild(s)}(function(e){return o.languages_path+"prism-"+e+(o.use_minified?".min":"")+".js"}(a),function(){e.loading=!1,k(a,"success")},function(){e.loading=!1,e.error=!0,k(a,"error")}))}a=a.replace("!",""),a=n[a]||a;var t=l[a];t&&t.length?m(t,e,s):e()}(e,c,function(){t||(t=!0,r&&r(e))})}):a&&setTimeout(a,0)}function k(e,a){if(p[e]){for(var r=p[e].callbacks,s=0,i=r.length;sName: @person.Name +} + +@if (value % 2 == 0) +{ +

            The value was even.

            +} + +@if (value % 2 == 0) +{ +

            The value was even.

            +} +else if (value >= 1337) +{ +

            The value is large.

            +} +else +{ +

            The value is odd and small.

            +} + +@switch (value) +{ + case 1: +

            The value is 1!

            + break; + case 1337: +

            Your number is 1337!

            + break; + default: +

            Your number wasn't 1 or 1337.

            + break; +} + +@for (var i = 0; i < people.Length; i++) +{ + var person = people[i]; +

            Name: @person.Name

            +

            Age: @person.Age

            +} + +@foreach (var person in people) +{ +

            Name: @person.Name

            +

            Age: @person.Age

            +} + +@{ var i = 0; } +@while (i < people.Length) +{ + var person = people[i]; +

            Name: @person.Name

            +

            Age: @person.Age

            + + i++; +} + +@{ var i = 0; } +@do +{ + var person = people[i]; +

            Name: @person.Name

            +

            Age: @person.Age

            + + i++; +} while (i < people.Length); + +@using (Html.BeginForm()) +{ +
            + Email: + +
            +} + +@try +{ + throw new InvalidOperationException("You did something invalid."); +} +catch (Exception ex) +{ +

            The exception message: @ex.Message

            +} +finally +{ +

            The finally statement.

            +} + +@lock (SomeLock) +{ + // Do critical section work +} + +---------------------------------------------------- + +[ + ["block", [ + ["keyword", "@for"], + ["csharp", [ + ["punctuation", "("], + ["class-name", [ + ["keyword", "var"] + ]], + " i ", + ["operator", "="], + ["number", "0"], + ["punctuation", ";"], + " i ", + ["operator", "<"], + " people", + ["punctuation", "."], + "Length", + ["punctuation", ";"], + " i", + ["operator", "++"], + ["punctuation", ")"], + + ["punctuation", "{"], + + ["class-name", [ + ["keyword", "var"] + ]], + " person ", + ["operator", "="], + " people", + ["punctuation", "["], + "i", + ["punctuation", "]"], + ["punctuation", ";"], + + ["html", [ + ["tag", [ + ["tag", [ + ["punctuation", "<"], + "text" + ]], + ["punctuation", ">"] + ]], + "Name: ", + ["value", [ + ["keyword", "@"], + ["csharp", [ + "person", + ["punctuation", "."], + "Name" + ]] + ]], + ["tag", [ + ["tag", [ + ["punctuation", ""] + ]] + ]], + + ["punctuation", "}"] + ]] + ]], + + ["block", [ + ["keyword", "@if"], + ["csharp", [ + ["punctuation", "("], + ["keyword", "value"], + ["operator", "%"], + ["number", "2"], + ["operator", "=="], + ["number", "0"], + ["punctuation", ")"], + + ["punctuation", "{"], + + ["html", [ + ["tag", [ + ["tag", [ + ["punctuation", "<"], + "p" + ]], + ["punctuation", ">"] + ]], + "The value was even.", + ["tag", [ + ["tag", [ + ["punctuation", ""] + ]] + ]], + + ["punctuation", "}"] + ]] + ]], + + ["block", [ + ["keyword", "@if"], + ["csharp", [ + ["punctuation", "("], + ["keyword", "value"], + ["operator", "%"], + ["number", "2"], + ["operator", "=="], + ["number", "0"], + ["punctuation", ")"], + + ["punctuation", "{"], + + ["html", [ + ["tag", [ + ["tag", [ + ["punctuation", "<"], + "p" + ]], + ["punctuation", ">"] + ]], + "The value was even.", + ["tag", [ + ["tag", [ + ["punctuation", ""] + ]] + ]], + + ["punctuation", "}"], + + ["keyword", "else"], + ["keyword", "if"], + ["punctuation", "("], + ["keyword", "value"], + ["operator", ">="], + ["number", "1337"], + ["punctuation", ")"], + + ["punctuation", "{"], + + ["html", [ + ["tag", [ + ["tag", [ + ["punctuation", "<"], + "p" + ]], + ["punctuation", ">"] + ]], + "The value is large.", + ["tag", [ + ["tag", [ + ["punctuation", ""] + ]] + ]], + + ["punctuation", "}"], + + ["keyword", "else"], + + ["punctuation", "{"], + + ["html", [ + ["tag", [ + ["tag", [ + ["punctuation", "<"], + "p" + ]], + ["punctuation", ">"] + ]], + "The value is odd and small.", + ["tag", [ + ["tag", [ + ["punctuation", ""] + ]] + ]], + + ["punctuation", "}"] + ]] + ]], + + ["block", [ + ["keyword", "@switch"], + ["csharp", [ + ["punctuation", "("], + ["keyword", "value"], + ["punctuation", ")"], + + ["punctuation", "{"], + + ["keyword", "case"], + ["number", "1"], + ["punctuation", ":"], + + ["html", [ + ["tag", [ + ["tag", [ + ["punctuation", "<"], + "p" + ]], + ["punctuation", ">"] + ]], + "The value is 1!", + ["tag", [ + ["tag", [ + ["punctuation", ""] + ]] + ]], + + ["keyword", "break"], + ["punctuation", ";"], + + ["keyword", "case"], + ["number", "1337"], + ["punctuation", ":"], + + ["html", [ + ["tag", [ + ["tag", [ + ["punctuation", "<"], + "p" + ]], + ["punctuation", ">"] + ]], + "Your number is 1337!", + ["tag", [ + ["tag", [ + ["punctuation", ""] + ]] + ]], + + ["keyword", "break"], + ["punctuation", ";"], + + ["keyword", "default"], + ["punctuation", ":"], + + ["html", [ + ["tag", [ + ["tag", [ + ["punctuation", "<"], + "p" + ]], + ["punctuation", ">"] + ]], + "Your number wasn't 1 or 1337.", + ["tag", [ + ["tag", [ + ["punctuation", ""] + ]] + ]], + + ["keyword", "break"], + ["punctuation", ";"], + + ["punctuation", "}"] + ]] + ]], + + ["block", [ + ["keyword", "@for"], + ["csharp", [ + ["punctuation", "("], + ["class-name", [ + ["keyword", "var"] + ]], + " i ", + ["operator", "="], + ["number", "0"], + ["punctuation", ";"], + " i ", + ["operator", "<"], + " people", + ["punctuation", "."], + "Length", + ["punctuation", ";"], + " i", + ["operator", "++"], + ["punctuation", ")"], + + ["punctuation", "{"], + + ["class-name", [ + ["keyword", "var"] + ]], + " person ", + ["operator", "="], + " people", + ["punctuation", "["], + "i", + ["punctuation", "]"], + ["punctuation", ";"], + + ["html", [ + ["tag", [ + ["tag", [ + ["punctuation", "<"], + "p" + ]], + ["punctuation", ">"] + ]], + "Name: ", + ["value", [ + ["keyword", "@"], + ["csharp", [ + "person", + ["punctuation", "."], + "Name" + ]] + ]], + ["tag", [ + ["tag", [ + ["punctuation", ""] + ]] + ]], + + ["html", [ + ["tag", [ + ["tag", [ + ["punctuation", "<"], + "p" + ]], + ["punctuation", ">"] + ]], + "Age: ", + ["value", [ + ["keyword", "@"], + ["csharp", [ + "person", + ["punctuation", "."], + "Age" + ]] + ]], + ["tag", [ + ["tag", [ + ["punctuation", ""] + ]] + ]], + + ["punctuation", "}"] + ]] + ]], + + ["block", [ + ["keyword", "@foreach"], + ["csharp", [ + ["punctuation", "("], + ["class-name", [ + ["keyword", "var"] + ]], + " person ", + ["keyword", "in"], + " people", + ["punctuation", ")"], + + ["punctuation", "{"], + + ["html", [ + ["tag", [ + ["tag", [ + ["punctuation", "<"], + "p" + ]], + ["punctuation", ">"] + ]], + "Name: ", + ["value", [ + ["keyword", "@"], + ["csharp", [ + "person", + ["punctuation", "."], + "Name" + ]] + ]], + ["tag", [ + ["tag", [ + ["punctuation", ""] + ]] + ]], + + ["html", [ + ["tag", [ + ["tag", [ + ["punctuation", "<"], + "p" + ]], + ["punctuation", ">"] + ]], + "Age: ", + ["value", [ + ["keyword", "@"], + ["csharp", [ + "person", + ["punctuation", "."], + "Age" + ]] + ]], + ["tag", [ + ["tag", [ + ["punctuation", ""] + ]] + ]], + + ["punctuation", "}"] + ]] + ]], + + ["block", [ + ["keyword", "@"], + ["csharp", [ + ["punctuation", "{"], + ["class-name", [ + ["keyword", "var"] + ]], + " i ", + ["operator", "="], + ["number", "0"], + ["punctuation", ";"], + ["punctuation", "}"] + ]] + ]], + + ["block", [ + ["keyword", "@while"], + ["csharp", [ + ["punctuation", "("], + "i ", + ["operator", "<"], + " people", + ["punctuation", "."], + "Length", + ["punctuation", ")"], + + ["punctuation", "{"], + + ["class-name", [ + ["keyword", "var"] + ]], + " person ", + ["operator", "="], + " people", + ["punctuation", "["], + "i", + ["punctuation", "]"], + ["punctuation", ";"], + + ["html", [ + ["tag", [ + ["tag", [ + ["punctuation", "<"], + "p" + ]], + ["punctuation", ">"] + ]], + "Name: ", + ["value", [ + ["keyword", "@"], + ["csharp", [ + "person", + ["punctuation", "."], + "Name" + ]] + ]], + ["tag", [ + ["tag", [ + ["punctuation", ""] + ]] + ]], + + ["html", [ + ["tag", [ + ["tag", [ + ["punctuation", "<"], + "p" + ]], + ["punctuation", ">"] + ]], + "Age: ", + ["value", [ + ["keyword", "@"], + ["csharp", [ + "person", + ["punctuation", "."], + "Age" + ]] + ]], + ["tag", [ + ["tag", [ + ["punctuation", ""] + ]] + ]], + + "\r\n\r\n i", ["operator", "++"], ["punctuation", ";"], + ["punctuation", "}"] + ]] + ]], + + ["block", [ + ["keyword", "@"], + ["csharp", [ + ["punctuation", "{"], + ["class-name", [ + ["keyword", "var"] + ]], + " i ", + ["operator", "="], + ["number", "0"], + ["punctuation", ";"], + ["punctuation", "}"] + ]] + ]], + + ["block", [ + ["keyword", "@do"], + + ["csharp", [ + ["punctuation", "{"], + + ["class-name", [ + ["keyword", "var"] + ]], + " person ", + ["operator", "="], + " people", + ["punctuation", "["], + "i", + ["punctuation", "]"], + ["punctuation", ";"], + + ["html", [ + ["tag", [ + ["tag", [ + ["punctuation", "<"], + "p" + ]], + ["punctuation", ">"] + ]], + "Name: ", + ["value", [ + ["keyword", "@"], + ["csharp", [ + "person", + ["punctuation", "."], + "Name" + ]] + ]], + ["tag", [ + ["tag", [ + ["punctuation", ""] + ]] + ]], + + ["html", [ + ["tag", [ + ["tag", [ + ["punctuation", "<"], + "p" + ]], + ["punctuation", ">"] + ]], + "Age: ", + ["value", [ + ["keyword", "@"], + ["csharp", [ + "person", + ["punctuation", "."], + "Age" + ]] + ]], + ["tag", [ + ["tag", [ + ["punctuation", ""] + ]] + ]], + + "\r\n\r\n i", + ["operator", "++"], + ["punctuation", ";"], + + ["punctuation", "}"], + ["keyword", "while"], + ["punctuation", "("], + "i ", + ["operator", "<"], + " people", + ["punctuation", "."], + "Length", + ["punctuation", ")"], + ["punctuation", ";"] + ]] + ]], + + ["block", [ + ["keyword", "@using"], + ["csharp", [ + ["punctuation", "("], + "Html", + ["punctuation", "."], + ["function", "BeginForm"], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", ")"], + + ["punctuation", "{"], + + ["html", [ + ["tag", [ + ["tag", [ + ["punctuation", "<"], + "div" + ]], + ["punctuation", ">"] + ]], + + "\r\n Email: ", + ["tag", [ + ["tag", [ + ["punctuation", "<"], + "input" + ]], + ["attr-name", ["type"]], + ["attr-value", [ + ["punctuation", "="], + ["punctuation", "\""], + "email", + ["punctuation", "\""] + ]], + ["attr-name", ["id"]], + ["attr-value", [ + ["punctuation", "="], + ["punctuation", "\""], + "Email", + ["punctuation", "\""] + ]], + ["attr-name", ["value"]], + ["attr-value", [ + ["punctuation", "="], + ["punctuation", "\""], + ["punctuation", "\""] + ]], + ["punctuation", ">"] + ]], + + ["tag", [ + ["tag", [ + ["punctuation", "<"], + "button" + ]], + ["punctuation", ">"] + ]], + "Register", + ["tag", [ + ["tag", [ + ["punctuation", ""] + ]], + + ["tag", [ + ["tag", [ + ["punctuation", ""] + ]] + ]], + + ["punctuation", "}"] + ]] + ]], + + ["block", [ + ["keyword", "@try"], + + ["csharp", [ + ["punctuation", "{"], + + ["keyword", "throw"], + ["keyword", "new"], + ["constructor-invocation", ["InvalidOperationException"]], + ["punctuation", "("], + ["string", "\"You did something invalid.\""], + ["punctuation", ")"], + ["punctuation", ";"], + + ["punctuation", "}"], + + ["keyword", "catch"], + ["punctuation", "("], + ["class-name", ["Exception"]], + " ex", + ["punctuation", ")"], + + ["punctuation", "{"], + + ["html", [ + ["tag", [ + ["tag", [ + ["punctuation", "<"], + "p" + ]], + ["punctuation", ">"] + ]], + "The exception message: ", + ["value", [ + ["keyword", "@"], + ["csharp", [ + "ex", + ["punctuation", "."], + "Message" + ]] + ]], + ["tag", [ + ["tag", [ + ["punctuation", ""] + ]] + ]], + + ["punctuation", "}"], + + ["keyword", "finally"], + + ["punctuation", "{"], + + ["html", [ + ["tag", [ + ["tag", [ + ["punctuation", "<"], + "p" + ]], + ["punctuation", ">"] + ]], + "The finally statement.", + ["tag", [ + ["tag", [ + ["punctuation", ""] + ]] + ]], + + ["punctuation", "}"] + ]] + ]], + + ["block", [ + ["keyword", "@lock"], + ["csharp", [ + ["punctuation", "("], "SomeLock", ["punctuation", ")"], + ["punctuation", "{"], + ["comment", "// Do critical section work"], + ["punctuation", "}"] + ]] + ]] +] diff --git a/tests/languages/cshtml/code-block_feature.test b/tests/languages/cshtml/code-block_feature.test new file mode 100644 index 0000000000..469d79c616 --- /dev/null +++ b/tests/languages/cshtml/code-block_feature.test @@ -0,0 +1,327 @@ +@{ + var quote = "The future depends on what you do today. - Mahatma Gandhi"; +} + +

            @quote

            + +@{ + quote = "Hate cannot drive out hate, only love can do that. - Martin Luther King, Jr."; +} + +

            @quote

            + +@{ + void RenderName(string name) + { +

            Name: @name

            + } + + RenderName("Mahatma Gandhi"); + RenderName("Martin Luther King, Jr."); +} + +@{ + var inCSharp = true; +

            Now in HTML, was in C# @inCSharp

            +} + +@{ + Func petTemplate = @

            You have a pet named @item.Name.

            ; + + var pets = new List + { + new Pet { Name = "Rin Tin Tin" }, + new Pet { Name = "Mr. Bigglesworth" }, + new Pet { Name = "K-9" } + }; +} + +---------------------------------------------------- + +[ + ["block", [ + ["keyword", "@"], + ["csharp", [ + ["punctuation", "{"], + + ["class-name", [ + ["keyword", "var"] + ]], + " quote ", + ["operator", "="], + ["string", "\"The future depends on what you do today. - Mahatma Gandhi\""], + ["punctuation", ";"], + + ["punctuation", "}"] + ]] + ]], + + ["tag", [ + ["tag", [ + ["punctuation", "<"], + "p" + ]], + ["punctuation", ">"] + ]], + ["value", [ + ["keyword", "@"], + ["csharp", ["quote"]] + ]], + ["tag", [ + ["tag", [ + ["punctuation", ""] + ]], + + ["block", [ + ["keyword", "@"], + ["csharp", [ + ["punctuation", "{"], + + "\r\n quote ", + ["operator", "="], + ["string", "\"Hate cannot drive out hate, only love can do that. - Martin Luther King, Jr.\""], + ["punctuation", ";"], + + ["punctuation", "}"] + ]] + ]], + + ["tag", [ + ["tag", [ + ["punctuation", "<"], + "p" + ]], + ["punctuation", ">"] + ]], + ["value", [ + ["keyword", "@"], + ["csharp", ["quote"]] + ]], + ["tag", [ + ["tag", [ + ["punctuation", ""] + ]], + + ["block", [ + ["keyword", "@"], + ["csharp", [ + ["punctuation", "{"], + + ["return-type", [ + ["keyword", "void"] + ]], + ["function", "RenderName"], + ["punctuation", "("], + ["class-name", [ + ["keyword", "string"] + ]], + " name", + ["punctuation", ")"], + + ["punctuation", "{"], + + ["html", [ + ["tag", [ + ["tag", [ + ["punctuation", "<"], + "p" + ]], + ["punctuation", ">"] + ]], + "Name: ", + ["tag", [ + ["tag", [ + ["punctuation", "<"], + "strong" + ]], + ["punctuation", ">"] + ]], + ["value", [ + ["keyword", "@"], + ["csharp", ["name"]] + ]], + ["tag", [ + ["tag", [ + ["punctuation", ""] + ]], + ["tag", [ + ["tag", [ + ["punctuation", ""] + ]] + ]], + + ["punctuation", "}"], + + ["function", "RenderName"], + ["punctuation", "("], + ["string", "\"Mahatma Gandhi\""], + ["punctuation", ")"], + ["punctuation", ";"], + + ["function", "RenderName"], + ["punctuation", "("], + ["string", "\"Martin Luther King, Jr.\""], + ["punctuation", ")"], + ["punctuation", ";"], + + ["punctuation", "}"] + ]] + ]], + + ["block", [ + ["keyword", "@"], + ["csharp", [ + ["punctuation", "{"], + + ["class-name", [ + ["keyword", "var"] + ]], + " inCSharp ", + ["operator", "="], + ["boolean", "true"], + ["punctuation", ";"], + + ["html", [ + ["tag", [ + ["tag", [ + ["punctuation", "<"], + "p" + ]], + ["punctuation", ">"] + ]], + "Now in HTML, was in C# ", + ["value", [ + ["keyword", "@"], + ["csharp", ["inCSharp"]] + ]], + ["tag", [ + ["tag", [ + ["punctuation", ""] + ]] + ]], + + ["punctuation", "}"] + ]] + ]], + + ["block", [ + ["keyword", "@"], + ["csharp", [ + ["punctuation", "{"], + + ["class-name", [ + "Func", + ["punctuation", "<"], + ["keyword", "dynamic"], + ["punctuation", ","], + ["keyword", "object"], + ["punctuation", ">"] + ]], + " petTemplate ", + ["operator", "="], + ["html", [ + ["delegate-operator", "@"], + ["tag", [ + ["tag", [ + ["punctuation", "<"], + "p" + ]], + ["punctuation", ">"] + ]], + "You have a pet named ", + ["tag", [ + ["tag", [ + ["punctuation", "<"], + "strong" + ]], + ["punctuation", ">"] + ]], + ["value", [ + ["keyword", "@"], + ["csharp", [ + "item", + ["punctuation", "."], + "Name" + ]] + ]], + ["tag", [ + ["tag", [ + ["punctuation", ""] + ]], + ".", + ["tag", [ + ["tag", [ + ["punctuation", ""] + ]] + ]], + ["punctuation", ";"], + + ["class-name", [ + ["keyword", "var"] + ]], + " pets ", + ["operator", "="], + ["keyword", "new"], + ["constructor-invocation", [ + "List", + ["punctuation", "<"], + "Pet", + ["punctuation", ">"] + ]], + + ["punctuation", "{"], + + ["keyword", "new"], + ["constructor-invocation", ["Pet"]], + ["punctuation", "{"], + " Name ", + ["operator", "="], + ["string", "\"Rin Tin Tin\""], + ["punctuation", "}"], + ["punctuation", ","], + + ["keyword", "new"], + ["constructor-invocation", ["Pet"]], + ["punctuation", "{"], + " Name ", + ["operator", "="], + ["string", "\"Mr. Bigglesworth\""], + ["punctuation", "}"], + ["punctuation", ","], + + ["keyword", "new"], + ["constructor-invocation", ["Pet"]], + ["punctuation", "{"], + " Name ", + ["operator", "="], + ["string", "\"K-9\""], + ["punctuation", "}"], + + ["punctuation", "}"], + ["punctuation", ";"], + + ["punctuation", "}"] + ]] + ]] +] diff --git a/tests/languages/cshtml/comment_feature.test b/tests/languages/cshtml/comment_feature.test new file mode 100644 index 0000000000..a3eb706dc7 --- /dev/null +++ b/tests/languages/cshtml/comment_feature.test @@ -0,0 +1,30 @@ +@{ + /* C# comment */ + // Another C# comment +} + + +@* + @{ + /* C# comment */ + // Another C# comment + } + +*@ + +---------------------------------------------------- + +[ + ["block", [ + ["keyword", "@"], + ["csharp", [ + ["punctuation", "{"], + ["comment", "/* C# comment */"], + ["comment", "// Another C# comment"], + ["punctuation", "}"] + ]] + ]], + ["comment", ""], + + ["razor-comment", "@*\r\n @{\r\n /* C# comment */\r\n // Another C# comment\r\n }\r\n \r\n*@"] +] diff --git a/tests/languages/cshtml/value_feature.test b/tests/languages/cshtml/value_feature.test new file mode 100644 index 0000000000..4e5848295f --- /dev/null +++ b/tests/languages/cshtml/value_feature.test @@ -0,0 +1,346 @@ +

            @@Username

            +

            @Username

            + +

            @DateTime.Now

            +

            @DateTime.IsLeapYear(2016)

            + +

            @await DoSomething("hello", "world")

            + +

            @GenericMethod()

            + +

            Last week this time: @(DateTime.Now - TimeSpan.FromDays(7))

            +

            Last week: @DateTime.Now - TimeSpan.FromDays(7)

            +

            Last week: 7/7/2016 4:39:52 PM - TimeSpan.FromDays(7)

            + +@{ + var joe = new Person("Joe", 33); +} + +

            Age@(joe.Age)

            + +

            @(GenericMethod())

            + +@("Hello World") + +@Html.Raw("Hello World") + +---------------------------------------------------- + +[ + ["tag", [ + ["tag", [ + ["punctuation", "<"], + "p" + ]], + ["punctuation", ">"] + ]], + "@@Username", + ["tag", [ + ["tag", [ + ["punctuation", ""] + ]], + + ["tag", [ + ["tag", [ + ["punctuation", "<"], + "p" + ]], + ["punctuation", ">"] + ]], + ["value", [ + ["keyword", "@"], + ["csharp", ["Username"]] + ]], + ["tag", [ + ["tag", [ + ["punctuation", ""] + ]], + + ["tag", [ + ["tag", [ + ["punctuation", "<"], + "p" + ]], + ["punctuation", ">"] + ]], + ["value", [ + ["keyword", "@"], + ["csharp", [ + "DateTime", + ["punctuation", "."], + "Now" + ]] + ]], + ["tag", [ + ["tag", [ + ["punctuation", ""] + ]], + + ["tag", [ + ["tag", [ + ["punctuation", "<"], + "p" + ]], + ["punctuation", ">"] + ]], + ["value", [ + ["keyword", "@"], + ["csharp", [ + "DateTime", + ["punctuation", "."], + ["function", "IsLeapYear"], + ["punctuation", "("], + ["number", "2016"], + ["punctuation", ")"] + ]] + ]], + ["tag", [ + ["tag", [ + ["punctuation", ""] + ]], + + ["tag", [ + ["tag", [ + ["punctuation", "<"], + "p" + ]], + ["punctuation", ">"] + ]], + ["value", [ + ["keyword", "@"], + ["csharp", [ + ["keyword", "await"], + ["function", "DoSomething"], + ["punctuation", "("], + ["string", "\"hello\""], + ["punctuation", ","], + ["string", "\"world\""], + ["punctuation", ")"] + ]] + ]], + ["tag", [ + ["tag", [ + ["punctuation", ""] + ]], + + ["tag", [ + ["tag", [ + ["punctuation", "<"], + "p" + ]], + ["punctuation", ">"] + ]], + ["value", [ + ["keyword", "@"], + ["csharp", [ + ["generic-method", [ + ["function", "GenericMethod"], + ["generic", [ + ["punctuation", "<"], + ["keyword", "int"], + ["punctuation", ">"] + ]] + ]], + ["punctuation", "("], + ["punctuation", ")"] + ]] + ]], + ["tag", [ + ["tag", [ + ["punctuation", ""] + ]], + + ["tag", [ + ["tag", [ + ["punctuation", "<"], + "p" + ]], + ["punctuation", ">"] + ]], + "Last week this time: ", + ["value", [ + ["keyword", "@"], + ["csharp", [ + ["punctuation", "("], + "DateTime", + ["punctuation", "."], + "Now ", + ["operator", "-"], + " TimeSpan", + ["punctuation", "."], + ["function", "FromDays"], + ["punctuation", "("], + ["number", "7"], + ["punctuation", ")"], + ["punctuation", ")"] + ]] + ]], + ["tag", [ + ["tag", [ + ["punctuation", ""] + ]], + + ["tag", [ + ["tag", [ + ["punctuation", "<"], + "p" + ]], + ["punctuation", ">"] + ]], + "Last week: ", + ["value", [ + ["keyword", "@"], + ["csharp", [ + "DateTime", + ["punctuation", "."], + "Now" + ]] + ]], + " - TimeSpan.FromDays(7)", + ["tag", [ + ["tag", [ + ["punctuation", ""] + ]], + + ["tag", [ + ["tag", [ + ["punctuation", "<"], + "p" + ]], + ["punctuation", ">"] + ]], + "Last week: 7/7/2016 4:39:52 PM - TimeSpan.FromDays(7)", + ["tag", [ + ["tag", [ + ["punctuation", ""] + ]], + + ["block", [ + ["keyword", "@"], + ["csharp", [ + ["punctuation", "{"], + + ["class-name", [ + ["keyword", "var"] + ]], + " joe ", + ["operator", "="], + ["keyword", "new"], + ["constructor-invocation", ["Person"]], + ["punctuation", "("], + ["string", "\"Joe\""], + ["punctuation", ","], + ["number", "33"], + ["punctuation", ")"], + ["punctuation", ";"], + + ["punctuation", "}"] + ]] + ]], + + ["tag", [ + ["tag", [ + ["punctuation", "<"], + "p" + ]], + ["punctuation", ">"] + ]], + "Age", + ["value", [ + ["keyword", "@"], + ["csharp", [ + ["punctuation", "("], + "joe", + ["punctuation", "."], + "Age", + ["punctuation", ")"] + ]] + ]], + ["tag", [ + ["tag", [ + ["punctuation", ""] + ]], + + ["tag", [ + ["tag", [ + ["punctuation", "<"], + "p" + ]], + ["punctuation", ">"] + ]], + ["value", [ + ["keyword", "@"], + ["csharp", [ + ["punctuation", "("], + ["generic-method", [ + ["function", "GenericMethod"], + ["generic", [ + ["punctuation", "<"], + ["keyword", "int"], + ["punctuation", ">"] + ]] + ]], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", ")"] + ]] + ]], + ["tag", [ + ["tag", [ + ["punctuation", ""] + ]], + + ["value", [ + ["keyword", "@"], + ["csharp", [ + ["punctuation", "("], + ["string", "\"Hello World\""], + ["punctuation", ")"] + ]] + ]], + + ["value", [ + ["keyword", "@"], + ["csharp", [ + "Html", + ["punctuation", "."], + ["function", "Raw"], + ["punctuation", "("], + ["string", "\"Hello World\""], + ["punctuation", ")"] + ]] + ]] +] From e008ea056d5dac4c879bd89f41ec73f0ab7cda99 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Wed, 15 Sep 2021 21:46:45 +0200 Subject: [PATCH 0905/1100] Added support for Kusto (#3068) --- components.js | 2 +- components.json | 4 + components/prism-kusto.js | 44 ++++++ components/prism-kusto.min.js | 1 + examples/prism-kusto.html | 8 + tests/languages/kusto/boolean_feature.test | 24 +++ tests/languages/kusto/class-name_feature.test | 25 +++ tests/languages/kusto/command_feature.test | 13 ++ tests/languages/kusto/comment_feature.test | 7 + tests/languages/kusto/datetime_feature.test | 61 ++++++++ tests/languages/kusto/function_feature.test | 9 ++ tests/languages/kusto/keyword_feature.test | 145 ++++++++++++++++++ tests/languages/kusto/number_feature.test | 41 +++++ tests/languages/kusto/operator_feature.test | 33 ++++ .../languages/kusto/punctuation_feature.test | 18 +++ tests/languages/kusto/string_feature.test | 82 ++++++++++ tests/languages/kusto/verb_feature.test | 39 +++++ 17 files changed, 555 insertions(+), 1 deletion(-) create mode 100644 components/prism-kusto.js create mode 100644 components/prism-kusto.min.js create mode 100644 examples/prism-kusto.html create mode 100644 tests/languages/kusto/boolean_feature.test create mode 100644 tests/languages/kusto/class-name_feature.test create mode 100644 tests/languages/kusto/command_feature.test create mode 100644 tests/languages/kusto/comment_feature.test create mode 100644 tests/languages/kusto/datetime_feature.test create mode 100644 tests/languages/kusto/function_feature.test create mode 100644 tests/languages/kusto/keyword_feature.test create mode 100644 tests/languages/kusto/number_feature.test create mode 100644 tests/languages/kusto/operator_feature.test create mode 100644 tests/languages/kusto/punctuation_feature.test create mode 100644 tests/languages/kusto/string_feature.test create mode 100644 tests/languages/kusto/verb_feature.test diff --git a/components.js b/components.js index 864f8ad57e..71effa5499 100644 --- a/components.js +++ b/components.js @@ -1,2 +1,2 @@ -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml","ssml","atom","rss"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","ssml":"SSML","atom":"Atom","rss":"RSS"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","optional":"regex","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"ABNF","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"agda":{"title":"Agda","owner":"xy-ren"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apex":{"title":"Apex","require":["clike","sql"],"owner":"RunDevelopment"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"dkern"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"avisynth":{"title":"AviSynth","alias":"avs","owner":"Zinfidel"},"avro-idl":{"title":"Avro IDL","alias":"avdl","owner":"RunDevelopment"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"bicep":{"title":"Bicep","owner":"johnnyreilly"},"birb":{"title":"Birb","require":"clike","owner":"Calamity210"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"BNF","alias":"rbnf","aliasTitles":{"rbnf":"RBNF"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"bsl":{"title":"BSL (1C:Enterprise)","alias":"oscript","aliasTitles":{"oscript":"OneScript"},"owner":"Diversus23"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cfscript":{"title":"CFScript","require":"clike","alias":"cfc","owner":"mjclemente"},"chaiscript":{"title":"ChaiScript","require":["clike","cpp"],"owner":"RunDevelopment"},"cil":{"title":"CIL","owner":"sbrl"},"clojure":{"title":"Clojure","owner":"troglotit"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"cobol":{"title":"COBOL","owner":"RunDevelopment"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"coq":{"title":"Coq","owner":"RunDevelopment"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"csv":{"title":"CSV","owner":"RunDevelopment"},"cypher":{"title":"Cypher","owner":"RunDevelopment"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dataweave":{"title":"DataWeave","owner":"machaval"},"dax":{"title":"DAX","owner":"peterbud"},"dhall":{"title":"Dhall","owner":"RunDevelopment"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"dot":{"title":"DOT (Graphviz)","alias":"gv","optional":"markup","owner":"RunDevelopment"},"ebnf":{"title":"EBNF","owner":"RunDevelopment"},"editorconfig":{"title":"EditorConfig","owner":"osipxd"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"false":{"title":"False","owner":"edukisto"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"gap":{"title":"GAP (CAS)","owner":"RunDevelopment"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"c","owner":"Golmote"},"gn":{"title":"GN","alias":"gni","owner":"RunDevelopment"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","optional":"markdown","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","alias":"hbs","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"hlsl":{"title":"HLSL","require":"c","owner":"RunDevelopment"},"hoon":{"title":"Hoon","owner":"matildepark"},"http":{"title":"HTTP","optional":["css","javascript","json","markup","uri"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"icu-message-format":{"title":"ICU Message Format","owner":"RunDevelopment"},"idris":{"title":"Idris","alias":"idr","owner":"KeenS","require":"haskell"},"ignore":{"title":".ignore","owner":"osipxd","alias":["gitignore","hgignore","npmignore"],"aliasTitles":{"gitignore":".gitignore","hgignore":".hgignore","npmignore":".npmignore"}},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jexl":{"title":"Jexl","owner":"czosel"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike","typescript"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","alias":"webmanifest","aliasTitles":{"webmanifest":"Web App Manifest"},"owner":"CupOfTea696"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"jsstacktrace":{"title":"JS stack trace","owner":"sbrl"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup","sql"],"owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","alias":["kt","kts"],"aliasTitles":{"kts":"Kotlin Script"},"require":"clike","owner":"Golmote"},"kumir":{"title":"KuMir (КуМир)","alias":"kum","owner":"edukisto"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","require":"markup-templating","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"log":{"title":"Log file","optional":"javastacktrace","owner":"RunDevelopment"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"magma":{"title":"Magma (CAS)","owner":"RunDevelopment"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","optional":"yaml","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"maxscript":{"title":"MAXScript","owner":"RunDevelopment"},"mel":{"title":"MEL","owner":"Golmote"},"mermaid":{"title":"Mermaid","owner":"RunDevelopment"},"mizar":{"title":"Mizar","owner":"Golmote"},"mongodb":{"title":"MongoDB","owner":"airs0urce","require":"javascript"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"naniscript":{"title":"Naninovel Script","owner":"Elringus","alias":"nani"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nevod":{"title":"Nevod","owner":"nezaboodka"},"nginx":{"title":"nginx","owner":"volado"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"openqasm":{"title":"OpenQasm","alias":"qasm","owner":"RunDevelopment"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"psl":{"title":"PATROL Scripting Language","owner":"bertysentry"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":"markup-templating","owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"promql":{"title":"PromQL","owner":"arendjr"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"purebasic":{"title":"PureBasic","require":"clike","alias":"pbfasm","owner":"HeX0R101"},"purescript":{"title":"PureScript","require":"haskell","alias":"purs","owner":"sriharshachilakapati"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"qsharp":{"title":"Q#","require":"clike","alias":"qs","owner":"fedonman"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"racket":{"title":"Racket","require":"scheme","alias":"rkt","owner":"RunDevelopment"},"cshtml":{"title":"Razor C#","alias":"razor","require":["markup","csharp"],"optional":["css","css-extras","javascript","js-extras"],"owner":"RunDevelopment"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","owner":"RunDevelopment"},"rego":{"title":"Rego","owner":"JordanSh"},"renpy":{"title":"Ren'py","alias":"rpy","owner":"HyuchiaDiego"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","optional":"css-extras","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","alias":["sh-session","shellsession"],"owner":"RunDevelopment"},"smali":{"title":"Smali","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sml":{"title":"SML","alias":"smlnj","aliasTitles":{"smlnj":"SML/NJ"},"owner":"RunDevelopment"},"solidity":{"title":"Solidity (Ethereum)","alias":"sol","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"squirrel":{"title":"Squirrel","require":"clike","owner":"RunDevelopment"},"stan":{"title":"Stan","owner":"RunDevelopment"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","owner":"chrischares"},"systemd":{"title":"Systemd configuration file","owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","vbnet"],"owner":"RunDevelopment"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"typoscript":{"title":"TypoScript","alias":"tsconfig","aliasTitles":{"tsconfig":"TSConfig"},"owner":"dkern"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"uri":{"title":"URI","alias":"url","aliasTitles":{"url":"URL"},"owner":"RunDevelopment"},"v":{"title":"V","require":"clike","owner":"taggon"},"vala":{"title":"Vala","require":"clike","optional":"regex","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":["vb","vba"],"aliasTitles":{"vba":"VBA"},"owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"wolfram":{"title":"Wolfram language","alias":["mathematica","nb","wl"],"aliasTitles":{"mathematica":"Mathematica","nb":"Mathematica Notebook"},"owner":"msollami"},"wren":{"title":"Wren","owner":"clsource"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xml-doc":{"title":"XML doc (.net)","require":"markup","modify":["csharp","fsharp","vbnet"],"owner":"RunDevelopment"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"yang":{"title":"YANG","owner":"RunDevelopment"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword for fine-grained highlighting.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml","ssml","atom","rss"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","ssml":"SSML","atom":"Atom","rss":"RSS"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","optional":"regex","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"ABNF","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"agda":{"title":"Agda","owner":"xy-ren"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apex":{"title":"Apex","require":["clike","sql"],"owner":"RunDevelopment"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"dkern"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"avisynth":{"title":"AviSynth","alias":"avs","owner":"Zinfidel"},"avro-idl":{"title":"Avro IDL","alias":"avdl","owner":"RunDevelopment"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"bicep":{"title":"Bicep","owner":"johnnyreilly"},"birb":{"title":"Birb","require":"clike","owner":"Calamity210"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"BNF","alias":"rbnf","aliasTitles":{"rbnf":"RBNF"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"bsl":{"title":"BSL (1C:Enterprise)","alias":"oscript","aliasTitles":{"oscript":"OneScript"},"owner":"Diversus23"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cfscript":{"title":"CFScript","require":"clike","alias":"cfc","owner":"mjclemente"},"chaiscript":{"title":"ChaiScript","require":["clike","cpp"],"owner":"RunDevelopment"},"cil":{"title":"CIL","owner":"sbrl"},"clojure":{"title":"Clojure","owner":"troglotit"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"cobol":{"title":"COBOL","owner":"RunDevelopment"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"coq":{"title":"Coq","owner":"RunDevelopment"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"csv":{"title":"CSV","owner":"RunDevelopment"},"cypher":{"title":"Cypher","owner":"RunDevelopment"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dataweave":{"title":"DataWeave","owner":"machaval"},"dax":{"title":"DAX","owner":"peterbud"},"dhall":{"title":"Dhall","owner":"RunDevelopment"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"dot":{"title":"DOT (Graphviz)","alias":"gv","optional":"markup","owner":"RunDevelopment"},"ebnf":{"title":"EBNF","owner":"RunDevelopment"},"editorconfig":{"title":"EditorConfig","owner":"osipxd"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"false":{"title":"False","owner":"edukisto"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"gap":{"title":"GAP (CAS)","owner":"RunDevelopment"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"c","owner":"Golmote"},"gn":{"title":"GN","alias":"gni","owner":"RunDevelopment"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","optional":"markdown","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","alias":"hbs","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"hlsl":{"title":"HLSL","require":"c","owner":"RunDevelopment"},"hoon":{"title":"Hoon","owner":"matildepark"},"http":{"title":"HTTP","optional":["css","javascript","json","markup","uri"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"icu-message-format":{"title":"ICU Message Format","owner":"RunDevelopment"},"idris":{"title":"Idris","alias":"idr","owner":"KeenS","require":"haskell"},"ignore":{"title":".ignore","owner":"osipxd","alias":["gitignore","hgignore","npmignore"],"aliasTitles":{"gitignore":".gitignore","hgignore":".hgignore","npmignore":".npmignore"}},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jexl":{"title":"Jexl","owner":"czosel"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike","typescript"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","alias":"webmanifest","aliasTitles":{"webmanifest":"Web App Manifest"},"owner":"CupOfTea696"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"jsstacktrace":{"title":"JS stack trace","owner":"sbrl"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup","sql"],"owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","alias":["kt","kts"],"aliasTitles":{"kts":"Kotlin Script"},"require":"clike","owner":"Golmote"},"kumir":{"title":"KuMir (КуМир)","alias":"kum","owner":"edukisto"},"kusto":{"title":"Kusto","owner":"RunDevelopment"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","require":"markup-templating","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"log":{"title":"Log file","optional":"javastacktrace","owner":"RunDevelopment"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"magma":{"title":"Magma (CAS)","owner":"RunDevelopment"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","optional":"yaml","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"maxscript":{"title":"MAXScript","owner":"RunDevelopment"},"mel":{"title":"MEL","owner":"Golmote"},"mermaid":{"title":"Mermaid","owner":"RunDevelopment"},"mizar":{"title":"Mizar","owner":"Golmote"},"mongodb":{"title":"MongoDB","owner":"airs0urce","require":"javascript"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"naniscript":{"title":"Naninovel Script","owner":"Elringus","alias":"nani"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nevod":{"title":"Nevod","owner":"nezaboodka"},"nginx":{"title":"nginx","owner":"volado"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"openqasm":{"title":"OpenQasm","alias":"qasm","owner":"RunDevelopment"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"psl":{"title":"PATROL Scripting Language","owner":"bertysentry"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":"markup-templating","owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"promql":{"title":"PromQL","owner":"arendjr"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"purebasic":{"title":"PureBasic","require":"clike","alias":"pbfasm","owner":"HeX0R101"},"purescript":{"title":"PureScript","require":"haskell","alias":"purs","owner":"sriharshachilakapati"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"qsharp":{"title":"Q#","require":"clike","alias":"qs","owner":"fedonman"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"racket":{"title":"Racket","require":"scheme","alias":"rkt","owner":"RunDevelopment"},"cshtml":{"title":"Razor C#","alias":"razor","require":["markup","csharp"],"optional":["css","css-extras","javascript","js-extras"],"owner":"RunDevelopment"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","owner":"RunDevelopment"},"rego":{"title":"Rego","owner":"JordanSh"},"renpy":{"title":"Ren'py","alias":"rpy","owner":"HyuchiaDiego"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","optional":"css-extras","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","alias":["sh-session","shellsession"],"owner":"RunDevelopment"},"smali":{"title":"Smali","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sml":{"title":"SML","alias":"smlnj","aliasTitles":{"smlnj":"SML/NJ"},"owner":"RunDevelopment"},"solidity":{"title":"Solidity (Ethereum)","alias":"sol","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"squirrel":{"title":"Squirrel","require":"clike","owner":"RunDevelopment"},"stan":{"title":"Stan","owner":"RunDevelopment"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","owner":"chrischares"},"systemd":{"title":"Systemd configuration file","owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","vbnet"],"owner":"RunDevelopment"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"typoscript":{"title":"TypoScript","alias":"tsconfig","aliasTitles":{"tsconfig":"TSConfig"},"owner":"dkern"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"uri":{"title":"URI","alias":"url","aliasTitles":{"url":"URL"},"owner":"RunDevelopment"},"v":{"title":"V","require":"clike","owner":"taggon"},"vala":{"title":"Vala","require":"clike","optional":"regex","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":["vb","vba"],"aliasTitles":{"vba":"VBA"},"owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"wolfram":{"title":"Wolfram language","alias":["mathematica","nb","wl"],"aliasTitles":{"mathematica":"Mathematica","nb":"Mathematica Notebook"},"owner":"msollami"},"wren":{"title":"Wren","owner":"clsource"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xml-doc":{"title":"XML doc (.net)","require":"markup","modify":["csharp","fsharp","vbnet"],"owner":"RunDevelopment"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"yang":{"title":"YANG","owner":"RunDevelopment"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword for fine-grained highlighting.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; if (typeof module !== 'undefined' && module.exports) { module.exports = components; } \ No newline at end of file diff --git a/components.json b/components.json index 86c0daca32..c1dff4b04c 100644 --- a/components.json +++ b/components.json @@ -731,6 +731,10 @@ "alias": "kum", "owner": "edukisto" }, + "kusto": { + "title": "Kusto", + "owner": "RunDevelopment" + }, "latex": { "title": "LaTeX", "alias": ["tex", "context"], diff --git a/components/prism-kusto.js b/components/prism-kusto.js new file mode 100644 index 0000000000..165e61a7ee --- /dev/null +++ b/components/prism-kusto.js @@ -0,0 +1,44 @@ +Prism.languages.kusto = { + 'comment': { + pattern: /\/\/.*/, + greedy: true + }, + 'string': { + pattern: /```[\s\S]*?```|[hH]?(?:"(?:[^\r\n\\"]|\\.)*"|'(?:[^\r\n\\']|\\.)*'|@(?:"[^\r\n"]*"|'[^\r\n']*'))/, + greedy: true + }, + + 'verb': { + pattern: /(\|\s*)[a-z][\w-]*/i, + lookbehind: true, + alias: 'keyword' + }, + + 'command': { + pattern: /\.[a-z][a-z\d-]*\b/, + alias: 'keyword' + }, + + 'class-name': /\b(?:bool|datetime|decimal|dynamic|guid|int|long|real|string|timespan)\b/, + 'keyword': /\b(?:access|alias|and|anti|as|asc|auto|between|by|database|declare|desc|external|from|fullouter|has_all|in|ingestion|inline|inner|innerunique|into|let|like|local|not|of|on|or|pattern|print|query_parameters|range|restrict|schema|set|step|table|tables|to|view|where|with|(?:has(?:perfix|suffix)?|contains|(?:starts|ends)with)(?:_cs)?|(?:left|right)(?:anti(?:semi)?|inner|outer|semi)?|matches\s+regex|nulls\s+(?:first|last))(?![\w-])/, + 'boolean': /\b(?:true|false|null)\b/, + + 'function': /\b[a-z_]\w*(?=\s*\()/, + + 'datetime': [ + { + // RFC 822 + RFC 850 + pattern: /\b(?:(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun|Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday)\s*,\s*)?\d{1,2}(?:\s+|-)(?:Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)(?:\s+|-)\d{2}\s+\d{2}:\d{2}(?::\d{2})?(?:\s*(?:\b(?:(?:U|GM|[ECMT][DS])T|[A-Z])|[+-]\d{4}))?\b/, + alias: 'number' + }, + { + // ISO 8601 + pattern: /[+-]?\b(?:\d{4}-\d{2}-\d{2}(?:[ T]\d{2}:\d{2}(?::\d{2}(?:\.\d+)?)?)?|\d{2}:\d{2}(?::\d{2}(?:\.\d+)?)?)Z?/, + alias: 'number' + } + ], + 'number': /\b(?:0x[0-9A-Fa-f]+|\d+(?:\.\d+)?(?:[Ee][+-]?\d+)?)(?:(?:min|sec|[mnµ]s|tick|microsecond|[dhms])\b)?|[+-]?\binf\b/, + + 'operator': /=>|[!=]~|[!=<>]=?|[-+*/%|]|\.\./, + 'punctuation': /[()\[\]{},;.:]/ +}; diff --git a/components/prism-kusto.min.js b/components/prism-kusto.min.js new file mode 100644 index 0000000000..cd4981d6d8 --- /dev/null +++ b/components/prism-kusto.min.js @@ -0,0 +1 @@ +Prism.languages.kusto={comment:{pattern:/\/\/.*/,greedy:!0},string:{pattern:/```[\s\S]*?```|[hH]?(?:"(?:[^\r\n\\"]|\\.)*"|'(?:[^\r\n\\']|\\.)*'|@(?:"[^\r\n"]*"|'[^\r\n']*'))/,greedy:!0},verb:{pattern:/(\|\s*)[a-z][\w-]*/i,lookbehind:!0,alias:"keyword"},command:{pattern:/\.[a-z][a-z\d-]*\b/,alias:"keyword"},"class-name":/\b(?:bool|datetime|decimal|dynamic|guid|int|long|real|string|timespan)\b/,keyword:/\b(?:access|alias|and|anti|as|asc|auto|between|by|database|declare|desc|external|from|fullouter|has_all|in|ingestion|inline|inner|innerunique|into|let|like|local|not|of|on|or|pattern|print|query_parameters|range|restrict|schema|set|step|table|tables|to|view|where|with|(?:has(?:perfix|suffix)?|contains|(?:starts|ends)with)(?:_cs)?|(?:left|right)(?:anti(?:semi)?|inner|outer|semi)?|matches\s+regex|nulls\s+(?:first|last))(?![\w-])/,boolean:/\b(?:true|false|null)\b/,function:/\b[a-z_]\w*(?=\s*\()/,datetime:[{pattern:/\b(?:(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun|Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday)\s*,\s*)?\d{1,2}(?:\s+|-)(?:Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)(?:\s+|-)\d{2}\s+\d{2}:\d{2}(?::\d{2})?(?:\s*(?:\b(?:(?:U|GM|[ECMT][DS])T|[A-Z])|[+-]\d{4}))?\b/,alias:"number"},{pattern:/[+-]?\b(?:\d{4}-\d{2}-\d{2}(?:[ T]\d{2}:\d{2}(?::\d{2}(?:\.\d+)?)?)?|\d{2}:\d{2}(?::\d{2}(?:\.\d+)?)?)Z?/,alias:"number"}],number:/\b(?:0x[0-9A-Fa-f]+|\d+(?:\.\d+)?(?:[Ee][+-]?\d+)?)(?:(?:min|sec|[mnµ]s|tick|microsecond|[dhms])\b)?|[+-]?\binf\b/,operator:/=>|[!=]~|[!=<>]=?|[-+*/%|]|\.\./,punctuation:/[()\[\]{},;.:]/}; \ No newline at end of file diff --git a/examples/prism-kusto.html b/examples/prism-kusto.html new file mode 100644 index 0000000000..aa2fd81d60 --- /dev/null +++ b/examples/prism-kusto.html @@ -0,0 +1,8 @@ +

            Full example

            +
            // Source: https://docs.microsoft.com/en-us/azure/data-explorer/kusto/query/tutorial?pivots=azuredataexplorer
            +
            +StormEvents
            +| where StartTime > datetime(2007-02-01) and StartTime < datetime(2007-03-01)
            +| where EventType == 'Flood' and State == 'CALIFORNIA'
            +| project StartTime, EndTime , State , EventType , EpisodeNarrative
            +
            diff --git a/tests/languages/kusto/boolean_feature.test b/tests/languages/kusto/boolean_feature.test new file mode 100644 index 0000000000..7df12bca4a --- /dev/null +++ b/tests/languages/kusto/boolean_feature.test @@ -0,0 +1,24 @@ +true bool(true) +false bool(false) +bool(null) + +---------------------------------------------------- + +[ + ["boolean", "true"], + ["class-name", "bool"], + ["punctuation", "("], + ["boolean", "true"], + ["punctuation", ")"], + + ["boolean", "false"], + ["class-name", "bool"], + ["punctuation", "("], + ["boolean", "false"], + ["punctuation", ")"], + + ["class-name", "bool"], + ["punctuation", "("], + ["boolean", "null"], + ["punctuation", ")"] +] diff --git a/tests/languages/kusto/class-name_feature.test b/tests/languages/kusto/class-name_feature.test new file mode 100644 index 0000000000..572b56e6ec --- /dev/null +++ b/tests/languages/kusto/class-name_feature.test @@ -0,0 +1,25 @@ +bool +datetime +decimal +dynamic +guid +int +long +real +string +timespan + +---------------------------------------------------- + +[ + ["class-name", "bool"], + ["class-name", "datetime"], + ["class-name", "decimal"], + ["class-name", "dynamic"], + ["class-name", "guid"], + ["class-name", "int"], + ["class-name", "long"], + ["class-name", "real"], + ["class-name", "string"], + ["class-name", "timespan"] +] diff --git a/tests/languages/kusto/command_feature.test b/tests/languages/kusto/command_feature.test new file mode 100644 index 0000000000..947976c0af --- /dev/null +++ b/tests/languages/kusto/command_feature.test @@ -0,0 +1,13 @@ +.show tables +| count + +.set foo=234 + +---------------------------------------------------- + +[ + ["command", ".show"], ["keyword", "tables"], + ["operator", "|"], ["verb", "count"], + + ["command", ".set"], " foo", ["operator", "="], ["number", "234"] +] diff --git a/tests/languages/kusto/comment_feature.test b/tests/languages/kusto/comment_feature.test new file mode 100644 index 0000000000..e2a62cb063 --- /dev/null +++ b/tests/languages/kusto/comment_feature.test @@ -0,0 +1,7 @@ +// comment + +---------------------------------------------------- + +[ + ["comment", "// comment"] +] diff --git a/tests/languages/kusto/datetime_feature.test b/tests/languages/kusto/datetime_feature.test new file mode 100644 index 0000000000..82d9397991 --- /dev/null +++ b/tests/languages/kusto/datetime_feature.test @@ -0,0 +1,61 @@ +// ISO 8601 +2014-05-25T08:20:03.123456Z +2014-05-25T08:20:03.123456 +2014-05-25T08:20 +2014-11-08 15:55:55.123456Z +2014-11-08 15:55:55 +2014-11-08 15:55 +2014-11-08 + +// RFC 822 +Sat, 8 Nov 14 15:05:02 GMT +Sat, 8 Nov 14 15:05:02 +Sat, 8 Nov 14 15:05 +Sat, 8 Nov 14 15:05 GMT +8 Nov 14 15:05:02 GMT +8 Nov 14 15:05:02 +8 Nov 14 15:05 +8 Nov 14 15:05 GMT + +// RFC 850 +Saturday, 08-Nov-14 15:05:02 GMT +Saturday, 08-Nov-14 15:05:02 +Saturday, 08-Nov-14 15:05 GMT +Saturday, 08-Nov-14 15:05 +08-Nov-14 15:05:02 GMT +08-Nov-14 15:05:02 +08-Nov-14 15:05 GMT +08-Nov-14 15:05 + +---------------------------------------------------- + +[ + ["comment", "// ISO 8601"], + ["datetime", "2014-05-25T08:20:03.123456Z"], + ["datetime", "2014-05-25T08:20:03.123456"], + ["datetime", "2014-05-25T08:20"], + ["datetime", "2014-11-08 15:55:55.123456Z"], + ["datetime", "2014-11-08 15:55:55"], + ["datetime", "2014-11-08 15:55"], + ["datetime", "2014-11-08"], + + ["comment", "// RFC 822"], + ["datetime", "Sat, 8 Nov 14 15:05:02 GMT"], + ["datetime", "Sat, 8 Nov 14 15:05:02"], + ["datetime", "Sat, 8 Nov 14 15:05"], + ["datetime", "Sat, 8 Nov 14 15:05 GMT"], + ["datetime", "8 Nov 14 15:05:02 GMT"], + ["datetime", "8 Nov 14 15:05:02"], + ["datetime", "8 Nov 14 15:05"], + ["datetime", "8 Nov 14 15:05 GMT"], + + ["comment", "// RFC 850"], + ["datetime", "Saturday, 08-Nov-14 15:05:02 GMT"], + ["datetime", "Saturday, 08-Nov-14 15:05:02"], + ["datetime", "Saturday, 08-Nov-14 15:05 GMT"], + ["datetime", "Saturday, 08-Nov-14 15:05"], + ["datetime", "08-Nov-14 15:05:02 GMT"], + ["datetime", "08-Nov-14 15:05:02"], + ["datetime", "08-Nov-14 15:05 GMT"], + ["datetime", "08-Nov-14 15:05"] +] diff --git a/tests/languages/kusto/function_feature.test b/tests/languages/kusto/function_feature.test new file mode 100644 index 0000000000..bc928df744 --- /dev/null +++ b/tests/languages/kusto/function_feature.test @@ -0,0 +1,9 @@ +min() + +---------------------------------------------------- + +[ + ["function", "min"], + ["punctuation", "("], + ["punctuation", ")"] +] diff --git a/tests/languages/kusto/keyword_feature.test b/tests/languages/kusto/keyword_feature.test new file mode 100644 index 0000000000..d59e4691d5 --- /dev/null +++ b/tests/languages/kusto/keyword_feature.test @@ -0,0 +1,145 @@ +access +alias +and +anti +as +asc +auto +between +by +contains +contains_cs +database +declare +desc +endswith +endswith_cs +external +from +fullouter +has +has_all +has_cs +hasperfix +hasperfix_cs +hassuffix +hassuffix_cs +in +ingestion +inline +inner +innerunique +into +left +leftanti +leftantisemi +leftinner +leftouter +leftsemi +let +like +local +matches regex +not +nulls first +nulls last +of +on +or +pattern +print +query_parameters +range +restrict +right +rightanti +rightantisemi +rightinner +rightouter +rightsemi +schema +set +startswith +startswith_cs +step +table +tables +to +view +where +with + +---------------------------------------------------- + +[ + ["keyword", "access"], + ["keyword", "alias"], + ["keyword", "and"], + ["keyword", "anti"], + ["keyword", "as"], + ["keyword", "asc"], + ["keyword", "auto"], + ["keyword", "between"], + ["keyword", "by"], + ["keyword", "contains"], + ["keyword", "contains_cs"], + ["keyword", "database"], + ["keyword", "declare"], + ["keyword", "desc"], + ["keyword", "endswith"], + ["keyword", "endswith_cs"], + ["keyword", "external"], + ["keyword", "from"], + ["keyword", "fullouter"], + ["keyword", "has"], + ["keyword", "has_all"], + ["keyword", "has_cs"], + ["keyword", "hasperfix"], + ["keyword", "hasperfix_cs"], + ["keyword", "hassuffix"], + ["keyword", "hassuffix_cs"], + ["keyword", "in"], + ["keyword", "ingestion"], + ["keyword", "inline"], + ["keyword", "inner"], + ["keyword", "innerunique"], + ["keyword", "into"], + ["keyword", "left"], + ["keyword", "leftanti"], + ["keyword", "leftantisemi"], + ["keyword", "leftinner"], + ["keyword", "leftouter"], + ["keyword", "leftsemi"], + ["keyword", "let"], + ["keyword", "like"], + ["keyword", "local"], + ["keyword", "matches regex"], + ["keyword", "not"], + ["keyword", "nulls first"], + ["keyword", "nulls last"], + ["keyword", "of"], + ["keyword", "on"], + ["keyword", "or"], + ["keyword", "pattern"], + ["keyword", "print"], + ["keyword", "query_parameters"], + ["keyword", "range"], + ["keyword", "restrict"], + ["keyword", "right"], + ["keyword", "rightanti"], + ["keyword", "rightantisemi"], + ["keyword", "rightinner"], + ["keyword", "rightouter"], + ["keyword", "rightsemi"], + ["keyword", "schema"], + ["keyword", "set"], + ["keyword", "startswith"], + ["keyword", "startswith_cs"], + ["keyword", "step"], + ["keyword", "table"], + ["keyword", "tables"], + ["keyword", "to"], + ["keyword", "view"], + ["keyword", "where"], + ["keyword", "with"] +] diff --git a/tests/languages/kusto/number_feature.test b/tests/languages/kusto/number_feature.test new file mode 100644 index 0000000000..511236bb26 --- /dev/null +++ b/tests/languages/kusto/number_feature.test @@ -0,0 +1,41 @@ +0 +123 +123.456 +123.456e-7 + +0xfF + ++inf +-inf + +// time +12d +12h +12m +12min +12s +12sec +12ms + +---------------------------------------------------- + +[ + ["number", "0"], + ["number", "123"], + ["number", "123.456"], + ["number", "123.456e-7"], + + ["number", "0xfF"], + + ["number", "+inf"], + ["number", "-inf"], + + ["comment", "// time"], + ["number", "12d"], + ["number", "12h"], + ["number", "12m"], + ["number", "12min"], + ["number", "12s"], + ["number", "12sec"], + ["number", "12ms"] +] diff --git a/tests/languages/kusto/operator_feature.test b/tests/languages/kusto/operator_feature.test new file mode 100644 index 0000000000..00fe1c1867 --- /dev/null +++ b/tests/languages/kusto/operator_feature.test @@ -0,0 +1,33 @@ ++ - * / % +== != < <= > >= +=~ !~ += ! + +=> +.. + +---------------------------------------------------- + +[ + ["operator", "+"], + ["operator", "-"], + ["operator", "*"], + ["operator", "/"], + ["operator", "%"], + + ["operator", "=="], + ["operator", "!="], + ["operator", "<"], + ["operator", "<="], + ["operator", ">"], + ["operator", ">="], + + ["operator", "=~"], + ["operator", "!~"], + + ["operator", "="], + ["operator", "!"], + + ["operator", "=>"], + ["operator", ".."] +] diff --git a/tests/languages/kusto/punctuation_feature.test b/tests/languages/kusto/punctuation_feature.test new file mode 100644 index 0000000000..1713f5143c --- /dev/null +++ b/tests/languages/kusto/punctuation_feature.test @@ -0,0 +1,18 @@ +( ) [ ] { } +, ; . : + +---------------------------------------------------- + +[ + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", "["], + ["punctuation", "]"], + ["punctuation", "{"], + ["punctuation", "}"], + + ["punctuation", ","], + ["punctuation", ";"], + ["punctuation", "."], + ["punctuation", ":"] +] diff --git a/tests/languages/kusto/string_feature.test b/tests/languages/kusto/string_feature.test new file mode 100644 index 0000000000..1b957eb532 --- /dev/null +++ b/tests/languages/kusto/string_feature.test @@ -0,0 +1,82 @@ +"" +'' +@"" +@'' +"foo\"" +'bar\'' +@"\" +@'\' + +``` +multiline +``` + +// Obfuscated string literals +h'hello' +h@'world' +h"hello" + +// string concatenation + +print strlen("Hello"', '@"world!"); // Nothing between them + +print strlen("Hello" ', ' @"world!"); // Separated by whitespace only + +print strlen("Hello" + // Comment + ', '@"world!"); // Separated by whitespace and a comment + +---------------------------------------------------- + +[ + ["string", "\"\""], + ["string", "''"], + ["string", "@\"\""], + ["string", "@''"], + ["string", "\"foo\\\"\""], + ["string", "'bar\\''"], + ["string", "@\"\\\""], + ["string", "@'\\'"], + + ["string", "```\r\nmultiline\r\n```"], + + ["comment", "// Obfuscated string literals"], + ["string", "h'hello'"], + ["string", "h@'world'"], + ["string", "h\"hello\""], + + ["comment", "// string concatenation"], + + ["keyword", "print"], + ["function", "strlen"], + ["punctuation", "("], + ["string", "\"Hello\""], + ["string", "', '"], + ["string", "@\"world!\""], + ["punctuation", ")"], + ["punctuation", ";"], + ["comment", "// Nothing between them"], + + ["keyword", "print"], + ["function", "strlen"], + ["punctuation", "("], + ["string", "\"Hello\""], + ["string", "', '"], + ["string", "@\"world!\""], + ["punctuation", ")"], + ["punctuation", ";"], + ["comment", "// Separated by whitespace only"], + + ["keyword", "print"], + ["function", "strlen"], + ["punctuation", "("], + ["string", "\"Hello\""], + + ["comment", "// Comment"], + + ["string", "', '"], + ["string", "@\"world!\""], + ["punctuation", ")"], + ["punctuation", ";"], + ["comment", "// Separated by whitespace and a comment"] +] diff --git a/tests/languages/kusto/verb_feature.test b/tests/languages/kusto/verb_feature.test new file mode 100644 index 0000000000..f351551b99 --- /dev/null +++ b/tests/languages/kusto/verb_feature.test @@ -0,0 +1,39 @@ +Logs +| where Timestamp > ago(1d) +| join +( + Events + | where continent == 'Europe' +) on RequestId + +---------------------------------------------------- + +[ + "Logs\r\n", + + ["operator", "|"], + ["verb", "where"], + " Timestamp ", + ["operator", ">"], + ["function", "ago"], + ["punctuation", "("], + ["number", "1d"], + ["punctuation", ")"], + + ["operator", "|"], + ["verb", "join"], + + ["punctuation", "("], + + "\r\n Events\r\n ", + + ["operator", "|"], + ["verb", "where"], + " continent ", + ["operator", "=="], + ["string", "'Europe'"], + + ["punctuation", ")"], + ["keyword", "on"], + " RequestId" +] From 6d8e54703b086ba4f4a3a9d9a56cbb06fee226d2 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Thu, 16 Sep 2021 18:14:02 +0200 Subject: [PATCH 0906/1100] Updated changelog (#3083) --- CHANGELOG.md | 83 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6c3b9fe309..d59747a192 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,89 @@ # Prism Changelog +## 1.25.0 (2021-09-16) + +### New components + +* __AviSynth__ ([#3071](https://github.com/PrismJS/prism/issues/3071)) [`746a4b1a`](https://github.com/PrismJS/prism/commit/746a4b1a) +* __Avro IDL__ ([#3051](https://github.com/PrismJS/prism/issues/3051)) [`87e5a376`](https://github.com/PrismJS/prism/commit/87e5a376) +* __Bicep__ ([#3027](https://github.com/PrismJS/prism/issues/3027)) [`c1dce998`](https://github.com/PrismJS/prism/commit/c1dce998) +* __GAP (CAS)__ ([#3054](https://github.com/PrismJS/prism/issues/3054)) [`23cd9b65`](https://github.com/PrismJS/prism/commit/23cd9b65) +* __GN__ ([#3062](https://github.com/PrismJS/prism/issues/3062)) [`4f97b82b`](https://github.com/PrismJS/prism/commit/4f97b82b) +* __Hoon__ ([#2978](https://github.com/PrismJS/prism/issues/2978)) [`ea776756`](https://github.com/PrismJS/prism/commit/ea776756) +* __Kusto__ ([#3068](https://github.com/PrismJS/prism/issues/3068)) [`e008ea05`](https://github.com/PrismJS/prism/commit/e008ea05) +* __Magma (CAS)__ ([#3055](https://github.com/PrismJS/prism/issues/3055)) [`a1b67ce3`](https://github.com/PrismJS/prism/commit/a1b67ce3) +* __MAXScript__ ([#3060](https://github.com/PrismJS/prism/issues/3060)) [`4fbdd2f8`](https://github.com/PrismJS/prism/commit/4fbdd2f8) +* __Mermaid__ ([#3050](https://github.com/PrismJS/prism/issues/3050)) [`148c1eca`](https://github.com/PrismJS/prism/commit/148c1eca) +* __Razor C#__ ([#3064](https://github.com/PrismJS/prism/issues/3064)) [`4433ccfc`](https://github.com/PrismJS/prism/commit/4433ccfc) +* __Systemd configuration file__ ([#3053](https://github.com/PrismJS/prism/issues/3053)) [`8df825e0`](https://github.com/PrismJS/prism/commit/8df825e0) +* __Wren__ ([#3063](https://github.com/PrismJS/prism/issues/3063)) [`6a356d25`](https://github.com/PrismJS/prism/commit/6a356d25) + +### Updated components + +* __Bicep__ + * Added support for multiline and interpolated strings and other improvements ([#3028](https://github.com/PrismJS/prism/issues/3028)) [`748bb9ac`](https://github.com/PrismJS/prism/commit/748bb9ac) +* __C#__ + * Added `with` keyword & improved record support ([#2993](https://github.com/PrismJS/prism/issues/2993)) [`fdd291c0`](https://github.com/PrismJS/prism/commit/fdd291c0) + * Added `record`, `init`, and `nullable` keyword ([#2991](https://github.com/PrismJS/prism/issues/2991)) [`9b561565`](https://github.com/PrismJS/prism/commit/9b561565) + * Added context check for `from` keyword ([#2970](https://github.com/PrismJS/prism/issues/2970)) [`158f25d4`](https://github.com/PrismJS/prism/commit/158f25d4) +* __C++__ + * Fixed generic function false positive ([#3043](https://github.com/PrismJS/prism/issues/3043)) [`5de8947f`](https://github.com/PrismJS/prism/commit/5de8947f) +* __Clojure__ + * Improved tokenization ([#3056](https://github.com/PrismJS/prism/issues/3056)) [`8d0b74b5`](https://github.com/PrismJS/prism/commit/8d0b74b5) +* __Hoon__ + * Fixed mixed-case aura tokenization ([#3002](https://github.com/PrismJS/prism/issues/3002)) [`9c8911bd`](https://github.com/PrismJS/prism/commit/9c8911bd) +* __Liquid__ + * Added all objects from Shopify reference ([#2998](https://github.com/PrismJS/prism/issues/2998)) [`693b7433`](https://github.com/PrismJS/prism/commit/693b7433) + * Added `empty` keyword ([#2997](https://github.com/PrismJS/prism/issues/2997)) [`fe3bc526`](https://github.com/PrismJS/prism/commit/fe3bc526) +* __Log file__ + * Added support for Java stack traces ([#3003](https://github.com/PrismJS/prism/issues/3003)) [`b0365e70`](https://github.com/PrismJS/prism/commit/b0365e70) +* __Markup__ + * Made most patterns greedy ([#3065](https://github.com/PrismJS/prism/issues/3065)) [`52e8cee9`](https://github.com/PrismJS/prism/commit/52e8cee9) + * Fixed ReDoS ([#3078](https://github.com/PrismJS/prism/issues/3078)) [`0ff371bb`](https://github.com/PrismJS/prism/commit/0ff371bb) +* __PureScript__ + * Made `∀` a keyword (alias for `forall`) ([#3005](https://github.com/PrismJS/prism/issues/3005)) [`b38fc89a`](https://github.com/PrismJS/prism/commit/b38fc89a) + * Improved Haskell and PureScript ([#3020](https://github.com/PrismJS/prism/issues/3020)) [`679539ec`](https://github.com/PrismJS/prism/commit/679539ec) +* __Python__ + * Support for underscores in numbers ([#3039](https://github.com/PrismJS/prism/issues/3039)) [`6f5d68f7`](https://github.com/PrismJS/prism/commit/6f5d68f7) +* __Sass__ + * Fixed issues with CSS Extras ([#2994](https://github.com/PrismJS/prism/issues/2994)) [`14fdfe32`](https://github.com/PrismJS/prism/commit/14fdfe32) +* __Shell session__ + * Fixed command false positives ([#3048](https://github.com/PrismJS/prism/issues/3048)) [`35b88fcf`](https://github.com/PrismJS/prism/commit/35b88fcf) + * Added support for the percent sign as shell symbol ([#3010](https://github.com/PrismJS/prism/issues/3010)) [`4492b62b`](https://github.com/PrismJS/prism/commit/4492b62b) +* __Swift__ + * Major improvements ([#3022](https://github.com/PrismJS/prism/issues/3022)) [`8541db2e`](https://github.com/PrismJS/prism/commit/8541db2e) + * Added support for `@propertyWrapper`, `@MainActor`, and `@globalActor` ([#3009](https://github.com/PrismJS/prism/issues/3009)) [`ce5e0f01`](https://github.com/PrismJS/prism/commit/ce5e0f01) + * Added support for new Swift 5.5 keywords ([#2988](https://github.com/PrismJS/prism/issues/2988)) [`bb93fac0`](https://github.com/PrismJS/prism/commit/bb93fac0) +* __TypeScript__ + * Fixed keyword false positives ([#3001](https://github.com/PrismJS/prism/issues/3001)) [`212e0ef2`](https://github.com/PrismJS/prism/commit/212e0ef2) + +### Updated plugins + +* __JSONP Highlight__ + * Refactored JSONP logic ([#3018](https://github.com/PrismJS/prism/issues/3018)) [`5126d1e1`](https://github.com/PrismJS/prism/commit/5126d1e1) +* __Line Highlight__ + * Extend highlight to full line width inside scroll container ([#3011](https://github.com/PrismJS/prism/issues/3011)) [`e289ec60`](https://github.com/PrismJS/prism/commit/e289ec60) +* __Normalize Whitespace__ + * Removed unnecessary checks ([#3017](https://github.com/PrismJS/prism/issues/3017)) [`63edf14c`](https://github.com/PrismJS/prism/commit/63edf14c) +* __Previewers__ + * Ensure popup is visible across themes ([#3080](https://github.com/PrismJS/prism/issues/3080)) [`c7b6a7f6`](https://github.com/PrismJS/prism/commit/c7b6a7f6) + +### Updated themes + +* __Twilight__ + * Increase selector specificities of plugin overrides ([#3081](https://github.com/PrismJS/prism/issues/3081)) [`ffb20439`](https://github.com/PrismJS/prism/commit/ffb20439) + +### Other + +* __Infrastructure__ + * Added benchmark suite ([#2153](https://github.com/PrismJS/prism/issues/2153)) [`44456b21`](https://github.com/PrismJS/prism/commit/44456b21) + * Tests: Insert expected JSON by Default ([#2960](https://github.com/PrismJS/prism/issues/2960)) [`e997dd35`](https://github.com/PrismJS/prism/commit/e997dd35) + * Tests: Improved dection of empty patterns ([#3058](https://github.com/PrismJS/prism/issues/3058)) [`d216e602`](https://github.com/PrismJS/prism/commit/d216e602) +* __Website__ + * Highlight Keywords: More documentation ([#3049](https://github.com/PrismJS/prism/issues/3049)) [`247fd9a3`](https://github.com/PrismJS/prism/commit/247fd9a3) + + ## 1.24.1 (2021-07-03) ### Updated components From 99d94fa7c39d5aabee38ae0e729c330146820b4d Mon Sep 17 00:00:00 2001 From: RunDevelopment Date: Thu, 16 Sep 2021 18:17:23 +0200 Subject: [PATCH 0907/1100] 1.25.0 --- package-lock.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index afb60308c1..1dd51a5234 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "prismjs", - "version": "1.24.1", + "version": "1.25.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 2c5190094d..52618f35c7 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "prismjs", - "version": "1.24.1", + "version": "1.25.0", "description": "Lightweight, robust, elegant syntax highlighting. A spin-off project from Dabblet.", "main": "prism.js", "style": "themes/prism.css", From ec25ba6527f59284109df9d3189cea383c7c42ac Mon Sep 17 00:00:00 2001 From: Darach Ennis Date: Tue, 21 Sep 2021 21:19:47 +0200 Subject: [PATCH 0908/1100] Added Tremor project DSL language definition (#3087) * Add tremor project DSL langauge definitions Signed-off-by: Darach Ennis * Update components/prism-tremor.js Apply fix worst-case time complexity per @RunDevelopment's insight Co-authored-by: Michael Schmidt * Update components/prism-tremor.js Terser formulation of pattern Co-authored-by: Michael Schmidt * Update components/prism-tremor.js Terser formulation of pattern Co-authored-by: Michael Schmidt * Update components/prism-tremor.js Terser formulation of pattern Co-authored-by: Michael Schmidt * Add partial interpolation, expand tests, attend to lints Signed-off-by: Darach Ennis * Improved Tremor tokenization Signed-off-by: Michael Schmidt Co-authored-by: Michael Schmidt Co-authored-by: Michael Schmidt --- components.js | 2 +- components.json | 12 ++ components/prism-tremor.js | 68 +++++++++++ components/prism-tremor.min.js | 1 + examples/prism-tremor.html | 82 +++++++++++++ plugins/autoloader/prism-autoloader.js | 2 + plugins/autoloader/prism-autoloader.min.js | 2 +- plugins/show-language/prism-show-language.js | 2 + .../show-language/prism-show-language.min.js | 2 +- tests/languages/tremor/boolean_feature.test | 15 +++ tests/languages/tremor/comment_feature.test | 15 +++ tests/languages/tremor/extractor_feature.test | 15 +++ .../languages/tremor/identifier_feature.test | 12 ++ .../tremor/keyword_escape_feature.test | 115 ++++++++++++++++++ tests/languages/tremor/keyword_feature.test | 115 ++++++++++++++++++ .../languages/tremor/modularity_feature.test | 36 ++++++ tests/languages/tremor/number_feature.test | 19 +++ tests/languages/tremor/operator_feature.test | 61 ++++++++++ .../languages/tremor/punctuation_feature.test | 29 +++++ tests/languages/tremor/string_feature.test | 87 +++++++++++++ 20 files changed, 689 insertions(+), 3 deletions(-) create mode 100644 components/prism-tremor.js create mode 100644 components/prism-tremor.min.js create mode 100644 examples/prism-tremor.html create mode 100644 tests/languages/tremor/boolean_feature.test create mode 100644 tests/languages/tremor/comment_feature.test create mode 100644 tests/languages/tremor/extractor_feature.test create mode 100644 tests/languages/tremor/identifier_feature.test create mode 100644 tests/languages/tremor/keyword_escape_feature.test create mode 100644 tests/languages/tremor/keyword_feature.test create mode 100644 tests/languages/tremor/modularity_feature.test create mode 100644 tests/languages/tremor/number_feature.test create mode 100644 tests/languages/tremor/operator_feature.test create mode 100644 tests/languages/tremor/punctuation_feature.test create mode 100644 tests/languages/tremor/string_feature.test diff --git a/components.js b/components.js index 71effa5499..d6c3ff9bb1 100644 --- a/components.js +++ b/components.js @@ -1,2 +1,2 @@ -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml","ssml","atom","rss"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","ssml":"SSML","atom":"Atom","rss":"RSS"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","optional":"regex","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"ABNF","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"agda":{"title":"Agda","owner":"xy-ren"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apex":{"title":"Apex","require":["clike","sql"],"owner":"RunDevelopment"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"dkern"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"avisynth":{"title":"AviSynth","alias":"avs","owner":"Zinfidel"},"avro-idl":{"title":"Avro IDL","alias":"avdl","owner":"RunDevelopment"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"bicep":{"title":"Bicep","owner":"johnnyreilly"},"birb":{"title":"Birb","require":"clike","owner":"Calamity210"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"BNF","alias":"rbnf","aliasTitles":{"rbnf":"RBNF"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"bsl":{"title":"BSL (1C:Enterprise)","alias":"oscript","aliasTitles":{"oscript":"OneScript"},"owner":"Diversus23"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cfscript":{"title":"CFScript","require":"clike","alias":"cfc","owner":"mjclemente"},"chaiscript":{"title":"ChaiScript","require":["clike","cpp"],"owner":"RunDevelopment"},"cil":{"title":"CIL","owner":"sbrl"},"clojure":{"title":"Clojure","owner":"troglotit"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"cobol":{"title":"COBOL","owner":"RunDevelopment"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"coq":{"title":"Coq","owner":"RunDevelopment"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"csv":{"title":"CSV","owner":"RunDevelopment"},"cypher":{"title":"Cypher","owner":"RunDevelopment"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dataweave":{"title":"DataWeave","owner":"machaval"},"dax":{"title":"DAX","owner":"peterbud"},"dhall":{"title":"Dhall","owner":"RunDevelopment"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"dot":{"title":"DOT (Graphviz)","alias":"gv","optional":"markup","owner":"RunDevelopment"},"ebnf":{"title":"EBNF","owner":"RunDevelopment"},"editorconfig":{"title":"EditorConfig","owner":"osipxd"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"false":{"title":"False","owner":"edukisto"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"gap":{"title":"GAP (CAS)","owner":"RunDevelopment"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"c","owner":"Golmote"},"gn":{"title":"GN","alias":"gni","owner":"RunDevelopment"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","optional":"markdown","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","alias":"hbs","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"hlsl":{"title":"HLSL","require":"c","owner":"RunDevelopment"},"hoon":{"title":"Hoon","owner":"matildepark"},"http":{"title":"HTTP","optional":["css","javascript","json","markup","uri"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"icu-message-format":{"title":"ICU Message Format","owner":"RunDevelopment"},"idris":{"title":"Idris","alias":"idr","owner":"KeenS","require":"haskell"},"ignore":{"title":".ignore","owner":"osipxd","alias":["gitignore","hgignore","npmignore"],"aliasTitles":{"gitignore":".gitignore","hgignore":".hgignore","npmignore":".npmignore"}},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jexl":{"title":"Jexl","owner":"czosel"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike","typescript"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","alias":"webmanifest","aliasTitles":{"webmanifest":"Web App Manifest"},"owner":"CupOfTea696"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"jsstacktrace":{"title":"JS stack trace","owner":"sbrl"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup","sql"],"owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","alias":["kt","kts"],"aliasTitles":{"kts":"Kotlin Script"},"require":"clike","owner":"Golmote"},"kumir":{"title":"KuMir (КуМир)","alias":"kum","owner":"edukisto"},"kusto":{"title":"Kusto","owner":"RunDevelopment"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","require":"markup-templating","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"log":{"title":"Log file","optional":"javastacktrace","owner":"RunDevelopment"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"magma":{"title":"Magma (CAS)","owner":"RunDevelopment"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","optional":"yaml","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"maxscript":{"title":"MAXScript","owner":"RunDevelopment"},"mel":{"title":"MEL","owner":"Golmote"},"mermaid":{"title":"Mermaid","owner":"RunDevelopment"},"mizar":{"title":"Mizar","owner":"Golmote"},"mongodb":{"title":"MongoDB","owner":"airs0urce","require":"javascript"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"naniscript":{"title":"Naninovel Script","owner":"Elringus","alias":"nani"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nevod":{"title":"Nevod","owner":"nezaboodka"},"nginx":{"title":"nginx","owner":"volado"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"openqasm":{"title":"OpenQasm","alias":"qasm","owner":"RunDevelopment"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"psl":{"title":"PATROL Scripting Language","owner":"bertysentry"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":"markup-templating","owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"promql":{"title":"PromQL","owner":"arendjr"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"purebasic":{"title":"PureBasic","require":"clike","alias":"pbfasm","owner":"HeX0R101"},"purescript":{"title":"PureScript","require":"haskell","alias":"purs","owner":"sriharshachilakapati"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"qsharp":{"title":"Q#","require":"clike","alias":"qs","owner":"fedonman"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"racket":{"title":"Racket","require":"scheme","alias":"rkt","owner":"RunDevelopment"},"cshtml":{"title":"Razor C#","alias":"razor","require":["markup","csharp"],"optional":["css","css-extras","javascript","js-extras"],"owner":"RunDevelopment"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","owner":"RunDevelopment"},"rego":{"title":"Rego","owner":"JordanSh"},"renpy":{"title":"Ren'py","alias":"rpy","owner":"HyuchiaDiego"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","optional":"css-extras","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","alias":["sh-session","shellsession"],"owner":"RunDevelopment"},"smali":{"title":"Smali","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sml":{"title":"SML","alias":"smlnj","aliasTitles":{"smlnj":"SML/NJ"},"owner":"RunDevelopment"},"solidity":{"title":"Solidity (Ethereum)","alias":"sol","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"squirrel":{"title":"Squirrel","require":"clike","owner":"RunDevelopment"},"stan":{"title":"Stan","owner":"RunDevelopment"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","owner":"chrischares"},"systemd":{"title":"Systemd configuration file","owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","vbnet"],"owner":"RunDevelopment"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"typoscript":{"title":"TypoScript","alias":"tsconfig","aliasTitles":{"tsconfig":"TSConfig"},"owner":"dkern"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"uri":{"title":"URI","alias":"url","aliasTitles":{"url":"URL"},"owner":"RunDevelopment"},"v":{"title":"V","require":"clike","owner":"taggon"},"vala":{"title":"Vala","require":"clike","optional":"regex","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":["vb","vba"],"aliasTitles":{"vba":"VBA"},"owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"wolfram":{"title":"Wolfram language","alias":["mathematica","nb","wl"],"aliasTitles":{"mathematica":"Mathematica","nb":"Mathematica Notebook"},"owner":"msollami"},"wren":{"title":"Wren","owner":"clsource"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xml-doc":{"title":"XML doc (.net)","require":"markup","modify":["csharp","fsharp","vbnet"],"owner":"RunDevelopment"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"yang":{"title":"YANG","owner":"RunDevelopment"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword for fine-grained highlighting.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml","ssml","atom","rss"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","ssml":"SSML","atom":"Atom","rss":"RSS"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","optional":"regex","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"ABNF","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"agda":{"title":"Agda","owner":"xy-ren"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apex":{"title":"Apex","require":["clike","sql"],"owner":"RunDevelopment"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"dkern"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"avisynth":{"title":"AviSynth","alias":"avs","owner":"Zinfidel"},"avro-idl":{"title":"Avro IDL","alias":"avdl","owner":"RunDevelopment"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"bicep":{"title":"Bicep","owner":"johnnyreilly"},"birb":{"title":"Birb","require":"clike","owner":"Calamity210"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"BNF","alias":"rbnf","aliasTitles":{"rbnf":"RBNF"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"bsl":{"title":"BSL (1C:Enterprise)","alias":"oscript","aliasTitles":{"oscript":"OneScript"},"owner":"Diversus23"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cfscript":{"title":"CFScript","require":"clike","alias":"cfc","owner":"mjclemente"},"chaiscript":{"title":"ChaiScript","require":["clike","cpp"],"owner":"RunDevelopment"},"cil":{"title":"CIL","owner":"sbrl"},"clojure":{"title":"Clojure","owner":"troglotit"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"cobol":{"title":"COBOL","owner":"RunDevelopment"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"coq":{"title":"Coq","owner":"RunDevelopment"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"csv":{"title":"CSV","owner":"RunDevelopment"},"cypher":{"title":"Cypher","owner":"RunDevelopment"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dataweave":{"title":"DataWeave","owner":"machaval"},"dax":{"title":"DAX","owner":"peterbud"},"dhall":{"title":"Dhall","owner":"RunDevelopment"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"dot":{"title":"DOT (Graphviz)","alias":"gv","optional":"markup","owner":"RunDevelopment"},"ebnf":{"title":"EBNF","owner":"RunDevelopment"},"editorconfig":{"title":"EditorConfig","owner":"osipxd"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"false":{"title":"False","owner":"edukisto"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"gap":{"title":"GAP (CAS)","owner":"RunDevelopment"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"c","owner":"Golmote"},"gn":{"title":"GN","alias":"gni","owner":"RunDevelopment"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","optional":"markdown","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","alias":"hbs","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"hlsl":{"title":"HLSL","require":"c","owner":"RunDevelopment"},"hoon":{"title":"Hoon","owner":"matildepark"},"http":{"title":"HTTP","optional":["css","javascript","json","markup","uri"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"icu-message-format":{"title":"ICU Message Format","owner":"RunDevelopment"},"idris":{"title":"Idris","alias":"idr","owner":"KeenS","require":"haskell"},"ignore":{"title":".ignore","owner":"osipxd","alias":["gitignore","hgignore","npmignore"],"aliasTitles":{"gitignore":".gitignore","hgignore":".hgignore","npmignore":".npmignore"}},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jexl":{"title":"Jexl","owner":"czosel"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike","typescript"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","alias":"webmanifest","aliasTitles":{"webmanifest":"Web App Manifest"},"owner":"CupOfTea696"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"jsstacktrace":{"title":"JS stack trace","owner":"sbrl"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup","sql"],"owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","alias":["kt","kts"],"aliasTitles":{"kts":"Kotlin Script"},"require":"clike","owner":"Golmote"},"kumir":{"title":"KuMir (КуМир)","alias":"kum","owner":"edukisto"},"kusto":{"title":"Kusto","owner":"RunDevelopment"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","require":"markup-templating","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"log":{"title":"Log file","optional":"javastacktrace","owner":"RunDevelopment"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"magma":{"title":"Magma (CAS)","owner":"RunDevelopment"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","optional":"yaml","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"maxscript":{"title":"MAXScript","owner":"RunDevelopment"},"mel":{"title":"MEL","owner":"Golmote"},"mermaid":{"title":"Mermaid","owner":"RunDevelopment"},"mizar":{"title":"Mizar","owner":"Golmote"},"mongodb":{"title":"MongoDB","owner":"airs0urce","require":"javascript"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"naniscript":{"title":"Naninovel Script","owner":"Elringus","alias":"nani"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nevod":{"title":"Nevod","owner":"nezaboodka"},"nginx":{"title":"nginx","owner":"volado"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"openqasm":{"title":"OpenQasm","alias":"qasm","owner":"RunDevelopment"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"psl":{"title":"PATROL Scripting Language","owner":"bertysentry"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":"markup-templating","owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"promql":{"title":"PromQL","owner":"arendjr"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"purebasic":{"title":"PureBasic","require":"clike","alias":"pbfasm","owner":"HeX0R101"},"purescript":{"title":"PureScript","require":"haskell","alias":"purs","owner":"sriharshachilakapati"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"qsharp":{"title":"Q#","require":"clike","alias":"qs","owner":"fedonman"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"racket":{"title":"Racket","require":"scheme","alias":"rkt","owner":"RunDevelopment"},"cshtml":{"title":"Razor C#","alias":"razor","require":["markup","csharp"],"optional":["css","css-extras","javascript","js-extras"],"owner":"RunDevelopment"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","owner":"RunDevelopment"},"rego":{"title":"Rego","owner":"JordanSh"},"renpy":{"title":"Ren'py","alias":"rpy","owner":"HyuchiaDiego"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","optional":"css-extras","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","alias":["sh-session","shellsession"],"owner":"RunDevelopment"},"smali":{"title":"Smali","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sml":{"title":"SML","alias":"smlnj","aliasTitles":{"smlnj":"SML/NJ"},"owner":"RunDevelopment"},"solidity":{"title":"Solidity (Ethereum)","alias":"sol","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"squirrel":{"title":"Squirrel","require":"clike","owner":"RunDevelopment"},"stan":{"title":"Stan","owner":"RunDevelopment"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","owner":"chrischares"},"systemd":{"title":"Systemd configuration file","owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","vbnet"],"owner":"RunDevelopment"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tremor":{"title":"Tremor","alias":["trickle","troy"],"owner":"darach","aliasTitles":{"trickle":"trickle","troy":"troy"}},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"typoscript":{"title":"TypoScript","alias":"tsconfig","aliasTitles":{"tsconfig":"TSConfig"},"owner":"dkern"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"uri":{"title":"URI","alias":"url","aliasTitles":{"url":"URL"},"owner":"RunDevelopment"},"v":{"title":"V","require":"clike","owner":"taggon"},"vala":{"title":"Vala","require":"clike","optional":"regex","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":["vb","vba"],"aliasTitles":{"vba":"VBA"},"owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"wolfram":{"title":"Wolfram language","alias":["mathematica","nb","wl"],"aliasTitles":{"mathematica":"Mathematica","nb":"Mathematica Notebook"},"owner":"msollami"},"wren":{"title":"Wren","owner":"clsource"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xml-doc":{"title":"XML doc (.net)","require":"markup","modify":["csharp","fsharp","vbnet"],"owner":"RunDevelopment"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"yang":{"title":"YANG","owner":"RunDevelopment"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword for fine-grained highlighting.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; if (typeof module !== 'undefined' && module.exports) { module.exports = components; } \ No newline at end of file diff --git a/components.json b/components.json index c1dff4b04c..1dac8a807d 100644 --- a/components.json +++ b/components.json @@ -1313,6 +1313,18 @@ "title": "TOML", "owner": "RunDevelopment" }, + "tremor": { + "title": "Tremor", + "alias": [ + "trickle", + "troy" + ], + "owner": "darach", + "aliasTitles": { + "trickle": "trickle", + "troy": "troy" + } + }, "turtle": { "title": "Turtle", "alias": "trig", diff --git a/components/prism-tremor.js b/components/prism-tremor.js new file mode 100644 index 0000000000..213d6c3e10 --- /dev/null +++ b/components/prism-tremor.js @@ -0,0 +1,68 @@ +(function (Prism) { + + Prism.languages.tremor = { + 'comment': { + pattern: /(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/, + lookbehind: true + }, + 'interpolated-string': null, // see below + 'extractor': { + pattern: /\b[a-z_]\w*\|(?:[^\r\n\\|]|\\(?:\r\n|[\s\S]))*\|/i, + greedy: true, + inside: { + 'function': /^\w+/, + 'regex': /\|[\s\S]+/, + } + }, + 'identifier': { + pattern: /`[^`]*`/, + greedy: true + }, + + 'function': /\b[a-z_]\w*(?=\s*(?:::\s*<|\())\b/, + + 'keyword': /\b(?:event|state|select|create|define|deploy|operator|script|connector|pipeline|flow|config|links|connect|to|from|into|with|group|by|args|window|stream|tumbling|sliding|where|having|set|each|emit|drop|const|let|for|match|of|case|when|default|end|patch|insert|update|erase|move|copy|merge|fn|intrinsic|recur|use|as|mod)\b/, + 'boolean': /\b(?:true|false|null)\b/i, + + 'number': /\b(?:0b[0-1_]*|0x[0-9a-fA-F_]*|\d[0-9_]*(?:\.\d[0-9_]*)?(?:[Ee][+-]?[0-9_]+)?)\b/, + + 'pattern-punctuation': { + pattern: /%(?=[({[])/, + alias: 'punctuation' + }, + 'operator': /[-+*\/%~!^]=?|=[=>]?|&[&=]?|\|[|=]?|<>?>?=?|(?:not|and|or|xor|present|absent)\b/, + 'punctuation': /::|[;\[\]()\{\},.:]/, + }; + + var interpolationPattern = /#\{(?:[^"{}]|\{[^{}]*\}|"(?:[^"\\\r\n]|\\(?:\r\n|[\s\S]))*")*\}/.source; + + Prism.languages.tremor['interpolated-string'] = { + pattern: RegExp( + /(^|[^\\])/.source + + '(?:' + + '"""(?:' + /[^"\\#]|\\[\s\S]|"(?!"")|#(?!\{)/.source + '|' + interpolationPattern + ')*"""' + + '|' + + '"(?:' + /[^"\\\r\n#]|\\(?:\r\n|[\s\S])|#(?!\{)/.source + '|' + interpolationPattern + ')*"' + + ')' + ), + lookbehind: true, + greedy: true, + inside: { + 'interpolation': { + pattern: RegExp(interpolationPattern), + inside: { + 'punctuation': /^#\{|\}$/, + 'expression': { + pattern: /[\s\S]+/, + inside: Prism.languages.tremor + } + } + }, + 'string': /[\s\S]+/ + } + }; + + Prism.languages.troy = Prism.languages['tremor']; + Prism.languages.trickle = Prism.languages['tremor']; + +}(Prism)); diff --git a/components/prism-tremor.min.js b/components/prism-tremor.min.js new file mode 100644 index 0000000000..a7b728ff06 --- /dev/null +++ b/components/prism-tremor.min.js @@ -0,0 +1 @@ +!function(e){e.languages.tremor={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},"interpolated-string":null,extractor:{pattern:/\b[a-z_]\w*\|(?:[^\r\n\\|]|\\(?:\r\n|[\s\S]))*\|/i,greedy:!0,inside:{function:/^\w+/,regex:/\|[\s\S]+/}},identifier:{pattern:/`[^`]*`/,greedy:!0},function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())\b/,keyword:/\b(?:event|state|select|create|define|deploy|operator|script|connector|pipeline|flow|config|links|connect|to|from|into|with|group|by|args|window|stream|tumbling|sliding|where|having|set|each|emit|drop|const|let|for|match|of|case|when|default|end|patch|insert|update|erase|move|copy|merge|fn|intrinsic|recur|use|as|mod)\b/,boolean:/\b(?:true|false|null)\b/i,number:/\b(?:0b[0-1_]*|0x[0-9a-fA-F_]*|\d[0-9_]*(?:\.\d[0-9_]*)?(?:[Ee][+-]?[0-9_]+)?)\b/,"pattern-punctuation":{pattern:/%(?=[({[])/,alias:"punctuation"},operator:/[-+*\/%~!^]=?|=[=>]?|&[&=]?|\|[|=]?|<>?>?=?|(?:not|and|or|xor|present|absent)\b/,punctuation:/::|[;\[\]()\{\},.:]/};var n='#\\{(?:[^"{}]|\\{[^{}]*\\}|"(?:[^"\\\\\r\n]|\\\\(?:\r\n|[^]))*")*\\}';e.languages.tremor["interpolated-string"]={pattern:RegExp('(^|[^\\\\])(?:"""(?:[^"\\\\#]|\\\\[^]|"(?!"")|#(?!\\{)|'+n+')*"""|"(?:[^"\\\\\r\n#]|\\\\(?:\r\n|[^])|#(?!\\{)|'+n+')*")'),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:RegExp(n),inside:{punctuation:/^#\{|\}$/,expression:{pattern:/[\s\S]+/,inside:e.languages.tremor}}},string:/[\s\S]+/}},e.languages.troy=e.languages.tremor,e.languages.trickle=e.languages.tremor}(Prism); \ No newline at end of file diff --git a/examples/prism-tremor.html b/examples/prism-tremor.html new file mode 100644 index 0000000000..c0c89e2753 --- /dev/null +++ b/examples/prism-tremor.html @@ -0,0 +1,82 @@ +

            Comments

            +
            # Single line comment
            +### Module level documentation comment
            +## Statement level documentation comment
            +# Regular code comment
            +
            + +

            Strings

            +
            
            +# double quote single line strings
            +"foo \"bar\" baz"
            +
            +# heredocs or multiline strings
            +"""
            +{ "snot": "badger" }
            +"""
            +
            + +

            Variables

            +
            
            +# Immutable constants
            +const snot = "fleek";
            +
            +# Mutable variables
            +let badger = "flook";
            +
            + +

            Operators

            +
            
            +merge {} of
            +  { "snot": "badger" }
            +end;
            +
            +patch {} of
            +  insert snot = "badger"
            +end;
            +
            + +

            Functions and keywords

            +
            
            +fn fib_(a, b, n) of
            +case (a, b, n) when n > 0 => recur(b, a + b, n - 1)
            +default => a
            +end;
            +
            +fn fib(n) with
            +fib_(0, 1, n)
            +end;
            +
            +fib(event)
            +
            + +

            Queries

            +
            
            +	define script fib
            +	script
            +        fn fib_(a, b, n) of
            +            case (a, b, n) when n > 0 => recur(b, a + b, n - 1)
            +            default => a
            +        end;
            +
            +        fn fib(n) with
            +            fib_(0, 1, n)
            +        end;
            +
            +		{ "fib": fib(event.n) }
            +	end;
            +
            +	create script fib;
            +	select event.n from in into fib;
            +	select event from fib into out;
            +
            + +

            Deployments

            +
            
            +define pipeline passthrough
            +pipeline
            +  select event from in into out;
            +end;
            +
            +deploy pipeline passthrough;
            +
            \ No newline at end of file diff --git a/plugins/autoloader/prism-autoloader.js b/plugins/autoloader/prism-autoloader.js index ae93dc13af..c3fe286080 100644 --- a/plugins/autoloader/prism-autoloader.js +++ b/plugins/autoloader/prism-autoloader.js @@ -239,6 +239,8 @@ "sln": "solution-file", "rq": "sparql", "t4": "t4-cs", + "trickle": "tremor", + "troy": "tremor", "trig": "turtle", "ts": "typescript", "tsconfig": "typoscript", diff --git a/plugins/autoloader/prism-autoloader.min.js b/plugins/autoloader/prism-autoloader.min.js index 6cd311883e..1cc0963358 100644 --- a/plugins/autoloader/prism-autoloader.min.js +++ b/plugins/autoloader/prism-autoloader.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof Prism&&"undefined"!=typeof document){var l={javascript:"clike",actionscript:"javascript",apex:["clike","sql"],arduino:"cpp",aspnet:["markup","csharp"],birb:"clike",bison:"c",c:"clike",csharp:"clike",cpp:"c",cfscript:"clike",chaiscript:["clike","cpp"],coffeescript:"javascript",crystal:"ruby","css-extras":"css",d:"clike",dart:"clike",django:"markup-templating",ejs:["javascript","markup-templating"],etlua:["lua","markup-templating"],erb:["ruby","markup-templating"],fsharp:"clike","firestore-security-rules":"clike",flow:"javascript",ftl:"markup-templating",gml:"clike",glsl:"c",go:"clike",groovy:"clike",haml:"ruby",handlebars:"markup-templating",haxe:"clike",hlsl:"c",idris:"haskell",java:"clike",javadoc:["markup","java","javadoclike"],jolie:"clike",jsdoc:["javascript","javadoclike","typescript"],"js-extras":"javascript",json5:"json",jsonp:"json","js-templates":"javascript",kotlin:"clike",latte:["clike","markup-templating","php"],less:"css",lilypond:"scheme",liquid:"markup-templating",markdown:"markup","markup-templating":"markup",mongodb:"javascript",n4js:"javascript",objectivec:"c",opencl:"c",parser:"markup",php:"markup-templating",phpdoc:["php","javadoclike"],"php-extras":"php",plsql:"sql",processing:"clike",protobuf:"clike",pug:["markup","javascript"],purebasic:"clike",purescript:"haskell",qsharp:"clike",qml:"javascript",qore:"clike",racket:"scheme",cshtml:["markup","csharp"],jsx:["markup","javascript"],tsx:["jsx","typescript"],reason:"clike",ruby:"clike",sass:"css",scss:"css",scala:"java","shell-session":"bash",smarty:"markup-templating",solidity:"clike",soy:"markup-templating",sparql:"turtle",sqf:"clike",squirrel:"clike","t4-cs":["t4-templating","csharp"],"t4-vb":["t4-templating","vbnet"],tap:"yaml",tt2:["clike","markup-templating"],textile:"markup",twig:"markup",typescript:"javascript",v:"clike",vala:"clike",vbnet:"basic",velocity:"markup",wiki:"markup",xeora:"markup","xml-doc":"markup",xquery:"markup"},n={html:"markup",xml:"markup",svg:"markup",mathml:"markup",ssml:"markup",atom:"markup",rss:"markup",js:"javascript",g4:"antlr4",adoc:"asciidoc",avs:"avisynth",avdl:"avro-idl",shell:"bash",shortcode:"bbcode",rbnf:"bnf",oscript:"bsl",cs:"csharp",dotnet:"csharp",cfc:"cfscript",coffee:"coffeescript",conc:"concurnas",jinja2:"django","dns-zone":"dns-zone-file",dockerfile:"docker",gv:"dot",eta:"ejs",xlsx:"excel-formula",xls:"excel-formula",gamemakerlanguage:"gml",gni:"gn",hbs:"handlebars",hs:"haskell",idr:"idris",gitignore:"ignore",hgignore:"ignore",npmignore:"ignore",webmanifest:"json",kt:"kotlin",kts:"kotlin",kum:"kumir",tex:"latex",context:"latex",ly:"lilypond",emacs:"lisp",elisp:"lisp","emacs-lisp":"lisp",md:"markdown",moon:"moonscript",n4jsd:"n4js",nani:"naniscript",objc:"objectivec",qasm:"openqasm",objectpascal:"pascal",px:"pcaxis",pcode:"peoplecode",pq:"powerquery",mscript:"powerquery",pbfasm:"purebasic",purs:"purescript",py:"python",qs:"qsharp",rkt:"racket",razor:"cshtml",rpy:"renpy",robot:"robotframework",rb:"ruby","sh-session":"shell-session",shellsession:"shell-session",smlnj:"sml",sol:"solidity",sln:"solution-file",rq:"sparql",t4:"t4-cs",trig:"turtle",ts:"typescript",tsconfig:"typoscript",uscript:"unrealscript",uc:"unrealscript",url:"uri",vb:"visual-basic",vba:"visual-basic",mathematica:"wolfram",nb:"wolfram",wl:"wolfram",xeoracube:"xeora",yml:"yaml"},p={},e="components/",a=Prism.util.currentScript();if(a){var r=/\bplugins\/autoloader\/prism-autoloader\.(?:min\.)?js(?:\?[^\r\n/]*)?$/i,s=/(^|\/)[\w-]+\.(?:min\.)?js(?:\?[^\r\n/]*)?$/i,i=a.getAttribute("data-autoloader-path");if(null!=i)e=i.trim().replace(/\/?$/,"/");else{var t=a.src;r.test(t)?e=t.replace(r,"components/"):s.test(t)&&(e=t.replace(s,"$1components/"))}}var o=Prism.plugins.autoloader={languages_path:e,use_minified:!0,loadLanguages:m};Prism.hooks.add("complete",function(e){var a=e.element,r=e.language;if(a&&r&&"none"!==r){var s=function(e){var a=(e.getAttribute("data-dependencies")||"").trim();if(!a){var r=e.parentElement;r&&"pre"===r.tagName.toLowerCase()&&(a=(r.getAttribute("data-dependencies")||"").trim())}return a?a.split(/\s*,\s*/g):[]}(a);/^diff-./i.test(r)?(s.push("diff"),s.push(r.substr("diff-".length))):s.push(r),s.every(u)||m(s,function(){Prism.highlightElement(a)})}})}function u(e){if(0<=e.indexOf("!"))return!1;if((e=n[e]||e)in Prism.languages)return!0;var a=p[e];return a&&!a.error&&!1===a.loading}function m(e,a,r){"string"==typeof e&&(e=[e]);var s=e.length,i=0,t=!1;function c(){t||++i===s&&a&&a(e)}0!==s?e.forEach(function(e){!function(a,r,s){var i=0<=a.indexOf("!");function e(){var e=p[a];e||(e=p[a]={callbacks:[]}),e.callbacks.push({success:r,error:s}),!i&&u(a)?k(a,"success"):!i&&e.error?k(a,"error"):!i&&e.loading||(e.loading=!0,e.error=!1,function(e,a,r){var s=document.createElement("script");s.src=e,s.async=!0,s.onload=function(){document.body.removeChild(s),a&&a()},s.onerror=function(){document.body.removeChild(s),r&&r()},document.body.appendChild(s)}(function(e){return o.languages_path+"prism-"+e+(o.use_minified?".min":"")+".js"}(a),function(){e.loading=!1,k(a,"success")},function(){e.loading=!1,e.error=!0,k(a,"error")}))}a=a.replace("!",""),a=n[a]||a;var t=l[a];t&&t.length?m(t,e,s):e()}(e,c,function(){t||(t=!0,r&&r(e))})}):a&&setTimeout(a,0)}function k(e,a){if(p[e]){for(var r=p[e].callbacks,s=0,i=r.length;sbat.*)$| +datetime|%Y-%m-%d %H:%M| + +---------------------------------------------------- + +[ + ["extractor", [ + ["function", "re"], + ["regex", "|^(?Pbat.*)$|"] + ]], + ["extractor", [ + ["function", "datetime"], + ["regex", "|%Y-%m-%d %H:%M|"] + ]] +] diff --git a/tests/languages/tremor/identifier_feature.test b/tests/languages/tremor/identifier_feature.test new file mode 100644 index 0000000000..c7fce26834 --- /dev/null +++ b/tests/languages/tremor/identifier_feature.test @@ -0,0 +1,12 @@ +foo +foo_bar_42 +`foo` +`bar` + +---------------------------------------------------- + +[ + "foo\r\nfoo_bar_42\r\n", + ["identifier", "`foo`"], + ["identifier", "`bar`"] +] diff --git a/tests/languages/tremor/keyword_escape_feature.test b/tests/languages/tremor/keyword_escape_feature.test new file mode 100644 index 0000000000..bd1ec9fb3a --- /dev/null +++ b/tests/languages/tremor/keyword_escape_feature.test @@ -0,0 +1,115 @@ +`args` +`as` +`by` +`case` +`config` +`connect` +`connector` +`const` +`copy` +`create` +`default` +`define` +`deploy` +`drop` +`each` +`emit` +`end` +`erase` +`event` +`flow` +`fn` +`for` +`from` +`group` +`having` +`insert` +`into` +`intrinsic` +`let` +`links` +`match` +`merge` +`mod` +`move` +`of` +`operator` +`patch` +`pipeline` +`recur` +`script` +`select` +`set` +`sliding` +`state` +`stream` +`to` +`tumbling` +`update` +`use` +`when` +`where` +`window` +`with` + +---------------------------------------------------- + +[ + ["identifier", "`args`"], + ["identifier", "`as`"], + ["identifier", "`by`"], + ["identifier", "`case`"], + ["identifier", "`config`"], + ["identifier", "`connect`"], + ["identifier", "`connector`"], + ["identifier", "`const`"], + ["identifier", "`copy`"], + ["identifier", "`create`"], + ["identifier", "`default`"], + ["identifier", "`define`"], + ["identifier", "`deploy`"], + ["identifier", "`drop`"], + ["identifier", "`each`"], + ["identifier", "`emit`"], + ["identifier", "`end`"], + ["identifier", "`erase`"], + ["identifier", "`event`"], + ["identifier", "`flow`"], + ["identifier", "`fn`"], + ["identifier", "`for`"], + ["identifier", "`from`"], + ["identifier", "`group`"], + ["identifier", "`having`"], + ["identifier", "`insert`"], + ["identifier", "`into`"], + ["identifier", "`intrinsic`"], + ["identifier", "`let`"], + ["identifier", "`links`"], + ["identifier", "`match`"], + ["identifier", "`merge`"], + ["identifier", "`mod`"], + ["identifier", "`move`"], + ["identifier", "`of`"], + ["identifier", "`operator`"], + ["identifier", "`patch`"], + ["identifier", "`pipeline`"], + ["identifier", "`recur`"], + ["identifier", "`script`"], + ["identifier", "`select`"], + ["identifier", "`set`"], + ["identifier", "`sliding`"], + ["identifier", "`state`"], + ["identifier", "`stream`"], + ["identifier", "`to`"], + ["identifier", "`tumbling`"], + ["identifier", "`update`"], + ["identifier", "`use`"], + ["identifier", "`when`"], + ["identifier", "`where`"], + ["identifier", "`window`"], + ["identifier", "`with`"] +] + +---------------------------------------------------- + +Checks for variables. diff --git a/tests/languages/tremor/keyword_feature.test b/tests/languages/tremor/keyword_feature.test new file mode 100644 index 0000000000..e65df8c8dc --- /dev/null +++ b/tests/languages/tremor/keyword_feature.test @@ -0,0 +1,115 @@ +args +as +by +case +config +connect +connector +const +copy +create +default +define +deploy +drop +each +emit +end +erase +event +flow +fn +for +from +group +having +insert +into +intrinsic +let +links +match +merge +mod +move +of +operator +patch +pipeline +recur +script +select +set +sliding +state +stream +to +tumbling +update +use +when +where +window +with + +---------------------------------------------------- + +[ + ["keyword", "args"], + ["keyword", "as"], + ["keyword", "by"], + ["keyword", "case"], + ["keyword", "config"], + ["keyword", "connect"], + ["keyword", "connector"], + ["keyword", "const"], + ["keyword", "copy"], + ["keyword", "create"], + ["keyword", "default"], + ["keyword", "define"], + ["keyword", "deploy"], + ["keyword", "drop"], + ["keyword", "each"], + ["keyword", "emit"], + ["keyword", "end"], + ["keyword", "erase"], + ["keyword", "event"], + ["keyword", "flow"], + ["keyword", "fn"], + ["keyword", "for"], + ["keyword", "from"], + ["keyword", "group"], + ["keyword", "having"], + ["keyword", "insert"], + ["keyword", "into"], + ["keyword", "intrinsic"], + ["keyword", "let"], + ["keyword", "links"], + ["keyword", "match"], + ["keyword", "merge"], + ["keyword", "mod"], + ["keyword", "move"], + ["keyword", "of"], + ["keyword", "operator"], + ["keyword", "patch"], + ["keyword", "pipeline"], + ["keyword", "recur"], + ["keyword", "script"], + ["keyword", "select"], + ["keyword", "set"], + ["keyword", "sliding"], + ["keyword", "state"], + ["keyword", "stream"], + ["keyword", "to"], + ["keyword", "tumbling"], + ["keyword", "update"], + ["keyword", "use"], + ["keyword", "when"], + ["keyword", "where"], + ["keyword", "window"], + ["keyword", "with"] +] + +---------------------------------------------------- + +Checks for keywords. diff --git a/tests/languages/tremor/modularity_feature.test b/tests/languages/tremor/modularity_feature.test new file mode 100644 index 0000000000..fd8ec5fe52 --- /dev/null +++ b/tests/languages/tremor/modularity_feature.test @@ -0,0 +1,36 @@ +foo +foo::bar +foo::bar::baz +`foo`::bar::`baz` +`foo` +`foo`::`bar`::`baz` + +---------------------------------------------------- + +[ + "foo\r\nfoo", + ["punctuation", "::"], + "bar\r\nfoo", + ["punctuation", "::"], + "bar", + ["punctuation", "::"], + "baz\r\n", + + ["identifier", "`foo`"], + ["punctuation", "::"], + "bar", + ["punctuation", "::"], + ["identifier", "`baz`"], + + ["identifier", "`foo`"], + + ["identifier", "`foo`"], + ["punctuation", "::"], + ["identifier", "`bar`"], + ["punctuation", "::"], + ["identifier", "`baz`"] +] + +---------------------------------------------------- + +Checks modularity and references for bare/namespaced variables diff --git a/tests/languages/tremor/number_feature.test b/tests/languages/tremor/number_feature.test new file mode 100644 index 0000000000..cc80672c43 --- /dev/null +++ b/tests/languages/tremor/number_feature.test @@ -0,0 +1,19 @@ +42 +0.154 +0xBadFace +0b10101010 +1_000_000_000 + +---------------------------------------------------- + +[ + ["number", "42"], + ["number", "0.154"], + ["number", "0xBadFace"], + ["number", "0b10101010"], + ["number", "1_000_000_000"] +] + +---------------------------------------------------- + +Checks for decimal and hexadecimal numbers. diff --git a/tests/languages/tremor/operator_feature.test b/tests/languages/tremor/operator_feature.test new file mode 100644 index 0000000000..226189cd9e --- /dev/null +++ b/tests/languages/tremor/operator_feature.test @@ -0,0 +1,61 @@ ++ - / * % ~ ^ & | ++= -= /= *= %= ~= ^= &= |= +== != < > <= >= += => + +! && || + +<< >> >>> +<<= >>= >>>= + +not and or xor present absent + +---------------------------------------------------- + +[ + ["operator", "+"], + ["operator", "-"], + ["operator", "/"], + ["operator", "*"], + ["operator", "%"], + ["operator", "~"], + ["operator", "^"], + ["operator", "&"], + ["operator", "|"], + + ["operator", "+="], + ["operator", "-="], + ["operator", "/="], + ["operator", "*="], + ["operator", "%="], + ["operator", "~="], + ["operator", "^="], + ["operator", "&="], + ["operator", "|="], + + ["operator", "=="], + ["operator", "!="], + ["operator", "<"], + ["operator", ">"], + ["operator", "<="], + ["operator", ">="], + + ["operator", "="], + ["operator", "=>"], + + ["operator", "!"], ["operator", "&&"], ["operator", "||"], + + ["operator", "<<"], ["operator", ">>"], ["operator", ">>>"], + ["operator", "<<="], ["operator", ">>="], ["operator", ">>>="], + + ["operator", "not"], + ["operator", "and"], + ["operator", "or"], + ["operator", "xor"], + ["operator", "present"], + ["operator", "absent"] +] + +---------------------------------------------------- + +Checks for operators diff --git a/tests/languages/tremor/punctuation_feature.test b/tests/languages/tremor/punctuation_feature.test new file mode 100644 index 0000000000..57cd9ac349 --- /dev/null +++ b/tests/languages/tremor/punctuation_feature.test @@ -0,0 +1,29 @@ +( ) [ ] { } +, ; . : +%( ) %[ ] %{ } + +---------------------------------------------------- + +[ + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", "["], + ["punctuation", "]"], + ["punctuation", "{"], + ["punctuation", "}"], + + ["punctuation", ","], + ["punctuation", ";"], + ["punctuation", "."], + ["punctuation", ":"], + + ["pattern-punctuation", "%"], + ["punctuation", "("], + ["punctuation", ")"], + ["pattern-punctuation", "%"], + ["punctuation", "["], + ["punctuation", "]"], + ["pattern-punctuation", "%"], + ["punctuation", "{"], + ["punctuation", "}"] +] diff --git a/tests/languages/tremor/string_feature.test b/tests/languages/tremor/string_feature.test new file mode 100644 index 0000000000..b9a5dea593 --- /dev/null +++ b/tests/languages/tremor/string_feature.test @@ -0,0 +1,87 @@ +"" +"" "" +""" +""" +"fo\"obar" +"foo\ +bar" +""" +multiline +""" +"snot#{badger}badger" +""" + I am + a + long + multi-line + string with #{ "#{a+1} interpolation" } +""" + +---------------------------------------------------- + +[ + ["interpolated-string", [ + ["string", "\"\""] + ]], + + ["interpolated-string", [ + ["string", "\"\""] + ]], + ["interpolated-string", [ + ["string", "\"\""] + ]], + + ["interpolated-string", [ + ["string", "\"\"\"\r\n\"\"\""] + ]], + + ["interpolated-string", [ + ["string", "\"fo\\\"obar\""] + ]], + + ["interpolated-string", [ + ["string", "\"foo\\\r\nbar\""] + ]], + + ["interpolated-string", [ + ["string", "\"\"\"\r\nmultiline\r\n\"\"\""] + ]], + + ["interpolated-string", [ + ["string", "\"snot"], + ["interpolation", [ + ["punctuation", "#{"], + ["expression", ["badger"]], + ["punctuation", "}"] + ]], + ["string", "badger\""] + ]], + + ["interpolated-string", [ + ["string", "\"\"\"\r\n I am\r\n a\r\n long\r\n multi-line\r\n string with "], + ["interpolation", [ + ["punctuation", "#{"], + ["expression", [ + ["interpolated-string", [ + ["string", "\""], + ["interpolation", [ + ["punctuation", "#{"], + ["expression", [ + "a", + ["operator", "+"], + ["number", "1"] + ]], + ["punctuation", "}"] + ]], + ["string", " interpolation\""] + ]] + ]], + ["punctuation", "}"] + ]], + ["string", "\r\n\"\"\""] + ]] +] + +---------------------------------------------------- + +Checks for strings. From e6e1d5ae50c78f517dcd40f74caa271f2d86b4a9 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Thu, 23 Sep 2021 10:50:49 +0200 Subject: [PATCH 0909/1100] Update `eslint-plugin-regexp@1.2.0` (#3091) --- package-lock.json | 25 +++++++++++++++++++++---- package.json | 2 +- 2 files changed, 22 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 1dd51a5234..0f3e1c68aa 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2371,16 +2371,17 @@ } }, "eslint-plugin-regexp": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-regexp/-/eslint-plugin-regexp-1.0.0.tgz", - "integrity": "sha512-TwNkkDS+Q5+gEaUTgEYEJzP5P8Y6c/UGxJkUsg6oc/DBWGT/5VJqCw0xhx/hhFT/HgfdABngTWKBBwtqTbjGuQ==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-regexp/-/eslint-plugin-regexp-1.2.0.tgz", + "integrity": "sha512-yHn5D8jTmT1gmPA4Dj2ut0aGg03CkgvpKu3kG/CEQ1OcUmkoykZsiXCysaENpq/BXs60WEpz+tN2n/h4lp+Q0Q==", "dev": true, "requires": { "comment-parser": "^1.1.2", "eslint-utils": "^3.0.0", + "grapheme-splitter": "^1.0.4", "jsdoctypeparser": "^9.0.0", "refa": "^0.9.0", - "regexp-ast-analysis": "^0.2.4", + "regexp-ast-analysis": "^0.3.0", "regexpp": "^3.2.0", "scslre": "^0.1.6" }, @@ -2393,6 +2394,16 @@ "requires": { "eslint-visitor-keys": "^2.0.0" } + }, + "regexp-ast-analysis": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/regexp-ast-analysis/-/regexp-ast-analysis-0.3.0.tgz", + "integrity": "sha512-11PlbBSUxwWpdj6BdZUKfhDdV9g+cveqHB+BqBQDBD7ZermDBVgtyowUaXTvT0dO3tZYo2bDIr/GoED6X1aYSA==", + "dev": true, + "requires": { + "refa": "^0.9.0", + "regexpp": "^3.2.0" + } } } }, @@ -3238,6 +3249,12 @@ "integrity": "sha512-a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ==", "dev": true }, + "grapheme-splitter": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz", + "integrity": "sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==", + "dev": true + }, "growl": { "version": "1.10.5", "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", diff --git a/package.json b/package.json index 52618f35c7..88dee8c102 100755 --- a/package.json +++ b/package.json @@ -42,7 +42,7 @@ "docdash": "^1.2.0", "eslint": "^7.22.0", "eslint-plugin-jsdoc": "^32.3.0", - "eslint-plugin-regexp": "^1.0.0", + "eslint-plugin-regexp": "^1.2.0", "gulp": "^4.0.2", "gulp-concat": "^2.3.4", "gulp-header": "^2.0.7", From 9f4c0e7490d866f8de58b534f5ed047ab833e06a Mon Sep 17 00:00:00 2001 From: Manuel Tercero Soria Date: Thu, 23 Sep 2021 13:43:00 +0200 Subject: [PATCH 0910/1100] Highlight Lines: Expose `highlightLines` function as `Prism.plugins.highlightLines` (#3086) --- .../line-highlight/prism-line-highlight.js | 221 +++++++++--------- .../prism-line-highlight.min.js | 2 +- 2 files changed, 113 insertions(+), 110 deletions(-) diff --git a/plugins/line-highlight/prism-line-highlight.js b/plugins/line-highlight/prism-line-highlight.js index d6a248d83a..1e615c2f49 100644 --- a/plugins/line-highlight/prism-line-highlight.js +++ b/plugins/line-highlight/prism-line-highlight.js @@ -112,137 +112,140 @@ var scrollIntoView = true; - /** - * Highlights the lines of the given pre. - * - * This function is split into a DOM measuring and mutate phase to improve performance. - * The returned function mutates the DOM when called. - * - * @param {HTMLElement} pre - * @param {string | null} [lines] - * @param {string} [classes=''] - * @returns {() => void} - */ - function highlightLines(pre, lines, classes) { - lines = typeof lines === 'string' ? lines : (pre.getAttribute('data-line') || ''); - - var ranges = lines.replace(/\s+/g, '').split(',').filter(Boolean); - var offset = +pre.getAttribute('data-line-offset') || 0; - - var parseMethod = isLineHeightRounded() ? parseInt : parseFloat; - var lineHeight = parseMethod(getComputedStyle(pre).lineHeight); - var hasLineNumbers = Prism.util.isActive(pre, LINE_NUMBERS_CLASS); - var codeElement = pre.querySelector('code'); - var parentElement = hasLineNumbers ? pre : codeElement || pre; - var mutateActions = /** @type {(() => void)[]} */ ([]); - + Prism.plugins.lineHighlight = { /** - * The top offset between the content box of the element and the content box of the parent element of - * the line highlight element (either `
            ` or ``).
            +		 * Highlights the lines of the given pre.
             		 *
            -		 * This offset might not be zero for some themes where the  element has a top margin. Some plugins
            -		 * (or users) might also add element above the  element. Because the line highlight is aligned relative
            -		 * to the 
             element, we have to take this into account.
            +		 * This function is split into a DOM measuring and mutate phase to improve performance.
            +		 * The returned function mutates the DOM when called.
             		 *
            -		 * This offset will be 0 if the parent element of the line highlight element is the `` element.
            +		 * @param {HTMLElement} pre
            +		 * @param {string | null} [lines]
            +		 * @param {string} [classes='']
            +		 * @returns {() => void}
             		 */
            -		var codePreOffset = !codeElement || parentElement == codeElement ? 0 : getContentBoxTopOffset(pre, codeElement);
            +		highlightLines: function highlightLines(pre, lines, classes) {
            +			lines = typeof lines === 'string' ? lines : (pre.getAttribute('data-line') || '');
            +
            +			var ranges = lines.replace(/\s+/g, '').split(',').filter(Boolean);
            +			var offset = +pre.getAttribute('data-line-offset') || 0;
            +
            +			var parseMethod = isLineHeightRounded() ? parseInt : parseFloat;
            +			var lineHeight = parseMethod(getComputedStyle(pre).lineHeight);
            +			var hasLineNumbers = Prism.util.isActive(pre, LINE_NUMBERS_CLASS);
            +			var codeElement = pre.querySelector('code');
            +			var parentElement = hasLineNumbers ? pre : codeElement || pre;
            +			var mutateActions = /** @type {(() => void)[]} */ ([]);
            +
            +			/**
            +			 * The top offset between the content box of the  element and the content box of the parent element of
            +			 * the line highlight element (either `
            ` or ``).
            +			 *
            +			 * This offset might not be zero for some themes where the  element has a top margin. Some plugins
            +			 * (or users) might also add element above the  element. Because the line highlight is aligned relative
            +			 * to the 
             element, we have to take this into account.
            +			 *
            +			 * This offset will be 0 if the parent element of the line highlight element is the `` element.
            +			 */
            +			var codePreOffset = !codeElement || parentElement == codeElement ? 0 : getContentBoxTopOffset(pre, codeElement);
            +
            +			ranges.forEach(function (currentRange) {
            +				var range = currentRange.split('-');
            +
            +				var start = +range[0];
            +				var end = +range[1] || start;
            +
            +				/** @type {HTMLElement} */
            +				var line = pre.querySelector('.line-highlight[data-range="' + currentRange + '"]') || document.createElement('div');
             
            -		ranges.forEach(function (currentRange) {
            -			var range = currentRange.split('-');
            +				mutateActions.push(function () {
            +					line.setAttribute('aria-hidden', 'true');
            +					line.setAttribute('data-range', currentRange);
            +					line.className = (classes || '') + ' line-highlight';
            +				});
             
            -			var start = +range[0];
            -			var end = +range[1] || start;
            +				// if the line-numbers plugin is enabled, then there is no reason for this plugin to display the line numbers
            +				if (hasLineNumbers && Prism.plugins.lineNumbers) {
            +					var startNode = Prism.plugins.lineNumbers.getLine(pre, start);
            +					var endNode = Prism.plugins.lineNumbers.getLine(pre, end);
             
            -			/** @type {HTMLElement} */
            -			var line = pre.querySelector('.line-highlight[data-range="' + currentRange + '"]') || document.createElement('div');
            +					if (startNode) {
            +						var top = startNode.offsetTop + codePreOffset + 'px';
            +						mutateActions.push(function () {
            +							line.style.top = top;
            +						});
            +					}
             
            -			mutateActions.push(function () {
            -				line.setAttribute('aria-hidden', 'true');
            -				line.setAttribute('data-range', currentRange);
            -				line.className = (classes || '') + ' line-highlight';
            -			});
            +					if (endNode) {
            +						var height = (endNode.offsetTop - startNode.offsetTop) + endNode.offsetHeight + 'px';
            +						mutateActions.push(function () {
            +							line.style.height = height;
            +						});
            +					}
            +				} else {
            +					mutateActions.push(function () {
            +						line.setAttribute('data-start', String(start));
             
            -			// if the line-numbers plugin is enabled, then there is no reason for this plugin to display the line numbers
            -			if (hasLineNumbers && Prism.plugins.lineNumbers) {
            -				var startNode = Prism.plugins.lineNumbers.getLine(pre, start);
            -				var endNode = Prism.plugins.lineNumbers.getLine(pre, end);
            +						if (end > start) {
            +							line.setAttribute('data-end', String(end));
            +						}
             
            -				if (startNode) {
            -					var top = startNode.offsetTop + codePreOffset + 'px';
            -					mutateActions.push(function () {
            -						line.style.top = top;
            -					});
            -				}
            +						line.style.top = (start - offset - 1) * lineHeight + codePreOffset + 'px';
             
            -				if (endNode) {
            -					var height = (endNode.offsetTop - startNode.offsetTop) + endNode.offsetHeight + 'px';
            -					mutateActions.push(function () {
            -						line.style.height = height;
            +						line.textContent = new Array(end - start + 2).join(' \n');
             					});
             				}
            -			} else {
            -				mutateActions.push(function () {
            -					line.setAttribute('data-start', String(start));
             
            -					if (end > start) {
            -						line.setAttribute('data-end', String(end));
            -					}
            -
            -					line.style.top = (start - offset - 1) * lineHeight + codePreOffset + 'px';
            -
            -					line.textContent = new Array(end - start + 2).join(' \n');
            +				mutateActions.push(function () {
            +					line.style.width = pre.scrollWidth + 'px';
             				});
            -			}
             
            -			mutateActions.push(function () {
            -				line.style.width = pre.scrollWidth + 'px';
            +				mutateActions.push(function () {
            +					// allow this to play nicely with the line-numbers plugin
            +					// need to attack to pre as when line-numbers is enabled, the code tag is relatively which screws up the positioning
            +					parentElement.appendChild(line);
            +				});
             			});
             
            -			mutateActions.push(function () {
            -				// allow this to play nicely with the line-numbers plugin
            -				// need to attack to pre as when line-numbers is enabled, the code tag is relatively which screws up the positioning
            -				parentElement.appendChild(line);
            -			});
            -		});
            +			var id = pre.id;
            +			if (hasLineNumbers && Prism.util.isActive(pre, LINKABLE_LINE_NUMBERS_CLASS) && id) {
            +				// This implements linkable line numbers. Linkable line numbers use Line Highlight to create a link to a
            +				// specific line. For this to work, the pre element has to:
            +				//  1) have line numbers,
            +				//  2) have the `linkable-line-numbers` class or an ascendant that has that class, and
            +				//  3) have an id.
             
            -		var id = pre.id;
            -		if (hasLineNumbers && Prism.util.isActive(pre, LINKABLE_LINE_NUMBERS_CLASS) && id) {
            -			// This implements linkable line numbers. Linkable line numbers use Line Highlight to create a link to a
            -			// specific line. For this to work, the pre element has to:
            -			//  1) have line numbers,
            -			//  2) have the `linkable-line-numbers` class or an ascendant that has that class, and
            -			//  3) have an id.
            +				if (!hasClass(pre, LINKABLE_LINE_NUMBERS_CLASS)) {
            +					// add class to pre
            +					mutateActions.push(function () {
            +						pre.classList.add(LINKABLE_LINE_NUMBERS_CLASS);
            +					});
            +				}
             
            -			if (!hasClass(pre, LINKABLE_LINE_NUMBERS_CLASS)) {
            -				// add class to pre
            -				mutateActions.push(function () {
            -					pre.classList.add(LINKABLE_LINE_NUMBERS_CLASS);
            +				var start = parseInt(pre.getAttribute('data-start') || '1');
            +
            +				// iterate all line number spans
            +				$$('.line-numbers-rows > span', pre).forEach(function (lineSpan, i) {
            +					var lineNumber = i + start;
            +					lineSpan.onclick = function () {
            +						var hash = id + '.' + lineNumber;
            +
            +						// this will prevent scrolling since the span is obviously in view
            +						scrollIntoView = false;
            +						location.hash = hash;
            +						setTimeout(function () {
            +							scrollIntoView = true;
            +						}, 1);
            +					};
             				});
             			}
             
            -			var start = parseInt(pre.getAttribute('data-start') || '1');
            -
            -			// iterate all line number spans
            -			$$('.line-numbers-rows > span', pre).forEach(function (lineSpan, i) {
            -				var lineNumber = i + start;
            -				lineSpan.onclick = function () {
            -					var hash = id + '.' + lineNumber;
            -
            -					// this will prevent scrolling since the span is obviously in view
            -					scrollIntoView = false;
            -					location.hash = hash;
            -					setTimeout(function () {
            -						scrollIntoView = true;
            -					}, 1);
            -				};
            -			});
            +			return function () {
            +				mutateActions.forEach(callFunction);
            +			};
             		}
            +	};
             
            -		return function () {
            -			mutateActions.forEach(callFunction);
            -		};
            -	}
             
             	function applyHash() {
             		var hash = location.hash.slice(1);
            @@ -269,7 +272,7 @@
             			pre.setAttribute('data-line', '');
             		}
             
            -		var mutateDom = highlightLines(pre, range, 'temporary ');
            +		var mutateDom = Prism.plugins.lineHighlight.highlightLines(pre, range, 'temporary ');
             		mutateDom();
             
             		if (scrollIntoView) {
            @@ -317,7 +320,7 @@
             		if (hasClass(pre, LINE_NUMBERS_CLASS) && hasLineNumbers && !isLineNumbersLoaded) {
             			Prism.hooks.add('line-numbers', completeHook);
             		} else {
            -			var mutateDom = highlightLines(pre);
            +			var mutateDom = Prism.plugins.lineHighlight.highlightLines(pre);
             			mutateDom();
             			fakeTimer = setTimeout(applyHash, 1);
             		}
            @@ -328,7 +331,7 @@
             		var actions = $$('pre')
             			.filter(isActiveFor)
             			.map(function (pre) {
            -				return highlightLines(pre);
            +				return Prism.plugins.lineHighlight.highlightLines(pre);
             			});
             		actions.forEach(callFunction);
             	});
            diff --git a/plugins/line-highlight/prism-line-highlight.min.js b/plugins/line-highlight/prism-line-highlight.min.js
            index 8d9a31e3bf..c1f640b45c 100644
            --- a/plugins/line-highlight/prism-line-highlight.min.js
            +++ b/plugins/line-highlight/prism-line-highlight.min.js
            @@ -1 +1 @@
            -!function(){if("undefined"!=typeof Prism&&"undefined"!=typeof document&&document.querySelector){var t,o="line-numbers",s="linkable-line-numbers",a=function(){if(void 0===t){var e=document.createElement("div");e.style.fontSize="13px",e.style.lineHeight="1.5",e.style.padding="0",e.style.border="0",e.innerHTML=" 
             ",document.body.appendChild(e),t=38===e.offsetHeight,document.body.removeChild(e)}return t},l=!0,u=0;Prism.hooks.add("before-sanity-check",function(e){var t=e.element.parentElement;if(c(t)){var n=0;v(".line-highlight",t).forEach(function(e){n+=e.textContent.length,e.parentNode.removeChild(e)}),n&&/^(?: \n)+$/.test(e.code.slice(-n))&&(e.code=e.code.slice(0,-n))}}),Prism.hooks.add("complete",function e(t){var n=t.element.parentElement;if(c(n)){clearTimeout(u);var i=Prism.plugins.lineNumbers,r=t.plugins&&t.plugins.lineNumbers;if(y(n,o)&&i&&!r)Prism.hooks.add("line-numbers",e);else d(n)(),u=setTimeout(f,1)}}),window.addEventListener("hashchange",f),window.addEventListener("resize",function(){v("pre").filter(c).map(function(e){return d(e)}).forEach(b)})}function v(e,t){return Array.prototype.slice.call((t||document).querySelectorAll(e))}function y(e,t){return e.classList.contains(t)}function b(e){e()}function c(e){return!(!e||!/pre/i.test(e.nodeName))&&(!!e.hasAttribute("data-line")||!(!e.id||!Prism.util.isActive(e,s)))}function d(u,e,c){var t=(e="string"==typeof e?e:u.getAttribute("data-line")||"").replace(/\s+/g,"").split(",").filter(Boolean),d=+u.getAttribute("data-line-offset")||0,f=(a()?parseInt:parseFloat)(getComputedStyle(u).lineHeight),p=Prism.util.isActive(u,o),n=u.querySelector("code"),h=p?u:n||u,m=[],g=n&&h!=n?function(e,t){var n=getComputedStyle(e),i=getComputedStyle(t);function r(e){return+e.substr(0,e.length-2)}return t.offsetTop+r(i.borderTopWidth)+r(i.paddingTop)-r(n.paddingTop)}(u,n):0;t.forEach(function(e){var t=e.split("-"),n=+t[0],i=+t[1]||n,r=u.querySelector('.line-highlight[data-range="'+e+'"]')||document.createElement("div");if(m.push(function(){r.setAttribute("aria-hidden","true"),r.setAttribute("data-range",e),r.className=(c||"")+" line-highlight"}),p&&Prism.plugins.lineNumbers){var o=Prism.plugins.lineNumbers.getLine(u,n),s=Prism.plugins.lineNumbers.getLine(u,i);if(o){var a=o.offsetTop+g+"px";m.push(function(){r.style.top=a})}if(s){var l=s.offsetTop-o.offsetTop+s.offsetHeight+"px";m.push(function(){r.style.height=l})}}else m.push(function(){r.setAttribute("data-start",String(n)),n span",u).forEach(function(e,t){var n=t+r;e.onclick=function(){var e=i+"."+n;l=!1,location.hash=e,setTimeout(function(){l=!0},1)}})}return function(){m.forEach(b)}}function f(){var e=location.hash.slice(1);v(".temporary.line-highlight").forEach(function(e){e.parentNode.removeChild(e)});var t=(e.match(/\.([\d,-]+)$/)||[,""])[1];if(t&&!document.getElementById(e)){var n=e.slice(0,e.lastIndexOf(".")),i=document.getElementById(n);if(i)i.hasAttribute("data-line")||i.setAttribute("data-line",""),d(i,t,"temporary ")(),l&&document.querySelector(".temporary.line-highlight").scrollIntoView()}}}(); \ No newline at end of file +!function(){if("undefined"!=typeof Prism&&"undefined"!=typeof document&&document.querySelector){var t,o="line-numbers",s="linkable-line-numbers",l=function(){if(void 0===t){var e=document.createElement("div");e.style.fontSize="13px",e.style.lineHeight="1.5",e.style.padding="0",e.style.border="0",e.innerHTML=" 
             ",document.body.appendChild(e),t=38===e.offsetHeight,document.body.removeChild(e)}return t},a=!0;Prism.plugins.lineHighlight={highlightLines:function(u,e,c){var t=(e="string"==typeof e?e:u.getAttribute("data-line")||"").replace(/\s+/g,"").split(",").filter(Boolean),d=+u.getAttribute("data-line-offset")||0,h=(l()?parseInt:parseFloat)(getComputedStyle(u).lineHeight),f=Prism.util.isActive(u,o),i=u.querySelector("code"),p=f?u:i||u,g=[],m=i&&p!=i?function(e,t){var i=getComputedStyle(e),n=getComputedStyle(t);function r(e){return+e.substr(0,e.length-2)}return t.offsetTop+r(n.borderTopWidth)+r(n.paddingTop)-r(i.paddingTop)}(u,i):0;t.forEach(function(e){var t=e.split("-"),i=+t[0],n=+t[1]||i,r=u.querySelector('.line-highlight[data-range="'+e+'"]')||document.createElement("div");if(g.push(function(){r.setAttribute("aria-hidden","true"),r.setAttribute("data-range",e),r.className=(c||"")+" line-highlight"}),f&&Prism.plugins.lineNumbers){var o=Prism.plugins.lineNumbers.getLine(u,i),s=Prism.plugins.lineNumbers.getLine(u,n);if(o){var l=o.offsetTop+m+"px";g.push(function(){r.style.top=l})}if(s){var a=s.offsetTop-o.offsetTop+s.offsetHeight+"px";g.push(function(){r.style.height=a})}}else g.push(function(){r.setAttribute("data-start",String(i)),i span",u).forEach(function(e,t){var i=t+r;e.onclick=function(){var e=n+"."+i;a=!1,location.hash=e,setTimeout(function(){a=!0},1)}})}return function(){g.forEach(b)}}};var u=0;Prism.hooks.add("before-sanity-check",function(e){var t=e.element.parentElement;if(c(t)){var i=0;v(".line-highlight",t).forEach(function(e){i+=e.textContent.length,e.parentNode.removeChild(e)}),i&&/^(?: \n)+$/.test(e.code.slice(-i))&&(e.code=e.code.slice(0,-i))}}),Prism.hooks.add("complete",function e(t){var i=t.element.parentElement;if(c(i)){clearTimeout(u);var n=Prism.plugins.lineNumbers,r=t.plugins&&t.plugins.lineNumbers;if(y(i,o)&&n&&!r)Prism.hooks.add("line-numbers",e);else Prism.plugins.lineHighlight.highlightLines(i)(),u=setTimeout(d,1)}}),window.addEventListener("hashchange",d),window.addEventListener("resize",function(){v("pre").filter(c).map(function(e){return Prism.plugins.lineHighlight.highlightLines(e)}).forEach(b)})}function v(e,t){return Array.prototype.slice.call((t||document).querySelectorAll(e))}function y(e,t){return e.classList.contains(t)}function b(e){e()}function c(e){return!(!e||!/pre/i.test(e.nodeName))&&(!!e.hasAttribute("data-line")||!(!e.id||!Prism.util.isActive(e,s)))}function d(){var e=location.hash.slice(1);v(".temporary.line-highlight").forEach(function(e){e.parentNode.removeChild(e)});var t=(e.match(/\.([\d,-]+)$/)||[,""])[1];if(t&&!document.getElementById(e)){var i=e.slice(0,e.lastIndexOf(".")),n=document.getElementById(i);if(n)n.hasAttribute("data-line")||n.setAttribute("data-line",""),Prism.plugins.lineHighlight.highlightLines(n,t,"temporary ")(),a&&document.querySelector(".temporary.line-highlight").scrollIntoView()}}}(); \ No newline at end of file From 213cf7be43ab7b7855597de03ee68967f0d195df Mon Sep 17 00:00:00 2001 From: Jake Archibald Date: Thu, 23 Sep 2021 16:33:24 +0100 Subject: [PATCH 0911/1100] Core: Document `disableWorkerMessageHandler` (#3088) Co-authored-by: Michael Schmidt --- components/prism-core.js | 21 +++++++++ docs/Prism.hooks.html | 8 ++-- docs/Prism.html | 99 ++++++++++++++++++++++++++++++++++++--- docs/Prism.languages.html | 8 ++-- docs/Token.html | 10 ++-- docs/global.html | 12 ++--- docs/index.html | 2 +- docs/prism-core.js.html | 23 ++++++++- prism.js | 21 +++++++++ 9 files changed, 177 insertions(+), 27 deletions(-) diff --git a/components/prism-core.js b/components/prism-core.js index cf77da513b..65145e1431 100644 --- a/components/prism-core.js +++ b/components/prism-core.js @@ -49,6 +49,27 @@ var Prism = (function (_self) { * @public */ manual: _self.Prism && _self.Prism.manual, + /** + * By default, if Prism is in a web worker, it assumes that it is in a worker it created itself, so it uses + * `addEventListener` to communicate with its parent instance. However, if you're using Prism manually in your + * own worker, you don't want it to do this. + * + * By setting this value to `true`, Prism will not add its own listeners to the worker. + * + * You obviously have to change this value before Prism executes. To do this, you can add an + * empty Prism object into the global scope before loading the Prism script like this: + * + * ```js + * window.Prism = window.Prism || {}; + * Prism.disableWorkerMessageHandler = true; + * // Load Prism's script + * ``` + * + * @default false + * @type {boolean} + * @memberof Prism + * @public + */ disableWorkerMessageHandler: _self.Prism && _self.Prism.disableWorkerMessageHandler, /** diff --git a/docs/Prism.hooks.html b/docs/Prism.hooks.html index 49fa666188..5b37950723 100644 --- a/docs/Prism.hooks.html +++ b/docs/Prism.hooks.html @@ -36,7 +36,7 @@ -

            Home

            PrismJS

            GitHub

            Classes

            Namespaces

            Global

            +

            Home

            PrismJS

            GitHub

            Classes

            Namespaces

            Global

            @@ -73,7 +73,7 @@

            Source:
            @@ -152,7 +152,7 @@

            (static) addSource:
            @@ -314,7 +314,7 @@

            (static) runSource:
            diff --git a/docs/Prism.html b/docs/Prism.html index 325c6b5443..0ed222d5df 100644 --- a/docs/Prism.html +++ b/docs/Prism.html @@ -36,7 +36,7 @@ -

            Home

            PrismJS

            GitHub

            Classes

            Namespaces

            Global

            +

            Home

            PrismJS

            GitHub

            Classes

            Namespaces

            Global

            @@ -155,6 +155,93 @@

            Members

            +

            (static) disableWorkerMessageHandler :boolean

            + + + + + +
            + + +
            Source:
            +
            + + + + + + + + + + + + + + + + + + + + + + + + + +
            Default Value:
            +
              +
            • false
            • +
            + + + + + + + +
            + + + + + +
            +

            By default, if Prism is in a web worker, it assumes that it is in a worker it created itself, so it uses +addEventListener to communicate with its parent instance. However, if you're using Prism manually in your +own worker, you don't want it to do this.

            +

            By setting this value to true, Prism will not add its own listeners to the worker.

            +

            You obviously have to change this value before Prism executes. To do this, you can add an +empty Prism object into the global scope before loading the Prism script like this:

            +
            window.Prism = window.Prism || {};
            +Prism.disableWorkerMessageHandler = true;
            +// Load Prism's script
            +
            +
            + + + +
            Type:
            +
              +
            • + +boolean + + +
            • +
            + + + + + + + +

            (static) manual :boolean

            @@ -263,7 +350,7 @@

            (static) hi
            Source:
            @@ -480,7 +567,7 @@

            (static) Source:
            @@ -676,7 +763,7 @@

            (static) <
            Source:
            @@ -911,7 +998,7 @@

            (static) Source:
            @@ -1157,7 +1244,7 @@

            (static) tok
            Source:
            diff --git a/docs/Prism.languages.html b/docs/Prism.languages.html index 34d849cbc9..9c63cbdc98 100644 --- a/docs/Prism.languages.html +++ b/docs/Prism.languages.html @@ -36,7 +36,7 @@ -

            Home

            PrismJS

            GitHub

            Classes

            Namespaces

            Global

            +

            Home

            PrismJS

            GitHub

            Classes

            Namespaces

            Global

            @@ -73,7 +73,7 @@

            Source:
            @@ -154,7 +154,7 @@

            (static) exten
            Source:
            @@ -354,7 +354,7 @@

            (static) Source:
            diff --git a/docs/Token.html b/docs/Token.html index 427442bd3a..e92d7e6ef1 100644 --- a/docs/Token.html +++ b/docs/Token.html @@ -36,7 +36,7 @@ -

            Home

            PrismJS

            GitHub

            Classes

            Namespaces

            Global

            +

            Home

            PrismJS

            GitHub

            Classes

            Namespaces

            Global

            @@ -80,7 +80,7 @@

            new TokenSource:
            @@ -364,7 +364,7 @@

            aliasSource:
            @@ -447,7 +447,7 @@

            contentSource:
            @@ -524,7 +524,7 @@

            typeSource:
            diff --git a/docs/global.html b/docs/global.html index 550ab58aa3..387c0688e0 100644 --- a/docs/global.html +++ b/docs/global.html @@ -36,7 +36,7 @@ -

            Home

            PrismJS

            GitHub

            Classes

            Namespaces

            Global

            +

            Home

            PrismJS

            GitHub

            Classes

            Namespaces

            Global

            @@ -143,7 +143,7 @@

            Grammar

            Source:
            @@ -274,7 +274,7 @@

            GrammarToken

            Source:
            @@ -559,7 +559,7 @@

            High
            Source:
            @@ -713,7 +713,7 @@

            HookCallb
            Source:
            @@ -859,7 +859,7 @@

            TokenStream

            Source:
            diff --git a/docs/index.html b/docs/index.html index 23c5e5bf18..fe4f203c73 100644 --- a/docs/index.html +++ b/docs/index.html @@ -36,7 +36,7 @@ -

            Home

            PrismJS

            GitHub

            Classes

            Namespaces

            Global

            +

            Home

            PrismJS

            GitHub

            Classes

            Namespaces

            Global

            diff --git a/docs/prism-core.js.html b/docs/prism-core.js.html index 6d6654abc3..1eef1d09ad 100644 --- a/docs/prism-core.js.html +++ b/docs/prism-core.js.html @@ -36,7 +36,7 @@ -

            Home

            PrismJS

            GitHub

            Classes

            Namespaces

            Global

            +

            Home

            PrismJS

            GitHub

            Classes

            Namespaces

            Global

            @@ -102,6 +102,27 @@

            prism-core.js

            * @public */ manual: _self.Prism && _self.Prism.manual, + /** + * By default, if Prism is in a web worker, it assumes that it is in a worker it created itself, so it uses + * `addEventListener` to communicate with its parent instance. However, if you're using Prism manually in your + * own worker, you don't want it to do this. + * + * By setting this value to `true`, Prism will not add its own listeners to the worker. + * + * You obviously have to change this value before Prism executes. To do this, you can add an + * empty Prism object into the global scope before loading the Prism script like this: + * + * ```js + * window.Prism = window.Prism || {}; + * Prism.disableWorkerMessageHandler = true; + * // Load Prism's script + * ``` + * + * @default false + * @type {boolean} + * @memberof Prism + * @public + */ disableWorkerMessageHandler: _self.Prism && _self.Prism.disableWorkerMessageHandler, /** diff --git a/prism.js b/prism.js index 6a72563cec..cde32af75a 100644 --- a/prism.js +++ b/prism.js @@ -54,6 +54,27 @@ var Prism = (function (_self) { * @public */ manual: _self.Prism && _self.Prism.manual, + /** + * By default, if Prism is in a web worker, it assumes that it is in a worker it created itself, so it uses + * `addEventListener` to communicate with its parent instance. However, if you're using Prism manually in your + * own worker, you don't want it to do this. + * + * By setting this value to `true`, Prism will not add its own listeners to the worker. + * + * You obviously have to change this value before Prism executes. To do this, you can add an + * empty Prism object into the global scope before loading the Prism script like this: + * + * ```js + * window.Prism = window.Prism || {}; + * Prism.disableWorkerMessageHandler = true; + * // Load Prism's script + * ``` + * + * @default false + * @type {boolean} + * @memberof Prism + * @public + */ disableWorkerMessageHandler: _self.Prism && _self.Prism.disableWorkerMessageHandler, /** From e2630d890e9ced30a79cdf9ef272601ceeaedccf Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Sun, 26 Sep 2021 11:52:18 +0200 Subject: [PATCH 0912/1100] ESLint: Added `regexp/sort-alternatives` rule (#3093) --- .eslintrc.js | 1 + components/prism-actionscript.js | 2 +- components/prism-actionscript.min.js | 2 +- components/prism-ada.js | 4 +- components/prism-ada.min.js | 2 +- components/prism-al.js | 4 +- components/prism-al.min.js | 2 +- components/prism-apacheconf.js | 2 +- components/prism-apacheconf.min.js | 2 +- components/prism-apex.js | 2 +- components/prism-apex.min.js | 2 +- components/prism-applescript.js | 4 +- components/prism-applescript.min.js | 2 +- components/prism-aql.js | 2 +- components/prism-aql.min.js | 2 +- components/prism-arduino.js | 6 +- components/prism-arduino.min.js | 2 +- components/prism-asciidoc.js | 4 +- components/prism-asciidoc.min.js | 2 +- components/prism-asm6502.js | 2 +- components/prism-asm6502.min.js | 2 +- components/prism-autohotkey.js | 8 +-- components/prism-autohotkey.min.js | 2 +- components/prism-autoit.js | 6 +- components/prism-autoit.min.js | 2 +- components/prism-avisynth.js | 58 +++++++++---------- components/prism-avisynth.min.js | 2 +- components/prism-avro-idl.js | 2 +- components/prism-avro-idl.min.js | 2 +- components/prism-bash.js | 10 ++-- components/prism-bash.min.js | 2 +- components/prism-basic.js | 2 +- components/prism-basic.min.js | 2 +- components/prism-batch.js | 8 +-- components/prism-batch.min.js | 2 +- components/prism-bicep.js | 4 +- components/prism-bicep.min.js | 2 +- components/prism-birb.js | 2 +- components/prism-birb.min.js | 2 +- components/prism-brightscript.js | 2 +- components/prism-brightscript.min.js | 2 +- components/prism-bro.js | 10 ++-- components/prism-bro.min.js | 2 +- components/prism-bsl.js | 4 +- components/prism-bsl.min.js | 2 +- components/prism-c.js | 4 +- components/prism-c.min.js | 2 +- components/prism-cil.js | 6 +- components/prism-cil.min.js | 2 +- components/prism-clike.js | 6 +- components/prism-clike.min.js | 2 +- components/prism-clojure.js | 2 +- components/prism-clojure.min.js | 2 +- components/prism-cmake.js | 8 +-- components/prism-cmake.min.js | 2 +- components/prism-cobol.js | 2 +- components/prism-cobol.min.js | 2 +- components/prism-coq.js | 2 +- components/prism-coq.min.js | 2 +- components/prism-cpp.js | 6 +- components/prism-cpp.min.js | 2 +- components/prism-crystal.js | 2 +- components/prism-crystal.min.js | 2 +- components/prism-csharp.js | 4 +- components/prism-csharp.min.js | 2 +- components/prism-css-extras.js | 2 +- components/prism-css-extras.min.js | 2 +- components/prism-cypher.js | 2 +- components/prism-cypher.min.js | 2 +- components/prism-d.js | 4 +- components/prism-d.min.js | 2 +- components/prism-dart.js | 2 +- components/prism-dart.min.js | 2 +- components/prism-dataweave.js | 6 +- components/prism-dataweave.min.js | 2 +- components/prism-dax.js | 4 +- components/prism-dax.min.js | 2 +- components/prism-dhall.js | 2 +- components/prism-dhall.min.js | 2 +- components/prism-django.js | 2 +- components/prism-django.min.js | 2 +- components/prism-dns-zone-file.js | 4 +- components/prism-dns-zone-file.min.js | 2 +- components/prism-dot.js | 2 +- components/prism-dot.min.js | 2 +- components/prism-eiffel.js | 4 +- components/prism-eiffel.min.js | 2 +- components/prism-elixir.js | 2 +- components/prism-elixir.min.js | 2 +- components/prism-elm.js | 2 +- components/prism-elm.min.js | 2 +- components/prism-erlang.js | 6 +- components/prism-erlang.min.js | 2 +- components/prism-excel-formula.js | 2 +- components/prism-excel-formula.min.js | 2 +- components/prism-factor.js | 6 +- components/prism-factor.min.js | 2 +- components/prism-flow.js | 6 +- components/prism-flow.min.js | 2 +- components/prism-fortran.js | 6 +- components/prism-fortran.min.js | 2 +- components/prism-fsharp.js | 8 +-- components/prism-fsharp.min.js | 2 +- components/prism-ftl.js | 2 +- components/prism-ftl.min.js | 2 +- components/prism-gdscript.js | 2 +- components/prism-gdscript.min.js | 2 +- components/prism-gherkin.js | 6 +- components/prism-gherkin.min.js | 2 +- components/prism-glsl.js | 2 +- components/prism-glsl.min.js | 2 +- components/prism-gml.js | 8 +-- components/prism-gml.min.js | 2 +- components/prism-gn.js | 4 +- components/prism-gn.min.js | 2 +- components/prism-go.js | 4 +- components/prism-go.min.js | 2 +- components/prism-graphql.js | 2 +- components/prism-graphql.min.js | 2 +- components/prism-groovy.js | 4 +- components/prism-groovy.min.js | 2 +- components/prism-handlebars.js | 2 +- components/prism-handlebars.min.js | 2 +- components/prism-haskell.js | 4 +- components/prism-haskell.min.js | 2 +- components/prism-haxe.js | 2 +- components/prism-haxe.min.js | 2 +- components/prism-hcl.js | 12 ++-- components/prism-hcl.min.js | 2 +- components/prism-hlsl.js | 2 +- components/prism-hlsl.min.js | 2 +- components/prism-http.js | 2 +- components/prism-http.min.js | 2 +- components/prism-ichigojam.js | 2 +- components/prism-ichigojam.min.js | 2 +- components/prism-icu-message-format.js | 6 +- components/prism-icu-message-format.min.js | 2 +- components/prism-iecst.js | 12 ++-- components/prism-iecst.min.js | 2 +- components/prism-inform7.js | 12 ++-- components/prism-inform7.min.js | 2 +- components/prism-io.js | 8 +-- components/prism-io.min.js | 2 +- components/prism-j.js | 4 +- components/prism-j.min.js | 2 +- components/prism-javadoc.js | 2 +- components/prism-javadoc.min.js | 2 +- components/prism-javadoclike.js | 2 +- components/prism-javadoclike.min.js | 2 +- components/prism-javascript.js | 4 +- components/prism-javascript.min.js | 2 +- components/prism-javastacktrace.js | 2 +- components/prism-javastacktrace.min.js | 2 +- components/prism-jexl.js | 2 +- components/prism-jexl.min.js | 2 +- components/prism-jolie.js | 6 +- components/prism-jolie.min.js | 2 +- components/prism-jq.js | 4 +- components/prism-jq.min.js | 2 +- components/prism-js-extras.js | 6 +- components/prism-js-extras.min.js | 2 +- components/prism-js-templates.js | 2 +- components/prism-js-templates.min.js | 2 +- components/prism-jsdoc.js | 4 +- components/prism-jsdoc.min.js | 2 +- components/prism-json.js | 2 +- components/prism-json.min.js | 2 +- components/prism-julia.js | 4 +- components/prism-julia.min.js | 2 +- components/prism-keyman.js | 12 ++-- components/prism-keyman.min.js | 2 +- components/prism-kusto.js | 8 +-- components/prism-kusto.min.js | 2 +- components/prism-latex.js | 8 +-- components/prism-latex.min.js | 2 +- components/prism-liquid.js | 6 +- components/prism-liquid.min.js | 2 +- components/prism-lisp.js | 12 ++-- components/prism-lisp.min.js | 2 +- components/prism-livescript.js | 2 +- components/prism-livescript.min.js | 2 +- components/prism-llvm.js | 2 +- components/prism-llvm.min.js | 2 +- components/prism-log.js | 10 ++-- components/prism-log.min.js | 2 +- components/prism-lolcode.js | 10 ++-- components/prism-lolcode.min.js | 2 +- components/prism-makefile.js | 2 +- components/prism-makefile.min.js | 2 +- components/prism-matlab.js | 2 +- components/prism-matlab.min.js | 2 +- components/prism-maxscript.js | 4 +- components/prism-maxscript.min.js | 2 +- components/prism-mel.js | 2 +- components/prism-mel.min.js | 2 +- components/prism-mizar.js | 2 +- components/prism-mizar.min.js | 2 +- components/prism-mongodb.js | 2 +- components/prism-mongodb.min.js | 2 +- components/prism-monkey.js | 2 +- components/prism-monkey.min.js | 2 +- components/prism-moonscript.js | 2 +- components/prism-moonscript.min.js | 2 +- components/prism-n1ql.js | 4 +- components/prism-n1ql.min.js | 2 +- components/prism-n4js.js | 2 +- components/prism-n4js.min.js | 2 +- components/prism-nand2tetris-hdl.js | 4 +- components/prism-nand2tetris-hdl.min.js | 2 +- components/prism-nasm.js | 4 +- components/prism-nasm.min.js | 2 +- components/prism-neon.js | 2 +- components/prism-neon.min.js | 2 +- components/prism-nevod.js | 4 +- components/prism-nevod.min.js | 2 +- components/prism-nim.js | 2 +- components/prism-nim.min.js | 2 +- components/prism-nix.js | 4 +- components/prism-nix.min.js | 2 +- components/prism-nsis.js | 6 +- components/prism-nsis.min.js | 2 +- components/prism-objectivec.js | 2 +- components/prism-objectivec.min.js | 2 +- components/prism-opencl.js | 14 ++--- components/prism-opencl.min.js | 2 +- components/prism-openqasm.js | 6 +- components/prism-openqasm.min.js | 2 +- components/prism-parser.js | 2 +- components/prism-parser.min.js | 2 +- components/prism-pascaligo.js | 2 +- components/prism-pascaligo.min.js | 2 +- components/prism-pcaxis.js | 2 +- components/prism-pcaxis.min.js | 2 +- components/prism-peoplecode.js | 2 +- components/prism-peoplecode.min.js | 2 +- components/prism-perl.js | 16 ++--- components/prism-perl.min.js | 2 +- components/prism-php-extras.js | 4 +- components/prism-php-extras.min.js | 2 +- components/prism-php.js | 16 ++--- components/prism-php.min.js | 2 +- components/prism-phpdoc.js | 2 +- components/prism-phpdoc.min.js | 2 +- components/prism-plsql.js | 2 +- components/prism-plsql.min.js | 2 +- components/prism-powerquery.js | 18 +++--- components/prism-powerquery.min.js | 2 +- components/prism-powershell.js | 4 +- components/prism-powershell.min.js | 2 +- components/prism-processing.js | 2 +- components/prism-processing.min.js | 2 +- components/prism-promql.js | 2 +- components/prism-promql.min.js | 2 +- components/prism-protobuf.js | 2 +- components/prism-protobuf.min.js | 2 +- components/prism-psl.js | 6 +- components/prism-psl.min.js | 2 +- components/prism-pug.js | 6 +- components/prism-pug.min.js | 2 +- components/prism-puppet.js | 2 +- components/prism-puppet.min.js | 2 +- components/prism-pure.js | 4 +- components/prism-pure.min.js | 2 +- components/prism-purebasic.js | 6 +- components/prism-purebasic.min.js | 2 +- components/prism-purescript.js | 2 +- components/prism-purescript.min.js | 2 +- components/prism-python.js | 8 +-- components/prism-python.min.js | 2 +- components/prism-q.js | 2 +- components/prism-q.min.js | 2 +- components/prism-qore.js | 4 +- components/prism-qore.min.js | 2 +- components/prism-qsharp.js | 2 +- components/prism-qsharp.min.js | 2 +- components/prism-r.js | 6 +- components/prism-r.min.js | 2 +- components/prism-reason.js | 2 +- components/prism-reason.min.js | 2 +- components/prism-regex.js | 2 +- components/prism-regex.min.js | 2 +- components/prism-rego.js | 4 +- components/prism-rego.min.js | 2 +- components/prism-renpy.js | 12 ++-- components/prism-renpy.min.js | 2 +- components/prism-rip.js | 4 +- components/prism-rip.min.js | 2 +- components/prism-roboconf.js | 2 +- components/prism-roboconf.min.js | 2 +- components/prism-ruby.js | 4 +- components/prism-ruby.min.js | 2 +- components/prism-rust.js | 6 +- components/prism-rust.min.js | 2 +- components/prism-sas.js | 32 +++++----- components/prism-sas.min.js | 2 +- components/prism-sass.js | 2 +- components/prism-sass.min.js | 2 +- components/prism-scala.js | 2 +- components/prism-scala.min.js | 2 +- components/prism-scheme.js | 2 +- components/prism-scheme.min.js | 2 +- components/prism-scss.js | 8 +-- components/prism-scss.min.js | 2 +- components/prism-smali.js | 2 +- components/prism-smali.min.js | 2 +- components/prism-smalltalk.js | 2 +- components/prism-smalltalk.min.js | 2 +- components/prism-smarty.js | 4 +- components/prism-smarty.min.js | 2 +- components/prism-solidity.js | 2 +- components/prism-solidity.min.js | 2 +- components/prism-soy.js | 4 +- components/prism-soy.min.js | 2 +- components/prism-sparql.js | 6 +- components/prism-sparql.min.js | 2 +- components/prism-sqf.js | 6 +- components/prism-sqf.min.js | 2 +- components/prism-sql.js | 6 +- components/prism-sql.min.js | 2 +- components/prism-squirrel.js | 2 +- components/prism-squirrel.min.js | 2 +- components/prism-stylus.js | 8 +-- components/prism-stylus.min.js | 2 +- components/prism-swift.js | 4 +- components/prism-swift.min.js | 2 +- components/prism-tcl.js | 8 +-- components/prism-tcl.min.js | 2 +- components/prism-textile.js | 2 +- components/prism-textile.min.js | 2 +- components/prism-toml.js | 2 +- components/prism-toml.min.js | 2 +- components/prism-tremor.js | 6 +- components/prism-tremor.min.js | 2 +- components/prism-tt2.js | 4 +- components/prism-tt2.min.js | 2 +- components/prism-turtle.js | 4 +- components/prism-turtle.min.js | 2 +- components/prism-twig.js | 4 +- components/prism-twig.min.js | 2 +- components/prism-typescript.js | 2 +- components/prism-typescript.min.js | 2 +- components/prism-unrealscript.js | 2 +- components/prism-unrealscript.min.js | 2 +- components/prism-v.js | 6 +- components/prism-v.min.js | 2 +- components/prism-vala.js | 4 +- components/prism-vala.min.js | 2 +- components/prism-vbnet.js | 2 +- components/prism-vbnet.min.js | 2 +- components/prism-velocity.js | 2 +- components/prism-velocity.min.js | 2 +- components/prism-verilog.js | 4 +- components/prism-verilog.min.js | 2 +- components/prism-vhdl.js | 6 +- components/prism-vhdl.min.js | 2 +- components/prism-vim.js | 4 +- components/prism-vim.min.js | 2 +- components/prism-visual-basic.js | 6 +- components/prism-visual-basic.min.js | 2 +- components/prism-warpscript.js | 2 +- components/prism-warpscript.min.js | 2 +- components/prism-wasm.js | 2 +- components/prism-wasm.min.js | 2 +- components/prism-wiki.js | 2 +- components/prism-wiki.min.js | 2 +- components/prism-wolfram.js | 2 +- components/prism-wolfram.min.js | 2 +- components/prism-wren.js | 2 +- components/prism-wren.min.js | 2 +- components/prism-xojo.js | 6 +- components/prism-xojo.min.js | 2 +- components/prism-xquery.js | 2 +- components/prism-xquery.min.js | 2 +- components/prism-yaml.js | 2 +- components/prism-yaml.min.js | 2 +- components/prism-zig.js | 2 +- components/prism-zig.min.js | 2 +- gulpfile.js/changelog.js | 2 +- plugins/match-braces/prism-match-braces.js | 2 +- .../match-braces/prism-match-braces.min.js | 2 +- plugins/previewers/prism-previewers.js | 10 ++-- plugins/previewers/prism-previewers.min.js | 2 +- prism.js | 10 ++-- tests/examples-test.js | 2 +- 384 files changed, 648 insertions(+), 647 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 0d98692033..1737156f66 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -77,6 +77,7 @@ module.exports = { 'regexp/no-useless-character-class': 'warn', 'regexp/no-useless-lazy': 'warn', 'regexp/prefer-w': 'warn', + 'regexp/sort-alternatives': 'warn', 'regexp/sort-flags': 'warn', 'regexp/strict': 'warn', diff --git a/components/prism-actionscript.js b/components/prism-actionscript.js index 7182fdbbb9..6d91121632 100644 --- a/components/prism-actionscript.js +++ b/components/prism-actionscript.js @@ -1,5 +1,5 @@ Prism.languages.actionscript = Prism.languages.extend('javascript', { - 'keyword': /\b(?:as|break|case|catch|class|const|default|delete|do|else|extends|finally|for|function|if|implements|import|in|instanceof|interface|internal|is|native|new|null|package|private|protected|public|return|super|switch|this|throw|try|typeof|use|var|void|while|with|dynamic|each|final|get|include|namespace|override|set|static)\b/, + 'keyword': /\b(?:as|break|case|catch|class|const|default|delete|do|dynamic|each|else|extends|final|finally|for|function|get|if|implements|import|in|include|instanceof|interface|internal|is|namespace|native|new|null|override|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|use|var|void|while|with)\b/, 'operator': /\+\+|--|(?:[+\-*\/%^]|&&?|\|\|?|<>?>?|[!=]=?)=?|[~?@]/ }); Prism.languages.actionscript['class-name'].alias = 'function'; diff --git a/components/prism-actionscript.min.js b/components/prism-actionscript.min.js index cf1b0a6781..187430b78d 100644 --- a/components/prism-actionscript.min.js +++ b/components/prism-actionscript.min.js @@ -1 +1 @@ -Prism.languages.actionscript=Prism.languages.extend("javascript",{keyword:/\b(?:as|break|case|catch|class|const|default|delete|do|else|extends|finally|for|function|if|implements|import|in|instanceof|interface|internal|is|native|new|null|package|private|protected|public|return|super|switch|this|throw|try|typeof|use|var|void|while|with|dynamic|each|final|get|include|namespace|override|set|static)\b/,operator:/\+\+|--|(?:[+\-*\/%^]|&&?|\|\|?|<>?>?|[!=]=?)=?|[~?@]/}),Prism.languages.actionscript["class-name"].alias="function",Prism.languages.markup&&Prism.languages.insertBefore("actionscript","string",{xml:{pattern:/(^|[^.])<\/?\w+(?:\s+[^\s>\/=]+=("|')(?:\\[\s\S]|(?!\2)[^\\])*\2)*\s*\/?>/,lookbehind:!0,inside:Prism.languages.markup}}); \ No newline at end of file +Prism.languages.actionscript=Prism.languages.extend("javascript",{keyword:/\b(?:as|break|case|catch|class|const|default|delete|do|dynamic|each|else|extends|final|finally|for|function|get|if|implements|import|in|include|instanceof|interface|internal|is|namespace|native|new|null|override|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|use|var|void|while|with)\b/,operator:/\+\+|--|(?:[+\-*\/%^]|&&?|\|\|?|<>?>?|[!=]=?)=?|[~?@]/}),Prism.languages.actionscript["class-name"].alias="function",Prism.languages.markup&&Prism.languages.insertBefore("actionscript","string",{xml:{pattern:/(^|[^.])<\/?\w+(?:\s+[^\s>\/=]+=("|')(?:\\[\s\S]|(?!\2)[^\\])*\2)*\s*\/?>/,lookbehind:!0,inside:Prism.languages.markup}}); \ No newline at end of file diff --git a/components/prism-ada.js b/components/prism-ada.js index a2fb223a7a..b01af741d7 100644 --- a/components/prism-ada.js +++ b/components/prism-ada.js @@ -10,8 +10,8 @@ Prism.languages.ada = { } ], 'attr-name': /\b'\w+/i, - 'keyword': /\b(?:abort|abs|abstract|accept|access|aliased|all|and|array|at|begin|body|case|constant|declare|delay|delta|digits|do|else|new|return|elsif|end|entry|exception|exit|for|function|generic|goto|if|in|interface|is|limited|loop|mod|not|null|of|others|out|overriding|package|pragma|private|procedure|protected|raise|range|record|rem|renames|requeue|reverse|select|separate|some|subtype|synchronized|tagged|task|terminate|then|type|until|use|when|while|with|xor)\b/i, - 'boolean': /\b(?:true|false)\b/i, + 'keyword': /\b(?:abort|abs|abstract|accept|access|aliased|all|and|array|at|begin|body|case|constant|declare|delay|delta|digits|do|else|elsif|end|entry|exception|exit|for|function|generic|goto|if|in|interface|is|limited|loop|mod|new|not|null|of|others|out|overriding|package|pragma|private|procedure|protected|raise|range|record|rem|renames|requeue|return|reverse|select|separate|some|subtype|synchronized|tagged|task|terminate|then|type|until|use|when|while|with|xor)\b/i, + 'boolean': /\b(?:false|true)\b/i, 'operator': /<[=>]?|>=?|=>?|:=|\/=?|\*\*?|[&+-]/, 'punctuation': /\.\.?|[,;():]/, 'char': /'.'/, diff --git a/components/prism-ada.min.js b/components/prism-ada.min.js index 246e004790..9ae2457461 100644 --- a/components/prism-ada.min.js +++ b/components/prism-ada.min.js @@ -1 +1 @@ -Prism.languages.ada={comment:/--.*/,string:/"(?:""|[^"\r\f\n])*"/i,number:[{pattern:/\b\d(?:_?\d)*#[\dA-F](?:_?[\dA-F])*(?:\.[\dA-F](?:_?[\dA-F])*)?#(?:E[+-]?\d(?:_?\d)*)?/i},{pattern:/\b\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:E[+-]?\d(?:_?\d)*)?\b/i}],"attr-name":/\b'\w+/i,keyword:/\b(?:abort|abs|abstract|accept|access|aliased|all|and|array|at|begin|body|case|constant|declare|delay|delta|digits|do|else|new|return|elsif|end|entry|exception|exit|for|function|generic|goto|if|in|interface|is|limited|loop|mod|not|null|of|others|out|overriding|package|pragma|private|procedure|protected|raise|range|record|rem|renames|requeue|reverse|select|separate|some|subtype|synchronized|tagged|task|terminate|then|type|until|use|when|while|with|xor)\b/i,boolean:/\b(?:true|false)\b/i,operator:/<[=>]?|>=?|=>?|:=|\/=?|\*\*?|[&+-]/,punctuation:/\.\.?|[,;():]/,char:/'.'/,variable:/\b[a-z](?:\w)*\b/i}; \ No newline at end of file +Prism.languages.ada={comment:/--.*/,string:/"(?:""|[^"\r\f\n])*"/i,number:[{pattern:/\b\d(?:_?\d)*#[\dA-F](?:_?[\dA-F])*(?:\.[\dA-F](?:_?[\dA-F])*)?#(?:E[+-]?\d(?:_?\d)*)?/i},{pattern:/\b\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:E[+-]?\d(?:_?\d)*)?\b/i}],"attr-name":/\b'\w+/i,keyword:/\b(?:abort|abs|abstract|accept|access|aliased|all|and|array|at|begin|body|case|constant|declare|delay|delta|digits|do|else|elsif|end|entry|exception|exit|for|function|generic|goto|if|in|interface|is|limited|loop|mod|new|not|null|of|others|out|overriding|package|pragma|private|procedure|protected|raise|range|record|rem|renames|requeue|return|reverse|select|separate|some|subtype|synchronized|tagged|task|terminate|then|type|until|use|when|while|with|xor)\b/i,boolean:/\b(?:false|true)\b/i,operator:/<[=>]?|>=?|=>?|:=|\/=?|\*\*?|[&+-]/,punctuation:/\.\.?|[,;():]/,char:/'.'/,variable:/\b[a-z](?:\w)*\b/i}; \ No newline at end of file diff --git a/components/prism-al.js b/components/prism-al.js index c2886d2be0..77ebcc4316 100644 --- a/components/prism-al.js +++ b/components/prism-al.js @@ -16,9 +16,9 @@ Prism.languages.al = { // objects and metadata that are used like keywords /\b(?:action|actions|addafter|addbefore|addfirst|addlast|area|assembly|chartpart|codeunit|column|controladdin|cuegroup|customizes|dataitem|dataset|dotnet|elements|enum|enumextension|extends|field|fieldattribute|fieldelement|fieldgroup|fieldgroups|fields|filter|fixed|grid|group|key|keys|label|labels|layout|modify|moveafter|movebefore|movefirst|movelast|page|pagecustomization|pageextension|part|profile|query|repeater|report|requestpage|schema|separator|systempart|table|tableelement|tableextension|textattribute|textelement|type|usercontrol|value|xmlport)\b/i ], - 'number': /\b(?:0x[\da-f]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?)(?:F|U(?:LL?)?|LL?)?\b/i, + 'number': /\b(?:0x[\da-f]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?)(?:F|LL?|U(?:LL?)?)?\b/i, 'boolean': /\b(?:false|true)\b/i, - 'variable': /\b(?:Curr(?:FieldNo|Page|Report)|RequestOptionsPage|x?Rec)\b/, + 'variable': /\b(?:Curr(?:FieldNo|Page|Report)|x?Rec|RequestOptionsPage)\b/, 'class-name': /\b(?:automation|biginteger|bigtext|blob|boolean|byte|char|clienttype|code|completiontriggererrorlevel|connectiontype|database|dataclassification|datascope|date|dateformula|datetime|decimal|defaultlayout|dialog|dictionary|dotnetassembly|dotnettypedeclaration|duration|errorinfo|errortype|executioncontext|executionmode|fieldclass|fieldref|fieldtype|file|filterpagebuilder|guid|httpclient|httpcontent|httpheaders|httprequestmessage|httpresponsemessage|instream|integer|joker|jsonarray|jsonobject|jsontoken|jsonvalue|keyref|list|moduledependencyinfo|moduleinfo|none|notification|notificationscope|objecttype|option|outstream|pageresult|record|recordid|recordref|reportformat|securityfilter|sessionsettings|tableconnectiontype|tablefilter|testaction|testfield|testfilterfield|testpage|testpermissions|testrequestpage|text|textbuilder|textconst|textencoding|time|transactionmodel|transactiontype|variant|verbosity|version|view|views|webserviceactioncontext|webserviceactionresultcode|xmlattribute|xmlattributecollection|xmlcdata|xmlcomment|xmldeclaration|xmldocument|xmldocumenttype|xmlelement|xmlnamespacemanager|xmlnametable|xmlnode|xmlnodelist|xmlprocessinginstruction|xmlreadoptions|xmltext|xmlwriteoptions)\b/i, 'operator': /\.\.|:[=:]|[-+*/]=?|<>|[<>]=?|=|\b(?:and|div|mod|not|or|xor)\b/i, 'punctuation': /[()\[\]{}:.;,]/ diff --git a/components/prism-al.min.js b/components/prism-al.min.js index e460dc1201..9651f880f0 100644 --- a/components/prism-al.min.js +++ b/components/prism-al.min.js @@ -1 +1 @@ -Prism.languages.al={comment:/\/\/.*|\/\*[\s\S]*?\*\//,string:{pattern:/'(?:''|[^'\r\n])*'(?!')|"(?:""|[^"\r\n])*"(?!")/,greedy:!0},function:{pattern:/(\b(?:event|procedure|trigger)\s+|(?:^|[^.])\.\s*)[a-z_]\w*(?=\s*\()/i,lookbehind:!0},keyword:[/\b(?:array|asserterror|begin|break|case|do|downto|else|end|event|exit|for|foreach|function|if|implements|in|indataset|interface|internal|local|of|procedure|program|protected|repeat|runonclient|securityfiltering|suppressdispose|temporary|then|to|trigger|until|var|while|with|withevents)\b/i,/\b(?:action|actions|addafter|addbefore|addfirst|addlast|area|assembly|chartpart|codeunit|column|controladdin|cuegroup|customizes|dataitem|dataset|dotnet|elements|enum|enumextension|extends|field|fieldattribute|fieldelement|fieldgroup|fieldgroups|fields|filter|fixed|grid|group|key|keys|label|labels|layout|modify|moveafter|movebefore|movefirst|movelast|page|pagecustomization|pageextension|part|profile|query|repeater|report|requestpage|schema|separator|systempart|table|tableelement|tableextension|textattribute|textelement|type|usercontrol|value|xmlport)\b/i],number:/\b(?:0x[\da-f]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?)(?:F|U(?:LL?)?|LL?)?\b/i,boolean:/\b(?:false|true)\b/i,variable:/\b(?:Curr(?:FieldNo|Page|Report)|RequestOptionsPage|x?Rec)\b/,"class-name":/\b(?:automation|biginteger|bigtext|blob|boolean|byte|char|clienttype|code|completiontriggererrorlevel|connectiontype|database|dataclassification|datascope|date|dateformula|datetime|decimal|defaultlayout|dialog|dictionary|dotnetassembly|dotnettypedeclaration|duration|errorinfo|errortype|executioncontext|executionmode|fieldclass|fieldref|fieldtype|file|filterpagebuilder|guid|httpclient|httpcontent|httpheaders|httprequestmessage|httpresponsemessage|instream|integer|joker|jsonarray|jsonobject|jsontoken|jsonvalue|keyref|list|moduledependencyinfo|moduleinfo|none|notification|notificationscope|objecttype|option|outstream|pageresult|record|recordid|recordref|reportformat|securityfilter|sessionsettings|tableconnectiontype|tablefilter|testaction|testfield|testfilterfield|testpage|testpermissions|testrequestpage|text|textbuilder|textconst|textencoding|time|transactionmodel|transactiontype|variant|verbosity|version|view|views|webserviceactioncontext|webserviceactionresultcode|xmlattribute|xmlattributecollection|xmlcdata|xmlcomment|xmldeclaration|xmldocument|xmldocumenttype|xmlelement|xmlnamespacemanager|xmlnametable|xmlnode|xmlnodelist|xmlprocessinginstruction|xmlreadoptions|xmltext|xmlwriteoptions)\b/i,operator:/\.\.|:[=:]|[-+*/]=?|<>|[<>]=?|=|\b(?:and|div|mod|not|or|xor)\b/i,punctuation:/[()\[\]{}:.;,]/}; \ No newline at end of file +Prism.languages.al={comment:/\/\/.*|\/\*[\s\S]*?\*\//,string:{pattern:/'(?:''|[^'\r\n])*'(?!')|"(?:""|[^"\r\n])*"(?!")/,greedy:!0},function:{pattern:/(\b(?:event|procedure|trigger)\s+|(?:^|[^.])\.\s*)[a-z_]\w*(?=\s*\()/i,lookbehind:!0},keyword:[/\b(?:array|asserterror|begin|break|case|do|downto|else|end|event|exit|for|foreach|function|if|implements|in|indataset|interface|internal|local|of|procedure|program|protected|repeat|runonclient|securityfiltering|suppressdispose|temporary|then|to|trigger|until|var|while|with|withevents)\b/i,/\b(?:action|actions|addafter|addbefore|addfirst|addlast|area|assembly|chartpart|codeunit|column|controladdin|cuegroup|customizes|dataitem|dataset|dotnet|elements|enum|enumextension|extends|field|fieldattribute|fieldelement|fieldgroup|fieldgroups|fields|filter|fixed|grid|group|key|keys|label|labels|layout|modify|moveafter|movebefore|movefirst|movelast|page|pagecustomization|pageextension|part|profile|query|repeater|report|requestpage|schema|separator|systempart|table|tableelement|tableextension|textattribute|textelement|type|usercontrol|value|xmlport)\b/i],number:/\b(?:0x[\da-f]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?)(?:F|LL?|U(?:LL?)?)?\b/i,boolean:/\b(?:false|true)\b/i,variable:/\b(?:Curr(?:FieldNo|Page|Report)|x?Rec|RequestOptionsPage)\b/,"class-name":/\b(?:automation|biginteger|bigtext|blob|boolean|byte|char|clienttype|code|completiontriggererrorlevel|connectiontype|database|dataclassification|datascope|date|dateformula|datetime|decimal|defaultlayout|dialog|dictionary|dotnetassembly|dotnettypedeclaration|duration|errorinfo|errortype|executioncontext|executionmode|fieldclass|fieldref|fieldtype|file|filterpagebuilder|guid|httpclient|httpcontent|httpheaders|httprequestmessage|httpresponsemessage|instream|integer|joker|jsonarray|jsonobject|jsontoken|jsonvalue|keyref|list|moduledependencyinfo|moduleinfo|none|notification|notificationscope|objecttype|option|outstream|pageresult|record|recordid|recordref|reportformat|securityfilter|sessionsettings|tableconnectiontype|tablefilter|testaction|testfield|testfilterfield|testpage|testpermissions|testrequestpage|text|textbuilder|textconst|textencoding|time|transactionmodel|transactiontype|variant|verbosity|version|view|views|webserviceactioncontext|webserviceactionresultcode|xmlattribute|xmlattributecollection|xmlcdata|xmlcomment|xmldeclaration|xmldocument|xmldocumenttype|xmlelement|xmlnamespacemanager|xmlnametable|xmlnode|xmlnodelist|xmlprocessinginstruction|xmlreadoptions|xmltext|xmlwriteoptions)\b/i,operator:/\.\.|:[=:]|[-+*/]=?|<>|[<>]=?|=|\b(?:and|div|mod|not|or|xor)\b/i,punctuation:/[()\[\]{}:.;,]/}; \ No newline at end of file diff --git a/components/prism-apacheconf.js b/components/prism-apacheconf.js index 6fe58f04e9..84aeafaa47 100644 --- a/components/prism-apacheconf.js +++ b/components/prism-apacheconf.js @@ -1,7 +1,7 @@ Prism.languages.apacheconf = { 'comment': /#.*/, 'directive-inline': { - pattern: /(^[\t ]*)\b(?:AcceptFilter|AcceptPathInfo|AccessFileName|Action|Add(?:Alt|AltByEncoding|AltByType|Charset|DefaultCharset|Description|Encoding|Handler|Icon|IconByEncoding|IconByType|InputFilter|Language|ModuleInfo|OutputFilter|OutputFilterByType|Type)|Alias|AliasMatch|Allow(?:CONNECT|EncodedSlashes|Methods|Override|OverrideList)?|Anonymous(?:_LogEmail|_MustGiveEmail|_NoUserID|_VerifyEmail)?|AsyncRequestWorkerFactor|Auth(?:BasicAuthoritative|BasicFake|BasicProvider|BasicUseDigestAlgorithm|DBDUserPWQuery|DBDUserRealmQuery|DBMGroupFile|DBMType|DBMUserFile|Digest(?:Algorithm|Domain|NonceLifetime|Provider|Qop|ShmemSize)|Form(?:Authoritative|Body|DisableNoStore|FakeBasicAuth|Location|LoginRequiredLocation|LoginSuccessLocation|LogoutLocation|Method|Mimetype|Password|Provider|SitePassphrase|Size|Username)|GroupFile|LDAP(?:AuthorizePrefix|BindAuthoritative|BindDN|BindPassword|CharsetConfig|CompareAsUser|CompareDNOnServer|DereferenceAliases|GroupAttribute|GroupAttributeIsDN|InitialBindAsUser|InitialBindPattern|MaxSubGroupDepth|RemoteUserAttribute|RemoteUserIsDN|SearchAsUser|SubGroupAttribute|SubGroupClass|Url)|Merging|Name|Type|UserFile|nCache(?:Context|Enable|ProvideFor|SOCache|Timeout)|nzFcgiCheckAuthnProvider|nzFcgiDefineProvider|zDBDLoginToReferer|zDBDQuery|zDBDRedirectQuery|zDBMType|zSendForbiddenOnFailure)|BalancerGrowth|BalancerInherit|BalancerMember|BalancerPersist|BrowserMatch|BrowserMatchNoCase|BufferSize|BufferedLogs|CGIDScriptTimeout|CGIMapExtension|Cache(?:DefaultExpire|DetailHeader|DirLength|DirLevels|Disable|Enable|File|Header|IgnoreCacheControl|IgnoreHeaders|IgnoreNoLastMod|IgnoreQueryString|IgnoreURLSessionIdentifiers|KeyBaseURL|LastModifiedFactor|Lock|LockMaxAge|LockPath|MaxExpire|MaxFileSize|MinExpire|MinFileSize|NegotiatedDocs|QuickHandler|ReadSize|ReadTime|Root|Socache(?:MaxSize|MaxTime|MinTime|ReadSize|ReadTime)?|StaleOnError|StoreExpired|StoreNoStore|StorePrivate)|CharsetDefault|CharsetOptions|CharsetSourceEnc|CheckCaseOnly|CheckSpelling|ChrootDir|ContentDigest|CookieDomain|CookieExpires|CookieName|CookieStyle|CookieTracking|CoreDumpDirectory|CustomLog|DBDExptime|DBDInitSQL|DBDKeep|DBDMax|DBDMin|DBDParams|DBDPersist|DBDPrepareSQL|DBDriver|DTracePrivileges|Dav|DavDepthInfinity|DavGenericLockDB|DavLockDB|DavMinTimeout|DefaultIcon|DefaultLanguage|DefaultRuntimeDir|DefaultType|Define|Deflate(?:BufferSize|CompressionLevel|FilterNote|InflateLimitRequestBody|InflateRatio(?:Burst|Limit)|MemLevel|WindowSize)|Deny|DirectoryCheckHandler|DirectoryIndex|DirectoryIndexRedirect|DirectorySlash|DocumentRoot|DumpIOInput|DumpIOOutput|EnableExceptionHook|EnableMMAP|EnableSendfile|Error|ErrorDocument|ErrorLog|ErrorLogFormat|Example|ExpiresActive|ExpiresByType|ExpiresDefault|ExtFilterDefine|ExtFilterOptions|ExtendedStatus|FallbackResource|FileETag|FilterChain|FilterDeclare|FilterProtocol|FilterProvider|FilterTrace|ForceLanguagePriority|ForceType|ForensicLog|GprofDir|GracefulShutdownTimeout|Group|Header|HeaderName|Heartbeat(?:Address|Listen|MaxServers|Storage)|HostnameLookups|ISAPI(?:AppendLogToErrors|AppendLogToQuery|CacheFile|FakeAsync|LogNotSupported|ReadAheadBuffer)|IdentityCheck|IdentityCheckTimeout|ImapBase|ImapDefault|ImapMenu|Include|IncludeOptional|Index(?:HeadInsert|Ignore|IgnoreReset|Options|OrderDefault|StyleSheet)|InputSed|KeepAlive|KeepAliveTimeout|KeptBodySize|LDAP(?:CacheEntries|CacheTTL|ConnectionPoolTTL|ConnectionTimeout|LibraryDebug|OpCacheEntries|OpCacheTTL|ReferralHopLimit|Referrals|Retries|RetryDelay|SharedCacheFile|SharedCacheSize|Timeout|TrustedClientCert|TrustedGlobalCert|TrustedMode|VerifyServerCert)|LanguagePriority|Limit(?:InternalRecursion|Request(?:Body|FieldSize|Fields|Line)|XMLRequestBody)|Listen|ListenBackLog|LoadFile|LoadModule|LogFormat|LogLevel|LogMessage|LuaAuthzProvider|LuaCodeCache|Lua(?:Hook(?:AccessChecker|AuthChecker|CheckUserID|Fixups|InsertFilter|Log|MapToStorage|TranslateName|TypeChecker)|Inherit|InputFilter|MapHandler|OutputFilter|PackageCPath|PackagePath|QuickHandler|Root|Scope)|MMapFile|Max(?:ConnectionsPerChild|KeepAliveRequests|MemFree|RangeOverlaps|RangeReversals|Ranges|RequestWorkers|SpareServers|SpareThreads|Threads)|MergeTrailers|MetaDir|MetaFiles|MetaSuffix|MimeMagicFile|MinSpareServers|MinSpareThreads|ModMimeUsePathInfo|ModemStandard|MultiviewsMatch|Mutex|NWSSLTrustedCerts|NWSSLUpgradeable|NameVirtualHost|NoProxy|Options|Order|OutputSed|PassEnv|PidFile|PrivilegesMode|Protocol|ProtocolEcho|Proxy(?:AddHeaders|BadHeader|Block|Domain|ErrorOverride|ExpressDBMFile|ExpressDBMType|ExpressEnable|FtpDirCharset|FtpEscapeWildcards|FtpListOnWildcard|HTML(?:BufSize|CharsetOut|DocType|Enable|Events|Extended|Fixups|Interp|Links|Meta|StripComments|URLMap)|IOBufferSize|MaxForwards|Pass(?:Inherit|InterpolateEnv|Match|Reverse|ReverseCookieDomain|ReverseCookiePath)?|PreserveHost|ReceiveBufferSize|Remote|RemoteMatch|Requests|SCGIInternalRedirect|SCGISendfile|Set|SourceAddress|Status|Timeout|Via)|RLimitCPU|RLimitMEM|RLimitNPROC|ReadmeName|ReceiveBufferSize|Redirect|RedirectMatch|RedirectPermanent|RedirectTemp|ReflectorHeader|RemoteIP(?:Header|InternalProxy|InternalProxyList|ProxiesHeader|TrustedProxy|TrustedProxyList)|RemoveCharset|RemoveEncoding|RemoveHandler|RemoveInputFilter|RemoveLanguage|RemoveOutputFilter|RemoveType|RequestHeader|RequestReadTimeout|Require|Rewrite(?:Base|Cond|Engine|Map|Options|Rule)|SSIETag|SSIEndTag|SSIErrorMsg|SSILastModified|SSILegacyExprParser|SSIStartTag|SSITimeFormat|SSIUndefinedEcho|SSL(?:CACertificateFile|CACertificatePath|CADNRequestFile|CADNRequestPath|CARevocationCheck|CARevocationFile|CARevocationPath|CertificateChainFile|CertificateFile|CertificateKeyFile|CipherSuite|Compression|CryptoDevice|Engine|FIPS|HonorCipherOrder|InsecureRenegotiation|OCSP(?:DefaultResponder|Enable|OverrideResponder|ResponderTimeout|ResponseMaxAge|ResponseTimeSkew|UseRequestNonce)|OpenSSLConfCmd|Options|PassPhraseDialog|Protocol|Proxy(?:CACertificateFile|CACertificatePath|CARevocation(?:Check|File|Path)|CheckPeer(?:CN|Expire|Name)|CipherSuite|Engine|MachineCertificate(?:ChainFile|File|Path)|Protocol|Verify|VerifyDepth)|RandomSeed|RenegBufferSize|Require|RequireSSL|SRPUnknownUserSeed|SRPVerifierFile|Session(?:Cache|CacheTimeout|TicketKeyFile|Tickets)|Stapling(?:Cache|ErrorCacheTimeout|FakeTryLater|ForceURL|ResponderTimeout|ResponseMaxAge|ResponseTimeSkew|ReturnResponderErrors|StandardCacheTimeout)|StrictSNIVHostCheck|UseStapling|UserName|VerifyClient|VerifyDepth)|Satisfy|ScoreBoardFile|Script(?:Alias|AliasMatch|InterpreterSource|Log|LogBuffer|LogLength|Sock)?|SecureListen|SeeRequestTail|SendBufferSize|Server(?:Admin|Alias|Limit|Name|Path|Root|Signature|Tokens)|Session(?:Cookie(?:Name|Name2|Remove)|Crypto(?:Cipher|Driver|Passphrase|PassphraseFile)|DBD(?:CookieName|CookieName2|CookieRemove|DeleteLabel|InsertLabel|PerUser|SelectLabel|UpdateLabel)|Env|Exclude|Header|Include|MaxAge)?|SetEnv|SetEnvIf|SetEnvIfExpr|SetEnvIfNoCase|SetHandler|SetInputFilter|SetOutputFilter|StartServers|StartThreads|Substitute|Suexec|SuexecUserGroup|ThreadLimit|ThreadStackSize|ThreadsPerChild|TimeOut|TraceEnable|TransferLog|TypesConfig|UnDefine|UndefMacro|UnsetEnv|Use|UseCanonicalName|UseCanonicalPhysicalPort|User|UserDir|VHostCGIMode|VHostCGIPrivs|VHostGroup|VHostPrivs|VHostSecure|VHostUser|Virtual(?:DocumentRoot|ScriptAlias)(?:IP)?|WatchdogInterval|XBitHack|xml2EncAlias|xml2EncDefault|xml2StartParse)\b/im, + pattern: /(^[\t ]*)\b(?:AcceptFilter|AcceptPathInfo|AccessFileName|Action|Add(?:Alt|AltByEncoding|AltByType|Charset|DefaultCharset|Description|Encoding|Handler|Icon|IconByEncoding|IconByType|InputFilter|Language|ModuleInfo|OutputFilter|OutputFilterByType|Type)|Alias|AliasMatch|Allow(?:CONNECT|EncodedSlashes|Methods|Override|OverrideList)?|Anonymous(?:_LogEmail|_MustGiveEmail|_NoUserID|_VerifyEmail)?|AsyncRequestWorkerFactor|Auth(?:BasicAuthoritative|BasicFake|BasicProvider|BasicUseDigestAlgorithm|DBDUserPWQuery|DBDUserRealmQuery|DBMGroupFile|DBMType|DBMUserFile|Digest(?:Algorithm|Domain|NonceLifetime|Provider|Qop|ShmemSize)|Form(?:Authoritative|Body|DisableNoStore|FakeBasicAuth|Location|LoginRequiredLocation|LoginSuccessLocation|LogoutLocation|Method|Mimetype|Password|Provider|SitePassphrase|Size|Username)|GroupFile|LDAP(?:AuthorizePrefix|BindAuthoritative|BindDN|BindPassword|CharsetConfig|CompareAsUser|CompareDNOnServer|DereferenceAliases|GroupAttribute|GroupAttributeIsDN|InitialBindAsUser|InitialBindPattern|MaxSubGroupDepth|RemoteUserAttribute|RemoteUserIsDN|SearchAsUser|SubGroupAttribute|SubGroupClass|Url)|Merging|Name|nCache(?:Context|Enable|ProvideFor|SOCache|Timeout)|nzFcgiCheckAuthnProvider|nzFcgiDefineProvider|Type|UserFile|zDBDLoginToReferer|zDBDQuery|zDBDRedirectQuery|zDBMType|zSendForbiddenOnFailure)|BalancerGrowth|BalancerInherit|BalancerMember|BalancerPersist|BrowserMatch|BrowserMatchNoCase|BufferedLogs|BufferSize|Cache(?:DefaultExpire|DetailHeader|DirLength|DirLevels|Disable|Enable|File|Header|IgnoreCacheControl|IgnoreHeaders|IgnoreNoLastMod|IgnoreQueryString|IgnoreURLSessionIdentifiers|KeyBaseURL|LastModifiedFactor|Lock|LockMaxAge|LockPath|MaxExpire|MaxFileSize|MinExpire|MinFileSize|NegotiatedDocs|QuickHandler|ReadSize|ReadTime|Root|Socache(?:MaxSize|MaxTime|MinTime|ReadSize|ReadTime)?|StaleOnError|StoreExpired|StoreNoStore|StorePrivate)|CGIDScriptTimeout|CGIMapExtension|CharsetDefault|CharsetOptions|CharsetSourceEnc|CheckCaseOnly|CheckSpelling|ChrootDir|ContentDigest|CookieDomain|CookieExpires|CookieName|CookieStyle|CookieTracking|CoreDumpDirectory|CustomLog|Dav|DavDepthInfinity|DavGenericLockDB|DavLockDB|DavMinTimeout|DBDExptime|DBDInitSQL|DBDKeep|DBDMax|DBDMin|DBDParams|DBDPersist|DBDPrepareSQL|DBDriver|DefaultIcon|DefaultLanguage|DefaultRuntimeDir|DefaultType|Define|Deflate(?:BufferSize|CompressionLevel|FilterNote|InflateLimitRequestBody|InflateRatio(?:Burst|Limit)|MemLevel|WindowSize)|Deny|DirectoryCheckHandler|DirectoryIndex|DirectoryIndexRedirect|DirectorySlash|DocumentRoot|DTracePrivileges|DumpIOInput|DumpIOOutput|EnableExceptionHook|EnableMMAP|EnableSendfile|Error|ErrorDocument|ErrorLog|ErrorLogFormat|Example|ExpiresActive|ExpiresByType|ExpiresDefault|ExtendedStatus|ExtFilterDefine|ExtFilterOptions|FallbackResource|FileETag|FilterChain|FilterDeclare|FilterProtocol|FilterProvider|FilterTrace|ForceLanguagePriority|ForceType|ForensicLog|GprofDir|GracefulShutdownTimeout|Group|Header|HeaderName|Heartbeat(?:Address|Listen|MaxServers|Storage)|HostnameLookups|IdentityCheck|IdentityCheckTimeout|ImapBase|ImapDefault|ImapMenu|Include|IncludeOptional|Index(?:HeadInsert|Ignore|IgnoreReset|Options|OrderDefault|StyleSheet)|InputSed|ISAPI(?:AppendLogToErrors|AppendLogToQuery|CacheFile|FakeAsync|LogNotSupported|ReadAheadBuffer)|KeepAlive|KeepAliveTimeout|KeptBodySize|LanguagePriority|LDAP(?:CacheEntries|CacheTTL|ConnectionPoolTTL|ConnectionTimeout|LibraryDebug|OpCacheEntries|OpCacheTTL|ReferralHopLimit|Referrals|Retries|RetryDelay|SharedCacheFile|SharedCacheSize|Timeout|TrustedClientCert|TrustedGlobalCert|TrustedMode|VerifyServerCert)|Limit(?:InternalRecursion|Request(?:Body|Fields|FieldSize|Line)|XMLRequestBody)|Listen|ListenBackLog|LoadFile|LoadModule|LogFormat|LogLevel|LogMessage|LuaAuthzProvider|LuaCodeCache|Lua(?:Hook(?:AccessChecker|AuthChecker|CheckUserID|Fixups|InsertFilter|Log|MapToStorage|TranslateName|TypeChecker)|Inherit|InputFilter|MapHandler|OutputFilter|PackageCPath|PackagePath|QuickHandler|Root|Scope)|Max(?:ConnectionsPerChild|KeepAliveRequests|MemFree|RangeOverlaps|RangeReversals|Ranges|RequestWorkers|SpareServers|SpareThreads|Threads)|MergeTrailers|MetaDir|MetaFiles|MetaSuffix|MimeMagicFile|MinSpareServers|MinSpareThreads|MMapFile|ModemStandard|ModMimeUsePathInfo|MultiviewsMatch|Mutex|NameVirtualHost|NoProxy|NWSSLTrustedCerts|NWSSLUpgradeable|Options|Order|OutputSed|PassEnv|PidFile|PrivilegesMode|Protocol|ProtocolEcho|Proxy(?:AddHeaders|BadHeader|Block|Domain|ErrorOverride|ExpressDBMFile|ExpressDBMType|ExpressEnable|FtpDirCharset|FtpEscapeWildcards|FtpListOnWildcard|HTML(?:BufSize|CharsetOut|DocType|Enable|Events|Extended|Fixups|Interp|Links|Meta|StripComments|URLMap)|IOBufferSize|MaxForwards|Pass(?:Inherit|InterpolateEnv|Match|Reverse|ReverseCookieDomain|ReverseCookiePath)?|PreserveHost|ReceiveBufferSize|Remote|RemoteMatch|Requests|SCGIInternalRedirect|SCGISendfile|Set|SourceAddress|Status|Timeout|Via)|ReadmeName|ReceiveBufferSize|Redirect|RedirectMatch|RedirectPermanent|RedirectTemp|ReflectorHeader|RemoteIP(?:Header|InternalProxy|InternalProxyList|ProxiesHeader|TrustedProxy|TrustedProxyList)|RemoveCharset|RemoveEncoding|RemoveHandler|RemoveInputFilter|RemoveLanguage|RemoveOutputFilter|RemoveType|RequestHeader|RequestReadTimeout|Require|Rewrite(?:Base|Cond|Engine|Map|Options|Rule)|RLimitCPU|RLimitMEM|RLimitNPROC|Satisfy|ScoreBoardFile|Script(?:Alias|AliasMatch|InterpreterSource|Log|LogBuffer|LogLength|Sock)?|SecureListen|SeeRequestTail|SendBufferSize|Server(?:Admin|Alias|Limit|Name|Path|Root|Signature|Tokens)|Session(?:Cookie(?:Name|Name2|Remove)|Crypto(?:Cipher|Driver|Passphrase|PassphraseFile)|DBD(?:CookieName|CookieName2|CookieRemove|DeleteLabel|InsertLabel|PerUser|SelectLabel|UpdateLabel)|Env|Exclude|Header|Include|MaxAge)?|SetEnv|SetEnvIf|SetEnvIfExpr|SetEnvIfNoCase|SetHandler|SetInputFilter|SetOutputFilter|SSIEndTag|SSIErrorMsg|SSIETag|SSILastModified|SSILegacyExprParser|SSIStartTag|SSITimeFormat|SSIUndefinedEcho|SSL(?:CACertificateFile|CACertificatePath|CADNRequestFile|CADNRequestPath|CARevocationCheck|CARevocationFile|CARevocationPath|CertificateChainFile|CertificateFile|CertificateKeyFile|CipherSuite|Compression|CryptoDevice|Engine|FIPS|HonorCipherOrder|InsecureRenegotiation|OCSP(?:DefaultResponder|Enable|OverrideResponder|ResponderTimeout|ResponseMaxAge|ResponseTimeSkew|UseRequestNonce)|OpenSSLConfCmd|Options|PassPhraseDialog|Protocol|Proxy(?:CACertificateFile|CACertificatePath|CARevocation(?:Check|File|Path)|CheckPeer(?:CN|Expire|Name)|CipherSuite|Engine|MachineCertificate(?:ChainFile|File|Path)|Protocol|Verify|VerifyDepth)|RandomSeed|RenegBufferSize|Require|RequireSSL|Session(?:Cache|CacheTimeout|TicketKeyFile|Tickets)|SRPUnknownUserSeed|SRPVerifierFile|Stapling(?:Cache|ErrorCacheTimeout|FakeTryLater|ForceURL|ResponderTimeout|ResponseMaxAge|ResponseTimeSkew|ReturnResponderErrors|StandardCacheTimeout)|StrictSNIVHostCheck|UserName|UseStapling|VerifyClient|VerifyDepth)|StartServers|StartThreads|Substitute|Suexec|SuexecUserGroup|ThreadLimit|ThreadsPerChild|ThreadStackSize|TimeOut|TraceEnable|TransferLog|TypesConfig|UnDefine|UndefMacro|UnsetEnv|Use|UseCanonicalName|UseCanonicalPhysicalPort|User|UserDir|VHostCGIMode|VHostCGIPrivs|VHostGroup|VHostPrivs|VHostSecure|VHostUser|Virtual(?:DocumentRoot|ScriptAlias)(?:IP)?|WatchdogInterval|XBitHack|xml2EncAlias|xml2EncDefault|xml2StartParse)\b/im, lookbehind: true, alias: 'property' }, diff --git a/components/prism-apacheconf.min.js b/components/prism-apacheconf.min.js index 9b04ae11ab..8ed203d14a 100644 --- a/components/prism-apacheconf.min.js +++ b/components/prism-apacheconf.min.js @@ -1 +1 @@ -Prism.languages.apacheconf={comment:/#.*/,"directive-inline":{pattern:/(^[\t ]*)\b(?:AcceptFilter|AcceptPathInfo|AccessFileName|Action|Add(?:Alt|AltByEncoding|AltByType|Charset|DefaultCharset|Description|Encoding|Handler|Icon|IconByEncoding|IconByType|InputFilter|Language|ModuleInfo|OutputFilter|OutputFilterByType|Type)|Alias|AliasMatch|Allow(?:CONNECT|EncodedSlashes|Methods|Override|OverrideList)?|Anonymous(?:_LogEmail|_MustGiveEmail|_NoUserID|_VerifyEmail)?|AsyncRequestWorkerFactor|Auth(?:BasicAuthoritative|BasicFake|BasicProvider|BasicUseDigestAlgorithm|DBDUserPWQuery|DBDUserRealmQuery|DBMGroupFile|DBMType|DBMUserFile|Digest(?:Algorithm|Domain|NonceLifetime|Provider|Qop|ShmemSize)|Form(?:Authoritative|Body|DisableNoStore|FakeBasicAuth|Location|LoginRequiredLocation|LoginSuccessLocation|LogoutLocation|Method|Mimetype|Password|Provider|SitePassphrase|Size|Username)|GroupFile|LDAP(?:AuthorizePrefix|BindAuthoritative|BindDN|BindPassword|CharsetConfig|CompareAsUser|CompareDNOnServer|DereferenceAliases|GroupAttribute|GroupAttributeIsDN|InitialBindAsUser|InitialBindPattern|MaxSubGroupDepth|RemoteUserAttribute|RemoteUserIsDN|SearchAsUser|SubGroupAttribute|SubGroupClass|Url)|Merging|Name|Type|UserFile|nCache(?:Context|Enable|ProvideFor|SOCache|Timeout)|nzFcgiCheckAuthnProvider|nzFcgiDefineProvider|zDBDLoginToReferer|zDBDQuery|zDBDRedirectQuery|zDBMType|zSendForbiddenOnFailure)|BalancerGrowth|BalancerInherit|BalancerMember|BalancerPersist|BrowserMatch|BrowserMatchNoCase|BufferSize|BufferedLogs|CGIDScriptTimeout|CGIMapExtension|Cache(?:DefaultExpire|DetailHeader|DirLength|DirLevels|Disable|Enable|File|Header|IgnoreCacheControl|IgnoreHeaders|IgnoreNoLastMod|IgnoreQueryString|IgnoreURLSessionIdentifiers|KeyBaseURL|LastModifiedFactor|Lock|LockMaxAge|LockPath|MaxExpire|MaxFileSize|MinExpire|MinFileSize|NegotiatedDocs|QuickHandler|ReadSize|ReadTime|Root|Socache(?:MaxSize|MaxTime|MinTime|ReadSize|ReadTime)?|StaleOnError|StoreExpired|StoreNoStore|StorePrivate)|CharsetDefault|CharsetOptions|CharsetSourceEnc|CheckCaseOnly|CheckSpelling|ChrootDir|ContentDigest|CookieDomain|CookieExpires|CookieName|CookieStyle|CookieTracking|CoreDumpDirectory|CustomLog|DBDExptime|DBDInitSQL|DBDKeep|DBDMax|DBDMin|DBDParams|DBDPersist|DBDPrepareSQL|DBDriver|DTracePrivileges|Dav|DavDepthInfinity|DavGenericLockDB|DavLockDB|DavMinTimeout|DefaultIcon|DefaultLanguage|DefaultRuntimeDir|DefaultType|Define|Deflate(?:BufferSize|CompressionLevel|FilterNote|InflateLimitRequestBody|InflateRatio(?:Burst|Limit)|MemLevel|WindowSize)|Deny|DirectoryCheckHandler|DirectoryIndex|DirectoryIndexRedirect|DirectorySlash|DocumentRoot|DumpIOInput|DumpIOOutput|EnableExceptionHook|EnableMMAP|EnableSendfile|Error|ErrorDocument|ErrorLog|ErrorLogFormat|Example|ExpiresActive|ExpiresByType|ExpiresDefault|ExtFilterDefine|ExtFilterOptions|ExtendedStatus|FallbackResource|FileETag|FilterChain|FilterDeclare|FilterProtocol|FilterProvider|FilterTrace|ForceLanguagePriority|ForceType|ForensicLog|GprofDir|GracefulShutdownTimeout|Group|Header|HeaderName|Heartbeat(?:Address|Listen|MaxServers|Storage)|HostnameLookups|ISAPI(?:AppendLogToErrors|AppendLogToQuery|CacheFile|FakeAsync|LogNotSupported|ReadAheadBuffer)|IdentityCheck|IdentityCheckTimeout|ImapBase|ImapDefault|ImapMenu|Include|IncludeOptional|Index(?:HeadInsert|Ignore|IgnoreReset|Options|OrderDefault|StyleSheet)|InputSed|KeepAlive|KeepAliveTimeout|KeptBodySize|LDAP(?:CacheEntries|CacheTTL|ConnectionPoolTTL|ConnectionTimeout|LibraryDebug|OpCacheEntries|OpCacheTTL|ReferralHopLimit|Referrals|Retries|RetryDelay|SharedCacheFile|SharedCacheSize|Timeout|TrustedClientCert|TrustedGlobalCert|TrustedMode|VerifyServerCert)|LanguagePriority|Limit(?:InternalRecursion|Request(?:Body|FieldSize|Fields|Line)|XMLRequestBody)|Listen|ListenBackLog|LoadFile|LoadModule|LogFormat|LogLevel|LogMessage|LuaAuthzProvider|LuaCodeCache|Lua(?:Hook(?:AccessChecker|AuthChecker|CheckUserID|Fixups|InsertFilter|Log|MapToStorage|TranslateName|TypeChecker)|Inherit|InputFilter|MapHandler|OutputFilter|PackageCPath|PackagePath|QuickHandler|Root|Scope)|MMapFile|Max(?:ConnectionsPerChild|KeepAliveRequests|MemFree|RangeOverlaps|RangeReversals|Ranges|RequestWorkers|SpareServers|SpareThreads|Threads)|MergeTrailers|MetaDir|MetaFiles|MetaSuffix|MimeMagicFile|MinSpareServers|MinSpareThreads|ModMimeUsePathInfo|ModemStandard|MultiviewsMatch|Mutex|NWSSLTrustedCerts|NWSSLUpgradeable|NameVirtualHost|NoProxy|Options|Order|OutputSed|PassEnv|PidFile|PrivilegesMode|Protocol|ProtocolEcho|Proxy(?:AddHeaders|BadHeader|Block|Domain|ErrorOverride|ExpressDBMFile|ExpressDBMType|ExpressEnable|FtpDirCharset|FtpEscapeWildcards|FtpListOnWildcard|HTML(?:BufSize|CharsetOut|DocType|Enable|Events|Extended|Fixups|Interp|Links|Meta|StripComments|URLMap)|IOBufferSize|MaxForwards|Pass(?:Inherit|InterpolateEnv|Match|Reverse|ReverseCookieDomain|ReverseCookiePath)?|PreserveHost|ReceiveBufferSize|Remote|RemoteMatch|Requests|SCGIInternalRedirect|SCGISendfile|Set|SourceAddress|Status|Timeout|Via)|RLimitCPU|RLimitMEM|RLimitNPROC|ReadmeName|ReceiveBufferSize|Redirect|RedirectMatch|RedirectPermanent|RedirectTemp|ReflectorHeader|RemoteIP(?:Header|InternalProxy|InternalProxyList|ProxiesHeader|TrustedProxy|TrustedProxyList)|RemoveCharset|RemoveEncoding|RemoveHandler|RemoveInputFilter|RemoveLanguage|RemoveOutputFilter|RemoveType|RequestHeader|RequestReadTimeout|Require|Rewrite(?:Base|Cond|Engine|Map|Options|Rule)|SSIETag|SSIEndTag|SSIErrorMsg|SSILastModified|SSILegacyExprParser|SSIStartTag|SSITimeFormat|SSIUndefinedEcho|SSL(?:CACertificateFile|CACertificatePath|CADNRequestFile|CADNRequestPath|CARevocationCheck|CARevocationFile|CARevocationPath|CertificateChainFile|CertificateFile|CertificateKeyFile|CipherSuite|Compression|CryptoDevice|Engine|FIPS|HonorCipherOrder|InsecureRenegotiation|OCSP(?:DefaultResponder|Enable|OverrideResponder|ResponderTimeout|ResponseMaxAge|ResponseTimeSkew|UseRequestNonce)|OpenSSLConfCmd|Options|PassPhraseDialog|Protocol|Proxy(?:CACertificateFile|CACertificatePath|CARevocation(?:Check|File|Path)|CheckPeer(?:CN|Expire|Name)|CipherSuite|Engine|MachineCertificate(?:ChainFile|File|Path)|Protocol|Verify|VerifyDepth)|RandomSeed|RenegBufferSize|Require|RequireSSL|SRPUnknownUserSeed|SRPVerifierFile|Session(?:Cache|CacheTimeout|TicketKeyFile|Tickets)|Stapling(?:Cache|ErrorCacheTimeout|FakeTryLater|ForceURL|ResponderTimeout|ResponseMaxAge|ResponseTimeSkew|ReturnResponderErrors|StandardCacheTimeout)|StrictSNIVHostCheck|UseStapling|UserName|VerifyClient|VerifyDepth)|Satisfy|ScoreBoardFile|Script(?:Alias|AliasMatch|InterpreterSource|Log|LogBuffer|LogLength|Sock)?|SecureListen|SeeRequestTail|SendBufferSize|Server(?:Admin|Alias|Limit|Name|Path|Root|Signature|Tokens)|Session(?:Cookie(?:Name|Name2|Remove)|Crypto(?:Cipher|Driver|Passphrase|PassphraseFile)|DBD(?:CookieName|CookieName2|CookieRemove|DeleteLabel|InsertLabel|PerUser|SelectLabel|UpdateLabel)|Env|Exclude|Header|Include|MaxAge)?|SetEnv|SetEnvIf|SetEnvIfExpr|SetEnvIfNoCase|SetHandler|SetInputFilter|SetOutputFilter|StartServers|StartThreads|Substitute|Suexec|SuexecUserGroup|ThreadLimit|ThreadStackSize|ThreadsPerChild|TimeOut|TraceEnable|TransferLog|TypesConfig|UnDefine|UndefMacro|UnsetEnv|Use|UseCanonicalName|UseCanonicalPhysicalPort|User|UserDir|VHostCGIMode|VHostCGIPrivs|VHostGroup|VHostPrivs|VHostSecure|VHostUser|Virtual(?:DocumentRoot|ScriptAlias)(?:IP)?|WatchdogInterval|XBitHack|xml2EncAlias|xml2EncDefault|xml2StartParse)\b/im,lookbehind:!0,alias:"property"},"directive-block":{pattern:/<\/?\b(?:Auth[nz]ProviderAlias|Directory|DirectoryMatch|Else|ElseIf|Files|FilesMatch|If|IfDefine|IfModule|IfVersion|Limit|LimitExcept|Location|LocationMatch|Macro|Proxy|Require(?:All|Any|None)|VirtualHost)\b.*>/i,inside:{"directive-block":{pattern:/^<\/?\w+/,inside:{punctuation:/^<\/?/},alias:"tag"},"directive-block-parameter":{pattern:/.*[^>]/,inside:{punctuation:/:/,string:{pattern:/("|').*\1/,inside:{variable:/[$%]\{?(?:\w\.?[-+:]?)+\}?/}}},alias:"attr-value"},punctuation:/>/},alias:"tag"},"directive-flags":{pattern:/\[(?:[\w=],?)+\]/,alias:"keyword"},string:{pattern:/("|').*\1/,inside:{variable:/[$%]\{?(?:\w\.?[-+:]?)+\}?/}},variable:/[$%]\{?(?:\w\.?[-+:]?)+\}?/,regex:/\^?.*\$|\^.*\$?/}; \ No newline at end of file +Prism.languages.apacheconf={comment:/#.*/,"directive-inline":{pattern:/(^[\t ]*)\b(?:AcceptFilter|AcceptPathInfo|AccessFileName|Action|Add(?:Alt|AltByEncoding|AltByType|Charset|DefaultCharset|Description|Encoding|Handler|Icon|IconByEncoding|IconByType|InputFilter|Language|ModuleInfo|OutputFilter|OutputFilterByType|Type)|Alias|AliasMatch|Allow(?:CONNECT|EncodedSlashes|Methods|Override|OverrideList)?|Anonymous(?:_LogEmail|_MustGiveEmail|_NoUserID|_VerifyEmail)?|AsyncRequestWorkerFactor|Auth(?:BasicAuthoritative|BasicFake|BasicProvider|BasicUseDigestAlgorithm|DBDUserPWQuery|DBDUserRealmQuery|DBMGroupFile|DBMType|DBMUserFile|Digest(?:Algorithm|Domain|NonceLifetime|Provider|Qop|ShmemSize)|Form(?:Authoritative|Body|DisableNoStore|FakeBasicAuth|Location|LoginRequiredLocation|LoginSuccessLocation|LogoutLocation|Method|Mimetype|Password|Provider|SitePassphrase|Size|Username)|GroupFile|LDAP(?:AuthorizePrefix|BindAuthoritative|BindDN|BindPassword|CharsetConfig|CompareAsUser|CompareDNOnServer|DereferenceAliases|GroupAttribute|GroupAttributeIsDN|InitialBindAsUser|InitialBindPattern|MaxSubGroupDepth|RemoteUserAttribute|RemoteUserIsDN|SearchAsUser|SubGroupAttribute|SubGroupClass|Url)|Merging|Name|nCache(?:Context|Enable|ProvideFor|SOCache|Timeout)|nzFcgiCheckAuthnProvider|nzFcgiDefineProvider|Type|UserFile|zDBDLoginToReferer|zDBDQuery|zDBDRedirectQuery|zDBMType|zSendForbiddenOnFailure)|BalancerGrowth|BalancerInherit|BalancerMember|BalancerPersist|BrowserMatch|BrowserMatchNoCase|BufferedLogs|BufferSize|Cache(?:DefaultExpire|DetailHeader|DirLength|DirLevels|Disable|Enable|File|Header|IgnoreCacheControl|IgnoreHeaders|IgnoreNoLastMod|IgnoreQueryString|IgnoreURLSessionIdentifiers|KeyBaseURL|LastModifiedFactor|Lock|LockMaxAge|LockPath|MaxExpire|MaxFileSize|MinExpire|MinFileSize|NegotiatedDocs|QuickHandler|ReadSize|ReadTime|Root|Socache(?:MaxSize|MaxTime|MinTime|ReadSize|ReadTime)?|StaleOnError|StoreExpired|StoreNoStore|StorePrivate)|CGIDScriptTimeout|CGIMapExtension|CharsetDefault|CharsetOptions|CharsetSourceEnc|CheckCaseOnly|CheckSpelling|ChrootDir|ContentDigest|CookieDomain|CookieExpires|CookieName|CookieStyle|CookieTracking|CoreDumpDirectory|CustomLog|Dav|DavDepthInfinity|DavGenericLockDB|DavLockDB|DavMinTimeout|DBDExptime|DBDInitSQL|DBDKeep|DBDMax|DBDMin|DBDParams|DBDPersist|DBDPrepareSQL|DBDriver|DefaultIcon|DefaultLanguage|DefaultRuntimeDir|DefaultType|Define|Deflate(?:BufferSize|CompressionLevel|FilterNote|InflateLimitRequestBody|InflateRatio(?:Burst|Limit)|MemLevel|WindowSize)|Deny|DirectoryCheckHandler|DirectoryIndex|DirectoryIndexRedirect|DirectorySlash|DocumentRoot|DTracePrivileges|DumpIOInput|DumpIOOutput|EnableExceptionHook|EnableMMAP|EnableSendfile|Error|ErrorDocument|ErrorLog|ErrorLogFormat|Example|ExpiresActive|ExpiresByType|ExpiresDefault|ExtendedStatus|ExtFilterDefine|ExtFilterOptions|FallbackResource|FileETag|FilterChain|FilterDeclare|FilterProtocol|FilterProvider|FilterTrace|ForceLanguagePriority|ForceType|ForensicLog|GprofDir|GracefulShutdownTimeout|Group|Header|HeaderName|Heartbeat(?:Address|Listen|MaxServers|Storage)|HostnameLookups|IdentityCheck|IdentityCheckTimeout|ImapBase|ImapDefault|ImapMenu|Include|IncludeOptional|Index(?:HeadInsert|Ignore|IgnoreReset|Options|OrderDefault|StyleSheet)|InputSed|ISAPI(?:AppendLogToErrors|AppendLogToQuery|CacheFile|FakeAsync|LogNotSupported|ReadAheadBuffer)|KeepAlive|KeepAliveTimeout|KeptBodySize|LanguagePriority|LDAP(?:CacheEntries|CacheTTL|ConnectionPoolTTL|ConnectionTimeout|LibraryDebug|OpCacheEntries|OpCacheTTL|ReferralHopLimit|Referrals|Retries|RetryDelay|SharedCacheFile|SharedCacheSize|Timeout|TrustedClientCert|TrustedGlobalCert|TrustedMode|VerifyServerCert)|Limit(?:InternalRecursion|Request(?:Body|Fields|FieldSize|Line)|XMLRequestBody)|Listen|ListenBackLog|LoadFile|LoadModule|LogFormat|LogLevel|LogMessage|LuaAuthzProvider|LuaCodeCache|Lua(?:Hook(?:AccessChecker|AuthChecker|CheckUserID|Fixups|InsertFilter|Log|MapToStorage|TranslateName|TypeChecker)|Inherit|InputFilter|MapHandler|OutputFilter|PackageCPath|PackagePath|QuickHandler|Root|Scope)|Max(?:ConnectionsPerChild|KeepAliveRequests|MemFree|RangeOverlaps|RangeReversals|Ranges|RequestWorkers|SpareServers|SpareThreads|Threads)|MergeTrailers|MetaDir|MetaFiles|MetaSuffix|MimeMagicFile|MinSpareServers|MinSpareThreads|MMapFile|ModemStandard|ModMimeUsePathInfo|MultiviewsMatch|Mutex|NameVirtualHost|NoProxy|NWSSLTrustedCerts|NWSSLUpgradeable|Options|Order|OutputSed|PassEnv|PidFile|PrivilegesMode|Protocol|ProtocolEcho|Proxy(?:AddHeaders|BadHeader|Block|Domain|ErrorOverride|ExpressDBMFile|ExpressDBMType|ExpressEnable|FtpDirCharset|FtpEscapeWildcards|FtpListOnWildcard|HTML(?:BufSize|CharsetOut|DocType|Enable|Events|Extended|Fixups|Interp|Links|Meta|StripComments|URLMap)|IOBufferSize|MaxForwards|Pass(?:Inherit|InterpolateEnv|Match|Reverse|ReverseCookieDomain|ReverseCookiePath)?|PreserveHost|ReceiveBufferSize|Remote|RemoteMatch|Requests|SCGIInternalRedirect|SCGISendfile|Set|SourceAddress|Status|Timeout|Via)|ReadmeName|ReceiveBufferSize|Redirect|RedirectMatch|RedirectPermanent|RedirectTemp|ReflectorHeader|RemoteIP(?:Header|InternalProxy|InternalProxyList|ProxiesHeader|TrustedProxy|TrustedProxyList)|RemoveCharset|RemoveEncoding|RemoveHandler|RemoveInputFilter|RemoveLanguage|RemoveOutputFilter|RemoveType|RequestHeader|RequestReadTimeout|Require|Rewrite(?:Base|Cond|Engine|Map|Options|Rule)|RLimitCPU|RLimitMEM|RLimitNPROC|Satisfy|ScoreBoardFile|Script(?:Alias|AliasMatch|InterpreterSource|Log|LogBuffer|LogLength|Sock)?|SecureListen|SeeRequestTail|SendBufferSize|Server(?:Admin|Alias|Limit|Name|Path|Root|Signature|Tokens)|Session(?:Cookie(?:Name|Name2|Remove)|Crypto(?:Cipher|Driver|Passphrase|PassphraseFile)|DBD(?:CookieName|CookieName2|CookieRemove|DeleteLabel|InsertLabel|PerUser|SelectLabel|UpdateLabel)|Env|Exclude|Header|Include|MaxAge)?|SetEnv|SetEnvIf|SetEnvIfExpr|SetEnvIfNoCase|SetHandler|SetInputFilter|SetOutputFilter|SSIEndTag|SSIErrorMsg|SSIETag|SSILastModified|SSILegacyExprParser|SSIStartTag|SSITimeFormat|SSIUndefinedEcho|SSL(?:CACertificateFile|CACertificatePath|CADNRequestFile|CADNRequestPath|CARevocationCheck|CARevocationFile|CARevocationPath|CertificateChainFile|CertificateFile|CertificateKeyFile|CipherSuite|Compression|CryptoDevice|Engine|FIPS|HonorCipherOrder|InsecureRenegotiation|OCSP(?:DefaultResponder|Enable|OverrideResponder|ResponderTimeout|ResponseMaxAge|ResponseTimeSkew|UseRequestNonce)|OpenSSLConfCmd|Options|PassPhraseDialog|Protocol|Proxy(?:CACertificateFile|CACertificatePath|CARevocation(?:Check|File|Path)|CheckPeer(?:CN|Expire|Name)|CipherSuite|Engine|MachineCertificate(?:ChainFile|File|Path)|Protocol|Verify|VerifyDepth)|RandomSeed|RenegBufferSize|Require|RequireSSL|Session(?:Cache|CacheTimeout|TicketKeyFile|Tickets)|SRPUnknownUserSeed|SRPVerifierFile|Stapling(?:Cache|ErrorCacheTimeout|FakeTryLater|ForceURL|ResponderTimeout|ResponseMaxAge|ResponseTimeSkew|ReturnResponderErrors|StandardCacheTimeout)|StrictSNIVHostCheck|UserName|UseStapling|VerifyClient|VerifyDepth)|StartServers|StartThreads|Substitute|Suexec|SuexecUserGroup|ThreadLimit|ThreadsPerChild|ThreadStackSize|TimeOut|TraceEnable|TransferLog|TypesConfig|UnDefine|UndefMacro|UnsetEnv|Use|UseCanonicalName|UseCanonicalPhysicalPort|User|UserDir|VHostCGIMode|VHostCGIPrivs|VHostGroup|VHostPrivs|VHostSecure|VHostUser|Virtual(?:DocumentRoot|ScriptAlias)(?:IP)?|WatchdogInterval|XBitHack|xml2EncAlias|xml2EncDefault|xml2StartParse)\b/im,lookbehind:!0,alias:"property"},"directive-block":{pattern:/<\/?\b(?:Auth[nz]ProviderAlias|Directory|DirectoryMatch|Else|ElseIf|Files|FilesMatch|If|IfDefine|IfModule|IfVersion|Limit|LimitExcept|Location|LocationMatch|Macro|Proxy|Require(?:All|Any|None)|VirtualHost)\b.*>/i,inside:{"directive-block":{pattern:/^<\/?\w+/,inside:{punctuation:/^<\/?/},alias:"tag"},"directive-block-parameter":{pattern:/.*[^>]/,inside:{punctuation:/:/,string:{pattern:/("|').*\1/,inside:{variable:/[$%]\{?(?:\w\.?[-+:]?)+\}?/}}},alias:"attr-value"},punctuation:/>/},alias:"tag"},"directive-flags":{pattern:/\[(?:[\w=],?)+\]/,alias:"keyword"},string:{pattern:/("|').*\1/,inside:{variable:/[$%]\{?(?:\w\.?[-+:]?)+\}?/}},variable:/[$%]\{?(?:\w\.?[-+:]?)+\}?/,regex:/\^?.*\$|\^.*\$?/}; \ No newline at end of file diff --git a/components/prism-apex.js b/components/prism-apex.js index 51c16c15ad..dbb7f0dcd6 100644 --- a/components/prism-apex.js +++ b/components/prism-apex.js @@ -1,6 +1,6 @@ (function (Prism) { - var keywords = /\b(?:abstract|activate|and|any|array|as|asc|autonomous|begin|bigdecimal|blob|boolean|break|bulk|by|byte|case|cast|catch|char|class|collect|commit|const|continue|currency|date|datetime|decimal|default|delete|desc|do|double|else|end|enum|exception|exit|export|extends|final|finally|float|for|from|global|goto|group|having|hint|if|implements|import|in|inner|insert|instanceof|int|integer|interface|into|join|like|limit|list|long|loop|map|merge|new|not|null|nulls|number|object|of|on|or|outer|override|package|parallel|pragma|private|protected|public|retrieve|return|rollback|select|set|short|sObject|sort|static|string|super|switch|synchronized|system|testmethod|then|this|throw|time|transaction|transient|trigger|try|undelete|update|upsert|using|virtual|void|webservice|when|where|while|get(?=\s*[{};])|(?:after|before)(?=\s+[a-z])|(?:inherited|with|without)\s+sharing)\b/i; + var keywords = /\b(?:(?:after|before)(?=\s+[a-z])|abstract|activate|and|any|array|as|asc|autonomous|begin|bigdecimal|blob|boolean|break|bulk|by|byte|case|cast|catch|char|class|collect|commit|const|continue|currency|date|datetime|decimal|default|delete|desc|do|double|else|end|enum|exception|exit|export|extends|final|finally|float|for|from|get(?=\s*[{};])|global|goto|group|having|hint|if|implements|import|in|inner|insert|instanceof|int|integer|interface|into|join|like|limit|list|long|loop|map|merge|new|not|null|nulls|number|object|of|on|or|outer|override|package|parallel|pragma|private|protected|public|retrieve|return|rollback|select|set|short|sObject|sort|static|string|super|switch|synchronized|system|testmethod|then|this|throw|time|transaction|transient|trigger|try|undelete|update|upsert|using|virtual|void|webservice|when|where|while|(?:inherited|with|without)\s+sharing)\b/i; var className = /\b(?:(?=[a-z_]\w*\s*[<\[])|(?!))[A-Z_]\w*(?:\s*\.\s*[A-Z_]\w*)*\b(?:\s*(?:\[\s*\]|<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>))*/.source .replace(//g, function () { return keywords.source; }); diff --git a/components/prism-apex.min.js b/components/prism-apex.min.js index b99a3d7b8c..ba2cdfabea 100644 --- a/components/prism-apex.min.js +++ b/components/prism-apex.min.js @@ -1 +1 @@ -!function(e){var t=/\b(?:abstract|activate|and|any|array|as|asc|autonomous|begin|bigdecimal|blob|boolean|break|bulk|by|byte|case|cast|catch|char|class|collect|commit|const|continue|currency|date|datetime|decimal|default|delete|desc|do|double|else|end|enum|exception|exit|export|extends|final|finally|float|for|from|global|goto|group|having|hint|if|implements|import|in|inner|insert|instanceof|int|integer|interface|into|join|like|limit|list|long|loop|map|merge|new|not|null|nulls|number|object|of|on|or|outer|override|package|parallel|pragma|private|protected|public|retrieve|return|rollback|select|set|short|sObject|sort|static|string|super|switch|synchronized|system|testmethod|then|this|throw|time|transaction|transient|trigger|try|undelete|update|upsert|using|virtual|void|webservice|when|where|while|get(?=\s*[{};])|(?:after|before)(?=\s+[a-z])|(?:inherited|with|without)\s+sharing)\b/i,n="\\b(?:(?=[a-z_]\\w*\\s*[<\\[])|(?!))[A-Z_]\\w*(?:\\s*\\.\\s*[A-Z_]\\w*)*\\b(?:\\s*(?:\\[\\s*\\]|<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>))*".replace(//g,function(){return t.source});function i(e){return RegExp(e.replace(//g,function(){return n}),"i")}var a={keyword:t,punctuation:/[()\[\]{};,:.<>]/};e.languages.apex={comment:e.languages.clike.comment,string:e.languages.clike.string,sql:{pattern:/((?:[=,({:]|\breturn)\s*)\[[^\[\]]*\]/i,lookbehind:!0,greedy:!0,alias:"language-sql",inside:e.languages.sql},annotation:{pattern:/@\w+\b/,alias:"punctuation"},"class-name":[{pattern:i("(\\b(?:class|enum|extends|implements|instanceof|interface|new|trigger\\s+\\w+\\s+on)\\s+)"),lookbehind:!0,inside:a},{pattern:i("(\\(\\s*)(?=\\s*\\)\\s*[\\w(])"),lookbehind:!0,inside:a},{pattern:i("(?=\\s*\\w+\\s*[;=,(){:])"),inside:a}],trigger:{pattern:/(\btrigger\s+)\w+\b/i,lookbehind:!0,alias:"class-name"},keyword:t,function:/\b[a-z_]\w*(?=\s*\()/i,boolean:/\b(?:false|true)\b/i,number:/(?:\B\.\d+|\b\d+(?:\.\d+|L)?)\b/i,operator:/[!=](?:==?)?|\?\.?|&&|\|\||--|\+\+|[-+*/^&|]=?|:|<{1,3}=?/,punctuation:/[()\[\]{};,.]/}}(Prism); \ No newline at end of file +!function(e){var t=/\b(?:(?:after|before)(?=\s+[a-z])|abstract|activate|and|any|array|as|asc|autonomous|begin|bigdecimal|blob|boolean|break|bulk|by|byte|case|cast|catch|char|class|collect|commit|const|continue|currency|date|datetime|decimal|default|delete|desc|do|double|else|end|enum|exception|exit|export|extends|final|finally|float|for|from|get(?=\s*[{};])|global|goto|group|having|hint|if|implements|import|in|inner|insert|instanceof|int|integer|interface|into|join|like|limit|list|long|loop|map|merge|new|not|null|nulls|number|object|of|on|or|outer|override|package|parallel|pragma|private|protected|public|retrieve|return|rollback|select|set|short|sObject|sort|static|string|super|switch|synchronized|system|testmethod|then|this|throw|time|transaction|transient|trigger|try|undelete|update|upsert|using|virtual|void|webservice|when|where|while|(?:inherited|with|without)\s+sharing)\b/i,n="\\b(?:(?=[a-z_]\\w*\\s*[<\\[])|(?!))[A-Z_]\\w*(?:\\s*\\.\\s*[A-Z_]\\w*)*\\b(?:\\s*(?:\\[\\s*\\]|<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>))*".replace(//g,function(){return t.source});function i(e){return RegExp(e.replace(//g,function(){return n}),"i")}var a={keyword:t,punctuation:/[()\[\]{};,:.<>]/};e.languages.apex={comment:e.languages.clike.comment,string:e.languages.clike.string,sql:{pattern:/((?:[=,({:]|\breturn)\s*)\[[^\[\]]*\]/i,lookbehind:!0,greedy:!0,alias:"language-sql",inside:e.languages.sql},annotation:{pattern:/@\w+\b/,alias:"punctuation"},"class-name":[{pattern:i("(\\b(?:class|enum|extends|implements|instanceof|interface|new|trigger\\s+\\w+\\s+on)\\s+)"),lookbehind:!0,inside:a},{pattern:i("(\\(\\s*)(?=\\s*\\)\\s*[\\w(])"),lookbehind:!0,inside:a},{pattern:i("(?=\\s*\\w+\\s*[;=,(){:])"),inside:a}],trigger:{pattern:/(\btrigger\s+)\w+\b/i,lookbehind:!0,alias:"class-name"},keyword:t,function:/\b[a-z_]\w*(?=\s*\()/i,boolean:/\b(?:false|true)\b/i,number:/(?:\B\.\d+|\b\d+(?:\.\d+|L)?)\b/i,operator:/[!=](?:==?)?|\?\.?|&&|\|\||--|\+\+|[-+*/^&|]=?|:|<{1,3}=?/,punctuation:/[()\[\]{};,.]/}}(Prism); \ No newline at end of file diff --git a/components/prism-applescript.js b/components/prism-applescript.js index 87328966c1..5a8f338d71 100644 --- a/components/prism-applescript.js +++ b/components/prism-applescript.js @@ -9,11 +9,11 @@ Prism.languages.applescript = { 'number': /(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e-?\d+)?\b/i, 'operator': [ /[&=≠≤≥*+\-\/÷^]|[<>]=?/, - /\b(?:(?:start|begin|end)s? with|(?:(?:does not|doesn't) contain|contains?)|(?:is|isn't|is not) (?:in|contained by)|(?:(?:is|isn't|is not) )?(?:greater|less) than(?: or equal)?(?: to)?|(?:(?:does not|doesn't) come|comes) (?:before|after)|(?:is|isn't|is not) equal(?: to)?|(?:(?:does not|doesn't) equal|equals|equal to|isn't|is not)|(?:a )?(?:ref(?: to)?|reference to)|(?:and|or|div|mod|as|not))\b/ + /\b(?:(?:begin|end|start)s? with|(?:contains?|(?:does not|doesn't) contain)|(?:is|isn't|is not) (?:contained by|in)|(?:(?:is|isn't|is not) )?(?:greater|less) than(?: or equal)?(?: to)?|(?:comes|(?:does not|doesn't) come) (?:after|before)|(?:is|isn't|is not) equal(?: to)?|(?:(?:does not|doesn't) equal|equal to|equals|is not|isn't)|(?:a )?(?:ref(?: to)?|reference to)|(?:and|as|div|mod|not|or))\b/ ], 'keyword': /\b(?:about|above|after|against|apart from|around|aside from|at|back|before|beginning|behind|below|beneath|beside|between|but|by|considering|continue|copy|does|eighth|else|end|equal|error|every|exit|false|fifth|first|for|fourth|from|front|get|given|global|if|ignoring|in|instead of|into|is|it|its|last|local|me|middle|my|ninth|of|on|onto|out of|over|prop|property|put|repeat|return|returning|second|set|seventh|since|sixth|some|tell|tenth|that|the|then|third|through|thru|timeout|times|to|transaction|true|try|until|where|while|whose|with|without)\b/, 'class': { - pattern: /\b(?:alias|application|boolean|class|constant|date|file|integer|list|number|POSIX file|real|record|reference|RGB color|script|text|centimetres|centimeters|feet|inches|kilometres|kilometers|metres|meters|miles|yards|square feet|square kilometres|square kilometers|square metres|square meters|square miles|square yards|cubic centimetres|cubic centimeters|cubic feet|cubic inches|cubic metres|cubic meters|cubic yards|gallons|litres|liters|quarts|grams|kilograms|ounces|pounds|degrees Celsius|degrees Fahrenheit|degrees Kelvin)\b/, + pattern: /\b(?:POSIX file|RGB color|alias|application|boolean|centimeters|centimetres|class|constant|cubic centimeters|cubic centimetres|cubic feet|cubic inches|cubic meters|cubic metres|cubic yards|date|degrees Celsius|degrees Fahrenheit|degrees Kelvin|feet|file|gallons|grams|inches|integer|kilograms|kilometers|kilometres|list|liters|litres|meters|metres|miles|number|ounces|pounds|quarts|real|record|reference|script|square feet|square kilometers|square kilometres|square meters|square metres|square miles|square yards|text|yards)\b/, alias: 'builtin' }, 'punctuation': /[{}():,¬«»《》]/ diff --git a/components/prism-applescript.min.js b/components/prism-applescript.min.js index c6c5d5e003..ee7fa91953 100644 --- a/components/prism-applescript.min.js +++ b/components/prism-applescript.min.js @@ -1 +1 @@ -Prism.languages.applescript={comment:[/\(\*(?:\(\*(?:[^*]|\*(?!\)))*\*\)|(?!\(\*)[\s\S])*?\*\)/,/--.+/,/#.+/],string:/"(?:\\.|[^"\\\r\n])*"/,number:/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e-?\d+)?\b/i,operator:[/[&=≠≤≥*+\-\/÷^]|[<>]=?/,/\b(?:(?:start|begin|end)s? with|(?:(?:does not|doesn't) contain|contains?)|(?:is|isn't|is not) (?:in|contained by)|(?:(?:is|isn't|is not) )?(?:greater|less) than(?: or equal)?(?: to)?|(?:(?:does not|doesn't) come|comes) (?:before|after)|(?:is|isn't|is not) equal(?: to)?|(?:(?:does not|doesn't) equal|equals|equal to|isn't|is not)|(?:a )?(?:ref(?: to)?|reference to)|(?:and|or|div|mod|as|not))\b/],keyword:/\b(?:about|above|after|against|apart from|around|aside from|at|back|before|beginning|behind|below|beneath|beside|between|but|by|considering|continue|copy|does|eighth|else|end|equal|error|every|exit|false|fifth|first|for|fourth|from|front|get|given|global|if|ignoring|in|instead of|into|is|it|its|last|local|me|middle|my|ninth|of|on|onto|out of|over|prop|property|put|repeat|return|returning|second|set|seventh|since|sixth|some|tell|tenth|that|the|then|third|through|thru|timeout|times|to|transaction|true|try|until|where|while|whose|with|without)\b/,class:{pattern:/\b(?:alias|application|boolean|class|constant|date|file|integer|list|number|POSIX file|real|record|reference|RGB color|script|text|centimetres|centimeters|feet|inches|kilometres|kilometers|metres|meters|miles|yards|square feet|square kilometres|square kilometers|square metres|square meters|square miles|square yards|cubic centimetres|cubic centimeters|cubic feet|cubic inches|cubic metres|cubic meters|cubic yards|gallons|litres|liters|quarts|grams|kilograms|ounces|pounds|degrees Celsius|degrees Fahrenheit|degrees Kelvin)\b/,alias:"builtin"},punctuation:/[{}():,¬«»《》]/}; \ No newline at end of file +Prism.languages.applescript={comment:[/\(\*(?:\(\*(?:[^*]|\*(?!\)))*\*\)|(?!\(\*)[\s\S])*?\*\)/,/--.+/,/#.+/],string:/"(?:\\.|[^"\\\r\n])*"/,number:/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e-?\d+)?\b/i,operator:[/[&=≠≤≥*+\-\/÷^]|[<>]=?/,/\b(?:(?:begin|end|start)s? with|(?:contains?|(?:does not|doesn't) contain)|(?:is|isn't|is not) (?:contained by|in)|(?:(?:is|isn't|is not) )?(?:greater|less) than(?: or equal)?(?: to)?|(?:comes|(?:does not|doesn't) come) (?:after|before)|(?:is|isn't|is not) equal(?: to)?|(?:(?:does not|doesn't) equal|equal to|equals|is not|isn't)|(?:a )?(?:ref(?: to)?|reference to)|(?:and|as|div|mod|not|or))\b/],keyword:/\b(?:about|above|after|against|apart from|around|aside from|at|back|before|beginning|behind|below|beneath|beside|between|but|by|considering|continue|copy|does|eighth|else|end|equal|error|every|exit|false|fifth|first|for|fourth|from|front|get|given|global|if|ignoring|in|instead of|into|is|it|its|last|local|me|middle|my|ninth|of|on|onto|out of|over|prop|property|put|repeat|return|returning|second|set|seventh|since|sixth|some|tell|tenth|that|the|then|third|through|thru|timeout|times|to|transaction|true|try|until|where|while|whose|with|without)\b/,class:{pattern:/\b(?:POSIX file|RGB color|alias|application|boolean|centimeters|centimetres|class|constant|cubic centimeters|cubic centimetres|cubic feet|cubic inches|cubic meters|cubic metres|cubic yards|date|degrees Celsius|degrees Fahrenheit|degrees Kelvin|feet|file|gallons|grams|inches|integer|kilograms|kilometers|kilometres|list|liters|litres|meters|metres|miles|number|ounces|pounds|quarts|real|record|reference|script|square feet|square kilometers|square kilometres|square meters|square metres|square miles|square yards|text|yards)\b/,alias:"builtin"},punctuation:/[{}():,¬«»《》]/}; \ No newline at end of file diff --git a/components/prism-aql.js b/components/prism-aql.js index c61a51c41b..19592992db 100644 --- a/components/prism-aql.js +++ b/components/prism-aql.js @@ -30,7 +30,7 @@ Prism.languages.aql = { } ], 'function': /\b(?!\d)\w+(?=\s*\()/, - 'boolean': /\b(?:true|false)\b/i, + 'boolean': /\b(?:false|true)\b/i, 'range': { pattern: /\.\./, alias: 'operator' diff --git a/components/prism-aql.min.js b/components/prism-aql.min.js index a9f85f2a82..612b347516 100644 --- a/components/prism-aql.min.js +++ b/components/prism-aql.min.js @@ -1 +1 @@ -Prism.languages.aql={comment:/\/\/.*|\/\*[\s\S]*?\*\//,property:{pattern:/([{,]\s*)(?:(?!\d)\w+|(["'´`])(?:(?!\2)[^\\\r\n]|\\.)*\2)(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(["'´`])(?:(?!\1)[^\\\r\n]|\\.)*\1/,greedy:!0},variable:/@@?\w+/,keyword:[{pattern:/(\bWITH\s+)COUNT(?=\s+INTO\b)/i,lookbehind:!0},/\b(?:AGGREGATE|ALL|AND|ANY|ASC|COLLECT|DESC|DISTINCT|FILTER|FOR|GRAPH|IN|INBOUND|INSERT|INTO|K_PATHS|K_SHORTEST_PATHS|LET|LIKE|LIMIT|NONE|NOT|NULL|OR|OUTBOUND|REMOVE|REPLACE|RETURN|SHORTEST_PATH|SORT|UPDATE|UPSERT|WINDOW|WITH)\b/i,{pattern:/(^|[^\w.[])(?:KEEP|PRUNE|SEARCH|TO)\b/i,lookbehind:!0},{pattern:/(^|[^\w.[])(?:CURRENT|NEW|OLD)\b/,lookbehind:!0},{pattern:/\bOPTIONS(?=\s*\{)/i}],function:/\b(?!\d)\w+(?=\s*\()/,boolean:/\b(?:true|false)\b/i,range:{pattern:/\.\./,alias:"operator"},number:[/\b0b[01]+/i,/\b0x[0-9a-f]+/i,/(?:\B\.\d+|\b(?:0|[1-9]\d*)(?:\.\d+)?)(?:e[+-]?\d+)?/i],operator:/\*{2,}|[=!]~|[!=<>]=?|&&|\|\||[-+*/%]/,punctuation:/::|[?.:,;()[\]{}]/}; \ No newline at end of file +Prism.languages.aql={comment:/\/\/.*|\/\*[\s\S]*?\*\//,property:{pattern:/([{,]\s*)(?:(?!\d)\w+|(["'´`])(?:(?!\2)[^\\\r\n]|\\.)*\2)(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(["'´`])(?:(?!\1)[^\\\r\n]|\\.)*\1/,greedy:!0},variable:/@@?\w+/,keyword:[{pattern:/(\bWITH\s+)COUNT(?=\s+INTO\b)/i,lookbehind:!0},/\b(?:AGGREGATE|ALL|AND|ANY|ASC|COLLECT|DESC|DISTINCT|FILTER|FOR|GRAPH|IN|INBOUND|INSERT|INTO|K_PATHS|K_SHORTEST_PATHS|LET|LIKE|LIMIT|NONE|NOT|NULL|OR|OUTBOUND|REMOVE|REPLACE|RETURN|SHORTEST_PATH|SORT|UPDATE|UPSERT|WINDOW|WITH)\b/i,{pattern:/(^|[^\w.[])(?:KEEP|PRUNE|SEARCH|TO)\b/i,lookbehind:!0},{pattern:/(^|[^\w.[])(?:CURRENT|NEW|OLD)\b/,lookbehind:!0},{pattern:/\bOPTIONS(?=\s*\{)/i}],function:/\b(?!\d)\w+(?=\s*\()/,boolean:/\b(?:false|true)\b/i,range:{pattern:/\.\./,alias:"operator"},number:[/\b0b[01]+/i,/\b0x[0-9a-f]+/i,/(?:\B\.\d+|\b(?:0|[1-9]\d*)(?:\.\d+)?)(?:e[+-]?\d+)?/i],operator:/\*{2,}|[=!]~|[!=<>]=?|&&|\|\||[-+*/%]/,punctuation:/::|[?.:,;()[\]{}]/}; \ No newline at end of file diff --git a/components/prism-arduino.js b/components/prism-arduino.js index 7ddb68b880..6c25c86980 100644 --- a/components/prism-arduino.js +++ b/components/prism-arduino.js @@ -1,5 +1,5 @@ Prism.languages.arduino = Prism.languages.extend('cpp', { - 'constant': /\b(?:DIGITAL_MESSAGE|FIRMATA_STRING|ANALOG_MESSAGE|REPORT_DIGITAL|REPORT_ANALOG|INPUT_PULLUP|SET_PIN_MODE|INTERNAL2V56|SYSTEM_RESET|LED_BUILTIN|INTERNAL1V1|SYSEX_START|INTERNAL|EXTERNAL|DEFAULT|OUTPUT|INPUT|HIGH|LOW)\b/, - 'keyword': /\b(?:setup|if|else|while|do|for|return|in|instanceof|default|function|loop|goto|switch|case|new|try|throw|catch|finally|null|break|continue|boolean|bool|void|byte|word|string|String|array|int|long|integer|double)\b/, - 'builtin': /\b(?:KeyboardController|MouseController|SoftwareSerial|EthernetServer|EthernetClient|LiquidCrystal|LiquidCrystal_I2C|RobotControl|GSMVoiceCall|EthernetUDP|EsploraTFT|HttpClient|RobotMotor|WiFiClient|GSMScanner|FileSystem|Scheduler|GSMServer|YunClient|YunServer|IPAddress|GSMClient|GSMModem|Keyboard|Ethernet|Console|GSMBand|Esplora|Stepper|Process|WiFiUDP|GSM_SMS|Mailbox|USBHost|Firmata|PImage|Client|Server|GSMPIN|FileIO|Bridge|Serial|EEPROM|Stream|Mouse|Audio|Servo|File|Task|GPRS|WiFi|Wire|TFT|GSM|SPI|SD|runShellCommandAsynchronously|analogWriteResolution|retrieveCallingNumber|printFirmwareVersion|analogReadResolution|sendDigitalPortPair|noListenOnLocalhost|readJoystickButton|setFirmwareVersion|readJoystickSwitch|scrollDisplayRight|getVoiceCallStatus|scrollDisplayLeft|writeMicroseconds|delayMicroseconds|beginTransmission|getSignalStrength|runAsynchronously|getAsynchronously|listenOnLocalhost|getCurrentCarrier|readAccelerometer|messageAvailable|sendDigitalPorts|lineFollowConfig|countryNameWrite|runShellCommand|readStringUntil|rewindDirectory|readTemperature|setClockDivider|readLightSensor|endTransmission|analogReference|detachInterrupt|countryNameRead|attachInterrupt|encryptionType|readBytesUntil|robotNameWrite|readMicrophone|robotNameRead|cityNameWrite|userNameWrite|readJoystickY|readJoystickX|mouseReleased|openNextFile|scanNetworks|noInterrupts|digitalWrite|beginSpeaker|mousePressed|isActionDone|mouseDragged|displayLogos|noAutoscroll|addParameter|remoteNumber|getModifiers|keyboardRead|userNameRead|waitContinue|processInput|parseCommand|printVersion|readNetworks|writeMessage|blinkVersion|cityNameRead|readMessage|setDataMode|parsePacket|isListening|setBitOrder|beginPacket|isDirectory|motorsWrite|drawCompass|digitalRead|clearScreen|serialEvent|rightToLeft|setTextSize|leftToRight|requestFrom|keyReleased|compassRead|analogWrite|interrupts|WiFiServer|disconnect|playMelody|parseFloat|autoscroll|getPINUsed|setPINUsed|setTimeout|sendAnalog|readSlider|analogRead|beginWrite|createChar|motorsStop|keyPressed|tempoWrite|readButton|subnetMask|debugPrint|macAddress|writeGreen|randomSeed|attachGPRS|readString|sendString|remotePort|releaseAll|mouseMoved|background|getXChange|getYChange|answerCall|getResult|voiceCall|endPacket|constrain|getSocket|writeJSON|getButton|available|connected|findUntil|readBytes|exitValue|readGreen|writeBlue|startLoop|isPressed|sendSysex|pauseMode|gatewayIP|setCursor|getOemKey|tuneWrite|noDisplay|loadImage|switchPIN|onRequest|onReceive|changePIN|playFile|noBuffer|parseInt|overflow|checkPIN|knobRead|beginTFT|bitClear|updateIR|bitWrite|position|writeRGB|highByte|writeRed|setSpeed|readBlue|noStroke|remoteIP|transfer|shutdown|hangCall|beginSMS|endWrite|attached|maintain|noCursor|checkReg|checkPUK|shiftOut|isValid|shiftIn|pulseIn|connect|println|localIP|pinMode|getIMEI|display|noBlink|process|getBand|running|beginSD|drawBMP|lowByte|setBand|release|bitRead|prepare|pointTo|readRed|setMode|noFill|remove|listen|stroke|detach|attach|noTone|exists|buffer|height|bitSet|circle|config|cursor|random|IRread|setDNS|endSMS|getKey|micros|millis|begin|print|write|ready|flush|width|isPIN|blink|clear|press|mkdir|rmdir|close|point|yield|image|BSSID|click|delay|read|text|move|peek|beep|rect|line|open|seek|fill|size|turn|stop|home|find|step|tone|sqrt|RSSI|SSID|end|bit|tan|cos|sin|pow|map|abs|max|min|get|run|put)\b/ + 'constant': /\b(?:ANALOG_MESSAGE|DEFAULT|DIGITAL_MESSAGE|EXTERNAL|FIRMATA_STRING|HIGH|INPUT|INPUT_PULLUP|INTERNAL|INTERNAL1V1|INTERNAL2V56|LED_BUILTIN|LOW|OUTPUT|REPORT_ANALOG|REPORT_DIGITAL|SET_PIN_MODE|SYSEX_START|SYSTEM_RESET)\b/, + 'keyword': /\b(?:String|array|bool|boolean|break|byte|case|catch|continue|default|do|double|else|finally|for|function|goto|if|in|instanceof|int|integer|long|loop|new|null|return|setup|string|switch|throw|try|void|while|word)\b/, + 'builtin': /\b(?:Audio|BSSID|Bridge|Client|Console|EEPROM|Esplora|EsploraTFT|Ethernet|EthernetClient|EthernetServer|EthernetUDP|File|FileIO|FileSystem|Firmata|GPRS|GSM|GSMBand|GSMClient|GSMModem|GSMPIN|GSMScanner|GSMServer|GSMVoiceCall|GSM_SMS|HttpClient|IPAddress|IRread|Keyboard|KeyboardController|LiquidCrystal|LiquidCrystal_I2C|Mailbox|Mouse|MouseController|PImage|Process|RSSI|RobotControl|RobotMotor|SD|SPI|SSID|Scheduler|Serial|Server|Servo|SoftwareSerial|Stepper|Stream|TFT|Task|USBHost|WiFi|WiFiClient|WiFiServer|WiFiUDP|Wire|YunClient|YunServer|abs|addParameter|analogRead|analogReadResolution|analogReference|analogWrite|analogWriteResolution|answerCall|attach|attachGPRS|attachInterrupt|attached|autoscroll|available|background|beep|begin|beginPacket|beginSD|beginSMS|beginSpeaker|beginTFT|beginTransmission|beginWrite|bit|bitClear|bitRead|bitSet|bitWrite|blink|blinkVersion|buffer|changePIN|checkPIN|checkPUK|checkReg|circle|cityNameRead|cityNameWrite|clear|clearScreen|click|close|compassRead|config|connect|connected|constrain|cos|countryNameRead|countryNameWrite|createChar|cursor|debugPrint|delay|delayMicroseconds|detach|detachInterrupt|digitalRead|digitalWrite|disconnect|display|displayLogos|drawBMP|drawCompass|encryptionType|end|endPacket|endSMS|endTransmission|endWrite|exists|exitValue|fill|find|findUntil|flush|gatewayIP|get|getAsynchronously|getBand|getButton|getCurrentCarrier|getIMEI|getKey|getModifiers|getOemKey|getPINUsed|getResult|getSignalStrength|getSocket|getVoiceCallStatus|getXChange|getYChange|hangCall|height|highByte|home|image|interrupts|isActionDone|isDirectory|isListening|isPIN|isPressed|isValid|keyPressed|keyReleased|keyboardRead|knobRead|leftToRight|line|lineFollowConfig|listen|listenOnLocalhost|loadImage|localIP|lowByte|macAddress|maintain|map|max|messageAvailable|micros|millis|min|mkdir|motorsStop|motorsWrite|mouseDragged|mouseMoved|mousePressed|mouseReleased|move|noAutoscroll|noBlink|noBuffer|noCursor|noDisplay|noFill|noInterrupts|noListenOnLocalhost|noStroke|noTone|onReceive|onRequest|open|openNextFile|overflow|parseCommand|parseFloat|parseInt|parsePacket|pauseMode|peek|pinMode|playFile|playMelody|point|pointTo|position|pow|prepare|press|print|printFirmwareVersion|printVersion|println|process|processInput|pulseIn|put|random|randomSeed|read|readAccelerometer|readBlue|readButton|readBytes|readBytesUntil|readGreen|readJoystickButton|readJoystickSwitch|readJoystickX|readJoystickY|readLightSensor|readMessage|readMicrophone|readNetworks|readRed|readSlider|readString|readStringUntil|readTemperature|ready|rect|release|releaseAll|remoteIP|remoteNumber|remotePort|remove|requestFrom|retrieveCallingNumber|rewindDirectory|rightToLeft|rmdir|robotNameRead|robotNameWrite|run|runAsynchronously|runShellCommand|runShellCommandAsynchronously|running|scanNetworks|scrollDisplayLeft|scrollDisplayRight|seek|sendAnalog|sendDigitalPortPair|sendDigitalPorts|sendString|sendSysex|serialEvent|setBand|setBitOrder|setClockDivider|setCursor|setDNS|setDataMode|setFirmwareVersion|setMode|setPINUsed|setSpeed|setTextSize|setTimeout|shiftIn|shiftOut|shutdown|sin|size|sqrt|startLoop|step|stop|stroke|subnetMask|switchPIN|tan|tempoWrite|text|tone|transfer|tuneWrite|turn|updateIR|userNameRead|userNameWrite|voiceCall|waitContinue|width|write|writeBlue|writeGreen|writeJSON|writeMessage|writeMicroseconds|writeRGB|writeRed|yield)\b/ }); diff --git a/components/prism-arduino.min.js b/components/prism-arduino.min.js index a7f5e1dee6..55109cd330 100644 --- a/components/prism-arduino.min.js +++ b/components/prism-arduino.min.js @@ -1 +1 @@ -Prism.languages.arduino=Prism.languages.extend("cpp",{constant:/\b(?:DIGITAL_MESSAGE|FIRMATA_STRING|ANALOG_MESSAGE|REPORT_DIGITAL|REPORT_ANALOG|INPUT_PULLUP|SET_PIN_MODE|INTERNAL2V56|SYSTEM_RESET|LED_BUILTIN|INTERNAL1V1|SYSEX_START|INTERNAL|EXTERNAL|DEFAULT|OUTPUT|INPUT|HIGH|LOW)\b/,keyword:/\b(?:setup|if|else|while|do|for|return|in|instanceof|default|function|loop|goto|switch|case|new|try|throw|catch|finally|null|break|continue|boolean|bool|void|byte|word|string|String|array|int|long|integer|double)\b/,builtin:/\b(?:KeyboardController|MouseController|SoftwareSerial|EthernetServer|EthernetClient|LiquidCrystal|LiquidCrystal_I2C|RobotControl|GSMVoiceCall|EthernetUDP|EsploraTFT|HttpClient|RobotMotor|WiFiClient|GSMScanner|FileSystem|Scheduler|GSMServer|YunClient|YunServer|IPAddress|GSMClient|GSMModem|Keyboard|Ethernet|Console|GSMBand|Esplora|Stepper|Process|WiFiUDP|GSM_SMS|Mailbox|USBHost|Firmata|PImage|Client|Server|GSMPIN|FileIO|Bridge|Serial|EEPROM|Stream|Mouse|Audio|Servo|File|Task|GPRS|WiFi|Wire|TFT|GSM|SPI|SD|runShellCommandAsynchronously|analogWriteResolution|retrieveCallingNumber|printFirmwareVersion|analogReadResolution|sendDigitalPortPair|noListenOnLocalhost|readJoystickButton|setFirmwareVersion|readJoystickSwitch|scrollDisplayRight|getVoiceCallStatus|scrollDisplayLeft|writeMicroseconds|delayMicroseconds|beginTransmission|getSignalStrength|runAsynchronously|getAsynchronously|listenOnLocalhost|getCurrentCarrier|readAccelerometer|messageAvailable|sendDigitalPorts|lineFollowConfig|countryNameWrite|runShellCommand|readStringUntil|rewindDirectory|readTemperature|setClockDivider|readLightSensor|endTransmission|analogReference|detachInterrupt|countryNameRead|attachInterrupt|encryptionType|readBytesUntil|robotNameWrite|readMicrophone|robotNameRead|cityNameWrite|userNameWrite|readJoystickY|readJoystickX|mouseReleased|openNextFile|scanNetworks|noInterrupts|digitalWrite|beginSpeaker|mousePressed|isActionDone|mouseDragged|displayLogos|noAutoscroll|addParameter|remoteNumber|getModifiers|keyboardRead|userNameRead|waitContinue|processInput|parseCommand|printVersion|readNetworks|writeMessage|blinkVersion|cityNameRead|readMessage|setDataMode|parsePacket|isListening|setBitOrder|beginPacket|isDirectory|motorsWrite|drawCompass|digitalRead|clearScreen|serialEvent|rightToLeft|setTextSize|leftToRight|requestFrom|keyReleased|compassRead|analogWrite|interrupts|WiFiServer|disconnect|playMelody|parseFloat|autoscroll|getPINUsed|setPINUsed|setTimeout|sendAnalog|readSlider|analogRead|beginWrite|createChar|motorsStop|keyPressed|tempoWrite|readButton|subnetMask|debugPrint|macAddress|writeGreen|randomSeed|attachGPRS|readString|sendString|remotePort|releaseAll|mouseMoved|background|getXChange|getYChange|answerCall|getResult|voiceCall|endPacket|constrain|getSocket|writeJSON|getButton|available|connected|findUntil|readBytes|exitValue|readGreen|writeBlue|startLoop|isPressed|sendSysex|pauseMode|gatewayIP|setCursor|getOemKey|tuneWrite|noDisplay|loadImage|switchPIN|onRequest|onReceive|changePIN|playFile|noBuffer|parseInt|overflow|checkPIN|knobRead|beginTFT|bitClear|updateIR|bitWrite|position|writeRGB|highByte|writeRed|setSpeed|readBlue|noStroke|remoteIP|transfer|shutdown|hangCall|beginSMS|endWrite|attached|maintain|noCursor|checkReg|checkPUK|shiftOut|isValid|shiftIn|pulseIn|connect|println|localIP|pinMode|getIMEI|display|noBlink|process|getBand|running|beginSD|drawBMP|lowByte|setBand|release|bitRead|prepare|pointTo|readRed|setMode|noFill|remove|listen|stroke|detach|attach|noTone|exists|buffer|height|bitSet|circle|config|cursor|random|IRread|setDNS|endSMS|getKey|micros|millis|begin|print|write|ready|flush|width|isPIN|blink|clear|press|mkdir|rmdir|close|point|yield|image|BSSID|click|delay|read|text|move|peek|beep|rect|line|open|seek|fill|size|turn|stop|home|find|step|tone|sqrt|RSSI|SSID|end|bit|tan|cos|sin|pow|map|abs|max|min|get|run|put)\b/}); \ No newline at end of file +Prism.languages.arduino=Prism.languages.extend("cpp",{constant:/\b(?:ANALOG_MESSAGE|DEFAULT|DIGITAL_MESSAGE|EXTERNAL|FIRMATA_STRING|HIGH|INPUT|INPUT_PULLUP|INTERNAL|INTERNAL1V1|INTERNAL2V56|LED_BUILTIN|LOW|OUTPUT|REPORT_ANALOG|REPORT_DIGITAL|SET_PIN_MODE|SYSEX_START|SYSTEM_RESET)\b/,keyword:/\b(?:String|array|bool|boolean|break|byte|case|catch|continue|default|do|double|else|finally|for|function|goto|if|in|instanceof|int|integer|long|loop|new|null|return|setup|string|switch|throw|try|void|while|word)\b/,builtin:/\b(?:Audio|BSSID|Bridge|Client|Console|EEPROM|Esplora|EsploraTFT|Ethernet|EthernetClient|EthernetServer|EthernetUDP|File|FileIO|FileSystem|Firmata|GPRS|GSM|GSMBand|GSMClient|GSMModem|GSMPIN|GSMScanner|GSMServer|GSMVoiceCall|GSM_SMS|HttpClient|IPAddress|IRread|Keyboard|KeyboardController|LiquidCrystal|LiquidCrystal_I2C|Mailbox|Mouse|MouseController|PImage|Process|RSSI|RobotControl|RobotMotor|SD|SPI|SSID|Scheduler|Serial|Server|Servo|SoftwareSerial|Stepper|Stream|TFT|Task|USBHost|WiFi|WiFiClient|WiFiServer|WiFiUDP|Wire|YunClient|YunServer|abs|addParameter|analogRead|analogReadResolution|analogReference|analogWrite|analogWriteResolution|answerCall|attach|attachGPRS|attachInterrupt|attached|autoscroll|available|background|beep|begin|beginPacket|beginSD|beginSMS|beginSpeaker|beginTFT|beginTransmission|beginWrite|bit|bitClear|bitRead|bitSet|bitWrite|blink|blinkVersion|buffer|changePIN|checkPIN|checkPUK|checkReg|circle|cityNameRead|cityNameWrite|clear|clearScreen|click|close|compassRead|config|connect|connected|constrain|cos|countryNameRead|countryNameWrite|createChar|cursor|debugPrint|delay|delayMicroseconds|detach|detachInterrupt|digitalRead|digitalWrite|disconnect|display|displayLogos|drawBMP|drawCompass|encryptionType|end|endPacket|endSMS|endTransmission|endWrite|exists|exitValue|fill|find|findUntil|flush|gatewayIP|get|getAsynchronously|getBand|getButton|getCurrentCarrier|getIMEI|getKey|getModifiers|getOemKey|getPINUsed|getResult|getSignalStrength|getSocket|getVoiceCallStatus|getXChange|getYChange|hangCall|height|highByte|home|image|interrupts|isActionDone|isDirectory|isListening|isPIN|isPressed|isValid|keyPressed|keyReleased|keyboardRead|knobRead|leftToRight|line|lineFollowConfig|listen|listenOnLocalhost|loadImage|localIP|lowByte|macAddress|maintain|map|max|messageAvailable|micros|millis|min|mkdir|motorsStop|motorsWrite|mouseDragged|mouseMoved|mousePressed|mouseReleased|move|noAutoscroll|noBlink|noBuffer|noCursor|noDisplay|noFill|noInterrupts|noListenOnLocalhost|noStroke|noTone|onReceive|onRequest|open|openNextFile|overflow|parseCommand|parseFloat|parseInt|parsePacket|pauseMode|peek|pinMode|playFile|playMelody|point|pointTo|position|pow|prepare|press|print|printFirmwareVersion|printVersion|println|process|processInput|pulseIn|put|random|randomSeed|read|readAccelerometer|readBlue|readButton|readBytes|readBytesUntil|readGreen|readJoystickButton|readJoystickSwitch|readJoystickX|readJoystickY|readLightSensor|readMessage|readMicrophone|readNetworks|readRed|readSlider|readString|readStringUntil|readTemperature|ready|rect|release|releaseAll|remoteIP|remoteNumber|remotePort|remove|requestFrom|retrieveCallingNumber|rewindDirectory|rightToLeft|rmdir|robotNameRead|robotNameWrite|run|runAsynchronously|runShellCommand|runShellCommandAsynchronously|running|scanNetworks|scrollDisplayLeft|scrollDisplayRight|seek|sendAnalog|sendDigitalPortPair|sendDigitalPorts|sendString|sendSysex|serialEvent|setBand|setBitOrder|setClockDivider|setCursor|setDNS|setDataMode|setFirmwareVersion|setMode|setPINUsed|setSpeed|setTextSize|setTimeout|shiftIn|shiftOut|shutdown|sin|size|sqrt|startLoop|step|stop|stroke|subnetMask|switchPIN|tan|tempoWrite|text|tone|transfer|tuneWrite|turn|updateIR|userNameRead|userNameWrite|voiceCall|waitContinue|width|write|writeBlue|writeGreen|writeJSON|writeMessage|writeMicroseconds|writeRGB|writeRed|yield)\b/}); \ No newline at end of file diff --git a/components/prism-asciidoc.js b/components/prism-asciidoc.js index 8909f14b33..b4818e5a4e 100644 --- a/components/prism-asciidoc.js +++ b/components/prism-asciidoc.js @@ -109,7 +109,7 @@ alias: 'punctuation' }, 'admonition': { - pattern: /^(?:TIP|NOTE|IMPORTANT|WARNING|CAUTION):/m, + pattern: /^(?:CAUTION|IMPORTANT|NOTE|TIP|WARNING):/m, alias: 'keyword' }, 'callout': [ @@ -186,7 +186,7 @@ } }, 'replacement': { - pattern: /\((?:C|TM|R)\)/, + pattern: /\((?:C|R|TM)\)/, alias: 'builtin' }, 'entity': /&#?[\da-z]{1,8};/i, diff --git a/components/prism-asciidoc.min.js b/components/prism-asciidoc.min.js index dc59cbf3b0..ed45a7a251 100644 --- a/components/prism-asciidoc.min.js +++ b/components/prism-asciidoc.min.js @@ -1 +1 @@ -!function(t){var n={pattern:/(^[ \t]*)\[(?!\[)(?:(["'$`])(?:(?!\2)[^\\]|\\.)*\2|\[(?:[^\[\]\\]|\\.)*\]|[^\[\]\\"'$`]|\\.)*\]/m,lookbehind:!0,inside:{quoted:{pattern:/([$`])(?:(?!\1)[^\\]|\\.)*\1/,inside:{punctuation:/^[$`]|[$`]$/}},interpreted:{pattern:/'(?:[^'\\]|\\.)*'/,inside:{punctuation:/^'|'$/}},string:/"(?:[^"\\]|\\.)*"/,variable:/\w+(?==)/,punctuation:/^\[|\]$|,/,operator:/=/,"attr-value":/(?!^\s+$).+/}},a=t.languages.asciidoc={"comment-block":{pattern:/^(\/{4,})(?:\r?\n|\r)(?:[\s\S]*(?:\r?\n|\r))??\1/m,alias:"comment"},table:{pattern:/^\|={3,}(?:(?:\r?\n|\r(?!\n)).*)*?(?:\r?\n|\r)\|={3,}$/m,inside:{specifiers:{pattern:/(?:(?:(?:\d+(?:\.\d+)?|\.\d+)[+*](?:[<^>](?:\.[<^>])?|\.[<^>])?|[<^>](?:\.[<^>])?|\.[<^>])[a-z]*|[a-z]+)(?=\|)/,alias:"attr-value"},punctuation:{pattern:/(^|[^\\])[|!]=*/,lookbehind:!0}}},"passthrough-block":{pattern:/^(\+{4,})(?:\r?\n|\r)(?:[\s\S]*(?:\r?\n|\r))??\1$/m,inside:{punctuation:/^\++|\++$/}},"literal-block":{pattern:/^(-{4,}|\.{4,})(?:\r?\n|\r)(?:[\s\S]*(?:\r?\n|\r))??\1$/m,inside:{punctuation:/^(?:-+|\.+)|(?:-+|\.+)$/}},"other-block":{pattern:/^(--|\*{4,}|_{4,}|={4,})(?:\r?\n|\r)(?:[\s\S]*(?:\r?\n|\r))??\1$/m,inside:{punctuation:/^(?:-+|\*+|_+|=+)|(?:-+|\*+|_+|=+)$/}},"list-punctuation":{pattern:/(^[ \t]*)(?:-|\*{1,5}|\.{1,5}|(?:[a-z]|\d+)\.|[xvi]+\))(?= )/im,lookbehind:!0,alias:"punctuation"},"list-label":{pattern:/(^[ \t]*)[a-z\d].+(?::{2,4}|;;)(?=\s)/im,lookbehind:!0,alias:"symbol"},"indented-block":{pattern:/((\r?\n|\r)\2)([ \t]+)\S.*(?:(?:\r?\n|\r)\3.+)*(?=\2{2}|$)/,lookbehind:!0},comment:/^\/\/.*/m,title:{pattern:/^.+(?:\r?\n|\r)(?:={3,}|-{3,}|~{3,}|\^{3,}|\+{3,})$|^={1,5} .+|^\.(?![\s.]).*/m,alias:"important",inside:{punctuation:/^(?:\.|=+)|(?:=+|-+|~+|\^+|\++)$/}},"attribute-entry":{pattern:/^:[^:\r\n]+:(?: .*?(?: \+(?:\r?\n|\r).*?)*)?$/m,alias:"tag"},attributes:n,hr:{pattern:/^'{3,}$/m,alias:"punctuation"},"page-break":{pattern:/^<{3,}$/m,alias:"punctuation"},admonition:{pattern:/^(?:TIP|NOTE|IMPORTANT|WARNING|CAUTION):/m,alias:"keyword"},callout:[{pattern:/(^[ \t]*)/m,lookbehind:!0,alias:"symbol"},{pattern:/<\d+>/,alias:"symbol"}],macro:{pattern:/\b[a-z\d][a-z\d-]*::?(?:[^\s\[\]]*\[(?:[^\]\\"']|(["'])(?:(?!\1)[^\\]|\\.)*\1|\\.)*\])/,inside:{function:/^[a-z\d-]+(?=:)/,punctuation:/^::?/,attributes:{pattern:/(?:\[(?:[^\]\\"']|(["'])(?:(?!\1)[^\\]|\\.)*\1|\\.)*\])/,inside:n.inside}}},inline:{pattern:/(^|[^\\])(?:(?:\B\[(?:[^\]\\"']|(["'])(?:(?!\2)[^\\]|\\.)*\2|\\.)*\])?(?:\b_(?!\s)(?: _|[^_\\\r\n]|\\.)+(?:(?:\r?\n|\r)(?: _|[^_\\\r\n]|\\.)+)*_\b|\B``(?!\s).+?(?:(?:\r?\n|\r).+?)*''\B|\B`(?!\s)(?:[^`'\s]|\s+\S)+['`]\B|\B(['*+#])(?!\s)(?: \3|(?!\3)[^\\\r\n]|\\.)+(?:(?:\r?\n|\r)(?: \3|(?!\3)[^\\\r\n]|\\.)+)*\3\B)|(?:\[(?:[^\]\\"']|(["'])(?:(?!\4)[^\\]|\\.)*\4|\\.)*\])?(?:(__|\*\*|\+\+\+?|##|\$\$|[~^]).+?(?:(?:\r?\n|\r).+?)*\5|\{[^}\r\n]+\}|\[\[\[?.+?(?:(?:\r?\n|\r).+?)*\]?\]\]|<<.+?(?:(?:\r?\n|\r).+?)*>>|\(\(\(?.+?(?:(?:\r?\n|\r).+?)*\)?\)\)))/m,lookbehind:!0,inside:{attributes:n,url:{pattern:/^(?:\[\[\[?.+?\]?\]\]|<<.+?>>)$/,inside:{punctuation:/^(?:\[\[\[?|<<)|(?:\]\]\]?|>>)$/}},"attribute-ref":{pattern:/^\{.+\}$/,inside:{variable:{pattern:/(^\{)[a-z\d,+_-]+/,lookbehind:!0},operator:/^[=?!#%@$]|!(?=[:}])/,punctuation:/^\{|\}$|::?/}},italic:{pattern:/^(['_])[\s\S]+\1$/,inside:{punctuation:/^(?:''?|__?)|(?:''?|__?)$/}},bold:{pattern:/^\*[\s\S]+\*$/,inside:{punctuation:/^\*\*?|\*\*?$/}},punctuation:/^(?:``?|\+{1,3}|##?|\$\$|[~^]|\(\(\(?)|(?:''?|\+{1,3}|##?|\$\$|[~^`]|\)?\)\))$/}},replacement:{pattern:/\((?:C|TM|R)\)/,alias:"builtin"},entity:/&#?[\da-z]{1,8};/i,"line-continuation":{pattern:/(^| )\+$/m,lookbehind:!0,alias:"punctuation"}};function i(t){for(var n={},i=0,e=(t=t.split(" ")).length;i](?:\.[<^>])?|\.[<^>])?|[<^>](?:\.[<^>])?|\.[<^>])[a-z]*|[a-z]+)(?=\|)/,alias:"attr-value"},punctuation:{pattern:/(^|[^\\])[|!]=*/,lookbehind:!0}}},"passthrough-block":{pattern:/^(\+{4,})(?:\r?\n|\r)(?:[\s\S]*(?:\r?\n|\r))??\1$/m,inside:{punctuation:/^\++|\++$/}},"literal-block":{pattern:/^(-{4,}|\.{4,})(?:\r?\n|\r)(?:[\s\S]*(?:\r?\n|\r))??\1$/m,inside:{punctuation:/^(?:-+|\.+)|(?:-+|\.+)$/}},"other-block":{pattern:/^(--|\*{4,}|_{4,}|={4,})(?:\r?\n|\r)(?:[\s\S]*(?:\r?\n|\r))??\1$/m,inside:{punctuation:/^(?:-+|\*+|_+|=+)|(?:-+|\*+|_+|=+)$/}},"list-punctuation":{pattern:/(^[ \t]*)(?:-|\*{1,5}|\.{1,5}|(?:[a-z]|\d+)\.|[xvi]+\))(?= )/im,lookbehind:!0,alias:"punctuation"},"list-label":{pattern:/(^[ \t]*)[a-z\d].+(?::{2,4}|;;)(?=\s)/im,lookbehind:!0,alias:"symbol"},"indented-block":{pattern:/((\r?\n|\r)\2)([ \t]+)\S.*(?:(?:\r?\n|\r)\3.+)*(?=\2{2}|$)/,lookbehind:!0},comment:/^\/\/.*/m,title:{pattern:/^.+(?:\r?\n|\r)(?:={3,}|-{3,}|~{3,}|\^{3,}|\+{3,})$|^={1,5} .+|^\.(?![\s.]).*/m,alias:"important",inside:{punctuation:/^(?:\.|=+)|(?:=+|-+|~+|\^+|\++)$/}},"attribute-entry":{pattern:/^:[^:\r\n]+:(?: .*?(?: \+(?:\r?\n|\r).*?)*)?$/m,alias:"tag"},attributes:n,hr:{pattern:/^'{3,}$/m,alias:"punctuation"},"page-break":{pattern:/^<{3,}$/m,alias:"punctuation"},admonition:{pattern:/^(?:CAUTION|IMPORTANT|NOTE|TIP|WARNING):/m,alias:"keyword"},callout:[{pattern:/(^[ \t]*)/m,lookbehind:!0,alias:"symbol"},{pattern:/<\d+>/,alias:"symbol"}],macro:{pattern:/\b[a-z\d][a-z\d-]*::?(?:[^\s\[\]]*\[(?:[^\]\\"']|(["'])(?:(?!\1)[^\\]|\\.)*\1|\\.)*\])/,inside:{function:/^[a-z\d-]+(?=:)/,punctuation:/^::?/,attributes:{pattern:/(?:\[(?:[^\]\\"']|(["'])(?:(?!\1)[^\\]|\\.)*\1|\\.)*\])/,inside:n.inside}}},inline:{pattern:/(^|[^\\])(?:(?:\B\[(?:[^\]\\"']|(["'])(?:(?!\2)[^\\]|\\.)*\2|\\.)*\])?(?:\b_(?!\s)(?: _|[^_\\\r\n]|\\.)+(?:(?:\r?\n|\r)(?: _|[^_\\\r\n]|\\.)+)*_\b|\B``(?!\s).+?(?:(?:\r?\n|\r).+?)*''\B|\B`(?!\s)(?:[^`'\s]|\s+\S)+['`]\B|\B(['*+#])(?!\s)(?: \3|(?!\3)[^\\\r\n]|\\.)+(?:(?:\r?\n|\r)(?: \3|(?!\3)[^\\\r\n]|\\.)+)*\3\B)|(?:\[(?:[^\]\\"']|(["'])(?:(?!\4)[^\\]|\\.)*\4|\\.)*\])?(?:(__|\*\*|\+\+\+?|##|\$\$|[~^]).+?(?:(?:\r?\n|\r).+?)*\5|\{[^}\r\n]+\}|\[\[\[?.+?(?:(?:\r?\n|\r).+?)*\]?\]\]|<<.+?(?:(?:\r?\n|\r).+?)*>>|\(\(\(?.+?(?:(?:\r?\n|\r).+?)*\)?\)\)))/m,lookbehind:!0,inside:{attributes:n,url:{pattern:/^(?:\[\[\[?.+?\]?\]\]|<<.+?>>)$/,inside:{punctuation:/^(?:\[\[\[?|<<)|(?:\]\]\]?|>>)$/}},"attribute-ref":{pattern:/^\{.+\}$/,inside:{variable:{pattern:/(^\{)[a-z\d,+_-]+/,lookbehind:!0},operator:/^[=?!#%@$]|!(?=[:}])/,punctuation:/^\{|\}$|::?/}},italic:{pattern:/^(['_])[\s\S]+\1$/,inside:{punctuation:/^(?:''?|__?)|(?:''?|__?)$/}},bold:{pattern:/^\*[\s\S]+\*$/,inside:{punctuation:/^\*\*?|\*\*?$/}},punctuation:/^(?:``?|\+{1,3}|##?|\$\$|[~^]|\(\(\(?)|(?:''?|\+{1,3}|##?|\$\$|[~^`]|\)?\)\))$/}},replacement:{pattern:/\((?:C|R|TM)\)/,alias:"builtin"},entity:/&#?[\da-z]{1,8};/i,"line-continuation":{pattern:/(^| )\+$/m,lookbehind:!0,alias:"punctuation"}};function i(t){for(var n={},i=0,e=(t=t.split(" ")).length;i|=)?|>>?=?|[.^!=~]=?|\b(?:AND|NOT|OR)\b/, - 'boolean': /\b(?:true|false)\b/, + 'boolean': /\b(?:false|true)\b/, 'selector': /\b(?:AutoTrim|BlockInput|Break|Click|ClipWait|Continue|Control|ControlClick|ControlFocus|ControlGet|ControlGetFocus|ControlGetPos|ControlGetText|ControlMove|ControlSend|ControlSendRaw|ControlSetText|CoordMode|Critical|DetectHiddenText|DetectHiddenWindows|Drive|DriveGet|DriveSpaceFree|EnvAdd|EnvDiv|EnvGet|EnvMult|EnvSet|EnvSub|EnvUpdate|Exit|ExitApp|FileAppend|FileCopy|FileCopyDir|FileCreateDir|FileCreateShortcut|FileDelete|FileEncoding|FileGetAttrib|FileGetShortcut|FileGetSize|FileGetTime|FileGetVersion|FileInstall|FileMove|FileMoveDir|FileRead|FileReadLine|FileRecycle|FileRecycleEmpty|FileRemoveDir|FileSelectFile|FileSelectFolder|FileSetAttrib|FileSetTime|FormatTime|GetKeyState|Gosub|Goto|GroupActivate|GroupAdd|GroupClose|GroupDeactivate|Gui|GuiControl|GuiControlGet|Hotkey|ImageSearch|IniDelete|IniRead|IniWrite|Input|InputBox|KeyWait|ListHotkeys|ListLines|ListVars|Loop|Menu|MouseClick|MouseClickDrag|MouseGetPos|MouseMove|MsgBox|OnExit|OutputDebug|Pause|PixelGetColor|PixelSearch|PostMessage|Process|Progress|Random|RegDelete|RegRead|RegWrite|Reload|Repeat|Return|Run|RunAs|RunWait|Send|SendEvent|SendInput|SendMessage|SendMode|SendPlay|SendRaw|SetBatchLines|SetCapslockState|SetControlDelay|SetDefaultMouseSpeed|SetEnv|SetFormat|SetKeyDelay|SetMouseDelay|SetNumlockState|SetRegView|SetScrollLockState|SetStoreCapslockMode|SetTimer|SetTitleMatchMode|SetWinDelay|SetWorkingDir|Shutdown|Sleep|Sort|SoundBeep|SoundGet|SoundGetWaveVolume|SoundPlay|SoundSet|SoundSetWaveVolume|SplashImage|SplashTextOff|SplashTextOn|SplitPath|StatusBarGetText|StatusBarWait|StringCaseSense|StringGetPos|StringLeft|StringLen|StringLower|StringMid|StringReplace|StringRight|StringSplit|StringTrimLeft|StringTrimRight|StringUpper|Suspend|SysGet|Thread|ToolTip|Transform|TrayTip|URLDownloadToFile|WinActivate|WinActivateBottom|WinClose|WinGet|WinGetActiveStats|WinGetActiveTitle|WinGetClass|WinGetPos|WinGetText|WinGetTitle|WinHide|WinKill|WinMaximize|WinMenuSelectItem|WinMinimize|WinMinimizeAll|WinMinimizeAllUndo|WinMove|WinRestore|WinSet|WinSetTitle|WinShow|WinWait|WinWaitActive|WinWaitClose|WinWaitNotActive)\b/i, - 'constant': /\b(?:a_ahkpath|a_ahkversion|a_appdata|a_appdatacommon|a_autotrim|a_batchlines|a_caretx|a_carety|a_computername|a_controldelay|a_cursor|a_dd|a_ddd|a_dddd|a_defaultmousespeed|a_desktop|a_desktopcommon|a_detecthiddentext|a_detecthiddenwindows|a_endchar|a_eventinfo|a_exitreason|a_fileencoding|a_formatfloat|a_formatinteger|a_gui|a_guievent|a_guicontrol|a_guicontrolevent|a_guiheight|a_guiwidth|a_guix|a_guiy|a_hour|a_iconfile|a_iconhidden|a_iconnumber|a_icontip|a_index|a_ipaddress1|a_ipaddress2|a_ipaddress3|a_ipaddress4|a_is64bitos|a_isadmin|a_iscompiled|a_iscritical|a_ispaused|a_issuspended|a_isunicode|a_keydelay|a_language|a_lasterror|a_linefile|a_linenumber|a_loopfield|a_loopfileattrib|a_loopfiledir|a_loopfileext|a_loopfilefullpath|a_loopfilelongpath|a_loopfilename|a_loopfileshortname|a_loopfileshortpath|a_loopfilesize|a_loopfilesizekb|a_loopfilesizemb|a_loopfiletimeaccessed|a_loopfiletimecreated|a_loopfiletimemodified|a_loopreadline|a_loopregkey|a_loopregname|a_loopregsubkey|a_loopregtimemodified|a_loopregtype|a_mday|a_min|a_mm|a_mmm|a_mmmm|a_mon|a_mousedelay|a_msec|a_mydocuments|a_now|a_nowutc|a_numbatchlines|a_ostype|a_osversion|a_priorhotkey|a_priorkey|programfiles|a_programfiles|a_programs|a_programscommon|a_ptrsize|a_regview|a_screendpi|a_screenheight|a_screenwidth|a_scriptdir|a_scriptfullpath|a_scripthwnd|a_scriptname|a_sec|a_space|a_startmenu|a_startmenucommon|a_startup|a_startupcommon|a_stringcasesense|a_tab|a_temp|a_thisfunc|a_thishotkey|a_thislabel|a_thismenu|a_thismenuitem|a_thismenuitempos|a_tickcount|a_timeidle|a_timeidlephysical|a_timesincepriorhotkey|a_timesincethishotkey|a_titlematchmode|a_titlematchmodespeed|a_username|a_wday|a_windelay|a_windir|a_workingdir|a_yday|a_year|a_yweek|a_yyyy|clipboard|clipboardall|comspec|errorlevel)\b/i, + 'constant': /\b(?:a_ahkpath|a_ahkversion|a_appdata|a_appdatacommon|a_autotrim|a_batchlines|a_caretx|a_carety|a_computername|a_controldelay|a_cursor|a_dd|a_ddd|a_dddd|a_defaultmousespeed|a_desktop|a_desktopcommon|a_detecthiddentext|a_detecthiddenwindows|a_endchar|a_eventinfo|a_exitreason|a_fileencoding|a_formatfloat|a_formatinteger|a_gui|a_guicontrol|a_guicontrolevent|a_guievent|a_guiheight|a_guiwidth|a_guix|a_guiy|a_hour|a_iconfile|a_iconhidden|a_iconnumber|a_icontip|a_index|a_ipaddress1|a_ipaddress2|a_ipaddress3|a_ipaddress4|a_is64bitos|a_isadmin|a_iscompiled|a_iscritical|a_ispaused|a_issuspended|a_isunicode|a_keydelay|a_language|a_lasterror|a_linefile|a_linenumber|a_loopfield|a_loopfileattrib|a_loopfiledir|a_loopfileext|a_loopfilefullpath|a_loopfilelongpath|a_loopfilename|a_loopfileshortname|a_loopfileshortpath|a_loopfilesize|a_loopfilesizekb|a_loopfilesizemb|a_loopfiletimeaccessed|a_loopfiletimecreated|a_loopfiletimemodified|a_loopreadline|a_loopregkey|a_loopregname|a_loopregsubkey|a_loopregtimemodified|a_loopregtype|a_mday|a_min|a_mm|a_mmm|a_mmmm|a_mon|a_mousedelay|a_msec|a_mydocuments|a_now|a_nowutc|a_numbatchlines|a_ostype|a_osversion|a_priorhotkey|a_priorkey|a_programfiles|a_programs|a_programscommon|a_ptrsize|a_regview|a_screendpi|a_screenheight|a_screenwidth|a_scriptdir|a_scriptfullpath|a_scripthwnd|a_scriptname|a_sec|a_space|a_startmenu|a_startmenucommon|a_startup|a_startupcommon|a_stringcasesense|a_tab|a_temp|a_thisfunc|a_thishotkey|a_thislabel|a_thismenu|a_thismenuitem|a_thismenuitempos|a_tickcount|a_timeidle|a_timeidlephysical|a_timesincepriorhotkey|a_timesincethishotkey|a_titlematchmode|a_titlematchmodespeed|a_username|a_wday|a_windelay|a_windir|a_workingdir|a_yday|a_year|a_yweek|a_yyyy|clipboard|clipboardall|comspec|errorlevel|programfiles)\b/i, - 'builtin': /\b(?:abs|acos|asc|asin|atan|ceil|chr|class|comobjactive|comobjarray|comobjconnect|comobjcreate|comobjerror|comobjflags|comobjget|comobjquery|comobjtype|comobjvalue|cos|dllcall|exp|fileexist|Fileopen|floor|format|il_add|il_create|il_destroy|instr|substr|isfunc|islabel|IsObject|ln|log|lv_add|lv_delete|lv_deletecol|lv_getcount|lv_getnext|lv_gettext|lv_insert|lv_insertcol|lv_modify|lv_modifycol|lv_setimagelist|ltrim|rtrim|mod|onmessage|numget|numput|registercallback|regexmatch|regexreplace|round|sin|tan|sqrt|strlen|strreplace|sb_seticon|sb_setparts|sb_settext|strsplit|tv_add|tv_delete|tv_getchild|tv_getcount|tv_getnext|tv_get|tv_getparent|tv_getprev|tv_getselection|tv_gettext|tv_modify|varsetcapacity|winactive|winexist|__New|__Call|__Get|__Set)\b/i, + 'builtin': /\b(?:abs|acos|asc|asin|atan|ceil|chr|class|comobjactive|comobjarray|comobjconnect|comobjcreate|comobjerror|comobjflags|comobjget|comobjquery|comobjtype|comobjvalue|cos|dllcall|exp|fileexist|Fileopen|floor|format|il_add|il_create|il_destroy|instr|isfunc|islabel|IsObject|ln|log|ltrim|lv_add|lv_delete|lv_deletecol|lv_getcount|lv_getnext|lv_gettext|lv_insert|lv_insertcol|lv_modify|lv_modifycol|lv_setimagelist|mod|numget|numput|onmessage|regexmatch|regexreplace|registercallback|round|rtrim|sb_seticon|sb_setparts|sb_settext|sin|sqrt|strlen|strreplace|strsplit|substr|tan|tv_add|tv_delete|tv_get|tv_getchild|tv_getcount|tv_getnext|tv_getparent|tv_getprev|tv_getselection|tv_gettext|tv_modify|varsetcapacity|winactive|winexist|__Call|__Get|__New|__Set)\b/i, 'symbol': /\b(?:alt|altdown|altup|appskey|backspace|browser_back|browser_favorites|browser_forward|browser_home|browser_refresh|browser_search|browser_stop|bs|capslock|ctrl|ctrlbreak|ctrldown|ctrlup|del|delete|down|end|enter|esc|escape|f1|f10|f11|f12|f13|f14|f15|f16|f17|f18|f19|f2|f20|f21|f22|f23|f24|f3|f4|f5|f6|f7|f8|f9|home|ins|insert|joy1|joy10|joy11|joy12|joy13|joy14|joy15|joy16|joy17|joy18|joy19|joy2|joy20|joy21|joy22|joy23|joy24|joy25|joy26|joy27|joy28|joy29|joy3|joy30|joy31|joy32|joy4|joy5|joy6|joy7|joy8|joy9|joyaxes|joybuttons|joyinfo|joyname|joypov|joyr|joyu|joyv|joyx|joyy|joyz|lalt|launch_app1|launch_app2|launch_mail|launch_media|lbutton|lcontrol|lctrl|left|lshift|lwin|lwindown|lwinup|mbutton|media_next|media_play_pause|media_prev|media_stop|numlock|numpad0|numpad1|numpad2|numpad3|numpad4|numpad5|numpad6|numpad7|numpad8|numpad9|numpadadd|numpadclear|numpaddel|numpaddiv|numpaddot|numpaddown|numpadend|numpadenter|numpadhome|numpadins|numpadleft|numpadmult|numpadpgdn|numpadpgup|numpadright|numpadsub|numpadup|pgdn|pgup|printscreen|ralt|rbutton|rcontrol|rctrl|right|rshift|rwin|rwindown|rwinup|scrolllock|shift|shiftdown|shiftup|space|tab|up|volume_down|volume_mute|volume_up|wheeldown|wheelleft|wheelright|wheelup|xbutton1|xbutton2)\b/i, 'important': /#\b(?:AllowSameLineComments|ClipboardTimeout|CommentFlag|DerefChar|ErrorStdOut|EscapeChar|HotkeyInterval|HotkeyModifierTimeout|Hotstring|If|IfTimeout|IfWinActive|IfWinExist|IfWinNotActive|IfWinNotExist|Include|IncludeAgain|InputLevel|InstallKeybdHook|InstallMouseHook|KeyHistory|MaxHotkeysPerInterval|MaxMem|MaxThreads|MaxThreadsBuffer|MaxThreadsPerHotkey|MenuMaskKey|NoEnv|NoTrayIcon|Persistent|SingleInstance|UseHook|Warn|WinActivateForce)\b/i, - 'keyword': /\b(?:Abort|AboveNormal|Add|ahk_class|ahk_exe|ahk_group|ahk_id|ahk_pid|All|Alnum|Alpha|AltSubmit|AltTab|AltTabAndMenu|AltTabMenu|AltTabMenuDismiss|AlwaysOnTop|AutoSize|Background|BackgroundTrans|BelowNormal|between|BitAnd|BitNot|BitOr|BitShiftLeft|BitShiftRight|BitXOr|Bold|Border|Button|ByRef|Checkbox|Checked|CheckedGray|Choose|ChooseString|Close|Color|ComboBox|Contains|ControlList|Count|Date|DateTime|Days|DDL|Default|DeleteAll|Delimiter|Deref|Destroy|Digit|Disable|Disabled|DropDownList|Edit|Eject|Else|Enable|Enabled|Error|Exist|Expand|ExStyle|FileSystem|First|Flash|Float|FloatFast|Focus|Font|for|global|Grid|Group|GroupBox|GuiClose|GuiContextMenu|GuiDropFiles|GuiEscape|GuiSize|Hdr|Hidden|Hide|High|HKCC|HKCR|HKCU|HKEY_CLASSES_ROOT|HKEY_CURRENT_CONFIG|HKEY_CURRENT_USER|HKEY_LOCAL_MACHINE|HKEY_USERS|HKLM|HKU|Hours|HScroll|Icon|IconSmall|ID|IDLast|If|IfEqual|IfExist|IfGreater|IfGreaterOrEqual|IfInString|IfLess|IfLessOrEqual|IfMsgBox|IfNotEqual|IfNotExist|IfNotInString|IfWinActive|IfWinExist|IfWinNotActive|IfWinNotExist|Ignore|ImageList|in|Integer|IntegerFast|Interrupt|is|italic|Join|Label|LastFound|LastFoundExist|Limit|Lines|List|ListBox|ListView|local|Lock|Logoff|Low|Lower|Lowercase|MainWindow|Margin|Maximize|MaximizeBox|MaxSize|Minimize|MinimizeBox|MinMax|MinSize|Minutes|MonthCal|Mouse|Move|Multi|NA|No|NoActivate|NoDefault|NoHide|NoIcon|NoMainWindow|norm|Normal|NoSort|NoSortHdr|NoStandard|Not|NoTab|NoTimers|Number|Off|Ok|On|OwnDialogs|Owner|Parse|Password|Picture|Pixel|Pos|Pow|Priority|ProcessName|Radio|Range|Read|ReadOnly|Realtime|Redraw|REG_BINARY|REG_DWORD|REG_EXPAND_SZ|REG_MULTI_SZ|REG_SZ|Region|Relative|Rename|Report|Resize|Restore|Retry|RGB|Screen|Seconds|Section|Serial|SetLabel|ShiftAltTab|Show|Single|Slider|SortDesc|Standard|static|Status|StatusBar|StatusCD|strike|Style|Submit|SysMenu|Tab2|TabStop|Text|Theme|Tile|ToggleCheck|ToggleEnable|ToolWindow|Top|Topmost|TransColor|Transparent|Tray|TreeView|TryAgain|Throw|Try|Catch|Finally|Type|UnCheck|underline|Unicode|Unlock|Until|UpDown|Upper|Uppercase|UseErrorLevel|Vis|VisFirst|Visible|VScroll|Wait|WaitClose|WantCtrlA|WantF2|WantReturn|While|Wrap|Xdigit|xm|xp|xs|Yes|ym|yp|ys)\b/i, + 'keyword': /\b(?:Abort|AboveNormal|Add|ahk_class|ahk_exe|ahk_group|ahk_id|ahk_pid|All|Alnum|Alpha|AltSubmit|AltTab|AltTabAndMenu|AltTabMenu|AltTabMenuDismiss|AlwaysOnTop|AutoSize|Background|BackgroundTrans|BelowNormal|between|BitAnd|BitNot|BitOr|BitShiftLeft|BitShiftRight|BitXOr|Bold|Border|Button|ByRef|Catch|Checkbox|Checked|CheckedGray|Choose|ChooseString|Close|Color|ComboBox|Contains|ControlList|Count|Date|DateTime|Days|DDL|Default|DeleteAll|Delimiter|Deref|Destroy|Digit|Disable|Disabled|DropDownList|Edit|Eject|Else|Enable|Enabled|Error|Exist|Expand|ExStyle|FileSystem|Finally|First|Flash|Float|FloatFast|Focus|Font|for|global|Grid|Group|GroupBox|GuiClose|GuiContextMenu|GuiDropFiles|GuiEscape|GuiSize|Hdr|Hidden|Hide|High|HKCC|HKCR|HKCU|HKEY_CLASSES_ROOT|HKEY_CURRENT_CONFIG|HKEY_CURRENT_USER|HKEY_LOCAL_MACHINE|HKEY_USERS|HKLM|HKU|Hours|HScroll|Icon|IconSmall|ID|IDLast|If|IfEqual|IfExist|IfGreater|IfGreaterOrEqual|IfInString|IfLess|IfLessOrEqual|IfMsgBox|IfNotEqual|IfNotExist|IfNotInString|IfWinActive|IfWinExist|IfWinNotActive|IfWinNotExist|Ignore|ImageList|in|Integer|IntegerFast|Interrupt|is|italic|Join|Label|LastFound|LastFoundExist|Limit|Lines|List|ListBox|ListView|local|Lock|Logoff|Low|Lower|Lowercase|MainWindow|Margin|Maximize|MaximizeBox|MaxSize|Minimize|MinimizeBox|MinMax|MinSize|Minutes|MonthCal|Mouse|Move|Multi|NA|No|NoActivate|NoDefault|NoHide|NoIcon|NoMainWindow|norm|Normal|NoSort|NoSortHdr|NoStandard|Not|NoTab|NoTimers|Number|Off|Ok|On|OwnDialogs|Owner|Parse|Password|Picture|Pixel|Pos|Pow|Priority|ProcessName|Radio|Range|Read|ReadOnly|Realtime|Redraw|Region|REG_BINARY|REG_DWORD|REG_EXPAND_SZ|REG_MULTI_SZ|REG_SZ|Relative|Rename|Report|Resize|Restore|Retry|RGB|Screen|Seconds|Section|Serial|SetLabel|ShiftAltTab|Show|Single|Slider|SortDesc|Standard|static|Status|StatusBar|StatusCD|strike|Style|Submit|SysMenu|Tab2|TabStop|Text|Theme|Throw|Tile|ToggleCheck|ToggleEnable|ToolWindow|Top|Topmost|TransColor|Transparent|Tray|TreeView|Try|TryAgain|Type|UnCheck|underline|Unicode|Unlock|Until|UpDown|Upper|Uppercase|UseErrorLevel|Vis|VisFirst|Visible|VScroll|Wait|WaitClose|WantCtrlA|WantF2|WantReturn|While|Wrap|Xdigit|xm|xp|xs|Yes|ym|yp|ys)\b/i, 'function': /[^(); \t,\n+*\-=?>:\\\/<&%\[\]]+(?=\()/m, 'punctuation': /[{}[\]():,]/ }; diff --git a/components/prism-autohotkey.min.js b/components/prism-autohotkey.min.js index 3ad414eda4..666d86f6c2 100644 --- a/components/prism-autohotkey.min.js +++ b/components/prism-autohotkey.min.js @@ -1 +1 @@ -Prism.languages.autohotkey={comment:[{pattern:/(^|\s);.*/,lookbehind:!0},{pattern:/(^[\t ]*)\/\*(?:[\r\n](?![ \t]*\*\/)|[^\r\n])*(?:[\r\n][ \t]*\*\/)?/m,lookbehind:!0,greedy:!0}],tag:{pattern:/^([ \t]*)[^\s,`":]+(?=:[ \t]*$)/m,lookbehind:!0},string:/"(?:[^"\n\r]|"")*"/m,variable:/%\w+%/,number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/\?|\/\/?=?|:=|\|[=|]?|&[=&]?|\+[=+]?|-[=-]?|\*[=*]?|<(?:<=?|>|=)?|>>?=?|[.^!=~]=?|\b(?:AND|NOT|OR)\b/,boolean:/\b(?:true|false)\b/,selector:/\b(?:AutoTrim|BlockInput|Break|Click|ClipWait|Continue|Control|ControlClick|ControlFocus|ControlGet|ControlGetFocus|ControlGetPos|ControlGetText|ControlMove|ControlSend|ControlSendRaw|ControlSetText|CoordMode|Critical|DetectHiddenText|DetectHiddenWindows|Drive|DriveGet|DriveSpaceFree|EnvAdd|EnvDiv|EnvGet|EnvMult|EnvSet|EnvSub|EnvUpdate|Exit|ExitApp|FileAppend|FileCopy|FileCopyDir|FileCreateDir|FileCreateShortcut|FileDelete|FileEncoding|FileGetAttrib|FileGetShortcut|FileGetSize|FileGetTime|FileGetVersion|FileInstall|FileMove|FileMoveDir|FileRead|FileReadLine|FileRecycle|FileRecycleEmpty|FileRemoveDir|FileSelectFile|FileSelectFolder|FileSetAttrib|FileSetTime|FormatTime|GetKeyState|Gosub|Goto|GroupActivate|GroupAdd|GroupClose|GroupDeactivate|Gui|GuiControl|GuiControlGet|Hotkey|ImageSearch|IniDelete|IniRead|IniWrite|Input|InputBox|KeyWait|ListHotkeys|ListLines|ListVars|Loop|Menu|MouseClick|MouseClickDrag|MouseGetPos|MouseMove|MsgBox|OnExit|OutputDebug|Pause|PixelGetColor|PixelSearch|PostMessage|Process|Progress|Random|RegDelete|RegRead|RegWrite|Reload|Repeat|Return|Run|RunAs|RunWait|Send|SendEvent|SendInput|SendMessage|SendMode|SendPlay|SendRaw|SetBatchLines|SetCapslockState|SetControlDelay|SetDefaultMouseSpeed|SetEnv|SetFormat|SetKeyDelay|SetMouseDelay|SetNumlockState|SetRegView|SetScrollLockState|SetStoreCapslockMode|SetTimer|SetTitleMatchMode|SetWinDelay|SetWorkingDir|Shutdown|Sleep|Sort|SoundBeep|SoundGet|SoundGetWaveVolume|SoundPlay|SoundSet|SoundSetWaveVolume|SplashImage|SplashTextOff|SplashTextOn|SplitPath|StatusBarGetText|StatusBarWait|StringCaseSense|StringGetPos|StringLeft|StringLen|StringLower|StringMid|StringReplace|StringRight|StringSplit|StringTrimLeft|StringTrimRight|StringUpper|Suspend|SysGet|Thread|ToolTip|Transform|TrayTip|URLDownloadToFile|WinActivate|WinActivateBottom|WinClose|WinGet|WinGetActiveStats|WinGetActiveTitle|WinGetClass|WinGetPos|WinGetText|WinGetTitle|WinHide|WinKill|WinMaximize|WinMenuSelectItem|WinMinimize|WinMinimizeAll|WinMinimizeAllUndo|WinMove|WinRestore|WinSet|WinSetTitle|WinShow|WinWait|WinWaitActive|WinWaitClose|WinWaitNotActive)\b/i,constant:/\b(?:a_ahkpath|a_ahkversion|a_appdata|a_appdatacommon|a_autotrim|a_batchlines|a_caretx|a_carety|a_computername|a_controldelay|a_cursor|a_dd|a_ddd|a_dddd|a_defaultmousespeed|a_desktop|a_desktopcommon|a_detecthiddentext|a_detecthiddenwindows|a_endchar|a_eventinfo|a_exitreason|a_fileencoding|a_formatfloat|a_formatinteger|a_gui|a_guievent|a_guicontrol|a_guicontrolevent|a_guiheight|a_guiwidth|a_guix|a_guiy|a_hour|a_iconfile|a_iconhidden|a_iconnumber|a_icontip|a_index|a_ipaddress1|a_ipaddress2|a_ipaddress3|a_ipaddress4|a_is64bitos|a_isadmin|a_iscompiled|a_iscritical|a_ispaused|a_issuspended|a_isunicode|a_keydelay|a_language|a_lasterror|a_linefile|a_linenumber|a_loopfield|a_loopfileattrib|a_loopfiledir|a_loopfileext|a_loopfilefullpath|a_loopfilelongpath|a_loopfilename|a_loopfileshortname|a_loopfileshortpath|a_loopfilesize|a_loopfilesizekb|a_loopfilesizemb|a_loopfiletimeaccessed|a_loopfiletimecreated|a_loopfiletimemodified|a_loopreadline|a_loopregkey|a_loopregname|a_loopregsubkey|a_loopregtimemodified|a_loopregtype|a_mday|a_min|a_mm|a_mmm|a_mmmm|a_mon|a_mousedelay|a_msec|a_mydocuments|a_now|a_nowutc|a_numbatchlines|a_ostype|a_osversion|a_priorhotkey|a_priorkey|programfiles|a_programfiles|a_programs|a_programscommon|a_ptrsize|a_regview|a_screendpi|a_screenheight|a_screenwidth|a_scriptdir|a_scriptfullpath|a_scripthwnd|a_scriptname|a_sec|a_space|a_startmenu|a_startmenucommon|a_startup|a_startupcommon|a_stringcasesense|a_tab|a_temp|a_thisfunc|a_thishotkey|a_thislabel|a_thismenu|a_thismenuitem|a_thismenuitempos|a_tickcount|a_timeidle|a_timeidlephysical|a_timesincepriorhotkey|a_timesincethishotkey|a_titlematchmode|a_titlematchmodespeed|a_username|a_wday|a_windelay|a_windir|a_workingdir|a_yday|a_year|a_yweek|a_yyyy|clipboard|clipboardall|comspec|errorlevel)\b/i,builtin:/\b(?:abs|acos|asc|asin|atan|ceil|chr|class|comobjactive|comobjarray|comobjconnect|comobjcreate|comobjerror|comobjflags|comobjget|comobjquery|comobjtype|comobjvalue|cos|dllcall|exp|fileexist|Fileopen|floor|format|il_add|il_create|il_destroy|instr|substr|isfunc|islabel|IsObject|ln|log|lv_add|lv_delete|lv_deletecol|lv_getcount|lv_getnext|lv_gettext|lv_insert|lv_insertcol|lv_modify|lv_modifycol|lv_setimagelist|ltrim|rtrim|mod|onmessage|numget|numput|registercallback|regexmatch|regexreplace|round|sin|tan|sqrt|strlen|strreplace|sb_seticon|sb_setparts|sb_settext|strsplit|tv_add|tv_delete|tv_getchild|tv_getcount|tv_getnext|tv_get|tv_getparent|tv_getprev|tv_getselection|tv_gettext|tv_modify|varsetcapacity|winactive|winexist|__New|__Call|__Get|__Set)\b/i,symbol:/\b(?:alt|altdown|altup|appskey|backspace|browser_back|browser_favorites|browser_forward|browser_home|browser_refresh|browser_search|browser_stop|bs|capslock|ctrl|ctrlbreak|ctrldown|ctrlup|del|delete|down|end|enter|esc|escape|f1|f10|f11|f12|f13|f14|f15|f16|f17|f18|f19|f2|f20|f21|f22|f23|f24|f3|f4|f5|f6|f7|f8|f9|home|ins|insert|joy1|joy10|joy11|joy12|joy13|joy14|joy15|joy16|joy17|joy18|joy19|joy2|joy20|joy21|joy22|joy23|joy24|joy25|joy26|joy27|joy28|joy29|joy3|joy30|joy31|joy32|joy4|joy5|joy6|joy7|joy8|joy9|joyaxes|joybuttons|joyinfo|joyname|joypov|joyr|joyu|joyv|joyx|joyy|joyz|lalt|launch_app1|launch_app2|launch_mail|launch_media|lbutton|lcontrol|lctrl|left|lshift|lwin|lwindown|lwinup|mbutton|media_next|media_play_pause|media_prev|media_stop|numlock|numpad0|numpad1|numpad2|numpad3|numpad4|numpad5|numpad6|numpad7|numpad8|numpad9|numpadadd|numpadclear|numpaddel|numpaddiv|numpaddot|numpaddown|numpadend|numpadenter|numpadhome|numpadins|numpadleft|numpadmult|numpadpgdn|numpadpgup|numpadright|numpadsub|numpadup|pgdn|pgup|printscreen|ralt|rbutton|rcontrol|rctrl|right|rshift|rwin|rwindown|rwinup|scrolllock|shift|shiftdown|shiftup|space|tab|up|volume_down|volume_mute|volume_up|wheeldown|wheelleft|wheelright|wheelup|xbutton1|xbutton2)\b/i,important:/#\b(?:AllowSameLineComments|ClipboardTimeout|CommentFlag|DerefChar|ErrorStdOut|EscapeChar|HotkeyInterval|HotkeyModifierTimeout|Hotstring|If|IfTimeout|IfWinActive|IfWinExist|IfWinNotActive|IfWinNotExist|Include|IncludeAgain|InputLevel|InstallKeybdHook|InstallMouseHook|KeyHistory|MaxHotkeysPerInterval|MaxMem|MaxThreads|MaxThreadsBuffer|MaxThreadsPerHotkey|MenuMaskKey|NoEnv|NoTrayIcon|Persistent|SingleInstance|UseHook|Warn|WinActivateForce)\b/i,keyword:/\b(?:Abort|AboveNormal|Add|ahk_class|ahk_exe|ahk_group|ahk_id|ahk_pid|All|Alnum|Alpha|AltSubmit|AltTab|AltTabAndMenu|AltTabMenu|AltTabMenuDismiss|AlwaysOnTop|AutoSize|Background|BackgroundTrans|BelowNormal|between|BitAnd|BitNot|BitOr|BitShiftLeft|BitShiftRight|BitXOr|Bold|Border|Button|ByRef|Checkbox|Checked|CheckedGray|Choose|ChooseString|Close|Color|ComboBox|Contains|ControlList|Count|Date|DateTime|Days|DDL|Default|DeleteAll|Delimiter|Deref|Destroy|Digit|Disable|Disabled|DropDownList|Edit|Eject|Else|Enable|Enabled|Error|Exist|Expand|ExStyle|FileSystem|First|Flash|Float|FloatFast|Focus|Font|for|global|Grid|Group|GroupBox|GuiClose|GuiContextMenu|GuiDropFiles|GuiEscape|GuiSize|Hdr|Hidden|Hide|High|HKCC|HKCR|HKCU|HKEY_CLASSES_ROOT|HKEY_CURRENT_CONFIG|HKEY_CURRENT_USER|HKEY_LOCAL_MACHINE|HKEY_USERS|HKLM|HKU|Hours|HScroll|Icon|IconSmall|ID|IDLast|If|IfEqual|IfExist|IfGreater|IfGreaterOrEqual|IfInString|IfLess|IfLessOrEqual|IfMsgBox|IfNotEqual|IfNotExist|IfNotInString|IfWinActive|IfWinExist|IfWinNotActive|IfWinNotExist|Ignore|ImageList|in|Integer|IntegerFast|Interrupt|is|italic|Join|Label|LastFound|LastFoundExist|Limit|Lines|List|ListBox|ListView|local|Lock|Logoff|Low|Lower|Lowercase|MainWindow|Margin|Maximize|MaximizeBox|MaxSize|Minimize|MinimizeBox|MinMax|MinSize|Minutes|MonthCal|Mouse|Move|Multi|NA|No|NoActivate|NoDefault|NoHide|NoIcon|NoMainWindow|norm|Normal|NoSort|NoSortHdr|NoStandard|Not|NoTab|NoTimers|Number|Off|Ok|On|OwnDialogs|Owner|Parse|Password|Picture|Pixel|Pos|Pow|Priority|ProcessName|Radio|Range|Read|ReadOnly|Realtime|Redraw|REG_BINARY|REG_DWORD|REG_EXPAND_SZ|REG_MULTI_SZ|REG_SZ|Region|Relative|Rename|Report|Resize|Restore|Retry|RGB|Screen|Seconds|Section|Serial|SetLabel|ShiftAltTab|Show|Single|Slider|SortDesc|Standard|static|Status|StatusBar|StatusCD|strike|Style|Submit|SysMenu|Tab2|TabStop|Text|Theme|Tile|ToggleCheck|ToggleEnable|ToolWindow|Top|Topmost|TransColor|Transparent|Tray|TreeView|TryAgain|Throw|Try|Catch|Finally|Type|UnCheck|underline|Unicode|Unlock|Until|UpDown|Upper|Uppercase|UseErrorLevel|Vis|VisFirst|Visible|VScroll|Wait|WaitClose|WantCtrlA|WantF2|WantReturn|While|Wrap|Xdigit|xm|xp|xs|Yes|ym|yp|ys)\b/i,function:/[^(); \t,\n+*\-=?>:\\\/<&%\[\]]+(?=\()/m,punctuation:/[{}[\]():,]/}; \ No newline at end of file +Prism.languages.autohotkey={comment:[{pattern:/(^|\s);.*/,lookbehind:!0},{pattern:/(^[\t ]*)\/\*(?:[\r\n](?![ \t]*\*\/)|[^\r\n])*(?:[\r\n][ \t]*\*\/)?/m,lookbehind:!0,greedy:!0}],tag:{pattern:/^([ \t]*)[^\s,`":]+(?=:[ \t]*$)/m,lookbehind:!0},string:/"(?:[^"\n\r]|"")*"/m,variable:/%\w+%/,number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/\?|\/\/?=?|:=|\|[=|]?|&[=&]?|\+[=+]?|-[=-]?|\*[=*]?|<(?:<=?|>|=)?|>>?=?|[.^!=~]=?|\b(?:AND|NOT|OR)\b/,boolean:/\b(?:false|true)\b/,selector:/\b(?:AutoTrim|BlockInput|Break|Click|ClipWait|Continue|Control|ControlClick|ControlFocus|ControlGet|ControlGetFocus|ControlGetPos|ControlGetText|ControlMove|ControlSend|ControlSendRaw|ControlSetText|CoordMode|Critical|DetectHiddenText|DetectHiddenWindows|Drive|DriveGet|DriveSpaceFree|EnvAdd|EnvDiv|EnvGet|EnvMult|EnvSet|EnvSub|EnvUpdate|Exit|ExitApp|FileAppend|FileCopy|FileCopyDir|FileCreateDir|FileCreateShortcut|FileDelete|FileEncoding|FileGetAttrib|FileGetShortcut|FileGetSize|FileGetTime|FileGetVersion|FileInstall|FileMove|FileMoveDir|FileRead|FileReadLine|FileRecycle|FileRecycleEmpty|FileRemoveDir|FileSelectFile|FileSelectFolder|FileSetAttrib|FileSetTime|FormatTime|GetKeyState|Gosub|Goto|GroupActivate|GroupAdd|GroupClose|GroupDeactivate|Gui|GuiControl|GuiControlGet|Hotkey|ImageSearch|IniDelete|IniRead|IniWrite|Input|InputBox|KeyWait|ListHotkeys|ListLines|ListVars|Loop|Menu|MouseClick|MouseClickDrag|MouseGetPos|MouseMove|MsgBox|OnExit|OutputDebug|Pause|PixelGetColor|PixelSearch|PostMessage|Process|Progress|Random|RegDelete|RegRead|RegWrite|Reload|Repeat|Return|Run|RunAs|RunWait|Send|SendEvent|SendInput|SendMessage|SendMode|SendPlay|SendRaw|SetBatchLines|SetCapslockState|SetControlDelay|SetDefaultMouseSpeed|SetEnv|SetFormat|SetKeyDelay|SetMouseDelay|SetNumlockState|SetRegView|SetScrollLockState|SetStoreCapslockMode|SetTimer|SetTitleMatchMode|SetWinDelay|SetWorkingDir|Shutdown|Sleep|Sort|SoundBeep|SoundGet|SoundGetWaveVolume|SoundPlay|SoundSet|SoundSetWaveVolume|SplashImage|SplashTextOff|SplashTextOn|SplitPath|StatusBarGetText|StatusBarWait|StringCaseSense|StringGetPos|StringLeft|StringLen|StringLower|StringMid|StringReplace|StringRight|StringSplit|StringTrimLeft|StringTrimRight|StringUpper|Suspend|SysGet|Thread|ToolTip|Transform|TrayTip|URLDownloadToFile|WinActivate|WinActivateBottom|WinClose|WinGet|WinGetActiveStats|WinGetActiveTitle|WinGetClass|WinGetPos|WinGetText|WinGetTitle|WinHide|WinKill|WinMaximize|WinMenuSelectItem|WinMinimize|WinMinimizeAll|WinMinimizeAllUndo|WinMove|WinRestore|WinSet|WinSetTitle|WinShow|WinWait|WinWaitActive|WinWaitClose|WinWaitNotActive)\b/i,constant:/\b(?:a_ahkpath|a_ahkversion|a_appdata|a_appdatacommon|a_autotrim|a_batchlines|a_caretx|a_carety|a_computername|a_controldelay|a_cursor|a_dd|a_ddd|a_dddd|a_defaultmousespeed|a_desktop|a_desktopcommon|a_detecthiddentext|a_detecthiddenwindows|a_endchar|a_eventinfo|a_exitreason|a_fileencoding|a_formatfloat|a_formatinteger|a_gui|a_guicontrol|a_guicontrolevent|a_guievent|a_guiheight|a_guiwidth|a_guix|a_guiy|a_hour|a_iconfile|a_iconhidden|a_iconnumber|a_icontip|a_index|a_ipaddress1|a_ipaddress2|a_ipaddress3|a_ipaddress4|a_is64bitos|a_isadmin|a_iscompiled|a_iscritical|a_ispaused|a_issuspended|a_isunicode|a_keydelay|a_language|a_lasterror|a_linefile|a_linenumber|a_loopfield|a_loopfileattrib|a_loopfiledir|a_loopfileext|a_loopfilefullpath|a_loopfilelongpath|a_loopfilename|a_loopfileshortname|a_loopfileshortpath|a_loopfilesize|a_loopfilesizekb|a_loopfilesizemb|a_loopfiletimeaccessed|a_loopfiletimecreated|a_loopfiletimemodified|a_loopreadline|a_loopregkey|a_loopregname|a_loopregsubkey|a_loopregtimemodified|a_loopregtype|a_mday|a_min|a_mm|a_mmm|a_mmmm|a_mon|a_mousedelay|a_msec|a_mydocuments|a_now|a_nowutc|a_numbatchlines|a_ostype|a_osversion|a_priorhotkey|a_priorkey|a_programfiles|a_programs|a_programscommon|a_ptrsize|a_regview|a_screendpi|a_screenheight|a_screenwidth|a_scriptdir|a_scriptfullpath|a_scripthwnd|a_scriptname|a_sec|a_space|a_startmenu|a_startmenucommon|a_startup|a_startupcommon|a_stringcasesense|a_tab|a_temp|a_thisfunc|a_thishotkey|a_thislabel|a_thismenu|a_thismenuitem|a_thismenuitempos|a_tickcount|a_timeidle|a_timeidlephysical|a_timesincepriorhotkey|a_timesincethishotkey|a_titlematchmode|a_titlematchmodespeed|a_username|a_wday|a_windelay|a_windir|a_workingdir|a_yday|a_year|a_yweek|a_yyyy|clipboard|clipboardall|comspec|errorlevel|programfiles)\b/i,builtin:/\b(?:abs|acos|asc|asin|atan|ceil|chr|class|comobjactive|comobjarray|comobjconnect|comobjcreate|comobjerror|comobjflags|comobjget|comobjquery|comobjtype|comobjvalue|cos|dllcall|exp|fileexist|Fileopen|floor|format|il_add|il_create|il_destroy|instr|isfunc|islabel|IsObject|ln|log|ltrim|lv_add|lv_delete|lv_deletecol|lv_getcount|lv_getnext|lv_gettext|lv_insert|lv_insertcol|lv_modify|lv_modifycol|lv_setimagelist|mod|numget|numput|onmessage|regexmatch|regexreplace|registercallback|round|rtrim|sb_seticon|sb_setparts|sb_settext|sin|sqrt|strlen|strreplace|strsplit|substr|tan|tv_add|tv_delete|tv_get|tv_getchild|tv_getcount|tv_getnext|tv_getparent|tv_getprev|tv_getselection|tv_gettext|tv_modify|varsetcapacity|winactive|winexist|__Call|__Get|__New|__Set)\b/i,symbol:/\b(?:alt|altdown|altup|appskey|backspace|browser_back|browser_favorites|browser_forward|browser_home|browser_refresh|browser_search|browser_stop|bs|capslock|ctrl|ctrlbreak|ctrldown|ctrlup|del|delete|down|end|enter|esc|escape|f1|f10|f11|f12|f13|f14|f15|f16|f17|f18|f19|f2|f20|f21|f22|f23|f24|f3|f4|f5|f6|f7|f8|f9|home|ins|insert|joy1|joy10|joy11|joy12|joy13|joy14|joy15|joy16|joy17|joy18|joy19|joy2|joy20|joy21|joy22|joy23|joy24|joy25|joy26|joy27|joy28|joy29|joy3|joy30|joy31|joy32|joy4|joy5|joy6|joy7|joy8|joy9|joyaxes|joybuttons|joyinfo|joyname|joypov|joyr|joyu|joyv|joyx|joyy|joyz|lalt|launch_app1|launch_app2|launch_mail|launch_media|lbutton|lcontrol|lctrl|left|lshift|lwin|lwindown|lwinup|mbutton|media_next|media_play_pause|media_prev|media_stop|numlock|numpad0|numpad1|numpad2|numpad3|numpad4|numpad5|numpad6|numpad7|numpad8|numpad9|numpadadd|numpadclear|numpaddel|numpaddiv|numpaddot|numpaddown|numpadend|numpadenter|numpadhome|numpadins|numpadleft|numpadmult|numpadpgdn|numpadpgup|numpadright|numpadsub|numpadup|pgdn|pgup|printscreen|ralt|rbutton|rcontrol|rctrl|right|rshift|rwin|rwindown|rwinup|scrolllock|shift|shiftdown|shiftup|space|tab|up|volume_down|volume_mute|volume_up|wheeldown|wheelleft|wheelright|wheelup|xbutton1|xbutton2)\b/i,important:/#\b(?:AllowSameLineComments|ClipboardTimeout|CommentFlag|DerefChar|ErrorStdOut|EscapeChar|HotkeyInterval|HotkeyModifierTimeout|Hotstring|If|IfTimeout|IfWinActive|IfWinExist|IfWinNotActive|IfWinNotExist|Include|IncludeAgain|InputLevel|InstallKeybdHook|InstallMouseHook|KeyHistory|MaxHotkeysPerInterval|MaxMem|MaxThreads|MaxThreadsBuffer|MaxThreadsPerHotkey|MenuMaskKey|NoEnv|NoTrayIcon|Persistent|SingleInstance|UseHook|Warn|WinActivateForce)\b/i,keyword:/\b(?:Abort|AboveNormal|Add|ahk_class|ahk_exe|ahk_group|ahk_id|ahk_pid|All|Alnum|Alpha|AltSubmit|AltTab|AltTabAndMenu|AltTabMenu|AltTabMenuDismiss|AlwaysOnTop|AutoSize|Background|BackgroundTrans|BelowNormal|between|BitAnd|BitNot|BitOr|BitShiftLeft|BitShiftRight|BitXOr|Bold|Border|Button|ByRef|Catch|Checkbox|Checked|CheckedGray|Choose|ChooseString|Close|Color|ComboBox|Contains|ControlList|Count|Date|DateTime|Days|DDL|Default|DeleteAll|Delimiter|Deref|Destroy|Digit|Disable|Disabled|DropDownList|Edit|Eject|Else|Enable|Enabled|Error|Exist|Expand|ExStyle|FileSystem|Finally|First|Flash|Float|FloatFast|Focus|Font|for|global|Grid|Group|GroupBox|GuiClose|GuiContextMenu|GuiDropFiles|GuiEscape|GuiSize|Hdr|Hidden|Hide|High|HKCC|HKCR|HKCU|HKEY_CLASSES_ROOT|HKEY_CURRENT_CONFIG|HKEY_CURRENT_USER|HKEY_LOCAL_MACHINE|HKEY_USERS|HKLM|HKU|Hours|HScroll|Icon|IconSmall|ID|IDLast|If|IfEqual|IfExist|IfGreater|IfGreaterOrEqual|IfInString|IfLess|IfLessOrEqual|IfMsgBox|IfNotEqual|IfNotExist|IfNotInString|IfWinActive|IfWinExist|IfWinNotActive|IfWinNotExist|Ignore|ImageList|in|Integer|IntegerFast|Interrupt|is|italic|Join|Label|LastFound|LastFoundExist|Limit|Lines|List|ListBox|ListView|local|Lock|Logoff|Low|Lower|Lowercase|MainWindow|Margin|Maximize|MaximizeBox|MaxSize|Minimize|MinimizeBox|MinMax|MinSize|Minutes|MonthCal|Mouse|Move|Multi|NA|No|NoActivate|NoDefault|NoHide|NoIcon|NoMainWindow|norm|Normal|NoSort|NoSortHdr|NoStandard|Not|NoTab|NoTimers|Number|Off|Ok|On|OwnDialogs|Owner|Parse|Password|Picture|Pixel|Pos|Pow|Priority|ProcessName|Radio|Range|Read|ReadOnly|Realtime|Redraw|Region|REG_BINARY|REG_DWORD|REG_EXPAND_SZ|REG_MULTI_SZ|REG_SZ|Relative|Rename|Report|Resize|Restore|Retry|RGB|Screen|Seconds|Section|Serial|SetLabel|ShiftAltTab|Show|Single|Slider|SortDesc|Standard|static|Status|StatusBar|StatusCD|strike|Style|Submit|SysMenu|Tab2|TabStop|Text|Theme|Throw|Tile|ToggleCheck|ToggleEnable|ToolWindow|Top|Topmost|TransColor|Transparent|Tray|TreeView|Try|TryAgain|Type|UnCheck|underline|Unicode|Unlock|Until|UpDown|Upper|Uppercase|UseErrorLevel|Vis|VisFirst|Visible|VScroll|Wait|WaitClose|WantCtrlA|WantF2|WantReturn|While|Wrap|Xdigit|xm|xp|xs|Yes|ym|yp|ys)\b/i,function:/[^(); \t,\n+*\-=?>:\\\/<&%\[\]]+(?=\()/m,punctuation:/[{}[\]():,]/}; \ No newline at end of file diff --git a/components/prism-autoit.js b/components/prism-autoit.js index 29b825780f..2eb1f1eb5f 100644 --- a/components/prism-autoit.js +++ b/components/prism-autoit.js @@ -3,7 +3,7 @@ Prism.languages.autoit = { /;.*/, { // The multi-line comments delimiters can actually be commented out with ";" - pattern: /(^[\t ]*)#(?:comments-start|cs)[\s\S]*?^[ \t]*#(?:comments-end|ce)/m, + pattern: /(^[\t ]*)#(?:comments-start|cs)[\s\S]*?^[ \t]*#(?:ce|comments-end)/m, lookbehind: true } ], @@ -28,7 +28,7 @@ Prism.languages.autoit = { 'variable': /[$@]\w+/, 'keyword': /\b(?:Case|Const|Continue(?:Case|Loop)|Default|Dim|Do|Else(?:If)?|End(?:Func|If|Select|Switch|With)|Enum|Exit(?:Loop)?|For|Func|Global|If|In|Local|Next|Null|ReDim|Select|Static|Step|Switch|Then|To|Until|Volatile|WEnd|While|With)\b/i, 'number': /\b(?:0x[\da-f]+|\d+(?:\.\d+)?(?:e[+-]?\d+)?)\b/i, - 'boolean': /\b(?:True|False)\b/i, - 'operator': /<[=>]?|[-+*\/=&>]=?|[?^]|\b(?:And|Or|Not)\b/i, + 'boolean': /\b(?:False|True)\b/i, + 'operator': /<[=>]?|[-+*\/=&>]=?|[?^]|\b(?:And|Not|Or)\b/i, 'punctuation': /[\[\]().,:]/ }; diff --git a/components/prism-autoit.min.js b/components/prism-autoit.min.js index 91bef38a7d..93e922c317 100644 --- a/components/prism-autoit.min.js +++ b/components/prism-autoit.min.js @@ -1 +1 @@ -Prism.languages.autoit={comment:[/;.*/,{pattern:/(^[\t ]*)#(?:comments-start|cs)[\s\S]*?^[ \t]*#(?:comments-end|ce)/m,lookbehind:!0}],url:{pattern:/(^[\t ]*#include\s+)(?:<[^\r\n>]+>|"[^\r\n"]+")/m,lookbehind:!0},string:{pattern:/(["'])(?:\1\1|(?!\1)[^\r\n])*\1/,greedy:!0,inside:{variable:/([%$@])\w+\1/}},directive:{pattern:/(^[\t ]*)#\w+/m,lookbehind:!0,alias:"keyword"},function:/\b\w+(?=\()/,variable:/[$@]\w+/,keyword:/\b(?:Case|Const|Continue(?:Case|Loop)|Default|Dim|Do|Else(?:If)?|End(?:Func|If|Select|Switch|With)|Enum|Exit(?:Loop)?|For|Func|Global|If|In|Local|Next|Null|ReDim|Select|Static|Step|Switch|Then|To|Until|Volatile|WEnd|While|With)\b/i,number:/\b(?:0x[\da-f]+|\d+(?:\.\d+)?(?:e[+-]?\d+)?)\b/i,boolean:/\b(?:True|False)\b/i,operator:/<[=>]?|[-+*\/=&>]=?|[?^]|\b(?:And|Or|Not)\b/i,punctuation:/[\[\]().,:]/}; \ No newline at end of file +Prism.languages.autoit={comment:[/;.*/,{pattern:/(^[\t ]*)#(?:comments-start|cs)[\s\S]*?^[ \t]*#(?:ce|comments-end)/m,lookbehind:!0}],url:{pattern:/(^[\t ]*#include\s+)(?:<[^\r\n>]+>|"[^\r\n"]+")/m,lookbehind:!0},string:{pattern:/(["'])(?:\1\1|(?!\1)[^\r\n])*\1/,greedy:!0,inside:{variable:/([%$@])\w+\1/}},directive:{pattern:/(^[\t ]*)#\w+/m,lookbehind:!0,alias:"keyword"},function:/\b\w+(?=\()/,variable:/[$@]\w+/,keyword:/\b(?:Case|Const|Continue(?:Case|Loop)|Default|Dim|Do|Else(?:If)?|End(?:Func|If|Select|Switch|With)|Enum|Exit(?:Loop)?|For|Func|Global|If|In|Local|Next|Null|ReDim|Select|Static|Step|Switch|Then|To|Until|Volatile|WEnd|While|With)\b/i,number:/\b(?:0x[\da-f]+|\d+(?:\.\d+)?(?:e[+-]?\d+)?)\b/i,boolean:/\b(?:False|True)\b/i,operator:/<[=>]?|[-+*\/=&>]=?|[?^]|\b(?:And|Not|Or)\b/i,punctuation:/[\[\]().,:]/}; \ No newline at end of file diff --git a/components/prism-avisynth.js b/components/prism-avisynth.js index 09332f1c6b..2400eb93bd 100644 --- a/components/prism-avisynth.js +++ b/components/prism-avisynth.js @@ -11,72 +11,72 @@ return RegExp(replace(pattern, replacements), flags || ''); } - var types = /clip|int|float|string|bool|val/.source; + var types = /bool|clip|float|int|string|val/.source; var internals = [ // bools - /is(?:bool|clip|float|int|string)|defined|(?:var|(?:internal)?function)?exists?/.source, + /is(?:bool|clip|float|int|string)|defined|(?:(?:internal)?function|var)?exists?/.source, // control - /apply|assert|default|eval|import|select|nop|undefined/.source, + /apply|assert|default|eval|import|nop|select|undefined/.source, // global - /set(?:memorymax|cachemode|maxcpu|workingdir|planarlegacyalignment)|opt_(?:allowfloataudio|usewaveextensible|dwchannelmask|avipadscanlines|vdubplanarhack|enable_(?:v210|y3_10_10|y3_10_16|b64a|planartopackedrgb))/.source, + /opt_(?:allowfloataudio|avipadscanlines|dwchannelmask|enable_(?:b64a|planartopackedrgb|v210|y3_10_10|y3_10_16)|usewaveextensible|vdubplanarhack)|set(?:cachemode|maxcpu|memorymax|planarlegacyalignment|workingdir)/.source, // conv /hex(?:value)?|value/.source, // numeric - /max|min|muldiv|floor|ceil|round|fmod|pi|exp|log(?:10)?|pow|sqrt|abs|sign|frac|rand|spline|continued(?:numerator|denominator)?/.source, + /abs|ceil|continued(?:denominator|numerator)?|exp|floor|fmod|frac|log(?:10)?|max|min|muldiv|pi|pow|rand|round|sign|spline|sqrt/.source, // trig /a?sinh?|a?cosh?|a?tan[2h]?/.source, // bit /(?:bit(?:and|not|x?or|[lr]?shift[aslu]?|sh[lr]|sa[lr]|[lr]rotatel?|ro[rl]|te?st|set(?:count)?|cl(?:ea)?r|ch(?:an)?ge?))/.source, // runtime - /average(?:luma|chroma[uv]|[bgr])|(?:luma|chroma[uv]|rgb|[rgb]|[yuv](?=difference(?:fromprevious|tonext)))difference(?:fromprevious|tonext)?|[yuvrgb]plane(?:median|min|max|minmaxdifference)/.source, + /average(?:[bgr]|chroma[uv]|luma)|(?:[rgb]|chroma[uv]|luma|rgb|[yuv](?=difference(?:fromprevious|tonext)))difference(?:fromprevious|tonext)?|[yuvrgb]plane(?:median|min|max|minmaxdifference)/.source, // script - /script(?:name(?:utf8)?|file(?:utf8)?|dir(?:utf8)?)|setlogparams|logmsg|getprocessinfo/.source, + /getprocessinfo|logmsg|script(?:dir(?:utf8)?|file(?:utf8)?|name(?:utf8)?)|setlogparams/.source, // string - /[lu]case|str(?:toutf8|fromutf8|len|cmpi?)|(?:rev|left|right|mid|find|replace|fill)str|format|trim(?:left|right|all)|chr|ord|time/.source, + /chr|(?:fill|find|left|mid|replace|rev|right)str|format|[lu]case|ord|str(?:cmpi?|fromutf8|len|toutf8)|time|trim(?:all|left|right)/.source, // version - /version(?:number|string)|isversionorgreater/.source, + /isversionorgreater|version(?:number|string)/.source, // helper /buildpixeltype|colorspacenametopixeltype/.source, // avsplus - /setfiltermtmode|prefetch|addautoloaddir|on(?:cpu|cuda)/.source + /addautoloaddir|on(?:cpu|cuda)|prefetch|setfiltermtmode/.source ].join('|'); var properties = [ // content /has(?:audio|video)/.source, // resolution - /width|height/.source, + /height|width/.source, // framerate - /frame(?:count|rate)|framerate(?:numerator|denominator)/.source, + /frame(?:count|rate)|framerate(?:denominator|numerator)/.source, // interlacing - /is(?:field|frame)based|getparity/.source, + /getparity|is(?:field|frame)based/.source, // color format - /pixeltype|is(?:planar(?:rgba?)?|interleaved|rgb(?:24|32|48|64)?|y(?:8|u(?:y2|va?))?|yv(?:12|16|24|411)|420|422|444|packedrgb)|hasalpha|componentsize|numcomponents|bitspercomponent/.source, + /bitspercomponent|componentsize|hasalpha|is(?:planar(?:rgba?)?|interleaved|rgb(?:24|32|48|64)?|y(?:8|u(?:va?|y2))?|yv(?:12|16|24|411)|420|422|444|packedrgb)|numcomponents|pixeltype/.source, // audio - /audio(?:rate|duration|length(?:[fs]|lo|hi)?|channels|bits)|isaudio(?:float|int)/.source + /audio(?:bits|channels|duration|length(?:[fs]|hi|lo)?|rate)|isaudio(?:float|int)/.source ].join('|'); var filters = [ // source - /avi(?:file)?source|opendmlsource|directshowsource|image(?:reader|source|sourceanim)|segmented(?:avisource|directshowsource)|wavsource/.source, + /avi(?:file)?source|directshowsource|image(?:reader|source|sourceanim)|opendmlsource|segmented(?:avisource|directshowsource)|wavsource/.source, // color - /coloryuv|convertto(?:RGB(?:24|32|48|64)|(?:planar)?RGBA?|Y8?|YV(?:12|16|24|411)|YUVA?(?:444|422|420|411)|YUY2)|convertbacktoyuy2|fixluminance|gr[ae]yscale|invert|levels|limiter|mergea?rgb|merge(?:luma|chroma)|rgbadjust|show(?:red|green|blue|alpha)|swapuv|tweak|[uv]toy8?|ytouv/.source, + /coloryuv|convertbacktoyuy2|convertto(?:RGB(?:24|32|48|64)|(?:planar)?RGBA?|Y8?|YV(?:12|16|24|411)|YUVA?(?:411|420|422|444)|YUY2)|fixluminance|gr[ae]yscale|invert|levels|limiter|mergea?rgb|merge(?:chroma|luma)|rgbadjust|show(?:alpha|blue|green|red)|swapuv|tweak|[uv]toy8?|ytouv/.source, // overlay - /(?:colorkey|reset)mask|mask(?:hs)?|layer|merge|overlay|subtract/.source, + /(?:colorkey|reset)mask|layer|mask(?:hs)?|merge|overlay|subtract/.source, // geometry - /addborders|crop(?:bottom)?|flip(?:horizontal|vertical)|letterbox|(?:horizontal|vertical)?reduceby2|(?:bicubic|bilinear|blackman|gauss|lanczos|lanczos4|point|sinc|spline(?:16|36|64))resize|skewrows|turn(?:left|right|180)/.source, + /addborders|(?:bicubic|bilinear|blackman|gauss|lanczos4|lanczos|point|sinc|spline(?:16|36|64))resize|crop(?:bottom)?|flip(?:horizontal|vertical)|(?:horizontal|vertical)?reduceby2|letterbox|skewrows|turn(?:180|left|right)/.source, // pixel - /blur|sharpen|generalconvolution|(?:spatial|temporal)soften|fixbrokenchromaupsampling/.source, + /blur|fixbrokenchromaupsampling|generalconvolution|(?:spatial|temporal)soften|sharpen/.source, // timeline - /trim|(?:un)?alignedsplice|(?:assume|assumescaled|change|convert)FPS|(?:delete|duplicate)frame|dissolve|fade(?:in|out|io)[02]?|freezeframe|interleave|loop|reverse|select(?:even|odd|(?:range)?every)/.source, + /trim|(?:un)?alignedsplice|(?:assume|assumescaled|change|convert)FPS|(?:delete|duplicate)frame|dissolve|fade(?:in|io|out)[02]?|freezeframe|interleave|loop|reverse|select(?:even|odd|(?:range)?every)/.source, // interlace - /assume(?:frame|field)based|assume[bt]ff|bob|complementparity|doubleweave|peculiarblend|pulldown|separate(?:columns|rows|fields)|swapfields|weave(?:columns|rows)?/.source, + /assume[bt]ff|assume(?:field|frame)based|bob|complementparity|doubleweave|peculiarblend|pulldown|separate(?:columns|fields|rows)|swapfields|weave(?:columns|rows)?/.source, // audio - /amplify(?:db)?|assumesamplerate|audiodub(?:ex)?|audiotrim|convertaudioto(?:(?:8|16|24|32)bit|float)|converttomono|delayaudio|ensurevbrmp3sync|get(?:left|right)?channel|kill(?:audio|video)|mergechannels|mixaudio|monotostereo|normalize|resampleaudio|supereq|ssrc|timestretch/.source, + /amplify(?:db)?|assumesamplerate|audiodub(?:ex)?|audiotrim|convertaudioto(?:(?:8|16|24|32)bit|float)|converttomono|delayaudio|ensurevbrmp3sync|get(?:left|right)?channel|kill(?:audio|video)|mergechannels|mixaudio|monotostereo|normalize|resampleaudio|ssrc|supereq|timestretch/.source, // conditional - /conditional(?:filter|select|reader)|frameevaluate|scriptclip|writefile(?:if|start|end)?|animate|applyrange|tcp(?:server|source)/.source, + /animate|applyrange|conditional(?:filter|reader|select)|frameevaluate|scriptclip|tcp(?:server|source)|writefile(?:end|if|start)?/.source, // export /imagewriter/.source, // debug - /subtitle|blankclip|blackness|colorbars(?:hd)?|compare|dumpfiltergraph|setgraphanalysis|echo|histogram|info|messageclip|preroll|showfiveversions|show(?:framenumber|smpte|time)|stack(?:horizontal|vertical)|tone|version/.source + /blackness|blankclip|colorbars(?:hd)?|compare|dumpfiltergraph|echo|histogram|info|messageclip|preroll|setgraphanalysis|show(?:framenumber|smpte|time)|showfiveversions|stack(?:horizontal|vertical)|subtitle|tone|version/.source ].join('|'); var allinternals = [internals, properties, filters].join('|'); @@ -137,7 +137,7 @@ inside: { 'constant': { // These *are* case-sensitive! - pattern: /\b(?:DEFAULT_MT_MODE|(?:SCRIPT|MAINSCRIPT|PROGRAM)DIR|(?:USER|MACHINE)_(?:PLUS|CLASSIC)_PLUGINS)\b/ + pattern: /\b(?:DEFAULT_MT_MODE|(?:MAINSCRIPT|PROGRAM|SCRIPT)DIR|(?:MACHINE|USER)_(?:CLASSIC|PLUS)_PLUGINS)\b/ } } } @@ -146,11 +146,11 @@ // The special "last" variable that takes the value of the last implicitly returned clip 'variable': /\b(?:last)\b/i, - 'boolean': /\b(?:true|false|yes|no)\b/i, + 'boolean': /\b(?:false|no|true|yes)\b/i, - 'keyword': /\b(?:function|global|return|try|catch|if|else|while|for|__END__)\b/i, + 'keyword': /\b(?:catch|else|for|function|global|if|return|try|while|__END__)\b/i, - 'constant': /\bMT_(?:NICE_FILTER|MULTI_INSTANCE|SERIALIZED|SPECIAL_MT)\b/, + 'constant': /\bMT_(?:MULTI_INSTANCE|NICE_FILTER|SERIALIZED|SPECIAL_MT)\b/, // AviSynth's internal functions, filters, and properties 'builtin-function': { diff --git a/components/prism-avisynth.min.js b/components/prism-avisynth.min.js index 4fa150c833..14a8b68e99 100644 --- a/components/prism-avisynth.min.js +++ b/components/prism-avisynth.min.js @@ -1 +1 @@ -!function(e){function a(e,a,r){return RegExp(function(e,r){return e.replace(/<<(\d+)>>/g,function(e,a){return r[+a]})}(e,a),r||"")}var r="clip|int|float|string|bool|val",t=[["is(?:bool|clip|float|int|string)|defined|(?:var|(?:internal)?function)?exists?","apply|assert|default|eval|import|select|nop|undefined","set(?:memorymax|cachemode|maxcpu|workingdir|planarlegacyalignment)|opt_(?:allowfloataudio|usewaveextensible|dwchannelmask|avipadscanlines|vdubplanarhack|enable_(?:v210|y3_10_10|y3_10_16|b64a|planartopackedrgb))","hex(?:value)?|value","max|min|muldiv|floor|ceil|round|fmod|pi|exp|log(?:10)?|pow|sqrt|abs|sign|frac|rand|spline|continued(?:numerator|denominator)?","a?sinh?|a?cosh?|a?tan[2h]?","(?:bit(?:and|not|x?or|[lr]?shift[aslu]?|sh[lr]|sa[lr]|[lr]rotatel?|ro[rl]|te?st|set(?:count)?|cl(?:ea)?r|ch(?:an)?ge?))","average(?:luma|chroma[uv]|[bgr])|(?:luma|chroma[uv]|rgb|[rgb]|[yuv](?=difference(?:fromprevious|tonext)))difference(?:fromprevious|tonext)?|[yuvrgb]plane(?:median|min|max|minmaxdifference)","script(?:name(?:utf8)?|file(?:utf8)?|dir(?:utf8)?)|setlogparams|logmsg|getprocessinfo","[lu]case|str(?:toutf8|fromutf8|len|cmpi?)|(?:rev|left|right|mid|find|replace|fill)str|format|trim(?:left|right|all)|chr|ord|time","version(?:number|string)|isversionorgreater","buildpixeltype|colorspacenametopixeltype","setfiltermtmode|prefetch|addautoloaddir|on(?:cpu|cuda)"].join("|"),["has(?:audio|video)","width|height","frame(?:count|rate)|framerate(?:numerator|denominator)","is(?:field|frame)based|getparity","pixeltype|is(?:planar(?:rgba?)?|interleaved|rgb(?:24|32|48|64)?|y(?:8|u(?:y2|va?))?|yv(?:12|16|24|411)|420|422|444|packedrgb)|hasalpha|componentsize|numcomponents|bitspercomponent","audio(?:rate|duration|length(?:[fs]|lo|hi)?|channels|bits)|isaudio(?:float|int)"].join("|"),["avi(?:file)?source|opendmlsource|directshowsource|image(?:reader|source|sourceanim)|segmented(?:avisource|directshowsource)|wavsource","coloryuv|convertto(?:RGB(?:24|32|48|64)|(?:planar)?RGBA?|Y8?|YV(?:12|16|24|411)|YUVA?(?:444|422|420|411)|YUY2)|convertbacktoyuy2|fixluminance|gr[ae]yscale|invert|levels|limiter|mergea?rgb|merge(?:luma|chroma)|rgbadjust|show(?:red|green|blue|alpha)|swapuv|tweak|[uv]toy8?|ytouv","(?:colorkey|reset)mask|mask(?:hs)?|layer|merge|overlay|subtract","addborders|crop(?:bottom)?|flip(?:horizontal|vertical)|letterbox|(?:horizontal|vertical)?reduceby2|(?:bicubic|bilinear|blackman|gauss|lanczos|lanczos4|point|sinc|spline(?:16|36|64))resize|skewrows|turn(?:left|right|180)","blur|sharpen|generalconvolution|(?:spatial|temporal)soften|fixbrokenchromaupsampling","trim|(?:un)?alignedsplice|(?:assume|assumescaled|change|convert)FPS|(?:delete|duplicate)frame|dissolve|fade(?:in|out|io)[02]?|freezeframe|interleave|loop|reverse|select(?:even|odd|(?:range)?every)","assume(?:frame|field)based|assume[bt]ff|bob|complementparity|doubleweave|peculiarblend|pulldown|separate(?:columns|rows|fields)|swapfields|weave(?:columns|rows)?","amplify(?:db)?|assumesamplerate|audiodub(?:ex)?|audiotrim|convertaudioto(?:(?:8|16|24|32)bit|float)|converttomono|delayaudio|ensurevbrmp3sync|get(?:left|right)?channel|kill(?:audio|video)|mergechannels|mixaudio|monotostereo|normalize|resampleaudio|supereq|ssrc|timestretch","conditional(?:filter|select|reader)|frameevaluate|scriptclip|writefile(?:if|start|end)?|animate|applyrange|tcp(?:server|source)","imagewriter","subtitle|blankclip|blackness|colorbars(?:hd)?|compare|dumpfiltergraph|setgraphanalysis|echo|histogram|info|messageclip|preroll|showfiveversions|show(?:framenumber|smpte|time)|stack(?:horizontal|vertical)|tone|version"].join("|")].join("|");e.languages.avisynth={comment:[{pattern:/(^|[^\\])\[\*(?:[^\[*]|\[(?!\*)|\*(?!\])|\[\*(?:[^\[*]|\[(?!\*)|\*(?!\]))*\*\])*\*\]/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\$])#.*/,lookbehind:!0,greedy:!0}],argument:{pattern:a('\\b(?:<<0>>)\\s+("?)\\w+\\1',[r],"i"),inside:{keyword:/^\w+/}},"argument-label":{pattern:/([,(][\s\\]*)\w+\s*=(?!=)/,lookbehind:!0,inside:{"argument-name":{pattern:/^\w+/,alias:"punctuation"},punctuation:/=$/}},string:[{pattern:/"""[\s\S]*?"""/,greedy:!0},{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0,inside:{constant:{pattern:/\b(?:DEFAULT_MT_MODE|(?:SCRIPT|MAINSCRIPT|PROGRAM)DIR|(?:USER|MACHINE)_(?:PLUS|CLASSIC)_PLUGINS)\b/}}}],variable:/\b(?:last)\b/i,boolean:/\b(?:true|false|yes|no)\b/i,keyword:/\b(?:function|global|return|try|catch|if|else|while|for|__END__)\b/i,constant:/\bMT_(?:NICE_FILTER|MULTI_INSTANCE|SERIALIZED|SPECIAL_MT)\b/,"builtin-function":{pattern:a("\\b(?:<<0>>)\\b",[t],"i"),alias:"function"},"type-cast":{pattern:a("\\b(?:<<0>>)(?=\\s*\\()",[r],"i"),alias:"keyword"},function:{pattern:/\b[a-z_]\w*(?=\s*\()|(\.)[a-z_]\w*\b/i,lookbehind:!0},"line-continuation":{pattern:/(^[ \t]*)\\|\\(?=[ \t]*$)/m,lookbehind:!0,alias:"punctuation"},number:/\B\$(?:[\da-f]{6}|[\da-f]{8})\b|(?:(?:\b|\B-)\d+(?:\.\d*)?\b|\B\.\d+\b)/i,operator:/\+\+?|[!=<>]=?|&&|\|\||[?:*/%-]/,punctuation:/[{}\[\]();,.]/},e.languages.avs=e.languages.avisynth}(Prism); \ No newline at end of file +!function(e){function a(e,a,r){return RegExp(function(e,r){return e.replace(/<<(\d+)>>/g,function(e,a){return r[+a]})}(e,a),r||"")}var r="bool|clip|float|int|string|val",t=[["is(?:bool|clip|float|int|string)|defined|(?:(?:internal)?function|var)?exists?","apply|assert|default|eval|import|nop|select|undefined","opt_(?:allowfloataudio|avipadscanlines|dwchannelmask|enable_(?:b64a|planartopackedrgb|v210|y3_10_10|y3_10_16)|usewaveextensible|vdubplanarhack)|set(?:cachemode|maxcpu|memorymax|planarlegacyalignment|workingdir)","hex(?:value)?|value","abs|ceil|continued(?:denominator|numerator)?|exp|floor|fmod|frac|log(?:10)?|max|min|muldiv|pi|pow|rand|round|sign|spline|sqrt","a?sinh?|a?cosh?|a?tan[2h]?","(?:bit(?:and|not|x?or|[lr]?shift[aslu]?|sh[lr]|sa[lr]|[lr]rotatel?|ro[rl]|te?st|set(?:count)?|cl(?:ea)?r|ch(?:an)?ge?))","average(?:[bgr]|chroma[uv]|luma)|(?:[rgb]|chroma[uv]|luma|rgb|[yuv](?=difference(?:fromprevious|tonext)))difference(?:fromprevious|tonext)?|[yuvrgb]plane(?:median|min|max|minmaxdifference)","getprocessinfo|logmsg|script(?:dir(?:utf8)?|file(?:utf8)?|name(?:utf8)?)|setlogparams","chr|(?:fill|find|left|mid|replace|rev|right)str|format|[lu]case|ord|str(?:cmpi?|fromutf8|len|toutf8)|time|trim(?:all|left|right)","isversionorgreater|version(?:number|string)","buildpixeltype|colorspacenametopixeltype","addautoloaddir|on(?:cpu|cuda)|prefetch|setfiltermtmode"].join("|"),["has(?:audio|video)","height|width","frame(?:count|rate)|framerate(?:denominator|numerator)","getparity|is(?:field|frame)based","bitspercomponent|componentsize|hasalpha|is(?:planar(?:rgba?)?|interleaved|rgb(?:24|32|48|64)?|y(?:8|u(?:va?|y2))?|yv(?:12|16|24|411)|420|422|444|packedrgb)|numcomponents|pixeltype","audio(?:bits|channels|duration|length(?:[fs]|hi|lo)?|rate)|isaudio(?:float|int)"].join("|"),["avi(?:file)?source|directshowsource|image(?:reader|source|sourceanim)|opendmlsource|segmented(?:avisource|directshowsource)|wavsource","coloryuv|convertbacktoyuy2|convertto(?:RGB(?:24|32|48|64)|(?:planar)?RGBA?|Y8?|YV(?:12|16|24|411)|YUVA?(?:411|420|422|444)|YUY2)|fixluminance|gr[ae]yscale|invert|levels|limiter|mergea?rgb|merge(?:chroma|luma)|rgbadjust|show(?:alpha|blue|green|red)|swapuv|tweak|[uv]toy8?|ytouv","(?:colorkey|reset)mask|layer|mask(?:hs)?|merge|overlay|subtract","addborders|(?:bicubic|bilinear|blackman|gauss|lanczos4|lanczos|point|sinc|spline(?:16|36|64))resize|crop(?:bottom)?|flip(?:horizontal|vertical)|(?:horizontal|vertical)?reduceby2|letterbox|skewrows|turn(?:180|left|right)","blur|fixbrokenchromaupsampling|generalconvolution|(?:spatial|temporal)soften|sharpen","trim|(?:un)?alignedsplice|(?:assume|assumescaled|change|convert)FPS|(?:delete|duplicate)frame|dissolve|fade(?:in|io|out)[02]?|freezeframe|interleave|loop|reverse|select(?:even|odd|(?:range)?every)","assume[bt]ff|assume(?:field|frame)based|bob|complementparity|doubleweave|peculiarblend|pulldown|separate(?:columns|fields|rows)|swapfields|weave(?:columns|rows)?","amplify(?:db)?|assumesamplerate|audiodub(?:ex)?|audiotrim|convertaudioto(?:(?:8|16|24|32)bit|float)|converttomono|delayaudio|ensurevbrmp3sync|get(?:left|right)?channel|kill(?:audio|video)|mergechannels|mixaudio|monotostereo|normalize|resampleaudio|ssrc|supereq|timestretch","animate|applyrange|conditional(?:filter|reader|select)|frameevaluate|scriptclip|tcp(?:server|source)|writefile(?:end|if|start)?","imagewriter","blackness|blankclip|colorbars(?:hd)?|compare|dumpfiltergraph|echo|histogram|info|messageclip|preroll|setgraphanalysis|show(?:framenumber|smpte|time)|showfiveversions|stack(?:horizontal|vertical)|subtitle|tone|version"].join("|")].join("|");e.languages.avisynth={comment:[{pattern:/(^|[^\\])\[\*(?:[^\[*]|\[(?!\*)|\*(?!\])|\[\*(?:[^\[*]|\[(?!\*)|\*(?!\]))*\*\])*\*\]/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\$])#.*/,lookbehind:!0,greedy:!0}],argument:{pattern:a('\\b(?:<<0>>)\\s+("?)\\w+\\1',[r],"i"),inside:{keyword:/^\w+/}},"argument-label":{pattern:/([,(][\s\\]*)\w+\s*=(?!=)/,lookbehind:!0,inside:{"argument-name":{pattern:/^\w+/,alias:"punctuation"},punctuation:/=$/}},string:[{pattern:/"""[\s\S]*?"""/,greedy:!0},{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0,inside:{constant:{pattern:/\b(?:DEFAULT_MT_MODE|(?:MAINSCRIPT|PROGRAM|SCRIPT)DIR|(?:MACHINE|USER)_(?:CLASSIC|PLUS)_PLUGINS)\b/}}}],variable:/\b(?:last)\b/i,boolean:/\b(?:false|no|true|yes)\b/i,keyword:/\b(?:catch|else|for|function|global|if|return|try|while|__END__)\b/i,constant:/\bMT_(?:MULTI_INSTANCE|NICE_FILTER|SERIALIZED|SPECIAL_MT)\b/,"builtin-function":{pattern:a("\\b(?:<<0>>)\\b",[t],"i"),alias:"function"},"type-cast":{pattern:a("\\b(?:<<0>>)(?=\\s*\\()",[r],"i"),alias:"keyword"},function:{pattern:/\b[a-z_]\w*(?=\s*\()|(\.)[a-z_]\w*\b/i,lookbehind:!0},"line-continuation":{pattern:/(^[ \t]*)\\|\\(?=[ \t]*$)/m,lookbehind:!0,alias:"punctuation"},number:/\B\$(?:[\da-f]{6}|[\da-f]{8})\b|(?:(?:\b|\B-)\d+(?:\.\d*)?\b|\B\.\d+\b)/i,operator:/\+\+?|[!=<>]=?|&&|\|\||[?:*/%-]/,punctuation:/[{}\[\]();,.]/},e.languages.avs=e.languages.avisynth}(Prism); \ No newline at end of file diff --git a/components/prism-avro-idl.js b/components/prism-avro-idl.js index 107192e06e..ec5be7a137 100644 --- a/components/prism-avro-idl.js +++ b/components/prism-avro-idl.js @@ -47,7 +47,7 @@ Prism.languages['avro-idl'] = { pattern: /(^|[^\w.])-?(?:(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|0x(?:[a-f0-9]+(?:\.[a-f0-9]*)?|\.[a-f0-9]+)(?:p[+-]?\d+)?)[dfl]?(?![\w.])/i, lookbehind: true }, - /-?\b(?:NaN|Infinity)\b/ + /-?\b(?:Infinity|NaN)\b/ ], 'operator': /=/, diff --git a/components/prism-avro-idl.min.js b/components/prism-avro-idl.min.js index c3fac63428..cf54dc546b 100644 --- a/components/prism-avro-idl.min.js +++ b/components/prism-avro-idl.min.js @@ -1 +1 @@ -Prism.languages["avro-idl"]={comment:{pattern:/\/\/.*|\/\*[\s\S]*?\*\//,greedy:!0},string:[{pattern:/(^|[^\\])"(?:[^\r\n"\\]|\\.)*"/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\])'(?:[^\r\n'\\]|\\(?:[\s\S]|\d{1,3}))'/,lookbehind:!0,greedy:!0}],annotation:{pattern:/@(?:[$\w.-]|`[^\r\n`]+`)+/,greedy:!0,alias:"function"},"function-identifier":{pattern:/`[^\r\n`]+`(?=\s*\()/,greedy:!0,alias:"function"},identifier:{pattern:/`[^\r\n`]+`/,greedy:!0},"class-name":{pattern:/(\b(?:enum|error|protocol|record|throws)\b\s+)[$\w]+/,lookbehind:!0,greedy:!0},keyword:/\b(?:array|boolean|bytes|date|decimal|double|enum|error|false|fixed|float|idl|import|int|local_timestamp_ms|long|map|null|oneway|protocol|record|schema|string|throws|time_ms|timestamp_ms|true|union|uuid|void)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:[{pattern:/(^|[^\w.])-?(?:(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|0x(?:[a-f0-9]+(?:\.[a-f0-9]*)?|\.[a-f0-9]+)(?:p[+-]?\d+)?)[dfl]?(?![\w.])/i,lookbehind:!0},/-?\b(?:NaN|Infinity)\b/],operator:/=/,punctuation:/[()\[\]{}<>.:,;-]/},Prism.languages.avdl=Prism.languages["avro-idl"]; \ No newline at end of file +Prism.languages["avro-idl"]={comment:{pattern:/\/\/.*|\/\*[\s\S]*?\*\//,greedy:!0},string:[{pattern:/(^|[^\\])"(?:[^\r\n"\\]|\\.)*"/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\])'(?:[^\r\n'\\]|\\(?:[\s\S]|\d{1,3}))'/,lookbehind:!0,greedy:!0}],annotation:{pattern:/@(?:[$\w.-]|`[^\r\n`]+`)+/,greedy:!0,alias:"function"},"function-identifier":{pattern:/`[^\r\n`]+`(?=\s*\()/,greedy:!0,alias:"function"},identifier:{pattern:/`[^\r\n`]+`/,greedy:!0},"class-name":{pattern:/(\b(?:enum|error|protocol|record|throws)\b\s+)[$\w]+/,lookbehind:!0,greedy:!0},keyword:/\b(?:array|boolean|bytes|date|decimal|double|enum|error|false|fixed|float|idl|import|int|local_timestamp_ms|long|map|null|oneway|protocol|record|schema|string|throws|time_ms|timestamp_ms|true|union|uuid|void)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:[{pattern:/(^|[^\w.])-?(?:(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|0x(?:[a-f0-9]+(?:\.[a-f0-9]*)?|\.[a-f0-9]+)(?:p[+-]?\d+)?)[dfl]?(?![\w.])/i,lookbehind:!0},/-?\b(?:Infinity|NaN)\b/],operator:/=/,punctuation:/[()\[\]{}<>.:,;-]/},Prism.languages.avdl=Prism.languages["avro-idl"]; \ No newline at end of file diff --git a/components/prism-bash.js b/components/prism-bash.js index d494a13db1..2ebf3dd510 100644 --- a/components/prism-bash.js +++ b/components/prism-bash.js @@ -64,7 +64,7 @@ /\$(?:\w+|[#?*!@$])/ ], // Escape sequences from echo and printf's manuals, and escaped quotes. - 'entity': /\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|x[0-9a-fA-F]{1,2}|u[0-9a-fA-F]{4}|U[0-9a-fA-F]{8})/ + 'entity': /\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/ }; Prism.languages.bash = { @@ -160,22 +160,22 @@ }, 'variable': insideString.variable, 'function': { - pattern: /(^|[\s;|&]|[<>]\()(?:add|apropos|apt|aptitude|apt-cache|apt-get|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/, + pattern: /(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/, lookbehind: true }, 'keyword': { - pattern: /(^|[\s;|&]|[<>]\()(?:if|then|else|elif|fi|for|while|in|case|esac|function|select|do|done|until)(?=$|[)\s;|&])/, + pattern: /(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/, lookbehind: true }, // https://www.gnu.org/software/bash/manual/html_node/Shell-Builtin-Commands.html 'builtin': { - pattern: /(^|[\s;|&]|[<>]\()(?:\.|:|break|cd|continue|eval|exec|exit|export|getopts|hash|pwd|readonly|return|shift|test|times|trap|umask|unset|alias|bind|builtin|caller|command|declare|echo|enable|help|let|local|logout|mapfile|printf|read|readarray|source|type|typeset|ulimit|unalias|set|shopt)(?=$|[)\s;|&])/, + pattern: /(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/, lookbehind: true, // Alias added to make those easier to distinguish from strings. alias: 'class-name' }, 'boolean': { - pattern: /(^|[\s;|&]|[<>]\()(?:true|false)(?=$|[)\s;|&])/, + pattern: /(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/, lookbehind: true }, 'file-descriptor': { diff --git a/components/prism-bash.min.js b/components/prism-bash.min.js index 333393d604..03e318158d 100644 --- a/components/prism-bash.min.js +++ b/components/prism-bash.min.js @@ -1 +1 @@ -!function(e){var t="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",n={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},a={bash:n,environment:{pattern:RegExp("\\$"+t),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+t),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|x[0-9a-fA-F]{1,2}|u[0-9a-fA-F]{4}|U[0-9a-fA-F]{8})/};e.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+t),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:a},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:n}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:a},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:a.entity}}],environment:{pattern:RegExp("\\$?"+t),alias:"constant"},variable:a.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|aptitude|apt-cache|apt-get|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:if|then|else|elif|fi|for|while|in|case|esac|function|select|do|done|until)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|break|cd|continue|eval|exec|exit|export|getopts|hash|pwd|readonly|return|shift|test|times|trap|umask|unset|alias|bind|builtin|caller|command|declare|echo|enable|help|let|local|logout|mapfile|printf|read|readarray|source|type|typeset|ulimit|unalias|set|shopt)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:true|false)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},n.inside=e.languages.bash;for(var s=["comment","function-name","for-or-select","assign-left","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],i=a.variable[1].inside,o=0;o>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+t),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/};e.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+t),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:a},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:n}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:a},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:a.entity}}],environment:{pattern:RegExp("\\$?"+t),alias:"constant"},variable:a.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},n.inside=e.languages.bash;for(var s=["comment","function-name","for-or-select","assign-left","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],i=a.variable[1].inside,o=0;o]?|>=?|[+\-*\/^=&]|\b(?:AND|EQV|IMP|NOT|OR|XOR)\b/i, 'punctuation': /[,;:()]/ diff --git a/components/prism-basic.min.js b/components/prism-basic.min.js index 75040a6847..aca059fa30 100644 --- a/components/prism-basic.min.js +++ b/components/prism-basic.min.js @@ -1 +1 @@ -Prism.languages.basic={comment:{pattern:/(?:!|REM\b).+/i,inside:{keyword:/^REM/i}},string:{pattern:/"(?:""|[!#$%&'()*,\/:;<=>?^\w +\-.])*"/i,greedy:!0},number:/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:E[+-]?\d+)?/i,keyword:/\b(?:AS|BEEP|BLOAD|BSAVE|CALL(?: ABSOLUTE)?|CASE|CHAIN|CHDIR|CLEAR|CLOSE|CLS|COM|COMMON|CONST|DATA|DECLARE|DEF(?: FN| SEG|DBL|INT|LNG|SNG|STR)|DIM|DO|DOUBLE|ELSE|ELSEIF|END|ENVIRON|ERASE|ERROR|EXIT|FIELD|FILES|FOR|FUNCTION|GET|GOSUB|GOTO|IF|INPUT|INTEGER|IOCTL|KEY|KILL|LINE INPUT|LOCATE|LOCK|LONG|LOOP|LSET|MKDIR|NAME|NEXT|OFF|ON(?: COM| ERROR| KEY| TIMER)?|OPEN|OPTION BASE|OUT|POKE|PUT|READ|REDIM|REM|RESTORE|RESUME|RETURN|RMDIR|RSET|RUN|SHARED|SINGLE|SELECT CASE|SHELL|SLEEP|STATIC|STEP|STOP|STRING|SUB|SWAP|SYSTEM|THEN|TIMER|TO|TROFF|TRON|TYPE|UNLOCK|UNTIL|USING|VIEW PRINT|WAIT|WEND|WHILE|WRITE)(?:\$|\b)/i,function:/\b(?:ABS|ACCESS|ACOS|ANGLE|AREA|ARITHMETIC|ARRAY|ASIN|ASK|AT|ATN|BASE|BEGIN|BREAK|CAUSE|CEIL|CHR|CLIP|COLLATE|COLOR|CON|COS|COSH|COT|CSC|DATE|DATUM|DEBUG|DECIMAL|DEF|DEG|DEGREES|DELETE|DET|DEVICE|DISPLAY|DOT|ELAPSED|EPS|ERASABLE|EXLINE|EXP|EXTERNAL|EXTYPE|FILETYPE|FIXED|FP|GO|GRAPH|HANDLER|IDN|IMAGE|IN|INT|INTERNAL|IP|IS|KEYED|LBOUND|LCASE|LEFT|LEN|LENGTH|LET|LINE|LINES|LOG|LOG10|LOG2|LTRIM|MARGIN|MAT|MAX|MAXNUM|MID|MIN|MISSING|MOD|NATIVE|NUL|NUMERIC|OF|OPTION|ORD|ORGANIZATION|OUTIN|OUTPUT|PI|POINT|POINTER|POINTS|POS|PRINT|PROGRAM|PROMPT|RAD|RADIANS|RANDOMIZE|RECORD|RECSIZE|RECTYPE|RELATIVE|REMAINDER|REPEAT|REST|RETRY|REWRITE|RIGHT|RND|ROUND|RTRIM|SAME|SEC|SELECT|SEQUENTIAL|SET|SETTER|SGN|SIN|SINH|SIZE|SKIP|SQR|STANDARD|STATUS|STR|STREAM|STYLE|TAB|TAN|TANH|TEMPLATE|TEXT|THERE|TIME|TIMEOUT|TRACE|TRANSFORM|TRUNCATE|UBOUND|UCASE|USE|VAL|VARIABLE|VIEWPORT|WHEN|WINDOW|WITH|ZER|ZONEWIDTH)(?:\$|\b)/i,operator:/<[=>]?|>=?|[+\-*\/^=&]|\b(?:AND|EQV|IMP|NOT|OR|XOR)\b/i,punctuation:/[,;:()]/}; \ No newline at end of file +Prism.languages.basic={comment:{pattern:/(?:!|REM\b).+/i,inside:{keyword:/^REM/i}},string:{pattern:/"(?:""|[!#$%&'()*,\/:;<=>?^\w +\-.])*"/i,greedy:!0},number:/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:E[+-]?\d+)?/i,keyword:/\b(?:AS|BEEP|BLOAD|BSAVE|CALL(?: ABSOLUTE)?|CASE|CHAIN|CHDIR|CLEAR|CLOSE|CLS|COM|COMMON|CONST|DATA|DECLARE|DEF(?: FN| SEG|DBL|INT|LNG|SNG|STR)|DIM|DO|DOUBLE|ELSE|ELSEIF|END|ENVIRON|ERASE|ERROR|EXIT|FIELD|FILES|FOR|FUNCTION|GET|GOSUB|GOTO|IF|INPUT|INTEGER|IOCTL|KEY|KILL|LINE INPUT|LOCATE|LOCK|LONG|LOOP|LSET|MKDIR|NAME|NEXT|OFF|ON(?: COM| ERROR| KEY| TIMER)?|OPEN|OPTION BASE|OUT|POKE|PUT|READ|REDIM|REM|RESTORE|RESUME|RETURN|RMDIR|RSET|RUN|SELECT CASE|SHARED|SHELL|SINGLE|SLEEP|STATIC|STEP|STOP|STRING|SUB|SWAP|SYSTEM|THEN|TIMER|TO|TROFF|TRON|TYPE|UNLOCK|UNTIL|USING|VIEW PRINT|WAIT|WEND|WHILE|WRITE)(?:\$|\b)/i,function:/\b(?:ABS|ACCESS|ACOS|ANGLE|AREA|ARITHMETIC|ARRAY|ASIN|ASK|AT|ATN|BASE|BEGIN|BREAK|CAUSE|CEIL|CHR|CLIP|COLLATE|COLOR|CON|COS|COSH|COT|CSC|DATE|DATUM|DEBUG|DECIMAL|DEF|DEG|DEGREES|DELETE|DET|DEVICE|DISPLAY|DOT|ELAPSED|EPS|ERASABLE|EXLINE|EXP|EXTERNAL|EXTYPE|FILETYPE|FIXED|FP|GO|GRAPH|HANDLER|IDN|IMAGE|IN|INT|INTERNAL|IP|IS|KEYED|LBOUND|LCASE|LEFT|LEN|LENGTH|LET|LINE|LINES|LOG|LOG10|LOG2|LTRIM|MARGIN|MAT|MAX|MAXNUM|MID|MIN|MISSING|MOD|NATIVE|NUL|NUMERIC|OF|OPTION|ORD|ORGANIZATION|OUTIN|OUTPUT|PI|POINT|POINTER|POINTS|POS|PRINT|PROGRAM|PROMPT|RAD|RADIANS|RANDOMIZE|RECORD|RECSIZE|RECTYPE|RELATIVE|REMAINDER|REPEAT|REST|RETRY|REWRITE|RIGHT|RND|ROUND|RTRIM|SAME|SEC|SELECT|SEQUENTIAL|SET|SETTER|SGN|SIN|SINH|SIZE|SKIP|SQR|STANDARD|STATUS|STR|STREAM|STYLE|TAB|TAN|TANH|TEMPLATE|TEXT|THERE|TIME|TIMEOUT|TRACE|TRANSFORM|TRUNCATE|UBOUND|UCASE|USE|VAL|VARIABLE|VIEWPORT|WHEN|WINDOW|WITH|ZER|ZONEWIDTH)(?:\$|\b)/i,operator:/<[=>]?|>=?|[+\-*\/^=&]|\b(?:AND|EQV|IMP|NOT|OR|XOR)\b/i,punctuation:/[,;:()]/}; \ No newline at end of file diff --git a/components/prism-batch.js b/components/prism-batch.js index b330ae6c77..27d9f6db65 100644 --- a/components/prism-batch.js +++ b/components/prism-batch.js @@ -28,7 +28,7 @@ pattern: /((?:^|[&(])[ \t]*)for(?: \/[a-z?](?:[ :](?:"[^"]*"|[^\s"/]\S*))?)* \S+ in \([^)]+\) do/im, lookbehind: true, inside: { - 'keyword': /^for\b|\b(?:in|do)\b/i, + 'keyword': /\b(?:do|in)\b|^for\b/i, 'string': string, 'parameter': parameter, 'variable': variable, @@ -38,15 +38,15 @@ }, { // IF command - pattern: /((?:^|[&(])[ \t]*)if(?: \/[a-z?](?:[ :](?:"[^"]*"|[^\s"/]\S*))?)* (?:not )?(?:cmdextversion \d+|defined \w+|errorlevel \d+|exist \S+|(?:"[^"]*"|(?!")(?:(?!==)\S)+)?(?:==| (?:equ|neq|lss|leq|gtr|geq) )(?:"[^"]*"|[^\s"]\S*))/im, + pattern: /((?:^|[&(])[ \t]*)if(?: \/[a-z?](?:[ :](?:"[^"]*"|[^\s"/]\S*))?)* (?:not )?(?:cmdextversion \d+|defined \w+|errorlevel \d+|exist \S+|(?:"[^"]*"|(?!")(?:(?!==)\S)+)?(?:==| (?:equ|geq|gtr|leq|lss|neq) )(?:"[^"]*"|[^\s"]\S*))/im, lookbehind: true, inside: { - 'keyword': /^if\b|\b(?:not|cmdextversion|defined|errorlevel|exist)\b/i, + 'keyword': /\b(?:cmdextversion|defined|errorlevel|exist|not)\b|^if\b/i, 'string': string, 'parameter': parameter, 'variable': variable, 'number': number, - 'operator': /\^|==|\b(?:equ|neq|lss|leq|gtr|geq)\b/i + 'operator': /\^|==|\b(?:equ|geq|gtr|leq|lss|neq)\b/i } }, { diff --git a/components/prism-batch.min.js b/components/prism-batch.min.js index e7fe5005ab..3c22c1ce1e 100644 --- a/components/prism-batch.min.js +++ b/components/prism-batch.min.js @@ -1 +1 @@ -!function(e){var r=/%%?[~:\w]+%?|!\S+!/,t={pattern:/\/[a-z?]+(?=[ :]|$):?|-[a-z]\b|--[a-z-]+\b/im,alias:"attr-name",inside:{punctuation:/:/}},n=/"(?:[\\"]"|[^"])*"(?!")/,i=/(?:\b|-)\d+\b/;Prism.languages.batch={comment:[/^::.*/m,{pattern:/((?:^|[&(])[ \t]*)rem\b(?:[^^&)\r\n]|\^(?:\r\n|[\s\S]))*/im,lookbehind:!0}],label:{pattern:/^:.*/m,alias:"property"},command:[{pattern:/((?:^|[&(])[ \t]*)for(?: \/[a-z?](?:[ :](?:"[^"]*"|[^\s"/]\S*))?)* \S+ in \([^)]+\) do/im,lookbehind:!0,inside:{keyword:/^for\b|\b(?:in|do)\b/i,string:n,parameter:t,variable:r,number:i,punctuation:/[()',]/}},{pattern:/((?:^|[&(])[ \t]*)if(?: \/[a-z?](?:[ :](?:"[^"]*"|[^\s"/]\S*))?)* (?:not )?(?:cmdextversion \d+|defined \w+|errorlevel \d+|exist \S+|(?:"[^"]*"|(?!")(?:(?!==)\S)+)?(?:==| (?:equ|neq|lss|leq|gtr|geq) )(?:"[^"]*"|[^\s"]\S*))/im,lookbehind:!0,inside:{keyword:/^if\b|\b(?:not|cmdextversion|defined|errorlevel|exist)\b/i,string:n,parameter:t,variable:r,number:i,operator:/\^|==|\b(?:equ|neq|lss|leq|gtr|geq)\b/i}},{pattern:/((?:^|[&()])[ \t]*)else\b/im,lookbehind:!0,inside:{keyword:/^else\b/i}},{pattern:/((?:^|[&(])[ \t]*)set(?: \/[a-z](?:[ :](?:"[^"]*"|[^\s"/]\S*))?)* (?:[^^&)\r\n]|\^(?:\r\n|[\s\S]))*/im,lookbehind:!0,inside:{keyword:/^set\b/i,string:n,parameter:t,variable:[r,/\w+(?=(?:[*\/%+\-&^|]|<<|>>)?=)/],number:i,operator:/[*\/%+\-&^|]=?|<<=?|>>=?|[!~_=]/,punctuation:/[()',]/}},{pattern:/((?:^|[&(])[ \t]*@?)\w+\b(?:"(?:[\\"]"|[^"])*"(?!")|[^"^&)\r\n]|\^(?:\r\n|[\s\S]))*/im,lookbehind:!0,inside:{keyword:/^\w+\b/i,string:n,parameter:t,label:{pattern:/(^\s*):\S+/m,lookbehind:!0,alias:"property"},variable:r,number:i,operator:/\^/}}],operator:/[&@]/,punctuation:/[()']/}}(); \ No newline at end of file +!function(e){var r=/%%?[~:\w]+%?|!\S+!/,t={pattern:/\/[a-z?]+(?=[ :]|$):?|-[a-z]\b|--[a-z-]+\b/im,alias:"attr-name",inside:{punctuation:/:/}},n=/"(?:[\\"]"|[^"])*"(?!")/,i=/(?:\b|-)\d+\b/;Prism.languages.batch={comment:[/^::.*/m,{pattern:/((?:^|[&(])[ \t]*)rem\b(?:[^^&)\r\n]|\^(?:\r\n|[\s\S]))*/im,lookbehind:!0}],label:{pattern:/^:.*/m,alias:"property"},command:[{pattern:/((?:^|[&(])[ \t]*)for(?: \/[a-z?](?:[ :](?:"[^"]*"|[^\s"/]\S*))?)* \S+ in \([^)]+\) do/im,lookbehind:!0,inside:{keyword:/\b(?:do|in)\b|^for\b/i,string:n,parameter:t,variable:r,number:i,punctuation:/[()',]/}},{pattern:/((?:^|[&(])[ \t]*)if(?: \/[a-z?](?:[ :](?:"[^"]*"|[^\s"/]\S*))?)* (?:not )?(?:cmdextversion \d+|defined \w+|errorlevel \d+|exist \S+|(?:"[^"]*"|(?!")(?:(?!==)\S)+)?(?:==| (?:equ|geq|gtr|leq|lss|neq) )(?:"[^"]*"|[^\s"]\S*))/im,lookbehind:!0,inside:{keyword:/\b(?:cmdextversion|defined|errorlevel|exist|not)\b|^if\b/i,string:n,parameter:t,variable:r,number:i,operator:/\^|==|\b(?:equ|geq|gtr|leq|lss|neq)\b/i}},{pattern:/((?:^|[&()])[ \t]*)else\b/im,lookbehind:!0,inside:{keyword:/^else\b/i}},{pattern:/((?:^|[&(])[ \t]*)set(?: \/[a-z](?:[ :](?:"[^"]*"|[^\s"/]\S*))?)* (?:[^^&)\r\n]|\^(?:\r\n|[\s\S]))*/im,lookbehind:!0,inside:{keyword:/^set\b/i,string:n,parameter:t,variable:[r,/\w+(?=(?:[*\/%+\-&^|]|<<|>>)?=)/],number:i,operator:/[*\/%+\-&^|]=?|<<=?|>>=?|[!~_=]/,punctuation:/[()',]/}},{pattern:/((?:^|[&(])[ \t]*@?)\w+\b(?:"(?:[\\"]"|[^"])*"(?!")|[^"^&)\r\n]|\^(?:\r\n|[\s\S]))*/im,lookbehind:!0,inside:{keyword:/^\w+\b/i,string:n,parameter:t,label:{pattern:/(^\s*):\S+/m,lookbehind:!0,alias:"property"},variable:r,number:i,operator:/\^/}}],operator:/[&@]/,punctuation:/[()']/}}(); \ No newline at end of file diff --git a/components/prism-bicep.js b/components/prism-bicep.js index 36317a46ea..7220f2916a 100644 --- a/components/prism-bicep.js +++ b/components/prism-bicep.js @@ -62,9 +62,9 @@ Prism.languages.bicep = { alias: 'class-name' }, - 'boolean': /\b(?:true|false)\b/, + 'boolean': /\b(?:false|true)\b/, // https://github.com/Azure/bicep/blob/114a3251b4e6e30082a58729f19a8cc4e374ffa6/src/textmate/bicep.tmlanguage#L184 - 'keyword': /\b(?:targetScope|resource|module|param|var|output|for|in|if|existing|null)\b/, + 'keyword': /\b(?:existing|for|if|in|module|null|output|param|resource|targetScope|var)\b/, 'decorator': /@\w+\b/, 'function': /\b[a-z_]\w*(?=[ \t]*\()/i, diff --git a/components/prism-bicep.min.js b/components/prism-bicep.min.js index 7be82b9a97..afc03a7b5a 100644 --- a/components/prism-bicep.min.js +++ b/components/prism-bicep.min.js @@ -1 +1 @@ -Prism.languages.bicep={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],property:[{pattern:/([\r\n][ \t]*)[a-z_]\w*(?=[ \t]*:)/i,lookbehind:!0},{pattern:/([\r\n][ \t]*)'(?:\\.|\$(?!\{)|[^'\\\r\n$])*'(?=[ \t]*:)/,lookbehind:!0,greedy:!0}],string:[{pattern:/'''[^'][\s\S]*?'''/,greedy:!0},{pattern:/(^|[^\\'])'(?:\\.|\$(?!\{)|[^'\\\r\n$])*'/,lookbehind:!0,greedy:!0}],"interpolated-string":{pattern:/(^|[^\\'])'(?:\\.|\$(?:(?!\{)|\{[^{}\r\n]*\})|[^'\\\r\n$])*'/,lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/\$\{[^{}\r\n]*\}/,inside:{expression:{pattern:/(^\$\{)[\s\S]+(?=\}$)/,lookbehind:!0},punctuation:/^\$\{|\}$/}},string:/[\s\S]+/}},datatype:{pattern:/(\b(?:output|param)\b[ \t]+\w+[ \t]+)\w+\b/,lookbehind:!0,alias:"class-name"},boolean:/\b(?:true|false)\b/,keyword:/\b(?:targetScope|resource|module|param|var|output|for|in|if|existing|null)\b/,decorator:/@\w+\b/,function:/\b[a-z_]\w*(?=[ \t]*\()/i,number:/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:E[+-]?\d+)?/i,operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/,punctuation:/[{}[\];(),.:]/},Prism.languages.bicep["interpolated-string"].inside.interpolation.inside.expression.inside=Prism.languages.bicep; \ No newline at end of file +Prism.languages.bicep={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],property:[{pattern:/([\r\n][ \t]*)[a-z_]\w*(?=[ \t]*:)/i,lookbehind:!0},{pattern:/([\r\n][ \t]*)'(?:\\.|\$(?!\{)|[^'\\\r\n$])*'(?=[ \t]*:)/,lookbehind:!0,greedy:!0}],string:[{pattern:/'''[^'][\s\S]*?'''/,greedy:!0},{pattern:/(^|[^\\'])'(?:\\.|\$(?!\{)|[^'\\\r\n$])*'/,lookbehind:!0,greedy:!0}],"interpolated-string":{pattern:/(^|[^\\'])'(?:\\.|\$(?:(?!\{)|\{[^{}\r\n]*\})|[^'\\\r\n$])*'/,lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/\$\{[^{}\r\n]*\}/,inside:{expression:{pattern:/(^\$\{)[\s\S]+(?=\}$)/,lookbehind:!0},punctuation:/^\$\{|\}$/}},string:/[\s\S]+/}},datatype:{pattern:/(\b(?:output|param)\b[ \t]+\w+[ \t]+)\w+\b/,lookbehind:!0,alias:"class-name"},boolean:/\b(?:false|true)\b/,keyword:/\b(?:existing|for|if|in|module|null|output|param|resource|targetScope|var)\b/,decorator:/@\w+\b/,function:/\b[a-z_]\w*(?=[ \t]*\()/i,number:/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:E[+-]?\d+)?/i,operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/,punctuation:/[{}[\];(),.:]/},Prism.languages.bicep["interpolated-string"].inside.interpolation.inside.expression.inside=Prism.languages.bicep; \ No newline at end of file diff --git a/components/prism-birb.js b/components/prism-birb.js index 26458fc0cb..6937117d9f 100644 --- a/components/prism-birb.js +++ b/components/prism-birb.js @@ -9,7 +9,7 @@ Prism.languages.birb = Prism.languages.extend('clike', { // matches variable and function return types (parameters as well). /\b[A-Z]\w*(?=\s+\w+\s*[;,=()])/ ], - 'keyword': /\b(?:assert|break|case|class|const|default|else|enum|final|follows|for|grab|if|nest|next|new|noSeeb|return|static|switch|throw|var|void|while)\b/, + 'keyword': /\b(?:assert|break|case|class|const|default|else|enum|final|follows|for|grab|if|nest|new|next|noSeeb|return|static|switch|throw|var|void|while)\b/, 'operator': /\+\+|--|&&|\|\||<<=?|>>=?|~(?:\/=?)?|[+\-*\/%&^|=!<>]=?|\?|:/, 'variable': /\b[a-z_]\w*\b/, }); diff --git a/components/prism-birb.min.js b/components/prism-birb.min.js index d777b2b20c..660a5401f3 100644 --- a/components/prism-birb.min.js +++ b/components/prism-birb.min.js @@ -1 +1 @@ -Prism.languages.birb=Prism.languages.extend("clike",{string:{pattern:/r?("|')(?:\\.|(?!\1)[^\\])*\1/,greedy:!0},"class-name":[/\b[A-Z](?:[\d_]*[a-zA-Z]\w*)?\b/,/\b[A-Z]\w*(?=\s+\w+\s*[;,=()])/],keyword:/\b(?:assert|break|case|class|const|default|else|enum|final|follows|for|grab|if|nest|next|new|noSeeb|return|static|switch|throw|var|void|while)\b/,operator:/\+\+|--|&&|\|\||<<=?|>>=?|~(?:\/=?)?|[+\-*\/%&^|=!<>]=?|\?|:/,variable:/\b[a-z_]\w*\b/}),Prism.languages.insertBefore("birb","function",{metadata:{pattern:/<\w+>/,greedy:!0,alias:"symbol"}}); \ No newline at end of file +Prism.languages.birb=Prism.languages.extend("clike",{string:{pattern:/r?("|')(?:\\.|(?!\1)[^\\])*\1/,greedy:!0},"class-name":[/\b[A-Z](?:[\d_]*[a-zA-Z]\w*)?\b/,/\b[A-Z]\w*(?=\s+\w+\s*[;,=()])/],keyword:/\b(?:assert|break|case|class|const|default|else|enum|final|follows|for|grab|if|nest|new|next|noSeeb|return|static|switch|throw|var|void|while)\b/,operator:/\+\+|--|&&|\|\||<<=?|>>=?|~(?:\/=?)?|[+\-*\/%&^|=!<>]=?|\?|:/,variable:/\b[a-z_]\w*\b/}),Prism.languages.insertBefore("birb","function",{metadata:{pattern:/<\w+>/,greedy:!0,alias:"symbol"}}); \ No newline at end of file diff --git a/components/prism-brightscript.js b/components/prism-brightscript.js index f341f22a81..a95e8f5162 100644 --- a/components/prism-brightscript.js +++ b/components/prism-brightscript.js @@ -33,7 +33,7 @@ Prism.languages.brightscript = { lookbehind: true }, 'keyword': /\b(?:As|Dim|Each|Else|Elseif|End|Exit|For|Function|Goto|If|In|Print|Return|Step|Stop|Sub|Then|To|While)\b/i, - 'boolean': /\b(?:true|false)\b/i, + 'boolean': /\b(?:false|true)\b/i, 'function': /\b(?!\d)\w+(?=[\t ]*\()/i, 'number': /(?:\b\d+(?:\.\d+)?(?:[ed][+-]\d+)?|&h[a-f\d]+)\b[%&!#]?/i, 'operator': /--|\+\+|>>=?|<<=?|<>|[-+*/\\<>]=?|[:^=?]|\b(?:and|mod|not|or)\b/i, diff --git a/components/prism-brightscript.min.js b/components/prism-brightscript.min.js index 0dcca28c86..e47e28e3ce 100644 --- a/components/prism-brightscript.min.js +++ b/components/prism-brightscript.min.js @@ -1 +1 @@ -Prism.languages.brightscript={comment:/(?:\brem|').*/i,"directive-statement":{pattern:/(^[\t ]*)#(?:const|else(?:[\t ]+if)?|end[\t ]+if|error|if).*/im,lookbehind:!0,alias:"property",inside:{"error-message":{pattern:/(^#error).+/,lookbehind:!0},directive:{pattern:/^#(?:const|else(?:[\t ]+if)?|end[\t ]+if|error|if)/,alias:"keyword"},expression:{pattern:/[\s\S]+/,inside:null}}},property:{pattern:/([\r\n{,][\t ]*)(?:(?!\d)\w+|"(?:[^"\r\n]|"")*"(?!"))(?=[ \t]*:)/,lookbehind:!0,greedy:!0},string:{pattern:/"(?:[^"\r\n]|"")*"(?!")/,greedy:!0},"class-name":{pattern:/(\bAs[\t ]+)\w+/i,lookbehind:!0},keyword:/\b(?:As|Dim|Each|Else|Elseif|End|Exit|For|Function|Goto|If|In|Print|Return|Step|Stop|Sub|Then|To|While)\b/i,boolean:/\b(?:true|false)\b/i,function:/\b(?!\d)\w+(?=[\t ]*\()/i,number:/(?:\b\d+(?:\.\d+)?(?:[ed][+-]\d+)?|&h[a-f\d]+)\b[%&!#]?/i,operator:/--|\+\+|>>=?|<<=?|<>|[-+*/\\<>]=?|[:^=?]|\b(?:and|mod|not|or)\b/i,punctuation:/[.,;()[\]{}]/,constant:/\b(?:LINE_NUM)\b/i},Prism.languages.brightscript["directive-statement"].inside.expression.inside=Prism.languages.brightscript; \ No newline at end of file +Prism.languages.brightscript={comment:/(?:\brem|').*/i,"directive-statement":{pattern:/(^[\t ]*)#(?:const|else(?:[\t ]+if)?|end[\t ]+if|error|if).*/im,lookbehind:!0,alias:"property",inside:{"error-message":{pattern:/(^#error).+/,lookbehind:!0},directive:{pattern:/^#(?:const|else(?:[\t ]+if)?|end[\t ]+if|error|if)/,alias:"keyword"},expression:{pattern:/[\s\S]+/,inside:null}}},property:{pattern:/([\r\n{,][\t ]*)(?:(?!\d)\w+|"(?:[^"\r\n]|"")*"(?!"))(?=[ \t]*:)/,lookbehind:!0,greedy:!0},string:{pattern:/"(?:[^"\r\n]|"")*"(?!")/,greedy:!0},"class-name":{pattern:/(\bAs[\t ]+)\w+/i,lookbehind:!0},keyword:/\b(?:As|Dim|Each|Else|Elseif|End|Exit|For|Function|Goto|If|In|Print|Return|Step|Stop|Sub|Then|To|While)\b/i,boolean:/\b(?:false|true)\b/i,function:/\b(?!\d)\w+(?=[\t ]*\()/i,number:/(?:\b\d+(?:\.\d+)?(?:[ed][+-]\d+)?|&h[a-f\d]+)\b[%&!#]?/i,operator:/--|\+\+|>>=?|<<=?|<>|[-+*/\\<>]=?|[:^=?]|\b(?:and|mod|not|or)\b/i,punctuation:/[.,;()[\]{}]/,constant:/\b(?:LINE_NUM)\b/i},Prism.languages.brightscript["directive-statement"].inside.expression.inside=Prism.languages.brightscript; \ No newline at end of file diff --git a/components/prism-bro.js b/components/prism-bro.js index c7e4554bca..daa80e0552 100644 --- a/components/prism-bro.js +++ b/components/prism-bro.js @@ -4,7 +4,7 @@ Prism.languages.bro = { pattern: /(^|[^\\$])#.*/, lookbehind: true, inside: { - 'italic': /\b(?:TODO|FIXME|XXX)\b/ + 'italic': /\b(?:FIXME|TODO|XXX)\b/ } }, @@ -16,9 +16,9 @@ Prism.languages.bro = { 'boolean': /\b[TF]\b/, 'function': { - pattern: /(?:function|hook|event) \w+(?:::\w+)?/, + pattern: /(?:event|function|hook) \w+(?:::\w+)?/, inside: { - keyword: /^(?:function|hook|event)/ + keyword: /^(?:event|function|hook)/ } }, @@ -29,7 +29,7 @@ Prism.languages.bro = { } }, - 'builtin': /(?:@(?:load(?:-(?:sigs|plugin))?|unload|prefixes|ifn?def|else|(?:end)?if|DIR|FILENAME))|(?:&?(?:redef|priority|log|optional|default|add_func|delete_func|expire_func|read_expire|write_expire|create_expire|synchronized|persistent|rotate_interval|rotate_size|encrypt|raw_output|mergeable|group|error_handler|type_column))/, + 'builtin': /(?:@(?:load(?:-(?:plugin|sigs))?|unload|prefixes|ifn?def|else|(?:end)?if|DIR|FILENAME))|(?:&?(?:add_func|create_expire|default|delete_func|encrypt|error_handler|expire_func|group|log|mergeable|optional|persistent|priority|raw_output|read_expire|redef|rotate_interval|rotate_size|synchronized|type_column|write_expire))/, 'constant': { pattern: /const \w+/i, @@ -38,7 +38,7 @@ Prism.languages.bro = { } }, - 'keyword': /\b(?:break|next|continue|alarm|using|of|add|delete|export|print|return|schedule|when|timeout|addr|any|bool|count|double|enum|file|int|interval|pattern|opaque|port|record|set|string|subnet|table|time|vector|for|if|else|in|module|function)\b/, + 'keyword': /\b(?:add|addr|alarm|any|bool|break|continue|count|delete|double|else|enum|export|file|for|function|if|in|int|interval|module|next|of|opaque|pattern|port|print|record|return|schedule|set|string|subnet|table|time|timeout|using|vector|when)\b/, 'operator': /--?|\+\+?|!=?=?|<=?|>=?|==?=?|&&|\|\|?|\?|\*|\/|~|\^|%/, diff --git a/components/prism-bro.min.js b/components/prism-bro.min.js index 7689bc941e..4aecb397e0 100644 --- a/components/prism-bro.min.js +++ b/components/prism-bro.min.js @@ -1 +1 @@ -Prism.languages.bro={comment:{pattern:/(^|[^\\$])#.*/,lookbehind:!0,inside:{italic:/\b(?:TODO|FIXME|XXX)\b/}},string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},boolean:/\b[TF]\b/,function:{pattern:/(?:function|hook|event) \w+(?:::\w+)?/,inside:{keyword:/^(?:function|hook|event)/}},variable:{pattern:/(?:global|local) \w+/i,inside:{keyword:/(?:global|local)/}},builtin:/(?:@(?:load(?:-(?:sigs|plugin))?|unload|prefixes|ifn?def|else|(?:end)?if|DIR|FILENAME))|(?:&?(?:redef|priority|log|optional|default|add_func|delete_func|expire_func|read_expire|write_expire|create_expire|synchronized|persistent|rotate_interval|rotate_size|encrypt|raw_output|mergeable|group|error_handler|type_column))/,constant:{pattern:/const \w+/i,inside:{keyword:/const/}},keyword:/\b(?:break|next|continue|alarm|using|of|add|delete|export|print|return|schedule|when|timeout|addr|any|bool|count|double|enum|file|int|interval|pattern|opaque|port|record|set|string|subnet|table|time|vector|for|if|else|in|module|function)\b/,operator:/--?|\+\+?|!=?=?|<=?|>=?|==?=?|&&|\|\|?|\?|\*|\/|~|\^|%/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,punctuation:/[{}[\];(),.:]/}; \ No newline at end of file +Prism.languages.bro={comment:{pattern:/(^|[^\\$])#.*/,lookbehind:!0,inside:{italic:/\b(?:FIXME|TODO|XXX)\b/}},string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},boolean:/\b[TF]\b/,function:{pattern:/(?:event|function|hook) \w+(?:::\w+)?/,inside:{keyword:/^(?:event|function|hook)/}},variable:{pattern:/(?:global|local) \w+/i,inside:{keyword:/(?:global|local)/}},builtin:/(?:@(?:load(?:-(?:plugin|sigs))?|unload|prefixes|ifn?def|else|(?:end)?if|DIR|FILENAME))|(?:&?(?:add_func|create_expire|default|delete_func|encrypt|error_handler|expire_func|group|log|mergeable|optional|persistent|priority|raw_output|read_expire|redef|rotate_interval|rotate_size|synchronized|type_column|write_expire))/,constant:{pattern:/const \w+/i,inside:{keyword:/const/}},keyword:/\b(?:add|addr|alarm|any|bool|break|continue|count|delete|double|else|enum|export|file|for|function|if|in|int|interval|module|next|of|opaque|pattern|port|print|record|return|schedule|set|string|subnet|table|time|timeout|using|vector|when)\b/,operator:/--?|\+\+?|!=?=?|<=?|>=?|==?=?|&&|\|\|?|\?|\*|\/|~|\^|%/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,punctuation:/[{}[\];(),.:]/}; \ No newline at end of file diff --git a/components/prism-bsl.js b/components/prism-bsl.js index df216eda4e..ba3a5a9b83 100644 --- a/components/prism-bsl.js +++ b/components/prism-bsl.js @@ -26,7 +26,7 @@ Prism.languages.bsl = { }, { // EN - pattern: /\b(?:while|for|new|break|try|except|raise|else|endtry|undefined|function|var|return|endfunction|null|if|elseif|procedure|endprocedure|then|val|export|endif|in|each|true|false|to|do|enddo|execute)\b/i + pattern: /\b(?:break|do|each|else|elseif|enddo|endfunction|endif|endprocedure|endtry|except|execute|export|false|for|function|if|in|new|null|procedure|raise|return|then|to|true|try|undefined|val|var|while)\b/i } ], 'number': { @@ -42,7 +42,7 @@ Prism.languages.bsl = { }, // EN { - pattern: /\b(?:and|or|not)\b/i + pattern: /\b(?:and|not|or)\b/i } ], diff --git a/components/prism-bsl.min.js b/components/prism-bsl.min.js index a50d983304..7d5cbe8f71 100644 --- a/components/prism-bsl.min.js +++ b/components/prism-bsl.min.js @@ -1 +1 @@ -Prism.languages.bsl={comment:/\/\/.*/,string:[{pattern:/"(?:[^"]|"")*"(?!")/,greedy:!0},{pattern:/'(?:[^'\r\n\\]|\\.)*'/}],keyword:[{pattern:/(^|[^\w\u0400-\u0484\u0487-\u052f\u1d2b\u1d78\u2de0-\u2dff\ua640-\ua69f\ufe2e\ufe2f])(?:пока|для|новый|прервать|попытка|исключение|вызватьисключение|иначе|конецпопытки|неопределено|функция|перем|возврат|конецфункции|если|иначеесли|процедура|конецпроцедуры|тогда|знач|экспорт|конецесли|из|каждого|истина|ложь|по|цикл|конеццикла|выполнить)(?![\w\u0400-\u0484\u0487-\u052f\u1d2b\u1d78\u2de0-\u2dff\ua640-\ua69f\ufe2e\ufe2f])/i,lookbehind:!0},{pattern:/\b(?:while|for|new|break|try|except|raise|else|endtry|undefined|function|var|return|endfunction|null|if|elseif|procedure|endprocedure|then|val|export|endif|in|each|true|false|to|do|enddo|execute)\b/i}],number:{pattern:/(^(?=\d)|[^\w\u0400-\u0484\u0487-\u052f\u1d2b\u1d78\u2de0-\u2dff\ua640-\ua69f\ufe2e\ufe2f])(?:\d+(?:\.\d*)?|\.\d+)(?:E[+-]?\d+)?/i,lookbehind:!0},operator:[/[<>+\-*/]=?|[%=]/,{pattern:/(^|[^\w\u0400-\u0484\u0487-\u052f\u1d2b\u1d78\u2de0-\u2dff\ua640-\ua69f\ufe2e\ufe2f])(?:и|или|не)(?![\w\u0400-\u0484\u0487-\u052f\u1d2b\u1d78\u2de0-\u2dff\ua640-\ua69f\ufe2e\ufe2f])/i,lookbehind:!0},{pattern:/\b(?:and|or|not)\b/i}],punctuation:/\(\.|\.\)|[()\[\]:;,.]/,directive:[{pattern:/^(\s*)&.*/m,lookbehind:!0,alias:"important"},{pattern:/^\s*#.*/gm,alias:"important"}]},Prism.languages.oscript=Prism.languages.bsl; \ No newline at end of file +Prism.languages.bsl={comment:/\/\/.*/,string:[{pattern:/"(?:[^"]|"")*"(?!")/,greedy:!0},{pattern:/'(?:[^'\r\n\\]|\\.)*'/}],keyword:[{pattern:/(^|[^\w\u0400-\u0484\u0487-\u052f\u1d2b\u1d78\u2de0-\u2dff\ua640-\ua69f\ufe2e\ufe2f])(?:пока|для|новый|прервать|попытка|исключение|вызватьисключение|иначе|конецпопытки|неопределено|функция|перем|возврат|конецфункции|если|иначеесли|процедура|конецпроцедуры|тогда|знач|экспорт|конецесли|из|каждого|истина|ложь|по|цикл|конеццикла|выполнить)(?![\w\u0400-\u0484\u0487-\u052f\u1d2b\u1d78\u2de0-\u2dff\ua640-\ua69f\ufe2e\ufe2f])/i,lookbehind:!0},{pattern:/\b(?:break|do|each|else|elseif|enddo|endfunction|endif|endprocedure|endtry|except|execute|export|false|for|function|if|in|new|null|procedure|raise|return|then|to|true|try|undefined|val|var|while)\b/i}],number:{pattern:/(^(?=\d)|[^\w\u0400-\u0484\u0487-\u052f\u1d2b\u1d78\u2de0-\u2dff\ua640-\ua69f\ufe2e\ufe2f])(?:\d+(?:\.\d*)?|\.\d+)(?:E[+-]?\d+)?/i,lookbehind:!0},operator:[/[<>+\-*/]=?|[%=]/,{pattern:/(^|[^\w\u0400-\u0484\u0487-\u052f\u1d2b\u1d78\u2de0-\u2dff\ua640-\ua69f\ufe2e\ufe2f])(?:и|или|не)(?![\w\u0400-\u0484\u0487-\u052f\u1d2b\u1d78\u2de0-\u2dff\ua640-\ua69f\ufe2e\ufe2f])/i,lookbehind:!0},{pattern:/\b(?:and|not|or)\b/i}],punctuation:/\(\.|\.\)|[()\[\]:;,.]/,directive:[{pattern:/^(\s*)&.*/m,lookbehind:!0,alias:"important"},{pattern:/^\s*#.*/gm,alias:"important"}]},Prism.languages.oscript=Prism.languages.bsl; \ No newline at end of file diff --git a/components/prism-c.js b/components/prism-c.js index 1602d77b01..b469082937 100644 --- a/components/prism-c.js +++ b/components/prism-c.js @@ -7,7 +7,7 @@ Prism.languages.c = Prism.languages.extend('clike', { pattern: /(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/, lookbehind: true }, - 'keyword': /\b(?:__attribute__|_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|asm|typeof|inline|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|union|unsigned|void|volatile|while)\b/, + 'keyword': /\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/, 'function': /\b[a-z_]\w*(?=\s*\()/i, 'number': /(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i, 'operator': />>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/ @@ -57,7 +57,7 @@ Prism.languages.insertBefore('c', 'string', { } }, // highlight predefined macros as constants - 'constant': /\b(?:__FILE__|__LINE__|__DATE__|__TIME__|__TIMESTAMP__|__func__|EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|stdin|stdout|stderr)\b/ + 'constant': /\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/ }); delete Prism.languages.c['boolean']; diff --git a/components/prism-c.min.js b/components/prism-c.min.js index e14a2193c1..3cc5fd9a14 100644 --- a/components/prism-c.min.js +++ b/components/prism-c.min.js @@ -1 +1 @@ -Prism.languages.c=Prism.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:__attribute__|_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|asm|typeof|inline|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/}),Prism.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},Prism.languages.c.string],comment:Prism.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:Prism.languages.c}}},constant:/\b(?:__FILE__|__LINE__|__DATE__|__TIME__|__TIMESTAMP__|__func__|EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|stdin|stdout|stderr)\b/}),delete Prism.languages.c.boolean; \ No newline at end of file +Prism.languages.c=Prism.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/}),Prism.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},Prism.languages.c.string],comment:Prism.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:Prism.languages.c}}},constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/}),delete Prism.languages.c.boolean; \ No newline at end of file diff --git a/components/prism-cil.js b/components/prism-cil.js index 3c72187d8b..450a4b4028 100644 --- a/components/prism-cil.js +++ b/components/prism-cil.js @@ -16,11 +16,11 @@ Prism.languages.cil = { 'variable': /\[[\w\.]+\]/, - 'keyword': /\b(?:abstract|ansi|assembly|auto|autochar|beforefieldinit|bool|bstr|byvalstr|catch|char|cil|class|currency|date|decimal|default|enum|error|explicit|extends|extern|famandassem|family|famorassem|final(?:ly)?|float32|float64|hidebysig|iant|idispatch|implements|import|initonly|instance|u?int(?:8|16|32|64)?|interface|iunknown|literal|lpstr|lpstruct|lptstr|lpwstr|managed|method|native(?:Type)?|nested|newslot|object(?:ref)?|pinvokeimpl|private|privatescope|public|reqsecobj|rtspecialname|runtime|sealed|sequential|serializable|specialname|static|string|struct|syschar|tbstr|unicode|unmanagedexp|unsigned|value(?:type)?|variant|virtual|void)\b/, + 'keyword': /\b(?:abstract|ansi|assembly|auto|autochar|beforefieldinit|bool|bstr|byvalstr|catch|char|cil|class|currency|date|decimal|default|enum|error|explicit|extends|extern|famandassem|family|famorassem|final(?:ly)?|float32|float64|hidebysig|u?int(?:8|16|32|64)?|iant|idispatch|implements|import|initonly|instance|interface|iunknown|literal|lpstr|lpstruct|lptstr|lpwstr|managed|method|native(?:Type)?|nested|newslot|object(?:ref)?|pinvokeimpl|private|privatescope|public|reqsecobj|rtspecialname|runtime|sealed|sequential|serializable|specialname|static|string|struct|syschar|tbstr|unicode|unmanagedexp|unsigned|value(?:type)?|variant|virtual|void)\b/, - 'function': /\b(?:(?:constrained|unaligned|volatile|readonly|tail|no)\.)?(?:conv\.(?:[iu][1248]?|ovf\.[iu][1248]?(?:\.un)?|r\.un|r4|r8)|ldc\.(?:i4(?:\.[0-9]+|\.[mM]1|\.s)?|i8|r4|r8)|ldelem(?:\.[iu][1248]?|\.r[48]|\.ref|a)?|ldind\.(?:[iu][1248]?|r[48]|ref)|stelem\.?(?:i[1248]?|r[48]|ref)?|stind\.(?:i[1248]?|r[48]|ref)?|end(?:fault|filter|finally)|ldarg(?:\.[0-3s]|a(?:\.s)?)?|ldloc(?:\.[0-9]+|\.s)?|sub(?:\.ovf(?:\.un)?)?|mul(?:\.ovf(?:\.un)?)?|add(?:\.ovf(?:\.un)?)?|stloc(?:\.[0-3s])?|refany(?:type|val)|blt(?:\.un)?(?:\.s)?|ble(?:\.un)?(?:\.s)?|bgt(?:\.un)?(?:\.s)?|bge(?:\.un)?(?:\.s)?|unbox(?:\.any)?|init(?:blk|obj)|call(?:i|virt)?|brfalse(?:\.s)?|bne\.un(?:\.s)?|ldloca(?:\.s)?|brzero(?:\.s)?|brtrue(?:\.s)?|brnull(?:\.s)?|brinst(?:\.s)?|starg(?:\.s)?|leave(?:\.s)?|shr(?:\.un)?|rem(?:\.un)?|div(?:\.un)?|clt(?:\.un)?|alignment|ldvirtftn|castclass|beq(?:\.s)?|mkrefany|localloc|ckfinite|rethrow|ldtoken|ldsflda|cgt\.un|arglist|switch|stsfld|sizeof|newobj|newarr|ldsfld|ldnull|ldflda|isinst|throw|stobj|stfld|ldstr|ldobj|ldlen|ldftn|ldfld|cpobj|cpblk|break|br\.s|xor|shl|ret|pop|not|nop|neg|jmp|dup|cgt|ceq|box|and|or|br)\b/, + 'function': /\b(?:(?:constrained|no|readonly|tail|unaligned|volatile)\.)?(?:conv\.(?:[iu][1248]?|ovf\.[iu][1248]?(?:\.un)?|r\.un|r4|r8)|ldc\.(?:i4(?:\.[0-9]+|\.[mM]1|\.s)?|i8|r4|r8)|ldelem(?:\.[iu][1248]?|\.r[48]|\.ref|a)?|ldind\.(?:[iu][1248]?|r[48]|ref)|stelem\.?(?:i[1248]?|r[48]|ref)?|stind\.(?:i[1248]?|r[48]|ref)?|end(?:fault|filter|finally)|ldarg(?:\.[0-3s]|a(?:\.s)?)?|ldloc(?:\.[0-9]+|\.s)?|sub(?:\.ovf(?:\.un)?)?|mul(?:\.ovf(?:\.un)?)?|add(?:\.ovf(?:\.un)?)?|stloc(?:\.[0-3s])?|refany(?:type|val)|blt(?:\.un)?(?:\.s)?|ble(?:\.un)?(?:\.s)?|bgt(?:\.un)?(?:\.s)?|bge(?:\.un)?(?:\.s)?|unbox(?:\.any)?|init(?:blk|obj)|call(?:i|virt)?|brfalse(?:\.s)?|bne\.un(?:\.s)?|ldloca(?:\.s)?|brzero(?:\.s)?|brtrue(?:\.s)?|brnull(?:\.s)?|brinst(?:\.s)?|starg(?:\.s)?|leave(?:\.s)?|shr(?:\.un)?|rem(?:\.un)?|div(?:\.un)?|clt(?:\.un)?|alignment|castclass|ldvirtftn|beq(?:\.s)?|ckfinite|ldsflda|ldtoken|localloc|mkrefany|rethrow|cgt\.un|arglist|switch|stsfld|sizeof|newobj|newarr|ldsfld|ldnull|ldflda|isinst|throw|stobj|stfld|ldstr|ldobj|ldlen|ldftn|ldfld|cpobj|cpblk|break|br\.s|xor|shl|ret|pop|not|nop|neg|jmp|dup|cgt|ceq|box|and|or|br)\b/, - 'boolean': /\b(?:true|false)\b/, + 'boolean': /\b(?:false|true)\b/, 'number': /\b-?(?:0x[0-9a-f]+|[0-9]+)(?:\.[0-9a-f]+)?\b/i, 'punctuation': /[{}[\];(),:=]|IL_[0-9A-Za-z]+/ diff --git a/components/prism-cil.min.js b/components/prism-cil.min.js index de6db0e604..dfb904dc1f 100644 --- a/components/prism-cil.min.js +++ b/components/prism-cil.min.js @@ -1 +1 @@ -Prism.languages.cil={comment:/\/\/.*/,string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},directive:{pattern:/(^|\W)\.[a-z]+(?=\s)/,lookbehind:!0,alias:"class-name"},variable:/\[[\w\.]+\]/,keyword:/\b(?:abstract|ansi|assembly|auto|autochar|beforefieldinit|bool|bstr|byvalstr|catch|char|cil|class|currency|date|decimal|default|enum|error|explicit|extends|extern|famandassem|family|famorassem|final(?:ly)?|float32|float64|hidebysig|iant|idispatch|implements|import|initonly|instance|u?int(?:8|16|32|64)?|interface|iunknown|literal|lpstr|lpstruct|lptstr|lpwstr|managed|method|native(?:Type)?|nested|newslot|object(?:ref)?|pinvokeimpl|private|privatescope|public|reqsecobj|rtspecialname|runtime|sealed|sequential|serializable|specialname|static|string|struct|syschar|tbstr|unicode|unmanagedexp|unsigned|value(?:type)?|variant|virtual|void)\b/,function:/\b(?:(?:constrained|unaligned|volatile|readonly|tail|no)\.)?(?:conv\.(?:[iu][1248]?|ovf\.[iu][1248]?(?:\.un)?|r\.un|r4|r8)|ldc\.(?:i4(?:\.[0-9]+|\.[mM]1|\.s)?|i8|r4|r8)|ldelem(?:\.[iu][1248]?|\.r[48]|\.ref|a)?|ldind\.(?:[iu][1248]?|r[48]|ref)|stelem\.?(?:i[1248]?|r[48]|ref)?|stind\.(?:i[1248]?|r[48]|ref)?|end(?:fault|filter|finally)|ldarg(?:\.[0-3s]|a(?:\.s)?)?|ldloc(?:\.[0-9]+|\.s)?|sub(?:\.ovf(?:\.un)?)?|mul(?:\.ovf(?:\.un)?)?|add(?:\.ovf(?:\.un)?)?|stloc(?:\.[0-3s])?|refany(?:type|val)|blt(?:\.un)?(?:\.s)?|ble(?:\.un)?(?:\.s)?|bgt(?:\.un)?(?:\.s)?|bge(?:\.un)?(?:\.s)?|unbox(?:\.any)?|init(?:blk|obj)|call(?:i|virt)?|brfalse(?:\.s)?|bne\.un(?:\.s)?|ldloca(?:\.s)?|brzero(?:\.s)?|brtrue(?:\.s)?|brnull(?:\.s)?|brinst(?:\.s)?|starg(?:\.s)?|leave(?:\.s)?|shr(?:\.un)?|rem(?:\.un)?|div(?:\.un)?|clt(?:\.un)?|alignment|ldvirtftn|castclass|beq(?:\.s)?|mkrefany|localloc|ckfinite|rethrow|ldtoken|ldsflda|cgt\.un|arglist|switch|stsfld|sizeof|newobj|newarr|ldsfld|ldnull|ldflda|isinst|throw|stobj|stfld|ldstr|ldobj|ldlen|ldftn|ldfld|cpobj|cpblk|break|br\.s|xor|shl|ret|pop|not|nop|neg|jmp|dup|cgt|ceq|box|and|or|br)\b/,boolean:/\b(?:true|false)\b/,number:/\b-?(?:0x[0-9a-f]+|[0-9]+)(?:\.[0-9a-f]+)?\b/i,punctuation:/[{}[\];(),:=]|IL_[0-9A-Za-z]+/}; \ No newline at end of file +Prism.languages.cil={comment:/\/\/.*/,string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},directive:{pattern:/(^|\W)\.[a-z]+(?=\s)/,lookbehind:!0,alias:"class-name"},variable:/\[[\w\.]+\]/,keyword:/\b(?:abstract|ansi|assembly|auto|autochar|beforefieldinit|bool|bstr|byvalstr|catch|char|cil|class|currency|date|decimal|default|enum|error|explicit|extends|extern|famandassem|family|famorassem|final(?:ly)?|float32|float64|hidebysig|u?int(?:8|16|32|64)?|iant|idispatch|implements|import|initonly|instance|interface|iunknown|literal|lpstr|lpstruct|lptstr|lpwstr|managed|method|native(?:Type)?|nested|newslot|object(?:ref)?|pinvokeimpl|private|privatescope|public|reqsecobj|rtspecialname|runtime|sealed|sequential|serializable|specialname|static|string|struct|syschar|tbstr|unicode|unmanagedexp|unsigned|value(?:type)?|variant|virtual|void)\b/,function:/\b(?:(?:constrained|no|readonly|tail|unaligned|volatile)\.)?(?:conv\.(?:[iu][1248]?|ovf\.[iu][1248]?(?:\.un)?|r\.un|r4|r8)|ldc\.(?:i4(?:\.[0-9]+|\.[mM]1|\.s)?|i8|r4|r8)|ldelem(?:\.[iu][1248]?|\.r[48]|\.ref|a)?|ldind\.(?:[iu][1248]?|r[48]|ref)|stelem\.?(?:i[1248]?|r[48]|ref)?|stind\.(?:i[1248]?|r[48]|ref)?|end(?:fault|filter|finally)|ldarg(?:\.[0-3s]|a(?:\.s)?)?|ldloc(?:\.[0-9]+|\.s)?|sub(?:\.ovf(?:\.un)?)?|mul(?:\.ovf(?:\.un)?)?|add(?:\.ovf(?:\.un)?)?|stloc(?:\.[0-3s])?|refany(?:type|val)|blt(?:\.un)?(?:\.s)?|ble(?:\.un)?(?:\.s)?|bgt(?:\.un)?(?:\.s)?|bge(?:\.un)?(?:\.s)?|unbox(?:\.any)?|init(?:blk|obj)|call(?:i|virt)?|brfalse(?:\.s)?|bne\.un(?:\.s)?|ldloca(?:\.s)?|brzero(?:\.s)?|brtrue(?:\.s)?|brnull(?:\.s)?|brinst(?:\.s)?|starg(?:\.s)?|leave(?:\.s)?|shr(?:\.un)?|rem(?:\.un)?|div(?:\.un)?|clt(?:\.un)?|alignment|castclass|ldvirtftn|beq(?:\.s)?|ckfinite|ldsflda|ldtoken|localloc|mkrefany|rethrow|cgt\.un|arglist|switch|stsfld|sizeof|newobj|newarr|ldsfld|ldnull|ldflda|isinst|throw|stobj|stfld|ldstr|ldobj|ldlen|ldftn|ldfld|cpobj|cpblk|break|br\.s|xor|shl|ret|pop|not|nop|neg|jmp|dup|cgt|ceq|box|and|or|br)\b/,boolean:/\b(?:false|true)\b/,number:/\b-?(?:0x[0-9a-f]+|[0-9]+)(?:\.[0-9a-f]+)?\b/i,punctuation:/[{}[\];(),:=]|IL_[0-9A-Za-z]+/}; \ No newline at end of file diff --git a/components/prism-clike.js b/components/prism-clike.js index 66073afd5d..8c5d96a194 100644 --- a/components/prism-clike.js +++ b/components/prism-clike.js @@ -16,14 +16,14 @@ Prism.languages.clike = { greedy: true }, 'class-name': { - pattern: /(\b(?:class|interface|extends|implements|trait|instanceof|new)\s+|\bcatch\s+\()[\w.\\]+/i, + pattern: /(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i, lookbehind: true, inside: { 'punctuation': /[.\\]/ } }, - 'keyword': /\b(?:if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/, - 'boolean': /\b(?:true|false)\b/, + 'keyword': /\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/, + 'boolean': /\b(?:false|true)\b/, 'function': /\b\w+(?=\()/, 'number': /\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i, 'operator': /[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/, diff --git a/components/prism-clike.min.js b/components/prism-clike.min.js index 69459fc068..adfb9eca7a 100644 --- a/components/prism-clike.min.js +++ b/components/prism-clike.min.js @@ -1 +1 @@ -Prism.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|interface|extends|implements|trait|instanceof|new)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/,boolean:/\b(?:true|false)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/}; \ No newline at end of file +Prism.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/}; \ No newline at end of file diff --git a/components/prism-clojure.js b/components/prism-clojure.js index 7077e78a02..4d00125e25 100644 --- a/components/prism-clojure.js +++ b/components/prism-clojure.js @@ -20,7 +20,7 @@ Prism.languages.clojure = { pattern: /(\()(?:-|->|->>|\.|\.\.|\*|\/|\+|<|<=|=|==|>|>=|accessor|agent|agent-errors|aget|alength|all-ns|alter|and|append-child|apply|array-map|aset|aset-boolean|aset-byte|aset-char|aset-double|aset-float|aset-int|aset-long|aset-short|assert|assoc|await|await-for|bean|binding|bit-and|bit-not|bit-or|bit-shift-left|bit-shift-right|bit-xor|boolean|branch\?|butlast|byte|cast|char|children|class|clear-agent-errors|comment|commute|comp|comparator|complement|concat|cond|conj|cons|constantly|construct-proxy|contains\?|count|create-ns|create-struct|cycle|dec|declare|def|def-|definline|definterface|defmacro|defmethod|defmulti|defn|defn-|defonce|defproject|defprotocol|defrecord|defstruct|deftype|deref|difference|disj|dissoc|distinct|do|doall|doc|dorun|doseq|dosync|dotimes|doto|double|down|drop|drop-while|edit|end\?|ensure|eval|every\?|false\?|ffirst|file-seq|filter|find|find-doc|find-ns|find-var|first|float|flush|fn|fnseq|for|frest|gensym|get|get-proxy-class|hash-map|hash-set|identical\?|identity|if|if-let|if-not|import|in-ns|inc|index|insert-child|insert-left|insert-right|inspect-table|inspect-tree|instance\?|int|interleave|intersection|into|into-array|iterate|join|key|keys|keyword|keyword\?|last|lazy-cat|lazy-cons|left|lefts|let|line-seq|list|list\*|load|load-file|locking|long|loop|macroexpand|macroexpand-1|make-array|make-node|map|map-invert|map\?|mapcat|max|max-key|memfn|merge|merge-with|meta|min|min-key|monitor-enter|name|namespace|neg\?|new|newline|next|nil\?|node|not|not-any\?|not-every\?|not=|ns|ns-imports|ns-interns|ns-map|ns-name|ns-publics|ns-refers|ns-resolve|ns-unmap|nth|nthrest|or|parse|partial|path|peek|pop|pos\?|pr|pr-str|print|print-str|println|println-str|prn|prn-str|project|proxy|proxy-mappings|quot|quote|rand|rand-int|range|re-find|re-groups|re-matcher|re-matches|re-pattern|re-seq|read|read-line|recur|reduce|ref|ref-set|refer|rem|remove|remove-method|remove-ns|rename|rename-keys|repeat|replace|replicate|resolve|rest|resultset-seq|reverse|rfirst|right|rights|root|rrest|rseq|second|select|select-keys|send|send-off|seq|seq-zip|seq\?|set|set!|short|slurp|some|sort|sort-by|sorted-map|sorted-map-by|sorted-set|special-symbol\?|split-at|split-with|str|string\?|struct|struct-map|subs|subvec|symbol|symbol\?|sync|take|take-nth|take-while|test|throw|time|to-array|to-array-2d|tree-seq|true\?|try|union|up|update-proxy|val|vals|var|var-get|var-set|var\?|vector|vector-zip|vector\?|when|when-first|when-let|when-not|with-local-vars|with-meta|with-open|with-out-str|xml-seq|xml-zip|zero\?|zipmap|zipper)(?=[\s)]|$)/, lookbehind: true }, - 'boolean': /\b(?:true|false|nil)\b/, + 'boolean': /\b(?:false|nil|true)\b/, 'number': { pattern: /(^|[^\w$@])(?:\d+(?:[/.]\d+)?(?:e[+-]?\d+)?|0x[a-f0-9]+|[1-9]\d?r[a-z0-9]+)[lmn]?(?![\w$@])/i, lookbehind: true diff --git a/components/prism-clojure.min.js b/components/prism-clojure.min.js index 2437df95e0..1945388184 100644 --- a/components/prism-clojure.min.js +++ b/components/prism-clojure.min.js @@ -1 +1 @@ -Prism.languages.clojure={comment:{pattern:/;.*/,greedy:!0},string:[{pattern:/"(?:[^"\\]|\\.)*"/,greedy:!0},/\\\w+/],symbol:{pattern:/(^|[\s()\[\]{},])::?[\w*+!?'<>=/.-]+/,lookbehind:!0},keyword:{pattern:/(\()(?:-|->|->>|\.|\.\.|\*|\/|\+|<|<=|=|==|>|>=|accessor|agent|agent-errors|aget|alength|all-ns|alter|and|append-child|apply|array-map|aset|aset-boolean|aset-byte|aset-char|aset-double|aset-float|aset-int|aset-long|aset-short|assert|assoc|await|await-for|bean|binding|bit-and|bit-not|bit-or|bit-shift-left|bit-shift-right|bit-xor|boolean|branch\?|butlast|byte|cast|char|children|class|clear-agent-errors|comment|commute|comp|comparator|complement|concat|cond|conj|cons|constantly|construct-proxy|contains\?|count|create-ns|create-struct|cycle|dec|declare|def|def-|definline|definterface|defmacro|defmethod|defmulti|defn|defn-|defonce|defproject|defprotocol|defrecord|defstruct|deftype|deref|difference|disj|dissoc|distinct|do|doall|doc|dorun|doseq|dosync|dotimes|doto|double|down|drop|drop-while|edit|end\?|ensure|eval|every\?|false\?|ffirst|file-seq|filter|find|find-doc|find-ns|find-var|first|float|flush|fn|fnseq|for|frest|gensym|get|get-proxy-class|hash-map|hash-set|identical\?|identity|if|if-let|if-not|import|in-ns|inc|index|insert-child|insert-left|insert-right|inspect-table|inspect-tree|instance\?|int|interleave|intersection|into|into-array|iterate|join|key|keys|keyword|keyword\?|last|lazy-cat|lazy-cons|left|lefts|let|line-seq|list|list\*|load|load-file|locking|long|loop|macroexpand|macroexpand-1|make-array|make-node|map|map-invert|map\?|mapcat|max|max-key|memfn|merge|merge-with|meta|min|min-key|monitor-enter|name|namespace|neg\?|new|newline|next|nil\?|node|not|not-any\?|not-every\?|not=|ns|ns-imports|ns-interns|ns-map|ns-name|ns-publics|ns-refers|ns-resolve|ns-unmap|nth|nthrest|or|parse|partial|path|peek|pop|pos\?|pr|pr-str|print|print-str|println|println-str|prn|prn-str|project|proxy|proxy-mappings|quot|quote|rand|rand-int|range|re-find|re-groups|re-matcher|re-matches|re-pattern|re-seq|read|read-line|recur|reduce|ref|ref-set|refer|rem|remove|remove-method|remove-ns|rename|rename-keys|repeat|replace|replicate|resolve|rest|resultset-seq|reverse|rfirst|right|rights|root|rrest|rseq|second|select|select-keys|send|send-off|seq|seq-zip|seq\?|set|set!|short|slurp|some|sort|sort-by|sorted-map|sorted-map-by|sorted-set|special-symbol\?|split-at|split-with|str|string\?|struct|struct-map|subs|subvec|symbol|symbol\?|sync|take|take-nth|take-while|test|throw|time|to-array|to-array-2d|tree-seq|true\?|try|union|up|update-proxy|val|vals|var|var-get|var-set|var\?|vector|vector-zip|vector\?|when|when-first|when-let|when-not|with-local-vars|with-meta|with-open|with-out-str|xml-seq|xml-zip|zero\?|zipmap|zipper)(?=[\s)]|$)/,lookbehind:!0},boolean:/\b(?:true|false|nil)\b/,number:{pattern:/(^|[^\w$@])(?:\d+(?:[/.]\d+)?(?:e[+-]?\d+)?|0x[a-f0-9]+|[1-9]\d?r[a-z0-9]+)[lmn]?(?![\w$@])/i,lookbehind:!0},function:{pattern:/((?:^|[^'])\()[\w*+!?'<>=/.-]+(?=[\s)]|$)/,lookbehind:!0},operator:/[#@^`~]/,punctuation:/[{}\[\](),]/}; \ No newline at end of file +Prism.languages.clojure={comment:{pattern:/;.*/,greedy:!0},string:[{pattern:/"(?:[^"\\]|\\.)*"/,greedy:!0},/\\\w+/],symbol:{pattern:/(^|[\s()\[\]{},])::?[\w*+!?'<>=/.-]+/,lookbehind:!0},keyword:{pattern:/(\()(?:-|->|->>|\.|\.\.|\*|\/|\+|<|<=|=|==|>|>=|accessor|agent|agent-errors|aget|alength|all-ns|alter|and|append-child|apply|array-map|aset|aset-boolean|aset-byte|aset-char|aset-double|aset-float|aset-int|aset-long|aset-short|assert|assoc|await|await-for|bean|binding|bit-and|bit-not|bit-or|bit-shift-left|bit-shift-right|bit-xor|boolean|branch\?|butlast|byte|cast|char|children|class|clear-agent-errors|comment|commute|comp|comparator|complement|concat|cond|conj|cons|constantly|construct-proxy|contains\?|count|create-ns|create-struct|cycle|dec|declare|def|def-|definline|definterface|defmacro|defmethod|defmulti|defn|defn-|defonce|defproject|defprotocol|defrecord|defstruct|deftype|deref|difference|disj|dissoc|distinct|do|doall|doc|dorun|doseq|dosync|dotimes|doto|double|down|drop|drop-while|edit|end\?|ensure|eval|every\?|false\?|ffirst|file-seq|filter|find|find-doc|find-ns|find-var|first|float|flush|fn|fnseq|for|frest|gensym|get|get-proxy-class|hash-map|hash-set|identical\?|identity|if|if-let|if-not|import|in-ns|inc|index|insert-child|insert-left|insert-right|inspect-table|inspect-tree|instance\?|int|interleave|intersection|into|into-array|iterate|join|key|keys|keyword|keyword\?|last|lazy-cat|lazy-cons|left|lefts|let|line-seq|list|list\*|load|load-file|locking|long|loop|macroexpand|macroexpand-1|make-array|make-node|map|map-invert|map\?|mapcat|max|max-key|memfn|merge|merge-with|meta|min|min-key|monitor-enter|name|namespace|neg\?|new|newline|next|nil\?|node|not|not-any\?|not-every\?|not=|ns|ns-imports|ns-interns|ns-map|ns-name|ns-publics|ns-refers|ns-resolve|ns-unmap|nth|nthrest|or|parse|partial|path|peek|pop|pos\?|pr|pr-str|print|print-str|println|println-str|prn|prn-str|project|proxy|proxy-mappings|quot|quote|rand|rand-int|range|re-find|re-groups|re-matcher|re-matches|re-pattern|re-seq|read|read-line|recur|reduce|ref|ref-set|refer|rem|remove|remove-method|remove-ns|rename|rename-keys|repeat|replace|replicate|resolve|rest|resultset-seq|reverse|rfirst|right|rights|root|rrest|rseq|second|select|select-keys|send|send-off|seq|seq-zip|seq\?|set|set!|short|slurp|some|sort|sort-by|sorted-map|sorted-map-by|sorted-set|special-symbol\?|split-at|split-with|str|string\?|struct|struct-map|subs|subvec|symbol|symbol\?|sync|take|take-nth|take-while|test|throw|time|to-array|to-array-2d|tree-seq|true\?|try|union|up|update-proxy|val|vals|var|var-get|var-set|var\?|vector|vector-zip|vector\?|when|when-first|when-let|when-not|with-local-vars|with-meta|with-open|with-out-str|xml-seq|xml-zip|zero\?|zipmap|zipper)(?=[\s)]|$)/,lookbehind:!0},boolean:/\b(?:false|nil|true)\b/,number:{pattern:/(^|[^\w$@])(?:\d+(?:[/.]\d+)?(?:e[+-]?\d+)?|0x[a-f0-9]+|[1-9]\d?r[a-z0-9]+)[lmn]?(?![\w$@])/i,lookbehind:!0},function:{pattern:/((?:^|[^'])\()[\w*+!?'<>=/.-]+(?=[\s)]|$)/,lookbehind:!0},operator:/[#@^`~]/,punctuation:/[{}\[\](),]/}; \ No newline at end of file diff --git a/components/prism-cmake.js b/components/prism-cmake.js index 6092ec0f0d..464705bba7 100644 --- a/components/prism-cmake.js +++ b/components/prism-cmake.js @@ -13,12 +13,12 @@ Prism.languages.cmake = { } } }, - 'variable': /\b(?:CMAKE_\w+|\w+_(?:VERSION(?:_MAJOR|_MINOR|_PATCH|_TWEAK)?|(?:BINARY|SOURCE)_DIR|DESCRIPTION|HOMEPAGE_URL|ROOT)|(?:ANDROID|APPLE|BORLAND|BUILD_SHARED_LIBS|CACHE|CPACK_(?:ABSOLUTE_DESTINATION_FILES|COMPONENT_INCLUDE_TOPLEVEL_DIRECTORY|ERROR_ON_ABSOLUTE_INSTALL_DESTINATION|INCLUDE_TOPLEVEL_DIRECTORY|INSTALL_DEFAULT_DIRECTORY_PERMISSIONS|INSTALL_SCRIPT|PACKAGING_INSTALL_PREFIX|SET_DESTDIR|WARN_ON_ABSOLUTE_INSTALL_DESTINATION)|CTEST_(?:BINARY_DIRECTORY|BUILD_COMMAND|BUILD_NAME|BZR_COMMAND|BZR_UPDATE_OPTIONS|CHANGE_ID|CHECKOUT_COMMAND|CONFIGURATION_TYPE|CONFIGURE_COMMAND|COVERAGE_COMMAND|COVERAGE_EXTRA_FLAGS|CURL_OPTIONS|CUSTOM_(?:COVERAGE_EXCLUDE|ERROR_EXCEPTION|ERROR_MATCH|ERROR_POST_CONTEXT|ERROR_PRE_CONTEXT|MAXIMUM_FAILED_TEST_OUTPUT_SIZE|MAXIMUM_NUMBER_OF_(?:ERRORS|WARNINGS)|MAXIMUM_PASSED_TEST_OUTPUT_SIZE|MEMCHECK_IGNORE|POST_MEMCHECK|POST_TEST|PRE_MEMCHECK|PRE_TEST|TESTS_IGNORE|WARNING_EXCEPTION|WARNING_MATCH)|CVS_CHECKOUT|CVS_COMMAND|CVS_UPDATE_OPTIONS|DROP_LOCATION|DROP_METHOD|DROP_SITE|DROP_SITE_CDASH|DROP_SITE_PASSWORD|DROP_SITE_USER|EXTRA_COVERAGE_GLOB|GIT_COMMAND|GIT_INIT_SUBMODULES|GIT_UPDATE_CUSTOM|GIT_UPDATE_OPTIONS|HG_COMMAND|HG_UPDATE_OPTIONS|LABELS_FOR_SUBPROJECTS|MEMORYCHECK_(?:COMMAND|COMMAND_OPTIONS|SANITIZER_OPTIONS|SUPPRESSIONS_FILE|TYPE)|NIGHTLY_START_TIME|P4_CLIENT|P4_COMMAND|P4_OPTIONS|P4_UPDATE_OPTIONS|RUN_CURRENT_SCRIPT|SCP_COMMAND|SITE|SOURCE_DIRECTORY|SUBMIT_URL|SVN_COMMAND|SVN_OPTIONS|SVN_UPDATE_OPTIONS|TEST_LOAD|TEST_TIMEOUT|TRIGGER_SITE|UPDATE_COMMAND|UPDATE_OPTIONS|UPDATE_VERSION_ONLY|USE_LAUNCHERS)|CYGWIN|ENV|EXECUTABLE_OUTPUT_PATH|GHS-MULTI|IOS|LIBRARY_OUTPUT_PATH|MINGW|MSVC(?:10|11|12|14|60|70|71|80|90|_IDE|_TOOLSET_VERSION|_VERSION)?|MSYS|PROJECT_(?:BINARY_DIR|DESCRIPTION|HOMEPAGE_URL|NAME|SOURCE_DIR|VERSION|VERSION_(?:MAJOR|MINOR|PATCH|TWEAK))|UNIX|WIN32|WINCE|WINDOWS_PHONE|WINDOWS_STORE|XCODE|XCODE_VERSION))\b/, + 'variable': /\b(?:CMAKE_\w+|\w+_(?:(?:BINARY|SOURCE)_DIR|DESCRIPTION|HOMEPAGE_URL|ROOT|VERSION(?:_MAJOR|_MINOR|_PATCH|_TWEAK)?)|(?:ANDROID|APPLE|BORLAND|BUILD_SHARED_LIBS|CACHE|CPACK_(?:ABSOLUTE_DESTINATION_FILES|COMPONENT_INCLUDE_TOPLEVEL_DIRECTORY|ERROR_ON_ABSOLUTE_INSTALL_DESTINATION|INCLUDE_TOPLEVEL_DIRECTORY|INSTALL_DEFAULT_DIRECTORY_PERMISSIONS|INSTALL_SCRIPT|PACKAGING_INSTALL_PREFIX|SET_DESTDIR|WARN_ON_ABSOLUTE_INSTALL_DESTINATION)|CTEST_(?:BINARY_DIRECTORY|BUILD_COMMAND|BUILD_NAME|BZR_COMMAND|BZR_UPDATE_OPTIONS|CHANGE_ID|CHECKOUT_COMMAND|CONFIGURATION_TYPE|CONFIGURE_COMMAND|COVERAGE_COMMAND|COVERAGE_EXTRA_FLAGS|CURL_OPTIONS|CUSTOM_(?:COVERAGE_EXCLUDE|ERROR_EXCEPTION|ERROR_MATCH|ERROR_POST_CONTEXT|ERROR_PRE_CONTEXT|MAXIMUM_FAILED_TEST_OUTPUT_SIZE|MAXIMUM_NUMBER_OF_(?:ERRORS|WARNINGS)|MAXIMUM_PASSED_TEST_OUTPUT_SIZE|MEMCHECK_IGNORE|POST_MEMCHECK|POST_TEST|PRE_MEMCHECK|PRE_TEST|TESTS_IGNORE|WARNING_EXCEPTION|WARNING_MATCH)|CVS_CHECKOUT|CVS_COMMAND|CVS_UPDATE_OPTIONS|DROP_LOCATION|DROP_METHOD|DROP_SITE|DROP_SITE_CDASH|DROP_SITE_PASSWORD|DROP_SITE_USER|EXTRA_COVERAGE_GLOB|GIT_COMMAND|GIT_INIT_SUBMODULES|GIT_UPDATE_CUSTOM|GIT_UPDATE_OPTIONS|HG_COMMAND|HG_UPDATE_OPTIONS|LABELS_FOR_SUBPROJECTS|MEMORYCHECK_(?:COMMAND|COMMAND_OPTIONS|SANITIZER_OPTIONS|SUPPRESSIONS_FILE|TYPE)|NIGHTLY_START_TIME|P4_CLIENT|P4_COMMAND|P4_OPTIONS|P4_UPDATE_OPTIONS|RUN_CURRENT_SCRIPT|SCP_COMMAND|SITE|SOURCE_DIRECTORY|SUBMIT_URL|SVN_COMMAND|SVN_OPTIONS|SVN_UPDATE_OPTIONS|TEST_LOAD|TEST_TIMEOUT|TRIGGER_SITE|UPDATE_COMMAND|UPDATE_OPTIONS|UPDATE_VERSION_ONLY|USE_LAUNCHERS)|CYGWIN|ENV|EXECUTABLE_OUTPUT_PATH|GHS-MULTI|IOS|LIBRARY_OUTPUT_PATH|MINGW|MSVC(?:10|11|12|14|60|70|71|80|90|_IDE|_TOOLSET_VERSION|_VERSION)?|MSYS|PROJECT_(?:BINARY_DIR|DESCRIPTION|HOMEPAGE_URL|NAME|SOURCE_DIR|VERSION|VERSION_(?:MAJOR|MINOR|PATCH|TWEAK))|UNIX|WIN32|WINCE|WINDOWS_PHONE|WINDOWS_STORE|XCODE|XCODE_VERSION))\b/, 'property': /\b(?:cxx_\w+|(?:ARCHIVE_OUTPUT_(?:DIRECTORY|NAME)|COMPILE_DEFINITIONS|COMPILE_PDB_NAME|COMPILE_PDB_OUTPUT_DIRECTORY|EXCLUDE_FROM_DEFAULT_BUILD|IMPORTED_(?:IMPLIB|LIBNAME|LINK_DEPENDENT_LIBRARIES|LINK_INTERFACE_LANGUAGES|LINK_INTERFACE_LIBRARIES|LINK_INTERFACE_MULTIPLICITY|LOCATION|NO_SONAME|OBJECTS|SONAME)|INTERPROCEDURAL_OPTIMIZATION|LIBRARY_OUTPUT_DIRECTORY|LIBRARY_OUTPUT_NAME|LINK_FLAGS|LINK_INTERFACE_LIBRARIES|LINK_INTERFACE_MULTIPLICITY|LOCATION|MAP_IMPORTED_CONFIG|OSX_ARCHITECTURES|OUTPUT_NAME|PDB_NAME|PDB_OUTPUT_DIRECTORY|RUNTIME_OUTPUT_DIRECTORY|RUNTIME_OUTPUT_NAME|STATIC_LIBRARY_FLAGS|VS_CSHARP|VS_DOTNET_REFERENCEPROP|VS_DOTNET_REFERENCE|VS_GLOBAL_SECTION_POST|VS_GLOBAL_SECTION_PRE|VS_GLOBAL|XCODE_ATTRIBUTE)_\w+|\w+_(?:CLANG_TIDY|COMPILER_LAUNCHER|CPPCHECK|CPPLINT|INCLUDE_WHAT_YOU_USE|OUTPUT_NAME|POSTFIX|VISIBILITY_PRESET)|ABSTRACT|ADDITIONAL_MAKE_CLEAN_FILES|ADVANCED|ALIASED_TARGET|ALLOW_DUPLICATE_CUSTOM_TARGETS|ANDROID_(?:ANT_ADDITIONAL_OPTIONS|API|API_MIN|ARCH|ASSETS_DIRECTORIES|GUI|JAR_DEPENDENCIES|NATIVE_LIB_DEPENDENCIES|NATIVE_LIB_DIRECTORIES|PROCESS_MAX|PROGUARD|PROGUARD_CONFIG_PATH|SECURE_PROPS_PATH|SKIP_ANT_STEP|STL_TYPE)|ARCHIVE_OUTPUT_DIRECTORY|ATTACHED_FILES|ATTACHED_FILES_ON_FAIL|AUTOGEN_(?:BUILD_DIR|ORIGIN_DEPENDS|PARALLEL|SOURCE_GROUP|TARGETS_FOLDER|TARGET_DEPENDS)|AUTOMOC|AUTOMOC_(?:COMPILER_PREDEFINES|DEPEND_FILTERS|EXECUTABLE|MACRO_NAMES|MOC_OPTIONS|SOURCE_GROUP|TARGETS_FOLDER)|AUTORCC|AUTORCC_EXECUTABLE|AUTORCC_OPTIONS|AUTORCC_SOURCE_GROUP|AUTOUIC|AUTOUIC_EXECUTABLE|AUTOUIC_OPTIONS|AUTOUIC_SEARCH_PATHS|BINARY_DIR|BUILDSYSTEM_TARGETS|BUILD_RPATH|BUILD_RPATH_USE_ORIGIN|BUILD_WITH_INSTALL_NAME_DIR|BUILD_WITH_INSTALL_RPATH|BUNDLE|BUNDLE_EXTENSION|CACHE_VARIABLES|CLEAN_NO_CUSTOM|COMMON_LANGUAGE_RUNTIME|COMPATIBLE_INTERFACE_(?:BOOL|NUMBER_MAX|NUMBER_MIN|STRING)|COMPILE_(?:DEFINITIONS|FEATURES|FLAGS|OPTIONS|PDB_NAME|PDB_OUTPUT_DIRECTORY)|COST|CPACK_DESKTOP_SHORTCUTS|CPACK_NEVER_OVERWRITE|CPACK_PERMANENT|CPACK_STARTUP_SHORTCUTS|CPACK_START_MENU_SHORTCUTS|CPACK_WIX_ACL|CROSSCOMPILING_EMULATOR|CUDA_EXTENSIONS|CUDA_PTX_COMPILATION|CUDA_RESOLVE_DEVICE_SYMBOLS|CUDA_SEPARABLE_COMPILATION|CUDA_STANDARD|CUDA_STANDARD_REQUIRED|CXX_EXTENSIONS|CXX_STANDARD|CXX_STANDARD_REQUIRED|C_EXTENSIONS|C_STANDARD|C_STANDARD_REQUIRED|DEBUG_CONFIGURATIONS|DEFINE_SYMBOL|DEFINITIONS|DEPENDS|DEPLOYMENT_ADDITIONAL_FILES|DEPLOYMENT_REMOTE_DIRECTORY|DISABLED|DISABLED_FEATURES|ECLIPSE_EXTRA_CPROJECT_CONTENTS|ECLIPSE_EXTRA_NATURES|ENABLED_FEATURES|ENABLED_LANGUAGES|ENABLE_EXPORTS|ENVIRONMENT|EXCLUDE_FROM_ALL|EXCLUDE_FROM_DEFAULT_BUILD|EXPORT_NAME|EXPORT_PROPERTIES|EXTERNAL_OBJECT|EchoString|FAIL_REGULAR_EXPRESSION|FIND_LIBRARY_USE_LIB32_PATHS|FIND_LIBRARY_USE_LIB64_PATHS|FIND_LIBRARY_USE_LIBX32_PATHS|FIND_LIBRARY_USE_OPENBSD_VERSIONING|FIXTURES_CLEANUP|FIXTURES_REQUIRED|FIXTURES_SETUP|FOLDER|FRAMEWORK|Fortran_FORMAT|Fortran_MODULE_DIRECTORY|GENERATED|GENERATOR_FILE_NAME|GENERATOR_IS_MULTI_CONFIG|GHS_INTEGRITY_APP|GHS_NO_SOURCE_GROUP_FILE|GLOBAL_DEPENDS_DEBUG_MODE|GLOBAL_DEPENDS_NO_CYCLES|GNUtoMS|HAS_CXX|HEADER_FILE_ONLY|HELPSTRING|IMPLICIT_DEPENDS_INCLUDE_TRANSFORM|IMPORTED|IMPORTED_(?:COMMON_LANGUAGE_RUNTIME|CONFIGURATIONS|GLOBAL|IMPLIB|LIBNAME|LINK_DEPENDENT_LIBRARIES|LINK_INTERFACE_(?:LANGUAGES|LIBRARIES|MULTIPLICITY)|LOCATION|NO_SONAME|OBJECTS|SONAME)|IMPORT_PREFIX|IMPORT_SUFFIX|INCLUDE_DIRECTORIES|INCLUDE_REGULAR_EXPRESSION|INSTALL_NAME_DIR|INSTALL_RPATH|INSTALL_RPATH_USE_LINK_PATH|INTERFACE_(?:AUTOUIC_OPTIONS|COMPILE_DEFINITIONS|COMPILE_FEATURES|COMPILE_OPTIONS|INCLUDE_DIRECTORIES|LINK_DEPENDS|LINK_DIRECTORIES|LINK_LIBRARIES|LINK_OPTIONS|POSITION_INDEPENDENT_CODE|SOURCES|SYSTEM_INCLUDE_DIRECTORIES)|INTERPROCEDURAL_OPTIMIZATION|IN_TRY_COMPILE|IOS_INSTALL_COMBINED|JOB_POOLS|JOB_POOL_COMPILE|JOB_POOL_LINK|KEEP_EXTENSION|LABELS|LANGUAGE|LIBRARY_OUTPUT_DIRECTORY|LINKER_LANGUAGE|LINK_(?:DEPENDS|DEPENDS_NO_SHARED|DIRECTORIES|FLAGS|INTERFACE_LIBRARIES|INTERFACE_MULTIPLICITY|LIBRARIES|OPTIONS|SEARCH_END_STATIC|SEARCH_START_STATIC|WHAT_YOU_USE)|LISTFILE_STACK|LOCATION|MACOSX_BUNDLE|MACOSX_BUNDLE_INFO_PLIST|MACOSX_FRAMEWORK_INFO_PLIST|MACOSX_PACKAGE_LOCATION|MACOSX_RPATH|MACROS|MANUALLY_ADDED_DEPENDENCIES|MEASUREMENT|MODIFIED|NAME|NO_SONAME|NO_SYSTEM_FROM_IMPORTED|OBJECT_DEPENDS|OBJECT_OUTPUTS|OSX_ARCHITECTURES|OUTPUT_NAME|PACKAGES_FOUND|PACKAGES_NOT_FOUND|PARENT_DIRECTORY|PASS_REGULAR_EXPRESSION|PDB_NAME|PDB_OUTPUT_DIRECTORY|POSITION_INDEPENDENT_CODE|POST_INSTALL_SCRIPT|PREDEFINED_TARGETS_FOLDER|PREFIX|PRE_INSTALL_SCRIPT|PRIVATE_HEADER|PROCESSORS|PROCESSOR_AFFINITY|PROJECT_LABEL|PUBLIC_HEADER|REPORT_UNDEFINED_PROPERTIES|REQUIRED_FILES|RESOURCE|RESOURCE_LOCK|RULE_LAUNCH_COMPILE|RULE_LAUNCH_CUSTOM|RULE_LAUNCH_LINK|RULE_MESSAGES|RUNTIME_OUTPUT_DIRECTORY|RUN_SERIAL|SKIP_AUTOGEN|SKIP_AUTOMOC|SKIP_AUTORCC|SKIP_AUTOUIC|SKIP_BUILD_RPATH|SKIP_RETURN_CODE|SOURCES|SOURCE_DIR|SOVERSION|STATIC_LIBRARY_FLAGS|STATIC_LIBRARY_OPTIONS|STRINGS|SUBDIRECTORIES|SUFFIX|SYMBOLIC|TARGET_ARCHIVES_MAY_BE_SHARED_LIBS|TARGET_MESSAGES|TARGET_SUPPORTS_SHARED_LIBS|TESTS|TEST_INCLUDE_FILE|TEST_INCLUDE_FILES|TIMEOUT|TIMEOUT_AFTER_MATCH|TYPE|USE_FOLDERS|VALUE|VARIABLES|VERSION|VISIBILITY_INLINES_HIDDEN|VS_(?:CONFIGURATION_TYPE|COPY_TO_OUT_DIR|DEBUGGER_(?:COMMAND|COMMAND_ARGUMENTS|ENVIRONMENT|WORKING_DIRECTORY)|DEPLOYMENT_CONTENT|DEPLOYMENT_LOCATION|DOTNET_REFERENCES|DOTNET_REFERENCES_COPY_LOCAL|GLOBAL_KEYWORD|GLOBAL_PROJECT_TYPES|GLOBAL_ROOTNAMESPACE|INCLUDE_IN_VSIX|IOT_STARTUP_TASK|KEYWORD|RESOURCE_GENERATOR|SCC_AUXPATH|SCC_LOCALPATH|SCC_PROJECTNAME|SCC_PROVIDER|SDK_REFERENCES|SHADER_(?:DISABLE_OPTIMIZATIONS|ENABLE_DEBUG|ENTRYPOINT|FLAGS|MODEL|OBJECT_FILE_NAME|OUTPUT_HEADER_FILE|TYPE|VARIABLE_NAME)|STARTUP_PROJECT|TOOL_OVERRIDE|USER_PROPS|WINRT_COMPONENT|WINRT_EXTENSIONS|WINRT_REFERENCES|XAML_TYPE)|WILL_FAIL|WIN32_EXECUTABLE|WINDOWS_EXPORT_ALL_SYMBOLS|WORKING_DIRECTORY|WRAP_EXCLUDE|XCODE_(?:EMIT_EFFECTIVE_PLATFORM_NAME|EXPLICIT_FILE_TYPE|FILE_ATTRIBUTES|LAST_KNOWN_FILE_TYPE|PRODUCT_TYPE|SCHEME_(?:ADDRESS_SANITIZER|ADDRESS_SANITIZER_USE_AFTER_RETURN|ARGUMENTS|DISABLE_MAIN_THREAD_CHECKER|DYNAMIC_LIBRARY_LOADS|DYNAMIC_LINKER_API_USAGE|ENVIRONMENT|EXECUTABLE|GUARD_MALLOC|MAIN_THREAD_CHECKER_STOP|MALLOC_GUARD_EDGES|MALLOC_SCRIBBLE|MALLOC_STACK|THREAD_SANITIZER(?:_STOP)?|UNDEFINED_BEHAVIOUR_SANITIZER(?:_STOP)?|ZOMBIE_OBJECTS))|XCTEST)\b/, 'keyword': /\b(?:add_compile_definitions|add_compile_options|add_custom_command|add_custom_target|add_definitions|add_dependencies|add_executable|add_library|add_link_options|add_subdirectory|add_test|aux_source_directory|break|build_command|build_name|cmake_host_system_information|cmake_minimum_required|cmake_parse_arguments|cmake_policy|configure_file|continue|create_test_sourcelist|ctest_build|ctest_configure|ctest_coverage|ctest_empty_binary_directory|ctest_memcheck|ctest_read_custom_files|ctest_run_script|ctest_sleep|ctest_start|ctest_submit|ctest_test|ctest_update|ctest_upload|define_property|else|elseif|enable_language|enable_testing|endforeach|endfunction|endif|endmacro|endwhile|exec_program|execute_process|export|export_library_dependencies|file|find_file|find_library|find_package|find_path|find_program|fltk_wrap_ui|foreach|function|get_cmake_property|get_directory_property|get_filename_component|get_property|get_source_file_property|get_target_property|get_test_property|if|include|include_directories|include_external_msproject|include_guard|include_regular_expression|install|install_files|install_programs|install_targets|link_directories|link_libraries|list|load_cache|load_command|macro|make_directory|mark_as_advanced|math|message|option|output_required_files|project|qt_wrap_cpp|qt_wrap_ui|remove|remove_definitions|return|separate_arguments|set|set_directory_properties|set_property|set_source_files_properties|set_target_properties|set_tests_properties|site_name|source_group|string|subdir_depends|subdirs|target_compile_definitions|target_compile_features|target_compile_options|target_include_directories|target_link_directories|target_link_libraries|target_link_options|target_sources|try_compile|try_run|unset|use_mangled_mesa|utility_source|variable_requires|variable_watch|while|write_file)(?=\s*\()\b/, - 'boolean': /\b(?:ON|OFF|TRUE|FALSE)\b/, - 'namespace': /\b(?:PROPERTIES|SHARED|PRIVATE|STATIC|PUBLIC|INTERFACE|TARGET_OBJECTS)\b/, - 'operator': /\b(?:NOT|AND|OR|MATCHES|LESS|GREATER|EQUAL|STRLESS|STRGREATER|STREQUAL|VERSION_LESS|VERSION_EQUAL|VERSION_GREATER|DEFINED)\b/, + 'boolean': /\b(?:FALSE|OFF|ON|TRUE)\b/, + 'namespace': /\b(?:INTERFACE|PRIVATE|PROPERTIES|PUBLIC|SHARED|STATIC|TARGET_OBJECTS)\b/, + 'operator': /\b(?:AND|DEFINED|EQUAL|GREATER|LESS|MATCHES|NOT|OR|STREQUAL|STRGREATER|STRLESS|VERSION_EQUAL|VERSION_GREATER|VERSION_LESS)\b/, 'inserted': { pattern: /\b\w+::\w+\b/, alias: 'class-name' diff --git a/components/prism-cmake.min.js b/components/prism-cmake.min.js index b88e7e6682..8455f5ccbf 100644 --- a/components/prism-cmake.min.js +++ b/components/prism-cmake.min.js @@ -1 +1 @@ -Prism.languages.cmake={comment:/#.*/,string:{pattern:/"(?:[^\\"]|\\.)*"/,greedy:!0,inside:{interpolation:{pattern:/\$\{(?:[^{}$]|\$\{[^{}$]*\})*\}/,inside:{punctuation:/\$\{|\}/,variable:/\w+/}}}},variable:/\b(?:CMAKE_\w+|\w+_(?:VERSION(?:_MAJOR|_MINOR|_PATCH|_TWEAK)?|(?:BINARY|SOURCE)_DIR|DESCRIPTION|HOMEPAGE_URL|ROOT)|(?:ANDROID|APPLE|BORLAND|BUILD_SHARED_LIBS|CACHE|CPACK_(?:ABSOLUTE_DESTINATION_FILES|COMPONENT_INCLUDE_TOPLEVEL_DIRECTORY|ERROR_ON_ABSOLUTE_INSTALL_DESTINATION|INCLUDE_TOPLEVEL_DIRECTORY|INSTALL_DEFAULT_DIRECTORY_PERMISSIONS|INSTALL_SCRIPT|PACKAGING_INSTALL_PREFIX|SET_DESTDIR|WARN_ON_ABSOLUTE_INSTALL_DESTINATION)|CTEST_(?:BINARY_DIRECTORY|BUILD_COMMAND|BUILD_NAME|BZR_COMMAND|BZR_UPDATE_OPTIONS|CHANGE_ID|CHECKOUT_COMMAND|CONFIGURATION_TYPE|CONFIGURE_COMMAND|COVERAGE_COMMAND|COVERAGE_EXTRA_FLAGS|CURL_OPTIONS|CUSTOM_(?:COVERAGE_EXCLUDE|ERROR_EXCEPTION|ERROR_MATCH|ERROR_POST_CONTEXT|ERROR_PRE_CONTEXT|MAXIMUM_FAILED_TEST_OUTPUT_SIZE|MAXIMUM_NUMBER_OF_(?:ERRORS|WARNINGS)|MAXIMUM_PASSED_TEST_OUTPUT_SIZE|MEMCHECK_IGNORE|POST_MEMCHECK|POST_TEST|PRE_MEMCHECK|PRE_TEST|TESTS_IGNORE|WARNING_EXCEPTION|WARNING_MATCH)|CVS_CHECKOUT|CVS_COMMAND|CVS_UPDATE_OPTIONS|DROP_LOCATION|DROP_METHOD|DROP_SITE|DROP_SITE_CDASH|DROP_SITE_PASSWORD|DROP_SITE_USER|EXTRA_COVERAGE_GLOB|GIT_COMMAND|GIT_INIT_SUBMODULES|GIT_UPDATE_CUSTOM|GIT_UPDATE_OPTIONS|HG_COMMAND|HG_UPDATE_OPTIONS|LABELS_FOR_SUBPROJECTS|MEMORYCHECK_(?:COMMAND|COMMAND_OPTIONS|SANITIZER_OPTIONS|SUPPRESSIONS_FILE|TYPE)|NIGHTLY_START_TIME|P4_CLIENT|P4_COMMAND|P4_OPTIONS|P4_UPDATE_OPTIONS|RUN_CURRENT_SCRIPT|SCP_COMMAND|SITE|SOURCE_DIRECTORY|SUBMIT_URL|SVN_COMMAND|SVN_OPTIONS|SVN_UPDATE_OPTIONS|TEST_LOAD|TEST_TIMEOUT|TRIGGER_SITE|UPDATE_COMMAND|UPDATE_OPTIONS|UPDATE_VERSION_ONLY|USE_LAUNCHERS)|CYGWIN|ENV|EXECUTABLE_OUTPUT_PATH|GHS-MULTI|IOS|LIBRARY_OUTPUT_PATH|MINGW|MSVC(?:10|11|12|14|60|70|71|80|90|_IDE|_TOOLSET_VERSION|_VERSION)?|MSYS|PROJECT_(?:BINARY_DIR|DESCRIPTION|HOMEPAGE_URL|NAME|SOURCE_DIR|VERSION|VERSION_(?:MAJOR|MINOR|PATCH|TWEAK))|UNIX|WIN32|WINCE|WINDOWS_PHONE|WINDOWS_STORE|XCODE|XCODE_VERSION))\b/,property:/\b(?:cxx_\w+|(?:ARCHIVE_OUTPUT_(?:DIRECTORY|NAME)|COMPILE_DEFINITIONS|COMPILE_PDB_NAME|COMPILE_PDB_OUTPUT_DIRECTORY|EXCLUDE_FROM_DEFAULT_BUILD|IMPORTED_(?:IMPLIB|LIBNAME|LINK_DEPENDENT_LIBRARIES|LINK_INTERFACE_LANGUAGES|LINK_INTERFACE_LIBRARIES|LINK_INTERFACE_MULTIPLICITY|LOCATION|NO_SONAME|OBJECTS|SONAME)|INTERPROCEDURAL_OPTIMIZATION|LIBRARY_OUTPUT_DIRECTORY|LIBRARY_OUTPUT_NAME|LINK_FLAGS|LINK_INTERFACE_LIBRARIES|LINK_INTERFACE_MULTIPLICITY|LOCATION|MAP_IMPORTED_CONFIG|OSX_ARCHITECTURES|OUTPUT_NAME|PDB_NAME|PDB_OUTPUT_DIRECTORY|RUNTIME_OUTPUT_DIRECTORY|RUNTIME_OUTPUT_NAME|STATIC_LIBRARY_FLAGS|VS_CSHARP|VS_DOTNET_REFERENCEPROP|VS_DOTNET_REFERENCE|VS_GLOBAL_SECTION_POST|VS_GLOBAL_SECTION_PRE|VS_GLOBAL|XCODE_ATTRIBUTE)_\w+|\w+_(?:CLANG_TIDY|COMPILER_LAUNCHER|CPPCHECK|CPPLINT|INCLUDE_WHAT_YOU_USE|OUTPUT_NAME|POSTFIX|VISIBILITY_PRESET)|ABSTRACT|ADDITIONAL_MAKE_CLEAN_FILES|ADVANCED|ALIASED_TARGET|ALLOW_DUPLICATE_CUSTOM_TARGETS|ANDROID_(?:ANT_ADDITIONAL_OPTIONS|API|API_MIN|ARCH|ASSETS_DIRECTORIES|GUI|JAR_DEPENDENCIES|NATIVE_LIB_DEPENDENCIES|NATIVE_LIB_DIRECTORIES|PROCESS_MAX|PROGUARD|PROGUARD_CONFIG_PATH|SECURE_PROPS_PATH|SKIP_ANT_STEP|STL_TYPE)|ARCHIVE_OUTPUT_DIRECTORY|ATTACHED_FILES|ATTACHED_FILES_ON_FAIL|AUTOGEN_(?:BUILD_DIR|ORIGIN_DEPENDS|PARALLEL|SOURCE_GROUP|TARGETS_FOLDER|TARGET_DEPENDS)|AUTOMOC|AUTOMOC_(?:COMPILER_PREDEFINES|DEPEND_FILTERS|EXECUTABLE|MACRO_NAMES|MOC_OPTIONS|SOURCE_GROUP|TARGETS_FOLDER)|AUTORCC|AUTORCC_EXECUTABLE|AUTORCC_OPTIONS|AUTORCC_SOURCE_GROUP|AUTOUIC|AUTOUIC_EXECUTABLE|AUTOUIC_OPTIONS|AUTOUIC_SEARCH_PATHS|BINARY_DIR|BUILDSYSTEM_TARGETS|BUILD_RPATH|BUILD_RPATH_USE_ORIGIN|BUILD_WITH_INSTALL_NAME_DIR|BUILD_WITH_INSTALL_RPATH|BUNDLE|BUNDLE_EXTENSION|CACHE_VARIABLES|CLEAN_NO_CUSTOM|COMMON_LANGUAGE_RUNTIME|COMPATIBLE_INTERFACE_(?:BOOL|NUMBER_MAX|NUMBER_MIN|STRING)|COMPILE_(?:DEFINITIONS|FEATURES|FLAGS|OPTIONS|PDB_NAME|PDB_OUTPUT_DIRECTORY)|COST|CPACK_DESKTOP_SHORTCUTS|CPACK_NEVER_OVERWRITE|CPACK_PERMANENT|CPACK_STARTUP_SHORTCUTS|CPACK_START_MENU_SHORTCUTS|CPACK_WIX_ACL|CROSSCOMPILING_EMULATOR|CUDA_EXTENSIONS|CUDA_PTX_COMPILATION|CUDA_RESOLVE_DEVICE_SYMBOLS|CUDA_SEPARABLE_COMPILATION|CUDA_STANDARD|CUDA_STANDARD_REQUIRED|CXX_EXTENSIONS|CXX_STANDARD|CXX_STANDARD_REQUIRED|C_EXTENSIONS|C_STANDARD|C_STANDARD_REQUIRED|DEBUG_CONFIGURATIONS|DEFINE_SYMBOL|DEFINITIONS|DEPENDS|DEPLOYMENT_ADDITIONAL_FILES|DEPLOYMENT_REMOTE_DIRECTORY|DISABLED|DISABLED_FEATURES|ECLIPSE_EXTRA_CPROJECT_CONTENTS|ECLIPSE_EXTRA_NATURES|ENABLED_FEATURES|ENABLED_LANGUAGES|ENABLE_EXPORTS|ENVIRONMENT|EXCLUDE_FROM_ALL|EXCLUDE_FROM_DEFAULT_BUILD|EXPORT_NAME|EXPORT_PROPERTIES|EXTERNAL_OBJECT|EchoString|FAIL_REGULAR_EXPRESSION|FIND_LIBRARY_USE_LIB32_PATHS|FIND_LIBRARY_USE_LIB64_PATHS|FIND_LIBRARY_USE_LIBX32_PATHS|FIND_LIBRARY_USE_OPENBSD_VERSIONING|FIXTURES_CLEANUP|FIXTURES_REQUIRED|FIXTURES_SETUP|FOLDER|FRAMEWORK|Fortran_FORMAT|Fortran_MODULE_DIRECTORY|GENERATED|GENERATOR_FILE_NAME|GENERATOR_IS_MULTI_CONFIG|GHS_INTEGRITY_APP|GHS_NO_SOURCE_GROUP_FILE|GLOBAL_DEPENDS_DEBUG_MODE|GLOBAL_DEPENDS_NO_CYCLES|GNUtoMS|HAS_CXX|HEADER_FILE_ONLY|HELPSTRING|IMPLICIT_DEPENDS_INCLUDE_TRANSFORM|IMPORTED|IMPORTED_(?:COMMON_LANGUAGE_RUNTIME|CONFIGURATIONS|GLOBAL|IMPLIB|LIBNAME|LINK_DEPENDENT_LIBRARIES|LINK_INTERFACE_(?:LANGUAGES|LIBRARIES|MULTIPLICITY)|LOCATION|NO_SONAME|OBJECTS|SONAME)|IMPORT_PREFIX|IMPORT_SUFFIX|INCLUDE_DIRECTORIES|INCLUDE_REGULAR_EXPRESSION|INSTALL_NAME_DIR|INSTALL_RPATH|INSTALL_RPATH_USE_LINK_PATH|INTERFACE_(?:AUTOUIC_OPTIONS|COMPILE_DEFINITIONS|COMPILE_FEATURES|COMPILE_OPTIONS|INCLUDE_DIRECTORIES|LINK_DEPENDS|LINK_DIRECTORIES|LINK_LIBRARIES|LINK_OPTIONS|POSITION_INDEPENDENT_CODE|SOURCES|SYSTEM_INCLUDE_DIRECTORIES)|INTERPROCEDURAL_OPTIMIZATION|IN_TRY_COMPILE|IOS_INSTALL_COMBINED|JOB_POOLS|JOB_POOL_COMPILE|JOB_POOL_LINK|KEEP_EXTENSION|LABELS|LANGUAGE|LIBRARY_OUTPUT_DIRECTORY|LINKER_LANGUAGE|LINK_(?:DEPENDS|DEPENDS_NO_SHARED|DIRECTORIES|FLAGS|INTERFACE_LIBRARIES|INTERFACE_MULTIPLICITY|LIBRARIES|OPTIONS|SEARCH_END_STATIC|SEARCH_START_STATIC|WHAT_YOU_USE)|LISTFILE_STACK|LOCATION|MACOSX_BUNDLE|MACOSX_BUNDLE_INFO_PLIST|MACOSX_FRAMEWORK_INFO_PLIST|MACOSX_PACKAGE_LOCATION|MACOSX_RPATH|MACROS|MANUALLY_ADDED_DEPENDENCIES|MEASUREMENT|MODIFIED|NAME|NO_SONAME|NO_SYSTEM_FROM_IMPORTED|OBJECT_DEPENDS|OBJECT_OUTPUTS|OSX_ARCHITECTURES|OUTPUT_NAME|PACKAGES_FOUND|PACKAGES_NOT_FOUND|PARENT_DIRECTORY|PASS_REGULAR_EXPRESSION|PDB_NAME|PDB_OUTPUT_DIRECTORY|POSITION_INDEPENDENT_CODE|POST_INSTALL_SCRIPT|PREDEFINED_TARGETS_FOLDER|PREFIX|PRE_INSTALL_SCRIPT|PRIVATE_HEADER|PROCESSORS|PROCESSOR_AFFINITY|PROJECT_LABEL|PUBLIC_HEADER|REPORT_UNDEFINED_PROPERTIES|REQUIRED_FILES|RESOURCE|RESOURCE_LOCK|RULE_LAUNCH_COMPILE|RULE_LAUNCH_CUSTOM|RULE_LAUNCH_LINK|RULE_MESSAGES|RUNTIME_OUTPUT_DIRECTORY|RUN_SERIAL|SKIP_AUTOGEN|SKIP_AUTOMOC|SKIP_AUTORCC|SKIP_AUTOUIC|SKIP_BUILD_RPATH|SKIP_RETURN_CODE|SOURCES|SOURCE_DIR|SOVERSION|STATIC_LIBRARY_FLAGS|STATIC_LIBRARY_OPTIONS|STRINGS|SUBDIRECTORIES|SUFFIX|SYMBOLIC|TARGET_ARCHIVES_MAY_BE_SHARED_LIBS|TARGET_MESSAGES|TARGET_SUPPORTS_SHARED_LIBS|TESTS|TEST_INCLUDE_FILE|TEST_INCLUDE_FILES|TIMEOUT|TIMEOUT_AFTER_MATCH|TYPE|USE_FOLDERS|VALUE|VARIABLES|VERSION|VISIBILITY_INLINES_HIDDEN|VS_(?:CONFIGURATION_TYPE|COPY_TO_OUT_DIR|DEBUGGER_(?:COMMAND|COMMAND_ARGUMENTS|ENVIRONMENT|WORKING_DIRECTORY)|DEPLOYMENT_CONTENT|DEPLOYMENT_LOCATION|DOTNET_REFERENCES|DOTNET_REFERENCES_COPY_LOCAL|GLOBAL_KEYWORD|GLOBAL_PROJECT_TYPES|GLOBAL_ROOTNAMESPACE|INCLUDE_IN_VSIX|IOT_STARTUP_TASK|KEYWORD|RESOURCE_GENERATOR|SCC_AUXPATH|SCC_LOCALPATH|SCC_PROJECTNAME|SCC_PROVIDER|SDK_REFERENCES|SHADER_(?:DISABLE_OPTIMIZATIONS|ENABLE_DEBUG|ENTRYPOINT|FLAGS|MODEL|OBJECT_FILE_NAME|OUTPUT_HEADER_FILE|TYPE|VARIABLE_NAME)|STARTUP_PROJECT|TOOL_OVERRIDE|USER_PROPS|WINRT_COMPONENT|WINRT_EXTENSIONS|WINRT_REFERENCES|XAML_TYPE)|WILL_FAIL|WIN32_EXECUTABLE|WINDOWS_EXPORT_ALL_SYMBOLS|WORKING_DIRECTORY|WRAP_EXCLUDE|XCODE_(?:EMIT_EFFECTIVE_PLATFORM_NAME|EXPLICIT_FILE_TYPE|FILE_ATTRIBUTES|LAST_KNOWN_FILE_TYPE|PRODUCT_TYPE|SCHEME_(?:ADDRESS_SANITIZER|ADDRESS_SANITIZER_USE_AFTER_RETURN|ARGUMENTS|DISABLE_MAIN_THREAD_CHECKER|DYNAMIC_LIBRARY_LOADS|DYNAMIC_LINKER_API_USAGE|ENVIRONMENT|EXECUTABLE|GUARD_MALLOC|MAIN_THREAD_CHECKER_STOP|MALLOC_GUARD_EDGES|MALLOC_SCRIBBLE|MALLOC_STACK|THREAD_SANITIZER(?:_STOP)?|UNDEFINED_BEHAVIOUR_SANITIZER(?:_STOP)?|ZOMBIE_OBJECTS))|XCTEST)\b/,keyword:/\b(?:add_compile_definitions|add_compile_options|add_custom_command|add_custom_target|add_definitions|add_dependencies|add_executable|add_library|add_link_options|add_subdirectory|add_test|aux_source_directory|break|build_command|build_name|cmake_host_system_information|cmake_minimum_required|cmake_parse_arguments|cmake_policy|configure_file|continue|create_test_sourcelist|ctest_build|ctest_configure|ctest_coverage|ctest_empty_binary_directory|ctest_memcheck|ctest_read_custom_files|ctest_run_script|ctest_sleep|ctest_start|ctest_submit|ctest_test|ctest_update|ctest_upload|define_property|else|elseif|enable_language|enable_testing|endforeach|endfunction|endif|endmacro|endwhile|exec_program|execute_process|export|export_library_dependencies|file|find_file|find_library|find_package|find_path|find_program|fltk_wrap_ui|foreach|function|get_cmake_property|get_directory_property|get_filename_component|get_property|get_source_file_property|get_target_property|get_test_property|if|include|include_directories|include_external_msproject|include_guard|include_regular_expression|install|install_files|install_programs|install_targets|link_directories|link_libraries|list|load_cache|load_command|macro|make_directory|mark_as_advanced|math|message|option|output_required_files|project|qt_wrap_cpp|qt_wrap_ui|remove|remove_definitions|return|separate_arguments|set|set_directory_properties|set_property|set_source_files_properties|set_target_properties|set_tests_properties|site_name|source_group|string|subdir_depends|subdirs|target_compile_definitions|target_compile_features|target_compile_options|target_include_directories|target_link_directories|target_link_libraries|target_link_options|target_sources|try_compile|try_run|unset|use_mangled_mesa|utility_source|variable_requires|variable_watch|while|write_file)(?=\s*\()\b/,boolean:/\b(?:ON|OFF|TRUE|FALSE)\b/,namespace:/\b(?:PROPERTIES|SHARED|PRIVATE|STATIC|PUBLIC|INTERFACE|TARGET_OBJECTS)\b/,operator:/\b(?:NOT|AND|OR|MATCHES|LESS|GREATER|EQUAL|STRLESS|STRGREATER|STREQUAL|VERSION_LESS|VERSION_EQUAL|VERSION_GREATER|DEFINED)\b/,inserted:{pattern:/\b\w+::\w+\b/,alias:"class-name"},number:/\b\d+(?:\.\d+)*\b/,function:/\b[a-z_]\w*(?=\s*\()\b/i,punctuation:/[()>}]|\$[<{]/}; \ No newline at end of file +Prism.languages.cmake={comment:/#.*/,string:{pattern:/"(?:[^\\"]|\\.)*"/,greedy:!0,inside:{interpolation:{pattern:/\$\{(?:[^{}$]|\$\{[^{}$]*\})*\}/,inside:{punctuation:/\$\{|\}/,variable:/\w+/}}}},variable:/\b(?:CMAKE_\w+|\w+_(?:(?:BINARY|SOURCE)_DIR|DESCRIPTION|HOMEPAGE_URL|ROOT|VERSION(?:_MAJOR|_MINOR|_PATCH|_TWEAK)?)|(?:ANDROID|APPLE|BORLAND|BUILD_SHARED_LIBS|CACHE|CPACK_(?:ABSOLUTE_DESTINATION_FILES|COMPONENT_INCLUDE_TOPLEVEL_DIRECTORY|ERROR_ON_ABSOLUTE_INSTALL_DESTINATION|INCLUDE_TOPLEVEL_DIRECTORY|INSTALL_DEFAULT_DIRECTORY_PERMISSIONS|INSTALL_SCRIPT|PACKAGING_INSTALL_PREFIX|SET_DESTDIR|WARN_ON_ABSOLUTE_INSTALL_DESTINATION)|CTEST_(?:BINARY_DIRECTORY|BUILD_COMMAND|BUILD_NAME|BZR_COMMAND|BZR_UPDATE_OPTIONS|CHANGE_ID|CHECKOUT_COMMAND|CONFIGURATION_TYPE|CONFIGURE_COMMAND|COVERAGE_COMMAND|COVERAGE_EXTRA_FLAGS|CURL_OPTIONS|CUSTOM_(?:COVERAGE_EXCLUDE|ERROR_EXCEPTION|ERROR_MATCH|ERROR_POST_CONTEXT|ERROR_PRE_CONTEXT|MAXIMUM_FAILED_TEST_OUTPUT_SIZE|MAXIMUM_NUMBER_OF_(?:ERRORS|WARNINGS)|MAXIMUM_PASSED_TEST_OUTPUT_SIZE|MEMCHECK_IGNORE|POST_MEMCHECK|POST_TEST|PRE_MEMCHECK|PRE_TEST|TESTS_IGNORE|WARNING_EXCEPTION|WARNING_MATCH)|CVS_CHECKOUT|CVS_COMMAND|CVS_UPDATE_OPTIONS|DROP_LOCATION|DROP_METHOD|DROP_SITE|DROP_SITE_CDASH|DROP_SITE_PASSWORD|DROP_SITE_USER|EXTRA_COVERAGE_GLOB|GIT_COMMAND|GIT_INIT_SUBMODULES|GIT_UPDATE_CUSTOM|GIT_UPDATE_OPTIONS|HG_COMMAND|HG_UPDATE_OPTIONS|LABELS_FOR_SUBPROJECTS|MEMORYCHECK_(?:COMMAND|COMMAND_OPTIONS|SANITIZER_OPTIONS|SUPPRESSIONS_FILE|TYPE)|NIGHTLY_START_TIME|P4_CLIENT|P4_COMMAND|P4_OPTIONS|P4_UPDATE_OPTIONS|RUN_CURRENT_SCRIPT|SCP_COMMAND|SITE|SOURCE_DIRECTORY|SUBMIT_URL|SVN_COMMAND|SVN_OPTIONS|SVN_UPDATE_OPTIONS|TEST_LOAD|TEST_TIMEOUT|TRIGGER_SITE|UPDATE_COMMAND|UPDATE_OPTIONS|UPDATE_VERSION_ONLY|USE_LAUNCHERS)|CYGWIN|ENV|EXECUTABLE_OUTPUT_PATH|GHS-MULTI|IOS|LIBRARY_OUTPUT_PATH|MINGW|MSVC(?:10|11|12|14|60|70|71|80|90|_IDE|_TOOLSET_VERSION|_VERSION)?|MSYS|PROJECT_(?:BINARY_DIR|DESCRIPTION|HOMEPAGE_URL|NAME|SOURCE_DIR|VERSION|VERSION_(?:MAJOR|MINOR|PATCH|TWEAK))|UNIX|WIN32|WINCE|WINDOWS_PHONE|WINDOWS_STORE|XCODE|XCODE_VERSION))\b/,property:/\b(?:cxx_\w+|(?:ARCHIVE_OUTPUT_(?:DIRECTORY|NAME)|COMPILE_DEFINITIONS|COMPILE_PDB_NAME|COMPILE_PDB_OUTPUT_DIRECTORY|EXCLUDE_FROM_DEFAULT_BUILD|IMPORTED_(?:IMPLIB|LIBNAME|LINK_DEPENDENT_LIBRARIES|LINK_INTERFACE_LANGUAGES|LINK_INTERFACE_LIBRARIES|LINK_INTERFACE_MULTIPLICITY|LOCATION|NO_SONAME|OBJECTS|SONAME)|INTERPROCEDURAL_OPTIMIZATION|LIBRARY_OUTPUT_DIRECTORY|LIBRARY_OUTPUT_NAME|LINK_FLAGS|LINK_INTERFACE_LIBRARIES|LINK_INTERFACE_MULTIPLICITY|LOCATION|MAP_IMPORTED_CONFIG|OSX_ARCHITECTURES|OUTPUT_NAME|PDB_NAME|PDB_OUTPUT_DIRECTORY|RUNTIME_OUTPUT_DIRECTORY|RUNTIME_OUTPUT_NAME|STATIC_LIBRARY_FLAGS|VS_CSHARP|VS_DOTNET_REFERENCEPROP|VS_DOTNET_REFERENCE|VS_GLOBAL_SECTION_POST|VS_GLOBAL_SECTION_PRE|VS_GLOBAL|XCODE_ATTRIBUTE)_\w+|\w+_(?:CLANG_TIDY|COMPILER_LAUNCHER|CPPCHECK|CPPLINT|INCLUDE_WHAT_YOU_USE|OUTPUT_NAME|POSTFIX|VISIBILITY_PRESET)|ABSTRACT|ADDITIONAL_MAKE_CLEAN_FILES|ADVANCED|ALIASED_TARGET|ALLOW_DUPLICATE_CUSTOM_TARGETS|ANDROID_(?:ANT_ADDITIONAL_OPTIONS|API|API_MIN|ARCH|ASSETS_DIRECTORIES|GUI|JAR_DEPENDENCIES|NATIVE_LIB_DEPENDENCIES|NATIVE_LIB_DIRECTORIES|PROCESS_MAX|PROGUARD|PROGUARD_CONFIG_PATH|SECURE_PROPS_PATH|SKIP_ANT_STEP|STL_TYPE)|ARCHIVE_OUTPUT_DIRECTORY|ATTACHED_FILES|ATTACHED_FILES_ON_FAIL|AUTOGEN_(?:BUILD_DIR|ORIGIN_DEPENDS|PARALLEL|SOURCE_GROUP|TARGETS_FOLDER|TARGET_DEPENDS)|AUTOMOC|AUTOMOC_(?:COMPILER_PREDEFINES|DEPEND_FILTERS|EXECUTABLE|MACRO_NAMES|MOC_OPTIONS|SOURCE_GROUP|TARGETS_FOLDER)|AUTORCC|AUTORCC_EXECUTABLE|AUTORCC_OPTIONS|AUTORCC_SOURCE_GROUP|AUTOUIC|AUTOUIC_EXECUTABLE|AUTOUIC_OPTIONS|AUTOUIC_SEARCH_PATHS|BINARY_DIR|BUILDSYSTEM_TARGETS|BUILD_RPATH|BUILD_RPATH_USE_ORIGIN|BUILD_WITH_INSTALL_NAME_DIR|BUILD_WITH_INSTALL_RPATH|BUNDLE|BUNDLE_EXTENSION|CACHE_VARIABLES|CLEAN_NO_CUSTOM|COMMON_LANGUAGE_RUNTIME|COMPATIBLE_INTERFACE_(?:BOOL|NUMBER_MAX|NUMBER_MIN|STRING)|COMPILE_(?:DEFINITIONS|FEATURES|FLAGS|OPTIONS|PDB_NAME|PDB_OUTPUT_DIRECTORY)|COST|CPACK_DESKTOP_SHORTCUTS|CPACK_NEVER_OVERWRITE|CPACK_PERMANENT|CPACK_STARTUP_SHORTCUTS|CPACK_START_MENU_SHORTCUTS|CPACK_WIX_ACL|CROSSCOMPILING_EMULATOR|CUDA_EXTENSIONS|CUDA_PTX_COMPILATION|CUDA_RESOLVE_DEVICE_SYMBOLS|CUDA_SEPARABLE_COMPILATION|CUDA_STANDARD|CUDA_STANDARD_REQUIRED|CXX_EXTENSIONS|CXX_STANDARD|CXX_STANDARD_REQUIRED|C_EXTENSIONS|C_STANDARD|C_STANDARD_REQUIRED|DEBUG_CONFIGURATIONS|DEFINE_SYMBOL|DEFINITIONS|DEPENDS|DEPLOYMENT_ADDITIONAL_FILES|DEPLOYMENT_REMOTE_DIRECTORY|DISABLED|DISABLED_FEATURES|ECLIPSE_EXTRA_CPROJECT_CONTENTS|ECLIPSE_EXTRA_NATURES|ENABLED_FEATURES|ENABLED_LANGUAGES|ENABLE_EXPORTS|ENVIRONMENT|EXCLUDE_FROM_ALL|EXCLUDE_FROM_DEFAULT_BUILD|EXPORT_NAME|EXPORT_PROPERTIES|EXTERNAL_OBJECT|EchoString|FAIL_REGULAR_EXPRESSION|FIND_LIBRARY_USE_LIB32_PATHS|FIND_LIBRARY_USE_LIB64_PATHS|FIND_LIBRARY_USE_LIBX32_PATHS|FIND_LIBRARY_USE_OPENBSD_VERSIONING|FIXTURES_CLEANUP|FIXTURES_REQUIRED|FIXTURES_SETUP|FOLDER|FRAMEWORK|Fortran_FORMAT|Fortran_MODULE_DIRECTORY|GENERATED|GENERATOR_FILE_NAME|GENERATOR_IS_MULTI_CONFIG|GHS_INTEGRITY_APP|GHS_NO_SOURCE_GROUP_FILE|GLOBAL_DEPENDS_DEBUG_MODE|GLOBAL_DEPENDS_NO_CYCLES|GNUtoMS|HAS_CXX|HEADER_FILE_ONLY|HELPSTRING|IMPLICIT_DEPENDS_INCLUDE_TRANSFORM|IMPORTED|IMPORTED_(?:COMMON_LANGUAGE_RUNTIME|CONFIGURATIONS|GLOBAL|IMPLIB|LIBNAME|LINK_DEPENDENT_LIBRARIES|LINK_INTERFACE_(?:LANGUAGES|LIBRARIES|MULTIPLICITY)|LOCATION|NO_SONAME|OBJECTS|SONAME)|IMPORT_PREFIX|IMPORT_SUFFIX|INCLUDE_DIRECTORIES|INCLUDE_REGULAR_EXPRESSION|INSTALL_NAME_DIR|INSTALL_RPATH|INSTALL_RPATH_USE_LINK_PATH|INTERFACE_(?:AUTOUIC_OPTIONS|COMPILE_DEFINITIONS|COMPILE_FEATURES|COMPILE_OPTIONS|INCLUDE_DIRECTORIES|LINK_DEPENDS|LINK_DIRECTORIES|LINK_LIBRARIES|LINK_OPTIONS|POSITION_INDEPENDENT_CODE|SOURCES|SYSTEM_INCLUDE_DIRECTORIES)|INTERPROCEDURAL_OPTIMIZATION|IN_TRY_COMPILE|IOS_INSTALL_COMBINED|JOB_POOLS|JOB_POOL_COMPILE|JOB_POOL_LINK|KEEP_EXTENSION|LABELS|LANGUAGE|LIBRARY_OUTPUT_DIRECTORY|LINKER_LANGUAGE|LINK_(?:DEPENDS|DEPENDS_NO_SHARED|DIRECTORIES|FLAGS|INTERFACE_LIBRARIES|INTERFACE_MULTIPLICITY|LIBRARIES|OPTIONS|SEARCH_END_STATIC|SEARCH_START_STATIC|WHAT_YOU_USE)|LISTFILE_STACK|LOCATION|MACOSX_BUNDLE|MACOSX_BUNDLE_INFO_PLIST|MACOSX_FRAMEWORK_INFO_PLIST|MACOSX_PACKAGE_LOCATION|MACOSX_RPATH|MACROS|MANUALLY_ADDED_DEPENDENCIES|MEASUREMENT|MODIFIED|NAME|NO_SONAME|NO_SYSTEM_FROM_IMPORTED|OBJECT_DEPENDS|OBJECT_OUTPUTS|OSX_ARCHITECTURES|OUTPUT_NAME|PACKAGES_FOUND|PACKAGES_NOT_FOUND|PARENT_DIRECTORY|PASS_REGULAR_EXPRESSION|PDB_NAME|PDB_OUTPUT_DIRECTORY|POSITION_INDEPENDENT_CODE|POST_INSTALL_SCRIPT|PREDEFINED_TARGETS_FOLDER|PREFIX|PRE_INSTALL_SCRIPT|PRIVATE_HEADER|PROCESSORS|PROCESSOR_AFFINITY|PROJECT_LABEL|PUBLIC_HEADER|REPORT_UNDEFINED_PROPERTIES|REQUIRED_FILES|RESOURCE|RESOURCE_LOCK|RULE_LAUNCH_COMPILE|RULE_LAUNCH_CUSTOM|RULE_LAUNCH_LINK|RULE_MESSAGES|RUNTIME_OUTPUT_DIRECTORY|RUN_SERIAL|SKIP_AUTOGEN|SKIP_AUTOMOC|SKIP_AUTORCC|SKIP_AUTOUIC|SKIP_BUILD_RPATH|SKIP_RETURN_CODE|SOURCES|SOURCE_DIR|SOVERSION|STATIC_LIBRARY_FLAGS|STATIC_LIBRARY_OPTIONS|STRINGS|SUBDIRECTORIES|SUFFIX|SYMBOLIC|TARGET_ARCHIVES_MAY_BE_SHARED_LIBS|TARGET_MESSAGES|TARGET_SUPPORTS_SHARED_LIBS|TESTS|TEST_INCLUDE_FILE|TEST_INCLUDE_FILES|TIMEOUT|TIMEOUT_AFTER_MATCH|TYPE|USE_FOLDERS|VALUE|VARIABLES|VERSION|VISIBILITY_INLINES_HIDDEN|VS_(?:CONFIGURATION_TYPE|COPY_TO_OUT_DIR|DEBUGGER_(?:COMMAND|COMMAND_ARGUMENTS|ENVIRONMENT|WORKING_DIRECTORY)|DEPLOYMENT_CONTENT|DEPLOYMENT_LOCATION|DOTNET_REFERENCES|DOTNET_REFERENCES_COPY_LOCAL|GLOBAL_KEYWORD|GLOBAL_PROJECT_TYPES|GLOBAL_ROOTNAMESPACE|INCLUDE_IN_VSIX|IOT_STARTUP_TASK|KEYWORD|RESOURCE_GENERATOR|SCC_AUXPATH|SCC_LOCALPATH|SCC_PROJECTNAME|SCC_PROVIDER|SDK_REFERENCES|SHADER_(?:DISABLE_OPTIMIZATIONS|ENABLE_DEBUG|ENTRYPOINT|FLAGS|MODEL|OBJECT_FILE_NAME|OUTPUT_HEADER_FILE|TYPE|VARIABLE_NAME)|STARTUP_PROJECT|TOOL_OVERRIDE|USER_PROPS|WINRT_COMPONENT|WINRT_EXTENSIONS|WINRT_REFERENCES|XAML_TYPE)|WILL_FAIL|WIN32_EXECUTABLE|WINDOWS_EXPORT_ALL_SYMBOLS|WORKING_DIRECTORY|WRAP_EXCLUDE|XCODE_(?:EMIT_EFFECTIVE_PLATFORM_NAME|EXPLICIT_FILE_TYPE|FILE_ATTRIBUTES|LAST_KNOWN_FILE_TYPE|PRODUCT_TYPE|SCHEME_(?:ADDRESS_SANITIZER|ADDRESS_SANITIZER_USE_AFTER_RETURN|ARGUMENTS|DISABLE_MAIN_THREAD_CHECKER|DYNAMIC_LIBRARY_LOADS|DYNAMIC_LINKER_API_USAGE|ENVIRONMENT|EXECUTABLE|GUARD_MALLOC|MAIN_THREAD_CHECKER_STOP|MALLOC_GUARD_EDGES|MALLOC_SCRIBBLE|MALLOC_STACK|THREAD_SANITIZER(?:_STOP)?|UNDEFINED_BEHAVIOUR_SANITIZER(?:_STOP)?|ZOMBIE_OBJECTS))|XCTEST)\b/,keyword:/\b(?:add_compile_definitions|add_compile_options|add_custom_command|add_custom_target|add_definitions|add_dependencies|add_executable|add_library|add_link_options|add_subdirectory|add_test|aux_source_directory|break|build_command|build_name|cmake_host_system_information|cmake_minimum_required|cmake_parse_arguments|cmake_policy|configure_file|continue|create_test_sourcelist|ctest_build|ctest_configure|ctest_coverage|ctest_empty_binary_directory|ctest_memcheck|ctest_read_custom_files|ctest_run_script|ctest_sleep|ctest_start|ctest_submit|ctest_test|ctest_update|ctest_upload|define_property|else|elseif|enable_language|enable_testing|endforeach|endfunction|endif|endmacro|endwhile|exec_program|execute_process|export|export_library_dependencies|file|find_file|find_library|find_package|find_path|find_program|fltk_wrap_ui|foreach|function|get_cmake_property|get_directory_property|get_filename_component|get_property|get_source_file_property|get_target_property|get_test_property|if|include|include_directories|include_external_msproject|include_guard|include_regular_expression|install|install_files|install_programs|install_targets|link_directories|link_libraries|list|load_cache|load_command|macro|make_directory|mark_as_advanced|math|message|option|output_required_files|project|qt_wrap_cpp|qt_wrap_ui|remove|remove_definitions|return|separate_arguments|set|set_directory_properties|set_property|set_source_files_properties|set_target_properties|set_tests_properties|site_name|source_group|string|subdir_depends|subdirs|target_compile_definitions|target_compile_features|target_compile_options|target_include_directories|target_link_directories|target_link_libraries|target_link_options|target_sources|try_compile|try_run|unset|use_mangled_mesa|utility_source|variable_requires|variable_watch|while|write_file)(?=\s*\()\b/,boolean:/\b(?:FALSE|OFF|ON|TRUE)\b/,namespace:/\b(?:INTERFACE|PRIVATE|PROPERTIES|PUBLIC|SHARED|STATIC|TARGET_OBJECTS)\b/,operator:/\b(?:AND|DEFINED|EQUAL|GREATER|LESS|MATCHES|NOT|OR|STREQUAL|STRGREATER|STRLESS|VERSION_EQUAL|VERSION_GREATER|VERSION_LESS)\b/,inserted:{pattern:/\b\w+::\w+\b/,alias:"class-name"},number:/\b\d+(?:\.\d+)*\b/,function:/\b[a-z_]\w*(?=\s*\()\b/i,punctuation:/[()>}]|\$[<{]/}; \ No newline at end of file diff --git a/components/prism-cobol.js b/components/prism-cobol.js index 6ad0ac80c9..5767a15228 100644 --- a/components/prism-cobol.js +++ b/components/prism-cobol.js @@ -30,7 +30,7 @@ Prism.languages.cobol = { }, 'keyword': { - pattern: /(^|[^\w-])(?:ABORT|ACCEPT|ACCESS|ADD|ADDRESS|ADVANCING|AFTER|ALIGNED|ALL|ALPHABET|ALPHABETIC|ALPHABETIC-LOWER|ALPHABETIC-UPPER|ALPHANUMERIC|ALPHANUMERIC-EDITED|ALSO|ALTER|ALTERNATE|ANY|ARE|AREA|AREAS|AS|ASCENDING|ASCII|ASSIGN|ASSOCIATED-DATA|ASSOCIATED-DATA-LENGTH|AT|ATTRIBUTE|AUTHOR|AUTO|AUTO-SKIP|BACKGROUND-COLOR|BACKGROUND-COLOUR|BASIS|BEEP|BEFORE|BEGINNING|BELL|BINARY|BIT|BLANK|BLINK|BLOCK|BOUNDS|BOTTOM|BY|BYFUNCTION|BYTITLE|CALL|CANCEL|CAPABLE|CCSVERSION|CD|CF|CH|CHAINING|CHANGED|CHANNEL|CHARACTER|CHARACTERS|CLASS|CLASS-ID|CLOCK-UNITS|CLOSE|CLOSE-DISPOSITION|COBOL|CODE|CODE-SET|COLLATING|COL|COLUMN|COM-REG|COMMA|COMMITMENT|COMMON|COMMUNICATION|COMP|COMP-1|COMP-2|COMP-3|COMP-4|COMP-5|COMPUTATIONAL|COMPUTATIONAL-1|COMPUTATIONAL-2|COMPUTATIONAL-3|COMPUTATIONAL-4|COMPUTATIONAL-5|COMPUTE|CONFIGURATION|CONTAINS|CONTENT|CONTINUE|CONTROL|CONTROL-POINT|CONTROLS|CONVENTION|CONVERTING|COPY|CORR|CORRESPONDING|COUNT|CRUNCH|CURRENCY|CURSOR|DATA|DATA-BASE|DATE|DATE-COMPILED|DATE-WRITTEN|DAY|DAY-OF-WEEK|DBCS|DE|DEBUG-CONTENTS|DEBUG-ITEM|DEBUG-LINE|DEBUG-NAME|DEBUG-SUB-1|DEBUG-SUB-2|DEBUG-SUB-3|DEBUGGING|DECIMAL-POINT|DECLARATIVES|DEFAULT|DEFAULT-DISPLAY|DEFINITION|DELETE|DELIMITED|DELIMITER|DEPENDING|DESCENDING|DESTINATION|DETAIL|DFHRESP|DFHVALUE|DISABLE|DISK|DISPLAY|DISPLAY-1|DIVIDE|DIVISION|DONTCARE|DOUBLE|DOWN|DUPLICATES|DYNAMIC|EBCDIC|EGCS|EGI|ELSE|EMI|EMPTY-CHECK|ENABLE|END|END-ACCEPT|END-ADD|END-CALL|END-COMPUTE|END-DELETE|END-DIVIDE|END-EVALUATE|END-IF|END-MULTIPLY|END-OF-PAGE|END-PERFORM|END-READ|END-RECEIVE|END-RETURN|END-REWRITE|END-SEARCH|END-START|END-STRING|END-SUBTRACT|END-UNSTRING|END-WRITE|ENDING|ENTER|ENTRY|ENTRY-PROCEDURE|ENVIRONMENT|EOP|ERASE|ERROR|EOL|EOS|ESCAPE|ESI|EVALUATE|EVENT|EVERY|EXCEPTION|EXCLUSIVE|EXHIBIT|EXIT|EXPORT|EXTEND|EXTENDED|EXTERNAL|FD|FILE|FILE-CONTROL|FILLER|FINAL|FIRST|FOOTING|FOR|FOREGROUND-COLOR|FOREGROUND-COLOUR|FROM|FULL|FUNCTION|FUNCTIONNAME|FUNCTION-POINTER|GENERATE|GOBACK|GIVING|GLOBAL|GO|GRID|GROUP|HEADING|HIGHLIGHT|HIGH-VALUE|HIGH-VALUES|I-O|I-O-CONTROL|ID|IDENTIFICATION|IF|IMPLICIT|IMPORT|IN|INDEX|INDEXED|INDICATE|INITIAL|INITIALIZE|INITIATE|INPUT|INPUT-OUTPUT|INSPECT|INSTALLATION|INTEGER|INTO|INVALID|INVOKE|IS|JUST|JUSTIFIED|KANJI|KEPT|KEY|KEYBOARD|LABEL|LANGUAGE|LAST|LB|LD|LEADING|LEFT|LEFTLINE|LENGTH|LENGTH-CHECK|LIBACCESS|LIBPARAMETER|LIBRARY|LIMIT|LIMITS|LINAGE|LINAGE-COUNTER|LINE|LINES|LINE-COUNTER|LINKAGE|LIST|LOCAL|LOCAL-STORAGE|LOCK|LONG-DATE|LONG-TIME|LOWER|LOWLIGHT|LOW-VALUE|LOW-VALUES|MEMORY|MERGE|MESSAGE|MMDDYYYY|MODE|MODULES|MORE-LABELS|MOVE|MULTIPLE|MULTIPLY|NAMED|NATIONAL|NATIONAL-EDITED|NATIVE|NEGATIVE|NETWORK|NEXT|NO|NO-ECHO|NULL|NULLS|NUMBER|NUMERIC|NUMERIC-DATE|NUMERIC-EDITED|NUMERIC-TIME|OBJECT-COMPUTER|OCCURS|ODT|OF|OFF|OMITTED|ON|OPEN|OPTIONAL|ORDER|ORDERLY|ORGANIZATION|OTHER|OUTPUT|OVERFLOW|OVERLINE|OWN|PACKED-DECIMAL|PADDING|PAGE|PAGE-COUNTER|PASSWORD|PERFORM|PF|PH|PIC|PICTURE|PLUS|POINTER|POSITION|POSITIVE|PORT|PRINTER|PRINTING|PRIVATE|PROCEDURE|PROCEDURE-POINTER|PROCEDURES|PROCEED|PROCESS|PROGRAM|PROGRAM-ID|PROGRAM-LIBRARY|PROMPT|PURGE|QUEUE|QUOTE|QUOTES|RANDOM|READER|REMOTE|RD|REAL|READ|RECEIVE|RECEIVED|RECORD|RECORDING|RECORDS|RECURSIVE|REDEFINES|REEL|REF|REFERENCE|REFERENCES|RELATIVE|RELEASE|REMAINDER|REMARKS|REMOVAL|REMOVE|RENAMES|REPLACE|REPLACING|REPORT|REPORTING|REPORTS|REQUIRED|RERUN|RESERVE|REVERSE-VIDEO|RESET|RETURN|RETURN-CODE|RETURNING|REVERSED|REWIND|REWRITE|RF|RH|RIGHT|ROUNDED|RUN|SAME|SAVE|SCREEN|SD|SEARCH|SECTION|SECURE|SECURITY|SEGMENT|SEGMENT-LIMIT|SELECT|SEND|SENTENCE|SEPARATE|SEQUENCE|SEQUENTIAL|SET|SHARED|SHAREDBYALL|SHAREDBYRUNUNIT|SHARING|SHIFT-IN|SHIFT-OUT|SHORT-DATE|SIGN|SIZE|SORT|SORT-CONTROL|SORT-CORE-SIZE|SORT-FILE-SIZE|SORT-MERGE|SORT-MESSAGE|SORT-MODE-SIZE|SORT-RETURN|SOURCE|SOURCE-COMPUTER|SPACE|SPACES|SPECIAL-NAMES|STANDARD|STANDARD-1|STANDARD-2|START|STATUS|STOP|STRING|SUB-QUEUE-1|SUB-QUEUE-2|SUB-QUEUE-3|SUBTRACT|SUM|SUPPRESS|SYMBOL|SYMBOLIC|SYNC|SYNCHRONIZED|TABLE|TALLY|TALLYING|TASK|TAPE|TERMINAL|TERMINATE|TEST|TEXT|THEN|THREAD|THREAD-LOCAL|THROUGH|THRU|TIME|TIMER|TIMES|TITLE|TO|TODAYS-DATE|TODAYS-NAME|TOP|TRAILING|TRUNCATED|TYPE|TYPEDEF|UNDERLINE|UNIT|UNSTRING|UNTIL|UP|UPON|USAGE|USE|USING|VALUE|VALUES|VARYING|VIRTUAL|WAIT|WHEN|WHEN-COMPILED|WITH|WORDS|WORKING-STORAGE|WRITE|YEAR|YYYYMMDD|YYYYDDD|ZERO-FILL|ZEROS|ZEROES)(?![\w-])/i, + pattern: /(^|[^\w-])(?:ABORT|ACCEPT|ACCESS|ADD|ADDRESS|ADVANCING|AFTER|ALIGNED|ALL|ALPHABET|ALPHABETIC|ALPHABETIC-LOWER|ALPHABETIC-UPPER|ALPHANUMERIC|ALPHANUMERIC-EDITED|ALSO|ALTER|ALTERNATE|ANY|ARE|AREA|AREAS|AS|ASCENDING|ASCII|ASSIGN|ASSOCIATED-DATA|ASSOCIATED-DATA-LENGTH|AT|ATTRIBUTE|AUTHOR|AUTO|AUTO-SKIP|BACKGROUND-COLOR|BACKGROUND-COLOUR|BASIS|BEEP|BEFORE|BEGINNING|BELL|BINARY|BIT|BLANK|BLINK|BLOCK|BOTTOM|BOUNDS|BY|BYFUNCTION|BYTITLE|CALL|CANCEL|CAPABLE|CCSVERSION|CD|CF|CH|CHAINING|CHANGED|CHANNEL|CHARACTER|CHARACTERS|CLASS|CLASS-ID|CLOCK-UNITS|CLOSE|CLOSE-DISPOSITION|COBOL|CODE|CODE-SET|COL|COLLATING|COLUMN|COM-REG|COMMA|COMMITMENT|COMMON|COMMUNICATION|COMP|COMP-1|COMP-2|COMP-3|COMP-4|COMP-5|COMPUTATIONAL|COMPUTATIONAL-1|COMPUTATIONAL-2|COMPUTATIONAL-3|COMPUTATIONAL-4|COMPUTATIONAL-5|COMPUTE|CONFIGURATION|CONTAINS|CONTENT|CONTINUE|CONTROL|CONTROL-POINT|CONTROLS|CONVENTION|CONVERTING|COPY|CORR|CORRESPONDING|COUNT|CRUNCH|CURRENCY|CURSOR|DATA|DATA-BASE|DATE|DATE-COMPILED|DATE-WRITTEN|DAY|DAY-OF-WEEK|DBCS|DE|DEBUG-CONTENTS|DEBUG-ITEM|DEBUG-LINE|DEBUG-NAME|DEBUG-SUB-1|DEBUG-SUB-2|DEBUG-SUB-3|DEBUGGING|DECIMAL-POINT|DECLARATIVES|DEFAULT|DEFAULT-DISPLAY|DEFINITION|DELETE|DELIMITED|DELIMITER|DEPENDING|DESCENDING|DESTINATION|DETAIL|DFHRESP|DFHVALUE|DISABLE|DISK|DISPLAY|DISPLAY-1|DIVIDE|DIVISION|DONTCARE|DOUBLE|DOWN|DUPLICATES|DYNAMIC|EBCDIC|EGCS|EGI|ELSE|EMI|EMPTY-CHECK|ENABLE|END|END-ACCEPT|END-ADD|END-CALL|END-COMPUTE|END-DELETE|END-DIVIDE|END-EVALUATE|END-IF|END-MULTIPLY|END-OF-PAGE|END-PERFORM|END-READ|END-RECEIVE|END-RETURN|END-REWRITE|END-SEARCH|END-START|END-STRING|END-SUBTRACT|END-UNSTRING|END-WRITE|ENDING|ENTER|ENTRY|ENTRY-PROCEDURE|ENVIRONMENT|EOL|EOP|EOS|ERASE|ERROR|ESCAPE|ESI|EVALUATE|EVENT|EVERY|EXCEPTION|EXCLUSIVE|EXHIBIT|EXIT|EXPORT|EXTEND|EXTENDED|EXTERNAL|FD|FILE|FILE-CONTROL|FILLER|FINAL|FIRST|FOOTING|FOR|FOREGROUND-COLOR|FOREGROUND-COLOUR|FROM|FULL|FUNCTION|FUNCTION-POINTER|FUNCTIONNAME|GENERATE|GIVING|GLOBAL|GO|GOBACK|GRID|GROUP|HEADING|HIGH-VALUE|HIGH-VALUES|HIGHLIGHT|I-O|I-O-CONTROL|ID|IDENTIFICATION|IF|IMPLICIT|IMPORT|IN|INDEX|INDEXED|INDICATE|INITIAL|INITIALIZE|INITIATE|INPUT|INPUT-OUTPUT|INSPECT|INSTALLATION|INTEGER|INTO|INVALID|INVOKE|IS|JUST|JUSTIFIED|KANJI|KEPT|KEY|KEYBOARD|LABEL|LANGUAGE|LAST|LB|LD|LEADING|LEFT|LEFTLINE|LENGTH|LENGTH-CHECK|LIBACCESS|LIBPARAMETER|LIBRARY|LIMIT|LIMITS|LINAGE|LINAGE-COUNTER|LINE|LINE-COUNTER|LINES|LINKAGE|LIST|LOCAL|LOCAL-STORAGE|LOCK|LONG-DATE|LONG-TIME|LOW-VALUE|LOW-VALUES|LOWER|LOWLIGHT|MEMORY|MERGE|MESSAGE|MMDDYYYY|MODE|MODULES|MORE-LABELS|MOVE|MULTIPLE|MULTIPLY|NAMED|NATIONAL|NATIONAL-EDITED|NATIVE|NEGATIVE|NETWORK|NEXT|NO|NO-ECHO|NULL|NULLS|NUMBER|NUMERIC|NUMERIC-DATE|NUMERIC-EDITED|NUMERIC-TIME|OBJECT-COMPUTER|OCCURS|ODT|OF|OFF|OMITTED|ON|OPEN|OPTIONAL|ORDER|ORDERLY|ORGANIZATION|OTHER|OUTPUT|OVERFLOW|OVERLINE|OWN|PACKED-DECIMAL|PADDING|PAGE|PAGE-COUNTER|PASSWORD|PERFORM|PF|PH|PIC|PICTURE|PLUS|POINTER|PORT|POSITION|POSITIVE|PRINTER|PRINTING|PRIVATE|PROCEDURE|PROCEDURE-POINTER|PROCEDURES|PROCEED|PROCESS|PROGRAM|PROGRAM-ID|PROGRAM-LIBRARY|PROMPT|PURGE|QUEUE|QUOTE|QUOTES|RANDOM|RD|READ|READER|REAL|RECEIVE|RECEIVED|RECORD|RECORDING|RECORDS|RECURSIVE|REDEFINES|REEL|REF|REFERENCE|REFERENCES|RELATIVE|RELEASE|REMAINDER|REMARKS|REMOTE|REMOVAL|REMOVE|RENAMES|REPLACE|REPLACING|REPORT|REPORTING|REPORTS|REQUIRED|RERUN|RESERVE|RESET|RETURN|RETURN-CODE|RETURNING|REVERSE-VIDEO|REVERSED|REWIND|REWRITE|RF|RH|RIGHT|ROUNDED|RUN|SAME|SAVE|SCREEN|SD|SEARCH|SECTION|SECURE|SECURITY|SEGMENT|SEGMENT-LIMIT|SELECT|SEND|SENTENCE|SEPARATE|SEQUENCE|SEQUENTIAL|SET|SHARED|SHAREDBYALL|SHAREDBYRUNUNIT|SHARING|SHIFT-IN|SHIFT-OUT|SHORT-DATE|SIGN|SIZE|SORT|SORT-CONTROL|SORT-CORE-SIZE|SORT-FILE-SIZE|SORT-MERGE|SORT-MESSAGE|SORT-MODE-SIZE|SORT-RETURN|SOURCE|SOURCE-COMPUTER|SPACE|SPACES|SPECIAL-NAMES|STANDARD|STANDARD-1|STANDARD-2|START|STATUS|STOP|STRING|SUB-QUEUE-1|SUB-QUEUE-2|SUB-QUEUE-3|SUBTRACT|SUM|SUPPRESS|SYMBOL|SYMBOLIC|SYNC|SYNCHRONIZED|TABLE|TALLY|TALLYING|TAPE|TASK|TERMINAL|TERMINATE|TEST|TEXT|THEN|THREAD|THREAD-LOCAL|THROUGH|THRU|TIME|TIMER|TIMES|TITLE|TO|TODAYS-DATE|TODAYS-NAME|TOP|TRAILING|TRUNCATED|TYPE|TYPEDEF|UNDERLINE|UNIT|UNSTRING|UNTIL|UP|UPON|USAGE|USE|USING|VALUE|VALUES|VARYING|VIRTUAL|WAIT|WHEN|WHEN-COMPILED|WITH|WORDS|WORKING-STORAGE|WRITE|YEAR|YYYYDDD|YYYYMMDD|ZERO-FILL|ZEROES|ZEROS)(?![\w-])/i, lookbehind: true }, diff --git a/components/prism-cobol.min.js b/components/prism-cobol.min.js index b45cafe377..6c68be1aba 100644 --- a/components/prism-cobol.min.js +++ b/components/prism-cobol.min.js @@ -1 +1 @@ -Prism.languages.cobol={comment:{pattern:/\*>.*|(^[ \t]*)\*.*/m,lookbehind:!0,greedy:!0},string:{pattern:/[xzgn]?(?:"(?:[^\r\n"]|"")*"(?!")|'(?:[^\r\n']|'')*'(?!'))/i,greedy:!0},level:{pattern:/(^[ \t]*)\d+\b/m,lookbehind:!0,greedy:!0,alias:"number"},"class-name":{pattern:/(\bpic(?:ture)?\s+)(?:(?:[-\w$/,:*+<>]|\.(?!\s|$))(?:\(\d+\))?)+/i,lookbehind:!0,inside:{number:{pattern:/(\()\d+/,lookbehind:!0},punctuation:/[()]/}},keyword:{pattern:/(^|[^\w-])(?:ABORT|ACCEPT|ACCESS|ADD|ADDRESS|ADVANCING|AFTER|ALIGNED|ALL|ALPHABET|ALPHABETIC|ALPHABETIC-LOWER|ALPHABETIC-UPPER|ALPHANUMERIC|ALPHANUMERIC-EDITED|ALSO|ALTER|ALTERNATE|ANY|ARE|AREA|AREAS|AS|ASCENDING|ASCII|ASSIGN|ASSOCIATED-DATA|ASSOCIATED-DATA-LENGTH|AT|ATTRIBUTE|AUTHOR|AUTO|AUTO-SKIP|BACKGROUND-COLOR|BACKGROUND-COLOUR|BASIS|BEEP|BEFORE|BEGINNING|BELL|BINARY|BIT|BLANK|BLINK|BLOCK|BOUNDS|BOTTOM|BY|BYFUNCTION|BYTITLE|CALL|CANCEL|CAPABLE|CCSVERSION|CD|CF|CH|CHAINING|CHANGED|CHANNEL|CHARACTER|CHARACTERS|CLASS|CLASS-ID|CLOCK-UNITS|CLOSE|CLOSE-DISPOSITION|COBOL|CODE|CODE-SET|COLLATING|COL|COLUMN|COM-REG|COMMA|COMMITMENT|COMMON|COMMUNICATION|COMP|COMP-1|COMP-2|COMP-3|COMP-4|COMP-5|COMPUTATIONAL|COMPUTATIONAL-1|COMPUTATIONAL-2|COMPUTATIONAL-3|COMPUTATIONAL-4|COMPUTATIONAL-5|COMPUTE|CONFIGURATION|CONTAINS|CONTENT|CONTINUE|CONTROL|CONTROL-POINT|CONTROLS|CONVENTION|CONVERTING|COPY|CORR|CORRESPONDING|COUNT|CRUNCH|CURRENCY|CURSOR|DATA|DATA-BASE|DATE|DATE-COMPILED|DATE-WRITTEN|DAY|DAY-OF-WEEK|DBCS|DE|DEBUG-CONTENTS|DEBUG-ITEM|DEBUG-LINE|DEBUG-NAME|DEBUG-SUB-1|DEBUG-SUB-2|DEBUG-SUB-3|DEBUGGING|DECIMAL-POINT|DECLARATIVES|DEFAULT|DEFAULT-DISPLAY|DEFINITION|DELETE|DELIMITED|DELIMITER|DEPENDING|DESCENDING|DESTINATION|DETAIL|DFHRESP|DFHVALUE|DISABLE|DISK|DISPLAY|DISPLAY-1|DIVIDE|DIVISION|DONTCARE|DOUBLE|DOWN|DUPLICATES|DYNAMIC|EBCDIC|EGCS|EGI|ELSE|EMI|EMPTY-CHECK|ENABLE|END|END-ACCEPT|END-ADD|END-CALL|END-COMPUTE|END-DELETE|END-DIVIDE|END-EVALUATE|END-IF|END-MULTIPLY|END-OF-PAGE|END-PERFORM|END-READ|END-RECEIVE|END-RETURN|END-REWRITE|END-SEARCH|END-START|END-STRING|END-SUBTRACT|END-UNSTRING|END-WRITE|ENDING|ENTER|ENTRY|ENTRY-PROCEDURE|ENVIRONMENT|EOP|ERASE|ERROR|EOL|EOS|ESCAPE|ESI|EVALUATE|EVENT|EVERY|EXCEPTION|EXCLUSIVE|EXHIBIT|EXIT|EXPORT|EXTEND|EXTENDED|EXTERNAL|FD|FILE|FILE-CONTROL|FILLER|FINAL|FIRST|FOOTING|FOR|FOREGROUND-COLOR|FOREGROUND-COLOUR|FROM|FULL|FUNCTION|FUNCTIONNAME|FUNCTION-POINTER|GENERATE|GOBACK|GIVING|GLOBAL|GO|GRID|GROUP|HEADING|HIGHLIGHT|HIGH-VALUE|HIGH-VALUES|I-O|I-O-CONTROL|ID|IDENTIFICATION|IF|IMPLICIT|IMPORT|IN|INDEX|INDEXED|INDICATE|INITIAL|INITIALIZE|INITIATE|INPUT|INPUT-OUTPUT|INSPECT|INSTALLATION|INTEGER|INTO|INVALID|INVOKE|IS|JUST|JUSTIFIED|KANJI|KEPT|KEY|KEYBOARD|LABEL|LANGUAGE|LAST|LB|LD|LEADING|LEFT|LEFTLINE|LENGTH|LENGTH-CHECK|LIBACCESS|LIBPARAMETER|LIBRARY|LIMIT|LIMITS|LINAGE|LINAGE-COUNTER|LINE|LINES|LINE-COUNTER|LINKAGE|LIST|LOCAL|LOCAL-STORAGE|LOCK|LONG-DATE|LONG-TIME|LOWER|LOWLIGHT|LOW-VALUE|LOW-VALUES|MEMORY|MERGE|MESSAGE|MMDDYYYY|MODE|MODULES|MORE-LABELS|MOVE|MULTIPLE|MULTIPLY|NAMED|NATIONAL|NATIONAL-EDITED|NATIVE|NEGATIVE|NETWORK|NEXT|NO|NO-ECHO|NULL|NULLS|NUMBER|NUMERIC|NUMERIC-DATE|NUMERIC-EDITED|NUMERIC-TIME|OBJECT-COMPUTER|OCCURS|ODT|OF|OFF|OMITTED|ON|OPEN|OPTIONAL|ORDER|ORDERLY|ORGANIZATION|OTHER|OUTPUT|OVERFLOW|OVERLINE|OWN|PACKED-DECIMAL|PADDING|PAGE|PAGE-COUNTER|PASSWORD|PERFORM|PF|PH|PIC|PICTURE|PLUS|POINTER|POSITION|POSITIVE|PORT|PRINTER|PRINTING|PRIVATE|PROCEDURE|PROCEDURE-POINTER|PROCEDURES|PROCEED|PROCESS|PROGRAM|PROGRAM-ID|PROGRAM-LIBRARY|PROMPT|PURGE|QUEUE|QUOTE|QUOTES|RANDOM|READER|REMOTE|RD|REAL|READ|RECEIVE|RECEIVED|RECORD|RECORDING|RECORDS|RECURSIVE|REDEFINES|REEL|REF|REFERENCE|REFERENCES|RELATIVE|RELEASE|REMAINDER|REMARKS|REMOVAL|REMOVE|RENAMES|REPLACE|REPLACING|REPORT|REPORTING|REPORTS|REQUIRED|RERUN|RESERVE|REVERSE-VIDEO|RESET|RETURN|RETURN-CODE|RETURNING|REVERSED|REWIND|REWRITE|RF|RH|RIGHT|ROUNDED|RUN|SAME|SAVE|SCREEN|SD|SEARCH|SECTION|SECURE|SECURITY|SEGMENT|SEGMENT-LIMIT|SELECT|SEND|SENTENCE|SEPARATE|SEQUENCE|SEQUENTIAL|SET|SHARED|SHAREDBYALL|SHAREDBYRUNUNIT|SHARING|SHIFT-IN|SHIFT-OUT|SHORT-DATE|SIGN|SIZE|SORT|SORT-CONTROL|SORT-CORE-SIZE|SORT-FILE-SIZE|SORT-MERGE|SORT-MESSAGE|SORT-MODE-SIZE|SORT-RETURN|SOURCE|SOURCE-COMPUTER|SPACE|SPACES|SPECIAL-NAMES|STANDARD|STANDARD-1|STANDARD-2|START|STATUS|STOP|STRING|SUB-QUEUE-1|SUB-QUEUE-2|SUB-QUEUE-3|SUBTRACT|SUM|SUPPRESS|SYMBOL|SYMBOLIC|SYNC|SYNCHRONIZED|TABLE|TALLY|TALLYING|TASK|TAPE|TERMINAL|TERMINATE|TEST|TEXT|THEN|THREAD|THREAD-LOCAL|THROUGH|THRU|TIME|TIMER|TIMES|TITLE|TO|TODAYS-DATE|TODAYS-NAME|TOP|TRAILING|TRUNCATED|TYPE|TYPEDEF|UNDERLINE|UNIT|UNSTRING|UNTIL|UP|UPON|USAGE|USE|USING|VALUE|VALUES|VARYING|VIRTUAL|WAIT|WHEN|WHEN-COMPILED|WITH|WORDS|WORKING-STORAGE|WRITE|YEAR|YYYYMMDD|YYYYDDD|ZERO-FILL|ZEROS|ZEROES)(?![\w-])/i,lookbehind:!0},boolean:{pattern:/(^|[^\w-])(?:false|true)(?![\w-])/i,lookbehind:!0},number:{pattern:/(^|[^\w-])(?:[+-]?(?:(?:\d+(?:[.,]\d+)?|[.,]\d+)(?:e[+-]?\d+)?|zero))(?![\w-])/i,lookbehind:!0},operator:[/<>|[<>]=?|[=+*/&]/,{pattern:/(^|[^\w-])(?:-|and|equal|greater|less|not|or|than)(?![\w-])/i,lookbehind:!0}],punctuation:/[.:,()]/}; \ No newline at end of file +Prism.languages.cobol={comment:{pattern:/\*>.*|(^[ \t]*)\*.*/m,lookbehind:!0,greedy:!0},string:{pattern:/[xzgn]?(?:"(?:[^\r\n"]|"")*"(?!")|'(?:[^\r\n']|'')*'(?!'))/i,greedy:!0},level:{pattern:/(^[ \t]*)\d+\b/m,lookbehind:!0,greedy:!0,alias:"number"},"class-name":{pattern:/(\bpic(?:ture)?\s+)(?:(?:[-\w$/,:*+<>]|\.(?!\s|$))(?:\(\d+\))?)+/i,lookbehind:!0,inside:{number:{pattern:/(\()\d+/,lookbehind:!0},punctuation:/[()]/}},keyword:{pattern:/(^|[^\w-])(?:ABORT|ACCEPT|ACCESS|ADD|ADDRESS|ADVANCING|AFTER|ALIGNED|ALL|ALPHABET|ALPHABETIC|ALPHABETIC-LOWER|ALPHABETIC-UPPER|ALPHANUMERIC|ALPHANUMERIC-EDITED|ALSO|ALTER|ALTERNATE|ANY|ARE|AREA|AREAS|AS|ASCENDING|ASCII|ASSIGN|ASSOCIATED-DATA|ASSOCIATED-DATA-LENGTH|AT|ATTRIBUTE|AUTHOR|AUTO|AUTO-SKIP|BACKGROUND-COLOR|BACKGROUND-COLOUR|BASIS|BEEP|BEFORE|BEGINNING|BELL|BINARY|BIT|BLANK|BLINK|BLOCK|BOTTOM|BOUNDS|BY|BYFUNCTION|BYTITLE|CALL|CANCEL|CAPABLE|CCSVERSION|CD|CF|CH|CHAINING|CHANGED|CHANNEL|CHARACTER|CHARACTERS|CLASS|CLASS-ID|CLOCK-UNITS|CLOSE|CLOSE-DISPOSITION|COBOL|CODE|CODE-SET|COL|COLLATING|COLUMN|COM-REG|COMMA|COMMITMENT|COMMON|COMMUNICATION|COMP|COMP-1|COMP-2|COMP-3|COMP-4|COMP-5|COMPUTATIONAL|COMPUTATIONAL-1|COMPUTATIONAL-2|COMPUTATIONAL-3|COMPUTATIONAL-4|COMPUTATIONAL-5|COMPUTE|CONFIGURATION|CONTAINS|CONTENT|CONTINUE|CONTROL|CONTROL-POINT|CONTROLS|CONVENTION|CONVERTING|COPY|CORR|CORRESPONDING|COUNT|CRUNCH|CURRENCY|CURSOR|DATA|DATA-BASE|DATE|DATE-COMPILED|DATE-WRITTEN|DAY|DAY-OF-WEEK|DBCS|DE|DEBUG-CONTENTS|DEBUG-ITEM|DEBUG-LINE|DEBUG-NAME|DEBUG-SUB-1|DEBUG-SUB-2|DEBUG-SUB-3|DEBUGGING|DECIMAL-POINT|DECLARATIVES|DEFAULT|DEFAULT-DISPLAY|DEFINITION|DELETE|DELIMITED|DELIMITER|DEPENDING|DESCENDING|DESTINATION|DETAIL|DFHRESP|DFHVALUE|DISABLE|DISK|DISPLAY|DISPLAY-1|DIVIDE|DIVISION|DONTCARE|DOUBLE|DOWN|DUPLICATES|DYNAMIC|EBCDIC|EGCS|EGI|ELSE|EMI|EMPTY-CHECK|ENABLE|END|END-ACCEPT|END-ADD|END-CALL|END-COMPUTE|END-DELETE|END-DIVIDE|END-EVALUATE|END-IF|END-MULTIPLY|END-OF-PAGE|END-PERFORM|END-READ|END-RECEIVE|END-RETURN|END-REWRITE|END-SEARCH|END-START|END-STRING|END-SUBTRACT|END-UNSTRING|END-WRITE|ENDING|ENTER|ENTRY|ENTRY-PROCEDURE|ENVIRONMENT|EOL|EOP|EOS|ERASE|ERROR|ESCAPE|ESI|EVALUATE|EVENT|EVERY|EXCEPTION|EXCLUSIVE|EXHIBIT|EXIT|EXPORT|EXTEND|EXTENDED|EXTERNAL|FD|FILE|FILE-CONTROL|FILLER|FINAL|FIRST|FOOTING|FOR|FOREGROUND-COLOR|FOREGROUND-COLOUR|FROM|FULL|FUNCTION|FUNCTION-POINTER|FUNCTIONNAME|GENERATE|GIVING|GLOBAL|GO|GOBACK|GRID|GROUP|HEADING|HIGH-VALUE|HIGH-VALUES|HIGHLIGHT|I-O|I-O-CONTROL|ID|IDENTIFICATION|IF|IMPLICIT|IMPORT|IN|INDEX|INDEXED|INDICATE|INITIAL|INITIALIZE|INITIATE|INPUT|INPUT-OUTPUT|INSPECT|INSTALLATION|INTEGER|INTO|INVALID|INVOKE|IS|JUST|JUSTIFIED|KANJI|KEPT|KEY|KEYBOARD|LABEL|LANGUAGE|LAST|LB|LD|LEADING|LEFT|LEFTLINE|LENGTH|LENGTH-CHECK|LIBACCESS|LIBPARAMETER|LIBRARY|LIMIT|LIMITS|LINAGE|LINAGE-COUNTER|LINE|LINE-COUNTER|LINES|LINKAGE|LIST|LOCAL|LOCAL-STORAGE|LOCK|LONG-DATE|LONG-TIME|LOW-VALUE|LOW-VALUES|LOWER|LOWLIGHT|MEMORY|MERGE|MESSAGE|MMDDYYYY|MODE|MODULES|MORE-LABELS|MOVE|MULTIPLE|MULTIPLY|NAMED|NATIONAL|NATIONAL-EDITED|NATIVE|NEGATIVE|NETWORK|NEXT|NO|NO-ECHO|NULL|NULLS|NUMBER|NUMERIC|NUMERIC-DATE|NUMERIC-EDITED|NUMERIC-TIME|OBJECT-COMPUTER|OCCURS|ODT|OF|OFF|OMITTED|ON|OPEN|OPTIONAL|ORDER|ORDERLY|ORGANIZATION|OTHER|OUTPUT|OVERFLOW|OVERLINE|OWN|PACKED-DECIMAL|PADDING|PAGE|PAGE-COUNTER|PASSWORD|PERFORM|PF|PH|PIC|PICTURE|PLUS|POINTER|PORT|POSITION|POSITIVE|PRINTER|PRINTING|PRIVATE|PROCEDURE|PROCEDURE-POINTER|PROCEDURES|PROCEED|PROCESS|PROGRAM|PROGRAM-ID|PROGRAM-LIBRARY|PROMPT|PURGE|QUEUE|QUOTE|QUOTES|RANDOM|RD|READ|READER|REAL|RECEIVE|RECEIVED|RECORD|RECORDING|RECORDS|RECURSIVE|REDEFINES|REEL|REF|REFERENCE|REFERENCES|RELATIVE|RELEASE|REMAINDER|REMARKS|REMOTE|REMOVAL|REMOVE|RENAMES|REPLACE|REPLACING|REPORT|REPORTING|REPORTS|REQUIRED|RERUN|RESERVE|RESET|RETURN|RETURN-CODE|RETURNING|REVERSE-VIDEO|REVERSED|REWIND|REWRITE|RF|RH|RIGHT|ROUNDED|RUN|SAME|SAVE|SCREEN|SD|SEARCH|SECTION|SECURE|SECURITY|SEGMENT|SEGMENT-LIMIT|SELECT|SEND|SENTENCE|SEPARATE|SEQUENCE|SEQUENTIAL|SET|SHARED|SHAREDBYALL|SHAREDBYRUNUNIT|SHARING|SHIFT-IN|SHIFT-OUT|SHORT-DATE|SIGN|SIZE|SORT|SORT-CONTROL|SORT-CORE-SIZE|SORT-FILE-SIZE|SORT-MERGE|SORT-MESSAGE|SORT-MODE-SIZE|SORT-RETURN|SOURCE|SOURCE-COMPUTER|SPACE|SPACES|SPECIAL-NAMES|STANDARD|STANDARD-1|STANDARD-2|START|STATUS|STOP|STRING|SUB-QUEUE-1|SUB-QUEUE-2|SUB-QUEUE-3|SUBTRACT|SUM|SUPPRESS|SYMBOL|SYMBOLIC|SYNC|SYNCHRONIZED|TABLE|TALLY|TALLYING|TAPE|TASK|TERMINAL|TERMINATE|TEST|TEXT|THEN|THREAD|THREAD-LOCAL|THROUGH|THRU|TIME|TIMER|TIMES|TITLE|TO|TODAYS-DATE|TODAYS-NAME|TOP|TRAILING|TRUNCATED|TYPE|TYPEDEF|UNDERLINE|UNIT|UNSTRING|UNTIL|UP|UPON|USAGE|USE|USING|VALUE|VALUES|VARYING|VIRTUAL|WAIT|WHEN|WHEN-COMPILED|WITH|WORDS|WORKING-STORAGE|WRITE|YEAR|YYYYDDD|YYYYMMDD|ZERO-FILL|ZEROES|ZEROS)(?![\w-])/i,lookbehind:!0},boolean:{pattern:/(^|[^\w-])(?:false|true)(?![\w-])/i,lookbehind:!0},number:{pattern:/(^|[^\w-])(?:[+-]?(?:(?:\d+(?:[.,]\d+)?|[.,]\d+)(?:e[+-]?\d+)?|zero))(?![\w-])/i,lookbehind:!0},operator:[/<>|[<>]=?|[=+*/&]/,{pattern:/(^|[^\w-])(?:-|and|equal|greater|less|not|or|than)(?![\w-])/i,lookbehind:!0}],punctuation:/[.:,()]/}; \ No newline at end of file diff --git a/components/prism-coq.js b/components/prism-coq.js index 55a16b46e8..7b483bfcce 100644 --- a/components/prism-coq.js +++ b/components/prism-coq.js @@ -39,7 +39,7 @@ } ], - 'keyword': /\b(?:_|Abort|About|Add|Admit|Admitted|All|apply|Arguments|as|As|Assumptions|at|Axiom|Axioms|Back|BackTo|Backtrace|Bind|BinOp|BinOpSpec|BinRel|Blacklist|by|Canonical|Case|Cd|Check|Class|Classes|Close|Coercion|Coercions|cofix|CoFixpoint|CoInductive|Collection|Combined|Compute|Conjecture|Conjectures|Constant|Constants|Constraint|Constructors|Context|Corollary|Create|CstOp|Custom|Cut|Debug|Declare|Defined|Definition|Delimit|Dependencies|Dependent|Derive|Diffs|Drop|Elimination|else|end|End|Entry|Equality|Eval|Example|Existential|Existentials|Existing|exists|exists2|Export|Extern|Extraction|Fact|Fail|Field|File|Firstorder|fix|Fixpoint|Flags|Focus|for|forall|From|fun|Funclass|Function|Functional|GC|Generalizable|Goal|Grab|Grammar|Graph|Guarded|Haskell|Heap|Hide|Hint|HintDb|Hints|Hypotheses|Hypothesis|Identity|if|IF|Immediate|Implicit|Implicits|Import|in|Include|Induction|Inductive|Infix|Info|Initial|InjTyp|Inline|Inspect|Instance|Instances|Intro|Intros|Inversion|Inversion_clear|JSON|Language|Left|Lemma|let|Let|Lia|Libraries|Library|Load|LoadPath|Locate|Ltac|Ltac2|match|Match|measure|Method|Minimality|ML|Module|Modules|Morphism|move|Next|NoInline|Notation|Number|Obligation|Obligations|OCaml|Opaque|Open|Optimize|Parameter|Parameters|Parametric|Path|Paths|Prenex|Preterm|Primitive|Print|Profile|Projections|Proof|Prop|PropBinOp|Property|PropOp|Proposition|PropUOp|Pwd|Qed|Quit|Rec|Record|Recursive|Redirect|Reduction|Register|Relation|Remark|Remove|removed|Require|Reserved|Reset|Resolve|Restart|return|Rewrite|Right|Ring|Rings|Saturate|Save|Scheme|Scope|Scopes|Search|SearchHead|SearchPattern|SearchRewrite|Section|Separate|Set|Setoid|Show|Signatures|Solve|Solver|Sort|Sortclass|Sorted|Spec|SProp|Step|Strategies|Strategy|String|struct|Structure|SubClass|Subgraph|SuchThat|Tactic|Term|TestCompile|then|Theorem|Time|Timeout|To|Transparent|Type|Typeclasses|Types|Typing|Undelimit|Undo|Unfocus|Unfocused|Unfold|Universe|Universes|UnOp|UnOpSpec|Unshelve|using|Variable|Variables|Variant|Verbose|View|Visibility|wf|where|with|Zify)\b/, + 'keyword': /\b(?:Abort|About|Add|Admit|Admitted|All|Arguments|As|Assumptions|Axiom|Axioms|Back|BackTo|Backtrace|BinOp|BinOpSpec|BinRel|Bind|Blacklist|Canonical|Case|Cd|Check|Class|Classes|Close|CoFixpoint|CoInductive|Coercion|Coercions|Collection|Combined|Compute|Conjecture|Conjectures|Constant|Constants|Constraint|Constructors|Context|Corollary|Create|CstOp|Custom|Cut|Debug|Declare|Defined|Definition|Delimit|Dependencies|Dependent|Derive|Diffs|Drop|Elimination|End|Entry|Equality|Eval|Example|Existential|Existentials|Existing|Export|Extern|Extraction|Fact|Fail|Field|File|Firstorder|Fixpoint|Flags|Focus|From|Funclass|Function|Functional|GC|Generalizable|Goal|Grab|Grammar|Graph|Guarded|Haskell|Heap|Hide|Hint|HintDb|Hints|Hypotheses|Hypothesis|IF|Identity|Immediate|Implicit|Implicits|Import|Include|Induction|Inductive|Infix|Info|Initial|InjTyp|Inline|Inspect|Instance|Instances|Intro|Intros|Inversion|Inversion_clear|JSON|Language|Left|Lemma|Let|Lia|Libraries|Library|Load|LoadPath|Locate|Ltac|Ltac2|ML|Match|Method|Minimality|Module|Modules|Morphism|Next|NoInline|Notation|Number|OCaml|Obligation|Obligations|Opaque|Open|Optimize|Parameter|Parameters|Parametric|Path|Paths|Prenex|Preterm|Primitive|Print|Profile|Projections|Proof|Prop|PropBinOp|PropOp|PropUOp|Property|Proposition|Pwd|Qed|Quit|Rec|Record|Recursive|Redirect|Reduction|Register|Relation|Remark|Remove|Require|Reserved|Reset|Resolve|Restart|Rewrite|Right|Ring|Rings|SProp|Saturate|Save|Scheme|Scope|Scopes|Search|SearchHead|SearchPattern|SearchRewrite|Section|Separate|Set|Setoid|Show|Signatures|Solve|Solver|Sort|Sortclass|Sorted|Spec|Step|Strategies|Strategy|String|Structure|SubClass|Subgraph|SuchThat|Tactic|Term|TestCompile|Theorem|Time|Timeout|To|Transparent|Type|Typeclasses|Types|Typing|UnOp|UnOpSpec|Undelimit|Undo|Unfocus|Unfocused|Unfold|Universe|Universes|Unshelve|Variable|Variables|Variant|Verbose|View|Visibility|Zify|_|apply|as|at|by|cofix|else|end|exists|exists2|fix|for|forall|fun|if|in|let|match|measure|move|removed|return|struct|then|using|wf|where|with)\b/, 'number': /\b(?:0x[a-f0-9][a-f0-9_]*(?:\.[a-f0-9_]+)?(?:p[+-]?\d[\d_]*)?|\d[\d_]*(?:\.[\d_]+)?(?:e[+-]?\d[\d_]*)?)\b/i, diff --git a/components/prism-coq.min.js b/components/prism-coq.min.js index dc34424010..aeb32428c9 100644 --- a/components/prism-coq.min.js +++ b/components/prism-coq.min.js @@ -1 +1 @@ -!function(e){for(var t="\\(\\*(?:[^(*]|\\((?!\\*)|\\*(?!\\))|)*\\*\\)",i=0;i<2;i++)t=t.replace(//g,function(){return t});t=t.replace(//g,"[]"),e.languages.coq={comment:RegExp(t),string:{pattern:/"(?:[^"]|"")*"(?!")/,greedy:!0},attribute:[{pattern:RegExp('#\\[(?:[^\\]("]|"(?:[^"]|"")*"(?!")|\\((?!\\*)|)*\\]'.replace(//g,function(){return t})),greedy:!0,alias:"attr-name",inside:{comment:RegExp(t),string:{pattern:/"(?:[^"]|"")*"(?!")/,greedy:!0},operator:/=/,punctuation:/^#\[|\]$|[,()]/}},{pattern:/\b(?:Cumulative|Global|Local|Monomorphic|NonCumulative|Polymorphic|Private|Program)\b/,alias:"attr-name"}],keyword:/\b(?:_|Abort|About|Add|Admit|Admitted|All|apply|Arguments|as|As|Assumptions|at|Axiom|Axioms|Back|BackTo|Backtrace|Bind|BinOp|BinOpSpec|BinRel|Blacklist|by|Canonical|Case|Cd|Check|Class|Classes|Close|Coercion|Coercions|cofix|CoFixpoint|CoInductive|Collection|Combined|Compute|Conjecture|Conjectures|Constant|Constants|Constraint|Constructors|Context|Corollary|Create|CstOp|Custom|Cut|Debug|Declare|Defined|Definition|Delimit|Dependencies|Dependent|Derive|Diffs|Drop|Elimination|else|end|End|Entry|Equality|Eval|Example|Existential|Existentials|Existing|exists|exists2|Export|Extern|Extraction|Fact|Fail|Field|File|Firstorder|fix|Fixpoint|Flags|Focus|for|forall|From|fun|Funclass|Function|Functional|GC|Generalizable|Goal|Grab|Grammar|Graph|Guarded|Haskell|Heap|Hide|Hint|HintDb|Hints|Hypotheses|Hypothesis|Identity|if|IF|Immediate|Implicit|Implicits|Import|in|Include|Induction|Inductive|Infix|Info|Initial|InjTyp|Inline|Inspect|Instance|Instances|Intro|Intros|Inversion|Inversion_clear|JSON|Language|Left|Lemma|let|Let|Lia|Libraries|Library|Load|LoadPath|Locate|Ltac|Ltac2|match|Match|measure|Method|Minimality|ML|Module|Modules|Morphism|move|Next|NoInline|Notation|Number|Obligation|Obligations|OCaml|Opaque|Open|Optimize|Parameter|Parameters|Parametric|Path|Paths|Prenex|Preterm|Primitive|Print|Profile|Projections|Proof|Prop|PropBinOp|Property|PropOp|Proposition|PropUOp|Pwd|Qed|Quit|Rec|Record|Recursive|Redirect|Reduction|Register|Relation|Remark|Remove|removed|Require|Reserved|Reset|Resolve|Restart|return|Rewrite|Right|Ring|Rings|Saturate|Save|Scheme|Scope|Scopes|Search|SearchHead|SearchPattern|SearchRewrite|Section|Separate|Set|Setoid|Show|Signatures|Solve|Solver|Sort|Sortclass|Sorted|Spec|SProp|Step|Strategies|Strategy|String|struct|Structure|SubClass|Subgraph|SuchThat|Tactic|Term|TestCompile|then|Theorem|Time|Timeout|To|Transparent|Type|Typeclasses|Types|Typing|Undelimit|Undo|Unfocus|Unfocused|Unfold|Universe|Universes|UnOp|UnOpSpec|Unshelve|using|Variable|Variables|Variant|Verbose|View|Visibility|wf|where|with|Zify)\b/,number:/\b(?:0x[a-f0-9][a-f0-9_]*(?:\.[a-f0-9_]+)?(?:p[+-]?\d[\d_]*)?|\d[\d_]*(?:\.[\d_]+)?(?:e[+-]?\d[\d_]*)?)\b/i,punct:{pattern:/@\{|\{\||\[=|:>/,alias:"punctuation"},operator:/\/\\|\\\/|\.{2,3}|:{1,2}=|\*\*|[-=]>|<(?:->?|[+:=>]|<:)|>(?:=|->)|\|[-|]?|[-!%&*+/<=>?@^~']/,punctuation:/\.\(|`\(|@\{|`\{|\{\||\[=|:>|[:.,;(){}\[\]]/}}(Prism); \ No newline at end of file +!function(e){for(var t="\\(\\*(?:[^(*]|\\((?!\\*)|\\*(?!\\))|)*\\*\\)",i=0;i<2;i++)t=t.replace(//g,function(){return t});t=t.replace(//g,"[]"),e.languages.coq={comment:RegExp(t),string:{pattern:/"(?:[^"]|"")*"(?!")/,greedy:!0},attribute:[{pattern:RegExp('#\\[(?:[^\\]("]|"(?:[^"]|"")*"(?!")|\\((?!\\*)|)*\\]'.replace(//g,function(){return t})),greedy:!0,alias:"attr-name",inside:{comment:RegExp(t),string:{pattern:/"(?:[^"]|"")*"(?!")/,greedy:!0},operator:/=/,punctuation:/^#\[|\]$|[,()]/}},{pattern:/\b(?:Cumulative|Global|Local|Monomorphic|NonCumulative|Polymorphic|Private|Program)\b/,alias:"attr-name"}],keyword:/\b(?:Abort|About|Add|Admit|Admitted|All|Arguments|As|Assumptions|Axiom|Axioms|Back|BackTo|Backtrace|BinOp|BinOpSpec|BinRel|Bind|Blacklist|Canonical|Case|Cd|Check|Class|Classes|Close|CoFixpoint|CoInductive|Coercion|Coercions|Collection|Combined|Compute|Conjecture|Conjectures|Constant|Constants|Constraint|Constructors|Context|Corollary|Create|CstOp|Custom|Cut|Debug|Declare|Defined|Definition|Delimit|Dependencies|Dependent|Derive|Diffs|Drop|Elimination|End|Entry|Equality|Eval|Example|Existential|Existentials|Existing|Export|Extern|Extraction|Fact|Fail|Field|File|Firstorder|Fixpoint|Flags|Focus|From|Funclass|Function|Functional|GC|Generalizable|Goal|Grab|Grammar|Graph|Guarded|Haskell|Heap|Hide|Hint|HintDb|Hints|Hypotheses|Hypothesis|IF|Identity|Immediate|Implicit|Implicits|Import|Include|Induction|Inductive|Infix|Info|Initial|InjTyp|Inline|Inspect|Instance|Instances|Intro|Intros|Inversion|Inversion_clear|JSON|Language|Left|Lemma|Let|Lia|Libraries|Library|Load|LoadPath|Locate|Ltac|Ltac2|ML|Match|Method|Minimality|Module|Modules|Morphism|Next|NoInline|Notation|Number|OCaml|Obligation|Obligations|Opaque|Open|Optimize|Parameter|Parameters|Parametric|Path|Paths|Prenex|Preterm|Primitive|Print|Profile|Projections|Proof|Prop|PropBinOp|PropOp|PropUOp|Property|Proposition|Pwd|Qed|Quit|Rec|Record|Recursive|Redirect|Reduction|Register|Relation|Remark|Remove|Require|Reserved|Reset|Resolve|Restart|Rewrite|Right|Ring|Rings|SProp|Saturate|Save|Scheme|Scope|Scopes|Search|SearchHead|SearchPattern|SearchRewrite|Section|Separate|Set|Setoid|Show|Signatures|Solve|Solver|Sort|Sortclass|Sorted|Spec|Step|Strategies|Strategy|String|Structure|SubClass|Subgraph|SuchThat|Tactic|Term|TestCompile|Theorem|Time|Timeout|To|Transparent|Type|Typeclasses|Types|Typing|UnOp|UnOpSpec|Undelimit|Undo|Unfocus|Unfocused|Unfold|Universe|Universes|Unshelve|Variable|Variables|Variant|Verbose|View|Visibility|Zify|_|apply|as|at|by|cofix|else|end|exists|exists2|fix|for|forall|fun|if|in|let|match|measure|move|removed|return|struct|then|using|wf|where|with)\b/,number:/\b(?:0x[a-f0-9][a-f0-9_]*(?:\.[a-f0-9_]+)?(?:p[+-]?\d[\d_]*)?|\d[\d_]*(?:\.[\d_]+)?(?:e[+-]?\d[\d_]*)?)\b/i,punct:{pattern:/@\{|\{\||\[=|:>/,alias:"punctuation"},operator:/\/\\|\\\/|\.{2,3}|:{1,2}=|\*\*|[-=]>|<(?:->?|[+:=>]|<:)|>(?:=|->)|\|[-|]?|[-!%&*+/<=>?@^~']/,punctuation:/\.\(|`\(|@\{|`\{|\{\||\[=|:>|[:.,;(){}\[\]]/}}(Prism); \ No newline at end of file diff --git a/components/prism-cpp.js b/components/prism-cpp.js index cffefb0c49..070cdd9cf8 100644 --- a/components/prism-cpp.js +++ b/components/prism-cpp.js @@ -1,6 +1,6 @@ (function (Prism) { - var keyword = /\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char8_t|char16_t|char32_t|class|compl|concept|const|consteval|constexpr|constinit|const_cast|continue|co_await|co_return|co_yield|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int8_t|int16_t|int32_t|int64_t|uint8_t|uint16_t|uint32_t|uint64_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/; + var keyword = /\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/; var modName = /\b(?!)\w+(?:\s*\.\s*\w+)*\b/.source.replace(//g, function () { return keyword.source; }); Prism.languages.cpp = Prism.languages.extend('c', { @@ -28,14 +28,14 @@ greedy: true }, 'operator': />>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/, - 'boolean': /\b(?:true|false)\b/ + 'boolean': /\b(?:false|true)\b/ }); Prism.languages.insertBefore('cpp', 'string', { 'module': { // https://en.cppreference.com/w/cpp/language/modules pattern: RegExp( - /(\b(?:module|import)\s+)/.source + + /(\b(?:import|module)\s+)/.source + '(?:' + // header-name /"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source + diff --git a/components/prism-cpp.min.js b/components/prism-cpp.min.js index ee8582639d..128911e6f3 100644 --- a/components/prism-cpp.min.js +++ b/components/prism-cpp.min.js @@ -1 +1 @@ -!function(e){var t=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char8_t|char16_t|char32_t|class|compl|concept|const|consteval|constexpr|constinit|const_cast|continue|co_await|co_return|co_yield|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int8_t|int16_t|int32_t|int64_t|uint8_t|uint16_t|uint32_t|uint64_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,n="\\b(?!)\\w+(?:\\s*\\.\\s*\\w+)*\\b".replace(//g,function(){return t.source});e.languages.cpp=e.languages.extend("c",{"class-name":[{pattern:RegExp("(\\b(?:class|concept|enum|struct|typename)\\s+)(?!)\\w+".replace(//g,function(){return t.source})),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:t,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:true|false)\b/}),e.languages.insertBefore("cpp","string",{module:{pattern:RegExp('(\\b(?:module|import)\\s+)(?:"(?:\\\\(?:\r\n|[^])|[^"\\\\\r\n])*"|<[^<>\r\n]*>|'+"(?:\\s*:\\s*)?|:\\s*".replace(//g,function(){return n})+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),e.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:e.languages.cpp}}}}),e.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),e.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:e.languages.extend("cpp",{})}}),e.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},e.languages.cpp["base-clause"])}(Prism); \ No newline at end of file +!function(e){var t=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,n="\\b(?!)\\w+(?:\\s*\\.\\s*\\w+)*\\b".replace(//g,function(){return t.source});e.languages.cpp=e.languages.extend("c",{"class-name":[{pattern:RegExp("(\\b(?:class|concept|enum|struct|typename)\\s+)(?!)\\w+".replace(//g,function(){return t.source})),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:t,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),e.languages.insertBefore("cpp","string",{module:{pattern:RegExp('(\\b(?:import|module)\\s+)(?:"(?:\\\\(?:\r\n|[^])|[^"\\\\\r\n])*"|<[^<>\r\n]*>|'+"(?:\\s*:\\s*)?|:\\s*".replace(//g,function(){return n})+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),e.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:e.languages.cpp}}}}),e.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),e.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:e.languages.extend("cpp",{})}}),e.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},e.languages.cpp["base-clause"])}(Prism); \ No newline at end of file diff --git a/components/prism-crystal.js b/components/prism-crystal.js index 497b49f3e2..cda3f38b7b 100644 --- a/components/prism-crystal.js +++ b/components/prism-crystal.js @@ -1,7 +1,7 @@ (function (Prism) { Prism.languages.crystal = Prism.languages.extend('ruby', { keyword: [ - /\b(?:abstract|alias|as|asm|begin|break|case|class|def|do|else|elsif|end|ensure|enum|extend|for|fun|if|include|instance_sizeof|lib|macro|module|next|of|out|pointerof|private|protected|rescue|return|require|select|self|sizeof|struct|super|then|type|typeof|uninitialized|union|unless|until|when|while|with|yield|__DIR__|__END_LINE__|__FILE__|__LINE__)\b/, + /\b(?:__DIR__|__END_LINE__|__FILE__|__LINE__|abstract|alias|as|asm|begin|break|case|class|def|do|else|elsif|end|ensure|enum|extend|for|fun|if|include|instance_sizeof|lib|macro|module|next|of|out|pointerof|private|protected|require|rescue|return|select|self|sizeof|struct|super|then|type|typeof|uninitialized|union|unless|until|when|while|with|yield)\b/, { pattern: /(\.\s*)(?:is_a|responds_to)\?/, lookbehind: true diff --git a/components/prism-crystal.min.js b/components/prism-crystal.min.js index 3b6a4b4061..0d58c05795 100644 --- a/components/prism-crystal.min.js +++ b/components/prism-crystal.min.js @@ -1 +1 @@ -!function(e){e.languages.crystal=e.languages.extend("ruby",{keyword:[/\b(?:abstract|alias|as|asm|begin|break|case|class|def|do|else|elsif|end|ensure|enum|extend|for|fun|if|include|instance_sizeof|lib|macro|module|next|of|out|pointerof|private|protected|rescue|return|require|select|self|sizeof|struct|super|then|type|typeof|uninitialized|union|unless|until|when|while|with|yield|__DIR__|__END_LINE__|__FILE__|__LINE__)\b/,{pattern:/(\.\s*)(?:is_a|responds_to)\?/,lookbehind:!0}],number:/\b(?:0b[01_]*[01]|0o[0-7_]*[0-7]|0x[\da-fA-F_]*[\da-fA-F]|(?:\d(?:[\d_]*\d)?)(?:\.[\d_]*\d)?(?:[eE][+-]?[\d_]*\d)?)(?:_(?:[uif](?:8|16|32|64))?)?\b/}),e.languages.insertBefore("crystal","string",{attribute:{pattern:/@\[.+?\]/,alias:"attr-name",inside:{delimiter:{pattern:/^@\[|\]$/,alias:"tag"},rest:e.languages.crystal}},expansion:[{pattern:/\{\{.+?\}\}/,inside:{delimiter:{pattern:/^\{\{|\}\}$/,alias:"tag"},rest:e.languages.crystal}},{pattern:/\{%.+?%\}/,inside:{delimiter:{pattern:/^\{%|%\}$/,alias:"tag"},rest:e.languages.crystal}}]})}(Prism); \ No newline at end of file +!function(e){e.languages.crystal=e.languages.extend("ruby",{keyword:[/\b(?:__DIR__|__END_LINE__|__FILE__|__LINE__|abstract|alias|as|asm|begin|break|case|class|def|do|else|elsif|end|ensure|enum|extend|for|fun|if|include|instance_sizeof|lib|macro|module|next|of|out|pointerof|private|protected|require|rescue|return|select|self|sizeof|struct|super|then|type|typeof|uninitialized|union|unless|until|when|while|with|yield)\b/,{pattern:/(\.\s*)(?:is_a|responds_to)\?/,lookbehind:!0}],number:/\b(?:0b[01_]*[01]|0o[0-7_]*[0-7]|0x[\da-fA-F_]*[\da-fA-F]|(?:\d(?:[\d_]*\d)?)(?:\.[\d_]*\d)?(?:[eE][+-]?[\d_]*\d)?)(?:_(?:[uif](?:8|16|32|64))?)?\b/}),e.languages.insertBefore("crystal","string",{attribute:{pattern:/@\[.+?\]/,alias:"attr-name",inside:{delimiter:{pattern:/^@\[|\]$/,alias:"tag"},rest:e.languages.crystal}},expansion:[{pattern:/\{\{.+?\}\}/,inside:{delimiter:{pattern:/^\{\{|\}\}$/,alias:"tag"},rest:e.languages.crystal}},{pattern:/\{%.+?%\}/,inside:{delimiter:{pattern:/^\{%|%\}$/,alias:"tag"},rest:e.languages.crystal}}]})}(Prism); \ No newline at end of file diff --git a/components/prism-csharp.js b/components/prism-csharp.js index b20f86d4d6..8eb261cc1c 100644 --- a/components/prism-csharp.js +++ b/components/prism-csharp.js @@ -164,7 +164,7 @@ ], 'keyword': keywords, // https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/language-specification/lexical-structure#literals - 'number': /(?:\b0(?:x[\da-f_]*[\da-f]|b[01_]*[01])|(?:\B\.\d+(?:_+\d+)*|\b\d+(?:_+\d+)*(?:\.\d+(?:_+\d+)*)?)(?:e[-+]?\d+(?:_+\d+)*)?)(?:ul|lu|[dflmu])?\b/i, + 'number': /(?:\b0(?:x[\da-f_]*[\da-f]|b[01_]*[01])|(?:\B\.\d+(?:_+\d+)*|\b\d+(?:_+\d+)*(?:\.\d+(?:_+\d+)*)?)(?:e[-+]?\d+(?:_+\d+)*)?)(?:[dflmu]|lu|ul)?\b/i, 'operator': />>=?|<<=?|[-=]>|([-+&|])\1|~|\?\?=?|[-+*/%&|^!=<>]=?/, 'punctuation': /\?\.?|::|[{}[\];(),.:]/ }); @@ -196,7 +196,7 @@ }, 'type-expression': { // default(Foo), typeof(Foo), sizeof(int) - pattern: re(/(\b(?:default|typeof|sizeof)\s*\(\s*(?!\s))(?:[^()\s]|\s(?!\s)|<<0>>)*(?=\s*\))/.source, [nestedRound]), + pattern: re(/(\b(?:default|sizeof|typeof)\s*\(\s*(?!\s))(?:[^()\s]|\s(?!\s)|<<0>>)*(?=\s*\))/.source, [nestedRound]), lookbehind: true, alias: 'class-name', inside: typeInside diff --git a/components/prism-csharp.min.js b/components/prism-csharp.min.js index f691792318..ff2ec69c10 100644 --- a/components/prism-csharp.min.js +++ b/components/prism-csharp.min.js @@ -1 +1 @@ -!function(s){function a(e,s){return e.replace(/<<(\d+)>>/g,function(e,n){return"(?:"+s[+n]+")"})}function t(e,n,s){return RegExp(a(e,n),s||"")}function e(e,n){for(var s=0;s>/g,function(){return"(?:"+e+")"});return e.replace(/<>/g,"[^\\s\\S]")}var n="bool byte char decimal double dynamic float int long object sbyte short string uint ulong ushort var void",r="class enum interface record struct",i="add alias and ascending async await by descending from(?=\\s*(?:\\w|$)) get global group into init(?=\\s*;) join let nameof not notnull on or orderby partial remove select set unmanaged value when where with(?=\\s*{)",o="abstract as base break case catch checked const continue default delegate do else event explicit extern finally fixed for foreach goto if implicit in internal is lock namespace new null operator out override params private protected public readonly ref return sealed sizeof stackalloc static switch this throw try typeof unchecked unsafe using virtual volatile while yield";function l(e){return"\\b(?:"+e.trim().replace(/ /g,"|")+")\\b"}var d=l(r),p=RegExp(l(n+" "+r+" "+i+" "+o)),c=l(r+" "+i+" "+o),u=l(n+" "+r+" "+o),g=e("<(?:[^<>;=+\\-*/%&|^]|<>)*>",2),b=e("\\((?:[^()]|<>)*\\)",2),h="@?\\b[A-Za-z_]\\w*\\b",f=a("<<0>>(?:\\s*<<1>>)?",[h,g]),m=a("(?!<<0>>)<<1>>(?:\\s*\\.\\s*<<1>>)*",[c,f]),k="\\[\\s*(?:,\\s*)*\\]",y=a("<<0>>(?:\\s*(?:\\?\\s*)?<<1>>)*(?:\\s*\\?)?",[m,k]),w=a("(?:<<0>>|<<1>>)(?:\\s*(?:\\?\\s*)?<<2>>)*(?:\\s*\\?)?",[a("\\(<<0>>+(?:,<<0>>+)+\\)",[a("[^,()<>[\\];=+\\-*/%&|^]|<<0>>|<<1>>|<<2>>",[g,b,k])]),m,k]),v={keyword:p,punctuation:/[<>()?,.:[\]]/},x="'(?:[^\r\n'\\\\]|\\\\.|\\\\[Uux][\\da-fA-F]{1,8})'",$='"(?:\\\\.|[^\\\\"\r\n])*"';s.languages.csharp=s.languages.extend("clike",{string:[{pattern:t("(^|[^$\\\\])<<0>>",['@"(?:""|\\\\[^]|[^\\\\"])*"(?!")']),lookbehind:!0,greedy:!0},{pattern:t("(^|[^@$\\\\])<<0>>",[$]),lookbehind:!0,greedy:!0},{pattern:RegExp(x),greedy:!0,alias:"character"}],"class-name":[{pattern:t("(\\busing\\s+static\\s+)<<0>>(?=\\s*;)",[m]),lookbehind:!0,inside:v},{pattern:t("(\\busing\\s+<<0>>\\s*=\\s*)<<1>>(?=\\s*;)",[h,w]),lookbehind:!0,inside:v},{pattern:t("(\\busing\\s+)<<0>>(?=\\s*=)",[h]),lookbehind:!0},{pattern:t("(\\b<<0>>\\s+)<<1>>",[d,f]),lookbehind:!0,inside:v},{pattern:t("(\\bcatch\\s*\\(\\s*)<<0>>",[m]),lookbehind:!0,inside:v},{pattern:t("(\\bwhere\\s+)<<0>>",[h]),lookbehind:!0},{pattern:t("(\\b(?:is(?:\\s+not)?|as)\\s+)<<0>>",[y]),lookbehind:!0,inside:v},{pattern:t("\\b<<0>>(?=\\s+(?!<<1>>|with\\s*\\{)<<2>>(?:\\s*[=,;:{)\\]]|\\s+(?:in|when)\\b))",[w,u,h]),inside:v}],keyword:p,number:/(?:\b0(?:x[\da-f_]*[\da-f]|b[01_]*[01])|(?:\B\.\d+(?:_+\d+)*|\b\d+(?:_+\d+)*(?:\.\d+(?:_+\d+)*)?)(?:e[-+]?\d+(?:_+\d+)*)?)(?:ul|lu|[dflmu])?\b/i,operator:/>>=?|<<=?|[-=]>|([-+&|])\1|~|\?\?=?|[-+*/%&|^!=<>]=?/,punctuation:/\?\.?|::|[{}[\];(),.:]/}),s.languages.insertBefore("csharp","number",{range:{pattern:/\.\./,alias:"operator"}}),s.languages.insertBefore("csharp","punctuation",{"named-parameter":{pattern:t("([(,]\\s*)<<0>>(?=\\s*:)",[h]),lookbehind:!0,alias:"punctuation"}}),s.languages.insertBefore("csharp","class-name",{namespace:{pattern:t("(\\b(?:namespace|using)\\s+)<<0>>(?:\\s*\\.\\s*<<0>>)*(?=\\s*[;{])",[h]),lookbehind:!0,inside:{punctuation:/\./}},"type-expression":{pattern:t("(\\b(?:default|typeof|sizeof)\\s*\\(\\s*(?!\\s))(?:[^()\\s]|\\s(?!\\s)|<<0>>)*(?=\\s*\\))",[b]),lookbehind:!0,alias:"class-name",inside:v},"return-type":{pattern:t("<<0>>(?=\\s+(?:<<1>>\\s*(?:=>|[({]|\\.\\s*this\\s*\\[)|this\\s*\\[))",[w,m]),inside:v,alias:"class-name"},"constructor-invocation":{pattern:t("(\\bnew\\s+)<<0>>(?=\\s*[[({])",[w]),lookbehind:!0,inside:v,alias:"class-name"},"generic-method":{pattern:t("<<0>>\\s*<<1>>(?=\\s*\\()",[h,g]),inside:{function:t("^<<0>>",[h]),generic:{pattern:RegExp(g),alias:"class-name",inside:v}}},"type-list":{pattern:t("\\b((?:<<0>>\\s+<<1>>|record\\s+<<1>>\\s*<<5>>|where\\s+<<2>>)\\s*:\\s*)(?:<<3>>|<<4>>|<<1>>\\s*<<5>>|<<6>>)(?:\\s*,\\s*(?:<<3>>|<<4>>|<<6>>))*(?=\\s*(?:where|[{;]|=>|$))",[d,f,h,w,p.source,b,"\\bnew\\s*\\(\\s*\\)"]),lookbehind:!0,inside:{"record-arguments":{pattern:t("(^(?!new\\s*\\()<<0>>\\s*)<<1>>",[f,b]),lookbehind:!0,greedy:!0,inside:s.languages.csharp},keyword:p,"class-name":{pattern:RegExp(w),greedy:!0,inside:v},punctuation:/[,()]/}},preprocessor:{pattern:/(^[\t ]*)#.*/m,lookbehind:!0,alias:"property",inside:{directive:{pattern:/(#)\b(?:define|elif|else|endif|endregion|error|if|line|nullable|pragma|region|undef|warning)\b/,lookbehind:!0,alias:"keyword"}}}});var _=$+"|"+x,B=a("/(?![*/])|//[^\r\n]*[\r\n]|/\\*(?:[^*]|\\*(?!/))*\\*/|<<0>>",[_]),E=e(a("[^\"'/()]|<<0>>|\\(<>*\\)",[B]),2),R="\\b(?:assembly|event|field|method|module|param|property|return|type)\\b",P=a("<<0>>(?:\\s*\\(<<1>>*\\))?",[m,E]);s.languages.insertBefore("csharp","class-name",{attribute:{pattern:t("((?:^|[^\\s\\w>)?])\\s*\\[\\s*)(?:<<0>>\\s*:\\s*)?<<1>>(?:\\s*,\\s*<<1>>)*(?=\\s*\\])",[R,P]),lookbehind:!0,greedy:!0,inside:{target:{pattern:t("^<<0>>(?=\\s*:)",[R]),alias:"keyword"},"attribute-arguments":{pattern:t("\\(<<0>>*\\)",[E]),inside:s.languages.csharp},"class-name":{pattern:RegExp(m),inside:{punctuation:/\./}},punctuation:/[:,]/}}});var z=":[^}\r\n]+",S=e(a("[^\"'/()]|<<0>>|\\(<>*\\)",[B]),2),j=a("\\{(?!\\{)(?:(?![}:])<<0>>)*<<1>>?\\}",[S,z]),A=e(a("[^\"'/()]|/(?!\\*)|/\\*(?:[^*]|\\*(?!/))*\\*/|<<0>>|\\(<>*\\)",[_]),2),F=a("\\{(?!\\{)(?:(?![}:])<<0>>)*<<1>>?\\}",[A,z]);function U(e,n){return{interpolation:{pattern:t("((?:^|[^{])(?:\\{\\{)*)<<0>>",[e]),lookbehind:!0,inside:{"format-string":{pattern:t("(^\\{(?:(?![}:])<<0>>)*)<<1>>(?=\\}$)",[n,z]),lookbehind:!0,inside:{punctuation:/^:/}},punctuation:/^\{|\}$/,expression:{pattern:/[\s\S]+/,alias:"language-csharp",inside:s.languages.csharp}}},string:/[\s\S]+/}}s.languages.insertBefore("csharp","string",{"interpolation-string":[{pattern:t('(^|[^\\\\])(?:\\$@|@\\$)"(?:""|\\\\[^]|\\{\\{|<<0>>|[^\\\\{"])*"',[j]),lookbehind:!0,greedy:!0,inside:U(j,S)},{pattern:t('(^|[^@\\\\])\\$"(?:\\\\.|\\{\\{|<<0>>|[^\\\\"{])*"',[F]),lookbehind:!0,greedy:!0,inside:U(F,A)}]})}(Prism),Prism.languages.dotnet=Prism.languages.cs=Prism.languages.csharp; \ No newline at end of file +!function(s){function a(e,s){return e.replace(/<<(\d+)>>/g,function(e,n){return"(?:"+s[+n]+")"})}function t(e,n,s){return RegExp(a(e,n),s||"")}function e(e,n){for(var s=0;s>/g,function(){return"(?:"+e+")"});return e.replace(/<>/g,"[^\\s\\S]")}var n="bool byte char decimal double dynamic float int long object sbyte short string uint ulong ushort var void",r="class enum interface record struct",i="add alias and ascending async await by descending from(?=\\s*(?:\\w|$)) get global group into init(?=\\s*;) join let nameof not notnull on or orderby partial remove select set unmanaged value when where with(?=\\s*{)",o="abstract as base break case catch checked const continue default delegate do else event explicit extern finally fixed for foreach goto if implicit in internal is lock namespace new null operator out override params private protected public readonly ref return sealed sizeof stackalloc static switch this throw try typeof unchecked unsafe using virtual volatile while yield";function l(e){return"\\b(?:"+e.trim().replace(/ /g,"|")+")\\b"}var d=l(r),p=RegExp(l(n+" "+r+" "+i+" "+o)),c=l(r+" "+i+" "+o),u=l(n+" "+r+" "+o),g=e("<(?:[^<>;=+\\-*/%&|^]|<>)*>",2),b=e("\\((?:[^()]|<>)*\\)",2),h="@?\\b[A-Za-z_]\\w*\\b",f=a("<<0>>(?:\\s*<<1>>)?",[h,g]),m=a("(?!<<0>>)<<1>>(?:\\s*\\.\\s*<<1>>)*",[c,f]),k="\\[\\s*(?:,\\s*)*\\]",y=a("<<0>>(?:\\s*(?:\\?\\s*)?<<1>>)*(?:\\s*\\?)?",[m,k]),w=a("(?:<<0>>|<<1>>)(?:\\s*(?:\\?\\s*)?<<2>>)*(?:\\s*\\?)?",[a("\\(<<0>>+(?:,<<0>>+)+\\)",[a("[^,()<>[\\];=+\\-*/%&|^]|<<0>>|<<1>>|<<2>>",[g,b,k])]),m,k]),v={keyword:p,punctuation:/[<>()?,.:[\]]/},x="'(?:[^\r\n'\\\\]|\\\\.|\\\\[Uux][\\da-fA-F]{1,8})'",$='"(?:\\\\.|[^\\\\"\r\n])*"';s.languages.csharp=s.languages.extend("clike",{string:[{pattern:t("(^|[^$\\\\])<<0>>",['@"(?:""|\\\\[^]|[^\\\\"])*"(?!")']),lookbehind:!0,greedy:!0},{pattern:t("(^|[^@$\\\\])<<0>>",[$]),lookbehind:!0,greedy:!0},{pattern:RegExp(x),greedy:!0,alias:"character"}],"class-name":[{pattern:t("(\\busing\\s+static\\s+)<<0>>(?=\\s*;)",[m]),lookbehind:!0,inside:v},{pattern:t("(\\busing\\s+<<0>>\\s*=\\s*)<<1>>(?=\\s*;)",[h,w]),lookbehind:!0,inside:v},{pattern:t("(\\busing\\s+)<<0>>(?=\\s*=)",[h]),lookbehind:!0},{pattern:t("(\\b<<0>>\\s+)<<1>>",[d,f]),lookbehind:!0,inside:v},{pattern:t("(\\bcatch\\s*\\(\\s*)<<0>>",[m]),lookbehind:!0,inside:v},{pattern:t("(\\bwhere\\s+)<<0>>",[h]),lookbehind:!0},{pattern:t("(\\b(?:is(?:\\s+not)?|as)\\s+)<<0>>",[y]),lookbehind:!0,inside:v},{pattern:t("\\b<<0>>(?=\\s+(?!<<1>>|with\\s*\\{)<<2>>(?:\\s*[=,;:{)\\]]|\\s+(?:in|when)\\b))",[w,u,h]),inside:v}],keyword:p,number:/(?:\b0(?:x[\da-f_]*[\da-f]|b[01_]*[01])|(?:\B\.\d+(?:_+\d+)*|\b\d+(?:_+\d+)*(?:\.\d+(?:_+\d+)*)?)(?:e[-+]?\d+(?:_+\d+)*)?)(?:[dflmu]|lu|ul)?\b/i,operator:/>>=?|<<=?|[-=]>|([-+&|])\1|~|\?\?=?|[-+*/%&|^!=<>]=?/,punctuation:/\?\.?|::|[{}[\];(),.:]/}),s.languages.insertBefore("csharp","number",{range:{pattern:/\.\./,alias:"operator"}}),s.languages.insertBefore("csharp","punctuation",{"named-parameter":{pattern:t("([(,]\\s*)<<0>>(?=\\s*:)",[h]),lookbehind:!0,alias:"punctuation"}}),s.languages.insertBefore("csharp","class-name",{namespace:{pattern:t("(\\b(?:namespace|using)\\s+)<<0>>(?:\\s*\\.\\s*<<0>>)*(?=\\s*[;{])",[h]),lookbehind:!0,inside:{punctuation:/\./}},"type-expression":{pattern:t("(\\b(?:default|sizeof|typeof)\\s*\\(\\s*(?!\\s))(?:[^()\\s]|\\s(?!\\s)|<<0>>)*(?=\\s*\\))",[b]),lookbehind:!0,alias:"class-name",inside:v},"return-type":{pattern:t("<<0>>(?=\\s+(?:<<1>>\\s*(?:=>|[({]|\\.\\s*this\\s*\\[)|this\\s*\\[))",[w,m]),inside:v,alias:"class-name"},"constructor-invocation":{pattern:t("(\\bnew\\s+)<<0>>(?=\\s*[[({])",[w]),lookbehind:!0,inside:v,alias:"class-name"},"generic-method":{pattern:t("<<0>>\\s*<<1>>(?=\\s*\\()",[h,g]),inside:{function:t("^<<0>>",[h]),generic:{pattern:RegExp(g),alias:"class-name",inside:v}}},"type-list":{pattern:t("\\b((?:<<0>>\\s+<<1>>|record\\s+<<1>>\\s*<<5>>|where\\s+<<2>>)\\s*:\\s*)(?:<<3>>|<<4>>|<<1>>\\s*<<5>>|<<6>>)(?:\\s*,\\s*(?:<<3>>|<<4>>|<<6>>))*(?=\\s*(?:where|[{;]|=>|$))",[d,f,h,w,p.source,b,"\\bnew\\s*\\(\\s*\\)"]),lookbehind:!0,inside:{"record-arguments":{pattern:t("(^(?!new\\s*\\()<<0>>\\s*)<<1>>",[f,b]),lookbehind:!0,greedy:!0,inside:s.languages.csharp},keyword:p,"class-name":{pattern:RegExp(w),greedy:!0,inside:v},punctuation:/[,()]/}},preprocessor:{pattern:/(^[\t ]*)#.*/m,lookbehind:!0,alias:"property",inside:{directive:{pattern:/(#)\b(?:define|elif|else|endif|endregion|error|if|line|nullable|pragma|region|undef|warning)\b/,lookbehind:!0,alias:"keyword"}}}});var _=$+"|"+x,B=a("/(?![*/])|//[^\r\n]*[\r\n]|/\\*(?:[^*]|\\*(?!/))*\\*/|<<0>>",[_]),E=e(a("[^\"'/()]|<<0>>|\\(<>*\\)",[B]),2),R="\\b(?:assembly|event|field|method|module|param|property|return|type)\\b",P=a("<<0>>(?:\\s*\\(<<1>>*\\))?",[m,E]);s.languages.insertBefore("csharp","class-name",{attribute:{pattern:t("((?:^|[^\\s\\w>)?])\\s*\\[\\s*)(?:<<0>>\\s*:\\s*)?<<1>>(?:\\s*,\\s*<<1>>)*(?=\\s*\\])",[R,P]),lookbehind:!0,greedy:!0,inside:{target:{pattern:t("^<<0>>(?=\\s*:)",[R]),alias:"keyword"},"attribute-arguments":{pattern:t("\\(<<0>>*\\)",[E]),inside:s.languages.csharp},"class-name":{pattern:RegExp(m),inside:{punctuation:/\./}},punctuation:/[:,]/}}});var z=":[^}\r\n]+",S=e(a("[^\"'/()]|<<0>>|\\(<>*\\)",[B]),2),j=a("\\{(?!\\{)(?:(?![}:])<<0>>)*<<1>>?\\}",[S,z]),A=e(a("[^\"'/()]|/(?!\\*)|/\\*(?:[^*]|\\*(?!/))*\\*/|<<0>>|\\(<>*\\)",[_]),2),F=a("\\{(?!\\{)(?:(?![}:])<<0>>)*<<1>>?\\}",[A,z]);function U(e,n){return{interpolation:{pattern:t("((?:^|[^{])(?:\\{\\{)*)<<0>>",[e]),lookbehind:!0,inside:{"format-string":{pattern:t("(^\\{(?:(?![}:])<<0>>)*)<<1>>(?=\\}$)",[n,z]),lookbehind:!0,inside:{punctuation:/^:/}},punctuation:/^\{|\}$/,expression:{pattern:/[\s\S]+/,alias:"language-csharp",inside:s.languages.csharp}}},string:/[\s\S]+/}}s.languages.insertBefore("csharp","string",{"interpolation-string":[{pattern:t('(^|[^\\\\])(?:\\$@|@\\$)"(?:""|\\\\[^]|\\{\\{|<<0>>|[^\\\\{"])*"',[j]),lookbehind:!0,greedy:!0,inside:U(j,S)},{pattern:t('(^|[^@\\\\])\\$"(?:\\\\.|\\{\\{|<<0>>|[^\\\\"{])*"',[F]),lookbehind:!0,greedy:!0,inside:U(F,A)}]})}(Prism),Prism.languages.dotnet=Prism.languages.cs=Prism.languages.csharp; \ No newline at end of file diff --git a/components/prism-css-extras.js b/components/prism-css-extras.js index 18ac2d8998..be82d17e98 100644 --- a/components/prism-css-extras.js +++ b/components/prism-css-extras.js @@ -102,7 +102,7 @@ lookbehind: true }, { - pattern: /\b(?:rgb|hsl)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:rgb|hsl)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i, + pattern: /\b(?:hsl|rgb)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:hsl|rgb)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i, inside: { 'unit': unit, 'number': number, diff --git a/components/prism-css-extras.min.js b/components/prism-css-extras.min.js index 04e6b2a0ef..b420594f91 100644 --- a/components/prism-css-extras.min.js +++ b/components/prism-css-extras.min.js @@ -1 +1 @@ -!function(e){var a,n=/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/;e.languages.css.selector={pattern:e.languages.css.selector.pattern,lookbehind:!0,inside:a={"pseudo-element":/:(?:after|before|first-letter|first-line|selection)|::[-\w]+/,"pseudo-class":/:[-\w]+/,class:/\.[-\w]+/,id:/#[-\w]+/,attribute:{pattern:RegExp("\\[(?:[^[\\]\"']|"+n.source+")*\\]"),greedy:!0,inside:{punctuation:/^\[|\]$/,"case-sensitivity":{pattern:/(\s)[si]$/i,lookbehind:!0,alias:"keyword"},namespace:{pattern:/^(\s*)(?:(?!\s)[-*\w\xA0-\uFFFF])*\|(?!=)/,lookbehind:!0,inside:{punctuation:/\|$/}},"attr-name":{pattern:/^(\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+/,lookbehind:!0},"attr-value":[n,{pattern:/(=\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+(?=\s*$)/,lookbehind:!0}],operator:/[|~*^$]?=/}},"n-th":[{pattern:/(\(\s*)[+-]?\d*[\dn](?:\s*[+-]\s*\d+)?(?=\s*\))/,lookbehind:!0,inside:{number:/[\dn]+/,operator:/[+-]/}},{pattern:/(\(\s*)(?:even|odd)(?=\s*\))/i,lookbehind:!0}],combinator:/>|\+|~|\|\|/,punctuation:/[(),]/}},e.languages.css.atrule.inside["selector-function-argument"].inside=a,e.languages.insertBefore("css","property",{variable:{pattern:/(^|[^-\w\xA0-\uFFFF])--(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*/i,lookbehind:!0}});var r={pattern:/(\b\d+)(?:%|[a-z]+(?![\w-]))/,lookbehind:!0},i={pattern:/(^|[^\w.-])-?(?:\d+(?:\.\d+)?|\.\d+)/,lookbehind:!0};e.languages.insertBefore("css","function",{operator:{pattern:/(\s)[+\-*\/](?=\s)/,lookbehind:!0},hexcode:{pattern:/\B#[\da-f]{3,8}\b/i,alias:"color"},color:[{pattern:/(^|[^\w-])(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)(?![\w-])/i,lookbehind:!0},{pattern:/\b(?:rgb|hsl)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:rgb|hsl)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,inside:{unit:r,number:i,function:/[\w-]+(?=\()/,punctuation:/[(),]/}}],entity:/\\[\da-f]{1,8}/i,unit:r,number:i})}(Prism); \ No newline at end of file +!function(e){var a,n=/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/;e.languages.css.selector={pattern:e.languages.css.selector.pattern,lookbehind:!0,inside:a={"pseudo-element":/:(?:after|before|first-letter|first-line|selection)|::[-\w]+/,"pseudo-class":/:[-\w]+/,class:/\.[-\w]+/,id:/#[-\w]+/,attribute:{pattern:RegExp("\\[(?:[^[\\]\"']|"+n.source+")*\\]"),greedy:!0,inside:{punctuation:/^\[|\]$/,"case-sensitivity":{pattern:/(\s)[si]$/i,lookbehind:!0,alias:"keyword"},namespace:{pattern:/^(\s*)(?:(?!\s)[-*\w\xA0-\uFFFF])*\|(?!=)/,lookbehind:!0,inside:{punctuation:/\|$/}},"attr-name":{pattern:/^(\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+/,lookbehind:!0},"attr-value":[n,{pattern:/(=\s*)(?:(?!\s)[-\w\xA0-\uFFFF])+(?=\s*$)/,lookbehind:!0}],operator:/[|~*^$]?=/}},"n-th":[{pattern:/(\(\s*)[+-]?\d*[\dn](?:\s*[+-]\s*\d+)?(?=\s*\))/,lookbehind:!0,inside:{number:/[\dn]+/,operator:/[+-]/}},{pattern:/(\(\s*)(?:even|odd)(?=\s*\))/i,lookbehind:!0}],combinator:/>|\+|~|\|\|/,punctuation:/[(),]/}},e.languages.css.atrule.inside["selector-function-argument"].inside=a,e.languages.insertBefore("css","property",{variable:{pattern:/(^|[^-\w\xA0-\uFFFF])--(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*/i,lookbehind:!0}});var r={pattern:/(\b\d+)(?:%|[a-z]+(?![\w-]))/,lookbehind:!0},i={pattern:/(^|[^\w.-])-?(?:\d+(?:\.\d+)?|\.\d+)/,lookbehind:!0};e.languages.insertBefore("css","function",{operator:{pattern:/(\s)[+\-*\/](?=\s)/,lookbehind:!0},hexcode:{pattern:/\B#[\da-f]{3,8}\b/i,alias:"color"},color:[{pattern:/(^|[^\w-])(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)(?![\w-])/i,lookbehind:!0},{pattern:/\b(?:hsl|rgb)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:hsl|rgb)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,inside:{unit:r,number:i,function:/[\w-]+(?=\()/,punctuation:/[(),]/}}],entity:/\\[\da-f]{1,8}/i,unit:r,number:i})}(Prism); \ No newline at end of file diff --git a/components/prism-cypher.js b/components/prism-cypher.js index ec07c93906..ffee292a34 100644 --- a/components/prism-cypher.js +++ b/components/prism-cypher.js @@ -29,7 +29,7 @@ Prism.languages.cypher = { 'function': /\b\w+\b(?=\s*\()/, - 'boolean': /\b(?:true|false|null)\b/i, + 'boolean': /\b(?:false|null|true)\b/i, 'number': /\b(?:0x[\da-fA-F]+|\d+(?:\.\d+)?(?:[eE][+-]?\d+)?)\b/, // https://neo4j.com/docs/cypher-manual/current/syntax/operators/ 'operator': /:|<--?|--?>?|<>|=~?|[<>]=?|[+*/%^|]|\.\.\.?/, diff --git a/components/prism-cypher.min.js b/components/prism-cypher.min.js index f6e78ef9d8..5bf0a2ee80 100644 --- a/components/prism-cypher.min.js +++ b/components/prism-cypher.min.js @@ -1 +1 @@ -Prism.languages.cypher={comment:/\/\/.*/,string:{pattern:/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/,greedy:!0},"class-name":{pattern:/(:\s*)(?:\w+|`(?:[^`\\\r\n])*`)(?=\s*[{):])/,lookbehind:!0,greedy:!0},relationship:{pattern:/(-\[\s*(?:\w+\s*|`(?:[^`\\\r\n])*`\s*)?:\s*|\|\s*:\s*)(?:\w+|`(?:[^`\\\r\n])*`)/,lookbehind:!0,greedy:!0,alias:"property"},identifier:{pattern:/`(?:[^`\\\r\n])*`/,greedy:!0,alias:"symbol"},variable:/\$\w+/,keyword:/\b(?:ADD|ALL|AND|AS|ASC|ASCENDING|ASSERT|BY|CALL|CASE|COMMIT|CONSTRAINT|CONTAINS|CREATE|CSV|DELETE|DESC|DESCENDING|DETACH|DISTINCT|DO|DROP|ELSE|END|ENDS|EXISTS|FOR|FOREACH|IN|INDEX|IS|JOIN|KEY|LIMIT|LOAD|MANDATORY|MATCH|MERGE|NODE|NOT|OF|ON|OPTIONAL|OR|ORDER(?=\s+BY)|PERIODIC|REMOVE|REQUIRE|RETURN|SCALAR|SCAN|SET|SKIP|START|STARTS|THEN|UNION|UNIQUE|UNWIND|USING|WHEN|WHERE|WITH|XOR|YIELD)\b/i,function:/\b\w+\b(?=\s*\()/,boolean:/\b(?:true|false|null)\b/i,number:/\b(?:0x[\da-fA-F]+|\d+(?:\.\d+)?(?:[eE][+-]?\d+)?)\b/,operator:/:|<--?|--?>?|<>|=~?|[<>]=?|[+*/%^|]|\.\.\.?/,punctuation:/[()[\]{},;.]/}; \ No newline at end of file +Prism.languages.cypher={comment:/\/\/.*/,string:{pattern:/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/,greedy:!0},"class-name":{pattern:/(:\s*)(?:\w+|`(?:[^`\\\r\n])*`)(?=\s*[{):])/,lookbehind:!0,greedy:!0},relationship:{pattern:/(-\[\s*(?:\w+\s*|`(?:[^`\\\r\n])*`\s*)?:\s*|\|\s*:\s*)(?:\w+|`(?:[^`\\\r\n])*`)/,lookbehind:!0,greedy:!0,alias:"property"},identifier:{pattern:/`(?:[^`\\\r\n])*`/,greedy:!0,alias:"symbol"},variable:/\$\w+/,keyword:/\b(?:ADD|ALL|AND|AS|ASC|ASCENDING|ASSERT|BY|CALL|CASE|COMMIT|CONSTRAINT|CONTAINS|CREATE|CSV|DELETE|DESC|DESCENDING|DETACH|DISTINCT|DO|DROP|ELSE|END|ENDS|EXISTS|FOR|FOREACH|IN|INDEX|IS|JOIN|KEY|LIMIT|LOAD|MANDATORY|MATCH|MERGE|NODE|NOT|OF|ON|OPTIONAL|OR|ORDER(?=\s+BY)|PERIODIC|REMOVE|REQUIRE|RETURN|SCALAR|SCAN|SET|SKIP|START|STARTS|THEN|UNION|UNIQUE|UNWIND|USING|WHEN|WHERE|WITH|XOR|YIELD)\b/i,function:/\b\w+\b(?=\s*\()/,boolean:/\b(?:false|null|true)\b/i,number:/\b(?:0x[\da-fA-F]+|\d+(?:\.\d+)?(?:[eE][+-]?\d+)?)\b/,operator:/:|<--?|--?>?|<>|=~?|[<>]=?|[+*/%^|]|\.\.\.?/,punctuation:/[()[\]{},;.]/}; \ No newline at end of file diff --git a/components/prism-d.js b/components/prism-d.js index 30a23e067c..f381482509 100644 --- a/components/prism-d.js +++ b/components/prism-d.js @@ -54,7 +54,7 @@ Prism.languages.d = Prism.languages.extend('clike', { ], // In order: $, keywords and special tokens, globally defined symbols - 'keyword': /\$|\b(?:abstract|alias|align|asm|assert|auto|body|bool|break|byte|case|cast|catch|cdouble|cent|cfloat|char|class|const|continue|creal|dchar|debug|default|delegate|delete|deprecated|do|double|else|enum|export|extern|false|final|finally|float|for|foreach|foreach_reverse|function|goto|idouble|if|ifloat|immutable|import|inout|int|interface|invariant|ireal|lazy|long|macro|mixin|module|new|nothrow|null|out|override|package|pragma|private|protected|public|pure|real|ref|return|scope|shared|short|static|struct|super|switch|synchronized|template|this|throw|true|try|typedef|typeid|typeof|ubyte|ucent|uint|ulong|union|unittest|ushort|version|void|volatile|wchar|while|with|__(?:(?:FILE|MODULE|LINE|FUNCTION|PRETTY_FUNCTION|DATE|EOF|TIME|TIMESTAMP|VENDOR|VERSION)__|gshared|traits|vector|parameters)|string|wstring|dstring|size_t|ptrdiff_t)\b/, + 'keyword': /\$|\b(?:__(?:(?:DATE|EOF|FILE|FUNCTION|LINE|MODULE|PRETTY_FUNCTION|TIMESTAMP|TIME|VENDOR|VERSION)__|gshared|parameters|traits|vector)|abstract|alias|align|asm|assert|auto|body|bool|break|byte|case|cast|catch|cdouble|cent|cfloat|char|class|const|continue|creal|dchar|debug|default|delegate|delete|deprecated|do|double|dstring|else|enum|export|extern|false|final|finally|float|for|foreach|foreach_reverse|function|goto|idouble|if|ifloat|immutable|import|inout|int|interface|invariant|ireal|lazy|long|macro|mixin|module|new|nothrow|null|out|override|package|pragma|private|protected|ptrdiff_t|public|pure|real|ref|return|scope|shared|short|size_t|static|string|struct|super|switch|synchronized|template|this|throw|true|try|typedef|typeid|typeof|ubyte|ucent|uint|ulong|union|unittest|ushort|version|void|volatile|wchar|while|with|wstring)\b/, 'number': [ // The lookbehind and the negative look-ahead try to prevent bad highlighting of the .. operator @@ -76,7 +76,7 @@ Prism.languages.insertBefore('d', 'keyword', { Prism.languages.insertBefore('d', 'function', { 'register': { // Iasm registers - pattern: /\b(?:[ABCD][LHX]|E[ABCD]X|E?(?:BP|SP|DI|SI)|[ECSDGF]S|CR[0234]|DR[012367]|TR[3-7]|X?MM[0-7]|R[ABCD]X|[BS]PL|R[BS]P|[DS]IL|R[DS]I|R(?:[89]|1[0-5])[BWD]?|XMM(?:[89]|1[0-5])|YMM(?:1[0-5]|\d))\b|\bST(?:\([0-7]\)|\b)/, + pattern: /\b(?:[ABCD][LHX]|E?(?:BP|DI|SI|SP)|[BS]PL|[ECSDGF]S|CR[0234]|[DS]IL|DR[012367]|E[ABCD]X|X?MM[0-7]|R(?:1[0-5]|[89])[BWD]?|R[ABCD]X|R[BS]P|R[DS]I|TR[3-7]|XMM(?:1[0-5]|[89])|YMM(?:1[0-5]|\d))\b|\bST(?:\([0-7]\)|\b)/, alias: 'variable' } }); diff --git a/components/prism-d.min.js b/components/prism-d.min.js index 37d692fd52..f2ddeb1751 100644 --- a/components/prism-d.min.js +++ b/components/prism-d.min.js @@ -1 +1 @@ -Prism.languages.d=Prism.languages.extend("clike",{comment:[{pattern:/^\s*#!.+/,greedy:!0},{pattern:RegExp("(^|[^\\\\])(?:"+["/\\+(?:/\\+(?:[^+]|\\+(?!/))*\\+/|(?!/\\+)[^])*?\\+/","//.*","/\\*[^]*?\\*/"].join("|")+")"),lookbehind:!0,greedy:!0}],string:[{pattern:RegExp(['\\b[rx]"(?:\\\\[^]|[^\\\\"])*"[cwd]?','\\bq"(?:\\[[^]*?\\]|\\([^]*?\\)|<[^]*?>|\\{[^]*?\\})"','\\bq"((?!\\d)\\w+)$[^]*?^\\1"','\\bq"(.)[^]*?\\2"',"'(?:\\\\(?:\\W|\\w+)|[^\\\\])'",'(["`])(?:\\\\[^]|(?!\\3)[^\\\\])*\\3[cwd]?'].join("|"),"m"),greedy:!0},{pattern:/\bq\{(?:\{[^{}]*\}|[^{}])*\}/,greedy:!0,alias:"token-string"}],keyword:/\$|\b(?:abstract|alias|align|asm|assert|auto|body|bool|break|byte|case|cast|catch|cdouble|cent|cfloat|char|class|const|continue|creal|dchar|debug|default|delegate|delete|deprecated|do|double|else|enum|export|extern|false|final|finally|float|for|foreach|foreach_reverse|function|goto|idouble|if|ifloat|immutable|import|inout|int|interface|invariant|ireal|lazy|long|macro|mixin|module|new|nothrow|null|out|override|package|pragma|private|protected|public|pure|real|ref|return|scope|shared|short|static|struct|super|switch|synchronized|template|this|throw|true|try|typedef|typeid|typeof|ubyte|ucent|uint|ulong|union|unittest|ushort|version|void|volatile|wchar|while|with|__(?:(?:FILE|MODULE|LINE|FUNCTION|PRETTY_FUNCTION|DATE|EOF|TIME|TIMESTAMP|VENDOR|VERSION)__|gshared|traits|vector|parameters)|string|wstring|dstring|size_t|ptrdiff_t)\b/,number:[/\b0x\.?[a-f\d_]+(?:(?!\.\.)\.[a-f\d_]*)?(?:p[+-]?[a-f\d_]+)?[ulfi]{0,4}/i,{pattern:/((?:\.\.)?)(?:\b0b\.?|\b|\.)\d[\d_]*(?:(?!\.\.)\.[\d_]*)?(?:e[+-]?\d[\d_]*)?[ulfi]{0,4}/i,lookbehind:!0}],operator:/\|[|=]?|&[&=]?|\+[+=]?|-[-=]?|\.?\.\.|=[>=]?|!(?:i[ns]\b|<>?=?|>=?|=)?|\bi[ns]\b|(?:<[<>]?|>>?>?|\^\^|[*\/%^~])=?/}),Prism.languages.insertBefore("d","keyword",{property:/\B@\w*/}),Prism.languages.insertBefore("d","function",{register:{pattern:/\b(?:[ABCD][LHX]|E[ABCD]X|E?(?:BP|SP|DI|SI)|[ECSDGF]S|CR[0234]|DR[012367]|TR[3-7]|X?MM[0-7]|R[ABCD]X|[BS]PL|R[BS]P|[DS]IL|R[DS]I|R(?:[89]|1[0-5])[BWD]?|XMM(?:[89]|1[0-5])|YMM(?:1[0-5]|\d))\b|\bST(?:\([0-7]\)|\b)/,alias:"variable"}}); \ No newline at end of file +Prism.languages.d=Prism.languages.extend("clike",{comment:[{pattern:/^\s*#!.+/,greedy:!0},{pattern:RegExp("(^|[^\\\\])(?:"+["/\\+(?:/\\+(?:[^+]|\\+(?!/))*\\+/|(?!/\\+)[^])*?\\+/","//.*","/\\*[^]*?\\*/"].join("|")+")"),lookbehind:!0,greedy:!0}],string:[{pattern:RegExp(['\\b[rx]"(?:\\\\[^]|[^\\\\"])*"[cwd]?','\\bq"(?:\\[[^]*?\\]|\\([^]*?\\)|<[^]*?>|\\{[^]*?\\})"','\\bq"((?!\\d)\\w+)$[^]*?^\\1"','\\bq"(.)[^]*?\\2"',"'(?:\\\\(?:\\W|\\w+)|[^\\\\])'",'(["`])(?:\\\\[^]|(?!\\3)[^\\\\])*\\3[cwd]?'].join("|"),"m"),greedy:!0},{pattern:/\bq\{(?:\{[^{}]*\}|[^{}])*\}/,greedy:!0,alias:"token-string"}],keyword:/\$|\b(?:__(?:(?:DATE|EOF|FILE|FUNCTION|LINE|MODULE|PRETTY_FUNCTION|TIMESTAMP|TIME|VENDOR|VERSION)__|gshared|parameters|traits|vector)|abstract|alias|align|asm|assert|auto|body|bool|break|byte|case|cast|catch|cdouble|cent|cfloat|char|class|const|continue|creal|dchar|debug|default|delegate|delete|deprecated|do|double|dstring|else|enum|export|extern|false|final|finally|float|for|foreach|foreach_reverse|function|goto|idouble|if|ifloat|immutable|import|inout|int|interface|invariant|ireal|lazy|long|macro|mixin|module|new|nothrow|null|out|override|package|pragma|private|protected|ptrdiff_t|public|pure|real|ref|return|scope|shared|short|size_t|static|string|struct|super|switch|synchronized|template|this|throw|true|try|typedef|typeid|typeof|ubyte|ucent|uint|ulong|union|unittest|ushort|version|void|volatile|wchar|while|with|wstring)\b/,number:[/\b0x\.?[a-f\d_]+(?:(?!\.\.)\.[a-f\d_]*)?(?:p[+-]?[a-f\d_]+)?[ulfi]{0,4}/i,{pattern:/((?:\.\.)?)(?:\b0b\.?|\b|\.)\d[\d_]*(?:(?!\.\.)\.[\d_]*)?(?:e[+-]?\d[\d_]*)?[ulfi]{0,4}/i,lookbehind:!0}],operator:/\|[|=]?|&[&=]?|\+[+=]?|-[-=]?|\.?\.\.|=[>=]?|!(?:i[ns]\b|<>?=?|>=?|=)?|\bi[ns]\b|(?:<[<>]?|>>?>?|\^\^|[*\/%^~])=?/}),Prism.languages.insertBefore("d","keyword",{property:/\B@\w*/}),Prism.languages.insertBefore("d","function",{register:{pattern:/\b(?:[ABCD][LHX]|E?(?:BP|DI|SI|SP)|[BS]PL|[ECSDGF]S|CR[0234]|[DS]IL|DR[012367]|E[ABCD]X|X?MM[0-7]|R(?:1[0-5]|[89])[BWD]?|R[ABCD]X|R[BS]P|R[DS]I|TR[3-7]|XMM(?:1[0-5]|[89])|YMM(?:1[0-5]|\d))\b|\bST(?:\([0-7]\)|\b)/,alias:"variable"}}); \ No newline at end of file diff --git a/components/prism-dart.js b/components/prism-dart.js index 8d1687de88..564f92156e 100644 --- a/components/prism-dart.js +++ b/components/prism-dart.js @@ -1,7 +1,7 @@ (function (Prism) { var keywords = [ /\b(?:async|sync|yield)\*/, - /\b(?:abstract|assert|async|await|break|case|catch|class|const|continue|covariant|default|deferred|do|dynamic|else|enum|export|extension|external|extends|factory|final|finally|for|get|hide|if|implements|interface|import|in|library|mixin|new|null|on|operator|part|rethrow|return|set|show|static|super|switch|sync|this|throw|try|typedef|var|void|while|with|yield)\b/ + /\b(?:abstract|assert|async|await|break|case|catch|class|const|continue|covariant|default|deferred|do|dynamic|else|enum|export|extends|extension|external|factory|final|finally|for|get|hide|if|implements|import|in|interface|library|mixin|new|null|on|operator|part|rethrow|return|set|show|static|super|switch|sync|this|throw|try|typedef|var|void|while|with|yield)\b/ ]; // Handles named imports, such as http.Client diff --git a/components/prism-dart.min.js b/components/prism-dart.min.js index 03e935bdb4..833c7e1e78 100644 --- a/components/prism-dart.min.js +++ b/components/prism-dart.min.js @@ -1 +1 @@ -!function(e){var a=[/\b(?:async|sync|yield)\*/,/\b(?:abstract|assert|async|await|break|case|catch|class|const|continue|covariant|default|deferred|do|dynamic|else|enum|export|extension|external|extends|factory|final|finally|for|get|hide|if|implements|interface|import|in|library|mixin|new|null|on|operator|part|rethrow|return|set|show|static|super|switch|sync|this|throw|try|typedef|var|void|while|with|yield)\b/],t="(^|[^\\w.])(?:[a-z]\\w*\\s*\\.\\s*)*(?:[A-Z]\\w*\\s*\\.\\s*)*",s={pattern:RegExp(t+"[A-Z](?:[\\d_A-Z]*[a-z]\\w*)?\\b"),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}}}};e.languages.dart=e.languages.extend("clike",{string:[{pattern:/r?("""|''')[\s\S]*?\1/,greedy:!0},{pattern:/r?(["'])(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0}],"class-name":[s,{pattern:RegExp(t+"[A-Z]\\w*(?=\\s+\\w+\\s*[;,=()])"),lookbehind:!0,inside:s.inside}],keyword:a,operator:/\bis!|\b(?:as|is)\b|\+\+|--|&&|\|\||<<=?|>>=?|~(?:\/=?)?|[+\-*\/%&^|=!<>]=?|\?/}),e.languages.insertBefore("dart","function",{metadata:{pattern:/@\w+/,alias:"symbol"}}),e.languages.insertBefore("dart","class-name",{generics:{pattern:/<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<[\w\s,.&?]*>)*>)*>)*>/,inside:{"class-name":s,keyword:a,punctuation:/[<>(),.:]/,operator:/[?&|]/}}})}(Prism); \ No newline at end of file +!function(e){var a=[/\b(?:async|sync|yield)\*/,/\b(?:abstract|assert|async|await|break|case|catch|class|const|continue|covariant|default|deferred|do|dynamic|else|enum|export|extends|extension|external|factory|final|finally|for|get|hide|if|implements|import|in|interface|library|mixin|new|null|on|operator|part|rethrow|return|set|show|static|super|switch|sync|this|throw|try|typedef|var|void|while|with|yield)\b/],t="(^|[^\\w.])(?:[a-z]\\w*\\s*\\.\\s*)*(?:[A-Z]\\w*\\s*\\.\\s*)*",s={pattern:RegExp(t+"[A-Z](?:[\\d_A-Z]*[a-z]\\w*)?\\b"),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}}}};e.languages.dart=e.languages.extend("clike",{string:[{pattern:/r?("""|''')[\s\S]*?\1/,greedy:!0},{pattern:/r?(["'])(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0}],"class-name":[s,{pattern:RegExp(t+"[A-Z]\\w*(?=\\s+\\w+\\s*[;,=()])"),lookbehind:!0,inside:s.inside}],keyword:a,operator:/\bis!|\b(?:as|is)\b|\+\+|--|&&|\|\||<<=?|>>=?|~(?:\/=?)?|[+\-*\/%&^|=!<>]=?|\?/}),e.languages.insertBefore("dart","function",{metadata:{pattern:/@\w+/,alias:"symbol"}}),e.languages.insertBefore("dart","class-name",{generics:{pattern:/<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<[\w\s,.&?]*>)*>)*>)*>/,inside:{"class-name":s,keyword:a,punctuation:/[<>(),.:]/,operator:/[?&|]/}}})}(Prism); \ No newline at end of file diff --git a/components/prism-dataweave.js b/components/prism-dataweave.js index 7572323ea2..986b3a1c8f 100644 --- a/components/prism-dataweave.js +++ b/components/prism-dataweave.js @@ -9,7 +9,7 @@ pattern: /(["'`])(?:\\[\s\S]|(?!\1)[^\\])*\1/, greedy: true }, - 'mime-type': /\b(?:text|audio|video|application|multipart|image)\/[\w+-]+/, + 'mime-type': /\b(?:application|audio|image|multipart|text|video)\/[\w+-]+/, 'date': { pattern: /\|[\w:+-]+\|/, greedy: true @@ -34,8 +34,8 @@ 'number': /-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i, 'punctuation': /[{}[\];(),.:@]/, 'operator': /<<|>>|->|[<>~=]=?|!=|--?-?|\+\+?|!|\?/, - 'boolean': /\b(?:true|false)\b/, - 'keyword': /\b(?:match|input|output|ns|type|update|null|if|else|using|unless|at|is|as|case|do|fun|var|not|and|or)\b/ + 'boolean': /\b(?:false|true)\b/, + 'keyword': /\b(?:and|as|at|case|do|else|fun|if|input|is|match|not|ns|null|or|output|type|unless|update|using|var)\b/ }; }(Prism)); diff --git a/components/prism-dataweave.min.js b/components/prism-dataweave.min.js index 743ed469df..52ac90d264 100644 --- a/components/prism-dataweave.min.js +++ b/components/prism-dataweave.min.js @@ -1 +1 @@ -Prism.languages.dataweave={url:/\b[A-Za-z]+:\/\/[\w/:.?=&-]+|\burn:[\w:.?=&-]+/,property:{pattern:/(?:\b\w+#)?(?:"(?:\\.|[^\\"\r\n])*"|\b\w+)(?=\s*[:@])/,greedy:!0},string:{pattern:/(["'`])(?:\\[\s\S]|(?!\1)[^\\])*\1/,greedy:!0},"mime-type":/\b(?:text|audio|video|application|multipart|image)\/[\w+-]+/,date:{pattern:/\|[\w:+-]+\|/,greedy:!0},comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],regex:{pattern:/\/(?:[^\\\/\r\n]|\\[^\r\n])+\//,greedy:!0},function:/\b[A-Z_]\w*(?=\s*\()/i,number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\];(),.:@]/,operator:/<<|>>|->|[<>~=]=?|!=|--?-?|\+\+?|!|\?/,boolean:/\b(?:true|false)\b/,keyword:/\b(?:match|input|output|ns|type|update|null|if|else|using|unless|at|is|as|case|do|fun|var|not|and|or)\b/}; \ No newline at end of file +Prism.languages.dataweave={url:/\b[A-Za-z]+:\/\/[\w/:.?=&-]+|\burn:[\w:.?=&-]+/,property:{pattern:/(?:\b\w+#)?(?:"(?:\\.|[^\\"\r\n])*"|\b\w+)(?=\s*[:@])/,greedy:!0},string:{pattern:/(["'`])(?:\\[\s\S]|(?!\1)[^\\])*\1/,greedy:!0},"mime-type":/\b(?:application|audio|image|multipart|text|video)\/[\w+-]+/,date:{pattern:/\|[\w:+-]+\|/,greedy:!0},comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],regex:{pattern:/\/(?:[^\\\/\r\n]|\\[^\r\n])+\//,greedy:!0},function:/\b[A-Z_]\w*(?=\s*\()/i,number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\];(),.:@]/,operator:/<<|>>|->|[<>~=]=?|!=|--?-?|\+\+?|!|\?/,boolean:/\b(?:false|true)\b/,keyword:/\b(?:and|as|at|case|do|else|fun|if|input|is|match|not|ns|null|or|output|type|unless|update|using|var)\b/}; \ No newline at end of file diff --git a/components/prism-dax.js b/components/prism-dax.js index 8d73d4f580..03490c5e43 100644 --- a/components/prism-dax.js +++ b/components/prism-dax.js @@ -16,9 +16,9 @@ Prism.languages.dax = { greedy: true }, 'function': /\b(?:ABS|ACOS|ACOSH|ACOT|ACOTH|ADDCOLUMNS|ADDMISSINGITEMS|ALL|ALLCROSSFILTERED|ALLEXCEPT|ALLNOBLANKROW|ALLSELECTED|AND|APPROXIMATEDISTINCTCOUNT|ASIN|ASINH|ATAN|ATANH|AVERAGE|AVERAGEA|AVERAGEX|BETA\.DIST|BETA\.INV|BLANK|CALCULATE|CALCULATETABLE|CALENDAR|CALENDARAUTO|CEILING|CHISQ\.DIST|CHISQ\.DIST\.RT|CHISQ\.INV|CHISQ\.INV\.RT|CLOSINGBALANCEMONTH|CLOSINGBALANCEQUARTER|CLOSINGBALANCEYEAR|COALESCE|COMBIN|COMBINA|COMBINEVALUES|CONCATENATE|CONCATENATEX|CONFIDENCE\.NORM|CONFIDENCE\.T|CONTAINS|CONTAINSROW|CONTAINSSTRING|CONTAINSSTRINGEXACT|CONVERT|COS|COSH|COT|COTH|COUNT|COUNTA|COUNTAX|COUNTBLANK|COUNTROWS|COUNTX|CROSSFILTER|CROSSJOIN|CURRENCY|CURRENTGROUP|CUSTOMDATA|DATATABLE|DATE|DATEADD|DATEDIFF|DATESBETWEEN|DATESINPERIOD|DATESMTD|DATESQTD|DATESYTD|DATEVALUE|DAY|DEGREES|DETAILROWS|DISTINCT|DISTINCTCOUNT|DISTINCTCOUNTNOBLANK|DIVIDE|EARLIER|EARLIEST|EDATE|ENDOFMONTH|ENDOFQUARTER|ENDOFYEAR|EOMONTH|ERROR|EVEN|EXACT|EXCEPT|EXP|EXPON\.DIST|FACT|FALSE|FILTER|FILTERS|FIND|FIRSTDATE|FIRSTNONBLANK|FIRSTNONBLANKVALUE|FIXED|FLOOR|FORMAT|GCD|GENERATE|GENERATEALL|GENERATESERIES|GEOMEAN|GEOMEANX|GROUPBY|HASONEFILTER|HASONEVALUE|HOUR|IF|IF\.EAGER|IFERROR|IGNORE|INT|INTERSECT|ISBLANK|ISCROSSFILTERED|ISEMPTY|ISERROR|ISEVEN|ISFILTERED|ISINSCOPE|ISLOGICAL|ISNONTEXT|ISNUMBER|ISO\.CEILING|ISODD|ISONORAFTER|ISSELECTEDMEASURE|ISSUBTOTAL|ISTEXT|KEEPFILTERS|KEYWORDMATCH|LASTDATE|LASTNONBLANK|LASTNONBLANKVALUE|LCM|LEFT|LEN|LN|LOG|LOG10|LOOKUPVALUE|LOWER|MAX|MAXA|MAXX|MEDIAN|MEDIANX|MID|MIN|MINA|MINUTE|MINX|MOD|MONTH|MROUND|NATURALINNERJOIN|NATURALLEFTOUTERJOIN|NEXTDAY|NEXTMONTH|NEXTQUARTER|NEXTYEAR|NONVISUAL|NORM\.DIST|NORM\.INV|NORM\.S\.DIST|NORM\.S\.INV|NOT|NOW|ODD|OPENINGBALANCEMONTH|OPENINGBALANCEQUARTER|OPENINGBALANCEYEAR|OR|PARALLELPERIOD|PATH|PATHCONTAINS|PATHITEM|PATHITEMREVERSE|PATHLENGTH|PERCENTILE\.EXC|PERCENTILE\.INC|PERCENTILEX\.EXC|PERCENTILEX\.INC|PERMUT|PI|POISSON\.DIST|POWER|PREVIOUSDAY|PREVIOUSMONTH|PREVIOUSQUARTER|PREVIOUSYEAR|PRODUCT|PRODUCTX|QUARTER|QUOTIENT|RADIANS|RAND|RANDBETWEEN|RANK\.EQ|RANKX|RELATED|RELATEDTABLE|REMOVEFILTERS|REPLACE|REPT|RIGHT|ROLLUP|ROLLUPADDISSUBTOTAL|ROLLUPGROUP|ROLLUPISSUBTOTAL|ROUND|ROUNDDOWN|ROUNDUP|ROW|SAMEPERIODLASTYEAR|SAMPLE|SEARCH|SECOND|SELECTCOLUMNS|SELECTEDMEASURE|SELECTEDMEASUREFORMATSTRING|SELECTEDMEASURENAME|SELECTEDVALUE|SIGN|SIN|SINH|SQRT|SQRTPI|STARTOFMONTH|STARTOFQUARTER|STARTOFYEAR|STDEV\.P|STDEV\.S|STDEVX\.P|STDEVX\.S|SUBSTITUTE|SUBSTITUTEWITHINDEX|SUM|SUMMARIZE|SUMMARIZECOLUMNS|SUMX|SWITCH|T\.DIST|T\.DIST\.2T|T\.DIST\.RT|T\.INV|T\.INV\.2T|TAN|TANH|TIME|TIMEVALUE|TODAY|TOPN|TOPNPERLEVEL|TOPNSKIP|TOTALMTD|TOTALQTD|TOTALYTD|TREATAS|TRIM|TRUE|TRUNC|UNICHAR|UNICODE|UNION|UPPER|USERELATIONSHIP|USERNAME|USEROBJECTID|USERPRINCIPALNAME|UTCNOW|UTCTODAY|VALUE|VALUES|VAR\.P|VAR\.S|VARX\.P|VARX\.S|WEEKDAY|WEEKNUM|XIRR|XNPV|YEAR|YEARFRAC)(?=\s*\()/i, - 'keyword': /\b(?:DEFINE|MEASURE|EVALUATE|ORDER\s+BY|RETURN|VAR|START\s+AT|ASC|DESC)\b/i, + 'keyword': /\b(?:DEFINE|EVALUATE|MEASURE|ORDER\s+BY|RETURN|VAR|START\s+AT|ASC|DESC)\b/i, 'boolean': { - pattern: /\b(?:TRUE|FALSE|NULL)\b/i, + pattern: /\b(?:FALSE|NULL|TRUE)\b/i, alias: 'constant' }, 'number': /\b\d+(?:\.\d*)?|\B\.\d+\b/i, diff --git a/components/prism-dax.min.js b/components/prism-dax.min.js index 7f35a20875..fa1864f9dd 100644 --- a/components/prism-dax.min.js +++ b/components/prism-dax.min.js @@ -1 +1 @@ -Prism.languages.dax={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/).*)/,lookbehind:!0},"data-field":{pattern:/'(?:[^']|'')*'(?!')(?:\[[ \w\xA0-\uFFFF]+\])?|\w+\[[ \w\xA0-\uFFFF]+\]/,alias:"symbol"},measure:{pattern:/\[[ \w\xA0-\uFFFF]+\]/,alias:"constant"},string:{pattern:/"(?:[^"]|"")*"(?!")/,greedy:!0},function:/\b(?:ABS|ACOS|ACOSH|ACOT|ACOTH|ADDCOLUMNS|ADDMISSINGITEMS|ALL|ALLCROSSFILTERED|ALLEXCEPT|ALLNOBLANKROW|ALLSELECTED|AND|APPROXIMATEDISTINCTCOUNT|ASIN|ASINH|ATAN|ATANH|AVERAGE|AVERAGEA|AVERAGEX|BETA\.DIST|BETA\.INV|BLANK|CALCULATE|CALCULATETABLE|CALENDAR|CALENDARAUTO|CEILING|CHISQ\.DIST|CHISQ\.DIST\.RT|CHISQ\.INV|CHISQ\.INV\.RT|CLOSINGBALANCEMONTH|CLOSINGBALANCEQUARTER|CLOSINGBALANCEYEAR|COALESCE|COMBIN|COMBINA|COMBINEVALUES|CONCATENATE|CONCATENATEX|CONFIDENCE\.NORM|CONFIDENCE\.T|CONTAINS|CONTAINSROW|CONTAINSSTRING|CONTAINSSTRINGEXACT|CONVERT|COS|COSH|COT|COTH|COUNT|COUNTA|COUNTAX|COUNTBLANK|COUNTROWS|COUNTX|CROSSFILTER|CROSSJOIN|CURRENCY|CURRENTGROUP|CUSTOMDATA|DATATABLE|DATE|DATEADD|DATEDIFF|DATESBETWEEN|DATESINPERIOD|DATESMTD|DATESQTD|DATESYTD|DATEVALUE|DAY|DEGREES|DETAILROWS|DISTINCT|DISTINCTCOUNT|DISTINCTCOUNTNOBLANK|DIVIDE|EARLIER|EARLIEST|EDATE|ENDOFMONTH|ENDOFQUARTER|ENDOFYEAR|EOMONTH|ERROR|EVEN|EXACT|EXCEPT|EXP|EXPON\.DIST|FACT|FALSE|FILTER|FILTERS|FIND|FIRSTDATE|FIRSTNONBLANK|FIRSTNONBLANKVALUE|FIXED|FLOOR|FORMAT|GCD|GENERATE|GENERATEALL|GENERATESERIES|GEOMEAN|GEOMEANX|GROUPBY|HASONEFILTER|HASONEVALUE|HOUR|IF|IF\.EAGER|IFERROR|IGNORE|INT|INTERSECT|ISBLANK|ISCROSSFILTERED|ISEMPTY|ISERROR|ISEVEN|ISFILTERED|ISINSCOPE|ISLOGICAL|ISNONTEXT|ISNUMBER|ISO\.CEILING|ISODD|ISONORAFTER|ISSELECTEDMEASURE|ISSUBTOTAL|ISTEXT|KEEPFILTERS|KEYWORDMATCH|LASTDATE|LASTNONBLANK|LASTNONBLANKVALUE|LCM|LEFT|LEN|LN|LOG|LOG10|LOOKUPVALUE|LOWER|MAX|MAXA|MAXX|MEDIAN|MEDIANX|MID|MIN|MINA|MINUTE|MINX|MOD|MONTH|MROUND|NATURALINNERJOIN|NATURALLEFTOUTERJOIN|NEXTDAY|NEXTMONTH|NEXTQUARTER|NEXTYEAR|NONVISUAL|NORM\.DIST|NORM\.INV|NORM\.S\.DIST|NORM\.S\.INV|NOT|NOW|ODD|OPENINGBALANCEMONTH|OPENINGBALANCEQUARTER|OPENINGBALANCEYEAR|OR|PARALLELPERIOD|PATH|PATHCONTAINS|PATHITEM|PATHITEMREVERSE|PATHLENGTH|PERCENTILE\.EXC|PERCENTILE\.INC|PERCENTILEX\.EXC|PERCENTILEX\.INC|PERMUT|PI|POISSON\.DIST|POWER|PREVIOUSDAY|PREVIOUSMONTH|PREVIOUSQUARTER|PREVIOUSYEAR|PRODUCT|PRODUCTX|QUARTER|QUOTIENT|RADIANS|RAND|RANDBETWEEN|RANK\.EQ|RANKX|RELATED|RELATEDTABLE|REMOVEFILTERS|REPLACE|REPT|RIGHT|ROLLUP|ROLLUPADDISSUBTOTAL|ROLLUPGROUP|ROLLUPISSUBTOTAL|ROUND|ROUNDDOWN|ROUNDUP|ROW|SAMEPERIODLASTYEAR|SAMPLE|SEARCH|SECOND|SELECTCOLUMNS|SELECTEDMEASURE|SELECTEDMEASUREFORMATSTRING|SELECTEDMEASURENAME|SELECTEDVALUE|SIGN|SIN|SINH|SQRT|SQRTPI|STARTOFMONTH|STARTOFQUARTER|STARTOFYEAR|STDEV\.P|STDEV\.S|STDEVX\.P|STDEVX\.S|SUBSTITUTE|SUBSTITUTEWITHINDEX|SUM|SUMMARIZE|SUMMARIZECOLUMNS|SUMX|SWITCH|T\.DIST|T\.DIST\.2T|T\.DIST\.RT|T\.INV|T\.INV\.2T|TAN|TANH|TIME|TIMEVALUE|TODAY|TOPN|TOPNPERLEVEL|TOPNSKIP|TOTALMTD|TOTALQTD|TOTALYTD|TREATAS|TRIM|TRUE|TRUNC|UNICHAR|UNICODE|UNION|UPPER|USERELATIONSHIP|USERNAME|USEROBJECTID|USERPRINCIPALNAME|UTCNOW|UTCTODAY|VALUE|VALUES|VAR\.P|VAR\.S|VARX\.P|VARX\.S|WEEKDAY|WEEKNUM|XIRR|XNPV|YEAR|YEARFRAC)(?=\s*\()/i,keyword:/\b(?:DEFINE|MEASURE|EVALUATE|ORDER\s+BY|RETURN|VAR|START\s+AT|ASC|DESC)\b/i,boolean:{pattern:/\b(?:TRUE|FALSE|NULL)\b/i,alias:"constant"},number:/\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/:=|[-+*\/=^]|&&?|\|\||<(?:=>?|<|>)?|>[>=]?|\b(?:IN|NOT)\b/i,punctuation:/[;\[\](){}`,.]/}; \ No newline at end of file +Prism.languages.dax={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/).*)/,lookbehind:!0},"data-field":{pattern:/'(?:[^']|'')*'(?!')(?:\[[ \w\xA0-\uFFFF]+\])?|\w+\[[ \w\xA0-\uFFFF]+\]/,alias:"symbol"},measure:{pattern:/\[[ \w\xA0-\uFFFF]+\]/,alias:"constant"},string:{pattern:/"(?:[^"]|"")*"(?!")/,greedy:!0},function:/\b(?:ABS|ACOS|ACOSH|ACOT|ACOTH|ADDCOLUMNS|ADDMISSINGITEMS|ALL|ALLCROSSFILTERED|ALLEXCEPT|ALLNOBLANKROW|ALLSELECTED|AND|APPROXIMATEDISTINCTCOUNT|ASIN|ASINH|ATAN|ATANH|AVERAGE|AVERAGEA|AVERAGEX|BETA\.DIST|BETA\.INV|BLANK|CALCULATE|CALCULATETABLE|CALENDAR|CALENDARAUTO|CEILING|CHISQ\.DIST|CHISQ\.DIST\.RT|CHISQ\.INV|CHISQ\.INV\.RT|CLOSINGBALANCEMONTH|CLOSINGBALANCEQUARTER|CLOSINGBALANCEYEAR|COALESCE|COMBIN|COMBINA|COMBINEVALUES|CONCATENATE|CONCATENATEX|CONFIDENCE\.NORM|CONFIDENCE\.T|CONTAINS|CONTAINSROW|CONTAINSSTRING|CONTAINSSTRINGEXACT|CONVERT|COS|COSH|COT|COTH|COUNT|COUNTA|COUNTAX|COUNTBLANK|COUNTROWS|COUNTX|CROSSFILTER|CROSSJOIN|CURRENCY|CURRENTGROUP|CUSTOMDATA|DATATABLE|DATE|DATEADD|DATEDIFF|DATESBETWEEN|DATESINPERIOD|DATESMTD|DATESQTD|DATESYTD|DATEVALUE|DAY|DEGREES|DETAILROWS|DISTINCT|DISTINCTCOUNT|DISTINCTCOUNTNOBLANK|DIVIDE|EARLIER|EARLIEST|EDATE|ENDOFMONTH|ENDOFQUARTER|ENDOFYEAR|EOMONTH|ERROR|EVEN|EXACT|EXCEPT|EXP|EXPON\.DIST|FACT|FALSE|FILTER|FILTERS|FIND|FIRSTDATE|FIRSTNONBLANK|FIRSTNONBLANKVALUE|FIXED|FLOOR|FORMAT|GCD|GENERATE|GENERATEALL|GENERATESERIES|GEOMEAN|GEOMEANX|GROUPBY|HASONEFILTER|HASONEVALUE|HOUR|IF|IF\.EAGER|IFERROR|IGNORE|INT|INTERSECT|ISBLANK|ISCROSSFILTERED|ISEMPTY|ISERROR|ISEVEN|ISFILTERED|ISINSCOPE|ISLOGICAL|ISNONTEXT|ISNUMBER|ISO\.CEILING|ISODD|ISONORAFTER|ISSELECTEDMEASURE|ISSUBTOTAL|ISTEXT|KEEPFILTERS|KEYWORDMATCH|LASTDATE|LASTNONBLANK|LASTNONBLANKVALUE|LCM|LEFT|LEN|LN|LOG|LOG10|LOOKUPVALUE|LOWER|MAX|MAXA|MAXX|MEDIAN|MEDIANX|MID|MIN|MINA|MINUTE|MINX|MOD|MONTH|MROUND|NATURALINNERJOIN|NATURALLEFTOUTERJOIN|NEXTDAY|NEXTMONTH|NEXTQUARTER|NEXTYEAR|NONVISUAL|NORM\.DIST|NORM\.INV|NORM\.S\.DIST|NORM\.S\.INV|NOT|NOW|ODD|OPENINGBALANCEMONTH|OPENINGBALANCEQUARTER|OPENINGBALANCEYEAR|OR|PARALLELPERIOD|PATH|PATHCONTAINS|PATHITEM|PATHITEMREVERSE|PATHLENGTH|PERCENTILE\.EXC|PERCENTILE\.INC|PERCENTILEX\.EXC|PERCENTILEX\.INC|PERMUT|PI|POISSON\.DIST|POWER|PREVIOUSDAY|PREVIOUSMONTH|PREVIOUSQUARTER|PREVIOUSYEAR|PRODUCT|PRODUCTX|QUARTER|QUOTIENT|RADIANS|RAND|RANDBETWEEN|RANK\.EQ|RANKX|RELATED|RELATEDTABLE|REMOVEFILTERS|REPLACE|REPT|RIGHT|ROLLUP|ROLLUPADDISSUBTOTAL|ROLLUPGROUP|ROLLUPISSUBTOTAL|ROUND|ROUNDDOWN|ROUNDUP|ROW|SAMEPERIODLASTYEAR|SAMPLE|SEARCH|SECOND|SELECTCOLUMNS|SELECTEDMEASURE|SELECTEDMEASUREFORMATSTRING|SELECTEDMEASURENAME|SELECTEDVALUE|SIGN|SIN|SINH|SQRT|SQRTPI|STARTOFMONTH|STARTOFQUARTER|STARTOFYEAR|STDEV\.P|STDEV\.S|STDEVX\.P|STDEVX\.S|SUBSTITUTE|SUBSTITUTEWITHINDEX|SUM|SUMMARIZE|SUMMARIZECOLUMNS|SUMX|SWITCH|T\.DIST|T\.DIST\.2T|T\.DIST\.RT|T\.INV|T\.INV\.2T|TAN|TANH|TIME|TIMEVALUE|TODAY|TOPN|TOPNPERLEVEL|TOPNSKIP|TOTALMTD|TOTALQTD|TOTALYTD|TREATAS|TRIM|TRUE|TRUNC|UNICHAR|UNICODE|UNION|UPPER|USERELATIONSHIP|USERNAME|USEROBJECTID|USERPRINCIPALNAME|UTCNOW|UTCTODAY|VALUE|VALUES|VAR\.P|VAR\.S|VARX\.P|VARX\.S|WEEKDAY|WEEKNUM|XIRR|XNPV|YEAR|YEARFRAC)(?=\s*\()/i,keyword:/\b(?:DEFINE|EVALUATE|MEASURE|ORDER\s+BY|RETURN|VAR|START\s+AT|ASC|DESC)\b/i,boolean:{pattern:/\b(?:FALSE|NULL|TRUE)\b/i,alias:"constant"},number:/\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/:=|[-+*\/=^]|&&?|\|\||<(?:=>?|<|>)?|>[>=]?|\b(?:IN|NOT)\b/i,punctuation:/[;\[\](){}`,.]/}; \ No newline at end of file diff --git a/components/prism-dhall.js b/components/prism-dhall.js index ab95ffd147..ee69839b87 100644 --- a/components/prism-dhall.js +++ b/components/prism-dhall.js @@ -55,7 +55,7 @@ Prism.languages.dhall = { // https://github.com/dhall-lang/dhall-lang/blob/5fde8ef1bead6fb4e999d3c1ffe7044cd019d63a/standard/dhall.abnf#L359 'keyword': /\b(?:as|assert|else|forall|if|in|let|merge|missing|then|toMap|using|with)\b|\u2200/, - 'builtin': /\b(?:Some|None)\b/, + 'builtin': /\b(?:None|Some)\b/, 'boolean': /\b(?:False|True)\b/, 'number': /\bNaN\b|-?\bInfinity\b|[+-]?\b(?:0x[\da-fA-F]+|\d+(?:\.\d+)?(?:e[+-]?\d+)?)\b/, diff --git a/components/prism-dhall.min.js b/components/prism-dhall.min.js index 37f76ef5cf..6138cd908e 100644 --- a/components/prism-dhall.min.js +++ b/components/prism-dhall.min.js @@ -1 +1 @@ -Prism.languages.dhall={comment:/--.*|\{-(?:[^-{]|-(?!\})|\{(?!-)|\{-(?:[^-{]|-(?!\})|\{(?!-))*-\})*-\}/,string:{pattern:/"(?:[^"\\]|\\.)*"|''(?:[^']|'(?!')|'''|''\$\{)*''(?!'|\$)/,greedy:!0,inside:{interpolation:{pattern:/\$\{[^{}]*\}/,inside:{expression:{pattern:/(^\$\{)[\s\S]+(?=\}$)/,lookbehind:!0,alias:"language-dhall",inside:null},punctuation:/\$\{|\}/}}}},label:{pattern:/`[^`]*`/,greedy:!0},url:{pattern:/\bhttps?:\/\/[\w.:%!$&'*+;=@~-]+(?:\/[\w.:%!$&'*+;=@~-]*)*(?:\?[/?\w.:%!$&'*+;=@~-]*)?/,greedy:!0},env:{pattern:/\benv:(?:(?!\d)\w+|"(?:[^"\\=]|\\.)*")/,greedy:!0,inside:{function:/^env/,operator:/^:/,variable:/[\s\S]+/}},hash:{pattern:/\bsha256:[\da-fA-F]{64}\b/,inside:{function:/sha256/,operator:/:/,number:/[\da-fA-F]{64}/}},keyword:/\b(?:as|assert|else|forall|if|in|let|merge|missing|then|toMap|using|with)\b|\u2200/,builtin:/\b(?:Some|None)\b/,boolean:/\b(?:False|True)\b/,number:/\bNaN\b|-?\bInfinity\b|[+-]?\b(?:0x[\da-fA-F]+|\d+(?:\.\d+)?(?:e[+-]?\d+)?)\b/,operator:/\/\\|\/\/\\\\|&&|\|\||===|[!=]=|\/\/|->|\+\+|::|[+*#@=:?<>|\\\u2227\u2a53\u2261\u2afd\u03bb\u2192]/,punctuation:/\.\.|[{}\[\](),./]/,"class-name":/\b[A-Z]\w*\b/},Prism.languages.dhall.string.inside.interpolation.inside.expression.inside=Prism.languages.dhall; \ No newline at end of file +Prism.languages.dhall={comment:/--.*|\{-(?:[^-{]|-(?!\})|\{(?!-)|\{-(?:[^-{]|-(?!\})|\{(?!-))*-\})*-\}/,string:{pattern:/"(?:[^"\\]|\\.)*"|''(?:[^']|'(?!')|'''|''\$\{)*''(?!'|\$)/,greedy:!0,inside:{interpolation:{pattern:/\$\{[^{}]*\}/,inside:{expression:{pattern:/(^\$\{)[\s\S]+(?=\}$)/,lookbehind:!0,alias:"language-dhall",inside:null},punctuation:/\$\{|\}/}}}},label:{pattern:/`[^`]*`/,greedy:!0},url:{pattern:/\bhttps?:\/\/[\w.:%!$&'*+;=@~-]+(?:\/[\w.:%!$&'*+;=@~-]*)*(?:\?[/?\w.:%!$&'*+;=@~-]*)?/,greedy:!0},env:{pattern:/\benv:(?:(?!\d)\w+|"(?:[^"\\=]|\\.)*")/,greedy:!0,inside:{function:/^env/,operator:/^:/,variable:/[\s\S]+/}},hash:{pattern:/\bsha256:[\da-fA-F]{64}\b/,inside:{function:/sha256/,operator:/:/,number:/[\da-fA-F]{64}/}},keyword:/\b(?:as|assert|else|forall|if|in|let|merge|missing|then|toMap|using|with)\b|\u2200/,builtin:/\b(?:None|Some)\b/,boolean:/\b(?:False|True)\b/,number:/\bNaN\b|-?\bInfinity\b|[+-]?\b(?:0x[\da-fA-F]+|\d+(?:\.\d+)?(?:e[+-]?\d+)?)\b/,operator:/\/\\|\/\/\\\\|&&|\|\||===|[!=]=|\/\/|->|\+\+|::|[+*#@=:?<>|\\\u2227\u2a53\u2261\u2afd\u03bb\u2192]/,punctuation:/\.\.|[{}\[\](),./]/,"class-name":/\b[A-Z]\w*\b/},Prism.languages.dhall.string.inside.interpolation.inside.expression.inside=Prism.languages.dhall; \ No newline at end of file diff --git a/components/prism-django.js b/components/prism-django.js index 87d78b53de..8a4a3b7f0c 100644 --- a/components/prism-django.js +++ b/components/prism-django.js @@ -32,7 +32,7 @@ 'keyword': /\b(?:and|as|by|else|for|if|import|in|is|loop|not|or|recursive|with|without)\b/, 'operator': /[-+%=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/, 'number': /\b\d+(?:\.\d+)?\b/, - 'boolean': /[Tt]rue|[Ff]alse|[Nn]one/, + 'boolean': /[Ff]alse|[Nn]one|[Tt]rue/, 'variable': /\b\w+?\b/, 'punctuation': /[{}[\](),.:;]/ }; diff --git a/components/prism-django.min.js b/components/prism-django.min.js index 00315328b3..68fe55c001 100644 --- a/components/prism-django.min.js +++ b/components/prism-django.min.js @@ -1 +1 @@ -!function(e){e.languages.django={comment:/^\{#[\s\S]*?#\}$/,tag:{pattern:/(^\{%[+-]?\s*)\w+/,lookbehind:!0,alias:"keyword"},delimiter:{pattern:/^\{[{%][+-]?|[+-]?[}%]\}$/,alias:"punctuation"},string:{pattern:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0},filter:{pattern:/(\|)\w+/,lookbehind:!0,alias:"function"},test:{pattern:/(\bis\s+(?:not\s+)?)(?!not\b)\w+/,lookbehind:!0,alias:"function"},function:/\b[a-z_]\w+(?=\s*\()/i,keyword:/\b(?:and|as|by|else|for|if|import|in|is|loop|not|or|recursive|with|without)\b/,operator:/[-+%=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,number:/\b\d+(?:\.\d+)?\b/,boolean:/[Tt]rue|[Ff]alse|[Nn]one/,variable:/\b\w+?\b/,punctuation:/[{}[\](),.:;]/};var n=/\{\{[\s\S]*?\}\}|\{%[\s\S]*?%\}|\{#[\s\S]*?#\}/g,o=e.languages["markup-templating"];e.hooks.add("before-tokenize",function(e){o.buildPlaceholders(e,"django",n)}),e.hooks.add("after-tokenize",function(e){o.tokenizePlaceholders(e,"django")}),e.languages.jinja2=e.languages.django,e.hooks.add("before-tokenize",function(e){o.buildPlaceholders(e,"jinja2",n)}),e.hooks.add("after-tokenize",function(e){o.tokenizePlaceholders(e,"jinja2")})}(Prism); \ No newline at end of file +!function(e){e.languages.django={comment:/^\{#[\s\S]*?#\}$/,tag:{pattern:/(^\{%[+-]?\s*)\w+/,lookbehind:!0,alias:"keyword"},delimiter:{pattern:/^\{[{%][+-]?|[+-]?[}%]\}$/,alias:"punctuation"},string:{pattern:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0},filter:{pattern:/(\|)\w+/,lookbehind:!0,alias:"function"},test:{pattern:/(\bis\s+(?:not\s+)?)(?!not\b)\w+/,lookbehind:!0,alias:"function"},function:/\b[a-z_]\w+(?=\s*\()/i,keyword:/\b(?:and|as|by|else|for|if|import|in|is|loop|not|or|recursive|with|without)\b/,operator:/[-+%=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,number:/\b\d+(?:\.\d+)?\b/,boolean:/[Ff]alse|[Nn]one|[Tt]rue/,variable:/\b\w+?\b/,punctuation:/[{}[\](),.:;]/};var n=/\{\{[\s\S]*?\}\}|\{%[\s\S]*?%\}|\{#[\s\S]*?#\}/g,o=e.languages["markup-templating"];e.hooks.add("before-tokenize",function(e){o.buildPlaceholders(e,"django",n)}),e.hooks.add("after-tokenize",function(e){o.tokenizePlaceholders(e,"django")}),e.languages.jinja2=e.languages.django,e.hooks.add("before-tokenize",function(e){o.buildPlaceholders(e,"jinja2",n)}),e.hooks.add("after-tokenize",function(e){o.tokenizePlaceholders(e,"jinja2")})}(Prism); \ No newline at end of file diff --git a/components/prism-dns-zone-file.js b/components/prism-dns-zone-file.js index 7829ac2edc..2ded2adfa2 100644 --- a/components/prism-dns-zone-file.js +++ b/components/prism-dns-zone-file.js @@ -14,10 +14,10 @@ Prism.languages['dns-zone-file'] = { lookbehind: true, } ], - 'keyword': /^\$(?:ORIGIN|INCLUDE|TTL)(?=\s|$)/m, + 'keyword': /^\$(?:INCLUDE|ORIGIN|TTL)(?=\s|$)/m, 'class': { // https://tools.ietf.org/html/rfc1035#page-13 - pattern: /(^|\s)(?:IN|CH|CS|HS)(?=\s|$)/, + pattern: /(^|\s)(?:CH|CS|HS|IN)(?=\s|$)/, lookbehind: true, alias: 'keyword' }, diff --git a/components/prism-dns-zone-file.min.js b/components/prism-dns-zone-file.min.js index 434c1f699f..66c7f819c5 100644 --- a/components/prism-dns-zone-file.min.js +++ b/components/prism-dns-zone-file.min.js @@ -1 +1 @@ -Prism.languages["dns-zone-file"]={comment:/;.*/,string:{pattern:/"(?:\\.|[^"\\\r\n])*"/,greedy:!0},variable:[{pattern:/(^\$ORIGIN[ \t]+)\S+/m,lookbehind:!0},{pattern:/(^|\s)@(?=\s|$)/,lookbehind:!0}],keyword:/^\$(?:ORIGIN|INCLUDE|TTL)(?=\s|$)/m,class:{pattern:/(^|\s)(?:IN|CH|CS|HS)(?=\s|$)/,lookbehind:!0,alias:"keyword"},type:{pattern:/(^|\s)(?:A|A6|AAAA|AFSDB|APL|ATMA|CAA|CDNSKEY|CDS|CERT|CNAME|DHCID|DLV|DNAME|DNSKEY|DS|EID|GID|GPOS|HINFO|HIP|IPSECKEY|ISDN|KEY|KX|LOC|MAILA|MAILB|MB|MD|MF|MG|MINFO|MR|MX|NAPTR|NB|NBSTAT|NIMLOC|NINFO|NS|NSAP|NSAP-PTR|NSEC|NSEC3|NSEC3PARAM|NULL|NXT|OPENPGPKEY|PTR|PX|RKEY|RP|RRSIG|RT|SIG|SINK|SMIMEA|SOA|SPF|SRV|SSHFP|TA|TKEY|TLSA|TSIG|TXT|UID|UINFO|UNSPEC|URI|WKS|X25)(?=\s|$)/,lookbehind:!0,alias:"keyword"},punctuation:/[()]/},Prism.languages["dns-zone"]=Prism.languages["dns-zone-file"]; \ No newline at end of file +Prism.languages["dns-zone-file"]={comment:/;.*/,string:{pattern:/"(?:\\.|[^"\\\r\n])*"/,greedy:!0},variable:[{pattern:/(^\$ORIGIN[ \t]+)\S+/m,lookbehind:!0},{pattern:/(^|\s)@(?=\s|$)/,lookbehind:!0}],keyword:/^\$(?:INCLUDE|ORIGIN|TTL)(?=\s|$)/m,class:{pattern:/(^|\s)(?:CH|CS|HS|IN)(?=\s|$)/,lookbehind:!0,alias:"keyword"},type:{pattern:/(^|\s)(?:A|A6|AAAA|AFSDB|APL|ATMA|CAA|CDNSKEY|CDS|CERT|CNAME|DHCID|DLV|DNAME|DNSKEY|DS|EID|GID|GPOS|HINFO|HIP|IPSECKEY|ISDN|KEY|KX|LOC|MAILA|MAILB|MB|MD|MF|MG|MINFO|MR|MX|NAPTR|NB|NBSTAT|NIMLOC|NINFO|NS|NSAP|NSAP-PTR|NSEC|NSEC3|NSEC3PARAM|NULL|NXT|OPENPGPKEY|PTR|PX|RKEY|RP|RRSIG|RT|SIG|SINK|SMIMEA|SOA|SPF|SRV|SSHFP|TA|TKEY|TLSA|TSIG|TXT|UID|UINFO|UNSPEC|URI|WKS|X25)(?=\s|$)/,lookbehind:!0,alias:"keyword"},punctuation:/[()]/},Prism.languages["dns-zone"]=Prism.languages["dns-zone-file"]; \ No newline at end of file diff --git a/components/prism-dot.js b/components/prism-dot.js index 40bfd23a5e..e93b5bff1b 100644 --- a/components/prism-dot.js +++ b/components/prism-dot.js @@ -57,7 +57,7 @@ }, 'keyword': /\b(?:digraph|edge|graph|node|strict|subgraph)\b/i, 'compass-point': { - pattern: /(:[ \t\r\n]*)(?:[ns][ew]?|[ewc_])(?![\w\x80-\uFFFF])/, + pattern: /(:[ \t\r\n]*)(?:[ewc_]|[ns][ew]?)(?![\w\x80-\uFFFF])/, lookbehind: true, alias: 'builtin' }, diff --git a/components/prism-dot.min.js b/components/prism-dot.min.js index 42bb33fb4b..457ed17e2c 100644 --- a/components/prism-dot.min.js +++ b/components/prism-dot.min.js @@ -1 +1 @@ -!function(e){var n="(?:"+["[a-zA-Z_\\x80-\\uFFFF][\\w\\x80-\\uFFFF]*","-?(?:\\.\\d+|\\d+(?:\\.\\d*)?)",'"[^"\\\\]*(?:\\\\[^][^"\\\\]*)*"',"<(?:[^<>]|(?!\x3c!--)<(?:[^<>\"']|\"[^\"]*\"|'[^']*')+>|\x3c!--(?:[^-]|-(?!->))*--\x3e)*>"].join("|")+")",a={markup:{pattern:/(^<)[\s\S]+(?=>$)/,lookbehind:!0,alias:["language-markup","language-html","language-xml"],inside:e.languages.markup}};function r(e,a){return RegExp(e.replace(//g,function(){return n}),a)}e.languages.dot={comment:{pattern:/\/\/.*|\/\*[\s\S]*?\*\/|^#.*/m,greedy:!0},"graph-name":{pattern:r("(\\b(?:digraph|graph|subgraph)[ \t\r\n]+)","i"),lookbehind:!0,greedy:!0,alias:"class-name",inside:a},"attr-value":{pattern:r("(=[ \t\r\n]*)"),lookbehind:!0,greedy:!0,inside:a},"attr-name":{pattern:r("([\\[;, \t\r\n])(?=[ \t\r\n]*=)"),lookbehind:!0,greedy:!0,inside:a},keyword:/\b(?:digraph|edge|graph|node|strict|subgraph)\b/i,"compass-point":{pattern:/(:[ \t\r\n]*)(?:[ns][ew]?|[ewc_])(?![\w\x80-\uFFFF])/,lookbehind:!0,alias:"builtin"},node:{pattern:r("(^|[^-.\\w\\x80-\\uFFFF\\\\])"),lookbehind:!0,greedy:!0,inside:a},operator:/[=:]|-[->]/,punctuation:/[\[\]{};,]/},e.languages.gv=e.languages.dot}(Prism); \ No newline at end of file +!function(e){var n="(?:"+["[a-zA-Z_\\x80-\\uFFFF][\\w\\x80-\\uFFFF]*","-?(?:\\.\\d+|\\d+(?:\\.\\d*)?)",'"[^"\\\\]*(?:\\\\[^][^"\\\\]*)*"',"<(?:[^<>]|(?!\x3c!--)<(?:[^<>\"']|\"[^\"]*\"|'[^']*')+>|\x3c!--(?:[^-]|-(?!->))*--\x3e)*>"].join("|")+")",a={markup:{pattern:/(^<)[\s\S]+(?=>$)/,lookbehind:!0,alias:["language-markup","language-html","language-xml"],inside:e.languages.markup}};function r(e,a){return RegExp(e.replace(//g,function(){return n}),a)}e.languages.dot={comment:{pattern:/\/\/.*|\/\*[\s\S]*?\*\/|^#.*/m,greedy:!0},"graph-name":{pattern:r("(\\b(?:digraph|graph|subgraph)[ \t\r\n]+)","i"),lookbehind:!0,greedy:!0,alias:"class-name",inside:a},"attr-value":{pattern:r("(=[ \t\r\n]*)"),lookbehind:!0,greedy:!0,inside:a},"attr-name":{pattern:r("([\\[;, \t\r\n])(?=[ \t\r\n]*=)"),lookbehind:!0,greedy:!0,inside:a},keyword:/\b(?:digraph|edge|graph|node|strict|subgraph)\b/i,"compass-point":{pattern:/(:[ \t\r\n]*)(?:[ewc_]|[ns][ew]?)(?![\w\x80-\uFFFF])/,lookbehind:!0,alias:"builtin"},node:{pattern:r("(^|[^-.\\w\\x80-\\uFFFF\\\\])"),lookbehind:!0,greedy:!0,inside:a},operator:/[=:]|-[->]/,punctuation:/[\[\]{};,]/},e.languages.gv=e.languages.dot}(Prism); \ No newline at end of file diff --git a/components/prism-eiffel.js b/components/prism-eiffel.js index bd10257334..afec032e14 100644 --- a/components/prism-eiffel.js +++ b/components/prism-eiffel.js @@ -19,8 +19,8 @@ Prism.languages.eiffel = { ], // normal char | special char | char code 'char': /'(?:%.|[^%'\r\n])+'/, - 'keyword': /\b(?:across|agent|alias|all|and|attached|as|assign|attribute|check|class|convert|create|Current|debug|deferred|detachable|do|else|elseif|end|ensure|expanded|export|external|feature|from|frozen|if|implies|inherit|inspect|invariant|like|local|loop|not|note|obsolete|old|once|or|Precursor|redefine|rename|require|rescue|Result|retry|select|separate|some|then|undefine|until|variant|Void|when|xor)\b/i, - 'boolean': /\b(?:True|False)\b/i, + 'keyword': /\b(?:across|agent|alias|all|and|as|assign|attached|attribute|check|class|convert|create|Current|debug|deferred|detachable|do|else|elseif|end|ensure|expanded|export|external|feature|from|frozen|if|implies|inherit|inspect|invariant|like|local|loop|not|note|obsolete|old|once|or|Precursor|redefine|rename|require|rescue|Result|retry|select|separate|some|then|undefine|until|variant|Void|when|xor)\b/i, + 'boolean': /\b(?:False|True)\b/i, // Convention: class-names are always all upper-case characters 'class-name': { 'pattern': /\b[A-Z][\dA-Z_]*\b/, diff --git a/components/prism-eiffel.min.js b/components/prism-eiffel.min.js index c8fc119b6e..c9d0b053b4 100644 --- a/components/prism-eiffel.min.js +++ b/components/prism-eiffel.min.js @@ -1 +1 @@ -Prism.languages.eiffel={comment:/--.*/,string:[{pattern:/"([^[]*)\[[\s\S]*?\]\1"/,greedy:!0},{pattern:/"([^{]*)\{[\s\S]*?\}\1"/,greedy:!0},{pattern:/"(?:%(?:(?!\n)\s)*\n\s*%|%\S|[^%"\r\n])*"/,greedy:!0}],char:/'(?:%.|[^%'\r\n])+'/,keyword:/\b(?:across|agent|alias|all|and|attached|as|assign|attribute|check|class|convert|create|Current|debug|deferred|detachable|do|else|elseif|end|ensure|expanded|export|external|feature|from|frozen|if|implies|inherit|inspect|invariant|like|local|loop|not|note|obsolete|old|once|or|Precursor|redefine|rename|require|rescue|Result|retry|select|separate|some|then|undefine|until|variant|Void|when|xor)\b/i,boolean:/\b(?:True|False)\b/i,"class-name":{pattern:/\b[A-Z][\dA-Z_]*\b/,alias:"builtin"},number:[/\b0[xcb][\da-f](?:_*[\da-f])*\b/i,/(?:\b\d(?:_*\d)*)?\.(?:(?:\d(?:_*\d)*)?e[+-]?)?\d(?:_*\d)*\b|\b\d(?:_*\d)*\b\.?/i],punctuation:/:=|<<|>>|\(\||\|\)|->|\.(?=\w)|[{}[\];(),:?]/,operator:/\\\\|\|\.\.\||\.\.|\/[~\/=]?|[><]=?|[-+*^=~]/}; \ No newline at end of file +Prism.languages.eiffel={comment:/--.*/,string:[{pattern:/"([^[]*)\[[\s\S]*?\]\1"/,greedy:!0},{pattern:/"([^{]*)\{[\s\S]*?\}\1"/,greedy:!0},{pattern:/"(?:%(?:(?!\n)\s)*\n\s*%|%\S|[^%"\r\n])*"/,greedy:!0}],char:/'(?:%.|[^%'\r\n])+'/,keyword:/\b(?:across|agent|alias|all|and|as|assign|attached|attribute|check|class|convert|create|Current|debug|deferred|detachable|do|else|elseif|end|ensure|expanded|export|external|feature|from|frozen|if|implies|inherit|inspect|invariant|like|local|loop|not|note|obsolete|old|once|or|Precursor|redefine|rename|require|rescue|Result|retry|select|separate|some|then|undefine|until|variant|Void|when|xor)\b/i,boolean:/\b(?:False|True)\b/i,"class-name":{pattern:/\b[A-Z][\dA-Z_]*\b/,alias:"builtin"},number:[/\b0[xcb][\da-f](?:_*[\da-f])*\b/i,/(?:\b\d(?:_*\d)*)?\.(?:(?:\d(?:_*\d)*)?e[+-]?)?\d(?:_*\d)*\b|\b\d(?:_*\d)*\b\.?/i],punctuation:/:=|<<|>>|\(\||\|\)|->|\.(?=\w)|[{}[\];(),:?]/,operator:/\\\\|\|\.\.\||\.\.|\/[~\/=]?|[><]=?|[-+*^=~]/}; \ No newline at end of file diff --git a/components/prism-elixir.js b/components/prism-elixir.js index 739175d66d..fb3ee58c79 100644 --- a/components/prism-elixir.js +++ b/components/prism-elixir.js @@ -65,7 +65,7 @@ Prism.languages.elixir = { 'function': /\b[_a-zA-Z]\w*[?!]?(?:(?=\s*(?:\.\s*)?\()|(?=\/\d))/, 'number': /\b(?:0[box][a-f\d_]+|\d[\d_]*)(?:\.[\d_]+)?(?:e[+-]?[\d_]+)?\b/i, 'keyword': /\b(?:after|alias|and|case|catch|cond|def(?:callback|delegate|exception|impl|macro|module|n|np|p|protocol|struct)?|do|else|end|fn|for|if|import|not|or|quote|raise|require|rescue|try|unless|unquote|use|when)\b/, - 'boolean': /\b(?:true|false|nil)\b/, + 'boolean': /\b(?:false|nil|true)\b/, 'operator': [ /\bin\b|&&?|\|[|>]?|\\\\|::|\.\.\.?|\+\+?|-[->]?|<[-=>]|>=|!==?|\B!|=(?:==?|[>~])?|[*\/^]/, { diff --git a/components/prism-elixir.min.js b/components/prism-elixir.min.js index 1647e55d7d..c70fc61111 100644 --- a/components/prism-elixir.min.js +++ b/components/prism-elixir.min.js @@ -1 +1 @@ -Prism.languages.elixir={doc:{pattern:/@(?:doc|moduledoc)\s+(?:("""|''')[\s\S]*?\1|("|')(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2)/,inside:{attribute:/^@\w+/,string:/['"][\s\S]+/}},comment:{pattern:/#.*/m,greedy:!0},regex:{pattern:/~[rR](?:("""|''')(?:\\[\s\S]|(?!\1)[^\\])+\1|([\/|"'])(?:\\.|(?!\2)[^\\\r\n])+\2|\((?:\\.|[^\\)\r\n])+\)|\[(?:\\.|[^\\\]\r\n])+\]|\{(?:\\.|[^\\}\r\n])+\}|<(?:\\.|[^\\>\r\n])+>)[uismxfr]*/,greedy:!0},string:[{pattern:/~[cCsSwW](?:("""|''')(?:\\[\s\S]|(?!\1)[^\\])+\1|([\/|"'])(?:\\.|(?!\2)[^\\\r\n])+\2|\((?:\\.|[^\\)\r\n])+\)|\[(?:\\.|[^\\\]\r\n])+\]|\{(?:\\.|#\{[^}]+\}|#(?!\{)|[^#\\}\r\n])+\}|<(?:\\.|[^\\>\r\n])+>)[csa]?/,greedy:!0,inside:{}},{pattern:/("""|''')[\s\S]*?\1/,greedy:!0,inside:{}},{pattern:/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0,inside:{}}],atom:{pattern:/(^|[^:]):\w+/,lookbehind:!0,alias:"symbol"},module:{pattern:/\b[A-Z]\w*\b/,alias:"class-name"},"attr-name":/\b\w+\??:(?!:)/,argument:{pattern:/(^|[^&])&\d+/,lookbehind:!0,alias:"variable"},attribute:{pattern:/@\w+/,alias:"variable"},function:/\b[_a-zA-Z]\w*[?!]?(?:(?=\s*(?:\.\s*)?\()|(?=\/\d))/,number:/\b(?:0[box][a-f\d_]+|\d[\d_]*)(?:\.[\d_]+)?(?:e[+-]?[\d_]+)?\b/i,keyword:/\b(?:after|alias|and|case|catch|cond|def(?:callback|delegate|exception|impl|macro|module|n|np|p|protocol|struct)?|do|else|end|fn|for|if|import|not|or|quote|raise|require|rescue|try|unless|unquote|use|when)\b/,boolean:/\b(?:true|false|nil)\b/,operator:[/\bin\b|&&?|\|[|>]?|\\\\|::|\.\.\.?|\+\+?|-[->]?|<[-=>]|>=|!==?|\B!|=(?:==?|[>~])?|[*\/^]/,{pattern:/([^<])<(?!<)/,lookbehind:!0},{pattern:/([^>])>(?!>)/,lookbehind:!0}],punctuation:/<<|>>|[.,%\[\]{}()]/},Prism.languages.elixir.string.forEach(function(e){e.inside={interpolation:{pattern:/#\{[^}]+\}/,inside:{delimiter:{pattern:/^#\{|\}$/,alias:"punctuation"},rest:Prism.languages.elixir}}}}); \ No newline at end of file +Prism.languages.elixir={doc:{pattern:/@(?:doc|moduledoc)\s+(?:("""|''')[\s\S]*?\1|("|')(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2)/,inside:{attribute:/^@\w+/,string:/['"][\s\S]+/}},comment:{pattern:/#.*/m,greedy:!0},regex:{pattern:/~[rR](?:("""|''')(?:\\[\s\S]|(?!\1)[^\\])+\1|([\/|"'])(?:\\.|(?!\2)[^\\\r\n])+\2|\((?:\\.|[^\\)\r\n])+\)|\[(?:\\.|[^\\\]\r\n])+\]|\{(?:\\.|[^\\}\r\n])+\}|<(?:\\.|[^\\>\r\n])+>)[uismxfr]*/,greedy:!0},string:[{pattern:/~[cCsSwW](?:("""|''')(?:\\[\s\S]|(?!\1)[^\\])+\1|([\/|"'])(?:\\.|(?!\2)[^\\\r\n])+\2|\((?:\\.|[^\\)\r\n])+\)|\[(?:\\.|[^\\\]\r\n])+\]|\{(?:\\.|#\{[^}]+\}|#(?!\{)|[^#\\}\r\n])+\}|<(?:\\.|[^\\>\r\n])+>)[csa]?/,greedy:!0,inside:{}},{pattern:/("""|''')[\s\S]*?\1/,greedy:!0,inside:{}},{pattern:/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0,inside:{}}],atom:{pattern:/(^|[^:]):\w+/,lookbehind:!0,alias:"symbol"},module:{pattern:/\b[A-Z]\w*\b/,alias:"class-name"},"attr-name":/\b\w+\??:(?!:)/,argument:{pattern:/(^|[^&])&\d+/,lookbehind:!0,alias:"variable"},attribute:{pattern:/@\w+/,alias:"variable"},function:/\b[_a-zA-Z]\w*[?!]?(?:(?=\s*(?:\.\s*)?\()|(?=\/\d))/,number:/\b(?:0[box][a-f\d_]+|\d[\d_]*)(?:\.[\d_]+)?(?:e[+-]?[\d_]+)?\b/i,keyword:/\b(?:after|alias|and|case|catch|cond|def(?:callback|delegate|exception|impl|macro|module|n|np|p|protocol|struct)?|do|else|end|fn|for|if|import|not|or|quote|raise|require|rescue|try|unless|unquote|use|when)\b/,boolean:/\b(?:false|nil|true)\b/,operator:[/\bin\b|&&?|\|[|>]?|\\\\|::|\.\.\.?|\+\+?|-[->]?|<[-=>]|>=|!==?|\B!|=(?:==?|[>~])?|[*\/^]/,{pattern:/([^<])<(?!<)/,lookbehind:!0},{pattern:/([^>])>(?!>)/,lookbehind:!0}],punctuation:/<<|>>|[.,%\[\]{}()]/},Prism.languages.elixir.string.forEach(function(e){e.inside={interpolation:{pattern:/#\{[^}]+\}/,inside:{delimiter:{pattern:/^#\{|\}$/,alias:"punctuation"},rest:Prism.languages.elixir}}}}); \ No newline at end of file diff --git a/components/prism-elm.js b/components/prism-elm.js index 7896381cd5..f8e27a640f 100644 --- a/components/prism-elm.js +++ b/components/prism-elm.js @@ -22,7 +22,7 @@ Prism.languages.elm = { pattern: /(^[\t ]*)import\s+[A-Z]\w*(?:\.[A-Z]\w*)*(?:\s+as\s+(?:[A-Z]\w*)(?:\.[A-Z]\w*)*)?(?:\s+exposing\s+)?/m, lookbehind: true, inside: { - 'keyword': /\b(?:import|as|exposing)\b/ + 'keyword': /\b(?:as|exposing|import)\b/ } }, 'keyword': /\b(?:alias|as|case|else|exposing|if|in|infixl|infixr|let|module|of|then|type)\b/, diff --git a/components/prism-elm.min.js b/components/prism-elm.min.js index bec2bd00e9..c706a9438f 100644 --- a/components/prism-elm.min.js +++ b/components/prism-elm.min.js @@ -1 +1 @@ -Prism.languages.elm={comment:/--.*|\{-[\s\S]*?-\}/,char:{pattern:/'(?:[^\\'\r\n]|\\(?:[abfnrtv\\']|\d+|x[0-9a-fA-F]+))'/,greedy:!0},string:[{pattern:/"""[\s\S]*?"""/,greedy:!0},{pattern:/"(?:[^\\"\r\n]|\\.)*"/,greedy:!0}],"import-statement":{pattern:/(^[\t ]*)import\s+[A-Z]\w*(?:\.[A-Z]\w*)*(?:\s+as\s+(?:[A-Z]\w*)(?:\.[A-Z]\w*)*)?(?:\s+exposing\s+)?/m,lookbehind:!0,inside:{keyword:/\b(?:import|as|exposing)\b/}},keyword:/\b(?:alias|as|case|else|exposing|if|in|infixl|infixr|let|module|of|then|type)\b/,builtin:/\b(?:abs|acos|always|asin|atan|atan2|ceiling|clamp|compare|cos|curry|degrees|e|flip|floor|fromPolar|identity|isInfinite|isNaN|logBase|max|min|negate|never|not|pi|radians|rem|round|sin|sqrt|tan|toFloat|toPolar|toString|truncate|turns|uncurry|xor)\b/,number:/\b(?:\d+(?:\.\d+)?(?:e[+-]?\d+)?|0x[0-9a-f]+)\b/i,operator:/\s\.\s|[+\-/*=.$<>:&|^?%#@~!]{2,}|[+\-/*=$<>:&|^?%#@~!]/,hvariable:/\b(?:[A-Z]\w*\.)*[a-z]\w*\b/,constant:/\b(?:[A-Z]\w*\.)*[A-Z]\w*\b/,punctuation:/[{}[\]|(),.:]/}; \ No newline at end of file +Prism.languages.elm={comment:/--.*|\{-[\s\S]*?-\}/,char:{pattern:/'(?:[^\\'\r\n]|\\(?:[abfnrtv\\']|\d+|x[0-9a-fA-F]+))'/,greedy:!0},string:[{pattern:/"""[\s\S]*?"""/,greedy:!0},{pattern:/"(?:[^\\"\r\n]|\\.)*"/,greedy:!0}],"import-statement":{pattern:/(^[\t ]*)import\s+[A-Z]\w*(?:\.[A-Z]\w*)*(?:\s+as\s+(?:[A-Z]\w*)(?:\.[A-Z]\w*)*)?(?:\s+exposing\s+)?/m,lookbehind:!0,inside:{keyword:/\b(?:as|exposing|import)\b/}},keyword:/\b(?:alias|as|case|else|exposing|if|in|infixl|infixr|let|module|of|then|type)\b/,builtin:/\b(?:abs|acos|always|asin|atan|atan2|ceiling|clamp|compare|cos|curry|degrees|e|flip|floor|fromPolar|identity|isInfinite|isNaN|logBase|max|min|negate|never|not|pi|radians|rem|round|sin|sqrt|tan|toFloat|toPolar|toString|truncate|turns|uncurry|xor)\b/,number:/\b(?:\d+(?:\.\d+)?(?:e[+-]?\d+)?|0x[0-9a-f]+)\b/i,operator:/\s\.\s|[+\-/*=.$<>:&|^?%#@~!]{2,}|[+\-/*=$<>:&|^?%#@~!]/,hvariable:/\b(?:[A-Z]\w*\.)*[a-z]\w*\b/,constant:/\b(?:[A-Z]\w*\.)*[A-Z]\w*\b/,punctuation:/[{}[\]|(),.:]/}; \ No newline at end of file diff --git a/components/prism-erlang.js b/components/prism-erlang.js index f2d9c685ee..fba6254b2c 100644 --- a/components/prism-erlang.js +++ b/components/prism-erlang.js @@ -12,8 +12,8 @@ Prism.languages.erlang = { pattern: /'(?:\\.|[^\\'\r\n])+'/, alias: 'atom' }, - 'boolean': /\b(?:true|false)\b/, - 'keyword': /\b(?:fun|when|case|of|end|if|receive|after|try|catch)\b/, + 'boolean': /\b(?:false|true)\b/, + 'keyword': /\b(?:after|case|catch|end|fun|if|of|receive|try|when)\b/, 'number': [ /\$\\?./, /\b\d+#[a-z0-9]+/i, @@ -26,7 +26,7 @@ Prism.languages.erlang = { lookbehind: true }, 'operator': [ - /[=\/<>:]=|=[:\/]=|\+\+?|--?|[=*\/!]|\b(?:bnot|div|rem|band|bor|bxor|bsl|bsr|not|and|or|xor|orelse|andalso)\b/, + /[=\/<>:]=|=[:\/]=|\+\+?|--?|[=*\/!]|\b(?:and|andalso|band|bnot|bor|bsl|bsr|bxor|div|not|or|orelse|rem|xor)\b/, { // We don't want to match << pattern: /(^|[^<])<(?!<)/, diff --git a/components/prism-erlang.min.js b/components/prism-erlang.min.js index 458ba79a48..7d041ab6f2 100644 --- a/components/prism-erlang.min.js +++ b/components/prism-erlang.min.js @@ -1 +1 @@ -Prism.languages.erlang={comment:/%.+/,string:{pattern:/"(?:\\.|[^\\"\r\n])*"/,greedy:!0},"quoted-function":{pattern:/'(?:\\.|[^\\'\r\n])+'(?=\()/,alias:"function"},"quoted-atom":{pattern:/'(?:\\.|[^\\'\r\n])+'/,alias:"atom"},boolean:/\b(?:true|false)\b/,keyword:/\b(?:fun|when|case|of|end|if|receive|after|try|catch)\b/,number:[/\$\\?./,/\b\d+#[a-z0-9]+/i,/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i],function:/\b[a-z][\w@]*(?=\()/,variable:{pattern:/(^|[^@])(?:\b|\?)[A-Z_][\w@]*/,lookbehind:!0},operator:[/[=\/<>:]=|=[:\/]=|\+\+?|--?|[=*\/!]|\b(?:bnot|div|rem|band|bor|bxor|bsl|bsr|not|and|or|xor|orelse|andalso)\b/,{pattern:/(^|[^<])<(?!<)/,lookbehind:!0},{pattern:/(^|[^>])>(?!>)/,lookbehind:!0}],atom:/\b[a-z][\w@]*/,punctuation:/[()[\]{}:;,.#|]|<<|>>/}; \ No newline at end of file +Prism.languages.erlang={comment:/%.+/,string:{pattern:/"(?:\\.|[^\\"\r\n])*"/,greedy:!0},"quoted-function":{pattern:/'(?:\\.|[^\\'\r\n])+'(?=\()/,alias:"function"},"quoted-atom":{pattern:/'(?:\\.|[^\\'\r\n])+'/,alias:"atom"},boolean:/\b(?:false|true)\b/,keyword:/\b(?:after|case|catch|end|fun|if|of|receive|try|when)\b/,number:[/\$\\?./,/\b\d+#[a-z0-9]+/i,/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i],function:/\b[a-z][\w@]*(?=\()/,variable:{pattern:/(^|[^@])(?:\b|\?)[A-Z_][\w@]*/,lookbehind:!0},operator:[/[=\/<>:]=|=[:\/]=|\+\+?|--?|[=*\/!]|\b(?:and|andalso|band|bnot|bor|bsl|bsr|bxor|div|not|or|orelse|rem|xor)\b/,{pattern:/(^|[^<])<(?!<)/,lookbehind:!0},{pattern:/(^|[^>])>(?!>)/,lookbehind:!0}],atom:/\b[a-z][\w@]*/,punctuation:/[()[\]{}:;,.#|]|<<|>>/}; \ No newline at end of file diff --git a/components/prism-excel-formula.js b/components/prism-excel-formula.js index c5444d8e47..5b298ac0e1 100644 --- a/components/prism-excel-formula.js +++ b/components/prism-excel-formula.js @@ -58,7 +58,7 @@ Prism.languages['excel-formula'] = { alias: 'property' }, 'number': /(?:\b\d+(?:\.\d+)?|\B\.\d+)(?:e[+-]?\d+)?\b/i, - 'boolean': /\b(?:TRUE|FALSE)\b/i, + 'boolean': /\b(?:FALSE|TRUE)\b/i, 'operator': /[-+*/^%=&,]|<[=>]?|>=?/, 'punctuation': /[[\]();{}|]/ }; diff --git a/components/prism-excel-formula.min.js b/components/prism-excel-formula.min.js index c165540253..1f012d96f3 100644 --- a/components/prism-excel-formula.min.js +++ b/components/prism-excel-formula.min.js @@ -1 +1 @@ -Prism.languages["excel-formula"]={comment:{pattern:/(\bN\(\s*)"(?:[^"]|"")*"(?=\s*\))/i,lookbehind:!0,greedy:!0},string:{pattern:/"(?:[^"]|"")*"(?!")/,greedy:!0},reference:{pattern:/(?:'[^']*'|(?:[^\s()[\]{}<>*?"';,$&]*\[[^^\s()[\]{}<>*?"']+\])?\w+)!/,greedy:!0,alias:"string",inside:{operator:/!$/,punctuation:/'/,sheet:{pattern:/[^[\]]+$/,alias:"function"},file:{pattern:/\[[^[\]]+\]$/,inside:{punctuation:/[[\]]/}},path:/[\s\S]+/}},"function-name":{pattern:/\b[A-Z]\w*(?=\()/i,alias:"keyword"},range:{pattern:/\$?\b(?:[A-Z]+\$?\d+:\$?[A-Z]+\$?\d+|[A-Z]+:\$?[A-Z]+|\d+:\$?\d+)\b/i,alias:"property",inside:{operator:/:/,cell:/\$?[A-Z]+\$?\d+/i,column:/\$?[A-Z]+/i,row:/\$?\d+/}},cell:{pattern:/\b[A-Z]+\d+\b|\$[A-Za-z]+\$?\d+\b|\b[A-Za-z]+\$\d+\b/,alias:"property"},number:/(?:\b\d+(?:\.\d+)?|\B\.\d+)(?:e[+-]?\d+)?\b/i,boolean:/\b(?:TRUE|FALSE)\b/i,operator:/[-+*/^%=&,]|<[=>]?|>=?/,punctuation:/[[\]();{}|]/},Prism.languages.xlsx=Prism.languages.xls=Prism.languages["excel-formula"]; \ No newline at end of file +Prism.languages["excel-formula"]={comment:{pattern:/(\bN\(\s*)"(?:[^"]|"")*"(?=\s*\))/i,lookbehind:!0,greedy:!0},string:{pattern:/"(?:[^"]|"")*"(?!")/,greedy:!0},reference:{pattern:/(?:'[^']*'|(?:[^\s()[\]{}<>*?"';,$&]*\[[^^\s()[\]{}<>*?"']+\])?\w+)!/,greedy:!0,alias:"string",inside:{operator:/!$/,punctuation:/'/,sheet:{pattern:/[^[\]]+$/,alias:"function"},file:{pattern:/\[[^[\]]+\]$/,inside:{punctuation:/[[\]]/}},path:/[\s\S]+/}},"function-name":{pattern:/\b[A-Z]\w*(?=\()/i,alias:"keyword"},range:{pattern:/\$?\b(?:[A-Z]+\$?\d+:\$?[A-Z]+\$?\d+|[A-Z]+:\$?[A-Z]+|\d+:\$?\d+)\b/i,alias:"property",inside:{operator:/:/,cell:/\$?[A-Z]+\$?\d+/i,column:/\$?[A-Z]+/i,row:/\$?\d+/}},cell:{pattern:/\b[A-Z]+\d+\b|\$[A-Za-z]+\$?\d+\b|\b[A-Za-z]+\$\d+\b/,alias:"property"},number:/(?:\b\d+(?:\.\d+)?|\B\.\d+)(?:e[+-]?\d+)?\b/i,boolean:/\b(?:FALSE|TRUE)\b/i,operator:/[-+*/^%=&,]|<[=>]?|>=?/,punctuation:/[[\]();{}|]/},Prism.languages.xlsx=Prism.languages.xls=Prism.languages["excel-formula"]; \ No newline at end of file diff --git a/components/prism-factor.js b/components/prism-factor.js index 2ee0519ba0..8db7bd3a9b 100644 --- a/components/prism-factor.js +++ b/components/prism-factor.js @@ -1,7 +1,7 @@ (function (Prism) { var comment_inside = { - 'function': /\b(?:TODOS?|FIX(?:MES?)?|NOTES?|BUGS?|XX+|HACKS?|WARN(?:ING)?|\?{2,}|!{2,})\b/ + 'function': /\b(?:BUGS?|FIX(?:MES?)?|NOTES?|TODOS?|XX+|HACKS?|WARN(?:ING)?|\?{2,}|!{2,})\b/ }; var string_inside = { 'number': /\\[^\s']|%\w/ @@ -182,7 +182,7 @@ 'stack-effect-delimiter': [ { // opening parenthesis - pattern: /(^|\s)(?:call|execute|eval)?\((?=\s)/, + pattern: /(^|\s)(?:call|eval|execute)?\((?=\s)/, lookbehind: true, alias: 'operator' }, @@ -265,7 +265,7 @@ see */ 'conventionally-named-word': { - pattern: /(^|\s)(?!")(?:(?:set|change|with|new)-\S+|\$\S+|>[^>\s]+|[^:>\s]+>|[^>\s]+>[^>\s]+|\+[^+\s]+\+|[^?\s]+\?|\?[^?\s]+|[^>\s]+>>|>>[^>\s]+|[^<\s]+<<|\([^()\s]+\)|[^!\s]+!|[^*\s]\S*\*|[^.\s]\S*\.)(?=\s|$)/, + pattern: /(^|\s)(?!")(?:(?:change|new|set|with)-\S+|\$\S+|>[^>\s]+|[^:>\s]+>|[^>\s]+>[^>\s]+|\+[^+\s]+\+|[^?\s]+\?|\?[^?\s]+|[^>\s]+>>|>>[^>\s]+|[^<\s]+<<|\([^()\s]+\)|[^!\s]+!|[^*\s]\S*\*|[^.\s]\S*\.)(?=\s|$)/, lookbehind: true, alias: 'keyword' }, diff --git a/components/prism-factor.min.js b/components/prism-factor.min.js index 0b9195c0f1..58a01e35ba 100644 --- a/components/prism-factor.min.js +++ b/components/prism-factor.min.js @@ -1 +1 @@ -!function(e){var t={function:/\b(?:TODOS?|FIX(?:MES?)?|NOTES?|BUGS?|XX+|HACKS?|WARN(?:ING)?|\?{2,}|!{2,})\b/},s={number:/\\[^\s']|%\w/},i={comment:[{pattern:/(^|\s)(?:! .*|!$)/,lookbehind:!0,inside:t},{pattern:/(^|\s)\/\*\s[\s\S]*?\*\/(?=\s|$)/,lookbehind:!0,greedy:!0,inside:t},{pattern:/(^|\s)!\[(={0,6})\[\s[\s\S]*?\]\2\](?=\s|$)/,lookbehind:!0,greedy:!0,inside:t}],number:[{pattern:/(^|\s)[+-]?\d+(?=\s|$)/,lookbehind:!0},{pattern:/(^|\s)[+-]?0(?:b[01]+|o[0-7]+|d\d+|x[\dA-F]+)(?=\s|$)/i,lookbehind:!0},{pattern:/(^|\s)[+-]?\d+\/\d+\.?(?=\s|$)/,lookbehind:!0},{pattern:/(^|\s)\+?\d+\+\d+\/\d+(?=\s|$)/,lookbehind:!0},{pattern:/(^|\s)-\d+-\d+\/\d+(?=\s|$)/,lookbehind:!0},{pattern:/(^|\s)[+-]?(?:\d*\.\d+|\d+\.\d*|\d+)(?:e[+-]?\d+)?(?=\s|$)/i,lookbehind:!0},{pattern:/(^|\s)NAN:\s+[\da-fA-F]+(?=\s|$)/,lookbehind:!0},{pattern:/(^|\s)[+-]?0(?:b1\.[01]*|o1\.[0-7]*|d1\.\d*|x1\.[\dA-F]*)p\d+(?=\s|$)/i,lookbehind:!0}],regexp:{pattern:/(^|\s)R\/\s(?:\\\S|[^\\/])*\/(?:[idmsr]*|[idmsr]+-[idmsr]+)(?=\s|$)/,lookbehind:!0,alias:"number",inside:{variable:/\\\S/,keyword:/[+?*\[\]^$(){}.|]/,operator:{pattern:/(\/)[idmsr]+(?:-[idmsr]+)?/,lookbehind:!0}}},boolean:{pattern:/(^|\s)[tf](?=\s|$)/,lookbehind:!0},"custom-string":{pattern:/(^|\s)[A-Z0-9\-]+"\s(?:\\\S|[^"\\])*"/,lookbehind:!0,greedy:!0,alias:"string",inside:{number:/\\\S|%\w|\//}},"multiline-string":[{pattern:/(^|\s)STRING:\s+\S+(?:\n|\r\n).*(?:\n|\r\n)\s*;(?=\s|$)/,lookbehind:!0,greedy:!0,alias:"string",inside:{number:s.number,"semicolon-or-setlocal":{pattern:/([\r\n][ \t]*);(?=\s|$)/,lookbehind:!0,alias:"function"}}},{pattern:/(^|\s)HEREDOC:\s+\S+(?:\n|\r\n).*(?:\n|\r\n)\s*\S+(?=\s|$)/,lookbehind:!0,greedy:!0,alias:"string",inside:s},{pattern:/(^|\s)\[(={0,6})\[\s[\s\S]*?\]\2\](?=\s|$)/,lookbehind:!0,greedy:!0,alias:"string",inside:s}],"special-using":{pattern:/(^|\s)USING:(?:\s\S+)*(?=\s+;(?:\s|$))/,lookbehind:!0,alias:"function",inside:{string:{pattern:/(\s)[^:\s]+/,lookbehind:!0}}},"stack-effect-delimiter":[{pattern:/(^|\s)(?:call|execute|eval)?\((?=\s)/,lookbehind:!0,alias:"operator"},{pattern:/(\s)--(?=\s)/,lookbehind:!0,alias:"operator"},{pattern:/(\s)\)(?=\s|$)/,lookbehind:!0,alias:"operator"}],combinators:{pattern:null,lookbehind:!0,alias:"keyword"},"kernel-builtin":{pattern:null,lookbehind:!0,alias:"variable"},"sequences-builtin":{pattern:null,lookbehind:!0,alias:"variable"},"math-builtin":{pattern:null,lookbehind:!0,alias:"variable"},"constructor-word":{pattern:/(^|\s)<(?!=+>|-+>)\S+>(?=\s|$)/,lookbehind:!0,alias:"keyword"},"other-builtin-syntax":{pattern:null,lookbehind:!0,alias:"operator"},"conventionally-named-word":{pattern:/(^|\s)(?!")(?:(?:set|change|with|new)-\S+|\$\S+|>[^>\s]+|[^:>\s]+>|[^>\s]+>[^>\s]+|\+[^+\s]+\+|[^?\s]+\?|\?[^?\s]+|[^>\s]+>>|>>[^>\s]+|[^<\s]+<<|\([^()\s]+\)|[^!\s]+!|[^*\s]\S*\*|[^.\s]\S*\.)(?=\s|$)/,lookbehind:!0,alias:"keyword"},"colon-syntax":{pattern:/(^|\s)(?:[A-Z0-9\-]+#?)?:{1,2}\s+(?:;\S+|(?!;)\S+)(?=\s|$)/,lookbehind:!0,greedy:!0,alias:"function"},"semicolon-or-setlocal":{pattern:/(\s)(?:;|:>)(?=\s|$)/,lookbehind:!0,alias:"function"},"curly-brace-literal-delimiter":[{pattern:/(^|\s)[a-z]*\{(?=\s)/i,lookbehind:!0,alias:"operator"},{pattern:/(\s)\}(?=\s|$)/,lookbehind:!0,alias:"operator"}],"quotation-delimiter":[{pattern:/(^|\s)\[(?=\s)/,lookbehind:!0,alias:"operator"},{pattern:/(\s)\](?=\s|$)/,lookbehind:!0,alias:"operator"}],"normal-word":{pattern:/(^|\s)[^"\s]\S*(?=\s|$)/,lookbehind:!0},string:{pattern:/"(?:\\\S|[^"\\])*"/,greedy:!0,inside:s}},n=function(e){return(e+"").replace(/([.?*+\^$\[\]\\(){}|\-])/g,"\\$1")},r=function(e){return new RegExp("(^|\\s)(?:"+e.map(n).join("|")+")(?=\\s|$)")},a={"kernel-builtin":["or","2nipd","4drop","tuck","wrapper","nip","wrapper?","callstack>array","die","dupd","callstack","callstack?","3dup","hashcode","pick","4nip","build",">boolean","nipd","clone","5nip","eq?","?","=","swapd","2over","clear","2dup","get-retainstack","not","tuple?","dup","3nipd","call","-rotd","object","drop","assert=","assert?","-rot","execute","boa","get-callstack","curried?","3drop","pickd","overd","over","roll","3nip","swap","and","2nip","rotd","throw","(clone)","hashcode*","spin","reach","4dup","equal?","get-datastack","assert","2drop","","boolean?","identity-hashcode","identity-tuple?","null","composed?","new","5drop","rot","-roll","xor","identity-tuple","boolean"],"other-builtin-syntax":["=======","recursive","flushable",">>","<<<<<<","M\\","B","PRIVATE>","\\","======","final","inline","delimiter","deprecated",">>>>>","<<<<<<<","parse-complex","malformed-complex","read-only",">>>>>>>","call-next-method","<<","foldable","$","$[","${"],"sequences-builtin":["member-eq?","mismatch","append","assert-sequence=","longer","repetition","clone-like","3sequence","assert-sequence?","last-index-from","reversed","index-from","cut*","pad-tail","join-as","remove-eq!","concat-as","but-last","snip","nths","nth","sequence","longest","slice?","","remove-nth","tail-slice","empty?","tail*","member?","virtual-sequence?","set-length","drop-prefix","iota","unclip","bounds-error?","unclip-last-slice","non-negative-integer-expected","non-negative-integer-expected?","midpoint@","longer?","?set-nth","?first","rest-slice","prepend-as","prepend","fourth","sift","subseq-start","new-sequence","?last","like","first4","1sequence","reverse","slice","virtual@","repetition?","set-last","index","4sequence","max-length","set-second","immutable-sequence","first2","first3","supremum","unclip-slice","suffix!","insert-nth","tail","3append","short","suffix","concat","flip","immutable?","reverse!","2sequence","sum","delete-all","indices","snip-slice","","check-slice","sequence?","head","append-as","halves","sequence=","collapse-slice","?second","slice-error?","product","bounds-check?","bounds-check","immutable","virtual-exemplar","harvest","remove","pad-head","last","set-fourth","cartesian-product","remove-eq","shorten","shorter","reversed?","shorter?","shortest","head-slice","pop*","tail-slice*","but-last-slice","iota?","append!","cut-slice","new-resizable","head-slice*","sequence-hashcode","pop","set-nth","?nth","second","join","immutable-sequence?","","3append-as","virtual-sequence","subseq?","remove-nth!","length","last-index","lengthen","assert-sequence","copy","move","third","first","tail?","set-first","prefix","bounds-error","","exchange","surround","cut","min-length","set-third","push-all","head?","subseq-start-from","delete-slice","rest","sum-lengths","head*","infimum","remove!","glue","slice-error","subseq","push","replace-slice","subseq-as","unclip-last"],"math-builtin":["number=","next-power-of-2","?1+","fp-special?","imaginary-part","float>bits","number?","fp-infinity?","bignum?","fp-snan?","denominator","gcd","*","+","fp-bitwise=","-","u>=","/",">=","bitand","power-of-2?","log2-expects-positive","neg?","<","log2",">","integer?","number","bits>double","2/","zero?","bits>float","float?","shift","ratio?","rect>","even?","ratio","fp-sign","bitnot",">fixnum","complex?","/i","integer>fixnum","/f","sgn",">bignum","next-float","u<","u>","mod","recip","rational",">float","2^","integer","fixnum?","neg","fixnum","sq","bignum",">rect","bit?","fp-qnan?","simple-gcd","complex","","real",">fraction","double>bits","bitor","rem","fp-nan-payload","real-part","log2-expects-positive?","prev-float","align","unordered?","float","fp-nan?","abs","bitxor","integer>fixnum-strict","u<=","odd?","<=","/mod",">integer","real?","rational?","numerator"]};Object.keys(a).forEach(function(e){i[e].pattern=r(a[e])});i.combinators.pattern=r(["2bi","while","2tri","bi*","4dip","both?","same?","tri@","curry","prepose","3bi","?if","tri*","2keep","3keep","curried","2keepd","when","2bi*","2tri*","4keep","bi@","keepdd","do","unless*","tri-curry","if*","loop","bi-curry*","when*","2bi@","2tri@","with","2with","either?","bi","until","3dip","3curry","tri-curry*","tri-curry@","bi-curry","keepd","compose","2dip","if","3tri","unless","tuple","keep","2curry","tri","most","while*","dip","composed","bi-curry@","find-last-from","trim-head-slice","map-as","each-from","none?","trim-tail","partition","if-empty","accumulate*","reject!","find-from","accumulate-as","collector-for-as","reject","map","map-sum","accumulate!","2each-from","follow","supremum-by","map!","unless-empty","collector","padding","reduce-index","replicate-as","infimum-by","trim-tail-slice","count","find-index","filter","accumulate*!","reject-as","map-integers","map-find","reduce","selector","interleave","2map","filter-as","binary-reduce","map-index-as","find","produce","filter!","replicate","cartesian-map","cartesian-each","find-index-from","map-find-last","3map-as","3map","find-last","selector-as","2map-as","2map-reduce","accumulate","each","each-index","accumulate*-as","when-empty","all?","collector-as","push-either","new-like","collector-for","2selector","push-if","2all?","map-reduce","3each","any?","trim-slice","2reduce","change-nth","produce-as","2each","trim","trim-head","cartesian-find","map-index","if-zero","each-integer","unless-zero","(find-integer)","when-zero","find-last-integer","(all-integers?)","times","(each-integer)","find-integer","all-integers?","unless-negative","if-positive","when-positive","when-negative","unless-positive","if-negative","case","2cleave","cond>quot","case>quot","3cleave","wrong-values","to-fixed-point","alist>quot","cond","cleave","call-effect","recursive-hashcode","spread","deep-spread>quot","2||","0||","n||","0&&","2&&","3||","1||","1&&","n&&","3&&","smart-unless*","keep-inputs","reduce-outputs","smart-when*","cleave>array","smart-with","smart-apply","smart-if","inputs/outputs","output>sequence-n","map-outputs","map-reduce-outputs","dropping","output>array","smart-map-reduce","smart-2map-reduce","output>array-n","nullary","inputsequence"]),e.languages.factor=i}(Prism); \ No newline at end of file +!function(e){var t={function:/\b(?:BUGS?|FIX(?:MES?)?|NOTES?|TODOS?|XX+|HACKS?|WARN(?:ING)?|\?{2,}|!{2,})\b/},s={number:/\\[^\s']|%\w/},i={comment:[{pattern:/(^|\s)(?:! .*|!$)/,lookbehind:!0,inside:t},{pattern:/(^|\s)\/\*\s[\s\S]*?\*\/(?=\s|$)/,lookbehind:!0,greedy:!0,inside:t},{pattern:/(^|\s)!\[(={0,6})\[\s[\s\S]*?\]\2\](?=\s|$)/,lookbehind:!0,greedy:!0,inside:t}],number:[{pattern:/(^|\s)[+-]?\d+(?=\s|$)/,lookbehind:!0},{pattern:/(^|\s)[+-]?0(?:b[01]+|o[0-7]+|d\d+|x[\dA-F]+)(?=\s|$)/i,lookbehind:!0},{pattern:/(^|\s)[+-]?\d+\/\d+\.?(?=\s|$)/,lookbehind:!0},{pattern:/(^|\s)\+?\d+\+\d+\/\d+(?=\s|$)/,lookbehind:!0},{pattern:/(^|\s)-\d+-\d+\/\d+(?=\s|$)/,lookbehind:!0},{pattern:/(^|\s)[+-]?(?:\d*\.\d+|\d+\.\d*|\d+)(?:e[+-]?\d+)?(?=\s|$)/i,lookbehind:!0},{pattern:/(^|\s)NAN:\s+[\da-fA-F]+(?=\s|$)/,lookbehind:!0},{pattern:/(^|\s)[+-]?0(?:b1\.[01]*|o1\.[0-7]*|d1\.\d*|x1\.[\dA-F]*)p\d+(?=\s|$)/i,lookbehind:!0}],regexp:{pattern:/(^|\s)R\/\s(?:\\\S|[^\\/])*\/(?:[idmsr]*|[idmsr]+-[idmsr]+)(?=\s|$)/,lookbehind:!0,alias:"number",inside:{variable:/\\\S/,keyword:/[+?*\[\]^$(){}.|]/,operator:{pattern:/(\/)[idmsr]+(?:-[idmsr]+)?/,lookbehind:!0}}},boolean:{pattern:/(^|\s)[tf](?=\s|$)/,lookbehind:!0},"custom-string":{pattern:/(^|\s)[A-Z0-9\-]+"\s(?:\\\S|[^"\\])*"/,lookbehind:!0,greedy:!0,alias:"string",inside:{number:/\\\S|%\w|\//}},"multiline-string":[{pattern:/(^|\s)STRING:\s+\S+(?:\n|\r\n).*(?:\n|\r\n)\s*;(?=\s|$)/,lookbehind:!0,greedy:!0,alias:"string",inside:{number:s.number,"semicolon-or-setlocal":{pattern:/([\r\n][ \t]*);(?=\s|$)/,lookbehind:!0,alias:"function"}}},{pattern:/(^|\s)HEREDOC:\s+\S+(?:\n|\r\n).*(?:\n|\r\n)\s*\S+(?=\s|$)/,lookbehind:!0,greedy:!0,alias:"string",inside:s},{pattern:/(^|\s)\[(={0,6})\[\s[\s\S]*?\]\2\](?=\s|$)/,lookbehind:!0,greedy:!0,alias:"string",inside:s}],"special-using":{pattern:/(^|\s)USING:(?:\s\S+)*(?=\s+;(?:\s|$))/,lookbehind:!0,alias:"function",inside:{string:{pattern:/(\s)[^:\s]+/,lookbehind:!0}}},"stack-effect-delimiter":[{pattern:/(^|\s)(?:call|eval|execute)?\((?=\s)/,lookbehind:!0,alias:"operator"},{pattern:/(\s)--(?=\s)/,lookbehind:!0,alias:"operator"},{pattern:/(\s)\)(?=\s|$)/,lookbehind:!0,alias:"operator"}],combinators:{pattern:null,lookbehind:!0,alias:"keyword"},"kernel-builtin":{pattern:null,lookbehind:!0,alias:"variable"},"sequences-builtin":{pattern:null,lookbehind:!0,alias:"variable"},"math-builtin":{pattern:null,lookbehind:!0,alias:"variable"},"constructor-word":{pattern:/(^|\s)<(?!=+>|-+>)\S+>(?=\s|$)/,lookbehind:!0,alias:"keyword"},"other-builtin-syntax":{pattern:null,lookbehind:!0,alias:"operator"},"conventionally-named-word":{pattern:/(^|\s)(?!")(?:(?:change|new|set|with)-\S+|\$\S+|>[^>\s]+|[^:>\s]+>|[^>\s]+>[^>\s]+|\+[^+\s]+\+|[^?\s]+\?|\?[^?\s]+|[^>\s]+>>|>>[^>\s]+|[^<\s]+<<|\([^()\s]+\)|[^!\s]+!|[^*\s]\S*\*|[^.\s]\S*\.)(?=\s|$)/,lookbehind:!0,alias:"keyword"},"colon-syntax":{pattern:/(^|\s)(?:[A-Z0-9\-]+#?)?:{1,2}\s+(?:;\S+|(?!;)\S+)(?=\s|$)/,lookbehind:!0,greedy:!0,alias:"function"},"semicolon-or-setlocal":{pattern:/(\s)(?:;|:>)(?=\s|$)/,lookbehind:!0,alias:"function"},"curly-brace-literal-delimiter":[{pattern:/(^|\s)[a-z]*\{(?=\s)/i,lookbehind:!0,alias:"operator"},{pattern:/(\s)\}(?=\s|$)/,lookbehind:!0,alias:"operator"}],"quotation-delimiter":[{pattern:/(^|\s)\[(?=\s)/,lookbehind:!0,alias:"operator"},{pattern:/(\s)\](?=\s|$)/,lookbehind:!0,alias:"operator"}],"normal-word":{pattern:/(^|\s)[^"\s]\S*(?=\s|$)/,lookbehind:!0},string:{pattern:/"(?:\\\S|[^"\\])*"/,greedy:!0,inside:s}},n=function(e){return(e+"").replace(/([.?*+\^$\[\]\\(){}|\-])/g,"\\$1")},r=function(e){return new RegExp("(^|\\s)(?:"+e.map(n).join("|")+")(?=\\s|$)")},a={"kernel-builtin":["or","2nipd","4drop","tuck","wrapper","nip","wrapper?","callstack>array","die","dupd","callstack","callstack?","3dup","hashcode","pick","4nip","build",">boolean","nipd","clone","5nip","eq?","?","=","swapd","2over","clear","2dup","get-retainstack","not","tuple?","dup","3nipd","call","-rotd","object","drop","assert=","assert?","-rot","execute","boa","get-callstack","curried?","3drop","pickd","overd","over","roll","3nip","swap","and","2nip","rotd","throw","(clone)","hashcode*","spin","reach","4dup","equal?","get-datastack","assert","2drop","","boolean?","identity-hashcode","identity-tuple?","null","composed?","new","5drop","rot","-roll","xor","identity-tuple","boolean"],"other-builtin-syntax":["=======","recursive","flushable",">>","<<<<<<","M\\","B","PRIVATE>","\\","======","final","inline","delimiter","deprecated",">>>>>","<<<<<<<","parse-complex","malformed-complex","read-only",">>>>>>>","call-next-method","<<","foldable","$","$[","${"],"sequences-builtin":["member-eq?","mismatch","append","assert-sequence=","longer","repetition","clone-like","3sequence","assert-sequence?","last-index-from","reversed","index-from","cut*","pad-tail","join-as","remove-eq!","concat-as","but-last","snip","nths","nth","sequence","longest","slice?","","remove-nth","tail-slice","empty?","tail*","member?","virtual-sequence?","set-length","drop-prefix","iota","unclip","bounds-error?","unclip-last-slice","non-negative-integer-expected","non-negative-integer-expected?","midpoint@","longer?","?set-nth","?first","rest-slice","prepend-as","prepend","fourth","sift","subseq-start","new-sequence","?last","like","first4","1sequence","reverse","slice","virtual@","repetition?","set-last","index","4sequence","max-length","set-second","immutable-sequence","first2","first3","supremum","unclip-slice","suffix!","insert-nth","tail","3append","short","suffix","concat","flip","immutable?","reverse!","2sequence","sum","delete-all","indices","snip-slice","","check-slice","sequence?","head","append-as","halves","sequence=","collapse-slice","?second","slice-error?","product","bounds-check?","bounds-check","immutable","virtual-exemplar","harvest","remove","pad-head","last","set-fourth","cartesian-product","remove-eq","shorten","shorter","reversed?","shorter?","shortest","head-slice","pop*","tail-slice*","but-last-slice","iota?","append!","cut-slice","new-resizable","head-slice*","sequence-hashcode","pop","set-nth","?nth","second","join","immutable-sequence?","","3append-as","virtual-sequence","subseq?","remove-nth!","length","last-index","lengthen","assert-sequence","copy","move","third","first","tail?","set-first","prefix","bounds-error","","exchange","surround","cut","min-length","set-third","push-all","head?","subseq-start-from","delete-slice","rest","sum-lengths","head*","infimum","remove!","glue","slice-error","subseq","push","replace-slice","subseq-as","unclip-last"],"math-builtin":["number=","next-power-of-2","?1+","fp-special?","imaginary-part","float>bits","number?","fp-infinity?","bignum?","fp-snan?","denominator","gcd","*","+","fp-bitwise=","-","u>=","/",">=","bitand","power-of-2?","log2-expects-positive","neg?","<","log2",">","integer?","number","bits>double","2/","zero?","bits>float","float?","shift","ratio?","rect>","even?","ratio","fp-sign","bitnot",">fixnum","complex?","/i","integer>fixnum","/f","sgn",">bignum","next-float","u<","u>","mod","recip","rational",">float","2^","integer","fixnum?","neg","fixnum","sq","bignum",">rect","bit?","fp-qnan?","simple-gcd","complex","","real",">fraction","double>bits","bitor","rem","fp-nan-payload","real-part","log2-expects-positive?","prev-float","align","unordered?","float","fp-nan?","abs","bitxor","integer>fixnum-strict","u<=","odd?","<=","/mod",">integer","real?","rational?","numerator"]};Object.keys(a).forEach(function(e){i[e].pattern=r(a[e])});i.combinators.pattern=r(["2bi","while","2tri","bi*","4dip","both?","same?","tri@","curry","prepose","3bi","?if","tri*","2keep","3keep","curried","2keepd","when","2bi*","2tri*","4keep","bi@","keepdd","do","unless*","tri-curry","if*","loop","bi-curry*","when*","2bi@","2tri@","with","2with","either?","bi","until","3dip","3curry","tri-curry*","tri-curry@","bi-curry","keepd","compose","2dip","if","3tri","unless","tuple","keep","2curry","tri","most","while*","dip","composed","bi-curry@","find-last-from","trim-head-slice","map-as","each-from","none?","trim-tail","partition","if-empty","accumulate*","reject!","find-from","accumulate-as","collector-for-as","reject","map","map-sum","accumulate!","2each-from","follow","supremum-by","map!","unless-empty","collector","padding","reduce-index","replicate-as","infimum-by","trim-tail-slice","count","find-index","filter","accumulate*!","reject-as","map-integers","map-find","reduce","selector","interleave","2map","filter-as","binary-reduce","map-index-as","find","produce","filter!","replicate","cartesian-map","cartesian-each","find-index-from","map-find-last","3map-as","3map","find-last","selector-as","2map-as","2map-reduce","accumulate","each","each-index","accumulate*-as","when-empty","all?","collector-as","push-either","new-like","collector-for","2selector","push-if","2all?","map-reduce","3each","any?","trim-slice","2reduce","change-nth","produce-as","2each","trim","trim-head","cartesian-find","map-index","if-zero","each-integer","unless-zero","(find-integer)","when-zero","find-last-integer","(all-integers?)","times","(each-integer)","find-integer","all-integers?","unless-negative","if-positive","when-positive","when-negative","unless-positive","if-negative","case","2cleave","cond>quot","case>quot","3cleave","wrong-values","to-fixed-point","alist>quot","cond","cleave","call-effect","recursive-hashcode","spread","deep-spread>quot","2||","0||","n||","0&&","2&&","3||","1||","1&&","n&&","3&&","smart-unless*","keep-inputs","reduce-outputs","smart-when*","cleave>array","smart-with","smart-apply","smart-if","inputs/outputs","output>sequence-n","map-outputs","map-reduce-outputs","dropping","output>array","smart-map-reduce","smart-2map-reduce","output>array-n","nullary","inputsequence"]),e.languages.factor=i}(Prism); \ No newline at end of file diff --git a/components/prism-flow.js b/components/prism-flow.js index f07fe62e04..f25ac018f0 100644 --- a/components/prism-flow.js +++ b/components/prism-flow.js @@ -4,7 +4,7 @@ Prism.languages.insertBefore('flow', 'keyword', { 'type': [ { - pattern: /\b(?:[Nn]umber|[Ss]tring|[Bb]oolean|Function|any|mixed|null|void)\b/, + pattern: /\b(?:[Bb]oolean|Function|[Nn]umber|[Ss]tring|any|mixed|null|void)\b/, alias: 'tag' } ] @@ -24,11 +24,11 @@ } Prism.languages.flow.keyword.unshift( { - pattern: /(^|[^$]\b)(?:type|opaque|declare|Class)\b(?!\$)/, + pattern: /(^|[^$]\b)(?:Class|declare|opaque|type)\b(?!\$)/, lookbehind: true }, { - pattern: /(^|[^$]\B)\$(?:await|Diff|Exact|Keys|ObjMap|PropertyType|Shape|Record|Supertype|Subtype|Enum)\b(?!\$)/, + pattern: /(^|[^$]\B)\$(?:Diff|Enum|Exact|Keys|ObjMap|PropertyType|Record|Shape|Subtype|Supertype|await)\b(?!\$)/, lookbehind: true } ); diff --git a/components/prism-flow.min.js b/components/prism-flow.min.js index ffaedf76e7..98b046b4f3 100644 --- a/components/prism-flow.min.js +++ b/components/prism-flow.min.js @@ -1 +1 @@ -!function(a){a.languages.flow=a.languages.extend("javascript",{}),a.languages.insertBefore("flow","keyword",{type:[{pattern:/\b(?:[Nn]umber|[Ss]tring|[Bb]oolean|Function|any|mixed|null|void)\b/,alias:"tag"}]}),a.languages.flow["function-variable"].pattern=/(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=\s*(?:function\b|(?:\([^()]*\)(?:\s*:\s*\w+)?|(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/i,delete a.languages.flow.parameter,a.languages.insertBefore("flow","operator",{"flow-punctuation":{pattern:/\{\||\|\}/,alias:"punctuation"}}),Array.isArray(a.languages.flow.keyword)||(a.languages.flow.keyword=[a.languages.flow.keyword]),a.languages.flow.keyword.unshift({pattern:/(^|[^$]\b)(?:type|opaque|declare|Class)\b(?!\$)/,lookbehind:!0},{pattern:/(^|[^$]\B)\$(?:await|Diff|Exact|Keys|ObjMap|PropertyType|Shape|Record|Supertype|Subtype|Enum)\b(?!\$)/,lookbehind:!0})}(Prism); \ No newline at end of file +!function(a){a.languages.flow=a.languages.extend("javascript",{}),a.languages.insertBefore("flow","keyword",{type:[{pattern:/\b(?:[Bb]oolean|Function|[Nn]umber|[Ss]tring|any|mixed|null|void)\b/,alias:"tag"}]}),a.languages.flow["function-variable"].pattern=/(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=\s*(?:function\b|(?:\([^()]*\)(?:\s*:\s*\w+)?|(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/i,delete a.languages.flow.parameter,a.languages.insertBefore("flow","operator",{"flow-punctuation":{pattern:/\{\||\|\}/,alias:"punctuation"}}),Array.isArray(a.languages.flow.keyword)||(a.languages.flow.keyword=[a.languages.flow.keyword]),a.languages.flow.keyword.unshift({pattern:/(^|[^$]\b)(?:Class|declare|opaque|type)\b(?!\$)/,lookbehind:!0},{pattern:/(^|[^$]\B)\$(?:Diff|Enum|Exact|Keys|ObjMap|PropertyType|Record|Shape|Subtype|Supertype|await)\b(?!\$)/,lookbehind:!0})}(Prism); \ No newline at end of file diff --git a/components/prism-fortran.js b/components/prism-fortran.js index 26d59af2da..6d3dbc592e 100644 --- a/components/prism-fortran.js +++ b/components/prism-fortran.js @@ -16,17 +16,17 @@ Prism.languages.fortran = { pattern: /!.*/, greedy: true }, - 'boolean': /\.(?:TRUE|FALSE)\.(?:_\w+)?/i, + 'boolean': /\.(?:FALSE|TRUE)\.(?:_\w+)?/i, 'number': /(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[ED][+-]?\d+)?(?:_\w+)?/i, 'keyword': [ // Types - /\b(?:INTEGER|REAL|DOUBLE ?PRECISION|COMPLEX|CHARACTER|LOGICAL)\b/i, + /\b(?:CHARACTER|COMPLEX|DOUBLE ?PRECISION|INTEGER|LOGICAL|REAL)\b/i, // END statements /\b(?:END ?)?(?:BLOCK ?DATA|DO|FILE|FORALL|FUNCTION|IF|INTERFACE|MODULE(?! PROCEDURE)|PROGRAM|SELECT|SUBROUTINE|TYPE|WHERE)\b/i, // Statements /\b(?:ALLOCATABLE|ALLOCATE|BACKSPACE|CALL|CASE|CLOSE|COMMON|CONTAINS|CONTINUE|CYCLE|DATA|DEALLOCATE|DIMENSION|DO|END|EQUIVALENCE|EXIT|EXTERNAL|FORMAT|GO ?TO|IMPLICIT(?: NONE)?|INQUIRE|INTENT|INTRINSIC|MODULE PROCEDURE|NAMELIST|NULLIFY|OPEN|OPTIONAL|PARAMETER|POINTER|PRINT|PRIVATE|PUBLIC|READ|RETURN|REWIND|SAVE|SELECT|STOP|TARGET|WHILE|WRITE)\b/i, // Others - /\b(?:ASSIGNMENT|DEFAULT|ELEMENTAL|ELSE|ELSEWHERE|ELSEIF|ENTRY|IN|INCLUDE|INOUT|KIND|NULL|ONLY|OPERATOR|OUT|PURE|RECURSIVE|RESULT|SEQUENCE|STAT|THEN|USE)\b/i + /\b(?:ASSIGNMENT|DEFAULT|ELEMENTAL|ELSE|ELSEIF|ELSEWHERE|ENTRY|IN|INCLUDE|INOUT|KIND|NULL|ONLY|OPERATOR|OUT|PURE|RECURSIVE|RESULT|SEQUENCE|STAT|THEN|USE)\b/i ], 'operator': [ /\*\*|\/\/|=>|[=\/]=|[<>]=?|::|[+\-*=%]|\.[A-Z]+\./i, diff --git a/components/prism-fortran.min.js b/components/prism-fortran.min.js index 976d1b7bae..f817c769c9 100644 --- a/components/prism-fortran.min.js +++ b/components/prism-fortran.min.js @@ -1 +1 @@ -Prism.languages.fortran={"quoted-number":{pattern:/[BOZ](['"])[A-F0-9]+\1/i,alias:"number"},string:{pattern:/(?:\b\w+_)?(['"])(?:\1\1|&(?:\r\n?|\n)(?:[ \t]*!.*(?:\r\n?|\n)|(?![ \t]*!))|(?!\1).)*(?:\1|&)/,inside:{comment:{pattern:/(&(?:\r\n?|\n)\s*)!.*/,lookbehind:!0}}},comment:{pattern:/!.*/,greedy:!0},boolean:/\.(?:TRUE|FALSE)\.(?:_\w+)?/i,number:/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[ED][+-]?\d+)?(?:_\w+)?/i,keyword:[/\b(?:INTEGER|REAL|DOUBLE ?PRECISION|COMPLEX|CHARACTER|LOGICAL)\b/i,/\b(?:END ?)?(?:BLOCK ?DATA|DO|FILE|FORALL|FUNCTION|IF|INTERFACE|MODULE(?! PROCEDURE)|PROGRAM|SELECT|SUBROUTINE|TYPE|WHERE)\b/i,/\b(?:ALLOCATABLE|ALLOCATE|BACKSPACE|CALL|CASE|CLOSE|COMMON|CONTAINS|CONTINUE|CYCLE|DATA|DEALLOCATE|DIMENSION|DO|END|EQUIVALENCE|EXIT|EXTERNAL|FORMAT|GO ?TO|IMPLICIT(?: NONE)?|INQUIRE|INTENT|INTRINSIC|MODULE PROCEDURE|NAMELIST|NULLIFY|OPEN|OPTIONAL|PARAMETER|POINTER|PRINT|PRIVATE|PUBLIC|READ|RETURN|REWIND|SAVE|SELECT|STOP|TARGET|WHILE|WRITE)\b/i,/\b(?:ASSIGNMENT|DEFAULT|ELEMENTAL|ELSE|ELSEWHERE|ELSEIF|ENTRY|IN|INCLUDE|INOUT|KIND|NULL|ONLY|OPERATOR|OUT|PURE|RECURSIVE|RESULT|SEQUENCE|STAT|THEN|USE)\b/i],operator:[/\*\*|\/\/|=>|[=\/]=|[<>]=?|::|[+\-*=%]|\.[A-Z]+\./i,{pattern:/(^|(?!\().)\/(?!\))/,lookbehind:!0}],punctuation:/\(\/|\/\)|[(),;:&]/}; \ No newline at end of file +Prism.languages.fortran={"quoted-number":{pattern:/[BOZ](['"])[A-F0-9]+\1/i,alias:"number"},string:{pattern:/(?:\b\w+_)?(['"])(?:\1\1|&(?:\r\n?|\n)(?:[ \t]*!.*(?:\r\n?|\n)|(?![ \t]*!))|(?!\1).)*(?:\1|&)/,inside:{comment:{pattern:/(&(?:\r\n?|\n)\s*)!.*/,lookbehind:!0}}},comment:{pattern:/!.*/,greedy:!0},boolean:/\.(?:FALSE|TRUE)\.(?:_\w+)?/i,number:/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[ED][+-]?\d+)?(?:_\w+)?/i,keyword:[/\b(?:CHARACTER|COMPLEX|DOUBLE ?PRECISION|INTEGER|LOGICAL|REAL)\b/i,/\b(?:END ?)?(?:BLOCK ?DATA|DO|FILE|FORALL|FUNCTION|IF|INTERFACE|MODULE(?! PROCEDURE)|PROGRAM|SELECT|SUBROUTINE|TYPE|WHERE)\b/i,/\b(?:ALLOCATABLE|ALLOCATE|BACKSPACE|CALL|CASE|CLOSE|COMMON|CONTAINS|CONTINUE|CYCLE|DATA|DEALLOCATE|DIMENSION|DO|END|EQUIVALENCE|EXIT|EXTERNAL|FORMAT|GO ?TO|IMPLICIT(?: NONE)?|INQUIRE|INTENT|INTRINSIC|MODULE PROCEDURE|NAMELIST|NULLIFY|OPEN|OPTIONAL|PARAMETER|POINTER|PRINT|PRIVATE|PUBLIC|READ|RETURN|REWIND|SAVE|SELECT|STOP|TARGET|WHILE|WRITE)\b/i,/\b(?:ASSIGNMENT|DEFAULT|ELEMENTAL|ELSE|ELSEIF|ELSEWHERE|ENTRY|IN|INCLUDE|INOUT|KIND|NULL|ONLY|OPERATOR|OUT|PURE|RECURSIVE|RESULT|SEQUENCE|STAT|THEN|USE)\b/i],operator:[/\*\*|\/\/|=>|[=\/]=|[<>]=?|::|[+\-*=%]|\.[A-Z]+\./i,{pattern:/(^|(?!\().)\/(?!\))/,lookbehind:!0}],punctuation:/\(\/|\/\)|[(),;:&]/}; \ No newline at end of file diff --git a/components/prism-fsharp.js b/components/prism-fsharp.js index 14b95613e3..3c670aaf41 100644 --- a/components/prism-fsharp.js +++ b/components/prism-fsharp.js @@ -21,12 +21,12 @@ Prism.languages.fsharp = Prism.languages.extend('clike', { 'punctuation': /\./ } }, - 'keyword': /\b(?:let|return|use|yield)(?:!\B|\b)|\b(?:abstract|and|as|assert|base|begin|class|default|delegate|do|done|downcast|downto|elif|else|end|exception|extern|false|finally|for|fun|function|global|if|in|inherit|inline|interface|internal|lazy|match|member|module|mutable|namespace|new|not|null|of|open|or|override|private|public|rec|select|static|struct|then|to|true|try|type|upcast|val|void|when|while|with|asr|land|lor|lsl|lsr|lxor|mod|sig|atomic|break|checked|component|const|constraint|constructor|continue|eager|event|external|fixed|functor|include|method|mixin|object|parallel|process|protected|pure|sealed|tailcall|trait|virtual|volatile)\b/, + 'keyword': /\b(?:let|return|use|yield)(?:!\B|\b)|\b(?:abstract|and|as|asr|assert|atomic|base|begin|break|checked|class|component|const|constraint|constructor|continue|default|delegate|do|done|downcast|downto|eager|elif|else|end|event|exception|extern|external|false|finally|fixed|for|fun|function|functor|global|if|in|include|inherit|inline|interface|internal|land|lazy|lor|lsl|lsr|lxor|match|member|method|mixin|mod|module|mutable|namespace|new|not|null|object|of|open|or|override|parallel|private|process|protected|public|pure|rec|sealed|select|sig|static|struct|tailcall|then|to|trait|true|try|type|upcast|val|virtual|void|volatile|when|while|with)\b/, 'number': [ - /\b0x[\da-fA-F]+(?:un|lf|LF)?\b/, - /\b0b[01]+(?:y|uy)?\b/, + /\b0x[\da-fA-F]+(?:LF|lf|un)?\b/, + /\b0b[01]+(?:uy|y)?\b/, /(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[fm]|e[+-]?\d+)?\b/i, - /\b\d+(?:[IlLsy]|u[lsy]?|UL)?\b/ + /\b\d+(?:[IlLsy]|UL|u[lsy]?)?\b/ ], 'operator': /([<>~&^])\1\1|([*.:<>&])\2|<-|->|[!=:]=|?|\??(?:<=|>=|<>|[-+*/%=<>])\??|[!?^&]|~[+~-]|:>|:\?>?/ }); diff --git a/components/prism-fsharp.min.js b/components/prism-fsharp.min.js index a8252b11fb..99f0b6ffb8 100644 --- a/components/prism-fsharp.min.js +++ b/components/prism-fsharp.min.js @@ -1 +1 @@ -Prism.languages.fsharp=Prism.languages.extend("clike",{comment:[{pattern:/(^|[^\\])\(\*(?!\))[\s\S]*?\*\)/,lookbehind:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0}],string:{pattern:/(?:"""[\s\S]*?"""|@"(?:""|[^"])*"|"(?:\\[\s\S]|[^\\"])*")B?|'(?:[^\\']|\\(?:.|\d{3}|x[a-fA-F\d]{2}|u[a-fA-F\d]{4}|U[a-fA-F\d]{8}))'B?/,greedy:!0},"class-name":{pattern:/(\b(?:exception|inherit|interface|new|of|type)\s+|\w\s*:\s*|\s:\??>\s*)[.\w]+\b(?:\s*(?:->|\*)\s*[.\w]+\b)*(?!\s*[:.])/,lookbehind:!0,inside:{operator:/->|\*/,punctuation:/\./}},keyword:/\b(?:let|return|use|yield)(?:!\B|\b)|\b(?:abstract|and|as|assert|base|begin|class|default|delegate|do|done|downcast|downto|elif|else|end|exception|extern|false|finally|for|fun|function|global|if|in|inherit|inline|interface|internal|lazy|match|member|module|mutable|namespace|new|not|null|of|open|or|override|private|public|rec|select|static|struct|then|to|true|try|type|upcast|val|void|when|while|with|asr|land|lor|lsl|lsr|lxor|mod|sig|atomic|break|checked|component|const|constraint|constructor|continue|eager|event|external|fixed|functor|include|method|mixin|object|parallel|process|protected|pure|sealed|tailcall|trait|virtual|volatile)\b/,number:[/\b0x[\da-fA-F]+(?:un|lf|LF)?\b/,/\b0b[01]+(?:y|uy)?\b/,/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[fm]|e[+-]?\d+)?\b/i,/\b\d+(?:[IlLsy]|u[lsy]?|UL)?\b/],operator:/([<>~&^])\1\1|([*.:<>&])\2|<-|->|[!=:]=|?|\??(?:<=|>=|<>|[-+*/%=<>])\??|[!?^&]|~[+~-]|:>|:\?>?/}),Prism.languages.insertBefore("fsharp","keyword",{preprocessor:{pattern:/(^[\t ]*)#.*/m,lookbehind:!0,alias:"property",inside:{directive:{pattern:/(^#)\b(?:else|endif|if|light|line|nowarn)\b/,lookbehind:!0,alias:"keyword"}}}}),Prism.languages.insertBefore("fsharp","punctuation",{"computation-expression":{pattern:/\b[_a-z]\w*(?=\s*\{)/i,alias:"keyword"}}),Prism.languages.insertBefore("fsharp","string",{annotation:{pattern:/\[<.+?>\]/,inside:{punctuation:/^\[<|>\]$/,"class-name":{pattern:/^\w+$|(^|;\s*)[A-Z]\w*(?=\()/,lookbehind:!0},"annotation-content":{pattern:/[\s\S]+/,inside:Prism.languages.fsharp}}}}); \ No newline at end of file +Prism.languages.fsharp=Prism.languages.extend("clike",{comment:[{pattern:/(^|[^\\])\(\*(?!\))[\s\S]*?\*\)/,lookbehind:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0}],string:{pattern:/(?:"""[\s\S]*?"""|@"(?:""|[^"])*"|"(?:\\[\s\S]|[^\\"])*")B?|'(?:[^\\']|\\(?:.|\d{3}|x[a-fA-F\d]{2}|u[a-fA-F\d]{4}|U[a-fA-F\d]{8}))'B?/,greedy:!0},"class-name":{pattern:/(\b(?:exception|inherit|interface|new|of|type)\s+|\w\s*:\s*|\s:\??>\s*)[.\w]+\b(?:\s*(?:->|\*)\s*[.\w]+\b)*(?!\s*[:.])/,lookbehind:!0,inside:{operator:/->|\*/,punctuation:/\./}},keyword:/\b(?:let|return|use|yield)(?:!\B|\b)|\b(?:abstract|and|as|asr|assert|atomic|base|begin|break|checked|class|component|const|constraint|constructor|continue|default|delegate|do|done|downcast|downto|eager|elif|else|end|event|exception|extern|external|false|finally|fixed|for|fun|function|functor|global|if|in|include|inherit|inline|interface|internal|land|lazy|lor|lsl|lsr|lxor|match|member|method|mixin|mod|module|mutable|namespace|new|not|null|object|of|open|or|override|parallel|private|process|protected|public|pure|rec|sealed|select|sig|static|struct|tailcall|then|to|trait|true|try|type|upcast|val|virtual|void|volatile|when|while|with)\b/,number:[/\b0x[\da-fA-F]+(?:LF|lf|un)?\b/,/\b0b[01]+(?:uy|y)?\b/,/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[fm]|e[+-]?\d+)?\b/i,/\b\d+(?:[IlLsy]|UL|u[lsy]?)?\b/],operator:/([<>~&^])\1\1|([*.:<>&])\2|<-|->|[!=:]=|?|\??(?:<=|>=|<>|[-+*/%=<>])\??|[!?^&]|~[+~-]|:>|:\?>?/}),Prism.languages.insertBefore("fsharp","keyword",{preprocessor:{pattern:/(^[\t ]*)#.*/m,lookbehind:!0,alias:"property",inside:{directive:{pattern:/(^#)\b(?:else|endif|if|light|line|nowarn)\b/,lookbehind:!0,alias:"keyword"}}}}),Prism.languages.insertBefore("fsharp","punctuation",{"computation-expression":{pattern:/\b[_a-z]\w*(?=\s*\{)/i,alias:"keyword"}}),Prism.languages.insertBefore("fsharp","string",{annotation:{pattern:/\[<.+?>\]/,inside:{punctuation:/^\[<|>\]$/,"class-name":{pattern:/^\w+$|(^|;\s*)[A-Z]\w*(?=\()/,lookbehind:!0},"annotation-content":{pattern:/[\s\S]+/,inside:Prism.languages.fsharp}}}}); \ No newline at end of file diff --git a/components/prism-ftl.js b/components/prism-ftl.js index 91928943ed..bc1984880a 100644 --- a/components/prism-ftl.js +++ b/components/prism-ftl.js @@ -36,7 +36,7 @@ } ], 'keyword': /\b(?:as)\b/, - 'boolean': /\b(?:true|false)\b/, + 'boolean': /\b(?:false|true)\b/, 'builtin-function': { pattern: /((?:^|[^?])\?\s*)\w+/, lookbehind: true, diff --git a/components/prism-ftl.min.js b/components/prism-ftl.min.js index fa46e92116..ce9b3b69b5 100644 --- a/components/prism-ftl.min.js +++ b/components/prism-ftl.min.js @@ -1 +1 @@ -!function(n){for(var i="[^<()\"']|\\((?:)*\\)|<(?!#--)|<#--(?:[^-]|-(?!->))*--\x3e|\"(?:[^\\\\\"]|\\\\.)*\"|'(?:[^\\\\']|\\\\.)*'",e=0;e<2;e++)i=i.replace(//g,function(){return i});i=i.replace(//g,"[^\\s\\S]");var t={comment:/<#--[\s\S]*?-->/,string:[{pattern:/\br("|')(?:(?!\1)[^\\]|\\.)*\1/,greedy:!0},{pattern:RegExp("(\"|')(?:(?!\\1|\\$\\{)[^\\\\]|\\\\.|\\$\\{(?:(?!\\})(?:))*\\})*\\1".replace(//g,function(){return i})),greedy:!0,inside:{interpolation:{pattern:RegExp("((?:^|[^\\\\])(?:\\\\\\\\)*)\\$\\{(?:(?!\\})(?:))*\\}".replace(//g,function(){return i})),lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:null}}}}],keyword:/\b(?:as)\b/,boolean:/\b(?:true|false)\b/,"builtin-function":{pattern:/((?:^|[^?])\?\s*)\w+/,lookbehind:!0,alias:"function"},function:/\b\w+(?=\s*\()/,number:/\b\d+(?:\.\d+)?\b/,operator:/\.\.[<*!]?|->|--|\+\+|&&|\|\||\?{1,2}|[-+*/%!=<>]=?|\b(?:gt|gte|lt|lte)\b/,punctuation:/[,;.:()[\]{}]/};t.string[1].inside.interpolation.inside.rest=t,n.languages.ftl={"ftl-comment":{pattern:/^<#--[\s\S]*/,alias:"comment"},"ftl-directive":{pattern:/^<[\s\S]+>$/,inside:{directive:{pattern:/(^<\/?)[#@][a-z]\w*/i,lookbehind:!0,alias:"keyword"},punctuation:/^<\/?|\/?>$/,content:{pattern:/\s*\S[\s\S]*/,alias:"ftl",inside:t}}},"ftl-interpolation":{pattern:/^\$\{[\s\S]*\}$/,inside:{punctuation:/^\$\{|\}$/,content:{pattern:/\s*\S[\s\S]*/,alias:"ftl",inside:t}}}},n.hooks.add("before-tokenize",function(e){var t=RegExp("<#--[^]*?--\x3e|)*?>|\\$\\{(?:)*?\\}".replace(//g,function(){return i}),"gi");n.languages["markup-templating"].buildPlaceholders(e,"ftl",t)}),n.hooks.add("after-tokenize",function(e){n.languages["markup-templating"].tokenizePlaceholders(e,"ftl")})}(Prism); \ No newline at end of file +!function(n){for(var i="[^<()\"']|\\((?:)*\\)|<(?!#--)|<#--(?:[^-]|-(?!->))*--\x3e|\"(?:[^\\\\\"]|\\\\.)*\"|'(?:[^\\\\']|\\\\.)*'",e=0;e<2;e++)i=i.replace(//g,function(){return i});i=i.replace(//g,"[^\\s\\S]");var t={comment:/<#--[\s\S]*?-->/,string:[{pattern:/\br("|')(?:(?!\1)[^\\]|\\.)*\1/,greedy:!0},{pattern:RegExp("(\"|')(?:(?!\\1|\\$\\{)[^\\\\]|\\\\.|\\$\\{(?:(?!\\})(?:))*\\})*\\1".replace(//g,function(){return i})),greedy:!0,inside:{interpolation:{pattern:RegExp("((?:^|[^\\\\])(?:\\\\\\\\)*)\\$\\{(?:(?!\\})(?:))*\\}".replace(//g,function(){return i})),lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:null}}}}],keyword:/\b(?:as)\b/,boolean:/\b(?:false|true)\b/,"builtin-function":{pattern:/((?:^|[^?])\?\s*)\w+/,lookbehind:!0,alias:"function"},function:/\b\w+(?=\s*\()/,number:/\b\d+(?:\.\d+)?\b/,operator:/\.\.[<*!]?|->|--|\+\+|&&|\|\||\?{1,2}|[-+*/%!=<>]=?|\b(?:gt|gte|lt|lte)\b/,punctuation:/[,;.:()[\]{}]/};t.string[1].inside.interpolation.inside.rest=t,n.languages.ftl={"ftl-comment":{pattern:/^<#--[\s\S]*/,alias:"comment"},"ftl-directive":{pattern:/^<[\s\S]+>$/,inside:{directive:{pattern:/(^<\/?)[#@][a-z]\w*/i,lookbehind:!0,alias:"keyword"},punctuation:/^<\/?|\/?>$/,content:{pattern:/\s*\S[\s\S]*/,alias:"ftl",inside:t}}},"ftl-interpolation":{pattern:/^\$\{[\s\S]*\}$/,inside:{punctuation:/^\$\{|\}$/,content:{pattern:/\s*\S[\s\S]*/,alias:"ftl",inside:t}}}},n.hooks.add("before-tokenize",function(e){var t=RegExp("<#--[^]*?--\x3e|)*?>|\\$\\{(?:)*?\\}".replace(//g,function(){return i}),"gi");n.languages["markup-templating"].buildPlaceholders(e,"ftl",t)}),n.hooks.add("after-tokenize",function(e){n.languages["markup-templating"].tokenizePlaceholders(e,"ftl")})}(Prism); \ No newline at end of file diff --git a/components/prism-gdscript.js b/components/prism-gdscript.js index 8268589735..b49d802b41 100644 --- a/components/prism-gdscript.js +++ b/components/prism-gdscript.js @@ -10,7 +10,7 @@ Prism.languages.gdscript = { // as Node // const FOO: int = 9, var bar: bool = true // func add(reference: Item, amount: int) -> Item: - pattern: /(^(?:class_name|class|extends)[ \t]+|^export\([ \t]*|\bas[ \t]+|(?:\b(?:const|var)[ \t]|[,(])[ \t]*\w+[ \t]*:[ \t]*|->[ \t]*)[a-zA-Z_]\w*/m, + pattern: /(^(?:class|class_name|extends)[ \t]+|^export\([ \t]*|\bas[ \t]+|(?:\b(?:const|var)[ \t]|[,(])[ \t]*\w+[ \t]*:[ \t]*|->[ \t]*)[a-zA-Z_]\w*/m, lookbehind: true }, 'keyword': /\b(?:and|as|assert|break|breakpoint|class|class_name|const|continue|elif|else|enum|export|extends|for|func|if|in|is|master|mastersync|match|not|null|onready|or|pass|preload|puppet|puppetsync|remote|remotesync|return|self|setget|signal|static|tool|var|while|yield)\b/, diff --git a/components/prism-gdscript.min.js b/components/prism-gdscript.min.js index aa6b086867..e9a5a232e8 100644 --- a/components/prism-gdscript.min.js +++ b/components/prism-gdscript.min.js @@ -1 +1 @@ -Prism.languages.gdscript={comment:/#.*/,string:{pattern:/@?(?:("|')(?:(?!\1)[^\n\\]|\\[\s\S])*\1(?!"|')|"""(?:[^\\]|\\[\s\S])*?""")/,greedy:!0},"class-name":{pattern:/(^(?:class_name|class|extends)[ \t]+|^export\([ \t]*|\bas[ \t]+|(?:\b(?:const|var)[ \t]|[,(])[ \t]*\w+[ \t]*:[ \t]*|->[ \t]*)[a-zA-Z_]\w*/m,lookbehind:!0},keyword:/\b(?:and|as|assert|break|breakpoint|class|class_name|const|continue|elif|else|enum|export|extends|for|func|if|in|is|master|mastersync|match|not|null|onready|or|pass|preload|puppet|puppetsync|remote|remotesync|return|self|setget|signal|static|tool|var|while|yield)\b/,function:/\b[a-z_]\w*(?=[ \t]*\()/i,variable:/\$\w+/,number:[/\b0b[01_]+\b|\b0x[\da-fA-F_]+\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.[\d_]+)(?:e[+-]?[\d_]+)?\b/,/\b(?:INF|NAN|PI|TAU)\b/],constant:/\b[A-Z][A-Z_\d]*\b/,boolean:/\b(?:false|true)\b/,operator:/->|:=|&&|\|\||<<|>>|[-+*/%&|!<>=]=?|[~^]/,punctuation:/[.:,;()[\]{}]/}; \ No newline at end of file +Prism.languages.gdscript={comment:/#.*/,string:{pattern:/@?(?:("|')(?:(?!\1)[^\n\\]|\\[\s\S])*\1(?!"|')|"""(?:[^\\]|\\[\s\S])*?""")/,greedy:!0},"class-name":{pattern:/(^(?:class|class_name|extends)[ \t]+|^export\([ \t]*|\bas[ \t]+|(?:\b(?:const|var)[ \t]|[,(])[ \t]*\w+[ \t]*:[ \t]*|->[ \t]*)[a-zA-Z_]\w*/m,lookbehind:!0},keyword:/\b(?:and|as|assert|break|breakpoint|class|class_name|const|continue|elif|else|enum|export|extends|for|func|if|in|is|master|mastersync|match|not|null|onready|or|pass|preload|puppet|puppetsync|remote|remotesync|return|self|setget|signal|static|tool|var|while|yield)\b/,function:/\b[a-z_]\w*(?=[ \t]*\()/i,variable:/\$\w+/,number:[/\b0b[01_]+\b|\b0x[\da-fA-F_]+\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.[\d_]+)(?:e[+-]?[\d_]+)?\b/,/\b(?:INF|NAN|PI|TAU)\b/],constant:/\b[A-Z][A-Z_\d]*\b/,boolean:/\b(?:false|true)\b/,operator:/->|:=|&&|\|\||<<|>>|[-+*/%&|!<>=]=?|[~^]/,punctuation:/[.:,;()[\]{}]/}; \ No newline at end of file diff --git a/components/prism-gherkin.js b/components/prism-gherkin.js index 5240956f43..850d2ca934 100644 --- a/components/prism-gherkin.js +++ b/components/prism-gherkin.js @@ -16,7 +16,7 @@ lookbehind: true }, 'feature': { - pattern: /((?:^|\r?\n|\r)[ \t]*)(?:Ability|Ahoy matey!|Arwedd|Aspekt|Besigheid Behoefte|Business Need|Caracteristica|Característica|Egenskab|Egenskap|Eiginleiki|Feature|Fīča|Fitur|Fonctionnalité|Fonksyonalite|Funcionalidade|Funcionalitat|Functionalitate|Funcţionalitate|Funcționalitate|Functionaliteit|Fungsi|Funkcia|Funkcija|Funkcionalitāte|Funkcionalnost|Funkcja|Funksie|Funktionalität|Funktionalitéit|Funzionalità|Hwaet|Hwæt|Jellemző|Karakteristik|laH|Lastnost|Mak|Mogucnost|Mogućnost|Moznosti|Možnosti|OH HAI|Omadus|Ominaisuus|Osobina|Özellik|perbogh|poQbogh malja'|Potrzeba biznesowa|Požadavek|Požiadavka|Pretty much|Qap|Qu'meH 'ut|Savybė|Tính năng|Trajto|Vermoë|Vlastnosť|Właściwość|Značilnost|Δυνατότητα|Λειτουργία|Могућност|Мөмкинлек|Особина|Свойство|Үзенчәлеклелек|Функционал|Функционалност|Функция|Функціонал|תכונה|خاصية|خصوصیت|صلاحیت|کاروبار کی ضرورت|وِیژگی|रूप लेख|ਖਾਸੀਅਤ|ਨਕਸ਼ ਨੁਹਾਰ|ਮੁਹਾਂਦਰਾ|గుణము|ಹೆಚ್ಚಳ|ความต้องการทางธุรกิจ|ความสามารถ|โครงหลัก|기능|フィーチャ|功能|機能):(?:[^:\r\n]+(?:\r?\n|\r|$))*/, + pattern: /((?:^|\r?\n|\r)[ \t]*)(?:Ability|Ahoy matey!|Arwedd|Aspekt|Besigheid Behoefte|Business Need|Caracteristica|Característica|Egenskab|Egenskap|Eiginleiki|Feature|Fīča|Fitur|Fonctionnalité|Fonksyonalite|Funcionalidade|Funcionalitat|Functionalitate|Funcţionalitate|Funcționalitate|Functionaliteit|Fungsi|Funkcia|Funkcija|Funkcionalitāte|Funkcionalnost|Funkcja|Funksie|Funktionalität|Funktionalitéit|Funzionalità|Hwaet|Hwæt|Jellemző|Karakteristik|Lastnost|Mak|Mogucnost|laH|Mogućnost|Moznosti|Možnosti|OH HAI|Omadus|Ominaisuus|Osobina|Özellik|Potrzeba biznesowa|perbogh|poQbogh malja'|Požadavek|Požiadavka|Pretty much|Qap|Qu'meH 'ut|Savybė|Tính năng|Trajto|Vermoë|Vlastnosť|Właściwość|Značilnost|Δυνατότητα|Λειτουργία|Могућност|Мөмкинлек|Особина|Свойство|Үзенчәлеклелек|Функционал|Функционалност|Функция|Функціонал|תכונה|خاصية|خصوصیت|صلاحیت|کاروبار کی ضرورت|وِیژگی|रूप लेख|ਖਾਸੀਅਤ|ਨਕਸ਼ ਨੁਹਾਰ|ਮੁਹਾਂਦਰਾ|గుణము|ಹೆಚ್ಚಳ|ความต้องการทางธุรกิจ|ความสามารถ|โครงหลัก|기능|フィーチャ|功能|機能):(?:[^:\r\n]+(?:\r?\n|\r|$))*/, lookbehind: true, inside: { 'important': { @@ -27,7 +27,7 @@ } }, 'scenario': { - pattern: /(^[ \t]*)(?:Abstract Scenario|Abstrakt Scenario|Achtergrond|Aer|Ær|Agtergrond|All y'all|Antecedentes|Antecedents|Atburðarás|Atburðarásir|Awww, look mate|B4|Background|Baggrund|Bakgrund|Bakgrunn|Bakgrunnur|Beispiele|Beispiller|Bối cảnh|Cefndir|Cenario|Cenário|Cenario de Fundo|Cenário de Fundo|Cenarios|Cenários|Contesto|Context|Contexte|Contexto|Conto|Contoh|Contone|Dæmi|Dasar|Dead men tell no tales|Delineacao do Cenario|Delineação do Cenário|Dis is what went down|Dữ liệu|Dyagram senaryo|Dyagram Senaryo|Egzanp|Ejemplos|Eksempler|Ekzemploj|Enghreifftiau|Esbozo do escenario|Escenari|Escenario|Esempi|Esquema de l'escenari|Esquema del escenario|Esquema do Cenario|Esquema do Cenário|Examples|EXAMPLZ|Exempel|Exemple|Exemples|Exemplos|First off|Fono|Forgatókönyv|Forgatókönyv vázlat|Fundo|Geçmiş|ghantoH|Grundlage|Hannergrond|Háttér|Heave to|Istorik|Juhtumid|Keadaan|Khung kịch bản|Khung tình huống|Kịch bản|Koncept|Konsep skenario|Kontèks|Kontekst|Kontekstas|Konteksts|Kontext|Konturo de la scenaro|Latar Belakang|lut|lut chovnatlh|lutmey|Lýsing Atburðarásar|Lýsing Dæma|Menggariskan Senario|MISHUN|MISHUN SRSLY|mo'|Náčrt Scenára|Náčrt Scénáře|Náčrt Scenáru|Oris scenarija|Örnekler|Osnova|Osnova Scenára|Osnova scénáře|Osnutek|Ozadje|Paraugs|Pavyzdžiai|Példák|Piemēri|Plan du scénario|Plan du Scénario|Plan senaryo|Plan Senaryo|Plang vum Szenario|Pozadí|Pozadie|Pozadina|Príklady|Příklady|Primer|Primeri|Primjeri|Przykłady|Raamstsenaarium|Reckon it's like|Rerefons|Scenár|Scénář|Scenarie|Scenarij|Scenarijai|Scenarijaus šablonas|Scenariji|Scenārijs|Scenārijs pēc parauga|Scenarijus|Scenario|Scénario|Scenario Amlinellol|Scenario Outline|Scenario Template|Scenariomal|Scenariomall|Scenarios|Scenariu|Scenariusz|Scenaro|Schema dello scenario|Se ðe|Se the|Se þe|Senario|Senaryo|Senaryo deskripsyon|Senaryo Deskripsyon|Senaryo taslağı|Shiver me timbers|Situācija|Situai|Situasie|Situasie Uiteensetting|Skenario|Skenario konsep|Skica|Structura scenariu|Structură scenariu|Struktura scenarija|Stsenaarium|Swa|Swa hwaer swa|Swa hwær swa|Szablon scenariusza|Szenario|Szenariogrundriss|Tapaukset|Tapaus|Tapausaihio|Taust|Tausta|Template Keadaan|Template Senario|Template Situai|The thing of it is|Tình huống|Variantai|Voorbeelde|Voorbeelden|Wharrimean is|Yo-ho-ho|You'll wanna|Założenia|Παραδείγματα|Περιγραφή Σεναρίου|Σενάρια|Σενάριο|Υπόβαθρο|Кереш|Контекст|Концепт|Мисаллар|Мисоллар|Основа|Передумова|Позадина|Предистория|Предыстория|Приклади|Пример|Примери|Примеры|Рамка на сценарий|Скица|Структура сценарија|Структура сценария|Структура сценарію|Сценарий|Сценарий структураси|Сценарийның төзелеше|Сценарији|Сценарио|Сценарій|Тарих|Үрнәкләр|דוגמאות|רקע|תבנית תרחיש|תרחיש|الخلفية|الگوی سناریو|امثلة|پس منظر|زمینه|سناریو|سيناريو|سيناريو مخطط|مثالیں|منظر نامے کا خاکہ|منظرنامہ|نمونه ها|उदाहरण|परिदृश्य|परिदृश्य रूपरेखा|पृष्ठभूमि|ਉਦਾਹਰਨਾਂ|ਪਟਕਥਾ|ਪਟਕਥਾ ਢਾਂਚਾ|ਪਟਕਥਾ ਰੂਪ ਰੇਖਾ|ਪਿਛੋਕੜ|ఉదాహరణలు|కథనం|నేపథ్యం|సన్నివేశం|ಉದಾಹರಣೆಗಳು|ಕಥಾಸಾರಾಂಶ|ವಿವರಣೆ|ಹಿನ್ನೆಲೆ|โครงสร้างของเหตุการณ์|ชุดของตัวอย่าง|ชุดของเหตุการณ์|แนวคิด|สรุปเหตุการณ์|เหตุการณ์|배경|시나리오|시나리오 개요|예|サンプル|シナリオ|シナリオアウトライン|シナリオテンプレ|シナリオテンプレート|テンプレ|例|例子|剧本|剧本大纲|劇本|劇本大綱|场景|场景大纲|場景|場景大綱|背景):[^:\r\n]*/m, + pattern: /(^[ \t]*)(?:Abstract Scenario|Abstrakt Scenario|Achtergrond|Aer|Ær|Agtergrond|All y'all|Antecedentes|Antecedents|Atburðarás|Atburðarásir|Awww, look mate|B4|Background|Baggrund|Bakgrund|Bakgrunn|Bakgrunnur|Beispiele|Beispiller|Bối cảnh|Cefndir|Cenario|Cenário|Cenario de Fundo|Cenário de Fundo|Cenarios|Cenários|Contesto|Context|Contexte|Contexto|Conto|Contoh|Contone|Dæmi|Dasar|Dead men tell no tales|Delineacao do Cenario|Delineação do Cenário|Dis is what went down|Dữ liệu|Dyagram Senaryo|Dyagram senaryo|Egzanp|Ejemplos|Eksempler|Ekzemploj|Enghreifftiau|Esbozo do escenario|Escenari|Escenario|Esempi|Esquema de l'escenari|Esquema del escenario|Esquema do Cenario|Esquema do Cenário|EXAMPLZ|Examples|Exempel|Exemple|Exemples|Exemplos|First off|Fono|Forgatókönyv|Forgatókönyv vázlat|Fundo|Geçmiş|Grundlage|Hannergrond|ghantoH|Háttér|Heave to|Istorik|Juhtumid|Keadaan|Khung kịch bản|Khung tình huống|Kịch bản|Koncept|Konsep skenario|Kontèks|Kontekst|Kontekstas|Konteksts|Kontext|Konturo de la scenaro|Latar Belakang|lut chovnatlh|lut|lutmey|Lýsing Atburðarásar|Lýsing Dæma|MISHUN SRSLY|MISHUN|Menggariskan Senario|mo'|Náčrt Scenára|Náčrt Scénáře|Náčrt Scenáru|Oris scenarija|Örnekler|Osnova|Osnova Scenára|Osnova scénáře|Osnutek|Ozadje|Paraugs|Pavyzdžiai|Példák|Piemēri|Plan du scénario|Plan du Scénario|Plan Senaryo|Plan senaryo|Plang vum Szenario|Pozadí|Pozadie|Pozadina|Príklady|Příklady|Primer|Primeri|Primjeri|Przykłady|Raamstsenaarium|Reckon it's like|Rerefons|Scenár|Scénář|Scenarie|Scenarij|Scenarijai|Scenarijaus šablonas|Scenariji|Scenārijs|Scenārijs pēc parauga|Scenarijus|Scenario|Scénario|Scenario Amlinellol|Scenario Outline|Scenario Template|Scenariomal|Scenariomall|Scenarios|Scenariu|Scenariusz|Scenaro|Schema dello scenario|Se ðe|Se the|Se þe|Senario|Senaryo Deskripsyon|Senaryo deskripsyon|Senaryo|Senaryo taslağı|Shiver me timbers|Situācija|Situai|Situasie Uiteensetting|Situasie|Skenario konsep|Skenario|Skica|Structura scenariu|Structură scenariu|Struktura scenarija|Stsenaarium|Swa hwaer swa|Swa|Swa hwær swa|Szablon scenariusza|Szenario|Szenariogrundriss|Tapaukset|Tapaus|Tapausaihio|Taust|Tausta|Template Keadaan|Template Senario|Template Situai|The thing of it is|Tình huống|Variantai|Voorbeelde|Voorbeelden|Wharrimean is|Yo-ho-ho|You'll wanna|Założenia|Παραδείγματα|Περιγραφή Σεναρίου|Σενάρια|Σενάριο|Υπόβαθρο|Кереш|Контекст|Концепт|Мисаллар|Мисоллар|Основа|Передумова|Позадина|Предистория|Предыстория|Приклади|Пример|Примери|Примеры|Рамка на сценарий|Скица|Структура сценарија|Структура сценария|Структура сценарію|Сценарий|Сценарий структураси|Сценарийның төзелеше|Сценарији|Сценарио|Сценарій|Тарих|Үрнәкләр|דוגמאות|רקע|תבנית תרחיש|תרחיש|الخلفية|الگوی سناریو|امثلة|پس منظر|زمینه|سناریو|سيناريو|سيناريو مخطط|مثالیں|منظر نامے کا خاکہ|منظرنامہ|نمونه ها|उदाहरण|परिदृश्य|परिदृश्य रूपरेखा|पृष्ठभूमि|ਉਦਾਹਰਨਾਂ|ਪਟਕਥਾ|ਪਟਕਥਾ ਢਾਂਚਾ|ਪਟਕਥਾ ਰੂਪ ਰੇਖਾ|ਪਿਛੋਕੜ|ఉదాహరణలు|కథనం|నేపథ్యం|సన్నివేశం|ಉದಾಹರಣೆಗಳು|ಕಥಾಸಾರಾಂಶ|ವಿವರಣೆ|ಹಿನ್ನೆಲೆ|โครงสร้างของเหตุการณ์|ชุดของตัวอย่าง|ชุดของเหตุการณ์|แนวคิด|สรุปเหตุการณ์|เหตุการณ์|배경|시나리오|시나리오 개요|예|サンプル|シナリオ|シナリオアウトライン|シナリオテンプレ|シナリオテンプレート|テンプレ|例|例子|剧本|剧本大纲|劇本|劇本大綱|场景|场景大纲|場景|場景大綱|背景):[^:\r\n]*/m, lookbehind: true, inside: { 'important': { @@ -64,7 +64,7 @@ } }, 'atrule': { - pattern: /(^[ \t]+)(?:'ach|'a|'ej|7|a|A také|A taktiež|A tiež|A zároveň|Aber|Ac|Adott|Akkor|Ak|Aleshores|Ale|Ali|Allora|Alors|Als|Ama|Amennyiben|Amikor|Ampak|an|AN|Ananging|And y'all|And|Angenommen|Anrhegedig a|An|Apabila|Atès|Atesa|Atunci|Avast!|Aye|A|awer|Bagi|Banjur|Bet|Biết|Blimey!|Buh|But at the end of the day I reckon|But y'all|But|BUT|Cal|Când|Cando|Cand|Ce|Cuando|Če|Ða ðe|Ða|Dadas|Dada|Dados|Dado|DaH ghu' bejlu'|dann|Dann|Dano|Dan|Dar|Dat fiind|Data|Date fiind|Date|Dati fiind|Dati|Daţi fiind|Dați fiind|Dato|DEN|Den youse gotta|Dengan|De|Diberi|Diyelim ki|Donada|Donat|Donitaĵo|Do|Dun|Duota|Ðurh|Eeldades|Ef|Eğer ki|Entao|Então|Entón|Entonces|En|Epi|E|És|Etant donnée|Etant donné|Et|Étant données|Étant donnée|Étant donné|Etant données|Etant donnés|Étant donnés|Fakat|Gangway!|Gdy|Gegeben seien|Gegeben sei|Gegeven|Gegewe|ghu' noblu'|Gitt|Given y'all|Given|Givet|Givun|Ha|Cho|I CAN HAZ|In|Ir|It's just unbelievable|I|Ja|Jeśli|Jeżeli|Kadar|Kada|Kad|Kai|Kaj|Když|Keď|Kemudian|Ketika|Khi|Kiedy|Ko|Kuid|Kui|Kun|Lan|latlh|Le sa a|Let go and haul|Le|Lè sa a|Lè|Logo|Lorsqu'<|Lorsque|mä|Maar|Mais|Mając|Majd|Maka|Manawa|Mas|Ma|Menawa|Men|Mutta|Nalikaning|Nalika|Nanging|Når|När|Nato|Nhưng|Niin|Njuk|O zaman|Og|Och|Oletetaan|Onda|Ond|Oraz|Pak|Pero|Però|Podano|Pokiaľ|Pokud|Potem|Potom|Privzeto|Pryd|qaSDI'|Quando|Quand|Quan|Så|Sed|Se|Siis|Sipoze ke|Sipoze Ke|Sipoze|Si|Şi|Și|Soit|Stel|Tada|Tad|Takrat|Tak|Tapi|Ter|Tetapi|Tha the|Tha|Then y'all|Then|Thì|Thurh|Toda|Too right|ugeholl|Und|Un|Và|vaj|Vendar|Ve|wann|Wanneer|WEN|Wenn|When y'all|When|Wtedy|Wun|Y'know|Yeah nah|Yna|Youse know like when|Youse know when youse got|Y|Za predpokladu|Za předpokladu|Zadani|Zadano|Zadan|Zadate|Zadato|Zakładając|Zaradi|Zatati|Þa þe|Þa|Þá|Þegar|Þurh|Αλλά|Δεδομένου|Και|Όταν|Τότε|А також|Агар|Але|Али|Аммо|А|Әгәр|Әйтик|Әмма|Бирок|Ва|Вә|Дадено|Дано|Допустим|Если|Задате|Задати|Задато|И|І|К тому же|Када|Кад|Когато|Когда|Коли|Ләкин|Лекин|Нәтиҗәдә|Нехай|Но|Онда|Припустимо, що|Припустимо|Пусть|Также|Та|Тогда|Тоді|То|Унда|Һәм|Якщо|אבל|אזי|אז|בהינתן|וגם|כאשר|آنگاه|اذاً|اگر|اما|اور|با فرض|بالفرض|بفرض|پھر|تب|ثم|جب|عندما|فرض کیا|لكن|لیکن|متى|هنگامی|و|अगर|और|कदा|किन्तु|चूंकि|जब|तथा|तदा|तब|परन्तु|पर|यदि|ਅਤੇ|ਜਦੋਂ|ਜਿਵੇਂ ਕਿ|ਜੇਕਰ|ਤਦ|ਪਰ|అప్పుడు|ఈ పరిస్థితిలో|కాని|చెప్పబడినది|మరియు|ಆದರೆ|ನಂತರ|ನೀಡಿದ|ಮತ್ತು|ಸ್ಥಿತಿಯನ್ನು|กำหนดให้|ดังนั้น|แต่|เมื่อ|และ|그러면<|그리고<|단<|만약<|만일<|먼저<|조건<|하지만<|かつ<|しかし<|ただし<|ならば<|もし<|並且<|但し<|但是<|假如<|假定<|假設<|假设<|前提<|同时<|同時<|并且<|当<|當<|而且<|那么<|那麼<)(?=[ \t])/m, + pattern: /(^[ \t]+)(?:'a|'ach|'ej|7|a|A také|A taktiež|A tiež|A zároveň|Aber|Ac|Adott|Akkor|Ak|Aleshores|Ale|Ali|Allora|Alors|Als|Ama|Amennyiben|Amikor|Ampak|an|AN|Ananging|And y'all|And|Angenommen|Anrhegedig a|An|Apabila|Atès|Atesa|Atunci|Avast!|Aye|A|awer|Bagi|Banjur|Bet|Biết|Blimey!|Buh|But at the end of the day I reckon|But y'all|But|BUT|Cal|Când|Cand|Cando|Ce|Cuando|Če|Ða ðe|Ða|Dadas|Dada|Dados|Dado|DaH ghu' bejlu'|dann|Dann|Dano|Dan|Dar|Dat fiind|Data|Date fiind|Date|Dati fiind|Dati|Daţi fiind|Dați fiind|DEN|Dato|De|Den youse gotta|Dengan|Diberi|Diyelim ki|Donada|Donat|Donitaĵo|Do|Dun|Duota|Ðurh|Eeldades|Ef|Eğer ki|Entao|Então|Entón|E|En|Entonces|Epi|És|Etant donnée|Etant donné|Et|Étant données|Étant donnée|Étant donné|Etant données|Etant donnés|Étant donnés|Fakat|Gangway!|Gdy|Gegeben seien|Gegeben sei|Gegeven|Gegewe|ghu' noblu'|Gitt|Given y'all|Given|Givet|Givun|Ha|Cho|I CAN HAZ|In|Ir|It's just unbelievable|I|Ja|Jeśli|Jeżeli|Kad|Kada|Kadar|Kai|Kaj|Když|Keď|Kemudian|Ketika|Khi|Kiedy|Ko|Kuid|Kui|Kun|Lan|latlh|Le sa a|Let go and haul|Le|Lè sa a|Lè|Logo|Lorsqu'<|Lorsque|mä|Maar|Mais|Mając|Ma|Majd|Maka|Manawa|Mas|Men|Menawa|Mutta|Nalika|Nalikaning|Nanging|Når|När|Nato|Nhưng|Niin|Njuk|O zaman|Och|Og|Oletetaan|Ond|Onda|Oraz|Pak|Pero|Però|Podano|Pokiaľ|Pokud|Potem|Potom|Privzeto|Pryd|Quan|Quand|Quando|qaSDI'|Så|Sed|Se|Siis|Sipoze ke|Sipoze Ke|Sipoze|Si|Şi|Și|Soit|Stel|Tada|Tad|Takrat|Tak|Tapi|Ter|Tetapi|Tha the|Tha|Then y'all|Then|Thì|Thurh|Toda|Too right|Un|Und|ugeholl|Và|vaj|Vendar|Ve|wann|Wanneer|WEN|Wenn|When y'all|When|Wtedy|Wun|Y'know|Yeah nah|Yna|Youse know like when|Youse know when youse got|Y|Za predpokladu|Za předpokladu|Zadan|Zadani|Zadano|Zadate|Zadato|Zakładając|Zaradi|Zatati|Þa þe|Þa|Þá|Þegar|Þurh|Αλλά|Δεδομένου|Και|Όταν|Τότε|А також|Агар|Але|Али|Аммо|А|Әгәр|Әйтик|Әмма|Бирок|Ва|Вә|Дадено|Дано|Допустим|Если|Задате|Задати|Задато|И|І|К тому же|Када|Кад|Когато|Когда|Коли|Ләкин|Лекин|Нәтиҗәдә|Нехай|Но|Онда|Припустимо, що|Припустимо|Пусть|Также|Та|Тогда|Тоді|То|Унда|Һәм|Якщо|אבל|אזי|אז|בהינתן|וגם|כאשר|آنگاه|اذاً|اگر|اما|اور|با فرض|بالفرض|بفرض|پھر|تب|ثم|جب|عندما|فرض کیا|لكن|لیکن|متى|هنگامی|و|अगर|और|कदा|किन्तु|चूंकि|जब|तथा|तदा|तब|परन्तु|पर|यदि|ਅਤੇ|ਜਦੋਂ|ਜਿਵੇਂ ਕਿ|ਜੇਕਰ|ਤਦ|ਪਰ|అప్పుడు|ఈ పరిస్థితిలో|కాని|చెప్పబడినది|మరియు|ಆದರೆ|ನಂತರ|ನೀಡಿದ|ಮತ್ತು|ಸ್ಥಿತಿಯನ್ನು|กำหนดให้|ดังนั้น|แต่|เมื่อ|และ|그러면<|그리고<|단<|만약<|만일<|먼저<|조건<|하지만<|かつ<|しかし<|ただし<|ならば<|もし<|並且<|但し<|但是<|假如<|假定<|假設<|假设<|前提<|同时<|同時<|并且<|当<|當<|而且<|那么<|那麼<)(?=[ \t])/m, lookbehind: true }, 'string': { diff --git a/components/prism-gherkin.min.js b/components/prism-gherkin.min.js index a5fe3eeefd..3a702b6db1 100644 --- a/components/prism-gherkin.min.js +++ b/components/prism-gherkin.min.js @@ -1 +1 @@ -!function(a){var n="(?:\r?\n|\r)[ \t]*\\|.+\\|(?:(?!\\|).)*";Prism.languages.gherkin={pystring:{pattern:/("""|''')[\s\S]+?\1/,alias:"string"},comment:{pattern:/(^[ \t]*)#.*/m,lookbehind:!0},tag:{pattern:/(^[ \t]*)@\S*/m,lookbehind:!0},feature:{pattern:/((?:^|\r?\n|\r)[ \t]*)(?:Ability|Ahoy matey!|Arwedd|Aspekt|Besigheid Behoefte|Business Need|Caracteristica|Característica|Egenskab|Egenskap|Eiginleiki|Feature|Fīča|Fitur|Fonctionnalité|Fonksyonalite|Funcionalidade|Funcionalitat|Functionalitate|Funcţionalitate|Funcționalitate|Functionaliteit|Fungsi|Funkcia|Funkcija|Funkcionalitāte|Funkcionalnost|Funkcja|Funksie|Funktionalität|Funktionalitéit|Funzionalità|Hwaet|Hwæt|Jellemző|Karakteristik|laH|Lastnost|Mak|Mogucnost|Mogućnost|Moznosti|Možnosti|OH HAI|Omadus|Ominaisuus|Osobina|Özellik|perbogh|poQbogh malja'|Potrzeba biznesowa|Požadavek|Požiadavka|Pretty much|Qap|Qu'meH 'ut|Savybė|Tính năng|Trajto|Vermoë|Vlastnosť|Właściwość|Značilnost|Δυνατότητα|Λειτουργία|Могућност|Мөмкинлек|Особина|Свойство|Үзенчәлеклелек|Функционал|Функционалност|Функция|Функціонал|תכונה|خاصية|خصوصیت|صلاحیت|کاروبار کی ضرورت|وِیژگی|रूप लेख|ਖਾਸੀਅਤ|ਨਕਸ਼ ਨੁਹਾਰ|ਮੁਹਾਂਦਰਾ|గుణము|ಹೆಚ್ಚಳ|ความต้องการทางธุรกิจ|ความสามารถ|โครงหลัก|기능|フィーチャ|功能|機能):(?:[^:\r\n]+(?:\r?\n|\r|$))*/,lookbehind:!0,inside:{important:{pattern:/(:)[^\r\n]+/,lookbehind:!0},keyword:/[^:\r\n]+:/}},scenario:{pattern:/(^[ \t]*)(?:Abstract Scenario|Abstrakt Scenario|Achtergrond|Aer|Ær|Agtergrond|All y'all|Antecedentes|Antecedents|Atburðarás|Atburðarásir|Awww, look mate|B4|Background|Baggrund|Bakgrund|Bakgrunn|Bakgrunnur|Beispiele|Beispiller|Bối cảnh|Cefndir|Cenario|Cenário|Cenario de Fundo|Cenário de Fundo|Cenarios|Cenários|Contesto|Context|Contexte|Contexto|Conto|Contoh|Contone|Dæmi|Dasar|Dead men tell no tales|Delineacao do Cenario|Delineação do Cenário|Dis is what went down|Dữ liệu|Dyagram senaryo|Dyagram Senaryo|Egzanp|Ejemplos|Eksempler|Ekzemploj|Enghreifftiau|Esbozo do escenario|Escenari|Escenario|Esempi|Esquema de l'escenari|Esquema del escenario|Esquema do Cenario|Esquema do Cenário|Examples|EXAMPLZ|Exempel|Exemple|Exemples|Exemplos|First off|Fono|Forgatókönyv|Forgatókönyv vázlat|Fundo|Geçmiş|ghantoH|Grundlage|Hannergrond|Háttér|Heave to|Istorik|Juhtumid|Keadaan|Khung kịch bản|Khung tình huống|Kịch bản|Koncept|Konsep skenario|Kontèks|Kontekst|Kontekstas|Konteksts|Kontext|Konturo de la scenaro|Latar Belakang|lut|lut chovnatlh|lutmey|Lýsing Atburðarásar|Lýsing Dæma|Menggariskan Senario|MISHUN|MISHUN SRSLY|mo'|Náčrt Scenára|Náčrt Scénáře|Náčrt Scenáru|Oris scenarija|Örnekler|Osnova|Osnova Scenára|Osnova scénáře|Osnutek|Ozadje|Paraugs|Pavyzdžiai|Példák|Piemēri|Plan du scénario|Plan du Scénario|Plan senaryo|Plan Senaryo|Plang vum Szenario|Pozadí|Pozadie|Pozadina|Príklady|Příklady|Primer|Primeri|Primjeri|Przykłady|Raamstsenaarium|Reckon it's like|Rerefons|Scenár|Scénář|Scenarie|Scenarij|Scenarijai|Scenarijaus šablonas|Scenariji|Scenārijs|Scenārijs pēc parauga|Scenarijus|Scenario|Scénario|Scenario Amlinellol|Scenario Outline|Scenario Template|Scenariomal|Scenariomall|Scenarios|Scenariu|Scenariusz|Scenaro|Schema dello scenario|Se ðe|Se the|Se þe|Senario|Senaryo|Senaryo deskripsyon|Senaryo Deskripsyon|Senaryo taslağı|Shiver me timbers|Situācija|Situai|Situasie|Situasie Uiteensetting|Skenario|Skenario konsep|Skica|Structura scenariu|Structură scenariu|Struktura scenarija|Stsenaarium|Swa|Swa hwaer swa|Swa hwær swa|Szablon scenariusza|Szenario|Szenariogrundriss|Tapaukset|Tapaus|Tapausaihio|Taust|Tausta|Template Keadaan|Template Senario|Template Situai|The thing of it is|Tình huống|Variantai|Voorbeelde|Voorbeelden|Wharrimean is|Yo-ho-ho|You'll wanna|Założenia|Παραδείγματα|Περιγραφή Σεναρίου|Σενάρια|Σενάριο|Υπόβαθρο|Кереш|Контекст|Концепт|Мисаллар|Мисоллар|Основа|Передумова|Позадина|Предистория|Предыстория|Приклади|Пример|Примери|Примеры|Рамка на сценарий|Скица|Структура сценарија|Структура сценария|Структура сценарію|Сценарий|Сценарий структураси|Сценарийның төзелеше|Сценарији|Сценарио|Сценарій|Тарих|Үрнәкләр|דוגמאות|רקע|תבנית תרחיש|תרחיש|الخلفية|الگوی سناریو|امثلة|پس منظر|زمینه|سناریو|سيناريو|سيناريو مخطط|مثالیں|منظر نامے کا خاکہ|منظرنامہ|نمونه ها|उदाहरण|परिदृश्य|परिदृश्य रूपरेखा|पृष्ठभूमि|ਉਦਾਹਰਨਾਂ|ਪਟਕਥਾ|ਪਟਕਥਾ ਢਾਂਚਾ|ਪਟਕਥਾ ਰੂਪ ਰੇਖਾ|ਪਿਛੋਕੜ|ఉదాహరణలు|కథనం|నేపథ్యం|సన్నివేశం|ಉದಾಹರಣೆಗಳು|ಕಥಾಸಾರಾಂಶ|ವಿವರಣೆ|ಹಿನ್ನೆಲೆ|โครงสร้างของเหตุการณ์|ชุดของตัวอย่าง|ชุดของเหตุการณ์|แนวคิด|สรุปเหตุการณ์|เหตุการณ์|배경|시나리오|시나리오 개요|예|サンプル|シナリオ|シナリオアウトライン|シナリオテンプレ|シナリオテンプレート|テンプレ|例|例子|剧本|剧本大纲|劇本|劇本大綱|场景|场景大纲|場景|場景大綱|背景):[^:\r\n]*/m,lookbehind:!0,inside:{important:{pattern:/(:)[^\r\n]*/,lookbehind:!0},keyword:/[^:\r\n]+:/}},"table-body":{pattern:RegExp("("+n+")(?:"+n+")+"),lookbehind:!0,inside:{outline:{pattern:/<[^>]+>/,alias:"variable"},td:{pattern:/\s*[^\s|][^|]*/,alias:"string"},punctuation:/\|/}},"table-head":{pattern:RegExp(n),inside:{th:{pattern:/\s*[^\s|][^|]*/,alias:"variable"},punctuation:/\|/}},atrule:{pattern:/(^[ \t]+)(?:'ach|'a|'ej|7|a|A také|A taktiež|A tiež|A zároveň|Aber|Ac|Adott|Akkor|Ak|Aleshores|Ale|Ali|Allora|Alors|Als|Ama|Amennyiben|Amikor|Ampak|an|AN|Ananging|And y'all|And|Angenommen|Anrhegedig a|An|Apabila|Atès|Atesa|Atunci|Avast!|Aye|A|awer|Bagi|Banjur|Bet|Biết|Blimey!|Buh|But at the end of the day I reckon|But y'all|But|BUT|Cal|Când|Cando|Cand|Ce|Cuando|Če|Ða ðe|Ða|Dadas|Dada|Dados|Dado|DaH ghu' bejlu'|dann|Dann|Dano|Dan|Dar|Dat fiind|Data|Date fiind|Date|Dati fiind|Dati|Daţi fiind|Dați fiind|Dato|DEN|Den youse gotta|Dengan|De|Diberi|Diyelim ki|Donada|Donat|Donitaĵo|Do|Dun|Duota|Ðurh|Eeldades|Ef|Eğer ki|Entao|Então|Entón|Entonces|En|Epi|E|És|Etant donnée|Etant donné|Et|Étant données|Étant donnée|Étant donné|Etant données|Etant donnés|Étant donnés|Fakat|Gangway!|Gdy|Gegeben seien|Gegeben sei|Gegeven|Gegewe|ghu' noblu'|Gitt|Given y'all|Given|Givet|Givun|Ha|Cho|I CAN HAZ|In|Ir|It's just unbelievable|I|Ja|Jeśli|Jeżeli|Kadar|Kada|Kad|Kai|Kaj|Když|Keď|Kemudian|Ketika|Khi|Kiedy|Ko|Kuid|Kui|Kun|Lan|latlh|Le sa a|Let go and haul|Le|Lè sa a|Lè|Logo|Lorsqu'<|Lorsque|mä|Maar|Mais|Mając|Majd|Maka|Manawa|Mas|Ma|Menawa|Men|Mutta|Nalikaning|Nalika|Nanging|Når|När|Nato|Nhưng|Niin|Njuk|O zaman|Og|Och|Oletetaan|Onda|Ond|Oraz|Pak|Pero|Però|Podano|Pokiaľ|Pokud|Potem|Potom|Privzeto|Pryd|qaSDI'|Quando|Quand|Quan|Så|Sed|Se|Siis|Sipoze ke|Sipoze Ke|Sipoze|Si|Şi|Și|Soit|Stel|Tada|Tad|Takrat|Tak|Tapi|Ter|Tetapi|Tha the|Tha|Then y'all|Then|Thì|Thurh|Toda|Too right|ugeholl|Und|Un|Và|vaj|Vendar|Ve|wann|Wanneer|WEN|Wenn|When y'all|When|Wtedy|Wun|Y'know|Yeah nah|Yna|Youse know like when|Youse know when youse got|Y|Za predpokladu|Za předpokladu|Zadani|Zadano|Zadan|Zadate|Zadato|Zakładając|Zaradi|Zatati|Þa þe|Þa|Þá|Þegar|Þurh|Αλλά|Δεδομένου|Και|Όταν|Τότε|А також|Агар|Але|Али|Аммо|А|Әгәр|Әйтик|Әмма|Бирок|Ва|Вә|Дадено|Дано|Допустим|Если|Задате|Задати|Задато|И|І|К тому же|Када|Кад|Когато|Когда|Коли|Ләкин|Лекин|Нәтиҗәдә|Нехай|Но|Онда|Припустимо, що|Припустимо|Пусть|Также|Та|Тогда|Тоді|То|Унда|Һәм|Якщо|אבל|אזי|אז|בהינתן|וגם|כאשר|آنگاه|اذاً|اگر|اما|اور|با فرض|بالفرض|بفرض|پھر|تب|ثم|جب|عندما|فرض کیا|لكن|لیکن|متى|هنگامی|و|अगर|और|कदा|किन्तु|चूंकि|जब|तथा|तदा|तब|परन्तु|पर|यदि|ਅਤੇ|ਜਦੋਂ|ਜਿਵੇਂ ਕਿ|ਜੇਕਰ|ਤਦ|ਪਰ|అప్పుడు|ఈ పరిస్థితిలో|కాని|చెప్పబడినది|మరియు|ಆದರೆ|ನಂತರ|ನೀಡಿದ|ಮತ್ತು|ಸ್ಥಿತಿಯನ್ನು|กำหนดให้|ดังนั้น|แต่|เมื่อ|และ|그러면<|그리고<|단<|만약<|만일<|먼저<|조건<|하지만<|かつ<|しかし<|ただし<|ならば<|もし<|並且<|但し<|但是<|假如<|假定<|假設<|假设<|前提<|同时<|同時<|并且<|当<|當<|而且<|那么<|那麼<)(?=[ \t])/m,lookbehind:!0},string:{pattern:/"(?:\\.|[^"\\\r\n])*"|'(?:\\.|[^'\\\r\n])*'/,inside:{outline:{pattern:/<[^>]+>/,alias:"variable"}}},outline:{pattern:/<[^>]+>/,alias:"variable"}}}(); \ No newline at end of file +!function(a){var n="(?:\r?\n|\r)[ \t]*\\|.+\\|(?:(?!\\|).)*";Prism.languages.gherkin={pystring:{pattern:/("""|''')[\s\S]+?\1/,alias:"string"},comment:{pattern:/(^[ \t]*)#.*/m,lookbehind:!0},tag:{pattern:/(^[ \t]*)@\S*/m,lookbehind:!0},feature:{pattern:/((?:^|\r?\n|\r)[ \t]*)(?:Ability|Ahoy matey!|Arwedd|Aspekt|Besigheid Behoefte|Business Need|Caracteristica|Característica|Egenskab|Egenskap|Eiginleiki|Feature|Fīča|Fitur|Fonctionnalité|Fonksyonalite|Funcionalidade|Funcionalitat|Functionalitate|Funcţionalitate|Funcționalitate|Functionaliteit|Fungsi|Funkcia|Funkcija|Funkcionalitāte|Funkcionalnost|Funkcja|Funksie|Funktionalität|Funktionalitéit|Funzionalità|Hwaet|Hwæt|Jellemző|Karakteristik|Lastnost|Mak|Mogucnost|laH|Mogućnost|Moznosti|Možnosti|OH HAI|Omadus|Ominaisuus|Osobina|Özellik|Potrzeba biznesowa|perbogh|poQbogh malja'|Požadavek|Požiadavka|Pretty much|Qap|Qu'meH 'ut|Savybė|Tính năng|Trajto|Vermoë|Vlastnosť|Właściwość|Značilnost|Δυνατότητα|Λειτουργία|Могућност|Мөмкинлек|Особина|Свойство|Үзенчәлеклелек|Функционал|Функционалност|Функция|Функціонал|תכונה|خاصية|خصوصیت|صلاحیت|کاروبار کی ضرورت|وِیژگی|रूप लेख|ਖਾਸੀਅਤ|ਨਕਸ਼ ਨੁਹਾਰ|ਮੁਹਾਂਦਰਾ|గుణము|ಹೆಚ್ಚಳ|ความต้องการทางธุรกิจ|ความสามารถ|โครงหลัก|기능|フィーチャ|功能|機能):(?:[^:\r\n]+(?:\r?\n|\r|$))*/,lookbehind:!0,inside:{important:{pattern:/(:)[^\r\n]+/,lookbehind:!0},keyword:/[^:\r\n]+:/}},scenario:{pattern:/(^[ \t]*)(?:Abstract Scenario|Abstrakt Scenario|Achtergrond|Aer|Ær|Agtergrond|All y'all|Antecedentes|Antecedents|Atburðarás|Atburðarásir|Awww, look mate|B4|Background|Baggrund|Bakgrund|Bakgrunn|Bakgrunnur|Beispiele|Beispiller|Bối cảnh|Cefndir|Cenario|Cenário|Cenario de Fundo|Cenário de Fundo|Cenarios|Cenários|Contesto|Context|Contexte|Contexto|Conto|Contoh|Contone|Dæmi|Dasar|Dead men tell no tales|Delineacao do Cenario|Delineação do Cenário|Dis is what went down|Dữ liệu|Dyagram Senaryo|Dyagram senaryo|Egzanp|Ejemplos|Eksempler|Ekzemploj|Enghreifftiau|Esbozo do escenario|Escenari|Escenario|Esempi|Esquema de l'escenari|Esquema del escenario|Esquema do Cenario|Esquema do Cenário|EXAMPLZ|Examples|Exempel|Exemple|Exemples|Exemplos|First off|Fono|Forgatókönyv|Forgatókönyv vázlat|Fundo|Geçmiş|Grundlage|Hannergrond|ghantoH|Háttér|Heave to|Istorik|Juhtumid|Keadaan|Khung kịch bản|Khung tình huống|Kịch bản|Koncept|Konsep skenario|Kontèks|Kontekst|Kontekstas|Konteksts|Kontext|Konturo de la scenaro|Latar Belakang|lut chovnatlh|lut|lutmey|Lýsing Atburðarásar|Lýsing Dæma|MISHUN SRSLY|MISHUN|Menggariskan Senario|mo'|Náčrt Scenára|Náčrt Scénáře|Náčrt Scenáru|Oris scenarija|Örnekler|Osnova|Osnova Scenára|Osnova scénáře|Osnutek|Ozadje|Paraugs|Pavyzdžiai|Példák|Piemēri|Plan du scénario|Plan du Scénario|Plan Senaryo|Plan senaryo|Plang vum Szenario|Pozadí|Pozadie|Pozadina|Príklady|Příklady|Primer|Primeri|Primjeri|Przykłady|Raamstsenaarium|Reckon it's like|Rerefons|Scenár|Scénář|Scenarie|Scenarij|Scenarijai|Scenarijaus šablonas|Scenariji|Scenārijs|Scenārijs pēc parauga|Scenarijus|Scenario|Scénario|Scenario Amlinellol|Scenario Outline|Scenario Template|Scenariomal|Scenariomall|Scenarios|Scenariu|Scenariusz|Scenaro|Schema dello scenario|Se ðe|Se the|Se þe|Senario|Senaryo Deskripsyon|Senaryo deskripsyon|Senaryo|Senaryo taslağı|Shiver me timbers|Situācija|Situai|Situasie Uiteensetting|Situasie|Skenario konsep|Skenario|Skica|Structura scenariu|Structură scenariu|Struktura scenarija|Stsenaarium|Swa hwaer swa|Swa|Swa hwær swa|Szablon scenariusza|Szenario|Szenariogrundriss|Tapaukset|Tapaus|Tapausaihio|Taust|Tausta|Template Keadaan|Template Senario|Template Situai|The thing of it is|Tình huống|Variantai|Voorbeelde|Voorbeelden|Wharrimean is|Yo-ho-ho|You'll wanna|Założenia|Παραδείγματα|Περιγραφή Σεναρίου|Σενάρια|Σενάριο|Υπόβαθρο|Кереш|Контекст|Концепт|Мисаллар|Мисоллар|Основа|Передумова|Позадина|Предистория|Предыстория|Приклади|Пример|Примери|Примеры|Рамка на сценарий|Скица|Структура сценарија|Структура сценария|Структура сценарію|Сценарий|Сценарий структураси|Сценарийның төзелеше|Сценарији|Сценарио|Сценарій|Тарих|Үрнәкләр|דוגמאות|רקע|תבנית תרחיש|תרחיש|الخلفية|الگوی سناریو|امثلة|پس منظر|زمینه|سناریو|سيناريو|سيناريو مخطط|مثالیں|منظر نامے کا خاکہ|منظرنامہ|نمونه ها|उदाहरण|परिदृश्य|परिदृश्य रूपरेखा|पृष्ठभूमि|ਉਦਾਹਰਨਾਂ|ਪਟਕਥਾ|ਪਟਕਥਾ ਢਾਂਚਾ|ਪਟਕਥਾ ਰੂਪ ਰੇਖਾ|ਪਿਛੋਕੜ|ఉదాహరణలు|కథనం|నేపథ్యం|సన్నివేశం|ಉದಾಹರಣೆಗಳು|ಕಥಾಸಾರಾಂಶ|ವಿವರಣೆ|ಹಿನ್ನೆಲೆ|โครงสร้างของเหตุการณ์|ชุดของตัวอย่าง|ชุดของเหตุการณ์|แนวคิด|สรุปเหตุการณ์|เหตุการณ์|배경|시나리오|시나리오 개요|예|サンプル|シナリオ|シナリオアウトライン|シナリオテンプレ|シナリオテンプレート|テンプレ|例|例子|剧本|剧本大纲|劇本|劇本大綱|场景|场景大纲|場景|場景大綱|背景):[^:\r\n]*/m,lookbehind:!0,inside:{important:{pattern:/(:)[^\r\n]*/,lookbehind:!0},keyword:/[^:\r\n]+:/}},"table-body":{pattern:RegExp("("+n+")(?:"+n+")+"),lookbehind:!0,inside:{outline:{pattern:/<[^>]+>/,alias:"variable"},td:{pattern:/\s*[^\s|][^|]*/,alias:"string"},punctuation:/\|/}},"table-head":{pattern:RegExp(n),inside:{th:{pattern:/\s*[^\s|][^|]*/,alias:"variable"},punctuation:/\|/}},atrule:{pattern:/(^[ \t]+)(?:'a|'ach|'ej|7|a|A také|A taktiež|A tiež|A zároveň|Aber|Ac|Adott|Akkor|Ak|Aleshores|Ale|Ali|Allora|Alors|Als|Ama|Amennyiben|Amikor|Ampak|an|AN|Ananging|And y'all|And|Angenommen|Anrhegedig a|An|Apabila|Atès|Atesa|Atunci|Avast!|Aye|A|awer|Bagi|Banjur|Bet|Biết|Blimey!|Buh|But at the end of the day I reckon|But y'all|But|BUT|Cal|Când|Cand|Cando|Ce|Cuando|Če|Ða ðe|Ða|Dadas|Dada|Dados|Dado|DaH ghu' bejlu'|dann|Dann|Dano|Dan|Dar|Dat fiind|Data|Date fiind|Date|Dati fiind|Dati|Daţi fiind|Dați fiind|DEN|Dato|De|Den youse gotta|Dengan|Diberi|Diyelim ki|Donada|Donat|Donitaĵo|Do|Dun|Duota|Ðurh|Eeldades|Ef|Eğer ki|Entao|Então|Entón|E|En|Entonces|Epi|És|Etant donnée|Etant donné|Et|Étant données|Étant donnée|Étant donné|Etant données|Etant donnés|Étant donnés|Fakat|Gangway!|Gdy|Gegeben seien|Gegeben sei|Gegeven|Gegewe|ghu' noblu'|Gitt|Given y'all|Given|Givet|Givun|Ha|Cho|I CAN HAZ|In|Ir|It's just unbelievable|I|Ja|Jeśli|Jeżeli|Kad|Kada|Kadar|Kai|Kaj|Když|Keď|Kemudian|Ketika|Khi|Kiedy|Ko|Kuid|Kui|Kun|Lan|latlh|Le sa a|Let go and haul|Le|Lè sa a|Lè|Logo|Lorsqu'<|Lorsque|mä|Maar|Mais|Mając|Ma|Majd|Maka|Manawa|Mas|Men|Menawa|Mutta|Nalika|Nalikaning|Nanging|Når|När|Nato|Nhưng|Niin|Njuk|O zaman|Och|Og|Oletetaan|Ond|Onda|Oraz|Pak|Pero|Però|Podano|Pokiaľ|Pokud|Potem|Potom|Privzeto|Pryd|Quan|Quand|Quando|qaSDI'|Så|Sed|Se|Siis|Sipoze ke|Sipoze Ke|Sipoze|Si|Şi|Și|Soit|Stel|Tada|Tad|Takrat|Tak|Tapi|Ter|Tetapi|Tha the|Tha|Then y'all|Then|Thì|Thurh|Toda|Too right|Un|Und|ugeholl|Và|vaj|Vendar|Ve|wann|Wanneer|WEN|Wenn|When y'all|When|Wtedy|Wun|Y'know|Yeah nah|Yna|Youse know like when|Youse know when youse got|Y|Za predpokladu|Za předpokladu|Zadan|Zadani|Zadano|Zadate|Zadato|Zakładając|Zaradi|Zatati|Þa þe|Þa|Þá|Þegar|Þurh|Αλλά|Δεδομένου|Και|Όταν|Τότε|А також|Агар|Але|Али|Аммо|А|Әгәр|Әйтик|Әмма|Бирок|Ва|Вә|Дадено|Дано|Допустим|Если|Задате|Задати|Задато|И|І|К тому же|Када|Кад|Когато|Когда|Коли|Ләкин|Лекин|Нәтиҗәдә|Нехай|Но|Онда|Припустимо, що|Припустимо|Пусть|Также|Та|Тогда|Тоді|То|Унда|Һәм|Якщо|אבל|אזי|אז|בהינתן|וגם|כאשר|آنگاه|اذاً|اگر|اما|اور|با فرض|بالفرض|بفرض|پھر|تب|ثم|جب|عندما|فرض کیا|لكن|لیکن|متى|هنگامی|و|अगर|और|कदा|किन्तु|चूंकि|जब|तथा|तदा|तब|परन्तु|पर|यदि|ਅਤੇ|ਜਦੋਂ|ਜਿਵੇਂ ਕਿ|ਜੇਕਰ|ਤਦ|ਪਰ|అప్పుడు|ఈ పరిస్థితిలో|కాని|చెప్పబడినది|మరియు|ಆದರೆ|ನಂತರ|ನೀಡಿದ|ಮತ್ತು|ಸ್ಥಿತಿಯನ್ನು|กำหนดให้|ดังนั้น|แต่|เมื่อ|และ|그러면<|그리고<|단<|만약<|만일<|먼저<|조건<|하지만<|かつ<|しかし<|ただし<|ならば<|もし<|並且<|但し<|但是<|假如<|假定<|假設<|假设<|前提<|同时<|同時<|并且<|当<|當<|而且<|那么<|那麼<)(?=[ \t])/m,lookbehind:!0},string:{pattern:/"(?:\\.|[^"\\\r\n])*"|'(?:\\.|[^'\\\r\n])*'/,inside:{outline:{pattern:/<[^>]+>/,alias:"variable"}}},outline:{pattern:/<[^>]+>/,alias:"variable"}}}(); \ No newline at end of file diff --git a/components/prism-glsl.js b/components/prism-glsl.js index 9db2b2e096..eed2d7e208 100644 --- a/components/prism-glsl.js +++ b/components/prism-glsl.js @@ -1,3 +1,3 @@ Prism.languages.glsl = Prism.languages.extend('c', { - 'keyword': /\b(?:attribute|const|uniform|varying|buffer|shared|coherent|volatile|restrict|readonly|writeonly|atomic_uint|layout|centroid|flat|smooth|noperspective|patch|sample|break|continue|do|for|while|switch|case|default|if|else|subroutine|in|out|inout|float|double|int|void|bool|true|false|invariant|precise|discard|return|d?mat[234](?:x[234])?|[ibdu]?vec[234]|uint|lowp|mediump|highp|precision|[iu]?sampler[123]D|[iu]?samplerCube|sampler[12]DShadow|samplerCubeShadow|[iu]?sampler[12]DArray|sampler[12]DArrayShadow|[iu]?sampler2DRect|sampler2DRectShadow|[iu]?samplerBuffer|[iu]?sampler2DMS(?:Array)?|[iu]?samplerCubeArray|samplerCubeArrayShadow|[iu]?image[123]D|[iu]?image2DRect|[iu]?imageCube|[iu]?imageBuffer|[iu]?image[12]DArray|[iu]?imageCubeArray|[iu]?image2DMS(?:Array)?|struct|common|partition|active|asm|class|union|enum|typedef|template|this|resource|goto|inline|noinline|public|static|extern|external|interface|long|short|half|fixed|unsigned|superp|input|output|hvec[234]|fvec[234]|sampler3DRect|filter|sizeof|cast|namespace|using)\b/ + 'keyword': /\b(?:active|asm|atomic_uint|attribute|[ibdu]?vec[234]|bool|break|buffer|case|cast|centroid|class|coherent|common|const|continue|d?mat[234](?:x[234])?|default|discard|do|double|else|enum|extern|external|false|filter|fixed|flat|float|for|fvec[234]|goto|half|highp|hvec[234]|[iu]?sampler2DMS(?:Array)?|[iu]?sampler2DRect|[iu]?samplerBuffer|[iu]?samplerCube|[iu]?samplerCubeArray|[iu]?sampler[123]D|[iu]?sampler[12]DArray|[iu]?image2DMS(?:Array)?|[iu]?image2DRect|[iu]?imageBuffer|[iu]?imageCube|[iu]?imageCubeArray|[iu]?image[123]D|[iu]?image[12]DArray|if|in|inline|inout|input|int|interface|invariant|layout|long|lowp|mediump|namespace|noinline|noperspective|out|output|partition|patch|precise|precision|public|readonly|resource|restrict|return|sample|sampler[12]DArrayShadow|sampler[12]DShadow|sampler2DRectShadow|sampler3DRect|samplerCubeArrayShadow|samplerCubeShadow|shared|short|sizeof|smooth|static|struct|subroutine|superp|switch|template|this|true|typedef|uint|uniform|union|unsigned|using|varying|void|volatile|while|writeonly)\b/ }); diff --git a/components/prism-glsl.min.js b/components/prism-glsl.min.js index f33decf696..655b92dac0 100644 --- a/components/prism-glsl.min.js +++ b/components/prism-glsl.min.js @@ -1 +1 @@ -Prism.languages.glsl=Prism.languages.extend("c",{keyword:/\b(?:attribute|const|uniform|varying|buffer|shared|coherent|volatile|restrict|readonly|writeonly|atomic_uint|layout|centroid|flat|smooth|noperspective|patch|sample|break|continue|do|for|while|switch|case|default|if|else|subroutine|in|out|inout|float|double|int|void|bool|true|false|invariant|precise|discard|return|d?mat[234](?:x[234])?|[ibdu]?vec[234]|uint|lowp|mediump|highp|precision|[iu]?sampler[123]D|[iu]?samplerCube|sampler[12]DShadow|samplerCubeShadow|[iu]?sampler[12]DArray|sampler[12]DArrayShadow|[iu]?sampler2DRect|sampler2DRectShadow|[iu]?samplerBuffer|[iu]?sampler2DMS(?:Array)?|[iu]?samplerCubeArray|samplerCubeArrayShadow|[iu]?image[123]D|[iu]?image2DRect|[iu]?imageCube|[iu]?imageBuffer|[iu]?image[12]DArray|[iu]?imageCubeArray|[iu]?image2DMS(?:Array)?|struct|common|partition|active|asm|class|union|enum|typedef|template|this|resource|goto|inline|noinline|public|static|extern|external|interface|long|short|half|fixed|unsigned|superp|input|output|hvec[234]|fvec[234]|sampler3DRect|filter|sizeof|cast|namespace|using)\b/}); \ No newline at end of file +Prism.languages.glsl=Prism.languages.extend("c",{keyword:/\b(?:active|asm|atomic_uint|attribute|[ibdu]?vec[234]|bool|break|buffer|case|cast|centroid|class|coherent|common|const|continue|d?mat[234](?:x[234])?|default|discard|do|double|else|enum|extern|external|false|filter|fixed|flat|float|for|fvec[234]|goto|half|highp|hvec[234]|[iu]?sampler2DMS(?:Array)?|[iu]?sampler2DRect|[iu]?samplerBuffer|[iu]?samplerCube|[iu]?samplerCubeArray|[iu]?sampler[123]D|[iu]?sampler[12]DArray|[iu]?image2DMS(?:Array)?|[iu]?image2DRect|[iu]?imageBuffer|[iu]?imageCube|[iu]?imageCubeArray|[iu]?image[123]D|[iu]?image[12]DArray|if|in|inline|inout|input|int|interface|invariant|layout|long|lowp|mediump|namespace|noinline|noperspective|out|output|partition|patch|precise|precision|public|readonly|resource|restrict|return|sample|sampler[12]DArrayShadow|sampler[12]DShadow|sampler2DRectShadow|sampler3DRect|samplerCubeArrayShadow|samplerCubeShadow|shared|short|sizeof|smooth|static|struct|subroutine|superp|switch|template|this|true|typedef|uint|uniform|union|unsigned|using|varying|void|volatile|while|writeonly)\b/}); \ No newline at end of file diff --git a/components/prism-gml.js b/components/prism-gml.js index 61fcfd97d9..60e4196244 100644 --- a/components/prism-gml.js +++ b/components/prism-gml.js @@ -1,7 +1,7 @@ Prism.languages.gamemakerlanguage = Prism.languages.gml = Prism.languages.extend('clike', { - 'keyword': /\b(?:if|else|switch|case|default|break|for|repeat|while|do|until|continue|exit|return|globalvar|var|enum)\b/, + 'keyword': /\b(?:break|case|continue|default|do|else|enum|exit|for|globalvar|if|repeat|return|switch|until|var|while)\b/, 'number': /(?:\b0x[\da-f]+|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ulf]{0,4}/i, - 'operator': /[-+%=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]|\b(?:or|and|not|with|at|xor)\b/, - 'constant': /\b(?:self|other|all|noone|global|local|undefined|pointer_(?:invalid|null)|action_(?:stop|restart|continue|reverse)|pi|GM_build_date|GM_version|timezone_(?:local|utc)|gamespeed_(?:fps|microseconds)|ev_(?:create|destroy|step|alarm|keyboard|mouse|collision|other|draw|draw_(?:begin|end|pre|post)|keypress|keyrelease|trigger|(?:left|right|middle|no)_button|(?:left|right|middle)_press|(?:left|right|middle)_release|mouse_(?:enter|leave|wheel_up|wheel_down)|global_(?:left|right|middle)_button|global_(?:left|right|middle)_press|global_(?:left|right|middle)_release|joystick(?:1|2)_(?:left|right|up|down|button1|button2|button3|button4|button5|button6|button7|button8)|outside|boundary|game_start|game_end|room_start|room_end|no_more_lives|animation_end|end_of_path|no_more_health|user\d|step_(?:normal|begin|end)|gui|gui_begin|gui_end)|vk_(?:nokey|anykey|enter|return|shift|control|alt|escape|space|backspace|tab|pause|printscreen|left|right|up|down|home|end|delete|insert|pageup|pagedown|f\d|numpad\d|divide|multiply|subtract|add|decimal|lshift|lcontrol|lalt|rshift|rcontrol|ralt)|mb_(?:any|none|left|right|middle)|c_(?:aqua|black|blue|dkgray|fuchsia|gray|green|lime|ltgray|maroon|navy|olive|purple|red|silver|teal|white|yellow|orange)|fa_(?:left|center|right|top|middle|bottom|readonly|hidden|sysfile|volumeid|directory|archive)|pr_(?:pointlist|linelist|linestrip|trianglelist|trianglestrip|trianglefan)|bm_(?:complex|normal|add|max|subtract|zero|one|src_colour|inv_src_colour|src_color|inv_src_color|src_alpha|inv_src_alpha|dest_alpha|inv_dest_alpha|dest_colour|inv_dest_colour|dest_color|inv_dest_color|src_alpha_sat)|audio_(?:falloff_(?:none|inverse_distance|inverse_distance_clamped|linear_distance|linear_distance_clamped|exponent_distance|exponent_distance_clamped)|old_system|new_system|mono|stereo|3d)|cr_(?:default|none|arrow|cross|beam|size_nesw|size_ns|size_nwse|size_we|uparrow|hourglass|drag|appstart|handpoint|size_all)|asset_(?:object|unknown|sprite|sound|room|path|script|font|timeline|tiles|shader)|ds_type_(?:map|list|stack|queue|grid|priority)|ef_(?:explosion|ring|ellipse|firework|smoke|smokeup|star|spark|flare|cloud|rain|snow)|pt_shape_(?:pixel|disk|square|line|star|circle|ring|sphere|flare|spark|explosion|cloud|smoke|snow)|ps_(?:distr|shape)_(?:linear|gaussian|invgaussian|rectangle|ellipse|diamond|line)|ty_(?:real|string)|dll_(?:cdel|cdecl|stdcall)|matrix_(?:view|projection|world)|os_(?:win32|windows|macosx|ios|android|linux|unknown|winphone|win8native|psvita|ps4|xboxone|ps3|uwp)|browser_(?:not_a_browser|unknown|ie|firefox|chrome|safari|safari_mobile|opera|tizen|windows_store|ie_mobile)|device_ios_(?:unknown|iphone|iphone_retina|ipad|ipad_retina|iphone5|iphone6|iphone6plus)|device_(?:emulator|tablet)|display_(?:landscape|landscape_flipped|portrait|portrait_flipped)|of_challenge_(?:win|lose|tie)|leaderboard_type_(?:number|time_mins_secs)|cmpfunc_(?:never|less|equal|lessequal|greater|notequal|greaterequal|always)|cull_(?:noculling|clockwise|counterclockwise)|lighttype_(?:dir|point)|iap_(?:ev_storeload|ev_product|ev_purchase|ev_consume|ev_restore|storeload_ok|storeload_failed|status_uninitialised|status_unavailable|status_loading|status_available|status_processing|status_restoring|failed|unavailable|available|purchased|canceled|refunded)|fb_login_(?:default|fallback_to_webview|no_fallback_to_webview|forcing_webview|use_system_account|forcing_safari)|phy_joint_(?:anchor_1_x|anchor_1_y|anchor_2_x|anchor_2_y|reaction_force_x|reaction_force_y|reaction_torque|motor_speed|angle|motor_torque|max_motor_torque|translation|speed|motor_force|max_motor_force|length_1|length_2|damping_ratio|frequency|lower_angle_limit|upper_angle_limit|angle_limits|max_length|max_torque|max_force)|phy_debug_render_(?:aabb|collision_pairs|coms|core_shapes|joints|obb|shapes)|phy_particle_flag_(?:water|zombie|wall|spring|elastic|viscous|powder|tensile|colourmixing|colormixing)|phy_particle_group_flag_(?:solid|rigid)|phy_particle_data_flag_(?:typeflags|position|velocity|colour|color|category)|achievement_(?:our_info|friends_info|leaderboard_info|info|filter_(?:all_players|friends_only|favorites_only)|type_challenge|type_score_challenge|pic_loaded|show_(?:ui|profile|leaderboard|achievement|bank|friend_picker|purchase_prompt))|network_(?:socket_(?:tcp|udp|bluetooth)|type_(?:connect|disconnect|data|non_blocking_connect)|config_(?:connect_timeout|use_non_blocking_socket|enable_reliable_udp|disable_reliable_udp))|buffer_(?:fixed|grow|wrap|fast|vbuffer|network|u8|s8|u16|s16|u32|s32|u64|f16|f32|f64|bool|text|string|seek_start|seek_relative|seek_end|generalerror|outofspace|outofbounds|invalidtype)|gp_(?:face\d|shoulderl|shoulderr|shoulderlb|shoulderrb|select|start|stickl|stickr|padu|padd|padl|padr|axislh|axislv|axisrh|axisrv)|ov_(?:friends|community|players|settings|gamegroup|achievements)|lb_sort_(?:none|ascending|descending)|lb_disp_(?:none|numeric|time_sec|time_ms)|ugc_(?:result_success|filetype_(?:community|microtrans)|visibility_(?:public|friends_only|private)|query_RankedBy(?:Vote|PublicationDate|Trend|NumTimesReported|TotalVotesAsc|VotesUp|TextSearch)|query_(?:AcceptedForGameRankedByAcceptanceDate|FavoritedByFriendsRankedByPublicationDate|CreatedByFriendsRankedByPublicationDate|NotYetRated)|sortorder_CreationOrder(?:Desc|Asc)|sortorder_(?:TitleAsc|LastUpdatedDesc|SubscriptionDateDesc|VoteScoreDesc|ForModeration)|list_(?:Published|VotedOn|VotedUp|VotedDown|WillVoteLater|Favorited|Subscribed|UsedOrPlayed|Followed)|match_(?:Items|Items_Mtx|Items_ReadyToUse|Collections|Artwork|Videos|Screenshots|AllGuides|WebGuides|IntegratedGuides|UsableInGame|ControllerBindings))|vertex_usage_(?:position|colour|color|normal|texcoord|textcoord|blendweight|blendindices|psize|tangent|binormal|fog|depth|sample)|vertex_type_(?:float\d|colour|color|ubyte4)|layerelementtype_(?:undefined|background|instance|oldtilemap|sprite|tilemap|particlesystem|tile)|tile_(?:rotate|flip|mirror|index_mask)|input_type|se_(?:chorus|compressor|echo|equalizer|flanger|gargle|none|reverb)|text_type|(?:obj|scr|spr|rm)\w+)\b/, - 'variable': /\b(?:x|y|(?:x|y)(?:previous|start)|(?:h|v)speed|direction|speed|friction|gravity|gravity_direction|path_(?:index|position|positionprevious|speed|scale|orientation|endaction)|object_index|id|solid|persistent|mask_index|instance_(?:count|id)|alarm|timeline_(?:index|position|speed|running|loop)|visible|sprite_(?:index|width|height|xoffset|yoffset)|image_(?:number|index|speed|depth|xscale|yscale|angle|alpha|blend)|bbox_(?:left|right|top|bottom)|layer|phy_(?:rotation|(?:position|linear_velocity|speed|com|collision|col_normal)_(?:x|y)|angular_(?:velocity|damping)|position_(?:x|y)previous|speed|linear_damping|bullet|fixed_rotation|active|mass|inertia|dynamic|kinematic|sleeping|collision_points)|working_directory|webgl_enabled|view_(?:(?:y|x|w|h)view|(?:y|x|w|h)port|(?:v|h)(?:speed|border)|visible|surface_id|object|enabled|current|angle)|undefined|transition_(?:steps|kind|color)|temp_directory|show_(?:score|lives|health)|secure_mode|score|room_(?:width|speed|persistent|last|height|first|caption)|room|pointer_(?:null|invalid)|os_(?:version|type|device|browser)|mouse_(?:y|x|lastbutton|button)|lives|keyboard_(?:string|lastkey|lastchar|key)|iap_data|health|gamemaker_(?:version|registered|pro)|game_(?:save|project|display)_(?:id|name)|fps_real|fps|event_(?:type|object|number|action)|error_(?:occurred|last)|display_aa|delta_time|debug_mode|cursor_sprite|current_(?:year|weekday|time|second|month|minute|hour|day)|caption_(?:score|lives|health)|browser_(?:width|height)|background_(?:yscale|y|xscale|x|width|vtiled|vspeed|visible|showcolour|showcolor|index|htiled|hspeed|height|foreground|colour|color|blend|alpha)|async_load|application_surface|argument(?:_relitive|_count|\d)|argument|global|local|self|other)\b/ + 'operator': /[-+%=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]|\b(?:and|at|not|or|with|xor)\b/, + 'constant': /\b(?:GM_build_date|GM_version|action_(?:continue|restart|reverse|stop)|all|gamespeed_(?:fps|microseconds)|global|local|noone|other|pi|pointer_(?:invalid|null)|self|timezone_(?:local|utc)|undefined|ev_(?:create|destroy|step|alarm|keyboard|mouse|collision|other|draw|draw_(?:begin|end|post|pre)|keypress|keyrelease|trigger|(?:left|middle|no|right)_button|(?:left|middle|right)_press|(?:left|middle|right)_release|mouse_(?:enter|leave|wheel_down|wheel_up)|global_(?:left|middle|right)_button|global_(?:left|middle|right)_press|global_(?:left|middle|right)_release|joystick(?:1|2)_(?:button1|button2|button3|button4|button5|button6|button7|button8|down|left|right|up)|outside|boundary|game_start|game_end|room_start|room_end|no_more_lives|animation_end|end_of_path|no_more_health|user\d|gui|gui_begin|gui_end|step_(?:begin|end|normal))|vk_(?:alt|anykey|backspace|control|delete|down|end|enter|escape|home|insert|left|nokey|pagedown|pageup|pause|printscreen|return|right|shift|space|tab|up|f\d|numpad\d|add|decimal|divide|lalt|lcontrol|lshift|multiply|ralt|rcontrol|rshift|subtract)|achievement_(?:filter_(?:all_players|favorites_only|friends_only)|friends_info|info|leaderboard_info|our_info|pic_loaded|show_(?:achievement|bank|friend_picker|leaderboard|profile|purchase_prompt|ui)|type_challenge|type_score_challenge)|asset_(?:font|object|path|room|script|shader|sound|sprite|tiles|timeline|unknown)|audio_(?:3d|falloff_(?:exponent_distance|exponent_distance_clamped|inverse_distance|inverse_distance_clamped|linear_distance|linear_distance_clamped|none)|mono|new_system|old_system|stereo)|bm_(?:add|complex|dest_alpha|dest_color|dest_colour|inv_dest_alpha|inv_dest_color|inv_dest_colour|inv_src_alpha|inv_src_color|inv_src_colour|max|normal|one|src_alpha|src_alpha_sat|src_color|src_colour|subtract|zero)|browser_(?:chrome|firefox|ie|ie_mobile|not_a_browser|opera|safari|safari_mobile|tizen|unknown|windows_store)|buffer_(?:bool|f16|f32|f64|fast|fixed|generalerror|grow|invalidtype|network|outofbounds|outofspace|s16|s32|s8|seek_end|seek_relative|seek_start|string|text|u16|u32|u64|u8|vbuffer|wrap)|c_(?:aqua|black|blue|dkgray|fuchsia|gray|green|lime|ltgray|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow)|cmpfunc_(?:always|equal|greater|greaterequal|less|lessequal|never|notequal)|cr_(?:appstart|arrow|beam|cross|default|drag|handpoint|hourglass|none|size_all|size_nesw|size_ns|size_nwse|size_we|uparrow)|cull_(?:clockwise|counterclockwise|noculling)|device_(?:emulator|tablet)|device_ios_(?:ipad|ipad_retina|iphone|iphone5|iphone6|iphone6plus|iphone_retina|unknown)|display_(?:landscape|landscape_flipped|portrait|portrait_flipped)|dll_(?:cdecl|cdel|stdcall)|ds_type_(?:grid|list|map|priority|queue|stack)|ef_(?:cloud|ellipse|explosion|firework|flare|rain|ring|smoke|smokeup|snow|spark|star)|fa_(?:archive|bottom|center|directory|hidden|left|middle|readonly|right|sysfile|top|volumeid)|fb_login_(?:default|fallback_to_webview|forcing_safari|forcing_webview|no_fallback_to_webview|use_system_account)|iap_(?:available|canceled|ev_consume|ev_product|ev_purchase|ev_restore|ev_storeload|failed|purchased|refunded|status_available|status_loading|status_processing|status_restoring|status_unavailable|status_uninitialised|storeload_failed|storeload_ok|unavailable)|leaderboard_type_(?:number|time_mins_secs)|lighttype_(?:dir|point)|matrix_(?:projection|view|world)|mb_(?:any|left|middle|none|right)|network_(?:config_(?:connect_timeout|disable_reliable_udp|enable_reliable_udp|use_non_blocking_socket)|socket_(?:bluetooth|tcp|udp)|type_(?:connect|data|disconnect|non_blocking_connect))|of_challenge_(?:lose|tie|win)|os_(?:android|ios|linux|macosx|ps3|ps4|psvita|unknown|uwp|win32|win8native|windows|winphone|xboxone)|phy_debug_render_(?:aabb|collision_pairs|coms|core_shapes|joints|obb|shapes)|phy_joint_(?:anchor_1_x|anchor_1_y|anchor_2_x|anchor_2_y|angle|angle_limits|damping_ratio|frequency|length_1|length_2|lower_angle_limit|max_force|max_length|max_motor_force|max_motor_torque|max_torque|motor_force|motor_speed|motor_torque|reaction_force_x|reaction_force_y|reaction_torque|speed|translation|upper_angle_limit)|phy_particle_data_flag_(?:category|color|colour|position|typeflags|velocity)|phy_particle_flag_(?:colormixing|colourmixing|elastic|powder|spring|tensile|viscous|wall|water|zombie)|phy_particle_group_flag_(?:rigid|solid)|pr_(?:linelist|linestrip|pointlist|trianglefan|trianglelist|trianglestrip)|ps_(?:distr|shape)_(?:diamond|ellipse|gaussian|invgaussian|line|linear|rectangle)|pt_shape_(?:circle|cloud|disk|explosion|flare|line|pixel|ring|smoke|snow|spark|sphere|square|star)|ty_(?:real|string)|gp_(?:face\d|axislh|axislv|axisrh|axisrv|padd|padl|padr|padu|select|shoulderl|shoulderlb|shoulderr|shoulderrb|start|stickl|stickr)|lb_disp_(?:none|numeric|time_ms|time_sec)|lb_sort_(?:ascending|descending|none)|ov_(?:achievements|community|friends|gamegroup|players|settings)|ugc_(?:filetype_(?:community|microtrans)|list_(?:Favorited|Followed|Published|Subscribed|UsedOrPlayed|VotedDown|VotedOn|VotedUp|WillVoteLater)|match_(?:AllGuides|Artwork|Collections|ControllerBindings|IntegratedGuides|Items|Items_Mtx|Items_ReadyToUse|Screenshots|UsableInGame|Videos|WebGuides)|query_(?:AcceptedForGameRankedByAcceptanceDate|CreatedByFriendsRankedByPublicationDate|FavoritedByFriendsRankedByPublicationDate|NotYetRated)|query_RankedBy(?:NumTimesReported|PublicationDate|TextSearch|TotalVotesAsc|Trend|Vote|VotesUp)|result_success|sortorder_CreationOrder(?:Asc|Desc)|sortorder_(?:ForModeration|LastUpdatedDesc|SubscriptionDateDesc|TitleAsc|VoteScoreDesc)|visibility_(?:friends_only|private|public))|vertex_usage_(?:binormal|blendindices|blendweight|color|colour|depth|fog|normal|position|psize|sample|tangent|texcoord|textcoord)|vertex_type_(?:float\d|color|colour|ubyte4)|input_type|layerelementtype_(?:background|instance|oldtilemap|particlesystem|sprite|tile|tilemap|undefined)|se_(?:chorus|compressor|echo|equalizer|flanger|gargle|none|reverb)|text_type|tile_(?:flip|index_mask|mirror|rotate)|(?:obj|rm|scr|spr)\w+)\b/, + 'variable': /\b(?:alarm|application_surface|async_load|background_(?:alpha|blend|color|colour|foreground|height|hspeed|htiled|index|showcolor|showcolour|visible|vspeed|vtiled|width|x|xscale|y|yscale)|bbox_(?:bottom|left|right|top)|browser_(?:height|width)|caption_(?:health|lives|score)|current_(?:day|hour|minute|month|second|time|weekday|year)|cursor_sprite|debug_mode|delta_time|direction|display_aa|error_(?:last|occurred)|event_(?:action|number|object|type)|fps|fps_real|friction|game_(?:display|project|save)_(?:id|name)|gamemaker_(?:pro|registered|version)|gravity|gravity_direction|(?:h|v)speed|health|iap_data|id|image_(?:alpha|angle|blend|depth|index|number|speed|xscale|yscale)|instance_(?:count|id)|keyboard_(?:key|lastchar|lastkey|string)|layer|lives|mask_index|mouse_(?:button|lastbutton|x|y)|object_index|os_(?:browser|device|type|version)|path_(?:endaction|index|orientation|position|positionprevious|scale|speed)|persistent|phy_(?:rotation|(?:col_normal|collision|com|linear_velocity|position|speed)_(?:x|y)|angular_(?:damping|velocity)|position_(?:x|y)previous|speed|linear_damping|bullet|fixed_rotation|active|mass|inertia|dynamic|kinematic|sleeping|collision_points)|pointer_(?:invalid|null)|room|room_(?:caption|first|height|last|persistent|speed|width)|score|secure_mode|show_(?:health|lives|score)|solid|speed|sprite_(?:height|index|width|xoffset|yoffset)|temp_directory|timeline_(?:index|loop|position|running|speed)|transition_(?:color|kind|steps)|undefined|view_(?:angle|current|enabled|(?:h|v)(?:border|speed)|(?:h|w|x|y)port|(?:h|w|x|y)view|object|surface_id|visible)|visible|webgl_enabled|working_directory|(?:x|y)(?:previous|start)|x|y|argument(?:_relitive|_count|\d)|argument|global|local|other|self)\b/ }); diff --git a/components/prism-gml.min.js b/components/prism-gml.min.js index aa3d306fc8..ca35ab6518 100644 --- a/components/prism-gml.min.js +++ b/components/prism-gml.min.js @@ -1 +1 @@ -Prism.languages.gamemakerlanguage=Prism.languages.gml=Prism.languages.extend("clike",{keyword:/\b(?:if|else|switch|case|default|break|for|repeat|while|do|until|continue|exit|return|globalvar|var|enum)\b/,number:/(?:\b0x[\da-f]+|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ulf]{0,4}/i,operator:/[-+%=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]|\b(?:or|and|not|with|at|xor)\b/,constant:/\b(?:self|other|all|noone|global|local|undefined|pointer_(?:invalid|null)|action_(?:stop|restart|continue|reverse)|pi|GM_build_date|GM_version|timezone_(?:local|utc)|gamespeed_(?:fps|microseconds)|ev_(?:create|destroy|step|alarm|keyboard|mouse|collision|other|draw|draw_(?:begin|end|pre|post)|keypress|keyrelease|trigger|(?:left|right|middle|no)_button|(?:left|right|middle)_press|(?:left|right|middle)_release|mouse_(?:enter|leave|wheel_up|wheel_down)|global_(?:left|right|middle)_button|global_(?:left|right|middle)_press|global_(?:left|right|middle)_release|joystick(?:1|2)_(?:left|right|up|down|button1|button2|button3|button4|button5|button6|button7|button8)|outside|boundary|game_start|game_end|room_start|room_end|no_more_lives|animation_end|end_of_path|no_more_health|user\d|step_(?:normal|begin|end)|gui|gui_begin|gui_end)|vk_(?:nokey|anykey|enter|return|shift|control|alt|escape|space|backspace|tab|pause|printscreen|left|right|up|down|home|end|delete|insert|pageup|pagedown|f\d|numpad\d|divide|multiply|subtract|add|decimal|lshift|lcontrol|lalt|rshift|rcontrol|ralt)|mb_(?:any|none|left|right|middle)|c_(?:aqua|black|blue|dkgray|fuchsia|gray|green|lime|ltgray|maroon|navy|olive|purple|red|silver|teal|white|yellow|orange)|fa_(?:left|center|right|top|middle|bottom|readonly|hidden|sysfile|volumeid|directory|archive)|pr_(?:pointlist|linelist|linestrip|trianglelist|trianglestrip|trianglefan)|bm_(?:complex|normal|add|max|subtract|zero|one|src_colour|inv_src_colour|src_color|inv_src_color|src_alpha|inv_src_alpha|dest_alpha|inv_dest_alpha|dest_colour|inv_dest_colour|dest_color|inv_dest_color|src_alpha_sat)|audio_(?:falloff_(?:none|inverse_distance|inverse_distance_clamped|linear_distance|linear_distance_clamped|exponent_distance|exponent_distance_clamped)|old_system|new_system|mono|stereo|3d)|cr_(?:default|none|arrow|cross|beam|size_nesw|size_ns|size_nwse|size_we|uparrow|hourglass|drag|appstart|handpoint|size_all)|asset_(?:object|unknown|sprite|sound|room|path|script|font|timeline|tiles|shader)|ds_type_(?:map|list|stack|queue|grid|priority)|ef_(?:explosion|ring|ellipse|firework|smoke|smokeup|star|spark|flare|cloud|rain|snow)|pt_shape_(?:pixel|disk|square|line|star|circle|ring|sphere|flare|spark|explosion|cloud|smoke|snow)|ps_(?:distr|shape)_(?:linear|gaussian|invgaussian|rectangle|ellipse|diamond|line)|ty_(?:real|string)|dll_(?:cdel|cdecl|stdcall)|matrix_(?:view|projection|world)|os_(?:win32|windows|macosx|ios|android|linux|unknown|winphone|win8native|psvita|ps4|xboxone|ps3|uwp)|browser_(?:not_a_browser|unknown|ie|firefox|chrome|safari|safari_mobile|opera|tizen|windows_store|ie_mobile)|device_ios_(?:unknown|iphone|iphone_retina|ipad|ipad_retina|iphone5|iphone6|iphone6plus)|device_(?:emulator|tablet)|display_(?:landscape|landscape_flipped|portrait|portrait_flipped)|of_challenge_(?:win|lose|tie)|leaderboard_type_(?:number|time_mins_secs)|cmpfunc_(?:never|less|equal|lessequal|greater|notequal|greaterequal|always)|cull_(?:noculling|clockwise|counterclockwise)|lighttype_(?:dir|point)|iap_(?:ev_storeload|ev_product|ev_purchase|ev_consume|ev_restore|storeload_ok|storeload_failed|status_uninitialised|status_unavailable|status_loading|status_available|status_processing|status_restoring|failed|unavailable|available|purchased|canceled|refunded)|fb_login_(?:default|fallback_to_webview|no_fallback_to_webview|forcing_webview|use_system_account|forcing_safari)|phy_joint_(?:anchor_1_x|anchor_1_y|anchor_2_x|anchor_2_y|reaction_force_x|reaction_force_y|reaction_torque|motor_speed|angle|motor_torque|max_motor_torque|translation|speed|motor_force|max_motor_force|length_1|length_2|damping_ratio|frequency|lower_angle_limit|upper_angle_limit|angle_limits|max_length|max_torque|max_force)|phy_debug_render_(?:aabb|collision_pairs|coms|core_shapes|joints|obb|shapes)|phy_particle_flag_(?:water|zombie|wall|spring|elastic|viscous|powder|tensile|colourmixing|colormixing)|phy_particle_group_flag_(?:solid|rigid)|phy_particle_data_flag_(?:typeflags|position|velocity|colour|color|category)|achievement_(?:our_info|friends_info|leaderboard_info|info|filter_(?:all_players|friends_only|favorites_only)|type_challenge|type_score_challenge|pic_loaded|show_(?:ui|profile|leaderboard|achievement|bank|friend_picker|purchase_prompt))|network_(?:socket_(?:tcp|udp|bluetooth)|type_(?:connect|disconnect|data|non_blocking_connect)|config_(?:connect_timeout|use_non_blocking_socket|enable_reliable_udp|disable_reliable_udp))|buffer_(?:fixed|grow|wrap|fast|vbuffer|network|u8|s8|u16|s16|u32|s32|u64|f16|f32|f64|bool|text|string|seek_start|seek_relative|seek_end|generalerror|outofspace|outofbounds|invalidtype)|gp_(?:face\d|shoulderl|shoulderr|shoulderlb|shoulderrb|select|start|stickl|stickr|padu|padd|padl|padr|axislh|axislv|axisrh|axisrv)|ov_(?:friends|community|players|settings|gamegroup|achievements)|lb_sort_(?:none|ascending|descending)|lb_disp_(?:none|numeric|time_sec|time_ms)|ugc_(?:result_success|filetype_(?:community|microtrans)|visibility_(?:public|friends_only|private)|query_RankedBy(?:Vote|PublicationDate|Trend|NumTimesReported|TotalVotesAsc|VotesUp|TextSearch)|query_(?:AcceptedForGameRankedByAcceptanceDate|FavoritedByFriendsRankedByPublicationDate|CreatedByFriendsRankedByPublicationDate|NotYetRated)|sortorder_CreationOrder(?:Desc|Asc)|sortorder_(?:TitleAsc|LastUpdatedDesc|SubscriptionDateDesc|VoteScoreDesc|ForModeration)|list_(?:Published|VotedOn|VotedUp|VotedDown|WillVoteLater|Favorited|Subscribed|UsedOrPlayed|Followed)|match_(?:Items|Items_Mtx|Items_ReadyToUse|Collections|Artwork|Videos|Screenshots|AllGuides|WebGuides|IntegratedGuides|UsableInGame|ControllerBindings))|vertex_usage_(?:position|colour|color|normal|texcoord|textcoord|blendweight|blendindices|psize|tangent|binormal|fog|depth|sample)|vertex_type_(?:float\d|colour|color|ubyte4)|layerelementtype_(?:undefined|background|instance|oldtilemap|sprite|tilemap|particlesystem|tile)|tile_(?:rotate|flip|mirror|index_mask)|input_type|se_(?:chorus|compressor|echo|equalizer|flanger|gargle|none|reverb)|text_type|(?:obj|scr|spr|rm)\w+)\b/,variable:/\b(?:x|y|(?:x|y)(?:previous|start)|(?:h|v)speed|direction|speed|friction|gravity|gravity_direction|path_(?:index|position|positionprevious|speed|scale|orientation|endaction)|object_index|id|solid|persistent|mask_index|instance_(?:count|id)|alarm|timeline_(?:index|position|speed|running|loop)|visible|sprite_(?:index|width|height|xoffset|yoffset)|image_(?:number|index|speed|depth|xscale|yscale|angle|alpha|blend)|bbox_(?:left|right|top|bottom)|layer|phy_(?:rotation|(?:position|linear_velocity|speed|com|collision|col_normal)_(?:x|y)|angular_(?:velocity|damping)|position_(?:x|y)previous|speed|linear_damping|bullet|fixed_rotation|active|mass|inertia|dynamic|kinematic|sleeping|collision_points)|working_directory|webgl_enabled|view_(?:(?:y|x|w|h)view|(?:y|x|w|h)port|(?:v|h)(?:speed|border)|visible|surface_id|object|enabled|current|angle)|undefined|transition_(?:steps|kind|color)|temp_directory|show_(?:score|lives|health)|secure_mode|score|room_(?:width|speed|persistent|last|height|first|caption)|room|pointer_(?:null|invalid)|os_(?:version|type|device|browser)|mouse_(?:y|x|lastbutton|button)|lives|keyboard_(?:string|lastkey|lastchar|key)|iap_data|health|gamemaker_(?:version|registered|pro)|game_(?:save|project|display)_(?:id|name)|fps_real|fps|event_(?:type|object|number|action)|error_(?:occurred|last)|display_aa|delta_time|debug_mode|cursor_sprite|current_(?:year|weekday|time|second|month|minute|hour|day)|caption_(?:score|lives|health)|browser_(?:width|height)|background_(?:yscale|y|xscale|x|width|vtiled|vspeed|visible|showcolour|showcolor|index|htiled|hspeed|height|foreground|colour|color|blend|alpha)|async_load|application_surface|argument(?:_relitive|_count|\d)|argument|global|local|self|other)\b/}); \ No newline at end of file +Prism.languages.gamemakerlanguage=Prism.languages.gml=Prism.languages.extend("clike",{keyword:/\b(?:break|case|continue|default|do|else|enum|exit|for|globalvar|if|repeat|return|switch|until|var|while)\b/,number:/(?:\b0x[\da-f]+|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ulf]{0,4}/i,operator:/[-+%=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]|\b(?:and|at|not|or|with|xor)\b/,constant:/\b(?:GM_build_date|GM_version|action_(?:continue|restart|reverse|stop)|all|gamespeed_(?:fps|microseconds)|global|local|noone|other|pi|pointer_(?:invalid|null)|self|timezone_(?:local|utc)|undefined|ev_(?:create|destroy|step|alarm|keyboard|mouse|collision|other|draw|draw_(?:begin|end|post|pre)|keypress|keyrelease|trigger|(?:left|middle|no|right)_button|(?:left|middle|right)_press|(?:left|middle|right)_release|mouse_(?:enter|leave|wheel_down|wheel_up)|global_(?:left|middle|right)_button|global_(?:left|middle|right)_press|global_(?:left|middle|right)_release|joystick(?:1|2)_(?:button1|button2|button3|button4|button5|button6|button7|button8|down|left|right|up)|outside|boundary|game_start|game_end|room_start|room_end|no_more_lives|animation_end|end_of_path|no_more_health|user\d|gui|gui_begin|gui_end|step_(?:begin|end|normal))|vk_(?:alt|anykey|backspace|control|delete|down|end|enter|escape|home|insert|left|nokey|pagedown|pageup|pause|printscreen|return|right|shift|space|tab|up|f\d|numpad\d|add|decimal|divide|lalt|lcontrol|lshift|multiply|ralt|rcontrol|rshift|subtract)|achievement_(?:filter_(?:all_players|favorites_only|friends_only)|friends_info|info|leaderboard_info|our_info|pic_loaded|show_(?:achievement|bank|friend_picker|leaderboard|profile|purchase_prompt|ui)|type_challenge|type_score_challenge)|asset_(?:font|object|path|room|script|shader|sound|sprite|tiles|timeline|unknown)|audio_(?:3d|falloff_(?:exponent_distance|exponent_distance_clamped|inverse_distance|inverse_distance_clamped|linear_distance|linear_distance_clamped|none)|mono|new_system|old_system|stereo)|bm_(?:add|complex|dest_alpha|dest_color|dest_colour|inv_dest_alpha|inv_dest_color|inv_dest_colour|inv_src_alpha|inv_src_color|inv_src_colour|max|normal|one|src_alpha|src_alpha_sat|src_color|src_colour|subtract|zero)|browser_(?:chrome|firefox|ie|ie_mobile|not_a_browser|opera|safari|safari_mobile|tizen|unknown|windows_store)|buffer_(?:bool|f16|f32|f64|fast|fixed|generalerror|grow|invalidtype|network|outofbounds|outofspace|s16|s32|s8|seek_end|seek_relative|seek_start|string|text|u16|u32|u64|u8|vbuffer|wrap)|c_(?:aqua|black|blue|dkgray|fuchsia|gray|green|lime|ltgray|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow)|cmpfunc_(?:always|equal|greater|greaterequal|less|lessequal|never|notequal)|cr_(?:appstart|arrow|beam|cross|default|drag|handpoint|hourglass|none|size_all|size_nesw|size_ns|size_nwse|size_we|uparrow)|cull_(?:clockwise|counterclockwise|noculling)|device_(?:emulator|tablet)|device_ios_(?:ipad|ipad_retina|iphone|iphone5|iphone6|iphone6plus|iphone_retina|unknown)|display_(?:landscape|landscape_flipped|portrait|portrait_flipped)|dll_(?:cdecl|cdel|stdcall)|ds_type_(?:grid|list|map|priority|queue|stack)|ef_(?:cloud|ellipse|explosion|firework|flare|rain|ring|smoke|smokeup|snow|spark|star)|fa_(?:archive|bottom|center|directory|hidden|left|middle|readonly|right|sysfile|top|volumeid)|fb_login_(?:default|fallback_to_webview|forcing_safari|forcing_webview|no_fallback_to_webview|use_system_account)|iap_(?:available|canceled|ev_consume|ev_product|ev_purchase|ev_restore|ev_storeload|failed|purchased|refunded|status_available|status_loading|status_processing|status_restoring|status_unavailable|status_uninitialised|storeload_failed|storeload_ok|unavailable)|leaderboard_type_(?:number|time_mins_secs)|lighttype_(?:dir|point)|matrix_(?:projection|view|world)|mb_(?:any|left|middle|none|right)|network_(?:config_(?:connect_timeout|disable_reliable_udp|enable_reliable_udp|use_non_blocking_socket)|socket_(?:bluetooth|tcp|udp)|type_(?:connect|data|disconnect|non_blocking_connect))|of_challenge_(?:lose|tie|win)|os_(?:android|ios|linux|macosx|ps3|ps4|psvita|unknown|uwp|win32|win8native|windows|winphone|xboxone)|phy_debug_render_(?:aabb|collision_pairs|coms|core_shapes|joints|obb|shapes)|phy_joint_(?:anchor_1_x|anchor_1_y|anchor_2_x|anchor_2_y|angle|angle_limits|damping_ratio|frequency|length_1|length_2|lower_angle_limit|max_force|max_length|max_motor_force|max_motor_torque|max_torque|motor_force|motor_speed|motor_torque|reaction_force_x|reaction_force_y|reaction_torque|speed|translation|upper_angle_limit)|phy_particle_data_flag_(?:category|color|colour|position|typeflags|velocity)|phy_particle_flag_(?:colormixing|colourmixing|elastic|powder|spring|tensile|viscous|wall|water|zombie)|phy_particle_group_flag_(?:rigid|solid)|pr_(?:linelist|linestrip|pointlist|trianglefan|trianglelist|trianglestrip)|ps_(?:distr|shape)_(?:diamond|ellipse|gaussian|invgaussian|line|linear|rectangle)|pt_shape_(?:circle|cloud|disk|explosion|flare|line|pixel|ring|smoke|snow|spark|sphere|square|star)|ty_(?:real|string)|gp_(?:face\d|axislh|axislv|axisrh|axisrv|padd|padl|padr|padu|select|shoulderl|shoulderlb|shoulderr|shoulderrb|start|stickl|stickr)|lb_disp_(?:none|numeric|time_ms|time_sec)|lb_sort_(?:ascending|descending|none)|ov_(?:achievements|community|friends|gamegroup|players|settings)|ugc_(?:filetype_(?:community|microtrans)|list_(?:Favorited|Followed|Published|Subscribed|UsedOrPlayed|VotedDown|VotedOn|VotedUp|WillVoteLater)|match_(?:AllGuides|Artwork|Collections|ControllerBindings|IntegratedGuides|Items|Items_Mtx|Items_ReadyToUse|Screenshots|UsableInGame|Videos|WebGuides)|query_(?:AcceptedForGameRankedByAcceptanceDate|CreatedByFriendsRankedByPublicationDate|FavoritedByFriendsRankedByPublicationDate|NotYetRated)|query_RankedBy(?:NumTimesReported|PublicationDate|TextSearch|TotalVotesAsc|Trend|Vote|VotesUp)|result_success|sortorder_CreationOrder(?:Asc|Desc)|sortorder_(?:ForModeration|LastUpdatedDesc|SubscriptionDateDesc|TitleAsc|VoteScoreDesc)|visibility_(?:friends_only|private|public))|vertex_usage_(?:binormal|blendindices|blendweight|color|colour|depth|fog|normal|position|psize|sample|tangent|texcoord|textcoord)|vertex_type_(?:float\d|color|colour|ubyte4)|input_type|layerelementtype_(?:background|instance|oldtilemap|particlesystem|sprite|tile|tilemap|undefined)|se_(?:chorus|compressor|echo|equalizer|flanger|gargle|none|reverb)|text_type|tile_(?:flip|index_mask|mirror|rotate)|(?:obj|rm|scr|spr)\w+)\b/,variable:/\b(?:alarm|application_surface|async_load|background_(?:alpha|blend|color|colour|foreground|height|hspeed|htiled|index|showcolor|showcolour|visible|vspeed|vtiled|width|x|xscale|y|yscale)|bbox_(?:bottom|left|right|top)|browser_(?:height|width)|caption_(?:health|lives|score)|current_(?:day|hour|minute|month|second|time|weekday|year)|cursor_sprite|debug_mode|delta_time|direction|display_aa|error_(?:last|occurred)|event_(?:action|number|object|type)|fps|fps_real|friction|game_(?:display|project|save)_(?:id|name)|gamemaker_(?:pro|registered|version)|gravity|gravity_direction|(?:h|v)speed|health|iap_data|id|image_(?:alpha|angle|blend|depth|index|number|speed|xscale|yscale)|instance_(?:count|id)|keyboard_(?:key|lastchar|lastkey|string)|layer|lives|mask_index|mouse_(?:button|lastbutton|x|y)|object_index|os_(?:browser|device|type|version)|path_(?:endaction|index|orientation|position|positionprevious|scale|speed)|persistent|phy_(?:rotation|(?:col_normal|collision|com|linear_velocity|position|speed)_(?:x|y)|angular_(?:damping|velocity)|position_(?:x|y)previous|speed|linear_damping|bullet|fixed_rotation|active|mass|inertia|dynamic|kinematic|sleeping|collision_points)|pointer_(?:invalid|null)|room|room_(?:caption|first|height|last|persistent|speed|width)|score|secure_mode|show_(?:health|lives|score)|solid|speed|sprite_(?:height|index|width|xoffset|yoffset)|temp_directory|timeline_(?:index|loop|position|running|speed)|transition_(?:color|kind|steps)|undefined|view_(?:angle|current|enabled|(?:h|v)(?:border|speed)|(?:h|w|x|y)port|(?:h|w|x|y)view|object|surface_id|visible)|visible|webgl_enabled|working_directory|(?:x|y)(?:previous|start)|x|y|argument(?:_relitive|_count|\d)|argument|global|local|other|self)\b/}); \ No newline at end of file diff --git a/components/prism-gn.js b/components/prism-gn.js index 4f27c042d7..0fcb05ac5f 100644 --- a/components/prism-gn.js +++ b/components/prism-gn.js @@ -31,14 +31,14 @@ Prism.languages.gn = { }, 'keyword': /\b(?:else|if)\b/, - 'boolean': /\b(?:true|false)\b/, + 'boolean': /\b(?:false|true)\b/, 'builtin-function': { // a few functions get special highlighting to improve readability pattern: /\b(?:assert|defined|foreach|import|pool|print|template|tool|toolchain)(?=\s*\()/i, alias: 'keyword' }, 'function': /\b[a-z_]\w*(?=\s*\()/i, - 'constant': /\b(?:current_cpu|current_os|current_toolchain|default_toolchain|host_cpu|host_os|root_build_dir|root_gen_dir|root_out_dir|target_cpu|target_gen_dir|target_out_dir|target_os)\b/, + 'constant': /\b(?:current_cpu|current_os|current_toolchain|default_toolchain|host_cpu|host_os|root_build_dir|root_gen_dir|root_out_dir|target_cpu|target_gen_dir|target_os|target_out_dir)\b/, 'number': /-?\b\d+\b/, diff --git a/components/prism-gn.min.js b/components/prism-gn.min.js index 0c28cb1e39..c8208cc5c6 100644 --- a/components/prism-gn.min.js +++ b/components/prism-gn.min.js @@ -1 +1 @@ -Prism.languages.gn={comment:{pattern:/#.*/,greedy:!0},"string-literal":{pattern:/(^|[^\\"])"(?:[^\r\n"\\]|\\.)*"/,lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:\{[\s\S]*?\}|[a-zA-Z_]\w*|0x[a-fA-F0-9]{2})/,lookbehind:!0,inside:{number:/^\$0x[\s\S]{2}$/,variable:/^\$\w+$/,"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},expression:{pattern:/[\s\S]+/,inside:null}}},string:/[\s\S]+/}},keyword:/\b(?:else|if)\b/,boolean:/\b(?:true|false)\b/,"builtin-function":{pattern:/\b(?:assert|defined|foreach|import|pool|print|template|tool|toolchain)(?=\s*\()/i,alias:"keyword"},function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:current_cpu|current_os|current_toolchain|default_toolchain|host_cpu|host_os|root_build_dir|root_gen_dir|root_out_dir|target_cpu|target_gen_dir|target_out_dir|target_os)\b/,number:/-?\b\d+\b/,operator:/[-+!=<>]=?|&&|\|\|/,punctuation:/[(){}[\],.]/},Prism.languages.gn["string-literal"].inside.interpolation.inside.expression.inside=Prism.languages.gn,Prism.languages.gni=Prism.languages.gn; \ No newline at end of file +Prism.languages.gn={comment:{pattern:/#.*/,greedy:!0},"string-literal":{pattern:/(^|[^\\"])"(?:[^\r\n"\\]|\\.)*"/,lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:\{[\s\S]*?\}|[a-zA-Z_]\w*|0x[a-fA-F0-9]{2})/,lookbehind:!0,inside:{number:/^\$0x[\s\S]{2}$/,variable:/^\$\w+$/,"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},expression:{pattern:/[\s\S]+/,inside:null}}},string:/[\s\S]+/}},keyword:/\b(?:else|if)\b/,boolean:/\b(?:false|true)\b/,"builtin-function":{pattern:/\b(?:assert|defined|foreach|import|pool|print|template|tool|toolchain)(?=\s*\()/i,alias:"keyword"},function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:current_cpu|current_os|current_toolchain|default_toolchain|host_cpu|host_os|root_build_dir|root_gen_dir|root_out_dir|target_cpu|target_gen_dir|target_os|target_out_dir)\b/,number:/-?\b\d+\b/,operator:/[-+!=<>]=?|&&|\|\|/,punctuation:/[(){}[\],.]/},Prism.languages.gn["string-literal"].inside.interpolation.inside.expression.inside=Prism.languages.gn,Prism.languages.gni=Prism.languages.gn; \ No newline at end of file diff --git a/components/prism-go.js b/components/prism-go.js index 1af199070c..fd1c6b032c 100644 --- a/components/prism-go.js +++ b/components/prism-go.js @@ -4,9 +4,9 @@ Prism.languages.go = Prism.languages.extend('clike', { greedy: true }, 'keyword': /\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/, - 'boolean': /\b(?:_|iota|nil|true|false)\b/, + 'boolean': /\b(?:_|false|iota|nil|true)\b/, 'number': /(?:\b0x[a-f\d]+|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[-+]?\d+)?)i?/i, 'operator': /[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./, - 'builtin': /\b(?:bool|byte|complex(?:64|128)|error|float(?:32|64)|rune|string|u?int(?:8|16|32|64)?|uintptr|append|cap|close|complex|copy|delete|imag|len|make|new|panic|print(?:ln)?|real|recover)\b/ + 'builtin': /\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/ }); delete Prism.languages.go['class-name']; diff --git a/components/prism-go.min.js b/components/prism-go.min.js index 30b1e643af..75ef29e60a 100644 --- a/components/prism-go.min.js +++ b/components/prism-go.min.js @@ -1 +1 @@ -Prism.languages.go=Prism.languages.extend("clike",{string:{pattern:/(["'`])(?:\\[\s\S]|(?!\1)[^\\])*\1/,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|iota|nil|true|false)\b/,number:/(?:\b0x[a-f\d]+|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[-+]?\d+)?)i?/i,operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:bool|byte|complex(?:64|128)|error|float(?:32|64)|rune|string|u?int(?:8|16|32|64)?|uintptr|append|cap|close|complex|copy|delete|imag|len|make|new|panic|print(?:ln)?|real|recover)\b/}),delete Prism.languages.go["class-name"]; \ No newline at end of file +Prism.languages.go=Prism.languages.extend("clike",{string:{pattern:/(["'`])(?:\\[\s\S]|(?!\1)[^\\])*\1/,greedy:!0},keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,boolean:/\b(?:_|false|iota|nil|true)\b/,number:/(?:\b0x[a-f\d]+|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[-+]?\d+)?)i?/i,operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,builtin:/\b(?:append|bool|byte|cap|close|complex|complex(?:64|128)|copy|delete|error|float(?:32|64)|u?int(?:8|16|32|64)?|imag|len|make|new|panic|print(?:ln)?|real|recover|rune|string|uintptr)\b/}),delete Prism.languages.go["class-name"]; \ No newline at end of file diff --git a/components/prism-graphql.js b/components/prism-graphql.js index c8f816b9d9..e7b009b96a 100644 --- a/components/prism-graphql.js +++ b/components/prism-graphql.js @@ -17,7 +17,7 @@ Prism.languages.graphql = { greedy: true }, 'number': /(?:\B-|\b)\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i, - 'boolean': /\b(?:true|false)\b/, + 'boolean': /\b(?:false|true)\b/, 'variable': /\$[a-z_]\w*/i, 'directive': { pattern: /@[a-z_]\w*/i, diff --git a/components/prism-graphql.min.js b/components/prism-graphql.min.js index c3449c9f3b..e20dbd9b5b 100644 --- a/components/prism-graphql.min.js +++ b/components/prism-graphql.min.js @@ -1 +1 @@ -Prism.languages.graphql={comment:/#.*/,description:{pattern:/(?:"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*")(?=\s*[a-z_])/i,greedy:!0,alias:"string",inside:{"language-markdown":{pattern:/(^"(?:"")?)(?!\1)[\s\S]+(?=\1$)/,lookbehind:!0,inside:Prism.languages.markdown}}},string:{pattern:/"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*"/,greedy:!0},number:/(?:\B-|\b)\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,boolean:/\b(?:true|false)\b/,variable:/\$[a-z_]\w*/i,directive:{pattern:/@[a-z_]\w*/i,alias:"function"},"attr-name":{pattern:/[a-z_]\w*(?=\s*(?:\((?:[^()"]|"(?:\\.|[^\\"\r\n])*")*\))?:)/i,greedy:!0},"atom-input":{pattern:/[A-Z]\w*Input(?=!?.*$)/m,alias:"class-name"},scalar:/\b(?:Boolean|Float|ID|Int|String)\b/,constant:/\b[A-Z][A-Z_\d]*\b/,"class-name":{pattern:/(\b(?:enum|implements|interface|on|scalar|type|union)\s+|&\s*|:\s*|\[)[A-Z_]\w*/,lookbehind:!0},fragment:{pattern:/(\bfragment\s+|\.{3}\s*(?!on\b))[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-mutation":{pattern:/(\bmutation\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-query":{pattern:/(\bquery\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},keyword:/\b(?:directive|enum|extend|fragment|implements|input|interface|mutation|on|query|repeatable|scalar|schema|subscription|type|union)\b/,operator:/[!=|&]|\.{3}/,"property-query":/\w+(?=\s*\()/,object:/\w+(?=\s*\{)/,punctuation:/[!(){}\[\]:=,]/,property:/\w+/},Prism.hooks.add("after-tokenize",function(n){if("graphql"===n.language)for(var o=n.tokens.filter(function(n){return"string"!=typeof n&&"comment"!==n.type&&"scalar"!==n.type}),s=0;s]?|\+[+=]?|!=?|<(?:<=?|=>?)?|>(?:>>?=?|=)?|&[&=]?|\|[|=]?|\/=?|\^=?|%=?)/, @@ -29,7 +29,7 @@ Prism.languages.insertBefore('groovy', 'string', { }); Prism.languages.insertBefore('groovy', 'punctuation', { - 'spock-block': /\b(?:setup|given|when|then|and|cleanup|expect|where):/ + 'spock-block': /\b(?:and|cleanup|expect|given|setup|then|when|where):/ }); Prism.languages.insertBefore('groovy', 'function', { diff --git a/components/prism-groovy.min.js b/components/prism-groovy.min.js index 4744a0af68..fa3203b359 100644 --- a/components/prism-groovy.min.js +++ b/components/prism-groovy.min.js @@ -1 +1 @@ -Prism.languages.groovy=Prism.languages.extend("clike",{string:[{pattern:/("""|''')(?:[^\\]|\\[\s\S])*?\1|\$\/(?:[^/$]|\$(?:[/$]|(?![/$]))|\/(?!\$))*\/\$/,greedy:!0},{pattern:/(["'/])(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0}],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/,number:/\b(?:0b[01_]+|0x[\da-f_]+(?:\.[\da-f_p\-]+)?|[\d_]+(?:\.[\d_]+)?(?:e[+-]?\d+)?)[glidf]?\b/i,operator:{pattern:/(^|[^.])(?:~|==?~?|\?[.:]?|\*(?:[.=]|\*=?)?|\.[@&]|\.\.<|\.\.(?!\.)|-[-=>]?|\+[+=]?|!=?|<(?:<=?|=>?)?|>(?:>>?=?|=)?|&[&=]?|\|[|=]?|\/=?|\^=?|%=?)/,lookbehind:!0},punctuation:/\.+|[{}[\];(),:$]/}),Prism.languages.insertBefore("groovy","string",{shebang:{pattern:/#!.+/,alias:"comment"}}),Prism.languages.insertBefore("groovy","punctuation",{"spock-block":/\b(?:setup|given|when|then|and|cleanup|expect|where):/}),Prism.languages.insertBefore("groovy","function",{annotation:{pattern:/(^|[^.])@\w+/,lookbehind:!0,alias:"punctuation"}}),Prism.hooks.add("wrap",function(e){if("groovy"===e.language&&"string"===e.type){var t=e.content[0];if("'"!=t){var n=/([^\\])(?:\$(?:\{.*?\}|[\w.]+))/;"$"===t&&(n=/([^\$])(?:\$(?:\{.*?\}|[\w.]+))/),e.content=e.content.replace(/</g,"<").replace(/&/g,"&"),e.content=Prism.highlight(e.content,{expression:{pattern:n,lookbehind:!0,inside:Prism.languages.groovy}}),e.classes.push("/"===t?"regex":"gstring")}}}); \ No newline at end of file +Prism.languages.groovy=Prism.languages.extend("clike",{string:[{pattern:/("""|''')(?:[^\\]|\\[\s\S])*?\1|\$\/(?:[^/$]|\$(?:[/$]|(?![/$]))|\/(?!\$))*\/\$/,greedy:!0},{pattern:/(["'/])(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0}],keyword:/\b(?:abstract|as|assert|boolean|break|byte|case|catch|char|class|const|continue|def|default|do|double|else|enum|extends|final|finally|float|for|goto|if|implements|import|in|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/,number:/\b(?:0b[01_]+|0x[\da-f_]+(?:\.[\da-f_p\-]+)?|[\d_]+(?:\.[\d_]+)?(?:e[+-]?\d+)?)[glidf]?\b/i,operator:{pattern:/(^|[^.])(?:~|==?~?|\?[.:]?|\*(?:[.=]|\*=?)?|\.[@&]|\.\.<|\.\.(?!\.)|-[-=>]?|\+[+=]?|!=?|<(?:<=?|=>?)?|>(?:>>?=?|=)?|&[&=]?|\|[|=]?|\/=?|\^=?|%=?)/,lookbehind:!0},punctuation:/\.+|[{}[\];(),:$]/}),Prism.languages.insertBefore("groovy","string",{shebang:{pattern:/#!.+/,alias:"comment"}}),Prism.languages.insertBefore("groovy","punctuation",{"spock-block":/\b(?:and|cleanup|expect|given|setup|then|when|where):/}),Prism.languages.insertBefore("groovy","function",{annotation:{pattern:/(^|[^.])@\w+/,lookbehind:!0,alias:"punctuation"}}),Prism.hooks.add("wrap",function(e){if("groovy"===e.language&&"string"===e.type){var t=e.content[0];if("'"!=t){var n=/([^\\])(?:\$(?:\{.*?\}|[\w.]+))/;"$"===t&&(n=/([^\$])(?:\$(?:\{.*?\}|[\w.]+))/),e.content=e.content.replace(/</g,"<").replace(/&/g,"&"),e.content=Prism.highlight(e.content,{expression:{pattern:n,lookbehind:!0,inside:Prism.languages.groovy}}),e.classes.push("/"===t?"regex":"gstring")}}}); \ No newline at end of file diff --git a/components/prism-handlebars.js b/components/prism-handlebars.js index c8fdf2c36a..0ea4115233 100644 --- a/components/prism-handlebars.js +++ b/components/prism-handlebars.js @@ -8,7 +8,7 @@ }, 'string': /(["'])(?:\\.|(?!\1)[^\\\r\n])*\1/, 'number': /\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee][+-]?\d+)?/, - 'boolean': /\b(?:true|false)\b/, + 'boolean': /\b(?:false|true)\b/, 'block': { pattern: /^(\s*(?:~\s*)?)[#\/]\S+?(?=\s*(?:~\s*)?$|\s)/i, lookbehind: true, diff --git a/components/prism-handlebars.min.js b/components/prism-handlebars.min.js index e51960e360..9964abef30 100644 --- a/components/prism-handlebars.min.js +++ b/components/prism-handlebars.min.js @@ -1 +1 @@ -!function(e){e.languages.handlebars={comment:/\{\{![\s\S]*?\}\}/,delimiter:{pattern:/^\{\{\{?|\}\}\}?$/i,alias:"punctuation"},string:/(["'])(?:\\.|(?!\1)[^\\\r\n])*\1/,number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee][+-]?\d+)?/,boolean:/\b(?:true|false)\b/,block:{pattern:/^(\s*(?:~\s*)?)[#\/]\S+?(?=\s*(?:~\s*)?$|\s)/i,lookbehind:!0,alias:"keyword"},brackets:{pattern:/\[[^\]]+\]/,inside:{punctuation:/\[|\]/,variable:/[\s\S]+/}},punctuation:/[!"#%&':()*+,.\/;<=>@\[\\\]^`{|}~]/,variable:/[^!"#%&'()*+,\/;<=>@\[\\\]^`{|}~\s]+/},e.hooks.add("before-tokenize",function(a){e.languages["markup-templating"].buildPlaceholders(a,"handlebars",/\{\{\{[\s\S]+?\}\}\}|\{\{[\s\S]+?\}\}/g)}),e.hooks.add("after-tokenize",function(a){e.languages["markup-templating"].tokenizePlaceholders(a,"handlebars")}),e.languages.hbs=e.languages.handlebars}(Prism); \ No newline at end of file +!function(e){e.languages.handlebars={comment:/\{\{![\s\S]*?\}\}/,delimiter:{pattern:/^\{\{\{?|\}\}\}?$/i,alias:"punctuation"},string:/(["'])(?:\\.|(?!\1)[^\\\r\n])*\1/,number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee][+-]?\d+)?/,boolean:/\b(?:false|true)\b/,block:{pattern:/^(\s*(?:~\s*)?)[#\/]\S+?(?=\s*(?:~\s*)?$|\s)/i,lookbehind:!0,alias:"keyword"},brackets:{pattern:/\[[^\]]+\]/,inside:{punctuation:/\[|\]/,variable:/[\s\S]+/}},punctuation:/[!"#%&':()*+,.\/;<=>@\[\\\]^`{|}~]/,variable:/[^!"#%&'()*+,\/;<=>@\[\\\]^`{|}~\s]+/},e.hooks.add("before-tokenize",function(a){e.languages["markup-templating"].buildPlaceholders(a,"handlebars",/\{\{\{[\s\S]+?\}\}\}|\{\{[\s\S]+?\}\}/g)}),e.hooks.add("after-tokenize",function(a){e.languages["markup-templating"].tokenizePlaceholders(a,"handlebars")}),e.languages.hbs=e.languages.handlebars}(Prism); \ No newline at end of file diff --git a/components/prism-haskell.js b/components/prism-haskell.js index 852b3a89be..e3f600707b 100644 --- a/components/prism-haskell.js +++ b/components/prism-haskell.js @@ -4,7 +4,7 @@ Prism.languages.haskell = { lookbehind: true }, 'char': { - pattern: /'(?:[^\\']|\\(?:[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]+))'/, + pattern: /'(?:[^\\']|\\(?:[abfnrtv\\"'&]|\^[A-Z@[\]^_]|ACK|BEL|BS|CAN|CR|DC1|DC2|DC3|DC4|DEL|DLE|EM|ENQ|EOT|ESC|ETB|ETX|FF|FS|GS|HT|LF|NAK|NUL|RS|SI|SO|SOH|SP|STX|SUB|SYN|US|VT|\d+|o[0-7]+|x[0-9a-fA-F]+))'/, alias: 'string' }, 'string': { @@ -19,7 +19,7 @@ Prism.languages.haskell = { pattern: /(^[\t ]*)import\s+(?:qualified\s+)?(?:[A-Z][\w']*)(?:\.[A-Z][\w']*)*(?:\s+as\s+(?:[A-Z][\w']*)(?:\.[A-Z][\w']*)*)?(?:\s+hiding\b)?/m, lookbehind: true, inside: { - 'keyword': /\b(?:import|qualified|as|hiding)\b/, + 'keyword': /\b(?:as|hiding|import|qualified)\b/, 'punctuation': /\./ } }, diff --git a/components/prism-haskell.min.js b/components/prism-haskell.min.js index 9257b46bf7..4753b0d27e 100644 --- a/components/prism-haskell.min.js +++ b/components/prism-haskell.min.js @@ -1 +1 @@ -Prism.languages.haskell={comment:{pattern:/(^|[^-!#$%*+=?&@|~.:<>^\\\/])(?:--(?:(?=.)[^-!#$%*+=?&@|~.:<>^\\\/].*|$)|\{-[\s\S]*?-\})/m,lookbehind:!0},char:{pattern:/'(?:[^\\']|\\(?:[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]+))'/,alias:"string"},string:{pattern:/"(?:[^\\"]|\\(?:\S|\s+\\))*"/,greedy:!0},keyword:/\b(?:case|class|data|deriving|do|else|if|in|infixl|infixr|instance|let|module|newtype|of|primitive|then|type|where)\b/,"import-statement":{pattern:/(^[\t ]*)import\s+(?:qualified\s+)?(?:[A-Z][\w']*)(?:\.[A-Z][\w']*)*(?:\s+as\s+(?:[A-Z][\w']*)(?:\.[A-Z][\w']*)*)?(?:\s+hiding\b)?/m,lookbehind:!0,inside:{keyword:/\b(?:import|qualified|as|hiding)\b/,punctuation:/\./}},builtin:/\b(?:abs|acos|acosh|all|and|any|appendFile|approxRational|asTypeOf|asin|asinh|atan|atan2|atanh|basicIORun|break|catch|ceiling|chr|compare|concat|concatMap|const|cos|cosh|curry|cycle|decodeFloat|denominator|digitToInt|div|divMod|drop|dropWhile|either|elem|encodeFloat|enumFrom|enumFromThen|enumFromThenTo|enumFromTo|error|even|exp|exponent|fail|filter|flip|floatDigits|floatRadix|floatRange|floor|fmap|foldl|foldl1|foldr|foldr1|fromDouble|fromEnum|fromInt|fromInteger|fromIntegral|fromRational|fst|gcd|getChar|getContents|getLine|group|head|id|inRange|index|init|intToDigit|interact|ioError|isAlpha|isAlphaNum|isAscii|isControl|isDenormalized|isDigit|isHexDigit|isIEEE|isInfinite|isLower|isNaN|isNegativeZero|isOctDigit|isPrint|isSpace|isUpper|iterate|last|lcm|length|lex|lexDigits|lexLitChar|lines|log|logBase|lookup|map|mapM|mapM_|max|maxBound|maximum|maybe|min|minBound|minimum|mod|negate|not|notElem|null|numerator|odd|or|ord|otherwise|pack|pi|pred|primExitWith|print|product|properFraction|putChar|putStr|putStrLn|quot|quotRem|range|rangeSize|read|readDec|readFile|readFloat|readHex|readIO|readInt|readList|readLitChar|readLn|readOct|readParen|readSigned|reads|readsPrec|realToFrac|recip|rem|repeat|replicate|return|reverse|round|scaleFloat|scanl|scanl1|scanr|scanr1|seq|sequence|sequence_|show|showChar|showInt|showList|showLitChar|showParen|showSigned|showString|shows|showsPrec|significand|signum|sin|sinh|snd|sort|span|splitAt|sqrt|subtract|succ|sum|tail|take|takeWhile|tan|tanh|threadToIOResult|toEnum|toInt|toInteger|toLower|toRational|toUpper|truncate|uncurry|undefined|unlines|until|unwords|unzip|unzip3|userError|words|writeFile|zip|zip3|zipWith|zipWith3)\b/,number:/\b(?:\d+(?:\.\d+)?(?:e[+-]?\d+)?|0o[0-7]+|0x[0-9a-f]+)\b/i,operator:[{pattern:/`(?:[A-Z][\w']*\.)*[_a-z][\w']*`/,greedy:!0},{pattern:/(\s)\.(?=\s)/,lookbehind:!0},/[-!#$%*+=?&@|~:<>^\\\/][-!#$%*+=?&@|~.:<>^\\\/]*|\.[-!#$%*+=?&@|~.:<>^\\\/]+/],hvariable:{pattern:/\b(?:[A-Z][\w']*\.)*[_a-z][\w']*/,inside:{punctuation:/\./}},constant:{pattern:/\b(?:[A-Z][\w']*\.)*[A-Z][\w']*/,inside:{punctuation:/\./}},punctuation:/[{}[\];(),.:]/},Prism.languages.hs=Prism.languages.haskell; \ No newline at end of file +Prism.languages.haskell={comment:{pattern:/(^|[^-!#$%*+=?&@|~.:<>^\\\/])(?:--(?:(?=.)[^-!#$%*+=?&@|~.:<>^\\\/].*|$)|\{-[\s\S]*?-\})/m,lookbehind:!0},char:{pattern:/'(?:[^\\']|\\(?:[abfnrtv\\"'&]|\^[A-Z@[\]^_]|ACK|BEL|BS|CAN|CR|DC1|DC2|DC3|DC4|DEL|DLE|EM|ENQ|EOT|ESC|ETB|ETX|FF|FS|GS|HT|LF|NAK|NUL|RS|SI|SO|SOH|SP|STX|SUB|SYN|US|VT|\d+|o[0-7]+|x[0-9a-fA-F]+))'/,alias:"string"},string:{pattern:/"(?:[^\\"]|\\(?:\S|\s+\\))*"/,greedy:!0},keyword:/\b(?:case|class|data|deriving|do|else|if|in|infixl|infixr|instance|let|module|newtype|of|primitive|then|type|where)\b/,"import-statement":{pattern:/(^[\t ]*)import\s+(?:qualified\s+)?(?:[A-Z][\w']*)(?:\.[A-Z][\w']*)*(?:\s+as\s+(?:[A-Z][\w']*)(?:\.[A-Z][\w']*)*)?(?:\s+hiding\b)?/m,lookbehind:!0,inside:{keyword:/\b(?:as|hiding|import|qualified)\b/,punctuation:/\./}},builtin:/\b(?:abs|acos|acosh|all|and|any|appendFile|approxRational|asTypeOf|asin|asinh|atan|atan2|atanh|basicIORun|break|catch|ceiling|chr|compare|concat|concatMap|const|cos|cosh|curry|cycle|decodeFloat|denominator|digitToInt|div|divMod|drop|dropWhile|either|elem|encodeFloat|enumFrom|enumFromThen|enumFromThenTo|enumFromTo|error|even|exp|exponent|fail|filter|flip|floatDigits|floatRadix|floatRange|floor|fmap|foldl|foldl1|foldr|foldr1|fromDouble|fromEnum|fromInt|fromInteger|fromIntegral|fromRational|fst|gcd|getChar|getContents|getLine|group|head|id|inRange|index|init|intToDigit|interact|ioError|isAlpha|isAlphaNum|isAscii|isControl|isDenormalized|isDigit|isHexDigit|isIEEE|isInfinite|isLower|isNaN|isNegativeZero|isOctDigit|isPrint|isSpace|isUpper|iterate|last|lcm|length|lex|lexDigits|lexLitChar|lines|log|logBase|lookup|map|mapM|mapM_|max|maxBound|maximum|maybe|min|minBound|minimum|mod|negate|not|notElem|null|numerator|odd|or|ord|otherwise|pack|pi|pred|primExitWith|print|product|properFraction|putChar|putStr|putStrLn|quot|quotRem|range|rangeSize|read|readDec|readFile|readFloat|readHex|readIO|readInt|readList|readLitChar|readLn|readOct|readParen|readSigned|reads|readsPrec|realToFrac|recip|rem|repeat|replicate|return|reverse|round|scaleFloat|scanl|scanl1|scanr|scanr1|seq|sequence|sequence_|show|showChar|showInt|showList|showLitChar|showParen|showSigned|showString|shows|showsPrec|significand|signum|sin|sinh|snd|sort|span|splitAt|sqrt|subtract|succ|sum|tail|take|takeWhile|tan|tanh|threadToIOResult|toEnum|toInt|toInteger|toLower|toRational|toUpper|truncate|uncurry|undefined|unlines|until|unwords|unzip|unzip3|userError|words|writeFile|zip|zip3|zipWith|zipWith3)\b/,number:/\b(?:\d+(?:\.\d+)?(?:e[+-]?\d+)?|0o[0-7]+|0x[0-9a-f]+)\b/i,operator:[{pattern:/`(?:[A-Z][\w']*\.)*[_a-z][\w']*`/,greedy:!0},{pattern:/(\s)\.(?=\s)/,lookbehind:!0},/[-!#$%*+=?&@|~:<>^\\\/][-!#$%*+=?&@|~.:<>^\\\/]*|\.[-!#$%*+=?&@|~.:<>^\\\/]+/],hvariable:{pattern:/\b(?:[A-Z][\w']*\.)*[_a-z][\w']*/,inside:{punctuation:/\./}},constant:{pattern:/\b(?:[A-Z][\w']*\.)*[A-Z][\w']*/,inside:{punctuation:/\./}},punctuation:/[{}[\];(),.:]/},Prism.languages.hs=Prism.languages.haskell; \ No newline at end of file diff --git a/components/prism-haxe.js b/components/prism-haxe.js index 7f9d83c7f1..1bdfa81b49 100644 --- a/components/prism-haxe.js +++ b/components/prism-haxe.js @@ -18,7 +18,7 @@ Prism.languages.haxe = Prism.languages.extend('clike', { } }, // The final look-ahead prevents highlighting of keywords if expressions such as "haxe.macro.Expr" - 'keyword': /\bthis\b|\b(?:abstract|as|break|case|cast|catch|class|continue|default|do|dynamic|else|enum|extends|extern|from|for|function|if|implements|import|in|inline|interface|macro|new|null|override|public|private|return|static|super|switch|throw|to|try|typedef|using|var|while)(?!\.)\b/, + 'keyword': /\bthis\b|\b(?:abstract|as|break|case|cast|catch|class|continue|default|do|dynamic|else|enum|extends|extern|for|from|function|if|implements|import|in|inline|interface|macro|new|null|override|private|public|return|static|super|switch|throw|to|try|typedef|using|var|while)(?!\.)\b/, 'operator': /\.{3}|\+\+?|-[->]?|[=!]=?|&&?|\|\|?|<[<=]?|>[>=]?|[*\/%~^]/ }); Prism.languages.insertBefore('haxe', 'class-name', { diff --git a/components/prism-haxe.min.js b/components/prism-haxe.min.js index 0b94df4eb6..95b1d099b6 100644 --- a/components/prism-haxe.min.js +++ b/components/prism-haxe.min.js @@ -1 +1 @@ -Prism.languages.haxe=Prism.languages.extend("clike",{string:{pattern:/(["'])(?:(?!\1)[^\\]|\\[\s\S])*\1/,greedy:!0,inside:{interpolation:{pattern:/(^|[^\\])\$(?:\w+|\{[^}]+\})/,lookbehind:!0,inside:{interpolation:{pattern:/^\$\w*/,alias:"variable"}}}}},keyword:/\bthis\b|\b(?:abstract|as|break|case|cast|catch|class|continue|default|do|dynamic|else|enum|extends|extern|from|for|function|if|implements|import|in|inline|interface|macro|new|null|override|public|private|return|static|super|switch|throw|to|try|typedef|using|var|while)(?!\.)\b/,operator:/\.{3}|\+\+?|-[->]?|[=!]=?|&&?|\|\|?|<[<=]?|>[>=]?|[*\/%~^]/}),Prism.languages.insertBefore("haxe","class-name",{regex:{pattern:/~\/(?:[^\/\\\r\n]|\\.)+\/[igmsu]*/,greedy:!0}}),Prism.languages.insertBefore("haxe","keyword",{preprocessor:{pattern:/#\w+/,alias:"builtin"},metadata:{pattern:/@:?\w+/,alias:"symbol"},reification:{pattern:/\$(?:\w+|(?=\{))/,alias:"variable"}}),Prism.languages.haxe.string.inside.interpolation.inside.rest=Prism.languages.haxe,delete Prism.languages.haxe["class-name"]; \ No newline at end of file +Prism.languages.haxe=Prism.languages.extend("clike",{string:{pattern:/(["'])(?:(?!\1)[^\\]|\\[\s\S])*\1/,greedy:!0,inside:{interpolation:{pattern:/(^|[^\\])\$(?:\w+|\{[^}]+\})/,lookbehind:!0,inside:{interpolation:{pattern:/^\$\w*/,alias:"variable"}}}}},keyword:/\bthis\b|\b(?:abstract|as|break|case|cast|catch|class|continue|default|do|dynamic|else|enum|extends|extern|for|from|function|if|implements|import|in|inline|interface|macro|new|null|override|private|public|return|static|super|switch|throw|to|try|typedef|using|var|while)(?!\.)\b/,operator:/\.{3}|\+\+?|-[->]?|[=!]=?|&&?|\|\|?|<[<=]?|>[>=]?|[*\/%~^]/}),Prism.languages.insertBefore("haxe","class-name",{regex:{pattern:/~\/(?:[^\/\\\r\n]|\\.)+\/[igmsu]*/,greedy:!0}}),Prism.languages.insertBefore("haxe","keyword",{preprocessor:{pattern:/#\w+/,alias:"builtin"},metadata:{pattern:/@:?\w+/,alias:"symbol"},reification:{pattern:/\$(?:\w+|(?=\{))/,alias:"variable"}}),Prism.languages.haxe.string.inside.interpolation.inside.rest=Prism.languages.haxe,delete Prism.languages.haxe["class-name"]; \ No newline at end of file diff --git a/components/prism-hcl.js b/components/prism-hcl.js index ed0faf2391..bd12c84666 100644 --- a/components/prism-hcl.js +++ b/components/prism-hcl.js @@ -7,7 +7,7 @@ Prism.languages.hcl = { }, 'keyword': [ { - pattern: /(?:resource|data)\s+(?:"(?:\\[\s\S]|[^\\"])*")(?=\s+"[\w-]+"\s+\{)/i, + pattern: /(?:data|resource)\s+(?:"(?:\\[\s\S]|[^\\"])*")(?=\s+"[\w-]+"\s+\{)/i, inside: { 'type': { pattern: /(resource|data|\s+)(?:"(?:\\[\s\S]|[^\\"])*")/i, @@ -17,10 +17,10 @@ Prism.languages.hcl = { } }, { - pattern: /(?:provider|provisioner|variable|output|module|backend)\s+(?:[\w-]+|"(?:\\[\s\S]|[^\\"])*")\s+(?=\{)/i, + pattern: /(?:backend|module|output|provider|provisioner|variable)\s+(?:[\w-]+|"(?:\\[\s\S]|[^\\"])*")\s+(?=\{)/i, inside: { 'type': { - pattern: /(provider|provisioner|variable|output|module|backend)\s+(?:[\w-]+|"(?:\\[\s\S]|[^\\"])*")\s+/i, + pattern: /(backend|module|output|provider|provisioner|variable)\s+(?:[\w-]+|"(?:\\[\s\S]|[^\\"])*")\s+/i, lookbehind: true, alias: 'variable' } @@ -41,11 +41,11 @@ Prism.languages.hcl = { lookbehind: true, inside: { 'type': { - pattern: /(\b(?:terraform|var|self|count|module|path|data|local)\b\.)[\w\*]+/i, + pattern: /(\b(?:count|data|local|module|path|self|terraform|var)\b\.)[\w\*]+/i, lookbehind: true, alias: 'variable' }, - 'keyword': /\b(?:terraform|var|self|count|module|path|data|local)\b/i, + 'keyword': /\b(?:count|data|local|module|path|self|terraform|var)\b/i, 'function': /\w+(?=\()/, 'string': { pattern: /"(?:\\[\s\S]|[^\\"])*"/, @@ -58,6 +58,6 @@ Prism.languages.hcl = { } }, 'number': /\b0x[\da-f]+\b|\b\d+(?:\.\d*)?(?:e[+-]?\d+)?/i, - 'boolean': /\b(?:true|false)\b/i, + 'boolean': /\b(?:false|true)\b/i, 'punctuation': /[=\[\]{}]/, }; diff --git a/components/prism-hcl.min.js b/components/prism-hcl.min.js index f05252e43d..2ed0a9b993 100644 --- a/components/prism-hcl.min.js +++ b/components/prism-hcl.min.js @@ -1 +1 @@ -Prism.languages.hcl={comment:/(?:\/\/|#).*|\/\*[\s\S]*?(?:\*\/|$)/,heredoc:{pattern:/<<-?(\w+\b)[\s\S]*?^[ \t]*\1/m,greedy:!0,alias:"string"},keyword:[{pattern:/(?:resource|data)\s+(?:"(?:\\[\s\S]|[^\\"])*")(?=\s+"[\w-]+"\s+\{)/i,inside:{type:{pattern:/(resource|data|\s+)(?:"(?:\\[\s\S]|[^\\"])*")/i,lookbehind:!0,alias:"variable"}}},{pattern:/(?:provider|provisioner|variable|output|module|backend)\s+(?:[\w-]+|"(?:\\[\s\S]|[^\\"])*")\s+(?=\{)/i,inside:{type:{pattern:/(provider|provisioner|variable|output|module|backend)\s+(?:[\w-]+|"(?:\\[\s\S]|[^\\"])*")\s+/i,lookbehind:!0,alias:"variable"}}},/[\w-]+(?=\s+\{)/],property:[/[-\w\.]+(?=\s*=(?!=))/,/"(?:\\[\s\S]|[^\\"])+"(?=\s*[:=])/],string:{pattern:/"(?:[^\\$"]|\\[\s\S]|\$(?:(?=")|\$+(?!\$)|[^"${])|\$\{(?:[^{}"]|"(?:[^\\"]|\\[\s\S])*")*\})*"/,greedy:!0,inside:{interpolation:{pattern:/(^|[^$])\$\{(?:[^{}"]|"(?:[^\\"]|\\[\s\S])*")*\}/,lookbehind:!0,inside:{type:{pattern:/(\b(?:terraform|var|self|count|module|path|data|local)\b\.)[\w\*]+/i,lookbehind:!0,alias:"variable"},keyword:/\b(?:terraform|var|self|count|module|path|data|local)\b/i,function:/\w+(?=\()/,string:{pattern:/"(?:\\[\s\S]|[^\\"])*"/,greedy:!0},number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?(?:e[+-]?\d+)?/i,punctuation:/[!\$#%&'()*+,.\/;<=>@\[\\\]^`{|}~?:]/}}}},number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?(?:e[+-]?\d+)?/i,boolean:/\b(?:true|false)\b/i,punctuation:/[=\[\]{}]/}; \ No newline at end of file +Prism.languages.hcl={comment:/(?:\/\/|#).*|\/\*[\s\S]*?(?:\*\/|$)/,heredoc:{pattern:/<<-?(\w+\b)[\s\S]*?^[ \t]*\1/m,greedy:!0,alias:"string"},keyword:[{pattern:/(?:data|resource)\s+(?:"(?:\\[\s\S]|[^\\"])*")(?=\s+"[\w-]+"\s+\{)/i,inside:{type:{pattern:/(resource|data|\s+)(?:"(?:\\[\s\S]|[^\\"])*")/i,lookbehind:!0,alias:"variable"}}},{pattern:/(?:backend|module|output|provider|provisioner|variable)\s+(?:[\w-]+|"(?:\\[\s\S]|[^\\"])*")\s+(?=\{)/i,inside:{type:{pattern:/(backend|module|output|provider|provisioner|variable)\s+(?:[\w-]+|"(?:\\[\s\S]|[^\\"])*")\s+/i,lookbehind:!0,alias:"variable"}}},/[\w-]+(?=\s+\{)/],property:[/[-\w\.]+(?=\s*=(?!=))/,/"(?:\\[\s\S]|[^\\"])+"(?=\s*[:=])/],string:{pattern:/"(?:[^\\$"]|\\[\s\S]|\$(?:(?=")|\$+(?!\$)|[^"${])|\$\{(?:[^{}"]|"(?:[^\\"]|\\[\s\S])*")*\})*"/,greedy:!0,inside:{interpolation:{pattern:/(^|[^$])\$\{(?:[^{}"]|"(?:[^\\"]|\\[\s\S])*")*\}/,lookbehind:!0,inside:{type:{pattern:/(\b(?:count|data|local|module|path|self|terraform|var)\b\.)[\w\*]+/i,lookbehind:!0,alias:"variable"},keyword:/\b(?:count|data|local|module|path|self|terraform|var)\b/i,function:/\w+(?=\()/,string:{pattern:/"(?:\\[\s\S]|[^\\"])*"/,greedy:!0},number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?(?:e[+-]?\d+)?/i,punctuation:/[!\$#%&'()*+,.\/;<=>@\[\\\]^`{|}~?:]/}}}},number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?(?:e[+-]?\d+)?/i,boolean:/\b(?:false|true)\b/i,punctuation:/[=\[\]{}]/}; \ No newline at end of file diff --git a/components/prism-hlsl.js b/components/prism-hlsl.js index d626bfc403..3dd1844d48 100644 --- a/components/prism-hlsl.js +++ b/components/prism-hlsl.js @@ -6,7 +6,7 @@ Prism.languages.hlsl = Prism.languages.extend('c', { // https://docs.microsoft.com/en-us/windows/win32/direct3dhlsl/dx-graphics-hlsl-appendix-reserved-words 'class-name': [ Prism.languages.c['class-name'], - /\b(?:AppendStructuredBuffer|BlendState|Buffer|ByteAddressBuffer|CompileShader|ComputeShader|ConsumeStructuredBuffer|DepthStencilState|DepthStencilView|DomainShader|GeometryShader|Hullshader|InputPatch|LineStream|OutputPatch|PixelShader|PointStream|RasterizerState|RenderTargetView|RWBuffer|RWByteAddressBuffer|RWStructuredBuffer|RWTexture(?:1D|1DArray|2D|2DArray|3D)|SamplerComparisonState|SamplerState|StructuredBuffer|Texture(?:1D|1DArray|2D|2DArray|2DMS|2DMSArray|3D|Cube|CubeArray)|TriangleStream|VertexShader)\b/ + /\b(?:AppendStructuredBuffer|BlendState|Buffer|ByteAddressBuffer|CompileShader|ComputeShader|ConsumeStructuredBuffer|DepthStencilState|DepthStencilView|DomainShader|GeometryShader|Hullshader|InputPatch|LineStream|OutputPatch|PixelShader|PointStream|RWBuffer|RWByteAddressBuffer|RWStructuredBuffer|RWTexture(?:1D|1DArray|2D|2DArray|3D)|RasterizerState|RenderTargetView|SamplerComparisonState|SamplerState|StructuredBuffer|Texture(?:1D|1DArray|2D|2DArray|2DMS|2DMSArray|3D|Cube|CubeArray)|TriangleStream|VertexShader)\b/ ], 'keyword': [ // HLSL keyword diff --git a/components/prism-hlsl.min.js b/components/prism-hlsl.min.js index 5ecb896ebf..364778c8f4 100644 --- a/components/prism-hlsl.min.js +++ b/components/prism-hlsl.min.js @@ -1 +1 @@ -Prism.languages.hlsl=Prism.languages.extend("c",{"class-name":[Prism.languages.c["class-name"],/\b(?:AppendStructuredBuffer|BlendState|Buffer|ByteAddressBuffer|CompileShader|ComputeShader|ConsumeStructuredBuffer|DepthStencilState|DepthStencilView|DomainShader|GeometryShader|Hullshader|InputPatch|LineStream|OutputPatch|PixelShader|PointStream|RasterizerState|RenderTargetView|RWBuffer|RWByteAddressBuffer|RWStructuredBuffer|RWTexture(?:1D|1DArray|2D|2DArray|3D)|SamplerComparisonState|SamplerState|StructuredBuffer|Texture(?:1D|1DArray|2D|2DArray|2DMS|2DMSArray|3D|Cube|CubeArray)|TriangleStream|VertexShader)\b/],keyword:[/\b(?:asm|asm_fragment|auto|break|case|catch|cbuffer|centroid|char|class|column_major|compile|compile_fragment|const|const_cast|continue|default|delete|discard|do|dynamic_cast|else|enum|explicit|export|extern|for|friend|fxgroup|goto|groupshared|if|in|inline|inout|interface|line|lineadj|linear|long|matrix|mutable|namespace|new|nointerpolation|noperspective|operator|out|packoffset|pass|pixelfragment|point|precise|private|protected|public|register|reinterpret_cast|return|row_major|sample|sampler|shared|short|signed|sizeof|snorm|stateblock|stateblock_state|static|static_cast|string|struct|switch|tbuffer|technique|technique10|technique11|template|texture|this|throw|triangle|triangleadj|try|typedef|typename|uniform|union|unorm|unsigned|using|vector|vertexfragment|virtual|void|volatile|while)\b/,/\b(?:bool|double|dword|float|half|int|min(?:10float|12int|16(?:float|int|uint))|uint)(?:[1-4](?:x[1-4])?)?\b/],number:/(?:(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[eE][+-]?\d+)?|\b0x[\da-fA-F]+)[fFhHlLuU]?\b/,boolean:/\b(?:false|true)\b/}); \ No newline at end of file +Prism.languages.hlsl=Prism.languages.extend("c",{"class-name":[Prism.languages.c["class-name"],/\b(?:AppendStructuredBuffer|BlendState|Buffer|ByteAddressBuffer|CompileShader|ComputeShader|ConsumeStructuredBuffer|DepthStencilState|DepthStencilView|DomainShader|GeometryShader|Hullshader|InputPatch|LineStream|OutputPatch|PixelShader|PointStream|RWBuffer|RWByteAddressBuffer|RWStructuredBuffer|RWTexture(?:1D|1DArray|2D|2DArray|3D)|RasterizerState|RenderTargetView|SamplerComparisonState|SamplerState|StructuredBuffer|Texture(?:1D|1DArray|2D|2DArray|2DMS|2DMSArray|3D|Cube|CubeArray)|TriangleStream|VertexShader)\b/],keyword:[/\b(?:asm|asm_fragment|auto|break|case|catch|cbuffer|centroid|char|class|column_major|compile|compile_fragment|const|const_cast|continue|default|delete|discard|do|dynamic_cast|else|enum|explicit|export|extern|for|friend|fxgroup|goto|groupshared|if|in|inline|inout|interface|line|lineadj|linear|long|matrix|mutable|namespace|new|nointerpolation|noperspective|operator|out|packoffset|pass|pixelfragment|point|precise|private|protected|public|register|reinterpret_cast|return|row_major|sample|sampler|shared|short|signed|sizeof|snorm|stateblock|stateblock_state|static|static_cast|string|struct|switch|tbuffer|technique|technique10|technique11|template|texture|this|throw|triangle|triangleadj|try|typedef|typename|uniform|union|unorm|unsigned|using|vector|vertexfragment|virtual|void|volatile|while)\b/,/\b(?:bool|double|dword|float|half|int|min(?:10float|12int|16(?:float|int|uint))|uint)(?:[1-4](?:x[1-4])?)?\b/],number:/(?:(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[eE][+-]?\d+)?|\b0x[\da-fA-F]+)[fFhHlLuU]?\b/,boolean:/\b(?:false|true)\b/}); \ No newline at end of file diff --git a/components/prism-http.js b/components/prism-http.js index 4dea0e4865..afaf198a73 100644 --- a/components/prism-http.js +++ b/components/prism-http.js @@ -1,7 +1,7 @@ (function (Prism) { Prism.languages.http = { 'request-line': { - pattern: /^(?:GET|HEAD|POST|PUT|DELETE|CONNECT|OPTIONS|TRACE|PATCH|PRI|SEARCH)\s(?:https?:\/\/|\/)\S*\sHTTP\/[0-9.]+/m, + pattern: /^(?:CONNECT|DELETE|GET|HEAD|OPTIONS|PATCH|POST|PRI|PUT|SEARCH|TRACE)\s(?:https?:\/\/|\/)\S*\sHTTP\/[0-9.]+/m, inside: { // HTTP Method 'method': { diff --git a/components/prism-http.min.js b/components/prism-http.min.js index 4549361429..69db5379a7 100644 --- a/components/prism-http.min.js +++ b/components/prism-http.min.js @@ -1 +1 @@ -!function(t){t.languages.http={"request-line":{pattern:/^(?:GET|HEAD|POST|PUT|DELETE|CONNECT|OPTIONS|TRACE|PATCH|PRI|SEARCH)\s(?:https?:\/\/|\/)\S*\sHTTP\/[0-9.]+/m,inside:{method:{pattern:/^[A-Z]+\b/,alias:"property"},"request-target":{pattern:/^(\s)(?:https?:\/\/|\/)\S*(?=\s)/,lookbehind:!0,alias:"url",inside:t.languages.uri},"http-version":{pattern:/^(\s)HTTP\/[0-9.]+/,lookbehind:!0,alias:"property"}}},"response-status":{pattern:/^HTTP\/[0-9.]+ \d+ .+/m,inside:{"http-version":{pattern:/^HTTP\/[0-9.]+/,alias:"property"},"status-code":{pattern:/^(\s)\d+(?=\s)/,lookbehind:!0,alias:"number"},"reason-phrase":{pattern:/^(\s).+/,lookbehind:!0,alias:"string"}}},"header-name":{pattern:/^[\w-]+:(?=.)/m,alias:"keyword"}};var a,e,s,n=t.languages,r={"application/javascript":n.javascript,"application/json":n.json||n.javascript,"application/xml":n.xml,"text/xml":n.xml,"text/html":n.html,"text/css":n.css},i={"application/json":!0,"application/xml":!0};for(var p in r)if(r[p]){a=a||{};var o=i[p]?(void 0,s=(e=p).replace(/^[a-z]+\//,""),"(?:"+e+"|\\w+/(?:[\\w.-]+\\+)+"+s+"(?![+\\w.-]))"):p;a[p.replace(/\//g,"-")]={pattern:RegExp("(content-type:\\s*"+o+"(?:(?:\\r\\n?|\\n).+)*)(?:\\r?\\n|\\r){2}[\\s\\S]*","i"),lookbehind:!0,inside:r[p]}}a&&t.languages.insertBefore("http","header-name",a)}(Prism); \ No newline at end of file +!function(t){t.languages.http={"request-line":{pattern:/^(?:CONNECT|DELETE|GET|HEAD|OPTIONS|PATCH|POST|PRI|PUT|SEARCH|TRACE)\s(?:https?:\/\/|\/)\S*\sHTTP\/[0-9.]+/m,inside:{method:{pattern:/^[A-Z]+\b/,alias:"property"},"request-target":{pattern:/^(\s)(?:https?:\/\/|\/)\S*(?=\s)/,lookbehind:!0,alias:"url",inside:t.languages.uri},"http-version":{pattern:/^(\s)HTTP\/[0-9.]+/,lookbehind:!0,alias:"property"}}},"response-status":{pattern:/^HTTP\/[0-9.]+ \d+ .+/m,inside:{"http-version":{pattern:/^HTTP\/[0-9.]+/,alias:"property"},"status-code":{pattern:/^(\s)\d+(?=\s)/,lookbehind:!0,alias:"number"},"reason-phrase":{pattern:/^(\s).+/,lookbehind:!0,alias:"string"}}},"header-name":{pattern:/^[\w-]+:(?=.)/m,alias:"keyword"}};var a,e,s,n=t.languages,r={"application/javascript":n.javascript,"application/json":n.json||n.javascript,"application/xml":n.xml,"text/xml":n.xml,"text/html":n.html,"text/css":n.css},i={"application/json":!0,"application/xml":!0};for(var p in r)if(r[p]){a=a||{};var o=i[p]?(void 0,s=(e=p).replace(/^[a-z]+\//,""),"(?:"+e+"|\\w+/(?:[\\w.-]+\\+)+"+s+"(?![+\\w.-]))"):p;a[p.replace(/\//g,"-")]={pattern:RegExp("(content-type:\\s*"+o+"(?:(?:\\r\\n?|\\n).+)*)(?:\\r?\\n|\\r){2}[\\s\\S]*","i"),lookbehind:!0,inside:r[p]}}a&&t.languages.insertBefore("http","header-name",a)}(Prism); \ No newline at end of file diff --git a/components/prism-ichigojam.js b/components/prism-ichigojam.js index ebc24a586e..15e75b7dc3 100644 --- a/components/prism-ichigojam.js +++ b/components/prism-ichigojam.js @@ -7,7 +7,7 @@ Prism.languages.ichigojam = { greedy: true }, 'number': /\B#[0-9A-F]+|\B`[01]+|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:E[+-]?\d+)?/i, - 'keyword': /\b(?:BEEP|BPS|CASE|CLEAR|CLK|CLO|CLP|CLS|CLT|CLV|CONT|COPY|ELSE|END|FILE|FILES|FOR|GOSUB|GSB|GOTO|IF|INPUT|KBD|LED|LET|LIST|LOAD|LOCATE|LRUN|NEW|NEXT|OUT|RIGHT|PLAY|POKE|PRINT|PWM|REM|RENUM|RESET|RETURN|RTN|RUN|SAVE|SCROLL|SLEEP|SRND|STEP|STOP|SUB|TEMPO|THEN|TO|UART|VIDEO|WAIT)(?:\$|\b)/i, + 'keyword': /\b(?:BEEP|BPS|CASE|CLEAR|CLK|CLO|CLP|CLS|CLT|CLV|CONT|COPY|ELSE|END|FILE|FILES|FOR|GOSUB|GOTO|GSB|IF|INPUT|KBD|LED|LET|LIST|LOAD|LOCATE|LRUN|NEW|NEXT|OUT|PLAY|POKE|PRINT|PWM|REM|RENUM|RESET|RETURN|RIGHT|RTN|RUN|SAVE|SCROLL|SLEEP|SRND|STEP|STOP|SUB|TEMPO|THEN|TO|UART|VIDEO|WAIT)(?:\$|\b)/i, 'function': /\b(?:ABS|ANA|ASC|BIN|BTN|DEC|END|FREE|HELP|HEX|I2CR|I2CW|IN|INKEY|LEN|LINE|PEEK|RND|SCR|SOUND|STR|TICK|USR|VER|VPEEK|ZER)(?:\$|\b)/i, 'label': /(?:\B@\S+)/i, 'operator': /<[=>]?|>=?|\|\||&&|[+\-*\/=|&^~!]|\b(?:AND|NOT|OR)\b/i, diff --git a/components/prism-ichigojam.min.js b/components/prism-ichigojam.min.js index bc6452f590..f139f57130 100644 --- a/components/prism-ichigojam.min.js +++ b/components/prism-ichigojam.min.js @@ -1 +1 @@ -Prism.languages.ichigojam={comment:/(?:\B'|REM)(?:[^\n\r]*)/i,string:{pattern:/"(?:""|[!#$%&'()*,\/:;<=>?^\w +\-.])*"/i,greedy:!0},number:/\B#[0-9A-F]+|\B`[01]+|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:E[+-]?\d+)?/i,keyword:/\b(?:BEEP|BPS|CASE|CLEAR|CLK|CLO|CLP|CLS|CLT|CLV|CONT|COPY|ELSE|END|FILE|FILES|FOR|GOSUB|GSB|GOTO|IF|INPUT|KBD|LED|LET|LIST|LOAD|LOCATE|LRUN|NEW|NEXT|OUT|RIGHT|PLAY|POKE|PRINT|PWM|REM|RENUM|RESET|RETURN|RTN|RUN|SAVE|SCROLL|SLEEP|SRND|STEP|STOP|SUB|TEMPO|THEN|TO|UART|VIDEO|WAIT)(?:\$|\b)/i,function:/\b(?:ABS|ANA|ASC|BIN|BTN|DEC|END|FREE|HELP|HEX|I2CR|I2CW|IN|INKEY|LEN|LINE|PEEK|RND|SCR|SOUND|STR|TICK|USR|VER|VPEEK|ZER)(?:\$|\b)/i,label:/(?:\B@\S+)/i,operator:/<[=>]?|>=?|\|\||&&|[+\-*\/=|&^~!]|\b(?:AND|NOT|OR)\b/i,punctuation:/[\[,;:()\]]/}; \ No newline at end of file +Prism.languages.ichigojam={comment:/(?:\B'|REM)(?:[^\n\r]*)/i,string:{pattern:/"(?:""|[!#$%&'()*,\/:;<=>?^\w +\-.])*"/i,greedy:!0},number:/\B#[0-9A-F]+|\B`[01]+|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:E[+-]?\d+)?/i,keyword:/\b(?:BEEP|BPS|CASE|CLEAR|CLK|CLO|CLP|CLS|CLT|CLV|CONT|COPY|ELSE|END|FILE|FILES|FOR|GOSUB|GOTO|GSB|IF|INPUT|KBD|LED|LET|LIST|LOAD|LOCATE|LRUN|NEW|NEXT|OUT|PLAY|POKE|PRINT|PWM|REM|RENUM|RESET|RETURN|RIGHT|RTN|RUN|SAVE|SCROLL|SLEEP|SRND|STEP|STOP|SUB|TEMPO|THEN|TO|UART|VIDEO|WAIT)(?:\$|\b)/i,function:/\b(?:ABS|ANA|ASC|BIN|BTN|DEC|END|FREE|HELP|HEX|I2CR|I2CW|IN|INKEY|LEN|LINE|PEEK|RND|SCR|SOUND|STR|TICK|USR|VER|VPEEK|ZER)(?:\$|\b)/i,label:/(?:\B@\S+)/i,operator:/<[=>]?|>=?|\|\||&&|[+\-*\/=|&^~!]|\b(?:AND|NOT|OR)\b/i,punctuation:/[\[,;:()\]]/}; \ No newline at end of file diff --git a/components/prism-icu-message-format.js b/components/prism-icu-message-format.js index 7b9de169eb..a4de0db52f 100644 --- a/components/prism-icu-message-format.js +++ b/components/prism-icu-message-format.js @@ -92,7 +92,7 @@ 'selector': { pattern: /=\d+|[^{}:=,\s]+/, inside: { - 'keyword': /^(?:zero|one|two|few|many|other)$/ + 'keyword': /^(?:few|many|one|other|two|zero)$/ } } } @@ -113,7 +113,7 @@ }, 'keyword': /\b(?:choice|plural|select|selectordinal)\b/, 'arg-type': { - pattern: /\b(?:number|date|time|spellout|ordinal|duration)\b/, + pattern: /\b(?:date|duration|number|ordinal|spellout|time)\b/, alias: 'keyword' }, 'arg-skeleton': { @@ -121,7 +121,7 @@ lookbehind: true }, 'arg-style': { - pattern: /(,\s*)(?:short|medium|long|full|integer|currency|percent)(?=\s*$)/, + pattern: /(,\s*)(?:currency|full|integer|long|medium|percent|short)(?=\s*$)/, lookbehind: true }, 'arg-style-text': { diff --git a/components/prism-icu-message-format.min.js b/components/prism-icu-message-format.min.js index a00d626e34..7849a573ff 100644 --- a/components/prism-icu-message-format.min.js +++ b/components/prism-icu-message-format.min.js @@ -1 +1 @@ -!function(e){function s(e,t){return t<=0?"[]":e.replace(//g,function(){return s(e,t-1)})}var t=/'[{}:=,](?:[^']|'')*'(?!')/,n={pattern:/''/,greedy:!0,alias:"operator"},r={pattern:t,greedy:!0,inside:{escape:n}},a=s("\\{(?:[^{}']|'(?![{},'])|''||)*\\}".replace(//g,function(){return t.source}),8),i={pattern:RegExp(a),inside:{message:{pattern:/^(\{)[\s\S]+(?=\}$)/,lookbehind:!0,inside:null},"message-delimiter":{pattern:/./,alias:"punctuation"}}};e.languages["icu-message-format"]={argument:{pattern:RegExp(a),greedy:!0,inside:{content:{pattern:/^(\{)[\s\S]+(?=\}$)/,lookbehind:!0,inside:{"argument-name":{pattern:/^(\s*)[^{}:=,\s]+/,lookbehind:!0},"choice-style":{pattern:/^(\s*,\s*choice\s*,\s*)\S(?:[\s\S]*\S)?/,lookbehind:!0,inside:{punctuation:/\|/,range:{pattern:/^(\s*)[+-]?(?:\d+(?:\.\d*)?|\u221e)\s*[<#\u2264]/,lookbehind:!0,inside:{operator:/[<#\u2264]/,number:/\S+/}},rest:null}},"plural-style":{pattern:/^(\s*,\s*(?:plural|selectordinal)\s*,\s*)\S(?:[\s\S]*\S)?/,lookbehind:!0,inside:{offset:/^offset:\s*\d+/,"nested-message":i,selector:{pattern:/=\d+|[^{}:=,\s]+/,inside:{keyword:/^(?:zero|one|two|few|many|other)$/}}}},"select-style":{pattern:/^(\s*,\s*select\s*,\s*)\S(?:[\s\S]*\S)?/,lookbehind:!0,inside:{"nested-message":i,selector:{pattern:/[^{}:=,\s]+/,inside:{keyword:/^other$/}}}},keyword:/\b(?:choice|plural|select|selectordinal)\b/,"arg-type":{pattern:/\b(?:number|date|time|spellout|ordinal|duration)\b/,alias:"keyword"},"arg-skeleton":{pattern:/(,\s*)::[^{}:=,\s]+/,lookbehind:!0},"arg-style":{pattern:/(,\s*)(?:short|medium|long|full|integer|currency|percent)(?=\s*$)/,lookbehind:!0},"arg-style-text":{pattern:RegExp("(^\\s*,\\s*(?=\\S))"+s("(?:[^{}']|'[^']*'|\\{(?:)?\\})+",8)+"$"),lookbehind:!0,alias:"string"},punctuation:/,/}},"argument-delimiter":{pattern:/./,alias:"operator"}}},escape:n,string:r},i.inside.message.inside=e.languages["icu-message-format"],e.languages["icu-message-format"].argument.inside.content.inside["choice-style"].inside.rest=e.languages["icu-message-format"]}(Prism); \ No newline at end of file +!function(e){function s(e,t){return t<=0?"[]":e.replace(//g,function(){return s(e,t-1)})}var t=/'[{}:=,](?:[^']|'')*'(?!')/,n={pattern:/''/,greedy:!0,alias:"operator"},r={pattern:t,greedy:!0,inside:{escape:n}},a=s("\\{(?:[^{}']|'(?![{},'])|''||)*\\}".replace(//g,function(){return t.source}),8),i={pattern:RegExp(a),inside:{message:{pattern:/^(\{)[\s\S]+(?=\}$)/,lookbehind:!0,inside:null},"message-delimiter":{pattern:/./,alias:"punctuation"}}};e.languages["icu-message-format"]={argument:{pattern:RegExp(a),greedy:!0,inside:{content:{pattern:/^(\{)[\s\S]+(?=\}$)/,lookbehind:!0,inside:{"argument-name":{pattern:/^(\s*)[^{}:=,\s]+/,lookbehind:!0},"choice-style":{pattern:/^(\s*,\s*choice\s*,\s*)\S(?:[\s\S]*\S)?/,lookbehind:!0,inside:{punctuation:/\|/,range:{pattern:/^(\s*)[+-]?(?:\d+(?:\.\d*)?|\u221e)\s*[<#\u2264]/,lookbehind:!0,inside:{operator:/[<#\u2264]/,number:/\S+/}},rest:null}},"plural-style":{pattern:/^(\s*,\s*(?:plural|selectordinal)\s*,\s*)\S(?:[\s\S]*\S)?/,lookbehind:!0,inside:{offset:/^offset:\s*\d+/,"nested-message":i,selector:{pattern:/=\d+|[^{}:=,\s]+/,inside:{keyword:/^(?:few|many|one|other|two|zero)$/}}}},"select-style":{pattern:/^(\s*,\s*select\s*,\s*)\S(?:[\s\S]*\S)?/,lookbehind:!0,inside:{"nested-message":i,selector:{pattern:/[^{}:=,\s]+/,inside:{keyword:/^other$/}}}},keyword:/\b(?:choice|plural|select|selectordinal)\b/,"arg-type":{pattern:/\b(?:date|duration|number|ordinal|spellout|time)\b/,alias:"keyword"},"arg-skeleton":{pattern:/(,\s*)::[^{}:=,\s]+/,lookbehind:!0},"arg-style":{pattern:/(,\s*)(?:currency|full|integer|long|medium|percent|short)(?=\s*$)/,lookbehind:!0},"arg-style-text":{pattern:RegExp("(^\\s*,\\s*(?=\\S))"+s("(?:[^{}']|'[^']*'|\\{(?:)?\\})+",8)+"$"),lookbehind:!0,alias:"string"},punctuation:/,/}},"argument-delimiter":{pattern:/./,alias:"operator"}}},escape:n,string:r},i.inside.message.inside=e.languages["icu-message-format"],e.languages["icu-message-format"].argument.inside.content.inside["choice-style"].inside.rest=e.languages["icu-message-format"]}(Prism); \ No newline at end of file diff --git a/components/prism-iecst.js b/components/prism-iecst.js index 6b3eb24404..4456ad31c3 100644 --- a/components/prism-iecst.js +++ b/components/prism-iecst.js @@ -14,14 +14,14 @@ Prism.languages.iecst = { pattern: /(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/, greedy: true, }, - 'class-name': /\b(?:END_)?(?:PROGRAM|CONFIGURATION|INTERFACE|FUNCTION_BLOCK|FUNCTION|ACTION|TRANSITION|TYPE|STRUCT|(?:INITIAL_)?STEP|NAMESPACE|LIBRARY|CHANNEL|FOLDER|RESOURCE|VAR_(?:GLOBAL|INPUT|PUTPUT|IN_OUT|ACCESS|TEMP|EXTERNAL|CONFIG)|VAR|METHOD|PROPERTY)\b/i, - 'keyword': /\b(?:(?:END_)?(?:IF|WHILE|REPEAT|CASE|FOR)|ELSE|FROM|THEN|ELSIF|DO|TO|BY|PRIVATE|PUBLIC|PROTECTED|CONSTANT|RETURN|EXIT|CONTINUE|GOTO|JMP|AT|RETAIN|NON_RETAIN|TASK|WITH|UNTIL|USING|EXTENDS|IMPLEMENTS|GET|SET|__TRY|__CATCH|__FINALLY|__ENDTRY)\b/, - 'variable': /\b(?:AT|BOOL|BYTE|(?:D|L)?WORD|U?(?:S|D|L)?INT|L?REAL|TIME(?:_OF_DAY)?|TOD|DT|DATE(?:_AND_TIME)?|STRING|ARRAY|ANY|POINTER)\b/, + 'class-name': /\b(?:END_)?(?:PROGRAM|CONFIGURATION|INTERFACE|FUNCTION_BLOCK|FUNCTION|ACTION|TRANSITION|TYPE|STRUCT|(?:INITIAL_)?STEP|NAMESPACE|LIBRARY|CHANNEL|FOLDER|RESOURCE|VAR_(?:ACCESS|CONFIG|EXTERNAL|GLOBAL|INPUT|IN_OUT|PUTPUT|TEMP)|VAR|METHOD|PROPERTY)\b/i, + 'keyword': /\b(?:AT|BY|(?:END_)?(?:CASE|FOR|IF|REPEAT|WHILE)|CONSTANT|CONTINUE|DO|ELSE|ELSIF|EXIT|EXTENDS|FROM|GET|GOTO|IMPLEMENTS|JMP|NON_RETAIN|PRIVATE|PROTECTED|PUBLIC|RETAIN|RETURN|SET|TASK|THEN|TO|UNTIL|USING|WITH|__CATCH|__ENDTRY|__FINALLY|__TRY)\b/, + 'variable': /\b(?:ANY|ARRAY|AT|BOOL|BYTE|U?(?:D|L|S)?INT|(?:D|L)?WORD|DATE(?:_AND_TIME)?|DT|L?REAL|POINTER|STRING|TIME(?:_OF_DAY)?|TOD)\b/, 'symbol': /%[IQM][XBWDL][\d.]*|%[IQ][\d.]*/, - 'number': /\b(?:16#[\da-f]+|2#[01_]+|0x[\da-f]+)\b|\b(?:T|D|DT|TOD)#[\d_shmd:]*|\b[A-Z]*#[\d.,_]*|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i, - 'boolean': /\b(?:TRUE|FALSE|NULL)\b/, + 'number': /\b(?:16#[\da-f]+|2#[01_]+|0x[\da-f]+)\b|\b(?:D|DT|T|TOD)#[\d_shmd:]*|\b[A-Z]*#[\d.,_]*|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i, + 'boolean': /\b(?:FALSE|NULL|TRUE)\b/, 'function': /\w+(?=\()/, - 'operator': /(?:S?R?:?=>?|&&?|\*\*?|<=?|>=?|[-:^/+])|\b(?:OR|AND|MOD|NOT|XOR|LE|GE|EQ|NE|GT|LT)\b/, + 'operator': /(?:S?R?:?=>?|&&?|\*\*?|<=?|>=?|[-:^/+])|\b(?:AND|EQ|GE|GT|LE|LT|MOD|NE|NOT|OR|XOR)\b/, 'punctuation': /[();]/, 'type': { 'pattern': /#/, diff --git a/components/prism-iecst.min.js b/components/prism-iecst.min.js index a97acf04c0..97757be8da 100644 --- a/components/prism-iecst.min.js +++ b/components/prism-iecst.min.js @@ -1 +1 @@ -Prism.languages.iecst={comment:[{pattern:/(^|[^\\])(?:\/\*[\s\S]*?(?:\*\/|$)|\(\*[\s\S]*?(?:\*\)|$)|\{[\s\S]*?(?:\}|$))/,lookbehind:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":/\b(?:END_)?(?:PROGRAM|CONFIGURATION|INTERFACE|FUNCTION_BLOCK|FUNCTION|ACTION|TRANSITION|TYPE|STRUCT|(?:INITIAL_)?STEP|NAMESPACE|LIBRARY|CHANNEL|FOLDER|RESOURCE|VAR_(?:GLOBAL|INPUT|PUTPUT|IN_OUT|ACCESS|TEMP|EXTERNAL|CONFIG)|VAR|METHOD|PROPERTY)\b/i,keyword:/\b(?:(?:END_)?(?:IF|WHILE|REPEAT|CASE|FOR)|ELSE|FROM|THEN|ELSIF|DO|TO|BY|PRIVATE|PUBLIC|PROTECTED|CONSTANT|RETURN|EXIT|CONTINUE|GOTO|JMP|AT|RETAIN|NON_RETAIN|TASK|WITH|UNTIL|USING|EXTENDS|IMPLEMENTS|GET|SET|__TRY|__CATCH|__FINALLY|__ENDTRY)\b/,variable:/\b(?:AT|BOOL|BYTE|(?:D|L)?WORD|U?(?:S|D|L)?INT|L?REAL|TIME(?:_OF_DAY)?|TOD|DT|DATE(?:_AND_TIME)?|STRING|ARRAY|ANY|POINTER)\b/,symbol:/%[IQM][XBWDL][\d.]*|%[IQ][\d.]*/,number:/\b(?:16#[\da-f]+|2#[01_]+|0x[\da-f]+)\b|\b(?:T|D|DT|TOD)#[\d_shmd:]*|\b[A-Z]*#[\d.,_]*|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,boolean:/\b(?:TRUE|FALSE|NULL)\b/,function:/\w+(?=\()/,operator:/(?:S?R?:?=>?|&&?|\*\*?|<=?|>=?|[-:^/+])|\b(?:OR|AND|MOD|NOT|XOR|LE|GE|EQ|NE|GT|LT)\b/,punctuation:/[();]/,type:{pattern:/#/,alias:"selector"}}; \ No newline at end of file +Prism.languages.iecst={comment:[{pattern:/(^|[^\\])(?:\/\*[\s\S]*?(?:\*\/|$)|\(\*[\s\S]*?(?:\*\)|$)|\{[\s\S]*?(?:\}|$))/,lookbehind:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":/\b(?:END_)?(?:PROGRAM|CONFIGURATION|INTERFACE|FUNCTION_BLOCK|FUNCTION|ACTION|TRANSITION|TYPE|STRUCT|(?:INITIAL_)?STEP|NAMESPACE|LIBRARY|CHANNEL|FOLDER|RESOURCE|VAR_(?:ACCESS|CONFIG|EXTERNAL|GLOBAL|INPUT|IN_OUT|PUTPUT|TEMP)|VAR|METHOD|PROPERTY)\b/i,keyword:/\b(?:AT|BY|(?:END_)?(?:CASE|FOR|IF|REPEAT|WHILE)|CONSTANT|CONTINUE|DO|ELSE|ELSIF|EXIT|EXTENDS|FROM|GET|GOTO|IMPLEMENTS|JMP|NON_RETAIN|PRIVATE|PROTECTED|PUBLIC|RETAIN|RETURN|SET|TASK|THEN|TO|UNTIL|USING|WITH|__CATCH|__ENDTRY|__FINALLY|__TRY)\b/,variable:/\b(?:ANY|ARRAY|AT|BOOL|BYTE|U?(?:D|L|S)?INT|(?:D|L)?WORD|DATE(?:_AND_TIME)?|DT|L?REAL|POINTER|STRING|TIME(?:_OF_DAY)?|TOD)\b/,symbol:/%[IQM][XBWDL][\d.]*|%[IQ][\d.]*/,number:/\b(?:16#[\da-f]+|2#[01_]+|0x[\da-f]+)\b|\b(?:D|DT|T|TOD)#[\d_shmd:]*|\b[A-Z]*#[\d.,_]*|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/,function:/\w+(?=\()/,operator:/(?:S?R?:?=>?|&&?|\*\*?|<=?|>=?|[-:^/+])|\b(?:AND|EQ|GE|GT|LE|LT|MOD|NE|NOT|OR|XOR)\b/,punctuation:/[();]/,type:{pattern:/#/,alias:"selector"}}; \ No newline at end of file diff --git a/components/prism-inform7.js b/components/prism-inform7.js index 7e193448e3..1c63d7a5a3 100644 --- a/components/prism-inform7.js +++ b/components/prism-inform7.js @@ -19,24 +19,24 @@ Prism.languages.inform7 = { greedy: true }, 'title': { - pattern: /^[ \t]*(?:volume|book|part(?! of)|chapter|section|table)\b.+/im, + pattern: /^[ \t]*(?:book|chapter|part(?! of)|section|table|volume)\b.+/im, alias: 'important' }, 'number': { - pattern: /(^|[^-])(?:\b\d+(?:\.\d+)?(?:\^\d+)?(?:(?!\d)\w+)?|\b(?:one|two|three|four|five|six|seven|eight|nine|ten|eleven|twelve))\b(?!-)/i, + pattern: /(^|[^-])(?:\b\d+(?:\.\d+)?(?:\^\d+)?(?:(?!\d)\w+)?|\b(?:eight|eleven|five|four|nine|one|seven|six|ten|three|twelve|two))\b(?!-)/i, lookbehind: true }, 'verb': { - pattern: /(^|[^-])\b(?:applying to|are|attacking|answering|asking|be(?:ing)?|burning|buying|called|carries|carry(?! out)|carrying|climbing|closing|conceal(?:s|ing)?|consulting|contain(?:s|ing)?|cutting|drinking|dropping|eating|enclos(?:es?|ing)|entering|examining|exiting|getting|giving|going|ha(?:ve|s|ving)|hold(?:s|ing)?|impl(?:y|ies)|incorporat(?:es?|ing)|inserting|is|jumping|kissing|listening|locking|looking|mean(?:s|ing)?|opening|provid(?:es?|ing)|pulling|pushing|putting|relat(?:es?|ing)|removing|searching|see(?:s|ing)?|setting|showing|singing|sleeping|smelling|squeezing|switching|support(?:s|ing)?|swearing|taking|tasting|telling|thinking|throwing|touching|turning|tying|unlock(?:s|ing)?|var(?:y|ies|ying)|waiting|waking|waving|wear(?:s|ing)?)\b(?!-)/i, + pattern: /(^|[^-])\b(?:answering|applying to|are|asking|attacking|be(?:ing)?|burning|buying|called|carries|carry(?! out)|carrying|climbing|closing|conceal(?:ing|s)?|consulting|contain(?:ing|s)?|cutting|drinking|dropping|eating|enclos(?:es?|ing)|entering|examining|exiting|getting|giving|going|ha(?:s|ve|ving)|hold(?:ing|s)?|impl(?:ies|y)|incorporat(?:es?|ing)|inserting|is|jumping|kissing|listening|locking|looking|mean(?:ing|s)?|opening|provid(?:es?|ing)|pulling|pushing|putting|relat(?:es?|ing)|removing|searching|see(?:ing|s)?|setting|showing|singing|sleeping|smelling|squeezing|support(?:ing|s)?|swearing|switching|taking|tasting|telling|thinking|throwing|touching|turning|tying|unlock(?:ing|s)?|var(?:ies|y|ying)|waiting|waking|waving|wear(?:ing|s)?)\b(?!-)/i, lookbehind: true, alias: 'operator' }, 'keyword': { - pattern: /(^|[^-])\b(?:after|before|carry out|check|continue the action|definition(?= *:)|do nothing|else|end (?:if|unless|the story)|every turn|if|include|instead(?: of)?|let|move|no|now|otherwise|repeat|report|resume the story|rule for|running through|say(?:ing)?|stop the action|test|try(?:ing)?|understand|unless|use|when|while|yes)\b(?!-)/i, + pattern: /(^|[^-])\b(?:after|before|carry out|check|continue the action|definition(?= *:)|do nothing|else|end (?:if|the story|unless)|every turn|if|include|instead(?: of)?|let|move|no|now|otherwise|repeat|report|resume the story|rule for|running through|say(?:ing)?|stop the action|test|try(?:ing)?|understand|unless|use|when|while|yes)\b(?!-)/i, lookbehind: true }, 'property': { - pattern: /(^|[^-])\b(?:adjacent(?! to)|carried|closed|concealed|contained|dark|described|edible|empty|enclosed|enterable|even|female|fixed in place|full|handled|held|improper-named|incorporated|inedible|invisible|lighted|lit|lock(?:able|ed)|male|marked for listing|mentioned|negative|neuter|non-(?:empty|full|recurring)|odd|opaque|open(?:able)?|plural-named|portable|positive|privately-named|proper-named|provided|publically-named|pushable between rooms|recurring|related|rubbing|scenery|seen|singular-named|supported|swinging|switch(?:able|ed(?: on| off)?)|touch(?:able|ed)|transparent|unconcealed|undescribed|unlit|unlocked|unmarked for listing|unmentioned|unopenable|untouchable|unvisited|variable|visible|visited|wearable|worn)\b(?!-)/i, + pattern: /(^|[^-])\b(?:adjacent(?! to)|carried|closed|concealed|contained|dark|described|edible|empty|enclosed|enterable|even|female|fixed in place|full|handled|held|improper-named|incorporated|inedible|invisible|lighted|lit|lock(?:able|ed)|male|marked for listing|mentioned|negative|neuter|non-(?:empty|full|recurring)|odd|opaque|open(?:able)?|plural-named|portable|positive|privately-named|proper-named|provided|publically-named|pushable between rooms|recurring|related|rubbing|scenery|seen|singular-named|supported|swinging|switch(?:able|ed(?: off| on)?)|touch(?:able|ed)|transparent|unconcealed|undescribed|unlit|unlocked|unmarked for listing|unmentioned|unopenable|untouchable|unvisited|variable|visible|visited|wearable|worn)\b(?!-)/i, lookbehind: true, alias: 'symbol' }, @@ -46,7 +46,7 @@ Prism.languages.inform7 = { alias: 'keyword' }, 'type': { - pattern: /(^|[^-])\b(?:actions?|activit(?:y|ies)|actors?|animals?|backdrops?|containers?|devices?|directions?|doors?|holders?|kinds?|lists?|m[ae]n|nobody|nothing|nouns?|numbers?|objects?|people|persons?|player(?:'s holdall)?|regions?|relations?|rooms?|rule(?:book)?s?|scenes?|someone|something|supporters?|tables?|texts?|things?|time|vehicles?|wom[ae]n)\b(?!-)/i, + pattern: /(^|[^-])\b(?:actions?|activit(?:ies|y)|actors?|animals?|backdrops?|containers?|devices?|directions?|doors?|holders?|kinds?|lists?|m[ae]n|nobody|nothing|nouns?|numbers?|objects?|people|persons?|player(?:'s holdall)?|regions?|relations?|rooms?|rule(?:book)?s?|scenes?|someone|something|supporters?|tables?|texts?|things?|time|vehicles?|wom[ae]n)\b(?!-)/i, lookbehind: true, alias: 'variable' }, diff --git a/components/prism-inform7.min.js b/components/prism-inform7.min.js index 3a243ff30d..cffd948555 100644 --- a/components/prism-inform7.min.js +++ b/components/prism-inform7.min.js @@ -1 +1 @@ -Prism.languages.inform7={string:{pattern:/"[^"]*"/,inside:{substitution:{pattern:/\[[^\[\]]+\]/,inside:{delimiter:{pattern:/\[|\]/,alias:"punctuation"}}}}},comment:{pattern:/\[[^\[\]]+\]/,greedy:!0},title:{pattern:/^[ \t]*(?:volume|book|part(?! of)|chapter|section|table)\b.+/im,alias:"important"},number:{pattern:/(^|[^-])(?:\b\d+(?:\.\d+)?(?:\^\d+)?(?:(?!\d)\w+)?|\b(?:one|two|three|four|five|six|seven|eight|nine|ten|eleven|twelve))\b(?!-)/i,lookbehind:!0},verb:{pattern:/(^|[^-])\b(?:applying to|are|attacking|answering|asking|be(?:ing)?|burning|buying|called|carries|carry(?! out)|carrying|climbing|closing|conceal(?:s|ing)?|consulting|contain(?:s|ing)?|cutting|drinking|dropping|eating|enclos(?:es?|ing)|entering|examining|exiting|getting|giving|going|ha(?:ve|s|ving)|hold(?:s|ing)?|impl(?:y|ies)|incorporat(?:es?|ing)|inserting|is|jumping|kissing|listening|locking|looking|mean(?:s|ing)?|opening|provid(?:es?|ing)|pulling|pushing|putting|relat(?:es?|ing)|removing|searching|see(?:s|ing)?|setting|showing|singing|sleeping|smelling|squeezing|switching|support(?:s|ing)?|swearing|taking|tasting|telling|thinking|throwing|touching|turning|tying|unlock(?:s|ing)?|var(?:y|ies|ying)|waiting|waking|waving|wear(?:s|ing)?)\b(?!-)/i,lookbehind:!0,alias:"operator"},keyword:{pattern:/(^|[^-])\b(?:after|before|carry out|check|continue the action|definition(?= *:)|do nothing|else|end (?:if|unless|the story)|every turn|if|include|instead(?: of)?|let|move|no|now|otherwise|repeat|report|resume the story|rule for|running through|say(?:ing)?|stop the action|test|try(?:ing)?|understand|unless|use|when|while|yes)\b(?!-)/i,lookbehind:!0},property:{pattern:/(^|[^-])\b(?:adjacent(?! to)|carried|closed|concealed|contained|dark|described|edible|empty|enclosed|enterable|even|female|fixed in place|full|handled|held|improper-named|incorporated|inedible|invisible|lighted|lit|lock(?:able|ed)|male|marked for listing|mentioned|negative|neuter|non-(?:empty|full|recurring)|odd|opaque|open(?:able)?|plural-named|portable|positive|privately-named|proper-named|provided|publically-named|pushable between rooms|recurring|related|rubbing|scenery|seen|singular-named|supported|swinging|switch(?:able|ed(?: on| off)?)|touch(?:able|ed)|transparent|unconcealed|undescribed|unlit|unlocked|unmarked for listing|unmentioned|unopenable|untouchable|unvisited|variable|visible|visited|wearable|worn)\b(?!-)/i,lookbehind:!0,alias:"symbol"},position:{pattern:/(^|[^-])\b(?:above|adjacent to|back side of|below|between|down|east|everywhere|front side|here|in|inside(?: from)?|north(?:east|west)?|nowhere|on(?: top of)?|other side|outside(?: from)?|parts? of|regionally in|south(?:east|west)?|through|up|west|within)\b(?!-)/i,lookbehind:!0,alias:"keyword"},type:{pattern:/(^|[^-])\b(?:actions?|activit(?:y|ies)|actors?|animals?|backdrops?|containers?|devices?|directions?|doors?|holders?|kinds?|lists?|m[ae]n|nobody|nothing|nouns?|numbers?|objects?|people|persons?|player(?:'s holdall)?|regions?|relations?|rooms?|rule(?:book)?s?|scenes?|someone|something|supporters?|tables?|texts?|things?|time|vehicles?|wom[ae]n)\b(?!-)/i,lookbehind:!0,alias:"variable"},punctuation:/[.,:;(){}]/},Prism.languages.inform7.string.inside.substitution.inside.rest=Prism.languages.inform7,Prism.languages.inform7.string.inside.substitution.inside.rest.text={pattern:/\S(?:\s*\S)*/,alias:"comment"}; \ No newline at end of file +Prism.languages.inform7={string:{pattern:/"[^"]*"/,inside:{substitution:{pattern:/\[[^\[\]]+\]/,inside:{delimiter:{pattern:/\[|\]/,alias:"punctuation"}}}}},comment:{pattern:/\[[^\[\]]+\]/,greedy:!0},title:{pattern:/^[ \t]*(?:book|chapter|part(?! of)|section|table|volume)\b.+/im,alias:"important"},number:{pattern:/(^|[^-])(?:\b\d+(?:\.\d+)?(?:\^\d+)?(?:(?!\d)\w+)?|\b(?:eight|eleven|five|four|nine|one|seven|six|ten|three|twelve|two))\b(?!-)/i,lookbehind:!0},verb:{pattern:/(^|[^-])\b(?:answering|applying to|are|asking|attacking|be(?:ing)?|burning|buying|called|carries|carry(?! out)|carrying|climbing|closing|conceal(?:ing|s)?|consulting|contain(?:ing|s)?|cutting|drinking|dropping|eating|enclos(?:es?|ing)|entering|examining|exiting|getting|giving|going|ha(?:s|ve|ving)|hold(?:ing|s)?|impl(?:ies|y)|incorporat(?:es?|ing)|inserting|is|jumping|kissing|listening|locking|looking|mean(?:ing|s)?|opening|provid(?:es?|ing)|pulling|pushing|putting|relat(?:es?|ing)|removing|searching|see(?:ing|s)?|setting|showing|singing|sleeping|smelling|squeezing|support(?:ing|s)?|swearing|switching|taking|tasting|telling|thinking|throwing|touching|turning|tying|unlock(?:ing|s)?|var(?:ies|y|ying)|waiting|waking|waving|wear(?:ing|s)?)\b(?!-)/i,lookbehind:!0,alias:"operator"},keyword:{pattern:/(^|[^-])\b(?:after|before|carry out|check|continue the action|definition(?= *:)|do nothing|else|end (?:if|the story|unless)|every turn|if|include|instead(?: of)?|let|move|no|now|otherwise|repeat|report|resume the story|rule for|running through|say(?:ing)?|stop the action|test|try(?:ing)?|understand|unless|use|when|while|yes)\b(?!-)/i,lookbehind:!0},property:{pattern:/(^|[^-])\b(?:adjacent(?! to)|carried|closed|concealed|contained|dark|described|edible|empty|enclosed|enterable|even|female|fixed in place|full|handled|held|improper-named|incorporated|inedible|invisible|lighted|lit|lock(?:able|ed)|male|marked for listing|mentioned|negative|neuter|non-(?:empty|full|recurring)|odd|opaque|open(?:able)?|plural-named|portable|positive|privately-named|proper-named|provided|publically-named|pushable between rooms|recurring|related|rubbing|scenery|seen|singular-named|supported|swinging|switch(?:able|ed(?: off| on)?)|touch(?:able|ed)|transparent|unconcealed|undescribed|unlit|unlocked|unmarked for listing|unmentioned|unopenable|untouchable|unvisited|variable|visible|visited|wearable|worn)\b(?!-)/i,lookbehind:!0,alias:"symbol"},position:{pattern:/(^|[^-])\b(?:above|adjacent to|back side of|below|between|down|east|everywhere|front side|here|in|inside(?: from)?|north(?:east|west)?|nowhere|on(?: top of)?|other side|outside(?: from)?|parts? of|regionally in|south(?:east|west)?|through|up|west|within)\b(?!-)/i,lookbehind:!0,alias:"keyword"},type:{pattern:/(^|[^-])\b(?:actions?|activit(?:ies|y)|actors?|animals?|backdrops?|containers?|devices?|directions?|doors?|holders?|kinds?|lists?|m[ae]n|nobody|nothing|nouns?|numbers?|objects?|people|persons?|player(?:'s holdall)?|regions?|relations?|rooms?|rule(?:book)?s?|scenes?|someone|something|supporters?|tables?|texts?|things?|time|vehicles?|wom[ae]n)\b(?!-)/i,lookbehind:!0,alias:"variable"},punctuation:/[.,:;(){}]/},Prism.languages.inform7.string.inside.substitution.inside.rest=Prism.languages.inform7,Prism.languages.inform7.string.inside.substitution.inside.rest.text={pattern:/\S(?:\s*\S)*/,alias:"comment"}; \ No newline at end of file diff --git a/components/prism-io.js b/components/prism-io.js index 71ef8e12e5..dc8093651a 100644 --- a/components/prism-io.js +++ b/components/prism-io.js @@ -22,10 +22,10 @@ Prism.languages.io = { pattern: /"(?:\\.|[^\\\r\n"])*"/, greedy: true }, - 'keyword': /\b(?:activate|activeCoroCount|asString|block|break|catch|clone|collectGarbage|compileString|continue|do|doFile|doMessage|doString|else|elseif|exit|for|foreach|forward|getSlot|getEnvironmentVariable|hasSlot|if|ifFalse|ifNil|ifNilEval|ifTrue|isActive|isNil|isResumable|list|message|method|parent|pass|pause|perform|performWithArgList|print|println|proto|raise|raiseResumable|removeSlot|resend|resume|schedulerSleepSeconds|self|sender|setSchedulerSleepSeconds|setSlot|shallowCopy|slotNames|super|system|then|thisBlock|thisContext|call|try|type|uniqueId|updateSlot|wait|while|write|yield)\b/, - 'builtin': /\b(?:Array|AudioDevice|AudioMixer|Block|Box|Buffer|CFunction|CGI|Color|Curses|DBM|DNSResolver|DOConnection|DOProxy|DOServer|Date|Directory|Duration|DynLib|Error|Exception|FFT|File|Fnmatch|Font|Future|GL|GLE|GLScissor|GLU|GLUCylinder|GLUQuadric|GLUSphere|GLUT|Host|Image|Importer|LinkList|List|Lobby|Locals|MD5|MP3Decoder|MP3Encoder|Map|Message|Movie|Notification|Number|Object|OpenGL|Point|Protos|Regex|SGML|SGMLElement|SGMLParser|SQLite|Server|Sequence|ShowMessage|SleepyCat|SleepyCatCursor|Socket|SocketManager|Sound|Soup|Store|String|Tree|UDPSender|UPDReceiver|URL|User|Warning|WeakLink|Random|BigNum)\b/, - 'boolean': /\b(?:true|false|nil)\b/, + 'keyword': /\b(?:activate|activeCoroCount|asString|block|break|call|catch|clone|collectGarbage|compileString|continue|do|doFile|doMessage|doString|else|elseif|exit|for|foreach|forward|getEnvironmentVariable|getSlot|hasSlot|if|ifFalse|ifNil|ifNilEval|ifTrue|isActive|isNil|isResumable|list|message|method|parent|pass|pause|perform|performWithArgList|print|println|proto|raise|raiseResumable|removeSlot|resend|resume|schedulerSleepSeconds|self|sender|setSchedulerSleepSeconds|setSlot|shallowCopy|slotNames|super|system|then|thisBlock|thisContext|try|type|uniqueId|updateSlot|wait|while|write|yield)\b/, + 'builtin': /\b(?:Array|AudioDevice|AudioMixer|BigNum|Block|Box|Buffer|CFunction|CGI|Color|Curses|DBM|DNSResolver|DOConnection|DOProxy|DOServer|Date|Directory|Duration|DynLib|Error|Exception|FFT|File|Fnmatch|Font|Future|GL|GLE|GLScissor|GLU|GLUCylinder|GLUQuadric|GLUSphere|GLUT|Host|Image|Importer|LinkList|List|Lobby|Locals|MD5|MP3Decoder|MP3Encoder|Map|Message|Movie|Notification|Number|Object|OpenGL|Point|Protos|Random|Regex|SGML|SGMLElement|SGMLParser|SQLite|Sequence|Server|ShowMessage|SleepyCat|SleepyCatCursor|Socket|SocketManager|Sound|Soup|Store|String|Tree|UDPSender|UPDReceiver|URL|User|Warning|WeakLink)\b/, + 'boolean': /\b(?:false|nil|true)\b/, 'number': /\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e-?\d+)?/i, - 'operator': /[=!*/%+\-^&|]=|>>?=?|<>?=?|<>?=?|<>?=?|<+*\-%$|,#][.:]?|[?^]\.?|[;\[]:?|[~}"i][.:]|[ACeEIjLor]\.|(?:[_\/\\qsux]|_?\d):)/, alias: 'keyword' }, - 'number': /\b_?(?:(?!\d:)\d+(?:\.\d+)?(?:(?:[ejpx]|ad|ar)_?\d+(?:\.\d+)?)*(?:b_?[\da-z]+(?:\.[\da-z]+)?)?|_\b(?!\.))/, + 'number': /\b_?(?:(?!\d:)\d+(?:\.\d+)?(?:(?:ad|ar|[ejpx])_?\d+(?:\.\d+)?)*(?:b_?[\da-z]+(?:\.[\da-z]+)?)?|_\b(?!\.))/, 'adverb': { pattern: /[~}]|[\/\\]\.?|[bfM]\.|t[.:]/, alias: 'builtin' diff --git a/components/prism-j.min.js b/components/prism-j.min.js index a7b71721ca..e768387103 100644 --- a/components/prism-j.min.js +++ b/components/prism-j.min.js @@ -1 +1 @@ -Prism.languages.j={comment:/\bNB\..*/,string:{pattern:/'(?:''|[^'\r\n])*'/,greedy:!0},keyword:/\b(?:(?:adverb|conjunction|CR|def|define|dyad|LF|monad|noun|verb)\b|(?:assert|break|case|catch[dt]?|continue|do|else|elseif|end|fcase|for|for_\w+|goto_\w+|if|label_\w+|return|select|throw|try|while|whilst)\.)/,verb:{pattern:/(?!\^:|;\.|[=!][.:])(?:\{(?:\.|::?)?|p(?:\.\.?|:)|[=!\]]|[<>+*\-%$|,#][.:]?|[?^]\.?|[;\[]:?|[~}"i][.:]|[ACeEIjLor]\.|(?:[_\/\\qsux]|_?\d):)/,alias:"keyword"},number:/\b_?(?:(?!\d:)\d+(?:\.\d+)?(?:(?:[ejpx]|ad|ar)_?\d+(?:\.\d+)?)*(?:b_?[\da-z]+(?:\.[\da-z]+)?)?|_\b(?!\.))/,adverb:{pattern:/[~}]|[\/\\]\.?|[bfM]\.|t[.:]/,alias:"builtin"},operator:/[=a][.:]|_\./,conjunction:{pattern:/&(?:\.:?|:)?|[.:@][.:]?|[!D][.:]|[;dHT]\.|`:?|[\^LS]:|"/,alias:"variable"},punctuation:/[()]/}; \ No newline at end of file +Prism.languages.j={comment:/\bNB\..*/,string:{pattern:/'(?:''|[^'\r\n])*'/,greedy:!0},keyword:/\b(?:(?:CR|LF|adverb|conjunction|def|define|dyad|monad|noun|verb)\b|(?:assert|break|case|catch[dt]?|continue|do|else|elseif|end|fcase|for|for_\w+|goto_\w+|if|label_\w+|return|select|throw|try|while|whilst)\.)/,verb:{pattern:/(?!\^:|;\.|[=!][.:])(?:\{(?:\.|::?)?|p(?:\.\.?|:)|[=!\]]|[<>+*\-%$|,#][.:]?|[?^]\.?|[;\[]:?|[~}"i][.:]|[ACeEIjLor]\.|(?:[_\/\\qsux]|_?\d):)/,alias:"keyword"},number:/\b_?(?:(?!\d:)\d+(?:\.\d+)?(?:(?:ad|ar|[ejpx])_?\d+(?:\.\d+)?)*(?:b_?[\da-z]+(?:\.[\da-z]+)?)?|_\b(?!\.))/,adverb:{pattern:/[~}]|[\/\\]\.?|[bfM]\.|t[.:]/,alias:"builtin"},operator:/[=a][.:]|_\./,conjunction:{pattern:/&(?:\.:?|:)?|[.:@][.:]?|[!D][.:]|[;dHT]\.|`:?|[\^LS]:|"/,alias:"variable"},punctuation:/[()]/}; \ No newline at end of file diff --git a/components/prism-javadoc.js b/components/prism-javadoc.js index 38b51ccf70..c16a1c1479 100644 --- a/components/prism-javadoc.js +++ b/components/prism-javadoc.js @@ -8,7 +8,7 @@ Prism.languages.javadoc = Prism.languages.extend('javadoclike', {}); Prism.languages.insertBefore('javadoc', 'keyword', { 'reference': { - pattern: RegExp(/(@(?:exception|throws|see|link|linkplain|value)\s+(?:\*\s*)?)/.source + '(?:' + reference + ')'), + pattern: RegExp(/(@(?:exception|link|linkplain|see|throws|value)\s+(?:\*\s*)?)/.source + '(?:' + reference + ')'), lookbehind: true, inside: { 'function': { diff --git a/components/prism-javadoc.min.js b/components/prism-javadoc.min.js index 0b0ffc8a18..5cdc8bfcb3 100644 --- a/components/prism-javadoc.min.js +++ b/components/prism-javadoc.min.js @@ -1 +1 @@ -!function(a){var e=/(^(?:[\t ]*(?:\*\s*)*))[^*\s].*$/m,n="(?:\\b[a-zA-Z]\\w+\\s*\\.\\s*)*\\b[A-Z]\\w*(?:\\s*)?|".replace(//g,function(){return"#\\s*\\w+(?:\\s*\\([^()]*\\))?"});a.languages.javadoc=a.languages.extend("javadoclike",{}),a.languages.insertBefore("javadoc","keyword",{reference:{pattern:RegExp("(@(?:exception|throws|see|link|linkplain|value)\\s+(?:\\*\\s*)?)(?:"+n+")"),lookbehind:!0,inside:{function:{pattern:/(#\s*)\w+(?=\s*\()/,lookbehind:!0},field:{pattern:/(#\s*)\w+/,lookbehind:!0},namespace:{pattern:/\b(?:[a-z]\w*\s*\.\s*)+/,inside:{punctuation:/\./}},"class-name":/\b[A-Z]\w*/,keyword:a.languages.java.keyword,punctuation:/[#()[\],.]/}},"class-name":{pattern:/(@param\s+)<[A-Z]\w*>/,lookbehind:!0,inside:{punctuation:/[.<>]/}},"code-section":[{pattern:/(\{@code\s+(?!\s))(?:[^\s{}]|\s+(?![\s}])|\{(?:[^{}]|\{(?:[^{}]|\{(?:[^{}]|\{[^{}]*\})*\})*\})*\})+(?=\s*\})/,lookbehind:!0,inside:{code:{pattern:e,lookbehind:!0,inside:a.languages.java,alias:"language-java"}}},{pattern:/(<(code|pre|tt)>(?!)\s*)\S(?:\S|\s+\S)*?(?=\s*<\/\2>)/,lookbehind:!0,inside:{line:{pattern:e,lookbehind:!0,inside:{tag:a.languages.markup.tag,entity:a.languages.markup.entity,code:{pattern:/.+/,inside:a.languages.java,alias:"language-java"}}}}}],tag:a.languages.markup.tag,entity:a.languages.markup.entity}),a.languages.javadoclike.addSupport("java",a.languages.javadoc)}(Prism); \ No newline at end of file +!function(a){var e=/(^(?:[\t ]*(?:\*\s*)*))[^*\s].*$/m,n="(?:\\b[a-zA-Z]\\w+\\s*\\.\\s*)*\\b[A-Z]\\w*(?:\\s*)?|".replace(//g,function(){return"#\\s*\\w+(?:\\s*\\([^()]*\\))?"});a.languages.javadoc=a.languages.extend("javadoclike",{}),a.languages.insertBefore("javadoc","keyword",{reference:{pattern:RegExp("(@(?:exception|link|linkplain|see|throws|value)\\s+(?:\\*\\s*)?)(?:"+n+")"),lookbehind:!0,inside:{function:{pattern:/(#\s*)\w+(?=\s*\()/,lookbehind:!0},field:{pattern:/(#\s*)\w+/,lookbehind:!0},namespace:{pattern:/\b(?:[a-z]\w*\s*\.\s*)+/,inside:{punctuation:/\./}},"class-name":/\b[A-Z]\w*/,keyword:a.languages.java.keyword,punctuation:/[#()[\],.]/}},"class-name":{pattern:/(@param\s+)<[A-Z]\w*>/,lookbehind:!0,inside:{punctuation:/[.<>]/}},"code-section":[{pattern:/(\{@code\s+(?!\s))(?:[^\s{}]|\s+(?![\s}])|\{(?:[^{}]|\{(?:[^{}]|\{(?:[^{}]|\{[^{}]*\})*\})*\})*\})+(?=\s*\})/,lookbehind:!0,inside:{code:{pattern:e,lookbehind:!0,inside:a.languages.java,alias:"language-java"}}},{pattern:/(<(code|pre|tt)>(?!)\s*)\S(?:\S|\s+\S)*?(?=\s*<\/\2>)/,lookbehind:!0,inside:{line:{pattern:e,lookbehind:!0,inside:{tag:a.languages.markup.tag,entity:a.languages.markup.entity,code:{pattern:/.+/,inside:a.languages.java,alias:"language-java"}}}}}],tag:a.languages.markup.tag,entity:a.languages.markup.entity}),a.languages.javadoclike.addSupport("java",a.languages.javadoc)}(Prism); \ No newline at end of file diff --git a/components/prism-javadoclike.js b/components/prism-javadoclike.js index 398c46311c..187d2cd74a 100644 --- a/components/prism-javadoclike.js +++ b/components/prism-javadoclike.js @@ -2,7 +2,7 @@ var javaDocLike = Prism.languages.javadoclike = { 'parameter': { - pattern: /(^[\t ]*(?:\/{3}|\*|\/\*\*)\s*@(?:param|arg|arguments)\s+)\w+/m, + pattern: /(^[\t ]*(?:\/{3}|\*|\/\*\*)\s*@(?:arg|arguments|param)\s+)\w+/m, lookbehind: true }, 'keyword': { diff --git a/components/prism-javadoclike.min.js b/components/prism-javadoclike.min.js index 185b7855ca..52e19ba937 100644 --- a/components/prism-javadoclike.min.js +++ b/components/prism-javadoclike.min.js @@ -1 +1 @@ -!function(p){var a=p.languages.javadoclike={parameter:{pattern:/(^[\t ]*(?:\/{3}|\*|\/\*\*)\s*@(?:param|arg|arguments)\s+)\w+/m,lookbehind:!0},keyword:{pattern:/(^[\t ]*(?:\/{3}|\*|\/\*\*)\s*|\{)@[a-z][a-zA-Z-]+\b/m,lookbehind:!0},punctuation:/[{}]/};Object.defineProperty(a,"addSupport",{value:function(a,e){"string"==typeof a&&(a=[a]),a.forEach(function(a){!function(a,e){var n="doc-comment",t=p.languages[a];if(t){var r=t[n];if(!r){var o={"doc-comment":{pattern:/(^|[^\\])\/\*\*[^/][\s\S]*?(?:\*\/|$)/,lookbehind:!0,alias:"comment"}};r=(t=p.languages.insertBefore(a,"comment",o))[n]}if(r instanceof RegExp&&(r=t[n]={pattern:r}),Array.isArray(r))for(var i=0,s=r.length;i|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/ }); -Prism.languages.javascript['class-name'][0].pattern = /(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/; +Prism.languages.javascript['class-name'][0].pattern = /(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/; Prism.languages.insertBefore('javascript', 'keyword', { 'regex': { diff --git a/components/prism-javascript.min.js b/components/prism-javascript.min.js index 479a3dd558..0e14ff07bd 100644 --- a/components/prism-javascript.min.js +++ b/components/prism-javascript.min.js @@ -1 +1 @@ -Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:prototype|constructor))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:/\b(?:(?:0[xX](?:[\dA-Fa-f](?:_[\dA-Fa-f])?)+|0[bB](?:[01](?:_[01])?)+|0[oO](?:[0-7](?:_[0-7])?)+)n?|(?:\d(?:_\d)?)+n|NaN|Infinity)\b|(?:\b(?:\d(?:_\d)?)+\.?(?:\d(?:_\d)?)*|\B\.(?:\d(?:_\d)?)+)(?:[Ee][+-]?(?:\d(?:_\d)?)+)?/,operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/,Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)\/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/,lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:Prism.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),Prism.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}}}),Prism.languages.markup&&(Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.markup.tag.addAttribute("on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)","javascript")),Prism.languages.js=Prism.languages.javascript; \ No newline at end of file +Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:/\b(?:(?:0[xX](?:[\dA-Fa-f](?:_[\dA-Fa-f])?)+|0[bB](?:[01](?:_[01])?)+|0[oO](?:[0-7](?:_[0-7])?)+)n?|(?:\d(?:_\d)?)+n|NaN|Infinity)\b|(?:\b(?:\d(?:_\d)?)+\.?(?:\d(?:_\d)?)*|\B\.(?:\d(?:_\d)?)+)(?:[Ee][+-]?(?:\d(?:_\d)?)+)?/,operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)\/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/,lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:Prism.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),Prism.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}}}),Prism.languages.markup&&(Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.markup.tag.addAttribute("on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)","javascript")),Prism.languages.js=Prism.languages.javascript; \ No newline at end of file diff --git a/components/prism-javastacktrace.js b/components/prism-javastacktrace.js index 61199db1c8..1c09650999 100644 --- a/components/prism-javastacktrace.js +++ b/components/prism-javastacktrace.js @@ -89,7 +89,7 @@ Prism.languages.javastacktrace = { pattern: /(\()[^()]*(?=\))/, lookbehind: true, inside: { - 'keyword': /^(?:Unknown Source|Native Method)$/ + 'keyword': /^(?:Native Method|Unknown Source)$/ } } ], diff --git a/components/prism-javastacktrace.min.js b/components/prism-javastacktrace.min.js index 4bbf3223d7..a61d466448 100644 --- a/components/prism-javastacktrace.min.js +++ b/components/prism-javastacktrace.min.js @@ -1 +1 @@ -Prism.languages.javastacktrace={summary:{pattern:/^[\t ]*(?:(?:Caused by:|Suppressed:|Exception in thread "[^"]*")[\t ]+)?[\w$.]+(?::.*)?$/m,inside:{keyword:{pattern:/^(\s*)(?:(?:Caused by|Suppressed)(?=:)|Exception in thread)/m,lookbehind:!0},string:{pattern:/^(\s*)"[^"]*"/,lookbehind:!0},exceptions:{pattern:/^(:?\s*)[\w$.]+(?=:|$)/,lookbehind:!0,inside:{"class-name":/[\w$]+(?=$|:)/,namespace:/[a-z]\w*/,punctuation:/[.:]/}},message:{pattern:/(:\s*)\S.*/,lookbehind:!0,alias:"string"},punctuation:/:/}},"stack-frame":{pattern:/^[\t ]*at (?:[\w$./]|@[\w$.+-]*\/)+(?:)?\([^()]*\)/m,inside:{keyword:{pattern:/^(\s*)at(?= )/,lookbehind:!0},source:[{pattern:/(\()\w+\.\w+:\d+(?=\))/,lookbehind:!0,inside:{file:/^\w+\.\w+/,punctuation:/:/,"line-number":{pattern:/\d+/,alias:"number"}}},{pattern:/(\()[^()]*(?=\))/,lookbehind:!0,inside:{keyword:/^(?:Unknown Source|Native Method)$/}}],"class-name":/[\w$]+(?=\.(?:|[\w$]+)\()/,function:/(?:|[\w$]+)(?=\()/,"class-loader":{pattern:/(\s)[a-z]\w*(?:\.[a-z]\w*)*(?=\/[\w@$.]*\/)/,lookbehind:!0,alias:"namespace",inside:{punctuation:/\./}},module:{pattern:/([\s/])[a-z]\w*(?:\.[a-z]\w*)*(?:@[\w$.+-]*)?(?=\/)/,lookbehind:!0,inside:{version:{pattern:/(@)[\s\S]+/,lookbehind:!0,alias:"number"},punctuation:/[@.]/}},namespace:{pattern:/(?:[a-z]\w*\.)+/,inside:{punctuation:/\./}},punctuation:/[()/.]/}},more:{pattern:/^[\t ]*\.{3} \d+ [a-z]+(?: [a-z]+)*/m,inside:{punctuation:/\.{3}/,number:/\d+/,keyword:/\b[a-z]+(?: [a-z]+)*\b/}}}; \ No newline at end of file +Prism.languages.javastacktrace={summary:{pattern:/^[\t ]*(?:(?:Caused by:|Suppressed:|Exception in thread "[^"]*")[\t ]+)?[\w$.]+(?::.*)?$/m,inside:{keyword:{pattern:/^(\s*)(?:(?:Caused by|Suppressed)(?=:)|Exception in thread)/m,lookbehind:!0},string:{pattern:/^(\s*)"[^"]*"/,lookbehind:!0},exceptions:{pattern:/^(:?\s*)[\w$.]+(?=:|$)/,lookbehind:!0,inside:{"class-name":/[\w$]+(?=$|:)/,namespace:/[a-z]\w*/,punctuation:/[.:]/}},message:{pattern:/(:\s*)\S.*/,lookbehind:!0,alias:"string"},punctuation:/:/}},"stack-frame":{pattern:/^[\t ]*at (?:[\w$./]|@[\w$.+-]*\/)+(?:)?\([^()]*\)/m,inside:{keyword:{pattern:/^(\s*)at(?= )/,lookbehind:!0},source:[{pattern:/(\()\w+\.\w+:\d+(?=\))/,lookbehind:!0,inside:{file:/^\w+\.\w+/,punctuation:/:/,"line-number":{pattern:/\d+/,alias:"number"}}},{pattern:/(\()[^()]*(?=\))/,lookbehind:!0,inside:{keyword:/^(?:Native Method|Unknown Source)$/}}],"class-name":/[\w$]+(?=\.(?:|[\w$]+)\()/,function:/(?:|[\w$]+)(?=\()/,"class-loader":{pattern:/(\s)[a-z]\w*(?:\.[a-z]\w*)*(?=\/[\w@$.]*\/)/,lookbehind:!0,alias:"namespace",inside:{punctuation:/\./}},module:{pattern:/([\s/])[a-z]\w*(?:\.[a-z]\w*)*(?:@[\w$.+-]*)?(?=\/)/,lookbehind:!0,inside:{version:{pattern:/(@)[\s\S]+/,lookbehind:!0,alias:"number"},punctuation:/[@.]/}},namespace:{pattern:/(?:[a-z]\w*\.)+/,inside:{punctuation:/\./}},punctuation:/[()/.]/}},more:{pattern:/^[\t ]*\.{3} \d+ [a-z]+(?: [a-z]+)*/m,inside:{punctuation:/\.{3}/,number:/\d+/,keyword:/\b[a-z]+(?: [a-z]+)*\b/}}}; \ No newline at end of file diff --git a/components/prism-jexl.js b/components/prism-jexl.js index 7f29fad3dd..6268ae2a80 100644 --- a/components/prism-jexl.js +++ b/components/prism-jexl.js @@ -8,7 +8,7 @@ Prism.languages.jexl = { 'function': /[a-zA-Zа-яА-Я_\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF$][\wа-яА-Я\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF$]*\s*(?=\()/, 'number': /\b\d+(?:\.\d+)?\b|\B\.\d+\b/, 'operator': /[<>!]=?|-|\+|&&|==|\|\|?|\/\/?|[?:*^%]/, - 'boolean': /\b(?:true|false)\b/, + 'boolean': /\b(?:false|true)\b/, 'keyword': /\bin\b/, 'punctuation': /[{}[\](),.]/, }; diff --git a/components/prism-jexl.min.js b/components/prism-jexl.min.js index 6ea302bbda..0586edfa19 100644 --- a/components/prism-jexl.min.js +++ b/components/prism-jexl.min.js @@ -1 +1 @@ -Prism.languages.jexl={string:/(["'])(?:\\[\s\S]|(?!\1)[^\\])*\1/,transform:{pattern:/(\|\s*)[a-zA-Zа-яА-Я_\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF$][\wа-яА-Я\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF$]*/,alias:"function",lookbehind:!0},function:/[a-zA-Zа-яА-Я_\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF$][\wа-яА-Я\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF$]*\s*(?=\()/,number:/\b\d+(?:\.\d+)?\b|\B\.\d+\b/,operator:/[<>!]=?|-|\+|&&|==|\|\|?|\/\/?|[?:*^%]/,boolean:/\b(?:true|false)\b/,keyword:/\bin\b/,punctuation:/[{}[\](),.]/}; \ No newline at end of file +Prism.languages.jexl={string:/(["'])(?:\\[\s\S]|(?!\1)[^\\])*\1/,transform:{pattern:/(\|\s*)[a-zA-Zа-яА-Я_\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF$][\wа-яА-Я\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF$]*/,alias:"function",lookbehind:!0},function:/[a-zA-Zа-яА-Я_\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF$][\wа-яА-Я\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF$]*\s*(?=\()/,number:/\b\d+(?:\.\d+)?\b|\B\.\d+\b/,operator:/[<>!]=?|-|\+|&&|==|\|\|?|\/\/?|[?:*^%]/,boolean:/\b(?:false|true)\b/,keyword:/\bin\b/,punctuation:/[{}[\](),.]/}; \ No newline at end of file diff --git a/components/prism-jolie.js b/components/prism-jolie.js index bbe36a82b8..d8f784f675 100644 --- a/components/prism-jolie.js +++ b/components/prism-jolie.js @@ -3,11 +3,11 @@ Prism.languages.jolie = Prism.languages.extend('clike', { pattern: /(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/, greedy: true }, - 'keyword': /\b(?:include|define|is_defined|undef|main|init|outputPort|inputPort|Location|Protocol|Interfaces|RequestResponse|OneWay|type|interface|extender|throws|cset|csets|forward|Aggregates|Redirects|embedded|courier|execution|sequential|concurrent|single|scope|install|throw|comp|cH|default|global|linkIn|linkOut|synchronized|this|new|for|if|else|while|in|Jolie|Java|Javascript|nullProcess|spawn|constants|with|provide|until|exit|foreach|instanceof|over|service)\b/, + 'keyword': /\b(?:Aggregates|Interfaces|Java|Javascript|Jolie|Location|OneWay|Protocol|Redirects|RequestResponse|cH|comp|concurrent|constants|courier|cset|csets|default|define|else|embedded|execution|exit|extender|for|foreach|forward|global|if|in|include|init|inputPort|install|instanceof|interface|is_defined|linkIn|linkOut|main|new|nullProcess|outputPort|over|provide|scope|sequential|service|single|spawn|synchronized|this|throw|throws|type|undef|until|while|with)\b/, 'number': /(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?l?/i, 'operator': /-[-=>]?|\+[+=]?|<[<=]?|[>=*!]=?|&&|\|\||[:?\/%^]/, 'punctuation': /[,.]/, - 'builtin': /\b(?:undefined|string|int|void|long|Byte|bool|double|float|char|any)\b/, + 'builtin': /\b(?:Byte|any|bool|char|double|float|int|long|string|undefined|void)\b/, 'symbol': /[|;@]/ }); @@ -16,7 +16,7 @@ delete Prism.languages.jolie['class-name']; Prism.languages.insertBefore('jolie', 'keyword', { 'function': { - pattern: /((?:\b(?:outputPort|inputPort|in|service|courier)\b|@)\s*)\w+/, + pattern: /((?:\b(?:courier|in|inputPort|outputPort|service)\b|@)\s*)\w+/, lookbehind: true }, 'aggregates': { diff --git a/components/prism-jolie.min.js b/components/prism-jolie.min.js index db6bb2081f..b5750aba64 100644 --- a/components/prism-jolie.min.js +++ b/components/prism-jolie.min.js @@ -1 +1 @@ -Prism.languages.jolie=Prism.languages.extend("clike",{string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},keyword:/\b(?:include|define|is_defined|undef|main|init|outputPort|inputPort|Location|Protocol|Interfaces|RequestResponse|OneWay|type|interface|extender|throws|cset|csets|forward|Aggregates|Redirects|embedded|courier|execution|sequential|concurrent|single|scope|install|throw|comp|cH|default|global|linkIn|linkOut|synchronized|this|new|for|if|else|while|in|Jolie|Java|Javascript|nullProcess|spawn|constants|with|provide|until|exit|foreach|instanceof|over|service)\b/,number:/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?l?/i,operator:/-[-=>]?|\+[+=]?|<[<=]?|[>=*!]=?|&&|\|\||[:?\/%^]/,punctuation:/[,.]/,builtin:/\b(?:undefined|string|int|void|long|Byte|bool|double|float|char|any)\b/,symbol:/[|;@]/}),delete Prism.languages.jolie["class-name"],Prism.languages.insertBefore("jolie","keyword",{function:{pattern:/((?:\b(?:outputPort|inputPort|in|service|courier)\b|@)\s*)\w+/,lookbehind:!0},aggregates:{pattern:/(\bAggregates\s*:\s*)(?:\w+(?:\s+with\s+\w+)?\s*,\s*)*\w+(?:\s+with\s+\w+)?/,lookbehind:!0,inside:{"with-extension":{pattern:/\bwith\s+\w+/,inside:{keyword:/\bwith\b/}},function:{pattern:/\w+/},punctuation:{pattern:/,/}}},redirects:{pattern:/(\bRedirects\s*:\s*)(?:\w+\s*=>\s*\w+\s*,\s*)*(?:\w+\s*=>\s*\w+)/,lookbehind:!0,inside:{punctuation:{pattern:/,/},function:{pattern:/\w+/},symbol:{pattern:/=>/}}}}); \ No newline at end of file +Prism.languages.jolie=Prism.languages.extend("clike",{string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},keyword:/\b(?:Aggregates|Interfaces|Java|Javascript|Jolie|Location|OneWay|Protocol|Redirects|RequestResponse|cH|comp|concurrent|constants|courier|cset|csets|default|define|else|embedded|execution|exit|extender|for|foreach|forward|global|if|in|include|init|inputPort|install|instanceof|interface|is_defined|linkIn|linkOut|main|new|nullProcess|outputPort|over|provide|scope|sequential|service|single|spawn|synchronized|this|throw|throws|type|undef|until|while|with)\b/,number:/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?l?/i,operator:/-[-=>]?|\+[+=]?|<[<=]?|[>=*!]=?|&&|\|\||[:?\/%^]/,punctuation:/[,.]/,builtin:/\b(?:Byte|any|bool|char|double|float|int|long|string|undefined|void)\b/,symbol:/[|;@]/}),delete Prism.languages.jolie["class-name"],Prism.languages.insertBefore("jolie","keyword",{function:{pattern:/((?:\b(?:courier|in|inputPort|outputPort|service)\b|@)\s*)\w+/,lookbehind:!0},aggregates:{pattern:/(\bAggregates\s*:\s*)(?:\w+(?:\s+with\s+\w+)?\s*,\s*)*\w+(?:\s+with\s+\w+)?/,lookbehind:!0,inside:{"with-extension":{pattern:/\bwith\s+\w+/,inside:{keyword:/\bwith\b/}},function:{pattern:/\w+/},punctuation:{pattern:/,/}}},redirects:{pattern:/(\bRedirects\s*:\s*)(?:\w+\s*=>\s*\w+\s*,\s*)*(?:\w+\s*=>\s*\w+)/,lookbehind:!0,inside:{punctuation:{pattern:/,/},function:{pattern:/\w+/},symbol:{pattern:/=>/}}}}); \ No newline at end of file diff --git a/components/prism-jq.js b/components/prism-jq.js index a1dd4355de..0dba985c96 100644 --- a/components/prism-jq.js +++ b/components/prism-jq.js @@ -41,7 +41,7 @@ alias: 'property' }, 'keyword': /\b(?:as|break|catch|def|elif|else|end|foreach|if|import|include|label|module|modulemeta|null|reduce|then|try|while)\b/, - 'boolean': /\b(?:true|false)\b/, + 'boolean': /\b(?:false|true)\b/, 'number': /(?:\b\d+\.|\B\.)?\b\d+(?:[eE][+-]?\d+)?\b/, 'operator': [ @@ -49,7 +49,7 @@ pattern: /\|=?/, alias: 'pipe' }, - /\.\.|[!=<>]?=|\?\/\/|\/\/=?|[-+*/%]=?|[<>?]|\b(?:and|or|not)\b/ + /\.\.|[!=<>]?=|\?\/\/|\/\/=?|[-+*/%]=?|[<>?]|\b(?:and|not|or)\b/ ], 'c-style-function': { pattern: /\b[a-z_]\w*(?=\s*\()/i, diff --git a/components/prism-jq.min.js b/components/prism-jq.min.js index 9ace5cf92c..89089d8cdb 100644 --- a/components/prism-jq.min.js +++ b/components/prism-jq.min.js @@ -1 +1 @@ -!function(e){var n="\\\\\\((?:[^()]|\\([^()]*\\))*\\)",t=RegExp('"(?:[^"\r\n\\\\]|\\\\[^\r\n(]|__)*"'.replace(/__/g,function(){return n})),i={interpolation:{pattern:RegExp("((?:^|[^\\\\])(?:\\\\{2})*)"+n),lookbehind:!0,inside:{content:{pattern:/^(\\\()[\s\S]+(?=\)$)/,lookbehind:!0,inside:null},punctuation:/^\\\(|\)$/}}},a=e.languages.jq={comment:/#.*/,property:{pattern:RegExp(t.source+"(?=\\s*:(?!:))"),greedy:!0,inside:i},string:{pattern:t,greedy:!0,inside:i},function:{pattern:/(\bdef\s+)[a-z_]\w+/i,lookbehind:!0},variable:/\B\$\w+/,"property-literal":{pattern:/\b[a-z_]\w*(?=\s*:(?!:))/i,alias:"property"},keyword:/\b(?:as|break|catch|def|elif|else|end|foreach|if|import|include|label|module|modulemeta|null|reduce|then|try|while)\b/,boolean:/\b(?:true|false)\b/,number:/(?:\b\d+\.|\B\.)?\b\d+(?:[eE][+-]?\d+)?\b/,operator:[{pattern:/\|=?/,alias:"pipe"},/\.\.|[!=<>]?=|\?\/\/|\/\/=?|[-+*/%]=?|[<>?]|\b(?:and|or|not)\b/],"c-style-function":{pattern:/\b[a-z_]\w*(?=\s*\()/i,alias:"function"},punctuation:/::|[()\[\]{},:;]|\.(?=\s*[\[\w$])/,dot:{pattern:/\./,alias:"important"}};i.interpolation.inside.content.inside=a}(Prism); \ No newline at end of file +!function(e){var n="\\\\\\((?:[^()]|\\([^()]*\\))*\\)",t=RegExp('"(?:[^"\r\n\\\\]|\\\\[^\r\n(]|__)*"'.replace(/__/g,function(){return n})),i={interpolation:{pattern:RegExp("((?:^|[^\\\\])(?:\\\\{2})*)"+n),lookbehind:!0,inside:{content:{pattern:/^(\\\()[\s\S]+(?=\)$)/,lookbehind:!0,inside:null},punctuation:/^\\\(|\)$/}}},a=e.languages.jq={comment:/#.*/,property:{pattern:RegExp(t.source+"(?=\\s*:(?!:))"),greedy:!0,inside:i},string:{pattern:t,greedy:!0,inside:i},function:{pattern:/(\bdef\s+)[a-z_]\w+/i,lookbehind:!0},variable:/\B\$\w+/,"property-literal":{pattern:/\b[a-z_]\w*(?=\s*:(?!:))/i,alias:"property"},keyword:/\b(?:as|break|catch|def|elif|else|end|foreach|if|import|include|label|module|modulemeta|null|reduce|then|try|while)\b/,boolean:/\b(?:false|true)\b/,number:/(?:\b\d+\.|\B\.)?\b\d+(?:[eE][+-]?\d+)?\b/,operator:[{pattern:/\|=?/,alias:"pipe"},/\.\.|[!=<>]?=|\?\/\/|\/\/=?|[-+*/%]=?|[<>?]|\b(?:and|not|or)\b/],"c-style-function":{pattern:/\b[a-z_]\w*(?=\s*\()/i,alias:"function"},punctuation:/::|[()\[\]{},:;]|\.(?=\s*[\[\w$])/,dot:{pattern:/\./,alias:"important"}};i.interpolation.inside.content.inside=a}(Prism); \ No newline at end of file diff --git a/components/prism-js-extras.js b/components/prism-js-extras.js index 2fb31820cb..64cac5af9b 100644 --- a/components/prism-js-extras.js +++ b/components/prism-js-extras.js @@ -21,7 +21,7 @@ { // standard built-ins // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects - pattern: /\b(?:(?:(?:Uint|Int)(?:8|16|32)|Uint8Clamped|Float(?:32|64))?Array|ArrayBuffer|BigInt|Boolean|DataView|Date|Error|Function|Intl|JSON|Math|Number|Object|Promise|Proxy|Reflect|RegExp|String|Symbol|(?:Weak)?(?:Set|Map)|WebAssembly)\b/, + pattern: /\b(?:(?:Float(?:32|64)|(?:Int|Uint)(?:8|16|32)|Uint8Clamped)?Array|ArrayBuffer|BigInt|Boolean|DataView|Date|Error|Function|Intl|JSON|(?:Weak)?(?:Map|Set)|Math|Number|Object|Promise|Proxy|Reflect|RegExp|String|Symbol|WebAssembly)\b/, alias: 'class-name' }, { @@ -65,7 +65,7 @@ alias: 'module' }, { - pattern: /\b(?:await|break|catch|continue|do|else|for|finally|if|return|switch|throw|try|while|yield)\b/, + pattern: /\b(?:await|break|catch|continue|do|else|finally|for|if|return|switch|throw|try|while|yield)\b/, alias: 'control-flow' }, { @@ -100,7 +100,7 @@ }, 'dom': { // this contains only a few commonly used DOM variables - pattern: /\b(?:document|location|navigator|performance|(?:local|session)Storage|window)\b/, + pattern: /\b(?:document|(?:local|session)Storage|location|navigator|performance|window)\b/, alias: 'variable' }, 'console': { diff --git a/components/prism-js-extras.min.js b/components/prism-js-extras.min.js index 91c57b1498..390d8edd4f 100644 --- a/components/prism-js-extras.min.js +++ b/components/prism-js-extras.min.js @@ -1 +1 @@ -!function(a){function e(a,e){return RegExp(a.replace(//g,function(){return"(?!\\s)[_$a-zA-Z\\xA0-\\uFFFF](?:(?!\\s)[$\\w\\xA0-\\uFFFF])*"}),e)}a.languages.insertBefore("javascript","function-variable",{"method-variable":{pattern:RegExp("(\\.\\s*)"+a.languages.javascript["function-variable"].pattern.source),lookbehind:!0,alias:["function-variable","method","function","property-access"]}}),a.languages.insertBefore("javascript","function",{method:{pattern:RegExp("(\\.\\s*)"+a.languages.javascript.function.source),lookbehind:!0,alias:["function","property-access"]}}),a.languages.insertBefore("javascript","constant",{"known-class-name":[{pattern:/\b(?:(?:(?:Uint|Int)(?:8|16|32)|Uint8Clamped|Float(?:32|64))?Array|ArrayBuffer|BigInt|Boolean|DataView|Date|Error|Function|Intl|JSON|Math|Number|Object|Promise|Proxy|Reflect|RegExp|String|Symbol|(?:Weak)?(?:Set|Map)|WebAssembly)\b/,alias:"class-name"},{pattern:/\b(?:[A-Z]\w*)Error\b/,alias:"class-name"}]}),a.languages.insertBefore("javascript","keyword",{imports:{pattern:e("(\\bimport\\b\\s*)(?:(?:\\s*,\\s*(?:\\*\\s*as\\s+|\\{[^{}]*\\}))?|\\*\\s*as\\s+|\\{[^{}]*\\})(?=\\s*\\bfrom\\b)"),lookbehind:!0,inside:a.languages.javascript},exports:{pattern:e("(\\bexport\\b\\s*)(?:\\*(?:\\s*as\\s+)?(?=\\s*\\bfrom\\b)|\\{[^{}]*\\})"),lookbehind:!0,inside:a.languages.javascript}}),a.languages.javascript.keyword.unshift({pattern:/\b(?:as|default|export|from|import)\b/,alias:"module"},{pattern:/\b(?:await|break|catch|continue|do|else|for|finally|if|return|switch|throw|try|while|yield)\b/,alias:"control-flow"},{pattern:/\bnull\b/,alias:["null","nil"]},{pattern:/\bundefined\b/,alias:"nil"}),a.languages.insertBefore("javascript","operator",{spread:{pattern:/\.{3}/,alias:"operator"},arrow:{pattern:/=>/,alias:"operator"}}),a.languages.insertBefore("javascript","punctuation",{"property-access":{pattern:e("(\\.\\s*)#?"),lookbehind:!0},"maybe-class-name":{pattern:/(^|[^$\w\xA0-\uFFFF])[A-Z][$\w\xA0-\uFFFF]+/,lookbehind:!0},dom:{pattern:/\b(?:document|location|navigator|performance|(?:local|session)Storage|window)\b/,alias:"variable"},console:{pattern:/\bconsole(?=\s*\.)/,alias:"class-name"}});for(var t=["function","function-variable","method","method-variable","property-access"],r=0;r/g,function(){return"(?!\\s)[_$a-zA-Z\\xA0-\\uFFFF](?:(?!\\s)[$\\w\\xA0-\\uFFFF])*"}),e)}a.languages.insertBefore("javascript","function-variable",{"method-variable":{pattern:RegExp("(\\.\\s*)"+a.languages.javascript["function-variable"].pattern.source),lookbehind:!0,alias:["function-variable","method","function","property-access"]}}),a.languages.insertBefore("javascript","function",{method:{pattern:RegExp("(\\.\\s*)"+a.languages.javascript.function.source),lookbehind:!0,alias:["function","property-access"]}}),a.languages.insertBefore("javascript","constant",{"known-class-name":[{pattern:/\b(?:(?:Float(?:32|64)|(?:Int|Uint)(?:8|16|32)|Uint8Clamped)?Array|ArrayBuffer|BigInt|Boolean|DataView|Date|Error|Function|Intl|JSON|(?:Weak)?(?:Map|Set)|Math|Number|Object|Promise|Proxy|Reflect|RegExp|String|Symbol|WebAssembly)\b/,alias:"class-name"},{pattern:/\b(?:[A-Z]\w*)Error\b/,alias:"class-name"}]}),a.languages.insertBefore("javascript","keyword",{imports:{pattern:e("(\\bimport\\b\\s*)(?:(?:\\s*,\\s*(?:\\*\\s*as\\s+|\\{[^{}]*\\}))?|\\*\\s*as\\s+|\\{[^{}]*\\})(?=\\s*\\bfrom\\b)"),lookbehind:!0,inside:a.languages.javascript},exports:{pattern:e("(\\bexport\\b\\s*)(?:\\*(?:\\s*as\\s+)?(?=\\s*\\bfrom\\b)|\\{[^{}]*\\})"),lookbehind:!0,inside:a.languages.javascript}}),a.languages.javascript.keyword.unshift({pattern:/\b(?:as|default|export|from|import)\b/,alias:"module"},{pattern:/\b(?:await|break|catch|continue|do|else|finally|for|if|return|switch|throw|try|while|yield)\b/,alias:"control-flow"},{pattern:/\bnull\b/,alias:["null","nil"]},{pattern:/\bundefined\b/,alias:"nil"}),a.languages.insertBefore("javascript","operator",{spread:{pattern:/\.{3}/,alias:"operator"},arrow:{pattern:/=>/,alias:"operator"}}),a.languages.insertBefore("javascript","punctuation",{"property-access":{pattern:e("(\\.\\s*)#?"),lookbehind:!0},"maybe-class-name":{pattern:/(^|[^$\w\xA0-\uFFFF])[A-Z][$\w\xA0-\uFFFF]+/,lookbehind:!0},dom:{pattern:/\b(?:document|(?:local|session)Storage|location|navigator|performance|window)\b/,alias:"variable"},console:{pattern:/\bconsole(?=\s*\.)/,alias:"class-name"}});for(var t=["function","function-variable","method","method-variable","property-access"],r=0;r=v.length)return;var r=t[n];if("string"==typeof r||"string"==typeof r.content){var a=v[f],i="string"==typeof r?r:r.content,s=i.indexOf(a);if(-1!==s){++f;var o=i.substring(0,s),p=d(y[a]),l=i.substring(s+a.length),g=[];if(o&&g.push(o),g.push(p),l){var u=[l];e(u),g.push.apply(g,u)}"string"==typeof r?(t.splice.apply(t,[n,1].concat(g)),n+=g.length-1):r.content=g}}else{var c=r.content;Array.isArray(c)?e(c):e([c])}}}(n),new u.Token(i,n,"language-"+i,a)}u.languages.javascript["template-string"]=[t("css","\\b(?:styled(?:\\([^)]*\\))?(?:\\s*\\.\\s*\\w+(?:\\([^)]*\\))*)*|css(?:\\s*\\.\\s*(?:global|resolve))?|createGlobalStyle|keyframes)"),t("html","\\bhtml|\\.\\s*(?:inner|outer)HTML\\s*\\+?="),t("svg","\\bsvg"),t("markdown","\\b(?:md|markdown)"),t("graphql","\\b(?:gql|graphql(?:\\s*\\.\\s*experimental)?)"),t("sql","\\bsql"),e].filter(Boolean);var o={javascript:!0,js:!0,typescript:!0,ts:!0,jsx:!0,tsx:!0};function f(e){return"string"==typeof e?e:Array.isArray(e)?e.map(f).join(""):f(e.content)}u.hooks.add("after-tokenize",function(e){e.language in o&&!function e(t){for(var n=0,r=t.length;n=v.length)return;var r=t[n];if("string"==typeof r||"string"==typeof r.content){var a=v[f],i="string"==typeof r?r:r.content,s=i.indexOf(a);if(-1!==s){++f;var o=i.substring(0,s),p=d(y[a]),l=i.substring(s+a.length),g=[];if(o&&g.push(o),g.push(p),l){var u=[l];e(u),g.push.apply(g,u)}"string"==typeof r?(t.splice.apply(t,[n,1].concat(g)),n+=g.length-1):r.content=g}}else{var c=r.content;Array.isArray(c)?e(c):e([c])}}}(n),new u.Token(i,n,"language-"+i,a)}u.languages.javascript["template-string"]=[t("css","\\b(?:styled(?:\\([^)]*\\))?(?:\\s*\\.\\s*\\w+(?:\\([^)]*\\))*)*|css(?:\\s*\\.\\s*(?:global|resolve))?|createGlobalStyle|keyframes)"),t("html","\\bhtml|\\.\\s*(?:inner|outer)HTML\\s*\\+?="),t("svg","\\bsvg"),t("markdown","\\b(?:markdown|md)"),t("graphql","\\b(?:gql|graphql(?:\\s*\\.\\s*experimental)?)"),t("sql","\\bsql"),e].filter(Boolean);var o={javascript:!0,js:!0,typescript:!0,ts:!0,jsx:!0,tsx:!0};function f(e){return"string"==typeof e?e:Array.isArray(e)?e.map(f).join(""):f(e.content)}u.hooks.add("after-tokenize",function(e){e.language in o&&!function e(t){for(var n=0,r=t.length;n\s+)?)[A-Z]\w*(?:\.[A-Z]\w*)*/.source.replace(//g, function () { return type; })), + pattern: RegExp(/(@(?:augments|class|extends|interface|memberof!?|template|this|typedef)\s+(?:\s+)?)[A-Z]\w*(?:\.[A-Z]\w*)*/.source.replace(//g, function () { return type; })), lookbehind: true, inside: { 'punctuation': /\./ diff --git a/components/prism-jsdoc.min.js b/components/prism-jsdoc.min.js index 8ebd1f7b57..66a5557f43 100644 --- a/components/prism-jsdoc.min.js +++ b/components/prism-jsdoc.min.js @@ -1 +1 @@ -!function(e){var a=e.languages.javascript,n="\\{(?:[^{}]|\\{(?:[^{}]|\\{[^{}]*\\})*\\})+\\}",t="(@(?:param|arg|argument|property)\\s+(?:"+n+"\\s+)?)";e.languages.jsdoc=e.languages.extend("javadoclike",{parameter:{pattern:RegExp(t+"(?:(?!\\s)[$\\w\\xA0-\\uFFFF.])+(?=\\s|$)"),lookbehind:!0,inside:{punctuation:/\./}}}),e.languages.insertBefore("jsdoc","keyword",{"optional-parameter":{pattern:RegExp(t+"\\[(?:(?!\\s)[$\\w\\xA0-\\uFFFF.])+(?:=[^[\\]]+)?\\](?=\\s|$)"),lookbehind:!0,inside:{parameter:{pattern:/(^\[)[$\w\xA0-\uFFFF\.]+/,lookbehind:!0,inside:{punctuation:/\./}},code:{pattern:/(=)[\s\S]*(?=\]$)/,lookbehind:!0,inside:a,alias:"language-javascript"},punctuation:/[=[\]]/}},"class-name":[{pattern:RegExp("(@(?:augments|extends|class|interface|memberof!?|template|this|typedef)\\s+(?:\\s+)?)[A-Z]\\w*(?:\\.[A-Z]\\w*)*".replace(//g,function(){return n})),lookbehind:!0,inside:{punctuation:/\./}},{pattern:RegExp("(@[a-z]+\\s+)"+n),lookbehind:!0,inside:{string:a.string,number:a.number,boolean:a.boolean,keyword:e.languages.typescript.keyword,operator:/=>|\.\.\.|[&|?:*]/,punctuation:/[.,;=<>{}()[\]]/}}],example:{pattern:/(@example\s+(?!\s))(?:[^@\s]|\s+(?!\s))+?(?=\s*(?:\*\s*)?(?:@\w|\*\/))/,lookbehind:!0,inside:{code:{pattern:/^([\t ]*(?:\*\s*)?)\S.*$/m,lookbehind:!0,inside:a,alias:"language-javascript"}}}}),e.languages.javadoclike.addSupport("javascript",e.languages.jsdoc)}(Prism); \ No newline at end of file +!function(e){var a=e.languages.javascript,n="\\{(?:[^{}]|\\{(?:[^{}]|\\{[^{}]*\\})*\\})+\\}",t="(@(?:arg|argument|param|property)\\s+(?:"+n+"\\s+)?)";e.languages.jsdoc=e.languages.extend("javadoclike",{parameter:{pattern:RegExp(t+"(?:(?!\\s)[$\\w\\xA0-\\uFFFF.])+(?=\\s|$)"),lookbehind:!0,inside:{punctuation:/\./}}}),e.languages.insertBefore("jsdoc","keyword",{"optional-parameter":{pattern:RegExp(t+"\\[(?:(?!\\s)[$\\w\\xA0-\\uFFFF.])+(?:=[^[\\]]+)?\\](?=\\s|$)"),lookbehind:!0,inside:{parameter:{pattern:/(^\[)[$\w\xA0-\uFFFF\.]+/,lookbehind:!0,inside:{punctuation:/\./}},code:{pattern:/(=)[\s\S]*(?=\]$)/,lookbehind:!0,inside:a,alias:"language-javascript"},punctuation:/[=[\]]/}},"class-name":[{pattern:RegExp("(@(?:augments|class|extends|interface|memberof!?|template|this|typedef)\\s+(?:\\s+)?)[A-Z]\\w*(?:\\.[A-Z]\\w*)*".replace(//g,function(){return n})),lookbehind:!0,inside:{punctuation:/\./}},{pattern:RegExp("(@[a-z]+\\s+)"+n),lookbehind:!0,inside:{string:a.string,number:a.number,boolean:a.boolean,keyword:e.languages.typescript.keyword,operator:/=>|\.\.\.|[&|?:*]/,punctuation:/[.,;=<>{}()[\]]/}}],example:{pattern:/(@example\s+(?!\s))(?:[^@\s]|\s+(?!\s))+?(?=\s*(?:\*\s*)?(?:@\w|\*\/))/,lookbehind:!0,inside:{code:{pattern:/^([\t ]*(?:\*\s*)?)\S.*$/m,lookbehind:!0,inside:a,alias:"language-javascript"}}}}),e.languages.javadoclike.addSupport("javascript",e.languages.jsdoc)}(Prism); \ No newline at end of file diff --git a/components/prism-json.js b/components/prism-json.js index f8a2dd62ca..e1fe04dbe3 100644 --- a/components/prism-json.js +++ b/components/prism-json.js @@ -17,7 +17,7 @@ Prism.languages.json = { 'number': /-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i, 'punctuation': /[{}[\],]/, 'operator': /:/, - 'boolean': /\b(?:true|false)\b/, + 'boolean': /\b(?:false|true)\b/, 'null': { pattern: /\bnull\b/, alias: 'keyword' diff --git a/components/prism-json.min.js b/components/prism-json.min.js index 9cde53651d..4256f8200d 100644 --- a/components/prism-json.min.js +++ b/components/prism-json.min.js @@ -1 +1 @@ -Prism.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:true|false)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}},Prism.languages.webmanifest=Prism.languages.json; \ No newline at end of file +Prism.languages.json={property:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,lookbehind:!0,greedy:!0},comment:{pattern:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}},Prism.languages.webmanifest=Prism.languages.json; \ No newline at end of file diff --git a/components/prism-julia.js b/components/prism-julia.js index 7a97a93b83..dbfdc0b275 100644 --- a/components/prism-julia.js +++ b/components/prism-julia.js @@ -20,12 +20,12 @@ Prism.languages.julia = { greedy: true }, 'keyword': /\b(?:abstract|baremodule|begin|bitstype|break|catch|ccall|const|continue|do|else|elseif|end|export|finally|for|function|global|if|immutable|import|importall|in|let|local|macro|module|print|println|quote|return|struct|try|type|typealias|using|while)\b/, - 'boolean': /\b(?:true|false)\b/, + 'boolean': /\b(?:false|true)\b/, 'number': /(?:\b(?=\d)|\B(?=\.))(?:0[box])?(?:[\da-f]+(?:_[\da-f]+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[efp][+-]?\d+(?:_\d+)*)?j?/i, // https://docs.julialang.org/en/v1/manual/mathematical-operations/ // https://docs.julialang.org/en/v1/manual/mathematical-operations/#Operator-Precedence-and-Associativity-1 'operator': /&&|\|\||[-+*^%÷⊻&$\\]=?|\/[\/=]?|!=?=?|\|[=>]?|<(?:<=?|[=:|])?|>(?:=|>>?=?)?|==?=?|[~≠≤≥'√∛]/, 'punctuation': /::?|[{}[\]();,.?]/, // https://docs.julialang.org/en/v1/base/numbers/#Base.im - 'constant': /\b(?:(?:NaN|Inf)(?:16|32|64)?|im|pi)\b|[πℯ]/ + 'constant': /\b(?:(?:Inf|NaN)(?:16|32|64)?|im|pi)\b|[πℯ]/ }; diff --git a/components/prism-julia.min.js b/components/prism-julia.min.js index aa4bf2b879..e9e678bb52 100644 --- a/components/prism-julia.min.js +++ b/components/prism-julia.min.js @@ -1 +1 @@ -Prism.languages.julia={comment:{pattern:/(^|[^\\])(?:#=(?:[^#=]|=(?!#)|#(?!=)|#=(?:[^#=]|=(?!#)|#(?!=))*=#)*=#|#.*)/,lookbehind:!0},regex:{pattern:/r"(?:\\.|[^"\\\r\n])*"[imsx]{0,4}/,greedy:!0},string:{pattern:/"""[\s\S]+?"""|(?:\b\w+)?"(?:\\.|[^"\\\r\n])*"|(^|[^\w'])'(?:\\[^\r\n][^'\r\n]*|[^\\\r\n])'|`(?:[^\\`\r\n]|\\.)*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:abstract|baremodule|begin|bitstype|break|catch|ccall|const|continue|do|else|elseif|end|export|finally|for|function|global|if|immutable|import|importall|in|let|local|macro|module|print|println|quote|return|struct|try|type|typealias|using|while)\b/,boolean:/\b(?:true|false)\b/,number:/(?:\b(?=\d)|\B(?=\.))(?:0[box])?(?:[\da-f]+(?:_[\da-f]+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[efp][+-]?\d+(?:_\d+)*)?j?/i,operator:/&&|\|\||[-+*^%÷⊻&$\\]=?|\/[\/=]?|!=?=?|\|[=>]?|<(?:<=?|[=:|])?|>(?:=|>>?=?)?|==?=?|[~≠≤≥'√∛]/,punctuation:/::?|[{}[\]();,.?]/,constant:/\b(?:(?:NaN|Inf)(?:16|32|64)?|im|pi)\b|[πℯ]/}; \ No newline at end of file +Prism.languages.julia={comment:{pattern:/(^|[^\\])(?:#=(?:[^#=]|=(?!#)|#(?!=)|#=(?:[^#=]|=(?!#)|#(?!=))*=#)*=#|#.*)/,lookbehind:!0},regex:{pattern:/r"(?:\\.|[^"\\\r\n])*"[imsx]{0,4}/,greedy:!0},string:{pattern:/"""[\s\S]+?"""|(?:\b\w+)?"(?:\\.|[^"\\\r\n])*"|(^|[^\w'])'(?:\\[^\r\n][^'\r\n]*|[^\\\r\n])'|`(?:[^\\`\r\n]|\\.)*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:abstract|baremodule|begin|bitstype|break|catch|ccall|const|continue|do|else|elseif|end|export|finally|for|function|global|if|immutable|import|importall|in|let|local|macro|module|print|println|quote|return|struct|try|type|typealias|using|while)\b/,boolean:/\b(?:false|true)\b/,number:/(?:\b(?=\d)|\B(?=\.))(?:0[box])?(?:[\da-f]+(?:_[\da-f]+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[efp][+-]?\d+(?:_\d+)*)?j?/i,operator:/&&|\|\||[-+*^%÷⊻&$\\]=?|\/[\/=]?|!=?=?|\|[=>]?|<(?:<=?|[=:|])?|>(?:=|>>?=?)?|==?=?|[~≠≤≥'√∛]/,punctuation:/::?|[{}[\]();,.?]/,constant:/\b(?:(?:Inf|NaN)(?:16|32|64)?|im|pi)\b|[πℯ]/}; \ No newline at end of file diff --git a/components/prism-keyman.js b/components/prism-keyman.js index 5427737f0e..4442c5c542 100644 --- a/components/prism-keyman.js +++ b/components/prism-keyman.js @@ -1,14 +1,14 @@ Prism.languages.keyman = { 'comment': /\bc\s.*/i, - 'function': /\[\s*(?:(?:CTRL|SHIFT|ALT|LCTRL|RCTRL|LALT|RALT|CAPS|NCAPS)\s+)*(?:[TKU]_[\w?]+|".+?"|'.+?')\s*\]/i, // virtual key + 'function': /\[\s*(?:(?:ALT|CAPS|CTRL|LALT|LCTRL|NCAPS|RALT|RCTRL|SHIFT)\s+)*(?:[TKU]_[\w?]+|".+?"|'.+?')\s*\]/i, // virtual key 'string': /("|').*?\1/, 'bold': [ // header statements, system stores and variable system stores - /&(?:baselayout|bitmap|capsononly|capsalwaysoff|shiftfreescaps|copyright|ethnologuecode|hotkey|includecodes|keyboardversion|kmw_embedcss|kmw_embedjs|kmw_helpfile|kmw_helptext|kmw_rtl|language|layer|layoutfile|message|mnemoniclayout|name|oldcharposmatching|platform|targets|version|visualkeyboard|windowslanguages)\b/i, - /\b(?:bitmap|bitmaps|caps on only|caps always off|shift frees caps|copyright|hotkey|language|layout|message|name|version)\b/i + /&(?:baselayout|bitmap|capsalwaysoff|capsononly|copyright|ethnologuecode|hotkey|includecodes|keyboardversion|kmw_embedcss|kmw_embedjs|kmw_helpfile|kmw_helptext|kmw_rtl|language|layer|layoutfile|message|mnemoniclayout|name|oldcharposmatching|platform|shiftfreescaps|targets|version|visualkeyboard|windowslanguages)\b/i, + /\b(?:bitmap|bitmaps|caps always off|caps on only|copyright|hotkey|language|layout|message|name|shift frees caps|version)\b/i ], - 'keyword': /\b(?:any|baselayout|beep|call|context|deadkey|dk|if|index|layer|notany|nul|outs|platform|return|reset|save|set|store|use)\b/i, // rule keywords - 'atrule': /\b(?:ansi|begin|unicode|group|using keys|match|nomatch)\b/i, // structural keywords + 'keyword': /\b(?:any|baselayout|beep|call|context|deadkey|dk|if|index|layer|notany|nul|outs|platform|reset|return|save|set|store|use)\b/i, // rule keywords + 'atrule': /\b(?:ansi|begin|group|match|nomatch|unicode|using keys)\b/i, // structural keywords 'number': /\b(?:U\+[\dA-F]+|d\d+|x[\da-f]+|\d+)\b/i, // U+####, x###, d### characters and numbers 'operator': /[+>\\,()]/, - 'tag': /\$(?:keyman|kmfl|weaver|keymanweb|keymanonly):/i // prefixes + 'tag': /\$(?:keyman|keymanonly|keymanweb|kmfl|weaver):/i // prefixes }; diff --git a/components/prism-keyman.min.js b/components/prism-keyman.min.js index 224ce03b2a..fc1587ce0e 100644 --- a/components/prism-keyman.min.js +++ b/components/prism-keyman.min.js @@ -1 +1 @@ -Prism.languages.keyman={comment:/\bc\s.*/i,function:/\[\s*(?:(?:CTRL|SHIFT|ALT|LCTRL|RCTRL|LALT|RALT|CAPS|NCAPS)\s+)*(?:[TKU]_[\w?]+|".+?"|'.+?')\s*\]/i,string:/("|').*?\1/,bold:[/&(?:baselayout|bitmap|capsononly|capsalwaysoff|shiftfreescaps|copyright|ethnologuecode|hotkey|includecodes|keyboardversion|kmw_embedcss|kmw_embedjs|kmw_helpfile|kmw_helptext|kmw_rtl|language|layer|layoutfile|message|mnemoniclayout|name|oldcharposmatching|platform|targets|version|visualkeyboard|windowslanguages)\b/i,/\b(?:bitmap|bitmaps|caps on only|caps always off|shift frees caps|copyright|hotkey|language|layout|message|name|version)\b/i],keyword:/\b(?:any|baselayout|beep|call|context|deadkey|dk|if|index|layer|notany|nul|outs|platform|return|reset|save|set|store|use)\b/i,atrule:/\b(?:ansi|begin|unicode|group|using keys|match|nomatch)\b/i,number:/\b(?:U\+[\dA-F]+|d\d+|x[\da-f]+|\d+)\b/i,operator:/[+>\\,()]/,tag:/\$(?:keyman|kmfl|weaver|keymanweb|keymanonly):/i}; \ No newline at end of file +Prism.languages.keyman={comment:/\bc\s.*/i,function:/\[\s*(?:(?:ALT|CAPS|CTRL|LALT|LCTRL|NCAPS|RALT|RCTRL|SHIFT)\s+)*(?:[TKU]_[\w?]+|".+?"|'.+?')\s*\]/i,string:/("|').*?\1/,bold:[/&(?:baselayout|bitmap|capsalwaysoff|capsononly|copyright|ethnologuecode|hotkey|includecodes|keyboardversion|kmw_embedcss|kmw_embedjs|kmw_helpfile|kmw_helptext|kmw_rtl|language|layer|layoutfile|message|mnemoniclayout|name|oldcharposmatching|platform|shiftfreescaps|targets|version|visualkeyboard|windowslanguages)\b/i,/\b(?:bitmap|bitmaps|caps always off|caps on only|copyright|hotkey|language|layout|message|name|shift frees caps|version)\b/i],keyword:/\b(?:any|baselayout|beep|call|context|deadkey|dk|if|index|layer|notany|nul|outs|platform|reset|return|save|set|store|use)\b/i,atrule:/\b(?:ansi|begin|group|match|nomatch|unicode|using keys)\b/i,number:/\b(?:U\+[\dA-F]+|d\d+|x[\da-f]+|\d+)\b/i,operator:/[+>\\,()]/,tag:/\$(?:keyman|keymanonly|keymanweb|kmfl|weaver):/i}; \ No newline at end of file diff --git a/components/prism-kusto.js b/components/prism-kusto.js index 165e61a7ee..e4c9bc15b9 100644 --- a/components/prism-kusto.js +++ b/components/prism-kusto.js @@ -20,15 +20,15 @@ Prism.languages.kusto = { }, 'class-name': /\b(?:bool|datetime|decimal|dynamic|guid|int|long|real|string|timespan)\b/, - 'keyword': /\b(?:access|alias|and|anti|as|asc|auto|between|by|database|declare|desc|external|from|fullouter|has_all|in|ingestion|inline|inner|innerunique|into|let|like|local|not|of|on|or|pattern|print|query_parameters|range|restrict|schema|set|step|table|tables|to|view|where|with|(?:has(?:perfix|suffix)?|contains|(?:starts|ends)with)(?:_cs)?|(?:left|right)(?:anti(?:semi)?|inner|outer|semi)?|matches\s+regex|nulls\s+(?:first|last))(?![\w-])/, - 'boolean': /\b(?:true|false|null)\b/, + 'keyword': /\b(?:access|alias|and|anti|as|asc|auto|between|by|(?:contains|(?:ends|starts)with|has(?:perfix|suffix)?)(?:_cs)?|database|declare|desc|external|from|fullouter|has_all|in|ingestion|inline|inner|innerunique|into|(?:left|right)(?:anti(?:semi)?|inner|outer|semi)?|let|like|local|not|of|on|or|pattern|print|query_parameters|range|restrict|schema|set|step|table|tables|to|view|where|with|matches\s+regex|nulls\s+(?:first|last))(?![\w-])/, + 'boolean': /\b(?:false|null|true)\b/, 'function': /\b[a-z_]\w*(?=\s*\()/, 'datetime': [ { // RFC 822 + RFC 850 - pattern: /\b(?:(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun|Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday)\s*,\s*)?\d{1,2}(?:\s+|-)(?:Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)(?:\s+|-)\d{2}\s+\d{2}:\d{2}(?::\d{2})?(?:\s*(?:\b(?:(?:U|GM|[ECMT][DS])T|[A-Z])|[+-]\d{4}))?\b/, + pattern: /\b(?:(?:Fri|Friday|Mon|Monday|Sat|Saturday|Sun|Sunday|Thu|Thursday|Tue|Tuesday|Wed|Wednesday)\s*,\s*)?\d{1,2}(?:\s+|-)(?:Apr|Aug|Dec|Feb|Jan|Jul|Jun|Mar|May|Nov|Oct|Sep)(?:\s+|-)\d{2}\s+\d{2}:\d{2}(?::\d{2})?(?:\s*(?:\b(?:[A-Z]|(?:[ECMT][DS]|GM|U)T)|[+-]\d{4}))?\b/, alias: 'number' }, { @@ -37,7 +37,7 @@ Prism.languages.kusto = { alias: 'number' } ], - 'number': /\b(?:0x[0-9A-Fa-f]+|\d+(?:\.\d+)?(?:[Ee][+-]?\d+)?)(?:(?:min|sec|[mnµ]s|tick|microsecond|[dhms])\b)?|[+-]?\binf\b/, + 'number': /\b(?:0x[0-9A-Fa-f]+|\d+(?:\.\d+)?(?:[Ee][+-]?\d+)?)(?:(?:min|sec|[mnµ]s|[dhms]|microsecond|tick)\b)?|[+-]?\binf\b/, 'operator': /=>|[!=]~|[!=<>]=?|[-+*/%|]|\.\./, 'punctuation': /[()\[\]{},;.:]/ diff --git a/components/prism-kusto.min.js b/components/prism-kusto.min.js index cd4981d6d8..780789653c 100644 --- a/components/prism-kusto.min.js +++ b/components/prism-kusto.min.js @@ -1 +1 @@ -Prism.languages.kusto={comment:{pattern:/\/\/.*/,greedy:!0},string:{pattern:/```[\s\S]*?```|[hH]?(?:"(?:[^\r\n\\"]|\\.)*"|'(?:[^\r\n\\']|\\.)*'|@(?:"[^\r\n"]*"|'[^\r\n']*'))/,greedy:!0},verb:{pattern:/(\|\s*)[a-z][\w-]*/i,lookbehind:!0,alias:"keyword"},command:{pattern:/\.[a-z][a-z\d-]*\b/,alias:"keyword"},"class-name":/\b(?:bool|datetime|decimal|dynamic|guid|int|long|real|string|timespan)\b/,keyword:/\b(?:access|alias|and|anti|as|asc|auto|between|by|database|declare|desc|external|from|fullouter|has_all|in|ingestion|inline|inner|innerunique|into|let|like|local|not|of|on|or|pattern|print|query_parameters|range|restrict|schema|set|step|table|tables|to|view|where|with|(?:has(?:perfix|suffix)?|contains|(?:starts|ends)with)(?:_cs)?|(?:left|right)(?:anti(?:semi)?|inner|outer|semi)?|matches\s+regex|nulls\s+(?:first|last))(?![\w-])/,boolean:/\b(?:true|false|null)\b/,function:/\b[a-z_]\w*(?=\s*\()/,datetime:[{pattern:/\b(?:(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun|Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday)\s*,\s*)?\d{1,2}(?:\s+|-)(?:Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)(?:\s+|-)\d{2}\s+\d{2}:\d{2}(?::\d{2})?(?:\s*(?:\b(?:(?:U|GM|[ECMT][DS])T|[A-Z])|[+-]\d{4}))?\b/,alias:"number"},{pattern:/[+-]?\b(?:\d{4}-\d{2}-\d{2}(?:[ T]\d{2}:\d{2}(?::\d{2}(?:\.\d+)?)?)?|\d{2}:\d{2}(?::\d{2}(?:\.\d+)?)?)Z?/,alias:"number"}],number:/\b(?:0x[0-9A-Fa-f]+|\d+(?:\.\d+)?(?:[Ee][+-]?\d+)?)(?:(?:min|sec|[mnµ]s|tick|microsecond|[dhms])\b)?|[+-]?\binf\b/,operator:/=>|[!=]~|[!=<>]=?|[-+*/%|]|\.\./,punctuation:/[()\[\]{},;.:]/}; \ No newline at end of file +Prism.languages.kusto={comment:{pattern:/\/\/.*/,greedy:!0},string:{pattern:/```[\s\S]*?```|[hH]?(?:"(?:[^\r\n\\"]|\\.)*"|'(?:[^\r\n\\']|\\.)*'|@(?:"[^\r\n"]*"|'[^\r\n']*'))/,greedy:!0},verb:{pattern:/(\|\s*)[a-z][\w-]*/i,lookbehind:!0,alias:"keyword"},command:{pattern:/\.[a-z][a-z\d-]*\b/,alias:"keyword"},"class-name":/\b(?:bool|datetime|decimal|dynamic|guid|int|long|real|string|timespan)\b/,keyword:/\b(?:access|alias|and|anti|as|asc|auto|between|by|(?:contains|(?:ends|starts)with|has(?:perfix|suffix)?)(?:_cs)?|database|declare|desc|external|from|fullouter|has_all|in|ingestion|inline|inner|innerunique|into|(?:left|right)(?:anti(?:semi)?|inner|outer|semi)?|let|like|local|not|of|on|or|pattern|print|query_parameters|range|restrict|schema|set|step|table|tables|to|view|where|with|matches\s+regex|nulls\s+(?:first|last))(?![\w-])/,boolean:/\b(?:false|null|true)\b/,function:/\b[a-z_]\w*(?=\s*\()/,datetime:[{pattern:/\b(?:(?:Fri|Friday|Mon|Monday|Sat|Saturday|Sun|Sunday|Thu|Thursday|Tue|Tuesday|Wed|Wednesday)\s*,\s*)?\d{1,2}(?:\s+|-)(?:Apr|Aug|Dec|Feb|Jan|Jul|Jun|Mar|May|Nov|Oct|Sep)(?:\s+|-)\d{2}\s+\d{2}:\d{2}(?::\d{2})?(?:\s*(?:\b(?:[A-Z]|(?:[ECMT][DS]|GM|U)T)|[+-]\d{4}))?\b/,alias:"number"},{pattern:/[+-]?\b(?:\d{4}-\d{2}-\d{2}(?:[ T]\d{2}:\d{2}(?::\d{2}(?:\.\d+)?)?)?|\d{2}:\d{2}(?::\d{2}(?:\.\d+)?)?)Z?/,alias:"number"}],number:/\b(?:0x[0-9A-Fa-f]+|\d+(?:\.\d+)?(?:[Ee][+-]?\d+)?)(?:(?:min|sec|[mnµ]s|[dhms]|microsecond|tick)\b)?|[+-]?\binf\b/,operator:/=>|[!=]~|[!=<>]=?|[-+*/%|]|\.\./,punctuation:/[()\[\]{},;.:]/}; \ No newline at end of file diff --git a/components/prism-latex.js b/components/prism-latex.js index 798d6d0979..461f6a56ef 100644 --- a/components/prism-latex.js +++ b/components/prism-latex.js @@ -11,7 +11,7 @@ 'comment': /%.*/m, // the verbatim environment prints whitespace to the document 'cdata': { - pattern: /(\\begin\{((?:verbatim|lstlisting)\*?)\})[\s\S]*?(?=\\end\{\2\})/, + pattern: /(\\begin\{((?:lstlisting|verbatim)\*?)\})[\s\S]*?(?=\\end\{\2\})/, lookbehind: true }, /* @@ -25,7 +25,7 @@ alias: 'string' }, { - pattern: /(\\begin\{((?:equation|math|eqnarray|align|multline|gather)\*?)\})[\s\S]*?(?=\\end\{\2\})/, + pattern: /(\\begin\{((?:align|eqnarray|equation|gather|math|multline)\*?)\})[\s\S]*?(?=\\end\{\2\})/, lookbehind: true, inside: insideEqu, alias: 'string' @@ -36,7 +36,7 @@ * as keywords */ 'keyword': { - pattern: /(\\(?:begin|end|ref|cite|label|usepackage|documentclass)(?:\[[^\]]+\])?\{)[^}]+(?=\})/, + pattern: /(\\(?:begin|cite|documentclass|end|label|ref|usepackage)(?:\[[^\]]+\])?\{)[^}]+(?=\})/, lookbehind: true }, 'url': { @@ -48,7 +48,7 @@ * they stand out more */ 'headline': { - pattern: /(\\(?:part|chapter|section|subsection|frametitle|subsubsection|paragraph|subparagraph|subsubparagraph|subsubsubparagraph)\*?(?:\[[^\]]+\])?\{)[^}]+(?=\})/, + pattern: /(\\(?:chapter|frametitle|paragraph|part|section|subparagraph|subsection|subsubparagraph|subsubsection|subsubsubparagraph)\*?(?:\[[^\]]+\])?\{)[^}]+(?=\})/, lookbehind: true, alias: 'class-name' }, diff --git a/components/prism-latex.min.js b/components/prism-latex.min.js index 5d0a5210b2..177f6a310b 100644 --- a/components/prism-latex.min.js +++ b/components/prism-latex.min.js @@ -1 +1 @@ -!function(a){var e=/\\(?:[^a-z()[\]]|[a-z*]+)/i,n={"equation-command":{pattern:e,alias:"regex"}};a.languages.latex={comment:/%.*/m,cdata:{pattern:/(\\begin\{((?:verbatim|lstlisting)\*?)\})[\s\S]*?(?=\\end\{\2\})/,lookbehind:!0},equation:[{pattern:/\$\$(?:\\[\s\S]|[^\\$])+\$\$|\$(?:\\[\s\S]|[^\\$])+\$|\\\([\s\S]*?\\\)|\\\[[\s\S]*?\\\]/,inside:n,alias:"string"},{pattern:/(\\begin\{((?:equation|math|eqnarray|align|multline|gather)\*?)\})[\s\S]*?(?=\\end\{\2\})/,lookbehind:!0,inside:n,alias:"string"}],keyword:{pattern:/(\\(?:begin|end|ref|cite|label|usepackage|documentclass)(?:\[[^\]]+\])?\{)[^}]+(?=\})/,lookbehind:!0},url:{pattern:/(\\url\{)[^}]+(?=\})/,lookbehind:!0},headline:{pattern:/(\\(?:part|chapter|section|subsection|frametitle|subsubsection|paragraph|subparagraph|subsubparagraph|subsubsubparagraph)\*?(?:\[[^\]]+\])?\{)[^}]+(?=\})/,lookbehind:!0,alias:"class-name"},function:{pattern:e,alias:"selector"},punctuation:/[[\]{}&]/},a.languages.tex=a.languages.latex,a.languages.context=a.languages.latex}(Prism); \ No newline at end of file +!function(a){var e=/\\(?:[^a-z()[\]]|[a-z*]+)/i,n={"equation-command":{pattern:e,alias:"regex"}};a.languages.latex={comment:/%.*/m,cdata:{pattern:/(\\begin\{((?:lstlisting|verbatim)\*?)\})[\s\S]*?(?=\\end\{\2\})/,lookbehind:!0},equation:[{pattern:/\$\$(?:\\[\s\S]|[^\\$])+\$\$|\$(?:\\[\s\S]|[^\\$])+\$|\\\([\s\S]*?\\\)|\\\[[\s\S]*?\\\]/,inside:n,alias:"string"},{pattern:/(\\begin\{((?:align|eqnarray|equation|gather|math|multline)\*?)\})[\s\S]*?(?=\\end\{\2\})/,lookbehind:!0,inside:n,alias:"string"}],keyword:{pattern:/(\\(?:begin|cite|documentclass|end|label|ref|usepackage)(?:\[[^\]]+\])?\{)[^}]+(?=\})/,lookbehind:!0},url:{pattern:/(\\url\{)[^}]+(?=\})/,lookbehind:!0},headline:{pattern:/(\\(?:chapter|frametitle|paragraph|part|section|subparagraph|subsection|subsubparagraph|subsubsection|subsubsubparagraph)\*?(?:\[[^\]]+\])?\{)[^}]+(?=\})/,lookbehind:!0,alias:"class-name"},function:{pattern:e,alias:"selector"},punctuation:/[[\]{}&]/},a.languages.tex=a.languages.latex,a.languages.context=a.languages.latex}(Prism); \ No newline at end of file diff --git a/components/prism-liquid.js b/components/prism-liquid.js index 149d0bcdac..b8f27fe455 100644 --- a/components/prism-liquid.js +++ b/components/prism-liquid.js @@ -11,7 +11,7 @@ Prism.languages.liquid = { pattern: /"[^"]*"|'[^']*'/, greedy: true }, - 'keyword': /\b(?:as|assign|break|continue|cycle|decrement|echo|else|elsif|(?:end)?(?:capture|case|comment|for|form|if|paginate|style|raw|tablerow|unless)|in|include|increment|limit|liquid|offset|range|render|reversed|section|when|with)\b/, + 'keyword': /\b(?:as|assign|break|(?:end)?(?:capture|case|comment|for|form|if|paginate|raw|style|tablerow|unless)|continue|cycle|decrement|echo|else|elsif|in|include|increment|limit|liquid|offset|range|render|reversed|section|when|with)\b/, 'object': /\b(?:address|all_country_option_tags|article|block|blog|cart|checkout|collection|color|comment|country|country_option_tags|currency|current_page|current_tags|customer|customer_address|date|discount_allocation|discount_application|external_video|filter|filter_value|font|forloop|form|fulfillment|generic_file|gift_card|group|handle|image|line_item|link|linklist|localization|location|measurement|media|metafield|model|model_source|order|page|page_description|page_image|page_title|paginate|part|policy|product|product_option|recommendations|request|robots|routes|rule|script|search|section|selling_plan|selling_plan_allocation|selling_plan_group|shipping_method|shop|shop_locale|sitemap|store_availability|tablerow|tax_line|template|theme|transaction|unit_price_measurement|user_agent|variant|video|video_source)\b/, 'function': [ { @@ -25,14 +25,14 @@ Prism.languages.liquid = { lookbehind: true } ], - 'boolean': /\b(?:true|false|nil)\b/, + 'boolean': /\b(?:false|nil|true)\b/, 'range': { pattern: /\.\./, alias: 'operator' }, // https://github.com/Shopify/liquid/blob/698f5e0d967423e013f6169d9111bd969bd78337/lib/liquid/lexer.rb#L21 'number': /\b\d+(?:\.\d+)?\b/, - 'operator': /[!=]=|<>|[<>]=?|[|?:=-]|\b(?:and|or|contains(?=\s))\b/, + 'operator': /[!=]=|<>|[<>]=?|[|?:=-]|\b(?:and|contains(?=\s)|or)\b/, 'punctuation': /[.,\[\]()]/, 'empty': { pattern: /\bempty\b/, diff --git a/components/prism-liquid.min.js b/components/prism-liquid.min.js index 677b29ab72..98b04aeba6 100644 --- a/components/prism-liquid.min.js +++ b/components/prism-liquid.min.js @@ -1 +1 @@ -Prism.languages.liquid={comment:{pattern:/(^\{%\s*comment\s*%\})[\s\S]+(?=\{%\s*endcomment\s*%\}$)/,lookbehind:!0},delimiter:{pattern:/^\{(?:\{\{|[%\{])-?|-?(?:\}\}|[%\}])\}$/,alias:"punctuation"},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},keyword:/\b(?:as|assign|break|continue|cycle|decrement|echo|else|elsif|(?:end)?(?:capture|case|comment|for|form|if|paginate|style|raw|tablerow|unless)|in|include|increment|limit|liquid|offset|range|render|reversed|section|when|with)\b/,object:/\b(?:address|all_country_option_tags|article|block|blog|cart|checkout|collection|color|comment|country|country_option_tags|currency|current_page|current_tags|customer|customer_address|date|discount_allocation|discount_application|external_video|filter|filter_value|font|forloop|form|fulfillment|generic_file|gift_card|group|handle|image|line_item|link|linklist|localization|location|measurement|media|metafield|model|model_source|order|page|page_description|page_image|page_title|paginate|part|policy|product|product_option|recommendations|request|robots|routes|rule|script|search|section|selling_plan|selling_plan_allocation|selling_plan_group|shipping_method|shop|shop_locale|sitemap|store_availability|tablerow|tax_line|template|theme|transaction|unit_price_measurement|user_agent|variant|video|video_source)\b/,function:[{pattern:/(\|\s*)\w+/,lookbehind:!0,alias:"filter"},{pattern:/(\.\s*)(?:first|last|size)/,lookbehind:!0}],boolean:/\b(?:true|false|nil)\b/,range:{pattern:/\.\./,alias:"operator"},number:/\b\d+(?:\.\d+)?\b/,operator:/[!=]=|<>|[<>]=?|[|?:=-]|\b(?:and|or|contains(?=\s))\b/,punctuation:/[.,\[\]()]/,empty:{pattern:/\bempty\b/,alias:"keyword"}},Prism.hooks.add("before-tokenize",function(e){var a=!1;Prism.languages["markup-templating"].buildPlaceholders(e,"liquid",/\{%\s*comment\s*%\}[\s\S]*?\{%\s*endcomment\s*%\}|\{(?:%[\s\S]*?%|\{\{[\s\S]*?\}\}|\{[\s\S]*?\})\}/g,function(e){var t=/^\{%-?\s*(\w+)/.exec(e);if(t){var n=t[1];if("raw"===n&&!a)return a=!0;if("endraw"===n)return!(a=!1)}return!a})}),Prism.hooks.add("after-tokenize",function(e){Prism.languages["markup-templating"].tokenizePlaceholders(e,"liquid")}); \ No newline at end of file +Prism.languages.liquid={comment:{pattern:/(^\{%\s*comment\s*%\})[\s\S]+(?=\{%\s*endcomment\s*%\}$)/,lookbehind:!0},delimiter:{pattern:/^\{(?:\{\{|[%\{])-?|-?(?:\}\}|[%\}])\}$/,alias:"punctuation"},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},keyword:/\b(?:as|assign|break|(?:end)?(?:capture|case|comment|for|form|if|paginate|raw|style|tablerow|unless)|continue|cycle|decrement|echo|else|elsif|in|include|increment|limit|liquid|offset|range|render|reversed|section|when|with)\b/,object:/\b(?:address|all_country_option_tags|article|block|blog|cart|checkout|collection|color|comment|country|country_option_tags|currency|current_page|current_tags|customer|customer_address|date|discount_allocation|discount_application|external_video|filter|filter_value|font|forloop|form|fulfillment|generic_file|gift_card|group|handle|image|line_item|link|linklist|localization|location|measurement|media|metafield|model|model_source|order|page|page_description|page_image|page_title|paginate|part|policy|product|product_option|recommendations|request|robots|routes|rule|script|search|section|selling_plan|selling_plan_allocation|selling_plan_group|shipping_method|shop|shop_locale|sitemap|store_availability|tablerow|tax_line|template|theme|transaction|unit_price_measurement|user_agent|variant|video|video_source)\b/,function:[{pattern:/(\|\s*)\w+/,lookbehind:!0,alias:"filter"},{pattern:/(\.\s*)(?:first|last|size)/,lookbehind:!0}],boolean:/\b(?:false|nil|true)\b/,range:{pattern:/\.\./,alias:"operator"},number:/\b\d+(?:\.\d+)?\b/,operator:/[!=]=|<>|[<>]=?|[|?:=-]|\b(?:and|contains(?=\s)|or)\b/,punctuation:/[.,\[\]()]/,empty:{pattern:/\bempty\b/,alias:"keyword"}},Prism.hooks.add("before-tokenize",function(e){var a=!1;Prism.languages["markup-templating"].buildPlaceholders(e,"liquid",/\{%\s*comment\s*%\}[\s\S]*?\{%\s*endcomment\s*%\}|\{(?:%[\s\S]*?%|\{\{[\s\S]*?\}\}|\{[\s\S]*?\})\}/g,function(e){var t=/^\{%-?\s*(\w+)/.exec(e);if(t){var n=t[1];if("raw"===n&&!a)return a=!0;if("endraw"===n)return!(a=!1)}return!a})}),Prism.hooks.add("after-tokenize",function(e){Prism.languages["markup-templating"].tokenizePlaceholders(e,"liquid")}); \ No newline at end of file diff --git a/components/prism-lisp.js b/components/prism-lisp.js index 1846787a92..8de9386221 100644 --- a/components/prism-lisp.js +++ b/components/prism-lisp.js @@ -55,14 +55,14 @@ { pattern: RegExp( par + - '(?:(?:lexical-)?let\\*?|(?:cl-)?letf|if|when|while|unless|cons|cl-loop|and|or|not|cond|setq|error|message|null|require|provide|use-package)' + + '(?:and|(?:cl-)?letf|cl-loop|cond|cons|error|if|(?:lexical-)?let\\*?|message|not|null|or|provide|require|setq|unless|use-package|when|while)' + space ), lookbehind: true }, { pattern: RegExp( - par + '(?:for|do|collect|return|finally|append|concat|in|by)' + space + par + '(?:append|by|collect|concat|do|finally|for|in|return)' + space ), lookbehind: true }, @@ -86,7 +86,7 @@ lookbehind: true }, defvar: { - pattern: RegExp(par + 'def(?:var|const|custom|group)\\s+' + symbol), + pattern: RegExp(par + 'def(?:const|custom|group|var)\\s+' + symbol), lookbehind: true, inside: { keyword: /^def[a-z]+/, @@ -96,7 +96,7 @@ defun: { pattern: RegExp( par + - '(?:cl-)?(?:defun\\*?|defmacro)\\s+' + + '(?:cl-)?(?:defmacro|defun\\*?)\\s+' + symbol + '\\s+\\([\\s\\S]*?\\)' ), @@ -167,11 +167,11 @@ lookbehind: true, inside: { 'rest-vars': { - pattern: RegExp('&(?:rest|body)\\s+' + forms), + pattern: RegExp('&(?:body|rest)\\s+' + forms), inside: arg }, 'other-marker-vars': { - pattern: RegExp('&(?:optional|aux)\\s+' + forms), + pattern: RegExp('&(?:aux|optional)\\s+' + forms), inside: arg }, keys: { diff --git a/components/prism-lisp.min.js b/components/prism-lisp.min.js index 2c7e39b65f..1c638fa70e 100644 --- a/components/prism-lisp.min.js +++ b/components/prism-lisp.min.js @@ -1 +1 @@ -!function(e){function n(e){return RegExp("(\\()"+e+"(?=[\\s\\)])")}function a(e){return RegExp("([\\s([])"+e+"(?=[\\s)])")}var t="[-+*/~!@$%^=<>{}\\w]+",r="(\\()",s="(?=\\))",i="(?=\\s)",o={heading:{pattern:/;;;.*/,alias:["comment","title"]},comment:/;.*/,string:{pattern:/"(?:[^"\\]|\\.)*"/,greedy:!0,inside:{argument:/[-A-Z]+(?=[.,\s])/,symbol:RegExp("`"+t+"'")}},"quoted-symbol":{pattern:RegExp("#?'"+t),alias:["variable","symbol"]},"lisp-property":{pattern:RegExp(":"+t),alias:"property"},splice:{pattern:RegExp(",@?"+t),alias:["symbol","variable"]},keyword:[{pattern:RegExp(r+"(?:(?:lexical-)?let\\*?|(?:cl-)?letf|if|when|while|unless|cons|cl-loop|and|or|not|cond|setq|error|message|null|require|provide|use-package)"+i),lookbehind:!0},{pattern:RegExp(r+"(?:for|do|collect|return|finally|append|concat|in|by)"+i),lookbehind:!0}],declare:{pattern:n("declare"),lookbehind:!0,alias:"keyword"},interactive:{pattern:n("interactive"),lookbehind:!0,alias:"keyword"},boolean:{pattern:a("(?:t|nil)"),lookbehind:!0},number:{pattern:a("[-+]?\\d+(?:\\.\\d*)?"),lookbehind:!0},defvar:{pattern:RegExp(r+"def(?:var|const|custom|group)\\s+"+t),lookbehind:!0,inside:{keyword:/^def[a-z]+/,variable:RegExp(t)}},defun:{pattern:RegExp(r+"(?:cl-)?(?:defun\\*?|defmacro)\\s+"+t+"\\s+\\([\\s\\S]*?\\)"),lookbehind:!0,inside:{keyword:/^(?:cl-)?def\S+/,arguments:null,function:{pattern:RegExp("(^\\s)"+t),lookbehind:!0},punctuation:/[()]/}},lambda:{pattern:RegExp(r+"lambda\\s+\\(\\s*(?:&?"+t+"(?:\\s+&?"+t+")*\\s*)?\\)"),lookbehind:!0,inside:{keyword:/^lambda/,arguments:null,punctuation:/[()]/}},car:{pattern:RegExp(r+t),lookbehind:!0},punctuation:[/(?:['`,]?\(|[)\[\]])/,{pattern:/(\s)\.(?=\s)/,lookbehind:!0}]},l={"lisp-marker":RegExp("&[-+*/~!@$%^=<>{}\\w]+"),rest:{argument:{pattern:RegExp(t),alias:"variable"},varform:{pattern:RegExp(r+t+"\\s+\\S[\\s\\S]*"+s),lookbehind:!0,inside:{string:o.string,boolean:o.boolean,number:o.number,symbol:o.symbol,punctuation:/[()]/}}}},p="\\S+(?:\\s+\\S+)*",d={pattern:RegExp(r+"[\\s\\S]*"+s),lookbehind:!0,inside:{"rest-vars":{pattern:RegExp("&(?:rest|body)\\s+"+p),inside:l},"other-marker-vars":{pattern:RegExp("&(?:optional|aux)\\s+"+p),inside:l},keys:{pattern:RegExp("&key\\s+"+p+"(?:\\s+&allow-other-keys)?"),inside:l},argument:{pattern:RegExp(t),alias:"variable"},punctuation:/[()]/}};o.lambda.inside.arguments=d,o.defun.inside.arguments=e.util.clone(d),o.defun.inside.arguments.inside.sublist=d,e.languages.lisp=o,e.languages.elisp=o,e.languages.emacs=o,e.languages["emacs-lisp"]=o}(Prism); \ No newline at end of file +!function(e){function n(e){return RegExp("(\\()"+e+"(?=[\\s\\)])")}function a(e){return RegExp("([\\s([])"+e+"(?=[\\s)])")}var t="[-+*/~!@$%^=<>{}\\w]+",r="(\\()",s="(?=\\))",i="(?=\\s)",o={heading:{pattern:/;;;.*/,alias:["comment","title"]},comment:/;.*/,string:{pattern:/"(?:[^"\\]|\\.)*"/,greedy:!0,inside:{argument:/[-A-Z]+(?=[.,\s])/,symbol:RegExp("`"+t+"'")}},"quoted-symbol":{pattern:RegExp("#?'"+t),alias:["variable","symbol"]},"lisp-property":{pattern:RegExp(":"+t),alias:"property"},splice:{pattern:RegExp(",@?"+t),alias:["symbol","variable"]},keyword:[{pattern:RegExp(r+"(?:and|(?:cl-)?letf|cl-loop|cond|cons|error|if|(?:lexical-)?let\\*?|message|not|null|or|provide|require|setq|unless|use-package|when|while)"+i),lookbehind:!0},{pattern:RegExp(r+"(?:append|by|collect|concat|do|finally|for|in|return)"+i),lookbehind:!0}],declare:{pattern:n("declare"),lookbehind:!0,alias:"keyword"},interactive:{pattern:n("interactive"),lookbehind:!0,alias:"keyword"},boolean:{pattern:a("(?:t|nil)"),lookbehind:!0},number:{pattern:a("[-+]?\\d+(?:\\.\\d*)?"),lookbehind:!0},defvar:{pattern:RegExp(r+"def(?:const|custom|group|var)\\s+"+t),lookbehind:!0,inside:{keyword:/^def[a-z]+/,variable:RegExp(t)}},defun:{pattern:RegExp(r+"(?:cl-)?(?:defmacro|defun\\*?)\\s+"+t+"\\s+\\([\\s\\S]*?\\)"),lookbehind:!0,inside:{keyword:/^(?:cl-)?def\S+/,arguments:null,function:{pattern:RegExp("(^\\s)"+t),lookbehind:!0},punctuation:/[()]/}},lambda:{pattern:RegExp(r+"lambda\\s+\\(\\s*(?:&?"+t+"(?:\\s+&?"+t+")*\\s*)?\\)"),lookbehind:!0,inside:{keyword:/^lambda/,arguments:null,punctuation:/[()]/}},car:{pattern:RegExp(r+t),lookbehind:!0},punctuation:[/(?:['`,]?\(|[)\[\]])/,{pattern:/(\s)\.(?=\s)/,lookbehind:!0}]},l={"lisp-marker":RegExp("&[-+*/~!@$%^=<>{}\\w]+"),rest:{argument:{pattern:RegExp(t),alias:"variable"},varform:{pattern:RegExp(r+t+"\\s+\\S[\\s\\S]*"+s),lookbehind:!0,inside:{string:o.string,boolean:o.boolean,number:o.number,symbol:o.symbol,punctuation:/[()]/}}}},p="\\S+(?:\\s+\\S+)*",d={pattern:RegExp(r+"[\\s\\S]*"+s),lookbehind:!0,inside:{"rest-vars":{pattern:RegExp("&(?:body|rest)\\s+"+p),inside:l},"other-marker-vars":{pattern:RegExp("&(?:aux|optional)\\s+"+p),inside:l},keys:{pattern:RegExp("&key\\s+"+p+"(?:\\s+&allow-other-keys)?"),inside:l},argument:{pattern:RegExp(t),alias:"variable"},punctuation:/[()]/}};o.lambda.inside.arguments=d,o.defun.inside.arguments=e.util.clone(d),o.defun.inside.arguments.inside.sublist=d,e.languages.lisp=o,e.languages.elisp=o,e.languages.emacs=o,e.languages["emacs-lisp"]=o}(Prism); \ No newline at end of file diff --git a/components/prism-livescript.js b/components/prism-livescript.js index bc0c157ca5..d91a7caa66 100644 --- a/components/prism-livescript.js +++ b/components/prism-livescript.js @@ -66,7 +66,7 @@ Prism.languages.livescript = { lookbehind: true }, 'keyword-operator': { - pattern: /(^|[^-])\b(?:(?:delete|require|typeof)!|(?:and|by|delete|export|from|import(?: all)?|in|instanceof|is(?:nt| not)?|not|of|or|til|to|typeof|with|xor)(?!-)\b)/m, + pattern: /(^|[^-])\b(?:(?:delete|require|typeof)!|(?:and|by|delete|export|from|import(?: all)?|in|instanceof|is(?: not|nt)?|not|of|or|til|to|typeof|with|xor)(?!-)\b)/m, lookbehind: true, alias: 'operator' }, diff --git a/components/prism-livescript.min.js b/components/prism-livescript.min.js index be566cf888..c639e5f396 100644 --- a/components/prism-livescript.min.js +++ b/components/prism-livescript.min.js @@ -1 +1 @@ -Prism.languages.livescript={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?\*\//,lookbehind:!0},{pattern:/(^|[^\\])#.*/,lookbehind:!0}],"interpolated-string":{pattern:/(^|[^"])("""|")(?:\\[\s\S]|(?!\2)[^\\])*\2(?!")/,lookbehind:!0,greedy:!0,inside:{variable:{pattern:/(^|[^\\])#[a-z_](?:-?[a-z]|[\d_])*/m,lookbehind:!0},interpolation:{pattern:/(^|[^\\])#\{[^}]+\}/m,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^#\{|\}$/,alias:"variable"}}},string:/[\s\S]+/}},string:[{pattern:/('''|')(?:\\[\s\S]|(?!\1)[^\\])*\1/,greedy:!0},{pattern:/<\[[\s\S]*?\]>/,greedy:!0},/\\[^\s,;\])}]+/],regex:[{pattern:/\/\/(?:\[[^\r\n\]]*\]|\\.|(?!\/\/)[^\\\[])+\/\/[gimyu]{0,5}/,greedy:!0,inside:{comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0}}},{pattern:/\/(?:\[[^\r\n\]]*\]|\\.|[^/\\\r\n\[])+\/[gimyu]{0,5}/,greedy:!0}],keyword:{pattern:/(^|(?!-).)\b(?:break|case|catch|class|const|continue|default|do|else|extends|fallthrough|finally|for(?: ever)?|function|if|implements|it|let|loop|new|null|otherwise|own|return|super|switch|that|then|this|throw|try|unless|until|var|void|when|while|yield)(?!-)\b/m,lookbehind:!0},"keyword-operator":{pattern:/(^|[^-])\b(?:(?:delete|require|typeof)!|(?:and|by|delete|export|from|import(?: all)?|in|instanceof|is(?:nt| not)?|not|of|or|til|to|typeof|with|xor)(?!-)\b)/m,lookbehind:!0,alias:"operator"},boolean:{pattern:/(^|[^-])\b(?:false|no|off|on|true|yes)(?!-)\b/m,lookbehind:!0},argument:{pattern:/(^|(?!\.&\.)[^&])&(?!&)\d*/m,lookbehind:!0,alias:"variable"},number:/\b(?:\d+~[\da-z]+|\d[\d_]*(?:\.\d[\d_]*)?(?:[a-z]\w*)?)/i,identifier:/[a-z_](?:-?[a-z]|[\d_])*/i,operator:[{pattern:/( )\.(?= )/,lookbehind:!0},/\.(?:[=~]|\.\.?)|\.(?:[&|^]|<<|>>>?)\.|:(?:=|:=?)|&&|\|[|>]|<(?:<[>=?]?|-(?:->?|>)?|\+\+?|@@?|%%?|\*\*?|!(?:~?=|--?>|~?~>)?|~(?:~?>|=)?|==?|\^\^?|[\/?]/],punctuation:/[(){}\[\]|.,:;`]/},Prism.languages.livescript["interpolated-string"].inside.interpolation.inside.rest=Prism.languages.livescript; \ No newline at end of file +Prism.languages.livescript={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?\*\//,lookbehind:!0},{pattern:/(^|[^\\])#.*/,lookbehind:!0}],"interpolated-string":{pattern:/(^|[^"])("""|")(?:\\[\s\S]|(?!\2)[^\\])*\2(?!")/,lookbehind:!0,greedy:!0,inside:{variable:{pattern:/(^|[^\\])#[a-z_](?:-?[a-z]|[\d_])*/m,lookbehind:!0},interpolation:{pattern:/(^|[^\\])#\{[^}]+\}/m,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^#\{|\}$/,alias:"variable"}}},string:/[\s\S]+/}},string:[{pattern:/('''|')(?:\\[\s\S]|(?!\1)[^\\])*\1/,greedy:!0},{pattern:/<\[[\s\S]*?\]>/,greedy:!0},/\\[^\s,;\])}]+/],regex:[{pattern:/\/\/(?:\[[^\r\n\]]*\]|\\.|(?!\/\/)[^\\\[])+\/\/[gimyu]{0,5}/,greedy:!0,inside:{comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0}}},{pattern:/\/(?:\[[^\r\n\]]*\]|\\.|[^/\\\r\n\[])+\/[gimyu]{0,5}/,greedy:!0}],keyword:{pattern:/(^|(?!-).)\b(?:break|case|catch|class|const|continue|default|do|else|extends|fallthrough|finally|for(?: ever)?|function|if|implements|it|let|loop|new|null|otherwise|own|return|super|switch|that|then|this|throw|try|unless|until|var|void|when|while|yield)(?!-)\b/m,lookbehind:!0},"keyword-operator":{pattern:/(^|[^-])\b(?:(?:delete|require|typeof)!|(?:and|by|delete|export|from|import(?: all)?|in|instanceof|is(?: not|nt)?|not|of|or|til|to|typeof|with|xor)(?!-)\b)/m,lookbehind:!0,alias:"operator"},boolean:{pattern:/(^|[^-])\b(?:false|no|off|on|true|yes)(?!-)\b/m,lookbehind:!0},argument:{pattern:/(^|(?!\.&\.)[^&])&(?!&)\d*/m,lookbehind:!0,alias:"variable"},number:/\b(?:\d+~[\da-z]+|\d[\d_]*(?:\.\d[\d_]*)?(?:[a-z]\w*)?)/i,identifier:/[a-z_](?:-?[a-z]|[\d_])*/i,operator:[{pattern:/( )\.(?= )/,lookbehind:!0},/\.(?:[=~]|\.\.?)|\.(?:[&|^]|<<|>>>?)\.|:(?:=|:=?)|&&|\|[|>]|<(?:<[>=?]?|-(?:->?|>)?|\+\+?|@@?|%%?|\*\*?|!(?:~?=|--?>|~?~>)?|~(?:~?>|=)?|==?|\^\^?|[\/?]/],punctuation:/[(){}\[\]|.,:;`]/},Prism.languages.livescript["interpolated-string"].inside.interpolation.inside.rest=Prism.languages.livescript; \ No newline at end of file diff --git a/components/prism-llvm.js b/components/prism-llvm.js index 60966def75..e7ab85d6f3 100644 --- a/components/prism-llvm.js +++ b/components/prism-llvm.js @@ -5,7 +5,7 @@ pattern: /"[^"]*"/, greedy: true, }, - 'boolean': /\b(?:true|false)\b/, + 'boolean': /\b(?:false|true)\b/, 'variable': /[%@!#](?:(?!\d)(?:[-$.\w]|\\[a-f\d]{2})+|\d+)/i, 'label': /(?!\d)(?:[-$.\w]|\\[a-f\d]{2})+:/i, 'type': { diff --git a/components/prism-llvm.min.js b/components/prism-llvm.min.js index e0b0636b27..7e178801b5 100644 --- a/components/prism-llvm.min.js +++ b/components/prism-llvm.min.js @@ -1 +1 @@ -Prism.languages.llvm={comment:/;.*/,string:{pattern:/"[^"]*"/,greedy:!0},boolean:/\b(?:true|false)\b/,variable:/[%@!#](?:(?!\d)(?:[-$.\w]|\\[a-f\d]{2})+|\d+)/i,label:/(?!\d)(?:[-$.\w]|\\[a-f\d]{2})+:/i,type:{pattern:/\b(?:double|float|fp128|half|i[1-9]\d*|label|metadata|ppc_fp128|token|void|x86_fp80|x86_mmx)\b/,alias:"class-name"},keyword:/\b[a-z_][a-z_0-9]*\b/,number:/[+-]?\b\d+(?:\.\d+)?(?:[eE][+-]?\d+)?\b|\b0x[\dA-Fa-f]+\b|\b0xK[\dA-Fa-f]{20}\b|\b0x[ML][\dA-Fa-f]{32}\b|\b0xH[\dA-Fa-f]{4}\b/,punctuation:/[{}[\];(),.!*=<>]/}; \ No newline at end of file +Prism.languages.llvm={comment:/;.*/,string:{pattern:/"[^"]*"/,greedy:!0},boolean:/\b(?:false|true)\b/,variable:/[%@!#](?:(?!\d)(?:[-$.\w]|\\[a-f\d]{2})+|\d+)/i,label:/(?!\d)(?:[-$.\w]|\\[a-f\d]{2})+:/i,type:{pattern:/\b(?:double|float|fp128|half|i[1-9]\d*|label|metadata|ppc_fp128|token|void|x86_fp80|x86_mmx)\b/,alias:"class-name"},keyword:/\b[a-z_][a-z_0-9]*\b/,number:/[+-]?\b\d+(?:\.\d+)?(?:[eE][+-]?\d+)?\b|\b0x[\dA-Fa-f]+\b|\b0xK[\dA-Fa-f]{20}\b|\b0x[ML][\dA-Fa-f]{32}\b|\b0xH[\dA-Fa-f]{4}\b/,punctuation:/[{}[\];(),.!*=<>]/}; \ No newline at end of file diff --git a/components/prism-log.js b/components/prism-log.js index 4ec02053f5..678bfe19bc 100644 --- a/components/prism-log.js +++ b/components/prism-log.js @@ -11,7 +11,7 @@ Prism.languages.log = { }, 'exception': { - pattern: /(^|[^\w.])[a-z][\w.]*(?:Exception|Error):.*(?:(?:\r\n?|\n)[ \t]*(?:at[ \t].+|\.{3}.*|Caused by:.*))+(?:(?:\r\n?|\n)[ \t]*\.\.\. .*)?/, + pattern: /(^|[^\w.])[a-z][\w.]*(?:Error|Exception):.*(?:(?:\r\n?|\n)[ \t]*(?:at[ \t].+|\.{3}.*|Caused by:.*))+(?:(?:\r\n?|\n)[ \t]*\.\.\. .*)?/, lookbehind: true, greedy: true, alias: ['javastacktrace', 'language-javastacktrace'], @@ -56,7 +56,7 @@ Prism.languages.log = { alias: 'comment' }, - 'url': /\b(?:https?|ftp|file):\/\/[^\s|,;'"]*[^\s|,;'">.]/, + 'url': /\b(?:file|ftp|https?):\/\/[^\s|,;'"]*[^\s|,;'">.]/, 'email': { pattern: /(^|\s)[-\w+.]+@[a-z][a-z0-9-]*(?:\.[a-z][a-z0-9-]*)+(?=\s)/, lookbehind: true, @@ -97,9 +97,9 @@ Prism.languages.log = { pattern: RegExp( /\b\d{4}[-/]\d{2}[-/]\d{2}(?:T(?=\d{1,2}:)|(?=\s\d{1,2}:))/.source + '|' + - /\b\d{1,4}[-/ ](?:\d{1,2}|Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)[-/ ]\d{2,4}T?\b/.source + + /\b\d{1,4}[-/ ](?:\d{1,2}|Apr|Aug|Dec|Feb|Jan|Jul|Jun|Mar|May|Nov|Oct|Sep)[-/ ]\d{2,4}T?\b/.source + '|' + - /\b(?:(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun)(?:\s{1,2}(?:Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec))?|Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s{1,2}\d{1,2}\b/.source, + /\b(?:(?:Fri|Mon|Sat|Sun|Thu|Tue|Wed)(?:\s{1,2}(?:Apr|Aug|Dec|Feb|Jan|Jul|Jun|Mar|May|Nov|Oct|Sep))?|Apr|Aug|Dec|Feb|Jan|Jul|Jun|Mar|May|Nov|Oct|Sep)\s{1,2}\d{1,2}\b/.source, 'i' ), alias: 'number' @@ -109,7 +109,7 @@ Prism.languages.log = { alias: 'number' }, - 'boolean': /\b(?:true|false|null)\b/i, + 'boolean': /\b(?:false|null|true)\b/i, 'number': { pattern: /(^|[^.\w])(?:0x[a-f0-9]+|0o[0-7]+|0b[01]+|v?\d[\da-f]*(?:\.\d+)*(?:e[+-]?\d+)?[a-z]{0,3}\b)\b(?!\.\w)/i, lookbehind: true diff --git a/components/prism-log.min.js b/components/prism-log.min.js index 73e60835b9..320c6acf80 100644 --- a/components/prism-log.min.js +++ b/components/prism-log.min.js @@ -1 +1 @@ -Prism.languages.log={string:{pattern:/"(?:[^"\\\r\n]|\\.)*"|'(?![st] | \w)(?:[^'\\\r\n]|\\.)*'/,greedy:!0},exception:{pattern:/(^|[^\w.])[a-z][\w.]*(?:Exception|Error):.*(?:(?:\r\n?|\n)[ \t]*(?:at[ \t].+|\.{3}.*|Caused by:.*))+(?:(?:\r\n?|\n)[ \t]*\.\.\. .*)?/,lookbehind:!0,greedy:!0,alias:["javastacktrace","language-javastacktrace"],inside:Prism.languages.javastacktrace||{keyword:/\bat\b/,function:/[a-z_][\w$]*(?=\()/,punctuation:/[.:()]/}},level:[{pattern:/\b(?:ALERT|CRIT|CRITICAL|EMERG|EMERGENCY|ERR|ERROR|FAILURE|FATAL|SEVERE)\b/,alias:["error","important"]},{pattern:/\b(?:WARN|WARNING|WRN)\b/,alias:["warning","important"]},{pattern:/\b(?:DISPLAY|INF|INFO|NOTICE|STATUS)\b/,alias:["info","keyword"]},{pattern:/\b(?:DBG|DEBUG|FINE)\b/,alias:["debug","keyword"]},{pattern:/\b(?:FINER|FINEST|TRACE|TRC|VERBOSE|VRB)\b/,alias:["trace","comment"]}],property:{pattern:/((?:^|[\]|])[ \t]*)[a-z_](?:[\w-]|\b\/\b)*(?:[. ]\(?\w(?:[\w-]|\b\/\b)*\)?)*:(?=\s)/im,lookbehind:!0},separator:{pattern:/(^|[^-+])-{3,}|={3,}|\*{3,}|- - /m,lookbehind:!0,alias:"comment"},url:/\b(?:https?|ftp|file):\/\/[^\s|,;'"]*[^\s|,;'">.]/,email:{pattern:/(^|\s)[-\w+.]+@[a-z][a-z0-9-]*(?:\.[a-z][a-z0-9-]*)+(?=\s)/,lookbehind:!0,alias:"url"},"ip-address":{pattern:/\b(?:\d{1,3}(?:\.\d{1,3}){3})\b/i,alias:"constant"},"mac-address":{pattern:/\b[a-f0-9]{2}(?::[a-f0-9]{2}){5}\b/i,alias:"constant"},domain:{pattern:/(^|\s)[a-z][a-z0-9-]*(?:\.[a-z][a-z0-9-]*)*\.[a-z][a-z0-9-]+(?=\s)/,lookbehind:!0,alias:"constant"},uuid:{pattern:/\b[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\b/i,alias:"constant"},hash:{pattern:/\b(?:[a-f0-9]{32}){1,2}\b/i,alias:"constant"},"file-path":{pattern:/\b[a-z]:[\\/][^\s|,;:(){}\[\]"']+|(^|[\s:\[\](>|])\.{0,2}\/\w[^\s|,;:(){}\[\]"']*/i,lookbehind:!0,greedy:!0,alias:"string"},date:{pattern:RegExp("\\b\\d{4}[-/]\\d{2}[-/]\\d{2}(?:T(?=\\d{1,2}:)|(?=\\s\\d{1,2}:))|\\b\\d{1,4}[-/ ](?:\\d{1,2}|Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)[-/ ]\\d{2,4}T?\\b|\\b(?:(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun)(?:\\s{1,2}(?:Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec))?|Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\\s{1,2}\\d{1,2}\\b","i"),alias:"number"},time:{pattern:/\b\d{1,2}:\d{1,2}:\d{1,2}(?:[.,:]\d+)?(?:\s?[+-]\d{2}:?\d{2}|Z)?\b/,alias:"number"},boolean:/\b(?:true|false|null)\b/i,number:{pattern:/(^|[^.\w])(?:0x[a-f0-9]+|0o[0-7]+|0b[01]+|v?\d[\da-f]*(?:\.\d+)*(?:e[+-]?\d+)?[a-z]{0,3}\b)\b(?!\.\w)/i,lookbehind:!0},operator:/[;:?<=>~/@!$%&+\-|^(){}*#]/,punctuation:/[\[\].,]/}; \ No newline at end of file +Prism.languages.log={string:{pattern:/"(?:[^"\\\r\n]|\\.)*"|'(?![st] | \w)(?:[^'\\\r\n]|\\.)*'/,greedy:!0},exception:{pattern:/(^|[^\w.])[a-z][\w.]*(?:Error|Exception):.*(?:(?:\r\n?|\n)[ \t]*(?:at[ \t].+|\.{3}.*|Caused by:.*))+(?:(?:\r\n?|\n)[ \t]*\.\.\. .*)?/,lookbehind:!0,greedy:!0,alias:["javastacktrace","language-javastacktrace"],inside:Prism.languages.javastacktrace||{keyword:/\bat\b/,function:/[a-z_][\w$]*(?=\()/,punctuation:/[.:()]/}},level:[{pattern:/\b(?:ALERT|CRIT|CRITICAL|EMERG|EMERGENCY|ERR|ERROR|FAILURE|FATAL|SEVERE)\b/,alias:["error","important"]},{pattern:/\b(?:WARN|WARNING|WRN)\b/,alias:["warning","important"]},{pattern:/\b(?:DISPLAY|INF|INFO|NOTICE|STATUS)\b/,alias:["info","keyword"]},{pattern:/\b(?:DBG|DEBUG|FINE)\b/,alias:["debug","keyword"]},{pattern:/\b(?:FINER|FINEST|TRACE|TRC|VERBOSE|VRB)\b/,alias:["trace","comment"]}],property:{pattern:/((?:^|[\]|])[ \t]*)[a-z_](?:[\w-]|\b\/\b)*(?:[. ]\(?\w(?:[\w-]|\b\/\b)*\)?)*:(?=\s)/im,lookbehind:!0},separator:{pattern:/(^|[^-+])-{3,}|={3,}|\*{3,}|- - /m,lookbehind:!0,alias:"comment"},url:/\b(?:file|ftp|https?):\/\/[^\s|,;'"]*[^\s|,;'">.]/,email:{pattern:/(^|\s)[-\w+.]+@[a-z][a-z0-9-]*(?:\.[a-z][a-z0-9-]*)+(?=\s)/,lookbehind:!0,alias:"url"},"ip-address":{pattern:/\b(?:\d{1,3}(?:\.\d{1,3}){3})\b/i,alias:"constant"},"mac-address":{pattern:/\b[a-f0-9]{2}(?::[a-f0-9]{2}){5}\b/i,alias:"constant"},domain:{pattern:/(^|\s)[a-z][a-z0-9-]*(?:\.[a-z][a-z0-9-]*)*\.[a-z][a-z0-9-]+(?=\s)/,lookbehind:!0,alias:"constant"},uuid:{pattern:/\b[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\b/i,alias:"constant"},hash:{pattern:/\b(?:[a-f0-9]{32}){1,2}\b/i,alias:"constant"},"file-path":{pattern:/\b[a-z]:[\\/][^\s|,;:(){}\[\]"']+|(^|[\s:\[\](>|])\.{0,2}\/\w[^\s|,;:(){}\[\]"']*/i,lookbehind:!0,greedy:!0,alias:"string"},date:{pattern:RegExp("\\b\\d{4}[-/]\\d{2}[-/]\\d{2}(?:T(?=\\d{1,2}:)|(?=\\s\\d{1,2}:))|\\b\\d{1,4}[-/ ](?:\\d{1,2}|Apr|Aug|Dec|Feb|Jan|Jul|Jun|Mar|May|Nov|Oct|Sep)[-/ ]\\d{2,4}T?\\b|\\b(?:(?:Fri|Mon|Sat|Sun|Thu|Tue|Wed)(?:\\s{1,2}(?:Apr|Aug|Dec|Feb|Jan|Jul|Jun|Mar|May|Nov|Oct|Sep))?|Apr|Aug|Dec|Feb|Jan|Jul|Jun|Mar|May|Nov|Oct|Sep)\\s{1,2}\\d{1,2}\\b","i"),alias:"number"},time:{pattern:/\b\d{1,2}:\d{1,2}:\d{1,2}(?:[.,:]\d+)?(?:\s?[+-]\d{2}:?\d{2}|Z)?\b/,alias:"number"},boolean:/\b(?:false|null|true)\b/i,number:{pattern:/(^|[^.\w])(?:0x[a-f0-9]+|0o[0-7]+|0b[01]+|v?\d[\da-f]*(?:\.\d+)*(?:e[+-]?\d+)?[a-z]{0,3}\b)\b(?!\.\w)/i,lookbehind:!0},operator:/[;:?<=>~/@!$%&+\-|^(){}*#]/,punctuation:/[\[\].,]/}; \ No newline at end of file diff --git a/components/prism-lolcode.js b/components/prism-lolcode.js index a6f8636c08..16477981d4 100644 --- a/components/prism-lolcode.js +++ b/components/prism-lolcode.js @@ -17,7 +17,7 @@ Prism.languages.lolcode = { }, 'number': /(?:\B-)?(?:\b\d+(?:\.\d*)?|\B\.\d+)/, 'symbol': { - pattern: /(^|\s)(?:A )?(?:YARN|NUMBR|NUMBAR|TROOF|BUKKIT|NOOB)(?=\s|,|$)/, + pattern: /(^|\s)(?:A )?(?:BUKKIT|NOOB|NUMBAR|NUMBR|TROOF|YARN)(?=\s|,|$)/, lookbehind: true, inside: { 'keyword': /A(?=\s)/ @@ -29,18 +29,18 @@ Prism.languages.lolcode = { alias: 'string' }, 'function': { - pattern: /((?:^|\s)(?:I IZ|HOW IZ I|IZ) )[a-zA-Z]\w*/, + pattern: /((?:^|\s)(?:HOW IZ I|I IZ|IZ) )[a-zA-Z]\w*/, lookbehind: true }, 'keyword': [ { - pattern: /(^|\s)(?:O HAI IM|KTHX|HAI|KTHXBYE|I HAS A|ITZ(?: A)?|R|AN|MKAY|SMOOSH|MAEK|IS NOW(?: A)?|VISIBLE|GIMMEH|O RLY\?|YA RLY|NO WAI|OIC|MEBBE|WTF\?|OMG|OMGWTF|GTFO|IM IN YR|IM OUTTA YR|FOUND YR|YR|TIL|WILE|UPPIN|NERFIN|I IZ|HOW IZ I|IF U SAY SO|SRS|HAS A|LIEK(?: A)?|IZ)(?=\s|,|$)/, + pattern: /(^|\s)(?:AN|FOUND YR|GIMMEH|GTFO|HAI|HAS A|HOW IZ I|I HAS A|I IZ|IF U SAY SO|IM IN YR|IM OUTTA YR|IS NOW(?: A)?|ITZ(?: A)?|IZ|KTHX|KTHXBYE|LIEK(?: A)?|MAEK|MEBBE|MKAY|NERFIN|NO WAI|O HAI IM|O RLY\?|OIC|OMG|OMGWTF|R|SMOOSH|SRS|TIL|UPPIN|VISIBLE|WILE|WTF\?|YA RLY|YR)(?=\s|,|$)/, lookbehind: true }, /'Z(?=\s|,|$)/ ], 'boolean': { - pattern: /(^|\s)(?:WIN|FAIL)(?=\s|,|$)/, + pattern: /(^|\s)(?:FAIL|WIN)(?=\s|,|$)/, lookbehind: true }, 'variable': { @@ -48,7 +48,7 @@ Prism.languages.lolcode = { lookbehind: true }, 'operator': { - pattern: /(^|\s)(?:NOT|BOTH SAEM|DIFFRINT|(?:SUM|DIFF|PRODUKT|QUOSHUNT|MOD|BIGGR|SMALLR|BOTH|EITHER|WON|ALL|ANY) OF)(?=\s|,|$)/, + pattern: /(^|\s)(?:NOT|BOTH SAEM|DIFFRINT|(?:ALL|ANY|BIGGR|BOTH|DIFF|EITHER|MOD|PRODUKT|QUOSHUNT|SMALLR|SUM|WON) OF)(?=\s|,|$)/, lookbehind: true }, 'punctuation': /\.{3}|…|,|!/ diff --git a/components/prism-lolcode.min.js b/components/prism-lolcode.min.js index 875ad69465..3df52aba6a 100644 --- a/components/prism-lolcode.min.js +++ b/components/prism-lolcode.min.js @@ -1 +1 @@ -Prism.languages.lolcode={comment:[/\bOBTW\s[\s\S]*?\sTLDR\b/,/\bBTW.+/],string:{pattern:/"(?::.|[^":])*"/,inside:{variable:/:\{[^}]+\}/,symbol:[/:\([a-f\d]+\)/i,/:\[[^\]]+\]/,/:[)>o":]/]},greedy:!0},number:/(?:\B-)?(?:\b\d+(?:\.\d*)?|\B\.\d+)/,symbol:{pattern:/(^|\s)(?:A )?(?:YARN|NUMBR|NUMBAR|TROOF|BUKKIT|NOOB)(?=\s|,|$)/,lookbehind:!0,inside:{keyword:/A(?=\s)/}},label:{pattern:/((?:^|\s)(?:IM IN YR|IM OUTTA YR) )[a-zA-Z]\w*/,lookbehind:!0,alias:"string"},function:{pattern:/((?:^|\s)(?:I IZ|HOW IZ I|IZ) )[a-zA-Z]\w*/,lookbehind:!0},keyword:[{pattern:/(^|\s)(?:O HAI IM|KTHX|HAI|KTHXBYE|I HAS A|ITZ(?: A)?|R|AN|MKAY|SMOOSH|MAEK|IS NOW(?: A)?|VISIBLE|GIMMEH|O RLY\?|YA RLY|NO WAI|OIC|MEBBE|WTF\?|OMG|OMGWTF|GTFO|IM IN YR|IM OUTTA YR|FOUND YR|YR|TIL|WILE|UPPIN|NERFIN|I IZ|HOW IZ I|IF U SAY SO|SRS|HAS A|LIEK(?: A)?|IZ)(?=\s|,|$)/,lookbehind:!0},/'Z(?=\s|,|$)/],boolean:{pattern:/(^|\s)(?:WIN|FAIL)(?=\s|,|$)/,lookbehind:!0},variable:{pattern:/(^|\s)IT(?=\s|,|$)/,lookbehind:!0},operator:{pattern:/(^|\s)(?:NOT|BOTH SAEM|DIFFRINT|(?:SUM|DIFF|PRODUKT|QUOSHUNT|MOD|BIGGR|SMALLR|BOTH|EITHER|WON|ALL|ANY) OF)(?=\s|,|$)/,lookbehind:!0},punctuation:/\.{3}|…|,|!/}; \ No newline at end of file +Prism.languages.lolcode={comment:[/\bOBTW\s[\s\S]*?\sTLDR\b/,/\bBTW.+/],string:{pattern:/"(?::.|[^":])*"/,inside:{variable:/:\{[^}]+\}/,symbol:[/:\([a-f\d]+\)/i,/:\[[^\]]+\]/,/:[)>o":]/]},greedy:!0},number:/(?:\B-)?(?:\b\d+(?:\.\d*)?|\B\.\d+)/,symbol:{pattern:/(^|\s)(?:A )?(?:BUKKIT|NOOB|NUMBAR|NUMBR|TROOF|YARN)(?=\s|,|$)/,lookbehind:!0,inside:{keyword:/A(?=\s)/}},label:{pattern:/((?:^|\s)(?:IM IN YR|IM OUTTA YR) )[a-zA-Z]\w*/,lookbehind:!0,alias:"string"},function:{pattern:/((?:^|\s)(?:HOW IZ I|I IZ|IZ) )[a-zA-Z]\w*/,lookbehind:!0},keyword:[{pattern:/(^|\s)(?:AN|FOUND YR|GIMMEH|GTFO|HAI|HAS A|HOW IZ I|I HAS A|I IZ|IF U SAY SO|IM IN YR|IM OUTTA YR|IS NOW(?: A)?|ITZ(?: A)?|IZ|KTHX|KTHXBYE|LIEK(?: A)?|MAEK|MEBBE|MKAY|NERFIN|NO WAI|O HAI IM|O RLY\?|OIC|OMG|OMGWTF|R|SMOOSH|SRS|TIL|UPPIN|VISIBLE|WILE|WTF\?|YA RLY|YR)(?=\s|,|$)/,lookbehind:!0},/'Z(?=\s|,|$)/],boolean:{pattern:/(^|\s)(?:FAIL|WIN)(?=\s|,|$)/,lookbehind:!0},variable:{pattern:/(^|\s)IT(?=\s|,|$)/,lookbehind:!0},operator:{pattern:/(^|\s)(?:NOT|BOTH SAEM|DIFFRINT|(?:ALL|ANY|BIGGR|BOTH|DIFF|EITHER|MOD|PRODUKT|QUOSHUNT|SMALLR|SUM|WON) OF)(?=\s|,|$)/,lookbehind:!0},punctuation:/\.{3}|…|,|!/}; \ No newline at end of file diff --git a/components/prism-makefile.js b/components/prism-makefile.js index 2f3b27e8f8..1decd0d1a4 100644 --- a/components/prism-makefile.js +++ b/components/prism-makefile.js @@ -25,7 +25,7 @@ Prism.languages.makefile = { /-include\b|\b(?:define|else|endef|endif|export|ifn?def|ifn?eq|include|override|private|sinclude|undefine|unexport|vpath)\b/, // Functions { - pattern: /(\()(?:addsuffix|abspath|and|basename|call|dir|error|eval|file|filter(?:-out)?|findstring|firstword|flavor|foreach|guile|if|info|join|lastword|load|notdir|or|origin|patsubst|realpath|shell|sort|strip|subst|suffix|value|warning|wildcard|word(?:s|list)?)(?=[ \t])/, + pattern: /(\()(?:abspath|addsuffix|and|basename|call|dir|error|eval|file|filter(?:-out)?|findstring|firstword|flavor|foreach|guile|if|info|join|lastword|load|notdir|or|origin|patsubst|realpath|shell|sort|strip|subst|suffix|value|warning|wildcard|word(?:list|s)?)(?=[ \t])/, lookbehind: true } ], diff --git a/components/prism-makefile.min.js b/components/prism-makefile.min.js index 9d4d082c07..2f98141450 100644 --- a/components/prism-makefile.min.js +++ b/components/prism-makefile.min.js @@ -1 +1 @@ -Prism.languages.makefile={comment:{pattern:/(^|[^\\])#(?:\\(?:\r\n|[\s\S])|[^\\\r\n])*/,lookbehind:!0},string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},builtin:/\.[A-Z][^:#=\s]+(?=\s*:(?!=))/,symbol:{pattern:/^(?:[^:=\s]|[ \t]+(?![\s:]))+(?=\s*:(?!=))/m,inside:{variable:/\$+(?:(?!\$)[^(){}:#=\s]+|(?=[({]))/}},variable:/\$+(?:(?!\$)[^(){}:#=\s]+|\([@*%<^+?][DF]\)|(?=[({]))/,keyword:[/-include\b|\b(?:define|else|endef|endif|export|ifn?def|ifn?eq|include|override|private|sinclude|undefine|unexport|vpath)\b/,{pattern:/(\()(?:addsuffix|abspath|and|basename|call|dir|error|eval|file|filter(?:-out)?|findstring|firstword|flavor|foreach|guile|if|info|join|lastword|load|notdir|or|origin|patsubst|realpath|shell|sort|strip|subst|suffix|value|warning|wildcard|word(?:s|list)?)(?=[ \t])/,lookbehind:!0}],operator:/(?:::|[?:+!])?=|[|@]/,punctuation:/[:;(){}]/}; \ No newline at end of file +Prism.languages.makefile={comment:{pattern:/(^|[^\\])#(?:\\(?:\r\n|[\s\S])|[^\\\r\n])*/,lookbehind:!0},string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},builtin:/\.[A-Z][^:#=\s]+(?=\s*:(?!=))/,symbol:{pattern:/^(?:[^:=\s]|[ \t]+(?![\s:]))+(?=\s*:(?!=))/m,inside:{variable:/\$+(?:(?!\$)[^(){}:#=\s]+|(?=[({]))/}},variable:/\$+(?:(?!\$)[^(){}:#=\s]+|\([@*%<^+?][DF]\)|(?=[({]))/,keyword:[/-include\b|\b(?:define|else|endef|endif|export|ifn?def|ifn?eq|include|override|private|sinclude|undefine|unexport|vpath)\b/,{pattern:/(\()(?:abspath|addsuffix|and|basename|call|dir|error|eval|file|filter(?:-out)?|findstring|firstword|flavor|foreach|guile|if|info|join|lastword|load|notdir|or|origin|patsubst|realpath|shell|sort|strip|subst|suffix|value|warning|wildcard|word(?:list|s)?)(?=[ \t])/,lookbehind:!0}],operator:/(?:::|[?:+!])?=|[|@]/,punctuation:/[:;(){}]/}; \ No newline at end of file diff --git a/components/prism-matlab.js b/components/prism-matlab.js index dcce2f7df2..01cca55975 100644 --- a/components/prism-matlab.js +++ b/components/prism-matlab.js @@ -9,7 +9,7 @@ Prism.languages.matlab = { }, // FIXME We could handle imaginary numbers as a whole 'number': /(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[eE][+-]?\d+)?(?:[ij])?|\b[ij]\b/, - 'keyword': /\b(?:break|case|catch|continue|else|elseif|end|for|function|if|inf|NaN|otherwise|parfor|pause|pi|return|switch|try|while)\b/, + 'keyword': /\b(?:NaN|break|case|catch|continue|else|elseif|end|for|function|if|inf|otherwise|parfor|pause|pi|return|switch|try|while)\b/, 'function': /\b(?!\d)\w+(?=\s*\()/, 'operator': /\.?[*^\/\\']|[+\-:@]|[<>=~]=?|&&?|\|\|?/, 'punctuation': /\.{3}|[.,;\[\](){}!]/ diff --git a/components/prism-matlab.min.js b/components/prism-matlab.min.js index 2586cdfd52..06d3a98112 100644 --- a/components/prism-matlab.min.js +++ b/components/prism-matlab.min.js @@ -1 +1 @@ -Prism.languages.matlab={comment:[/%\{[\s\S]*?\}%/,/%.+/],string:{pattern:/\B'(?:''|[^'\r\n])*'/,greedy:!0},number:/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[eE][+-]?\d+)?(?:[ij])?|\b[ij]\b/,keyword:/\b(?:break|case|catch|continue|else|elseif|end|for|function|if|inf|NaN|otherwise|parfor|pause|pi|return|switch|try|while)\b/,function:/\b(?!\d)\w+(?=\s*\()/,operator:/\.?[*^\/\\']|[+\-:@]|[<>=~]=?|&&?|\|\|?/,punctuation:/\.{3}|[.,;\[\](){}!]/}; \ No newline at end of file +Prism.languages.matlab={comment:[/%\{[\s\S]*?\}%/,/%.+/],string:{pattern:/\B'(?:''|[^'\r\n])*'/,greedy:!0},number:/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[eE][+-]?\d+)?(?:[ij])?|\b[ij]\b/,keyword:/\b(?:NaN|break|case|catch|continue|else|elseif|end|for|function|if|inf|otherwise|parfor|pause|pi|return|switch|try|while)\b/,function:/\b(?!\d)\w+(?=\s*\()/,operator:/\.?[*^\/\\']|[+\-:@]|[<>=~]=?|&&?|\|\|?/,punctuation:/\.{3}|[.,;\[\](){}!]/}; \ No newline at end of file diff --git a/components/prism-maxscript.js b/components/prism-maxscript.js index 21ff28e82f..d5e58e009f 100644 --- a/components/prism-maxscript.js +++ b/components/prism-maxscript.js @@ -15,7 +15,7 @@ Prism.languages.maxscript = { }, 'function-definition': { - pattern: /(\b(?:function|fn)\s+)\w+\b/, + pattern: /(\b(?:fn|function)\s+)\w+\b/, lookbehind: true, alias: 'function' }, @@ -26,7 +26,7 @@ Prism.languages.maxscript = { }, 'keyword': /\b(?:about|and|animate|as|at|attributes|by|case|catch|collect|continue|coordsys|do|else|exit|fn|for|from|function|global|if|in|local|macroscript|mapped|max|not|of|off|on|or|parameters|persistent|plugin|rcmenu|return|rollout|set|struct|then|throw|to|tool|try|undo|utility|when|where|while|with)\b/i, - 'boolean': /\b(?:true|false|on|off)\b/, + 'boolean': /\b(?:false|off|on|true)\b/, 'time': { pattern: /(^|[^\w.])(?:(?:(?:\d+(?:\.\d*)?|\.\d+)(?:[eEdD][+-]\d+|[LP])?[msft])+|\d+:\d+(?:\.\d*)?)(?![\w.:])/, diff --git a/components/prism-maxscript.min.js b/components/prism-maxscript.min.js index 1587ead56e..7502744b1c 100644 --- a/components/prism-maxscript.min.js +++ b/components/prism-maxscript.min.js @@ -1 +1 @@ -Prism.languages.maxscript={comment:{pattern:/\/\*[\s\S]*?(?:\*\/|$)|--.*/,greedy:!0},string:{pattern:/(^|[^"\\@])(?:"(?:[^"\\]|\\[\s\S])*"|@"[^"]*")/,lookbehind:!0,greedy:!0},path:{pattern:/\$(?:[\w/\\.*?]|'[^']*')*/,greedy:!0,alias:"string"},"function-definition":{pattern:/(\b(?:function|fn)\s+)\w+\b/,lookbehind:!0,alias:"function"},argument:{pattern:/\b[a-z_]\w*(?=:)/i,alias:"attr-name"},keyword:/\b(?:about|and|animate|as|at|attributes|by|case|catch|collect|continue|coordsys|do|else|exit|fn|for|from|function|global|if|in|local|macroscript|mapped|max|not|of|off|on|or|parameters|persistent|plugin|rcmenu|return|rollout|set|struct|then|throw|to|tool|try|undo|utility|when|where|while|with)\b/i,boolean:/\b(?:true|false|on|off)\b/,time:{pattern:/(^|[^\w.])(?:(?:(?:\d+(?:\.\d*)?|\.\d+)(?:[eEdD][+-]\d+|[LP])?[msft])+|\d+:\d+(?:\.\d*)?)(?![\w.:])/,lookbehind:!0,alias:"number"},number:[{pattern:/(^|[^\w.])(?:(?:\d+(?:\.\d*)?|\.\d+)(?:[eEdD][+-]\d+|[LP])?|0x[a-fA-F0-9]+)(?![\w.:])/,lookbehind:!0},/\b(?:e|pi)\b/],constant:/\b(?:black|blue|brown|gray|green|orange|red|white|yellow)\b/,color:{pattern:/\b(?:dontcollect|ok|silentValue|undefined|unsupplied)\b/i,alias:"constant"},operator:/[-+*/<>=!]=?|[&^]|#(?!\()/,punctuation:/[()\[\]{}.:,;]|#(?=\()|\\$/m}; \ No newline at end of file +Prism.languages.maxscript={comment:{pattern:/\/\*[\s\S]*?(?:\*\/|$)|--.*/,greedy:!0},string:{pattern:/(^|[^"\\@])(?:"(?:[^"\\]|\\[\s\S])*"|@"[^"]*")/,lookbehind:!0,greedy:!0},path:{pattern:/\$(?:[\w/\\.*?]|'[^']*')*/,greedy:!0,alias:"string"},"function-definition":{pattern:/(\b(?:fn|function)\s+)\w+\b/,lookbehind:!0,alias:"function"},argument:{pattern:/\b[a-z_]\w*(?=:)/i,alias:"attr-name"},keyword:/\b(?:about|and|animate|as|at|attributes|by|case|catch|collect|continue|coordsys|do|else|exit|fn|for|from|function|global|if|in|local|macroscript|mapped|max|not|of|off|on|or|parameters|persistent|plugin|rcmenu|return|rollout|set|struct|then|throw|to|tool|try|undo|utility|when|where|while|with)\b/i,boolean:/\b(?:false|off|on|true)\b/,time:{pattern:/(^|[^\w.])(?:(?:(?:\d+(?:\.\d*)?|\.\d+)(?:[eEdD][+-]\d+|[LP])?[msft])+|\d+:\d+(?:\.\d*)?)(?![\w.:])/,lookbehind:!0,alias:"number"},number:[{pattern:/(^|[^\w.])(?:(?:\d+(?:\.\d*)?|\.\d+)(?:[eEdD][+-]\d+|[LP])?|0x[a-fA-F0-9]+)(?![\w.:])/,lookbehind:!0},/\b(?:e|pi)\b/],constant:/\b(?:black|blue|brown|gray|green|orange|red|white|yellow)\b/,color:{pattern:/\b(?:dontcollect|ok|silentValue|undefined|unsupplied)\b/i,alias:"constant"},operator:/[-+*/<>=!]=?|[&^]|#(?!\()/,punctuation:/[()\[\]{}.:,;]|#(?=\()|\\$/m}; \ No newline at end of file diff --git a/components/prism-mel.js b/components/prism-mel.js index 3a781b856d..13a5947b00 100644 --- a/components/prism-mel.js +++ b/components/prism-mel.js @@ -23,7 +23,7 @@ Prism.languages.mel = { alias: 'operator' }, 'keyword': /\b(?:break|case|continue|default|do|else|float|for|global|if|in|int|matrix|proc|return|string|switch|vector|while)\b/, - 'function': /\b\w+(?=\()|\b(?:about|abs|addAttr|addAttributeEditorNodeHelp|addDynamic|addNewShelfTab|addPP|addPanelCategory|addPrefixToName|advanceToNextDrivenKey|affectedNet|affects|aimConstraint|air|alias|aliasAttr|align|alignCtx|alignCurve|alignSurface|allViewFit|ambientLight|angle|angleBetween|animCone|animCurveEditor|animDisplay|animView|annotate|appendStringArray|applicationName|applyAttrPreset|applyTake|arcLenDimContext|arcLengthDimension|arclen|arrayMapper|art3dPaintCtx|artAttrCtx|artAttrPaintVertexCtx|artAttrSkinPaintCtx|artAttrTool|artBuildPaintMenu|artFluidAttrCtx|artPuttyCtx|artSelectCtx|artSetPaintCtx|artUserPaintCtx|assignCommand|assignInputDevice|assignViewportFactories|attachCurve|attachDeviceAttr|attachSurface|attrColorSliderGrp|attrCompatibility|attrControlGrp|attrEnumOptionMenu|attrEnumOptionMenuGrp|attrFieldGrp|attrFieldSliderGrp|attrNavigationControlGrp|attrPresetEditWin|attributeExists|attributeInfo|attributeMenu|attributeQuery|autoKeyframe|autoPlace|bakeClip|bakeFluidShading|bakePartialHistory|bakeResults|bakeSimulation|basename|basenameEx|batchRender|bessel|bevel|bevelPlus|binMembership|bindSkin|blend2|blendShape|blendShapeEditor|blendShapePanel|blendTwoAttr|blindDataType|boneLattice|boundary|boxDollyCtx|boxZoomCtx|bufferCurve|buildBookmarkMenu|buildKeyframeMenu|button|buttonManip|CBG|cacheFile|cacheFileCombine|cacheFileMerge|cacheFileTrack|camera|cameraView|canCreateManip|canvas|capitalizeString|catch|catchQuiet|ceil|changeSubdivComponentDisplayLevel|changeSubdivRegion|channelBox|character|characterMap|characterOutlineEditor|characterize|chdir|checkBox|checkBoxGrp|checkDefaultRenderGlobals|choice|circle|circularFillet|clamp|clear|clearCache|clip|clipEditor|clipEditorCurrentTimeCtx|clipSchedule|clipSchedulerOutliner|clipTrimBefore|closeCurve|closeSurface|cluster|cmdFileOutput|cmdScrollFieldExecuter|cmdScrollFieldReporter|cmdShell|coarsenSubdivSelectionList|collision|color|colorAtPoint|colorEditor|colorIndex|colorIndexSliderGrp|colorSliderButtonGrp|colorSliderGrp|columnLayout|commandEcho|commandLine|commandPort|compactHairSystem|componentEditor|compositingInterop|computePolysetVolume|condition|cone|confirmDialog|connectAttr|connectControl|connectDynamic|connectJoint|connectionInfo|constrain|constrainValue|constructionHistory|container|containsMultibyte|contextInfo|control|convertFromOldLayers|convertIffToPsd|convertLightmap|convertSolidTx|convertTessellation|convertUnit|copyArray|copyFlexor|copyKey|copySkinWeights|cos|cpButton|cpCache|cpClothSet|cpCollision|cpConstraint|cpConvClothToMesh|cpForces|cpGetSolverAttr|cpPanel|cpProperty|cpRigidCollisionFilter|cpSeam|cpSetEdit|cpSetSolverAttr|cpSolver|cpSolverTypes|cpTool|cpUpdateClothUVs|createDisplayLayer|createDrawCtx|createEditor|createLayeredPsdFile|createMotionField|createNewShelf|createNode|createRenderLayer|createSubdivRegion|cross|crossProduct|ctxAbort|ctxCompletion|ctxEditMode|ctxTraverse|currentCtx|currentTime|currentTimeCtx|currentUnit|curve|curveAddPtCtx|curveCVCtx|curveEPCtx|curveEditorCtx|curveIntersect|curveMoveEPCtx|curveOnSurface|curveSketchCtx|cutKey|cycleCheck|cylinder|dagPose|date|defaultLightListCheckBox|defaultNavigation|defineDataServer|defineVirtualDevice|deformer|deg_to_rad|delete|deleteAttr|deleteShadingGroupsAndMaterials|deleteShelfTab|deleteUI|deleteUnusedBrushes|delrandstr|detachCurve|detachDeviceAttr|detachSurface|deviceEditor|devicePanel|dgInfo|dgdirty|dgeval|dgtimer|dimWhen|directKeyCtx|directionalLight|dirmap|dirname|disable|disconnectAttr|disconnectJoint|diskCache|displacementToPoly|displayAffected|displayColor|displayCull|displayLevelOfDetail|displayPref|displayRGBColor|displaySmoothness|displayStats|displayString|displaySurface|distanceDimContext|distanceDimension|doBlur|dolly|dollyCtx|dopeSheetEditor|dot|dotProduct|doubleProfileBirailSurface|drag|dragAttrContext|draggerContext|dropoffLocator|duplicate|duplicateCurve|duplicateSurface|dynCache|dynControl|dynExport|dynExpression|dynGlobals|dynPaintEditor|dynParticleCtx|dynPref|dynRelEdPanel|dynRelEditor|dynamicLoad|editAttrLimits|editDisplayLayerGlobals|editDisplayLayerMembers|editRenderLayerAdjustment|editRenderLayerGlobals|editRenderLayerMembers|editor|editorTemplate|effector|emit|emitter|enableDevice|encodeString|endString|endsWith|env|equivalent|equivalentTol|erf|error|eval|evalDeferred|evalEcho|event|exactWorldBoundingBox|exclusiveLightCheckBox|exec|executeForEachObject|exists|exp|expression|expressionEditorListen|extendCurve|extendSurface|extrude|fcheck|fclose|feof|fflush|fgetline|fgetword|file|fileBrowserDialog|fileDialog|fileExtension|fileInfo|filetest|filletCurve|filter|filterCurve|filterExpand|filterStudioImport|findAllIntersections|findAnimCurves|findKeyframe|findMenuItem|findRelatedSkinCluster|finder|firstParentOf|fitBspline|flexor|floatEq|floatField|floatFieldGrp|floatScrollBar|floatSlider|floatSlider2|floatSliderButtonGrp|floatSliderGrp|floor|flow|fluidCacheInfo|fluidEmitter|fluidVoxelInfo|flushUndo|fmod|fontDialog|fopen|formLayout|format|fprint|frameLayout|fread|freeFormFillet|frewind|fromNativePath|fwrite|gamma|gauss|geometryConstraint|getApplicationVersionAsFloat|getAttr|getClassification|getDefaultBrush|getFileList|getFluidAttr|getInputDeviceRange|getMayaPanelTypes|getModifiers|getPanel|getParticleAttr|getPluginResource|getenv|getpid|glRender|glRenderEditor|globalStitch|gmatch|goal|gotoBindPose|grabColor|gradientControl|gradientControlNoAttr|graphDollyCtx|graphSelectContext|graphTrackCtx|gravity|grid|gridLayout|group|groupObjectsByName|HfAddAttractorToAS|HfAssignAS|HfBuildEqualMap|HfBuildFurFiles|HfBuildFurImages|HfCancelAFR|HfConnectASToHF|HfCreateAttractor|HfDeleteAS|HfEditAS|HfPerformCreateAS|HfRemoveAttractorFromAS|HfSelectAttached|HfSelectAttractors|HfUnAssignAS|hardenPointCurve|hardware|hardwareRenderPanel|headsUpDisplay|headsUpMessage|help|helpLine|hermite|hide|hilite|hitTest|hotBox|hotkey|hotkeyCheck|hsv_to_rgb|hudButton|hudSlider|hudSliderButton|hwReflectionMap|hwRender|hwRenderLoad|hyperGraph|hyperPanel|hyperShade|hypot|iconTextButton|iconTextCheckBox|iconTextRadioButton|iconTextRadioCollection|iconTextScrollList|iconTextStaticLabel|ikHandle|ikHandleCtx|ikHandleDisplayScale|ikSolver|ikSplineHandleCtx|ikSystem|ikSystemInfo|ikfkDisplayMethod|illustratorCurves|image|imfPlugins|inheritTransform|insertJoint|insertJointCtx|insertKeyCtx|insertKnotCurve|insertKnotSurface|instance|instanceable|instancer|intField|intFieldGrp|intScrollBar|intSlider|intSliderGrp|interToUI|internalVar|intersect|iprEngine|isAnimCurve|isConnected|isDirty|isParentOf|isSameObject|isTrue|isValidObjectName|isValidString|isValidUiName|isolateSelect|itemFilter|itemFilterAttr|itemFilterRender|itemFilterType|joint|jointCluster|jointCtx|jointDisplayScale|jointLattice|keyTangent|keyframe|keyframeOutliner|keyframeRegionCurrentTimeCtx|keyframeRegionDirectKeyCtx|keyframeRegionDollyCtx|keyframeRegionInsertKeyCtx|keyframeRegionMoveKeyCtx|keyframeRegionScaleKeyCtx|keyframeRegionSelectKeyCtx|keyframeRegionSetKeyCtx|keyframeRegionTrackCtx|keyframeStats|lassoContext|lattice|latticeDeformKeyCtx|launch|launchImageEditor|layerButton|layeredShaderPort|layeredTexturePort|layout|layoutDialog|lightList|lightListEditor|lightListPanel|lightlink|lineIntersection|linearPrecision|linstep|listAnimatable|listAttr|listCameras|listConnections|listDeviceAttachments|listHistory|listInputDeviceAxes|listInputDeviceButtons|listInputDevices|listMenuAnnotation|listNodeTypes|listPanelCategories|listRelatives|listSets|listTransforms|listUnselected|listerEditor|loadFluid|loadNewShelf|loadPlugin|loadPluginLanguageResources|loadPrefObjects|localizedPanelLabel|lockNode|loft|log|longNameOf|lookThru|ls|lsThroughFilter|lsType|lsUI|Mayatomr|mag|makeIdentity|makeLive|makePaintable|makeRoll|makeSingleSurface|makeTubeOn|makebot|manipMoveContext|manipMoveLimitsCtx|manipOptions|manipRotateContext|manipRotateLimitsCtx|manipScaleContext|manipScaleLimitsCtx|marker|match|max|memory|menu|menuBarLayout|menuEditor|menuItem|menuItemToShelf|menuSet|menuSetPref|messageLine|min|minimizeApp|mirrorJoint|modelCurrentTimeCtx|modelEditor|modelPanel|mouse|movIn|movOut|move|moveIKtoFK|moveKeyCtx|moveVertexAlongDirection|multiProfileBirailSurface|mute|nParticle|nameCommand|nameField|namespace|namespaceInfo|newPanelItems|newton|nodeCast|nodeIconButton|nodeOutliner|nodePreset|nodeType|noise|nonLinear|normalConstraint|normalize|nurbsBoolean|nurbsCopyUVSet|nurbsCube|nurbsEditUV|nurbsPlane|nurbsSelect|nurbsSquare|nurbsToPoly|nurbsToPolygonsPref|nurbsToSubdiv|nurbsToSubdivPref|nurbsUVSet|nurbsViewDirectionVector|objExists|objectCenter|objectLayer|objectType|objectTypeUI|obsoleteProc|oceanNurbsPreviewPlane|offsetCurve|offsetCurveOnSurface|offsetSurface|openGLExtension|openMayaPref|optionMenu|optionMenuGrp|optionVar|orbit|orbitCtx|orientConstraint|outlinerEditor|outlinerPanel|overrideModifier|paintEffectsDisplay|pairBlend|palettePort|paneLayout|panel|panelConfiguration|panelHistory|paramDimContext|paramDimension|paramLocator|parent|parentConstraint|particle|particleExists|particleInstancer|particleRenderInfo|partition|pasteKey|pathAnimation|pause|pclose|percent|performanceOptions|pfxstrokes|pickWalk|picture|pixelMove|planarSrf|plane|play|playbackOptions|playblast|plugAttr|plugNode|pluginInfo|pluginResourceUtil|pointConstraint|pointCurveConstraint|pointLight|pointMatrixMult|pointOnCurve|pointOnSurface|pointPosition|poleVectorConstraint|polyAppend|polyAppendFacetCtx|polyAppendVertex|polyAutoProjection|polyAverageNormal|polyAverageVertex|polyBevel|polyBlendColor|polyBlindData|polyBoolOp|polyBridgeEdge|polyCacheMonitor|polyCheck|polyChipOff|polyClipboard|polyCloseBorder|polyCollapseEdge|polyCollapseFacet|polyColorBlindData|polyColorDel|polyColorPerVertex|polyColorSet|polyCompare|polyCone|polyCopyUV|polyCrease|polyCreaseCtx|polyCreateFacet|polyCreateFacetCtx|polyCube|polyCut|polyCutCtx|polyCylinder|polyCylindricalProjection|polyDelEdge|polyDelFacet|polyDelVertex|polyDuplicateAndConnect|polyDuplicateEdge|polyEditUV|polyEditUVShell|polyEvaluate|polyExtrudeEdge|polyExtrudeFacet|polyExtrudeVertex|polyFlipEdge|polyFlipUV|polyForceUV|polyGeoSampler|polyHelix|polyInfo|polyInstallAction|polyLayoutUV|polyListComponentConversion|polyMapCut|polyMapDel|polyMapSew|polyMapSewMove|polyMergeEdge|polyMergeEdgeCtx|polyMergeFacet|polyMergeFacetCtx|polyMergeUV|polyMergeVertex|polyMirrorFace|polyMoveEdge|polyMoveFacet|polyMoveFacetUV|polyMoveUV|polyMoveVertex|polyNormal|polyNormalPerVertex|polyNormalizeUV|polyOptUvs|polyOptions|polyOutput|polyPipe|polyPlanarProjection|polyPlane|polyPlatonicSolid|polyPoke|polyPrimitive|polyPrism|polyProjection|polyPyramid|polyQuad|polyQueryBlindData|polyReduce|polySelect|polySelectConstraint|polySelectConstraintMonitor|polySelectCtx|polySelectEditCtx|polySeparate|polySetToFaceNormal|polySewEdge|polyShortestPathCtx|polySmooth|polySoftEdge|polySphere|polySphericalProjection|polySplit|polySplitCtx|polySplitEdge|polySplitRing|polySplitVertex|polyStraightenUVBorder|polySubdivideEdge|polySubdivideFacet|polyToSubdiv|polyTorus|polyTransfer|polyTriangulate|polyUVSet|polyUnite|polyWedgeFace|popen|popupMenu|pose|pow|preloadRefEd|print|progressBar|progressWindow|projFileViewer|projectCurve|projectTangent|projectionContext|projectionManip|promptDialog|propModCtx|propMove|psdChannelOutliner|psdEditTextureFile|psdExport|psdTextureFile|putenv|pwd|python|querySubdiv|quit|rad_to_deg|radial|radioButton|radioButtonGrp|radioCollection|radioMenuItemCollection|rampColorPort|rand|randomizeFollicles|randstate|rangeControl|readTake|rebuildCurve|rebuildSurface|recordAttr|recordDevice|redo|reference|referenceEdit|referenceQuery|refineSubdivSelectionList|refresh|refreshAE|registerPluginResource|rehash|reloadImage|removeJoint|removeMultiInstance|removePanelCategory|rename|renameAttr|renameSelectionList|renameUI|render|renderGlobalsNode|renderInfo|renderLayerButton|renderLayerParent|renderLayerPostProcess|renderLayerUnparent|renderManip|renderPartition|renderQualityNode|renderSettings|renderThumbnailUpdate|renderWindowEditor|renderWindowSelectContext|renderer|reorder|reorderDeformers|requires|reroot|resampleFluid|resetAE|resetPfxToPolyCamera|resetTool|resolutionNode|retarget|reverseCurve|reverseSurface|revolve|rgb_to_hsv|rigidBody|rigidSolver|roll|rollCtx|rootOf|rot|rotate|rotationInterpolation|roundConstantRadius|rowColumnLayout|rowLayout|runTimeCommand|runup|sampleImage|saveAllShelves|saveAttrPreset|saveFluid|saveImage|saveInitialState|saveMenu|savePrefObjects|savePrefs|saveShelf|saveToolSettings|scale|scaleBrushBrightness|scaleComponents|scaleConstraint|scaleKey|scaleKeyCtx|sceneEditor|sceneUIReplacement|scmh|scriptCtx|scriptEditorInfo|scriptJob|scriptNode|scriptTable|scriptToShelf|scriptedPanel|scriptedPanelType|scrollField|scrollLayout|sculpt|searchPathArray|seed|selLoadSettings|select|selectContext|selectCurveCV|selectKey|selectKeyCtx|selectKeyframeRegionCtx|selectMode|selectPref|selectPriority|selectType|selectedNodes|selectionConnection|separator|setAttr|setAttrEnumResource|setAttrMapping|setAttrNiceNameResource|setConstraintRestPosition|setDefaultShadingGroup|setDrivenKeyframe|setDynamic|setEditCtx|setEditor|setFluidAttr|setFocus|setInfinity|setInputDeviceMapping|setKeyCtx|setKeyPath|setKeyframe|setKeyframeBlendshapeTargetWts|setMenuMode|setNodeNiceNameResource|setNodeTypeFlag|setParent|setParticleAttr|setPfxToPolyCamera|setPluginResource|setProject|setStampDensity|setStartupMessage|setState|setToolTo|setUITemplate|setXformManip|sets|shadingConnection|shadingGeometryRelCtx|shadingLightRelCtx|shadingNetworkCompare|shadingNode|shapeCompare|shelfButton|shelfLayout|shelfTabLayout|shellField|shortNameOf|showHelp|showHidden|showManipCtx|showSelectionInTitle|showShadingGroupAttrEditor|showWindow|sign|simplify|sin|singleProfileBirailSurface|size|sizeBytes|skinCluster|skinPercent|smoothCurve|smoothTangentSurface|smoothstep|snap2to2|snapKey|snapMode|snapTogetherCtx|snapshot|soft|softMod|softModCtx|sort|sound|soundControl|source|spaceLocator|sphere|sphrand|spotLight|spotLightPreviewPort|spreadSheetEditor|spring|sqrt|squareSurface|srtContext|stackTrace|startString|startsWith|stitchAndExplodeShell|stitchSurface|stitchSurfacePoints|strcmp|stringArrayCatenate|stringArrayContains|stringArrayCount|stringArrayInsertAtIndex|stringArrayIntersector|stringArrayRemove|stringArrayRemoveAtIndex|stringArrayRemoveDuplicates|stringArrayRemoveExact|stringArrayToString|stringToStringArray|strip|stripPrefixFromName|stroke|subdAutoProjection|subdCleanTopology|subdCollapse|subdDuplicateAndConnect|subdEditUV|subdListComponentConversion|subdMapCut|subdMapSewMove|subdMatchTopology|subdMirror|subdToBlind|subdToPoly|subdTransferUVsToCache|subdiv|subdivCrease|subdivDisplaySmoothness|substitute|substituteAllString|substituteGeometry|substring|surface|surfaceSampler|surfaceShaderList|swatchDisplayPort|switchTable|symbolButton|symbolCheckBox|sysFile|system|tabLayout|tan|tangentConstraint|texLatticeDeformContext|texManipContext|texMoveContext|texMoveUVShellContext|texRotateContext|texScaleContext|texSelectContext|texSelectShortestPathCtx|texSmudgeUVContext|texWinToolCtx|text|textCurves|textField|textFieldButtonGrp|textFieldGrp|textManip|textScrollList|textToShelf|textureDisplacePlane|textureHairColor|texturePlacementContext|textureWindow|threadCount|threePointArcCtx|timeControl|timePort|timerX|toNativePath|toggle|toggleAxis|toggleWindowVisibility|tokenize|tokenizeList|tolerance|tolower|toolButton|toolCollection|toolDropped|toolHasOptions|toolPropertyWindow|torus|toupper|trace|track|trackCtx|transferAttributes|transformCompare|transformLimits|translator|trim|trunc|truncateFluidCache|truncateHairCache|tumble|tumbleCtx|turbulence|twoPointArcCtx|uiRes|uiTemplate|unassignInputDevice|undo|undoInfo|ungroup|uniform|unit|unloadPlugin|untangleUV|untitledFileName|untrim|upAxis|updateAE|userCtx|uvLink|uvSnapshot|validateShelfName|vectorize|view2dToolCtx|viewCamera|viewClipPlane|viewFit|viewHeadOn|viewLookAt|viewManip|viewPlace|viewSet|visor|volumeAxis|vortex|waitCursor|warning|webBrowser|webBrowserPrefs|whatIs|window|windowPref|wire|wireContext|workspace|wrinkle|wrinkleContext|writeTake|xbmLangPathList|xform)\b/, + 'function': /\b\w+(?=\()|\b(?:CBG|HfAddAttractorToAS|HfAssignAS|HfBuildEqualMap|HfBuildFurFiles|HfBuildFurImages|HfCancelAFR|HfConnectASToHF|HfCreateAttractor|HfDeleteAS|HfEditAS|HfPerformCreateAS|HfRemoveAttractorFromAS|HfSelectAttached|HfSelectAttractors|HfUnAssignAS|Mayatomr|about|abs|addAttr|addAttributeEditorNodeHelp|addDynamic|addNewShelfTab|addPP|addPanelCategory|addPrefixToName|advanceToNextDrivenKey|affectedNet|affects|aimConstraint|air|alias|aliasAttr|align|alignCtx|alignCurve|alignSurface|allViewFit|ambientLight|angle|angleBetween|animCone|animCurveEditor|animDisplay|animView|annotate|appendStringArray|applicationName|applyAttrPreset|applyTake|arcLenDimContext|arcLengthDimension|arclen|arrayMapper|art3dPaintCtx|artAttrCtx|artAttrPaintVertexCtx|artAttrSkinPaintCtx|artAttrTool|artBuildPaintMenu|artFluidAttrCtx|artPuttyCtx|artSelectCtx|artSetPaintCtx|artUserPaintCtx|assignCommand|assignInputDevice|assignViewportFactories|attachCurve|attachDeviceAttr|attachSurface|attrColorSliderGrp|attrCompatibility|attrControlGrp|attrEnumOptionMenu|attrEnumOptionMenuGrp|attrFieldGrp|attrFieldSliderGrp|attrNavigationControlGrp|attrPresetEditWin|attributeExists|attributeInfo|attributeMenu|attributeQuery|autoKeyframe|autoPlace|bakeClip|bakeFluidShading|bakePartialHistory|bakeResults|bakeSimulation|basename|basenameEx|batchRender|bessel|bevel|bevelPlus|binMembership|bindSkin|blend2|blendShape|blendShapeEditor|blendShapePanel|blendTwoAttr|blindDataType|boneLattice|boundary|boxDollyCtx|boxZoomCtx|bufferCurve|buildBookmarkMenu|buildKeyframeMenu|button|buttonManip|cacheFile|cacheFileCombine|cacheFileMerge|cacheFileTrack|camera|cameraView|canCreateManip|canvas|capitalizeString|catch|catchQuiet|ceil|changeSubdivComponentDisplayLevel|changeSubdivRegion|channelBox|character|characterMap|characterOutlineEditor|characterize|chdir|checkBox|checkBoxGrp|checkDefaultRenderGlobals|choice|circle|circularFillet|clamp|clear|clearCache|clip|clipEditor|clipEditorCurrentTimeCtx|clipSchedule|clipSchedulerOutliner|clipTrimBefore|closeCurve|closeSurface|cluster|cmdFileOutput|cmdScrollFieldExecuter|cmdScrollFieldReporter|cmdShell|coarsenSubdivSelectionList|collision|color|colorAtPoint|colorEditor|colorIndex|colorIndexSliderGrp|colorSliderButtonGrp|colorSliderGrp|columnLayout|commandEcho|commandLine|commandPort|compactHairSystem|componentEditor|compositingInterop|computePolysetVolume|condition|cone|confirmDialog|connectAttr|connectControl|connectDynamic|connectJoint|connectionInfo|constrain|constrainValue|constructionHistory|container|containsMultibyte|contextInfo|control|convertFromOldLayers|convertIffToPsd|convertLightmap|convertSolidTx|convertTessellation|convertUnit|copyArray|copyFlexor|copyKey|copySkinWeights|cos|cpButton|cpCache|cpClothSet|cpCollision|cpConstraint|cpConvClothToMesh|cpForces|cpGetSolverAttr|cpPanel|cpProperty|cpRigidCollisionFilter|cpSeam|cpSetEdit|cpSetSolverAttr|cpSolver|cpSolverTypes|cpTool|cpUpdateClothUVs|createDisplayLayer|createDrawCtx|createEditor|createLayeredPsdFile|createMotionField|createNewShelf|createNode|createRenderLayer|createSubdivRegion|cross|crossProduct|ctxAbort|ctxCompletion|ctxEditMode|ctxTraverse|currentCtx|currentTime|currentTimeCtx|currentUnit|curve|curveAddPtCtx|curveCVCtx|curveEPCtx|curveEditorCtx|curveIntersect|curveMoveEPCtx|curveOnSurface|curveSketchCtx|cutKey|cycleCheck|cylinder|dagPose|date|defaultLightListCheckBox|defaultNavigation|defineDataServer|defineVirtualDevice|deformer|deg_to_rad|delete|deleteAttr|deleteShadingGroupsAndMaterials|deleteShelfTab|deleteUI|deleteUnusedBrushes|delrandstr|detachCurve|detachDeviceAttr|detachSurface|deviceEditor|devicePanel|dgInfo|dgdirty|dgeval|dgtimer|dimWhen|directKeyCtx|directionalLight|dirmap|dirname|disable|disconnectAttr|disconnectJoint|diskCache|displacementToPoly|displayAffected|displayColor|displayCull|displayLevelOfDetail|displayPref|displayRGBColor|displaySmoothness|displayStats|displayString|displaySurface|distanceDimContext|distanceDimension|doBlur|dolly|dollyCtx|dopeSheetEditor|dot|dotProduct|doubleProfileBirailSurface|drag|dragAttrContext|draggerContext|dropoffLocator|duplicate|duplicateCurve|duplicateSurface|dynCache|dynControl|dynExport|dynExpression|dynGlobals|dynPaintEditor|dynParticleCtx|dynPref|dynRelEdPanel|dynRelEditor|dynamicLoad|editAttrLimits|editDisplayLayerGlobals|editDisplayLayerMembers|editRenderLayerAdjustment|editRenderLayerGlobals|editRenderLayerMembers|editor|editorTemplate|effector|emit|emitter|enableDevice|encodeString|endString|endsWith|env|equivalent|equivalentTol|erf|error|eval|evalDeferred|evalEcho|event|exactWorldBoundingBox|exclusiveLightCheckBox|exec|executeForEachObject|exists|exp|expression|expressionEditorListen|extendCurve|extendSurface|extrude|fcheck|fclose|feof|fflush|fgetline|fgetword|file|fileBrowserDialog|fileDialog|fileExtension|fileInfo|filetest|filletCurve|filter|filterCurve|filterExpand|filterStudioImport|findAllIntersections|findAnimCurves|findKeyframe|findMenuItem|findRelatedSkinCluster|finder|firstParentOf|fitBspline|flexor|floatEq|floatField|floatFieldGrp|floatScrollBar|floatSlider|floatSlider2|floatSliderButtonGrp|floatSliderGrp|floor|flow|fluidCacheInfo|fluidEmitter|fluidVoxelInfo|flushUndo|fmod|fontDialog|fopen|formLayout|format|fprint|frameLayout|fread|freeFormFillet|frewind|fromNativePath|fwrite|gamma|gauss|geometryConstraint|getApplicationVersionAsFloat|getAttr|getClassification|getDefaultBrush|getFileList|getFluidAttr|getInputDeviceRange|getMayaPanelTypes|getModifiers|getPanel|getParticleAttr|getPluginResource|getenv|getpid|glRender|glRenderEditor|globalStitch|gmatch|goal|gotoBindPose|grabColor|gradientControl|gradientControlNoAttr|graphDollyCtx|graphSelectContext|graphTrackCtx|gravity|grid|gridLayout|group|groupObjectsByName|hardenPointCurve|hardware|hardwareRenderPanel|headsUpDisplay|headsUpMessage|help|helpLine|hermite|hide|hilite|hitTest|hotBox|hotkey|hotkeyCheck|hsv_to_rgb|hudButton|hudSlider|hudSliderButton|hwReflectionMap|hwRender|hwRenderLoad|hyperGraph|hyperPanel|hyperShade|hypot|iconTextButton|iconTextCheckBox|iconTextRadioButton|iconTextRadioCollection|iconTextScrollList|iconTextStaticLabel|ikHandle|ikHandleCtx|ikHandleDisplayScale|ikSolver|ikSplineHandleCtx|ikSystem|ikSystemInfo|ikfkDisplayMethod|illustratorCurves|image|imfPlugins|inheritTransform|insertJoint|insertJointCtx|insertKeyCtx|insertKnotCurve|insertKnotSurface|instance|instanceable|instancer|intField|intFieldGrp|intScrollBar|intSlider|intSliderGrp|interToUI|internalVar|intersect|iprEngine|isAnimCurve|isConnected|isDirty|isParentOf|isSameObject|isTrue|isValidObjectName|isValidString|isValidUiName|isolateSelect|itemFilter|itemFilterAttr|itemFilterRender|itemFilterType|joint|jointCluster|jointCtx|jointDisplayScale|jointLattice|keyTangent|keyframe|keyframeOutliner|keyframeRegionCurrentTimeCtx|keyframeRegionDirectKeyCtx|keyframeRegionDollyCtx|keyframeRegionInsertKeyCtx|keyframeRegionMoveKeyCtx|keyframeRegionScaleKeyCtx|keyframeRegionSelectKeyCtx|keyframeRegionSetKeyCtx|keyframeRegionTrackCtx|keyframeStats|lassoContext|lattice|latticeDeformKeyCtx|launch|launchImageEditor|layerButton|layeredShaderPort|layeredTexturePort|layout|layoutDialog|lightList|lightListEditor|lightListPanel|lightlink|lineIntersection|linearPrecision|linstep|listAnimatable|listAttr|listCameras|listConnections|listDeviceAttachments|listHistory|listInputDeviceAxes|listInputDeviceButtons|listInputDevices|listMenuAnnotation|listNodeTypes|listPanelCategories|listRelatives|listSets|listTransforms|listUnselected|listerEditor|loadFluid|loadNewShelf|loadPlugin|loadPluginLanguageResources|loadPrefObjects|localizedPanelLabel|lockNode|loft|log|longNameOf|lookThru|ls|lsThroughFilter|lsType|lsUI|mag|makeIdentity|makeLive|makePaintable|makeRoll|makeSingleSurface|makeTubeOn|makebot|manipMoveContext|manipMoveLimitsCtx|manipOptions|manipRotateContext|manipRotateLimitsCtx|manipScaleContext|manipScaleLimitsCtx|marker|match|max|memory|menu|menuBarLayout|menuEditor|menuItem|menuItemToShelf|menuSet|menuSetPref|messageLine|min|minimizeApp|mirrorJoint|modelCurrentTimeCtx|modelEditor|modelPanel|mouse|movIn|movOut|move|moveIKtoFK|moveKeyCtx|moveVertexAlongDirection|multiProfileBirailSurface|mute|nParticle|nameCommand|nameField|namespace|namespaceInfo|newPanelItems|newton|nodeCast|nodeIconButton|nodeOutliner|nodePreset|nodeType|noise|nonLinear|normalConstraint|normalize|nurbsBoolean|nurbsCopyUVSet|nurbsCube|nurbsEditUV|nurbsPlane|nurbsSelect|nurbsSquare|nurbsToPoly|nurbsToPolygonsPref|nurbsToSubdiv|nurbsToSubdivPref|nurbsUVSet|nurbsViewDirectionVector|objExists|objectCenter|objectLayer|objectType|objectTypeUI|obsoleteProc|oceanNurbsPreviewPlane|offsetCurve|offsetCurveOnSurface|offsetSurface|openGLExtension|openMayaPref|optionMenu|optionMenuGrp|optionVar|orbit|orbitCtx|orientConstraint|outlinerEditor|outlinerPanel|overrideModifier|paintEffectsDisplay|pairBlend|palettePort|paneLayout|panel|panelConfiguration|panelHistory|paramDimContext|paramDimension|paramLocator|parent|parentConstraint|particle|particleExists|particleInstancer|particleRenderInfo|partition|pasteKey|pathAnimation|pause|pclose|percent|performanceOptions|pfxstrokes|pickWalk|picture|pixelMove|planarSrf|plane|play|playbackOptions|playblast|plugAttr|plugNode|pluginInfo|pluginResourceUtil|pointConstraint|pointCurveConstraint|pointLight|pointMatrixMult|pointOnCurve|pointOnSurface|pointPosition|poleVectorConstraint|polyAppend|polyAppendFacetCtx|polyAppendVertex|polyAutoProjection|polyAverageNormal|polyAverageVertex|polyBevel|polyBlendColor|polyBlindData|polyBoolOp|polyBridgeEdge|polyCacheMonitor|polyCheck|polyChipOff|polyClipboard|polyCloseBorder|polyCollapseEdge|polyCollapseFacet|polyColorBlindData|polyColorDel|polyColorPerVertex|polyColorSet|polyCompare|polyCone|polyCopyUV|polyCrease|polyCreaseCtx|polyCreateFacet|polyCreateFacetCtx|polyCube|polyCut|polyCutCtx|polyCylinder|polyCylindricalProjection|polyDelEdge|polyDelFacet|polyDelVertex|polyDuplicateAndConnect|polyDuplicateEdge|polyEditUV|polyEditUVShell|polyEvaluate|polyExtrudeEdge|polyExtrudeFacet|polyExtrudeVertex|polyFlipEdge|polyFlipUV|polyForceUV|polyGeoSampler|polyHelix|polyInfo|polyInstallAction|polyLayoutUV|polyListComponentConversion|polyMapCut|polyMapDel|polyMapSew|polyMapSewMove|polyMergeEdge|polyMergeEdgeCtx|polyMergeFacet|polyMergeFacetCtx|polyMergeUV|polyMergeVertex|polyMirrorFace|polyMoveEdge|polyMoveFacet|polyMoveFacetUV|polyMoveUV|polyMoveVertex|polyNormal|polyNormalPerVertex|polyNormalizeUV|polyOptUvs|polyOptions|polyOutput|polyPipe|polyPlanarProjection|polyPlane|polyPlatonicSolid|polyPoke|polyPrimitive|polyPrism|polyProjection|polyPyramid|polyQuad|polyQueryBlindData|polyReduce|polySelect|polySelectConstraint|polySelectConstraintMonitor|polySelectCtx|polySelectEditCtx|polySeparate|polySetToFaceNormal|polySewEdge|polyShortestPathCtx|polySmooth|polySoftEdge|polySphere|polySphericalProjection|polySplit|polySplitCtx|polySplitEdge|polySplitRing|polySplitVertex|polyStraightenUVBorder|polySubdivideEdge|polySubdivideFacet|polyToSubdiv|polyTorus|polyTransfer|polyTriangulate|polyUVSet|polyUnite|polyWedgeFace|popen|popupMenu|pose|pow|preloadRefEd|print|progressBar|progressWindow|projFileViewer|projectCurve|projectTangent|projectionContext|projectionManip|promptDialog|propModCtx|propMove|psdChannelOutliner|psdEditTextureFile|psdExport|psdTextureFile|putenv|pwd|python|querySubdiv|quit|rad_to_deg|radial|radioButton|radioButtonGrp|radioCollection|radioMenuItemCollection|rampColorPort|rand|randomizeFollicles|randstate|rangeControl|readTake|rebuildCurve|rebuildSurface|recordAttr|recordDevice|redo|reference|referenceEdit|referenceQuery|refineSubdivSelectionList|refresh|refreshAE|registerPluginResource|rehash|reloadImage|removeJoint|removeMultiInstance|removePanelCategory|rename|renameAttr|renameSelectionList|renameUI|render|renderGlobalsNode|renderInfo|renderLayerButton|renderLayerParent|renderLayerPostProcess|renderLayerUnparent|renderManip|renderPartition|renderQualityNode|renderSettings|renderThumbnailUpdate|renderWindowEditor|renderWindowSelectContext|renderer|reorder|reorderDeformers|requires|reroot|resampleFluid|resetAE|resetPfxToPolyCamera|resetTool|resolutionNode|retarget|reverseCurve|reverseSurface|revolve|rgb_to_hsv|rigidBody|rigidSolver|roll|rollCtx|rootOf|rot|rotate|rotationInterpolation|roundConstantRadius|rowColumnLayout|rowLayout|runTimeCommand|runup|sampleImage|saveAllShelves|saveAttrPreset|saveFluid|saveImage|saveInitialState|saveMenu|savePrefObjects|savePrefs|saveShelf|saveToolSettings|scale|scaleBrushBrightness|scaleComponents|scaleConstraint|scaleKey|scaleKeyCtx|sceneEditor|sceneUIReplacement|scmh|scriptCtx|scriptEditorInfo|scriptJob|scriptNode|scriptTable|scriptToShelf|scriptedPanel|scriptedPanelType|scrollField|scrollLayout|sculpt|searchPathArray|seed|selLoadSettings|select|selectContext|selectCurveCV|selectKey|selectKeyCtx|selectKeyframeRegionCtx|selectMode|selectPref|selectPriority|selectType|selectedNodes|selectionConnection|separator|setAttr|setAttrEnumResource|setAttrMapping|setAttrNiceNameResource|setConstraintRestPosition|setDefaultShadingGroup|setDrivenKeyframe|setDynamic|setEditCtx|setEditor|setFluidAttr|setFocus|setInfinity|setInputDeviceMapping|setKeyCtx|setKeyPath|setKeyframe|setKeyframeBlendshapeTargetWts|setMenuMode|setNodeNiceNameResource|setNodeTypeFlag|setParent|setParticleAttr|setPfxToPolyCamera|setPluginResource|setProject|setStampDensity|setStartupMessage|setState|setToolTo|setUITemplate|setXformManip|sets|shadingConnection|shadingGeometryRelCtx|shadingLightRelCtx|shadingNetworkCompare|shadingNode|shapeCompare|shelfButton|shelfLayout|shelfTabLayout|shellField|shortNameOf|showHelp|showHidden|showManipCtx|showSelectionInTitle|showShadingGroupAttrEditor|showWindow|sign|simplify|sin|singleProfileBirailSurface|size|sizeBytes|skinCluster|skinPercent|smoothCurve|smoothTangentSurface|smoothstep|snap2to2|snapKey|snapMode|snapTogetherCtx|snapshot|soft|softMod|softModCtx|sort|sound|soundControl|source|spaceLocator|sphere|sphrand|spotLight|spotLightPreviewPort|spreadSheetEditor|spring|sqrt|squareSurface|srtContext|stackTrace|startString|startsWith|stitchAndExplodeShell|stitchSurface|stitchSurfacePoints|strcmp|stringArrayCatenate|stringArrayContains|stringArrayCount|stringArrayInsertAtIndex|stringArrayIntersector|stringArrayRemove|stringArrayRemoveAtIndex|stringArrayRemoveDuplicates|stringArrayRemoveExact|stringArrayToString|stringToStringArray|strip|stripPrefixFromName|stroke|subdAutoProjection|subdCleanTopology|subdCollapse|subdDuplicateAndConnect|subdEditUV|subdListComponentConversion|subdMapCut|subdMapSewMove|subdMatchTopology|subdMirror|subdToBlind|subdToPoly|subdTransferUVsToCache|subdiv|subdivCrease|subdivDisplaySmoothness|substitute|substituteAllString|substituteGeometry|substring|surface|surfaceSampler|surfaceShaderList|swatchDisplayPort|switchTable|symbolButton|symbolCheckBox|sysFile|system|tabLayout|tan|tangentConstraint|texLatticeDeformContext|texManipContext|texMoveContext|texMoveUVShellContext|texRotateContext|texScaleContext|texSelectContext|texSelectShortestPathCtx|texSmudgeUVContext|texWinToolCtx|text|textCurves|textField|textFieldButtonGrp|textFieldGrp|textManip|textScrollList|textToShelf|textureDisplacePlane|textureHairColor|texturePlacementContext|textureWindow|threadCount|threePointArcCtx|timeControl|timePort|timerX|toNativePath|toggle|toggleAxis|toggleWindowVisibility|tokenize|tokenizeList|tolerance|tolower|toolButton|toolCollection|toolDropped|toolHasOptions|toolPropertyWindow|torus|toupper|trace|track|trackCtx|transferAttributes|transformCompare|transformLimits|translator|trim|trunc|truncateFluidCache|truncateHairCache|tumble|tumbleCtx|turbulence|twoPointArcCtx|uiRes|uiTemplate|unassignInputDevice|undo|undoInfo|ungroup|uniform|unit|unloadPlugin|untangleUV|untitledFileName|untrim|upAxis|updateAE|userCtx|uvLink|uvSnapshot|validateShelfName|vectorize|view2dToolCtx|viewCamera|viewClipPlane|viewFit|viewHeadOn|viewLookAt|viewManip|viewPlace|viewSet|visor|volumeAxis|vortex|waitCursor|warning|webBrowser|webBrowserPrefs|whatIs|window|windowPref|wire|wireContext|workspace|wrinkle|wrinkleContext|writeTake|xbmLangPathList|xform)\b/, 'operator': [ /\+[+=]?|-[-=]?|&&|\|\||[<>]=|[*\/!=]=?|[%^]/, diff --git a/components/prism-mel.min.js b/components/prism-mel.min.js index 72bff46cba..0fda416934 100644 --- a/components/prism-mel.min.js +++ b/components/prism-mel.min.js @@ -1 +1 @@ -Prism.languages.mel={comment:/\/\/.*/,code:{pattern:/`(?:\\.|[^\\`\r\n])*`/,greedy:!0,alias:"italic",inside:{delimiter:{pattern:/^`|`$/,alias:"punctuation"}}},string:{pattern:/"(?:\\.|[^\\"\r\n])*"/,greedy:!0},variable:/\$\w+/,number:/\b0x[\da-fA-F]+\b|\b\d+(?:\.\d*)?|\B\.\d+/,flag:{pattern:/-[^\d\W]\w*/,alias:"operator"},keyword:/\b(?:break|case|continue|default|do|else|float|for|global|if|in|int|matrix|proc|return|string|switch|vector|while)\b/,function:/\b\w+(?=\()|\b(?:about|abs|addAttr|addAttributeEditorNodeHelp|addDynamic|addNewShelfTab|addPP|addPanelCategory|addPrefixToName|advanceToNextDrivenKey|affectedNet|affects|aimConstraint|air|alias|aliasAttr|align|alignCtx|alignCurve|alignSurface|allViewFit|ambientLight|angle|angleBetween|animCone|animCurveEditor|animDisplay|animView|annotate|appendStringArray|applicationName|applyAttrPreset|applyTake|arcLenDimContext|arcLengthDimension|arclen|arrayMapper|art3dPaintCtx|artAttrCtx|artAttrPaintVertexCtx|artAttrSkinPaintCtx|artAttrTool|artBuildPaintMenu|artFluidAttrCtx|artPuttyCtx|artSelectCtx|artSetPaintCtx|artUserPaintCtx|assignCommand|assignInputDevice|assignViewportFactories|attachCurve|attachDeviceAttr|attachSurface|attrColorSliderGrp|attrCompatibility|attrControlGrp|attrEnumOptionMenu|attrEnumOptionMenuGrp|attrFieldGrp|attrFieldSliderGrp|attrNavigationControlGrp|attrPresetEditWin|attributeExists|attributeInfo|attributeMenu|attributeQuery|autoKeyframe|autoPlace|bakeClip|bakeFluidShading|bakePartialHistory|bakeResults|bakeSimulation|basename|basenameEx|batchRender|bessel|bevel|bevelPlus|binMembership|bindSkin|blend2|blendShape|blendShapeEditor|blendShapePanel|blendTwoAttr|blindDataType|boneLattice|boundary|boxDollyCtx|boxZoomCtx|bufferCurve|buildBookmarkMenu|buildKeyframeMenu|button|buttonManip|CBG|cacheFile|cacheFileCombine|cacheFileMerge|cacheFileTrack|camera|cameraView|canCreateManip|canvas|capitalizeString|catch|catchQuiet|ceil|changeSubdivComponentDisplayLevel|changeSubdivRegion|channelBox|character|characterMap|characterOutlineEditor|characterize|chdir|checkBox|checkBoxGrp|checkDefaultRenderGlobals|choice|circle|circularFillet|clamp|clear|clearCache|clip|clipEditor|clipEditorCurrentTimeCtx|clipSchedule|clipSchedulerOutliner|clipTrimBefore|closeCurve|closeSurface|cluster|cmdFileOutput|cmdScrollFieldExecuter|cmdScrollFieldReporter|cmdShell|coarsenSubdivSelectionList|collision|color|colorAtPoint|colorEditor|colorIndex|colorIndexSliderGrp|colorSliderButtonGrp|colorSliderGrp|columnLayout|commandEcho|commandLine|commandPort|compactHairSystem|componentEditor|compositingInterop|computePolysetVolume|condition|cone|confirmDialog|connectAttr|connectControl|connectDynamic|connectJoint|connectionInfo|constrain|constrainValue|constructionHistory|container|containsMultibyte|contextInfo|control|convertFromOldLayers|convertIffToPsd|convertLightmap|convertSolidTx|convertTessellation|convertUnit|copyArray|copyFlexor|copyKey|copySkinWeights|cos|cpButton|cpCache|cpClothSet|cpCollision|cpConstraint|cpConvClothToMesh|cpForces|cpGetSolverAttr|cpPanel|cpProperty|cpRigidCollisionFilter|cpSeam|cpSetEdit|cpSetSolverAttr|cpSolver|cpSolverTypes|cpTool|cpUpdateClothUVs|createDisplayLayer|createDrawCtx|createEditor|createLayeredPsdFile|createMotionField|createNewShelf|createNode|createRenderLayer|createSubdivRegion|cross|crossProduct|ctxAbort|ctxCompletion|ctxEditMode|ctxTraverse|currentCtx|currentTime|currentTimeCtx|currentUnit|curve|curveAddPtCtx|curveCVCtx|curveEPCtx|curveEditorCtx|curveIntersect|curveMoveEPCtx|curveOnSurface|curveSketchCtx|cutKey|cycleCheck|cylinder|dagPose|date|defaultLightListCheckBox|defaultNavigation|defineDataServer|defineVirtualDevice|deformer|deg_to_rad|delete|deleteAttr|deleteShadingGroupsAndMaterials|deleteShelfTab|deleteUI|deleteUnusedBrushes|delrandstr|detachCurve|detachDeviceAttr|detachSurface|deviceEditor|devicePanel|dgInfo|dgdirty|dgeval|dgtimer|dimWhen|directKeyCtx|directionalLight|dirmap|dirname|disable|disconnectAttr|disconnectJoint|diskCache|displacementToPoly|displayAffected|displayColor|displayCull|displayLevelOfDetail|displayPref|displayRGBColor|displaySmoothness|displayStats|displayString|displaySurface|distanceDimContext|distanceDimension|doBlur|dolly|dollyCtx|dopeSheetEditor|dot|dotProduct|doubleProfileBirailSurface|drag|dragAttrContext|draggerContext|dropoffLocator|duplicate|duplicateCurve|duplicateSurface|dynCache|dynControl|dynExport|dynExpression|dynGlobals|dynPaintEditor|dynParticleCtx|dynPref|dynRelEdPanel|dynRelEditor|dynamicLoad|editAttrLimits|editDisplayLayerGlobals|editDisplayLayerMembers|editRenderLayerAdjustment|editRenderLayerGlobals|editRenderLayerMembers|editor|editorTemplate|effector|emit|emitter|enableDevice|encodeString|endString|endsWith|env|equivalent|equivalentTol|erf|error|eval|evalDeferred|evalEcho|event|exactWorldBoundingBox|exclusiveLightCheckBox|exec|executeForEachObject|exists|exp|expression|expressionEditorListen|extendCurve|extendSurface|extrude|fcheck|fclose|feof|fflush|fgetline|fgetword|file|fileBrowserDialog|fileDialog|fileExtension|fileInfo|filetest|filletCurve|filter|filterCurve|filterExpand|filterStudioImport|findAllIntersections|findAnimCurves|findKeyframe|findMenuItem|findRelatedSkinCluster|finder|firstParentOf|fitBspline|flexor|floatEq|floatField|floatFieldGrp|floatScrollBar|floatSlider|floatSlider2|floatSliderButtonGrp|floatSliderGrp|floor|flow|fluidCacheInfo|fluidEmitter|fluidVoxelInfo|flushUndo|fmod|fontDialog|fopen|formLayout|format|fprint|frameLayout|fread|freeFormFillet|frewind|fromNativePath|fwrite|gamma|gauss|geometryConstraint|getApplicationVersionAsFloat|getAttr|getClassification|getDefaultBrush|getFileList|getFluidAttr|getInputDeviceRange|getMayaPanelTypes|getModifiers|getPanel|getParticleAttr|getPluginResource|getenv|getpid|glRender|glRenderEditor|globalStitch|gmatch|goal|gotoBindPose|grabColor|gradientControl|gradientControlNoAttr|graphDollyCtx|graphSelectContext|graphTrackCtx|gravity|grid|gridLayout|group|groupObjectsByName|HfAddAttractorToAS|HfAssignAS|HfBuildEqualMap|HfBuildFurFiles|HfBuildFurImages|HfCancelAFR|HfConnectASToHF|HfCreateAttractor|HfDeleteAS|HfEditAS|HfPerformCreateAS|HfRemoveAttractorFromAS|HfSelectAttached|HfSelectAttractors|HfUnAssignAS|hardenPointCurve|hardware|hardwareRenderPanel|headsUpDisplay|headsUpMessage|help|helpLine|hermite|hide|hilite|hitTest|hotBox|hotkey|hotkeyCheck|hsv_to_rgb|hudButton|hudSlider|hudSliderButton|hwReflectionMap|hwRender|hwRenderLoad|hyperGraph|hyperPanel|hyperShade|hypot|iconTextButton|iconTextCheckBox|iconTextRadioButton|iconTextRadioCollection|iconTextScrollList|iconTextStaticLabel|ikHandle|ikHandleCtx|ikHandleDisplayScale|ikSolver|ikSplineHandleCtx|ikSystem|ikSystemInfo|ikfkDisplayMethod|illustratorCurves|image|imfPlugins|inheritTransform|insertJoint|insertJointCtx|insertKeyCtx|insertKnotCurve|insertKnotSurface|instance|instanceable|instancer|intField|intFieldGrp|intScrollBar|intSlider|intSliderGrp|interToUI|internalVar|intersect|iprEngine|isAnimCurve|isConnected|isDirty|isParentOf|isSameObject|isTrue|isValidObjectName|isValidString|isValidUiName|isolateSelect|itemFilter|itemFilterAttr|itemFilterRender|itemFilterType|joint|jointCluster|jointCtx|jointDisplayScale|jointLattice|keyTangent|keyframe|keyframeOutliner|keyframeRegionCurrentTimeCtx|keyframeRegionDirectKeyCtx|keyframeRegionDollyCtx|keyframeRegionInsertKeyCtx|keyframeRegionMoveKeyCtx|keyframeRegionScaleKeyCtx|keyframeRegionSelectKeyCtx|keyframeRegionSetKeyCtx|keyframeRegionTrackCtx|keyframeStats|lassoContext|lattice|latticeDeformKeyCtx|launch|launchImageEditor|layerButton|layeredShaderPort|layeredTexturePort|layout|layoutDialog|lightList|lightListEditor|lightListPanel|lightlink|lineIntersection|linearPrecision|linstep|listAnimatable|listAttr|listCameras|listConnections|listDeviceAttachments|listHistory|listInputDeviceAxes|listInputDeviceButtons|listInputDevices|listMenuAnnotation|listNodeTypes|listPanelCategories|listRelatives|listSets|listTransforms|listUnselected|listerEditor|loadFluid|loadNewShelf|loadPlugin|loadPluginLanguageResources|loadPrefObjects|localizedPanelLabel|lockNode|loft|log|longNameOf|lookThru|ls|lsThroughFilter|lsType|lsUI|Mayatomr|mag|makeIdentity|makeLive|makePaintable|makeRoll|makeSingleSurface|makeTubeOn|makebot|manipMoveContext|manipMoveLimitsCtx|manipOptions|manipRotateContext|manipRotateLimitsCtx|manipScaleContext|manipScaleLimitsCtx|marker|match|max|memory|menu|menuBarLayout|menuEditor|menuItem|menuItemToShelf|menuSet|menuSetPref|messageLine|min|minimizeApp|mirrorJoint|modelCurrentTimeCtx|modelEditor|modelPanel|mouse|movIn|movOut|move|moveIKtoFK|moveKeyCtx|moveVertexAlongDirection|multiProfileBirailSurface|mute|nParticle|nameCommand|nameField|namespace|namespaceInfo|newPanelItems|newton|nodeCast|nodeIconButton|nodeOutliner|nodePreset|nodeType|noise|nonLinear|normalConstraint|normalize|nurbsBoolean|nurbsCopyUVSet|nurbsCube|nurbsEditUV|nurbsPlane|nurbsSelect|nurbsSquare|nurbsToPoly|nurbsToPolygonsPref|nurbsToSubdiv|nurbsToSubdivPref|nurbsUVSet|nurbsViewDirectionVector|objExists|objectCenter|objectLayer|objectType|objectTypeUI|obsoleteProc|oceanNurbsPreviewPlane|offsetCurve|offsetCurveOnSurface|offsetSurface|openGLExtension|openMayaPref|optionMenu|optionMenuGrp|optionVar|orbit|orbitCtx|orientConstraint|outlinerEditor|outlinerPanel|overrideModifier|paintEffectsDisplay|pairBlend|palettePort|paneLayout|panel|panelConfiguration|panelHistory|paramDimContext|paramDimension|paramLocator|parent|parentConstraint|particle|particleExists|particleInstancer|particleRenderInfo|partition|pasteKey|pathAnimation|pause|pclose|percent|performanceOptions|pfxstrokes|pickWalk|picture|pixelMove|planarSrf|plane|play|playbackOptions|playblast|plugAttr|plugNode|pluginInfo|pluginResourceUtil|pointConstraint|pointCurveConstraint|pointLight|pointMatrixMult|pointOnCurve|pointOnSurface|pointPosition|poleVectorConstraint|polyAppend|polyAppendFacetCtx|polyAppendVertex|polyAutoProjection|polyAverageNormal|polyAverageVertex|polyBevel|polyBlendColor|polyBlindData|polyBoolOp|polyBridgeEdge|polyCacheMonitor|polyCheck|polyChipOff|polyClipboard|polyCloseBorder|polyCollapseEdge|polyCollapseFacet|polyColorBlindData|polyColorDel|polyColorPerVertex|polyColorSet|polyCompare|polyCone|polyCopyUV|polyCrease|polyCreaseCtx|polyCreateFacet|polyCreateFacetCtx|polyCube|polyCut|polyCutCtx|polyCylinder|polyCylindricalProjection|polyDelEdge|polyDelFacet|polyDelVertex|polyDuplicateAndConnect|polyDuplicateEdge|polyEditUV|polyEditUVShell|polyEvaluate|polyExtrudeEdge|polyExtrudeFacet|polyExtrudeVertex|polyFlipEdge|polyFlipUV|polyForceUV|polyGeoSampler|polyHelix|polyInfo|polyInstallAction|polyLayoutUV|polyListComponentConversion|polyMapCut|polyMapDel|polyMapSew|polyMapSewMove|polyMergeEdge|polyMergeEdgeCtx|polyMergeFacet|polyMergeFacetCtx|polyMergeUV|polyMergeVertex|polyMirrorFace|polyMoveEdge|polyMoveFacet|polyMoveFacetUV|polyMoveUV|polyMoveVertex|polyNormal|polyNormalPerVertex|polyNormalizeUV|polyOptUvs|polyOptions|polyOutput|polyPipe|polyPlanarProjection|polyPlane|polyPlatonicSolid|polyPoke|polyPrimitive|polyPrism|polyProjection|polyPyramid|polyQuad|polyQueryBlindData|polyReduce|polySelect|polySelectConstraint|polySelectConstraintMonitor|polySelectCtx|polySelectEditCtx|polySeparate|polySetToFaceNormal|polySewEdge|polyShortestPathCtx|polySmooth|polySoftEdge|polySphere|polySphericalProjection|polySplit|polySplitCtx|polySplitEdge|polySplitRing|polySplitVertex|polyStraightenUVBorder|polySubdivideEdge|polySubdivideFacet|polyToSubdiv|polyTorus|polyTransfer|polyTriangulate|polyUVSet|polyUnite|polyWedgeFace|popen|popupMenu|pose|pow|preloadRefEd|print|progressBar|progressWindow|projFileViewer|projectCurve|projectTangent|projectionContext|projectionManip|promptDialog|propModCtx|propMove|psdChannelOutliner|psdEditTextureFile|psdExport|psdTextureFile|putenv|pwd|python|querySubdiv|quit|rad_to_deg|radial|radioButton|radioButtonGrp|radioCollection|radioMenuItemCollection|rampColorPort|rand|randomizeFollicles|randstate|rangeControl|readTake|rebuildCurve|rebuildSurface|recordAttr|recordDevice|redo|reference|referenceEdit|referenceQuery|refineSubdivSelectionList|refresh|refreshAE|registerPluginResource|rehash|reloadImage|removeJoint|removeMultiInstance|removePanelCategory|rename|renameAttr|renameSelectionList|renameUI|render|renderGlobalsNode|renderInfo|renderLayerButton|renderLayerParent|renderLayerPostProcess|renderLayerUnparent|renderManip|renderPartition|renderQualityNode|renderSettings|renderThumbnailUpdate|renderWindowEditor|renderWindowSelectContext|renderer|reorder|reorderDeformers|requires|reroot|resampleFluid|resetAE|resetPfxToPolyCamera|resetTool|resolutionNode|retarget|reverseCurve|reverseSurface|revolve|rgb_to_hsv|rigidBody|rigidSolver|roll|rollCtx|rootOf|rot|rotate|rotationInterpolation|roundConstantRadius|rowColumnLayout|rowLayout|runTimeCommand|runup|sampleImage|saveAllShelves|saveAttrPreset|saveFluid|saveImage|saveInitialState|saveMenu|savePrefObjects|savePrefs|saveShelf|saveToolSettings|scale|scaleBrushBrightness|scaleComponents|scaleConstraint|scaleKey|scaleKeyCtx|sceneEditor|sceneUIReplacement|scmh|scriptCtx|scriptEditorInfo|scriptJob|scriptNode|scriptTable|scriptToShelf|scriptedPanel|scriptedPanelType|scrollField|scrollLayout|sculpt|searchPathArray|seed|selLoadSettings|select|selectContext|selectCurveCV|selectKey|selectKeyCtx|selectKeyframeRegionCtx|selectMode|selectPref|selectPriority|selectType|selectedNodes|selectionConnection|separator|setAttr|setAttrEnumResource|setAttrMapping|setAttrNiceNameResource|setConstraintRestPosition|setDefaultShadingGroup|setDrivenKeyframe|setDynamic|setEditCtx|setEditor|setFluidAttr|setFocus|setInfinity|setInputDeviceMapping|setKeyCtx|setKeyPath|setKeyframe|setKeyframeBlendshapeTargetWts|setMenuMode|setNodeNiceNameResource|setNodeTypeFlag|setParent|setParticleAttr|setPfxToPolyCamera|setPluginResource|setProject|setStampDensity|setStartupMessage|setState|setToolTo|setUITemplate|setXformManip|sets|shadingConnection|shadingGeometryRelCtx|shadingLightRelCtx|shadingNetworkCompare|shadingNode|shapeCompare|shelfButton|shelfLayout|shelfTabLayout|shellField|shortNameOf|showHelp|showHidden|showManipCtx|showSelectionInTitle|showShadingGroupAttrEditor|showWindow|sign|simplify|sin|singleProfileBirailSurface|size|sizeBytes|skinCluster|skinPercent|smoothCurve|smoothTangentSurface|smoothstep|snap2to2|snapKey|snapMode|snapTogetherCtx|snapshot|soft|softMod|softModCtx|sort|sound|soundControl|source|spaceLocator|sphere|sphrand|spotLight|spotLightPreviewPort|spreadSheetEditor|spring|sqrt|squareSurface|srtContext|stackTrace|startString|startsWith|stitchAndExplodeShell|stitchSurface|stitchSurfacePoints|strcmp|stringArrayCatenate|stringArrayContains|stringArrayCount|stringArrayInsertAtIndex|stringArrayIntersector|stringArrayRemove|stringArrayRemoveAtIndex|stringArrayRemoveDuplicates|stringArrayRemoveExact|stringArrayToString|stringToStringArray|strip|stripPrefixFromName|stroke|subdAutoProjection|subdCleanTopology|subdCollapse|subdDuplicateAndConnect|subdEditUV|subdListComponentConversion|subdMapCut|subdMapSewMove|subdMatchTopology|subdMirror|subdToBlind|subdToPoly|subdTransferUVsToCache|subdiv|subdivCrease|subdivDisplaySmoothness|substitute|substituteAllString|substituteGeometry|substring|surface|surfaceSampler|surfaceShaderList|swatchDisplayPort|switchTable|symbolButton|symbolCheckBox|sysFile|system|tabLayout|tan|tangentConstraint|texLatticeDeformContext|texManipContext|texMoveContext|texMoveUVShellContext|texRotateContext|texScaleContext|texSelectContext|texSelectShortestPathCtx|texSmudgeUVContext|texWinToolCtx|text|textCurves|textField|textFieldButtonGrp|textFieldGrp|textManip|textScrollList|textToShelf|textureDisplacePlane|textureHairColor|texturePlacementContext|textureWindow|threadCount|threePointArcCtx|timeControl|timePort|timerX|toNativePath|toggle|toggleAxis|toggleWindowVisibility|tokenize|tokenizeList|tolerance|tolower|toolButton|toolCollection|toolDropped|toolHasOptions|toolPropertyWindow|torus|toupper|trace|track|trackCtx|transferAttributes|transformCompare|transformLimits|translator|trim|trunc|truncateFluidCache|truncateHairCache|tumble|tumbleCtx|turbulence|twoPointArcCtx|uiRes|uiTemplate|unassignInputDevice|undo|undoInfo|ungroup|uniform|unit|unloadPlugin|untangleUV|untitledFileName|untrim|upAxis|updateAE|userCtx|uvLink|uvSnapshot|validateShelfName|vectorize|view2dToolCtx|viewCamera|viewClipPlane|viewFit|viewHeadOn|viewLookAt|viewManip|viewPlace|viewSet|visor|volumeAxis|vortex|waitCursor|warning|webBrowser|webBrowserPrefs|whatIs|window|windowPref|wire|wireContext|workspace|wrinkle|wrinkleContext|writeTake|xbmLangPathList|xform)\b/,operator:[/\+[+=]?|-[-=]?|&&|\|\||[<>]=|[*\/!=]=?|[%^]/,{pattern:/(^|[^<])<(?!<)/,lookbehind:!0},{pattern:/(^|[^>])>(?!>)/,lookbehind:!0}],punctuation:/<<|>>|[.,:;?\[\](){}]/},Prism.languages.mel.code.inside.rest=Prism.languages.mel; \ No newline at end of file +Prism.languages.mel={comment:/\/\/.*/,code:{pattern:/`(?:\\.|[^\\`\r\n])*`/,greedy:!0,alias:"italic",inside:{delimiter:{pattern:/^`|`$/,alias:"punctuation"}}},string:{pattern:/"(?:\\.|[^\\"\r\n])*"/,greedy:!0},variable:/\$\w+/,number:/\b0x[\da-fA-F]+\b|\b\d+(?:\.\d*)?|\B\.\d+/,flag:{pattern:/-[^\d\W]\w*/,alias:"operator"},keyword:/\b(?:break|case|continue|default|do|else|float|for|global|if|in|int|matrix|proc|return|string|switch|vector|while)\b/,function:/\b\w+(?=\()|\b(?:CBG|HfAddAttractorToAS|HfAssignAS|HfBuildEqualMap|HfBuildFurFiles|HfBuildFurImages|HfCancelAFR|HfConnectASToHF|HfCreateAttractor|HfDeleteAS|HfEditAS|HfPerformCreateAS|HfRemoveAttractorFromAS|HfSelectAttached|HfSelectAttractors|HfUnAssignAS|Mayatomr|about|abs|addAttr|addAttributeEditorNodeHelp|addDynamic|addNewShelfTab|addPP|addPanelCategory|addPrefixToName|advanceToNextDrivenKey|affectedNet|affects|aimConstraint|air|alias|aliasAttr|align|alignCtx|alignCurve|alignSurface|allViewFit|ambientLight|angle|angleBetween|animCone|animCurveEditor|animDisplay|animView|annotate|appendStringArray|applicationName|applyAttrPreset|applyTake|arcLenDimContext|arcLengthDimension|arclen|arrayMapper|art3dPaintCtx|artAttrCtx|artAttrPaintVertexCtx|artAttrSkinPaintCtx|artAttrTool|artBuildPaintMenu|artFluidAttrCtx|artPuttyCtx|artSelectCtx|artSetPaintCtx|artUserPaintCtx|assignCommand|assignInputDevice|assignViewportFactories|attachCurve|attachDeviceAttr|attachSurface|attrColorSliderGrp|attrCompatibility|attrControlGrp|attrEnumOptionMenu|attrEnumOptionMenuGrp|attrFieldGrp|attrFieldSliderGrp|attrNavigationControlGrp|attrPresetEditWin|attributeExists|attributeInfo|attributeMenu|attributeQuery|autoKeyframe|autoPlace|bakeClip|bakeFluidShading|bakePartialHistory|bakeResults|bakeSimulation|basename|basenameEx|batchRender|bessel|bevel|bevelPlus|binMembership|bindSkin|blend2|blendShape|blendShapeEditor|blendShapePanel|blendTwoAttr|blindDataType|boneLattice|boundary|boxDollyCtx|boxZoomCtx|bufferCurve|buildBookmarkMenu|buildKeyframeMenu|button|buttonManip|cacheFile|cacheFileCombine|cacheFileMerge|cacheFileTrack|camera|cameraView|canCreateManip|canvas|capitalizeString|catch|catchQuiet|ceil|changeSubdivComponentDisplayLevel|changeSubdivRegion|channelBox|character|characterMap|characterOutlineEditor|characterize|chdir|checkBox|checkBoxGrp|checkDefaultRenderGlobals|choice|circle|circularFillet|clamp|clear|clearCache|clip|clipEditor|clipEditorCurrentTimeCtx|clipSchedule|clipSchedulerOutliner|clipTrimBefore|closeCurve|closeSurface|cluster|cmdFileOutput|cmdScrollFieldExecuter|cmdScrollFieldReporter|cmdShell|coarsenSubdivSelectionList|collision|color|colorAtPoint|colorEditor|colorIndex|colorIndexSliderGrp|colorSliderButtonGrp|colorSliderGrp|columnLayout|commandEcho|commandLine|commandPort|compactHairSystem|componentEditor|compositingInterop|computePolysetVolume|condition|cone|confirmDialog|connectAttr|connectControl|connectDynamic|connectJoint|connectionInfo|constrain|constrainValue|constructionHistory|container|containsMultibyte|contextInfo|control|convertFromOldLayers|convertIffToPsd|convertLightmap|convertSolidTx|convertTessellation|convertUnit|copyArray|copyFlexor|copyKey|copySkinWeights|cos|cpButton|cpCache|cpClothSet|cpCollision|cpConstraint|cpConvClothToMesh|cpForces|cpGetSolverAttr|cpPanel|cpProperty|cpRigidCollisionFilter|cpSeam|cpSetEdit|cpSetSolverAttr|cpSolver|cpSolverTypes|cpTool|cpUpdateClothUVs|createDisplayLayer|createDrawCtx|createEditor|createLayeredPsdFile|createMotionField|createNewShelf|createNode|createRenderLayer|createSubdivRegion|cross|crossProduct|ctxAbort|ctxCompletion|ctxEditMode|ctxTraverse|currentCtx|currentTime|currentTimeCtx|currentUnit|curve|curveAddPtCtx|curveCVCtx|curveEPCtx|curveEditorCtx|curveIntersect|curveMoveEPCtx|curveOnSurface|curveSketchCtx|cutKey|cycleCheck|cylinder|dagPose|date|defaultLightListCheckBox|defaultNavigation|defineDataServer|defineVirtualDevice|deformer|deg_to_rad|delete|deleteAttr|deleteShadingGroupsAndMaterials|deleteShelfTab|deleteUI|deleteUnusedBrushes|delrandstr|detachCurve|detachDeviceAttr|detachSurface|deviceEditor|devicePanel|dgInfo|dgdirty|dgeval|dgtimer|dimWhen|directKeyCtx|directionalLight|dirmap|dirname|disable|disconnectAttr|disconnectJoint|diskCache|displacementToPoly|displayAffected|displayColor|displayCull|displayLevelOfDetail|displayPref|displayRGBColor|displaySmoothness|displayStats|displayString|displaySurface|distanceDimContext|distanceDimension|doBlur|dolly|dollyCtx|dopeSheetEditor|dot|dotProduct|doubleProfileBirailSurface|drag|dragAttrContext|draggerContext|dropoffLocator|duplicate|duplicateCurve|duplicateSurface|dynCache|dynControl|dynExport|dynExpression|dynGlobals|dynPaintEditor|dynParticleCtx|dynPref|dynRelEdPanel|dynRelEditor|dynamicLoad|editAttrLimits|editDisplayLayerGlobals|editDisplayLayerMembers|editRenderLayerAdjustment|editRenderLayerGlobals|editRenderLayerMembers|editor|editorTemplate|effector|emit|emitter|enableDevice|encodeString|endString|endsWith|env|equivalent|equivalentTol|erf|error|eval|evalDeferred|evalEcho|event|exactWorldBoundingBox|exclusiveLightCheckBox|exec|executeForEachObject|exists|exp|expression|expressionEditorListen|extendCurve|extendSurface|extrude|fcheck|fclose|feof|fflush|fgetline|fgetword|file|fileBrowserDialog|fileDialog|fileExtension|fileInfo|filetest|filletCurve|filter|filterCurve|filterExpand|filterStudioImport|findAllIntersections|findAnimCurves|findKeyframe|findMenuItem|findRelatedSkinCluster|finder|firstParentOf|fitBspline|flexor|floatEq|floatField|floatFieldGrp|floatScrollBar|floatSlider|floatSlider2|floatSliderButtonGrp|floatSliderGrp|floor|flow|fluidCacheInfo|fluidEmitter|fluidVoxelInfo|flushUndo|fmod|fontDialog|fopen|formLayout|format|fprint|frameLayout|fread|freeFormFillet|frewind|fromNativePath|fwrite|gamma|gauss|geometryConstraint|getApplicationVersionAsFloat|getAttr|getClassification|getDefaultBrush|getFileList|getFluidAttr|getInputDeviceRange|getMayaPanelTypes|getModifiers|getPanel|getParticleAttr|getPluginResource|getenv|getpid|glRender|glRenderEditor|globalStitch|gmatch|goal|gotoBindPose|grabColor|gradientControl|gradientControlNoAttr|graphDollyCtx|graphSelectContext|graphTrackCtx|gravity|grid|gridLayout|group|groupObjectsByName|hardenPointCurve|hardware|hardwareRenderPanel|headsUpDisplay|headsUpMessage|help|helpLine|hermite|hide|hilite|hitTest|hotBox|hotkey|hotkeyCheck|hsv_to_rgb|hudButton|hudSlider|hudSliderButton|hwReflectionMap|hwRender|hwRenderLoad|hyperGraph|hyperPanel|hyperShade|hypot|iconTextButton|iconTextCheckBox|iconTextRadioButton|iconTextRadioCollection|iconTextScrollList|iconTextStaticLabel|ikHandle|ikHandleCtx|ikHandleDisplayScale|ikSolver|ikSplineHandleCtx|ikSystem|ikSystemInfo|ikfkDisplayMethod|illustratorCurves|image|imfPlugins|inheritTransform|insertJoint|insertJointCtx|insertKeyCtx|insertKnotCurve|insertKnotSurface|instance|instanceable|instancer|intField|intFieldGrp|intScrollBar|intSlider|intSliderGrp|interToUI|internalVar|intersect|iprEngine|isAnimCurve|isConnected|isDirty|isParentOf|isSameObject|isTrue|isValidObjectName|isValidString|isValidUiName|isolateSelect|itemFilter|itemFilterAttr|itemFilterRender|itemFilterType|joint|jointCluster|jointCtx|jointDisplayScale|jointLattice|keyTangent|keyframe|keyframeOutliner|keyframeRegionCurrentTimeCtx|keyframeRegionDirectKeyCtx|keyframeRegionDollyCtx|keyframeRegionInsertKeyCtx|keyframeRegionMoveKeyCtx|keyframeRegionScaleKeyCtx|keyframeRegionSelectKeyCtx|keyframeRegionSetKeyCtx|keyframeRegionTrackCtx|keyframeStats|lassoContext|lattice|latticeDeformKeyCtx|launch|launchImageEditor|layerButton|layeredShaderPort|layeredTexturePort|layout|layoutDialog|lightList|lightListEditor|lightListPanel|lightlink|lineIntersection|linearPrecision|linstep|listAnimatable|listAttr|listCameras|listConnections|listDeviceAttachments|listHistory|listInputDeviceAxes|listInputDeviceButtons|listInputDevices|listMenuAnnotation|listNodeTypes|listPanelCategories|listRelatives|listSets|listTransforms|listUnselected|listerEditor|loadFluid|loadNewShelf|loadPlugin|loadPluginLanguageResources|loadPrefObjects|localizedPanelLabel|lockNode|loft|log|longNameOf|lookThru|ls|lsThroughFilter|lsType|lsUI|mag|makeIdentity|makeLive|makePaintable|makeRoll|makeSingleSurface|makeTubeOn|makebot|manipMoveContext|manipMoveLimitsCtx|manipOptions|manipRotateContext|manipRotateLimitsCtx|manipScaleContext|manipScaleLimitsCtx|marker|match|max|memory|menu|menuBarLayout|menuEditor|menuItem|menuItemToShelf|menuSet|menuSetPref|messageLine|min|minimizeApp|mirrorJoint|modelCurrentTimeCtx|modelEditor|modelPanel|mouse|movIn|movOut|move|moveIKtoFK|moveKeyCtx|moveVertexAlongDirection|multiProfileBirailSurface|mute|nParticle|nameCommand|nameField|namespace|namespaceInfo|newPanelItems|newton|nodeCast|nodeIconButton|nodeOutliner|nodePreset|nodeType|noise|nonLinear|normalConstraint|normalize|nurbsBoolean|nurbsCopyUVSet|nurbsCube|nurbsEditUV|nurbsPlane|nurbsSelect|nurbsSquare|nurbsToPoly|nurbsToPolygonsPref|nurbsToSubdiv|nurbsToSubdivPref|nurbsUVSet|nurbsViewDirectionVector|objExists|objectCenter|objectLayer|objectType|objectTypeUI|obsoleteProc|oceanNurbsPreviewPlane|offsetCurve|offsetCurveOnSurface|offsetSurface|openGLExtension|openMayaPref|optionMenu|optionMenuGrp|optionVar|orbit|orbitCtx|orientConstraint|outlinerEditor|outlinerPanel|overrideModifier|paintEffectsDisplay|pairBlend|palettePort|paneLayout|panel|panelConfiguration|panelHistory|paramDimContext|paramDimension|paramLocator|parent|parentConstraint|particle|particleExists|particleInstancer|particleRenderInfo|partition|pasteKey|pathAnimation|pause|pclose|percent|performanceOptions|pfxstrokes|pickWalk|picture|pixelMove|planarSrf|plane|play|playbackOptions|playblast|plugAttr|plugNode|pluginInfo|pluginResourceUtil|pointConstraint|pointCurveConstraint|pointLight|pointMatrixMult|pointOnCurve|pointOnSurface|pointPosition|poleVectorConstraint|polyAppend|polyAppendFacetCtx|polyAppendVertex|polyAutoProjection|polyAverageNormal|polyAverageVertex|polyBevel|polyBlendColor|polyBlindData|polyBoolOp|polyBridgeEdge|polyCacheMonitor|polyCheck|polyChipOff|polyClipboard|polyCloseBorder|polyCollapseEdge|polyCollapseFacet|polyColorBlindData|polyColorDel|polyColorPerVertex|polyColorSet|polyCompare|polyCone|polyCopyUV|polyCrease|polyCreaseCtx|polyCreateFacet|polyCreateFacetCtx|polyCube|polyCut|polyCutCtx|polyCylinder|polyCylindricalProjection|polyDelEdge|polyDelFacet|polyDelVertex|polyDuplicateAndConnect|polyDuplicateEdge|polyEditUV|polyEditUVShell|polyEvaluate|polyExtrudeEdge|polyExtrudeFacet|polyExtrudeVertex|polyFlipEdge|polyFlipUV|polyForceUV|polyGeoSampler|polyHelix|polyInfo|polyInstallAction|polyLayoutUV|polyListComponentConversion|polyMapCut|polyMapDel|polyMapSew|polyMapSewMove|polyMergeEdge|polyMergeEdgeCtx|polyMergeFacet|polyMergeFacetCtx|polyMergeUV|polyMergeVertex|polyMirrorFace|polyMoveEdge|polyMoveFacet|polyMoveFacetUV|polyMoveUV|polyMoveVertex|polyNormal|polyNormalPerVertex|polyNormalizeUV|polyOptUvs|polyOptions|polyOutput|polyPipe|polyPlanarProjection|polyPlane|polyPlatonicSolid|polyPoke|polyPrimitive|polyPrism|polyProjection|polyPyramid|polyQuad|polyQueryBlindData|polyReduce|polySelect|polySelectConstraint|polySelectConstraintMonitor|polySelectCtx|polySelectEditCtx|polySeparate|polySetToFaceNormal|polySewEdge|polyShortestPathCtx|polySmooth|polySoftEdge|polySphere|polySphericalProjection|polySplit|polySplitCtx|polySplitEdge|polySplitRing|polySplitVertex|polyStraightenUVBorder|polySubdivideEdge|polySubdivideFacet|polyToSubdiv|polyTorus|polyTransfer|polyTriangulate|polyUVSet|polyUnite|polyWedgeFace|popen|popupMenu|pose|pow|preloadRefEd|print|progressBar|progressWindow|projFileViewer|projectCurve|projectTangent|projectionContext|projectionManip|promptDialog|propModCtx|propMove|psdChannelOutliner|psdEditTextureFile|psdExport|psdTextureFile|putenv|pwd|python|querySubdiv|quit|rad_to_deg|radial|radioButton|radioButtonGrp|radioCollection|radioMenuItemCollection|rampColorPort|rand|randomizeFollicles|randstate|rangeControl|readTake|rebuildCurve|rebuildSurface|recordAttr|recordDevice|redo|reference|referenceEdit|referenceQuery|refineSubdivSelectionList|refresh|refreshAE|registerPluginResource|rehash|reloadImage|removeJoint|removeMultiInstance|removePanelCategory|rename|renameAttr|renameSelectionList|renameUI|render|renderGlobalsNode|renderInfo|renderLayerButton|renderLayerParent|renderLayerPostProcess|renderLayerUnparent|renderManip|renderPartition|renderQualityNode|renderSettings|renderThumbnailUpdate|renderWindowEditor|renderWindowSelectContext|renderer|reorder|reorderDeformers|requires|reroot|resampleFluid|resetAE|resetPfxToPolyCamera|resetTool|resolutionNode|retarget|reverseCurve|reverseSurface|revolve|rgb_to_hsv|rigidBody|rigidSolver|roll|rollCtx|rootOf|rot|rotate|rotationInterpolation|roundConstantRadius|rowColumnLayout|rowLayout|runTimeCommand|runup|sampleImage|saveAllShelves|saveAttrPreset|saveFluid|saveImage|saveInitialState|saveMenu|savePrefObjects|savePrefs|saveShelf|saveToolSettings|scale|scaleBrushBrightness|scaleComponents|scaleConstraint|scaleKey|scaleKeyCtx|sceneEditor|sceneUIReplacement|scmh|scriptCtx|scriptEditorInfo|scriptJob|scriptNode|scriptTable|scriptToShelf|scriptedPanel|scriptedPanelType|scrollField|scrollLayout|sculpt|searchPathArray|seed|selLoadSettings|select|selectContext|selectCurveCV|selectKey|selectKeyCtx|selectKeyframeRegionCtx|selectMode|selectPref|selectPriority|selectType|selectedNodes|selectionConnection|separator|setAttr|setAttrEnumResource|setAttrMapping|setAttrNiceNameResource|setConstraintRestPosition|setDefaultShadingGroup|setDrivenKeyframe|setDynamic|setEditCtx|setEditor|setFluidAttr|setFocus|setInfinity|setInputDeviceMapping|setKeyCtx|setKeyPath|setKeyframe|setKeyframeBlendshapeTargetWts|setMenuMode|setNodeNiceNameResource|setNodeTypeFlag|setParent|setParticleAttr|setPfxToPolyCamera|setPluginResource|setProject|setStampDensity|setStartupMessage|setState|setToolTo|setUITemplate|setXformManip|sets|shadingConnection|shadingGeometryRelCtx|shadingLightRelCtx|shadingNetworkCompare|shadingNode|shapeCompare|shelfButton|shelfLayout|shelfTabLayout|shellField|shortNameOf|showHelp|showHidden|showManipCtx|showSelectionInTitle|showShadingGroupAttrEditor|showWindow|sign|simplify|sin|singleProfileBirailSurface|size|sizeBytes|skinCluster|skinPercent|smoothCurve|smoothTangentSurface|smoothstep|snap2to2|snapKey|snapMode|snapTogetherCtx|snapshot|soft|softMod|softModCtx|sort|sound|soundControl|source|spaceLocator|sphere|sphrand|spotLight|spotLightPreviewPort|spreadSheetEditor|spring|sqrt|squareSurface|srtContext|stackTrace|startString|startsWith|stitchAndExplodeShell|stitchSurface|stitchSurfacePoints|strcmp|stringArrayCatenate|stringArrayContains|stringArrayCount|stringArrayInsertAtIndex|stringArrayIntersector|stringArrayRemove|stringArrayRemoveAtIndex|stringArrayRemoveDuplicates|stringArrayRemoveExact|stringArrayToString|stringToStringArray|strip|stripPrefixFromName|stroke|subdAutoProjection|subdCleanTopology|subdCollapse|subdDuplicateAndConnect|subdEditUV|subdListComponentConversion|subdMapCut|subdMapSewMove|subdMatchTopology|subdMirror|subdToBlind|subdToPoly|subdTransferUVsToCache|subdiv|subdivCrease|subdivDisplaySmoothness|substitute|substituteAllString|substituteGeometry|substring|surface|surfaceSampler|surfaceShaderList|swatchDisplayPort|switchTable|symbolButton|symbolCheckBox|sysFile|system|tabLayout|tan|tangentConstraint|texLatticeDeformContext|texManipContext|texMoveContext|texMoveUVShellContext|texRotateContext|texScaleContext|texSelectContext|texSelectShortestPathCtx|texSmudgeUVContext|texWinToolCtx|text|textCurves|textField|textFieldButtonGrp|textFieldGrp|textManip|textScrollList|textToShelf|textureDisplacePlane|textureHairColor|texturePlacementContext|textureWindow|threadCount|threePointArcCtx|timeControl|timePort|timerX|toNativePath|toggle|toggleAxis|toggleWindowVisibility|tokenize|tokenizeList|tolerance|tolower|toolButton|toolCollection|toolDropped|toolHasOptions|toolPropertyWindow|torus|toupper|trace|track|trackCtx|transferAttributes|transformCompare|transformLimits|translator|trim|trunc|truncateFluidCache|truncateHairCache|tumble|tumbleCtx|turbulence|twoPointArcCtx|uiRes|uiTemplate|unassignInputDevice|undo|undoInfo|ungroup|uniform|unit|unloadPlugin|untangleUV|untitledFileName|untrim|upAxis|updateAE|userCtx|uvLink|uvSnapshot|validateShelfName|vectorize|view2dToolCtx|viewCamera|viewClipPlane|viewFit|viewHeadOn|viewLookAt|viewManip|viewPlace|viewSet|visor|volumeAxis|vortex|waitCursor|warning|webBrowser|webBrowserPrefs|whatIs|window|windowPref|wire|wireContext|workspace|wrinkle|wrinkleContext|writeTake|xbmLangPathList|xform)\b/,operator:[/\+[+=]?|-[-=]?|&&|\|\||[<>]=|[*\/!=]=?|[%^]/,{pattern:/(^|[^<])<(?!<)/,lookbehind:!0},{pattern:/(^|[^>])>(?!>)/,lookbehind:!0}],punctuation:/<<|>>|[.,:;?\[\](){}]/},Prism.languages.mel.code.inside.rest=Prism.languages.mel; \ No newline at end of file diff --git a/components/prism-mizar.js b/components/prism-mizar.js index 7144a3c182..9e19e7afdd 100644 --- a/components/prism-mizar.js +++ b/components/prism-mizar.js @@ -1,6 +1,6 @@ Prism.languages.mizar = { 'comment': /::.+/, - 'keyword': /@proof\b|\b(?:according|aggregate|all|and|antonym|are|as|associativity|assume|asymmetry|attr|be|begin|being|by|canceled|case|cases|clusters?|coherence|commutativity|compatibility|connectedness|consider|consistency|constructors|contradiction|correctness|def|deffunc|define|definitions?|defpred|do|does|equals|end|environ|ex|exactly|existence|for|from|func|given|hence|hereby|holds|idempotence|identity|iff?|implies|involutiveness|irreflexivity|is|it|let|means|mode|non|not|notations?|now|of|or|otherwise|over|per|pred|prefix|projectivity|proof|provided|qua|reconsider|redefine|reduce|reducibility|reflexivity|registrations?|requirements|reserve|sch|schemes?|section|selector|set|sethood|st|struct|such|suppose|symmetry|synonym|take|that|the|then|theorems?|thesis|thus|to|transitivity|uniqueness|vocabular(?:y|ies)|when|where|with|wrt)\b/, + 'keyword': /@proof\b|\b(?:according|aggregate|all|and|antonym|are|as|associativity|assume|asymmetry|attr|be|begin|being|by|canceled|case|cases|clusters?|coherence|commutativity|compatibility|connectedness|consider|consistency|constructors|contradiction|correctness|def|deffunc|define|definitions?|defpred|do|does|end|environ|equals|ex|exactly|existence|for|from|func|given|hence|hereby|holds|idempotence|identity|iff?|implies|involutiveness|irreflexivity|is|it|let|means|mode|non|not|notations?|now|of|or|otherwise|over|per|pred|prefix|projectivity|proof|provided|qua|reconsider|redefine|reduce|reducibility|reflexivity|registrations?|requirements|reserve|sch|schemes?|section|selector|set|sethood|st|struct|such|suppose|symmetry|synonym|take|that|the|then|theorems?|thesis|thus|to|transitivity|uniqueness|vocabular(?:ies|y)|when|where|with|wrt)\b/, 'parameter': { pattern: /\$(?:10|\d)/, alias: 'variable' diff --git a/components/prism-mizar.min.js b/components/prism-mizar.min.js index 02ce1f0c04..dd38293b61 100644 --- a/components/prism-mizar.min.js +++ b/components/prism-mizar.min.js @@ -1 +1 @@ -Prism.languages.mizar={comment:/::.+/,keyword:/@proof\b|\b(?:according|aggregate|all|and|antonym|are|as|associativity|assume|asymmetry|attr|be|begin|being|by|canceled|case|cases|clusters?|coherence|commutativity|compatibility|connectedness|consider|consistency|constructors|contradiction|correctness|def|deffunc|define|definitions?|defpred|do|does|equals|end|environ|ex|exactly|existence|for|from|func|given|hence|hereby|holds|idempotence|identity|iff?|implies|involutiveness|irreflexivity|is|it|let|means|mode|non|not|notations?|now|of|or|otherwise|over|per|pred|prefix|projectivity|proof|provided|qua|reconsider|redefine|reduce|reducibility|reflexivity|registrations?|requirements|reserve|sch|schemes?|section|selector|set|sethood|st|struct|such|suppose|symmetry|synonym|take|that|the|then|theorems?|thesis|thus|to|transitivity|uniqueness|vocabular(?:y|ies)|when|where|with|wrt)\b/,parameter:{pattern:/\$(?:10|\d)/,alias:"variable"},variable:/\b\w+(?=:)/,number:/(?:\b|-)\d+\b/,operator:/\.\.\.|->|&|\.?=/,punctuation:/\(#|#\)|[,:;\[\](){}]/}; \ No newline at end of file +Prism.languages.mizar={comment:/::.+/,keyword:/@proof\b|\b(?:according|aggregate|all|and|antonym|are|as|associativity|assume|asymmetry|attr|be|begin|being|by|canceled|case|cases|clusters?|coherence|commutativity|compatibility|connectedness|consider|consistency|constructors|contradiction|correctness|def|deffunc|define|definitions?|defpred|do|does|end|environ|equals|ex|exactly|existence|for|from|func|given|hence|hereby|holds|idempotence|identity|iff?|implies|involutiveness|irreflexivity|is|it|let|means|mode|non|not|notations?|now|of|or|otherwise|over|per|pred|prefix|projectivity|proof|provided|qua|reconsider|redefine|reduce|reducibility|reflexivity|registrations?|requirements|reserve|sch|schemes?|section|selector|set|sethood|st|struct|such|suppose|symmetry|synonym|take|that|the|then|theorems?|thesis|thus|to|transitivity|uniqueness|vocabular(?:ies|y)|when|where|with|wrt)\b/,parameter:{pattern:/\$(?:10|\d)/,alias:"variable"},variable:/\b\w+(?=:)/,number:/(?:\b|-)\d+\b/,operator:/\.\.\.|->|&|\.?=/,punctuation:/\(#|#\)|[,:;\[\](){}]/}; \ No newline at end of file diff --git a/components/prism-mongodb.js b/components/prism-mongodb.js index 14bb9f8681..3e9d901749 100644 --- a/components/prism-mongodb.js +++ b/components/prism-mongodb.js @@ -81,7 +81,7 @@ }, entity: { // ipv4 - pattern: /\b(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\b/, + pattern: /\b(?:(?:[01]?[0-9][0-9]?|2[0-4][0-9]|25[0-5])\.){3}(?:[01]?[0-9][0-9]?|2[0-4][0-9]|25[0-5])\b/, greedy: true } }; diff --git a/components/prism-mongodb.min.js b/components/prism-mongodb.min.js index 7859c857cd..daa35040c2 100644 --- a/components/prism-mongodb.min.js +++ b/components/prism-mongodb.min.js @@ -1 +1 @@ -!function($){var e=["$eq","$gt","$gte","$in","$lt","$lte","$ne","$nin","$and","$not","$nor","$or","$exists","$type","$expr","$jsonSchema","$mod","$regex","$text","$where","$geoIntersects","$geoWithin","$near","$nearSphere","$all","$elemMatch","$size","$bitsAllClear","$bitsAllSet","$bitsAnyClear","$bitsAnySet","$comment","$elemMatch","$meta","$slice","$currentDate","$inc","$min","$max","$mul","$rename","$set","$setOnInsert","$unset","$addToSet","$pop","$pull","$push","$pullAll","$each","$position","$slice","$sort","$bit","$addFields","$bucket","$bucketAuto","$collStats","$count","$currentOp","$facet","$geoNear","$graphLookup","$group","$indexStats","$limit","$listLocalSessions","$listSessions","$lookup","$match","$merge","$out","$planCacheStats","$project","$redact","$replaceRoot","$replaceWith","$sample","$set","$skip","$sort","$sortByCount","$unionWith","$unset","$unwind","$abs","$accumulator","$acos","$acosh","$add","$addToSet","$allElementsTrue","$and","$anyElementTrue","$arrayElemAt","$arrayToObject","$asin","$asinh","$atan","$atan2","$atanh","$avg","$binarySize","$bsonSize","$ceil","$cmp","$concat","$concatArrays","$cond","$convert","$cos","$dateFromParts","$dateToParts","$dateFromString","$dateToString","$dayOfMonth","$dayOfWeek","$dayOfYear","$degreesToRadians","$divide","$eq","$exp","$filter","$first","$floor","$function","$gt","$gte","$hour","$ifNull","$in","$indexOfArray","$indexOfBytes","$indexOfCP","$isArray","$isNumber","$isoDayOfWeek","$isoWeek","$isoWeekYear","$last","$last","$let","$literal","$ln","$log","$log10","$lt","$lte","$ltrim","$map","$max","$mergeObjects","$meta","$min","$millisecond","$minute","$mod","$month","$multiply","$ne","$not","$objectToArray","$or","$pow","$push","$radiansToDegrees","$range","$reduce","$regexFind","$regexFindAll","$regexMatch","$replaceOne","$replaceAll","$reverseArray","$round","$rtrim","$second","$setDifference","$setEquals","$setIntersection","$setIsSubset","$setUnion","$size","$sin","$slice","$split","$sqrt","$stdDevPop","$stdDevSamp","$strcasecmp","$strLenBytes","$strLenCP","$substr","$substrBytes","$substrCP","$subtract","$sum","$switch","$tan","$toBool","$toDate","$toDecimal","$toDouble","$toInt","$toLong","$toObjectId","$toString","$toLower","$toUpper","$trim","$trunc","$type","$week","$year","$zip","$comment","$explain","$hint","$max","$maxTimeMS","$min","$orderby","$query","$returnKey","$showDiskLoc","$natural"],t="(?:"+(e=e.map(function($){return $.replace("$","\\$")})).join("|")+")\\b";$.languages.mongodb=$.languages.extend("javascript",{}),$.languages.insertBefore("mongodb","string",{property:{pattern:/(?:(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)(?=\s*:)/,greedy:!0,inside:{keyword:RegExp("^(['\"])?"+t+"(?:\\1)?$")}}}),$.languages.mongodb.string.inside={url:{pattern:/https?:\/\/[-\w@:%.+~#=]{1,256}\.[a-z0-9()]{1,6}\b[-\w()@:%+.~#?&/=]*/i,greedy:!0},entity:{pattern:/\b(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\b/,greedy:!0}},$.languages.insertBefore("mongodb","constant",{builtin:{pattern:RegExp("\\b(?:"+["ObjectId","Code","BinData","DBRef","Timestamp","NumberLong","NumberDecimal","MaxKey","MinKey","RegExp","ISODate","UUID"].join("|")+")\\b"),alias:"keyword"}})}(Prism); \ No newline at end of file +!function($){var e=["$eq","$gt","$gte","$in","$lt","$lte","$ne","$nin","$and","$not","$nor","$or","$exists","$type","$expr","$jsonSchema","$mod","$regex","$text","$where","$geoIntersects","$geoWithin","$near","$nearSphere","$all","$elemMatch","$size","$bitsAllClear","$bitsAllSet","$bitsAnyClear","$bitsAnySet","$comment","$elemMatch","$meta","$slice","$currentDate","$inc","$min","$max","$mul","$rename","$set","$setOnInsert","$unset","$addToSet","$pop","$pull","$push","$pullAll","$each","$position","$slice","$sort","$bit","$addFields","$bucket","$bucketAuto","$collStats","$count","$currentOp","$facet","$geoNear","$graphLookup","$group","$indexStats","$limit","$listLocalSessions","$listSessions","$lookup","$match","$merge","$out","$planCacheStats","$project","$redact","$replaceRoot","$replaceWith","$sample","$set","$skip","$sort","$sortByCount","$unionWith","$unset","$unwind","$abs","$accumulator","$acos","$acosh","$add","$addToSet","$allElementsTrue","$and","$anyElementTrue","$arrayElemAt","$arrayToObject","$asin","$asinh","$atan","$atan2","$atanh","$avg","$binarySize","$bsonSize","$ceil","$cmp","$concat","$concatArrays","$cond","$convert","$cos","$dateFromParts","$dateToParts","$dateFromString","$dateToString","$dayOfMonth","$dayOfWeek","$dayOfYear","$degreesToRadians","$divide","$eq","$exp","$filter","$first","$floor","$function","$gt","$gte","$hour","$ifNull","$in","$indexOfArray","$indexOfBytes","$indexOfCP","$isArray","$isNumber","$isoDayOfWeek","$isoWeek","$isoWeekYear","$last","$last","$let","$literal","$ln","$log","$log10","$lt","$lte","$ltrim","$map","$max","$mergeObjects","$meta","$min","$millisecond","$minute","$mod","$month","$multiply","$ne","$not","$objectToArray","$or","$pow","$push","$radiansToDegrees","$range","$reduce","$regexFind","$regexFindAll","$regexMatch","$replaceOne","$replaceAll","$reverseArray","$round","$rtrim","$second","$setDifference","$setEquals","$setIntersection","$setIsSubset","$setUnion","$size","$sin","$slice","$split","$sqrt","$stdDevPop","$stdDevSamp","$strcasecmp","$strLenBytes","$strLenCP","$substr","$substrBytes","$substrCP","$subtract","$sum","$switch","$tan","$toBool","$toDate","$toDecimal","$toDouble","$toInt","$toLong","$toObjectId","$toString","$toLower","$toUpper","$trim","$trunc","$type","$week","$year","$zip","$comment","$explain","$hint","$max","$maxTimeMS","$min","$orderby","$query","$returnKey","$showDiskLoc","$natural"],t="(?:"+(e=e.map(function($){return $.replace("$","\\$")})).join("|")+")\\b";$.languages.mongodb=$.languages.extend("javascript",{}),$.languages.insertBefore("mongodb","string",{property:{pattern:/(?:(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)(?=\s*:)/,greedy:!0,inside:{keyword:RegExp("^(['\"])?"+t+"(?:\\1)?$")}}}),$.languages.mongodb.string.inside={url:{pattern:/https?:\/\/[-\w@:%.+~#=]{1,256}\.[a-z0-9()]{1,6}\b[-\w()@:%+.~#?&/=]*/i,greedy:!0},entity:{pattern:/\b(?:(?:[01]?[0-9][0-9]?|2[0-4][0-9]|25[0-5])\.){3}(?:[01]?[0-9][0-9]?|2[0-4][0-9]|25[0-5])\b/,greedy:!0}},$.languages.insertBefore("mongodb","constant",{builtin:{pattern:RegExp("\\b(?:"+["ObjectId","Code","BinData","DBRef","Timestamp","NumberLong","NumberDecimal","MaxKey","MinKey","RegExp","ISODate","UUID"].join("|")+")\\b"),alias:"keyword"}})}(Prism); \ No newline at end of file diff --git a/components/prism-monkey.js b/components/prism-monkey.js index 97d5bb210f..88f9b0b8ce 100644 --- a/components/prism-monkey.js +++ b/components/prism-monkey.js @@ -25,7 +25,7 @@ Prism.languages.monkey = { pattern: /((?:\.\.)?)(?:(?:\b|\B-\.?|\B\.)\d+(?:(?!\.\.)\.\d*)?|\$[\da-f]+)/i, lookbehind: true }, - 'keyword': /\b(?:Void|Strict|Public|Private|Property|Bool|Int|Float|String|Array|Object|Continue|Exit|Import|Extern|New|Self|Super|Try|Catch|Eachin|True|False|Extends|Abstract|Final|Select|Case|Default|Const|Local|Global|Field|Method|Function|Class|End|If|Then|Else|ElseIf|EndIf|While|Wend|Repeat|Until|Forever|For|To|Step|Next|Return|Module|Interface|Implements|Inline|Throw|Null)\b/i, + 'keyword': /\b(?:Abstract|Array|Bool|Case|Catch|Class|Const|Continue|Default|Eachin|Else|ElseIf|End|EndIf|Exit|Extends|Extern|False|Field|Final|Float|For|Forever|Function|Global|If|Implements|Import|Inline|Int|Interface|Local|Method|Module|New|Next|Null|Object|Private|Property|Public|Repeat|Return|Select|Self|Step|Strict|String|Super|Then|Throw|To|True|Try|Until|Void|Wend|While)\b/i, 'operator': /\.\.|<[=>]?|>=?|:?=|(?:[+\-*\/&~|]|\b(?:Mod|Shl|Shr)\b)=?|\b(?:And|Not|Or)\b/i, 'punctuation': /[.,:;()\[\]]/ }; diff --git a/components/prism-monkey.min.js b/components/prism-monkey.min.js index b4fbb85cf0..00ab56dbba 100644 --- a/components/prism-monkey.min.js +++ b/components/prism-monkey.min.js @@ -1 +1 @@ -Prism.languages.monkey={string:/"[^"\r\n]*"/,comment:[{pattern:/^#Rem\s[\s\S]*?^#End/im,greedy:!0},{pattern:/'.+/,greedy:!0}],preprocessor:{pattern:/(^[ \t]*)#.+/m,lookbehind:!0,alias:"comment"},function:/\b\w+(?=\()/,"type-char":{pattern:/(\w)[?%#$]/,lookbehind:!0,alias:"variable"},number:{pattern:/((?:\.\.)?)(?:(?:\b|\B-\.?|\B\.)\d+(?:(?!\.\.)\.\d*)?|\$[\da-f]+)/i,lookbehind:!0},keyword:/\b(?:Void|Strict|Public|Private|Property|Bool|Int|Float|String|Array|Object|Continue|Exit|Import|Extern|New|Self|Super|Try|Catch|Eachin|True|False|Extends|Abstract|Final|Select|Case|Default|Const|Local|Global|Field|Method|Function|Class|End|If|Then|Else|ElseIf|EndIf|While|Wend|Repeat|Until|Forever|For|To|Step|Next|Return|Module|Interface|Implements|Inline|Throw|Null)\b/i,operator:/\.\.|<[=>]?|>=?|:?=|(?:[+\-*\/&~|]|\b(?:Mod|Shl|Shr)\b)=?|\b(?:And|Not|Or)\b/i,punctuation:/[.,:;()\[\]]/}; \ No newline at end of file +Prism.languages.monkey={string:/"[^"\r\n]*"/,comment:[{pattern:/^#Rem\s[\s\S]*?^#End/im,greedy:!0},{pattern:/'.+/,greedy:!0}],preprocessor:{pattern:/(^[ \t]*)#.+/m,lookbehind:!0,alias:"comment"},function:/\b\w+(?=\()/,"type-char":{pattern:/(\w)[?%#$]/,lookbehind:!0,alias:"variable"},number:{pattern:/((?:\.\.)?)(?:(?:\b|\B-\.?|\B\.)\d+(?:(?!\.\.)\.\d*)?|\$[\da-f]+)/i,lookbehind:!0},keyword:/\b(?:Abstract|Array|Bool|Case|Catch|Class|Const|Continue|Default|Eachin|Else|ElseIf|End|EndIf|Exit|Extends|Extern|False|Field|Final|Float|For|Forever|Function|Global|If|Implements|Import|Inline|Int|Interface|Local|Method|Module|New|Next|Null|Object|Private|Property|Public|Repeat|Return|Select|Self|Step|Strict|String|Super|Then|Throw|To|True|Try|Until|Void|Wend|While)\b/i,operator:/\.\.|<[=>]?|>=?|:?=|(?:[+\-*\/&~|]|\b(?:Mod|Shl|Shr)\b)=?|\b(?:And|Not|Or)\b/i,punctuation:/[.,:;()\[\]]/}; \ No newline at end of file diff --git a/components/prism-moonscript.js b/components/prism-moonscript.js index 22d6b98036..ee10233134 100644 --- a/components/prism-moonscript.js +++ b/components/prism-moonscript.js @@ -41,7 +41,7 @@ Prism.languages.moonscript = { lookbehind: true }, 'function': { - pattern: /\b(?:_G|_VERSION|assert|collectgarbage|coroutine\.(?:running|create|resume|status|wrap|yield)|debug\.(?:debug|gethook|getinfo|getlocal|getupvalue|setlocal|setupvalue|sethook|traceback|getfenv|getmetatable|getregistry|setfenv|setmetatable)|dofile|error|getfenv|getmetatable|io\.(?:stdin|stdout|stderr|close|flush|input|lines|open|output|popen|read|tmpfile|type|write)|ipairs|load|loadfile|loadstring|math\.(?:abs|acos|asin|atan|atan2|ceil|sin|cos|tan|deg|exp|floor|log|log10|max|min|fmod|modf|cosh|sinh|tanh|pow|rad|sqrt|frexp|ldexp|random|randomseed|pi)|module|next|os\.(?:clock|date|difftime|execute|exit|getenv|remove|rename|setlocale|time|tmpname)|package\.(?:cpath|loaded|loadlib|path|preload|seeall)|pairs|pcall|print|rawequal|rawget|rawset|require|select|setfenv|setmetatable|string\.(?:byte|char|dump|find|len|lower|rep|sub|upper|format|gsub|gmatch|match|reverse)|table\.(?:maxn|concat|sort|insert|remove)|tonumber|tostring|type|unpack|xpcall)\b/, + pattern: /\b(?:_G|_VERSION|assert|collectgarbage|coroutine\.(?:create|resume|running|status|wrap|yield)|debug\.(?:debug|getfenv|gethook|getinfo|getlocal|getmetatable|getregistry|getupvalue|setfenv|sethook|setlocal|setmetatable|setupvalue|traceback)|dofile|error|getfenv|getmetatable|io\.(?:close|flush|input|lines|open|output|popen|read|stderr|stdin|stdout|tmpfile|type|write)|ipairs|load|loadfile|loadstring|math\.(?:abs|acos|asin|atan|atan2|ceil|cos|cosh|deg|exp|floor|fmod|frexp|ldexp|log|log10|max|min|modf|pi|pow|rad|random|randomseed|sin|sinh|sqrt|tan|tanh)|module|next|os\.(?:clock|date|difftime|execute|exit|getenv|remove|rename|setlocale|time|tmpname)|package\.(?:cpath|loaded|loadlib|path|preload|seeall)|pairs|pcall|print|rawequal|rawget|rawset|require|select|setfenv|setmetatable|string\.(?:byte|char|dump|find|format|gmatch|gsub|len|lower|match|rep|reverse|sub|upper)|table\.(?:concat|insert|maxn|remove|sort)|tonumber|tostring|type|unpack|xpcall)\b/, inside: { 'punctuation': /\./ } diff --git a/components/prism-moonscript.min.js b/components/prism-moonscript.min.js index 69823428be..bf3f99c5e2 100644 --- a/components/prism-moonscript.min.js +++ b/components/prism-moonscript.min.js @@ -1 +1 @@ -Prism.languages.moonscript={comment:/--.*/,string:[{pattern:/'[^']*'|\[(=*)\[[\s\S]*?\]\1\]/,greedy:!0},{pattern:/"[^"]*"/,greedy:!0,inside:{interpolation:{pattern:/#\{[^{}]*\}/,inside:{moonscript:{pattern:/(^#\{)[\s\S]+(?=\})/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/#\{|\}/,alias:"punctuation"}}}}}],"class-name":[{pattern:/(\b(?:class|extends)[ \t]+)\w+/,lookbehind:!0},/\b[A-Z]\w*/],keyword:/\b(?:class|continue|do|else|elseif|export|extends|for|from|if|import|in|local|nil|return|self|super|switch|then|unless|using|when|while|with)\b/,variable:/@@?\w*/,property:{pattern:/\b(?!\d)\w+(?=:)|(:)(?!\d)\w+/,lookbehind:!0},function:{pattern:/\b(?:_G|_VERSION|assert|collectgarbage|coroutine\.(?:running|create|resume|status|wrap|yield)|debug\.(?:debug|gethook|getinfo|getlocal|getupvalue|setlocal|setupvalue|sethook|traceback|getfenv|getmetatable|getregistry|setfenv|setmetatable)|dofile|error|getfenv|getmetatable|io\.(?:stdin|stdout|stderr|close|flush|input|lines|open|output|popen|read|tmpfile|type|write)|ipairs|load|loadfile|loadstring|math\.(?:abs|acos|asin|atan|atan2|ceil|sin|cos|tan|deg|exp|floor|log|log10|max|min|fmod|modf|cosh|sinh|tanh|pow|rad|sqrt|frexp|ldexp|random|randomseed|pi)|module|next|os\.(?:clock|date|difftime|execute|exit|getenv|remove|rename|setlocale|time|tmpname)|package\.(?:cpath|loaded|loadlib|path|preload|seeall)|pairs|pcall|print|rawequal|rawget|rawset|require|select|setfenv|setmetatable|string\.(?:byte|char|dump|find|len|lower|rep|sub|upper|format|gsub|gmatch|match|reverse)|table\.(?:maxn|concat|sort|insert|remove)|tonumber|tostring|type|unpack|xpcall)\b/,inside:{punctuation:/\./}},boolean:/\b(?:false|true)\b/,number:/(?:\B\.\d+|\b\d+\.\d+|\b\d+(?=[eE]))(?:[eE][-+]?\d+)?\b|\b(?:0x[a-fA-F\d]+|\d+)(?:U?LL)?\b/,operator:/\.{3}|[-=]>|~=|(?:[-+*/%<>!=]|\.\.)=?|[:#^]|\b(?:and|or)\b=?|\b(?:not)\b/,punctuation:/[.,()[\]{}\\]/},Prism.languages.moonscript.string[1].inside.interpolation.inside.moonscript.inside=Prism.languages.moonscript,Prism.languages.moon=Prism.languages.moonscript; \ No newline at end of file +Prism.languages.moonscript={comment:/--.*/,string:[{pattern:/'[^']*'|\[(=*)\[[\s\S]*?\]\1\]/,greedy:!0},{pattern:/"[^"]*"/,greedy:!0,inside:{interpolation:{pattern:/#\{[^{}]*\}/,inside:{moonscript:{pattern:/(^#\{)[\s\S]+(?=\})/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/#\{|\}/,alias:"punctuation"}}}}}],"class-name":[{pattern:/(\b(?:class|extends)[ \t]+)\w+/,lookbehind:!0},/\b[A-Z]\w*/],keyword:/\b(?:class|continue|do|else|elseif|export|extends|for|from|if|import|in|local|nil|return|self|super|switch|then|unless|using|when|while|with)\b/,variable:/@@?\w*/,property:{pattern:/\b(?!\d)\w+(?=:)|(:)(?!\d)\w+/,lookbehind:!0},function:{pattern:/\b(?:_G|_VERSION|assert|collectgarbage|coroutine\.(?:create|resume|running|status|wrap|yield)|debug\.(?:debug|getfenv|gethook|getinfo|getlocal|getmetatable|getregistry|getupvalue|setfenv|sethook|setlocal|setmetatable|setupvalue|traceback)|dofile|error|getfenv|getmetatable|io\.(?:close|flush|input|lines|open|output|popen|read|stderr|stdin|stdout|tmpfile|type|write)|ipairs|load|loadfile|loadstring|math\.(?:abs|acos|asin|atan|atan2|ceil|cos|cosh|deg|exp|floor|fmod|frexp|ldexp|log|log10|max|min|modf|pi|pow|rad|random|randomseed|sin|sinh|sqrt|tan|tanh)|module|next|os\.(?:clock|date|difftime|execute|exit|getenv|remove|rename|setlocale|time|tmpname)|package\.(?:cpath|loaded|loadlib|path|preload|seeall)|pairs|pcall|print|rawequal|rawget|rawset|require|select|setfenv|setmetatable|string\.(?:byte|char|dump|find|format|gmatch|gsub|len|lower|match|rep|reverse|sub|upper)|table\.(?:concat|insert|maxn|remove|sort)|tonumber|tostring|type|unpack|xpcall)\b/,inside:{punctuation:/\./}},boolean:/\b(?:false|true)\b/,number:/(?:\B\.\d+|\b\d+\.\d+|\b\d+(?=[eE]))(?:[eE][-+]?\d+)?\b|\b(?:0x[a-fA-F\d]+|\d+)(?:U?LL)?\b/,operator:/\.{3}|[-=]>|~=|(?:[-+*/%<>!=]|\.\.)=?|[:#^]|\b(?:and|or)\b=?|\b(?:not)\b/,punctuation:/[.,()[\]{}\\]/},Prism.languages.moonscript.string[1].inside.interpolation.inside.moonscript.inside=Prism.languages.moonscript,Prism.languages.moon=Prism.languages.moonscript; \ No newline at end of file diff --git a/components/prism-n1ql.js b/components/prism-n1ql.js index 724b20926c..4cc745d6a9 100644 --- a/components/prism-n1ql.js +++ b/components/prism-n1ql.js @@ -9,9 +9,9 @@ Prism.languages.n1ql = { pattern: /`(?:\\[\s\S]|[^\\`]|``)*`/, greedy: true, }, - 'function': /\b(?:ABS|ACOS|ARRAY_AGG|ARRAY_APPEND|ARRAY_AVG|ARRAY_CONCAT|ARRAY_CONTAINS|ARRAY_COUNT|ARRAY_DISTINCT|ARRAY_FLATTEN|ARRAY_IFNULL|ARRAY_INSERT|ARRAY_INTERSECT|ARRAY_LENGTH|ARRAY_MAX|ARRAY_MIN|ARRAY_POSITION|ARRAY_PREPEND|ARRAY_PUT|ARRAY_RANGE|ARRAY_REMOVE|ARRAY_REPEAT|ARRAY_REPLACE|ARRAY_REVERSE|ARRAY_SORT|ARRAY_STAR|ARRAY_SUM|ARRAY_SYMDIFF|ARRAY_SYMDIFFN|ARRAY_UNION|ASIN|ATAN|ATAN2|AVG|BASE64|BASE64_DECODE|BASE64_ENCODE|BITAND|BITCLEAR|BITNOT|BITOR|BITSET|BITSHIFT|BITTEST|BITXOR|CEIL|CLOCK_LOCAL|CLOCK_MILLIS|CLOCK_STR|CLOCK_TZ|CLOCK_UTC|CONTAINS|CONTAINS_TOKEN|CONTAINS_TOKEN_LIKE|CONTAINS_TOKEN_REGEXP|COS|COUNT|CURL|DATE_ADD_MILLIS|DATE_ADD_STR|DATE_DIFF_MILLIS|DATE_DIFF_STR|DATE_FORMAT_STR|DATE_PART_MILLIS|DATE_PART_STR|DATE_RANGE_MILLIS|DATE_RANGE_STR|DATE_TRUNC_MILLIS|DATE_TRUNC_STR|DECODE_JSON|DEGREES|DURATION_TO_STR|E|ENCODED_SIZE|ENCODE_JSON|EXP|FLOOR|GREATEST|HAS_TOKEN|IFINF|IFMISSING|IFMISSINGORNULL|IFNAN|IFNANORINF|IFNULL|INITCAP|ISARRAY|ISATOM|ISBOOLEAN|ISNUMBER|ISOBJECT|ISSTRING|IsBitSET|LEAST|LENGTH|LN|LOG|LOWER|LTRIM|MAX|META|MILLIS|MILLIS_TO_LOCAL|MILLIS_TO_STR|MILLIS_TO_TZ|MILLIS_TO_UTC|MILLIS_TO_ZONE_NAME|MIN|MISSINGIF|NANIF|NEGINFIF|NOW_LOCAL|NOW_MILLIS|NOW_STR|NOW_TZ|NOW_UTC|NULLIF|OBJECT_ADD|OBJECT_CONCAT|OBJECT_INNER_PAIRS|OBJECT_INNER_VALUES|OBJECT_LENGTH|OBJECT_NAMES|OBJECT_PAIRS|OBJECT_PUT|OBJECT_REMOVE|OBJECT_RENAME|OBJECT_REPLACE|OBJECT_UNWRAP|OBJECT_VALUES|PAIRS|PI|POLY_LENGTH|POSINFIF|POSITION|POWER|RADIANS|RANDOM|REGEXP_CONTAINS|REGEXP_LIKE|REGEXP_POSITION|REGEXP_REPLACE|REPEAT|REPLACE|REVERSE|ROUND|RTRIM|SIGN|SIN|SPLIT|SQRT|STR_TO_DURATION|STR_TO_MILLIS|STR_TO_TZ|STR_TO_UTC|STR_TO_ZONE_NAME|SUBSTR|SUFFIXES|SUM|TAN|TITLE|TOARRAY|TOATOM|TOBOOLEAN|TOKENS|TONUMBER|TOOBJECT|TOSTRING|TRIM|TRUNC|TYPE|UPPER|WEEKDAY_MILLIS|WEEKDAY_STR)(?=\s*\()/i, + 'function': /\b(?:ABS|ACOS|ARRAY_AGG|ARRAY_APPEND|ARRAY_AVG|ARRAY_CONCAT|ARRAY_CONTAINS|ARRAY_COUNT|ARRAY_DISTINCT|ARRAY_FLATTEN|ARRAY_IFNULL|ARRAY_INSERT|ARRAY_INTERSECT|ARRAY_LENGTH|ARRAY_MAX|ARRAY_MIN|ARRAY_POSITION|ARRAY_PREPEND|ARRAY_PUT|ARRAY_RANGE|ARRAY_REMOVE|ARRAY_REPEAT|ARRAY_REPLACE|ARRAY_REVERSE|ARRAY_SORT|ARRAY_STAR|ARRAY_SUM|ARRAY_SYMDIFF|ARRAY_SYMDIFFN|ARRAY_UNION|ASIN|ATAN|ATAN2|AVG|BASE64|BASE64_DECODE|BASE64_ENCODE|BITAND|BITCLEAR|BITNOT|BITOR|BITSET|BITSHIFT|BITTEST|BITXOR|CEIL|CLOCK_LOCAL|CLOCK_MILLIS|CLOCK_STR|CLOCK_TZ|CLOCK_UTC|CONTAINS|CONTAINS_TOKEN|CONTAINS_TOKEN_LIKE|CONTAINS_TOKEN_REGEXP|COS|COUNT|CURL|DATE_ADD_MILLIS|DATE_ADD_STR|DATE_DIFF_MILLIS|DATE_DIFF_STR|DATE_FORMAT_STR|DATE_PART_MILLIS|DATE_PART_STR|DATE_RANGE_MILLIS|DATE_RANGE_STR|DATE_TRUNC_MILLIS|DATE_TRUNC_STR|DECODE_JSON|DEGREES|DURATION_TO_STR|E|ENCODED_SIZE|ENCODE_JSON|EXP|FLOOR|GREATEST|HAS_TOKEN|IFINF|IFMISSING|IFMISSINGORNULL|IFNAN|IFNANORINF|IFNULL|INITCAP|ISARRAY|ISATOM|IsBitSET|ISBOOLEAN|ISNUMBER|ISOBJECT|ISSTRING|LEAST|LENGTH|LN|LOG|LOWER|LTRIM|MAX|META|MILLIS|MILLIS_TO_LOCAL|MILLIS_TO_STR|MILLIS_TO_TZ|MILLIS_TO_UTC|MILLIS_TO_ZONE_NAME|MIN|MISSINGIF|NANIF|NEGINFIF|NOW_LOCAL|NOW_MILLIS|NOW_STR|NOW_TZ|NOW_UTC|NULLIF|OBJECT_ADD|OBJECT_CONCAT|OBJECT_INNER_PAIRS|OBJECT_INNER_VALUES|OBJECT_LENGTH|OBJECT_NAMES|OBJECT_PAIRS|OBJECT_PUT|OBJECT_REMOVE|OBJECT_RENAME|OBJECT_REPLACE|OBJECT_UNWRAP|OBJECT_VALUES|PAIRS|PI|POLY_LENGTH|POSINFIF|POSITION|POWER|RADIANS|RANDOM|REGEXP_CONTAINS|REGEXP_LIKE|REGEXP_POSITION|REGEXP_REPLACE|REPEAT|REPLACE|REVERSE|ROUND|RTRIM|SIGN|SIN|SPLIT|SQRT|STR_TO_DURATION|STR_TO_MILLIS|STR_TO_TZ|STR_TO_UTC|STR_TO_ZONE_NAME|SUBSTR|SUFFIXES|SUM|TAN|TITLE|TOARRAY|TOATOM|TOBOOLEAN|TOKENS|TONUMBER|TOOBJECT|TOSTRING|TRIM|TRUNC|TYPE|UPPER|WEEKDAY_MILLIS|WEEKDAY_STR)(?=\s*\()/i, 'keyword': /\b(?:ALL|ALTER|ANALYZE|AS|ASC|BEGIN|BINARY|BOOLEAN|BREAK|BUCKET|BUILD|BY|CALL|CAST|CLUSTER|COLLATE|COLLECTION|COMMIT|CONNECT|CONTINUE|CORRELATE|COVER|CREATE|DATABASE|DATASET|DATASTORE|DECLARE|DECREMENT|DELETE|DERIVED|DESC|DESCRIBE|DISTINCT|DO|DROP|EACH|ELEMENT|EXCEPT|EXCLUDE|EXECUTE|EXPLAIN|FETCH|FLATTEN|FOR|FORCE|FROM|FUNCTION|GRANT|GROUP|GSI|HAVING|IF|IGNORE|ILIKE|INCLUDE|INCREMENT|INDEX|INFER|INLINE|INNER|INSERT|INTERSECT|INTO|IS|JOIN|KEY|KEYS|KEYSPACE|KNOWN|LAST|LEFT|LET|LETTING|LIMIT|LSM|MAP|MAPPING|MATCHED|MATERIALIZED|MERGE|MINUS|MISSING|NAMESPACE|NEST|NULL|NUMBER|OBJECT|OFFSET|ON|OPTION|ORDER|OUTER|OVER|PARSE|PARTITION|PASSWORD|PATH|POOL|PREPARE|PRIMARY|PRIVATE|PRIVILEGE|PROCEDURE|PUBLIC|RAW|REALM|REDUCE|RENAME|RETURN|RETURNING|REVOKE|RIGHT|ROLE|ROLLBACK|SATISFIES|SCHEMA|SELECT|SELF|SEMI|SET|SHOW|SOME|START|STATISTICS|STRING|SYSTEM|TO|TRANSACTION|TRIGGER|TRUNCATE|UNDER|UNION|UNIQUE|UNKNOWN|UNNEST|UNSET|UPDATE|UPSERT|USE|USER|USING|VALIDATE|VALUE|VALUES|VIA|VIEW|WHERE|WHILE|WITH|WORK|XOR)\b/i, - 'boolean': /\b(?:TRUE|FALSE)\b/i, + 'boolean': /\b(?:FALSE|TRUE)\b/i, 'number': /(?:\b\d+\.|\B\.)\d+e[+\-]?\d+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i, 'operator': /[-+*\/%]|!=|==?|\|\||<[>=]?|>=?|\b(?:AND|ANY|ARRAY|BETWEEN|CASE|ELSE|END|EVERY|EXISTS|FIRST|IN|LIKE|NOT|OR|THEN|VALUED|WHEN|WITHIN)\b/i, 'punctuation': /[;[\](),.{}:]/ diff --git a/components/prism-n1ql.min.js b/components/prism-n1ql.min.js index fb2280c2bc..e5e828daa1 100644 --- a/components/prism-n1ql.min.js +++ b/components/prism-n1ql.min.js @@ -1 +1 @@ -Prism.languages.n1ql={comment:/\/\*[\s\S]*?(?:$|\*\/)/,parameter:/\$[\w.]+/,string:{pattern:/(["'])(?:\\[\s\S]|(?!\1)[^\\]|\1\1)*\1/,greedy:!0},identifier:{pattern:/`(?:\\[\s\S]|[^\\`]|``)*`/,greedy:!0},function:/\b(?:ABS|ACOS|ARRAY_AGG|ARRAY_APPEND|ARRAY_AVG|ARRAY_CONCAT|ARRAY_CONTAINS|ARRAY_COUNT|ARRAY_DISTINCT|ARRAY_FLATTEN|ARRAY_IFNULL|ARRAY_INSERT|ARRAY_INTERSECT|ARRAY_LENGTH|ARRAY_MAX|ARRAY_MIN|ARRAY_POSITION|ARRAY_PREPEND|ARRAY_PUT|ARRAY_RANGE|ARRAY_REMOVE|ARRAY_REPEAT|ARRAY_REPLACE|ARRAY_REVERSE|ARRAY_SORT|ARRAY_STAR|ARRAY_SUM|ARRAY_SYMDIFF|ARRAY_SYMDIFFN|ARRAY_UNION|ASIN|ATAN|ATAN2|AVG|BASE64|BASE64_DECODE|BASE64_ENCODE|BITAND|BITCLEAR|BITNOT|BITOR|BITSET|BITSHIFT|BITTEST|BITXOR|CEIL|CLOCK_LOCAL|CLOCK_MILLIS|CLOCK_STR|CLOCK_TZ|CLOCK_UTC|CONTAINS|CONTAINS_TOKEN|CONTAINS_TOKEN_LIKE|CONTAINS_TOKEN_REGEXP|COS|COUNT|CURL|DATE_ADD_MILLIS|DATE_ADD_STR|DATE_DIFF_MILLIS|DATE_DIFF_STR|DATE_FORMAT_STR|DATE_PART_MILLIS|DATE_PART_STR|DATE_RANGE_MILLIS|DATE_RANGE_STR|DATE_TRUNC_MILLIS|DATE_TRUNC_STR|DECODE_JSON|DEGREES|DURATION_TO_STR|E|ENCODED_SIZE|ENCODE_JSON|EXP|FLOOR|GREATEST|HAS_TOKEN|IFINF|IFMISSING|IFMISSINGORNULL|IFNAN|IFNANORINF|IFNULL|INITCAP|ISARRAY|ISATOM|ISBOOLEAN|ISNUMBER|ISOBJECT|ISSTRING|IsBitSET|LEAST|LENGTH|LN|LOG|LOWER|LTRIM|MAX|META|MILLIS|MILLIS_TO_LOCAL|MILLIS_TO_STR|MILLIS_TO_TZ|MILLIS_TO_UTC|MILLIS_TO_ZONE_NAME|MIN|MISSINGIF|NANIF|NEGINFIF|NOW_LOCAL|NOW_MILLIS|NOW_STR|NOW_TZ|NOW_UTC|NULLIF|OBJECT_ADD|OBJECT_CONCAT|OBJECT_INNER_PAIRS|OBJECT_INNER_VALUES|OBJECT_LENGTH|OBJECT_NAMES|OBJECT_PAIRS|OBJECT_PUT|OBJECT_REMOVE|OBJECT_RENAME|OBJECT_REPLACE|OBJECT_UNWRAP|OBJECT_VALUES|PAIRS|PI|POLY_LENGTH|POSINFIF|POSITION|POWER|RADIANS|RANDOM|REGEXP_CONTAINS|REGEXP_LIKE|REGEXP_POSITION|REGEXP_REPLACE|REPEAT|REPLACE|REVERSE|ROUND|RTRIM|SIGN|SIN|SPLIT|SQRT|STR_TO_DURATION|STR_TO_MILLIS|STR_TO_TZ|STR_TO_UTC|STR_TO_ZONE_NAME|SUBSTR|SUFFIXES|SUM|TAN|TITLE|TOARRAY|TOATOM|TOBOOLEAN|TOKENS|TONUMBER|TOOBJECT|TOSTRING|TRIM|TRUNC|TYPE|UPPER|WEEKDAY_MILLIS|WEEKDAY_STR)(?=\s*\()/i,keyword:/\b(?:ALL|ALTER|ANALYZE|AS|ASC|BEGIN|BINARY|BOOLEAN|BREAK|BUCKET|BUILD|BY|CALL|CAST|CLUSTER|COLLATE|COLLECTION|COMMIT|CONNECT|CONTINUE|CORRELATE|COVER|CREATE|DATABASE|DATASET|DATASTORE|DECLARE|DECREMENT|DELETE|DERIVED|DESC|DESCRIBE|DISTINCT|DO|DROP|EACH|ELEMENT|EXCEPT|EXCLUDE|EXECUTE|EXPLAIN|FETCH|FLATTEN|FOR|FORCE|FROM|FUNCTION|GRANT|GROUP|GSI|HAVING|IF|IGNORE|ILIKE|INCLUDE|INCREMENT|INDEX|INFER|INLINE|INNER|INSERT|INTERSECT|INTO|IS|JOIN|KEY|KEYS|KEYSPACE|KNOWN|LAST|LEFT|LET|LETTING|LIMIT|LSM|MAP|MAPPING|MATCHED|MATERIALIZED|MERGE|MINUS|MISSING|NAMESPACE|NEST|NULL|NUMBER|OBJECT|OFFSET|ON|OPTION|ORDER|OUTER|OVER|PARSE|PARTITION|PASSWORD|PATH|POOL|PREPARE|PRIMARY|PRIVATE|PRIVILEGE|PROCEDURE|PUBLIC|RAW|REALM|REDUCE|RENAME|RETURN|RETURNING|REVOKE|RIGHT|ROLE|ROLLBACK|SATISFIES|SCHEMA|SELECT|SELF|SEMI|SET|SHOW|SOME|START|STATISTICS|STRING|SYSTEM|TO|TRANSACTION|TRIGGER|TRUNCATE|UNDER|UNION|UNIQUE|UNKNOWN|UNNEST|UNSET|UPDATE|UPSERT|USE|USER|USING|VALIDATE|VALUE|VALUES|VIA|VIEW|WHERE|WHILE|WITH|WORK|XOR)\b/i,boolean:/\b(?:TRUE|FALSE)\b/i,number:/(?:\b\d+\.|\B\.)\d+e[+\-]?\d+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/%]|!=|==?|\|\||<[>=]?|>=?|\b(?:AND|ANY|ARRAY|BETWEEN|CASE|ELSE|END|EVERY|EXISTS|FIRST|IN|LIKE|NOT|OR|THEN|VALUED|WHEN|WITHIN)\b/i,punctuation:/[;[\](),.{}:]/}; \ No newline at end of file +Prism.languages.n1ql={comment:/\/\*[\s\S]*?(?:$|\*\/)/,parameter:/\$[\w.]+/,string:{pattern:/(["'])(?:\\[\s\S]|(?!\1)[^\\]|\1\1)*\1/,greedy:!0},identifier:{pattern:/`(?:\\[\s\S]|[^\\`]|``)*`/,greedy:!0},function:/\b(?:ABS|ACOS|ARRAY_AGG|ARRAY_APPEND|ARRAY_AVG|ARRAY_CONCAT|ARRAY_CONTAINS|ARRAY_COUNT|ARRAY_DISTINCT|ARRAY_FLATTEN|ARRAY_IFNULL|ARRAY_INSERT|ARRAY_INTERSECT|ARRAY_LENGTH|ARRAY_MAX|ARRAY_MIN|ARRAY_POSITION|ARRAY_PREPEND|ARRAY_PUT|ARRAY_RANGE|ARRAY_REMOVE|ARRAY_REPEAT|ARRAY_REPLACE|ARRAY_REVERSE|ARRAY_SORT|ARRAY_STAR|ARRAY_SUM|ARRAY_SYMDIFF|ARRAY_SYMDIFFN|ARRAY_UNION|ASIN|ATAN|ATAN2|AVG|BASE64|BASE64_DECODE|BASE64_ENCODE|BITAND|BITCLEAR|BITNOT|BITOR|BITSET|BITSHIFT|BITTEST|BITXOR|CEIL|CLOCK_LOCAL|CLOCK_MILLIS|CLOCK_STR|CLOCK_TZ|CLOCK_UTC|CONTAINS|CONTAINS_TOKEN|CONTAINS_TOKEN_LIKE|CONTAINS_TOKEN_REGEXP|COS|COUNT|CURL|DATE_ADD_MILLIS|DATE_ADD_STR|DATE_DIFF_MILLIS|DATE_DIFF_STR|DATE_FORMAT_STR|DATE_PART_MILLIS|DATE_PART_STR|DATE_RANGE_MILLIS|DATE_RANGE_STR|DATE_TRUNC_MILLIS|DATE_TRUNC_STR|DECODE_JSON|DEGREES|DURATION_TO_STR|E|ENCODED_SIZE|ENCODE_JSON|EXP|FLOOR|GREATEST|HAS_TOKEN|IFINF|IFMISSING|IFMISSINGORNULL|IFNAN|IFNANORINF|IFNULL|INITCAP|ISARRAY|ISATOM|IsBitSET|ISBOOLEAN|ISNUMBER|ISOBJECT|ISSTRING|LEAST|LENGTH|LN|LOG|LOWER|LTRIM|MAX|META|MILLIS|MILLIS_TO_LOCAL|MILLIS_TO_STR|MILLIS_TO_TZ|MILLIS_TO_UTC|MILLIS_TO_ZONE_NAME|MIN|MISSINGIF|NANIF|NEGINFIF|NOW_LOCAL|NOW_MILLIS|NOW_STR|NOW_TZ|NOW_UTC|NULLIF|OBJECT_ADD|OBJECT_CONCAT|OBJECT_INNER_PAIRS|OBJECT_INNER_VALUES|OBJECT_LENGTH|OBJECT_NAMES|OBJECT_PAIRS|OBJECT_PUT|OBJECT_REMOVE|OBJECT_RENAME|OBJECT_REPLACE|OBJECT_UNWRAP|OBJECT_VALUES|PAIRS|PI|POLY_LENGTH|POSINFIF|POSITION|POWER|RADIANS|RANDOM|REGEXP_CONTAINS|REGEXP_LIKE|REGEXP_POSITION|REGEXP_REPLACE|REPEAT|REPLACE|REVERSE|ROUND|RTRIM|SIGN|SIN|SPLIT|SQRT|STR_TO_DURATION|STR_TO_MILLIS|STR_TO_TZ|STR_TO_UTC|STR_TO_ZONE_NAME|SUBSTR|SUFFIXES|SUM|TAN|TITLE|TOARRAY|TOATOM|TOBOOLEAN|TOKENS|TONUMBER|TOOBJECT|TOSTRING|TRIM|TRUNC|TYPE|UPPER|WEEKDAY_MILLIS|WEEKDAY_STR)(?=\s*\()/i,keyword:/\b(?:ALL|ALTER|ANALYZE|AS|ASC|BEGIN|BINARY|BOOLEAN|BREAK|BUCKET|BUILD|BY|CALL|CAST|CLUSTER|COLLATE|COLLECTION|COMMIT|CONNECT|CONTINUE|CORRELATE|COVER|CREATE|DATABASE|DATASET|DATASTORE|DECLARE|DECREMENT|DELETE|DERIVED|DESC|DESCRIBE|DISTINCT|DO|DROP|EACH|ELEMENT|EXCEPT|EXCLUDE|EXECUTE|EXPLAIN|FETCH|FLATTEN|FOR|FORCE|FROM|FUNCTION|GRANT|GROUP|GSI|HAVING|IF|IGNORE|ILIKE|INCLUDE|INCREMENT|INDEX|INFER|INLINE|INNER|INSERT|INTERSECT|INTO|IS|JOIN|KEY|KEYS|KEYSPACE|KNOWN|LAST|LEFT|LET|LETTING|LIMIT|LSM|MAP|MAPPING|MATCHED|MATERIALIZED|MERGE|MINUS|MISSING|NAMESPACE|NEST|NULL|NUMBER|OBJECT|OFFSET|ON|OPTION|ORDER|OUTER|OVER|PARSE|PARTITION|PASSWORD|PATH|POOL|PREPARE|PRIMARY|PRIVATE|PRIVILEGE|PROCEDURE|PUBLIC|RAW|REALM|REDUCE|RENAME|RETURN|RETURNING|REVOKE|RIGHT|ROLE|ROLLBACK|SATISFIES|SCHEMA|SELECT|SELF|SEMI|SET|SHOW|SOME|START|STATISTICS|STRING|SYSTEM|TO|TRANSACTION|TRIGGER|TRUNCATE|UNDER|UNION|UNIQUE|UNKNOWN|UNNEST|UNSET|UPDATE|UPSERT|USE|USER|USING|VALIDATE|VALUE|VALUES|VIA|VIEW|WHERE|WHILE|WITH|WORK|XOR)\b/i,boolean:/\b(?:FALSE|TRUE)\b/i,number:/(?:\b\d+\.|\B\.)\d+e[+\-]?\d+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/%]|!=|==?|\|\||<[>=]?|>=?|\b(?:AND|ANY|ARRAY|BETWEEN|CASE|ELSE|END|EVERY|EXISTS|FIRST|IN|LIKE|NOT|OR|THEN|VALUED|WHEN|WITHIN)\b/i,punctuation:/[;[\](),.{}:]/}; \ No newline at end of file diff --git a/components/prism-n4js.js b/components/prism-n4js.js index 946b080536..916d83a918 100755 --- a/components/prism-n4js.js +++ b/components/prism-n4js.js @@ -1,6 +1,6 @@ Prism.languages.n4js = Prism.languages.extend('javascript', { // Keywords from N4JS language spec: https://numberfour.github.io/n4js/spec/N4JSSpec.html - 'keyword': /\b(?:any|Array|boolean|break|case|catch|class|const|constructor|continue|debugger|declare|default|delete|do|else|enum|export|extends|false|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|module|new|null|number|package|private|protected|public|return|set|static|string|super|switch|this|throw|true|try|typeof|var|void|while|with|yield)\b/ + 'keyword': /\b(?:Array|any|boolean|break|case|catch|class|const|constructor|continue|debugger|declare|default|delete|do|else|enum|export|extends|false|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|module|new|null|number|package|private|protected|public|return|set|static|string|super|switch|this|throw|true|try|typeof|var|void|while|with|yield)\b/ }); Prism.languages.insertBefore('n4js', 'constant', { diff --git a/components/prism-n4js.min.js b/components/prism-n4js.min.js index d3b9632b3c..1ce5ed5ce8 100755 --- a/components/prism-n4js.min.js +++ b/components/prism-n4js.min.js @@ -1 +1 @@ -Prism.languages.n4js=Prism.languages.extend("javascript",{keyword:/\b(?:any|Array|boolean|break|case|catch|class|const|constructor|continue|debugger|declare|default|delete|do|else|enum|export|extends|false|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|module|new|null|number|package|private|protected|public|return|set|static|string|super|switch|this|throw|true|try|typeof|var|void|while|with|yield)\b/}),Prism.languages.insertBefore("n4js","constant",{annotation:{pattern:/@+\w+/,alias:"operator"}}),Prism.languages.n4jsd=Prism.languages.n4js; \ No newline at end of file +Prism.languages.n4js=Prism.languages.extend("javascript",{keyword:/\b(?:Array|any|boolean|break|case|catch|class|const|constructor|continue|debugger|declare|default|delete|do|else|enum|export|extends|false|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|module|new|null|number|package|private|protected|public|return|set|static|string|super|switch|this|throw|true|try|typeof|var|void|while|with|yield)\b/}),Prism.languages.insertBefore("n4js","constant",{annotation:{pattern:/@+\w+/,alias:"operator"}}),Prism.languages.n4jsd=Prism.languages.n4js; \ No newline at end of file diff --git a/components/prism-nand2tetris-hdl.js b/components/prism-nand2tetris-hdl.js index 49cdece238..29ba4f29e0 100644 --- a/components/prism-nand2tetris-hdl.js +++ b/components/prism-nand2tetris-hdl.js @@ -1,7 +1,7 @@ Prism.languages['nand2tetris-hdl'] = { 'comment': /\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/, - 'keyword': /\b(?:CHIP|IN|OUT|PARTS|BUILTIN|CLOCKED)\b/, - 'boolean': /\b(?:true|false)\b/, + 'keyword': /\b(?:BUILTIN|CHIP|CLOCKED|IN|OUT|PARTS)\b/, + 'boolean': /\b(?:false|true)\b/, 'function': /\b[A-Za-z][A-Za-z0-9]*(?=\()/, 'number': /\b\d+\b/, 'operator': /=|\.\./, diff --git a/components/prism-nand2tetris-hdl.min.js b/components/prism-nand2tetris-hdl.min.js index 3b9ef339ee..fc8ea3dfbd 100644 --- a/components/prism-nand2tetris-hdl.min.js +++ b/components/prism-nand2tetris-hdl.min.js @@ -1 +1 @@ -Prism.languages["nand2tetris-hdl"]={comment:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,keyword:/\b(?:CHIP|IN|OUT|PARTS|BUILTIN|CLOCKED)\b/,boolean:/\b(?:true|false)\b/,function:/\b[A-Za-z][A-Za-z0-9]*(?=\()/,number:/\b\d+\b/,operator:/=|\.\./,punctuation:/[{}[\];(),:]/}; \ No newline at end of file +Prism.languages["nand2tetris-hdl"]={comment:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,keyword:/\b(?:BUILTIN|CHIP|CLOCKED|IN|OUT|PARTS)\b/,boolean:/\b(?:false|true)\b/,function:/\b[A-Za-z][A-Za-z0-9]*(?=\()/,number:/\b\d+\b/,operator:/=|\.\./,punctuation:/[{}[\];(),:]/}; \ No newline at end of file diff --git a/components/prism-nasm.js b/components/prism-nasm.js index 371a00dd6b..46fd7139e5 100644 --- a/components/prism-nasm.js +++ b/components/prism-nasm.js @@ -13,10 +13,10 @@ Prism.languages.nasm = { lookbehind: true }, /(?:extern|global)[^;\r\n]*/i, - /(?:CPU|FLOAT|DEFAULT).*$/m + /(?:CPU|DEFAULT|FLOAT).*$/m ], 'register': { - pattern: /\b(?:st\d|[xyz]mm\d\d?|[cdt]r\d|r\d\d?[bwd]?|[er]?[abcd]x|[abcd][hl]|[er]?(?:bp|sp|si|di)|[cdefgs]s)\b/i, + pattern: /\b(?:st\d|[xyz]mm\d\d?|[cdt]r\d|r\d\d?[bwd]?|[er]?[abcd]x|[abcd][hl]|[er]?(?:bp|di|si|sp)|[cdefgs]s)\b/i, alias: 'variable' }, 'number': /(?:\b|(?=\$))(?:0[hx](?:\.[\da-f]+|[\da-f]+(?:\.[\da-f]+)?)(?:p[+-]?\d+)?|\d[\da-f]+[hx]|\$\d[\da-f]*|0[oq][0-7]+|[0-7]+[oq]|0[by][01]+|[01]+[by]|0[dt]\d+|(?:\d+(?:\.\d+)?|\.\d+)(?:\.?e[+-]?\d+)?[dt]?)\b/i, diff --git a/components/prism-nasm.min.js b/components/prism-nasm.min.js index 8eaeabb139..13eb8bada9 100644 --- a/components/prism-nasm.min.js +++ b/components/prism-nasm.min.js @@ -1 +1 @@ -Prism.languages.nasm={comment:/;.*$/m,string:/(["'`])(?:\\.|(?!\1)[^\\\r\n])*\1/,label:{pattern:/(^\s*)[A-Za-z._?$][\w.?$@~#]*:/m,lookbehind:!0,alias:"function"},keyword:[/\[?BITS (?:16|32|64)\]?/,{pattern:/(^\s*)section\s*[a-z.]+:?/im,lookbehind:!0},/(?:extern|global)[^;\r\n]*/i,/(?:CPU|FLOAT|DEFAULT).*$/m],register:{pattern:/\b(?:st\d|[xyz]mm\d\d?|[cdt]r\d|r\d\d?[bwd]?|[er]?[abcd]x|[abcd][hl]|[er]?(?:bp|sp|si|di)|[cdefgs]s)\b/i,alias:"variable"},number:/(?:\b|(?=\$))(?:0[hx](?:\.[\da-f]+|[\da-f]+(?:\.[\da-f]+)?)(?:p[+-]?\d+)?|\d[\da-f]+[hx]|\$\d[\da-f]*|0[oq][0-7]+|[0-7]+[oq]|0[by][01]+|[01]+[by]|0[dt]\d+|(?:\d+(?:\.\d+)?|\.\d+)(?:\.?e[+-]?\d+)?[dt]?)\b/i,operator:/[\[\]*+\-\/%<>=&|$!]/}; \ No newline at end of file +Prism.languages.nasm={comment:/;.*$/m,string:/(["'`])(?:\\.|(?!\1)[^\\\r\n])*\1/,label:{pattern:/(^\s*)[A-Za-z._?$][\w.?$@~#]*:/m,lookbehind:!0,alias:"function"},keyword:[/\[?BITS (?:16|32|64)\]?/,{pattern:/(^\s*)section\s*[a-z.]+:?/im,lookbehind:!0},/(?:extern|global)[^;\r\n]*/i,/(?:CPU|DEFAULT|FLOAT).*$/m],register:{pattern:/\b(?:st\d|[xyz]mm\d\d?|[cdt]r\d|r\d\d?[bwd]?|[er]?[abcd]x|[abcd][hl]|[er]?(?:bp|di|si|sp)|[cdefgs]s)\b/i,alias:"variable"},number:/(?:\b|(?=\$))(?:0[hx](?:\.[\da-f]+|[\da-f]+(?:\.[\da-f]+)?)(?:p[+-]?\d+)?|\d[\da-f]+[hx]|\$\d[\da-f]*|0[oq][0-7]+|[0-7]+[oq]|0[by][01]+|[01]+[by]|0[dt]\d+|(?:\d+(?:\.\d+)?|\.\d+)(?:\.?e[+-]?\d+)?[dt]?)\b/i,operator:/[\[\]*+\-\/%<>=&|$!]/}; \ No newline at end of file diff --git a/components/prism-neon.js b/components/prism-neon.js index c642e94d77..b2b1fc5e66 100644 --- a/components/prism-neon.js +++ b/components/prism-neon.js @@ -18,7 +18,7 @@ Prism.languages.neon = { lookbehind: true }, 'boolean': { - pattern: /(^|[[{(=:,\s])(?:true|false|yes|no)(?=$|[\]}),:=\s])/i, + pattern: /(^|[[{(=:,\s])(?:false|no|true|yes)(?=$|[\]}),:=\s])/i, lookbehind: true }, 'null': { diff --git a/components/prism-neon.min.js b/components/prism-neon.min.js index 352854536c..3bc91f3e7a 100644 --- a/components/prism-neon.min.js +++ b/components/prism-neon.min.js @@ -1 +1 @@ -Prism.languages.neon={comment:{pattern:/#.*/,greedy:!0},datetime:{pattern:/(^|[[{(=:,\s])\d\d\d\d-\d\d?-\d\d?(?:(?:[Tt]| +)\d\d?:\d\d:\d\d(?:\.\d*)? *(?:Z|[-+]\d\d?(?::?\d\d)?)?)?(?=$|[\]}),\s])/,lookbehind:!0,alias:"number"},key:{pattern:/(^|[[{(,\s])[^,:=[\]{}()'"\s]+(?=\s*:(?:$|[\]}),\s])|\s*=)/,lookbehind:!0,alias:"atrule"},number:{pattern:/(^|[[{(=:,\s])[+-]?(?:0x[\da-fA-F]+|0o[0-7]+|0b[01]+|(?:\d+(?:\.\d*)?|\.?\d+)(?:[eE][+-]?\d+)?)(?=$|[\]}),:=\s])/,lookbehind:!0},boolean:{pattern:/(^|[[{(=:,\s])(?:true|false|yes|no)(?=$|[\]}),:=\s])/i,lookbehind:!0},null:{pattern:/(^|[[{(=:,\s])(?:null)(?=$|[\]}),:=\s])/i,lookbehind:!0,alias:"keyword"},string:{pattern:/(^|[[{(=:,\s])(?:('''|""")\r?\n(?:(?:[^\r\n]|\r?\n(?![\t ]*\2))*\r?\n)?[\t ]*\2|'[^'\r\n]*'|"(?:\\.|[^\\"\r\n])*")/,lookbehind:!0,greedy:!0},literal:{pattern:/(^|[[{(=:,\s])(?:[^#"',:=[\]{}()\s`-]|[:-][^"',=[\]{}()\s])(?:[^,:=\]})(\s]|:(?![\s,\]})]|$)|[ \t]+[^#,:=\]})(\s])*/,lookbehind:!0,alias:"string"},punctuation:/[,:=[\]{}()-]/}; \ No newline at end of file +Prism.languages.neon={comment:{pattern:/#.*/,greedy:!0},datetime:{pattern:/(^|[[{(=:,\s])\d\d\d\d-\d\d?-\d\d?(?:(?:[Tt]| +)\d\d?:\d\d:\d\d(?:\.\d*)? *(?:Z|[-+]\d\d?(?::?\d\d)?)?)?(?=$|[\]}),\s])/,lookbehind:!0,alias:"number"},key:{pattern:/(^|[[{(,\s])[^,:=[\]{}()'"\s]+(?=\s*:(?:$|[\]}),\s])|\s*=)/,lookbehind:!0,alias:"atrule"},number:{pattern:/(^|[[{(=:,\s])[+-]?(?:0x[\da-fA-F]+|0o[0-7]+|0b[01]+|(?:\d+(?:\.\d*)?|\.?\d+)(?:[eE][+-]?\d+)?)(?=$|[\]}),:=\s])/,lookbehind:!0},boolean:{pattern:/(^|[[{(=:,\s])(?:false|no|true|yes)(?=$|[\]}),:=\s])/i,lookbehind:!0},null:{pattern:/(^|[[{(=:,\s])(?:null)(?=$|[\]}),:=\s])/i,lookbehind:!0,alias:"keyword"},string:{pattern:/(^|[[{(=:,\s])(?:('''|""")\r?\n(?:(?:[^\r\n]|\r?\n(?![\t ]*\2))*\r?\n)?[\t ]*\2|'[^'\r\n]*'|"(?:\\.|[^\\"\r\n])*")/,lookbehind:!0,greedy:!0},literal:{pattern:/(^|[[{(=:,\s])(?:[^#"',:=[\]{}()\s`-]|[:-][^"',=[\]{}()\s])(?:[^,:=\]})(\s]|:(?![\s,\]})]|$)|[ \t]+[^#,:=\]})(\s])*/,lookbehind:!0,alias:"string"},punctuation:/[,:=[\]{}()-]/}; \ No newline at end of file diff --git a/components/prism-nevod.js b/components/prism-nevod.js index 272956bde3..867c171aeb 100644 --- a/components/prism-nevod.js +++ b/components/prism-nevod.js @@ -40,9 +40,9 @@ Prism.languages.nevod = { alias: 'function', lookbehind: true, }, - 'keyword': /@(?:require|namespace|pattern|search|inside|outside|having|where)\b/, + 'keyword': /@(?:having|inside|namespace|outside|pattern|require|search|where)\b/, 'standard-pattern': { - pattern: /\b(?:Word|Punct|Symbol|Space|LineBreak|Start|End|Alpha|AlphaNum|Num|NumAlpha|Blank|WordBreak|Any)(?:\([a-zA-Z0-9\-.,\s+]*\))?/, + pattern: /\b(?:Alpha|AlphaNum|Any|Blank|End|LineBreak|Num|NumAlpha|Punct|Space|Start|Symbol|Word|WordBreak)\b(?:\([a-zA-Z0-9\-.,\s+]*\))?/, inside: { 'standard-pattern-name': { pattern: /^[a-zA-Z0-9\-.]+/, diff --git a/components/prism-nevod.min.js b/components/prism-nevod.min.js index d5c786c589..1cb6b8a24d 100644 --- a/components/prism-nevod.min.js +++ b/components/prism-nevod.min.js @@ -1 +1 @@ -Prism.languages.nevod={comment:/\/\/.*|(?:\/\*[\s\S]*?(?:\*\/|$))/,string:{pattern:/(?:"(?:""|[^"])*"(?!")|'(?:''|[^'])*'(?!'))!?\*?/,greedy:!0,inside:{"string-attrs":/!$|!\*$|\*$/}},namespace:{pattern:/(@namespace\s+)[a-zA-Z0-9\-.]+(?=\s*\{)/,lookbehind:!0},pattern:{pattern:/(@pattern\s+)?#?[a-zA-Z0-9\-.]+(?:\s*\(\s*(?:~\s*)?[a-zA-Z0-9\-.]+\s*(?:,\s*(?:~\s*)?[a-zA-Z0-9\-.]*)*\))?(?=\s*=)/,lookbehind:!0,inside:{"pattern-name":{pattern:/^#?[a-zA-Z0-9\-.]+/,alias:"class-name"},fields:{pattern:/\(.*\)/,inside:{"field-name":{pattern:/[a-zA-Z0-9\-.]+/,alias:"variable"},punctuation:/[,()]/,operator:{pattern:/~/,alias:"field-hidden-mark"}}}}},search:{pattern:/(@search\s+|#)[a-zA-Z0-9\-.]+(?:\.\*)?(?=\s*;)/,alias:"function",lookbehind:!0},keyword:/@(?:require|namespace|pattern|search|inside|outside|having|where)\b/,"standard-pattern":{pattern:/\b(?:Word|Punct|Symbol|Space|LineBreak|Start|End|Alpha|AlphaNum|Num|NumAlpha|Blank|WordBreak|Any)(?:\([a-zA-Z0-9\-.,\s+]*\))?/,inside:{"standard-pattern-name":{pattern:/^[a-zA-Z0-9\-.]+/,alias:"builtin"},quantifier:{pattern:/\b\d+(?:\s*\+|\s*-\s*\d+)?(?!\w)/,alias:"number"},"standard-pattern-attr":{pattern:/[a-zA-Z0-9\-.]+/,alias:"builtin"},punctuation:/[,()]/}},quantifier:{pattern:/\b\d+(?:\s*\+|\s*-\s*\d+)?(?!\w)/,alias:"number"},operator:[{pattern:/=/,alias:"pattern-def"},{pattern:/&/,alias:"conjunction"},{pattern:/~/,alias:"exception"},{pattern:/\?/,alias:"optionality"},{pattern:/[[\]]/,alias:"repetition"},{pattern:/[{}]/,alias:"variation"},{pattern:/[+_]/,alias:"sequence"},{pattern:/\.{2,3}/,alias:"span"}],"field-capture":[{pattern:/([a-zA-Z0-9\-.]+\s*\()\s*[a-zA-Z0-9\-.]+\s*:\s*[a-zA-Z0-9\-.]+(?:\s*,\s*[a-zA-Z0-9\-.]+\s*:\s*[a-zA-Z0-9\-.]+)*(?=\s*\))/,lookbehind:!0,inside:{"field-name":{pattern:/[a-zA-Z0-9\-.]+/,alias:"variable"},colon:/:/}},{pattern:/[a-zA-Z0-9\-.]+\s*:/,inside:{"field-name":{pattern:/[a-zA-Z0-9\-.]+/,alias:"variable"},colon:/:/}}],punctuation:/[:;,()]/,name:/[a-zA-Z0-9\-.]+/}; \ No newline at end of file +Prism.languages.nevod={comment:/\/\/.*|(?:\/\*[\s\S]*?(?:\*\/|$))/,string:{pattern:/(?:"(?:""|[^"])*"(?!")|'(?:''|[^'])*'(?!'))!?\*?/,greedy:!0,inside:{"string-attrs":/!$|!\*$|\*$/}},namespace:{pattern:/(@namespace\s+)[a-zA-Z0-9\-.]+(?=\s*\{)/,lookbehind:!0},pattern:{pattern:/(@pattern\s+)?#?[a-zA-Z0-9\-.]+(?:\s*\(\s*(?:~\s*)?[a-zA-Z0-9\-.]+\s*(?:,\s*(?:~\s*)?[a-zA-Z0-9\-.]*)*\))?(?=\s*=)/,lookbehind:!0,inside:{"pattern-name":{pattern:/^#?[a-zA-Z0-9\-.]+/,alias:"class-name"},fields:{pattern:/\(.*\)/,inside:{"field-name":{pattern:/[a-zA-Z0-9\-.]+/,alias:"variable"},punctuation:/[,()]/,operator:{pattern:/~/,alias:"field-hidden-mark"}}}}},search:{pattern:/(@search\s+|#)[a-zA-Z0-9\-.]+(?:\.\*)?(?=\s*;)/,alias:"function",lookbehind:!0},keyword:/@(?:having|inside|namespace|outside|pattern|require|search|where)\b/,"standard-pattern":{pattern:/\b(?:Alpha|AlphaNum|Any|Blank|End|LineBreak|Num|NumAlpha|Punct|Space|Start|Symbol|Word|WordBreak)\b(?:\([a-zA-Z0-9\-.,\s+]*\))?/,inside:{"standard-pattern-name":{pattern:/^[a-zA-Z0-9\-.]+/,alias:"builtin"},quantifier:{pattern:/\b\d+(?:\s*\+|\s*-\s*\d+)?(?!\w)/,alias:"number"},"standard-pattern-attr":{pattern:/[a-zA-Z0-9\-.]+/,alias:"builtin"},punctuation:/[,()]/}},quantifier:{pattern:/\b\d+(?:\s*\+|\s*-\s*\d+)?(?!\w)/,alias:"number"},operator:[{pattern:/=/,alias:"pattern-def"},{pattern:/&/,alias:"conjunction"},{pattern:/~/,alias:"exception"},{pattern:/\?/,alias:"optionality"},{pattern:/[[\]]/,alias:"repetition"},{pattern:/[{}]/,alias:"variation"},{pattern:/[+_]/,alias:"sequence"},{pattern:/\.{2,3}/,alias:"span"}],"field-capture":[{pattern:/([a-zA-Z0-9\-.]+\s*\()\s*[a-zA-Z0-9\-.]+\s*:\s*[a-zA-Z0-9\-.]+(?:\s*,\s*[a-zA-Z0-9\-.]+\s*:\s*[a-zA-Z0-9\-.]+)*(?=\s*\))/,lookbehind:!0,inside:{"field-name":{pattern:/[a-zA-Z0-9\-.]+/,alias:"variable"},colon:/:/}},{pattern:/[a-zA-Z0-9\-.]+\s*:/,inside:{"field-name":{pattern:/[a-zA-Z0-9\-.]+/,alias:"variable"},colon:/:/}}],punctuation:/[:;,()]/,name:/[a-zA-Z0-9\-.]+/}; \ No newline at end of file diff --git a/components/prism-nim.js b/components/prism-nim.js index 33d00c0fe7..aaed5e1f82 100644 --- a/components/prism-nim.js +++ b/components/prism-nim.js @@ -26,7 +26,7 @@ Prism.languages.nim = { // Look behind and look ahead prevent wrong highlighting of punctuations [. .] {. .} (. .) // but allow the slice operator .. to take precedence over them // One can define his own operators in Nim so all combination of operators might be an operator. - pattern: /(^|[({\[](?=\.\.)|(?![({\[]\.).)(?:(?:[=+\-*\/<>@$~&%|!?^:\\]|\.\.|\.(?![)}\]]))+|\b(?:and|div|of|or|in|is|isnot|mod|not|notin|shl|shr|xor)\b)/m, + pattern: /(^|[({\[](?=\.\.)|(?![({\[]\.).)(?:(?:[=+\-*\/<>@$~&%|!?^:\\]|\.\.|\.(?![)}\]]))+|\b(?:and|div|in|is|isnot|mod|not|notin|of|or|shl|shr|xor)\b)/m, lookbehind: true }, 'punctuation': /[({\[]\.|\.[)}\]]|[`(){}\[\],:]/ diff --git a/components/prism-nim.min.js b/components/prism-nim.min.js index 0a254a6345..7fde3f6af0 100644 --- a/components/prism-nim.min.js +++ b/components/prism-nim.min.js @@ -1 +1 @@ -Prism.languages.nim={comment:/#.*/,string:{pattern:/(?:(?:\b(?!\d)(?:\w|\\x[8-9a-fA-F][0-9a-fA-F])+)?(?:"""[\s\S]*?"""(?!")|"(?:\\[\s\S]|""|[^"\\])*")|'(?:\\(?:\d+|x[\da-fA-F]{2}|.)|[^'])')/,greedy:!0},number:/\b(?:0[xXoObB][\da-fA-F_]+|\d[\d_]*(?:(?!\.\.)\.[\d_]*)?(?:[eE][+-]?\d[\d_]*)?)(?:'?[iuf]\d*)?/,keyword:/\b(?:addr|as|asm|atomic|bind|block|break|case|cast|concept|const|continue|converter|defer|discard|distinct|do|elif|else|end|enum|except|export|finally|for|from|func|generic|if|import|include|interface|iterator|let|macro|method|mixin|nil|object|out|proc|ptr|raise|ref|return|static|template|try|tuple|type|using|var|when|while|with|without|yield)\b/,function:{pattern:/(?:(?!\d)(?:\w|\\x[8-9a-fA-F][0-9a-fA-F])+|`[^`\r\n]+`)\*?(?:\[[^\]]+\])?(?=\s*\()/,inside:{operator:/\*$/}},ignore:{pattern:/`[^`\r\n]+`/,inside:{punctuation:/`/}},operator:{pattern:/(^|[({\[](?=\.\.)|(?![({\[]\.).)(?:(?:[=+\-*\/<>@$~&%|!?^:\\]|\.\.|\.(?![)}\]]))+|\b(?:and|div|of|or|in|is|isnot|mod|not|notin|shl|shr|xor)\b)/m,lookbehind:!0},punctuation:/[({\[]\.|\.[)}\]]|[`(){}\[\],:]/}; \ No newline at end of file +Prism.languages.nim={comment:/#.*/,string:{pattern:/(?:(?:\b(?!\d)(?:\w|\\x[8-9a-fA-F][0-9a-fA-F])+)?(?:"""[\s\S]*?"""(?!")|"(?:\\[\s\S]|""|[^"\\])*")|'(?:\\(?:\d+|x[\da-fA-F]{2}|.)|[^'])')/,greedy:!0},number:/\b(?:0[xXoObB][\da-fA-F_]+|\d[\d_]*(?:(?!\.\.)\.[\d_]*)?(?:[eE][+-]?\d[\d_]*)?)(?:'?[iuf]\d*)?/,keyword:/\b(?:addr|as|asm|atomic|bind|block|break|case|cast|concept|const|continue|converter|defer|discard|distinct|do|elif|else|end|enum|except|export|finally|for|from|func|generic|if|import|include|interface|iterator|let|macro|method|mixin|nil|object|out|proc|ptr|raise|ref|return|static|template|try|tuple|type|using|var|when|while|with|without|yield)\b/,function:{pattern:/(?:(?!\d)(?:\w|\\x[8-9a-fA-F][0-9a-fA-F])+|`[^`\r\n]+`)\*?(?:\[[^\]]+\])?(?=\s*\()/,inside:{operator:/\*$/}},ignore:{pattern:/`[^`\r\n]+`/,inside:{punctuation:/`/}},operator:{pattern:/(^|[({\[](?=\.\.)|(?![({\[]\.).)(?:(?:[=+\-*\/<>@$~&%|!?^:\\]|\.\.|\.(?![)}\]]))+|\b(?:and|div|in|is|isnot|mod|not|notin|of|or|shl|shr|xor)\b)/m,lookbehind:!0},punctuation:/[({\[]\.|\.[)}\]]|[`(){}\[\],:]/}; \ No newline at end of file diff --git a/components/prism-nix.js b/components/prism-nix.js index 0cd3302304..d1cf657d95 100644 --- a/components/prism-nix.js +++ b/components/prism-nix.js @@ -31,8 +31,8 @@ Prism.languages.nix = { }, 'number': /\b\d+\b/, 'keyword': /\b(?:assert|builtins|else|if|in|inherit|let|null|or|then|with)\b/, - 'function': /\b(?:abort|add|all|any|attrNames|attrValues|baseNameOf|compareVersions|concatLists|currentSystem|deepSeq|derivation|dirOf|div|elem(?:At)?|fetch(?:url|Tarball)|filter(?:Source)?|fromJSON|genList|getAttr|getEnv|hasAttr|hashString|head|import|intersectAttrs|is(?:Attrs|Bool|Function|Int|List|Null|String)|length|lessThan|listToAttrs|map|mul|parseDrvName|pathExists|read(?:Dir|File)|removeAttrs|replaceStrings|seq|sort|stringLength|sub(?:string)?|tail|throw|to(?:File|JSON|Path|String|XML)|trace|typeOf)\b|\bfoldl'\B/, - 'boolean': /\b(?:true|false)\b/, + 'function': /\b(?:abort|add|all|any|attrNames|attrValues|baseNameOf|compareVersions|concatLists|currentSystem|deepSeq|derivation|dirOf|div|elem(?:At)?|fetch(?:Tarball|url)|filter(?:Source)?|fromJSON|genList|getAttr|getEnv|hasAttr|hashString|head|import|intersectAttrs|is(?:Attrs|Bool|Function|Int|List|Null|String)|length|lessThan|listToAttrs|map|mul|parseDrvName|pathExists|read(?:Dir|File)|removeAttrs|replaceStrings|seq|sort|stringLength|sub(?:string)?|tail|throw|to(?:File|JSON|Path|String|XML)|trace|typeOf)\b|\bfoldl'\B/, + 'boolean': /\b(?:false|true)\b/, 'operator': /[=!<>]=?|\+\+?|\|\||&&|\/\/|->?|[?@]/, 'punctuation': /[{}()[\].,:;]/ }; diff --git a/components/prism-nix.min.js b/components/prism-nix.min.js index 71ac54f8bb..f721364670 100644 --- a/components/prism-nix.min.js +++ b/components/prism-nix.min.js @@ -1 +1 @@ -Prism.languages.nix={comment:/\/\*[\s\S]*?\*\/|#.*/,string:{pattern:/"(?:[^"\\]|\\[\s\S])*"|''(?:(?!'')[\s\S]|''(?:'|\\|\$\{))*''/,greedy:!0,inside:{interpolation:{pattern:/(^|(?:^|(?!'').)[^\\])\$\{(?:[^{}]|\{[^}]*\})*\}/,lookbehind:!0,inside:{antiquotation:{pattern:/^\$(?=\{)/,alias:"variable"}}}}},url:[/\b(?:[a-z]{3,7}:\/\/)[\w\-+%~\/.:#=?&]+/,{pattern:/([^\/])(?:[\w\-+%~.:#=?&]*(?!\/\/)[\w\-+%~\/.:#=?&])?(?!\/\/)\/[\w\-+%~\/.:#=?&]*/,lookbehind:!0}],antiquotation:{pattern:/\$(?=\{)/,alias:"variable"},number:/\b\d+\b/,keyword:/\b(?:assert|builtins|else|if|in|inherit|let|null|or|then|with)\b/,function:/\b(?:abort|add|all|any|attrNames|attrValues|baseNameOf|compareVersions|concatLists|currentSystem|deepSeq|derivation|dirOf|div|elem(?:At)?|fetch(?:url|Tarball)|filter(?:Source)?|fromJSON|genList|getAttr|getEnv|hasAttr|hashString|head|import|intersectAttrs|is(?:Attrs|Bool|Function|Int|List|Null|String)|length|lessThan|listToAttrs|map|mul|parseDrvName|pathExists|read(?:Dir|File)|removeAttrs|replaceStrings|seq|sort|stringLength|sub(?:string)?|tail|throw|to(?:File|JSON|Path|String|XML)|trace|typeOf)\b|\bfoldl'\B/,boolean:/\b(?:true|false)\b/,operator:/[=!<>]=?|\+\+?|\|\||&&|\/\/|->?|[?@]/,punctuation:/[{}()[\].,:;]/},Prism.languages.nix.string.inside.interpolation.inside.rest=Prism.languages.nix; \ No newline at end of file +Prism.languages.nix={comment:/\/\*[\s\S]*?\*\/|#.*/,string:{pattern:/"(?:[^"\\]|\\[\s\S])*"|''(?:(?!'')[\s\S]|''(?:'|\\|\$\{))*''/,greedy:!0,inside:{interpolation:{pattern:/(^|(?:^|(?!'').)[^\\])\$\{(?:[^{}]|\{[^}]*\})*\}/,lookbehind:!0,inside:{antiquotation:{pattern:/^\$(?=\{)/,alias:"variable"}}}}},url:[/\b(?:[a-z]{3,7}:\/\/)[\w\-+%~\/.:#=?&]+/,{pattern:/([^\/])(?:[\w\-+%~.:#=?&]*(?!\/\/)[\w\-+%~\/.:#=?&])?(?!\/\/)\/[\w\-+%~\/.:#=?&]*/,lookbehind:!0}],antiquotation:{pattern:/\$(?=\{)/,alias:"variable"},number:/\b\d+\b/,keyword:/\b(?:assert|builtins|else|if|in|inherit|let|null|or|then|with)\b/,function:/\b(?:abort|add|all|any|attrNames|attrValues|baseNameOf|compareVersions|concatLists|currentSystem|deepSeq|derivation|dirOf|div|elem(?:At)?|fetch(?:Tarball|url)|filter(?:Source)?|fromJSON|genList|getAttr|getEnv|hasAttr|hashString|head|import|intersectAttrs|is(?:Attrs|Bool|Function|Int|List|Null|String)|length|lessThan|listToAttrs|map|mul|parseDrvName|pathExists|read(?:Dir|File)|removeAttrs|replaceStrings|seq|sort|stringLength|sub(?:string)?|tail|throw|to(?:File|JSON|Path|String|XML)|trace|typeOf)\b|\bfoldl'\B/,boolean:/\b(?:false|true)\b/,operator:/[=!<>]=?|\+\+?|\|\||&&|\/\/|->?|[?@]/,punctuation:/[{}()[\].,:;]/},Prism.languages.nix.string.inside.interpolation.inside.rest=Prism.languages.nix; \ No newline at end of file diff --git a/components/prism-nsis.js b/components/prism-nsis.js index 12816c2290..af2cb6cac4 100644 --- a/components/prism-nsis.js +++ b/components/prism-nsis.js @@ -13,17 +13,17 @@ Prism.languages.nsis = { greedy: true }, 'keyword': { - pattern: /(^[\t ]*)(?:Abort|Add(?:BrandingImage|Size)|AdvSplash|Allow(?:RootDirInstall|SkipFiles)|AutoCloseWindow|Banner|BG(?:Font|Gradient|Image)|BrandingText|BringToFront|Call(?:InstDLL)?|Caption|ChangeUI|CheckBitmap|ClearErrors|CompletedText|ComponentText|CopyFiles|CRCCheck|Create(?:Directory|Font|ShortCut)|Delete(?:INISec|INIStr|RegKey|RegValue)?|Detail(?:Print|sButtonText)|Dialer|Dir(?:Text|Var|Verify)|EnableWindow|Enum(?:RegKey|RegValue)|Exch|Exec(?:Shell(?:Wait)?|Wait)?|ExpandEnvStrings|File(?:BufSize|Close|ErrorText|Open|Read|ReadByte|ReadUTF16LE|ReadWord|WriteUTF16LE|Seek|Write|WriteByte|WriteWord)?|Find(?:Close|First|Next|Window)|FlushINI|Get(?:CurInstType|CurrentAddress|DlgItem|DLLVersion(?:Local)?|ErrorLevel|FileTime(?:Local)?|FullPathName|Function(?:Address|End)?|InstDirError|LabelAddress|TempFileName)|Goto|HideWindow|Icon|If(?:Abort|Errors|FileExists|RebootFlag|Silent)|InitPluginsDir|Install(?:ButtonText|Colors|Dir(?:RegKey)?)|InstProgressFlags|Inst(?:Type(?:GetText|SetText)?)|Int(?:64|Ptr)?CmpU?|Int(?:64)?Fmt|Int(?:Ptr)?Op|IsWindow|Lang(?:DLL|String)|License(?:BkColor|Data|ForceSelection|LangString|Text)|LoadLanguageFile|LockWindow|Log(?:Set|Text)|Manifest(?:DPIAware|SupportedOS)|Math|MessageBox|MiscButtonText|Name|Nop|ns(?:Dialogs|Exec)|NSISdl|OutFile|Page(?:Callbacks)?|PE(?:DllCharacteristics|SubsysVer)|Pop|Push|Quit|Read(?:EnvStr|INIStr|RegDWORD|RegStr)|Reboot|RegDLL|Rename|RequestExecutionLevel|ReserveFile|Return|RMDir|SearchPath|Section(?:End|GetFlags|GetInstTypes|GetSize|GetText|Group|In|SetFlags|SetInstTypes|SetSize|SetText)?|SendMessage|Set(?:AutoClose|BrandingImage|Compress|Compressor(?:DictSize)?|CtlColors|CurInstType|DatablockOptimize|DateSave|Details(?:Print|View)|ErrorLevel|Errors|FileAttributes|Font|OutPath|Overwrite|PluginUnload|RebootFlag|RegView|ShellVarContext|Silent)|Show(?:InstDetails|UninstDetails|Window)|Silent(?:Install|UnInstall)|Sleep|SpaceTexts|Splash|StartMenu|Str(?:CmpS?|Cpy|Len)|SubCaption|System|Unicode|Uninstall(?:ButtonText|Caption|Icon|SubCaption|Text)|UninstPage|UnRegDLL|UserInfo|Var|VI(?:AddVersionKey|FileVersion|ProductVersion)|VPatch|WindowIcon|Write(?:INIStr|Reg(?:Bin|DWORD|ExpandStr|MultiStr|None|Str)|Uninstaller)|XPStyle)\b/m, + pattern: /(^[\t ]*)(?:Abort|Add(?:BrandingImage|Size)|AdvSplash|Allow(?:RootDirInstall|SkipFiles)|AutoCloseWindow|BG(?:Font|Gradient|Image)|Banner|BrandingText|BringToFront|CRCCheck|Call(?:InstDLL)?|Caption|ChangeUI|CheckBitmap|ClearErrors|CompletedText|ComponentText|CopyFiles|Create(?:Directory|Font|ShortCut)|Delete(?:INISec|INIStr|RegKey|RegValue)?|Detail(?:Print|sButtonText)|Dialer|Dir(?:Text|Var|Verify)|EnableWindow|Enum(?:RegKey|RegValue)|Exch|Exec(?:Shell(?:Wait)?|Wait)?|ExpandEnvStrings|File(?:BufSize|Close|ErrorText|Open|Read|ReadByte|ReadUTF16LE|ReadWord|Seek|Write|WriteByte|WriteUTF16LE|WriteWord)?|Find(?:Close|First|Next|Window)|FlushINI|Get(?:CurInstType|CurrentAddress|DLLVersion(?:Local)?|DlgItem|ErrorLevel|FileTime(?:Local)?|FullPathName|Function(?:Address|End)?|InstDirError|LabelAddress|TempFileName)|Goto|HideWindow|Icon|If(?:Abort|Errors|FileExists|RebootFlag|Silent)|InitPluginsDir|InstProgressFlags|Inst(?:Type(?:GetText|SetText)?)|Install(?:ButtonText|Colors|Dir(?:RegKey)?)|Int(?:64|Ptr)?CmpU?|Int(?:64)?Fmt|Int(?:Ptr)?Op|IsWindow|Lang(?:DLL|String)|License(?:BkColor|Data|ForceSelection|LangString|Text)|LoadLanguageFile|LockWindow|Log(?:Set|Text)|Manifest(?:DPIAware|SupportedOS)|Math|MessageBox|MiscButtonText|NSISdl|Name|Nop|OutFile|PE(?:DllCharacteristics|SubsysVer)|Page(?:Callbacks)?|Pop|Push|Quit|RMDir|Read(?:EnvStr|INIStr|RegDWORD|RegStr)|Reboot|RegDLL|Rename|RequestExecutionLevel|ReserveFile|Return|SearchPath|Section(?:End|GetFlags|GetInstTypes|GetSize|GetText|Group|In|SetFlags|SetInstTypes|SetSize|SetText)?|SendMessage|Set(?:AutoClose|BrandingImage|Compress|Compressor(?:DictSize)?|CtlColors|CurInstType|DatablockOptimize|DateSave|Details(?:Print|View)|ErrorLevel|Errors|FileAttributes|Font|OutPath|Overwrite|PluginUnload|RebootFlag|RegView|ShellVarContext|Silent)|Show(?:InstDetails|UninstDetails|Window)|Silent(?:Install|UnInstall)|Sleep|SpaceTexts|Splash|StartMenu|Str(?:CmpS?|Cpy|Len)|SubCaption|System|UnRegDLL|Unicode|UninstPage|Uninstall(?:ButtonText|Caption|Icon|SubCaption|Text)|UserInfo|VI(?:AddVersionKey|FileVersion|ProductVersion)|VPatch|Var|WindowIcon|Write(?:INIStr|Reg(?:Bin|DWORD|ExpandStr|MultiStr|None|Str)|Uninstaller)|XPStyle|ns(?:Dialogs|Exec))\b/m, lookbehind: true }, - 'property': /\b(?:admin|all|auto|both|colored|false|force|hide|highest|lastused|leave|listonly|none|normal|notset|off|on|open|print|show|silent|silentlog|smooth|textonly|true|user|ARCHIVE|FILE_(?:ATTRIBUTE_ARCHIVE|ATTRIBUTE_NORMAL|ATTRIBUTE_OFFLINE|ATTRIBUTE_READONLY|ATTRIBUTE_SYSTEM|ATTRIBUTE_TEMPORARY)|HK(?:(?:CR|CU|LM)(?:32|64)?|DD|PD|U)|HKEY_(?:CLASSES_ROOT|CURRENT_CONFIG|CURRENT_USER|DYN_DATA|LOCAL_MACHINE|PERFORMANCE_DATA|USERS)|ID(?:ABORT|CANCEL|IGNORE|NO|OK|RETRY|YES)|MB_(?:ABORTRETRYIGNORE|DEFBUTTON1|DEFBUTTON2|DEFBUTTON3|DEFBUTTON4|ICONEXCLAMATION|ICONINFORMATION|ICONQUESTION|ICONSTOP|OK|OKCANCEL|RETRYCANCEL|RIGHT|RTLREADING|SETFOREGROUND|TOPMOST|USERICON|YESNO)|NORMAL|OFFLINE|READONLY|SHCTX|SHELL_CONTEXT|SYSTEM|TEMPORARY)\b/, + 'property': /\b(?:ARCHIVE|FILE_(?:ATTRIBUTE_ARCHIVE|ATTRIBUTE_NORMAL|ATTRIBUTE_OFFLINE|ATTRIBUTE_READONLY|ATTRIBUTE_SYSTEM|ATTRIBUTE_TEMPORARY)|HK(?:(?:CR|CU|LM)(?:32|64)?|DD|PD|U)|HKEY_(?:CLASSES_ROOT|CURRENT_CONFIG|CURRENT_USER|DYN_DATA|LOCAL_MACHINE|PERFORMANCE_DATA|USERS)|ID(?:ABORT|CANCEL|IGNORE|NO|OK|RETRY|YES)|MB_(?:ABORTRETRYIGNORE|DEFBUTTON1|DEFBUTTON2|DEFBUTTON3|DEFBUTTON4|ICONEXCLAMATION|ICONINFORMATION|ICONQUESTION|ICONSTOP|OK|OKCANCEL|RETRYCANCEL|RIGHT|RTLREADING|SETFOREGROUND|TOPMOST|USERICON|YESNO)|NORMAL|OFFLINE|READONLY|SHCTX|SHELL_CONTEXT|SYSTEM|TEMPORARY|admin|all|auto|both|colored|false|force|hide|highest|lastused|leave|listonly|none|normal|notset|off|on|open|print|show|silent|silentlog|smooth|textonly|true|user)\b/, 'constant': /\$\{[\w\.:\^-]+\}|\$\([\w\.:\^-]+\)/i, 'variable': /\$\w+/i, 'number': /\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/, 'operator': /--?|\+\+?|<=?|>=?|==?=?|&&?|\|\|?|[?*\/~^%]/, 'punctuation': /[{}[\];(),.:]/, 'important': { - pattern: /(^[\t ]*)!(?:addincludedir|addplugindir|appendfile|cd|define|delfile|echo|else|endif|error|execute|finalize|getdllversion|gettlbversion|ifdef|ifmacrodef|ifmacrondef|ifndef|if|include|insertmacro|macroend|macro|makensis|packhdr|pragma|searchparse|searchreplace|system|tempfile|undef|verbose|warning)\b/im, + pattern: /(^[\t ]*)!(?:addincludedir|addplugindir|appendfile|cd|define|delfile|echo|else|endif|error|execute|finalize|getdllversion|gettlbversion|if|ifdef|ifmacrodef|ifmacrondef|ifndef|include|insertmacro|macro|macroend|makensis|packhdr|pragma|searchparse|searchreplace|system|tempfile|undef|verbose|warning)\b/im, lookbehind: true } }; diff --git a/components/prism-nsis.min.js b/components/prism-nsis.min.js index afc66d5db6..2af392cdf4 100644 --- a/components/prism-nsis.min.js +++ b/components/prism-nsis.min.js @@ -1 +1 @@ -Prism.languages.nsis={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|[#;].*)/,lookbehind:!0},string:{pattern:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0},keyword:{pattern:/(^[\t ]*)(?:Abort|Add(?:BrandingImage|Size)|AdvSplash|Allow(?:RootDirInstall|SkipFiles)|AutoCloseWindow|Banner|BG(?:Font|Gradient|Image)|BrandingText|BringToFront|Call(?:InstDLL)?|Caption|ChangeUI|CheckBitmap|ClearErrors|CompletedText|ComponentText|CopyFiles|CRCCheck|Create(?:Directory|Font|ShortCut)|Delete(?:INISec|INIStr|RegKey|RegValue)?|Detail(?:Print|sButtonText)|Dialer|Dir(?:Text|Var|Verify)|EnableWindow|Enum(?:RegKey|RegValue)|Exch|Exec(?:Shell(?:Wait)?|Wait)?|ExpandEnvStrings|File(?:BufSize|Close|ErrorText|Open|Read|ReadByte|ReadUTF16LE|ReadWord|WriteUTF16LE|Seek|Write|WriteByte|WriteWord)?|Find(?:Close|First|Next|Window)|FlushINI|Get(?:CurInstType|CurrentAddress|DlgItem|DLLVersion(?:Local)?|ErrorLevel|FileTime(?:Local)?|FullPathName|Function(?:Address|End)?|InstDirError|LabelAddress|TempFileName)|Goto|HideWindow|Icon|If(?:Abort|Errors|FileExists|RebootFlag|Silent)|InitPluginsDir|Install(?:ButtonText|Colors|Dir(?:RegKey)?)|InstProgressFlags|Inst(?:Type(?:GetText|SetText)?)|Int(?:64|Ptr)?CmpU?|Int(?:64)?Fmt|Int(?:Ptr)?Op|IsWindow|Lang(?:DLL|String)|License(?:BkColor|Data|ForceSelection|LangString|Text)|LoadLanguageFile|LockWindow|Log(?:Set|Text)|Manifest(?:DPIAware|SupportedOS)|Math|MessageBox|MiscButtonText|Name|Nop|ns(?:Dialogs|Exec)|NSISdl|OutFile|Page(?:Callbacks)?|PE(?:DllCharacteristics|SubsysVer)|Pop|Push|Quit|Read(?:EnvStr|INIStr|RegDWORD|RegStr)|Reboot|RegDLL|Rename|RequestExecutionLevel|ReserveFile|Return|RMDir|SearchPath|Section(?:End|GetFlags|GetInstTypes|GetSize|GetText|Group|In|SetFlags|SetInstTypes|SetSize|SetText)?|SendMessage|Set(?:AutoClose|BrandingImage|Compress|Compressor(?:DictSize)?|CtlColors|CurInstType|DatablockOptimize|DateSave|Details(?:Print|View)|ErrorLevel|Errors|FileAttributes|Font|OutPath|Overwrite|PluginUnload|RebootFlag|RegView|ShellVarContext|Silent)|Show(?:InstDetails|UninstDetails|Window)|Silent(?:Install|UnInstall)|Sleep|SpaceTexts|Splash|StartMenu|Str(?:CmpS?|Cpy|Len)|SubCaption|System|Unicode|Uninstall(?:ButtonText|Caption|Icon|SubCaption|Text)|UninstPage|UnRegDLL|UserInfo|Var|VI(?:AddVersionKey|FileVersion|ProductVersion)|VPatch|WindowIcon|Write(?:INIStr|Reg(?:Bin|DWORD|ExpandStr|MultiStr|None|Str)|Uninstaller)|XPStyle)\b/m,lookbehind:!0},property:/\b(?:admin|all|auto|both|colored|false|force|hide|highest|lastused|leave|listonly|none|normal|notset|off|on|open|print|show|silent|silentlog|smooth|textonly|true|user|ARCHIVE|FILE_(?:ATTRIBUTE_ARCHIVE|ATTRIBUTE_NORMAL|ATTRIBUTE_OFFLINE|ATTRIBUTE_READONLY|ATTRIBUTE_SYSTEM|ATTRIBUTE_TEMPORARY)|HK(?:(?:CR|CU|LM)(?:32|64)?|DD|PD|U)|HKEY_(?:CLASSES_ROOT|CURRENT_CONFIG|CURRENT_USER|DYN_DATA|LOCAL_MACHINE|PERFORMANCE_DATA|USERS)|ID(?:ABORT|CANCEL|IGNORE|NO|OK|RETRY|YES)|MB_(?:ABORTRETRYIGNORE|DEFBUTTON1|DEFBUTTON2|DEFBUTTON3|DEFBUTTON4|ICONEXCLAMATION|ICONINFORMATION|ICONQUESTION|ICONSTOP|OK|OKCANCEL|RETRYCANCEL|RIGHT|RTLREADING|SETFOREGROUND|TOPMOST|USERICON|YESNO)|NORMAL|OFFLINE|READONLY|SHCTX|SHELL_CONTEXT|SYSTEM|TEMPORARY)\b/,constant:/\$\{[\w\.:\^-]+\}|\$\([\w\.:\^-]+\)/i,variable:/\$\w+/i,number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--?|\+\+?|<=?|>=?|==?=?|&&?|\|\|?|[?*\/~^%]/,punctuation:/[{}[\];(),.:]/,important:{pattern:/(^[\t ]*)!(?:addincludedir|addplugindir|appendfile|cd|define|delfile|echo|else|endif|error|execute|finalize|getdllversion|gettlbversion|ifdef|ifmacrodef|ifmacrondef|ifndef|if|include|insertmacro|macroend|macro|makensis|packhdr|pragma|searchparse|searchreplace|system|tempfile|undef|verbose|warning)\b/im,lookbehind:!0}}; \ No newline at end of file +Prism.languages.nsis={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|[#;].*)/,lookbehind:!0},string:{pattern:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0},keyword:{pattern:/(^[\t ]*)(?:Abort|Add(?:BrandingImage|Size)|AdvSplash|Allow(?:RootDirInstall|SkipFiles)|AutoCloseWindow|BG(?:Font|Gradient|Image)|Banner|BrandingText|BringToFront|CRCCheck|Call(?:InstDLL)?|Caption|ChangeUI|CheckBitmap|ClearErrors|CompletedText|ComponentText|CopyFiles|Create(?:Directory|Font|ShortCut)|Delete(?:INISec|INIStr|RegKey|RegValue)?|Detail(?:Print|sButtonText)|Dialer|Dir(?:Text|Var|Verify)|EnableWindow|Enum(?:RegKey|RegValue)|Exch|Exec(?:Shell(?:Wait)?|Wait)?|ExpandEnvStrings|File(?:BufSize|Close|ErrorText|Open|Read|ReadByte|ReadUTF16LE|ReadWord|Seek|Write|WriteByte|WriteUTF16LE|WriteWord)?|Find(?:Close|First|Next|Window)|FlushINI|Get(?:CurInstType|CurrentAddress|DLLVersion(?:Local)?|DlgItem|ErrorLevel|FileTime(?:Local)?|FullPathName|Function(?:Address|End)?|InstDirError|LabelAddress|TempFileName)|Goto|HideWindow|Icon|If(?:Abort|Errors|FileExists|RebootFlag|Silent)|InitPluginsDir|InstProgressFlags|Inst(?:Type(?:GetText|SetText)?)|Install(?:ButtonText|Colors|Dir(?:RegKey)?)|Int(?:64|Ptr)?CmpU?|Int(?:64)?Fmt|Int(?:Ptr)?Op|IsWindow|Lang(?:DLL|String)|License(?:BkColor|Data|ForceSelection|LangString|Text)|LoadLanguageFile|LockWindow|Log(?:Set|Text)|Manifest(?:DPIAware|SupportedOS)|Math|MessageBox|MiscButtonText|NSISdl|Name|Nop|OutFile|PE(?:DllCharacteristics|SubsysVer)|Page(?:Callbacks)?|Pop|Push|Quit|RMDir|Read(?:EnvStr|INIStr|RegDWORD|RegStr)|Reboot|RegDLL|Rename|RequestExecutionLevel|ReserveFile|Return|SearchPath|Section(?:End|GetFlags|GetInstTypes|GetSize|GetText|Group|In|SetFlags|SetInstTypes|SetSize|SetText)?|SendMessage|Set(?:AutoClose|BrandingImage|Compress|Compressor(?:DictSize)?|CtlColors|CurInstType|DatablockOptimize|DateSave|Details(?:Print|View)|ErrorLevel|Errors|FileAttributes|Font|OutPath|Overwrite|PluginUnload|RebootFlag|RegView|ShellVarContext|Silent)|Show(?:InstDetails|UninstDetails|Window)|Silent(?:Install|UnInstall)|Sleep|SpaceTexts|Splash|StartMenu|Str(?:CmpS?|Cpy|Len)|SubCaption|System|UnRegDLL|Unicode|UninstPage|Uninstall(?:ButtonText|Caption|Icon|SubCaption|Text)|UserInfo|VI(?:AddVersionKey|FileVersion|ProductVersion)|VPatch|Var|WindowIcon|Write(?:INIStr|Reg(?:Bin|DWORD|ExpandStr|MultiStr|None|Str)|Uninstaller)|XPStyle|ns(?:Dialogs|Exec))\b/m,lookbehind:!0},property:/\b(?:ARCHIVE|FILE_(?:ATTRIBUTE_ARCHIVE|ATTRIBUTE_NORMAL|ATTRIBUTE_OFFLINE|ATTRIBUTE_READONLY|ATTRIBUTE_SYSTEM|ATTRIBUTE_TEMPORARY)|HK(?:(?:CR|CU|LM)(?:32|64)?|DD|PD|U)|HKEY_(?:CLASSES_ROOT|CURRENT_CONFIG|CURRENT_USER|DYN_DATA|LOCAL_MACHINE|PERFORMANCE_DATA|USERS)|ID(?:ABORT|CANCEL|IGNORE|NO|OK|RETRY|YES)|MB_(?:ABORTRETRYIGNORE|DEFBUTTON1|DEFBUTTON2|DEFBUTTON3|DEFBUTTON4|ICONEXCLAMATION|ICONINFORMATION|ICONQUESTION|ICONSTOP|OK|OKCANCEL|RETRYCANCEL|RIGHT|RTLREADING|SETFOREGROUND|TOPMOST|USERICON|YESNO)|NORMAL|OFFLINE|READONLY|SHCTX|SHELL_CONTEXT|SYSTEM|TEMPORARY|admin|all|auto|both|colored|false|force|hide|highest|lastused|leave|listonly|none|normal|notset|off|on|open|print|show|silent|silentlog|smooth|textonly|true|user)\b/,constant:/\$\{[\w\.:\^-]+\}|\$\([\w\.:\^-]+\)/i,variable:/\$\w+/i,number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--?|\+\+?|<=?|>=?|==?=?|&&?|\|\|?|[?*\/~^%]/,punctuation:/[{}[\];(),.:]/,important:{pattern:/(^[\t ]*)!(?:addincludedir|addplugindir|appendfile|cd|define|delfile|echo|else|endif|error|execute|finalize|getdllversion|gettlbversion|if|ifdef|ifmacrodef|ifmacrondef|ifndef|include|insertmacro|macro|macroend|makensis|packhdr|pragma|searchparse|searchreplace|system|tempfile|undef|verbose|warning)\b/im,lookbehind:!0}}; \ No newline at end of file diff --git a/components/prism-objectivec.js b/components/prism-objectivec.js index ace801b5da..412ab7f331 100644 --- a/components/prism-objectivec.js +++ b/components/prism-objectivec.js @@ -1,6 +1,6 @@ Prism.languages.objectivec = Prism.languages.extend('c', { 'string': /("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1|@"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/, - 'keyword': /\b(?:asm|typeof|inline|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|union|unsigned|void|volatile|while|in|self|super)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/, + 'keyword': /\b(?:asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|in|inline|int|long|register|return|self|short|signed|sizeof|static|struct|super|switch|typedef|typeof|union|unsigned|void|volatile|while)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/, 'operator': /-[->]?|\+\+?|!=?|<>?=?|==?|&&?|\|\|?|[~^%?*\/@]/ }); diff --git a/components/prism-objectivec.min.js b/components/prism-objectivec.min.js index e72285bb3e..75763b2df1 100644 --- a/components/prism-objectivec.min.js +++ b/components/prism-objectivec.min.js @@ -1 +1 @@ -Prism.languages.objectivec=Prism.languages.extend("c",{string:/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1|@"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,keyword:/\b(?:asm|typeof|inline|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|union|unsigned|void|volatile|while|in|self|super)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/,operator:/-[->]?|\+\+?|!=?|<>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}),delete Prism.languages.objectivec["class-name"],Prism.languages.objc=Prism.languages.objectivec; \ No newline at end of file +Prism.languages.objectivec=Prism.languages.extend("c",{string:/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1|@"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,keyword:/\b(?:asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|in|inline|int|long|register|return|self|short|signed|sizeof|static|struct|super|switch|typedef|typeof|union|unsigned|void|volatile|while)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/,operator:/-[->]?|\+\+?|!=?|<>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}),delete Prism.languages.objectivec["class-name"],Prism.languages.objc=Prism.languages.objectivec; \ No newline at end of file diff --git a/components/prism-opencl.js b/components/prism-opencl.js index 4bb4b6f8b2..f4b9de851d 100644 --- a/components/prism-opencl.js +++ b/components/prism-opencl.js @@ -2,14 +2,14 @@ /* OpenCL kernel language */ Prism.languages.opencl = Prism.languages.extend('c', { // Extracted from the official specs (2.0) and http://streamcomputing.eu/downloads/?opencl.lang (opencl-keywords, opencl-types) and http://sourceforge.net/tracker/?func=detail&aid=2957794&group_id=95717&atid=612384 (Words2, partly Words3) - 'keyword': /\b(?:__attribute__|(?:__)?(?:constant|global|kernel|local|private|read_only|read_write|write_only)|auto|break|case|complex|const|continue|default|do|(?:float|double)(?:16(?:x(?:1|16|2|4|8))?|1x(?:1|16|2|4|8)|2(?:x(?:1|16|2|4|8))?|3|4(?:x(?:1|16|2|4|8))?|8(?:x(?:1|16|2|4|8))?)?|else|enum|extern|for|goto|(?:u?(?:char|short|int|long)|half|quad|bool)(?:2|3|4|8|16)?|if|imaginary|inline|packed|pipe|register|restrict|return|signed|sizeof|static|struct|switch|typedef|uniform|union|unsigned|void|volatile|while)\b/, + 'keyword': /\b(?:(?:__)?(?:constant|global|kernel|local|private|read_only|read_write|write_only)|__attribute__|auto|(?:bool|u?(?:char|int|long|short)|half|quad)(?:2|3|4|8|16)?|break|case|complex|const|continue|(?:double|float)(?:16(?:x(?:1|2|4|8|16))?|1x(?:1|2|4|8|16)|2(?:x(?:1|2|4|8|16))?|3|4(?:x(?:1|2|4|8|16))?|8(?:x(?:1|2|4|8|16))?)?|default|do|else|enum|extern|for|goto|if|imaginary|inline|packed|pipe|register|restrict|return|signed|sizeof|static|struct|switch|typedef|uniform|union|unsigned|void|volatile|while)\b/, // Extracted from http://streamcomputing.eu/downloads/?opencl.lang (opencl-const) // Math Constants: https://www.khronos.org/registry/OpenCL/sdk/2.1/docs/man/xhtml/mathConstants.html // Macros and Limits: https://www.khronos.org/registry/OpenCL/sdk/2.1/docs/man/xhtml/macroLimits.html 'number': /(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[fuhl]{0,4}/i, 'boolean': /\b(?:false|true)\b/, 'constant-opencl-kernel': { - pattern: /\b(?:CHAR_(?:BIT|MAX|MIN)|CLK_(?:ADDRESS_(?:CLAMP(?:_TO_EDGE)?|NONE|REPEAT)|FILTER_(?:LINEAR|NEAREST)|(?:LOCAL|GLOBAL)_MEM_FENCE|NORMALIZED_COORDS_(?:FALSE|TRUE))|CL_(?:BGRA|(?:HALF_)?FLOAT|INTENSITY|LUMINANCE|A?R?G?B?[Ax]?|(?:(?:UN)?SIGNED|[US]NORM)_(?:INT(?:8|16|32))|UNORM_(?:INT_101010|SHORT_(?:555|565)))|(?:DBL|FLT|HALF)_(?:DIG|EPSILON|MANT_DIG|(?:MIN|MAX)(?:(?:_10)?_EXP)?)|FLT_RADIX|HUGE_VALF?|INFINITY|(?:INT|LONG|SCHAR|SHRT)_(?:MAX|MIN)|(?:UCHAR|USHRT|UINT|ULONG)_MAX|MAXFLOAT|M_(?:[12]_PI|2_SQRTPI|E|LN(?:2|10)|LOG(?:10|2)E?|PI(?:_[24])?|SQRT(?:1_2|2))(?:_F|_H)?|NAN)\b/, + pattern: /\b(?:CHAR_(?:BIT|MAX|MIN)|CLK_(?:ADDRESS_(?:CLAMP(?:_TO_EDGE)?|NONE|REPEAT)|FILTER_(?:LINEAR|NEAREST)|(?:GLOBAL|LOCAL)_MEM_FENCE|NORMALIZED_COORDS_(?:FALSE|TRUE))|CL_(?:BGRA|(?:HALF_)?FLOAT|INTENSITY|LUMINANCE|A?R?G?B?[Ax]?|(?:(?:UN)?SIGNED|[US]NORM)_(?:INT(?:8|16|32))|UNORM_(?:INT_101010|SHORT_(?:555|565)))|(?:DBL|FLT|HALF)_(?:DIG|EPSILON|(?:MAX|MIN)(?:(?:_10)?_EXP)?|MANT_DIG)|FLT_RADIX|HUGE_VALF?|(?:INT|LONG|SCHAR|SHRT)_(?:MAX|MIN)|INFINITY|MAXFLOAT|M_(?:[12]_PI|2_SQRTPI|E|LN(?:2|10)|LOG(?:2|10)E?|PI(?:_[24])?|SQRT(?:1_2|2))(?:_F|_H)?|NAN|(?:UCHAR|UINT|ULONG|USHRT)_MAX)\b/, alias: 'constant' } }); @@ -26,21 +26,21 @@ var attributes = { // Extracted from http://streamcomputing.eu/downloads/?opencl_host.lang (opencl-types and opencl-host) 'type-opencl-host': { - pattern: /\b(?:cl_(?:GLenum|GLint|GLuin|addressing_mode|bitfield|bool|buffer_create_type|build_status|channel_(?:order|type)|(?:u?(?:char|short|int|long)|float|double)(?:2|3|4|8|16)?|command_(?:queue(?:_info|_properties)?|type)|context(?:_info|_properties)?|device_(?:exec_capabilities|fp_config|id|info|local_mem_type|mem_cache_type|type)|(?:event|sampler)(?:_info)?|filter_mode|half|image_info|kernel(?:_info|_work_group_info)?|map_flags|mem(?:_flags|_info|_object_type)?|platform_(?:id|info)|profiling_info|program(?:_build_info|_info)?))\b/, + pattern: /\b(?:cl_(?:GLenum|GLint|GLuin|addressing_mode|bitfield|bool|buffer_create_type|build_status|channel_(?:order|type)|(?:u?(?:char|int|long|short)|double|float)(?:2|3|4|8|16)?|command_(?:queue(?:_info|_properties)?|type)|context(?:_info|_properties)?|device_(?:exec_capabilities|fp_config|id|info|local_mem_type|mem_cache_type|type)|(?:event|sampler)(?:_info)?|filter_mode|half|image_info|kernel(?:_info|_work_group_info)?|map_flags|mem(?:_flags|_info|_object_type)?|platform_(?:id|info)|profiling_info|program(?:_build_info|_info)?))\b/, alias: 'keyword' }, 'boolean-opencl-host': { - pattern: /\bCL_(?:TRUE|FALSE)\b/, + pattern: /\bCL_(?:FALSE|TRUE)\b/, alias: 'boolean' }, // Extracted from cl.h (2.0) and http://streamcomputing.eu/downloads/?opencl_host.lang (opencl-const) 'constant-opencl-host': { - pattern: /\bCL_(?:A|ABGR|ADDRESS_(?:CLAMP(?:_TO_EDGE)?|MIRRORED_REPEAT|NONE|REPEAT)|ARGB|BGRA|BLOCKING|BUFFER_CREATE_TYPE_REGION|BUILD_(?:ERROR|IN_PROGRESS|NONE|PROGRAM_FAILURE|SUCCESS)|COMMAND_(?:ACQUIRE_GL_OBJECTS|BARRIER|COPY_(?:BUFFER(?:_RECT|_TO_IMAGE)?|IMAGE(?:_TO_BUFFER)?)|FILL_(?:BUFFER|IMAGE)|MAP(?:_BUFFER|_IMAGE)|MARKER|MIGRATE(?:_SVM)?_MEM_OBJECTS|NATIVE_KERNEL|NDRANGE_KERNEL|READ_(?:BUFFER(?:_RECT)?|IMAGE)|RELEASE_GL_OBJECTS|SVM_(?:FREE|MAP|MEMCPY|MEMFILL|UNMAP)|TASK|UNMAP_MEM_OBJECT|USER|WRITE_(?:BUFFER(?:_RECT)?|IMAGE))|COMPILER_NOT_AVAILABLE|COMPILE_PROGRAM_FAILURE|COMPLETE|CONTEXT_(?:DEVICES|INTEROP_USER_SYNC|NUM_DEVICES|PLATFORM|PROPERTIES|REFERENCE_COUNT)|DEPTH(?:_STENCIL)?|DEVICE_(?:ADDRESS_BITS|AFFINITY_DOMAIN_(?:L[1-4]_CACHE|NEXT_PARTITIONABLE|NUMA)|AVAILABLE|BUILT_IN_KERNELS|COMPILER_AVAILABLE|DOUBLE_FP_CONFIG|ENDIAN_LITTLE|ERROR_CORRECTION_SUPPORT|EXECUTION_CAPABILITIES|EXTENSIONS|GLOBAL_(?:MEM_(?:CACHELINE_SIZE|CACHE_SIZE|CACHE_TYPE|SIZE)|VARIABLE_PREFERRED_TOTAL_SIZE)|HOST_UNIFIED_MEMORY|IL_VERSION|IMAGE(?:2D_MAX_(?:HEIGHT|WIDTH)|3D_MAX_(?:DEPTH|HEIGHT|WIDTH)|_BASE_ADDRESS_ALIGNMENT|_MAX_ARRAY_SIZE|_MAX_BUFFER_SIZE|_PITCH_ALIGNMENT|_SUPPORT)|LINKER_AVAILABLE|LOCAL_MEM_SIZE|LOCAL_MEM_TYPE|MAX_(?:CLOCK_FREQUENCY|COMPUTE_UNITS|CONSTANT_ARGS|CONSTANT_BUFFER_SIZE|GLOBAL_VARIABLE_SIZE|MEM_ALLOC_SIZE|NUM_SUB_GROUPS|ON_DEVICE_(?:EVENTS|QUEUES)|PARAMETER_SIZE|PIPE_ARGS|READ_IMAGE_ARGS|READ_WRITE_IMAGE_ARGS|SAMPLERS|WORK_GROUP_SIZE|WORK_ITEM_DIMENSIONS|WORK_ITEM_SIZES|WRITE_IMAGE_ARGS)|MEM_BASE_ADDR_ALIGN|MIN_DATA_TYPE_ALIGN_SIZE|NAME|NATIVE_VECTOR_WIDTH_(?:CHAR|DOUBLE|FLOAT|HALF|INT|LONG|SHORT)|NOT_(?:AVAILABLE|FOUND)|OPENCL_C_VERSION|PARENT_DEVICE|PARTITION_(?:AFFINITY_DOMAIN|BY_AFFINITY_DOMAIN|BY_COUNTS|BY_COUNTS_LIST_END|EQUALLY|FAILED|MAX_SUB_DEVICES|PROPERTIES|TYPE)|PIPE_MAX_(?:ACTIVE_RESERVATIONS|PACKET_SIZE)|PLATFORM|PREFERRED_(?:GLOBAL_ATOMIC_ALIGNMENT|INTEROP_USER_SYNC|LOCAL_ATOMIC_ALIGNMENT|PLATFORM_ATOMIC_ALIGNMENT|VECTOR_WIDTH_(?:CHAR|DOUBLE|FLOAT|HALF|INT|LONG|SHORT))|PRINTF_BUFFER_SIZE|PROFILE|PROFILING_TIMER_RESOLUTION|QUEUE_(?:ON_(?:DEVICE_(?:MAX_SIZE|PREFERRED_SIZE|PROPERTIES)|HOST_PROPERTIES)|PROPERTIES)|REFERENCE_COUNT|SINGLE_FP_CONFIG|SUB_GROUP_INDEPENDENT_FORWARD_PROGRESS|SVM_(?:ATOMICS|CAPABILITIES|COARSE_GRAIN_BUFFER|FINE_GRAIN_BUFFER|FINE_GRAIN_SYSTEM)|TYPE(?:_ACCELERATOR|_ALL|_CPU|_CUSTOM|_DEFAULT|_GPU)?|VENDOR(?:_ID)?|VERSION)|DRIVER_VERSION|EVENT_(?:COMMAND_(?:EXECUTION_STATUS|QUEUE|TYPE)|CONTEXT|REFERENCE_COUNT)|EXEC_(?:KERNEL|NATIVE_KERNEL|STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST)|FILTER_(?:LINEAR|NEAREST)|FLOAT|FP_(?:CORRECTLY_ROUNDED_DIVIDE_SQRT|DENORM|FMA|INF_NAN|ROUND_TO_INF|ROUND_TO_NEAREST|ROUND_TO_ZERO|SOFT_FLOAT)|GLOBAL|HALF_FLOAT|IMAGE_(?:ARRAY_SIZE|BUFFER|DEPTH|ELEMENT_SIZE|FORMAT|FORMAT_MISMATCH|FORMAT_NOT_SUPPORTED|HEIGHT|NUM_MIP_LEVELS|NUM_SAMPLES|ROW_PITCH|SLICE_PITCH|WIDTH)|INTENSITY|INVALID_(?:ARG_INDEX|ARG_SIZE|ARG_VALUE|BINARY|BUFFER_SIZE|BUILD_OPTIONS|COMMAND_QUEUE|COMPILER_OPTIONS|CONTEXT|DEVICE|DEVICE_PARTITION_COUNT|DEVICE_QUEUE|DEVICE_TYPE|EVENT|EVENT_WAIT_LIST|GLOBAL_OFFSET|GLOBAL_WORK_SIZE|GL_OBJECT|HOST_PTR|IMAGE_DESCRIPTOR|IMAGE_FORMAT_DESCRIPTOR|IMAGE_SIZE|KERNEL|KERNEL_ARGS|KERNEL_DEFINITION|KERNEL_NAME|LINKER_OPTIONS|MEM_OBJECT|MIP_LEVEL|OPERATION|PIPE_SIZE|PLATFORM|PROGRAM|PROGRAM_EXECUTABLE|PROPERTY|QUEUE_PROPERTIES|SAMPLER|VALUE|WORK_DIMENSION|WORK_GROUP_SIZE|WORK_ITEM_SIZE)|KERNEL_(?:ARG_(?:ACCESS_(?:NONE|QUALIFIER|READ_ONLY|READ_WRITE|WRITE_ONLY)|ADDRESS_(?:CONSTANT|GLOBAL|LOCAL|PRIVATE|QUALIFIER)|INFO_NOT_AVAILABLE|NAME|TYPE_(?:CONST|NAME|NONE|PIPE|QUALIFIER|RESTRICT|VOLATILE))|ATTRIBUTES|COMPILE_NUM_SUB_GROUPS|COMPILE_WORK_GROUP_SIZE|CONTEXT|EXEC_INFO_SVM_FINE_GRAIN_SYSTEM|EXEC_INFO_SVM_PTRS|FUNCTION_NAME|GLOBAL_WORK_SIZE|LOCAL_MEM_SIZE|LOCAL_SIZE_FOR_SUB_GROUP_COUNT|MAX_NUM_SUB_GROUPS|MAX_SUB_GROUP_SIZE_FOR_NDRANGE|NUM_ARGS|PREFERRED_WORK_GROUP_SIZE_MULTIPLE|PRIVATE_MEM_SIZE|PROGRAM|REFERENCE_COUNT|SUB_GROUP_COUNT_FOR_NDRANGE|WORK_GROUP_SIZE)|LINKER_NOT_AVAILABLE|LINK_PROGRAM_FAILURE|LOCAL|LUMINANCE|MAP_(?:FAILURE|READ|WRITE|WRITE_INVALIDATE_REGION)|MEM_(?:ALLOC_HOST_PTR|ASSOCIATED_MEMOBJECT|CONTEXT|COPY_HOST_PTR|COPY_OVERLAP|FLAGS|HOST_NO_ACCESS|HOST_PTR|HOST_READ_ONLY|HOST_WRITE_ONLY|KERNEL_READ_AND_WRITE|MAP_COUNT|OBJECT_(?:ALLOCATION_FAILURE|BUFFER|IMAGE1D|IMAGE1D_ARRAY|IMAGE1D_BUFFER|IMAGE2D|IMAGE2D_ARRAY|IMAGE3D|PIPE)|OFFSET|READ_ONLY|READ_WRITE|REFERENCE_COUNT|SIZE|SVM_ATOMICS|SVM_FINE_GRAIN_BUFFER|TYPE|USES_SVM_POINTER|USE_HOST_PTR|WRITE_ONLY)|MIGRATE_MEM_OBJECT_(?:CONTENT_UNDEFINED|HOST)|MISALIGNED_SUB_BUFFER_OFFSET|NONE|NON_BLOCKING|OUT_OF_(?:HOST_MEMORY|RESOURCES)|PIPE_(?:MAX_PACKETS|PACKET_SIZE)|PLATFORM_(?:EXTENSIONS|HOST_TIMER_RESOLUTION|NAME|PROFILE|VENDOR|VERSION)|PROFILING_(?:COMMAND_(?:COMPLETE|END|QUEUED|START|SUBMIT)|INFO_NOT_AVAILABLE)|PROGRAM_(?:BINARIES|BINARY_SIZES|BINARY_TYPE(?:_COMPILED_OBJECT|_EXECUTABLE|_LIBRARY|_NONE)?|BUILD_(?:GLOBAL_VARIABLE_TOTAL_SIZE|LOG|OPTIONS|STATUS)|CONTEXT|DEVICES|IL|KERNEL_NAMES|NUM_DEVICES|NUM_KERNELS|REFERENCE_COUNT|SOURCE)|QUEUED|QUEUE_(?:CONTEXT|DEVICE|DEVICE_DEFAULT|ON_DEVICE|ON_DEVICE_DEFAULT|OUT_OF_ORDER_EXEC_MODE_ENABLE|PROFILING_ENABLE|PROPERTIES|REFERENCE_COUNT|SIZE)|R|RA|READ_(?:ONLY|WRITE)_CACHE|RG|RGB|RGBA|RGBx|RGx|RUNNING|Rx|SAMPLER_(?:ADDRESSING_MODE|CONTEXT|FILTER_MODE|LOD_MAX|LOD_MIN|MIP_FILTER_MODE|NORMALIZED_COORDS|REFERENCE_COUNT)|(?:UN)?SIGNED_INT(?:8|16|32)|SNORM_INT(?:8|16)|SUBMITTED|SUCCESS|UNORM_INT(?:16|24|8|_101010|_101010_2)|UNORM_SHORT_(?:555|565)|VERSION_(?:1_0|1_1|1_2|2_0|2_1)|sBGRA|sRGB|sRGBA|sRGBx)\b/, + pattern: /\bCL_(?:A|ABGR|ADDRESS_(?:CLAMP(?:_TO_EDGE)?|MIRRORED_REPEAT|NONE|REPEAT)|ARGB|BGRA|BLOCKING|BUFFER_CREATE_TYPE_REGION|BUILD_(?:ERROR|IN_PROGRESS|NONE|PROGRAM_FAILURE|SUCCESS)|COMMAND_(?:ACQUIRE_GL_OBJECTS|BARRIER|COPY_(?:BUFFER(?:_RECT|_TO_IMAGE)?|IMAGE(?:_TO_BUFFER)?)|FILL_(?:BUFFER|IMAGE)|MAP(?:_BUFFER|_IMAGE)|MARKER|MIGRATE(?:_SVM)?_MEM_OBJECTS|NATIVE_KERNEL|NDRANGE_KERNEL|READ_(?:BUFFER(?:_RECT)?|IMAGE)|RELEASE_GL_OBJECTS|SVM_(?:FREE|MAP|MEMCPY|MEMFILL|UNMAP)|TASK|UNMAP_MEM_OBJECT|USER|WRITE_(?:BUFFER(?:_RECT)?|IMAGE))|COMPILER_NOT_AVAILABLE|COMPILE_PROGRAM_FAILURE|COMPLETE|CONTEXT_(?:DEVICES|INTEROP_USER_SYNC|NUM_DEVICES|PLATFORM|PROPERTIES|REFERENCE_COUNT)|DEPTH(?:_STENCIL)?|DEVICE_(?:ADDRESS_BITS|AFFINITY_DOMAIN_(?:L[1-4]_CACHE|NEXT_PARTITIONABLE|NUMA)|AVAILABLE|BUILT_IN_KERNELS|COMPILER_AVAILABLE|DOUBLE_FP_CONFIG|ENDIAN_LITTLE|ERROR_CORRECTION_SUPPORT|EXECUTION_CAPABILITIES|EXTENSIONS|GLOBAL_(?:MEM_(?:CACHELINE_SIZE|CACHE_SIZE|CACHE_TYPE|SIZE)|VARIABLE_PREFERRED_TOTAL_SIZE)|HOST_UNIFIED_MEMORY|IL_VERSION|IMAGE(?:2D_MAX_(?:HEIGHT|WIDTH)|3D_MAX_(?:DEPTH|HEIGHT|WIDTH)|_BASE_ADDRESS_ALIGNMENT|_MAX_ARRAY_SIZE|_MAX_BUFFER_SIZE|_PITCH_ALIGNMENT|_SUPPORT)|LINKER_AVAILABLE|LOCAL_MEM_SIZE|LOCAL_MEM_TYPE|MAX_(?:CLOCK_FREQUENCY|COMPUTE_UNITS|CONSTANT_ARGS|CONSTANT_BUFFER_SIZE|GLOBAL_VARIABLE_SIZE|MEM_ALLOC_SIZE|NUM_SUB_GROUPS|ON_DEVICE_(?:EVENTS|QUEUES)|PARAMETER_SIZE|PIPE_ARGS|READ_IMAGE_ARGS|READ_WRITE_IMAGE_ARGS|SAMPLERS|WORK_GROUP_SIZE|WORK_ITEM_DIMENSIONS|WORK_ITEM_SIZES|WRITE_IMAGE_ARGS)|MEM_BASE_ADDR_ALIGN|MIN_DATA_TYPE_ALIGN_SIZE|NAME|NATIVE_VECTOR_WIDTH_(?:CHAR|DOUBLE|FLOAT|HALF|INT|LONG|SHORT)|NOT_(?:AVAILABLE|FOUND)|OPENCL_C_VERSION|PARENT_DEVICE|PARTITION_(?:AFFINITY_DOMAIN|BY_AFFINITY_DOMAIN|BY_COUNTS|BY_COUNTS_LIST_END|EQUALLY|FAILED|MAX_SUB_DEVICES|PROPERTIES|TYPE)|PIPE_MAX_(?:ACTIVE_RESERVATIONS|PACKET_SIZE)|PLATFORM|PREFERRED_(?:GLOBAL_ATOMIC_ALIGNMENT|INTEROP_USER_SYNC|LOCAL_ATOMIC_ALIGNMENT|PLATFORM_ATOMIC_ALIGNMENT|VECTOR_WIDTH_(?:CHAR|DOUBLE|FLOAT|HALF|INT|LONG|SHORT))|PRINTF_BUFFER_SIZE|PROFILE|PROFILING_TIMER_RESOLUTION|QUEUE_(?:ON_(?:DEVICE_(?:MAX_SIZE|PREFERRED_SIZE|PROPERTIES)|HOST_PROPERTIES)|PROPERTIES)|REFERENCE_COUNT|SINGLE_FP_CONFIG|SUB_GROUP_INDEPENDENT_FORWARD_PROGRESS|SVM_(?:ATOMICS|CAPABILITIES|COARSE_GRAIN_BUFFER|FINE_GRAIN_BUFFER|FINE_GRAIN_SYSTEM)|TYPE(?:_ACCELERATOR|_ALL|_CPU|_CUSTOM|_DEFAULT|_GPU)?|VENDOR(?:_ID)?|VERSION)|DRIVER_VERSION|EVENT_(?:COMMAND_(?:EXECUTION_STATUS|QUEUE|TYPE)|CONTEXT|REFERENCE_COUNT)|EXEC_(?:KERNEL|NATIVE_KERNEL|STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST)|FILTER_(?:LINEAR|NEAREST)|FLOAT|FP_(?:CORRECTLY_ROUNDED_DIVIDE_SQRT|DENORM|FMA|INF_NAN|ROUND_TO_INF|ROUND_TO_NEAREST|ROUND_TO_ZERO|SOFT_FLOAT)|GLOBAL|HALF_FLOAT|IMAGE_(?:ARRAY_SIZE|BUFFER|DEPTH|ELEMENT_SIZE|FORMAT|FORMAT_MISMATCH|FORMAT_NOT_SUPPORTED|HEIGHT|NUM_MIP_LEVELS|NUM_SAMPLES|ROW_PITCH|SLICE_PITCH|WIDTH)|INTENSITY|INVALID_(?:ARG_INDEX|ARG_SIZE|ARG_VALUE|BINARY|BUFFER_SIZE|BUILD_OPTIONS|COMMAND_QUEUE|COMPILER_OPTIONS|CONTEXT|DEVICE|DEVICE_PARTITION_COUNT|DEVICE_QUEUE|DEVICE_TYPE|EVENT|EVENT_WAIT_LIST|GLOBAL_OFFSET|GLOBAL_WORK_SIZE|GL_OBJECT|HOST_PTR|IMAGE_DESCRIPTOR|IMAGE_FORMAT_DESCRIPTOR|IMAGE_SIZE|KERNEL|KERNEL_ARGS|KERNEL_DEFINITION|KERNEL_NAME|LINKER_OPTIONS|MEM_OBJECT|MIP_LEVEL|OPERATION|PIPE_SIZE|PLATFORM|PROGRAM|PROGRAM_EXECUTABLE|PROPERTY|QUEUE_PROPERTIES|SAMPLER|VALUE|WORK_DIMENSION|WORK_GROUP_SIZE|WORK_ITEM_SIZE)|KERNEL_(?:ARG_(?:ACCESS_(?:NONE|QUALIFIER|READ_ONLY|READ_WRITE|WRITE_ONLY)|ADDRESS_(?:CONSTANT|GLOBAL|LOCAL|PRIVATE|QUALIFIER)|INFO_NOT_AVAILABLE|NAME|TYPE_(?:CONST|NAME|NONE|PIPE|QUALIFIER|RESTRICT|VOLATILE))|ATTRIBUTES|COMPILE_NUM_SUB_GROUPS|COMPILE_WORK_GROUP_SIZE|CONTEXT|EXEC_INFO_SVM_FINE_GRAIN_SYSTEM|EXEC_INFO_SVM_PTRS|FUNCTION_NAME|GLOBAL_WORK_SIZE|LOCAL_MEM_SIZE|LOCAL_SIZE_FOR_SUB_GROUP_COUNT|MAX_NUM_SUB_GROUPS|MAX_SUB_GROUP_SIZE_FOR_NDRANGE|NUM_ARGS|PREFERRED_WORK_GROUP_SIZE_MULTIPLE|PRIVATE_MEM_SIZE|PROGRAM|REFERENCE_COUNT|SUB_GROUP_COUNT_FOR_NDRANGE|WORK_GROUP_SIZE)|LINKER_NOT_AVAILABLE|LINK_PROGRAM_FAILURE|LOCAL|LUMINANCE|MAP_(?:FAILURE|READ|WRITE|WRITE_INVALIDATE_REGION)|MEM_(?:ALLOC_HOST_PTR|ASSOCIATED_MEMOBJECT|CONTEXT|COPY_HOST_PTR|COPY_OVERLAP|FLAGS|HOST_NO_ACCESS|HOST_PTR|HOST_READ_ONLY|HOST_WRITE_ONLY|KERNEL_READ_AND_WRITE|MAP_COUNT|OBJECT_(?:ALLOCATION_FAILURE|BUFFER|IMAGE1D|IMAGE1D_ARRAY|IMAGE1D_BUFFER|IMAGE2D|IMAGE2D_ARRAY|IMAGE3D|PIPE)|OFFSET|READ_ONLY|READ_WRITE|REFERENCE_COUNT|SIZE|SVM_ATOMICS|SVM_FINE_GRAIN_BUFFER|TYPE|USES_SVM_POINTER|USE_HOST_PTR|WRITE_ONLY)|MIGRATE_MEM_OBJECT_(?:CONTENT_UNDEFINED|HOST)|MISALIGNED_SUB_BUFFER_OFFSET|NONE|NON_BLOCKING|OUT_OF_(?:HOST_MEMORY|RESOURCES)|PIPE_(?:MAX_PACKETS|PACKET_SIZE)|PLATFORM_(?:EXTENSIONS|HOST_TIMER_RESOLUTION|NAME|PROFILE|VENDOR|VERSION)|PROFILING_(?:COMMAND_(?:COMPLETE|END|QUEUED|START|SUBMIT)|INFO_NOT_AVAILABLE)|PROGRAM_(?:BINARIES|BINARY_SIZES|BINARY_TYPE(?:_COMPILED_OBJECT|_EXECUTABLE|_LIBRARY|_NONE)?|BUILD_(?:GLOBAL_VARIABLE_TOTAL_SIZE|LOG|OPTIONS|STATUS)|CONTEXT|DEVICES|IL|KERNEL_NAMES|NUM_DEVICES|NUM_KERNELS|REFERENCE_COUNT|SOURCE)|QUEUED|QUEUE_(?:CONTEXT|DEVICE|DEVICE_DEFAULT|ON_DEVICE|ON_DEVICE_DEFAULT|OUT_OF_ORDER_EXEC_MODE_ENABLE|PROFILING_ENABLE|PROPERTIES|REFERENCE_COUNT|SIZE)|R|RA|READ_(?:ONLY|WRITE)_CACHE|RG|RGB|RGBA|RGBx|RGx|RUNNING|Rx|SAMPLER_(?:ADDRESSING_MODE|CONTEXT|FILTER_MODE|LOD_MAX|LOD_MIN|MIP_FILTER_MODE|NORMALIZED_COORDS|REFERENCE_COUNT)|(?:UN)?SIGNED_INT(?:8|16|32)|SNORM_INT(?:8|16)|SUBMITTED|SUCCESS|UNORM_INT(?:8|16|24|_101010|_101010_2)|UNORM_SHORT_(?:555|565)|VERSION_(?:1_0|1_1|1_2|2_0|2_1)|sBGRA|sRGB|sRGBA|sRGBx)\b/, alias: 'constant' }, // Extracted from cl.h (2.0) and http://streamcomputing.eu/downloads/?opencl_host.lang (opencl-host) 'function-opencl-host': { - pattern: /\bcl(?:BuildProgram|CloneKernel|CompileProgram|Create(?:Buffer|CommandQueue(?:WithProperties)?|Context|ContextFromType|Image|Image2D|Image3D|Kernel|KernelsInProgram|Pipe|ProgramWith(?:Binary|BuiltInKernels|IL|Source)|Sampler|SamplerWithProperties|SubBuffer|SubDevices|UserEvent)|Enqueue(?:(?:Barrier|Marker)(?:WithWaitList)?|Copy(?:Buffer(?:Rect|ToImage)?|Image(?:ToBuffer)?)|(?:Fill|Map)(?:Buffer|Image)|MigrateMemObjects|NDRangeKernel|NativeKernel|(?:Read|Write)(?:Buffer(?:Rect)?|Image)|SVM(?:Free|Map|MemFill|Memcpy|MigrateMem|Unmap)|Task|UnmapMemObject|WaitForEvents)|Finish|Flush|Get(?:CommandQueueInfo|ContextInfo|Device(?:AndHostTimer|IDs|Info)|Event(?:Profiling)?Info|ExtensionFunctionAddress(?:ForPlatform)?|HostTimer|ImageInfo|Kernel(?:ArgInfo|Info|SubGroupInfo|WorkGroupInfo)|MemObjectInfo|PipeInfo|Platform(?:IDs|Info)|Program(?:Build)?Info|SamplerInfo|SupportedImageFormats)|LinkProgram|(?:Release|Retain)(?:CommandQueue|Context|Device|Event|Kernel|MemObject|Program|Sampler)|SVM(?:Alloc|Free)|Set(?:CommandQueueProperty|DefaultDeviceCommandQueue|EventCallback|Kernel(?:Arg(?:SVMPointer)?|ExecInfo)|Kernel|MemObjectDestructorCallback|UserEventStatus)|Unload(?:Platform)?Compiler|WaitForEvents)\b/, + pattern: /\bcl(?:BuildProgram|CloneKernel|CompileProgram|Create(?:Buffer|CommandQueue(?:WithProperties)?|Context|ContextFromType|Image|Image2D|Image3D|Kernel|KernelsInProgram|Pipe|ProgramWith(?:Binary|BuiltInKernels|IL|Source)|Sampler|SamplerWithProperties|SubBuffer|SubDevices|UserEvent)|Enqueue(?:(?:Barrier|Marker)(?:WithWaitList)?|Copy(?:Buffer(?:Rect|ToImage)?|Image(?:ToBuffer)?)|(?:Fill|Map)(?:Buffer|Image)|MigrateMemObjects|NDRangeKernel|NativeKernel|(?:Read|Write)(?:Buffer(?:Rect)?|Image)|SVM(?:Free|Map|MemFill|Memcpy|MigrateMem|Unmap)|Task|UnmapMemObject|WaitForEvents)|Finish|Flush|Get(?:CommandQueueInfo|ContextInfo|Device(?:AndHostTimer|IDs|Info)|Event(?:Profiling)?Info|ExtensionFunctionAddress(?:ForPlatform)?|HostTimer|ImageInfo|Kernel(?:ArgInfo|Info|SubGroupInfo|WorkGroupInfo)|MemObjectInfo|PipeInfo|Platform(?:IDs|Info)|Program(?:Build)?Info|SamplerInfo|SupportedImageFormats)|LinkProgram|(?:Release|Retain)(?:CommandQueue|Context|Device|Event|Kernel|MemObject|Program|Sampler)|SVM(?:Alloc|Free)|Set(?:CommandQueueProperty|DefaultDeviceCommandQueue|EventCallback|Kernel|Kernel(?:Arg(?:SVMPointer)?|ExecInfo)|MemObjectDestructorCallback|UserEventStatus)|Unload(?:Platform)?Compiler|WaitForEvents)\b/, alias: 'function' } }; @@ -52,7 +52,7 @@ if (Prism.languages.cpp) { // Extracted from doxygen class list http://github.khronos.org/OpenCL-CLHPP/annotated.html attributes['type-opencl-host-cpp'] = { - pattern: /\b(?:Buffer|BufferGL|BufferRenderGL|CommandQueue|Context|Device|DeviceCommandQueue|EnqueueArgs|Event|Image|Image1D|Image1DArray|Image1DBuffer|Image2D|Image2DArray|Image2DGL|Image3D|Image3DGL|ImageFormat|ImageGL|Kernel|KernelFunctor|LocalSpaceArg|Memory|NDRange|Pipe|Platform|Program|Sampler|SVMAllocator|SVMTraitAtomic|SVMTraitCoarse|SVMTraitFine|SVMTraitReadOnly|SVMTraitReadWrite|SVMTraitWriteOnly|UserEvent)\b/, + pattern: /\b(?:Buffer|BufferGL|BufferRenderGL|CommandQueue|Context|Device|DeviceCommandQueue|EnqueueArgs|Event|Image|Image1D|Image1DArray|Image1DBuffer|Image2D|Image2DArray|Image2DGL|Image3D|Image3DGL|ImageFormat|ImageGL|Kernel|KernelFunctor|LocalSpaceArg|Memory|NDRange|Pipe|Platform|Program|SVMAllocator|SVMTraitAtomic|SVMTraitCoarse|SVMTraitFine|SVMTraitReadOnly|SVMTraitReadWrite|SVMTraitWriteOnly|Sampler|UserEvent)\b/, alias: 'keyword' }; diff --git a/components/prism-opencl.min.js b/components/prism-opencl.min.js index fe5efb511f..bb4cb84369 100644 --- a/components/prism-opencl.min.js +++ b/components/prism-opencl.min.js @@ -1 +1 @@ -!function(E){E.languages.opencl=E.languages.extend("c",{keyword:/\b(?:__attribute__|(?:__)?(?:constant|global|kernel|local|private|read_only|read_write|write_only)|auto|break|case|complex|const|continue|default|do|(?:float|double)(?:16(?:x(?:1|16|2|4|8))?|1x(?:1|16|2|4|8)|2(?:x(?:1|16|2|4|8))?|3|4(?:x(?:1|16|2|4|8))?|8(?:x(?:1|16|2|4|8))?)?|else|enum|extern|for|goto|(?:u?(?:char|short|int|long)|half|quad|bool)(?:2|3|4|8|16)?|if|imaginary|inline|packed|pipe|register|restrict|return|signed|sizeof|static|struct|switch|typedef|uniform|union|unsigned|void|volatile|while)\b/,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[fuhl]{0,4}/i,boolean:/\b(?:false|true)\b/,"constant-opencl-kernel":{pattern:/\b(?:CHAR_(?:BIT|MAX|MIN)|CLK_(?:ADDRESS_(?:CLAMP(?:_TO_EDGE)?|NONE|REPEAT)|FILTER_(?:LINEAR|NEAREST)|(?:LOCAL|GLOBAL)_MEM_FENCE|NORMALIZED_COORDS_(?:FALSE|TRUE))|CL_(?:BGRA|(?:HALF_)?FLOAT|INTENSITY|LUMINANCE|A?R?G?B?[Ax]?|(?:(?:UN)?SIGNED|[US]NORM)_(?:INT(?:8|16|32))|UNORM_(?:INT_101010|SHORT_(?:555|565)))|(?:DBL|FLT|HALF)_(?:DIG|EPSILON|MANT_DIG|(?:MIN|MAX)(?:(?:_10)?_EXP)?)|FLT_RADIX|HUGE_VALF?|INFINITY|(?:INT|LONG|SCHAR|SHRT)_(?:MAX|MIN)|(?:UCHAR|USHRT|UINT|ULONG)_MAX|MAXFLOAT|M_(?:[12]_PI|2_SQRTPI|E|LN(?:2|10)|LOG(?:10|2)E?|PI(?:_[24])?|SQRT(?:1_2|2))(?:_F|_H)?|NAN)\b/,alias:"constant"}}),E.languages.insertBefore("opencl","class-name",{"builtin-type":{pattern:/\b(?:_cl_(?:command_queue|context|device_id|event|kernel|mem|platform_id|program|sampler)|cl_(?:image_format|mem_fence_flags)|clk_event_t|event_t|image(?:1d_(?:array_|buffer_)?t|2d_(?:array_(?:depth_|msaa_depth_|msaa_)?|depth_|msaa_depth_|msaa_)?t|3d_t)|intptr_t|ndrange_t|ptrdiff_t|queue_t|reserve_id_t|sampler_t|size_t|uintptr_t)\b/,alias:"keyword"}});var _={"type-opencl-host":{pattern:/\b(?:cl_(?:GLenum|GLint|GLuin|addressing_mode|bitfield|bool|buffer_create_type|build_status|channel_(?:order|type)|(?:u?(?:char|short|int|long)|float|double)(?:2|3|4|8|16)?|command_(?:queue(?:_info|_properties)?|type)|context(?:_info|_properties)?|device_(?:exec_capabilities|fp_config|id|info|local_mem_type|mem_cache_type|type)|(?:event|sampler)(?:_info)?|filter_mode|half|image_info|kernel(?:_info|_work_group_info)?|map_flags|mem(?:_flags|_info|_object_type)?|platform_(?:id|info)|profiling_info|program(?:_build_info|_info)?))\b/,alias:"keyword"},"boolean-opencl-host":{pattern:/\bCL_(?:TRUE|FALSE)\b/,alias:"boolean"},"constant-opencl-host":{pattern:/\bCL_(?:A|ABGR|ADDRESS_(?:CLAMP(?:_TO_EDGE)?|MIRRORED_REPEAT|NONE|REPEAT)|ARGB|BGRA|BLOCKING|BUFFER_CREATE_TYPE_REGION|BUILD_(?:ERROR|IN_PROGRESS|NONE|PROGRAM_FAILURE|SUCCESS)|COMMAND_(?:ACQUIRE_GL_OBJECTS|BARRIER|COPY_(?:BUFFER(?:_RECT|_TO_IMAGE)?|IMAGE(?:_TO_BUFFER)?)|FILL_(?:BUFFER|IMAGE)|MAP(?:_BUFFER|_IMAGE)|MARKER|MIGRATE(?:_SVM)?_MEM_OBJECTS|NATIVE_KERNEL|NDRANGE_KERNEL|READ_(?:BUFFER(?:_RECT)?|IMAGE)|RELEASE_GL_OBJECTS|SVM_(?:FREE|MAP|MEMCPY|MEMFILL|UNMAP)|TASK|UNMAP_MEM_OBJECT|USER|WRITE_(?:BUFFER(?:_RECT)?|IMAGE))|COMPILER_NOT_AVAILABLE|COMPILE_PROGRAM_FAILURE|COMPLETE|CONTEXT_(?:DEVICES|INTEROP_USER_SYNC|NUM_DEVICES|PLATFORM|PROPERTIES|REFERENCE_COUNT)|DEPTH(?:_STENCIL)?|DEVICE_(?:ADDRESS_BITS|AFFINITY_DOMAIN_(?:L[1-4]_CACHE|NEXT_PARTITIONABLE|NUMA)|AVAILABLE|BUILT_IN_KERNELS|COMPILER_AVAILABLE|DOUBLE_FP_CONFIG|ENDIAN_LITTLE|ERROR_CORRECTION_SUPPORT|EXECUTION_CAPABILITIES|EXTENSIONS|GLOBAL_(?:MEM_(?:CACHELINE_SIZE|CACHE_SIZE|CACHE_TYPE|SIZE)|VARIABLE_PREFERRED_TOTAL_SIZE)|HOST_UNIFIED_MEMORY|IL_VERSION|IMAGE(?:2D_MAX_(?:HEIGHT|WIDTH)|3D_MAX_(?:DEPTH|HEIGHT|WIDTH)|_BASE_ADDRESS_ALIGNMENT|_MAX_ARRAY_SIZE|_MAX_BUFFER_SIZE|_PITCH_ALIGNMENT|_SUPPORT)|LINKER_AVAILABLE|LOCAL_MEM_SIZE|LOCAL_MEM_TYPE|MAX_(?:CLOCK_FREQUENCY|COMPUTE_UNITS|CONSTANT_ARGS|CONSTANT_BUFFER_SIZE|GLOBAL_VARIABLE_SIZE|MEM_ALLOC_SIZE|NUM_SUB_GROUPS|ON_DEVICE_(?:EVENTS|QUEUES)|PARAMETER_SIZE|PIPE_ARGS|READ_IMAGE_ARGS|READ_WRITE_IMAGE_ARGS|SAMPLERS|WORK_GROUP_SIZE|WORK_ITEM_DIMENSIONS|WORK_ITEM_SIZES|WRITE_IMAGE_ARGS)|MEM_BASE_ADDR_ALIGN|MIN_DATA_TYPE_ALIGN_SIZE|NAME|NATIVE_VECTOR_WIDTH_(?:CHAR|DOUBLE|FLOAT|HALF|INT|LONG|SHORT)|NOT_(?:AVAILABLE|FOUND)|OPENCL_C_VERSION|PARENT_DEVICE|PARTITION_(?:AFFINITY_DOMAIN|BY_AFFINITY_DOMAIN|BY_COUNTS|BY_COUNTS_LIST_END|EQUALLY|FAILED|MAX_SUB_DEVICES|PROPERTIES|TYPE)|PIPE_MAX_(?:ACTIVE_RESERVATIONS|PACKET_SIZE)|PLATFORM|PREFERRED_(?:GLOBAL_ATOMIC_ALIGNMENT|INTEROP_USER_SYNC|LOCAL_ATOMIC_ALIGNMENT|PLATFORM_ATOMIC_ALIGNMENT|VECTOR_WIDTH_(?:CHAR|DOUBLE|FLOAT|HALF|INT|LONG|SHORT))|PRINTF_BUFFER_SIZE|PROFILE|PROFILING_TIMER_RESOLUTION|QUEUE_(?:ON_(?:DEVICE_(?:MAX_SIZE|PREFERRED_SIZE|PROPERTIES)|HOST_PROPERTIES)|PROPERTIES)|REFERENCE_COUNT|SINGLE_FP_CONFIG|SUB_GROUP_INDEPENDENT_FORWARD_PROGRESS|SVM_(?:ATOMICS|CAPABILITIES|COARSE_GRAIN_BUFFER|FINE_GRAIN_BUFFER|FINE_GRAIN_SYSTEM)|TYPE(?:_ACCELERATOR|_ALL|_CPU|_CUSTOM|_DEFAULT|_GPU)?|VENDOR(?:_ID)?|VERSION)|DRIVER_VERSION|EVENT_(?:COMMAND_(?:EXECUTION_STATUS|QUEUE|TYPE)|CONTEXT|REFERENCE_COUNT)|EXEC_(?:KERNEL|NATIVE_KERNEL|STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST)|FILTER_(?:LINEAR|NEAREST)|FLOAT|FP_(?:CORRECTLY_ROUNDED_DIVIDE_SQRT|DENORM|FMA|INF_NAN|ROUND_TO_INF|ROUND_TO_NEAREST|ROUND_TO_ZERO|SOFT_FLOAT)|GLOBAL|HALF_FLOAT|IMAGE_(?:ARRAY_SIZE|BUFFER|DEPTH|ELEMENT_SIZE|FORMAT|FORMAT_MISMATCH|FORMAT_NOT_SUPPORTED|HEIGHT|NUM_MIP_LEVELS|NUM_SAMPLES|ROW_PITCH|SLICE_PITCH|WIDTH)|INTENSITY|INVALID_(?:ARG_INDEX|ARG_SIZE|ARG_VALUE|BINARY|BUFFER_SIZE|BUILD_OPTIONS|COMMAND_QUEUE|COMPILER_OPTIONS|CONTEXT|DEVICE|DEVICE_PARTITION_COUNT|DEVICE_QUEUE|DEVICE_TYPE|EVENT|EVENT_WAIT_LIST|GLOBAL_OFFSET|GLOBAL_WORK_SIZE|GL_OBJECT|HOST_PTR|IMAGE_DESCRIPTOR|IMAGE_FORMAT_DESCRIPTOR|IMAGE_SIZE|KERNEL|KERNEL_ARGS|KERNEL_DEFINITION|KERNEL_NAME|LINKER_OPTIONS|MEM_OBJECT|MIP_LEVEL|OPERATION|PIPE_SIZE|PLATFORM|PROGRAM|PROGRAM_EXECUTABLE|PROPERTY|QUEUE_PROPERTIES|SAMPLER|VALUE|WORK_DIMENSION|WORK_GROUP_SIZE|WORK_ITEM_SIZE)|KERNEL_(?:ARG_(?:ACCESS_(?:NONE|QUALIFIER|READ_ONLY|READ_WRITE|WRITE_ONLY)|ADDRESS_(?:CONSTANT|GLOBAL|LOCAL|PRIVATE|QUALIFIER)|INFO_NOT_AVAILABLE|NAME|TYPE_(?:CONST|NAME|NONE|PIPE|QUALIFIER|RESTRICT|VOLATILE))|ATTRIBUTES|COMPILE_NUM_SUB_GROUPS|COMPILE_WORK_GROUP_SIZE|CONTEXT|EXEC_INFO_SVM_FINE_GRAIN_SYSTEM|EXEC_INFO_SVM_PTRS|FUNCTION_NAME|GLOBAL_WORK_SIZE|LOCAL_MEM_SIZE|LOCAL_SIZE_FOR_SUB_GROUP_COUNT|MAX_NUM_SUB_GROUPS|MAX_SUB_GROUP_SIZE_FOR_NDRANGE|NUM_ARGS|PREFERRED_WORK_GROUP_SIZE_MULTIPLE|PRIVATE_MEM_SIZE|PROGRAM|REFERENCE_COUNT|SUB_GROUP_COUNT_FOR_NDRANGE|WORK_GROUP_SIZE)|LINKER_NOT_AVAILABLE|LINK_PROGRAM_FAILURE|LOCAL|LUMINANCE|MAP_(?:FAILURE|READ|WRITE|WRITE_INVALIDATE_REGION)|MEM_(?:ALLOC_HOST_PTR|ASSOCIATED_MEMOBJECT|CONTEXT|COPY_HOST_PTR|COPY_OVERLAP|FLAGS|HOST_NO_ACCESS|HOST_PTR|HOST_READ_ONLY|HOST_WRITE_ONLY|KERNEL_READ_AND_WRITE|MAP_COUNT|OBJECT_(?:ALLOCATION_FAILURE|BUFFER|IMAGE1D|IMAGE1D_ARRAY|IMAGE1D_BUFFER|IMAGE2D|IMAGE2D_ARRAY|IMAGE3D|PIPE)|OFFSET|READ_ONLY|READ_WRITE|REFERENCE_COUNT|SIZE|SVM_ATOMICS|SVM_FINE_GRAIN_BUFFER|TYPE|USES_SVM_POINTER|USE_HOST_PTR|WRITE_ONLY)|MIGRATE_MEM_OBJECT_(?:CONTENT_UNDEFINED|HOST)|MISALIGNED_SUB_BUFFER_OFFSET|NONE|NON_BLOCKING|OUT_OF_(?:HOST_MEMORY|RESOURCES)|PIPE_(?:MAX_PACKETS|PACKET_SIZE)|PLATFORM_(?:EXTENSIONS|HOST_TIMER_RESOLUTION|NAME|PROFILE|VENDOR|VERSION)|PROFILING_(?:COMMAND_(?:COMPLETE|END|QUEUED|START|SUBMIT)|INFO_NOT_AVAILABLE)|PROGRAM_(?:BINARIES|BINARY_SIZES|BINARY_TYPE(?:_COMPILED_OBJECT|_EXECUTABLE|_LIBRARY|_NONE)?|BUILD_(?:GLOBAL_VARIABLE_TOTAL_SIZE|LOG|OPTIONS|STATUS)|CONTEXT|DEVICES|IL|KERNEL_NAMES|NUM_DEVICES|NUM_KERNELS|REFERENCE_COUNT|SOURCE)|QUEUED|QUEUE_(?:CONTEXT|DEVICE|DEVICE_DEFAULT|ON_DEVICE|ON_DEVICE_DEFAULT|OUT_OF_ORDER_EXEC_MODE_ENABLE|PROFILING_ENABLE|PROPERTIES|REFERENCE_COUNT|SIZE)|R|RA|READ_(?:ONLY|WRITE)_CACHE|RG|RGB|RGBA|RGBx|RGx|RUNNING|Rx|SAMPLER_(?:ADDRESSING_MODE|CONTEXT|FILTER_MODE|LOD_MAX|LOD_MIN|MIP_FILTER_MODE|NORMALIZED_COORDS|REFERENCE_COUNT)|(?:UN)?SIGNED_INT(?:8|16|32)|SNORM_INT(?:8|16)|SUBMITTED|SUCCESS|UNORM_INT(?:16|24|8|_101010|_101010_2)|UNORM_SHORT_(?:555|565)|VERSION_(?:1_0|1_1|1_2|2_0|2_1)|sBGRA|sRGB|sRGBA|sRGBx)\b/,alias:"constant"},"function-opencl-host":{pattern:/\bcl(?:BuildProgram|CloneKernel|CompileProgram|Create(?:Buffer|CommandQueue(?:WithProperties)?|Context|ContextFromType|Image|Image2D|Image3D|Kernel|KernelsInProgram|Pipe|ProgramWith(?:Binary|BuiltInKernels|IL|Source)|Sampler|SamplerWithProperties|SubBuffer|SubDevices|UserEvent)|Enqueue(?:(?:Barrier|Marker)(?:WithWaitList)?|Copy(?:Buffer(?:Rect|ToImage)?|Image(?:ToBuffer)?)|(?:Fill|Map)(?:Buffer|Image)|MigrateMemObjects|NDRangeKernel|NativeKernel|(?:Read|Write)(?:Buffer(?:Rect)?|Image)|SVM(?:Free|Map|MemFill|Memcpy|MigrateMem|Unmap)|Task|UnmapMemObject|WaitForEvents)|Finish|Flush|Get(?:CommandQueueInfo|ContextInfo|Device(?:AndHostTimer|IDs|Info)|Event(?:Profiling)?Info|ExtensionFunctionAddress(?:ForPlatform)?|HostTimer|ImageInfo|Kernel(?:ArgInfo|Info|SubGroupInfo|WorkGroupInfo)|MemObjectInfo|PipeInfo|Platform(?:IDs|Info)|Program(?:Build)?Info|SamplerInfo|SupportedImageFormats)|LinkProgram|(?:Release|Retain)(?:CommandQueue|Context|Device|Event|Kernel|MemObject|Program|Sampler)|SVM(?:Alloc|Free)|Set(?:CommandQueueProperty|DefaultDeviceCommandQueue|EventCallback|Kernel(?:Arg(?:SVMPointer)?|ExecInfo)|Kernel|MemObjectDestructorCallback|UserEventStatus)|Unload(?:Platform)?Compiler|WaitForEvents)\b/,alias:"function"}};E.languages.insertBefore("c","keyword",_),E.languages.cpp&&(_["type-opencl-host-cpp"]={pattern:/\b(?:Buffer|BufferGL|BufferRenderGL|CommandQueue|Context|Device|DeviceCommandQueue|EnqueueArgs|Event|Image|Image1D|Image1DArray|Image1DBuffer|Image2D|Image2DArray|Image2DGL|Image3D|Image3DGL|ImageFormat|ImageGL|Kernel|KernelFunctor|LocalSpaceArg|Memory|NDRange|Pipe|Platform|Program|Sampler|SVMAllocator|SVMTraitAtomic|SVMTraitCoarse|SVMTraitFine|SVMTraitReadOnly|SVMTraitReadWrite|SVMTraitWriteOnly|UserEvent)\b/,alias:"keyword"},E.languages.insertBefore("cpp","keyword",_))}(Prism); \ No newline at end of file +!function(E){E.languages.opencl=E.languages.extend("c",{keyword:/\b(?:(?:__)?(?:constant|global|kernel|local|private|read_only|read_write|write_only)|__attribute__|auto|(?:bool|u?(?:char|int|long|short)|half|quad)(?:2|3|4|8|16)?|break|case|complex|const|continue|(?:double|float)(?:16(?:x(?:1|2|4|8|16))?|1x(?:1|2|4|8|16)|2(?:x(?:1|2|4|8|16))?|3|4(?:x(?:1|2|4|8|16))?|8(?:x(?:1|2|4|8|16))?)?|default|do|else|enum|extern|for|goto|if|imaginary|inline|packed|pipe|register|restrict|return|signed|sizeof|static|struct|switch|typedef|uniform|union|unsigned|void|volatile|while)\b/,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[fuhl]{0,4}/i,boolean:/\b(?:false|true)\b/,"constant-opencl-kernel":{pattern:/\b(?:CHAR_(?:BIT|MAX|MIN)|CLK_(?:ADDRESS_(?:CLAMP(?:_TO_EDGE)?|NONE|REPEAT)|FILTER_(?:LINEAR|NEAREST)|(?:GLOBAL|LOCAL)_MEM_FENCE|NORMALIZED_COORDS_(?:FALSE|TRUE))|CL_(?:BGRA|(?:HALF_)?FLOAT|INTENSITY|LUMINANCE|A?R?G?B?[Ax]?|(?:(?:UN)?SIGNED|[US]NORM)_(?:INT(?:8|16|32))|UNORM_(?:INT_101010|SHORT_(?:555|565)))|(?:DBL|FLT|HALF)_(?:DIG|EPSILON|(?:MAX|MIN)(?:(?:_10)?_EXP)?|MANT_DIG)|FLT_RADIX|HUGE_VALF?|(?:INT|LONG|SCHAR|SHRT)_(?:MAX|MIN)|INFINITY|MAXFLOAT|M_(?:[12]_PI|2_SQRTPI|E|LN(?:2|10)|LOG(?:2|10)E?|PI(?:_[24])?|SQRT(?:1_2|2))(?:_F|_H)?|NAN|(?:UCHAR|UINT|ULONG|USHRT)_MAX)\b/,alias:"constant"}}),E.languages.insertBefore("opencl","class-name",{"builtin-type":{pattern:/\b(?:_cl_(?:command_queue|context|device_id|event|kernel|mem|platform_id|program|sampler)|cl_(?:image_format|mem_fence_flags)|clk_event_t|event_t|image(?:1d_(?:array_|buffer_)?t|2d_(?:array_(?:depth_|msaa_depth_|msaa_)?|depth_|msaa_depth_|msaa_)?t|3d_t)|intptr_t|ndrange_t|ptrdiff_t|queue_t|reserve_id_t|sampler_t|size_t|uintptr_t)\b/,alias:"keyword"}});var _={"type-opencl-host":{pattern:/\b(?:cl_(?:GLenum|GLint|GLuin|addressing_mode|bitfield|bool|buffer_create_type|build_status|channel_(?:order|type)|(?:u?(?:char|int|long|short)|double|float)(?:2|3|4|8|16)?|command_(?:queue(?:_info|_properties)?|type)|context(?:_info|_properties)?|device_(?:exec_capabilities|fp_config|id|info|local_mem_type|mem_cache_type|type)|(?:event|sampler)(?:_info)?|filter_mode|half|image_info|kernel(?:_info|_work_group_info)?|map_flags|mem(?:_flags|_info|_object_type)?|platform_(?:id|info)|profiling_info|program(?:_build_info|_info)?))\b/,alias:"keyword"},"boolean-opencl-host":{pattern:/\bCL_(?:FALSE|TRUE)\b/,alias:"boolean"},"constant-opencl-host":{pattern:/\bCL_(?:A|ABGR|ADDRESS_(?:CLAMP(?:_TO_EDGE)?|MIRRORED_REPEAT|NONE|REPEAT)|ARGB|BGRA|BLOCKING|BUFFER_CREATE_TYPE_REGION|BUILD_(?:ERROR|IN_PROGRESS|NONE|PROGRAM_FAILURE|SUCCESS)|COMMAND_(?:ACQUIRE_GL_OBJECTS|BARRIER|COPY_(?:BUFFER(?:_RECT|_TO_IMAGE)?|IMAGE(?:_TO_BUFFER)?)|FILL_(?:BUFFER|IMAGE)|MAP(?:_BUFFER|_IMAGE)|MARKER|MIGRATE(?:_SVM)?_MEM_OBJECTS|NATIVE_KERNEL|NDRANGE_KERNEL|READ_(?:BUFFER(?:_RECT)?|IMAGE)|RELEASE_GL_OBJECTS|SVM_(?:FREE|MAP|MEMCPY|MEMFILL|UNMAP)|TASK|UNMAP_MEM_OBJECT|USER|WRITE_(?:BUFFER(?:_RECT)?|IMAGE))|COMPILER_NOT_AVAILABLE|COMPILE_PROGRAM_FAILURE|COMPLETE|CONTEXT_(?:DEVICES|INTEROP_USER_SYNC|NUM_DEVICES|PLATFORM|PROPERTIES|REFERENCE_COUNT)|DEPTH(?:_STENCIL)?|DEVICE_(?:ADDRESS_BITS|AFFINITY_DOMAIN_(?:L[1-4]_CACHE|NEXT_PARTITIONABLE|NUMA)|AVAILABLE|BUILT_IN_KERNELS|COMPILER_AVAILABLE|DOUBLE_FP_CONFIG|ENDIAN_LITTLE|ERROR_CORRECTION_SUPPORT|EXECUTION_CAPABILITIES|EXTENSIONS|GLOBAL_(?:MEM_(?:CACHELINE_SIZE|CACHE_SIZE|CACHE_TYPE|SIZE)|VARIABLE_PREFERRED_TOTAL_SIZE)|HOST_UNIFIED_MEMORY|IL_VERSION|IMAGE(?:2D_MAX_(?:HEIGHT|WIDTH)|3D_MAX_(?:DEPTH|HEIGHT|WIDTH)|_BASE_ADDRESS_ALIGNMENT|_MAX_ARRAY_SIZE|_MAX_BUFFER_SIZE|_PITCH_ALIGNMENT|_SUPPORT)|LINKER_AVAILABLE|LOCAL_MEM_SIZE|LOCAL_MEM_TYPE|MAX_(?:CLOCK_FREQUENCY|COMPUTE_UNITS|CONSTANT_ARGS|CONSTANT_BUFFER_SIZE|GLOBAL_VARIABLE_SIZE|MEM_ALLOC_SIZE|NUM_SUB_GROUPS|ON_DEVICE_(?:EVENTS|QUEUES)|PARAMETER_SIZE|PIPE_ARGS|READ_IMAGE_ARGS|READ_WRITE_IMAGE_ARGS|SAMPLERS|WORK_GROUP_SIZE|WORK_ITEM_DIMENSIONS|WORK_ITEM_SIZES|WRITE_IMAGE_ARGS)|MEM_BASE_ADDR_ALIGN|MIN_DATA_TYPE_ALIGN_SIZE|NAME|NATIVE_VECTOR_WIDTH_(?:CHAR|DOUBLE|FLOAT|HALF|INT|LONG|SHORT)|NOT_(?:AVAILABLE|FOUND)|OPENCL_C_VERSION|PARENT_DEVICE|PARTITION_(?:AFFINITY_DOMAIN|BY_AFFINITY_DOMAIN|BY_COUNTS|BY_COUNTS_LIST_END|EQUALLY|FAILED|MAX_SUB_DEVICES|PROPERTIES|TYPE)|PIPE_MAX_(?:ACTIVE_RESERVATIONS|PACKET_SIZE)|PLATFORM|PREFERRED_(?:GLOBAL_ATOMIC_ALIGNMENT|INTEROP_USER_SYNC|LOCAL_ATOMIC_ALIGNMENT|PLATFORM_ATOMIC_ALIGNMENT|VECTOR_WIDTH_(?:CHAR|DOUBLE|FLOAT|HALF|INT|LONG|SHORT))|PRINTF_BUFFER_SIZE|PROFILE|PROFILING_TIMER_RESOLUTION|QUEUE_(?:ON_(?:DEVICE_(?:MAX_SIZE|PREFERRED_SIZE|PROPERTIES)|HOST_PROPERTIES)|PROPERTIES)|REFERENCE_COUNT|SINGLE_FP_CONFIG|SUB_GROUP_INDEPENDENT_FORWARD_PROGRESS|SVM_(?:ATOMICS|CAPABILITIES|COARSE_GRAIN_BUFFER|FINE_GRAIN_BUFFER|FINE_GRAIN_SYSTEM)|TYPE(?:_ACCELERATOR|_ALL|_CPU|_CUSTOM|_DEFAULT|_GPU)?|VENDOR(?:_ID)?|VERSION)|DRIVER_VERSION|EVENT_(?:COMMAND_(?:EXECUTION_STATUS|QUEUE|TYPE)|CONTEXT|REFERENCE_COUNT)|EXEC_(?:KERNEL|NATIVE_KERNEL|STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST)|FILTER_(?:LINEAR|NEAREST)|FLOAT|FP_(?:CORRECTLY_ROUNDED_DIVIDE_SQRT|DENORM|FMA|INF_NAN|ROUND_TO_INF|ROUND_TO_NEAREST|ROUND_TO_ZERO|SOFT_FLOAT)|GLOBAL|HALF_FLOAT|IMAGE_(?:ARRAY_SIZE|BUFFER|DEPTH|ELEMENT_SIZE|FORMAT|FORMAT_MISMATCH|FORMAT_NOT_SUPPORTED|HEIGHT|NUM_MIP_LEVELS|NUM_SAMPLES|ROW_PITCH|SLICE_PITCH|WIDTH)|INTENSITY|INVALID_(?:ARG_INDEX|ARG_SIZE|ARG_VALUE|BINARY|BUFFER_SIZE|BUILD_OPTIONS|COMMAND_QUEUE|COMPILER_OPTIONS|CONTEXT|DEVICE|DEVICE_PARTITION_COUNT|DEVICE_QUEUE|DEVICE_TYPE|EVENT|EVENT_WAIT_LIST|GLOBAL_OFFSET|GLOBAL_WORK_SIZE|GL_OBJECT|HOST_PTR|IMAGE_DESCRIPTOR|IMAGE_FORMAT_DESCRIPTOR|IMAGE_SIZE|KERNEL|KERNEL_ARGS|KERNEL_DEFINITION|KERNEL_NAME|LINKER_OPTIONS|MEM_OBJECT|MIP_LEVEL|OPERATION|PIPE_SIZE|PLATFORM|PROGRAM|PROGRAM_EXECUTABLE|PROPERTY|QUEUE_PROPERTIES|SAMPLER|VALUE|WORK_DIMENSION|WORK_GROUP_SIZE|WORK_ITEM_SIZE)|KERNEL_(?:ARG_(?:ACCESS_(?:NONE|QUALIFIER|READ_ONLY|READ_WRITE|WRITE_ONLY)|ADDRESS_(?:CONSTANT|GLOBAL|LOCAL|PRIVATE|QUALIFIER)|INFO_NOT_AVAILABLE|NAME|TYPE_(?:CONST|NAME|NONE|PIPE|QUALIFIER|RESTRICT|VOLATILE))|ATTRIBUTES|COMPILE_NUM_SUB_GROUPS|COMPILE_WORK_GROUP_SIZE|CONTEXT|EXEC_INFO_SVM_FINE_GRAIN_SYSTEM|EXEC_INFO_SVM_PTRS|FUNCTION_NAME|GLOBAL_WORK_SIZE|LOCAL_MEM_SIZE|LOCAL_SIZE_FOR_SUB_GROUP_COUNT|MAX_NUM_SUB_GROUPS|MAX_SUB_GROUP_SIZE_FOR_NDRANGE|NUM_ARGS|PREFERRED_WORK_GROUP_SIZE_MULTIPLE|PRIVATE_MEM_SIZE|PROGRAM|REFERENCE_COUNT|SUB_GROUP_COUNT_FOR_NDRANGE|WORK_GROUP_SIZE)|LINKER_NOT_AVAILABLE|LINK_PROGRAM_FAILURE|LOCAL|LUMINANCE|MAP_(?:FAILURE|READ|WRITE|WRITE_INVALIDATE_REGION)|MEM_(?:ALLOC_HOST_PTR|ASSOCIATED_MEMOBJECT|CONTEXT|COPY_HOST_PTR|COPY_OVERLAP|FLAGS|HOST_NO_ACCESS|HOST_PTR|HOST_READ_ONLY|HOST_WRITE_ONLY|KERNEL_READ_AND_WRITE|MAP_COUNT|OBJECT_(?:ALLOCATION_FAILURE|BUFFER|IMAGE1D|IMAGE1D_ARRAY|IMAGE1D_BUFFER|IMAGE2D|IMAGE2D_ARRAY|IMAGE3D|PIPE)|OFFSET|READ_ONLY|READ_WRITE|REFERENCE_COUNT|SIZE|SVM_ATOMICS|SVM_FINE_GRAIN_BUFFER|TYPE|USES_SVM_POINTER|USE_HOST_PTR|WRITE_ONLY)|MIGRATE_MEM_OBJECT_(?:CONTENT_UNDEFINED|HOST)|MISALIGNED_SUB_BUFFER_OFFSET|NONE|NON_BLOCKING|OUT_OF_(?:HOST_MEMORY|RESOURCES)|PIPE_(?:MAX_PACKETS|PACKET_SIZE)|PLATFORM_(?:EXTENSIONS|HOST_TIMER_RESOLUTION|NAME|PROFILE|VENDOR|VERSION)|PROFILING_(?:COMMAND_(?:COMPLETE|END|QUEUED|START|SUBMIT)|INFO_NOT_AVAILABLE)|PROGRAM_(?:BINARIES|BINARY_SIZES|BINARY_TYPE(?:_COMPILED_OBJECT|_EXECUTABLE|_LIBRARY|_NONE)?|BUILD_(?:GLOBAL_VARIABLE_TOTAL_SIZE|LOG|OPTIONS|STATUS)|CONTEXT|DEVICES|IL|KERNEL_NAMES|NUM_DEVICES|NUM_KERNELS|REFERENCE_COUNT|SOURCE)|QUEUED|QUEUE_(?:CONTEXT|DEVICE|DEVICE_DEFAULT|ON_DEVICE|ON_DEVICE_DEFAULT|OUT_OF_ORDER_EXEC_MODE_ENABLE|PROFILING_ENABLE|PROPERTIES|REFERENCE_COUNT|SIZE)|R|RA|READ_(?:ONLY|WRITE)_CACHE|RG|RGB|RGBA|RGBx|RGx|RUNNING|Rx|SAMPLER_(?:ADDRESSING_MODE|CONTEXT|FILTER_MODE|LOD_MAX|LOD_MIN|MIP_FILTER_MODE|NORMALIZED_COORDS|REFERENCE_COUNT)|(?:UN)?SIGNED_INT(?:8|16|32)|SNORM_INT(?:8|16)|SUBMITTED|SUCCESS|UNORM_INT(?:8|16|24|_101010|_101010_2)|UNORM_SHORT_(?:555|565)|VERSION_(?:1_0|1_1|1_2|2_0|2_1)|sBGRA|sRGB|sRGBA|sRGBx)\b/,alias:"constant"},"function-opencl-host":{pattern:/\bcl(?:BuildProgram|CloneKernel|CompileProgram|Create(?:Buffer|CommandQueue(?:WithProperties)?|Context|ContextFromType|Image|Image2D|Image3D|Kernel|KernelsInProgram|Pipe|ProgramWith(?:Binary|BuiltInKernels|IL|Source)|Sampler|SamplerWithProperties|SubBuffer|SubDevices|UserEvent)|Enqueue(?:(?:Barrier|Marker)(?:WithWaitList)?|Copy(?:Buffer(?:Rect|ToImage)?|Image(?:ToBuffer)?)|(?:Fill|Map)(?:Buffer|Image)|MigrateMemObjects|NDRangeKernel|NativeKernel|(?:Read|Write)(?:Buffer(?:Rect)?|Image)|SVM(?:Free|Map|MemFill|Memcpy|MigrateMem|Unmap)|Task|UnmapMemObject|WaitForEvents)|Finish|Flush|Get(?:CommandQueueInfo|ContextInfo|Device(?:AndHostTimer|IDs|Info)|Event(?:Profiling)?Info|ExtensionFunctionAddress(?:ForPlatform)?|HostTimer|ImageInfo|Kernel(?:ArgInfo|Info|SubGroupInfo|WorkGroupInfo)|MemObjectInfo|PipeInfo|Platform(?:IDs|Info)|Program(?:Build)?Info|SamplerInfo|SupportedImageFormats)|LinkProgram|(?:Release|Retain)(?:CommandQueue|Context|Device|Event|Kernel|MemObject|Program|Sampler)|SVM(?:Alloc|Free)|Set(?:CommandQueueProperty|DefaultDeviceCommandQueue|EventCallback|Kernel|Kernel(?:Arg(?:SVMPointer)?|ExecInfo)|MemObjectDestructorCallback|UserEventStatus)|Unload(?:Platform)?Compiler|WaitForEvents)\b/,alias:"function"}};E.languages.insertBefore("c","keyword",_),E.languages.cpp&&(_["type-opencl-host-cpp"]={pattern:/\b(?:Buffer|BufferGL|BufferRenderGL|CommandQueue|Context|Device|DeviceCommandQueue|EnqueueArgs|Event|Image|Image1D|Image1DArray|Image1DBuffer|Image2D|Image2DArray|Image2DGL|Image3D|Image3DGL|ImageFormat|ImageGL|Kernel|KernelFunctor|LocalSpaceArg|Memory|NDRange|Pipe|Platform|Program|SVMAllocator|SVMTraitAtomic|SVMTraitCoarse|SVMTraitFine|SVMTraitReadOnly|SVMTraitReadWrite|SVMTraitWriteOnly|Sampler|UserEvent)\b/,alias:"keyword"},E.languages.insertBefore("cpp","keyword",_))}(Prism); \ No newline at end of file diff --git a/components/prism-openqasm.js b/components/prism-openqasm.js index 9d24deb96f..26b213509f 100644 --- a/components/prism-openqasm.js +++ b/components/prism-openqasm.js @@ -7,11 +7,11 @@ Prism.languages.openqasm = { greedy: true }, - 'keyword': /\b(?:barrier|boxas|boxto|break|const|continue|ctrl|def|defcal|defcalgrammar|delay|else|end|for|gate|gphase|if|in|include|inv|kernel|lengthof|let|measure|pow|reset|return|rotary|stretchinf|while|CX|OPENQASM|U)\b|#pragma\b/, + 'keyword': /\b(?:CX|OPENQASM|U|barrier|boxas|boxto|break|const|continue|ctrl|def|defcal|defcalgrammar|delay|else|end|for|gate|gphase|if|in|include|inv|kernel|lengthof|let|measure|pow|reset|return|rotary|stretchinf|while)\b|#pragma\b/, 'class-name': /\b(?:angle|bit|bool|creg|fixed|float|int|length|qreg|qubit|stretch|uint)\b/, - 'function': /\b(?:sin|cos|tan|exp|ln|sqrt|rotl|rotr|popcount)\b(?=\s*\()/, + 'function': /\b(?:cos|exp|ln|popcount|rotl|rotr|sin|sqrt|tan)\b(?=\s*\()/, - 'constant': /\b(?:pi|tau|euler)\b|π|𝜏|ℇ/, + 'constant': /\b(?:euler|pi|tau)\b|π|𝜏|ℇ/, 'number': { pattern: /(^|[^.\w$])(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?(?:dt|ns|us|µs|ms|s)?/i, lookbehind: true diff --git a/components/prism-openqasm.min.js b/components/prism-openqasm.min.js index ff18c65930..fe0b45c39e 100644 --- a/components/prism-openqasm.min.js +++ b/components/prism-openqasm.min.js @@ -1 +1 @@ -Prism.languages.openqasm={comment:/\/\*[\s\S]*?\*\/|\/\/.*/,string:{pattern:/"[^"\r\n\t]*"|'[^'\r\n\t]*'/,greedy:!0},keyword:/\b(?:barrier|boxas|boxto|break|const|continue|ctrl|def|defcal|defcalgrammar|delay|else|end|for|gate|gphase|if|in|include|inv|kernel|lengthof|let|measure|pow|reset|return|rotary|stretchinf|while|CX|OPENQASM|U)\b|#pragma\b/,"class-name":/\b(?:angle|bit|bool|creg|fixed|float|int|length|qreg|qubit|stretch|uint)\b/,function:/\b(?:sin|cos|tan|exp|ln|sqrt|rotl|rotr|popcount)\b(?=\s*\()/,constant:/\b(?:pi|tau|euler)\b|π|𝜏|ℇ/,number:{pattern:/(^|[^.\w$])(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?(?:dt|ns|us|µs|ms|s)?/i,lookbehind:!0},operator:/->|>>=?|<<=?|&&|\|\||\+\+|--|[!=<>&|~^+\-*/%]=?|@/,punctuation:/[(){}\[\];,:.]/},Prism.languages.qasm=Prism.languages.openqasm; \ No newline at end of file +Prism.languages.openqasm={comment:/\/\*[\s\S]*?\*\/|\/\/.*/,string:{pattern:/"[^"\r\n\t]*"|'[^'\r\n\t]*'/,greedy:!0},keyword:/\b(?:CX|OPENQASM|U|barrier|boxas|boxto|break|const|continue|ctrl|def|defcal|defcalgrammar|delay|else|end|for|gate|gphase|if|in|include|inv|kernel|lengthof|let|measure|pow|reset|return|rotary|stretchinf|while)\b|#pragma\b/,"class-name":/\b(?:angle|bit|bool|creg|fixed|float|int|length|qreg|qubit|stretch|uint)\b/,function:/\b(?:cos|exp|ln|popcount|rotl|rotr|sin|sqrt|tan)\b(?=\s*\()/,constant:/\b(?:euler|pi|tau)\b|π|𝜏|ℇ/,number:{pattern:/(^|[^.\w$])(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?(?:dt|ns|us|µs|ms|s)?/i,lookbehind:!0},operator:/->|>>=?|<<=?|&&|\|\||\+\+|--|[!=<>&|~^+\-*/%]=?|@/,punctuation:/[(){}\[\];,:.]/},Prism.languages.qasm=Prism.languages.openqasm; \ No newline at end of file diff --git a/components/prism-parser.js b/components/prism-parser.js index 0502b76d0c..0ee4b87771 100644 --- a/components/prism-parser.js +++ b/components/prism-parser.js @@ -49,7 +49,7 @@ 'keyword': parser.keyword, 'variable': parser.variable, 'function': parser.function, - 'boolean': /\b(?:true|false)\b/, + 'boolean': /\b(?:false|true)\b/, 'number': /\b(?:0x[a-f\d]+|\d+(?:\.\d*)?(?:e[+-]?\d+)?)\b/i, 'escape': parser.escape, 'operator': /[~+*\/\\%]|!(?:\|\|?|=)?|&&?|\|\|?|==|<[<=]?|>[>=]?|-[fd]?|\b(?:def|eq|ge|gt|in|is|le|lt|ne)\b/, diff --git a/components/prism-parser.min.js b/components/prism-parser.min.js index 640f4de706..7a01f8cbc2 100644 --- a/components/prism-parser.min.js +++ b/components/prism-parser.min.js @@ -1 +1 @@ -!function(e){var n=e.languages.parser=e.languages.extend("markup",{keyword:{pattern:/(^|[^^])(?:\^(?:case|eval|for|if|switch|throw)\b|@(?:BASE|CLASS|GET(?:_DEFAULT)?|OPTIONS|SET_DEFAULT|USE)\b)/,lookbehind:!0},variable:{pattern:/(^|[^^])\B\$(?:\w+|(?=[.{]))(?:(?:\.|::?)\w+)*(?:\.|::?)?/,lookbehind:!0,inside:{punctuation:/\.|:+/}},function:{pattern:/(^|[^^])\B[@^]\w+(?:(?:\.|::?)\w+)*(?:\.|::?)?/,lookbehind:!0,inside:{keyword:{pattern:/(^@)(?:GET_|SET_)/,lookbehind:!0},punctuation:/\.|:+/}},escape:{pattern:/\^(?:[$^;@()\[\]{}"':]|#[a-f\d]*)/i,alias:"builtin"},punctuation:/[\[\](){};]/});n=e.languages.insertBefore("parser","keyword",{"parser-comment":{pattern:/(\s)#.*/,lookbehind:!0,alias:"comment"},expression:{pattern:/(^|[^^])\((?:[^()]|\((?:[^()]|\((?:[^()])*\))*\))*\)/,greedy:!0,lookbehind:!0,inside:{string:{pattern:/(^|[^^])(["'])(?:(?!\2)[^^]|\^[\s\S])*\2/,lookbehind:!0},keyword:n.keyword,variable:n.variable,function:n.function,boolean:/\b(?:true|false)\b/,number:/\b(?:0x[a-f\d]+|\d+(?:\.\d*)?(?:e[+-]?\d+)?)\b/i,escape:n.escape,operator:/[~+*\/\\%]|!(?:\|\|?|=)?|&&?|\|\|?|==|<[<=]?|>[>=]?|-[fd]?|\b(?:def|eq|ge|gt|in|is|le|lt|ne)\b/,punctuation:n.punctuation}}}),e.languages.insertBefore("inside","punctuation",{expression:n.expression,keyword:n.keyword,variable:n.variable,function:n.function,escape:n.escape,"parser-punctuation":{pattern:n.punctuation,alias:"punctuation"}},n.tag.inside["attr-value"])}(Prism); \ No newline at end of file +!function(e){var n=e.languages.parser=e.languages.extend("markup",{keyword:{pattern:/(^|[^^])(?:\^(?:case|eval|for|if|switch|throw)\b|@(?:BASE|CLASS|GET(?:_DEFAULT)?|OPTIONS|SET_DEFAULT|USE)\b)/,lookbehind:!0},variable:{pattern:/(^|[^^])\B\$(?:\w+|(?=[.{]))(?:(?:\.|::?)\w+)*(?:\.|::?)?/,lookbehind:!0,inside:{punctuation:/\.|:+/}},function:{pattern:/(^|[^^])\B[@^]\w+(?:(?:\.|::?)\w+)*(?:\.|::?)?/,lookbehind:!0,inside:{keyword:{pattern:/(^@)(?:GET_|SET_)/,lookbehind:!0},punctuation:/\.|:+/}},escape:{pattern:/\^(?:[$^;@()\[\]{}"':]|#[a-f\d]*)/i,alias:"builtin"},punctuation:/[\[\](){};]/});n=e.languages.insertBefore("parser","keyword",{"parser-comment":{pattern:/(\s)#.*/,lookbehind:!0,alias:"comment"},expression:{pattern:/(^|[^^])\((?:[^()]|\((?:[^()]|\((?:[^()])*\))*\))*\)/,greedy:!0,lookbehind:!0,inside:{string:{pattern:/(^|[^^])(["'])(?:(?!\2)[^^]|\^[\s\S])*\2/,lookbehind:!0},keyword:n.keyword,variable:n.variable,function:n.function,boolean:/\b(?:false|true)\b/,number:/\b(?:0x[a-f\d]+|\d+(?:\.\d*)?(?:e[+-]?\d+)?)\b/i,escape:n.escape,operator:/[~+*\/\\%]|!(?:\|\|?|=)?|&&?|\|\|?|==|<[<=]?|>[>=]?|-[fd]?|\b(?:def|eq|ge|gt|in|is|le|lt|ne)\b/,punctuation:n.punctuation}}}),e.languages.insertBefore("inside","punctuation",{expression:n.expression,keyword:n.keyword,variable:n.variable,function:n.function,escape:n.escape,"parser-punctuation":{pattern:n.punctuation,alias:"punctuation"}},n.tag.inside["attr-value"])}(Prism); \ No newline at end of file diff --git a/components/prism-pascaligo.js b/components/prism-pascaligo.js index ec057690d2..cc9a575616 100644 --- a/components/prism-pascaligo.js +++ b/components/prism-pascaligo.js @@ -32,7 +32,7 @@ lookbehind: true }, 'boolean': { - pattern: /(^|[^&])\b(?:True|False)\b/i, + pattern: /(^|[^&])\b(?:False|True)\b/i, lookbehind: true }, 'builtin': { diff --git a/components/prism-pascaligo.min.js b/components/prism-pascaligo.min.js index 65680576ee..6c8f828fd0 100644 --- a/components/prism-pascaligo.min.js +++ b/components/prism-pascaligo.min.js @@ -1 +1 @@ -!function(e){var n="(?:\\b\\w+(?:)?|)".replace(//g,function(){return"\\((?:[^()]|\\((?:[^()]|\\([^()]*\\))*\\))*\\)"}),t=e.languages.pascaligo={comment:/\(\*[\s\S]+?\*\)|\/\/.*/,string:{pattern:/(["'`])(?:\\[\s\S]|(?!\1)[^\\])*\1|\^[a-z]/i,greedy:!0},"class-name":[{pattern:RegExp("(\\btype\\s+\\w+\\s+is\\s+)".replace(//g,function(){return n}),"i"),lookbehind:!0,inside:null},{pattern:RegExp("(?=\\s+is\\b)".replace(//g,function(){return n}),"i"),inside:null},{pattern:RegExp("(:\\s*)".replace(//g,function(){return n})),lookbehind:!0,inside:null}],keyword:{pattern:/(^|[^&])\b(?:begin|block|case|const|else|end|fail|for|from|function|if|is|nil|of|remove|return|skip|then|type|var|while|with)\b/i,lookbehind:!0},boolean:{pattern:/(^|[^&])\b(?:True|False)\b/i,lookbehind:!0},builtin:{pattern:/(^|[^&])\b(?:bool|int|list|map|nat|record|string|unit)\b/i,lookbehind:!0},function:/\b\w+(?=\s*\()/i,number:[/%[01]+|&[0-7]+|\$[a-f\d]+/i,/\b\d+(?:\.\d+)?(?:e[+-]?\d+)?(?:mtz|n)?/i],operator:/->|=\/=|\.\.|\*\*|:=|<[<=>]?|>[>=]?|[+\-*\/]=?|[@^=|]|\b(?:and|mod|or)\b/,punctuation:/\(\.|\.\)|[()\[\]:;,.{}]/},i=["comment","keyword","builtin","operator","punctuation"].reduce(function(e,n){return e[n]=t[n],e},{});t["class-name"].forEach(function(e){e.inside=i})}(Prism); \ No newline at end of file +!function(e){var n="(?:\\b\\w+(?:)?|)".replace(//g,function(){return"\\((?:[^()]|\\((?:[^()]|\\([^()]*\\))*\\))*\\)"}),t=e.languages.pascaligo={comment:/\(\*[\s\S]+?\*\)|\/\/.*/,string:{pattern:/(["'`])(?:\\[\s\S]|(?!\1)[^\\])*\1|\^[a-z]/i,greedy:!0},"class-name":[{pattern:RegExp("(\\btype\\s+\\w+\\s+is\\s+)".replace(//g,function(){return n}),"i"),lookbehind:!0,inside:null},{pattern:RegExp("(?=\\s+is\\b)".replace(//g,function(){return n}),"i"),inside:null},{pattern:RegExp("(:\\s*)".replace(//g,function(){return n})),lookbehind:!0,inside:null}],keyword:{pattern:/(^|[^&])\b(?:begin|block|case|const|else|end|fail|for|from|function|if|is|nil|of|remove|return|skip|then|type|var|while|with)\b/i,lookbehind:!0},boolean:{pattern:/(^|[^&])\b(?:False|True)\b/i,lookbehind:!0},builtin:{pattern:/(^|[^&])\b(?:bool|int|list|map|nat|record|string|unit)\b/i,lookbehind:!0},function:/\b\w+(?=\s*\()/i,number:[/%[01]+|&[0-7]+|\$[a-f\d]+/i,/\b\d+(?:\.\d+)?(?:e[+-]?\d+)?(?:mtz|n)?/i],operator:/->|=\/=|\.\.|\*\*|:=|<[<=>]?|>[>=]?|[+\-*\/]=?|[@^=|]|\b(?:and|mod|or)\b/,punctuation:/\(\.|\.\)|[()\[\]:;,.{}]/},i=["comment","keyword","builtin","operator","punctuation"].reduce(function(e,n){return e[n]=t[n],e},{});t["class-name"].forEach(function(e){e.inside=i})}(Prism); \ No newline at end of file diff --git a/components/prism-pcaxis.js b/components/prism-pcaxis.js index b8204e014f..d804a35ada 100644 --- a/components/prism-pcaxis.js +++ b/components/prism-pcaxis.js @@ -47,7 +47,7 @@ Prism.languages.pcaxis = { pattern: /(^|\s)\d+(?:\.\d+)?(?!\S)/, lookbehind: true }, - 'boolean': /YES|NO/, + 'boolean': /NO|YES/, }; Prism.languages.px = Prism.languages.pcaxis; diff --git a/components/prism-pcaxis.min.js b/components/prism-pcaxis.min.js index 0dce264cc8..c44e6fff68 100644 --- a/components/prism-pcaxis.min.js +++ b/components/prism-pcaxis.min.js @@ -1 +1 @@ -Prism.languages.pcaxis={string:/"[^"]*"/,keyword:{pattern:/((?:^|;)\s*)[-A-Z\d]+(?:\s*\[[-\w]+\])?(?:\s*\("[^"]*"(?:,\s*"[^"]*")*\))?(?=\s*=)/,lookbehind:!0,greedy:!0,inside:{keyword:/^[-A-Z\d]+/,language:{pattern:/^(\s*)\[[-\w]+\]/,lookbehind:!0,inside:{punctuation:/^\[|\]$/,property:/[-\w]+/}},"sub-key":{pattern:/^(\s*)\S[\s\S]*/,lookbehind:!0,inside:{parameter:{pattern:/"[^"]*"/,alias:"property"},punctuation:/^\(|\)$|,/}}}},operator:/=/,tlist:{pattern:/TLIST\s*\(\s*\w+(?:(?:\s*,\s*"[^"]*")+|\s*,\s*"[^"]*"-"[^"]*")?\s*\)/,greedy:!0,inside:{function:/^TLIST/,property:{pattern:/^(\s*\(\s*)\w+/,lookbehind:!0},string:/"[^"]*"/,punctuation:/[(),]/,operator:/-/}},punctuation:/[;,]/,number:{pattern:/(^|\s)\d+(?:\.\d+)?(?!\S)/,lookbehind:!0},boolean:/YES|NO/},Prism.languages.px=Prism.languages.pcaxis; \ No newline at end of file +Prism.languages.pcaxis={string:/"[^"]*"/,keyword:{pattern:/((?:^|;)\s*)[-A-Z\d]+(?:\s*\[[-\w]+\])?(?:\s*\("[^"]*"(?:,\s*"[^"]*")*\))?(?=\s*=)/,lookbehind:!0,greedy:!0,inside:{keyword:/^[-A-Z\d]+/,language:{pattern:/^(\s*)\[[-\w]+\]/,lookbehind:!0,inside:{punctuation:/^\[|\]$/,property:/[-\w]+/}},"sub-key":{pattern:/^(\s*)\S[\s\S]*/,lookbehind:!0,inside:{parameter:{pattern:/"[^"]*"/,alias:"property"},punctuation:/^\(|\)$|,/}}}},operator:/=/,tlist:{pattern:/TLIST\s*\(\s*\w+(?:(?:\s*,\s*"[^"]*")+|\s*,\s*"[^"]*"-"[^"]*")?\s*\)/,greedy:!0,inside:{function:/^TLIST/,property:{pattern:/^(\s*\(\s*)\w+/,lookbehind:!0},string:/"[^"]*"/,punctuation:/[(),]/,operator:/-/}},punctuation:/[;,]/,number:{pattern:/(^|\s)\d+(?:\.\d+)?(?!\S)/,lookbehind:!0},boolean:/NO|YES/},Prism.languages.px=Prism.languages.pcaxis; \ No newline at end of file diff --git a/components/prism-peoplecode.js b/components/prism-peoplecode.js index 16f93e7d6f..890b412196 100644 --- a/components/prism-peoplecode.js +++ b/components/prism-peoplecode.js @@ -26,7 +26,7 @@ Prism.languages.peoplecode = { 'punctuation': /:/ } }, - 'keyword': /\b(?:abstract|alias|as|catch|class|component|constant|create|declare|else|end-(?:class|evaluate|for|function|get|if|method|set|try|while)|evaluate|extends|for|function|get|global|implements|import|instance|if|library|local|method|null|of|out|peopleCode|private|program|property|protected|readonly|ref|repeat|returns?|set|step|then|throw|to|try|until|value|when(?:-other)?|while)\b/i, + 'keyword': /\b(?:abstract|alias|as|catch|class|component|constant|create|declare|else|end-(?:class|evaluate|for|function|get|if|method|set|try|while)|evaluate|extends|for|function|get|global|if|implements|import|instance|library|local|method|null|of|out|peopleCode|private|program|property|protected|readonly|ref|repeat|returns?|set|step|then|throw|to|try|until|value|when(?:-other)?|while)\b/i, 'operator-keyword': { pattern: /\b(?:and|not|or)\b/i, alias: 'operator' diff --git a/components/prism-peoplecode.min.js b/components/prism-peoplecode.min.js index 6481666733..2753baa88b 100644 --- a/components/prism-peoplecode.min.js +++ b/components/prism-peoplecode.min.js @@ -1 +1 @@ -Prism.languages.peoplecode={comment:RegExp(["/\\*[^]*?\\*/","\\bREM[^;]*;","<\\*(?:[^<*]|\\*(?!>)|<(?!\\*)|<\\*(?:(?!\\*>)[^])*\\*>)*\\*>","/\\+[^]*?\\+/"].join("|")),string:{pattern:/'(?:''|[^'\r\n])*'(?!')|"(?:""|[^"\r\n])*"(?!")/,greedy:!0},variable:/%\w+/,"function-definition":{pattern:/((?:^|[^\w-])(?:function|method)\s+)\w+/i,lookbehind:!0,alias:"function"},"class-name":{pattern:/((?:^|[^-\w])(?:as|catch|class|component|create|extends|global|implements|instance|local|of|property|returns)\s+)\w+(?::\w+)*/i,lookbehind:!0,inside:{punctuation:/:/}},keyword:/\b(?:abstract|alias|as|catch|class|component|constant|create|declare|else|end-(?:class|evaluate|for|function|get|if|method|set|try|while)|evaluate|extends|for|function|get|global|implements|import|instance|if|library|local|method|null|of|out|peopleCode|private|program|property|protected|readonly|ref|repeat|returns?|set|step|then|throw|to|try|until|value|when(?:-other)?|while)\b/i,"operator-keyword":{pattern:/\b(?:and|not|or)\b/i,alias:"operator"},function:/[_a-z]\w*(?=\s*\()/i,boolean:/\b(?:false|true)\b/i,number:/\b\d+(?:\.\d+)?\b/,operator:/<>|[<>]=?|!=|\*\*|[-+*/|=@]/,punctuation:/[:.;,()[\]]/},Prism.languages.pcode=Prism.languages.peoplecode; \ No newline at end of file +Prism.languages.peoplecode={comment:RegExp(["/\\*[^]*?\\*/","\\bREM[^;]*;","<\\*(?:[^<*]|\\*(?!>)|<(?!\\*)|<\\*(?:(?!\\*>)[^])*\\*>)*\\*>","/\\+[^]*?\\+/"].join("|")),string:{pattern:/'(?:''|[^'\r\n])*'(?!')|"(?:""|[^"\r\n])*"(?!")/,greedy:!0},variable:/%\w+/,"function-definition":{pattern:/((?:^|[^\w-])(?:function|method)\s+)\w+/i,lookbehind:!0,alias:"function"},"class-name":{pattern:/((?:^|[^-\w])(?:as|catch|class|component|create|extends|global|implements|instance|local|of|property|returns)\s+)\w+(?::\w+)*/i,lookbehind:!0,inside:{punctuation:/:/}},keyword:/\b(?:abstract|alias|as|catch|class|component|constant|create|declare|else|end-(?:class|evaluate|for|function|get|if|method|set|try|while)|evaluate|extends|for|function|get|global|if|implements|import|instance|library|local|method|null|of|out|peopleCode|private|program|property|protected|readonly|ref|repeat|returns?|set|step|then|throw|to|try|until|value|when(?:-other)?|while)\b/i,"operator-keyword":{pattern:/\b(?:and|not|or)\b/i,alias:"operator"},function:/[_a-z]\w*(?=\s*\()/i,boolean:/\b(?:false|true)\b/i,number:/\b\d+(?:\.\d+)?\b/,operator:/<>|[<>]=?|!=|\*\*|[-+*/|=@]/,punctuation:/[:.;,()[\]]/},Prism.languages.pcode=Prism.languages.peoplecode; \ No newline at end of file diff --git a/components/prism-perl.js b/components/prism-perl.js index 7844a5cb01..9938c8ffa3 100644 --- a/components/prism-perl.js +++ b/components/prism-perl.js @@ -14,37 +14,37 @@ Prism.languages.perl = { 'string': [ // q/.../ { - pattern: /\b(?:q|qq|qx|qw)\s*([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1/, + pattern: /\b(?:q|qq|qw|qx)\s*([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1/, greedy: true }, // q a...a { - pattern: /\b(?:q|qq|qx|qw)\s+([a-zA-Z0-9])(?:(?!\1)[^\\]|\\[\s\S])*\1/, + pattern: /\b(?:q|qq|qw|qx)\s+([a-zA-Z0-9])(?:(?!\1)[^\\]|\\[\s\S])*\1/, greedy: true }, // q(...) { - pattern: /\b(?:q|qq|qx|qw)\s*\((?:[^()\\]|\\[\s\S])*\)/, + pattern: /\b(?:q|qq|qw|qx)\s*\((?:[^()\\]|\\[\s\S])*\)/, greedy: true }, // q{...} { - pattern: /\b(?:q|qq|qx|qw)\s*\{(?:[^{}\\]|\\[\s\S])*\}/, + pattern: /\b(?:q|qq|qw|qx)\s*\{(?:[^{}\\]|\\[\s\S])*\}/, greedy: true }, // q[...] { - pattern: /\b(?:q|qq|qx|qw)\s*\[(?:[^[\]\\]|\\[\s\S])*\]/, + pattern: /\b(?:q|qq|qw|qx)\s*\[(?:[^[\]\\]|\\[\s\S])*\]/, greedy: true }, // q<...> { - pattern: /\b(?:q|qq|qx|qw)\s*<(?:[^<>\\]|\\[\s\S])*>/, + pattern: /\b(?:q|qq|qw|qx)\s*<(?:[^<>\\]|\\[\s\S])*>/, greedy: true }, @@ -147,7 +147,7 @@ Prism.languages.perl = { // the same line from being highlighted as regex. // This does not support multi-line regex. { - pattern: /\/(?:[^\/\\\r\n]|\\.)*\/[msixpodualngc]*(?=\s*(?:$|[\r\n,.;})&|\-+*~<>!?^]|(?:lt|gt|le|ge|eq|ne|cmp|not|and|or|xor|x)\b))/, + pattern: /\/(?:[^\/\\\r\n]|\\.)*\/[msixpodualngc]*(?=\s*(?:$|[\r\n,.;})&|\-+*~<>!?^]|(?:and|cmp|eq|ge|gt|le|lt|ne|not|or|x|xor)\b))/, greedy: true } ], @@ -186,6 +186,6 @@ Prism.languages.perl = { }, 'keyword': /\b(?:any|break|continue|default|delete|die|do|else|elsif|eval|for|foreach|given|goto|if|last|local|my|next|our|package|print|redo|require|return|say|state|sub|switch|undef|unless|until|use|when|while)\b/, 'number': /\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)\b/, - 'operator': /-[rwxoRWXOezsfdlpSbctugkTBMAC]\b|\+[+=]?|-[-=>]?|\*\*?=?|\/\/?=?|=[=~>]?|~[~=]?|\|\|?=?|&&?=?|<(?:=>?|<=?)?|>>?=?|![~=]?|[%^]=?|\.(?:=|\.\.?)?|[\\?]|\bx(?:=|\b)|\b(?:lt|gt|le|ge|eq|ne|cmp|not|and|or|xor)\b/, + 'operator': /-[rwxoRWXOezsfdlpSbctugkTBMAC]\b|\+[+=]?|-[-=>]?|\*\*?=?|\/\/?=?|=[=~>]?|~[~=]?|\|\|?=?|&&?=?|<(?:=>?|<=?)?|>>?=?|![~=]?|[%^]=?|\.(?:=|\.\.?)?|[\\?]|\bx(?:=|\b)|\b(?:and|cmp|eq|ge|gt|le|lt|ne|not|or|xor)\b/, 'punctuation': /[{}[\];(),:]/ }; diff --git a/components/prism-perl.min.js b/components/prism-perl.min.js index 4a63715c31..ec5cc16fce 100644 --- a/components/prism-perl.min.js +++ b/components/prism-perl.min.js @@ -1 +1 @@ -Prism.languages.perl={comment:[{pattern:/(^\s*)=\w[\s\S]*?=cut.*/m,lookbehind:!0},{pattern:/(^|[^\\$])#.*/,lookbehind:!0}],string:[{pattern:/\b(?:q|qq|qx|qw)\s*([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1/,greedy:!0},{pattern:/\b(?:q|qq|qx|qw)\s+([a-zA-Z0-9])(?:(?!\1)[^\\]|\\[\s\S])*\1/,greedy:!0},{pattern:/\b(?:q|qq|qx|qw)\s*\((?:[^()\\]|\\[\s\S])*\)/,greedy:!0},{pattern:/\b(?:q|qq|qx|qw)\s*\{(?:[^{}\\]|\\[\s\S])*\}/,greedy:!0},{pattern:/\b(?:q|qq|qx|qw)\s*\[(?:[^[\]\\]|\\[\s\S])*\]/,greedy:!0},{pattern:/\b(?:q|qq|qx|qw)\s*<(?:[^<>\\]|\\[\s\S])*>/,greedy:!0},{pattern:/("|`)(?:(?!\1)[^\\]|\\[\s\S])*\1/,greedy:!0},{pattern:/'(?:[^'\\\r\n]|\\.)*'/,greedy:!0}],regex:[{pattern:/\b(?:m|qr)\s*([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1[msixpodualngc]*/,greedy:!0},{pattern:/\b(?:m|qr)\s+([a-zA-Z0-9])(?:(?!\1)[^\\]|\\[\s\S])*\1[msixpodualngc]*/,greedy:!0},{pattern:/\b(?:m|qr)\s*\((?:[^()\\]|\\[\s\S])*\)[msixpodualngc]*/,greedy:!0},{pattern:/\b(?:m|qr)\s*\{(?:[^{}\\]|\\[\s\S])*\}[msixpodualngc]*/,greedy:!0},{pattern:/\b(?:m|qr)\s*\[(?:[^[\]\\]|\\[\s\S])*\][msixpodualngc]*/,greedy:!0},{pattern:/\b(?:m|qr)\s*<(?:[^<>\\]|\\[\s\S])*>[msixpodualngc]*/,greedy:!0},{pattern:/(^|[^-]\b)(?:s|tr|y)\s*([^a-zA-Z0-9\s{(\[<])(?:(?!\2)[^\\]|\\[\s\S])*\2(?:(?!\2)[^\\]|\\[\s\S])*\2[msixpodualngcer]*/,lookbehind:!0,greedy:!0},{pattern:/(^|[^-]\b)(?:s|tr|y)\s+([a-zA-Z0-9])(?:(?!\2)[^\\]|\\[\s\S])*\2(?:(?!\2)[^\\]|\\[\s\S])*\2[msixpodualngcer]*/,lookbehind:!0,greedy:!0},{pattern:/(^|[^-]\b)(?:s|tr|y)\s*\((?:[^()\\]|\\[\s\S])*\)\s*\((?:[^()\\]|\\[\s\S])*\)[msixpodualngcer]*/,lookbehind:!0,greedy:!0},{pattern:/(^|[^-]\b)(?:s|tr|y)\s*\{(?:[^{}\\]|\\[\s\S])*\}\s*\{(?:[^{}\\]|\\[\s\S])*\}[msixpodualngcer]*/,lookbehind:!0,greedy:!0},{pattern:/(^|[^-]\b)(?:s|tr|y)\s*\[(?:[^[\]\\]|\\[\s\S])*\]\s*\[(?:[^[\]\\]|\\[\s\S])*\][msixpodualngcer]*/,lookbehind:!0,greedy:!0},{pattern:/(^|[^-]\b)(?:s|tr|y)\s*<(?:[^<>\\]|\\[\s\S])*>\s*<(?:[^<>\\]|\\[\s\S])*>[msixpodualngcer]*/,lookbehind:!0,greedy:!0},{pattern:/\/(?:[^\/\\\r\n]|\\.)*\/[msixpodualngc]*(?=\s*(?:$|[\r\n,.;})&|\-+*~<>!?^]|(?:lt|gt|le|ge|eq|ne|cmp|not|and|or|xor|x)\b))/,greedy:!0}],variable:[/[&*$@%]\{\^[A-Z]+\}/,/[&*$@%]\^[A-Z_]/,/[&*$@%]#?(?=\{)/,/[&*$@%]#?(?:(?:::)*'?(?!\d)[\w$]+(?![\w$]))+(?:::)*/i,/[&*$@%]\d+/,/(?!%=)[$@%][!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~]/],filehandle:{pattern:/<(?![<=])\S*>|\b_\b/,alias:"symbol"},vstring:{pattern:/v\d+(?:\.\d+)*|\d+(?:\.\d+){2,}/,alias:"string"},function:{pattern:/sub \w+/i,inside:{keyword:/sub/}},keyword:/\b(?:any|break|continue|default|delete|die|do|else|elsif|eval|for|foreach|given|goto|if|last|local|my|next|our|package|print|redo|require|return|say|state|sub|switch|undef|unless|until|use|when|while)\b/,number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)\b/,operator:/-[rwxoRWXOezsfdlpSbctugkTBMAC]\b|\+[+=]?|-[-=>]?|\*\*?=?|\/\/?=?|=[=~>]?|~[~=]?|\|\|?=?|&&?=?|<(?:=>?|<=?)?|>>?=?|![~=]?|[%^]=?|\.(?:=|\.\.?)?|[\\?]|\bx(?:=|\b)|\b(?:lt|gt|le|ge|eq|ne|cmp|not|and|or|xor)\b/,punctuation:/[{}[\];(),:]/}; \ No newline at end of file +Prism.languages.perl={comment:[{pattern:/(^\s*)=\w[\s\S]*?=cut.*/m,lookbehind:!0},{pattern:/(^|[^\\$])#.*/,lookbehind:!0}],string:[{pattern:/\b(?:q|qq|qw|qx)\s*([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1/,greedy:!0},{pattern:/\b(?:q|qq|qw|qx)\s+([a-zA-Z0-9])(?:(?!\1)[^\\]|\\[\s\S])*\1/,greedy:!0},{pattern:/\b(?:q|qq|qw|qx)\s*\((?:[^()\\]|\\[\s\S])*\)/,greedy:!0},{pattern:/\b(?:q|qq|qw|qx)\s*\{(?:[^{}\\]|\\[\s\S])*\}/,greedy:!0},{pattern:/\b(?:q|qq|qw|qx)\s*\[(?:[^[\]\\]|\\[\s\S])*\]/,greedy:!0},{pattern:/\b(?:q|qq|qw|qx)\s*<(?:[^<>\\]|\\[\s\S])*>/,greedy:!0},{pattern:/("|`)(?:(?!\1)[^\\]|\\[\s\S])*\1/,greedy:!0},{pattern:/'(?:[^'\\\r\n]|\\.)*'/,greedy:!0}],regex:[{pattern:/\b(?:m|qr)\s*([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1[msixpodualngc]*/,greedy:!0},{pattern:/\b(?:m|qr)\s+([a-zA-Z0-9])(?:(?!\1)[^\\]|\\[\s\S])*\1[msixpodualngc]*/,greedy:!0},{pattern:/\b(?:m|qr)\s*\((?:[^()\\]|\\[\s\S])*\)[msixpodualngc]*/,greedy:!0},{pattern:/\b(?:m|qr)\s*\{(?:[^{}\\]|\\[\s\S])*\}[msixpodualngc]*/,greedy:!0},{pattern:/\b(?:m|qr)\s*\[(?:[^[\]\\]|\\[\s\S])*\][msixpodualngc]*/,greedy:!0},{pattern:/\b(?:m|qr)\s*<(?:[^<>\\]|\\[\s\S])*>[msixpodualngc]*/,greedy:!0},{pattern:/(^|[^-]\b)(?:s|tr|y)\s*([^a-zA-Z0-9\s{(\[<])(?:(?!\2)[^\\]|\\[\s\S])*\2(?:(?!\2)[^\\]|\\[\s\S])*\2[msixpodualngcer]*/,lookbehind:!0,greedy:!0},{pattern:/(^|[^-]\b)(?:s|tr|y)\s+([a-zA-Z0-9])(?:(?!\2)[^\\]|\\[\s\S])*\2(?:(?!\2)[^\\]|\\[\s\S])*\2[msixpodualngcer]*/,lookbehind:!0,greedy:!0},{pattern:/(^|[^-]\b)(?:s|tr|y)\s*\((?:[^()\\]|\\[\s\S])*\)\s*\((?:[^()\\]|\\[\s\S])*\)[msixpodualngcer]*/,lookbehind:!0,greedy:!0},{pattern:/(^|[^-]\b)(?:s|tr|y)\s*\{(?:[^{}\\]|\\[\s\S])*\}\s*\{(?:[^{}\\]|\\[\s\S])*\}[msixpodualngcer]*/,lookbehind:!0,greedy:!0},{pattern:/(^|[^-]\b)(?:s|tr|y)\s*\[(?:[^[\]\\]|\\[\s\S])*\]\s*\[(?:[^[\]\\]|\\[\s\S])*\][msixpodualngcer]*/,lookbehind:!0,greedy:!0},{pattern:/(^|[^-]\b)(?:s|tr|y)\s*<(?:[^<>\\]|\\[\s\S])*>\s*<(?:[^<>\\]|\\[\s\S])*>[msixpodualngcer]*/,lookbehind:!0,greedy:!0},{pattern:/\/(?:[^\/\\\r\n]|\\.)*\/[msixpodualngc]*(?=\s*(?:$|[\r\n,.;})&|\-+*~<>!?^]|(?:and|cmp|eq|ge|gt|le|lt|ne|not|or|x|xor)\b))/,greedy:!0}],variable:[/[&*$@%]\{\^[A-Z]+\}/,/[&*$@%]\^[A-Z_]/,/[&*$@%]#?(?=\{)/,/[&*$@%]#?(?:(?:::)*'?(?!\d)[\w$]+(?![\w$]))+(?:::)*/i,/[&*$@%]\d+/,/(?!%=)[$@%][!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~]/],filehandle:{pattern:/<(?![<=])\S*>|\b_\b/,alias:"symbol"},vstring:{pattern:/v\d+(?:\.\d+)*|\d+(?:\.\d+){2,}/,alias:"string"},function:{pattern:/sub \w+/i,inside:{keyword:/sub/}},keyword:/\b(?:any|break|continue|default|delete|die|do|else|elsif|eval|for|foreach|given|goto|if|last|local|my|next|our|package|print|redo|require|return|say|state|sub|switch|undef|unless|until|use|when|while)\b/,number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)\b/,operator:/-[rwxoRWXOezsfdlpSbctugkTBMAC]\b|\+[+=]?|-[-=>]?|\*\*?=?|\/\/?=?|=[=~>]?|~[~=]?|\|\|?=?|&&?=?|<(?:=>?|<=?)?|>>?=?|![~=]?|[%^]=?|\.(?:=|\.\.?)?|[\\?]|\bx(?:=|\b)|\b(?:and|cmp|eq|ge|gt|le|lt|ne|not|or|xor)\b/,punctuation:/[{}[\];(),:]/}; \ No newline at end of file diff --git a/components/prism-php-extras.js b/components/prism-php-extras.js index 8c0662ab09..c62c42cdae 100644 --- a/components/prism-php-extras.js +++ b/components/prism-php-extras.js @@ -1,10 +1,10 @@ Prism.languages.insertBefore('php', 'variable', { 'this': /\$this\b/, - 'global': /\$(?:_(?:SERVER|GET|POST|FILES|REQUEST|SESSION|ENV|COOKIE)|GLOBALS|HTTP_RAW_POST_DATA|argc|argv|php_errormsg|http_response_header)\b/, + 'global': /\$(?:GLOBALS|HTTP_RAW_POST_DATA|_(?:COOKIE|ENV|FILES|GET|POST|REQUEST|SERVER|SESSION)|argc|argv|http_response_header|php_errormsg)\b/, 'scope': { pattern: /\b[\w\\]+::/, inside: { - keyword: /static|self|parent/, + keyword: /parent|self|static/, punctuation: /::|\\/ } } diff --git a/components/prism-php-extras.min.js b/components/prism-php-extras.min.js index 2ab526e236..e60a99eedf 100644 --- a/components/prism-php-extras.min.js +++ b/components/prism-php-extras.min.js @@ -1 +1 @@ -Prism.languages.insertBefore("php","variable",{this:/\$this\b/,global:/\$(?:_(?:SERVER|GET|POST|FILES|REQUEST|SESSION|ENV|COOKIE)|GLOBALS|HTTP_RAW_POST_DATA|argc|argv|php_errormsg|http_response_header)\b/,scope:{pattern:/\b[\w\\]+::/,inside:{keyword:/static|self|parent/,punctuation:/::|\\/}}}); \ No newline at end of file +Prism.languages.insertBefore("php","variable",{this:/\$this\b/,global:/\$(?:GLOBALS|HTTP_RAW_POST_DATA|_(?:COOKIE|ENV|FILES|GET|POST|REQUEST|SERVER|SESSION)|argc|argv|http_response_header|php_errormsg)\b/,scope:{pattern:/\b[\w\\]+::/,inside:{keyword:/parent|self|static/,punctuation:/::|\\/}}}); \ No newline at end of file diff --git a/components/prism-php.js b/components/prism-php.js index 9329711340..a5066e43a5 100644 --- a/components/prism-php.js +++ b/components/prism-php.js @@ -55,42 +55,42 @@ }, 'keyword': [ { - pattern: /(\(\s*)\b(?:bool|boolean|int|integer|float|string|object|array)\b(?=\s*\))/i, + pattern: /(\(\s*)\b(?:array|bool|boolean|float|int|integer|object|string)\b(?=\s*\))/i, alias: 'type-casting', greedy: true, lookbehind: true }, { - pattern: /([(,?]\s*)\b(?:bool|int|float|string|object|array(?!\s*\()|mixed|self|static|callable|iterable|(?:null|false)(?=\s*\|))\b(?=\s*\$)/i, + pattern: /([(,?]\s*)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|object|self|static|string)\b(?=\s*\$)/i, alias: 'type-hint', greedy: true, lookbehind: true }, { - pattern: /([(,?]\s*[\w|]\|\s*)(?:null|false)\b(?=\s*\$)/i, + pattern: /([(,?]\s*[\w|]\|\s*)(?:false|null)\b(?=\s*\$)/i, alias: 'type-hint', greedy: true, lookbehind: true }, { - pattern: /(\)\s*:\s*(?:\?\s*)?)\b(?:bool|int|float|string|object|void|array(?!\s*\()|mixed|self|static|callable|iterable|(?:null|false)(?=\s*\|))\b/i, + pattern: /(\)\s*:\s*(?:\?\s*)?)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|object|self|static|string|void)\b/i, alias: 'return-type', greedy: true, lookbehind: true }, { - pattern: /(\)\s*:\s*(?:\?\s*)?[\w|]\|\s*)(?:null|false)\b/i, + pattern: /(\)\s*:\s*(?:\?\s*)?[\w|]\|\s*)(?:false|null)\b/i, alias: 'return-type', greedy: true, lookbehind: true }, { - pattern: /\b(?:bool|int|float|string|object|void|array(?!\s*\()|mixed|iterable|(?:null|false)(?=\s*\|))\b/i, + pattern: /\b(?:array(?!\s*\()|bool|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|object|string|void)\b/i, alias: 'type-declaration', greedy: true }, { - pattern: /(\|\s*)(?:null|false)\b/i, + pattern: /(\|\s*)(?:false|null)\b/i, alias: 'type-declaration', greedy: true, lookbehind: true @@ -112,7 +112,7 @@ // // keywords cannot be preceded by "->" // the complex lookbehind means `(?|::)\s*)` - pattern: /((?:^|[^\s>:]|(?:^|[^-])>|(?:^|[^:]):)\s*)\b(?:__halt_compiler|abstract|and|array|as|break|callable|case|catch|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|enum|eval|exit|extends|final|finally|fn|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|namespace|match|new|or|parent|print|private|protected|public|require|require_once|return|self|static|switch|throw|trait|try|unset|use|var|while|xor|yield)\b/i, + pattern: /((?:^|[^\s>:]|(?:^|[^-])>|(?:^|[^:]):)\s*)\b(?:abstract|and|array|as|break|callable|case|catch|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|enum|eval|exit|extends|final|finally|fn|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|match|namespace|new|or|parent|print|private|protected|public|require|require_once|return|self|static|switch|throw|trait|try|unset|use|var|while|xor|yield|__halt_compiler)\b/i, lookbehind: true } ], diff --git a/components/prism-php.min.js b/components/prism-php.min.js index 4165631d9e..a3efd7e38e 100644 --- a/components/prism-php.min.js +++ b/components/prism-php.min.js @@ -1 +1 @@ -!function(a){var e=/\/\*[\s\S]*?\*\/|\/\/.*|#(?!\[).*/,t=[{pattern:/\b(?:false|true)\b/i,alias:"boolean"},{pattern:/(::\s*)\b[a-z_]\w*\b(?!\s*\()/i,greedy:!0,lookbehind:!0},{pattern:/(\b(?:case|const)\s+)\b[a-z_]\w*(?=\s*[;=])/i,greedy:!0,lookbehind:!0},/\b(?:null)\b/i,/\b[A-Z_][A-Z0-9_]*\b(?!\s*\()/],i=/\b0b[01]+(?:_[01]+)*\b|\b0o[0-7]+(?:_[0-7]+)*\b|\b0x[\da-f]+(?:_[\da-f]+)*\b|(?:\b\d+(?:_\d+)*\.?(?:\d+(?:_\d+)*)?|\B\.\d+)(?:e[+-]?\d+)?/i,n=/|\?\?=?|\.{3}|\??->|[!=]=?=?|::|\*\*=?|--|\+\+|&&|\|\||<<|>>|[?~]|[/^|%*&<>.+-]=?/,s=/[{}\[\](),:;]/;a.languages.php={delimiter:{pattern:/\?>$|^<\?(?:php(?=\s)|=)?/i,alias:"important"},comment:e,variable:/\$+(?:\w+\b|(?=\{))/i,package:{pattern:/(namespace\s+|use\s+(?:function\s+)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,lookbehind:!0,inside:{punctuation:/\\/}},"class-name-definition":{pattern:/(\b(?:class|enum|interface|trait)\s+)\b[a-z_]\w*(?!\\)\b/i,lookbehind:!0,alias:"class-name"},"function-definition":{pattern:/(\bfunction\s+)[a-z_]\w*(?=\s*\()/i,lookbehind:!0,alias:"function"},keyword:[{pattern:/(\(\s*)\b(?:bool|boolean|int|integer|float|string|object|array)\b(?=\s*\))/i,alias:"type-casting",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)\b(?:bool|int|float|string|object|array(?!\s*\()|mixed|self|static|callable|iterable|(?:null|false)(?=\s*\|))\b(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*[\w|]\|\s*)(?:null|false)\b(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b(?:bool|int|float|string|object|void|array(?!\s*\()|mixed|self|static|callable|iterable|(?:null|false)(?=\s*\|))\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?[\w|]\|\s*)(?:null|false)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/\b(?:bool|int|float|string|object|void|array(?!\s*\()|mixed|iterable|(?:null|false)(?=\s*\|))\b/i,alias:"type-declaration",greedy:!0},{pattern:/(\|\s*)(?:null|false)\b/i,alias:"type-declaration",greedy:!0,lookbehind:!0},{pattern:/\b(?:parent|self|static)(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(\byield\s+)from\b/i,lookbehind:!0},/\bclass\b/i,{pattern:/((?:^|[^\s>:]|(?:^|[^-])>|(?:^|[^:]):)\s*)\b(?:__halt_compiler|abstract|and|array|as|break|callable|case|catch|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|enum|eval|exit|extends|final|finally|fn|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|namespace|match|new|or|parent|print|private|protected|public|require|require_once|return|self|static|switch|throw|trait|try|unset|use|var|while|xor|yield)\b/i,lookbehind:!0}],"argument-name":{pattern:/([(,]\s+)\b[a-z_]\w*(?=\s*:(?!:))/i,lookbehind:!0},"class-name":[{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self|\s+static))\s+|\bcatch\s*\()\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/(\|\s*)\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/\b[a-z_]\w*(?!\\)\b(?=\s*\|)/i,greedy:!0},{pattern:/(\|\s*)(?:\\?\b[a-z_]\w*)+\b/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(?:\\?\b[a-z_]\w*)+\b(?=\s*\|)/i,alias:"class-name-fully-qualified",greedy:!0,inside:{punctuation:/\\/}},{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self\b|\s+static\b))\s+|\bcatch\s*\()(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*\$)/i,alias:"type-declaration",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-declaration"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*::)/i,alias:["class-name-fully-qualified","static-context"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/([(,?]\s*)[a-z_]\w*(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-hint"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b[a-z_]\w*(?!\\)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:["class-name-fully-qualified","return-type"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:t,function:{pattern:/(^|[^\\\w])\\?[a-z_](?:[\w\\]*\w)?(?=\s*\()/i,lookbehind:!0,inside:{punctuation:/\\/}},property:{pattern:/(->\s*)\w+/,lookbehind:!0},number:i,operator:n,punctuation:s};var l={pattern:/\{\$(?:\{(?:\{[^{}]+\}|[^{}]+)\}|[^{}])+\}|(^|[^\\{])\$+(?:\w+(?:\[[^\r\n\[\]]+\]|->\w+)?)/,lookbehind:!0,inside:a.languages.php},r=[{pattern:/<<<'([^']+)'[\r\n](?:.*[\r\n])*?\1;/,alias:"nowdoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<'[^']+'|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<'?|[';]$/}}}},{pattern:/<<<(?:"([^"]+)"[\r\n](?:.*[\r\n])*?\1;|([a-z_]\w*)[\r\n](?:.*[\r\n])*?\2;)/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<(?:"[^"]+"|[a-z_]\w*)|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<"?|[";]$/}},interpolation:l}},{pattern:/`(?:\\[\s\S]|[^\\`])*`/,alias:"backtick-quoted-string",greedy:!0},{pattern:/'(?:\\[\s\S]|[^\\'])*'/,alias:"single-quoted-string",greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,alias:"double-quoted-string",greedy:!0,inside:{interpolation:l}}];a.languages.insertBefore("php","variable",{string:r,attribute:{pattern:/#\[(?:[^"'\/#]|\/(?![*/])|\/\/.*$|#(?!\[).*$|\/\*(?:[^*]|\*(?!\/))*\*\/|"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*')+\](?=\s*[a-z$#])/im,greedy:!0,inside:{"attribute-content":{pattern:/^(#\[)[\s\S]+(?=\]$)/,lookbehind:!0,inside:{comment:e,string:r,"attribute-class-name":[{pattern:/([^:]|^)\b[a-z_]\w*(?!\\)\b/i,alias:"class-name",greedy:!0,lookbehind:!0},{pattern:/([^:]|^)(?:\\?\b[a-z_]\w*)+/i,alias:["class-name","class-name-fully-qualified"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:t,number:i,operator:n,punctuation:s}},delimiter:{pattern:/^#\[|\]$/,alias:"punctuation"}}}}),a.hooks.add("before-tokenize",function(e){if(/<\?/.test(e.code)){a.languages["markup-templating"].buildPlaceholders(e,"php",/<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#(?!\[))(?:[^?\n\r]|\?(?!>))*(?=$|\?>|[\r\n])|#\[|\/\*(?:[^*]|\*(?!\/))*(?:\*\/|$))*?(?:\?>|$)/gi)}}),a.hooks.add("after-tokenize",function(e){a.languages["markup-templating"].tokenizePlaceholders(e,"php")})}(Prism); \ No newline at end of file +!function(a){var e=/\/\*[\s\S]*?\*\/|\/\/.*|#(?!\[).*/,t=[{pattern:/\b(?:false|true)\b/i,alias:"boolean"},{pattern:/(::\s*)\b[a-z_]\w*\b(?!\s*\()/i,greedy:!0,lookbehind:!0},{pattern:/(\b(?:case|const)\s+)\b[a-z_]\w*(?=\s*[;=])/i,greedy:!0,lookbehind:!0},/\b(?:null)\b/i,/\b[A-Z_][A-Z0-9_]*\b(?!\s*\()/],i=/\b0b[01]+(?:_[01]+)*\b|\b0o[0-7]+(?:_[0-7]+)*\b|\b0x[\da-f]+(?:_[\da-f]+)*\b|(?:\b\d+(?:_\d+)*\.?(?:\d+(?:_\d+)*)?|\B\.\d+)(?:e[+-]?\d+)?/i,n=/|\?\?=?|\.{3}|\??->|[!=]=?=?|::|\*\*=?|--|\+\+|&&|\|\||<<|>>|[?~]|[/^|%*&<>.+-]=?/,s=/[{}\[\](),:;]/;a.languages.php={delimiter:{pattern:/\?>$|^<\?(?:php(?=\s)|=)?/i,alias:"important"},comment:e,variable:/\$+(?:\w+\b|(?=\{))/i,package:{pattern:/(namespace\s+|use\s+(?:function\s+)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,lookbehind:!0,inside:{punctuation:/\\/}},"class-name-definition":{pattern:/(\b(?:class|enum|interface|trait)\s+)\b[a-z_]\w*(?!\\)\b/i,lookbehind:!0,alias:"class-name"},"function-definition":{pattern:/(\bfunction\s+)[a-z_]\w*(?=\s*\()/i,lookbehind:!0,alias:"function"},keyword:[{pattern:/(\(\s*)\b(?:array|bool|boolean|float|int|integer|object|string)\b(?=\s*\))/i,alias:"type-casting",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|object|self|static|string)\b(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*[\w|]\|\s*)(?:false|null)\b(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|object|self|static|string|void)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?[\w|]\|\s*)(?:false|null)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/\b(?:array(?!\s*\()|bool|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|object|string|void)\b/i,alias:"type-declaration",greedy:!0},{pattern:/(\|\s*)(?:false|null)\b/i,alias:"type-declaration",greedy:!0,lookbehind:!0},{pattern:/\b(?:parent|self|static)(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(\byield\s+)from\b/i,lookbehind:!0},/\bclass\b/i,{pattern:/((?:^|[^\s>:]|(?:^|[^-])>|(?:^|[^:]):)\s*)\b(?:abstract|and|array|as|break|callable|case|catch|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|enum|eval|exit|extends|final|finally|fn|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|match|namespace|new|or|parent|print|private|protected|public|require|require_once|return|self|static|switch|throw|trait|try|unset|use|var|while|xor|yield|__halt_compiler)\b/i,lookbehind:!0}],"argument-name":{pattern:/([(,]\s+)\b[a-z_]\w*(?=\s*:(?!:))/i,lookbehind:!0},"class-name":[{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self|\s+static))\s+|\bcatch\s*\()\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/(\|\s*)\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/\b[a-z_]\w*(?!\\)\b(?=\s*\|)/i,greedy:!0},{pattern:/(\|\s*)(?:\\?\b[a-z_]\w*)+\b/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(?:\\?\b[a-z_]\w*)+\b(?=\s*\|)/i,alias:"class-name-fully-qualified",greedy:!0,inside:{punctuation:/\\/}},{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self\b|\s+static\b))\s+|\bcatch\s*\()(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*\$)/i,alias:"type-declaration",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-declaration"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*::)/i,alias:["class-name-fully-qualified","static-context"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/([(,?]\s*)[a-z_]\w*(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-hint"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b[a-z_]\w*(?!\\)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:["class-name-fully-qualified","return-type"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:t,function:{pattern:/(^|[^\\\w])\\?[a-z_](?:[\w\\]*\w)?(?=\s*\()/i,lookbehind:!0,inside:{punctuation:/\\/}},property:{pattern:/(->\s*)\w+/,lookbehind:!0},number:i,operator:n,punctuation:s};var l={pattern:/\{\$(?:\{(?:\{[^{}]+\}|[^{}]+)\}|[^{}])+\}|(^|[^\\{])\$+(?:\w+(?:\[[^\r\n\[\]]+\]|->\w+)?)/,lookbehind:!0,inside:a.languages.php},r=[{pattern:/<<<'([^']+)'[\r\n](?:.*[\r\n])*?\1;/,alias:"nowdoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<'[^']+'|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<'?|[';]$/}}}},{pattern:/<<<(?:"([^"]+)"[\r\n](?:.*[\r\n])*?\1;|([a-z_]\w*)[\r\n](?:.*[\r\n])*?\2;)/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<(?:"[^"]+"|[a-z_]\w*)|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<"?|[";]$/}},interpolation:l}},{pattern:/`(?:\\[\s\S]|[^\\`])*`/,alias:"backtick-quoted-string",greedy:!0},{pattern:/'(?:\\[\s\S]|[^\\'])*'/,alias:"single-quoted-string",greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,alias:"double-quoted-string",greedy:!0,inside:{interpolation:l}}];a.languages.insertBefore("php","variable",{string:r,attribute:{pattern:/#\[(?:[^"'\/#]|\/(?![*/])|\/\/.*$|#(?!\[).*$|\/\*(?:[^*]|\*(?!\/))*\*\/|"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*')+\](?=\s*[a-z$#])/im,greedy:!0,inside:{"attribute-content":{pattern:/^(#\[)[\s\S]+(?=\]$)/,lookbehind:!0,inside:{comment:e,string:r,"attribute-class-name":[{pattern:/([^:]|^)\b[a-z_]\w*(?!\\)\b/i,alias:"class-name",greedy:!0,lookbehind:!0},{pattern:/([^:]|^)(?:\\?\b[a-z_]\w*)+/i,alias:["class-name","class-name-fully-qualified"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:t,number:i,operator:n,punctuation:s}},delimiter:{pattern:/^#\[|\]$/,alias:"punctuation"}}}}),a.hooks.add("before-tokenize",function(e){if(/<\?/.test(e.code)){a.languages["markup-templating"].buildPlaceholders(e,"php",/<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#(?!\[))(?:[^?\n\r]|\?(?!>))*(?=$|\?>|[\r\n])|#\[|\/\*(?:[^*]|\*(?!\/))*(?:\*\/|$))*?(?:\?>|$)/gi)}}),a.hooks.add("after-tokenize",function(e){a.languages["markup-templating"].tokenizePlaceholders(e,"php")})}(Prism); \ No newline at end of file diff --git a/components/prism-phpdoc.js b/components/prism-phpdoc.js index 136f5988a4..8196b9e277 100644 --- a/components/prism-phpdoc.js +++ b/components/prism-phpdoc.js @@ -15,7 +15,7 @@ pattern: RegExp('(@(?:global|package|param|property(?:-read|-write)?|return|subpackage|throws|var)\\s+)' + typeExpression), lookbehind: true, inside: { - 'keyword': /\b(?:callback|resource|boolean|integer|double|object|string|array|false|float|mixed|bool|null|self|true|void|int)\b/, + 'keyword': /\b(?:array|bool|boolean|callback|double|false|float|int|integer|mixed|null|object|resource|self|string|true|void)\b/, 'punctuation': /[|\\[\]()]/ } } diff --git a/components/prism-phpdoc.min.js b/components/prism-phpdoc.min.js index fe460a5d28..85aaeea983 100644 --- a/components/prism-phpdoc.min.js +++ b/components/prism-phpdoc.min.js @@ -1 +1 @@ -!function(a){var e="(?:\\b[a-zA-Z]\\w*|[|\\\\[\\]])+";a.languages.phpdoc=a.languages.extend("javadoclike",{parameter:{pattern:RegExp("(@(?:global|param|property(?:-read|-write)?|var)\\s+(?:"+e+"\\s+)?)\\$\\w+"),lookbehind:!0}}),a.languages.insertBefore("phpdoc","keyword",{"class-name":[{pattern:RegExp("(@(?:global|package|param|property(?:-read|-write)?|return|subpackage|throws|var)\\s+)"+e),lookbehind:!0,inside:{keyword:/\b(?:callback|resource|boolean|integer|double|object|string|array|false|float|mixed|bool|null|self|true|void|int)\b/,punctuation:/[|\\[\]()]/}}]}),a.languages.javadoclike.addSupport("php",a.languages.phpdoc)}(Prism); \ No newline at end of file +!function(a){var e="(?:\\b[a-zA-Z]\\w*|[|\\\\[\\]])+";a.languages.phpdoc=a.languages.extend("javadoclike",{parameter:{pattern:RegExp("(@(?:global|param|property(?:-read|-write)?|var)\\s+(?:"+e+"\\s+)?)\\$\\w+"),lookbehind:!0}}),a.languages.insertBefore("phpdoc","keyword",{"class-name":[{pattern:RegExp("(@(?:global|package|param|property(?:-read|-write)?|return|subpackage|throws|var)\\s+)"+e),lookbehind:!0,inside:{keyword:/\b(?:array|bool|boolean|callback|double|false|float|int|integer|mixed|null|object|resource|self|string|true|void)\b/,punctuation:/[|\\[\]()]/}}]}),a.languages.javadoclike.addSupport("php",a.languages.phpdoc)}(Prism); \ No newline at end of file diff --git a/components/prism-plsql.js b/components/prism-plsql.js index 944132d9f9..0197bc383a 100644 --- a/components/prism-plsql.js +++ b/components/prism-plsql.js @@ -12,7 +12,7 @@ keyword = plsql['keyword'] = [keyword]; } keyword.unshift( - /\b(?:ACCESS|AGENT|AGGREGATE|ARRAY|ARROW|AT|ATTRIBUTE|AUDIT|AUTHID|BFILE_BASE|BLOB_BASE|BLOCK|BODY|BOTH|BOUND|BYTE|CALLING|CHAR_BASE|CHARSET(?:FORM|ID)|CLOB_BASE|COLAUTH|COLLECT|CLUSTERS?|COMPILED|COMPRESS|CONSTANT|CONSTRUCTOR|CONTEXT|CRASH|CUSTOMDATUM|DANGLING|DATE_BASE|DEFINE|DETERMINISTIC|DURATION|ELEMENT|EMPTY|EXCEPTIONS?|EXCLUSIVE|EXTERNAL|FINAL|FORALL|FORM|FOUND|GENERAL|HEAP|HIDDEN|IDENTIFIED|IMMEDIATE|INCLUDING|INCREMENT|INDICATOR|INDEXES|INDICES|INFINITE|INITIAL|ISOPEN|INSTANTIABLE|INTERFACE|INVALIDATE|JAVA|LARGE|LEADING|LENGTH|LIBRARY|LIKE[24C]|LIMITED|LONG|LOOP|MAP|MAXEXTENTS|MAXLEN|MEMBER|MINUS|MLSLABEL|MULTISET|NAME|NAN|NATIVE|NEW|NOAUDIT|NOCOMPRESS|NOCOPY|NOTFOUND|NOWAIT|NUMBER(?:_BASE)?|OBJECT|OCI(?:COLL|DATE|DATETIME|DURATION|INTERVAL|LOBLOCATOR|NUMBER|RAW|REF|REFCURSOR|ROWID|STRING|TYPE)|OFFLINE|ONLINE|ONLY|OPAQUE|OPERATOR|ORACLE|ORADATA|ORGANIZATION|ORL(?:ANY|VARY)|OTHERS|OVERLAPS|OVERRIDING|PACKAGE|PARALLEL_ENABLE|PARAMETERS?|PASCAL|PCTFREE|PIPE(?:LINED)?|PRAGMA|PRIOR|PRIVATE|RAISE|RANGE|RAW|RECORD|REF|REFERENCE|REM|REMAINDER|RESULT|RESOURCE|RETURNING|REVERSE|ROW(?:ID|NUM|TYPE)|SAMPLE|SB[124]|SEGMENT|SELF|SEPARATE|SEQUENCE|SHORT|SIZE(?:_T)?|SPARSE|SQL(?:CODE|DATA|NAME|STATE)|STANDARD|STATIC|STDDEV|STORED|STRING|STRUCT|STYLE|SUBMULTISET|SUBPARTITION|SUBSTITUTABLE|SUBTYPE|SUCCESSFUL|SYNONYM|SYSDATE|TABAUTH|TDO|THE|TIMEZONE_(?:ABBR|HOUR|MINUTE|REGION)|TRAILING|TRANSAC(?:TIONAL)?|TRUSTED|UB[124]|UID|UNDER|UNTRUSTED|VALIDATE|VALIST|VARCHAR2|VARIABLE|VARIANCE|VARRAY|VIEWS|VOID|WHENEVER|WRAPPED|ZONE)\b/i + /\b(?:ACCESS|AGENT|AGGREGATE|ARRAY|ARROW|AT|ATTRIBUTE|AUDIT|AUTHID|BFILE_BASE|BLOB_BASE|BLOCK|BODY|BOTH|BOUND|BYTE|CALLING|CHARSET(?:FORM|ID)|CHAR_BASE|CLOB_BASE|CLUSTERS?|COLAUTH|COLLECT|COMPILED|COMPRESS|CONSTANT|CONSTRUCTOR|CONTEXT|CRASH|CUSTOMDATUM|DANGLING|DATE_BASE|DEFINE|DETERMINISTIC|DURATION|ELEMENT|EMPTY|EXCEPTIONS?|EXCLUSIVE|EXTERNAL|FINAL|FORALL|FORM|FOUND|GENERAL|HEAP|HIDDEN|IDENTIFIED|IMMEDIATE|INCLUDING|INCREMENT|INDEXES|INDICATOR|INDICES|INFINITE|INITIAL|INSTANTIABLE|INTERFACE|INVALIDATE|ISOPEN|JAVA|LARGE|LEADING|LENGTH|LIBRARY|LIKE[24C]|LIMITED|LONG|LOOP|MAP|MAXEXTENTS|MAXLEN|MEMBER|MINUS|MLSLABEL|MULTISET|NAME|NAN|NATIVE|NEW|NOAUDIT|NOCOMPRESS|NOCOPY|NOTFOUND|NOWAIT|NUMBER(?:_BASE)?|OBJECT|OCI(?:COLL|DATE|DATETIME|DURATION|INTERVAL|LOBLOCATOR|NUMBER|RAW|REF|REFCURSOR|ROWID|STRING|TYPE)|OFFLINE|ONLINE|ONLY|OPAQUE|OPERATOR|ORACLE|ORADATA|ORGANIZATION|ORL(?:ANY|VARY)|OTHERS|OVERLAPS|OVERRIDING|PACKAGE|PARALLEL_ENABLE|PARAMETERS?|PASCAL|PCTFREE|PIPE(?:LINED)?|PRAGMA|PRIOR|PRIVATE|RAISE|RANGE|RAW|RECORD|REF|REFERENCE|REM|REMAINDER|RESOURCE|RESULT|RETURNING|REVERSE|ROW(?:ID|NUM|TYPE)|SAMPLE|SB[124]|SEGMENT|SELF|SEPARATE|SEQUENCE|SHORT|SIZE(?:_T)?|SPARSE|SQL(?:CODE|DATA|NAME|STATE)|STANDARD|STATIC|STDDEV|STORED|STRING|STRUCT|STYLE|SUBMULTISET|SUBPARTITION|SUBSTITUTABLE|SUBTYPE|SUCCESSFUL|SYNONYM|SYSDATE|TABAUTH|TDO|THE|TIMEZONE_(?:ABBR|HOUR|MINUTE|REGION)|TRAILING|TRANSAC(?:TIONAL)?|TRUSTED|UB[124]|UID|UNDER|UNTRUSTED|VALIDATE|VALIST|VARCHAR2|VARIABLE|VARIANCE|VARRAY|VIEWS|VOID|WHENEVER|WRAPPED|ZONE)\b/i ); var operator = plsql['operator']; diff --git a/components/prism-plsql.min.js b/components/prism-plsql.min.js index dc7f54727a..ffd7438813 100644 --- a/components/prism-plsql.min.js +++ b/components/prism-plsql.min.js @@ -1 +1 @@ -!function(E){var A=E.languages.plsql=E.languages.extend("sql",{comment:[/\/\*[\s\S]*?\*\//,/--.*/]}),T=A.keyword;Array.isArray(T)||(T=A.keyword=[T]),T.unshift(/\b(?:ACCESS|AGENT|AGGREGATE|ARRAY|ARROW|AT|ATTRIBUTE|AUDIT|AUTHID|BFILE_BASE|BLOB_BASE|BLOCK|BODY|BOTH|BOUND|BYTE|CALLING|CHAR_BASE|CHARSET(?:FORM|ID)|CLOB_BASE|COLAUTH|COLLECT|CLUSTERS?|COMPILED|COMPRESS|CONSTANT|CONSTRUCTOR|CONTEXT|CRASH|CUSTOMDATUM|DANGLING|DATE_BASE|DEFINE|DETERMINISTIC|DURATION|ELEMENT|EMPTY|EXCEPTIONS?|EXCLUSIVE|EXTERNAL|FINAL|FORALL|FORM|FOUND|GENERAL|HEAP|HIDDEN|IDENTIFIED|IMMEDIATE|INCLUDING|INCREMENT|INDICATOR|INDEXES|INDICES|INFINITE|INITIAL|ISOPEN|INSTANTIABLE|INTERFACE|INVALIDATE|JAVA|LARGE|LEADING|LENGTH|LIBRARY|LIKE[24C]|LIMITED|LONG|LOOP|MAP|MAXEXTENTS|MAXLEN|MEMBER|MINUS|MLSLABEL|MULTISET|NAME|NAN|NATIVE|NEW|NOAUDIT|NOCOMPRESS|NOCOPY|NOTFOUND|NOWAIT|NUMBER(?:_BASE)?|OBJECT|OCI(?:COLL|DATE|DATETIME|DURATION|INTERVAL|LOBLOCATOR|NUMBER|RAW|REF|REFCURSOR|ROWID|STRING|TYPE)|OFFLINE|ONLINE|ONLY|OPAQUE|OPERATOR|ORACLE|ORADATA|ORGANIZATION|ORL(?:ANY|VARY)|OTHERS|OVERLAPS|OVERRIDING|PACKAGE|PARALLEL_ENABLE|PARAMETERS?|PASCAL|PCTFREE|PIPE(?:LINED)?|PRAGMA|PRIOR|PRIVATE|RAISE|RANGE|RAW|RECORD|REF|REFERENCE|REM|REMAINDER|RESULT|RESOURCE|RETURNING|REVERSE|ROW(?:ID|NUM|TYPE)|SAMPLE|SB[124]|SEGMENT|SELF|SEPARATE|SEQUENCE|SHORT|SIZE(?:_T)?|SPARSE|SQL(?:CODE|DATA|NAME|STATE)|STANDARD|STATIC|STDDEV|STORED|STRING|STRUCT|STYLE|SUBMULTISET|SUBPARTITION|SUBSTITUTABLE|SUBTYPE|SUCCESSFUL|SYNONYM|SYSDATE|TABAUTH|TDO|THE|TIMEZONE_(?:ABBR|HOUR|MINUTE|REGION)|TRAILING|TRANSAC(?:TIONAL)?|TRUSTED|UB[124]|UID|UNDER|UNTRUSTED|VALIDATE|VALIST|VARCHAR2|VARIABLE|VARIANCE|VARRAY|VIEWS|VOID|WHENEVER|WRAPPED|ZONE)\b/i);var R=A.operator;Array.isArray(R)||(R=A.operator=[R]),R.unshift(/:=/)}(Prism); \ No newline at end of file +!function(E){var A=E.languages.plsql=E.languages.extend("sql",{comment:[/\/\*[\s\S]*?\*\//,/--.*/]}),T=A.keyword;Array.isArray(T)||(T=A.keyword=[T]),T.unshift(/\b(?:ACCESS|AGENT|AGGREGATE|ARRAY|ARROW|AT|ATTRIBUTE|AUDIT|AUTHID|BFILE_BASE|BLOB_BASE|BLOCK|BODY|BOTH|BOUND|BYTE|CALLING|CHARSET(?:FORM|ID)|CHAR_BASE|CLOB_BASE|CLUSTERS?|COLAUTH|COLLECT|COMPILED|COMPRESS|CONSTANT|CONSTRUCTOR|CONTEXT|CRASH|CUSTOMDATUM|DANGLING|DATE_BASE|DEFINE|DETERMINISTIC|DURATION|ELEMENT|EMPTY|EXCEPTIONS?|EXCLUSIVE|EXTERNAL|FINAL|FORALL|FORM|FOUND|GENERAL|HEAP|HIDDEN|IDENTIFIED|IMMEDIATE|INCLUDING|INCREMENT|INDEXES|INDICATOR|INDICES|INFINITE|INITIAL|INSTANTIABLE|INTERFACE|INVALIDATE|ISOPEN|JAVA|LARGE|LEADING|LENGTH|LIBRARY|LIKE[24C]|LIMITED|LONG|LOOP|MAP|MAXEXTENTS|MAXLEN|MEMBER|MINUS|MLSLABEL|MULTISET|NAME|NAN|NATIVE|NEW|NOAUDIT|NOCOMPRESS|NOCOPY|NOTFOUND|NOWAIT|NUMBER(?:_BASE)?|OBJECT|OCI(?:COLL|DATE|DATETIME|DURATION|INTERVAL|LOBLOCATOR|NUMBER|RAW|REF|REFCURSOR|ROWID|STRING|TYPE)|OFFLINE|ONLINE|ONLY|OPAQUE|OPERATOR|ORACLE|ORADATA|ORGANIZATION|ORL(?:ANY|VARY)|OTHERS|OVERLAPS|OVERRIDING|PACKAGE|PARALLEL_ENABLE|PARAMETERS?|PASCAL|PCTFREE|PIPE(?:LINED)?|PRAGMA|PRIOR|PRIVATE|RAISE|RANGE|RAW|RECORD|REF|REFERENCE|REM|REMAINDER|RESOURCE|RESULT|RETURNING|REVERSE|ROW(?:ID|NUM|TYPE)|SAMPLE|SB[124]|SEGMENT|SELF|SEPARATE|SEQUENCE|SHORT|SIZE(?:_T)?|SPARSE|SQL(?:CODE|DATA|NAME|STATE)|STANDARD|STATIC|STDDEV|STORED|STRING|STRUCT|STYLE|SUBMULTISET|SUBPARTITION|SUBSTITUTABLE|SUBTYPE|SUCCESSFUL|SYNONYM|SYSDATE|TABAUTH|TDO|THE|TIMEZONE_(?:ABBR|HOUR|MINUTE|REGION)|TRAILING|TRANSAC(?:TIONAL)?|TRUSTED|UB[124]|UID|UNDER|UNTRUSTED|VALIDATE|VALIST|VARCHAR2|VARIABLE|VARIANCE|VARRAY|VIEWS|VOID|WHENEVER|WRAPPED|ZONE)\b/i);var R=A.operator;Array.isArray(R)||(R=A.operator=[R]),R.unshift(/:=/)}(Prism); \ No newline at end of file diff --git a/components/prism-powerquery.js b/components/prism-powerquery.js index c947727705..8e8c28c91b 100644 --- a/components/prism-powerquery.js +++ b/components/prism-powerquery.js @@ -15,25 +15,25 @@ Prism.languages.powerquery = { greedy: true }, 'constant': [ - /\bDay\.(?:Sunday|Monday|Tuesday|Wednesday|Thursday|Friday|Saturday)\b/, + /\bDay\.(?:Friday|Monday|Saturday|Sunday|Thursday|Tuesday|Wednesday)\b/, /\bTraceLevel\.(?:Critical|Error|Information|Verbose|Warning)\b/, - /\bOccurrence\.(?:First|Last|All)\b/, + /\bOccurrence\.(?:All|First|Last)\b/, /\bOrder\.(?:Ascending|Descending)\b/, /\bRoundingMode\.(?:AwayFromZero|Down|ToEven|TowardZero|Up)\b/, /\bMissingField\.(?:Error|Ignore|UseNull)\b/, /\bQuoteStyle\.(?:Csv|None)\b/, - /\bJoinKind\.(?:Inner|LeftOuter|RightOuter|FullOuter|LeftAnti|RightAnti)\b/, + /\bJoinKind\.(?:FullOuter|Inner|LeftAnti|LeftOuter|RightAnti|RightOuter)\b/, /\bGroupKind\.(?:Global|Local)\b/, - /\bExtraValues\.(?:List|Ignore|Error)\b/, - /\bJoinAlgorithm\.(?:Dynamic|PairwiseHash|SortMerge|LeftHash|RightHash|LeftIndex|RightIndex)\b/, + /\bExtraValues\.(?:Error|Ignore|List)\b/, + /\bJoinAlgorithm\.(?:Dynamic|LeftHash|LeftIndex|PairwiseHash|RightHash|RightIndex|SortMerge)\b/, /\bJoinSide\.(?:Left|Right)\b/, - /\bPrecision\.(?:Double|Decimal)\b/, + /\bPrecision\.(?:Decimal|Double)\b/, /\bRelativePosition\.From(?:End|Start)\b/, - /\bTextEncoding\.(?:Ascii|BigEndianUnicode|Unicode|Utf8|Utf16|Windows)\b/, - /\b(?:Any|Binary|Date|DateTime|DateTimeZone|Duration|Int8|Int16|Int32|Int64|Function|List|Logical|None|Number|Record|Table|Text|Time)\.Type\b/, + /\bTextEncoding\.(?:Ascii|BigEndianUnicode|Unicode|Utf16|Utf8|Windows)\b/, + /\b(?:Any|Binary|Date|DateTime|DateTimeZone|Duration|Function|Int16|Int32|Int64|Int8|List|Logical|None|Number|Record|Table|Text|Time)\.Type\b/, /\bnull\b/ ], - 'boolean': /\b(?:true|false)\b/, + 'boolean': /\b(?:false|true)\b/, 'keyword': /\b(?:and|as|each|else|error|if|in|is|let|meta|not|nullable|optional|or|otherwise|section|shared|then|try|type)\b|#(?:binary|date|datetime|datetimezone|duration|infinity|nan|sections|shared|table|time)\b/, 'function': { pattern: /(^|[^#\w.])(?!\d)[\w.]+(?=\s*\()/, diff --git a/components/prism-powerquery.min.js b/components/prism-powerquery.min.js index e6ef36d1c7..d04a74eaf1 100644 --- a/components/prism-powerquery.min.js +++ b/components/prism-powerquery.min.js @@ -1 +1 @@ -Prism.languages.powerquery={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:\/\/).*)/,lookbehind:!0},"quoted-identifier":{pattern:/#"(?:[^"\r\n]|"")*"(?!")/,greedy:!0,alias:"variable"},string:{pattern:/"(?:[^"\r\n]|"")*"(?!")/,greedy:!0},constant:[/\bDay\.(?:Sunday|Monday|Tuesday|Wednesday|Thursday|Friday|Saturday)\b/,/\bTraceLevel\.(?:Critical|Error|Information|Verbose|Warning)\b/,/\bOccurrence\.(?:First|Last|All)\b/,/\bOrder\.(?:Ascending|Descending)\b/,/\bRoundingMode\.(?:AwayFromZero|Down|ToEven|TowardZero|Up)\b/,/\bMissingField\.(?:Error|Ignore|UseNull)\b/,/\bQuoteStyle\.(?:Csv|None)\b/,/\bJoinKind\.(?:Inner|LeftOuter|RightOuter|FullOuter|LeftAnti|RightAnti)\b/,/\bGroupKind\.(?:Global|Local)\b/,/\bExtraValues\.(?:List|Ignore|Error)\b/,/\bJoinAlgorithm\.(?:Dynamic|PairwiseHash|SortMerge|LeftHash|RightHash|LeftIndex|RightIndex)\b/,/\bJoinSide\.(?:Left|Right)\b/,/\bPrecision\.(?:Double|Decimal)\b/,/\bRelativePosition\.From(?:End|Start)\b/,/\bTextEncoding\.(?:Ascii|BigEndianUnicode|Unicode|Utf8|Utf16|Windows)\b/,/\b(?:Any|Binary|Date|DateTime|DateTimeZone|Duration|Int8|Int16|Int32|Int64|Function|List|Logical|None|Number|Record|Table|Text|Time)\.Type\b/,/\bnull\b/],boolean:/\b(?:true|false)\b/,keyword:/\b(?:and|as|each|else|error|if|in|is|let|meta|not|nullable|optional|or|otherwise|section|shared|then|try|type)\b|#(?:binary|date|datetime|datetimezone|duration|infinity|nan|sections|shared|table|time)\b/,function:{pattern:/(^|[^#\w.])(?!\d)[\w.]+(?=\s*\()/,lookbehind:!0},"data-type":{pattern:/\b(?:any|anynonnull|binary|date|datetime|datetimezone|duration|function|list|logical|none|number|record|table|text|time|type)\b/,alias:"variable"},number:{pattern:/\b0x[\da-f]+\b|(?:[+-]?(?:\b\d+\.)?\b\d+|[+-]\.\d+|(^|[^.])\B\.\d+)(?:e[+-]?\d+)?\b/i,lookbehind:!0},operator:/[-+*\/&?@^]|<(?:=>?|>)?|>=?|=>?|\.\.\.?/,punctuation:/[,;\[\](){}]/},Prism.languages.pq=Prism.languages.powerquery,Prism.languages.mscript=Prism.languages.powerquery; \ No newline at end of file +Prism.languages.powerquery={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:\/\/).*)/,lookbehind:!0},"quoted-identifier":{pattern:/#"(?:[^"\r\n]|"")*"(?!")/,greedy:!0,alias:"variable"},string:{pattern:/"(?:[^"\r\n]|"")*"(?!")/,greedy:!0},constant:[/\bDay\.(?:Friday|Monday|Saturday|Sunday|Thursday|Tuesday|Wednesday)\b/,/\bTraceLevel\.(?:Critical|Error|Information|Verbose|Warning)\b/,/\bOccurrence\.(?:All|First|Last)\b/,/\bOrder\.(?:Ascending|Descending)\b/,/\bRoundingMode\.(?:AwayFromZero|Down|ToEven|TowardZero|Up)\b/,/\bMissingField\.(?:Error|Ignore|UseNull)\b/,/\bQuoteStyle\.(?:Csv|None)\b/,/\bJoinKind\.(?:FullOuter|Inner|LeftAnti|LeftOuter|RightAnti|RightOuter)\b/,/\bGroupKind\.(?:Global|Local)\b/,/\bExtraValues\.(?:Error|Ignore|List)\b/,/\bJoinAlgorithm\.(?:Dynamic|LeftHash|LeftIndex|PairwiseHash|RightHash|RightIndex|SortMerge)\b/,/\bJoinSide\.(?:Left|Right)\b/,/\bPrecision\.(?:Decimal|Double)\b/,/\bRelativePosition\.From(?:End|Start)\b/,/\bTextEncoding\.(?:Ascii|BigEndianUnicode|Unicode|Utf16|Utf8|Windows)\b/,/\b(?:Any|Binary|Date|DateTime|DateTimeZone|Duration|Function|Int16|Int32|Int64|Int8|List|Logical|None|Number|Record|Table|Text|Time)\.Type\b/,/\bnull\b/],boolean:/\b(?:false|true)\b/,keyword:/\b(?:and|as|each|else|error|if|in|is|let|meta|not|nullable|optional|or|otherwise|section|shared|then|try|type)\b|#(?:binary|date|datetime|datetimezone|duration|infinity|nan|sections|shared|table|time)\b/,function:{pattern:/(^|[^#\w.])(?!\d)[\w.]+(?=\s*\()/,lookbehind:!0},"data-type":{pattern:/\b(?:any|anynonnull|binary|date|datetime|datetimezone|duration|function|list|logical|none|number|record|table|text|time|type)\b/,alias:"variable"},number:{pattern:/\b0x[\da-f]+\b|(?:[+-]?(?:\b\d+\.)?\b\d+|[+-]\.\d+|(^|[^.])\B\.\d+)(?:e[+-]?\d+)?\b/i,lookbehind:!0},operator:/[-+*\/&?@^]|<(?:=>?|>)?|>=?|=>?|\.\.\.?/,punctuation:/[,;\[\](){}]/},Prism.languages.pq=Prism.languages.powerquery,Prism.languages.mscript=Prism.languages.powerquery; \ No newline at end of file diff --git a/components/prism-powershell.js b/components/prism-powershell.js index e74f9ac802..88b06446db 100644 --- a/components/prism-powershell.js +++ b/components/prism-powershell.js @@ -33,7 +33,7 @@ // Matches name spaces as well as casts, attribute decorators. Force starting with letter to avoid matching array indices // Supports two levels of nested brackets (e.g. `[OutputType([System.Collections.Generic.List[int]])]`) 'namespace': /\[[a-z](?:\[(?:\[[^\]]*\]|[^\[\]])*\]|[^\[\]])*\]/i, - 'boolean': /\$(?:true|false)\b/i, + 'boolean': /\$(?:false|true)\b/i, 'variable': /\$\w+\b/, // Cmdlets and aliases. Aliases should come last, otherwise "write" gets preferred over "write-host" for example // Get-Command | ?{ $_.ModuleName -match "Microsoft.PowerShell.(Util|Core|Management)" } @@ -45,7 +45,7 @@ // per http://technet.microsoft.com/en-us/library/hh847744.aspx 'keyword': /\b(?:Begin|Break|Catch|Class|Continue|Data|Define|Do|DynamicParam|Else|ElseIf|End|Exit|Filter|Finally|For|ForEach|From|Function|If|InlineScript|Parallel|Param|Process|Return|Sequence|Switch|Throw|Trap|Try|Until|Using|Var|While|Workflow)\b/i, 'operator': { - pattern: /(\W?)(?:!|-(?:eq|ne|gt|ge|lt|le|sh[lr]|not|b?(?:and|x?or)|(?:Not)?(?:Like|Match|Contains|In)|Replace|Join|is(?:Not)?|as)\b|-[-=]?|\+[+=]?|[*\/%]=?)/i, + pattern: /(\W?)(?:!|-(?:b?(?:and|x?or)|as|(?:Not)?(?:Contains|In|Like|Match)|eq|ge|gt|is(?:Not)?|Join|le|lt|ne|not|Replace|sh[lr])\b|-[-=]?|\+[+=]?|[*\/%]=?)/i, lookbehind: true }, 'punctuation': /[|{}[\];(),.]/ diff --git a/components/prism-powershell.min.js b/components/prism-powershell.min.js index afd0188afa..c6da310f22 100644 --- a/components/prism-powershell.min.js +++ b/components/prism-powershell.min.js @@ -1 +1 @@ -!function(e){var i=Prism.languages.powershell={comment:[{pattern:/(^|[^`])<#[\s\S]*?#>/,lookbehind:!0},{pattern:/(^|[^`])#.*/,lookbehind:!0}],string:[{pattern:/"(?:`[\s\S]|[^`"])*"/,greedy:!0,inside:{function:{pattern:/(^|[^`])\$\((?:\$\([^\r\n()]*\)|(?!\$\()[^\r\n)])*\)/,lookbehind:!0,inside:{}}}},{pattern:/'(?:[^']|'')*'/,greedy:!0}],namespace:/\[[a-z](?:\[(?:\[[^\]]*\]|[^\[\]])*\]|[^\[\]])*\]/i,boolean:/\$(?:true|false)\b/i,variable:/\$\w+\b/,function:[/\b(?:Add|Approve|Assert|Backup|Block|Checkpoint|Clear|Close|Compare|Complete|Compress|Confirm|Connect|Convert|ConvertFrom|ConvertTo|Copy|Debug|Deny|Disable|Disconnect|Dismount|Edit|Enable|Enter|Exit|Expand|Export|Find|ForEach|Format|Get|Grant|Group|Hide|Import|Initialize|Install|Invoke|Join|Limit|Lock|Measure|Merge|Move|New|Open|Optimize|Out|Ping|Pop|Protect|Publish|Push|Read|Receive|Redo|Register|Remove|Rename|Repair|Request|Reset|Resize|Resolve|Restart|Restore|Resume|Revoke|Save|Search|Select|Send|Set|Show|Skip|Sort|Split|Start|Step|Stop|Submit|Suspend|Switch|Sync|Tee|Test|Trace|Unblock|Undo|Uninstall|Unlock|Unprotect|Unpublish|Unregister|Update|Use|Wait|Watch|Where|Write)-[a-z]+\b/i,/\b(?:ac|cat|chdir|clc|cli|clp|clv|compare|copy|cp|cpi|cpp|cvpa|dbp|del|diff|dir|ebp|echo|epal|epcsv|epsn|erase|fc|fl|ft|fw|gal|gbp|gc|gci|gcs|gdr|gi|gl|gm|gp|gps|group|gsv|gu|gv|gwmi|iex|ii|ipal|ipcsv|ipsn|irm|iwmi|iwr|kill|lp|ls|measure|mi|mount|move|mp|mv|nal|ndr|ni|nv|ogv|popd|ps|pushd|pwd|rbp|rd|rdr|ren|ri|rm|rmdir|rni|rnp|rp|rv|rvpa|rwmi|sal|saps|sasv|sbp|sc|select|set|shcm|si|sl|sleep|sls|sort|sp|spps|spsv|start|sv|swmi|tee|trcm|type|write)\b/i],keyword:/\b(?:Begin|Break|Catch|Class|Continue|Data|Define|Do|DynamicParam|Else|ElseIf|End|Exit|Filter|Finally|For|ForEach|From|Function|If|InlineScript|Parallel|Param|Process|Return|Sequence|Switch|Throw|Trap|Try|Until|Using|Var|While|Workflow)\b/i,operator:{pattern:/(\W?)(?:!|-(?:eq|ne|gt|ge|lt|le|sh[lr]|not|b?(?:and|x?or)|(?:Not)?(?:Like|Match|Contains|In)|Replace|Join|is(?:Not)?|as)\b|-[-=]?|\+[+=]?|[*\/%]=?)/i,lookbehind:!0},punctuation:/[|{}[\];(),.]/},r=i.string[0].inside;r.boolean=i.boolean,r.variable=i.variable,r.function.inside=i}(); \ No newline at end of file +!function(e){var i=Prism.languages.powershell={comment:[{pattern:/(^|[^`])<#[\s\S]*?#>/,lookbehind:!0},{pattern:/(^|[^`])#.*/,lookbehind:!0}],string:[{pattern:/"(?:`[\s\S]|[^`"])*"/,greedy:!0,inside:{function:{pattern:/(^|[^`])\$\((?:\$\([^\r\n()]*\)|(?!\$\()[^\r\n)])*\)/,lookbehind:!0,inside:{}}}},{pattern:/'(?:[^']|'')*'/,greedy:!0}],namespace:/\[[a-z](?:\[(?:\[[^\]]*\]|[^\[\]])*\]|[^\[\]])*\]/i,boolean:/\$(?:false|true)\b/i,variable:/\$\w+\b/,function:[/\b(?:Add|Approve|Assert|Backup|Block|Checkpoint|Clear|Close|Compare|Complete|Compress|Confirm|Connect|Convert|ConvertFrom|ConvertTo|Copy|Debug|Deny|Disable|Disconnect|Dismount|Edit|Enable|Enter|Exit|Expand|Export|Find|ForEach|Format|Get|Grant|Group|Hide|Import|Initialize|Install|Invoke|Join|Limit|Lock|Measure|Merge|Move|New|Open|Optimize|Out|Ping|Pop|Protect|Publish|Push|Read|Receive|Redo|Register|Remove|Rename|Repair|Request|Reset|Resize|Resolve|Restart|Restore|Resume|Revoke|Save|Search|Select|Send|Set|Show|Skip|Sort|Split|Start|Step|Stop|Submit|Suspend|Switch|Sync|Tee|Test|Trace|Unblock|Undo|Uninstall|Unlock|Unprotect|Unpublish|Unregister|Update|Use|Wait|Watch|Where|Write)-[a-z]+\b/i,/\b(?:ac|cat|chdir|clc|cli|clp|clv|compare|copy|cp|cpi|cpp|cvpa|dbp|del|diff|dir|ebp|echo|epal|epcsv|epsn|erase|fc|fl|ft|fw|gal|gbp|gc|gci|gcs|gdr|gi|gl|gm|gp|gps|group|gsv|gu|gv|gwmi|iex|ii|ipal|ipcsv|ipsn|irm|iwmi|iwr|kill|lp|ls|measure|mi|mount|move|mp|mv|nal|ndr|ni|nv|ogv|popd|ps|pushd|pwd|rbp|rd|rdr|ren|ri|rm|rmdir|rni|rnp|rp|rv|rvpa|rwmi|sal|saps|sasv|sbp|sc|select|set|shcm|si|sl|sleep|sls|sort|sp|spps|spsv|start|sv|swmi|tee|trcm|type|write)\b/i],keyword:/\b(?:Begin|Break|Catch|Class|Continue|Data|Define|Do|DynamicParam|Else|ElseIf|End|Exit|Filter|Finally|For|ForEach|From|Function|If|InlineScript|Parallel|Param|Process|Return|Sequence|Switch|Throw|Trap|Try|Until|Using|Var|While|Workflow)\b/i,operator:{pattern:/(\W?)(?:!|-(?:b?(?:and|x?or)|as|(?:Not)?(?:Contains|In|Like|Match)|eq|ge|gt|is(?:Not)?|Join|le|lt|ne|not|Replace|sh[lr])\b|-[-=]?|\+[+=]?|[*\/%]=?)/i,lookbehind:!0},punctuation:/[|{}[\];(),.]/},r=i.string[0].inside;r.boolean=i.boolean,r.variable=i.variable,r.function.inside=i}(); \ No newline at end of file diff --git a/components/prism-processing.js b/components/prism-processing.js index ac10215dc3..f2558d2d84 100644 --- a/components/prism-processing.js +++ b/components/prism-processing.js @@ -1,5 +1,5 @@ Prism.languages.processing = Prism.languages.extend('clike', { - 'keyword': /\b(?:break|catch|case|class|continue|default|else|extends|final|for|if|implements|import|new|null|private|public|return|static|super|switch|this|try|void|while)\b/, + 'keyword': /\b(?:break|case|catch|class|continue|default|else|extends|final|for|if|implements|import|new|null|private|public|return|static|super|switch|this|try|void|while)\b/, 'operator': /<[<=]?|>[>=]?|&&?|\|\|?|[%?]|[!=+\-*\/]=?/ }); Prism.languages.insertBefore('processing', 'number', { diff --git a/components/prism-processing.min.js b/components/prism-processing.min.js index ff5583053b..d941bf4f44 100644 --- a/components/prism-processing.min.js +++ b/components/prism-processing.min.js @@ -1 +1 @@ -Prism.languages.processing=Prism.languages.extend("clike",{keyword:/\b(?:break|catch|case|class|continue|default|else|extends|final|for|if|implements|import|new|null|private|public|return|static|super|switch|this|try|void|while)\b/,operator:/<[<=]?|>[>=]?|&&?|\|\|?|[%?]|[!=+\-*\/]=?/}),Prism.languages.insertBefore("processing","number",{constant:/\b(?!XML\b)[A-Z][A-Z\d_]+\b/,type:{pattern:/\b(?:boolean|byte|char|color|double|float|int|[A-Z]\w*)\b/,alias:"variable"}}),Prism.languages.processing.function=/\b\w+(?=\s*\()/,Prism.languages.processing["class-name"].alias="variable"; \ No newline at end of file +Prism.languages.processing=Prism.languages.extend("clike",{keyword:/\b(?:break|case|catch|class|continue|default|else|extends|final|for|if|implements|import|new|null|private|public|return|static|super|switch|this|try|void|while)\b/,operator:/<[<=]?|>[>=]?|&&?|\|\|?|[%?]|[!=+\-*\/]=?/}),Prism.languages.insertBefore("processing","number",{constant:/\b(?!XML\b)[A-Z][A-Z\d_]+\b/,type:{pattern:/\b(?:boolean|byte|char|color|double|float|int|[A-Z]\w*)\b/,alias:"variable"}}),Prism.languages.processing.function=/\b\w+(?=\s*\()/,Prism.languages.processing["class-name"].alias="variable"; \ No newline at end of file diff --git a/components/prism-promql.js b/components/prism-promql.js index d78f00a3bb..d12f730383 100644 --- a/components/prism-promql.js +++ b/components/prism-promql.js @@ -93,7 +93,7 @@ 'keyword': new RegExp('\\b(?:' + keywords.join('|') + ')\\b', 'i'), 'function': /\b[a-z_]\w*(?=\s*\()/i, 'number': /[-+]?(?:(?:\b\d+(?:\.\d+)?|\B\.\d+)(?:e[-+]?\d+)?\b|\b(?:0x[0-9a-f]+|nan|inf)\b)/i, - 'operator': /[\^*/%+-]|==|!=|<=|<|>=|>|\b(?:and|unless|or)\b/i, + 'operator': /[\^*/%+-]|==|!=|<=|<|>=|>|\b(?:and|or|unless)\b/i, 'punctuation': /[{};()`,.[\]]/, }; }(Prism)); diff --git a/components/prism-promql.min.js b/components/prism-promql.min.js index 2a40ae694e..46253c3263 100644 --- a/components/prism-promql.min.js +++ b/components/prism-promql.min.js @@ -1 +1 @@ -!function(t){var n=["on","ignoring","group_right","group_left","by","without"],a=["sum","min","max","avg","group","stddev","stdvar","count","count_values","bottomk","topk","quantile"].concat(n,["offset"]);t.languages.promql={comment:{pattern:/(^[ \t]*)#.*/m,lookbehind:!0},"vector-match":{pattern:new RegExp("((?:"+n.join("|")+")\\s*)\\([^)]*\\)"),lookbehind:!0,inside:{"label-key":{pattern:/\b[^,]+\b/,alias:"attr-name"},punctuation:/[(),]/}},"context-labels":{pattern:/\{[^{}]*\}/,inside:{"label-key":{pattern:/\b[a-z_]\w*(?=\s*(?:=|![=~]))/,alias:"attr-name"},"label-value":{pattern:/(["'`])(?:\\[\s\S]|(?!\1)[^\\])*\1/,greedy:!0,alias:"attr-value"},punctuation:/\{|\}|=~?|![=~]|,/}},"context-range":[{pattern:/\[[\w\s:]+\]/,inside:{punctuation:/\[|\]|:/,"range-duration":{pattern:/\b(?:\d+(?:[smhdwy]|ms))+\b/i,alias:"number"}}},{pattern:/(\boffset\s+)\w+/,lookbehind:!0,inside:{"range-duration":{pattern:/\b(?:\d+(?:[smhdwy]|ms))+\b/i,alias:"number"}}}],keyword:new RegExp("\\b(?:"+a.join("|")+")\\b","i"),function:/\b[a-z_]\w*(?=\s*\()/i,number:/[-+]?(?:(?:\b\d+(?:\.\d+)?|\B\.\d+)(?:e[-+]?\d+)?\b|\b(?:0x[0-9a-f]+|nan|inf)\b)/i,operator:/[\^*/%+-]|==|!=|<=|<|>=|>|\b(?:and|unless|or)\b/i,punctuation:/[{};()`,.[\]]/}}(Prism); \ No newline at end of file +!function(t){var n=["on","ignoring","group_right","group_left","by","without"],a=["sum","min","max","avg","group","stddev","stdvar","count","count_values","bottomk","topk","quantile"].concat(n,["offset"]);t.languages.promql={comment:{pattern:/(^[ \t]*)#.*/m,lookbehind:!0},"vector-match":{pattern:new RegExp("((?:"+n.join("|")+")\\s*)\\([^)]*\\)"),lookbehind:!0,inside:{"label-key":{pattern:/\b[^,]+\b/,alias:"attr-name"},punctuation:/[(),]/}},"context-labels":{pattern:/\{[^{}]*\}/,inside:{"label-key":{pattern:/\b[a-z_]\w*(?=\s*(?:=|![=~]))/,alias:"attr-name"},"label-value":{pattern:/(["'`])(?:\\[\s\S]|(?!\1)[^\\])*\1/,greedy:!0,alias:"attr-value"},punctuation:/\{|\}|=~?|![=~]|,/}},"context-range":[{pattern:/\[[\w\s:]+\]/,inside:{punctuation:/\[|\]|:/,"range-duration":{pattern:/\b(?:\d+(?:[smhdwy]|ms))+\b/i,alias:"number"}}},{pattern:/(\boffset\s+)\w+/,lookbehind:!0,inside:{"range-duration":{pattern:/\b(?:\d+(?:[smhdwy]|ms))+\b/i,alias:"number"}}}],keyword:new RegExp("\\b(?:"+a.join("|")+")\\b","i"),function:/\b[a-z_]\w*(?=\s*\()/i,number:/[-+]?(?:(?:\b\d+(?:\.\d+)?|\B\.\d+)(?:e[-+]?\d+)?\b|\b(?:0x[0-9a-f]+|nan|inf)\b)/i,operator:/[\^*/%+-]|==|!=|<=|<|>=|>|\b(?:and|or|unless)\b/i,punctuation:/[{};()`,.[\]]/}}(Prism); \ No newline at end of file diff --git a/components/prism-protobuf.js b/components/prism-protobuf.js index 165c304976..abe7574d61 100644 --- a/components/prism-protobuf.js +++ b/components/prism-protobuf.js @@ -1,6 +1,6 @@ (function (Prism) { - var builtinTypes = /\b(?:double|float|[su]?int(?:32|64)|s?fixed(?:32|64)|bool|string|bytes)\b/; + var builtinTypes = /\b(?:bool|bytes|double|s?fixed(?:32|64)|float|[su]?int(?:32|64)|string)\b/; Prism.languages.protobuf = Prism.languages.extend('clike', { 'class-name': [ diff --git a/components/prism-protobuf.min.js b/components/prism-protobuf.min.js index 32e4a2417b..9bc79f4632 100644 --- a/components/prism-protobuf.min.js +++ b/components/prism-protobuf.min.js @@ -1 +1 @@ -!function(e){var s=/\b(?:double|float|[su]?int(?:32|64)|s?fixed(?:32|64)|bool|string|bytes)\b/;e.languages.protobuf=e.languages.extend("clike",{"class-name":[{pattern:/(\b(?:enum|extend|message|service)\s+)[A-Za-z_]\w*(?=\s*\{)/,lookbehind:!0},{pattern:/(\b(?:rpc\s+\w+|returns)\s*\(\s*(?:stream\s+)?)\.?[A-Za-z_]\w*(?:\.[A-Za-z_]\w*)*(?=\s*\))/,lookbehind:!0}],keyword:/\b(?:enum|extend|extensions|import|message|oneof|option|optional|package|public|repeated|required|reserved|returns|rpc(?=\s+\w)|service|stream|syntax|to)\b(?!\s*=\s*\d)/,function:/\b[a-z_]\w*(?=\s*\()/i}),e.languages.insertBefore("protobuf","operator",{map:{pattern:/\bmap<\s*[\w.]+\s*,\s*[\w.]+\s*>(?=\s+[a-z_]\w*\s*[=;])/i,alias:"class-name",inside:{punctuation:/[<>.,]/,builtin:s}},builtin:s,"positional-class-name":{pattern:/(?:\b|\B\.)[a-z_]\w*(?:\.[a-z_]\w*)*(?=\s+[a-z_]\w*\s*[=;])/i,alias:"class-name",inside:{punctuation:/\./}},annotation:{pattern:/(\[\s*)[a-z_]\w*(?=\s*=)/i,lookbehind:!0}})}(Prism); \ No newline at end of file +!function(e){var s=/\b(?:bool|bytes|double|s?fixed(?:32|64)|float|[su]?int(?:32|64)|string)\b/;e.languages.protobuf=e.languages.extend("clike",{"class-name":[{pattern:/(\b(?:enum|extend|message|service)\s+)[A-Za-z_]\w*(?=\s*\{)/,lookbehind:!0},{pattern:/(\b(?:rpc\s+\w+|returns)\s*\(\s*(?:stream\s+)?)\.?[A-Za-z_]\w*(?:\.[A-Za-z_]\w*)*(?=\s*\))/,lookbehind:!0}],keyword:/\b(?:enum|extend|extensions|import|message|oneof|option|optional|package|public|repeated|required|reserved|returns|rpc(?=\s+\w)|service|stream|syntax|to)\b(?!\s*=\s*\d)/,function:/\b[a-z_]\w*(?=\s*\()/i}),e.languages.insertBefore("protobuf","operator",{map:{pattern:/\bmap<\s*[\w.]+\s*,\s*[\w.]+\s*>(?=\s+[a-z_]\w*\s*[=;])/i,alias:"class-name",inside:{punctuation:/[<>.,]/,builtin:s}},builtin:s,"positional-class-name":{pattern:/(?:\b|\B\.)[a-z_]\w*(?:\.[a-z_]\w*)*(?=\s+[a-z_]\w*\s*[=;])/i,alias:"class-name",inside:{punctuation:/\./}},annotation:{pattern:/(\[\s*)[a-z_]\w*(?=\s*=)/i,lookbehind:!0}})}(Prism); \ No newline at end of file diff --git a/components/prism-psl.js b/components/prism-psl.js index 5bd80ec47a..f97b5b77d5 100644 --- a/components/prism-psl.js +++ b/components/prism-psl.js @@ -16,10 +16,10 @@ Prism.languages.psl = { greedy: true }, 'keyword': /\b(?:__multi|__single|case|default|do|else|elsif|exit|export|for|foreach|function|if|last|line|local|next|requires|return|switch|until|while|word)\b/, - 'constant': /\b(?:ALARM|CHART_ADD_GRAPH|CHART_DELETE_GRAPH|CHART_DESTROY|CHART_LOAD|CHART_PRINT|EOF|FALSE|False|false|NO|No|no|OFFLINE|OK|PSL_PROF_LOG|R_CHECK_HORIZ|R_CHECK_VERT|R_CLICKER|R_COLUMN|R_FRAME|R_ICON|R_LABEL|R_LABEL_CENTER|R_LIST_MULTIPLE|R_LIST_MULTIPLE_ND|R_LIST_SINGLE|R_LIST_SINGLE_ND|R_MENU|R_POPUP|R_POPUP_SCROLLED|R_RADIO_HORIZ|R_RADIO_VERT|R_ROW|R_SCALE_HORIZ|R_SCALE_VERT|R_SPINNER|R_TEXT_FIELD|R_TEXT_FIELD_LABEL|R_TOGGLE|TRIM_LEADING|TRIM_LEADING_AND_TRAILING|TRIM_REDUNDANT|TRIM_TRAILING|TRUE|True|true|VOID|WARN)\b/, - 'variable': /\b(?:errno|exit_status|PslDebug)\b/, + 'constant': /\b(?:ALARM|CHART_ADD_GRAPH|CHART_DELETE_GRAPH|CHART_DESTROY|CHART_LOAD|CHART_PRINT|EOF|FALSE|False|NO|No|OFFLINE|OK|PSL_PROF_LOG|R_CHECK_HORIZ|R_CHECK_VERT|R_CLICKER|R_COLUMN|R_FRAME|R_ICON|R_LABEL|R_LABEL_CENTER|R_LIST_MULTIPLE|R_LIST_MULTIPLE_ND|R_LIST_SINGLE|R_LIST_SINGLE_ND|R_MENU|R_POPUP|R_POPUP_SCROLLED|R_RADIO_HORIZ|R_RADIO_VERT|R_ROW|R_SCALE_HORIZ|R_SCALE_VERT|R_SPINNER|R_TEXT_FIELD|R_TEXT_FIELD_LABEL|R_TOGGLE|TRIM_LEADING|TRIM_LEADING_AND_TRAILING|TRIM_REDUNDANT|TRIM_TRAILING|TRUE|True|VOID|WARN|false|no|true)\b/, + 'variable': /\b(?:PslDebug|errno|exit_status)\b/, 'builtin': { - pattern: /\b(?:acos|add_diary|annotate|annotate_get|asctime|asin|atan|atexit|ascii_to_ebcdic|batch_set|blackout|cat|ceil|chan_exists|change_state|close|code_cvt|cond_signal|cond_wait|console_type|convert_base|convert_date|convert_locale_date|cos|cosh|create|destroy_lock|dump_hist|date|destroy|difference|dget_text|dcget_text|ebcdic_to_ascii|encrypt|event_archive|event_catalog_get|event_check|event_query|event_range_manage|event_range_query|event_report|event_schedule|event_trigger|event_trigger2|execute|exists|exp|fabs|floor|fmod|full_discovery|file|fopen|ftell|fseek|grep|get_vars|getenv|get|get_chan_info|get_ranges|get_text|gethostinfo|getpid|getpname|history_get_retention|history|index|int|is_var|intersection|isnumber|internal|in_transition|join|kill|length|lines|lock|lock_info|log|loge|log10|matchline|msg_check|msg_get_format|msg_get_severity|msg_printf|msg_sprintf|ntharg|num_consoles|nthargf|nthline|nthlinef|num_bytes|print|proc_exists|process|popen|printf|pconfig|poplines|pow|PslExecute|PslFunctionCall|PslFunctionExists|PslSetOptions|random|read|readln|refresh_parameters|remote_check|remote_close|remote_event_query|remote_event_trigger|remote_file_send|remote_open|remove|replace|rindex|sec_check_priv|sec_store_get|sec_store_set|set_alarm_ranges|set_locale|share|sin|sinh|sleep|sopen|sqrt|srandom|subset|set|substr|system|sprintf|sort|snmp_agent_config|_snmp_debug|snmp_agent_stop|snmp_agent_start|snmp_h_set|snmp_h_get_next|snmp_h_get|snmp_set|snmp_walk|snmp_get_next|snmp_get|snmp_config|snmp_close|snmp_open|snmp_trap_receive|snmp_trap_ignore|snmp_trap_listen|snmp_trap_send|snmp_trap_raise_std_trap|snmp_trap_register_im|splitline|strcasecmp|str_repeat|trim|tail|tan|tanh|time|tmpnam|tolower|toupper|trace_psl_process|text_domain|unlock|unique|union|unset|va_arg|va_start|write)\b/, + pattern: /\b(?:PslExecute|PslFunctionCall|PslFunctionExists|PslSetOptions|_snmp_debug|acos|add_diary|annotate|annotate_get|ascii_to_ebcdic|asctime|asin|atan|atexit|batch_set|blackout|cat|ceil|chan_exists|change_state|close|code_cvt|cond_signal|cond_wait|console_type|convert_base|convert_date|convert_locale_date|cos|cosh|create|date|dcget_text|destroy|destroy_lock|dget_text|difference|dump_hist|ebcdic_to_ascii|encrypt|event_archive|event_catalog_get|event_check|event_query|event_range_manage|event_range_query|event_report|event_schedule|event_trigger|event_trigger2|execute|exists|exp|fabs|file|floor|fmod|fopen|fseek|ftell|full_discovery|get|get_chan_info|get_ranges|get_text|get_vars|getenv|gethostinfo|getpid|getpname|grep|history|history_get_retention|in_transition|index|int|internal|intersection|is_var|isnumber|join|kill|length|lines|lock|lock_info|log|log10|loge|matchline|msg_check|msg_get_format|msg_get_severity|msg_printf|msg_sprintf|ntharg|nthargf|nthline|nthlinef|num_bytes|num_consoles|pconfig|popen|poplines|pow|print|printf|proc_exists|process|random|read|readln|refresh_parameters|remote_check|remote_close|remote_event_query|remote_event_trigger|remote_file_send|remote_open|remove|replace|rindex|sec_check_priv|sec_store_get|sec_store_set|set|set_alarm_ranges|set_locale|share|sin|sinh|sleep|snmp_agent_config|snmp_agent_start|snmp_agent_stop|snmp_close|snmp_config|snmp_get|snmp_get_next|snmp_h_get|snmp_h_get_next|snmp_h_set|snmp_open|snmp_set|snmp_trap_ignore|snmp_trap_listen|snmp_trap_raise_std_trap|snmp_trap_receive|snmp_trap_register_im|snmp_trap_send|snmp_walk|sopen|sort|splitline|sprintf|sqrt|srandom|str_repeat|strcasecmp|subset|substr|system|tail|tan|tanh|text_domain|time|tmpnam|tolower|toupper|trace_psl_process|trim|union|unique|unlock|unset|va_arg|va_start|write)\b/, alias: 'builtin-function' }, 'foreach-variable': { diff --git a/components/prism-psl.min.js b/components/prism-psl.min.js index 864a3fc052..49ba8a55b5 100644 --- a/components/prism-psl.min.js +++ b/components/prism-psl.min.js @@ -1 +1 @@ -Prism.languages.psl={comment:{pattern:/#.*/,greedy:!0},string:{pattern:/"(?:\\.|[^\\"])*"/,greedy:!0,inside:{symbol:/\\[ntrbA-Z"\\]/}},"heredoc-string":{pattern:/<<<([a-zA-Z_]\w*)[\r\n](?:.*[\r\n])*?\1\b/,alias:"string",greedy:!0},keyword:/\b(?:__multi|__single|case|default|do|else|elsif|exit|export|for|foreach|function|if|last|line|local|next|requires|return|switch|until|while|word)\b/,constant:/\b(?:ALARM|CHART_ADD_GRAPH|CHART_DELETE_GRAPH|CHART_DESTROY|CHART_LOAD|CHART_PRINT|EOF|FALSE|False|false|NO|No|no|OFFLINE|OK|PSL_PROF_LOG|R_CHECK_HORIZ|R_CHECK_VERT|R_CLICKER|R_COLUMN|R_FRAME|R_ICON|R_LABEL|R_LABEL_CENTER|R_LIST_MULTIPLE|R_LIST_MULTIPLE_ND|R_LIST_SINGLE|R_LIST_SINGLE_ND|R_MENU|R_POPUP|R_POPUP_SCROLLED|R_RADIO_HORIZ|R_RADIO_VERT|R_ROW|R_SCALE_HORIZ|R_SCALE_VERT|R_SPINNER|R_TEXT_FIELD|R_TEXT_FIELD_LABEL|R_TOGGLE|TRIM_LEADING|TRIM_LEADING_AND_TRAILING|TRIM_REDUNDANT|TRIM_TRAILING|TRUE|True|true|VOID|WARN)\b/,variable:/\b(?:errno|exit_status|PslDebug)\b/,builtin:{pattern:/\b(?:acos|add_diary|annotate|annotate_get|asctime|asin|atan|atexit|ascii_to_ebcdic|batch_set|blackout|cat|ceil|chan_exists|change_state|close|code_cvt|cond_signal|cond_wait|console_type|convert_base|convert_date|convert_locale_date|cos|cosh|create|destroy_lock|dump_hist|date|destroy|difference|dget_text|dcget_text|ebcdic_to_ascii|encrypt|event_archive|event_catalog_get|event_check|event_query|event_range_manage|event_range_query|event_report|event_schedule|event_trigger|event_trigger2|execute|exists|exp|fabs|floor|fmod|full_discovery|file|fopen|ftell|fseek|grep|get_vars|getenv|get|get_chan_info|get_ranges|get_text|gethostinfo|getpid|getpname|history_get_retention|history|index|int|is_var|intersection|isnumber|internal|in_transition|join|kill|length|lines|lock|lock_info|log|loge|log10|matchline|msg_check|msg_get_format|msg_get_severity|msg_printf|msg_sprintf|ntharg|num_consoles|nthargf|nthline|nthlinef|num_bytes|print|proc_exists|process|popen|printf|pconfig|poplines|pow|PslExecute|PslFunctionCall|PslFunctionExists|PslSetOptions|random|read|readln|refresh_parameters|remote_check|remote_close|remote_event_query|remote_event_trigger|remote_file_send|remote_open|remove|replace|rindex|sec_check_priv|sec_store_get|sec_store_set|set_alarm_ranges|set_locale|share|sin|sinh|sleep|sopen|sqrt|srandom|subset|set|substr|system|sprintf|sort|snmp_agent_config|_snmp_debug|snmp_agent_stop|snmp_agent_start|snmp_h_set|snmp_h_get_next|snmp_h_get|snmp_set|snmp_walk|snmp_get_next|snmp_get|snmp_config|snmp_close|snmp_open|snmp_trap_receive|snmp_trap_ignore|snmp_trap_listen|snmp_trap_send|snmp_trap_raise_std_trap|snmp_trap_register_im|splitline|strcasecmp|str_repeat|trim|tail|tan|tanh|time|tmpnam|tolower|toupper|trace_psl_process|text_domain|unlock|unique|union|unset|va_arg|va_start|write)\b/,alias:"builtin-function"},"foreach-variable":{pattern:/(\bforeach\s+(?:(?:\w+\b|"(?:\\.|[^\\"])*")\s+){0,2})[_a-zA-Z]\w*(?=\s*\()/,lookbehind:!0,greedy:!0},function:{pattern:/\b[_a-z]\w*\b(?=\s*\()/i},number:/\b(?:0x[0-9a-f]+|[0-9]+(?:\.[0-9]+)?)\b/i,operator:/--|\+\+|&&=?|\|\|=?|<<=?|>>=?|[=!]~|[-+*/%&|^!=<>]=?|\.|[:?]/,punctuation:/[(){}\[\];,]/}; \ No newline at end of file +Prism.languages.psl={comment:{pattern:/#.*/,greedy:!0},string:{pattern:/"(?:\\.|[^\\"])*"/,greedy:!0,inside:{symbol:/\\[ntrbA-Z"\\]/}},"heredoc-string":{pattern:/<<<([a-zA-Z_]\w*)[\r\n](?:.*[\r\n])*?\1\b/,alias:"string",greedy:!0},keyword:/\b(?:__multi|__single|case|default|do|else|elsif|exit|export|for|foreach|function|if|last|line|local|next|requires|return|switch|until|while|word)\b/,constant:/\b(?:ALARM|CHART_ADD_GRAPH|CHART_DELETE_GRAPH|CHART_DESTROY|CHART_LOAD|CHART_PRINT|EOF|FALSE|False|NO|No|OFFLINE|OK|PSL_PROF_LOG|R_CHECK_HORIZ|R_CHECK_VERT|R_CLICKER|R_COLUMN|R_FRAME|R_ICON|R_LABEL|R_LABEL_CENTER|R_LIST_MULTIPLE|R_LIST_MULTIPLE_ND|R_LIST_SINGLE|R_LIST_SINGLE_ND|R_MENU|R_POPUP|R_POPUP_SCROLLED|R_RADIO_HORIZ|R_RADIO_VERT|R_ROW|R_SCALE_HORIZ|R_SCALE_VERT|R_SPINNER|R_TEXT_FIELD|R_TEXT_FIELD_LABEL|R_TOGGLE|TRIM_LEADING|TRIM_LEADING_AND_TRAILING|TRIM_REDUNDANT|TRIM_TRAILING|TRUE|True|VOID|WARN|false|no|true)\b/,variable:/\b(?:PslDebug|errno|exit_status)\b/,builtin:{pattern:/\b(?:PslExecute|PslFunctionCall|PslFunctionExists|PslSetOptions|_snmp_debug|acos|add_diary|annotate|annotate_get|ascii_to_ebcdic|asctime|asin|atan|atexit|batch_set|blackout|cat|ceil|chan_exists|change_state|close|code_cvt|cond_signal|cond_wait|console_type|convert_base|convert_date|convert_locale_date|cos|cosh|create|date|dcget_text|destroy|destroy_lock|dget_text|difference|dump_hist|ebcdic_to_ascii|encrypt|event_archive|event_catalog_get|event_check|event_query|event_range_manage|event_range_query|event_report|event_schedule|event_trigger|event_trigger2|execute|exists|exp|fabs|file|floor|fmod|fopen|fseek|ftell|full_discovery|get|get_chan_info|get_ranges|get_text|get_vars|getenv|gethostinfo|getpid|getpname|grep|history|history_get_retention|in_transition|index|int|internal|intersection|is_var|isnumber|join|kill|length|lines|lock|lock_info|log|log10|loge|matchline|msg_check|msg_get_format|msg_get_severity|msg_printf|msg_sprintf|ntharg|nthargf|nthline|nthlinef|num_bytes|num_consoles|pconfig|popen|poplines|pow|print|printf|proc_exists|process|random|read|readln|refresh_parameters|remote_check|remote_close|remote_event_query|remote_event_trigger|remote_file_send|remote_open|remove|replace|rindex|sec_check_priv|sec_store_get|sec_store_set|set|set_alarm_ranges|set_locale|share|sin|sinh|sleep|snmp_agent_config|snmp_agent_start|snmp_agent_stop|snmp_close|snmp_config|snmp_get|snmp_get_next|snmp_h_get|snmp_h_get_next|snmp_h_set|snmp_open|snmp_set|snmp_trap_ignore|snmp_trap_listen|snmp_trap_raise_std_trap|snmp_trap_receive|snmp_trap_register_im|snmp_trap_send|snmp_walk|sopen|sort|splitline|sprintf|sqrt|srandom|str_repeat|strcasecmp|subset|substr|system|tail|tan|tanh|text_domain|time|tmpnam|tolower|toupper|trace_psl_process|trim|union|unique|unlock|unset|va_arg|va_start|write)\b/,alias:"builtin-function"},"foreach-variable":{pattern:/(\bforeach\s+(?:(?:\w+\b|"(?:\\.|[^\\"])*")\s+){0,2})[_a-zA-Z]\w*(?=\s*\()/,lookbehind:!0,greedy:!0},function:{pattern:/\b[_a-z]\w*\b(?=\s*\()/i},number:/\b(?:0x[0-9a-f]+|[0-9]+(?:\.[0-9]+)?)\b/i,operator:/--|\+\+|&&=?|\|\|=?|<<=?|>>=?|[=!]~|[-+*/%&|^!=<>]=?|\.|[:?]/,punctuation:/[(){}\[\];,]/}; \ No newline at end of file diff --git a/components/prism-pug.js b/components/prism-pug.js index 5091587d39..aa9d769c11 100644 --- a/components/prism-pug.js +++ b/components/prism-pug.js @@ -53,7 +53,7 @@ // This handle all conditional and loop keywords 'flow-control': { - pattern: /(^[\t ]*)(?:if|unless|else|case|when|default|each|while)\b(?: .+)?/m, + pattern: /(^[\t ]*)(?:case|default|each|else|if|unless|when|while)\b(?: .+)?/m, lookbehind: true, inside: { 'each': { @@ -64,14 +64,14 @@ } }, 'branch': { - pattern: /^(?:if|unless|else|case|when|default|while)\b/, + pattern: /^(?:case|default|else|if|unless|when|while)\b/, alias: 'keyword' }, rest: Prism.languages.javascript } }, 'keyword': { - pattern: /(^[\t ]*)(?:block|extends|include|append|prepend)\b.+/m, + pattern: /(^[\t ]*)(?:append|block|extends|include|prepend)\b.+/m, lookbehind: true }, 'mixin': [ diff --git a/components/prism-pug.min.js b/components/prism-pug.min.js index 4b1053e2c9..2e3939d8d1 100644 --- a/components/prism-pug.min.js +++ b/components/prism-pug.min.js @@ -1 +1 @@ -!function(e){e.languages.pug={comment:{pattern:/(^([\t ]*))\/\/.*(?:(?:\r?\n|\r)\2[\t ].+)*/m,lookbehind:!0},"multiline-script":{pattern:/(^([\t ]*)script\b.*\.[\t ]*)(?:(?:\r?\n|\r(?!\n))(?:\2[\t ].+|\s*?(?=\r?\n|\r)))+/m,lookbehind:!0,inside:e.languages.javascript},filter:{pattern:/(^([\t ]*)):.+(?:(?:\r?\n|\r(?!\n))(?:\2[\t ].+|\s*?(?=\r?\n|\r)))+/m,lookbehind:!0,inside:{"filter-name":{pattern:/^:[\w-]+/,alias:"variable"}}},"multiline-plain-text":{pattern:/(^([\t ]*)[\w\-#.]+\.[\t ]*)(?:(?:\r?\n|\r(?!\n))(?:\2[\t ].+|\s*?(?=\r?\n|\r)))+/m,lookbehind:!0},markup:{pattern:/(^[\t ]*)<.+/m,lookbehind:!0,inside:e.languages.markup},doctype:{pattern:/((?:^|\n)[\t ]*)doctype(?: .+)?/,lookbehind:!0},"flow-control":{pattern:/(^[\t ]*)(?:if|unless|else|case|when|default|each|while)\b(?: .+)?/m,lookbehind:!0,inside:{each:{pattern:/^each .+? in\b/,inside:{keyword:/\b(?:each|in)\b/,punctuation:/,/}},branch:{pattern:/^(?:if|unless|else|case|when|default|while)\b/,alias:"keyword"},rest:e.languages.javascript}},keyword:{pattern:/(^[\t ]*)(?:block|extends|include|append|prepend)\b.+/m,lookbehind:!0},mixin:[{pattern:/(^[\t ]*)mixin .+/m,lookbehind:!0,inside:{keyword:/^mixin/,function:/\w+(?=\s*\(|\s*$)/,punctuation:/[(),.]/}},{pattern:/(^[\t ]*)\+.+/m,lookbehind:!0,inside:{name:{pattern:/^\+\w+/,alias:"function"},rest:e.languages.javascript}}],script:{pattern:/(^[\t ]*script(?:(?:&[^(]+)?\([^)]+\))*[\t ]).+/m,lookbehind:!0,inside:e.languages.javascript},"plain-text":{pattern:/(^[\t ]*(?!-)[\w\-#.]*[\w\-](?:(?:&[^(]+)?\([^)]+\))*\/?[\t ]).+/m,lookbehind:!0},tag:{pattern:/(^[\t ]*)(?!-)[\w\-#.]*[\w\-](?:(?:&[^(]+)?\([^)]+\))*\/?:?/m,lookbehind:!0,inside:{attributes:[{pattern:/&[^(]+\([^)]+\)/,inside:e.languages.javascript},{pattern:/\([^)]+\)/,inside:{"attr-value":{pattern:/(=\s*(?!\s))(?:\{[^}]*\}|[^,)\r\n]+)/,lookbehind:!0,inside:e.languages.javascript},"attr-name":/[\w-]+(?=\s*!?=|\s*[,)])/,punctuation:/[!=(),]+/}}],punctuation:/:/,"attr-id":/#[\w\-]+/,"attr-class":/\.[\w\-]+/}},code:[{pattern:/(^[\t ]*(?:-|!?=)).+/m,lookbehind:!0,inside:e.languages.javascript}],punctuation:/[.\-!=|]+/};for(var t=[{filter:"atpl",language:"twig"},{filter:"coffee",language:"coffeescript"},"ejs","handlebars","less","livescript","markdown",{filter:"sass",language:"scss"},"stylus"],n={},a=0,i=t.length;a(?:(?:\r?\n|\r(?!\n))(?:\\2[\t ].+|\\s*?(?=\r?\n|\r)))+".replace("",function(){return r.filter}),"m"),lookbehind:!0,inside:{"filter-name":{pattern:/^:[\w-]+/,alias:"variable"},rest:e.languages[r.language]}})}e.languages.insertBefore("pug","filter",n)}(Prism); \ No newline at end of file +!function(e){e.languages.pug={comment:{pattern:/(^([\t ]*))\/\/.*(?:(?:\r?\n|\r)\2[\t ].+)*/m,lookbehind:!0},"multiline-script":{pattern:/(^([\t ]*)script\b.*\.[\t ]*)(?:(?:\r?\n|\r(?!\n))(?:\2[\t ].+|\s*?(?=\r?\n|\r)))+/m,lookbehind:!0,inside:e.languages.javascript},filter:{pattern:/(^([\t ]*)):.+(?:(?:\r?\n|\r(?!\n))(?:\2[\t ].+|\s*?(?=\r?\n|\r)))+/m,lookbehind:!0,inside:{"filter-name":{pattern:/^:[\w-]+/,alias:"variable"}}},"multiline-plain-text":{pattern:/(^([\t ]*)[\w\-#.]+\.[\t ]*)(?:(?:\r?\n|\r(?!\n))(?:\2[\t ].+|\s*?(?=\r?\n|\r)))+/m,lookbehind:!0},markup:{pattern:/(^[\t ]*)<.+/m,lookbehind:!0,inside:e.languages.markup},doctype:{pattern:/((?:^|\n)[\t ]*)doctype(?: .+)?/,lookbehind:!0},"flow-control":{pattern:/(^[\t ]*)(?:case|default|each|else|if|unless|when|while)\b(?: .+)?/m,lookbehind:!0,inside:{each:{pattern:/^each .+? in\b/,inside:{keyword:/\b(?:each|in)\b/,punctuation:/,/}},branch:{pattern:/^(?:case|default|else|if|unless|when|while)\b/,alias:"keyword"},rest:e.languages.javascript}},keyword:{pattern:/(^[\t ]*)(?:append|block|extends|include|prepend)\b.+/m,lookbehind:!0},mixin:[{pattern:/(^[\t ]*)mixin .+/m,lookbehind:!0,inside:{keyword:/^mixin/,function:/\w+(?=\s*\(|\s*$)/,punctuation:/[(),.]/}},{pattern:/(^[\t ]*)\+.+/m,lookbehind:!0,inside:{name:{pattern:/^\+\w+/,alias:"function"},rest:e.languages.javascript}}],script:{pattern:/(^[\t ]*script(?:(?:&[^(]+)?\([^)]+\))*[\t ]).+/m,lookbehind:!0,inside:e.languages.javascript},"plain-text":{pattern:/(^[\t ]*(?!-)[\w\-#.]*[\w\-](?:(?:&[^(]+)?\([^)]+\))*\/?[\t ]).+/m,lookbehind:!0},tag:{pattern:/(^[\t ]*)(?!-)[\w\-#.]*[\w\-](?:(?:&[^(]+)?\([^)]+\))*\/?:?/m,lookbehind:!0,inside:{attributes:[{pattern:/&[^(]+\([^)]+\)/,inside:e.languages.javascript},{pattern:/\([^)]+\)/,inside:{"attr-value":{pattern:/(=\s*(?!\s))(?:\{[^}]*\}|[^,)\r\n]+)/,lookbehind:!0,inside:e.languages.javascript},"attr-name":/[\w-]+(?=\s*!?=|\s*[,)])/,punctuation:/[!=(),]+/}}],punctuation:/:/,"attr-id":/#[\w\-]+/,"attr-class":/\.[\w\-]+/}},code:[{pattern:/(^[\t ]*(?:-|!?=)).+/m,lookbehind:!0,inside:e.languages.javascript}],punctuation:/[.\-!=|]+/};for(var t=[{filter:"atpl",language:"twig"},{filter:"coffee",language:"coffeescript"},"ejs","handlebars","less","livescript","markdown",{filter:"sass",language:"scss"},"stylus"],n={},a=0,i=t.length;a(?:(?:\r?\n|\r(?!\n))(?:\\2[\t ].+|\\s*?(?=\r?\n|\r)))+".replace("",function(){return r.filter}),"m"),lookbehind:!0,inside:{"filter-name":{pattern:/^:[\w-]+/,alias:"variable"},rest:e.languages[r.language]}})}e.languages.insertBefore("pug","filter",n)}(Prism); \ No newline at end of file diff --git a/components/prism-puppet.js b/components/prism-puppet.js index 0f3b3f4eff..0dcdbf2f5a 100644 --- a/components/prism-puppet.js +++ b/components/prism-puppet.js @@ -89,7 +89,7 @@ /\b(?:contain|debug|err|fail|include|info|notice|realize|require|tag|warning)\b|\b(?!\d)\w+(?=\()/ ], 'number': /\b(?:0x[a-f\d]+|\d+(?:\.\d+)?(?:e-?\d+)?)\b/i, - 'boolean': /\b(?:true|false)\b/, + 'boolean': /\b(?:false|true)\b/, // Includes words reserved for future use 'keyword': /\b(?:application|attr|case|class|consumes|default|define|else|elsif|function|if|import|inherits|node|private|produces|type|undef|unless)\b/, 'datatype': { diff --git a/components/prism-puppet.min.js b/components/prism-puppet.min.js index ca2354ef7c..6ba5359b42 100644 --- a/components/prism-puppet.min.js +++ b/components/prism-puppet.min.js @@ -1 +1 @@ -!function(e){e.languages.puppet={heredoc:[{pattern:/(@\("([^"\r\n\/):]+)"(?:\/[nrts$uL]*)?\).*(?:\r?\n|\r))(?:.*(?:\r?\n|\r(?!\n)))*?[ \t]*(?:\|[ \t]*)?(?:-[ \t]*)?\2/,lookbehind:!0,alias:"string",inside:{punctuation:/(?=\S).*\S(?= *$)/}},{pattern:/(@\(([^"\r\n\/):]+)(?:\/[nrts$uL]*)?\).*(?:\r?\n|\r))(?:.*(?:\r?\n|\r(?!\n)))*?[ \t]*(?:\|[ \t]*)?(?:-[ \t]*)?\2/,lookbehind:!0,greedy:!0,alias:"string",inside:{punctuation:/(?=\S).*\S(?= *$)/}},{pattern:/@\("?(?:[^"\r\n\/):]+)"?(?:\/[nrts$uL]*)?\)/,alias:"string",inside:{punctuation:{pattern:/(\().+?(?=\))/,lookbehind:!0}}}],"multiline-comment":{pattern:/(^|[^\\])\/\*[\s\S]*?\*\//,lookbehind:!0,greedy:!0,alias:"comment"},regex:{pattern:/((?:\bnode\s+|[~=\(\[\{,]\s*|[=+]>\s*|^\s*))\/(?:[^\/\\]|\\[\s\S])+\/(?:[imx]+\b|\B)/,lookbehind:!0,greedy:!0,inside:{"extended-regex":{pattern:/^\/(?:[^\/\\]|\\[\s\S])+\/[im]*x[im]*$/,inside:{comment:/#.*/}}}},comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},string:{pattern:/(["'])(?:\$\{(?:[^'"}]|(["'])(?:(?!\2)[^\\]|\\[\s\S])*\2)+\}|\$(?!\{)|(?!\1)[^\\$]|\\[\s\S])*\1/,greedy:!0,inside:{"double-quoted":{pattern:/^"[\s\S]*"$/,inside:{}}}},variable:{pattern:/\$(?:::)?\w+(?:::\w+)*/,inside:{punctuation:/::/}},"attr-name":/(?:\b\w+|\*)(?=\s*=>)/,function:[{pattern:/(\.)(?!\d)\w+/,lookbehind:!0},/\b(?:contain|debug|err|fail|include|info|notice|realize|require|tag|warning)\b|\b(?!\d)\w+(?=\()/],number:/\b(?:0x[a-f\d]+|\d+(?:\.\d+)?(?:e-?\d+)?)\b/i,boolean:/\b(?:true|false)\b/,keyword:/\b(?:application|attr|case|class|consumes|default|define|else|elsif|function|if|import|inherits|node|private|produces|type|undef|unless)\b/,datatype:{pattern:/\b(?:Any|Array|Boolean|Callable|Catalogentry|Class|Collection|Data|Default|Enum|Float|Hash|Integer|NotUndef|Numeric|Optional|Pattern|Regexp|Resource|Runtime|Scalar|String|Struct|Tuple|Type|Undef|Variant)\b/,alias:"symbol"},operator:/=[=~>]?|![=~]?|<(?:<\|?|[=~|-])?|>[>=]?|->?|~>|\|>?>?|[*\/%+?]|\b(?:and|in|or)\b/,punctuation:/[\[\]{}().,;]|:+/};var n=[{pattern:/(^|[^\\])\$\{(?:[^'"{}]|\{[^}]*\}|(["'])(?:(?!\2)[^\\]|\\[\s\S])*\2)+\}/,lookbehind:!0,inside:{"short-variable":{pattern:/(^\$\{)(?!\w+\()(?:::)?\w+(?:::\w+)*/,lookbehind:!0,alias:"variable",inside:{punctuation:/::/}},delimiter:{pattern:/^\$/,alias:"variable"},rest:e.languages.puppet}},{pattern:/(^|[^\\])\$(?:::)?\w+(?:::\w+)*/,lookbehind:!0,alias:"variable",inside:{punctuation:/::/}}];e.languages.puppet.heredoc[0].inside.interpolation=n,e.languages.puppet.string.inside["double-quoted"].inside.interpolation=n}(Prism); \ No newline at end of file +!function(e){e.languages.puppet={heredoc:[{pattern:/(@\("([^"\r\n\/):]+)"(?:\/[nrts$uL]*)?\).*(?:\r?\n|\r))(?:.*(?:\r?\n|\r(?!\n)))*?[ \t]*(?:\|[ \t]*)?(?:-[ \t]*)?\2/,lookbehind:!0,alias:"string",inside:{punctuation:/(?=\S).*\S(?= *$)/}},{pattern:/(@\(([^"\r\n\/):]+)(?:\/[nrts$uL]*)?\).*(?:\r?\n|\r))(?:.*(?:\r?\n|\r(?!\n)))*?[ \t]*(?:\|[ \t]*)?(?:-[ \t]*)?\2/,lookbehind:!0,greedy:!0,alias:"string",inside:{punctuation:/(?=\S).*\S(?= *$)/}},{pattern:/@\("?(?:[^"\r\n\/):]+)"?(?:\/[nrts$uL]*)?\)/,alias:"string",inside:{punctuation:{pattern:/(\().+?(?=\))/,lookbehind:!0}}}],"multiline-comment":{pattern:/(^|[^\\])\/\*[\s\S]*?\*\//,lookbehind:!0,greedy:!0,alias:"comment"},regex:{pattern:/((?:\bnode\s+|[~=\(\[\{,]\s*|[=+]>\s*|^\s*))\/(?:[^\/\\]|\\[\s\S])+\/(?:[imx]+\b|\B)/,lookbehind:!0,greedy:!0,inside:{"extended-regex":{pattern:/^\/(?:[^\/\\]|\\[\s\S])+\/[im]*x[im]*$/,inside:{comment:/#.*/}}}},comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},string:{pattern:/(["'])(?:\$\{(?:[^'"}]|(["'])(?:(?!\2)[^\\]|\\[\s\S])*\2)+\}|\$(?!\{)|(?!\1)[^\\$]|\\[\s\S])*\1/,greedy:!0,inside:{"double-quoted":{pattern:/^"[\s\S]*"$/,inside:{}}}},variable:{pattern:/\$(?:::)?\w+(?:::\w+)*/,inside:{punctuation:/::/}},"attr-name":/(?:\b\w+|\*)(?=\s*=>)/,function:[{pattern:/(\.)(?!\d)\w+/,lookbehind:!0},/\b(?:contain|debug|err|fail|include|info|notice|realize|require|tag|warning)\b|\b(?!\d)\w+(?=\()/],number:/\b(?:0x[a-f\d]+|\d+(?:\.\d+)?(?:e-?\d+)?)\b/i,boolean:/\b(?:false|true)\b/,keyword:/\b(?:application|attr|case|class|consumes|default|define|else|elsif|function|if|import|inherits|node|private|produces|type|undef|unless)\b/,datatype:{pattern:/\b(?:Any|Array|Boolean|Callable|Catalogentry|Class|Collection|Data|Default|Enum|Float|Hash|Integer|NotUndef|Numeric|Optional|Pattern|Regexp|Resource|Runtime|Scalar|String|Struct|Tuple|Type|Undef|Variant)\b/,alias:"symbol"},operator:/=[=~>]?|![=~]?|<(?:<\|?|[=~|-])?|>[>=]?|->?|~>|\|>?>?|[*\/%+?]|\b(?:and|in|or)\b/,punctuation:/[\[\]{}().,;]|:+/};var n=[{pattern:/(^|[^\\])\$\{(?:[^'"{}]|\{[^}]*\}|(["'])(?:(?!\2)[^\\]|\\[\s\S])*\2)+\}/,lookbehind:!0,inside:{"short-variable":{pattern:/(^\$\{)(?!\w+\()(?:::)?\w+(?:::\w+)*/,lookbehind:!0,alias:"variable",inside:{punctuation:/::/}},delimiter:{pattern:/^\$/,alias:"variable"},rest:e.languages.puppet}},{pattern:/(^|[^\\])\$(?:::)?\w+(?:::\w+)*/,lookbehind:!0,alias:"variable",inside:{punctuation:/::/}}];e.languages.puppet.heredoc[0].inside.interpolation=n,e.languages.puppet.string.inside["double-quoted"].inside.interpolation=n}(Prism); \ No newline at end of file diff --git a/components/prism-pure.js b/components/prism-pure.js index dc0bc6b3da..993a6641c1 100644 --- a/components/prism-pure.js +++ b/components/prism-pure.js @@ -37,8 +37,8 @@ pattern: /((?:\.\.)?)(?:\b(?:inf|nan)\b|\b0x[\da-f]+|(?:\b(?:0b)?\d+(?:\.\d+)?|\B\.\d+)(?:e[+-]?\d+)?L?)/i, lookbehind: true }, - 'keyword': /\b(?:ans|break|bt|case|catch|cd|clear|const|def|del|dump|else|end|exit|extern|false|force|help|if|infix[lr]?|interface|let|ls|mem|namespace|nonfix|NULL|of|otherwise|outfix|override|postfix|prefix|private|public|pwd|quit|run|save|show|stats|then|throw|trace|true|type|underride|using|when|with)\b/, - 'function': /\b(?:abs|add_(?:(?:fundef|interface|macdef|typedef)(?:_at)?|addr|constdef|vardef)|all|any|applp?|arity|bigintp?|blob(?:_crc|_size|p)?|boolp?|byte_(?:matrix|pointer)|byte_c?string(?:_pointer)?|calloc|cat|catmap|ceil|char[ps]?|check_ptrtag|chr|clear_sentry|clearsym|closurep?|cmatrixp?|cols?|colcat(?:map)?|colmap|colrev|colvector(?:p|seq)?|complex(?:_float_(?:matrix|pointer)|_matrix(?:_view)?|_pointer|p)?|conj|cookedp?|cst|cstring(?:_(?:dup|list|vector))?|curry3?|cyclen?|del_(?:constdef|fundef|interface|macdef|typedef|vardef)|delete|diag(?:mat)?|dim|dmatrixp?|do|double(?:_matrix(?:_view)?|_pointer|p)?|dowith3?|drop|dropwhile|eval(?:cmd)?|exactp|filter|fix|fixity|flip|float(?:_matrix|_pointer)|floor|fold[lr]1?|frac|free|funp?|functionp?|gcd|get(?:_(?:byte|constdef|double|float|fundef|int(?:64)?|interface(?:_typedef)?|long|macdef|pointer|ptrtag|short|sentry|string|typedef|vardef))?|globsym|hash|head|id|im|imatrixp?|index|inexactp|infp|init|insert|int(?:_matrix(?:_view)?|_pointer|p)?|int64_(?:matrix|pointer)|integerp?|iteraten?|iterwhile|join|keys?|lambdap?|last(?:err(?:pos)?)?|lcd|list[2p]?|listmap|make_ptrtag|malloc|map|matcat|matrixp?|max|member|min|nanp|nargs|nmatrixp?|null|numberp?|ord|pack(?:ed)?|pointer(?:_cast|_tag|_type|p)?|pow|pred|ptrtag|put(?:_(?:byte|double|float|int(?:64)?|long|pointer|short|string))?|rationalp?|re|realp?|realloc|recordp?|redim|reduce(?:_with)?|refp?|repeatn?|reverse|rlistp?|round|rows?|rowcat(?:map)?|rowmap|rowrev|rowvector(?:p|seq)?|same|scan[lr]1?|sentry|sgn|short_(?:matrix|pointer)|slice|smatrixp?|sort|split|str|strcat|stream|stride|string(?:_(?:dup|list|vector)|p)?|subdiag(?:mat)?|submat|subseq2?|substr|succ|supdiag(?:mat)?|symbolp?|tail|take|takewhile|thunkp?|transpose|trunc|tuplep?|typep|ubyte|uint(?:64)?|ulong|uncurry3?|unref|unzip3?|update|ushort|vals?|varp?|vector(?:p|seq)?|void|zip3?|zipwith3?)\b/, + 'keyword': /\b(?:NULL|ans|break|bt|case|catch|cd|clear|const|def|del|dump|else|end|exit|extern|false|force|help|if|infix[lr]?|interface|let|ls|mem|namespace|nonfix|of|otherwise|outfix|override|postfix|prefix|private|public|pwd|quit|run|save|show|stats|then|throw|trace|true|type|underride|using|when|with)\b/, + 'function': /\b(?:abs|add_(?:addr|constdef|(?:fundef|interface|macdef|typedef)(?:_at)?|vardef)|all|any|applp?|arity|bigintp?|blob(?:_crc|_size|p)?|boolp?|byte_c?string(?:_pointer)?|byte_(?:matrix|pointer)|calloc|cat|catmap|ceil|char[ps]?|check_ptrtag|chr|clear_sentry|clearsym|closurep?|cmatrixp?|cols?|colcat(?:map)?|colmap|colrev|colvector(?:p|seq)?|complex(?:_float_(?:matrix|pointer)|_matrix(?:_view)?|_pointer|p)?|conj|cookedp?|cst|cstring(?:_(?:dup|list|vector))?|curry3?|cyclen?|del_(?:constdef|fundef|interface|macdef|typedef|vardef)|delete|diag(?:mat)?|dim|dmatrixp?|do|double(?:_matrix(?:_view)?|_pointer|p)?|dowith3?|drop|dropwhile|eval(?:cmd)?|exactp|filter|fix|fixity|flip|float(?:_matrix|_pointer)|floor|fold[lr]1?|frac|free|funp?|functionp?|gcd|get(?:_(?:byte|constdef|double|float|fundef|int(?:64)?|interface(?:_typedef)?|long|macdef|pointer|ptrtag|sentry|short|string|typedef|vardef))?|globsym|hash|head|id|im|imatrixp?|index|inexactp|infp|init|insert|int(?:_matrix(?:_view)?|_pointer|p)?|int64_(?:matrix|pointer)|integerp?|iteraten?|iterwhile|join|keys?|lambdap?|last(?:err(?:pos)?)?|lcd|list[2p]?|listmap|make_ptrtag|malloc|map|matcat|matrixp?|max|member|min|nanp|nargs|nmatrixp?|null|numberp?|ord|pack(?:ed)?|pointer(?:_cast|_tag|_type|p)?|pow|pred|ptrtag|put(?:_(?:byte|double|float|int(?:64)?|long|pointer|short|string))?|rationalp?|re|realp?|realloc|recordp?|redim|reduce(?:_with)?|refp?|repeatn?|reverse|rlistp?|round|rows?|rowcat(?:map)?|rowmap|rowrev|rowvector(?:p|seq)?|same|scan[lr]1?|sentry|sgn|short_(?:matrix|pointer)|slice|smatrixp?|sort|split|str|strcat|stream|stride|string(?:_(?:dup|list|vector)|p)?|subdiag(?:mat)?|submat|subseq2?|substr|succ|supdiag(?:mat)?|symbolp?|tail|take|takewhile|thunkp?|transpose|trunc|tuplep?|typep|ubyte|uint(?:64)?|ulong|uncurry3?|unref|unzip3?|update|ushort|vals?|varp?|vector(?:p|seq)?|void|zip3?|zipwith3?)\b/, 'special': { pattern: /\b__[a-z]+__\b/i, alias: 'builtin' diff --git a/components/prism-pure.min.js b/components/prism-pure.min.js index 47fd205fe5..d747cbfae6 100644 --- a/components/prism-pure.min.js +++ b/components/prism-pure.min.js @@ -1 +1 @@ -!function(r){r.languages.pure={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?\*\//,lookbehind:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0},/#!.+/],"inline-lang":{pattern:/%<[\s\S]+?%>/,greedy:!0,inside:{lang:{pattern:/(^%< *)-\*-.+?-\*-/,lookbehind:!0,alias:"comment"},delimiter:{pattern:/^%<.*|%>$/,alias:"punctuation"}}},string:{pattern:/"(?:\\.|[^"\\\r\n])*"/,greedy:!0},number:{pattern:/((?:\.\.)?)(?:\b(?:inf|nan)\b|\b0x[\da-f]+|(?:\b(?:0b)?\d+(?:\.\d+)?|\B\.\d+)(?:e[+-]?\d+)?L?)/i,lookbehind:!0},keyword:/\b(?:ans|break|bt|case|catch|cd|clear|const|def|del|dump|else|end|exit|extern|false|force|help|if|infix[lr]?|interface|let|ls|mem|namespace|nonfix|NULL|of|otherwise|outfix|override|postfix|prefix|private|public|pwd|quit|run|save|show|stats|then|throw|trace|true|type|underride|using|when|with)\b/,function:/\b(?:abs|add_(?:(?:fundef|interface|macdef|typedef)(?:_at)?|addr|constdef|vardef)|all|any|applp?|arity|bigintp?|blob(?:_crc|_size|p)?|boolp?|byte_(?:matrix|pointer)|byte_c?string(?:_pointer)?|calloc|cat|catmap|ceil|char[ps]?|check_ptrtag|chr|clear_sentry|clearsym|closurep?|cmatrixp?|cols?|colcat(?:map)?|colmap|colrev|colvector(?:p|seq)?|complex(?:_float_(?:matrix|pointer)|_matrix(?:_view)?|_pointer|p)?|conj|cookedp?|cst|cstring(?:_(?:dup|list|vector))?|curry3?|cyclen?|del_(?:constdef|fundef|interface|macdef|typedef|vardef)|delete|diag(?:mat)?|dim|dmatrixp?|do|double(?:_matrix(?:_view)?|_pointer|p)?|dowith3?|drop|dropwhile|eval(?:cmd)?|exactp|filter|fix|fixity|flip|float(?:_matrix|_pointer)|floor|fold[lr]1?|frac|free|funp?|functionp?|gcd|get(?:_(?:byte|constdef|double|float|fundef|int(?:64)?|interface(?:_typedef)?|long|macdef|pointer|ptrtag|short|sentry|string|typedef|vardef))?|globsym|hash|head|id|im|imatrixp?|index|inexactp|infp|init|insert|int(?:_matrix(?:_view)?|_pointer|p)?|int64_(?:matrix|pointer)|integerp?|iteraten?|iterwhile|join|keys?|lambdap?|last(?:err(?:pos)?)?|lcd|list[2p]?|listmap|make_ptrtag|malloc|map|matcat|matrixp?|max|member|min|nanp|nargs|nmatrixp?|null|numberp?|ord|pack(?:ed)?|pointer(?:_cast|_tag|_type|p)?|pow|pred|ptrtag|put(?:_(?:byte|double|float|int(?:64)?|long|pointer|short|string))?|rationalp?|re|realp?|realloc|recordp?|redim|reduce(?:_with)?|refp?|repeatn?|reverse|rlistp?|round|rows?|rowcat(?:map)?|rowmap|rowrev|rowvector(?:p|seq)?|same|scan[lr]1?|sentry|sgn|short_(?:matrix|pointer)|slice|smatrixp?|sort|split|str|strcat|stream|stride|string(?:_(?:dup|list|vector)|p)?|subdiag(?:mat)?|submat|subseq2?|substr|succ|supdiag(?:mat)?|symbolp?|tail|take|takewhile|thunkp?|transpose|trunc|tuplep?|typep|ubyte|uint(?:64)?|ulong|uncurry3?|unref|unzip3?|update|ushort|vals?|varp?|vector(?:p|seq)?|void|zip3?|zipwith3?)\b/,special:{pattern:/\b__[a-z]+__\b/i,alias:"builtin"},operator:/(?:[!"#$%&'*+,\-.\/:<=>?@\\^`|~\u00a1-\u00bf\u00d7-\u00f7\u20d0-\u2bff]|\b_+\b)+|\b(?:and|div|mod|not|or)\b/,punctuation:/[(){}\[\];,|]/};["c",{lang:"c++",alias:"cpp"},"fortran"].forEach(function(e){var t=e;if("string"!=typeof e&&(t=e.alias,e=e.lang),r.languages[t]){var a={};a["inline-lang-"+t]={pattern:RegExp("%< *-\\*- *\\d* *-\\*-[^]+?%>".replace("",e.replace(/([.+*?\/\\(){}\[\]])/g,"\\$1")),"i"),inside:r.util.clone(r.languages.pure["inline-lang"].inside)},a["inline-lang-"+t].inside.rest=r.util.clone(r.languages[t]),r.languages.insertBefore("pure","inline-lang",a)}}),r.languages.c&&(r.languages.pure["inline-lang"].inside.rest=r.util.clone(r.languages.c))}(Prism); \ No newline at end of file +!function(r){r.languages.pure={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?\*\//,lookbehind:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0},/#!.+/],"inline-lang":{pattern:/%<[\s\S]+?%>/,greedy:!0,inside:{lang:{pattern:/(^%< *)-\*-.+?-\*-/,lookbehind:!0,alias:"comment"},delimiter:{pattern:/^%<.*|%>$/,alias:"punctuation"}}},string:{pattern:/"(?:\\.|[^"\\\r\n])*"/,greedy:!0},number:{pattern:/((?:\.\.)?)(?:\b(?:inf|nan)\b|\b0x[\da-f]+|(?:\b(?:0b)?\d+(?:\.\d+)?|\B\.\d+)(?:e[+-]?\d+)?L?)/i,lookbehind:!0},keyword:/\b(?:NULL|ans|break|bt|case|catch|cd|clear|const|def|del|dump|else|end|exit|extern|false|force|help|if|infix[lr]?|interface|let|ls|mem|namespace|nonfix|of|otherwise|outfix|override|postfix|prefix|private|public|pwd|quit|run|save|show|stats|then|throw|trace|true|type|underride|using|when|with)\b/,function:/\b(?:abs|add_(?:addr|constdef|(?:fundef|interface|macdef|typedef)(?:_at)?|vardef)|all|any|applp?|arity|bigintp?|blob(?:_crc|_size|p)?|boolp?|byte_c?string(?:_pointer)?|byte_(?:matrix|pointer)|calloc|cat|catmap|ceil|char[ps]?|check_ptrtag|chr|clear_sentry|clearsym|closurep?|cmatrixp?|cols?|colcat(?:map)?|colmap|colrev|colvector(?:p|seq)?|complex(?:_float_(?:matrix|pointer)|_matrix(?:_view)?|_pointer|p)?|conj|cookedp?|cst|cstring(?:_(?:dup|list|vector))?|curry3?|cyclen?|del_(?:constdef|fundef|interface|macdef|typedef|vardef)|delete|diag(?:mat)?|dim|dmatrixp?|do|double(?:_matrix(?:_view)?|_pointer|p)?|dowith3?|drop|dropwhile|eval(?:cmd)?|exactp|filter|fix|fixity|flip|float(?:_matrix|_pointer)|floor|fold[lr]1?|frac|free|funp?|functionp?|gcd|get(?:_(?:byte|constdef|double|float|fundef|int(?:64)?|interface(?:_typedef)?|long|macdef|pointer|ptrtag|sentry|short|string|typedef|vardef))?|globsym|hash|head|id|im|imatrixp?|index|inexactp|infp|init|insert|int(?:_matrix(?:_view)?|_pointer|p)?|int64_(?:matrix|pointer)|integerp?|iteraten?|iterwhile|join|keys?|lambdap?|last(?:err(?:pos)?)?|lcd|list[2p]?|listmap|make_ptrtag|malloc|map|matcat|matrixp?|max|member|min|nanp|nargs|nmatrixp?|null|numberp?|ord|pack(?:ed)?|pointer(?:_cast|_tag|_type|p)?|pow|pred|ptrtag|put(?:_(?:byte|double|float|int(?:64)?|long|pointer|short|string))?|rationalp?|re|realp?|realloc|recordp?|redim|reduce(?:_with)?|refp?|repeatn?|reverse|rlistp?|round|rows?|rowcat(?:map)?|rowmap|rowrev|rowvector(?:p|seq)?|same|scan[lr]1?|sentry|sgn|short_(?:matrix|pointer)|slice|smatrixp?|sort|split|str|strcat|stream|stride|string(?:_(?:dup|list|vector)|p)?|subdiag(?:mat)?|submat|subseq2?|substr|succ|supdiag(?:mat)?|symbolp?|tail|take|takewhile|thunkp?|transpose|trunc|tuplep?|typep|ubyte|uint(?:64)?|ulong|uncurry3?|unref|unzip3?|update|ushort|vals?|varp?|vector(?:p|seq)?|void|zip3?|zipwith3?)\b/,special:{pattern:/\b__[a-z]+__\b/i,alias:"builtin"},operator:/(?:[!"#$%&'*+,\-.\/:<=>?@\\^`|~\u00a1-\u00bf\u00d7-\u00f7\u20d0-\u2bff]|\b_+\b)+|\b(?:and|div|mod|not|or)\b/,punctuation:/[(){}\[\];,|]/};["c",{lang:"c++",alias:"cpp"},"fortran"].forEach(function(e){var t=e;if("string"!=typeof e&&(t=e.alias,e=e.lang),r.languages[t]){var a={};a["inline-lang-"+t]={pattern:RegExp("%< *-\\*- *\\d* *-\\*-[^]+?%>".replace("",e.replace(/([.+*?\/\\(){}\[\]])/g,"\\$1")),"i"),inside:r.util.clone(r.languages.pure["inline-lang"].inside)},a["inline-lang-"+t].inside.rest=r.util.clone(r.languages[t]),r.languages.insertBefore("pure","inline-lang",a)}}),r.languages.c&&(r.languages.pure["inline-lang"].inside.rest=r.util.clone(r.languages.c))}(Prism); \ No newline at end of file diff --git a/components/prism-purebasic.js b/components/prism-purebasic.js index 70cb9c7baa..258e573721 100644 --- a/components/prism-purebasic.js +++ b/components/prism-purebasic.js @@ -9,7 +9,7 @@ slightly changed to pass all tests // PureBasic support, steal stuff from ansi-c Prism.languages.purebasic = Prism.languages.extend('clike', { 'comment': /;.*/, - 'keyword': /\b(?:declarecdll|declaredll|compilerselect|compilercase|compilerdefault|compilerendselect|compilererror|enableexplicit|disableexplicit|not|and|or|xor|calldebugger|debuglevel|enabledebugger|disabledebugger|restore|read|includepath|includebinary|threaded|runtime|with|endwith|structureunion|endstructureunion|align|newlist|newmap|interface|endinterface|extends|enumeration|endenumeration|swap|foreach|continue|fakereturn|goto|gosub|return|break|module|endmodule|declaremodule|enddeclaremodule|declare|declarec|prototype|prototypec|enableasm|disableasm|dim|redim|data|datasection|enddatasection|to|procedurereturn|debug|default|case|select|endselect|as|import|endimport|importc|compilerif|compilerelse|compilerendif|compilerelseif|end|structure|endstructure|while|wend|for|next|step|if|else|elseif|endif|repeat|until|procedure|proceduredll|procedurec|procedurecdll|endprocedure|protected|shared|static|global|define|includefile|xincludefile|macro|endmacro)\b/i, + 'keyword': /\b(?:align|and|as|break|calldebugger|case|compilercase|compilerdefault|compilerelse|compilerelseif|compilerendif|compilerendselect|compilererror|compilerif|compilerselect|continue|data|datasection|debug|debuglevel|declare|declarec|declarecdll|declaredll|declaremodule|default|define|dim|disableasm|disabledebugger|disableexplicit|else|elseif|enableasm|enabledebugger|enableexplicit|end|enddatasection|enddeclaremodule|endenumeration|endif|endimport|endinterface|endmacro|endmodule|endprocedure|endselect|endstructure|endstructureunion|endwith|enumeration|extends|fakereturn|for|foreach|global|gosub|goto|if|import|importc|includebinary|includefile|includepath|interface|macro|module|newlist|newmap|next|not|or|procedure|procedurec|procedurecdll|proceduredll|procedurereturn|protected|prototype|prototypec|read|redim|repeat|restore|return|runtime|select|shared|static|step|structure|structureunion|swap|threaded|to|until|wend|while|with|xincludefile|xor)\b/i, 'function': /\b\w+(?:\.\w+)?\s*(?=\()/, 'number': /(?:\$[\da-f]+|\b-?(?:\d+(?:\.\d+)?|\.\d+)(?:e[+-]?\d+)?)\b/i, 'operator': /(?:@\*?|\?|\*)\w+|-[>-]?|\+\+?|!=?|<>?=?|==?|&&?|\|?\||[~^%?*/@]/ @@ -55,9 +55,9 @@ Prism.languages.insertBefore('purebasic', 'keyword', { }, 'keyword': [ /\b(?:extern|global)\b[^;\r\n]*/i, - /\b(?:CPU|FLOAT|DEFAULT)\b.*/ + /\b(?:CPU|DEFAULT|FLOAT)\b.*/ ], - 'register': /\b(?:st\d|[xyz]mm\d\d?|[cdt]r\d|r\d\d?[bwd]?|[er]?[abcd]x|[abcd][hl]|[er]?(?:bp|sp|si|di)|[cdefgs]s|mm\d+)\b/i, + 'register': /\b(?:st\d|[xyz]mm\d\d?|[cdt]r\d|r\d\d?[bwd]?|[er]?[abcd]x|[abcd][hl]|[er]?(?:bp|di|si|sp)|[cdefgs]s|mm\d+)\b/i, 'number': /(?:\b|-|(?=\$))(?:0[hx](?:[\da-f]*\.)?[\da-f]+(?:p[+-]?\d+)?|\d[\da-f]+[hx]|\$\d[\da-f]*|0[oq][0-7]+|[0-7]+[oq]|0[by][01]+|[01]+[by]|0[dt]\d+|(?:\d+(?:\.\d+)?|\.\d+)(?:\.?e[+-]?\d+)?[dt]?)\b/i, 'operator': /[\[\]*+\-/%<>=&|$!,.:]/ } diff --git a/components/prism-purebasic.min.js b/components/prism-purebasic.min.js index f20dcda5b8..18963ea987 100644 --- a/components/prism-purebasic.min.js +++ b/components/prism-purebasic.min.js @@ -1 +1 @@ -Prism.languages.purebasic=Prism.languages.extend("clike",{comment:/;.*/,keyword:/\b(?:declarecdll|declaredll|compilerselect|compilercase|compilerdefault|compilerendselect|compilererror|enableexplicit|disableexplicit|not|and|or|xor|calldebugger|debuglevel|enabledebugger|disabledebugger|restore|read|includepath|includebinary|threaded|runtime|with|endwith|structureunion|endstructureunion|align|newlist|newmap|interface|endinterface|extends|enumeration|endenumeration|swap|foreach|continue|fakereturn|goto|gosub|return|break|module|endmodule|declaremodule|enddeclaremodule|declare|declarec|prototype|prototypec|enableasm|disableasm|dim|redim|data|datasection|enddatasection|to|procedurereturn|debug|default|case|select|endselect|as|import|endimport|importc|compilerif|compilerelse|compilerendif|compilerelseif|end|structure|endstructure|while|wend|for|next|step|if|else|elseif|endif|repeat|until|procedure|proceduredll|procedurec|procedurecdll|endprocedure|protected|shared|static|global|define|includefile|xincludefile|macro|endmacro)\b/i,function:/\b\w+(?:\.\w+)?\s*(?=\()/,number:/(?:\$[\da-f]+|\b-?(?:\d+(?:\.\d+)?|\.\d+)(?:e[+-]?\d+)?)\b/i,operator:/(?:@\*?|\?|\*)\w+|-[>-]?|\+\+?|!=?|<>?=?|==?|&&?|\|?\||[~^%?*/@]/}),Prism.languages.insertBefore("purebasic","keyword",{tag:/#\w+/,asm:{pattern:/(^[\t ]*)!.*/m,lookbehind:!0,alias:"tag",inside:{comment:/;.*/,string:{pattern:/(["'`])(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0},"label-reference-anonymous":{pattern:/(!\s*j[a-z]+\s+)@[fb]/i,lookbehind:!0,alias:"fasm-label"},"label-reference-addressed":{pattern:/(!\s*j[a-z]+\s+)[A-Z._?$@][\w.?$@~#]*/i,lookbehind:!0,alias:"fasm-label"},function:{pattern:/^([\t ]*!\s*)[\da-z]+(?=\s|$)/im,lookbehind:!0},"function-inline":{pattern:/(:\s*)[\da-z]+(?=\s)/i,lookbehind:!0,alias:"function"},label:{pattern:/^([\t ]*!\s*)[A-Za-z._?$@][\w.?$@~#]*(?=:)/m,lookbehind:!0,alias:"fasm-label"},keyword:[/\b(?:extern|global)\b[^;\r\n]*/i,/\b(?:CPU|FLOAT|DEFAULT)\b.*/],register:/\b(?:st\d|[xyz]mm\d\d?|[cdt]r\d|r\d\d?[bwd]?|[er]?[abcd]x|[abcd][hl]|[er]?(?:bp|sp|si|di)|[cdefgs]s|mm\d+)\b/i,number:/(?:\b|-|(?=\$))(?:0[hx](?:[\da-f]*\.)?[\da-f]+(?:p[+-]?\d+)?|\d[\da-f]+[hx]|\$\d[\da-f]*|0[oq][0-7]+|[0-7]+[oq]|0[by][01]+|[01]+[by]|0[dt]\d+|(?:\d+(?:\.\d+)?|\.\d+)(?:\.?e[+-]?\d+)?[dt]?)\b/i,operator:/[\[\]*+\-/%<>=&|$!,.:]/}}}),delete Prism.languages.purebasic["class-name"],delete Prism.languages.purebasic.boolean,Prism.languages.pbfasm=Prism.languages.purebasic; \ No newline at end of file +Prism.languages.purebasic=Prism.languages.extend("clike",{comment:/;.*/,keyword:/\b(?:align|and|as|break|calldebugger|case|compilercase|compilerdefault|compilerelse|compilerelseif|compilerendif|compilerendselect|compilererror|compilerif|compilerselect|continue|data|datasection|debug|debuglevel|declare|declarec|declarecdll|declaredll|declaremodule|default|define|dim|disableasm|disabledebugger|disableexplicit|else|elseif|enableasm|enabledebugger|enableexplicit|end|enddatasection|enddeclaremodule|endenumeration|endif|endimport|endinterface|endmacro|endmodule|endprocedure|endselect|endstructure|endstructureunion|endwith|enumeration|extends|fakereturn|for|foreach|global|gosub|goto|if|import|importc|includebinary|includefile|includepath|interface|macro|module|newlist|newmap|next|not|or|procedure|procedurec|procedurecdll|proceduredll|procedurereturn|protected|prototype|prototypec|read|redim|repeat|restore|return|runtime|select|shared|static|step|structure|structureunion|swap|threaded|to|until|wend|while|with|xincludefile|xor)\b/i,function:/\b\w+(?:\.\w+)?\s*(?=\()/,number:/(?:\$[\da-f]+|\b-?(?:\d+(?:\.\d+)?|\.\d+)(?:e[+-]?\d+)?)\b/i,operator:/(?:@\*?|\?|\*)\w+|-[>-]?|\+\+?|!=?|<>?=?|==?|&&?|\|?\||[~^%?*/@]/}),Prism.languages.insertBefore("purebasic","keyword",{tag:/#\w+/,asm:{pattern:/(^[\t ]*)!.*/m,lookbehind:!0,alias:"tag",inside:{comment:/;.*/,string:{pattern:/(["'`])(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0},"label-reference-anonymous":{pattern:/(!\s*j[a-z]+\s+)@[fb]/i,lookbehind:!0,alias:"fasm-label"},"label-reference-addressed":{pattern:/(!\s*j[a-z]+\s+)[A-Z._?$@][\w.?$@~#]*/i,lookbehind:!0,alias:"fasm-label"},function:{pattern:/^([\t ]*!\s*)[\da-z]+(?=\s|$)/im,lookbehind:!0},"function-inline":{pattern:/(:\s*)[\da-z]+(?=\s)/i,lookbehind:!0,alias:"function"},label:{pattern:/^([\t ]*!\s*)[A-Za-z._?$@][\w.?$@~#]*(?=:)/m,lookbehind:!0,alias:"fasm-label"},keyword:[/\b(?:extern|global)\b[^;\r\n]*/i,/\b(?:CPU|DEFAULT|FLOAT)\b.*/],register:/\b(?:st\d|[xyz]mm\d\d?|[cdt]r\d|r\d\d?[bwd]?|[er]?[abcd]x|[abcd][hl]|[er]?(?:bp|di|si|sp)|[cdefgs]s|mm\d+)\b/i,number:/(?:\b|-|(?=\$))(?:0[hx](?:[\da-f]*\.)?[\da-f]+(?:p[+-]?\d+)?|\d[\da-f]+[hx]|\$\d[\da-f]*|0[oq][0-7]+|[0-7]+[oq]|0[by][01]+|[01]+[by]|0[dt]\d+|(?:\d+(?:\.\d+)?|\.\d+)(?:\.?e[+-]?\d+)?[dt]?)\b/i,operator:/[\[\]*+\-/%<>=&|$!,.:]/}}}),delete Prism.languages.purebasic["class-name"],delete Prism.languages.purebasic.boolean,Prism.languages.pbfasm=Prism.languages.purebasic; \ No newline at end of file diff --git a/components/prism-purescript.js b/components/prism-purescript.js index 35d21eb187..8aa2b61703 100644 --- a/components/prism-purescript.js +++ b/components/prism-purescript.js @@ -8,7 +8,7 @@ Prism.languages.purescript = Prism.languages.extend('haskell', { pattern: /(^[\t ]*)import\s+[A-Z][\w']*(?:\.[A-Z][\w']*)*(?:\s+as\s+[A-Z][\w']*(?:\.[A-Z][\w']*)*)?(?:\s+hiding\b)?/m, lookbehind: true, inside: { - 'keyword': /\b(?:import|as|hiding)\b/, + 'keyword': /\b(?:as|hiding|import)\b/, 'punctuation': /\./ } }, diff --git a/components/prism-purescript.min.js b/components/prism-purescript.min.js index 17d9f57126..c6e56a333a 100644 --- a/components/prism-purescript.min.js +++ b/components/prism-purescript.min.js @@ -1 +1 @@ -Prism.languages.purescript=Prism.languages.extend("haskell",{keyword:/\b(?:ado|case|class|data|derive|do|else|forall|if|in|infixl|infixr|instance|let|module|newtype|of|primitive|then|type|where)\b|∀/,"import-statement":{pattern:/(^[\t ]*)import\s+[A-Z][\w']*(?:\.[A-Z][\w']*)*(?:\s+as\s+[A-Z][\w']*(?:\.[A-Z][\w']*)*)?(?:\s+hiding\b)?/m,lookbehind:!0,inside:{keyword:/\b(?:import|as|hiding)\b/,punctuation:/\./}},builtin:/\b(?:absurd|add|ap|append|apply|between|bind|bottom|clamp|compare|comparing|compose|conj|const|degree|discard|disj|div|eq|flap|flip|gcd|identity|ifM|join|lcm|liftA1|liftM1|map|max|mempty|min|mod|mul|negate|not|notEq|one|otherwise|recip|show|sub|top|unit|unless|unlessM|void|when|whenM|zero)\b/,operator:[Prism.languages.haskell.operator[0],Prism.languages.haskell.operator[2],/[\xa2-\xa6\xa8\xa9\xac\xae-\xb1\xb4\xb8\xd7\xf7\u02c2-\u02c5\u02d2-\u02df\u02e5-\u02eb\u02ed\u02ef-\u02ff\u0375\u0384\u0385\u03f6\u0482\u058d-\u058f\u0606-\u0608\u060b\u060e\u060f\u06de\u06e9\u06fd\u06fe\u07f6\u07fe\u07ff\u09f2\u09f3\u09fa\u09fb\u0af1\u0b70\u0bf3-\u0bfa\u0c7f\u0d4f\u0d79\u0e3f\u0f01-\u0f03\u0f13\u0f15-\u0f17\u0f1a-\u0f1f\u0f34\u0f36\u0f38\u0fbe-\u0fc5\u0fc7-\u0fcc\u0fce\u0fcf\u0fd5-\u0fd8\u109e\u109f\u1390-\u1399\u166d\u17db\u1940\u19de-\u19ff\u1b61-\u1b6a\u1b74-\u1b7c\u1fbd\u1fbf-\u1fc1\u1fcd-\u1fcf\u1fdd-\u1fdf\u1fed-\u1fef\u1ffd\u1ffe\u2044\u2052\u207a-\u207c\u208a-\u208c\u20a0-\u20bf\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211e-\u2123\u2125\u2127\u2129\u212e\u213a\u213b\u2140-\u2144\u214a-\u214d\u214f\u218a\u218b\u2190-\u2307\u230c-\u2328\u232b-\u2426\u2440-\u244a\u249c-\u24e9\u2500-\u2767\u2794-\u27c4\u27c7-\u27e5\u27f0-\u2982\u2999-\u29d7\u29dc-\u29fb\u29fe-\u2b73\u2b76-\u2b95\u2b97-\u2bff\u2ce5-\u2cea\u2e50\u2e51\u2e80-\u2e99\u2e9b-\u2ef3\u2f00-\u2fd5\u2ff0-\u2ffb\u3004\u3012\u3013\u3020\u3036\u3037\u303e\u303f\u309b\u309c\u3190\u3191\u3196-\u319f\u31c0-\u31e3\u3200-\u321e\u322a-\u3247\u3250\u3260-\u327f\u328a-\u32b0\u32c0-\u33ff\u4dc0-\u4dff\ua490-\ua4c6\ua700-\ua716\ua720\ua721\ua789\ua78a\ua828-\ua82b\ua836-\ua839\uaa77-\uaa79\uab5b\uab6a\uab6b\ufb29\ufbb2-\ufbc1\ufdfc\ufdfd\ufe62\ufe64-\ufe66\ufe69\uff04\uff0b\uff1c-\uff1e\uff3e\uff40\uff5c\uff5e\uffe0-\uffe6\uffe8-\uffee\ufffc\ufffd]/]}),Prism.languages.purs=Prism.languages.purescript; \ No newline at end of file +Prism.languages.purescript=Prism.languages.extend("haskell",{keyword:/\b(?:ado|case|class|data|derive|do|else|forall|if|in|infixl|infixr|instance|let|module|newtype|of|primitive|then|type|where)\b|∀/,"import-statement":{pattern:/(^[\t ]*)import\s+[A-Z][\w']*(?:\.[A-Z][\w']*)*(?:\s+as\s+[A-Z][\w']*(?:\.[A-Z][\w']*)*)?(?:\s+hiding\b)?/m,lookbehind:!0,inside:{keyword:/\b(?:as|hiding|import)\b/,punctuation:/\./}},builtin:/\b(?:absurd|add|ap|append|apply|between|bind|bottom|clamp|compare|comparing|compose|conj|const|degree|discard|disj|div|eq|flap|flip|gcd|identity|ifM|join|lcm|liftA1|liftM1|map|max|mempty|min|mod|mul|negate|not|notEq|one|otherwise|recip|show|sub|top|unit|unless|unlessM|void|when|whenM|zero)\b/,operator:[Prism.languages.haskell.operator[0],Prism.languages.haskell.operator[2],/[\xa2-\xa6\xa8\xa9\xac\xae-\xb1\xb4\xb8\xd7\xf7\u02c2-\u02c5\u02d2-\u02df\u02e5-\u02eb\u02ed\u02ef-\u02ff\u0375\u0384\u0385\u03f6\u0482\u058d-\u058f\u0606-\u0608\u060b\u060e\u060f\u06de\u06e9\u06fd\u06fe\u07f6\u07fe\u07ff\u09f2\u09f3\u09fa\u09fb\u0af1\u0b70\u0bf3-\u0bfa\u0c7f\u0d4f\u0d79\u0e3f\u0f01-\u0f03\u0f13\u0f15-\u0f17\u0f1a-\u0f1f\u0f34\u0f36\u0f38\u0fbe-\u0fc5\u0fc7-\u0fcc\u0fce\u0fcf\u0fd5-\u0fd8\u109e\u109f\u1390-\u1399\u166d\u17db\u1940\u19de-\u19ff\u1b61-\u1b6a\u1b74-\u1b7c\u1fbd\u1fbf-\u1fc1\u1fcd-\u1fcf\u1fdd-\u1fdf\u1fed-\u1fef\u1ffd\u1ffe\u2044\u2052\u207a-\u207c\u208a-\u208c\u20a0-\u20bf\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211e-\u2123\u2125\u2127\u2129\u212e\u213a\u213b\u2140-\u2144\u214a-\u214d\u214f\u218a\u218b\u2190-\u2307\u230c-\u2328\u232b-\u2426\u2440-\u244a\u249c-\u24e9\u2500-\u2767\u2794-\u27c4\u27c7-\u27e5\u27f0-\u2982\u2999-\u29d7\u29dc-\u29fb\u29fe-\u2b73\u2b76-\u2b95\u2b97-\u2bff\u2ce5-\u2cea\u2e50\u2e51\u2e80-\u2e99\u2e9b-\u2ef3\u2f00-\u2fd5\u2ff0-\u2ffb\u3004\u3012\u3013\u3020\u3036\u3037\u303e\u303f\u309b\u309c\u3190\u3191\u3196-\u319f\u31c0-\u31e3\u3200-\u321e\u322a-\u3247\u3250\u3260-\u327f\u328a-\u32b0\u32c0-\u33ff\u4dc0-\u4dff\ua490-\ua4c6\ua700-\ua716\ua720\ua721\ua789\ua78a\ua828-\ua82b\ua836-\ua839\uaa77-\uaa79\uab5b\uab6a\uab6b\ufb29\ufbb2-\ufbc1\ufdfc\ufdfd\ufe62\ufe64-\ufe66\ufe69\uff04\uff0b\uff1c-\uff1e\uff3e\uff40\uff5c\uff5e\uffe0-\uffe6\uffe8-\uffee\ufffc\ufffd]/]}),Prism.languages.purs=Prism.languages.purescript; \ No newline at end of file diff --git a/components/prism-python.js b/components/prism-python.js index 8a8733c5b4..f820b65b90 100644 --- a/components/prism-python.js +++ b/components/prism-python.js @@ -4,7 +4,7 @@ Prism.languages.python = { lookbehind: true }, 'string-interpolation': { - pattern: /(?:f|rf|fr)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i, + pattern: /(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i, greedy: true, inside: { 'interpolation': { @@ -27,12 +27,12 @@ Prism.languages.python = { } }, 'triple-quoted-string': { - pattern: /(?:[rub]|rb|br)?("""|''')[\s\S]*?\1/i, + pattern: /(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i, greedy: true, alias: 'string' }, 'string': { - pattern: /(?:[rub]|rb|br)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i, + pattern: /(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i, greedy: true }, 'function': { @@ -53,7 +53,7 @@ Prism.languages.python = { }, 'keyword': /\b(?:and|as|assert|async|await|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/, 'builtin': /\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/, - 'boolean': /\b(?:True|False|None)\b/, + 'boolean': /\b(?:False|None|True)\b/, 'number': /\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?\b/i, 'operator': /[-+%=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/, 'punctuation': /[{}[\];(),.:]/ diff --git a/components/prism-python.min.js b/components/prism-python.min.js index 8c77bae142..209a67307b 100644 --- a/components/prism-python.min.js +++ b/components/prism-python.min.js @@ -1 +1 @@ -Prism.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0},"string-interpolation":{pattern:/(?:f|rf|fr)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|rb|br)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|rb|br)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/im,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:and|as|assert|async|await|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:True|False|None)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?\b/i,operator:/[-+%=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},Prism.languages.python["string-interpolation"].inside.interpolation.inside.rest=Prism.languages.python,Prism.languages.py=Prism.languages.python; \ No newline at end of file +Prism.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/im,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:and|as|assert|async|await|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?\b/i,operator:/[-+%=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},Prism.languages.python["string-interpolation"].inside.interpolation.inside.rest=Prism.languages.python,Prism.languages.py=Prism.languages.python; \ No newline at end of file diff --git a/components/prism-q.js b/components/prism-q.js index 26d2e1b437..a3d253b549 100644 --- a/components/prism-q.js +++ b/components/prism-q.js @@ -37,7 +37,7 @@ Prism.languages.q = { }, // The negative look-ahead prevents bad highlighting // of verbs 0: and 1: - 'number': /\b(?![01]:)(?:0[wn]|0W[hj]?|0N[hje]?|0x[\da-fA-F]+|\d+(?:\.\d*)?(?:e[+-]?\d+)?[hjfeb]?)/, + 'number': /\b(?![01]:)(?:0N[hje]?|0W[hj]?|0[wn]|0x[\da-fA-F]+|\d+(?:\.\d*)?(?:e[+-]?\d+)?[hjfeb]?)/, 'keyword': /\\\w+\b|\b(?:abs|acos|aj0?|all|and|any|asc|asin|asof|atan|attr|avgs?|binr?|by|ceiling|cols|cor|cos|count|cov|cross|csv|cut|delete|deltas|desc|dev|differ|distinct|div|do|dsave|ej|enlist|eval|except|exec|exit|exp|fby|fills|first|fkeys|flip|floor|from|get|getenv|group|gtime|hclose|hcount|hdel|hopen|hsym|iasc|identity|idesc|if|ij|in|insert|inter|inv|keys?|last|like|list|ljf?|load|log|lower|lsq|ltime|ltrim|mavg|maxs?|mcount|md5|mdev|med|meta|mins?|mmax|mmin|mmu|mod|msum|neg|next|not|null|or|over|parse|peach|pj|plist|prds?|prev|prior|rand|rank|ratios|raze|read0|read1|reciprocal|reval|reverse|rload|rotate|rsave|rtrim|save|scan|scov|sdev|select|set|setenv|show|signum|sin|sqrt|ssr?|string|sublist|sums?|sv|svar|system|tables|tan|til|trim|txf|type|uj|ungroup|union|update|upper|upsert|value|var|views?|vs|wavg|where|while|within|wj1?|wsum|ww|xasc|xbar|xcols?|xdesc|xexp|xgroup|xkey|xlog|xprev|xrank)\b/, 'adverb': { pattern: /['\/\\]:?|\beach\b/, diff --git a/components/prism-q.min.js b/components/prism-q.min.js index 25577b3ee3..5b419f87eb 100644 --- a/components/prism-q.min.js +++ b/components/prism-q.min.js @@ -1 +1 @@ -Prism.languages.q={string:/"(?:\\.|[^"\\\r\n])*"/,comment:[{pattern:/([\t )\]}])\/.*/,lookbehind:!0,greedy:!0},{pattern:/(^|\r?\n|\r)\/[\t ]*(?:(?:\r?\n|\r)(?:.*(?:\r?\n|\r(?!\n)))*?(?:\\(?=[\t ]*(?:\r?\n|\r))|$)|\S.*)/,lookbehind:!0,greedy:!0},{pattern:/^\\[\t ]*(?:\r?\n|\r)[\s\S]+/m,greedy:!0},{pattern:/^#!.+/m,greedy:!0}],symbol:/`(?::\S+|[\w.]*)/,datetime:{pattern:/0N[mdzuvt]|0W[dtz]|\d{4}\.\d\d(?:m|\.\d\d(?:T(?:\d\d(?::\d\d(?::\d\d(?:[.:]\d\d\d)?)?)?)?)?[dz]?)|\d\d:\d\d(?::\d\d(?:[.:]\d\d\d)?)?[uvt]?/,alias:"number"},number:/\b(?![01]:)(?:0[wn]|0W[hj]?|0N[hje]?|0x[\da-fA-F]+|\d+(?:\.\d*)?(?:e[+-]?\d+)?[hjfeb]?)/,keyword:/\\\w+\b|\b(?:abs|acos|aj0?|all|and|any|asc|asin|asof|atan|attr|avgs?|binr?|by|ceiling|cols|cor|cos|count|cov|cross|csv|cut|delete|deltas|desc|dev|differ|distinct|div|do|dsave|ej|enlist|eval|except|exec|exit|exp|fby|fills|first|fkeys|flip|floor|from|get|getenv|group|gtime|hclose|hcount|hdel|hopen|hsym|iasc|identity|idesc|if|ij|in|insert|inter|inv|keys?|last|like|list|ljf?|load|log|lower|lsq|ltime|ltrim|mavg|maxs?|mcount|md5|mdev|med|meta|mins?|mmax|mmin|mmu|mod|msum|neg|next|not|null|or|over|parse|peach|pj|plist|prds?|prev|prior|rand|rank|ratios|raze|read0|read1|reciprocal|reval|reverse|rload|rotate|rsave|rtrim|save|scan|scov|sdev|select|set|setenv|show|signum|sin|sqrt|ssr?|string|sublist|sums?|sv|svar|system|tables|tan|til|trim|txf|type|uj|ungroup|union|update|upper|upsert|value|var|views?|vs|wavg|where|while|within|wj1?|wsum|ww|xasc|xbar|xcols?|xdesc|xexp|xgroup|xkey|xlog|xprev|xrank)\b/,adverb:{pattern:/['\/\\]:?|\beach\b/,alias:"function"},verb:{pattern:/(?:\B\.\B|\b[01]:|<[=>]?|>=?|[:+\-*%,!?~=|$&#@^]):?|\b_\b:?/,alias:"operator"},punctuation:/[(){}\[\];.]/}; \ No newline at end of file +Prism.languages.q={string:/"(?:\\.|[^"\\\r\n])*"/,comment:[{pattern:/([\t )\]}])\/.*/,lookbehind:!0,greedy:!0},{pattern:/(^|\r?\n|\r)\/[\t ]*(?:(?:\r?\n|\r)(?:.*(?:\r?\n|\r(?!\n)))*?(?:\\(?=[\t ]*(?:\r?\n|\r))|$)|\S.*)/,lookbehind:!0,greedy:!0},{pattern:/^\\[\t ]*(?:\r?\n|\r)[\s\S]+/m,greedy:!0},{pattern:/^#!.+/m,greedy:!0}],symbol:/`(?::\S+|[\w.]*)/,datetime:{pattern:/0N[mdzuvt]|0W[dtz]|\d{4}\.\d\d(?:m|\.\d\d(?:T(?:\d\d(?::\d\d(?::\d\d(?:[.:]\d\d\d)?)?)?)?)?[dz]?)|\d\d:\d\d(?::\d\d(?:[.:]\d\d\d)?)?[uvt]?/,alias:"number"},number:/\b(?![01]:)(?:0N[hje]?|0W[hj]?|0[wn]|0x[\da-fA-F]+|\d+(?:\.\d*)?(?:e[+-]?\d+)?[hjfeb]?)/,keyword:/\\\w+\b|\b(?:abs|acos|aj0?|all|and|any|asc|asin|asof|atan|attr|avgs?|binr?|by|ceiling|cols|cor|cos|count|cov|cross|csv|cut|delete|deltas|desc|dev|differ|distinct|div|do|dsave|ej|enlist|eval|except|exec|exit|exp|fby|fills|first|fkeys|flip|floor|from|get|getenv|group|gtime|hclose|hcount|hdel|hopen|hsym|iasc|identity|idesc|if|ij|in|insert|inter|inv|keys?|last|like|list|ljf?|load|log|lower|lsq|ltime|ltrim|mavg|maxs?|mcount|md5|mdev|med|meta|mins?|mmax|mmin|mmu|mod|msum|neg|next|not|null|or|over|parse|peach|pj|plist|prds?|prev|prior|rand|rank|ratios|raze|read0|read1|reciprocal|reval|reverse|rload|rotate|rsave|rtrim|save|scan|scov|sdev|select|set|setenv|show|signum|sin|sqrt|ssr?|string|sublist|sums?|sv|svar|system|tables|tan|til|trim|txf|type|uj|ungroup|union|update|upper|upsert|value|var|views?|vs|wavg|where|while|within|wj1?|wsum|ww|xasc|xbar|xcols?|xdesc|xexp|xgroup|xkey|xlog|xprev|xrank)\b/,adverb:{pattern:/['\/\\]:?|\beach\b/,alias:"function"},verb:{pattern:/(?:\B\.\B|\b[01]:|<[=>]?|>=?|[:+\-*%,!?~=|$&#@^]):?|\b_\b:?/,alias:"operator"},punctuation:/[(){}\[\];.]/}; \ No newline at end of file diff --git a/components/prism-qore.js b/components/prism-qore.js index 2b8d4fb78e..d69113641a 100644 --- a/components/prism-qore.js +++ b/components/prism-qore.js @@ -8,8 +8,8 @@ Prism.languages.qore = Prism.languages.extend('clike', { pattern: /("|')(?:\\[\s\S]|(?!\1)[^\\])*\1/, greedy: true }, - 'keyword': /\b(?:abstract|any|assert|binary|bool|boolean|break|byte|case|catch|char|class|code|const|continue|data|default|do|double|else|enum|extends|final|finally|float|for|goto|hash|if|implements|import|inherits|instanceof|int|interface|long|my|native|new|nothing|null|object|our|own|private|reference|rethrow|return|short|soft(?:int|float|number|bool|string|date|list)|static|strictfp|string|sub|super|switch|synchronized|this|throw|throws|transient|try|void|volatile|while)\b/, - 'boolean': /\b(?:true|false)\b/i, + 'keyword': /\b(?:abstract|any|assert|binary|bool|boolean|break|byte|case|catch|char|class|code|const|continue|data|default|do|double|else|enum|extends|final|finally|float|for|goto|hash|if|implements|import|inherits|instanceof|int|interface|long|my|native|new|nothing|null|object|our|own|private|reference|rethrow|return|short|soft(?:bool|date|float|int|list|number|string)|static|strictfp|string|sub|super|switch|synchronized|this|throw|throws|transient|try|void|volatile|while)\b/, + 'boolean': /\b(?:false|true)\b/i, 'function': /\$?\b(?!\d)\w+(?=\()/, 'number': /\b(?:0b[01]+|0x(?:[\da-f]*\.)?[\da-fp\-]+|(?:\d+(?:\.\d+)?|\.\d+)(?:e\d+)?[df]|(?:\d+(?:\.\d+)?|\.\d+))\b/i, 'operator': { diff --git a/components/prism-qore.min.js b/components/prism-qore.min.js index 0566c3e16f..ed1efaa438 100644 --- a/components/prism-qore.min.js +++ b/components/prism-qore.min.js @@ -1 +1 @@ -Prism.languages.qore=Prism.languages.extend("clike",{comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:\/\/|#).*)/,lookbehind:!0},string:{pattern:/("|')(?:\\[\s\S]|(?!\1)[^\\])*\1/,greedy:!0},keyword:/\b(?:abstract|any|assert|binary|bool|boolean|break|byte|case|catch|char|class|code|const|continue|data|default|do|double|else|enum|extends|final|finally|float|for|goto|hash|if|implements|import|inherits|instanceof|int|interface|long|my|native|new|nothing|null|object|our|own|private|reference|rethrow|return|short|soft(?:int|float|number|bool|string|date|list)|static|strictfp|string|sub|super|switch|synchronized|this|throw|throws|transient|try|void|volatile|while)\b/,boolean:/\b(?:true|false)\b/i,function:/\$?\b(?!\d)\w+(?=\()/,number:/\b(?:0b[01]+|0x(?:[\da-f]*\.)?[\da-fp\-]+|(?:\d+(?:\.\d+)?|\.\d+)(?:e\d+)?[df]|(?:\d+(?:\.\d+)?|\.\d+))\b/i,operator:{pattern:/(^|[^.])(?:\+[+=]?|-[-=]?|[!=](?:==?|~)?|>>?=?|<(?:=>?|<=?)?|&[&=]?|\|[|=]?|[*\/%^]=?|[~?])/,lookbehind:!0},variable:/\$(?!\d)\w+\b/}); \ No newline at end of file +Prism.languages.qore=Prism.languages.extend("clike",{comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:\/\/|#).*)/,lookbehind:!0},string:{pattern:/("|')(?:\\[\s\S]|(?!\1)[^\\])*\1/,greedy:!0},keyword:/\b(?:abstract|any|assert|binary|bool|boolean|break|byte|case|catch|char|class|code|const|continue|data|default|do|double|else|enum|extends|final|finally|float|for|goto|hash|if|implements|import|inherits|instanceof|int|interface|long|my|native|new|nothing|null|object|our|own|private|reference|rethrow|return|short|soft(?:bool|date|float|int|list|number|string)|static|strictfp|string|sub|super|switch|synchronized|this|throw|throws|transient|try|void|volatile|while)\b/,boolean:/\b(?:false|true)\b/i,function:/\$?\b(?!\d)\w+(?=\()/,number:/\b(?:0b[01]+|0x(?:[\da-f]*\.)?[\da-fp\-]+|(?:\d+(?:\.\d+)?|\.\d+)(?:e\d+)?[df]|(?:\d+(?:\.\d+)?|\.\d+))\b/i,operator:{pattern:/(^|[^.])(?:\+[+=]?|-[-=]?|[!=](?:==?|~)?|>>?=?|<(?:=>?|<=?)?|&[&=]?|\|[|=]?|[*\/%^]=?|[~?])/,lookbehind:!0},variable:/\$(?!\d)\w+\b/}); \ No newline at end of file diff --git a/components/prism-qsharp.js b/components/prism-qsharp.js index 05ff9560cb..f8c403559f 100644 --- a/components/prism-qsharp.js +++ b/components/prism-qsharp.js @@ -91,7 +91,7 @@ ], 'keyword': keywords, 'number': /(?:\b0(?:x[\da-f]+|b[01]+|o[0-7]+)|(?:\B\.\d+|\b\d+(?:\.\d*)?)(?:e[-+]?\d+)?)l?\b/i, - 'operator': /\band=|\bor=|\band\b|\bor\b|\bnot\b|<[-=]|[-=]>|>>>=?|<<<=?|\^\^\^=?|\|\|\|=?|&&&=?|w\/=?|~~~|[*\/+\-^=!%]=?/, + 'operator': /\band=|\bor=|\band\b|\bnot\b|\bor\b|<[-=]|[-=]>|>>>=?|<<<=?|\^\^\^=?|\|\|\|=?|&&&=?|w\/=?|~~~|[*\/+\-^=!%]=?/, 'punctuation': /::|[{}[\];(),.:]/ }); diff --git a/components/prism-qsharp.min.js b/components/prism-qsharp.min.js index 94ccaab598..827bef2b19 100644 --- a/components/prism-qsharp.min.js +++ b/components/prism-qsharp.min.js @@ -1 +1 @@ -!function(e){function a(e,r){return e.replace(/<<(\d+)>>/g,function(e,n){return"(?:"+r[+n]+")"})}function n(e,n,r){return RegExp(a(e,n),r||"")}var r=RegExp("\\b(?:"+("Adj BigInt Bool Ctl Double false Int One Pauli PauliI PauliX PauliY PauliZ Qubit Range Result String true Unit Zero"+" "+"Adjoint adjoint apply as auto body borrow borrowing Controlled controlled distribute elif else fail fixup for function if in internal intrinsic invert is let mutable namespace new newtype open operation repeat return self set until use using while within").trim().replace(/ /g,"|")+")\\b"),t=a("<<0>>(?:\\s*\\.\\s*<<0>>)*",["\\b[A-Za-z_]\\w*\\b"]),i={keyword:r,punctuation:/[<>()?,.:[\]]/},s='"(?:\\\\.|[^\\\\"])*"';e.languages.qsharp=e.languages.extend("clike",{comment:/\/\/.*/,string:[{pattern:n("(^|[^$\\\\])<<0>>",[s]),lookbehind:!0,greedy:!0}],"class-name":[{pattern:n("(\\b(?:as|open)\\s+)<<0>>(?=\\s*(?:;|as\\b))",[t]),lookbehind:!0,inside:i},{pattern:n("(\\bnamespace\\s+)<<0>>(?=\\s*\\{)",[t]),lookbehind:!0,inside:i}],keyword:r,number:/(?:\b0(?:x[\da-f]+|b[01]+|o[0-7]+)|(?:\B\.\d+|\b\d+(?:\.\d*)?)(?:e[-+]?\d+)?)l?\b/i,operator:/\band=|\bor=|\band\b|\bor\b|\bnot\b|<[-=]|[-=]>|>>>=?|<<<=?|\^\^\^=?|\|\|\|=?|&&&=?|w\/=?|~~~|[*\/+\-^=!%]=?/,punctuation:/::|[{}[\];(),.:]/}),e.languages.insertBefore("qsharp","number",{range:{pattern:/\.\./,alias:"operator"}});var o=function(e,n){for(var r=0;r>/g,function(){return"(?:"+e+")"});return e.replace(/<>/g,"[^\\s\\S]")}(a('\\{(?:[^"{}]|<<0>>|<>)*\\}',[s]),2);e.languages.insertBefore("qsharp","string",{"interpolation-string":{pattern:n('\\$"(?:\\\\.|<<0>>|[^\\\\"{])*"',[o]),greedy:!0,inside:{interpolation:{pattern:n("((?:^|[^\\\\])(?:\\\\\\\\)*)<<0>>",[o]),lookbehind:!0,inside:{punctuation:/^\{|\}$/,expression:{pattern:/[\s\S]+/,alias:"language-qsharp",inside:e.languages.qsharp}}},string:/[\s\S]+/}}})}(Prism),Prism.languages.qs=Prism.languages.qsharp; \ No newline at end of file +!function(e){function a(e,r){return e.replace(/<<(\d+)>>/g,function(e,n){return"(?:"+r[+n]+")"})}function n(e,n,r){return RegExp(a(e,n),r||"")}var r=RegExp("\\b(?:"+("Adj BigInt Bool Ctl Double false Int One Pauli PauliI PauliX PauliY PauliZ Qubit Range Result String true Unit Zero"+" "+"Adjoint adjoint apply as auto body borrow borrowing Controlled controlled distribute elif else fail fixup for function if in internal intrinsic invert is let mutable namespace new newtype open operation repeat return self set until use using while within").trim().replace(/ /g,"|")+")\\b"),t=a("<<0>>(?:\\s*\\.\\s*<<0>>)*",["\\b[A-Za-z_]\\w*\\b"]),i={keyword:r,punctuation:/[<>()?,.:[\]]/},s='"(?:\\\\.|[^\\\\"])*"';e.languages.qsharp=e.languages.extend("clike",{comment:/\/\/.*/,string:[{pattern:n("(^|[^$\\\\])<<0>>",[s]),lookbehind:!0,greedy:!0}],"class-name":[{pattern:n("(\\b(?:as|open)\\s+)<<0>>(?=\\s*(?:;|as\\b))",[t]),lookbehind:!0,inside:i},{pattern:n("(\\bnamespace\\s+)<<0>>(?=\\s*\\{)",[t]),lookbehind:!0,inside:i}],keyword:r,number:/(?:\b0(?:x[\da-f]+|b[01]+|o[0-7]+)|(?:\B\.\d+|\b\d+(?:\.\d*)?)(?:e[-+]?\d+)?)l?\b/i,operator:/\band=|\bor=|\band\b|\bnot\b|\bor\b|<[-=]|[-=]>|>>>=?|<<<=?|\^\^\^=?|\|\|\|=?|&&&=?|w\/=?|~~~|[*\/+\-^=!%]=?/,punctuation:/::|[{}[\];(),.:]/}),e.languages.insertBefore("qsharp","number",{range:{pattern:/\.\./,alias:"operator"}});var o=function(e,n){for(var r=0;r>/g,function(){return"(?:"+e+")"});return e.replace(/<>/g,"[^\\s\\S]")}(a('\\{(?:[^"{}]|<<0>>|<>)*\\}',[s]),2);e.languages.insertBefore("qsharp","string",{"interpolation-string":{pattern:n('\\$"(?:\\\\.|<<0>>|[^\\\\"{])*"',[o]),greedy:!0,inside:{interpolation:{pattern:n("((?:^|[^\\\\])(?:\\\\\\\\)*)<<0>>",[o]),lookbehind:!0,inside:{punctuation:/^\{|\}$/,expression:{pattern:/[\s\S]+/,alias:"language-qsharp",inside:e.languages.qsharp}}},string:/[\s\S]+/}}})}(Prism),Prism.languages.qs=Prism.languages.qsharp; \ No newline at end of file diff --git a/components/prism-r.js b/components/prism-r.js index 549059ec80..bc16502a9a 100644 --- a/components/prism-r.js +++ b/components/prism-r.js @@ -10,13 +10,13 @@ Prism.languages.r = { pattern: /%[^%\s]*%/, alias: 'operator' }, - 'boolean': /\b(?:TRUE|FALSE)\b/, + 'boolean': /\b(?:FALSE|TRUE)\b/, 'ellipsis': /\.\.(?:\.|\d+)/, 'number': [ - /\b(?:NaN|Inf)\b/, + /\b(?:Inf|NaN)\b/, /(?:\b0x[\dA-Fa-f]+(?:\.\d*)?|\b\d+(?:\.\d*)?|\B\.\d+)(?:[EePp][+-]?\d+)?[iL]?/ ], - 'keyword': /\b(?:if|else|repeat|while|function|for|in|next|break|NULL|NA|NA_integer_|NA_real_|NA_complex_|NA_character_)\b/, + 'keyword': /\b(?:NA|NA_character_|NA_complex_|NA_integer_|NA_real_|NULL|break|else|for|function|if|in|next|repeat|while)\b/, 'operator': /->?>?|<(?:=|=!]=?|::?|&&?|\|\|?|[+*\/^$@~]/, 'punctuation': /[(){}\[\],;]/ }; diff --git a/components/prism-r.min.js b/components/prism-r.min.js index 4a8ef38883..47513bb153 100644 --- a/components/prism-r.min.js +++ b/components/prism-r.min.js @@ -1 +1 @@ -Prism.languages.r={comment:/#.*/,string:{pattern:/(['"])(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0},"percent-operator":{pattern:/%[^%\s]*%/,alias:"operator"},boolean:/\b(?:TRUE|FALSE)\b/,ellipsis:/\.\.(?:\.|\d+)/,number:[/\b(?:NaN|Inf)\b/,/(?:\b0x[\dA-Fa-f]+(?:\.\d*)?|\b\d+(?:\.\d*)?|\B\.\d+)(?:[EePp][+-]?\d+)?[iL]?/],keyword:/\b(?:if|else|repeat|while|function|for|in|next|break|NULL|NA|NA_integer_|NA_real_|NA_complex_|NA_character_)\b/,operator:/->?>?|<(?:=|=!]=?|::?|&&?|\|\|?|[+*\/^$@~]/,punctuation:/[(){}\[\],;]/}; \ No newline at end of file +Prism.languages.r={comment:/#.*/,string:{pattern:/(['"])(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0},"percent-operator":{pattern:/%[^%\s]*%/,alias:"operator"},boolean:/\b(?:FALSE|TRUE)\b/,ellipsis:/\.\.(?:\.|\d+)/,number:[/\b(?:Inf|NaN)\b/,/(?:\b0x[\dA-Fa-f]+(?:\.\d*)?|\b\d+(?:\.\d*)?|\B\.\d+)(?:[EePp][+-]?\d+)?[iL]?/],keyword:/\b(?:NA|NA_character_|NA_complex_|NA_integer_|NA_real_|NULL|break|else|for|function|if|in|next|repeat|while)\b/,operator:/->?>?|<(?:=|=!]=?|::?|&&?|\|\|?|[+*\/^$@~]/,punctuation:/[(){}\[\],;]/}; \ No newline at end of file diff --git a/components/prism-reason.js b/components/prism-reason.js index ff2db27900..4dce938b06 100644 --- a/components/prism-reason.js +++ b/components/prism-reason.js @@ -6,7 +6,7 @@ Prism.languages.reason = Prism.languages.extend('clike', { // 'class-name' must be matched *after* 'constructor' defined below 'class-name': /\b[A-Z]\w*/, 'keyword': /\b(?:and|as|assert|begin|class|constraint|do|done|downto|else|end|exception|external|for|fun|function|functor|if|in|include|inherit|initializer|lazy|let|method|module|mutable|new|nonrec|object|of|open|or|private|rec|sig|struct|switch|then|to|try|type|val|virtual|when|while|with)\b/, - 'operator': /\.{3}|:[:=]|\|>|->|=(?:==?|>)?|<=?|>=?|[|^?'#!~`]|[+\-*\/]\.?|\b(?:mod|land|lor|lxor|lsl|lsr|asr)\b/ + 'operator': /\.{3}|:[:=]|\|>|->|=(?:==?|>)?|<=?|>=?|[|^?'#!~`]|[+\-*\/]\.?|\b(?:asr|land|lor|lsl|lsr|lxor|mod)\b/ }); Prism.languages.insertBefore('reason', 'class-name', { 'character': { diff --git a/components/prism-reason.min.js b/components/prism-reason.min.js index 0e46279a58..0d4abf0a57 100644 --- a/components/prism-reason.min.js +++ b/components/prism-reason.min.js @@ -1 +1 @@ -Prism.languages.reason=Prism.languages.extend("clike",{string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^\\\r\n"])*"/,greedy:!0},"class-name":/\b[A-Z]\w*/,keyword:/\b(?:and|as|assert|begin|class|constraint|do|done|downto|else|end|exception|external|for|fun|function|functor|if|in|include|inherit|initializer|lazy|let|method|module|mutable|new|nonrec|object|of|open|or|private|rec|sig|struct|switch|then|to|try|type|val|virtual|when|while|with)\b/,operator:/\.{3}|:[:=]|\|>|->|=(?:==?|>)?|<=?|>=?|[|^?'#!~`]|[+\-*\/]\.?|\b(?:mod|land|lor|lxor|lsl|lsr|asr)\b/}),Prism.languages.insertBefore("reason","class-name",{character:{pattern:/'(?:\\x[\da-f]{2}|\\o[0-3][0-7][0-7]|\\\d{3}|\\.|[^'\\\r\n])'/,alias:"string"},constructor:{pattern:/\b[A-Z]\w*\b(?!\s*\.)/,alias:"variable"},label:{pattern:/\b[a-z]\w*(?=::)/,alias:"symbol"}}),delete Prism.languages.reason.function; \ No newline at end of file +Prism.languages.reason=Prism.languages.extend("clike",{string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^\\\r\n"])*"/,greedy:!0},"class-name":/\b[A-Z]\w*/,keyword:/\b(?:and|as|assert|begin|class|constraint|do|done|downto|else|end|exception|external|for|fun|function|functor|if|in|include|inherit|initializer|lazy|let|method|module|mutable|new|nonrec|object|of|open|or|private|rec|sig|struct|switch|then|to|try|type|val|virtual|when|while|with)\b/,operator:/\.{3}|:[:=]|\|>|->|=(?:==?|>)?|<=?|>=?|[|^?'#!~`]|[+\-*\/]\.?|\b(?:asr|land|lor|lsl|lsr|lxor|mod)\b/}),Prism.languages.insertBefore("reason","class-name",{character:{pattern:/'(?:\\x[\da-f]{2}|\\o[0-3][0-7][0-7]|\\\d{3}|\\.|[^'\\\r\n])'/,alias:"string"},constructor:{pattern:/\b[A-Z]\w*\b(?!\s*\.)/,alias:"variable"},label:{pattern:/\b[a-z]\w*(?=::)/,alias:"symbol"}}),delete Prism.languages.reason.function; \ No newline at end of file diff --git a/components/prism-regex.js b/components/prism-regex.js index e72987aaf2..6a1020d3e4 100644 --- a/components/prism-regex.js +++ b/components/prism-regex.js @@ -4,7 +4,7 @@ pattern: /\\[\\(){}[\]^$+*?|.]/, alias: 'escape' }; - var escape = /\\(?:x[\da-fA-F]{2}|u[\da-fA-F]{4}|u\{[\da-fA-F]+\}|c[a-zA-Z]|0[0-7]{0,2}|[123][0-7]{2}|.)/; + var escape = /\\(?:x[\da-fA-F]{2}|u[\da-fA-F]{4}|u\{[\da-fA-F]+\}|0[0-7]{0,2}|[123][0-7]{2}|c[a-zA-Z]|.)/; var charClass = { pattern: /\.|\\[wsd]|\\p\{[^{}]+\}/i, alias: 'class-name' diff --git a/components/prism-regex.min.js b/components/prism-regex.min.js index 9d8c8539aa..044af823f8 100644 --- a/components/prism-regex.min.js +++ b/components/prism-regex.min.js @@ -1 +1 @@ -!function(a){var e={pattern:/\\[\\(){}[\]^$+*?|.]/,alias:"escape"},n=/\\(?:x[\da-fA-F]{2}|u[\da-fA-F]{4}|u\{[\da-fA-F]+\}|c[a-zA-Z]|0[0-7]{0,2}|[123][0-7]{2}|.)/,t="(?:[^\\\\-]|"+n.source+")",s=RegExp(t+"-"+t),i={pattern:/(<|')[^<>']+(?=[>']$)/,lookbehind:!0,alias:"variable"};a.languages.regex={charset:{pattern:/((?:^|[^\\])(?:\\\\)*)\[(?:[^\\\]]|\\[\s\S])*\]/,lookbehind:!0,inside:{"charset-negation":{pattern:/(^\[)\^/,lookbehind:!0,alias:"operator"},"charset-punctuation":{pattern:/^\[|\]$/,alias:"punctuation"},range:{pattern:s,inside:{escape:n,"range-punctuation":{pattern:/-/,alias:"operator"}}},"special-escape":e,charclass:{pattern:/\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},escape:n}},"special-escape":e,charclass:{pattern:/\.|\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},backreference:[{pattern:/\\(?![123][0-7]{2})[1-9]/,alias:"keyword"},{pattern:/\\k<[^<>']+>/,alias:"keyword",inside:{"group-name":i}}],anchor:{pattern:/[$^]|\\[ABbGZz]/,alias:"function"},escape:n,group:[{pattern:/\((?:\?(?:<[^<>']+>|'[^<>']+'|[>:]|']+(?=[>']$)/,lookbehind:!0,alias:"variable"};a.languages.regex={charset:{pattern:/((?:^|[^\\])(?:\\\\)*)\[(?:[^\\\]]|\\[\s\S])*\]/,lookbehind:!0,inside:{"charset-negation":{pattern:/(^\[)\^/,lookbehind:!0,alias:"operator"},"charset-punctuation":{pattern:/^\[|\]$/,alias:"punctuation"},range:{pattern:s,inside:{escape:n,"range-punctuation":{pattern:/-/,alias:"operator"}}},"special-escape":e,charclass:{pattern:/\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},escape:n}},"special-escape":e,charclass:{pattern:/\.|\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},backreference:[{pattern:/\\(?![123][0-7]{2})[1-9]/,alias:"keyword"},{pattern:/\\k<[^<>']+>/,alias:"keyword",inside:{"group-name":i}}],anchor:{pattern:/[$^]|\\[ABbGZz]/,alias:"function"},escape:n,group:[{pattern:/\((?:\?(?:<[^<>']+>|'[^<>']+'|[>:]|:=]=?|!=|\b_\b/,punctuation:/[,;.\[\]{}()]/}; \ No newline at end of file +Prism.languages.rego={comment:/#.*/,property:{pattern:/(^|[^\\.])(?:"(?:\\.|[^\\"\r\n])*"|`[^`]*`|\b[a-z_]\w*\b)(?=\s*:(?!=))/i,lookbehind:!0,greedy:!0},string:{pattern:/(^|[^\\])"(?:\\.|[^\\"\r\n])*"|`[^`]*`/,lookbehind:!0,greedy:!0},keyword:/\b(?:as|default|else|import|not|null|package|set(?=\s*\()|some|with)\b/,boolean:/\b(?:false|true)\b/,function:{pattern:/\b[a-z_]\w*\b(?:\s*\.\s*\b[a-z_]\w*\b)*(?=\s*\()/i,inside:{namespace:/\b\w+\b(?=\s*\.)/,punctuation:/\./}},number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,operator:/[-+*/%|&]|[<>:=]=?|!=|\b_\b/,punctuation:/[,;.\[\]{}()]/}; \ No newline at end of file diff --git a/components/prism-renpy.js b/components/prism-renpy.js index 44beba9e9a..d543681bb2 100644 --- a/components/prism-renpy.js +++ b/components/prism-renpy.js @@ -7,23 +7,23 @@ Prism.languages.renpy = { }, 'string': { - pattern: /("""|''')[\s\S]+?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2|(?:^#?(?:[0-9a-fA-F]{6}|(?:[0-9a-fA-F]){3})$)/m, + pattern: /("""|''')[\s\S]+?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2|(?:^#?(?:(?:[0-9a-fA-F]){3}|[0-9a-fA-F]{6})$)/m, greedy: true }, 'function': /\b[a-z_]\w*(?=\()/i, - 'property': /\b(?:insensitive|idle|hover|selected_idle|selected_hover|background|position|alt|xpos|ypos|pos|xanchor|yanchor|anchor|xalign|yalign|align|xcenter|ycenter|xofsset|yoffset|ymaximum|maximum|xmaximum|xminimum|yminimum|minimum|xsize|ysizexysize|xfill|yfill|area|antialias|black_color|bold|caret|color|first_indent|font|size|italic|justify|kerning|language|layout|line_leading|line_overlap_split|line_spacing|min_width|newline_indent|outlines|rest_indent|ruby_style|slow_cps|slow_cps_multiplier|strikethrough|text_align|underline|hyperlink_functions|vertical|hinting|foreground|left_margin|xmargin|top_margin|bottom_margin|ymargin|left_padding|right_padding|xpadding|top_padding|bottom_padding|ypadding|size_group|child|hover_sound|activate_sound|mouse|focus_mask|keyboard_focus|bar_vertical|bar_invert|bar_resizing|left_gutter|right_gutter|top_gutter|bottom_gutter|left_bar|right_bar|top_bar|bottom_bar|thumb|thumb_shadow|thumb_offset|unscrollable|spacing|first_spacing|box_reverse|box_wrap|order_reverse|fit_first|ysize|thumbnail_width|thumbnail_height|help|text_ypos|text_xpos|idle_color|hover_color|selected_idle_color|selected_hover_color|insensitive_color|alpha|insensitive_background|hover_background|zorder|value|width|xadjustment|xanchoraround|xaround|xinitial|xoffset|xzoom|yadjustment|yanchoraround|yaround|yinitial|yzoom|zoom|ground|height|text_style|text_y_fudge|selected_insensitive|has_sound|has_music|has_voice|focus|hovered|image_style|length|minwidth|mousewheel|offset|prefix|radius|range|right_margin|rotate|rotate_pad|developer|screen_width|screen_height|window_title|name|version|windows_icon|default_fullscreen|default_text_cps|default_afm_time|main_menu_music|sample_sound|enter_sound|exit_sound|save_directory|enter_transition|exit_transition|intra_transition|main_game_transition|game_main_transition|end_splash_transition|end_game_transition|after_load_transition|window_show_transition|window_hide_transition|adv_nvl_transition|nvl_adv_transition|enter_yesno_transition|exit_yesno_transition|enter_replay_transition|exit_replay_transition|say_attribute_transition|directory_name|executable_name|include_update|window_icon|modal|google_play_key|google_play_salt|drag_name|drag_handle|draggable|dragged|droppable|dropped|narrator_menu|action|default_afm_enable|version_name|version_tuple|inside|fadeout|fadein|layers|layer_clipping|linear|scrollbars|side_xpos|side_ypos|side_spacing|edgescroll|drag_joined|drag_raise|drop_shadow|drop_shadow_color|subpixel|easein|easeout|time|crop|auto|update|get_installed_packages|can_update|UpdateVersion|Update|overlay_functions|translations|window_left_padding|show_side_image|show_two_window)\b/, + 'property': /\b(?:Update|UpdateVersion|action|activate_sound|adv_nvl_transition|after_load_transition|align|alpha|alt|anchor|antialias|area|auto|background|bar_invert|bar_resizing|bar_vertical|black_color|bold|bottom_bar|bottom_gutter|bottom_margin|bottom_padding|box_reverse|box_wrap|can_update|caret|child|color|crop|default_afm_enable|default_afm_time|default_fullscreen|default_text_cps|developer|directory_name|drag_handle|drag_joined|drag_name|drag_raise|draggable|dragged|drop_shadow|drop_shadow_color|droppable|dropped|easein|easeout|edgescroll|end_game_transition|end_splash_transition|enter_replay_transition|enter_sound|enter_transition|enter_yesno_transition|executable_name|exit_replay_transition|exit_sound|exit_transition|exit_yesno_transition|fadein|fadeout|first_indent|first_spacing|fit_first|focus|focus_mask|font|foreground|game_main_transition|get_installed_packages|google_play_key|google_play_salt|ground|has_music|has_sound|has_voice|height|help|hinting|hover|hover_background|hover_color|hover_sound|hovered|hyperlink_functions|idle|idle_color|image_style|include_update|insensitive|insensitive_background|insensitive_color|inside|intra_transition|italic|justify|kerning|keyboard_focus|language|layer_clipping|layers|layout|left_bar|left_gutter|left_margin|left_padding|length|line_leading|line_overlap_split|line_spacing|linear|main_game_transition|main_menu_music|maximum|min_width|minimum|minwidth|modal|mouse|mousewheel|name|narrator_menu|newline_indent|nvl_adv_transition|offset|order_reverse|outlines|overlay_functions|pos|position|prefix|radius|range|rest_indent|right_bar|right_gutter|right_margin|right_padding|rotate|rotate_pad|ruby_style|sample_sound|save_directory|say_attribute_transition|screen_height|screen_width|scrollbars|selected_hover|selected_hover_color|selected_idle|selected_idle_color|selected_insensitive|show_side_image|show_two_window|side_spacing|side_xpos|side_ypos|size|size_group|slow_cps|slow_cps_multiplier|spacing|strikethrough|subpixel|text_align|text_style|text_xpos|text_y_fudge|text_ypos|thumb|thumb_offset|thumb_shadow|thumbnail_height|thumbnail_width|time|top_bar|top_gutter|top_margin|top_padding|translations|underline|unscrollable|update|value|version|version_name|version_tuple|vertical|width|window_hide_transition|window_icon|window_left_padding|window_show_transition|window_title|windows_icon|xadjustment|xalign|xanchor|xanchoraround|xaround|xcenter|xfill|xinitial|xmargin|xmaximum|xminimum|xoffset|xofsset|xpadding|xpos|xsize|xzoom|yadjustment|yalign|yanchor|yanchoraround|yaround|ycenter|yfill|yinitial|ymargin|ymaximum|yminimum|yoffset|ypadding|ypos|ysize|ysizexysize|yzoom|zoom|zorder)\b/, - 'tag': /\b(?:label|image|menu|[hv]box|frame|text|imagemap|imagebutton|bar|vbar|screen|textbutton|buttoscreenn|fixed|grid|input|key|mousearea|side|timer|viewport|window|hotspot|hotbar|self|button|drag|draggroup|tag|mm_menu_frame|nvl|block|parallel)\b|\$/, + 'tag': /\b(?:bar|block|button|buttoscreenn|drag|draggroup|fixed|frame|grid|[hv]box|hotbar|hotspot|image|imagebutton|imagemap|input|key|label|menu|mm_menu_frame|mousearea|nvl|parallel|screen|self|side|tag|text|textbutton|timer|vbar|viewport|window)\b|\$/, - 'keyword': /\b(?:as|assert|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|pass|print|raise|return|try|while|yield|adjustment|alignaround|allow|angle|around|box_layout|cache|changed|child_size|clicked|clipping|corner1|corner2|default|delay|exclude|scope|slow|slow_abortable|slow_done|sound|style_group|substitute|suffix|transform_anchor|transpose|unhovered|config|theme|mm_root|gm_root|rounded_window|build|disabled_text|disabled|widget_selected|widget_text|widget_hover|widget|updater|behind|call|expression|hide|init|jump|onlayer|python|renpy|scene|set|show|transform|play|queue|stop|pause|define|window|repeat|contains|choice|on|function|event|animation|clockwise|counterclockwise|circles|knot|null|None|random|has|add|use|fade|dissolve|style|store|id|voice|center|left|right|less_rounded|music|movie|clear|persistent|ui)\b/, + 'keyword': /\b(?:None|add|adjustment|alignaround|allow|angle|animation|around|as|assert|behind|box_layout|break|build|cache|call|center|changed|child_size|choice|circles|class|clear|clicked|clipping|clockwise|config|contains|continue|corner1|corner2|counterclockwise|def|default|define|del|delay|disabled|disabled_text|dissolve|elif|else|event|except|exclude|exec|expression|fade|finally|for|from|function|global|gm_root|has|hide|id|if|import|in|init|is|jump|knot|lambda|left|less_rounded|mm_root|movie|music|null|on|onlayer|pass|pause|persistent|play|print|python|queue|raise|random|renpy|repeat|return|right|rounded_window|scene|scope|set|show|slow|slow_abortable|slow_done|sound|stop|store|style|style_group|substitute|suffix|theme|transform|transform_anchor|transpose|try|ui|unhovered|updater|use|voice|while|widget|widget_hover|widget_selected|widget_text|window|yield)\b/, - 'boolean': /\b(?:[Tt]rue|[Ff]alse)\b/, + 'boolean': /\b(?:[Ff]alse|[Tt]rue)\b/, 'number': /(?:\b(?:0[bo])?(?:(?:\d|0x[\da-f])[\da-f]*(?:\.\d*)?)|\B\.\d+)(?:e[+-]?\d+)?j?/i, - 'operator': /[-+%=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]|\b(?:or|and|not|with|at)\b/, + 'operator': /[-+%=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]|\b(?:and|at|not|or|with)\b/, 'punctuation': /[{}[\];(),.:]/ }; diff --git a/components/prism-renpy.min.js b/components/prism-renpy.min.js index d5fa810aba..160c29dcc9 100644 --- a/components/prism-renpy.min.js +++ b/components/prism-renpy.min.js @@ -1 +1 @@ -Prism.languages.renpy={comment:{pattern:/(^|[^\\])#.+/,lookbehind:!0},string:{pattern:/("""|''')[\s\S]+?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2|(?:^#?(?:[0-9a-fA-F]{6}|(?:[0-9a-fA-F]){3})$)/m,greedy:!0},function:/\b[a-z_]\w*(?=\()/i,property:/\b(?:insensitive|idle|hover|selected_idle|selected_hover|background|position|alt|xpos|ypos|pos|xanchor|yanchor|anchor|xalign|yalign|align|xcenter|ycenter|xofsset|yoffset|ymaximum|maximum|xmaximum|xminimum|yminimum|minimum|xsize|ysizexysize|xfill|yfill|area|antialias|black_color|bold|caret|color|first_indent|font|size|italic|justify|kerning|language|layout|line_leading|line_overlap_split|line_spacing|min_width|newline_indent|outlines|rest_indent|ruby_style|slow_cps|slow_cps_multiplier|strikethrough|text_align|underline|hyperlink_functions|vertical|hinting|foreground|left_margin|xmargin|top_margin|bottom_margin|ymargin|left_padding|right_padding|xpadding|top_padding|bottom_padding|ypadding|size_group|child|hover_sound|activate_sound|mouse|focus_mask|keyboard_focus|bar_vertical|bar_invert|bar_resizing|left_gutter|right_gutter|top_gutter|bottom_gutter|left_bar|right_bar|top_bar|bottom_bar|thumb|thumb_shadow|thumb_offset|unscrollable|spacing|first_spacing|box_reverse|box_wrap|order_reverse|fit_first|ysize|thumbnail_width|thumbnail_height|help|text_ypos|text_xpos|idle_color|hover_color|selected_idle_color|selected_hover_color|insensitive_color|alpha|insensitive_background|hover_background|zorder|value|width|xadjustment|xanchoraround|xaround|xinitial|xoffset|xzoom|yadjustment|yanchoraround|yaround|yinitial|yzoom|zoom|ground|height|text_style|text_y_fudge|selected_insensitive|has_sound|has_music|has_voice|focus|hovered|image_style|length|minwidth|mousewheel|offset|prefix|radius|range|right_margin|rotate|rotate_pad|developer|screen_width|screen_height|window_title|name|version|windows_icon|default_fullscreen|default_text_cps|default_afm_time|main_menu_music|sample_sound|enter_sound|exit_sound|save_directory|enter_transition|exit_transition|intra_transition|main_game_transition|game_main_transition|end_splash_transition|end_game_transition|after_load_transition|window_show_transition|window_hide_transition|adv_nvl_transition|nvl_adv_transition|enter_yesno_transition|exit_yesno_transition|enter_replay_transition|exit_replay_transition|say_attribute_transition|directory_name|executable_name|include_update|window_icon|modal|google_play_key|google_play_salt|drag_name|drag_handle|draggable|dragged|droppable|dropped|narrator_menu|action|default_afm_enable|version_name|version_tuple|inside|fadeout|fadein|layers|layer_clipping|linear|scrollbars|side_xpos|side_ypos|side_spacing|edgescroll|drag_joined|drag_raise|drop_shadow|drop_shadow_color|subpixel|easein|easeout|time|crop|auto|update|get_installed_packages|can_update|UpdateVersion|Update|overlay_functions|translations|window_left_padding|show_side_image|show_two_window)\b/,tag:/\b(?:label|image|menu|[hv]box|frame|text|imagemap|imagebutton|bar|vbar|screen|textbutton|buttoscreenn|fixed|grid|input|key|mousearea|side|timer|viewport|window|hotspot|hotbar|self|button|drag|draggroup|tag|mm_menu_frame|nvl|block|parallel)\b|\$/,keyword:/\b(?:as|assert|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|pass|print|raise|return|try|while|yield|adjustment|alignaround|allow|angle|around|box_layout|cache|changed|child_size|clicked|clipping|corner1|corner2|default|delay|exclude|scope|slow|slow_abortable|slow_done|sound|style_group|substitute|suffix|transform_anchor|transpose|unhovered|config|theme|mm_root|gm_root|rounded_window|build|disabled_text|disabled|widget_selected|widget_text|widget_hover|widget|updater|behind|call|expression|hide|init|jump|onlayer|python|renpy|scene|set|show|transform|play|queue|stop|pause|define|window|repeat|contains|choice|on|function|event|animation|clockwise|counterclockwise|circles|knot|null|None|random|has|add|use|fade|dissolve|style|store|id|voice|center|left|right|less_rounded|music|movie|clear|persistent|ui)\b/,boolean:/\b(?:[Tt]rue|[Ff]alse)\b/,number:/(?:\b(?:0[bo])?(?:(?:\d|0x[\da-f])[\da-f]*(?:\.\d*)?)|\B\.\d+)(?:e[+-]?\d+)?j?/i,operator:/[-+%=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]|\b(?:or|and|not|with|at)\b/,punctuation:/[{}[\];(),.:]/},Prism.languages.rpy=Prism.languages.renpy; \ No newline at end of file +Prism.languages.renpy={comment:{pattern:/(^|[^\\])#.+/,lookbehind:!0},string:{pattern:/("""|''')[\s\S]+?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2|(?:^#?(?:(?:[0-9a-fA-F]){3}|[0-9a-fA-F]{6})$)/m,greedy:!0},function:/\b[a-z_]\w*(?=\()/i,property:/\b(?:Update|UpdateVersion|action|activate_sound|adv_nvl_transition|after_load_transition|align|alpha|alt|anchor|antialias|area|auto|background|bar_invert|bar_resizing|bar_vertical|black_color|bold|bottom_bar|bottom_gutter|bottom_margin|bottom_padding|box_reverse|box_wrap|can_update|caret|child|color|crop|default_afm_enable|default_afm_time|default_fullscreen|default_text_cps|developer|directory_name|drag_handle|drag_joined|drag_name|drag_raise|draggable|dragged|drop_shadow|drop_shadow_color|droppable|dropped|easein|easeout|edgescroll|end_game_transition|end_splash_transition|enter_replay_transition|enter_sound|enter_transition|enter_yesno_transition|executable_name|exit_replay_transition|exit_sound|exit_transition|exit_yesno_transition|fadein|fadeout|first_indent|first_spacing|fit_first|focus|focus_mask|font|foreground|game_main_transition|get_installed_packages|google_play_key|google_play_salt|ground|has_music|has_sound|has_voice|height|help|hinting|hover|hover_background|hover_color|hover_sound|hovered|hyperlink_functions|idle|idle_color|image_style|include_update|insensitive|insensitive_background|insensitive_color|inside|intra_transition|italic|justify|kerning|keyboard_focus|language|layer_clipping|layers|layout|left_bar|left_gutter|left_margin|left_padding|length|line_leading|line_overlap_split|line_spacing|linear|main_game_transition|main_menu_music|maximum|min_width|minimum|minwidth|modal|mouse|mousewheel|name|narrator_menu|newline_indent|nvl_adv_transition|offset|order_reverse|outlines|overlay_functions|pos|position|prefix|radius|range|rest_indent|right_bar|right_gutter|right_margin|right_padding|rotate|rotate_pad|ruby_style|sample_sound|save_directory|say_attribute_transition|screen_height|screen_width|scrollbars|selected_hover|selected_hover_color|selected_idle|selected_idle_color|selected_insensitive|show_side_image|show_two_window|side_spacing|side_xpos|side_ypos|size|size_group|slow_cps|slow_cps_multiplier|spacing|strikethrough|subpixel|text_align|text_style|text_xpos|text_y_fudge|text_ypos|thumb|thumb_offset|thumb_shadow|thumbnail_height|thumbnail_width|time|top_bar|top_gutter|top_margin|top_padding|translations|underline|unscrollable|update|value|version|version_name|version_tuple|vertical|width|window_hide_transition|window_icon|window_left_padding|window_show_transition|window_title|windows_icon|xadjustment|xalign|xanchor|xanchoraround|xaround|xcenter|xfill|xinitial|xmargin|xmaximum|xminimum|xoffset|xofsset|xpadding|xpos|xsize|xzoom|yadjustment|yalign|yanchor|yanchoraround|yaround|ycenter|yfill|yinitial|ymargin|ymaximum|yminimum|yoffset|ypadding|ypos|ysize|ysizexysize|yzoom|zoom|zorder)\b/,tag:/\b(?:bar|block|button|buttoscreenn|drag|draggroup|fixed|frame|grid|[hv]box|hotbar|hotspot|image|imagebutton|imagemap|input|key|label|menu|mm_menu_frame|mousearea|nvl|parallel|screen|self|side|tag|text|textbutton|timer|vbar|viewport|window)\b|\$/,keyword:/\b(?:None|add|adjustment|alignaround|allow|angle|animation|around|as|assert|behind|box_layout|break|build|cache|call|center|changed|child_size|choice|circles|class|clear|clicked|clipping|clockwise|config|contains|continue|corner1|corner2|counterclockwise|def|default|define|del|delay|disabled|disabled_text|dissolve|elif|else|event|except|exclude|exec|expression|fade|finally|for|from|function|global|gm_root|has|hide|id|if|import|in|init|is|jump|knot|lambda|left|less_rounded|mm_root|movie|music|null|on|onlayer|pass|pause|persistent|play|print|python|queue|raise|random|renpy|repeat|return|right|rounded_window|scene|scope|set|show|slow|slow_abortable|slow_done|sound|stop|store|style|style_group|substitute|suffix|theme|transform|transform_anchor|transpose|try|ui|unhovered|updater|use|voice|while|widget|widget_hover|widget_selected|widget_text|window|yield)\b/,boolean:/\b(?:[Ff]alse|[Tt]rue)\b/,number:/(?:\b(?:0[bo])?(?:(?:\d|0x[\da-f])[\da-f]*(?:\.\d*)?)|\B\.\d+)(?:e[+-]?\d+)?j?/i,operator:/[-+%=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]|\b(?:and|at|not|or|with)\b/,punctuation:/[{}[\];(),.:]/},Prism.languages.rpy=Prism.languages.renpy; \ No newline at end of file diff --git a/components/prism-rip.js b/components/prism-rip.js index b28b75dc26..a79b8777a0 100644 --- a/components/prism-rip.js +++ b/components/prism-rip.js @@ -1,11 +1,11 @@ Prism.languages.rip = { 'comment': /#.*/, - 'keyword': /(?:=>|->)|\b(?:class|if|else|switch|case|return|exit|try|catch|finally|raise)\b/, + 'keyword': /(?:=>|->)|\b(?:case|catch|class|else|exit|finally|if|raise|return|switch|try)\b/, 'builtin': /@|\bSystem\b/, - 'boolean': /\b(?:true|false)\b/, + 'boolean': /\b(?:false|true)\b/, 'date': /\b\d{4}-\d{2}-\d{2}\b/, 'time': /\b\d{2}:\d{2}:\d{2}\b/, diff --git a/components/prism-rip.min.js b/components/prism-rip.min.js index f88fd7f42a..6e79112888 100644 --- a/components/prism-rip.min.js +++ b/components/prism-rip.min.js @@ -1 +1 @@ -Prism.languages.rip={comment:/#.*/,keyword:/(?:=>|->)|\b(?:class|if|else|switch|case|return|exit|try|catch|finally|raise)\b/,builtin:/@|\bSystem\b/,boolean:/\b(?:true|false)\b/,date:/\b\d{4}-\d{2}-\d{2}\b/,time:/\b\d{2}:\d{2}:\d{2}\b/,datetime:/\b\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\b/,character:/\B`[^\s`'",.:;#\/\\()<>\[\]{}]\b/,regex:{pattern:/(^|[^/])\/(?!\/)(?:\[[^\n\r\]]*\]|\\.|[^/\\\r\n\[])+\/(?=\s*(?:$|[\r\n,.;})]))/,lookbehind:!0,greedy:!0},symbol:/:[^\d\s`'",.:;#\/\\()<>\[\]{}][^\s`'",.:;#\/\\()<>\[\]{}]*/,string:{pattern:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0},number:/[+-]?\b(?:\d+\.\d+|\d+)\b/,punctuation:/(?:\.{2,3})|[`,.:;=\/\\()<>\[\]{}]/,reference:/[^\d\s`'",.:;#\/\\()<>\[\]{}][^\s`'",.:;#\/\\()<>\[\]{}]*/}; \ No newline at end of file +Prism.languages.rip={comment:/#.*/,keyword:/(?:=>|->)|\b(?:case|catch|class|else|exit|finally|if|raise|return|switch|try)\b/,builtin:/@|\bSystem\b/,boolean:/\b(?:false|true)\b/,date:/\b\d{4}-\d{2}-\d{2}\b/,time:/\b\d{2}:\d{2}:\d{2}\b/,datetime:/\b\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\b/,character:/\B`[^\s`'",.:;#\/\\()<>\[\]{}]\b/,regex:{pattern:/(^|[^/])\/(?!\/)(?:\[[^\n\r\]]*\]|\\.|[^/\\\r\n\[])+\/(?=\s*(?:$|[\r\n,.;})]))/,lookbehind:!0,greedy:!0},symbol:/:[^\d\s`'",.:;#\/\\()<>\[\]{}][^\s`'",.:;#\/\\()<>\[\]{}]*/,string:{pattern:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0},number:/[+-]?\b(?:\d+\.\d+|\d+)\b/,punctuation:/(?:\.{2,3})|[`,.:;=\/\\()<>\[\]{}]/,reference:/[^\d\s`'",.:;#\/\\()<>\[\]{}][^\s`'",.:;#\/\\()<>\[\]{}]*/}; \ No newline at end of file diff --git a/components/prism-roboconf.js b/components/prism-roboconf.js index d19c95238a..fc08c6db58 100644 --- a/components/prism-roboconf.js +++ b/components/prism-roboconf.js @@ -1,7 +1,7 @@ Prism.languages.roboconf = { 'comment': /#.*/, 'keyword': { - 'pattern': /(^|\s)(?:(?:facet|instance of)(?=[ \t]+[\w-]+[ \t]*\{)|(?:external|import)\b)/, + 'pattern': /(^|\s)(?:(?:external|import)\b|(?:facet|instance of)(?=[ \t]+[\w-]+[ \t]*\{))/, lookbehind: true }, 'component': { diff --git a/components/prism-roboconf.min.js b/components/prism-roboconf.min.js index 2b4de00019..f9969d2dcb 100644 --- a/components/prism-roboconf.min.js +++ b/components/prism-roboconf.min.js @@ -1 +1 @@ -Prism.languages.roboconf={comment:/#.*/,keyword:{pattern:/(^|\s)(?:(?:facet|instance of)(?=[ \t]+[\w-]+[ \t]*\{)|(?:external|import)\b)/,lookbehind:!0},component:{pattern:/[\w-]+(?=[ \t]*\{)/,alias:"variable"},property:/[\w.-]+(?=[ \t]*:)/,value:{pattern:/(=[ \t]*(?![ \t]))[^,;]+/,lookbehind:!0,alias:"attr-value"},optional:{pattern:/\(optional\)/,alias:"builtin"},wildcard:{pattern:/(\.)\*/,lookbehind:!0,alias:"operator"},punctuation:/[{},.;:=]/}; \ No newline at end of file +Prism.languages.roboconf={comment:/#.*/,keyword:{pattern:/(^|\s)(?:(?:external|import)\b|(?:facet|instance of)(?=[ \t]+[\w-]+[ \t]*\{))/,lookbehind:!0},component:{pattern:/[\w-]+(?=[ \t]*\{)/,alias:"variable"},property:/[\w.-]+(?=[ \t]*:)/,value:{pattern:/(=[ \t]*(?![ \t]))[^,;]+/,lookbehind:!0,alias:"attr-value"},optional:{pattern:/\(optional\)/,alias:"builtin"},wildcard:{pattern:/(\.)\*/,lookbehind:!0,alias:"operator"},punctuation:/[{},.;:=]/}; \ No newline at end of file diff --git a/components/prism-ruby.js b/components/prism-ruby.js index 6c7342b68e..3fab30373d 100644 --- a/components/prism-ruby.js +++ b/components/prism-ruby.js @@ -20,7 +20,7 @@ 'punctuation': /[.\\]/ } }, - 'keyword': /\b(?:alias|and|BEGIN|begin|break|case|class|def|define_method|defined|do|each|else|elsif|END|end|ensure|extend|for|if|in|include|module|new|next|nil|not|or|prepend|protected|private|public|raise|redo|require|rescue|retry|return|self|super|then|throw|undef|unless|until|when|while|yield)\b/ + 'keyword': /\b(?:BEGIN|END|alias|and|begin|break|case|class|def|define_method|defined|do|each|else|elsif|end|ensure|extend|for|if|in|include|module|new|next|nil|not|or|prepend|private|protected|public|raise|redo|require|rescue|retry|return|self|super|then|throw|undef|unless|until|when|while|yield)\b/ }); var interpolation = { @@ -77,7 +77,7 @@ }); Prism.languages.insertBefore('ruby', 'number', { - 'builtin': /\b(?:Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Stat|Fixnum|Float|Hash|Integer|IO|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|String|Struct|TMS|Symbol|ThreadGroup|Thread|Time|TrueClass)\b/, + 'builtin': /\b(?:Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Fixnum|Float|Hash|IO|Integer|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|Stat|String|Struct|Symbol|TMS|Thread|ThreadGroup|Time|TrueClass)\b/, 'constant': /\b[A-Z]\w*(?:[?!]|\b)/ }); diff --git a/components/prism-ruby.min.js b/components/prism-ruby.min.js index 4a0ecd4459..31bb49d909 100644 --- a/components/prism-ruby.min.js +++ b/components/prism-ruby.min.js @@ -1 +1 @@ -!function(e){e.languages.ruby=e.languages.extend("clike",{comment:[/#.*/,{pattern:/^=begin\s[\s\S]*?^=end/m,greedy:!0}],"class-name":{pattern:/(\b(?:class)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:alias|and|BEGIN|begin|break|case|class|def|define_method|defined|do|each|else|elsif|END|end|ensure|extend|for|if|in|include|module|new|next|nil|not|or|prepend|protected|private|public|raise|redo|require|rescue|retry|return|self|super|then|throw|undef|unless|until|when|while|yield)\b/});var n={pattern:/#\{[^}]+\}/,inside:{delimiter:{pattern:/^#\{|\}$/,alias:"tag"},rest:e.languages.ruby}};delete e.languages.ruby.function,e.languages.insertBefore("ruby","keyword",{regex:[{pattern:RegExp("%r(?:"+["([^a-zA-Z0-9\\s{(\\[<])(?:(?!\\1)[^\\\\]|\\\\[^])*\\1","\\((?:[^()\\\\]|\\\\[^])*\\)","\\{(?:[^#{}\\\\]|#(?:\\{[^}]+\\})?|\\\\[^])*\\}","\\[(?:[^\\[\\]\\\\]|\\\\[^])*\\]","<(?:[^<>\\\\]|\\\\[^])*>"].join("|")+")[egimnosux]{0,6}"),greedy:!0,inside:{interpolation:n}},{pattern:/(^|[^/])\/(?!\/)(?:\[[^\r\n\]]+\]|\\.|[^[/\\\r\n])+\/[egimnosux]{0,6}(?=\s*(?:$|[\r\n,.;})#]))/,lookbehind:!0,greedy:!0,inside:{interpolation:n}}],variable:/[@$]+[a-zA-Z_]\w*(?:[?!]|\b)/,symbol:{pattern:/(^|[^:]):[a-zA-Z_]\w*(?:[?!]|\b)/,lookbehind:!0},"method-definition":{pattern:/(\bdef\s+)[\w.]+/,lookbehind:!0,inside:{function:/\w+$/,rest:e.languages.ruby}}}),e.languages.insertBefore("ruby","number",{builtin:/\b(?:Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Stat|Fixnum|Float|Hash|Integer|IO|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|String|Struct|TMS|Symbol|ThreadGroup|Thread|Time|TrueClass)\b/,constant:/\b[A-Z]\w*(?:[?!]|\b)/}),e.languages.ruby.string=[{pattern:RegExp("%[qQiIwWxs]?(?:"+["([^a-zA-Z0-9\\s{(\\[<])(?:(?!\\1)[^\\\\]|\\\\[^])*\\1","\\((?:[^()\\\\]|\\\\[^])*\\)","\\{(?:[^#{}\\\\]|#(?:\\{[^}]+\\})?|\\\\[^])*\\}","\\[(?:[^\\[\\]\\\\]|\\\\[^])*\\]","<(?:[^<>\\\\]|\\\\[^])*>"].join("|")+")"),greedy:!0,inside:{interpolation:n}},{pattern:/("|')(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|(?!\1)[^\\#\r\n])*\1/,greedy:!0,inside:{interpolation:n}},{pattern:/<<[-~]?([a-z_]\w*)[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?[a-z_]\w*|[a-z_]\w*$/i,alias:"symbol",inside:{punctuation:/^<<[-~]?/}},interpolation:n}},{pattern:/<<[-~]?'([a-z_]\w*)'[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?'[a-z_]\w*'|[a-z_]\w*$/i,alias:"symbol",inside:{punctuation:/^<<[-~]?'|'$/}}}}],e.languages.rb=e.languages.ruby}(Prism); \ No newline at end of file +!function(e){e.languages.ruby=e.languages.extend("clike",{comment:[/#.*/,{pattern:/^=begin\s[\s\S]*?^=end/m,greedy:!0}],"class-name":{pattern:/(\b(?:class)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:BEGIN|END|alias|and|begin|break|case|class|def|define_method|defined|do|each|else|elsif|end|ensure|extend|for|if|in|include|module|new|next|nil|not|or|prepend|private|protected|public|raise|redo|require|rescue|retry|return|self|super|then|throw|undef|unless|until|when|while|yield)\b/});var n={pattern:/#\{[^}]+\}/,inside:{delimiter:{pattern:/^#\{|\}$/,alias:"tag"},rest:e.languages.ruby}};delete e.languages.ruby.function,e.languages.insertBefore("ruby","keyword",{regex:[{pattern:RegExp("%r(?:"+["([^a-zA-Z0-9\\s{(\\[<])(?:(?!\\1)[^\\\\]|\\\\[^])*\\1","\\((?:[^()\\\\]|\\\\[^])*\\)","\\{(?:[^#{}\\\\]|#(?:\\{[^}]+\\})?|\\\\[^])*\\}","\\[(?:[^\\[\\]\\\\]|\\\\[^])*\\]","<(?:[^<>\\\\]|\\\\[^])*>"].join("|")+")[egimnosux]{0,6}"),greedy:!0,inside:{interpolation:n}},{pattern:/(^|[^/])\/(?!\/)(?:\[[^\r\n\]]+\]|\\.|[^[/\\\r\n])+\/[egimnosux]{0,6}(?=\s*(?:$|[\r\n,.;})#]))/,lookbehind:!0,greedy:!0,inside:{interpolation:n}}],variable:/[@$]+[a-zA-Z_]\w*(?:[?!]|\b)/,symbol:{pattern:/(^|[^:]):[a-zA-Z_]\w*(?:[?!]|\b)/,lookbehind:!0},"method-definition":{pattern:/(\bdef\s+)[\w.]+/,lookbehind:!0,inside:{function:/\w+$/,rest:e.languages.ruby}}}),e.languages.insertBefore("ruby","number",{builtin:/\b(?:Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Fixnum|Float|Hash|IO|Integer|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|Stat|String|Struct|Symbol|TMS|Thread|ThreadGroup|Time|TrueClass)\b/,constant:/\b[A-Z]\w*(?:[?!]|\b)/}),e.languages.ruby.string=[{pattern:RegExp("%[qQiIwWxs]?(?:"+["([^a-zA-Z0-9\\s{(\\[<])(?:(?!\\1)[^\\\\]|\\\\[^])*\\1","\\((?:[^()\\\\]|\\\\[^])*\\)","\\{(?:[^#{}\\\\]|#(?:\\{[^}]+\\})?|\\\\[^])*\\}","\\[(?:[^\\[\\]\\\\]|\\\\[^])*\\]","<(?:[^<>\\\\]|\\\\[^])*>"].join("|")+")"),greedy:!0,inside:{interpolation:n}},{pattern:/("|')(?:#\{[^}]+\}|#(?!\{)|\\(?:\r\n|[\s\S])|(?!\1)[^\\#\r\n])*\1/,greedy:!0,inside:{interpolation:n}},{pattern:/<<[-~]?([a-z_]\w*)[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?[a-z_]\w*|[a-z_]\w*$/i,alias:"symbol",inside:{punctuation:/^<<[-~]?/}},interpolation:n}},{pattern:/<<[-~]?'([a-z_]\w*)'[\r\n](?:.*[\r\n])*?[\t ]*\1/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<[-~]?'[a-z_]\w*'|[a-z_]\w*$/i,alias:"symbol",inside:{punctuation:/^<<[-~]?'|'$/}}}}],e.languages.rb=e.languages.ruby}(Prism); \ No newline at end of file diff --git a/components/prism-rust.js b/components/prism-rust.js index 289bb4e044..0f2f4b2b03 100644 --- a/components/prism-rust.js +++ b/components/prism-rust.js @@ -92,10 +92,10 @@ ], 'keyword': [ // https://github.com/rust-lang/reference/blob/master/src/keywords.md - /\b(?:abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|Self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/, + /\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/, // primitives and str // https://doc.rust-lang.org/stable/rust-by-example/primitives.html - /\b(?:[ui](?:8|16|32|64|128|size)|f(?:32|64)|bool|char|str)\b/ + /\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/ ], // functions can technically start with an upper-case letter, but this will introduce a lot of false positives @@ -117,7 +117,7 @@ }, // Hex, oct, bin, dec numbers with visual separators and type suffix - 'number': /\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:[iu](?:8|16|32|64|size)?|f32|f64))?\b/, + 'number': /\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/, 'boolean': /\b(?:false|true)\b/, 'punctuation': /->|\.\.=|\.{1,3}|::|[{}[\];(),:]/, 'operator': /[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<>?=?|[@?]/ diff --git a/components/prism-rust.min.js b/components/prism-rust.min.js index e830374e0d..941742473d 100644 --- a/components/prism-rust.min.js +++ b/components/prism-rust.min.js @@ -1 +1 @@ -!function(e){for(var a="/\\*(?:[^*/]|\\*(?!/)|/(?!\\*)|)*\\*/",t=0;t<2;t++)a=a.replace(//g,function(){return a});a=a.replace(//g,function(){return"[^\\s\\S]"}),e.languages.rust={comment:[{pattern:RegExp("(^|[^\\\\])"+a),lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,greedy:!0},char:{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,greedy:!0,alias:"string"},attribute:{pattern:/#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,greedy:!0,alias:"attr-name",inside:{string:null}},"closure-params":{pattern:/([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,lookbehind:!0,greedy:!0,inside:{"closure-punctuation":{pattern:/^\||\|$/,alias:"punctuation"},rest:null}},"lifetime-annotation":{pattern:/'\w+/,alias:"symbol"},"fragment-specifier":{pattern:/(\$\w+:)[a-z]+/,lookbehind:!0,alias:"punctuation"},variable:/\$\w+/,"function-definition":{pattern:/(\bfn\s+)\w+/,lookbehind:!0,alias:"function"},"type-definition":{pattern:/(\b(?:enum|struct|union)\s+)\w+/,lookbehind:!0,alias:"class-name"},"module-declaration":[{pattern:/(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,lookbehind:!0,alias:"namespace"},{pattern:/(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,lookbehind:!0,alias:"namespace",inside:{punctuation:/::/}}],keyword:[/\b(?:abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|Self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,/\b(?:[ui](?:8|16|32|64|128|size)|f(?:32|64)|bool|char|str)\b/],function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,macro:{pattern:/\b\w+!/,alias:"property"},constant:/\b[A-Z_][A-Z_\d]+\b/,"class-name":/\b[A-Z]\w*\b/,namespace:{pattern:/(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,inside:{punctuation:/::/}},number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:[iu](?:8|16|32|64|size)?|f32|f64))?\b/,boolean:/\b(?:false|true)\b/,punctuation:/->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,operator:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<>?=?|[@?]/},e.languages.rust["closure-params"].inside.rest=e.languages.rust,e.languages.rust.attribute.inside.string=e.languages.rust.string}(Prism); \ No newline at end of file +!function(e){for(var a="/\\*(?:[^*/]|\\*(?!/)|/(?!\\*)|)*\\*/",t=0;t<2;t++)a=a.replace(//g,function(){return a});a=a.replace(//g,function(){return"[^\\s\\S]"}),e.languages.rust={comment:[{pattern:RegExp("(^|[^\\\\])"+a),lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,greedy:!0},char:{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,greedy:!0,alias:"string"},attribute:{pattern:/#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,greedy:!0,alias:"attr-name",inside:{string:null}},"closure-params":{pattern:/([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,lookbehind:!0,greedy:!0,inside:{"closure-punctuation":{pattern:/^\||\|$/,alias:"punctuation"},rest:null}},"lifetime-annotation":{pattern:/'\w+/,alias:"symbol"},"fragment-specifier":{pattern:/(\$\w+:)[a-z]+/,lookbehind:!0,alias:"punctuation"},variable:/\$\w+/,"function-definition":{pattern:/(\bfn\s+)\w+/,lookbehind:!0,alias:"function"},"type-definition":{pattern:/(\b(?:enum|struct|union)\s+)\w+/,lookbehind:!0,alias:"class-name"},"module-declaration":[{pattern:/(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,lookbehind:!0,alias:"namespace"},{pattern:/(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,lookbehind:!0,alias:"namespace",inside:{punctuation:/::/}}],keyword:[/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,/\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/],function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,macro:{pattern:/\b\w+!/,alias:"property"},constant:/\b[A-Z_][A-Z_\d]+\b/,"class-name":/\b[A-Z]\w*\b/,namespace:{pattern:/(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,inside:{punctuation:/::/}},number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,boolean:/\b(?:false|true)\b/,punctuation:/->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,operator:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<>?=?|[@?]/},e.languages.rust["closure-params"].inside.rest=e.languages.rust,e.languages.rust.attribute.inside.string=e.languages.rust.string}(Prism); \ No newline at end of file diff --git a/components/prism-sas.js b/components/prism-sas.js index f4aeee8e4e..c0ae8f5abc 100644 --- a/components/prism-sas.js +++ b/components/prism-sas.js @@ -13,13 +13,13 @@ }; var macroKeyword = { - pattern: /((?:^|\s|=|\())%(?:ABORT|BY|CMS|COPY|DISPLAY|DO|ELSE|END|EVAL|GLOBAL|GO|GOTO|IF|INC|INCLUDE|INDEX|INPUT|KTRIM|LENGTH|LET|LIST|LOCAL|PUT|QKTRIM|QSCAN|QSUBSTR|QSYSFUNC|QUPCASE|RETURN|RUN|SCAN|SUBSTR|SUPERQ|SYMDEL|SYMGLOBL|SYMLOCAL|SYMEXIST|SYSCALL|SYSEVALF|SYSEXEC|SYSFUNC|SYSGET|SYSRPUT|THEN|TO|TSO|UNQUOTE|UNTIL|UPCASE|WHILE|WINDOW)\b/i, + pattern: /((?:^|\s|=|\())%(?:ABORT|BY|CMS|COPY|DISPLAY|DO|ELSE|END|EVAL|GLOBAL|GO|GOTO|IF|INC|INCLUDE|INDEX|INPUT|KTRIM|LENGTH|LET|LIST|LOCAL|PUT|QKTRIM|QSCAN|QSUBSTR|QSYSFUNC|QUPCASE|RETURN|RUN|SCAN|SUBSTR|SUPERQ|SYMDEL|SYMEXIST|SYMGLOBL|SYMLOCAL|SYSCALL|SYSEVALF|SYSEXEC|SYSFUNC|SYSGET|SYSRPUT|THEN|TO|TSO|UNQUOTE|UNTIL|UPCASE|WHILE|WINDOW)\b/i, lookbehind: true, alias: 'keyword' }; var step = { - pattern: /(^|\s)(?:proc\s+\w+|quit|run|data(?!=))\b/i, + pattern: /(^|\s)(?:proc\s+\w+|data(?!=)|quit|run)\b/i, alias: 'keyword', lookbehind: true }; @@ -92,12 +92,12 @@ }; var submitStatement = { - pattern: /(^|\s)(?:submit(?:\s+(?:load|parseonly|norun))?|endsubmit)\b/i, + pattern: /(^|\s)(?:submit(?:\s+(?:load|norun|parseonly))?|endsubmit)\b/i, lookbehind: true, alias: 'keyword' }; - var actionSets = /accessControl|cdm|aggregation|aStore|ruleMining|audio|autotune|bayesianNetClassifier|bioMedImage|boolRule|builtins|cardinality|sccasl|clustering|copula|countreg|dataDiscovery|dataPreprocess|dataSciencePilot|dataStep|decisionTree|deepLearn|deepNeural|varReduce|simSystem|ds2|deduplication|ecm|entityRes|espCluster|explainModel|factmac|fastKnn|fcmpact|fedSql|freqTab|gam|gleam|graphSemiSupLearn|gVarCluster|hiddenMarkovModel|hyperGroup|image|iml|ica|kernalPca|langModel|ldaTopic|sparseML|mlTools|mixed|modelPublishing|mbc|network|optNetwork|neuralNet|nonlinear|nmf|nonParametricBayes|optimization|panel|pls|percentile|pca|phreg|qkb|qlim|quantreg|recommend|tsReconcile|deepRnn|regression|reinforcementLearn|robustPca|sampling|sparkEmbeddedProcess|search(?:Analytics)?|sentimentAnalysis|sequence|configuration|session(?:Prop)?|severity|simple|smartData|sandwich|spatialreg|stabilityMonitoring|spc|loadStreams|svDataDescription|svm|table|conditionalRandomFields|text(?:Rule(?:Develop|Score)|Mining|Parse|Topic|Util|Filters|Frequency)|tsInfo|timeData|transpose|uniTimeSeries/.source; + var actionSets = /aStore|accessControl|aggregation|audio|autotune|bayesianNetClassifier|bioMedImage|boolRule|builtins|cardinality|cdm|clustering|conditionalRandomFields|configuration|copula|countreg|dataDiscovery|dataPreprocess|dataSciencePilot|dataStep|decisionTree|deduplication|deepLearn|deepNeural|deepRnn|ds2|ecm|entityRes|espCluster|explainModel|factmac|fastKnn|fcmpact|fedSql|freqTab|gVarCluster|gam|gleam|graphSemiSupLearn|hiddenMarkovModel|hyperGroup|ica|image|iml|kernalPca|langModel|ldaTopic|loadStreams|mbc|mixed|mlTools|modelPublishing|network|neuralNet|nmf|nonParametricBayes|nonlinear|optNetwork|optimization|panel|pca|percentile|phreg|pls|qkb|qlim|quantreg|recommend|regression|reinforcementLearn|robustPca|ruleMining|sampling|sandwich|sccasl|search(?:Analytics)?|sentimentAnalysis|sequence|session(?:Prop)?|severity|simSystem|simple|smartData|sparkEmbeddedProcess|sparseML|spatialreg|spc|stabilityMonitoring|svDataDescription|svm|table|text(?:Filters|Frequency|Mining|Parse|Rule(?:Develop|Score)|Topic|Util)|timeData|transpose|tsInfo|tsReconcile|uniTimeSeries|varReduce/.source; var casActions = { pattern: RegExp(/(^|\s)(?:action\s+)?(?:)\.[a-z]+\b[^;]+/.source.replace(//g, function () { return actionSets; }), 'i'), @@ -121,25 +121,25 @@ }; var keywords = { - pattern: /((?:^|\s)=?)(?:after|analysis|and|array|barchart|barwidth|begingraph|by|call|cas|cbarline|cfill|class(?:lev)?|close|column|computed?|contains|continue|data(?==)|define|delete|describe|document|do\s+over|do|dol|drop|dul|end(?:source|comp)?|entryTitle|else|eval(?:uate)?|exec(?:ute)?|exit|fill(?:attrs)?|file(?:name)?|flist|fnc|function(?:list)?|goto|global|group(?:by)?|headline|headskip|histogram|if|infile|keep|keylabel|keyword|label|layout|leave|legendlabel|length|libname|loadactionset|merge|midpoints|name|noobs|nowd|_?null_|ods|options|or|otherwise|out(?:put)?|over(?:lay)?|plot|put|print|raise|ranexp|rannor|rbreak|retain|return|select|set|session|sessref|source|statgraph|sum|summarize|table|temp|terminate|then\s+do|then|title\d?|to|var|when|where|xaxisopts|yaxisopts|y2axisopts)\b/i, + pattern: /((?:^|\s)=?)(?:after|analysis|and|array|barchart|barwidth|begingraph|by|call|cas|cbarline|cfill|class(?:lev)?|close|column|computed?|contains|continue|data(?==)|define|delete|describe|document|do\s+over|do|dol|drop|dul|else|end(?:comp|source)?|entryTitle|eval(?:uate)?|exec(?:ute)?|exit|file(?:name)?|fill(?:attrs)?|flist|fnc|function(?:list)?|global|goto|group(?:by)?|headline|headskip|histogram|if|infile|keep|keylabel|keyword|label|layout|leave|legendlabel|length|libname|loadactionset|merge|midpoints|_?null_|name|noobs|nowd|ods|options|or|otherwise|out(?:put)?|over(?:lay)?|plot|print|put|raise|ranexp|rannor|rbreak|retain|return|select|session|sessref|set|source|statgraph|sum|summarize|table|temp|terminate|then\s+do|then|title\d?|to|var|when|where|xaxisopts|y2axisopts|yaxisopts)\b/i, lookbehind: true, }; Prism.languages.sas = { 'datalines': { - pattern: /^([ \t]*)(?:(?:data)?lines|cards);[\s\S]+?^[ \t]*;/im, + pattern: /^([ \t]*)(?:cards|(?:data)?lines);[\s\S]+?^[ \t]*;/im, lookbehind: true, alias: 'string', inside: { 'keyword': { - pattern: /^(?:(?:data)?lines|cards)/i + pattern: /^(?:cards|(?:data)?lines)/i }, 'punctuation': /;/ } }, 'proc-sql': { - pattern: /(^proc\s+(?:fed)?sql(?:\s+[\w|=]+)?;)[\s\S]+?(?=^(?:proc\s+\w+|quit|run|data);|(?![\s\S]))/im, + pattern: /(^proc\s+(?:fed)?sql(?:\s+[\w|=]+)?;)[\s\S]+?(?=^(?:proc\s+\w+|data|quit|run);|(?![\s\S]))/im, lookbehind: true, inside: { 'sql': { @@ -149,7 +149,7 @@ }, 'global-statements': globalStatements, 'sql-statements': { - pattern: /(^|\s)(?:disconnect\s+from|exec(?:ute)?|begin|commit|rollback|reset|validate)\b/i, + pattern: /(^|\s)(?:disconnect\s+from|begin|commit|exec(?:ute)?|reset|rollback|validate)\b/i, lookbehind: true, alias: 'keyword' }, @@ -161,12 +161,12 @@ }, 'proc-groovy': { - pattern: /(^proc\s+groovy(?:\s+[\w|=]+)?;)[\s\S]+?(?=^(?:proc\s+\w+|quit|run|data);|(?![\s\S]))/im, + pattern: /(^proc\s+groovy(?:\s+[\w|=]+)?;)[\s\S]+?(?=^(?:proc\s+\w+|data|quit|run);|(?![\s\S]))/im, lookbehind: true, inside: { 'comment': comment, 'groovy': { - pattern: RegExp(/(^[ \t]*submit(?:\s+(?:load|parseonly|norun))?)(?:|[^"'])+?(?=endsubmit;)/.source.replace(//g, function () { return stringPattern; }), 'im'), + pattern: RegExp(/(^[ \t]*submit(?:\s+(?:load|norun|parseonly))?)(?:|[^"'])+?(?=endsubmit;)/.source.replace(//g, function () { return stringPattern; }), 'im'), lookbehind: true, alias: 'language-groovy', inside: Prism.languages.groovy @@ -182,12 +182,12 @@ }, 'proc-lua': { - pattern: /(^proc\s+lua(?:\s+[\w|=]+)?;)[\s\S]+?(?=^(?:proc\s+\w+|quit|run|data);|(?![\s\S]))/im, + pattern: /(^proc\s+lua(?:\s+[\w|=]+)?;)[\s\S]+?(?=^(?:proc\s+\w+|data|quit|run);|(?![\s\S]))/im, lookbehind: true, inside: { 'comment': comment, 'lua': { - pattern: RegExp(/(^[ \t]*submit(?:\s+(?:load|parseonly|norun))?)(?:|[^"'])+?(?=endsubmit;)/.source.replace(//g, function () { return stringPattern; }), 'im'), + pattern: RegExp(/(^[ \t]*submit(?:\s+(?:load|norun|parseonly))?)(?:|[^"'])+?(?=endsubmit;)/.source.replace(//g, function () { return stringPattern; }), 'im'), lookbehind: true, alias: 'language-lua', inside: Prism.languages.lua @@ -249,11 +249,11 @@ 'macro-keyword': macroKeyword, 'macro-variable': macroVariable, 'macro-string-functions': { - pattern: /((?:^|\s|=))%(?:NRBQUOTE|NRQUOTE|NRSTR|BQUOTE|QUOTE|STR)\(.*?(?:[^%]\))/i, + pattern: /((?:^|\s|=))%(?:BQUOTE|NRBQUOTE|NRQUOTE|NRSTR|QUOTE|STR)\(.*?(?:[^%]\))/i, lookbehind: true, inside: { 'function': { - pattern: /%(?:NRBQUOTE|NRQUOTE|NRSTR|BQUOTE|QUOTE|STR)/i, + pattern: /%(?:BQUOTE|NRBQUOTE|NRQUOTE|NRSTR|QUOTE|STR)/i, alias: 'keyword' }, 'macro-keyword': macroKeyword, @@ -314,7 +314,7 @@ 'keyword': keywords, // In SAS Studio syntax highlighting, these operators are styled like keywords 'operator-keyword': { - pattern: /\b(?:eq|ne|gt|lt|ge|le|in|not)\b/i, + pattern: /\b(?:eq|ge|gt|in|le|lt|ne|not)\b/i, alias: 'operator' }, // Decimal (1.2e23), hexadecimal (0c1x) diff --git a/components/prism-sas.min.js b/components/prism-sas.min.js index a5fb12e61e..be23cd902d 100644 --- a/components/prism-sas.min.js +++ b/components/prism-sas.min.js @@ -1 +1 @@ -!function(e){var t="(?:\"(?:\"\"|[^\"])*\"(?!\")|'(?:''|[^'])*'(?!'))",a=/\b(?:\d[\da-f]*x|\d+(?:\.\d+)?(?:e[+-]?\d+)?)\b/i,n={pattern:RegExp(t+"[bx]"),alias:"number"},i={pattern:/&[a-z_]\w*/i},r={pattern:/((?:^|\s|=|\())%(?:ABORT|BY|CMS|COPY|DISPLAY|DO|ELSE|END|EVAL|GLOBAL|GO|GOTO|IF|INC|INCLUDE|INDEX|INPUT|KTRIM|LENGTH|LET|LIST|LOCAL|PUT|QKTRIM|QSCAN|QSUBSTR|QSYSFUNC|QUPCASE|RETURN|RUN|SCAN|SUBSTR|SUPERQ|SYMDEL|SYMGLOBL|SYMLOCAL|SYMEXIST|SYSCALL|SYSEVALF|SYSEXEC|SYSFUNC|SYSGET|SYSRPUT|THEN|TO|TSO|UNQUOTE|UNTIL|UPCASE|WHILE|WINDOW)\b/i,lookbehind:!0,alias:"keyword"},s={pattern:/(^|\s)(?:proc\s+\w+|quit|run|data(?!=))\b/i,alias:"keyword",lookbehind:!0},o=[/\/\*[\s\S]*?\*\//,{pattern:/(^[ \t]*|;\s*)\*[^;]*;/m,lookbehind:!0}],l={pattern:RegExp(t),greedy:!0},c=/[$%@.(){}\[\];,\\]/,d={pattern:/%?\b\w+(?=\()/,alias:"keyword"},p={function:d,"arg-value":{pattern:/(=\s*)[A-Z\.]+/i,lookbehind:!0},operator:/=/,"macro-variable":i,arg:{pattern:/[A-Z]+/i,alias:"keyword"},number:a,"numeric-constant":n,punctuation:c,string:l},u={pattern:/\b(?:format|put)\b=?[\w'$.]+/im,inside:{keyword:/^(?:format|put)(?==)/i,equals:/=/,format:{pattern:/(?:\w|\$\d)+\.\d?/i,alias:"number"}}},m={pattern:/\b(?:format|put)\s+[\w']+(?:\s+[$.\w]+)+(?=;)/i,inside:{keyword:/^(?:format|put)/i,format:{pattern:/[\w$]+\.\d?/,alias:"number"}}},b={pattern:/((?:^|\s)=?)(?:catname|checkpoint execute_always|dm|endsas|filename|footnote|%include|libname|%list|lock|missing|options|page|resetline|%run|sasfile|skip|sysecho|title\d?)\b/i,lookbehind:!0,alias:"keyword"},g={pattern:/(^|\s)(?:submit(?:\s+(?:load|parseonly|norun))?|endsubmit)\b/i,lookbehind:!0,alias:"keyword"},k="accessControl|cdm|aggregation|aStore|ruleMining|audio|autotune|bayesianNetClassifier|bioMedImage|boolRule|builtins|cardinality|sccasl|clustering|copula|countreg|dataDiscovery|dataPreprocess|dataSciencePilot|dataStep|decisionTree|deepLearn|deepNeural|varReduce|simSystem|ds2|deduplication|ecm|entityRes|espCluster|explainModel|factmac|fastKnn|fcmpact|fedSql|freqTab|gam|gleam|graphSemiSupLearn|gVarCluster|hiddenMarkovModel|hyperGroup|image|iml|ica|kernalPca|langModel|ldaTopic|sparseML|mlTools|mixed|modelPublishing|mbc|network|optNetwork|neuralNet|nonlinear|nmf|nonParametricBayes|optimization|panel|pls|percentile|pca|phreg|qkb|qlim|quantreg|recommend|tsReconcile|deepRnn|regression|reinforcementLearn|robustPca|sampling|sparkEmbeddedProcess|search(?:Analytics)?|sentimentAnalysis|sequence|configuration|session(?:Prop)?|severity|simple|smartData|sandwich|spatialreg|stabilityMonitoring|spc|loadStreams|svDataDescription|svm|table|conditionalRandomFields|text(?:Rule(?:Develop|Score)|Mining|Parse|Topic|Util|Filters|Frequency)|tsInfo|timeData|transpose|uniTimeSeries",y={pattern:RegExp("(^|\\s)(?:action\\s+)?(?:)\\.[a-z]+\\b[^;]+".replace(//g,function(){return k}),"i"),lookbehind:!0,inside:{keyword:RegExp("(?:)\\.[a-z]+\\b".replace(//g,function(){return k}),"i"),action:{pattern:/(?:action)/i,alias:"keyword"},comment:o,function:d,"arg-value":p["arg-value"],operator:p.operator,argument:p.arg,number:a,"numeric-constant":n,punctuation:c,string:l}},S={pattern:/((?:^|\s)=?)(?:after|analysis|and|array|barchart|barwidth|begingraph|by|call|cas|cbarline|cfill|class(?:lev)?|close|column|computed?|contains|continue|data(?==)|define|delete|describe|document|do\s+over|do|dol|drop|dul|end(?:source|comp)?|entryTitle|else|eval(?:uate)?|exec(?:ute)?|exit|fill(?:attrs)?|file(?:name)?|flist|fnc|function(?:list)?|goto|global|group(?:by)?|headline|headskip|histogram|if|infile|keep|keylabel|keyword|label|layout|leave|legendlabel|length|libname|loadactionset|merge|midpoints|name|noobs|nowd|_?null_|ods|options|or|otherwise|out(?:put)?|over(?:lay)?|plot|put|print|raise|ranexp|rannor|rbreak|retain|return|select|set|session|sessref|source|statgraph|sum|summarize|table|temp|terminate|then\s+do|then|title\d?|to|var|when|where|xaxisopts|yaxisopts|y2axisopts)\b/i,lookbehind:!0};e.languages.sas={datalines:{pattern:/^([ \t]*)(?:(?:data)?lines|cards);[\s\S]+?^[ \t]*;/im,lookbehind:!0,alias:"string",inside:{keyword:{pattern:/^(?:(?:data)?lines|cards)/i},punctuation:/;/}},"proc-sql":{pattern:/(^proc\s+(?:fed)?sql(?:\s+[\w|=]+)?;)[\s\S]+?(?=^(?:proc\s+\w+|quit|run|data);|(?![\s\S]))/im,lookbehind:!0,inside:{sql:{pattern:RegExp("^[ \t]*(?:select|alter\\s+table|(?:create|describe|drop)\\s+(?:index|table(?:\\s+constraints)?|view)|create\\s+unique\\s+index|insert\\s+into|update)(?:|[^;\"'])+;".replace(//g,function(){return t}),"im"),alias:"language-sql",inside:e.languages.sql},"global-statements":b,"sql-statements":{pattern:/(^|\s)(?:disconnect\s+from|exec(?:ute)?|begin|commit|rollback|reset|validate)\b/i,lookbehind:!0,alias:"keyword"},number:a,"numeric-constant":n,punctuation:c,string:l}},"proc-groovy":{pattern:/(^proc\s+groovy(?:\s+[\w|=]+)?;)[\s\S]+?(?=^(?:proc\s+\w+|quit|run|data);|(?![\s\S]))/im,lookbehind:!0,inside:{comment:o,groovy:{pattern:RegExp("(^[ \t]*submit(?:\\s+(?:load|parseonly|norun))?)(?:|[^\"'])+?(?=endsubmit;)".replace(//g,function(){return t}),"im"),lookbehind:!0,alias:"language-groovy",inside:e.languages.groovy},keyword:S,"submit-statement":g,"global-statements":b,number:a,"numeric-constant":n,punctuation:c,string:l}},"proc-lua":{pattern:/(^proc\s+lua(?:\s+[\w|=]+)?;)[\s\S]+?(?=^(?:proc\s+\w+|quit|run|data);|(?![\s\S]))/im,lookbehind:!0,inside:{comment:o,lua:{pattern:RegExp("(^[ \t]*submit(?:\\s+(?:load|parseonly|norun))?)(?:|[^\"'])+?(?=endsubmit;)".replace(//g,function(){return t}),"im"),lookbehind:!0,alias:"language-lua",inside:e.languages.lua},keyword:S,"submit-statement":g,"global-statements":b,number:a,"numeric-constant":n,punctuation:c,string:l}},"proc-cas":{pattern:/(^proc\s+cas(?:\s+[\w|=]+)?;)[\s\S]+?(?=^(?:proc\s+\w+|quit|data);|(?![\s\S]))/im,lookbehind:!0,inside:{comment:o,"statement-var":{pattern:/((?:^|\s)=?)saveresult\s[^;]+/im,lookbehind:!0,inside:{statement:{pattern:/^saveresult\s+\S+/i,inside:{keyword:/^(?:saveresult)/i}},rest:p}},"cas-actions":y,statement:{pattern:/((?:^|\s)=?)(?:default|(?:un)?set|on|output|upload)[^;]+/im,lookbehind:!0,inside:p},step:s,keyword:S,function:d,format:u,altformat:m,"global-statements":b,number:a,"numeric-constant":n,punctuation:c,string:l}},"proc-args":{pattern:RegExp("(^proc\\s+\\w+\\s+)(?!\\s)(?:[^;\"']|)+;".replace(//g,function(){return t}),"im"),lookbehind:!0,inside:p},"macro-keyword":r,"macro-variable":i,"macro-string-functions":{pattern:/((?:^|\s|=))%(?:NRBQUOTE|NRQUOTE|NRSTR|BQUOTE|QUOTE|STR)\(.*?(?:[^%]\))/i,lookbehind:!0,inside:{function:{pattern:/%(?:NRBQUOTE|NRQUOTE|NRSTR|BQUOTE|QUOTE|STR)/i,alias:"keyword"},"macro-keyword":r,"macro-variable":i,"escaped-char":{pattern:/%['"()<>=¬^~;,#]/i},punctuation:c}},"macro-declaration":{pattern:/^%macro[^;]+(?=;)/im,inside:{keyword:/%macro/i}},"macro-end":{pattern:/^%mend[^;]+(?=;)/im,inside:{keyword:/%mend/i}},macro:{pattern:/%_\w+(?=\()/,alias:"keyword"},input:{pattern:/\binput\s[-\w\s/*.$&]+;/i,inside:{input:{alias:"keyword",pattern:/^input/i},comment:o,number:a,"numeric-constant":n}},"options-args":{pattern:/(^options)[-'"|/\\<>*+=:()\w\s]*(?=;)/im,lookbehind:!0,inside:p},"cas-actions":y,comment:o,function:d,format:u,altformat:m,"numeric-constant":n,datetime:{pattern:RegExp(t+"(?:dt?|t)"),alias:"number"},string:l,step:s,keyword:S,"operator-keyword":{pattern:/\b(?:eq|ne|gt|lt|ge|le|in|not)\b/i,alias:"operator"},number:a,operator:/\*\*?|\|\|?|!!?|¦¦?|<[>=]?|>[<=]?|[-+\/=&]|[~¬^]=?/i,punctuation:c}}(Prism); \ No newline at end of file +!function(e){var t="(?:\"(?:\"\"|[^\"])*\"(?!\")|'(?:''|[^'])*'(?!'))",a=/\b(?:\d[\da-f]*x|\d+(?:\.\d+)?(?:e[+-]?\d+)?)\b/i,n={pattern:RegExp(t+"[bx]"),alias:"number"},i={pattern:/&[a-z_]\w*/i},r={pattern:/((?:^|\s|=|\())%(?:ABORT|BY|CMS|COPY|DISPLAY|DO|ELSE|END|EVAL|GLOBAL|GO|GOTO|IF|INC|INCLUDE|INDEX|INPUT|KTRIM|LENGTH|LET|LIST|LOCAL|PUT|QKTRIM|QSCAN|QSUBSTR|QSYSFUNC|QUPCASE|RETURN|RUN|SCAN|SUBSTR|SUPERQ|SYMDEL|SYMEXIST|SYMGLOBL|SYMLOCAL|SYSCALL|SYSEVALF|SYSEXEC|SYSFUNC|SYSGET|SYSRPUT|THEN|TO|TSO|UNQUOTE|UNTIL|UPCASE|WHILE|WINDOW)\b/i,lookbehind:!0,alias:"keyword"},s={pattern:/(^|\s)(?:proc\s+\w+|data(?!=)|quit|run)\b/i,alias:"keyword",lookbehind:!0},o=[/\/\*[\s\S]*?\*\//,{pattern:/(^[ \t]*|;\s*)\*[^;]*;/m,lookbehind:!0}],l={pattern:RegExp(t),greedy:!0},c=/[$%@.(){}\[\];,\\]/,d={pattern:/%?\b\w+(?=\()/,alias:"keyword"},p={function:d,"arg-value":{pattern:/(=\s*)[A-Z\.]+/i,lookbehind:!0},operator:/=/,"macro-variable":i,arg:{pattern:/[A-Z]+/i,alias:"keyword"},number:a,"numeric-constant":n,punctuation:c,string:l},u={pattern:/\b(?:format|put)\b=?[\w'$.]+/im,inside:{keyword:/^(?:format|put)(?==)/i,equals:/=/,format:{pattern:/(?:\w|\$\d)+\.\d?/i,alias:"number"}}},m={pattern:/\b(?:format|put)\s+[\w']+(?:\s+[$.\w]+)+(?=;)/i,inside:{keyword:/^(?:format|put)/i,format:{pattern:/[\w$]+\.\d?/,alias:"number"}}},b={pattern:/((?:^|\s)=?)(?:catname|checkpoint execute_always|dm|endsas|filename|footnote|%include|libname|%list|lock|missing|options|page|resetline|%run|sasfile|skip|sysecho|title\d?)\b/i,lookbehind:!0,alias:"keyword"},g={pattern:/(^|\s)(?:submit(?:\s+(?:load|norun|parseonly))?|endsubmit)\b/i,lookbehind:!0,alias:"keyword"},k="aStore|accessControl|aggregation|audio|autotune|bayesianNetClassifier|bioMedImage|boolRule|builtins|cardinality|cdm|clustering|conditionalRandomFields|configuration|copula|countreg|dataDiscovery|dataPreprocess|dataSciencePilot|dataStep|decisionTree|deduplication|deepLearn|deepNeural|deepRnn|ds2|ecm|entityRes|espCluster|explainModel|factmac|fastKnn|fcmpact|fedSql|freqTab|gVarCluster|gam|gleam|graphSemiSupLearn|hiddenMarkovModel|hyperGroup|ica|image|iml|kernalPca|langModel|ldaTopic|loadStreams|mbc|mixed|mlTools|modelPublishing|network|neuralNet|nmf|nonParametricBayes|nonlinear|optNetwork|optimization|panel|pca|percentile|phreg|pls|qkb|qlim|quantreg|recommend|regression|reinforcementLearn|robustPca|ruleMining|sampling|sandwich|sccasl|search(?:Analytics)?|sentimentAnalysis|sequence|session(?:Prop)?|severity|simSystem|simple|smartData|sparkEmbeddedProcess|sparseML|spatialreg|spc|stabilityMonitoring|svDataDescription|svm|table|text(?:Filters|Frequency|Mining|Parse|Rule(?:Develop|Score)|Topic|Util)|timeData|transpose|tsInfo|tsReconcile|uniTimeSeries|varReduce",y={pattern:RegExp("(^|\\s)(?:action\\s+)?(?:)\\.[a-z]+\\b[^;]+".replace(//g,function(){return k}),"i"),lookbehind:!0,inside:{keyword:RegExp("(?:)\\.[a-z]+\\b".replace(//g,function(){return k}),"i"),action:{pattern:/(?:action)/i,alias:"keyword"},comment:o,function:d,"arg-value":p["arg-value"],operator:p.operator,argument:p.arg,number:a,"numeric-constant":n,punctuation:c,string:l}},S={pattern:/((?:^|\s)=?)(?:after|analysis|and|array|barchart|barwidth|begingraph|by|call|cas|cbarline|cfill|class(?:lev)?|close|column|computed?|contains|continue|data(?==)|define|delete|describe|document|do\s+over|do|dol|drop|dul|else|end(?:comp|source)?|entryTitle|eval(?:uate)?|exec(?:ute)?|exit|file(?:name)?|fill(?:attrs)?|flist|fnc|function(?:list)?|global|goto|group(?:by)?|headline|headskip|histogram|if|infile|keep|keylabel|keyword|label|layout|leave|legendlabel|length|libname|loadactionset|merge|midpoints|_?null_|name|noobs|nowd|ods|options|or|otherwise|out(?:put)?|over(?:lay)?|plot|print|put|raise|ranexp|rannor|rbreak|retain|return|select|session|sessref|set|source|statgraph|sum|summarize|table|temp|terminate|then\s+do|then|title\d?|to|var|when|where|xaxisopts|y2axisopts|yaxisopts)\b/i,lookbehind:!0};e.languages.sas={datalines:{pattern:/^([ \t]*)(?:cards|(?:data)?lines);[\s\S]+?^[ \t]*;/im,lookbehind:!0,alias:"string",inside:{keyword:{pattern:/^(?:cards|(?:data)?lines)/i},punctuation:/;/}},"proc-sql":{pattern:/(^proc\s+(?:fed)?sql(?:\s+[\w|=]+)?;)[\s\S]+?(?=^(?:proc\s+\w+|data|quit|run);|(?![\s\S]))/im,lookbehind:!0,inside:{sql:{pattern:RegExp("^[ \t]*(?:select|alter\\s+table|(?:create|describe|drop)\\s+(?:index|table(?:\\s+constraints)?|view)|create\\s+unique\\s+index|insert\\s+into|update)(?:|[^;\"'])+;".replace(//g,function(){return t}),"im"),alias:"language-sql",inside:e.languages.sql},"global-statements":b,"sql-statements":{pattern:/(^|\s)(?:disconnect\s+from|begin|commit|exec(?:ute)?|reset|rollback|validate)\b/i,lookbehind:!0,alias:"keyword"},number:a,"numeric-constant":n,punctuation:c,string:l}},"proc-groovy":{pattern:/(^proc\s+groovy(?:\s+[\w|=]+)?;)[\s\S]+?(?=^(?:proc\s+\w+|data|quit|run);|(?![\s\S]))/im,lookbehind:!0,inside:{comment:o,groovy:{pattern:RegExp("(^[ \t]*submit(?:\\s+(?:load|norun|parseonly))?)(?:|[^\"'])+?(?=endsubmit;)".replace(//g,function(){return t}),"im"),lookbehind:!0,alias:"language-groovy",inside:e.languages.groovy},keyword:S,"submit-statement":g,"global-statements":b,number:a,"numeric-constant":n,punctuation:c,string:l}},"proc-lua":{pattern:/(^proc\s+lua(?:\s+[\w|=]+)?;)[\s\S]+?(?=^(?:proc\s+\w+|data|quit|run);|(?![\s\S]))/im,lookbehind:!0,inside:{comment:o,lua:{pattern:RegExp("(^[ \t]*submit(?:\\s+(?:load|norun|parseonly))?)(?:|[^\"'])+?(?=endsubmit;)".replace(//g,function(){return t}),"im"),lookbehind:!0,alias:"language-lua",inside:e.languages.lua},keyword:S,"submit-statement":g,"global-statements":b,number:a,"numeric-constant":n,punctuation:c,string:l}},"proc-cas":{pattern:/(^proc\s+cas(?:\s+[\w|=]+)?;)[\s\S]+?(?=^(?:proc\s+\w+|quit|data);|(?![\s\S]))/im,lookbehind:!0,inside:{comment:o,"statement-var":{pattern:/((?:^|\s)=?)saveresult\s[^;]+/im,lookbehind:!0,inside:{statement:{pattern:/^saveresult\s+\S+/i,inside:{keyword:/^(?:saveresult)/i}},rest:p}},"cas-actions":y,statement:{pattern:/((?:^|\s)=?)(?:default|(?:un)?set|on|output|upload)[^;]+/im,lookbehind:!0,inside:p},step:s,keyword:S,function:d,format:u,altformat:m,"global-statements":b,number:a,"numeric-constant":n,punctuation:c,string:l}},"proc-args":{pattern:RegExp("(^proc\\s+\\w+\\s+)(?!\\s)(?:[^;\"']|)+;".replace(//g,function(){return t}),"im"),lookbehind:!0,inside:p},"macro-keyword":r,"macro-variable":i,"macro-string-functions":{pattern:/((?:^|\s|=))%(?:BQUOTE|NRBQUOTE|NRQUOTE|NRSTR|QUOTE|STR)\(.*?(?:[^%]\))/i,lookbehind:!0,inside:{function:{pattern:/%(?:BQUOTE|NRBQUOTE|NRQUOTE|NRSTR|QUOTE|STR)/i,alias:"keyword"},"macro-keyword":r,"macro-variable":i,"escaped-char":{pattern:/%['"()<>=¬^~;,#]/i},punctuation:c}},"macro-declaration":{pattern:/^%macro[^;]+(?=;)/im,inside:{keyword:/%macro/i}},"macro-end":{pattern:/^%mend[^;]+(?=;)/im,inside:{keyword:/%mend/i}},macro:{pattern:/%_\w+(?=\()/,alias:"keyword"},input:{pattern:/\binput\s[-\w\s/*.$&]+;/i,inside:{input:{alias:"keyword",pattern:/^input/i},comment:o,number:a,"numeric-constant":n}},"options-args":{pattern:/(^options)[-'"|/\\<>*+=:()\w\s]*(?=;)/im,lookbehind:!0,inside:p},"cas-actions":y,comment:o,function:d,format:u,altformat:m,"numeric-constant":n,datetime:{pattern:RegExp(t+"(?:dt?|t)"),alias:"number"},string:l,step:s,keyword:S,"operator-keyword":{pattern:/\b(?:eq|ge|gt|in|le|lt|ne|not)\b/i,alias:"operator"},number:a,operator:/\*\*?|\|\|?|!!?|¦¦?|<[>=]?|>[<=]?|[-+\/=&]|[~¬^]=?/i,punctuation:c}}(Prism); \ No newline at end of file diff --git a/components/prism-sass.js b/components/prism-sass.js index 83744f0925..d630bd6134 100644 --- a/components/prism-sass.js +++ b/components/prism-sass.js @@ -24,7 +24,7 @@ var variable = /\$[-\w]+|#\{\$[-\w]+\}/; var operator = [ - /[+*\/%]|[=!]=|<=?|>=?|\b(?:and|or|not)\b/, + /[+*\/%]|[=!]=|<=?|>=?|\b(?:and|not|or)\b/, { pattern: /(\s)-(?=\s)/, lookbehind: true diff --git a/components/prism-sass.min.js b/components/prism-sass.min.js index 910d6c5040..ad25ba06d3 100644 --- a/components/prism-sass.min.js +++ b/components/prism-sass.min.js @@ -1 +1 @@ -!function(e){e.languages.sass=e.languages.extend("css",{comment:{pattern:/^([ \t]*)\/[\/*].*(?:(?:\r?\n|\r)\1[ \t].+)*/m,lookbehind:!0,greedy:!0}}),e.languages.insertBefore("sass","atrule",{"atrule-line":{pattern:/^(?:[ \t]*)[@+=].+/m,greedy:!0,inside:{atrule:/(?:@[\w-]+|[+=])/m}}}),delete e.languages.sass.atrule;var r=/\$[-\w]+|#\{\$[-\w]+\}/,t=[/[+*\/%]|[=!]=|<=?|>=?|\b(?:and|or|not)\b/,{pattern:/(\s)-(?=\s)/,lookbehind:!0}];e.languages.insertBefore("sass","property",{"variable-line":{pattern:/^[ \t]*\$.+/m,greedy:!0,inside:{punctuation:/:/,variable:r,operator:t}},"property-line":{pattern:/^[ \t]*(?:[^:\s]+ *:.*|:[^:\s].*)/m,greedy:!0,inside:{property:[/[^:\s]+(?=\s*:)/,{pattern:/(:)[^:\s]+/,lookbehind:!0}],punctuation:/:/,variable:r,operator:t,important:e.languages.sass.important}}}),delete e.languages.sass.property,delete e.languages.sass.important,e.languages.insertBefore("sass","punctuation",{selector:{pattern:/^([ \t]*)\S(?:,[^,\r\n]+|[^,\r\n]*)(?:,[^,\r\n]+)*(?:,(?:\r?\n|\r)\1[ \t]+\S(?:,[^,\r\n]+|[^,\r\n]*)(?:,[^,\r\n]+)*)*/m,lookbehind:!0,greedy:!0}})}(Prism); \ No newline at end of file +!function(e){e.languages.sass=e.languages.extend("css",{comment:{pattern:/^([ \t]*)\/[\/*].*(?:(?:\r?\n|\r)\1[ \t].+)*/m,lookbehind:!0,greedy:!0}}),e.languages.insertBefore("sass","atrule",{"atrule-line":{pattern:/^(?:[ \t]*)[@+=].+/m,greedy:!0,inside:{atrule:/(?:@[\w-]+|[+=])/m}}}),delete e.languages.sass.atrule;var r=/\$[-\w]+|#\{\$[-\w]+\}/,t=[/[+*\/%]|[=!]=|<=?|>=?|\b(?:and|not|or)\b/,{pattern:/(\s)-(?=\s)/,lookbehind:!0}];e.languages.insertBefore("sass","property",{"variable-line":{pattern:/^[ \t]*\$.+/m,greedy:!0,inside:{punctuation:/:/,variable:r,operator:t}},"property-line":{pattern:/^[ \t]*(?:[^:\s]+ *:.*|:[^:\s].*)/m,greedy:!0,inside:{property:[/[^:\s]+(?=\s*:)/,{pattern:/(:)[^:\s]+/,lookbehind:!0}],punctuation:/:/,variable:r,operator:t,important:e.languages.sass.important}}}),delete e.languages.sass.property,delete e.languages.sass.important,e.languages.insertBefore("sass","punctuation",{selector:{pattern:/^([ \t]*)\S(?:,[^,\r\n]+|[^,\r\n]*)(?:,[^,\r\n]+)*(?:,(?:\r?\n|\r)\1[ \t]+\S(?:,[^,\r\n]+|[^,\r\n]*)(?:,[^,\r\n]+)*)*/m,lookbehind:!0,greedy:!0}})}(Prism); \ No newline at end of file diff --git a/components/prism-scala.js b/components/prism-scala.js index 25846f5d11..f886067d1b 100644 --- a/components/prism-scala.js +++ b/components/prism-scala.js @@ -10,7 +10,7 @@ Prism.languages.scala = Prism.languages.extend('java', { }, 'keyword': /<-|=>|\b(?:abstract|case|catch|class|def|do|else|extends|final|finally|for|forSome|if|implicit|import|lazy|match|new|null|object|override|package|private|protected|return|sealed|self|super|this|throw|trait|try|type|val|var|while|with|yield)\b/, 'number': /\b0x(?:[\da-f]*\.)?[\da-f]+|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e\d+)?[dfl]?/i, - 'builtin': /\b(?:String|Int|Long|Short|Byte|Boolean|Double|Float|Char|Any|AnyRef|AnyVal|Unit|Nothing)\b/, + 'builtin': /\b(?:Any|AnyRef|AnyVal|Boolean|Byte|Char|Double|Float|Int|Long|Nothing|Short|String|Unit)\b/, 'symbol': /'[^\d\s\\]\w*/ }); delete Prism.languages.scala['class-name']; diff --git a/components/prism-scala.min.js b/components/prism-scala.min.js index bc61a060be..5917fa9ee3 100644 --- a/components/prism-scala.min.js +++ b/components/prism-scala.min.js @@ -1 +1 @@ -Prism.languages.scala=Prism.languages.extend("java",{"triple-quoted-string":{pattern:/"""[\s\S]*?"""/,greedy:!0,alias:"string"},string:{pattern:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0},keyword:/<-|=>|\b(?:abstract|case|catch|class|def|do|else|extends|final|finally|for|forSome|if|implicit|import|lazy|match|new|null|object|override|package|private|protected|return|sealed|self|super|this|throw|trait|try|type|val|var|while|with|yield)\b/,number:/\b0x(?:[\da-f]*\.)?[\da-f]+|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e\d+)?[dfl]?/i,builtin:/\b(?:String|Int|Long|Short|Byte|Boolean|Double|Float|Char|Any|AnyRef|AnyVal|Unit|Nothing)\b/,symbol:/'[^\d\s\\]\w*/}),delete Prism.languages.scala["class-name"],delete Prism.languages.scala.function; \ No newline at end of file +Prism.languages.scala=Prism.languages.extend("java",{"triple-quoted-string":{pattern:/"""[\s\S]*?"""/,greedy:!0,alias:"string"},string:{pattern:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0},keyword:/<-|=>|\b(?:abstract|case|catch|class|def|do|else|extends|final|finally|for|forSome|if|implicit|import|lazy|match|new|null|object|override|package|private|protected|return|sealed|self|super|this|throw|trait|try|type|val|var|while|with|yield)\b/,number:/\b0x(?:[\da-f]*\.)?[\da-f]+|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e\d+)?[dfl]?/i,builtin:/\b(?:Any|AnyRef|AnyVal|Boolean|Byte|Char|Double|Float|Int|Long|Nothing|Short|String|Unit)\b/,symbol:/'[^\d\s\\]\w*/}),delete Prism.languages.scala["class-name"],delete Prism.languages.scala.function; \ No newline at end of file diff --git a/components/prism-scheme.js b/components/prism-scheme.js index e3980a00d9..ce2d9f7a9f 100644 --- a/components/prism-scheme.js +++ b/components/prism-scheme.js @@ -31,7 +31,7 @@ } ], 'keyword': { - pattern: /((?:^|[^'`#])[(\[])(?:begin|case(?:-lambda)?|cond(?:-expand)?|define(?:-library|-macro|-record-type|-syntax|-values)?|defmacro|delay(?:-force)?|do|else|export|except|guard|if|import|include(?:-ci|-library-declarations)?|lambda|let(?:rec)?(?:-syntax|-values|\*)?|let\*-values|only|parameterize|prefix|(?:quasi-?)?quote|rename|set!|syntax-(?:case|rules)|unless|unquote(?:-splicing)?|when)(?=[()\[\]\s]|$)/, + pattern: /((?:^|[^'`#])[(\[])(?:begin|case(?:-lambda)?|cond(?:-expand)?|define(?:-library|-macro|-record-type|-syntax|-values)?|defmacro|delay(?:-force)?|do|else|except|export|guard|if|import|include(?:-ci|-library-declarations)?|lambda|let(?:rec)?(?:-syntax|-values|\*)?|let\*-values|only|parameterize|prefix|(?:quasi-?)?quote|rename|set!|syntax-(?:case|rules)|unless|unquote(?:-splicing)?|when)(?=[()\[\]\s]|$)/, lookbehind: true }, 'builtin': { diff --git a/components/prism-scheme.min.js b/components/prism-scheme.min.js index 28e6e39d49..3671b441c9 100644 --- a/components/prism-scheme.min.js +++ b/components/prism-scheme.min.js @@ -1 +1 @@ -Prism.languages.scheme={comment:/;.*|#;\s*(?:\((?:[^()]|\([^()]*\))*\)|\[(?:[^\[\]]|\[[^\[\]]*\])*\])|#\|(?:[^#|]|#(?!\|)|\|(?!#)|#\|(?:[^#|]|#(?!\|)|\|(?!#))*\|#)*\|#/,string:{pattern:/"(?:[^"\\]|\\.)*"/,greedy:!0},symbol:{pattern:/'[^()\[\]#'\s]+/,greedy:!0},character:{pattern:/#\\(?:[ux][a-fA-F\d]+\b|[-a-zA-Z]+\b|[\uD800-\uDBFF][\uDC00-\uDFFF]|\S)/,greedy:!0,alias:"string"},"lambda-parameter":[{pattern:/((?:^|[^'`#])[(\[]lambda\s+)(?:[^|()\[\]'\s]+|\|(?:[^\\|]|\\.)*\|)/,lookbehind:!0},{pattern:/((?:^|[^'`#])[(\[]lambda\s+[(\[])[^()\[\]']+/,lookbehind:!0}],keyword:{pattern:/((?:^|[^'`#])[(\[])(?:begin|case(?:-lambda)?|cond(?:-expand)?|define(?:-library|-macro|-record-type|-syntax|-values)?|defmacro|delay(?:-force)?|do|else|export|except|guard|if|import|include(?:-ci|-library-declarations)?|lambda|let(?:rec)?(?:-syntax|-values|\*)?|let\*-values|only|parameterize|prefix|(?:quasi-?)?quote|rename|set!|syntax-(?:case|rules)|unless|unquote(?:-splicing)?|when)(?=[()\[\]\s]|$)/,lookbehind:!0},builtin:{pattern:/((?:^|[^'`#])[(\[])(?:abs|and|append|apply|assoc|ass[qv]|binary-port\?|boolean=?\?|bytevector(?:-append|-copy|-copy!|-length|-u8-ref|-u8-set!|\?)?|caar|cadr|call-with-(?:current-continuation|port|values)|call\/cc|car|cdar|cddr|cdr|ceiling|char(?:->integer|-ready\?|\?|<\?|<=\?|=\?|>\?|>=\?)|close-(?:input-port|output-port|port)|complex\?|cons|current-(?:error|input|output)-port|denominator|dynamic-wind|eof-object\??|eq\?|equal\?|eqv\?|error|error-object(?:-irritants|-message|\?)|eval|even\?|exact(?:-integer-sqrt|-integer\?|\?)?|expt|features|file-error\?|floor(?:-quotient|-remainder|\/)?|flush-output-port|for-each|gcd|get-output-(?:bytevector|string)|inexact\??|input-port(?:-open\?|\?)|integer(?:->char|\?)|lcm|length|list(?:->string|->vector|-copy|-ref|-set!|-tail|\?)?|make-(?:bytevector|list|parameter|string|vector)|map|max|member|memq|memv|min|modulo|negative\?|newline|not|null\?|number(?:->string|\?)|numerator|odd\?|open-(?:input|output)-(?:bytevector|string)|or|output-port(?:-open\?|\?)|pair\?|peek-char|peek-u8|port\?|positive\?|procedure\?|quotient|raise|raise-continuable|rational\?|rationalize|read-(?:bytevector|bytevector!|char|error\?|line|string|u8)|real\?|remainder|reverse|round|set-c[ad]r!|square|string(?:->list|->number|->symbol|->utf8|->vector|-append|-copy|-copy!|-fill!|-for-each|-length|-map|-ref|-set!|\?|<\?|<=\?|=\?|>\?|>=\?)?|substring|symbol(?:->string|\?|=\?)|syntax-error|textual-port\?|truncate(?:-quotient|-remainder|\/)?|u8-ready\?|utf8->string|values|vector(?:->list|->string|-append|-copy|-copy!|-fill!|-for-each|-length|-map|-ref|-set!|\?)?|with-exception-handler|write-(?:bytevector|char|string|u8)|zero\?)(?=[()\[\]\s]|$)/,lookbehind:!0},operator:{pattern:/((?:^|[^'`#])[(\[])(?:[-+*%/]|[<>]=?|=>?)(?=[()\[\]\s]|$)/,lookbehind:!0},number:{pattern:RegExp(function(r){for(var e in r)r[e]=r[e].replace(/<[\w\s]+>/g,function(e){return"(?:"+r[e].trim()+")"});return r[e]}({"":"\\d+(?:/\\d+)|(?:\\d+(?:\\.\\d*)?|\\.\\d+)(?:e[+-]?\\d+)?","":"[+-]?|[+-](?:inf|nan)\\.0","":"[+-](?:|(?:inf|nan)\\.0)?i","":"(?:@|)?|","":"(?:#d(?:#[ei])?|#[ei](?:#d)?)?","":"[0-9a-f]+(?:/[0-9a-f]+)?","":"[+-]?|[+-](?:inf|nan)\\.0","":"[+-](?:|(?:inf|nan)\\.0)?i","":"(?:@|)?|","":"#[box](?:#[ei])?|(?:#[ei])?#[box]","":"(^|[()\\[\\]\\s])(?:|)(?=[()\\[\\]\\s]|$)"}),"i"),lookbehind:!0},boolean:{pattern:/(^|[()\[\]\s])#(?:[ft]|false|true)(?=[()\[\]\s]|$)/,lookbehind:!0},function:{pattern:/((?:^|[^'`#])[(\[])(?:[^|()\[\]'\s]+|\|(?:[^\\|]|\\.)*\|)(?=[()\[\]\s]|$)/,lookbehind:!0},identifier:{pattern:/(^|[()\[\]\s])\|(?:[^\\|]|\\.)*\|(?=[()\[\]\s]|$)/,lookbehind:!0,greedy:!0},punctuation:/[()\[\]']/}; \ No newline at end of file +Prism.languages.scheme={comment:/;.*|#;\s*(?:\((?:[^()]|\([^()]*\))*\)|\[(?:[^\[\]]|\[[^\[\]]*\])*\])|#\|(?:[^#|]|#(?!\|)|\|(?!#)|#\|(?:[^#|]|#(?!\|)|\|(?!#))*\|#)*\|#/,string:{pattern:/"(?:[^"\\]|\\.)*"/,greedy:!0},symbol:{pattern:/'[^()\[\]#'\s]+/,greedy:!0},character:{pattern:/#\\(?:[ux][a-fA-F\d]+\b|[-a-zA-Z]+\b|[\uD800-\uDBFF][\uDC00-\uDFFF]|\S)/,greedy:!0,alias:"string"},"lambda-parameter":[{pattern:/((?:^|[^'`#])[(\[]lambda\s+)(?:[^|()\[\]'\s]+|\|(?:[^\\|]|\\.)*\|)/,lookbehind:!0},{pattern:/((?:^|[^'`#])[(\[]lambda\s+[(\[])[^()\[\]']+/,lookbehind:!0}],keyword:{pattern:/((?:^|[^'`#])[(\[])(?:begin|case(?:-lambda)?|cond(?:-expand)?|define(?:-library|-macro|-record-type|-syntax|-values)?|defmacro|delay(?:-force)?|do|else|except|export|guard|if|import|include(?:-ci|-library-declarations)?|lambda|let(?:rec)?(?:-syntax|-values|\*)?|let\*-values|only|parameterize|prefix|(?:quasi-?)?quote|rename|set!|syntax-(?:case|rules)|unless|unquote(?:-splicing)?|when)(?=[()\[\]\s]|$)/,lookbehind:!0},builtin:{pattern:/((?:^|[^'`#])[(\[])(?:abs|and|append|apply|assoc|ass[qv]|binary-port\?|boolean=?\?|bytevector(?:-append|-copy|-copy!|-length|-u8-ref|-u8-set!|\?)?|caar|cadr|call-with-(?:current-continuation|port|values)|call\/cc|car|cdar|cddr|cdr|ceiling|char(?:->integer|-ready\?|\?|<\?|<=\?|=\?|>\?|>=\?)|close-(?:input-port|output-port|port)|complex\?|cons|current-(?:error|input|output)-port|denominator|dynamic-wind|eof-object\??|eq\?|equal\?|eqv\?|error|error-object(?:-irritants|-message|\?)|eval|even\?|exact(?:-integer-sqrt|-integer\?|\?)?|expt|features|file-error\?|floor(?:-quotient|-remainder|\/)?|flush-output-port|for-each|gcd|get-output-(?:bytevector|string)|inexact\??|input-port(?:-open\?|\?)|integer(?:->char|\?)|lcm|length|list(?:->string|->vector|-copy|-ref|-set!|-tail|\?)?|make-(?:bytevector|list|parameter|string|vector)|map|max|member|memq|memv|min|modulo|negative\?|newline|not|null\?|number(?:->string|\?)|numerator|odd\?|open-(?:input|output)-(?:bytevector|string)|or|output-port(?:-open\?|\?)|pair\?|peek-char|peek-u8|port\?|positive\?|procedure\?|quotient|raise|raise-continuable|rational\?|rationalize|read-(?:bytevector|bytevector!|char|error\?|line|string|u8)|real\?|remainder|reverse|round|set-c[ad]r!|square|string(?:->list|->number|->symbol|->utf8|->vector|-append|-copy|-copy!|-fill!|-for-each|-length|-map|-ref|-set!|\?|<\?|<=\?|=\?|>\?|>=\?)?|substring|symbol(?:->string|\?|=\?)|syntax-error|textual-port\?|truncate(?:-quotient|-remainder|\/)?|u8-ready\?|utf8->string|values|vector(?:->list|->string|-append|-copy|-copy!|-fill!|-for-each|-length|-map|-ref|-set!|\?)?|with-exception-handler|write-(?:bytevector|char|string|u8)|zero\?)(?=[()\[\]\s]|$)/,lookbehind:!0},operator:{pattern:/((?:^|[^'`#])[(\[])(?:[-+*%/]|[<>]=?|=>?)(?=[()\[\]\s]|$)/,lookbehind:!0},number:{pattern:RegExp(function(r){for(var e in r)r[e]=r[e].replace(/<[\w\s]+>/g,function(e){return"(?:"+r[e].trim()+")"});return r[e]}({"":"\\d+(?:/\\d+)|(?:\\d+(?:\\.\\d*)?|\\.\\d+)(?:e[+-]?\\d+)?","":"[+-]?|[+-](?:inf|nan)\\.0","":"[+-](?:|(?:inf|nan)\\.0)?i","":"(?:@|)?|","":"(?:#d(?:#[ei])?|#[ei](?:#d)?)?","":"[0-9a-f]+(?:/[0-9a-f]+)?","":"[+-]?|[+-](?:inf|nan)\\.0","":"[+-](?:|(?:inf|nan)\\.0)?i","":"(?:@|)?|","":"#[box](?:#[ei])?|(?:#[ei])?#[box]","":"(^|[()\\[\\]\\s])(?:|)(?=[()\\[\\]\\s]|$)"}),"i"),lookbehind:!0},boolean:{pattern:/(^|[()\[\]\s])#(?:[ft]|false|true)(?=[()\[\]\s]|$)/,lookbehind:!0},function:{pattern:/((?:^|[^'`#])[(\[])(?:[^|()\[\]'\s]+|\|(?:[^\\|]|\\.)*\|)(?=[()\[\]\s]|$)/,lookbehind:!0},identifier:{pattern:/(^|[()\[\]\s])\|(?:[^\\|]|\\.)*\|(?=[()\[\]\s]|$)/,lookbehind:!0,greedy:!0},punctuation:/[()\[\]']/}; \ No newline at end of file diff --git a/components/prism-scss.js b/components/prism-scss.js index b2d499e0ad..0cff128584 100644 --- a/components/prism-scss.js +++ b/components/prism-scss.js @@ -41,7 +41,7 @@ Prism.languages.scss = Prism.languages.extend('css', { Prism.languages.insertBefore('scss', 'atrule', { 'keyword': [ - /@(?:if|else(?: if)?|forward|for|each|while|import|use|extend|debug|warn|mixin|include|function|return|content)\b/i, + /@(?:content|debug|each|else(?: if)?|extend|for|forward|function|if|import|include|mixin|return|use|warn|while)\b/i, { pattern: /( )(?:from|through)(?= )/, lookbehind: true @@ -56,7 +56,7 @@ Prism.languages.insertBefore('scss', 'important', { Prism.languages.insertBefore('scss', 'function', { 'module-modifier': { - pattern: /\b(?:as|with|show|hide)\b/i, + pattern: /\b(?:as|hide|show|with)\b/i, alias: 'keyword' }, 'placeholder': { @@ -67,13 +67,13 @@ Prism.languages.insertBefore('scss', 'function', { pattern: /\B!(?:default|optional)\b/i, alias: 'keyword' }, - 'boolean': /\b(?:true|false)\b/, + 'boolean': /\b(?:false|true)\b/, 'null': { pattern: /\bnull\b/, alias: 'keyword' }, 'operator': { - pattern: /(\s)(?:[-+*\/%]|[=!]=|<=?|>=?|and|or|not)(?=\s)/, + pattern: /(\s)(?:[-+*\/%]|[=!]=|<=?|>=?|and|not|or)(?=\s)/, lookbehind: true } }); diff --git a/components/prism-scss.min.js b/components/prism-scss.min.js index f6ac9d35fb..26ca277666 100644 --- a/components/prism-scss.min.js +++ b/components/prism-scss.min.js @@ -1 +1 @@ -Prism.languages.scss=Prism.languages.extend("css",{comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0},atrule:{pattern:/@[\w-](?:\([^()]+\)|[^()\s]|\s+(?!\s))*?(?=\s+[{;])/,inside:{rule:/@[\w-]+/}},url:/(?:[-a-z]+-)?url(?=\()/i,selector:{pattern:/(?=\S)[^@;{}()]?(?:[^@;{}()\s]|\s+(?!\s)|#\{\$[-\w]+\})+(?=\s*\{(?:\}|\s|[^}][^:{}]*[:{][^}]))/m,inside:{parent:{pattern:/&/,alias:"important"},placeholder:/%[-\w]+/,variable:/\$[-\w]+|#\{\$[-\w]+\}/}},property:{pattern:/(?:[-\w]|\$[-\w]|#\{\$[-\w]+\})+(?=\s*:)/,inside:{variable:/\$[-\w]+|#\{\$[-\w]+\}/}}}),Prism.languages.insertBefore("scss","atrule",{keyword:[/@(?:if|else(?: if)?|forward|for|each|while|import|use|extend|debug|warn|mixin|include|function|return|content)\b/i,{pattern:/( )(?:from|through)(?= )/,lookbehind:!0}]}),Prism.languages.insertBefore("scss","important",{variable:/\$[-\w]+|#\{\$[-\w]+\}/}),Prism.languages.insertBefore("scss","function",{"module-modifier":{pattern:/\b(?:as|with|show|hide)\b/i,alias:"keyword"},placeholder:{pattern:/%[-\w]+/,alias:"selector"},statement:{pattern:/\B!(?:default|optional)\b/i,alias:"keyword"},boolean:/\b(?:true|false)\b/,null:{pattern:/\bnull\b/,alias:"keyword"},operator:{pattern:/(\s)(?:[-+*\/%]|[=!]=|<=?|>=?|and|or|not)(?=\s)/,lookbehind:!0}}),Prism.languages.scss.atrule.inside.rest=Prism.languages.scss; \ No newline at end of file +Prism.languages.scss=Prism.languages.extend("css",{comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0},atrule:{pattern:/@[\w-](?:\([^()]+\)|[^()\s]|\s+(?!\s))*?(?=\s+[{;])/,inside:{rule:/@[\w-]+/}},url:/(?:[-a-z]+-)?url(?=\()/i,selector:{pattern:/(?=\S)[^@;{}()]?(?:[^@;{}()\s]|\s+(?!\s)|#\{\$[-\w]+\})+(?=\s*\{(?:\}|\s|[^}][^:{}]*[:{][^}]))/m,inside:{parent:{pattern:/&/,alias:"important"},placeholder:/%[-\w]+/,variable:/\$[-\w]+|#\{\$[-\w]+\}/}},property:{pattern:/(?:[-\w]|\$[-\w]|#\{\$[-\w]+\})+(?=\s*:)/,inside:{variable:/\$[-\w]+|#\{\$[-\w]+\}/}}}),Prism.languages.insertBefore("scss","atrule",{keyword:[/@(?:content|debug|each|else(?: if)?|extend|for|forward|function|if|import|include|mixin|return|use|warn|while)\b/i,{pattern:/( )(?:from|through)(?= )/,lookbehind:!0}]}),Prism.languages.insertBefore("scss","important",{variable:/\$[-\w]+|#\{\$[-\w]+\}/}),Prism.languages.insertBefore("scss","function",{"module-modifier":{pattern:/\b(?:as|hide|show|with)\b/i,alias:"keyword"},placeholder:{pattern:/%[-\w]+/,alias:"selector"},statement:{pattern:/\B!(?:default|optional)\b/i,alias:"keyword"},boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"},operator:{pattern:/(\s)(?:[-+*\/%]|[=!]=|<=?|>=?|and|not|or)(?=\s)/,lookbehind:!0}}),Prism.languages.scss.atrule.inside.rest=Prism.languages.scss; \ No newline at end of file diff --git a/components/prism-smali.js b/components/prism-smali.js index 2907f43773..ebf43d7ea5 100644 --- a/components/prism-smali.js +++ b/components/prism-smali.js @@ -68,7 +68,7 @@ Prism.languages.smali = { }, 'boolean': { - pattern: /(^|[^\w.-])(?:true|false)(?![\w.-])/, + pattern: /(^|[^\w.-])(?:false|true)(?![\w.-])/, lookbehind: true }, 'number': { diff --git a/components/prism-smali.min.js b/components/prism-smali.min.js index 6642d4f949..771f976b7a 100644 --- a/components/prism-smali.min.js +++ b/components/prism-smali.min.js @@ -1 +1 @@ -Prism.languages.smali={comment:/#.*/,string:{pattern:/"(?:[^\r\n\\"]|\\.)*"|'(?:[^\r\n\\']|\\(?:.|u[\da-fA-F]{4}))'/,greedy:!0},"class-name":{pattern:/(^|[^L])L(?:(?:\w+|`[^`\r\n]*`)\/)*(?:[\w$]+|`[^`\r\n]*`)(?=\s*;)/,lookbehind:!0,inside:{"class-name":{pattern:/(^L|\/)(?:[\w$]+|`[^`\r\n]*`)$/,lookbehind:!0},namespace:{pattern:/^(L)(?:(?:\w+|`[^`\r\n]*`)\/)+/,lookbehind:!0,inside:{punctuation:/\//}},builtin:/^L/}},builtin:[{pattern:/([();\[])[BCDFIJSVZ]+/,lookbehind:!0},{pattern:/([\w$>]:)[BCDFIJSVZ]/,lookbehind:!0}],keyword:[{pattern:/(\.end\s+)[\w-]+/,lookbehind:!0},{pattern:/(^|[^\w.-])\.(?!\d)[\w-]+/,lookbehind:!0},{pattern:/(^|[^\w.-])(?:abstract|annotation|bridge|constructor|enum|final|interface|private|protected|public|runtime|static|synthetic|system|transient)(?![\w.-])/,lookbehind:!0}],function:{pattern:/(^|[^\w.-])(?:\w+|<[\w$-]+>)(?=\()/,lookbehind:!0},field:{pattern:/[\w$]+(?=:)/,alias:"variable"},register:{pattern:/(^|[^\w.-])[vp]\d(?![\w.-])/,lookbehind:!0,alias:"variable"},boolean:{pattern:/(^|[^\w.-])(?:true|false)(?![\w.-])/,lookbehind:!0},number:{pattern:/(^|[^/\w.-])-?(?:NAN|INFINITY|0x(?:[\dA-F]+(?:\.[\dA-F]*)?|\.[\dA-F]+)(?:p[+-]?[\dA-F]+)?|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?)[dflst]?(?![\w.-])/i,lookbehind:!0},label:{pattern:/(:)\w+/,lookbehind:!0,alias:"property"},operator:/->|\.\.|[\[=]/,punctuation:/[{}(),;:]/}; \ No newline at end of file +Prism.languages.smali={comment:/#.*/,string:{pattern:/"(?:[^\r\n\\"]|\\.)*"|'(?:[^\r\n\\']|\\(?:.|u[\da-fA-F]{4}))'/,greedy:!0},"class-name":{pattern:/(^|[^L])L(?:(?:\w+|`[^`\r\n]*`)\/)*(?:[\w$]+|`[^`\r\n]*`)(?=\s*;)/,lookbehind:!0,inside:{"class-name":{pattern:/(^L|\/)(?:[\w$]+|`[^`\r\n]*`)$/,lookbehind:!0},namespace:{pattern:/^(L)(?:(?:\w+|`[^`\r\n]*`)\/)+/,lookbehind:!0,inside:{punctuation:/\//}},builtin:/^L/}},builtin:[{pattern:/([();\[])[BCDFIJSVZ]+/,lookbehind:!0},{pattern:/([\w$>]:)[BCDFIJSVZ]/,lookbehind:!0}],keyword:[{pattern:/(\.end\s+)[\w-]+/,lookbehind:!0},{pattern:/(^|[^\w.-])\.(?!\d)[\w-]+/,lookbehind:!0},{pattern:/(^|[^\w.-])(?:abstract|annotation|bridge|constructor|enum|final|interface|private|protected|public|runtime|static|synthetic|system|transient)(?![\w.-])/,lookbehind:!0}],function:{pattern:/(^|[^\w.-])(?:\w+|<[\w$-]+>)(?=\()/,lookbehind:!0},field:{pattern:/[\w$]+(?=:)/,alias:"variable"},register:{pattern:/(^|[^\w.-])[vp]\d(?![\w.-])/,lookbehind:!0,alias:"variable"},boolean:{pattern:/(^|[^\w.-])(?:false|true)(?![\w.-])/,lookbehind:!0},number:{pattern:/(^|[^/\w.-])-?(?:NAN|INFINITY|0x(?:[\dA-F]+(?:\.[\dA-F]*)?|\.[\dA-F]+)(?:p[+-]?[\dA-F]+)?|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?)[dflst]?(?![\w.-])/i,lookbehind:!0},label:{pattern:/(:)\w+/,lookbehind:!0,alias:"property"},operator:/->|\.\.|[\[=]/,punctuation:/[{}(),;:]/}; \ No newline at end of file diff --git a/components/prism-smalltalk.js b/components/prism-smalltalk.js index 84ef05bfc1..aa71e36fa2 100644 --- a/components/prism-smalltalk.js +++ b/components/prism-smalltalk.js @@ -21,7 +21,7 @@ Prism.languages.smalltalk = { 'punctuation': /\|/ } }, - 'keyword': /\b(?:nil|true|false|self|super|new)\b/, + 'keyword': /\b(?:false|new|nil|self|super|true)\b/, 'number': [ /\d+r-?[\dA-Z]+(?:\.[\dA-Z]+)?(?:e-?\d+)?/, /\b\d+(?:\.\d+)?(?:e-?\d+)?/ diff --git a/components/prism-smalltalk.min.js b/components/prism-smalltalk.min.js index a8ff98badb..0eb0e73d2d 100644 --- a/components/prism-smalltalk.min.js +++ b/components/prism-smalltalk.min.js @@ -1 +1 @@ -Prism.languages.smalltalk={comment:/"(?:""|[^"])*"/,character:{pattern:/\$./,alias:"string"},string:/'(?:''|[^'])*'/,symbol:/#[\da-z]+|#(?:-|([+\/\\*~<>=@%|&?!])\1?)|#(?=\()/i,"block-arguments":{pattern:/(\[\s*):[^\[|]*\|/,lookbehind:!0,inside:{variable:/:[\da-z]+/i,punctuation:/\|/}},"temporary-variables":{pattern:/\|[^|]+\|/,inside:{variable:/[\da-z]+/i,punctuation:/\|/}},keyword:/\b(?:nil|true|false|self|super|new)\b/,number:[/\d+r-?[\dA-Z]+(?:\.[\dA-Z]+)?(?:e-?\d+)?/,/\b\d+(?:\.\d+)?(?:e-?\d+)?/],operator:/[<=]=?|:=|~[~=]|\/\/?|\\\\|>[>=]?|[!^+\-*&|,@]/,punctuation:/[.;:?\[\](){}]/}; \ No newline at end of file +Prism.languages.smalltalk={comment:/"(?:""|[^"])*"/,character:{pattern:/\$./,alias:"string"},string:/'(?:''|[^'])*'/,symbol:/#[\da-z]+|#(?:-|([+\/\\*~<>=@%|&?!])\1?)|#(?=\()/i,"block-arguments":{pattern:/(\[\s*):[^\[|]*\|/,lookbehind:!0,inside:{variable:/:[\da-z]+/i,punctuation:/\|/}},"temporary-variables":{pattern:/\|[^|]+\|/,inside:{variable:/[\da-z]+/i,punctuation:/\|/}},keyword:/\b(?:false|new|nil|self|super|true)\b/,number:[/\d+r-?[\dA-Z]+(?:\.[\dA-Z]+)?(?:e-?\d+)?/,/\b\d+(?:\.\d+)?(?:e-?\d+)?/],operator:/[<=]=?|:=|~[~=]|\/\/?|\\\\|>[>=]?|[!^+\-*&|,@]/,punctuation:/[.;:?\[\](){}]/}; \ No newline at end of file diff --git a/components/prism-smarty.js b/components/prism-smarty.js index 7743004eac..92f48d7f5e 100644 --- a/components/prism-smarty.js +++ b/components/prism-smarty.js @@ -50,9 +50,9 @@ 'operator': [ /[+\-*\/%]|==?=?|[!<>]=?|&&|\|\|?/, /\bis\s+(?:not\s+)?(?:div|even|odd)(?:\s+by)?\b/, - /\b(?:eq|neq?|gt|lt|gt?e|lt?e|not|mod|or|and)\b/ + /\b(?:and|eq|gt?e|gt|lt?e|lt|mod|neq?|not|or)\b/ ], - 'keyword': /\b(?:false|off|on|no|true|yes)\b/ + 'keyword': /\b(?:false|no|off|on|true|yes)\b/ }; // Tokenize all inline Smarty expressions diff --git a/components/prism-smarty.min.js b/components/prism-smarty.min.js index c49aa3af67..3edf84c006 100644 --- a/components/prism-smarty.min.js +++ b/components/prism-smarty.min.js @@ -1 +1 @@ -!function(n){n.languages.smarty={comment:/\{\*[\s\S]*?\*\}/,delimiter:{pattern:/^\{|\}$/i,alias:"punctuation"},string:/(["'])(?:\\.|(?!\1)[^\\\r\n])*\1/,number:/\b0x[\dA-Fa-f]+|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee][-+]?\d+)?/,variable:[/\$(?!\d)\w+/,/#(?!\d)\w+#/,{pattern:/(\.|->)(?!\d)\w+/,lookbehind:!0},{pattern:/(\[)(?!\d)\w+(?=\])/,lookbehind:!0}],function:[{pattern:/(\|\s*)@?(?!\d)\w+/,lookbehind:!0},/^\/?(?!\d)\w+/,/(?!\d)\w+(?=\()/],"attr-name":{pattern:/\w+\s*=\s*(?:(?!\d)\w+)?/,inside:{variable:{pattern:/(=\s*)(?!\d)\w+/,lookbehind:!0},operator:/=/}},punctuation:[/[\[\]().,:`]|->/],operator:[/[+\-*\/%]|==?=?|[!<>]=?|&&|\|\|?/,/\bis\s+(?:not\s+)?(?:div|even|odd)(?:\s+by)?\b/,/\b(?:eq|neq?|gt|lt|gt?e|lt?e|not|mod|or|and)\b/],keyword:/\b(?:false|off|on|no|true|yes)\b/},n.hooks.add("before-tokenize",function(e){var t=!1;n.languages["markup-templating"].buildPlaceholders(e,"smarty",/\{\*[\s\S]*?\*\}|\{[\s\S]+?\}/g,function(e){return"{/literal}"===e&&(t=!1),!t&&("{literal}"===e&&(t=!0),!0)})}),n.hooks.add("after-tokenize",function(e){n.languages["markup-templating"].tokenizePlaceholders(e,"smarty")})}(Prism); \ No newline at end of file +!function(n){n.languages.smarty={comment:/\{\*[\s\S]*?\*\}/,delimiter:{pattern:/^\{|\}$/i,alias:"punctuation"},string:/(["'])(?:\\.|(?!\1)[^\\\r\n])*\1/,number:/\b0x[\dA-Fa-f]+|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee][-+]?\d+)?/,variable:[/\$(?!\d)\w+/,/#(?!\d)\w+#/,{pattern:/(\.|->)(?!\d)\w+/,lookbehind:!0},{pattern:/(\[)(?!\d)\w+(?=\])/,lookbehind:!0}],function:[{pattern:/(\|\s*)@?(?!\d)\w+/,lookbehind:!0},/^\/?(?!\d)\w+/,/(?!\d)\w+(?=\()/],"attr-name":{pattern:/\w+\s*=\s*(?:(?!\d)\w+)?/,inside:{variable:{pattern:/(=\s*)(?!\d)\w+/,lookbehind:!0},operator:/=/}},punctuation:[/[\[\]().,:`]|->/],operator:[/[+\-*\/%]|==?=?|[!<>]=?|&&|\|\|?/,/\bis\s+(?:not\s+)?(?:div|even|odd)(?:\s+by)?\b/,/\b(?:and|eq|gt?e|gt|lt?e|lt|mod|neq?|not|or)\b/],keyword:/\b(?:false|no|off|on|true|yes)\b/},n.hooks.add("before-tokenize",function(e){var t=!1;n.languages["markup-templating"].buildPlaceholders(e,"smarty",/\{\*[\s\S]*?\*\}|\{[\s\S]+?\}/g,function(e){return"{/literal}"===e&&(t=!1),!t&&("{literal}"===e&&(t=!0),!0)})}),n.hooks.add("after-tokenize",function(e){n.languages["markup-templating"].tokenizePlaceholders(e,"smarty")})}(Prism); \ No newline at end of file diff --git a/components/prism-solidity.js b/components/prism-solidity.js index ee541bdea9..73f9b91e7f 100644 --- a/components/prism-solidity.js +++ b/components/prism-solidity.js @@ -8,7 +8,7 @@ Prism.languages.solidity = Prism.languages.extend('clike', { }); Prism.languages.insertBefore('solidity', 'keyword', { - 'builtin': /\b(?:address|bool|string|u?int(?:8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?|byte|bytes(?:[1-9]|[12]\d|3[0-2])?)\b/ + 'builtin': /\b(?:address|bool|byte|u?int(?:8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?|string|bytes(?:[1-9]|[12]\d|3[0-2])?)\b/ }); Prism.languages.insertBefore('solidity', 'number', { diff --git a/components/prism-solidity.min.js b/components/prism-solidity.min.js index 08d7d42358..104f413ce9 100644 --- a/components/prism-solidity.min.js +++ b/components/prism-solidity.min.js @@ -1 +1 @@ -Prism.languages.solidity=Prism.languages.extend("clike",{"class-name":{pattern:/(\b(?:contract|enum|interface|library|new|struct|using)\s+)(?!\d)[\w$]+/,lookbehind:!0},keyword:/\b(?:_|anonymous|as|assembly|assert|break|calldata|case|constant|constructor|continue|contract|default|delete|do|else|emit|enum|event|external|for|from|function|if|import|indexed|inherited|interface|internal|is|let|library|mapping|memory|modifier|new|payable|pragma|private|public|pure|require|returns?|revert|selfdestruct|solidity|storage|struct|suicide|switch|this|throw|using|var|view|while)\b/,operator:/=>|->|:=|=:|\*\*|\+\+|--|\|\||&&|<<=?|>>=?|[-+*/%^&|<>!=]=?|[~?]/}),Prism.languages.insertBefore("solidity","keyword",{builtin:/\b(?:address|bool|string|u?int(?:8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?|byte|bytes(?:[1-9]|[12]\d|3[0-2])?)\b/}),Prism.languages.insertBefore("solidity","number",{version:{pattern:/([<>]=?|\^)\d+\.\d+\.\d+\b/,lookbehind:!0,alias:"number"}}),Prism.languages.sol=Prism.languages.solidity; \ No newline at end of file +Prism.languages.solidity=Prism.languages.extend("clike",{"class-name":{pattern:/(\b(?:contract|enum|interface|library|new|struct|using)\s+)(?!\d)[\w$]+/,lookbehind:!0},keyword:/\b(?:_|anonymous|as|assembly|assert|break|calldata|case|constant|constructor|continue|contract|default|delete|do|else|emit|enum|event|external|for|from|function|if|import|indexed|inherited|interface|internal|is|let|library|mapping|memory|modifier|new|payable|pragma|private|public|pure|require|returns?|revert|selfdestruct|solidity|storage|struct|suicide|switch|this|throw|using|var|view|while)\b/,operator:/=>|->|:=|=:|\*\*|\+\+|--|\|\||&&|<<=?|>>=?|[-+*/%^&|<>!=]=?|[~?]/}),Prism.languages.insertBefore("solidity","keyword",{builtin:/\b(?:address|bool|byte|u?int(?:8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?|string|bytes(?:[1-9]|[12]\d|3[0-2])?)\b/}),Prism.languages.insertBefore("solidity","number",{version:{pattern:/([<>]=?|\^)\d+\.\d+\.\d+\b/,lookbehind:!0,alias:"number"}}),Prism.languages.sol=Prism.languages.solidity; \ No newline at end of file diff --git a/components/prism-soy.js b/components/prism-soy.js index 35ebb97b13..54abe34c61 100644 --- a/components/prism-soy.js +++ b/components/prism-soy.js @@ -29,7 +29,7 @@ pattern: /(\{+\/?[^\S\r\n]*)(?:\\[nrt]|alias|call|case|css|default|delcall|delpackage|deltemplate|else(?:if)?|fallbackmsg|for(?:each)?|if(?:empty)?|lb|let|literal|msg|namespace|nil|@?param\??|rb|sp|switch|template|xid)/, lookbehind: true }, - /\b(?:any|as|attributes|bool|css|float|in|int|js|html|list|map|null|number|string|uri)\b/ + /\b(?:any|as|attributes|bool|css|float|html|in|int|js|list|map|null|number|string|uri)\b/ ], 'delimiter': { pattern: /^\{+\/?|\/?\}+$/, @@ -58,7 +58,7 @@ lookbehind: true } ], - 'boolean': /\b(?:true|false)\b/, + 'boolean': /\b(?:false|true)\b/, 'number': numberPattern, 'operator': /\?:?|<=?|>=?|==?|!=|[+*/%-]|\b(?:and|not|or)\b/, 'punctuation': /[{}()\[\]|.,:]/ diff --git a/components/prism-soy.min.js b/components/prism-soy.min.js index 6540237c62..76c1ab6978 100644 --- a/components/prism-soy.min.js +++ b/components/prism-soy.min.js @@ -1 +1 @@ -!function(t){var e=/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,a=/\b\d+(?:\.\d+)?(?:[eE][+-]?\d+)?\b|\b0x[\dA-F]+\b/;t.languages.soy={comment:[/\/\*[\s\S]*?\*\//,{pattern:/(\s)\/\/.*/,lookbehind:!0,greedy:!0}],"command-arg":{pattern:/(\{+\/?\s*(?:alias|call|delcall|delpackage|deltemplate|namespace|template)\s+)\.?[\w.]+/,lookbehind:!0,alias:"string",inside:{punctuation:/\./}},parameter:{pattern:/(\{+\/?\s*@?param\??\s+)\.?[\w.]+/,lookbehind:!0,alias:"variable"},keyword:[{pattern:/(\{+\/?[^\S\r\n]*)(?:\\[nrt]|alias|call|case|css|default|delcall|delpackage|deltemplate|else(?:if)?|fallbackmsg|for(?:each)?|if(?:empty)?|lb|let|literal|msg|namespace|nil|@?param\??|rb|sp|switch|template|xid)/,lookbehind:!0},/\b(?:any|as|attributes|bool|css|float|in|int|js|html|list|map|null|number|string|uri)\b/],delimiter:{pattern:/^\{+\/?|\/?\}+$/,alias:"punctuation"},property:/\w+(?==)/,variable:{pattern:/\$[^\W\d]\w*(?:\??(?:\.\w+|\[[^\]]+\]))*/,inside:{string:{pattern:e,greedy:!0},number:a,punctuation:/[\[\].?]/}},string:{pattern:e,greedy:!0},function:[/\w+(?=\()/,{pattern:/(\|[^\S\r\n]*)\w+/,lookbehind:!0}],boolean:/\b(?:true|false)\b/,number:a,operator:/\?:?|<=?|>=?|==?|!=|[+*/%-]|\b(?:and|not|or)\b/,punctuation:/[{}()\[\]|.,:]/},t.hooks.add("before-tokenize",function(e){var a=!1;t.languages["markup-templating"].buildPlaceholders(e,"soy",/\{\{.+?\}\}|\{.+?\}|\s\/\/.*|\/\*[\s\S]*?\*\//g,function(e){return"{/literal}"===e&&(a=!1),!a&&("{literal}"===e&&(a=!0),!0)})}),t.hooks.add("after-tokenize",function(e){t.languages["markup-templating"].tokenizePlaceholders(e,"soy")})}(Prism); \ No newline at end of file +!function(t){var e=/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,a=/\b\d+(?:\.\d+)?(?:[eE][+-]?\d+)?\b|\b0x[\dA-F]+\b/;t.languages.soy={comment:[/\/\*[\s\S]*?\*\//,{pattern:/(\s)\/\/.*/,lookbehind:!0,greedy:!0}],"command-arg":{pattern:/(\{+\/?\s*(?:alias|call|delcall|delpackage|deltemplate|namespace|template)\s+)\.?[\w.]+/,lookbehind:!0,alias:"string",inside:{punctuation:/\./}},parameter:{pattern:/(\{+\/?\s*@?param\??\s+)\.?[\w.]+/,lookbehind:!0,alias:"variable"},keyword:[{pattern:/(\{+\/?[^\S\r\n]*)(?:\\[nrt]|alias|call|case|css|default|delcall|delpackage|deltemplate|else(?:if)?|fallbackmsg|for(?:each)?|if(?:empty)?|lb|let|literal|msg|namespace|nil|@?param\??|rb|sp|switch|template|xid)/,lookbehind:!0},/\b(?:any|as|attributes|bool|css|float|html|in|int|js|list|map|null|number|string|uri)\b/],delimiter:{pattern:/^\{+\/?|\/?\}+$/,alias:"punctuation"},property:/\w+(?==)/,variable:{pattern:/\$[^\W\d]\w*(?:\??(?:\.\w+|\[[^\]]+\]))*/,inside:{string:{pattern:e,greedy:!0},number:a,punctuation:/[\[\].?]/}},string:{pattern:e,greedy:!0},function:[/\w+(?=\()/,{pattern:/(\|[^\S\r\n]*)\w+/,lookbehind:!0}],boolean:/\b(?:false|true)\b/,number:a,operator:/\?:?|<=?|>=?|==?|!=|[+*/%-]|\b(?:and|not|or)\b/,punctuation:/[{}()\[\]|.,:]/},t.hooks.add("before-tokenize",function(e){var a=!1;t.languages["markup-templating"].buildPlaceholders(e,"soy",/\{\{.+?\}\}|\{.+?\}|\s\/\/.*|\/\*[\s\S]*?\*\//g,function(e){return"{/literal}"===e&&(a=!1),!a&&("{literal}"===e&&(a=!0),!0)})}),t.hooks.add("after-tokenize",function(e){t.languages["markup-templating"].tokenizePlaceholders(e,"soy")})}(Prism); \ No newline at end of file diff --git a/components/prism-sparql.js b/components/prism-sparql.js index 7e72285711..370b0ef24f 100644 --- a/components/prism-sparql.js +++ b/components/prism-sparql.js @@ -1,5 +1,5 @@ Prism.languages.sparql = Prism.languages.extend('turtle', { - 'boolean': /\b(?:true|false)\b/i, + 'boolean': /\b(?:false|true)\b/i, 'variable': { pattern: /[?$]\w+/, greedy: true @@ -10,8 +10,8 @@ Prism.languages.sparql = Prism.languages.extend('turtle', { Prism.languages.insertBefore('sparql', 'punctuation', { 'keyword': [ /\b(?:A|ADD|ALL|AS|ASC|ASK|BNODE|BY|CLEAR|CONSTRUCT|COPY|CREATE|DATA|DEFAULT|DELETE|DESC|DESCRIBE|DISTINCT|DROP|EXISTS|FILTER|FROM|GROUP|HAVING|INSERT|INTO|LIMIT|LOAD|MINUS|MOVE|NAMED|NOT|NOW|OFFSET|OPTIONAL|ORDER|RAND|REDUCED|SELECT|SEPARATOR|SERVICE|SILENT|STRUUID|UNION|USING|UUID|VALUES|WHERE)\b/i, - /\b(?:ABS|AVG|BIND|BOUND|CEIL|COALESCE|CONCAT|CONTAINS|COUNT|DATATYPE|DAY|ENCODE_FOR_URI|FLOOR|GROUP_CONCAT|HOURS|IF|IRI|isBLANK|isIRI|isLITERAL|isNUMERIC|isURI|LANG|LANGMATCHES|LCASE|MAX|MD5|MIN|MINUTES|MONTH|ROUND|REGEX|REPLACE|sameTerm|SAMPLE|SECONDS|SHA1|SHA256|SHA384|SHA512|STR|STRAFTER|STRBEFORE|STRDT|STRENDS|STRLANG|STRLEN|STRSTARTS|SUBSTR|SUM|TIMEZONE|TZ|UCASE|URI|YEAR)\b(?=\s*\()/i, - /\b(?:GRAPH|BASE|PREFIX)\b/i + /\b(?:ABS|AVG|BIND|BOUND|CEIL|COALESCE|CONCAT|CONTAINS|COUNT|DATATYPE|DAY|ENCODE_FOR_URI|FLOOR|GROUP_CONCAT|HOURS|IF|IRI|isBLANK|isIRI|isLITERAL|isNUMERIC|isURI|LANG|LANGMATCHES|LCASE|MAX|MD5|MIN|MINUTES|MONTH|REGEX|REPLACE|ROUND|sameTerm|SAMPLE|SECONDS|SHA1|SHA256|SHA384|SHA512|STR|STRAFTER|STRBEFORE|STRDT|STRENDS|STRLANG|STRLEN|STRSTARTS|SUBSTR|SUM|TIMEZONE|TZ|UCASE|URI|YEAR)\b(?=\s*\()/i, + /\b(?:BASE|GRAPH|PREFIX)\b/i ] }); diff --git a/components/prism-sparql.min.js b/components/prism-sparql.min.js index 3e06b76be2..fd5a7c6bb4 100644 --- a/components/prism-sparql.min.js +++ b/components/prism-sparql.min.js @@ -1 +1 @@ -Prism.languages.sparql=Prism.languages.extend("turtle",{boolean:/\b(?:true|false)\b/i,variable:{pattern:/[?$]\w+/,greedy:!0}}),Prism.languages.insertBefore("sparql","punctuation",{keyword:[/\b(?:A|ADD|ALL|AS|ASC|ASK|BNODE|BY|CLEAR|CONSTRUCT|COPY|CREATE|DATA|DEFAULT|DELETE|DESC|DESCRIBE|DISTINCT|DROP|EXISTS|FILTER|FROM|GROUP|HAVING|INSERT|INTO|LIMIT|LOAD|MINUS|MOVE|NAMED|NOT|NOW|OFFSET|OPTIONAL|ORDER|RAND|REDUCED|SELECT|SEPARATOR|SERVICE|SILENT|STRUUID|UNION|USING|UUID|VALUES|WHERE)\b/i,/\b(?:ABS|AVG|BIND|BOUND|CEIL|COALESCE|CONCAT|CONTAINS|COUNT|DATATYPE|DAY|ENCODE_FOR_URI|FLOOR|GROUP_CONCAT|HOURS|IF|IRI|isBLANK|isIRI|isLITERAL|isNUMERIC|isURI|LANG|LANGMATCHES|LCASE|MAX|MD5|MIN|MINUTES|MONTH|ROUND|REGEX|REPLACE|sameTerm|SAMPLE|SECONDS|SHA1|SHA256|SHA384|SHA512|STR|STRAFTER|STRBEFORE|STRDT|STRENDS|STRLANG|STRLEN|STRSTARTS|SUBSTR|SUM|TIMEZONE|TZ|UCASE|URI|YEAR)\b(?=\s*\()/i,/\b(?:GRAPH|BASE|PREFIX)\b/i]}),Prism.languages.rq=Prism.languages.sparql; \ No newline at end of file +Prism.languages.sparql=Prism.languages.extend("turtle",{boolean:/\b(?:false|true)\b/i,variable:{pattern:/[?$]\w+/,greedy:!0}}),Prism.languages.insertBefore("sparql","punctuation",{keyword:[/\b(?:A|ADD|ALL|AS|ASC|ASK|BNODE|BY|CLEAR|CONSTRUCT|COPY|CREATE|DATA|DEFAULT|DELETE|DESC|DESCRIBE|DISTINCT|DROP|EXISTS|FILTER|FROM|GROUP|HAVING|INSERT|INTO|LIMIT|LOAD|MINUS|MOVE|NAMED|NOT|NOW|OFFSET|OPTIONAL|ORDER|RAND|REDUCED|SELECT|SEPARATOR|SERVICE|SILENT|STRUUID|UNION|USING|UUID|VALUES|WHERE)\b/i,/\b(?:ABS|AVG|BIND|BOUND|CEIL|COALESCE|CONCAT|CONTAINS|COUNT|DATATYPE|DAY|ENCODE_FOR_URI|FLOOR|GROUP_CONCAT|HOURS|IF|IRI|isBLANK|isIRI|isLITERAL|isNUMERIC|isURI|LANG|LANGMATCHES|LCASE|MAX|MD5|MIN|MINUTES|MONTH|REGEX|REPLACE|ROUND|sameTerm|SAMPLE|SECONDS|SHA1|SHA256|SHA384|SHA512|STR|STRAFTER|STRBEFORE|STRDT|STRENDS|STRLANG|STRLEN|STRSTARTS|SUBSTR|SUM|TIMEZONE|TZ|UCASE|URI|YEAR)\b(?=\s*\()/i,/\b(?:BASE|GRAPH|PREFIX)\b/i]}),Prism.languages.rq=Prism.languages.sparql; \ No newline at end of file diff --git a/components/prism-sqf.js b/components/prism-sqf.js index d024a42833..583d2383a0 100644 --- a/components/prism-sqf.js +++ b/components/prism-sqf.js @@ -3,13 +3,13 @@ Prism.languages.sqf = Prism.languages.extend('clike', { pattern: /"(?:(?:"")?[^"])*"(?!")|'(?:[^'])*'/, greedy: true }, - 'keyword': /\b(?:breakOut|breakTo|call|case|catch|default|do|echo|else|execVM|execFSM|exitWith|for|forEach|forEachMember|forEachMemberAgent|forEachMemberTeam|from|goto|if|nil|preprocessFile|preprocessFileLineNumbers|private|scopeName|spawn|step|switch|then|throw|to|try|while|with)\b/i, - 'boolean': /\b(?:true|false)\b/i, + 'keyword': /\b(?:breakOut|breakTo|call|case|catch|default|do|echo|else|execFSM|execVM|exitWith|for|forEach|forEachMember|forEachMemberAgent|forEachMemberTeam|from|goto|if|nil|preprocessFile|preprocessFileLineNumbers|private|scopeName|spawn|step|switch|then|throw|to|try|while|with)\b/i, + 'boolean': /\b(?:false|true)\b/i, 'function': /\b(?:abs|accTime|acos|action|actionIDs|actionKeys|actionKeysImages|actionKeysNames|actionKeysNamesArray|actionName|actionParams|activateAddons|activatedAddons|activateKey|add3DENConnection|add3DENEventHandler|add3DENLayer|addAction|addBackpack|addBackpackCargo|addBackpackCargoGlobal|addBackpackGlobal|addCamShake|addCuratorAddons|addCuratorCameraArea|addCuratorEditableObjects|addCuratorEditingArea|addCuratorPoints|addEditorObject|addEventHandler|addForce|addForceGeneratorRTD|addGoggles|addGroupIcon|addHandgunItem|addHeadgear|addItem|addItemCargo|addItemCargoGlobal|addItemPool|addItemToBackpack|addItemToUniform|addItemToVest|addLiveStats|addMagazine|addMagazineAmmoCargo|addMagazineCargo|addMagazineCargoGlobal|addMagazineGlobal|addMagazinePool|addMagazines|addMagazineTurret|addMenu|addMenuItem|addMissionEventHandler|addMPEventHandler|addMusicEventHandler|addOwnedMine|addPlayerScores|addPrimaryWeaponItem|addPublicVariableEventHandler|addRating|addResources|addScore|addScoreSide|addSecondaryWeaponItem|addSwitchableUnit|addTeamMember|addToRemainsCollector|addTorque|addUniform|addVehicle|addVest|addWaypoint|addWeapon|addWeaponCargo|addWeaponCargoGlobal|addWeaponGlobal|addWeaponItem|addWeaponPool|addWeaponTurret|admin|agent|agents|AGLToASL|aimedAtTarget|aimPos|airDensityCurveRTD|airDensityRTD|airplaneThrottle|airportSide|AISFinishHeal|alive|all3DENEntities|allAirports|allControls|allCurators|allCutLayers|allDead|allDeadMen|allDisplays|allGroups|allMapMarkers|allMines|allMissionObjects|allow3DMode|allowCrewInImmobile|allowCuratorLogicIgnoreAreas|allowDamage|allowDammage|allowFileOperations|allowFleeing|allowGetIn|allowSprint|allPlayers|allSimpleObjects|allSites|allTurrets|allUnits|allUnitsUAV|allVariables|ammo|ammoOnPylon|animate|animateBay|animateDoor|animatePylon|animateSource|animationNames|animationPhase|animationSourcePhase|animationState|append|apply|armoryPoints|arrayIntersect|asin|ASLToAGL|ASLToATL|assert|assignAsCargo|assignAsCargoIndex|assignAsCommander|assignAsDriver|assignAsGunner|assignAsTurret|assignCurator|assignedCargo|assignedCommander|assignedDriver|assignedGunner|assignedItems|assignedTarget|assignedTeam|assignedVehicle|assignedVehicleRole|assignItem|assignTeam|assignToAirport|atan|atan2|atg|ATLToASL|attachedObject|attachedObjects|attachedTo|attachObject|attachTo|attackEnabled|backpack|backpackCargo|backpackContainer|backpackItems|backpackMagazines|backpackSpaceFor|behaviour|benchmark|binocular|blufor|boundingBox|boundingBoxReal|boundingCenter|briefingName|buildingExit|buildingPos|buldozer_EnableRoadDiag|buldozer_IsEnabledRoadDiag|buldozer_LoadNewRoads|buldozer_reloadOperMap|buttonAction|buttonSetAction|cadetMode|callExtension|camCommand|camCommit|camCommitPrepared|camCommitted|camConstuctionSetParams|camCreate|camDestroy|cameraEffect|cameraEffectEnableHUD|cameraInterest|cameraOn|cameraView|campaignConfigFile|camPreload|camPreloaded|camPrepareBank|camPrepareDir|camPrepareDive|camPrepareFocus|camPrepareFov|camPrepareFovRange|camPreparePos|camPrepareRelPos|camPrepareTarget|camSetBank|camSetDir|camSetDive|camSetFocus|camSetFov|camSetFovRange|camSetPos|camSetRelPos|camSetTarget|camTarget|camUseNVG|canAdd|canAddItemToBackpack|canAddItemToUniform|canAddItemToVest|cancelSimpleTaskDestination|canFire|canMove|canSlingLoad|canStand|canSuspend|canTriggerDynamicSimulation|canUnloadInCombat|canVehicleCargo|captive|captiveNum|cbChecked|cbSetChecked|ceil|channelEnabled|cheatsEnabled|checkAIFeature|checkVisibility|civilian|className|clear3DENAttribute|clear3DENInventory|clearAllItemsFromBackpack|clearBackpackCargo|clearBackpackCargoGlobal|clearForcesRTD|clearGroupIcons|clearItemCargo|clearItemCargoGlobal|clearItemPool|clearMagazineCargo|clearMagazineCargoGlobal|clearMagazinePool|clearOverlay|clearRadio|clearVehicleInit|clearWeaponCargo|clearWeaponCargoGlobal|clearWeaponPool|clientOwner|closeDialog|closeDisplay|closeOverlay|collapseObjectTree|collect3DENHistory|collectiveRTD|combatMode|commandArtilleryFire|commandChat|commander|commandFire|commandFollow|commandFSM|commandGetOut|commandingMenu|commandMove|commandRadio|commandStop|commandSuppressiveFire|commandTarget|commandWatch|comment|commitOverlay|compile|compileFinal|completedFSM|composeText|configClasses|configFile|configHierarchy|configName|configNull|configProperties|configSourceAddonList|configSourceMod|configSourceModList|confirmSensorTarget|connectTerminalToUAV|controlNull|controlsGroupCtrl|copyFromClipboard|copyToClipboard|copyWaypoints|cos|count|countEnemy|countFriendly|countSide|countType|countUnknown|create3DENComposition|create3DENEntity|createAgent|createCenter|createDialog|createDiaryLink|createDiaryRecord|createDiarySubject|createDisplay|createGearDialog|createGroup|createGuardedPoint|createLocation|createMarker|createMarkerLocal|createMenu|createMine|createMissionDisplay|createMPCampaignDisplay|createSimpleObject|createSimpleTask|createSite|createSoundSource|createTask|createTeam|createTrigger|createUnit|createVehicle|createVehicleCrew|createVehicleLocal|crew|ctAddHeader|ctAddRow|ctClear|ctCurSel|ctData|ctFindHeaderRows|ctFindRowHeader|ctHeaderControls|ctHeaderCount|ctRemoveHeaders|ctRemoveRows|ctrlActivate|ctrlAddEventHandler|ctrlAngle|ctrlAutoScrollDelay|ctrlAutoScrollRewind|ctrlAutoScrollSpeed|ctrlChecked|ctrlClassName|ctrlCommit|ctrlCommitted|ctrlCreate|ctrlDelete|ctrlEnable|ctrlEnabled|ctrlFade|ctrlHTMLLoaded|ctrlIDC|ctrlIDD|ctrlMapAnimAdd|ctrlMapAnimClear|ctrlMapAnimCommit|ctrlMapAnimDone|ctrlMapCursor|ctrlMapMouseOver|ctrlMapScale|ctrlMapScreenToWorld|ctrlMapWorldToScreen|ctrlModel|ctrlModelDirAndUp|ctrlModelScale|ctrlParent|ctrlParentControlsGroup|ctrlPosition|ctrlRemoveAllEventHandlers|ctrlRemoveEventHandler|ctrlScale|ctrlSetActiveColor|ctrlSetAngle|ctrlSetAutoScrollDelay|ctrlSetAutoScrollRewind|ctrlSetAutoScrollSpeed|ctrlSetBackgroundColor|ctrlSetChecked|ctrlSetDisabledColor|ctrlSetEventHandler|ctrlSetFade|ctrlSetFocus|ctrlSetFont|ctrlSetFontH1|ctrlSetFontH1B|ctrlSetFontH2|ctrlSetFontH2B|ctrlSetFontH3|ctrlSetFontH3B|ctrlSetFontH4|ctrlSetFontH4B|ctrlSetFontH5|ctrlSetFontH5B|ctrlSetFontH6|ctrlSetFontH6B|ctrlSetFontHeight|ctrlSetFontHeightH1|ctrlSetFontHeightH2|ctrlSetFontHeightH3|ctrlSetFontHeightH4|ctrlSetFontHeightH5|ctrlSetFontHeightH6|ctrlSetFontHeightSecondary|ctrlSetFontP|ctrlSetFontPB|ctrlSetFontSecondary|ctrlSetForegroundColor|ctrlSetModel|ctrlSetModelDirAndUp|ctrlSetModelScale|ctrlSetPixelPrecision|ctrlSetPosition|ctrlSetScale|ctrlSetStructuredText|ctrlSetText|ctrlSetTextColor|ctrlSetTextColorSecondary|ctrlSetTextSecondary|ctrlSetTooltip|ctrlSetTooltipColorBox|ctrlSetTooltipColorShade|ctrlSetTooltipColorText|ctrlShow|ctrlShown|ctrlText|ctrlTextHeight|ctrlTextSecondary|ctrlTextWidth|ctrlType|ctrlVisible|ctRowControls|ctRowCount|ctSetCurSel|ctSetData|ctSetHeaderTemplate|ctSetRowTemplate|ctSetValue|ctValue|curatorAddons|curatorCamera|curatorCameraArea|curatorCameraAreaCeiling|curatorCoef|curatorEditableObjects|curatorEditingArea|curatorEditingAreaType|curatorMouseOver|curatorPoints|curatorRegisteredObjects|curatorSelected|curatorWaypointCost|current3DENOperation|currentChannel|currentCommand|currentMagazine|currentMagazineDetail|currentMagazineDetailTurret|currentMagazineTurret|currentMuzzle|currentNamespace|currentTask|currentTasks|currentThrowable|currentVisionMode|currentWaypoint|currentWeapon|currentWeaponMode|currentWeaponTurret|currentZeroing|cursorObject|cursorTarget|customChat|customRadio|cutFadeOut|cutObj|cutRsc|cutText|damage|date|dateToNumber|daytime|deActivateKey|debriefingText|debugFSM|debugLog|deg|delete3DENEntities|deleteAt|deleteCenter|deleteCollection|deleteEditorObject|deleteGroup|deleteGroupWhenEmpty|deleteIdentity|deleteLocation|deleteMarker|deleteMarkerLocal|deleteRange|deleteResources|deleteSite|deleteStatus|deleteTeam|deleteVehicle|deleteVehicleCrew|deleteWaypoint|detach|detectedMines|diag_activeMissionFSMs|diag_activeScripts|diag_activeSQFScripts|diag_activeSQSScripts|diag_captureFrame|diag_captureFrameToFile|diag_captureSlowFrame|diag_codePerformance|diag_drawMode|diag_dynamicSimulationEnd|diag_enable|diag_enabled|diag_fps|diag_fpsMin|diag_frameNo|diag_lightNewLoad|diag_list|diag_log|diag_logSlowFrame|diag_mergeConfigFile|diag_recordTurretLimits|diag_setLightNew|diag_tickTime|diag_toggle|dialog|diarySubjectExists|didJIP|didJIPOwner|difficulty|difficultyEnabled|difficultyEnabledRTD|difficultyOption|direction|directSay|disableAI|disableCollisionWith|disableConversation|disableDebriefingStats|disableMapIndicators|disableNVGEquipment|disableRemoteSensors|disableSerialization|disableTIEquipment|disableUAVConnectability|disableUserInput|displayAddEventHandler|displayCtrl|displayNull|displayParent|displayRemoveAllEventHandlers|displayRemoveEventHandler|displaySetEventHandler|dissolveTeam|distance|distance2D|distanceSqr|distributionRegion|do3DENAction|doArtilleryFire|doFire|doFollow|doFSM|doGetOut|doMove|doorPhase|doStop|doSuppressiveFire|doTarget|doWatch|drawArrow|drawEllipse|drawIcon|drawIcon3D|drawLine|drawLine3D|drawLink|drawLocation|drawPolygon|drawRectangle|drawTriangle|driver|drop|dynamicSimulationDistance|dynamicSimulationDistanceCoef|dynamicSimulationEnabled|dynamicSimulationSystemEnabled|east|edit3DENMissionAttributes|editObject|editorSetEventHandler|effectiveCommander|emptyPositions|enableAI|enableAIFeature|enableAimPrecision|enableAttack|enableAudioFeature|enableAutoStartUpRTD|enableAutoTrimRTD|enableCamShake|enableCaustics|enableChannel|enableCollisionWith|enableCopilot|enableDebriefingStats|enableDiagLegend|enableDynamicSimulation|enableDynamicSimulationSystem|enableEndDialog|enableEngineArtillery|enableEnvironment|enableFatigue|enableGunLights|enableInfoPanelComponent|enableIRLasers|enableMimics|enablePersonTurret|enableRadio|enableReload|enableRopeAttach|enableSatNormalOnDetail|enableSaving|enableSentences|enableSimulation|enableSimulationGlobal|enableStamina|enableStressDamage|enableTeamSwitch|enableTraffic|enableUAVConnectability|enableUAVWaypoints|enableVehicleCargo|enableVehicleSensor|enableWeaponDisassembly|endl|endLoadingScreen|endMission|engineOn|enginesIsOnRTD|enginesPowerRTD|enginesRpmRTD|enginesTorqueRTD|entities|environmentEnabled|estimatedEndServerTime|estimatedTimeLeft|evalObjectArgument|everyBackpack|everyContainer|exec|execEditorScript|exp|expectedDestination|exportJIPMessages|eyeDirection|eyePos|face|faction|fadeMusic|fadeRadio|fadeSound|fadeSpeech|failMission|fillWeaponsFromPool|find|findCover|findDisplay|findEditorObject|findEmptyPosition|findEmptyPositionReady|findIf|findNearestEnemy|finishMissionInit|finite|fire|fireAtTarget|firstBackpack|flag|flagAnimationPhase|flagOwner|flagSide|flagTexture|fleeing|floor|flyInHeight|flyInHeightASL|fog|fogForecast|fogParams|forceAddUniform|forceAtPositionRTD|forcedMap|forceEnd|forceFlagTexture|forceFollowRoad|forceGeneratorRTD|forceMap|forceRespawn|forceSpeed|forceWalk|forceWeaponFire|forceWeatherChange|forgetTarget|format|formation|formationDirection|formationLeader|formationMembers|formationPosition|formationTask|formatText|formLeader|freeLook|fromEditor|fuel|fullCrew|gearIDCAmmoCount|gearSlotAmmoCount|gearSlotData|get3DENActionState|get3DENAttribute|get3DENCamera|get3DENConnections|get3DENEntity|get3DENEntityID|get3DENGrid|get3DENIconsVisible|get3DENLayerEntities|get3DENLinesVisible|get3DENMissionAttribute|get3DENMouseOver|get3DENSelected|getAimingCoef|getAllEnvSoundControllers|getAllHitPointsDamage|getAllOwnedMines|getAllSoundControllers|getAmmoCargo|getAnimAimPrecision|getAnimSpeedCoef|getArray|getArtilleryAmmo|getArtilleryComputerSettings|getArtilleryETA|getAssignedCuratorLogic|getAssignedCuratorUnit|getBackpackCargo|getBleedingRemaining|getBurningValue|getCameraViewDirection|getCargoIndex|getCenterOfMass|getClientState|getClientStateNumber|getCompatiblePylonMagazines|getConnectedUAV|getContainerMaxLoad|getCursorObjectParams|getCustomAimCoef|getDammage|getDescription|getDir|getDirVisual|getDLCAssetsUsage|getDLCAssetsUsageByName|getDLCs|getDLCUsageTime|getEditorCamera|getEditorMode|getEditorObjectScope|getElevationOffset|getEngineTargetRpmRTD|getEnvSoundController|getFatigue|getFieldManualStartPage|getForcedFlagTexture|getFriend|getFSMVariable|getFuelCargo|getGroupIcon|getGroupIconParams|getGroupIcons|getHideFrom|getHit|getHitIndex|getHitPointDamage|getItemCargo|getMagazineCargo|getMarkerColor|getMarkerPos|getMarkerSize|getMarkerType|getMass|getMissionConfig|getMissionConfigValue|getMissionDLCs|getMissionLayerEntities|getMissionLayers|getModelInfo|getMousePosition|getMusicPlayedTime|getNumber|getObjectArgument|getObjectChildren|getObjectDLC|getObjectMaterials|getObjectProxy|getObjectTextures|getObjectType|getObjectViewDistance|getOxygenRemaining|getPersonUsedDLCs|getPilotCameraDirection|getPilotCameraPosition|getPilotCameraRotation|getPilotCameraTarget|getPlateNumber|getPlayerChannel|getPlayerScores|getPlayerUID|getPlayerUIDOld|getPos|getPosASL|getPosASLVisual|getPosASLW|getPosATL|getPosATLVisual|getPosVisual|getPosWorld|getPylonMagazines|getRelDir|getRelPos|getRemoteSensorsDisabled|getRepairCargo|getResolution|getRotorBrakeRTD|getShadowDistance|getShotParents|getSlingLoad|getSoundController|getSoundControllerResult|getSpeed|getStamina|getStatValue|getSuppression|getTerrainGrid|getTerrainHeightASL|getText|getTotalDLCUsageTime|getTrimOffsetRTD|getUnitLoadout|getUnitTrait|getUserMFDText|getUserMFDValue|getVariable|getVehicleCargo|getWeaponCargo|getWeaponSway|getWingsOrientationRTD|getWingsPositionRTD|getWPPos|glanceAt|globalChat|globalRadio|goggles|group|groupChat|groupFromNetId|groupIconSelectable|groupIconsVisible|groupId|groupOwner|groupRadio|groupSelectedUnits|groupSelectUnit|grpNull|gunner|gusts|halt|handgunItems|handgunMagazine|handgunWeapon|handsHit|hasInterface|hasPilotCamera|hasWeapon|hcAllGroups|hcGroupParams|hcLeader|hcRemoveAllGroups|hcRemoveGroup|hcSelected|hcSelectGroup|hcSetGroup|hcShowBar|hcShownBar|headgear|hideBody|hideObject|hideObjectGlobal|hideSelection|hint|hintC|hintCadet|hintSilent|hmd|hostMission|htmlLoad|HUDMovementLevels|humidity|image|importAllGroups|importance|in|inArea|inAreaArray|incapacitatedState|independent|inflame|inflamed|infoPanel|infoPanelComponentEnabled|infoPanelComponents|infoPanels|inGameUISetEventHandler|inheritsFrom|initAmbientLife|inPolygon|inputAction|inRangeOfArtillery|insertEditorObject|intersect|is3DEN|is3DENMultiplayer|isAbleToBreathe|isAgent|isAimPrecisionEnabled|isArray|isAutoHoverOn|isAutonomous|isAutoStartUpEnabledRTD|isAutotest|isAutoTrimOnRTD|isBleeding|isBurning|isClass|isCollisionLightOn|isCopilotEnabled|isDamageAllowed|isDedicated|isDLCAvailable|isEngineOn|isEqualTo|isEqualType|isEqualTypeAll|isEqualTypeAny|isEqualTypeArray|isEqualTypeParams|isFilePatchingEnabled|isFlashlightOn|isFlatEmpty|isForcedWalk|isFormationLeader|isGroupDeletedWhenEmpty|isHidden|isInRemainsCollector|isInstructorFigureEnabled|isIRLaserOn|isKeyActive|isKindOf|isLaserOn|isLightOn|isLocalized|isManualFire|isMarkedForCollection|isMultiplayer|isMultiplayerSolo|isNil|isNull|isNumber|isObjectHidden|isObjectRTD|isOnRoad|isPipEnabled|isPlayer|isRealTime|isRemoteExecuted|isRemoteExecutedJIP|isServer|isShowing3DIcons|isSimpleObject|isSprintAllowed|isStaminaEnabled|isSteamMission|isStreamFriendlyUIEnabled|isStressDamageEnabled|isText|isTouchingGround|isTurnedOut|isTutHintsEnabled|isUAVConnectable|isUAVConnected|isUIContext|isUniformAllowed|isVehicleCargo|isVehicleRadarOn|isVehicleSensorEnabled|isWalking|isWeaponDeployed|isWeaponRested|itemCargo|items|itemsWithMagazines|join|joinAs|joinAsSilent|joinSilent|joinString|kbAddDatabase|kbAddDatabaseTargets|kbAddTopic|kbHasTopic|kbReact|kbRemoveTopic|kbTell|kbWasSaid|keyImage|keyName|knowsAbout|land|landAt|landResult|language|laserTarget|lbAdd|lbClear|lbColor|lbColorRight|lbCurSel|lbData|lbDelete|lbIsSelected|lbPicture|lbPictureRight|lbSelection|lbSetColor|lbSetColorRight|lbSetCurSel|lbSetData|lbSetPicture|lbSetPictureColor|lbSetPictureColorDisabled|lbSetPictureColorSelected|lbSetPictureRight|lbSetPictureRightColor|lbSetPictureRightColorDisabled|lbSetPictureRightColorSelected|lbSetSelectColor|lbSetSelectColorRight|lbSetSelected|lbSetText|lbSetTextRight|lbSetTooltip|lbSetValue|lbSize|lbSort|lbSortByValue|lbText|lbTextRight|lbValue|leader|leaderboardDeInit|leaderboardGetRows|leaderboardInit|leaderboardRequestRowsFriends|leaderboardRequestRowsGlobal|leaderboardRequestRowsGlobalAroundUser|leaderboardsRequestUploadScore|leaderboardsRequestUploadScoreKeepBest|leaderboardState|leaveVehicle|libraryCredits|libraryDisclaimers|lifeState|lightAttachObject|lightDetachObject|lightIsOn|lightnings|limitSpeed|linearConversion|lineBreak|lineIntersects|lineIntersectsObjs|lineIntersectsSurfaces|lineIntersectsWith|linkItem|list|listObjects|listRemoteTargets|listVehicleSensors|ln|lnbAddArray|lnbAddColumn|lnbAddRow|lnbClear|lnbColor|lnbColorRight|lnbCurSelRow|lnbData|lnbDeleteColumn|lnbDeleteRow|lnbGetColumnsPosition|lnbPicture|lnbPictureRight|lnbSetColor|lnbSetColorRight|lnbSetColumnsPos|lnbSetCurSelRow|lnbSetData|lnbSetPicture|lnbSetPictureColor|lnbSetPictureColorRight|lnbSetPictureColorSelected|lnbSetPictureColorSelectedRight|lnbSetPictureRight|lnbSetText|lnbSetTextRight|lnbSetValue|lnbSize|lnbSort|lnbSortByValue|lnbText|lnbTextRight|lnbValue|load|loadAbs|loadBackpack|loadFile|loadGame|loadIdentity|loadMagazine|loadOverlay|loadStatus|loadUniform|loadVest|local|localize|locationNull|locationPosition|lock|lockCameraTo|lockCargo|lockDriver|locked|lockedCargo|lockedDriver|lockedTurret|lockIdentity|lockTurret|lockWP|log|logEntities|logNetwork|logNetworkTerminate|lookAt|lookAtPos|magazineCargo|magazines|magazinesAllTurrets|magazinesAmmo|magazinesAmmoCargo|magazinesAmmoFull|magazinesDetail|magazinesDetailBackpack|magazinesDetailUniform|magazinesDetailVest|magazinesTurret|magazineTurretAmmo|mapAnimAdd|mapAnimClear|mapAnimCommit|mapAnimDone|mapCenterOnCamera|mapGridPosition|markAsFinishedOnSteam|markerAlpha|markerBrush|markerColor|markerDir|markerPos|markerShape|markerSize|markerText|markerType|max|members|menuAction|menuAdd|menuChecked|menuClear|menuCollapse|menuData|menuDelete|menuEnable|menuEnabled|menuExpand|menuHover|menuPicture|menuSetAction|menuSetCheck|menuSetData|menuSetPicture|menuSetValue|menuShortcut|menuShortcutText|menuSize|menuSort|menuText|menuURL|menuValue|min|mineActive|mineDetectedBy|missionConfigFile|missionDifficulty|missionName|missionNamespace|missionStart|missionVersion|modelToWorld|modelToWorldVisual|modelToWorldVisualWorld|modelToWorldWorld|modParams|moonIntensity|moonPhase|morale|move|move3DENCamera|moveInAny|moveInCargo|moveInCommander|moveInDriver|moveInGunner|moveInTurret|moveObjectToEnd|moveOut|moveTime|moveTo|moveToCompleted|moveToFailed|musicVolume|name|nameSound|nearEntities|nearestBuilding|nearestLocation|nearestLocations|nearestLocationWithDubbing|nearestObject|nearestObjects|nearestTerrainObjects|nearObjects|nearObjectsReady|nearRoads|nearSupplies|nearTargets|needReload|netId|netObjNull|newOverlay|nextMenuItemIndex|nextWeatherChange|nMenuItems|numberOfEnginesRTD|numberToDate|objectCurators|objectFromNetId|objectParent|objNull|objStatus|onBriefingGear|onBriefingGroup|onBriefingNotes|onBriefingPlan|onBriefingTeamSwitch|onCommandModeChanged|onDoubleClick|onEachFrame|onGroupIconClick|onGroupIconOverEnter|onGroupIconOverLeave|onHCGroupSelectionChanged|onMapSingleClick|onPlayerConnected|onPlayerDisconnected|onPreloadFinished|onPreloadStarted|onShowNewObject|onTeamSwitch|openCuratorInterface|openDLCPage|openDSInterface|openMap|openSteamApp|openYoutubeVideo|opfor|orderGetIn|overcast|overcastForecast|owner|param|params|parseNumber|parseSimpleArray|parseText|parsingNamespace|particlesQuality|pi|pickWeaponPool|pitch|pixelGrid|pixelGridBase|pixelGridNoUIScale|pixelH|pixelW|playableSlotsNumber|playableUnits|playAction|playActionNow|player|playerRespawnTime|playerSide|playersNumber|playGesture|playMission|playMove|playMoveNow|playMusic|playScriptedMission|playSound|playSound3D|position|positionCameraToWorld|posScreenToWorld|posWorldToScreen|ppEffectAdjust|ppEffectCommit|ppEffectCommitted|ppEffectCreate|ppEffectDestroy|ppEffectEnable|ppEffectEnabled|ppEffectForceInNVG|precision|preloadCamera|preloadObject|preloadSound|preloadTitleObj|preloadTitleRsc|primaryWeapon|primaryWeaponItems|primaryWeaponMagazine|priority|processDiaryLink|processInitCommands|productVersion|profileName|profileNamespace|profileNameSteam|progressLoadingScreen|progressPosition|progressSetPosition|publicVariable|publicVariableClient|publicVariableServer|pushBack|pushBackUnique|putWeaponPool|queryItemsPool|queryMagazinePool|queryWeaponPool|rad|radioChannelAdd|radioChannelCreate|radioChannelRemove|radioChannelSetCallSign|radioChannelSetLabel|radioVolume|rain|rainbow|random|rank|rankId|rating|rectangular|registeredTasks|registerTask|reload|reloadEnabled|remoteControl|remoteExec|remoteExecCall|remoteExecutedOwner|remove3DENConnection|remove3DENEventHandler|remove3DENLayer|removeAction|removeAll3DENEventHandlers|removeAllActions|removeAllAssignedItems|removeAllContainers|removeAllCuratorAddons|removeAllCuratorCameraAreas|removeAllCuratorEditingAreas|removeAllEventHandlers|removeAllHandgunItems|removeAllItems|removeAllItemsWithMagazines|removeAllMissionEventHandlers|removeAllMPEventHandlers|removeAllMusicEventHandlers|removeAllOwnedMines|removeAllPrimaryWeaponItems|removeAllWeapons|removeBackpack|removeBackpackGlobal|removeCuratorAddons|removeCuratorCameraArea|removeCuratorEditableObjects|removeCuratorEditingArea|removeDrawIcon|removeDrawLinks|removeEventHandler|removeFromRemainsCollector|removeGoggles|removeGroupIcon|removeHandgunItem|removeHeadgear|removeItem|removeItemFromBackpack|removeItemFromUniform|removeItemFromVest|removeItems|removeMagazine|removeMagazineGlobal|removeMagazines|removeMagazinesTurret|removeMagazineTurret|removeMenuItem|removeMissionEventHandler|removeMPEventHandler|removeMusicEventHandler|removeOwnedMine|removePrimaryWeaponItem|removeSecondaryWeaponItem|removeSimpleTask|removeSwitchableUnit|removeTeamMember|removeUniform|removeVest|removeWeapon|removeWeaponAttachmentCargo|removeWeaponCargo|removeWeaponGlobal|removeWeaponTurret|reportRemoteTarget|requiredVersion|resetCamShake|resetSubgroupDirection|resistance|resize|resources|respawnVehicle|restartEditorCamera|reveal|revealMine|reverse|reversedMouseY|roadAt|roadsConnectedTo|roleDescription|ropeAttachedObjects|ropeAttachedTo|ropeAttachEnabled|ropeAttachTo|ropeCreate|ropeCut|ropeDestroy|ropeDetach|ropeEndPosition|ropeLength|ropes|ropeUnwind|ropeUnwound|rotorsForcesRTD|rotorsRpmRTD|round|runInitScript|safeZoneH|safeZoneW|safeZoneWAbs|safeZoneX|safeZoneXAbs|safeZoneY|save3DENInventory|saveGame|saveIdentity|saveJoysticks|saveOverlay|saveProfileNamespace|saveStatus|saveVar|savingEnabled|say|say2D|say3D|score|scoreSide|screenshot|screenToWorld|scriptDone|scriptName|scriptNull|scudState|secondaryWeapon|secondaryWeaponItems|secondaryWeaponMagazine|select|selectBestPlaces|selectDiarySubject|selectedEditorObjects|selectEditorObject|selectionNames|selectionPosition|selectLeader|selectMax|selectMin|selectNoPlayer|selectPlayer|selectRandom|selectRandomWeighted|selectWeapon|selectWeaponTurret|sendAUMessage|sendSimpleCommand|sendTask|sendTaskResult|sendUDPMessage|serverCommand|serverCommandAvailable|serverCommandExecutable|serverName|serverTime|set|set3DENAttribute|set3DENAttributes|set3DENGrid|set3DENIconsVisible|set3DENLayer|set3DENLinesVisible|set3DENLogicType|set3DENMissionAttribute|set3DENMissionAttributes|set3DENModelsVisible|set3DENObjectType|set3DENSelected|setAccTime|setActualCollectiveRTD|setAirplaneThrottle|setAirportSide|setAmmo|setAmmoCargo|setAmmoOnPylon|setAnimSpeedCoef|setAperture|setApertureNew|setArmoryPoints|setAttributes|setAutonomous|setBehaviour|setBleedingRemaining|setBrakesRTD|setCameraInterest|setCamShakeDefParams|setCamShakeParams|setCamUseTI|setCaptive|setCenterOfMass|setCollisionLight|setCombatMode|setCompassOscillation|setConvoySeparation|setCuratorCameraAreaCeiling|setCuratorCoef|setCuratorEditingAreaType|setCuratorWaypointCost|setCurrentChannel|setCurrentTask|setCurrentWaypoint|setCustomAimCoef|setCustomWeightRTD|setDamage|setDammage|setDate|setDebriefingText|setDefaultCamera|setDestination|setDetailMapBlendPars|setDir|setDirection|setDrawIcon|setDriveOnPath|setDropInterval|setDynamicSimulationDistance|setDynamicSimulationDistanceCoef|setEditorMode|setEditorObjectScope|setEffectCondition|setEngineRpmRTD|setFace|setFaceAnimation|setFatigue|setFeatureType|setFlagAnimationPhase|setFlagOwner|setFlagSide|setFlagTexture|setFog|setForceGeneratorRTD|setFormation|setFormationTask|setFormDir|setFriend|setFromEditor|setFSMVariable|setFuel|setFuelCargo|setGroupIcon|setGroupIconParams|setGroupIconsSelectable|setGroupIconsVisible|setGroupId|setGroupIdGlobal|setGroupOwner|setGusts|setHideBehind|setHit|setHitIndex|setHitPointDamage|setHorizonParallaxCoef|setHUDMovementLevels|setIdentity|setImportance|setInfoPanel|setLeader|setLightAmbient|setLightAttenuation|setLightBrightness|setLightColor|setLightDayLight|setLightFlareMaxDistance|setLightFlareSize|setLightIntensity|setLightnings|setLightUseFlare|setLocalWindParams|setMagazineTurretAmmo|setMarkerAlpha|setMarkerAlphaLocal|setMarkerBrush|setMarkerBrushLocal|setMarkerColor|setMarkerColorLocal|setMarkerDir|setMarkerDirLocal|setMarkerPos|setMarkerPosLocal|setMarkerShape|setMarkerShapeLocal|setMarkerSize|setMarkerSizeLocal|setMarkerText|setMarkerTextLocal|setMarkerType|setMarkerTypeLocal|setMass|setMimic|setMousePosition|setMusicEffect|setMusicEventHandler|setName|setNameSound|setObjectArguments|setObjectMaterial|setObjectMaterialGlobal|setObjectProxy|setObjectTexture|setObjectTextureGlobal|setObjectViewDistance|setOvercast|setOwner|setOxygenRemaining|setParticleCircle|setParticleClass|setParticleFire|setParticleParams|setParticleRandom|setPilotCameraDirection|setPilotCameraRotation|setPilotCameraTarget|setPilotLight|setPiPEffect|setPitch|setPlateNumber|setPlayable|setPlayerRespawnTime|setPos|setPosASL|setPosASL2|setPosASLW|setPosATL|setPosition|setPosWorld|setPylonLoadOut|setPylonsPriority|setRadioMsg|setRain|setRainbow|setRandomLip|setRank|setRectangular|setRepairCargo|setRotorBrakeRTD|setShadowDistance|setShotParents|setSide|setSimpleTaskAlwaysVisible|setSimpleTaskCustomData|setSimpleTaskDescription|setSimpleTaskDestination|setSimpleTaskTarget|setSimpleTaskType|setSimulWeatherLayers|setSize|setSkill|setSlingLoad|setSoundEffect|setSpeaker|setSpeech|setSpeedMode|setStamina|setStaminaScheme|setStatValue|setSuppression|setSystemOfUnits|setTargetAge|setTaskMarkerOffset|setTaskResult|setTaskState|setTerrainGrid|setText|setTimeMultiplier|setTitleEffect|setToneMapping|setToneMappingParams|setTrafficDensity|setTrafficDistance|setTrafficGap|setTrafficSpeed|setTriggerActivation|setTriggerArea|setTriggerStatements|setTriggerText|setTriggerTimeout|setTriggerType|setType|setUnconscious|setUnitAbility|setUnitLoadout|setUnitPos|setUnitPosWeak|setUnitRank|setUnitRecoilCoefficient|setUnitTrait|setUnloadInCombat|setUserActionText|setUserMFDText|setUserMFDValue|setVariable|setVectorDir|setVectorDirAndUp|setVectorUp|setVehicleAmmo|setVehicleAmmoDef|setVehicleArmor|setVehicleCargo|setVehicleId|setVehicleInit|setVehicleLock|setVehiclePosition|setVehicleRadar|setVehicleReceiveRemoteTargets|setVehicleReportOwnPosition|setVehicleReportRemoteTargets|setVehicleTIPars|setVehicleVarName|setVelocity|setVelocityModelSpace|setVelocityTransformation|setViewDistance|setVisibleIfTreeCollapsed|setWantedRpmRTD|setWaves|setWaypointBehaviour|setWaypointCombatMode|setWaypointCompletionRadius|setWaypointDescription|setWaypointForceBehaviour|setWaypointFormation|setWaypointHousePosition|setWaypointLoiterRadius|setWaypointLoiterType|setWaypointName|setWaypointPosition|setWaypointScript|setWaypointSpeed|setWaypointStatements|setWaypointTimeout|setWaypointType|setWaypointVisible|setWeaponReloadingTime|setWind|setWindDir|setWindForce|setWindStr|setWingForceScaleRTD|setWPPos|show3DIcons|showChat|showCinemaBorder|showCommandingMenu|showCompass|showCuratorCompass|showGPS|showHUD|showLegend|showMap|shownArtilleryComputer|shownChat|shownCompass|shownCuratorCompass|showNewEditorObject|shownGPS|shownHUD|shownMap|shownPad|shownRadio|shownScoretable|shownUAVFeed|shownWarrant|shownWatch|showPad|showRadio|showScoretable|showSubtitles|showUAVFeed|showWarrant|showWatch|showWaypoint|showWaypoints|side|sideAmbientLife|sideChat|sideEmpty|sideEnemy|sideFriendly|sideLogic|sideRadio|sideUnknown|simpleTasks|simulationEnabled|simulCloudDensity|simulCloudOcclusion|simulInClouds|simulWeatherSync|sin|size|sizeOf|skill|skillFinal|skipTime|sleep|sliderPosition|sliderRange|sliderSetPosition|sliderSetRange|sliderSetSpeed|sliderSpeed|slingLoadAssistantShown|soldierMagazines|someAmmo|sort|soundVolume|speaker|speed|speedMode|splitString|sqrt|squadParams|stance|startLoadingScreen|stop|stopEngineRTD|stopped|str|sunOrMoon|supportInfo|suppressFor|surfaceIsWater|surfaceNormal|surfaceType|swimInDepth|switchableUnits|switchAction|switchCamera|switchGesture|switchLight|switchMove|synchronizedObjects|synchronizedTriggers|synchronizedWaypoints|synchronizeObjectsAdd|synchronizeObjectsRemove|synchronizeTrigger|synchronizeWaypoint|systemChat|systemOfUnits|tan|targetKnowledge|targets|targetsAggregate|targetsQuery|taskAlwaysVisible|taskChildren|taskCompleted|taskCustomData|taskDescription|taskDestination|taskHint|taskMarkerOffset|taskNull|taskParent|taskResult|taskState|taskType|teamMember|teamMemberNull|teamName|teams|teamSwitch|teamSwitchEnabled|teamType|terminate|terrainIntersect|terrainIntersectASL|terrainIntersectAtASL|text|textLog|textLogFormat|tg|time|timeMultiplier|titleCut|titleFadeOut|titleObj|titleRsc|titleText|toArray|toFixed|toLower|toString|toUpper|triggerActivated|triggerActivation|triggerArea|triggerAttachedVehicle|triggerAttachObject|triggerAttachVehicle|triggerDynamicSimulation|triggerStatements|triggerText|triggerTimeout|triggerTimeoutCurrent|triggerType|turretLocal|turretOwner|turretUnit|tvAdd|tvClear|tvCollapse|tvCollapseAll|tvCount|tvCurSel|tvData|tvDelete|tvExpand|tvExpandAll|tvPicture|tvPictureRight|tvSetColor|tvSetCurSel|tvSetData|tvSetPicture|tvSetPictureColor|tvSetPictureColorDisabled|tvSetPictureColorSelected|tvSetPictureRight|tvSetPictureRightColor|tvSetPictureRightColorDisabled|tvSetPictureRightColorSelected|tvSetSelectColor|tvSetText|tvSetTooltip|tvSetValue|tvSort|tvSortByValue|tvText|tvTooltip|tvValue|type|typeName|typeOf|UAVControl|uiNamespace|uiSleep|unassignCurator|unassignItem|unassignTeam|unassignVehicle|underwater|uniform|uniformContainer|uniformItems|uniformMagazines|unitAddons|unitAimPosition|unitAimPositionVisual|unitBackpack|unitIsUAV|unitPos|unitReady|unitRecoilCoefficient|units|unitsBelowHeight|unlinkItem|unlockAchievement|unregisterTask|updateDrawIcon|updateMenuItem|updateObjectTree|useAIOperMapObstructionTest|useAISteeringComponent|useAudioTimeForMoves|userInputDisabled|vectorAdd|vectorCos|vectorCrossProduct|vectorDiff|vectorDir|vectorDirVisual|vectorDistance|vectorDistanceSqr|vectorDotProduct|vectorFromTo|vectorMagnitude|vectorMagnitudeSqr|vectorModelToWorld|vectorModelToWorldVisual|vectorMultiply|vectorNormalized|vectorUp|vectorUpVisual|vectorWorldToModel|vectorWorldToModelVisual|vehicle|vehicleCargoEnabled|vehicleChat|vehicleRadio|vehicleReceiveRemoteTargets|vehicleReportOwnPosition|vehicleReportRemoteTargets|vehicles|vehicleVarName|velocity|velocityModelSpace|verifySignature|vest|vestContainer|vestItems|vestMagazines|viewDistance|visibleCompass|visibleGPS|visibleMap|visiblePosition|visiblePositionASL|visibleScoretable|visibleWatch|waitUntil|waves|waypointAttachedObject|waypointAttachedVehicle|waypointAttachObject|waypointAttachVehicle|waypointBehaviour|waypointCombatMode|waypointCompletionRadius|waypointDescription|waypointForceBehaviour|waypointFormation|waypointHousePosition|waypointLoiterRadius|waypointLoiterType|waypointName|waypointPosition|waypoints|waypointScript|waypointsEnabledUAV|waypointShow|waypointSpeed|waypointStatements|waypointTimeout|waypointTimeoutCurrent|waypointType|waypointVisible|weaponAccessories|weaponAccessoriesCargo|weaponCargo|weaponDirection|weaponInertia|weaponLowered|weapons|weaponsItems|weaponsItemsCargo|weaponState|weaponsTurret|weightRTD|west|WFSideText|wind|windDir|windRTD|windStr|wingsForcesRTD|worldName|worldSize|worldToModel|worldToModelVisual|worldToScreen)\b/i, 'number': /(?:\$|\b0x)[\da-f]+\b|(?:\B\.\d+|\b\d+(?:\.\d+)?)(?:e[+-]?\d+)?\b/i, 'operator': /##|>>|&&|\|\||[!=<>]=?|[-+*/%#^]|\b(?:and|mod|not|or)\b/i, 'magic-variable': { - pattern: /\b(?:_exception|_fnc_scriptName|_fnc_scriptNameParent|_forEachIndex|_this|_thisEventHandler|_thisFSM|_thisScript|_x|this|thisList|thisTrigger)\b/i, + pattern: /\b(?:this|thisList|thisTrigger|_exception|_fnc_scriptName|_fnc_scriptNameParent|_forEachIndex|_this|_thisEventHandler|_thisFSM|_thisScript|_x)\b/i, alias: 'keyword' }, 'constant': /\bDIK(?:_[a-z\d]+)+\b/i diff --git a/components/prism-sqf.min.js b/components/prism-sqf.min.js index 0d9fff8e4f..d4e731da8b 100644 --- a/components/prism-sqf.min.js +++ b/components/prism-sqf.min.js @@ -1 +1 @@ -Prism.languages.sqf=Prism.languages.extend("clike",{string:{pattern:/"(?:(?:"")?[^"])*"(?!")|'(?:[^'])*'/,greedy:!0},keyword:/\b(?:breakOut|breakTo|call|case|catch|default|do|echo|else|execVM|execFSM|exitWith|for|forEach|forEachMember|forEachMemberAgent|forEachMemberTeam|from|goto|if|nil|preprocessFile|preprocessFileLineNumbers|private|scopeName|spawn|step|switch|then|throw|to|try|while|with)\b/i,boolean:/\b(?:true|false)\b/i,function:/\b(?:abs|accTime|acos|action|actionIDs|actionKeys|actionKeysImages|actionKeysNames|actionKeysNamesArray|actionName|actionParams|activateAddons|activatedAddons|activateKey|add3DENConnection|add3DENEventHandler|add3DENLayer|addAction|addBackpack|addBackpackCargo|addBackpackCargoGlobal|addBackpackGlobal|addCamShake|addCuratorAddons|addCuratorCameraArea|addCuratorEditableObjects|addCuratorEditingArea|addCuratorPoints|addEditorObject|addEventHandler|addForce|addForceGeneratorRTD|addGoggles|addGroupIcon|addHandgunItem|addHeadgear|addItem|addItemCargo|addItemCargoGlobal|addItemPool|addItemToBackpack|addItemToUniform|addItemToVest|addLiveStats|addMagazine|addMagazineAmmoCargo|addMagazineCargo|addMagazineCargoGlobal|addMagazineGlobal|addMagazinePool|addMagazines|addMagazineTurret|addMenu|addMenuItem|addMissionEventHandler|addMPEventHandler|addMusicEventHandler|addOwnedMine|addPlayerScores|addPrimaryWeaponItem|addPublicVariableEventHandler|addRating|addResources|addScore|addScoreSide|addSecondaryWeaponItem|addSwitchableUnit|addTeamMember|addToRemainsCollector|addTorque|addUniform|addVehicle|addVest|addWaypoint|addWeapon|addWeaponCargo|addWeaponCargoGlobal|addWeaponGlobal|addWeaponItem|addWeaponPool|addWeaponTurret|admin|agent|agents|AGLToASL|aimedAtTarget|aimPos|airDensityCurveRTD|airDensityRTD|airplaneThrottle|airportSide|AISFinishHeal|alive|all3DENEntities|allAirports|allControls|allCurators|allCutLayers|allDead|allDeadMen|allDisplays|allGroups|allMapMarkers|allMines|allMissionObjects|allow3DMode|allowCrewInImmobile|allowCuratorLogicIgnoreAreas|allowDamage|allowDammage|allowFileOperations|allowFleeing|allowGetIn|allowSprint|allPlayers|allSimpleObjects|allSites|allTurrets|allUnits|allUnitsUAV|allVariables|ammo|ammoOnPylon|animate|animateBay|animateDoor|animatePylon|animateSource|animationNames|animationPhase|animationSourcePhase|animationState|append|apply|armoryPoints|arrayIntersect|asin|ASLToAGL|ASLToATL|assert|assignAsCargo|assignAsCargoIndex|assignAsCommander|assignAsDriver|assignAsGunner|assignAsTurret|assignCurator|assignedCargo|assignedCommander|assignedDriver|assignedGunner|assignedItems|assignedTarget|assignedTeam|assignedVehicle|assignedVehicleRole|assignItem|assignTeam|assignToAirport|atan|atan2|atg|ATLToASL|attachedObject|attachedObjects|attachedTo|attachObject|attachTo|attackEnabled|backpack|backpackCargo|backpackContainer|backpackItems|backpackMagazines|backpackSpaceFor|behaviour|benchmark|binocular|blufor|boundingBox|boundingBoxReal|boundingCenter|briefingName|buildingExit|buildingPos|buldozer_EnableRoadDiag|buldozer_IsEnabledRoadDiag|buldozer_LoadNewRoads|buldozer_reloadOperMap|buttonAction|buttonSetAction|cadetMode|callExtension|camCommand|camCommit|camCommitPrepared|camCommitted|camConstuctionSetParams|camCreate|camDestroy|cameraEffect|cameraEffectEnableHUD|cameraInterest|cameraOn|cameraView|campaignConfigFile|camPreload|camPreloaded|camPrepareBank|camPrepareDir|camPrepareDive|camPrepareFocus|camPrepareFov|camPrepareFovRange|camPreparePos|camPrepareRelPos|camPrepareTarget|camSetBank|camSetDir|camSetDive|camSetFocus|camSetFov|camSetFovRange|camSetPos|camSetRelPos|camSetTarget|camTarget|camUseNVG|canAdd|canAddItemToBackpack|canAddItemToUniform|canAddItemToVest|cancelSimpleTaskDestination|canFire|canMove|canSlingLoad|canStand|canSuspend|canTriggerDynamicSimulation|canUnloadInCombat|canVehicleCargo|captive|captiveNum|cbChecked|cbSetChecked|ceil|channelEnabled|cheatsEnabled|checkAIFeature|checkVisibility|civilian|className|clear3DENAttribute|clear3DENInventory|clearAllItemsFromBackpack|clearBackpackCargo|clearBackpackCargoGlobal|clearForcesRTD|clearGroupIcons|clearItemCargo|clearItemCargoGlobal|clearItemPool|clearMagazineCargo|clearMagazineCargoGlobal|clearMagazinePool|clearOverlay|clearRadio|clearVehicleInit|clearWeaponCargo|clearWeaponCargoGlobal|clearWeaponPool|clientOwner|closeDialog|closeDisplay|closeOverlay|collapseObjectTree|collect3DENHistory|collectiveRTD|combatMode|commandArtilleryFire|commandChat|commander|commandFire|commandFollow|commandFSM|commandGetOut|commandingMenu|commandMove|commandRadio|commandStop|commandSuppressiveFire|commandTarget|commandWatch|comment|commitOverlay|compile|compileFinal|completedFSM|composeText|configClasses|configFile|configHierarchy|configName|configNull|configProperties|configSourceAddonList|configSourceMod|configSourceModList|confirmSensorTarget|connectTerminalToUAV|controlNull|controlsGroupCtrl|copyFromClipboard|copyToClipboard|copyWaypoints|cos|count|countEnemy|countFriendly|countSide|countType|countUnknown|create3DENComposition|create3DENEntity|createAgent|createCenter|createDialog|createDiaryLink|createDiaryRecord|createDiarySubject|createDisplay|createGearDialog|createGroup|createGuardedPoint|createLocation|createMarker|createMarkerLocal|createMenu|createMine|createMissionDisplay|createMPCampaignDisplay|createSimpleObject|createSimpleTask|createSite|createSoundSource|createTask|createTeam|createTrigger|createUnit|createVehicle|createVehicleCrew|createVehicleLocal|crew|ctAddHeader|ctAddRow|ctClear|ctCurSel|ctData|ctFindHeaderRows|ctFindRowHeader|ctHeaderControls|ctHeaderCount|ctRemoveHeaders|ctRemoveRows|ctrlActivate|ctrlAddEventHandler|ctrlAngle|ctrlAutoScrollDelay|ctrlAutoScrollRewind|ctrlAutoScrollSpeed|ctrlChecked|ctrlClassName|ctrlCommit|ctrlCommitted|ctrlCreate|ctrlDelete|ctrlEnable|ctrlEnabled|ctrlFade|ctrlHTMLLoaded|ctrlIDC|ctrlIDD|ctrlMapAnimAdd|ctrlMapAnimClear|ctrlMapAnimCommit|ctrlMapAnimDone|ctrlMapCursor|ctrlMapMouseOver|ctrlMapScale|ctrlMapScreenToWorld|ctrlMapWorldToScreen|ctrlModel|ctrlModelDirAndUp|ctrlModelScale|ctrlParent|ctrlParentControlsGroup|ctrlPosition|ctrlRemoveAllEventHandlers|ctrlRemoveEventHandler|ctrlScale|ctrlSetActiveColor|ctrlSetAngle|ctrlSetAutoScrollDelay|ctrlSetAutoScrollRewind|ctrlSetAutoScrollSpeed|ctrlSetBackgroundColor|ctrlSetChecked|ctrlSetDisabledColor|ctrlSetEventHandler|ctrlSetFade|ctrlSetFocus|ctrlSetFont|ctrlSetFontH1|ctrlSetFontH1B|ctrlSetFontH2|ctrlSetFontH2B|ctrlSetFontH3|ctrlSetFontH3B|ctrlSetFontH4|ctrlSetFontH4B|ctrlSetFontH5|ctrlSetFontH5B|ctrlSetFontH6|ctrlSetFontH6B|ctrlSetFontHeight|ctrlSetFontHeightH1|ctrlSetFontHeightH2|ctrlSetFontHeightH3|ctrlSetFontHeightH4|ctrlSetFontHeightH5|ctrlSetFontHeightH6|ctrlSetFontHeightSecondary|ctrlSetFontP|ctrlSetFontPB|ctrlSetFontSecondary|ctrlSetForegroundColor|ctrlSetModel|ctrlSetModelDirAndUp|ctrlSetModelScale|ctrlSetPixelPrecision|ctrlSetPosition|ctrlSetScale|ctrlSetStructuredText|ctrlSetText|ctrlSetTextColor|ctrlSetTextColorSecondary|ctrlSetTextSecondary|ctrlSetTooltip|ctrlSetTooltipColorBox|ctrlSetTooltipColorShade|ctrlSetTooltipColorText|ctrlShow|ctrlShown|ctrlText|ctrlTextHeight|ctrlTextSecondary|ctrlTextWidth|ctrlType|ctrlVisible|ctRowControls|ctRowCount|ctSetCurSel|ctSetData|ctSetHeaderTemplate|ctSetRowTemplate|ctSetValue|ctValue|curatorAddons|curatorCamera|curatorCameraArea|curatorCameraAreaCeiling|curatorCoef|curatorEditableObjects|curatorEditingArea|curatorEditingAreaType|curatorMouseOver|curatorPoints|curatorRegisteredObjects|curatorSelected|curatorWaypointCost|current3DENOperation|currentChannel|currentCommand|currentMagazine|currentMagazineDetail|currentMagazineDetailTurret|currentMagazineTurret|currentMuzzle|currentNamespace|currentTask|currentTasks|currentThrowable|currentVisionMode|currentWaypoint|currentWeapon|currentWeaponMode|currentWeaponTurret|currentZeroing|cursorObject|cursorTarget|customChat|customRadio|cutFadeOut|cutObj|cutRsc|cutText|damage|date|dateToNumber|daytime|deActivateKey|debriefingText|debugFSM|debugLog|deg|delete3DENEntities|deleteAt|deleteCenter|deleteCollection|deleteEditorObject|deleteGroup|deleteGroupWhenEmpty|deleteIdentity|deleteLocation|deleteMarker|deleteMarkerLocal|deleteRange|deleteResources|deleteSite|deleteStatus|deleteTeam|deleteVehicle|deleteVehicleCrew|deleteWaypoint|detach|detectedMines|diag_activeMissionFSMs|diag_activeScripts|diag_activeSQFScripts|diag_activeSQSScripts|diag_captureFrame|diag_captureFrameToFile|diag_captureSlowFrame|diag_codePerformance|diag_drawMode|diag_dynamicSimulationEnd|diag_enable|diag_enabled|diag_fps|diag_fpsMin|diag_frameNo|diag_lightNewLoad|diag_list|diag_log|diag_logSlowFrame|diag_mergeConfigFile|diag_recordTurretLimits|diag_setLightNew|diag_tickTime|diag_toggle|dialog|diarySubjectExists|didJIP|didJIPOwner|difficulty|difficultyEnabled|difficultyEnabledRTD|difficultyOption|direction|directSay|disableAI|disableCollisionWith|disableConversation|disableDebriefingStats|disableMapIndicators|disableNVGEquipment|disableRemoteSensors|disableSerialization|disableTIEquipment|disableUAVConnectability|disableUserInput|displayAddEventHandler|displayCtrl|displayNull|displayParent|displayRemoveAllEventHandlers|displayRemoveEventHandler|displaySetEventHandler|dissolveTeam|distance|distance2D|distanceSqr|distributionRegion|do3DENAction|doArtilleryFire|doFire|doFollow|doFSM|doGetOut|doMove|doorPhase|doStop|doSuppressiveFire|doTarget|doWatch|drawArrow|drawEllipse|drawIcon|drawIcon3D|drawLine|drawLine3D|drawLink|drawLocation|drawPolygon|drawRectangle|drawTriangle|driver|drop|dynamicSimulationDistance|dynamicSimulationDistanceCoef|dynamicSimulationEnabled|dynamicSimulationSystemEnabled|east|edit3DENMissionAttributes|editObject|editorSetEventHandler|effectiveCommander|emptyPositions|enableAI|enableAIFeature|enableAimPrecision|enableAttack|enableAudioFeature|enableAutoStartUpRTD|enableAutoTrimRTD|enableCamShake|enableCaustics|enableChannel|enableCollisionWith|enableCopilot|enableDebriefingStats|enableDiagLegend|enableDynamicSimulation|enableDynamicSimulationSystem|enableEndDialog|enableEngineArtillery|enableEnvironment|enableFatigue|enableGunLights|enableInfoPanelComponent|enableIRLasers|enableMimics|enablePersonTurret|enableRadio|enableReload|enableRopeAttach|enableSatNormalOnDetail|enableSaving|enableSentences|enableSimulation|enableSimulationGlobal|enableStamina|enableStressDamage|enableTeamSwitch|enableTraffic|enableUAVConnectability|enableUAVWaypoints|enableVehicleCargo|enableVehicleSensor|enableWeaponDisassembly|endl|endLoadingScreen|endMission|engineOn|enginesIsOnRTD|enginesPowerRTD|enginesRpmRTD|enginesTorqueRTD|entities|environmentEnabled|estimatedEndServerTime|estimatedTimeLeft|evalObjectArgument|everyBackpack|everyContainer|exec|execEditorScript|exp|expectedDestination|exportJIPMessages|eyeDirection|eyePos|face|faction|fadeMusic|fadeRadio|fadeSound|fadeSpeech|failMission|fillWeaponsFromPool|find|findCover|findDisplay|findEditorObject|findEmptyPosition|findEmptyPositionReady|findIf|findNearestEnemy|finishMissionInit|finite|fire|fireAtTarget|firstBackpack|flag|flagAnimationPhase|flagOwner|flagSide|flagTexture|fleeing|floor|flyInHeight|flyInHeightASL|fog|fogForecast|fogParams|forceAddUniform|forceAtPositionRTD|forcedMap|forceEnd|forceFlagTexture|forceFollowRoad|forceGeneratorRTD|forceMap|forceRespawn|forceSpeed|forceWalk|forceWeaponFire|forceWeatherChange|forgetTarget|format|formation|formationDirection|formationLeader|formationMembers|formationPosition|formationTask|formatText|formLeader|freeLook|fromEditor|fuel|fullCrew|gearIDCAmmoCount|gearSlotAmmoCount|gearSlotData|get3DENActionState|get3DENAttribute|get3DENCamera|get3DENConnections|get3DENEntity|get3DENEntityID|get3DENGrid|get3DENIconsVisible|get3DENLayerEntities|get3DENLinesVisible|get3DENMissionAttribute|get3DENMouseOver|get3DENSelected|getAimingCoef|getAllEnvSoundControllers|getAllHitPointsDamage|getAllOwnedMines|getAllSoundControllers|getAmmoCargo|getAnimAimPrecision|getAnimSpeedCoef|getArray|getArtilleryAmmo|getArtilleryComputerSettings|getArtilleryETA|getAssignedCuratorLogic|getAssignedCuratorUnit|getBackpackCargo|getBleedingRemaining|getBurningValue|getCameraViewDirection|getCargoIndex|getCenterOfMass|getClientState|getClientStateNumber|getCompatiblePylonMagazines|getConnectedUAV|getContainerMaxLoad|getCursorObjectParams|getCustomAimCoef|getDammage|getDescription|getDir|getDirVisual|getDLCAssetsUsage|getDLCAssetsUsageByName|getDLCs|getDLCUsageTime|getEditorCamera|getEditorMode|getEditorObjectScope|getElevationOffset|getEngineTargetRpmRTD|getEnvSoundController|getFatigue|getFieldManualStartPage|getForcedFlagTexture|getFriend|getFSMVariable|getFuelCargo|getGroupIcon|getGroupIconParams|getGroupIcons|getHideFrom|getHit|getHitIndex|getHitPointDamage|getItemCargo|getMagazineCargo|getMarkerColor|getMarkerPos|getMarkerSize|getMarkerType|getMass|getMissionConfig|getMissionConfigValue|getMissionDLCs|getMissionLayerEntities|getMissionLayers|getModelInfo|getMousePosition|getMusicPlayedTime|getNumber|getObjectArgument|getObjectChildren|getObjectDLC|getObjectMaterials|getObjectProxy|getObjectTextures|getObjectType|getObjectViewDistance|getOxygenRemaining|getPersonUsedDLCs|getPilotCameraDirection|getPilotCameraPosition|getPilotCameraRotation|getPilotCameraTarget|getPlateNumber|getPlayerChannel|getPlayerScores|getPlayerUID|getPlayerUIDOld|getPos|getPosASL|getPosASLVisual|getPosASLW|getPosATL|getPosATLVisual|getPosVisual|getPosWorld|getPylonMagazines|getRelDir|getRelPos|getRemoteSensorsDisabled|getRepairCargo|getResolution|getRotorBrakeRTD|getShadowDistance|getShotParents|getSlingLoad|getSoundController|getSoundControllerResult|getSpeed|getStamina|getStatValue|getSuppression|getTerrainGrid|getTerrainHeightASL|getText|getTotalDLCUsageTime|getTrimOffsetRTD|getUnitLoadout|getUnitTrait|getUserMFDText|getUserMFDValue|getVariable|getVehicleCargo|getWeaponCargo|getWeaponSway|getWingsOrientationRTD|getWingsPositionRTD|getWPPos|glanceAt|globalChat|globalRadio|goggles|group|groupChat|groupFromNetId|groupIconSelectable|groupIconsVisible|groupId|groupOwner|groupRadio|groupSelectedUnits|groupSelectUnit|grpNull|gunner|gusts|halt|handgunItems|handgunMagazine|handgunWeapon|handsHit|hasInterface|hasPilotCamera|hasWeapon|hcAllGroups|hcGroupParams|hcLeader|hcRemoveAllGroups|hcRemoveGroup|hcSelected|hcSelectGroup|hcSetGroup|hcShowBar|hcShownBar|headgear|hideBody|hideObject|hideObjectGlobal|hideSelection|hint|hintC|hintCadet|hintSilent|hmd|hostMission|htmlLoad|HUDMovementLevels|humidity|image|importAllGroups|importance|in|inArea|inAreaArray|incapacitatedState|independent|inflame|inflamed|infoPanel|infoPanelComponentEnabled|infoPanelComponents|infoPanels|inGameUISetEventHandler|inheritsFrom|initAmbientLife|inPolygon|inputAction|inRangeOfArtillery|insertEditorObject|intersect|is3DEN|is3DENMultiplayer|isAbleToBreathe|isAgent|isAimPrecisionEnabled|isArray|isAutoHoverOn|isAutonomous|isAutoStartUpEnabledRTD|isAutotest|isAutoTrimOnRTD|isBleeding|isBurning|isClass|isCollisionLightOn|isCopilotEnabled|isDamageAllowed|isDedicated|isDLCAvailable|isEngineOn|isEqualTo|isEqualType|isEqualTypeAll|isEqualTypeAny|isEqualTypeArray|isEqualTypeParams|isFilePatchingEnabled|isFlashlightOn|isFlatEmpty|isForcedWalk|isFormationLeader|isGroupDeletedWhenEmpty|isHidden|isInRemainsCollector|isInstructorFigureEnabled|isIRLaserOn|isKeyActive|isKindOf|isLaserOn|isLightOn|isLocalized|isManualFire|isMarkedForCollection|isMultiplayer|isMultiplayerSolo|isNil|isNull|isNumber|isObjectHidden|isObjectRTD|isOnRoad|isPipEnabled|isPlayer|isRealTime|isRemoteExecuted|isRemoteExecutedJIP|isServer|isShowing3DIcons|isSimpleObject|isSprintAllowed|isStaminaEnabled|isSteamMission|isStreamFriendlyUIEnabled|isStressDamageEnabled|isText|isTouchingGround|isTurnedOut|isTutHintsEnabled|isUAVConnectable|isUAVConnected|isUIContext|isUniformAllowed|isVehicleCargo|isVehicleRadarOn|isVehicleSensorEnabled|isWalking|isWeaponDeployed|isWeaponRested|itemCargo|items|itemsWithMagazines|join|joinAs|joinAsSilent|joinSilent|joinString|kbAddDatabase|kbAddDatabaseTargets|kbAddTopic|kbHasTopic|kbReact|kbRemoveTopic|kbTell|kbWasSaid|keyImage|keyName|knowsAbout|land|landAt|landResult|language|laserTarget|lbAdd|lbClear|lbColor|lbColorRight|lbCurSel|lbData|lbDelete|lbIsSelected|lbPicture|lbPictureRight|lbSelection|lbSetColor|lbSetColorRight|lbSetCurSel|lbSetData|lbSetPicture|lbSetPictureColor|lbSetPictureColorDisabled|lbSetPictureColorSelected|lbSetPictureRight|lbSetPictureRightColor|lbSetPictureRightColorDisabled|lbSetPictureRightColorSelected|lbSetSelectColor|lbSetSelectColorRight|lbSetSelected|lbSetText|lbSetTextRight|lbSetTooltip|lbSetValue|lbSize|lbSort|lbSortByValue|lbText|lbTextRight|lbValue|leader|leaderboardDeInit|leaderboardGetRows|leaderboardInit|leaderboardRequestRowsFriends|leaderboardRequestRowsGlobal|leaderboardRequestRowsGlobalAroundUser|leaderboardsRequestUploadScore|leaderboardsRequestUploadScoreKeepBest|leaderboardState|leaveVehicle|libraryCredits|libraryDisclaimers|lifeState|lightAttachObject|lightDetachObject|lightIsOn|lightnings|limitSpeed|linearConversion|lineBreak|lineIntersects|lineIntersectsObjs|lineIntersectsSurfaces|lineIntersectsWith|linkItem|list|listObjects|listRemoteTargets|listVehicleSensors|ln|lnbAddArray|lnbAddColumn|lnbAddRow|lnbClear|lnbColor|lnbColorRight|lnbCurSelRow|lnbData|lnbDeleteColumn|lnbDeleteRow|lnbGetColumnsPosition|lnbPicture|lnbPictureRight|lnbSetColor|lnbSetColorRight|lnbSetColumnsPos|lnbSetCurSelRow|lnbSetData|lnbSetPicture|lnbSetPictureColor|lnbSetPictureColorRight|lnbSetPictureColorSelected|lnbSetPictureColorSelectedRight|lnbSetPictureRight|lnbSetText|lnbSetTextRight|lnbSetValue|lnbSize|lnbSort|lnbSortByValue|lnbText|lnbTextRight|lnbValue|load|loadAbs|loadBackpack|loadFile|loadGame|loadIdentity|loadMagazine|loadOverlay|loadStatus|loadUniform|loadVest|local|localize|locationNull|locationPosition|lock|lockCameraTo|lockCargo|lockDriver|locked|lockedCargo|lockedDriver|lockedTurret|lockIdentity|lockTurret|lockWP|log|logEntities|logNetwork|logNetworkTerminate|lookAt|lookAtPos|magazineCargo|magazines|magazinesAllTurrets|magazinesAmmo|magazinesAmmoCargo|magazinesAmmoFull|magazinesDetail|magazinesDetailBackpack|magazinesDetailUniform|magazinesDetailVest|magazinesTurret|magazineTurretAmmo|mapAnimAdd|mapAnimClear|mapAnimCommit|mapAnimDone|mapCenterOnCamera|mapGridPosition|markAsFinishedOnSteam|markerAlpha|markerBrush|markerColor|markerDir|markerPos|markerShape|markerSize|markerText|markerType|max|members|menuAction|menuAdd|menuChecked|menuClear|menuCollapse|menuData|menuDelete|menuEnable|menuEnabled|menuExpand|menuHover|menuPicture|menuSetAction|menuSetCheck|menuSetData|menuSetPicture|menuSetValue|menuShortcut|menuShortcutText|menuSize|menuSort|menuText|menuURL|menuValue|min|mineActive|mineDetectedBy|missionConfigFile|missionDifficulty|missionName|missionNamespace|missionStart|missionVersion|modelToWorld|modelToWorldVisual|modelToWorldVisualWorld|modelToWorldWorld|modParams|moonIntensity|moonPhase|morale|move|move3DENCamera|moveInAny|moveInCargo|moveInCommander|moveInDriver|moveInGunner|moveInTurret|moveObjectToEnd|moveOut|moveTime|moveTo|moveToCompleted|moveToFailed|musicVolume|name|nameSound|nearEntities|nearestBuilding|nearestLocation|nearestLocations|nearestLocationWithDubbing|nearestObject|nearestObjects|nearestTerrainObjects|nearObjects|nearObjectsReady|nearRoads|nearSupplies|nearTargets|needReload|netId|netObjNull|newOverlay|nextMenuItemIndex|nextWeatherChange|nMenuItems|numberOfEnginesRTD|numberToDate|objectCurators|objectFromNetId|objectParent|objNull|objStatus|onBriefingGear|onBriefingGroup|onBriefingNotes|onBriefingPlan|onBriefingTeamSwitch|onCommandModeChanged|onDoubleClick|onEachFrame|onGroupIconClick|onGroupIconOverEnter|onGroupIconOverLeave|onHCGroupSelectionChanged|onMapSingleClick|onPlayerConnected|onPlayerDisconnected|onPreloadFinished|onPreloadStarted|onShowNewObject|onTeamSwitch|openCuratorInterface|openDLCPage|openDSInterface|openMap|openSteamApp|openYoutubeVideo|opfor|orderGetIn|overcast|overcastForecast|owner|param|params|parseNumber|parseSimpleArray|parseText|parsingNamespace|particlesQuality|pi|pickWeaponPool|pitch|pixelGrid|pixelGridBase|pixelGridNoUIScale|pixelH|pixelW|playableSlotsNumber|playableUnits|playAction|playActionNow|player|playerRespawnTime|playerSide|playersNumber|playGesture|playMission|playMove|playMoveNow|playMusic|playScriptedMission|playSound|playSound3D|position|positionCameraToWorld|posScreenToWorld|posWorldToScreen|ppEffectAdjust|ppEffectCommit|ppEffectCommitted|ppEffectCreate|ppEffectDestroy|ppEffectEnable|ppEffectEnabled|ppEffectForceInNVG|precision|preloadCamera|preloadObject|preloadSound|preloadTitleObj|preloadTitleRsc|primaryWeapon|primaryWeaponItems|primaryWeaponMagazine|priority|processDiaryLink|processInitCommands|productVersion|profileName|profileNamespace|profileNameSteam|progressLoadingScreen|progressPosition|progressSetPosition|publicVariable|publicVariableClient|publicVariableServer|pushBack|pushBackUnique|putWeaponPool|queryItemsPool|queryMagazinePool|queryWeaponPool|rad|radioChannelAdd|radioChannelCreate|radioChannelRemove|radioChannelSetCallSign|radioChannelSetLabel|radioVolume|rain|rainbow|random|rank|rankId|rating|rectangular|registeredTasks|registerTask|reload|reloadEnabled|remoteControl|remoteExec|remoteExecCall|remoteExecutedOwner|remove3DENConnection|remove3DENEventHandler|remove3DENLayer|removeAction|removeAll3DENEventHandlers|removeAllActions|removeAllAssignedItems|removeAllContainers|removeAllCuratorAddons|removeAllCuratorCameraAreas|removeAllCuratorEditingAreas|removeAllEventHandlers|removeAllHandgunItems|removeAllItems|removeAllItemsWithMagazines|removeAllMissionEventHandlers|removeAllMPEventHandlers|removeAllMusicEventHandlers|removeAllOwnedMines|removeAllPrimaryWeaponItems|removeAllWeapons|removeBackpack|removeBackpackGlobal|removeCuratorAddons|removeCuratorCameraArea|removeCuratorEditableObjects|removeCuratorEditingArea|removeDrawIcon|removeDrawLinks|removeEventHandler|removeFromRemainsCollector|removeGoggles|removeGroupIcon|removeHandgunItem|removeHeadgear|removeItem|removeItemFromBackpack|removeItemFromUniform|removeItemFromVest|removeItems|removeMagazine|removeMagazineGlobal|removeMagazines|removeMagazinesTurret|removeMagazineTurret|removeMenuItem|removeMissionEventHandler|removeMPEventHandler|removeMusicEventHandler|removeOwnedMine|removePrimaryWeaponItem|removeSecondaryWeaponItem|removeSimpleTask|removeSwitchableUnit|removeTeamMember|removeUniform|removeVest|removeWeapon|removeWeaponAttachmentCargo|removeWeaponCargo|removeWeaponGlobal|removeWeaponTurret|reportRemoteTarget|requiredVersion|resetCamShake|resetSubgroupDirection|resistance|resize|resources|respawnVehicle|restartEditorCamera|reveal|revealMine|reverse|reversedMouseY|roadAt|roadsConnectedTo|roleDescription|ropeAttachedObjects|ropeAttachedTo|ropeAttachEnabled|ropeAttachTo|ropeCreate|ropeCut|ropeDestroy|ropeDetach|ropeEndPosition|ropeLength|ropes|ropeUnwind|ropeUnwound|rotorsForcesRTD|rotorsRpmRTD|round|runInitScript|safeZoneH|safeZoneW|safeZoneWAbs|safeZoneX|safeZoneXAbs|safeZoneY|save3DENInventory|saveGame|saveIdentity|saveJoysticks|saveOverlay|saveProfileNamespace|saveStatus|saveVar|savingEnabled|say|say2D|say3D|score|scoreSide|screenshot|screenToWorld|scriptDone|scriptName|scriptNull|scudState|secondaryWeapon|secondaryWeaponItems|secondaryWeaponMagazine|select|selectBestPlaces|selectDiarySubject|selectedEditorObjects|selectEditorObject|selectionNames|selectionPosition|selectLeader|selectMax|selectMin|selectNoPlayer|selectPlayer|selectRandom|selectRandomWeighted|selectWeapon|selectWeaponTurret|sendAUMessage|sendSimpleCommand|sendTask|sendTaskResult|sendUDPMessage|serverCommand|serverCommandAvailable|serverCommandExecutable|serverName|serverTime|set|set3DENAttribute|set3DENAttributes|set3DENGrid|set3DENIconsVisible|set3DENLayer|set3DENLinesVisible|set3DENLogicType|set3DENMissionAttribute|set3DENMissionAttributes|set3DENModelsVisible|set3DENObjectType|set3DENSelected|setAccTime|setActualCollectiveRTD|setAirplaneThrottle|setAirportSide|setAmmo|setAmmoCargo|setAmmoOnPylon|setAnimSpeedCoef|setAperture|setApertureNew|setArmoryPoints|setAttributes|setAutonomous|setBehaviour|setBleedingRemaining|setBrakesRTD|setCameraInterest|setCamShakeDefParams|setCamShakeParams|setCamUseTI|setCaptive|setCenterOfMass|setCollisionLight|setCombatMode|setCompassOscillation|setConvoySeparation|setCuratorCameraAreaCeiling|setCuratorCoef|setCuratorEditingAreaType|setCuratorWaypointCost|setCurrentChannel|setCurrentTask|setCurrentWaypoint|setCustomAimCoef|setCustomWeightRTD|setDamage|setDammage|setDate|setDebriefingText|setDefaultCamera|setDestination|setDetailMapBlendPars|setDir|setDirection|setDrawIcon|setDriveOnPath|setDropInterval|setDynamicSimulationDistance|setDynamicSimulationDistanceCoef|setEditorMode|setEditorObjectScope|setEffectCondition|setEngineRpmRTD|setFace|setFaceAnimation|setFatigue|setFeatureType|setFlagAnimationPhase|setFlagOwner|setFlagSide|setFlagTexture|setFog|setForceGeneratorRTD|setFormation|setFormationTask|setFormDir|setFriend|setFromEditor|setFSMVariable|setFuel|setFuelCargo|setGroupIcon|setGroupIconParams|setGroupIconsSelectable|setGroupIconsVisible|setGroupId|setGroupIdGlobal|setGroupOwner|setGusts|setHideBehind|setHit|setHitIndex|setHitPointDamage|setHorizonParallaxCoef|setHUDMovementLevels|setIdentity|setImportance|setInfoPanel|setLeader|setLightAmbient|setLightAttenuation|setLightBrightness|setLightColor|setLightDayLight|setLightFlareMaxDistance|setLightFlareSize|setLightIntensity|setLightnings|setLightUseFlare|setLocalWindParams|setMagazineTurretAmmo|setMarkerAlpha|setMarkerAlphaLocal|setMarkerBrush|setMarkerBrushLocal|setMarkerColor|setMarkerColorLocal|setMarkerDir|setMarkerDirLocal|setMarkerPos|setMarkerPosLocal|setMarkerShape|setMarkerShapeLocal|setMarkerSize|setMarkerSizeLocal|setMarkerText|setMarkerTextLocal|setMarkerType|setMarkerTypeLocal|setMass|setMimic|setMousePosition|setMusicEffect|setMusicEventHandler|setName|setNameSound|setObjectArguments|setObjectMaterial|setObjectMaterialGlobal|setObjectProxy|setObjectTexture|setObjectTextureGlobal|setObjectViewDistance|setOvercast|setOwner|setOxygenRemaining|setParticleCircle|setParticleClass|setParticleFire|setParticleParams|setParticleRandom|setPilotCameraDirection|setPilotCameraRotation|setPilotCameraTarget|setPilotLight|setPiPEffect|setPitch|setPlateNumber|setPlayable|setPlayerRespawnTime|setPos|setPosASL|setPosASL2|setPosASLW|setPosATL|setPosition|setPosWorld|setPylonLoadOut|setPylonsPriority|setRadioMsg|setRain|setRainbow|setRandomLip|setRank|setRectangular|setRepairCargo|setRotorBrakeRTD|setShadowDistance|setShotParents|setSide|setSimpleTaskAlwaysVisible|setSimpleTaskCustomData|setSimpleTaskDescription|setSimpleTaskDestination|setSimpleTaskTarget|setSimpleTaskType|setSimulWeatherLayers|setSize|setSkill|setSlingLoad|setSoundEffect|setSpeaker|setSpeech|setSpeedMode|setStamina|setStaminaScheme|setStatValue|setSuppression|setSystemOfUnits|setTargetAge|setTaskMarkerOffset|setTaskResult|setTaskState|setTerrainGrid|setText|setTimeMultiplier|setTitleEffect|setToneMapping|setToneMappingParams|setTrafficDensity|setTrafficDistance|setTrafficGap|setTrafficSpeed|setTriggerActivation|setTriggerArea|setTriggerStatements|setTriggerText|setTriggerTimeout|setTriggerType|setType|setUnconscious|setUnitAbility|setUnitLoadout|setUnitPos|setUnitPosWeak|setUnitRank|setUnitRecoilCoefficient|setUnitTrait|setUnloadInCombat|setUserActionText|setUserMFDText|setUserMFDValue|setVariable|setVectorDir|setVectorDirAndUp|setVectorUp|setVehicleAmmo|setVehicleAmmoDef|setVehicleArmor|setVehicleCargo|setVehicleId|setVehicleInit|setVehicleLock|setVehiclePosition|setVehicleRadar|setVehicleReceiveRemoteTargets|setVehicleReportOwnPosition|setVehicleReportRemoteTargets|setVehicleTIPars|setVehicleVarName|setVelocity|setVelocityModelSpace|setVelocityTransformation|setViewDistance|setVisibleIfTreeCollapsed|setWantedRpmRTD|setWaves|setWaypointBehaviour|setWaypointCombatMode|setWaypointCompletionRadius|setWaypointDescription|setWaypointForceBehaviour|setWaypointFormation|setWaypointHousePosition|setWaypointLoiterRadius|setWaypointLoiterType|setWaypointName|setWaypointPosition|setWaypointScript|setWaypointSpeed|setWaypointStatements|setWaypointTimeout|setWaypointType|setWaypointVisible|setWeaponReloadingTime|setWind|setWindDir|setWindForce|setWindStr|setWingForceScaleRTD|setWPPos|show3DIcons|showChat|showCinemaBorder|showCommandingMenu|showCompass|showCuratorCompass|showGPS|showHUD|showLegend|showMap|shownArtilleryComputer|shownChat|shownCompass|shownCuratorCompass|showNewEditorObject|shownGPS|shownHUD|shownMap|shownPad|shownRadio|shownScoretable|shownUAVFeed|shownWarrant|shownWatch|showPad|showRadio|showScoretable|showSubtitles|showUAVFeed|showWarrant|showWatch|showWaypoint|showWaypoints|side|sideAmbientLife|sideChat|sideEmpty|sideEnemy|sideFriendly|sideLogic|sideRadio|sideUnknown|simpleTasks|simulationEnabled|simulCloudDensity|simulCloudOcclusion|simulInClouds|simulWeatherSync|sin|size|sizeOf|skill|skillFinal|skipTime|sleep|sliderPosition|sliderRange|sliderSetPosition|sliderSetRange|sliderSetSpeed|sliderSpeed|slingLoadAssistantShown|soldierMagazines|someAmmo|sort|soundVolume|speaker|speed|speedMode|splitString|sqrt|squadParams|stance|startLoadingScreen|stop|stopEngineRTD|stopped|str|sunOrMoon|supportInfo|suppressFor|surfaceIsWater|surfaceNormal|surfaceType|swimInDepth|switchableUnits|switchAction|switchCamera|switchGesture|switchLight|switchMove|synchronizedObjects|synchronizedTriggers|synchronizedWaypoints|synchronizeObjectsAdd|synchronizeObjectsRemove|synchronizeTrigger|synchronizeWaypoint|systemChat|systemOfUnits|tan|targetKnowledge|targets|targetsAggregate|targetsQuery|taskAlwaysVisible|taskChildren|taskCompleted|taskCustomData|taskDescription|taskDestination|taskHint|taskMarkerOffset|taskNull|taskParent|taskResult|taskState|taskType|teamMember|teamMemberNull|teamName|teams|teamSwitch|teamSwitchEnabled|teamType|terminate|terrainIntersect|terrainIntersectASL|terrainIntersectAtASL|text|textLog|textLogFormat|tg|time|timeMultiplier|titleCut|titleFadeOut|titleObj|titleRsc|titleText|toArray|toFixed|toLower|toString|toUpper|triggerActivated|triggerActivation|triggerArea|triggerAttachedVehicle|triggerAttachObject|triggerAttachVehicle|triggerDynamicSimulation|triggerStatements|triggerText|triggerTimeout|triggerTimeoutCurrent|triggerType|turretLocal|turretOwner|turretUnit|tvAdd|tvClear|tvCollapse|tvCollapseAll|tvCount|tvCurSel|tvData|tvDelete|tvExpand|tvExpandAll|tvPicture|tvPictureRight|tvSetColor|tvSetCurSel|tvSetData|tvSetPicture|tvSetPictureColor|tvSetPictureColorDisabled|tvSetPictureColorSelected|tvSetPictureRight|tvSetPictureRightColor|tvSetPictureRightColorDisabled|tvSetPictureRightColorSelected|tvSetSelectColor|tvSetText|tvSetTooltip|tvSetValue|tvSort|tvSortByValue|tvText|tvTooltip|tvValue|type|typeName|typeOf|UAVControl|uiNamespace|uiSleep|unassignCurator|unassignItem|unassignTeam|unassignVehicle|underwater|uniform|uniformContainer|uniformItems|uniformMagazines|unitAddons|unitAimPosition|unitAimPositionVisual|unitBackpack|unitIsUAV|unitPos|unitReady|unitRecoilCoefficient|units|unitsBelowHeight|unlinkItem|unlockAchievement|unregisterTask|updateDrawIcon|updateMenuItem|updateObjectTree|useAIOperMapObstructionTest|useAISteeringComponent|useAudioTimeForMoves|userInputDisabled|vectorAdd|vectorCos|vectorCrossProduct|vectorDiff|vectorDir|vectorDirVisual|vectorDistance|vectorDistanceSqr|vectorDotProduct|vectorFromTo|vectorMagnitude|vectorMagnitudeSqr|vectorModelToWorld|vectorModelToWorldVisual|vectorMultiply|vectorNormalized|vectorUp|vectorUpVisual|vectorWorldToModel|vectorWorldToModelVisual|vehicle|vehicleCargoEnabled|vehicleChat|vehicleRadio|vehicleReceiveRemoteTargets|vehicleReportOwnPosition|vehicleReportRemoteTargets|vehicles|vehicleVarName|velocity|velocityModelSpace|verifySignature|vest|vestContainer|vestItems|vestMagazines|viewDistance|visibleCompass|visibleGPS|visibleMap|visiblePosition|visiblePositionASL|visibleScoretable|visibleWatch|waitUntil|waves|waypointAttachedObject|waypointAttachedVehicle|waypointAttachObject|waypointAttachVehicle|waypointBehaviour|waypointCombatMode|waypointCompletionRadius|waypointDescription|waypointForceBehaviour|waypointFormation|waypointHousePosition|waypointLoiterRadius|waypointLoiterType|waypointName|waypointPosition|waypoints|waypointScript|waypointsEnabledUAV|waypointShow|waypointSpeed|waypointStatements|waypointTimeout|waypointTimeoutCurrent|waypointType|waypointVisible|weaponAccessories|weaponAccessoriesCargo|weaponCargo|weaponDirection|weaponInertia|weaponLowered|weapons|weaponsItems|weaponsItemsCargo|weaponState|weaponsTurret|weightRTD|west|WFSideText|wind|windDir|windRTD|windStr|wingsForcesRTD|worldName|worldSize|worldToModel|worldToModelVisual|worldToScreen)\b/i,number:/(?:\$|\b0x)[\da-f]+\b|(?:\B\.\d+|\b\d+(?:\.\d+)?)(?:e[+-]?\d+)?\b/i,operator:/##|>>|&&|\|\||[!=<>]=?|[-+*/%#^]|\b(?:and|mod|not|or)\b/i,"magic-variable":{pattern:/\b(?:_exception|_fnc_scriptName|_fnc_scriptNameParent|_forEachIndex|_this|_thisEventHandler|_thisFSM|_thisScript|_x|this|thisList|thisTrigger)\b/i,alias:"keyword"},constant:/\bDIK(?:_[a-z\d]+)+\b/i}),Prism.languages.insertBefore("sqf","string",{macro:{pattern:/(^[ \t]*)#[a-z](?:[^\r\n\\]|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{directive:{pattern:/#[a-z]+\b/i,alias:"keyword"},comment:Prism.languages.sqf.comment}}}),delete Prism.languages.sqf["class-name"]; \ No newline at end of file +Prism.languages.sqf=Prism.languages.extend("clike",{string:{pattern:/"(?:(?:"")?[^"])*"(?!")|'(?:[^'])*'/,greedy:!0},keyword:/\b(?:breakOut|breakTo|call|case|catch|default|do|echo|else|execFSM|execVM|exitWith|for|forEach|forEachMember|forEachMemberAgent|forEachMemberTeam|from|goto|if|nil|preprocessFile|preprocessFileLineNumbers|private|scopeName|spawn|step|switch|then|throw|to|try|while|with)\b/i,boolean:/\b(?:false|true)\b/i,function:/\b(?:abs|accTime|acos|action|actionIDs|actionKeys|actionKeysImages|actionKeysNames|actionKeysNamesArray|actionName|actionParams|activateAddons|activatedAddons|activateKey|add3DENConnection|add3DENEventHandler|add3DENLayer|addAction|addBackpack|addBackpackCargo|addBackpackCargoGlobal|addBackpackGlobal|addCamShake|addCuratorAddons|addCuratorCameraArea|addCuratorEditableObjects|addCuratorEditingArea|addCuratorPoints|addEditorObject|addEventHandler|addForce|addForceGeneratorRTD|addGoggles|addGroupIcon|addHandgunItem|addHeadgear|addItem|addItemCargo|addItemCargoGlobal|addItemPool|addItemToBackpack|addItemToUniform|addItemToVest|addLiveStats|addMagazine|addMagazineAmmoCargo|addMagazineCargo|addMagazineCargoGlobal|addMagazineGlobal|addMagazinePool|addMagazines|addMagazineTurret|addMenu|addMenuItem|addMissionEventHandler|addMPEventHandler|addMusicEventHandler|addOwnedMine|addPlayerScores|addPrimaryWeaponItem|addPublicVariableEventHandler|addRating|addResources|addScore|addScoreSide|addSecondaryWeaponItem|addSwitchableUnit|addTeamMember|addToRemainsCollector|addTorque|addUniform|addVehicle|addVest|addWaypoint|addWeapon|addWeaponCargo|addWeaponCargoGlobal|addWeaponGlobal|addWeaponItem|addWeaponPool|addWeaponTurret|admin|agent|agents|AGLToASL|aimedAtTarget|aimPos|airDensityCurveRTD|airDensityRTD|airplaneThrottle|airportSide|AISFinishHeal|alive|all3DENEntities|allAirports|allControls|allCurators|allCutLayers|allDead|allDeadMen|allDisplays|allGroups|allMapMarkers|allMines|allMissionObjects|allow3DMode|allowCrewInImmobile|allowCuratorLogicIgnoreAreas|allowDamage|allowDammage|allowFileOperations|allowFleeing|allowGetIn|allowSprint|allPlayers|allSimpleObjects|allSites|allTurrets|allUnits|allUnitsUAV|allVariables|ammo|ammoOnPylon|animate|animateBay|animateDoor|animatePylon|animateSource|animationNames|animationPhase|animationSourcePhase|animationState|append|apply|armoryPoints|arrayIntersect|asin|ASLToAGL|ASLToATL|assert|assignAsCargo|assignAsCargoIndex|assignAsCommander|assignAsDriver|assignAsGunner|assignAsTurret|assignCurator|assignedCargo|assignedCommander|assignedDriver|assignedGunner|assignedItems|assignedTarget|assignedTeam|assignedVehicle|assignedVehicleRole|assignItem|assignTeam|assignToAirport|atan|atan2|atg|ATLToASL|attachedObject|attachedObjects|attachedTo|attachObject|attachTo|attackEnabled|backpack|backpackCargo|backpackContainer|backpackItems|backpackMagazines|backpackSpaceFor|behaviour|benchmark|binocular|blufor|boundingBox|boundingBoxReal|boundingCenter|briefingName|buildingExit|buildingPos|buldozer_EnableRoadDiag|buldozer_IsEnabledRoadDiag|buldozer_LoadNewRoads|buldozer_reloadOperMap|buttonAction|buttonSetAction|cadetMode|callExtension|camCommand|camCommit|camCommitPrepared|camCommitted|camConstuctionSetParams|camCreate|camDestroy|cameraEffect|cameraEffectEnableHUD|cameraInterest|cameraOn|cameraView|campaignConfigFile|camPreload|camPreloaded|camPrepareBank|camPrepareDir|camPrepareDive|camPrepareFocus|camPrepareFov|camPrepareFovRange|camPreparePos|camPrepareRelPos|camPrepareTarget|camSetBank|camSetDir|camSetDive|camSetFocus|camSetFov|camSetFovRange|camSetPos|camSetRelPos|camSetTarget|camTarget|camUseNVG|canAdd|canAddItemToBackpack|canAddItemToUniform|canAddItemToVest|cancelSimpleTaskDestination|canFire|canMove|canSlingLoad|canStand|canSuspend|canTriggerDynamicSimulation|canUnloadInCombat|canVehicleCargo|captive|captiveNum|cbChecked|cbSetChecked|ceil|channelEnabled|cheatsEnabled|checkAIFeature|checkVisibility|civilian|className|clear3DENAttribute|clear3DENInventory|clearAllItemsFromBackpack|clearBackpackCargo|clearBackpackCargoGlobal|clearForcesRTD|clearGroupIcons|clearItemCargo|clearItemCargoGlobal|clearItemPool|clearMagazineCargo|clearMagazineCargoGlobal|clearMagazinePool|clearOverlay|clearRadio|clearVehicleInit|clearWeaponCargo|clearWeaponCargoGlobal|clearWeaponPool|clientOwner|closeDialog|closeDisplay|closeOverlay|collapseObjectTree|collect3DENHistory|collectiveRTD|combatMode|commandArtilleryFire|commandChat|commander|commandFire|commandFollow|commandFSM|commandGetOut|commandingMenu|commandMove|commandRadio|commandStop|commandSuppressiveFire|commandTarget|commandWatch|comment|commitOverlay|compile|compileFinal|completedFSM|composeText|configClasses|configFile|configHierarchy|configName|configNull|configProperties|configSourceAddonList|configSourceMod|configSourceModList|confirmSensorTarget|connectTerminalToUAV|controlNull|controlsGroupCtrl|copyFromClipboard|copyToClipboard|copyWaypoints|cos|count|countEnemy|countFriendly|countSide|countType|countUnknown|create3DENComposition|create3DENEntity|createAgent|createCenter|createDialog|createDiaryLink|createDiaryRecord|createDiarySubject|createDisplay|createGearDialog|createGroup|createGuardedPoint|createLocation|createMarker|createMarkerLocal|createMenu|createMine|createMissionDisplay|createMPCampaignDisplay|createSimpleObject|createSimpleTask|createSite|createSoundSource|createTask|createTeam|createTrigger|createUnit|createVehicle|createVehicleCrew|createVehicleLocal|crew|ctAddHeader|ctAddRow|ctClear|ctCurSel|ctData|ctFindHeaderRows|ctFindRowHeader|ctHeaderControls|ctHeaderCount|ctRemoveHeaders|ctRemoveRows|ctrlActivate|ctrlAddEventHandler|ctrlAngle|ctrlAutoScrollDelay|ctrlAutoScrollRewind|ctrlAutoScrollSpeed|ctrlChecked|ctrlClassName|ctrlCommit|ctrlCommitted|ctrlCreate|ctrlDelete|ctrlEnable|ctrlEnabled|ctrlFade|ctrlHTMLLoaded|ctrlIDC|ctrlIDD|ctrlMapAnimAdd|ctrlMapAnimClear|ctrlMapAnimCommit|ctrlMapAnimDone|ctrlMapCursor|ctrlMapMouseOver|ctrlMapScale|ctrlMapScreenToWorld|ctrlMapWorldToScreen|ctrlModel|ctrlModelDirAndUp|ctrlModelScale|ctrlParent|ctrlParentControlsGroup|ctrlPosition|ctrlRemoveAllEventHandlers|ctrlRemoveEventHandler|ctrlScale|ctrlSetActiveColor|ctrlSetAngle|ctrlSetAutoScrollDelay|ctrlSetAutoScrollRewind|ctrlSetAutoScrollSpeed|ctrlSetBackgroundColor|ctrlSetChecked|ctrlSetDisabledColor|ctrlSetEventHandler|ctrlSetFade|ctrlSetFocus|ctrlSetFont|ctrlSetFontH1|ctrlSetFontH1B|ctrlSetFontH2|ctrlSetFontH2B|ctrlSetFontH3|ctrlSetFontH3B|ctrlSetFontH4|ctrlSetFontH4B|ctrlSetFontH5|ctrlSetFontH5B|ctrlSetFontH6|ctrlSetFontH6B|ctrlSetFontHeight|ctrlSetFontHeightH1|ctrlSetFontHeightH2|ctrlSetFontHeightH3|ctrlSetFontHeightH4|ctrlSetFontHeightH5|ctrlSetFontHeightH6|ctrlSetFontHeightSecondary|ctrlSetFontP|ctrlSetFontPB|ctrlSetFontSecondary|ctrlSetForegroundColor|ctrlSetModel|ctrlSetModelDirAndUp|ctrlSetModelScale|ctrlSetPixelPrecision|ctrlSetPosition|ctrlSetScale|ctrlSetStructuredText|ctrlSetText|ctrlSetTextColor|ctrlSetTextColorSecondary|ctrlSetTextSecondary|ctrlSetTooltip|ctrlSetTooltipColorBox|ctrlSetTooltipColorShade|ctrlSetTooltipColorText|ctrlShow|ctrlShown|ctrlText|ctrlTextHeight|ctrlTextSecondary|ctrlTextWidth|ctrlType|ctrlVisible|ctRowControls|ctRowCount|ctSetCurSel|ctSetData|ctSetHeaderTemplate|ctSetRowTemplate|ctSetValue|ctValue|curatorAddons|curatorCamera|curatorCameraArea|curatorCameraAreaCeiling|curatorCoef|curatorEditableObjects|curatorEditingArea|curatorEditingAreaType|curatorMouseOver|curatorPoints|curatorRegisteredObjects|curatorSelected|curatorWaypointCost|current3DENOperation|currentChannel|currentCommand|currentMagazine|currentMagazineDetail|currentMagazineDetailTurret|currentMagazineTurret|currentMuzzle|currentNamespace|currentTask|currentTasks|currentThrowable|currentVisionMode|currentWaypoint|currentWeapon|currentWeaponMode|currentWeaponTurret|currentZeroing|cursorObject|cursorTarget|customChat|customRadio|cutFadeOut|cutObj|cutRsc|cutText|damage|date|dateToNumber|daytime|deActivateKey|debriefingText|debugFSM|debugLog|deg|delete3DENEntities|deleteAt|deleteCenter|deleteCollection|deleteEditorObject|deleteGroup|deleteGroupWhenEmpty|deleteIdentity|deleteLocation|deleteMarker|deleteMarkerLocal|deleteRange|deleteResources|deleteSite|deleteStatus|deleteTeam|deleteVehicle|deleteVehicleCrew|deleteWaypoint|detach|detectedMines|diag_activeMissionFSMs|diag_activeScripts|diag_activeSQFScripts|diag_activeSQSScripts|diag_captureFrame|diag_captureFrameToFile|diag_captureSlowFrame|diag_codePerformance|diag_drawMode|diag_dynamicSimulationEnd|diag_enable|diag_enabled|diag_fps|diag_fpsMin|diag_frameNo|diag_lightNewLoad|diag_list|diag_log|diag_logSlowFrame|diag_mergeConfigFile|diag_recordTurretLimits|diag_setLightNew|diag_tickTime|diag_toggle|dialog|diarySubjectExists|didJIP|didJIPOwner|difficulty|difficultyEnabled|difficultyEnabledRTD|difficultyOption|direction|directSay|disableAI|disableCollisionWith|disableConversation|disableDebriefingStats|disableMapIndicators|disableNVGEquipment|disableRemoteSensors|disableSerialization|disableTIEquipment|disableUAVConnectability|disableUserInput|displayAddEventHandler|displayCtrl|displayNull|displayParent|displayRemoveAllEventHandlers|displayRemoveEventHandler|displaySetEventHandler|dissolveTeam|distance|distance2D|distanceSqr|distributionRegion|do3DENAction|doArtilleryFire|doFire|doFollow|doFSM|doGetOut|doMove|doorPhase|doStop|doSuppressiveFire|doTarget|doWatch|drawArrow|drawEllipse|drawIcon|drawIcon3D|drawLine|drawLine3D|drawLink|drawLocation|drawPolygon|drawRectangle|drawTriangle|driver|drop|dynamicSimulationDistance|dynamicSimulationDistanceCoef|dynamicSimulationEnabled|dynamicSimulationSystemEnabled|east|edit3DENMissionAttributes|editObject|editorSetEventHandler|effectiveCommander|emptyPositions|enableAI|enableAIFeature|enableAimPrecision|enableAttack|enableAudioFeature|enableAutoStartUpRTD|enableAutoTrimRTD|enableCamShake|enableCaustics|enableChannel|enableCollisionWith|enableCopilot|enableDebriefingStats|enableDiagLegend|enableDynamicSimulation|enableDynamicSimulationSystem|enableEndDialog|enableEngineArtillery|enableEnvironment|enableFatigue|enableGunLights|enableInfoPanelComponent|enableIRLasers|enableMimics|enablePersonTurret|enableRadio|enableReload|enableRopeAttach|enableSatNormalOnDetail|enableSaving|enableSentences|enableSimulation|enableSimulationGlobal|enableStamina|enableStressDamage|enableTeamSwitch|enableTraffic|enableUAVConnectability|enableUAVWaypoints|enableVehicleCargo|enableVehicleSensor|enableWeaponDisassembly|endl|endLoadingScreen|endMission|engineOn|enginesIsOnRTD|enginesPowerRTD|enginesRpmRTD|enginesTorqueRTD|entities|environmentEnabled|estimatedEndServerTime|estimatedTimeLeft|evalObjectArgument|everyBackpack|everyContainer|exec|execEditorScript|exp|expectedDestination|exportJIPMessages|eyeDirection|eyePos|face|faction|fadeMusic|fadeRadio|fadeSound|fadeSpeech|failMission|fillWeaponsFromPool|find|findCover|findDisplay|findEditorObject|findEmptyPosition|findEmptyPositionReady|findIf|findNearestEnemy|finishMissionInit|finite|fire|fireAtTarget|firstBackpack|flag|flagAnimationPhase|flagOwner|flagSide|flagTexture|fleeing|floor|flyInHeight|flyInHeightASL|fog|fogForecast|fogParams|forceAddUniform|forceAtPositionRTD|forcedMap|forceEnd|forceFlagTexture|forceFollowRoad|forceGeneratorRTD|forceMap|forceRespawn|forceSpeed|forceWalk|forceWeaponFire|forceWeatherChange|forgetTarget|format|formation|formationDirection|formationLeader|formationMembers|formationPosition|formationTask|formatText|formLeader|freeLook|fromEditor|fuel|fullCrew|gearIDCAmmoCount|gearSlotAmmoCount|gearSlotData|get3DENActionState|get3DENAttribute|get3DENCamera|get3DENConnections|get3DENEntity|get3DENEntityID|get3DENGrid|get3DENIconsVisible|get3DENLayerEntities|get3DENLinesVisible|get3DENMissionAttribute|get3DENMouseOver|get3DENSelected|getAimingCoef|getAllEnvSoundControllers|getAllHitPointsDamage|getAllOwnedMines|getAllSoundControllers|getAmmoCargo|getAnimAimPrecision|getAnimSpeedCoef|getArray|getArtilleryAmmo|getArtilleryComputerSettings|getArtilleryETA|getAssignedCuratorLogic|getAssignedCuratorUnit|getBackpackCargo|getBleedingRemaining|getBurningValue|getCameraViewDirection|getCargoIndex|getCenterOfMass|getClientState|getClientStateNumber|getCompatiblePylonMagazines|getConnectedUAV|getContainerMaxLoad|getCursorObjectParams|getCustomAimCoef|getDammage|getDescription|getDir|getDirVisual|getDLCAssetsUsage|getDLCAssetsUsageByName|getDLCs|getDLCUsageTime|getEditorCamera|getEditorMode|getEditorObjectScope|getElevationOffset|getEngineTargetRpmRTD|getEnvSoundController|getFatigue|getFieldManualStartPage|getForcedFlagTexture|getFriend|getFSMVariable|getFuelCargo|getGroupIcon|getGroupIconParams|getGroupIcons|getHideFrom|getHit|getHitIndex|getHitPointDamage|getItemCargo|getMagazineCargo|getMarkerColor|getMarkerPos|getMarkerSize|getMarkerType|getMass|getMissionConfig|getMissionConfigValue|getMissionDLCs|getMissionLayerEntities|getMissionLayers|getModelInfo|getMousePosition|getMusicPlayedTime|getNumber|getObjectArgument|getObjectChildren|getObjectDLC|getObjectMaterials|getObjectProxy|getObjectTextures|getObjectType|getObjectViewDistance|getOxygenRemaining|getPersonUsedDLCs|getPilotCameraDirection|getPilotCameraPosition|getPilotCameraRotation|getPilotCameraTarget|getPlateNumber|getPlayerChannel|getPlayerScores|getPlayerUID|getPlayerUIDOld|getPos|getPosASL|getPosASLVisual|getPosASLW|getPosATL|getPosATLVisual|getPosVisual|getPosWorld|getPylonMagazines|getRelDir|getRelPos|getRemoteSensorsDisabled|getRepairCargo|getResolution|getRotorBrakeRTD|getShadowDistance|getShotParents|getSlingLoad|getSoundController|getSoundControllerResult|getSpeed|getStamina|getStatValue|getSuppression|getTerrainGrid|getTerrainHeightASL|getText|getTotalDLCUsageTime|getTrimOffsetRTD|getUnitLoadout|getUnitTrait|getUserMFDText|getUserMFDValue|getVariable|getVehicleCargo|getWeaponCargo|getWeaponSway|getWingsOrientationRTD|getWingsPositionRTD|getWPPos|glanceAt|globalChat|globalRadio|goggles|group|groupChat|groupFromNetId|groupIconSelectable|groupIconsVisible|groupId|groupOwner|groupRadio|groupSelectedUnits|groupSelectUnit|grpNull|gunner|gusts|halt|handgunItems|handgunMagazine|handgunWeapon|handsHit|hasInterface|hasPilotCamera|hasWeapon|hcAllGroups|hcGroupParams|hcLeader|hcRemoveAllGroups|hcRemoveGroup|hcSelected|hcSelectGroup|hcSetGroup|hcShowBar|hcShownBar|headgear|hideBody|hideObject|hideObjectGlobal|hideSelection|hint|hintC|hintCadet|hintSilent|hmd|hostMission|htmlLoad|HUDMovementLevels|humidity|image|importAllGroups|importance|in|inArea|inAreaArray|incapacitatedState|independent|inflame|inflamed|infoPanel|infoPanelComponentEnabled|infoPanelComponents|infoPanels|inGameUISetEventHandler|inheritsFrom|initAmbientLife|inPolygon|inputAction|inRangeOfArtillery|insertEditorObject|intersect|is3DEN|is3DENMultiplayer|isAbleToBreathe|isAgent|isAimPrecisionEnabled|isArray|isAutoHoverOn|isAutonomous|isAutoStartUpEnabledRTD|isAutotest|isAutoTrimOnRTD|isBleeding|isBurning|isClass|isCollisionLightOn|isCopilotEnabled|isDamageAllowed|isDedicated|isDLCAvailable|isEngineOn|isEqualTo|isEqualType|isEqualTypeAll|isEqualTypeAny|isEqualTypeArray|isEqualTypeParams|isFilePatchingEnabled|isFlashlightOn|isFlatEmpty|isForcedWalk|isFormationLeader|isGroupDeletedWhenEmpty|isHidden|isInRemainsCollector|isInstructorFigureEnabled|isIRLaserOn|isKeyActive|isKindOf|isLaserOn|isLightOn|isLocalized|isManualFire|isMarkedForCollection|isMultiplayer|isMultiplayerSolo|isNil|isNull|isNumber|isObjectHidden|isObjectRTD|isOnRoad|isPipEnabled|isPlayer|isRealTime|isRemoteExecuted|isRemoteExecutedJIP|isServer|isShowing3DIcons|isSimpleObject|isSprintAllowed|isStaminaEnabled|isSteamMission|isStreamFriendlyUIEnabled|isStressDamageEnabled|isText|isTouchingGround|isTurnedOut|isTutHintsEnabled|isUAVConnectable|isUAVConnected|isUIContext|isUniformAllowed|isVehicleCargo|isVehicleRadarOn|isVehicleSensorEnabled|isWalking|isWeaponDeployed|isWeaponRested|itemCargo|items|itemsWithMagazines|join|joinAs|joinAsSilent|joinSilent|joinString|kbAddDatabase|kbAddDatabaseTargets|kbAddTopic|kbHasTopic|kbReact|kbRemoveTopic|kbTell|kbWasSaid|keyImage|keyName|knowsAbout|land|landAt|landResult|language|laserTarget|lbAdd|lbClear|lbColor|lbColorRight|lbCurSel|lbData|lbDelete|lbIsSelected|lbPicture|lbPictureRight|lbSelection|lbSetColor|lbSetColorRight|lbSetCurSel|lbSetData|lbSetPicture|lbSetPictureColor|lbSetPictureColorDisabled|lbSetPictureColorSelected|lbSetPictureRight|lbSetPictureRightColor|lbSetPictureRightColorDisabled|lbSetPictureRightColorSelected|lbSetSelectColor|lbSetSelectColorRight|lbSetSelected|lbSetText|lbSetTextRight|lbSetTooltip|lbSetValue|lbSize|lbSort|lbSortByValue|lbText|lbTextRight|lbValue|leader|leaderboardDeInit|leaderboardGetRows|leaderboardInit|leaderboardRequestRowsFriends|leaderboardRequestRowsGlobal|leaderboardRequestRowsGlobalAroundUser|leaderboardsRequestUploadScore|leaderboardsRequestUploadScoreKeepBest|leaderboardState|leaveVehicle|libraryCredits|libraryDisclaimers|lifeState|lightAttachObject|lightDetachObject|lightIsOn|lightnings|limitSpeed|linearConversion|lineBreak|lineIntersects|lineIntersectsObjs|lineIntersectsSurfaces|lineIntersectsWith|linkItem|list|listObjects|listRemoteTargets|listVehicleSensors|ln|lnbAddArray|lnbAddColumn|lnbAddRow|lnbClear|lnbColor|lnbColorRight|lnbCurSelRow|lnbData|lnbDeleteColumn|lnbDeleteRow|lnbGetColumnsPosition|lnbPicture|lnbPictureRight|lnbSetColor|lnbSetColorRight|lnbSetColumnsPos|lnbSetCurSelRow|lnbSetData|lnbSetPicture|lnbSetPictureColor|lnbSetPictureColorRight|lnbSetPictureColorSelected|lnbSetPictureColorSelectedRight|lnbSetPictureRight|lnbSetText|lnbSetTextRight|lnbSetValue|lnbSize|lnbSort|lnbSortByValue|lnbText|lnbTextRight|lnbValue|load|loadAbs|loadBackpack|loadFile|loadGame|loadIdentity|loadMagazine|loadOverlay|loadStatus|loadUniform|loadVest|local|localize|locationNull|locationPosition|lock|lockCameraTo|lockCargo|lockDriver|locked|lockedCargo|lockedDriver|lockedTurret|lockIdentity|lockTurret|lockWP|log|logEntities|logNetwork|logNetworkTerminate|lookAt|lookAtPos|magazineCargo|magazines|magazinesAllTurrets|magazinesAmmo|magazinesAmmoCargo|magazinesAmmoFull|magazinesDetail|magazinesDetailBackpack|magazinesDetailUniform|magazinesDetailVest|magazinesTurret|magazineTurretAmmo|mapAnimAdd|mapAnimClear|mapAnimCommit|mapAnimDone|mapCenterOnCamera|mapGridPosition|markAsFinishedOnSteam|markerAlpha|markerBrush|markerColor|markerDir|markerPos|markerShape|markerSize|markerText|markerType|max|members|menuAction|menuAdd|menuChecked|menuClear|menuCollapse|menuData|menuDelete|menuEnable|menuEnabled|menuExpand|menuHover|menuPicture|menuSetAction|menuSetCheck|menuSetData|menuSetPicture|menuSetValue|menuShortcut|menuShortcutText|menuSize|menuSort|menuText|menuURL|menuValue|min|mineActive|mineDetectedBy|missionConfigFile|missionDifficulty|missionName|missionNamespace|missionStart|missionVersion|modelToWorld|modelToWorldVisual|modelToWorldVisualWorld|modelToWorldWorld|modParams|moonIntensity|moonPhase|morale|move|move3DENCamera|moveInAny|moveInCargo|moveInCommander|moveInDriver|moveInGunner|moveInTurret|moveObjectToEnd|moveOut|moveTime|moveTo|moveToCompleted|moveToFailed|musicVolume|name|nameSound|nearEntities|nearestBuilding|nearestLocation|nearestLocations|nearestLocationWithDubbing|nearestObject|nearestObjects|nearestTerrainObjects|nearObjects|nearObjectsReady|nearRoads|nearSupplies|nearTargets|needReload|netId|netObjNull|newOverlay|nextMenuItemIndex|nextWeatherChange|nMenuItems|numberOfEnginesRTD|numberToDate|objectCurators|objectFromNetId|objectParent|objNull|objStatus|onBriefingGear|onBriefingGroup|onBriefingNotes|onBriefingPlan|onBriefingTeamSwitch|onCommandModeChanged|onDoubleClick|onEachFrame|onGroupIconClick|onGroupIconOverEnter|onGroupIconOverLeave|onHCGroupSelectionChanged|onMapSingleClick|onPlayerConnected|onPlayerDisconnected|onPreloadFinished|onPreloadStarted|onShowNewObject|onTeamSwitch|openCuratorInterface|openDLCPage|openDSInterface|openMap|openSteamApp|openYoutubeVideo|opfor|orderGetIn|overcast|overcastForecast|owner|param|params|parseNumber|parseSimpleArray|parseText|parsingNamespace|particlesQuality|pi|pickWeaponPool|pitch|pixelGrid|pixelGridBase|pixelGridNoUIScale|pixelH|pixelW|playableSlotsNumber|playableUnits|playAction|playActionNow|player|playerRespawnTime|playerSide|playersNumber|playGesture|playMission|playMove|playMoveNow|playMusic|playScriptedMission|playSound|playSound3D|position|positionCameraToWorld|posScreenToWorld|posWorldToScreen|ppEffectAdjust|ppEffectCommit|ppEffectCommitted|ppEffectCreate|ppEffectDestroy|ppEffectEnable|ppEffectEnabled|ppEffectForceInNVG|precision|preloadCamera|preloadObject|preloadSound|preloadTitleObj|preloadTitleRsc|primaryWeapon|primaryWeaponItems|primaryWeaponMagazine|priority|processDiaryLink|processInitCommands|productVersion|profileName|profileNamespace|profileNameSteam|progressLoadingScreen|progressPosition|progressSetPosition|publicVariable|publicVariableClient|publicVariableServer|pushBack|pushBackUnique|putWeaponPool|queryItemsPool|queryMagazinePool|queryWeaponPool|rad|radioChannelAdd|radioChannelCreate|radioChannelRemove|radioChannelSetCallSign|radioChannelSetLabel|radioVolume|rain|rainbow|random|rank|rankId|rating|rectangular|registeredTasks|registerTask|reload|reloadEnabled|remoteControl|remoteExec|remoteExecCall|remoteExecutedOwner|remove3DENConnection|remove3DENEventHandler|remove3DENLayer|removeAction|removeAll3DENEventHandlers|removeAllActions|removeAllAssignedItems|removeAllContainers|removeAllCuratorAddons|removeAllCuratorCameraAreas|removeAllCuratorEditingAreas|removeAllEventHandlers|removeAllHandgunItems|removeAllItems|removeAllItemsWithMagazines|removeAllMissionEventHandlers|removeAllMPEventHandlers|removeAllMusicEventHandlers|removeAllOwnedMines|removeAllPrimaryWeaponItems|removeAllWeapons|removeBackpack|removeBackpackGlobal|removeCuratorAddons|removeCuratorCameraArea|removeCuratorEditableObjects|removeCuratorEditingArea|removeDrawIcon|removeDrawLinks|removeEventHandler|removeFromRemainsCollector|removeGoggles|removeGroupIcon|removeHandgunItem|removeHeadgear|removeItem|removeItemFromBackpack|removeItemFromUniform|removeItemFromVest|removeItems|removeMagazine|removeMagazineGlobal|removeMagazines|removeMagazinesTurret|removeMagazineTurret|removeMenuItem|removeMissionEventHandler|removeMPEventHandler|removeMusicEventHandler|removeOwnedMine|removePrimaryWeaponItem|removeSecondaryWeaponItem|removeSimpleTask|removeSwitchableUnit|removeTeamMember|removeUniform|removeVest|removeWeapon|removeWeaponAttachmentCargo|removeWeaponCargo|removeWeaponGlobal|removeWeaponTurret|reportRemoteTarget|requiredVersion|resetCamShake|resetSubgroupDirection|resistance|resize|resources|respawnVehicle|restartEditorCamera|reveal|revealMine|reverse|reversedMouseY|roadAt|roadsConnectedTo|roleDescription|ropeAttachedObjects|ropeAttachedTo|ropeAttachEnabled|ropeAttachTo|ropeCreate|ropeCut|ropeDestroy|ropeDetach|ropeEndPosition|ropeLength|ropes|ropeUnwind|ropeUnwound|rotorsForcesRTD|rotorsRpmRTD|round|runInitScript|safeZoneH|safeZoneW|safeZoneWAbs|safeZoneX|safeZoneXAbs|safeZoneY|save3DENInventory|saveGame|saveIdentity|saveJoysticks|saveOverlay|saveProfileNamespace|saveStatus|saveVar|savingEnabled|say|say2D|say3D|score|scoreSide|screenshot|screenToWorld|scriptDone|scriptName|scriptNull|scudState|secondaryWeapon|secondaryWeaponItems|secondaryWeaponMagazine|select|selectBestPlaces|selectDiarySubject|selectedEditorObjects|selectEditorObject|selectionNames|selectionPosition|selectLeader|selectMax|selectMin|selectNoPlayer|selectPlayer|selectRandom|selectRandomWeighted|selectWeapon|selectWeaponTurret|sendAUMessage|sendSimpleCommand|sendTask|sendTaskResult|sendUDPMessage|serverCommand|serverCommandAvailable|serverCommandExecutable|serverName|serverTime|set|set3DENAttribute|set3DENAttributes|set3DENGrid|set3DENIconsVisible|set3DENLayer|set3DENLinesVisible|set3DENLogicType|set3DENMissionAttribute|set3DENMissionAttributes|set3DENModelsVisible|set3DENObjectType|set3DENSelected|setAccTime|setActualCollectiveRTD|setAirplaneThrottle|setAirportSide|setAmmo|setAmmoCargo|setAmmoOnPylon|setAnimSpeedCoef|setAperture|setApertureNew|setArmoryPoints|setAttributes|setAutonomous|setBehaviour|setBleedingRemaining|setBrakesRTD|setCameraInterest|setCamShakeDefParams|setCamShakeParams|setCamUseTI|setCaptive|setCenterOfMass|setCollisionLight|setCombatMode|setCompassOscillation|setConvoySeparation|setCuratorCameraAreaCeiling|setCuratorCoef|setCuratorEditingAreaType|setCuratorWaypointCost|setCurrentChannel|setCurrentTask|setCurrentWaypoint|setCustomAimCoef|setCustomWeightRTD|setDamage|setDammage|setDate|setDebriefingText|setDefaultCamera|setDestination|setDetailMapBlendPars|setDir|setDirection|setDrawIcon|setDriveOnPath|setDropInterval|setDynamicSimulationDistance|setDynamicSimulationDistanceCoef|setEditorMode|setEditorObjectScope|setEffectCondition|setEngineRpmRTD|setFace|setFaceAnimation|setFatigue|setFeatureType|setFlagAnimationPhase|setFlagOwner|setFlagSide|setFlagTexture|setFog|setForceGeneratorRTD|setFormation|setFormationTask|setFormDir|setFriend|setFromEditor|setFSMVariable|setFuel|setFuelCargo|setGroupIcon|setGroupIconParams|setGroupIconsSelectable|setGroupIconsVisible|setGroupId|setGroupIdGlobal|setGroupOwner|setGusts|setHideBehind|setHit|setHitIndex|setHitPointDamage|setHorizonParallaxCoef|setHUDMovementLevels|setIdentity|setImportance|setInfoPanel|setLeader|setLightAmbient|setLightAttenuation|setLightBrightness|setLightColor|setLightDayLight|setLightFlareMaxDistance|setLightFlareSize|setLightIntensity|setLightnings|setLightUseFlare|setLocalWindParams|setMagazineTurretAmmo|setMarkerAlpha|setMarkerAlphaLocal|setMarkerBrush|setMarkerBrushLocal|setMarkerColor|setMarkerColorLocal|setMarkerDir|setMarkerDirLocal|setMarkerPos|setMarkerPosLocal|setMarkerShape|setMarkerShapeLocal|setMarkerSize|setMarkerSizeLocal|setMarkerText|setMarkerTextLocal|setMarkerType|setMarkerTypeLocal|setMass|setMimic|setMousePosition|setMusicEffect|setMusicEventHandler|setName|setNameSound|setObjectArguments|setObjectMaterial|setObjectMaterialGlobal|setObjectProxy|setObjectTexture|setObjectTextureGlobal|setObjectViewDistance|setOvercast|setOwner|setOxygenRemaining|setParticleCircle|setParticleClass|setParticleFire|setParticleParams|setParticleRandom|setPilotCameraDirection|setPilotCameraRotation|setPilotCameraTarget|setPilotLight|setPiPEffect|setPitch|setPlateNumber|setPlayable|setPlayerRespawnTime|setPos|setPosASL|setPosASL2|setPosASLW|setPosATL|setPosition|setPosWorld|setPylonLoadOut|setPylonsPriority|setRadioMsg|setRain|setRainbow|setRandomLip|setRank|setRectangular|setRepairCargo|setRotorBrakeRTD|setShadowDistance|setShotParents|setSide|setSimpleTaskAlwaysVisible|setSimpleTaskCustomData|setSimpleTaskDescription|setSimpleTaskDestination|setSimpleTaskTarget|setSimpleTaskType|setSimulWeatherLayers|setSize|setSkill|setSlingLoad|setSoundEffect|setSpeaker|setSpeech|setSpeedMode|setStamina|setStaminaScheme|setStatValue|setSuppression|setSystemOfUnits|setTargetAge|setTaskMarkerOffset|setTaskResult|setTaskState|setTerrainGrid|setText|setTimeMultiplier|setTitleEffect|setToneMapping|setToneMappingParams|setTrafficDensity|setTrafficDistance|setTrafficGap|setTrafficSpeed|setTriggerActivation|setTriggerArea|setTriggerStatements|setTriggerText|setTriggerTimeout|setTriggerType|setType|setUnconscious|setUnitAbility|setUnitLoadout|setUnitPos|setUnitPosWeak|setUnitRank|setUnitRecoilCoefficient|setUnitTrait|setUnloadInCombat|setUserActionText|setUserMFDText|setUserMFDValue|setVariable|setVectorDir|setVectorDirAndUp|setVectorUp|setVehicleAmmo|setVehicleAmmoDef|setVehicleArmor|setVehicleCargo|setVehicleId|setVehicleInit|setVehicleLock|setVehiclePosition|setVehicleRadar|setVehicleReceiveRemoteTargets|setVehicleReportOwnPosition|setVehicleReportRemoteTargets|setVehicleTIPars|setVehicleVarName|setVelocity|setVelocityModelSpace|setVelocityTransformation|setViewDistance|setVisibleIfTreeCollapsed|setWantedRpmRTD|setWaves|setWaypointBehaviour|setWaypointCombatMode|setWaypointCompletionRadius|setWaypointDescription|setWaypointForceBehaviour|setWaypointFormation|setWaypointHousePosition|setWaypointLoiterRadius|setWaypointLoiterType|setWaypointName|setWaypointPosition|setWaypointScript|setWaypointSpeed|setWaypointStatements|setWaypointTimeout|setWaypointType|setWaypointVisible|setWeaponReloadingTime|setWind|setWindDir|setWindForce|setWindStr|setWingForceScaleRTD|setWPPos|show3DIcons|showChat|showCinemaBorder|showCommandingMenu|showCompass|showCuratorCompass|showGPS|showHUD|showLegend|showMap|shownArtilleryComputer|shownChat|shownCompass|shownCuratorCompass|showNewEditorObject|shownGPS|shownHUD|shownMap|shownPad|shownRadio|shownScoretable|shownUAVFeed|shownWarrant|shownWatch|showPad|showRadio|showScoretable|showSubtitles|showUAVFeed|showWarrant|showWatch|showWaypoint|showWaypoints|side|sideAmbientLife|sideChat|sideEmpty|sideEnemy|sideFriendly|sideLogic|sideRadio|sideUnknown|simpleTasks|simulationEnabled|simulCloudDensity|simulCloudOcclusion|simulInClouds|simulWeatherSync|sin|size|sizeOf|skill|skillFinal|skipTime|sleep|sliderPosition|sliderRange|sliderSetPosition|sliderSetRange|sliderSetSpeed|sliderSpeed|slingLoadAssistantShown|soldierMagazines|someAmmo|sort|soundVolume|speaker|speed|speedMode|splitString|sqrt|squadParams|stance|startLoadingScreen|stop|stopEngineRTD|stopped|str|sunOrMoon|supportInfo|suppressFor|surfaceIsWater|surfaceNormal|surfaceType|swimInDepth|switchableUnits|switchAction|switchCamera|switchGesture|switchLight|switchMove|synchronizedObjects|synchronizedTriggers|synchronizedWaypoints|synchronizeObjectsAdd|synchronizeObjectsRemove|synchronizeTrigger|synchronizeWaypoint|systemChat|systemOfUnits|tan|targetKnowledge|targets|targetsAggregate|targetsQuery|taskAlwaysVisible|taskChildren|taskCompleted|taskCustomData|taskDescription|taskDestination|taskHint|taskMarkerOffset|taskNull|taskParent|taskResult|taskState|taskType|teamMember|teamMemberNull|teamName|teams|teamSwitch|teamSwitchEnabled|teamType|terminate|terrainIntersect|terrainIntersectASL|terrainIntersectAtASL|text|textLog|textLogFormat|tg|time|timeMultiplier|titleCut|titleFadeOut|titleObj|titleRsc|titleText|toArray|toFixed|toLower|toString|toUpper|triggerActivated|triggerActivation|triggerArea|triggerAttachedVehicle|triggerAttachObject|triggerAttachVehicle|triggerDynamicSimulation|triggerStatements|triggerText|triggerTimeout|triggerTimeoutCurrent|triggerType|turretLocal|turretOwner|turretUnit|tvAdd|tvClear|tvCollapse|tvCollapseAll|tvCount|tvCurSel|tvData|tvDelete|tvExpand|tvExpandAll|tvPicture|tvPictureRight|tvSetColor|tvSetCurSel|tvSetData|tvSetPicture|tvSetPictureColor|tvSetPictureColorDisabled|tvSetPictureColorSelected|tvSetPictureRight|tvSetPictureRightColor|tvSetPictureRightColorDisabled|tvSetPictureRightColorSelected|tvSetSelectColor|tvSetText|tvSetTooltip|tvSetValue|tvSort|tvSortByValue|tvText|tvTooltip|tvValue|type|typeName|typeOf|UAVControl|uiNamespace|uiSleep|unassignCurator|unassignItem|unassignTeam|unassignVehicle|underwater|uniform|uniformContainer|uniformItems|uniformMagazines|unitAddons|unitAimPosition|unitAimPositionVisual|unitBackpack|unitIsUAV|unitPos|unitReady|unitRecoilCoefficient|units|unitsBelowHeight|unlinkItem|unlockAchievement|unregisterTask|updateDrawIcon|updateMenuItem|updateObjectTree|useAIOperMapObstructionTest|useAISteeringComponent|useAudioTimeForMoves|userInputDisabled|vectorAdd|vectorCos|vectorCrossProduct|vectorDiff|vectorDir|vectorDirVisual|vectorDistance|vectorDistanceSqr|vectorDotProduct|vectorFromTo|vectorMagnitude|vectorMagnitudeSqr|vectorModelToWorld|vectorModelToWorldVisual|vectorMultiply|vectorNormalized|vectorUp|vectorUpVisual|vectorWorldToModel|vectorWorldToModelVisual|vehicle|vehicleCargoEnabled|vehicleChat|vehicleRadio|vehicleReceiveRemoteTargets|vehicleReportOwnPosition|vehicleReportRemoteTargets|vehicles|vehicleVarName|velocity|velocityModelSpace|verifySignature|vest|vestContainer|vestItems|vestMagazines|viewDistance|visibleCompass|visibleGPS|visibleMap|visiblePosition|visiblePositionASL|visibleScoretable|visibleWatch|waitUntil|waves|waypointAttachedObject|waypointAttachedVehicle|waypointAttachObject|waypointAttachVehicle|waypointBehaviour|waypointCombatMode|waypointCompletionRadius|waypointDescription|waypointForceBehaviour|waypointFormation|waypointHousePosition|waypointLoiterRadius|waypointLoiterType|waypointName|waypointPosition|waypoints|waypointScript|waypointsEnabledUAV|waypointShow|waypointSpeed|waypointStatements|waypointTimeout|waypointTimeoutCurrent|waypointType|waypointVisible|weaponAccessories|weaponAccessoriesCargo|weaponCargo|weaponDirection|weaponInertia|weaponLowered|weapons|weaponsItems|weaponsItemsCargo|weaponState|weaponsTurret|weightRTD|west|WFSideText|wind|windDir|windRTD|windStr|wingsForcesRTD|worldName|worldSize|worldToModel|worldToModelVisual|worldToScreen)\b/i,number:/(?:\$|\b0x)[\da-f]+\b|(?:\B\.\d+|\b\d+(?:\.\d+)?)(?:e[+-]?\d+)?\b/i,operator:/##|>>|&&|\|\||[!=<>]=?|[-+*/%#^]|\b(?:and|mod|not|or)\b/i,"magic-variable":{pattern:/\b(?:this|thisList|thisTrigger|_exception|_fnc_scriptName|_fnc_scriptNameParent|_forEachIndex|_this|_thisEventHandler|_thisFSM|_thisScript|_x)\b/i,alias:"keyword"},constant:/\bDIK(?:_[a-z\d]+)+\b/i}),Prism.languages.insertBefore("sqf","string",{macro:{pattern:/(^[ \t]*)#[a-z](?:[^\r\n\\]|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{directive:{pattern:/#[a-z]+\b/i,alias:"keyword"},comment:Prism.languages.sqf.comment}}}),delete Prism.languages.sqf["class-name"]; \ No newline at end of file diff --git a/components/prism-sql.js b/components/prism-sql.js index 449a2fe199..71e64b7649 100644 --- a/components/prism-sql.js +++ b/components/prism-sql.js @@ -16,9 +16,9 @@ Prism.languages.sql = { lookbehind: true }, 'function': /\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i, // Should we highlight user defined functions too? - 'keyword': /\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:_INSERT|COL)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:S|ING)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i, - 'boolean': /\b(?:TRUE|FALSE|NULL)\b/i, + 'keyword': /\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i, + 'boolean': /\b(?:FALSE|NULL|TRUE)\b/i, 'number': /\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i, - 'operator': /[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|IN|ILIKE|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i, + 'operator': /[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i, 'punctuation': /[;[\]()`,.]/ }; diff --git a/components/prism-sql.min.js b/components/prism-sql.min.js index 62e7cb631a..83da6942eb 100644 --- a/components/prism-sql.min.js +++ b/components/prism-sql.min.js @@ -1 +1 @@ -Prism.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:_INSERT|COL)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:S|ING)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:TRUE|FALSE|NULL)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|IN|ILIKE|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/}; \ No newline at end of file +Prism.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/}; \ No newline at end of file diff --git a/components/prism-squirrel.js b/components/prism-squirrel.js index 9727a765b7..9e1db541ae 100644 --- a/components/prism-squirrel.js +++ b/components/prism-squirrel.js @@ -27,7 +27,7 @@ Prism.languages.squirrel = Prism.languages.extend('clike', { 'punctuation': /\./ } }, - 'keyword': /\b(?:base|break|case|catch|class|clone|const|constructor|continue|default|delete|else|enum|extends|for|foreach|function|if|in|instanceof|local|null|resume|return|static|switch|this|throw|try|typeof|while|yield|__LINE__|__FILE__)\b/, + 'keyword': /\b(?:__FILE__|__LINE__|base|break|case|catch|class|clone|const|constructor|continue|default|delete|else|enum|extends|for|foreach|function|if|in|instanceof|local|null|resume|return|static|switch|this|throw|try|typeof|while|yield)\b/, 'number': /\b(?:0x[0-9a-fA-F]+|\d+(?:\.(?:\d+|[eE][+-]?\d+))?)\b/, 'operator': /\+\+|--|<=>|<[-<]|>>>?|&&?|\|\|?|[-+*/%!=<>]=?|[~^]|::?/, diff --git a/components/prism-squirrel.min.js b/components/prism-squirrel.min.js index 006e28d065..200885b6f8 100644 --- a/components/prism-squirrel.min.js +++ b/components/prism-squirrel.min.js @@ -1 +1 @@ -Prism.languages.squirrel=Prism.languages.extend("clike",{comment:[Prism.languages.clike.comment[0],{pattern:/(^|[^\\:])(?:\/\/|#).*/,lookbehind:!0,greedy:!0}],string:[{pattern:/(^|[^\\"'@])(?:@"(?:[^"]|"")*"(?!")|"(?:[^\\\r\n"]|\\.)*")/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\"'])'(?:[^\\']|\\(?:[xuU][0-9a-fA-F]{0,8}|[\s\S]))'/,lookbehind:!0,greedy:!0}],"class-name":{pattern:/(\b(?:class|enum|extends|instanceof)\s+)\w+(?:\.\w+)*/,lookbehind:!0,inside:{punctuation:/\./}},keyword:/\b(?:base|break|case|catch|class|clone|const|constructor|continue|default|delete|else|enum|extends|for|foreach|function|if|in|instanceof|local|null|resume|return|static|switch|this|throw|try|typeof|while|yield|__LINE__|__FILE__)\b/,number:/\b(?:0x[0-9a-fA-F]+|\d+(?:\.(?:\d+|[eE][+-]?\d+))?)\b/,operator:/\+\+|--|<=>|<[-<]|>>>?|&&?|\|\|?|[-+*/%!=<>]=?|[~^]|::?/,punctuation:/[(){}\[\],;.]/}),Prism.languages.insertBefore("squirrel","operator",{"attribute-punctuation":{pattern:/<\/|\/>/,alias:"important"},lambda:{pattern:/@(?=\()/,alias:"operator"}}); \ No newline at end of file +Prism.languages.squirrel=Prism.languages.extend("clike",{comment:[Prism.languages.clike.comment[0],{pattern:/(^|[^\\:])(?:\/\/|#).*/,lookbehind:!0,greedy:!0}],string:[{pattern:/(^|[^\\"'@])(?:@"(?:[^"]|"")*"(?!")|"(?:[^\\\r\n"]|\\.)*")/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\"'])'(?:[^\\']|\\(?:[xuU][0-9a-fA-F]{0,8}|[\s\S]))'/,lookbehind:!0,greedy:!0}],"class-name":{pattern:/(\b(?:class|enum|extends|instanceof)\s+)\w+(?:\.\w+)*/,lookbehind:!0,inside:{punctuation:/\./}},keyword:/\b(?:__FILE__|__LINE__|base|break|case|catch|class|clone|const|constructor|continue|default|delete|else|enum|extends|for|foreach|function|if|in|instanceof|local|null|resume|return|static|switch|this|throw|try|typeof|while|yield)\b/,number:/\b(?:0x[0-9a-fA-F]+|\d+(?:\.(?:\d+|[eE][+-]?\d+))?)\b/,operator:/\+\+|--|<=>|<[-<]|>>>?|&&?|\|\|?|[-+*/%!=<>]=?|[~^]|::?/,punctuation:/[(){}\[\],;.]/}),Prism.languages.insertBefore("squirrel","operator",{"attribute-punctuation":{pattern:/<\/|\/>/,alias:"important"},lambda:{pattern:/@(?=\()/,alias:"operator"}}); \ No newline at end of file diff --git a/components/prism-stylus.js b/components/prism-stylus.js index 89cb2c3022..1dde3e7146 100644 --- a/components/prism-stylus.js +++ b/components/prism-stylus.js @@ -26,14 +26,14 @@ 'func': null, // See below 'important': /\B!(?:important|optional)\b/i, 'keyword': { - pattern: /(^|\s+)(?:(?:if|else|for|return|unless)(?=\s|$)|@[\w-]+)/, + pattern: /(^|\s+)(?:(?:else|for|if|return|unless)(?=\s|$)|@[\w-]+)/, lookbehind: true }, 'hexcode': /#[\da-f]{3,6}/i, 'color': [ /\b(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)\b/i, { - pattern: /\b(?:rgb|hsl)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:rgb|hsl)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i, + pattern: /\b(?:hsl|rgb)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:hsl|rgb)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i, inside: { 'unit': unit, 'number': number, @@ -44,7 +44,7 @@ ], 'entity': /\\[\da-f]{1,8}/i, 'unit': unit, - 'boolean': /\b(?:true|false)\b/, + 'boolean': /\b(?:false|true)\b/, 'operator': [ // We want non-word chars around "-" because it is // accepted in property names. @@ -92,7 +92,7 @@ }, 'statement': { - pattern: /(^[ \t]*)(?:if|else|for|return|unless)[ \t].+/m, + pattern: /(^[ \t]*)(?:else|for|if|return|unless)[ \t].+/m, lookbehind: true, inside: { 'keyword': /^\S+/, diff --git a/components/prism-stylus.min.js b/components/prism-stylus.min.js index 93b83bd654..a9682d8f28 100644 --- a/components/prism-stylus.min.js +++ b/components/prism-stylus.min.js @@ -1 +1 @@ -!function(e){var n={pattern:/(\b\d+)(?:%|[a-z]+)/,lookbehind:!0},r={pattern:/(^|[^\w.-])-?(?:\d+(?:\.\d+)?|\.\d+)/,lookbehind:!0},t={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0},url:{pattern:/\burl\((["']?).*?\1\)/i,greedy:!0},string:{pattern:/("|')(?:(?!\1)[^\\\r\n]|\\(?:\r\n|[\s\S]))*\1/,greedy:!0},interpolation:null,func:null,important:/\B!(?:important|optional)\b/i,keyword:{pattern:/(^|\s+)(?:(?:if|else|for|return|unless)(?=\s|$)|@[\w-]+)/,lookbehind:!0},hexcode:/#[\da-f]{3,6}/i,color:[/\b(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)\b/i,{pattern:/\b(?:rgb|hsl)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:rgb|hsl)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,inside:{unit:n,number:r,function:/[\w-]+(?=\()/,punctuation:/[(),]/}}],entity:/\\[\da-f]{1,8}/i,unit:n,boolean:/\b(?:true|false)\b/,operator:[/~|[+!\/%<>?=]=?|[-:]=|\*[*=]?|\.{2,3}|&&|\|\||\B-\B|\b(?:and|in|is(?: a| defined| not|nt)?|not|or)\b/],number:r,punctuation:/[{}()\[\];:,]/};t.interpolation={pattern:/\{[^\r\n}:]+\}/,alias:"variable",inside:{delimiter:{pattern:/^\{|\}$/,alias:"punctuation"},rest:t}},t.func={pattern:/[\w-]+\([^)]*\).*/,inside:{function:/^[^(]+/,rest:t}},e.languages.stylus={"atrule-declaration":{pattern:/(^[ \t]*)@.+/m,lookbehind:!0,inside:{atrule:/^@[\w-]+/,rest:t}},"variable-declaration":{pattern:/(^[ \t]*)[\w$-]+\s*.?=[ \t]*(?:\{[^{}]*\}|\S.*|$)/m,lookbehind:!0,inside:{variable:/^\S+/,rest:t}},statement:{pattern:/(^[ \t]*)(?:if|else|for|return|unless)[ \t].+/m,lookbehind:!0,inside:{keyword:/^\S+/,rest:t}},"property-declaration":{pattern:/((?:^|\{)([ \t]*))(?:[\w-]|\{[^}\r\n]+\})+(?:\s*:\s*|[ \t]+)(?!\s)[^{\r\n]*(?:;|[^{\r\n,]$(?!(?:\r?\n|\r)(?:\{|\2[ \t])))/m,lookbehind:!0,inside:{property:{pattern:/^[^\s:]+/,inside:{interpolation:t.interpolation}},rest:t}},selector:{pattern:/(^[ \t]*)(?:(?=\S)(?:[^{}\r\n:()]|::?[\w-]+(?:\([^)\r\n]*\)|(?![\w-]))|\{[^}\r\n]+\})+)(?:(?:\r?\n|\r)(?:\1(?:(?=\S)(?:[^{}\r\n:()]|::?[\w-]+(?:\([^)\r\n]*\)|(?![\w-]))|\{[^}\r\n]+\})+)))*(?:,$|\{|(?=(?:\r?\n|\r)(?:\{|\1[ \t])))/m,lookbehind:!0,inside:{interpolation:t.interpolation,comment:t.comment,punctuation:/[{},]/}},func:t.func,string:t.string,comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0,greedy:!0},interpolation:t.interpolation,punctuation:/[{}()\[\];:.]/}}(Prism); \ No newline at end of file +!function(e){var n={pattern:/(\b\d+)(?:%|[a-z]+)/,lookbehind:!0},r={pattern:/(^|[^\w.-])-?(?:\d+(?:\.\d+)?|\.\d+)/,lookbehind:!0},t={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0},url:{pattern:/\burl\((["']?).*?\1\)/i,greedy:!0},string:{pattern:/("|')(?:(?!\1)[^\\\r\n]|\\(?:\r\n|[\s\S]))*\1/,greedy:!0},interpolation:null,func:null,important:/\B!(?:important|optional)\b/i,keyword:{pattern:/(^|\s+)(?:(?:else|for|if|return|unless)(?=\s|$)|@[\w-]+)/,lookbehind:!0},hexcode:/#[\da-f]{3,6}/i,color:[/\b(?:AliceBlue|AntiqueWhite|Aqua|Aquamarine|Azure|Beige|Bisque|Black|BlanchedAlmond|Blue|BlueViolet|Brown|BurlyWood|CadetBlue|Chartreuse|Chocolate|Coral|CornflowerBlue|Cornsilk|Crimson|Cyan|DarkBlue|DarkCyan|DarkGoldenRod|DarkGr[ae]y|DarkGreen|DarkKhaki|DarkMagenta|DarkOliveGreen|DarkOrange|DarkOrchid|DarkRed|DarkSalmon|DarkSeaGreen|DarkSlateBlue|DarkSlateGr[ae]y|DarkTurquoise|DarkViolet|DeepPink|DeepSkyBlue|DimGr[ae]y|DodgerBlue|FireBrick|FloralWhite|ForestGreen|Fuchsia|Gainsboro|GhostWhite|Gold|GoldenRod|Gr[ae]y|Green|GreenYellow|HoneyDew|HotPink|IndianRed|Indigo|Ivory|Khaki|Lavender|LavenderBlush|LawnGreen|LemonChiffon|LightBlue|LightCoral|LightCyan|LightGoldenRodYellow|LightGr[ae]y|LightGreen|LightPink|LightSalmon|LightSeaGreen|LightSkyBlue|LightSlateGr[ae]y|LightSteelBlue|LightYellow|Lime|LimeGreen|Linen|Magenta|Maroon|MediumAquaMarine|MediumBlue|MediumOrchid|MediumPurple|MediumSeaGreen|MediumSlateBlue|MediumSpringGreen|MediumTurquoise|MediumVioletRed|MidnightBlue|MintCream|MistyRose|Moccasin|NavajoWhite|Navy|OldLace|Olive|OliveDrab|Orange|OrangeRed|Orchid|PaleGoldenRod|PaleGreen|PaleTurquoise|PaleVioletRed|PapayaWhip|PeachPuff|Peru|Pink|Plum|PowderBlue|Purple|Red|RosyBrown|RoyalBlue|SaddleBrown|Salmon|SandyBrown|SeaGreen|SeaShell|Sienna|Silver|SkyBlue|SlateBlue|SlateGr[ae]y|Snow|SpringGreen|SteelBlue|Tan|Teal|Thistle|Tomato|Transparent|Turquoise|Violet|Wheat|White|WhiteSmoke|Yellow|YellowGreen)\b/i,{pattern:/\b(?:hsl|rgb)\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*\)\B|\b(?:hsl|rgb)a\(\s*\d{1,3}\s*,\s*\d{1,3}%?\s*,\s*\d{1,3}%?\s*,\s*(?:0|0?\.\d+|1)\s*\)\B/i,inside:{unit:n,number:r,function:/[\w-]+(?=\()/,punctuation:/[(),]/}}],entity:/\\[\da-f]{1,8}/i,unit:n,boolean:/\b(?:false|true)\b/,operator:[/~|[+!\/%<>?=]=?|[-:]=|\*[*=]?|\.{2,3}|&&|\|\||\B-\B|\b(?:and|in|is(?: a| defined| not|nt)?|not|or)\b/],number:r,punctuation:/[{}()\[\];:,]/};t.interpolation={pattern:/\{[^\r\n}:]+\}/,alias:"variable",inside:{delimiter:{pattern:/^\{|\}$/,alias:"punctuation"},rest:t}},t.func={pattern:/[\w-]+\([^)]*\).*/,inside:{function:/^[^(]+/,rest:t}},e.languages.stylus={"atrule-declaration":{pattern:/(^[ \t]*)@.+/m,lookbehind:!0,inside:{atrule:/^@[\w-]+/,rest:t}},"variable-declaration":{pattern:/(^[ \t]*)[\w$-]+\s*.?=[ \t]*(?:\{[^{}]*\}|\S.*|$)/m,lookbehind:!0,inside:{variable:/^\S+/,rest:t}},statement:{pattern:/(^[ \t]*)(?:else|for|if|return|unless)[ \t].+/m,lookbehind:!0,inside:{keyword:/^\S+/,rest:t}},"property-declaration":{pattern:/((?:^|\{)([ \t]*))(?:[\w-]|\{[^}\r\n]+\})+(?:\s*:\s*|[ \t]+)(?!\s)[^{\r\n]*(?:;|[^{\r\n,]$(?!(?:\r?\n|\r)(?:\{|\2[ \t])))/m,lookbehind:!0,inside:{property:{pattern:/^[^\s:]+/,inside:{interpolation:t.interpolation}},rest:t}},selector:{pattern:/(^[ \t]*)(?:(?=\S)(?:[^{}\r\n:()]|::?[\w-]+(?:\([^)\r\n]*\)|(?![\w-]))|\{[^}\r\n]+\})+)(?:(?:\r?\n|\r)(?:\1(?:(?=\S)(?:[^{}\r\n:()]|::?[\w-]+(?:\([^)\r\n]*\)|(?![\w-]))|\{[^}\r\n]+\})+)))*(?:,$|\{|(?=(?:\r?\n|\r)(?:\{|\1[ \t])))/m,lookbehind:!0,inside:{interpolation:t.interpolation,comment:t.comment,punctuation:/[{},]/}},func:t.func,string:t.string,comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0,greedy:!0},interpolation:t.interpolation,punctuation:/[{}()\[\];:.]/}}(Prism); \ No newline at end of file diff --git a/components/prism-swift.js b/components/prism-swift.js index 79b3713f86..03b704f453 100644 --- a/components/prism-swift.js +++ b/components/prism-swift.js @@ -85,7 +85,7 @@ Prism.languages.swift = { alias: 'property', inside: { 'directive-name': /^#\w+/, - 'boolean': /\b(?:true|false)\b/, + 'boolean': /\b(?:false|true)\b/, 'number': /\b\d+(?:\.\d+)*\b/, 'operator': /!|&&|\|\||[<>]=?/, 'punctuation': /[(),]/ @@ -118,7 +118,7 @@ Prism.languages.swift = { }, 'keyword': /\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/, - 'boolean': /\b(?:true|false)\b/, + 'boolean': /\b(?:false|true)\b/, 'nil': { pattern: /\bnil\b/, alias: 'constant' diff --git a/components/prism-swift.min.js b/components/prism-swift.min.js index 44772e9bbe..f319773759 100644 --- a/components/prism-swift.min.js +++ b/components/prism-swift.min.js @@ -1 +1 @@ -Prism.languages.swift={comment:{pattern:/(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,lookbehind:!0,greedy:!0},"string-literal":[{pattern:RegExp('(^|[^"#])(?:"(?:\\\\(?:\\((?:[^()]|\\([^()]*\\))*\\)|\r\n|[^(])|[^\\\\\r\n"])*"|"""(?:\\\\(?:\\((?:[^()]|\\([^()]*\\))*\\)|[^(])|[^\\\\"]|"(?!""))*""")(?!["#])'),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\\($/,alias:"punctuation"},punctuation:/\\(?=[\r\n])/,string:/[\s\S]+/}},{pattern:RegExp('(^|[^"#])(#+)(?:"(?:\\\\(?:#+\\((?:[^()]|\\([^()]*\\))*\\)|\r\n|[^#])|[^\\\\\r\n])*?"|"""(?:\\\\(?:#+\\((?:[^()]|\\([^()]*\\))*\\)|[^#])|[^\\\\])*?""")\\2'),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\#+\($/,alias:"punctuation"},string:/[\s\S]+/}}],directive:{pattern:RegExp("#(?:(?:elseif|if)\\b(?:[ \t]*(?:![ \t]*)?(?:\\b\\w+\\b(?:[ \t]*\\((?:[^()]|\\([^()]*\\))*\\))?|\\((?:[^()]|\\([^()]*\\))*\\))(?:[ \t]*(?:&&|\\|\\|))?)+|(?:else|endif)\\b)"),alias:"property",inside:{"directive-name":/^#\w+/,boolean:/\b(?:true|false)\b/,number:/\b\d+(?:\.\d+)*\b/,operator:/!|&&|\|\||[<>]=?/,punctuation:/[(),]/}},literal:{pattern:/#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,alias:"constant"},"other-directive":{pattern:/#\w+\b/,alias:"property"},attribute:{pattern:/@\w+/,alias:"atrule"},"function-definition":{pattern:/(\bfunc\s+)\w+/,lookbehind:!0,alias:"function"},label:{pattern:/\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,lookbehind:!0,alias:"important"},keyword:/\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,boolean:/\b(?:true|false)\b/,nil:{pattern:/\bnil\b/,alias:"constant"},"short-argument":/\$\d+\b/,omit:{pattern:/\b_\b/,alias:"keyword"},number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,"class-name":/\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,operator:/[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,punctuation:/[{}[\]();,.:\\]/},Prism.languages.swift["string-literal"].forEach(function(e){e.inside.interpolation.inside=Prism.languages.swift}); \ No newline at end of file +Prism.languages.swift={comment:{pattern:/(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,lookbehind:!0,greedy:!0},"string-literal":[{pattern:RegExp('(^|[^"#])(?:"(?:\\\\(?:\\((?:[^()]|\\([^()]*\\))*\\)|\r\n|[^(])|[^\\\\\r\n"])*"|"""(?:\\\\(?:\\((?:[^()]|\\([^()]*\\))*\\)|[^(])|[^\\\\"]|"(?!""))*""")(?!["#])'),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\\($/,alias:"punctuation"},punctuation:/\\(?=[\r\n])/,string:/[\s\S]+/}},{pattern:RegExp('(^|[^"#])(#+)(?:"(?:\\\\(?:#+\\((?:[^()]|\\([^()]*\\))*\\)|\r\n|[^#])|[^\\\\\r\n])*?"|"""(?:\\\\(?:#+\\((?:[^()]|\\([^()]*\\))*\\)|[^#])|[^\\\\])*?""")\\2'),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\#+\($/,alias:"punctuation"},string:/[\s\S]+/}}],directive:{pattern:RegExp("#(?:(?:elseif|if)\\b(?:[ \t]*(?:![ \t]*)?(?:\\b\\w+\\b(?:[ \t]*\\((?:[^()]|\\([^()]*\\))*\\))?|\\((?:[^()]|\\([^()]*\\))*\\))(?:[ \t]*(?:&&|\\|\\|))?)+|(?:else|endif)\\b)"),alias:"property",inside:{"directive-name":/^#\w+/,boolean:/\b(?:false|true)\b/,number:/\b\d+(?:\.\d+)*\b/,operator:/!|&&|\|\||[<>]=?/,punctuation:/[(),]/}},literal:{pattern:/#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,alias:"constant"},"other-directive":{pattern:/#\w+\b/,alias:"property"},attribute:{pattern:/@\w+/,alias:"atrule"},"function-definition":{pattern:/(\bfunc\s+)\w+/,lookbehind:!0,alias:"function"},label:{pattern:/\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,lookbehind:!0,alias:"important"},keyword:/\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,boolean:/\b(?:false|true)\b/,nil:{pattern:/\bnil\b/,alias:"constant"},"short-argument":/\$\d+\b/,omit:{pattern:/\b_\b/,alias:"keyword"},number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,"class-name":/\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,operator:/[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,punctuation:/[{}[\]();,.:\\]/},Prism.languages.swift["string-literal"].forEach(function(e){e.inside.interpolation.inside=Prism.languages.swift}); \ No newline at end of file diff --git a/components/prism-tcl.js b/components/prism-tcl.js index 77c122aa01..0235a93058 100644 --- a/components/prism-tcl.js +++ b/components/prism-tcl.js @@ -27,10 +27,10 @@ Prism.languages.tcl = { }, 'builtin': [ { - pattern: /(^[\t ]*)(?:proc|return|class|error|eval|exit|for|foreach|if|switch|while|break|continue)\b/m, + pattern: /(^[\t ]*)(?:break|class|continue|error|eval|exit|for|foreach|if|proc|return|switch|while)\b/m, lookbehind: true }, - /\b(?:elseif|else)\b/ + /\b(?:else|elseif)\b/ ], 'scope': { pattern: /(^[\t ]*)(?:global|upvar|variable)\b/m, @@ -38,9 +38,9 @@ Prism.languages.tcl = { alias: 'constant' }, 'keyword': { - pattern: /(^[\t ]*|\[)(?:after|append|apply|array|auto_(?:execok|import|load|mkindex|qualify|reset)|automkindex_old|bgerror|binary|catch|cd|chan|clock|close|concat|dde|dict|encoding|eof|exec|expr|fblocked|fconfigure|fcopy|file(?:event|name)?|flush|gets|glob|history|http|incr|info|interp|join|lappend|lassign|lindex|linsert|list|llength|load|lrange|lrepeat|lreplace|lreverse|lsearch|lset|lsort|math(?:func|op)|memory|msgcat|namespace|open|package|parray|pid|pkg_mkIndex|platform|puts|pwd|re_syntax|read|refchan|regexp|registry|regsub|rename|Safe_Base|scan|seek|set|socket|source|split|string|subst|Tcl|tcl(?:_endOfWord|_findLibrary|startOf(?:Next|Previous)Word|wordBreak(?:After|Before)|test|vars)|tell|time|tm|trace|unknown|unload|unset|update|uplevel|vwait)\b/m, + pattern: /(^[\t ]*|\[)(?:Safe_Base|Tcl|after|append|apply|array|auto_(?:execok|import|load|mkindex|qualify|reset)|automkindex_old|bgerror|binary|catch|cd|chan|clock|close|concat|dde|dict|encoding|eof|exec|expr|fblocked|fconfigure|fcopy|file(?:event|name)?|flush|gets|glob|history|http|incr|info|interp|join|lappend|lassign|lindex|linsert|list|llength|load|lrange|lrepeat|lreplace|lreverse|lsearch|lset|lsort|math(?:func|op)|memory|msgcat|namespace|open|package|parray|pid|pkg_mkIndex|platform|puts|pwd|re_syntax|read|refchan|regexp|registry|regsub|rename|scan|seek|set|socket|source|split|string|subst|tcl(?:_endOfWord|_findLibrary|startOf(?:Next|Previous)Word|test|vars|wordBreak(?:After|Before))|tell|time|tm|trace|unknown|unload|unset|update|uplevel|vwait)\b/m, lookbehind: true }, - 'operator': /!=?|\*\*?|==|&&?|\|\|?|<[=<]?|>[=>]?|[-+~\/%?^]|\b(?:eq|ne|in|ni)\b/, + 'operator': /!=?|\*\*?|==|&&?|\|\|?|<[=<]?|>[=>]?|[-+~\/%?^]|\b(?:eq|in|ne|ni)\b/, 'punctuation': /[{}()\[\]]/ }; diff --git a/components/prism-tcl.min.js b/components/prism-tcl.min.js index d921424d40..2704aadac7 100644 --- a/components/prism-tcl.min.js +++ b/components/prism-tcl.min.js @@ -1 +1 @@ -Prism.languages.tcl={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0},string:{pattern:/"(?:[^"\\\r\n]|\\(?:\r\n|[\s\S]))*"/,greedy:!0},variable:[{pattern:/(\$)(?:::)?(?:[a-zA-Z0-9]+::)*\w+/,lookbehind:!0},{pattern:/(\$)\{[^}]+\}/,lookbehind:!0},{pattern:/(^[\t ]*set[ \t]+)(?:::)?(?:[a-zA-Z0-9]+::)*\w+/m,lookbehind:!0}],function:{pattern:/(^[\t ]*proc[ \t]+)\S+/m,lookbehind:!0},builtin:[{pattern:/(^[\t ]*)(?:proc|return|class|error|eval|exit|for|foreach|if|switch|while|break|continue)\b/m,lookbehind:!0},/\b(?:elseif|else)\b/],scope:{pattern:/(^[\t ]*)(?:global|upvar|variable)\b/m,lookbehind:!0,alias:"constant"},keyword:{pattern:/(^[\t ]*|\[)(?:after|append|apply|array|auto_(?:execok|import|load|mkindex|qualify|reset)|automkindex_old|bgerror|binary|catch|cd|chan|clock|close|concat|dde|dict|encoding|eof|exec|expr|fblocked|fconfigure|fcopy|file(?:event|name)?|flush|gets|glob|history|http|incr|info|interp|join|lappend|lassign|lindex|linsert|list|llength|load|lrange|lrepeat|lreplace|lreverse|lsearch|lset|lsort|math(?:func|op)|memory|msgcat|namespace|open|package|parray|pid|pkg_mkIndex|platform|puts|pwd|re_syntax|read|refchan|regexp|registry|regsub|rename|Safe_Base|scan|seek|set|socket|source|split|string|subst|Tcl|tcl(?:_endOfWord|_findLibrary|startOf(?:Next|Previous)Word|wordBreak(?:After|Before)|test|vars)|tell|time|tm|trace|unknown|unload|unset|update|uplevel|vwait)\b/m,lookbehind:!0},operator:/!=?|\*\*?|==|&&?|\|\|?|<[=<]?|>[=>]?|[-+~\/%?^]|\b(?:eq|ne|in|ni)\b/,punctuation:/[{}()\[\]]/}; \ No newline at end of file +Prism.languages.tcl={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0},string:{pattern:/"(?:[^"\\\r\n]|\\(?:\r\n|[\s\S]))*"/,greedy:!0},variable:[{pattern:/(\$)(?:::)?(?:[a-zA-Z0-9]+::)*\w+/,lookbehind:!0},{pattern:/(\$)\{[^}]+\}/,lookbehind:!0},{pattern:/(^[\t ]*set[ \t]+)(?:::)?(?:[a-zA-Z0-9]+::)*\w+/m,lookbehind:!0}],function:{pattern:/(^[\t ]*proc[ \t]+)\S+/m,lookbehind:!0},builtin:[{pattern:/(^[\t ]*)(?:break|class|continue|error|eval|exit|for|foreach|if|proc|return|switch|while)\b/m,lookbehind:!0},/\b(?:else|elseif)\b/],scope:{pattern:/(^[\t ]*)(?:global|upvar|variable)\b/m,lookbehind:!0,alias:"constant"},keyword:{pattern:/(^[\t ]*|\[)(?:Safe_Base|Tcl|after|append|apply|array|auto_(?:execok|import|load|mkindex|qualify|reset)|automkindex_old|bgerror|binary|catch|cd|chan|clock|close|concat|dde|dict|encoding|eof|exec|expr|fblocked|fconfigure|fcopy|file(?:event|name)?|flush|gets|glob|history|http|incr|info|interp|join|lappend|lassign|lindex|linsert|list|llength|load|lrange|lrepeat|lreplace|lreverse|lsearch|lset|lsort|math(?:func|op)|memory|msgcat|namespace|open|package|parray|pid|pkg_mkIndex|platform|puts|pwd|re_syntax|read|refchan|regexp|registry|regsub|rename|scan|seek|set|socket|source|split|string|subst|tcl(?:_endOfWord|_findLibrary|startOf(?:Next|Previous)Word|test|vars|wordBreak(?:After|Before))|tell|time|tm|trace|unknown|unload|unset|update|uplevel|vwait)\b/m,lookbehind:!0},operator:/!=?|\*\*?|==|&&?|\|\|?|<[=<]?|>[=>]?|[-+~\/%?^]|\b(?:eq|in|ne|ni)\b/,punctuation:/[{}()\[\]]/}; \ No newline at end of file diff --git a/components/prism-textile.js b/components/prism-textile.js index 26d7ef32bf..d10d1c5769 100644 --- a/components/prism-textile.js +++ b/components/prism-textile.js @@ -243,7 +243,7 @@ // Prism(C) 'mark': { - pattern: /\b\((?:TM|R|C)\)/, + pattern: /\b\((?:C|R|TM)\)/, alias: 'comment', inside: { 'punctuation': /[()]/ diff --git a/components/prism-textile.min.js b/components/prism-textile.min.js index d3b673bf49..8bc917c954 100644 --- a/components/prism-textile.min.js +++ b/components/prism-textile.min.js @@ -1 +1 @@ -!function(n){function e(n,e){return RegExp(n.replace(//g,function(){return"(?:\\([^|()\n]+\\)|\\[[^\\]\n]+\\]|\\{[^}\n]+\\})"}).replace(//g,function(){return"(?:\\)|\\((?![^|()\n]+\\)))"}),e||"")}var i={css:{pattern:/\{[^{}]+\}/,inside:{rest:n.languages.css}},"class-id":{pattern:/(\()[^()]+(?=\))/,lookbehind:!0,alias:"attr-value"},lang:{pattern:/(\[)[^\[\]]+(?=\])/,lookbehind:!0,alias:"attr-value"},punctuation:/[\\\/]\d+|\S/},t=n.languages.textile=n.languages.extend("markup",{phrase:{pattern:/(^|\r|\n)\S[\s\S]*?(?=$|\r?\n\r?\n|\r\r)/,lookbehind:!0,inside:{"block-tag":{pattern:e("^[a-z]\\w*(?:||[<>=])*\\."),inside:{modifier:{pattern:e("(^[a-z]\\w*)(?:||[<>=])+(?=\\.)"),lookbehind:!0,inside:i},tag:/^[a-z]\w*/,punctuation:/\.$/}},list:{pattern:e("^[*#]+*\\s+\\S.*","m"),inside:{modifier:{pattern:e("(^[*#]+)+"),lookbehind:!0,inside:i},punctuation:/^[*#]+/}},table:{pattern:e("^(?:(?:||[<>=^~])+\\.\\s*)?(?:\\|(?:(?:||[<>=^~_]|[\\\\/]\\d+)+\\.|(?!(?:||[<>=^~_]|[\\\\/]\\d+)+\\.))[^|]*)+\\|","m"),inside:{modifier:{pattern:e("(^|\\|(?:\r?\n|\r)?)(?:||[<>=^~_]|[\\\\/]\\d+)+(?=\\.)"),lookbehind:!0,inside:i},punctuation:/\||^\./}},inline:{pattern:e("(^|[^a-zA-Z\\d])(\\*\\*|__|\\?\\?|[*_%@+\\-^~])*.+?\\2(?![a-zA-Z\\d])"),lookbehind:!0,inside:{bold:{pattern:e("(^(\\*\\*?)*).+?(?=\\2)"),lookbehind:!0},italic:{pattern:e("(^(__?)*).+?(?=\\2)"),lookbehind:!0},cite:{pattern:e("(^\\?\\?*).+?(?=\\?\\?)"),lookbehind:!0,alias:"string"},code:{pattern:e("(^@*).+?(?=@)"),lookbehind:!0,alias:"keyword"},inserted:{pattern:e("(^\\+*).+?(?=\\+)"),lookbehind:!0},deleted:{pattern:e("(^-*).+?(?=-)"),lookbehind:!0},span:{pattern:e("(^%*).+?(?=%)"),lookbehind:!0},modifier:{pattern:e("(^\\*\\*|__|\\?\\?|[*_%@+\\-^~])+"),lookbehind:!0,inside:i},punctuation:/[*_%?@+\-^~]+/}},"link-ref":{pattern:/^\[[^\]]+\]\S+$/m,inside:{string:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0},url:{pattern:/(^\])\S+$/,lookbehind:!0},punctuation:/[\[\]]/}},link:{pattern:e('"*[^"]+":.+?(?=[^\\w/]?(?:\\s|$))'),inside:{text:{pattern:e('(^"*)[^"]+(?=")'),lookbehind:!0},modifier:{pattern:e('(^")+'),lookbehind:!0,inside:i},url:{pattern:/(:).+/,lookbehind:!0},punctuation:/[":]/}},image:{pattern:e("!(?:||[<>=])*(?![<>=])[^!\\s()]+(?:\\([^)]+\\))?!(?::.+?(?=[^\\w/]?(?:\\s|$)))?"),inside:{source:{pattern:e("(^!(?:||[<>=])*)(?![<>=])[^!\\s()]+(?:\\([^)]+\\))?(?=!)"),lookbehind:!0,alias:"url"},modifier:{pattern:e("(^!)(?:||[<>=])+"),lookbehind:!0,inside:i},url:{pattern:/(:).+/,lookbehind:!0},punctuation:/[!:]/}},footnote:{pattern:/\b\[\d+\]/,alias:"comment",inside:{punctuation:/\[|\]/}},acronym:{pattern:/\b[A-Z\d]+\([^)]+\)/,inside:{comment:{pattern:/(\()[^()]+(?=\))/,lookbehind:!0},punctuation:/[()]/}},mark:{pattern:/\b\((?:TM|R|C)\)/,alias:"comment",inside:{punctuation:/[()]/}}}}}),a=t.phrase.inside,o={inline:a.inline,link:a.link,image:a.image,footnote:a.footnote,acronym:a.acronym,mark:a.mark};t.tag.pattern=/<\/?(?!\d)[a-z0-9]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s'">=]+))?)*\s*\/?>/i;var r=a.inline.inside;r.bold.inside=o,r.italic.inside=o,r.inserted.inside=o,r.deleted.inside=o,r.span.inside=o;var d=a.table.inside;d.inline=o.inline,d.link=o.link,d.image=o.image,d.footnote=o.footnote,d.acronym=o.acronym,d.mark=o.mark}(Prism); \ No newline at end of file +!function(n){function e(n,e){return RegExp(n.replace(//g,function(){return"(?:\\([^|()\n]+\\)|\\[[^\\]\n]+\\]|\\{[^}\n]+\\})"}).replace(//g,function(){return"(?:\\)|\\((?![^|()\n]+\\)))"}),e||"")}var i={css:{pattern:/\{[^{}]+\}/,inside:{rest:n.languages.css}},"class-id":{pattern:/(\()[^()]+(?=\))/,lookbehind:!0,alias:"attr-value"},lang:{pattern:/(\[)[^\[\]]+(?=\])/,lookbehind:!0,alias:"attr-value"},punctuation:/[\\\/]\d+|\S/},t=n.languages.textile=n.languages.extend("markup",{phrase:{pattern:/(^|\r|\n)\S[\s\S]*?(?=$|\r?\n\r?\n|\r\r)/,lookbehind:!0,inside:{"block-tag":{pattern:e("^[a-z]\\w*(?:||[<>=])*\\."),inside:{modifier:{pattern:e("(^[a-z]\\w*)(?:||[<>=])+(?=\\.)"),lookbehind:!0,inside:i},tag:/^[a-z]\w*/,punctuation:/\.$/}},list:{pattern:e("^[*#]+*\\s+\\S.*","m"),inside:{modifier:{pattern:e("(^[*#]+)+"),lookbehind:!0,inside:i},punctuation:/^[*#]+/}},table:{pattern:e("^(?:(?:||[<>=^~])+\\.\\s*)?(?:\\|(?:(?:||[<>=^~_]|[\\\\/]\\d+)+\\.|(?!(?:||[<>=^~_]|[\\\\/]\\d+)+\\.))[^|]*)+\\|","m"),inside:{modifier:{pattern:e("(^|\\|(?:\r?\n|\r)?)(?:||[<>=^~_]|[\\\\/]\\d+)+(?=\\.)"),lookbehind:!0,inside:i},punctuation:/\||^\./}},inline:{pattern:e("(^|[^a-zA-Z\\d])(\\*\\*|__|\\?\\?|[*_%@+\\-^~])*.+?\\2(?![a-zA-Z\\d])"),lookbehind:!0,inside:{bold:{pattern:e("(^(\\*\\*?)*).+?(?=\\2)"),lookbehind:!0},italic:{pattern:e("(^(__?)*).+?(?=\\2)"),lookbehind:!0},cite:{pattern:e("(^\\?\\?*).+?(?=\\?\\?)"),lookbehind:!0,alias:"string"},code:{pattern:e("(^@*).+?(?=@)"),lookbehind:!0,alias:"keyword"},inserted:{pattern:e("(^\\+*).+?(?=\\+)"),lookbehind:!0},deleted:{pattern:e("(^-*).+?(?=-)"),lookbehind:!0},span:{pattern:e("(^%*).+?(?=%)"),lookbehind:!0},modifier:{pattern:e("(^\\*\\*|__|\\?\\?|[*_%@+\\-^~])+"),lookbehind:!0,inside:i},punctuation:/[*_%?@+\-^~]+/}},"link-ref":{pattern:/^\[[^\]]+\]\S+$/m,inside:{string:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0},url:{pattern:/(^\])\S+$/,lookbehind:!0},punctuation:/[\[\]]/}},link:{pattern:e('"*[^"]+":.+?(?=[^\\w/]?(?:\\s|$))'),inside:{text:{pattern:e('(^"*)[^"]+(?=")'),lookbehind:!0},modifier:{pattern:e('(^")+'),lookbehind:!0,inside:i},url:{pattern:/(:).+/,lookbehind:!0},punctuation:/[":]/}},image:{pattern:e("!(?:||[<>=])*(?![<>=])[^!\\s()]+(?:\\([^)]+\\))?!(?::.+?(?=[^\\w/]?(?:\\s|$)))?"),inside:{source:{pattern:e("(^!(?:||[<>=])*)(?![<>=])[^!\\s()]+(?:\\([^)]+\\))?(?=!)"),lookbehind:!0,alias:"url"},modifier:{pattern:e("(^!)(?:||[<>=])+"),lookbehind:!0,inside:i},url:{pattern:/(:).+/,lookbehind:!0},punctuation:/[!:]/}},footnote:{pattern:/\b\[\d+\]/,alias:"comment",inside:{punctuation:/\[|\]/}},acronym:{pattern:/\b[A-Z\d]+\([^)]+\)/,inside:{comment:{pattern:/(\()[^()]+(?=\))/,lookbehind:!0},punctuation:/[()]/}},mark:{pattern:/\b\((?:C|R|TM)\)/,alias:"comment",inside:{punctuation:/[()]/}}}}}),a=t.phrase.inside,o={inline:a.inline,link:a.link,image:a.image,footnote:a.footnote,acronym:a.acronym,mark:a.mark};t.tag.pattern=/<\/?(?!\d)[a-z0-9]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s'">=]+))?)*\s*\/?>/i;var r=a.inline.inside;r.bold.inside=o,r.italic.inside=o,r.inserted.inside=o,r.deleted.inside=o,r.span.inside=o;var d=a.table.inside;d.inline=o.inline,d.link=o.link,d.image=o.image,d.footnote=o.footnote,d.acronym=o.acronym,d.mark=o.mark}(Prism); \ No newline at end of file diff --git a/components/prism-toml.js b/components/prism-toml.js index fd69e857d8..ed985eef0c 100644 --- a/components/prism-toml.js +++ b/components/prism-toml.js @@ -43,7 +43,7 @@ } ], 'number': /(?:\b0(?:x[\da-zA-Z]+(?:_[\da-zA-Z]+)*|o[0-7]+(?:_[0-7]+)*|b[10]+(?:_[10]+)*))\b|[-+]?\b\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?\b|[-+]?\b(?:inf|nan)\b/, - 'boolean': /\b(?:true|false)\b/, + 'boolean': /\b(?:false|true)\b/, 'punctuation': /[.,=[\]{}]/ }; }(Prism)); diff --git a/components/prism-toml.min.js b/components/prism-toml.min.js index 31e585095a..0bb75d16b3 100644 --- a/components/prism-toml.min.js +++ b/components/prism-toml.min.js @@ -1 +1 @@ -!function(e){function n(e){return e.replace(/__/g,function(){return"(?:[\\w-]+|'[^'\n\r]*'|\"(?:\\\\.|[^\\\\\"\r\n])*\")"})}e.languages.toml={comment:{pattern:/#.*/,greedy:!0},table:{pattern:RegExp(n("(^[\t ]*\\[\\s*(?:\\[\\s*)?)__(?:\\s*\\.\\s*__)*(?=\\s*\\])"),"m"),lookbehind:!0,greedy:!0,alias:"class-name"},key:{pattern:RegExp(n("(^[\t ]*|[{,]\\s*)__(?:\\s*\\.\\s*__)*(?=\\s*=)"),"m"),lookbehind:!0,greedy:!0,alias:"property"},string:{pattern:/"""(?:\\[\s\S]|[^\\])*?"""|'''[\s\S]*?'''|'[^'\n\r]*'|"(?:\\.|[^\\"\r\n])*"/,greedy:!0},date:[{pattern:/\b\d{4}-\d{2}-\d{2}(?:[T\s]\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|[+-]\d{2}:\d{2})?)?\b/i,alias:"number"},{pattern:/\b\d{2}:\d{2}:\d{2}(?:\.\d+)?\b/,alias:"number"}],number:/(?:\b0(?:x[\da-zA-Z]+(?:_[\da-zA-Z]+)*|o[0-7]+(?:_[0-7]+)*|b[10]+(?:_[10]+)*))\b|[-+]?\b\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?\b|[-+]?\b(?:inf|nan)\b/,boolean:/\b(?:true|false)\b/,punctuation:/[.,=[\]{}]/}}(Prism); \ No newline at end of file +!function(e){function n(e){return e.replace(/__/g,function(){return"(?:[\\w-]+|'[^'\n\r]*'|\"(?:\\\\.|[^\\\\\"\r\n])*\")"})}e.languages.toml={comment:{pattern:/#.*/,greedy:!0},table:{pattern:RegExp(n("(^[\t ]*\\[\\s*(?:\\[\\s*)?)__(?:\\s*\\.\\s*__)*(?=\\s*\\])"),"m"),lookbehind:!0,greedy:!0,alias:"class-name"},key:{pattern:RegExp(n("(^[\t ]*|[{,]\\s*)__(?:\\s*\\.\\s*__)*(?=\\s*=)"),"m"),lookbehind:!0,greedy:!0,alias:"property"},string:{pattern:/"""(?:\\[\s\S]|[^\\])*?"""|'''[\s\S]*?'''|'[^'\n\r]*'|"(?:\\.|[^\\"\r\n])*"/,greedy:!0},date:[{pattern:/\b\d{4}-\d{2}-\d{2}(?:[T\s]\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|[+-]\d{2}:\d{2})?)?\b/i,alias:"number"},{pattern:/\b\d{2}:\d{2}:\d{2}(?:\.\d+)?\b/,alias:"number"}],number:/(?:\b0(?:x[\da-zA-Z]+(?:_[\da-zA-Z]+)*|o[0-7]+(?:_[0-7]+)*|b[10]+(?:_[10]+)*))\b|[-+]?\b\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?\b|[-+]?\b(?:inf|nan)\b/,boolean:/\b(?:false|true)\b/,punctuation:/[.,=[\]{}]/}}(Prism); \ No newline at end of file diff --git a/components/prism-tremor.js b/components/prism-tremor.js index 213d6c3e10..58f7447013 100644 --- a/components/prism-tremor.js +++ b/components/prism-tremor.js @@ -21,8 +21,8 @@ 'function': /\b[a-z_]\w*(?=\s*(?:::\s*<|\())\b/, - 'keyword': /\b(?:event|state|select|create|define|deploy|operator|script|connector|pipeline|flow|config|links|connect|to|from|into|with|group|by|args|window|stream|tumbling|sliding|where|having|set|each|emit|drop|const|let|for|match|of|case|when|default|end|patch|insert|update|erase|move|copy|merge|fn|intrinsic|recur|use|as|mod)\b/, - 'boolean': /\b(?:true|false|null)\b/i, + 'keyword': /\b(?:args|as|by|case|config|connect|connector|const|copy|create|default|define|deploy|drop|each|emit|end|erase|event|flow|fn|for|from|group|having|insert|into|intrinsic|let|links|match|merge|mod|move|of|operator|patch|pipeline|recur|script|select|set|sliding|state|stream|to|tumbling|update|use|when|where|window|with)\b/, + 'boolean': /\b(?:false|null|true)\b/i, 'number': /\b(?:0b[0-1_]*|0x[0-9a-fA-F_]*|\d[0-9_]*(?:\.\d[0-9_]*)?(?:[Ee][+-]?[0-9_]+)?)\b/, @@ -30,7 +30,7 @@ pattern: /%(?=[({[])/, alias: 'punctuation' }, - 'operator': /[-+*\/%~!^]=?|=[=>]?|&[&=]?|\|[|=]?|<>?>?=?|(?:not|and|or|xor|present|absent)\b/, + 'operator': /[-+*\/%~!^]=?|=[=>]?|&[&=]?|\|[|=]?|<>?>?=?|(?:absent|and|not|or|present|xor)\b/, 'punctuation': /::|[;\[\]()\{\},.:]/, }; diff --git a/components/prism-tremor.min.js b/components/prism-tremor.min.js index a7b728ff06..0265a36478 100644 --- a/components/prism-tremor.min.js +++ b/components/prism-tremor.min.js @@ -1 +1 @@ -!function(e){e.languages.tremor={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},"interpolated-string":null,extractor:{pattern:/\b[a-z_]\w*\|(?:[^\r\n\\|]|\\(?:\r\n|[\s\S]))*\|/i,greedy:!0,inside:{function:/^\w+/,regex:/\|[\s\S]+/}},identifier:{pattern:/`[^`]*`/,greedy:!0},function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())\b/,keyword:/\b(?:event|state|select|create|define|deploy|operator|script|connector|pipeline|flow|config|links|connect|to|from|into|with|group|by|args|window|stream|tumbling|sliding|where|having|set|each|emit|drop|const|let|for|match|of|case|when|default|end|patch|insert|update|erase|move|copy|merge|fn|intrinsic|recur|use|as|mod)\b/,boolean:/\b(?:true|false|null)\b/i,number:/\b(?:0b[0-1_]*|0x[0-9a-fA-F_]*|\d[0-9_]*(?:\.\d[0-9_]*)?(?:[Ee][+-]?[0-9_]+)?)\b/,"pattern-punctuation":{pattern:/%(?=[({[])/,alias:"punctuation"},operator:/[-+*\/%~!^]=?|=[=>]?|&[&=]?|\|[|=]?|<>?>?=?|(?:not|and|or|xor|present|absent)\b/,punctuation:/::|[;\[\]()\{\},.:]/};var n='#\\{(?:[^"{}]|\\{[^{}]*\\}|"(?:[^"\\\\\r\n]|\\\\(?:\r\n|[^]))*")*\\}';e.languages.tremor["interpolated-string"]={pattern:RegExp('(^|[^\\\\])(?:"""(?:[^"\\\\#]|\\\\[^]|"(?!"")|#(?!\\{)|'+n+')*"""|"(?:[^"\\\\\r\n#]|\\\\(?:\r\n|[^])|#(?!\\{)|'+n+')*")'),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:RegExp(n),inside:{punctuation:/^#\{|\}$/,expression:{pattern:/[\s\S]+/,inside:e.languages.tremor}}},string:/[\s\S]+/}},e.languages.troy=e.languages.tremor,e.languages.trickle=e.languages.tremor}(Prism); \ No newline at end of file +!function(e){e.languages.tremor={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},"interpolated-string":null,extractor:{pattern:/\b[a-z_]\w*\|(?:[^\r\n\\|]|\\(?:\r\n|[\s\S]))*\|/i,greedy:!0,inside:{function:/^\w+/,regex:/\|[\s\S]+/}},identifier:{pattern:/`[^`]*`/,greedy:!0},function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())\b/,keyword:/\b(?:args|as|by|case|config|connect|connector|const|copy|create|default|define|deploy|drop|each|emit|end|erase|event|flow|fn|for|from|group|having|insert|into|intrinsic|let|links|match|merge|mod|move|of|operator|patch|pipeline|recur|script|select|set|sliding|state|stream|to|tumbling|update|use|when|where|window|with)\b/,boolean:/\b(?:false|null|true)\b/i,number:/\b(?:0b[0-1_]*|0x[0-9a-fA-F_]*|\d[0-9_]*(?:\.\d[0-9_]*)?(?:[Ee][+-]?[0-9_]+)?)\b/,"pattern-punctuation":{pattern:/%(?=[({[])/,alias:"punctuation"},operator:/[-+*\/%~!^]=?|=[=>]?|&[&=]?|\|[|=]?|<>?>?=?|(?:absent|and|not|or|present|xor)\b/,punctuation:/::|[;\[\]()\{\},.:]/};var n='#\\{(?:[^"{}]|\\{[^{}]*\\}|"(?:[^"\\\\\r\n]|\\\\(?:\r\n|[^]))*")*\\}';e.languages.tremor["interpolated-string"]={pattern:RegExp('(^|[^\\\\])(?:"""(?:[^"\\\\#]|\\\\[^]|"(?!"")|#(?!\\{)|'+n+')*"""|"(?:[^"\\\\\r\n#]|\\\\(?:\r\n|[^])|#(?!\\{)|'+n+')*")'),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:RegExp(n),inside:{punctuation:/^#\{|\}$/,expression:{pattern:/[\s\S]+/,inside:e.languages.tremor}}},string:/[\s\S]+/}},e.languages.troy=e.languages.tremor,e.languages.trickle=e.languages.tremor}(Prism); \ No newline at end of file diff --git a/components/prism-tt2.js b/components/prism-tt2.js index 8618a02797..7ea37da456 100644 --- a/components/prism-tt2.js +++ b/components/prism-tt2.js @@ -2,12 +2,12 @@ Prism.languages.tt2 = Prism.languages.extend('clike', { 'comment': /#.*|\[%#[\s\S]*?%\]/, - 'keyword': /\b(?:BLOCK|CALL|CASE|CATCH|CLEAR|DEBUG|DEFAULT|ELSE|ELSIF|END|FILTER|FINAL|FOREACH|GET|IF|IN|INCLUDE|INSERT|LAST|MACRO|META|NEXT|PERL|PROCESS|RAWPERL|RETURN|SET|STOP|TAGS|THROW|TRY|SWITCH|UNLESS|USE|WHILE|WRAPPER)\b/, + 'keyword': /\b(?:BLOCK|CALL|CASE|CATCH|CLEAR|DEBUG|DEFAULT|ELSE|ELSIF|END|FILTER|FINAL|FOREACH|GET|IF|IN|INCLUDE|INSERT|LAST|MACRO|META|NEXT|PERL|PROCESS|RAWPERL|RETURN|SET|STOP|SWITCH|TAGS|THROW|TRY|UNLESS|USE|WHILE|WRAPPER)\b/, 'punctuation': /[[\]{},()]/ }); Prism.languages.insertBefore('tt2', 'number', { - 'operator': /=[>=]?|!=?|<=?|>=?|&&|\|\|?|\b(?:and|or|not)\b/, + 'operator': /=[>=]?|!=?|<=?|>=?|&&|\|\|?|\b(?:and|not|or)\b/, 'variable': { pattern: /\b[a-z]\w*(?:\s*\.\s*(?:\d+|\$?[a-z]\w*))*\b/i } diff --git a/components/prism-tt2.min.js b/components/prism-tt2.min.js index 4b34cfa5df..ede4024761 100644 --- a/components/prism-tt2.min.js +++ b/components/prism-tt2.min.js @@ -1 +1 @@ -!function(t){t.languages.tt2=t.languages.extend("clike",{comment:/#.*|\[%#[\s\S]*?%\]/,keyword:/\b(?:BLOCK|CALL|CASE|CATCH|CLEAR|DEBUG|DEFAULT|ELSE|ELSIF|END|FILTER|FINAL|FOREACH|GET|IF|IN|INCLUDE|INSERT|LAST|MACRO|META|NEXT|PERL|PROCESS|RAWPERL|RETURN|SET|STOP|TAGS|THROW|TRY|SWITCH|UNLESS|USE|WHILE|WRAPPER)\b/,punctuation:/[[\]{},()]/}),t.languages.insertBefore("tt2","number",{operator:/=[>=]?|!=?|<=?|>=?|&&|\|\|?|\b(?:and|or|not)\b/,variable:{pattern:/\b[a-z]\w*(?:\s*\.\s*(?:\d+|\$?[a-z]\w*))*\b/i}}),t.languages.insertBefore("tt2","keyword",{delimiter:{pattern:/^(?:\[%|%%)-?|-?%\]$/,alias:"punctuation"}}),t.languages.insertBefore("tt2","string",{"single-quoted-string":{pattern:/'[^\\']*(?:\\[\s\S][^\\']*)*'/,greedy:!0,alias:"string"},"double-quoted-string":{pattern:/"[^\\"]*(?:\\[\s\S][^\\"]*)*"/,greedy:!0,alias:"string",inside:{variable:{pattern:/\$(?:[a-z]\w*(?:\.(?:\d+|\$?[a-z]\w*))*)/i}}}}),delete t.languages.tt2.string,t.hooks.add("before-tokenize",function(e){t.languages["markup-templating"].buildPlaceholders(e,"tt2",/\[%[\s\S]+?%\]/g)}),t.hooks.add("after-tokenize",function(e){t.languages["markup-templating"].tokenizePlaceholders(e,"tt2")})}(Prism); \ No newline at end of file +!function(t){t.languages.tt2=t.languages.extend("clike",{comment:/#.*|\[%#[\s\S]*?%\]/,keyword:/\b(?:BLOCK|CALL|CASE|CATCH|CLEAR|DEBUG|DEFAULT|ELSE|ELSIF|END|FILTER|FINAL|FOREACH|GET|IF|IN|INCLUDE|INSERT|LAST|MACRO|META|NEXT|PERL|PROCESS|RAWPERL|RETURN|SET|STOP|SWITCH|TAGS|THROW|TRY|UNLESS|USE|WHILE|WRAPPER)\b/,punctuation:/[[\]{},()]/}),t.languages.insertBefore("tt2","number",{operator:/=[>=]?|!=?|<=?|>=?|&&|\|\|?|\b(?:and|not|or)\b/,variable:{pattern:/\b[a-z]\w*(?:\s*\.\s*(?:\d+|\$?[a-z]\w*))*\b/i}}),t.languages.insertBefore("tt2","keyword",{delimiter:{pattern:/^(?:\[%|%%)-?|-?%\]$/,alias:"punctuation"}}),t.languages.insertBefore("tt2","string",{"single-quoted-string":{pattern:/'[^\\']*(?:\\[\s\S][^\\']*)*'/,greedy:!0,alias:"string"},"double-quoted-string":{pattern:/"[^\\"]*(?:\\[\s\S][^\\"]*)*"/,greedy:!0,alias:"string",inside:{variable:{pattern:/\$(?:[a-z]\w*(?:\.(?:\d+|\$?[a-z]\w*))*)/i}}}}),delete t.languages.tt2.string,t.hooks.add("before-tokenize",function(e){t.languages["markup-templating"].buildPlaceholders(e,"tt2",/\[%[\s\S]+?%\]/g)}),t.hooks.add("after-tokenize",function(e){t.languages["markup-templating"].tokenizePlaceholders(e,"tt2")})}(Prism); \ No newline at end of file diff --git a/components/prism-turtle.js b/components/prism-turtle.js index 96a97cbfb7..357ee13229 100644 --- a/components/prism-turtle.js +++ b/components/prism-turtle.js @@ -39,10 +39,10 @@ Prism.languages.turtle = { }, 'number': /[+-]?\b\d+(?:\.\d*)?(?:e[+-]?\d+)?/i, 'punctuation': /[{}.,;()[\]]|\^\^/, - 'boolean': /\b(?:true|false)\b/, + 'boolean': /\b(?:false|true)\b/, 'keyword': [ /(?:\ba|@prefix|@base)\b|=/, - /\b(?:graph|base|prefix)\b/i + /\b(?:base|graph|prefix)\b/i ], 'tag': { pattern: /@[a-z]+(?:-[a-z\d]+)*/i, diff --git a/components/prism-turtle.min.js b/components/prism-turtle.min.js index eaa96996e2..57856d458c 100644 --- a/components/prism-turtle.min.js +++ b/components/prism-turtle.min.js @@ -1 +1 @@ -Prism.languages.turtle={comment:{pattern:/#.*/,greedy:!0},"multiline-string":{pattern:/"""(?:(?:""?)?(?:[^"\\]|\\.))*"""|'''(?:(?:''?)?(?:[^'\\]|\\.))*'''/,greedy:!0,alias:"string",inside:{comment:/#.*/}},string:{pattern:/"(?:[^\\"\r\n]|\\.)*"|'(?:[^\\'\r\n]|\\.)*'/,greedy:!0},url:{pattern:/<(?:[^\x00-\x20<>"{}|^`\\]|\\(?:u[\da-fA-F]{4}|U[\da-fA-F]{8}))*>/,greedy:!0,inside:{punctuation:/[<>]/}},function:{pattern:/(?:(?![-.\d\xB7])[-.\w\xB7\xC0-\uFFFD]+)?:(?:(?![-.])(?:[-.:\w\xC0-\uFFFD]|%[\da-f]{2}|\\.)+)?/i,inside:{"local-name":{pattern:/([^:]*:)[\s\S]+/,lookbehind:!0},prefix:{pattern:/[\s\S]+/,inside:{punctuation:/:/}}}},number:/[+-]?\b\d+(?:\.\d*)?(?:e[+-]?\d+)?/i,punctuation:/[{}.,;()[\]]|\^\^/,boolean:/\b(?:true|false)\b/,keyword:[/(?:\ba|@prefix|@base)\b|=/,/\b(?:graph|base|prefix)\b/i],tag:{pattern:/@[a-z]+(?:-[a-z\d]+)*/i,inside:{punctuation:/@/}}},Prism.languages.trig=Prism.languages.turtle; \ No newline at end of file +Prism.languages.turtle={comment:{pattern:/#.*/,greedy:!0},"multiline-string":{pattern:/"""(?:(?:""?)?(?:[^"\\]|\\.))*"""|'''(?:(?:''?)?(?:[^'\\]|\\.))*'''/,greedy:!0,alias:"string",inside:{comment:/#.*/}},string:{pattern:/"(?:[^\\"\r\n]|\\.)*"|'(?:[^\\'\r\n]|\\.)*'/,greedy:!0},url:{pattern:/<(?:[^\x00-\x20<>"{}|^`\\]|\\(?:u[\da-fA-F]{4}|U[\da-fA-F]{8}))*>/,greedy:!0,inside:{punctuation:/[<>]/}},function:{pattern:/(?:(?![-.\d\xB7])[-.\w\xB7\xC0-\uFFFD]+)?:(?:(?![-.])(?:[-.:\w\xC0-\uFFFD]|%[\da-f]{2}|\\.)+)?/i,inside:{"local-name":{pattern:/([^:]*:)[\s\S]+/,lookbehind:!0},prefix:{pattern:/[\s\S]+/,inside:{punctuation:/:/}}}},number:/[+-]?\b\d+(?:\.\d*)?(?:e[+-]?\d+)?/i,punctuation:/[{}.,;()[\]]|\^\^/,boolean:/\b(?:false|true)\b/,keyword:[/(?:\ba|@prefix|@base)\b|=/,/\b(?:base|graph|prefix)\b/i],tag:{pattern:/@[a-z]+(?:-[a-z\d]+)*/i,inside:{punctuation:/@/}}},Prism.languages.trig=Prism.languages.turtle; \ No newline at end of file diff --git a/components/prism-twig.js b/components/prism-twig.js index 5f87451a23..ef5f376b7a 100644 --- a/components/prism-twig.js +++ b/components/prism-twig.js @@ -23,11 +23,11 @@ Prism.languages.twig = { } }, 'keyword': /\b(?:even|if|odd)\b/, - 'boolean': /\b(?:true|false|null)\b/, + 'boolean': /\b(?:false|null|true)\b/, 'number': /\b0x[\dA-Fa-f]+|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee][-+]?\d+)?/, 'operator': [ { - pattern: /(\s)(?:and|b-and|b-xor|b-or|ends with|in|is|matches|not|or|same as|starts with)(?=\s)/, + pattern: /(\s)(?:and|b-and|b-or|b-xor|ends with|in|is|matches|not|or|same as|starts with)(?=\s)/, lookbehind: true }, /[=<>]=?|!=|\*\*?|\/\/?|\?:?|[-+~%|]/ diff --git a/components/prism-twig.min.js b/components/prism-twig.min.js index 620a8ae35b..6ce6806bbd 100644 --- a/components/prism-twig.min.js +++ b/components/prism-twig.min.js @@ -1 +1 @@ -Prism.languages.twig={comment:/\{#[\s\S]*?#\}/,tag:{pattern:/\{\{[\s\S]*?\}\}|\{%[\s\S]*?%\}/,inside:{ld:{pattern:/^(?:\{\{-?|\{%-?\s*\w+)/,inside:{punctuation:/^(?:\{\{|\{%)-?/,keyword:/\w+/}},rd:{pattern:/-?(?:%\}|\}\})$/,inside:{punctuation:/.+/}},string:{pattern:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,inside:{punctuation:/^['"]|['"]$/}},keyword:/\b(?:even|if|odd)\b/,boolean:/\b(?:true|false|null)\b/,number:/\b0x[\dA-Fa-f]+|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee][-+]?\d+)?/,operator:[{pattern:/(\s)(?:and|b-and|b-xor|b-or|ends with|in|is|matches|not|or|same as|starts with)(?=\s)/,lookbehind:!0},/[=<>]=?|!=|\*\*?|\/\/?|\?:?|[-+~%|]/],property:/\b[a-zA-Z_]\w*\b/,punctuation:/[()\[\]{}:.,]/}},other:{pattern:/\S(?:[\s\S]*\S)?/,inside:Prism.languages.markup}}; \ No newline at end of file +Prism.languages.twig={comment:/\{#[\s\S]*?#\}/,tag:{pattern:/\{\{[\s\S]*?\}\}|\{%[\s\S]*?%\}/,inside:{ld:{pattern:/^(?:\{\{-?|\{%-?\s*\w+)/,inside:{punctuation:/^(?:\{\{|\{%)-?/,keyword:/\w+/}},rd:{pattern:/-?(?:%\}|\}\})$/,inside:{punctuation:/.+/}},string:{pattern:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,inside:{punctuation:/^['"]|['"]$/}},keyword:/\b(?:even|if|odd)\b/,boolean:/\b(?:false|null|true)\b/,number:/\b0x[\dA-Fa-f]+|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee][-+]?\d+)?/,operator:[{pattern:/(\s)(?:and|b-and|b-or|b-xor|ends with|in|is|matches|not|or|same as|starts with)(?=\s)/,lookbehind:!0},/[=<>]=?|!=|\*\*?|\/\/?|\?:?|[-+~%|]/],property:/\b[a-zA-Z_]\w*\b/,punctuation:/[()\[\]{}:.,]/}},other:{pattern:/\S(?:[\s\S]*\S)?/,inside:Prism.languages.markup}}; \ No newline at end of file diff --git a/components/prism-typescript.js b/components/prism-typescript.js index 7e9ff7bf02..454a558ae6 100644 --- a/components/prism-typescript.js +++ b/components/prism-typescript.js @@ -7,7 +7,7 @@ greedy: true, inside: null // see below }, - 'builtin': /\b(?:string|Function|any|number|boolean|Array|symbol|console|Promise|unknown|never)\b/, + 'builtin': /\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/, }); // The keywords TypeScript adds to JavaScript diff --git a/components/prism-typescript.min.js b/components/prism-typescript.min.js index 77421b7608..491963dc62 100644 --- a/components/prism-typescript.min.js +++ b/components/prism-typescript.min.js @@ -1 +1 @@ -!function(e){e.languages.typescript=e.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:string|Function|any|number|boolean|Array|symbol|console|Promise|unknown|never)\b/}),e.languages.typescript.keyword.push(/\b(?:abstract|as|declare|implements|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete e.languages.typescript.parameter;var s=e.languages.extend("typescript",{});delete s["class-name"],e.languages.typescript["class-name"].inside=s,e.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:s}}}}),e.languages.ts=e.languages.typescript}(Prism); \ No newline at end of file +!function(e){e.languages.typescript=e.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),e.languages.typescript.keyword.push(/\b(?:abstract|as|declare|implements|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete e.languages.typescript.parameter;var s=e.languages.extend("typescript",{});delete s["class-name"],e.languages.typescript["class-name"].inside=s,e.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:s}}}}),e.languages.ts=e.languages.typescript}(Prism); \ No newline at end of file diff --git a/components/prism-unrealscript.js b/components/prism-unrealscript.js index 44fbf7aaf7..37779e5d2d 100644 --- a/components/prism-unrealscript.js +++ b/components/prism-unrealscript.js @@ -35,7 +35,7 @@ Prism.languages.unrealscript = { 'boolean': /\b(?:false|true)\b/, 'number': /\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i, // https://docs.unrealengine.com/udk/Three/UnrealScriptExpressions.html - 'operator': />>|<<|--|\+\+|\*\*|[-+*/~!=<>$@]=?|&&?|\|\|?|\^\^?|[?:%]|\b(?:Cross|Dot|ClockwiseFrom)\b/, + 'operator': />>|<<|--|\+\+|\*\*|[-+*/~!=<>$@]=?|&&?|\|\|?|\^\^?|[?:%]|\b(?:ClockwiseFrom|Cross|Dot)\b/, 'punctuation': /[()[\]{};,.]/ }; diff --git a/components/prism-unrealscript.min.js b/components/prism-unrealscript.min.js index a255a8a502..3db40a5d9f 100644 --- a/components/prism-unrealscript.min.js +++ b/components/prism-unrealscript.min.js @@ -1 +1 @@ -Prism.languages.unrealscript={comment:/\/\/.*|\/\*[\s\S]*?\*\//,string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},category:{pattern:/(\b(?:(?:autoexpand|hide|show)categories|var)\s*\()[^()]+(?=\))/,lookbehind:!0,greedy:!0,alias:"property"},metadata:{pattern:/(\w\s*)<\s*\w+\s*=[^<>|=\r\n]+(?:\|\s*\w+\s*=[^<>|=\r\n]+)*>/,lookbehind:!0,greedy:!0,inside:{property:/\b\w+(?=\s*=)/,operator:/=/,punctuation:/[<>|]/}},macro:{pattern:/`\w+/,alias:"property"},"class-name":{pattern:/(\b(?:class|enum|extends|interface|state(?:\(\))?|struct|within)\s+)\w+/,lookbehind:!0},keyword:/\b(?:abstract|actor|array|auto|autoexpandcategories|bool|break|byte|case|class|classgroup|client|coerce|collapsecategories|config|const|continue|default|defaultproperties|delegate|dependson|deprecated|do|dontcollapsecategories|editconst|editinlinenew|else|enum|event|exec|export|extends|final|float|for|forcescriptorder|foreach|function|goto|guid|hidecategories|hidedropdown|if|ignores|implements|inherits|input|int|interface|iterator|latent|local|material|name|native|nativereplication|noexport|nontransient|noteditinlinenew|notplaceable|operator|optional|out|pawn|perobjectconfig|perobjectlocalized|placeable|postoperator|preoperator|private|protected|reliable|replication|return|server|showcategories|simulated|singular|state|static|string|struct|structdefault|structdefaultproperties|switch|texture|transient|travel|unreliable|until|var|vector|while|within)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,boolean:/\b(?:false|true)\b/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/>>|<<|--|\+\+|\*\*|[-+*/~!=<>$@]=?|&&?|\|\|?|\^\^?|[?:%]|\b(?:Cross|Dot|ClockwiseFrom)\b/,punctuation:/[()[\]{};,.]/},Prism.languages.uc=Prism.languages.uscript=Prism.languages.unrealscript; \ No newline at end of file +Prism.languages.unrealscript={comment:/\/\/.*|\/\*[\s\S]*?\*\//,string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},category:{pattern:/(\b(?:(?:autoexpand|hide|show)categories|var)\s*\()[^()]+(?=\))/,lookbehind:!0,greedy:!0,alias:"property"},metadata:{pattern:/(\w\s*)<\s*\w+\s*=[^<>|=\r\n]+(?:\|\s*\w+\s*=[^<>|=\r\n]+)*>/,lookbehind:!0,greedy:!0,inside:{property:/\b\w+(?=\s*=)/,operator:/=/,punctuation:/[<>|]/}},macro:{pattern:/`\w+/,alias:"property"},"class-name":{pattern:/(\b(?:class|enum|extends|interface|state(?:\(\))?|struct|within)\s+)\w+/,lookbehind:!0},keyword:/\b(?:abstract|actor|array|auto|autoexpandcategories|bool|break|byte|case|class|classgroup|client|coerce|collapsecategories|config|const|continue|default|defaultproperties|delegate|dependson|deprecated|do|dontcollapsecategories|editconst|editinlinenew|else|enum|event|exec|export|extends|final|float|for|forcescriptorder|foreach|function|goto|guid|hidecategories|hidedropdown|if|ignores|implements|inherits|input|int|interface|iterator|latent|local|material|name|native|nativereplication|noexport|nontransient|noteditinlinenew|notplaceable|operator|optional|out|pawn|perobjectconfig|perobjectlocalized|placeable|postoperator|preoperator|private|protected|reliable|replication|return|server|showcategories|simulated|singular|state|static|string|struct|structdefault|structdefaultproperties|switch|texture|transient|travel|unreliable|until|var|vector|while|within)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,boolean:/\b(?:false|true)\b/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/>>|<<|--|\+\+|\*\*|[-+*/~!=<>$@]=?|&&?|\|\|?|\^\^?|[?:%]|\b(?:ClockwiseFrom|Cross|Dot)\b/,punctuation:/[()[\]{};,.]/},Prism.languages.uc=Prism.languages.uscript=Prism.languages.unrealscript; \ No newline at end of file diff --git a/components/prism-v.js b/components/prism-v.js index 4be506a536..9541123a3d 100644 --- a/components/prism-v.js +++ b/components/prism-v.js @@ -37,17 +37,17 @@ pattern: /(\b(?:enum|interface|struct|type)\s+)(?:C\.)?\w+/, lookbehind: true }, - 'keyword': /(?:\b(?:as|asm|assert|atomic|break|chan|const|continue|defer|else|embed|enum|fn|for|__global|go(?:to)?|if|import|in|interface|is|lock|match|module|mut|none|or|pub|return|rlock|select|shared|sizeof|static|struct|type(?:of)?|union|unsafe)|\$(?:if|else|for)|#(?:include|flag))\b/, + 'keyword': /(?:\b(?:__global|as|asm|assert|atomic|break|chan|const|continue|defer|else|embed|enum|fn|for|go(?:to)?|if|import|in|interface|is|lock|match|module|mut|none|or|pub|return|rlock|select|shared|sizeof|static|struct|type(?:of)?|union|unsafe)|\$(?:else|for|if)|#(?:flag|include))\b/, 'number': /\b(?:0x[a-f\d]+(?:_[a-f\d]+)*|0b[01]+(?:_[01]+)*|0o[0-7]+(?:_[0-7]+)*|\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?)\b/i, 'operator': /~|\?|[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\.?/, - 'builtin': /\b(?:any(?:_int|_float)?|bool|byte(?:ptr)?|charptr|f(?:32|64)|i(?:8|16|nt|64|128)|rune|size_t|string|u(?:16|32|64|128)|voidptr)\b/ + 'builtin': /\b(?:any(?:_float|_int)?|bool|byte(?:ptr)?|charptr|f(?:32|64)|i(?:8|16|64|128|nt)|rune|size_t|string|u(?:16|32|64|128)|voidptr)\b/ }); interpolationExpr.inside = Prism.languages.v; Prism.languages.insertBefore('v', 'operator', { 'attribute': { - pattern: /(^[\t ]*)\[(?:deprecated|unsafe_fn|typedef|live|inline|flag|ref_only|windows_stdcall|direct_array_access)\]/m, + pattern: /(^[\t ]*)\[(?:deprecated|direct_array_access|flag|inline|live|ref_only|typedef|unsafe_fn|windows_stdcall)\]/m, lookbehind: true, alias: 'annotation', inside: { diff --git a/components/prism-v.min.js b/components/prism-v.min.js index 3209d3d43f..736e32a01d 100644 --- a/components/prism-v.min.js +++ b/components/prism-v.min.js @@ -1 +1 @@ -!function(e){var n={pattern:/[\s\S]+/,inside:null};e.languages.v=e.languages.extend("clike",{string:[{pattern:/`(?:\\`|\\?[^`]{1,2})`/,alias:"rune"},{pattern:/r?(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,alias:"quoted-string",greedy:!0,inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:\{[^{}]*\}|\w+(?:\.\w+(?:\([^\(\)]*\))?|\[[^\[\]]+\])*)/,lookbehind:!0,inside:{"interpolation-variable":{pattern:/^\$\w[\s\S]*$/,alias:"variable"},"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},"interpolation-expression":n}}}}],"class-name":{pattern:/(\b(?:enum|interface|struct|type)\s+)(?:C\.)?\w+/,lookbehind:!0},keyword:/(?:\b(?:as|asm|assert|atomic|break|chan|const|continue|defer|else|embed|enum|fn|for|__global|go(?:to)?|if|import|in|interface|is|lock|match|module|mut|none|or|pub|return|rlock|select|shared|sizeof|static|struct|type(?:of)?|union|unsafe)|\$(?:if|else|for)|#(?:include|flag))\b/,number:/\b(?:0x[a-f\d]+(?:_[a-f\d]+)*|0b[01]+(?:_[01]+)*|0o[0-7]+(?:_[0-7]+)*|\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?)\b/i,operator:/~|\?|[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\.?/,builtin:/\b(?:any(?:_int|_float)?|bool|byte(?:ptr)?|charptr|f(?:32|64)|i(?:8|16|nt|64|128)|rune|size_t|string|u(?:16|32|64|128)|voidptr)\b/}),n.inside=e.languages.v,e.languages.insertBefore("v","operator",{attribute:{pattern:/(^[\t ]*)\[(?:deprecated|unsafe_fn|typedef|live|inline|flag|ref_only|windows_stdcall|direct_array_access)\]/m,lookbehind:!0,alias:"annotation",inside:{punctuation:/[\[\]]/,keyword:/\w+/}},generic:{pattern:/<\w+>(?=\s*[\)\{])/,inside:{punctuation:/[<>]/,"class-name":/\w+/}}}),e.languages.insertBefore("v","function",{"generic-function":{pattern:/\b\w+\s*<\w+>(?=\()/,inside:{function:/^\w+/,generic:{pattern:/<\w+>/,inside:e.languages.v.generic.inside}}}})}(Prism); \ No newline at end of file +!function(e){var n={pattern:/[\s\S]+/,inside:null};e.languages.v=e.languages.extend("clike",{string:[{pattern:/`(?:\\`|\\?[^`]{1,2})`/,alias:"rune"},{pattern:/r?(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,alias:"quoted-string",greedy:!0,inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:\{[^{}]*\}|\w+(?:\.\w+(?:\([^\(\)]*\))?|\[[^\[\]]+\])*)/,lookbehind:!0,inside:{"interpolation-variable":{pattern:/^\$\w[\s\S]*$/,alias:"variable"},"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},"interpolation-expression":n}}}}],"class-name":{pattern:/(\b(?:enum|interface|struct|type)\s+)(?:C\.)?\w+/,lookbehind:!0},keyword:/(?:\b(?:__global|as|asm|assert|atomic|break|chan|const|continue|defer|else|embed|enum|fn|for|go(?:to)?|if|import|in|interface|is|lock|match|module|mut|none|or|pub|return|rlock|select|shared|sizeof|static|struct|type(?:of)?|union|unsafe)|\$(?:else|for|if)|#(?:flag|include))\b/,number:/\b(?:0x[a-f\d]+(?:_[a-f\d]+)*|0b[01]+(?:_[01]+)*|0o[0-7]+(?:_[0-7]+)*|\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?)\b/i,operator:/~|\?|[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\.?/,builtin:/\b(?:any(?:_float|_int)?|bool|byte(?:ptr)?|charptr|f(?:32|64)|i(?:8|16|64|128|nt)|rune|size_t|string|u(?:16|32|64|128)|voidptr)\b/}),n.inside=e.languages.v,e.languages.insertBefore("v","operator",{attribute:{pattern:/(^[\t ]*)\[(?:deprecated|direct_array_access|flag|inline|live|ref_only|typedef|unsafe_fn|windows_stdcall)\]/m,lookbehind:!0,alias:"annotation",inside:{punctuation:/[\[\]]/,keyword:/\w+/}},generic:{pattern:/<\w+>(?=\s*[\)\{])/,inside:{punctuation:/[<>]/,"class-name":/\w+/}}}),e.languages.insertBefore("v","function",{"generic-function":{pattern:/\b\w+\s*<\w+>(?=\()/,inside:{function:/^\w+/,generic:{pattern:/<\w+>/,inside:e.languages.v.generic.inside}}}})}(Prism); \ No newline at end of file diff --git a/components/prism-vala.js b/components/prism-vala.js index 2d020e970e..17651cbfa2 100644 --- a/components/prism-vala.js +++ b/components/prism-vala.js @@ -26,14 +26,14 @@ Prism.languages.vala = Prism.languages.extend('clike', { }, { // class Foo - pattern: /((?:\b(?:class|interface|new|struct|enum)\s+)|(?:catch\s+\())[A-Z]\w*(?:\.\w+)*\b/, + pattern: /((?:\b(?:class|enum|interface|new|struct)\s+)|(?:catch\s+\())[A-Z]\w*(?:\.\w+)*\b/, lookbehind: true, inside: { punctuation: /\./ } } ], - 'keyword': /\b(?:bool|char|double|float|null|size_t|ssize_t|string|unichar|void|int|int8|int16|int32|int64|long|short|uchar|uint|uint8|uint16|uint32|uint64|ulong|ushort|class|delegate|enum|errordomain|interface|namespace|struct|break|continue|do|for|foreach|return|while|else|if|switch|assert|case|default|abstract|const|dynamic|ensures|extern|inline|internal|override|private|protected|public|requires|signal|static|virtual|volatile|weak|async|owned|unowned|try|catch|finally|throw|as|base|construct|delete|get|in|is|lock|new|out|params|ref|sizeof|set|this|throws|typeof|using|value|var|yield)\b/i, + 'keyword': /\b(?:abstract|as|assert|async|base|bool|break|case|catch|char|class|const|construct|continue|default|delegate|delete|do|double|dynamic|else|ensures|enum|errordomain|extern|finally|float|for|foreach|get|if|in|inline|int|int16|int32|int64|int8|interface|internal|is|lock|long|namespace|new|null|out|override|owned|params|private|protected|public|ref|requires|return|set|short|signal|sizeof|size_t|ssize_t|static|string|struct|switch|this|throw|throws|try|typeof|uchar|uint|uint16|uint32|uint64|uint8|ulong|unichar|unowned|ushort|using|value|var|virtual|void|volatile|weak|while|yield)\b/i, 'function': /\b\w+(?=\s*\()/, 'number': /(?:\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)(?:f|u?l?)?/i, 'operator': /\+\+|--|&&|\|\||<<=?|>>=?|=>|->|~|[+\-*\/%&^|=!<>]=?|\?\??|\.\.\./, diff --git a/components/prism-vala.min.js b/components/prism-vala.min.js index 7d84f1e18d..d26bfc753a 100644 --- a/components/prism-vala.min.js +++ b/components/prism-vala.min.js @@ -1 +1 @@ -Prism.languages.vala=Prism.languages.extend("clike",{"class-name":[{pattern:/\b[A-Z]\w*(?:\.\w+)*\b(?=(?:\?\s+|\*?\s+\*?)\w)/,inside:{punctuation:/\./}},{pattern:/(\[)[A-Z]\w*(?:\.\w+)*\b/,lookbehind:!0,inside:{punctuation:/\./}},{pattern:/(\b(?:class|interface)\s+[A-Z]\w*(?:\.\w+)*\s*:\s*)[A-Z]\w*(?:\.\w+)*\b/,lookbehind:!0,inside:{punctuation:/\./}},{pattern:/((?:\b(?:class|interface|new|struct|enum)\s+)|(?:catch\s+\())[A-Z]\w*(?:\.\w+)*\b/,lookbehind:!0,inside:{punctuation:/\./}}],keyword:/\b(?:bool|char|double|float|null|size_t|ssize_t|string|unichar|void|int|int8|int16|int32|int64|long|short|uchar|uint|uint8|uint16|uint32|uint64|ulong|ushort|class|delegate|enum|errordomain|interface|namespace|struct|break|continue|do|for|foreach|return|while|else|if|switch|assert|case|default|abstract|const|dynamic|ensures|extern|inline|internal|override|private|protected|public|requires|signal|static|virtual|volatile|weak|async|owned|unowned|try|catch|finally|throw|as|base|construct|delete|get|in|is|lock|new|out|params|ref|sizeof|set|this|throws|typeof|using|value|var|yield)\b/i,function:/\b\w+(?=\s*\()/,number:/(?:\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)(?:f|u?l?)?/i,operator:/\+\+|--|&&|\|\||<<=?|>>=?|=>|->|~|[+\-*\/%&^|=!<>]=?|\?\??|\.\.\./,punctuation:/[{}[\];(),.:]/,constant:/\b[A-Z0-9_]+\b/}),Prism.languages.insertBefore("vala","string",{"raw-string":{pattern:/"""[\s\S]*?"""/,greedy:!0,alias:"string"},"template-string":{pattern:/@"[\s\S]*?"/,greedy:!0,inside:{interpolation:{pattern:/\$(?:\([^)]*\)|[a-zA-Z]\w*)/,inside:{delimiter:{pattern:/^\$\(?|\)$/,alias:"punctuation"},rest:Prism.languages.vala}},string:/[\s\S]+/}}}),Prism.languages.insertBefore("vala","keyword",{regex:{pattern:/\/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[imsx]{0,4}(?=\s*(?:$|[\r\n,.;})\]]))/,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:Prism.languages.regex},"regex-delimiter":/^\//,"regex-flags":/^[a-z]+$/}}}); \ No newline at end of file +Prism.languages.vala=Prism.languages.extend("clike",{"class-name":[{pattern:/\b[A-Z]\w*(?:\.\w+)*\b(?=(?:\?\s+|\*?\s+\*?)\w)/,inside:{punctuation:/\./}},{pattern:/(\[)[A-Z]\w*(?:\.\w+)*\b/,lookbehind:!0,inside:{punctuation:/\./}},{pattern:/(\b(?:class|interface)\s+[A-Z]\w*(?:\.\w+)*\s*:\s*)[A-Z]\w*(?:\.\w+)*\b/,lookbehind:!0,inside:{punctuation:/\./}},{pattern:/((?:\b(?:class|enum|interface|new|struct)\s+)|(?:catch\s+\())[A-Z]\w*(?:\.\w+)*\b/,lookbehind:!0,inside:{punctuation:/\./}}],keyword:/\b(?:abstract|as|assert|async|base|bool|break|case|catch|char|class|const|construct|continue|default|delegate|delete|do|double|dynamic|else|ensures|enum|errordomain|extern|finally|float|for|foreach|get|if|in|inline|int|int16|int32|int64|int8|interface|internal|is|lock|long|namespace|new|null|out|override|owned|params|private|protected|public|ref|requires|return|set|short|signal|sizeof|size_t|ssize_t|static|string|struct|switch|this|throw|throws|try|typeof|uchar|uint|uint16|uint32|uint64|uint8|ulong|unichar|unowned|ushort|using|value|var|virtual|void|volatile|weak|while|yield)\b/i,function:/\b\w+(?=\s*\()/,number:/(?:\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)(?:f|u?l?)?/i,operator:/\+\+|--|&&|\|\||<<=?|>>=?|=>|->|~|[+\-*\/%&^|=!<>]=?|\?\??|\.\.\./,punctuation:/[{}[\];(),.:]/,constant:/\b[A-Z0-9_]+\b/}),Prism.languages.insertBefore("vala","string",{"raw-string":{pattern:/"""[\s\S]*?"""/,greedy:!0,alias:"string"},"template-string":{pattern:/@"[\s\S]*?"/,greedy:!0,inside:{interpolation:{pattern:/\$(?:\([^)]*\)|[a-zA-Z]\w*)/,inside:{delimiter:{pattern:/^\$\(?|\)$/,alias:"punctuation"},rest:Prism.languages.vala}},string:/[\s\S]+/}}}),Prism.languages.insertBefore("vala","keyword",{regex:{pattern:/\/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[imsx]{0,4}(?=\s*(?:$|[\r\n,.;})\]]))/,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:Prism.languages.regex},"regex-delimiter":/^\//,"regex-flags":/^[a-z]+$/}}}); \ No newline at end of file diff --git a/components/prism-vbnet.js b/components/prism-vbnet.js index 5878e3ac70..eb893822cc 100644 --- a/components/prism-vbnet.js +++ b/components/prism-vbnet.js @@ -17,6 +17,6 @@ Prism.languages.vbnet = Prism.languages.extend('basic', { lookbehind: true, greedy: true }, - 'keyword': /(?:\b(?:ADDHANDLER|ADDRESSOF|ALIAS|AND|ANDALSO|AS|BEEP|BLOAD|BOOLEAN|BSAVE|BYREF|BYTE|BYVAL|CALL(?: ABSOLUTE)?|CASE|CATCH|CBOOL|CBYTE|CCHAR|CDATE|CDEC|CDBL|CHAIN|CHAR|CHDIR|CINT|CLASS|CLEAR|CLNG|CLOSE|CLS|COBJ|COM|COMMON|CONST|CONTINUE|CSBYTE|CSHORT|CSNG|CSTR|CTYPE|CUINT|CULNG|CUSHORT|DATA|DATE|DECIMAL|DECLARE|DEFAULT|DEF(?: FN| SEG|DBL|INT|LNG|SNG|STR)|DELEGATE|DIM|DIRECTCAST|DO|DOUBLE|ELSE|ELSEIF|END|ENUM|ENVIRON|ERASE|ERROR|EVENT|EXIT|FALSE|FIELD|FILES|FINALLY|FOR(?: EACH)?|FRIEND|FUNCTION|GET|GETTYPE|GETXMLNAMESPACE|GLOBAL|GOSUB|GOTO|HANDLES|IF|IMPLEMENTS|IMPORTS|IN|INHERITS|INPUT|INTEGER|INTERFACE|IOCTL|IS|ISNOT|KEY|KILL|LINE INPUT|LET|LIB|LIKE|LOCATE|LOCK|LONG|LOOP|LSET|ME|MKDIR|MOD|MODULE|MUSTINHERIT|MUSTOVERRIDE|MYBASE|MYCLASS|NAME|NAMESPACE|NARROWING|NEW|NEXT|NOT|NOTHING|NOTINHERITABLE|NOTOVERRIDABLE|OBJECT|OF|OFF|ON(?: COM| ERROR| KEY| TIMER)?|OPERATOR|OPEN|OPTION(?: BASE)?|OPTIONAL|OR|ORELSE|OUT|OVERLOADS|OVERRIDABLE|OVERRIDES|PARAMARRAY|PARTIAL|POKE|PRIVATE|PROPERTY|PROTECTED|PUBLIC|PUT|RAISEEVENT|READ|READONLY|REDIM|REM|REMOVEHANDLER|RESTORE|RESUME|RETURN|RMDIR|RSET|RUN|SBYTE|SELECT(?: CASE)?|SET|SHADOWS|SHARED|SHORT|SINGLE|SHELL|SLEEP|STATIC|STEP|STOP|STRING|STRUCTURE|SUB|SYNCLOCK|SWAP|SYSTEM|THEN|THROW|TIMER|TO|TROFF|TRON|TRUE|TRY|TRYCAST|TYPE|TYPEOF|UINTEGER|ULONG|UNLOCK|UNTIL|USHORT|USING|VIEW PRINT|WAIT|WEND|WHEN|WHILE|WIDENING|WITH|WITHEVENTS|WRITE|WRITEONLY|XOR)|\B(?:#CONST|#ELSE|#ELSEIF|#END|#IF))(?:\$|\b)/i, + 'keyword': /(?:\b(?:ADDHANDLER|ADDRESSOF|ALIAS|AND|ANDALSO|AS|BEEP|BLOAD|BOOLEAN|BSAVE|BYREF|BYTE|BYVAL|CALL(?: ABSOLUTE)?|CASE|CATCH|CBOOL|CBYTE|CCHAR|CDATE|CDBL|CDEC|CHAIN|CHAR|CHDIR|CINT|CLASS|CLEAR|CLNG|CLOSE|CLS|COBJ|COM|COMMON|CONST|CONTINUE|CSBYTE|CSHORT|CSNG|CSTR|CTYPE|CUINT|CULNG|CUSHORT|DATA|DATE|DECIMAL|DECLARE|DEF(?: FN| SEG|DBL|INT|LNG|SNG|STR)|DEFAULT|DELEGATE|DIM|DIRECTCAST|DO|DOUBLE|ELSE|ELSEIF|END|ENUM|ENVIRON|ERASE|ERROR|EVENT|EXIT|FALSE|FIELD|FILES|FINALLY|FOR(?: EACH)?|FRIEND|FUNCTION|GET|GETTYPE|GETXMLNAMESPACE|GLOBAL|GOSUB|GOTO|HANDLES|IF|IMPLEMENTS|IMPORTS|IN|INHERITS|INPUT|INTEGER|INTERFACE|IOCTL|IS|ISNOT|KEY|KILL|LET|LIB|LIKE|LINE INPUT|LOCATE|LOCK|LONG|LOOP|LSET|ME|MKDIR|MOD|MODULE|MUSTINHERIT|MUSTOVERRIDE|MYBASE|MYCLASS|NAME|NAMESPACE|NARROWING|NEW|NEXT|NOT|NOTHING|NOTINHERITABLE|NOTOVERRIDABLE|OBJECT|OF|OFF|ON(?: COM| ERROR| KEY| TIMER)?|OPEN|OPERATOR|OPTION(?: BASE)?|OPTIONAL|OR|ORELSE|OUT|OVERLOADS|OVERRIDABLE|OVERRIDES|PARAMARRAY|PARTIAL|POKE|PRIVATE|PROPERTY|PROTECTED|PUBLIC|PUT|RAISEEVENT|READ|READONLY|REDIM|REM|REMOVEHANDLER|RESTORE|RESUME|RETURN|RMDIR|RSET|RUN|SBYTE|SELECT(?: CASE)?|SET|SHADOWS|SHARED|SHELL|SHORT|SINGLE|SLEEP|STATIC|STEP|STOP|STRING|STRUCTURE|SUB|SWAP|SYNCLOCK|SYSTEM|THEN|THROW|TIMER|TO|TROFF|TRON|TRUE|TRY|TRYCAST|TYPE|TYPEOF|UINTEGER|ULONG|UNLOCK|UNTIL|USHORT|USING|VIEW PRINT|WAIT|WEND|WHEN|WHILE|WIDENING|WITH|WITHEVENTS|WRITE|WRITEONLY|XOR)|\B(?:#CONST|#ELSE|#ELSEIF|#END|#IF))(?:\$|\b)/i, 'punctuation': /[,;:(){}]/ }); diff --git a/components/prism-vbnet.min.js b/components/prism-vbnet.min.js index c45f14c128..beb26592f2 100644 --- a/components/prism-vbnet.min.js +++ b/components/prism-vbnet.min.js @@ -1 +1 @@ -Prism.languages.vbnet=Prism.languages.extend("basic",{comment:[{pattern:/(?:!|REM\b).+/i,inside:{keyword:/^REM/i}},{pattern:/(^|[^\\:])'.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(^|[^"])"(?:""|[^"])*"(?!")/i,lookbehind:!0,greedy:!0},keyword:/(?:\b(?:ADDHANDLER|ADDRESSOF|ALIAS|AND|ANDALSO|AS|BEEP|BLOAD|BOOLEAN|BSAVE|BYREF|BYTE|BYVAL|CALL(?: ABSOLUTE)?|CASE|CATCH|CBOOL|CBYTE|CCHAR|CDATE|CDEC|CDBL|CHAIN|CHAR|CHDIR|CINT|CLASS|CLEAR|CLNG|CLOSE|CLS|COBJ|COM|COMMON|CONST|CONTINUE|CSBYTE|CSHORT|CSNG|CSTR|CTYPE|CUINT|CULNG|CUSHORT|DATA|DATE|DECIMAL|DECLARE|DEFAULT|DEF(?: FN| SEG|DBL|INT|LNG|SNG|STR)|DELEGATE|DIM|DIRECTCAST|DO|DOUBLE|ELSE|ELSEIF|END|ENUM|ENVIRON|ERASE|ERROR|EVENT|EXIT|FALSE|FIELD|FILES|FINALLY|FOR(?: EACH)?|FRIEND|FUNCTION|GET|GETTYPE|GETXMLNAMESPACE|GLOBAL|GOSUB|GOTO|HANDLES|IF|IMPLEMENTS|IMPORTS|IN|INHERITS|INPUT|INTEGER|INTERFACE|IOCTL|IS|ISNOT|KEY|KILL|LINE INPUT|LET|LIB|LIKE|LOCATE|LOCK|LONG|LOOP|LSET|ME|MKDIR|MOD|MODULE|MUSTINHERIT|MUSTOVERRIDE|MYBASE|MYCLASS|NAME|NAMESPACE|NARROWING|NEW|NEXT|NOT|NOTHING|NOTINHERITABLE|NOTOVERRIDABLE|OBJECT|OF|OFF|ON(?: COM| ERROR| KEY| TIMER)?|OPERATOR|OPEN|OPTION(?: BASE)?|OPTIONAL|OR|ORELSE|OUT|OVERLOADS|OVERRIDABLE|OVERRIDES|PARAMARRAY|PARTIAL|POKE|PRIVATE|PROPERTY|PROTECTED|PUBLIC|PUT|RAISEEVENT|READ|READONLY|REDIM|REM|REMOVEHANDLER|RESTORE|RESUME|RETURN|RMDIR|RSET|RUN|SBYTE|SELECT(?: CASE)?|SET|SHADOWS|SHARED|SHORT|SINGLE|SHELL|SLEEP|STATIC|STEP|STOP|STRING|STRUCTURE|SUB|SYNCLOCK|SWAP|SYSTEM|THEN|THROW|TIMER|TO|TROFF|TRON|TRUE|TRY|TRYCAST|TYPE|TYPEOF|UINTEGER|ULONG|UNLOCK|UNTIL|USHORT|USING|VIEW PRINT|WAIT|WEND|WHEN|WHILE|WIDENING|WITH|WITHEVENTS|WRITE|WRITEONLY|XOR)|\B(?:#CONST|#ELSE|#ELSEIF|#END|#IF))(?:\$|\b)/i,punctuation:/[,;:(){}]/}); \ No newline at end of file +Prism.languages.vbnet=Prism.languages.extend("basic",{comment:[{pattern:/(?:!|REM\b).+/i,inside:{keyword:/^REM/i}},{pattern:/(^|[^\\:])'.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(^|[^"])"(?:""|[^"])*"(?!")/i,lookbehind:!0,greedy:!0},keyword:/(?:\b(?:ADDHANDLER|ADDRESSOF|ALIAS|AND|ANDALSO|AS|BEEP|BLOAD|BOOLEAN|BSAVE|BYREF|BYTE|BYVAL|CALL(?: ABSOLUTE)?|CASE|CATCH|CBOOL|CBYTE|CCHAR|CDATE|CDBL|CDEC|CHAIN|CHAR|CHDIR|CINT|CLASS|CLEAR|CLNG|CLOSE|CLS|COBJ|COM|COMMON|CONST|CONTINUE|CSBYTE|CSHORT|CSNG|CSTR|CTYPE|CUINT|CULNG|CUSHORT|DATA|DATE|DECIMAL|DECLARE|DEF(?: FN| SEG|DBL|INT|LNG|SNG|STR)|DEFAULT|DELEGATE|DIM|DIRECTCAST|DO|DOUBLE|ELSE|ELSEIF|END|ENUM|ENVIRON|ERASE|ERROR|EVENT|EXIT|FALSE|FIELD|FILES|FINALLY|FOR(?: EACH)?|FRIEND|FUNCTION|GET|GETTYPE|GETXMLNAMESPACE|GLOBAL|GOSUB|GOTO|HANDLES|IF|IMPLEMENTS|IMPORTS|IN|INHERITS|INPUT|INTEGER|INTERFACE|IOCTL|IS|ISNOT|KEY|KILL|LET|LIB|LIKE|LINE INPUT|LOCATE|LOCK|LONG|LOOP|LSET|ME|MKDIR|MOD|MODULE|MUSTINHERIT|MUSTOVERRIDE|MYBASE|MYCLASS|NAME|NAMESPACE|NARROWING|NEW|NEXT|NOT|NOTHING|NOTINHERITABLE|NOTOVERRIDABLE|OBJECT|OF|OFF|ON(?: COM| ERROR| KEY| TIMER)?|OPEN|OPERATOR|OPTION(?: BASE)?|OPTIONAL|OR|ORELSE|OUT|OVERLOADS|OVERRIDABLE|OVERRIDES|PARAMARRAY|PARTIAL|POKE|PRIVATE|PROPERTY|PROTECTED|PUBLIC|PUT|RAISEEVENT|READ|READONLY|REDIM|REM|REMOVEHANDLER|RESTORE|RESUME|RETURN|RMDIR|RSET|RUN|SBYTE|SELECT(?: CASE)?|SET|SHADOWS|SHARED|SHELL|SHORT|SINGLE|SLEEP|STATIC|STEP|STOP|STRING|STRUCTURE|SUB|SWAP|SYNCLOCK|SYSTEM|THEN|THROW|TIMER|TO|TROFF|TRON|TRUE|TRY|TRYCAST|TYPE|TYPEOF|UINTEGER|ULONG|UNLOCK|UNTIL|USHORT|USING|VIEW PRINT|WAIT|WEND|WHEN|WHILE|WIDENING|WITH|WITHEVENTS|WRITE|WRITEONLY|XOR)|\B(?:#CONST|#ELSE|#ELSEIF|#END|#IF))(?:\$|\b)/i,punctuation:/[,;:(){}]/}); \ No newline at end of file diff --git a/components/prism-velocity.js b/components/prism-velocity.js index 7006757b65..a824bb2fca 100644 --- a/components/prism-velocity.js +++ b/components/prism-velocity.js @@ -12,7 +12,7 @@ greedy: true }, 'number': /\b\d+\b/, - 'boolean': /\b(?:true|false)\b/, + 'boolean': /\b(?:false|true)\b/, 'operator': /[=!<>]=?|[+*/%-]|&&|\|\||\.\.|\b(?:eq|g[et]|l[et]|n(?:e|ot))\b/, 'punctuation': /[(){}[\]:,.]/ }; diff --git a/components/prism-velocity.min.js b/components/prism-velocity.min.js index 6015fceb20..5661b8ea51 100644 --- a/components/prism-velocity.min.js +++ b/components/prism-velocity.min.js @@ -1 +1 @@ -!function(e){e.languages.velocity=e.languages.extend("markup",{});var n={variable:{pattern:/(^|[^\\](?:\\\\)*)\$!?(?:[a-z][\w-]*(?:\([^)]*\))?(?:\.[a-z][\w-]*(?:\([^)]*\))?|\[[^\]]+\])*|\{[^}]+\})/i,lookbehind:!0,inside:{}},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},number:/\b\d+\b/,boolean:/\b(?:true|false)\b/,operator:/[=!<>]=?|[+*/%-]|&&|\|\||\.\.|\b(?:eq|g[et]|l[et]|n(?:e|ot))\b/,punctuation:/[(){}[\]:,.]/};n.variable.inside={string:n.string,function:{pattern:/([^\w-])[a-z][\w-]*(?=\()/,lookbehind:!0},number:n.number,boolean:n.boolean,punctuation:n.punctuation},e.languages.insertBefore("velocity","comment",{unparsed:{pattern:/(^|[^\\])#\[\[[\s\S]*?\]\]#/,lookbehind:!0,greedy:!0,inside:{punctuation:/^#\[\[|\]\]#$/}},"velocity-comment":[{pattern:/(^|[^\\])#\*[\s\S]*?\*#/,lookbehind:!0,greedy:!0,alias:"comment"},{pattern:/(^|[^\\])##.*/,lookbehind:!0,greedy:!0,alias:"comment"}],directive:{pattern:/(^|[^\\](?:\\\\)*)#@?(?:[a-z][\w-]*|\{[a-z][\w-]*\})(?:\s*\((?:[^()]|\([^()]*\))*\))?/i,lookbehind:!0,inside:{keyword:{pattern:/^#@?(?:[a-z][\w-]*|\{[a-z][\w-]*\})|\bin\b/,inside:{punctuation:/[{}]/}},rest:n}},variable:n.variable}),e.languages.velocity.tag.inside["attr-value"].inside.rest=e.languages.velocity}(Prism); \ No newline at end of file +!function(e){e.languages.velocity=e.languages.extend("markup",{});var n={variable:{pattern:/(^|[^\\](?:\\\\)*)\$!?(?:[a-z][\w-]*(?:\([^)]*\))?(?:\.[a-z][\w-]*(?:\([^)]*\))?|\[[^\]]+\])*|\{[^}]+\})/i,lookbehind:!0,inside:{}},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},number:/\b\d+\b/,boolean:/\b(?:false|true)\b/,operator:/[=!<>]=?|[+*/%-]|&&|\|\||\.\.|\b(?:eq|g[et]|l[et]|n(?:e|ot))\b/,punctuation:/[(){}[\]:,.]/};n.variable.inside={string:n.string,function:{pattern:/([^\w-])[a-z][\w-]*(?=\()/,lookbehind:!0},number:n.number,boolean:n.boolean,punctuation:n.punctuation},e.languages.insertBefore("velocity","comment",{unparsed:{pattern:/(^|[^\\])#\[\[[\s\S]*?\]\]#/,lookbehind:!0,greedy:!0,inside:{punctuation:/^#\[\[|\]\]#$/}},"velocity-comment":[{pattern:/(^|[^\\])#\*[\s\S]*?\*#/,lookbehind:!0,greedy:!0,alias:"comment"},{pattern:/(^|[^\\])##.*/,lookbehind:!0,greedy:!0,alias:"comment"}],directive:{pattern:/(^|[^\\](?:\\\\)*)#@?(?:[a-z][\w-]*|\{[a-z][\w-]*\})(?:\s*\((?:[^()]|\([^()]*\))*\))?/i,lookbehind:!0,inside:{keyword:{pattern:/^#@?(?:[a-z][\w-]*|\{[a-z][\w-]*\})|\bin\b/,inside:{punctuation:/[{}]/}},rest:n}},variable:n.variable}),e.languages.velocity.tag.inside["attr-value"].inside.rest=e.languages.velocity}(Prism); \ No newline at end of file diff --git a/components/prism-verilog.js b/components/prism-verilog.js index fcc54f09af..e53b908717 100644 --- a/components/prism-verilog.js +++ b/components/prism-verilog.js @@ -10,9 +10,9 @@ Prism.languages.verilog = { 'constant': /\B`\w+\b/, 'function': /\b\w+(?=\()/, // support for verilog and system verilog keywords - 'keyword': /\b(?:alias|and|assert|assign|assume|automatic|before|begin|bind|bins|binsof|bit|break|buf|bufif0|bufif1|byte|class|case|casex|casez|cell|chandle|clocking|cmos|config|const|constraint|context|continue|cover|covergroup|coverpoint|cross|deassign|default|defparam|design|disable|dist|do|edge|else|end|endcase|endclass|endclocking|endconfig|endfunction|endgenerate|endgroup|endinterface|endmodule|endpackage|endprimitive|endprogram|endproperty|endspecify|endsequence|endtable|endtask|enum|event|expect|export|extends|extern|final|first_match|for|force|foreach|forever|fork|forkjoin|function|generate|genvar|highz0|highz1|if|iff|ifnone|ignore_bins|illegal_bins|import|incdir|include|initial|inout|input|inside|instance|int|integer|interface|intersect|join|join_any|join_none|large|liblist|library|local|localparam|logic|longint|macromodule|matches|medium|modport|module|nand|negedge|new|nmos|nor|noshowcancelled|not|notif0|notif1|null|or|output|package|packed|parameter|pmos|posedge|primitive|priority|program|property|protected|pull0|pull1|pulldown|pullup|pulsestyle_onevent|pulsestyle_ondetect|pure|rand|randc|randcase|randsequence|rcmos|real|realtime|ref|reg|release|repeat|return|rnmos|rpmos|rtran|rtranif0|rtranif1|scalared|sequence|shortint|shortreal|showcancelled|signed|small|solve|specify|specparam|static|string|strong0|strong1|struct|super|supply0|supply1|table|tagged|task|this|throughout|time|timeprecision|timeunit|tran|tranif0|tranif1|tri|tri0|tri1|triand|trior|trireg|type|typedef|union|unique|unsigned|use|uwire|var|vectored|virtual|void|wait|wait_order|wand|weak0|weak1|while|wildcard|wire|with|within|wor|xnor|xor)\b/, + 'keyword': /\b(?:alias|and|assert|assign|assume|automatic|before|begin|bind|bins|binsof|bit|break|buf|bufif0|bufif1|byte|case|casex|casez|cell|chandle|class|clocking|cmos|config|const|constraint|context|continue|cover|covergroup|coverpoint|cross|deassign|default|defparam|design|disable|dist|do|edge|else|end|endcase|endclass|endclocking|endconfig|endfunction|endgenerate|endgroup|endinterface|endmodule|endpackage|endprimitive|endprogram|endproperty|endsequence|endspecify|endtable|endtask|enum|event|expect|export|extends|extern|final|first_match|for|force|foreach|forever|fork|forkjoin|function|generate|genvar|highz0|highz1|if|iff|ifnone|ignore_bins|illegal_bins|import|incdir|include|initial|inout|input|inside|instance|int|integer|interface|intersect|join|join_any|join_none|large|liblist|library|local|localparam|logic|longint|macromodule|matches|medium|modport|module|nand|negedge|new|nmos|nor|noshowcancelled|not|notif0|notif1|null|or|output|package|packed|parameter|pmos|posedge|primitive|priority|program|property|protected|pull0|pull1|pulldown|pullup|pulsestyle_ondetect|pulsestyle_onevent|pure|rand|randc|randcase|randsequence|rcmos|real|realtime|ref|reg|release|repeat|return|rnmos|rpmos|rtran|rtranif0|rtranif1|scalared|sequence|shortint|shortreal|showcancelled|signed|small|solve|specify|specparam|static|string|strong0|strong1|struct|super|supply0|supply1|table|tagged|task|this|throughout|time|timeprecision|timeunit|tran|tranif0|tranif1|tri|tri0|tri1|triand|trior|trireg|type|typedef|union|unique|unsigned|use|uwire|var|vectored|virtual|void|wait|wait_order|wand|weak0|weak1|while|wildcard|wire|with|within|wor|xnor|xor)\b/, // bold highlighting for all verilog and system verilog logic blocks - 'important': /\b(?:always_latch|always_comb|always_ff|always)\b ?@?/, + 'important': /\b(?:always|always_comb|always_ff|always_latch)\b ?@?/, // support for time ticks, vectors, and real numbers 'number': /\B##?\d+|(?:\b\d+)?'[odbh] ?[\da-fzx_?]+|\b(?:\d*[._])?\d+(?:e[-+]?\d+)?/i, 'operator': /[-+{}^~%*\/?=!<>&|]+/, diff --git a/components/prism-verilog.min.js b/components/prism-verilog.min.js index 79d37f05d9..ea5b6f8dc6 100644 --- a/components/prism-verilog.min.js +++ b/components/prism-verilog.min.js @@ -1 +1 @@ -Prism.languages.verilog={comment:/\/\/.*|\/\*[\s\S]*?\*\//,string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},property:/\B\$\w+\b/,constant:/\B`\w+\b/,function:/\b\w+(?=\()/,keyword:/\b(?:alias|and|assert|assign|assume|automatic|before|begin|bind|bins|binsof|bit|break|buf|bufif0|bufif1|byte|class|case|casex|casez|cell|chandle|clocking|cmos|config|const|constraint|context|continue|cover|covergroup|coverpoint|cross|deassign|default|defparam|design|disable|dist|do|edge|else|end|endcase|endclass|endclocking|endconfig|endfunction|endgenerate|endgroup|endinterface|endmodule|endpackage|endprimitive|endprogram|endproperty|endspecify|endsequence|endtable|endtask|enum|event|expect|export|extends|extern|final|first_match|for|force|foreach|forever|fork|forkjoin|function|generate|genvar|highz0|highz1|if|iff|ifnone|ignore_bins|illegal_bins|import|incdir|include|initial|inout|input|inside|instance|int|integer|interface|intersect|join|join_any|join_none|large|liblist|library|local|localparam|logic|longint|macromodule|matches|medium|modport|module|nand|negedge|new|nmos|nor|noshowcancelled|not|notif0|notif1|null|or|output|package|packed|parameter|pmos|posedge|primitive|priority|program|property|protected|pull0|pull1|pulldown|pullup|pulsestyle_onevent|pulsestyle_ondetect|pure|rand|randc|randcase|randsequence|rcmos|real|realtime|ref|reg|release|repeat|return|rnmos|rpmos|rtran|rtranif0|rtranif1|scalared|sequence|shortint|shortreal|showcancelled|signed|small|solve|specify|specparam|static|string|strong0|strong1|struct|super|supply0|supply1|table|tagged|task|this|throughout|time|timeprecision|timeunit|tran|tranif0|tranif1|tri|tri0|tri1|triand|trior|trireg|type|typedef|union|unique|unsigned|use|uwire|var|vectored|virtual|void|wait|wait_order|wand|weak0|weak1|while|wildcard|wire|with|within|wor|xnor|xor)\b/,important:/\b(?:always_latch|always_comb|always_ff|always)\b ?@?/,number:/\B##?\d+|(?:\b\d+)?'[odbh] ?[\da-fzx_?]+|\b(?:\d*[._])?\d+(?:e[-+]?\d+)?/i,operator:/[-+{}^~%*\/?=!<>&|]+/,punctuation:/[[\];(),.:]/}; \ No newline at end of file +Prism.languages.verilog={comment:/\/\/.*|\/\*[\s\S]*?\*\//,string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},property:/\B\$\w+\b/,constant:/\B`\w+\b/,function:/\b\w+(?=\()/,keyword:/\b(?:alias|and|assert|assign|assume|automatic|before|begin|bind|bins|binsof|bit|break|buf|bufif0|bufif1|byte|case|casex|casez|cell|chandle|class|clocking|cmos|config|const|constraint|context|continue|cover|covergroup|coverpoint|cross|deassign|default|defparam|design|disable|dist|do|edge|else|end|endcase|endclass|endclocking|endconfig|endfunction|endgenerate|endgroup|endinterface|endmodule|endpackage|endprimitive|endprogram|endproperty|endsequence|endspecify|endtable|endtask|enum|event|expect|export|extends|extern|final|first_match|for|force|foreach|forever|fork|forkjoin|function|generate|genvar|highz0|highz1|if|iff|ifnone|ignore_bins|illegal_bins|import|incdir|include|initial|inout|input|inside|instance|int|integer|interface|intersect|join|join_any|join_none|large|liblist|library|local|localparam|logic|longint|macromodule|matches|medium|modport|module|nand|negedge|new|nmos|nor|noshowcancelled|not|notif0|notif1|null|or|output|package|packed|parameter|pmos|posedge|primitive|priority|program|property|protected|pull0|pull1|pulldown|pullup|pulsestyle_ondetect|pulsestyle_onevent|pure|rand|randc|randcase|randsequence|rcmos|real|realtime|ref|reg|release|repeat|return|rnmos|rpmos|rtran|rtranif0|rtranif1|scalared|sequence|shortint|shortreal|showcancelled|signed|small|solve|specify|specparam|static|string|strong0|strong1|struct|super|supply0|supply1|table|tagged|task|this|throughout|time|timeprecision|timeunit|tran|tranif0|tranif1|tri|tri0|tri1|triand|trior|trireg|type|typedef|union|unique|unsigned|use|uwire|var|vectored|virtual|void|wait|wait_order|wand|weak0|weak1|while|wildcard|wire|with|within|wor|xnor|xor)\b/,important:/\b(?:always|always_comb|always_ff|always_latch)\b ?@?/,number:/\B##?\d+|(?:\b\d+)?'[odbh] ?[\da-fzx_?]+|\b(?:\d*[._])?\d+(?:e[-+]?\d+)?/i,operator:/[-+{}^~%*\/?=!<>&|]+/,punctuation:/[[\];(),.:]/}; \ No newline at end of file diff --git a/components/prism-vhdl.js b/components/prism-vhdl.js index 7a9c207bf0..c898cc5412 100644 --- a/components/prism-vhdl.js +++ b/components/prism-vhdl.js @@ -11,13 +11,13 @@ Prism.languages.vhdl = { alias: 'function' }, 'string': /"(?:[^\\"\r\n]|\\(?:\r\n|[\s\S]))*"/, - 'constant': /\b(?:use|library)\b/i, + 'constant': /\b(?:library|use)\b/i, // support for predefined attributes included 'keyword': /\b(?:'active|'ascending|'base|'delayed|'driving|'driving_value|'event|'high|'image|'instance_name|'last_active|'last_event|'last_value|'left|'leftof|'length|'low|'path_name|'pos|'pred|'quiet|'range|'reverse_range|'right|'rightof|'simple_name|'stable|'succ|'transaction|'val|'value|access|after|alias|all|architecture|array|assert|attribute|begin|block|body|buffer|bus|case|component|configuration|constant|disconnect|downto|else|elsif|end|entity|exit|file|for|function|generate|generic|group|guarded|if|impure|in|inertial|inout|is|label|library|linkage|literal|loop|map|new|next|null|of|on|open|others|out|package|port|postponed|procedure|process|pure|range|record|register|reject|report|return|select|severity|shared|signal|subtype|then|to|transport|type|unaffected|units|until|use|variable|wait|when|while|with)\b/i, - 'boolean': /\b(?:true|false)\b/i, + 'boolean': /\b(?:false|true)\b/i, 'function': /\w+(?=\()/, // decimal, based, physical, and exponential numbers supported 'number': /'[01uxzwlh-]'|\b(?:\d+#[\da-f_.]+#|\d[\d_.]*)(?:e[-+]?\d+)?/i, - 'operator': /[<>]=?|:=|[-+*/&=]|\b(?:abs|not|mod|rem|sll|srl|sla|sra|rol|ror|and|or|nand|xnor|xor|nor)\b/i, + 'operator': /[<>]=?|:=|[-+*/&=]|\b(?:abs|and|mod|nand|nor|not|or|rem|rol|ror|sla|sll|sra|srl|xnor|xor)\b/i, 'punctuation': /[{}[\];(),.:]/ }; diff --git a/components/prism-vhdl.min.js b/components/prism-vhdl.min.js index 290e870721..01532288e9 100644 --- a/components/prism-vhdl.min.js +++ b/components/prism-vhdl.min.js @@ -1 +1 @@ -Prism.languages.vhdl={comment:/--.+/,"vhdl-vectors":{pattern:/\b[oxb]"[\da-f_]+"|"[01uxzwlh-]+"/i,alias:"number"},"quoted-function":{pattern:/"\S+?"(?=\()/,alias:"function"},string:/"(?:[^\\"\r\n]|\\(?:\r\n|[\s\S]))*"/,constant:/\b(?:use|library)\b/i,keyword:/\b(?:'active|'ascending|'base|'delayed|'driving|'driving_value|'event|'high|'image|'instance_name|'last_active|'last_event|'last_value|'left|'leftof|'length|'low|'path_name|'pos|'pred|'quiet|'range|'reverse_range|'right|'rightof|'simple_name|'stable|'succ|'transaction|'val|'value|access|after|alias|all|architecture|array|assert|attribute|begin|block|body|buffer|bus|case|component|configuration|constant|disconnect|downto|else|elsif|end|entity|exit|file|for|function|generate|generic|group|guarded|if|impure|in|inertial|inout|is|label|library|linkage|literal|loop|map|new|next|null|of|on|open|others|out|package|port|postponed|procedure|process|pure|range|record|register|reject|report|return|select|severity|shared|signal|subtype|then|to|transport|type|unaffected|units|until|use|variable|wait|when|while|with)\b/i,boolean:/\b(?:true|false)\b/i,function:/\w+(?=\()/,number:/'[01uxzwlh-]'|\b(?:\d+#[\da-f_.]+#|\d[\d_.]*)(?:e[-+]?\d+)?/i,operator:/[<>]=?|:=|[-+*/&=]|\b(?:abs|not|mod|rem|sll|srl|sla|sra|rol|ror|and|or|nand|xnor|xor|nor)\b/i,punctuation:/[{}[\];(),.:]/}; \ No newline at end of file +Prism.languages.vhdl={comment:/--.+/,"vhdl-vectors":{pattern:/\b[oxb]"[\da-f_]+"|"[01uxzwlh-]+"/i,alias:"number"},"quoted-function":{pattern:/"\S+?"(?=\()/,alias:"function"},string:/"(?:[^\\"\r\n]|\\(?:\r\n|[\s\S]))*"/,constant:/\b(?:library|use)\b/i,keyword:/\b(?:'active|'ascending|'base|'delayed|'driving|'driving_value|'event|'high|'image|'instance_name|'last_active|'last_event|'last_value|'left|'leftof|'length|'low|'path_name|'pos|'pred|'quiet|'range|'reverse_range|'right|'rightof|'simple_name|'stable|'succ|'transaction|'val|'value|access|after|alias|all|architecture|array|assert|attribute|begin|block|body|buffer|bus|case|component|configuration|constant|disconnect|downto|else|elsif|end|entity|exit|file|for|function|generate|generic|group|guarded|if|impure|in|inertial|inout|is|label|library|linkage|literal|loop|map|new|next|null|of|on|open|others|out|package|port|postponed|procedure|process|pure|range|record|register|reject|report|return|select|severity|shared|signal|subtype|then|to|transport|type|unaffected|units|until|use|variable|wait|when|while|with)\b/i,boolean:/\b(?:false|true)\b/i,function:/\w+(?=\()/,number:/'[01uxzwlh-]'|\b(?:\d+#[\da-f_.]+#|\d[\d_.]*)(?:e[-+]?\d+)?/i,operator:/[<>]=?|:=|[-+*/&=]|\b(?:abs|and|mod|nand|nor|not|or|rem|rol|ror|sla|sll|sra|srl|xnor|xor)\b/i,punctuation:/[{}[\];(),.:]/}; \ No newline at end of file diff --git a/components/prism-vim.js b/components/prism-vim.js index f38a9f5f8c..1670375159 100644 --- a/components/prism-vim.js +++ b/components/prism-vim.js @@ -2,8 +2,8 @@ Prism.languages.vim = { 'string': /"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\r\n]|'')*'/, 'comment': /".*/, 'function': /\b\w+(?=\()/, - 'keyword': /\b(?:ab|abbreviate|abc|abclear|abo|aboveleft|al|all|arga|argadd|argd|argdelete|argdo|arge|argedit|argg|argglobal|argl|arglocal|ar|args|argu|argument|as|ascii|bad|badd|ba|ball|bd|bdelete|be|bel|belowright|bf|bfirst|bl|blast|bm|bmodified|bn|bnext|bN|bNext|bo|botright|bp|bprevious|brea|break|breaka|breakadd|breakd|breakdel|breakl|breaklist|br|brewind|bro|browse|bufdo|b|buffer|buffers|bun|bunload|bw|bwipeout|ca|cabbrev|cabc|cabclear|caddb|caddbuffer|cad|caddexpr|caddf|caddfile|cal|call|cat|catch|cb|cbuffer|cc|ccl|cclose|cd|ce|center|cex|cexpr|cf|cfile|cfir|cfirst|cgetb|cgetbuffer|cgete|cgetexpr|cg|cgetfile|c|change|changes|chd|chdir|che|checkpath|checkt|checktime|cla|clast|cl|clist|clo|close|cmapc|cmapclear|cnew|cnewer|cn|cnext|cN|cNext|cnf|cnfile|cNfcNfile|cnorea|cnoreabbrev|col|colder|colo|colorscheme|comc|comclear|comp|compiler|conf|confirm|con|continue|cope|copen|co|copy|cpf|cpfile|cp|cprevious|cq|cquit|cr|crewind|cuna|cunabbrev|cu|cunmap|cw|cwindow|debugg|debuggreedy|delc|delcommand|d|delete|delf|delfunction|delm|delmarks|diffg|diffget|diffoff|diffpatch|diffpu|diffput|diffsplit|diffthis|diffu|diffupdate|dig|digraphs|di|display|dj|djump|dl|dlist|dr|drop|ds|dsearch|dsp|dsplit|earlier|echoe|echoerr|echom|echomsg|echon|e|edit|el|else|elsei|elseif|em|emenu|endfo|endfor|endf|endfunction|endfun|en|endif|endt|endtry|endw|endwhile|ene|enew|ex|exi|exit|exu|exusage|f|file|files|filetype|fina|finally|fin|find|fini|finish|fir|first|fix|fixdel|fo|fold|foldc|foldclose|folddoc|folddoclosed|foldd|folddoopen|foldo|foldopen|for|fu|fun|function|go|goto|gr|grep|grepa|grepadd|ha|hardcopy|h|help|helpf|helpfind|helpg|helpgrep|helpt|helptags|hid|hide|his|history|ia|iabbrev|iabc|iabclear|if|ij|ijump|il|ilist|imapc|imapclear|in|inorea|inoreabbrev|isearch|isp|isplit|iuna|iunabbrev|iu|iunmap|j|join|ju|jumps|k|keepalt|keepj|keepjumps|kee|keepmarks|laddb|laddbuffer|lad|laddexpr|laddf|laddfile|lan|language|la|last|later|lb|lbuffer|lc|lcd|lch|lchdir|lcl|lclose|let|left|lefta|leftabove|lex|lexpr|lf|lfile|lfir|lfirst|lgetb|lgetbuffer|lgete|lgetexpr|lg|lgetfile|lgr|lgrep|lgrepa|lgrepadd|lh|lhelpgrep|l|list|ll|lla|llast|lli|llist|lmak|lmake|lm|lmap|lmapc|lmapclear|lnew|lnewer|lne|lnext|lN|lNext|lnf|lnfile|lNf|lNfile|ln|lnoremap|lo|loadview|loc|lockmarks|lockv|lockvar|lol|lolder|lop|lopen|lpf|lpfile|lp|lprevious|lr|lrewind|ls|lt|ltag|lu|lunmap|lv|lvimgrep|lvimgrepa|lvimgrepadd|lw|lwindow|mak|make|ma|mark|marks|mat|match|menut|menutranslate|mk|mkexrc|mks|mksession|mksp|mkspell|mkvie|mkview|mkv|mkvimrc|mod|mode|m|move|mzf|mzfile|mz|mzscheme|nbkey|new|n|next|N|Next|nmapc|nmapclear|noh|nohlsearch|norea|noreabbrev|nu|number|nun|nunmap|omapc|omapclear|on|only|o|open|opt|options|ou|ounmap|pc|pclose|ped|pedit|pe|perl|perld|perldo|po|pop|popu|popup|pp|ppop|pre|preserve|prev|previous|p|print|P|Print|profd|profdel|prof|profile|promptf|promptfind|promptr|promptrepl|ps|psearch|pta|ptag|ptf|ptfirst|ptj|ptjump|ptl|ptlast|ptn|ptnext|ptN|ptNext|ptp|ptprevious|ptr|ptrewind|pts|ptselect|pu|put|pw|pwd|pyf|pyfile|py|python|qa|qall|q|quit|quita|quitall|r|read|rec|recover|redi|redir|red|redo|redr|redraw|redraws|redrawstatus|reg|registers|res|resize|ret|retab|retu|return|rew|rewind|ri|right|rightb|rightbelow|rub|ruby|rubyd|rubydo|rubyf|rubyfile|ru|runtime|rv|rviminfo|sal|sall|san|sandbox|sa|sargument|sav|saveas|sba|sball|sbf|sbfirst|sbl|sblast|sbm|sbmodified|sbn|sbnext|sbN|sbNext|sbp|sbprevious|sbr|sbrewind|sb|sbuffer|scripte|scriptencoding|scrip|scriptnames|se|set|setf|setfiletype|setg|setglobal|setl|setlocal|sf|sfind|sfir|sfirst|sh|shell|sign|sil|silent|sim|simalt|sla|slast|sl|sleep|sm|smagic|smap|smapc|smapclear|sme|smenu|sn|snext|sN|sNext|sni|sniff|sno|snomagic|snor|snoremap|snoreme|snoremenu|sor|sort|so|source|spelld|spelldump|spe|spellgood|spelli|spellinfo|spellr|spellrepall|spellu|spellundo|spellw|spellwrong|sp|split|spr|sprevious|sre|srewind|sta|stag|startg|startgreplace|star|startinsert|startr|startreplace|stj|stjump|st|stop|stopi|stopinsert|sts|stselect|sun|sunhide|sunm|sunmap|sus|suspend|sv|sview|syncbind|t|tab|tabc|tabclose|tabd|tabdo|tabe|tabedit|tabf|tabfind|tabfir|tabfirst|tabl|tablast|tabm|tabmove|tabnew|tabn|tabnext|tabN|tabNext|tabo|tabonly|tabp|tabprevious|tabr|tabrewind|tabs|ta|tag|tags|tc|tcl|tcld|tcldo|tclf|tclfile|te|tearoff|tf|tfirst|th|throw|tj|tjump|tl|tlast|tm|tmenu|tn|tnext|tN|tNext|to|topleft|tp|tprevious|tr|trewind|try|ts|tselect|tu|tunmenu|una|unabbreviate|u|undo|undoj|undojoin|undol|undolist|unh|unhide|unlet|unlo|unlockvar|unm|unmap|up|update|verb|verbose|ve|version|vert|vertical|vie|view|vim|vimgrep|vimgrepa|vimgrepadd|vi|visual|viu|viusage|vmapc|vmapclear|vne|vnew|vs|vsplit|vu|vunmap|wa|wall|wh|while|winc|wincmd|windo|winp|winpos|win|winsize|wn|wnext|wN|wNext|wp|wprevious|wq|wqa|wqall|w|write|ws|wsverb|wv|wviminfo|X|xa|xall|x|xit|xm|xmap|xmapc|xmapclear|xme|xmenu|XMLent|XMLns|xn|xnoremap|xnoreme|xnoremenu|xu|xunmap|y|yank)\b/, - 'builtin': /\b(?:autocmd|acd|ai|akm|aleph|allowrevins|altkeymap|ambiwidth|ambw|anti|antialias|arab|arabic|arabicshape|ari|arshape|autochdir|autoindent|autoread|autowrite|autowriteall|aw|awa|background|backspace|backup|backupcopy|backupdir|backupext|backupskip|balloondelay|ballooneval|balloonexpr|bdir|bdlay|beval|bex|bexpr|bg|bh|bin|binary|biosk|bioskey|bk|bkc|bomb|breakat|brk|browsedir|bs|bsdir|bsk|bt|bufhidden|buflisted|buftype|casemap|ccv|cdpath|cedit|cfu|ch|charconvert|ci|cin|cindent|cink|cinkeys|cino|cinoptions|cinw|cinwords|clipboard|cmdheight|cmdwinheight|cmp|cms|columns|com|comments|commentstring|compatible|complete|completefunc|completeopt|consk|conskey|copyindent|cot|cpo|cpoptions|cpt|cscopepathcomp|cscopeprg|cscopequickfix|cscopetag|cscopetagorder|cscopeverbose|cspc|csprg|csqf|cst|csto|csverb|cuc|cul|cursorcolumn|cursorline|cwh|debug|deco|def|define|delcombine|dex|dg|dict|dictionary|diff|diffexpr|diffopt|digraph|dip|dir|directory|dy|ea|ead|eadirection|eb|ed|edcompatible|ef|efm|ei|ek|enc|encoding|endofline|eol|ep|equalalways|equalprg|errorbells|errorfile|errorformat|esckeys|et|eventignore|expandtab|exrc|fcl|fcs|fdc|fde|fdi|fdl|fdls|fdm|fdn|fdo|fdt|fen|fenc|fencs|fex|ff|ffs|fileencoding|fileencodings|fileformat|fileformats|fillchars|fk|fkmap|flp|fml|fmr|foldcolumn|foldenable|foldexpr|foldignore|foldlevel|foldlevelstart|foldmarker|foldmethod|foldminlines|foldnestmax|foldtext|formatexpr|formatlistpat|formatoptions|formatprg|fp|fs|fsync|ft|gcr|gd|gdefault|gfm|gfn|gfs|gfw|ghr|gp|grepformat|grepprg|gtl|gtt|guicursor|guifont|guifontset|guifontwide|guiheadroom|guioptions|guipty|guitablabel|guitabtooltip|helpfile|helpheight|helplang|hf|hh|hi|hidden|highlight|hk|hkmap|hkmapp|hkp|hl|hlg|hls|hlsearch|ic|icon|iconstring|ignorecase|im|imactivatekey|imak|imc|imcmdline|imd|imdisable|imi|iminsert|ims|imsearch|inc|include|includeexpr|incsearch|inde|indentexpr|indentkeys|indk|inex|inf|infercase|insertmode|isf|isfname|isi|isident|isk|iskeyword|isprint|joinspaces|js|key|keymap|keymodel|keywordprg|km|kmp|kp|langmap|langmenu|laststatus|lazyredraw|lbr|lcs|linebreak|lines|linespace|lisp|lispwords|listchars|loadplugins|lpl|lsp|lz|macatsui|magic|makeef|makeprg|matchpairs|matchtime|maxcombine|maxfuncdepth|maxmapdepth|maxmem|maxmempattern|maxmemtot|mco|mef|menuitems|mfd|mh|mis|mkspellmem|ml|mls|mm|mmd|mmp|mmt|modeline|modelines|modifiable|modified|more|mouse|mousef|mousefocus|mousehide|mousem|mousemodel|mouses|mouseshape|mouset|mousetime|mp|mps|msm|mzq|mzquantum|nf|nrformats|numberwidth|nuw|odev|oft|ofu|omnifunc|opendevice|operatorfunc|opfunc|osfiletype|pa|para|paragraphs|paste|pastetoggle|patchexpr|patchmode|path|pdev|penc|pex|pexpr|pfn|ph|pheader|pi|pm|pmbcs|pmbfn|popt|preserveindent|previewheight|previewwindow|printdevice|printencoding|printexpr|printfont|printheader|printmbcharset|printmbfont|printoptions|prompt|pt|pumheight|pvh|pvw|qe|quoteescape|readonly|remap|report|restorescreen|revins|rightleft|rightleftcmd|rl|rlc|ro|rs|rtp|ruf|ruler|rulerformat|runtimepath|sbo|sc|scb|scr|scroll|scrollbind|scrolljump|scrolloff|scrollopt|scs|sect|sections|secure|sel|selection|selectmode|sessionoptions|sft|shcf|shellcmdflag|shellpipe|shellquote|shellredir|shellslash|shelltemp|shelltype|shellxquote|shiftround|shiftwidth|shm|shortmess|shortname|showbreak|showcmd|showfulltag|showmatch|showmode|showtabline|shq|si|sidescroll|sidescrolloff|siso|sj|slm|smartcase|smartindent|smarttab|smc|smd|softtabstop|sol|spc|spell|spellcapcheck|spellfile|spelllang|spellsuggest|spf|spl|splitbelow|splitright|sps|sr|srr|ss|ssl|ssop|stal|startofline|statusline|stl|stmp|su|sua|suffixes|suffixesadd|sw|swapfile|swapsync|swb|swf|switchbuf|sws|sxq|syn|synmaxcol|syntax|tabline|tabpagemax|tabstop|tagbsearch|taglength|tagrelative|tagstack|tal|tb|tbi|tbidi|tbis|tbs|tenc|term|termbidi|termencoding|terse|textauto|textmode|textwidth|tgst|thesaurus|tildeop|timeout|timeoutlen|title|titlelen|titleold|titlestring|toolbar|toolbariconsize|top|tpm|tsl|tsr|ttimeout|ttimeoutlen|ttm|tty|ttybuiltin|ttyfast|ttym|ttymouse|ttyscroll|ttytype|tw|tx|uc|ul|undolevels|updatecount|updatetime|ut|vb|vbs|vdir|verbosefile|vfile|viewdir|viewoptions|viminfo|virtualedit|visualbell|vop|wak|warn|wb|wc|wcm|wd|weirdinvert|wfh|wfw|whichwrap|wi|wig|wildchar|wildcharm|wildignore|wildmenu|wildmode|wildoptions|wim|winaltkeys|window|winfixheight|winfixwidth|winheight|winminheight|winminwidth|winwidth|wiv|wiw|wm|wmh|wmnu|wmw|wop|wrap|wrapmargin|wrapscan|writeany|writebackup|writedelay|ww|noacd|noai|noakm|noallowrevins|noaltkeymap|noanti|noantialias|noar|noarab|noarabic|noarabicshape|noari|noarshape|noautochdir|noautoindent|noautoread|noautowrite|noautowriteall|noaw|noawa|nobackup|noballooneval|nobeval|nobin|nobinary|nobiosk|nobioskey|nobk|nobl|nobomb|nobuflisted|nocf|noci|nocin|nocindent|nocompatible|noconfirm|noconsk|noconskey|nocopyindent|nocp|nocscopetag|nocscopeverbose|nocst|nocsverb|nocuc|nocul|nocursorcolumn|nocursorline|nodeco|nodelcombine|nodg|nodiff|nodigraph|nodisable|noea|noeb|noed|noedcompatible|noek|noendofline|noeol|noequalalways|noerrorbells|noesckeys|noet|noex|noexpandtab|noexrc|nofen|nofk|nofkmap|nofoldenable|nogd|nogdefault|noguipty|nohid|nohidden|nohk|nohkmap|nohkmapp|nohkp|nohls|noic|noicon|noignorecase|noim|noimc|noimcmdline|noimd|noincsearch|noinf|noinfercase|noinsertmode|nois|nojoinspaces|nojs|nolazyredraw|nolbr|nolinebreak|nolisp|nolist|noloadplugins|nolpl|nolz|noma|nomacatsui|nomagic|nomh|noml|nomod|nomodeline|nomodifiable|nomodified|nomore|nomousef|nomousefocus|nomousehide|nonu|nonumber|noodev|noopendevice|nopaste|nopi|nopreserveindent|nopreviewwindow|noprompt|nopvw|noreadonly|noremap|norestorescreen|norevins|nori|norightleft|norightleftcmd|norl|norlc|noro|nors|noru|noruler|nosb|nosc|noscb|noscrollbind|noscs|nosecure|nosft|noshellslash|noshelltemp|noshiftround|noshortname|noshowcmd|noshowfulltag|noshowmatch|noshowmode|nosi|nosm|nosmartcase|nosmartindent|nosmarttab|nosmd|nosn|nosol|nospell|nosplitbelow|nosplitright|nospr|nosr|nossl|nosta|nostartofline|nostmp|noswapfile|noswf|nota|notagbsearch|notagrelative|notagstack|notbi|notbidi|notbs|notermbidi|noterse|notextauto|notextmode|notf|notgst|notildeop|notimeout|notitle|noto|notop|notr|nottimeout|nottybuiltin|nottyfast|notx|novb|novisualbell|nowa|nowarn|nowb|noweirdinvert|nowfh|nowfw|nowildmenu|nowinfixheight|nowinfixwidth|nowiv|nowmnu|nowrap|nowrapscan|nowrite|nowriteany|nowritebackup|nows|invacd|invai|invakm|invallowrevins|invaltkeymap|invanti|invantialias|invar|invarab|invarabic|invarabicshape|invari|invarshape|invautochdir|invautoindent|invautoread|invautowrite|invautowriteall|invaw|invawa|invbackup|invballooneval|invbeval|invbin|invbinary|invbiosk|invbioskey|invbk|invbl|invbomb|invbuflisted|invcf|invci|invcin|invcindent|invcompatible|invconfirm|invconsk|invconskey|invcopyindent|invcp|invcscopetag|invcscopeverbose|invcst|invcsverb|invcuc|invcul|invcursorcolumn|invcursorline|invdeco|invdelcombine|invdg|invdiff|invdigraph|invdisable|invea|inveb|inved|invedcompatible|invek|invendofline|inveol|invequalalways|inverrorbells|invesckeys|invet|invex|invexpandtab|invexrc|invfen|invfk|invfkmap|invfoldenable|invgd|invgdefault|invguipty|invhid|invhidden|invhk|invhkmap|invhkmapp|invhkp|invhls|invhlsearch|invic|invicon|invignorecase|invim|invimc|invimcmdline|invimd|invincsearch|invinf|invinfercase|invinsertmode|invis|invjoinspaces|invjs|invlazyredraw|invlbr|invlinebreak|invlisp|invlist|invloadplugins|invlpl|invlz|invma|invmacatsui|invmagic|invmh|invml|invmod|invmodeline|invmodifiable|invmodified|invmore|invmousef|invmousefocus|invmousehide|invnu|invnumber|invodev|invopendevice|invpaste|invpi|invpreserveindent|invpreviewwindow|invprompt|invpvw|invreadonly|invremap|invrestorescreen|invrevins|invri|invrightleft|invrightleftcmd|invrl|invrlc|invro|invrs|invru|invruler|invsb|invsc|invscb|invscrollbind|invscs|invsecure|invsft|invshellslash|invshelltemp|invshiftround|invshortname|invshowcmd|invshowfulltag|invshowmatch|invshowmode|invsi|invsm|invsmartcase|invsmartindent|invsmarttab|invsmd|invsn|invsol|invspell|invsplitbelow|invsplitright|invspr|invsr|invssl|invsta|invstartofline|invstmp|invswapfile|invswf|invta|invtagbsearch|invtagrelative|invtagstack|invtbi|invtbidi|invtbs|invtermbidi|invterse|invtextauto|invtextmode|invtf|invtgst|invtildeop|invtimeout|invtitle|invto|invtop|invtr|invttimeout|invttybuiltin|invttyfast|invtx|invvb|invvisualbell|invwa|invwarn|invwb|invweirdinvert|invwfh|invwfw|invwildmenu|invwinfixheight|invwinfixwidth|invwiv|invwmnu|invwrap|invwrapscan|invwrite|invwriteany|invwritebackup|invws|t_AB|t_AF|t_al|t_AL|t_bc|t_cd|t_ce|t_Ce|t_cl|t_cm|t_Co|t_cs|t_Cs|t_CS|t_CV|t_da|t_db|t_dl|t_DL|t_EI|t_F1|t_F2|t_F3|t_F4|t_F5|t_F6|t_F7|t_F8|t_F9|t_fs|t_IE|t_IS|t_k1|t_K1|t_k2|t_k3|t_K3|t_k4|t_K4|t_k5|t_K5|t_k6|t_K6|t_k7|t_K7|t_k8|t_K8|t_k9|t_K9|t_KA|t_kb|t_kB|t_KB|t_KC|t_kd|t_kD|t_KD|t_ke|t_KE|t_KF|t_KG|t_kh|t_KH|t_kI|t_KI|t_KJ|t_KK|t_kl|t_KL|t_kN|t_kP|t_kr|t_ks|t_ku|t_le|t_mb|t_md|t_me|t_mr|t_ms|t_nd|t_op|t_RI|t_RV|t_Sb|t_se|t_Sf|t_SI|t_so|t_sr|t_te|t_ti|t_ts|t_ue|t_us|t_ut|t_vb|t_ve|t_vi|t_vs|t_WP|t_WS|t_xs|t_ZH|t_ZR)\b/, + 'keyword': /\b(?:N|Next|P|Print|X|XMLent|XMLns|ab|abbreviate|abc|abclear|abo|aboveleft|al|all|ar|arga|argadd|argd|argdelete|argdo|arge|argedit|argg|argglobal|argl|arglocal|args|argu|argument|as|ascii|b|bN|bNext|ba|bad|badd|ball|bd|bdelete|be|bel|belowright|bf|bfirst|bl|blast|bm|bmodified|bn|bnext|bo|botright|bp|bprevious|br|brea|break|breaka|breakadd|breakd|breakdel|breakl|breaklist|brewind|bro|browse|bufdo|buffer|buffers|bun|bunload|bw|bwipeout|c|cN|cNext|cNfcNfile|ca|cabbrev|cabc|cabclear|cad|caddb|caddbuffer|caddexpr|caddf|caddfile|cal|call|cat|catch|cb|cbuffer|cc|ccl|cclose|cd|ce|center|cex|cexpr|cf|cfile|cfir|cfirst|cg|cgetb|cgetbuffer|cgete|cgetexpr|cgetfile|change|changes|chd|chdir|che|checkpath|checkt|checktime|cl|cla|clast|clist|clo|close|cmapc|cmapclear|cn|cnew|cnewer|cnext|cnf|cnfile|cnorea|cnoreabbrev|co|col|colder|colo|colorscheme|comc|comclear|comp|compiler|con|conf|confirm|continue|cope|copen|copy|cp|cpf|cpfile|cprevious|cq|cquit|cr|crewind|cu|cuna|cunabbrev|cunmap|cw|cwindow|d|debugg|debuggreedy|delc|delcommand|delete|delf|delfunction|delm|delmarks|di|diffg|diffget|diffoff|diffpatch|diffpu|diffput|diffsplit|diffthis|diffu|diffupdate|dig|digraphs|display|dj|djump|dl|dlist|dr|drop|ds|dsearch|dsp|dsplit|e|earlier|echoe|echoerr|echom|echomsg|echon|edit|el|else|elsei|elseif|em|emenu|en|endf|endfo|endfor|endfun|endfunction|endif|endt|endtry|endw|endwhile|ene|enew|ex|exi|exit|exu|exusage|f|file|files|filetype|fin|fina|finally|find|fini|finish|fir|first|fix|fixdel|fo|fold|foldc|foldclose|foldd|folddoc|folddoclosed|folddoopen|foldo|foldopen|for|fu|fun|function|go|goto|gr|grep|grepa|grepadd|h|ha|hardcopy|help|helpf|helpfind|helpg|helpgrep|helpt|helptags|hid|hide|his|history|ia|iabbrev|iabc|iabclear|if|ij|ijump|il|ilist|imapc|imapclear|in|inorea|inoreabbrev|isearch|isp|isplit|iu|iuna|iunabbrev|iunmap|j|join|ju|jumps|k|kee|keepalt|keepj|keepjumps|keepmarks|l|lN|lNext|lNf|lNfile|la|lad|laddb|laddbuffer|laddexpr|laddf|laddfile|lan|language|last|later|lb|lbuffer|lc|lcd|lch|lchdir|lcl|lclose|left|lefta|leftabove|let|lex|lexpr|lf|lfile|lfir|lfirst|lg|lgetb|lgetbuffer|lgete|lgetexpr|lgetfile|lgr|lgrep|lgrepa|lgrepadd|lh|lhelpgrep|list|ll|lla|llast|lli|llist|lm|lmak|lmake|lmap|lmapc|lmapclear|ln|lne|lnew|lnewer|lnext|lnf|lnfile|lnoremap|lo|loadview|loc|lockmarks|lockv|lockvar|lol|lolder|lop|lopen|lp|lpf|lpfile|lprevious|lr|lrewind|ls|lt|ltag|lu|lunmap|lv|lvimgrep|lvimgrepa|lvimgrepadd|lw|lwindow|m|ma|mak|make|mark|marks|mat|match|menut|menutranslate|mk|mkexrc|mks|mksession|mksp|mkspell|mkv|mkvie|mkview|mkvimrc|mod|mode|move|mz|mzf|mzfile|mzscheme|n|nbkey|new|next|nmapc|nmapclear|noh|nohlsearch|norea|noreabbrev|nu|number|nun|nunmap|o|omapc|omapclear|on|only|open|opt|options|ou|ounmap|p|pc|pclose|pe|ped|pedit|perl|perld|perldo|po|pop|popu|popup|pp|ppop|pre|preserve|prev|previous|print|prof|profd|profdel|profile|promptf|promptfind|promptr|promptrepl|ps|psearch|ptN|ptNext|pta|ptag|ptf|ptfirst|ptj|ptjump|ptl|ptlast|ptn|ptnext|ptp|ptprevious|ptr|ptrewind|pts|ptselect|pu|put|pw|pwd|py|pyf|pyfile|python|q|qa|qall|quit|quita|quitall|r|read|rec|recover|red|redi|redir|redo|redr|redraw|redraws|redrawstatus|reg|registers|res|resize|ret|retab|retu|return|rew|rewind|ri|right|rightb|rightbelow|ru|rub|ruby|rubyd|rubydo|rubyf|rubyfile|runtime|rv|rviminfo|sN|sNext|sa|sal|sall|san|sandbox|sargument|sav|saveas|sb|sbN|sbNext|sba|sball|sbf|sbfirst|sbl|sblast|sbm|sbmodified|sbn|sbnext|sbp|sbprevious|sbr|sbrewind|sbuffer|scrip|scripte|scriptencoding|scriptnames|se|set|setf|setfiletype|setg|setglobal|setl|setlocal|sf|sfind|sfir|sfirst|sh|shell|sign|sil|silent|sim|simalt|sl|sla|slast|sleep|sm|smagic|smap|smapc|smapclear|sme|smenu|sn|snext|sni|sniff|sno|snomagic|snor|snoremap|snoreme|snoremenu|so|sor|sort|source|sp|spe|spelld|spelldump|spellgood|spelli|spellinfo|spellr|spellrepall|spellu|spellundo|spellw|spellwrong|split|spr|sprevious|sre|srewind|st|sta|stag|star|startg|startgreplace|startinsert|startr|startreplace|stj|stjump|stop|stopi|stopinsert|sts|stselect|sun|sunhide|sunm|sunmap|sus|suspend|sv|sview|syncbind|t|tN|tNext|ta|tab|tabN|tabNext|tabc|tabclose|tabd|tabdo|tabe|tabedit|tabf|tabfind|tabfir|tabfirst|tabl|tablast|tabm|tabmove|tabn|tabnew|tabnext|tabo|tabonly|tabp|tabprevious|tabr|tabrewind|tabs|tag|tags|tc|tcl|tcld|tcldo|tclf|tclfile|te|tearoff|tf|tfirst|th|throw|tj|tjump|tl|tlast|tm|tmenu|tn|tnext|to|topleft|tp|tprevious|tr|trewind|try|ts|tselect|tu|tunmenu|u|una|unabbreviate|undo|undoj|undojoin|undol|undolist|unh|unhide|unlet|unlo|unlockvar|unm|unmap|up|update|ve|verb|verbose|version|vert|vertical|vi|vie|view|vim|vimgrep|vimgrepa|vimgrepadd|visual|viu|viusage|vmapc|vmapclear|vne|vnew|vs|vsplit|vu|vunmap|w|wN|wNext|wa|wall|wh|while|win|winc|wincmd|windo|winp|winpos|winsize|wn|wnext|wp|wprevious|wq|wqa|wqall|write|ws|wsverb|wv|wviminfo|x|xa|xall|xit|xm|xmap|xmapc|xmapclear|xme|xmenu|xn|xnoremap|xnoreme|xnoremenu|xu|xunmap|y|yank)\b/, + 'builtin': /\b(?:acd|ai|akm|aleph|allowrevins|altkeymap|ambiwidth|ambw|anti|antialias|arab|arabic|arabicshape|ari|arshape|autochdir|autocmd|autoindent|autoread|autowrite|autowriteall|aw|awa|background|backspace|backup|backupcopy|backupdir|backupext|backupskip|balloondelay|ballooneval|balloonexpr|bdir|bdlay|beval|bex|bexpr|bg|bh|bin|binary|biosk|bioskey|bk|bkc|bomb|breakat|brk|browsedir|bs|bsdir|bsk|bt|bufhidden|buflisted|buftype|casemap|ccv|cdpath|cedit|cfu|ch|charconvert|ci|cin|cindent|cink|cinkeys|cino|cinoptions|cinw|cinwords|clipboard|cmdheight|cmdwinheight|cmp|cms|columns|com|comments|commentstring|compatible|complete|completefunc|completeopt|consk|conskey|copyindent|cot|cpo|cpoptions|cpt|cscopepathcomp|cscopeprg|cscopequickfix|cscopetag|cscopetagorder|cscopeverbose|cspc|csprg|csqf|cst|csto|csverb|cuc|cul|cursorcolumn|cursorline|cwh|debug|deco|def|define|delcombine|dex|dg|dict|dictionary|diff|diffexpr|diffopt|digraph|dip|dir|directory|dy|ea|ead|eadirection|eb|ed|edcompatible|ef|efm|ei|ek|enc|encoding|endofline|eol|ep|equalalways|equalprg|errorbells|errorfile|errorformat|esckeys|et|eventignore|expandtab|exrc|fcl|fcs|fdc|fde|fdi|fdl|fdls|fdm|fdn|fdo|fdt|fen|fenc|fencs|fex|ff|ffs|fileencoding|fileencodings|fileformat|fileformats|fillchars|fk|fkmap|flp|fml|fmr|foldcolumn|foldenable|foldexpr|foldignore|foldlevel|foldlevelstart|foldmarker|foldmethod|foldminlines|foldnestmax|foldtext|formatexpr|formatlistpat|formatoptions|formatprg|fp|fs|fsync|ft|gcr|gd|gdefault|gfm|gfn|gfs|gfw|ghr|gp|grepformat|grepprg|gtl|gtt|guicursor|guifont|guifontset|guifontwide|guiheadroom|guioptions|guipty|guitablabel|guitabtooltip|helpfile|helpheight|helplang|hf|hh|hi|hidden|highlight|hk|hkmap|hkmapp|hkp|hl|hlg|hls|hlsearch|ic|icon|iconstring|ignorecase|im|imactivatekey|imak|imc|imcmdline|imd|imdisable|imi|iminsert|ims|imsearch|inc|include|includeexpr|incsearch|inde|indentexpr|indentkeys|indk|inex|inf|infercase|insertmode|invacd|invai|invakm|invallowrevins|invaltkeymap|invanti|invantialias|invar|invarab|invarabic|invarabicshape|invari|invarshape|invautochdir|invautoindent|invautoread|invautowrite|invautowriteall|invaw|invawa|invbackup|invballooneval|invbeval|invbin|invbinary|invbiosk|invbioskey|invbk|invbl|invbomb|invbuflisted|invcf|invci|invcin|invcindent|invcompatible|invconfirm|invconsk|invconskey|invcopyindent|invcp|invcscopetag|invcscopeverbose|invcst|invcsverb|invcuc|invcul|invcursorcolumn|invcursorline|invdeco|invdelcombine|invdg|invdiff|invdigraph|invdisable|invea|inveb|inved|invedcompatible|invek|invendofline|inveol|invequalalways|inverrorbells|invesckeys|invet|invex|invexpandtab|invexrc|invfen|invfk|invfkmap|invfoldenable|invgd|invgdefault|invguipty|invhid|invhidden|invhk|invhkmap|invhkmapp|invhkp|invhls|invhlsearch|invic|invicon|invignorecase|invim|invimc|invimcmdline|invimd|invincsearch|invinf|invinfercase|invinsertmode|invis|invjoinspaces|invjs|invlazyredraw|invlbr|invlinebreak|invlisp|invlist|invloadplugins|invlpl|invlz|invma|invmacatsui|invmagic|invmh|invml|invmod|invmodeline|invmodifiable|invmodified|invmore|invmousef|invmousefocus|invmousehide|invnu|invnumber|invodev|invopendevice|invpaste|invpi|invpreserveindent|invpreviewwindow|invprompt|invpvw|invreadonly|invremap|invrestorescreen|invrevins|invri|invrightleft|invrightleftcmd|invrl|invrlc|invro|invrs|invru|invruler|invsb|invsc|invscb|invscrollbind|invscs|invsecure|invsft|invshellslash|invshelltemp|invshiftround|invshortname|invshowcmd|invshowfulltag|invshowmatch|invshowmode|invsi|invsm|invsmartcase|invsmartindent|invsmarttab|invsmd|invsn|invsol|invspell|invsplitbelow|invsplitright|invspr|invsr|invssl|invsta|invstartofline|invstmp|invswapfile|invswf|invta|invtagbsearch|invtagrelative|invtagstack|invtbi|invtbidi|invtbs|invtermbidi|invterse|invtextauto|invtextmode|invtf|invtgst|invtildeop|invtimeout|invtitle|invto|invtop|invtr|invttimeout|invttybuiltin|invttyfast|invtx|invvb|invvisualbell|invwa|invwarn|invwb|invweirdinvert|invwfh|invwfw|invwildmenu|invwinfixheight|invwinfixwidth|invwiv|invwmnu|invwrap|invwrapscan|invwrite|invwriteany|invwritebackup|invws|isf|isfname|isi|isident|isk|iskeyword|isprint|joinspaces|js|key|keymap|keymodel|keywordprg|km|kmp|kp|langmap|langmenu|laststatus|lazyredraw|lbr|lcs|linebreak|lines|linespace|lisp|lispwords|listchars|loadplugins|lpl|lsp|lz|macatsui|magic|makeef|makeprg|matchpairs|matchtime|maxcombine|maxfuncdepth|maxmapdepth|maxmem|maxmempattern|maxmemtot|mco|mef|menuitems|mfd|mh|mis|mkspellmem|ml|mls|mm|mmd|mmp|mmt|modeline|modelines|modifiable|modified|more|mouse|mousef|mousefocus|mousehide|mousem|mousemodel|mouses|mouseshape|mouset|mousetime|mp|mps|msm|mzq|mzquantum|nf|noacd|noai|noakm|noallowrevins|noaltkeymap|noanti|noantialias|noar|noarab|noarabic|noarabicshape|noari|noarshape|noautochdir|noautoindent|noautoread|noautowrite|noautowriteall|noaw|noawa|nobackup|noballooneval|nobeval|nobin|nobinary|nobiosk|nobioskey|nobk|nobl|nobomb|nobuflisted|nocf|noci|nocin|nocindent|nocompatible|noconfirm|noconsk|noconskey|nocopyindent|nocp|nocscopetag|nocscopeverbose|nocst|nocsverb|nocuc|nocul|nocursorcolumn|nocursorline|nodeco|nodelcombine|nodg|nodiff|nodigraph|nodisable|noea|noeb|noed|noedcompatible|noek|noendofline|noeol|noequalalways|noerrorbells|noesckeys|noet|noex|noexpandtab|noexrc|nofen|nofk|nofkmap|nofoldenable|nogd|nogdefault|noguipty|nohid|nohidden|nohk|nohkmap|nohkmapp|nohkp|nohls|noic|noicon|noignorecase|noim|noimc|noimcmdline|noimd|noincsearch|noinf|noinfercase|noinsertmode|nois|nojoinspaces|nojs|nolazyredraw|nolbr|nolinebreak|nolisp|nolist|noloadplugins|nolpl|nolz|noma|nomacatsui|nomagic|nomh|noml|nomod|nomodeline|nomodifiable|nomodified|nomore|nomousef|nomousefocus|nomousehide|nonu|nonumber|noodev|noopendevice|nopaste|nopi|nopreserveindent|nopreviewwindow|noprompt|nopvw|noreadonly|noremap|norestorescreen|norevins|nori|norightleft|norightleftcmd|norl|norlc|noro|nors|noru|noruler|nosb|nosc|noscb|noscrollbind|noscs|nosecure|nosft|noshellslash|noshelltemp|noshiftround|noshortname|noshowcmd|noshowfulltag|noshowmatch|noshowmode|nosi|nosm|nosmartcase|nosmartindent|nosmarttab|nosmd|nosn|nosol|nospell|nosplitbelow|nosplitright|nospr|nosr|nossl|nosta|nostartofline|nostmp|noswapfile|noswf|nota|notagbsearch|notagrelative|notagstack|notbi|notbidi|notbs|notermbidi|noterse|notextauto|notextmode|notf|notgst|notildeop|notimeout|notitle|noto|notop|notr|nottimeout|nottybuiltin|nottyfast|notx|novb|novisualbell|nowa|nowarn|nowb|noweirdinvert|nowfh|nowfw|nowildmenu|nowinfixheight|nowinfixwidth|nowiv|nowmnu|nowrap|nowrapscan|nowrite|nowriteany|nowritebackup|nows|nrformats|numberwidth|nuw|odev|oft|ofu|omnifunc|opendevice|operatorfunc|opfunc|osfiletype|pa|para|paragraphs|paste|pastetoggle|patchexpr|patchmode|path|pdev|penc|pex|pexpr|pfn|ph|pheader|pi|pm|pmbcs|pmbfn|popt|preserveindent|previewheight|previewwindow|printdevice|printencoding|printexpr|printfont|printheader|printmbcharset|printmbfont|printoptions|prompt|pt|pumheight|pvh|pvw|qe|quoteescape|readonly|remap|report|restorescreen|revins|rightleft|rightleftcmd|rl|rlc|ro|rs|rtp|ruf|ruler|rulerformat|runtimepath|sbo|sc|scb|scr|scroll|scrollbind|scrolljump|scrolloff|scrollopt|scs|sect|sections|secure|sel|selection|selectmode|sessionoptions|sft|shcf|shellcmdflag|shellpipe|shellquote|shellredir|shellslash|shelltemp|shelltype|shellxquote|shiftround|shiftwidth|shm|shortmess|shortname|showbreak|showcmd|showfulltag|showmatch|showmode|showtabline|shq|si|sidescroll|sidescrolloff|siso|sj|slm|smartcase|smartindent|smarttab|smc|smd|softtabstop|sol|spc|spell|spellcapcheck|spellfile|spelllang|spellsuggest|spf|spl|splitbelow|splitright|sps|sr|srr|ss|ssl|ssop|stal|startofline|statusline|stl|stmp|su|sua|suffixes|suffixesadd|sw|swapfile|swapsync|swb|swf|switchbuf|sws|sxq|syn|synmaxcol|syntax|t_AB|t_AF|t_AL|t_CS|t_CV|t_Ce|t_Co|t_Cs|t_DL|t_EI|t_F1|t_F2|t_F3|t_F4|t_F5|t_F6|t_F7|t_F8|t_F9|t_IE|t_IS|t_K1|t_K3|t_K4|t_K5|t_K6|t_K7|t_K8|t_K9|t_KA|t_KB|t_KC|t_KD|t_KE|t_KF|t_KG|t_KH|t_KI|t_KJ|t_KK|t_KL|t_RI|t_RV|t_SI|t_Sb|t_Sf|t_WP|t_WS|t_ZH|t_ZR|t_al|t_bc|t_cd|t_ce|t_cl|t_cm|t_cs|t_da|t_db|t_dl|t_fs|t_k1|t_k2|t_k3|t_k4|t_k5|t_k6|t_k7|t_k8|t_k9|t_kB|t_kD|t_kI|t_kN|t_kP|t_kb|t_kd|t_ke|t_kh|t_kl|t_kr|t_ks|t_ku|t_le|t_mb|t_md|t_me|t_mr|t_ms|t_nd|t_op|t_se|t_so|t_sr|t_te|t_ti|t_ts|t_ue|t_us|t_ut|t_vb|t_ve|t_vi|t_vs|t_xs|tabline|tabpagemax|tabstop|tagbsearch|taglength|tagrelative|tagstack|tal|tb|tbi|tbidi|tbis|tbs|tenc|term|termbidi|termencoding|terse|textauto|textmode|textwidth|tgst|thesaurus|tildeop|timeout|timeoutlen|title|titlelen|titleold|titlestring|toolbar|toolbariconsize|top|tpm|tsl|tsr|ttimeout|ttimeoutlen|ttm|tty|ttybuiltin|ttyfast|ttym|ttymouse|ttyscroll|ttytype|tw|tx|uc|ul|undolevels|updatecount|updatetime|ut|vb|vbs|vdir|verbosefile|vfile|viewdir|viewoptions|viminfo|virtualedit|visualbell|vop|wak|warn|wb|wc|wcm|wd|weirdinvert|wfh|wfw|whichwrap|wi|wig|wildchar|wildcharm|wildignore|wildmenu|wildmode|wildoptions|wim|winaltkeys|window|winfixheight|winfixwidth|winheight|winminheight|winminwidth|winwidth|wiv|wiw|wm|wmh|wmnu|wmw|wop|wrap|wrapmargin|wrapscan|writeany|writebackup|writedelay|ww)\b/, 'number': /\b(?:0x[\da-f]+|\d+(?:\.\d+)?)\b/i, 'operator': /\|\||&&|[-+.]=?|[=!](?:[=~][#?]?)?|[<>]=?[#?]?|[*\/%?]|\b(?:is(?:not)?)\b/, 'punctuation': /[{}[\](),;:]/ diff --git a/components/prism-vim.min.js b/components/prism-vim.min.js index acda1052a4..65cc261da5 100644 --- a/components/prism-vim.min.js +++ b/components/prism-vim.min.js @@ -1 +1 @@ -Prism.languages.vim={string:/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\r\n]|'')*'/,comment:/".*/,function:/\b\w+(?=\()/,keyword:/\b(?:ab|abbreviate|abc|abclear|abo|aboveleft|al|all|arga|argadd|argd|argdelete|argdo|arge|argedit|argg|argglobal|argl|arglocal|ar|args|argu|argument|as|ascii|bad|badd|ba|ball|bd|bdelete|be|bel|belowright|bf|bfirst|bl|blast|bm|bmodified|bn|bnext|bN|bNext|bo|botright|bp|bprevious|brea|break|breaka|breakadd|breakd|breakdel|breakl|breaklist|br|brewind|bro|browse|bufdo|b|buffer|buffers|bun|bunload|bw|bwipeout|ca|cabbrev|cabc|cabclear|caddb|caddbuffer|cad|caddexpr|caddf|caddfile|cal|call|cat|catch|cb|cbuffer|cc|ccl|cclose|cd|ce|center|cex|cexpr|cf|cfile|cfir|cfirst|cgetb|cgetbuffer|cgete|cgetexpr|cg|cgetfile|c|change|changes|chd|chdir|che|checkpath|checkt|checktime|cla|clast|cl|clist|clo|close|cmapc|cmapclear|cnew|cnewer|cn|cnext|cN|cNext|cnf|cnfile|cNfcNfile|cnorea|cnoreabbrev|col|colder|colo|colorscheme|comc|comclear|comp|compiler|conf|confirm|con|continue|cope|copen|co|copy|cpf|cpfile|cp|cprevious|cq|cquit|cr|crewind|cuna|cunabbrev|cu|cunmap|cw|cwindow|debugg|debuggreedy|delc|delcommand|d|delete|delf|delfunction|delm|delmarks|diffg|diffget|diffoff|diffpatch|diffpu|diffput|diffsplit|diffthis|diffu|diffupdate|dig|digraphs|di|display|dj|djump|dl|dlist|dr|drop|ds|dsearch|dsp|dsplit|earlier|echoe|echoerr|echom|echomsg|echon|e|edit|el|else|elsei|elseif|em|emenu|endfo|endfor|endf|endfunction|endfun|en|endif|endt|endtry|endw|endwhile|ene|enew|ex|exi|exit|exu|exusage|f|file|files|filetype|fina|finally|fin|find|fini|finish|fir|first|fix|fixdel|fo|fold|foldc|foldclose|folddoc|folddoclosed|foldd|folddoopen|foldo|foldopen|for|fu|fun|function|go|goto|gr|grep|grepa|grepadd|ha|hardcopy|h|help|helpf|helpfind|helpg|helpgrep|helpt|helptags|hid|hide|his|history|ia|iabbrev|iabc|iabclear|if|ij|ijump|il|ilist|imapc|imapclear|in|inorea|inoreabbrev|isearch|isp|isplit|iuna|iunabbrev|iu|iunmap|j|join|ju|jumps|k|keepalt|keepj|keepjumps|kee|keepmarks|laddb|laddbuffer|lad|laddexpr|laddf|laddfile|lan|language|la|last|later|lb|lbuffer|lc|lcd|lch|lchdir|lcl|lclose|let|left|lefta|leftabove|lex|lexpr|lf|lfile|lfir|lfirst|lgetb|lgetbuffer|lgete|lgetexpr|lg|lgetfile|lgr|lgrep|lgrepa|lgrepadd|lh|lhelpgrep|l|list|ll|lla|llast|lli|llist|lmak|lmake|lm|lmap|lmapc|lmapclear|lnew|lnewer|lne|lnext|lN|lNext|lnf|lnfile|lNf|lNfile|ln|lnoremap|lo|loadview|loc|lockmarks|lockv|lockvar|lol|lolder|lop|lopen|lpf|lpfile|lp|lprevious|lr|lrewind|ls|lt|ltag|lu|lunmap|lv|lvimgrep|lvimgrepa|lvimgrepadd|lw|lwindow|mak|make|ma|mark|marks|mat|match|menut|menutranslate|mk|mkexrc|mks|mksession|mksp|mkspell|mkvie|mkview|mkv|mkvimrc|mod|mode|m|move|mzf|mzfile|mz|mzscheme|nbkey|new|n|next|N|Next|nmapc|nmapclear|noh|nohlsearch|norea|noreabbrev|nu|number|nun|nunmap|omapc|omapclear|on|only|o|open|opt|options|ou|ounmap|pc|pclose|ped|pedit|pe|perl|perld|perldo|po|pop|popu|popup|pp|ppop|pre|preserve|prev|previous|p|print|P|Print|profd|profdel|prof|profile|promptf|promptfind|promptr|promptrepl|ps|psearch|pta|ptag|ptf|ptfirst|ptj|ptjump|ptl|ptlast|ptn|ptnext|ptN|ptNext|ptp|ptprevious|ptr|ptrewind|pts|ptselect|pu|put|pw|pwd|pyf|pyfile|py|python|qa|qall|q|quit|quita|quitall|r|read|rec|recover|redi|redir|red|redo|redr|redraw|redraws|redrawstatus|reg|registers|res|resize|ret|retab|retu|return|rew|rewind|ri|right|rightb|rightbelow|rub|ruby|rubyd|rubydo|rubyf|rubyfile|ru|runtime|rv|rviminfo|sal|sall|san|sandbox|sa|sargument|sav|saveas|sba|sball|sbf|sbfirst|sbl|sblast|sbm|sbmodified|sbn|sbnext|sbN|sbNext|sbp|sbprevious|sbr|sbrewind|sb|sbuffer|scripte|scriptencoding|scrip|scriptnames|se|set|setf|setfiletype|setg|setglobal|setl|setlocal|sf|sfind|sfir|sfirst|sh|shell|sign|sil|silent|sim|simalt|sla|slast|sl|sleep|sm|smagic|smap|smapc|smapclear|sme|smenu|sn|snext|sN|sNext|sni|sniff|sno|snomagic|snor|snoremap|snoreme|snoremenu|sor|sort|so|source|spelld|spelldump|spe|spellgood|spelli|spellinfo|spellr|spellrepall|spellu|spellundo|spellw|spellwrong|sp|split|spr|sprevious|sre|srewind|sta|stag|startg|startgreplace|star|startinsert|startr|startreplace|stj|stjump|st|stop|stopi|stopinsert|sts|stselect|sun|sunhide|sunm|sunmap|sus|suspend|sv|sview|syncbind|t|tab|tabc|tabclose|tabd|tabdo|tabe|tabedit|tabf|tabfind|tabfir|tabfirst|tabl|tablast|tabm|tabmove|tabnew|tabn|tabnext|tabN|tabNext|tabo|tabonly|tabp|tabprevious|tabr|tabrewind|tabs|ta|tag|tags|tc|tcl|tcld|tcldo|tclf|tclfile|te|tearoff|tf|tfirst|th|throw|tj|tjump|tl|tlast|tm|tmenu|tn|tnext|tN|tNext|to|topleft|tp|tprevious|tr|trewind|try|ts|tselect|tu|tunmenu|una|unabbreviate|u|undo|undoj|undojoin|undol|undolist|unh|unhide|unlet|unlo|unlockvar|unm|unmap|up|update|verb|verbose|ve|version|vert|vertical|vie|view|vim|vimgrep|vimgrepa|vimgrepadd|vi|visual|viu|viusage|vmapc|vmapclear|vne|vnew|vs|vsplit|vu|vunmap|wa|wall|wh|while|winc|wincmd|windo|winp|winpos|win|winsize|wn|wnext|wN|wNext|wp|wprevious|wq|wqa|wqall|w|write|ws|wsverb|wv|wviminfo|X|xa|xall|x|xit|xm|xmap|xmapc|xmapclear|xme|xmenu|XMLent|XMLns|xn|xnoremap|xnoreme|xnoremenu|xu|xunmap|y|yank)\b/,builtin:/\b(?:autocmd|acd|ai|akm|aleph|allowrevins|altkeymap|ambiwidth|ambw|anti|antialias|arab|arabic|arabicshape|ari|arshape|autochdir|autoindent|autoread|autowrite|autowriteall|aw|awa|background|backspace|backup|backupcopy|backupdir|backupext|backupskip|balloondelay|ballooneval|balloonexpr|bdir|bdlay|beval|bex|bexpr|bg|bh|bin|binary|biosk|bioskey|bk|bkc|bomb|breakat|brk|browsedir|bs|bsdir|bsk|bt|bufhidden|buflisted|buftype|casemap|ccv|cdpath|cedit|cfu|ch|charconvert|ci|cin|cindent|cink|cinkeys|cino|cinoptions|cinw|cinwords|clipboard|cmdheight|cmdwinheight|cmp|cms|columns|com|comments|commentstring|compatible|complete|completefunc|completeopt|consk|conskey|copyindent|cot|cpo|cpoptions|cpt|cscopepathcomp|cscopeprg|cscopequickfix|cscopetag|cscopetagorder|cscopeverbose|cspc|csprg|csqf|cst|csto|csverb|cuc|cul|cursorcolumn|cursorline|cwh|debug|deco|def|define|delcombine|dex|dg|dict|dictionary|diff|diffexpr|diffopt|digraph|dip|dir|directory|dy|ea|ead|eadirection|eb|ed|edcompatible|ef|efm|ei|ek|enc|encoding|endofline|eol|ep|equalalways|equalprg|errorbells|errorfile|errorformat|esckeys|et|eventignore|expandtab|exrc|fcl|fcs|fdc|fde|fdi|fdl|fdls|fdm|fdn|fdo|fdt|fen|fenc|fencs|fex|ff|ffs|fileencoding|fileencodings|fileformat|fileformats|fillchars|fk|fkmap|flp|fml|fmr|foldcolumn|foldenable|foldexpr|foldignore|foldlevel|foldlevelstart|foldmarker|foldmethod|foldminlines|foldnestmax|foldtext|formatexpr|formatlistpat|formatoptions|formatprg|fp|fs|fsync|ft|gcr|gd|gdefault|gfm|gfn|gfs|gfw|ghr|gp|grepformat|grepprg|gtl|gtt|guicursor|guifont|guifontset|guifontwide|guiheadroom|guioptions|guipty|guitablabel|guitabtooltip|helpfile|helpheight|helplang|hf|hh|hi|hidden|highlight|hk|hkmap|hkmapp|hkp|hl|hlg|hls|hlsearch|ic|icon|iconstring|ignorecase|im|imactivatekey|imak|imc|imcmdline|imd|imdisable|imi|iminsert|ims|imsearch|inc|include|includeexpr|incsearch|inde|indentexpr|indentkeys|indk|inex|inf|infercase|insertmode|isf|isfname|isi|isident|isk|iskeyword|isprint|joinspaces|js|key|keymap|keymodel|keywordprg|km|kmp|kp|langmap|langmenu|laststatus|lazyredraw|lbr|lcs|linebreak|lines|linespace|lisp|lispwords|listchars|loadplugins|lpl|lsp|lz|macatsui|magic|makeef|makeprg|matchpairs|matchtime|maxcombine|maxfuncdepth|maxmapdepth|maxmem|maxmempattern|maxmemtot|mco|mef|menuitems|mfd|mh|mis|mkspellmem|ml|mls|mm|mmd|mmp|mmt|modeline|modelines|modifiable|modified|more|mouse|mousef|mousefocus|mousehide|mousem|mousemodel|mouses|mouseshape|mouset|mousetime|mp|mps|msm|mzq|mzquantum|nf|nrformats|numberwidth|nuw|odev|oft|ofu|omnifunc|opendevice|operatorfunc|opfunc|osfiletype|pa|para|paragraphs|paste|pastetoggle|patchexpr|patchmode|path|pdev|penc|pex|pexpr|pfn|ph|pheader|pi|pm|pmbcs|pmbfn|popt|preserveindent|previewheight|previewwindow|printdevice|printencoding|printexpr|printfont|printheader|printmbcharset|printmbfont|printoptions|prompt|pt|pumheight|pvh|pvw|qe|quoteescape|readonly|remap|report|restorescreen|revins|rightleft|rightleftcmd|rl|rlc|ro|rs|rtp|ruf|ruler|rulerformat|runtimepath|sbo|sc|scb|scr|scroll|scrollbind|scrolljump|scrolloff|scrollopt|scs|sect|sections|secure|sel|selection|selectmode|sessionoptions|sft|shcf|shellcmdflag|shellpipe|shellquote|shellredir|shellslash|shelltemp|shelltype|shellxquote|shiftround|shiftwidth|shm|shortmess|shortname|showbreak|showcmd|showfulltag|showmatch|showmode|showtabline|shq|si|sidescroll|sidescrolloff|siso|sj|slm|smartcase|smartindent|smarttab|smc|smd|softtabstop|sol|spc|spell|spellcapcheck|spellfile|spelllang|spellsuggest|spf|spl|splitbelow|splitright|sps|sr|srr|ss|ssl|ssop|stal|startofline|statusline|stl|stmp|su|sua|suffixes|suffixesadd|sw|swapfile|swapsync|swb|swf|switchbuf|sws|sxq|syn|synmaxcol|syntax|tabline|tabpagemax|tabstop|tagbsearch|taglength|tagrelative|tagstack|tal|tb|tbi|tbidi|tbis|tbs|tenc|term|termbidi|termencoding|terse|textauto|textmode|textwidth|tgst|thesaurus|tildeop|timeout|timeoutlen|title|titlelen|titleold|titlestring|toolbar|toolbariconsize|top|tpm|tsl|tsr|ttimeout|ttimeoutlen|ttm|tty|ttybuiltin|ttyfast|ttym|ttymouse|ttyscroll|ttytype|tw|tx|uc|ul|undolevels|updatecount|updatetime|ut|vb|vbs|vdir|verbosefile|vfile|viewdir|viewoptions|viminfo|virtualedit|visualbell|vop|wak|warn|wb|wc|wcm|wd|weirdinvert|wfh|wfw|whichwrap|wi|wig|wildchar|wildcharm|wildignore|wildmenu|wildmode|wildoptions|wim|winaltkeys|window|winfixheight|winfixwidth|winheight|winminheight|winminwidth|winwidth|wiv|wiw|wm|wmh|wmnu|wmw|wop|wrap|wrapmargin|wrapscan|writeany|writebackup|writedelay|ww|noacd|noai|noakm|noallowrevins|noaltkeymap|noanti|noantialias|noar|noarab|noarabic|noarabicshape|noari|noarshape|noautochdir|noautoindent|noautoread|noautowrite|noautowriteall|noaw|noawa|nobackup|noballooneval|nobeval|nobin|nobinary|nobiosk|nobioskey|nobk|nobl|nobomb|nobuflisted|nocf|noci|nocin|nocindent|nocompatible|noconfirm|noconsk|noconskey|nocopyindent|nocp|nocscopetag|nocscopeverbose|nocst|nocsverb|nocuc|nocul|nocursorcolumn|nocursorline|nodeco|nodelcombine|nodg|nodiff|nodigraph|nodisable|noea|noeb|noed|noedcompatible|noek|noendofline|noeol|noequalalways|noerrorbells|noesckeys|noet|noex|noexpandtab|noexrc|nofen|nofk|nofkmap|nofoldenable|nogd|nogdefault|noguipty|nohid|nohidden|nohk|nohkmap|nohkmapp|nohkp|nohls|noic|noicon|noignorecase|noim|noimc|noimcmdline|noimd|noincsearch|noinf|noinfercase|noinsertmode|nois|nojoinspaces|nojs|nolazyredraw|nolbr|nolinebreak|nolisp|nolist|noloadplugins|nolpl|nolz|noma|nomacatsui|nomagic|nomh|noml|nomod|nomodeline|nomodifiable|nomodified|nomore|nomousef|nomousefocus|nomousehide|nonu|nonumber|noodev|noopendevice|nopaste|nopi|nopreserveindent|nopreviewwindow|noprompt|nopvw|noreadonly|noremap|norestorescreen|norevins|nori|norightleft|norightleftcmd|norl|norlc|noro|nors|noru|noruler|nosb|nosc|noscb|noscrollbind|noscs|nosecure|nosft|noshellslash|noshelltemp|noshiftround|noshortname|noshowcmd|noshowfulltag|noshowmatch|noshowmode|nosi|nosm|nosmartcase|nosmartindent|nosmarttab|nosmd|nosn|nosol|nospell|nosplitbelow|nosplitright|nospr|nosr|nossl|nosta|nostartofline|nostmp|noswapfile|noswf|nota|notagbsearch|notagrelative|notagstack|notbi|notbidi|notbs|notermbidi|noterse|notextauto|notextmode|notf|notgst|notildeop|notimeout|notitle|noto|notop|notr|nottimeout|nottybuiltin|nottyfast|notx|novb|novisualbell|nowa|nowarn|nowb|noweirdinvert|nowfh|nowfw|nowildmenu|nowinfixheight|nowinfixwidth|nowiv|nowmnu|nowrap|nowrapscan|nowrite|nowriteany|nowritebackup|nows|invacd|invai|invakm|invallowrevins|invaltkeymap|invanti|invantialias|invar|invarab|invarabic|invarabicshape|invari|invarshape|invautochdir|invautoindent|invautoread|invautowrite|invautowriteall|invaw|invawa|invbackup|invballooneval|invbeval|invbin|invbinary|invbiosk|invbioskey|invbk|invbl|invbomb|invbuflisted|invcf|invci|invcin|invcindent|invcompatible|invconfirm|invconsk|invconskey|invcopyindent|invcp|invcscopetag|invcscopeverbose|invcst|invcsverb|invcuc|invcul|invcursorcolumn|invcursorline|invdeco|invdelcombine|invdg|invdiff|invdigraph|invdisable|invea|inveb|inved|invedcompatible|invek|invendofline|inveol|invequalalways|inverrorbells|invesckeys|invet|invex|invexpandtab|invexrc|invfen|invfk|invfkmap|invfoldenable|invgd|invgdefault|invguipty|invhid|invhidden|invhk|invhkmap|invhkmapp|invhkp|invhls|invhlsearch|invic|invicon|invignorecase|invim|invimc|invimcmdline|invimd|invincsearch|invinf|invinfercase|invinsertmode|invis|invjoinspaces|invjs|invlazyredraw|invlbr|invlinebreak|invlisp|invlist|invloadplugins|invlpl|invlz|invma|invmacatsui|invmagic|invmh|invml|invmod|invmodeline|invmodifiable|invmodified|invmore|invmousef|invmousefocus|invmousehide|invnu|invnumber|invodev|invopendevice|invpaste|invpi|invpreserveindent|invpreviewwindow|invprompt|invpvw|invreadonly|invremap|invrestorescreen|invrevins|invri|invrightleft|invrightleftcmd|invrl|invrlc|invro|invrs|invru|invruler|invsb|invsc|invscb|invscrollbind|invscs|invsecure|invsft|invshellslash|invshelltemp|invshiftround|invshortname|invshowcmd|invshowfulltag|invshowmatch|invshowmode|invsi|invsm|invsmartcase|invsmartindent|invsmarttab|invsmd|invsn|invsol|invspell|invsplitbelow|invsplitright|invspr|invsr|invssl|invsta|invstartofline|invstmp|invswapfile|invswf|invta|invtagbsearch|invtagrelative|invtagstack|invtbi|invtbidi|invtbs|invtermbidi|invterse|invtextauto|invtextmode|invtf|invtgst|invtildeop|invtimeout|invtitle|invto|invtop|invtr|invttimeout|invttybuiltin|invttyfast|invtx|invvb|invvisualbell|invwa|invwarn|invwb|invweirdinvert|invwfh|invwfw|invwildmenu|invwinfixheight|invwinfixwidth|invwiv|invwmnu|invwrap|invwrapscan|invwrite|invwriteany|invwritebackup|invws|t_AB|t_AF|t_al|t_AL|t_bc|t_cd|t_ce|t_Ce|t_cl|t_cm|t_Co|t_cs|t_Cs|t_CS|t_CV|t_da|t_db|t_dl|t_DL|t_EI|t_F1|t_F2|t_F3|t_F4|t_F5|t_F6|t_F7|t_F8|t_F9|t_fs|t_IE|t_IS|t_k1|t_K1|t_k2|t_k3|t_K3|t_k4|t_K4|t_k5|t_K5|t_k6|t_K6|t_k7|t_K7|t_k8|t_K8|t_k9|t_K9|t_KA|t_kb|t_kB|t_KB|t_KC|t_kd|t_kD|t_KD|t_ke|t_KE|t_KF|t_KG|t_kh|t_KH|t_kI|t_KI|t_KJ|t_KK|t_kl|t_KL|t_kN|t_kP|t_kr|t_ks|t_ku|t_le|t_mb|t_md|t_me|t_mr|t_ms|t_nd|t_op|t_RI|t_RV|t_Sb|t_se|t_Sf|t_SI|t_so|t_sr|t_te|t_ti|t_ts|t_ue|t_us|t_ut|t_vb|t_ve|t_vi|t_vs|t_WP|t_WS|t_xs|t_ZH|t_ZR)\b/,number:/\b(?:0x[\da-f]+|\d+(?:\.\d+)?)\b/i,operator:/\|\||&&|[-+.]=?|[=!](?:[=~][#?]?)?|[<>]=?[#?]?|[*\/%?]|\b(?:is(?:not)?)\b/,punctuation:/[{}[\](),;:]/}; \ No newline at end of file +Prism.languages.vim={string:/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\r\n]|'')*'/,comment:/".*/,function:/\b\w+(?=\()/,keyword:/\b(?:N|Next|P|Print|X|XMLent|XMLns|ab|abbreviate|abc|abclear|abo|aboveleft|al|all|ar|arga|argadd|argd|argdelete|argdo|arge|argedit|argg|argglobal|argl|arglocal|args|argu|argument|as|ascii|b|bN|bNext|ba|bad|badd|ball|bd|bdelete|be|bel|belowright|bf|bfirst|bl|blast|bm|bmodified|bn|bnext|bo|botright|bp|bprevious|br|brea|break|breaka|breakadd|breakd|breakdel|breakl|breaklist|brewind|bro|browse|bufdo|buffer|buffers|bun|bunload|bw|bwipeout|c|cN|cNext|cNfcNfile|ca|cabbrev|cabc|cabclear|cad|caddb|caddbuffer|caddexpr|caddf|caddfile|cal|call|cat|catch|cb|cbuffer|cc|ccl|cclose|cd|ce|center|cex|cexpr|cf|cfile|cfir|cfirst|cg|cgetb|cgetbuffer|cgete|cgetexpr|cgetfile|change|changes|chd|chdir|che|checkpath|checkt|checktime|cl|cla|clast|clist|clo|close|cmapc|cmapclear|cn|cnew|cnewer|cnext|cnf|cnfile|cnorea|cnoreabbrev|co|col|colder|colo|colorscheme|comc|comclear|comp|compiler|con|conf|confirm|continue|cope|copen|copy|cp|cpf|cpfile|cprevious|cq|cquit|cr|crewind|cu|cuna|cunabbrev|cunmap|cw|cwindow|d|debugg|debuggreedy|delc|delcommand|delete|delf|delfunction|delm|delmarks|di|diffg|diffget|diffoff|diffpatch|diffpu|diffput|diffsplit|diffthis|diffu|diffupdate|dig|digraphs|display|dj|djump|dl|dlist|dr|drop|ds|dsearch|dsp|dsplit|e|earlier|echoe|echoerr|echom|echomsg|echon|edit|el|else|elsei|elseif|em|emenu|en|endf|endfo|endfor|endfun|endfunction|endif|endt|endtry|endw|endwhile|ene|enew|ex|exi|exit|exu|exusage|f|file|files|filetype|fin|fina|finally|find|fini|finish|fir|first|fix|fixdel|fo|fold|foldc|foldclose|foldd|folddoc|folddoclosed|folddoopen|foldo|foldopen|for|fu|fun|function|go|goto|gr|grep|grepa|grepadd|h|ha|hardcopy|help|helpf|helpfind|helpg|helpgrep|helpt|helptags|hid|hide|his|history|ia|iabbrev|iabc|iabclear|if|ij|ijump|il|ilist|imapc|imapclear|in|inorea|inoreabbrev|isearch|isp|isplit|iu|iuna|iunabbrev|iunmap|j|join|ju|jumps|k|kee|keepalt|keepj|keepjumps|keepmarks|l|lN|lNext|lNf|lNfile|la|lad|laddb|laddbuffer|laddexpr|laddf|laddfile|lan|language|last|later|lb|lbuffer|lc|lcd|lch|lchdir|lcl|lclose|left|lefta|leftabove|let|lex|lexpr|lf|lfile|lfir|lfirst|lg|lgetb|lgetbuffer|lgete|lgetexpr|lgetfile|lgr|lgrep|lgrepa|lgrepadd|lh|lhelpgrep|list|ll|lla|llast|lli|llist|lm|lmak|lmake|lmap|lmapc|lmapclear|ln|lne|lnew|lnewer|lnext|lnf|lnfile|lnoremap|lo|loadview|loc|lockmarks|lockv|lockvar|lol|lolder|lop|lopen|lp|lpf|lpfile|lprevious|lr|lrewind|ls|lt|ltag|lu|lunmap|lv|lvimgrep|lvimgrepa|lvimgrepadd|lw|lwindow|m|ma|mak|make|mark|marks|mat|match|menut|menutranslate|mk|mkexrc|mks|mksession|mksp|mkspell|mkv|mkvie|mkview|mkvimrc|mod|mode|move|mz|mzf|mzfile|mzscheme|n|nbkey|new|next|nmapc|nmapclear|noh|nohlsearch|norea|noreabbrev|nu|number|nun|nunmap|o|omapc|omapclear|on|only|open|opt|options|ou|ounmap|p|pc|pclose|pe|ped|pedit|perl|perld|perldo|po|pop|popu|popup|pp|ppop|pre|preserve|prev|previous|print|prof|profd|profdel|profile|promptf|promptfind|promptr|promptrepl|ps|psearch|ptN|ptNext|pta|ptag|ptf|ptfirst|ptj|ptjump|ptl|ptlast|ptn|ptnext|ptp|ptprevious|ptr|ptrewind|pts|ptselect|pu|put|pw|pwd|py|pyf|pyfile|python|q|qa|qall|quit|quita|quitall|r|read|rec|recover|red|redi|redir|redo|redr|redraw|redraws|redrawstatus|reg|registers|res|resize|ret|retab|retu|return|rew|rewind|ri|right|rightb|rightbelow|ru|rub|ruby|rubyd|rubydo|rubyf|rubyfile|runtime|rv|rviminfo|sN|sNext|sa|sal|sall|san|sandbox|sargument|sav|saveas|sb|sbN|sbNext|sba|sball|sbf|sbfirst|sbl|sblast|sbm|sbmodified|sbn|sbnext|sbp|sbprevious|sbr|sbrewind|sbuffer|scrip|scripte|scriptencoding|scriptnames|se|set|setf|setfiletype|setg|setglobal|setl|setlocal|sf|sfind|sfir|sfirst|sh|shell|sign|sil|silent|sim|simalt|sl|sla|slast|sleep|sm|smagic|smap|smapc|smapclear|sme|smenu|sn|snext|sni|sniff|sno|snomagic|snor|snoremap|snoreme|snoremenu|so|sor|sort|source|sp|spe|spelld|spelldump|spellgood|spelli|spellinfo|spellr|spellrepall|spellu|spellundo|spellw|spellwrong|split|spr|sprevious|sre|srewind|st|sta|stag|star|startg|startgreplace|startinsert|startr|startreplace|stj|stjump|stop|stopi|stopinsert|sts|stselect|sun|sunhide|sunm|sunmap|sus|suspend|sv|sview|syncbind|t|tN|tNext|ta|tab|tabN|tabNext|tabc|tabclose|tabd|tabdo|tabe|tabedit|tabf|tabfind|tabfir|tabfirst|tabl|tablast|tabm|tabmove|tabn|tabnew|tabnext|tabo|tabonly|tabp|tabprevious|tabr|tabrewind|tabs|tag|tags|tc|tcl|tcld|tcldo|tclf|tclfile|te|tearoff|tf|tfirst|th|throw|tj|tjump|tl|tlast|tm|tmenu|tn|tnext|to|topleft|tp|tprevious|tr|trewind|try|ts|tselect|tu|tunmenu|u|una|unabbreviate|undo|undoj|undojoin|undol|undolist|unh|unhide|unlet|unlo|unlockvar|unm|unmap|up|update|ve|verb|verbose|version|vert|vertical|vi|vie|view|vim|vimgrep|vimgrepa|vimgrepadd|visual|viu|viusage|vmapc|vmapclear|vne|vnew|vs|vsplit|vu|vunmap|w|wN|wNext|wa|wall|wh|while|win|winc|wincmd|windo|winp|winpos|winsize|wn|wnext|wp|wprevious|wq|wqa|wqall|write|ws|wsverb|wv|wviminfo|x|xa|xall|xit|xm|xmap|xmapc|xmapclear|xme|xmenu|xn|xnoremap|xnoreme|xnoremenu|xu|xunmap|y|yank)\b/,builtin:/\b(?:acd|ai|akm|aleph|allowrevins|altkeymap|ambiwidth|ambw|anti|antialias|arab|arabic|arabicshape|ari|arshape|autochdir|autocmd|autoindent|autoread|autowrite|autowriteall|aw|awa|background|backspace|backup|backupcopy|backupdir|backupext|backupskip|balloondelay|ballooneval|balloonexpr|bdir|bdlay|beval|bex|bexpr|bg|bh|bin|binary|biosk|bioskey|bk|bkc|bomb|breakat|brk|browsedir|bs|bsdir|bsk|bt|bufhidden|buflisted|buftype|casemap|ccv|cdpath|cedit|cfu|ch|charconvert|ci|cin|cindent|cink|cinkeys|cino|cinoptions|cinw|cinwords|clipboard|cmdheight|cmdwinheight|cmp|cms|columns|com|comments|commentstring|compatible|complete|completefunc|completeopt|consk|conskey|copyindent|cot|cpo|cpoptions|cpt|cscopepathcomp|cscopeprg|cscopequickfix|cscopetag|cscopetagorder|cscopeverbose|cspc|csprg|csqf|cst|csto|csverb|cuc|cul|cursorcolumn|cursorline|cwh|debug|deco|def|define|delcombine|dex|dg|dict|dictionary|diff|diffexpr|diffopt|digraph|dip|dir|directory|dy|ea|ead|eadirection|eb|ed|edcompatible|ef|efm|ei|ek|enc|encoding|endofline|eol|ep|equalalways|equalprg|errorbells|errorfile|errorformat|esckeys|et|eventignore|expandtab|exrc|fcl|fcs|fdc|fde|fdi|fdl|fdls|fdm|fdn|fdo|fdt|fen|fenc|fencs|fex|ff|ffs|fileencoding|fileencodings|fileformat|fileformats|fillchars|fk|fkmap|flp|fml|fmr|foldcolumn|foldenable|foldexpr|foldignore|foldlevel|foldlevelstart|foldmarker|foldmethod|foldminlines|foldnestmax|foldtext|formatexpr|formatlistpat|formatoptions|formatprg|fp|fs|fsync|ft|gcr|gd|gdefault|gfm|gfn|gfs|gfw|ghr|gp|grepformat|grepprg|gtl|gtt|guicursor|guifont|guifontset|guifontwide|guiheadroom|guioptions|guipty|guitablabel|guitabtooltip|helpfile|helpheight|helplang|hf|hh|hi|hidden|highlight|hk|hkmap|hkmapp|hkp|hl|hlg|hls|hlsearch|ic|icon|iconstring|ignorecase|im|imactivatekey|imak|imc|imcmdline|imd|imdisable|imi|iminsert|ims|imsearch|inc|include|includeexpr|incsearch|inde|indentexpr|indentkeys|indk|inex|inf|infercase|insertmode|invacd|invai|invakm|invallowrevins|invaltkeymap|invanti|invantialias|invar|invarab|invarabic|invarabicshape|invari|invarshape|invautochdir|invautoindent|invautoread|invautowrite|invautowriteall|invaw|invawa|invbackup|invballooneval|invbeval|invbin|invbinary|invbiosk|invbioskey|invbk|invbl|invbomb|invbuflisted|invcf|invci|invcin|invcindent|invcompatible|invconfirm|invconsk|invconskey|invcopyindent|invcp|invcscopetag|invcscopeverbose|invcst|invcsverb|invcuc|invcul|invcursorcolumn|invcursorline|invdeco|invdelcombine|invdg|invdiff|invdigraph|invdisable|invea|inveb|inved|invedcompatible|invek|invendofline|inveol|invequalalways|inverrorbells|invesckeys|invet|invex|invexpandtab|invexrc|invfen|invfk|invfkmap|invfoldenable|invgd|invgdefault|invguipty|invhid|invhidden|invhk|invhkmap|invhkmapp|invhkp|invhls|invhlsearch|invic|invicon|invignorecase|invim|invimc|invimcmdline|invimd|invincsearch|invinf|invinfercase|invinsertmode|invis|invjoinspaces|invjs|invlazyredraw|invlbr|invlinebreak|invlisp|invlist|invloadplugins|invlpl|invlz|invma|invmacatsui|invmagic|invmh|invml|invmod|invmodeline|invmodifiable|invmodified|invmore|invmousef|invmousefocus|invmousehide|invnu|invnumber|invodev|invopendevice|invpaste|invpi|invpreserveindent|invpreviewwindow|invprompt|invpvw|invreadonly|invremap|invrestorescreen|invrevins|invri|invrightleft|invrightleftcmd|invrl|invrlc|invro|invrs|invru|invruler|invsb|invsc|invscb|invscrollbind|invscs|invsecure|invsft|invshellslash|invshelltemp|invshiftround|invshortname|invshowcmd|invshowfulltag|invshowmatch|invshowmode|invsi|invsm|invsmartcase|invsmartindent|invsmarttab|invsmd|invsn|invsol|invspell|invsplitbelow|invsplitright|invspr|invsr|invssl|invsta|invstartofline|invstmp|invswapfile|invswf|invta|invtagbsearch|invtagrelative|invtagstack|invtbi|invtbidi|invtbs|invtermbidi|invterse|invtextauto|invtextmode|invtf|invtgst|invtildeop|invtimeout|invtitle|invto|invtop|invtr|invttimeout|invttybuiltin|invttyfast|invtx|invvb|invvisualbell|invwa|invwarn|invwb|invweirdinvert|invwfh|invwfw|invwildmenu|invwinfixheight|invwinfixwidth|invwiv|invwmnu|invwrap|invwrapscan|invwrite|invwriteany|invwritebackup|invws|isf|isfname|isi|isident|isk|iskeyword|isprint|joinspaces|js|key|keymap|keymodel|keywordprg|km|kmp|kp|langmap|langmenu|laststatus|lazyredraw|lbr|lcs|linebreak|lines|linespace|lisp|lispwords|listchars|loadplugins|lpl|lsp|lz|macatsui|magic|makeef|makeprg|matchpairs|matchtime|maxcombine|maxfuncdepth|maxmapdepth|maxmem|maxmempattern|maxmemtot|mco|mef|menuitems|mfd|mh|mis|mkspellmem|ml|mls|mm|mmd|mmp|mmt|modeline|modelines|modifiable|modified|more|mouse|mousef|mousefocus|mousehide|mousem|mousemodel|mouses|mouseshape|mouset|mousetime|mp|mps|msm|mzq|mzquantum|nf|noacd|noai|noakm|noallowrevins|noaltkeymap|noanti|noantialias|noar|noarab|noarabic|noarabicshape|noari|noarshape|noautochdir|noautoindent|noautoread|noautowrite|noautowriteall|noaw|noawa|nobackup|noballooneval|nobeval|nobin|nobinary|nobiosk|nobioskey|nobk|nobl|nobomb|nobuflisted|nocf|noci|nocin|nocindent|nocompatible|noconfirm|noconsk|noconskey|nocopyindent|nocp|nocscopetag|nocscopeverbose|nocst|nocsverb|nocuc|nocul|nocursorcolumn|nocursorline|nodeco|nodelcombine|nodg|nodiff|nodigraph|nodisable|noea|noeb|noed|noedcompatible|noek|noendofline|noeol|noequalalways|noerrorbells|noesckeys|noet|noex|noexpandtab|noexrc|nofen|nofk|nofkmap|nofoldenable|nogd|nogdefault|noguipty|nohid|nohidden|nohk|nohkmap|nohkmapp|nohkp|nohls|noic|noicon|noignorecase|noim|noimc|noimcmdline|noimd|noincsearch|noinf|noinfercase|noinsertmode|nois|nojoinspaces|nojs|nolazyredraw|nolbr|nolinebreak|nolisp|nolist|noloadplugins|nolpl|nolz|noma|nomacatsui|nomagic|nomh|noml|nomod|nomodeline|nomodifiable|nomodified|nomore|nomousef|nomousefocus|nomousehide|nonu|nonumber|noodev|noopendevice|nopaste|nopi|nopreserveindent|nopreviewwindow|noprompt|nopvw|noreadonly|noremap|norestorescreen|norevins|nori|norightleft|norightleftcmd|norl|norlc|noro|nors|noru|noruler|nosb|nosc|noscb|noscrollbind|noscs|nosecure|nosft|noshellslash|noshelltemp|noshiftround|noshortname|noshowcmd|noshowfulltag|noshowmatch|noshowmode|nosi|nosm|nosmartcase|nosmartindent|nosmarttab|nosmd|nosn|nosol|nospell|nosplitbelow|nosplitright|nospr|nosr|nossl|nosta|nostartofline|nostmp|noswapfile|noswf|nota|notagbsearch|notagrelative|notagstack|notbi|notbidi|notbs|notermbidi|noterse|notextauto|notextmode|notf|notgst|notildeop|notimeout|notitle|noto|notop|notr|nottimeout|nottybuiltin|nottyfast|notx|novb|novisualbell|nowa|nowarn|nowb|noweirdinvert|nowfh|nowfw|nowildmenu|nowinfixheight|nowinfixwidth|nowiv|nowmnu|nowrap|nowrapscan|nowrite|nowriteany|nowritebackup|nows|nrformats|numberwidth|nuw|odev|oft|ofu|omnifunc|opendevice|operatorfunc|opfunc|osfiletype|pa|para|paragraphs|paste|pastetoggle|patchexpr|patchmode|path|pdev|penc|pex|pexpr|pfn|ph|pheader|pi|pm|pmbcs|pmbfn|popt|preserveindent|previewheight|previewwindow|printdevice|printencoding|printexpr|printfont|printheader|printmbcharset|printmbfont|printoptions|prompt|pt|pumheight|pvh|pvw|qe|quoteescape|readonly|remap|report|restorescreen|revins|rightleft|rightleftcmd|rl|rlc|ro|rs|rtp|ruf|ruler|rulerformat|runtimepath|sbo|sc|scb|scr|scroll|scrollbind|scrolljump|scrolloff|scrollopt|scs|sect|sections|secure|sel|selection|selectmode|sessionoptions|sft|shcf|shellcmdflag|shellpipe|shellquote|shellredir|shellslash|shelltemp|shelltype|shellxquote|shiftround|shiftwidth|shm|shortmess|shortname|showbreak|showcmd|showfulltag|showmatch|showmode|showtabline|shq|si|sidescroll|sidescrolloff|siso|sj|slm|smartcase|smartindent|smarttab|smc|smd|softtabstop|sol|spc|spell|spellcapcheck|spellfile|spelllang|spellsuggest|spf|spl|splitbelow|splitright|sps|sr|srr|ss|ssl|ssop|stal|startofline|statusline|stl|stmp|su|sua|suffixes|suffixesadd|sw|swapfile|swapsync|swb|swf|switchbuf|sws|sxq|syn|synmaxcol|syntax|t_AB|t_AF|t_AL|t_CS|t_CV|t_Ce|t_Co|t_Cs|t_DL|t_EI|t_F1|t_F2|t_F3|t_F4|t_F5|t_F6|t_F7|t_F8|t_F9|t_IE|t_IS|t_K1|t_K3|t_K4|t_K5|t_K6|t_K7|t_K8|t_K9|t_KA|t_KB|t_KC|t_KD|t_KE|t_KF|t_KG|t_KH|t_KI|t_KJ|t_KK|t_KL|t_RI|t_RV|t_SI|t_Sb|t_Sf|t_WP|t_WS|t_ZH|t_ZR|t_al|t_bc|t_cd|t_ce|t_cl|t_cm|t_cs|t_da|t_db|t_dl|t_fs|t_k1|t_k2|t_k3|t_k4|t_k5|t_k6|t_k7|t_k8|t_k9|t_kB|t_kD|t_kI|t_kN|t_kP|t_kb|t_kd|t_ke|t_kh|t_kl|t_kr|t_ks|t_ku|t_le|t_mb|t_md|t_me|t_mr|t_ms|t_nd|t_op|t_se|t_so|t_sr|t_te|t_ti|t_ts|t_ue|t_us|t_ut|t_vb|t_ve|t_vi|t_vs|t_xs|tabline|tabpagemax|tabstop|tagbsearch|taglength|tagrelative|tagstack|tal|tb|tbi|tbidi|tbis|tbs|tenc|term|termbidi|termencoding|terse|textauto|textmode|textwidth|tgst|thesaurus|tildeop|timeout|timeoutlen|title|titlelen|titleold|titlestring|toolbar|toolbariconsize|top|tpm|tsl|tsr|ttimeout|ttimeoutlen|ttm|tty|ttybuiltin|ttyfast|ttym|ttymouse|ttyscroll|ttytype|tw|tx|uc|ul|undolevels|updatecount|updatetime|ut|vb|vbs|vdir|verbosefile|vfile|viewdir|viewoptions|viminfo|virtualedit|visualbell|vop|wak|warn|wb|wc|wcm|wd|weirdinvert|wfh|wfw|whichwrap|wi|wig|wildchar|wildcharm|wildignore|wildmenu|wildmode|wildoptions|wim|winaltkeys|window|winfixheight|winfixwidth|winheight|winminheight|winminwidth|winwidth|wiv|wiw|wm|wmh|wmnu|wmw|wop|wrap|wrapmargin|wrapscan|writeany|writebackup|writedelay|ww)\b/,number:/\b(?:0x[\da-f]+|\d+(?:\.\d+)?)\b/i,operator:/\|\||&&|[-+.]=?|[=!](?:[=~][#?]?)?|[<>]=?[#?]?|[*\/%?]|\b(?:is(?:not)?)\b/,punctuation:/[{}[\](),;:]/}; \ No newline at end of file diff --git a/components/prism-visual-basic.js b/components/prism-visual-basic.js index 8dcb0b1a23..9e76119669 100644 --- a/components/prism-visual-basic.js +++ b/components/prism-visual-basic.js @@ -18,9 +18,9 @@ Prism.languages['visual-basic'] = { pattern: /#[^\S\r\n]*(?:\d+([/-])\d+\1\d+(?:[^\S\r\n]+(?:\d+[^\S\r\n]*(?:AM|PM)|\d+:\d+(?::\d+)?(?:[^\S\r\n]*(?:AM|PM))?))?|\d+[^\S\r\n]*(?:AM|PM)|\d+:\d+(?::\d+)?(?:[^\S\r\n]*(?:AM|PM))?)[^\S\r\n]*#/i, alias: 'builtin' }, - 'number': /(?:(?:\b\d+(?:\.\d+)?|\.\d+)(?:E[+-]?\d+)?|&[HO][\dA-F]+)(?:U?[ILS]|[FRD])?/i, - 'boolean': /\b(?:True|False|Nothing)\b/i, - 'keyword': /\b(?:AddHandler|AddressOf|Alias|And(?:Also)?|As|Boolean|ByRef|Byte|ByVal|Call|Case|Catch|C(?:Bool|Byte|Char|Date|Dbl|Dec|Int|Lng|Obj|SByte|Short|Sng|Str|Type|UInt|ULng|UShort)|Char|Class|Const|Continue|Currency|Date|Decimal|Declare|Default|Delegate|Dim|DirectCast|Do|Double|Each|Else(?:If)?|End(?:If)?|Enum|Erase|Error|Event|Exit|Finally|For|Friend|Function|Get(?:Type|XMLNamespace)?|Global|GoSub|GoTo|Handles|If|Implements|Imports|In|Inherits|Integer|Interface|Is|IsNot|Let|Lib|Like|Long|Loop|Me|Mod|Module|Must(?:Inherit|Override)|My(?:Base|Class)|Namespace|Narrowing|New|Next|Not(?:Inheritable|Overridable)?|Object|Of|On|Operator|Option(?:al)?|Or(?:Else)?|Out|Overloads|Overridable|Overrides|ParamArray|Partial|Private|Property|Protected|Public|RaiseEvent|ReadOnly|ReDim|RemoveHandler|Resume|Return|SByte|Select|Set|Shadows|Shared|short|Single|Static|Step|Stop|String|Structure|Sub|SyncLock|Then|Throw|To|Try|TryCast|Type|TypeOf|U(?:Integer|Long|Short)|Using|Variant|Wend|When|While|Widening|With(?:Events)?|WriteOnly|Until|Xor)\b/i, + 'number': /(?:(?:\b\d+(?:\.\d+)?|\.\d+)(?:E[+-]?\d+)?|&[HO][\dA-F]+)(?:[FRD]|U?[ILS])?/i, + 'boolean': /\b(?:False|Nothing|True)\b/i, + 'keyword': /\b(?:AddHandler|AddressOf|Alias|And(?:Also)?|As|Boolean|ByRef|Byte|ByVal|Call|Case|Catch|C(?:Bool|Byte|Char|Date|Dbl|Dec|Int|Lng|Obj|SByte|Short|Sng|Str|Type|UInt|ULng|UShort)|Char|Class|Const|Continue|Currency|Date|Decimal|Declare|Default|Delegate|Dim|DirectCast|Do|Double|Each|Else(?:If)?|End(?:If)?|Enum|Erase|Error|Event|Exit|Finally|For|Friend|Function|Get(?:Type|XMLNamespace)?|Global|GoSub|GoTo|Handles|If|Implements|Imports|In|Inherits|Integer|Interface|Is|IsNot|Let|Lib|Like|Long|Loop|Me|Mod|Module|Must(?:Inherit|Override)|My(?:Base|Class)|Namespace|Narrowing|New|Next|Not(?:Inheritable|Overridable)?|Object|Of|On|Operator|Option(?:al)?|Or(?:Else)?|Out|Overloads|Overridable|Overrides|ParamArray|Partial|Private|Property|Protected|Public|RaiseEvent|ReadOnly|ReDim|RemoveHandler|Resume|Return|SByte|Select|Set|Shadows|Shared|short|Single|Static|Step|Stop|String|Structure|Sub|SyncLock|Then|Throw|To|Try|TryCast|Type|TypeOf|U(?:Integer|Long|Short)|Until|Using|Variant|Wend|When|While|Widening|With(?:Events)?|WriteOnly|Xor)\b/i, 'operator': [ /[+\-*/\\^<=>&#@$%!]/, { diff --git a/components/prism-visual-basic.min.js b/components/prism-visual-basic.min.js index 5013aa9628..931f6c3b72 100644 --- a/components/prism-visual-basic.min.js +++ b/components/prism-visual-basic.min.js @@ -1 +1 @@ -Prism.languages["visual-basic"]={comment:{pattern:/(?:['‘’]|REM\b)(?:[^\r\n_]|_(?:\r\n?|\n)?)*/i,inside:{keyword:/^REM/i}},directive:{pattern:/#(?:Const|Else|ElseIf|End|ExternalChecksum|ExternalSource|If|Region)(?:[^\S\r\n]_[^\S\r\n]*(?:\r\n?|\n)|.)+/i,alias:"comment",greedy:!0},string:{pattern:/\$?["“”](?:["“”]{2}|[^"“”])*["“”]C?/i,greedy:!0},date:{pattern:/#[^\S\r\n]*(?:\d+([/-])\d+\1\d+(?:[^\S\r\n]+(?:\d+[^\S\r\n]*(?:AM|PM)|\d+:\d+(?::\d+)?(?:[^\S\r\n]*(?:AM|PM))?))?|\d+[^\S\r\n]*(?:AM|PM)|\d+:\d+(?::\d+)?(?:[^\S\r\n]*(?:AM|PM))?)[^\S\r\n]*#/i,alias:"builtin"},number:/(?:(?:\b\d+(?:\.\d+)?|\.\d+)(?:E[+-]?\d+)?|&[HO][\dA-F]+)(?:U?[ILS]|[FRD])?/i,boolean:/\b(?:True|False|Nothing)\b/i,keyword:/\b(?:AddHandler|AddressOf|Alias|And(?:Also)?|As|Boolean|ByRef|Byte|ByVal|Call|Case|Catch|C(?:Bool|Byte|Char|Date|Dbl|Dec|Int|Lng|Obj|SByte|Short|Sng|Str|Type|UInt|ULng|UShort)|Char|Class|Const|Continue|Currency|Date|Decimal|Declare|Default|Delegate|Dim|DirectCast|Do|Double|Each|Else(?:If)?|End(?:If)?|Enum|Erase|Error|Event|Exit|Finally|For|Friend|Function|Get(?:Type|XMLNamespace)?|Global|GoSub|GoTo|Handles|If|Implements|Imports|In|Inherits|Integer|Interface|Is|IsNot|Let|Lib|Like|Long|Loop|Me|Mod|Module|Must(?:Inherit|Override)|My(?:Base|Class)|Namespace|Narrowing|New|Next|Not(?:Inheritable|Overridable)?|Object|Of|On|Operator|Option(?:al)?|Or(?:Else)?|Out|Overloads|Overridable|Overrides|ParamArray|Partial|Private|Property|Protected|Public|RaiseEvent|ReadOnly|ReDim|RemoveHandler|Resume|Return|SByte|Select|Set|Shadows|Shared|short|Single|Static|Step|Stop|String|Structure|Sub|SyncLock|Then|Throw|To|Try|TryCast|Type|TypeOf|U(?:Integer|Long|Short)|Using|Variant|Wend|When|While|Widening|With(?:Events)?|WriteOnly|Until|Xor)\b/i,operator:[/[+\-*/\\^<=>&#@$%!]/,{pattern:/([^\S\r\n])_(?=[^\S\r\n]*[\r\n])/,lookbehind:!0}],punctuation:/[{}().,:?]/},Prism.languages.vb=Prism.languages["visual-basic"],Prism.languages.vba=Prism.languages["visual-basic"]; \ No newline at end of file +Prism.languages["visual-basic"]={comment:{pattern:/(?:['‘’]|REM\b)(?:[^\r\n_]|_(?:\r\n?|\n)?)*/i,inside:{keyword:/^REM/i}},directive:{pattern:/#(?:Const|Else|ElseIf|End|ExternalChecksum|ExternalSource|If|Region)(?:[^\S\r\n]_[^\S\r\n]*(?:\r\n?|\n)|.)+/i,alias:"comment",greedy:!0},string:{pattern:/\$?["“”](?:["“”]{2}|[^"“”])*["“”]C?/i,greedy:!0},date:{pattern:/#[^\S\r\n]*(?:\d+([/-])\d+\1\d+(?:[^\S\r\n]+(?:\d+[^\S\r\n]*(?:AM|PM)|\d+:\d+(?::\d+)?(?:[^\S\r\n]*(?:AM|PM))?))?|\d+[^\S\r\n]*(?:AM|PM)|\d+:\d+(?::\d+)?(?:[^\S\r\n]*(?:AM|PM))?)[^\S\r\n]*#/i,alias:"builtin"},number:/(?:(?:\b\d+(?:\.\d+)?|\.\d+)(?:E[+-]?\d+)?|&[HO][\dA-F]+)(?:[FRD]|U?[ILS])?/i,boolean:/\b(?:False|Nothing|True)\b/i,keyword:/\b(?:AddHandler|AddressOf|Alias|And(?:Also)?|As|Boolean|ByRef|Byte|ByVal|Call|Case|Catch|C(?:Bool|Byte|Char|Date|Dbl|Dec|Int|Lng|Obj|SByte|Short|Sng|Str|Type|UInt|ULng|UShort)|Char|Class|Const|Continue|Currency|Date|Decimal|Declare|Default|Delegate|Dim|DirectCast|Do|Double|Each|Else(?:If)?|End(?:If)?|Enum|Erase|Error|Event|Exit|Finally|For|Friend|Function|Get(?:Type|XMLNamespace)?|Global|GoSub|GoTo|Handles|If|Implements|Imports|In|Inherits|Integer|Interface|Is|IsNot|Let|Lib|Like|Long|Loop|Me|Mod|Module|Must(?:Inherit|Override)|My(?:Base|Class)|Namespace|Narrowing|New|Next|Not(?:Inheritable|Overridable)?|Object|Of|On|Operator|Option(?:al)?|Or(?:Else)?|Out|Overloads|Overridable|Overrides|ParamArray|Partial|Private|Property|Protected|Public|RaiseEvent|ReadOnly|ReDim|RemoveHandler|Resume|Return|SByte|Select|Set|Shadows|Shared|short|Single|Static|Step|Stop|String|Structure|Sub|SyncLock|Then|Throw|To|Try|TryCast|Type|TypeOf|U(?:Integer|Long|Short)|Until|Using|Variant|Wend|When|While|Widening|With(?:Events)?|WriteOnly|Xor)\b/i,operator:[/[+\-*/\\^<=>&#@$%!]/,{pattern:/([^\S\r\n])_(?=[^\S\r\n]*[\r\n])/,lookbehind:!0}],punctuation:/[{}().,:?]/},Prism.languages.vb=Prism.languages["visual-basic"],Prism.languages.vba=Prism.languages["visual-basic"]; \ No newline at end of file diff --git a/components/prism-warpscript.js b/components/prism-warpscript.js index c33df404d9..bccc44abba 100644 --- a/components/prism-warpscript.js +++ b/components/prism-warpscript.js @@ -13,7 +13,7 @@ Prism.languages.warpscript = { // https://www.warp10.io/tags/control 'keyword': /\b(?:BREAK|CHECKMACRO|CONTINUE|CUDF|DEFINED|DEFINEDMACRO|EVAL|FAIL|FOR|FOREACH|FORSTEP|IFT|IFTE|MSGFAIL|NRETURN|RETHROW|RETURN|SWITCH|TRY|UDF|UNTIL|WHILE)\b/, 'number': /[+-]?\b(?:NaN|Infinity|\d+(?:\.\d*)?(?:[Ee][+-]?\d+)?|0x[\da-fA-F]+|0b[01]+)\b/, - 'boolean': /\b(?:false|true|F|T)\b/, + 'boolean': /\b(?:F|T|false|true)\b/, 'punctuation': /<%|%>|[{}[\]()]/, // Some operators from the "operators" category // https://www.warp10.io/tags/operators diff --git a/components/prism-warpscript.min.js b/components/prism-warpscript.min.js index 030ea5b781..6cece0dae2 100644 --- a/components/prism-warpscript.min.js +++ b/components/prism-warpscript.min.js @@ -1 +1 @@ -Prism.languages.warpscript={comment:/#.*|\/\/.*|\/\*[\s\S]*?\*\//,string:{pattern:/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'|<'(?:[^\\']|'(?!>)|\\.)*'>/,greedy:!0},variable:/\$\S+/,macro:{pattern:/@\S+/,alias:"property"},keyword:/\b(?:BREAK|CHECKMACRO|CONTINUE|CUDF|DEFINED|DEFINEDMACRO|EVAL|FAIL|FOR|FOREACH|FORSTEP|IFT|IFTE|MSGFAIL|NRETURN|RETHROW|RETURN|SWITCH|TRY|UDF|UNTIL|WHILE)\b/,number:/[+-]?\b(?:NaN|Infinity|\d+(?:\.\d*)?(?:[Ee][+-]?\d+)?|0x[\da-fA-F]+|0b[01]+)\b/,boolean:/\b(?:false|true|F|T)\b/,punctuation:/<%|%>|[{}[\]()]/,operator:/==|&&?|\|\|?|\*\*?|>>>?|<<|[<>!~]=?|[-/%^]|\+!?|\b(?:AND|NOT|OR)\b/}; \ No newline at end of file +Prism.languages.warpscript={comment:/#.*|\/\/.*|\/\*[\s\S]*?\*\//,string:{pattern:/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'|<'(?:[^\\']|'(?!>)|\\.)*'>/,greedy:!0},variable:/\$\S+/,macro:{pattern:/@\S+/,alias:"property"},keyword:/\b(?:BREAK|CHECKMACRO|CONTINUE|CUDF|DEFINED|DEFINEDMACRO|EVAL|FAIL|FOR|FOREACH|FORSTEP|IFT|IFTE|MSGFAIL|NRETURN|RETHROW|RETURN|SWITCH|TRY|UDF|UNTIL|WHILE)\b/,number:/[+-]?\b(?:NaN|Infinity|\d+(?:\.\d*)?(?:[Ee][+-]?\d+)?|0x[\da-fA-F]+|0b[01]+)\b/,boolean:/\b(?:F|T|false|true)\b/,punctuation:/<%|%>|[{}[\]()]/,operator:/==|&&?|\|\|?|\*\*?|>>>?|<<|[<>!~]=?|[-/%^]|\+!?|\b(?:AND|NOT|OR)\b/}; \ No newline at end of file diff --git a/components/prism-wasm.js b/components/prism-wasm.js index 2e85253a57..99e4b8adb9 100644 --- a/components/prism-wasm.js +++ b/components/prism-wasm.js @@ -18,7 +18,7 @@ Prism.languages.wasm = { } }, { - pattern: /\b(?:(?:f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|nearest|neg?|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|store(?:8|16|32)?|sqrt|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))?|memory\.(?:grow|size))\b/, + pattern: /\b(?:(?:f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|neg?|nearest|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|sqrt|store(?:8|16|32)?|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))?|memory\.(?:grow|size))\b/, inside: { 'punctuation': /\./ } diff --git a/components/prism-wasm.min.js b/components/prism-wasm.min.js index dc98c4121d..7de0c670b0 100644 --- a/components/prism-wasm.min.js +++ b/components/prism-wasm.min.js @@ -1 +1 @@ -Prism.languages.wasm={comment:[/\(;[\s\S]*?;\)/,{pattern:/;;.*/,greedy:!0}],string:{pattern:/"(?:\\[\s\S]|[^"\\])*"/,greedy:!0},keyword:[{pattern:/\b(?:align|offset)=/,inside:{operator:/=/}},{pattern:/\b(?:(?:f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|nearest|neg?|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|store(?:8|16|32)?|sqrt|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))?|memory\.(?:grow|size))\b/,inside:{punctuation:/\./}},/\b(?:anyfunc|block|br(?:_if|_table)?|call(?:_indirect)?|data|drop|elem|else|end|export|func|get_(?:global|local)|global|if|import|local|loop|memory|module|mut|nop|offset|param|result|return|select|set_(?:global|local)|start|table|tee_local|then|type|unreachable)\b/],variable:/\$[\w!#$%&'*+\-./:<=>?@\\^`|~]+/i,number:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/,punctuation:/[()]/}; \ No newline at end of file +Prism.languages.wasm={comment:[/\(;[\s\S]*?;\)/,{pattern:/;;.*/,greedy:!0}],string:{pattern:/"(?:\\[\s\S]|[^"\\])*"/,greedy:!0},keyword:[{pattern:/\b(?:align|offset)=/,inside:{operator:/=/}},{pattern:/\b(?:(?:f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|neg?|nearest|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|sqrt|store(?:8|16|32)?|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))?|memory\.(?:grow|size))\b/,inside:{punctuation:/\./}},/\b(?:anyfunc|block|br(?:_if|_table)?|call(?:_indirect)?|data|drop|elem|else|end|export|func|get_(?:global|local)|global|if|import|local|loop|memory|module|mut|nop|offset|param|result|return|select|set_(?:global|local)|start|table|tee_local|then|type|unreachable)\b/],variable:/\$[\w!#$%&'*+\-./:<=>?@\\^`|~]+/i,number:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/,punctuation:/[()]/}; \ No newline at end of file diff --git a/components/prism-wiki.js b/components/prism-wiki.js index 528b550bac..d272f9cb81 100644 --- a/components/prism-wiki.js +++ b/components/prism-wiki.js @@ -36,7 +36,7 @@ Prism.languages.wiki = Prism.languages.extend('markup', { alias: 'punctuation' }, 'url': [ - /ISBN +(?:97[89][ -]?)?(?:\d[ -]?){9}[\dx]\b|(?:RFC|PMID) +\d+/i, + /ISBN +(?:97[89][ -]?)?(?:\d[ -]?){9}[\dx]\b|(?:PMID|RFC) +\d+/i, /\[\[.+?\]\]|\[.+?\]/ ], 'variable': [ diff --git a/components/prism-wiki.min.js b/components/prism-wiki.min.js index f34b95dbee..4176b64d33 100644 --- a/components/prism-wiki.min.js +++ b/components/prism-wiki.min.js @@ -1 +1 @@ -Prism.languages.wiki=Prism.languages.extend("markup",{"block-comment":{pattern:/(^|[^\\])\/\*[\s\S]*?\*\//,lookbehind:!0,alias:"comment"},heading:{pattern:/^(=+)[^=\r\n].*?\1/m,inside:{punctuation:/^=+|=+$/,important:/.+/}},emphasis:{pattern:/('{2,5}).+?\1/,inside:{"bold-italic":{pattern:/(''''').+?(?=\1)/,lookbehind:!0,alias:["bold","italic"]},bold:{pattern:/(''')[^'](?:.*?[^'])?(?=\1)/,lookbehind:!0},italic:{pattern:/('')[^'](?:.*?[^'])?(?=\1)/,lookbehind:!0},punctuation:/^''+|''+$/}},hr:{pattern:/^-{4,}/m,alias:"punctuation"},url:[/ISBN +(?:97[89][ -]?)?(?:\d[ -]?){9}[\dx]\b|(?:RFC|PMID) +\d+/i,/\[\[.+?\]\]|\[.+?\]/],variable:[/__[A-Z]+__/,/\{{3}.+?\}{3}/,/\{\{.+?\}\}/],symbol:[/^#redirect/im,/~{3,5}/],"table-tag":{pattern:/((?:^|[|!])[|!])[^|\r\n]+\|(?!\|)/m,lookbehind:!0,inside:{"table-bar":{pattern:/\|$/,alias:"punctuation"},rest:Prism.languages.markup.tag.inside}},punctuation:/^(?:\{\||\|\}|\|-|[*#:;!|])|\|\||!!/m}),Prism.languages.insertBefore("wiki","tag",{nowiki:{pattern:/<(nowiki|pre|source)\b[^>]*>[\s\S]*?<\/\1>/i,inside:{tag:{pattern:/<(?:nowiki|pre|source)\b[^>]*>|<\/(?:nowiki|pre|source)>/i,inside:Prism.languages.markup.tag.inside}}}}); \ No newline at end of file +Prism.languages.wiki=Prism.languages.extend("markup",{"block-comment":{pattern:/(^|[^\\])\/\*[\s\S]*?\*\//,lookbehind:!0,alias:"comment"},heading:{pattern:/^(=+)[^=\r\n].*?\1/m,inside:{punctuation:/^=+|=+$/,important:/.+/}},emphasis:{pattern:/('{2,5}).+?\1/,inside:{"bold-italic":{pattern:/(''''').+?(?=\1)/,lookbehind:!0,alias:["bold","italic"]},bold:{pattern:/(''')[^'](?:.*?[^'])?(?=\1)/,lookbehind:!0},italic:{pattern:/('')[^'](?:.*?[^'])?(?=\1)/,lookbehind:!0},punctuation:/^''+|''+$/}},hr:{pattern:/^-{4,}/m,alias:"punctuation"},url:[/ISBN +(?:97[89][ -]?)?(?:\d[ -]?){9}[\dx]\b|(?:PMID|RFC) +\d+/i,/\[\[.+?\]\]|\[.+?\]/],variable:[/__[A-Z]+__/,/\{{3}.+?\}{3}/,/\{\{.+?\}\}/],symbol:[/^#redirect/im,/~{3,5}/],"table-tag":{pattern:/((?:^|[|!])[|!])[^|\r\n]+\|(?!\|)/m,lookbehind:!0,inside:{"table-bar":{pattern:/\|$/,alias:"punctuation"},rest:Prism.languages.markup.tag.inside}},punctuation:/^(?:\{\||\|\}|\|-|[*#:;!|])|\|\||!!/m}),Prism.languages.insertBefore("wiki","tag",{nowiki:{pattern:/<(nowiki|pre|source)\b[^>]*>[\s\S]*?<\/\1>/i,inside:{tag:{pattern:/<(?:nowiki|pre|source)\b[^>]*>|<\/(?:nowiki|pre|source)>/i,inside:Prism.languages.markup.tag.inside}}}}); \ No newline at end of file diff --git a/components/prism-wolfram.js b/components/prism-wolfram.js index 9dcd3972a5..c206e9673c 100644 --- a/components/prism-wolfram.js +++ b/components/prism-wolfram.js @@ -18,7 +18,7 @@ Prism.languages.wolfram = { pattern: /\$\w+/, alias: 'variable' }, - 'boolean': /\b(?:True|False)\b/, + 'boolean': /\b(?:False|True)\b/, 'number': /(?:\b(?=\d)|\B(?=\.))(?:0[bo])?(?:(?:\d|0x[\da-f])[\da-f]*(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?j?\b/i, 'operator': /\/\.|;|=\.|\^=|\^:=|:=|<<|>>|<\||\|>|:>|\|->|->|<-|@@@|@@|@|\/@|=!=|===|==|=|\+|-|\^|\[\/-+%=\]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/, 'punctuation': /[\|{}[\];(),.:]/ diff --git a/components/prism-wolfram.min.js b/components/prism-wolfram.min.js index 8835376d27..1c25f81350 100644 --- a/components/prism-wolfram.min.js +++ b/components/prism-wolfram.min.js @@ -1 +1 @@ -Prism.languages.wolfram={comment:/\(\*(?:\(\*(?:[^*]|\*(?!\)))*\*\)|(?!\(\*)[\s\S])*?\*\)/,string:{pattern:/"(?:\\.|[^"\\\r\n])*"/,greedy:!0},keyword:/\b(?:Abs|AbsArg|Accuracy|Block|Do|For|Function|If|Manipulate|Module|Nest|NestList|None|Return|Switch|Table|Which|While)\b/,context:{pattern:/\w+`+\w*/,alias:"class-name"},blank:{pattern:/\b\w+_\b/,alias:"regex"},"global-variable":{pattern:/\$\w+/,alias:"variable"},boolean:/\b(?:True|False)\b/,number:/(?:\b(?=\d)|\B(?=\.))(?:0[bo])?(?:(?:\d|0x[\da-f])[\da-f]*(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?j?\b/i,operator:/\/\.|;|=\.|\^=|\^:=|:=|<<|>>|<\||\|>|:>|\|->|->|<-|@@@|@@|@|\/@|=!=|===|==|=|\+|-|\^|\[\/-+%=\]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[\|{}[\];(),.:]/},Prism.languages.mathematica=Prism.languages.wolfram,Prism.languages.wl=Prism.languages.wolfram,Prism.languages.nb=Prism.languages.wolfram; \ No newline at end of file +Prism.languages.wolfram={comment:/\(\*(?:\(\*(?:[^*]|\*(?!\)))*\*\)|(?!\(\*)[\s\S])*?\*\)/,string:{pattern:/"(?:\\.|[^"\\\r\n])*"/,greedy:!0},keyword:/\b(?:Abs|AbsArg|Accuracy|Block|Do|For|Function|If|Manipulate|Module|Nest|NestList|None|Return|Switch|Table|Which|While)\b/,context:{pattern:/\w+`+\w*/,alias:"class-name"},blank:{pattern:/\b\w+_\b/,alias:"regex"},"global-variable":{pattern:/\$\w+/,alias:"variable"},boolean:/\b(?:False|True)\b/,number:/(?:\b(?=\d)|\B(?=\.))(?:0[bo])?(?:(?:\d|0x[\da-f])[\da-f]*(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?j?\b/i,operator:/\/\.|;|=\.|\^=|\^:=|:=|<<|>>|<\||\|>|:>|\|->|->|<-|@@@|@@|@|\/@|=!=|===|==|=|\+|-|\^|\[\/-+%=\]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[\|{}[\];(),.:]/},Prism.languages.mathematica=Prism.languages.wolfram,Prism.languages.wl=Prism.languages.wolfram,Prism.languages.nb=Prism.languages.wolfram; \ No newline at end of file diff --git a/components/prism-wren.js b/components/prism-wren.js index 5ce7ea6906..3c65348060 100644 --- a/components/prism-wren.js +++ b/components/prism-wren.js @@ -63,7 +63,7 @@ Prism.languages.wren = { alias: 'keyword' }, 'keyword': /\b(?:as|break|class|construct|continue|else|for|foreign|if|import|in|is|return|static|super|this|var|while)\b/, - 'boolean': /\b(?:true|false)\b/, + 'boolean': /\b(?:false|true)\b/, 'number': /\b(?:0x[\da-f]+|\d+(?:\.\d+)?(?:e[+-]?\d+)?)\b/i, // Functions can be Class.method() diff --git a/components/prism-wren.min.js b/components/prism-wren.min.js index 09ca7d1e16..c0cf6ef127 100644 --- a/components/prism-wren.min.js +++ b/components/prism-wren.min.js @@ -1 +1 @@ -Prism.languages.wren={comment:[{pattern:/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|\/\*(?:[^*/]|\*(?!\/)|\/(?!\*))*\*\/)*\*\/)*\*\//,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],"triple-quoted-string":{pattern:/"""[\s\S]*?"""/,greedy:!0,alias:"string"},"string-literal":null,hashbang:{pattern:/^#!\/.+/,greedy:!0,alias:"comment"},attribute:{pattern:/#!?[ \t\u3000]*\w+/,alias:"keyword"},"class-name":[{pattern:/(\bclass\s+)\w+/,lookbehind:!0},/\b[A-Z][a-z\d_]*\b/],constant:/\b[A-Z][A-Z\d_]*\b/,null:{pattern:/\bnull\b/,alias:"keyword"},keyword:/\b(?:as|break|class|construct|continue|else|for|foreign|if|import|in|is|return|static|super|this|var|while)\b/,boolean:/\b(?:true|false)\b/,number:/\b(?:0x[\da-f]+|\d+(?:\.\d+)?(?:e[+-]?\d+)?)\b/i,function:/\b[a-z_]\w*(?=\s*[({])/i,operator:/<<|>>|[=!<>]=?|&&|\|\||[-+*/%~^&|?:]|\.{2,3}/,punctuation:/[\[\](){}.,;]/},Prism.languages.wren["string-literal"]={pattern:/(^|[^\\"])"(?:[^\\"%]|\\[\s\S]|%(?!\()|%\((?:[^()]|\((?:[^()]|\([^)]*\))*\))*\))*"/,lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)%\((?:[^()]|\((?:[^()]|\([^)]*\))*\))*\)/,lookbehind:!0,inside:{expression:{pattern:/^(%\()[\s\S]+(?=\)$)/,lookbehind:!0,inside:Prism.languages.wren},"interpolation-punctuation":{pattern:/^%\(|\)$/,alias:"punctuation"}}},string:/[\s\S]+/}}; \ No newline at end of file +Prism.languages.wren={comment:[{pattern:/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|\/\*(?:[^*/]|\*(?!\/)|\/(?!\*))*\*\/)*\*\/)*\*\//,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],"triple-quoted-string":{pattern:/"""[\s\S]*?"""/,greedy:!0,alias:"string"},"string-literal":null,hashbang:{pattern:/^#!\/.+/,greedy:!0,alias:"comment"},attribute:{pattern:/#!?[ \t\u3000]*\w+/,alias:"keyword"},"class-name":[{pattern:/(\bclass\s+)\w+/,lookbehind:!0},/\b[A-Z][a-z\d_]*\b/],constant:/\b[A-Z][A-Z\d_]*\b/,null:{pattern:/\bnull\b/,alias:"keyword"},keyword:/\b(?:as|break|class|construct|continue|else|for|foreign|if|import|in|is|return|static|super|this|var|while)\b/,boolean:/\b(?:false|true)\b/,number:/\b(?:0x[\da-f]+|\d+(?:\.\d+)?(?:e[+-]?\d+)?)\b/i,function:/\b[a-z_]\w*(?=\s*[({])/i,operator:/<<|>>|[=!<>]=?|&&|\|\||[-+*/%~^&|?:]|\.{2,3}/,punctuation:/[\[\](){}.,;]/},Prism.languages.wren["string-literal"]={pattern:/(^|[^\\"])"(?:[^\\"%]|\\[\s\S]|%(?!\()|%\((?:[^()]|\((?:[^()]|\([^)]*\))*\))*\))*"/,lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)%\((?:[^()]|\((?:[^()]|\([^)]*\))*\))*\)/,lookbehind:!0,inside:{expression:{pattern:/^(%\()[\s\S]+(?=\)$)/,lookbehind:!0,inside:Prism.languages.wren},"interpolation-punctuation":{pattern:/^%\(|\)$/,alias:"punctuation"}}},string:/[\s\S]+/}}; \ No newline at end of file diff --git a/components/prism-xojo.js b/components/prism-xojo.js index 2dfd062673..a99fc94b73 100644 --- a/components/prism-xojo.js +++ b/components/prism-xojo.js @@ -10,8 +10,8 @@ Prism.languages.xojo = { /(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:E[+-]?\d+)?/i, /&[bchou][a-z\d]+/i ], - 'symbol': /#(?:If|Else|ElseIf|Endif|Pragma)\b/i, - 'keyword': /\b(?:AddHandler|App|Array|As(?:signs)?|Auto|By(?:Ref|Val)|Boolean|Break|Byte|Call|Case|Catch|CFStringRef|CGFloat|Class|Color|Const|Continue|CString|Currency|CurrentMethodName|Declare|Delegate|Dim|Do(?:uble|wnTo)?|Each|Else(?:If)?|End|Enumeration|Event|Exception|Exit|Extends|False|Finally|For|Function|Get|GetTypeInfo|Global|GOTO|If|Implements|In|Inherits|Int(?:erface|eger|8|16|32|64)?|Lib|Loop|Me|Module|Next|Nil|Object|Optional|OSType|ParamArray|Private|Property|Protected|PString|Ptr|Raise(?:Event)?|ReDim|RemoveHandler|Return|Select(?:or)?|Self|Set|Single|Shared|Short|Soft|Static|Step|String|Sub|Super|Text|Then|To|True|Try|Ubound|UInt(?:eger|8|16|32|64)?|Until|Using|Var(?:iant)?|Wend|While|WindowPtr|WString)\b/i, - 'operator': /<[=>]?|>=?|[+\-*\/\\^=]|\b(?:AddressOf|And|Ctype|IsA?|Mod|New|Not|Or|Xor|WeakAddressOf)\b/i, + 'symbol': /#(?:Else|ElseIf|Endif|If|Pragma)\b/i, + 'keyword': /\b(?:AddHandler|App|Array|As(?:signs)?|Auto|Boolean|Break|By(?:Ref|Val)|Byte|Call|Case|Catch|CFStringRef|CGFloat|Class|Color|Const|Continue|CString|Currency|CurrentMethodName|Declare|Delegate|Dim|Do(?:uble|wnTo)?|Each|Else(?:If)?|End|Enumeration|Event|Exception|Exit|Extends|False|Finally|For|Function|Get|GetTypeInfo|Global|GOTO|If|Implements|In|Inherits|Int(?:8|16|32|64|eger|erface)?|Lib|Loop|Me|Module|Next|Nil|Object|Optional|OSType|ParamArray|Private|Property|Protected|PString|Ptr|Raise(?:Event)?|ReDim|RemoveHandler|Return|Select(?:or)?|Self|Set|Shared|Short|Single|Soft|Static|Step|String|Sub|Super|Text|Then|To|True|Try|Ubound|UInt(?:8|16|32|64|eger)?|Until|Using|Var(?:iant)?|Wend|While|WindowPtr|WString)\b/i, + 'operator': /<[=>]?|>=?|[+\-*\/\\^=]|\b(?:AddressOf|And|Ctype|IsA?|Mod|New|Not|Or|WeakAddressOf|Xor)\b/i, 'punctuation': /[.,;:()]/ }; diff --git a/components/prism-xojo.min.js b/components/prism-xojo.min.js index 0748cb6aed..8abacf930b 100644 --- a/components/prism-xojo.min.js +++ b/components/prism-xojo.min.js @@ -1 +1 @@ -Prism.languages.xojo={comment:{pattern:/(?:'|\/\/|Rem\b).+/i},string:{pattern:/"(?:""|[^"])*"/,greedy:!0},number:[/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:E[+-]?\d+)?/i,/&[bchou][a-z\d]+/i],symbol:/#(?:If|Else|ElseIf|Endif|Pragma)\b/i,keyword:/\b(?:AddHandler|App|Array|As(?:signs)?|Auto|By(?:Ref|Val)|Boolean|Break|Byte|Call|Case|Catch|CFStringRef|CGFloat|Class|Color|Const|Continue|CString|Currency|CurrentMethodName|Declare|Delegate|Dim|Do(?:uble|wnTo)?|Each|Else(?:If)?|End|Enumeration|Event|Exception|Exit|Extends|False|Finally|For|Function|Get|GetTypeInfo|Global|GOTO|If|Implements|In|Inherits|Int(?:erface|eger|8|16|32|64)?|Lib|Loop|Me|Module|Next|Nil|Object|Optional|OSType|ParamArray|Private|Property|Protected|PString|Ptr|Raise(?:Event)?|ReDim|RemoveHandler|Return|Select(?:or)?|Self|Set|Single|Shared|Short|Soft|Static|Step|String|Sub|Super|Text|Then|To|True|Try|Ubound|UInt(?:eger|8|16|32|64)?|Until|Using|Var(?:iant)?|Wend|While|WindowPtr|WString)\b/i,operator:/<[=>]?|>=?|[+\-*\/\\^=]|\b(?:AddressOf|And|Ctype|IsA?|Mod|New|Not|Or|Xor|WeakAddressOf)\b/i,punctuation:/[.,;:()]/}; \ No newline at end of file +Prism.languages.xojo={comment:{pattern:/(?:'|\/\/|Rem\b).+/i},string:{pattern:/"(?:""|[^"])*"/,greedy:!0},number:[/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:E[+-]?\d+)?/i,/&[bchou][a-z\d]+/i],symbol:/#(?:Else|ElseIf|Endif|If|Pragma)\b/i,keyword:/\b(?:AddHandler|App|Array|As(?:signs)?|Auto|Boolean|Break|By(?:Ref|Val)|Byte|Call|Case|Catch|CFStringRef|CGFloat|Class|Color|Const|Continue|CString|Currency|CurrentMethodName|Declare|Delegate|Dim|Do(?:uble|wnTo)?|Each|Else(?:If)?|End|Enumeration|Event|Exception|Exit|Extends|False|Finally|For|Function|Get|GetTypeInfo|Global|GOTO|If|Implements|In|Inherits|Int(?:8|16|32|64|eger|erface)?|Lib|Loop|Me|Module|Next|Nil|Object|Optional|OSType|ParamArray|Private|Property|Protected|PString|Ptr|Raise(?:Event)?|ReDim|RemoveHandler|Return|Select(?:or)?|Self|Set|Shared|Short|Single|Soft|Static|Step|String|Sub|Super|Text|Then|To|True|Try|Ubound|UInt(?:8|16|32|64|eger)?|Until|Using|Var(?:iant)?|Wend|While|WindowPtr|WString)\b/i,operator:/<[=>]?|>=?|[+\-*\/\\^=]|\b(?:AddressOf|And|Ctype|IsA?|Mod|New|Not|Or|WeakAddressOf|Xor)\b/i,punctuation:/[.,;:()]/}; \ No newline at end of file diff --git a/components/prism-xquery.js b/components/prism-xquery.js index dd594e6408..05bfc8e52e 100644 --- a/components/prism-xquery.js +++ b/components/prism-xquery.js @@ -41,7 +41,7 @@ alias: 'attr-name' }, 'builtin': { - pattern: /(^|[^:-])\b(?:attribute|comment|document|element|processing-instruction|text|xs:(?:anyAtomicType|anyType|anyURI|base64Binary|boolean|byte|date|dateTime|dayTimeDuration|decimal|double|duration|ENTITIES|ENTITY|float|gDay|gMonth|gMonthDay|gYear|gYearMonth|hexBinary|ID|IDREFS?|int|integer|language|long|Name|NCName|negativeInteger|NMTOKENS?|nonNegativeInteger|nonPositiveInteger|normalizedString|NOTATION|positiveInteger|QName|short|string|time|token|unsigned(?:Byte|Int|Long|Short)|untyped(?:Atomic)?|yearMonthDuration))\b(?=$|[^:-])/, + pattern: /(^|[^:-])\b(?:attribute|comment|document|element|processing-instruction|text|xs:(?:ENTITIES|ENTITY|ID|IDREFS?|NCName|NMTOKENS?|NOTATION|Name|QName|anyAtomicType|anyType|anyURI|base64Binary|boolean|byte|date|dateTime|dayTimeDuration|decimal|double|duration|float|gDay|gMonth|gMonthDay|gYear|gYearMonth|hexBinary|int|integer|language|long|negativeInteger|nonNegativeInteger|nonPositiveInteger|normalizedString|positiveInteger|short|string|time|token|unsigned(?:Byte|Int|Long|Short)|untyped(?:Atomic)?|yearMonthDuration))\b(?=$|[^:-])/, lookbehind: true }, 'number': /\b\d+(?:\.\d+)?(?:E[+-]?\d+)?/, diff --git a/components/prism-xquery.min.js b/components/prism-xquery.min.js index 1f053aa477..23e133df1d 100644 --- a/components/prism-xquery.min.js +++ b/components/prism-xquery.min.js @@ -1 +1 @@ -!function(r){r.languages.xquery=r.languages.extend("markup",{"xquery-comment":{pattern:/\(:[\s\S]*?:\)/,greedy:!0,alias:"comment"},string:{pattern:/(["'])(?:\1\1|(?!\1)[\s\S])*\1/,greedy:!0},extension:{pattern:/\(#.+?#\)/,alias:"symbol"},variable:/\$[-\w:]+/,axis:{pattern:/(^|[^-])(?:ancestor(?:-or-self)?|attribute|child|descendant(?:-or-self)?|following(?:-sibling)?|parent|preceding(?:-sibling)?|self)(?=::)/,lookbehind:!0,alias:"operator"},"keyword-operator":{pattern:/(^|[^:-])\b(?:and|castable as|div|eq|except|ge|gt|idiv|instance of|intersect|is|le|lt|mod|ne|or|union)\b(?=$|[^:-])/,lookbehind:!0,alias:"operator"},keyword:{pattern:/(^|[^:-])\b(?:as|ascending|at|base-uri|boundary-space|case|cast as|collation|construction|copy-namespaces|declare|default|descending|else|empty (?:greatest|least)|encoding|every|external|for|function|if|import|in|inherit|lax|let|map|module|namespace|no-inherit|no-preserve|option|order(?: by|ed|ing)?|preserve|return|satisfies|schema|some|stable|strict|strip|then|to|treat as|typeswitch|unordered|validate|variable|version|where|xquery)\b(?=$|[^:-])/,lookbehind:!0},function:/[\w-]+(?::[\w-]+)*(?=\s*\()/,"xquery-element":{pattern:/(element\s+)[\w-]+(?::[\w-]+)*/,lookbehind:!0,alias:"tag"},"xquery-attribute":{pattern:/(attribute\s+)[\w-]+(?::[\w-]+)*/,lookbehind:!0,alias:"attr-name"},builtin:{pattern:/(^|[^:-])\b(?:attribute|comment|document|element|processing-instruction|text|xs:(?:anyAtomicType|anyType|anyURI|base64Binary|boolean|byte|date|dateTime|dayTimeDuration|decimal|double|duration|ENTITIES|ENTITY|float|gDay|gMonth|gMonthDay|gYear|gYearMonth|hexBinary|ID|IDREFS?|int|integer|language|long|Name|NCName|negativeInteger|NMTOKENS?|nonNegativeInteger|nonPositiveInteger|normalizedString|NOTATION|positiveInteger|QName|short|string|time|token|unsigned(?:Byte|Int|Long|Short)|untyped(?:Atomic)?|yearMonthDuration))\b(?=$|[^:-])/,lookbehind:!0},number:/\b\d+(?:\.\d+)?(?:E[+-]?\d+)?/,operator:[/[+*=?|@]|\.\.?|:=|!=|<[=<]?|>[=>]?/,{pattern:/(\s)-(?=\s)/,lookbehind:!0}],punctuation:/[[\](){},;:/]/}),r.languages.xquery.tag.pattern=/<\/?(?!\d)[^\s>\/=$<%]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\[\s\S]|\{(?!\{)(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])+\}|(?!\1)[^\\])*\1|[^\s'">=]+))?)*\s*\/?>/i,r.languages.xquery.tag.inside["attr-value"].pattern=/=(?:("|')(?:\\[\s\S]|\{(?!\{)(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])+\}|(?!\1)[^\\])*\1|[^\s'">=]+)/i,r.languages.xquery.tag.inside["attr-value"].inside.punctuation=/^="|"$/,r.languages.xquery.tag.inside["attr-value"].inside.expression={pattern:/\{(?!\{)(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])+\}/,inside:r.languages.xquery,alias:"language-xquery"};var s=function(e){return"string"==typeof e?e:"string"==typeof e.content?e.content:e.content.map(s).join("")},l=function(e){for(var t=[],n=0;n"===a.content[a.content.length-1].content||t.push({tagName:s(a.content[0].content[1]),openedBraces:0}):!(0[=>]?/,{pattern:/(\s)-(?=\s)/,lookbehind:!0}],punctuation:/[[\](){},;:/]/}),r.languages.xquery.tag.pattern=/<\/?(?!\d)[^\s>\/=$<%]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\[\s\S]|\{(?!\{)(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])+\}|(?!\1)[^\\])*\1|[^\s'">=]+))?)*\s*\/?>/i,r.languages.xquery.tag.inside["attr-value"].pattern=/=(?:("|')(?:\\[\s\S]|\{(?!\{)(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])+\}|(?!\1)[^\\])*\1|[^\s'">=]+)/i,r.languages.xquery.tag.inside["attr-value"].inside.punctuation=/^="|"$/,r.languages.xquery.tag.inside["attr-value"].inside.expression={pattern:/\{(?!\{)(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])+\}/,inside:r.languages.xquery,alias:"language-xquery"};var s=function(e){return"string"==typeof e?e:"string"==typeof e.content?e.content:e.content.map(s).join("")},l=function(e){for(var t=[],n=0;n"===a.content[a.content.length-1].content||t.push({tagName:s(a.content[0].content[1]),openedBraces:0}):!(0|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,t="(?:"+r.source+"(?:[ \t]+"+n.source+")?|"+n.source+"(?:[ \t]+"+r.source+")?)",a="(?:[^\\s\\x00-\\x08\\x0e-\\x1f!\"#%&'*,\\-:>?@[\\]`{|}\\x7f-\\x84\\x86-\\x9f\\ud800-\\udfff\\ufffe\\uffff]|[?:-])(?:[ \t]*(?:(?![#:])|:))*".replace(//g,function(){return"[^\\s\\x00-\\x08\\x0e-\\x1f,[\\]{}\\x7f-\\x84\\x86-\\x9f\\ud800-\\udfff\\ufffe\\uffff]"}),d="\"(?:[^\"\\\\\r\n]|\\\\.)*\"|'(?:[^'\\\\\r\n]|\\\\.)*'";function o(e,n){n=(n||"").replace(/m/g,"")+"m";var r="([:\\-,[{]\\s*(?:\\s<>[ \t]+)?)(?:<>)(?=[ \t]*(?:$|,|\\]|\\}|(?:[\r\n]\\s*)?#))".replace(/<>/g,function(){return t}).replace(/<>/g,function(){return e});return RegExp(r,n)}e.languages.yaml={scalar:{pattern:RegExp("([\\-:]\\s*(?:\\s<>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\\S[^\r\n]*(?:\\2[^\r\n]+)*)".replace(/<>/g,function(){return t})),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp("((?:^|[:\\-,[{\r\n?])[ \t]*(?:<>[ \t]+)?)<>(?=\\s*:\\s)".replace(/<>/g,function(){return t}).replace(/<>/g,function(){return"(?:"+a+"|"+d+")"})),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:o("\\d{4}-\\d\\d?-\\d\\d?(?:[tT]|[ \t]+)\\d\\d?:\\d{2}:\\d{2}(?:\\.\\d*)?(?:[ \t]*(?:Z|[-+]\\d\\d?(?::\\d{2})?))?|\\d{4}-\\d{2}-\\d{2}|\\d\\d?:\\d{2}(?::\\d{2}(?:\\.\\d*)?)?"),lookbehind:!0,alias:"number"},boolean:{pattern:o("true|false","i"),lookbehind:!0,alias:"important"},null:{pattern:o("null|~","i"),lookbehind:!0,alias:"important"},string:{pattern:o(d),lookbehind:!0,greedy:!0},number:{pattern:o("[+-]?(?:0x[\\da-f]+|0o[0-7]+|(?:\\d+(?:\\.\\d*)?|\\.\\d+)(?:e[+-]?\\d+)?|\\.inf|\\.nan)","i"),lookbehind:!0},tag:r,important:n,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},e.languages.yml=e.languages.yaml}(Prism); \ No newline at end of file +!function(e){var n=/[*&][^\s[\]{},]+/,r=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,t="(?:"+r.source+"(?:[ \t]+"+n.source+")?|"+n.source+"(?:[ \t]+"+r.source+")?)",a="(?:[^\\s\\x00-\\x08\\x0e-\\x1f!\"#%&'*,\\-:>?@[\\]`{|}\\x7f-\\x84\\x86-\\x9f\\ud800-\\udfff\\ufffe\\uffff]|[?:-])(?:[ \t]*(?:(?![#:])|:))*".replace(//g,function(){return"[^\\s\\x00-\\x08\\x0e-\\x1f,[\\]{}\\x7f-\\x84\\x86-\\x9f\\ud800-\\udfff\\ufffe\\uffff]"}),d="\"(?:[^\"\\\\\r\n]|\\\\.)*\"|'(?:[^'\\\\\r\n]|\\\\.)*'";function o(e,n){n=(n||"").replace(/m/g,"")+"m";var r="([:\\-,[{]\\s*(?:\\s<>[ \t]+)?)(?:<>)(?=[ \t]*(?:$|,|\\]|\\}|(?:[\r\n]\\s*)?#))".replace(/<>/g,function(){return t}).replace(/<>/g,function(){return e});return RegExp(r,n)}e.languages.yaml={scalar:{pattern:RegExp("([\\-:]\\s*(?:\\s<>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\\S[^\r\n]*(?:\\2[^\r\n]+)*)".replace(/<>/g,function(){return t})),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp("((?:^|[:\\-,[{\r\n?])[ \t]*(?:<>[ \t]+)?)<>(?=\\s*:\\s)".replace(/<>/g,function(){return t}).replace(/<>/g,function(){return"(?:"+a+"|"+d+")"})),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:o("\\d{4}-\\d\\d?-\\d\\d?(?:[tT]|[ \t]+)\\d\\d?:\\d{2}:\\d{2}(?:\\.\\d*)?(?:[ \t]*(?:Z|[-+]\\d\\d?(?::\\d{2})?))?|\\d{4}-\\d{2}-\\d{2}|\\d\\d?:\\d{2}(?::\\d{2}(?:\\.\\d*)?)?"),lookbehind:!0,alias:"number"},boolean:{pattern:o("false|true","i"),lookbehind:!0,alias:"important"},null:{pattern:o("null|~","i"),lookbehind:!0,alias:"important"},string:{pattern:o(d),lookbehind:!0,greedy:!0},number:{pattern:o("[+-]?(?:0x[\\da-f]+|0o[0-7]+|(?:\\d+(?:\\.\\d*)?|\\.\\d+)(?:e[+-]?\\d+)?|\\.inf|\\.nan)","i"),lookbehind:!0},tag:r,important:n,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},e.languages.yml=e.languages.yaml}(Prism); \ No newline at end of file diff --git a/components/prism-zig.js b/components/prism-zig.js index 71efd213f3..6517294f7c 100644 --- a/components/prism-zig.js +++ b/components/prism-zig.js @@ -81,7 +81,7 @@ } ], 'builtin-types': { - pattern: /\b(?:anyerror|bool|c_u?(?:short|int|long|longlong)|c_longdouble|c_void|comptime_(?:float|int)|[iu](?:8|16|32|64|128|size)|f(?:16|32|64|128)|noreturn|type|void)\b/, + pattern: /\b(?:anyerror|bool|c_u?(?:int|long|longlong|short)|c_longdouble|c_void|comptime_(?:float|int)|f(?:16|32|64|128)|[iu](?:8|16|32|64|128|size)|noreturn|type|void)\b/, alias: 'keyword' }, 'keyword': keyword, diff --git a/components/prism-zig.min.js b/components/prism-zig.min.js index 1054e4e87c..b03a228f8a 100644 --- a/components/prism-zig.min.js +++ b/components/prism-zig.min.js @@ -1 +1 @@ -!function(n){function e(e){return function(){return e}}var r=/\b(?:align|allowzero|and|asm|async|await|break|cancel|catch|comptime|const|continue|defer|else|enum|errdefer|error|export|extern|fn|for|if|inline|linksection|nakedcc|noalias|null|or|orelse|packed|promise|pub|resume|return|stdcallcc|struct|suspend|switch|test|threadlocal|try|undefined|union|unreachable|usingnamespace|var|volatile|while)\b/,a="\\b(?!"+r.source+")(?!\\d)\\w+\\b",o="align\\s*\\((?:[^()]|\\([^()]*\\))*\\)",s="(?!\\s)(?:!?\\s*(?:"+"(?:\\?|\\bpromise->|(?:\\[[^[\\]]*\\]|\\*(?!\\*)|\\*\\*)(?:\\s*|\\s*const\\b|\\s*volatile\\b|\\s*allowzero\\b)*)".replace(//g,e(o))+"\\s*)*"+"(?:\\bpromise\\b|(?:\\berror\\.)?(?:\\.)*(?!\\s+))".replace(//g,e(a))+")+";n.languages.zig={comment:[{pattern:/\/{3}.*/,alias:"doc-comment"},/\/{2}.*/],string:[{pattern:/(^|[^\\@])c?"(?:[^"\\\r\n]|\\.)*"/,lookbehind:!0,greedy:!0},{pattern:/([\r\n])([ \t]+c?\\{2}).*(?:(?:\r\n?|\n)\2.*)*/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\])'(?:[^'\\\r\n]|\\(?:.|x[a-fA-F\d]{2}|u\{[a-fA-F\d]{1,6}\}))'/,lookbehind:!0,greedy:!0}],builtin:/\B@(?!\d)\w+(?=\s*\()/,label:{pattern:/(\b(?:break|continue)\s*:\s*)\w+\b|\b(?!\d)\w+\b(?=\s*:\s*(?:\{|while\b))/,lookbehind:!0},"class-name":[/\b(?!\d)\w+(?=\s*=\s*(?:(?:extern|packed)\s+)?(?:enum|struct|union)\s*[({])/,{pattern:RegExp("(:\\s*)(?=\\s*(?:\\s*)?[=;,)])|(?=\\s*(?:\\s*)?\\{)".replace(//g,e(s)).replace(//g,e(o))),lookbehind:!0,inside:null},{pattern:RegExp("(\\)\\s*)(?=\\s*(?:\\s*)?;)".replace(//g,e(s)).replace(//g,e(o))),lookbehind:!0,inside:null}],"builtin-types":{pattern:/\b(?:anyerror|bool|c_u?(?:short|int|long|longlong)|c_longdouble|c_void|comptime_(?:float|int)|[iu](?:8|16|32|64|128|size)|f(?:16|32|64|128)|noreturn|type|void)\b/,alias:"keyword"},keyword:r,function:/\b(?!\d)\w+(?=\s*\()/,number:/\b(?:0b[01]+|0o[0-7]+|0x[a-fA-F\d]+(?:\.[a-fA-F\d]*)?(?:[pP][+-]?[a-fA-F\d]+)?|\d+(?:\.\d*)?(?:[eE][+-]?\d+)?)\b/,boolean:/\b(?:false|true)\b/,operator:/\.[*?]|\.{2,3}|[-=]>|\*\*|\+\+|\|\||(?:<<|>>|[-+*]%|[-+*/%^&|<>!=])=?|[?~]/,punctuation:/[.:,;(){}[\]]/},n.languages.zig["class-name"].forEach(function(e){null===e.inside&&(e.inside=n.languages.zig)})}(Prism); \ No newline at end of file +!function(n){function e(e){return function(){return e}}var r=/\b(?:align|allowzero|and|asm|async|await|break|cancel|catch|comptime|const|continue|defer|else|enum|errdefer|error|export|extern|fn|for|if|inline|linksection|nakedcc|noalias|null|or|orelse|packed|promise|pub|resume|return|stdcallcc|struct|suspend|switch|test|threadlocal|try|undefined|union|unreachable|usingnamespace|var|volatile|while)\b/,a="\\b(?!"+r.source+")(?!\\d)\\w+\\b",o="align\\s*\\((?:[^()]|\\([^()]*\\))*\\)",s="(?!\\s)(?:!?\\s*(?:"+"(?:\\?|\\bpromise->|(?:\\[[^[\\]]*\\]|\\*(?!\\*)|\\*\\*)(?:\\s*|\\s*const\\b|\\s*volatile\\b|\\s*allowzero\\b)*)".replace(//g,e(o))+"\\s*)*"+"(?:\\bpromise\\b|(?:\\berror\\.)?(?:\\.)*(?!\\s+))".replace(//g,e(a))+")+";n.languages.zig={comment:[{pattern:/\/{3}.*/,alias:"doc-comment"},/\/{2}.*/],string:[{pattern:/(^|[^\\@])c?"(?:[^"\\\r\n]|\\.)*"/,lookbehind:!0,greedy:!0},{pattern:/([\r\n])([ \t]+c?\\{2}).*(?:(?:\r\n?|\n)\2.*)*/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\])'(?:[^'\\\r\n]|\\(?:.|x[a-fA-F\d]{2}|u\{[a-fA-F\d]{1,6}\}))'/,lookbehind:!0,greedy:!0}],builtin:/\B@(?!\d)\w+(?=\s*\()/,label:{pattern:/(\b(?:break|continue)\s*:\s*)\w+\b|\b(?!\d)\w+\b(?=\s*:\s*(?:\{|while\b))/,lookbehind:!0},"class-name":[/\b(?!\d)\w+(?=\s*=\s*(?:(?:extern|packed)\s+)?(?:enum|struct|union)\s*[({])/,{pattern:RegExp("(:\\s*)(?=\\s*(?:\\s*)?[=;,)])|(?=\\s*(?:\\s*)?\\{)".replace(//g,e(s)).replace(//g,e(o))),lookbehind:!0,inside:null},{pattern:RegExp("(\\)\\s*)(?=\\s*(?:\\s*)?;)".replace(//g,e(s)).replace(//g,e(o))),lookbehind:!0,inside:null}],"builtin-types":{pattern:/\b(?:anyerror|bool|c_u?(?:int|long|longlong|short)|c_longdouble|c_void|comptime_(?:float|int)|f(?:16|32|64|128)|[iu](?:8|16|32|64|128|size)|noreturn|type|void)\b/,alias:"keyword"},keyword:r,function:/\b(?!\d)\w+(?=\s*\()/,number:/\b(?:0b[01]+|0o[0-7]+|0x[a-fA-F\d]+(?:\.[a-fA-F\d]*)?(?:[pP][+-]?[a-fA-F\d]+)?|\d+(?:\.\d*)?(?:[eE][+-]?\d+)?)\b/,boolean:/\b(?:false|true)\b/,operator:/\.[*?]|\.{2,3}|[-=]>|\*\*|\+\+|\|\||(?:<<|>>|[-+*]%|[-+*/%^&|<>!=])=?|[?~]/,punctuation:/[.:,;(){}[\]]/},n.languages.zig["class-name"].forEach(function(e){null===e.inside&&(e.inside=n.languages.zig)})}(Prism); \ No newline at end of file diff --git a/gulpfile.js/changelog.js b/gulpfile.js/changelog.js index d945d0fd27..c0ee7eeef8 100644 --- a/gulpfile.js/changelog.js +++ b/gulpfile.js/changelog.js @@ -268,7 +268,7 @@ async function changes() { }, function changedPlugin(info) { - let relevantChanges = info.changes.filter(and(notGenerated, notTests, notExamples, c => !/\.(?:html|css)$/.test(c.file))); + let relevantChanges = info.changes.filter(and(notGenerated, notTests, notExamples, c => !/\.(?:css|html)$/.test(c.file))); if (relevantChanges.length > 0 && relevantChanges.every(c => c.mode === 'M' && /^plugins\/.*\.js$/.test(c.file))) { diff --git a/plugins/match-braces/prism-match-braces.js b/plugins/match-braces/prism-match-braces.js index bb3faf41c4..478f344ff3 100644 --- a/plugins/match-braces/prism-match-braces.js +++ b/plugins/match-braces/prism-match-braces.js @@ -38,7 +38,7 @@ var pairIdCounter = 0; - var BRACE_ID_PATTERN = /^(pair-\d+-)(open|close)$/; + var BRACE_ID_PATTERN = /^(pair-\d+-)(close|open)$/; /** * Returns the brace partner given one brace of a brace pair. diff --git a/plugins/match-braces/prism-match-braces.min.js b/plugins/match-braces/prism-match-braces.min.js index 990b94aaa3..8b523abaaa 100644 --- a/plugins/match-braces/prism-match-braces.min.js +++ b/plugins/match-braces/prism-match-braces.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof Prism&&"undefined"!=typeof document){var d={"(":")","[":"]","{":"}"},u={"(":"brace-round","[":"brace-square","{":"brace-curly"},f={"${":"{"},h=0,n=/^(pair-\d+-)(open|close)$/;Prism.hooks.add("complete",function(e){var t=e.element,n=t.parentElement;if(n&&"PRE"==n.tagName){var r=[];if(Prism.util.isActive(t,"match-braces")&&r.push("(","[","{"),0!=r.length){n.__listenerAdded||(n.addEventListener("mousedown",function(){var e=n.querySelector("code"),t=p("brace-selected");Array.prototype.slice.call(e.querySelectorAll("."+t)).forEach(function(e){e.classList.remove(t)})}),Object.defineProperty(n,"__listenerAdded",{value:!0}));var o=Array.prototype.slice.call(t.querySelectorAll("span."+p("token")+"."+p("punctuation"))),l=[];r.forEach(function(e){for(var t=d[e],n=p(u[e]),r=[],c=[],s=0;s
            "})}),tokens:{gradient:{pattern:/(?:\b|\B-[a-z]{1,10}-)(?:repeating-)?(?:linear|radial)-gradient\((?:(?:rgb|hsl)a?\(.+?\)|[^\)])+\)/gi,inside:{function:/[\w-]+(?=\()/,punctuation:/[(),]/}}},languages:{css:!0,less:!0,sass:[{lang:"sass",before:"punctuation",inside:"inside",root:Prism.languages.sass&&Prism.languages.sass["variable-line"]},{lang:"sass",before:"punctuation",inside:"inside",root:Prism.languages.sass&&Prism.languages.sass["property-line"]}],scss:!0,stylus:[{lang:"stylus",before:"func",inside:"rest",root:Prism.languages.stylus&&Prism.languages.stylus["property-declaration"].inside},{lang:"stylus",before:"func",inside:"rest",root:Prism.languages.stylus&&Prism.languages.stylus["variable-declaration"].inside}]}},angle:{create:function(){new Prism.plugins.Previewer("angle",function(e){var s,t,i=parseFloat(e),a=e.match(/[a-z]+$/i);if(!i||!a)return!1;switch(a=a[0]){case"deg":s=360;break;case"grad":s=400;break;case"rad":s=2*Math.PI;break;case"turn":s=1}return t=100*i/s,t%=100,this[(i<0?"set":"remove")+"Attribute"]("data-negative",""),this.querySelector("circle").style.strokeDasharray=Math.abs(t)+",500",!0},"*",function(){this._elt.innerHTML=''})},tokens:{angle:/(?:\b|\B-|(?=\B\.))(?:\d+(?:\.\d+)?|\.\d+)(?:deg|g?rad|turn)\b/i},languages:{css:!0,less:!0,markup:{lang:"markup",before:"punctuation",inside:"inside",root:Prism.languages.markup&&Prism.languages.markup.tag.inside["attr-value"]},sass:[{lang:"sass",inside:"inside",root:Prism.languages.sass&&Prism.languages.sass["property-line"]},{lang:"sass",before:"operator",inside:"inside",root:Prism.languages.sass&&Prism.languages.sass["variable-line"]}],scss:!0,stylus:[{lang:"stylus",before:"func",inside:"rest",root:Prism.languages.stylus&&Prism.languages.stylus["property-declaration"].inside},{lang:"stylus",before:"func",inside:"rest",root:Prism.languages.stylus&&Prism.languages.stylus["variable-declaration"].inside}]}},color:{create:function(){new Prism.plugins.Previewer("color",function(e){return this.style.backgroundColor="",this.style.backgroundColor=e,!!this.style.backgroundColor})},tokens:{color:[Prism.languages.css.hexcode].concat(Prism.languages.css.color)},languages:{css:!1,less:!0,markup:{lang:"markup",before:"punctuation",inside:"inside",root:Prism.languages.markup&&Prism.languages.markup.tag.inside["attr-value"]},sass:[{lang:"sass",before:"punctuation",inside:"inside",root:Prism.languages.sass&&Prism.languages.sass["variable-line"]},{lang:"sass",inside:"inside",root:Prism.languages.sass&&Prism.languages.sass["property-line"]}],scss:!1,stylus:[{lang:"stylus",before:"hexcode",inside:"rest",root:Prism.languages.stylus&&Prism.languages.stylus["property-declaration"].inside},{lang:"stylus",before:"hexcode",inside:"rest",root:Prism.languages.stylus&&Prism.languages.stylus["variable-declaration"].inside}]}},easing:{create:function(){new Prism.plugins.Previewer("easing",function(e){var s=(e={linear:"0,0,1,1",ease:".25,.1,.25,1","ease-in":".42,0,1,1","ease-out":"0,0,.58,1","ease-in-out":".42,0,.58,1"}[e]||e).match(/-?(?:\d+(?:\.\d+)?|\.\d+)/g);if(4!==s.length)return!1;s=s.map(function(e,s){return 100*(s%2?1-e:e)}),this.querySelector("path").setAttribute("d","M0,100 C"+s[0]+","+s[1]+", "+s[2]+","+s[3]+", 100,0");var t=this.querySelectorAll("line");return t[0].setAttribute("x2",s[0]),t[0].setAttribute("y2",s[1]),t[1].setAttribute("x2",s[2]),t[1].setAttribute("y2",s[3]),!0},"*",function(){this._elt.innerHTML=''})},tokens:{easing:{pattern:/\bcubic-bezier\((?:-?(?:\d+(?:\.\d+)?|\.\d+),\s*){3}-?(?:\d+(?:\.\d+)?|\.\d+)\)\B|\b(?:linear|ease(?:-in)?(?:-out)?)(?=\s|[;}]|$)/i,inside:{function:/[\w-]+(?=\()/,punctuation:/[(),]/}}},languages:{css:!0,less:!0,sass:[{lang:"sass",inside:"inside",before:"punctuation",root:Prism.languages.sass&&Prism.languages.sass["variable-line"]},{lang:"sass",inside:"inside",root:Prism.languages.sass&&Prism.languages.sass["property-line"]}],scss:!0,stylus:[{lang:"stylus",before:"hexcode",inside:"rest",root:Prism.languages.stylus&&Prism.languages.stylus["property-declaration"].inside},{lang:"stylus",before:"hexcode",inside:"rest",root:Prism.languages.stylus&&Prism.languages.stylus["variable-declaration"].inside}]}},time:{create:function(){new Prism.plugins.Previewer("time",function(e){var s=parseFloat(e),t=e.match(/[a-z]+$/i);return!(!s||!t)&&(t=t[0],this.querySelector("circle").style.animationDuration=2*s+t,!0)},"*",function(){this._elt.innerHTML=''})},tokens:{time:/(?:\b|\B-|(?=\B\.))(?:\d+(?:\.\d+)?|\.\d+)m?s\b/i},languages:{css:!0,less:!0,markup:{lang:"markup",before:"punctuation",inside:"inside",root:Prism.languages.markup&&Prism.languages.markup.tag.inside["attr-value"]},sass:[{lang:"sass",inside:"inside",root:Prism.languages.sass&&Prism.languages.sass["property-line"]},{lang:"sass",before:"operator",inside:"inside",root:Prism.languages.sass&&Prism.languages.sass["variable-line"]}],scss:!0,stylus:[{lang:"stylus",before:"hexcode",inside:"rest",root:Prism.languages.stylus&&Prism.languages.stylus["property-declaration"].inside},{lang:"stylus",before:"hexcode",inside:"rest",root:Prism.languages.stylus&&Prism.languages.stylus["variable-declaration"].inside}]}}},t="token",i="active",a="flipped",r=function(e,s,t,i){this._elt=null,this._type=e,this._token=null,this.updater=s,this._mouseout=this.mouseout.bind(this),this.initializer=i;var a=this;t||(t=["*"]),Array.isArray(t)||(t=[t]),t.forEach(function(e){"string"!=typeof e&&(e=e.lang),r.byLanguages[e]||(r.byLanguages[e]=[]),r.byLanguages[e].indexOf(a)<0&&r.byLanguages[e].push(a)}),r.byType[e]=this};for(var e in r.prototype.init=function(){this._elt||(this._elt=document.createElement("div"),this._elt.className="prism-previewer prism-previewer-"+this._type,document.body.appendChild(this._elt),this.initializer&&this.initializer())},r.prototype.isDisabled=function(e){do{if(e.hasAttribute&&e.hasAttribute("data-previewers"))return-1===(e.getAttribute("data-previewers")||"").split(/\s+/).indexOf(this._type)}while(e=e.parentNode);return!1},r.prototype.check=function(e){if(!e.classList.contains(t)||!this.isDisabled(e)){do{if(e.classList&&e.classList.contains(t)&&e.classList.contains(this._type))break}while(e=e.parentNode);e&&e!==this._token&&(this._token=e,this.show())}},r.prototype.mouseout=function(){this._token.removeEventListener("mouseout",this._mouseout,!1),this._token=null,this.hide()},r.prototype.show=function(){if(this._elt||this.init(),this._token)if(this.updater.call(this._elt,this._token.textContent)){this._token.addEventListener("mouseout",this._mouseout,!1);var e=function(e){var s=e.getBoundingClientRect(),t=s.left,i=s.top,a=document.documentElement.getBoundingClientRect();return t-=a.left,{top:i-=a.top,right:innerWidth-t-s.width,bottom:innerHeight-i-s.height,left:t,width:s.width,height:s.height}}(this._token);this._elt.classList.add(i),0
            "})}),tokens:{gradient:{pattern:/(?:\b|\B-[a-z]{1,10}-)(?:repeating-)?(?:linear|radial)-gradient\((?:(?:hsl|rgb)a?\(.+?\)|[^\)])+\)/gi,inside:{function:/[\w-]+(?=\()/,punctuation:/[(),]/}}},languages:{css:!0,less:!0,sass:[{lang:"sass",before:"punctuation",inside:"inside",root:Prism.languages.sass&&Prism.languages.sass["variable-line"]},{lang:"sass",before:"punctuation",inside:"inside",root:Prism.languages.sass&&Prism.languages.sass["property-line"]}],scss:!0,stylus:[{lang:"stylus",before:"func",inside:"rest",root:Prism.languages.stylus&&Prism.languages.stylus["property-declaration"].inside},{lang:"stylus",before:"func",inside:"rest",root:Prism.languages.stylus&&Prism.languages.stylus["variable-declaration"].inside}]}},angle:{create:function(){new Prism.plugins.Previewer("angle",function(e){var s,t,i=parseFloat(e),a=e.match(/[a-z]+$/i);if(!i||!a)return!1;switch(a=a[0]){case"deg":s=360;break;case"grad":s=400;break;case"rad":s=2*Math.PI;break;case"turn":s=1}return t=100*i/s,t%=100,this[(i<0?"set":"remove")+"Attribute"]("data-negative",""),this.querySelector("circle").style.strokeDasharray=Math.abs(t)+",500",!0},"*",function(){this._elt.innerHTML=''})},tokens:{angle:/(?:\b|\B-|(?=\B\.))(?:\d+(?:\.\d+)?|\.\d+)(?:deg|g?rad|turn)\b/i},languages:{css:!0,less:!0,markup:{lang:"markup",before:"punctuation",inside:"inside",root:Prism.languages.markup&&Prism.languages.markup.tag.inside["attr-value"]},sass:[{lang:"sass",inside:"inside",root:Prism.languages.sass&&Prism.languages.sass["property-line"]},{lang:"sass",before:"operator",inside:"inside",root:Prism.languages.sass&&Prism.languages.sass["variable-line"]}],scss:!0,stylus:[{lang:"stylus",before:"func",inside:"rest",root:Prism.languages.stylus&&Prism.languages.stylus["property-declaration"].inside},{lang:"stylus",before:"func",inside:"rest",root:Prism.languages.stylus&&Prism.languages.stylus["variable-declaration"].inside}]}},color:{create:function(){new Prism.plugins.Previewer("color",function(e){return this.style.backgroundColor="",this.style.backgroundColor=e,!!this.style.backgroundColor})},tokens:{color:[Prism.languages.css.hexcode].concat(Prism.languages.css.color)},languages:{css:!1,less:!0,markup:{lang:"markup",before:"punctuation",inside:"inside",root:Prism.languages.markup&&Prism.languages.markup.tag.inside["attr-value"]},sass:[{lang:"sass",before:"punctuation",inside:"inside",root:Prism.languages.sass&&Prism.languages.sass["variable-line"]},{lang:"sass",inside:"inside",root:Prism.languages.sass&&Prism.languages.sass["property-line"]}],scss:!1,stylus:[{lang:"stylus",before:"hexcode",inside:"rest",root:Prism.languages.stylus&&Prism.languages.stylus["property-declaration"].inside},{lang:"stylus",before:"hexcode",inside:"rest",root:Prism.languages.stylus&&Prism.languages.stylus["variable-declaration"].inside}]}},easing:{create:function(){new Prism.plugins.Previewer("easing",function(e){var s=(e={linear:"0,0,1,1",ease:".25,.1,.25,1","ease-in":".42,0,1,1","ease-out":"0,0,.58,1","ease-in-out":".42,0,.58,1"}[e]||e).match(/-?(?:\d+(?:\.\d+)?|\.\d+)/g);if(4!==s.length)return!1;s=s.map(function(e,s){return 100*(s%2?1-e:e)}),this.querySelector("path").setAttribute("d","M0,100 C"+s[0]+","+s[1]+", "+s[2]+","+s[3]+", 100,0");var t=this.querySelectorAll("line");return t[0].setAttribute("x2",s[0]),t[0].setAttribute("y2",s[1]),t[1].setAttribute("x2",s[2]),t[1].setAttribute("y2",s[3]),!0},"*",function(){this._elt.innerHTML=''})},tokens:{easing:{pattern:/\bcubic-bezier\((?:-?(?:\d+(?:\.\d+)?|\.\d+),\s*){3}-?(?:\d+(?:\.\d+)?|\.\d+)\)\B|\b(?:ease(?:-in)?(?:-out)?|linear)(?=\s|[;}]|$)/i,inside:{function:/[\w-]+(?=\()/,punctuation:/[(),]/}}},languages:{css:!0,less:!0,sass:[{lang:"sass",inside:"inside",before:"punctuation",root:Prism.languages.sass&&Prism.languages.sass["variable-line"]},{lang:"sass",inside:"inside",root:Prism.languages.sass&&Prism.languages.sass["property-line"]}],scss:!0,stylus:[{lang:"stylus",before:"hexcode",inside:"rest",root:Prism.languages.stylus&&Prism.languages.stylus["property-declaration"].inside},{lang:"stylus",before:"hexcode",inside:"rest",root:Prism.languages.stylus&&Prism.languages.stylus["variable-declaration"].inside}]}},time:{create:function(){new Prism.plugins.Previewer("time",function(e){var s=parseFloat(e),t=e.match(/[a-z]+$/i);return!(!s||!t)&&(t=t[0],this.querySelector("circle").style.animationDuration=2*s+t,!0)},"*",function(){this._elt.innerHTML=''})},tokens:{time:/(?:\b|\B-|(?=\B\.))(?:\d+(?:\.\d+)?|\.\d+)m?s\b/i},languages:{css:!0,less:!0,markup:{lang:"markup",before:"punctuation",inside:"inside",root:Prism.languages.markup&&Prism.languages.markup.tag.inside["attr-value"]},sass:[{lang:"sass",inside:"inside",root:Prism.languages.sass&&Prism.languages.sass["property-line"]},{lang:"sass",before:"operator",inside:"inside",root:Prism.languages.sass&&Prism.languages.sass["variable-line"]}],scss:!0,stylus:[{lang:"stylus",before:"hexcode",inside:"rest",root:Prism.languages.stylus&&Prism.languages.stylus["property-declaration"].inside},{lang:"stylus",before:"hexcode",inside:"rest",root:Prism.languages.stylus&&Prism.languages.stylus["variable-declaration"].inside}]}}},t="token",i="active",a="flipped",r=function(e,s,t,i){this._elt=null,this._type=e,this._token=null,this.updater=s,this._mouseout=this.mouseout.bind(this),this.initializer=i;var a=this;t||(t=["*"]),Array.isArray(t)||(t=[t]),t.forEach(function(e){"string"!=typeof e&&(e=e.lang),r.byLanguages[e]||(r.byLanguages[e]=[]),r.byLanguages[e].indexOf(a)<0&&r.byLanguages[e].push(a)}),r.byType[e]=this};for(var e in r.prototype.init=function(){this._elt||(this._elt=document.createElement("div"),this._elt.className="prism-previewer prism-previewer-"+this._type,document.body.appendChild(this._elt),this.initializer&&this.initializer())},r.prototype.isDisabled=function(e){do{if(e.hasAttribute&&e.hasAttribute("data-previewers"))return-1===(e.getAttribute("data-previewers")||"").split(/\s+/).indexOf(this._type)}while(e=e.parentNode);return!1},r.prototype.check=function(e){if(!e.classList.contains(t)||!this.isDisabled(e)){do{if(e.classList&&e.classList.contains(t)&&e.classList.contains(this._type))break}while(e=e.parentNode);e&&e!==this._token&&(this._token=e,this.show())}},r.prototype.mouseout=function(){this._token.removeEventListener("mouseout",this._mouseout,!1),this._token=null,this.hide()},r.prototype.show=function(){if(this._elt||this.init(),this._token)if(this.updater.call(this._elt,this._token.textContent)){this._token.addEventListener("mouseout",this._mouseout,!1);var e=function(e){var s=e.getBoundingClientRect(),t=s.left,i=s.top,a=document.documentElement.getBoundingClientRect();return t-=a.left,{top:i-=a.top,right:innerWidth-t-s.width,bottom:innerHeight-i-s.height,left:t,width:s.width,height:s.height}}(this._token);this._elt.classList.add(i),0]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/, @@ -1551,7 +1551,7 @@ Prism.languages.javascript = Prism.languages.extend('clike', { 'class-name': [ Prism.languages.clike['class-name'], { - pattern: /(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:prototype|constructor))/, + pattern: /(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/, lookbehind: true } ], @@ -1571,7 +1571,7 @@ Prism.languages.javascript = Prism.languages.extend('clike', { 'operator': /--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/ }); -Prism.languages.javascript['class-name'][0].pattern = /(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/; +Prism.languages.javascript['class-name'][0].pattern = /(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/; Prism.languages.insertBefore('javascript', 'keyword', { 'regex': { diff --git a/tests/examples-test.js b/tests/examples-test.js index a993afcb18..870bbf9e96 100644 --- a/tests/examples-test.js +++ b/tests/examples-test.js @@ -100,7 +100,7 @@ async function validateHTML(html) { assert.isEmpty(node.rawText.trim(), 'All non-whitespace text has to be in

            tags.'); } else { // only known tags - assert.match(node.tagName, /^(?:h2|h3|p|pre|ul|ol)$/, 'Only some tags are allowed as top level tags.'); + assert.match(node.tagName, /^(?:h2|h3|ol|p|pre|ul)$/, 'Only some tags are allowed as top level tags.'); //

             elements must have only one child, a  element
             			if (node.tagName === 'pre') {
            
            From 9ed4cf6e729181172868bf8e02e1cb3c996a91dc Mon Sep 17 00:00:00 2001
            From: Michael Schmidt 
            Date: Sun, 26 Sep 2021 12:30:32 +0200
            Subject: [PATCH 0913/1100] C#: Move everything into the IIFE (#3077)
            
            ---
             components/prism-csharp.js     | 4 ++--
             components/prism-csharp.min.js | 2 +-
             2 files changed, 3 insertions(+), 3 deletions(-)
            
            diff --git a/components/prism-csharp.js b/components/prism-csharp.js
            index 8eb261cc1c..3fde332f7b 100644
            --- a/components/prism-csharp.js
            +++ b/components/prism-csharp.js
            @@ -362,6 +362,6 @@
             		]
             	});
             
            -}(Prism));
            +	Prism.languages.dotnet = Prism.languages.cs = Prism.languages.csharp;
             
            -Prism.languages.dotnet = Prism.languages.cs = Prism.languages.csharp;
            +}(Prism));
            diff --git a/components/prism-csharp.min.js b/components/prism-csharp.min.js
            index ff2ec69c10..e41fde3526 100644
            --- a/components/prism-csharp.min.js
            +++ b/components/prism-csharp.min.js
            @@ -1 +1 @@
            -!function(s){function a(e,s){return e.replace(/<<(\d+)>>/g,function(e,n){return"(?:"+s[+n]+")"})}function t(e,n,s){return RegExp(a(e,n),s||"")}function e(e,n){for(var s=0;s>/g,function(){return"(?:"+e+")"});return e.replace(/<>/g,"[^\\s\\S]")}var n="bool byte char decimal double dynamic float int long object sbyte short string uint ulong ushort var void",r="class enum interface record struct",i="add alias and ascending async await by descending from(?=\\s*(?:\\w|$)) get global group into init(?=\\s*;) join let nameof not notnull on or orderby partial remove select set unmanaged value when where with(?=\\s*{)",o="abstract as base break case catch checked const continue default delegate do else event explicit extern finally fixed for foreach goto if implicit in internal is lock namespace new null operator out override params private protected public readonly ref return sealed sizeof stackalloc static switch this throw try typeof unchecked unsafe using virtual volatile while yield";function l(e){return"\\b(?:"+e.trim().replace(/ /g,"|")+")\\b"}var d=l(r),p=RegExp(l(n+" "+r+" "+i+" "+o)),c=l(r+" "+i+" "+o),u=l(n+" "+r+" "+o),g=e("<(?:[^<>;=+\\-*/%&|^]|<>)*>",2),b=e("\\((?:[^()]|<>)*\\)",2),h="@?\\b[A-Za-z_]\\w*\\b",f=a("<<0>>(?:\\s*<<1>>)?",[h,g]),m=a("(?!<<0>>)<<1>>(?:\\s*\\.\\s*<<1>>)*",[c,f]),k="\\[\\s*(?:,\\s*)*\\]",y=a("<<0>>(?:\\s*(?:\\?\\s*)?<<1>>)*(?:\\s*\\?)?",[m,k]),w=a("(?:<<0>>|<<1>>)(?:\\s*(?:\\?\\s*)?<<2>>)*(?:\\s*\\?)?",[a("\\(<<0>>+(?:,<<0>>+)+\\)",[a("[^,()<>[\\];=+\\-*/%&|^]|<<0>>|<<1>>|<<2>>",[g,b,k])]),m,k]),v={keyword:p,punctuation:/[<>()?,.:[\]]/},x="'(?:[^\r\n'\\\\]|\\\\.|\\\\[Uux][\\da-fA-F]{1,8})'",$='"(?:\\\\.|[^\\\\"\r\n])*"';s.languages.csharp=s.languages.extend("clike",{string:[{pattern:t("(^|[^$\\\\])<<0>>",['@"(?:""|\\\\[^]|[^\\\\"])*"(?!")']),lookbehind:!0,greedy:!0},{pattern:t("(^|[^@$\\\\])<<0>>",[$]),lookbehind:!0,greedy:!0},{pattern:RegExp(x),greedy:!0,alias:"character"}],"class-name":[{pattern:t("(\\busing\\s+static\\s+)<<0>>(?=\\s*;)",[m]),lookbehind:!0,inside:v},{pattern:t("(\\busing\\s+<<0>>\\s*=\\s*)<<1>>(?=\\s*;)",[h,w]),lookbehind:!0,inside:v},{pattern:t("(\\busing\\s+)<<0>>(?=\\s*=)",[h]),lookbehind:!0},{pattern:t("(\\b<<0>>\\s+)<<1>>",[d,f]),lookbehind:!0,inside:v},{pattern:t("(\\bcatch\\s*\\(\\s*)<<0>>",[m]),lookbehind:!0,inside:v},{pattern:t("(\\bwhere\\s+)<<0>>",[h]),lookbehind:!0},{pattern:t("(\\b(?:is(?:\\s+not)?|as)\\s+)<<0>>",[y]),lookbehind:!0,inside:v},{pattern:t("\\b<<0>>(?=\\s+(?!<<1>>|with\\s*\\{)<<2>>(?:\\s*[=,;:{)\\]]|\\s+(?:in|when)\\b))",[w,u,h]),inside:v}],keyword:p,number:/(?:\b0(?:x[\da-f_]*[\da-f]|b[01_]*[01])|(?:\B\.\d+(?:_+\d+)*|\b\d+(?:_+\d+)*(?:\.\d+(?:_+\d+)*)?)(?:e[-+]?\d+(?:_+\d+)*)?)(?:[dflmu]|lu|ul)?\b/i,operator:/>>=?|<<=?|[-=]>|([-+&|])\1|~|\?\?=?|[-+*/%&|^!=<>]=?/,punctuation:/\?\.?|::|[{}[\];(),.:]/}),s.languages.insertBefore("csharp","number",{range:{pattern:/\.\./,alias:"operator"}}),s.languages.insertBefore("csharp","punctuation",{"named-parameter":{pattern:t("([(,]\\s*)<<0>>(?=\\s*:)",[h]),lookbehind:!0,alias:"punctuation"}}),s.languages.insertBefore("csharp","class-name",{namespace:{pattern:t("(\\b(?:namespace|using)\\s+)<<0>>(?:\\s*\\.\\s*<<0>>)*(?=\\s*[;{])",[h]),lookbehind:!0,inside:{punctuation:/\./}},"type-expression":{pattern:t("(\\b(?:default|sizeof|typeof)\\s*\\(\\s*(?!\\s))(?:[^()\\s]|\\s(?!\\s)|<<0>>)*(?=\\s*\\))",[b]),lookbehind:!0,alias:"class-name",inside:v},"return-type":{pattern:t("<<0>>(?=\\s+(?:<<1>>\\s*(?:=>|[({]|\\.\\s*this\\s*\\[)|this\\s*\\[))",[w,m]),inside:v,alias:"class-name"},"constructor-invocation":{pattern:t("(\\bnew\\s+)<<0>>(?=\\s*[[({])",[w]),lookbehind:!0,inside:v,alias:"class-name"},"generic-method":{pattern:t("<<0>>\\s*<<1>>(?=\\s*\\()",[h,g]),inside:{function:t("^<<0>>",[h]),generic:{pattern:RegExp(g),alias:"class-name",inside:v}}},"type-list":{pattern:t("\\b((?:<<0>>\\s+<<1>>|record\\s+<<1>>\\s*<<5>>|where\\s+<<2>>)\\s*:\\s*)(?:<<3>>|<<4>>|<<1>>\\s*<<5>>|<<6>>)(?:\\s*,\\s*(?:<<3>>|<<4>>|<<6>>))*(?=\\s*(?:where|[{;]|=>|$))",[d,f,h,w,p.source,b,"\\bnew\\s*\\(\\s*\\)"]),lookbehind:!0,inside:{"record-arguments":{pattern:t("(^(?!new\\s*\\()<<0>>\\s*)<<1>>",[f,b]),lookbehind:!0,greedy:!0,inside:s.languages.csharp},keyword:p,"class-name":{pattern:RegExp(w),greedy:!0,inside:v},punctuation:/[,()]/}},preprocessor:{pattern:/(^[\t ]*)#.*/m,lookbehind:!0,alias:"property",inside:{directive:{pattern:/(#)\b(?:define|elif|else|endif|endregion|error|if|line|nullable|pragma|region|undef|warning)\b/,lookbehind:!0,alias:"keyword"}}}});var _=$+"|"+x,B=a("/(?![*/])|//[^\r\n]*[\r\n]|/\\*(?:[^*]|\\*(?!/))*\\*/|<<0>>",[_]),E=e(a("[^\"'/()]|<<0>>|\\(<>*\\)",[B]),2),R="\\b(?:assembly|event|field|method|module|param|property|return|type)\\b",P=a("<<0>>(?:\\s*\\(<<1>>*\\))?",[m,E]);s.languages.insertBefore("csharp","class-name",{attribute:{pattern:t("((?:^|[^\\s\\w>)?])\\s*\\[\\s*)(?:<<0>>\\s*:\\s*)?<<1>>(?:\\s*,\\s*<<1>>)*(?=\\s*\\])",[R,P]),lookbehind:!0,greedy:!0,inside:{target:{pattern:t("^<<0>>(?=\\s*:)",[R]),alias:"keyword"},"attribute-arguments":{pattern:t("\\(<<0>>*\\)",[E]),inside:s.languages.csharp},"class-name":{pattern:RegExp(m),inside:{punctuation:/\./}},punctuation:/[:,]/}}});var z=":[^}\r\n]+",S=e(a("[^\"'/()]|<<0>>|\\(<>*\\)",[B]),2),j=a("\\{(?!\\{)(?:(?![}:])<<0>>)*<<1>>?\\}",[S,z]),A=e(a("[^\"'/()]|/(?!\\*)|/\\*(?:[^*]|\\*(?!/))*\\*/|<<0>>|\\(<>*\\)",[_]),2),F=a("\\{(?!\\{)(?:(?![}:])<<0>>)*<<1>>?\\}",[A,z]);function U(e,n){return{interpolation:{pattern:t("((?:^|[^{])(?:\\{\\{)*)<<0>>",[e]),lookbehind:!0,inside:{"format-string":{pattern:t("(^\\{(?:(?![}:])<<0>>)*)<<1>>(?=\\}$)",[n,z]),lookbehind:!0,inside:{punctuation:/^:/}},punctuation:/^\{|\}$/,expression:{pattern:/[\s\S]+/,alias:"language-csharp",inside:s.languages.csharp}}},string:/[\s\S]+/}}s.languages.insertBefore("csharp","string",{"interpolation-string":[{pattern:t('(^|[^\\\\])(?:\\$@|@\\$)"(?:""|\\\\[^]|\\{\\{|<<0>>|[^\\\\{"])*"',[j]),lookbehind:!0,greedy:!0,inside:U(j,S)},{pattern:t('(^|[^@\\\\])\\$"(?:\\\\.|\\{\\{|<<0>>|[^\\\\"{])*"',[F]),lookbehind:!0,greedy:!0,inside:U(F,A)}]})}(Prism),Prism.languages.dotnet=Prism.languages.cs=Prism.languages.csharp;
            \ No newline at end of file
            +!function(s){function a(e,s){return e.replace(/<<(\d+)>>/g,function(e,n){return"(?:"+s[+n]+")"})}function t(e,n,s){return RegExp(a(e,n),s||"")}function e(e,n){for(var s=0;s>/g,function(){return"(?:"+e+")"});return e.replace(/<>/g,"[^\\s\\S]")}var n="bool byte char decimal double dynamic float int long object sbyte short string uint ulong ushort var void",r="class enum interface record struct",i="add alias and ascending async await by descending from(?=\\s*(?:\\w|$)) get global group into init(?=\\s*;) join let nameof not notnull on or orderby partial remove select set unmanaged value when where with(?=\\s*{)",o="abstract as base break case catch checked const continue default delegate do else event explicit extern finally fixed for foreach goto if implicit in internal is lock namespace new null operator out override params private protected public readonly ref return sealed sizeof stackalloc static switch this throw try typeof unchecked unsafe using virtual volatile while yield";function l(e){return"\\b(?:"+e.trim().replace(/ /g,"|")+")\\b"}var d=l(r),p=RegExp(l(n+" "+r+" "+i+" "+o)),c=l(r+" "+i+" "+o),u=l(n+" "+r+" "+o),g=e("<(?:[^<>;=+\\-*/%&|^]|<>)*>",2),b=e("\\((?:[^()]|<>)*\\)",2),h="@?\\b[A-Za-z_]\\w*\\b",f=a("<<0>>(?:\\s*<<1>>)?",[h,g]),m=a("(?!<<0>>)<<1>>(?:\\s*\\.\\s*<<1>>)*",[c,f]),k="\\[\\s*(?:,\\s*)*\\]",y=a("<<0>>(?:\\s*(?:\\?\\s*)?<<1>>)*(?:\\s*\\?)?",[m,k]),w=a("(?:<<0>>|<<1>>)(?:\\s*(?:\\?\\s*)?<<2>>)*(?:\\s*\\?)?",[a("\\(<<0>>+(?:,<<0>>+)+\\)",[a("[^,()<>[\\];=+\\-*/%&|^]|<<0>>|<<1>>|<<2>>",[g,b,k])]),m,k]),v={keyword:p,punctuation:/[<>()?,.:[\]]/},x="'(?:[^\r\n'\\\\]|\\\\.|\\\\[Uux][\\da-fA-F]{1,8})'",$='"(?:\\\\.|[^\\\\"\r\n])*"';s.languages.csharp=s.languages.extend("clike",{string:[{pattern:t("(^|[^$\\\\])<<0>>",['@"(?:""|\\\\[^]|[^\\\\"])*"(?!")']),lookbehind:!0,greedy:!0},{pattern:t("(^|[^@$\\\\])<<0>>",[$]),lookbehind:!0,greedy:!0},{pattern:RegExp(x),greedy:!0,alias:"character"}],"class-name":[{pattern:t("(\\busing\\s+static\\s+)<<0>>(?=\\s*;)",[m]),lookbehind:!0,inside:v},{pattern:t("(\\busing\\s+<<0>>\\s*=\\s*)<<1>>(?=\\s*;)",[h,w]),lookbehind:!0,inside:v},{pattern:t("(\\busing\\s+)<<0>>(?=\\s*=)",[h]),lookbehind:!0},{pattern:t("(\\b<<0>>\\s+)<<1>>",[d,f]),lookbehind:!0,inside:v},{pattern:t("(\\bcatch\\s*\\(\\s*)<<0>>",[m]),lookbehind:!0,inside:v},{pattern:t("(\\bwhere\\s+)<<0>>",[h]),lookbehind:!0},{pattern:t("(\\b(?:is(?:\\s+not)?|as)\\s+)<<0>>",[y]),lookbehind:!0,inside:v},{pattern:t("\\b<<0>>(?=\\s+(?!<<1>>|with\\s*\\{)<<2>>(?:\\s*[=,;:{)\\]]|\\s+(?:in|when)\\b))",[w,u,h]),inside:v}],keyword:p,number:/(?:\b0(?:x[\da-f_]*[\da-f]|b[01_]*[01])|(?:\B\.\d+(?:_+\d+)*|\b\d+(?:_+\d+)*(?:\.\d+(?:_+\d+)*)?)(?:e[-+]?\d+(?:_+\d+)*)?)(?:[dflmu]|lu|ul)?\b/i,operator:/>>=?|<<=?|[-=]>|([-+&|])\1|~|\?\?=?|[-+*/%&|^!=<>]=?/,punctuation:/\?\.?|::|[{}[\];(),.:]/}),s.languages.insertBefore("csharp","number",{range:{pattern:/\.\./,alias:"operator"}}),s.languages.insertBefore("csharp","punctuation",{"named-parameter":{pattern:t("([(,]\\s*)<<0>>(?=\\s*:)",[h]),lookbehind:!0,alias:"punctuation"}}),s.languages.insertBefore("csharp","class-name",{namespace:{pattern:t("(\\b(?:namespace|using)\\s+)<<0>>(?:\\s*\\.\\s*<<0>>)*(?=\\s*[;{])",[h]),lookbehind:!0,inside:{punctuation:/\./}},"type-expression":{pattern:t("(\\b(?:default|sizeof|typeof)\\s*\\(\\s*(?!\\s))(?:[^()\\s]|\\s(?!\\s)|<<0>>)*(?=\\s*\\))",[b]),lookbehind:!0,alias:"class-name",inside:v},"return-type":{pattern:t("<<0>>(?=\\s+(?:<<1>>\\s*(?:=>|[({]|\\.\\s*this\\s*\\[)|this\\s*\\[))",[w,m]),inside:v,alias:"class-name"},"constructor-invocation":{pattern:t("(\\bnew\\s+)<<0>>(?=\\s*[[({])",[w]),lookbehind:!0,inside:v,alias:"class-name"},"generic-method":{pattern:t("<<0>>\\s*<<1>>(?=\\s*\\()",[h,g]),inside:{function:t("^<<0>>",[h]),generic:{pattern:RegExp(g),alias:"class-name",inside:v}}},"type-list":{pattern:t("\\b((?:<<0>>\\s+<<1>>|record\\s+<<1>>\\s*<<5>>|where\\s+<<2>>)\\s*:\\s*)(?:<<3>>|<<4>>|<<1>>\\s*<<5>>|<<6>>)(?:\\s*,\\s*(?:<<3>>|<<4>>|<<6>>))*(?=\\s*(?:where|[{;]|=>|$))",[d,f,h,w,p.source,b,"\\bnew\\s*\\(\\s*\\)"]),lookbehind:!0,inside:{"record-arguments":{pattern:t("(^(?!new\\s*\\()<<0>>\\s*)<<1>>",[f,b]),lookbehind:!0,greedy:!0,inside:s.languages.csharp},keyword:p,"class-name":{pattern:RegExp(w),greedy:!0,inside:v},punctuation:/[,()]/}},preprocessor:{pattern:/(^[\t ]*)#.*/m,lookbehind:!0,alias:"property",inside:{directive:{pattern:/(#)\b(?:define|elif|else|endif|endregion|error|if|line|nullable|pragma|region|undef|warning)\b/,lookbehind:!0,alias:"keyword"}}}});var _=$+"|"+x,B=a("/(?![*/])|//[^\r\n]*[\r\n]|/\\*(?:[^*]|\\*(?!/))*\\*/|<<0>>",[_]),E=e(a("[^\"'/()]|<<0>>|\\(<>*\\)",[B]),2),R="\\b(?:assembly|event|field|method|module|param|property|return|type)\\b",z=a("<<0>>(?:\\s*\\(<<1>>*\\))?",[m,E]);s.languages.insertBefore("csharp","class-name",{attribute:{pattern:t("((?:^|[^\\s\\w>)?])\\s*\\[\\s*)(?:<<0>>\\s*:\\s*)?<<1>>(?:\\s*,\\s*<<1>>)*(?=\\s*\\])",[R,z]),lookbehind:!0,greedy:!0,inside:{target:{pattern:t("^<<0>>(?=\\s*:)",[R]),alias:"keyword"},"attribute-arguments":{pattern:t("\\(<<0>>*\\)",[E]),inside:s.languages.csharp},"class-name":{pattern:RegExp(m),inside:{punctuation:/\./}},punctuation:/[:,]/}}});var S=":[^}\r\n]+",j=e(a("[^\"'/()]|<<0>>|\\(<>*\\)",[B]),2),A=a("\\{(?!\\{)(?:(?![}:])<<0>>)*<<1>>?\\}",[j,S]),F=e(a("[^\"'/()]|/(?!\\*)|/\\*(?:[^*]|\\*(?!/))*\\*/|<<0>>|\\(<>*\\)",[_]),2),P=a("\\{(?!\\{)(?:(?![}:])<<0>>)*<<1>>?\\}",[F,S]);function U(e,n){return{interpolation:{pattern:t("((?:^|[^{])(?:\\{\\{)*)<<0>>",[e]),lookbehind:!0,inside:{"format-string":{pattern:t("(^\\{(?:(?![}:])<<0>>)*)<<1>>(?=\\}$)",[n,S]),lookbehind:!0,inside:{punctuation:/^:/}},punctuation:/^\{|\}$/,expression:{pattern:/[\s\S]+/,alias:"language-csharp",inside:s.languages.csharp}}},string:/[\s\S]+/}}s.languages.insertBefore("csharp","string",{"interpolation-string":[{pattern:t('(^|[^\\\\])(?:\\$@|@\\$)"(?:""|\\\\[^]|\\{\\{|<<0>>|[^\\\\{"])*"',[A]),lookbehind:!0,greedy:!0,inside:U(A,j)},{pattern:t('(^|[^@\\\\])\\$"(?:\\\\.|\\{\\{|<<0>>|[^\\\\"{])*"',[P]),lookbehind:!0,greedy:!0,inside:U(P,F)}]}),s.languages.dotnet=s.languages.cs=s.languages.csharp}(Prism);
            \ No newline at end of file
            
            From 233415b8591d017f4639fa62465b69984eaf8de0 Mon Sep 17 00:00:00 2001
            From: Michael Schmidt 
            Date: Sun, 26 Sep 2021 12:32:49 +0200
            Subject: [PATCH 0914/1100] JQ: Improved performance of strings (#3084)
            
            ---
             components/prism-jq.js     | 4 +++-
             components/prism-jq.min.js | 2 +-
             2 files changed, 4 insertions(+), 2 deletions(-)
            
            diff --git a/components/prism-jq.js b/components/prism-jq.js
            index 0dba985c96..3cc030e72f 100644
            --- a/components/prism-jq.js
            +++ b/components/prism-jq.js
            @@ -1,7 +1,7 @@
             (function (Prism) {
             
             	var interpolation = /\\\((?:[^()]|\([^()]*\))*\)/.source;
            -	var string = RegExp(/"(?:[^"\r\n\\]|\\[^\r\n(]|__)*"/.source.replace(/__/g, function () { return interpolation; }));
            +	var string = RegExp(/(^|[^\\])"(?:[^"\r\n\\]|\\[^\r\n(]|__)*"/.source.replace(/__/g, function () { return interpolation; }));
             	var stringInterpolation = {
             		'interpolation': {
             			pattern: RegExp(/((?:^|[^\\])(?:\\{2})*)/.source + interpolation),
            @@ -21,11 +21,13 @@
             		'comment': /#.*/,
             		'property': {
             			pattern: RegExp(string.source + /(?=\s*:(?!:))/.source),
            +			lookbehind: true,
             			greedy: true,
             			inside: stringInterpolation
             		},
             		'string': {
             			pattern: string,
            +			lookbehind: true,
             			greedy: true,
             			inside: stringInterpolation
             		},
            diff --git a/components/prism-jq.min.js b/components/prism-jq.min.js
            index 89089d8cdb..e96a55f710 100644
            --- a/components/prism-jq.min.js
            +++ b/components/prism-jq.min.js
            @@ -1 +1 @@
            -!function(e){var n="\\\\\\((?:[^()]|\\([^()]*\\))*\\)",t=RegExp('"(?:[^"\r\n\\\\]|\\\\[^\r\n(]|__)*"'.replace(/__/g,function(){return n})),i={interpolation:{pattern:RegExp("((?:^|[^\\\\])(?:\\\\{2})*)"+n),lookbehind:!0,inside:{content:{pattern:/^(\\\()[\s\S]+(?=\)$)/,lookbehind:!0,inside:null},punctuation:/^\\\(|\)$/}}},a=e.languages.jq={comment:/#.*/,property:{pattern:RegExp(t.source+"(?=\\s*:(?!:))"),greedy:!0,inside:i},string:{pattern:t,greedy:!0,inside:i},function:{pattern:/(\bdef\s+)[a-z_]\w+/i,lookbehind:!0},variable:/\B\$\w+/,"property-literal":{pattern:/\b[a-z_]\w*(?=\s*:(?!:))/i,alias:"property"},keyword:/\b(?:as|break|catch|def|elif|else|end|foreach|if|import|include|label|module|modulemeta|null|reduce|then|try|while)\b/,boolean:/\b(?:false|true)\b/,number:/(?:\b\d+\.|\B\.)?\b\d+(?:[eE][+-]?\d+)?\b/,operator:[{pattern:/\|=?/,alias:"pipe"},/\.\.|[!=<>]?=|\?\/\/|\/\/=?|[-+*/%]=?|[<>?]|\b(?:and|not|or)\b/],"c-style-function":{pattern:/\b[a-z_]\w*(?=\s*\()/i,alias:"function"},punctuation:/::|[()\[\]{},:;]|\.(?=\s*[\[\w$])/,dot:{pattern:/\./,alias:"important"}};i.interpolation.inside.content.inside=a}(Prism);
            \ No newline at end of file
            +!function(e){var n="\\\\\\((?:[^()]|\\([^()]*\\))*\\)",t=RegExp('(^|[^\\\\])"(?:[^"\r\n\\\\]|\\\\[^\r\n(]|__)*"'.replace(/__/g,function(){return n})),i={interpolation:{pattern:RegExp("((?:^|[^\\\\])(?:\\\\{2})*)"+n),lookbehind:!0,inside:{content:{pattern:/^(\\\()[\s\S]+(?=\)$)/,lookbehind:!0,inside:null},punctuation:/^\\\(|\)$/}}},a=e.languages.jq={comment:/#.*/,property:{pattern:RegExp(t.source+"(?=\\s*:(?!:))"),lookbehind:!0,greedy:!0,inside:i},string:{pattern:t,lookbehind:!0,greedy:!0,inside:i},function:{pattern:/(\bdef\s+)[a-z_]\w+/i,lookbehind:!0},variable:/\B\$\w+/,"property-literal":{pattern:/\b[a-z_]\w*(?=\s*:(?!:))/i,alias:"property"},keyword:/\b(?:as|break|catch|def|elif|else|end|foreach|if|import|include|label|module|modulemeta|null|reduce|then|try|while)\b/,boolean:/\b(?:false|true)\b/,number:/(?:\b\d+\.|\B\.)?\b\d+(?:[eE][+-]?\d+)?\b/,operator:[{pattern:/\|=?/,alias:"pipe"},/\.\.|[!=<>]?=|\?\/\/|\/\/=?|[-+*/%]=?|[<>?]|\b(?:and|not|or)\b/],"c-style-function":{pattern:/\b[a-z_]\w*(?=\s*\()/i,alias:"function"},punctuation:/::|[()\[\]{},:;]|\.(?=\s*[\[\w$])/,dot:{pattern:/\./,alias:"important"}};i.interpolation.inside.content.inside=a}(Prism);
            \ No newline at end of file
            
            From 2f9672aa22576ab5e7c7d951e9c963f34763bbab Mon Sep 17 00:00:00 2001
            From: Michael Schmidt 
            Date: Sun, 26 Sep 2021 12:33:53 +0200
            Subject: [PATCH 0915/1100] Coq: Improved attribute pattern performance (#3085)
            
            ---
             components/prism-coq.js     | 2 +-
             components/prism-coq.min.js | 2 +-
             2 files changed, 2 insertions(+), 2 deletions(-)
            
            diff --git a/components/prism-coq.js b/components/prism-coq.js
            index 7b483bfcce..663ed9a5fa 100644
            --- a/components/prism-coq.js
            +++ b/components/prism-coq.js
            @@ -17,7 +17,7 @@
             		'attribute': [
             			{
             				pattern: RegExp(
            -					/#\[(?:[^\]("]|"(?:[^"]|"")*"(?!")|\((?!\*)|)*\]/.source
            +					/#\[(?:[^\[\]("]|"(?:[^"]|"")*"(?!")|\((?!\*)|)*\]/.source
             						.replace(//g, function () { return commentSource; })
             				),
             				greedy: true,
            diff --git a/components/prism-coq.min.js b/components/prism-coq.min.js
            index aeb32428c9..8b297f5f07 100644
            --- a/components/prism-coq.min.js
            +++ b/components/prism-coq.min.js
            @@ -1 +1 @@
            -!function(e){for(var t="\\(\\*(?:[^(*]|\\((?!\\*)|\\*(?!\\))|)*\\*\\)",i=0;i<2;i++)t=t.replace(//g,function(){return t});t=t.replace(//g,"[]"),e.languages.coq={comment:RegExp(t),string:{pattern:/"(?:[^"]|"")*"(?!")/,greedy:!0},attribute:[{pattern:RegExp('#\\[(?:[^\\]("]|"(?:[^"]|"")*"(?!")|\\((?!\\*)|)*\\]'.replace(//g,function(){return t})),greedy:!0,alias:"attr-name",inside:{comment:RegExp(t),string:{pattern:/"(?:[^"]|"")*"(?!")/,greedy:!0},operator:/=/,punctuation:/^#\[|\]$|[,()]/}},{pattern:/\b(?:Cumulative|Global|Local|Monomorphic|NonCumulative|Polymorphic|Private|Program)\b/,alias:"attr-name"}],keyword:/\b(?:Abort|About|Add|Admit|Admitted|All|Arguments|As|Assumptions|Axiom|Axioms|Back|BackTo|Backtrace|BinOp|BinOpSpec|BinRel|Bind|Blacklist|Canonical|Case|Cd|Check|Class|Classes|Close|CoFixpoint|CoInductive|Coercion|Coercions|Collection|Combined|Compute|Conjecture|Conjectures|Constant|Constants|Constraint|Constructors|Context|Corollary|Create|CstOp|Custom|Cut|Debug|Declare|Defined|Definition|Delimit|Dependencies|Dependent|Derive|Diffs|Drop|Elimination|End|Entry|Equality|Eval|Example|Existential|Existentials|Existing|Export|Extern|Extraction|Fact|Fail|Field|File|Firstorder|Fixpoint|Flags|Focus|From|Funclass|Function|Functional|GC|Generalizable|Goal|Grab|Grammar|Graph|Guarded|Haskell|Heap|Hide|Hint|HintDb|Hints|Hypotheses|Hypothesis|IF|Identity|Immediate|Implicit|Implicits|Import|Include|Induction|Inductive|Infix|Info|Initial|InjTyp|Inline|Inspect|Instance|Instances|Intro|Intros|Inversion|Inversion_clear|JSON|Language|Left|Lemma|Let|Lia|Libraries|Library|Load|LoadPath|Locate|Ltac|Ltac2|ML|Match|Method|Minimality|Module|Modules|Morphism|Next|NoInline|Notation|Number|OCaml|Obligation|Obligations|Opaque|Open|Optimize|Parameter|Parameters|Parametric|Path|Paths|Prenex|Preterm|Primitive|Print|Profile|Projections|Proof|Prop|PropBinOp|PropOp|PropUOp|Property|Proposition|Pwd|Qed|Quit|Rec|Record|Recursive|Redirect|Reduction|Register|Relation|Remark|Remove|Require|Reserved|Reset|Resolve|Restart|Rewrite|Right|Ring|Rings|SProp|Saturate|Save|Scheme|Scope|Scopes|Search|SearchHead|SearchPattern|SearchRewrite|Section|Separate|Set|Setoid|Show|Signatures|Solve|Solver|Sort|Sortclass|Sorted|Spec|Step|Strategies|Strategy|String|Structure|SubClass|Subgraph|SuchThat|Tactic|Term|TestCompile|Theorem|Time|Timeout|To|Transparent|Type|Typeclasses|Types|Typing|UnOp|UnOpSpec|Undelimit|Undo|Unfocus|Unfocused|Unfold|Universe|Universes|Unshelve|Variable|Variables|Variant|Verbose|View|Visibility|Zify|_|apply|as|at|by|cofix|else|end|exists|exists2|fix|for|forall|fun|if|in|let|match|measure|move|removed|return|struct|then|using|wf|where|with)\b/,number:/\b(?:0x[a-f0-9][a-f0-9_]*(?:\.[a-f0-9_]+)?(?:p[+-]?\d[\d_]*)?|\d[\d_]*(?:\.[\d_]+)?(?:e[+-]?\d[\d_]*)?)\b/i,punct:{pattern:/@\{|\{\||\[=|:>/,alias:"punctuation"},operator:/\/\\|\\\/|\.{2,3}|:{1,2}=|\*\*|[-=]>|<(?:->?|[+:=>]|<:)|>(?:=|->)|\|[-|]?|[-!%&*+/<=>?@^~']/,punctuation:/\.\(|`\(|@\{|`\{|\{\||\[=|:>|[:.,;(){}\[\]]/}}(Prism);
            \ No newline at end of file
            +!function(e){for(var t="\\(\\*(?:[^(*]|\\((?!\\*)|\\*(?!\\))|)*\\*\\)",i=0;i<2;i++)t=t.replace(//g,function(){return t});t=t.replace(//g,"[]"),e.languages.coq={comment:RegExp(t),string:{pattern:/"(?:[^"]|"")*"(?!")/,greedy:!0},attribute:[{pattern:RegExp('#\\[(?:[^\\[\\]("]|"(?:[^"]|"")*"(?!")|\\((?!\\*)|)*\\]'.replace(//g,function(){return t})),greedy:!0,alias:"attr-name",inside:{comment:RegExp(t),string:{pattern:/"(?:[^"]|"")*"(?!")/,greedy:!0},operator:/=/,punctuation:/^#\[|\]$|[,()]/}},{pattern:/\b(?:Cumulative|Global|Local|Monomorphic|NonCumulative|Polymorphic|Private|Program)\b/,alias:"attr-name"}],keyword:/\b(?:Abort|About|Add|Admit|Admitted|All|Arguments|As|Assumptions|Axiom|Axioms|Back|BackTo|Backtrace|BinOp|BinOpSpec|BinRel|Bind|Blacklist|Canonical|Case|Cd|Check|Class|Classes|Close|CoFixpoint|CoInductive|Coercion|Coercions|Collection|Combined|Compute|Conjecture|Conjectures|Constant|Constants|Constraint|Constructors|Context|Corollary|Create|CstOp|Custom|Cut|Debug|Declare|Defined|Definition|Delimit|Dependencies|Dependent|Derive|Diffs|Drop|Elimination|End|Entry|Equality|Eval|Example|Existential|Existentials|Existing|Export|Extern|Extraction|Fact|Fail|Field|File|Firstorder|Fixpoint|Flags|Focus|From|Funclass|Function|Functional|GC|Generalizable|Goal|Grab|Grammar|Graph|Guarded|Haskell|Heap|Hide|Hint|HintDb|Hints|Hypotheses|Hypothesis|IF|Identity|Immediate|Implicit|Implicits|Import|Include|Induction|Inductive|Infix|Info|Initial|InjTyp|Inline|Inspect|Instance|Instances|Intro|Intros|Inversion|Inversion_clear|JSON|Language|Left|Lemma|Let|Lia|Libraries|Library|Load|LoadPath|Locate|Ltac|Ltac2|ML|Match|Method|Minimality|Module|Modules|Morphism|Next|NoInline|Notation|Number|OCaml|Obligation|Obligations|Opaque|Open|Optimize|Parameter|Parameters|Parametric|Path|Paths|Prenex|Preterm|Primitive|Print|Profile|Projections|Proof|Prop|PropBinOp|PropOp|PropUOp|Property|Proposition|Pwd|Qed|Quit|Rec|Record|Recursive|Redirect|Reduction|Register|Relation|Remark|Remove|Require|Reserved|Reset|Resolve|Restart|Rewrite|Right|Ring|Rings|SProp|Saturate|Save|Scheme|Scope|Scopes|Search|SearchHead|SearchPattern|SearchRewrite|Section|Separate|Set|Setoid|Show|Signatures|Solve|Solver|Sort|Sortclass|Sorted|Spec|Step|Strategies|Strategy|String|Structure|SubClass|Subgraph|SuchThat|Tactic|Term|TestCompile|Theorem|Time|Timeout|To|Transparent|Type|Typeclasses|Types|Typing|UnOp|UnOpSpec|Undelimit|Undo|Unfocus|Unfocused|Unfold|Universe|Universes|Unshelve|Variable|Variables|Variant|Verbose|View|Visibility|Zify|_|apply|as|at|by|cofix|else|end|exists|exists2|fix|for|forall|fun|if|in|let|match|measure|move|removed|return|struct|then|using|wf|where|with)\b/,number:/\b(?:0x[a-f0-9][a-f0-9_]*(?:\.[a-f0-9_]+)?(?:p[+-]?\d[\d_]*)?|\d[\d_]*(?:\.[\d_]+)?(?:e[+-]?\d[\d_]*)?)\b/i,punct:{pattern:/@\{|\{\||\[=|:>/,alias:"punctuation"},operator:/\/\\|\\\/|\.{2,3}|:{1,2}=|\*\*|[-=]>|<(?:->?|[+:=>]|<:)|>(?:=|->)|\|[-|]?|[-!%&*+/<=>?@^~']/,punctuation:/\.\(|`\(|@\{|`\{|\{\||\[=|:>|[:.,;(){}\[\]]/}}(Prism);
            \ No newline at end of file
            
            From 0a313f4f9d38247812d41e99dffa120efcfdf623 Mon Sep 17 00:00:00 2001
            From: Michael Schmidt 
            Date: Sun, 26 Sep 2021 12:35:00 +0200
            Subject: [PATCH 0916/1100] TSX: Removed `parameter` token (#3090)
            
            ---
             components/prism-tsx.js            |  3 ++
             components/prism-tsx.min.js        |  2 +-
             tests/languages/tsx/issue2594.test | 84 +++++++++++++-----------------
             tests/languages/tsx/issue3089.test | 31 +++++++++++
             4 files changed, 72 insertions(+), 48 deletions(-)
             create mode 100644 tests/languages/tsx/issue3089.test
            
            diff --git a/components/prism-tsx.js b/components/prism-tsx.js
            index badc7a86bd..2bb2fdc9d6 100644
            --- a/components/prism-tsx.js
            +++ b/components/prism-tsx.js
            @@ -2,6 +2,9 @@
             	var typescript = Prism.util.clone(Prism.languages.typescript);
             	Prism.languages.tsx = Prism.languages.extend('jsx', typescript);
             
            +	// doesn't work with TS because TS is too complex
            +	delete Prism.languages.tsx['parameter'];
            +
             	// This will prevent collisions between TSX tags and TS generic types.
             	// Idea by https://github.com/karlhorky
             	// Discussion: https://github.com/PrismJS/prism/issues/2594#issuecomment-710666928
            diff --git a/components/prism-tsx.min.js b/components/prism-tsx.min.js
            index a20ba381c9..79b70fd034 100644
            --- a/components/prism-tsx.min.js
            +++ b/components/prism-tsx.min.js
            @@ -1 +1 @@
            -!function(a){var e=a.util.clone(a.languages.typescript);a.languages.tsx=a.languages.extend("jsx",e);var t=a.languages.tsx.tag;t.pattern=RegExp("(^|[^\\w$]|(?="]
            -	]],
            +	"event",
            +	["operator", ":"],
            +	" FormEvent",
            +	["operator", "<"],
            +	"HTMLFormElement",
            +	["operator", ">"],
             	["punctuation", ")"],
             	["punctuation", "{"],
            +
             	"\r\n  event",
             	["punctuation", "."],
             	["function", "preventDefault"],
             	["punctuation", "("],
             	["punctuation", ")"],
             	["punctuation", ";"],
            +
             	["punctuation", "}"],
             
             	["keyword", "function"],
             	["function", "handleChange"],
             	["punctuation", "("],
            -	["parameter", [
            -		"event",
            -		["operator", ":"],
            -		" ChangeEvent",
            -		["operator", "<"],
            -		"HTMLInputElement",
            -		["operator", ">"]
            -	]],
            +	"event",
            +	["operator", ":"],
            +	" ChangeEvent",
            +	["operator", "<"],
            +	"HTMLInputElement",
            +	["operator", ">"],
             	["punctuation", ")"],
             	["punctuation", "{"],
            +
             	["builtin", "console"],
             	["punctuation", "."],
             	["function", "log"],
            @@ -140,18 +133,18 @@ export default function Form() {
             	"value",
             	["punctuation", ")"],
             	["punctuation", ";"],
            +
             	["punctuation", "}"],
             
             	["keyword", "function"],
             	["function", "handleClick"],
             	["punctuation", "("],
            -	["parameter", [
            -		"event",
            -		["operator", ":"],
            -		" MouseEvent"
            -	]],
            +	"event",
            +	["operator", ":"],
            +	" MouseEvent",
             	["punctuation", ")"],
             	["punctuation", "{"],
            +
             	["builtin", "console"],
             	["punctuation", "."],
             	["function", "log"],
            @@ -161,6 +154,7 @@ export default function Form() {
             	"button",
             	["punctuation", ")"],
             	["punctuation", ";"],
            +
             	["punctuation", "}"],
             
             	["keyword", "export"],
            @@ -170,16 +164,16 @@ export default function Form() {
             	["punctuation", "("],
             	["punctuation", ")"],
             	["punctuation", "{"],
            +
             	["keyword", "return"],
             	["punctuation", "("],
            +
             	["tag", [
             		["tag", [
             			["punctuation", "<"],
             			"form"
             		]],
            -		["attr-name", [
            -			"onSubmit"
            -		]],
            +		["attr-name", ["onSubmit"]],
             		["script", [
             			["script-punctuation", "="],
             			["punctuation", "{"],
            @@ -194,18 +188,14 @@ export default function Form() {
             			["punctuation", "<"],
             			"input"
             		]],
            -		["attr-name", [
            -			"onChange"
            -		]],
            +		["attr-name", ["onChange"]],
             		["script", [
             			["script-punctuation", "="],
             			["punctuation", "{"],
             			"handleChange",
             			["punctuation", "}"]
             		]],
            -		["attr-name", [
            -			"placeholder"
            -		]],
            +		["attr-name", ["placeholder"]],
             		["attr-value", [
             			["punctuation", "="],
             			["punctuation", "\""],
            @@ -220,9 +210,7 @@ export default function Form() {
             			["punctuation", "<"],
             			"button"
             		]],
            -		["attr-name", [
            -			"onClick"
            -		]],
            +		["attr-name", ["onClick"]],
             		["script", [
             			["script-punctuation", "="],
             			["punctuation", "{"],
            @@ -246,7 +234,9 @@ export default function Form() {
             		]],
             		["punctuation", ">"]
             	]],
            +
             	["punctuation", ")"],
             	["punctuation", ";"],
            +
             	["punctuation", "}"]
            -]
            \ No newline at end of file
            +]
            diff --git a/tests/languages/tsx/issue3089.test b/tests/languages/tsx/issue3089.test
            new file mode 100644
            index 0000000000..02c2e728bb
            --- /dev/null
            +++ b/tests/languages/tsx/issue3089.test
            @@ -0,0 +1,31 @@
            +// react tsx
            +function log(msg: string): void {
            +  console.log(msg);
            +}
            +
            +----------------------------------------------------
            +
            +[
            +	["comment", "// react tsx"],
            +
            +	["keyword", "function"],
            +	["function", "log"],
            +	["punctuation", "("],
            +	"msg",
            +	["operator", ":"],
            +	["builtin", "string"],
            +	["punctuation", ")"],
            +	["operator", ":"],
            +	["keyword", "void"],
            +	["punctuation", "{"],
            +
            +	["builtin", "console"],
            +	["punctuation", "."],
            +	["function", "log"],
            +	["punctuation", "("],
            +	"msg",
            +	["punctuation", ")"],
            +	["punctuation", ";"],
            +
            +	["punctuation", "}"]
            +]
            
            From 8daebb4ab936c60a17f8e35f558e294ee6869974 Mon Sep 17 00:00:00 2001
            From: Valtteri Laitinen 
            Date: Mon, 27 Sep 2021 22:08:26 +0300
            Subject: [PATCH 0917/1100] Use tabs in `package(-lock).json` (#3098)
            
            ---
             package-lock.json | 17052 ++++++++++++++++++++++----------------------
             package.json      |   158 +-
             2 files changed, 8605 insertions(+), 8605 deletions(-)
            
            diff --git a/package-lock.json b/package-lock.json
            index 0f3e1c68aa..f03cb71685 100644
            --- a/package-lock.json
            +++ b/package-lock.json
            @@ -1,8528 +1,8528 @@
             {
            -  "name": "prismjs",
            -  "version": "1.25.0",
            -  "lockfileVersion": 1,
            -  "requires": true,
            -  "dependencies": {
            -    "@babel/code-frame": {
            -      "version": "7.12.11",
            -      "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.11.tgz",
            -      "integrity": "sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw==",
            -      "dev": true,
            -      "requires": {
            -        "@babel/highlight": "^7.10.4"
            -      }
            -    },
            -    "@babel/helper-validator-identifier": {
            -      "version": "7.12.11",
            -      "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.12.11.tgz",
            -      "integrity": "sha512-np/lG3uARFybkoHokJUmf1QfEvRVCPbmQeUQpKow5cQ3xWrV9i3rUHodKDJPQfTVX61qKi+UdYk8kik84n7XOw==",
            -      "dev": true
            -    },
            -    "@babel/highlight": {
            -      "version": "7.13.10",
            -      "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.13.10.tgz",
            -      "integrity": "sha512-5aPpe5XQPzflQrFwL1/QoeHkP2MsA4JCntcXHRhEsdsfPVkvPi2w7Qix4iV7t5S/oC9OodGrggd8aco1g3SZFg==",
            -      "dev": true,
            -      "requires": {
            -        "@babel/helper-validator-identifier": "^7.12.11",
            -        "chalk": "^2.0.0",
            -        "js-tokens": "^4.0.0"
            -      }
            -    },
            -    "@babel/parser": {
            -      "version": "7.10.3",
            -      "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.10.3.tgz",
            -      "integrity": "sha512-oJtNJCMFdIMwXGmx+KxuaD7i3b8uS7TTFYW/FNG2BT8m+fmGHoiPYoH0Pe3gya07WuFmM5FCDIr1x0irkD/hyA==",
            -      "dev": true
            -    },
            -    "@babel/polyfill": {
            -      "version": "7.12.1",
            -      "resolved": "https://registry.npmjs.org/@babel/polyfill/-/polyfill-7.12.1.tgz",
            -      "integrity": "sha512-X0pi0V6gxLi6lFZpGmeNa4zxtwEmCs42isWLNjZZDE0Y8yVfgu0T2OAHlzBbdYlqbW/YXVvoBHpATEM+goCj8g==",
            -      "dev": true,
            -      "requires": {
            -        "core-js": "^2.6.5",
            -        "regenerator-runtime": "^0.13.4"
            -      }
            -    },
            -    "@eslint/eslintrc": {
            -      "version": "0.4.0",
            -      "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.4.0.tgz",
            -      "integrity": "sha512-2ZPCc+uNbjV5ERJr+aKSPRwZgKd2z11x0EgLvb1PURmUrn9QNRXFqje0Ldq454PfAVyaJYyrDvvIKSFP4NnBog==",
            -      "dev": true,
            -      "requires": {
            -        "ajv": "^6.12.4",
            -        "debug": "^4.1.1",
            -        "espree": "^7.3.0",
            -        "globals": "^12.1.0",
            -        "ignore": "^4.0.6",
            -        "import-fresh": "^3.2.1",
            -        "js-yaml": "^3.13.1",
            -        "minimatch": "^3.0.4",
            -        "strip-json-comments": "^3.1.1"
            -      },
            -      "dependencies": {
            -        "ajv": {
            -          "version": "6.12.6",
            -          "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz",
            -          "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==",
            -          "dev": true,
            -          "requires": {
            -            "fast-deep-equal": "^3.1.1",
            -            "fast-json-stable-stringify": "^2.0.0",
            -            "json-schema-traverse": "^0.4.1",
            -            "uri-js": "^4.2.2"
            -          }
            -        },
            -        "debug": {
            -          "version": "4.3.1",
            -          "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz",
            -          "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==",
            -          "dev": true,
            -          "requires": {
            -            "ms": "2.1.2"
            -          }
            -        },
            -        "fast-deep-equal": {
            -          "version": "3.1.3",
            -          "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
            -          "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==",
            -          "dev": true
            -        },
            -        "globals": {
            -          "version": "12.4.0",
            -          "resolved": "https://registry.npmjs.org/globals/-/globals-12.4.0.tgz",
            -          "integrity": "sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg==",
            -          "dev": true,
            -          "requires": {
            -            "type-fest": "^0.8.1"
            -          }
            -        },
            -        "import-fresh": {
            -          "version": "3.3.0",
            -          "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz",
            -          "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==",
            -          "dev": true,
            -          "requires": {
            -            "parent-module": "^1.0.0",
            -            "resolve-from": "^4.0.0"
            -          }
            -        },
            -        "ms": {
            -          "version": "2.1.2",
            -          "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
            -          "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
            -          "dev": true
            -        },
            -        "resolve-from": {
            -          "version": "4.0.0",
            -          "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz",
            -          "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==",
            -          "dev": true
            -        },
            -        "strip-json-comments": {
            -          "version": "3.1.1",
            -          "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz",
            -          "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==",
            -          "dev": true
            -        }
            -      }
            -    },
            -    "@mrmlnc/readdir-enhanced": {
            -      "version": "2.2.1",
            -      "resolved": "https://registry.npmjs.org/@mrmlnc/readdir-enhanced/-/readdir-enhanced-2.2.1.tgz",
            -      "integrity": "sha512-bPHp6Ji8b41szTOcaP63VlnbbO5Ny6dwAATtY6JTjh5N2OLrb5Qk/Th5cRkRQhkWCt+EJsYrNB0MiL+Gpn6e3g==",
            -      "dev": true,
            -      "requires": {
            -        "call-me-maybe": "^1.0.1",
            -        "glob-to-regexp": "^0.3.0"
            -      }
            -    },
            -    "@nodelib/fs.stat": {
            -      "version": "1.1.3",
            -      "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-1.1.3.tgz",
            -      "integrity": "sha512-shAmDyaQC4H92APFoIaVDHCx5bStIocgvbwQyxPRrbUY20V1EYTbSDchWbuwlMG3V17cprZhA6+78JfB+3DTPw==",
            -      "dev": true
            -    },
            -    "@octokit/auth-token": {
            -      "version": "2.4.2",
            -      "resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-2.4.2.tgz",
            -      "integrity": "sha512-jE/lE/IKIz2v1+/P0u4fJqv0kYwXOTujKemJMFr6FeopsxlIK3+wKDCJGnysg81XID5TgZQbIfuJ5J0lnTiuyQ==",
            -      "dev": true,
            -      "requires": {
            -        "@octokit/types": "^5.0.0"
            -      }
            -    },
            -    "@octokit/endpoint": {
            -      "version": "6.0.8",
            -      "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-6.0.8.tgz",
            -      "integrity": "sha512-MuRrgv+bM4Q+e9uEvxAB/Kf+Sj0O2JAOBA131uo1o6lgdq1iS8ejKwtqHgdfY91V3rN9R/hdGKFiQYMzVzVBEQ==",
            -      "dev": true,
            -      "requires": {
            -        "@octokit/types": "^5.0.0",
            -        "is-plain-object": "^5.0.0",
            -        "universal-user-agent": "^6.0.0"
            -      },
            -      "dependencies": {
            -        "is-plain-object": {
            -          "version": "5.0.0",
            -          "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz",
            -          "integrity": "sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==",
            -          "dev": true
            -        },
            -        "universal-user-agent": {
            -          "version": "6.0.0",
            -          "resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-6.0.0.tgz",
            -          "integrity": "sha512-isyNax3wXoKaulPDZWHQqbmIx1k2tb9fb3GGDBRxCscfYV2Ch7WxPArBsFEG8s/safwXTT7H4QGhaIkTp9447w==",
            -          "dev": true
            -        }
            -      }
            -    },
            -    "@octokit/plugin-paginate-rest": {
            -      "version": "1.1.2",
            -      "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-1.1.2.tgz",
            -      "integrity": "sha512-jbsSoi5Q1pj63sC16XIUboklNw+8tL9VOnJsWycWYR78TKss5PVpIPb1TUUcMQ+bBh7cY579cVAWmf5qG+dw+Q==",
            -      "dev": true,
            -      "requires": {
            -        "@octokit/types": "^2.0.1"
            -      },
            -      "dependencies": {
            -        "@octokit/types": {
            -          "version": "2.16.2",
            -          "resolved": "https://registry.npmjs.org/@octokit/types/-/types-2.16.2.tgz",
            -          "integrity": "sha512-O75k56TYvJ8WpAakWwYRN8Bgu60KrmX0z1KqFp1kNiFNkgW+JW+9EBKZ+S33PU6SLvbihqd+3drvPxKK68Ee8Q==",
            -          "dev": true,
            -          "requires": {
            -            "@types/node": ">= 8"
            -          }
            -        }
            -      }
            -    },
            -    "@octokit/plugin-request-log": {
            -      "version": "1.0.2",
            -      "resolved": "https://registry.npmjs.org/@octokit/plugin-request-log/-/plugin-request-log-1.0.2.tgz",
            -      "integrity": "sha512-oTJSNAmBqyDR41uSMunLQKMX0jmEXbwD1fpz8FG27lScV3RhtGfBa1/BBLym+PxcC16IBlF7KH9vP1BUYxA+Eg==",
            -      "dev": true
            -    },
            -    "@octokit/plugin-rest-endpoint-methods": {
            -      "version": "2.4.0",
            -      "resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-2.4.0.tgz",
            -      "integrity": "sha512-EZi/AWhtkdfAYi01obpX0DF7U6b1VRr30QNQ5xSFPITMdLSfhcBqjamE3F+sKcxPbD7eZuMHu3Qkk2V+JGxBDQ==",
            -      "dev": true,
            -      "requires": {
            -        "@octokit/types": "^2.0.1",
            -        "deprecation": "^2.3.1"
            -      },
            -      "dependencies": {
            -        "@octokit/types": {
            -          "version": "2.16.2",
            -          "resolved": "https://registry.npmjs.org/@octokit/types/-/types-2.16.2.tgz",
            -          "integrity": "sha512-O75k56TYvJ8WpAakWwYRN8Bgu60KrmX0z1KqFp1kNiFNkgW+JW+9EBKZ+S33PU6SLvbihqd+3drvPxKK68Ee8Q==",
            -          "dev": true,
            -          "requires": {
            -            "@types/node": ">= 8"
            -          }
            -        }
            -      }
            -    },
            -    "@octokit/request": {
            -      "version": "5.4.9",
            -      "resolved": "https://registry.npmjs.org/@octokit/request/-/request-5.4.9.tgz",
            -      "integrity": "sha512-CzwVvRyimIM1h2n9pLVYfTDmX9m+KHSgCpqPsY8F1NdEK8IaWqXhSBXsdjOBFZSpEcxNEeg4p0UO9cQ8EnOCLA==",
            -      "dev": true,
            -      "requires": {
            -        "@octokit/endpoint": "^6.0.1",
            -        "@octokit/request-error": "^2.0.0",
            -        "@octokit/types": "^5.0.0",
            -        "deprecation": "^2.0.0",
            -        "is-plain-object": "^5.0.0",
            -        "node-fetch": "^2.6.1",
            -        "once": "^1.4.0",
            -        "universal-user-agent": "^6.0.0"
            -      },
            -      "dependencies": {
            -        "@octokit/request-error": {
            -          "version": "2.0.2",
            -          "resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-2.0.2.tgz",
            -          "integrity": "sha512-2BrmnvVSV1MXQvEkrb9zwzP0wXFNbPJij922kYBTLIlIafukrGOb+ABBT2+c6wZiuyWDH1K1zmjGQ0toN/wMWw==",
            -          "dev": true,
            -          "requires": {
            -            "@octokit/types": "^5.0.1",
            -            "deprecation": "^2.0.0",
            -            "once": "^1.4.0"
            -          }
            -        },
            -        "is-plain-object": {
            -          "version": "5.0.0",
            -          "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz",
            -          "integrity": "sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==",
            -          "dev": true
            -        },
            -        "universal-user-agent": {
            -          "version": "6.0.0",
            -          "resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-6.0.0.tgz",
            -          "integrity": "sha512-isyNax3wXoKaulPDZWHQqbmIx1k2tb9fb3GGDBRxCscfYV2Ch7WxPArBsFEG8s/safwXTT7H4QGhaIkTp9447w==",
            -          "dev": true
            -        }
            -      }
            -    },
            -    "@octokit/request-error": {
            -      "version": "1.2.1",
            -      "resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-1.2.1.tgz",
            -      "integrity": "sha512-+6yDyk1EES6WK+l3viRDElw96MvwfJxCt45GvmjDUKWjYIb3PJZQkq3i46TwGwoPD4h8NmTrENmtyA1FwbmhRA==",
            -      "dev": true,
            -      "requires": {
            -        "@octokit/types": "^2.0.0",
            -        "deprecation": "^2.0.0",
            -        "once": "^1.4.0"
            -      },
            -      "dependencies": {
            -        "@octokit/types": {
            -          "version": "2.16.2",
            -          "resolved": "https://registry.npmjs.org/@octokit/types/-/types-2.16.2.tgz",
            -          "integrity": "sha512-O75k56TYvJ8WpAakWwYRN8Bgu60KrmX0z1KqFp1kNiFNkgW+JW+9EBKZ+S33PU6SLvbihqd+3drvPxKK68Ee8Q==",
            -          "dev": true,
            -          "requires": {
            -            "@types/node": ">= 8"
            -          }
            -        }
            -      }
            -    },
            -    "@octokit/rest": {
            -      "version": "16.43.2",
            -      "resolved": "https://registry.npmjs.org/@octokit/rest/-/rest-16.43.2.tgz",
            -      "integrity": "sha512-ngDBevLbBTFfrHZeiS7SAMAZ6ssuVmXuya+F/7RaVvlysgGa1JKJkKWY+jV6TCJYcW0OALfJ7nTIGXcBXzycfQ==",
            -      "dev": true,
            -      "requires": {
            -        "@octokit/auth-token": "^2.4.0",
            -        "@octokit/plugin-paginate-rest": "^1.1.1",
            -        "@octokit/plugin-request-log": "^1.0.0",
            -        "@octokit/plugin-rest-endpoint-methods": "2.4.0",
            -        "@octokit/request": "^5.2.0",
            -        "@octokit/request-error": "^1.0.2",
            -        "atob-lite": "^2.0.0",
            -        "before-after-hook": "^2.0.0",
            -        "btoa-lite": "^1.0.0",
            -        "deprecation": "^2.0.0",
            -        "lodash.get": "^4.4.2",
            -        "lodash.set": "^4.3.2",
            -        "lodash.uniq": "^4.5.0",
            -        "octokit-pagination-methods": "^1.1.0",
            -        "once": "^1.4.0",
            -        "universal-user-agent": "^4.0.0"
            -      }
            -    },
            -    "@octokit/types": {
            -      "version": "5.5.0",
            -      "resolved": "https://registry.npmjs.org/@octokit/types/-/types-5.5.0.tgz",
            -      "integrity": "sha512-UZ1pErDue6bZNjYOotCNveTXArOMZQFG6hKJfOnGnulVCMcVVi7YIIuuR4WfBhjo7zgpmzn/BkPDnUXtNx+PcQ==",
            -      "dev": true,
            -      "requires": {
            -        "@types/node": ">= 8"
            -      }
            -    },
            -    "@types/events": {
            -      "version": "3.0.0",
            -      "resolved": "https://registry.npmjs.org/@types/events/-/events-3.0.0.tgz",
            -      "integrity": "sha512-EaObqwIvayI5a8dCzhFrjKzVwKLxjoG9T6Ppd5CEo07LRKfQ8Yokw54r5+Wq7FaBQ+yXRvQAYPrHwya1/UFt9g==",
            -      "dev": true
            -    },
            -    "@types/glob": {
            -      "version": "7.1.1",
            -      "resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.1.1.tgz",
            -      "integrity": "sha512-1Bh06cbWJUHMC97acuD6UMG29nMt0Aqz1vF3guLfG+kHHJhy3AyohZFFxYk2f7Q1SQIrNwvncxAE0N/9s70F2w==",
            -      "dev": true,
            -      "requires": {
            -        "@types/events": "*",
            -        "@types/minimatch": "*",
            -        "@types/node": "*"
            -      }
            -    },
            -    "@types/minimatch": {
            -      "version": "3.0.3",
            -      "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.3.tgz",
            -      "integrity": "sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA==",
            -      "dev": true
            -    },
            -    "@types/node": {
            -      "version": "12.0.2",
            -      "resolved": "https://registry.npmjs.org/@types/node/-/node-12.0.2.tgz",
            -      "integrity": "sha512-5tabW/i+9mhrfEOUcLDu2xBPsHJ+X5Orqy9FKpale3SjDA17j5AEpYq5vfy3oAeAHGcvANRCO3NV3d2D6q3NiA==",
            -      "dev": true
            -    },
            -    "@types/node-fetch": {
            -      "version": "2.5.7",
            -      "resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.5.7.tgz",
            -      "integrity": "sha512-o2WVNf5UhWRkxlf6eq+jMZDu7kjgpgJfl4xVNlvryc95O/6F2ld8ztKX+qu+Rjyet93WAWm5LjeX9H5FGkODvw==",
            -      "dev": true,
            -      "requires": {
            -        "@types/node": "*",
            -        "form-data": "^3.0.0"
            -      },
            -      "dependencies": {
            -        "combined-stream": {
            -          "version": "1.0.8",
            -          "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
            -          "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
            -          "dev": true,
            -          "requires": {
            -            "delayed-stream": "~1.0.0"
            -          }
            -        },
            -        "form-data": {
            -          "version": "3.0.0",
            -          "resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.0.tgz",
            -          "integrity": "sha512-CKMFDglpbMi6PyN+brwB9Q/GOw0eAnsrEZDgcsH5Krhz5Od/haKHAX0NmQfha2zPPz0JpWzA7GJHGSnvCRLWsg==",
            -          "dev": true,
            -          "requires": {
            -            "asynckit": "^0.4.0",
            -            "combined-stream": "^1.0.8",
            -            "mime-types": "^2.1.12"
            -          }
            -        }
            -      }
            -    },
            -    "a-sync-waterfall": {
            -      "version": "1.0.1",
            -      "resolved": "https://registry.npmjs.org/a-sync-waterfall/-/a-sync-waterfall-1.0.1.tgz",
            -      "integrity": "sha512-RYTOHHdWipFUliRFMCS4X2Yn2X8M87V/OpSqWzKKOGhzqyUxzyVmhHDH9sAvG+ZuQf/TAOFsLCpMw09I1ufUnA==",
            -      "dev": true
            -    },
            -    "abab": {
            -      "version": "2.0.0",
            -      "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.0.tgz",
            -      "integrity": "sha512-sY5AXXVZv4Y1VACTtR11UJCPHHudgY5i26Qj5TypE6DKlIApbwb5uqhXcJ5UUGbvZNRh7EeIoW+LrJumBsKp7w==",
            -      "dev": true
            -    },
            -    "abort-controller": {
            -      "version": "3.0.0",
            -      "resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz",
            -      "integrity": "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==",
            -      "dev": true,
            -      "requires": {
            -        "event-target-shim": "^5.0.0"
            -      }
            -    },
            -    "acorn": {
            -      "version": "6.4.1",
            -      "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.4.1.tgz",
            -      "integrity": "sha512-ZVA9k326Nwrj3Cj9jlh3wGFutC2ZornPNARZwsNYqQYgN0EsV2d53w5RN/co65Ohn4sUAUtb1rSUAOD6XN9idA==",
            -      "dev": true
            -    },
            -    "acorn-globals": {
            -      "version": "4.3.0",
            -      "resolved": "https://registry.npmjs.org/acorn-globals/-/acorn-globals-4.3.0.tgz",
            -      "integrity": "sha512-hMtHj3s5RnuhvHPowpBYvJVj3rAar82JiDQHvGs1zO0l10ocX/xEdBShNHTJaboucJUsScghp74pH3s7EnHHQw==",
            -      "dev": true,
            -      "requires": {
            -        "acorn": "^6.0.1",
            -        "acorn-walk": "^6.0.1"
            -      }
            -    },
            -    "acorn-jsx": {
            -      "version": "5.3.1",
            -      "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.1.tgz",
            -      "integrity": "sha512-K0Ptm/47OKfQRpNQ2J/oIN/3QYiK6FwW+eJbILhsdxh2WTLdl+30o8aGdTbm5JbffpFFAg/g+zi1E+jvJha5ng==",
            -      "dev": true
            -    },
            -    "acorn-walk": {
            -      "version": "6.1.1",
            -      "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-6.1.1.tgz",
            -      "integrity": "sha512-OtUw6JUTgxA2QoqqmrmQ7F2NYqiBPi/L2jqHyFtllhOUvXYQXf0Z1CYUinIfyT4bTCGmrA7gX9FvHA81uzCoVw==",
            -      "dev": true
            -    },
            -    "agent-base": {
            -      "version": "4.3.0",
            -      "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-4.3.0.tgz",
            -      "integrity": "sha512-salcGninV0nPrwpGNn4VTXBb1SOuXQBiqbrNXoeizJsHrsL6ERFM2Ne3JUSBWRE6aeNJI2ROP/WEEIDUiDe3cg==",
            -      "dev": true,
            -      "requires": {
            -        "es6-promisify": "^5.0.0"
            -      }
            -    },
            -    "ajv": {
            -      "version": "6.10.0",
            -      "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.10.0.tgz",
            -      "integrity": "sha512-nffhOpkymDECQyR0mnsUtoCE8RlX38G0rYP+wgLWFyZuUyuuojSSvi/+euOiQBIn63whYwYVIIH1TvE3tu4OEg==",
            -      "dev": true,
            -      "requires": {
            -        "fast-deep-equal": "^2.0.1",
            -        "fast-json-stable-stringify": "^2.0.0",
            -        "json-schema-traverse": "^0.4.1",
            -        "uri-js": "^4.2.2"
            -      }
            -    },
            -    "ansi-colors": {
            -      "version": "1.1.0",
            -      "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-1.1.0.tgz",
            -      "integrity": "sha512-SFKX67auSNoVR38N3L+nvsPjOE0bybKTYbkf5tRvushrAPQ9V75huw0ZxBkKVeRU9kqH3d6HA4xTckbwZ4ixmA==",
            -      "dev": true,
            -      "requires": {
            -        "ansi-wrap": "^0.1.0"
            -      }
            -    },
            -    "ansi-gray": {
            -      "version": "0.1.1",
            -      "resolved": "https://registry.npmjs.org/ansi-gray/-/ansi-gray-0.1.1.tgz",
            -      "integrity": "sha1-KWLPVOyXksSFEKPetSRDaGHvclE=",
            -      "dev": true,
            -      "requires": {
            -        "ansi-wrap": "0.1.0"
            -      }
            -    },
            -    "ansi-regex": {
            -      "version": "2.1.1",
            -      "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
            -      "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=",
            -      "dev": true
            -    },
            -    "ansi-styles": {
            -      "version": "3.2.1",
            -      "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
            -      "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
            -      "dev": true,
            -      "requires": {
            -        "color-convert": "^1.9.0"
            -      }
            -    },
            -    "ansi-wrap": {
            -      "version": "0.1.0",
            -      "resolved": "https://registry.npmjs.org/ansi-wrap/-/ansi-wrap-0.1.0.tgz",
            -      "integrity": "sha1-qCJQ3bABXponyoLoLqYDu/pF768=",
            -      "dev": true
            -    },
            -    "anymatch": {
            -      "version": "2.0.0",
            -      "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz",
            -      "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==",
            -      "dev": true,
            -      "requires": {
            -        "micromatch": "^3.1.4",
            -        "normalize-path": "^2.1.1"
            -      }
            -    },
            -    "append-buffer": {
            -      "version": "1.0.2",
            -      "resolved": "https://registry.npmjs.org/append-buffer/-/append-buffer-1.0.2.tgz",
            -      "integrity": "sha1-2CIM9GYIFSXv6lBhTz3mUU36WPE=",
            -      "dev": true,
            -      "requires": {
            -        "buffer-equal": "^1.0.0"
            -      }
            -    },
            -    "archy": {
            -      "version": "1.0.0",
            -      "resolved": "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz",
            -      "integrity": "sha1-+cjBN1fMHde8N5rHeyxipcKGjEA=",
            -      "dev": true
            -    },
            -    "argparse": {
            -      "version": "1.0.10",
            -      "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz",
            -      "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==",
            -      "dev": true,
            -      "requires": {
            -        "sprintf-js": "~1.0.2"
            -      }
            -    },
            -    "arr-diff": {
            -      "version": "4.0.0",
            -      "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz",
            -      "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=",
            -      "dev": true
            -    },
            -    "arr-filter": {
            -      "version": "1.1.2",
            -      "resolved": "https://registry.npmjs.org/arr-filter/-/arr-filter-1.1.2.tgz",
            -      "integrity": "sha1-Q/3d0JHo7xGqTEXZzcGOLf8XEe4=",
            -      "dev": true,
            -      "requires": {
            -        "make-iterator": "^1.0.0"
            -      }
            -    },
            -    "arr-flatten": {
            -      "version": "1.1.0",
            -      "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz",
            -      "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==",
            -      "dev": true
            -    },
            -    "arr-map": {
            -      "version": "2.0.2",
            -      "resolved": "https://registry.npmjs.org/arr-map/-/arr-map-2.0.2.tgz",
            -      "integrity": "sha1-Onc0X/wc814qkYJWAfnljy4kysQ=",
            -      "dev": true,
            -      "requires": {
            -        "make-iterator": "^1.0.0"
            -      }
            -    },
            -    "arr-union": {
            -      "version": "3.1.0",
            -      "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz",
            -      "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=",
            -      "dev": true
            -    },
            -    "array-each": {
            -      "version": "1.0.1",
            -      "resolved": "https://registry.npmjs.org/array-each/-/array-each-1.0.1.tgz",
            -      "integrity": "sha1-p5SvDAWrF1KEbudTofIRoFugxE8=",
            -      "dev": true
            -    },
            -    "array-equal": {
            -      "version": "1.0.0",
            -      "resolved": "https://registry.npmjs.org/array-equal/-/array-equal-1.0.0.tgz",
            -      "integrity": "sha1-jCpe8kcv2ep0KwTHenUJO6J1fJM=",
            -      "dev": true
            -    },
            -    "array-find-index": {
            -      "version": "1.0.2",
            -      "resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz",
            -      "integrity": "sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E=",
            -      "dev": true
            -    },
            -    "array-initial": {
            -      "version": "1.1.0",
            -      "resolved": "https://registry.npmjs.org/array-initial/-/array-initial-1.1.0.tgz",
            -      "integrity": "sha1-L6dLJnOTccOUe9enrcc74zSz15U=",
            -      "dev": true,
            -      "requires": {
            -        "array-slice": "^1.0.0",
            -        "is-number": "^4.0.0"
            -      },
            -      "dependencies": {
            -        "is-number": {
            -          "version": "4.0.0",
            -          "resolved": "https://registry.npmjs.org/is-number/-/is-number-4.0.0.tgz",
            -          "integrity": "sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ==",
            -          "dev": true
            -        }
            -      }
            -    },
            -    "array-last": {
            -      "version": "1.3.0",
            -      "resolved": "https://registry.npmjs.org/array-last/-/array-last-1.3.0.tgz",
            -      "integrity": "sha512-eOCut5rXlI6aCOS7Z7kCplKRKyiFQ6dHFBem4PwlwKeNFk2/XxTrhRh5T9PyaEWGy/NHTZWbY+nsZlNFJu9rYg==",
            -      "dev": true,
            -      "requires": {
            -        "is-number": "^4.0.0"
            -      },
            -      "dependencies": {
            -        "is-number": {
            -          "version": "4.0.0",
            -          "resolved": "https://registry.npmjs.org/is-number/-/is-number-4.0.0.tgz",
            -          "integrity": "sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ==",
            -          "dev": true
            -        }
            -      }
            -    },
            -    "array-slice": {
            -      "version": "1.1.0",
            -      "resolved": "https://registry.npmjs.org/array-slice/-/array-slice-1.1.0.tgz",
            -      "integrity": "sha512-B1qMD3RBP7O8o0H2KbrXDyB0IccejMF15+87Lvlor12ONPRHP6gTjXMNkt/d3ZuOGbAe66hFmaCfECI24Ufp6w==",
            -      "dev": true
            -    },
            -    "array-sort": {
            -      "version": "1.0.0",
            -      "resolved": "https://registry.npmjs.org/array-sort/-/array-sort-1.0.0.tgz",
            -      "integrity": "sha512-ihLeJkonmdiAsD7vpgN3CRcx2J2S0TiYW+IS/5zHBI7mKUq3ySvBdzzBfD236ubDBQFiiyG3SWCPc+msQ9KoYg==",
            -      "dev": true,
            -      "requires": {
            -        "default-compare": "^1.0.0",
            -        "get-value": "^2.0.6",
            -        "kind-of": "^5.0.2"
            -      },
            -      "dependencies": {
            -        "kind-of": {
            -          "version": "5.1.0",
            -          "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz",
            -          "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==",
            -          "dev": true
            -        }
            -      }
            -    },
            -    "array-union": {
            -      "version": "1.0.2",
            -      "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz",
            -      "integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=",
            -      "dev": true,
            -      "requires": {
            -        "array-uniq": "^1.0.1"
            -      }
            -    },
            -    "array-uniq": {
            -      "version": "1.0.3",
            -      "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz",
            -      "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=",
            -      "dev": true
            -    },
            -    "array-unique": {
            -      "version": "0.3.2",
            -      "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz",
            -      "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=",
            -      "dev": true
            -    },
            -    "arrify": {
            -      "version": "1.0.1",
            -      "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz",
            -      "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=",
            -      "dev": true
            -    },
            -    "asap": {
            -      "version": "2.0.6",
            -      "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz",
            -      "integrity": "sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY=",
            -      "dev": true
            -    },
            -    "asn1": {
            -      "version": "0.2.4",
            -      "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz",
            -      "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==",
            -      "dev": true,
            -      "requires": {
            -        "safer-buffer": "~2.1.0"
            -      }
            -    },
            -    "assert-plus": {
            -      "version": "1.0.0",
            -      "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz",
            -      "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=",
            -      "dev": true
            -    },
            -    "assertion-error": {
            -      "version": "1.1.0",
            -      "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz",
            -      "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==",
            -      "dev": true
            -    },
            -    "assign-symbols": {
            -      "version": "1.0.0",
            -      "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz",
            -      "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=",
            -      "dev": true
            -    },
            -    "astral-regex": {
            -      "version": "2.0.0",
            -      "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz",
            -      "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==",
            -      "dev": true
            -    },
            -    "async": {
            -      "version": "2.6.3",
            -      "resolved": "https://registry.npmjs.org/async/-/async-2.6.3.tgz",
            -      "integrity": "sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg==",
            -      "dev": true,
            -      "requires": {
            -        "lodash": "^4.17.14"
            -      }
            -    },
            -    "async-done": {
            -      "version": "1.3.2",
            -      "resolved": "https://registry.npmjs.org/async-done/-/async-done-1.3.2.tgz",
            -      "integrity": "sha512-uYkTP8dw2og1tu1nmza1n1CMW0qb8gWWlwqMmLb7MhBVs4BXrFziT6HXUd+/RlRA/i4H9AkofYloUbs1fwMqlw==",
            -      "dev": true,
            -      "requires": {
            -        "end-of-stream": "^1.1.0",
            -        "once": "^1.3.2",
            -        "process-nextick-args": "^2.0.0",
            -        "stream-exhaust": "^1.0.1"
            -      }
            -    },
            -    "async-each": {
            -      "version": "1.0.3",
            -      "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.3.tgz",
            -      "integrity": "sha512-z/WhQ5FPySLdvREByI2vZiTWwCnF0moMJ1hK9YQwDTHKh6I7/uSckMetoRGb5UBZPC1z0jlw+n/XCgjeH7y1AQ==",
            -      "dev": true
            -    },
            -    "async-limiter": {
            -      "version": "1.0.0",
            -      "resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.0.tgz",
            -      "integrity": "sha512-jp/uFnooOiO+L211eZOoSyzpOITMXx1rBITauYykG3BRYPu8h0UcxsPNB04RR5vo4Tyz3+ay17tR6JVf9qzYWg==",
            -      "dev": true
            -    },
            -    "async-retry": {
            -      "version": "1.2.3",
            -      "resolved": "https://registry.npmjs.org/async-retry/-/async-retry-1.2.3.tgz",
            -      "integrity": "sha512-tfDb02Th6CE6pJUF2gjW5ZVjsgwlucVXOEQMvEX9JgSJMs9gAX+Nz3xRuJBKuUYjTSYORqvDBORdAQ3LU59g7Q==",
            -      "dev": true,
            -      "requires": {
            -        "retry": "0.12.0"
            -      }
            -    },
            -    "async-settle": {
            -      "version": "1.0.0",
            -      "resolved": "https://registry.npmjs.org/async-settle/-/async-settle-1.0.0.tgz",
            -      "integrity": "sha1-HQqRS7Aldb7IqPOnTlCA9yssDGs=",
            -      "dev": true,
            -      "requires": {
            -        "async-done": "^1.2.2"
            -      }
            -    },
            -    "asynckit": {
            -      "version": "0.4.0",
            -      "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
            -      "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=",
            -      "dev": true
            -    },
            -    "atob": {
            -      "version": "2.1.2",
            -      "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz",
            -      "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==",
            -      "dev": true
            -    },
            -    "atob-lite": {
            -      "version": "2.0.0",
            -      "resolved": "https://registry.npmjs.org/atob-lite/-/atob-lite-2.0.0.tgz",
            -      "integrity": "sha1-D+9a1G8b16hQLGVyfwNn1e5D1pY=",
            -      "dev": true
            -    },
            -    "aws-sign2": {
            -      "version": "0.7.0",
            -      "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz",
            -      "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=",
            -      "dev": true
            -    },
            -    "aws4": {
            -      "version": "1.8.0",
            -      "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.8.0.tgz",
            -      "integrity": "sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ==",
            -      "dev": true
            -    },
            -    "bach": {
            -      "version": "1.2.0",
            -      "resolved": "https://registry.npmjs.org/bach/-/bach-1.2.0.tgz",
            -      "integrity": "sha1-Szzpa/JxNPeaG0FKUcFONMO9mIA=",
            -      "dev": true,
            -      "requires": {
            -        "arr-filter": "^1.1.1",
            -        "arr-flatten": "^1.0.1",
            -        "arr-map": "^2.0.0",
            -        "array-each": "^1.0.0",
            -        "array-initial": "^1.0.0",
            -        "array-last": "^1.1.1",
            -        "async-done": "^1.2.2",
            -        "async-settle": "^1.0.0",
            -        "now-and-later": "^2.0.0"
            -      }
            -    },
            -    "balanced-match": {
            -      "version": "1.0.0",
            -      "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
            -      "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=",
            -      "dev": true
            -    },
            -    "base": {
            -      "version": "0.11.2",
            -      "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz",
            -      "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==",
            -      "dev": true,
            -      "requires": {
            -        "cache-base": "^1.0.1",
            -        "class-utils": "^0.3.5",
            -        "component-emitter": "^1.2.1",
            -        "define-property": "^1.0.0",
            -        "isobject": "^3.0.1",
            -        "mixin-deep": "^1.2.0",
            -        "pascalcase": "^0.1.1"
            -      },
            -      "dependencies": {
            -        "define-property": {
            -          "version": "1.0.0",
            -          "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz",
            -          "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=",
            -          "dev": true,
            -          "requires": {
            -            "is-descriptor": "^1.0.0"
            -          }
            -        },
            -        "is-accessor-descriptor": {
            -          "version": "1.0.0",
            -          "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz",
            -          "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==",
            -          "dev": true,
            -          "requires": {
            -            "kind-of": "^6.0.0"
            -          }
            -        },
            -        "is-data-descriptor": {
            -          "version": "1.0.0",
            -          "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz",
            -          "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==",
            -          "dev": true,
            -          "requires": {
            -            "kind-of": "^6.0.0"
            -          }
            -        },
            -        "is-descriptor": {
            -          "version": "1.0.2",
            -          "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz",
            -          "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==",
            -          "dev": true,
            -          "requires": {
            -            "is-accessor-descriptor": "^1.0.0",
            -            "is-data-descriptor": "^1.0.0",
            -            "kind-of": "^6.0.2"
            -          }
            -        }
            -      }
            -    },
            -    "basic-auth": {
            -      "version": "1.1.0",
            -      "resolved": "https://registry.npmjs.org/basic-auth/-/basic-auth-1.1.0.tgz",
            -      "integrity": "sha1-RSIe5Cn37h5QNb4/UVM/HN/SmIQ=",
            -      "dev": true
            -    },
            -    "bcrypt-pbkdf": {
            -      "version": "1.0.2",
            -      "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz",
            -      "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=",
            -      "dev": true,
            -      "requires": {
            -        "tweetnacl": "^0.14.3"
            -      }
            -    },
            -    "beeper": {
            -      "version": "2.0.0",
            -      "resolved": "https://registry.npmjs.org/beeper/-/beeper-2.0.0.tgz",
            -      "integrity": "sha512-+ShExQEewPvKdTUOtCAJmkUAgEyNF0QqgiAhPRE5xLvoFkIPt8xuHKaz1gMLzSMS73beHWs9gbRBngdH61nVWw==",
            -      "dev": true,
            -      "requires": {
            -        "delay": "^4.1.0"
            -      }
            -    },
            -    "before-after-hook": {
            -      "version": "2.1.0",
            -      "resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.1.0.tgz",
            -      "integrity": "sha512-IWIbu7pMqyw3EAJHzzHbWa85b6oud/yfKYg5rqB5hNE8CeMi3nX+2C2sj0HswfblST86hpVEOAb9x34NZd6P7A==",
            -      "dev": true
            -    },
            -    "benchmark": {
            -      "version": "2.1.4",
            -      "resolved": "https://registry.npmjs.org/benchmark/-/benchmark-2.1.4.tgz",
            -      "integrity": "sha1-CfPeMckWQl1JjMLuVloOvzwqVik=",
            -      "dev": true,
            -      "requires": {
            -        "lodash": "^4.17.4",
            -        "platform": "^1.3.3"
            -      }
            -    },
            -    "binary-extensions": {
            -      "version": "1.13.1",
            -      "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.13.1.tgz",
            -      "integrity": "sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw==",
            -      "dev": true
            -    },
            -    "binaryextensions": {
            -      "version": "2.1.2",
            -      "resolved": "https://registry.npmjs.org/binaryextensions/-/binaryextensions-2.1.2.tgz",
            -      "integrity": "sha512-xVNN69YGDghOqCCtA6FI7avYrr02mTJjOgB0/f1VPD3pJC8QEvjTKWc4epDx8AqxxA75NI0QpVM2gPJXUbE4Tg==",
            -      "dev": true
            -    },
            -    "bindings": {
            -      "version": "1.5.0",
            -      "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz",
            -      "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==",
            -      "dev": true,
            -      "optional": true,
            -      "requires": {
            -        "file-uri-to-path": "1.0.0"
            -      }
            -    },
            -    "bluebird": {
            -      "version": "3.7.2",
            -      "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz",
            -      "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==",
            -      "dev": true
            -    },
            -    "brace-expansion": {
            -      "version": "1.1.11",
            -      "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
            -      "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
            -      "dev": true,
            -      "requires": {
            -        "balanced-match": "^1.0.0",
            -        "concat-map": "0.0.1"
            -      }
            -    },
            -    "braces": {
            -      "version": "2.3.2",
            -      "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz",
            -      "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==",
            -      "dev": true,
            -      "requires": {
            -        "arr-flatten": "^1.1.0",
            -        "array-unique": "^0.3.2",
            -        "extend-shallow": "^2.0.1",
            -        "fill-range": "^4.0.0",
            -        "isobject": "^3.0.1",
            -        "repeat-element": "^1.1.2",
            -        "snapdragon": "^0.8.1",
            -        "snapdragon-node": "^2.0.1",
            -        "split-string": "^3.0.2",
            -        "to-regex": "^3.0.1"
            -      },
            -      "dependencies": {
            -        "extend-shallow": {
            -          "version": "2.0.1",
            -          "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
            -          "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
            -          "dev": true,
            -          "requires": {
            -            "is-extendable": "^0.1.0"
            -          }
            -        }
            -      }
            -    },
            -    "browser-process-hrtime": {
            -      "version": "0.1.3",
            -      "resolved": "https://registry.npmjs.org/browser-process-hrtime/-/browser-process-hrtime-0.1.3.tgz",
            -      "integrity": "sha512-bRFnI4NnjO6cnyLmOV/7PVoDEMJChlcfN0z4s1YMBY989/SvlfMI1lgCnkFUs53e9gQF+w7qu7XdllSTiSl8Aw==",
            -      "dev": true
            -    },
            -    "browser-stdout": {
            -      "version": "1.3.1",
            -      "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz",
            -      "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==",
            -      "dev": true
            -    },
            -    "btoa-lite": {
            -      "version": "1.0.0",
            -      "resolved": "https://registry.npmjs.org/btoa-lite/-/btoa-lite-1.0.0.tgz",
            -      "integrity": "sha1-M3dm2hWAEhD92VbCLpxokaudAzc=",
            -      "dev": true
            -    },
            -    "buffer-equal": {
            -      "version": "1.0.0",
            -      "resolved": "https://registry.npmjs.org/buffer-equal/-/buffer-equal-1.0.0.tgz",
            -      "integrity": "sha1-WWFrSYME1Var1GaWayLu2j7KX74=",
            -      "dev": true
            -    },
            -    "buffer-equal-constant-time": {
            -      "version": "1.0.1",
            -      "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz",
            -      "integrity": "sha1-+OcRMvf/5uAaXJaXpMbz5I1cyBk=",
            -      "dev": true
            -    },
            -    "buffer-from": {
            -      "version": "1.1.1",
            -      "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz",
            -      "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==",
            -      "dev": true
            -    },
            -    "cache-base": {
            -      "version": "1.0.1",
            -      "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz",
            -      "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==",
            -      "dev": true,
            -      "requires": {
            -        "collection-visit": "^1.0.0",
            -        "component-emitter": "^1.2.1",
            -        "get-value": "^2.0.6",
            -        "has-value": "^1.0.0",
            -        "isobject": "^3.0.1",
            -        "set-value": "^2.0.0",
            -        "to-object-path": "^0.3.0",
            -        "union-value": "^1.0.0",
            -        "unset-value": "^1.0.0"
            -      }
            -    },
            -    "call-bind": {
            -      "version": "1.0.2",
            -      "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz",
            -      "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==",
            -      "dev": true,
            -      "requires": {
            -        "function-bind": "^1.1.1",
            -        "get-intrinsic": "^1.0.2"
            -      }
            -    },
            -    "call-me-maybe": {
            -      "version": "1.0.1",
            -      "resolved": "https://registry.npmjs.org/call-me-maybe/-/call-me-maybe-1.0.1.tgz",
            -      "integrity": "sha1-JtII6onje1y95gJQoV8DHBak1ms=",
            -      "dev": true
            -    },
            -    "caller-callsite": {
            -      "version": "2.0.0",
            -      "resolved": "https://registry.npmjs.org/caller-callsite/-/caller-callsite-2.0.0.tgz",
            -      "integrity": "sha1-hH4PzgoiN1CpoCfFSzNzGtMVQTQ=",
            -      "dev": true,
            -      "requires": {
            -        "callsites": "^2.0.0"
            -      }
            -    },
            -    "caller-path": {
            -      "version": "2.0.0",
            -      "resolved": "https://registry.npmjs.org/caller-path/-/caller-path-2.0.0.tgz",
            -      "integrity": "sha1-Ro+DBE42mrIBD6xfBs7uFbsssfQ=",
            -      "dev": true,
            -      "requires": {
            -        "caller-callsite": "^2.0.0"
            -      }
            -    },
            -    "callsites": {
            -      "version": "2.0.0",
            -      "resolved": "https://registry.npmjs.org/callsites/-/callsites-2.0.0.tgz",
            -      "integrity": "sha1-BuuE8A7qQT2oav/vrL/7Ngk7PFA=",
            -      "dev": true
            -    },
            -    "camelcase": {
            -      "version": "3.0.0",
            -      "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz",
            -      "integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=",
            -      "dev": true
            -    },
            -    "camelcase-keys": {
            -      "version": "4.2.0",
            -      "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-4.2.0.tgz",
            -      "integrity": "sha1-oqpfsa9oh1glnDLBQUJteJI7m3c=",
            -      "dev": true,
            -      "requires": {
            -        "camelcase": "^4.1.0",
            -        "map-obj": "^2.0.0",
            -        "quick-lru": "^1.0.0"
            -      },
            -      "dependencies": {
            -        "camelcase": {
            -          "version": "4.1.0",
            -          "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz",
            -          "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=",
            -          "dev": true
            -        }
            -      }
            -    },
            -    "caseless": {
            -      "version": "0.12.0",
            -      "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz",
            -      "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=",
            -      "dev": true
            -    },
            -    "catharsis": {
            -      "version": "0.8.11",
            -      "resolved": "https://registry.npmjs.org/catharsis/-/catharsis-0.8.11.tgz",
            -      "integrity": "sha512-a+xUyMV7hD1BrDQA/3iPV7oc+6W26BgVJO05PGEoatMyIuPScQKsde6i3YorWX1qs+AZjnJ18NqdKoCtKiNh1g==",
            -      "dev": true,
            -      "requires": {
            -        "lodash": "^4.17.14"
            -      }
            -    },
            -    "chai": {
            -      "version": "4.2.0",
            -      "resolved": "https://registry.npmjs.org/chai/-/chai-4.2.0.tgz",
            -      "integrity": "sha512-XQU3bhBukrOsQCuwZndwGcCVQHyZi53fQ6Ys1Fym7E4olpIqqZZhhoFJoaKVvV17lWQoXYwgWN2nF5crA8J2jw==",
            -      "dev": true,
            -      "requires": {
            -        "assertion-error": "^1.1.0",
            -        "check-error": "^1.0.2",
            -        "deep-eql": "^3.0.1",
            -        "get-func-name": "^2.0.0",
            -        "pathval": "^1.1.0",
            -        "type-detect": "^4.0.5"
            -      }
            -    },
            -    "chalk": {
            -      "version": "2.4.2",
            -      "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
            -      "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
            -      "dev": true,
            -      "requires": {
            -        "ansi-styles": "^3.2.1",
            -        "escape-string-regexp": "^1.0.5",
            -        "supports-color": "^5.3.0"
            -      },
            -      "dependencies": {
            -        "supports-color": {
            -          "version": "5.5.0",
            -          "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
            -          "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
            -          "dev": true,
            -          "requires": {
            -            "has-flag": "^3.0.0"
            -          }
            -        }
            -      }
            -    },
            -    "check-error": {
            -      "version": "1.0.2",
            -      "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz",
            -      "integrity": "sha1-V00xLt2Iu13YkS6Sht1sCu1KrII=",
            -      "dev": true
            -    },
            -    "chokidar": {
            -      "version": "2.1.8",
            -      "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.1.8.tgz",
            -      "integrity": "sha512-ZmZUazfOzf0Nve7duiCKD23PFSCs4JPoYyccjUFF3aQkQadqBhfzhjkwBH2mNOG9cTBwhamM37EIsIkZw3nRgg==",
            -      "dev": true,
            -      "requires": {
            -        "anymatch": "^2.0.0",
            -        "async-each": "^1.0.1",
            -        "braces": "^2.3.2",
            -        "fsevents": "^1.2.7",
            -        "glob-parent": "^3.1.0",
            -        "inherits": "^2.0.3",
            -        "is-binary-path": "^1.0.0",
            -        "is-glob": "^4.0.0",
            -        "normalize-path": "^3.0.0",
            -        "path-is-absolute": "^1.0.0",
            -        "readdirp": "^2.2.1",
            -        "upath": "^1.1.1"
            -      },
            -      "dependencies": {
            -        "normalize-path": {
            -          "version": "3.0.0",
            -          "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz",
            -          "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==",
            -          "dev": true
            -        }
            -      }
            -    },
            -    "class-utils": {
            -      "version": "0.3.6",
            -      "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz",
            -      "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==",
            -      "dev": true,
            -      "requires": {
            -        "arr-union": "^3.1.0",
            -        "define-property": "^0.2.5",
            -        "isobject": "^3.0.0",
            -        "static-extend": "^0.1.1"
            -      },
            -      "dependencies": {
            -        "define-property": {
            -          "version": "0.2.5",
            -          "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz",
            -          "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=",
            -          "dev": true,
            -          "requires": {
            -            "is-descriptor": "^0.1.0"
            -          }
            -        }
            -      }
            -    },
            -    "cliui": {
            -      "version": "3.2.0",
            -      "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz",
            -      "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=",
            -      "dev": true,
            -      "requires": {
            -        "string-width": "^1.0.1",
            -        "strip-ansi": "^3.0.1",
            -        "wrap-ansi": "^2.0.0"
            -      }
            -    },
            -    "clone": {
            -      "version": "2.1.2",
            -      "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz",
            -      "integrity": "sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18=",
            -      "dev": true
            -    },
            -    "clone-buffer": {
            -      "version": "1.0.0",
            -      "resolved": "https://registry.npmjs.org/clone-buffer/-/clone-buffer-1.0.0.tgz",
            -      "integrity": "sha1-4+JbIHrE5wGvch4staFnksrD3Fg=",
            -      "dev": true
            -    },
            -    "clone-stats": {
            -      "version": "1.0.0",
            -      "resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-1.0.0.tgz",
            -      "integrity": "sha1-s3gt/4u1R04Yuba/D9/ngvh3doA=",
            -      "dev": true
            -    },
            -    "cloneable-readable": {
            -      "version": "1.1.2",
            -      "resolved": "https://registry.npmjs.org/cloneable-readable/-/cloneable-readable-1.1.2.tgz",
            -      "integrity": "sha512-Bq6+4t+lbM8vhTs/Bef5c5AdEMtapp/iFb6+s4/Hh9MVTt8OLKH7ZOOZSCT+Ys7hsHvqv0GuMPJ1lnQJVHvxpg==",
            -      "dev": true,
            -      "requires": {
            -        "inherits": "^2.0.1",
            -        "process-nextick-args": "^2.0.0",
            -        "readable-stream": "^2.3.5"
            -      },
            -      "dependencies": {
            -        "process-nextick-args": {
            -          "version": "2.0.0",
            -          "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz",
            -          "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==",
            -          "dev": true
            -        }
            -      }
            -    },
            -    "code-point-at": {
            -      "version": "1.1.0",
            -      "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz",
            -      "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=",
            -      "dev": true
            -    },
            -    "collection-map": {
            -      "version": "1.0.0",
            -      "resolved": "https://registry.npmjs.org/collection-map/-/collection-map-1.0.0.tgz",
            -      "integrity": "sha1-rqDwb40mx4DCt1SUOFVEsiVa8Yw=",
            -      "dev": true,
            -      "requires": {
            -        "arr-map": "^2.0.2",
            -        "for-own": "^1.0.0",
            -        "make-iterator": "^1.0.0"
            -      }
            -    },
            -    "collection-visit": {
            -      "version": "1.0.0",
            -      "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz",
            -      "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=",
            -      "dev": true,
            -      "requires": {
            -        "map-visit": "^1.0.0",
            -        "object-visit": "^1.0.0"
            -      }
            -    },
            -    "color-convert": {
            -      "version": "1.9.3",
            -      "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
            -      "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
            -      "dev": true,
            -      "requires": {
            -        "color-name": "1.1.3"
            -      }
            -    },
            -    "color-name": {
            -      "version": "1.1.3",
            -      "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
            -      "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=",
            -      "dev": true
            -    },
            -    "color-support": {
            -      "version": "1.1.3",
            -      "resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz",
            -      "integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==",
            -      "dev": true
            -    },
            -    "colors": {
            -      "version": "1.4.0",
            -      "resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz",
            -      "integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==",
            -      "dev": true
            -    },
            -    "combined-stream": {
            -      "version": "1.0.7",
            -      "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.7.tgz",
            -      "integrity": "sha512-brWl9y6vOB1xYPZcpZde3N9zDByXTosAeMDo4p1wzo6UMOX4vumB+TP1RZ76sfE6Md68Q0NJSrE/gbezd4Ul+w==",
            -      "dev": true,
            -      "requires": {
            -        "delayed-stream": "~1.0.0"
            -      }
            -    },
            -    "commander": {
            -      "version": "2.19.0",
            -      "resolved": "https://registry.npmjs.org/commander/-/commander-2.19.0.tgz",
            -      "integrity": "sha512-6tvAOO+D6OENvRAh524Dh9jcfKTYDQAqvqezbCW82xj5X0pSrcpxtvRKHLG0yBY6SD7PSDrJaj+0AiOcKVd1Xg==",
            -      "dev": true
            -    },
            -    "comment-parser": {
            -      "version": "1.1.2",
            -      "resolved": "https://registry.npmjs.org/comment-parser/-/comment-parser-1.1.2.tgz",
            -      "integrity": "sha512-AOdq0i8ghZudnYv8RUnHrhTgafUGs61Rdz9jemU5x2lnZwAWyOq7vySo626K59e1fVKH1xSRorJwPVRLSWOoAQ==",
            -      "dev": true
            -    },
            -    "component-emitter": {
            -      "version": "1.3.0",
            -      "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz",
            -      "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==",
            -      "dev": true
            -    },
            -    "concat-map": {
            -      "version": "0.0.1",
            -      "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
            -      "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=",
            -      "dev": true
            -    },
            -    "concat-stream": {
            -      "version": "1.6.2",
            -      "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz",
            -      "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==",
            -      "dev": true,
            -      "requires": {
            -        "buffer-from": "^1.0.0",
            -        "inherits": "^2.0.3",
            -        "readable-stream": "^2.2.2",
            -        "typedarray": "^0.0.6"
            -      }
            -    },
            -    "concat-with-sourcemaps": {
            -      "version": "1.1.0",
            -      "resolved": "https://registry.npmjs.org/concat-with-sourcemaps/-/concat-with-sourcemaps-1.1.0.tgz",
            -      "integrity": "sha512-4gEjHJFT9e+2W/77h/DS5SGUgwDaOwprX8L/gl5+3ixnzkVJJsZWDSelmN3Oilw3LNDZjZV0yqH1hLG3k6nghg==",
            -      "dev": true,
            -      "requires": {
            -        "source-map": "^0.6.1"
            -      },
            -      "dependencies": {
            -        "source-map": {
            -          "version": "0.6.1",
            -          "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
            -          "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
            -          "dev": true
            -        }
            -      }
            -    },
            -    "convert-source-map": {
            -      "version": "1.7.0",
            -      "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.7.0.tgz",
            -      "integrity": "sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA==",
            -      "dev": true,
            -      "requires": {
            -        "safe-buffer": "~5.1.1"
            -      }
            -    },
            -    "copy-descriptor": {
            -      "version": "0.1.1",
            -      "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz",
            -      "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=",
            -      "dev": true
            -    },
            -    "copy-props": {
            -      "version": "2.0.4",
            -      "resolved": "https://registry.npmjs.org/copy-props/-/copy-props-2.0.4.tgz",
            -      "integrity": "sha512-7cjuUME+p+S3HZlbllgsn2CDwS+5eCCX16qBgNC4jgSTf49qR1VKy/Zhl400m0IQXl/bPGEVqncgUUMjrr4s8A==",
            -      "dev": true,
            -      "requires": {
            -        "each-props": "^1.3.0",
            -        "is-plain-object": "^2.0.1"
            -      }
            -    },
            -    "core-js": {
            -      "version": "2.6.11",
            -      "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.11.tgz",
            -      "integrity": "sha512-5wjnpaT/3dV+XB4borEsnAYQchn00XSgTAWKDkEqv+K8KevjbzmofK6hfJ9TZIlpj2N0xQpazy7PiRQiWHqzWg==",
            -      "dev": true
            -    },
            -    "core-util-is": {
            -      "version": "1.0.2",
            -      "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
            -      "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=",
            -      "dev": true
            -    },
            -    "corser": {
            -      "version": "2.0.1",
            -      "resolved": "https://registry.npmjs.org/corser/-/corser-2.0.1.tgz",
            -      "integrity": "sha1-jtolLsqrWEDc2XXOuQ2TcMgZ/4c=",
            -      "dev": true
            -    },
            -    "cosmiconfig": {
            -      "version": "5.2.1",
            -      "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-5.2.1.tgz",
            -      "integrity": "sha512-H65gsXo1SKjf8zmrJ67eJk8aIRKV5ff2D4uKZIBZShbhGSpEmsQOPW/SKMKYhSTrqR7ufy6RP69rPogdaPh/kA==",
            -      "dev": true,
            -      "requires": {
            -        "import-fresh": "^2.0.0",
            -        "is-directory": "^0.3.1",
            -        "js-yaml": "^3.13.1",
            -        "parse-json": "^4.0.0"
            -      },
            -      "dependencies": {
            -        "parse-json": {
            -          "version": "4.0.0",
            -          "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz",
            -          "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=",
            -          "dev": true,
            -          "requires": {
            -            "error-ex": "^1.3.1",
            -            "json-parse-better-errors": "^1.0.1"
            -          }
            -        }
            -      }
            -    },
            -    "cross-spawn": {
            -      "version": "6.0.5",
            -      "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz",
            -      "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==",
            -      "dev": true,
            -      "requires": {
            -        "nice-try": "^1.0.4",
            -        "path-key": "^2.0.1",
            -        "semver": "^5.5.0",
            -        "shebang-command": "^1.2.0",
            -        "which": "^1.2.9"
            -      }
            -    },
            -    "cssom": {
            -      "version": "0.3.6",
            -      "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.3.6.tgz",
            -      "integrity": "sha512-DtUeseGk9/GBW0hl0vVPpU22iHL6YB5BUX7ml1hB+GMpo0NX5G4voX3kdWiMSEguFtcW3Vh3djqNF4aIe6ne0A==",
            -      "dev": true
            -    },
            -    "cssstyle": {
            -      "version": "1.2.1",
            -      "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-1.2.1.tgz",
            -      "integrity": "sha512-7DYm8qe+gPx/h77QlCyFmX80+fGaE/6A/Ekl0zaszYOubvySO2saYFdQ78P29D0UsULxFKCetDGNaNRUdSF+2A==",
            -      "dev": true,
            -      "requires": {
            -        "cssom": "0.3.x"
            -      }
            -    },
            -    "cubic2quad": {
            -      "version": "1.1.1",
            -      "resolved": "https://registry.npmjs.org/cubic2quad/-/cubic2quad-1.1.1.tgz",
            -      "integrity": "sha1-abGcYaP1tB7PLx1fro+wNBWqixU=",
            -      "dev": true
            -    },
            -    "currently-unhandled": {
            -      "version": "0.4.1",
            -      "resolved": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz",
            -      "integrity": "sha1-mI3zP+qxke95mmE2nddsF635V+o=",
            -      "dev": true,
            -      "requires": {
            -        "array-find-index": "^1.0.1"
            -      }
            -    },
            -    "d": {
            -      "version": "1.0.1",
            -      "resolved": "https://registry.npmjs.org/d/-/d-1.0.1.tgz",
            -      "integrity": "sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==",
            -      "dev": true,
            -      "requires": {
            -        "es5-ext": "^0.10.50",
            -        "type": "^1.0.1"
            -      }
            -    },
            -    "danger": {
            -      "version": "10.5.0",
            -      "resolved": "https://registry.npmjs.org/danger/-/danger-10.5.0.tgz",
            -      "integrity": "sha512-KUqwc8WFmW4JqPpgG4cssOZQE1aYRj/If/ZX+XNOsMRhxJH5cY9ij6VQH7C/pP64UGqmMNNV6jSsbxOOAWMy4w==",
            -      "dev": true,
            -      "requires": {
            -        "@babel/polyfill": "^7.2.5",
            -        "@octokit/rest": "^16.43.1",
            -        "async-retry": "1.2.3",
            -        "chalk": "^2.3.0",
            -        "commander": "^2.18.0",
            -        "debug": "^4.1.1",
            -        "fast-json-patch": "^3.0.0-1",
            -        "get-stdin": "^6.0.0",
            -        "gitlab": "^10.0.1",
            -        "http-proxy-agent": "^2.1.0",
            -        "https-proxy-agent": "^2.2.1",
            -        "hyperlinker": "^1.0.0",
            -        "json5": "^2.1.0",
            -        "jsonpointer": "^4.0.1",
            -        "jsonwebtoken": "^8.4.0",
            -        "lodash.find": "^4.6.0",
            -        "lodash.includes": "^4.3.0",
            -        "lodash.isobject": "^3.0.2",
            -        "lodash.keys": "^4.0.8",
            -        "lodash.mapvalues": "^4.6.0",
            -        "lodash.memoize": "^4.1.2",
            -        "memfs-or-file-map-to-github-branch": "^1.1.0",
            -        "micromatch": "^3.1.10",
            -        "node-cleanup": "^2.1.2",
            -        "node-fetch": "2.6.1",
            -        "override-require": "^1.1.1",
            -        "p-limit": "^2.1.0",
            -        "parse-diff": "^0.7.0",
            -        "parse-git-config": "^2.0.3",
            -        "parse-github-url": "^1.0.2",
            -        "parse-link-header": "^1.0.1",
            -        "pinpoint": "^1.1.0",
            -        "prettyjson": "^1.2.1",
            -        "readline-sync": "^1.4.9",
            -        "require-from-string": "^2.0.2",
            -        "supports-hyperlinks": "^1.0.1"
            -      },
            -      "dependencies": {
            -        "debug": {
            -          "version": "4.2.0",
            -          "resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz",
            -          "integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==",
            -          "dev": true,
            -          "requires": {
            -            "ms": "2.1.2"
            -          }
            -        },
            -        "ms": {
            -          "version": "2.1.2",
            -          "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
            -          "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
            -          "dev": true
            -        }
            -      }
            -    },
            -    "dashdash": {
            -      "version": "1.14.1",
            -      "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz",
            -      "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=",
            -      "dev": true,
            -      "requires": {
            -        "assert-plus": "^1.0.0"
            -      }
            -    },
            -    "data-urls": {
            -      "version": "1.1.0",
            -      "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-1.1.0.tgz",
            -      "integrity": "sha512-YTWYI9se1P55u58gL5GkQHW4P6VJBJ5iBT+B5a7i2Tjadhv52paJG0qHX4A0OR6/t52odI64KP2YvFpkDOi3eQ==",
            -      "dev": true,
            -      "requires": {
            -        "abab": "^2.0.0",
            -        "whatwg-mimetype": "^2.2.0",
            -        "whatwg-url": "^7.0.0"
            -      }
            -    },
            -    "debug": {
            -      "version": "2.6.9",
            -      "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
            -      "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
            -      "dev": true,
            -      "requires": {
            -        "ms": "2.0.0"
            -      }
            -    },
            -    "decamelize": {
            -      "version": "1.2.0",
            -      "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz",
            -      "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=",
            -      "dev": true
            -    },
            -    "decamelize-keys": {
            -      "version": "1.1.0",
            -      "resolved": "https://registry.npmjs.org/decamelize-keys/-/decamelize-keys-1.1.0.tgz",
            -      "integrity": "sha1-0XGoeTMlKAfrPLYdwcFEXQeN8tk=",
            -      "dev": true,
            -      "requires": {
            -        "decamelize": "^1.1.0",
            -        "map-obj": "^1.0.0"
            -      },
            -      "dependencies": {
            -        "map-obj": {
            -          "version": "1.0.1",
            -          "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz",
            -          "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=",
            -          "dev": true
            -        }
            -      }
            -    },
            -    "decode-uri-component": {
            -      "version": "0.2.0",
            -      "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz",
            -      "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=",
            -      "dev": true
            -    },
            -    "deep-eql": {
            -      "version": "3.0.1",
            -      "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-3.0.1.tgz",
            -      "integrity": "sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw==",
            -      "dev": true,
            -      "requires": {
            -        "type-detect": "^4.0.0"
            -      }
            -    },
            -    "deep-is": {
            -      "version": "0.1.3",
            -      "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz",
            -      "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=",
            -      "dev": true
            -    },
            -    "deepmerge": {
            -      "version": "3.3.0",
            -      "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-3.3.0.tgz",
            -      "integrity": "sha512-GRQOafGHwMHpjPx9iCvTgpu9NojZ49q794EEL94JVEw6VaeA8XTUyBKvAkOOjBX9oJNiV6G3P+T+tihFjo2TqA==",
            -      "dev": true
            -    },
            -    "default-compare": {
            -      "version": "1.0.0",
            -      "resolved": "https://registry.npmjs.org/default-compare/-/default-compare-1.0.0.tgz",
            -      "integrity": "sha512-QWfXlM0EkAbqOCbD/6HjdwT19j7WCkMyiRhWilc4H9/5h/RzTF9gv5LYh1+CmDV5d1rki6KAWLtQale0xt20eQ==",
            -      "dev": true,
            -      "requires": {
            -        "kind-of": "^5.0.2"
            -      },
            -      "dependencies": {
            -        "kind-of": {
            -          "version": "5.1.0",
            -          "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz",
            -          "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==",
            -          "dev": true
            -        }
            -      }
            -    },
            -    "default-resolution": {
            -      "version": "2.0.0",
            -      "resolved": "https://registry.npmjs.org/default-resolution/-/default-resolution-2.0.0.tgz",
            -      "integrity": "sha1-vLgrqnKtebQmp2cy8aga1t8m1oQ=",
            -      "dev": true
            -    },
            -    "define-properties": {
            -      "version": "1.1.3",
            -      "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz",
            -      "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==",
            -      "dev": true,
            -      "requires": {
            -        "object-keys": "^1.0.12"
            -      }
            -    },
            -    "define-property": {
            -      "version": "2.0.2",
            -      "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz",
            -      "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==",
            -      "dev": true,
            -      "requires": {
            -        "is-descriptor": "^1.0.2",
            -        "isobject": "^3.0.1"
            -      },
            -      "dependencies": {
            -        "is-accessor-descriptor": {
            -          "version": "1.0.0",
            -          "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz",
            -          "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==",
            -          "dev": true,
            -          "requires": {
            -            "kind-of": "^6.0.0"
            -          }
            -        },
            -        "is-data-descriptor": {
            -          "version": "1.0.0",
            -          "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz",
            -          "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==",
            -          "dev": true,
            -          "requires": {
            -            "kind-of": "^6.0.0"
            -          }
            -        },
            -        "is-descriptor": {
            -          "version": "1.0.2",
            -          "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz",
            -          "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==",
            -          "dev": true,
            -          "requires": {
            -            "is-accessor-descriptor": "^1.0.0",
            -            "is-data-descriptor": "^1.0.0",
            -            "kind-of": "^6.0.2"
            -          }
            -        }
            -      }
            -    },
            -    "del": {
            -      "version": "4.1.1",
            -      "resolved": "https://registry.npmjs.org/del/-/del-4.1.1.tgz",
            -      "integrity": "sha512-QwGuEUouP2kVwQenAsOof5Fv8K9t3D8Ca8NxcXKrIpEHjTXK5J2nXLdP+ALI1cgv8wj7KuwBhTwBkOZSJKM5XQ==",
            -      "dev": true,
            -      "requires": {
            -        "@types/glob": "^7.1.1",
            -        "globby": "^6.1.0",
            -        "is-path-cwd": "^2.0.0",
            -        "is-path-in-cwd": "^2.0.0",
            -        "p-map": "^2.0.0",
            -        "pify": "^4.0.1",
            -        "rimraf": "^2.6.3"
            -      },
            -      "dependencies": {
            -        "pify": {
            -          "version": "4.0.1",
            -          "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz",
            -          "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==",
            -          "dev": true
            -        }
            -      }
            -    },
            -    "delay": {
            -      "version": "4.3.0",
            -      "resolved": "https://registry.npmjs.org/delay/-/delay-4.3.0.tgz",
            -      "integrity": "sha512-Lwaf3zVFDMBop1yDuFZ19F9WyGcZcGacsbdlZtWjQmM50tOcMntm1njF/Nb/Vjij3KaSvCF+sEYGKrrjObu2NA==",
            -      "dev": true
            -    },
            -    "delayed-stream": {
            -      "version": "1.0.0",
            -      "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
            -      "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=",
            -      "dev": true
            -    },
            -    "deprecation": {
            -      "version": "2.3.1",
            -      "resolved": "https://registry.npmjs.org/deprecation/-/deprecation-2.3.1.tgz",
            -      "integrity": "sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ==",
            -      "dev": true
            -    },
            -    "detect-file": {
            -      "version": "1.0.0",
            -      "resolved": "https://registry.npmjs.org/detect-file/-/detect-file-1.0.0.tgz",
            -      "integrity": "sha1-8NZtA2cqglyxtzvbP+YjEMjlUrc=",
            -      "dev": true
            -    },
            -    "diff": {
            -      "version": "3.5.0",
            -      "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz",
            -      "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==",
            -      "dev": true
            -    },
            -    "dir-glob": {
            -      "version": "2.2.2",
            -      "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-2.2.2.tgz",
            -      "integrity": "sha512-f9LBi5QWzIW3I6e//uxZoLBlUt9kcp66qo0sSCxL6YZKc75R1c4MFCoe/LaZiBGmgujvQdxc5Bn3QhfyvK5Hsw==",
            -      "dev": true,
            -      "requires": {
            -        "path-type": "^3.0.0"
            -      },
            -      "dependencies": {
            -        "path-type": {
            -          "version": "3.0.0",
            -          "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz",
            -          "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==",
            -          "dev": true,
            -          "requires": {
            -            "pify": "^3.0.0"
            -          }
            -        },
            -        "pify": {
            -          "version": "3.0.0",
            -          "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz",
            -          "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=",
            -          "dev": true
            -        }
            -      }
            -    },
            -    "docdash": {
            -      "version": "1.2.0",
            -      "resolved": "https://registry.npmjs.org/docdash/-/docdash-1.2.0.tgz",
            -      "integrity": "sha512-IYZbgYthPTspgqYeciRJNPhSwL51yer7HAwDXhF5p+H7mTDbPvY3PCk/QDjNxdPCpWkaJVFC4t7iCNB/t9E5Kw==",
            -      "dev": true
            -    },
            -    "doctrine": {
            -      "version": "3.0.0",
            -      "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz",
            -      "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==",
            -      "dev": true,
            -      "requires": {
            -        "esutils": "^2.0.2"
            -      }
            -    },
            -    "dom-serializer": {
            -      "version": "0.2.2",
            -      "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.2.2.tgz",
            -      "integrity": "sha512-2/xPb3ORsQ42nHYiSunXkDjPLBaEj/xTwUO4B7XCZQTRk7EBtTOPaygh10YAAh2OI1Qrp6NWfpAhzswj0ydt9g==",
            -      "dev": true,
            -      "requires": {
            -        "domelementtype": "^2.0.1",
            -        "entities": "^2.0.0"
            -      }
            -    },
            -    "domelementtype": {
            -      "version": "2.0.1",
            -      "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.0.1.tgz",
            -      "integrity": "sha512-5HOHUDsYZWV8FGWN0Njbr/Rn7f/eWSQi1v7+HsUVwXgn8nWWlL64zKDkS0n8ZmQ3mlWOMuXOnR+7Nx/5tMO5AQ==",
            -      "dev": true
            -    },
            -    "domexception": {
            -      "version": "1.0.1",
            -      "resolved": "https://registry.npmjs.org/domexception/-/domexception-1.0.1.tgz",
            -      "integrity": "sha512-raigMkn7CJNNo6Ihro1fzG7wr3fHuYVytzquZKX5n0yizGsTcYgzdIUwj1X9pK0VvjeihV+XiclP+DjwbsSKug==",
            -      "dev": true,
            -      "requires": {
            -        "webidl-conversions": "^4.0.2"
            -      }
            -    },
            -    "domhandler": {
            -      "version": "3.0.0",
            -      "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-3.0.0.tgz",
            -      "integrity": "sha512-eKLdI5v9m67kbXQbJSNn1zjh0SDzvzWVWtX+qEI3eMjZw8daH9k8rlj1FZY9memPwjiskQFbe7vHVVJIAqoEhw==",
            -      "dev": true,
            -      "requires": {
            -        "domelementtype": "^2.0.1"
            -      }
            -    },
            -    "domutils": {
            -      "version": "2.0.0",
            -      "resolved": "https://registry.npmjs.org/domutils/-/domutils-2.0.0.tgz",
            -      "integrity": "sha512-n5SelJ1axbO636c2yUtOGia/IcJtVtlhQbFiVDBZHKV5ReJO1ViX7sFEemtuyoAnBxk5meNSYgA8V4s0271efg==",
            -      "dev": true,
            -      "requires": {
            -        "dom-serializer": "^0.2.1",
            -        "domelementtype": "^2.0.1",
            -        "domhandler": "^3.0.0"
            -      }
            -    },
            -    "duplexer": {
            -      "version": "0.1.2",
            -      "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.2.tgz",
            -      "integrity": "sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==",
            -      "dev": true
            -    },
            -    "duplexify": {
            -      "version": "3.7.1",
            -      "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.7.1.tgz",
            -      "integrity": "sha512-07z8uv2wMyS51kKhD1KsdXJg5WQ6t93RneqRxUHnskXVtlYYkLqM0gqStQZ3pj073g687jPCHrqNfCzawLYh5g==",
            -      "dev": true,
            -      "requires": {
            -        "end-of-stream": "^1.0.0",
            -        "inherits": "^2.0.1",
            -        "readable-stream": "^2.0.0",
            -        "stream-shift": "^1.0.0"
            -      }
            -    },
            -    "each-props": {
            -      "version": "1.3.2",
            -      "resolved": "https://registry.npmjs.org/each-props/-/each-props-1.3.2.tgz",
            -      "integrity": "sha512-vV0Hem3zAGkJAyU7JSjixeU66rwdynTAa1vofCrSA5fEln+m67Az9CcnkVD776/fsN/UjIWmBDoNRS6t6G9RfA==",
            -      "dev": true,
            -      "requires": {
            -        "is-plain-object": "^2.0.1",
            -        "object.defaults": "^1.1.0"
            -      }
            -    },
            -    "ecc-jsbn": {
            -      "version": "0.1.2",
            -      "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz",
            -      "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=",
            -      "dev": true,
            -      "requires": {
            -        "jsbn": "~0.1.0",
            -        "safer-buffer": "^2.1.0"
            -      }
            -    },
            -    "ecdsa-sig-formatter": {
            -      "version": "1.0.11",
            -      "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz",
            -      "integrity": "sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==",
            -      "dev": true,
            -      "requires": {
            -        "safe-buffer": "^5.0.1"
            -      }
            -    },
            -    "ecstatic": {
            -      "version": "3.3.2",
            -      "resolved": "https://registry.npmjs.org/ecstatic/-/ecstatic-3.3.2.tgz",
            -      "integrity": "sha512-fLf9l1hnwrHI2xn9mEDT7KIi22UDqA2jaCwyCbSUJh9a1V+LEUSL/JO/6TIz/QyuBURWUHrFL5Kg2TtO1bkkog==",
            -      "dev": true,
            -      "requires": {
            -        "he": "^1.1.1",
            -        "mime": "^1.6.0",
            -        "minimist": "^1.1.0",
            -        "url-join": "^2.0.5"
            -      },
            -      "dependencies": {
            -        "minimist": {
            -          "version": "1.2.5",
            -          "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
            -          "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==",
            -          "dev": true
            -        }
            -      }
            -    },
            -    "editions": {
            -      "version": "1.3.4",
            -      "resolved": "https://registry.npmjs.org/editions/-/editions-1.3.4.tgz",
            -      "integrity": "sha512-gzao+mxnYDzIysXKMQi/+M1mjy/rjestjg6OPoYTtI+3Izp23oiGZitsl9lPDPiTGXbcSIk1iJWhliSaglxnUg==",
            -      "dev": true
            -    },
            -    "emoji-regex": {
            -      "version": "7.0.3",
            -      "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz",
            -      "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==",
            -      "dev": true
            -    },
            -    "end-of-stream": {
            -      "version": "1.4.1",
            -      "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz",
            -      "integrity": "sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q==",
            -      "dev": true,
            -      "requires": {
            -        "once": "^1.4.0"
            -      }
            -    },
            -    "enquirer": {
            -      "version": "2.3.6",
            -      "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz",
            -      "integrity": "sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==",
            -      "dev": true,
            -      "requires": {
            -        "ansi-colors": "^4.1.1"
            -      },
            -      "dependencies": {
            -        "ansi-colors": {
            -          "version": "4.1.1",
            -          "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz",
            -          "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==",
            -          "dev": true
            -        }
            -      }
            -    },
            -    "entities": {
            -      "version": "2.0.0",
            -      "resolved": "https://registry.npmjs.org/entities/-/entities-2.0.0.tgz",
            -      "integrity": "sha512-D9f7V0JSRwIxlRI2mjMqufDrRDnx8p+eEOz7aUM9SuvF8gsBzra0/6tbjl1m8eQHrZlYj6PxqE00hZ1SAIKPLw==",
            -      "dev": true
            -    },
            -    "error-ex": {
            -      "version": "1.3.2",
            -      "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz",
            -      "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==",
            -      "dev": true,
            -      "requires": {
            -        "is-arrayish": "^0.2.1"
            -      }
            -    },
            -    "es-abstract": {
            -      "version": "1.13.0",
            -      "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.13.0.tgz",
            -      "integrity": "sha512-vDZfg/ykNxQVwup/8E1BZhVzFfBxs9NqMzGcvIJrqg5k2/5Za2bWo40dK2J1pgLngZ7c+Shh8lwYtLGyrwPutg==",
            -      "dev": true,
            -      "requires": {
            -        "es-to-primitive": "^1.2.0",
            -        "function-bind": "^1.1.1",
            -        "has": "^1.0.3",
            -        "is-callable": "^1.1.4",
            -        "is-regex": "^1.0.4",
            -        "object-keys": "^1.0.12"
            -      }
            -    },
            -    "es-to-primitive": {
            -      "version": "1.2.0",
            -      "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.0.tgz",
            -      "integrity": "sha512-qZryBOJjV//LaxLTV6UC//WewneB3LcXOL9NP++ozKVXsIIIpm/2c13UDiD9Jp2eThsecw9m3jPqDwTyobcdbg==",
            -      "dev": true,
            -      "requires": {
            -        "is-callable": "^1.1.4",
            -        "is-date-object": "^1.0.1",
            -        "is-symbol": "^1.0.2"
            -      }
            -    },
            -    "es5-ext": {
            -      "version": "0.10.53",
            -      "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.53.tgz",
            -      "integrity": "sha512-Xs2Stw6NiNHWypzRTY1MtaG/uJlwCk8kH81920ma8mvN8Xq1gsfhZvpkImLQArw8AHnv8MT2I45J3c0R8slE+Q==",
            -      "dev": true,
            -      "requires": {
            -        "es6-iterator": "~2.0.3",
            -        "es6-symbol": "~3.1.3",
            -        "next-tick": "~1.0.0"
            -      }
            -    },
            -    "es6-iterator": {
            -      "version": "2.0.3",
            -      "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz",
            -      "integrity": "sha1-p96IkUGgWpSwhUQDstCg+/qY87c=",
            -      "dev": true,
            -      "requires": {
            -        "d": "1",
            -        "es5-ext": "^0.10.35",
            -        "es6-symbol": "^3.1.1"
            -      }
            -    },
            -    "es6-promise": {
            -      "version": "4.2.8",
            -      "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.8.tgz",
            -      "integrity": "sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==",
            -      "dev": true
            -    },
            -    "es6-promisify": {
            -      "version": "5.0.0",
            -      "resolved": "https://registry.npmjs.org/es6-promisify/-/es6-promisify-5.0.0.tgz",
            -      "integrity": "sha1-UQnWLz5W6pZ8S2NQWu8IKRyKUgM=",
            -      "dev": true,
            -      "requires": {
            -        "es6-promise": "^4.0.3"
            -      }
            -    },
            -    "es6-symbol": {
            -      "version": "3.1.3",
            -      "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.3.tgz",
            -      "integrity": "sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA==",
            -      "dev": true,
            -      "requires": {
            -        "d": "^1.0.1",
            -        "ext": "^1.1.2"
            -      }
            -    },
            -    "es6-weak-map": {
            -      "version": "2.0.3",
            -      "resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.3.tgz",
            -      "integrity": "sha512-p5um32HOTO1kP+w7PRnB+5lQ43Z6muuMuIMffvDN8ZB4GcnjLBV6zGStpbASIMk4DCAvEaamhe2zhyCb/QXXsA==",
            -      "dev": true,
            -      "requires": {
            -        "d": "1",
            -        "es5-ext": "^0.10.46",
            -        "es6-iterator": "^2.0.3",
            -        "es6-symbol": "^3.1.1"
            -      }
            -    },
            -    "escape-string-regexp": {
            -      "version": "1.0.5",
            -      "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
            -      "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=",
            -      "dev": true
            -    },
            -    "escodegen": {
            -      "version": "1.11.1",
            -      "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.11.1.tgz",
            -      "integrity": "sha512-JwiqFD9KdGVVpeuRa68yU3zZnBEOcPs0nKW7wZzXky8Z7tffdYUHbe11bPCV5jYlK6DVdKLWLm0f5I/QlL0Kmw==",
            -      "dev": true,
            -      "requires": {
            -        "esprima": "^3.1.3",
            -        "estraverse": "^4.2.0",
            -        "esutils": "^2.0.2",
            -        "optionator": "^0.8.1",
            -        "source-map": "~0.6.1"
            -      },
            -      "dependencies": {
            -        "source-map": {
            -          "version": "0.6.1",
            -          "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
            -          "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
            -          "dev": true,
            -          "optional": true
            -        }
            -      }
            -    },
            -    "eslint": {
            -      "version": "7.22.0",
            -      "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.22.0.tgz",
            -      "integrity": "sha512-3VawOtjSJUQiiqac8MQc+w457iGLfuNGLFn8JmF051tTKbh5/x/0vlcEj8OgDCaw7Ysa2Jn8paGshV7x2abKXg==",
            -      "dev": true,
            -      "requires": {
            -        "@babel/code-frame": "7.12.11",
            -        "@eslint/eslintrc": "^0.4.0",
            -        "ajv": "^6.10.0",
            -        "chalk": "^4.0.0",
            -        "cross-spawn": "^7.0.2",
            -        "debug": "^4.0.1",
            -        "doctrine": "^3.0.0",
            -        "enquirer": "^2.3.5",
            -        "eslint-scope": "^5.1.1",
            -        "eslint-utils": "^2.1.0",
            -        "eslint-visitor-keys": "^2.0.0",
            -        "espree": "^7.3.1",
            -        "esquery": "^1.4.0",
            -        "esutils": "^2.0.2",
            -        "file-entry-cache": "^6.0.1",
            -        "functional-red-black-tree": "^1.0.1",
            -        "glob-parent": "^5.0.0",
            -        "globals": "^13.6.0",
            -        "ignore": "^4.0.6",
            -        "import-fresh": "^3.0.0",
            -        "imurmurhash": "^0.1.4",
            -        "is-glob": "^4.0.0",
            -        "js-yaml": "^3.13.1",
            -        "json-stable-stringify-without-jsonify": "^1.0.1",
            -        "levn": "^0.4.1",
            -        "lodash": "^4.17.21",
            -        "minimatch": "^3.0.4",
            -        "natural-compare": "^1.4.0",
            -        "optionator": "^0.9.1",
            -        "progress": "^2.0.0",
            -        "regexpp": "^3.1.0",
            -        "semver": "^7.2.1",
            -        "strip-ansi": "^6.0.0",
            -        "strip-json-comments": "^3.1.0",
            -        "table": "^6.0.4",
            -        "text-table": "^0.2.0",
            -        "v8-compile-cache": "^2.0.3"
            -      },
            -      "dependencies": {
            -        "ansi-regex": {
            -          "version": "5.0.0",
            -          "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz",
            -          "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==",
            -          "dev": true
            -        },
            -        "ansi-styles": {
            -          "version": "4.3.0",
            -          "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
            -          "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
            -          "dev": true,
            -          "requires": {
            -            "color-convert": "^2.0.1"
            -          }
            -        },
            -        "chalk": {
            -          "version": "4.1.0",
            -          "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz",
            -          "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==",
            -          "dev": true,
            -          "requires": {
            -            "ansi-styles": "^4.1.0",
            -            "supports-color": "^7.1.0"
            -          }
            -        },
            -        "color-convert": {
            -          "version": "2.0.1",
            -          "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
            -          "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
            -          "dev": true,
            -          "requires": {
            -            "color-name": "~1.1.4"
            -          }
            -        },
            -        "color-name": {
            -          "version": "1.1.4",
            -          "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
            -          "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
            -          "dev": true
            -        },
            -        "cross-spawn": {
            -          "version": "7.0.3",
            -          "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz",
            -          "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==",
            -          "dev": true,
            -          "requires": {
            -            "path-key": "^3.1.0",
            -            "shebang-command": "^2.0.0",
            -            "which": "^2.0.1"
            -          }
            -        },
            -        "debug": {
            -          "version": "4.3.1",
            -          "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz",
            -          "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==",
            -          "dev": true,
            -          "requires": {
            -            "ms": "2.1.2"
            -          }
            -        },
            -        "glob-parent": {
            -          "version": "5.1.2",
            -          "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz",
            -          "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==",
            -          "dev": true,
            -          "requires": {
            -            "is-glob": "^4.0.1"
            -          }
            -        },
            -        "has-flag": {
            -          "version": "4.0.0",
            -          "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
            -          "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
            -          "dev": true
            -        },
            -        "import-fresh": {
            -          "version": "3.3.0",
            -          "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz",
            -          "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==",
            -          "dev": true,
            -          "requires": {
            -            "parent-module": "^1.0.0",
            -            "resolve-from": "^4.0.0"
            -          }
            -        },
            -        "levn": {
            -          "version": "0.4.1",
            -          "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz",
            -          "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==",
            -          "dev": true,
            -          "requires": {
            -            "prelude-ls": "^1.2.1",
            -            "type-check": "~0.4.0"
            -          }
            -        },
            -        "ms": {
            -          "version": "2.1.2",
            -          "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
            -          "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
            -          "dev": true
            -        },
            -        "optionator": {
            -          "version": "0.9.1",
            -          "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz",
            -          "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==",
            -          "dev": true,
            -          "requires": {
            -            "deep-is": "^0.1.3",
            -            "fast-levenshtein": "^2.0.6",
            -            "levn": "^0.4.1",
            -            "prelude-ls": "^1.2.1",
            -            "type-check": "^0.4.0",
            -            "word-wrap": "^1.2.3"
            -          }
            -        },
            -        "path-key": {
            -          "version": "3.1.1",
            -          "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz",
            -          "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==",
            -          "dev": true
            -        },
            -        "prelude-ls": {
            -          "version": "1.2.1",
            -          "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz",
            -          "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==",
            -          "dev": true
            -        },
            -        "regexpp": {
            -          "version": "3.1.0",
            -          "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.1.0.tgz",
            -          "integrity": "sha512-ZOIzd8yVsQQA7j8GCSlPGXwg5PfmA1mrq0JP4nGhh54LaKN3xdai/vHUDu74pKwV8OxseMS65u2NImosQcSD0Q==",
            -          "dev": true
            -        },
            -        "resolve-from": {
            -          "version": "4.0.0",
            -          "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz",
            -          "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==",
            -          "dev": true
            -        },
            -        "semver": {
            -          "version": "7.3.5",
            -          "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz",
            -          "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==",
            -          "dev": true,
            -          "requires": {
            -            "lru-cache": "^6.0.0"
            -          }
            -        },
            -        "shebang-command": {
            -          "version": "2.0.0",
            -          "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz",
            -          "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==",
            -          "dev": true,
            -          "requires": {
            -            "shebang-regex": "^3.0.0"
            -          }
            -        },
            -        "shebang-regex": {
            -          "version": "3.0.0",
            -          "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz",
            -          "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==",
            -          "dev": true
            -        },
            -        "strip-ansi": {
            -          "version": "6.0.0",
            -          "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz",
            -          "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==",
            -          "dev": true,
            -          "requires": {
            -            "ansi-regex": "^5.0.0"
            -          }
            -        },
            -        "strip-json-comments": {
            -          "version": "3.1.1",
            -          "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz",
            -          "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==",
            -          "dev": true
            -        },
            -        "supports-color": {
            -          "version": "7.2.0",
            -          "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
            -          "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
            -          "dev": true,
            -          "requires": {
            -            "has-flag": "^4.0.0"
            -          }
            -        },
            -        "type-check": {
            -          "version": "0.4.0",
            -          "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz",
            -          "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==",
            -          "dev": true,
            -          "requires": {
            -            "prelude-ls": "^1.2.1"
            -          }
            -        },
            -        "which": {
            -          "version": "2.0.2",
            -          "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",
            -          "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==",
            -          "dev": true,
            -          "requires": {
            -            "isexe": "^2.0.0"
            -          }
            -        }
            -      }
            -    },
            -    "eslint-plugin-jsdoc": {
            -      "version": "32.3.0",
            -      "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-32.3.0.tgz",
            -      "integrity": "sha512-zyx7kajDK+tqS1bHuY5sapkad8P8KT0vdd/lE55j47VPG2MeenSYuIY/M/Pvmzq5g0+3JB+P3BJGUXmHxtuKPQ==",
            -      "dev": true,
            -      "requires": {
            -        "comment-parser": "1.1.2",
            -        "debug": "^4.3.1",
            -        "jsdoctypeparser": "^9.0.0",
            -        "lodash": "^4.17.20",
            -        "regextras": "^0.7.1",
            -        "semver": "^7.3.4",
            -        "spdx-expression-parse": "^3.0.1"
            -      },
            -      "dependencies": {
            -        "debug": {
            -          "version": "4.3.1",
            -          "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz",
            -          "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==",
            -          "dev": true,
            -          "requires": {
            -            "ms": "2.1.2"
            -          }
            -        },
            -        "ms": {
            -          "version": "2.1.2",
            -          "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
            -          "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
            -          "dev": true
            -        },
            -        "semver": {
            -          "version": "7.3.5",
            -          "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz",
            -          "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==",
            -          "dev": true,
            -          "requires": {
            -            "lru-cache": "^6.0.0"
            -          }
            -        },
            -        "spdx-expression-parse": {
            -          "version": "3.0.1",
            -          "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz",
            -          "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==",
            -          "dev": true,
            -          "requires": {
            -            "spdx-exceptions": "^2.1.0",
            -            "spdx-license-ids": "^3.0.0"
            -          }
            -        }
            -      }
            -    },
            -    "eslint-plugin-regexp": {
            -      "version": "1.2.0",
            -      "resolved": "https://registry.npmjs.org/eslint-plugin-regexp/-/eslint-plugin-regexp-1.2.0.tgz",
            -      "integrity": "sha512-yHn5D8jTmT1gmPA4Dj2ut0aGg03CkgvpKu3kG/CEQ1OcUmkoykZsiXCysaENpq/BXs60WEpz+tN2n/h4lp+Q0Q==",
            -      "dev": true,
            -      "requires": {
            -        "comment-parser": "^1.1.2",
            -        "eslint-utils": "^3.0.0",
            -        "grapheme-splitter": "^1.0.4",
            -        "jsdoctypeparser": "^9.0.0",
            -        "refa": "^0.9.0",
            -        "regexp-ast-analysis": "^0.3.0",
            -        "regexpp": "^3.2.0",
            -        "scslre": "^0.1.6"
            -      },
            -      "dependencies": {
            -        "eslint-utils": {
            -          "version": "3.0.0",
            -          "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz",
            -          "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==",
            -          "dev": true,
            -          "requires": {
            -            "eslint-visitor-keys": "^2.0.0"
            -          }
            -        },
            -        "regexp-ast-analysis": {
            -          "version": "0.3.0",
            -          "resolved": "https://registry.npmjs.org/regexp-ast-analysis/-/regexp-ast-analysis-0.3.0.tgz",
            -          "integrity": "sha512-11PlbBSUxwWpdj6BdZUKfhDdV9g+cveqHB+BqBQDBD7ZermDBVgtyowUaXTvT0dO3tZYo2bDIr/GoED6X1aYSA==",
            -          "dev": true,
            -          "requires": {
            -            "refa": "^0.9.0",
            -            "regexpp": "^3.2.0"
            -          }
            -        }
            -      }
            -    },
            -    "eslint-scope": {
            -      "version": "5.1.1",
            -      "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz",
            -      "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==",
            -      "dev": true,
            -      "requires": {
            -        "esrecurse": "^4.3.0",
            -        "estraverse": "^4.1.1"
            -      }
            -    },
            -    "eslint-utils": {
            -      "version": "2.1.0",
            -      "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz",
            -      "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==",
            -      "dev": true,
            -      "requires": {
            -        "eslint-visitor-keys": "^1.1.0"
            -      },
            -      "dependencies": {
            -        "eslint-visitor-keys": {
            -          "version": "1.3.0",
            -          "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz",
            -          "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==",
            -          "dev": true
            -        }
            -      }
            -    },
            -    "eslint-visitor-keys": {
            -      "version": "2.0.0",
            -      "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.0.0.tgz",
            -      "integrity": "sha512-QudtT6av5WXels9WjIM7qz1XD1cWGvX4gGXvp/zBn9nXG02D0utdU3Em2m/QjTnrsk6bBjmCygl3rmj118msQQ==",
            -      "dev": true
            -    },
            -    "espree": {
            -      "version": "7.3.1",
            -      "resolved": "https://registry.npmjs.org/espree/-/espree-7.3.1.tgz",
            -      "integrity": "sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g==",
            -      "dev": true,
            -      "requires": {
            -        "acorn": "^7.4.0",
            -        "acorn-jsx": "^5.3.1",
            -        "eslint-visitor-keys": "^1.3.0"
            -      },
            -      "dependencies": {
            -        "acorn": {
            -          "version": "7.4.1",
            -          "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz",
            -          "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==",
            -          "dev": true
            -        },
            -        "eslint-visitor-keys": {
            -          "version": "1.3.0",
            -          "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz",
            -          "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==",
            -          "dev": true
            -        }
            -      }
            -    },
            -    "esprima": {
            -      "version": "3.1.3",
            -      "resolved": "https://registry.npmjs.org/esprima/-/esprima-3.1.3.tgz",
            -      "integrity": "sha1-/cpRzuYTOJXjyI1TXOSdv/YqRjM=",
            -      "dev": true
            -    },
            -    "esquery": {
            -      "version": "1.4.0",
            -      "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz",
            -      "integrity": "sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==",
            -      "dev": true,
            -      "requires": {
            -        "estraverse": "^5.1.0"
            -      },
            -      "dependencies": {
            -        "estraverse": {
            -          "version": "5.2.0",
            -          "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz",
            -          "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==",
            -          "dev": true
            -        }
            -      }
            -    },
            -    "esrecurse": {
            -      "version": "4.3.0",
            -      "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz",
            -      "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==",
            -      "dev": true,
            -      "requires": {
            -        "estraverse": "^5.2.0"
            -      },
            -      "dependencies": {
            -        "estraverse": {
            -          "version": "5.2.0",
            -          "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz",
            -          "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==",
            -          "dev": true
            -        }
            -      }
            -    },
            -    "estraverse": {
            -      "version": "4.2.0",
            -      "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz",
            -      "integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=",
            -      "dev": true
            -    },
            -    "esutils": {
            -      "version": "2.0.2",
            -      "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz",
            -      "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=",
            -      "dev": true
            -    },
            -    "event-target-shim": {
            -      "version": "5.0.1",
            -      "resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz",
            -      "integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==",
            -      "dev": true
            -    },
            -    "eventemitter3": {
            -      "version": "4.0.7",
            -      "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz",
            -      "integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==",
            -      "dev": true
            -    },
            -    "execa": {
            -      "version": "1.0.0",
            -      "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz",
            -      "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==",
            -      "dev": true,
            -      "requires": {
            -        "cross-spawn": "^6.0.0",
            -        "get-stream": "^4.0.0",
            -        "is-stream": "^1.1.0",
            -        "npm-run-path": "^2.0.0",
            -        "p-finally": "^1.0.0",
            -        "signal-exit": "^3.0.0",
            -        "strip-eof": "^1.0.0"
            -      }
            -    },
            -    "expand-brackets": {
            -      "version": "2.1.4",
            -      "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz",
            -      "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=",
            -      "dev": true,
            -      "requires": {
            -        "debug": "^2.3.3",
            -        "define-property": "^0.2.5",
            -        "extend-shallow": "^2.0.1",
            -        "posix-character-classes": "^0.1.0",
            -        "regex-not": "^1.0.0",
            -        "snapdragon": "^0.8.1",
            -        "to-regex": "^3.0.1"
            -      },
            -      "dependencies": {
            -        "define-property": {
            -          "version": "0.2.5",
            -          "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz",
            -          "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=",
            -          "dev": true,
            -          "requires": {
            -            "is-descriptor": "^0.1.0"
            -          }
            -        },
            -        "extend-shallow": {
            -          "version": "2.0.1",
            -          "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
            -          "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
            -          "dev": true,
            -          "requires": {
            -            "is-extendable": "^0.1.0"
            -          }
            -        }
            -      }
            -    },
            -    "expand-tilde": {
            -      "version": "2.0.2",
            -      "resolved": "https://registry.npmjs.org/expand-tilde/-/expand-tilde-2.0.2.tgz",
            -      "integrity": "sha1-l+gBqgUt8CRU3kawK/YhZCzchQI=",
            -      "dev": true,
            -      "requires": {
            -        "homedir-polyfill": "^1.0.1"
            -      }
            -    },
            -    "ext": {
            -      "version": "1.4.0",
            -      "resolved": "https://registry.npmjs.org/ext/-/ext-1.4.0.tgz",
            -      "integrity": "sha512-Key5NIsUxdqKg3vIsdw9dSuXpPCQ297y6wBjL30edxwPgt2E44WcWBZey/ZvUc6sERLTxKdyCu4gZFmUbk1Q7A==",
            -      "dev": true,
            -      "requires": {
            -        "type": "^2.0.0"
            -      },
            -      "dependencies": {
            -        "type": {
            -          "version": "2.0.0",
            -          "resolved": "https://registry.npmjs.org/type/-/type-2.0.0.tgz",
            -          "integrity": "sha512-KBt58xCHry4Cejnc2ISQAF7QY+ORngsWfxezO68+12hKV6lQY8P/psIkcbjeHWn7MqcgciWJyCCevFMJdIXpow==",
            -          "dev": true
            -        }
            -      }
            -    },
            -    "extend": {
            -      "version": "3.0.2",
            -      "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz",
            -      "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==",
            -      "dev": true
            -    },
            -    "extend-shallow": {
            -      "version": "3.0.2",
            -      "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz",
            -      "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=",
            -      "dev": true,
            -      "requires": {
            -        "assign-symbols": "^1.0.0",
            -        "is-extendable": "^1.0.1"
            -      },
            -      "dependencies": {
            -        "is-extendable": {
            -          "version": "1.0.1",
            -          "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz",
            -          "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==",
            -          "dev": true,
            -          "requires": {
            -            "is-plain-object": "^2.0.4"
            -          }
            -        }
            -      }
            -    },
            -    "extglob": {
            -      "version": "2.0.4",
            -      "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz",
            -      "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==",
            -      "dev": true,
            -      "requires": {
            -        "array-unique": "^0.3.2",
            -        "define-property": "^1.0.0",
            -        "expand-brackets": "^2.1.4",
            -        "extend-shallow": "^2.0.1",
            -        "fragment-cache": "^0.2.1",
            -        "regex-not": "^1.0.0",
            -        "snapdragon": "^0.8.1",
            -        "to-regex": "^3.0.1"
            -      },
            -      "dependencies": {
            -        "define-property": {
            -          "version": "1.0.0",
            -          "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz",
            -          "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=",
            -          "dev": true,
            -          "requires": {
            -            "is-descriptor": "^1.0.0"
            -          }
            -        },
            -        "extend-shallow": {
            -          "version": "2.0.1",
            -          "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
            -          "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
            -          "dev": true,
            -          "requires": {
            -            "is-extendable": "^0.1.0"
            -          }
            -        },
            -        "is-accessor-descriptor": {
            -          "version": "1.0.0",
            -          "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz",
            -          "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==",
            -          "dev": true,
            -          "requires": {
            -            "kind-of": "^6.0.0"
            -          }
            -        },
            -        "is-data-descriptor": {
            -          "version": "1.0.0",
            -          "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz",
            -          "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==",
            -          "dev": true,
            -          "requires": {
            -            "kind-of": "^6.0.0"
            -          }
            -        },
            -        "is-descriptor": {
            -          "version": "1.0.2",
            -          "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz",
            -          "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==",
            -          "dev": true,
            -          "requires": {
            -            "is-accessor-descriptor": "^1.0.0",
            -            "is-data-descriptor": "^1.0.0",
            -            "kind-of": "^6.0.2"
            -          }
            -        }
            -      }
            -    },
            -    "extsprintf": {
            -      "version": "1.3.0",
            -      "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz",
            -      "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=",
            -      "dev": true
            -    },
            -    "fancy-log": {
            -      "version": "1.3.3",
            -      "resolved": "https://registry.npmjs.org/fancy-log/-/fancy-log-1.3.3.tgz",
            -      "integrity": "sha512-k9oEhlyc0FrVh25qYuSELjr8oxsCoc4/LEZfg2iJJrfEk/tZL9bCoJE47gqAvI2m/AUjluCS4+3I0eTx8n3AEw==",
            -      "dev": true,
            -      "requires": {
            -        "ansi-gray": "^0.1.1",
            -        "color-support": "^1.1.3",
            -        "parse-node-version": "^1.0.0",
            -        "time-stamp": "^1.0.0"
            -      }
            -    },
            -    "fast-deep-equal": {
            -      "version": "2.0.1",
            -      "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz",
            -      "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=",
            -      "dev": true
            -    },
            -    "fast-glob": {
            -      "version": "2.2.7",
            -      "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-2.2.7.tgz",
            -      "integrity": "sha512-g1KuQwHOZAmOZMuBtHdxDtju+T2RT8jgCC9aANsbpdiDDTSnjgfuVsIBNKbUeJI3oKMRExcfNDtJl4OhbffMsw==",
            -      "dev": true,
            -      "requires": {
            -        "@mrmlnc/readdir-enhanced": "^2.2.1",
            -        "@nodelib/fs.stat": "^1.1.2",
            -        "glob-parent": "^3.1.0",
            -        "is-glob": "^4.0.0",
            -        "merge2": "^1.2.3",
            -        "micromatch": "^3.1.10"
            -      }
            -    },
            -    "fast-json-patch": {
            -      "version": "3.0.0-1",
            -      "resolved": "https://registry.npmjs.org/fast-json-patch/-/fast-json-patch-3.0.0-1.tgz",
            -      "integrity": "sha512-6pdFb07cknxvPzCeLsFHStEy+MysPJPgZQ9LbQ/2O67unQF93SNqfdSqnPPl71YMHX+AD8gbl7iuoGFzHEdDuw==",
            -      "dev": true
            -    },
            -    "fast-json-stable-stringify": {
            -      "version": "2.0.0",
            -      "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz",
            -      "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=",
            -      "dev": true
            -    },
            -    "fast-levenshtein": {
            -      "version": "2.0.6",
            -      "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz",
            -      "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=",
            -      "dev": true
            -    },
            -    "file-entry-cache": {
            -      "version": "6.0.1",
            -      "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz",
            -      "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==",
            -      "dev": true,
            -      "requires": {
            -        "flat-cache": "^3.0.4"
            -      }
            -    },
            -    "file-uri-to-path": {
            -      "version": "1.0.0",
            -      "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz",
            -      "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==",
            -      "dev": true,
            -      "optional": true
            -    },
            -    "fill-range": {
            -      "version": "4.0.0",
            -      "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz",
            -      "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=",
            -      "dev": true,
            -      "requires": {
            -        "extend-shallow": "^2.0.1",
            -        "is-number": "^3.0.0",
            -        "repeat-string": "^1.6.1",
            -        "to-regex-range": "^2.1.0"
            -      },
            -      "dependencies": {
            -        "extend-shallow": {
            -          "version": "2.0.1",
            -          "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
            -          "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
            -          "dev": true,
            -          "requires": {
            -            "is-extendable": "^0.1.0"
            -          }
            -        }
            -      }
            -    },
            -    "find-up": {
            -      "version": "1.1.2",
            -      "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz",
            -      "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=",
            -      "dev": true,
            -      "requires": {
            -        "path-exists": "^2.0.0",
            -        "pinkie-promise": "^2.0.0"
            -      }
            -    },
            -    "findup-sync": {
            -      "version": "3.0.0",
            -      "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-3.0.0.tgz",
            -      "integrity": "sha512-YbffarhcicEhOrm4CtrwdKBdCuz576RLdhJDsIfvNtxUuhdRet1qZcsMjqbePtAseKdAnDyM/IyXbu7PRPRLYg==",
            -      "dev": true,
            -      "requires": {
            -        "detect-file": "^1.0.0",
            -        "is-glob": "^4.0.0",
            -        "micromatch": "^3.0.4",
            -        "resolve-dir": "^1.0.1"
            -      }
            -    },
            -    "fined": {
            -      "version": "1.2.0",
            -      "resolved": "https://registry.npmjs.org/fined/-/fined-1.2.0.tgz",
            -      "integrity": "sha512-ZYDqPLGxDkDhDZBjZBb+oD1+j0rA4E0pXY50eplAAOPg2N/gUBSSk5IM1/QhPfyVo19lJ+CvXpqfvk+b2p/8Ng==",
            -      "dev": true,
            -      "requires": {
            -        "expand-tilde": "^2.0.2",
            -        "is-plain-object": "^2.0.3",
            -        "object.defaults": "^1.1.0",
            -        "object.pick": "^1.2.0",
            -        "parse-filepath": "^1.0.1"
            -      }
            -    },
            -    "flagged-respawn": {
            -      "version": "1.0.1",
            -      "resolved": "https://registry.npmjs.org/flagged-respawn/-/flagged-respawn-1.0.1.tgz",
            -      "integrity": "sha512-lNaHNVymajmk0OJMBn8fVUAU1BtDeKIqKoVhk4xAALB57aALg6b4W0MfJ/cUE0g9YBXy5XhSlPIpYIJ7HaY/3Q==",
            -      "dev": true
            -    },
            -    "flat": {
            -      "version": "4.1.0",
            -      "resolved": "https://registry.npmjs.org/flat/-/flat-4.1.0.tgz",
            -      "integrity": "sha512-Px/TiLIznH7gEDlPXcUD4KnBusa6kR6ayRUVcnEAbreRIuhkqow/mun59BuRXwoYk7ZQOLW1ZM05ilIvK38hFw==",
            -      "dev": true,
            -      "requires": {
            -        "is-buffer": "~2.0.3"
            -      },
            -      "dependencies": {
            -        "is-buffer": {
            -          "version": "2.0.3",
            -          "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.3.tgz",
            -          "integrity": "sha512-U15Q7MXTuZlrbymiz95PJpZxu8IlipAp4dtS3wOdgPXx3mqBnslrWU14kxfHB+Py/+2PVKSr37dMAgM2A4uArw==",
            -          "dev": true
            -        }
            -      }
            -    },
            -    "flat-cache": {
            -      "version": "3.0.4",
            -      "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz",
            -      "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==",
            -      "dev": true,
            -      "requires": {
            -        "flatted": "^3.1.0",
            -        "rimraf": "^3.0.2"
            -      },
            -      "dependencies": {
            -        "rimraf": {
            -          "version": "3.0.2",
            -          "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz",
            -          "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==",
            -          "dev": true,
            -          "requires": {
            -            "glob": "^7.1.3"
            -          }
            -        }
            -      }
            -    },
            -    "flatted": {
            -      "version": "3.1.1",
            -      "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.1.1.tgz",
            -      "integrity": "sha512-zAoAQiudy+r5SvnSw3KJy5os/oRJYHzrzja/tBDqrZtNhUw8bt6y8OBzMWcjWr+8liV8Eb6yOhw8WZ7VFZ5ZzA==",
            -      "dev": true
            -    },
            -    "flush-write-stream": {
            -      "version": "1.1.1",
            -      "resolved": "https://registry.npmjs.org/flush-write-stream/-/flush-write-stream-1.1.1.tgz",
            -      "integrity": "sha512-3Z4XhFZ3992uIq0XOqb9AreonueSYphE6oYbpt5+3u06JWklbsPkNv3ZKkP9Bz/r+1MWCaMoSQ28P85+1Yc77w==",
            -      "dev": true,
            -      "requires": {
            -        "inherits": "^2.0.3",
            -        "readable-stream": "^2.3.6"
            -      }
            -    },
            -    "follow-redirects": {
            -      "version": "1.13.1",
            -      "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.13.1.tgz",
            -      "integrity": "sha512-SSG5xmZh1mkPGyKzjZP8zLjltIfpW32Y5QpdNJyjcfGxK3qo3NDDkZOZSFiGn1A6SclQxY9GzEwAHQ3dmYRWpg==",
            -      "dev": true
            -    },
            -    "for-in": {
            -      "version": "1.0.2",
            -      "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz",
            -      "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=",
            -      "dev": true
            -    },
            -    "for-own": {
            -      "version": "1.0.0",
            -      "resolved": "https://registry.npmjs.org/for-own/-/for-own-1.0.0.tgz",
            -      "integrity": "sha1-xjMy9BXO3EsE2/5wz4NklMU8tEs=",
            -      "dev": true,
            -      "requires": {
            -        "for-in": "^1.0.1"
            -      }
            -    },
            -    "forever-agent": {
            -      "version": "0.6.1",
            -      "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz",
            -      "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=",
            -      "dev": true
            -    },
            -    "form-data": {
            -      "version": "2.3.3",
            -      "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz",
            -      "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==",
            -      "dev": true,
            -      "requires": {
            -        "asynckit": "^0.4.0",
            -        "combined-stream": "^1.0.6",
            -        "mime-types": "^2.1.12"
            -      }
            -    },
            -    "fragment-cache": {
            -      "version": "0.2.1",
            -      "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz",
            -      "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=",
            -      "dev": true,
            -      "requires": {
            -        "map-cache": "^0.2.2"
            -      }
            -    },
            -    "fs-exists-sync": {
            -      "version": "0.1.0",
            -      "resolved": "https://registry.npmjs.org/fs-exists-sync/-/fs-exists-sync-0.1.0.tgz",
            -      "integrity": "sha1-mC1ok6+RjnLQjeyehnP/K1qNat0=",
            -      "dev": true
            -    },
            -    "fs-extra": {
            -      "version": "7.0.1",
            -      "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz",
            -      "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==",
            -      "dev": true,
            -      "requires": {
            -        "graceful-fs": "^4.1.2",
            -        "jsonfile": "^4.0.0",
            -        "universalify": "^0.1.0"
            -      }
            -    },
            -    "fs-mkdirp-stream": {
            -      "version": "1.0.0",
            -      "resolved": "https://registry.npmjs.org/fs-mkdirp-stream/-/fs-mkdirp-stream-1.0.0.tgz",
            -      "integrity": "sha1-C3gV/DIBxqaeFNuYzgmMFpNSWes=",
            -      "dev": true,
            -      "requires": {
            -        "graceful-fs": "^4.1.11",
            -        "through2": "^2.0.3"
            -      }
            -    },
            -    "fs.realpath": {
            -      "version": "1.0.0",
            -      "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
            -      "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=",
            -      "dev": true
            -    },
            -    "fsevents": {
            -      "version": "1.2.13",
            -      "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.13.tgz",
            -      "integrity": "sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==",
            -      "dev": true,
            -      "optional": true,
            -      "requires": {
            -        "bindings": "^1.5.0",
            -        "nan": "^2.12.1"
            -      }
            -    },
            -    "function-bind": {
            -      "version": "1.1.1",
            -      "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
            -      "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==",
            -      "dev": true
            -    },
            -    "functional-red-black-tree": {
            -      "version": "1.0.1",
            -      "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz",
            -      "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=",
            -      "dev": true
            -    },
            -    "geometry-interfaces": {
            -      "version": "1.1.4",
            -      "resolved": "https://registry.npmjs.org/geometry-interfaces/-/geometry-interfaces-1.1.4.tgz",
            -      "integrity": "sha512-qD6OdkT6NcES9l4Xx3auTpwraQruU7dARbQPVO71MKvkGYw5/z/oIiGymuFXrRaEQa5Y67EIojUpaLeGEa5hGA==",
            -      "dev": true
            -    },
            -    "get-caller-file": {
            -      "version": "1.0.3",
            -      "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz",
            -      "integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==",
            -      "dev": true
            -    },
            -    "get-func-name": {
            -      "version": "2.0.0",
            -      "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz",
            -      "integrity": "sha1-6td0q+5y4gQJQzoGY2YCPdaIekE=",
            -      "dev": true
            -    },
            -    "get-intrinsic": {
            -      "version": "1.1.1",
            -      "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz",
            -      "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==",
            -      "dev": true,
            -      "requires": {
            -        "function-bind": "^1.1.1",
            -        "has": "^1.0.3",
            -        "has-symbols": "^1.0.1"
            -      },
            -      "dependencies": {
            -        "has-symbols": {
            -          "version": "1.0.2",
            -          "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz",
            -          "integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==",
            -          "dev": true
            -        }
            -      }
            -    },
            -    "get-stdin": {
            -      "version": "6.0.0",
            -      "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-6.0.0.tgz",
            -      "integrity": "sha512-jp4tHawyV7+fkkSKyvjuLZswblUtz+SQKzSWnBbii16BuZksJlU1wuBYXY75r+duh/llF1ur6oNwi+2ZzjKZ7g==",
            -      "dev": true
            -    },
            -    "get-stream": {
            -      "version": "4.1.0",
            -      "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz",
            -      "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==",
            -      "dev": true,
            -      "requires": {
            -        "pump": "^3.0.0"
            -      }
            -    },
            -    "get-value": {
            -      "version": "2.0.6",
            -      "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz",
            -      "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=",
            -      "dev": true
            -    },
            -    "getpass": {
            -      "version": "0.1.7",
            -      "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz",
            -      "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=",
            -      "dev": true,
            -      "requires": {
            -        "assert-plus": "^1.0.0"
            -      }
            -    },
            -    "git-config-path": {
            -      "version": "1.0.1",
            -      "resolved": "https://registry.npmjs.org/git-config-path/-/git-config-path-1.0.1.tgz",
            -      "integrity": "sha1-bTP37WPbDQ4RgTFQO6s6ykfVRmQ=",
            -      "dev": true,
            -      "requires": {
            -        "extend-shallow": "^2.0.1",
            -        "fs-exists-sync": "^0.1.0",
            -        "homedir-polyfill": "^1.0.0"
            -      },
            -      "dependencies": {
            -        "extend-shallow": {
            -          "version": "2.0.1",
            -          "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
            -          "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
            -          "dev": true,
            -          "requires": {
            -            "is-extendable": "^0.1.0"
            -          }
            -        }
            -      }
            -    },
            -    "gitlab": {
            -      "version": "10.2.1",
            -      "resolved": "https://registry.npmjs.org/gitlab/-/gitlab-10.2.1.tgz",
            -      "integrity": "sha512-z+DxRF1C9uayVbocs9aJkJz+kGy14TSm1noB/rAIEBbXOkOYbjKxyuqJzt+0zeFpXFdgA0yq6DVVbvM7HIfGwg==",
            -      "dev": true,
            -      "requires": {
            -        "form-data": "^2.5.0",
            -        "humps": "^2.0.1",
            -        "ky": "^0.12.0",
            -        "ky-universal": "^0.3.0",
            -        "li": "^1.3.0",
            -        "query-string": "^6.8.2",
            -        "universal-url": "^2.0.0"
            -      },
            -      "dependencies": {
            -        "form-data": {
            -          "version": "2.5.1",
            -          "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.5.1.tgz",
            -          "integrity": "sha512-m21N3WOmEEURgk6B9GLOE4RuWOFf28Lhh9qGYeNlGq4VDXUlJy2th2slBNU8Gp8EzloYZOibZJ7t5ecIrFSjVA==",
            -          "dev": true,
            -          "requires": {
            -            "asynckit": "^0.4.0",
            -            "combined-stream": "^1.0.6",
            -            "mime-types": "^2.1.12"
            -          }
            -        }
            -      }
            -    },
            -    "glob": {
            -      "version": "7.1.3",
            -      "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz",
            -      "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==",
            -      "dev": true,
            -      "requires": {
            -        "fs.realpath": "^1.0.0",
            -        "inflight": "^1.0.4",
            -        "inherits": "2",
            -        "minimatch": "^3.0.4",
            -        "once": "^1.3.0",
            -        "path-is-absolute": "^1.0.0"
            -      }
            -    },
            -    "glob-parent": {
            -      "version": "3.1.0",
            -      "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz",
            -      "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=",
            -      "dev": true,
            -      "requires": {
            -        "is-glob": "^3.1.0",
            -        "path-dirname": "^1.0.0"
            -      },
            -      "dependencies": {
            -        "is-glob": {
            -          "version": "3.1.0",
            -          "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz",
            -          "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=",
            -          "dev": true,
            -          "requires": {
            -            "is-extglob": "^2.1.0"
            -          }
            -        }
            -      }
            -    },
            -    "glob-stream": {
            -      "version": "6.1.0",
            -      "resolved": "https://registry.npmjs.org/glob-stream/-/glob-stream-6.1.0.tgz",
            -      "integrity": "sha1-cEXJlBOz65SIjYOrRtC0BMx73eQ=",
            -      "dev": true,
            -      "requires": {
            -        "extend": "^3.0.0",
            -        "glob": "^7.1.1",
            -        "glob-parent": "^3.1.0",
            -        "is-negated-glob": "^1.0.0",
            -        "ordered-read-streams": "^1.0.0",
            -        "pumpify": "^1.3.5",
            -        "readable-stream": "^2.1.5",
            -        "remove-trailing-separator": "^1.0.1",
            -        "to-absolute-glob": "^2.0.0",
            -        "unique-stream": "^2.0.2"
            -      }
            -    },
            -    "glob-to-regexp": {
            -      "version": "0.3.0",
            -      "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.3.0.tgz",
            -      "integrity": "sha1-jFoUlNIGbFcMw7/kSWF1rMTVAqs=",
            -      "dev": true
            -    },
            -    "glob-watcher": {
            -      "version": "5.0.3",
            -      "resolved": "https://registry.npmjs.org/glob-watcher/-/glob-watcher-5.0.3.tgz",
            -      "integrity": "sha512-8tWsULNEPHKQ2MR4zXuzSmqbdyV5PtwwCaWSGQ1WwHsJ07ilNeN1JB8ntxhckbnpSHaf9dXFUHzIWvm1I13dsg==",
            -      "dev": true,
            -      "requires": {
            -        "anymatch": "^2.0.0",
            -        "async-done": "^1.2.0",
            -        "chokidar": "^2.0.0",
            -        "is-negated-glob": "^1.0.0",
            -        "just-debounce": "^1.0.0",
            -        "object.defaults": "^1.1.0"
            -      }
            -    },
            -    "global-modules": {
            -      "version": "1.0.0",
            -      "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-1.0.0.tgz",
            -      "integrity": "sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg==",
            -      "dev": true,
            -      "requires": {
            -        "global-prefix": "^1.0.1",
            -        "is-windows": "^1.0.1",
            -        "resolve-dir": "^1.0.0"
            -      }
            -    },
            -    "global-prefix": {
            -      "version": "1.0.2",
            -      "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-1.0.2.tgz",
            -      "integrity": "sha1-2/dDxsFJklk8ZVVoy2btMsASLr4=",
            -      "dev": true,
            -      "requires": {
            -        "expand-tilde": "^2.0.2",
            -        "homedir-polyfill": "^1.0.1",
            -        "ini": "^1.3.4",
            -        "is-windows": "^1.0.1",
            -        "which": "^1.2.14"
            -      }
            -    },
            -    "globals": {
            -      "version": "13.7.0",
            -      "resolved": "https://registry.npmjs.org/globals/-/globals-13.7.0.tgz",
            -      "integrity": "sha512-Aipsz6ZKRxa/xQkZhNg0qIWXT6x6rD46f6x/PCnBomlttdIyAPak4YD9jTmKpZ72uROSMU87qJtcgpgHaVchiA==",
            -      "dev": true,
            -      "requires": {
            -        "type-fest": "^0.20.2"
            -      },
            -      "dependencies": {
            -        "type-fest": {
            -          "version": "0.20.2",
            -          "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz",
            -          "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==",
            -          "dev": true
            -        }
            -      }
            -    },
            -    "globby": {
            -      "version": "6.1.0",
            -      "resolved": "https://registry.npmjs.org/globby/-/globby-6.1.0.tgz",
            -      "integrity": "sha1-9abXDoOV4hyFj7BInWTfAkJNUGw=",
            -      "dev": true,
            -      "requires": {
            -        "array-union": "^1.0.1",
            -        "glob": "^7.0.3",
            -        "object-assign": "^4.0.1",
            -        "pify": "^2.0.0",
            -        "pinkie-promise": "^2.0.0"
            -      }
            -    },
            -    "glogg": {
            -      "version": "1.0.2",
            -      "resolved": "https://registry.npmjs.org/glogg/-/glogg-1.0.2.tgz",
            -      "integrity": "sha512-5mwUoSuBk44Y4EshyiqcH95ZntbDdTQqA3QYSrxmzj28Ai0vXBGMH1ApSANH14j2sIRtqCEyg6PfsuP7ElOEDA==",
            -      "dev": true,
            -      "requires": {
            -        "sparkles": "^1.0.0"
            -      }
            -    },
            -    "graceful-fs": {
            -      "version": "4.2.3",
            -      "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.3.tgz",
            -      "integrity": "sha512-a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ==",
            -      "dev": true
            -    },
            -    "grapheme-splitter": {
            -      "version": "1.0.4",
            -      "resolved": "https://registry.npmjs.org/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz",
            -      "integrity": "sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==",
            -      "dev": true
            -    },
            -    "growl": {
            -      "version": "1.10.5",
            -      "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz",
            -      "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==",
            -      "dev": true
            -    },
            -    "gulp": {
            -      "version": "4.0.2",
            -      "resolved": "https://registry.npmjs.org/gulp/-/gulp-4.0.2.tgz",
            -      "integrity": "sha512-dvEs27SCZt2ibF29xYgmnwwCYZxdxhQ/+LFWlbAW8y7jt68L/65402Lz3+CKy0Ov4rOs+NERmDq7YlZaDqUIfA==",
            -      "dev": true,
            -      "requires": {
            -        "glob-watcher": "^5.0.3",
            -        "gulp-cli": "^2.2.0",
            -        "undertaker": "^1.2.1",
            -        "vinyl-fs": "^3.0.0"
            -      },
            -      "dependencies": {
            -        "gulp-cli": {
            -          "version": "2.2.0",
            -          "resolved": "https://registry.npmjs.org/gulp-cli/-/gulp-cli-2.2.0.tgz",
            -          "integrity": "sha512-rGs3bVYHdyJpLqR0TUBnlcZ1O5O++Zs4bA0ajm+zr3WFCfiSLjGwoCBqFs18wzN+ZxahT9DkOK5nDf26iDsWjA==",
            -          "dev": true,
            -          "requires": {
            -            "ansi-colors": "^1.0.1",
            -            "archy": "^1.0.0",
            -            "array-sort": "^1.0.0",
            -            "color-support": "^1.1.3",
            -            "concat-stream": "^1.6.0",
            -            "copy-props": "^2.0.1",
            -            "fancy-log": "^1.3.2",
            -            "gulplog": "^1.0.0",
            -            "interpret": "^1.1.0",
            -            "isobject": "^3.0.1",
            -            "liftoff": "^3.1.0",
            -            "matchdep": "^2.0.0",
            -            "mute-stdout": "^1.0.0",
            -            "pretty-hrtime": "^1.0.0",
            -            "replace-homedir": "^1.0.0",
            -            "semver-greatest-satisfied-range": "^1.1.0",
            -            "v8flags": "^3.0.1",
            -            "yargs": "^7.1.0"
            -          }
            -        },
            -        "yargs": {
            -          "version": "7.1.0",
            -          "resolved": "https://registry.npmjs.org/yargs/-/yargs-7.1.0.tgz",
            -          "integrity": "sha1-a6MY6xaWFyf10oT46gA+jWFU0Mg=",
            -          "dev": true,
            -          "requires": {
            -            "camelcase": "^3.0.0",
            -            "cliui": "^3.2.0",
            -            "decamelize": "^1.1.1",
            -            "get-caller-file": "^1.0.1",
            -            "os-locale": "^1.4.0",
            -            "read-pkg-up": "^1.0.1",
            -            "require-directory": "^2.1.1",
            -            "require-main-filename": "^1.0.1",
            -            "set-blocking": "^2.0.0",
            -            "string-width": "^1.0.2",
            -            "which-module": "^1.0.0",
            -            "y18n": "^3.2.1",
            -            "yargs-parser": "^5.0.0"
            -          }
            -        }
            -      }
            -    },
            -    "gulp-concat": {
            -      "version": "2.6.1",
            -      "resolved": "https://registry.npmjs.org/gulp-concat/-/gulp-concat-2.6.1.tgz",
            -      "integrity": "sha1-Yz0WyV2IUEYorQJmVmPO5aR5M1M=",
            -      "dev": true,
            -      "requires": {
            -        "concat-with-sourcemaps": "^1.0.0",
            -        "through2": "^2.0.0",
            -        "vinyl": "^2.0.0"
            -      }
            -    },
            -    "gulp-header": {
            -      "version": "2.0.7",
            -      "resolved": "https://registry.npmjs.org/gulp-header/-/gulp-header-2.0.7.tgz",
            -      "integrity": "sha512-qppGkYGQZnt/mRJiiR5wYZIUwNUn47Xpg4+6tHYDVeAW5IDLbHBQwbw7axfMLWGE+gKQpB+yXLeslHMw1/Haog==",
            -      "dev": true,
            -      "requires": {
            -        "concat-with-sourcemaps": "^1.1.0",
            -        "lodash.template": "^4.4.0",
            -        "map-stream": "0.0.7",
            -        "through2": "^2.0.0"
            -      }
            -    },
            -    "gulp-jsdoc3": {
            -      "version": "3.0.0",
            -      "resolved": "https://registry.npmjs.org/gulp-jsdoc3/-/gulp-jsdoc3-3.0.0.tgz",
            -      "integrity": "sha512-rE2jAwCPA8XFi9g4V3Z3LPhZNjxuMTIYQVMjdqZAQpRfJITLVaUK3xfmiiNTMc7j+fT7pL8Q5yj7ZPRdwCJWNg==",
            -      "dev": true,
            -      "requires": {
            -        "ansi-colors": "^4.1.1",
            -        "beeper": "^2.0.0",
            -        "debug": "^4.1.1",
            -        "fancy-log": "^1.3.3",
            -        "ink-docstrap": "^1.3.2",
            -        "jsdoc": "^3.6.3",
            -        "map-stream": "0.0.7",
            -        "tmp": "0.1.0"
            -      },
            -      "dependencies": {
            -        "ansi-colors": {
            -          "version": "4.1.1",
            -          "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz",
            -          "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==",
            -          "dev": true
            -        },
            -        "debug": {
            -          "version": "4.1.1",
            -          "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz",
            -          "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==",
            -          "dev": true,
            -          "requires": {
            -            "ms": "^2.1.1"
            -          }
            -        },
            -        "ms": {
            -          "version": "2.1.2",
            -          "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
            -          "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
            -          "dev": true
            -        }
            -      }
            -    },
            -    "gulp-rename": {
            -      "version": "1.4.0",
            -      "resolved": "https://registry.npmjs.org/gulp-rename/-/gulp-rename-1.4.0.tgz",
            -      "integrity": "sha512-swzbIGb/arEoFK89tPY58vg3Ok1bw+d35PfUNwWqdo7KM4jkmuGA78JiDNqR+JeZFaeeHnRg9N7aihX3YPmsyg==",
            -      "dev": true
            -    },
            -    "gulp-replace": {
            -      "version": "1.0.0",
            -      "resolved": "https://registry.npmjs.org/gulp-replace/-/gulp-replace-1.0.0.tgz",
            -      "integrity": "sha512-lgdmrFSI1SdhNMXZQbrC75MOl1UjYWlOWNbNRnz+F/KHmgxt3l6XstBoAYIdadwETFyG/6i+vWUSCawdC3pqOw==",
            -      "dev": true,
            -      "requires": {
            -        "istextorbinary": "2.2.1",
            -        "readable-stream": "^2.0.1",
            -        "replacestream": "^4.0.0"
            -      }
            -    },
            -    "gulp-uglify": {
            -      "version": "3.0.2",
            -      "resolved": "https://registry.npmjs.org/gulp-uglify/-/gulp-uglify-3.0.2.tgz",
            -      "integrity": "sha512-gk1dhB74AkV2kzqPMQBLA3jPoIAPd/nlNzP2XMDSG8XZrqnlCiDGAqC+rZOumzFvB5zOphlFh6yr3lgcAb/OOg==",
            -      "dev": true,
            -      "requires": {
            -        "array-each": "^1.0.1",
            -        "extend-shallow": "^3.0.2",
            -        "gulplog": "^1.0.0",
            -        "has-gulplog": "^0.1.0",
            -        "isobject": "^3.0.1",
            -        "make-error-cause": "^1.1.1",
            -        "safe-buffer": "^5.1.2",
            -        "through2": "^2.0.0",
            -        "uglify-js": "^3.0.5",
            -        "vinyl-sourcemaps-apply": "^0.2.0"
            -      }
            -    },
            -    "gulplog": {
            -      "version": "1.0.0",
            -      "resolved": "https://registry.npmjs.org/gulplog/-/gulplog-1.0.0.tgz",
            -      "integrity": "sha1-4oxNRdBey77YGDY86PnFkmIp/+U=",
            -      "dev": true,
            -      "requires": {
            -        "glogg": "^1.0.0"
            -      }
            -    },
            -    "gzip-size": {
            -      "version": "5.1.1",
            -      "resolved": "https://registry.npmjs.org/gzip-size/-/gzip-size-5.1.1.tgz",
            -      "integrity": "sha512-FNHi6mmoHvs1mxZAds4PpdCS6QG8B4C1krxJsMutgxl5t3+GlRTzzI3NEkifXx2pVsOvJdOGSmIgDhQ55FwdPA==",
            -      "dev": true,
            -      "requires": {
            -        "duplexer": "^0.1.1",
            -        "pify": "^4.0.1"
            -      },
            -      "dependencies": {
            -        "pify": {
            -          "version": "4.0.1",
            -          "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz",
            -          "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==",
            -          "dev": true
            -        }
            -      }
            -    },
            -    "har-schema": {
            -      "version": "2.0.0",
            -      "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz",
            -      "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=",
            -      "dev": true
            -    },
            -    "har-validator": {
            -      "version": "5.1.3",
            -      "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.3.tgz",
            -      "integrity": "sha512-sNvOCzEQNr/qrvJgc3UG/kD4QtlHycrzwS+6mfTrrSq97BvaYcPZZI1ZSqGSPR73Cxn4LKTD4PttRwfU7jWq5g==",
            -      "dev": true,
            -      "requires": {
            -        "ajv": "^6.5.5",
            -        "har-schema": "^2.0.0"
            -      }
            -    },
            -    "has": {
            -      "version": "1.0.3",
            -      "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz",
            -      "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==",
            -      "dev": true,
            -      "requires": {
            -        "function-bind": "^1.1.1"
            -      }
            -    },
            -    "has-bigints": {
            -      "version": "1.0.1",
            -      "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.1.tgz",
            -      "integrity": "sha512-LSBS2LjbNBTf6287JEbEzvJgftkF5qFkmCo9hDRpAzKhUOlJ+hx8dd4USs00SgsUNwc4617J9ki5YtEClM2ffA==",
            -      "dev": true
            -    },
            -    "has-flag": {
            -      "version": "3.0.0",
            -      "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
            -      "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=",
            -      "dev": true
            -    },
            -    "has-gulplog": {
            -      "version": "0.1.0",
            -      "resolved": "https://registry.npmjs.org/has-gulplog/-/has-gulplog-0.1.0.tgz",
            -      "integrity": "sha1-ZBTIKRNpfaUVkDl9r7EvIpZ4Ec4=",
            -      "dev": true,
            -      "requires": {
            -        "sparkles": "^1.0.0"
            -      }
            -    },
            -    "has-symbols": {
            -      "version": "1.0.0",
            -      "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.0.tgz",
            -      "integrity": "sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q=",
            -      "dev": true
            -    },
            -    "has-value": {
            -      "version": "1.0.0",
            -      "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz",
            -      "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=",
            -      "dev": true,
            -      "requires": {
            -        "get-value": "^2.0.6",
            -        "has-values": "^1.0.0",
            -        "isobject": "^3.0.0"
            -      }
            -    },
            -    "has-values": {
            -      "version": "1.0.0",
            -      "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz",
            -      "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=",
            -      "dev": true,
            -      "requires": {
            -        "is-number": "^3.0.0",
            -        "kind-of": "^4.0.0"
            -      },
            -      "dependencies": {
            -        "kind-of": {
            -          "version": "4.0.0",
            -          "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz",
            -          "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=",
            -          "dev": true,
            -          "requires": {
            -            "is-buffer": "^1.1.5"
            -          }
            -        }
            -      }
            -    },
            -    "hasurl": {
            -      "version": "1.0.0",
            -      "resolved": "https://registry.npmjs.org/hasurl/-/hasurl-1.0.0.tgz",
            -      "integrity": "sha512-43ypUd3DbwyCT01UYpA99AEZxZ4aKtRxWGBHEIbjcOsUghd9YUON0C+JF6isNjaiwC/UF5neaUudy6JS9jZPZQ==",
            -      "dev": true
            -    },
            -    "he": {
            -      "version": "1.2.0",
            -      "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz",
            -      "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==",
            -      "dev": true
            -    },
            -    "homedir-polyfill": {
            -      "version": "1.0.3",
            -      "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz",
            -      "integrity": "sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA==",
            -      "dev": true,
            -      "requires": {
            -        "parse-passwd": "^1.0.0"
            -      }
            -    },
            -    "hosted-git-info": {
            -      "version": "2.8.9",
            -      "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz",
            -      "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==",
            -      "dev": true
            -    },
            -    "html-encoding-sniffer": {
            -      "version": "1.0.2",
            -      "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-1.0.2.tgz",
            -      "integrity": "sha512-71lZziiDnsuabfdYiUeWdCVyKuqwWi23L8YeIgV9jSSZHCtb6wB1BKWooH7L3tn4/FuZJMVWyNaIDr4RGmaSYw==",
            -      "dev": true,
            -      "requires": {
            -        "whatwg-encoding": "^1.0.1"
            -      }
            -    },
            -    "htmlparser2": {
            -      "version": "4.0.0",
            -      "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-4.0.0.tgz",
            -      "integrity": "sha512-cChwXn5Vam57fyXajDtPXL1wTYc8JtLbr2TN76FYu05itVVVealxLowe2B3IEznJG4p9HAYn/0tJaRlGuEglFQ==",
            -      "dev": true,
            -      "requires": {
            -        "domelementtype": "^2.0.1",
            -        "domhandler": "^3.0.0",
            -        "domutils": "^2.0.0",
            -        "entities": "^2.0.0"
            -      }
            -    },
            -    "http-proxy": {
            -      "version": "1.18.1",
            -      "resolved": "https://registry.npmjs.org/http-proxy/-/http-proxy-1.18.1.tgz",
            -      "integrity": "sha512-7mz/721AbnJwIVbnaSv1Cz3Am0ZLT/UBwkC92VlxhXv/k/BBQfM2fXElQNC27BVGr0uwUpplYPQM9LnaBMR5NQ==",
            -      "dev": true,
            -      "requires": {
            -        "eventemitter3": "^4.0.0",
            -        "follow-redirects": "^1.0.0",
            -        "requires-port": "^1.0.0"
            -      }
            -    },
            -    "http-proxy-agent": {
            -      "version": "2.1.0",
            -      "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-2.1.0.tgz",
            -      "integrity": "sha512-qwHbBLV7WviBl0rQsOzH6o5lwyOIvwp/BdFnvVxXORldu5TmjFfjzBcWUWS5kWAZhmv+JtiDhSuQCp4sBfbIgg==",
            -      "dev": true,
            -      "requires": {
            -        "agent-base": "4",
            -        "debug": "3.1.0"
            -      },
            -      "dependencies": {
            -        "debug": {
            -          "version": "3.1.0",
            -          "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz",
            -          "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==",
            -          "dev": true,
            -          "requires": {
            -            "ms": "2.0.0"
            -          }
            -        }
            -      }
            -    },
            -    "http-server": {
            -      "version": "0.12.3",
            -      "resolved": "https://registry.npmjs.org/http-server/-/http-server-0.12.3.tgz",
            -      "integrity": "sha512-be0dKG6pni92bRjq0kvExtj/NrrAd28/8fCXkaI/4piTwQMSDSLMhWyW0NI1V+DBI3aa1HMlQu46/HjVLfmugA==",
            -      "dev": true,
            -      "requires": {
            -        "basic-auth": "^1.0.3",
            -        "colors": "^1.4.0",
            -        "corser": "^2.0.1",
            -        "ecstatic": "^3.3.2",
            -        "http-proxy": "^1.18.0",
            -        "minimist": "^1.2.5",
            -        "opener": "^1.5.1",
            -        "portfinder": "^1.0.25",
            -        "secure-compare": "3.0.1",
            -        "union": "~0.5.0"
            -      },
            -      "dependencies": {
            -        "minimist": {
            -          "version": "1.2.5",
            -          "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
            -          "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==",
            -          "dev": true
            -        }
            -      }
            -    },
            -    "http-signature": {
            -      "version": "1.2.0",
            -      "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz",
            -      "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=",
            -      "dev": true,
            -      "requires": {
            -        "assert-plus": "^1.0.0",
            -        "jsprim": "^1.2.2",
            -        "sshpk": "^1.7.0"
            -      }
            -    },
            -    "https-proxy-agent": {
            -      "version": "2.2.4",
            -      "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-2.2.4.tgz",
            -      "integrity": "sha512-OmvfoQ53WLjtA9HeYP9RNrWMJzzAz1JGaSFr1nijg0PVR1JaD/xbJq1mdEIIlxGpXp9eSe/O2LgU9DJmTPd0Eg==",
            -      "dev": true,
            -      "requires": {
            -        "agent-base": "^4.3.0",
            -        "debug": "^3.1.0"
            -      },
            -      "dependencies": {
            -        "debug": {
            -          "version": "3.2.6",
            -          "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz",
            -          "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==",
            -          "dev": true,
            -          "requires": {
            -            "ms": "^2.1.1"
            -          }
            -        },
            -        "ms": {
            -          "version": "2.1.2",
            -          "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
            -          "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
            -          "dev": true
            -        }
            -      }
            -    },
            -    "humps": {
            -      "version": "2.0.1",
            -      "resolved": "https://registry.npmjs.org/humps/-/humps-2.0.1.tgz",
            -      "integrity": "sha1-3QLqYIG9BWjcXQcxhEY5V7qe+ao=",
            -      "dev": true
            -    },
            -    "hyperlinker": {
            -      "version": "1.0.0",
            -      "resolved": "https://registry.npmjs.org/hyperlinker/-/hyperlinker-1.0.0.tgz",
            -      "integrity": "sha512-Ty8UblRWFEcfSuIaajM34LdPXIhbs1ajEX/BBPv24J+enSVaEVY63xQ6lTO9VRYS5LAoghIG0IDJ+p+IPzKUQQ==",
            -      "dev": true
            -    },
            -    "iconv-lite": {
            -      "version": "0.4.24",
            -      "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",
            -      "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==",
            -      "dev": true,
            -      "requires": {
            -        "safer-buffer": ">= 2.1.2 < 3"
            -      }
            -    },
            -    "ignore": {
            -      "version": "4.0.6",
            -      "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz",
            -      "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==",
            -      "dev": true
            -    },
            -    "import-fresh": {
            -      "version": "2.0.0",
            -      "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-2.0.0.tgz",
            -      "integrity": "sha1-2BNVwVYS04bGH53dOSLUMEgipUY=",
            -      "dev": true,
            -      "requires": {
            -        "caller-path": "^2.0.0",
            -        "resolve-from": "^3.0.0"
            -      },
            -      "dependencies": {
            -        "resolve-from": {
            -          "version": "3.0.0",
            -          "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz",
            -          "integrity": "sha1-six699nWiBvItuZTM17rywoYh0g=",
            -          "dev": true
            -        }
            -      }
            -    },
            -    "imurmurhash": {
            -      "version": "0.1.4",
            -      "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz",
            -      "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=",
            -      "dev": true
            -    },
            -    "indent-string": {
            -      "version": "3.2.0",
            -      "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-3.2.0.tgz",
            -      "integrity": "sha1-Sl/W0nzDMvN+VBmlBNu4NxBckok=",
            -      "dev": true
            -    },
            -    "inflight": {
            -      "version": "1.0.6",
            -      "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
            -      "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=",
            -      "dev": true,
            -      "requires": {
            -        "once": "^1.3.0",
            -        "wrappy": "1"
            -      }
            -    },
            -    "inherits": {
            -      "version": "2.0.3",
            -      "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
            -      "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=",
            -      "dev": true
            -    },
            -    "ini": {
            -      "version": "1.3.7",
            -      "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.7.tgz",
            -      "integrity": "sha512-iKpRpXP+CrP2jyrxvg1kMUpXDyRUFDWurxbnVT1vQPx+Wz9uCYsMIqYuSBLV+PAaZG/d7kRLKRFc9oDMsH+mFQ==",
            -      "dev": true
            -    },
            -    "ink-docstrap": {
            -      "version": "1.3.2",
            -      "resolved": "https://registry.npmjs.org/ink-docstrap/-/ink-docstrap-1.3.2.tgz",
            -      "integrity": "sha512-STx5orGQU1gfrkoI/fMU7lX6CSP7LBGO10gXNgOZhwKhUqbtNjCkYSewJtNnLmWP1tAGN6oyEpG1HFPw5vpa5Q==",
            -      "dev": true,
            -      "requires": {
            -        "moment": "^2.14.1",
            -        "sanitize-html": "^1.13.0"
            -      }
            -    },
            -    "interpret": {
            -      "version": "1.2.0",
            -      "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.2.0.tgz",
            -      "integrity": "sha512-mT34yGKMNceBQUoVn7iCDKDntA7SC6gycMAWzGx1z/CMCTV7b2AAtXlo3nRyHZ1FelRkQbQjprHSYGwzLtkVbw==",
            -      "dev": true
            -    },
            -    "invert-kv": {
            -      "version": "1.0.0",
            -      "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz",
            -      "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=",
            -      "dev": true
            -    },
            -    "is-absolute": {
            -      "version": "1.0.0",
            -      "resolved": "https://registry.npmjs.org/is-absolute/-/is-absolute-1.0.0.tgz",
            -      "integrity": "sha512-dOWoqflvcydARa360Gvv18DZ/gRuHKi2NU/wU5X1ZFzdYfH29nkiNZsF3mp4OJ3H4yo9Mx8A/uAGNzpzPN3yBA==",
            -      "dev": true,
            -      "requires": {
            -        "is-relative": "^1.0.0",
            -        "is-windows": "^1.0.1"
            -      }
            -    },
            -    "is-accessor-descriptor": {
            -      "version": "0.1.6",
            -      "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz",
            -      "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=",
            -      "dev": true,
            -      "requires": {
            -        "kind-of": "^3.0.2"
            -      },
            -      "dependencies": {
            -        "kind-of": {
            -          "version": "3.2.2",
            -          "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
            -          "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
            -          "dev": true,
            -          "requires": {
            -            "is-buffer": "^1.1.5"
            -          }
            -        }
            -      }
            -    },
            -    "is-arrayish": {
            -      "version": "0.2.1",
            -      "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz",
            -      "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=",
            -      "dev": true
            -    },
            -    "is-bigint": {
            -      "version": "1.0.2",
            -      "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.2.tgz",
            -      "integrity": "sha512-0JV5+SOCQkIdzjBK9buARcV804Ddu7A0Qet6sHi3FimE9ne6m4BGQZfRn+NZiXbBk4F4XmHfDZIipLj9pX8dSA==",
            -      "dev": true
            -    },
            -    "is-binary-path": {
            -      "version": "1.0.1",
            -      "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz",
            -      "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=",
            -      "dev": true,
            -      "requires": {
            -        "binary-extensions": "^1.0.0"
            -      }
            -    },
            -    "is-boolean-object": {
            -      "version": "1.1.1",
            -      "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.1.tgz",
            -      "integrity": "sha512-bXdQWkECBUIAcCkeH1unwJLIpZYaa5VvuygSyS/c2lf719mTKZDU5UdDRlpd01UjADgmW8RfqaP+mRaVPdr/Ng==",
            -      "dev": true,
            -      "requires": {
            -        "call-bind": "^1.0.2"
            -      }
            -    },
            -    "is-buffer": {
            -      "version": "1.1.6",
            -      "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz",
            -      "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==",
            -      "dev": true
            -    },
            -    "is-callable": {
            -      "version": "1.1.4",
            -      "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.4.tgz",
            -      "integrity": "sha512-r5p9sxJjYnArLjObpjA4xu5EKI3CuKHkJXMhT7kwbpUyIFD1n5PMAsoPvWnvtZiNz7LjkYDRZhd7FlI0eMijEA==",
            -      "dev": true
            -    },
            -    "is-data-descriptor": {
            -      "version": "0.1.4",
            -      "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz",
            -      "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=",
            -      "dev": true,
            -      "requires": {
            -        "kind-of": "^3.0.2"
            -      },
            -      "dependencies": {
            -        "kind-of": {
            -          "version": "3.2.2",
            -          "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
            -          "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
            -          "dev": true,
            -          "requires": {
            -            "is-buffer": "^1.1.5"
            -          }
            -        }
            -      }
            -    },
            -    "is-date-object": {
            -      "version": "1.0.1",
            -      "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.1.tgz",
            -      "integrity": "sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY=",
            -      "dev": true
            -    },
            -    "is-descriptor": {
            -      "version": "0.1.6",
            -      "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz",
            -      "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==",
            -      "dev": true,
            -      "requires": {
            -        "is-accessor-descriptor": "^0.1.6",
            -        "is-data-descriptor": "^0.1.4",
            -        "kind-of": "^5.0.0"
            -      },
            -      "dependencies": {
            -        "kind-of": {
            -          "version": "5.1.0",
            -          "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz",
            -          "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==",
            -          "dev": true
            -        }
            -      }
            -    },
            -    "is-directory": {
            -      "version": "0.3.1",
            -      "resolved": "https://registry.npmjs.org/is-directory/-/is-directory-0.3.1.tgz",
            -      "integrity": "sha1-YTObbyR1/Hcv2cnYP1yFddwVSuE=",
            -      "dev": true
            -    },
            -    "is-extendable": {
            -      "version": "0.1.1",
            -      "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz",
            -      "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=",
            -      "dev": true
            -    },
            -    "is-extglob": {
            -      "version": "2.1.1",
            -      "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
            -      "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=",
            -      "dev": true
            -    },
            -    "is-fullwidth-code-point": {
            -      "version": "1.0.0",
            -      "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz",
            -      "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=",
            -      "dev": true,
            -      "requires": {
            -        "number-is-nan": "^1.0.0"
            -      }
            -    },
            -    "is-glob": {
            -      "version": "4.0.1",
            -      "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz",
            -      "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==",
            -      "dev": true,
            -      "requires": {
            -        "is-extglob": "^2.1.1"
            -      }
            -    },
            -    "is-negated-glob": {
            -      "version": "1.0.0",
            -      "resolved": "https://registry.npmjs.org/is-negated-glob/-/is-negated-glob-1.0.0.tgz",
            -      "integrity": "sha1-aRC8pdqMleeEtXUbl2z1oQ/uNtI=",
            -      "dev": true
            -    },
            -    "is-negative-zero": {
            -      "version": "2.0.1",
            -      "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.1.tgz",
            -      "integrity": "sha512-2z6JzQvZRa9A2Y7xC6dQQm4FSTSTNWjKIYYTt4246eMTJmIo0Q+ZyOsU66X8lxK1AbB92dFeglPLrhwpeRKO6w==",
            -      "dev": true
            -    },
            -    "is-number": {
            -      "version": "3.0.0",
            -      "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz",
            -      "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=",
            -      "dev": true,
            -      "requires": {
            -        "kind-of": "^3.0.2"
            -      },
            -      "dependencies": {
            -        "kind-of": {
            -          "version": "3.2.2",
            -          "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
            -          "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
            -          "dev": true,
            -          "requires": {
            -            "is-buffer": "^1.1.5"
            -          }
            -        }
            -      }
            -    },
            -    "is-number-object": {
            -      "version": "1.0.5",
            -      "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.5.tgz",
            -      "integrity": "sha512-RU0lI/n95pMoUKu9v1BZP5MBcZuNSVJkMkAG2dJqC4z2GlkGUNeH68SuHuBKBD/XFe+LHZ+f9BKkLET60Niedw==",
            -      "dev": true
            -    },
            -    "is-path-cwd": {
            -      "version": "2.1.0",
            -      "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-2.1.0.tgz",
            -      "integrity": "sha512-Sc5j3/YnM8tDeyCsVeKlm/0p95075DyLmDEIkSgQ7mXkrOX+uTCtmQFm0CYzVyJwcCCmO3k8qfJt17SxQwB5Zw==",
            -      "dev": true
            -    },
            -    "is-path-in-cwd": {
            -      "version": "2.1.0",
            -      "resolved": "https://registry.npmjs.org/is-path-in-cwd/-/is-path-in-cwd-2.1.0.tgz",
            -      "integrity": "sha512-rNocXHgipO+rvnP6dk3zI20RpOtrAM/kzbB258Uw5BWr3TpXi861yzjo16Dn4hUox07iw5AyeMLHWsujkjzvRQ==",
            -      "dev": true,
            -      "requires": {
            -        "is-path-inside": "^2.1.0"
            -      }
            -    },
            -    "is-path-inside": {
            -      "version": "2.1.0",
            -      "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-2.1.0.tgz",
            -      "integrity": "sha512-wiyhTzfDWsvwAW53OBWF5zuvaOGlZ6PwYxAbPVDhpm+gM09xKQGjBq/8uYN12aDvMxnAnq3dxTyoSoRNmg5YFg==",
            -      "dev": true,
            -      "requires": {
            -        "path-is-inside": "^1.0.2"
            -      }
            -    },
            -    "is-plain-obj": {
            -      "version": "1.1.0",
            -      "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz",
            -      "integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4=",
            -      "dev": true
            -    },
            -    "is-plain-object": {
            -      "version": "2.0.4",
            -      "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz",
            -      "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==",
            -      "dev": true,
            -      "requires": {
            -        "isobject": "^3.0.1"
            -      }
            -    },
            -    "is-regex": {
            -      "version": "1.0.4",
            -      "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.4.tgz",
            -      "integrity": "sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=",
            -      "dev": true,
            -      "requires": {
            -        "has": "^1.0.1"
            -      }
            -    },
            -    "is-relative": {
            -      "version": "1.0.0",
            -      "resolved": "https://registry.npmjs.org/is-relative/-/is-relative-1.0.0.tgz",
            -      "integrity": "sha512-Kw/ReK0iqwKeu0MITLFuj0jbPAmEiOsIwyIXvvbfa6QfmN9pkD1M+8pdk7Rl/dTKbH34/XBFMbgD4iMJhLQbGA==",
            -      "dev": true,
            -      "requires": {
            -        "is-unc-path": "^1.0.0"
            -      }
            -    },
            -    "is-stream": {
            -      "version": "1.1.0",
            -      "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz",
            -      "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=",
            -      "dev": true
            -    },
            -    "is-string": {
            -      "version": "1.0.6",
            -      "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.6.tgz",
            -      "integrity": "sha512-2gdzbKUuqtQ3lYNrUTQYoClPhm7oQu4UdpSZMp1/DGgkHBT8E2Z1l0yMdb6D4zNAxwDiMv8MdulKROJGNl0Q0w==",
            -      "dev": true
            -    },
            -    "is-symbol": {
            -      "version": "1.0.2",
            -      "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.2.tgz",
            -      "integrity": "sha512-HS8bZ9ox60yCJLH9snBpIwv9pYUAkcuLhSA1oero1UB5y9aiQpRA8y2ex945AOtCZL1lJDeIk3G5LthswI46Lw==",
            -      "dev": true,
            -      "requires": {
            -        "has-symbols": "^1.0.0"
            -      }
            -    },
            -    "is-typedarray": {
            -      "version": "1.0.0",
            -      "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz",
            -      "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=",
            -      "dev": true
            -    },
            -    "is-unc-path": {
            -      "version": "1.0.0",
            -      "resolved": "https://registry.npmjs.org/is-unc-path/-/is-unc-path-1.0.0.tgz",
            -      "integrity": "sha512-mrGpVd0fs7WWLfVsStvgF6iEJnbjDFZh9/emhRDcGWTduTfNHd9CHeUwH3gYIjdbwo4On6hunkztwOaAw0yllQ==",
            -      "dev": true,
            -      "requires": {
            -        "unc-path-regex": "^0.1.2"
            -      }
            -    },
            -    "is-utf8": {
            -      "version": "0.2.1",
            -      "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz",
            -      "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=",
            -      "dev": true
            -    },
            -    "is-valid-glob": {
            -      "version": "1.0.0",
            -      "resolved": "https://registry.npmjs.org/is-valid-glob/-/is-valid-glob-1.0.0.tgz",
            -      "integrity": "sha1-Kb8+/3Ab4tTTFdusw5vDn+j2Aao=",
            -      "dev": true
            -    },
            -    "is-windows": {
            -      "version": "1.0.2",
            -      "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz",
            -      "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==",
            -      "dev": true
            -    },
            -    "isarray": {
            -      "version": "1.0.0",
            -      "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
            -      "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=",
            -      "dev": true
            -    },
            -    "isexe": {
            -      "version": "2.0.0",
            -      "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
            -      "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=",
            -      "dev": true
            -    },
            -    "isobject": {
            -      "version": "3.0.1",
            -      "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz",
            -      "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=",
            -      "dev": true
            -    },
            -    "isstream": {
            -      "version": "0.1.2",
            -      "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz",
            -      "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=",
            -      "dev": true
            -    },
            -    "istextorbinary": {
            -      "version": "2.2.1",
            -      "resolved": "https://registry.npmjs.org/istextorbinary/-/istextorbinary-2.2.1.tgz",
            -      "integrity": "sha512-TS+hoFl8Z5FAFMK38nhBkdLt44CclNRgDHWeMgsV8ko3nDlr/9UI2Sf839sW7enijf8oKsZYXRvM8g0it9Zmcw==",
            -      "dev": true,
            -      "requires": {
            -        "binaryextensions": "2",
            -        "editions": "^1.3.3",
            -        "textextensions": "2"
            -      }
            -    },
            -    "js-tokens": {
            -      "version": "4.0.0",
            -      "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
            -      "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==",
            -      "dev": true
            -    },
            -    "js-yaml": {
            -      "version": "3.13.1",
            -      "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz",
            -      "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==",
            -      "dev": true,
            -      "requires": {
            -        "argparse": "^1.0.7",
            -        "esprima": "^4.0.0"
            -      },
            -      "dependencies": {
            -        "esprima": {
            -          "version": "4.0.1",
            -          "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz",
            -          "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==",
            -          "dev": true
            -        }
            -      }
            -    },
            -    "js2xmlparser": {
            -      "version": "4.0.1",
            -      "resolved": "https://registry.npmjs.org/js2xmlparser/-/js2xmlparser-4.0.1.tgz",
            -      "integrity": "sha512-KrPTolcw6RocpYjdC7pL7v62e55q7qOMHvLX1UCLc5AAS8qeJ6nukarEJAF2KL2PZxlbGueEbINqZR2bDe/gUw==",
            -      "dev": true,
            -      "requires": {
            -        "xmlcreate": "^2.0.3"
            -      }
            -    },
            -    "jsbn": {
            -      "version": "0.1.1",
            -      "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz",
            -      "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=",
            -      "dev": true
            -    },
            -    "jsdoc": {
            -      "version": "3.6.4",
            -      "resolved": "https://registry.npmjs.org/jsdoc/-/jsdoc-3.6.4.tgz",
            -      "integrity": "sha512-3G9d37VHv7MFdheviDCjUfQoIjdv4TC5zTTf5G9VODLtOnVS6La1eoYBDlbWfsRT3/Xo+j2MIqki2EV12BZfwA==",
            -      "dev": true,
            -      "requires": {
            -        "@babel/parser": "^7.9.4",
            -        "bluebird": "^3.7.2",
            -        "catharsis": "^0.8.11",
            -        "escape-string-regexp": "^2.0.0",
            -        "js2xmlparser": "^4.0.1",
            -        "klaw": "^3.0.0",
            -        "markdown-it": "^10.0.0",
            -        "markdown-it-anchor": "^5.2.7",
            -        "marked": "^0.8.2",
            -        "mkdirp": "^1.0.4",
            -        "requizzle": "^0.2.3",
            -        "strip-json-comments": "^3.1.0",
            -        "taffydb": "2.6.2",
            -        "underscore": "~1.10.2"
            -      },
            -      "dependencies": {
            -        "escape-string-regexp": {
            -          "version": "2.0.0",
            -          "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz",
            -          "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==",
            -          "dev": true
            -        },
            -        "mkdirp": {
            -          "version": "1.0.4",
            -          "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz",
            -          "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==",
            -          "dev": true
            -        },
            -        "strip-json-comments": {
            -          "version": "3.1.0",
            -          "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.0.tgz",
            -          "integrity": "sha512-e6/d0eBu7gHtdCqFt0xJr642LdToM5/cN4Qb9DbHjVx1CP5RyeM+zH7pbecEmDv/lBqb0QH+6Uqq75rxFPkM0w==",
            -          "dev": true
            -        }
            -      }
            -    },
            -    "jsdoctypeparser": {
            -      "version": "9.0.0",
            -      "resolved": "https://registry.npmjs.org/jsdoctypeparser/-/jsdoctypeparser-9.0.0.tgz",
            -      "integrity": "sha512-jrTA2jJIL6/DAEILBEh2/w9QxCuwmvNXIry39Ay/HVfhE3o2yVV0U44blYkqdHA/OKloJEqvJy0xU+GSdE2SIw==",
            -      "dev": true
            -    },
            -    "jsdom": {
            -      "version": "13.2.0",
            -      "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-13.2.0.tgz",
            -      "integrity": "sha512-cG1NtMWO9hWpqRNRR3dSvEQa8bFI6iLlqU2x4kwX51FQjp0qus8T9aBaAO6iGp3DeBrhdwuKxckknohkmfvsFw==",
            -      "dev": true,
            -      "requires": {
            -        "abab": "^2.0.0",
            -        "acorn": "^6.0.4",
            -        "acorn-globals": "^4.3.0",
            -        "array-equal": "^1.0.0",
            -        "cssom": "^0.3.4",
            -        "cssstyle": "^1.1.1",
            -        "data-urls": "^1.1.0",
            -        "domexception": "^1.0.1",
            -        "escodegen": "^1.11.0",
            -        "html-encoding-sniffer": "^1.0.2",
            -        "nwsapi": "^2.0.9",
            -        "parse5": "5.1.0",
            -        "pn": "^1.1.0",
            -        "request": "^2.88.0",
            -        "request-promise-native": "^1.0.5",
            -        "saxes": "^3.1.5",
            -        "symbol-tree": "^3.2.2",
            -        "tough-cookie": "^2.5.0",
            -        "w3c-hr-time": "^1.0.1",
            -        "w3c-xmlserializer": "^1.0.1",
            -        "webidl-conversions": "^4.0.2",
            -        "whatwg-encoding": "^1.0.5",
            -        "whatwg-mimetype": "^2.3.0",
            -        "whatwg-url": "^7.0.0",
            -        "ws": "^6.1.2",
            -        "xml-name-validator": "^3.0.0"
            -      }
            -    },
            -    "json-parse-better-errors": {
            -      "version": "1.0.2",
            -      "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz",
            -      "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==",
            -      "dev": true
            -    },
            -    "json-schema": {
            -      "version": "0.2.3",
            -      "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz",
            -      "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=",
            -      "dev": true
            -    },
            -    "json-schema-traverse": {
            -      "version": "0.4.1",
            -      "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
            -      "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==",
            -      "dev": true
            -    },
            -    "json-stable-stringify-without-jsonify": {
            -      "version": "1.0.1",
            -      "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz",
            -      "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=",
            -      "dev": true
            -    },
            -    "json-stringify-safe": {
            -      "version": "5.0.1",
            -      "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz",
            -      "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=",
            -      "dev": true
            -    },
            -    "json5": {
            -      "version": "2.1.3",
            -      "resolved": "https://registry.npmjs.org/json5/-/json5-2.1.3.tgz",
            -      "integrity": "sha512-KXPvOm8K9IJKFM0bmdn8QXh7udDh1g/giieX0NLCaMnb4hEiVFqnop2ImTXCc5e0/oHz3LTqmHGtExn5hfMkOA==",
            -      "dev": true,
            -      "requires": {
            -        "minimist": "^1.2.5"
            -      },
            -      "dependencies": {
            -        "minimist": {
            -          "version": "1.2.5",
            -          "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
            -          "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==",
            -          "dev": true
            -        }
            -      }
            -    },
            -    "jsonfile": {
            -      "version": "4.0.0",
            -      "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz",
            -      "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=",
            -      "dev": true,
            -      "requires": {
            -        "graceful-fs": "^4.1.6"
            -      }
            -    },
            -    "jsonpointer": {
            -      "version": "4.1.0",
            -      "resolved": "https://registry.npmjs.org/jsonpointer/-/jsonpointer-4.1.0.tgz",
            -      "integrity": "sha512-CXcRvMyTlnR53xMcKnuMzfCA5i/nfblTnnr74CZb6C4vG39eu6w51t7nKmU5MfLfbTgGItliNyjO/ciNPDqClg==",
            -      "dev": true
            -    },
            -    "jsonwebtoken": {
            -      "version": "8.5.1",
            -      "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-8.5.1.tgz",
            -      "integrity": "sha512-XjwVfRS6jTMsqYs0EsuJ4LGxXV14zQybNd4L2r0UvbVnSF9Af8x7p5MzbJ90Ioz/9TI41/hTCvznF/loiSzn8w==",
            -      "dev": true,
            -      "requires": {
            -        "jws": "^3.2.2",
            -        "lodash.includes": "^4.3.0",
            -        "lodash.isboolean": "^3.0.3",
            -        "lodash.isinteger": "^4.0.4",
            -        "lodash.isnumber": "^3.0.3",
            -        "lodash.isplainobject": "^4.0.6",
            -        "lodash.isstring": "^4.0.1",
            -        "lodash.once": "^4.0.0",
            -        "ms": "^2.1.1",
            -        "semver": "^5.6.0"
            -      },
            -      "dependencies": {
            -        "ms": {
            -          "version": "2.1.2",
            -          "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
            -          "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
            -          "dev": true
            -        }
            -      }
            -    },
            -    "jsprim": {
            -      "version": "1.4.1",
            -      "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz",
            -      "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=",
            -      "dev": true,
            -      "requires": {
            -        "assert-plus": "1.0.0",
            -        "extsprintf": "1.3.0",
            -        "json-schema": "0.2.3",
            -        "verror": "1.10.0"
            -      }
            -    },
            -    "just-debounce": {
            -      "version": "1.0.0",
            -      "resolved": "https://registry.npmjs.org/just-debounce/-/just-debounce-1.0.0.tgz",
            -      "integrity": "sha1-h/zPrv/AtozRnVX2cilD+SnqNeo=",
            -      "dev": true
            -    },
            -    "jwa": {
            -      "version": "1.4.1",
            -      "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.4.1.tgz",
            -      "integrity": "sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA==",
            -      "dev": true,
            -      "requires": {
            -        "buffer-equal-constant-time": "1.0.1",
            -        "ecdsa-sig-formatter": "1.0.11",
            -        "safe-buffer": "^5.0.1"
            -      }
            -    },
            -    "jws": {
            -      "version": "3.2.2",
            -      "resolved": "https://registry.npmjs.org/jws/-/jws-3.2.2.tgz",
            -      "integrity": "sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA==",
            -      "dev": true,
            -      "requires": {
            -        "jwa": "^1.4.1",
            -        "safe-buffer": "^5.0.1"
            -      }
            -    },
            -    "kind-of": {
            -      "version": "6.0.3",
            -      "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz",
            -      "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==",
            -      "dev": true
            -    },
            -    "klaw": {
            -      "version": "3.0.0",
            -      "resolved": "https://registry.npmjs.org/klaw/-/klaw-3.0.0.tgz",
            -      "integrity": "sha512-0Fo5oir+O9jnXu5EefYbVK+mHMBeEVEy2cmctR1O1NECcCkPRreJKrS6Qt/j3KC2C148Dfo9i3pCmCMsdqGr0g==",
            -      "dev": true,
            -      "requires": {
            -        "graceful-fs": "^4.1.9"
            -      }
            -    },
            -    "ky": {
            -      "version": "0.12.0",
            -      "resolved": "https://registry.npmjs.org/ky/-/ky-0.12.0.tgz",
            -      "integrity": "sha512-t9b7v3V2fGwAcQnnDDQwKQGF55eWrf4pwi1RN08Fy8b/9GEwV7Ea0xQiaSW6ZbeghBHIwl8kgnla4vVo9seepQ==",
            -      "dev": true
            -    },
            -    "ky-universal": {
            -      "version": "0.3.0",
            -      "resolved": "https://registry.npmjs.org/ky-universal/-/ky-universal-0.3.0.tgz",
            -      "integrity": "sha512-CM4Bgb2zZZpsprcjI6DNYTaH3oGHXL2u7BU4DK+lfCuC4snkt9/WRpMYeKbBbXscvKkeqBwzzjFX2WwmKY5K/A==",
            -      "dev": true,
            -      "requires": {
            -        "abort-controller": "^3.0.0",
            -        "node-fetch": "^2.6.0"
            -      }
            -    },
            -    "last-run": {
            -      "version": "1.1.1",
            -      "resolved": "https://registry.npmjs.org/last-run/-/last-run-1.1.1.tgz",
            -      "integrity": "sha1-RblpQsF7HHnHchmCWbqUO+v4yls=",
            -      "dev": true,
            -      "requires": {
            -        "default-resolution": "^2.0.0",
            -        "es6-weak-map": "^2.0.1"
            -      }
            -    },
            -    "lazystream": {
            -      "version": "1.0.0",
            -      "resolved": "https://registry.npmjs.org/lazystream/-/lazystream-1.0.0.tgz",
            -      "integrity": "sha1-9plf4PggOS9hOWvolGJAe7dxaOQ=",
            -      "dev": true,
            -      "requires": {
            -        "readable-stream": "^2.0.5"
            -      }
            -    },
            -    "lcid": {
            -      "version": "1.0.0",
            -      "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz",
            -      "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=",
            -      "dev": true,
            -      "requires": {
            -        "invert-kv": "^1.0.0"
            -      }
            -    },
            -    "lead": {
            -      "version": "1.0.0",
            -      "resolved": "https://registry.npmjs.org/lead/-/lead-1.0.0.tgz",
            -      "integrity": "sha1-bxT5mje+Op3XhPVJVpDlkDRm7kI=",
            -      "dev": true,
            -      "requires": {
            -        "flush-write-stream": "^1.0.2"
            -      }
            -    },
            -    "levn": {
            -      "version": "0.3.0",
            -      "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz",
            -      "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=",
            -      "dev": true,
            -      "requires": {
            -        "prelude-ls": "~1.1.2",
            -        "type-check": "~0.3.2"
            -      }
            -    },
            -    "li": {
            -      "version": "1.3.0",
            -      "resolved": "https://registry.npmjs.org/li/-/li-1.3.0.tgz",
            -      "integrity": "sha1-IsWbyu+qmo7zWc91l4TkvxBq6hs=",
            -      "dev": true
            -    },
            -    "liftoff": {
            -      "version": "3.1.0",
            -      "resolved": "https://registry.npmjs.org/liftoff/-/liftoff-3.1.0.tgz",
            -      "integrity": "sha512-DlIPlJUkCV0Ips2zf2pJP0unEoT1kwYhiiPUGF3s/jtxTCjziNLoiVVh+jqWOWeFi6mmwQ5fNxvAUyPad4Dfog==",
            -      "dev": true,
            -      "requires": {
            -        "extend": "^3.0.0",
            -        "findup-sync": "^3.0.0",
            -        "fined": "^1.0.1",
            -        "flagged-respawn": "^1.0.0",
            -        "is-plain-object": "^2.0.4",
            -        "object.map": "^1.0.0",
            -        "rechoir": "^0.6.2",
            -        "resolve": "^1.1.7"
            -      }
            -    },
            -    "linkify-it": {
            -      "version": "2.2.0",
            -      "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-2.2.0.tgz",
            -      "integrity": "sha512-GnAl/knGn+i1U/wjBz3akz2stz+HrHLsxMwHQGofCDfPvlf+gDKN58UtfmUquTY4/MXeE2x7k19KQmeoZi94Iw==",
            -      "dev": true,
            -      "requires": {
            -        "uc.micro": "^1.0.1"
            -      }
            -    },
            -    "load-json-file": {
            -      "version": "1.1.0",
            -      "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz",
            -      "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=",
            -      "dev": true,
            -      "requires": {
            -        "graceful-fs": "^4.1.2",
            -        "parse-json": "^2.2.0",
            -        "pify": "^2.0.0",
            -        "pinkie-promise": "^2.0.0",
            -        "strip-bom": "^2.0.0"
            -      }
            -    },
            -    "locate-path": {
            -      "version": "3.0.0",
            -      "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz",
            -      "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==",
            -      "dev": true,
            -      "requires": {
            -        "p-locate": "^3.0.0",
            -        "path-exists": "^3.0.0"
            -      },
            -      "dependencies": {
            -        "path-exists": {
            -          "version": "3.0.0",
            -          "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz",
            -          "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=",
            -          "dev": true
            -        }
            -      }
            -    },
            -    "lodash": {
            -      "version": "4.17.21",
            -      "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
            -      "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==",
            -      "dev": true
            -    },
            -    "lodash._reinterpolate": {
            -      "version": "3.0.0",
            -      "resolved": "https://registry.npmjs.org/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz",
            -      "integrity": "sha1-DM8tiRZq8Ds2Y8eWU4t1rG4RTZ0=",
            -      "dev": true
            -    },
            -    "lodash.find": {
            -      "version": "4.6.0",
            -      "resolved": "https://registry.npmjs.org/lodash.find/-/lodash.find-4.6.0.tgz",
            -      "integrity": "sha1-ywcE1Hq3F4n/oN6Ll92Sb7iLE7E=",
            -      "dev": true
            -    },
            -    "lodash.get": {
            -      "version": "4.4.2",
            -      "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz",
            -      "integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk=",
            -      "dev": true
            -    },
            -    "lodash.includes": {
            -      "version": "4.3.0",
            -      "resolved": "https://registry.npmjs.org/lodash.includes/-/lodash.includes-4.3.0.tgz",
            -      "integrity": "sha1-YLuYqHy5I8aMoeUTJUgzFISfVT8=",
            -      "dev": true
            -    },
            -    "lodash.isboolean": {
            -      "version": "3.0.3",
            -      "resolved": "https://registry.npmjs.org/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz",
            -      "integrity": "sha1-bC4XHbKiV82WgC/UOwGyDV9YcPY=",
            -      "dev": true
            -    },
            -    "lodash.isinteger": {
            -      "version": "4.0.4",
            -      "resolved": "https://registry.npmjs.org/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz",
            -      "integrity": "sha1-YZwK89A/iwTDH1iChAt3sRzWg0M=",
            -      "dev": true
            -    },
            -    "lodash.isnumber": {
            -      "version": "3.0.3",
            -      "resolved": "https://registry.npmjs.org/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz",
            -      "integrity": "sha1-POdoEMWSjQM1IwGsKHMX8RwLH/w=",
            -      "dev": true
            -    },
            -    "lodash.isobject": {
            -      "version": "3.0.2",
            -      "resolved": "https://registry.npmjs.org/lodash.isobject/-/lodash.isobject-3.0.2.tgz",
            -      "integrity": "sha1-PI+41bW/S/kK4G4U8qUwpO2TXh0=",
            -      "dev": true
            -    },
            -    "lodash.isplainobject": {
            -      "version": "4.0.6",
            -      "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz",
            -      "integrity": "sha1-fFJqUtibRcRcxpC4gWO+BJf1UMs=",
            -      "dev": true
            -    },
            -    "lodash.isstring": {
            -      "version": "4.0.1",
            -      "resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz",
            -      "integrity": "sha1-1SfftUVuynzJu5XV2ur4i6VKVFE=",
            -      "dev": true
            -    },
            -    "lodash.keys": {
            -      "version": "4.2.0",
            -      "resolved": "https://registry.npmjs.org/lodash.keys/-/lodash.keys-4.2.0.tgz",
            -      "integrity": "sha1-oIYCrBLk+4P5H8H7ejYKTZujUgU=",
            -      "dev": true
            -    },
            -    "lodash.mapvalues": {
            -      "version": "4.6.0",
            -      "resolved": "https://registry.npmjs.org/lodash.mapvalues/-/lodash.mapvalues-4.6.0.tgz",
            -      "integrity": "sha1-G6+lAF3p3W9PJmaMMMo3IwzJaJw=",
            -      "dev": true
            -    },
            -    "lodash.memoize": {
            -      "version": "4.1.2",
            -      "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz",
            -      "integrity": "sha1-vMbEmkKihA7Zl/Mj6tpezRguC/4=",
            -      "dev": true
            -    },
            -    "lodash.once": {
            -      "version": "4.1.1",
            -      "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz",
            -      "integrity": "sha1-DdOXEhPHxW34gJd9UEyI+0cal6w=",
            -      "dev": true
            -    },
            -    "lodash.set": {
            -      "version": "4.3.2",
            -      "resolved": "https://registry.npmjs.org/lodash.set/-/lodash.set-4.3.2.tgz",
            -      "integrity": "sha1-2HV7HagH3eJIFrDWqEvqGnYjCyM=",
            -      "dev": true
            -    },
            -    "lodash.sortby": {
            -      "version": "4.7.0",
            -      "resolved": "https://registry.npmjs.org/lodash.sortby/-/lodash.sortby-4.7.0.tgz",
            -      "integrity": "sha1-7dFMgk4sycHgsKG0K7UhBRakJDg=",
            -      "dev": true
            -    },
            -    "lodash.template": {
            -      "version": "4.4.0",
            -      "resolved": "https://registry.npmjs.org/lodash.template/-/lodash.template-4.4.0.tgz",
            -      "integrity": "sha1-5zoDhcg1VZF0bgILmWecaQ5o+6A=",
            -      "dev": true,
            -      "requires": {
            -        "lodash._reinterpolate": "~3.0.0",
            -        "lodash.templatesettings": "^4.0.0"
            -      }
            -    },
            -    "lodash.templatesettings": {
            -      "version": "4.1.0",
            -      "resolved": "https://registry.npmjs.org/lodash.templatesettings/-/lodash.templatesettings-4.1.0.tgz",
            -      "integrity": "sha1-K01OlbpEDZFf8IvImeRVNmZxMxY=",
            -      "dev": true,
            -      "requires": {
            -        "lodash._reinterpolate": "~3.0.0"
            -      }
            -    },
            -    "lodash.uniq": {
            -      "version": "4.5.0",
            -      "resolved": "https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz",
            -      "integrity": "sha1-0CJTc662Uq3BvILklFM5qEJ1R3M=",
            -      "dev": true
            -    },
            -    "log-symbols": {
            -      "version": "2.2.0",
            -      "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-2.2.0.tgz",
            -      "integrity": "sha512-VeIAFslyIerEJLXHziedo2basKbMKtTw3vfn5IzG0XTjhAVEJyNHnL2p7vc+wBDSdQuUpNw3M2u6xb9QsAY5Eg==",
            -      "dev": true,
            -      "requires": {
            -        "chalk": "^2.0.1"
            -      }
            -    },
            -    "loud-rejection": {
            -      "version": "1.6.0",
            -      "resolved": "https://registry.npmjs.org/loud-rejection/-/loud-rejection-1.6.0.tgz",
            -      "integrity": "sha1-W0b4AUft7leIcPCG0Eghz5mOVR8=",
            -      "dev": true,
            -      "requires": {
            -        "currently-unhandled": "^0.4.1",
            -        "signal-exit": "^3.0.0"
            -      }
            -    },
            -    "lru-cache": {
            -      "version": "6.0.0",
            -      "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
            -      "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
            -      "dev": true,
            -      "requires": {
            -        "yallist": "^4.0.0"
            -      }
            -    },
            -    "macos-release": {
            -      "version": "2.4.1",
            -      "resolved": "https://registry.npmjs.org/macos-release/-/macos-release-2.4.1.tgz",
            -      "integrity": "sha512-H/QHeBIN1fIGJX517pvK8IEK53yQOW7YcEI55oYtgjDdoCQQz7eJS94qt5kNrscReEyuD/JcdFCm2XBEcGOITg==",
            -      "dev": true
            -    },
            -    "make-error": {
            -      "version": "1.3.5",
            -      "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.5.tgz",
            -      "integrity": "sha512-c3sIjNUow0+8swNwVpqoH4YCShKNFkMaw6oH1mNS2haDZQqkeZFlHS3dhoeEbKKmJB4vXpJucU6oH75aDYeE9g==",
            -      "dev": true
            -    },
            -    "make-error-cause": {
            -      "version": "1.2.2",
            -      "resolved": "https://registry.npmjs.org/make-error-cause/-/make-error-cause-1.2.2.tgz",
            -      "integrity": "sha1-3wOI/NCzeBbf8KX7gQiTl3fcvJ0=",
            -      "dev": true,
            -      "requires": {
            -        "make-error": "^1.2.0"
            -      }
            -    },
            -    "make-iterator": {
            -      "version": "1.0.1",
            -      "resolved": "https://registry.npmjs.org/make-iterator/-/make-iterator-1.0.1.tgz",
            -      "integrity": "sha512-pxiuXh0iVEq7VM7KMIhs5gxsfxCux2URptUQaXo4iZZJxBAzTPOLE2BumO5dbfVYq/hBJFBR/a1mFDmOx5AGmw==",
            -      "dev": true,
            -      "requires": {
            -        "kind-of": "^6.0.2"
            -      }
            -    },
            -    "map-age-cleaner": {
            -      "version": "0.1.3",
            -      "resolved": "https://registry.npmjs.org/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz",
            -      "integrity": "sha512-bJzx6nMoP6PDLPBFmg7+xRKeFZvFboMrGlxmNj9ClvX53KrmvM5bXFXEWjbz4cz1AFn+jWJ9z/DJSz7hrs0w3w==",
            -      "dev": true,
            -      "requires": {
            -        "p-defer": "^1.0.0"
            -      }
            -    },
            -    "map-cache": {
            -      "version": "0.2.2",
            -      "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz",
            -      "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=",
            -      "dev": true
            -    },
            -    "map-obj": {
            -      "version": "2.0.0",
            -      "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-2.0.0.tgz",
            -      "integrity": "sha1-plzSkIepJZi4eRJXpSPgISIqwfk=",
            -      "dev": true
            -    },
            -    "map-stream": {
            -      "version": "0.0.7",
            -      "resolved": "https://registry.npmjs.org/map-stream/-/map-stream-0.0.7.tgz",
            -      "integrity": "sha1-ih8HiW2CsQkmvTdEokIACfiJdKg=",
            -      "dev": true
            -    },
            -    "map-visit": {
            -      "version": "1.0.0",
            -      "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz",
            -      "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=",
            -      "dev": true,
            -      "requires": {
            -        "object-visit": "^1.0.0"
            -      }
            -    },
            -    "markdown-it": {
            -      "version": "10.0.0",
            -      "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-10.0.0.tgz",
            -      "integrity": "sha512-YWOP1j7UbDNz+TumYP1kpwnP0aEa711cJjrAQrzd0UXlbJfc5aAq0F/PZHjiioqDC1NKgvIMX+o+9Bk7yuM2dg==",
            -      "dev": true,
            -      "requires": {
            -        "argparse": "^1.0.7",
            -        "entities": "~2.0.0",
            -        "linkify-it": "^2.0.0",
            -        "mdurl": "^1.0.1",
            -        "uc.micro": "^1.0.5"
            -      }
            -    },
            -    "markdown-it-anchor": {
            -      "version": "5.3.0",
            -      "resolved": "https://registry.npmjs.org/markdown-it-anchor/-/markdown-it-anchor-5.3.0.tgz",
            -      "integrity": "sha512-/V1MnLL/rgJ3jkMWo84UR+K+jF1cxNG1a+KwqeXqTIJ+jtA8aWSHuigx8lTzauiIjBDbwF3NcWQMotd0Dm39jA==",
            -      "dev": true
            -    },
            -    "marked": {
            -      "version": "0.8.2",
            -      "resolved": "https://registry.npmjs.org/marked/-/marked-0.8.2.tgz",
            -      "integrity": "sha512-EGwzEeCcLniFX51DhTpmTom+dSA/MG/OBUDjnWtHbEnjAH180VzUeAw+oE4+Zv+CoYBWyRlYOTR0N8SO9R1PVw==",
            -      "dev": true
            -    },
            -    "matchdep": {
            -      "version": "2.0.0",
            -      "resolved": "https://registry.npmjs.org/matchdep/-/matchdep-2.0.0.tgz",
            -      "integrity": "sha1-xvNINKDY28OzfCfui7yyfHd1WC4=",
            -      "dev": true,
            -      "requires": {
            -        "findup-sync": "^2.0.0",
            -        "micromatch": "^3.0.4",
            -        "resolve": "^1.4.0",
            -        "stack-trace": "0.0.10"
            -      },
            -      "dependencies": {
            -        "findup-sync": {
            -          "version": "2.0.0",
            -          "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-2.0.0.tgz",
            -          "integrity": "sha1-kyaxSIwi0aYIhlCoaQGy2akKLLw=",
            -          "dev": true,
            -          "requires": {
            -            "detect-file": "^1.0.0",
            -            "is-glob": "^3.1.0",
            -            "micromatch": "^3.0.4",
            -            "resolve-dir": "^1.0.1"
            -          }
            -        },
            -        "is-glob": {
            -          "version": "3.1.0",
            -          "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz",
            -          "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=",
            -          "dev": true,
            -          "requires": {
            -            "is-extglob": "^2.1.0"
            -          }
            -        }
            -      }
            -    },
            -    "mdurl": {
            -      "version": "1.0.1",
            -      "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-1.0.1.tgz",
            -      "integrity": "sha1-/oWy7HWlkDfyrf7BAP1sYBdhFS4=",
            -      "dev": true
            -    },
            -    "mem": {
            -      "version": "4.2.0",
            -      "resolved": "https://registry.npmjs.org/mem/-/mem-4.2.0.tgz",
            -      "integrity": "sha512-5fJxa68urlY0Ir8ijatKa3eRz5lwXnRCTvo9+TbTGAuTFJOwpGcY0X05moBd0nW45965Njt4CDI2GFQoG8DvqA==",
            -      "dev": true,
            -      "requires": {
            -        "map-age-cleaner": "^0.1.1",
            -        "mimic-fn": "^2.0.0",
            -        "p-is-promise": "^2.0.0"
            -      }
            -    },
            -    "memfs-or-file-map-to-github-branch": {
            -      "version": "1.2.0",
            -      "resolved": "https://registry.npmjs.org/memfs-or-file-map-to-github-branch/-/memfs-or-file-map-to-github-branch-1.2.0.tgz",
            -      "integrity": "sha512-PloI9AkRXrLQuBU1s7eYQpl+4hkL0U0h23lddMaJ3ZGUufn8pdNRxd1kCfBqL5gISCFQs78ttXS15e4/f5vcTA==",
            -      "dev": true,
            -      "requires": {
            -        "@octokit/rest": "^16.43.1"
            -      }
            -    },
            -    "memorystream": {
            -      "version": "0.3.1",
            -      "resolved": "https://registry.npmjs.org/memorystream/-/memorystream-0.3.1.tgz",
            -      "integrity": "sha1-htcJCzDORV1j+64S3aUaR93K+bI=",
            -      "dev": true
            -    },
            -    "meow": {
            -      "version": "5.0.0",
            -      "resolved": "https://registry.npmjs.org/meow/-/meow-5.0.0.tgz",
            -      "integrity": "sha512-CbTqYU17ABaLefO8vCU153ZZlprKYWDljcndKKDCFcYQITzWCXZAVk4QMFZPgvzrnUQ3uItnIE/LoUOwrT15Ig==",
            -      "dev": true,
            -      "requires": {
            -        "camelcase-keys": "^4.0.0",
            -        "decamelize-keys": "^1.0.0",
            -        "loud-rejection": "^1.0.0",
            -        "minimist-options": "^3.0.1",
            -        "normalize-package-data": "^2.3.4",
            -        "read-pkg-up": "^3.0.0",
            -        "redent": "^2.0.0",
            -        "trim-newlines": "^2.0.0",
            -        "yargs-parser": "^10.0.0"
            -      },
            -      "dependencies": {
            -        "camelcase": {
            -          "version": "4.1.0",
            -          "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz",
            -          "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=",
            -          "dev": true
            -        },
            -        "find-up": {
            -          "version": "2.1.0",
            -          "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz",
            -          "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=",
            -          "dev": true,
            -          "requires": {
            -            "locate-path": "^2.0.0"
            -          }
            -        },
            -        "load-json-file": {
            -          "version": "4.0.0",
            -          "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz",
            -          "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=",
            -          "dev": true,
            -          "requires": {
            -            "graceful-fs": "^4.1.2",
            -            "parse-json": "^4.0.0",
            -            "pify": "^3.0.0",
            -            "strip-bom": "^3.0.0"
            -          }
            -        },
            -        "locate-path": {
            -          "version": "2.0.0",
            -          "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz",
            -          "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=",
            -          "dev": true,
            -          "requires": {
            -            "p-locate": "^2.0.0",
            -            "path-exists": "^3.0.0"
            -          }
            -        },
            -        "p-limit": {
            -          "version": "1.3.0",
            -          "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz",
            -          "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==",
            -          "dev": true,
            -          "requires": {
            -            "p-try": "^1.0.0"
            -          }
            -        },
            -        "p-locate": {
            -          "version": "2.0.0",
            -          "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz",
            -          "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=",
            -          "dev": true,
            -          "requires": {
            -            "p-limit": "^1.1.0"
            -          }
            -        },
            -        "p-try": {
            -          "version": "1.0.0",
            -          "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz",
            -          "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=",
            -          "dev": true
            -        },
            -        "parse-json": {
            -          "version": "4.0.0",
            -          "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz",
            -          "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=",
            -          "dev": true,
            -          "requires": {
            -            "error-ex": "^1.3.1",
            -            "json-parse-better-errors": "^1.0.1"
            -          }
            -        },
            -        "path-exists": {
            -          "version": "3.0.0",
            -          "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz",
            -          "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=",
            -          "dev": true
            -        },
            -        "path-type": {
            -          "version": "3.0.0",
            -          "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz",
            -          "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==",
            -          "dev": true,
            -          "requires": {
            -            "pify": "^3.0.0"
            -          }
            -        },
            -        "pify": {
            -          "version": "3.0.0",
            -          "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz",
            -          "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=",
            -          "dev": true
            -        },
            -        "read-pkg": {
            -          "version": "3.0.0",
            -          "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz",
            -          "integrity": "sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=",
            -          "dev": true,
            -          "requires": {
            -            "load-json-file": "^4.0.0",
            -            "normalize-package-data": "^2.3.2",
            -            "path-type": "^3.0.0"
            -          }
            -        },
            -        "read-pkg-up": {
            -          "version": "3.0.0",
            -          "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-3.0.0.tgz",
            -          "integrity": "sha1-PtSWaF26D4/hGNBpHcUfSh/5bwc=",
            -          "dev": true,
            -          "requires": {
            -            "find-up": "^2.0.0",
            -            "read-pkg": "^3.0.0"
            -          }
            -        },
            -        "strip-bom": {
            -          "version": "3.0.0",
            -          "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz",
            -          "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=",
            -          "dev": true
            -        },
            -        "yargs-parser": {
            -          "version": "10.1.0",
            -          "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-10.1.0.tgz",
            -          "integrity": "sha512-VCIyR1wJoEBZUqk5PA+oOBF6ypbwh5aNB3I50guxAL/quggdfs4TtNHQrSazFA3fYZ+tEqfs0zIGlv0c/rgjbQ==",
            -          "dev": true,
            -          "requires": {
            -            "camelcase": "^4.1.0"
            -          }
            -        }
            -      }
            -    },
            -    "merge2": {
            -      "version": "1.4.1",
            -      "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz",
            -      "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==",
            -      "dev": true
            -    },
            -    "microbuffer": {
            -      "version": "1.0.0",
            -      "resolved": "https://registry.npmjs.org/microbuffer/-/microbuffer-1.0.0.tgz",
            -      "integrity": "sha1-izgy7UDIfVH0e7I0kTppinVtGdI=",
            -      "dev": true
            -    },
            -    "micromatch": {
            -      "version": "3.1.10",
            -      "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz",
            -      "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==",
            -      "dev": true,
            -      "requires": {
            -        "arr-diff": "^4.0.0",
            -        "array-unique": "^0.3.2",
            -        "braces": "^2.3.1",
            -        "define-property": "^2.0.2",
            -        "extend-shallow": "^3.0.2",
            -        "extglob": "^2.0.4",
            -        "fragment-cache": "^0.2.1",
            -        "kind-of": "^6.0.2",
            -        "nanomatch": "^1.2.9",
            -        "object.pick": "^1.3.0",
            -        "regex-not": "^1.0.0",
            -        "snapdragon": "^0.8.1",
            -        "to-regex": "^3.0.2"
            -      }
            -    },
            -    "mime": {
            -      "version": "1.6.0",
            -      "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz",
            -      "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==",
            -      "dev": true
            -    },
            -    "mime-db": {
            -      "version": "1.38.0",
            -      "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.38.0.tgz",
            -      "integrity": "sha512-bqVioMFFzc2awcdJZIzR3HjZFX20QhilVS7hytkKrv7xFAn8bM1gzc/FOX2awLISvWe0PV8ptFKcon+wZ5qYkg==",
            -      "dev": true
            -    },
            -    "mime-types": {
            -      "version": "2.1.22",
            -      "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.22.tgz",
            -      "integrity": "sha512-aGl6TZGnhm/li6F7yx82bJiBZwgiEa4Hf6CNr8YO+r5UHr53tSTYZb102zyU50DOWWKeOv0uQLRL0/9EiKWCog==",
            -      "dev": true,
            -      "requires": {
            -        "mime-db": "~1.38.0"
            -      }
            -    },
            -    "mimic-fn": {
            -      "version": "2.0.0",
            -      "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.0.0.tgz",
            -      "integrity": "sha512-jbex9Yd/3lmICXwYT6gA/j2mNQGU48wCh/VzRd+/Y/PjYQtlg1gLMdZqvu9s/xH7qKvngxRObl56XZR609IMbA==",
            -      "dev": true
            -    },
            -    "minimatch": {
            -      "version": "3.0.4",
            -      "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
            -      "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
            -      "dev": true,
            -      "requires": {
            -        "brace-expansion": "^1.1.7"
            -      }
            -    },
            -    "minimist": {
            -      "version": "0.0.8",
            -      "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz",
            -      "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=",
            -      "dev": true
            -    },
            -    "minimist-options": {
            -      "version": "3.0.2",
            -      "resolved": "https://registry.npmjs.org/minimist-options/-/minimist-options-3.0.2.tgz",
            -      "integrity": "sha512-FyBrT/d0d4+uiZRbqznPXqw3IpZZG3gl3wKWiX784FycUKVwBt0uLBFkQrtE4tZOrgo78nZp2jnKz3L65T5LdQ==",
            -      "dev": true,
            -      "requires": {
            -        "arrify": "^1.0.1",
            -        "is-plain-obj": "^1.1.0"
            -      }
            -    },
            -    "mixin-deep": {
            -      "version": "1.3.2",
            -      "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.2.tgz",
            -      "integrity": "sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA==",
            -      "dev": true,
            -      "requires": {
            -        "for-in": "^1.0.2",
            -        "is-extendable": "^1.0.1"
            -      },
            -      "dependencies": {
            -        "is-extendable": {
            -          "version": "1.0.1",
            -          "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz",
            -          "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==",
            -          "dev": true,
            -          "requires": {
            -            "is-plain-object": "^2.0.4"
            -          }
            -        }
            -      }
            -    },
            -    "mkdirp": {
            -      "version": "0.5.1",
            -      "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz",
            -      "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=",
            -      "dev": true,
            -      "requires": {
            -        "minimist": "0.0.8"
            -      }
            -    },
            -    "mocha": {
            -      "version": "6.2.0",
            -      "resolved": "https://registry.npmjs.org/mocha/-/mocha-6.2.0.tgz",
            -      "integrity": "sha512-qwfFgY+7EKAAUAdv7VYMZQknI7YJSGesxHyhn6qD52DV8UcSZs5XwCifcZGMVIE4a5fbmhvbotxC0DLQ0oKohQ==",
            -      "dev": true,
            -      "requires": {
            -        "ansi-colors": "3.2.3",
            -        "browser-stdout": "1.3.1",
            -        "debug": "3.2.6",
            -        "diff": "3.5.0",
            -        "escape-string-regexp": "1.0.5",
            -        "find-up": "3.0.0",
            -        "glob": "7.1.3",
            -        "growl": "1.10.5",
            -        "he": "1.2.0",
            -        "js-yaml": "3.13.1",
            -        "log-symbols": "2.2.0",
            -        "minimatch": "3.0.4",
            -        "mkdirp": "0.5.1",
            -        "ms": "2.1.1",
            -        "node-environment-flags": "1.0.5",
            -        "object.assign": "4.1.0",
            -        "strip-json-comments": "2.0.1",
            -        "supports-color": "6.0.0",
            -        "which": "1.3.1",
            -        "wide-align": "1.1.3",
            -        "yargs": "13.2.2",
            -        "yargs-parser": "13.0.0",
            -        "yargs-unparser": "1.5.0"
            -      },
            -      "dependencies": {
            -        "ansi-colors": {
            -          "version": "3.2.3",
            -          "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.3.tgz",
            -          "integrity": "sha512-LEHHyuhlPY3TmuUYMh2oz89lTShfvgbmzaBcxve9t/9Wuy7Dwf4yoAKcND7KFT1HAQfqZ12qtc+DUrBMeKF9nw==",
            -          "dev": true
            -        },
            -        "camelcase": {
            -          "version": "5.3.1",
            -          "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz",
            -          "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==",
            -          "dev": true
            -        },
            -        "debug": {
            -          "version": "3.2.6",
            -          "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz",
            -          "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==",
            -          "dev": true,
            -          "requires": {
            -            "ms": "^2.1.1"
            -          }
            -        },
            -        "find-up": {
            -          "version": "3.0.0",
            -          "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz",
            -          "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==",
            -          "dev": true,
            -          "requires": {
            -            "locate-path": "^3.0.0"
            -          }
            -        },
            -        "ms": {
            -          "version": "2.1.1",
            -          "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz",
            -          "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==",
            -          "dev": true
            -        },
            -        "yargs-parser": {
            -          "version": "13.0.0",
            -          "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.0.0.tgz",
            -          "integrity": "sha512-w2LXjoL8oRdRQN+hOyppuXs+V/fVAYtpcrRxZuF7Kt/Oc+Jr2uAcVntaUTNT6w5ihoWfFDpNY8CPx1QskxZ/pw==",
            -          "dev": true,
            -          "requires": {
            -            "camelcase": "^5.0.0",
            -            "decamelize": "^1.2.0"
            -          }
            -        }
            -      }
            -    },
            -    "moment": {
            -      "version": "2.27.0",
            -      "resolved": "https://registry.npmjs.org/moment/-/moment-2.27.0.tgz",
            -      "integrity": "sha512-al0MUK7cpIcglMv3YF13qSgdAIqxHTO7brRtaz3DlSULbqfazqkc5kEjNrLDOM7fsjshoFIihnU8snrP7zUvhQ==",
            -      "dev": true
            -    },
            -    "ms": {
            -      "version": "2.0.0",
            -      "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
            -      "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=",
            -      "dev": true
            -    },
            -    "mute-stdout": {
            -      "version": "1.0.1",
            -      "resolved": "https://registry.npmjs.org/mute-stdout/-/mute-stdout-1.0.1.tgz",
            -      "integrity": "sha512-kDcwXR4PS7caBpuRYYBUz9iVixUk3anO3f5OYFiIPwK/20vCzKCHyKoulbiDY1S53zD2bxUpxN/IJ+TnXjfvxg==",
            -      "dev": true
            -    },
            -    "nan": {
            -      "version": "2.14.2",
            -      "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.2.tgz",
            -      "integrity": "sha512-M2ufzIiINKCuDfBSAUr1vWQ+vuVcA9kqx8JJUsbQi6yf1uGRyb7HfpdfUr5qLXf3B/t8dPvcjhKMmlfnP47EzQ==",
            -      "dev": true,
            -      "optional": true
            -    },
            -    "nanomatch": {
            -      "version": "1.2.13",
            -      "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz",
            -      "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==",
            -      "dev": true,
            -      "requires": {
            -        "arr-diff": "^4.0.0",
            -        "array-unique": "^0.3.2",
            -        "define-property": "^2.0.2",
            -        "extend-shallow": "^3.0.2",
            -        "fragment-cache": "^0.2.1",
            -        "is-windows": "^1.0.2",
            -        "kind-of": "^6.0.2",
            -        "object.pick": "^1.3.0",
            -        "regex-not": "^1.0.0",
            -        "snapdragon": "^0.8.1",
            -        "to-regex": "^3.0.1"
            -      }
            -    },
            -    "natural-compare": {
            -      "version": "1.4.0",
            -      "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz",
            -      "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=",
            -      "dev": true
            -    },
            -    "neatequal": {
            -      "version": "1.0.0",
            -      "resolved": "https://registry.npmjs.org/neatequal/-/neatequal-1.0.0.tgz",
            -      "integrity": "sha1-LuEhG8n6bkxVcV/SELsFYC6xrjs=",
            -      "dev": true,
            -      "requires": {
            -        "varstream": "^0.3.2"
            -      }
            -    },
            -    "next-tick": {
            -      "version": "1.0.0",
            -      "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.0.0.tgz",
            -      "integrity": "sha1-yobR/ogoFpsBICCOPchCS524NCw=",
            -      "dev": true
            -    },
            -    "nice-try": {
            -      "version": "1.0.5",
            -      "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz",
            -      "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==",
            -      "dev": true
            -    },
            -    "node-cleanup": {
            -      "version": "2.1.2",
            -      "resolved": "https://registry.npmjs.org/node-cleanup/-/node-cleanup-2.1.2.tgz",
            -      "integrity": "sha1-esGavSl+Caf3KnFUXZUbUX5N3iw=",
            -      "dev": true
            -    },
            -    "node-environment-flags": {
            -      "version": "1.0.5",
            -      "resolved": "https://registry.npmjs.org/node-environment-flags/-/node-environment-flags-1.0.5.tgz",
            -      "integrity": "sha512-VNYPRfGfmZLx0Ye20jWzHUjyTW/c+6Wq+iLhDzUI4XmhrDd9l/FozXV3F2xOaXjvp0co0+v1YSR3CMP6g+VvLQ==",
            -      "dev": true,
            -      "requires": {
            -        "object.getownpropertydescriptors": "^2.0.3",
            -        "semver": "^5.7.0"
            -      },
            -      "dependencies": {
            -        "semver": {
            -          "version": "5.7.0",
            -          "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz",
            -          "integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==",
            -          "dev": true
            -        }
            -      }
            -    },
            -    "node-fetch": {
            -      "version": "2.6.1",
            -      "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz",
            -      "integrity": "sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw==",
            -      "dev": true
            -    },
            -    "normalize-package-data": {
            -      "version": "2.5.0",
            -      "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz",
            -      "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==",
            -      "dev": true,
            -      "requires": {
            -        "hosted-git-info": "^2.1.4",
            -        "resolve": "^1.10.0",
            -        "semver": "2 || 3 || 4 || 5",
            -        "validate-npm-package-license": "^3.0.1"
            -      }
            -    },
            -    "normalize-path": {
            -      "version": "2.1.1",
            -      "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz",
            -      "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=",
            -      "dev": true,
            -      "requires": {
            -        "remove-trailing-separator": "^1.0.1"
            -      }
            -    },
            -    "now-and-later": {
            -      "version": "2.0.1",
            -      "resolved": "https://registry.npmjs.org/now-and-later/-/now-and-later-2.0.1.tgz",
            -      "integrity": "sha512-KGvQ0cB70AQfg107Xvs/Fbu+dGmZoTRJp2TaPwcwQm3/7PteUyN2BCgk8KBMPGBUXZdVwyWS8fDCGFygBm19UQ==",
            -      "dev": true,
            -      "requires": {
            -        "once": "^1.3.2"
            -      }
            -    },
            -    "npm-run-all": {
            -      "version": "4.1.5",
            -      "resolved": "https://registry.npmjs.org/npm-run-all/-/npm-run-all-4.1.5.tgz",
            -      "integrity": "sha512-Oo82gJDAVcaMdi3nuoKFavkIHBRVqQ1qvMb+9LHk/cF4P6B2m8aP04hGf7oL6wZ9BuGwX1onlLhpuoofSyoQDQ==",
            -      "dev": true,
            -      "requires": {
            -        "ansi-styles": "^3.2.1",
            -        "chalk": "^2.4.1",
            -        "cross-spawn": "^6.0.5",
            -        "memorystream": "^0.3.1",
            -        "minimatch": "^3.0.4",
            -        "pidtree": "^0.3.0",
            -        "read-pkg": "^3.0.0",
            -        "shell-quote": "^1.6.1",
            -        "string.prototype.padend": "^3.0.0"
            -      },
            -      "dependencies": {
            -        "load-json-file": {
            -          "version": "4.0.0",
            -          "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz",
            -          "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=",
            -          "dev": true,
            -          "requires": {
            -            "graceful-fs": "^4.1.2",
            -            "parse-json": "^4.0.0",
            -            "pify": "^3.0.0",
            -            "strip-bom": "^3.0.0"
            -          }
            -        },
            -        "parse-json": {
            -          "version": "4.0.0",
            -          "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz",
            -          "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=",
            -          "dev": true,
            -          "requires": {
            -            "error-ex": "^1.3.1",
            -            "json-parse-better-errors": "^1.0.1"
            -          }
            -        },
            -        "path-type": {
            -          "version": "3.0.0",
            -          "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz",
            -          "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==",
            -          "dev": true,
            -          "requires": {
            -            "pify": "^3.0.0"
            -          }
            -        },
            -        "pify": {
            -          "version": "3.0.0",
            -          "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz",
            -          "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=",
            -          "dev": true
            -        },
            -        "read-pkg": {
            -          "version": "3.0.0",
            -          "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz",
            -          "integrity": "sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=",
            -          "dev": true,
            -          "requires": {
            -            "load-json-file": "^4.0.0",
            -            "normalize-package-data": "^2.3.2",
            -            "path-type": "^3.0.0"
            -          }
            -        },
            -        "strip-bom": {
            -          "version": "3.0.0",
            -          "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz",
            -          "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=",
            -          "dev": true
            -        }
            -      }
            -    },
            -    "npm-run-path": {
            -      "version": "2.0.2",
            -      "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz",
            -      "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=",
            -      "dev": true,
            -      "requires": {
            -        "path-key": "^2.0.0"
            -      }
            -    },
            -    "number-is-nan": {
            -      "version": "1.0.1",
            -      "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz",
            -      "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=",
            -      "dev": true
            -    },
            -    "nunjucks": {
            -      "version": "3.2.2",
            -      "resolved": "https://registry.npmjs.org/nunjucks/-/nunjucks-3.2.2.tgz",
            -      "integrity": "sha512-KUi85OoF2NMygwODAy28Lh9qHmq5hO3rBlbkYoC8v377h4l8Pt5qFjILl0LWpMbOrZ18CzfVVUvIHUIrtED3sA==",
            -      "dev": true,
            -      "requires": {
            -        "a-sync-waterfall": "^1.0.0",
            -        "asap": "^2.0.3",
            -        "chokidar": "^3.3.0",
            -        "commander": "^5.1.0"
            -      },
            -      "dependencies": {
            -        "anymatch": {
            -          "version": "3.1.1",
            -          "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.1.tgz",
            -          "integrity": "sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg==",
            -          "dev": true,
            -          "optional": true,
            -          "requires": {
            -            "normalize-path": "^3.0.0",
            -            "picomatch": "^2.0.4"
            -          }
            -        },
            -        "binary-extensions": {
            -          "version": "2.1.0",
            -          "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.1.0.tgz",
            -          "integrity": "sha512-1Yj8h9Q+QDF5FzhMs/c9+6UntbD5MkRfRwac8DoEm9ZfUBZ7tZ55YcGVAzEe4bXsdQHEk+s9S5wsOKVdZrw0tQ==",
            -          "dev": true,
            -          "optional": true
            -        },
            -        "braces": {
            -          "version": "3.0.2",
            -          "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz",
            -          "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==",
            -          "dev": true,
            -          "optional": true,
            -          "requires": {
            -            "fill-range": "^7.0.1"
            -          }
            -        },
            -        "chokidar": {
            -          "version": "3.4.3",
            -          "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.4.3.tgz",
            -          "integrity": "sha512-DtM3g7juCXQxFVSNPNByEC2+NImtBuxQQvWlHunpJIS5Ocr0lG306cC7FCi7cEA0fzmybPUIl4txBIobk1gGOQ==",
            -          "dev": true,
            -          "optional": true,
            -          "requires": {
            -            "anymatch": "~3.1.1",
            -            "braces": "~3.0.2",
            -            "fsevents": "~2.1.2",
            -            "glob-parent": "~5.1.0",
            -            "is-binary-path": "~2.1.0",
            -            "is-glob": "~4.0.1",
            -            "normalize-path": "~3.0.0",
            -            "readdirp": "~3.5.0"
            -          }
            -        },
            -        "commander": {
            -          "version": "5.1.0",
            -          "resolved": "https://registry.npmjs.org/commander/-/commander-5.1.0.tgz",
            -          "integrity": "sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg==",
            -          "dev": true
            -        },
            -        "fill-range": {
            -          "version": "7.0.1",
            -          "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
            -          "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==",
            -          "dev": true,
            -          "optional": true,
            -          "requires": {
            -            "to-regex-range": "^5.0.1"
            -          }
            -        },
            -        "fsevents": {
            -          "version": "2.1.3",
            -          "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.3.tgz",
            -          "integrity": "sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ==",
            -          "dev": true,
            -          "optional": true
            -        },
            -        "glob-parent": {
            -          "version": "5.1.1",
            -          "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.1.tgz",
            -          "integrity": "sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ==",
            -          "dev": true,
            -          "optional": true,
            -          "requires": {
            -            "is-glob": "^4.0.1"
            -          }
            -        },
            -        "is-binary-path": {
            -          "version": "2.1.0",
            -          "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz",
            -          "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==",
            -          "dev": true,
            -          "optional": true,
            -          "requires": {
            -            "binary-extensions": "^2.0.0"
            -          }
            -        },
            -        "is-number": {
            -          "version": "7.0.0",
            -          "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
            -          "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",
            -          "dev": true,
            -          "optional": true
            -        },
            -        "normalize-path": {
            -          "version": "3.0.0",
            -          "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz",
            -          "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==",
            -          "dev": true,
            -          "optional": true
            -        },
            -        "readdirp": {
            -          "version": "3.5.0",
            -          "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.5.0.tgz",
            -          "integrity": "sha512-cMhu7c/8rdhkHXWsY+osBhfSy0JikwpHK/5+imo+LpeasTF8ouErHrlYkwT0++njiyuDvc7OFY5T3ukvZ8qmFQ==",
            -          "dev": true,
            -          "optional": true,
            -          "requires": {
            -            "picomatch": "^2.2.1"
            -          }
            -        },
            -        "to-regex-range": {
            -          "version": "5.0.1",
            -          "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
            -          "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
            -          "dev": true,
            -          "optional": true,
            -          "requires": {
            -            "is-number": "^7.0.0"
            -          }
            -        }
            -      }
            -    },
            -    "nwsapi": {
            -      "version": "2.1.1",
            -      "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.1.1.tgz",
            -      "integrity": "sha512-T5GaA1J/d34AC8mkrFD2O0DR17kwJ702ZOtJOsS8RpbsQZVOC2/xYFb1i/cw+xdM54JIlMuojjDOYct8GIWtwg==",
            -      "dev": true
            -    },
            -    "oauth-sign": {
            -      "version": "0.9.0",
            -      "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz",
            -      "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==",
            -      "dev": true
            -    },
            -    "object-assign": {
            -      "version": "4.1.1",
            -      "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
            -      "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=",
            -      "dev": true
            -    },
            -    "object-copy": {
            -      "version": "0.1.0",
            -      "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz",
            -      "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=",
            -      "dev": true,
            -      "requires": {
            -        "copy-descriptor": "^0.1.0",
            -        "define-property": "^0.2.5",
            -        "kind-of": "^3.0.3"
            -      },
            -      "dependencies": {
            -        "define-property": {
            -          "version": "0.2.5",
            -          "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz",
            -          "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=",
            -          "dev": true,
            -          "requires": {
            -            "is-descriptor": "^0.1.0"
            -          }
            -        },
            -        "kind-of": {
            -          "version": "3.2.2",
            -          "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
            -          "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
            -          "dev": true,
            -          "requires": {
            -            "is-buffer": "^1.1.5"
            -          }
            -        }
            -      }
            -    },
            -    "object-inspect": {
            -      "version": "1.10.3",
            -      "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.10.3.tgz",
            -      "integrity": "sha512-e5mCJlSH7poANfC8z8S9s9S2IN5/4Zb3aZ33f5s8YqoazCFzNLloLU8r5VCG+G7WoqLvAAZoVMcy3tp/3X0Plw==",
            -      "dev": true
            -    },
            -    "object-keys": {
            -      "version": "1.1.0",
            -      "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.0.tgz",
            -      "integrity": "sha512-6OO5X1+2tYkNyNEx6TsCxEqFfRWaqx6EtMiSbGrw8Ob8v9Ne+Hl8rBAgLBZn5wjEz3s/s6U1WXFUFOcxxAwUpg==",
            -      "dev": true
            -    },
            -    "object-visit": {
            -      "version": "1.0.1",
            -      "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz",
            -      "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=",
            -      "dev": true,
            -      "requires": {
            -        "isobject": "^3.0.0"
            -      }
            -    },
            -    "object.assign": {
            -      "version": "4.1.0",
            -      "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz",
            -      "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==",
            -      "dev": true,
            -      "requires": {
            -        "define-properties": "^1.1.2",
            -        "function-bind": "^1.1.1",
            -        "has-symbols": "^1.0.0",
            -        "object-keys": "^1.0.11"
            -      }
            -    },
            -    "object.defaults": {
            -      "version": "1.1.0",
            -      "resolved": "https://registry.npmjs.org/object.defaults/-/object.defaults-1.1.0.tgz",
            -      "integrity": "sha1-On+GgzS0B96gbaFtiNXNKeQ1/s8=",
            -      "dev": true,
            -      "requires": {
            -        "array-each": "^1.0.1",
            -        "array-slice": "^1.0.0",
            -        "for-own": "^1.0.0",
            -        "isobject": "^3.0.0"
            -      }
            -    },
            -    "object.getownpropertydescriptors": {
            -      "version": "2.0.3",
            -      "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.0.3.tgz",
            -      "integrity": "sha1-h1jIRvW0B62rDyNuCYbxSwUcqhY=",
            -      "dev": true,
            -      "requires": {
            -        "define-properties": "^1.1.2",
            -        "es-abstract": "^1.5.1"
            -      }
            -    },
            -    "object.map": {
            -      "version": "1.0.1",
            -      "resolved": "https://registry.npmjs.org/object.map/-/object.map-1.0.1.tgz",
            -      "integrity": "sha1-z4Plncj8wK1fQlDh94s7gb2AHTc=",
            -      "dev": true,
            -      "requires": {
            -        "for-own": "^1.0.0",
            -        "make-iterator": "^1.0.0"
            -      }
            -    },
            -    "object.pick": {
            -      "version": "1.3.0",
            -      "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz",
            -      "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=",
            -      "dev": true,
            -      "requires": {
            -        "isobject": "^3.0.1"
            -      }
            -    },
            -    "object.reduce": {
            -      "version": "1.0.1",
            -      "resolved": "https://registry.npmjs.org/object.reduce/-/object.reduce-1.0.1.tgz",
            -      "integrity": "sha1-b+NI8qx/oPlcpiEiZZkJaCW7A60=",
            -      "dev": true,
            -      "requires": {
            -        "for-own": "^1.0.0",
            -        "make-iterator": "^1.0.0"
            -      }
            -    },
            -    "octokit-pagination-methods": {
            -      "version": "1.1.0",
            -      "resolved": "https://registry.npmjs.org/octokit-pagination-methods/-/octokit-pagination-methods-1.1.0.tgz",
            -      "integrity": "sha512-fZ4qZdQ2nxJvtcasX7Ghl+WlWS/d9IgnBIwFZXVNNZUmzpno91SX5bc5vuxiuKoCtK78XxGGNuSCrDC7xYB3OQ==",
            -      "dev": true
            -    },
            -    "once": {
            -      "version": "1.4.0",
            -      "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
            -      "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
            -      "dev": true,
            -      "requires": {
            -        "wrappy": "1"
            -      }
            -    },
            -    "opener": {
            -      "version": "1.5.2",
            -      "resolved": "https://registry.npmjs.org/opener/-/opener-1.5.2.tgz",
            -      "integrity": "sha512-ur5UIdyw5Y7yEj9wLzhqXiy6GZ3Mwx0yGI+5sMn2r0N0v3cKJvUmFH5yPP+WXh9e0xfyzyJX95D8l088DNFj7A==",
            -      "dev": true
            -    },
            -    "optionator": {
            -      "version": "0.8.2",
            -      "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz",
            -      "integrity": "sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=",
            -      "dev": true,
            -      "requires": {
            -        "deep-is": "~0.1.3",
            -        "fast-levenshtein": "~2.0.4",
            -        "levn": "~0.3.0",
            -        "prelude-ls": "~1.1.2",
            -        "type-check": "~0.3.2",
            -        "wordwrap": "~1.0.0"
            -      }
            -    },
            -    "ordered-read-streams": {
            -      "version": "1.0.1",
            -      "resolved": "https://registry.npmjs.org/ordered-read-streams/-/ordered-read-streams-1.0.1.tgz",
            -      "integrity": "sha1-d8DLN8QVJdZBZtmQ/61+xqDhNj4=",
            -      "dev": true,
            -      "requires": {
            -        "readable-stream": "^2.0.1"
            -      }
            -    },
            -    "os-locale": {
            -      "version": "1.4.0",
            -      "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz",
            -      "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=",
            -      "dev": true,
            -      "requires": {
            -        "lcid": "^1.0.0"
            -      }
            -    },
            -    "os-name": {
            -      "version": "3.1.0",
            -      "resolved": "https://registry.npmjs.org/os-name/-/os-name-3.1.0.tgz",
            -      "integrity": "sha512-h8L+8aNjNcMpo/mAIBPn5PXCM16iyPGjHNWo6U1YO8sJTMHtEtyczI6QJnLoplswm6goopQkqc7OAnjhWcugVg==",
            -      "dev": true,
            -      "requires": {
            -        "macos-release": "^2.2.0",
            -        "windows-release": "^3.1.0"
            -      }
            -    },
            -    "override-require": {
            -      "version": "1.1.1",
            -      "resolved": "https://registry.npmjs.org/override-require/-/override-require-1.1.1.tgz",
            -      "integrity": "sha1-auIvresfhQ/7DPTCD/e4fl62UN8=",
            -      "dev": true
            -    },
            -    "p-defer": {
            -      "version": "1.0.0",
            -      "resolved": "https://registry.npmjs.org/p-defer/-/p-defer-1.0.0.tgz",
            -      "integrity": "sha1-n26xgvbJqozXQwBKfU+WsZaw+ww=",
            -      "dev": true
            -    },
            -    "p-finally": {
            -      "version": "1.0.0",
            -      "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz",
            -      "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=",
            -      "dev": true
            -    },
            -    "p-is-promise": {
            -      "version": "2.0.0",
            -      "resolved": "https://registry.npmjs.org/p-is-promise/-/p-is-promise-2.0.0.tgz",
            -      "integrity": "sha512-pzQPhYMCAgLAKPWD2jC3Se9fEfrD9npNos0y150EeqZll7akhEgGhTW/slB6lHku8AvYGiJ+YJ5hfHKePPgFWg==",
            -      "dev": true
            -    },
            -    "p-limit": {
            -      "version": "2.2.0",
            -      "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.0.tgz",
            -      "integrity": "sha512-pZbTJpoUsCzV48Mc9Nh51VbwO0X9cuPFE8gYwx9BTCt9SF8/b7Zljd2fVgOxhIF/HDTKgpVzs+GPhyKfjLLFRQ==",
            -      "dev": true,
            -      "requires": {
            -        "p-try": "^2.0.0"
            -      }
            -    },
            -    "p-locate": {
            -      "version": "3.0.0",
            -      "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz",
            -      "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==",
            -      "dev": true,
            -      "requires": {
            -        "p-limit": "^2.0.0"
            -      }
            -    },
            -    "p-map": {
            -      "version": "2.1.0",
            -      "resolved": "https://registry.npmjs.org/p-map/-/p-map-2.1.0.tgz",
            -      "integrity": "sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw==",
            -      "dev": true
            -    },
            -    "p-try": {
            -      "version": "2.1.0",
            -      "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.1.0.tgz",
            -      "integrity": "sha512-H2RyIJ7+A3rjkwKC2l5GGtU4H1vkxKCAGsWasNVd0Set+6i4znxbWy6/j16YDPJDWxhsgZiKAstMEP8wCdSpjA==",
            -      "dev": true
            -    },
            -    "pako": {
            -      "version": "1.0.11",
            -      "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz",
            -      "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==",
            -      "dev": true
            -    },
            -    "parent-module": {
            -      "version": "1.0.1",
            -      "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz",
            -      "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==",
            -      "dev": true,
            -      "requires": {
            -        "callsites": "^3.0.0"
            -      },
            -      "dependencies": {
            -        "callsites": {
            -          "version": "3.1.0",
            -          "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz",
            -          "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==",
            -          "dev": true
            -        }
            -      }
            -    },
            -    "parse-diff": {
            -      "version": "0.7.1",
            -      "resolved": "https://registry.npmjs.org/parse-diff/-/parse-diff-0.7.1.tgz",
            -      "integrity": "sha512-1j3l8IKcy4yRK2W4o9EYvJLSzpAVwz4DXqCewYyx2vEwk2gcf3DBPqc8Fj4XV3K33OYJ08A8fWwyu/ykD/HUSg==",
            -      "dev": true
            -    },
            -    "parse-filepath": {
            -      "version": "1.0.2",
            -      "resolved": "https://registry.npmjs.org/parse-filepath/-/parse-filepath-1.0.2.tgz",
            -      "integrity": "sha1-pjISf1Oq89FYdvWHLz/6x2PWyJE=",
            -      "dev": true,
            -      "requires": {
            -        "is-absolute": "^1.0.0",
            -        "map-cache": "^0.2.0",
            -        "path-root": "^0.1.1"
            -      }
            -    },
            -    "parse-git-config": {
            -      "version": "2.0.3",
            -      "resolved": "https://registry.npmjs.org/parse-git-config/-/parse-git-config-2.0.3.tgz",
            -      "integrity": "sha512-Js7ueMZOVSZ3tP8C7E3KZiHv6QQl7lnJ+OkbxoaFazzSa2KyEHqApfGbU3XboUgUnq4ZuUmskUpYKTNx01fm5A==",
            -      "dev": true,
            -      "requires": {
            -        "expand-tilde": "^2.0.2",
            -        "git-config-path": "^1.0.1",
            -        "ini": "^1.3.5"
            -      }
            -    },
            -    "parse-github-url": {
            -      "version": "1.0.2",
            -      "resolved": "https://registry.npmjs.org/parse-github-url/-/parse-github-url-1.0.2.tgz",
            -      "integrity": "sha512-kgBf6avCbO3Cn6+RnzRGLkUsv4ZVqv/VfAYkRsyBcgkshNvVBkRn1FEZcW0Jb+npXQWm2vHPnnOqFteZxRRGNw==",
            -      "dev": true
            -    },
            -    "parse-json": {
            -      "version": "2.2.0",
            -      "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz",
            -      "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=",
            -      "dev": true,
            -      "requires": {
            -        "error-ex": "^1.2.0"
            -      }
            -    },
            -    "parse-link-header": {
            -      "version": "1.0.1",
            -      "resolved": "https://registry.npmjs.org/parse-link-header/-/parse-link-header-1.0.1.tgz",
            -      "integrity": "sha1-vt/g0hGK64S+deewJUGeyKYRQKc=",
            -      "dev": true,
            -      "requires": {
            -        "xtend": "~4.0.1"
            -      }
            -    },
            -    "parse-node-version": {
            -      "version": "1.0.1",
            -      "resolved": "https://registry.npmjs.org/parse-node-version/-/parse-node-version-1.0.1.tgz",
            -      "integrity": "sha512-3YHlOa/JgH6Mnpr05jP9eDG254US9ek25LyIxZlDItp2iJtwyaXQb57lBYLdT3MowkUFYEV2XXNAYIPlESvJlA==",
            -      "dev": true
            -    },
            -    "parse-passwd": {
            -      "version": "1.0.0",
            -      "resolved": "https://registry.npmjs.org/parse-passwd/-/parse-passwd-1.0.0.tgz",
            -      "integrity": "sha1-bVuTSkVpk7I9N/QKOC1vFmao5cY=",
            -      "dev": true
            -    },
            -    "parse5": {
            -      "version": "5.1.0",
            -      "resolved": "https://registry.npmjs.org/parse5/-/parse5-5.1.0.tgz",
            -      "integrity": "sha512-fxNG2sQjHvlVAYmzBZS9YlDp6PTSSDwa98vkD4QgVDDCAo84z5X1t5XyJQ62ImdLXx5NdIIfihey6xpum9/gRQ==",
            -      "dev": true
            -    },
            -    "pascalcase": {
            -      "version": "0.1.1",
            -      "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz",
            -      "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=",
            -      "dev": true
            -    },
            -    "path-dirname": {
            -      "version": "1.0.2",
            -      "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz",
            -      "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=",
            -      "dev": true
            -    },
            -    "path-exists": {
            -      "version": "2.1.0",
            -      "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz",
            -      "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=",
            -      "dev": true,
            -      "requires": {
            -        "pinkie-promise": "^2.0.0"
            -      }
            -    },
            -    "path-is-absolute": {
            -      "version": "1.0.1",
            -      "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
            -      "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=",
            -      "dev": true
            -    },
            -    "path-is-inside": {
            -      "version": "1.0.2",
            -      "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz",
            -      "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=",
            -      "dev": true
            -    },
            -    "path-key": {
            -      "version": "2.0.1",
            -      "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz",
            -      "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=",
            -      "dev": true
            -    },
            -    "path-parse": {
            -      "version": "1.0.7",
            -      "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz",
            -      "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==",
            -      "dev": true
            -    },
            -    "path-root": {
            -      "version": "0.1.1",
            -      "resolved": "https://registry.npmjs.org/path-root/-/path-root-0.1.1.tgz",
            -      "integrity": "sha1-mkpoFMrBwM1zNgqV8yCDyOpHRbc=",
            -      "dev": true,
            -      "requires": {
            -        "path-root-regex": "^0.1.0"
            -      }
            -    },
            -    "path-root-regex": {
            -      "version": "0.1.2",
            -      "resolved": "https://registry.npmjs.org/path-root-regex/-/path-root-regex-0.1.2.tgz",
            -      "integrity": "sha1-v8zcjfWxLcUsi0PsONGNcsBLqW0=",
            -      "dev": true
            -    },
            -    "path-type": {
            -      "version": "1.1.0",
            -      "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz",
            -      "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=",
            -      "dev": true,
            -      "requires": {
            -        "graceful-fs": "^4.1.2",
            -        "pify": "^2.0.0",
            -        "pinkie-promise": "^2.0.0"
            -      }
            -    },
            -    "pathval": {
            -      "version": "1.1.0",
            -      "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.0.tgz",
            -      "integrity": "sha1-uULm1L3mUwBe9rcTYd74cn0GReA=",
            -      "dev": true
            -    },
            -    "performance-now": {
            -      "version": "2.1.0",
            -      "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz",
            -      "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=",
            -      "dev": true
            -    },
            -    "picomatch": {
            -      "version": "2.2.2",
            -      "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz",
            -      "integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==",
            -      "dev": true,
            -      "optional": true
            -    },
            -    "pidtree": {
            -      "version": "0.3.1",
            -      "resolved": "https://registry.npmjs.org/pidtree/-/pidtree-0.3.1.tgz",
            -      "integrity": "sha512-qQbW94hLHEqCg7nhby4yRC7G2+jYHY4Rguc2bjw7Uug4GIJuu1tvf2uHaZv5Q8zdt+WKJ6qK1FOI6amaWUo5FA==",
            -      "dev": true
            -    },
            -    "pify": {
            -      "version": "2.3.0",
            -      "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz",
            -      "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=",
            -      "dev": true
            -    },
            -    "pinkie": {
            -      "version": "2.0.4",
            -      "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz",
            -      "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=",
            -      "dev": true
            -    },
            -    "pinkie-promise": {
            -      "version": "2.0.1",
            -      "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz",
            -      "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=",
            -      "dev": true,
            -      "requires": {
            -        "pinkie": "^2.0.0"
            -      }
            -    },
            -    "pinpoint": {
            -      "version": "1.1.0",
            -      "resolved": "https://registry.npmjs.org/pinpoint/-/pinpoint-1.1.0.tgz",
            -      "integrity": "sha1-DPd1eml38b9/ajIge3CeN3OI6HQ=",
            -      "dev": true
            -    },
            -    "platform": {
            -      "version": "1.3.6",
            -      "resolved": "https://registry.npmjs.org/platform/-/platform-1.3.6.tgz",
            -      "integrity": "sha512-fnWVljUchTro6RiCFvCXBbNhJc2NijN7oIQxbwsyL0buWJPG85v81ehlHI9fXrJsMNgTofEoWIQeClKpgxFLrg==",
            -      "dev": true
            -    },
            -    "pn": {
            -      "version": "1.1.0",
            -      "resolved": "https://registry.npmjs.org/pn/-/pn-1.1.0.tgz",
            -      "integrity": "sha512-2qHaIQr2VLRFoxe2nASzsV6ef4yOOH+Fi9FBOVH6cqeSgUnoyySPZkxzLuzd+RYOQTRpROA0ztTMqxROKSb/nA==",
            -      "dev": true
            -    },
            -    "portfinder": {
            -      "version": "1.0.28",
            -      "resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.28.tgz",
            -      "integrity": "sha512-Se+2isanIcEqf2XMHjyUKskczxbPH7dQnlMjXX6+dybayyHvAf/TCgyMRlzf/B6QDhAEFOGes0pzRo3by4AbMA==",
            -      "dev": true,
            -      "requires": {
            -        "async": "^2.6.2",
            -        "debug": "^3.1.1",
            -        "mkdirp": "^0.5.5"
            -      },
            -      "dependencies": {
            -        "debug": {
            -          "version": "3.2.7",
            -          "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz",
            -          "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==",
            -          "dev": true,
            -          "requires": {
            -            "ms": "^2.1.1"
            -          }
            -        },
            -        "minimist": {
            -          "version": "1.2.5",
            -          "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
            -          "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==",
            -          "dev": true
            -        },
            -        "mkdirp": {
            -          "version": "0.5.5",
            -          "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz",
            -          "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==",
            -          "dev": true,
            -          "requires": {
            -            "minimist": "^1.2.5"
            -          }
            -        },
            -        "ms": {
            -          "version": "2.1.3",
            -          "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
            -          "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
            -          "dev": true
            -        }
            -      }
            -    },
            -    "posix-character-classes": {
            -      "version": "0.1.1",
            -      "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz",
            -      "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=",
            -      "dev": true
            -    },
            -    "postcss": {
            -      "version": "7.0.36",
            -      "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.36.tgz",
            -      "integrity": "sha512-BebJSIUMwJHRH0HAQoxN4u1CN86glsrwsW0q7T+/m44eXOUAxSNdHRkNZPYz5vVUbg17hFgOQDE7fZk7li3pZw==",
            -      "dev": true,
            -      "requires": {
            -        "chalk": "^2.4.2",
            -        "source-map": "^0.6.1",
            -        "supports-color": "^6.1.0"
            -      },
            -      "dependencies": {
            -        "source-map": {
            -          "version": "0.6.1",
            -          "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
            -          "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
            -          "dev": true
            -        },
            -        "supports-color": {
            -          "version": "6.1.0",
            -          "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz",
            -          "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==",
            -          "dev": true,
            -          "requires": {
            -            "has-flag": "^3.0.0"
            -          }
            -        }
            -      }
            -    },
            -    "prelude-ls": {
            -      "version": "1.1.2",
            -      "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz",
            -      "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=",
            -      "dev": true
            -    },
            -    "pretty-hrtime": {
            -      "version": "1.0.3",
            -      "resolved": "https://registry.npmjs.org/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz",
            -      "integrity": "sha1-t+PqQkNaTJsnWdmeDyAesZWALuE=",
            -      "dev": true
            -    },
            -    "prettyjson": {
            -      "version": "1.2.1",
            -      "resolved": "https://registry.npmjs.org/prettyjson/-/prettyjson-1.2.1.tgz",
            -      "integrity": "sha1-/P+rQdGcq0365eV15kJGYZsS0ok=",
            -      "dev": true,
            -      "requires": {
            -        "colors": "^1.1.2",
            -        "minimist": "^1.2.0"
            -      },
            -      "dependencies": {
            -        "minimist": {
            -          "version": "1.2.5",
            -          "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
            -          "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==",
            -          "dev": true
            -        }
            -      }
            -    },
            -    "process-nextick-args": {
            -      "version": "2.0.1",
            -      "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz",
            -      "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==",
            -      "dev": true
            -    },
            -    "progress": {
            -      "version": "2.0.3",
            -      "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz",
            -      "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==",
            -      "dev": true
            -    },
            -    "psl": {
            -      "version": "1.1.31",
            -      "resolved": "https://registry.npmjs.org/psl/-/psl-1.1.31.tgz",
            -      "integrity": "sha512-/6pt4+C+T+wZUieKR620OpzN/LlnNKuWjy1iFLQ/UG35JqHlR/89MP1d96dUfkf6Dne3TuLQzOYEYshJ+Hx8mw==",
            -      "dev": true
            -    },
            -    "pump": {
            -      "version": "3.0.0",
            -      "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz",
            -      "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==",
            -      "dev": true,
            -      "requires": {
            -        "end-of-stream": "^1.1.0",
            -        "once": "^1.3.1"
            -      }
            -    },
            -    "pumpify": {
            -      "version": "1.5.1",
            -      "resolved": "https://registry.npmjs.org/pumpify/-/pumpify-1.5.1.tgz",
            -      "integrity": "sha512-oClZI37HvuUJJxSKKrC17bZ9Cu0ZYhEAGPsPUy9KlMUmv9dKX2o77RUmq7f3XjIxbwyGwYzbzQ1L2Ks8sIradQ==",
            -      "dev": true,
            -      "requires": {
            -        "duplexify": "^3.6.0",
            -        "inherits": "^2.0.3",
            -        "pump": "^2.0.0"
            -      },
            -      "dependencies": {
            -        "pump": {
            -          "version": "2.0.1",
            -          "resolved": "https://registry.npmjs.org/pump/-/pump-2.0.1.tgz",
            -          "integrity": "sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA==",
            -          "dev": true,
            -          "requires": {
            -            "end-of-stream": "^1.1.0",
            -            "once": "^1.3.1"
            -          }
            -        }
            -      }
            -    },
            -    "punycode": {
            -      "version": "2.1.1",
            -      "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz",
            -      "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==",
            -      "dev": true
            -    },
            -    "qs": {
            -      "version": "6.5.2",
            -      "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz",
            -      "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==",
            -      "dev": true
            -    },
            -    "query-string": {
            -      "version": "6.13.6",
            -      "resolved": "https://registry.npmjs.org/query-string/-/query-string-6.13.6.tgz",
            -      "integrity": "sha512-/WWZ7d9na6s2wMEGdVCVgKWE9Rt7nYyNIf7k8xmHXcesPMlEzicWo3lbYwHyA4wBktI2KrXxxZeACLbE84hvSQ==",
            -      "dev": true,
            -      "requires": {
            -        "decode-uri-component": "^0.2.0",
            -        "split-on-first": "^1.0.0",
            -        "strict-uri-encode": "^2.0.0"
            -      }
            -    },
            -    "quick-lru": {
            -      "version": "1.1.0",
            -      "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-1.1.0.tgz",
            -      "integrity": "sha1-Q2CxfGETatOAeDl/8RQW4Ybc+7g=",
            -      "dev": true
            -    },
            -    "read-pkg": {
            -      "version": "1.1.0",
            -      "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz",
            -      "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=",
            -      "dev": true,
            -      "requires": {
            -        "load-json-file": "^1.0.0",
            -        "normalize-package-data": "^2.3.2",
            -        "path-type": "^1.0.0"
            -      }
            -    },
            -    "read-pkg-up": {
            -      "version": "1.0.1",
            -      "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz",
            -      "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=",
            -      "dev": true,
            -      "requires": {
            -        "find-up": "^1.0.0",
            -        "read-pkg": "^1.0.0"
            -      }
            -    },
            -    "readable-stream": {
            -      "version": "2.3.6",
            -      "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz",
            -      "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==",
            -      "dev": true,
            -      "requires": {
            -        "core-util-is": "~1.0.0",
            -        "inherits": "~2.0.3",
            -        "isarray": "~1.0.0",
            -        "process-nextick-args": "~2.0.0",
            -        "safe-buffer": "~5.1.1",
            -        "string_decoder": "~1.1.1",
            -        "util-deprecate": "~1.0.1"
            -      },
            -      "dependencies": {
            -        "process-nextick-args": {
            -          "version": "2.0.0",
            -          "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz",
            -          "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==",
            -          "dev": true
            -        }
            -      }
            -    },
            -    "readdirp": {
            -      "version": "2.2.1",
            -      "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.2.1.tgz",
            -      "integrity": "sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ==",
            -      "dev": true,
            -      "requires": {
            -        "graceful-fs": "^4.1.11",
            -        "micromatch": "^3.1.10",
            -        "readable-stream": "^2.0.2"
            -      }
            -    },
            -    "readline-sync": {
            -      "version": "1.4.10",
            -      "resolved": "https://registry.npmjs.org/readline-sync/-/readline-sync-1.4.10.tgz",
            -      "integrity": "sha512-gNva8/6UAe8QYepIQH/jQ2qn91Qj0B9sYjMBBs3QOB8F2CXcKgLxQaJRP76sWVRQt+QU+8fAkCbCvjjMFu7Ycw==",
            -      "dev": true
            -    },
            -    "rechoir": {
            -      "version": "0.6.2",
            -      "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz",
            -      "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=",
            -      "dev": true,
            -      "requires": {
            -        "resolve": "^1.1.6"
            -      }
            -    },
            -    "redent": {
            -      "version": "2.0.0",
            -      "resolved": "https://registry.npmjs.org/redent/-/redent-2.0.0.tgz",
            -      "integrity": "sha1-wbIAe0LVfrE4kHmzyDM2OdXhzKo=",
            -      "dev": true,
            -      "requires": {
            -        "indent-string": "^3.0.0",
            -        "strip-indent": "^2.0.0"
            -      }
            -    },
            -    "refa": {
            -      "version": "0.9.1",
            -      "resolved": "https://registry.npmjs.org/refa/-/refa-0.9.1.tgz",
            -      "integrity": "sha512-egU8LgFq2VXlAfUi8Jcbr5X38wEOadMFf8tCbshgcpVCYlE7k84pJOSlnvXF+muDB4igkdVMq7Z/kiNPqDT9TA==",
            -      "dev": true,
            -      "requires": {
            -        "regexpp": "^3.2.0"
            -      }
            -    },
            -    "regenerator-runtime": {
            -      "version": "0.13.7",
            -      "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.7.tgz",
            -      "integrity": "sha512-a54FxoJDIr27pgf7IgeQGxmqUNYrcV338lf/6gH456HZ/PhX+5BcwHXG9ajESmwe6WRO0tAzRUrRmNONWgkrew==",
            -      "dev": true
            -    },
            -    "regex-not": {
            -      "version": "1.0.2",
            -      "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz",
            -      "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==",
            -      "dev": true,
            -      "requires": {
            -        "extend-shallow": "^3.0.2",
            -        "safe-regex": "^1.1.0"
            -      }
            -    },
            -    "regexp-ast-analysis": {
            -      "version": "0.2.4",
            -      "resolved": "https://registry.npmjs.org/regexp-ast-analysis/-/regexp-ast-analysis-0.2.4.tgz",
            -      "integrity": "sha512-8L7kOZQaKPxKKAwGuUZxTQtlO3WZ+tiXy4s6G6PKL6trbOXcZoumwC3AOHHFtI/xoSbNxt7jgLvCnP1UADLWqg==",
            -      "dev": true,
            -      "requires": {
            -        "refa": "^0.9.0",
            -        "regexpp": "^3.2.0"
            -      }
            -    },
            -    "regexpp": {
            -      "version": "3.2.0",
            -      "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz",
            -      "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==",
            -      "dev": true
            -    },
            -    "regextras": {
            -      "version": "0.7.1",
            -      "resolved": "https://registry.npmjs.org/regextras/-/regextras-0.7.1.tgz",
            -      "integrity": "sha512-9YXf6xtW+qzQ+hcMQXx95MOvfqXFgsKDZodX3qZB0x2n5Z94ioetIITsBtvJbiOyxa/6s9AtyweBLCdPmPko/w==",
            -      "dev": true
            -    },
            -    "remove-bom-buffer": {
            -      "version": "3.0.0",
            -      "resolved": "https://registry.npmjs.org/remove-bom-buffer/-/remove-bom-buffer-3.0.0.tgz",
            -      "integrity": "sha512-8v2rWhaakv18qcvNeli2mZ/TMTL2nEyAKRvzo1WtnZBl15SHyEhrCu2/xKlJyUFKHiHgfXIyuY6g2dObJJycXQ==",
            -      "dev": true,
            -      "requires": {
            -        "is-buffer": "^1.1.5",
            -        "is-utf8": "^0.2.1"
            -      }
            -    },
            -    "remove-bom-stream": {
            -      "version": "1.2.0",
            -      "resolved": "https://registry.npmjs.org/remove-bom-stream/-/remove-bom-stream-1.2.0.tgz",
            -      "integrity": "sha1-BfGlk/FuQuH7kOv1nejlaVJflSM=",
            -      "dev": true,
            -      "requires": {
            -        "remove-bom-buffer": "^3.0.0",
            -        "safe-buffer": "^5.1.0",
            -        "through2": "^2.0.3"
            -      }
            -    },
            -    "remove-trailing-separator": {
            -      "version": "1.1.0",
            -      "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz",
            -      "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=",
            -      "dev": true
            -    },
            -    "repeat-element": {
            -      "version": "1.1.3",
            -      "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.3.tgz",
            -      "integrity": "sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g==",
            -      "dev": true
            -    },
            -    "repeat-string": {
            -      "version": "1.6.1",
            -      "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz",
            -      "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=",
            -      "dev": true
            -    },
            -    "replace-ext": {
            -      "version": "1.0.0",
            -      "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-1.0.0.tgz",
            -      "integrity": "sha1-3mMSg3P8v3w8z6TeWkgMRaZ5WOs=",
            -      "dev": true
            -    },
            -    "replace-homedir": {
            -      "version": "1.0.0",
            -      "resolved": "https://registry.npmjs.org/replace-homedir/-/replace-homedir-1.0.0.tgz",
            -      "integrity": "sha1-6H9tUTuSjd6AgmDBK+f+xv9ueYw=",
            -      "dev": true,
            -      "requires": {
            -        "homedir-polyfill": "^1.0.1",
            -        "is-absolute": "^1.0.0",
            -        "remove-trailing-separator": "^1.1.0"
            -      }
            -    },
            -    "replacestream": {
            -      "version": "4.0.3",
            -      "resolved": "https://registry.npmjs.org/replacestream/-/replacestream-4.0.3.tgz",
            -      "integrity": "sha512-AC0FiLS352pBBiZhd4VXB1Ab/lh0lEgpP+GGvZqbQh8a5cmXVoTe5EX/YeTFArnp4SRGTHh1qCHu9lGs1qG8sA==",
            -      "dev": true,
            -      "requires": {
            -        "escape-string-regexp": "^1.0.3",
            -        "object-assign": "^4.0.1",
            -        "readable-stream": "^2.0.2"
            -      }
            -    },
            -    "request": {
            -      "version": "2.88.0",
            -      "resolved": "https://registry.npmjs.org/request/-/request-2.88.0.tgz",
            -      "integrity": "sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg==",
            -      "dev": true,
            -      "requires": {
            -        "aws-sign2": "~0.7.0",
            -        "aws4": "^1.8.0",
            -        "caseless": "~0.12.0",
            -        "combined-stream": "~1.0.6",
            -        "extend": "~3.0.2",
            -        "forever-agent": "~0.6.1",
            -        "form-data": "~2.3.2",
            -        "har-validator": "~5.1.0",
            -        "http-signature": "~1.2.0",
            -        "is-typedarray": "~1.0.0",
            -        "isstream": "~0.1.2",
            -        "json-stringify-safe": "~5.0.1",
            -        "mime-types": "~2.1.19",
            -        "oauth-sign": "~0.9.0",
            -        "performance-now": "^2.1.0",
            -        "qs": "~6.5.2",
            -        "safe-buffer": "^5.1.2",
            -        "tough-cookie": "~2.4.3",
            -        "tunnel-agent": "^0.6.0",
            -        "uuid": "^3.3.2"
            -      },
            -      "dependencies": {
            -        "punycode": {
            -          "version": "1.4.1",
            -          "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz",
            -          "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=",
            -          "dev": true
            -        },
            -        "tough-cookie": {
            -          "version": "2.4.3",
            -          "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.4.3.tgz",
            -          "integrity": "sha512-Q5srk/4vDM54WJsJio3XNn6K2sCG+CQ8G5Wz6bZhRZoAe/+TxjWB/GlFAnYEbkYVlON9FMk/fE3h2RLpPXo4lQ==",
            -          "dev": true,
            -          "requires": {
            -            "psl": "^1.1.24",
            -            "punycode": "^1.4.1"
            -          }
            -        }
            -      }
            -    },
            -    "request-promise-core": {
            -      "version": "1.1.2",
            -      "resolved": "https://registry.npmjs.org/request-promise-core/-/request-promise-core-1.1.2.tgz",
            -      "integrity": "sha512-UHYyq1MO8GsefGEt7EprS8UrXsm1TxEvFUX1IMTuSLU2Rh7fTIdFtl8xD7JiEYiWU2dl+NYAjCTksTehQUxPag==",
            -      "dev": true,
            -      "requires": {
            -        "lodash": "^4.17.11"
            -      }
            -    },
            -    "request-promise-native": {
            -      "version": "1.0.7",
            -      "resolved": "https://registry.npmjs.org/request-promise-native/-/request-promise-native-1.0.7.tgz",
            -      "integrity": "sha512-rIMnbBdgNViL37nZ1b3L/VfPOpSi0TqVDQPAvO6U14lMzOLrt5nilxCQqtDKhZeDiW0/hkCXGoQjhgJd/tCh6w==",
            -      "dev": true,
            -      "requires": {
            -        "request-promise-core": "1.1.2",
            -        "stealthy-require": "^1.1.1",
            -        "tough-cookie": "^2.3.3"
            -      }
            -    },
            -    "require-directory": {
            -      "version": "2.1.1",
            -      "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz",
            -      "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=",
            -      "dev": true
            -    },
            -    "require-from-string": {
            -      "version": "2.0.2",
            -      "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz",
            -      "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==",
            -      "dev": true
            -    },
            -    "require-main-filename": {
            -      "version": "1.0.1",
            -      "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz",
            -      "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=",
            -      "dev": true
            -    },
            -    "requires-port": {
            -      "version": "1.0.0",
            -      "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz",
            -      "integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=",
            -      "dev": true
            -    },
            -    "requizzle": {
            -      "version": "0.2.3",
            -      "resolved": "https://registry.npmjs.org/requizzle/-/requizzle-0.2.3.tgz",
            -      "integrity": "sha512-YanoyJjykPxGHii0fZP0uUPEXpvqfBDxWV7s6GKAiiOsiqhX6vHNyW3Qzdmqp/iq/ExbhaGbVrjB4ruEVSM4GQ==",
            -      "dev": true,
            -      "requires": {
            -        "lodash": "^4.17.14"
            -      }
            -    },
            -    "resolve": {
            -      "version": "1.15.1",
            -      "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.15.1.tgz",
            -      "integrity": "sha512-84oo6ZTtoTUpjgNEr5SJyzQhzL72gaRodsSfyxC/AXRvwu0Yse9H8eF9IpGo7b8YetZhlI6v7ZQ6bKBFV/6S7w==",
            -      "dev": true,
            -      "requires": {
            -        "path-parse": "^1.0.6"
            -      }
            -    },
            -    "resolve-dir": {
            -      "version": "1.0.1",
            -      "resolved": "https://registry.npmjs.org/resolve-dir/-/resolve-dir-1.0.1.tgz",
            -      "integrity": "sha1-eaQGRMNivoLybv/nOcm7U4IEb0M=",
            -      "dev": true,
            -      "requires": {
            -        "expand-tilde": "^2.0.0",
            -        "global-modules": "^1.0.0"
            -      }
            -    },
            -    "resolve-from": {
            -      "version": "5.0.0",
            -      "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz",
            -      "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==",
            -      "dev": true
            -    },
            -    "resolve-options": {
            -      "version": "1.1.0",
            -      "resolved": "https://registry.npmjs.org/resolve-options/-/resolve-options-1.1.0.tgz",
            -      "integrity": "sha1-MrueOcBtZzONyTeMDW1gdFZq0TE=",
            -      "dev": true,
            -      "requires": {
            -        "value-or-function": "^3.0.0"
            -      }
            -    },
            -    "resolve-url": {
            -      "version": "0.2.1",
            -      "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz",
            -      "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=",
            -      "dev": true
            -    },
            -    "ret": {
            -      "version": "0.1.15",
            -      "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz",
            -      "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==",
            -      "dev": true
            -    },
            -    "retry": {
            -      "version": "0.12.0",
            -      "resolved": "https://registry.npmjs.org/retry/-/retry-0.12.0.tgz",
            -      "integrity": "sha1-G0KmJmoh8HQh0bC1S33BZ7AcATs=",
            -      "dev": true
            -    },
            -    "rimraf": {
            -      "version": "2.6.3",
            -      "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz",
            -      "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==",
            -      "dev": true,
            -      "requires": {
            -        "glob": "^7.1.3"
            -      }
            -    },
            -    "safe-buffer": {
            -      "version": "5.1.2",
            -      "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
            -      "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==",
            -      "dev": true
            -    },
            -    "safe-regex": {
            -      "version": "1.1.0",
            -      "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz",
            -      "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=",
            -      "dev": true,
            -      "requires": {
            -        "ret": "~0.1.10"
            -      }
            -    },
            -    "safer-buffer": {
            -      "version": "2.1.2",
            -      "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
            -      "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==",
            -      "dev": true
            -    },
            -    "sanitize-html": {
            -      "version": "1.27.0",
            -      "resolved": "https://registry.npmjs.org/sanitize-html/-/sanitize-html-1.27.0.tgz",
            -      "integrity": "sha512-U1btucGeYVpg0GoK43jPpe/bDCV4cBOGuxzv5NBd0bOjyZdMKY0n98S/vNlO1wVwre0VCj8H3hbzE7gD2+RjKA==",
            -      "dev": true,
            -      "requires": {
            -        "chalk": "^2.4.1",
            -        "htmlparser2": "^4.1.0",
            -        "lodash": "^4.17.15",
            -        "postcss": "^7.0.27",
            -        "srcset": "^2.0.1",
            -        "xtend": "^4.0.1"
            -      },
            -      "dependencies": {
            -        "htmlparser2": {
            -          "version": "4.1.0",
            -          "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-4.1.0.tgz",
            -          "integrity": "sha512-4zDq1a1zhE4gQso/c5LP1OtrhYTncXNSpvJYtWJBtXAETPlMfi3IFNjGuQbYLuVY4ZR0QMqRVvo4Pdy9KLyP8Q==",
            -          "dev": true,
            -          "requires": {
            -            "domelementtype": "^2.0.1",
            -            "domhandler": "^3.0.0",
            -            "domutils": "^2.0.0",
            -            "entities": "^2.0.0"
            -          }
            -        }
            -      }
            -    },
            -    "sax": {
            -      "version": "1.2.4",
            -      "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz",
            -      "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==",
            -      "dev": true
            -    },
            -    "saxes": {
            -      "version": "3.1.9",
            -      "resolved": "https://registry.npmjs.org/saxes/-/saxes-3.1.9.tgz",
            -      "integrity": "sha512-FZeKhJglhJHk7eWG5YM0z46VHmI3KJpMBAQm3xa9meDvd+wevB5GuBB0wc0exPInZiBBHqi00DbS8AcvCGCFMw==",
            -      "dev": true,
            -      "requires": {
            -        "xmlchars": "^1.3.1"
            -      }
            -    },
            -    "scslre": {
            -      "version": "0.1.6",
            -      "resolved": "https://registry.npmjs.org/scslre/-/scslre-0.1.6.tgz",
            -      "integrity": "sha512-JORxVRlQTfjvlOAaiQKebgFElyAm5/W8b50lgaZ0OkEnKnagJW2ufDh3xRfU75UD9z3FGIu1gL1IyR3Poa6Qmw==",
            -      "dev": true,
            -      "requires": {
            -        "refa": "^0.9.0",
            -        "regexp-ast-analysis": "^0.2.3",
            -        "regexpp": "^3.2.0"
            -      }
            -    },
            -    "secure-compare": {
            -      "version": "3.0.1",
            -      "resolved": "https://registry.npmjs.org/secure-compare/-/secure-compare-3.0.1.tgz",
            -      "integrity": "sha1-8aAymzCLIh+uN7mXTz1XjQypmeM=",
            -      "dev": true
            -    },
            -    "semver": {
            -      "version": "5.6.0",
            -      "resolved": "https://registry.npmjs.org/semver/-/semver-5.6.0.tgz",
            -      "integrity": "sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==",
            -      "dev": true
            -    },
            -    "semver-greatest-satisfied-range": {
            -      "version": "1.1.0",
            -      "resolved": "https://registry.npmjs.org/semver-greatest-satisfied-range/-/semver-greatest-satisfied-range-1.1.0.tgz",
            -      "integrity": "sha1-E+jCZYq5aRywzXEJMkAoDTb3els=",
            -      "dev": true,
            -      "requires": {
            -        "sver-compat": "^1.5.0"
            -      }
            -    },
            -    "set-blocking": {
            -      "version": "2.0.0",
            -      "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz",
            -      "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=",
            -      "dev": true
            -    },
            -    "set-value": {
            -      "version": "2.0.1",
            -      "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.1.tgz",
            -      "integrity": "sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw==",
            -      "dev": true,
            -      "requires": {
            -        "extend-shallow": "^2.0.1",
            -        "is-extendable": "^0.1.1",
            -        "is-plain-object": "^2.0.3",
            -        "split-string": "^3.0.1"
            -      },
            -      "dependencies": {
            -        "extend-shallow": {
            -          "version": "2.0.1",
            -          "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
            -          "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
            -          "dev": true,
            -          "requires": {
            -            "is-extendable": "^0.1.0"
            -          }
            -        }
            -      }
            -    },
            -    "shebang-command": {
            -      "version": "1.2.0",
            -      "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz",
            -      "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=",
            -      "dev": true,
            -      "requires": {
            -        "shebang-regex": "^1.0.0"
            -      }
            -    },
            -    "shebang-regex": {
            -      "version": "1.0.0",
            -      "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz",
            -      "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=",
            -      "dev": true
            -    },
            -    "shell-quote": {
            -      "version": "1.7.2",
            -      "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.7.2.tgz",
            -      "integrity": "sha512-mRz/m/JVscCrkMyPqHc/bczi3OQHkLTqXHEFu0zDhK/qfv3UcOA4SVmRCLmos4bhjr9ekVQubj/R7waKapmiQg==",
            -      "dev": true
            -    },
            -    "signal-exit": {
            -      "version": "3.0.2",
            -      "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz",
            -      "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=",
            -      "dev": true
            -    },
            -    "simple-git": {
            -      "version": "1.110.0",
            -      "resolved": "https://registry.npmjs.org/simple-git/-/simple-git-1.110.0.tgz",
            -      "integrity": "sha512-UYY0rQkknk0P5eb+KW+03F4TevZ9ou0H+LoGaj7iiVgpnZH4wdj/HTViy/1tNNkmIPcmtxuBqXWiYt2YwlRKOQ==",
            -      "dev": true,
            -      "requires": {
            -        "debug": "^4.0.1"
            -      },
            -      "dependencies": {
            -        "debug": {
            -          "version": "4.1.1",
            -          "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz",
            -          "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==",
            -          "dev": true,
            -          "requires": {
            -            "ms": "^2.1.1"
            -          }
            -        },
            -        "ms": {
            -          "version": "2.1.1",
            -          "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz",
            -          "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==",
            -          "dev": true
            -        }
            -      }
            -    },
            -    "slash": {
            -      "version": "2.0.0",
            -      "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz",
            -      "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==",
            -      "dev": true
            -    },
            -    "slice-ansi": {
            -      "version": "4.0.0",
            -      "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz",
            -      "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==",
            -      "dev": true,
            -      "requires": {
            -        "ansi-styles": "^4.0.0",
            -        "astral-regex": "^2.0.0",
            -        "is-fullwidth-code-point": "^3.0.0"
            -      },
            -      "dependencies": {
            -        "ansi-styles": {
            -          "version": "4.3.0",
            -          "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
            -          "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
            -          "dev": true,
            -          "requires": {
            -            "color-convert": "^2.0.1"
            -          }
            -        },
            -        "color-convert": {
            -          "version": "2.0.1",
            -          "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
            -          "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
            -          "dev": true,
            -          "requires": {
            -            "color-name": "~1.1.4"
            -          }
            -        },
            -        "color-name": {
            -          "version": "1.1.4",
            -          "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
            -          "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
            -          "dev": true
            -        },
            -        "is-fullwidth-code-point": {
            -          "version": "3.0.0",
            -          "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
            -          "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
            -          "dev": true
            -        }
            -      }
            -    },
            -    "snapdragon": {
            -      "version": "0.8.2",
            -      "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz",
            -      "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==",
            -      "dev": true,
            -      "requires": {
            -        "base": "^0.11.1",
            -        "debug": "^2.2.0",
            -        "define-property": "^0.2.5",
            -        "extend-shallow": "^2.0.1",
            -        "map-cache": "^0.2.2",
            -        "source-map": "^0.5.6",
            -        "source-map-resolve": "^0.5.0",
            -        "use": "^3.1.0"
            -      },
            -      "dependencies": {
            -        "define-property": {
            -          "version": "0.2.5",
            -          "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz",
            -          "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=",
            -          "dev": true,
            -          "requires": {
            -            "is-descriptor": "^0.1.0"
            -          }
            -        },
            -        "extend-shallow": {
            -          "version": "2.0.1",
            -          "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
            -          "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
            -          "dev": true,
            -          "requires": {
            -            "is-extendable": "^0.1.0"
            -          }
            -        }
            -      }
            -    },
            -    "snapdragon-node": {
            -      "version": "2.1.1",
            -      "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz",
            -      "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==",
            -      "dev": true,
            -      "requires": {
            -        "define-property": "^1.0.0",
            -        "isobject": "^3.0.0",
            -        "snapdragon-util": "^3.0.1"
            -      },
            -      "dependencies": {
            -        "define-property": {
            -          "version": "1.0.0",
            -          "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz",
            -          "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=",
            -          "dev": true,
            -          "requires": {
            -            "is-descriptor": "^1.0.0"
            -          }
            -        },
            -        "is-accessor-descriptor": {
            -          "version": "1.0.0",
            -          "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz",
            -          "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==",
            -          "dev": true,
            -          "requires": {
            -            "kind-of": "^6.0.0"
            -          }
            -        },
            -        "is-data-descriptor": {
            -          "version": "1.0.0",
            -          "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz",
            -          "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==",
            -          "dev": true,
            -          "requires": {
            -            "kind-of": "^6.0.0"
            -          }
            -        },
            -        "is-descriptor": {
            -          "version": "1.0.2",
            -          "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz",
            -          "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==",
            -          "dev": true,
            -          "requires": {
            -            "is-accessor-descriptor": "^1.0.0",
            -            "is-data-descriptor": "^1.0.0",
            -            "kind-of": "^6.0.2"
            -          }
            -        }
            -      }
            -    },
            -    "snapdragon-util": {
            -      "version": "3.0.1",
            -      "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz",
            -      "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==",
            -      "dev": true,
            -      "requires": {
            -        "kind-of": "^3.2.0"
            -      },
            -      "dependencies": {
            -        "kind-of": {
            -          "version": "3.2.2",
            -          "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
            -          "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
            -          "dev": true,
            -          "requires": {
            -            "is-buffer": "^1.1.5"
            -          }
            -        }
            -      }
            -    },
            -    "source-map": {
            -      "version": "0.5.7",
            -      "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz",
            -      "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=",
            -      "dev": true
            -    },
            -    "source-map-resolve": {
            -      "version": "0.5.3",
            -      "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.3.tgz",
            -      "integrity": "sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw==",
            -      "dev": true,
            -      "requires": {
            -        "atob": "^2.1.2",
            -        "decode-uri-component": "^0.2.0",
            -        "resolve-url": "^0.2.1",
            -        "source-map-url": "^0.4.0",
            -        "urix": "^0.1.0"
            -      }
            -    },
            -    "source-map-url": {
            -      "version": "0.4.0",
            -      "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.0.tgz",
            -      "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=",
            -      "dev": true
            -    },
            -    "sparkles": {
            -      "version": "1.0.1",
            -      "resolved": "https://registry.npmjs.org/sparkles/-/sparkles-1.0.1.tgz",
            -      "integrity": "sha512-dSO0DDYUahUt/0/pD/Is3VIm5TGJjludZ0HVymmhYF6eNA53PVLhnUk0znSYbH8IYBuJdCE+1luR22jNLMaQdw==",
            -      "dev": true
            -    },
            -    "spdx-correct": {
            -      "version": "3.1.0",
            -      "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.0.tgz",
            -      "integrity": "sha512-lr2EZCctC2BNR7j7WzJ2FpDznxky1sjfxvvYEyzxNyb6lZXHODmEoJeFu4JupYlkfha1KZpJyoqiJ7pgA1qq8Q==",
            -      "dev": true,
            -      "requires": {
            -        "spdx-expression-parse": "^3.0.0",
            -        "spdx-license-ids": "^3.0.0"
            -      }
            -    },
            -    "spdx-exceptions": {
            -      "version": "2.2.0",
            -      "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.2.0.tgz",
            -      "integrity": "sha512-2XQACfElKi9SlVb1CYadKDXvoajPgBVPn/gOQLrTvHdElaVhr7ZEbqJaRnJLVNeaI4cMEAgVCeBMKF6MWRDCRA==",
            -      "dev": true
            -    },
            -    "spdx-expression-parse": {
            -      "version": "3.0.0",
            -      "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz",
            -      "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==",
            -      "dev": true,
            -      "requires": {
            -        "spdx-exceptions": "^2.1.0",
            -        "spdx-license-ids": "^3.0.0"
            -      }
            -    },
            -    "spdx-license-ids": {
            -      "version": "3.0.5",
            -      "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.5.tgz",
            -      "integrity": "sha512-J+FWzZoynJEXGphVIS+XEh3kFSjZX/1i9gFBaWQcB+/tmpe2qUsSBABpcxqxnAxFdiUFEgAX1bjYGQvIZmoz9Q==",
            -      "dev": true
            -    },
            -    "split-on-first": {
            -      "version": "1.1.0",
            -      "resolved": "https://registry.npmjs.org/split-on-first/-/split-on-first-1.1.0.tgz",
            -      "integrity": "sha512-43ZssAJaMusuKWL8sKUBQXHWOpq8d6CfN/u1p4gUzfJkM05C8rxTmYrkIPTXapZpORA6LkkzcUulJ8FqA7Uudw==",
            -      "dev": true
            -    },
            -    "split-string": {
            -      "version": "3.1.0",
            -      "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz",
            -      "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==",
            -      "dev": true,
            -      "requires": {
            -        "extend-shallow": "^3.0.0"
            -      }
            -    },
            -    "sprintf-js": {
            -      "version": "1.0.3",
            -      "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz",
            -      "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=",
            -      "dev": true
            -    },
            -    "srcset": {
            -      "version": "2.0.1",
            -      "resolved": "https://registry.npmjs.org/srcset/-/srcset-2.0.1.tgz",
            -      "integrity": "sha512-00kZI87TdRKwt+P8jj8UZxbfp7mK2ufxcIMWvhAOZNJTRROimpHeruWrGvCZneiuVDLqdyHefVp748ECTnyUBQ==",
            -      "dev": true
            -    },
            -    "sshpk": {
            -      "version": "1.16.1",
            -      "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz",
            -      "integrity": "sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==",
            -      "dev": true,
            -      "requires": {
            -        "asn1": "~0.2.3",
            -        "assert-plus": "^1.0.0",
            -        "bcrypt-pbkdf": "^1.0.0",
            -        "dashdash": "^1.12.0",
            -        "ecc-jsbn": "~0.1.1",
            -        "getpass": "^0.1.1",
            -        "jsbn": "~0.1.0",
            -        "safer-buffer": "^2.0.2",
            -        "tweetnacl": "~0.14.0"
            -      }
            -    },
            -    "stack-trace": {
            -      "version": "0.0.10",
            -      "resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.10.tgz",
            -      "integrity": "sha1-VHxws0fo0ytOEI6hoqFZ5f3eGcA=",
            -      "dev": true
            -    },
            -    "static-extend": {
            -      "version": "0.1.2",
            -      "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz",
            -      "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=",
            -      "dev": true,
            -      "requires": {
            -        "define-property": "^0.2.5",
            -        "object-copy": "^0.1.0"
            -      },
            -      "dependencies": {
            -        "define-property": {
            -          "version": "0.2.5",
            -          "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz",
            -          "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=",
            -          "dev": true,
            -          "requires": {
            -            "is-descriptor": "^0.1.0"
            -          }
            -        }
            -      }
            -    },
            -    "stealthy-require": {
            -      "version": "1.1.1",
            -      "resolved": "https://registry.npmjs.org/stealthy-require/-/stealthy-require-1.1.1.tgz",
            -      "integrity": "sha1-NbCYdbT/SfJqd35QmzCQoyJr8ks=",
            -      "dev": true
            -    },
            -    "stream-exhaust": {
            -      "version": "1.0.2",
            -      "resolved": "https://registry.npmjs.org/stream-exhaust/-/stream-exhaust-1.0.2.tgz",
            -      "integrity": "sha512-b/qaq/GlBK5xaq1yrK9/zFcyRSTNxmcZwFLGSTG0mXgZl/4Z6GgiyYOXOvY7N3eEvFRAG1bkDRz5EPGSvPYQlw==",
            -      "dev": true
            -    },
            -    "stream-shift": {
            -      "version": "1.0.1",
            -      "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.1.tgz",
            -      "integrity": "sha512-AiisoFqQ0vbGcZgQPY1cdP2I76glaVA/RauYR4G4thNFgkTqr90yXTo4LYX60Jl+sIlPNHHdGSwo01AvbKUSVQ==",
            -      "dev": true
            -    },
            -    "strict-uri-encode": {
            -      "version": "2.0.0",
            -      "resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-2.0.0.tgz",
            -      "integrity": "sha1-ucczDHBChi9rFC3CdLvMWGbONUY=",
            -      "dev": true
            -    },
            -    "string-width": {
            -      "version": "1.0.2",
            -      "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz",
            -      "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=",
            -      "dev": true,
            -      "requires": {
            -        "code-point-at": "^1.0.0",
            -        "is-fullwidth-code-point": "^1.0.0",
            -        "strip-ansi": "^3.0.0"
            -      }
            -    },
            -    "string.fromcodepoint": {
            -      "version": "0.2.1",
            -      "resolved": "https://registry.npmjs.org/string.fromcodepoint/-/string.fromcodepoint-0.2.1.tgz",
            -      "integrity": "sha1-jZeDM8C8klOPUPOD5IiPPlYZ1lM=",
            -      "dev": true
            -    },
            -    "string.prototype.codepointat": {
            -      "version": "0.2.1",
            -      "resolved": "https://registry.npmjs.org/string.prototype.codepointat/-/string.prototype.codepointat-0.2.1.tgz",
            -      "integrity": "sha512-2cBVCj6I4IOvEnjgO/hWqXjqBGsY+zwPmHl12Srk9IXSZ56Jwwmy+66XO5Iut/oQVR7t5ihYdLB0GMa4alEUcg==",
            -      "dev": true
            -    },
            -    "string.prototype.padend": {
            -      "version": "3.1.2",
            -      "resolved": "https://registry.npmjs.org/string.prototype.padend/-/string.prototype.padend-3.1.2.tgz",
            -      "integrity": "sha512-/AQFLdYvePENU3W5rgurfWSMU6n+Ww8n/3cUt7E+vPBB/D7YDG8x+qjoFs4M/alR2bW7Qg6xMjVwWUOvuQ0XpQ==",
            -      "dev": true,
            -      "requires": {
            -        "call-bind": "^1.0.2",
            -        "define-properties": "^1.1.3",
            -        "es-abstract": "^1.18.0-next.2"
            -      },
            -      "dependencies": {
            -        "es-abstract": {
            -          "version": "1.18.3",
            -          "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.3.tgz",
            -          "integrity": "sha512-nQIr12dxV7SSxE6r6f1l3DtAeEYdsGpps13dR0TwJg1S8gyp4ZPgy3FZcHBgbiQqnoqSTb+oC+kO4UQ0C/J8vw==",
            -          "dev": true,
            -          "requires": {
            -            "call-bind": "^1.0.2",
            -            "es-to-primitive": "^1.2.1",
            -            "function-bind": "^1.1.1",
            -            "get-intrinsic": "^1.1.1",
            -            "has": "^1.0.3",
            -            "has-symbols": "^1.0.2",
            -            "is-callable": "^1.2.3",
            -            "is-negative-zero": "^2.0.1",
            -            "is-regex": "^1.1.3",
            -            "is-string": "^1.0.6",
            -            "object-inspect": "^1.10.3",
            -            "object-keys": "^1.1.1",
            -            "object.assign": "^4.1.2",
            -            "string.prototype.trimend": "^1.0.4",
            -            "string.prototype.trimstart": "^1.0.4",
            -            "unbox-primitive": "^1.0.1"
            -          }
            -        },
            -        "es-to-primitive": {
            -          "version": "1.2.1",
            -          "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz",
            -          "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==",
            -          "dev": true,
            -          "requires": {
            -            "is-callable": "^1.1.4",
            -            "is-date-object": "^1.0.1",
            -            "is-symbol": "^1.0.2"
            -          }
            -        },
            -        "has-symbols": {
            -          "version": "1.0.2",
            -          "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz",
            -          "integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==",
            -          "dev": true
            -        },
            -        "is-callable": {
            -          "version": "1.2.3",
            -          "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.3.tgz",
            -          "integrity": "sha512-J1DcMe8UYTBSrKezuIUTUwjXsho29693unXM2YhJUTR2txK/eG47bvNa/wipPFmZFgr/N6f1GA66dv0mEyTIyQ==",
            -          "dev": true
            -        },
            -        "is-regex": {
            -          "version": "1.1.3",
            -          "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.3.tgz",
            -          "integrity": "sha512-qSVXFz28HM7y+IWX6vLCsexdlvzT1PJNFSBuaQLQ5o0IEw8UDYW6/2+eCMVyIsbM8CNLX2a/QWmSpyxYEHY7CQ==",
            -          "dev": true,
            -          "requires": {
            -            "call-bind": "^1.0.2",
            -            "has-symbols": "^1.0.2"
            -          }
            -        },
            -        "object-keys": {
            -          "version": "1.1.1",
            -          "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz",
            -          "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==",
            -          "dev": true
            -        },
            -        "object.assign": {
            -          "version": "4.1.2",
            -          "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz",
            -          "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==",
            -          "dev": true,
            -          "requires": {
            -            "call-bind": "^1.0.0",
            -            "define-properties": "^1.1.3",
            -            "has-symbols": "^1.0.1",
            -            "object-keys": "^1.1.1"
            -          }
            -        }
            -      }
            -    },
            -    "string.prototype.trimend": {
            -      "version": "1.0.4",
            -      "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.4.tgz",
            -      "integrity": "sha512-y9xCjw1P23Awk8EvTpcyL2NIr1j7wJ39f+k6lvRnSMz+mz9CGz9NYPelDk42kOz6+ql8xjfK8oYzy3jAP5QU5A==",
            -      "dev": true,
            -      "requires": {
            -        "call-bind": "^1.0.2",
            -        "define-properties": "^1.1.3"
            -      }
            -    },
            -    "string.prototype.trimstart": {
            -      "version": "1.0.4",
            -      "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.4.tgz",
            -      "integrity": "sha512-jh6e984OBfvxS50tdY2nRZnoC5/mLFKOREQfw8t5yytkoUsJRNxvI/E39qu1sD0OtWI3OC0XgKSmcWwziwYuZw==",
            -      "dev": true,
            -      "requires": {
            -        "call-bind": "^1.0.2",
            -        "define-properties": "^1.1.3"
            -      }
            -    },
            -    "string_decoder": {
            -      "version": "1.1.1",
            -      "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
            -      "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
            -      "dev": true,
            -      "requires": {
            -        "safe-buffer": "~5.1.0"
            -      }
            -    },
            -    "strip-ansi": {
            -      "version": "3.0.1",
            -      "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
            -      "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
            -      "dev": true,
            -      "requires": {
            -        "ansi-regex": "^2.0.0"
            -      }
            -    },
            -    "strip-bom": {
            -      "version": "2.0.0",
            -      "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz",
            -      "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=",
            -      "dev": true,
            -      "requires": {
            -        "is-utf8": "^0.2.0"
            -      }
            -    },
            -    "strip-eof": {
            -      "version": "1.0.0",
            -      "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz",
            -      "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=",
            -      "dev": true
            -    },
            -    "strip-indent": {
            -      "version": "2.0.0",
            -      "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-2.0.0.tgz",
            -      "integrity": "sha1-XvjbKV0B5u1sv3qrlpmNeCJSe2g=",
            -      "dev": true
            -    },
            -    "strip-json-comments": {
            -      "version": "2.0.1",
            -      "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz",
            -      "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=",
            -      "dev": true
            -    },
            -    "supports-color": {
            -      "version": "6.0.0",
            -      "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.0.0.tgz",
            -      "integrity": "sha512-on9Kwidc1IUQo+bQdhi8+Tijpo0e1SS6RoGo2guUwn5vdaxw8RXOF9Vb2ws+ihWOmh4JnCJOvaziZWP1VABaLg==",
            -      "dev": true,
            -      "requires": {
            -        "has-flag": "^3.0.0"
            -      }
            -    },
            -    "supports-hyperlinks": {
            -      "version": "1.0.1",
            -      "resolved": "https://registry.npmjs.org/supports-hyperlinks/-/supports-hyperlinks-1.0.1.tgz",
            -      "integrity": "sha512-HHi5kVSefKaJkGYXbDuKbUGRVxqnWGn3J2e39CYcNJEfWciGq2zYtOhXLTlvrOZW1QU7VX67w7fMmWafHX9Pfw==",
            -      "dev": true,
            -      "requires": {
            -        "has-flag": "^2.0.0",
            -        "supports-color": "^5.0.0"
            -      },
            -      "dependencies": {
            -        "has-flag": {
            -          "version": "2.0.0",
            -          "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz",
            -          "integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=",
            -          "dev": true
            -        },
            -        "supports-color": {
            -          "version": "5.5.0",
            -          "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
            -          "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
            -          "dev": true,
            -          "requires": {
            -            "has-flag": "^3.0.0"
            -          },
            -          "dependencies": {
            -            "has-flag": {
            -              "version": "3.0.0",
            -              "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
            -              "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=",
            -              "dev": true
            -            }
            -          }
            -        }
            -      }
            -    },
            -    "sver-compat": {
            -      "version": "1.5.0",
            -      "resolved": "https://registry.npmjs.org/sver-compat/-/sver-compat-1.5.0.tgz",
            -      "integrity": "sha1-PPh9/rTQe0o/FIJ7wYaz/QxkXNg=",
            -      "dev": true,
            -      "requires": {
            -        "es6-iterator": "^2.0.1",
            -        "es6-symbol": "^3.1.1"
            -      }
            -    },
            -    "svg-pathdata": {
            -      "version": "5.0.5",
            -      "resolved": "https://registry.npmjs.org/svg-pathdata/-/svg-pathdata-5.0.5.tgz",
            -      "integrity": "sha512-TAAvLNSE3fEhyl/Da19JWfMAdhSXTYeviXsLSoDT1UM76ADj5ndwAPX1FKQEgB/gFMPavOy6tOqfalXKUiXrow==",
            -      "dev": true
            -    },
            -    "svg2ttf": {
            -      "version": "4.3.0",
            -      "resolved": "https://registry.npmjs.org/svg2ttf/-/svg2ttf-4.3.0.tgz",
            -      "integrity": "sha512-LZ0B7zzHWLWbzLzwaKGHQvPOuxCXLReIb3LSxFSGUy1gMw2Utk6KGNbTmbmRL6Rk1qDSmTixnDrQgnXaL9n0CA==",
            -      "dev": true,
            -      "requires": {
            -        "argparse": "^1.0.6",
            -        "cubic2quad": "^1.0.0",
            -        "lodash": "^4.17.10",
            -        "microbuffer": "^1.0.0",
            -        "svgpath": "^2.1.5",
            -        "xmldom": "~0.1.22"
            -      }
            -    },
            -    "svgicons2svgfont": {
            -      "version": "9.1.1",
            -      "resolved": "https://registry.npmjs.org/svgicons2svgfont/-/svgicons2svgfont-9.1.1.tgz",
            -      "integrity": "sha512-iOj7lqHP/oMrLg7S2Iv89LOJUfmIuePefXcs5ul4IsKwcYvL/T/Buahz+nQQJygyuvEMBBXqnCRmnvJggHeJzA==",
            -      "dev": true,
            -      "requires": {
            -        "commander": "^2.12.2",
            -        "geometry-interfaces": "^1.1.4",
            -        "glob": "^7.1.2",
            -        "neatequal": "^1.0.0",
            -        "readable-stream": "^2.3.3",
            -        "sax": "^1.2.4",
            -        "string.fromcodepoint": "^0.2.1",
            -        "string.prototype.codepointat": "^0.2.0",
            -        "svg-pathdata": "^5.0.0",
            -        "transformation-matrix-js": "^2.7.1"
            -      }
            -    },
            -    "svgpath": {
            -      "version": "2.3.0",
            -      "resolved": "https://registry.npmjs.org/svgpath/-/svgpath-2.3.0.tgz",
            -      "integrity": "sha512-N/4UDu3Y2ICik0daMmFW1tplw0XPs1nVIEVYkTiQfj9/JQZeEtAKaSYwheCwje1I4pQ5r22fGpoaNIvGgsyJyg==",
            -      "dev": true
            -    },
            -    "symbol-tree": {
            -      "version": "3.2.2",
            -      "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.2.tgz",
            -      "integrity": "sha1-rifbOPZgp64uHDt9G8KQgZuFGeY=",
            -      "dev": true
            -    },
            -    "table": {
            -      "version": "6.0.7",
            -      "resolved": "https://registry.npmjs.org/table/-/table-6.0.7.tgz",
            -      "integrity": "sha512-rxZevLGTUzWna/qBLObOe16kB2RTnnbhciwgPbMMlazz1yZGVEgnZK762xyVdVznhqxrfCeBMmMkgOOaPwjH7g==",
            -      "dev": true,
            -      "requires": {
            -        "ajv": "^7.0.2",
            -        "lodash": "^4.17.20",
            -        "slice-ansi": "^4.0.0",
            -        "string-width": "^4.2.0"
            -      },
            -      "dependencies": {
            -        "ajv": {
            -          "version": "7.2.3",
            -          "resolved": "https://registry.npmjs.org/ajv/-/ajv-7.2.3.tgz",
            -          "integrity": "sha512-idv5WZvKVXDqKralOImQgPM9v6WOdLNa0IY3B3doOjw/YxRGT8I+allIJ6kd7Uaj+SF1xZUSU+nPM5aDNBVtnw==",
            -          "dev": true,
            -          "requires": {
            -            "fast-deep-equal": "^3.1.1",
            -            "json-schema-traverse": "^1.0.0",
            -            "require-from-string": "^2.0.2",
            -            "uri-js": "^4.2.2"
            -          }
            -        },
            -        "ansi-regex": {
            -          "version": "5.0.0",
            -          "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz",
            -          "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==",
            -          "dev": true
            -        },
            -        "emoji-regex": {
            -          "version": "8.0.0",
            -          "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
            -          "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
            -          "dev": true
            -        },
            -        "fast-deep-equal": {
            -          "version": "3.1.3",
            -          "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
            -          "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==",
            -          "dev": true
            -        },
            -        "is-fullwidth-code-point": {
            -          "version": "3.0.0",
            -          "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
            -          "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
            -          "dev": true
            -        },
            -        "json-schema-traverse": {
            -          "version": "1.0.0",
            -          "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz",
            -          "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==",
            -          "dev": true
            -        },
            -        "string-width": {
            -          "version": "4.2.2",
            -          "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz",
            -          "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==",
            -          "dev": true,
            -          "requires": {
            -            "emoji-regex": "^8.0.0",
            -            "is-fullwidth-code-point": "^3.0.0",
            -            "strip-ansi": "^6.0.0"
            -          }
            -        },
            -        "strip-ansi": {
            -          "version": "6.0.0",
            -          "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz",
            -          "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==",
            -          "dev": true,
            -          "requires": {
            -            "ansi-regex": "^5.0.0"
            -          }
            -        }
            -      }
            -    },
            -    "taffydb": {
            -      "version": "2.6.2",
            -      "resolved": "https://registry.npmjs.org/taffydb/-/taffydb-2.6.2.tgz",
            -      "integrity": "sha1-fLy2S1oUG2ou/CxdLGe04VCyomg=",
            -      "dev": true
            -    },
            -    "text-table": {
            -      "version": "0.2.0",
            -      "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz",
            -      "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=",
            -      "dev": true
            -    },
            -    "textextensions": {
            -      "version": "2.4.0",
            -      "resolved": "https://registry.npmjs.org/textextensions/-/textextensions-2.4.0.tgz",
            -      "integrity": "sha512-qftQXnX1DzpSV8EddtHIT0eDDEiBF8ywhFYR2lI9xrGtxqKN+CvLXhACeCIGbCpQfxxERbrkZEFb8cZcDKbVZA==",
            -      "dev": true
            -    },
            -    "through2": {
            -      "version": "2.0.5",
            -      "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz",
            -      "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==",
            -      "dev": true,
            -      "requires": {
            -        "readable-stream": "~2.3.6",
            -        "xtend": "~4.0.1"
            -      }
            -    },
            -    "through2-filter": {
            -      "version": "3.0.0",
            -      "resolved": "https://registry.npmjs.org/through2-filter/-/through2-filter-3.0.0.tgz",
            -      "integrity": "sha512-jaRjI2WxN3W1V8/FMZ9HKIBXixtiqs3SQSX4/YGIiP3gL6djW48VoZq9tDqeCWs3MT8YY5wb/zli8VW8snY1CA==",
            -      "dev": true,
            -      "requires": {
            -        "through2": "~2.0.0",
            -        "xtend": "~4.0.0"
            -      }
            -    },
            -    "time-stamp": {
            -      "version": "1.1.0",
            -      "resolved": "https://registry.npmjs.org/time-stamp/-/time-stamp-1.1.0.tgz",
            -      "integrity": "sha1-dkpaEa9QVhkhsTPztE5hhofg9cM=",
            -      "dev": true
            -    },
            -    "tmp": {
            -      "version": "0.1.0",
            -      "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.1.0.tgz",
            -      "integrity": "sha512-J7Z2K08jbGcdA1kkQpJSqLF6T0tdQqpR2pnSUXsIchbPdTI9v3e85cLW0d6WDhwuAleOV71j2xWs8qMPfK7nKw==",
            -      "dev": true,
            -      "requires": {
            -        "rimraf": "^2.6.3"
            -      }
            -    },
            -    "to-absolute-glob": {
            -      "version": "2.0.2",
            -      "resolved": "https://registry.npmjs.org/to-absolute-glob/-/to-absolute-glob-2.0.2.tgz",
            -      "integrity": "sha1-GGX0PZ50sIItufFFt4z/fQ98hJs=",
            -      "dev": true,
            -      "requires": {
            -        "is-absolute": "^1.0.0",
            -        "is-negated-glob": "^1.0.0"
            -      }
            -    },
            -    "to-object-path": {
            -      "version": "0.3.0",
            -      "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz",
            -      "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=",
            -      "dev": true,
            -      "requires": {
            -        "kind-of": "^3.0.2"
            -      },
            -      "dependencies": {
            -        "kind-of": {
            -          "version": "3.2.2",
            -          "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
            -          "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
            -          "dev": true,
            -          "requires": {
            -            "is-buffer": "^1.1.5"
            -          }
            -        }
            -      }
            -    },
            -    "to-regex": {
            -      "version": "3.0.2",
            -      "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz",
            -      "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==",
            -      "dev": true,
            -      "requires": {
            -        "define-property": "^2.0.2",
            -        "extend-shallow": "^3.0.2",
            -        "regex-not": "^1.0.2",
            -        "safe-regex": "^1.1.0"
            -      }
            -    },
            -    "to-regex-range": {
            -      "version": "2.1.1",
            -      "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz",
            -      "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=",
            -      "dev": true,
            -      "requires": {
            -        "is-number": "^3.0.0",
            -        "repeat-string": "^1.6.1"
            -      }
            -    },
            -    "to-through": {
            -      "version": "2.0.0",
            -      "resolved": "https://registry.npmjs.org/to-through/-/to-through-2.0.0.tgz",
            -      "integrity": "sha1-/JKtq6ByZHvAtn1rA2ZKoZUJOvY=",
            -      "dev": true,
            -      "requires": {
            -        "through2": "^2.0.3"
            -      }
            -    },
            -    "tough-cookie": {
            -      "version": "2.5.0",
            -      "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz",
            -      "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==",
            -      "dev": true,
            -      "requires": {
            -        "psl": "^1.1.28",
            -        "punycode": "^2.1.1"
            -      }
            -    },
            -    "tr46": {
            -      "version": "1.0.1",
            -      "resolved": "https://registry.npmjs.org/tr46/-/tr46-1.0.1.tgz",
            -      "integrity": "sha1-qLE/1r/SSJUZZ0zN5VujaTtwbQk=",
            -      "dev": true,
            -      "requires": {
            -        "punycode": "^2.1.0"
            -      }
            -    },
            -    "transformation-matrix-js": {
            -      "version": "2.7.6",
            -      "resolved": "https://registry.npmjs.org/transformation-matrix-js/-/transformation-matrix-js-2.7.6.tgz",
            -      "integrity": "sha512-1CxDIZmCQ3vA0GGnkdMQqxUXVm3xXAFmglPYRS1hr37LzSg22TC7QAWOT38OmdUvMEs/rqcnkFoAsqvzdiluDg==",
            -      "dev": true
            -    },
            -    "trim-newlines": {
            -      "version": "2.0.0",
            -      "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-2.0.0.tgz",
            -      "integrity": "sha1-tAPQuRvlDDMd/EuC7s6yLD3hbSA=",
            -      "dev": true
            -    },
            -    "ttf2eot": {
            -      "version": "2.0.0",
            -      "resolved": "https://registry.npmjs.org/ttf2eot/-/ttf2eot-2.0.0.tgz",
            -      "integrity": "sha1-jmM3pYWr0WCKDISVirSDzmn2ZUs=",
            -      "dev": true,
            -      "requires": {
            -        "argparse": "^1.0.6",
            -        "microbuffer": "^1.0.0"
            -      }
            -    },
            -    "ttf2woff": {
            -      "version": "2.0.2",
            -      "resolved": "https://registry.npmjs.org/ttf2woff/-/ttf2woff-2.0.2.tgz",
            -      "integrity": "sha512-X68badwBjAy/+itU49scLjXUL094up+rHuYk+YAOTTBYSUMOmLZ7VyhZJuqQESj1gnyLAC2/5V8Euv+mExmyPA==",
            -      "dev": true,
            -      "requires": {
            -        "argparse": "^1.0.6",
            -        "microbuffer": "^1.0.0",
            -        "pako": "^1.0.0"
            -      }
            -    },
            -    "tunnel-agent": {
            -      "version": "0.6.0",
            -      "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz",
            -      "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=",
            -      "dev": true,
            -      "requires": {
            -        "safe-buffer": "^5.0.1"
            -      }
            -    },
            -    "tweetnacl": {
            -      "version": "0.14.5",
            -      "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz",
            -      "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=",
            -      "dev": true
            -    },
            -    "type": {
            -      "version": "1.2.0",
            -      "resolved": "https://registry.npmjs.org/type/-/type-1.2.0.tgz",
            -      "integrity": "sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg==",
            -      "dev": true
            -    },
            -    "type-check": {
            -      "version": "0.3.2",
            -      "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz",
            -      "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=",
            -      "dev": true,
            -      "requires": {
            -        "prelude-ls": "~1.1.2"
            -      }
            -    },
            -    "type-detect": {
            -      "version": "4.0.8",
            -      "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz",
            -      "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==",
            -      "dev": true
            -    },
            -    "type-fest": {
            -      "version": "0.8.1",
            -      "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz",
            -      "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==",
            -      "dev": true
            -    },
            -    "typedarray": {
            -      "version": "0.0.6",
            -      "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz",
            -      "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=",
            -      "dev": true
            -    },
            -    "uc.micro": {
            -      "version": "1.0.6",
            -      "resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-1.0.6.tgz",
            -      "integrity": "sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA==",
            -      "dev": true
            -    },
            -    "uglify-js": {
            -      "version": "3.5.2",
            -      "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.5.2.tgz",
            -      "integrity": "sha512-imog1WIsi9Yb56yRt5TfYVxGmnWs3WSGU73ieSOlMVFwhJCA9W8fqFFMMj4kgDqiS/80LGdsYnWL7O9UcjEBlg==",
            -      "dev": true,
            -      "requires": {
            -        "commander": "~2.19.0",
            -        "source-map": "~0.6.1"
            -      },
            -      "dependencies": {
            -        "source-map": {
            -          "version": "0.6.1",
            -          "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
            -          "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
            -          "dev": true
            -        }
            -      }
            -    },
            -    "unbox-primitive": {
            -      "version": "1.0.1",
            -      "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.1.tgz",
            -      "integrity": "sha512-tZU/3NqK3dA5gpE1KtyiJUrEB0lxnGkMFHptJ7q6ewdZ8s12QrODwNbhIJStmJkd1QDXa1NRA8aF2A1zk/Ypyw==",
            -      "dev": true,
            -      "requires": {
            -        "function-bind": "^1.1.1",
            -        "has-bigints": "^1.0.1",
            -        "has-symbols": "^1.0.2",
            -        "which-boxed-primitive": "^1.0.2"
            -      },
            -      "dependencies": {
            -        "has-symbols": {
            -          "version": "1.0.2",
            -          "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz",
            -          "integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==",
            -          "dev": true
            -        }
            -      }
            -    },
            -    "unc-path-regex": {
            -      "version": "0.1.2",
            -      "resolved": "https://registry.npmjs.org/unc-path-regex/-/unc-path-regex-0.1.2.tgz",
            -      "integrity": "sha1-5z3T17DXxe2G+6xrCufYxqadUPo=",
            -      "dev": true
            -    },
            -    "underscore": {
            -      "version": "1.10.2",
            -      "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.10.2.tgz",
            -      "integrity": "sha512-N4P+Q/BuyuEKFJ43B9gYuOj4TQUHXX+j2FqguVOpjkssLUUrnJofCcBccJSCoeturDoZU6GorDTHSvUDlSQbTg==",
            -      "dev": true
            -    },
            -    "undertaker": {
            -      "version": "1.2.1",
            -      "resolved": "https://registry.npmjs.org/undertaker/-/undertaker-1.2.1.tgz",
            -      "integrity": "sha512-71WxIzDkgYk9ZS+spIB8iZXchFhAdEo2YU8xYqBYJ39DIUIqziK78ftm26eecoIY49X0J2MLhG4hr18Yp6/CMA==",
            -      "dev": true,
            -      "requires": {
            -        "arr-flatten": "^1.0.1",
            -        "arr-map": "^2.0.0",
            -        "bach": "^1.0.0",
            -        "collection-map": "^1.0.0",
            -        "es6-weak-map": "^2.0.1",
            -        "last-run": "^1.1.0",
            -        "object.defaults": "^1.0.0",
            -        "object.reduce": "^1.0.0",
            -        "undertaker-registry": "^1.0.0"
            -      }
            -    },
            -    "undertaker-registry": {
            -      "version": "1.0.1",
            -      "resolved": "https://registry.npmjs.org/undertaker-registry/-/undertaker-registry-1.0.1.tgz",
            -      "integrity": "sha1-XkvaMI5KiirlhPm5pDWaSZglzFA=",
            -      "dev": true
            -    },
            -    "union": {
            -      "version": "0.5.0",
            -      "resolved": "https://registry.npmjs.org/union/-/union-0.5.0.tgz",
            -      "integrity": "sha512-N6uOhuW6zO95P3Mel2I2zMsbsanvvtgn6jVqJv4vbVcz/JN0OkL9suomjQGmWtxJQXOCqUJvquc1sMeNz/IwlA==",
            -      "dev": true,
            -      "requires": {
            -        "qs": "^6.4.0"
            -      }
            -    },
            -    "union-value": {
            -      "version": "1.0.1",
            -      "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz",
            -      "integrity": "sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg==",
            -      "dev": true,
            -      "requires": {
            -        "arr-union": "^3.1.0",
            -        "get-value": "^2.0.6",
            -        "is-extendable": "^0.1.1",
            -        "set-value": "^2.0.1"
            -      }
            -    },
            -    "unique-stream": {
            -      "version": "2.3.1",
            -      "resolved": "https://registry.npmjs.org/unique-stream/-/unique-stream-2.3.1.tgz",
            -      "integrity": "sha512-2nY4TnBE70yoxHkDli7DMazpWiP7xMdCYqU2nBRO0UB+ZpEkGsSija7MvmvnZFUeC+mrgiUfcHSr3LmRFIg4+A==",
            -      "dev": true,
            -      "requires": {
            -        "json-stable-stringify-without-jsonify": "^1.0.1",
            -        "through2-filter": "^3.0.0"
            -      }
            -    },
            -    "universal-url": {
            -      "version": "2.0.0",
            -      "resolved": "https://registry.npmjs.org/universal-url/-/universal-url-2.0.0.tgz",
            -      "integrity": "sha512-3DLtXdm/G1LQMCnPj+Aw7uDoleQttNHp2g5FnNQKR6cP6taNWS1b/Ehjjx4PVyvejKi3TJyu8iBraKM4q3JQPg==",
            -      "dev": true,
            -      "requires": {
            -        "hasurl": "^1.0.0",
            -        "whatwg-url": "^7.0.0"
            -      }
            -    },
            -    "universal-user-agent": {
            -      "version": "4.0.1",
            -      "resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-4.0.1.tgz",
            -      "integrity": "sha512-LnST3ebHwVL2aNe4mejI9IQh2HfZ1RLo8Io2HugSif8ekzD1TlWpHpColOB/eh8JHMLkGH3Akqf040I+4ylNxg==",
            -      "dev": true,
            -      "requires": {
            -        "os-name": "^3.1.0"
            -      }
            -    },
            -    "universalify": {
            -      "version": "0.1.2",
            -      "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz",
            -      "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==",
            -      "dev": true
            -    },
            -    "unset-value": {
            -      "version": "1.0.0",
            -      "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz",
            -      "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=",
            -      "dev": true,
            -      "requires": {
            -        "has-value": "^0.3.1",
            -        "isobject": "^3.0.0"
            -      },
            -      "dependencies": {
            -        "has-value": {
            -          "version": "0.3.1",
            -          "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz",
            -          "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=",
            -          "dev": true,
            -          "requires": {
            -            "get-value": "^2.0.3",
            -            "has-values": "^0.1.4",
            -            "isobject": "^2.0.0"
            -          },
            -          "dependencies": {
            -            "isobject": {
            -              "version": "2.1.0",
            -              "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz",
            -              "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=",
            -              "dev": true,
            -              "requires": {
            -                "isarray": "1.0.0"
            -              }
            -            }
            -          }
            -        },
            -        "has-values": {
            -          "version": "0.1.4",
            -          "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz",
            -          "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=",
            -          "dev": true
            -        }
            -      }
            -    },
            -    "upath": {
            -      "version": "1.2.0",
            -      "resolved": "https://registry.npmjs.org/upath/-/upath-1.2.0.tgz",
            -      "integrity": "sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg==",
            -      "dev": true
            -    },
            -    "uri-js": {
            -      "version": "4.2.2",
            -      "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz",
            -      "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==",
            -      "dev": true,
            -      "requires": {
            -        "punycode": "^2.1.0"
            -      }
            -    },
            -    "urix": {
            -      "version": "0.1.0",
            -      "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz",
            -      "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=",
            -      "dev": true
            -    },
            -    "url-join": {
            -      "version": "2.0.5",
            -      "resolved": "https://registry.npmjs.org/url-join/-/url-join-2.0.5.tgz",
            -      "integrity": "sha1-WvIvGMBSoACkjXuCxenC4v7tpyg=",
            -      "dev": true
            -    },
            -    "use": {
            -      "version": "3.1.1",
            -      "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz",
            -      "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==",
            -      "dev": true
            -    },
            -    "util-deprecate": {
            -      "version": "1.0.2",
            -      "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
            -      "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=",
            -      "dev": true
            -    },
            -    "uuid": {
            -      "version": "3.3.2",
            -      "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz",
            -      "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==",
            -      "dev": true
            -    },
            -    "v8-compile-cache": {
            -      "version": "2.3.0",
            -      "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz",
            -      "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==",
            -      "dev": true
            -    },
            -    "v8flags": {
            -      "version": "3.1.3",
            -      "resolved": "https://registry.npmjs.org/v8flags/-/v8flags-3.1.3.tgz",
            -      "integrity": "sha512-amh9CCg3ZxkzQ48Mhcb8iX7xpAfYJgePHxWMQCBWECpOSqJUXgY26ncA61UTV0BkPqfhcy6mzwCIoP4ygxpW8w==",
            -      "dev": true,
            -      "requires": {
            -        "homedir-polyfill": "^1.0.1"
            -      }
            -    },
            -    "validate-npm-package-license": {
            -      "version": "3.0.4",
            -      "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz",
            -      "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==",
            -      "dev": true,
            -      "requires": {
            -        "spdx-correct": "^3.0.0",
            -        "spdx-expression-parse": "^3.0.0"
            -      }
            -    },
            -    "value-or-function": {
            -      "version": "3.0.0",
            -      "resolved": "https://registry.npmjs.org/value-or-function/-/value-or-function-3.0.0.tgz",
            -      "integrity": "sha1-HCQ6ULWVwb5Up1S/7OhWO5/42BM=",
            -      "dev": true
            -    },
            -    "varstream": {
            -      "version": "0.3.2",
            -      "resolved": "https://registry.npmjs.org/varstream/-/varstream-0.3.2.tgz",
            -      "integrity": "sha1-GKxklHZfP/GjWtmkvgU77BiKXeE=",
            -      "dev": true,
            -      "requires": {
            -        "readable-stream": "^1.0.33"
            -      },
            -      "dependencies": {
            -        "isarray": {
            -          "version": "0.0.1",
            -          "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz",
            -          "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=",
            -          "dev": true
            -        },
            -        "readable-stream": {
            -          "version": "1.1.14",
            -          "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz",
            -          "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=",
            -          "dev": true,
            -          "requires": {
            -            "core-util-is": "~1.0.0",
            -            "inherits": "~2.0.1",
            -            "isarray": "0.0.1",
            -            "string_decoder": "~0.10.x"
            -          }
            -        },
            -        "string_decoder": {
            -          "version": "0.10.31",
            -          "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz",
            -          "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=",
            -          "dev": true
            -        }
            -      }
            -    },
            -    "verror": {
            -      "version": "1.10.0",
            -      "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz",
            -      "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=",
            -      "dev": true,
            -      "requires": {
            -        "assert-plus": "^1.0.0",
            -        "core-util-is": "1.0.2",
            -        "extsprintf": "^1.2.0"
            -      }
            -    },
            -    "vinyl": {
            -      "version": "2.2.0",
            -      "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-2.2.0.tgz",
            -      "integrity": "sha512-MBH+yP0kC/GQ5GwBqrTPTzEfiiLjta7hTtvQtbxBgTeSXsmKQRQecjibMbxIXzVT3Y9KJK+drOz1/k+vsu8Nkg==",
            -      "dev": true,
            -      "requires": {
            -        "clone": "^2.1.1",
            -        "clone-buffer": "^1.0.0",
            -        "clone-stats": "^1.0.0",
            -        "cloneable-readable": "^1.0.0",
            -        "remove-trailing-separator": "^1.0.1",
            -        "replace-ext": "^1.0.0"
            -      }
            -    },
            -    "vinyl-fs": {
            -      "version": "3.0.3",
            -      "resolved": "https://registry.npmjs.org/vinyl-fs/-/vinyl-fs-3.0.3.tgz",
            -      "integrity": "sha512-vIu34EkyNyJxmP0jscNzWBSygh7VWhqun6RmqVfXePrOwi9lhvRs//dOaGOTRUQr4tx7/zd26Tk5WeSVZitgng==",
            -      "dev": true,
            -      "requires": {
            -        "fs-mkdirp-stream": "^1.0.0",
            -        "glob-stream": "^6.1.0",
            -        "graceful-fs": "^4.0.0",
            -        "is-valid-glob": "^1.0.0",
            -        "lazystream": "^1.0.0",
            -        "lead": "^1.0.0",
            -        "object.assign": "^4.0.4",
            -        "pumpify": "^1.3.5",
            -        "readable-stream": "^2.3.3",
            -        "remove-bom-buffer": "^3.0.0",
            -        "remove-bom-stream": "^1.2.0",
            -        "resolve-options": "^1.1.0",
            -        "through2": "^2.0.0",
            -        "to-through": "^2.0.0",
            -        "value-or-function": "^3.0.0",
            -        "vinyl": "^2.0.0",
            -        "vinyl-sourcemap": "^1.1.0"
            -      }
            -    },
            -    "vinyl-sourcemap": {
            -      "version": "1.1.0",
            -      "resolved": "https://registry.npmjs.org/vinyl-sourcemap/-/vinyl-sourcemap-1.1.0.tgz",
            -      "integrity": "sha1-kqgAWTo4cDqM2xHYswCtS+Y7PhY=",
            -      "dev": true,
            -      "requires": {
            -        "append-buffer": "^1.0.2",
            -        "convert-source-map": "^1.5.0",
            -        "graceful-fs": "^4.1.6",
            -        "normalize-path": "^2.1.1",
            -        "now-and-later": "^2.0.0",
            -        "remove-bom-buffer": "^3.0.0",
            -        "vinyl": "^2.0.0"
            -      }
            -    },
            -    "vinyl-sourcemaps-apply": {
            -      "version": "0.2.1",
            -      "resolved": "https://registry.npmjs.org/vinyl-sourcemaps-apply/-/vinyl-sourcemaps-apply-0.2.1.tgz",
            -      "integrity": "sha1-q2VJ1h0XLCsbh75cUI0jnI74dwU=",
            -      "dev": true,
            -      "requires": {
            -        "source-map": "^0.5.1"
            -      }
            -    },
            -    "w3c-hr-time": {
            -      "version": "1.0.1",
            -      "resolved": "https://registry.npmjs.org/w3c-hr-time/-/w3c-hr-time-1.0.1.tgz",
            -      "integrity": "sha1-gqwr/2PZUOqeMYmlimViX+3xkEU=",
            -      "dev": true,
            -      "requires": {
            -        "browser-process-hrtime": "^0.1.2"
            -      }
            -    },
            -    "w3c-xmlserializer": {
            -      "version": "1.0.1",
            -      "resolved": "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-1.0.1.tgz",
            -      "integrity": "sha512-XZGI1OH/OLQr/NaJhhPmzhngwcAnZDLytsvXnRmlYeRkmbb0I7sqFFA22erq4WQR0sUu17ZSQOAV9mFwCqKRNg==",
            -      "dev": true,
            -      "requires": {
            -        "domexception": "^1.0.1",
            -        "webidl-conversions": "^4.0.2",
            -        "xml-name-validator": "^3.0.0"
            -      }
            -    },
            -    "wawoff2": {
            -      "version": "1.0.2",
            -      "resolved": "https://registry.npmjs.org/wawoff2/-/wawoff2-1.0.2.tgz",
            -      "integrity": "sha512-qxuTwf5tAP/XojrRc6cmR0hGvqgD3XUxv2fzfzURKPDfE7AeHmtRuankVxdJ4DRdSKXaE5QlyJT49yBis2vb6Q==",
            -      "dev": true,
            -      "requires": {
            -        "argparse": "^1.0.6"
            -      }
            -    },
            -    "webfont": {
            -      "version": "9.0.0",
            -      "resolved": "https://registry.npmjs.org/webfont/-/webfont-9.0.0.tgz",
            -      "integrity": "sha512-Sn8KnTXroWAbBHYKUXCUq2rKwqbluupUd7krYqluT+kFGV4dvMuKXaL84Fm/Kfv+5rz2S81jNRvcyQ6ySBiC2Q==",
            -      "dev": true,
            -      "requires": {
            -        "cosmiconfig": "^5.2.0",
            -        "deepmerge": "^3.2.0",
            -        "fs-extra": "^7.0.1",
            -        "globby": "^9.2.0",
            -        "meow": "^5.0.0",
            -        "nunjucks": "^3.2.0",
            -        "p-limit": "^2.2.0",
            -        "resolve-from": "^5.0.0",
            -        "svg2ttf": "^4.0.0",
            -        "svgicons2svgfont": "^9.0.3",
            -        "ttf2eot": "^2.0.0",
            -        "ttf2woff": "^2.0.0",
            -        "wawoff2": "^1.0.2",
            -        "xml2js": "^0.4.17"
            -      },
            -      "dependencies": {
            -        "globby": {
            -          "version": "9.2.0",
            -          "resolved": "https://registry.npmjs.org/globby/-/globby-9.2.0.tgz",
            -          "integrity": "sha512-ollPHROa5mcxDEkwg6bPt3QbEf4pDQSNtd6JPL1YvOvAo/7/0VAm9TccUeoTmarjPw4pfUthSCqcyfNB1I3ZSg==",
            -          "dev": true,
            -          "requires": {
            -            "@types/glob": "^7.1.1",
            -            "array-union": "^1.0.2",
            -            "dir-glob": "^2.2.2",
            -            "fast-glob": "^2.2.6",
            -            "glob": "^7.1.3",
            -            "ignore": "^4.0.3",
            -            "pify": "^4.0.1",
            -            "slash": "^2.0.0"
            -          }
            -        },
            -        "pify": {
            -          "version": "4.0.1",
            -          "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz",
            -          "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==",
            -          "dev": true
            -        }
            -      }
            -    },
            -    "webidl-conversions": {
            -      "version": "4.0.2",
            -      "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-4.0.2.tgz",
            -      "integrity": "sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg==",
            -      "dev": true
            -    },
            -    "whatwg-encoding": {
            -      "version": "1.0.5",
            -      "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-1.0.5.tgz",
            -      "integrity": "sha512-b5lim54JOPN9HtzvK9HFXvBma/rnfFeqsic0hSpjtDbVxR3dJKLc+KB4V6GgiGOvl7CY/KNh8rxSo9DKQrnUEw==",
            -      "dev": true,
            -      "requires": {
            -        "iconv-lite": "0.4.24"
            -      }
            -    },
            -    "whatwg-mimetype": {
            -      "version": "2.3.0",
            -      "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-2.3.0.tgz",
            -      "integrity": "sha512-M4yMwr6mAnQz76TbJm914+gPpB/nCwvZbJU28cUD6dR004SAxDLOOSUaB1JDRqLtaOV/vi0IC5lEAGFgrjGv/g==",
            -      "dev": true
            -    },
            -    "whatwg-url": {
            -      "version": "7.0.0",
            -      "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-7.0.0.tgz",
            -      "integrity": "sha512-37GeVSIJ3kn1JgKyjiYNmSLP1yzbpb29jdmwBSgkD9h40/hyrR/OifpVUndji3tmwGgD8qpw7iQu3RSbCrBpsQ==",
            -      "dev": true,
            -      "requires": {
            -        "lodash.sortby": "^4.7.0",
            -        "tr46": "^1.0.1",
            -        "webidl-conversions": "^4.0.2"
            -      }
            -    },
            -    "which": {
            -      "version": "1.3.1",
            -      "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz",
            -      "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==",
            -      "dev": true,
            -      "requires": {
            -        "isexe": "^2.0.0"
            -      }
            -    },
            -    "which-boxed-primitive": {
            -      "version": "1.0.2",
            -      "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz",
            -      "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==",
            -      "dev": true,
            -      "requires": {
            -        "is-bigint": "^1.0.1",
            -        "is-boolean-object": "^1.1.0",
            -        "is-number-object": "^1.0.4",
            -        "is-string": "^1.0.5",
            -        "is-symbol": "^1.0.3"
            -      },
            -      "dependencies": {
            -        "has-symbols": {
            -          "version": "1.0.2",
            -          "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz",
            -          "integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==",
            -          "dev": true
            -        },
            -        "is-symbol": {
            -          "version": "1.0.4",
            -          "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz",
            -          "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==",
            -          "dev": true,
            -          "requires": {
            -            "has-symbols": "^1.0.2"
            -          }
            -        }
            -      }
            -    },
            -    "which-module": {
            -      "version": "1.0.0",
            -      "resolved": "https://registry.npmjs.org/which-module/-/which-module-1.0.0.tgz",
            -      "integrity": "sha1-u6Y8qGGUiZT/MHc2CJ47lgJsKk8=",
            -      "dev": true
            -    },
            -    "wide-align": {
            -      "version": "1.1.3",
            -      "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz",
            -      "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==",
            -      "dev": true,
            -      "requires": {
            -        "string-width": "^1.0.2 || 2"
            -      }
            -    },
            -    "windows-release": {
            -      "version": "3.3.3",
            -      "resolved": "https://registry.npmjs.org/windows-release/-/windows-release-3.3.3.tgz",
            -      "integrity": "sha512-OSOGH1QYiW5yVor9TtmXKQvt2vjQqbYS+DqmsZw+r7xDwLXEeT3JGW0ZppFmHx4diyXmxt238KFR3N9jzevBRg==",
            -      "dev": true,
            -      "requires": {
            -        "execa": "^1.0.0"
            -      }
            -    },
            -    "word-wrap": {
            -      "version": "1.2.3",
            -      "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz",
            -      "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==",
            -      "dev": true
            -    },
            -    "wordwrap": {
            -      "version": "1.0.0",
            -      "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz",
            -      "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=",
            -      "dev": true
            -    },
            -    "wrap-ansi": {
            -      "version": "2.1.0",
            -      "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz",
            -      "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=",
            -      "dev": true,
            -      "requires": {
            -        "string-width": "^1.0.1",
            -        "strip-ansi": "^3.0.1"
            -      }
            -    },
            -    "wrappy": {
            -      "version": "1.0.2",
            -      "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
            -      "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=",
            -      "dev": true
            -    },
            -    "ws": {
            -      "version": "6.2.2",
            -      "resolved": "https://registry.npmjs.org/ws/-/ws-6.2.2.tgz",
            -      "integrity": "sha512-zmhltoSR8u1cnDsD43TX59mzoMZsLKqUweyYBAIvTngR3shc0W6aOZylZmq/7hqyVxPdi+5Ud2QInblgyE72fw==",
            -      "dev": true,
            -      "requires": {
            -        "async-limiter": "~1.0.0"
            -      }
            -    },
            -    "xml-name-validator": {
            -      "version": "3.0.0",
            -      "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-3.0.0.tgz",
            -      "integrity": "sha512-A5CUptxDsvxKJEU3yO6DuWBSJz/qizqzJKOMIfUJHETbBw/sFaDxgd6fxm1ewUaM0jZ444Fc5vC5ROYurg/4Pw==",
            -      "dev": true
            -    },
            -    "xml2js": {
            -      "version": "0.4.23",
            -      "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.23.tgz",
            -      "integrity": "sha512-ySPiMjM0+pLDftHgXY4By0uswI3SPKLDw/i3UXbnO8M/p28zqexCUoPmQFrYD+/1BzhGJSs2i1ERWKJAtiLrug==",
            -      "dev": true,
            -      "requires": {
            -        "sax": ">=0.6.0",
            -        "xmlbuilder": "~11.0.0"
            -      }
            -    },
            -    "xmlbuilder": {
            -      "version": "11.0.1",
            -      "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-11.0.1.tgz",
            -      "integrity": "sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA==",
            -      "dev": true
            -    },
            -    "xmlchars": {
            -      "version": "1.3.1",
            -      "resolved": "https://registry.npmjs.org/xmlchars/-/xmlchars-1.3.1.tgz",
            -      "integrity": "sha512-tGkGJkN8XqCod7OT+EvGYK5Z4SfDQGD30zAa58OcnAa0RRWgzUEK72tkXhsX1FZd+rgnhRxFtmO+ihkp8LHSkw==",
            -      "dev": true
            -    },
            -    "xmlcreate": {
            -      "version": "2.0.3",
            -      "resolved": "https://registry.npmjs.org/xmlcreate/-/xmlcreate-2.0.3.tgz",
            -      "integrity": "sha512-HgS+X6zAztGa9zIK3Y3LXuJes33Lz9x+YyTxgrkIdabu2vqcGOWwdfCpf1hWLRrd553wd4QCDf6BBO6FfdsRiQ==",
            -      "dev": true
            -    },
            -    "xmldom": {
            -      "version": "0.1.31",
            -      "resolved": "https://registry.npmjs.org/xmldom/-/xmldom-0.1.31.tgz",
            -      "integrity": "sha512-yS2uJflVQs6n+CyjHoaBmVSqIDevTAWrzMmjG1Gc7h1qQ7uVozNhEPJAwZXWyGQ/Gafo3fCwrcaokezLPupVyQ==",
            -      "dev": true
            -    },
            -    "xtend": {
            -      "version": "4.0.1",
            -      "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz",
            -      "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=",
            -      "dev": true
            -    },
            -    "y18n": {
            -      "version": "3.2.2",
            -      "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.2.tgz",
            -      "integrity": "sha512-uGZHXkHnhF0XeeAPgnKfPv1bgKAYyVvmNL1xlKsPYZPaIHxGti2hHqvOCQv71XMsLxu1QjergkqogUnms5D3YQ==",
            -      "dev": true
            -    },
            -    "yallist": {
            -      "version": "4.0.0",
            -      "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
            -      "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==",
            -      "dev": true
            -    },
            -    "yargs": {
            -      "version": "13.2.2",
            -      "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.2.2.tgz",
            -      "integrity": "sha512-WyEoxgyTD3w5XRpAQNYUB9ycVH/PQrToaTXdYXRdOXvEy1l19br+VJsc0vcO8PTGg5ro/l/GY7F/JMEBmI0BxA==",
            -      "dev": true,
            -      "requires": {
            -        "cliui": "^4.0.0",
            -        "find-up": "^3.0.0",
            -        "get-caller-file": "^2.0.1",
            -        "os-locale": "^3.1.0",
            -        "require-directory": "^2.1.1",
            -        "require-main-filename": "^2.0.0",
            -        "set-blocking": "^2.0.0",
            -        "string-width": "^3.0.0",
            -        "which-module": "^2.0.0",
            -        "y18n": "^4.0.0",
            -        "yargs-parser": "^13.0.0"
            -      },
            -      "dependencies": {
            -        "ansi-regex": {
            -          "version": "3.0.0",
            -          "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz",
            -          "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=",
            -          "dev": true
            -        },
            -        "camelcase": {
            -          "version": "5.3.1",
            -          "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz",
            -          "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==",
            -          "dev": true
            -        },
            -        "cliui": {
            -          "version": "4.1.0",
            -          "resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz",
            -          "integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==",
            -          "dev": true,
            -          "requires": {
            -            "string-width": "^2.1.1",
            -            "strip-ansi": "^4.0.0",
            -            "wrap-ansi": "^2.0.0"
            -          },
            -          "dependencies": {
            -            "string-width": {
            -              "version": "2.1.1",
            -              "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz",
            -              "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==",
            -              "dev": true,
            -              "requires": {
            -                "is-fullwidth-code-point": "^2.0.0",
            -                "strip-ansi": "^4.0.0"
            -              }
            -            }
            -          }
            -        },
            -        "find-up": {
            -          "version": "3.0.0",
            -          "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz",
            -          "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==",
            -          "dev": true,
            -          "requires": {
            -            "locate-path": "^3.0.0"
            -          }
            -        },
            -        "get-caller-file": {
            -          "version": "2.0.5",
            -          "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz",
            -          "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==",
            -          "dev": true
            -        },
            -        "invert-kv": {
            -          "version": "2.0.0",
            -          "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-2.0.0.tgz",
            -          "integrity": "sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA==",
            -          "dev": true
            -        },
            -        "is-fullwidth-code-point": {
            -          "version": "2.0.0",
            -          "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
            -          "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=",
            -          "dev": true
            -        },
            -        "lcid": {
            -          "version": "2.0.0",
            -          "resolved": "https://registry.npmjs.org/lcid/-/lcid-2.0.0.tgz",
            -          "integrity": "sha512-avPEb8P8EGnwXKClwsNUgryVjllcRqtMYa49NTsbQagYuT1DcXnl1915oxWjoyGrXR6zH/Y0Zc96xWsPcoDKeA==",
            -          "dev": true,
            -          "requires": {
            -            "invert-kv": "^2.0.0"
            -          }
            -        },
            -        "os-locale": {
            -          "version": "3.1.0",
            -          "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-3.1.0.tgz",
            -          "integrity": "sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q==",
            -          "dev": true,
            -          "requires": {
            -            "execa": "^1.0.0",
            -            "lcid": "^2.0.0",
            -            "mem": "^4.0.0"
            -          }
            -        },
            -        "require-main-filename": {
            -          "version": "2.0.0",
            -          "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz",
            -          "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==",
            -          "dev": true
            -        },
            -        "string-width": {
            -          "version": "3.1.0",
            -          "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz",
            -          "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==",
            -          "dev": true,
            -          "requires": {
            -            "emoji-regex": "^7.0.1",
            -            "is-fullwidth-code-point": "^2.0.0",
            -            "strip-ansi": "^5.1.0"
            -          },
            -          "dependencies": {
            -            "ansi-regex": {
            -              "version": "4.1.0",
            -              "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz",
            -              "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==",
            -              "dev": true
            -            },
            -            "strip-ansi": {
            -              "version": "5.2.0",
            -              "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz",
            -              "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==",
            -              "dev": true,
            -              "requires": {
            -                "ansi-regex": "^4.1.0"
            -              }
            -            }
            -          }
            -        },
            -        "strip-ansi": {
            -          "version": "4.0.0",
            -          "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz",
            -          "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=",
            -          "dev": true,
            -          "requires": {
            -            "ansi-regex": "^3.0.0"
            -          }
            -        },
            -        "which-module": {
            -          "version": "2.0.0",
            -          "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz",
            -          "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=",
            -          "dev": true
            -        },
            -        "y18n": {
            -          "version": "4.0.1",
            -          "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.1.tgz",
            -          "integrity": "sha512-wNcy4NvjMYL8gogWWYAO7ZFWFfHcbdbE57tZO8e4cbpj8tfUcwrwqSl3ad8HxpYWCdXcJUCeKKZS62Av1affwQ==",
            -          "dev": true
            -        },
            -        "yargs-parser": {
            -          "version": "13.1.2",
            -          "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz",
            -          "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==",
            -          "dev": true,
            -          "requires": {
            -            "camelcase": "^5.0.0",
            -            "decamelize": "^1.2.0"
            -          }
            -        }
            -      }
            -    },
            -    "yargs-parser": {
            -      "version": "5.0.0",
            -      "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-5.0.0.tgz",
            -      "integrity": "sha1-J17PDX/+Bcd+ZOfIbkzZS/DhIoo=",
            -      "dev": true,
            -      "requires": {
            -        "camelcase": "^3.0.0"
            -      }
            -    },
            -    "yargs-unparser": {
            -      "version": "1.5.0",
            -      "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-1.5.0.tgz",
            -      "integrity": "sha512-HK25qidFTCVuj/D1VfNiEndpLIeJN78aqgR23nL3y4N0U/91cOAzqfHlF8n2BvoNDcZmJKin3ddNSvOxSr8flw==",
            -      "dev": true,
            -      "requires": {
            -        "flat": "^4.1.0",
            -        "lodash": "^4.17.11",
            -        "yargs": "^12.0.5"
            -      },
            -      "dependencies": {
            -        "ansi-regex": {
            -          "version": "3.0.0",
            -          "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz",
            -          "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=",
            -          "dev": true
            -        },
            -        "camelcase": {
            -          "version": "5.3.1",
            -          "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz",
            -          "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==",
            -          "dev": true
            -        },
            -        "cliui": {
            -          "version": "4.1.0",
            -          "resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz",
            -          "integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==",
            -          "dev": true,
            -          "requires": {
            -            "string-width": "^2.1.1",
            -            "strip-ansi": "^4.0.0",
            -            "wrap-ansi": "^2.0.0"
            -          }
            -        },
            -        "find-up": {
            -          "version": "3.0.0",
            -          "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz",
            -          "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==",
            -          "dev": true,
            -          "requires": {
            -            "locate-path": "^3.0.0"
            -          }
            -        },
            -        "invert-kv": {
            -          "version": "2.0.0",
            -          "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-2.0.0.tgz",
            -          "integrity": "sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA==",
            -          "dev": true
            -        },
            -        "is-fullwidth-code-point": {
            -          "version": "2.0.0",
            -          "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
            -          "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=",
            -          "dev": true
            -        },
            -        "lcid": {
            -          "version": "2.0.0",
            -          "resolved": "https://registry.npmjs.org/lcid/-/lcid-2.0.0.tgz",
            -          "integrity": "sha512-avPEb8P8EGnwXKClwsNUgryVjllcRqtMYa49NTsbQagYuT1DcXnl1915oxWjoyGrXR6zH/Y0Zc96xWsPcoDKeA==",
            -          "dev": true,
            -          "requires": {
            -            "invert-kv": "^2.0.0"
            -          }
            -        },
            -        "os-locale": {
            -          "version": "3.1.0",
            -          "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-3.1.0.tgz",
            -          "integrity": "sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q==",
            -          "dev": true,
            -          "requires": {
            -            "execa": "^1.0.0",
            -            "lcid": "^2.0.0",
            -            "mem": "^4.0.0"
            -          }
            -        },
            -        "string-width": {
            -          "version": "2.1.1",
            -          "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz",
            -          "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==",
            -          "dev": true,
            -          "requires": {
            -            "is-fullwidth-code-point": "^2.0.0",
            -            "strip-ansi": "^4.0.0"
            -          }
            -        },
            -        "strip-ansi": {
            -          "version": "4.0.0",
            -          "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz",
            -          "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=",
            -          "dev": true,
            -          "requires": {
            -            "ansi-regex": "^3.0.0"
            -          }
            -        },
            -        "which-module": {
            -          "version": "2.0.0",
            -          "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz",
            -          "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=",
            -          "dev": true
            -        },
            -        "yargs": {
            -          "version": "12.0.5",
            -          "resolved": "https://registry.npmjs.org/yargs/-/yargs-12.0.5.tgz",
            -          "integrity": "sha512-Lhz8TLaYnxq/2ObqHDql8dX8CJi97oHxrjUcYtzKbbykPtVW9WB+poxI+NM2UIzsMgNCZTIf0AQwsjK5yMAqZw==",
            -          "dev": true,
            -          "requires": {
            -            "cliui": "^4.0.0",
            -            "decamelize": "^1.2.0",
            -            "find-up": "^3.0.0",
            -            "get-caller-file": "^1.0.1",
            -            "os-locale": "^3.0.0",
            -            "require-directory": "^2.1.1",
            -            "require-main-filename": "^1.0.1",
            -            "set-blocking": "^2.0.0",
            -            "string-width": "^2.0.0",
            -            "which-module": "^2.0.0",
            -            "y18n": "^3.2.1 || ^4.0.0",
            -            "yargs-parser": "^11.1.1"
            -          }
            -        },
            -        "yargs-parser": {
            -          "version": "11.1.1",
            -          "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-11.1.1.tgz",
            -          "integrity": "sha512-C6kB/WJDiaxONLJQnF8ccx9SEeoTTLek8RVbaOIsrAUS8VrBEXfmeSnCZxygc+XC2sNMBIwOOnfcxiynjHsVSQ==",
            -          "dev": true,
            -          "requires": {
            -            "camelcase": "^5.0.0",
            -            "decamelize": "^1.2.0"
            -          }
            -        }
            -      }
            -    }
            -  }
            +	"name": "prismjs",
            +	"version": "1.25.0",
            +	"lockfileVersion": 1,
            +	"requires": true,
            +	"dependencies": {
            +		"@babel/code-frame": {
            +			"version": "7.12.11",
            +			"resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.11.tgz",
            +			"integrity": "sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw==",
            +			"dev": true,
            +			"requires": {
            +				"@babel/highlight": "^7.10.4"
            +			}
            +		},
            +		"@babel/helper-validator-identifier": {
            +			"version": "7.12.11",
            +			"resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.12.11.tgz",
            +			"integrity": "sha512-np/lG3uARFybkoHokJUmf1QfEvRVCPbmQeUQpKow5cQ3xWrV9i3rUHodKDJPQfTVX61qKi+UdYk8kik84n7XOw==",
            +			"dev": true
            +		},
            +		"@babel/highlight": {
            +			"version": "7.13.10",
            +			"resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.13.10.tgz",
            +			"integrity": "sha512-5aPpe5XQPzflQrFwL1/QoeHkP2MsA4JCntcXHRhEsdsfPVkvPi2w7Qix4iV7t5S/oC9OodGrggd8aco1g3SZFg==",
            +			"dev": true,
            +			"requires": {
            +				"@babel/helper-validator-identifier": "^7.12.11",
            +				"chalk": "^2.0.0",
            +				"js-tokens": "^4.0.0"
            +			}
            +		},
            +		"@babel/parser": {
            +			"version": "7.10.3",
            +			"resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.10.3.tgz",
            +			"integrity": "sha512-oJtNJCMFdIMwXGmx+KxuaD7i3b8uS7TTFYW/FNG2BT8m+fmGHoiPYoH0Pe3gya07WuFmM5FCDIr1x0irkD/hyA==",
            +			"dev": true
            +		},
            +		"@babel/polyfill": {
            +			"version": "7.12.1",
            +			"resolved": "https://registry.npmjs.org/@babel/polyfill/-/polyfill-7.12.1.tgz",
            +			"integrity": "sha512-X0pi0V6gxLi6lFZpGmeNa4zxtwEmCs42isWLNjZZDE0Y8yVfgu0T2OAHlzBbdYlqbW/YXVvoBHpATEM+goCj8g==",
            +			"dev": true,
            +			"requires": {
            +				"core-js": "^2.6.5",
            +				"regenerator-runtime": "^0.13.4"
            +			}
            +		},
            +		"@eslint/eslintrc": {
            +			"version": "0.4.0",
            +			"resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.4.0.tgz",
            +			"integrity": "sha512-2ZPCc+uNbjV5ERJr+aKSPRwZgKd2z11x0EgLvb1PURmUrn9QNRXFqje0Ldq454PfAVyaJYyrDvvIKSFP4NnBog==",
            +			"dev": true,
            +			"requires": {
            +				"ajv": "^6.12.4",
            +				"debug": "^4.1.1",
            +				"espree": "^7.3.0",
            +				"globals": "^12.1.0",
            +				"ignore": "^4.0.6",
            +				"import-fresh": "^3.2.1",
            +				"js-yaml": "^3.13.1",
            +				"minimatch": "^3.0.4",
            +				"strip-json-comments": "^3.1.1"
            +			},
            +			"dependencies": {
            +				"ajv": {
            +					"version": "6.12.6",
            +					"resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz",
            +					"integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==",
            +					"dev": true,
            +					"requires": {
            +						"fast-deep-equal": "^3.1.1",
            +						"fast-json-stable-stringify": "^2.0.0",
            +						"json-schema-traverse": "^0.4.1",
            +						"uri-js": "^4.2.2"
            +					}
            +				},
            +				"debug": {
            +					"version": "4.3.1",
            +					"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz",
            +					"integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==",
            +					"dev": true,
            +					"requires": {
            +						"ms": "2.1.2"
            +					}
            +				},
            +				"fast-deep-equal": {
            +					"version": "3.1.3",
            +					"resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
            +					"integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==",
            +					"dev": true
            +				},
            +				"globals": {
            +					"version": "12.4.0",
            +					"resolved": "https://registry.npmjs.org/globals/-/globals-12.4.0.tgz",
            +					"integrity": "sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg==",
            +					"dev": true,
            +					"requires": {
            +						"type-fest": "^0.8.1"
            +					}
            +				},
            +				"import-fresh": {
            +					"version": "3.3.0",
            +					"resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz",
            +					"integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==",
            +					"dev": true,
            +					"requires": {
            +						"parent-module": "^1.0.0",
            +						"resolve-from": "^4.0.0"
            +					}
            +				},
            +				"ms": {
            +					"version": "2.1.2",
            +					"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
            +					"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
            +					"dev": true
            +				},
            +				"resolve-from": {
            +					"version": "4.0.0",
            +					"resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz",
            +					"integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==",
            +					"dev": true
            +				},
            +				"strip-json-comments": {
            +					"version": "3.1.1",
            +					"resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz",
            +					"integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==",
            +					"dev": true
            +				}
            +			}
            +		},
            +		"@mrmlnc/readdir-enhanced": {
            +			"version": "2.2.1",
            +			"resolved": "https://registry.npmjs.org/@mrmlnc/readdir-enhanced/-/readdir-enhanced-2.2.1.tgz",
            +			"integrity": "sha512-bPHp6Ji8b41szTOcaP63VlnbbO5Ny6dwAATtY6JTjh5N2OLrb5Qk/Th5cRkRQhkWCt+EJsYrNB0MiL+Gpn6e3g==",
            +			"dev": true,
            +			"requires": {
            +				"call-me-maybe": "^1.0.1",
            +				"glob-to-regexp": "^0.3.0"
            +			}
            +		},
            +		"@nodelib/fs.stat": {
            +			"version": "1.1.3",
            +			"resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-1.1.3.tgz",
            +			"integrity": "sha512-shAmDyaQC4H92APFoIaVDHCx5bStIocgvbwQyxPRrbUY20V1EYTbSDchWbuwlMG3V17cprZhA6+78JfB+3DTPw==",
            +			"dev": true
            +		},
            +		"@octokit/auth-token": {
            +			"version": "2.4.2",
            +			"resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-2.4.2.tgz",
            +			"integrity": "sha512-jE/lE/IKIz2v1+/P0u4fJqv0kYwXOTujKemJMFr6FeopsxlIK3+wKDCJGnysg81XID5TgZQbIfuJ5J0lnTiuyQ==",
            +			"dev": true,
            +			"requires": {
            +				"@octokit/types": "^5.0.0"
            +			}
            +		},
            +		"@octokit/endpoint": {
            +			"version": "6.0.8",
            +			"resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-6.0.8.tgz",
            +			"integrity": "sha512-MuRrgv+bM4Q+e9uEvxAB/Kf+Sj0O2JAOBA131uo1o6lgdq1iS8ejKwtqHgdfY91V3rN9R/hdGKFiQYMzVzVBEQ==",
            +			"dev": true,
            +			"requires": {
            +				"@octokit/types": "^5.0.0",
            +				"is-plain-object": "^5.0.0",
            +				"universal-user-agent": "^6.0.0"
            +			},
            +			"dependencies": {
            +				"is-plain-object": {
            +					"version": "5.0.0",
            +					"resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz",
            +					"integrity": "sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==",
            +					"dev": true
            +				},
            +				"universal-user-agent": {
            +					"version": "6.0.0",
            +					"resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-6.0.0.tgz",
            +					"integrity": "sha512-isyNax3wXoKaulPDZWHQqbmIx1k2tb9fb3GGDBRxCscfYV2Ch7WxPArBsFEG8s/safwXTT7H4QGhaIkTp9447w==",
            +					"dev": true
            +				}
            +			}
            +		},
            +		"@octokit/plugin-paginate-rest": {
            +			"version": "1.1.2",
            +			"resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-1.1.2.tgz",
            +			"integrity": "sha512-jbsSoi5Q1pj63sC16XIUboklNw+8tL9VOnJsWycWYR78TKss5PVpIPb1TUUcMQ+bBh7cY579cVAWmf5qG+dw+Q==",
            +			"dev": true,
            +			"requires": {
            +				"@octokit/types": "^2.0.1"
            +			},
            +			"dependencies": {
            +				"@octokit/types": {
            +					"version": "2.16.2",
            +					"resolved": "https://registry.npmjs.org/@octokit/types/-/types-2.16.2.tgz",
            +					"integrity": "sha512-O75k56TYvJ8WpAakWwYRN8Bgu60KrmX0z1KqFp1kNiFNkgW+JW+9EBKZ+S33PU6SLvbihqd+3drvPxKK68Ee8Q==",
            +					"dev": true,
            +					"requires": {
            +						"@types/node": ">= 8"
            +					}
            +				}
            +			}
            +		},
            +		"@octokit/plugin-request-log": {
            +			"version": "1.0.2",
            +			"resolved": "https://registry.npmjs.org/@octokit/plugin-request-log/-/plugin-request-log-1.0.2.tgz",
            +			"integrity": "sha512-oTJSNAmBqyDR41uSMunLQKMX0jmEXbwD1fpz8FG27lScV3RhtGfBa1/BBLym+PxcC16IBlF7KH9vP1BUYxA+Eg==",
            +			"dev": true
            +		},
            +		"@octokit/plugin-rest-endpoint-methods": {
            +			"version": "2.4.0",
            +			"resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-2.4.0.tgz",
            +			"integrity": "sha512-EZi/AWhtkdfAYi01obpX0DF7U6b1VRr30QNQ5xSFPITMdLSfhcBqjamE3F+sKcxPbD7eZuMHu3Qkk2V+JGxBDQ==",
            +			"dev": true,
            +			"requires": {
            +				"@octokit/types": "^2.0.1",
            +				"deprecation": "^2.3.1"
            +			},
            +			"dependencies": {
            +				"@octokit/types": {
            +					"version": "2.16.2",
            +					"resolved": "https://registry.npmjs.org/@octokit/types/-/types-2.16.2.tgz",
            +					"integrity": "sha512-O75k56TYvJ8WpAakWwYRN8Bgu60KrmX0z1KqFp1kNiFNkgW+JW+9EBKZ+S33PU6SLvbihqd+3drvPxKK68Ee8Q==",
            +					"dev": true,
            +					"requires": {
            +						"@types/node": ">= 8"
            +					}
            +				}
            +			}
            +		},
            +		"@octokit/request": {
            +			"version": "5.4.9",
            +			"resolved": "https://registry.npmjs.org/@octokit/request/-/request-5.4.9.tgz",
            +			"integrity": "sha512-CzwVvRyimIM1h2n9pLVYfTDmX9m+KHSgCpqPsY8F1NdEK8IaWqXhSBXsdjOBFZSpEcxNEeg4p0UO9cQ8EnOCLA==",
            +			"dev": true,
            +			"requires": {
            +				"@octokit/endpoint": "^6.0.1",
            +				"@octokit/request-error": "^2.0.0",
            +				"@octokit/types": "^5.0.0",
            +				"deprecation": "^2.0.0",
            +				"is-plain-object": "^5.0.0",
            +				"node-fetch": "^2.6.1",
            +				"once": "^1.4.0",
            +				"universal-user-agent": "^6.0.0"
            +			},
            +			"dependencies": {
            +				"@octokit/request-error": {
            +					"version": "2.0.2",
            +					"resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-2.0.2.tgz",
            +					"integrity": "sha512-2BrmnvVSV1MXQvEkrb9zwzP0wXFNbPJij922kYBTLIlIafukrGOb+ABBT2+c6wZiuyWDH1K1zmjGQ0toN/wMWw==",
            +					"dev": true,
            +					"requires": {
            +						"@octokit/types": "^5.0.1",
            +						"deprecation": "^2.0.0",
            +						"once": "^1.4.0"
            +					}
            +				},
            +				"is-plain-object": {
            +					"version": "5.0.0",
            +					"resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz",
            +					"integrity": "sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==",
            +					"dev": true
            +				},
            +				"universal-user-agent": {
            +					"version": "6.0.0",
            +					"resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-6.0.0.tgz",
            +					"integrity": "sha512-isyNax3wXoKaulPDZWHQqbmIx1k2tb9fb3GGDBRxCscfYV2Ch7WxPArBsFEG8s/safwXTT7H4QGhaIkTp9447w==",
            +					"dev": true
            +				}
            +			}
            +		},
            +		"@octokit/request-error": {
            +			"version": "1.2.1",
            +			"resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-1.2.1.tgz",
            +			"integrity": "sha512-+6yDyk1EES6WK+l3viRDElw96MvwfJxCt45GvmjDUKWjYIb3PJZQkq3i46TwGwoPD4h8NmTrENmtyA1FwbmhRA==",
            +			"dev": true,
            +			"requires": {
            +				"@octokit/types": "^2.0.0",
            +				"deprecation": "^2.0.0",
            +				"once": "^1.4.0"
            +			},
            +			"dependencies": {
            +				"@octokit/types": {
            +					"version": "2.16.2",
            +					"resolved": "https://registry.npmjs.org/@octokit/types/-/types-2.16.2.tgz",
            +					"integrity": "sha512-O75k56TYvJ8WpAakWwYRN8Bgu60KrmX0z1KqFp1kNiFNkgW+JW+9EBKZ+S33PU6SLvbihqd+3drvPxKK68Ee8Q==",
            +					"dev": true,
            +					"requires": {
            +						"@types/node": ">= 8"
            +					}
            +				}
            +			}
            +		},
            +		"@octokit/rest": {
            +			"version": "16.43.2",
            +			"resolved": "https://registry.npmjs.org/@octokit/rest/-/rest-16.43.2.tgz",
            +			"integrity": "sha512-ngDBevLbBTFfrHZeiS7SAMAZ6ssuVmXuya+F/7RaVvlysgGa1JKJkKWY+jV6TCJYcW0OALfJ7nTIGXcBXzycfQ==",
            +			"dev": true,
            +			"requires": {
            +				"@octokit/auth-token": "^2.4.0",
            +				"@octokit/plugin-paginate-rest": "^1.1.1",
            +				"@octokit/plugin-request-log": "^1.0.0",
            +				"@octokit/plugin-rest-endpoint-methods": "2.4.0",
            +				"@octokit/request": "^5.2.0",
            +				"@octokit/request-error": "^1.0.2",
            +				"atob-lite": "^2.0.0",
            +				"before-after-hook": "^2.0.0",
            +				"btoa-lite": "^1.0.0",
            +				"deprecation": "^2.0.0",
            +				"lodash.get": "^4.4.2",
            +				"lodash.set": "^4.3.2",
            +				"lodash.uniq": "^4.5.0",
            +				"octokit-pagination-methods": "^1.1.0",
            +				"once": "^1.4.0",
            +				"universal-user-agent": "^4.0.0"
            +			}
            +		},
            +		"@octokit/types": {
            +			"version": "5.5.0",
            +			"resolved": "https://registry.npmjs.org/@octokit/types/-/types-5.5.0.tgz",
            +			"integrity": "sha512-UZ1pErDue6bZNjYOotCNveTXArOMZQFG6hKJfOnGnulVCMcVVi7YIIuuR4WfBhjo7zgpmzn/BkPDnUXtNx+PcQ==",
            +			"dev": true,
            +			"requires": {
            +				"@types/node": ">= 8"
            +			}
            +		},
            +		"@types/events": {
            +			"version": "3.0.0",
            +			"resolved": "https://registry.npmjs.org/@types/events/-/events-3.0.0.tgz",
            +			"integrity": "sha512-EaObqwIvayI5a8dCzhFrjKzVwKLxjoG9T6Ppd5CEo07LRKfQ8Yokw54r5+Wq7FaBQ+yXRvQAYPrHwya1/UFt9g==",
            +			"dev": true
            +		},
            +		"@types/glob": {
            +			"version": "7.1.1",
            +			"resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.1.1.tgz",
            +			"integrity": "sha512-1Bh06cbWJUHMC97acuD6UMG29nMt0Aqz1vF3guLfG+kHHJhy3AyohZFFxYk2f7Q1SQIrNwvncxAE0N/9s70F2w==",
            +			"dev": true,
            +			"requires": {
            +				"@types/events": "*",
            +				"@types/minimatch": "*",
            +				"@types/node": "*"
            +			}
            +		},
            +		"@types/minimatch": {
            +			"version": "3.0.3",
            +			"resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.3.tgz",
            +			"integrity": "sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA==",
            +			"dev": true
            +		},
            +		"@types/node": {
            +			"version": "12.0.2",
            +			"resolved": "https://registry.npmjs.org/@types/node/-/node-12.0.2.tgz",
            +			"integrity": "sha512-5tabW/i+9mhrfEOUcLDu2xBPsHJ+X5Orqy9FKpale3SjDA17j5AEpYq5vfy3oAeAHGcvANRCO3NV3d2D6q3NiA==",
            +			"dev": true
            +		},
            +		"@types/node-fetch": {
            +			"version": "2.5.7",
            +			"resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.5.7.tgz",
            +			"integrity": "sha512-o2WVNf5UhWRkxlf6eq+jMZDu7kjgpgJfl4xVNlvryc95O/6F2ld8ztKX+qu+Rjyet93WAWm5LjeX9H5FGkODvw==",
            +			"dev": true,
            +			"requires": {
            +				"@types/node": "*",
            +				"form-data": "^3.0.0"
            +			},
            +			"dependencies": {
            +				"combined-stream": {
            +					"version": "1.0.8",
            +					"resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
            +					"integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
            +					"dev": true,
            +					"requires": {
            +						"delayed-stream": "~1.0.0"
            +					}
            +				},
            +				"form-data": {
            +					"version": "3.0.0",
            +					"resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.0.tgz",
            +					"integrity": "sha512-CKMFDglpbMi6PyN+brwB9Q/GOw0eAnsrEZDgcsH5Krhz5Od/haKHAX0NmQfha2zPPz0JpWzA7GJHGSnvCRLWsg==",
            +					"dev": true,
            +					"requires": {
            +						"asynckit": "^0.4.0",
            +						"combined-stream": "^1.0.8",
            +						"mime-types": "^2.1.12"
            +					}
            +				}
            +			}
            +		},
            +		"a-sync-waterfall": {
            +			"version": "1.0.1",
            +			"resolved": "https://registry.npmjs.org/a-sync-waterfall/-/a-sync-waterfall-1.0.1.tgz",
            +			"integrity": "sha512-RYTOHHdWipFUliRFMCS4X2Yn2X8M87V/OpSqWzKKOGhzqyUxzyVmhHDH9sAvG+ZuQf/TAOFsLCpMw09I1ufUnA==",
            +			"dev": true
            +		},
            +		"abab": {
            +			"version": "2.0.0",
            +			"resolved": "https://registry.npmjs.org/abab/-/abab-2.0.0.tgz",
            +			"integrity": "sha512-sY5AXXVZv4Y1VACTtR11UJCPHHudgY5i26Qj5TypE6DKlIApbwb5uqhXcJ5UUGbvZNRh7EeIoW+LrJumBsKp7w==",
            +			"dev": true
            +		},
            +		"abort-controller": {
            +			"version": "3.0.0",
            +			"resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz",
            +			"integrity": "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==",
            +			"dev": true,
            +			"requires": {
            +				"event-target-shim": "^5.0.0"
            +			}
            +		},
            +		"acorn": {
            +			"version": "6.4.1",
            +			"resolved": "https://registry.npmjs.org/acorn/-/acorn-6.4.1.tgz",
            +			"integrity": "sha512-ZVA9k326Nwrj3Cj9jlh3wGFutC2ZornPNARZwsNYqQYgN0EsV2d53w5RN/co65Ohn4sUAUtb1rSUAOD6XN9idA==",
            +			"dev": true
            +		},
            +		"acorn-globals": {
            +			"version": "4.3.0",
            +			"resolved": "https://registry.npmjs.org/acorn-globals/-/acorn-globals-4.3.0.tgz",
            +			"integrity": "sha512-hMtHj3s5RnuhvHPowpBYvJVj3rAar82JiDQHvGs1zO0l10ocX/xEdBShNHTJaboucJUsScghp74pH3s7EnHHQw==",
            +			"dev": true,
            +			"requires": {
            +				"acorn": "^6.0.1",
            +				"acorn-walk": "^6.0.1"
            +			}
            +		},
            +		"acorn-jsx": {
            +			"version": "5.3.1",
            +			"resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.1.tgz",
            +			"integrity": "sha512-K0Ptm/47OKfQRpNQ2J/oIN/3QYiK6FwW+eJbILhsdxh2WTLdl+30o8aGdTbm5JbffpFFAg/g+zi1E+jvJha5ng==",
            +			"dev": true
            +		},
            +		"acorn-walk": {
            +			"version": "6.1.1",
            +			"resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-6.1.1.tgz",
            +			"integrity": "sha512-OtUw6JUTgxA2QoqqmrmQ7F2NYqiBPi/L2jqHyFtllhOUvXYQXf0Z1CYUinIfyT4bTCGmrA7gX9FvHA81uzCoVw==",
            +			"dev": true
            +		},
            +		"agent-base": {
            +			"version": "4.3.0",
            +			"resolved": "https://registry.npmjs.org/agent-base/-/agent-base-4.3.0.tgz",
            +			"integrity": "sha512-salcGninV0nPrwpGNn4VTXBb1SOuXQBiqbrNXoeizJsHrsL6ERFM2Ne3JUSBWRE6aeNJI2ROP/WEEIDUiDe3cg==",
            +			"dev": true,
            +			"requires": {
            +				"es6-promisify": "^5.0.0"
            +			}
            +		},
            +		"ajv": {
            +			"version": "6.10.0",
            +			"resolved": "https://registry.npmjs.org/ajv/-/ajv-6.10.0.tgz",
            +			"integrity": "sha512-nffhOpkymDECQyR0mnsUtoCE8RlX38G0rYP+wgLWFyZuUyuuojSSvi/+euOiQBIn63whYwYVIIH1TvE3tu4OEg==",
            +			"dev": true,
            +			"requires": {
            +				"fast-deep-equal": "^2.0.1",
            +				"fast-json-stable-stringify": "^2.0.0",
            +				"json-schema-traverse": "^0.4.1",
            +				"uri-js": "^4.2.2"
            +			}
            +		},
            +		"ansi-colors": {
            +			"version": "1.1.0",
            +			"resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-1.1.0.tgz",
            +			"integrity": "sha512-SFKX67auSNoVR38N3L+nvsPjOE0bybKTYbkf5tRvushrAPQ9V75huw0ZxBkKVeRU9kqH3d6HA4xTckbwZ4ixmA==",
            +			"dev": true,
            +			"requires": {
            +				"ansi-wrap": "^0.1.0"
            +			}
            +		},
            +		"ansi-gray": {
            +			"version": "0.1.1",
            +			"resolved": "https://registry.npmjs.org/ansi-gray/-/ansi-gray-0.1.1.tgz",
            +			"integrity": "sha1-KWLPVOyXksSFEKPetSRDaGHvclE=",
            +			"dev": true,
            +			"requires": {
            +				"ansi-wrap": "0.1.0"
            +			}
            +		},
            +		"ansi-regex": {
            +			"version": "2.1.1",
            +			"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
            +			"integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=",
            +			"dev": true
            +		},
            +		"ansi-styles": {
            +			"version": "3.2.1",
            +			"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
            +			"integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
            +			"dev": true,
            +			"requires": {
            +				"color-convert": "^1.9.0"
            +			}
            +		},
            +		"ansi-wrap": {
            +			"version": "0.1.0",
            +			"resolved": "https://registry.npmjs.org/ansi-wrap/-/ansi-wrap-0.1.0.tgz",
            +			"integrity": "sha1-qCJQ3bABXponyoLoLqYDu/pF768=",
            +			"dev": true
            +		},
            +		"anymatch": {
            +			"version": "2.0.0",
            +			"resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz",
            +			"integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==",
            +			"dev": true,
            +			"requires": {
            +				"micromatch": "^3.1.4",
            +				"normalize-path": "^2.1.1"
            +			}
            +		},
            +		"append-buffer": {
            +			"version": "1.0.2",
            +			"resolved": "https://registry.npmjs.org/append-buffer/-/append-buffer-1.0.2.tgz",
            +			"integrity": "sha1-2CIM9GYIFSXv6lBhTz3mUU36WPE=",
            +			"dev": true,
            +			"requires": {
            +				"buffer-equal": "^1.0.0"
            +			}
            +		},
            +		"archy": {
            +			"version": "1.0.0",
            +			"resolved": "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz",
            +			"integrity": "sha1-+cjBN1fMHde8N5rHeyxipcKGjEA=",
            +			"dev": true
            +		},
            +		"argparse": {
            +			"version": "1.0.10",
            +			"resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz",
            +			"integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==",
            +			"dev": true,
            +			"requires": {
            +				"sprintf-js": "~1.0.2"
            +			}
            +		},
            +		"arr-diff": {
            +			"version": "4.0.0",
            +			"resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz",
            +			"integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=",
            +			"dev": true
            +		},
            +		"arr-filter": {
            +			"version": "1.1.2",
            +			"resolved": "https://registry.npmjs.org/arr-filter/-/arr-filter-1.1.2.tgz",
            +			"integrity": "sha1-Q/3d0JHo7xGqTEXZzcGOLf8XEe4=",
            +			"dev": true,
            +			"requires": {
            +				"make-iterator": "^1.0.0"
            +			}
            +		},
            +		"arr-flatten": {
            +			"version": "1.1.0",
            +			"resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz",
            +			"integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==",
            +			"dev": true
            +		},
            +		"arr-map": {
            +			"version": "2.0.2",
            +			"resolved": "https://registry.npmjs.org/arr-map/-/arr-map-2.0.2.tgz",
            +			"integrity": "sha1-Onc0X/wc814qkYJWAfnljy4kysQ=",
            +			"dev": true,
            +			"requires": {
            +				"make-iterator": "^1.0.0"
            +			}
            +		},
            +		"arr-union": {
            +			"version": "3.1.0",
            +			"resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz",
            +			"integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=",
            +			"dev": true
            +		},
            +		"array-each": {
            +			"version": "1.0.1",
            +			"resolved": "https://registry.npmjs.org/array-each/-/array-each-1.0.1.tgz",
            +			"integrity": "sha1-p5SvDAWrF1KEbudTofIRoFugxE8=",
            +			"dev": true
            +		},
            +		"array-equal": {
            +			"version": "1.0.0",
            +			"resolved": "https://registry.npmjs.org/array-equal/-/array-equal-1.0.0.tgz",
            +			"integrity": "sha1-jCpe8kcv2ep0KwTHenUJO6J1fJM=",
            +			"dev": true
            +		},
            +		"array-find-index": {
            +			"version": "1.0.2",
            +			"resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz",
            +			"integrity": "sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E=",
            +			"dev": true
            +		},
            +		"array-initial": {
            +			"version": "1.1.0",
            +			"resolved": "https://registry.npmjs.org/array-initial/-/array-initial-1.1.0.tgz",
            +			"integrity": "sha1-L6dLJnOTccOUe9enrcc74zSz15U=",
            +			"dev": true,
            +			"requires": {
            +				"array-slice": "^1.0.0",
            +				"is-number": "^4.0.0"
            +			},
            +			"dependencies": {
            +				"is-number": {
            +					"version": "4.0.0",
            +					"resolved": "https://registry.npmjs.org/is-number/-/is-number-4.0.0.tgz",
            +					"integrity": "sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ==",
            +					"dev": true
            +				}
            +			}
            +		},
            +		"array-last": {
            +			"version": "1.3.0",
            +			"resolved": "https://registry.npmjs.org/array-last/-/array-last-1.3.0.tgz",
            +			"integrity": "sha512-eOCut5rXlI6aCOS7Z7kCplKRKyiFQ6dHFBem4PwlwKeNFk2/XxTrhRh5T9PyaEWGy/NHTZWbY+nsZlNFJu9rYg==",
            +			"dev": true,
            +			"requires": {
            +				"is-number": "^4.0.0"
            +			},
            +			"dependencies": {
            +				"is-number": {
            +					"version": "4.0.0",
            +					"resolved": "https://registry.npmjs.org/is-number/-/is-number-4.0.0.tgz",
            +					"integrity": "sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ==",
            +					"dev": true
            +				}
            +			}
            +		},
            +		"array-slice": {
            +			"version": "1.1.0",
            +			"resolved": "https://registry.npmjs.org/array-slice/-/array-slice-1.1.0.tgz",
            +			"integrity": "sha512-B1qMD3RBP7O8o0H2KbrXDyB0IccejMF15+87Lvlor12ONPRHP6gTjXMNkt/d3ZuOGbAe66hFmaCfECI24Ufp6w==",
            +			"dev": true
            +		},
            +		"array-sort": {
            +			"version": "1.0.0",
            +			"resolved": "https://registry.npmjs.org/array-sort/-/array-sort-1.0.0.tgz",
            +			"integrity": "sha512-ihLeJkonmdiAsD7vpgN3CRcx2J2S0TiYW+IS/5zHBI7mKUq3ySvBdzzBfD236ubDBQFiiyG3SWCPc+msQ9KoYg==",
            +			"dev": true,
            +			"requires": {
            +				"default-compare": "^1.0.0",
            +				"get-value": "^2.0.6",
            +				"kind-of": "^5.0.2"
            +			},
            +			"dependencies": {
            +				"kind-of": {
            +					"version": "5.1.0",
            +					"resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz",
            +					"integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==",
            +					"dev": true
            +				}
            +			}
            +		},
            +		"array-union": {
            +			"version": "1.0.2",
            +			"resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz",
            +			"integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=",
            +			"dev": true,
            +			"requires": {
            +				"array-uniq": "^1.0.1"
            +			}
            +		},
            +		"array-uniq": {
            +			"version": "1.0.3",
            +			"resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz",
            +			"integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=",
            +			"dev": true
            +		},
            +		"array-unique": {
            +			"version": "0.3.2",
            +			"resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz",
            +			"integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=",
            +			"dev": true
            +		},
            +		"arrify": {
            +			"version": "1.0.1",
            +			"resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz",
            +			"integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=",
            +			"dev": true
            +		},
            +		"asap": {
            +			"version": "2.0.6",
            +			"resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz",
            +			"integrity": "sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY=",
            +			"dev": true
            +		},
            +		"asn1": {
            +			"version": "0.2.4",
            +			"resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz",
            +			"integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==",
            +			"dev": true,
            +			"requires": {
            +				"safer-buffer": "~2.1.0"
            +			}
            +		},
            +		"assert-plus": {
            +			"version": "1.0.0",
            +			"resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz",
            +			"integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=",
            +			"dev": true
            +		},
            +		"assertion-error": {
            +			"version": "1.1.0",
            +			"resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz",
            +			"integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==",
            +			"dev": true
            +		},
            +		"assign-symbols": {
            +			"version": "1.0.0",
            +			"resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz",
            +			"integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=",
            +			"dev": true
            +		},
            +		"astral-regex": {
            +			"version": "2.0.0",
            +			"resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz",
            +			"integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==",
            +			"dev": true
            +		},
            +		"async": {
            +			"version": "2.6.3",
            +			"resolved": "https://registry.npmjs.org/async/-/async-2.6.3.tgz",
            +			"integrity": "sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg==",
            +			"dev": true,
            +			"requires": {
            +				"lodash": "^4.17.14"
            +			}
            +		},
            +		"async-done": {
            +			"version": "1.3.2",
            +			"resolved": "https://registry.npmjs.org/async-done/-/async-done-1.3.2.tgz",
            +			"integrity": "sha512-uYkTP8dw2og1tu1nmza1n1CMW0qb8gWWlwqMmLb7MhBVs4BXrFziT6HXUd+/RlRA/i4H9AkofYloUbs1fwMqlw==",
            +			"dev": true,
            +			"requires": {
            +				"end-of-stream": "^1.1.0",
            +				"once": "^1.3.2",
            +				"process-nextick-args": "^2.0.0",
            +				"stream-exhaust": "^1.0.1"
            +			}
            +		},
            +		"async-each": {
            +			"version": "1.0.3",
            +			"resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.3.tgz",
            +			"integrity": "sha512-z/WhQ5FPySLdvREByI2vZiTWwCnF0moMJ1hK9YQwDTHKh6I7/uSckMetoRGb5UBZPC1z0jlw+n/XCgjeH7y1AQ==",
            +			"dev": true
            +		},
            +		"async-limiter": {
            +			"version": "1.0.0",
            +			"resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.0.tgz",
            +			"integrity": "sha512-jp/uFnooOiO+L211eZOoSyzpOITMXx1rBITauYykG3BRYPu8h0UcxsPNB04RR5vo4Tyz3+ay17tR6JVf9qzYWg==",
            +			"dev": true
            +		},
            +		"async-retry": {
            +			"version": "1.2.3",
            +			"resolved": "https://registry.npmjs.org/async-retry/-/async-retry-1.2.3.tgz",
            +			"integrity": "sha512-tfDb02Th6CE6pJUF2gjW5ZVjsgwlucVXOEQMvEX9JgSJMs9gAX+Nz3xRuJBKuUYjTSYORqvDBORdAQ3LU59g7Q==",
            +			"dev": true,
            +			"requires": {
            +				"retry": "0.12.0"
            +			}
            +		},
            +		"async-settle": {
            +			"version": "1.0.0",
            +			"resolved": "https://registry.npmjs.org/async-settle/-/async-settle-1.0.0.tgz",
            +			"integrity": "sha1-HQqRS7Aldb7IqPOnTlCA9yssDGs=",
            +			"dev": true,
            +			"requires": {
            +				"async-done": "^1.2.2"
            +			}
            +		},
            +		"asynckit": {
            +			"version": "0.4.0",
            +			"resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
            +			"integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=",
            +			"dev": true
            +		},
            +		"atob": {
            +			"version": "2.1.2",
            +			"resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz",
            +			"integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==",
            +			"dev": true
            +		},
            +		"atob-lite": {
            +			"version": "2.0.0",
            +			"resolved": "https://registry.npmjs.org/atob-lite/-/atob-lite-2.0.0.tgz",
            +			"integrity": "sha1-D+9a1G8b16hQLGVyfwNn1e5D1pY=",
            +			"dev": true
            +		},
            +		"aws-sign2": {
            +			"version": "0.7.0",
            +			"resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz",
            +			"integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=",
            +			"dev": true
            +		},
            +		"aws4": {
            +			"version": "1.8.0",
            +			"resolved": "https://registry.npmjs.org/aws4/-/aws4-1.8.0.tgz",
            +			"integrity": "sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ==",
            +			"dev": true
            +		},
            +		"bach": {
            +			"version": "1.2.0",
            +			"resolved": "https://registry.npmjs.org/bach/-/bach-1.2.0.tgz",
            +			"integrity": "sha1-Szzpa/JxNPeaG0FKUcFONMO9mIA=",
            +			"dev": true,
            +			"requires": {
            +				"arr-filter": "^1.1.1",
            +				"arr-flatten": "^1.0.1",
            +				"arr-map": "^2.0.0",
            +				"array-each": "^1.0.0",
            +				"array-initial": "^1.0.0",
            +				"array-last": "^1.1.1",
            +				"async-done": "^1.2.2",
            +				"async-settle": "^1.0.0",
            +				"now-and-later": "^2.0.0"
            +			}
            +		},
            +		"balanced-match": {
            +			"version": "1.0.0",
            +			"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
            +			"integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=",
            +			"dev": true
            +		},
            +		"base": {
            +			"version": "0.11.2",
            +			"resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz",
            +			"integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==",
            +			"dev": true,
            +			"requires": {
            +				"cache-base": "^1.0.1",
            +				"class-utils": "^0.3.5",
            +				"component-emitter": "^1.2.1",
            +				"define-property": "^1.0.0",
            +				"isobject": "^3.0.1",
            +				"mixin-deep": "^1.2.0",
            +				"pascalcase": "^0.1.1"
            +			},
            +			"dependencies": {
            +				"define-property": {
            +					"version": "1.0.0",
            +					"resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz",
            +					"integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=",
            +					"dev": true,
            +					"requires": {
            +						"is-descriptor": "^1.0.0"
            +					}
            +				},
            +				"is-accessor-descriptor": {
            +					"version": "1.0.0",
            +					"resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz",
            +					"integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==",
            +					"dev": true,
            +					"requires": {
            +						"kind-of": "^6.0.0"
            +					}
            +				},
            +				"is-data-descriptor": {
            +					"version": "1.0.0",
            +					"resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz",
            +					"integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==",
            +					"dev": true,
            +					"requires": {
            +						"kind-of": "^6.0.0"
            +					}
            +				},
            +				"is-descriptor": {
            +					"version": "1.0.2",
            +					"resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz",
            +					"integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==",
            +					"dev": true,
            +					"requires": {
            +						"is-accessor-descriptor": "^1.0.0",
            +						"is-data-descriptor": "^1.0.0",
            +						"kind-of": "^6.0.2"
            +					}
            +				}
            +			}
            +		},
            +		"basic-auth": {
            +			"version": "1.1.0",
            +			"resolved": "https://registry.npmjs.org/basic-auth/-/basic-auth-1.1.0.tgz",
            +			"integrity": "sha1-RSIe5Cn37h5QNb4/UVM/HN/SmIQ=",
            +			"dev": true
            +		},
            +		"bcrypt-pbkdf": {
            +			"version": "1.0.2",
            +			"resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz",
            +			"integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=",
            +			"dev": true,
            +			"requires": {
            +				"tweetnacl": "^0.14.3"
            +			}
            +		},
            +		"beeper": {
            +			"version": "2.0.0",
            +			"resolved": "https://registry.npmjs.org/beeper/-/beeper-2.0.0.tgz",
            +			"integrity": "sha512-+ShExQEewPvKdTUOtCAJmkUAgEyNF0QqgiAhPRE5xLvoFkIPt8xuHKaz1gMLzSMS73beHWs9gbRBngdH61nVWw==",
            +			"dev": true,
            +			"requires": {
            +				"delay": "^4.1.0"
            +			}
            +		},
            +		"before-after-hook": {
            +			"version": "2.1.0",
            +			"resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.1.0.tgz",
            +			"integrity": "sha512-IWIbu7pMqyw3EAJHzzHbWa85b6oud/yfKYg5rqB5hNE8CeMi3nX+2C2sj0HswfblST86hpVEOAb9x34NZd6P7A==",
            +			"dev": true
            +		},
            +		"benchmark": {
            +			"version": "2.1.4",
            +			"resolved": "https://registry.npmjs.org/benchmark/-/benchmark-2.1.4.tgz",
            +			"integrity": "sha1-CfPeMckWQl1JjMLuVloOvzwqVik=",
            +			"dev": true,
            +			"requires": {
            +				"lodash": "^4.17.4",
            +				"platform": "^1.3.3"
            +			}
            +		},
            +		"binary-extensions": {
            +			"version": "1.13.1",
            +			"resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.13.1.tgz",
            +			"integrity": "sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw==",
            +			"dev": true
            +		},
            +		"binaryextensions": {
            +			"version": "2.1.2",
            +			"resolved": "https://registry.npmjs.org/binaryextensions/-/binaryextensions-2.1.2.tgz",
            +			"integrity": "sha512-xVNN69YGDghOqCCtA6FI7avYrr02mTJjOgB0/f1VPD3pJC8QEvjTKWc4epDx8AqxxA75NI0QpVM2gPJXUbE4Tg==",
            +			"dev": true
            +		},
            +		"bindings": {
            +			"version": "1.5.0",
            +			"resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz",
            +			"integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==",
            +			"dev": true,
            +			"optional": true,
            +			"requires": {
            +				"file-uri-to-path": "1.0.0"
            +			}
            +		},
            +		"bluebird": {
            +			"version": "3.7.2",
            +			"resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz",
            +			"integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==",
            +			"dev": true
            +		},
            +		"brace-expansion": {
            +			"version": "1.1.11",
            +			"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
            +			"integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
            +			"dev": true,
            +			"requires": {
            +				"balanced-match": "^1.0.0",
            +				"concat-map": "0.0.1"
            +			}
            +		},
            +		"braces": {
            +			"version": "2.3.2",
            +			"resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz",
            +			"integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==",
            +			"dev": true,
            +			"requires": {
            +				"arr-flatten": "^1.1.0",
            +				"array-unique": "^0.3.2",
            +				"extend-shallow": "^2.0.1",
            +				"fill-range": "^4.0.0",
            +				"isobject": "^3.0.1",
            +				"repeat-element": "^1.1.2",
            +				"snapdragon": "^0.8.1",
            +				"snapdragon-node": "^2.0.1",
            +				"split-string": "^3.0.2",
            +				"to-regex": "^3.0.1"
            +			},
            +			"dependencies": {
            +				"extend-shallow": {
            +					"version": "2.0.1",
            +					"resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
            +					"integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
            +					"dev": true,
            +					"requires": {
            +						"is-extendable": "^0.1.0"
            +					}
            +				}
            +			}
            +		},
            +		"browser-process-hrtime": {
            +			"version": "0.1.3",
            +			"resolved": "https://registry.npmjs.org/browser-process-hrtime/-/browser-process-hrtime-0.1.3.tgz",
            +			"integrity": "sha512-bRFnI4NnjO6cnyLmOV/7PVoDEMJChlcfN0z4s1YMBY989/SvlfMI1lgCnkFUs53e9gQF+w7qu7XdllSTiSl8Aw==",
            +			"dev": true
            +		},
            +		"browser-stdout": {
            +			"version": "1.3.1",
            +			"resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz",
            +			"integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==",
            +			"dev": true
            +		},
            +		"btoa-lite": {
            +			"version": "1.0.0",
            +			"resolved": "https://registry.npmjs.org/btoa-lite/-/btoa-lite-1.0.0.tgz",
            +			"integrity": "sha1-M3dm2hWAEhD92VbCLpxokaudAzc=",
            +			"dev": true
            +		},
            +		"buffer-equal": {
            +			"version": "1.0.0",
            +			"resolved": "https://registry.npmjs.org/buffer-equal/-/buffer-equal-1.0.0.tgz",
            +			"integrity": "sha1-WWFrSYME1Var1GaWayLu2j7KX74=",
            +			"dev": true
            +		},
            +		"buffer-equal-constant-time": {
            +			"version": "1.0.1",
            +			"resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz",
            +			"integrity": "sha1-+OcRMvf/5uAaXJaXpMbz5I1cyBk=",
            +			"dev": true
            +		},
            +		"buffer-from": {
            +			"version": "1.1.1",
            +			"resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz",
            +			"integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==",
            +			"dev": true
            +		},
            +		"cache-base": {
            +			"version": "1.0.1",
            +			"resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz",
            +			"integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==",
            +			"dev": true,
            +			"requires": {
            +				"collection-visit": "^1.0.0",
            +				"component-emitter": "^1.2.1",
            +				"get-value": "^2.0.6",
            +				"has-value": "^1.0.0",
            +				"isobject": "^3.0.1",
            +				"set-value": "^2.0.0",
            +				"to-object-path": "^0.3.0",
            +				"union-value": "^1.0.0",
            +				"unset-value": "^1.0.0"
            +			}
            +		},
            +		"call-bind": {
            +			"version": "1.0.2",
            +			"resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz",
            +			"integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==",
            +			"dev": true,
            +			"requires": {
            +				"function-bind": "^1.1.1",
            +				"get-intrinsic": "^1.0.2"
            +			}
            +		},
            +		"call-me-maybe": {
            +			"version": "1.0.1",
            +			"resolved": "https://registry.npmjs.org/call-me-maybe/-/call-me-maybe-1.0.1.tgz",
            +			"integrity": "sha1-JtII6onje1y95gJQoV8DHBak1ms=",
            +			"dev": true
            +		},
            +		"caller-callsite": {
            +			"version": "2.0.0",
            +			"resolved": "https://registry.npmjs.org/caller-callsite/-/caller-callsite-2.0.0.tgz",
            +			"integrity": "sha1-hH4PzgoiN1CpoCfFSzNzGtMVQTQ=",
            +			"dev": true,
            +			"requires": {
            +				"callsites": "^2.0.0"
            +			}
            +		},
            +		"caller-path": {
            +			"version": "2.0.0",
            +			"resolved": "https://registry.npmjs.org/caller-path/-/caller-path-2.0.0.tgz",
            +			"integrity": "sha1-Ro+DBE42mrIBD6xfBs7uFbsssfQ=",
            +			"dev": true,
            +			"requires": {
            +				"caller-callsite": "^2.0.0"
            +			}
            +		},
            +		"callsites": {
            +			"version": "2.0.0",
            +			"resolved": "https://registry.npmjs.org/callsites/-/callsites-2.0.0.tgz",
            +			"integrity": "sha1-BuuE8A7qQT2oav/vrL/7Ngk7PFA=",
            +			"dev": true
            +		},
            +		"camelcase": {
            +			"version": "3.0.0",
            +			"resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz",
            +			"integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=",
            +			"dev": true
            +		},
            +		"camelcase-keys": {
            +			"version": "4.2.0",
            +			"resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-4.2.0.tgz",
            +			"integrity": "sha1-oqpfsa9oh1glnDLBQUJteJI7m3c=",
            +			"dev": true,
            +			"requires": {
            +				"camelcase": "^4.1.0",
            +				"map-obj": "^2.0.0",
            +				"quick-lru": "^1.0.0"
            +			},
            +			"dependencies": {
            +				"camelcase": {
            +					"version": "4.1.0",
            +					"resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz",
            +					"integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=",
            +					"dev": true
            +				}
            +			}
            +		},
            +		"caseless": {
            +			"version": "0.12.0",
            +			"resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz",
            +			"integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=",
            +			"dev": true
            +		},
            +		"catharsis": {
            +			"version": "0.8.11",
            +			"resolved": "https://registry.npmjs.org/catharsis/-/catharsis-0.8.11.tgz",
            +			"integrity": "sha512-a+xUyMV7hD1BrDQA/3iPV7oc+6W26BgVJO05PGEoatMyIuPScQKsde6i3YorWX1qs+AZjnJ18NqdKoCtKiNh1g==",
            +			"dev": true,
            +			"requires": {
            +				"lodash": "^4.17.14"
            +			}
            +		},
            +		"chai": {
            +			"version": "4.2.0",
            +			"resolved": "https://registry.npmjs.org/chai/-/chai-4.2.0.tgz",
            +			"integrity": "sha512-XQU3bhBukrOsQCuwZndwGcCVQHyZi53fQ6Ys1Fym7E4olpIqqZZhhoFJoaKVvV17lWQoXYwgWN2nF5crA8J2jw==",
            +			"dev": true,
            +			"requires": {
            +				"assertion-error": "^1.1.0",
            +				"check-error": "^1.0.2",
            +				"deep-eql": "^3.0.1",
            +				"get-func-name": "^2.0.0",
            +				"pathval": "^1.1.0",
            +				"type-detect": "^4.0.5"
            +			}
            +		},
            +		"chalk": {
            +			"version": "2.4.2",
            +			"resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
            +			"integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
            +			"dev": true,
            +			"requires": {
            +				"ansi-styles": "^3.2.1",
            +				"escape-string-regexp": "^1.0.5",
            +				"supports-color": "^5.3.0"
            +			},
            +			"dependencies": {
            +				"supports-color": {
            +					"version": "5.5.0",
            +					"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
            +					"integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
            +					"dev": true,
            +					"requires": {
            +						"has-flag": "^3.0.0"
            +					}
            +				}
            +			}
            +		},
            +		"check-error": {
            +			"version": "1.0.2",
            +			"resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz",
            +			"integrity": "sha1-V00xLt2Iu13YkS6Sht1sCu1KrII=",
            +			"dev": true
            +		},
            +		"chokidar": {
            +			"version": "2.1.8",
            +			"resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.1.8.tgz",
            +			"integrity": "sha512-ZmZUazfOzf0Nve7duiCKD23PFSCs4JPoYyccjUFF3aQkQadqBhfzhjkwBH2mNOG9cTBwhamM37EIsIkZw3nRgg==",
            +			"dev": true,
            +			"requires": {
            +				"anymatch": "^2.0.0",
            +				"async-each": "^1.0.1",
            +				"braces": "^2.3.2",
            +				"fsevents": "^1.2.7",
            +				"glob-parent": "^3.1.0",
            +				"inherits": "^2.0.3",
            +				"is-binary-path": "^1.0.0",
            +				"is-glob": "^4.0.0",
            +				"normalize-path": "^3.0.0",
            +				"path-is-absolute": "^1.0.0",
            +				"readdirp": "^2.2.1",
            +				"upath": "^1.1.1"
            +			},
            +			"dependencies": {
            +				"normalize-path": {
            +					"version": "3.0.0",
            +					"resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz",
            +					"integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==",
            +					"dev": true
            +				}
            +			}
            +		},
            +		"class-utils": {
            +			"version": "0.3.6",
            +			"resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz",
            +			"integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==",
            +			"dev": true,
            +			"requires": {
            +				"arr-union": "^3.1.0",
            +				"define-property": "^0.2.5",
            +				"isobject": "^3.0.0",
            +				"static-extend": "^0.1.1"
            +			},
            +			"dependencies": {
            +				"define-property": {
            +					"version": "0.2.5",
            +					"resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz",
            +					"integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=",
            +					"dev": true,
            +					"requires": {
            +						"is-descriptor": "^0.1.0"
            +					}
            +				}
            +			}
            +		},
            +		"cliui": {
            +			"version": "3.2.0",
            +			"resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz",
            +			"integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=",
            +			"dev": true,
            +			"requires": {
            +				"string-width": "^1.0.1",
            +				"strip-ansi": "^3.0.1",
            +				"wrap-ansi": "^2.0.0"
            +			}
            +		},
            +		"clone": {
            +			"version": "2.1.2",
            +			"resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz",
            +			"integrity": "sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18=",
            +			"dev": true
            +		},
            +		"clone-buffer": {
            +			"version": "1.0.0",
            +			"resolved": "https://registry.npmjs.org/clone-buffer/-/clone-buffer-1.0.0.tgz",
            +			"integrity": "sha1-4+JbIHrE5wGvch4staFnksrD3Fg=",
            +			"dev": true
            +		},
            +		"clone-stats": {
            +			"version": "1.0.0",
            +			"resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-1.0.0.tgz",
            +			"integrity": "sha1-s3gt/4u1R04Yuba/D9/ngvh3doA=",
            +			"dev": true
            +		},
            +		"cloneable-readable": {
            +			"version": "1.1.2",
            +			"resolved": "https://registry.npmjs.org/cloneable-readable/-/cloneable-readable-1.1.2.tgz",
            +			"integrity": "sha512-Bq6+4t+lbM8vhTs/Bef5c5AdEMtapp/iFb6+s4/Hh9MVTt8OLKH7ZOOZSCT+Ys7hsHvqv0GuMPJ1lnQJVHvxpg==",
            +			"dev": true,
            +			"requires": {
            +				"inherits": "^2.0.1",
            +				"process-nextick-args": "^2.0.0",
            +				"readable-stream": "^2.3.5"
            +			},
            +			"dependencies": {
            +				"process-nextick-args": {
            +					"version": "2.0.0",
            +					"resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz",
            +					"integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==",
            +					"dev": true
            +				}
            +			}
            +		},
            +		"code-point-at": {
            +			"version": "1.1.0",
            +			"resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz",
            +			"integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=",
            +			"dev": true
            +		},
            +		"collection-map": {
            +			"version": "1.0.0",
            +			"resolved": "https://registry.npmjs.org/collection-map/-/collection-map-1.0.0.tgz",
            +			"integrity": "sha1-rqDwb40mx4DCt1SUOFVEsiVa8Yw=",
            +			"dev": true,
            +			"requires": {
            +				"arr-map": "^2.0.2",
            +				"for-own": "^1.0.0",
            +				"make-iterator": "^1.0.0"
            +			}
            +		},
            +		"collection-visit": {
            +			"version": "1.0.0",
            +			"resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz",
            +			"integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=",
            +			"dev": true,
            +			"requires": {
            +				"map-visit": "^1.0.0",
            +				"object-visit": "^1.0.0"
            +			}
            +		},
            +		"color-convert": {
            +			"version": "1.9.3",
            +			"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
            +			"integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
            +			"dev": true,
            +			"requires": {
            +				"color-name": "1.1.3"
            +			}
            +		},
            +		"color-name": {
            +			"version": "1.1.3",
            +			"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
            +			"integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=",
            +			"dev": true
            +		},
            +		"color-support": {
            +			"version": "1.1.3",
            +			"resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz",
            +			"integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==",
            +			"dev": true
            +		},
            +		"colors": {
            +			"version": "1.4.0",
            +			"resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz",
            +			"integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==",
            +			"dev": true
            +		},
            +		"combined-stream": {
            +			"version": "1.0.7",
            +			"resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.7.tgz",
            +			"integrity": "sha512-brWl9y6vOB1xYPZcpZde3N9zDByXTosAeMDo4p1wzo6UMOX4vumB+TP1RZ76sfE6Md68Q0NJSrE/gbezd4Ul+w==",
            +			"dev": true,
            +			"requires": {
            +				"delayed-stream": "~1.0.0"
            +			}
            +		},
            +		"commander": {
            +			"version": "2.19.0",
            +			"resolved": "https://registry.npmjs.org/commander/-/commander-2.19.0.tgz",
            +			"integrity": "sha512-6tvAOO+D6OENvRAh524Dh9jcfKTYDQAqvqezbCW82xj5X0pSrcpxtvRKHLG0yBY6SD7PSDrJaj+0AiOcKVd1Xg==",
            +			"dev": true
            +		},
            +		"comment-parser": {
            +			"version": "1.1.2",
            +			"resolved": "https://registry.npmjs.org/comment-parser/-/comment-parser-1.1.2.tgz",
            +			"integrity": "sha512-AOdq0i8ghZudnYv8RUnHrhTgafUGs61Rdz9jemU5x2lnZwAWyOq7vySo626K59e1fVKH1xSRorJwPVRLSWOoAQ==",
            +			"dev": true
            +		},
            +		"component-emitter": {
            +			"version": "1.3.0",
            +			"resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz",
            +			"integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==",
            +			"dev": true
            +		},
            +		"concat-map": {
            +			"version": "0.0.1",
            +			"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
            +			"integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=",
            +			"dev": true
            +		},
            +		"concat-stream": {
            +			"version": "1.6.2",
            +			"resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz",
            +			"integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==",
            +			"dev": true,
            +			"requires": {
            +				"buffer-from": "^1.0.0",
            +				"inherits": "^2.0.3",
            +				"readable-stream": "^2.2.2",
            +				"typedarray": "^0.0.6"
            +			}
            +		},
            +		"concat-with-sourcemaps": {
            +			"version": "1.1.0",
            +			"resolved": "https://registry.npmjs.org/concat-with-sourcemaps/-/concat-with-sourcemaps-1.1.0.tgz",
            +			"integrity": "sha512-4gEjHJFT9e+2W/77h/DS5SGUgwDaOwprX8L/gl5+3ixnzkVJJsZWDSelmN3Oilw3LNDZjZV0yqH1hLG3k6nghg==",
            +			"dev": true,
            +			"requires": {
            +				"source-map": "^0.6.1"
            +			},
            +			"dependencies": {
            +				"source-map": {
            +					"version": "0.6.1",
            +					"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
            +					"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
            +					"dev": true
            +				}
            +			}
            +		},
            +		"convert-source-map": {
            +			"version": "1.7.0",
            +			"resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.7.0.tgz",
            +			"integrity": "sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA==",
            +			"dev": true,
            +			"requires": {
            +				"safe-buffer": "~5.1.1"
            +			}
            +		},
            +		"copy-descriptor": {
            +			"version": "0.1.1",
            +			"resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz",
            +			"integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=",
            +			"dev": true
            +		},
            +		"copy-props": {
            +			"version": "2.0.4",
            +			"resolved": "https://registry.npmjs.org/copy-props/-/copy-props-2.0.4.tgz",
            +			"integrity": "sha512-7cjuUME+p+S3HZlbllgsn2CDwS+5eCCX16qBgNC4jgSTf49qR1VKy/Zhl400m0IQXl/bPGEVqncgUUMjrr4s8A==",
            +			"dev": true,
            +			"requires": {
            +				"each-props": "^1.3.0",
            +				"is-plain-object": "^2.0.1"
            +			}
            +		},
            +		"core-js": {
            +			"version": "2.6.11",
            +			"resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.11.tgz",
            +			"integrity": "sha512-5wjnpaT/3dV+XB4borEsnAYQchn00XSgTAWKDkEqv+K8KevjbzmofK6hfJ9TZIlpj2N0xQpazy7PiRQiWHqzWg==",
            +			"dev": true
            +		},
            +		"core-util-is": {
            +			"version": "1.0.2",
            +			"resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
            +			"integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=",
            +			"dev": true
            +		},
            +		"corser": {
            +			"version": "2.0.1",
            +			"resolved": "https://registry.npmjs.org/corser/-/corser-2.0.1.tgz",
            +			"integrity": "sha1-jtolLsqrWEDc2XXOuQ2TcMgZ/4c=",
            +			"dev": true
            +		},
            +		"cosmiconfig": {
            +			"version": "5.2.1",
            +			"resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-5.2.1.tgz",
            +			"integrity": "sha512-H65gsXo1SKjf8zmrJ67eJk8aIRKV5ff2D4uKZIBZShbhGSpEmsQOPW/SKMKYhSTrqR7ufy6RP69rPogdaPh/kA==",
            +			"dev": true,
            +			"requires": {
            +				"import-fresh": "^2.0.0",
            +				"is-directory": "^0.3.1",
            +				"js-yaml": "^3.13.1",
            +				"parse-json": "^4.0.0"
            +			},
            +			"dependencies": {
            +				"parse-json": {
            +					"version": "4.0.0",
            +					"resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz",
            +					"integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=",
            +					"dev": true,
            +					"requires": {
            +						"error-ex": "^1.3.1",
            +						"json-parse-better-errors": "^1.0.1"
            +					}
            +				}
            +			}
            +		},
            +		"cross-spawn": {
            +			"version": "6.0.5",
            +			"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz",
            +			"integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==",
            +			"dev": true,
            +			"requires": {
            +				"nice-try": "^1.0.4",
            +				"path-key": "^2.0.1",
            +				"semver": "^5.5.0",
            +				"shebang-command": "^1.2.0",
            +				"which": "^1.2.9"
            +			}
            +		},
            +		"cssom": {
            +			"version": "0.3.6",
            +			"resolved": "https://registry.npmjs.org/cssom/-/cssom-0.3.6.tgz",
            +			"integrity": "sha512-DtUeseGk9/GBW0hl0vVPpU22iHL6YB5BUX7ml1hB+GMpo0NX5G4voX3kdWiMSEguFtcW3Vh3djqNF4aIe6ne0A==",
            +			"dev": true
            +		},
            +		"cssstyle": {
            +			"version": "1.2.1",
            +			"resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-1.2.1.tgz",
            +			"integrity": "sha512-7DYm8qe+gPx/h77QlCyFmX80+fGaE/6A/Ekl0zaszYOubvySO2saYFdQ78P29D0UsULxFKCetDGNaNRUdSF+2A==",
            +			"dev": true,
            +			"requires": {
            +				"cssom": "0.3.x"
            +			}
            +		},
            +		"cubic2quad": {
            +			"version": "1.1.1",
            +			"resolved": "https://registry.npmjs.org/cubic2quad/-/cubic2quad-1.1.1.tgz",
            +			"integrity": "sha1-abGcYaP1tB7PLx1fro+wNBWqixU=",
            +			"dev": true
            +		},
            +		"currently-unhandled": {
            +			"version": "0.4.1",
            +			"resolved": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz",
            +			"integrity": "sha1-mI3zP+qxke95mmE2nddsF635V+o=",
            +			"dev": true,
            +			"requires": {
            +				"array-find-index": "^1.0.1"
            +			}
            +		},
            +		"d": {
            +			"version": "1.0.1",
            +			"resolved": "https://registry.npmjs.org/d/-/d-1.0.1.tgz",
            +			"integrity": "sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==",
            +			"dev": true,
            +			"requires": {
            +				"es5-ext": "^0.10.50",
            +				"type": "^1.0.1"
            +			}
            +		},
            +		"danger": {
            +			"version": "10.5.0",
            +			"resolved": "https://registry.npmjs.org/danger/-/danger-10.5.0.tgz",
            +			"integrity": "sha512-KUqwc8WFmW4JqPpgG4cssOZQE1aYRj/If/ZX+XNOsMRhxJH5cY9ij6VQH7C/pP64UGqmMNNV6jSsbxOOAWMy4w==",
            +			"dev": true,
            +			"requires": {
            +				"@babel/polyfill": "^7.2.5",
            +				"@octokit/rest": "^16.43.1",
            +				"async-retry": "1.2.3",
            +				"chalk": "^2.3.0",
            +				"commander": "^2.18.0",
            +				"debug": "^4.1.1",
            +				"fast-json-patch": "^3.0.0-1",
            +				"get-stdin": "^6.0.0",
            +				"gitlab": "^10.0.1",
            +				"http-proxy-agent": "^2.1.0",
            +				"https-proxy-agent": "^2.2.1",
            +				"hyperlinker": "^1.0.0",
            +				"json5": "^2.1.0",
            +				"jsonpointer": "^4.0.1",
            +				"jsonwebtoken": "^8.4.0",
            +				"lodash.find": "^4.6.0",
            +				"lodash.includes": "^4.3.0",
            +				"lodash.isobject": "^3.0.2",
            +				"lodash.keys": "^4.0.8",
            +				"lodash.mapvalues": "^4.6.0",
            +				"lodash.memoize": "^4.1.2",
            +				"memfs-or-file-map-to-github-branch": "^1.1.0",
            +				"micromatch": "^3.1.10",
            +				"node-cleanup": "^2.1.2",
            +				"node-fetch": "2.6.1",
            +				"override-require": "^1.1.1",
            +				"p-limit": "^2.1.0",
            +				"parse-diff": "^0.7.0",
            +				"parse-git-config": "^2.0.3",
            +				"parse-github-url": "^1.0.2",
            +				"parse-link-header": "^1.0.1",
            +				"pinpoint": "^1.1.0",
            +				"prettyjson": "^1.2.1",
            +				"readline-sync": "^1.4.9",
            +				"require-from-string": "^2.0.2",
            +				"supports-hyperlinks": "^1.0.1"
            +			},
            +			"dependencies": {
            +				"debug": {
            +					"version": "4.2.0",
            +					"resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz",
            +					"integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==",
            +					"dev": true,
            +					"requires": {
            +						"ms": "2.1.2"
            +					}
            +				},
            +				"ms": {
            +					"version": "2.1.2",
            +					"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
            +					"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
            +					"dev": true
            +				}
            +			}
            +		},
            +		"dashdash": {
            +			"version": "1.14.1",
            +			"resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz",
            +			"integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=",
            +			"dev": true,
            +			"requires": {
            +				"assert-plus": "^1.0.0"
            +			}
            +		},
            +		"data-urls": {
            +			"version": "1.1.0",
            +			"resolved": "https://registry.npmjs.org/data-urls/-/data-urls-1.1.0.tgz",
            +			"integrity": "sha512-YTWYI9se1P55u58gL5GkQHW4P6VJBJ5iBT+B5a7i2Tjadhv52paJG0qHX4A0OR6/t52odI64KP2YvFpkDOi3eQ==",
            +			"dev": true,
            +			"requires": {
            +				"abab": "^2.0.0",
            +				"whatwg-mimetype": "^2.2.0",
            +				"whatwg-url": "^7.0.0"
            +			}
            +		},
            +		"debug": {
            +			"version": "2.6.9",
            +			"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
            +			"integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
            +			"dev": true,
            +			"requires": {
            +				"ms": "2.0.0"
            +			}
            +		},
            +		"decamelize": {
            +			"version": "1.2.0",
            +			"resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz",
            +			"integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=",
            +			"dev": true
            +		},
            +		"decamelize-keys": {
            +			"version": "1.1.0",
            +			"resolved": "https://registry.npmjs.org/decamelize-keys/-/decamelize-keys-1.1.0.tgz",
            +			"integrity": "sha1-0XGoeTMlKAfrPLYdwcFEXQeN8tk=",
            +			"dev": true,
            +			"requires": {
            +				"decamelize": "^1.1.0",
            +				"map-obj": "^1.0.0"
            +			},
            +			"dependencies": {
            +				"map-obj": {
            +					"version": "1.0.1",
            +					"resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz",
            +					"integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=",
            +					"dev": true
            +				}
            +			}
            +		},
            +		"decode-uri-component": {
            +			"version": "0.2.0",
            +			"resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz",
            +			"integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=",
            +			"dev": true
            +		},
            +		"deep-eql": {
            +			"version": "3.0.1",
            +			"resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-3.0.1.tgz",
            +			"integrity": "sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw==",
            +			"dev": true,
            +			"requires": {
            +				"type-detect": "^4.0.0"
            +			}
            +		},
            +		"deep-is": {
            +			"version": "0.1.3",
            +			"resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz",
            +			"integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=",
            +			"dev": true
            +		},
            +		"deepmerge": {
            +			"version": "3.3.0",
            +			"resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-3.3.0.tgz",
            +			"integrity": "sha512-GRQOafGHwMHpjPx9iCvTgpu9NojZ49q794EEL94JVEw6VaeA8XTUyBKvAkOOjBX9oJNiV6G3P+T+tihFjo2TqA==",
            +			"dev": true
            +		},
            +		"default-compare": {
            +			"version": "1.0.0",
            +			"resolved": "https://registry.npmjs.org/default-compare/-/default-compare-1.0.0.tgz",
            +			"integrity": "sha512-QWfXlM0EkAbqOCbD/6HjdwT19j7WCkMyiRhWilc4H9/5h/RzTF9gv5LYh1+CmDV5d1rki6KAWLtQale0xt20eQ==",
            +			"dev": true,
            +			"requires": {
            +				"kind-of": "^5.0.2"
            +			},
            +			"dependencies": {
            +				"kind-of": {
            +					"version": "5.1.0",
            +					"resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz",
            +					"integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==",
            +					"dev": true
            +				}
            +			}
            +		},
            +		"default-resolution": {
            +			"version": "2.0.0",
            +			"resolved": "https://registry.npmjs.org/default-resolution/-/default-resolution-2.0.0.tgz",
            +			"integrity": "sha1-vLgrqnKtebQmp2cy8aga1t8m1oQ=",
            +			"dev": true
            +		},
            +		"define-properties": {
            +			"version": "1.1.3",
            +			"resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz",
            +			"integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==",
            +			"dev": true,
            +			"requires": {
            +				"object-keys": "^1.0.12"
            +			}
            +		},
            +		"define-property": {
            +			"version": "2.0.2",
            +			"resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz",
            +			"integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==",
            +			"dev": true,
            +			"requires": {
            +				"is-descriptor": "^1.0.2",
            +				"isobject": "^3.0.1"
            +			},
            +			"dependencies": {
            +				"is-accessor-descriptor": {
            +					"version": "1.0.0",
            +					"resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz",
            +					"integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==",
            +					"dev": true,
            +					"requires": {
            +						"kind-of": "^6.0.0"
            +					}
            +				},
            +				"is-data-descriptor": {
            +					"version": "1.0.0",
            +					"resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz",
            +					"integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==",
            +					"dev": true,
            +					"requires": {
            +						"kind-of": "^6.0.0"
            +					}
            +				},
            +				"is-descriptor": {
            +					"version": "1.0.2",
            +					"resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz",
            +					"integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==",
            +					"dev": true,
            +					"requires": {
            +						"is-accessor-descriptor": "^1.0.0",
            +						"is-data-descriptor": "^1.0.0",
            +						"kind-of": "^6.0.2"
            +					}
            +				}
            +			}
            +		},
            +		"del": {
            +			"version": "4.1.1",
            +			"resolved": "https://registry.npmjs.org/del/-/del-4.1.1.tgz",
            +			"integrity": "sha512-QwGuEUouP2kVwQenAsOof5Fv8K9t3D8Ca8NxcXKrIpEHjTXK5J2nXLdP+ALI1cgv8wj7KuwBhTwBkOZSJKM5XQ==",
            +			"dev": true,
            +			"requires": {
            +				"@types/glob": "^7.1.1",
            +				"globby": "^6.1.0",
            +				"is-path-cwd": "^2.0.0",
            +				"is-path-in-cwd": "^2.0.0",
            +				"p-map": "^2.0.0",
            +				"pify": "^4.0.1",
            +				"rimraf": "^2.6.3"
            +			},
            +			"dependencies": {
            +				"pify": {
            +					"version": "4.0.1",
            +					"resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz",
            +					"integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==",
            +					"dev": true
            +				}
            +			}
            +		},
            +		"delay": {
            +			"version": "4.3.0",
            +			"resolved": "https://registry.npmjs.org/delay/-/delay-4.3.0.tgz",
            +			"integrity": "sha512-Lwaf3zVFDMBop1yDuFZ19F9WyGcZcGacsbdlZtWjQmM50tOcMntm1njF/Nb/Vjij3KaSvCF+sEYGKrrjObu2NA==",
            +			"dev": true
            +		},
            +		"delayed-stream": {
            +			"version": "1.0.0",
            +			"resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
            +			"integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=",
            +			"dev": true
            +		},
            +		"deprecation": {
            +			"version": "2.3.1",
            +			"resolved": "https://registry.npmjs.org/deprecation/-/deprecation-2.3.1.tgz",
            +			"integrity": "sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ==",
            +			"dev": true
            +		},
            +		"detect-file": {
            +			"version": "1.0.0",
            +			"resolved": "https://registry.npmjs.org/detect-file/-/detect-file-1.0.0.tgz",
            +			"integrity": "sha1-8NZtA2cqglyxtzvbP+YjEMjlUrc=",
            +			"dev": true
            +		},
            +		"diff": {
            +			"version": "3.5.0",
            +			"resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz",
            +			"integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==",
            +			"dev": true
            +		},
            +		"dir-glob": {
            +			"version": "2.2.2",
            +			"resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-2.2.2.tgz",
            +			"integrity": "sha512-f9LBi5QWzIW3I6e//uxZoLBlUt9kcp66qo0sSCxL6YZKc75R1c4MFCoe/LaZiBGmgujvQdxc5Bn3QhfyvK5Hsw==",
            +			"dev": true,
            +			"requires": {
            +				"path-type": "^3.0.0"
            +			},
            +			"dependencies": {
            +				"path-type": {
            +					"version": "3.0.0",
            +					"resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz",
            +					"integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==",
            +					"dev": true,
            +					"requires": {
            +						"pify": "^3.0.0"
            +					}
            +				},
            +				"pify": {
            +					"version": "3.0.0",
            +					"resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz",
            +					"integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=",
            +					"dev": true
            +				}
            +			}
            +		},
            +		"docdash": {
            +			"version": "1.2.0",
            +			"resolved": "https://registry.npmjs.org/docdash/-/docdash-1.2.0.tgz",
            +			"integrity": "sha512-IYZbgYthPTspgqYeciRJNPhSwL51yer7HAwDXhF5p+H7mTDbPvY3PCk/QDjNxdPCpWkaJVFC4t7iCNB/t9E5Kw==",
            +			"dev": true
            +		},
            +		"doctrine": {
            +			"version": "3.0.0",
            +			"resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz",
            +			"integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==",
            +			"dev": true,
            +			"requires": {
            +				"esutils": "^2.0.2"
            +			}
            +		},
            +		"dom-serializer": {
            +			"version": "0.2.2",
            +			"resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.2.2.tgz",
            +			"integrity": "sha512-2/xPb3ORsQ42nHYiSunXkDjPLBaEj/xTwUO4B7XCZQTRk7EBtTOPaygh10YAAh2OI1Qrp6NWfpAhzswj0ydt9g==",
            +			"dev": true,
            +			"requires": {
            +				"domelementtype": "^2.0.1",
            +				"entities": "^2.0.0"
            +			}
            +		},
            +		"domelementtype": {
            +			"version": "2.0.1",
            +			"resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.0.1.tgz",
            +			"integrity": "sha512-5HOHUDsYZWV8FGWN0Njbr/Rn7f/eWSQi1v7+HsUVwXgn8nWWlL64zKDkS0n8ZmQ3mlWOMuXOnR+7Nx/5tMO5AQ==",
            +			"dev": true
            +		},
            +		"domexception": {
            +			"version": "1.0.1",
            +			"resolved": "https://registry.npmjs.org/domexception/-/domexception-1.0.1.tgz",
            +			"integrity": "sha512-raigMkn7CJNNo6Ihro1fzG7wr3fHuYVytzquZKX5n0yizGsTcYgzdIUwj1X9pK0VvjeihV+XiclP+DjwbsSKug==",
            +			"dev": true,
            +			"requires": {
            +				"webidl-conversions": "^4.0.2"
            +			}
            +		},
            +		"domhandler": {
            +			"version": "3.0.0",
            +			"resolved": "https://registry.npmjs.org/domhandler/-/domhandler-3.0.0.tgz",
            +			"integrity": "sha512-eKLdI5v9m67kbXQbJSNn1zjh0SDzvzWVWtX+qEI3eMjZw8daH9k8rlj1FZY9memPwjiskQFbe7vHVVJIAqoEhw==",
            +			"dev": true,
            +			"requires": {
            +				"domelementtype": "^2.0.1"
            +			}
            +		},
            +		"domutils": {
            +			"version": "2.0.0",
            +			"resolved": "https://registry.npmjs.org/domutils/-/domutils-2.0.0.tgz",
            +			"integrity": "sha512-n5SelJ1axbO636c2yUtOGia/IcJtVtlhQbFiVDBZHKV5ReJO1ViX7sFEemtuyoAnBxk5meNSYgA8V4s0271efg==",
            +			"dev": true,
            +			"requires": {
            +				"dom-serializer": "^0.2.1",
            +				"domelementtype": "^2.0.1",
            +				"domhandler": "^3.0.0"
            +			}
            +		},
            +		"duplexer": {
            +			"version": "0.1.2",
            +			"resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.2.tgz",
            +			"integrity": "sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==",
            +			"dev": true
            +		},
            +		"duplexify": {
            +			"version": "3.7.1",
            +			"resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.7.1.tgz",
            +			"integrity": "sha512-07z8uv2wMyS51kKhD1KsdXJg5WQ6t93RneqRxUHnskXVtlYYkLqM0gqStQZ3pj073g687jPCHrqNfCzawLYh5g==",
            +			"dev": true,
            +			"requires": {
            +				"end-of-stream": "^1.0.0",
            +				"inherits": "^2.0.1",
            +				"readable-stream": "^2.0.0",
            +				"stream-shift": "^1.0.0"
            +			}
            +		},
            +		"each-props": {
            +			"version": "1.3.2",
            +			"resolved": "https://registry.npmjs.org/each-props/-/each-props-1.3.2.tgz",
            +			"integrity": "sha512-vV0Hem3zAGkJAyU7JSjixeU66rwdynTAa1vofCrSA5fEln+m67Az9CcnkVD776/fsN/UjIWmBDoNRS6t6G9RfA==",
            +			"dev": true,
            +			"requires": {
            +				"is-plain-object": "^2.0.1",
            +				"object.defaults": "^1.1.0"
            +			}
            +		},
            +		"ecc-jsbn": {
            +			"version": "0.1.2",
            +			"resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz",
            +			"integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=",
            +			"dev": true,
            +			"requires": {
            +				"jsbn": "~0.1.0",
            +				"safer-buffer": "^2.1.0"
            +			}
            +		},
            +		"ecdsa-sig-formatter": {
            +			"version": "1.0.11",
            +			"resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz",
            +			"integrity": "sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==",
            +			"dev": true,
            +			"requires": {
            +				"safe-buffer": "^5.0.1"
            +			}
            +		},
            +		"ecstatic": {
            +			"version": "3.3.2",
            +			"resolved": "https://registry.npmjs.org/ecstatic/-/ecstatic-3.3.2.tgz",
            +			"integrity": "sha512-fLf9l1hnwrHI2xn9mEDT7KIi22UDqA2jaCwyCbSUJh9a1V+LEUSL/JO/6TIz/QyuBURWUHrFL5Kg2TtO1bkkog==",
            +			"dev": true,
            +			"requires": {
            +				"he": "^1.1.1",
            +				"mime": "^1.6.0",
            +				"minimist": "^1.1.0",
            +				"url-join": "^2.0.5"
            +			},
            +			"dependencies": {
            +				"minimist": {
            +					"version": "1.2.5",
            +					"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
            +					"integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==",
            +					"dev": true
            +				}
            +			}
            +		},
            +		"editions": {
            +			"version": "1.3.4",
            +			"resolved": "https://registry.npmjs.org/editions/-/editions-1.3.4.tgz",
            +			"integrity": "sha512-gzao+mxnYDzIysXKMQi/+M1mjy/rjestjg6OPoYTtI+3Izp23oiGZitsl9lPDPiTGXbcSIk1iJWhliSaglxnUg==",
            +			"dev": true
            +		},
            +		"emoji-regex": {
            +			"version": "7.0.3",
            +			"resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz",
            +			"integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==",
            +			"dev": true
            +		},
            +		"end-of-stream": {
            +			"version": "1.4.1",
            +			"resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz",
            +			"integrity": "sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q==",
            +			"dev": true,
            +			"requires": {
            +				"once": "^1.4.0"
            +			}
            +		},
            +		"enquirer": {
            +			"version": "2.3.6",
            +			"resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz",
            +			"integrity": "sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==",
            +			"dev": true,
            +			"requires": {
            +				"ansi-colors": "^4.1.1"
            +			},
            +			"dependencies": {
            +				"ansi-colors": {
            +					"version": "4.1.1",
            +					"resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz",
            +					"integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==",
            +					"dev": true
            +				}
            +			}
            +		},
            +		"entities": {
            +			"version": "2.0.0",
            +			"resolved": "https://registry.npmjs.org/entities/-/entities-2.0.0.tgz",
            +			"integrity": "sha512-D9f7V0JSRwIxlRI2mjMqufDrRDnx8p+eEOz7aUM9SuvF8gsBzra0/6tbjl1m8eQHrZlYj6PxqE00hZ1SAIKPLw==",
            +			"dev": true
            +		},
            +		"error-ex": {
            +			"version": "1.3.2",
            +			"resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz",
            +			"integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==",
            +			"dev": true,
            +			"requires": {
            +				"is-arrayish": "^0.2.1"
            +			}
            +		},
            +		"es-abstract": {
            +			"version": "1.13.0",
            +			"resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.13.0.tgz",
            +			"integrity": "sha512-vDZfg/ykNxQVwup/8E1BZhVzFfBxs9NqMzGcvIJrqg5k2/5Za2bWo40dK2J1pgLngZ7c+Shh8lwYtLGyrwPutg==",
            +			"dev": true,
            +			"requires": {
            +				"es-to-primitive": "^1.2.0",
            +				"function-bind": "^1.1.1",
            +				"has": "^1.0.3",
            +				"is-callable": "^1.1.4",
            +				"is-regex": "^1.0.4",
            +				"object-keys": "^1.0.12"
            +			}
            +		},
            +		"es-to-primitive": {
            +			"version": "1.2.0",
            +			"resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.0.tgz",
            +			"integrity": "sha512-qZryBOJjV//LaxLTV6UC//WewneB3LcXOL9NP++ozKVXsIIIpm/2c13UDiD9Jp2eThsecw9m3jPqDwTyobcdbg==",
            +			"dev": true,
            +			"requires": {
            +				"is-callable": "^1.1.4",
            +				"is-date-object": "^1.0.1",
            +				"is-symbol": "^1.0.2"
            +			}
            +		},
            +		"es5-ext": {
            +			"version": "0.10.53",
            +			"resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.53.tgz",
            +			"integrity": "sha512-Xs2Stw6NiNHWypzRTY1MtaG/uJlwCk8kH81920ma8mvN8Xq1gsfhZvpkImLQArw8AHnv8MT2I45J3c0R8slE+Q==",
            +			"dev": true,
            +			"requires": {
            +				"es6-iterator": "~2.0.3",
            +				"es6-symbol": "~3.1.3",
            +				"next-tick": "~1.0.0"
            +			}
            +		},
            +		"es6-iterator": {
            +			"version": "2.0.3",
            +			"resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz",
            +			"integrity": "sha1-p96IkUGgWpSwhUQDstCg+/qY87c=",
            +			"dev": true,
            +			"requires": {
            +				"d": "1",
            +				"es5-ext": "^0.10.35",
            +				"es6-symbol": "^3.1.1"
            +			}
            +		},
            +		"es6-promise": {
            +			"version": "4.2.8",
            +			"resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.8.tgz",
            +			"integrity": "sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==",
            +			"dev": true
            +		},
            +		"es6-promisify": {
            +			"version": "5.0.0",
            +			"resolved": "https://registry.npmjs.org/es6-promisify/-/es6-promisify-5.0.0.tgz",
            +			"integrity": "sha1-UQnWLz5W6pZ8S2NQWu8IKRyKUgM=",
            +			"dev": true,
            +			"requires": {
            +				"es6-promise": "^4.0.3"
            +			}
            +		},
            +		"es6-symbol": {
            +			"version": "3.1.3",
            +			"resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.3.tgz",
            +			"integrity": "sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA==",
            +			"dev": true,
            +			"requires": {
            +				"d": "^1.0.1",
            +				"ext": "^1.1.2"
            +			}
            +		},
            +		"es6-weak-map": {
            +			"version": "2.0.3",
            +			"resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.3.tgz",
            +			"integrity": "sha512-p5um32HOTO1kP+w7PRnB+5lQ43Z6muuMuIMffvDN8ZB4GcnjLBV6zGStpbASIMk4DCAvEaamhe2zhyCb/QXXsA==",
            +			"dev": true,
            +			"requires": {
            +				"d": "1",
            +				"es5-ext": "^0.10.46",
            +				"es6-iterator": "^2.0.3",
            +				"es6-symbol": "^3.1.1"
            +			}
            +		},
            +		"escape-string-regexp": {
            +			"version": "1.0.5",
            +			"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
            +			"integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=",
            +			"dev": true
            +		},
            +		"escodegen": {
            +			"version": "1.11.1",
            +			"resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.11.1.tgz",
            +			"integrity": "sha512-JwiqFD9KdGVVpeuRa68yU3zZnBEOcPs0nKW7wZzXky8Z7tffdYUHbe11bPCV5jYlK6DVdKLWLm0f5I/QlL0Kmw==",
            +			"dev": true,
            +			"requires": {
            +				"esprima": "^3.1.3",
            +				"estraverse": "^4.2.0",
            +				"esutils": "^2.0.2",
            +				"optionator": "^0.8.1",
            +				"source-map": "~0.6.1"
            +			},
            +			"dependencies": {
            +				"source-map": {
            +					"version": "0.6.1",
            +					"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
            +					"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
            +					"dev": true,
            +					"optional": true
            +				}
            +			}
            +		},
            +		"eslint": {
            +			"version": "7.22.0",
            +			"resolved": "https://registry.npmjs.org/eslint/-/eslint-7.22.0.tgz",
            +			"integrity": "sha512-3VawOtjSJUQiiqac8MQc+w457iGLfuNGLFn8JmF051tTKbh5/x/0vlcEj8OgDCaw7Ysa2Jn8paGshV7x2abKXg==",
            +			"dev": true,
            +			"requires": {
            +				"@babel/code-frame": "7.12.11",
            +				"@eslint/eslintrc": "^0.4.0",
            +				"ajv": "^6.10.0",
            +				"chalk": "^4.0.0",
            +				"cross-spawn": "^7.0.2",
            +				"debug": "^4.0.1",
            +				"doctrine": "^3.0.0",
            +				"enquirer": "^2.3.5",
            +				"eslint-scope": "^5.1.1",
            +				"eslint-utils": "^2.1.0",
            +				"eslint-visitor-keys": "^2.0.0",
            +				"espree": "^7.3.1",
            +				"esquery": "^1.4.0",
            +				"esutils": "^2.0.2",
            +				"file-entry-cache": "^6.0.1",
            +				"functional-red-black-tree": "^1.0.1",
            +				"glob-parent": "^5.0.0",
            +				"globals": "^13.6.0",
            +				"ignore": "^4.0.6",
            +				"import-fresh": "^3.0.0",
            +				"imurmurhash": "^0.1.4",
            +				"is-glob": "^4.0.0",
            +				"js-yaml": "^3.13.1",
            +				"json-stable-stringify-without-jsonify": "^1.0.1",
            +				"levn": "^0.4.1",
            +				"lodash": "^4.17.21",
            +				"minimatch": "^3.0.4",
            +				"natural-compare": "^1.4.0",
            +				"optionator": "^0.9.1",
            +				"progress": "^2.0.0",
            +				"regexpp": "^3.1.0",
            +				"semver": "^7.2.1",
            +				"strip-ansi": "^6.0.0",
            +				"strip-json-comments": "^3.1.0",
            +				"table": "^6.0.4",
            +				"text-table": "^0.2.0",
            +				"v8-compile-cache": "^2.0.3"
            +			},
            +			"dependencies": {
            +				"ansi-regex": {
            +					"version": "5.0.0",
            +					"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz",
            +					"integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==",
            +					"dev": true
            +				},
            +				"ansi-styles": {
            +					"version": "4.3.0",
            +					"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
            +					"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
            +					"dev": true,
            +					"requires": {
            +						"color-convert": "^2.0.1"
            +					}
            +				},
            +				"chalk": {
            +					"version": "4.1.0",
            +					"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz",
            +					"integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==",
            +					"dev": true,
            +					"requires": {
            +						"ansi-styles": "^4.1.0",
            +						"supports-color": "^7.1.0"
            +					}
            +				},
            +				"color-convert": {
            +					"version": "2.0.1",
            +					"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
            +					"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
            +					"dev": true,
            +					"requires": {
            +						"color-name": "~1.1.4"
            +					}
            +				},
            +				"color-name": {
            +					"version": "1.1.4",
            +					"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
            +					"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
            +					"dev": true
            +				},
            +				"cross-spawn": {
            +					"version": "7.0.3",
            +					"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz",
            +					"integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==",
            +					"dev": true,
            +					"requires": {
            +						"path-key": "^3.1.0",
            +						"shebang-command": "^2.0.0",
            +						"which": "^2.0.1"
            +					}
            +				},
            +				"debug": {
            +					"version": "4.3.1",
            +					"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz",
            +					"integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==",
            +					"dev": true,
            +					"requires": {
            +						"ms": "2.1.2"
            +					}
            +				},
            +				"glob-parent": {
            +					"version": "5.1.2",
            +					"resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz",
            +					"integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==",
            +					"dev": true,
            +					"requires": {
            +						"is-glob": "^4.0.1"
            +					}
            +				},
            +				"has-flag": {
            +					"version": "4.0.0",
            +					"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
            +					"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
            +					"dev": true
            +				},
            +				"import-fresh": {
            +					"version": "3.3.0",
            +					"resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz",
            +					"integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==",
            +					"dev": true,
            +					"requires": {
            +						"parent-module": "^1.0.0",
            +						"resolve-from": "^4.0.0"
            +					}
            +				},
            +				"levn": {
            +					"version": "0.4.1",
            +					"resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz",
            +					"integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==",
            +					"dev": true,
            +					"requires": {
            +						"prelude-ls": "^1.2.1",
            +						"type-check": "~0.4.0"
            +					}
            +				},
            +				"ms": {
            +					"version": "2.1.2",
            +					"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
            +					"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
            +					"dev": true
            +				},
            +				"optionator": {
            +					"version": "0.9.1",
            +					"resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz",
            +					"integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==",
            +					"dev": true,
            +					"requires": {
            +						"deep-is": "^0.1.3",
            +						"fast-levenshtein": "^2.0.6",
            +						"levn": "^0.4.1",
            +						"prelude-ls": "^1.2.1",
            +						"type-check": "^0.4.0",
            +						"word-wrap": "^1.2.3"
            +					}
            +				},
            +				"path-key": {
            +					"version": "3.1.1",
            +					"resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz",
            +					"integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==",
            +					"dev": true
            +				},
            +				"prelude-ls": {
            +					"version": "1.2.1",
            +					"resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz",
            +					"integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==",
            +					"dev": true
            +				},
            +				"regexpp": {
            +					"version": "3.1.0",
            +					"resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.1.0.tgz",
            +					"integrity": "sha512-ZOIzd8yVsQQA7j8GCSlPGXwg5PfmA1mrq0JP4nGhh54LaKN3xdai/vHUDu74pKwV8OxseMS65u2NImosQcSD0Q==",
            +					"dev": true
            +				},
            +				"resolve-from": {
            +					"version": "4.0.0",
            +					"resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz",
            +					"integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==",
            +					"dev": true
            +				},
            +				"semver": {
            +					"version": "7.3.5",
            +					"resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz",
            +					"integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==",
            +					"dev": true,
            +					"requires": {
            +						"lru-cache": "^6.0.0"
            +					}
            +				},
            +				"shebang-command": {
            +					"version": "2.0.0",
            +					"resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz",
            +					"integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==",
            +					"dev": true,
            +					"requires": {
            +						"shebang-regex": "^3.0.0"
            +					}
            +				},
            +				"shebang-regex": {
            +					"version": "3.0.0",
            +					"resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz",
            +					"integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==",
            +					"dev": true
            +				},
            +				"strip-ansi": {
            +					"version": "6.0.0",
            +					"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz",
            +					"integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==",
            +					"dev": true,
            +					"requires": {
            +						"ansi-regex": "^5.0.0"
            +					}
            +				},
            +				"strip-json-comments": {
            +					"version": "3.1.1",
            +					"resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz",
            +					"integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==",
            +					"dev": true
            +				},
            +				"supports-color": {
            +					"version": "7.2.0",
            +					"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
            +					"integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
            +					"dev": true,
            +					"requires": {
            +						"has-flag": "^4.0.0"
            +					}
            +				},
            +				"type-check": {
            +					"version": "0.4.0",
            +					"resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz",
            +					"integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==",
            +					"dev": true,
            +					"requires": {
            +						"prelude-ls": "^1.2.1"
            +					}
            +				},
            +				"which": {
            +					"version": "2.0.2",
            +					"resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",
            +					"integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==",
            +					"dev": true,
            +					"requires": {
            +						"isexe": "^2.0.0"
            +					}
            +				}
            +			}
            +		},
            +		"eslint-plugin-jsdoc": {
            +			"version": "32.3.0",
            +			"resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-32.3.0.tgz",
            +			"integrity": "sha512-zyx7kajDK+tqS1bHuY5sapkad8P8KT0vdd/lE55j47VPG2MeenSYuIY/M/Pvmzq5g0+3JB+P3BJGUXmHxtuKPQ==",
            +			"dev": true,
            +			"requires": {
            +				"comment-parser": "1.1.2",
            +				"debug": "^4.3.1",
            +				"jsdoctypeparser": "^9.0.0",
            +				"lodash": "^4.17.20",
            +				"regextras": "^0.7.1",
            +				"semver": "^7.3.4",
            +				"spdx-expression-parse": "^3.0.1"
            +			},
            +			"dependencies": {
            +				"debug": {
            +					"version": "4.3.1",
            +					"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz",
            +					"integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==",
            +					"dev": true,
            +					"requires": {
            +						"ms": "2.1.2"
            +					}
            +				},
            +				"ms": {
            +					"version": "2.1.2",
            +					"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
            +					"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
            +					"dev": true
            +				},
            +				"semver": {
            +					"version": "7.3.5",
            +					"resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz",
            +					"integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==",
            +					"dev": true,
            +					"requires": {
            +						"lru-cache": "^6.0.0"
            +					}
            +				},
            +				"spdx-expression-parse": {
            +					"version": "3.0.1",
            +					"resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz",
            +					"integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==",
            +					"dev": true,
            +					"requires": {
            +						"spdx-exceptions": "^2.1.0",
            +						"spdx-license-ids": "^3.0.0"
            +					}
            +				}
            +			}
            +		},
            +		"eslint-plugin-regexp": {
            +			"version": "1.2.0",
            +			"resolved": "https://registry.npmjs.org/eslint-plugin-regexp/-/eslint-plugin-regexp-1.2.0.tgz",
            +			"integrity": "sha512-yHn5D8jTmT1gmPA4Dj2ut0aGg03CkgvpKu3kG/CEQ1OcUmkoykZsiXCysaENpq/BXs60WEpz+tN2n/h4lp+Q0Q==",
            +			"dev": true,
            +			"requires": {
            +				"comment-parser": "^1.1.2",
            +				"eslint-utils": "^3.0.0",
            +				"grapheme-splitter": "^1.0.4",
            +				"jsdoctypeparser": "^9.0.0",
            +				"refa": "^0.9.0",
            +				"regexp-ast-analysis": "^0.3.0",
            +				"regexpp": "^3.2.0",
            +				"scslre": "^0.1.6"
            +			},
            +			"dependencies": {
            +				"eslint-utils": {
            +					"version": "3.0.0",
            +					"resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz",
            +					"integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==",
            +					"dev": true,
            +					"requires": {
            +						"eslint-visitor-keys": "^2.0.0"
            +					}
            +				},
            +				"regexp-ast-analysis": {
            +					"version": "0.3.0",
            +					"resolved": "https://registry.npmjs.org/regexp-ast-analysis/-/regexp-ast-analysis-0.3.0.tgz",
            +					"integrity": "sha512-11PlbBSUxwWpdj6BdZUKfhDdV9g+cveqHB+BqBQDBD7ZermDBVgtyowUaXTvT0dO3tZYo2bDIr/GoED6X1aYSA==",
            +					"dev": true,
            +					"requires": {
            +						"refa": "^0.9.0",
            +						"regexpp": "^3.2.0"
            +					}
            +				}
            +			}
            +		},
            +		"eslint-scope": {
            +			"version": "5.1.1",
            +			"resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz",
            +			"integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==",
            +			"dev": true,
            +			"requires": {
            +				"esrecurse": "^4.3.0",
            +				"estraverse": "^4.1.1"
            +			}
            +		},
            +		"eslint-utils": {
            +			"version": "2.1.0",
            +			"resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz",
            +			"integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==",
            +			"dev": true,
            +			"requires": {
            +				"eslint-visitor-keys": "^1.1.0"
            +			},
            +			"dependencies": {
            +				"eslint-visitor-keys": {
            +					"version": "1.3.0",
            +					"resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz",
            +					"integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==",
            +					"dev": true
            +				}
            +			}
            +		},
            +		"eslint-visitor-keys": {
            +			"version": "2.0.0",
            +			"resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.0.0.tgz",
            +			"integrity": "sha512-QudtT6av5WXels9WjIM7qz1XD1cWGvX4gGXvp/zBn9nXG02D0utdU3Em2m/QjTnrsk6bBjmCygl3rmj118msQQ==",
            +			"dev": true
            +		},
            +		"espree": {
            +			"version": "7.3.1",
            +			"resolved": "https://registry.npmjs.org/espree/-/espree-7.3.1.tgz",
            +			"integrity": "sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g==",
            +			"dev": true,
            +			"requires": {
            +				"acorn": "^7.4.0",
            +				"acorn-jsx": "^5.3.1",
            +				"eslint-visitor-keys": "^1.3.0"
            +			},
            +			"dependencies": {
            +				"acorn": {
            +					"version": "7.4.1",
            +					"resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz",
            +					"integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==",
            +					"dev": true
            +				},
            +				"eslint-visitor-keys": {
            +					"version": "1.3.0",
            +					"resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz",
            +					"integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==",
            +					"dev": true
            +				}
            +			}
            +		},
            +		"esprima": {
            +			"version": "3.1.3",
            +			"resolved": "https://registry.npmjs.org/esprima/-/esprima-3.1.3.tgz",
            +			"integrity": "sha1-/cpRzuYTOJXjyI1TXOSdv/YqRjM=",
            +			"dev": true
            +		},
            +		"esquery": {
            +			"version": "1.4.0",
            +			"resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz",
            +			"integrity": "sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==",
            +			"dev": true,
            +			"requires": {
            +				"estraverse": "^5.1.0"
            +			},
            +			"dependencies": {
            +				"estraverse": {
            +					"version": "5.2.0",
            +					"resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz",
            +					"integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==",
            +					"dev": true
            +				}
            +			}
            +		},
            +		"esrecurse": {
            +			"version": "4.3.0",
            +			"resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz",
            +			"integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==",
            +			"dev": true,
            +			"requires": {
            +				"estraverse": "^5.2.0"
            +			},
            +			"dependencies": {
            +				"estraverse": {
            +					"version": "5.2.0",
            +					"resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz",
            +					"integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==",
            +					"dev": true
            +				}
            +			}
            +		},
            +		"estraverse": {
            +			"version": "4.2.0",
            +			"resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz",
            +			"integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=",
            +			"dev": true
            +		},
            +		"esutils": {
            +			"version": "2.0.2",
            +			"resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz",
            +			"integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=",
            +			"dev": true
            +		},
            +		"event-target-shim": {
            +			"version": "5.0.1",
            +			"resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz",
            +			"integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==",
            +			"dev": true
            +		},
            +		"eventemitter3": {
            +			"version": "4.0.7",
            +			"resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz",
            +			"integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==",
            +			"dev": true
            +		},
            +		"execa": {
            +			"version": "1.0.0",
            +			"resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz",
            +			"integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==",
            +			"dev": true,
            +			"requires": {
            +				"cross-spawn": "^6.0.0",
            +				"get-stream": "^4.0.0",
            +				"is-stream": "^1.1.0",
            +				"npm-run-path": "^2.0.0",
            +				"p-finally": "^1.0.0",
            +				"signal-exit": "^3.0.0",
            +				"strip-eof": "^1.0.0"
            +			}
            +		},
            +		"expand-brackets": {
            +			"version": "2.1.4",
            +			"resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz",
            +			"integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=",
            +			"dev": true,
            +			"requires": {
            +				"debug": "^2.3.3",
            +				"define-property": "^0.2.5",
            +				"extend-shallow": "^2.0.1",
            +				"posix-character-classes": "^0.1.0",
            +				"regex-not": "^1.0.0",
            +				"snapdragon": "^0.8.1",
            +				"to-regex": "^3.0.1"
            +			},
            +			"dependencies": {
            +				"define-property": {
            +					"version": "0.2.5",
            +					"resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz",
            +					"integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=",
            +					"dev": true,
            +					"requires": {
            +						"is-descriptor": "^0.1.0"
            +					}
            +				},
            +				"extend-shallow": {
            +					"version": "2.0.1",
            +					"resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
            +					"integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
            +					"dev": true,
            +					"requires": {
            +						"is-extendable": "^0.1.0"
            +					}
            +				}
            +			}
            +		},
            +		"expand-tilde": {
            +			"version": "2.0.2",
            +			"resolved": "https://registry.npmjs.org/expand-tilde/-/expand-tilde-2.0.2.tgz",
            +			"integrity": "sha1-l+gBqgUt8CRU3kawK/YhZCzchQI=",
            +			"dev": true,
            +			"requires": {
            +				"homedir-polyfill": "^1.0.1"
            +			}
            +		},
            +		"ext": {
            +			"version": "1.4.0",
            +			"resolved": "https://registry.npmjs.org/ext/-/ext-1.4.0.tgz",
            +			"integrity": "sha512-Key5NIsUxdqKg3vIsdw9dSuXpPCQ297y6wBjL30edxwPgt2E44WcWBZey/ZvUc6sERLTxKdyCu4gZFmUbk1Q7A==",
            +			"dev": true,
            +			"requires": {
            +				"type": "^2.0.0"
            +			},
            +			"dependencies": {
            +				"type": {
            +					"version": "2.0.0",
            +					"resolved": "https://registry.npmjs.org/type/-/type-2.0.0.tgz",
            +					"integrity": "sha512-KBt58xCHry4Cejnc2ISQAF7QY+ORngsWfxezO68+12hKV6lQY8P/psIkcbjeHWn7MqcgciWJyCCevFMJdIXpow==",
            +					"dev": true
            +				}
            +			}
            +		},
            +		"extend": {
            +			"version": "3.0.2",
            +			"resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz",
            +			"integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==",
            +			"dev": true
            +		},
            +		"extend-shallow": {
            +			"version": "3.0.2",
            +			"resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz",
            +			"integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=",
            +			"dev": true,
            +			"requires": {
            +				"assign-symbols": "^1.0.0",
            +				"is-extendable": "^1.0.1"
            +			},
            +			"dependencies": {
            +				"is-extendable": {
            +					"version": "1.0.1",
            +					"resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz",
            +					"integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==",
            +					"dev": true,
            +					"requires": {
            +						"is-plain-object": "^2.0.4"
            +					}
            +				}
            +			}
            +		},
            +		"extglob": {
            +			"version": "2.0.4",
            +			"resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz",
            +			"integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==",
            +			"dev": true,
            +			"requires": {
            +				"array-unique": "^0.3.2",
            +				"define-property": "^1.0.0",
            +				"expand-brackets": "^2.1.4",
            +				"extend-shallow": "^2.0.1",
            +				"fragment-cache": "^0.2.1",
            +				"regex-not": "^1.0.0",
            +				"snapdragon": "^0.8.1",
            +				"to-regex": "^3.0.1"
            +			},
            +			"dependencies": {
            +				"define-property": {
            +					"version": "1.0.0",
            +					"resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz",
            +					"integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=",
            +					"dev": true,
            +					"requires": {
            +						"is-descriptor": "^1.0.0"
            +					}
            +				},
            +				"extend-shallow": {
            +					"version": "2.0.1",
            +					"resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
            +					"integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
            +					"dev": true,
            +					"requires": {
            +						"is-extendable": "^0.1.0"
            +					}
            +				},
            +				"is-accessor-descriptor": {
            +					"version": "1.0.0",
            +					"resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz",
            +					"integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==",
            +					"dev": true,
            +					"requires": {
            +						"kind-of": "^6.0.0"
            +					}
            +				},
            +				"is-data-descriptor": {
            +					"version": "1.0.0",
            +					"resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz",
            +					"integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==",
            +					"dev": true,
            +					"requires": {
            +						"kind-of": "^6.0.0"
            +					}
            +				},
            +				"is-descriptor": {
            +					"version": "1.0.2",
            +					"resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz",
            +					"integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==",
            +					"dev": true,
            +					"requires": {
            +						"is-accessor-descriptor": "^1.0.0",
            +						"is-data-descriptor": "^1.0.0",
            +						"kind-of": "^6.0.2"
            +					}
            +				}
            +			}
            +		},
            +		"extsprintf": {
            +			"version": "1.3.0",
            +			"resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz",
            +			"integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=",
            +			"dev": true
            +		},
            +		"fancy-log": {
            +			"version": "1.3.3",
            +			"resolved": "https://registry.npmjs.org/fancy-log/-/fancy-log-1.3.3.tgz",
            +			"integrity": "sha512-k9oEhlyc0FrVh25qYuSELjr8oxsCoc4/LEZfg2iJJrfEk/tZL9bCoJE47gqAvI2m/AUjluCS4+3I0eTx8n3AEw==",
            +			"dev": true,
            +			"requires": {
            +				"ansi-gray": "^0.1.1",
            +				"color-support": "^1.1.3",
            +				"parse-node-version": "^1.0.0",
            +				"time-stamp": "^1.0.0"
            +			}
            +		},
            +		"fast-deep-equal": {
            +			"version": "2.0.1",
            +			"resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz",
            +			"integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=",
            +			"dev": true
            +		},
            +		"fast-glob": {
            +			"version": "2.2.7",
            +			"resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-2.2.7.tgz",
            +			"integrity": "sha512-g1KuQwHOZAmOZMuBtHdxDtju+T2RT8jgCC9aANsbpdiDDTSnjgfuVsIBNKbUeJI3oKMRExcfNDtJl4OhbffMsw==",
            +			"dev": true,
            +			"requires": {
            +				"@mrmlnc/readdir-enhanced": "^2.2.1",
            +				"@nodelib/fs.stat": "^1.1.2",
            +				"glob-parent": "^3.1.0",
            +				"is-glob": "^4.0.0",
            +				"merge2": "^1.2.3",
            +				"micromatch": "^3.1.10"
            +			}
            +		},
            +		"fast-json-patch": {
            +			"version": "3.0.0-1",
            +			"resolved": "https://registry.npmjs.org/fast-json-patch/-/fast-json-patch-3.0.0-1.tgz",
            +			"integrity": "sha512-6pdFb07cknxvPzCeLsFHStEy+MysPJPgZQ9LbQ/2O67unQF93SNqfdSqnPPl71YMHX+AD8gbl7iuoGFzHEdDuw==",
            +			"dev": true
            +		},
            +		"fast-json-stable-stringify": {
            +			"version": "2.0.0",
            +			"resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz",
            +			"integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=",
            +			"dev": true
            +		},
            +		"fast-levenshtein": {
            +			"version": "2.0.6",
            +			"resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz",
            +			"integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=",
            +			"dev": true
            +		},
            +		"file-entry-cache": {
            +			"version": "6.0.1",
            +			"resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz",
            +			"integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==",
            +			"dev": true,
            +			"requires": {
            +				"flat-cache": "^3.0.4"
            +			}
            +		},
            +		"file-uri-to-path": {
            +			"version": "1.0.0",
            +			"resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz",
            +			"integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==",
            +			"dev": true,
            +			"optional": true
            +		},
            +		"fill-range": {
            +			"version": "4.0.0",
            +			"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz",
            +			"integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=",
            +			"dev": true,
            +			"requires": {
            +				"extend-shallow": "^2.0.1",
            +				"is-number": "^3.0.0",
            +				"repeat-string": "^1.6.1",
            +				"to-regex-range": "^2.1.0"
            +			},
            +			"dependencies": {
            +				"extend-shallow": {
            +					"version": "2.0.1",
            +					"resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
            +					"integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
            +					"dev": true,
            +					"requires": {
            +						"is-extendable": "^0.1.0"
            +					}
            +				}
            +			}
            +		},
            +		"find-up": {
            +			"version": "1.1.2",
            +			"resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz",
            +			"integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=",
            +			"dev": true,
            +			"requires": {
            +				"path-exists": "^2.0.0",
            +				"pinkie-promise": "^2.0.0"
            +			}
            +		},
            +		"findup-sync": {
            +			"version": "3.0.0",
            +			"resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-3.0.0.tgz",
            +			"integrity": "sha512-YbffarhcicEhOrm4CtrwdKBdCuz576RLdhJDsIfvNtxUuhdRet1qZcsMjqbePtAseKdAnDyM/IyXbu7PRPRLYg==",
            +			"dev": true,
            +			"requires": {
            +				"detect-file": "^1.0.0",
            +				"is-glob": "^4.0.0",
            +				"micromatch": "^3.0.4",
            +				"resolve-dir": "^1.0.1"
            +			}
            +		},
            +		"fined": {
            +			"version": "1.2.0",
            +			"resolved": "https://registry.npmjs.org/fined/-/fined-1.2.0.tgz",
            +			"integrity": "sha512-ZYDqPLGxDkDhDZBjZBb+oD1+j0rA4E0pXY50eplAAOPg2N/gUBSSk5IM1/QhPfyVo19lJ+CvXpqfvk+b2p/8Ng==",
            +			"dev": true,
            +			"requires": {
            +				"expand-tilde": "^2.0.2",
            +				"is-plain-object": "^2.0.3",
            +				"object.defaults": "^1.1.0",
            +				"object.pick": "^1.2.0",
            +				"parse-filepath": "^1.0.1"
            +			}
            +		},
            +		"flagged-respawn": {
            +			"version": "1.0.1",
            +			"resolved": "https://registry.npmjs.org/flagged-respawn/-/flagged-respawn-1.0.1.tgz",
            +			"integrity": "sha512-lNaHNVymajmk0OJMBn8fVUAU1BtDeKIqKoVhk4xAALB57aALg6b4W0MfJ/cUE0g9YBXy5XhSlPIpYIJ7HaY/3Q==",
            +			"dev": true
            +		},
            +		"flat": {
            +			"version": "4.1.0",
            +			"resolved": "https://registry.npmjs.org/flat/-/flat-4.1.0.tgz",
            +			"integrity": "sha512-Px/TiLIznH7gEDlPXcUD4KnBusa6kR6ayRUVcnEAbreRIuhkqow/mun59BuRXwoYk7ZQOLW1ZM05ilIvK38hFw==",
            +			"dev": true,
            +			"requires": {
            +				"is-buffer": "~2.0.3"
            +			},
            +			"dependencies": {
            +				"is-buffer": {
            +					"version": "2.0.3",
            +					"resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.3.tgz",
            +					"integrity": "sha512-U15Q7MXTuZlrbymiz95PJpZxu8IlipAp4dtS3wOdgPXx3mqBnslrWU14kxfHB+Py/+2PVKSr37dMAgM2A4uArw==",
            +					"dev": true
            +				}
            +			}
            +		},
            +		"flat-cache": {
            +			"version": "3.0.4",
            +			"resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz",
            +			"integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==",
            +			"dev": true,
            +			"requires": {
            +				"flatted": "^3.1.0",
            +				"rimraf": "^3.0.2"
            +			},
            +			"dependencies": {
            +				"rimraf": {
            +					"version": "3.0.2",
            +					"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz",
            +					"integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==",
            +					"dev": true,
            +					"requires": {
            +						"glob": "^7.1.3"
            +					}
            +				}
            +			}
            +		},
            +		"flatted": {
            +			"version": "3.1.1",
            +			"resolved": "https://registry.npmjs.org/flatted/-/flatted-3.1.1.tgz",
            +			"integrity": "sha512-zAoAQiudy+r5SvnSw3KJy5os/oRJYHzrzja/tBDqrZtNhUw8bt6y8OBzMWcjWr+8liV8Eb6yOhw8WZ7VFZ5ZzA==",
            +			"dev": true
            +		},
            +		"flush-write-stream": {
            +			"version": "1.1.1",
            +			"resolved": "https://registry.npmjs.org/flush-write-stream/-/flush-write-stream-1.1.1.tgz",
            +			"integrity": "sha512-3Z4XhFZ3992uIq0XOqb9AreonueSYphE6oYbpt5+3u06JWklbsPkNv3ZKkP9Bz/r+1MWCaMoSQ28P85+1Yc77w==",
            +			"dev": true,
            +			"requires": {
            +				"inherits": "^2.0.3",
            +				"readable-stream": "^2.3.6"
            +			}
            +		},
            +		"follow-redirects": {
            +			"version": "1.13.1",
            +			"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.13.1.tgz",
            +			"integrity": "sha512-SSG5xmZh1mkPGyKzjZP8zLjltIfpW32Y5QpdNJyjcfGxK3qo3NDDkZOZSFiGn1A6SclQxY9GzEwAHQ3dmYRWpg==",
            +			"dev": true
            +		},
            +		"for-in": {
            +			"version": "1.0.2",
            +			"resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz",
            +			"integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=",
            +			"dev": true
            +		},
            +		"for-own": {
            +			"version": "1.0.0",
            +			"resolved": "https://registry.npmjs.org/for-own/-/for-own-1.0.0.tgz",
            +			"integrity": "sha1-xjMy9BXO3EsE2/5wz4NklMU8tEs=",
            +			"dev": true,
            +			"requires": {
            +				"for-in": "^1.0.1"
            +			}
            +		},
            +		"forever-agent": {
            +			"version": "0.6.1",
            +			"resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz",
            +			"integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=",
            +			"dev": true
            +		},
            +		"form-data": {
            +			"version": "2.3.3",
            +			"resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz",
            +			"integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==",
            +			"dev": true,
            +			"requires": {
            +				"asynckit": "^0.4.0",
            +				"combined-stream": "^1.0.6",
            +				"mime-types": "^2.1.12"
            +			}
            +		},
            +		"fragment-cache": {
            +			"version": "0.2.1",
            +			"resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz",
            +			"integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=",
            +			"dev": true,
            +			"requires": {
            +				"map-cache": "^0.2.2"
            +			}
            +		},
            +		"fs-exists-sync": {
            +			"version": "0.1.0",
            +			"resolved": "https://registry.npmjs.org/fs-exists-sync/-/fs-exists-sync-0.1.0.tgz",
            +			"integrity": "sha1-mC1ok6+RjnLQjeyehnP/K1qNat0=",
            +			"dev": true
            +		},
            +		"fs-extra": {
            +			"version": "7.0.1",
            +			"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz",
            +			"integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==",
            +			"dev": true,
            +			"requires": {
            +				"graceful-fs": "^4.1.2",
            +				"jsonfile": "^4.0.0",
            +				"universalify": "^0.1.0"
            +			}
            +		},
            +		"fs-mkdirp-stream": {
            +			"version": "1.0.0",
            +			"resolved": "https://registry.npmjs.org/fs-mkdirp-stream/-/fs-mkdirp-stream-1.0.0.tgz",
            +			"integrity": "sha1-C3gV/DIBxqaeFNuYzgmMFpNSWes=",
            +			"dev": true,
            +			"requires": {
            +				"graceful-fs": "^4.1.11",
            +				"through2": "^2.0.3"
            +			}
            +		},
            +		"fs.realpath": {
            +			"version": "1.0.0",
            +			"resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
            +			"integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=",
            +			"dev": true
            +		},
            +		"fsevents": {
            +			"version": "1.2.13",
            +			"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.13.tgz",
            +			"integrity": "sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==",
            +			"dev": true,
            +			"optional": true,
            +			"requires": {
            +				"bindings": "^1.5.0",
            +				"nan": "^2.12.1"
            +			}
            +		},
            +		"function-bind": {
            +			"version": "1.1.1",
            +			"resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
            +			"integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==",
            +			"dev": true
            +		},
            +		"functional-red-black-tree": {
            +			"version": "1.0.1",
            +			"resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz",
            +			"integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=",
            +			"dev": true
            +		},
            +		"geometry-interfaces": {
            +			"version": "1.1.4",
            +			"resolved": "https://registry.npmjs.org/geometry-interfaces/-/geometry-interfaces-1.1.4.tgz",
            +			"integrity": "sha512-qD6OdkT6NcES9l4Xx3auTpwraQruU7dARbQPVO71MKvkGYw5/z/oIiGymuFXrRaEQa5Y67EIojUpaLeGEa5hGA==",
            +			"dev": true
            +		},
            +		"get-caller-file": {
            +			"version": "1.0.3",
            +			"resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz",
            +			"integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==",
            +			"dev": true
            +		},
            +		"get-func-name": {
            +			"version": "2.0.0",
            +			"resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz",
            +			"integrity": "sha1-6td0q+5y4gQJQzoGY2YCPdaIekE=",
            +			"dev": true
            +		},
            +		"get-intrinsic": {
            +			"version": "1.1.1",
            +			"resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz",
            +			"integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==",
            +			"dev": true,
            +			"requires": {
            +				"function-bind": "^1.1.1",
            +				"has": "^1.0.3",
            +				"has-symbols": "^1.0.1"
            +			},
            +			"dependencies": {
            +				"has-symbols": {
            +					"version": "1.0.2",
            +					"resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz",
            +					"integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==",
            +					"dev": true
            +				}
            +			}
            +		},
            +		"get-stdin": {
            +			"version": "6.0.0",
            +			"resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-6.0.0.tgz",
            +			"integrity": "sha512-jp4tHawyV7+fkkSKyvjuLZswblUtz+SQKzSWnBbii16BuZksJlU1wuBYXY75r+duh/llF1ur6oNwi+2ZzjKZ7g==",
            +			"dev": true
            +		},
            +		"get-stream": {
            +			"version": "4.1.0",
            +			"resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz",
            +			"integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==",
            +			"dev": true,
            +			"requires": {
            +				"pump": "^3.0.0"
            +			}
            +		},
            +		"get-value": {
            +			"version": "2.0.6",
            +			"resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz",
            +			"integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=",
            +			"dev": true
            +		},
            +		"getpass": {
            +			"version": "0.1.7",
            +			"resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz",
            +			"integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=",
            +			"dev": true,
            +			"requires": {
            +				"assert-plus": "^1.0.0"
            +			}
            +		},
            +		"git-config-path": {
            +			"version": "1.0.1",
            +			"resolved": "https://registry.npmjs.org/git-config-path/-/git-config-path-1.0.1.tgz",
            +			"integrity": "sha1-bTP37WPbDQ4RgTFQO6s6ykfVRmQ=",
            +			"dev": true,
            +			"requires": {
            +				"extend-shallow": "^2.0.1",
            +				"fs-exists-sync": "^0.1.0",
            +				"homedir-polyfill": "^1.0.0"
            +			},
            +			"dependencies": {
            +				"extend-shallow": {
            +					"version": "2.0.1",
            +					"resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
            +					"integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
            +					"dev": true,
            +					"requires": {
            +						"is-extendable": "^0.1.0"
            +					}
            +				}
            +			}
            +		},
            +		"gitlab": {
            +			"version": "10.2.1",
            +			"resolved": "https://registry.npmjs.org/gitlab/-/gitlab-10.2.1.tgz",
            +			"integrity": "sha512-z+DxRF1C9uayVbocs9aJkJz+kGy14TSm1noB/rAIEBbXOkOYbjKxyuqJzt+0zeFpXFdgA0yq6DVVbvM7HIfGwg==",
            +			"dev": true,
            +			"requires": {
            +				"form-data": "^2.5.0",
            +				"humps": "^2.0.1",
            +				"ky": "^0.12.0",
            +				"ky-universal": "^0.3.0",
            +				"li": "^1.3.0",
            +				"query-string": "^6.8.2",
            +				"universal-url": "^2.0.0"
            +			},
            +			"dependencies": {
            +				"form-data": {
            +					"version": "2.5.1",
            +					"resolved": "https://registry.npmjs.org/form-data/-/form-data-2.5.1.tgz",
            +					"integrity": "sha512-m21N3WOmEEURgk6B9GLOE4RuWOFf28Lhh9qGYeNlGq4VDXUlJy2th2slBNU8Gp8EzloYZOibZJ7t5ecIrFSjVA==",
            +					"dev": true,
            +					"requires": {
            +						"asynckit": "^0.4.0",
            +						"combined-stream": "^1.0.6",
            +						"mime-types": "^2.1.12"
            +					}
            +				}
            +			}
            +		},
            +		"glob": {
            +			"version": "7.1.3",
            +			"resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz",
            +			"integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==",
            +			"dev": true,
            +			"requires": {
            +				"fs.realpath": "^1.0.0",
            +				"inflight": "^1.0.4",
            +				"inherits": "2",
            +				"minimatch": "^3.0.4",
            +				"once": "^1.3.0",
            +				"path-is-absolute": "^1.0.0"
            +			}
            +		},
            +		"glob-parent": {
            +			"version": "3.1.0",
            +			"resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz",
            +			"integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=",
            +			"dev": true,
            +			"requires": {
            +				"is-glob": "^3.1.0",
            +				"path-dirname": "^1.0.0"
            +			},
            +			"dependencies": {
            +				"is-glob": {
            +					"version": "3.1.0",
            +					"resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz",
            +					"integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=",
            +					"dev": true,
            +					"requires": {
            +						"is-extglob": "^2.1.0"
            +					}
            +				}
            +			}
            +		},
            +		"glob-stream": {
            +			"version": "6.1.0",
            +			"resolved": "https://registry.npmjs.org/glob-stream/-/glob-stream-6.1.0.tgz",
            +			"integrity": "sha1-cEXJlBOz65SIjYOrRtC0BMx73eQ=",
            +			"dev": true,
            +			"requires": {
            +				"extend": "^3.0.0",
            +				"glob": "^7.1.1",
            +				"glob-parent": "^3.1.0",
            +				"is-negated-glob": "^1.0.0",
            +				"ordered-read-streams": "^1.0.0",
            +				"pumpify": "^1.3.5",
            +				"readable-stream": "^2.1.5",
            +				"remove-trailing-separator": "^1.0.1",
            +				"to-absolute-glob": "^2.0.0",
            +				"unique-stream": "^2.0.2"
            +			}
            +		},
            +		"glob-to-regexp": {
            +			"version": "0.3.0",
            +			"resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.3.0.tgz",
            +			"integrity": "sha1-jFoUlNIGbFcMw7/kSWF1rMTVAqs=",
            +			"dev": true
            +		},
            +		"glob-watcher": {
            +			"version": "5.0.3",
            +			"resolved": "https://registry.npmjs.org/glob-watcher/-/glob-watcher-5.0.3.tgz",
            +			"integrity": "sha512-8tWsULNEPHKQ2MR4zXuzSmqbdyV5PtwwCaWSGQ1WwHsJ07ilNeN1JB8ntxhckbnpSHaf9dXFUHzIWvm1I13dsg==",
            +			"dev": true,
            +			"requires": {
            +				"anymatch": "^2.0.0",
            +				"async-done": "^1.2.0",
            +				"chokidar": "^2.0.0",
            +				"is-negated-glob": "^1.0.0",
            +				"just-debounce": "^1.0.0",
            +				"object.defaults": "^1.1.0"
            +			}
            +		},
            +		"global-modules": {
            +			"version": "1.0.0",
            +			"resolved": "https://registry.npmjs.org/global-modules/-/global-modules-1.0.0.tgz",
            +			"integrity": "sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg==",
            +			"dev": true,
            +			"requires": {
            +				"global-prefix": "^1.0.1",
            +				"is-windows": "^1.0.1",
            +				"resolve-dir": "^1.0.0"
            +			}
            +		},
            +		"global-prefix": {
            +			"version": "1.0.2",
            +			"resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-1.0.2.tgz",
            +			"integrity": "sha1-2/dDxsFJklk8ZVVoy2btMsASLr4=",
            +			"dev": true,
            +			"requires": {
            +				"expand-tilde": "^2.0.2",
            +				"homedir-polyfill": "^1.0.1",
            +				"ini": "^1.3.4",
            +				"is-windows": "^1.0.1",
            +				"which": "^1.2.14"
            +			}
            +		},
            +		"globals": {
            +			"version": "13.7.0",
            +			"resolved": "https://registry.npmjs.org/globals/-/globals-13.7.0.tgz",
            +			"integrity": "sha512-Aipsz6ZKRxa/xQkZhNg0qIWXT6x6rD46f6x/PCnBomlttdIyAPak4YD9jTmKpZ72uROSMU87qJtcgpgHaVchiA==",
            +			"dev": true,
            +			"requires": {
            +				"type-fest": "^0.20.2"
            +			},
            +			"dependencies": {
            +				"type-fest": {
            +					"version": "0.20.2",
            +					"resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz",
            +					"integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==",
            +					"dev": true
            +				}
            +			}
            +		},
            +		"globby": {
            +			"version": "6.1.0",
            +			"resolved": "https://registry.npmjs.org/globby/-/globby-6.1.0.tgz",
            +			"integrity": "sha1-9abXDoOV4hyFj7BInWTfAkJNUGw=",
            +			"dev": true,
            +			"requires": {
            +				"array-union": "^1.0.1",
            +				"glob": "^7.0.3",
            +				"object-assign": "^4.0.1",
            +				"pify": "^2.0.0",
            +				"pinkie-promise": "^2.0.0"
            +			}
            +		},
            +		"glogg": {
            +			"version": "1.0.2",
            +			"resolved": "https://registry.npmjs.org/glogg/-/glogg-1.0.2.tgz",
            +			"integrity": "sha512-5mwUoSuBk44Y4EshyiqcH95ZntbDdTQqA3QYSrxmzj28Ai0vXBGMH1ApSANH14j2sIRtqCEyg6PfsuP7ElOEDA==",
            +			"dev": true,
            +			"requires": {
            +				"sparkles": "^1.0.0"
            +			}
            +		},
            +		"graceful-fs": {
            +			"version": "4.2.3",
            +			"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.3.tgz",
            +			"integrity": "sha512-a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ==",
            +			"dev": true
            +		},
            +		"grapheme-splitter": {
            +			"version": "1.0.4",
            +			"resolved": "https://registry.npmjs.org/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz",
            +			"integrity": "sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==",
            +			"dev": true
            +		},
            +		"growl": {
            +			"version": "1.10.5",
            +			"resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz",
            +			"integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==",
            +			"dev": true
            +		},
            +		"gulp": {
            +			"version": "4.0.2",
            +			"resolved": "https://registry.npmjs.org/gulp/-/gulp-4.0.2.tgz",
            +			"integrity": "sha512-dvEs27SCZt2ibF29xYgmnwwCYZxdxhQ/+LFWlbAW8y7jt68L/65402Lz3+CKy0Ov4rOs+NERmDq7YlZaDqUIfA==",
            +			"dev": true,
            +			"requires": {
            +				"glob-watcher": "^5.0.3",
            +				"gulp-cli": "^2.2.0",
            +				"undertaker": "^1.2.1",
            +				"vinyl-fs": "^3.0.0"
            +			},
            +			"dependencies": {
            +				"gulp-cli": {
            +					"version": "2.2.0",
            +					"resolved": "https://registry.npmjs.org/gulp-cli/-/gulp-cli-2.2.0.tgz",
            +					"integrity": "sha512-rGs3bVYHdyJpLqR0TUBnlcZ1O5O++Zs4bA0ajm+zr3WFCfiSLjGwoCBqFs18wzN+ZxahT9DkOK5nDf26iDsWjA==",
            +					"dev": true,
            +					"requires": {
            +						"ansi-colors": "^1.0.1",
            +						"archy": "^1.0.0",
            +						"array-sort": "^1.0.0",
            +						"color-support": "^1.1.3",
            +						"concat-stream": "^1.6.0",
            +						"copy-props": "^2.0.1",
            +						"fancy-log": "^1.3.2",
            +						"gulplog": "^1.0.0",
            +						"interpret": "^1.1.0",
            +						"isobject": "^3.0.1",
            +						"liftoff": "^3.1.0",
            +						"matchdep": "^2.0.0",
            +						"mute-stdout": "^1.0.0",
            +						"pretty-hrtime": "^1.0.0",
            +						"replace-homedir": "^1.0.0",
            +						"semver-greatest-satisfied-range": "^1.1.0",
            +						"v8flags": "^3.0.1",
            +						"yargs": "^7.1.0"
            +					}
            +				},
            +				"yargs": {
            +					"version": "7.1.0",
            +					"resolved": "https://registry.npmjs.org/yargs/-/yargs-7.1.0.tgz",
            +					"integrity": "sha1-a6MY6xaWFyf10oT46gA+jWFU0Mg=",
            +					"dev": true,
            +					"requires": {
            +						"camelcase": "^3.0.0",
            +						"cliui": "^3.2.0",
            +						"decamelize": "^1.1.1",
            +						"get-caller-file": "^1.0.1",
            +						"os-locale": "^1.4.0",
            +						"read-pkg-up": "^1.0.1",
            +						"require-directory": "^2.1.1",
            +						"require-main-filename": "^1.0.1",
            +						"set-blocking": "^2.0.0",
            +						"string-width": "^1.0.2",
            +						"which-module": "^1.0.0",
            +						"y18n": "^3.2.1",
            +						"yargs-parser": "^5.0.0"
            +					}
            +				}
            +			}
            +		},
            +		"gulp-concat": {
            +			"version": "2.6.1",
            +			"resolved": "https://registry.npmjs.org/gulp-concat/-/gulp-concat-2.6.1.tgz",
            +			"integrity": "sha1-Yz0WyV2IUEYorQJmVmPO5aR5M1M=",
            +			"dev": true,
            +			"requires": {
            +				"concat-with-sourcemaps": "^1.0.0",
            +				"through2": "^2.0.0",
            +				"vinyl": "^2.0.0"
            +			}
            +		},
            +		"gulp-header": {
            +			"version": "2.0.7",
            +			"resolved": "https://registry.npmjs.org/gulp-header/-/gulp-header-2.0.7.tgz",
            +			"integrity": "sha512-qppGkYGQZnt/mRJiiR5wYZIUwNUn47Xpg4+6tHYDVeAW5IDLbHBQwbw7axfMLWGE+gKQpB+yXLeslHMw1/Haog==",
            +			"dev": true,
            +			"requires": {
            +				"concat-with-sourcemaps": "^1.1.0",
            +				"lodash.template": "^4.4.0",
            +				"map-stream": "0.0.7",
            +				"through2": "^2.0.0"
            +			}
            +		},
            +		"gulp-jsdoc3": {
            +			"version": "3.0.0",
            +			"resolved": "https://registry.npmjs.org/gulp-jsdoc3/-/gulp-jsdoc3-3.0.0.tgz",
            +			"integrity": "sha512-rE2jAwCPA8XFi9g4V3Z3LPhZNjxuMTIYQVMjdqZAQpRfJITLVaUK3xfmiiNTMc7j+fT7pL8Q5yj7ZPRdwCJWNg==",
            +			"dev": true,
            +			"requires": {
            +				"ansi-colors": "^4.1.1",
            +				"beeper": "^2.0.0",
            +				"debug": "^4.1.1",
            +				"fancy-log": "^1.3.3",
            +				"ink-docstrap": "^1.3.2",
            +				"jsdoc": "^3.6.3",
            +				"map-stream": "0.0.7",
            +				"tmp": "0.1.0"
            +			},
            +			"dependencies": {
            +				"ansi-colors": {
            +					"version": "4.1.1",
            +					"resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz",
            +					"integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==",
            +					"dev": true
            +				},
            +				"debug": {
            +					"version": "4.1.1",
            +					"resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz",
            +					"integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==",
            +					"dev": true,
            +					"requires": {
            +						"ms": "^2.1.1"
            +					}
            +				},
            +				"ms": {
            +					"version": "2.1.2",
            +					"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
            +					"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
            +					"dev": true
            +				}
            +			}
            +		},
            +		"gulp-rename": {
            +			"version": "1.4.0",
            +			"resolved": "https://registry.npmjs.org/gulp-rename/-/gulp-rename-1.4.0.tgz",
            +			"integrity": "sha512-swzbIGb/arEoFK89tPY58vg3Ok1bw+d35PfUNwWqdo7KM4jkmuGA78JiDNqR+JeZFaeeHnRg9N7aihX3YPmsyg==",
            +			"dev": true
            +		},
            +		"gulp-replace": {
            +			"version": "1.0.0",
            +			"resolved": "https://registry.npmjs.org/gulp-replace/-/gulp-replace-1.0.0.tgz",
            +			"integrity": "sha512-lgdmrFSI1SdhNMXZQbrC75MOl1UjYWlOWNbNRnz+F/KHmgxt3l6XstBoAYIdadwETFyG/6i+vWUSCawdC3pqOw==",
            +			"dev": true,
            +			"requires": {
            +				"istextorbinary": "2.2.1",
            +				"readable-stream": "^2.0.1",
            +				"replacestream": "^4.0.0"
            +			}
            +		},
            +		"gulp-uglify": {
            +			"version": "3.0.2",
            +			"resolved": "https://registry.npmjs.org/gulp-uglify/-/gulp-uglify-3.0.2.tgz",
            +			"integrity": "sha512-gk1dhB74AkV2kzqPMQBLA3jPoIAPd/nlNzP2XMDSG8XZrqnlCiDGAqC+rZOumzFvB5zOphlFh6yr3lgcAb/OOg==",
            +			"dev": true,
            +			"requires": {
            +				"array-each": "^1.0.1",
            +				"extend-shallow": "^3.0.2",
            +				"gulplog": "^1.0.0",
            +				"has-gulplog": "^0.1.0",
            +				"isobject": "^3.0.1",
            +				"make-error-cause": "^1.1.1",
            +				"safe-buffer": "^5.1.2",
            +				"through2": "^2.0.0",
            +				"uglify-js": "^3.0.5",
            +				"vinyl-sourcemaps-apply": "^0.2.0"
            +			}
            +		},
            +		"gulplog": {
            +			"version": "1.0.0",
            +			"resolved": "https://registry.npmjs.org/gulplog/-/gulplog-1.0.0.tgz",
            +			"integrity": "sha1-4oxNRdBey77YGDY86PnFkmIp/+U=",
            +			"dev": true,
            +			"requires": {
            +				"glogg": "^1.0.0"
            +			}
            +		},
            +		"gzip-size": {
            +			"version": "5.1.1",
            +			"resolved": "https://registry.npmjs.org/gzip-size/-/gzip-size-5.1.1.tgz",
            +			"integrity": "sha512-FNHi6mmoHvs1mxZAds4PpdCS6QG8B4C1krxJsMutgxl5t3+GlRTzzI3NEkifXx2pVsOvJdOGSmIgDhQ55FwdPA==",
            +			"dev": true,
            +			"requires": {
            +				"duplexer": "^0.1.1",
            +				"pify": "^4.0.1"
            +			},
            +			"dependencies": {
            +				"pify": {
            +					"version": "4.0.1",
            +					"resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz",
            +					"integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==",
            +					"dev": true
            +				}
            +			}
            +		},
            +		"har-schema": {
            +			"version": "2.0.0",
            +			"resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz",
            +			"integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=",
            +			"dev": true
            +		},
            +		"har-validator": {
            +			"version": "5.1.3",
            +			"resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.3.tgz",
            +			"integrity": "sha512-sNvOCzEQNr/qrvJgc3UG/kD4QtlHycrzwS+6mfTrrSq97BvaYcPZZI1ZSqGSPR73Cxn4LKTD4PttRwfU7jWq5g==",
            +			"dev": true,
            +			"requires": {
            +				"ajv": "^6.5.5",
            +				"har-schema": "^2.0.0"
            +			}
            +		},
            +		"has": {
            +			"version": "1.0.3",
            +			"resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz",
            +			"integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==",
            +			"dev": true,
            +			"requires": {
            +				"function-bind": "^1.1.1"
            +			}
            +		},
            +		"has-bigints": {
            +			"version": "1.0.1",
            +			"resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.1.tgz",
            +			"integrity": "sha512-LSBS2LjbNBTf6287JEbEzvJgftkF5qFkmCo9hDRpAzKhUOlJ+hx8dd4USs00SgsUNwc4617J9ki5YtEClM2ffA==",
            +			"dev": true
            +		},
            +		"has-flag": {
            +			"version": "3.0.0",
            +			"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
            +			"integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=",
            +			"dev": true
            +		},
            +		"has-gulplog": {
            +			"version": "0.1.0",
            +			"resolved": "https://registry.npmjs.org/has-gulplog/-/has-gulplog-0.1.0.tgz",
            +			"integrity": "sha1-ZBTIKRNpfaUVkDl9r7EvIpZ4Ec4=",
            +			"dev": true,
            +			"requires": {
            +				"sparkles": "^1.0.0"
            +			}
            +		},
            +		"has-symbols": {
            +			"version": "1.0.0",
            +			"resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.0.tgz",
            +			"integrity": "sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q=",
            +			"dev": true
            +		},
            +		"has-value": {
            +			"version": "1.0.0",
            +			"resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz",
            +			"integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=",
            +			"dev": true,
            +			"requires": {
            +				"get-value": "^2.0.6",
            +				"has-values": "^1.0.0",
            +				"isobject": "^3.0.0"
            +			}
            +		},
            +		"has-values": {
            +			"version": "1.0.0",
            +			"resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz",
            +			"integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=",
            +			"dev": true,
            +			"requires": {
            +				"is-number": "^3.0.0",
            +				"kind-of": "^4.0.0"
            +			},
            +			"dependencies": {
            +				"kind-of": {
            +					"version": "4.0.0",
            +					"resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz",
            +					"integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=",
            +					"dev": true,
            +					"requires": {
            +						"is-buffer": "^1.1.5"
            +					}
            +				}
            +			}
            +		},
            +		"hasurl": {
            +			"version": "1.0.0",
            +			"resolved": "https://registry.npmjs.org/hasurl/-/hasurl-1.0.0.tgz",
            +			"integrity": "sha512-43ypUd3DbwyCT01UYpA99AEZxZ4aKtRxWGBHEIbjcOsUghd9YUON0C+JF6isNjaiwC/UF5neaUudy6JS9jZPZQ==",
            +			"dev": true
            +		},
            +		"he": {
            +			"version": "1.2.0",
            +			"resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz",
            +			"integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==",
            +			"dev": true
            +		},
            +		"homedir-polyfill": {
            +			"version": "1.0.3",
            +			"resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz",
            +			"integrity": "sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA==",
            +			"dev": true,
            +			"requires": {
            +				"parse-passwd": "^1.0.0"
            +			}
            +		},
            +		"hosted-git-info": {
            +			"version": "2.8.9",
            +			"resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz",
            +			"integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==",
            +			"dev": true
            +		},
            +		"html-encoding-sniffer": {
            +			"version": "1.0.2",
            +			"resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-1.0.2.tgz",
            +			"integrity": "sha512-71lZziiDnsuabfdYiUeWdCVyKuqwWi23L8YeIgV9jSSZHCtb6wB1BKWooH7L3tn4/FuZJMVWyNaIDr4RGmaSYw==",
            +			"dev": true,
            +			"requires": {
            +				"whatwg-encoding": "^1.0.1"
            +			}
            +		},
            +		"htmlparser2": {
            +			"version": "4.0.0",
            +			"resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-4.0.0.tgz",
            +			"integrity": "sha512-cChwXn5Vam57fyXajDtPXL1wTYc8JtLbr2TN76FYu05itVVVealxLowe2B3IEznJG4p9HAYn/0tJaRlGuEglFQ==",
            +			"dev": true,
            +			"requires": {
            +				"domelementtype": "^2.0.1",
            +				"domhandler": "^3.0.0",
            +				"domutils": "^2.0.0",
            +				"entities": "^2.0.0"
            +			}
            +		},
            +		"http-proxy": {
            +			"version": "1.18.1",
            +			"resolved": "https://registry.npmjs.org/http-proxy/-/http-proxy-1.18.1.tgz",
            +			"integrity": "sha512-7mz/721AbnJwIVbnaSv1Cz3Am0ZLT/UBwkC92VlxhXv/k/BBQfM2fXElQNC27BVGr0uwUpplYPQM9LnaBMR5NQ==",
            +			"dev": true,
            +			"requires": {
            +				"eventemitter3": "^4.0.0",
            +				"follow-redirects": "^1.0.0",
            +				"requires-port": "^1.0.0"
            +			}
            +		},
            +		"http-proxy-agent": {
            +			"version": "2.1.0",
            +			"resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-2.1.0.tgz",
            +			"integrity": "sha512-qwHbBLV7WviBl0rQsOzH6o5lwyOIvwp/BdFnvVxXORldu5TmjFfjzBcWUWS5kWAZhmv+JtiDhSuQCp4sBfbIgg==",
            +			"dev": true,
            +			"requires": {
            +				"agent-base": "4",
            +				"debug": "3.1.0"
            +			},
            +			"dependencies": {
            +				"debug": {
            +					"version": "3.1.0",
            +					"resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz",
            +					"integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==",
            +					"dev": true,
            +					"requires": {
            +						"ms": "2.0.0"
            +					}
            +				}
            +			}
            +		},
            +		"http-server": {
            +			"version": "0.12.3",
            +			"resolved": "https://registry.npmjs.org/http-server/-/http-server-0.12.3.tgz",
            +			"integrity": "sha512-be0dKG6pni92bRjq0kvExtj/NrrAd28/8fCXkaI/4piTwQMSDSLMhWyW0NI1V+DBI3aa1HMlQu46/HjVLfmugA==",
            +			"dev": true,
            +			"requires": {
            +				"basic-auth": "^1.0.3",
            +				"colors": "^1.4.0",
            +				"corser": "^2.0.1",
            +				"ecstatic": "^3.3.2",
            +				"http-proxy": "^1.18.0",
            +				"minimist": "^1.2.5",
            +				"opener": "^1.5.1",
            +				"portfinder": "^1.0.25",
            +				"secure-compare": "3.0.1",
            +				"union": "~0.5.0"
            +			},
            +			"dependencies": {
            +				"minimist": {
            +					"version": "1.2.5",
            +					"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
            +					"integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==",
            +					"dev": true
            +				}
            +			}
            +		},
            +		"http-signature": {
            +			"version": "1.2.0",
            +			"resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz",
            +			"integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=",
            +			"dev": true,
            +			"requires": {
            +				"assert-plus": "^1.0.0",
            +				"jsprim": "^1.2.2",
            +				"sshpk": "^1.7.0"
            +			}
            +		},
            +		"https-proxy-agent": {
            +			"version": "2.2.4",
            +			"resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-2.2.4.tgz",
            +			"integrity": "sha512-OmvfoQ53WLjtA9HeYP9RNrWMJzzAz1JGaSFr1nijg0PVR1JaD/xbJq1mdEIIlxGpXp9eSe/O2LgU9DJmTPd0Eg==",
            +			"dev": true,
            +			"requires": {
            +				"agent-base": "^4.3.0",
            +				"debug": "^3.1.0"
            +			},
            +			"dependencies": {
            +				"debug": {
            +					"version": "3.2.6",
            +					"resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz",
            +					"integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==",
            +					"dev": true,
            +					"requires": {
            +						"ms": "^2.1.1"
            +					}
            +				},
            +				"ms": {
            +					"version": "2.1.2",
            +					"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
            +					"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
            +					"dev": true
            +				}
            +			}
            +		},
            +		"humps": {
            +			"version": "2.0.1",
            +			"resolved": "https://registry.npmjs.org/humps/-/humps-2.0.1.tgz",
            +			"integrity": "sha1-3QLqYIG9BWjcXQcxhEY5V7qe+ao=",
            +			"dev": true
            +		},
            +		"hyperlinker": {
            +			"version": "1.0.0",
            +			"resolved": "https://registry.npmjs.org/hyperlinker/-/hyperlinker-1.0.0.tgz",
            +			"integrity": "sha512-Ty8UblRWFEcfSuIaajM34LdPXIhbs1ajEX/BBPv24J+enSVaEVY63xQ6lTO9VRYS5LAoghIG0IDJ+p+IPzKUQQ==",
            +			"dev": true
            +		},
            +		"iconv-lite": {
            +			"version": "0.4.24",
            +			"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",
            +			"integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==",
            +			"dev": true,
            +			"requires": {
            +				"safer-buffer": ">= 2.1.2 < 3"
            +			}
            +		},
            +		"ignore": {
            +			"version": "4.0.6",
            +			"resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz",
            +			"integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==",
            +			"dev": true
            +		},
            +		"import-fresh": {
            +			"version": "2.0.0",
            +			"resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-2.0.0.tgz",
            +			"integrity": "sha1-2BNVwVYS04bGH53dOSLUMEgipUY=",
            +			"dev": true,
            +			"requires": {
            +				"caller-path": "^2.0.0",
            +				"resolve-from": "^3.0.0"
            +			},
            +			"dependencies": {
            +				"resolve-from": {
            +					"version": "3.0.0",
            +					"resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz",
            +					"integrity": "sha1-six699nWiBvItuZTM17rywoYh0g=",
            +					"dev": true
            +				}
            +			}
            +		},
            +		"imurmurhash": {
            +			"version": "0.1.4",
            +			"resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz",
            +			"integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=",
            +			"dev": true
            +		},
            +		"indent-string": {
            +			"version": "3.2.0",
            +			"resolved": "https://registry.npmjs.org/indent-string/-/indent-string-3.2.0.tgz",
            +			"integrity": "sha1-Sl/W0nzDMvN+VBmlBNu4NxBckok=",
            +			"dev": true
            +		},
            +		"inflight": {
            +			"version": "1.0.6",
            +			"resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
            +			"integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=",
            +			"dev": true,
            +			"requires": {
            +				"once": "^1.3.0",
            +				"wrappy": "1"
            +			}
            +		},
            +		"inherits": {
            +			"version": "2.0.3",
            +			"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
            +			"integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=",
            +			"dev": true
            +		},
            +		"ini": {
            +			"version": "1.3.7",
            +			"resolved": "https://registry.npmjs.org/ini/-/ini-1.3.7.tgz",
            +			"integrity": "sha512-iKpRpXP+CrP2jyrxvg1kMUpXDyRUFDWurxbnVT1vQPx+Wz9uCYsMIqYuSBLV+PAaZG/d7kRLKRFc9oDMsH+mFQ==",
            +			"dev": true
            +		},
            +		"ink-docstrap": {
            +			"version": "1.3.2",
            +			"resolved": "https://registry.npmjs.org/ink-docstrap/-/ink-docstrap-1.3.2.tgz",
            +			"integrity": "sha512-STx5orGQU1gfrkoI/fMU7lX6CSP7LBGO10gXNgOZhwKhUqbtNjCkYSewJtNnLmWP1tAGN6oyEpG1HFPw5vpa5Q==",
            +			"dev": true,
            +			"requires": {
            +				"moment": "^2.14.1",
            +				"sanitize-html": "^1.13.0"
            +			}
            +		},
            +		"interpret": {
            +			"version": "1.2.0",
            +			"resolved": "https://registry.npmjs.org/interpret/-/interpret-1.2.0.tgz",
            +			"integrity": "sha512-mT34yGKMNceBQUoVn7iCDKDntA7SC6gycMAWzGx1z/CMCTV7b2AAtXlo3nRyHZ1FelRkQbQjprHSYGwzLtkVbw==",
            +			"dev": true
            +		},
            +		"invert-kv": {
            +			"version": "1.0.0",
            +			"resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz",
            +			"integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=",
            +			"dev": true
            +		},
            +		"is-absolute": {
            +			"version": "1.0.0",
            +			"resolved": "https://registry.npmjs.org/is-absolute/-/is-absolute-1.0.0.tgz",
            +			"integrity": "sha512-dOWoqflvcydARa360Gvv18DZ/gRuHKi2NU/wU5X1ZFzdYfH29nkiNZsF3mp4OJ3H4yo9Mx8A/uAGNzpzPN3yBA==",
            +			"dev": true,
            +			"requires": {
            +				"is-relative": "^1.0.0",
            +				"is-windows": "^1.0.1"
            +			}
            +		},
            +		"is-accessor-descriptor": {
            +			"version": "0.1.6",
            +			"resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz",
            +			"integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=",
            +			"dev": true,
            +			"requires": {
            +				"kind-of": "^3.0.2"
            +			},
            +			"dependencies": {
            +				"kind-of": {
            +					"version": "3.2.2",
            +					"resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
            +					"integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
            +					"dev": true,
            +					"requires": {
            +						"is-buffer": "^1.1.5"
            +					}
            +				}
            +			}
            +		},
            +		"is-arrayish": {
            +			"version": "0.2.1",
            +			"resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz",
            +			"integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=",
            +			"dev": true
            +		},
            +		"is-bigint": {
            +			"version": "1.0.2",
            +			"resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.2.tgz",
            +			"integrity": "sha512-0JV5+SOCQkIdzjBK9buARcV804Ddu7A0Qet6sHi3FimE9ne6m4BGQZfRn+NZiXbBk4F4XmHfDZIipLj9pX8dSA==",
            +			"dev": true
            +		},
            +		"is-binary-path": {
            +			"version": "1.0.1",
            +			"resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz",
            +			"integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=",
            +			"dev": true,
            +			"requires": {
            +				"binary-extensions": "^1.0.0"
            +			}
            +		},
            +		"is-boolean-object": {
            +			"version": "1.1.1",
            +			"resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.1.tgz",
            +			"integrity": "sha512-bXdQWkECBUIAcCkeH1unwJLIpZYaa5VvuygSyS/c2lf719mTKZDU5UdDRlpd01UjADgmW8RfqaP+mRaVPdr/Ng==",
            +			"dev": true,
            +			"requires": {
            +				"call-bind": "^1.0.2"
            +			}
            +		},
            +		"is-buffer": {
            +			"version": "1.1.6",
            +			"resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz",
            +			"integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==",
            +			"dev": true
            +		},
            +		"is-callable": {
            +			"version": "1.1.4",
            +			"resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.4.tgz",
            +			"integrity": "sha512-r5p9sxJjYnArLjObpjA4xu5EKI3CuKHkJXMhT7kwbpUyIFD1n5PMAsoPvWnvtZiNz7LjkYDRZhd7FlI0eMijEA==",
            +			"dev": true
            +		},
            +		"is-data-descriptor": {
            +			"version": "0.1.4",
            +			"resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz",
            +			"integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=",
            +			"dev": true,
            +			"requires": {
            +				"kind-of": "^3.0.2"
            +			},
            +			"dependencies": {
            +				"kind-of": {
            +					"version": "3.2.2",
            +					"resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
            +					"integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
            +					"dev": true,
            +					"requires": {
            +						"is-buffer": "^1.1.5"
            +					}
            +				}
            +			}
            +		},
            +		"is-date-object": {
            +			"version": "1.0.1",
            +			"resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.1.tgz",
            +			"integrity": "sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY=",
            +			"dev": true
            +		},
            +		"is-descriptor": {
            +			"version": "0.1.6",
            +			"resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz",
            +			"integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==",
            +			"dev": true,
            +			"requires": {
            +				"is-accessor-descriptor": "^0.1.6",
            +				"is-data-descriptor": "^0.1.4",
            +				"kind-of": "^5.0.0"
            +			},
            +			"dependencies": {
            +				"kind-of": {
            +					"version": "5.1.0",
            +					"resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz",
            +					"integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==",
            +					"dev": true
            +				}
            +			}
            +		},
            +		"is-directory": {
            +			"version": "0.3.1",
            +			"resolved": "https://registry.npmjs.org/is-directory/-/is-directory-0.3.1.tgz",
            +			"integrity": "sha1-YTObbyR1/Hcv2cnYP1yFddwVSuE=",
            +			"dev": true
            +		},
            +		"is-extendable": {
            +			"version": "0.1.1",
            +			"resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz",
            +			"integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=",
            +			"dev": true
            +		},
            +		"is-extglob": {
            +			"version": "2.1.1",
            +			"resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
            +			"integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=",
            +			"dev": true
            +		},
            +		"is-fullwidth-code-point": {
            +			"version": "1.0.0",
            +			"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz",
            +			"integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=",
            +			"dev": true,
            +			"requires": {
            +				"number-is-nan": "^1.0.0"
            +			}
            +		},
            +		"is-glob": {
            +			"version": "4.0.1",
            +			"resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz",
            +			"integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==",
            +			"dev": true,
            +			"requires": {
            +				"is-extglob": "^2.1.1"
            +			}
            +		},
            +		"is-negated-glob": {
            +			"version": "1.0.0",
            +			"resolved": "https://registry.npmjs.org/is-negated-glob/-/is-negated-glob-1.0.0.tgz",
            +			"integrity": "sha1-aRC8pdqMleeEtXUbl2z1oQ/uNtI=",
            +			"dev": true
            +		},
            +		"is-negative-zero": {
            +			"version": "2.0.1",
            +			"resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.1.tgz",
            +			"integrity": "sha512-2z6JzQvZRa9A2Y7xC6dQQm4FSTSTNWjKIYYTt4246eMTJmIo0Q+ZyOsU66X8lxK1AbB92dFeglPLrhwpeRKO6w==",
            +			"dev": true
            +		},
            +		"is-number": {
            +			"version": "3.0.0",
            +			"resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz",
            +			"integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=",
            +			"dev": true,
            +			"requires": {
            +				"kind-of": "^3.0.2"
            +			},
            +			"dependencies": {
            +				"kind-of": {
            +					"version": "3.2.2",
            +					"resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
            +					"integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
            +					"dev": true,
            +					"requires": {
            +						"is-buffer": "^1.1.5"
            +					}
            +				}
            +			}
            +		},
            +		"is-number-object": {
            +			"version": "1.0.5",
            +			"resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.5.tgz",
            +			"integrity": "sha512-RU0lI/n95pMoUKu9v1BZP5MBcZuNSVJkMkAG2dJqC4z2GlkGUNeH68SuHuBKBD/XFe+LHZ+f9BKkLET60Niedw==",
            +			"dev": true
            +		},
            +		"is-path-cwd": {
            +			"version": "2.1.0",
            +			"resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-2.1.0.tgz",
            +			"integrity": "sha512-Sc5j3/YnM8tDeyCsVeKlm/0p95075DyLmDEIkSgQ7mXkrOX+uTCtmQFm0CYzVyJwcCCmO3k8qfJt17SxQwB5Zw==",
            +			"dev": true
            +		},
            +		"is-path-in-cwd": {
            +			"version": "2.1.0",
            +			"resolved": "https://registry.npmjs.org/is-path-in-cwd/-/is-path-in-cwd-2.1.0.tgz",
            +			"integrity": "sha512-rNocXHgipO+rvnP6dk3zI20RpOtrAM/kzbB258Uw5BWr3TpXi861yzjo16Dn4hUox07iw5AyeMLHWsujkjzvRQ==",
            +			"dev": true,
            +			"requires": {
            +				"is-path-inside": "^2.1.0"
            +			}
            +		},
            +		"is-path-inside": {
            +			"version": "2.1.0",
            +			"resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-2.1.0.tgz",
            +			"integrity": "sha512-wiyhTzfDWsvwAW53OBWF5zuvaOGlZ6PwYxAbPVDhpm+gM09xKQGjBq/8uYN12aDvMxnAnq3dxTyoSoRNmg5YFg==",
            +			"dev": true,
            +			"requires": {
            +				"path-is-inside": "^1.0.2"
            +			}
            +		},
            +		"is-plain-obj": {
            +			"version": "1.1.0",
            +			"resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz",
            +			"integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4=",
            +			"dev": true
            +		},
            +		"is-plain-object": {
            +			"version": "2.0.4",
            +			"resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz",
            +			"integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==",
            +			"dev": true,
            +			"requires": {
            +				"isobject": "^3.0.1"
            +			}
            +		},
            +		"is-regex": {
            +			"version": "1.0.4",
            +			"resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.4.tgz",
            +			"integrity": "sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=",
            +			"dev": true,
            +			"requires": {
            +				"has": "^1.0.1"
            +			}
            +		},
            +		"is-relative": {
            +			"version": "1.0.0",
            +			"resolved": "https://registry.npmjs.org/is-relative/-/is-relative-1.0.0.tgz",
            +			"integrity": "sha512-Kw/ReK0iqwKeu0MITLFuj0jbPAmEiOsIwyIXvvbfa6QfmN9pkD1M+8pdk7Rl/dTKbH34/XBFMbgD4iMJhLQbGA==",
            +			"dev": true,
            +			"requires": {
            +				"is-unc-path": "^1.0.0"
            +			}
            +		},
            +		"is-stream": {
            +			"version": "1.1.0",
            +			"resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz",
            +			"integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=",
            +			"dev": true
            +		},
            +		"is-string": {
            +			"version": "1.0.6",
            +			"resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.6.tgz",
            +			"integrity": "sha512-2gdzbKUuqtQ3lYNrUTQYoClPhm7oQu4UdpSZMp1/DGgkHBT8E2Z1l0yMdb6D4zNAxwDiMv8MdulKROJGNl0Q0w==",
            +			"dev": true
            +		},
            +		"is-symbol": {
            +			"version": "1.0.2",
            +			"resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.2.tgz",
            +			"integrity": "sha512-HS8bZ9ox60yCJLH9snBpIwv9pYUAkcuLhSA1oero1UB5y9aiQpRA8y2ex945AOtCZL1lJDeIk3G5LthswI46Lw==",
            +			"dev": true,
            +			"requires": {
            +				"has-symbols": "^1.0.0"
            +			}
            +		},
            +		"is-typedarray": {
            +			"version": "1.0.0",
            +			"resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz",
            +			"integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=",
            +			"dev": true
            +		},
            +		"is-unc-path": {
            +			"version": "1.0.0",
            +			"resolved": "https://registry.npmjs.org/is-unc-path/-/is-unc-path-1.0.0.tgz",
            +			"integrity": "sha512-mrGpVd0fs7WWLfVsStvgF6iEJnbjDFZh9/emhRDcGWTduTfNHd9CHeUwH3gYIjdbwo4On6hunkztwOaAw0yllQ==",
            +			"dev": true,
            +			"requires": {
            +				"unc-path-regex": "^0.1.2"
            +			}
            +		},
            +		"is-utf8": {
            +			"version": "0.2.1",
            +			"resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz",
            +			"integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=",
            +			"dev": true
            +		},
            +		"is-valid-glob": {
            +			"version": "1.0.0",
            +			"resolved": "https://registry.npmjs.org/is-valid-glob/-/is-valid-glob-1.0.0.tgz",
            +			"integrity": "sha1-Kb8+/3Ab4tTTFdusw5vDn+j2Aao=",
            +			"dev": true
            +		},
            +		"is-windows": {
            +			"version": "1.0.2",
            +			"resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz",
            +			"integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==",
            +			"dev": true
            +		},
            +		"isarray": {
            +			"version": "1.0.0",
            +			"resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
            +			"integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=",
            +			"dev": true
            +		},
            +		"isexe": {
            +			"version": "2.0.0",
            +			"resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
            +			"integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=",
            +			"dev": true
            +		},
            +		"isobject": {
            +			"version": "3.0.1",
            +			"resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz",
            +			"integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=",
            +			"dev": true
            +		},
            +		"isstream": {
            +			"version": "0.1.2",
            +			"resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz",
            +			"integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=",
            +			"dev": true
            +		},
            +		"istextorbinary": {
            +			"version": "2.2.1",
            +			"resolved": "https://registry.npmjs.org/istextorbinary/-/istextorbinary-2.2.1.tgz",
            +			"integrity": "sha512-TS+hoFl8Z5FAFMK38nhBkdLt44CclNRgDHWeMgsV8ko3nDlr/9UI2Sf839sW7enijf8oKsZYXRvM8g0it9Zmcw==",
            +			"dev": true,
            +			"requires": {
            +				"binaryextensions": "2",
            +				"editions": "^1.3.3",
            +				"textextensions": "2"
            +			}
            +		},
            +		"js-tokens": {
            +			"version": "4.0.0",
            +			"resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
            +			"integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==",
            +			"dev": true
            +		},
            +		"js-yaml": {
            +			"version": "3.13.1",
            +			"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz",
            +			"integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==",
            +			"dev": true,
            +			"requires": {
            +				"argparse": "^1.0.7",
            +				"esprima": "^4.0.0"
            +			},
            +			"dependencies": {
            +				"esprima": {
            +					"version": "4.0.1",
            +					"resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz",
            +					"integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==",
            +					"dev": true
            +				}
            +			}
            +		},
            +		"js2xmlparser": {
            +			"version": "4.0.1",
            +			"resolved": "https://registry.npmjs.org/js2xmlparser/-/js2xmlparser-4.0.1.tgz",
            +			"integrity": "sha512-KrPTolcw6RocpYjdC7pL7v62e55q7qOMHvLX1UCLc5AAS8qeJ6nukarEJAF2KL2PZxlbGueEbINqZR2bDe/gUw==",
            +			"dev": true,
            +			"requires": {
            +				"xmlcreate": "^2.0.3"
            +			}
            +		},
            +		"jsbn": {
            +			"version": "0.1.1",
            +			"resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz",
            +			"integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=",
            +			"dev": true
            +		},
            +		"jsdoc": {
            +			"version": "3.6.4",
            +			"resolved": "https://registry.npmjs.org/jsdoc/-/jsdoc-3.6.4.tgz",
            +			"integrity": "sha512-3G9d37VHv7MFdheviDCjUfQoIjdv4TC5zTTf5G9VODLtOnVS6La1eoYBDlbWfsRT3/Xo+j2MIqki2EV12BZfwA==",
            +			"dev": true,
            +			"requires": {
            +				"@babel/parser": "^7.9.4",
            +				"bluebird": "^3.7.2",
            +				"catharsis": "^0.8.11",
            +				"escape-string-regexp": "^2.0.0",
            +				"js2xmlparser": "^4.0.1",
            +				"klaw": "^3.0.0",
            +				"markdown-it": "^10.0.0",
            +				"markdown-it-anchor": "^5.2.7",
            +				"marked": "^0.8.2",
            +				"mkdirp": "^1.0.4",
            +				"requizzle": "^0.2.3",
            +				"strip-json-comments": "^3.1.0",
            +				"taffydb": "2.6.2",
            +				"underscore": "~1.10.2"
            +			},
            +			"dependencies": {
            +				"escape-string-regexp": {
            +					"version": "2.0.0",
            +					"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz",
            +					"integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==",
            +					"dev": true
            +				},
            +				"mkdirp": {
            +					"version": "1.0.4",
            +					"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz",
            +					"integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==",
            +					"dev": true
            +				},
            +				"strip-json-comments": {
            +					"version": "3.1.0",
            +					"resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.0.tgz",
            +					"integrity": "sha512-e6/d0eBu7gHtdCqFt0xJr642LdToM5/cN4Qb9DbHjVx1CP5RyeM+zH7pbecEmDv/lBqb0QH+6Uqq75rxFPkM0w==",
            +					"dev": true
            +				}
            +			}
            +		},
            +		"jsdoctypeparser": {
            +			"version": "9.0.0",
            +			"resolved": "https://registry.npmjs.org/jsdoctypeparser/-/jsdoctypeparser-9.0.0.tgz",
            +			"integrity": "sha512-jrTA2jJIL6/DAEILBEh2/w9QxCuwmvNXIry39Ay/HVfhE3o2yVV0U44blYkqdHA/OKloJEqvJy0xU+GSdE2SIw==",
            +			"dev": true
            +		},
            +		"jsdom": {
            +			"version": "13.2.0",
            +			"resolved": "https://registry.npmjs.org/jsdom/-/jsdom-13.2.0.tgz",
            +			"integrity": "sha512-cG1NtMWO9hWpqRNRR3dSvEQa8bFI6iLlqU2x4kwX51FQjp0qus8T9aBaAO6iGp3DeBrhdwuKxckknohkmfvsFw==",
            +			"dev": true,
            +			"requires": {
            +				"abab": "^2.0.0",
            +				"acorn": "^6.0.4",
            +				"acorn-globals": "^4.3.0",
            +				"array-equal": "^1.0.0",
            +				"cssom": "^0.3.4",
            +				"cssstyle": "^1.1.1",
            +				"data-urls": "^1.1.0",
            +				"domexception": "^1.0.1",
            +				"escodegen": "^1.11.0",
            +				"html-encoding-sniffer": "^1.0.2",
            +				"nwsapi": "^2.0.9",
            +				"parse5": "5.1.0",
            +				"pn": "^1.1.0",
            +				"request": "^2.88.0",
            +				"request-promise-native": "^1.0.5",
            +				"saxes": "^3.1.5",
            +				"symbol-tree": "^3.2.2",
            +				"tough-cookie": "^2.5.0",
            +				"w3c-hr-time": "^1.0.1",
            +				"w3c-xmlserializer": "^1.0.1",
            +				"webidl-conversions": "^4.0.2",
            +				"whatwg-encoding": "^1.0.5",
            +				"whatwg-mimetype": "^2.3.0",
            +				"whatwg-url": "^7.0.0",
            +				"ws": "^6.1.2",
            +				"xml-name-validator": "^3.0.0"
            +			}
            +		},
            +		"json-parse-better-errors": {
            +			"version": "1.0.2",
            +			"resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz",
            +			"integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==",
            +			"dev": true
            +		},
            +		"json-schema": {
            +			"version": "0.2.3",
            +			"resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz",
            +			"integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=",
            +			"dev": true
            +		},
            +		"json-schema-traverse": {
            +			"version": "0.4.1",
            +			"resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
            +			"integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==",
            +			"dev": true
            +		},
            +		"json-stable-stringify-without-jsonify": {
            +			"version": "1.0.1",
            +			"resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz",
            +			"integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=",
            +			"dev": true
            +		},
            +		"json-stringify-safe": {
            +			"version": "5.0.1",
            +			"resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz",
            +			"integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=",
            +			"dev": true
            +		},
            +		"json5": {
            +			"version": "2.1.3",
            +			"resolved": "https://registry.npmjs.org/json5/-/json5-2.1.3.tgz",
            +			"integrity": "sha512-KXPvOm8K9IJKFM0bmdn8QXh7udDh1g/giieX0NLCaMnb4hEiVFqnop2ImTXCc5e0/oHz3LTqmHGtExn5hfMkOA==",
            +			"dev": true,
            +			"requires": {
            +				"minimist": "^1.2.5"
            +			},
            +			"dependencies": {
            +				"minimist": {
            +					"version": "1.2.5",
            +					"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
            +					"integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==",
            +					"dev": true
            +				}
            +			}
            +		},
            +		"jsonfile": {
            +			"version": "4.0.0",
            +			"resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz",
            +			"integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=",
            +			"dev": true,
            +			"requires": {
            +				"graceful-fs": "^4.1.6"
            +			}
            +		},
            +		"jsonpointer": {
            +			"version": "4.1.0",
            +			"resolved": "https://registry.npmjs.org/jsonpointer/-/jsonpointer-4.1.0.tgz",
            +			"integrity": "sha512-CXcRvMyTlnR53xMcKnuMzfCA5i/nfblTnnr74CZb6C4vG39eu6w51t7nKmU5MfLfbTgGItliNyjO/ciNPDqClg==",
            +			"dev": true
            +		},
            +		"jsonwebtoken": {
            +			"version": "8.5.1",
            +			"resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-8.5.1.tgz",
            +			"integrity": "sha512-XjwVfRS6jTMsqYs0EsuJ4LGxXV14zQybNd4L2r0UvbVnSF9Af8x7p5MzbJ90Ioz/9TI41/hTCvznF/loiSzn8w==",
            +			"dev": true,
            +			"requires": {
            +				"jws": "^3.2.2",
            +				"lodash.includes": "^4.3.0",
            +				"lodash.isboolean": "^3.0.3",
            +				"lodash.isinteger": "^4.0.4",
            +				"lodash.isnumber": "^3.0.3",
            +				"lodash.isplainobject": "^4.0.6",
            +				"lodash.isstring": "^4.0.1",
            +				"lodash.once": "^4.0.0",
            +				"ms": "^2.1.1",
            +				"semver": "^5.6.0"
            +			},
            +			"dependencies": {
            +				"ms": {
            +					"version": "2.1.2",
            +					"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
            +					"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
            +					"dev": true
            +				}
            +			}
            +		},
            +		"jsprim": {
            +			"version": "1.4.1",
            +			"resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz",
            +			"integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=",
            +			"dev": true,
            +			"requires": {
            +				"assert-plus": "1.0.0",
            +				"extsprintf": "1.3.0",
            +				"json-schema": "0.2.3",
            +				"verror": "1.10.0"
            +			}
            +		},
            +		"just-debounce": {
            +			"version": "1.0.0",
            +			"resolved": "https://registry.npmjs.org/just-debounce/-/just-debounce-1.0.0.tgz",
            +			"integrity": "sha1-h/zPrv/AtozRnVX2cilD+SnqNeo=",
            +			"dev": true
            +		},
            +		"jwa": {
            +			"version": "1.4.1",
            +			"resolved": "https://registry.npmjs.org/jwa/-/jwa-1.4.1.tgz",
            +			"integrity": "sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA==",
            +			"dev": true,
            +			"requires": {
            +				"buffer-equal-constant-time": "1.0.1",
            +				"ecdsa-sig-formatter": "1.0.11",
            +				"safe-buffer": "^5.0.1"
            +			}
            +		},
            +		"jws": {
            +			"version": "3.2.2",
            +			"resolved": "https://registry.npmjs.org/jws/-/jws-3.2.2.tgz",
            +			"integrity": "sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA==",
            +			"dev": true,
            +			"requires": {
            +				"jwa": "^1.4.1",
            +				"safe-buffer": "^5.0.1"
            +			}
            +		},
            +		"kind-of": {
            +			"version": "6.0.3",
            +			"resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz",
            +			"integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==",
            +			"dev": true
            +		},
            +		"klaw": {
            +			"version": "3.0.0",
            +			"resolved": "https://registry.npmjs.org/klaw/-/klaw-3.0.0.tgz",
            +			"integrity": "sha512-0Fo5oir+O9jnXu5EefYbVK+mHMBeEVEy2cmctR1O1NECcCkPRreJKrS6Qt/j3KC2C148Dfo9i3pCmCMsdqGr0g==",
            +			"dev": true,
            +			"requires": {
            +				"graceful-fs": "^4.1.9"
            +			}
            +		},
            +		"ky": {
            +			"version": "0.12.0",
            +			"resolved": "https://registry.npmjs.org/ky/-/ky-0.12.0.tgz",
            +			"integrity": "sha512-t9b7v3V2fGwAcQnnDDQwKQGF55eWrf4pwi1RN08Fy8b/9GEwV7Ea0xQiaSW6ZbeghBHIwl8kgnla4vVo9seepQ==",
            +			"dev": true
            +		},
            +		"ky-universal": {
            +			"version": "0.3.0",
            +			"resolved": "https://registry.npmjs.org/ky-universal/-/ky-universal-0.3.0.tgz",
            +			"integrity": "sha512-CM4Bgb2zZZpsprcjI6DNYTaH3oGHXL2u7BU4DK+lfCuC4snkt9/WRpMYeKbBbXscvKkeqBwzzjFX2WwmKY5K/A==",
            +			"dev": true,
            +			"requires": {
            +				"abort-controller": "^3.0.0",
            +				"node-fetch": "^2.6.0"
            +			}
            +		},
            +		"last-run": {
            +			"version": "1.1.1",
            +			"resolved": "https://registry.npmjs.org/last-run/-/last-run-1.1.1.tgz",
            +			"integrity": "sha1-RblpQsF7HHnHchmCWbqUO+v4yls=",
            +			"dev": true,
            +			"requires": {
            +				"default-resolution": "^2.0.0",
            +				"es6-weak-map": "^2.0.1"
            +			}
            +		},
            +		"lazystream": {
            +			"version": "1.0.0",
            +			"resolved": "https://registry.npmjs.org/lazystream/-/lazystream-1.0.0.tgz",
            +			"integrity": "sha1-9plf4PggOS9hOWvolGJAe7dxaOQ=",
            +			"dev": true,
            +			"requires": {
            +				"readable-stream": "^2.0.5"
            +			}
            +		},
            +		"lcid": {
            +			"version": "1.0.0",
            +			"resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz",
            +			"integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=",
            +			"dev": true,
            +			"requires": {
            +				"invert-kv": "^1.0.0"
            +			}
            +		},
            +		"lead": {
            +			"version": "1.0.0",
            +			"resolved": "https://registry.npmjs.org/lead/-/lead-1.0.0.tgz",
            +			"integrity": "sha1-bxT5mje+Op3XhPVJVpDlkDRm7kI=",
            +			"dev": true,
            +			"requires": {
            +				"flush-write-stream": "^1.0.2"
            +			}
            +		},
            +		"levn": {
            +			"version": "0.3.0",
            +			"resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz",
            +			"integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=",
            +			"dev": true,
            +			"requires": {
            +				"prelude-ls": "~1.1.2",
            +				"type-check": "~0.3.2"
            +			}
            +		},
            +		"li": {
            +			"version": "1.3.0",
            +			"resolved": "https://registry.npmjs.org/li/-/li-1.3.0.tgz",
            +			"integrity": "sha1-IsWbyu+qmo7zWc91l4TkvxBq6hs=",
            +			"dev": true
            +		},
            +		"liftoff": {
            +			"version": "3.1.0",
            +			"resolved": "https://registry.npmjs.org/liftoff/-/liftoff-3.1.0.tgz",
            +			"integrity": "sha512-DlIPlJUkCV0Ips2zf2pJP0unEoT1kwYhiiPUGF3s/jtxTCjziNLoiVVh+jqWOWeFi6mmwQ5fNxvAUyPad4Dfog==",
            +			"dev": true,
            +			"requires": {
            +				"extend": "^3.0.0",
            +				"findup-sync": "^3.0.0",
            +				"fined": "^1.0.1",
            +				"flagged-respawn": "^1.0.0",
            +				"is-plain-object": "^2.0.4",
            +				"object.map": "^1.0.0",
            +				"rechoir": "^0.6.2",
            +				"resolve": "^1.1.7"
            +			}
            +		},
            +		"linkify-it": {
            +			"version": "2.2.0",
            +			"resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-2.2.0.tgz",
            +			"integrity": "sha512-GnAl/knGn+i1U/wjBz3akz2stz+HrHLsxMwHQGofCDfPvlf+gDKN58UtfmUquTY4/MXeE2x7k19KQmeoZi94Iw==",
            +			"dev": true,
            +			"requires": {
            +				"uc.micro": "^1.0.1"
            +			}
            +		},
            +		"load-json-file": {
            +			"version": "1.1.0",
            +			"resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz",
            +			"integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=",
            +			"dev": true,
            +			"requires": {
            +				"graceful-fs": "^4.1.2",
            +				"parse-json": "^2.2.0",
            +				"pify": "^2.0.0",
            +				"pinkie-promise": "^2.0.0",
            +				"strip-bom": "^2.0.0"
            +			}
            +		},
            +		"locate-path": {
            +			"version": "3.0.0",
            +			"resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz",
            +			"integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==",
            +			"dev": true,
            +			"requires": {
            +				"p-locate": "^3.0.0",
            +				"path-exists": "^3.0.0"
            +			},
            +			"dependencies": {
            +				"path-exists": {
            +					"version": "3.0.0",
            +					"resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz",
            +					"integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=",
            +					"dev": true
            +				}
            +			}
            +		},
            +		"lodash": {
            +			"version": "4.17.21",
            +			"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
            +			"integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==",
            +			"dev": true
            +		},
            +		"lodash._reinterpolate": {
            +			"version": "3.0.0",
            +			"resolved": "https://registry.npmjs.org/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz",
            +			"integrity": "sha1-DM8tiRZq8Ds2Y8eWU4t1rG4RTZ0=",
            +			"dev": true
            +		},
            +		"lodash.find": {
            +			"version": "4.6.0",
            +			"resolved": "https://registry.npmjs.org/lodash.find/-/lodash.find-4.6.0.tgz",
            +			"integrity": "sha1-ywcE1Hq3F4n/oN6Ll92Sb7iLE7E=",
            +			"dev": true
            +		},
            +		"lodash.get": {
            +			"version": "4.4.2",
            +			"resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz",
            +			"integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk=",
            +			"dev": true
            +		},
            +		"lodash.includes": {
            +			"version": "4.3.0",
            +			"resolved": "https://registry.npmjs.org/lodash.includes/-/lodash.includes-4.3.0.tgz",
            +			"integrity": "sha1-YLuYqHy5I8aMoeUTJUgzFISfVT8=",
            +			"dev": true
            +		},
            +		"lodash.isboolean": {
            +			"version": "3.0.3",
            +			"resolved": "https://registry.npmjs.org/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz",
            +			"integrity": "sha1-bC4XHbKiV82WgC/UOwGyDV9YcPY=",
            +			"dev": true
            +		},
            +		"lodash.isinteger": {
            +			"version": "4.0.4",
            +			"resolved": "https://registry.npmjs.org/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz",
            +			"integrity": "sha1-YZwK89A/iwTDH1iChAt3sRzWg0M=",
            +			"dev": true
            +		},
            +		"lodash.isnumber": {
            +			"version": "3.0.3",
            +			"resolved": "https://registry.npmjs.org/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz",
            +			"integrity": "sha1-POdoEMWSjQM1IwGsKHMX8RwLH/w=",
            +			"dev": true
            +		},
            +		"lodash.isobject": {
            +			"version": "3.0.2",
            +			"resolved": "https://registry.npmjs.org/lodash.isobject/-/lodash.isobject-3.0.2.tgz",
            +			"integrity": "sha1-PI+41bW/S/kK4G4U8qUwpO2TXh0=",
            +			"dev": true
            +		},
            +		"lodash.isplainobject": {
            +			"version": "4.0.6",
            +			"resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz",
            +			"integrity": "sha1-fFJqUtibRcRcxpC4gWO+BJf1UMs=",
            +			"dev": true
            +		},
            +		"lodash.isstring": {
            +			"version": "4.0.1",
            +			"resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz",
            +			"integrity": "sha1-1SfftUVuynzJu5XV2ur4i6VKVFE=",
            +			"dev": true
            +		},
            +		"lodash.keys": {
            +			"version": "4.2.0",
            +			"resolved": "https://registry.npmjs.org/lodash.keys/-/lodash.keys-4.2.0.tgz",
            +			"integrity": "sha1-oIYCrBLk+4P5H8H7ejYKTZujUgU=",
            +			"dev": true
            +		},
            +		"lodash.mapvalues": {
            +			"version": "4.6.0",
            +			"resolved": "https://registry.npmjs.org/lodash.mapvalues/-/lodash.mapvalues-4.6.0.tgz",
            +			"integrity": "sha1-G6+lAF3p3W9PJmaMMMo3IwzJaJw=",
            +			"dev": true
            +		},
            +		"lodash.memoize": {
            +			"version": "4.1.2",
            +			"resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz",
            +			"integrity": "sha1-vMbEmkKihA7Zl/Mj6tpezRguC/4=",
            +			"dev": true
            +		},
            +		"lodash.once": {
            +			"version": "4.1.1",
            +			"resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz",
            +			"integrity": "sha1-DdOXEhPHxW34gJd9UEyI+0cal6w=",
            +			"dev": true
            +		},
            +		"lodash.set": {
            +			"version": "4.3.2",
            +			"resolved": "https://registry.npmjs.org/lodash.set/-/lodash.set-4.3.2.tgz",
            +			"integrity": "sha1-2HV7HagH3eJIFrDWqEvqGnYjCyM=",
            +			"dev": true
            +		},
            +		"lodash.sortby": {
            +			"version": "4.7.0",
            +			"resolved": "https://registry.npmjs.org/lodash.sortby/-/lodash.sortby-4.7.0.tgz",
            +			"integrity": "sha1-7dFMgk4sycHgsKG0K7UhBRakJDg=",
            +			"dev": true
            +		},
            +		"lodash.template": {
            +			"version": "4.4.0",
            +			"resolved": "https://registry.npmjs.org/lodash.template/-/lodash.template-4.4.0.tgz",
            +			"integrity": "sha1-5zoDhcg1VZF0bgILmWecaQ5o+6A=",
            +			"dev": true,
            +			"requires": {
            +				"lodash._reinterpolate": "~3.0.0",
            +				"lodash.templatesettings": "^4.0.0"
            +			}
            +		},
            +		"lodash.templatesettings": {
            +			"version": "4.1.0",
            +			"resolved": "https://registry.npmjs.org/lodash.templatesettings/-/lodash.templatesettings-4.1.0.tgz",
            +			"integrity": "sha1-K01OlbpEDZFf8IvImeRVNmZxMxY=",
            +			"dev": true,
            +			"requires": {
            +				"lodash._reinterpolate": "~3.0.0"
            +			}
            +		},
            +		"lodash.uniq": {
            +			"version": "4.5.0",
            +			"resolved": "https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz",
            +			"integrity": "sha1-0CJTc662Uq3BvILklFM5qEJ1R3M=",
            +			"dev": true
            +		},
            +		"log-symbols": {
            +			"version": "2.2.0",
            +			"resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-2.2.0.tgz",
            +			"integrity": "sha512-VeIAFslyIerEJLXHziedo2basKbMKtTw3vfn5IzG0XTjhAVEJyNHnL2p7vc+wBDSdQuUpNw3M2u6xb9QsAY5Eg==",
            +			"dev": true,
            +			"requires": {
            +				"chalk": "^2.0.1"
            +			}
            +		},
            +		"loud-rejection": {
            +			"version": "1.6.0",
            +			"resolved": "https://registry.npmjs.org/loud-rejection/-/loud-rejection-1.6.0.tgz",
            +			"integrity": "sha1-W0b4AUft7leIcPCG0Eghz5mOVR8=",
            +			"dev": true,
            +			"requires": {
            +				"currently-unhandled": "^0.4.1",
            +				"signal-exit": "^3.0.0"
            +			}
            +		},
            +		"lru-cache": {
            +			"version": "6.0.0",
            +			"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
            +			"integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
            +			"dev": true,
            +			"requires": {
            +				"yallist": "^4.0.0"
            +			}
            +		},
            +		"macos-release": {
            +			"version": "2.4.1",
            +			"resolved": "https://registry.npmjs.org/macos-release/-/macos-release-2.4.1.tgz",
            +			"integrity": "sha512-H/QHeBIN1fIGJX517pvK8IEK53yQOW7YcEI55oYtgjDdoCQQz7eJS94qt5kNrscReEyuD/JcdFCm2XBEcGOITg==",
            +			"dev": true
            +		},
            +		"make-error": {
            +			"version": "1.3.5",
            +			"resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.5.tgz",
            +			"integrity": "sha512-c3sIjNUow0+8swNwVpqoH4YCShKNFkMaw6oH1mNS2haDZQqkeZFlHS3dhoeEbKKmJB4vXpJucU6oH75aDYeE9g==",
            +			"dev": true
            +		},
            +		"make-error-cause": {
            +			"version": "1.2.2",
            +			"resolved": "https://registry.npmjs.org/make-error-cause/-/make-error-cause-1.2.2.tgz",
            +			"integrity": "sha1-3wOI/NCzeBbf8KX7gQiTl3fcvJ0=",
            +			"dev": true,
            +			"requires": {
            +				"make-error": "^1.2.0"
            +			}
            +		},
            +		"make-iterator": {
            +			"version": "1.0.1",
            +			"resolved": "https://registry.npmjs.org/make-iterator/-/make-iterator-1.0.1.tgz",
            +			"integrity": "sha512-pxiuXh0iVEq7VM7KMIhs5gxsfxCux2URptUQaXo4iZZJxBAzTPOLE2BumO5dbfVYq/hBJFBR/a1mFDmOx5AGmw==",
            +			"dev": true,
            +			"requires": {
            +				"kind-of": "^6.0.2"
            +			}
            +		},
            +		"map-age-cleaner": {
            +			"version": "0.1.3",
            +			"resolved": "https://registry.npmjs.org/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz",
            +			"integrity": "sha512-bJzx6nMoP6PDLPBFmg7+xRKeFZvFboMrGlxmNj9ClvX53KrmvM5bXFXEWjbz4cz1AFn+jWJ9z/DJSz7hrs0w3w==",
            +			"dev": true,
            +			"requires": {
            +				"p-defer": "^1.0.0"
            +			}
            +		},
            +		"map-cache": {
            +			"version": "0.2.2",
            +			"resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz",
            +			"integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=",
            +			"dev": true
            +		},
            +		"map-obj": {
            +			"version": "2.0.0",
            +			"resolved": "https://registry.npmjs.org/map-obj/-/map-obj-2.0.0.tgz",
            +			"integrity": "sha1-plzSkIepJZi4eRJXpSPgISIqwfk=",
            +			"dev": true
            +		},
            +		"map-stream": {
            +			"version": "0.0.7",
            +			"resolved": "https://registry.npmjs.org/map-stream/-/map-stream-0.0.7.tgz",
            +			"integrity": "sha1-ih8HiW2CsQkmvTdEokIACfiJdKg=",
            +			"dev": true
            +		},
            +		"map-visit": {
            +			"version": "1.0.0",
            +			"resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz",
            +			"integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=",
            +			"dev": true,
            +			"requires": {
            +				"object-visit": "^1.0.0"
            +			}
            +		},
            +		"markdown-it": {
            +			"version": "10.0.0",
            +			"resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-10.0.0.tgz",
            +			"integrity": "sha512-YWOP1j7UbDNz+TumYP1kpwnP0aEa711cJjrAQrzd0UXlbJfc5aAq0F/PZHjiioqDC1NKgvIMX+o+9Bk7yuM2dg==",
            +			"dev": true,
            +			"requires": {
            +				"argparse": "^1.0.7",
            +				"entities": "~2.0.0",
            +				"linkify-it": "^2.0.0",
            +				"mdurl": "^1.0.1",
            +				"uc.micro": "^1.0.5"
            +			}
            +		},
            +		"markdown-it-anchor": {
            +			"version": "5.3.0",
            +			"resolved": "https://registry.npmjs.org/markdown-it-anchor/-/markdown-it-anchor-5.3.0.tgz",
            +			"integrity": "sha512-/V1MnLL/rgJ3jkMWo84UR+K+jF1cxNG1a+KwqeXqTIJ+jtA8aWSHuigx8lTzauiIjBDbwF3NcWQMotd0Dm39jA==",
            +			"dev": true
            +		},
            +		"marked": {
            +			"version": "0.8.2",
            +			"resolved": "https://registry.npmjs.org/marked/-/marked-0.8.2.tgz",
            +			"integrity": "sha512-EGwzEeCcLniFX51DhTpmTom+dSA/MG/OBUDjnWtHbEnjAH180VzUeAw+oE4+Zv+CoYBWyRlYOTR0N8SO9R1PVw==",
            +			"dev": true
            +		},
            +		"matchdep": {
            +			"version": "2.0.0",
            +			"resolved": "https://registry.npmjs.org/matchdep/-/matchdep-2.0.0.tgz",
            +			"integrity": "sha1-xvNINKDY28OzfCfui7yyfHd1WC4=",
            +			"dev": true,
            +			"requires": {
            +				"findup-sync": "^2.0.0",
            +				"micromatch": "^3.0.4",
            +				"resolve": "^1.4.0",
            +				"stack-trace": "0.0.10"
            +			},
            +			"dependencies": {
            +				"findup-sync": {
            +					"version": "2.0.0",
            +					"resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-2.0.0.tgz",
            +					"integrity": "sha1-kyaxSIwi0aYIhlCoaQGy2akKLLw=",
            +					"dev": true,
            +					"requires": {
            +						"detect-file": "^1.0.0",
            +						"is-glob": "^3.1.0",
            +						"micromatch": "^3.0.4",
            +						"resolve-dir": "^1.0.1"
            +					}
            +				},
            +				"is-glob": {
            +					"version": "3.1.0",
            +					"resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz",
            +					"integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=",
            +					"dev": true,
            +					"requires": {
            +						"is-extglob": "^2.1.0"
            +					}
            +				}
            +			}
            +		},
            +		"mdurl": {
            +			"version": "1.0.1",
            +			"resolved": "https://registry.npmjs.org/mdurl/-/mdurl-1.0.1.tgz",
            +			"integrity": "sha1-/oWy7HWlkDfyrf7BAP1sYBdhFS4=",
            +			"dev": true
            +		},
            +		"mem": {
            +			"version": "4.2.0",
            +			"resolved": "https://registry.npmjs.org/mem/-/mem-4.2.0.tgz",
            +			"integrity": "sha512-5fJxa68urlY0Ir8ijatKa3eRz5lwXnRCTvo9+TbTGAuTFJOwpGcY0X05moBd0nW45965Njt4CDI2GFQoG8DvqA==",
            +			"dev": true,
            +			"requires": {
            +				"map-age-cleaner": "^0.1.1",
            +				"mimic-fn": "^2.0.0",
            +				"p-is-promise": "^2.0.0"
            +			}
            +		},
            +		"memfs-or-file-map-to-github-branch": {
            +			"version": "1.2.0",
            +			"resolved": "https://registry.npmjs.org/memfs-or-file-map-to-github-branch/-/memfs-or-file-map-to-github-branch-1.2.0.tgz",
            +			"integrity": "sha512-PloI9AkRXrLQuBU1s7eYQpl+4hkL0U0h23lddMaJ3ZGUufn8pdNRxd1kCfBqL5gISCFQs78ttXS15e4/f5vcTA==",
            +			"dev": true,
            +			"requires": {
            +				"@octokit/rest": "^16.43.1"
            +			}
            +		},
            +		"memorystream": {
            +			"version": "0.3.1",
            +			"resolved": "https://registry.npmjs.org/memorystream/-/memorystream-0.3.1.tgz",
            +			"integrity": "sha1-htcJCzDORV1j+64S3aUaR93K+bI=",
            +			"dev": true
            +		},
            +		"meow": {
            +			"version": "5.0.0",
            +			"resolved": "https://registry.npmjs.org/meow/-/meow-5.0.0.tgz",
            +			"integrity": "sha512-CbTqYU17ABaLefO8vCU153ZZlprKYWDljcndKKDCFcYQITzWCXZAVk4QMFZPgvzrnUQ3uItnIE/LoUOwrT15Ig==",
            +			"dev": true,
            +			"requires": {
            +				"camelcase-keys": "^4.0.0",
            +				"decamelize-keys": "^1.0.0",
            +				"loud-rejection": "^1.0.0",
            +				"minimist-options": "^3.0.1",
            +				"normalize-package-data": "^2.3.4",
            +				"read-pkg-up": "^3.0.0",
            +				"redent": "^2.0.0",
            +				"trim-newlines": "^2.0.0",
            +				"yargs-parser": "^10.0.0"
            +			},
            +			"dependencies": {
            +				"camelcase": {
            +					"version": "4.1.0",
            +					"resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz",
            +					"integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=",
            +					"dev": true
            +				},
            +				"find-up": {
            +					"version": "2.1.0",
            +					"resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz",
            +					"integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=",
            +					"dev": true,
            +					"requires": {
            +						"locate-path": "^2.0.0"
            +					}
            +				},
            +				"load-json-file": {
            +					"version": "4.0.0",
            +					"resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz",
            +					"integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=",
            +					"dev": true,
            +					"requires": {
            +						"graceful-fs": "^4.1.2",
            +						"parse-json": "^4.0.0",
            +						"pify": "^3.0.0",
            +						"strip-bom": "^3.0.0"
            +					}
            +				},
            +				"locate-path": {
            +					"version": "2.0.0",
            +					"resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz",
            +					"integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=",
            +					"dev": true,
            +					"requires": {
            +						"p-locate": "^2.0.0",
            +						"path-exists": "^3.0.0"
            +					}
            +				},
            +				"p-limit": {
            +					"version": "1.3.0",
            +					"resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz",
            +					"integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==",
            +					"dev": true,
            +					"requires": {
            +						"p-try": "^1.0.0"
            +					}
            +				},
            +				"p-locate": {
            +					"version": "2.0.0",
            +					"resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz",
            +					"integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=",
            +					"dev": true,
            +					"requires": {
            +						"p-limit": "^1.1.0"
            +					}
            +				},
            +				"p-try": {
            +					"version": "1.0.0",
            +					"resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz",
            +					"integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=",
            +					"dev": true
            +				},
            +				"parse-json": {
            +					"version": "4.0.0",
            +					"resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz",
            +					"integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=",
            +					"dev": true,
            +					"requires": {
            +						"error-ex": "^1.3.1",
            +						"json-parse-better-errors": "^1.0.1"
            +					}
            +				},
            +				"path-exists": {
            +					"version": "3.0.0",
            +					"resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz",
            +					"integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=",
            +					"dev": true
            +				},
            +				"path-type": {
            +					"version": "3.0.0",
            +					"resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz",
            +					"integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==",
            +					"dev": true,
            +					"requires": {
            +						"pify": "^3.0.0"
            +					}
            +				},
            +				"pify": {
            +					"version": "3.0.0",
            +					"resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz",
            +					"integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=",
            +					"dev": true
            +				},
            +				"read-pkg": {
            +					"version": "3.0.0",
            +					"resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz",
            +					"integrity": "sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=",
            +					"dev": true,
            +					"requires": {
            +						"load-json-file": "^4.0.0",
            +						"normalize-package-data": "^2.3.2",
            +						"path-type": "^3.0.0"
            +					}
            +				},
            +				"read-pkg-up": {
            +					"version": "3.0.0",
            +					"resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-3.0.0.tgz",
            +					"integrity": "sha1-PtSWaF26D4/hGNBpHcUfSh/5bwc=",
            +					"dev": true,
            +					"requires": {
            +						"find-up": "^2.0.0",
            +						"read-pkg": "^3.0.0"
            +					}
            +				},
            +				"strip-bom": {
            +					"version": "3.0.0",
            +					"resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz",
            +					"integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=",
            +					"dev": true
            +				},
            +				"yargs-parser": {
            +					"version": "10.1.0",
            +					"resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-10.1.0.tgz",
            +					"integrity": "sha512-VCIyR1wJoEBZUqk5PA+oOBF6ypbwh5aNB3I50guxAL/quggdfs4TtNHQrSazFA3fYZ+tEqfs0zIGlv0c/rgjbQ==",
            +					"dev": true,
            +					"requires": {
            +						"camelcase": "^4.1.0"
            +					}
            +				}
            +			}
            +		},
            +		"merge2": {
            +			"version": "1.4.1",
            +			"resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz",
            +			"integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==",
            +			"dev": true
            +		},
            +		"microbuffer": {
            +			"version": "1.0.0",
            +			"resolved": "https://registry.npmjs.org/microbuffer/-/microbuffer-1.0.0.tgz",
            +			"integrity": "sha1-izgy7UDIfVH0e7I0kTppinVtGdI=",
            +			"dev": true
            +		},
            +		"micromatch": {
            +			"version": "3.1.10",
            +			"resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz",
            +			"integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==",
            +			"dev": true,
            +			"requires": {
            +				"arr-diff": "^4.0.0",
            +				"array-unique": "^0.3.2",
            +				"braces": "^2.3.1",
            +				"define-property": "^2.0.2",
            +				"extend-shallow": "^3.0.2",
            +				"extglob": "^2.0.4",
            +				"fragment-cache": "^0.2.1",
            +				"kind-of": "^6.0.2",
            +				"nanomatch": "^1.2.9",
            +				"object.pick": "^1.3.0",
            +				"regex-not": "^1.0.0",
            +				"snapdragon": "^0.8.1",
            +				"to-regex": "^3.0.2"
            +			}
            +		},
            +		"mime": {
            +			"version": "1.6.0",
            +			"resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz",
            +			"integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==",
            +			"dev": true
            +		},
            +		"mime-db": {
            +			"version": "1.38.0",
            +			"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.38.0.tgz",
            +			"integrity": "sha512-bqVioMFFzc2awcdJZIzR3HjZFX20QhilVS7hytkKrv7xFAn8bM1gzc/FOX2awLISvWe0PV8ptFKcon+wZ5qYkg==",
            +			"dev": true
            +		},
            +		"mime-types": {
            +			"version": "2.1.22",
            +			"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.22.tgz",
            +			"integrity": "sha512-aGl6TZGnhm/li6F7yx82bJiBZwgiEa4Hf6CNr8YO+r5UHr53tSTYZb102zyU50DOWWKeOv0uQLRL0/9EiKWCog==",
            +			"dev": true,
            +			"requires": {
            +				"mime-db": "~1.38.0"
            +			}
            +		},
            +		"mimic-fn": {
            +			"version": "2.0.0",
            +			"resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.0.0.tgz",
            +			"integrity": "sha512-jbex9Yd/3lmICXwYT6gA/j2mNQGU48wCh/VzRd+/Y/PjYQtlg1gLMdZqvu9s/xH7qKvngxRObl56XZR609IMbA==",
            +			"dev": true
            +		},
            +		"minimatch": {
            +			"version": "3.0.4",
            +			"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
            +			"integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
            +			"dev": true,
            +			"requires": {
            +				"brace-expansion": "^1.1.7"
            +			}
            +		},
            +		"minimist": {
            +			"version": "0.0.8",
            +			"resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz",
            +			"integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=",
            +			"dev": true
            +		},
            +		"minimist-options": {
            +			"version": "3.0.2",
            +			"resolved": "https://registry.npmjs.org/minimist-options/-/minimist-options-3.0.2.tgz",
            +			"integrity": "sha512-FyBrT/d0d4+uiZRbqznPXqw3IpZZG3gl3wKWiX784FycUKVwBt0uLBFkQrtE4tZOrgo78nZp2jnKz3L65T5LdQ==",
            +			"dev": true,
            +			"requires": {
            +				"arrify": "^1.0.1",
            +				"is-plain-obj": "^1.1.0"
            +			}
            +		},
            +		"mixin-deep": {
            +			"version": "1.3.2",
            +			"resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.2.tgz",
            +			"integrity": "sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA==",
            +			"dev": true,
            +			"requires": {
            +				"for-in": "^1.0.2",
            +				"is-extendable": "^1.0.1"
            +			},
            +			"dependencies": {
            +				"is-extendable": {
            +					"version": "1.0.1",
            +					"resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz",
            +					"integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==",
            +					"dev": true,
            +					"requires": {
            +						"is-plain-object": "^2.0.4"
            +					}
            +				}
            +			}
            +		},
            +		"mkdirp": {
            +			"version": "0.5.1",
            +			"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz",
            +			"integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=",
            +			"dev": true,
            +			"requires": {
            +				"minimist": "0.0.8"
            +			}
            +		},
            +		"mocha": {
            +			"version": "6.2.0",
            +			"resolved": "https://registry.npmjs.org/mocha/-/mocha-6.2.0.tgz",
            +			"integrity": "sha512-qwfFgY+7EKAAUAdv7VYMZQknI7YJSGesxHyhn6qD52DV8UcSZs5XwCifcZGMVIE4a5fbmhvbotxC0DLQ0oKohQ==",
            +			"dev": true,
            +			"requires": {
            +				"ansi-colors": "3.2.3",
            +				"browser-stdout": "1.3.1",
            +				"debug": "3.2.6",
            +				"diff": "3.5.0",
            +				"escape-string-regexp": "1.0.5",
            +				"find-up": "3.0.0",
            +				"glob": "7.1.3",
            +				"growl": "1.10.5",
            +				"he": "1.2.0",
            +				"js-yaml": "3.13.1",
            +				"log-symbols": "2.2.0",
            +				"minimatch": "3.0.4",
            +				"mkdirp": "0.5.1",
            +				"ms": "2.1.1",
            +				"node-environment-flags": "1.0.5",
            +				"object.assign": "4.1.0",
            +				"strip-json-comments": "2.0.1",
            +				"supports-color": "6.0.0",
            +				"which": "1.3.1",
            +				"wide-align": "1.1.3",
            +				"yargs": "13.2.2",
            +				"yargs-parser": "13.0.0",
            +				"yargs-unparser": "1.5.0"
            +			},
            +			"dependencies": {
            +				"ansi-colors": {
            +					"version": "3.2.3",
            +					"resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.3.tgz",
            +					"integrity": "sha512-LEHHyuhlPY3TmuUYMh2oz89lTShfvgbmzaBcxve9t/9Wuy7Dwf4yoAKcND7KFT1HAQfqZ12qtc+DUrBMeKF9nw==",
            +					"dev": true
            +				},
            +				"camelcase": {
            +					"version": "5.3.1",
            +					"resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz",
            +					"integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==",
            +					"dev": true
            +				},
            +				"debug": {
            +					"version": "3.2.6",
            +					"resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz",
            +					"integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==",
            +					"dev": true,
            +					"requires": {
            +						"ms": "^2.1.1"
            +					}
            +				},
            +				"find-up": {
            +					"version": "3.0.0",
            +					"resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz",
            +					"integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==",
            +					"dev": true,
            +					"requires": {
            +						"locate-path": "^3.0.0"
            +					}
            +				},
            +				"ms": {
            +					"version": "2.1.1",
            +					"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz",
            +					"integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==",
            +					"dev": true
            +				},
            +				"yargs-parser": {
            +					"version": "13.0.0",
            +					"resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.0.0.tgz",
            +					"integrity": "sha512-w2LXjoL8oRdRQN+hOyppuXs+V/fVAYtpcrRxZuF7Kt/Oc+Jr2uAcVntaUTNT6w5ihoWfFDpNY8CPx1QskxZ/pw==",
            +					"dev": true,
            +					"requires": {
            +						"camelcase": "^5.0.0",
            +						"decamelize": "^1.2.0"
            +					}
            +				}
            +			}
            +		},
            +		"moment": {
            +			"version": "2.27.0",
            +			"resolved": "https://registry.npmjs.org/moment/-/moment-2.27.0.tgz",
            +			"integrity": "sha512-al0MUK7cpIcglMv3YF13qSgdAIqxHTO7brRtaz3DlSULbqfazqkc5kEjNrLDOM7fsjshoFIihnU8snrP7zUvhQ==",
            +			"dev": true
            +		},
            +		"ms": {
            +			"version": "2.0.0",
            +			"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
            +			"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=",
            +			"dev": true
            +		},
            +		"mute-stdout": {
            +			"version": "1.0.1",
            +			"resolved": "https://registry.npmjs.org/mute-stdout/-/mute-stdout-1.0.1.tgz",
            +			"integrity": "sha512-kDcwXR4PS7caBpuRYYBUz9iVixUk3anO3f5OYFiIPwK/20vCzKCHyKoulbiDY1S53zD2bxUpxN/IJ+TnXjfvxg==",
            +			"dev": true
            +		},
            +		"nan": {
            +			"version": "2.14.2",
            +			"resolved": "https://registry.npmjs.org/nan/-/nan-2.14.2.tgz",
            +			"integrity": "sha512-M2ufzIiINKCuDfBSAUr1vWQ+vuVcA9kqx8JJUsbQi6yf1uGRyb7HfpdfUr5qLXf3B/t8dPvcjhKMmlfnP47EzQ==",
            +			"dev": true,
            +			"optional": true
            +		},
            +		"nanomatch": {
            +			"version": "1.2.13",
            +			"resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz",
            +			"integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==",
            +			"dev": true,
            +			"requires": {
            +				"arr-diff": "^4.0.0",
            +				"array-unique": "^0.3.2",
            +				"define-property": "^2.0.2",
            +				"extend-shallow": "^3.0.2",
            +				"fragment-cache": "^0.2.1",
            +				"is-windows": "^1.0.2",
            +				"kind-of": "^6.0.2",
            +				"object.pick": "^1.3.0",
            +				"regex-not": "^1.0.0",
            +				"snapdragon": "^0.8.1",
            +				"to-regex": "^3.0.1"
            +			}
            +		},
            +		"natural-compare": {
            +			"version": "1.4.0",
            +			"resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz",
            +			"integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=",
            +			"dev": true
            +		},
            +		"neatequal": {
            +			"version": "1.0.0",
            +			"resolved": "https://registry.npmjs.org/neatequal/-/neatequal-1.0.0.tgz",
            +			"integrity": "sha1-LuEhG8n6bkxVcV/SELsFYC6xrjs=",
            +			"dev": true,
            +			"requires": {
            +				"varstream": "^0.3.2"
            +			}
            +		},
            +		"next-tick": {
            +			"version": "1.0.0",
            +			"resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.0.0.tgz",
            +			"integrity": "sha1-yobR/ogoFpsBICCOPchCS524NCw=",
            +			"dev": true
            +		},
            +		"nice-try": {
            +			"version": "1.0.5",
            +			"resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz",
            +			"integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==",
            +			"dev": true
            +		},
            +		"node-cleanup": {
            +			"version": "2.1.2",
            +			"resolved": "https://registry.npmjs.org/node-cleanup/-/node-cleanup-2.1.2.tgz",
            +			"integrity": "sha1-esGavSl+Caf3KnFUXZUbUX5N3iw=",
            +			"dev": true
            +		},
            +		"node-environment-flags": {
            +			"version": "1.0.5",
            +			"resolved": "https://registry.npmjs.org/node-environment-flags/-/node-environment-flags-1.0.5.tgz",
            +			"integrity": "sha512-VNYPRfGfmZLx0Ye20jWzHUjyTW/c+6Wq+iLhDzUI4XmhrDd9l/FozXV3F2xOaXjvp0co0+v1YSR3CMP6g+VvLQ==",
            +			"dev": true,
            +			"requires": {
            +				"object.getownpropertydescriptors": "^2.0.3",
            +				"semver": "^5.7.0"
            +			},
            +			"dependencies": {
            +				"semver": {
            +					"version": "5.7.0",
            +					"resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz",
            +					"integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==",
            +					"dev": true
            +				}
            +			}
            +		},
            +		"node-fetch": {
            +			"version": "2.6.1",
            +			"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz",
            +			"integrity": "sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw==",
            +			"dev": true
            +		},
            +		"normalize-package-data": {
            +			"version": "2.5.0",
            +			"resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz",
            +			"integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==",
            +			"dev": true,
            +			"requires": {
            +				"hosted-git-info": "^2.1.4",
            +				"resolve": "^1.10.0",
            +				"semver": "2 || 3 || 4 || 5",
            +				"validate-npm-package-license": "^3.0.1"
            +			}
            +		},
            +		"normalize-path": {
            +			"version": "2.1.1",
            +			"resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz",
            +			"integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=",
            +			"dev": true,
            +			"requires": {
            +				"remove-trailing-separator": "^1.0.1"
            +			}
            +		},
            +		"now-and-later": {
            +			"version": "2.0.1",
            +			"resolved": "https://registry.npmjs.org/now-and-later/-/now-and-later-2.0.1.tgz",
            +			"integrity": "sha512-KGvQ0cB70AQfg107Xvs/Fbu+dGmZoTRJp2TaPwcwQm3/7PteUyN2BCgk8KBMPGBUXZdVwyWS8fDCGFygBm19UQ==",
            +			"dev": true,
            +			"requires": {
            +				"once": "^1.3.2"
            +			}
            +		},
            +		"npm-run-all": {
            +			"version": "4.1.5",
            +			"resolved": "https://registry.npmjs.org/npm-run-all/-/npm-run-all-4.1.5.tgz",
            +			"integrity": "sha512-Oo82gJDAVcaMdi3nuoKFavkIHBRVqQ1qvMb+9LHk/cF4P6B2m8aP04hGf7oL6wZ9BuGwX1onlLhpuoofSyoQDQ==",
            +			"dev": true,
            +			"requires": {
            +				"ansi-styles": "^3.2.1",
            +				"chalk": "^2.4.1",
            +				"cross-spawn": "^6.0.5",
            +				"memorystream": "^0.3.1",
            +				"minimatch": "^3.0.4",
            +				"pidtree": "^0.3.0",
            +				"read-pkg": "^3.0.0",
            +				"shell-quote": "^1.6.1",
            +				"string.prototype.padend": "^3.0.0"
            +			},
            +			"dependencies": {
            +				"load-json-file": {
            +					"version": "4.0.0",
            +					"resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz",
            +					"integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=",
            +					"dev": true,
            +					"requires": {
            +						"graceful-fs": "^4.1.2",
            +						"parse-json": "^4.0.0",
            +						"pify": "^3.0.0",
            +						"strip-bom": "^3.0.0"
            +					}
            +				},
            +				"parse-json": {
            +					"version": "4.0.0",
            +					"resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz",
            +					"integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=",
            +					"dev": true,
            +					"requires": {
            +						"error-ex": "^1.3.1",
            +						"json-parse-better-errors": "^1.0.1"
            +					}
            +				},
            +				"path-type": {
            +					"version": "3.0.0",
            +					"resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz",
            +					"integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==",
            +					"dev": true,
            +					"requires": {
            +						"pify": "^3.0.0"
            +					}
            +				},
            +				"pify": {
            +					"version": "3.0.0",
            +					"resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz",
            +					"integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=",
            +					"dev": true
            +				},
            +				"read-pkg": {
            +					"version": "3.0.0",
            +					"resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz",
            +					"integrity": "sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=",
            +					"dev": true,
            +					"requires": {
            +						"load-json-file": "^4.0.0",
            +						"normalize-package-data": "^2.3.2",
            +						"path-type": "^3.0.0"
            +					}
            +				},
            +				"strip-bom": {
            +					"version": "3.0.0",
            +					"resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz",
            +					"integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=",
            +					"dev": true
            +				}
            +			}
            +		},
            +		"npm-run-path": {
            +			"version": "2.0.2",
            +			"resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz",
            +			"integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=",
            +			"dev": true,
            +			"requires": {
            +				"path-key": "^2.0.0"
            +			}
            +		},
            +		"number-is-nan": {
            +			"version": "1.0.1",
            +			"resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz",
            +			"integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=",
            +			"dev": true
            +		},
            +		"nunjucks": {
            +			"version": "3.2.2",
            +			"resolved": "https://registry.npmjs.org/nunjucks/-/nunjucks-3.2.2.tgz",
            +			"integrity": "sha512-KUi85OoF2NMygwODAy28Lh9qHmq5hO3rBlbkYoC8v377h4l8Pt5qFjILl0LWpMbOrZ18CzfVVUvIHUIrtED3sA==",
            +			"dev": true,
            +			"requires": {
            +				"a-sync-waterfall": "^1.0.0",
            +				"asap": "^2.0.3",
            +				"chokidar": "^3.3.0",
            +				"commander": "^5.1.0"
            +			},
            +			"dependencies": {
            +				"anymatch": {
            +					"version": "3.1.1",
            +					"resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.1.tgz",
            +					"integrity": "sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg==",
            +					"dev": true,
            +					"optional": true,
            +					"requires": {
            +						"normalize-path": "^3.0.0",
            +						"picomatch": "^2.0.4"
            +					}
            +				},
            +				"binary-extensions": {
            +					"version": "2.1.0",
            +					"resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.1.0.tgz",
            +					"integrity": "sha512-1Yj8h9Q+QDF5FzhMs/c9+6UntbD5MkRfRwac8DoEm9ZfUBZ7tZ55YcGVAzEe4bXsdQHEk+s9S5wsOKVdZrw0tQ==",
            +					"dev": true,
            +					"optional": true
            +				},
            +				"braces": {
            +					"version": "3.0.2",
            +					"resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz",
            +					"integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==",
            +					"dev": true,
            +					"optional": true,
            +					"requires": {
            +						"fill-range": "^7.0.1"
            +					}
            +				},
            +				"chokidar": {
            +					"version": "3.4.3",
            +					"resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.4.3.tgz",
            +					"integrity": "sha512-DtM3g7juCXQxFVSNPNByEC2+NImtBuxQQvWlHunpJIS5Ocr0lG306cC7FCi7cEA0fzmybPUIl4txBIobk1gGOQ==",
            +					"dev": true,
            +					"optional": true,
            +					"requires": {
            +						"anymatch": "~3.1.1",
            +						"braces": "~3.0.2",
            +						"fsevents": "~2.1.2",
            +						"glob-parent": "~5.1.0",
            +						"is-binary-path": "~2.1.0",
            +						"is-glob": "~4.0.1",
            +						"normalize-path": "~3.0.0",
            +						"readdirp": "~3.5.0"
            +					}
            +				},
            +				"commander": {
            +					"version": "5.1.0",
            +					"resolved": "https://registry.npmjs.org/commander/-/commander-5.1.0.tgz",
            +					"integrity": "sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg==",
            +					"dev": true
            +				},
            +				"fill-range": {
            +					"version": "7.0.1",
            +					"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
            +					"integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==",
            +					"dev": true,
            +					"optional": true,
            +					"requires": {
            +						"to-regex-range": "^5.0.1"
            +					}
            +				},
            +				"fsevents": {
            +					"version": "2.1.3",
            +					"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.3.tgz",
            +					"integrity": "sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ==",
            +					"dev": true,
            +					"optional": true
            +				},
            +				"glob-parent": {
            +					"version": "5.1.1",
            +					"resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.1.tgz",
            +					"integrity": "sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ==",
            +					"dev": true,
            +					"optional": true,
            +					"requires": {
            +						"is-glob": "^4.0.1"
            +					}
            +				},
            +				"is-binary-path": {
            +					"version": "2.1.0",
            +					"resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz",
            +					"integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==",
            +					"dev": true,
            +					"optional": true,
            +					"requires": {
            +						"binary-extensions": "^2.0.0"
            +					}
            +				},
            +				"is-number": {
            +					"version": "7.0.0",
            +					"resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
            +					"integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",
            +					"dev": true,
            +					"optional": true
            +				},
            +				"normalize-path": {
            +					"version": "3.0.0",
            +					"resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz",
            +					"integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==",
            +					"dev": true,
            +					"optional": true
            +				},
            +				"readdirp": {
            +					"version": "3.5.0",
            +					"resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.5.0.tgz",
            +					"integrity": "sha512-cMhu7c/8rdhkHXWsY+osBhfSy0JikwpHK/5+imo+LpeasTF8ouErHrlYkwT0++njiyuDvc7OFY5T3ukvZ8qmFQ==",
            +					"dev": true,
            +					"optional": true,
            +					"requires": {
            +						"picomatch": "^2.2.1"
            +					}
            +				},
            +				"to-regex-range": {
            +					"version": "5.0.1",
            +					"resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
            +					"integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
            +					"dev": true,
            +					"optional": true,
            +					"requires": {
            +						"is-number": "^7.0.0"
            +					}
            +				}
            +			}
            +		},
            +		"nwsapi": {
            +			"version": "2.1.1",
            +			"resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.1.1.tgz",
            +			"integrity": "sha512-T5GaA1J/d34AC8mkrFD2O0DR17kwJ702ZOtJOsS8RpbsQZVOC2/xYFb1i/cw+xdM54JIlMuojjDOYct8GIWtwg==",
            +			"dev": true
            +		},
            +		"oauth-sign": {
            +			"version": "0.9.0",
            +			"resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz",
            +			"integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==",
            +			"dev": true
            +		},
            +		"object-assign": {
            +			"version": "4.1.1",
            +			"resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
            +			"integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=",
            +			"dev": true
            +		},
            +		"object-copy": {
            +			"version": "0.1.0",
            +			"resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz",
            +			"integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=",
            +			"dev": true,
            +			"requires": {
            +				"copy-descriptor": "^0.1.0",
            +				"define-property": "^0.2.5",
            +				"kind-of": "^3.0.3"
            +			},
            +			"dependencies": {
            +				"define-property": {
            +					"version": "0.2.5",
            +					"resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz",
            +					"integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=",
            +					"dev": true,
            +					"requires": {
            +						"is-descriptor": "^0.1.0"
            +					}
            +				},
            +				"kind-of": {
            +					"version": "3.2.2",
            +					"resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
            +					"integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
            +					"dev": true,
            +					"requires": {
            +						"is-buffer": "^1.1.5"
            +					}
            +				}
            +			}
            +		},
            +		"object-inspect": {
            +			"version": "1.10.3",
            +			"resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.10.3.tgz",
            +			"integrity": "sha512-e5mCJlSH7poANfC8z8S9s9S2IN5/4Zb3aZ33f5s8YqoazCFzNLloLU8r5VCG+G7WoqLvAAZoVMcy3tp/3X0Plw==",
            +			"dev": true
            +		},
            +		"object-keys": {
            +			"version": "1.1.0",
            +			"resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.0.tgz",
            +			"integrity": "sha512-6OO5X1+2tYkNyNEx6TsCxEqFfRWaqx6EtMiSbGrw8Ob8v9Ne+Hl8rBAgLBZn5wjEz3s/s6U1WXFUFOcxxAwUpg==",
            +			"dev": true
            +		},
            +		"object-visit": {
            +			"version": "1.0.1",
            +			"resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz",
            +			"integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=",
            +			"dev": true,
            +			"requires": {
            +				"isobject": "^3.0.0"
            +			}
            +		},
            +		"object.assign": {
            +			"version": "4.1.0",
            +			"resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz",
            +			"integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==",
            +			"dev": true,
            +			"requires": {
            +				"define-properties": "^1.1.2",
            +				"function-bind": "^1.1.1",
            +				"has-symbols": "^1.0.0",
            +				"object-keys": "^1.0.11"
            +			}
            +		},
            +		"object.defaults": {
            +			"version": "1.1.0",
            +			"resolved": "https://registry.npmjs.org/object.defaults/-/object.defaults-1.1.0.tgz",
            +			"integrity": "sha1-On+GgzS0B96gbaFtiNXNKeQ1/s8=",
            +			"dev": true,
            +			"requires": {
            +				"array-each": "^1.0.1",
            +				"array-slice": "^1.0.0",
            +				"for-own": "^1.0.0",
            +				"isobject": "^3.0.0"
            +			}
            +		},
            +		"object.getownpropertydescriptors": {
            +			"version": "2.0.3",
            +			"resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.0.3.tgz",
            +			"integrity": "sha1-h1jIRvW0B62rDyNuCYbxSwUcqhY=",
            +			"dev": true,
            +			"requires": {
            +				"define-properties": "^1.1.2",
            +				"es-abstract": "^1.5.1"
            +			}
            +		},
            +		"object.map": {
            +			"version": "1.0.1",
            +			"resolved": "https://registry.npmjs.org/object.map/-/object.map-1.0.1.tgz",
            +			"integrity": "sha1-z4Plncj8wK1fQlDh94s7gb2AHTc=",
            +			"dev": true,
            +			"requires": {
            +				"for-own": "^1.0.0",
            +				"make-iterator": "^1.0.0"
            +			}
            +		},
            +		"object.pick": {
            +			"version": "1.3.0",
            +			"resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz",
            +			"integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=",
            +			"dev": true,
            +			"requires": {
            +				"isobject": "^3.0.1"
            +			}
            +		},
            +		"object.reduce": {
            +			"version": "1.0.1",
            +			"resolved": "https://registry.npmjs.org/object.reduce/-/object.reduce-1.0.1.tgz",
            +			"integrity": "sha1-b+NI8qx/oPlcpiEiZZkJaCW7A60=",
            +			"dev": true,
            +			"requires": {
            +				"for-own": "^1.0.0",
            +				"make-iterator": "^1.0.0"
            +			}
            +		},
            +		"octokit-pagination-methods": {
            +			"version": "1.1.0",
            +			"resolved": "https://registry.npmjs.org/octokit-pagination-methods/-/octokit-pagination-methods-1.1.0.tgz",
            +			"integrity": "sha512-fZ4qZdQ2nxJvtcasX7Ghl+WlWS/d9IgnBIwFZXVNNZUmzpno91SX5bc5vuxiuKoCtK78XxGGNuSCrDC7xYB3OQ==",
            +			"dev": true
            +		},
            +		"once": {
            +			"version": "1.4.0",
            +			"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
            +			"integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
            +			"dev": true,
            +			"requires": {
            +				"wrappy": "1"
            +			}
            +		},
            +		"opener": {
            +			"version": "1.5.2",
            +			"resolved": "https://registry.npmjs.org/opener/-/opener-1.5.2.tgz",
            +			"integrity": "sha512-ur5UIdyw5Y7yEj9wLzhqXiy6GZ3Mwx0yGI+5sMn2r0N0v3cKJvUmFH5yPP+WXh9e0xfyzyJX95D8l088DNFj7A==",
            +			"dev": true
            +		},
            +		"optionator": {
            +			"version": "0.8.2",
            +			"resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz",
            +			"integrity": "sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=",
            +			"dev": true,
            +			"requires": {
            +				"deep-is": "~0.1.3",
            +				"fast-levenshtein": "~2.0.4",
            +				"levn": "~0.3.0",
            +				"prelude-ls": "~1.1.2",
            +				"type-check": "~0.3.2",
            +				"wordwrap": "~1.0.0"
            +			}
            +		},
            +		"ordered-read-streams": {
            +			"version": "1.0.1",
            +			"resolved": "https://registry.npmjs.org/ordered-read-streams/-/ordered-read-streams-1.0.1.tgz",
            +			"integrity": "sha1-d8DLN8QVJdZBZtmQ/61+xqDhNj4=",
            +			"dev": true,
            +			"requires": {
            +				"readable-stream": "^2.0.1"
            +			}
            +		},
            +		"os-locale": {
            +			"version": "1.4.0",
            +			"resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz",
            +			"integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=",
            +			"dev": true,
            +			"requires": {
            +				"lcid": "^1.0.0"
            +			}
            +		},
            +		"os-name": {
            +			"version": "3.1.0",
            +			"resolved": "https://registry.npmjs.org/os-name/-/os-name-3.1.0.tgz",
            +			"integrity": "sha512-h8L+8aNjNcMpo/mAIBPn5PXCM16iyPGjHNWo6U1YO8sJTMHtEtyczI6QJnLoplswm6goopQkqc7OAnjhWcugVg==",
            +			"dev": true,
            +			"requires": {
            +				"macos-release": "^2.2.0",
            +				"windows-release": "^3.1.0"
            +			}
            +		},
            +		"override-require": {
            +			"version": "1.1.1",
            +			"resolved": "https://registry.npmjs.org/override-require/-/override-require-1.1.1.tgz",
            +			"integrity": "sha1-auIvresfhQ/7DPTCD/e4fl62UN8=",
            +			"dev": true
            +		},
            +		"p-defer": {
            +			"version": "1.0.0",
            +			"resolved": "https://registry.npmjs.org/p-defer/-/p-defer-1.0.0.tgz",
            +			"integrity": "sha1-n26xgvbJqozXQwBKfU+WsZaw+ww=",
            +			"dev": true
            +		},
            +		"p-finally": {
            +			"version": "1.0.0",
            +			"resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz",
            +			"integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=",
            +			"dev": true
            +		},
            +		"p-is-promise": {
            +			"version": "2.0.0",
            +			"resolved": "https://registry.npmjs.org/p-is-promise/-/p-is-promise-2.0.0.tgz",
            +			"integrity": "sha512-pzQPhYMCAgLAKPWD2jC3Se9fEfrD9npNos0y150EeqZll7akhEgGhTW/slB6lHku8AvYGiJ+YJ5hfHKePPgFWg==",
            +			"dev": true
            +		},
            +		"p-limit": {
            +			"version": "2.2.0",
            +			"resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.0.tgz",
            +			"integrity": "sha512-pZbTJpoUsCzV48Mc9Nh51VbwO0X9cuPFE8gYwx9BTCt9SF8/b7Zljd2fVgOxhIF/HDTKgpVzs+GPhyKfjLLFRQ==",
            +			"dev": true,
            +			"requires": {
            +				"p-try": "^2.0.0"
            +			}
            +		},
            +		"p-locate": {
            +			"version": "3.0.0",
            +			"resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz",
            +			"integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==",
            +			"dev": true,
            +			"requires": {
            +				"p-limit": "^2.0.0"
            +			}
            +		},
            +		"p-map": {
            +			"version": "2.1.0",
            +			"resolved": "https://registry.npmjs.org/p-map/-/p-map-2.1.0.tgz",
            +			"integrity": "sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw==",
            +			"dev": true
            +		},
            +		"p-try": {
            +			"version": "2.1.0",
            +			"resolved": "https://registry.npmjs.org/p-try/-/p-try-2.1.0.tgz",
            +			"integrity": "sha512-H2RyIJ7+A3rjkwKC2l5GGtU4H1vkxKCAGsWasNVd0Set+6i4znxbWy6/j16YDPJDWxhsgZiKAstMEP8wCdSpjA==",
            +			"dev": true
            +		},
            +		"pako": {
            +			"version": "1.0.11",
            +			"resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz",
            +			"integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==",
            +			"dev": true
            +		},
            +		"parent-module": {
            +			"version": "1.0.1",
            +			"resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz",
            +			"integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==",
            +			"dev": true,
            +			"requires": {
            +				"callsites": "^3.0.0"
            +			},
            +			"dependencies": {
            +				"callsites": {
            +					"version": "3.1.0",
            +					"resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz",
            +					"integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==",
            +					"dev": true
            +				}
            +			}
            +		},
            +		"parse-diff": {
            +			"version": "0.7.1",
            +			"resolved": "https://registry.npmjs.org/parse-diff/-/parse-diff-0.7.1.tgz",
            +			"integrity": "sha512-1j3l8IKcy4yRK2W4o9EYvJLSzpAVwz4DXqCewYyx2vEwk2gcf3DBPqc8Fj4XV3K33OYJ08A8fWwyu/ykD/HUSg==",
            +			"dev": true
            +		},
            +		"parse-filepath": {
            +			"version": "1.0.2",
            +			"resolved": "https://registry.npmjs.org/parse-filepath/-/parse-filepath-1.0.2.tgz",
            +			"integrity": "sha1-pjISf1Oq89FYdvWHLz/6x2PWyJE=",
            +			"dev": true,
            +			"requires": {
            +				"is-absolute": "^1.0.0",
            +				"map-cache": "^0.2.0",
            +				"path-root": "^0.1.1"
            +			}
            +		},
            +		"parse-git-config": {
            +			"version": "2.0.3",
            +			"resolved": "https://registry.npmjs.org/parse-git-config/-/parse-git-config-2.0.3.tgz",
            +			"integrity": "sha512-Js7ueMZOVSZ3tP8C7E3KZiHv6QQl7lnJ+OkbxoaFazzSa2KyEHqApfGbU3XboUgUnq4ZuUmskUpYKTNx01fm5A==",
            +			"dev": true,
            +			"requires": {
            +				"expand-tilde": "^2.0.2",
            +				"git-config-path": "^1.0.1",
            +				"ini": "^1.3.5"
            +			}
            +		},
            +		"parse-github-url": {
            +			"version": "1.0.2",
            +			"resolved": "https://registry.npmjs.org/parse-github-url/-/parse-github-url-1.0.2.tgz",
            +			"integrity": "sha512-kgBf6avCbO3Cn6+RnzRGLkUsv4ZVqv/VfAYkRsyBcgkshNvVBkRn1FEZcW0Jb+npXQWm2vHPnnOqFteZxRRGNw==",
            +			"dev": true
            +		},
            +		"parse-json": {
            +			"version": "2.2.0",
            +			"resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz",
            +			"integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=",
            +			"dev": true,
            +			"requires": {
            +				"error-ex": "^1.2.0"
            +			}
            +		},
            +		"parse-link-header": {
            +			"version": "1.0.1",
            +			"resolved": "https://registry.npmjs.org/parse-link-header/-/parse-link-header-1.0.1.tgz",
            +			"integrity": "sha1-vt/g0hGK64S+deewJUGeyKYRQKc=",
            +			"dev": true,
            +			"requires": {
            +				"xtend": "~4.0.1"
            +			}
            +		},
            +		"parse-node-version": {
            +			"version": "1.0.1",
            +			"resolved": "https://registry.npmjs.org/parse-node-version/-/parse-node-version-1.0.1.tgz",
            +			"integrity": "sha512-3YHlOa/JgH6Mnpr05jP9eDG254US9ek25LyIxZlDItp2iJtwyaXQb57lBYLdT3MowkUFYEV2XXNAYIPlESvJlA==",
            +			"dev": true
            +		},
            +		"parse-passwd": {
            +			"version": "1.0.0",
            +			"resolved": "https://registry.npmjs.org/parse-passwd/-/parse-passwd-1.0.0.tgz",
            +			"integrity": "sha1-bVuTSkVpk7I9N/QKOC1vFmao5cY=",
            +			"dev": true
            +		},
            +		"parse5": {
            +			"version": "5.1.0",
            +			"resolved": "https://registry.npmjs.org/parse5/-/parse5-5.1.0.tgz",
            +			"integrity": "sha512-fxNG2sQjHvlVAYmzBZS9YlDp6PTSSDwa98vkD4QgVDDCAo84z5X1t5XyJQ62ImdLXx5NdIIfihey6xpum9/gRQ==",
            +			"dev": true
            +		},
            +		"pascalcase": {
            +			"version": "0.1.1",
            +			"resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz",
            +			"integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=",
            +			"dev": true
            +		},
            +		"path-dirname": {
            +			"version": "1.0.2",
            +			"resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz",
            +			"integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=",
            +			"dev": true
            +		},
            +		"path-exists": {
            +			"version": "2.1.0",
            +			"resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz",
            +			"integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=",
            +			"dev": true,
            +			"requires": {
            +				"pinkie-promise": "^2.0.0"
            +			}
            +		},
            +		"path-is-absolute": {
            +			"version": "1.0.1",
            +			"resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
            +			"integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=",
            +			"dev": true
            +		},
            +		"path-is-inside": {
            +			"version": "1.0.2",
            +			"resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz",
            +			"integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=",
            +			"dev": true
            +		},
            +		"path-key": {
            +			"version": "2.0.1",
            +			"resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz",
            +			"integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=",
            +			"dev": true
            +		},
            +		"path-parse": {
            +			"version": "1.0.7",
            +			"resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz",
            +			"integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==",
            +			"dev": true
            +		},
            +		"path-root": {
            +			"version": "0.1.1",
            +			"resolved": "https://registry.npmjs.org/path-root/-/path-root-0.1.1.tgz",
            +			"integrity": "sha1-mkpoFMrBwM1zNgqV8yCDyOpHRbc=",
            +			"dev": true,
            +			"requires": {
            +				"path-root-regex": "^0.1.0"
            +			}
            +		},
            +		"path-root-regex": {
            +			"version": "0.1.2",
            +			"resolved": "https://registry.npmjs.org/path-root-regex/-/path-root-regex-0.1.2.tgz",
            +			"integrity": "sha1-v8zcjfWxLcUsi0PsONGNcsBLqW0=",
            +			"dev": true
            +		},
            +		"path-type": {
            +			"version": "1.1.0",
            +			"resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz",
            +			"integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=",
            +			"dev": true,
            +			"requires": {
            +				"graceful-fs": "^4.1.2",
            +				"pify": "^2.0.0",
            +				"pinkie-promise": "^2.0.0"
            +			}
            +		},
            +		"pathval": {
            +			"version": "1.1.0",
            +			"resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.0.tgz",
            +			"integrity": "sha1-uULm1L3mUwBe9rcTYd74cn0GReA=",
            +			"dev": true
            +		},
            +		"performance-now": {
            +			"version": "2.1.0",
            +			"resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz",
            +			"integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=",
            +			"dev": true
            +		},
            +		"picomatch": {
            +			"version": "2.2.2",
            +			"resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz",
            +			"integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==",
            +			"dev": true,
            +			"optional": true
            +		},
            +		"pidtree": {
            +			"version": "0.3.1",
            +			"resolved": "https://registry.npmjs.org/pidtree/-/pidtree-0.3.1.tgz",
            +			"integrity": "sha512-qQbW94hLHEqCg7nhby4yRC7G2+jYHY4Rguc2bjw7Uug4GIJuu1tvf2uHaZv5Q8zdt+WKJ6qK1FOI6amaWUo5FA==",
            +			"dev": true
            +		},
            +		"pify": {
            +			"version": "2.3.0",
            +			"resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz",
            +			"integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=",
            +			"dev": true
            +		},
            +		"pinkie": {
            +			"version": "2.0.4",
            +			"resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz",
            +			"integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=",
            +			"dev": true
            +		},
            +		"pinkie-promise": {
            +			"version": "2.0.1",
            +			"resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz",
            +			"integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=",
            +			"dev": true,
            +			"requires": {
            +				"pinkie": "^2.0.0"
            +			}
            +		},
            +		"pinpoint": {
            +			"version": "1.1.0",
            +			"resolved": "https://registry.npmjs.org/pinpoint/-/pinpoint-1.1.0.tgz",
            +			"integrity": "sha1-DPd1eml38b9/ajIge3CeN3OI6HQ=",
            +			"dev": true
            +		},
            +		"platform": {
            +			"version": "1.3.6",
            +			"resolved": "https://registry.npmjs.org/platform/-/platform-1.3.6.tgz",
            +			"integrity": "sha512-fnWVljUchTro6RiCFvCXBbNhJc2NijN7oIQxbwsyL0buWJPG85v81ehlHI9fXrJsMNgTofEoWIQeClKpgxFLrg==",
            +			"dev": true
            +		},
            +		"pn": {
            +			"version": "1.1.0",
            +			"resolved": "https://registry.npmjs.org/pn/-/pn-1.1.0.tgz",
            +			"integrity": "sha512-2qHaIQr2VLRFoxe2nASzsV6ef4yOOH+Fi9FBOVH6cqeSgUnoyySPZkxzLuzd+RYOQTRpROA0ztTMqxROKSb/nA==",
            +			"dev": true
            +		},
            +		"portfinder": {
            +			"version": "1.0.28",
            +			"resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.28.tgz",
            +			"integrity": "sha512-Se+2isanIcEqf2XMHjyUKskczxbPH7dQnlMjXX6+dybayyHvAf/TCgyMRlzf/B6QDhAEFOGes0pzRo3by4AbMA==",
            +			"dev": true,
            +			"requires": {
            +				"async": "^2.6.2",
            +				"debug": "^3.1.1",
            +				"mkdirp": "^0.5.5"
            +			},
            +			"dependencies": {
            +				"debug": {
            +					"version": "3.2.7",
            +					"resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz",
            +					"integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==",
            +					"dev": true,
            +					"requires": {
            +						"ms": "^2.1.1"
            +					}
            +				},
            +				"minimist": {
            +					"version": "1.2.5",
            +					"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
            +					"integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==",
            +					"dev": true
            +				},
            +				"mkdirp": {
            +					"version": "0.5.5",
            +					"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz",
            +					"integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==",
            +					"dev": true,
            +					"requires": {
            +						"minimist": "^1.2.5"
            +					}
            +				},
            +				"ms": {
            +					"version": "2.1.3",
            +					"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
            +					"integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
            +					"dev": true
            +				}
            +			}
            +		},
            +		"posix-character-classes": {
            +			"version": "0.1.1",
            +			"resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz",
            +			"integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=",
            +			"dev": true
            +		},
            +		"postcss": {
            +			"version": "7.0.36",
            +			"resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.36.tgz",
            +			"integrity": "sha512-BebJSIUMwJHRH0HAQoxN4u1CN86glsrwsW0q7T+/m44eXOUAxSNdHRkNZPYz5vVUbg17hFgOQDE7fZk7li3pZw==",
            +			"dev": true,
            +			"requires": {
            +				"chalk": "^2.4.2",
            +				"source-map": "^0.6.1",
            +				"supports-color": "^6.1.0"
            +			},
            +			"dependencies": {
            +				"source-map": {
            +					"version": "0.6.1",
            +					"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
            +					"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
            +					"dev": true
            +				},
            +				"supports-color": {
            +					"version": "6.1.0",
            +					"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz",
            +					"integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==",
            +					"dev": true,
            +					"requires": {
            +						"has-flag": "^3.0.0"
            +					}
            +				}
            +			}
            +		},
            +		"prelude-ls": {
            +			"version": "1.1.2",
            +			"resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz",
            +			"integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=",
            +			"dev": true
            +		},
            +		"pretty-hrtime": {
            +			"version": "1.0.3",
            +			"resolved": "https://registry.npmjs.org/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz",
            +			"integrity": "sha1-t+PqQkNaTJsnWdmeDyAesZWALuE=",
            +			"dev": true
            +		},
            +		"prettyjson": {
            +			"version": "1.2.1",
            +			"resolved": "https://registry.npmjs.org/prettyjson/-/prettyjson-1.2.1.tgz",
            +			"integrity": "sha1-/P+rQdGcq0365eV15kJGYZsS0ok=",
            +			"dev": true,
            +			"requires": {
            +				"colors": "^1.1.2",
            +				"minimist": "^1.2.0"
            +			},
            +			"dependencies": {
            +				"minimist": {
            +					"version": "1.2.5",
            +					"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
            +					"integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==",
            +					"dev": true
            +				}
            +			}
            +		},
            +		"process-nextick-args": {
            +			"version": "2.0.1",
            +			"resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz",
            +			"integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==",
            +			"dev": true
            +		},
            +		"progress": {
            +			"version": "2.0.3",
            +			"resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz",
            +			"integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==",
            +			"dev": true
            +		},
            +		"psl": {
            +			"version": "1.1.31",
            +			"resolved": "https://registry.npmjs.org/psl/-/psl-1.1.31.tgz",
            +			"integrity": "sha512-/6pt4+C+T+wZUieKR620OpzN/LlnNKuWjy1iFLQ/UG35JqHlR/89MP1d96dUfkf6Dne3TuLQzOYEYshJ+Hx8mw==",
            +			"dev": true
            +		},
            +		"pump": {
            +			"version": "3.0.0",
            +			"resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz",
            +			"integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==",
            +			"dev": true,
            +			"requires": {
            +				"end-of-stream": "^1.1.0",
            +				"once": "^1.3.1"
            +			}
            +		},
            +		"pumpify": {
            +			"version": "1.5.1",
            +			"resolved": "https://registry.npmjs.org/pumpify/-/pumpify-1.5.1.tgz",
            +			"integrity": "sha512-oClZI37HvuUJJxSKKrC17bZ9Cu0ZYhEAGPsPUy9KlMUmv9dKX2o77RUmq7f3XjIxbwyGwYzbzQ1L2Ks8sIradQ==",
            +			"dev": true,
            +			"requires": {
            +				"duplexify": "^3.6.0",
            +				"inherits": "^2.0.3",
            +				"pump": "^2.0.0"
            +			},
            +			"dependencies": {
            +				"pump": {
            +					"version": "2.0.1",
            +					"resolved": "https://registry.npmjs.org/pump/-/pump-2.0.1.tgz",
            +					"integrity": "sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA==",
            +					"dev": true,
            +					"requires": {
            +						"end-of-stream": "^1.1.0",
            +						"once": "^1.3.1"
            +					}
            +				}
            +			}
            +		},
            +		"punycode": {
            +			"version": "2.1.1",
            +			"resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz",
            +			"integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==",
            +			"dev": true
            +		},
            +		"qs": {
            +			"version": "6.5.2",
            +			"resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz",
            +			"integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==",
            +			"dev": true
            +		},
            +		"query-string": {
            +			"version": "6.13.6",
            +			"resolved": "https://registry.npmjs.org/query-string/-/query-string-6.13.6.tgz",
            +			"integrity": "sha512-/WWZ7d9na6s2wMEGdVCVgKWE9Rt7nYyNIf7k8xmHXcesPMlEzicWo3lbYwHyA4wBktI2KrXxxZeACLbE84hvSQ==",
            +			"dev": true,
            +			"requires": {
            +				"decode-uri-component": "^0.2.0",
            +				"split-on-first": "^1.0.0",
            +				"strict-uri-encode": "^2.0.0"
            +			}
            +		},
            +		"quick-lru": {
            +			"version": "1.1.0",
            +			"resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-1.1.0.tgz",
            +			"integrity": "sha1-Q2CxfGETatOAeDl/8RQW4Ybc+7g=",
            +			"dev": true
            +		},
            +		"read-pkg": {
            +			"version": "1.1.0",
            +			"resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz",
            +			"integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=",
            +			"dev": true,
            +			"requires": {
            +				"load-json-file": "^1.0.0",
            +				"normalize-package-data": "^2.3.2",
            +				"path-type": "^1.0.0"
            +			}
            +		},
            +		"read-pkg-up": {
            +			"version": "1.0.1",
            +			"resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz",
            +			"integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=",
            +			"dev": true,
            +			"requires": {
            +				"find-up": "^1.0.0",
            +				"read-pkg": "^1.0.0"
            +			}
            +		},
            +		"readable-stream": {
            +			"version": "2.3.6",
            +			"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz",
            +			"integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==",
            +			"dev": true,
            +			"requires": {
            +				"core-util-is": "~1.0.0",
            +				"inherits": "~2.0.3",
            +				"isarray": "~1.0.0",
            +				"process-nextick-args": "~2.0.0",
            +				"safe-buffer": "~5.1.1",
            +				"string_decoder": "~1.1.1",
            +				"util-deprecate": "~1.0.1"
            +			},
            +			"dependencies": {
            +				"process-nextick-args": {
            +					"version": "2.0.0",
            +					"resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz",
            +					"integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==",
            +					"dev": true
            +				}
            +			}
            +		},
            +		"readdirp": {
            +			"version": "2.2.1",
            +			"resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.2.1.tgz",
            +			"integrity": "sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ==",
            +			"dev": true,
            +			"requires": {
            +				"graceful-fs": "^4.1.11",
            +				"micromatch": "^3.1.10",
            +				"readable-stream": "^2.0.2"
            +			}
            +		},
            +		"readline-sync": {
            +			"version": "1.4.10",
            +			"resolved": "https://registry.npmjs.org/readline-sync/-/readline-sync-1.4.10.tgz",
            +			"integrity": "sha512-gNva8/6UAe8QYepIQH/jQ2qn91Qj0B9sYjMBBs3QOB8F2CXcKgLxQaJRP76sWVRQt+QU+8fAkCbCvjjMFu7Ycw==",
            +			"dev": true
            +		},
            +		"rechoir": {
            +			"version": "0.6.2",
            +			"resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz",
            +			"integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=",
            +			"dev": true,
            +			"requires": {
            +				"resolve": "^1.1.6"
            +			}
            +		},
            +		"redent": {
            +			"version": "2.0.0",
            +			"resolved": "https://registry.npmjs.org/redent/-/redent-2.0.0.tgz",
            +			"integrity": "sha1-wbIAe0LVfrE4kHmzyDM2OdXhzKo=",
            +			"dev": true,
            +			"requires": {
            +				"indent-string": "^3.0.0",
            +				"strip-indent": "^2.0.0"
            +			}
            +		},
            +		"refa": {
            +			"version": "0.9.1",
            +			"resolved": "https://registry.npmjs.org/refa/-/refa-0.9.1.tgz",
            +			"integrity": "sha512-egU8LgFq2VXlAfUi8Jcbr5X38wEOadMFf8tCbshgcpVCYlE7k84pJOSlnvXF+muDB4igkdVMq7Z/kiNPqDT9TA==",
            +			"dev": true,
            +			"requires": {
            +				"regexpp": "^3.2.0"
            +			}
            +		},
            +		"regenerator-runtime": {
            +			"version": "0.13.7",
            +			"resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.7.tgz",
            +			"integrity": "sha512-a54FxoJDIr27pgf7IgeQGxmqUNYrcV338lf/6gH456HZ/PhX+5BcwHXG9ajESmwe6WRO0tAzRUrRmNONWgkrew==",
            +			"dev": true
            +		},
            +		"regex-not": {
            +			"version": "1.0.2",
            +			"resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz",
            +			"integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==",
            +			"dev": true,
            +			"requires": {
            +				"extend-shallow": "^3.0.2",
            +				"safe-regex": "^1.1.0"
            +			}
            +		},
            +		"regexp-ast-analysis": {
            +			"version": "0.2.4",
            +			"resolved": "https://registry.npmjs.org/regexp-ast-analysis/-/regexp-ast-analysis-0.2.4.tgz",
            +			"integrity": "sha512-8L7kOZQaKPxKKAwGuUZxTQtlO3WZ+tiXy4s6G6PKL6trbOXcZoumwC3AOHHFtI/xoSbNxt7jgLvCnP1UADLWqg==",
            +			"dev": true,
            +			"requires": {
            +				"refa": "^0.9.0",
            +				"regexpp": "^3.2.0"
            +			}
            +		},
            +		"regexpp": {
            +			"version": "3.2.0",
            +			"resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz",
            +			"integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==",
            +			"dev": true
            +		},
            +		"regextras": {
            +			"version": "0.7.1",
            +			"resolved": "https://registry.npmjs.org/regextras/-/regextras-0.7.1.tgz",
            +			"integrity": "sha512-9YXf6xtW+qzQ+hcMQXx95MOvfqXFgsKDZodX3qZB0x2n5Z94ioetIITsBtvJbiOyxa/6s9AtyweBLCdPmPko/w==",
            +			"dev": true
            +		},
            +		"remove-bom-buffer": {
            +			"version": "3.0.0",
            +			"resolved": "https://registry.npmjs.org/remove-bom-buffer/-/remove-bom-buffer-3.0.0.tgz",
            +			"integrity": "sha512-8v2rWhaakv18qcvNeli2mZ/TMTL2nEyAKRvzo1WtnZBl15SHyEhrCu2/xKlJyUFKHiHgfXIyuY6g2dObJJycXQ==",
            +			"dev": true,
            +			"requires": {
            +				"is-buffer": "^1.1.5",
            +				"is-utf8": "^0.2.1"
            +			}
            +		},
            +		"remove-bom-stream": {
            +			"version": "1.2.0",
            +			"resolved": "https://registry.npmjs.org/remove-bom-stream/-/remove-bom-stream-1.2.0.tgz",
            +			"integrity": "sha1-BfGlk/FuQuH7kOv1nejlaVJflSM=",
            +			"dev": true,
            +			"requires": {
            +				"remove-bom-buffer": "^3.0.0",
            +				"safe-buffer": "^5.1.0",
            +				"through2": "^2.0.3"
            +			}
            +		},
            +		"remove-trailing-separator": {
            +			"version": "1.1.0",
            +			"resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz",
            +			"integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=",
            +			"dev": true
            +		},
            +		"repeat-element": {
            +			"version": "1.1.3",
            +			"resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.3.tgz",
            +			"integrity": "sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g==",
            +			"dev": true
            +		},
            +		"repeat-string": {
            +			"version": "1.6.1",
            +			"resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz",
            +			"integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=",
            +			"dev": true
            +		},
            +		"replace-ext": {
            +			"version": "1.0.0",
            +			"resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-1.0.0.tgz",
            +			"integrity": "sha1-3mMSg3P8v3w8z6TeWkgMRaZ5WOs=",
            +			"dev": true
            +		},
            +		"replace-homedir": {
            +			"version": "1.0.0",
            +			"resolved": "https://registry.npmjs.org/replace-homedir/-/replace-homedir-1.0.0.tgz",
            +			"integrity": "sha1-6H9tUTuSjd6AgmDBK+f+xv9ueYw=",
            +			"dev": true,
            +			"requires": {
            +				"homedir-polyfill": "^1.0.1",
            +				"is-absolute": "^1.0.0",
            +				"remove-trailing-separator": "^1.1.0"
            +			}
            +		},
            +		"replacestream": {
            +			"version": "4.0.3",
            +			"resolved": "https://registry.npmjs.org/replacestream/-/replacestream-4.0.3.tgz",
            +			"integrity": "sha512-AC0FiLS352pBBiZhd4VXB1Ab/lh0lEgpP+GGvZqbQh8a5cmXVoTe5EX/YeTFArnp4SRGTHh1qCHu9lGs1qG8sA==",
            +			"dev": true,
            +			"requires": {
            +				"escape-string-regexp": "^1.0.3",
            +				"object-assign": "^4.0.1",
            +				"readable-stream": "^2.0.2"
            +			}
            +		},
            +		"request": {
            +			"version": "2.88.0",
            +			"resolved": "https://registry.npmjs.org/request/-/request-2.88.0.tgz",
            +			"integrity": "sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg==",
            +			"dev": true,
            +			"requires": {
            +				"aws-sign2": "~0.7.0",
            +				"aws4": "^1.8.0",
            +				"caseless": "~0.12.0",
            +				"combined-stream": "~1.0.6",
            +				"extend": "~3.0.2",
            +				"forever-agent": "~0.6.1",
            +				"form-data": "~2.3.2",
            +				"har-validator": "~5.1.0",
            +				"http-signature": "~1.2.0",
            +				"is-typedarray": "~1.0.0",
            +				"isstream": "~0.1.2",
            +				"json-stringify-safe": "~5.0.1",
            +				"mime-types": "~2.1.19",
            +				"oauth-sign": "~0.9.0",
            +				"performance-now": "^2.1.0",
            +				"qs": "~6.5.2",
            +				"safe-buffer": "^5.1.2",
            +				"tough-cookie": "~2.4.3",
            +				"tunnel-agent": "^0.6.0",
            +				"uuid": "^3.3.2"
            +			},
            +			"dependencies": {
            +				"punycode": {
            +					"version": "1.4.1",
            +					"resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz",
            +					"integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=",
            +					"dev": true
            +				},
            +				"tough-cookie": {
            +					"version": "2.4.3",
            +					"resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.4.3.tgz",
            +					"integrity": "sha512-Q5srk/4vDM54WJsJio3XNn6K2sCG+CQ8G5Wz6bZhRZoAe/+TxjWB/GlFAnYEbkYVlON9FMk/fE3h2RLpPXo4lQ==",
            +					"dev": true,
            +					"requires": {
            +						"psl": "^1.1.24",
            +						"punycode": "^1.4.1"
            +					}
            +				}
            +			}
            +		},
            +		"request-promise-core": {
            +			"version": "1.1.2",
            +			"resolved": "https://registry.npmjs.org/request-promise-core/-/request-promise-core-1.1.2.tgz",
            +			"integrity": "sha512-UHYyq1MO8GsefGEt7EprS8UrXsm1TxEvFUX1IMTuSLU2Rh7fTIdFtl8xD7JiEYiWU2dl+NYAjCTksTehQUxPag==",
            +			"dev": true,
            +			"requires": {
            +				"lodash": "^4.17.11"
            +			}
            +		},
            +		"request-promise-native": {
            +			"version": "1.0.7",
            +			"resolved": "https://registry.npmjs.org/request-promise-native/-/request-promise-native-1.0.7.tgz",
            +			"integrity": "sha512-rIMnbBdgNViL37nZ1b3L/VfPOpSi0TqVDQPAvO6U14lMzOLrt5nilxCQqtDKhZeDiW0/hkCXGoQjhgJd/tCh6w==",
            +			"dev": true,
            +			"requires": {
            +				"request-promise-core": "1.1.2",
            +				"stealthy-require": "^1.1.1",
            +				"tough-cookie": "^2.3.3"
            +			}
            +		},
            +		"require-directory": {
            +			"version": "2.1.1",
            +			"resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz",
            +			"integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=",
            +			"dev": true
            +		},
            +		"require-from-string": {
            +			"version": "2.0.2",
            +			"resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz",
            +			"integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==",
            +			"dev": true
            +		},
            +		"require-main-filename": {
            +			"version": "1.0.1",
            +			"resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz",
            +			"integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=",
            +			"dev": true
            +		},
            +		"requires-port": {
            +			"version": "1.0.0",
            +			"resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz",
            +			"integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=",
            +			"dev": true
            +		},
            +		"requizzle": {
            +			"version": "0.2.3",
            +			"resolved": "https://registry.npmjs.org/requizzle/-/requizzle-0.2.3.tgz",
            +			"integrity": "sha512-YanoyJjykPxGHii0fZP0uUPEXpvqfBDxWV7s6GKAiiOsiqhX6vHNyW3Qzdmqp/iq/ExbhaGbVrjB4ruEVSM4GQ==",
            +			"dev": true,
            +			"requires": {
            +				"lodash": "^4.17.14"
            +			}
            +		},
            +		"resolve": {
            +			"version": "1.15.1",
            +			"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.15.1.tgz",
            +			"integrity": "sha512-84oo6ZTtoTUpjgNEr5SJyzQhzL72gaRodsSfyxC/AXRvwu0Yse9H8eF9IpGo7b8YetZhlI6v7ZQ6bKBFV/6S7w==",
            +			"dev": true,
            +			"requires": {
            +				"path-parse": "^1.0.6"
            +			}
            +		},
            +		"resolve-dir": {
            +			"version": "1.0.1",
            +			"resolved": "https://registry.npmjs.org/resolve-dir/-/resolve-dir-1.0.1.tgz",
            +			"integrity": "sha1-eaQGRMNivoLybv/nOcm7U4IEb0M=",
            +			"dev": true,
            +			"requires": {
            +				"expand-tilde": "^2.0.0",
            +				"global-modules": "^1.0.0"
            +			}
            +		},
            +		"resolve-from": {
            +			"version": "5.0.0",
            +			"resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz",
            +			"integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==",
            +			"dev": true
            +		},
            +		"resolve-options": {
            +			"version": "1.1.0",
            +			"resolved": "https://registry.npmjs.org/resolve-options/-/resolve-options-1.1.0.tgz",
            +			"integrity": "sha1-MrueOcBtZzONyTeMDW1gdFZq0TE=",
            +			"dev": true,
            +			"requires": {
            +				"value-or-function": "^3.0.0"
            +			}
            +		},
            +		"resolve-url": {
            +			"version": "0.2.1",
            +			"resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz",
            +			"integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=",
            +			"dev": true
            +		},
            +		"ret": {
            +			"version": "0.1.15",
            +			"resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz",
            +			"integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==",
            +			"dev": true
            +		},
            +		"retry": {
            +			"version": "0.12.0",
            +			"resolved": "https://registry.npmjs.org/retry/-/retry-0.12.0.tgz",
            +			"integrity": "sha1-G0KmJmoh8HQh0bC1S33BZ7AcATs=",
            +			"dev": true
            +		},
            +		"rimraf": {
            +			"version": "2.6.3",
            +			"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz",
            +			"integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==",
            +			"dev": true,
            +			"requires": {
            +				"glob": "^7.1.3"
            +			}
            +		},
            +		"safe-buffer": {
            +			"version": "5.1.2",
            +			"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
            +			"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==",
            +			"dev": true
            +		},
            +		"safe-regex": {
            +			"version": "1.1.0",
            +			"resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz",
            +			"integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=",
            +			"dev": true,
            +			"requires": {
            +				"ret": "~0.1.10"
            +			}
            +		},
            +		"safer-buffer": {
            +			"version": "2.1.2",
            +			"resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
            +			"integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==",
            +			"dev": true
            +		},
            +		"sanitize-html": {
            +			"version": "1.27.0",
            +			"resolved": "https://registry.npmjs.org/sanitize-html/-/sanitize-html-1.27.0.tgz",
            +			"integrity": "sha512-U1btucGeYVpg0GoK43jPpe/bDCV4cBOGuxzv5NBd0bOjyZdMKY0n98S/vNlO1wVwre0VCj8H3hbzE7gD2+RjKA==",
            +			"dev": true,
            +			"requires": {
            +				"chalk": "^2.4.1",
            +				"htmlparser2": "^4.1.0",
            +				"lodash": "^4.17.15",
            +				"postcss": "^7.0.27",
            +				"srcset": "^2.0.1",
            +				"xtend": "^4.0.1"
            +			},
            +			"dependencies": {
            +				"htmlparser2": {
            +					"version": "4.1.0",
            +					"resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-4.1.0.tgz",
            +					"integrity": "sha512-4zDq1a1zhE4gQso/c5LP1OtrhYTncXNSpvJYtWJBtXAETPlMfi3IFNjGuQbYLuVY4ZR0QMqRVvo4Pdy9KLyP8Q==",
            +					"dev": true,
            +					"requires": {
            +						"domelementtype": "^2.0.1",
            +						"domhandler": "^3.0.0",
            +						"domutils": "^2.0.0",
            +						"entities": "^2.0.0"
            +					}
            +				}
            +			}
            +		},
            +		"sax": {
            +			"version": "1.2.4",
            +			"resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz",
            +			"integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==",
            +			"dev": true
            +		},
            +		"saxes": {
            +			"version": "3.1.9",
            +			"resolved": "https://registry.npmjs.org/saxes/-/saxes-3.1.9.tgz",
            +			"integrity": "sha512-FZeKhJglhJHk7eWG5YM0z46VHmI3KJpMBAQm3xa9meDvd+wevB5GuBB0wc0exPInZiBBHqi00DbS8AcvCGCFMw==",
            +			"dev": true,
            +			"requires": {
            +				"xmlchars": "^1.3.1"
            +			}
            +		},
            +		"scslre": {
            +			"version": "0.1.6",
            +			"resolved": "https://registry.npmjs.org/scslre/-/scslre-0.1.6.tgz",
            +			"integrity": "sha512-JORxVRlQTfjvlOAaiQKebgFElyAm5/W8b50lgaZ0OkEnKnagJW2ufDh3xRfU75UD9z3FGIu1gL1IyR3Poa6Qmw==",
            +			"dev": true,
            +			"requires": {
            +				"refa": "^0.9.0",
            +				"regexp-ast-analysis": "^0.2.3",
            +				"regexpp": "^3.2.0"
            +			}
            +		},
            +		"secure-compare": {
            +			"version": "3.0.1",
            +			"resolved": "https://registry.npmjs.org/secure-compare/-/secure-compare-3.0.1.tgz",
            +			"integrity": "sha1-8aAymzCLIh+uN7mXTz1XjQypmeM=",
            +			"dev": true
            +		},
            +		"semver": {
            +			"version": "5.6.0",
            +			"resolved": "https://registry.npmjs.org/semver/-/semver-5.6.0.tgz",
            +			"integrity": "sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==",
            +			"dev": true
            +		},
            +		"semver-greatest-satisfied-range": {
            +			"version": "1.1.0",
            +			"resolved": "https://registry.npmjs.org/semver-greatest-satisfied-range/-/semver-greatest-satisfied-range-1.1.0.tgz",
            +			"integrity": "sha1-E+jCZYq5aRywzXEJMkAoDTb3els=",
            +			"dev": true,
            +			"requires": {
            +				"sver-compat": "^1.5.0"
            +			}
            +		},
            +		"set-blocking": {
            +			"version": "2.0.0",
            +			"resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz",
            +			"integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=",
            +			"dev": true
            +		},
            +		"set-value": {
            +			"version": "2.0.1",
            +			"resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.1.tgz",
            +			"integrity": "sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw==",
            +			"dev": true,
            +			"requires": {
            +				"extend-shallow": "^2.0.1",
            +				"is-extendable": "^0.1.1",
            +				"is-plain-object": "^2.0.3",
            +				"split-string": "^3.0.1"
            +			},
            +			"dependencies": {
            +				"extend-shallow": {
            +					"version": "2.0.1",
            +					"resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
            +					"integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
            +					"dev": true,
            +					"requires": {
            +						"is-extendable": "^0.1.0"
            +					}
            +				}
            +			}
            +		},
            +		"shebang-command": {
            +			"version": "1.2.0",
            +			"resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz",
            +			"integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=",
            +			"dev": true,
            +			"requires": {
            +				"shebang-regex": "^1.0.0"
            +			}
            +		},
            +		"shebang-regex": {
            +			"version": "1.0.0",
            +			"resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz",
            +			"integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=",
            +			"dev": true
            +		},
            +		"shell-quote": {
            +			"version": "1.7.2",
            +			"resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.7.2.tgz",
            +			"integrity": "sha512-mRz/m/JVscCrkMyPqHc/bczi3OQHkLTqXHEFu0zDhK/qfv3UcOA4SVmRCLmos4bhjr9ekVQubj/R7waKapmiQg==",
            +			"dev": true
            +		},
            +		"signal-exit": {
            +			"version": "3.0.2",
            +			"resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz",
            +			"integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=",
            +			"dev": true
            +		},
            +		"simple-git": {
            +			"version": "1.110.0",
            +			"resolved": "https://registry.npmjs.org/simple-git/-/simple-git-1.110.0.tgz",
            +			"integrity": "sha512-UYY0rQkknk0P5eb+KW+03F4TevZ9ou0H+LoGaj7iiVgpnZH4wdj/HTViy/1tNNkmIPcmtxuBqXWiYt2YwlRKOQ==",
            +			"dev": true,
            +			"requires": {
            +				"debug": "^4.0.1"
            +			},
            +			"dependencies": {
            +				"debug": {
            +					"version": "4.1.1",
            +					"resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz",
            +					"integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==",
            +					"dev": true,
            +					"requires": {
            +						"ms": "^2.1.1"
            +					}
            +				},
            +				"ms": {
            +					"version": "2.1.1",
            +					"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz",
            +					"integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==",
            +					"dev": true
            +				}
            +			}
            +		},
            +		"slash": {
            +			"version": "2.0.0",
            +			"resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz",
            +			"integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==",
            +			"dev": true
            +		},
            +		"slice-ansi": {
            +			"version": "4.0.0",
            +			"resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz",
            +			"integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==",
            +			"dev": true,
            +			"requires": {
            +				"ansi-styles": "^4.0.0",
            +				"astral-regex": "^2.0.0",
            +				"is-fullwidth-code-point": "^3.0.0"
            +			},
            +			"dependencies": {
            +				"ansi-styles": {
            +					"version": "4.3.0",
            +					"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
            +					"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
            +					"dev": true,
            +					"requires": {
            +						"color-convert": "^2.0.1"
            +					}
            +				},
            +				"color-convert": {
            +					"version": "2.0.1",
            +					"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
            +					"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
            +					"dev": true,
            +					"requires": {
            +						"color-name": "~1.1.4"
            +					}
            +				},
            +				"color-name": {
            +					"version": "1.1.4",
            +					"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
            +					"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
            +					"dev": true
            +				},
            +				"is-fullwidth-code-point": {
            +					"version": "3.0.0",
            +					"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
            +					"integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
            +					"dev": true
            +				}
            +			}
            +		},
            +		"snapdragon": {
            +			"version": "0.8.2",
            +			"resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz",
            +			"integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==",
            +			"dev": true,
            +			"requires": {
            +				"base": "^0.11.1",
            +				"debug": "^2.2.0",
            +				"define-property": "^0.2.5",
            +				"extend-shallow": "^2.0.1",
            +				"map-cache": "^0.2.2",
            +				"source-map": "^0.5.6",
            +				"source-map-resolve": "^0.5.0",
            +				"use": "^3.1.0"
            +			},
            +			"dependencies": {
            +				"define-property": {
            +					"version": "0.2.5",
            +					"resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz",
            +					"integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=",
            +					"dev": true,
            +					"requires": {
            +						"is-descriptor": "^0.1.0"
            +					}
            +				},
            +				"extend-shallow": {
            +					"version": "2.0.1",
            +					"resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
            +					"integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
            +					"dev": true,
            +					"requires": {
            +						"is-extendable": "^0.1.0"
            +					}
            +				}
            +			}
            +		},
            +		"snapdragon-node": {
            +			"version": "2.1.1",
            +			"resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz",
            +			"integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==",
            +			"dev": true,
            +			"requires": {
            +				"define-property": "^1.0.0",
            +				"isobject": "^3.0.0",
            +				"snapdragon-util": "^3.0.1"
            +			},
            +			"dependencies": {
            +				"define-property": {
            +					"version": "1.0.0",
            +					"resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz",
            +					"integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=",
            +					"dev": true,
            +					"requires": {
            +						"is-descriptor": "^1.0.0"
            +					}
            +				},
            +				"is-accessor-descriptor": {
            +					"version": "1.0.0",
            +					"resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz",
            +					"integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==",
            +					"dev": true,
            +					"requires": {
            +						"kind-of": "^6.0.0"
            +					}
            +				},
            +				"is-data-descriptor": {
            +					"version": "1.0.0",
            +					"resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz",
            +					"integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==",
            +					"dev": true,
            +					"requires": {
            +						"kind-of": "^6.0.0"
            +					}
            +				},
            +				"is-descriptor": {
            +					"version": "1.0.2",
            +					"resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz",
            +					"integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==",
            +					"dev": true,
            +					"requires": {
            +						"is-accessor-descriptor": "^1.0.0",
            +						"is-data-descriptor": "^1.0.0",
            +						"kind-of": "^6.0.2"
            +					}
            +				}
            +			}
            +		},
            +		"snapdragon-util": {
            +			"version": "3.0.1",
            +			"resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz",
            +			"integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==",
            +			"dev": true,
            +			"requires": {
            +				"kind-of": "^3.2.0"
            +			},
            +			"dependencies": {
            +				"kind-of": {
            +					"version": "3.2.2",
            +					"resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
            +					"integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
            +					"dev": true,
            +					"requires": {
            +						"is-buffer": "^1.1.5"
            +					}
            +				}
            +			}
            +		},
            +		"source-map": {
            +			"version": "0.5.7",
            +			"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz",
            +			"integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=",
            +			"dev": true
            +		},
            +		"source-map-resolve": {
            +			"version": "0.5.3",
            +			"resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.3.tgz",
            +			"integrity": "sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw==",
            +			"dev": true,
            +			"requires": {
            +				"atob": "^2.1.2",
            +				"decode-uri-component": "^0.2.0",
            +				"resolve-url": "^0.2.1",
            +				"source-map-url": "^0.4.0",
            +				"urix": "^0.1.0"
            +			}
            +		},
            +		"source-map-url": {
            +			"version": "0.4.0",
            +			"resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.0.tgz",
            +			"integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=",
            +			"dev": true
            +		},
            +		"sparkles": {
            +			"version": "1.0.1",
            +			"resolved": "https://registry.npmjs.org/sparkles/-/sparkles-1.0.1.tgz",
            +			"integrity": "sha512-dSO0DDYUahUt/0/pD/Is3VIm5TGJjludZ0HVymmhYF6eNA53PVLhnUk0znSYbH8IYBuJdCE+1luR22jNLMaQdw==",
            +			"dev": true
            +		},
            +		"spdx-correct": {
            +			"version": "3.1.0",
            +			"resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.0.tgz",
            +			"integrity": "sha512-lr2EZCctC2BNR7j7WzJ2FpDznxky1sjfxvvYEyzxNyb6lZXHODmEoJeFu4JupYlkfha1KZpJyoqiJ7pgA1qq8Q==",
            +			"dev": true,
            +			"requires": {
            +				"spdx-expression-parse": "^3.0.0",
            +				"spdx-license-ids": "^3.0.0"
            +			}
            +		},
            +		"spdx-exceptions": {
            +			"version": "2.2.0",
            +			"resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.2.0.tgz",
            +			"integrity": "sha512-2XQACfElKi9SlVb1CYadKDXvoajPgBVPn/gOQLrTvHdElaVhr7ZEbqJaRnJLVNeaI4cMEAgVCeBMKF6MWRDCRA==",
            +			"dev": true
            +		},
            +		"spdx-expression-parse": {
            +			"version": "3.0.0",
            +			"resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz",
            +			"integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==",
            +			"dev": true,
            +			"requires": {
            +				"spdx-exceptions": "^2.1.0",
            +				"spdx-license-ids": "^3.0.0"
            +			}
            +		},
            +		"spdx-license-ids": {
            +			"version": "3.0.5",
            +			"resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.5.tgz",
            +			"integrity": "sha512-J+FWzZoynJEXGphVIS+XEh3kFSjZX/1i9gFBaWQcB+/tmpe2qUsSBABpcxqxnAxFdiUFEgAX1bjYGQvIZmoz9Q==",
            +			"dev": true
            +		},
            +		"split-on-first": {
            +			"version": "1.1.0",
            +			"resolved": "https://registry.npmjs.org/split-on-first/-/split-on-first-1.1.0.tgz",
            +			"integrity": "sha512-43ZssAJaMusuKWL8sKUBQXHWOpq8d6CfN/u1p4gUzfJkM05C8rxTmYrkIPTXapZpORA6LkkzcUulJ8FqA7Uudw==",
            +			"dev": true
            +		},
            +		"split-string": {
            +			"version": "3.1.0",
            +			"resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz",
            +			"integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==",
            +			"dev": true,
            +			"requires": {
            +				"extend-shallow": "^3.0.0"
            +			}
            +		},
            +		"sprintf-js": {
            +			"version": "1.0.3",
            +			"resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz",
            +			"integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=",
            +			"dev": true
            +		},
            +		"srcset": {
            +			"version": "2.0.1",
            +			"resolved": "https://registry.npmjs.org/srcset/-/srcset-2.0.1.tgz",
            +			"integrity": "sha512-00kZI87TdRKwt+P8jj8UZxbfp7mK2ufxcIMWvhAOZNJTRROimpHeruWrGvCZneiuVDLqdyHefVp748ECTnyUBQ==",
            +			"dev": true
            +		},
            +		"sshpk": {
            +			"version": "1.16.1",
            +			"resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz",
            +			"integrity": "sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==",
            +			"dev": true,
            +			"requires": {
            +				"asn1": "~0.2.3",
            +				"assert-plus": "^1.0.0",
            +				"bcrypt-pbkdf": "^1.0.0",
            +				"dashdash": "^1.12.0",
            +				"ecc-jsbn": "~0.1.1",
            +				"getpass": "^0.1.1",
            +				"jsbn": "~0.1.0",
            +				"safer-buffer": "^2.0.2",
            +				"tweetnacl": "~0.14.0"
            +			}
            +		},
            +		"stack-trace": {
            +			"version": "0.0.10",
            +			"resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.10.tgz",
            +			"integrity": "sha1-VHxws0fo0ytOEI6hoqFZ5f3eGcA=",
            +			"dev": true
            +		},
            +		"static-extend": {
            +			"version": "0.1.2",
            +			"resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz",
            +			"integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=",
            +			"dev": true,
            +			"requires": {
            +				"define-property": "^0.2.5",
            +				"object-copy": "^0.1.0"
            +			},
            +			"dependencies": {
            +				"define-property": {
            +					"version": "0.2.5",
            +					"resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz",
            +					"integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=",
            +					"dev": true,
            +					"requires": {
            +						"is-descriptor": "^0.1.0"
            +					}
            +				}
            +			}
            +		},
            +		"stealthy-require": {
            +			"version": "1.1.1",
            +			"resolved": "https://registry.npmjs.org/stealthy-require/-/stealthy-require-1.1.1.tgz",
            +			"integrity": "sha1-NbCYdbT/SfJqd35QmzCQoyJr8ks=",
            +			"dev": true
            +		},
            +		"stream-exhaust": {
            +			"version": "1.0.2",
            +			"resolved": "https://registry.npmjs.org/stream-exhaust/-/stream-exhaust-1.0.2.tgz",
            +			"integrity": "sha512-b/qaq/GlBK5xaq1yrK9/zFcyRSTNxmcZwFLGSTG0mXgZl/4Z6GgiyYOXOvY7N3eEvFRAG1bkDRz5EPGSvPYQlw==",
            +			"dev": true
            +		},
            +		"stream-shift": {
            +			"version": "1.0.1",
            +			"resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.1.tgz",
            +			"integrity": "sha512-AiisoFqQ0vbGcZgQPY1cdP2I76glaVA/RauYR4G4thNFgkTqr90yXTo4LYX60Jl+sIlPNHHdGSwo01AvbKUSVQ==",
            +			"dev": true
            +		},
            +		"strict-uri-encode": {
            +			"version": "2.0.0",
            +			"resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-2.0.0.tgz",
            +			"integrity": "sha1-ucczDHBChi9rFC3CdLvMWGbONUY=",
            +			"dev": true
            +		},
            +		"string-width": {
            +			"version": "1.0.2",
            +			"resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz",
            +			"integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=",
            +			"dev": true,
            +			"requires": {
            +				"code-point-at": "^1.0.0",
            +				"is-fullwidth-code-point": "^1.0.0",
            +				"strip-ansi": "^3.0.0"
            +			}
            +		},
            +		"string.fromcodepoint": {
            +			"version": "0.2.1",
            +			"resolved": "https://registry.npmjs.org/string.fromcodepoint/-/string.fromcodepoint-0.2.1.tgz",
            +			"integrity": "sha1-jZeDM8C8klOPUPOD5IiPPlYZ1lM=",
            +			"dev": true
            +		},
            +		"string.prototype.codepointat": {
            +			"version": "0.2.1",
            +			"resolved": "https://registry.npmjs.org/string.prototype.codepointat/-/string.prototype.codepointat-0.2.1.tgz",
            +			"integrity": "sha512-2cBVCj6I4IOvEnjgO/hWqXjqBGsY+zwPmHl12Srk9IXSZ56Jwwmy+66XO5Iut/oQVR7t5ihYdLB0GMa4alEUcg==",
            +			"dev": true
            +		},
            +		"string.prototype.padend": {
            +			"version": "3.1.2",
            +			"resolved": "https://registry.npmjs.org/string.prototype.padend/-/string.prototype.padend-3.1.2.tgz",
            +			"integrity": "sha512-/AQFLdYvePENU3W5rgurfWSMU6n+Ww8n/3cUt7E+vPBB/D7YDG8x+qjoFs4M/alR2bW7Qg6xMjVwWUOvuQ0XpQ==",
            +			"dev": true,
            +			"requires": {
            +				"call-bind": "^1.0.2",
            +				"define-properties": "^1.1.3",
            +				"es-abstract": "^1.18.0-next.2"
            +			},
            +			"dependencies": {
            +				"es-abstract": {
            +					"version": "1.18.3",
            +					"resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.3.tgz",
            +					"integrity": "sha512-nQIr12dxV7SSxE6r6f1l3DtAeEYdsGpps13dR0TwJg1S8gyp4ZPgy3FZcHBgbiQqnoqSTb+oC+kO4UQ0C/J8vw==",
            +					"dev": true,
            +					"requires": {
            +						"call-bind": "^1.0.2",
            +						"es-to-primitive": "^1.2.1",
            +						"function-bind": "^1.1.1",
            +						"get-intrinsic": "^1.1.1",
            +						"has": "^1.0.3",
            +						"has-symbols": "^1.0.2",
            +						"is-callable": "^1.2.3",
            +						"is-negative-zero": "^2.0.1",
            +						"is-regex": "^1.1.3",
            +						"is-string": "^1.0.6",
            +						"object-inspect": "^1.10.3",
            +						"object-keys": "^1.1.1",
            +						"object.assign": "^4.1.2",
            +						"string.prototype.trimend": "^1.0.4",
            +						"string.prototype.trimstart": "^1.0.4",
            +						"unbox-primitive": "^1.0.1"
            +					}
            +				},
            +				"es-to-primitive": {
            +					"version": "1.2.1",
            +					"resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz",
            +					"integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==",
            +					"dev": true,
            +					"requires": {
            +						"is-callable": "^1.1.4",
            +						"is-date-object": "^1.0.1",
            +						"is-symbol": "^1.0.2"
            +					}
            +				},
            +				"has-symbols": {
            +					"version": "1.0.2",
            +					"resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz",
            +					"integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==",
            +					"dev": true
            +				},
            +				"is-callable": {
            +					"version": "1.2.3",
            +					"resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.3.tgz",
            +					"integrity": "sha512-J1DcMe8UYTBSrKezuIUTUwjXsho29693unXM2YhJUTR2txK/eG47bvNa/wipPFmZFgr/N6f1GA66dv0mEyTIyQ==",
            +					"dev": true
            +				},
            +				"is-regex": {
            +					"version": "1.1.3",
            +					"resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.3.tgz",
            +					"integrity": "sha512-qSVXFz28HM7y+IWX6vLCsexdlvzT1PJNFSBuaQLQ5o0IEw8UDYW6/2+eCMVyIsbM8CNLX2a/QWmSpyxYEHY7CQ==",
            +					"dev": true,
            +					"requires": {
            +						"call-bind": "^1.0.2",
            +						"has-symbols": "^1.0.2"
            +					}
            +				},
            +				"object-keys": {
            +					"version": "1.1.1",
            +					"resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz",
            +					"integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==",
            +					"dev": true
            +				},
            +				"object.assign": {
            +					"version": "4.1.2",
            +					"resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz",
            +					"integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==",
            +					"dev": true,
            +					"requires": {
            +						"call-bind": "^1.0.0",
            +						"define-properties": "^1.1.3",
            +						"has-symbols": "^1.0.1",
            +						"object-keys": "^1.1.1"
            +					}
            +				}
            +			}
            +		},
            +		"string.prototype.trimend": {
            +			"version": "1.0.4",
            +			"resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.4.tgz",
            +			"integrity": "sha512-y9xCjw1P23Awk8EvTpcyL2NIr1j7wJ39f+k6lvRnSMz+mz9CGz9NYPelDk42kOz6+ql8xjfK8oYzy3jAP5QU5A==",
            +			"dev": true,
            +			"requires": {
            +				"call-bind": "^1.0.2",
            +				"define-properties": "^1.1.3"
            +			}
            +		},
            +		"string.prototype.trimstart": {
            +			"version": "1.0.4",
            +			"resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.4.tgz",
            +			"integrity": "sha512-jh6e984OBfvxS50tdY2nRZnoC5/mLFKOREQfw8t5yytkoUsJRNxvI/E39qu1sD0OtWI3OC0XgKSmcWwziwYuZw==",
            +			"dev": true,
            +			"requires": {
            +				"call-bind": "^1.0.2",
            +				"define-properties": "^1.1.3"
            +			}
            +		},
            +		"string_decoder": {
            +			"version": "1.1.1",
            +			"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
            +			"integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
            +			"dev": true,
            +			"requires": {
            +				"safe-buffer": "~5.1.0"
            +			}
            +		},
            +		"strip-ansi": {
            +			"version": "3.0.1",
            +			"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
            +			"integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
            +			"dev": true,
            +			"requires": {
            +				"ansi-regex": "^2.0.0"
            +			}
            +		},
            +		"strip-bom": {
            +			"version": "2.0.0",
            +			"resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz",
            +			"integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=",
            +			"dev": true,
            +			"requires": {
            +				"is-utf8": "^0.2.0"
            +			}
            +		},
            +		"strip-eof": {
            +			"version": "1.0.0",
            +			"resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz",
            +			"integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=",
            +			"dev": true
            +		},
            +		"strip-indent": {
            +			"version": "2.0.0",
            +			"resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-2.0.0.tgz",
            +			"integrity": "sha1-XvjbKV0B5u1sv3qrlpmNeCJSe2g=",
            +			"dev": true
            +		},
            +		"strip-json-comments": {
            +			"version": "2.0.1",
            +			"resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz",
            +			"integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=",
            +			"dev": true
            +		},
            +		"supports-color": {
            +			"version": "6.0.0",
            +			"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.0.0.tgz",
            +			"integrity": "sha512-on9Kwidc1IUQo+bQdhi8+Tijpo0e1SS6RoGo2guUwn5vdaxw8RXOF9Vb2ws+ihWOmh4JnCJOvaziZWP1VABaLg==",
            +			"dev": true,
            +			"requires": {
            +				"has-flag": "^3.0.0"
            +			}
            +		},
            +		"supports-hyperlinks": {
            +			"version": "1.0.1",
            +			"resolved": "https://registry.npmjs.org/supports-hyperlinks/-/supports-hyperlinks-1.0.1.tgz",
            +			"integrity": "sha512-HHi5kVSefKaJkGYXbDuKbUGRVxqnWGn3J2e39CYcNJEfWciGq2zYtOhXLTlvrOZW1QU7VX67w7fMmWafHX9Pfw==",
            +			"dev": true,
            +			"requires": {
            +				"has-flag": "^2.0.0",
            +				"supports-color": "^5.0.0"
            +			},
            +			"dependencies": {
            +				"has-flag": {
            +					"version": "2.0.0",
            +					"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz",
            +					"integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=",
            +					"dev": true
            +				},
            +				"supports-color": {
            +					"version": "5.5.0",
            +					"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
            +					"integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
            +					"dev": true,
            +					"requires": {
            +						"has-flag": "^3.0.0"
            +					},
            +					"dependencies": {
            +						"has-flag": {
            +							"version": "3.0.0",
            +							"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
            +							"integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=",
            +							"dev": true
            +						}
            +					}
            +				}
            +			}
            +		},
            +		"sver-compat": {
            +			"version": "1.5.0",
            +			"resolved": "https://registry.npmjs.org/sver-compat/-/sver-compat-1.5.0.tgz",
            +			"integrity": "sha1-PPh9/rTQe0o/FIJ7wYaz/QxkXNg=",
            +			"dev": true,
            +			"requires": {
            +				"es6-iterator": "^2.0.1",
            +				"es6-symbol": "^3.1.1"
            +			}
            +		},
            +		"svg-pathdata": {
            +			"version": "5.0.5",
            +			"resolved": "https://registry.npmjs.org/svg-pathdata/-/svg-pathdata-5.0.5.tgz",
            +			"integrity": "sha512-TAAvLNSE3fEhyl/Da19JWfMAdhSXTYeviXsLSoDT1UM76ADj5ndwAPX1FKQEgB/gFMPavOy6tOqfalXKUiXrow==",
            +			"dev": true
            +		},
            +		"svg2ttf": {
            +			"version": "4.3.0",
            +			"resolved": "https://registry.npmjs.org/svg2ttf/-/svg2ttf-4.3.0.tgz",
            +			"integrity": "sha512-LZ0B7zzHWLWbzLzwaKGHQvPOuxCXLReIb3LSxFSGUy1gMw2Utk6KGNbTmbmRL6Rk1qDSmTixnDrQgnXaL9n0CA==",
            +			"dev": true,
            +			"requires": {
            +				"argparse": "^1.0.6",
            +				"cubic2quad": "^1.0.0",
            +				"lodash": "^4.17.10",
            +				"microbuffer": "^1.0.0",
            +				"svgpath": "^2.1.5",
            +				"xmldom": "~0.1.22"
            +			}
            +		},
            +		"svgicons2svgfont": {
            +			"version": "9.1.1",
            +			"resolved": "https://registry.npmjs.org/svgicons2svgfont/-/svgicons2svgfont-9.1.1.tgz",
            +			"integrity": "sha512-iOj7lqHP/oMrLg7S2Iv89LOJUfmIuePefXcs5ul4IsKwcYvL/T/Buahz+nQQJygyuvEMBBXqnCRmnvJggHeJzA==",
            +			"dev": true,
            +			"requires": {
            +				"commander": "^2.12.2",
            +				"geometry-interfaces": "^1.1.4",
            +				"glob": "^7.1.2",
            +				"neatequal": "^1.0.0",
            +				"readable-stream": "^2.3.3",
            +				"sax": "^1.2.4",
            +				"string.fromcodepoint": "^0.2.1",
            +				"string.prototype.codepointat": "^0.2.0",
            +				"svg-pathdata": "^5.0.0",
            +				"transformation-matrix-js": "^2.7.1"
            +			}
            +		},
            +		"svgpath": {
            +			"version": "2.3.0",
            +			"resolved": "https://registry.npmjs.org/svgpath/-/svgpath-2.3.0.tgz",
            +			"integrity": "sha512-N/4UDu3Y2ICik0daMmFW1tplw0XPs1nVIEVYkTiQfj9/JQZeEtAKaSYwheCwje1I4pQ5r22fGpoaNIvGgsyJyg==",
            +			"dev": true
            +		},
            +		"symbol-tree": {
            +			"version": "3.2.2",
            +			"resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.2.tgz",
            +			"integrity": "sha1-rifbOPZgp64uHDt9G8KQgZuFGeY=",
            +			"dev": true
            +		},
            +		"table": {
            +			"version": "6.0.7",
            +			"resolved": "https://registry.npmjs.org/table/-/table-6.0.7.tgz",
            +			"integrity": "sha512-rxZevLGTUzWna/qBLObOe16kB2RTnnbhciwgPbMMlazz1yZGVEgnZK762xyVdVznhqxrfCeBMmMkgOOaPwjH7g==",
            +			"dev": true,
            +			"requires": {
            +				"ajv": "^7.0.2",
            +				"lodash": "^4.17.20",
            +				"slice-ansi": "^4.0.0",
            +				"string-width": "^4.2.0"
            +			},
            +			"dependencies": {
            +				"ajv": {
            +					"version": "7.2.3",
            +					"resolved": "https://registry.npmjs.org/ajv/-/ajv-7.2.3.tgz",
            +					"integrity": "sha512-idv5WZvKVXDqKralOImQgPM9v6WOdLNa0IY3B3doOjw/YxRGT8I+allIJ6kd7Uaj+SF1xZUSU+nPM5aDNBVtnw==",
            +					"dev": true,
            +					"requires": {
            +						"fast-deep-equal": "^3.1.1",
            +						"json-schema-traverse": "^1.0.0",
            +						"require-from-string": "^2.0.2",
            +						"uri-js": "^4.2.2"
            +					}
            +				},
            +				"ansi-regex": {
            +					"version": "5.0.0",
            +					"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz",
            +					"integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==",
            +					"dev": true
            +				},
            +				"emoji-regex": {
            +					"version": "8.0.0",
            +					"resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
            +					"integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==",
            +					"dev": true
            +				},
            +				"fast-deep-equal": {
            +					"version": "3.1.3",
            +					"resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
            +					"integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==",
            +					"dev": true
            +				},
            +				"is-fullwidth-code-point": {
            +					"version": "3.0.0",
            +					"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
            +					"integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
            +					"dev": true
            +				},
            +				"json-schema-traverse": {
            +					"version": "1.0.0",
            +					"resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz",
            +					"integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==",
            +					"dev": true
            +				},
            +				"string-width": {
            +					"version": "4.2.2",
            +					"resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz",
            +					"integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==",
            +					"dev": true,
            +					"requires": {
            +						"emoji-regex": "^8.0.0",
            +						"is-fullwidth-code-point": "^3.0.0",
            +						"strip-ansi": "^6.0.0"
            +					}
            +				},
            +				"strip-ansi": {
            +					"version": "6.0.0",
            +					"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz",
            +					"integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==",
            +					"dev": true,
            +					"requires": {
            +						"ansi-regex": "^5.0.0"
            +					}
            +				}
            +			}
            +		},
            +		"taffydb": {
            +			"version": "2.6.2",
            +			"resolved": "https://registry.npmjs.org/taffydb/-/taffydb-2.6.2.tgz",
            +			"integrity": "sha1-fLy2S1oUG2ou/CxdLGe04VCyomg=",
            +			"dev": true
            +		},
            +		"text-table": {
            +			"version": "0.2.0",
            +			"resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz",
            +			"integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=",
            +			"dev": true
            +		},
            +		"textextensions": {
            +			"version": "2.4.0",
            +			"resolved": "https://registry.npmjs.org/textextensions/-/textextensions-2.4.0.tgz",
            +			"integrity": "sha512-qftQXnX1DzpSV8EddtHIT0eDDEiBF8ywhFYR2lI9xrGtxqKN+CvLXhACeCIGbCpQfxxERbrkZEFb8cZcDKbVZA==",
            +			"dev": true
            +		},
            +		"through2": {
            +			"version": "2.0.5",
            +			"resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz",
            +			"integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==",
            +			"dev": true,
            +			"requires": {
            +				"readable-stream": "~2.3.6",
            +				"xtend": "~4.0.1"
            +			}
            +		},
            +		"through2-filter": {
            +			"version": "3.0.0",
            +			"resolved": "https://registry.npmjs.org/through2-filter/-/through2-filter-3.0.0.tgz",
            +			"integrity": "sha512-jaRjI2WxN3W1V8/FMZ9HKIBXixtiqs3SQSX4/YGIiP3gL6djW48VoZq9tDqeCWs3MT8YY5wb/zli8VW8snY1CA==",
            +			"dev": true,
            +			"requires": {
            +				"through2": "~2.0.0",
            +				"xtend": "~4.0.0"
            +			}
            +		},
            +		"time-stamp": {
            +			"version": "1.1.0",
            +			"resolved": "https://registry.npmjs.org/time-stamp/-/time-stamp-1.1.0.tgz",
            +			"integrity": "sha1-dkpaEa9QVhkhsTPztE5hhofg9cM=",
            +			"dev": true
            +		},
            +		"tmp": {
            +			"version": "0.1.0",
            +			"resolved": "https://registry.npmjs.org/tmp/-/tmp-0.1.0.tgz",
            +			"integrity": "sha512-J7Z2K08jbGcdA1kkQpJSqLF6T0tdQqpR2pnSUXsIchbPdTI9v3e85cLW0d6WDhwuAleOV71j2xWs8qMPfK7nKw==",
            +			"dev": true,
            +			"requires": {
            +				"rimraf": "^2.6.3"
            +			}
            +		},
            +		"to-absolute-glob": {
            +			"version": "2.0.2",
            +			"resolved": "https://registry.npmjs.org/to-absolute-glob/-/to-absolute-glob-2.0.2.tgz",
            +			"integrity": "sha1-GGX0PZ50sIItufFFt4z/fQ98hJs=",
            +			"dev": true,
            +			"requires": {
            +				"is-absolute": "^1.0.0",
            +				"is-negated-glob": "^1.0.0"
            +			}
            +		},
            +		"to-object-path": {
            +			"version": "0.3.0",
            +			"resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz",
            +			"integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=",
            +			"dev": true,
            +			"requires": {
            +				"kind-of": "^3.0.2"
            +			},
            +			"dependencies": {
            +				"kind-of": {
            +					"version": "3.2.2",
            +					"resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
            +					"integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
            +					"dev": true,
            +					"requires": {
            +						"is-buffer": "^1.1.5"
            +					}
            +				}
            +			}
            +		},
            +		"to-regex": {
            +			"version": "3.0.2",
            +			"resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz",
            +			"integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==",
            +			"dev": true,
            +			"requires": {
            +				"define-property": "^2.0.2",
            +				"extend-shallow": "^3.0.2",
            +				"regex-not": "^1.0.2",
            +				"safe-regex": "^1.1.0"
            +			}
            +		},
            +		"to-regex-range": {
            +			"version": "2.1.1",
            +			"resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz",
            +			"integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=",
            +			"dev": true,
            +			"requires": {
            +				"is-number": "^3.0.0",
            +				"repeat-string": "^1.6.1"
            +			}
            +		},
            +		"to-through": {
            +			"version": "2.0.0",
            +			"resolved": "https://registry.npmjs.org/to-through/-/to-through-2.0.0.tgz",
            +			"integrity": "sha1-/JKtq6ByZHvAtn1rA2ZKoZUJOvY=",
            +			"dev": true,
            +			"requires": {
            +				"through2": "^2.0.3"
            +			}
            +		},
            +		"tough-cookie": {
            +			"version": "2.5.0",
            +			"resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz",
            +			"integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==",
            +			"dev": true,
            +			"requires": {
            +				"psl": "^1.1.28",
            +				"punycode": "^2.1.1"
            +			}
            +		},
            +		"tr46": {
            +			"version": "1.0.1",
            +			"resolved": "https://registry.npmjs.org/tr46/-/tr46-1.0.1.tgz",
            +			"integrity": "sha1-qLE/1r/SSJUZZ0zN5VujaTtwbQk=",
            +			"dev": true,
            +			"requires": {
            +				"punycode": "^2.1.0"
            +			}
            +		},
            +		"transformation-matrix-js": {
            +			"version": "2.7.6",
            +			"resolved": "https://registry.npmjs.org/transformation-matrix-js/-/transformation-matrix-js-2.7.6.tgz",
            +			"integrity": "sha512-1CxDIZmCQ3vA0GGnkdMQqxUXVm3xXAFmglPYRS1hr37LzSg22TC7QAWOT38OmdUvMEs/rqcnkFoAsqvzdiluDg==",
            +			"dev": true
            +		},
            +		"trim-newlines": {
            +			"version": "2.0.0",
            +			"resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-2.0.0.tgz",
            +			"integrity": "sha1-tAPQuRvlDDMd/EuC7s6yLD3hbSA=",
            +			"dev": true
            +		},
            +		"ttf2eot": {
            +			"version": "2.0.0",
            +			"resolved": "https://registry.npmjs.org/ttf2eot/-/ttf2eot-2.0.0.tgz",
            +			"integrity": "sha1-jmM3pYWr0WCKDISVirSDzmn2ZUs=",
            +			"dev": true,
            +			"requires": {
            +				"argparse": "^1.0.6",
            +				"microbuffer": "^1.0.0"
            +			}
            +		},
            +		"ttf2woff": {
            +			"version": "2.0.2",
            +			"resolved": "https://registry.npmjs.org/ttf2woff/-/ttf2woff-2.0.2.tgz",
            +			"integrity": "sha512-X68badwBjAy/+itU49scLjXUL094up+rHuYk+YAOTTBYSUMOmLZ7VyhZJuqQESj1gnyLAC2/5V8Euv+mExmyPA==",
            +			"dev": true,
            +			"requires": {
            +				"argparse": "^1.0.6",
            +				"microbuffer": "^1.0.0",
            +				"pako": "^1.0.0"
            +			}
            +		},
            +		"tunnel-agent": {
            +			"version": "0.6.0",
            +			"resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz",
            +			"integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=",
            +			"dev": true,
            +			"requires": {
            +				"safe-buffer": "^5.0.1"
            +			}
            +		},
            +		"tweetnacl": {
            +			"version": "0.14.5",
            +			"resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz",
            +			"integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=",
            +			"dev": true
            +		},
            +		"type": {
            +			"version": "1.2.0",
            +			"resolved": "https://registry.npmjs.org/type/-/type-1.2.0.tgz",
            +			"integrity": "sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg==",
            +			"dev": true
            +		},
            +		"type-check": {
            +			"version": "0.3.2",
            +			"resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz",
            +			"integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=",
            +			"dev": true,
            +			"requires": {
            +				"prelude-ls": "~1.1.2"
            +			}
            +		},
            +		"type-detect": {
            +			"version": "4.0.8",
            +			"resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz",
            +			"integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==",
            +			"dev": true
            +		},
            +		"type-fest": {
            +			"version": "0.8.1",
            +			"resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz",
            +			"integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==",
            +			"dev": true
            +		},
            +		"typedarray": {
            +			"version": "0.0.6",
            +			"resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz",
            +			"integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=",
            +			"dev": true
            +		},
            +		"uc.micro": {
            +			"version": "1.0.6",
            +			"resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-1.0.6.tgz",
            +			"integrity": "sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA==",
            +			"dev": true
            +		},
            +		"uglify-js": {
            +			"version": "3.5.2",
            +			"resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.5.2.tgz",
            +			"integrity": "sha512-imog1WIsi9Yb56yRt5TfYVxGmnWs3WSGU73ieSOlMVFwhJCA9W8fqFFMMj4kgDqiS/80LGdsYnWL7O9UcjEBlg==",
            +			"dev": true,
            +			"requires": {
            +				"commander": "~2.19.0",
            +				"source-map": "~0.6.1"
            +			},
            +			"dependencies": {
            +				"source-map": {
            +					"version": "0.6.1",
            +					"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
            +					"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
            +					"dev": true
            +				}
            +			}
            +		},
            +		"unbox-primitive": {
            +			"version": "1.0.1",
            +			"resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.1.tgz",
            +			"integrity": "sha512-tZU/3NqK3dA5gpE1KtyiJUrEB0lxnGkMFHptJ7q6ewdZ8s12QrODwNbhIJStmJkd1QDXa1NRA8aF2A1zk/Ypyw==",
            +			"dev": true,
            +			"requires": {
            +				"function-bind": "^1.1.1",
            +				"has-bigints": "^1.0.1",
            +				"has-symbols": "^1.0.2",
            +				"which-boxed-primitive": "^1.0.2"
            +			},
            +			"dependencies": {
            +				"has-symbols": {
            +					"version": "1.0.2",
            +					"resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz",
            +					"integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==",
            +					"dev": true
            +				}
            +			}
            +		},
            +		"unc-path-regex": {
            +			"version": "0.1.2",
            +			"resolved": "https://registry.npmjs.org/unc-path-regex/-/unc-path-regex-0.1.2.tgz",
            +			"integrity": "sha1-5z3T17DXxe2G+6xrCufYxqadUPo=",
            +			"dev": true
            +		},
            +		"underscore": {
            +			"version": "1.10.2",
            +			"resolved": "https://registry.npmjs.org/underscore/-/underscore-1.10.2.tgz",
            +			"integrity": "sha512-N4P+Q/BuyuEKFJ43B9gYuOj4TQUHXX+j2FqguVOpjkssLUUrnJofCcBccJSCoeturDoZU6GorDTHSvUDlSQbTg==",
            +			"dev": true
            +		},
            +		"undertaker": {
            +			"version": "1.2.1",
            +			"resolved": "https://registry.npmjs.org/undertaker/-/undertaker-1.2.1.tgz",
            +			"integrity": "sha512-71WxIzDkgYk9ZS+spIB8iZXchFhAdEo2YU8xYqBYJ39DIUIqziK78ftm26eecoIY49X0J2MLhG4hr18Yp6/CMA==",
            +			"dev": true,
            +			"requires": {
            +				"arr-flatten": "^1.0.1",
            +				"arr-map": "^2.0.0",
            +				"bach": "^1.0.0",
            +				"collection-map": "^1.0.0",
            +				"es6-weak-map": "^2.0.1",
            +				"last-run": "^1.1.0",
            +				"object.defaults": "^1.0.0",
            +				"object.reduce": "^1.0.0",
            +				"undertaker-registry": "^1.0.0"
            +			}
            +		},
            +		"undertaker-registry": {
            +			"version": "1.0.1",
            +			"resolved": "https://registry.npmjs.org/undertaker-registry/-/undertaker-registry-1.0.1.tgz",
            +			"integrity": "sha1-XkvaMI5KiirlhPm5pDWaSZglzFA=",
            +			"dev": true
            +		},
            +		"union": {
            +			"version": "0.5.0",
            +			"resolved": "https://registry.npmjs.org/union/-/union-0.5.0.tgz",
            +			"integrity": "sha512-N6uOhuW6zO95P3Mel2I2zMsbsanvvtgn6jVqJv4vbVcz/JN0OkL9suomjQGmWtxJQXOCqUJvquc1sMeNz/IwlA==",
            +			"dev": true,
            +			"requires": {
            +				"qs": "^6.4.0"
            +			}
            +		},
            +		"union-value": {
            +			"version": "1.0.1",
            +			"resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz",
            +			"integrity": "sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg==",
            +			"dev": true,
            +			"requires": {
            +				"arr-union": "^3.1.0",
            +				"get-value": "^2.0.6",
            +				"is-extendable": "^0.1.1",
            +				"set-value": "^2.0.1"
            +			}
            +		},
            +		"unique-stream": {
            +			"version": "2.3.1",
            +			"resolved": "https://registry.npmjs.org/unique-stream/-/unique-stream-2.3.1.tgz",
            +			"integrity": "sha512-2nY4TnBE70yoxHkDli7DMazpWiP7xMdCYqU2nBRO0UB+ZpEkGsSija7MvmvnZFUeC+mrgiUfcHSr3LmRFIg4+A==",
            +			"dev": true,
            +			"requires": {
            +				"json-stable-stringify-without-jsonify": "^1.0.1",
            +				"through2-filter": "^3.0.0"
            +			}
            +		},
            +		"universal-url": {
            +			"version": "2.0.0",
            +			"resolved": "https://registry.npmjs.org/universal-url/-/universal-url-2.0.0.tgz",
            +			"integrity": "sha512-3DLtXdm/G1LQMCnPj+Aw7uDoleQttNHp2g5FnNQKR6cP6taNWS1b/Ehjjx4PVyvejKi3TJyu8iBraKM4q3JQPg==",
            +			"dev": true,
            +			"requires": {
            +				"hasurl": "^1.0.0",
            +				"whatwg-url": "^7.0.0"
            +			}
            +		},
            +		"universal-user-agent": {
            +			"version": "4.0.1",
            +			"resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-4.0.1.tgz",
            +			"integrity": "sha512-LnST3ebHwVL2aNe4mejI9IQh2HfZ1RLo8Io2HugSif8ekzD1TlWpHpColOB/eh8JHMLkGH3Akqf040I+4ylNxg==",
            +			"dev": true,
            +			"requires": {
            +				"os-name": "^3.1.0"
            +			}
            +		},
            +		"universalify": {
            +			"version": "0.1.2",
            +			"resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz",
            +			"integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==",
            +			"dev": true
            +		},
            +		"unset-value": {
            +			"version": "1.0.0",
            +			"resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz",
            +			"integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=",
            +			"dev": true,
            +			"requires": {
            +				"has-value": "^0.3.1",
            +				"isobject": "^3.0.0"
            +			},
            +			"dependencies": {
            +				"has-value": {
            +					"version": "0.3.1",
            +					"resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz",
            +					"integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=",
            +					"dev": true,
            +					"requires": {
            +						"get-value": "^2.0.3",
            +						"has-values": "^0.1.4",
            +						"isobject": "^2.0.0"
            +					},
            +					"dependencies": {
            +						"isobject": {
            +							"version": "2.1.0",
            +							"resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz",
            +							"integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=",
            +							"dev": true,
            +							"requires": {
            +								"isarray": "1.0.0"
            +							}
            +						}
            +					}
            +				},
            +				"has-values": {
            +					"version": "0.1.4",
            +					"resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz",
            +					"integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=",
            +					"dev": true
            +				}
            +			}
            +		},
            +		"upath": {
            +			"version": "1.2.0",
            +			"resolved": "https://registry.npmjs.org/upath/-/upath-1.2.0.tgz",
            +			"integrity": "sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg==",
            +			"dev": true
            +		},
            +		"uri-js": {
            +			"version": "4.2.2",
            +			"resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz",
            +			"integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==",
            +			"dev": true,
            +			"requires": {
            +				"punycode": "^2.1.0"
            +			}
            +		},
            +		"urix": {
            +			"version": "0.1.0",
            +			"resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz",
            +			"integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=",
            +			"dev": true
            +		},
            +		"url-join": {
            +			"version": "2.0.5",
            +			"resolved": "https://registry.npmjs.org/url-join/-/url-join-2.0.5.tgz",
            +			"integrity": "sha1-WvIvGMBSoACkjXuCxenC4v7tpyg=",
            +			"dev": true
            +		},
            +		"use": {
            +			"version": "3.1.1",
            +			"resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz",
            +			"integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==",
            +			"dev": true
            +		},
            +		"util-deprecate": {
            +			"version": "1.0.2",
            +			"resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
            +			"integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=",
            +			"dev": true
            +		},
            +		"uuid": {
            +			"version": "3.3.2",
            +			"resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz",
            +			"integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==",
            +			"dev": true
            +		},
            +		"v8-compile-cache": {
            +			"version": "2.3.0",
            +			"resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz",
            +			"integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==",
            +			"dev": true
            +		},
            +		"v8flags": {
            +			"version": "3.1.3",
            +			"resolved": "https://registry.npmjs.org/v8flags/-/v8flags-3.1.3.tgz",
            +			"integrity": "sha512-amh9CCg3ZxkzQ48Mhcb8iX7xpAfYJgePHxWMQCBWECpOSqJUXgY26ncA61UTV0BkPqfhcy6mzwCIoP4ygxpW8w==",
            +			"dev": true,
            +			"requires": {
            +				"homedir-polyfill": "^1.0.1"
            +			}
            +		},
            +		"validate-npm-package-license": {
            +			"version": "3.0.4",
            +			"resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz",
            +			"integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==",
            +			"dev": true,
            +			"requires": {
            +				"spdx-correct": "^3.0.0",
            +				"spdx-expression-parse": "^3.0.0"
            +			}
            +		},
            +		"value-or-function": {
            +			"version": "3.0.0",
            +			"resolved": "https://registry.npmjs.org/value-or-function/-/value-or-function-3.0.0.tgz",
            +			"integrity": "sha1-HCQ6ULWVwb5Up1S/7OhWO5/42BM=",
            +			"dev": true
            +		},
            +		"varstream": {
            +			"version": "0.3.2",
            +			"resolved": "https://registry.npmjs.org/varstream/-/varstream-0.3.2.tgz",
            +			"integrity": "sha1-GKxklHZfP/GjWtmkvgU77BiKXeE=",
            +			"dev": true,
            +			"requires": {
            +				"readable-stream": "^1.0.33"
            +			},
            +			"dependencies": {
            +				"isarray": {
            +					"version": "0.0.1",
            +					"resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz",
            +					"integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=",
            +					"dev": true
            +				},
            +				"readable-stream": {
            +					"version": "1.1.14",
            +					"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz",
            +					"integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=",
            +					"dev": true,
            +					"requires": {
            +						"core-util-is": "~1.0.0",
            +						"inherits": "~2.0.1",
            +						"isarray": "0.0.1",
            +						"string_decoder": "~0.10.x"
            +					}
            +				},
            +				"string_decoder": {
            +					"version": "0.10.31",
            +					"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz",
            +					"integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=",
            +					"dev": true
            +				}
            +			}
            +		},
            +		"verror": {
            +			"version": "1.10.0",
            +			"resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz",
            +			"integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=",
            +			"dev": true,
            +			"requires": {
            +				"assert-plus": "^1.0.0",
            +				"core-util-is": "1.0.2",
            +				"extsprintf": "^1.2.0"
            +			}
            +		},
            +		"vinyl": {
            +			"version": "2.2.0",
            +			"resolved": "https://registry.npmjs.org/vinyl/-/vinyl-2.2.0.tgz",
            +			"integrity": "sha512-MBH+yP0kC/GQ5GwBqrTPTzEfiiLjta7hTtvQtbxBgTeSXsmKQRQecjibMbxIXzVT3Y9KJK+drOz1/k+vsu8Nkg==",
            +			"dev": true,
            +			"requires": {
            +				"clone": "^2.1.1",
            +				"clone-buffer": "^1.0.0",
            +				"clone-stats": "^1.0.0",
            +				"cloneable-readable": "^1.0.0",
            +				"remove-trailing-separator": "^1.0.1",
            +				"replace-ext": "^1.0.0"
            +			}
            +		},
            +		"vinyl-fs": {
            +			"version": "3.0.3",
            +			"resolved": "https://registry.npmjs.org/vinyl-fs/-/vinyl-fs-3.0.3.tgz",
            +			"integrity": "sha512-vIu34EkyNyJxmP0jscNzWBSygh7VWhqun6RmqVfXePrOwi9lhvRs//dOaGOTRUQr4tx7/zd26Tk5WeSVZitgng==",
            +			"dev": true,
            +			"requires": {
            +				"fs-mkdirp-stream": "^1.0.0",
            +				"glob-stream": "^6.1.0",
            +				"graceful-fs": "^4.0.0",
            +				"is-valid-glob": "^1.0.0",
            +				"lazystream": "^1.0.0",
            +				"lead": "^1.0.0",
            +				"object.assign": "^4.0.4",
            +				"pumpify": "^1.3.5",
            +				"readable-stream": "^2.3.3",
            +				"remove-bom-buffer": "^3.0.0",
            +				"remove-bom-stream": "^1.2.0",
            +				"resolve-options": "^1.1.0",
            +				"through2": "^2.0.0",
            +				"to-through": "^2.0.0",
            +				"value-or-function": "^3.0.0",
            +				"vinyl": "^2.0.0",
            +				"vinyl-sourcemap": "^1.1.0"
            +			}
            +		},
            +		"vinyl-sourcemap": {
            +			"version": "1.1.0",
            +			"resolved": "https://registry.npmjs.org/vinyl-sourcemap/-/vinyl-sourcemap-1.1.0.tgz",
            +			"integrity": "sha1-kqgAWTo4cDqM2xHYswCtS+Y7PhY=",
            +			"dev": true,
            +			"requires": {
            +				"append-buffer": "^1.0.2",
            +				"convert-source-map": "^1.5.0",
            +				"graceful-fs": "^4.1.6",
            +				"normalize-path": "^2.1.1",
            +				"now-and-later": "^2.0.0",
            +				"remove-bom-buffer": "^3.0.0",
            +				"vinyl": "^2.0.0"
            +			}
            +		},
            +		"vinyl-sourcemaps-apply": {
            +			"version": "0.2.1",
            +			"resolved": "https://registry.npmjs.org/vinyl-sourcemaps-apply/-/vinyl-sourcemaps-apply-0.2.1.tgz",
            +			"integrity": "sha1-q2VJ1h0XLCsbh75cUI0jnI74dwU=",
            +			"dev": true,
            +			"requires": {
            +				"source-map": "^0.5.1"
            +			}
            +		},
            +		"w3c-hr-time": {
            +			"version": "1.0.1",
            +			"resolved": "https://registry.npmjs.org/w3c-hr-time/-/w3c-hr-time-1.0.1.tgz",
            +			"integrity": "sha1-gqwr/2PZUOqeMYmlimViX+3xkEU=",
            +			"dev": true,
            +			"requires": {
            +				"browser-process-hrtime": "^0.1.2"
            +			}
            +		},
            +		"w3c-xmlserializer": {
            +			"version": "1.0.1",
            +			"resolved": "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-1.0.1.tgz",
            +			"integrity": "sha512-XZGI1OH/OLQr/NaJhhPmzhngwcAnZDLytsvXnRmlYeRkmbb0I7sqFFA22erq4WQR0sUu17ZSQOAV9mFwCqKRNg==",
            +			"dev": true,
            +			"requires": {
            +				"domexception": "^1.0.1",
            +				"webidl-conversions": "^4.0.2",
            +				"xml-name-validator": "^3.0.0"
            +			}
            +		},
            +		"wawoff2": {
            +			"version": "1.0.2",
            +			"resolved": "https://registry.npmjs.org/wawoff2/-/wawoff2-1.0.2.tgz",
            +			"integrity": "sha512-qxuTwf5tAP/XojrRc6cmR0hGvqgD3XUxv2fzfzURKPDfE7AeHmtRuankVxdJ4DRdSKXaE5QlyJT49yBis2vb6Q==",
            +			"dev": true,
            +			"requires": {
            +				"argparse": "^1.0.6"
            +			}
            +		},
            +		"webfont": {
            +			"version": "9.0.0",
            +			"resolved": "https://registry.npmjs.org/webfont/-/webfont-9.0.0.tgz",
            +			"integrity": "sha512-Sn8KnTXroWAbBHYKUXCUq2rKwqbluupUd7krYqluT+kFGV4dvMuKXaL84Fm/Kfv+5rz2S81jNRvcyQ6ySBiC2Q==",
            +			"dev": true,
            +			"requires": {
            +				"cosmiconfig": "^5.2.0",
            +				"deepmerge": "^3.2.0",
            +				"fs-extra": "^7.0.1",
            +				"globby": "^9.2.0",
            +				"meow": "^5.0.0",
            +				"nunjucks": "^3.2.0",
            +				"p-limit": "^2.2.0",
            +				"resolve-from": "^5.0.0",
            +				"svg2ttf": "^4.0.0",
            +				"svgicons2svgfont": "^9.0.3",
            +				"ttf2eot": "^2.0.0",
            +				"ttf2woff": "^2.0.0",
            +				"wawoff2": "^1.0.2",
            +				"xml2js": "^0.4.17"
            +			},
            +			"dependencies": {
            +				"globby": {
            +					"version": "9.2.0",
            +					"resolved": "https://registry.npmjs.org/globby/-/globby-9.2.0.tgz",
            +					"integrity": "sha512-ollPHROa5mcxDEkwg6bPt3QbEf4pDQSNtd6JPL1YvOvAo/7/0VAm9TccUeoTmarjPw4pfUthSCqcyfNB1I3ZSg==",
            +					"dev": true,
            +					"requires": {
            +						"@types/glob": "^7.1.1",
            +						"array-union": "^1.0.2",
            +						"dir-glob": "^2.2.2",
            +						"fast-glob": "^2.2.6",
            +						"glob": "^7.1.3",
            +						"ignore": "^4.0.3",
            +						"pify": "^4.0.1",
            +						"slash": "^2.0.0"
            +					}
            +				},
            +				"pify": {
            +					"version": "4.0.1",
            +					"resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz",
            +					"integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==",
            +					"dev": true
            +				}
            +			}
            +		},
            +		"webidl-conversions": {
            +			"version": "4.0.2",
            +			"resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-4.0.2.tgz",
            +			"integrity": "sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg==",
            +			"dev": true
            +		},
            +		"whatwg-encoding": {
            +			"version": "1.0.5",
            +			"resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-1.0.5.tgz",
            +			"integrity": "sha512-b5lim54JOPN9HtzvK9HFXvBma/rnfFeqsic0hSpjtDbVxR3dJKLc+KB4V6GgiGOvl7CY/KNh8rxSo9DKQrnUEw==",
            +			"dev": true,
            +			"requires": {
            +				"iconv-lite": "0.4.24"
            +			}
            +		},
            +		"whatwg-mimetype": {
            +			"version": "2.3.0",
            +			"resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-2.3.0.tgz",
            +			"integrity": "sha512-M4yMwr6mAnQz76TbJm914+gPpB/nCwvZbJU28cUD6dR004SAxDLOOSUaB1JDRqLtaOV/vi0IC5lEAGFgrjGv/g==",
            +			"dev": true
            +		},
            +		"whatwg-url": {
            +			"version": "7.0.0",
            +			"resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-7.0.0.tgz",
            +			"integrity": "sha512-37GeVSIJ3kn1JgKyjiYNmSLP1yzbpb29jdmwBSgkD9h40/hyrR/OifpVUndji3tmwGgD8qpw7iQu3RSbCrBpsQ==",
            +			"dev": true,
            +			"requires": {
            +				"lodash.sortby": "^4.7.0",
            +				"tr46": "^1.0.1",
            +				"webidl-conversions": "^4.0.2"
            +			}
            +		},
            +		"which": {
            +			"version": "1.3.1",
            +			"resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz",
            +			"integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==",
            +			"dev": true,
            +			"requires": {
            +				"isexe": "^2.0.0"
            +			}
            +		},
            +		"which-boxed-primitive": {
            +			"version": "1.0.2",
            +			"resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz",
            +			"integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==",
            +			"dev": true,
            +			"requires": {
            +				"is-bigint": "^1.0.1",
            +				"is-boolean-object": "^1.1.0",
            +				"is-number-object": "^1.0.4",
            +				"is-string": "^1.0.5",
            +				"is-symbol": "^1.0.3"
            +			},
            +			"dependencies": {
            +				"has-symbols": {
            +					"version": "1.0.2",
            +					"resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz",
            +					"integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==",
            +					"dev": true
            +				},
            +				"is-symbol": {
            +					"version": "1.0.4",
            +					"resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz",
            +					"integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==",
            +					"dev": true,
            +					"requires": {
            +						"has-symbols": "^1.0.2"
            +					}
            +				}
            +			}
            +		},
            +		"which-module": {
            +			"version": "1.0.0",
            +			"resolved": "https://registry.npmjs.org/which-module/-/which-module-1.0.0.tgz",
            +			"integrity": "sha1-u6Y8qGGUiZT/MHc2CJ47lgJsKk8=",
            +			"dev": true
            +		},
            +		"wide-align": {
            +			"version": "1.1.3",
            +			"resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz",
            +			"integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==",
            +			"dev": true,
            +			"requires": {
            +				"string-width": "^1.0.2 || 2"
            +			}
            +		},
            +		"windows-release": {
            +			"version": "3.3.3",
            +			"resolved": "https://registry.npmjs.org/windows-release/-/windows-release-3.3.3.tgz",
            +			"integrity": "sha512-OSOGH1QYiW5yVor9TtmXKQvt2vjQqbYS+DqmsZw+r7xDwLXEeT3JGW0ZppFmHx4diyXmxt238KFR3N9jzevBRg==",
            +			"dev": true,
            +			"requires": {
            +				"execa": "^1.0.0"
            +			}
            +		},
            +		"word-wrap": {
            +			"version": "1.2.3",
            +			"resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz",
            +			"integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==",
            +			"dev": true
            +		},
            +		"wordwrap": {
            +			"version": "1.0.0",
            +			"resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz",
            +			"integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=",
            +			"dev": true
            +		},
            +		"wrap-ansi": {
            +			"version": "2.1.0",
            +			"resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz",
            +			"integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=",
            +			"dev": true,
            +			"requires": {
            +				"string-width": "^1.0.1",
            +				"strip-ansi": "^3.0.1"
            +			}
            +		},
            +		"wrappy": {
            +			"version": "1.0.2",
            +			"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
            +			"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=",
            +			"dev": true
            +		},
            +		"ws": {
            +			"version": "6.2.2",
            +			"resolved": "https://registry.npmjs.org/ws/-/ws-6.2.2.tgz",
            +			"integrity": "sha512-zmhltoSR8u1cnDsD43TX59mzoMZsLKqUweyYBAIvTngR3shc0W6aOZylZmq/7hqyVxPdi+5Ud2QInblgyE72fw==",
            +			"dev": true,
            +			"requires": {
            +				"async-limiter": "~1.0.0"
            +			}
            +		},
            +		"xml-name-validator": {
            +			"version": "3.0.0",
            +			"resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-3.0.0.tgz",
            +			"integrity": "sha512-A5CUptxDsvxKJEU3yO6DuWBSJz/qizqzJKOMIfUJHETbBw/sFaDxgd6fxm1ewUaM0jZ444Fc5vC5ROYurg/4Pw==",
            +			"dev": true
            +		},
            +		"xml2js": {
            +			"version": "0.4.23",
            +			"resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.23.tgz",
            +			"integrity": "sha512-ySPiMjM0+pLDftHgXY4By0uswI3SPKLDw/i3UXbnO8M/p28zqexCUoPmQFrYD+/1BzhGJSs2i1ERWKJAtiLrug==",
            +			"dev": true,
            +			"requires": {
            +				"sax": ">=0.6.0",
            +				"xmlbuilder": "~11.0.0"
            +			}
            +		},
            +		"xmlbuilder": {
            +			"version": "11.0.1",
            +			"resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-11.0.1.tgz",
            +			"integrity": "sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA==",
            +			"dev": true
            +		},
            +		"xmlchars": {
            +			"version": "1.3.1",
            +			"resolved": "https://registry.npmjs.org/xmlchars/-/xmlchars-1.3.1.tgz",
            +			"integrity": "sha512-tGkGJkN8XqCod7OT+EvGYK5Z4SfDQGD30zAa58OcnAa0RRWgzUEK72tkXhsX1FZd+rgnhRxFtmO+ihkp8LHSkw==",
            +			"dev": true
            +		},
            +		"xmlcreate": {
            +			"version": "2.0.3",
            +			"resolved": "https://registry.npmjs.org/xmlcreate/-/xmlcreate-2.0.3.tgz",
            +			"integrity": "sha512-HgS+X6zAztGa9zIK3Y3LXuJes33Lz9x+YyTxgrkIdabu2vqcGOWwdfCpf1hWLRrd553wd4QCDf6BBO6FfdsRiQ==",
            +			"dev": true
            +		},
            +		"xmldom": {
            +			"version": "0.1.31",
            +			"resolved": "https://registry.npmjs.org/xmldom/-/xmldom-0.1.31.tgz",
            +			"integrity": "sha512-yS2uJflVQs6n+CyjHoaBmVSqIDevTAWrzMmjG1Gc7h1qQ7uVozNhEPJAwZXWyGQ/Gafo3fCwrcaokezLPupVyQ==",
            +			"dev": true
            +		},
            +		"xtend": {
            +			"version": "4.0.1",
            +			"resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz",
            +			"integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=",
            +			"dev": true
            +		},
            +		"y18n": {
            +			"version": "3.2.2",
            +			"resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.2.tgz",
            +			"integrity": "sha512-uGZHXkHnhF0XeeAPgnKfPv1bgKAYyVvmNL1xlKsPYZPaIHxGti2hHqvOCQv71XMsLxu1QjergkqogUnms5D3YQ==",
            +			"dev": true
            +		},
            +		"yallist": {
            +			"version": "4.0.0",
            +			"resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
            +			"integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==",
            +			"dev": true
            +		},
            +		"yargs": {
            +			"version": "13.2.2",
            +			"resolved": "https://registry.npmjs.org/yargs/-/yargs-13.2.2.tgz",
            +			"integrity": "sha512-WyEoxgyTD3w5XRpAQNYUB9ycVH/PQrToaTXdYXRdOXvEy1l19br+VJsc0vcO8PTGg5ro/l/GY7F/JMEBmI0BxA==",
            +			"dev": true,
            +			"requires": {
            +				"cliui": "^4.0.0",
            +				"find-up": "^3.0.0",
            +				"get-caller-file": "^2.0.1",
            +				"os-locale": "^3.1.0",
            +				"require-directory": "^2.1.1",
            +				"require-main-filename": "^2.0.0",
            +				"set-blocking": "^2.0.0",
            +				"string-width": "^3.0.0",
            +				"which-module": "^2.0.0",
            +				"y18n": "^4.0.0",
            +				"yargs-parser": "^13.0.0"
            +			},
            +			"dependencies": {
            +				"ansi-regex": {
            +					"version": "3.0.0",
            +					"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz",
            +					"integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=",
            +					"dev": true
            +				},
            +				"camelcase": {
            +					"version": "5.3.1",
            +					"resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz",
            +					"integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==",
            +					"dev": true
            +				},
            +				"cliui": {
            +					"version": "4.1.0",
            +					"resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz",
            +					"integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==",
            +					"dev": true,
            +					"requires": {
            +						"string-width": "^2.1.1",
            +						"strip-ansi": "^4.0.0",
            +						"wrap-ansi": "^2.0.0"
            +					},
            +					"dependencies": {
            +						"string-width": {
            +							"version": "2.1.1",
            +							"resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz",
            +							"integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==",
            +							"dev": true,
            +							"requires": {
            +								"is-fullwidth-code-point": "^2.0.0",
            +								"strip-ansi": "^4.0.0"
            +							}
            +						}
            +					}
            +				},
            +				"find-up": {
            +					"version": "3.0.0",
            +					"resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz",
            +					"integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==",
            +					"dev": true,
            +					"requires": {
            +						"locate-path": "^3.0.0"
            +					}
            +				},
            +				"get-caller-file": {
            +					"version": "2.0.5",
            +					"resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz",
            +					"integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==",
            +					"dev": true
            +				},
            +				"invert-kv": {
            +					"version": "2.0.0",
            +					"resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-2.0.0.tgz",
            +					"integrity": "sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA==",
            +					"dev": true
            +				},
            +				"is-fullwidth-code-point": {
            +					"version": "2.0.0",
            +					"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
            +					"integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=",
            +					"dev": true
            +				},
            +				"lcid": {
            +					"version": "2.0.0",
            +					"resolved": "https://registry.npmjs.org/lcid/-/lcid-2.0.0.tgz",
            +					"integrity": "sha512-avPEb8P8EGnwXKClwsNUgryVjllcRqtMYa49NTsbQagYuT1DcXnl1915oxWjoyGrXR6zH/Y0Zc96xWsPcoDKeA==",
            +					"dev": true,
            +					"requires": {
            +						"invert-kv": "^2.0.0"
            +					}
            +				},
            +				"os-locale": {
            +					"version": "3.1.0",
            +					"resolved": "https://registry.npmjs.org/os-locale/-/os-locale-3.1.0.tgz",
            +					"integrity": "sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q==",
            +					"dev": true,
            +					"requires": {
            +						"execa": "^1.0.0",
            +						"lcid": "^2.0.0",
            +						"mem": "^4.0.0"
            +					}
            +				},
            +				"require-main-filename": {
            +					"version": "2.0.0",
            +					"resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz",
            +					"integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==",
            +					"dev": true
            +				},
            +				"string-width": {
            +					"version": "3.1.0",
            +					"resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz",
            +					"integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==",
            +					"dev": true,
            +					"requires": {
            +						"emoji-regex": "^7.0.1",
            +						"is-fullwidth-code-point": "^2.0.0",
            +						"strip-ansi": "^5.1.0"
            +					},
            +					"dependencies": {
            +						"ansi-regex": {
            +							"version": "4.1.0",
            +							"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz",
            +							"integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==",
            +							"dev": true
            +						},
            +						"strip-ansi": {
            +							"version": "5.2.0",
            +							"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz",
            +							"integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==",
            +							"dev": true,
            +							"requires": {
            +								"ansi-regex": "^4.1.0"
            +							}
            +						}
            +					}
            +				},
            +				"strip-ansi": {
            +					"version": "4.0.0",
            +					"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz",
            +					"integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=",
            +					"dev": true,
            +					"requires": {
            +						"ansi-regex": "^3.0.0"
            +					}
            +				},
            +				"which-module": {
            +					"version": "2.0.0",
            +					"resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz",
            +					"integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=",
            +					"dev": true
            +				},
            +				"y18n": {
            +					"version": "4.0.1",
            +					"resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.1.tgz",
            +					"integrity": "sha512-wNcy4NvjMYL8gogWWYAO7ZFWFfHcbdbE57tZO8e4cbpj8tfUcwrwqSl3ad8HxpYWCdXcJUCeKKZS62Av1affwQ==",
            +					"dev": true
            +				},
            +				"yargs-parser": {
            +					"version": "13.1.2",
            +					"resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz",
            +					"integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==",
            +					"dev": true,
            +					"requires": {
            +						"camelcase": "^5.0.0",
            +						"decamelize": "^1.2.0"
            +					}
            +				}
            +			}
            +		},
            +		"yargs-parser": {
            +			"version": "5.0.0",
            +			"resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-5.0.0.tgz",
            +			"integrity": "sha1-J17PDX/+Bcd+ZOfIbkzZS/DhIoo=",
            +			"dev": true,
            +			"requires": {
            +				"camelcase": "^3.0.0"
            +			}
            +		},
            +		"yargs-unparser": {
            +			"version": "1.5.0",
            +			"resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-1.5.0.tgz",
            +			"integrity": "sha512-HK25qidFTCVuj/D1VfNiEndpLIeJN78aqgR23nL3y4N0U/91cOAzqfHlF8n2BvoNDcZmJKin3ddNSvOxSr8flw==",
            +			"dev": true,
            +			"requires": {
            +				"flat": "^4.1.0",
            +				"lodash": "^4.17.11",
            +				"yargs": "^12.0.5"
            +			},
            +			"dependencies": {
            +				"ansi-regex": {
            +					"version": "3.0.0",
            +					"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz",
            +					"integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=",
            +					"dev": true
            +				},
            +				"camelcase": {
            +					"version": "5.3.1",
            +					"resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz",
            +					"integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==",
            +					"dev": true
            +				},
            +				"cliui": {
            +					"version": "4.1.0",
            +					"resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz",
            +					"integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==",
            +					"dev": true,
            +					"requires": {
            +						"string-width": "^2.1.1",
            +						"strip-ansi": "^4.0.0",
            +						"wrap-ansi": "^2.0.0"
            +					}
            +				},
            +				"find-up": {
            +					"version": "3.0.0",
            +					"resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz",
            +					"integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==",
            +					"dev": true,
            +					"requires": {
            +						"locate-path": "^3.0.0"
            +					}
            +				},
            +				"invert-kv": {
            +					"version": "2.0.0",
            +					"resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-2.0.0.tgz",
            +					"integrity": "sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA==",
            +					"dev": true
            +				},
            +				"is-fullwidth-code-point": {
            +					"version": "2.0.0",
            +					"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
            +					"integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=",
            +					"dev": true
            +				},
            +				"lcid": {
            +					"version": "2.0.0",
            +					"resolved": "https://registry.npmjs.org/lcid/-/lcid-2.0.0.tgz",
            +					"integrity": "sha512-avPEb8P8EGnwXKClwsNUgryVjllcRqtMYa49NTsbQagYuT1DcXnl1915oxWjoyGrXR6zH/Y0Zc96xWsPcoDKeA==",
            +					"dev": true,
            +					"requires": {
            +						"invert-kv": "^2.0.0"
            +					}
            +				},
            +				"os-locale": {
            +					"version": "3.1.0",
            +					"resolved": "https://registry.npmjs.org/os-locale/-/os-locale-3.1.0.tgz",
            +					"integrity": "sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q==",
            +					"dev": true,
            +					"requires": {
            +						"execa": "^1.0.0",
            +						"lcid": "^2.0.0",
            +						"mem": "^4.0.0"
            +					}
            +				},
            +				"string-width": {
            +					"version": "2.1.1",
            +					"resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz",
            +					"integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==",
            +					"dev": true,
            +					"requires": {
            +						"is-fullwidth-code-point": "^2.0.0",
            +						"strip-ansi": "^4.0.0"
            +					}
            +				},
            +				"strip-ansi": {
            +					"version": "4.0.0",
            +					"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz",
            +					"integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=",
            +					"dev": true,
            +					"requires": {
            +						"ansi-regex": "^3.0.0"
            +					}
            +				},
            +				"which-module": {
            +					"version": "2.0.0",
            +					"resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz",
            +					"integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=",
            +					"dev": true
            +				},
            +				"yargs": {
            +					"version": "12.0.5",
            +					"resolved": "https://registry.npmjs.org/yargs/-/yargs-12.0.5.tgz",
            +					"integrity": "sha512-Lhz8TLaYnxq/2ObqHDql8dX8CJi97oHxrjUcYtzKbbykPtVW9WB+poxI+NM2UIzsMgNCZTIf0AQwsjK5yMAqZw==",
            +					"dev": true,
            +					"requires": {
            +						"cliui": "^4.0.0",
            +						"decamelize": "^1.2.0",
            +						"find-up": "^3.0.0",
            +						"get-caller-file": "^1.0.1",
            +						"os-locale": "^3.0.0",
            +						"require-directory": "^2.1.1",
            +						"require-main-filename": "^1.0.1",
            +						"set-blocking": "^2.0.0",
            +						"string-width": "^2.0.0",
            +						"which-module": "^2.0.0",
            +						"y18n": "^3.2.1 || ^4.0.0",
            +						"yargs-parser": "^11.1.1"
            +					}
            +				},
            +				"yargs-parser": {
            +					"version": "11.1.1",
            +					"resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-11.1.1.tgz",
            +					"integrity": "sha512-C6kB/WJDiaxONLJQnF8ccx9SEeoTTLek8RVbaOIsrAUS8VrBEXfmeSnCZxygc+XC2sNMBIwOOnfcxiynjHsVSQ==",
            +					"dev": true,
            +					"requires": {
            +						"camelcase": "^5.0.0",
            +						"decamelize": "^1.2.0"
            +					}
            +				}
            +			}
            +		}
            +	}
             }
            diff --git a/package.json b/package.json
            index 88dee8c102..a094e749b8 100755
            --- a/package.json
            +++ b/package.json
            @@ -1,81 +1,81 @@
             {
            -  "name": "prismjs",
            -  "version": "1.25.0",
            -  "description": "Lightweight, robust, elegant syntax highlighting. A spin-off project from Dabblet.",
            -  "main": "prism.js",
            -  "style": "themes/prism.css",
            -  "scripts": {
            -    "benchmark": "node benchmark/benchmark.js",
            -    "build": "gulp",
            -    "start": "http-server -c-1",
            -    "lint": "eslint . --cache",
            -    "lint:fix": "npm run lint -- --fix",
            -    "lint:ci": "eslint . --max-warnings 0",
            -    "test:aliases": "mocha tests/aliases-test.js",
            -    "test:core": "mocha tests/core/**/*.js",
            -    "test:dependencies": "mocha tests/dependencies-test.js",
            -    "test:examples": "mocha tests/examples-test.js",
            -    "test:identifiers": "mocha tests/identifier-test.js",
            -    "test:languages": "mocha tests/run.js",
            -    "test:patterns": "mocha tests/pattern-tests.js",
            -    "test:plugins": "mocha tests/plugins/**/*.js",
            -    "test:runner": "mocha tests/testrunner-tests.js",
            -    "test": "npm-run-all test:*"
            -  },
            -  "repository": {
            -    "type": "git",
            -    "url": "https://github.com/PrismJS/prism.git"
            -  },
            -  "keywords": [
            -    "prism",
            -    "highlight"
            -  ],
            -  "author": "Lea Verou",
            -  "license": "MIT",
            -  "readmeFilename": "README.md",
            -  "devDependencies": {
            -    "@types/node-fetch": "^2.5.5",
            -    "benchmark": "^2.1.4",
            -    "chai": "^4.2.0",
            -    "danger": "^10.5.0",
            -    "del": "^4.1.1",
            -    "docdash": "^1.2.0",
            -    "eslint": "^7.22.0",
            -    "eslint-plugin-jsdoc": "^32.3.0",
            -    "eslint-plugin-regexp": "^1.2.0",
            -    "gulp": "^4.0.2",
            -    "gulp-concat": "^2.3.4",
            -    "gulp-header": "^2.0.7",
            -    "gulp-jsdoc3": "^3.0.0",
            -    "gulp-rename": "^1.2.0",
            -    "gulp-replace": "^1.0.0",
            -    "gulp-uglify": "^3.0.1",
            -    "gzip-size": "^5.1.1",
            -    "htmlparser2": "^4.0.0",
            -    "http-server": "^0.12.3",
            -    "jsdom": "^13.0.0",
            -    "mocha": "^6.2.0",
            -    "node-fetch": "^2.6.0",
            -    "npm-run-all": "^4.1.5",
            -    "pump": "^3.0.0",
            -    "refa": "^0.9.1",
            -    "regexp-ast-analysis": "^0.2.4",
            -    "regexpp": "^3.2.0",
            -    "scslre": "^0.1.6",
            -    "simple-git": "^1.107.0",
            -    "webfont": "^9.0.0",
            -    "yargs": "^13.2.2"
            -  },
            -  "jspm": {
            -    "main": "prism",
            -    "registry": "jspm",
            -    "jspmPackage": true,
            -    "format": "global",
            -    "files": [
            -      "components/**/*.js",
            -      "plugins/**/*",
            -      "themes/*.css",
            -      "prism.js"
            -    ]
            -  }
            +	"name": "prismjs",
            +	"version": "1.25.0",
            +	"description": "Lightweight, robust, elegant syntax highlighting. A spin-off project from Dabblet.",
            +	"main": "prism.js",
            +	"style": "themes/prism.css",
            +	"scripts": {
            +		"benchmark": "node benchmark/benchmark.js",
            +		"build": "gulp",
            +		"start": "http-server -c-1",
            +		"lint": "eslint . --cache",
            +		"lint:fix": "npm run lint -- --fix",
            +		"lint:ci": "eslint . --max-warnings 0",
            +		"test:aliases": "mocha tests/aliases-test.js",
            +		"test:core": "mocha tests/core/**/*.js",
            +		"test:dependencies": "mocha tests/dependencies-test.js",
            +		"test:examples": "mocha tests/examples-test.js",
            +		"test:identifiers": "mocha tests/identifier-test.js",
            +		"test:languages": "mocha tests/run.js",
            +		"test:patterns": "mocha tests/pattern-tests.js",
            +		"test:plugins": "mocha tests/plugins/**/*.js",
            +		"test:runner": "mocha tests/testrunner-tests.js",
            +		"test": "npm-run-all test:*"
            +	},
            +	"repository": {
            +		"type": "git",
            +		"url": "https://github.com/PrismJS/prism.git"
            +	},
            +	"keywords": [
            +		"prism",
            +		"highlight"
            +	],
            +	"author": "Lea Verou",
            +	"license": "MIT",
            +	"readmeFilename": "README.md",
            +	"devDependencies": {
            +		"@types/node-fetch": "^2.5.5",
            +		"benchmark": "^2.1.4",
            +		"chai": "^4.2.0",
            +		"danger": "^10.5.0",
            +		"del": "^4.1.1",
            +		"docdash": "^1.2.0",
            +		"eslint": "^7.22.0",
            +		"eslint-plugin-jsdoc": "^32.3.0",
            +		"eslint-plugin-regexp": "^1.2.0",
            +		"gulp": "^4.0.2",
            +		"gulp-concat": "^2.3.4",
            +		"gulp-header": "^2.0.7",
            +		"gulp-jsdoc3": "^3.0.0",
            +		"gulp-rename": "^1.2.0",
            +		"gulp-replace": "^1.0.0",
            +		"gulp-uglify": "^3.0.1",
            +		"gzip-size": "^5.1.1",
            +		"htmlparser2": "^4.0.0",
            +		"http-server": "^0.12.3",
            +		"jsdom": "^13.0.0",
            +		"mocha": "^6.2.0",
            +		"node-fetch": "^2.6.0",
            +		"npm-run-all": "^4.1.5",
            +		"pump": "^3.0.0",
            +		"refa": "^0.9.1",
            +		"regexp-ast-analysis": "^0.2.4",
            +		"regexpp": "^3.2.0",
            +		"scslre": "^0.1.6",
            +		"simple-git": "^1.107.0",
            +		"webfont": "^9.0.0",
            +		"yargs": "^13.2.2"
            +	},
            +	"jspm": {
            +		"main": "prism",
            +		"registry": "jspm",
            +		"jspmPackage": true,
            +		"format": "global",
            +		"files": [
            +			"components/**/*.js",
            +			"plugins/**/*",
            +			"themes/*.css",
            +			"prism.js"
            +		]
            +	}
             }
            
            From a80a68ba507dae20f007a0817d9812f8eebcc5ce Mon Sep 17 00:00:00 2001
            From: Michael Schmidt 
            Date: Sat, 2 Oct 2021 01:29:28 +0200
            Subject: [PATCH 0918/1100] Core: Fixed type error on null (#3057)
            
            ---
             components/prism-core.js     |  2 +-
             components/prism-core.min.js |  2 +-
             docs/prism-core.js.html      |  2 +-
             prism.js                     |  2 +-
             tests/core/greedy.js         | 14 ++++++++++++++
             5 files changed, 18 insertions(+), 4 deletions(-)
            
            diff --git a/components/prism-core.js b/components/prism-core.js
            index 65145e1431..bb68e597df 100644
            --- a/components/prism-core.js
            +++ b/components/prism-core.js
            @@ -947,7 +947,7 @@ var Prism = (function (_self) {
             
             					if (greedy) {
             						match = matchPattern(pattern, pos, text, lookbehind);
            -						if (!match) {
            +						if (!match || match.index >= text.length) {
             							break;
             						}
             
            diff --git a/components/prism-core.min.js b/components/prism-core.min.js
            index 4ff2c0fc71..13c0f35928 100644
            --- a/components/prism-core.min.js
            +++ b/components/prism-core.min.js
            @@ -1 +1 @@
            -var _self="undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{},Prism=function(u){var c=/\blang(?:uage)?-([\w-]+)\b/i,n=0,e={},M={manual:u.Prism&&u.Prism.manual,disableWorkerMessageHandler:u.Prism&&u.Prism.disableWorkerMessageHandler,util:{encode:function e(n){return n instanceof W?new W(n.type,e(n.content),n.alias):Array.isArray(n)?n.map(e):n.replace(/&/g,"&").replace(/=l.reach);y+=m.value.length,m=m.next){var b=m.value;if(t.length>n.length)return;if(!(b instanceof W)){var k,x=1;if(h){if(!(k=z(v,y,n,f)))break;var w=k.index,A=k.index+k[0].length,P=y;for(P+=m.value.length;P<=w;)m=m.next,P+=m.value.length;if(P-=m.value.length,y=P,m.value instanceof W)continue;for(var E=m;E!==t.tail&&(Pl.reach&&(l.reach=N);var j=m.prev;O&&(j=I(t,j,O),y+=O.length),q(t,j,x);var C=new W(o,g?M.tokenize(S,g):S,d,S);if(m=I(t,j,C),L&&I(t,m,L),1l.reach&&(l.reach=_.reach)}}}}}}(e,a,n,a.head,0),function(e){var n=[],t=e.head.next;for(;t!==e.tail;)n.push(t.value),t=t.next;return n}(a)},hooks:{all:{},add:function(e,n){var t=M.hooks.all;t[e]=t[e]||[],t[e].push(n)},run:function(e,n){var t=M.hooks.all[e];if(t&&t.length)for(var r,a=0;r=t[a++];)r(n)}},Token:W};function W(e,n,t,r){this.type=e,this.content=n,this.alias=t,this.length=0|(r||"").length}function z(e,n,t,r){e.lastIndex=n;var a=e.exec(t);if(a&&r&&a[1]){var i=a[1].length;a.index+=i,a[0]=a[0].slice(i)}return a}function i(){var e={value:null,prev:null,next:null},n={value:null,prev:e,next:null};e.next=n,this.head=e,this.tail=n,this.length=0}function I(e,n,t){var r=n.next,a={value:t,prev:n,next:r};return n.next=a,r.prev=a,e.length++,a}function q(e,n,t){for(var r=n.next,a=0;a"+a.content+""},!u.document)return u.addEventListener&&(M.disableWorkerMessageHandler||u.addEventListener("message",function(e){var n=JSON.parse(e.data),t=n.language,r=n.code,a=n.immediateClose;u.postMessage(M.highlight(r,M.languages[t],t)),a&&u.close()},!1)),M;var t=M.util.currentScript();function r(){M.manual||M.highlightAll()}if(t&&(M.filename=t.src,t.hasAttribute("data-manual")&&(M.manual=!0)),!M.manual){var a=document.readyState;"loading"===a||"interactive"===a&&t&&t.defer?document.addEventListener("DOMContentLoaded",r):window.requestAnimationFrame?window.requestAnimationFrame(r):window.setTimeout(r,16)}return M}(_self);"undefined"!=typeof module&&module.exports&&(module.exports=Prism),"undefined"!=typeof global&&(global.Prism=Prism);
            \ No newline at end of file
            +var _self="undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{},Prism=function(u){var c=/\blang(?:uage)?-([\w-]+)\b/i,n=0,e={},M={manual:u.Prism&&u.Prism.manual,disableWorkerMessageHandler:u.Prism&&u.Prism.disableWorkerMessageHandler,util:{encode:function e(n){return n instanceof W?new W(n.type,e(n.content),n.alias):Array.isArray(n)?n.map(e):n.replace(/&/g,"&").replace(/=l.reach);y+=m.value.length,m=m.next){var b=m.value;if(t.length>n.length)return;if(!(b instanceof W)){var k,x=1;if(h){if(!(k=z(v,y,n,f))||k.index>=n.length)break;var w=k.index,A=k.index+k[0].length,P=y;for(P+=m.value.length;P<=w;)m=m.next,P+=m.value.length;if(P-=m.value.length,y=P,m.value instanceof W)continue;for(var E=m;E!==t.tail&&(Pl.reach&&(l.reach=N);var j=m.prev;O&&(j=I(t,j,O),y+=O.length),q(t,j,x);var C=new W(o,g?M.tokenize(S,g):S,d,S);if(m=I(t,j,C),L&&I(t,m,L),1l.reach&&(l.reach=_.reach)}}}}}}(e,a,n,a.head,0),function(e){var n=[],t=e.head.next;for(;t!==e.tail;)n.push(t.value),t=t.next;return n}(a)},hooks:{all:{},add:function(e,n){var t=M.hooks.all;t[e]=t[e]||[],t[e].push(n)},run:function(e,n){var t=M.hooks.all[e];if(t&&t.length)for(var r,a=0;r=t[a++];)r(n)}},Token:W};function W(e,n,t,r){this.type=e,this.content=n,this.alias=t,this.length=0|(r||"").length}function z(e,n,t,r){e.lastIndex=n;var a=e.exec(t);if(a&&r&&a[1]){var i=a[1].length;a.index+=i,a[0]=a[0].slice(i)}return a}function i(){var e={value:null,prev:null,next:null},n={value:null,prev:e,next:null};e.next=n,this.head=e,this.tail=n,this.length=0}function I(e,n,t){var r=n.next,a={value:t,prev:n,next:r};return n.next=a,r.prev=a,e.length++,a}function q(e,n,t){for(var r=n.next,a=0;a"+a.content+""},!u.document)return u.addEventListener&&(M.disableWorkerMessageHandler||u.addEventListener("message",function(e){var n=JSON.parse(e.data),t=n.language,r=n.code,a=n.immediateClose;u.postMessage(M.highlight(r,M.languages[t],t)),a&&u.close()},!1)),M;var t=M.util.currentScript();function r(){M.manual||M.highlightAll()}if(t&&(M.filename=t.src,t.hasAttribute("data-manual")&&(M.manual=!0)),!M.manual){var a=document.readyState;"loading"===a||"interactive"===a&&t&&t.defer?document.addEventListener("DOMContentLoaded",r):window.requestAnimationFrame?window.requestAnimationFrame(r):window.setTimeout(r,16)}return M}(_self);"undefined"!=typeof module&&module.exports&&(module.exports=Prism),"undefined"!=typeof global&&(global.Prism=Prism);
            \ No newline at end of file
            diff --git a/docs/prism-core.js.html b/docs/prism-core.js.html
            index 1eef1d09ad..ab8a02214e 100644
            --- a/docs/prism-core.js.html
            +++ b/docs/prism-core.js.html
            @@ -1000,7 +1000,7 @@ 

            prism-core.js

            if (greedy) { match = matchPattern(pattern, pos, text, lookbehind); - if (!match) { + if (!match || match.index >= text.length) { break; } diff --git a/prism.js b/prism.js index eee1da8348..2d790243a0 100644 --- a/prism.js +++ b/prism.js @@ -952,7 +952,7 @@ var Prism = (function (_self) { if (greedy) { match = matchPattern(pattern, pos, text, lookbehind); - if (!match) { + if (!match || match.index >= text.length) { break; } diff --git a/tests/core/greedy.js b/tests/core/greedy.js index 4794bea5d2..8d2b81b80e 100644 --- a/tests/core/greedy.js +++ b/tests/core/greedy.js @@ -105,4 +105,18 @@ describe('Greedy matching', function () { }); }); + it('issue3052', function () { + // If a greedy pattern creates an empty token at the end of the string, then this token should be discarded + testTokens({ + grammar: { + 'oh-no': { + pattern: /$/, + greedy: true + } + }, + code: 'foo', + expected: ['foo'] + }); + }); + }); From d908e45781c6c09e51c29a8fc04e3a22b987826d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=A3=E9=87=8C=E5=A5=BD=E8=84=8F=E4=B8=8D=E5=8F=AF?= =?UTF-8?q?=E4=BB=A5?= <453491931@qq.com> Date: Sun, 3 Oct 2021 22:39:07 +0800 Subject: [PATCH 0919/1100] New Language: Keepalived configure file (#2417) Co-authored-by: RunDevelopment --- components.js | 2 +- components.json | 4 + components/prism-keepalived.js | 51 ++ components/prism-keepalived.min.js | 1 + examples/prism-keepalived.html | 130 ++++ examples/prism-nginx.html | 3 +- plugins/show-language/prism-show-language.js | 1 + .../show-language/prism-show-language.min.js | 2 +- .../languages/keepalived/boolean_feature.test | 23 + .../languages/keepalived/comment_feature.test | 13 + .../conditional-configuration_feature.test | 37 ++ .../keepalived/constant_feature.test | 127 ++++ tests/languages/keepalived/ip_feature.test | 25 + tests/languages/keepalived/path_feature.test | 27 + .../keepalived/property_feature.test | 625 ++++++++++++++++++ .../languages/keepalived/string_feature.test | 34 + .../keepalived/variable_feature.test | 23 + 17 files changed, 1125 insertions(+), 3 deletions(-) create mode 100644 components/prism-keepalived.js create mode 100644 components/prism-keepalived.min.js create mode 100644 examples/prism-keepalived.html create mode 100644 tests/languages/keepalived/boolean_feature.test create mode 100644 tests/languages/keepalived/comment_feature.test create mode 100644 tests/languages/keepalived/conditional-configuration_feature.test create mode 100644 tests/languages/keepalived/constant_feature.test create mode 100644 tests/languages/keepalived/ip_feature.test create mode 100644 tests/languages/keepalived/path_feature.test create mode 100644 tests/languages/keepalived/property_feature.test create mode 100644 tests/languages/keepalived/string_feature.test create mode 100644 tests/languages/keepalived/variable_feature.test diff --git a/components.js b/components.js index d6c3ff9bb1..41d90e7ed3 100644 --- a/components.js +++ b/components.js @@ -1,2 +1,2 @@ -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml","ssml","atom","rss"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","ssml":"SSML","atom":"Atom","rss":"RSS"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","optional":"regex","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"ABNF","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"agda":{"title":"Agda","owner":"xy-ren"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apex":{"title":"Apex","require":["clike","sql"],"owner":"RunDevelopment"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"dkern"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"avisynth":{"title":"AviSynth","alias":"avs","owner":"Zinfidel"},"avro-idl":{"title":"Avro IDL","alias":"avdl","owner":"RunDevelopment"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"bicep":{"title":"Bicep","owner":"johnnyreilly"},"birb":{"title":"Birb","require":"clike","owner":"Calamity210"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"BNF","alias":"rbnf","aliasTitles":{"rbnf":"RBNF"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"bsl":{"title":"BSL (1C:Enterprise)","alias":"oscript","aliasTitles":{"oscript":"OneScript"},"owner":"Diversus23"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cfscript":{"title":"CFScript","require":"clike","alias":"cfc","owner":"mjclemente"},"chaiscript":{"title":"ChaiScript","require":["clike","cpp"],"owner":"RunDevelopment"},"cil":{"title":"CIL","owner":"sbrl"},"clojure":{"title":"Clojure","owner":"troglotit"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"cobol":{"title":"COBOL","owner":"RunDevelopment"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"coq":{"title":"Coq","owner":"RunDevelopment"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"csv":{"title":"CSV","owner":"RunDevelopment"},"cypher":{"title":"Cypher","owner":"RunDevelopment"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dataweave":{"title":"DataWeave","owner":"machaval"},"dax":{"title":"DAX","owner":"peterbud"},"dhall":{"title":"Dhall","owner":"RunDevelopment"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"dot":{"title":"DOT (Graphviz)","alias":"gv","optional":"markup","owner":"RunDevelopment"},"ebnf":{"title":"EBNF","owner":"RunDevelopment"},"editorconfig":{"title":"EditorConfig","owner":"osipxd"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"false":{"title":"False","owner":"edukisto"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"gap":{"title":"GAP (CAS)","owner":"RunDevelopment"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"c","owner":"Golmote"},"gn":{"title":"GN","alias":"gni","owner":"RunDevelopment"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","optional":"markdown","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","alias":"hbs","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"hlsl":{"title":"HLSL","require":"c","owner":"RunDevelopment"},"hoon":{"title":"Hoon","owner":"matildepark"},"http":{"title":"HTTP","optional":["css","javascript","json","markup","uri"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"icu-message-format":{"title":"ICU Message Format","owner":"RunDevelopment"},"idris":{"title":"Idris","alias":"idr","owner":"KeenS","require":"haskell"},"ignore":{"title":".ignore","owner":"osipxd","alias":["gitignore","hgignore","npmignore"],"aliasTitles":{"gitignore":".gitignore","hgignore":".hgignore","npmignore":".npmignore"}},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jexl":{"title":"Jexl","owner":"czosel"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike","typescript"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","alias":"webmanifest","aliasTitles":{"webmanifest":"Web App Manifest"},"owner":"CupOfTea696"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"jsstacktrace":{"title":"JS stack trace","owner":"sbrl"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup","sql"],"owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","alias":["kt","kts"],"aliasTitles":{"kts":"Kotlin Script"},"require":"clike","owner":"Golmote"},"kumir":{"title":"KuMir (КуМир)","alias":"kum","owner":"edukisto"},"kusto":{"title":"Kusto","owner":"RunDevelopment"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","require":"markup-templating","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"log":{"title":"Log file","optional":"javastacktrace","owner":"RunDevelopment"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"magma":{"title":"Magma (CAS)","owner":"RunDevelopment"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","optional":"yaml","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"maxscript":{"title":"MAXScript","owner":"RunDevelopment"},"mel":{"title":"MEL","owner":"Golmote"},"mermaid":{"title":"Mermaid","owner":"RunDevelopment"},"mizar":{"title":"Mizar","owner":"Golmote"},"mongodb":{"title":"MongoDB","owner":"airs0urce","require":"javascript"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"naniscript":{"title":"Naninovel Script","owner":"Elringus","alias":"nani"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nevod":{"title":"Nevod","owner":"nezaboodka"},"nginx":{"title":"nginx","owner":"volado"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"openqasm":{"title":"OpenQasm","alias":"qasm","owner":"RunDevelopment"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"psl":{"title":"PATROL Scripting Language","owner":"bertysentry"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":"markup-templating","owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"promql":{"title":"PromQL","owner":"arendjr"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"purebasic":{"title":"PureBasic","require":"clike","alias":"pbfasm","owner":"HeX0R101"},"purescript":{"title":"PureScript","require":"haskell","alias":"purs","owner":"sriharshachilakapati"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"qsharp":{"title":"Q#","require":"clike","alias":"qs","owner":"fedonman"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"racket":{"title":"Racket","require":"scheme","alias":"rkt","owner":"RunDevelopment"},"cshtml":{"title":"Razor C#","alias":"razor","require":["markup","csharp"],"optional":["css","css-extras","javascript","js-extras"],"owner":"RunDevelopment"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","owner":"RunDevelopment"},"rego":{"title":"Rego","owner":"JordanSh"},"renpy":{"title":"Ren'py","alias":"rpy","owner":"HyuchiaDiego"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","optional":"css-extras","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","alias":["sh-session","shellsession"],"owner":"RunDevelopment"},"smali":{"title":"Smali","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sml":{"title":"SML","alias":"smlnj","aliasTitles":{"smlnj":"SML/NJ"},"owner":"RunDevelopment"},"solidity":{"title":"Solidity (Ethereum)","alias":"sol","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"squirrel":{"title":"Squirrel","require":"clike","owner":"RunDevelopment"},"stan":{"title":"Stan","owner":"RunDevelopment"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","owner":"chrischares"},"systemd":{"title":"Systemd configuration file","owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","vbnet"],"owner":"RunDevelopment"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tremor":{"title":"Tremor","alias":["trickle","troy"],"owner":"darach","aliasTitles":{"trickle":"trickle","troy":"troy"}},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"typoscript":{"title":"TypoScript","alias":"tsconfig","aliasTitles":{"tsconfig":"TSConfig"},"owner":"dkern"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"uri":{"title":"URI","alias":"url","aliasTitles":{"url":"URL"},"owner":"RunDevelopment"},"v":{"title":"V","require":"clike","owner":"taggon"},"vala":{"title":"Vala","require":"clike","optional":"regex","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":["vb","vba"],"aliasTitles":{"vba":"VBA"},"owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"wolfram":{"title":"Wolfram language","alias":["mathematica","nb","wl"],"aliasTitles":{"mathematica":"Mathematica","nb":"Mathematica Notebook"},"owner":"msollami"},"wren":{"title":"Wren","owner":"clsource"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xml-doc":{"title":"XML doc (.net)","require":"markup","modify":["csharp","fsharp","vbnet"],"owner":"RunDevelopment"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"yang":{"title":"YANG","owner":"RunDevelopment"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword for fine-grained highlighting.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml","ssml","atom","rss"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","ssml":"SSML","atom":"Atom","rss":"RSS"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","optional":"regex","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"ABNF","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"agda":{"title":"Agda","owner":"xy-ren"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apex":{"title":"Apex","require":["clike","sql"],"owner":"RunDevelopment"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"dkern"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"avisynth":{"title":"AviSynth","alias":"avs","owner":"Zinfidel"},"avro-idl":{"title":"Avro IDL","alias":"avdl","owner":"RunDevelopment"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"bicep":{"title":"Bicep","owner":"johnnyreilly"},"birb":{"title":"Birb","require":"clike","owner":"Calamity210"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"BNF","alias":"rbnf","aliasTitles":{"rbnf":"RBNF"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"bsl":{"title":"BSL (1C:Enterprise)","alias":"oscript","aliasTitles":{"oscript":"OneScript"},"owner":"Diversus23"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cfscript":{"title":"CFScript","require":"clike","alias":"cfc","owner":"mjclemente"},"chaiscript":{"title":"ChaiScript","require":["clike","cpp"],"owner":"RunDevelopment"},"cil":{"title":"CIL","owner":"sbrl"},"clojure":{"title":"Clojure","owner":"troglotit"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"cobol":{"title":"COBOL","owner":"RunDevelopment"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"coq":{"title":"Coq","owner":"RunDevelopment"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"csv":{"title":"CSV","owner":"RunDevelopment"},"cypher":{"title":"Cypher","owner":"RunDevelopment"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dataweave":{"title":"DataWeave","owner":"machaval"},"dax":{"title":"DAX","owner":"peterbud"},"dhall":{"title":"Dhall","owner":"RunDevelopment"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"dot":{"title":"DOT (Graphviz)","alias":"gv","optional":"markup","owner":"RunDevelopment"},"ebnf":{"title":"EBNF","owner":"RunDevelopment"},"editorconfig":{"title":"EditorConfig","owner":"osipxd"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"false":{"title":"False","owner":"edukisto"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"gap":{"title":"GAP (CAS)","owner":"RunDevelopment"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"c","owner":"Golmote"},"gn":{"title":"GN","alias":"gni","owner":"RunDevelopment"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","optional":"markdown","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","alias":"hbs","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"hlsl":{"title":"HLSL","require":"c","owner":"RunDevelopment"},"hoon":{"title":"Hoon","owner":"matildepark"},"http":{"title":"HTTP","optional":["css","javascript","json","markup","uri"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"icu-message-format":{"title":"ICU Message Format","owner":"RunDevelopment"},"idris":{"title":"Idris","alias":"idr","owner":"KeenS","require":"haskell"},"ignore":{"title":".ignore","owner":"osipxd","alias":["gitignore","hgignore","npmignore"],"aliasTitles":{"gitignore":".gitignore","hgignore":".hgignore","npmignore":".npmignore"}},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jexl":{"title":"Jexl","owner":"czosel"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike","typescript"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","alias":"webmanifest","aliasTitles":{"webmanifest":"Web App Manifest"},"owner":"CupOfTea696"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"jsstacktrace":{"title":"JS stack trace","owner":"sbrl"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup","sql"],"owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keepalived":{"title":"Keepalived Configure","owner":"dev-itsheng"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","alias":["kt","kts"],"aliasTitles":{"kts":"Kotlin Script"},"require":"clike","owner":"Golmote"},"kumir":{"title":"KuMir (КуМир)","alias":"kum","owner":"edukisto"},"kusto":{"title":"Kusto","owner":"RunDevelopment"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","require":"markup-templating","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"log":{"title":"Log file","optional":"javastacktrace","owner":"RunDevelopment"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"magma":{"title":"Magma (CAS)","owner":"RunDevelopment"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","optional":"yaml","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"maxscript":{"title":"MAXScript","owner":"RunDevelopment"},"mel":{"title":"MEL","owner":"Golmote"},"mermaid":{"title":"Mermaid","owner":"RunDevelopment"},"mizar":{"title":"Mizar","owner":"Golmote"},"mongodb":{"title":"MongoDB","owner":"airs0urce","require":"javascript"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"naniscript":{"title":"Naninovel Script","owner":"Elringus","alias":"nani"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nevod":{"title":"Nevod","owner":"nezaboodka"},"nginx":{"title":"nginx","owner":"volado"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"openqasm":{"title":"OpenQasm","alias":"qasm","owner":"RunDevelopment"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"psl":{"title":"PATROL Scripting Language","owner":"bertysentry"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":"markup-templating","owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"promql":{"title":"PromQL","owner":"arendjr"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"purebasic":{"title":"PureBasic","require":"clike","alias":"pbfasm","owner":"HeX0R101"},"purescript":{"title":"PureScript","require":"haskell","alias":"purs","owner":"sriharshachilakapati"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"qsharp":{"title":"Q#","require":"clike","alias":"qs","owner":"fedonman"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"racket":{"title":"Racket","require":"scheme","alias":"rkt","owner":"RunDevelopment"},"cshtml":{"title":"Razor C#","alias":"razor","require":["markup","csharp"],"optional":["css","css-extras","javascript","js-extras"],"owner":"RunDevelopment"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","owner":"RunDevelopment"},"rego":{"title":"Rego","owner":"JordanSh"},"renpy":{"title":"Ren'py","alias":"rpy","owner":"HyuchiaDiego"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","optional":"css-extras","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","alias":["sh-session","shellsession"],"owner":"RunDevelopment"},"smali":{"title":"Smali","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sml":{"title":"SML","alias":"smlnj","aliasTitles":{"smlnj":"SML/NJ"},"owner":"RunDevelopment"},"solidity":{"title":"Solidity (Ethereum)","alias":"sol","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"squirrel":{"title":"Squirrel","require":"clike","owner":"RunDevelopment"},"stan":{"title":"Stan","owner":"RunDevelopment"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","owner":"chrischares"},"systemd":{"title":"Systemd configuration file","owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","vbnet"],"owner":"RunDevelopment"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tremor":{"title":"Tremor","alias":["trickle","troy"],"owner":"darach","aliasTitles":{"trickle":"trickle","troy":"troy"}},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"typoscript":{"title":"TypoScript","alias":"tsconfig","aliasTitles":{"tsconfig":"TSConfig"},"owner":"dkern"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"uri":{"title":"URI","alias":"url","aliasTitles":{"url":"URL"},"owner":"RunDevelopment"},"v":{"title":"V","require":"clike","owner":"taggon"},"vala":{"title":"Vala","require":"clike","optional":"regex","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":["vb","vba"],"aliasTitles":{"vba":"VBA"},"owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"wolfram":{"title":"Wolfram language","alias":["mathematica","nb","wl"],"aliasTitles":{"mathematica":"Mathematica","nb":"Mathematica Notebook"},"owner":"msollami"},"wren":{"title":"Wren","owner":"clsource"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xml-doc":{"title":"XML doc (.net)","require":"markup","modify":["csharp","fsharp","vbnet"],"owner":"RunDevelopment"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"yang":{"title":"YANG","owner":"RunDevelopment"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword for fine-grained highlighting.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; if (typeof module !== 'undefined' && module.exports) { module.exports = components; } \ No newline at end of file diff --git a/components.json b/components.json index 1dac8a807d..906491e4a7 100644 --- a/components.json +++ b/components.json @@ -713,6 +713,10 @@ "title": "Julia", "owner": "cdagnino" }, + "keepalived": { + "title": "Keepalived Configure", + "owner": "dev-itsheng" + }, "keyman": { "title": "Keyman", "owner": "mcdurdin" diff --git a/components/prism-keepalived.js b/components/prism-keepalived.js new file mode 100644 index 0000000000..70a99944ba --- /dev/null +++ b/components/prism-keepalived.js @@ -0,0 +1,51 @@ +Prism.languages.keepalived = { + 'comment': { + pattern: /[#!].*/, + greedy: true + }, + 'string': { + pattern: /(^|[^\\])(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/, + lookbehind: true, + greedy: true + }, + + // support IPv4, IPv6, subnet mask + 'ip': { + pattern: RegExp( + /\b(?:(?:(?:[\da-f]{1,4}:){7}[\da-f]{1,4}|(?:[\da-f]{1,4}:){6}:[\da-f]{1,4}|(?:[\da-f]{1,4}:){5}:(?:[\da-f]{1,4}:)?[\da-f]{1,4}|(?:[\da-f]{1,4}:){4}:(?:[\da-f]{1,4}:){0,2}[\da-f]{1,4}|(?:[\da-f]{1,4}:){3}:(?:[\da-f]{1,4}:){0,3}[\da-f]{1,4}|(?:[\da-f]{1,4}:){2}:(?:[\da-f]{1,4}:){0,4}[\da-f]{1,4}|(?:[\da-f]{1,4}:){6}|(?:[\da-f]{1,4}:){0,5}:|::(?:[\da-f]{1,4}:){0,5}|[\da-f]{1,4}::(?:[\da-f]{1,4}:){0,5}[\da-f]{1,4}|::(?:[\da-f]{1,4}:){0,6}[\da-f]{1,4}|(?:[\da-f]{1,4}:){1,7}:)(?:\/\d{1,3})?|(?:\/\d{1,2})?)\b/.source + .replace(//g, function () { return /(?:(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d))/.source; }), + 'i' + ), + alias: 'number' + }, + + // support *nix / Windows, directory / file + 'path': { + pattern: /(\s)\/(?:[^\/\s]+\/)*[^\/\s]*|\b[a-zA-Z]:\\(?:[^\\\s]+\\)*[^\\\s]*/, + lookbehind: true, + alias: 'string', + }, + 'variable': /\$\{?\w+\}?/, + 'email': { + pattern: /[\w-]+@[\w-]+(?:\.[\w-]{2,3}){1,2}/, + alias: 'string', + }, + 'conditional-configuration': { + pattern: /@\^?[\w-]+/, + alias: 'variable' + }, + 'operator': /=/, + + 'property': /\b(?:BFD_CHECK|DNS_CHECK|FILE_CHECK|HTTP_GET|MISC_CHECK|NAME|PING_CHECK|SCRIPTS|SMTP_CHECK|SSL|SSL_GET|TCP_CHECK|UDP_CHECK|accept|advert_int|alpha|auth_pass|auth_type|authentication|bfd_cpu_affinity|bfd_instance|bfd_no_swap|bfd_priority|bfd_process_name|bfd_rlimit_rttime|bfd_rt_priority|bind_if|bind_port|bindto|ca|certificate|check_unicast_src|checker|checker_cpu_affinity|checker_log_all_failures|checker_no_swap|checker_priority|checker_rlimit_rttime|checker_rt_priority|child_wait_time|connect_ip|connect_port|connect_timeout|dbus_service_name|debug|default_interface|delay|delay_before_retry|delay_loop|digest|dont_track_primary|dynamic|dynamic_interfaces|enable_(?:dbus|script_security|sni|snmp_checker|snmp_rfc|snmp_rfcv2|snmp_rfcv3|snmp_vrrp|traps)|end|fall|fast_recovery|file|flag-[123]|fork_delay|full_command|fwmark|garp_group|garp_interval|garp_lower_prio_delay|garp_lower_prio_repeat|garp_master_delay|garp_master_refresh|garp_master_refresh_repeat|garp_master_repeat|global_defs|global_tracking|gna_interval|group|ha_suspend|hashed|helo_name|higher_prio_send_advert|hoplimit|http_protocol|hysteresis|idle_tx|include|inhibit_on_failure|init_fail|init_file|instance|interface|interfaces|interval|ip_family|ipvs_process_name|keepalived.conf|kernel_rx_buf_size|key|linkbeat_interfaces|linkbeat_use_polling|log_all_failures|log_unknown_vrids|lower_prio_no_advert|lthreshold|lvs_flush|lvs_flush_onstop|lvs_method|lvs_netlink_cmd_rcv_bufs|lvs_netlink_cmd_rcv_bufs_force|lvs_netlink_monitor_rcv_bufs|lvs_netlink_monitor_rcv_bufs_force|lvs_notify_fifo|lvs_notify_fifo_script|lvs_sched|lvs_sync_daemon|max_auto_priority|max_hops|mcast_src_ip|mh-fallback|mh-port|min_auto_priority_delay|min_rx|min_tx|misc_dynamic|misc_path|misc_timeout|multiplier|name|namespace_with_ipsets|native_ipv6|neighbor_ip|net_namespace|net_namespace_ipvs|nftables|nftables_counters|nftables_ifindex|nftables_priority|no_accept|no_checker_emails|no_email_faults|nopreempt|notification_email|notification_email_from|notify|notify_backup|notify_deleted|notify_down|notify_fault|notify_fifo|notify_fifo_script|notify_master|notify_master_rx_lower_pri|notify_priority_changes|notify_stop|notify_up|old_unicast_checksum|omega|ops|param_match|passive|password|path|persistence_engine|persistence_granularity|persistence_timeout|preempt|preempt_delay|priority|process|process_monitor_rcv_bufs|process_monitor_rcv_bufs_force|process_name|process_names|promote_secondaries|protocol|proxy_arp|proxy_arp_pvlan|quorum|quorum_down|quorum_max|quorum_up|random_seed|real_server|regex|regex_max_offset|regex_min_offset|regex_no_match|regex_options|regex_stack|reload_repeat|reload_time_file|require_reply|retry|rise|router_id|rs_init_notifies|script|script_user|sh-fallback|sh-port|shutdown_script|shutdown_script_timeout|skip_check_adv_addr|smtp_alert|smtp_alert_checker|smtp_alert_vrrp|smtp_connect_timeout|smtp_helo_name|smtp_server|snmp_socket|sorry_server|sorry_server_inhibit|sorry_server_lvs_method|source_ip|start|startup_script|startup_script_timeout|state|static_ipaddress|static_routes|static_rules|status_code|step|strict_mode|sync_group_tracking_weight|terminate_delay|timeout|track_bfd|track_file|track_group|track_interface|track_process|track_script|track_src_ip|ttl|type|umask|unicast_peer|unicast_src_ip|unicast_ttl|url|use_ipvlan|use_pid_dir|use_vmac|user|uthreshold|val[123]|version|virtual_ipaddress|virtual_ipaddress_excluded|virtual_router_id|virtual_routes|virtual_rules|virtual_server|virtual_server_group|virtualhost|vmac_xmit_base|vrrp|vrrp_(?:check_unicast_src|cpu_affinity|garp_interval|garp_lower_prio_delay|garp_lower_prio_repeat|garp_master_delay|garp_master_refresh|garp_master_refresh_repeat|garp_master_repeat|gna_interval|higher_prio_send_advert|instance|ipsets|iptables|lower_prio_no_advert|mcast_group4|mcast_group6|min_garp|netlink_cmd_rcv_bufs|netlink_cmd_rcv_bufs_force|netlink_monitor_rcv_bufs|netlink_monitor_rcv_bufs_force|no_swap|notify_fifo|notify_fifo_script|notify_priority_changes|priority|process_name|rlimit_rttime|rt_priority|rx_bufs_multiplier|rx_bufs_policy|script|skip_check_adv_addr|startup_delay|strict|sync_group|track_process|version)|warmup|weight)\b/, + + 'constant': /\b(?:A|AAAA|AH|BACKUP|CNAME|DR|MASTER|MX|NAT|NS|PASS|SCTP|SOA|TCP|TUN|TXT|UDP|dh|fo|lblc|lblcr|lc|mh|nq|ovf|rr|sed|sh|wlc|wrr)\b/, + + 'number': { + pattern: /(^|[^\w.-])-?\d+(?:\.\d+)?/, + lookbehind: true + }, + + 'boolean': /\b(?:false|no|off|on|true|yes)\b/, + + 'punctuation': /[\{\}]/ +}; diff --git a/components/prism-keepalived.min.js b/components/prism-keepalived.min.js new file mode 100644 index 0000000000..e5eb79b5f3 --- /dev/null +++ b/components/prism-keepalived.min.js @@ -0,0 +1 @@ +Prism.languages.keepalived={comment:{pattern:/[#!].*/,greedy:!0},string:{pattern:/(^|[^\\])(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/,lookbehind:!0,greedy:!0},ip:{pattern:RegExp("\\b(?:(?:(?:[\\da-f]{1,4}:){7}[\\da-f]{1,4}|(?:[\\da-f]{1,4}:){6}:[\\da-f]{1,4}|(?:[\\da-f]{1,4}:){5}:(?:[\\da-f]{1,4}:)?[\\da-f]{1,4}|(?:[\\da-f]{1,4}:){4}:(?:[\\da-f]{1,4}:){0,2}[\\da-f]{1,4}|(?:[\\da-f]{1,4}:){3}:(?:[\\da-f]{1,4}:){0,3}[\\da-f]{1,4}|(?:[\\da-f]{1,4}:){2}:(?:[\\da-f]{1,4}:){0,4}[\\da-f]{1,4}|(?:[\\da-f]{1,4}:){6}|(?:[\\da-f]{1,4}:){0,5}:|::(?:[\\da-f]{1,4}:){0,5}|[\\da-f]{1,4}::(?:[\\da-f]{1,4}:){0,5}[\\da-f]{1,4}|::(?:[\\da-f]{1,4}:){0,6}[\\da-f]{1,4}|(?:[\\da-f]{1,4}:){1,7}:)(?:/\\d{1,3})?|(?:/\\d{1,2})?)\\b".replace(//g,function(){return"(?:(?:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)\\.){3}(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d))"}),"i"),alias:"number"},path:{pattern:/(\s)\/(?:[^\/\s]+\/)*[^\/\s]*|\b[a-zA-Z]:\\(?:[^\\\s]+\\)*[^\\\s]*/,lookbehind:!0,alias:"string"},variable:/\$\{?\w+\}?/,email:{pattern:/[\w-]+@[\w-]+(?:\.[\w-]{2,3}){1,2}/,alias:"string"},"conditional-configuration":{pattern:/@\^?[\w-]+/,alias:"variable"},operator:/=/,property:/\b(?:BFD_CHECK|DNS_CHECK|FILE_CHECK|HTTP_GET|MISC_CHECK|NAME|PING_CHECK|SCRIPTS|SMTP_CHECK|SSL|SSL_GET|TCP_CHECK|UDP_CHECK|accept|advert_int|alpha|auth_pass|auth_type|authentication|bfd_cpu_affinity|bfd_instance|bfd_no_swap|bfd_priority|bfd_process_name|bfd_rlimit_rttime|bfd_rt_priority|bind_if|bind_port|bindto|ca|certificate|check_unicast_src|checker|checker_cpu_affinity|checker_log_all_failures|checker_no_swap|checker_priority|checker_rlimit_rttime|checker_rt_priority|child_wait_time|connect_ip|connect_port|connect_timeout|dbus_service_name|debug|default_interface|delay|delay_before_retry|delay_loop|digest|dont_track_primary|dynamic|dynamic_interfaces|enable_(?:dbus|script_security|sni|snmp_checker|snmp_rfc|snmp_rfcv2|snmp_rfcv3|snmp_vrrp|traps)|end|fall|fast_recovery|file|flag-[123]|fork_delay|full_command|fwmark|garp_group|garp_interval|garp_lower_prio_delay|garp_lower_prio_repeat|garp_master_delay|garp_master_refresh|garp_master_refresh_repeat|garp_master_repeat|global_defs|global_tracking|gna_interval|group|ha_suspend|hashed|helo_name|higher_prio_send_advert|hoplimit|http_protocol|hysteresis|idle_tx|include|inhibit_on_failure|init_fail|init_file|instance|interface|interfaces|interval|ip_family|ipvs_process_name|keepalived.conf|kernel_rx_buf_size|key|linkbeat_interfaces|linkbeat_use_polling|log_all_failures|log_unknown_vrids|lower_prio_no_advert|lthreshold|lvs_flush|lvs_flush_onstop|lvs_method|lvs_netlink_cmd_rcv_bufs|lvs_netlink_cmd_rcv_bufs_force|lvs_netlink_monitor_rcv_bufs|lvs_netlink_monitor_rcv_bufs_force|lvs_notify_fifo|lvs_notify_fifo_script|lvs_sched|lvs_sync_daemon|max_auto_priority|max_hops|mcast_src_ip|mh-fallback|mh-port|min_auto_priority_delay|min_rx|min_tx|misc_dynamic|misc_path|misc_timeout|multiplier|name|namespace_with_ipsets|native_ipv6|neighbor_ip|net_namespace|net_namespace_ipvs|nftables|nftables_counters|nftables_ifindex|nftables_priority|no_accept|no_checker_emails|no_email_faults|nopreempt|notification_email|notification_email_from|notify|notify_backup|notify_deleted|notify_down|notify_fault|notify_fifo|notify_fifo_script|notify_master|notify_master_rx_lower_pri|notify_priority_changes|notify_stop|notify_up|old_unicast_checksum|omega|ops|param_match|passive|password|path|persistence_engine|persistence_granularity|persistence_timeout|preempt|preempt_delay|priority|process|process_monitor_rcv_bufs|process_monitor_rcv_bufs_force|process_name|process_names|promote_secondaries|protocol|proxy_arp|proxy_arp_pvlan|quorum|quorum_down|quorum_max|quorum_up|random_seed|real_server|regex|regex_max_offset|regex_min_offset|regex_no_match|regex_options|regex_stack|reload_repeat|reload_time_file|require_reply|retry|rise|router_id|rs_init_notifies|script|script_user|sh-fallback|sh-port|shutdown_script|shutdown_script_timeout|skip_check_adv_addr|smtp_alert|smtp_alert_checker|smtp_alert_vrrp|smtp_connect_timeout|smtp_helo_name|smtp_server|snmp_socket|sorry_server|sorry_server_inhibit|sorry_server_lvs_method|source_ip|start|startup_script|startup_script_timeout|state|static_ipaddress|static_routes|static_rules|status_code|step|strict_mode|sync_group_tracking_weight|terminate_delay|timeout|track_bfd|track_file|track_group|track_interface|track_process|track_script|track_src_ip|ttl|type|umask|unicast_peer|unicast_src_ip|unicast_ttl|url|use_ipvlan|use_pid_dir|use_vmac|user|uthreshold|val[123]|version|virtual_ipaddress|virtual_ipaddress_excluded|virtual_router_id|virtual_routes|virtual_rules|virtual_server|virtual_server_group|virtualhost|vmac_xmit_base|vrrp|vrrp_(?:check_unicast_src|cpu_affinity|garp_interval|garp_lower_prio_delay|garp_lower_prio_repeat|garp_master_delay|garp_master_refresh|garp_master_refresh_repeat|garp_master_repeat|gna_interval|higher_prio_send_advert|instance|ipsets|iptables|lower_prio_no_advert|mcast_group4|mcast_group6|min_garp|netlink_cmd_rcv_bufs|netlink_cmd_rcv_bufs_force|netlink_monitor_rcv_bufs|netlink_monitor_rcv_bufs_force|no_swap|notify_fifo|notify_fifo_script|notify_priority_changes|priority|process_name|rlimit_rttime|rt_priority|rx_bufs_multiplier|rx_bufs_policy|script|skip_check_adv_addr|startup_delay|strict|sync_group|track_process|version)|warmup|weight)\b/,constant:/\b(?:A|AAAA|AH|BACKUP|CNAME|DR|MASTER|MX|NAT|NS|PASS|SCTP|SOA|TCP|TUN|TXT|UDP|dh|fo|lblc|lblcr|lc|mh|nq|ovf|rr|sed|sh|wlc|wrr)\b/,number:{pattern:/(^|[^\w.-])-?\d+(?:\.\d+)?/,lookbehind:!0},boolean:/\b(?:false|no|off|on|true|yes)\b/,punctuation:/[\{\}]/}; \ No newline at end of file diff --git a/examples/prism-keepalived.html b/examples/prism-keepalived.html new file mode 100644 index 0000000000..c8bc961c8f --- /dev/null +++ b/examples/prism-keepalived.html @@ -0,0 +1,130 @@ +

            A example from keepalived document

            +
            
            +# Configuration File for keepalived
            +global_defs {
            +    notification_email {
            +        admin@domain.com
            +        0633225522@domain.com
            +    }
            +    notification_email_from keepalived@domain.com
            +    smtp_server 192.168.200.20
            +    smtp_connect_timeout 30
            +    router_id LVS_MAIN
            +}
            +
            +# VRRP Instances definitions
            +vrrp_instance VI_1 {
            +    state MASTER
            +    interface eth0
            +    virtual_router_id 51
            +    priority 150
            +    advert_int 1
            +    authentication {
            +        auth_type PASS
            +        auth_pass k@l!ve1
            +    }
            +    virtual_ipaddress {
            +        192.168.200.10
            +        192.168.200.11
            +    }
            +}
            +vrrp_instance VI_2 {
            +    state MASTER
            +    interface eth1
            +    virtual_router_id 52
            +    priority 150
            +    advert_int 1
            +    authentication {
            +        auth_type PASS
            +        auth_pass k@l!ve2
            +    }
            +    virtual_ipaddress {
            +        192.168.100.10
            +    }
            +}
            +vrrp_instance VI_3 {
            +    state BACKUP
            +    interface eth0
            +    virtual_router_id 53
            +    priority 100
            +    advert_int 1
            +    authentication {
            +        auth_type PASS
            +        auth_pass k@l!ve3
            +    }
            +    virtual_ipaddress {
            +        192.168.200.12
            +        192.168.200.13
            +    }
            +}
            +vrrp_instance VI_4 {
            +    state BACKUP
            +    interface eth1
            +    virtual_router_id 54
            +    priority 100
            +    advert_int 1
            +    authentication {
            +        auth_type PASS
            +        auth_pass k@l!ve4
            +    }
            +    virtual_ipaddress {
            +        192.168.100.11
            +    }
            +}
            +# Virtual Servers definitions
            +virtual_server 192.168.200.10 80 {
            +    delay_loop 30
            +    lb_algo wrr
            +    lb_kind NAT
            +    persistence_timeout 50
            +    protocol TCP
            +    sorry_server 192.168.100.100 80
            +    real_server 192.168.100.2 80 {
            +        weight 2
            +        HTTP_GET {
            +            url {
            +                path /testurl/test.jsp
            +                digest ec90a42b99ea9a2f5ecbe213ac9eba03
            +            }
            +            url {
            +                path /testurl2/test.jsp
            +                digest 640205b7b0fc66c1ea91c463fac6334c
            +            }
            +            connect_timeout 3
            +            retry 3
            +            delay_before_retry 2
            +        }
            +    }
            +    real_server 192.168.100.3 80 {
            +        weight 1
            +        HTTP_GET {
            +            url {
            +                path /testurl/test.jsp
            +                digest 640205b7b0fc66c1ea91c463fac6334c
            +            }
            +            connect_timeout 3
            +            retry 3
            +            delay_before_retry 2
            +        }
            +    }
            +}
            +virtual_server 192.168.200.12 443 {
            +    delay_loop 20
            +    lb_algo rr
            +    lb_kind NAT
            +    persistence_timeout 360
            +    protocol TCP
            +    real_server 192.168.100.2 443 {
            +        weight 1
            +        TCP_CHECK {
            +            connect_timeout 3
            +        }
            +    }
            +    real_server 192.168.100.3 443 {
            +        weight 1
            +        TCP_CHECK {
            +            connect_timeout 3
            +        }
            +    }
            +}
            +
            \ No newline at end of file diff --git a/examples/prism-nginx.html b/examples/prism-nginx.html index 49d14664d3..b00ffbb2aa 100644 --- a/examples/prism-nginx.html +++ b/examples/prism-nginx.html @@ -22,4 +22,5 @@

            Server Block

            location / { proxy_pass http://127.0.0.1:8080; } -}
            \ No newline at end of file +} +

            \ No newline at end of file diff --git a/plugins/show-language/prism-show-language.js b/plugins/show-language/prism-show-language.js index 883d870099..2899829848 100644 --- a/plugins/show-language/prism-show-language.js +++ b/plugins/show-language/prism-show-language.js @@ -124,6 +124,7 @@ "jsonp": "JSONP", "jsstacktrace": "JS stack trace", "js-templates": "JS Templates", + "keepalived": "Keepalived Configure", "kts": "Kotlin Script", "kt": "Kotlin", "kumir": "KuMir (КуМир)", diff --git a/plugins/show-language/prism-show-language.min.js b/plugins/show-language/prism-show-language.min.js index da13aee0e6..a3a3373cc0 100644 --- a/plugins/show-language/prism-show-language.min.js +++ b/plugins/show-language/prism-show-language.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof Prism&&"undefined"!=typeof document)if(Prism.plugins.toolbar){var i={none:"Plain text",plain:"Plain text",plaintext:"Plain text",text:"Plain text",txt:"Plain text",html:"HTML",xml:"XML",svg:"SVG",mathml:"MathML",ssml:"SSML",rss:"RSS",css:"CSS",clike:"C-like",js:"JavaScript",abap:"ABAP",abnf:"ABNF",al:"AL",antlr4:"ANTLR4",g4:"ANTLR4",apacheconf:"Apache Configuration",apl:"APL",aql:"AQL",arff:"ARFF",asciidoc:"AsciiDoc",adoc:"AsciiDoc",aspnet:"ASP.NET (C#)",asm6502:"6502 Assembly",autohotkey:"AutoHotkey",autoit:"AutoIt",avisynth:"AviSynth",avs:"AviSynth","avro-idl":"Avro IDL",avdl:"Avro IDL",basic:"BASIC",bbcode:"BBcode",bnf:"BNF",rbnf:"RBNF",bsl:"BSL (1C:Enterprise)",oscript:"OneScript",csharp:"C#",cs:"C#",dotnet:"C#",cpp:"C++",cfscript:"CFScript",cfc:"CFScript",cil:"CIL",cmake:"CMake",cobol:"COBOL",coffee:"CoffeeScript",conc:"Concurnas",csp:"Content-Security-Policy","css-extras":"CSS Extras",csv:"CSV",dataweave:"DataWeave",dax:"DAX",django:"Django/Jinja2",jinja2:"Django/Jinja2","dns-zone-file":"DNS zone file","dns-zone":"DNS zone file",dockerfile:"Docker",dot:"DOT (Graphviz)",gv:"DOT (Graphviz)",ebnf:"EBNF",editorconfig:"EditorConfig",ejs:"EJS",etlua:"Embedded Lua templating",erb:"ERB","excel-formula":"Excel Formula",xlsx:"Excel Formula",xls:"Excel Formula",fsharp:"F#","firestore-security-rules":"Firestore security rules",ftl:"FreeMarker Template Language",gml:"GameMaker Language",gamemakerlanguage:"GameMaker Language",gap:"GAP (CAS)",gcode:"G-code",gdscript:"GDScript",gedcom:"GEDCOM",glsl:"GLSL",gn:"GN",gni:"GN",graphql:"GraphQL",hbs:"Handlebars",hs:"Haskell",hcl:"HCL",hlsl:"HLSL",http:"HTTP",hpkp:"HTTP Public-Key-Pins",hsts:"HTTP Strict-Transport-Security",ichigojam:"IchigoJam","icu-message-format":"ICU Message Format",idr:"Idris",ignore:".ignore",gitignore:".gitignore",hgignore:".hgignore",npmignore:".npmignore",inform7:"Inform 7",javadoc:"JavaDoc",javadoclike:"JavaDoc-like",javastacktrace:"Java stack trace",jq:"JQ",jsdoc:"JSDoc","js-extras":"JS Extras",json:"JSON",webmanifest:"Web App Manifest",json5:"JSON5",jsonp:"JSONP",jsstacktrace:"JS stack trace","js-templates":"JS Templates",kts:"Kotlin Script",kt:"Kotlin",kumir:"KuMir (КуМир)",kum:"KuMir (КуМир)",latex:"LaTeX",tex:"TeX",context:"ConTeXt",lilypond:"LilyPond",ly:"LilyPond",emacs:"Lisp",elisp:"Lisp","emacs-lisp":"Lisp",llvm:"LLVM IR",log:"Log file",lolcode:"LOLCODE",magma:"Magma (CAS)",md:"Markdown","markup-templating":"Markup templating",matlab:"MATLAB",maxscript:"MAXScript",mel:"MEL",mongodb:"MongoDB",moon:"MoonScript",n1ql:"N1QL",n4js:"N4JS",n4jsd:"N4JS","nand2tetris-hdl":"Nand To Tetris HDL",naniscript:"Naninovel Script",nani:"Naninovel Script",nasm:"NASM",neon:"NEON",nginx:"nginx",nsis:"NSIS",objectivec:"Objective-C",objc:"Objective-C",ocaml:"OCaml",opencl:"OpenCL",openqasm:"OpenQasm",qasm:"OpenQasm",parigp:"PARI/GP",objectpascal:"Object Pascal",psl:"PATROL Scripting Language",pcaxis:"PC-Axis",px:"PC-Axis",peoplecode:"PeopleCode",pcode:"PeopleCode",php:"PHP",phpdoc:"PHPDoc","php-extras":"PHP Extras",plsql:"PL/SQL",powerquery:"PowerQuery",pq:"PowerQuery",mscript:"PowerQuery",powershell:"PowerShell",promql:"PromQL",properties:".properties",protobuf:"Protocol Buffers",purebasic:"PureBasic",pbfasm:"PureBasic",purs:"PureScript",py:"Python",qsharp:"Q#",qs:"Q#",q:"Q (kdb+ database)",qml:"QML",rkt:"Racket",cshtml:"Razor C#",razor:"Razor C#",jsx:"React JSX",tsx:"React TSX",renpy:"Ren'py",rpy:"Ren'py",rest:"reST (reStructuredText)",robotframework:"Robot Framework",robot:"Robot Framework",rb:"Ruby",sas:"SAS",sass:"Sass (Sass)",scss:"Sass (Scss)","shell-session":"Shell session","sh-session":"Shell session",shellsession:"Shell session",sml:"SML",smlnj:"SML/NJ",solidity:"Solidity (Ethereum)",sol:"Solidity (Ethereum)","solution-file":"Solution file",sln:"Solution file",soy:"Soy (Closure Template)",sparql:"SPARQL",rq:"SPARQL","splunk-spl":"Splunk SPL",sqf:"SQF: Status Quo Function (Arma 3)",sql:"SQL",iecst:"Structured Text (IEC 61131-3)",systemd:"Systemd configuration file","t4-templating":"T4 templating","t4-cs":"T4 Text Templates (C#)",t4:"T4 Text Templates (C#)","t4-vb":"T4 Text Templates (VB)",tap:"TAP",tt2:"Template Toolkit 2",toml:"TOML",trickle:"trickle",troy:"troy",trig:"TriG",ts:"TypeScript",tsconfig:"TSConfig",uscript:"UnrealScript",uc:"UnrealScript",uri:"URI",url:"URL",vbnet:"VB.Net",vhdl:"VHDL",vim:"vim","visual-basic":"Visual Basic",vba:"VBA",vb:"Visual Basic",wasm:"WebAssembly",wiki:"Wiki markup",wolfram:"Wolfram language",nb:"Mathematica Notebook",wl:"Wolfram language",xeoracube:"XeoraCube","xml-doc":"XML doc (.net)",xojo:"Xojo (REALbasic)",xquery:"XQuery",yaml:"YAML",yml:"YAML",yang:"YANG"};Prism.plugins.toolbar.registerButton("show-language",function(e){var a=e.element.parentNode;if(a&&/pre/i.test(a.nodeName)){var t,s=a.getAttribute("data-language")||i[e.language]||((t=e.language)?(t.substring(0,1).toUpperCase()+t.substring(1)).replace(/s(?=cript)/,"S"):t);if(s){var o=document.createElement("span");return o.textContent=s,o}}})}else console.warn("Show Languages plugin loaded before Toolbar plugin.")}(); \ No newline at end of file +!function(){if("undefined"!=typeof Prism&&"undefined"!=typeof document)if(Prism.plugins.toolbar){var i={none:"Plain text",plain:"Plain text",plaintext:"Plain text",text:"Plain text",txt:"Plain text",html:"HTML",xml:"XML",svg:"SVG",mathml:"MathML",ssml:"SSML",rss:"RSS",css:"CSS",clike:"C-like",js:"JavaScript",abap:"ABAP",abnf:"ABNF",al:"AL",antlr4:"ANTLR4",g4:"ANTLR4",apacheconf:"Apache Configuration",apl:"APL",aql:"AQL",arff:"ARFF",asciidoc:"AsciiDoc",adoc:"AsciiDoc",aspnet:"ASP.NET (C#)",asm6502:"6502 Assembly",autohotkey:"AutoHotkey",autoit:"AutoIt",avisynth:"AviSynth",avs:"AviSynth","avro-idl":"Avro IDL",avdl:"Avro IDL",basic:"BASIC",bbcode:"BBcode",bnf:"BNF",rbnf:"RBNF",bsl:"BSL (1C:Enterprise)",oscript:"OneScript",csharp:"C#",cs:"C#",dotnet:"C#",cpp:"C++",cfscript:"CFScript",cfc:"CFScript",cil:"CIL",cmake:"CMake",cobol:"COBOL",coffee:"CoffeeScript",conc:"Concurnas",csp:"Content-Security-Policy","css-extras":"CSS Extras",csv:"CSV",dataweave:"DataWeave",dax:"DAX",django:"Django/Jinja2",jinja2:"Django/Jinja2","dns-zone-file":"DNS zone file","dns-zone":"DNS zone file",dockerfile:"Docker",dot:"DOT (Graphviz)",gv:"DOT (Graphviz)",ebnf:"EBNF",editorconfig:"EditorConfig",ejs:"EJS",etlua:"Embedded Lua templating",erb:"ERB","excel-formula":"Excel Formula",xlsx:"Excel Formula",xls:"Excel Formula",fsharp:"F#","firestore-security-rules":"Firestore security rules",ftl:"FreeMarker Template Language",gml:"GameMaker Language",gamemakerlanguage:"GameMaker Language",gap:"GAP (CAS)",gcode:"G-code",gdscript:"GDScript",gedcom:"GEDCOM",glsl:"GLSL",gn:"GN",gni:"GN",graphql:"GraphQL",hbs:"Handlebars",hs:"Haskell",hcl:"HCL",hlsl:"HLSL",http:"HTTP",hpkp:"HTTP Public-Key-Pins",hsts:"HTTP Strict-Transport-Security",ichigojam:"IchigoJam","icu-message-format":"ICU Message Format",idr:"Idris",ignore:".ignore",gitignore:".gitignore",hgignore:".hgignore",npmignore:".npmignore",inform7:"Inform 7",javadoc:"JavaDoc",javadoclike:"JavaDoc-like",javastacktrace:"Java stack trace",jq:"JQ",jsdoc:"JSDoc","js-extras":"JS Extras",json:"JSON",webmanifest:"Web App Manifest",json5:"JSON5",jsonp:"JSONP",jsstacktrace:"JS stack trace","js-templates":"JS Templates",keepalived:"Keepalived Configure",kts:"Kotlin Script",kt:"Kotlin",kumir:"KuMir (КуМир)",kum:"KuMir (КуМир)",latex:"LaTeX",tex:"TeX",context:"ConTeXt",lilypond:"LilyPond",ly:"LilyPond",emacs:"Lisp",elisp:"Lisp","emacs-lisp":"Lisp",llvm:"LLVM IR",log:"Log file",lolcode:"LOLCODE",magma:"Magma (CAS)",md:"Markdown","markup-templating":"Markup templating",matlab:"MATLAB",maxscript:"MAXScript",mel:"MEL",mongodb:"MongoDB",moon:"MoonScript",n1ql:"N1QL",n4js:"N4JS",n4jsd:"N4JS","nand2tetris-hdl":"Nand To Tetris HDL",naniscript:"Naninovel Script",nani:"Naninovel Script",nasm:"NASM",neon:"NEON",nginx:"nginx",nsis:"NSIS",objectivec:"Objective-C",objc:"Objective-C",ocaml:"OCaml",opencl:"OpenCL",openqasm:"OpenQasm",qasm:"OpenQasm",parigp:"PARI/GP",objectpascal:"Object Pascal",psl:"PATROL Scripting Language",pcaxis:"PC-Axis",px:"PC-Axis",peoplecode:"PeopleCode",pcode:"PeopleCode",php:"PHP",phpdoc:"PHPDoc","php-extras":"PHP Extras",plsql:"PL/SQL",powerquery:"PowerQuery",pq:"PowerQuery",mscript:"PowerQuery",powershell:"PowerShell",promql:"PromQL",properties:".properties",protobuf:"Protocol Buffers",purebasic:"PureBasic",pbfasm:"PureBasic",purs:"PureScript",py:"Python",qsharp:"Q#",qs:"Q#",q:"Q (kdb+ database)",qml:"QML",rkt:"Racket",cshtml:"Razor C#",razor:"Razor C#",jsx:"React JSX",tsx:"React TSX",renpy:"Ren'py",rpy:"Ren'py",rest:"reST (reStructuredText)",robotframework:"Robot Framework",robot:"Robot Framework",rb:"Ruby",sas:"SAS",sass:"Sass (Sass)",scss:"Sass (Scss)","shell-session":"Shell session","sh-session":"Shell session",shellsession:"Shell session",sml:"SML",smlnj:"SML/NJ",solidity:"Solidity (Ethereum)",sol:"Solidity (Ethereum)","solution-file":"Solution file",sln:"Solution file",soy:"Soy (Closure Template)",sparql:"SPARQL",rq:"SPARQL","splunk-spl":"Splunk SPL",sqf:"SQF: Status Quo Function (Arma 3)",sql:"SQL",iecst:"Structured Text (IEC 61131-3)",systemd:"Systemd configuration file","t4-templating":"T4 templating","t4-cs":"T4 Text Templates (C#)",t4:"T4 Text Templates (C#)","t4-vb":"T4 Text Templates (VB)",tap:"TAP",tt2:"Template Toolkit 2",toml:"TOML",trickle:"trickle",troy:"troy",trig:"TriG",ts:"TypeScript",tsconfig:"TSConfig",uscript:"UnrealScript",uc:"UnrealScript",uri:"URI",url:"URL",vbnet:"VB.Net",vhdl:"VHDL",vim:"vim","visual-basic":"Visual Basic",vba:"VBA",vb:"Visual Basic",wasm:"WebAssembly",wiki:"Wiki markup",wolfram:"Wolfram language",nb:"Mathematica Notebook",wl:"Wolfram language",xeoracube:"XeoraCube","xml-doc":"XML doc (.net)",xojo:"Xojo (REALbasic)",xquery:"XQuery",yaml:"YAML",yml:"YAML",yang:"YANG"};Prism.plugins.toolbar.registerButton("show-language",function(e){var a=e.element.parentNode;if(a&&/pre/i.test(a.nodeName)){var t,o=a.getAttribute("data-language")||i[e.language]||((t=e.language)?(t.substring(0,1).toUpperCase()+t.substring(1)).replace(/s(?=cript)/,"S"):t);if(o){var s=document.createElement("span");return s.textContent=o,s}}})}else console.warn("Show Languages plugin loaded before Toolbar plugin.")}(); \ No newline at end of file diff --git a/tests/languages/keepalived/boolean_feature.test b/tests/languages/keepalived/boolean_feature.test new file mode 100644 index 0000000000..921cbe2d01 --- /dev/null +++ b/tests/languages/keepalived/boolean_feature.test @@ -0,0 +1,23 @@ +strict_mode on +strict_mode off +strict_mode true +strict_mode false +strict_mode yes +strict_mode no + +---------------------------------------------------- + +[ + ["property", "strict_mode"], + ["boolean", "on"], + ["property", "strict_mode"], + ["boolean", "off"], + ["property", "strict_mode"], + ["boolean", "true"], + ["property", "strict_mode"], + ["boolean", "false"], + ["property", "strict_mode"], + ["boolean", "yes"], + ["property", "strict_mode"], + ["boolean", "no"] +] \ No newline at end of file diff --git a/tests/languages/keepalived/comment_feature.test b/tests/languages/keepalived/comment_feature.test new file mode 100644 index 0000000000..09493ab581 --- /dev/null +++ b/tests/languages/keepalived/comment_feature.test @@ -0,0 +1,13 @@ +# +# Foobar + +---------------------------------------------------- + +[ + ["comment", "#"], + ["comment", "# Foobar"] +] + +---------------------------------------------------- + +Checks for comments. \ No newline at end of file diff --git a/tests/languages/keepalived/conditional-configuration_feature.test b/tests/languages/keepalived/conditional-configuration_feature.test new file mode 100644 index 0000000000..7d630fffde --- /dev/null +++ b/tests/languages/keepalived/conditional-configuration_feature.test @@ -0,0 +1,37 @@ +global_defs { + @main router_id main_router +} + +vrrp_instance VRRP { + @main unicast_src_ip 1.2.3.4 + unicast_peer { + @^main 1.2.3.4 + } +} + +---------------------------------------------------- + +[ + ["property", "global_defs"], + ["punctuation", "{"], + ["conditional-configuration", "@main"], + ["property", "router_id"], + " main_router\r\n", + ["punctuation", "}"], + ["property", "vrrp_instance"], + " VRRP ", + ["punctuation", "{"], + ["conditional-configuration", "@main"], + ["property", "unicast_src_ip"], + ["ip", "1.2.3.4"], + ["property", "unicast_peer"], + ["punctuation", "{"], + ["conditional-configuration", "@^main"], + ["ip", "1.2.3.4"], + ["punctuation", "}"], + ["punctuation", "}"] +] + + + + diff --git a/tests/languages/keepalived/constant_feature.test b/tests/languages/keepalived/constant_feature.test new file mode 100644 index 0000000000..6d83175c63 --- /dev/null +++ b/tests/languages/keepalived/constant_feature.test @@ -0,0 +1,127 @@ +virtual_server 192.168.1.200 3306 { + lvs_sched rr + lvs_sched wrr + lvs_sched lc + lvs_sched wlc + lvs_sched lblc + lvs_sched sh + lvs_sched mh + lvs_sched dh + lvs_sched fo + lvs_sched ovf + lvs_sched lblcr + lvs_sched sed + lvs_sched nq + + lvs_method NAT + lvs_method DR + lvs_method TUN + + protocol TCP + protocol UDP + protocol SCTP +} + +vrrp_instance test { + state MASTER + state BACKUP + + authentication { + auth_type PASS + auth_type AH + } +} + +DNS_CHECK { + type A + type NS + type CNAME + type SOA + type MX + type TXT + type AAAA +} + +---------------------------------------------------- + +[ + ["property", "virtual_server"], + ["ip", "192.168.1.200"], + ["number", "3306"], + ["punctuation", "{"], + ["property", "lvs_sched"], + ["constant", "rr"], + ["property", "lvs_sched"], + ["constant", "wrr"], + ["property", "lvs_sched"], + ["constant", "lc"], + ["property", "lvs_sched"], + ["constant", "wlc"], + ["property", "lvs_sched"], + ["constant", "lblc"], + ["property", "lvs_sched"], + ["constant", "sh"], + ["property", "lvs_sched"], + ["constant", "mh"], + ["property", "lvs_sched"], + ["constant", "dh"], + ["property", "lvs_sched"], + ["constant", "fo"], + ["property", "lvs_sched"], + ["constant", "ovf"], + ["property", "lvs_sched"], + ["constant", "lblcr"], + ["property", "lvs_sched"], + ["constant", "sed"], + ["property", "lvs_sched"], + ["constant", "nq"], + ["property", "lvs_method"], + ["constant", "NAT"], + ["property", "lvs_method"], + ["constant", "DR"], + ["property", "lvs_method"], + ["constant", "TUN"], + ["property", "protocol"], + ["constant", "TCP"], + ["property", "protocol"], + ["constant", "UDP"], + ["property", "protocol"], + ["constant", "SCTP"], + ["punctuation", "}"], + ["property", "vrrp_instance"], + " test ", + ["punctuation", "{"], + ["property", "state"], + ["constant", "MASTER"], + ["property", "state"], + ["constant", "BACKUP"], + ["property", "authentication"], + ["punctuation", "{"], + ["property", "auth_type"], + ["constant", "PASS"], + ["property", "auth_type"], + ["constant", "AH"], + ["punctuation", "}"], + ["punctuation", "}"], + ["property", "DNS_CHECK"], + ["punctuation", "{"], + ["property", "type"], + ["constant", "A"], + ["property", "type"], + ["constant", "NS"], + ["property", "type"], + ["constant", "CNAME"], + ["property", "type"], + ["constant", "SOA"], + ["property", "type"], + ["constant", "MX"], + ["property", "type"], + ["constant", "TXT"], + ["property", "type"], + ["constant", "AAAA"], + ["punctuation", "}"] +] + +---------------------------------------------------- + +Checks for constants, number, punctuations. \ No newline at end of file diff --git a/tests/languages/keepalived/ip_feature.test b/tests/languages/keepalived/ip_feature.test new file mode 100644 index 0000000000..801d399fe6 --- /dev/null +++ b/tests/languages/keepalived/ip_feature.test @@ -0,0 +1,25 @@ +virtual_server 192.168.1.200 3306 +virtual_server 192.168.1.200/32 3306 +virtual_server ABCD:EF01:2345:6789:ABCD:EF01:2345:6789 3306 +virtual_server ABCD:EF01:2345:6789:ABCD:EF01:2345:6789/128 3306 + +---------------------------------------------------- + +[ + ["property", "virtual_server"], + ["ip", "192.168.1.200"], + ["number", "3306"], + ["property", "virtual_server"], + ["ip", "192.168.1.200/32"], + ["number", "3306"], + ["property", "virtual_server"], + ["ip", "ABCD:EF01:2345:6789:ABCD:EF01:2345:6789"], + ["number", "3306"], + ["property", "virtual_server"], + ["ip", "ABCD:EF01:2345:6789:ABCD:EF01:2345:6789/128"], + ["number", "3306"] +] + +---------------------------------------------------- + +Checks for ip (IPv4, IPv6, subnet mask). \ No newline at end of file diff --git a/tests/languages/keepalived/path_feature.test b/tests/languages/keepalived/path_feature.test new file mode 100644 index 0000000000..d5c5ff2f2c --- /dev/null +++ b/tests/languages/keepalived/path_feature.test @@ -0,0 +1,27 @@ +vrrp_instance VI_1 { + notify_master /etc/keepalived/to_master.sh + notify_backup C:\keepalived\to_backup.bat + net_namespace /var/run/keepalived + net_namespace C:\users\prism\keepalived +} + +---------------------------------------------------- + +[ + ["property", "vrrp_instance"], + " VI_1 ", + ["punctuation", "{"], + ["property", "notify_master"], + ["path", "/etc/keepalived/to_master.sh"], + ["property", "notify_backup"], + ["path", "C:\\keepalived\\to_backup.bat"], + ["property", "net_namespace"], + ["path", "/var/run/keepalived"], + ["property", "net_namespace"], + ["path", "C:\\users\\prism\\keepalived"], + ["punctuation", "}"] +] + +---------------------------------------------------- + +Checks for path. \ No newline at end of file diff --git a/tests/languages/keepalived/property_feature.test b/tests/languages/keepalived/property_feature.test new file mode 100644 index 0000000000..2accd91338 --- /dev/null +++ b/tests/languages/keepalived/property_feature.test @@ -0,0 +1,625 @@ +BFD_CHECK +DNS_CHECK +FILE_CHECK +HTTP_GET +MISC_CHECK +NAME +PING_CHECK +SCRIPTS +SMTP_CHECK +SSL +SSL_GET +TCP_CHECK +UDP_CHECK +accept +advert_int +alpha +auth_pass +auth_type +authentication +bfd_cpu_affinity +bfd_instance +bfd_no_swap +bfd_priority +bfd_process_name +bfd_rlimit_rttime +bfd_rt_priority +bind_if +bind_port +bindto +ca +certificate +check_unicast_src +checker +checker_cpu_affinity +checker_log_all_failures +checker_no_swap +checker_priority +checker_rlimit_rttime +checker_rt_priority +child_wait_time +connect_ip +connect_port +connect_timeout +dbus_service_name +debug +default_interface +delay +delay_before_retry +delay_loop +digest +dont_track_primary +dynamic +dynamic_interfaces +enable_dbus +enable_script_security +enable_sni +enable_snmp_checker +enable_snmp_rfc +enable_snmp_rfcv2 +enable_snmp_rfcv3 +enable_snmp_vrrp +enable_traps +end +fall +fast_recovery +file +flag-1 +flag-2 +flag-3 +fork_delay +full_command +fwmark +garp_group +garp_interval +garp_lower_prio_delay +garp_lower_prio_repeat +garp_master_delay +garp_master_refresh +garp_master_refresh_repeat +garp_master_repeat +global_defs +global_tracking +gna_interval +group +ha_suspend +hashed +helo_name +higher_prio_send_advert +hoplimit +http_protocol +hysteresis +idle_tx +include +inhibit_on_failure +init_fail +init_file +instance +interface +interfaces +interval +ip_family +ipvs_process_name +keepalived.conf +kernel_rx_buf_size +key +linkbeat_interfaces +linkbeat_use_polling +log_all_failures +log_unknown_vrids +lower_prio_no_advert +lthreshold +lvs_flush +lvs_flush_onstop +lvs_method +lvs_netlink_cmd_rcv_bufs +lvs_netlink_cmd_rcv_bufs_force +lvs_netlink_monitor_rcv_bufs +lvs_netlink_monitor_rcv_bufs_force +lvs_notify_fifo +lvs_notify_fifo_script +lvs_sched +lvs_sync_daemon +max_auto_priority +max_hops +mcast_src_ip +mh-fallback +mh-port +min_auto_priority_delay +min_rx +min_tx +misc_dynamic +misc_path +misc_timeout +multiplier +name +namespace_with_ipsets +native_ipv6 +neighbor_ip +net_namespace +net_namespace_ipvs +nftables +nftables_counters +nftables_ifindex +nftables_priority +no_accept +no_checker_emails +no_email_faults +nopreempt +notification_email +notification_email_from +notify +notify_backup +notify_deleted +notify_down +notify_fault +notify_fifo +notify_fifo_script +notify_master +notify_master_rx_lower_pri +notify_priority_changes +notify_stop +notify_up +old_unicast_checksum +omega +ops +param_match +passive +password +path +persistence_engine +persistence_granularity +persistence_timeout +preempt +preempt_delay +priority +process +process_monitor_rcv_bufs +process_monitor_rcv_bufs_force +process_name +process_names +promote_secondaries +protocol +proxy_arp +proxy_arp_pvlan +quorum +quorum_down +quorum_max +quorum_up +random_seed +real_server +regex +regex_max_offset +regex_min_offset +regex_no_match +regex_options +regex_stack +reload_time_file +reload_repeat +require_reply +retry +rise +router_id +rs_init_notifies +script +script_user +sh-fallback +sh-port +shutdown_script +shutdown_script_timeout +skip_check_adv_addr +smtp_alert +smtp_alert_checker +smtp_alert_vrrp +smtp_connect_timeout +smtp_helo_name +smtp_server +snmp_socket +sorry_server +sorry_server_inhibit +sorry_server_lvs_method +source_ip +start +startup_script +startup_script_timeout +state +static_ipaddress +static_routes +static_rules +status_code +step +strict_mode +sync_group_tracking_weight +terminate_delay +timeout +track_bfd +track_file +track_group +track_interface +track_process +track_script +track_src_ip +ttl +type +umask +unicast_peer +unicast_src_ip +unicast_ttl +url +use_ipvlan +use_pid_dir +use_vmac +user +uthreshold +val1 +val2 +val3 +version +virtual_ipaddress +virtual_ipaddress_excluded +virtual_router_id +virtual_routes +virtual_rules +virtual_server +virtual_server_group +virtualhost +vmac_xmit_base +vrrp +vrrp_check_unicast_src +vrrp_cpu_affinity +vrrp_garp_interval +vrrp_garp_lower_prio_delay +vrrp_garp_lower_prio_repeat +vrrp_garp_master_delay +vrrp_garp_master_refresh +vrrp_garp_master_refresh_repeat +vrrp_garp_master_repeat +vrrp_gna_interval +vrrp_higher_prio_send_advert +vrrp_instance +vrrp_ipsets +vrrp_iptables +vrrp_lower_prio_no_advert +vrrp_mcast_group4 +vrrp_mcast_group6 +vrrp_min_garp +vrrp_netlink_cmd_rcv_bufs +vrrp_netlink_cmd_rcv_bufs_force +vrrp_netlink_monitor_rcv_bufs +vrrp_netlink_monitor_rcv_bufs_force +vrrp_no_swap +vrrp_notify_fifo +vrrp_notify_fifo_script +vrrp_notify_priority_changes +vrrp_priority +vrrp_process_name +vrrp_rlimit_rttime +vrrp_rt_priority +vrrp_rx_bufs_multiplier +vrrp_rx_bufs_policy +vrrp_script +vrrp_skip_check_adv_addr +vrrp_startup_delay +vrrp_strict +vrrp_sync_group +vrrp_track_process +vrrp_version +warmup +weight + +---------------------------------------------------- + +[ + ["property", "BFD_CHECK"], + ["property", "DNS_CHECK"], + ["property", "FILE_CHECK"], + ["property", "HTTP_GET"], + ["property", "MISC_CHECK"], + ["property", "NAME"], + ["property", "PING_CHECK"], + ["property", "SCRIPTS"], + ["property", "SMTP_CHECK"], + ["property", "SSL"], + ["property", "SSL_GET"], + ["property", "TCP_CHECK"], + ["property", "UDP_CHECK"], + ["property", "accept"], + ["property", "advert_int"], + ["property", "alpha"], + ["property", "auth_pass"], + ["property", "auth_type"], + ["property", "authentication"], + ["property", "bfd_cpu_affinity"], + ["property", "bfd_instance"], + ["property", "bfd_no_swap"], + ["property", "bfd_priority"], + ["property", "bfd_process_name"], + ["property", "bfd_rlimit_rttime"], + ["property", "bfd_rt_priority"], + ["property", "bind_if"], + ["property", "bind_port"], + ["property", "bindto"], + ["property", "ca"], + ["property", "certificate"], + ["property", "check_unicast_src"], + ["property", "checker"], + ["property", "checker_cpu_affinity"], + ["property", "checker_log_all_failures"], + ["property", "checker_no_swap"], + ["property", "checker_priority"], + ["property", "checker_rlimit_rttime"], + ["property", "checker_rt_priority"], + ["property", "child_wait_time"], + ["property", "connect_ip"], + ["property", "connect_port"], + ["property", "connect_timeout"], + ["property", "dbus_service_name"], + ["property", "debug"], + ["property", "default_interface"], + ["property", "delay"], + ["property", "delay_before_retry"], + ["property", "delay_loop"], + ["property", "digest"], + ["property", "dont_track_primary"], + ["property", "dynamic"], + ["property", "dynamic_interfaces"], + ["property", "enable_dbus"], + ["property", "enable_script_security"], + ["property", "enable_sni"], + ["property", "enable_snmp_checker"], + ["property", "enable_snmp_rfc"], + ["property", "enable_snmp_rfcv2"], + ["property", "enable_snmp_rfcv3"], + ["property", "enable_snmp_vrrp"], + ["property", "enable_traps"], + ["property", "end"], + ["property", "fall"], + ["property", "fast_recovery"], + ["property", "file"], + ["property", "flag-1"], + ["property", "flag-2"], + ["property", "flag-3"], + ["property", "fork_delay"], + ["property", "full_command"], + ["property", "fwmark"], + ["property", "garp_group"], + ["property", "garp_interval"], + ["property", "garp_lower_prio_delay"], + ["property", "garp_lower_prio_repeat"], + ["property", "garp_master_delay"], + ["property", "garp_master_refresh"], + ["property", "garp_master_refresh_repeat"], + ["property", "garp_master_repeat"], + ["property", "global_defs"], + ["property", "global_tracking"], + ["property", "gna_interval"], + ["property", "group"], + ["property", "ha_suspend"], + ["property", "hashed"], + ["property", "helo_name"], + ["property", "higher_prio_send_advert"], + ["property", "hoplimit"], + ["property", "http_protocol"], + ["property", "hysteresis"], + ["property", "idle_tx"], + ["property", "include"], + ["property", "inhibit_on_failure"], + ["property", "init_fail"], + ["property", "init_file"], + ["property", "instance"], + ["property", "interface"], + ["property", "interfaces"], + ["property", "interval"], + ["property", "ip_family"], + ["property", "ipvs_process_name"], + ["property", "keepalived.conf"], + ["property", "kernel_rx_buf_size"], + ["property", "key"], + ["property", "linkbeat_interfaces"], + ["property", "linkbeat_use_polling"], + ["property", "log_all_failures"], + ["property", "log_unknown_vrids"], + ["property", "lower_prio_no_advert"], + ["property", "lthreshold"], + ["property", "lvs_flush"], + ["property", "lvs_flush_onstop"], + ["property", "lvs_method"], + ["property", "lvs_netlink_cmd_rcv_bufs"], + ["property", "lvs_netlink_cmd_rcv_bufs_force"], + ["property", "lvs_netlink_monitor_rcv_bufs"], + ["property", "lvs_netlink_monitor_rcv_bufs_force"], + ["property", "lvs_notify_fifo"], + ["property", "lvs_notify_fifo_script"], + ["property", "lvs_sched"], + ["property", "lvs_sync_daemon"], + ["property", "max_auto_priority"], + ["property", "max_hops"], + ["property", "mcast_src_ip"], + ["property", "mh-fallback"], + ["property", "mh-port"], + ["property", "min_auto_priority_delay"], + ["property", "min_rx"], + ["property", "min_tx"], + ["property", "misc_dynamic"], + ["property", "misc_path"], + ["property", "misc_timeout"], + ["property", "multiplier"], + ["property", "name"], + ["property", "namespace_with_ipsets"], + ["property", "native_ipv6"], + ["property", "neighbor_ip"], + ["property", "net_namespace"], + ["property", "net_namespace_ipvs"], + ["property", "nftables"], + ["property", "nftables_counters"], + ["property", "nftables_ifindex"], + ["property", "nftables_priority"], + ["property", "no_accept"], + ["property", "no_checker_emails"], + ["property", "no_email_faults"], + ["property", "nopreempt"], + ["property", "notification_email"], + ["property", "notification_email_from"], + ["property", "notify"], + ["property", "notify_backup"], + ["property", "notify_deleted"], + ["property", "notify_down"], + ["property", "notify_fault"], + ["property", "notify_fifo"], + ["property", "notify_fifo_script"], + ["property", "notify_master"], + ["property", "notify_master_rx_lower_pri"], + ["property", "notify_priority_changes"], + ["property", "notify_stop"], + ["property", "notify_up"], + ["property", "old_unicast_checksum"], + ["property", "omega"], + ["property", "ops"], + ["property", "param_match"], + ["property", "passive"], + ["property", "password"], + ["property", "path"], + ["property", "persistence_engine"], + ["property", "persistence_granularity"], + ["property", "persistence_timeout"], + ["property", "preempt"], + ["property", "preempt_delay"], + ["property", "priority"], + ["property", "process"], + ["property", "process_monitor_rcv_bufs"], + ["property", "process_monitor_rcv_bufs_force"], + ["property", "process_name"], + ["property", "process_names"], + ["property", "promote_secondaries"], + ["property", "protocol"], + ["property", "proxy_arp"], + ["property", "proxy_arp_pvlan"], + ["property", "quorum"], + ["property", "quorum_down"], + ["property", "quorum_max"], + ["property", "quorum_up"], + ["property", "random_seed"], + ["property", "real_server"], + ["property", "regex"], + ["property", "regex_max_offset"], + ["property", "regex_min_offset"], + ["property", "regex_no_match"], + ["property", "regex_options"], + ["property", "regex_stack"], + ["property", "reload_time_file"], + ["property", "reload_repeat"], + ["property", "require_reply"], + ["property", "retry"], + ["property", "rise"], + ["property", "router_id"], + ["property", "rs_init_notifies"], + ["property", "script"], + ["property", "script_user"], + ["property", "sh-fallback"], + ["property", "sh-port"], + ["property", "shutdown_script"], + ["property", "shutdown_script_timeout"], + ["property", "skip_check_adv_addr"], + ["property", "smtp_alert"], + ["property", "smtp_alert_checker"], + ["property", "smtp_alert_vrrp"], + ["property", "smtp_connect_timeout"], + ["property", "smtp_helo_name"], + ["property", "smtp_server"], + ["property", "snmp_socket"], + ["property", "sorry_server"], + ["property", "sorry_server_inhibit"], + ["property", "sorry_server_lvs_method"], + ["property", "source_ip"], + ["property", "start"], + ["property", "startup_script"], + ["property", "startup_script_timeout"], + ["property", "state"], + ["property", "static_ipaddress"], + ["property", "static_routes"], + ["property", "static_rules"], + ["property", "status_code"], + ["property", "step"], + ["property", "strict_mode"], + ["property", "sync_group_tracking_weight"], + ["property", "terminate_delay"], + ["property", "timeout"], + ["property", "track_bfd"], + ["property", "track_file"], + ["property", "track_group"], + ["property", "track_interface"], + ["property", "track_process"], + ["property", "track_script"], + ["property", "track_src_ip"], + ["property", "ttl"], + ["property", "type"], + ["property", "umask"], + ["property", "unicast_peer"], + ["property", "unicast_src_ip"], + ["property", "unicast_ttl"], + ["property", "url"], + ["property", "use_ipvlan"], + ["property", "use_pid_dir"], + ["property", "use_vmac"], + ["property", "user"], + ["property", "uthreshold"], + ["property", "val1"], + ["property", "val2"], + ["property", "val3"], + ["property", "version"], + ["property", "virtual_ipaddress"], + ["property", "virtual_ipaddress_excluded"], + ["property", "virtual_router_id"], + ["property", "virtual_routes"], + ["property", "virtual_rules"], + ["property", "virtual_server"], + ["property", "virtual_server_group"], + ["property", "virtualhost"], + ["property", "vmac_xmit_base"], + ["property", "vrrp"], + ["property", "vrrp_check_unicast_src"], + ["property", "vrrp_cpu_affinity"], + ["property", "vrrp_garp_interval"], + ["property", "vrrp_garp_lower_prio_delay"], + ["property", "vrrp_garp_lower_prio_repeat"], + ["property", "vrrp_garp_master_delay"], + ["property", "vrrp_garp_master_refresh"], + ["property", "vrrp_garp_master_refresh_repeat"], + ["property", "vrrp_garp_master_repeat"], + ["property", "vrrp_gna_interval"], + ["property", "vrrp_higher_prio_send_advert"], + ["property", "vrrp_instance"], + ["property", "vrrp_ipsets"], + ["property", "vrrp_iptables"], + ["property", "vrrp_lower_prio_no_advert"], + ["property", "vrrp_mcast_group4"], + ["property", "vrrp_mcast_group6"], + ["property", "vrrp_min_garp"], + ["property", "vrrp_netlink_cmd_rcv_bufs"], + ["property", "vrrp_netlink_cmd_rcv_bufs_force"], + ["property", "vrrp_netlink_monitor_rcv_bufs"], + ["property", "vrrp_netlink_monitor_rcv_bufs_force"], + ["property", "vrrp_no_swap"], + ["property", "vrrp_notify_fifo"], + ["property", "vrrp_notify_fifo_script"], + ["property", "vrrp_notify_priority_changes"], + ["property", "vrrp_priority"], + ["property", "vrrp_process_name"], + ["property", "vrrp_rlimit_rttime"], + ["property", "vrrp_rt_priority"], + ["property", "vrrp_rx_bufs_multiplier"], + ["property", "vrrp_rx_bufs_policy"], + ["property", "vrrp_script"], + ["property", "vrrp_skip_check_adv_addr"], + ["property", "vrrp_startup_delay"], + ["property", "vrrp_strict"], + ["property", "vrrp_sync_group"], + ["property", "vrrp_track_process"], + ["property", "vrrp_version"], + ["property", "warmup"], + ["property", "weight"] +] + +---------------------------------------------------- + +Checks for properties. diff --git a/tests/languages/keepalived/string_feature.test b/tests/languages/keepalived/string_feature.test new file mode 100644 index 0000000000..c8b2993c3a --- /dev/null +++ b/tests/languages/keepalived/string_feature.test @@ -0,0 +1,34 @@ +global_defs { + notification_email { + example@163.com + } + notification_email_from example@example.com +} + +vrrp_instance VI_1 { + notify_fault "/etc/keepalived/to_fault.sh" +} + +---------------------------------------------------- + +[ + ["property", "global_defs"], + ["punctuation", "{"], + ["property", "notification_email"], + ["punctuation", "{"], + ["email", "example@163.com"], + ["punctuation", "}"], + ["property", "notification_email_from"], + ["email", "example@example.com"], + ["punctuation", "}"], + ["property", "vrrp_instance"], + " VI_1 ", + ["punctuation", "{"], + ["property", "notify_fault"], + ["string", "\"/etc/keepalived/to_fault.sh\""], + ["punctuation", "}"] +] + +---------------------------------------------------- + +Checks for string, email (alias string). \ No newline at end of file diff --git a/tests/languages/keepalived/variable_feature.test b/tests/languages/keepalived/variable_feature.test new file mode 100644 index 0000000000..751c374d4a --- /dev/null +++ b/tests/languages/keepalived/variable_feature.test @@ -0,0 +1,23 @@ +$ADDRESS_BASE=10.2.${ADDRESS_BASE_SUB} +$ADDRESS_BASE_SUB=0 +${ADDRESS_BASE}.100/32 +$ADDRESS_BASE_SUB=10 + +---------------------------------------------------- + +[ + ["variable", "$ADDRESS_BASE"], + ["operator", "="], + ["number", "10.2"], + ".", + ["variable", "${ADDRESS_BASE_SUB}"], + ["variable", "$ADDRESS_BASE_SUB"], + ["operator", "="], + ["number", "0"], + ["variable", "${ADDRESS_BASE}"], + ".100/", + ["number", "32"], + ["variable", "$ADDRESS_BASE_SUB"], + ["operator", "="], + ["number", "10"] +] \ No newline at end of file From 736c581d630177b58e9a490229fc05ef46f2959a Mon Sep 17 00:00:00 2001 From: Wei Ting <59229084+hoonweiting@users.noreply.github.com> Date: Mon, 4 Oct 2021 02:06:01 +0800 Subject: [PATCH 0920/1100] Elm: Recognise unicode escapes as valid Char (#3105) --- components/prism-elm.js | 2 +- components/prism-elm.min.js | 2 +- tests/languages/elm/char_feature.test | 10 ++++++++-- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/components/prism-elm.js b/components/prism-elm.js index f8e27a640f..5c8a559a81 100644 --- a/components/prism-elm.js +++ b/components/prism-elm.js @@ -1,7 +1,7 @@ Prism.languages.elm = { 'comment': /--.*|\{-[\s\S]*?-\}/, 'char': { - pattern: /'(?:[^\\'\r\n]|\\(?:[abfnrtv\\']|\d+|x[0-9a-fA-F]+))'/, + pattern: /'(?:[^\\'\r\n]|\\(?:[abfnrtv\\']|\d+|x[0-9a-fA-F]+|u\{[0-9a-fA-F]+\}))'/, greedy: true }, 'string': [ diff --git a/components/prism-elm.min.js b/components/prism-elm.min.js index c706a9438f..681418de59 100644 --- a/components/prism-elm.min.js +++ b/components/prism-elm.min.js @@ -1 +1 @@ -Prism.languages.elm={comment:/--.*|\{-[\s\S]*?-\}/,char:{pattern:/'(?:[^\\'\r\n]|\\(?:[abfnrtv\\']|\d+|x[0-9a-fA-F]+))'/,greedy:!0},string:[{pattern:/"""[\s\S]*?"""/,greedy:!0},{pattern:/"(?:[^\\"\r\n]|\\.)*"/,greedy:!0}],"import-statement":{pattern:/(^[\t ]*)import\s+[A-Z]\w*(?:\.[A-Z]\w*)*(?:\s+as\s+(?:[A-Z]\w*)(?:\.[A-Z]\w*)*)?(?:\s+exposing\s+)?/m,lookbehind:!0,inside:{keyword:/\b(?:as|exposing|import)\b/}},keyword:/\b(?:alias|as|case|else|exposing|if|in|infixl|infixr|let|module|of|then|type)\b/,builtin:/\b(?:abs|acos|always|asin|atan|atan2|ceiling|clamp|compare|cos|curry|degrees|e|flip|floor|fromPolar|identity|isInfinite|isNaN|logBase|max|min|negate|never|not|pi|radians|rem|round|sin|sqrt|tan|toFloat|toPolar|toString|truncate|turns|uncurry|xor)\b/,number:/\b(?:\d+(?:\.\d+)?(?:e[+-]?\d+)?|0x[0-9a-f]+)\b/i,operator:/\s\.\s|[+\-/*=.$<>:&|^?%#@~!]{2,}|[+\-/*=$<>:&|^?%#@~!]/,hvariable:/\b(?:[A-Z]\w*\.)*[a-z]\w*\b/,constant:/\b(?:[A-Z]\w*\.)*[A-Z]\w*\b/,punctuation:/[{}[\]|(),.:]/}; \ No newline at end of file +Prism.languages.elm={comment:/--.*|\{-[\s\S]*?-\}/,char:{pattern:/'(?:[^\\'\r\n]|\\(?:[abfnrtv\\']|\d+|x[0-9a-fA-F]+|u\{[0-9a-fA-F]+\}))'/,greedy:!0},string:[{pattern:/"""[\s\S]*?"""/,greedy:!0},{pattern:/"(?:[^\\"\r\n]|\\.)*"/,greedy:!0}],"import-statement":{pattern:/(^[\t ]*)import\s+[A-Z]\w*(?:\.[A-Z]\w*)*(?:\s+as\s+(?:[A-Z]\w*)(?:\.[A-Z]\w*)*)?(?:\s+exposing\s+)?/m,lookbehind:!0,inside:{keyword:/\b(?:as|exposing|import)\b/}},keyword:/\b(?:alias|as|case|else|exposing|if|in|infixl|infixr|let|module|of|then|type)\b/,builtin:/\b(?:abs|acos|always|asin|atan|atan2|ceiling|clamp|compare|cos|curry|degrees|e|flip|floor|fromPolar|identity|isInfinite|isNaN|logBase|max|min|negate|never|not|pi|radians|rem|round|sin|sqrt|tan|toFloat|toPolar|toString|truncate|turns|uncurry|xor)\b/,number:/\b(?:\d+(?:\.\d+)?(?:e[+-]?\d+)?|0x[0-9a-f]+)\b/i,operator:/\s\.\s|[+\-/*=.$<>:&|^?%#@~!]{2,}|[+\-/*=$<>:&|^?%#@~!]/,hvariable:/\b(?:[A-Z]\w*\.)*[a-z]\w*\b/,constant:/\b(?:[A-Z]\w*\.)*[A-Z]\w*\b/,punctuation:/[{}[\]|(),.:]/}; \ No newline at end of file diff --git a/tests/languages/elm/char_feature.test b/tests/languages/elm/char_feature.test index c4d33fcd2a..8fb06d33ce 100644 --- a/tests/languages/elm/char_feature.test +++ b/tests/languages/elm/char_feature.test @@ -3,6 +3,9 @@ '\n' '\23' '\xFE' +'\u{0000}' +'\u{1F648}' +'\u{10FFFF}' ---------------------------------------------------- @@ -11,9 +14,12 @@ ["char", "'\\''"], ["char", "'\\n'"], ["char", "'\\23'"], - ["char", "'\\xFE'"] + ["char", "'\\xFE'"], + ["char", "'\\u{0000}'"], + ["char", "'\\u{1F648}'"], + ["char", "'\\u{10FFFF}'"] ] ---------------------------------------------------- -Checks for chars. \ No newline at end of file +Checks for chars. From 5b7ce5e409f0d9ad68812f70d25dc640a2c87377 Mon Sep 17 00:00:00 2001 From: Outreach-ChemEng-UofU <87083952+Outreach-ChemEng-UofU@users.noreply.github.com> Date: Mon, 4 Oct 2021 05:50:07 -0600 Subject: [PATCH 0921/1100] Arduino: Added `ino` alias (#2990) Co-authored-by: RunDevelopment --- components.js | 2 +- components.json | 1 + components/prism-arduino.js | 2 ++ components/prism-arduino.min.js | 2 +- plugins/autoloader/prism-autoloader.js | 1 + plugins/autoloader/prism-autoloader.min.js | 2 +- plugins/show-language/prism-show-language.js | 1 + plugins/show-language/prism-show-language.min.js | 2 +- 8 files changed, 9 insertions(+), 4 deletions(-) diff --git a/components.js b/components.js index 41d90e7ed3..d8ac3e7f66 100644 --- a/components.js +++ b/components.js @@ -1,2 +1,2 @@ -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml","ssml","atom","rss"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","ssml":"SSML","atom":"Atom","rss":"RSS"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","optional":"regex","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"ABNF","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"agda":{"title":"Agda","owner":"xy-ren"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apex":{"title":"Apex","require":["clike","sql"],"owner":"RunDevelopment"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","owner":"dkern"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"avisynth":{"title":"AviSynth","alias":"avs","owner":"Zinfidel"},"avro-idl":{"title":"Avro IDL","alias":"avdl","owner":"RunDevelopment"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"bicep":{"title":"Bicep","owner":"johnnyreilly"},"birb":{"title":"Birb","require":"clike","owner":"Calamity210"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"BNF","alias":"rbnf","aliasTitles":{"rbnf":"RBNF"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"bsl":{"title":"BSL (1C:Enterprise)","alias":"oscript","aliasTitles":{"oscript":"OneScript"},"owner":"Diversus23"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cfscript":{"title":"CFScript","require":"clike","alias":"cfc","owner":"mjclemente"},"chaiscript":{"title":"ChaiScript","require":["clike","cpp"],"owner":"RunDevelopment"},"cil":{"title":"CIL","owner":"sbrl"},"clojure":{"title":"Clojure","owner":"troglotit"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"cobol":{"title":"COBOL","owner":"RunDevelopment"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"coq":{"title":"Coq","owner":"RunDevelopment"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"csv":{"title":"CSV","owner":"RunDevelopment"},"cypher":{"title":"Cypher","owner":"RunDevelopment"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dataweave":{"title":"DataWeave","owner":"machaval"},"dax":{"title":"DAX","owner":"peterbud"},"dhall":{"title":"Dhall","owner":"RunDevelopment"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"dot":{"title":"DOT (Graphviz)","alias":"gv","optional":"markup","owner":"RunDevelopment"},"ebnf":{"title":"EBNF","owner":"RunDevelopment"},"editorconfig":{"title":"EditorConfig","owner":"osipxd"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"false":{"title":"False","owner":"edukisto"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"gap":{"title":"GAP (CAS)","owner":"RunDevelopment"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"c","owner":"Golmote"},"gn":{"title":"GN","alias":"gni","owner":"RunDevelopment"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","optional":"markdown","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","alias":"hbs","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"hlsl":{"title":"HLSL","require":"c","owner":"RunDevelopment"},"hoon":{"title":"Hoon","owner":"matildepark"},"http":{"title":"HTTP","optional":["css","javascript","json","markup","uri"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"icu-message-format":{"title":"ICU Message Format","owner":"RunDevelopment"},"idris":{"title":"Idris","alias":"idr","owner":"KeenS","require":"haskell"},"ignore":{"title":".ignore","owner":"osipxd","alias":["gitignore","hgignore","npmignore"],"aliasTitles":{"gitignore":".gitignore","hgignore":".hgignore","npmignore":".npmignore"}},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jexl":{"title":"Jexl","owner":"czosel"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike","typescript"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","alias":"webmanifest","aliasTitles":{"webmanifest":"Web App Manifest"},"owner":"CupOfTea696"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"jsstacktrace":{"title":"JS stack trace","owner":"sbrl"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup","sql"],"owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keepalived":{"title":"Keepalived Configure","owner":"dev-itsheng"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","alias":["kt","kts"],"aliasTitles":{"kts":"Kotlin Script"},"require":"clike","owner":"Golmote"},"kumir":{"title":"KuMir (КуМир)","alias":"kum","owner":"edukisto"},"kusto":{"title":"Kusto","owner":"RunDevelopment"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","require":"markup-templating","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"log":{"title":"Log file","optional":"javastacktrace","owner":"RunDevelopment"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"magma":{"title":"Magma (CAS)","owner":"RunDevelopment"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","optional":"yaml","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"maxscript":{"title":"MAXScript","owner":"RunDevelopment"},"mel":{"title":"MEL","owner":"Golmote"},"mermaid":{"title":"Mermaid","owner":"RunDevelopment"},"mizar":{"title":"Mizar","owner":"Golmote"},"mongodb":{"title":"MongoDB","owner":"airs0urce","require":"javascript"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"naniscript":{"title":"Naninovel Script","owner":"Elringus","alias":"nani"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nevod":{"title":"Nevod","owner":"nezaboodka"},"nginx":{"title":"nginx","owner":"volado"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"openqasm":{"title":"OpenQasm","alias":"qasm","owner":"RunDevelopment"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"psl":{"title":"PATROL Scripting Language","owner":"bertysentry"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":"markup-templating","owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"promql":{"title":"PromQL","owner":"arendjr"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"purebasic":{"title":"PureBasic","require":"clike","alias":"pbfasm","owner":"HeX0R101"},"purescript":{"title":"PureScript","require":"haskell","alias":"purs","owner":"sriharshachilakapati"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"qsharp":{"title":"Q#","require":"clike","alias":"qs","owner":"fedonman"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"racket":{"title":"Racket","require":"scheme","alias":"rkt","owner":"RunDevelopment"},"cshtml":{"title":"Razor C#","alias":"razor","require":["markup","csharp"],"optional":["css","css-extras","javascript","js-extras"],"owner":"RunDevelopment"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","owner":"RunDevelopment"},"rego":{"title":"Rego","owner":"JordanSh"},"renpy":{"title":"Ren'py","alias":"rpy","owner":"HyuchiaDiego"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","optional":"css-extras","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","alias":["sh-session","shellsession"],"owner":"RunDevelopment"},"smali":{"title":"Smali","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sml":{"title":"SML","alias":"smlnj","aliasTitles":{"smlnj":"SML/NJ"},"owner":"RunDevelopment"},"solidity":{"title":"Solidity (Ethereum)","alias":"sol","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"squirrel":{"title":"Squirrel","require":"clike","owner":"RunDevelopment"},"stan":{"title":"Stan","owner":"RunDevelopment"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","owner":"chrischares"},"systemd":{"title":"Systemd configuration file","owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","vbnet"],"owner":"RunDevelopment"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tremor":{"title":"Tremor","alias":["trickle","troy"],"owner":"darach","aliasTitles":{"trickle":"trickle","troy":"troy"}},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"typoscript":{"title":"TypoScript","alias":"tsconfig","aliasTitles":{"tsconfig":"TSConfig"},"owner":"dkern"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"uri":{"title":"URI","alias":"url","aliasTitles":{"url":"URL"},"owner":"RunDevelopment"},"v":{"title":"V","require":"clike","owner":"taggon"},"vala":{"title":"Vala","require":"clike","optional":"regex","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":["vb","vba"],"aliasTitles":{"vba":"VBA"},"owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"wolfram":{"title":"Wolfram language","alias":["mathematica","nb","wl"],"aliasTitles":{"mathematica":"Mathematica","nb":"Mathematica Notebook"},"owner":"msollami"},"wren":{"title":"Wren","owner":"clsource"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xml-doc":{"title":"XML doc (.net)","require":"markup","modify":["csharp","fsharp","vbnet"],"owner":"RunDevelopment"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"yang":{"title":"YANG","owner":"RunDevelopment"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword for fine-grained highlighting.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml","ssml","atom","rss"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","ssml":"SSML","atom":"Atom","rss":"RSS"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","optional":"regex","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"ABNF","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"agda":{"title":"Agda","owner":"xy-ren"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apex":{"title":"Apex","require":["clike","sql"],"owner":"RunDevelopment"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","alias":"ino","owner":"dkern"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"avisynth":{"title":"AviSynth","alias":"avs","owner":"Zinfidel"},"avro-idl":{"title":"Avro IDL","alias":"avdl","owner":"RunDevelopment"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"bicep":{"title":"Bicep","owner":"johnnyreilly"},"birb":{"title":"Birb","require":"clike","owner":"Calamity210"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"BNF","alias":"rbnf","aliasTitles":{"rbnf":"RBNF"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"bsl":{"title":"BSL (1C:Enterprise)","alias":"oscript","aliasTitles":{"oscript":"OneScript"},"owner":"Diversus23"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cfscript":{"title":"CFScript","require":"clike","alias":"cfc","owner":"mjclemente"},"chaiscript":{"title":"ChaiScript","require":["clike","cpp"],"owner":"RunDevelopment"},"cil":{"title":"CIL","owner":"sbrl"},"clojure":{"title":"Clojure","owner":"troglotit"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"cobol":{"title":"COBOL","owner":"RunDevelopment"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"coq":{"title":"Coq","owner":"RunDevelopment"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"csv":{"title":"CSV","owner":"RunDevelopment"},"cypher":{"title":"Cypher","owner":"RunDevelopment"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dataweave":{"title":"DataWeave","owner":"machaval"},"dax":{"title":"DAX","owner":"peterbud"},"dhall":{"title":"Dhall","owner":"RunDevelopment"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"dot":{"title":"DOT (Graphviz)","alias":"gv","optional":"markup","owner":"RunDevelopment"},"ebnf":{"title":"EBNF","owner":"RunDevelopment"},"editorconfig":{"title":"EditorConfig","owner":"osipxd"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"false":{"title":"False","owner":"edukisto"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"gap":{"title":"GAP (CAS)","owner":"RunDevelopment"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"c","owner":"Golmote"},"gn":{"title":"GN","alias":"gni","owner":"RunDevelopment"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","optional":"markdown","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","alias":"hbs","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"hlsl":{"title":"HLSL","require":"c","owner":"RunDevelopment"},"hoon":{"title":"Hoon","owner":"matildepark"},"http":{"title":"HTTP","optional":["css","javascript","json","markup","uri"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"icu-message-format":{"title":"ICU Message Format","owner":"RunDevelopment"},"idris":{"title":"Idris","alias":"idr","owner":"KeenS","require":"haskell"},"ignore":{"title":".ignore","owner":"osipxd","alias":["gitignore","hgignore","npmignore"],"aliasTitles":{"gitignore":".gitignore","hgignore":".hgignore","npmignore":".npmignore"}},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jexl":{"title":"Jexl","owner":"czosel"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike","typescript"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","alias":"webmanifest","aliasTitles":{"webmanifest":"Web App Manifest"},"owner":"CupOfTea696"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"jsstacktrace":{"title":"JS stack trace","owner":"sbrl"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup","sql"],"owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keepalived":{"title":"Keepalived Configure","owner":"dev-itsheng"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","alias":["kt","kts"],"aliasTitles":{"kts":"Kotlin Script"},"require":"clike","owner":"Golmote"},"kumir":{"title":"KuMir (КуМир)","alias":"kum","owner":"edukisto"},"kusto":{"title":"Kusto","owner":"RunDevelopment"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","require":"markup-templating","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"log":{"title":"Log file","optional":"javastacktrace","owner":"RunDevelopment"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"magma":{"title":"Magma (CAS)","owner":"RunDevelopment"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","optional":"yaml","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"maxscript":{"title":"MAXScript","owner":"RunDevelopment"},"mel":{"title":"MEL","owner":"Golmote"},"mermaid":{"title":"Mermaid","owner":"RunDevelopment"},"mizar":{"title":"Mizar","owner":"Golmote"},"mongodb":{"title":"MongoDB","owner":"airs0urce","require":"javascript"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"naniscript":{"title":"Naninovel Script","owner":"Elringus","alias":"nani"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nevod":{"title":"Nevod","owner":"nezaboodka"},"nginx":{"title":"nginx","owner":"volado"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"openqasm":{"title":"OpenQasm","alias":"qasm","owner":"RunDevelopment"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"psl":{"title":"PATROL Scripting Language","owner":"bertysentry"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":"markup-templating","owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"promql":{"title":"PromQL","owner":"arendjr"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"purebasic":{"title":"PureBasic","require":"clike","alias":"pbfasm","owner":"HeX0R101"},"purescript":{"title":"PureScript","require":"haskell","alias":"purs","owner":"sriharshachilakapati"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"qsharp":{"title":"Q#","require":"clike","alias":"qs","owner":"fedonman"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"racket":{"title":"Racket","require":"scheme","alias":"rkt","owner":"RunDevelopment"},"cshtml":{"title":"Razor C#","alias":"razor","require":["markup","csharp"],"optional":["css","css-extras","javascript","js-extras"],"owner":"RunDevelopment"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","owner":"RunDevelopment"},"rego":{"title":"Rego","owner":"JordanSh"},"renpy":{"title":"Ren'py","alias":"rpy","owner":"HyuchiaDiego"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","optional":"css-extras","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","alias":["sh-session","shellsession"],"owner":"RunDevelopment"},"smali":{"title":"Smali","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sml":{"title":"SML","alias":"smlnj","aliasTitles":{"smlnj":"SML/NJ"},"owner":"RunDevelopment"},"solidity":{"title":"Solidity (Ethereum)","alias":"sol","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"squirrel":{"title":"Squirrel","require":"clike","owner":"RunDevelopment"},"stan":{"title":"Stan","owner":"RunDevelopment"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","owner":"chrischares"},"systemd":{"title":"Systemd configuration file","owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","vbnet"],"owner":"RunDevelopment"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tremor":{"title":"Tremor","alias":["trickle","troy"],"owner":"darach","aliasTitles":{"trickle":"trickle","troy":"troy"}},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"typoscript":{"title":"TypoScript","alias":"tsconfig","aliasTitles":{"tsconfig":"TSConfig"},"owner":"dkern"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"uri":{"title":"URI","alias":"url","aliasTitles":{"url":"URL"},"owner":"RunDevelopment"},"v":{"title":"V","require":"clike","owner":"taggon"},"vala":{"title":"Vala","require":"clike","optional":"regex","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":["vb","vba"],"aliasTitles":{"vba":"VBA"},"owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"wolfram":{"title":"Wolfram language","alias":["mathematica","nb","wl"],"aliasTitles":{"mathematica":"Mathematica","nb":"Mathematica Notebook"},"owner":"msollami"},"wren":{"title":"Wren","owner":"clsource"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xml-doc":{"title":"XML doc (.net)","require":"markup","modify":["csharp","fsharp","vbnet"],"owner":"RunDevelopment"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"yang":{"title":"YANG","owner":"RunDevelopment"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword for fine-grained highlighting.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; if (typeof module !== 'undefined' && module.exports) { module.exports = components; } \ No newline at end of file diff --git a/components.json b/components.json index 906491e4a7..abe3b1594f 100644 --- a/components.json +++ b/components.json @@ -132,6 +132,7 @@ "arduino": { "title": "Arduino", "require": "cpp", + "alias": "ino", "owner": "dkern" }, "arff": { diff --git a/components/prism-arduino.js b/components/prism-arduino.js index 6c25c86980..8cba45f7ac 100644 --- a/components/prism-arduino.js +++ b/components/prism-arduino.js @@ -3,3 +3,5 @@ Prism.languages.arduino = Prism.languages.extend('cpp', { 'keyword': /\b(?:String|array|bool|boolean|break|byte|case|catch|continue|default|do|double|else|finally|for|function|goto|if|in|instanceof|int|integer|long|loop|new|null|return|setup|string|switch|throw|try|void|while|word)\b/, 'builtin': /\b(?:Audio|BSSID|Bridge|Client|Console|EEPROM|Esplora|EsploraTFT|Ethernet|EthernetClient|EthernetServer|EthernetUDP|File|FileIO|FileSystem|Firmata|GPRS|GSM|GSMBand|GSMClient|GSMModem|GSMPIN|GSMScanner|GSMServer|GSMVoiceCall|GSM_SMS|HttpClient|IPAddress|IRread|Keyboard|KeyboardController|LiquidCrystal|LiquidCrystal_I2C|Mailbox|Mouse|MouseController|PImage|Process|RSSI|RobotControl|RobotMotor|SD|SPI|SSID|Scheduler|Serial|Server|Servo|SoftwareSerial|Stepper|Stream|TFT|Task|USBHost|WiFi|WiFiClient|WiFiServer|WiFiUDP|Wire|YunClient|YunServer|abs|addParameter|analogRead|analogReadResolution|analogReference|analogWrite|analogWriteResolution|answerCall|attach|attachGPRS|attachInterrupt|attached|autoscroll|available|background|beep|begin|beginPacket|beginSD|beginSMS|beginSpeaker|beginTFT|beginTransmission|beginWrite|bit|bitClear|bitRead|bitSet|bitWrite|blink|blinkVersion|buffer|changePIN|checkPIN|checkPUK|checkReg|circle|cityNameRead|cityNameWrite|clear|clearScreen|click|close|compassRead|config|connect|connected|constrain|cos|countryNameRead|countryNameWrite|createChar|cursor|debugPrint|delay|delayMicroseconds|detach|detachInterrupt|digitalRead|digitalWrite|disconnect|display|displayLogos|drawBMP|drawCompass|encryptionType|end|endPacket|endSMS|endTransmission|endWrite|exists|exitValue|fill|find|findUntil|flush|gatewayIP|get|getAsynchronously|getBand|getButton|getCurrentCarrier|getIMEI|getKey|getModifiers|getOemKey|getPINUsed|getResult|getSignalStrength|getSocket|getVoiceCallStatus|getXChange|getYChange|hangCall|height|highByte|home|image|interrupts|isActionDone|isDirectory|isListening|isPIN|isPressed|isValid|keyPressed|keyReleased|keyboardRead|knobRead|leftToRight|line|lineFollowConfig|listen|listenOnLocalhost|loadImage|localIP|lowByte|macAddress|maintain|map|max|messageAvailable|micros|millis|min|mkdir|motorsStop|motorsWrite|mouseDragged|mouseMoved|mousePressed|mouseReleased|move|noAutoscroll|noBlink|noBuffer|noCursor|noDisplay|noFill|noInterrupts|noListenOnLocalhost|noStroke|noTone|onReceive|onRequest|open|openNextFile|overflow|parseCommand|parseFloat|parseInt|parsePacket|pauseMode|peek|pinMode|playFile|playMelody|point|pointTo|position|pow|prepare|press|print|printFirmwareVersion|printVersion|println|process|processInput|pulseIn|put|random|randomSeed|read|readAccelerometer|readBlue|readButton|readBytes|readBytesUntil|readGreen|readJoystickButton|readJoystickSwitch|readJoystickX|readJoystickY|readLightSensor|readMessage|readMicrophone|readNetworks|readRed|readSlider|readString|readStringUntil|readTemperature|ready|rect|release|releaseAll|remoteIP|remoteNumber|remotePort|remove|requestFrom|retrieveCallingNumber|rewindDirectory|rightToLeft|rmdir|robotNameRead|robotNameWrite|run|runAsynchronously|runShellCommand|runShellCommandAsynchronously|running|scanNetworks|scrollDisplayLeft|scrollDisplayRight|seek|sendAnalog|sendDigitalPortPair|sendDigitalPorts|sendString|sendSysex|serialEvent|setBand|setBitOrder|setClockDivider|setCursor|setDNS|setDataMode|setFirmwareVersion|setMode|setPINUsed|setSpeed|setTextSize|setTimeout|shiftIn|shiftOut|shutdown|sin|size|sqrt|startLoop|step|stop|stroke|subnetMask|switchPIN|tan|tempoWrite|text|tone|transfer|tuneWrite|turn|updateIR|userNameRead|userNameWrite|voiceCall|waitContinue|width|write|writeBlue|writeGreen|writeJSON|writeMessage|writeMicroseconds|writeRGB|writeRed|yield)\b/ }); + +Prism.languages.ino = Prism.languages.arduino; diff --git a/components/prism-arduino.min.js b/components/prism-arduino.min.js index 55109cd330..f93e989b6c 100644 --- a/components/prism-arduino.min.js +++ b/components/prism-arduino.min.js @@ -1 +1 @@ -Prism.languages.arduino=Prism.languages.extend("cpp",{constant:/\b(?:ANALOG_MESSAGE|DEFAULT|DIGITAL_MESSAGE|EXTERNAL|FIRMATA_STRING|HIGH|INPUT|INPUT_PULLUP|INTERNAL|INTERNAL1V1|INTERNAL2V56|LED_BUILTIN|LOW|OUTPUT|REPORT_ANALOG|REPORT_DIGITAL|SET_PIN_MODE|SYSEX_START|SYSTEM_RESET)\b/,keyword:/\b(?:String|array|bool|boolean|break|byte|case|catch|continue|default|do|double|else|finally|for|function|goto|if|in|instanceof|int|integer|long|loop|new|null|return|setup|string|switch|throw|try|void|while|word)\b/,builtin:/\b(?:Audio|BSSID|Bridge|Client|Console|EEPROM|Esplora|EsploraTFT|Ethernet|EthernetClient|EthernetServer|EthernetUDP|File|FileIO|FileSystem|Firmata|GPRS|GSM|GSMBand|GSMClient|GSMModem|GSMPIN|GSMScanner|GSMServer|GSMVoiceCall|GSM_SMS|HttpClient|IPAddress|IRread|Keyboard|KeyboardController|LiquidCrystal|LiquidCrystal_I2C|Mailbox|Mouse|MouseController|PImage|Process|RSSI|RobotControl|RobotMotor|SD|SPI|SSID|Scheduler|Serial|Server|Servo|SoftwareSerial|Stepper|Stream|TFT|Task|USBHost|WiFi|WiFiClient|WiFiServer|WiFiUDP|Wire|YunClient|YunServer|abs|addParameter|analogRead|analogReadResolution|analogReference|analogWrite|analogWriteResolution|answerCall|attach|attachGPRS|attachInterrupt|attached|autoscroll|available|background|beep|begin|beginPacket|beginSD|beginSMS|beginSpeaker|beginTFT|beginTransmission|beginWrite|bit|bitClear|bitRead|bitSet|bitWrite|blink|blinkVersion|buffer|changePIN|checkPIN|checkPUK|checkReg|circle|cityNameRead|cityNameWrite|clear|clearScreen|click|close|compassRead|config|connect|connected|constrain|cos|countryNameRead|countryNameWrite|createChar|cursor|debugPrint|delay|delayMicroseconds|detach|detachInterrupt|digitalRead|digitalWrite|disconnect|display|displayLogos|drawBMP|drawCompass|encryptionType|end|endPacket|endSMS|endTransmission|endWrite|exists|exitValue|fill|find|findUntil|flush|gatewayIP|get|getAsynchronously|getBand|getButton|getCurrentCarrier|getIMEI|getKey|getModifiers|getOemKey|getPINUsed|getResult|getSignalStrength|getSocket|getVoiceCallStatus|getXChange|getYChange|hangCall|height|highByte|home|image|interrupts|isActionDone|isDirectory|isListening|isPIN|isPressed|isValid|keyPressed|keyReleased|keyboardRead|knobRead|leftToRight|line|lineFollowConfig|listen|listenOnLocalhost|loadImage|localIP|lowByte|macAddress|maintain|map|max|messageAvailable|micros|millis|min|mkdir|motorsStop|motorsWrite|mouseDragged|mouseMoved|mousePressed|mouseReleased|move|noAutoscroll|noBlink|noBuffer|noCursor|noDisplay|noFill|noInterrupts|noListenOnLocalhost|noStroke|noTone|onReceive|onRequest|open|openNextFile|overflow|parseCommand|parseFloat|parseInt|parsePacket|pauseMode|peek|pinMode|playFile|playMelody|point|pointTo|position|pow|prepare|press|print|printFirmwareVersion|printVersion|println|process|processInput|pulseIn|put|random|randomSeed|read|readAccelerometer|readBlue|readButton|readBytes|readBytesUntil|readGreen|readJoystickButton|readJoystickSwitch|readJoystickX|readJoystickY|readLightSensor|readMessage|readMicrophone|readNetworks|readRed|readSlider|readString|readStringUntil|readTemperature|ready|rect|release|releaseAll|remoteIP|remoteNumber|remotePort|remove|requestFrom|retrieveCallingNumber|rewindDirectory|rightToLeft|rmdir|robotNameRead|robotNameWrite|run|runAsynchronously|runShellCommand|runShellCommandAsynchronously|running|scanNetworks|scrollDisplayLeft|scrollDisplayRight|seek|sendAnalog|sendDigitalPortPair|sendDigitalPorts|sendString|sendSysex|serialEvent|setBand|setBitOrder|setClockDivider|setCursor|setDNS|setDataMode|setFirmwareVersion|setMode|setPINUsed|setSpeed|setTextSize|setTimeout|shiftIn|shiftOut|shutdown|sin|size|sqrt|startLoop|step|stop|stroke|subnetMask|switchPIN|tan|tempoWrite|text|tone|transfer|tuneWrite|turn|updateIR|userNameRead|userNameWrite|voiceCall|waitContinue|width|write|writeBlue|writeGreen|writeJSON|writeMessage|writeMicroseconds|writeRGB|writeRed|yield)\b/}); \ No newline at end of file +Prism.languages.arduino=Prism.languages.extend("cpp",{constant:/\b(?:ANALOG_MESSAGE|DEFAULT|DIGITAL_MESSAGE|EXTERNAL|FIRMATA_STRING|HIGH|INPUT|INPUT_PULLUP|INTERNAL|INTERNAL1V1|INTERNAL2V56|LED_BUILTIN|LOW|OUTPUT|REPORT_ANALOG|REPORT_DIGITAL|SET_PIN_MODE|SYSEX_START|SYSTEM_RESET)\b/,keyword:/\b(?:String|array|bool|boolean|break|byte|case|catch|continue|default|do|double|else|finally|for|function|goto|if|in|instanceof|int|integer|long|loop|new|null|return|setup|string|switch|throw|try|void|while|word)\b/,builtin:/\b(?:Audio|BSSID|Bridge|Client|Console|EEPROM|Esplora|EsploraTFT|Ethernet|EthernetClient|EthernetServer|EthernetUDP|File|FileIO|FileSystem|Firmata|GPRS|GSM|GSMBand|GSMClient|GSMModem|GSMPIN|GSMScanner|GSMServer|GSMVoiceCall|GSM_SMS|HttpClient|IPAddress|IRread|Keyboard|KeyboardController|LiquidCrystal|LiquidCrystal_I2C|Mailbox|Mouse|MouseController|PImage|Process|RSSI|RobotControl|RobotMotor|SD|SPI|SSID|Scheduler|Serial|Server|Servo|SoftwareSerial|Stepper|Stream|TFT|Task|USBHost|WiFi|WiFiClient|WiFiServer|WiFiUDP|Wire|YunClient|YunServer|abs|addParameter|analogRead|analogReadResolution|analogReference|analogWrite|analogWriteResolution|answerCall|attach|attachGPRS|attachInterrupt|attached|autoscroll|available|background|beep|begin|beginPacket|beginSD|beginSMS|beginSpeaker|beginTFT|beginTransmission|beginWrite|bit|bitClear|bitRead|bitSet|bitWrite|blink|blinkVersion|buffer|changePIN|checkPIN|checkPUK|checkReg|circle|cityNameRead|cityNameWrite|clear|clearScreen|click|close|compassRead|config|connect|connected|constrain|cos|countryNameRead|countryNameWrite|createChar|cursor|debugPrint|delay|delayMicroseconds|detach|detachInterrupt|digitalRead|digitalWrite|disconnect|display|displayLogos|drawBMP|drawCompass|encryptionType|end|endPacket|endSMS|endTransmission|endWrite|exists|exitValue|fill|find|findUntil|flush|gatewayIP|get|getAsynchronously|getBand|getButton|getCurrentCarrier|getIMEI|getKey|getModifiers|getOemKey|getPINUsed|getResult|getSignalStrength|getSocket|getVoiceCallStatus|getXChange|getYChange|hangCall|height|highByte|home|image|interrupts|isActionDone|isDirectory|isListening|isPIN|isPressed|isValid|keyPressed|keyReleased|keyboardRead|knobRead|leftToRight|line|lineFollowConfig|listen|listenOnLocalhost|loadImage|localIP|lowByte|macAddress|maintain|map|max|messageAvailable|micros|millis|min|mkdir|motorsStop|motorsWrite|mouseDragged|mouseMoved|mousePressed|mouseReleased|move|noAutoscroll|noBlink|noBuffer|noCursor|noDisplay|noFill|noInterrupts|noListenOnLocalhost|noStroke|noTone|onReceive|onRequest|open|openNextFile|overflow|parseCommand|parseFloat|parseInt|parsePacket|pauseMode|peek|pinMode|playFile|playMelody|point|pointTo|position|pow|prepare|press|print|printFirmwareVersion|printVersion|println|process|processInput|pulseIn|put|random|randomSeed|read|readAccelerometer|readBlue|readButton|readBytes|readBytesUntil|readGreen|readJoystickButton|readJoystickSwitch|readJoystickX|readJoystickY|readLightSensor|readMessage|readMicrophone|readNetworks|readRed|readSlider|readString|readStringUntil|readTemperature|ready|rect|release|releaseAll|remoteIP|remoteNumber|remotePort|remove|requestFrom|retrieveCallingNumber|rewindDirectory|rightToLeft|rmdir|robotNameRead|robotNameWrite|run|runAsynchronously|runShellCommand|runShellCommandAsynchronously|running|scanNetworks|scrollDisplayLeft|scrollDisplayRight|seek|sendAnalog|sendDigitalPortPair|sendDigitalPorts|sendString|sendSysex|serialEvent|setBand|setBitOrder|setClockDivider|setCursor|setDNS|setDataMode|setFirmwareVersion|setMode|setPINUsed|setSpeed|setTextSize|setTimeout|shiftIn|shiftOut|shutdown|sin|size|sqrt|startLoop|step|stop|stroke|subnetMask|switchPIN|tan|tempoWrite|text|tone|transfer|tuneWrite|turn|updateIR|userNameRead|userNameWrite|voiceCall|waitContinue|width|write|writeBlue|writeGreen|writeJSON|writeMessage|writeMicroseconds|writeRGB|writeRed|yield)\b/}),Prism.languages.ino=Prism.languages.arduino; \ No newline at end of file diff --git a/plugins/autoloader/prism-autoloader.js b/plugins/autoloader/prism-autoloader.js index c3fe286080..eaab16b686 100644 --- a/plugins/autoloader/prism-autoloader.js +++ b/plugins/autoloader/prism-autoloader.js @@ -175,6 +175,7 @@ "rss": "markup", "js": "javascript", "g4": "antlr4", + "ino": "arduino", "adoc": "asciidoc", "avs": "avisynth", "avdl": "avro-idl", diff --git a/plugins/autoloader/prism-autoloader.min.js b/plugins/autoloader/prism-autoloader.min.js index 1cc0963358..62645b3560 100644 --- a/plugins/autoloader/prism-autoloader.min.js +++ b/plugins/autoloader/prism-autoloader.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof Prism&&"undefined"!=typeof document){var l={javascript:"clike",actionscript:"javascript",apex:["clike","sql"],arduino:"cpp",aspnet:["markup","csharp"],birb:"clike",bison:"c",c:"clike",csharp:"clike",cpp:"c",cfscript:"clike",chaiscript:["clike","cpp"],coffeescript:"javascript",crystal:"ruby","css-extras":"css",d:"clike",dart:"clike",django:"markup-templating",ejs:["javascript","markup-templating"],etlua:["lua","markup-templating"],erb:["ruby","markup-templating"],fsharp:"clike","firestore-security-rules":"clike",flow:"javascript",ftl:"markup-templating",gml:"clike",glsl:"c",go:"clike",groovy:"clike",haml:"ruby",handlebars:"markup-templating",haxe:"clike",hlsl:"c",idris:"haskell",java:"clike",javadoc:["markup","java","javadoclike"],jolie:"clike",jsdoc:["javascript","javadoclike","typescript"],"js-extras":"javascript",json5:"json",jsonp:"json","js-templates":"javascript",kotlin:"clike",latte:["clike","markup-templating","php"],less:"css",lilypond:"scheme",liquid:"markup-templating",markdown:"markup","markup-templating":"markup",mongodb:"javascript",n4js:"javascript",objectivec:"c",opencl:"c",parser:"markup",php:"markup-templating",phpdoc:["php","javadoclike"],"php-extras":"php",plsql:"sql",processing:"clike",protobuf:"clike",pug:["markup","javascript"],purebasic:"clike",purescript:"haskell",qsharp:"clike",qml:"javascript",qore:"clike",racket:"scheme",cshtml:["markup","csharp"],jsx:["markup","javascript"],tsx:["jsx","typescript"],reason:"clike",ruby:"clike",sass:"css",scss:"css",scala:"java","shell-session":"bash",smarty:"markup-templating",solidity:"clike",soy:"markup-templating",sparql:"turtle",sqf:"clike",squirrel:"clike","t4-cs":["t4-templating","csharp"],"t4-vb":["t4-templating","vbnet"],tap:"yaml",tt2:["clike","markup-templating"],textile:"markup",twig:"markup",typescript:"javascript",v:"clike",vala:"clike",vbnet:"basic",velocity:"markup",wiki:"markup",xeora:"markup","xml-doc":"markup",xquery:"markup"},n={html:"markup",xml:"markup",svg:"markup",mathml:"markup",ssml:"markup",atom:"markup",rss:"markup",js:"javascript",g4:"antlr4",adoc:"asciidoc",avs:"avisynth",avdl:"avro-idl",shell:"bash",shortcode:"bbcode",rbnf:"bnf",oscript:"bsl",cs:"csharp",dotnet:"csharp",cfc:"cfscript",coffee:"coffeescript",conc:"concurnas",jinja2:"django","dns-zone":"dns-zone-file",dockerfile:"docker",gv:"dot",eta:"ejs",xlsx:"excel-formula",xls:"excel-formula",gamemakerlanguage:"gml",gni:"gn",hbs:"handlebars",hs:"haskell",idr:"idris",gitignore:"ignore",hgignore:"ignore",npmignore:"ignore",webmanifest:"json",kt:"kotlin",kts:"kotlin",kum:"kumir",tex:"latex",context:"latex",ly:"lilypond",emacs:"lisp",elisp:"lisp","emacs-lisp":"lisp",md:"markdown",moon:"moonscript",n4jsd:"n4js",nani:"naniscript",objc:"objectivec",qasm:"openqasm",objectpascal:"pascal",px:"pcaxis",pcode:"peoplecode",pq:"powerquery",mscript:"powerquery",pbfasm:"purebasic",purs:"purescript",py:"python",qs:"qsharp",rkt:"racket",razor:"cshtml",rpy:"renpy",robot:"robotframework",rb:"ruby","sh-session":"shell-session",shellsession:"shell-session",smlnj:"sml",sol:"solidity",sln:"solution-file",rq:"sparql",t4:"t4-cs",trickle:"tremor",troy:"tremor",trig:"turtle",ts:"typescript",tsconfig:"typoscript",uscript:"unrealscript",uc:"unrealscript",url:"uri",vb:"visual-basic",vba:"visual-basic",mathematica:"wolfram",nb:"wolfram",wl:"wolfram",xeoracube:"xeora",yml:"yaml"},p={},e="components/",a=Prism.util.currentScript();if(a){var r=/\bplugins\/autoloader\/prism-autoloader\.(?:min\.)?js(?:\?[^\r\n/]*)?$/i,s=/(^|\/)[\w-]+\.(?:min\.)?js(?:\?[^\r\n/]*)?$/i,i=a.getAttribute("data-autoloader-path");if(null!=i)e=i.trim().replace(/\/?$/,"/");else{var t=a.src;r.test(t)?e=t.replace(r,"components/"):s.test(t)&&(e=t.replace(s,"$1components/"))}}var o=Prism.plugins.autoloader={languages_path:e,use_minified:!0,loadLanguages:u};Prism.hooks.add("complete",function(e){var a=e.element,r=e.language;if(a&&r&&"none"!==r){var s=function(e){var a=(e.getAttribute("data-dependencies")||"").trim();if(!a){var r=e.parentElement;r&&"pre"===r.tagName.toLowerCase()&&(a=(r.getAttribute("data-dependencies")||"").trim())}return a?a.split(/\s*,\s*/g):[]}(a);/^diff-./i.test(r)?(s.push("diff"),s.push(r.substr("diff-".length))):s.push(r),s.every(m)||u(s,function(){Prism.highlightElement(a)})}})}function m(e){if(0<=e.indexOf("!"))return!1;if((e=n[e]||e)in Prism.languages)return!0;var a=p[e];return a&&!a.error&&!1===a.loading}function u(e,a,r){"string"==typeof e&&(e=[e]);var s=e.length,i=0,t=!1;function c(){t||++i===s&&a&&a(e)}0!==s?e.forEach(function(e){!function(a,r,s){var i=0<=a.indexOf("!");function e(){var e=p[a];e||(e=p[a]={callbacks:[]}),e.callbacks.push({success:r,error:s}),!i&&m(a)?k(a,"success"):!i&&e.error?k(a,"error"):!i&&e.loading||(e.loading=!0,e.error=!1,function(e,a,r){var s=document.createElement("script");s.src=e,s.async=!0,s.onload=function(){document.body.removeChild(s),a&&a()},s.onerror=function(){document.body.removeChild(s),r&&r()},document.body.appendChild(s)}(function(e){return o.languages_path+"prism-"+e+(o.use_minified?".min":"")+".js"}(a),function(){e.loading=!1,k(a,"success")},function(){e.loading=!1,e.error=!0,k(a,"error")}))}a=a.replace("!",""),a=n[a]||a;var t=l[a];t&&t.length?u(t,e,s):e()}(e,c,function(){t||(t=!0,r&&r(e))})}):a&&setTimeout(a,0)}function k(e,a){if(p[e]){for(var r=p[e].callbacks,s=0,i=r.length;s Date: Mon, 4 Oct 2021 14:06:12 +0200 Subject: [PATCH 0922/1100] Added minified CSS (#3073) Co-authored-by: ashwinjayan --- assets/download.js | 3 +- gulpfile.js/index.js | 12 +++-- gulpfile.js/paths.js | 2 + package-lock.json | 52 +++++++++++++++++++ package.json | 1 + plugins/autolinker/prism-autolinker.min.css | 1 + .../command-line/prism-command-line.min.css | 1 + .../prism-diff-highlight.min.css | 1 + .../inline-color/prism-inline-color.min.css | 1 + .../prism-line-highlight.min.css | 1 + .../line-numbers/prism-line-numbers.min.css | 1 + .../match-braces/prism-match-braces.min.css | 1 + plugins/previewers/prism-previewers.min.css | 1 + .../prism-show-invisibles.min.css | 1 + plugins/toolbar/prism-toolbar.min.css | 1 + plugins/treeview/prism-treeview.min.css | 1 + .../prism-unescaped-markup.min.css | 1 + plugins/wpd/prism-wpd.min.css | 1 + themes/prism-coy.min.css | 1 + themes/prism-dark.min.css | 1 + themes/prism-funky.min.css | 1 + themes/prism-okaidia.min.css | 1 + themes/prism-solarizedlight.min.css | 1 + themes/prism-tomorrow.min.css | 1 + themes/prism-twilight.min.css | 1 + themes/prism.min.css | 1 + 26 files changed, 87 insertions(+), 4 deletions(-) create mode 100644 plugins/autolinker/prism-autolinker.min.css create mode 100644 plugins/command-line/prism-command-line.min.css create mode 100644 plugins/diff-highlight/prism-diff-highlight.min.css create mode 100644 plugins/inline-color/prism-inline-color.min.css create mode 100644 plugins/line-highlight/prism-line-highlight.min.css create mode 100644 plugins/line-numbers/prism-line-numbers.min.css create mode 100644 plugins/match-braces/prism-match-braces.min.css create mode 100644 plugins/previewers/prism-previewers.min.css create mode 100644 plugins/show-invisibles/prism-show-invisibles.min.css create mode 100644 plugins/toolbar/prism-toolbar.min.css create mode 100644 plugins/treeview/prism-treeview.min.css create mode 100644 plugins/unescaped-markup/prism-unescaped-markup.min.css create mode 100644 plugins/wpd/prism-wpd.min.css create mode 100644 themes/prism-coy.min.css create mode 100644 themes/prism-dark.min.css create mode 100644 themes/prism-funky.min.css create mode 100644 themes/prism-okaidia.min.css create mode 100644 themes/prism-solarizedlight.min.css create mode 100644 themes/prism-tomorrow.min.css create mode 100644 themes/prism-twilight.min.css create mode 100644 themes/prism.min.css diff --git a/assets/download.js b/assets/download.js index 1009db05f8..9e880c106d 100644 --- a/assets/download.js +++ b/assets/download.js @@ -181,8 +181,9 @@ if ((!all[id].noCSS && !/\.js$/.test(filepath)) || /\.css$/.test(filepath)) { var cssFile = filepath.replace(/(\.css)?$/, '.css'); + var minCSSFile = cssFile.replace(/(?:\.css)$/, '.min.css'); - info.files.minified.paths.push(cssFile); + info.files.minified.paths.push(minCSSFile); info.files.dev.paths.push(cssFile); } diff --git a/gulpfile.js/index.js b/gulpfile.js/index.js index 93b61b1a62..be62e8175e 100644 --- a/gulpfile.js/index.js +++ b/gulpfile.js/index.js @@ -7,6 +7,7 @@ const uglify = require('gulp-uglify'); const header = require('gulp-header'); const concat = require('gulp-concat'); const replace = require('gulp-replace'); +const cleanCSS = require('gulp-clean-css'); const webfont = require('webfont').default; const pump = require('pump'); const util = require('util'); @@ -70,6 +71,12 @@ function minifyComponents(cb) { function minifyPlugins(cb) { pump([src(paths.plugins), ...minifyJS(), rename({ suffix: '.min' }), dest('plugins')], cb); } +function minifyPluginCSS(cb) { + pump([src(paths.pluginsCSS), cleanCSS(), rename({ suffix: '.min' }), dest('plugins')], cb); +} +function minifyThemes(cb) { + pump([src(paths.themes), cleanCSS(), rename({ suffix: '.min' }), dest('themes')], cb); +} function build(cb) { pump([src(paths.main), header(` /* ********************************************** @@ -278,12 +285,11 @@ async function treeviewIconFont() { } const components = minifyComponents; -const plugins = series(languagePlugins, treeviewIconFont, minifyPlugins); - +const plugins = series(languagePlugins, treeviewIconFont, minifyPlugins, minifyPluginCSS); module.exports = { watch: watchComponentsAndPlugins, - default: series(parallel(components, plugins, componentsJsonToJs, build), docs), + default: series(parallel(components, plugins, minifyThemes, componentsJsonToJs, build), docs), linkify, changes }; diff --git a/gulpfile.js/paths.js b/gulpfile.js/paths.js index 9ce69ed561..4f8389d1bc 100644 --- a/gulpfile.js/paths.js +++ b/gulpfile.js/paths.js @@ -4,6 +4,7 @@ module.exports = { componentsFile: 'components.json', componentsFileJS: 'components.js', components: ['components/**/*.js', '!components/index.js', '!components/**/*.min.js'], + themes: ['themes/*.css', '!themes/*.min.css'], main: [ 'components/prism-core.js', 'components/prism-markup.js', @@ -13,6 +14,7 @@ module.exports = { 'plugins/file-highlight/prism-file-highlight.js' ], plugins: ['plugins/**/*.js', '!plugins/**/*.min.js'], + pluginsCSS: ['plugins/**/*.css', '!plugins/**/*.min.css'], showLanguagePlugin: 'plugins/show-language/prism-show-language.js', autoloaderPlugin: 'plugins/autoloader/prism-autoloader.js', changelog: 'CHANGELOG.md' diff --git a/package-lock.json b/package-lock.json index f03cb71685..97d4410f94 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1198,6 +1198,23 @@ } } }, + "clean-css": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-4.2.3.tgz", + "integrity": "sha512-VcMWDN54ZN/DS+g58HYL5/n4Zrqe8vHJpGA8KdgUXFU4fuP/aHNw8eld9SyEIyabIMJX/0RaY/fplOo5hYLSFA==", + "dev": true, + "requires": { + "source-map": "~0.6.0" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } + } + }, "cliui": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", @@ -3322,6 +3339,29 @@ } } }, + "gulp-clean-css": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/gulp-clean-css/-/gulp-clean-css-4.3.0.tgz", + "integrity": "sha512-mGyeT3qqFXTy61j0zOIciS4MkYziF2U594t2Vs9rUnpkEHqfu6aDITMp8xOvZcvdX61Uz3y1mVERRYmjzQF5fg==", + "dev": true, + "requires": { + "clean-css": "4.2.3", + "plugin-error": "1.0.1", + "through2": "3.0.1", + "vinyl-sourcemaps-apply": "0.2.1" + }, + "dependencies": { + "through2": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/through2/-/through2-3.0.1.tgz", + "integrity": "sha512-M96dvTalPT3YbYLaKaCuwu+j06D/8Jfib0o/PxbVt6Amhv3dUAtW6rTV1jPgJSBG83I/e04Y6xkVdVhSRhi0ww==", + "dev": true, + "requires": { + "readable-stream": "2 || 3" + } + } + } + }, "gulp-concat": { "version": "2.6.1", "resolved": "https://registry.npmjs.org/gulp-concat/-/gulp-concat-2.6.1.tgz", @@ -5981,6 +6021,18 @@ "integrity": "sha512-fnWVljUchTro6RiCFvCXBbNhJc2NijN7oIQxbwsyL0buWJPG85v81ehlHI9fXrJsMNgTofEoWIQeClKpgxFLrg==", "dev": true }, + "plugin-error": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/plugin-error/-/plugin-error-1.0.1.tgz", + "integrity": "sha512-L1zP0dk7vGweZME2i+EeakvUNqSrdiI3F91TwEoYiGrAfUXmVv6fJIq4g82PAXxNsWOp0J7ZqQy/3Szz0ajTxA==", + "dev": true, + "requires": { + "ansi-colors": "^1.0.1", + "arr-diff": "^4.0.0", + "arr-union": "^3.1.0", + "extend-shallow": "^3.0.2" + } + }, "pn": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/pn/-/pn-1.1.0.tgz", diff --git a/package.json b/package.json index a094e749b8..a22bf13e1f 100755 --- a/package.json +++ b/package.json @@ -44,6 +44,7 @@ "eslint-plugin-jsdoc": "^32.3.0", "eslint-plugin-regexp": "^1.2.0", "gulp": "^4.0.2", + "gulp-clean-css": "^4.3.0", "gulp-concat": "^2.3.4", "gulp-header": "^2.0.7", "gulp-jsdoc3": "^3.0.0", diff --git a/plugins/autolinker/prism-autolinker.min.css b/plugins/autolinker/prism-autolinker.min.css new file mode 100644 index 0000000000..3c54381d78 --- /dev/null +++ b/plugins/autolinker/prism-autolinker.min.css @@ -0,0 +1 @@ +.token a{color:inherit} \ No newline at end of file diff --git a/plugins/command-line/prism-command-line.min.css b/plugins/command-line/prism-command-line.min.css new file mode 100644 index 0000000000..97b41d587e --- /dev/null +++ b/plugins/command-line/prism-command-line.min.css @@ -0,0 +1 @@ +.command-line-prompt{border-right:1px solid #999;display:block;float:left;font-size:100%;letter-spacing:-1px;margin-right:1em;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.command-line-prompt>span:before{color:#999;content:' ';display:block;padding-right:.8em}.command-line-prompt>span[data-user]:before{content:"[" attr(data-user) "@" attr(data-host) "] $"}.command-line-prompt>span[data-user=root]:before{content:"[" attr(data-user) "@" attr(data-host) "] #"}.command-line-prompt>span[data-prompt]:before{content:attr(data-prompt)} \ No newline at end of file diff --git a/plugins/diff-highlight/prism-diff-highlight.min.css b/plugins/diff-highlight/prism-diff-highlight.min.css new file mode 100644 index 0000000000..9b8f6a7528 --- /dev/null +++ b/plugins/diff-highlight/prism-diff-highlight.min.css @@ -0,0 +1 @@ +pre.diff-highlight>code .token.deleted:not(.prefix),pre>code.diff-highlight .token.deleted:not(.prefix){background-color:rgba(255,0,0,.1);color:inherit;display:block}pre.diff-highlight>code .token.inserted:not(.prefix),pre>code.diff-highlight .token.inserted:not(.prefix){background-color:rgba(0,255,128,.1);color:inherit;display:block} \ No newline at end of file diff --git a/plugins/inline-color/prism-inline-color.min.css b/plugins/inline-color/prism-inline-color.min.css new file mode 100644 index 0000000000..c161187fe4 --- /dev/null +++ b/plugins/inline-color/prism-inline-color.min.css @@ -0,0 +1 @@ +span.inline-color-wrapper{background:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyIDIiPjxwYXRoIGZpbGw9ImdyYXkiIGQ9Ik0wIDBoMnYySDB6Ii8+PHBhdGggZmlsbD0id2hpdGUiIGQ9Ik0wIDBoMXYxSDB6TTEgMWgxdjFIMXoiLz48L3N2Zz4=);background-position:center;background-size:110%;display:inline-block;height:1.333ch;width:1.333ch;margin:0 .333ch;box-sizing:border-box;border:1px solid #fff;outline:1px solid rgba(0,0,0,.5);overflow:hidden}span.inline-color{display:block;height:120%;width:120%} \ No newline at end of file diff --git a/plugins/line-highlight/prism-line-highlight.min.css b/plugins/line-highlight/prism-line-highlight.min.css new file mode 100644 index 0000000000..6cd87723b4 --- /dev/null +++ b/plugins/line-highlight/prism-line-highlight.min.css @@ -0,0 +1 @@ +pre[data-line]{position:relative;padding:1em 0 1em 3em}.line-highlight{position:absolute;left:0;right:0;padding:inherit 0;margin-top:1em;background:hsla(24,20%,50%,.08);background:linear-gradient(to right,hsla(24,20%,50%,.1) 70%,hsla(24,20%,50%,0));pointer-events:none;line-height:inherit;white-space:pre}@media print{.line-highlight{-webkit-print-color-adjust:exact;color-adjust:exact}}.line-highlight:before,.line-highlight[data-end]:after{content:attr(data-start);position:absolute;top:.4em;left:.6em;min-width:1em;padding:0 .5em;background-color:hsla(24,20%,50%,.4);color:#f4f1ef;font:bold 65%/1.5 sans-serif;text-align:center;vertical-align:.3em;border-radius:999px;text-shadow:none;box-shadow:0 1px #fff}.line-highlight[data-end]:after{content:attr(data-end);top:auto;bottom:.4em}.line-numbers .line-highlight:after,.line-numbers .line-highlight:before{content:none}pre[id].linkable-line-numbers span.line-numbers-rows{pointer-events:all}pre[id].linkable-line-numbers span.line-numbers-rows>span:before{cursor:pointer}pre[id].linkable-line-numbers span.line-numbers-rows>span:hover:before{background-color:rgba(128,128,128,.2)} \ No newline at end of file diff --git a/plugins/line-numbers/prism-line-numbers.min.css b/plugins/line-numbers/prism-line-numbers.min.css new file mode 100644 index 0000000000..8170f64670 --- /dev/null +++ b/plugins/line-numbers/prism-line-numbers.min.css @@ -0,0 +1 @@ +pre[class*=language-].line-numbers{position:relative;padding-left:3.8em;counter-reset:linenumber}pre[class*=language-].line-numbers>code{position:relative;white-space:inherit}.line-numbers .line-numbers-rows{position:absolute;pointer-events:none;top:0;font-size:100%;left:-3.8em;width:3em;letter-spacing:-1px;border-right:1px solid #999;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.line-numbers-rows>span{display:block;counter-increment:linenumber}.line-numbers-rows>span:before{content:counter(linenumber);color:#999;display:block;padding-right:.8em;text-align:right} \ No newline at end of file diff --git a/plugins/match-braces/prism-match-braces.min.css b/plugins/match-braces/prism-match-braces.min.css new file mode 100644 index 0000000000..367b166b5a --- /dev/null +++ b/plugins/match-braces/prism-match-braces.min.css @@ -0,0 +1 @@ +.token.punctuation.brace-hover,.token.punctuation.brace-selected{outline:solid 1px}.rainbow-braces .token.punctuation.brace-level-1,.rainbow-braces .token.punctuation.brace-level-5,.rainbow-braces .token.punctuation.brace-level-9{color:#e50;opacity:1}.rainbow-braces .token.punctuation.brace-level-10,.rainbow-braces .token.punctuation.brace-level-2,.rainbow-braces .token.punctuation.brace-level-6{color:#0b3;opacity:1}.rainbow-braces .token.punctuation.brace-level-11,.rainbow-braces .token.punctuation.brace-level-3,.rainbow-braces .token.punctuation.brace-level-7{color:#26f;opacity:1}.rainbow-braces .token.punctuation.brace-level-12,.rainbow-braces .token.punctuation.brace-level-4,.rainbow-braces .token.punctuation.brace-level-8{color:#e0e;opacity:1} \ No newline at end of file diff --git a/plugins/previewers/prism-previewers.min.css b/plugins/previewers/prism-previewers.min.css new file mode 100644 index 0000000000..8ba1b5b301 --- /dev/null +++ b/plugins/previewers/prism-previewers.min.css @@ -0,0 +1 @@ +.prism-previewer,.prism-previewer:after,.prism-previewer:before{position:absolute;pointer-events:none}.prism-previewer,.prism-previewer:after{left:50%}.prism-previewer{margin-top:-48px;width:32px;height:32px;margin-left:-16px;z-index:10;opacity:0;-webkit-transition:opacity .25s;-o-transition:opacity .25s;transition:opacity .25s}.prism-previewer.flipped{margin-top:0;margin-bottom:-48px}.prism-previewer:after,.prism-previewer:before{content:'';position:absolute;pointer-events:none}.prism-previewer:before{top:-5px;right:-5px;left:-5px;bottom:-5px;border-radius:10px;border:5px solid #fff;box-shadow:0 0 3px rgba(0,0,0,.5) inset,0 0 10px rgba(0,0,0,.75)}.prism-previewer:after{top:100%;width:0;height:0;margin:5px 0 0 -7px;border:7px solid transparent;border-color:rgba(255,0,0,0);border-top-color:#fff}.prism-previewer.flipped:after{top:auto;bottom:100%;margin-top:0;margin-bottom:5px;border-top-color:rgba(255,0,0,0);border-bottom-color:#fff}.prism-previewer.active{opacity:1}.prism-previewer-angle:before{border-radius:50%;background:#fff}.prism-previewer-angle:after{margin-top:4px}.prism-previewer-angle svg{width:32px;height:32px;-webkit-transform:rotate(-90deg);-moz-transform:rotate(-90deg);-ms-transform:rotate(-90deg);-o-transform:rotate(-90deg);transform:rotate(-90deg)}.prism-previewer-angle[data-negative] svg{-webkit-transform:scaleX(-1) rotate(-90deg);-moz-transform:scaleX(-1) rotate(-90deg);-ms-transform:scaleX(-1) rotate(-90deg);-o-transform:scaleX(-1) rotate(-90deg);transform:scaleX(-1) rotate(-90deg)}.prism-previewer-angle circle{fill:transparent;stroke:#2d3438;stroke-opacity:.9;stroke-width:32;stroke-dasharray:0,500}.prism-previewer-gradient{background-image:linear-gradient(45deg,#bbb 25%,transparent 25%,transparent 75%,#bbb 75%,#bbb),linear-gradient(45deg,#bbb 25%,#eee 25%,#eee 75%,#bbb 75%,#bbb);background-size:10px 10px;background-position:0 0,5px 5px;width:64px;margin-left:-32px}.prism-previewer-gradient:before{content:none}.prism-previewer-gradient div{position:absolute;top:-5px;left:-5px;right:-5px;bottom:-5px;border-radius:10px;border:5px solid #fff;box-shadow:0 0 3px rgba(0,0,0,.5) inset,0 0 10px rgba(0,0,0,.75)}.prism-previewer-color{background-image:linear-gradient(45deg,#bbb 25%,transparent 25%,transparent 75%,#bbb 75%,#bbb),linear-gradient(45deg,#bbb 25%,#eee 25%,#eee 75%,#bbb 75%,#bbb);background-size:10px 10px;background-position:0 0,5px 5px}.prism-previewer-color:before{background-color:inherit;background-clip:padding-box}.prism-previewer-easing{margin-top:-76px;margin-left:-30px;width:60px;height:60px;background:#333}.prism-previewer-easing.flipped{margin-bottom:-116px}.prism-previewer-easing svg{width:60px;height:60px}.prism-previewer-easing circle{fill:#2d3438;stroke:#fff}.prism-previewer-easing path{fill:none;stroke:#fff;stroke-linecap:round;stroke-width:4}.prism-previewer-easing line{stroke:#fff;stroke-opacity:.5;stroke-width:2}@-webkit-keyframes prism-previewer-time{0%{stroke-dasharray:0,500;stroke-dashoffset:0}50%{stroke-dasharray:100,500;stroke-dashoffset:0}100%{stroke-dasharray:0,500;stroke-dashoffset:-100}}@-o-keyframes prism-previewer-time{0%{stroke-dasharray:0,500;stroke-dashoffset:0}50%{stroke-dasharray:100,500;stroke-dashoffset:0}100%{stroke-dasharray:0,500;stroke-dashoffset:-100}}@-moz-keyframes prism-previewer-time{0%{stroke-dasharray:0,500;stroke-dashoffset:0}50%{stroke-dasharray:100,500;stroke-dashoffset:0}100%{stroke-dasharray:0,500;stroke-dashoffset:-100}}@keyframes prism-previewer-time{0%{stroke-dasharray:0,500;stroke-dashoffset:0}50%{stroke-dasharray:100,500;stroke-dashoffset:0}100%{stroke-dasharray:0,500;stroke-dashoffset:-100}}.prism-previewer-time:before{border-radius:50%;background:#fff}.prism-previewer-time:after{margin-top:4px}.prism-previewer-time svg{width:32px;height:32px;-webkit-transform:rotate(-90deg);-moz-transform:rotate(-90deg);-ms-transform:rotate(-90deg);-o-transform:rotate(-90deg);transform:rotate(-90deg)}.prism-previewer-time circle{fill:transparent;stroke:#2d3438;stroke-opacity:.9;stroke-width:32;stroke-dasharray:0,500;stroke-dashoffset:0;-webkit-animation:prism-previewer-time linear infinite 3s;-moz-animation:prism-previewer-time linear infinite 3s;-o-animation:prism-previewer-time linear infinite 3s;animation:prism-previewer-time linear infinite 3s} \ No newline at end of file diff --git a/plugins/show-invisibles/prism-show-invisibles.min.css b/plugins/show-invisibles/prism-show-invisibles.min.css new file mode 100644 index 0000000000..0e2b048b90 --- /dev/null +++ b/plugins/show-invisibles/prism-show-invisibles.min.css @@ -0,0 +1 @@ +.token.cr,.token.lf,.token.space,.token.tab:not(:empty){position:relative}.token.cr:before,.token.lf:before,.token.space:before,.token.tab:not(:empty):before{color:grey;opacity:.6;position:absolute}.token.tab:not(:empty):before{content:'\21E5'}.token.cr:before{content:'\240D'}.token.crlf:before{content:'\240D\240A'}.token.lf:before{content:'\240A'}.token.space:before{content:'\00B7'} \ No newline at end of file diff --git a/plugins/toolbar/prism-toolbar.min.css b/plugins/toolbar/prism-toolbar.min.css new file mode 100644 index 0000000000..da433d2d7a --- /dev/null +++ b/plugins/toolbar/prism-toolbar.min.css @@ -0,0 +1 @@ +div.code-toolbar{position:relative}div.code-toolbar>.toolbar{position:absolute;top:.3em;right:.2em;transition:opacity .3s ease-in-out;opacity:0}div.code-toolbar:hover>.toolbar{opacity:1}div.code-toolbar:focus-within>.toolbar{opacity:1}div.code-toolbar>.toolbar>.toolbar-item{display:inline-block}div.code-toolbar>.toolbar>.toolbar-item>a{cursor:pointer}div.code-toolbar>.toolbar>.toolbar-item>button{background:0 0;border:0;color:inherit;font:inherit;line-height:normal;overflow:visible;padding:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none}div.code-toolbar>.toolbar>.toolbar-item>a,div.code-toolbar>.toolbar>.toolbar-item>button,div.code-toolbar>.toolbar>.toolbar-item>span{color:#bbb;font-size:.8em;padding:0 .5em;background:#f5f2f0;background:rgba(224,224,224,.2);box-shadow:0 2px 0 0 rgba(0,0,0,.2);border-radius:.5em}div.code-toolbar>.toolbar>.toolbar-item>a:focus,div.code-toolbar>.toolbar>.toolbar-item>a:hover,div.code-toolbar>.toolbar>.toolbar-item>button:focus,div.code-toolbar>.toolbar>.toolbar-item>button:hover,div.code-toolbar>.toolbar>.toolbar-item>span:focus,div.code-toolbar>.toolbar>.toolbar-item>span:hover{color:inherit;text-decoration:none} \ No newline at end of file diff --git a/plugins/treeview/prism-treeview.min.css b/plugins/treeview/prism-treeview.min.css new file mode 100644 index 0000000000..9856725d67 --- /dev/null +++ b/plugins/treeview/prism-treeview.min.css @@ -0,0 +1 @@ +.token.treeview-part .entry-line{position:relative;text-indent:-99em;display:inline-block;vertical-align:top;width:1.2em}.token.treeview-part .entry-line:before,.token.treeview-part .line-h:after{content:"";position:absolute;top:0;left:50%;width:50%;height:100%}.token.treeview-part .line-h:before,.token.treeview-part .line-v:before{border-left:1px solid #ccc}.token.treeview-part .line-v-last:before{height:50%;border-left:1px solid #ccc;border-bottom:1px solid #ccc}.token.treeview-part .line-h:after{height:50%;border-bottom:1px solid #ccc}.token.treeview-part .entry-name{position:relative;display:inline-block;vertical-align:top}.token.treeview-part .entry-name.dotfile{opacity:.5}@font-face{font-family:PrismTreeview;src:url(data:application/font-woff;base64,d09GRgABAAAAAAgYAAsAAAAAEGAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAADsAAABUIIslek9TLzIAAAFEAAAAPwAAAFY1UkH9Y21hcAAAAYQAAAB/AAACCtvO7yxnbHlmAAACBAAAA+MAAAlACm1VqmhlYWQAAAXoAAAAKgAAADZfxj5jaGhlYQAABhQAAAAYAAAAJAFbAMFobXR4AAAGLAAAAA4AAAA0CGQAAGxvY2EAAAY8AAAAHAAAABwM9A9CbWF4cAAABlgAAAAfAAAAIAEgAHZuYW1lAAAGeAAAATcAAAJSfUrk+HBvc3QAAAewAAAAZgAAAIka0DSfeJxjYGRgYOBiMGCwY2BycfMJYeDLSSzJY5BiYGGAAJA8MpsxJzM9kYEDxgPKsYBpDiBmg4gCACY7BUgAeJxjYGRYyjiBgZWBgaGQoRZISkLpUAYOBj0GBiYGVmYGrCAgzTWFweEV4ysehs1ArgDDFgZGIA3CDAB2tQjAAHic7ZHLEcMwCESfLCz/VEoKSEE5parURxMOC4c0Ec283WGFdABgBXrwCAzam4bOK9KWeefM3Hhmjyn3ed+hTRq1pS7Ra/HjYGPniHcXMy4G/zNTP7/KW5HTXArkvdBW3ArN19dCG/NRIN8K5HuB/CiQn4U26VeBfBbML9NEH78AeJyVVc1u20YQ3pn905JcSgr/YsuSDTEg3cR1bFEkYyS1HQcQ2jQF2hot6vYSoECKnnPLA/SWUy9NTr31Bfp+6azsNI0SGiolzu7ODnfn+2Z2lnHG3rxhr9nfLGKbLGesncAYYnUHpsVnMG/uwyzNdFIVd6HI6twp8+R3LpT4TSglLoTHwwJgG2/dFvKrl9yI507/p5CCq4LTxB/PlPjkFaMHnWB/0S9je7RTPS+utnGtom1T2q5pk/e3H0M1S18rsXAL7wgpxQuhAmteGGvNjmcfGXuwnFNOPCXxeOGmnjrBLWNyBeNtVq2Hs03yus1aPS3mzSyNVSfu588iW1Q93x/4fjcHn+5EkS2tMxr4xIRa8ese+4L9uKZnxEqs8+ldyN9atU02a5t5uQ8hZGms1QTKpaKYqnipiNNOAIeIADC0JNEOYY+jtSgFoOchiAjRGFACpUTRje8bwIYWGCDEgENY8MEu9bnCYCdAxftoNg0KiSpUtPaHcanYwzXRu6T4r40b5npal3V7UHWCPJW9niyl1vIHgoujEXZjudBkeWkOeMQBRmbEPhKzij1i52t6/TadL+3q7H0U1eq4E8cG4gIIwQLx8VX7ToPXgPrehVc5QXHR7gMSmwjKfaYAP4KvZV+yn9bE18y2IY37LvtyrSg3i7ZK++B603ndlg/gBJpZRsfpBI6hyiaQ6FjlnThz8lAC3LgBIMnXDOAXxBQ4SIgiEhx2AcGCAwAhwjXRpCQms42bwAUt75BvAwgONzdgOfWEwzk4Ylzj4mz+5YEzzXzWX9aNlk7ot65y5QnBHsNlm6zDTu7sspRqG4V+fgJ1lVBZ07Nm7s5nemo3Lf3PO7iwtnroQ5/YDGwPRUip6fV6L+27p+wCHwSvPs85UnHqId8NAn5IBsKdv95KrL9m31Gsf2a/rluDslk1y1J9GE+LUmmVT/OyOHaFKGnapt2H5XeJTmKd6qYNoVVZOy+pWzr7rMip3ndG/4mQSoUcMbAqG/YNIAdXhkAqTVruXhocSKN0iS4Rwj7vSS4fcF/La07BfeQSuRAcFeW+9igjwPhhYPpGCBCBHhxiKMyFMFT7ziRH7RtfIWdiha+TdW+Rqs7bLHdN2ZJIKl0um0x3op9saYr0REeRdj09pl43pMzz4tjztrY8L4o8bzT+oLY27PR/eFtXs/YY5vtwB5Iqad14eYN0ujveMaGWqkdU3TKbQSC5Uvxaf4fA7SAQ3r2tEfIhd4duld91bwMisjqBw22orthNcroXl7KqO1329HBgAexgoCfGAwiDPoBnriki3lmNojrzvD0tjo6E3vPYP6E2BMIAeJxjYGRgYADiY8t3FsTz23xl4GbYzIAB/v9nWM6wBcjgYGAC8QH+QQhZAAB4nGNgZGBg2MzAACeXMzAyoAJeADPyAh14nGNgAILNpGEA0fgIZQAAAAAAAAA2AHIAvgE+AZgCCAKMAv4DlgPsBEYEoHicY2BkYGDgZchi4GQAASYg5gJCBob/YD4DABTSAZcAeJx9kU1uwjAQhV/4qwpqhdSqi67cTTeVEmBXDgBbhBD7AHYISuLUMSD2PUdP0HNwjp6i676k3qQS9Ujjb968mYUNoI8zPJTHw02Vy9PAFatfbpLuHbfIT47b6MF33KH+6riLF0wc93CHN27wWtdUHvHuuIFbfDhuUv903CKfHbfxgC/HHerfjrtYen3HPTx7ambiIl0YKQ+xPM5ltE9CU9NqxVKaItaZGPqDmj6VmTShlRuxOoniEI2sVUIZnYqJzqxMEi1yo3dybf2ttfk4CJTT/bVOMYNBjAIpFiTJOLCWOGLOHGGPBCE7l32XO0tmw04MjQwCQ7774B//lDmrZkJY3hvOrHBiLuiJMKJqoVgrejQ3CP5Yubt0JwxNJa96Oypr6j621VSOMQKG+uP36eKmHylcb0MAeJxtwdEOgjAMBdBeWEFR/Mdl7bTJtMsygc/nwVfPoYF+QP+tGDAigDFhxgVXLLjhjhUPCtmKTtmLaGN7x6dy/Io5bybqoevRQ3LRObb0sk3HKpn1SFqW6ru26vbpYfcmRCccJhqsAAA=) format("woff")}.token.treeview-part .entry-name:before{content:"\ea01";font-family:PrismTreeview;font-size:inherit;font-style:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;width:2.5ex;display:inline-block}.token.treeview-part .entry-name.dir:before{content:"\ea02"}.token.treeview-part .entry-name.ext-bmp:before,.token.treeview-part .entry-name.ext-eps:before,.token.treeview-part .entry-name.ext-gif:before,.token.treeview-part .entry-name.ext-jpe:before,.token.treeview-part .entry-name.ext-jpeg:before,.token.treeview-part .entry-name.ext-jpg:before,.token.treeview-part .entry-name.ext-png:before,.token.treeview-part .entry-name.ext-svg:before,.token.treeview-part .entry-name.ext-tiff:before{content:"\ea03"}.token.treeview-part .entry-name.ext-cfg:before,.token.treeview-part .entry-name.ext-conf:before,.token.treeview-part .entry-name.ext-config:before,.token.treeview-part .entry-name.ext-csv:before,.token.treeview-part .entry-name.ext-ini:before,.token.treeview-part .entry-name.ext-log:before,.token.treeview-part .entry-name.ext-md:before,.token.treeview-part .entry-name.ext-nfo:before,.token.treeview-part .entry-name.ext-txt:before{content:"\ea06"}.token.treeview-part .entry-name.ext-asp:before,.token.treeview-part .entry-name.ext-aspx:before,.token.treeview-part .entry-name.ext-c:before,.token.treeview-part .entry-name.ext-cc:before,.token.treeview-part .entry-name.ext-cpp:before,.token.treeview-part .entry-name.ext-cs:before,.token.treeview-part .entry-name.ext-css:before,.token.treeview-part .entry-name.ext-h:before,.token.treeview-part .entry-name.ext-hh:before,.token.treeview-part .entry-name.ext-htm:before,.token.treeview-part .entry-name.ext-html:before,.token.treeview-part .entry-name.ext-jav:before,.token.treeview-part .entry-name.ext-java:before,.token.treeview-part .entry-name.ext-js:before,.token.treeview-part .entry-name.ext-php:before,.token.treeview-part .entry-name.ext-rb:before,.token.treeview-part .entry-name.ext-xml:before{content:"\ea07"}.token.treeview-part .entry-name.ext-7z:before,.token.treeview-part .entry-name.ext-bz2:before,.token.treeview-part .entry-name.ext-bz:before,.token.treeview-part .entry-name.ext-gz:before,.token.treeview-part .entry-name.ext-rar:before,.token.treeview-part .entry-name.ext-tar:before,.token.treeview-part .entry-name.ext-tgz:before,.token.treeview-part .entry-name.ext-zip:before{content:"\ea08"}.token.treeview-part .entry-name.ext-aac:before,.token.treeview-part .entry-name.ext-au:before,.token.treeview-part .entry-name.ext-cda:before,.token.treeview-part .entry-name.ext-flac:before,.token.treeview-part .entry-name.ext-mp3:before,.token.treeview-part .entry-name.ext-oga:before,.token.treeview-part .entry-name.ext-ogg:before,.token.treeview-part .entry-name.ext-wav:before,.token.treeview-part .entry-name.ext-wma:before{content:"\ea04"}.token.treeview-part .entry-name.ext-avi:before,.token.treeview-part .entry-name.ext-flv:before,.token.treeview-part .entry-name.ext-mkv:before,.token.treeview-part .entry-name.ext-mov:before,.token.treeview-part .entry-name.ext-mp4:before,.token.treeview-part .entry-name.ext-mpeg:before,.token.treeview-part .entry-name.ext-mpg:before,.token.treeview-part .entry-name.ext-ogv:before,.token.treeview-part .entry-name.ext-webm:before{content:"\ea05"}.token.treeview-part .entry-name.ext-pdf:before{content:"\ea09"}.token.treeview-part .entry-name.ext-xls:before,.token.treeview-part .entry-name.ext-xlsx:before{content:"\ea0a"}.token.treeview-part .entry-name.ext-doc:before,.token.treeview-part .entry-name.ext-docm:before,.token.treeview-part .entry-name.ext-docx:before{content:"\ea0c"}.token.treeview-part .entry-name.ext-pps:before,.token.treeview-part .entry-name.ext-ppt:before,.token.treeview-part .entry-name.ext-pptx:before{content:"\ea0b"} \ No newline at end of file diff --git a/plugins/unescaped-markup/prism-unescaped-markup.min.css b/plugins/unescaped-markup/prism-unescaped-markup.min.css new file mode 100644 index 0000000000..c5bd91ad50 --- /dev/null +++ b/plugins/unescaped-markup/prism-unescaped-markup.min.css @@ -0,0 +1 @@ +[class*=lang-] script[type='text/plain'],[class*=language-] script[type='text/plain'],script[type='text/plain'][class*=lang-],script[type='text/plain'][class*=language-]{display:block;font:100% Consolas,Monaco,monospace;white-space:pre;overflow:auto} \ No newline at end of file diff --git a/plugins/wpd/prism-wpd.min.css b/plugins/wpd/prism-wpd.min.css new file mode 100644 index 0000000000..43b0cf6112 --- /dev/null +++ b/plugins/wpd/prism-wpd.min.css @@ -0,0 +1 @@ +code[class*=language-] a[href],pre[class*=language-] a[href]{cursor:help;text-decoration:none}code[class*=language-] a[href]:hover,pre[class*=language-] a[href]:hover{cursor:help;text-decoration:underline} \ No newline at end of file diff --git a/themes/prism-coy.min.css b/themes/prism-coy.min.css new file mode 100644 index 0000000000..02f328cb32 --- /dev/null +++ b/themes/prism-coy.min.css @@ -0,0 +1 @@ +code[class*=language-],pre[class*=language-]{color:#000;background:0 0;font-family:Consolas,Monaco,'Andale Mono','Ubuntu Mono',monospace;font-size:1em;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none}pre[class*=language-]{position:relative;margin:.5em 0;overflow:visible;padding:0}pre[class*=language-]>code{position:relative;border-left:10px solid #358ccb;box-shadow:-1px 0 0 0 #358ccb,0 0 0 1px #dfdfdf;background-color:#fdfdfd;background-image:linear-gradient(transparent 50%,rgba(69,142,209,.04) 50%);background-size:3em 3em;background-origin:content-box;background-attachment:local}code[class*=language-]{max-height:inherit;height:inherit;padding:0 1em;display:block;overflow:auto}:not(pre)>code[class*=language-],pre[class*=language-]{background-color:#fdfdfd;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;margin-bottom:1em}:not(pre)>code[class*=language-]{position:relative;padding:.2em;border-radius:.3em;color:#c92c2c;border:1px solid rgba(0,0,0,.1);display:inline;white-space:normal}pre[class*=language-]:after,pre[class*=language-]:before{content:'';z-index:-2;display:block;position:absolute;bottom:.75em;left:.18em;width:40%;height:20%;max-height:13em;box-shadow:0 13px 8px #979797;-webkit-transform:rotate(-2deg);-moz-transform:rotate(-2deg);-ms-transform:rotate(-2deg);-o-transform:rotate(-2deg);transform:rotate(-2deg)}pre[class*=language-]:after{right:.75em;left:auto;-webkit-transform:rotate(2deg);-moz-transform:rotate(2deg);-ms-transform:rotate(2deg);-o-transform:rotate(2deg);transform:rotate(2deg)}.token.block-comment,.token.cdata,.token.comment,.token.doctype,.token.prolog{color:#7d8b99}.token.punctuation{color:#5f6364}.token.boolean,.token.constant,.token.deleted,.token.function-name,.token.number,.token.property,.token.symbol,.token.tag{color:#c92c2c}.token.attr-name,.token.builtin,.token.char,.token.function,.token.inserted,.token.selector,.token.string{color:#2f9c0a}.token.entity,.token.operator,.token.url,.token.variable{color:#a67f59;background:rgba(255,255,255,.5)}.token.atrule,.token.attr-value,.token.class-name,.token.keyword{color:#1990b8}.token.important,.token.regex{color:#e90}.language-css .token.string,.style .token.string{color:#a67f59;background:rgba(255,255,255,.5)}.token.important{font-weight:400}.token.bold{font-weight:700}.token.italic{font-style:italic}.token.entity{cursor:help}.token.namespace{opacity:.7}@media screen and (max-width:767px){pre[class*=language-]:after,pre[class*=language-]:before{bottom:14px;box-shadow:none}}pre[class*=language-].line-numbers.line-numbers{padding-left:0}pre[class*=language-].line-numbers.line-numbers code{padding-left:3.8em}pre[class*=language-].line-numbers.line-numbers .line-numbers-rows{left:0}pre[class*=language-][data-line]{padding-top:0;padding-bottom:0;padding-left:0}pre[data-line] code{position:relative;padding-left:4em}pre .line-highlight{margin-top:0} \ No newline at end of file diff --git a/themes/prism-dark.min.css b/themes/prism-dark.min.css new file mode 100644 index 0000000000..e592b5b769 --- /dev/null +++ b/themes/prism-dark.min.css @@ -0,0 +1 @@ +code[class*=language-],pre[class*=language-]{color:#fff;background:0 0;text-shadow:0 -.1em .2em #000;font-family:Consolas,Monaco,'Andale Mono','Ubuntu Mono',monospace;font-size:1em;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none}@media print{code[class*=language-],pre[class*=language-]{text-shadow:none}}:not(pre)>code[class*=language-],pre[class*=language-]{background:#4c3f33}pre[class*=language-]{padding:1em;margin:.5em 0;overflow:auto;border:.3em solid #7a6651;border-radius:.5em;box-shadow:1px 1px .5em #000 inset}:not(pre)>code[class*=language-]{padding:.15em .2em .05em;border-radius:.3em;border:.13em solid #7a6651;box-shadow:1px 1px .3em -.1em #000 inset;white-space:normal}.token.cdata,.token.comment,.token.doctype,.token.prolog{color:#997f66}.token.punctuation{opacity:.7}.token.namespace{opacity:.7}.token.boolean,.token.constant,.token.number,.token.property,.token.symbol,.token.tag{color:#d1939e}.token.attr-name,.token.builtin,.token.char,.token.inserted,.token.selector,.token.string{color:#bce051}.language-css .token.string,.style .token.string,.token.entity,.token.operator,.token.url,.token.variable{color:#f4b73d}.token.atrule,.token.attr-value,.token.keyword{color:#d1939e}.token.important,.token.regex{color:#e90}.token.bold,.token.important{font-weight:700}.token.italic{font-style:italic}.token.entity{cursor:help}.token.deleted{color:red} \ No newline at end of file diff --git a/themes/prism-funky.min.css b/themes/prism-funky.min.css new file mode 100644 index 0000000000..2e67a7a28f --- /dev/null +++ b/themes/prism-funky.min.css @@ -0,0 +1 @@ +code[class*=language-],pre[class*=language-]{font-family:Consolas,Monaco,'Andale Mono','Ubuntu Mono',monospace;font-size:1em;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none}pre[class*=language-]{padding:.4em .8em;margin:.5em 0;overflow:auto;background:url('data:image/svg+xml;charset=utf-8,%0D%0A%0D%0A%0D%0A<%2Fsvg>');background-size:1em 1em}code[class*=language-]{background:#000;color:#fff;box-shadow:-.3em 0 0 .3em #000,.3em 0 0 .3em #000}:not(pre)>code[class*=language-]{padding:.2em;border-radius:.3em;box-shadow:none;white-space:normal}.token.cdata,.token.comment,.token.doctype,.token.prolog{color:#aaa}.token.punctuation{color:#999}.token.namespace{opacity:.7}.token.boolean,.token.constant,.token.number,.token.property,.token.symbol,.token.tag{color:#0cf}.token.attr-name,.token.builtin,.token.char,.token.selector,.token.string{color:#ff0}.language-css .token.string,.token.entity,.token.inserted,.token.operator,.token.url,.token.variable{color:#9acd32}.token.atrule,.token.attr-value,.token.keyword{color:#ff1493}.token.important,.token.regex{color:orange}.token.bold,.token.important{font-weight:700}.token.italic{font-style:italic}.token.entity{cursor:help}.token.deleted{color:red}pre.diff-highlight.diff-highlight>code .token.deleted:not(.prefix),pre>code.diff-highlight.diff-highlight .token.deleted:not(.prefix){background-color:rgba(255,0,0,.3);display:inline}pre.diff-highlight.diff-highlight>code .token.inserted:not(.prefix),pre>code.diff-highlight.diff-highlight .token.inserted:not(.prefix){background-color:rgba(0,255,128,.3);display:inline} \ No newline at end of file diff --git a/themes/prism-okaidia.min.css b/themes/prism-okaidia.min.css new file mode 100644 index 0000000000..dc0b418e32 --- /dev/null +++ b/themes/prism-okaidia.min.css @@ -0,0 +1 @@ +code[class*=language-],pre[class*=language-]{color:#f8f8f2;background:0 0;text-shadow:0 1px rgba(0,0,0,.3);font-family:Consolas,Monaco,'Andale Mono','Ubuntu Mono',monospace;font-size:1em;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none}pre[class*=language-]{padding:1em;margin:.5em 0;overflow:auto;border-radius:.3em}:not(pre)>code[class*=language-],pre[class*=language-]{background:#272822}:not(pre)>code[class*=language-]{padding:.1em;border-radius:.3em;white-space:normal}.token.cdata,.token.comment,.token.doctype,.token.prolog{color:#8292a2}.token.punctuation{color:#f8f8f2}.token.namespace{opacity:.7}.token.constant,.token.deleted,.token.property,.token.symbol,.token.tag{color:#f92672}.token.boolean,.token.number{color:#ae81ff}.token.attr-name,.token.builtin,.token.char,.token.inserted,.token.selector,.token.string{color:#a6e22e}.language-css .token.string,.style .token.string,.token.entity,.token.operator,.token.url,.token.variable{color:#f8f8f2}.token.atrule,.token.attr-value,.token.class-name,.token.function{color:#e6db74}.token.keyword{color:#66d9ef}.token.important,.token.regex{color:#fd971f}.token.bold,.token.important{font-weight:700}.token.italic{font-style:italic}.token.entity{cursor:help} \ No newline at end of file diff --git a/themes/prism-solarizedlight.min.css b/themes/prism-solarizedlight.min.css new file mode 100644 index 0000000000..8deecf9e55 --- /dev/null +++ b/themes/prism-solarizedlight.min.css @@ -0,0 +1 @@ +code[class*=language-],pre[class*=language-]{color:#657b83;font-family:Consolas,Monaco,'Andale Mono','Ubuntu Mono',monospace;font-size:1em;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none}code[class*=language-] ::-moz-selection,code[class*=language-]::-moz-selection,pre[class*=language-] ::-moz-selection,pre[class*=language-]::-moz-selection{background:#073642}code[class*=language-] ::selection,code[class*=language-]::selection,pre[class*=language-] ::selection,pre[class*=language-]::selection{background:#073642}pre[class*=language-]{padding:1em;margin:.5em 0;overflow:auto;border-radius:.3em}:not(pre)>code[class*=language-],pre[class*=language-]{background-color:#fdf6e3}:not(pre)>code[class*=language-]{padding:.1em;border-radius:.3em}.token.cdata,.token.comment,.token.doctype,.token.prolog{color:#93a1a1}.token.punctuation{color:#586e75}.token.namespace{opacity:.7}.token.boolean,.token.constant,.token.deleted,.token.number,.token.property,.token.symbol,.token.tag{color:#268bd2}.token.attr-name,.token.builtin,.token.char,.token.inserted,.token.selector,.token.string,.token.url{color:#2aa198}.token.entity{color:#657b83;background:#eee8d5}.token.atrule,.token.attr-value,.token.keyword{color:#859900}.token.class-name,.token.function{color:#b58900}.token.important,.token.regex,.token.variable{color:#cb4b16}.token.bold,.token.important{font-weight:700}.token.italic{font-style:italic}.token.entity{cursor:help} \ No newline at end of file diff --git a/themes/prism-tomorrow.min.css b/themes/prism-tomorrow.min.css new file mode 100644 index 0000000000..8fce55009d --- /dev/null +++ b/themes/prism-tomorrow.min.css @@ -0,0 +1 @@ +code[class*=language-],pre[class*=language-]{color:#ccc;background:0 0;font-family:Consolas,Monaco,'Andale Mono','Ubuntu Mono',monospace;font-size:1em;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none}pre[class*=language-]{padding:1em;margin:.5em 0;overflow:auto}:not(pre)>code[class*=language-],pre[class*=language-]{background:#2d2d2d}:not(pre)>code[class*=language-]{padding:.1em;border-radius:.3em;white-space:normal}.token.block-comment,.token.cdata,.token.comment,.token.doctype,.token.prolog{color:#999}.token.punctuation{color:#ccc}.token.attr-name,.token.deleted,.token.namespace,.token.tag{color:#e2777a}.token.function-name{color:#6196cc}.token.boolean,.token.function,.token.number{color:#f08d49}.token.class-name,.token.constant,.token.property,.token.symbol{color:#f8c555}.token.atrule,.token.builtin,.token.important,.token.keyword,.token.selector{color:#cc99cd}.token.attr-value,.token.char,.token.regex,.token.string,.token.variable{color:#7ec699}.token.entity,.token.operator,.token.url{color:#67cdcc}.token.bold,.token.important{font-weight:700}.token.italic{font-style:italic}.token.entity{cursor:help}.token.inserted{color:green} \ No newline at end of file diff --git a/themes/prism-twilight.min.css b/themes/prism-twilight.min.css new file mode 100644 index 0000000000..e598be8865 --- /dev/null +++ b/themes/prism-twilight.min.css @@ -0,0 +1 @@ +code[class*=language-],pre[class*=language-]{color:#fff;background:0 0;font-family:Consolas,Monaco,'Andale Mono','Ubuntu Mono',monospace;font-size:1em;text-align:left;text-shadow:0 -.1em .2em #000;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none}:not(pre)>code[class*=language-],pre[class*=language-]{background:#141414}pre[class*=language-]{border-radius:.5em;border:.3em solid #545454;box-shadow:1px 1px .5em #000 inset;margin:.5em 0;overflow:auto;padding:1em}pre[class*=language-]::-moz-selection{background:#27292a}pre[class*=language-]::selection{background:#27292a}code[class*=language-] ::-moz-selection,code[class*=language-]::-moz-selection,pre[class*=language-] ::-moz-selection,pre[class*=language-]::-moz-selection{text-shadow:none;background:hsla(0,0%,93%,.15)}code[class*=language-] ::selection,code[class*=language-]::selection,pre[class*=language-] ::selection,pre[class*=language-]::selection{text-shadow:none;background:hsla(0,0%,93%,.15)}:not(pre)>code[class*=language-]{border-radius:.3em;border:.13em solid #545454;box-shadow:1px 1px .3em -.1em #000 inset;padding:.15em .2em .05em;white-space:normal}.token.cdata,.token.comment,.token.doctype,.token.prolog{color:#777}.token.punctuation{opacity:.7}.token.namespace{opacity:.7}.token.boolean,.token.deleted,.token.number,.token.tag{color:#ce6849}.token.builtin,.token.constant,.token.keyword,.token.property,.token.selector,.token.symbol{color:#f9ed99}.language-css .token.string,.style .token.string,.token.attr-name,.token.attr-value,.token.char,.token.entity,.token.inserted,.token.operator,.token.string,.token.url,.token.variable{color:#909e6a}.token.atrule{color:#7385a5}.token.important,.token.regex{color:#e8c062}.token.bold,.token.important{font-weight:700}.token.italic{font-style:italic}.token.entity{cursor:help}.language-markup .token.attr-name,.language-markup .token.punctuation,.language-markup .token.tag{color:#ac885c}.token{position:relative;z-index:1}.line-highlight.line-highlight{background:hsla(0,0%,33%,.25);background:linear-gradient(to right,hsla(0,0%,33%,.1) 70%,hsla(0,0%,33%,0));border-bottom:1px dashed #545454;border-top:1px dashed #545454;margin-top:.75em;z-index:0}.line-highlight.line-highlight:before,.line-highlight.line-highlight[data-end]:after{background-color:#8693a6;color:#f4f1ef} \ No newline at end of file diff --git a/themes/prism.min.css b/themes/prism.min.css new file mode 100644 index 0000000000..8c4cc0576b --- /dev/null +++ b/themes/prism.min.css @@ -0,0 +1 @@ +code[class*=language-],pre[class*=language-]{color:#000;background:0 0;text-shadow:0 1px #fff;font-family:Consolas,Monaco,'Andale Mono','Ubuntu Mono',monospace;font-size:1em;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none}code[class*=language-] ::-moz-selection,code[class*=language-]::-moz-selection,pre[class*=language-] ::-moz-selection,pre[class*=language-]::-moz-selection{text-shadow:none;background:#b3d4fc}code[class*=language-] ::selection,code[class*=language-]::selection,pre[class*=language-] ::selection,pre[class*=language-]::selection{text-shadow:none;background:#b3d4fc}@media print{code[class*=language-],pre[class*=language-]{text-shadow:none}}pre[class*=language-]{padding:1em;margin:.5em 0;overflow:auto}:not(pre)>code[class*=language-],pre[class*=language-]{background:#f5f2f0}:not(pre)>code[class*=language-]{padding:.1em;border-radius:.3em;white-space:normal}.token.cdata,.token.comment,.token.doctype,.token.prolog{color:#708090}.token.punctuation{color:#999}.token.namespace{opacity:.7}.token.boolean,.token.constant,.token.deleted,.token.number,.token.property,.token.symbol,.token.tag{color:#905}.token.attr-name,.token.builtin,.token.char,.token.inserted,.token.selector,.token.string{color:#690}.language-css .token.string,.style .token.string,.token.entity,.token.operator,.token.url{color:#9a6e3a;background:hsla(0,0%,100%,.5)}.token.atrule,.token.attr-value,.token.keyword{color:#07a}.token.class-name,.token.function{color:#dd4a68}.token.important,.token.regex,.token.variable{color:#e90}.token.bold,.token.important{font-weight:700}.token.italic{font-style:italic}.token.entity{cursor:help} \ No newline at end of file From f053af134fbb5b030eb4e48506a1b40d37bfc22e Mon Sep 17 00:00:00 2001 From: SlawomirZalecki <68185796+SlawomirZalecki@users.noreply.github.com> Date: Mon, 4 Oct 2021 14:51:42 +0200 Subject: [PATCH 0923/1100] Pascal: Added support for asm and directives (#2653) Co-authored-by: RunDevelopment --- components/prism-pascal.js | 26 +- components/prism-pascal.min.js | 2 +- tests/languages/pascal/asm_feature.test | 344 ++++++++++++++++++ tests/languages/pascal/directive_feature.test | 12 + 4 files changed, 378 insertions(+), 6 deletions(-) create mode 100644 tests/languages/pascal/asm_feature.test create mode 100644 tests/languages/pascal/directive_feature.test diff --git a/components/prism-pascal.js b/components/prism-pascal.js index 9e95353af6..5e8facdf83 100644 --- a/components/prism-pascal.js +++ b/components/prism-pascal.js @@ -5,15 +5,25 @@ */ Prism.languages.pascal = { - 'comment': [ - /\(\*[\s\S]+?\*\)/, - /\{[\s\S]+?\}/, - /\/\/.*/ - ], + 'directive': { + pattern: /\{\$[\s\S]*?\}/, + greedy: true, + alias: ['marco', 'property'] + }, + 'comment': { + pattern: /\(\*[\s\S]*?\*\)|\{[\s\S]*?\}|\/\/.*/, + greedy: true + }, 'string': { pattern: /(?:'(?:''|[^'\r\n])*'(?!')|#[&$%]?[a-f\d]+)+|\^[a-z]/i, greedy: true }, + 'asm': { + pattern: /(\basm\b)[\s\S]+?(?=\bend\s*[;[])/i, + lookbehind: true, + greedy: true, + inside: null // see below + }, 'keyword': [ { // Turbo Pascal @@ -52,4 +62,10 @@ Prism.languages.pascal = { 'punctuation': /\(\.|\.\)|[()\[\]:;,.]/ }; +Prism.languages.pascal.asm.inside = Prism.languages.extend('pascal', { + 'asm': undefined, + 'keyword': undefined, + 'operator': undefined +}); + Prism.languages.objectpascal = Prism.languages.pascal; diff --git a/components/prism-pascal.min.js b/components/prism-pascal.min.js index 07ae8a25ee..94f0fd5c2f 100644 --- a/components/prism-pascal.min.js +++ b/components/prism-pascal.min.js @@ -1 +1 @@ -Prism.languages.pascal={comment:[/\(\*[\s\S]+?\*\)/,/\{[\s\S]+?\}/,/\/\/.*/],string:{pattern:/(?:'(?:''|[^'\r\n])*'(?!')|#[&$%]?[a-f\d]+)+|\^[a-z]/i,greedy:!0},keyword:[{pattern:/(^|[^&])\b(?:absolute|array|asm|begin|case|const|constructor|destructor|do|downto|else|end|file|for|function|goto|if|implementation|inherited|inline|interface|label|nil|object|of|operator|packed|procedure|program|record|reintroduce|repeat|self|set|string|then|to|type|unit|until|uses|var|while|with)\b/i,lookbehind:!0},{pattern:/(^|[^&])\b(?:dispose|exit|false|new|true)\b/i,lookbehind:!0},{pattern:/(^|[^&])\b(?:class|dispinterface|except|exports|finalization|finally|initialization|inline|library|on|out|packed|property|raise|resourcestring|threadvar|try)\b/i,lookbehind:!0},{pattern:/(^|[^&])\b(?:absolute|abstract|alias|assembler|bitpacked|break|cdecl|continue|cppdecl|cvar|default|deprecated|dynamic|enumerator|experimental|export|external|far|far16|forward|generic|helper|implements|index|interrupt|iochecks|local|message|name|near|nodefault|noreturn|nostackframe|oldfpccall|otherwise|overload|override|pascal|platform|private|protected|public|published|read|register|reintroduce|result|safecall|saveregisters|softfloat|specialize|static|stdcall|stored|strict|unaligned|unimplemented|varargs|virtual|write)\b/i,lookbehind:!0}],number:[/(?:[&%]\d+|\$[a-f\d]+)/i,/\b\d+(?:\.\d+)?(?:e[+-]?\d+)?/i],operator:[/\.\.|\*\*|:=|<[<=>]?|>[>=]?|[+\-*\/]=?|[@^=]/i,{pattern:/(^|[^&])\b(?:and|as|div|exclude|in|include|is|mod|not|or|shl|shr|xor)\b/,lookbehind:!0}],punctuation:/\(\.|\.\)|[()\[\]:;,.]/},Prism.languages.objectpascal=Prism.languages.pascal; \ No newline at end of file +Prism.languages.pascal={directive:{pattern:/\{\$[\s\S]*?\}/,greedy:!0,alias:["marco","property"]},comment:{pattern:/\(\*[\s\S]*?\*\)|\{[\s\S]*?\}|\/\/.*/,greedy:!0},string:{pattern:/(?:'(?:''|[^'\r\n])*'(?!')|#[&$%]?[a-f\d]+)+|\^[a-z]/i,greedy:!0},asm:{pattern:/(\basm\b)[\s\S]+?(?=\bend\s*[;[])/i,lookbehind:!0,greedy:!0,inside:null},keyword:[{pattern:/(^|[^&])\b(?:absolute|array|asm|begin|case|const|constructor|destructor|do|downto|else|end|file|for|function|goto|if|implementation|inherited|inline|interface|label|nil|object|of|operator|packed|procedure|program|record|reintroduce|repeat|self|set|string|then|to|type|unit|until|uses|var|while|with)\b/i,lookbehind:!0},{pattern:/(^|[^&])\b(?:dispose|exit|false|new|true)\b/i,lookbehind:!0},{pattern:/(^|[^&])\b(?:class|dispinterface|except|exports|finalization|finally|initialization|inline|library|on|out|packed|property|raise|resourcestring|threadvar|try)\b/i,lookbehind:!0},{pattern:/(^|[^&])\b(?:absolute|abstract|alias|assembler|bitpacked|break|cdecl|continue|cppdecl|cvar|default|deprecated|dynamic|enumerator|experimental|export|external|far|far16|forward|generic|helper|implements|index|interrupt|iochecks|local|message|name|near|nodefault|noreturn|nostackframe|oldfpccall|otherwise|overload|override|pascal|platform|private|protected|public|published|read|register|reintroduce|result|safecall|saveregisters|softfloat|specialize|static|stdcall|stored|strict|unaligned|unimplemented|varargs|virtual|write)\b/i,lookbehind:!0}],number:[/(?:[&%]\d+|\$[a-f\d]+)/i,/\b\d+(?:\.\d+)?(?:e[+-]?\d+)?/i],operator:[/\.\.|\*\*|:=|<[<=>]?|>[>=]?|[+\-*\/]=?|[@^=]/i,{pattern:/(^|[^&])\b(?:and|as|div|exclude|in|include|is|mod|not|or|shl|shr|xor)\b/,lookbehind:!0}],punctuation:/\(\.|\.\)|[()\[\]:;,.]/},Prism.languages.pascal.asm.inside=Prism.languages.extend("pascal",{asm:void 0,keyword:void 0,operator:void 0}),Prism.languages.objectpascal=Prism.languages.pascal; \ No newline at end of file diff --git a/tests/languages/pascal/asm_feature.test b/tests/languages/pascal/asm_feature.test new file mode 100644 index 0000000000..450518702d --- /dev/null +++ b/tests/languages/pascal/asm_feature.test @@ -0,0 +1,344 @@ +program asmDemo(input, output, stderr); + +// The $asmMode directive informs the compiler +// which syntax is used in asm-blocks. +// Alternatives are 'att' (AT&T syntax) and 'direct'. +{$asmMode intel} + +var + n, m: longint; +begin + n := 42; + m := -7; + writeLn('n = ', n, '; m = ', m); + + // instead of declaring another temporary variable + // and writing "tmp := n; n := m; m := tmp;": + asm + mov eax, n // eax := n + // xchg can only operate at most on one memory address + xchg eax, m // swaps values in eax and at m + mov n, eax // n := eax (holding the former m value) + // an array of strings after the asm-block closing 'end' + // tells the compiler which registers have changed + // (you don't wanna mess with the compiler's notion + // which registers mean what) + end ['eax']; + + writeLn('n = ', n, '; m = ', m); +end. + +program sign(input, output, stderr); + +type + signumCodomain = -1..1; + +{ returns the sign of an integer } +function signum({$ifNDef CPUx86_64} const {$endIf} x: longint): signumCodomain; +{$ifDef CPUx86_64} // ============= optimized implementation +assembler; +{$asmMode intel} +asm + xor rax, rax // ensure result is not wrong + // due to any residue + + test x, x // x ≟ 0 + setnz al // al ≔ ¬ZF + + sar x, 63 // propagate sign-bit through reg. + cmovs rax, x // if SF then rax ≔ −1 +end; +{$else} // ========================== default implementation +begin + // This is what math.sign virtually does. + // The compiled code requires _two_ cmp instructions, though. + if x > 0 then + begin + signum := 1; + end + else if x < 0 then + begin + signum := -1; + end + else + begin + signum := 0; + end; +end; +{$endIf} + +// M A I N ================================================= +var + x: longint; +begin + readLn(x); + writeLn(signum(x)); +end. + +---------------------------------------------------- + +[ + ["keyword", "program"], + " asmDemo", + ["punctuation", "("], + "input", + ["punctuation", ","], + " output", + ["punctuation", ","], + " stderr", + ["punctuation", ")"], + ["punctuation", ";"], + + ["comment", "// The $asmMode directive informs the compiler"], + ["comment", "// which syntax is used in asm-blocks."], + ["comment", "// Alternatives are 'att' (AT&T syntax) and 'direct'."], + ["directive", "{$asmMode intel}"], + + ["keyword", "var"], + + "\r\n\tn", + ["punctuation", ","], + " m", + ["punctuation", ":"], + " longint", + ["punctuation", ";"], + + ["keyword", "begin"], + + "\r\n\tn ", + ["operator", ":="], + ["number", "42"], + ["punctuation", ";"], + + "\r\n\tm ", + ["operator", ":="], + ["operator", "-"], + ["number", "7"], + ["punctuation", ";"], + + "\r\n\twriteLn", + ["punctuation", "("], + ["string", "'n = '"], + ["punctuation", ","], + " n", + ["punctuation", ","], + ["string", "'; m = '"], + ["punctuation", ","], + " m", + ["punctuation", ")"], + ["punctuation", ";"], + + ["comment", "// instead of declaring another temporary variable"], + + ["comment", "// and writing \"tmp := n; n := m; m := tmp;\":"], + + ["keyword", "asm"], + ["asm", [ + "\r\n\t\tmov eax", + ["punctuation", ","], + " n ", + ["comment", "// eax := n"], + + ["comment", "// xchg can only operate at most on one memory address"], + + "\r\n\t\txchg eax", + ["punctuation", ","], + " m ", + ["comment", "// swaps values in eax and at m"], + + "\r\n\t\tmov n", + ["punctuation", ","], + " eax ", + ["comment", "// n := eax (holding the former m value)"], + + ["comment", "// an array of strings after the asm-block closing 'end'"], + + ["comment", "// tells the compiler which registers have changed"], + + ["comment", "// (you don't wanna mess with the compiler's notion"], + + ["comment", "// which registers mean what)"] + ]], + ["keyword", "end"], + ["punctuation", "["], + ["string", "'eax'"], + ["punctuation", "]"], + ["punctuation", ";"], + + "\r\n\r\n\twriteLn", + ["punctuation", "("], + ["string", "'n = '"], + ["punctuation", ","], + " n", + ["punctuation", ","], + ["string", "'; m = '"], + ["punctuation", ","], + " m", + ["punctuation", ")"], + ["punctuation", ";"], + + ["keyword", "end"], + ["punctuation", "."], + + ["keyword", "program"], + " sign", + ["punctuation", "("], + "input", + ["punctuation", ","], + " output", + ["punctuation", ","], + " stderr", + ["punctuation", ")"], + ["punctuation", ";"], + + ["keyword", "type"], + + "\r\n\tsignumCodomain ", + ["operator", "="], + ["operator", "-"], + ["number", "1"], + ["operator", ".."], + ["number", "1"], + ["punctuation", ";"], + + ["comment", "{ returns the sign of an integer }"], + + ["keyword", "function"], + " signum", + ["punctuation", "("], + ["directive", "{$ifNDef CPUx86_64}"], + ["keyword", "const"], + ["directive", "{$endIf}"], + " x", + ["punctuation", ":"], + " longint", + ["punctuation", ")"], + ["punctuation", ":"], + " signumCodomain", + ["punctuation", ";"], + + ["directive", "{$ifDef CPUx86_64}"], + ["comment", "// ============= optimized implementation"], + + ["keyword", "assembler"], + ["punctuation", ";"], + + ["directive", "{$asmMode intel}"], + + ["keyword", "asm"], + ["asm", [ + "\r\n\txor rax", + ["punctuation", ","], + " rax ", + ["comment", "// ensure result is not wrong"], + + ["comment", "// due to any residue"], + + "\r\n\r\n\ttest x", + ["punctuation", ","], + " x ", + ["comment", "// x ≟ 0"], + + "\r\n\tsetnz al ", + ["comment", "// al ≔ ¬ZF"], + + "\r\n\r\n\tsar x", + ["punctuation", ","], + ["number", "63"], + ["comment", "// propagate sign-bit through reg."], + + "\r\n\tcmovs rax", + ["punctuation", ","], + " x ", + ["comment", "// if SF then rax ≔ −1"] + ]], + ["keyword", "end"], + ["punctuation", ";"], + + ["directive", "{$else}"], + ["comment", "// ========================== default implementation"], + + ["keyword", "begin"], + + ["comment", "// This is what math.sign virtually does."], + + ["comment", "// The compiled code requires _two_ cmp instructions, though."], + + ["keyword", "if"], + " x ", + ["operator", ">"], + ["number", "0"], + ["keyword", "then"], + + ["keyword", "begin"], + + "\r\n\t\tsignum ", + ["operator", ":="], + ["number", "1"], + ["punctuation", ";"], + + ["keyword", "end"], + + ["keyword", "else"], + ["keyword", "if"], + " x ", + ["operator", "<"], + ["number", "0"], + ["keyword", "then"], + + ["keyword", "begin"], + + "\r\n\t\tsignum ", + ["operator", ":="], + ["operator", "-"], + ["number", "1"], + ["punctuation", ";"], + + ["keyword", "end"], + + ["keyword", "else"], + + ["keyword", "begin"], + + "\r\n\t\tsignum ", + ["operator", ":="], + ["number", "0"], + ["punctuation", ";"], + + ["keyword", "end"], + ["punctuation", ";"], + + ["keyword", "end"], + ["punctuation", ";"], + + ["directive", "{$endIf}"], + + ["comment", "// M A I N ================================================="], + + ["keyword", "var"], + + "\r\n\tx", + ["punctuation", ":"], + " longint", + ["punctuation", ";"], + + ["keyword", "begin"], + + "\r\n\treadLn", + ["punctuation", "("], + "x", + ["punctuation", ")"], + ["punctuation", ";"], + + "\r\n\twriteLn", + ["punctuation", "("], + "signum", + ["punctuation", "("], + "x", + ["punctuation", ")"], + ["punctuation", ")"], + ["punctuation", ";"], + + ["keyword", "end"], + ["punctuation", "."] +] diff --git a/tests/languages/pascal/directive_feature.test b/tests/languages/pascal/directive_feature.test new file mode 100644 index 0000000000..68b85d228a --- /dev/null +++ b/tests/languages/pascal/directive_feature.test @@ -0,0 +1,12 @@ +{$ASSERTIONS} +{$asmMode intel} +{$ifDef CPUx86_64} // ============= optimized implementation + +---------------------------------------------------- + +[ + ["directive", "{$ASSERTIONS}"], + ["directive", "{$asmMode intel}"], + ["directive", "{$ifDef CPUx86_64}"], + ["comment", "// ============= optimized implementation"] +] From d38592c5bb1582a2fddefd81c9ad98e403b4ce9f Mon Sep 17 00:00:00 2001 From: Berti Date: Mon, 4 Oct 2021 08:52:52 -0500 Subject: [PATCH 0924/1100] File highlight+data range (#1813) Co-authored-by: atomize <63r71@tuta.io> Co-authored-by: Michael Schmidt --- plugins/file-highlight/index.html | 13 +++ .../file-highlight/prism-file-highlight.js | 109 ++++++++++++++---- .../prism-file-highlight.min.js | 2 +- prism.js | 109 ++++++++++++++---- 4 files changed, 188 insertions(+), 45 deletions(-) diff --git a/plugins/file-highlight/index.html b/plugins/file-highlight/index.html index 7452bf752d..2033ef017a 100644 --- a/plugins/file-highlight/index.html +++ b/plugins/file-highlight/index.html @@ -8,6 +8,7 @@ + @@ -27,6 +28,14 @@

            How to use

            You don’t need to specify the language, it’s automatically determined by the file extension. If, however, the language cannot be determined from the file extension or the file extension is incorrect, you may specify a language as well (with the usual class name way).

            +

            Use the data-range attribute to display only a selected range of lines from the file, like so:

            + +
            <pre data-src="myfile.js" data-range="1,5"></pre>
            + +

            Lines start at 1, so "1,5" will display line 1 up to and including line 5. It's also possible to specify just a single line (e.g. "5" for just line 5) and open ranges (e.g. "3," for all lines starting at line 3). Negative integers can be used to specify the n-th last line, e.g. -2 for the second last line.

            + +

            When data-range is used in conjunction with the Line Numbers plugin, this plugin will add the proper data-start according to the specified range. This behavior can be overridden by setting the data-start attribute manually.

            +

            Please note that the files are fetched with XMLHttpRequest. This means that if the file is on a different origin, fetching it will fail, unless CORS is enabled on that website.

            @@ -42,6 +51,9 @@

            Examples

            File that doesn’t exist:

            
             
            +	

            With line numbers, and data-range="12,111":

            +
            
            +
             	

            For more examples, browse around the Prism website. Most large code samples are actually files fetched with this plugin.

            @@ -49,6 +61,7 @@

            Examples

            + diff --git a/plugins/file-highlight/prism-file-highlight.js b/plugins/file-highlight/prism-file-highlight.js index 443dd655f6..0a87ac5403 100644 --- a/plugins/file-highlight/prism-file-highlight.js +++ b/plugins/file-highlight/prism-file-highlight.js @@ -50,6 +50,57 @@ element.className = className.replace(/\s+/g, ' ').trim(); } + /** + * Loads the given file. + * + * @param {string} src The URL or path of the source file to load. + * @param {(result: string) => void} success + * @param {(reason: string) => void} error + */ + function loadFile(src, success, error) { + var xhr = new XMLHttpRequest(); + xhr.open('GET', src, true); + xhr.onreadystatechange = function () { + if (xhr.readyState == 4) { + if (xhr.status < 400 && xhr.responseText) { + success(xhr.responseText); + } else { + if (xhr.status >= 400) { + error(FAILURE_MESSAGE(xhr.status, xhr.statusText)); + } else { + error(FAILURE_EMPTY_MESSAGE); + } + } + } + }; + xhr.send(null); + } + + /** + * Parses the given range. + * + * This returns a range with inclusive ends. + * + * @param {string | null | undefined} range + * @returns {[number, number | undefined] | undefined} + */ + function parseRange(range) { + var m = /^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(range || ''); + if (m) { + var start = Number(m[1]); + var comma = m[2]; + var end = m[3]; + + if (!comma) { + return [start, start]; + } + if (!end) { + return [start, undefined]; + } + return [start, Number(end)]; + } + return undefined; + } Prism.hooks.add('before-highlightall', function (env) { env.selector += ', ' + SELECTOR; @@ -87,31 +138,45 @@ } // load file - var xhr = new XMLHttpRequest(); - xhr.open('GET', src, true); - xhr.onreadystatechange = function () { - if (xhr.readyState == 4) { - if (xhr.status < 400 && xhr.responseText) { - // mark as loaded - pre.setAttribute(STATUS_ATTR, STATUS_LOADED); - - // highlight code - code.textContent = xhr.responseText; - Prism.highlightElement(code); - - } else { - // mark as failed - pre.setAttribute(STATUS_ATTR, STATUS_FAILED); - - if (xhr.status >= 400) { - code.textContent = FAILURE_MESSAGE(xhr.status, xhr.statusText); - } else { - code.textContent = FAILURE_EMPTY_MESSAGE; + loadFile( + src, + function (text) { + // mark as loaded + pre.setAttribute(STATUS_ATTR, STATUS_LOADED); + + // handle data-range + var range = parseRange(pre.getAttribute('data-range')); + if (range) { + var lines = text.split(/\r\n?|\n/g); + + // the range is one-based and inclusive on both ends + var start = range[0]; + var end = range[1] == null ? lines.length : range[1]; + + if (start < 0) { start += lines.length; } + start = Math.max(0, Math.min(start - 1, lines.length)); + if (end < 0) { end += lines.length; } + end = Math.max(0, Math.min(end, lines.length)); + + text = lines.slice(start, end).join('\n'); + + // add data-start for line numbers + if (!pre.hasAttribute('data-start')) { + pre.setAttribute('data-start', String(start + 1)); } } + + // highlight code + code.textContent = text; + Prism.highlightElement(code); + }, + function (error) { + // mark as failed + pre.setAttribute(STATUS_ATTR, STATUS_FAILED); + + code.textContent = error; } - }; - xhr.send(null); + ); } }); diff --git a/plugins/file-highlight/prism-file-highlight.min.js b/plugins/file-highlight/prism-file-highlight.min.js index 24de20476b..b8ec530347 100644 --- a/plugins/file-highlight/prism-file-highlight.min.js +++ b/plugins/file-highlight/prism-file-highlight.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof Prism&&"undefined"!=typeof document){Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var o={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},h="data-src-status",g="loading",c="loaded",u="pre[data-src]:not(["+h+'="'+c+'"]):not(['+h+'="'+g+'"])',n=/\blang(?:uage)?-([\w-]+)\b/i;Prism.hooks.add("before-highlightall",function(e){e.selector+=", "+u}),Prism.hooks.add("before-sanity-check",function(e){var t=e.element;if(t.matches(u)){e.code="",t.setAttribute(h,g);var i=t.appendChild(document.createElement("CODE"));i.textContent="Loading…";var n=t.getAttribute("data-src"),s=e.language;if("none"===s){var a=(/\.(\w+)$/.exec(n)||[,"none"])[1];s=o[a]||a}p(i,s),p(t,s);var r=Prism.plugins.autoloader;r&&r.loadLanguages(s);var l=new XMLHttpRequest;l.open("GET",n,!0),l.onreadystatechange=function(){4==l.readyState&&(l.status<400&&l.responseText?(t.setAttribute(h,c),i.textContent=l.responseText,Prism.highlightElement(i)):(t.setAttribute(h,"failed"),400<=l.status?i.textContent=function(e,t){return"✖ Error "+e+" while fetching file: "+t}(l.status,l.statusText):i.textContent="✖ Error: File does not exist or is empty"))},l.send(null)}});var e=!(Prism.plugins.fileHighlight={highlight:function(e){for(var t,i=(e||document).querySelectorAll(u),n=0;t=i[n++];)Prism.highlightElement(t)}});Prism.fileHighlight=function(){e||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),e=!0),Prism.plugins.fileHighlight.highlight.apply(this,arguments)}}function p(e,t){var i=e.className;i=i.replace(n," ")+" language-"+t,e.className=i.replace(/\s+/g," ").trim()}}(); \ No newline at end of file +!function(){if("undefined"!=typeof Prism&&"undefined"!=typeof document){Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var l={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},o="data-src-status",h="loading",g="loaded",u="pre[data-src]:not(["+o+'="'+g+'"]):not(['+o+'="'+h+'"])',n=/\blang(?:uage)?-([\w-]+)\b/i;Prism.hooks.add("before-highlightall",function(t){t.selector+=", "+u}),Prism.hooks.add("before-sanity-check",function(t){var r=t.element;if(r.matches(u)){t.code="",r.setAttribute(o,h);var s=r.appendChild(document.createElement("CODE"));s.textContent="Loading…";var e=r.getAttribute("data-src"),i=t.language;if("none"===i){var n=(/\.(\w+)$/.exec(e)||[,"none"])[1];i=l[n]||n}c(s,i),c(r,i);var a=Prism.plugins.autoloader;a&&a.loadLanguages(i),function(t,e,i){var n=new XMLHttpRequest;n.open("GET",t,!0),n.onreadystatechange=function(){4==n.readyState&&(n.status<400&&n.responseText?e(n.responseText):400<=n.status?i(function(t,e){return"✖ Error "+t+" while fetching file: "+e}(n.status,n.statusText)):i("✖ Error: File does not exist or is empty"))},n.send(null)}(e,function(t){r.setAttribute(o,g);var e=function(t){var e=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(t||"");if(e){var i=Number(e[1]),n=e[2],a=e[3];return n?a?[i,Number(a)]:[i,void 0]:[i,i]}}(r.getAttribute("data-range"));if(e){var i=t.split(/\r\n?|\n/g),n=e[0],a=null==e[1]?i.length:e[1];n<0&&(n+=i.length),n=Math.max(0,Math.min(n-1,i.length)),a<0&&(a+=i.length),a=Math.max(0,Math.min(a,i.length)),t=i.slice(n,a).join("\n"),r.hasAttribute("data-start")||r.setAttribute("data-start",String(n+1))}s.textContent=t,Prism.highlightElement(s)},function(t){r.setAttribute(o,"failed"),s.textContent=t})}});var t=!(Prism.plugins.fileHighlight={highlight:function(t){for(var e,i=(t||document).querySelectorAll(u),n=0;e=i[n++];)Prism.highlightElement(e)}});Prism.fileHighlight=function(){t||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),t=!0),Prism.plugins.fileHighlight.highlight.apply(this,arguments)}}function c(t,e){var i=t.className;i=i.replace(n," ")+" language-"+e,t.className=i.replace(/\s+/g," ").trim()}}(); \ No newline at end of file diff --git a/prism.js b/prism.js index 2d790243a0..00d8cedf40 100644 --- a/prism.js +++ b/prism.js @@ -1720,6 +1720,57 @@ Prism.languages.js = Prism.languages.javascript; element.className = className.replace(/\s+/g, ' ').trim(); } + /** + * Loads the given file. + * + * @param {string} src The URL or path of the source file to load. + * @param {(result: string) => void} success + * @param {(reason: string) => void} error + */ + function loadFile(src, success, error) { + var xhr = new XMLHttpRequest(); + xhr.open('GET', src, true); + xhr.onreadystatechange = function () { + if (xhr.readyState == 4) { + if (xhr.status < 400 && xhr.responseText) { + success(xhr.responseText); + } else { + if (xhr.status >= 400) { + error(FAILURE_MESSAGE(xhr.status, xhr.statusText)); + } else { + error(FAILURE_EMPTY_MESSAGE); + } + } + } + }; + xhr.send(null); + } + + /** + * Parses the given range. + * + * This returns a range with inclusive ends. + * + * @param {string | null | undefined} range + * @returns {[number, number | undefined] | undefined} + */ + function parseRange(range) { + var m = /^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(range || ''); + if (m) { + var start = Number(m[1]); + var comma = m[2]; + var end = m[3]; + + if (!comma) { + return [start, start]; + } + if (!end) { + return [start, undefined]; + } + return [start, Number(end)]; + } + return undefined; + } Prism.hooks.add('before-highlightall', function (env) { env.selector += ', ' + SELECTOR; @@ -1757,31 +1808,45 @@ Prism.languages.js = Prism.languages.javascript; } // load file - var xhr = new XMLHttpRequest(); - xhr.open('GET', src, true); - xhr.onreadystatechange = function () { - if (xhr.readyState == 4) { - if (xhr.status < 400 && xhr.responseText) { - // mark as loaded - pre.setAttribute(STATUS_ATTR, STATUS_LOADED); - - // highlight code - code.textContent = xhr.responseText; - Prism.highlightElement(code); - - } else { - // mark as failed - pre.setAttribute(STATUS_ATTR, STATUS_FAILED); - - if (xhr.status >= 400) { - code.textContent = FAILURE_MESSAGE(xhr.status, xhr.statusText); - } else { - code.textContent = FAILURE_EMPTY_MESSAGE; + loadFile( + src, + function (text) { + // mark as loaded + pre.setAttribute(STATUS_ATTR, STATUS_LOADED); + + // handle data-range + var range = parseRange(pre.getAttribute('data-range')); + if (range) { + var lines = text.split(/\r\n?|\n/g); + + // the range is one-based and inclusive on both ends + var start = range[0]; + var end = range[1] == null ? lines.length : range[1]; + + if (start < 0) { start += lines.length; } + start = Math.max(0, Math.min(start - 1, lines.length)); + if (end < 0) { end += lines.length; } + end = Math.max(0, Math.min(end, lines.length)); + + text = lines.slice(start, end).join('\n'); + + // add data-start for line numbers + if (!pre.hasAttribute('data-start')) { + pre.setAttribute('data-start', String(start + 1)); } } + + // highlight code + code.textContent = text; + Prism.highlightElement(code); + }, + function (error) { + // mark as failed + pre.setAttribute(STATUS_ATTR, STATUS_FAILED); + + code.textContent = error; } - }; - xhr.send(null); + ); } }); From 798ee4f64ede5dd477bc5d74ff1e56e9e2776f15 Mon Sep 17 00:00:00 2001 From: shanyue Date: Tue, 5 Oct 2021 17:24:46 +0800 Subject: [PATCH 0925/1100] `package.json`: Added `engines.node` field (#3108) --- package.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/package.json b/package.json index a22bf13e1f..daaf0feb67 100755 --- a/package.json +++ b/package.json @@ -4,6 +4,9 @@ "description": "Lightweight, robust, elegant syntax highlighting. A spin-off project from Dabblet.", "main": "prism.js", "style": "themes/prism.css", + "engines": { + "node": ">=6" + }, "scripts": { "benchmark": "node benchmark/benchmark.js", "build": "gulp", From 9fe2f93e1f1f722ff226e149d1f218e7fea6a717 Mon Sep 17 00:00:00 2001 From: Valtteri Laitinen Date: Tue, 5 Oct 2021 12:26:29 +0300 Subject: [PATCH 0926/1100] Use `\d` for `[0-9]` (#3097) Also `[\d.]` for `[0-9.]` and `[\d_]` for `[0-9_]`. --- components/prism-cil.js | 4 ++-- components/prism-cil.min.js | 2 +- components/prism-http.js | 8 ++++---- components/prism-http.min.js | 2 +- components/prism-jsstacktrace.js | 2 +- components/prism-jsstacktrace.min.js | 2 +- components/prism-mongodb.js | 2 +- components/prism-mongodb.min.js | 2 +- components/prism-psl.js | 2 +- components/prism-psl.min.js | 2 +- components/prism-tremor.js | 2 +- components/prism-tremor.min.js | 2 +- components/prism-typoscript.js | 4 ++-- components/prism-typoscript.min.js | 2 +- 14 files changed, 19 insertions(+), 19 deletions(-) diff --git a/components/prism-cil.js b/components/prism-cil.js index 450a4b4028..01c2f2c518 100644 --- a/components/prism-cil.js +++ b/components/prism-cil.js @@ -18,10 +18,10 @@ Prism.languages.cil = { 'keyword': /\b(?:abstract|ansi|assembly|auto|autochar|beforefieldinit|bool|bstr|byvalstr|catch|char|cil|class|currency|date|decimal|default|enum|error|explicit|extends|extern|famandassem|family|famorassem|final(?:ly)?|float32|float64|hidebysig|u?int(?:8|16|32|64)?|iant|idispatch|implements|import|initonly|instance|interface|iunknown|literal|lpstr|lpstruct|lptstr|lpwstr|managed|method|native(?:Type)?|nested|newslot|object(?:ref)?|pinvokeimpl|private|privatescope|public|reqsecobj|rtspecialname|runtime|sealed|sequential|serializable|specialname|static|string|struct|syschar|tbstr|unicode|unmanagedexp|unsigned|value(?:type)?|variant|virtual|void)\b/, - 'function': /\b(?:(?:constrained|no|readonly|tail|unaligned|volatile)\.)?(?:conv\.(?:[iu][1248]?|ovf\.[iu][1248]?(?:\.un)?|r\.un|r4|r8)|ldc\.(?:i4(?:\.[0-9]+|\.[mM]1|\.s)?|i8|r4|r8)|ldelem(?:\.[iu][1248]?|\.r[48]|\.ref|a)?|ldind\.(?:[iu][1248]?|r[48]|ref)|stelem\.?(?:i[1248]?|r[48]|ref)?|stind\.(?:i[1248]?|r[48]|ref)?|end(?:fault|filter|finally)|ldarg(?:\.[0-3s]|a(?:\.s)?)?|ldloc(?:\.[0-9]+|\.s)?|sub(?:\.ovf(?:\.un)?)?|mul(?:\.ovf(?:\.un)?)?|add(?:\.ovf(?:\.un)?)?|stloc(?:\.[0-3s])?|refany(?:type|val)|blt(?:\.un)?(?:\.s)?|ble(?:\.un)?(?:\.s)?|bgt(?:\.un)?(?:\.s)?|bge(?:\.un)?(?:\.s)?|unbox(?:\.any)?|init(?:blk|obj)|call(?:i|virt)?|brfalse(?:\.s)?|bne\.un(?:\.s)?|ldloca(?:\.s)?|brzero(?:\.s)?|brtrue(?:\.s)?|brnull(?:\.s)?|brinst(?:\.s)?|starg(?:\.s)?|leave(?:\.s)?|shr(?:\.un)?|rem(?:\.un)?|div(?:\.un)?|clt(?:\.un)?|alignment|castclass|ldvirtftn|beq(?:\.s)?|ckfinite|ldsflda|ldtoken|localloc|mkrefany|rethrow|cgt\.un|arglist|switch|stsfld|sizeof|newobj|newarr|ldsfld|ldnull|ldflda|isinst|throw|stobj|stfld|ldstr|ldobj|ldlen|ldftn|ldfld|cpobj|cpblk|break|br\.s|xor|shl|ret|pop|not|nop|neg|jmp|dup|cgt|ceq|box|and|or|br)\b/, + 'function': /\b(?:(?:constrained|no|readonly|tail|unaligned|volatile)\.)?(?:conv\.(?:[iu][1248]?|ovf\.[iu][1248]?(?:\.un)?|r\.un|r4|r8)|ldc\.(?:i4(?:\.\d+|\.[mM]1|\.s)?|i8|r4|r8)|ldelem(?:\.[iu][1248]?|\.r[48]|\.ref|a)?|ldind\.(?:[iu][1248]?|r[48]|ref)|stelem\.?(?:i[1248]?|r[48]|ref)?|stind\.(?:i[1248]?|r[48]|ref)?|end(?:fault|filter|finally)|ldarg(?:\.[0-3s]|a(?:\.s)?)?|ldloc(?:\.\d+|\.s)?|sub(?:\.ovf(?:\.un)?)?|mul(?:\.ovf(?:\.un)?)?|add(?:\.ovf(?:\.un)?)?|stloc(?:\.[0-3s])?|refany(?:type|val)|blt(?:\.un)?(?:\.s)?|ble(?:\.un)?(?:\.s)?|bgt(?:\.un)?(?:\.s)?|bge(?:\.un)?(?:\.s)?|unbox(?:\.any)?|init(?:blk|obj)|call(?:i|virt)?|brfalse(?:\.s)?|bne\.un(?:\.s)?|ldloca(?:\.s)?|brzero(?:\.s)?|brtrue(?:\.s)?|brnull(?:\.s)?|brinst(?:\.s)?|starg(?:\.s)?|leave(?:\.s)?|shr(?:\.un)?|rem(?:\.un)?|div(?:\.un)?|clt(?:\.un)?|alignment|castclass|ldvirtftn|beq(?:\.s)?|ckfinite|ldsflda|ldtoken|localloc|mkrefany|rethrow|cgt\.un|arglist|switch|stsfld|sizeof|newobj|newarr|ldsfld|ldnull|ldflda|isinst|throw|stobj|stfld|ldstr|ldobj|ldlen|ldftn|ldfld|cpobj|cpblk|break|br\.s|xor|shl|ret|pop|not|nop|neg|jmp|dup|cgt|ceq|box|and|or|br)\b/, 'boolean': /\b(?:false|true)\b/, - 'number': /\b-?(?:0x[0-9a-f]+|[0-9]+)(?:\.[0-9a-f]+)?\b/i, + 'number': /\b-?(?:0x[0-9a-f]+|\d+)(?:\.[0-9a-f]+)?\b/i, 'punctuation': /[{}[\];(),:=]|IL_[0-9A-Za-z]+/ }; diff --git a/components/prism-cil.min.js b/components/prism-cil.min.js index dfb904dc1f..d65586adb1 100644 --- a/components/prism-cil.min.js +++ b/components/prism-cil.min.js @@ -1 +1 @@ -Prism.languages.cil={comment:/\/\/.*/,string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},directive:{pattern:/(^|\W)\.[a-z]+(?=\s)/,lookbehind:!0,alias:"class-name"},variable:/\[[\w\.]+\]/,keyword:/\b(?:abstract|ansi|assembly|auto|autochar|beforefieldinit|bool|bstr|byvalstr|catch|char|cil|class|currency|date|decimal|default|enum|error|explicit|extends|extern|famandassem|family|famorassem|final(?:ly)?|float32|float64|hidebysig|u?int(?:8|16|32|64)?|iant|idispatch|implements|import|initonly|instance|interface|iunknown|literal|lpstr|lpstruct|lptstr|lpwstr|managed|method|native(?:Type)?|nested|newslot|object(?:ref)?|pinvokeimpl|private|privatescope|public|reqsecobj|rtspecialname|runtime|sealed|sequential|serializable|specialname|static|string|struct|syschar|tbstr|unicode|unmanagedexp|unsigned|value(?:type)?|variant|virtual|void)\b/,function:/\b(?:(?:constrained|no|readonly|tail|unaligned|volatile)\.)?(?:conv\.(?:[iu][1248]?|ovf\.[iu][1248]?(?:\.un)?|r\.un|r4|r8)|ldc\.(?:i4(?:\.[0-9]+|\.[mM]1|\.s)?|i8|r4|r8)|ldelem(?:\.[iu][1248]?|\.r[48]|\.ref|a)?|ldind\.(?:[iu][1248]?|r[48]|ref)|stelem\.?(?:i[1248]?|r[48]|ref)?|stind\.(?:i[1248]?|r[48]|ref)?|end(?:fault|filter|finally)|ldarg(?:\.[0-3s]|a(?:\.s)?)?|ldloc(?:\.[0-9]+|\.s)?|sub(?:\.ovf(?:\.un)?)?|mul(?:\.ovf(?:\.un)?)?|add(?:\.ovf(?:\.un)?)?|stloc(?:\.[0-3s])?|refany(?:type|val)|blt(?:\.un)?(?:\.s)?|ble(?:\.un)?(?:\.s)?|bgt(?:\.un)?(?:\.s)?|bge(?:\.un)?(?:\.s)?|unbox(?:\.any)?|init(?:blk|obj)|call(?:i|virt)?|brfalse(?:\.s)?|bne\.un(?:\.s)?|ldloca(?:\.s)?|brzero(?:\.s)?|brtrue(?:\.s)?|brnull(?:\.s)?|brinst(?:\.s)?|starg(?:\.s)?|leave(?:\.s)?|shr(?:\.un)?|rem(?:\.un)?|div(?:\.un)?|clt(?:\.un)?|alignment|castclass|ldvirtftn|beq(?:\.s)?|ckfinite|ldsflda|ldtoken|localloc|mkrefany|rethrow|cgt\.un|arglist|switch|stsfld|sizeof|newobj|newarr|ldsfld|ldnull|ldflda|isinst|throw|stobj|stfld|ldstr|ldobj|ldlen|ldftn|ldfld|cpobj|cpblk|break|br\.s|xor|shl|ret|pop|not|nop|neg|jmp|dup|cgt|ceq|box|and|or|br)\b/,boolean:/\b(?:false|true)\b/,number:/\b-?(?:0x[0-9a-f]+|[0-9]+)(?:\.[0-9a-f]+)?\b/i,punctuation:/[{}[\];(),:=]|IL_[0-9A-Za-z]+/}; \ No newline at end of file +Prism.languages.cil={comment:/\/\/.*/,string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},directive:{pattern:/(^|\W)\.[a-z]+(?=\s)/,lookbehind:!0,alias:"class-name"},variable:/\[[\w\.]+\]/,keyword:/\b(?:abstract|ansi|assembly|auto|autochar|beforefieldinit|bool|bstr|byvalstr|catch|char|cil|class|currency|date|decimal|default|enum|error|explicit|extends|extern|famandassem|family|famorassem|final(?:ly)?|float32|float64|hidebysig|u?int(?:8|16|32|64)?|iant|idispatch|implements|import|initonly|instance|interface|iunknown|literal|lpstr|lpstruct|lptstr|lpwstr|managed|method|native(?:Type)?|nested|newslot|object(?:ref)?|pinvokeimpl|private|privatescope|public|reqsecobj|rtspecialname|runtime|sealed|sequential|serializable|specialname|static|string|struct|syschar|tbstr|unicode|unmanagedexp|unsigned|value(?:type)?|variant|virtual|void)\b/,function:/\b(?:(?:constrained|no|readonly|tail|unaligned|volatile)\.)?(?:conv\.(?:[iu][1248]?|ovf\.[iu][1248]?(?:\.un)?|r\.un|r4|r8)|ldc\.(?:i4(?:\.\d+|\.[mM]1|\.s)?|i8|r4|r8)|ldelem(?:\.[iu][1248]?|\.r[48]|\.ref|a)?|ldind\.(?:[iu][1248]?|r[48]|ref)|stelem\.?(?:i[1248]?|r[48]|ref)?|stind\.(?:i[1248]?|r[48]|ref)?|end(?:fault|filter|finally)|ldarg(?:\.[0-3s]|a(?:\.s)?)?|ldloc(?:\.\d+|\.s)?|sub(?:\.ovf(?:\.un)?)?|mul(?:\.ovf(?:\.un)?)?|add(?:\.ovf(?:\.un)?)?|stloc(?:\.[0-3s])?|refany(?:type|val)|blt(?:\.un)?(?:\.s)?|ble(?:\.un)?(?:\.s)?|bgt(?:\.un)?(?:\.s)?|bge(?:\.un)?(?:\.s)?|unbox(?:\.any)?|init(?:blk|obj)|call(?:i|virt)?|brfalse(?:\.s)?|bne\.un(?:\.s)?|ldloca(?:\.s)?|brzero(?:\.s)?|brtrue(?:\.s)?|brnull(?:\.s)?|brinst(?:\.s)?|starg(?:\.s)?|leave(?:\.s)?|shr(?:\.un)?|rem(?:\.un)?|div(?:\.un)?|clt(?:\.un)?|alignment|castclass|ldvirtftn|beq(?:\.s)?|ckfinite|ldsflda|ldtoken|localloc|mkrefany|rethrow|cgt\.un|arglist|switch|stsfld|sizeof|newobj|newarr|ldsfld|ldnull|ldflda|isinst|throw|stobj|stfld|ldstr|ldobj|ldlen|ldftn|ldfld|cpobj|cpblk|break|br\.s|xor|shl|ret|pop|not|nop|neg|jmp|dup|cgt|ceq|box|and|or|br)\b/,boolean:/\b(?:false|true)\b/,number:/\b-?(?:0x[0-9a-f]+|\d+)(?:\.[0-9a-f]+)?\b/i,punctuation:/[{}[\];(),:=]|IL_[0-9A-Za-z]+/}; \ No newline at end of file diff --git a/components/prism-http.js b/components/prism-http.js index afaf198a73..e2d9df4504 100644 --- a/components/prism-http.js +++ b/components/prism-http.js @@ -1,7 +1,7 @@ (function (Prism) { Prism.languages.http = { 'request-line': { - pattern: /^(?:CONNECT|DELETE|GET|HEAD|OPTIONS|PATCH|POST|PRI|PUT|SEARCH|TRACE)\s(?:https?:\/\/|\/)\S*\sHTTP\/[0-9.]+/m, + pattern: /^(?:CONNECT|DELETE|GET|HEAD|OPTIONS|PATCH|POST|PRI|PUT|SEARCH|TRACE)\s(?:https?:\/\/|\/)\S*\sHTTP\/[\d.]+/m, inside: { // HTTP Method 'method': { @@ -17,18 +17,18 @@ }, // HTTP Version 'http-version': { - pattern: /^(\s)HTTP\/[0-9.]+/, + pattern: /^(\s)HTTP\/[\d.]+/, lookbehind: true, alias: 'property' }, } }, 'response-status': { - pattern: /^HTTP\/[0-9.]+ \d+ .+/m, + pattern: /^HTTP\/[\d.]+ \d+ .+/m, inside: { // HTTP Version 'http-version': { - pattern: /^HTTP\/[0-9.]+/, + pattern: /^HTTP\/[\d.]+/, alias: 'property' }, // Status Code diff --git a/components/prism-http.min.js b/components/prism-http.min.js index 69db5379a7..4445ec2e52 100644 --- a/components/prism-http.min.js +++ b/components/prism-http.min.js @@ -1 +1 @@ -!function(t){t.languages.http={"request-line":{pattern:/^(?:CONNECT|DELETE|GET|HEAD|OPTIONS|PATCH|POST|PRI|PUT|SEARCH|TRACE)\s(?:https?:\/\/|\/)\S*\sHTTP\/[0-9.]+/m,inside:{method:{pattern:/^[A-Z]+\b/,alias:"property"},"request-target":{pattern:/^(\s)(?:https?:\/\/|\/)\S*(?=\s)/,lookbehind:!0,alias:"url",inside:t.languages.uri},"http-version":{pattern:/^(\s)HTTP\/[0-9.]+/,lookbehind:!0,alias:"property"}}},"response-status":{pattern:/^HTTP\/[0-9.]+ \d+ .+/m,inside:{"http-version":{pattern:/^HTTP\/[0-9.]+/,alias:"property"},"status-code":{pattern:/^(\s)\d+(?=\s)/,lookbehind:!0,alias:"number"},"reason-phrase":{pattern:/^(\s).+/,lookbehind:!0,alias:"string"}}},"header-name":{pattern:/^[\w-]+:(?=.)/m,alias:"keyword"}};var a,e,s,n=t.languages,r={"application/javascript":n.javascript,"application/json":n.json||n.javascript,"application/xml":n.xml,"text/xml":n.xml,"text/html":n.html,"text/css":n.css},i={"application/json":!0,"application/xml":!0};for(var p in r)if(r[p]){a=a||{};var o=i[p]?(void 0,s=(e=p).replace(/^[a-z]+\//,""),"(?:"+e+"|\\w+/(?:[\\w.-]+\\+)+"+s+"(?![+\\w.-]))"):p;a[p.replace(/\//g,"-")]={pattern:RegExp("(content-type:\\s*"+o+"(?:(?:\\r\\n?|\\n).+)*)(?:\\r?\\n|\\r){2}[\\s\\S]*","i"),lookbehind:!0,inside:r[p]}}a&&t.languages.insertBefore("http","header-name",a)}(Prism); \ No newline at end of file +!function(t){t.languages.http={"request-line":{pattern:/^(?:CONNECT|DELETE|GET|HEAD|OPTIONS|PATCH|POST|PRI|PUT|SEARCH|TRACE)\s(?:https?:\/\/|\/)\S*\sHTTP\/[\d.]+/m,inside:{method:{pattern:/^[A-Z]+\b/,alias:"property"},"request-target":{pattern:/^(\s)(?:https?:\/\/|\/)\S*(?=\s)/,lookbehind:!0,alias:"url",inside:t.languages.uri},"http-version":{pattern:/^(\s)HTTP\/[\d.]+/,lookbehind:!0,alias:"property"}}},"response-status":{pattern:/^HTTP\/[\d.]+ \d+ .+/m,inside:{"http-version":{pattern:/^HTTP\/[\d.]+/,alias:"property"},"status-code":{pattern:/^(\s)\d+(?=\s)/,lookbehind:!0,alias:"number"},"reason-phrase":{pattern:/^(\s).+/,lookbehind:!0,alias:"string"}}},"header-name":{pattern:/^[\w-]+:(?=.)/m,alias:"keyword"}};var a,e,s,n=t.languages,r={"application/javascript":n.javascript,"application/json":n.json||n.javascript,"application/xml":n.xml,"text/xml":n.xml,"text/html":n.html,"text/css":n.css},i={"application/json":!0,"application/xml":!0};for(var p in r)if(r[p]){a=a||{};var o=i[p]?(void 0,s=(e=p).replace(/^[a-z]+\//,""),"(?:"+e+"|\\w+/(?:[\\w.-]+\\+)+"+s+"(?![+\\w.-]))"):p;a[p.replace(/\//g,"-")]={pattern:RegExp("(content-type:\\s*"+o+"(?:(?:\\r\\n?|\\n).+)*)(?:\\r?\\n|\\r){2}[\\s\\S]*","i"),lookbehind:!0,inside:r[p]}}a&&t.languages.insertBefore("http","header-name",a)}(Prism); \ No newline at end of file diff --git a/components/prism-jsstacktrace.js b/components/prism-jsstacktrace.js index 4f859a8395..118c9dcc94 100644 --- a/components/prism-jsstacktrace.js +++ b/components/prism-jsstacktrace.js @@ -37,7 +37,7 @@ Prism.languages.jsstacktrace = { }, 'line-number': { - pattern: /:[0-9]+(?::[0-9]+)?\b/, + pattern: /:\d+(?::\d+)?\b/, alias: 'number', inside: { 'punctuation': /:/ diff --git a/components/prism-jsstacktrace.min.js b/components/prism-jsstacktrace.min.js index 87fe08689f..12174e89be 100644 --- a/components/prism-jsstacktrace.min.js +++ b/components/prism-jsstacktrace.min.js @@ -1 +1 @@ -Prism.languages.jsstacktrace={"error-message":{pattern:/^\S.*/m,alias:"string"},"stack-frame":{pattern:/(^[ \t]+)at[ \t].*/m,lookbehind:!0,inside:{"not-my-code":{pattern:/^at[ \t]+(?!\s)(?:node\.js||.*(?:node_modules|\(\)|\(|$|\(internal\/|\(node\.js)).*/m,alias:"comment"},filename:{pattern:/(\bat\s+(?!\s)|\()(?:[a-zA-Z]:)?[^():]+(?=:)/,lookbehind:!0,alias:"url"},function:{pattern:/(at\s+(?:new\s+)?)(?!\s)[_$a-zA-Z\xA0-\uFFFF<][.$\w\xA0-\uFFFF<>]*/,lookbehind:!0,inside:{punctuation:/\./}},punctuation:/[()]/,keyword:/\b(?:at|new)\b/,alias:{pattern:/\[(?:as\s+)?(?!\s)[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*\]/,alias:"variable"},"line-number":{pattern:/:[0-9]+(?::[0-9]+)?\b/,alias:"number",inside:{punctuation:/:/}}}}}; \ No newline at end of file +Prism.languages.jsstacktrace={"error-message":{pattern:/^\S.*/m,alias:"string"},"stack-frame":{pattern:/(^[ \t]+)at[ \t].*/m,lookbehind:!0,inside:{"not-my-code":{pattern:/^at[ \t]+(?!\s)(?:node\.js||.*(?:node_modules|\(\)|\(|$|\(internal\/|\(node\.js)).*/m,alias:"comment"},filename:{pattern:/(\bat\s+(?!\s)|\()(?:[a-zA-Z]:)?[^():]+(?=:)/,lookbehind:!0,alias:"url"},function:{pattern:/(at\s+(?:new\s+)?)(?!\s)[_$a-zA-Z\xA0-\uFFFF<][.$\w\xA0-\uFFFF<>]*/,lookbehind:!0,inside:{punctuation:/\./}},punctuation:/[()]/,keyword:/\b(?:at|new)\b/,alias:{pattern:/\[(?:as\s+)?(?!\s)[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*\]/,alias:"variable"},"line-number":{pattern:/:\d+(?::\d+)?\b/,alias:"number",inside:{punctuation:/:/}}}}}; \ No newline at end of file diff --git a/components/prism-mongodb.js b/components/prism-mongodb.js index 3e9d901749..453057ad3e 100644 --- a/components/prism-mongodb.js +++ b/components/prism-mongodb.js @@ -81,7 +81,7 @@ }, entity: { // ipv4 - pattern: /\b(?:(?:[01]?[0-9][0-9]?|2[0-4][0-9]|25[0-5])\.){3}(?:[01]?[0-9][0-9]?|2[0-4][0-9]|25[0-5])\b/, + pattern: /\b(?:(?:[01]?\d\d?|2[0-4]\d|25[0-5])\.){3}(?:[01]?\d\d?|2[0-4]\d|25[0-5])\b/, greedy: true } }; diff --git a/components/prism-mongodb.min.js b/components/prism-mongodb.min.js index daa35040c2..bf6db1cc9f 100644 --- a/components/prism-mongodb.min.js +++ b/components/prism-mongodb.min.js @@ -1 +1 @@ -!function($){var e=["$eq","$gt","$gte","$in","$lt","$lte","$ne","$nin","$and","$not","$nor","$or","$exists","$type","$expr","$jsonSchema","$mod","$regex","$text","$where","$geoIntersects","$geoWithin","$near","$nearSphere","$all","$elemMatch","$size","$bitsAllClear","$bitsAllSet","$bitsAnyClear","$bitsAnySet","$comment","$elemMatch","$meta","$slice","$currentDate","$inc","$min","$max","$mul","$rename","$set","$setOnInsert","$unset","$addToSet","$pop","$pull","$push","$pullAll","$each","$position","$slice","$sort","$bit","$addFields","$bucket","$bucketAuto","$collStats","$count","$currentOp","$facet","$geoNear","$graphLookup","$group","$indexStats","$limit","$listLocalSessions","$listSessions","$lookup","$match","$merge","$out","$planCacheStats","$project","$redact","$replaceRoot","$replaceWith","$sample","$set","$skip","$sort","$sortByCount","$unionWith","$unset","$unwind","$abs","$accumulator","$acos","$acosh","$add","$addToSet","$allElementsTrue","$and","$anyElementTrue","$arrayElemAt","$arrayToObject","$asin","$asinh","$atan","$atan2","$atanh","$avg","$binarySize","$bsonSize","$ceil","$cmp","$concat","$concatArrays","$cond","$convert","$cos","$dateFromParts","$dateToParts","$dateFromString","$dateToString","$dayOfMonth","$dayOfWeek","$dayOfYear","$degreesToRadians","$divide","$eq","$exp","$filter","$first","$floor","$function","$gt","$gte","$hour","$ifNull","$in","$indexOfArray","$indexOfBytes","$indexOfCP","$isArray","$isNumber","$isoDayOfWeek","$isoWeek","$isoWeekYear","$last","$last","$let","$literal","$ln","$log","$log10","$lt","$lte","$ltrim","$map","$max","$mergeObjects","$meta","$min","$millisecond","$minute","$mod","$month","$multiply","$ne","$not","$objectToArray","$or","$pow","$push","$radiansToDegrees","$range","$reduce","$regexFind","$regexFindAll","$regexMatch","$replaceOne","$replaceAll","$reverseArray","$round","$rtrim","$second","$setDifference","$setEquals","$setIntersection","$setIsSubset","$setUnion","$size","$sin","$slice","$split","$sqrt","$stdDevPop","$stdDevSamp","$strcasecmp","$strLenBytes","$strLenCP","$substr","$substrBytes","$substrCP","$subtract","$sum","$switch","$tan","$toBool","$toDate","$toDecimal","$toDouble","$toInt","$toLong","$toObjectId","$toString","$toLower","$toUpper","$trim","$trunc","$type","$week","$year","$zip","$comment","$explain","$hint","$max","$maxTimeMS","$min","$orderby","$query","$returnKey","$showDiskLoc","$natural"],t="(?:"+(e=e.map(function($){return $.replace("$","\\$")})).join("|")+")\\b";$.languages.mongodb=$.languages.extend("javascript",{}),$.languages.insertBefore("mongodb","string",{property:{pattern:/(?:(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)(?=\s*:)/,greedy:!0,inside:{keyword:RegExp("^(['\"])?"+t+"(?:\\1)?$")}}}),$.languages.mongodb.string.inside={url:{pattern:/https?:\/\/[-\w@:%.+~#=]{1,256}\.[a-z0-9()]{1,6}\b[-\w()@:%+.~#?&/=]*/i,greedy:!0},entity:{pattern:/\b(?:(?:[01]?[0-9][0-9]?|2[0-4][0-9]|25[0-5])\.){3}(?:[01]?[0-9][0-9]?|2[0-4][0-9]|25[0-5])\b/,greedy:!0}},$.languages.insertBefore("mongodb","constant",{builtin:{pattern:RegExp("\\b(?:"+["ObjectId","Code","BinData","DBRef","Timestamp","NumberLong","NumberDecimal","MaxKey","MinKey","RegExp","ISODate","UUID"].join("|")+")\\b"),alias:"keyword"}})}(Prism); \ No newline at end of file +!function($){var e=["$eq","$gt","$gte","$in","$lt","$lte","$ne","$nin","$and","$not","$nor","$or","$exists","$type","$expr","$jsonSchema","$mod","$regex","$text","$where","$geoIntersects","$geoWithin","$near","$nearSphere","$all","$elemMatch","$size","$bitsAllClear","$bitsAllSet","$bitsAnyClear","$bitsAnySet","$comment","$elemMatch","$meta","$slice","$currentDate","$inc","$min","$max","$mul","$rename","$set","$setOnInsert","$unset","$addToSet","$pop","$pull","$push","$pullAll","$each","$position","$slice","$sort","$bit","$addFields","$bucket","$bucketAuto","$collStats","$count","$currentOp","$facet","$geoNear","$graphLookup","$group","$indexStats","$limit","$listLocalSessions","$listSessions","$lookup","$match","$merge","$out","$planCacheStats","$project","$redact","$replaceRoot","$replaceWith","$sample","$set","$skip","$sort","$sortByCount","$unionWith","$unset","$unwind","$abs","$accumulator","$acos","$acosh","$add","$addToSet","$allElementsTrue","$and","$anyElementTrue","$arrayElemAt","$arrayToObject","$asin","$asinh","$atan","$atan2","$atanh","$avg","$binarySize","$bsonSize","$ceil","$cmp","$concat","$concatArrays","$cond","$convert","$cos","$dateFromParts","$dateToParts","$dateFromString","$dateToString","$dayOfMonth","$dayOfWeek","$dayOfYear","$degreesToRadians","$divide","$eq","$exp","$filter","$first","$floor","$function","$gt","$gte","$hour","$ifNull","$in","$indexOfArray","$indexOfBytes","$indexOfCP","$isArray","$isNumber","$isoDayOfWeek","$isoWeek","$isoWeekYear","$last","$last","$let","$literal","$ln","$log","$log10","$lt","$lte","$ltrim","$map","$max","$mergeObjects","$meta","$min","$millisecond","$minute","$mod","$month","$multiply","$ne","$not","$objectToArray","$or","$pow","$push","$radiansToDegrees","$range","$reduce","$regexFind","$regexFindAll","$regexMatch","$replaceOne","$replaceAll","$reverseArray","$round","$rtrim","$second","$setDifference","$setEquals","$setIntersection","$setIsSubset","$setUnion","$size","$sin","$slice","$split","$sqrt","$stdDevPop","$stdDevSamp","$strcasecmp","$strLenBytes","$strLenCP","$substr","$substrBytes","$substrCP","$subtract","$sum","$switch","$tan","$toBool","$toDate","$toDecimal","$toDouble","$toInt","$toLong","$toObjectId","$toString","$toLower","$toUpper","$trim","$trunc","$type","$week","$year","$zip","$comment","$explain","$hint","$max","$maxTimeMS","$min","$orderby","$query","$returnKey","$showDiskLoc","$natural"],t="(?:"+(e=e.map(function($){return $.replace("$","\\$")})).join("|")+")\\b";$.languages.mongodb=$.languages.extend("javascript",{}),$.languages.insertBefore("mongodb","string",{property:{pattern:/(?:(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)(?=\s*:)/,greedy:!0,inside:{keyword:RegExp("^(['\"])?"+t+"(?:\\1)?$")}}}),$.languages.mongodb.string.inside={url:{pattern:/https?:\/\/[-\w@:%.+~#=]{1,256}\.[a-z0-9()]{1,6}\b[-\w()@:%+.~#?&/=]*/i,greedy:!0},entity:{pattern:/\b(?:(?:[01]?\d\d?|2[0-4]\d|25[0-5])\.){3}(?:[01]?\d\d?|2[0-4]\d|25[0-5])\b/,greedy:!0}},$.languages.insertBefore("mongodb","constant",{builtin:{pattern:RegExp("\\b(?:"+["ObjectId","Code","BinData","DBRef","Timestamp","NumberLong","NumberDecimal","MaxKey","MinKey","RegExp","ISODate","UUID"].join("|")+")\\b"),alias:"keyword"}})}(Prism); \ No newline at end of file diff --git a/components/prism-psl.js b/components/prism-psl.js index f97b5b77d5..ee8904c20f 100644 --- a/components/prism-psl.js +++ b/components/prism-psl.js @@ -30,7 +30,7 @@ Prism.languages.psl = { 'function': { pattern: /\b[_a-z]\w*\b(?=\s*\()/i, }, - 'number': /\b(?:0x[0-9a-f]+|[0-9]+(?:\.[0-9]+)?)\b/i, + 'number': /\b(?:0x[0-9a-f]+|\d+(?:\.\d+)?)\b/i, 'operator': /--|\+\+|&&=?|\|\|=?|<<=?|>>=?|[=!]~|[-+*/%&|^!=<>]=?|\.|[:?]/, 'punctuation': /[(){}\[\];,]/ }; diff --git a/components/prism-psl.min.js b/components/prism-psl.min.js index 49ba8a55b5..c4392adab1 100644 --- a/components/prism-psl.min.js +++ b/components/prism-psl.min.js @@ -1 +1 @@ -Prism.languages.psl={comment:{pattern:/#.*/,greedy:!0},string:{pattern:/"(?:\\.|[^\\"])*"/,greedy:!0,inside:{symbol:/\\[ntrbA-Z"\\]/}},"heredoc-string":{pattern:/<<<([a-zA-Z_]\w*)[\r\n](?:.*[\r\n])*?\1\b/,alias:"string",greedy:!0},keyword:/\b(?:__multi|__single|case|default|do|else|elsif|exit|export|for|foreach|function|if|last|line|local|next|requires|return|switch|until|while|word)\b/,constant:/\b(?:ALARM|CHART_ADD_GRAPH|CHART_DELETE_GRAPH|CHART_DESTROY|CHART_LOAD|CHART_PRINT|EOF|FALSE|False|NO|No|OFFLINE|OK|PSL_PROF_LOG|R_CHECK_HORIZ|R_CHECK_VERT|R_CLICKER|R_COLUMN|R_FRAME|R_ICON|R_LABEL|R_LABEL_CENTER|R_LIST_MULTIPLE|R_LIST_MULTIPLE_ND|R_LIST_SINGLE|R_LIST_SINGLE_ND|R_MENU|R_POPUP|R_POPUP_SCROLLED|R_RADIO_HORIZ|R_RADIO_VERT|R_ROW|R_SCALE_HORIZ|R_SCALE_VERT|R_SPINNER|R_TEXT_FIELD|R_TEXT_FIELD_LABEL|R_TOGGLE|TRIM_LEADING|TRIM_LEADING_AND_TRAILING|TRIM_REDUNDANT|TRIM_TRAILING|TRUE|True|VOID|WARN|false|no|true)\b/,variable:/\b(?:PslDebug|errno|exit_status)\b/,builtin:{pattern:/\b(?:PslExecute|PslFunctionCall|PslFunctionExists|PslSetOptions|_snmp_debug|acos|add_diary|annotate|annotate_get|ascii_to_ebcdic|asctime|asin|atan|atexit|batch_set|blackout|cat|ceil|chan_exists|change_state|close|code_cvt|cond_signal|cond_wait|console_type|convert_base|convert_date|convert_locale_date|cos|cosh|create|date|dcget_text|destroy|destroy_lock|dget_text|difference|dump_hist|ebcdic_to_ascii|encrypt|event_archive|event_catalog_get|event_check|event_query|event_range_manage|event_range_query|event_report|event_schedule|event_trigger|event_trigger2|execute|exists|exp|fabs|file|floor|fmod|fopen|fseek|ftell|full_discovery|get|get_chan_info|get_ranges|get_text|get_vars|getenv|gethostinfo|getpid|getpname|grep|history|history_get_retention|in_transition|index|int|internal|intersection|is_var|isnumber|join|kill|length|lines|lock|lock_info|log|log10|loge|matchline|msg_check|msg_get_format|msg_get_severity|msg_printf|msg_sprintf|ntharg|nthargf|nthline|nthlinef|num_bytes|num_consoles|pconfig|popen|poplines|pow|print|printf|proc_exists|process|random|read|readln|refresh_parameters|remote_check|remote_close|remote_event_query|remote_event_trigger|remote_file_send|remote_open|remove|replace|rindex|sec_check_priv|sec_store_get|sec_store_set|set|set_alarm_ranges|set_locale|share|sin|sinh|sleep|snmp_agent_config|snmp_agent_start|snmp_agent_stop|snmp_close|snmp_config|snmp_get|snmp_get_next|snmp_h_get|snmp_h_get_next|snmp_h_set|snmp_open|snmp_set|snmp_trap_ignore|snmp_trap_listen|snmp_trap_raise_std_trap|snmp_trap_receive|snmp_trap_register_im|snmp_trap_send|snmp_walk|sopen|sort|splitline|sprintf|sqrt|srandom|str_repeat|strcasecmp|subset|substr|system|tail|tan|tanh|text_domain|time|tmpnam|tolower|toupper|trace_psl_process|trim|union|unique|unlock|unset|va_arg|va_start|write)\b/,alias:"builtin-function"},"foreach-variable":{pattern:/(\bforeach\s+(?:(?:\w+\b|"(?:\\.|[^\\"])*")\s+){0,2})[_a-zA-Z]\w*(?=\s*\()/,lookbehind:!0,greedy:!0},function:{pattern:/\b[_a-z]\w*\b(?=\s*\()/i},number:/\b(?:0x[0-9a-f]+|[0-9]+(?:\.[0-9]+)?)\b/i,operator:/--|\+\+|&&=?|\|\|=?|<<=?|>>=?|[=!]~|[-+*/%&|^!=<>]=?|\.|[:?]/,punctuation:/[(){}\[\];,]/}; \ No newline at end of file +Prism.languages.psl={comment:{pattern:/#.*/,greedy:!0},string:{pattern:/"(?:\\.|[^\\"])*"/,greedy:!0,inside:{symbol:/\\[ntrbA-Z"\\]/}},"heredoc-string":{pattern:/<<<([a-zA-Z_]\w*)[\r\n](?:.*[\r\n])*?\1\b/,alias:"string",greedy:!0},keyword:/\b(?:__multi|__single|case|default|do|else|elsif|exit|export|for|foreach|function|if|last|line|local|next|requires|return|switch|until|while|word)\b/,constant:/\b(?:ALARM|CHART_ADD_GRAPH|CHART_DELETE_GRAPH|CHART_DESTROY|CHART_LOAD|CHART_PRINT|EOF|FALSE|False|NO|No|OFFLINE|OK|PSL_PROF_LOG|R_CHECK_HORIZ|R_CHECK_VERT|R_CLICKER|R_COLUMN|R_FRAME|R_ICON|R_LABEL|R_LABEL_CENTER|R_LIST_MULTIPLE|R_LIST_MULTIPLE_ND|R_LIST_SINGLE|R_LIST_SINGLE_ND|R_MENU|R_POPUP|R_POPUP_SCROLLED|R_RADIO_HORIZ|R_RADIO_VERT|R_ROW|R_SCALE_HORIZ|R_SCALE_VERT|R_SPINNER|R_TEXT_FIELD|R_TEXT_FIELD_LABEL|R_TOGGLE|TRIM_LEADING|TRIM_LEADING_AND_TRAILING|TRIM_REDUNDANT|TRIM_TRAILING|TRUE|True|VOID|WARN|false|no|true)\b/,variable:/\b(?:PslDebug|errno|exit_status)\b/,builtin:{pattern:/\b(?:PslExecute|PslFunctionCall|PslFunctionExists|PslSetOptions|_snmp_debug|acos|add_diary|annotate|annotate_get|ascii_to_ebcdic|asctime|asin|atan|atexit|batch_set|blackout|cat|ceil|chan_exists|change_state|close|code_cvt|cond_signal|cond_wait|console_type|convert_base|convert_date|convert_locale_date|cos|cosh|create|date|dcget_text|destroy|destroy_lock|dget_text|difference|dump_hist|ebcdic_to_ascii|encrypt|event_archive|event_catalog_get|event_check|event_query|event_range_manage|event_range_query|event_report|event_schedule|event_trigger|event_trigger2|execute|exists|exp|fabs|file|floor|fmod|fopen|fseek|ftell|full_discovery|get|get_chan_info|get_ranges|get_text|get_vars|getenv|gethostinfo|getpid|getpname|grep|history|history_get_retention|in_transition|index|int|internal|intersection|is_var|isnumber|join|kill|length|lines|lock|lock_info|log|log10|loge|matchline|msg_check|msg_get_format|msg_get_severity|msg_printf|msg_sprintf|ntharg|nthargf|nthline|nthlinef|num_bytes|num_consoles|pconfig|popen|poplines|pow|print|printf|proc_exists|process|random|read|readln|refresh_parameters|remote_check|remote_close|remote_event_query|remote_event_trigger|remote_file_send|remote_open|remove|replace|rindex|sec_check_priv|sec_store_get|sec_store_set|set|set_alarm_ranges|set_locale|share|sin|sinh|sleep|snmp_agent_config|snmp_agent_start|snmp_agent_stop|snmp_close|snmp_config|snmp_get|snmp_get_next|snmp_h_get|snmp_h_get_next|snmp_h_set|snmp_open|snmp_set|snmp_trap_ignore|snmp_trap_listen|snmp_trap_raise_std_trap|snmp_trap_receive|snmp_trap_register_im|snmp_trap_send|snmp_walk|sopen|sort|splitline|sprintf|sqrt|srandom|str_repeat|strcasecmp|subset|substr|system|tail|tan|tanh|text_domain|time|tmpnam|tolower|toupper|trace_psl_process|trim|union|unique|unlock|unset|va_arg|va_start|write)\b/,alias:"builtin-function"},"foreach-variable":{pattern:/(\bforeach\s+(?:(?:\w+\b|"(?:\\.|[^\\"])*")\s+){0,2})[_a-zA-Z]\w*(?=\s*\()/,lookbehind:!0,greedy:!0},function:{pattern:/\b[_a-z]\w*\b(?=\s*\()/i},number:/\b(?:0x[0-9a-f]+|\d+(?:\.\d+)?)\b/i,operator:/--|\+\+|&&=?|\|\|=?|<<=?|>>=?|[=!]~|[-+*/%&|^!=<>]=?|\.|[:?]/,punctuation:/[(){}\[\];,]/}; \ No newline at end of file diff --git a/components/prism-tremor.js b/components/prism-tremor.js index 58f7447013..8e8e43ed24 100644 --- a/components/prism-tremor.js +++ b/components/prism-tremor.js @@ -24,7 +24,7 @@ 'keyword': /\b(?:args|as|by|case|config|connect|connector|const|copy|create|default|define|deploy|drop|each|emit|end|erase|event|flow|fn|for|from|group|having|insert|into|intrinsic|let|links|match|merge|mod|move|of|operator|patch|pipeline|recur|script|select|set|sliding|state|stream|to|tumbling|update|use|when|where|window|with)\b/, 'boolean': /\b(?:false|null|true)\b/i, - 'number': /\b(?:0b[0-1_]*|0x[0-9a-fA-F_]*|\d[0-9_]*(?:\.\d[0-9_]*)?(?:[Ee][+-]?[0-9_]+)?)\b/, + 'number': /\b(?:0b[0-1_]*|0x[0-9a-fA-F_]*|\d[\d_]*(?:\.\d[\d_]*)?(?:[Ee][+-]?[\d_]+)?)\b/, 'pattern-punctuation': { pattern: /%(?=[({[])/, diff --git a/components/prism-tremor.min.js b/components/prism-tremor.min.js index 0265a36478..096a82d086 100644 --- a/components/prism-tremor.min.js +++ b/components/prism-tremor.min.js @@ -1 +1 @@ -!function(e){e.languages.tremor={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},"interpolated-string":null,extractor:{pattern:/\b[a-z_]\w*\|(?:[^\r\n\\|]|\\(?:\r\n|[\s\S]))*\|/i,greedy:!0,inside:{function:/^\w+/,regex:/\|[\s\S]+/}},identifier:{pattern:/`[^`]*`/,greedy:!0},function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())\b/,keyword:/\b(?:args|as|by|case|config|connect|connector|const|copy|create|default|define|deploy|drop|each|emit|end|erase|event|flow|fn|for|from|group|having|insert|into|intrinsic|let|links|match|merge|mod|move|of|operator|patch|pipeline|recur|script|select|set|sliding|state|stream|to|tumbling|update|use|when|where|window|with)\b/,boolean:/\b(?:false|null|true)\b/i,number:/\b(?:0b[0-1_]*|0x[0-9a-fA-F_]*|\d[0-9_]*(?:\.\d[0-9_]*)?(?:[Ee][+-]?[0-9_]+)?)\b/,"pattern-punctuation":{pattern:/%(?=[({[])/,alias:"punctuation"},operator:/[-+*\/%~!^]=?|=[=>]?|&[&=]?|\|[|=]?|<>?>?=?|(?:absent|and|not|or|present|xor)\b/,punctuation:/::|[;\[\]()\{\},.:]/};var n='#\\{(?:[^"{}]|\\{[^{}]*\\}|"(?:[^"\\\\\r\n]|\\\\(?:\r\n|[^]))*")*\\}';e.languages.tremor["interpolated-string"]={pattern:RegExp('(^|[^\\\\])(?:"""(?:[^"\\\\#]|\\\\[^]|"(?!"")|#(?!\\{)|'+n+')*"""|"(?:[^"\\\\\r\n#]|\\\\(?:\r\n|[^])|#(?!\\{)|'+n+')*")'),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:RegExp(n),inside:{punctuation:/^#\{|\}$/,expression:{pattern:/[\s\S]+/,inside:e.languages.tremor}}},string:/[\s\S]+/}},e.languages.troy=e.languages.tremor,e.languages.trickle=e.languages.tremor}(Prism); \ No newline at end of file +!function(e){e.languages.tremor={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},"interpolated-string":null,extractor:{pattern:/\b[a-z_]\w*\|(?:[^\r\n\\|]|\\(?:\r\n|[\s\S]))*\|/i,greedy:!0,inside:{function:/^\w+/,regex:/\|[\s\S]+/}},identifier:{pattern:/`[^`]*`/,greedy:!0},function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())\b/,keyword:/\b(?:args|as|by|case|config|connect|connector|const|copy|create|default|define|deploy|drop|each|emit|end|erase|event|flow|fn|for|from|group|having|insert|into|intrinsic|let|links|match|merge|mod|move|of|operator|patch|pipeline|recur|script|select|set|sliding|state|stream|to|tumbling|update|use|when|where|window|with)\b/,boolean:/\b(?:false|null|true)\b/i,number:/\b(?:0b[0-1_]*|0x[0-9a-fA-F_]*|\d[\d_]*(?:\.\d[\d_]*)?(?:[Ee][+-]?[\d_]+)?)\b/,"pattern-punctuation":{pattern:/%(?=[({[])/,alias:"punctuation"},operator:/[-+*\/%~!^]=?|=[=>]?|&[&=]?|\|[|=]?|<>?>?=?|(?:absent|and|not|or|present|xor)\b/,punctuation:/::|[;\[\]()\{\},.:]/};var n='#\\{(?:[^"{}]|\\{[^{}]*\\}|"(?:[^"\\\\\r\n]|\\\\(?:\r\n|[^]))*")*\\}';e.languages.tremor["interpolated-string"]={pattern:RegExp('(^|[^\\\\])(?:"""(?:[^"\\\\#]|\\\\[^]|"(?!"")|#(?!\\{)|'+n+')*"""|"(?:[^"\\\\\r\n#]|\\\\(?:\r\n|[^])|#(?!\\{)|'+n+')*")'),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:RegExp(n),inside:{punctuation:/^#\{|\}$/,expression:{pattern:/[\s\S]+/,inside:e.languages.tremor}}},string:/[\s\S]+/}},e.languages.troy=e.languages.tremor,e.languages.trickle=e.languages.tremor}(Prism); \ No newline at end of file diff --git a/components/prism-typoscript.js b/components/prism-typoscript.js index bcd30779f7..108aba41ab 100644 --- a/components/prism-typoscript.js +++ b/components/prism-typoscript.js @@ -53,14 +53,14 @@ inside: { 'function': /\{\$.*\}/, // constants include 'keyword': keywords, - 'number': /^[0-9]+$/, + 'number': /^\d+$/, 'punctuation': /[,|:]/, } }, 'keyword': keywords, 'number': { // special highlighting for indexes of arrays in tags - pattern: /\b[0-9]+\s*[.{=]/, + pattern: /\b\d+\s*[.{=]/, inside: { 'operator': /[.{=]/, } diff --git a/components/prism-typoscript.min.js b/components/prism-typoscript.min.js index 8a8a709ee0..c41b8e82a0 100644 --- a/components/prism-typoscript.min.js +++ b/components/prism-typoscript.min.js @@ -1 +1 @@ -!function(E){var n=/\b(?:ACT|ACTIFSUB|CARRAY|CASE|CLEARGIF|COA|COA_INT|CONSTANTS|CONTENT|CUR|EDITPANEL|EFFECT|EXT|FILE|FLUIDTEMPLATE|FORM|FRAME|FRAMESET|GIFBUILDER|GMENU|GMENU_FOLDOUT|GMENU_LAYERS|GP|HMENU|HRULER|HTML|IENV|IFSUB|IMAGE|IMGMENU|IMGMENUITEM|IMGTEXT|IMG_RESOURCE|INCLUDE_TYPOSCRIPT|JSMENU|JSMENUITEM|LLL|LOAD_REGISTER|NO|PAGE|RECORDS|RESTORE_REGISTER|TEMPLATE|TEXT|TMENU|TMENUITEM|TMENU_LAYERS|USER|USER_INT|_GIFBUILDER|global|globalString|globalVar)\b/;E.languages.typoscript={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0},{pattern:/(^|[^\\:= \t]|(?:^|[^= \t])[ \t]+)\/\/.*/,lookbehind:!0,greedy:!0},{pattern:/(^|[^"'])#.*/,lookbehind:!0,greedy:!0}],function:[{pattern://,inside:{string:{pattern:/"[^"\r\n]*"|'[^'\r\n]*'/,inside:{keyword:n}},keyword:{pattern:/INCLUDE_TYPOSCRIPT/}}},{pattern:/@import\s*(?:"[^"\r\n]*"|'[^'\r\n]*')/,inside:{string:/"[^"\r\n]*"|'[^'\r\n]*'/}}],string:{pattern:/^([^=]*=[< ]?)(?:(?!\]\n).)*/,lookbehind:!0,inside:{function:/\{\$.*\}/,keyword:n,number:/^[0-9]+$/,punctuation:/[,|:]/}},keyword:n,number:{pattern:/\b[0-9]+\s*[.{=]/,inside:{operator:/[.{=]/}},tag:{pattern:/\.?[-\w\\]+\.?/,inside:{punctuation:/\./}},punctuation:/[{}[\];(),.:|]/,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/},E.languages.tsconfig=E.languages.typoscript}(Prism); \ No newline at end of file +!function(E){var n=/\b(?:ACT|ACTIFSUB|CARRAY|CASE|CLEARGIF|COA|COA_INT|CONSTANTS|CONTENT|CUR|EDITPANEL|EFFECT|EXT|FILE|FLUIDTEMPLATE|FORM|FRAME|FRAMESET|GIFBUILDER|GMENU|GMENU_FOLDOUT|GMENU_LAYERS|GP|HMENU|HRULER|HTML|IENV|IFSUB|IMAGE|IMGMENU|IMGMENUITEM|IMGTEXT|IMG_RESOURCE|INCLUDE_TYPOSCRIPT|JSMENU|JSMENUITEM|LLL|LOAD_REGISTER|NO|PAGE|RECORDS|RESTORE_REGISTER|TEMPLATE|TEXT|TMENU|TMENUITEM|TMENU_LAYERS|USER|USER_INT|_GIFBUILDER|global|globalString|globalVar)\b/;E.languages.typoscript={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0},{pattern:/(^|[^\\:= \t]|(?:^|[^= \t])[ \t]+)\/\/.*/,lookbehind:!0,greedy:!0},{pattern:/(^|[^"'])#.*/,lookbehind:!0,greedy:!0}],function:[{pattern://,inside:{string:{pattern:/"[^"\r\n]*"|'[^'\r\n]*'/,inside:{keyword:n}},keyword:{pattern:/INCLUDE_TYPOSCRIPT/}}},{pattern:/@import\s*(?:"[^"\r\n]*"|'[^'\r\n]*')/,inside:{string:/"[^"\r\n]*"|'[^'\r\n]*'/}}],string:{pattern:/^([^=]*=[< ]?)(?:(?!\]\n).)*/,lookbehind:!0,inside:{function:/\{\$.*\}/,keyword:n,number:/^\d+$/,punctuation:/[,|:]/}},keyword:n,number:{pattern:/\b\d+\s*[.{=]/,inside:{operator:/[.{=]/}},tag:{pattern:/\.?[-\w\\]+\.?/,inside:{punctuation:/\./}},punctuation:/[{}[\];(),.:|]/,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/},E.languages.tsconfig=E.languages.typoscript}(Prism); \ No newline at end of file From 5138252468af69481dcab0eae3b1ab5e97dc90ee Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Tue, 5 Oct 2021 11:48:26 +0200 Subject: [PATCH 0927/1100] Smalltalk: Added `boolean` token (#3100) --- components/prism-smalltalk.js | 3 ++- components/prism-smalltalk.min.js | 2 +- tests/languages/smalltalk/boolean_feature.test | 8 ++++++++ tests/languages/smalltalk/keyword_feature.test | 6 +++--- 4 files changed, 14 insertions(+), 5 deletions(-) create mode 100644 tests/languages/smalltalk/boolean_feature.test diff --git a/components/prism-smalltalk.js b/components/prism-smalltalk.js index aa71e36fa2..2dbf08a30b 100644 --- a/components/prism-smalltalk.js +++ b/components/prism-smalltalk.js @@ -21,7 +21,8 @@ Prism.languages.smalltalk = { 'punctuation': /\|/ } }, - 'keyword': /\b(?:false|new|nil|self|super|true)\b/, + 'keyword': /\b(?:new|nil|self|super)\b/, + 'boolean': /\b(?:false|true)\b/, 'number': [ /\d+r-?[\dA-Z]+(?:\.[\dA-Z]+)?(?:e-?\d+)?/, /\b\d+(?:\.\d+)?(?:e-?\d+)?/ diff --git a/components/prism-smalltalk.min.js b/components/prism-smalltalk.min.js index 0eb0e73d2d..5deec21e65 100644 --- a/components/prism-smalltalk.min.js +++ b/components/prism-smalltalk.min.js @@ -1 +1 @@ -Prism.languages.smalltalk={comment:/"(?:""|[^"])*"/,character:{pattern:/\$./,alias:"string"},string:/'(?:''|[^'])*'/,symbol:/#[\da-z]+|#(?:-|([+\/\\*~<>=@%|&?!])\1?)|#(?=\()/i,"block-arguments":{pattern:/(\[\s*):[^\[|]*\|/,lookbehind:!0,inside:{variable:/:[\da-z]+/i,punctuation:/\|/}},"temporary-variables":{pattern:/\|[^|]+\|/,inside:{variable:/[\da-z]+/i,punctuation:/\|/}},keyword:/\b(?:false|new|nil|self|super|true)\b/,number:[/\d+r-?[\dA-Z]+(?:\.[\dA-Z]+)?(?:e-?\d+)?/,/\b\d+(?:\.\d+)?(?:e-?\d+)?/],operator:/[<=]=?|:=|~[~=]|\/\/?|\\\\|>[>=]?|[!^+\-*&|,@]/,punctuation:/[.;:?\[\](){}]/}; \ No newline at end of file +Prism.languages.smalltalk={comment:/"(?:""|[^"])*"/,character:{pattern:/\$./,alias:"string"},string:/'(?:''|[^'])*'/,symbol:/#[\da-z]+|#(?:-|([+\/\\*~<>=@%|&?!])\1?)|#(?=\()/i,"block-arguments":{pattern:/(\[\s*):[^\[|]*\|/,lookbehind:!0,inside:{variable:/:[\da-z]+/i,punctuation:/\|/}},"temporary-variables":{pattern:/\|[^|]+\|/,inside:{variable:/[\da-z]+/i,punctuation:/\|/}},keyword:/\b(?:new|nil|self|super)\b/,boolean:/\b(?:false|true)\b/,number:[/\d+r-?[\dA-Z]+(?:\.[\dA-Z]+)?(?:e-?\d+)?/,/\b\d+(?:\.\d+)?(?:e-?\d+)?/],operator:/[<=]=?|:=|~[~=]|\/\/?|\\\\|>[>=]?|[!^+\-*&|,@]/,punctuation:/[.;:?\[\](){}]/}; \ No newline at end of file diff --git a/tests/languages/smalltalk/boolean_feature.test b/tests/languages/smalltalk/boolean_feature.test new file mode 100644 index 0000000000..e002f72d44 --- /dev/null +++ b/tests/languages/smalltalk/boolean_feature.test @@ -0,0 +1,8 @@ +true false + +---------------------------------------------------- + +[ + ["boolean", "true"], + ["boolean", "false"] +] diff --git a/tests/languages/smalltalk/keyword_feature.test b/tests/languages/smalltalk/keyword_feature.test index 253c192226..85e80a94ee 100644 --- a/tests/languages/smalltalk/keyword_feature.test +++ b/tests/languages/smalltalk/keyword_feature.test @@ -1,13 +1,13 @@ -nil true false +nil self super new ---------------------------------------------------- [ - ["keyword", "nil"], ["keyword", "true"], ["keyword", "false"], + ["keyword", "nil"], ["keyword", "self"], ["keyword", "super"], ["keyword", "new"] ] ---------------------------------------------------- -Checks for keywords. \ No newline at end of file +Checks for keywords. From 00f77a2ca83d1f0caf8836f295b951a44bdeeddd Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Tue, 5 Oct 2021 11:48:58 +0200 Subject: [PATCH 0928/1100] Markdown: Fixed typo in token name (#3101) --- components/prism-markdown.js | 2 +- components/prism-markdown.min.js | 2 +- tests/languages/markdown/front-matter-block_feature.test | 4 ++-- tests/languages/yaml+markdown/front-matter_feature.test | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/components/prism-markdown.js b/components/prism-markdown.js index 7b8f05d0b5..438f8ed8fc 100644 --- a/components/prism-markdown.js +++ b/components/prism-markdown.js @@ -32,7 +32,7 @@ greedy: true, inside: { 'punctuation': /^---|---$/, - 'font-matter': { + 'front-matter': { pattern: /\S+(?:\s+\S+)*/, alias: ['yaml', 'language-yaml'], inside: Prism.languages.yaml diff --git a/components/prism-markdown.min.js b/components/prism-markdown.min.js index b247aa9b57..cc9f7b28da 100644 --- a/components/prism-markdown.min.js +++ b/components/prism-markdown.min.js @@ -1 +1 @@ -!function(s){function n(n){return n=n.replace(//g,function(){return"(?:\\\\.|[^\\\\\n\r]|(?:\n|\r\n?)(?![\r\n]))"}),RegExp("((?:^|[^\\\\])(?:\\\\{2})*)(?:"+n+")")}var e="(?:\\\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\\\|\r\n`])+",t="\\|?__(?:\\|__)+\\|?(?:(?:\n|\r\n?)|(?![^]))".replace(/__/g,function(){return e}),a="\\|?[ \t]*:?-{3,}:?[ \t]*(?:\\|[ \t]*:?-{3,}:?[ \t]*)+\\|?(?:\n|\r\n?)";s.languages.markdown=s.languages.extend("markup",{}),s.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"font-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:s.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+t+a+"(?:"+t+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+t+a+")(?:"+t+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(e),inside:s.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+t+")"+a+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+t+"$"),inside:{"table-header":{pattern:RegExp(e),alias:"important",inside:s.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n("\\b__(?:(?!_)|_(?:(?!_))+_)+__\\b|\\*\\*(?:(?!\\*)|\\*(?:(?!\\*))+\\*)+\\*\\*"),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n("\\b_(?:(?!_)|__(?:(?!_))+__)+_\\b|\\*(?:(?!\\*)|\\*\\*(?:(?!\\*))+\\*\\*)+\\*"),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n("(~~?)(?:(?!~))+\\2"),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:n('!?\\[(?:(?!\\]))+\\](?:\\([^\\s)]+(?:[\t ]+"(?:\\\\.|[^"\\\\])*")?\\)|[ \t]?\\[(?:(?!\\]))+\\])'),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach(function(e){["url","bold","italic","strike","code-snippet"].forEach(function(n){e!==n&&(s.languages.markdown[e].inside.content.inside[n]=s.languages.markdown[n])})}),s.hooks.add("after-tokenize",function(n){"markdown"!==n.language&&"md"!==n.language||!function n(e){if(e&&"string"!=typeof e)for(var t=0,a=e.length;t",quot:'"'},u=String.fromCodePoint||String.fromCharCode;s.languages.md=s.languages.markdown}(Prism); \ No newline at end of file +!function(s){function n(n){return n=n.replace(//g,function(){return"(?:\\\\.|[^\\\\\n\r]|(?:\n|\r\n?)(?![\r\n]))"}),RegExp("((?:^|[^\\\\])(?:\\\\{2})*)(?:"+n+")")}var e="(?:\\\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\\\|\r\n`])+",t="\\|?__(?:\\|__)+\\|?(?:(?:\n|\r\n?)|(?![^]))".replace(/__/g,function(){return e}),a="\\|?[ \t]*:?-{3,}:?[ \t]*(?:\\|[ \t]*:?-{3,}:?[ \t]*)+\\|?(?:\n|\r\n?)";s.languages.markdown=s.languages.extend("markup",{}),s.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:s.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+t+a+"(?:"+t+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+t+a+")(?:"+t+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(e),inside:s.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+t+")"+a+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+t+"$"),inside:{"table-header":{pattern:RegExp(e),alias:"important",inside:s.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n("\\b__(?:(?!_)|_(?:(?!_))+_)+__\\b|\\*\\*(?:(?!\\*)|\\*(?:(?!\\*))+\\*)+\\*\\*"),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n("\\b_(?:(?!_)|__(?:(?!_))+__)+_\\b|\\*(?:(?!\\*)|\\*\\*(?:(?!\\*))+\\*\\*)+\\*"),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n("(~~?)(?:(?!~))+\\2"),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:n('!?\\[(?:(?!\\]))+\\](?:\\([^\\s)]+(?:[\t ]+"(?:\\\\.|[^"\\\\])*")?\\)|[ \t]?\\[(?:(?!\\]))+\\])'),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach(function(e){["url","bold","italic","strike","code-snippet"].forEach(function(n){e!==n&&(s.languages.markdown[e].inside.content.inside[n]=s.languages.markdown[n])})}),s.hooks.add("after-tokenize",function(n){"markdown"!==n.language&&"md"!==n.language||!function n(e){if(e&&"string"!=typeof e)for(var t=0,a=e.length;t",quot:'"'},u=String.fromCodePoint||String.fromCharCode;s.languages.md=s.languages.markdown}(Prism); \ No newline at end of file diff --git a/tests/languages/markdown/front-matter-block_feature.test b/tests/languages/markdown/front-matter-block_feature.test index b967c2eae9..27588063d1 100644 --- a/tests/languages/markdown/front-matter-block_feature.test +++ b/tests/languages/markdown/front-matter-block_feature.test @@ -15,7 +15,7 @@ normal paragraph [ ["front-matter-block", [ ["punctuation", "---"], - ["font-matter", "layout: post\r\ntitle: Blogging Like a Hacker"], + ["front-matter", "layout: post\r\ntitle: Blogging Like a Hacker"], ["punctuation", "---"] ]], @@ -28,4 +28,4 @@ normal paragraph "\r\nnormal paragraph\r\n\r\n", ["hr", "---"] -] \ No newline at end of file +] diff --git a/tests/languages/yaml+markdown/front-matter_feature.test b/tests/languages/yaml+markdown/front-matter_feature.test index 2d31cd779c..0ccafe4c41 100644 --- a/tests/languages/yaml+markdown/front-matter_feature.test +++ b/tests/languages/yaml+markdown/front-matter_feature.test @@ -10,7 +10,7 @@ title: Blogging Like a Hacker [ ["front-matter-block", [ ["punctuation", "---"], - ["font-matter", [ + ["front-matter", [ ["key", "layout"], ["punctuation", ":"], " post\r\n", ["key", "title"], ["punctuation", ":"], " Blogging Like a Hacker" ]], From 2c63efa6d3617c8cf6c67520c208ce2ba44b313c Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Tue, 5 Oct 2021 11:50:03 +0200 Subject: [PATCH 0929/1100] Python: Fixed numbers ending with a dot (#3106) --- components/prism-python.js | 2 +- components/prism-python.min.js | 2 +- tests/languages/python/number_feature.test | 5 +++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/components/prism-python.js b/components/prism-python.js index f820b65b90..9cf2fcca12 100644 --- a/components/prism-python.js +++ b/components/prism-python.js @@ -54,7 +54,7 @@ Prism.languages.python = { 'keyword': /\b(?:and|as|assert|async|await|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/, 'builtin': /\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/, 'boolean': /\b(?:False|None|True)\b/, - 'number': /\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?\b/i, + 'number': /\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i, 'operator': /[-+%=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/, 'punctuation': /[{}[\];(),.:]/ }; diff --git a/components/prism-python.min.js b/components/prism-python.min.js index 209a67307b..ddddefdd0a 100644 --- a/components/prism-python.min.js +++ b/components/prism-python.min.js @@ -1 +1 @@ -Prism.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/im,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:and|as|assert|async|await|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?\b/i,operator:/[-+%=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},Prism.languages.python["string-interpolation"].inside.interpolation.inside.rest=Prism.languages.python,Prism.languages.py=Prism.languages.python; \ No newline at end of file +Prism.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/im,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:and|as|assert|async|await|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},Prism.languages.python["string-interpolation"].inside.interpolation.inside.rest=Prism.languages.python,Prism.languages.py=Prism.languages.python; \ No newline at end of file diff --git a/tests/languages/python/number_feature.test b/tests/languages/python/number_feature.test index 2fd3e5097b..c40bdb6103 100644 --- a/tests/languages/python/number_feature.test +++ b/tests/languages/python/number_feature.test @@ -3,6 +3,7 @@ 0xBadFace 42 3.14159 +10. 2.1E10 0.3e-7 4.8e+1 @@ -24,6 +25,7 @@ ["number", "0xBadFace"], ["number", "42"], ["number", "3.14159"], + ["number", "10."], ["number", "2.1E10"], ["number", "0.3e-7"], ["number", "4.8e+1"], @@ -36,9 +38,8 @@ ["number", "0xBad_Face"], ["number", "4_200"], ["number", "4_200j"] - ] ---------------------------------------------------- -Checks for hexadecimal, octal, binary and decimal numbers. \ No newline at end of file +Checks for hexadecimal, octal, binary and decimal numbers. From b5a70e4c7dee991cb6fe2218136ffbbd3f6b31b1 Mon Sep 17 00:00:00 2001 From: Michael Earls Date: Tue, 5 Oct 2021 05:28:49 -0500 Subject: [PATCH 0930/1100] Added support for Atmel AVR Assembly (#2078) Co-authored-by: RunDevelopment --- components.js | 2 +- components.json | 4 + components/prism-asmatmel.js | 43 ++++++++++ components/prism-asmatmel.min.js | 1 + examples/prism-asmatmel.html | 78 +++++++++++++++++++ plugins/show-language/prism-show-language.js | 1 + .../show-language/prism-show-language.min.js | 2 +- tests/languages/asmatmel/comment_feature.test | 13 ++++ .../languages/asmatmel/constant_feature.test | 70 +++++++++++++++++ .../languages/asmatmel/directive_feature.test | 12 +++ tests/languages/asmatmel/number_feature.test | 15 ++++ tests/languages/asmatmel/opcode_feature.test | 17 ++++ .../languages/asmatmel/operator_feature.test | 24 ++++++ .../languages/asmatmel/register_feature.test | 42 ++++++++++ tests/languages/asmatmel/string_feature.test | 12 +++ 15 files changed, 334 insertions(+), 2 deletions(-) create mode 100644 components/prism-asmatmel.js create mode 100644 components/prism-asmatmel.min.js create mode 100644 examples/prism-asmatmel.html create mode 100644 tests/languages/asmatmel/comment_feature.test create mode 100644 tests/languages/asmatmel/constant_feature.test create mode 100644 tests/languages/asmatmel/directive_feature.test create mode 100644 tests/languages/asmatmel/number_feature.test create mode 100644 tests/languages/asmatmel/opcode_feature.test create mode 100644 tests/languages/asmatmel/operator_feature.test create mode 100644 tests/languages/asmatmel/register_feature.test create mode 100644 tests/languages/asmatmel/string_feature.test diff --git a/components.js b/components.js index d8ac3e7f66..8d6614484e 100644 --- a/components.js +++ b/components.js @@ -1,2 +1,2 @@ -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml","ssml","atom","rss"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","ssml":"SSML","atom":"Atom","rss":"RSS"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","optional":"regex","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"ABNF","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"agda":{"title":"Agda","owner":"xy-ren"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apex":{"title":"Apex","require":["clike","sql"],"owner":"RunDevelopment"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","alias":"ino","owner":"dkern"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"avisynth":{"title":"AviSynth","alias":"avs","owner":"Zinfidel"},"avro-idl":{"title":"Avro IDL","alias":"avdl","owner":"RunDevelopment"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"bicep":{"title":"Bicep","owner":"johnnyreilly"},"birb":{"title":"Birb","require":"clike","owner":"Calamity210"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"BNF","alias":"rbnf","aliasTitles":{"rbnf":"RBNF"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"bsl":{"title":"BSL (1C:Enterprise)","alias":"oscript","aliasTitles":{"oscript":"OneScript"},"owner":"Diversus23"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cfscript":{"title":"CFScript","require":"clike","alias":"cfc","owner":"mjclemente"},"chaiscript":{"title":"ChaiScript","require":["clike","cpp"],"owner":"RunDevelopment"},"cil":{"title":"CIL","owner":"sbrl"},"clojure":{"title":"Clojure","owner":"troglotit"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"cobol":{"title":"COBOL","owner":"RunDevelopment"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"coq":{"title":"Coq","owner":"RunDevelopment"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"csv":{"title":"CSV","owner":"RunDevelopment"},"cypher":{"title":"Cypher","owner":"RunDevelopment"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dataweave":{"title":"DataWeave","owner":"machaval"},"dax":{"title":"DAX","owner":"peterbud"},"dhall":{"title":"Dhall","owner":"RunDevelopment"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"dot":{"title":"DOT (Graphviz)","alias":"gv","optional":"markup","owner":"RunDevelopment"},"ebnf":{"title":"EBNF","owner":"RunDevelopment"},"editorconfig":{"title":"EditorConfig","owner":"osipxd"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"false":{"title":"False","owner":"edukisto"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"gap":{"title":"GAP (CAS)","owner":"RunDevelopment"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"c","owner":"Golmote"},"gn":{"title":"GN","alias":"gni","owner":"RunDevelopment"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","optional":"markdown","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","alias":"hbs","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"hlsl":{"title":"HLSL","require":"c","owner":"RunDevelopment"},"hoon":{"title":"Hoon","owner":"matildepark"},"http":{"title":"HTTP","optional":["css","javascript","json","markup","uri"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"icu-message-format":{"title":"ICU Message Format","owner":"RunDevelopment"},"idris":{"title":"Idris","alias":"idr","owner":"KeenS","require":"haskell"},"ignore":{"title":".ignore","owner":"osipxd","alias":["gitignore","hgignore","npmignore"],"aliasTitles":{"gitignore":".gitignore","hgignore":".hgignore","npmignore":".npmignore"}},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jexl":{"title":"Jexl","owner":"czosel"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike","typescript"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","alias":"webmanifest","aliasTitles":{"webmanifest":"Web App Manifest"},"owner":"CupOfTea696"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"jsstacktrace":{"title":"JS stack trace","owner":"sbrl"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup","sql"],"owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keepalived":{"title":"Keepalived Configure","owner":"dev-itsheng"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","alias":["kt","kts"],"aliasTitles":{"kts":"Kotlin Script"},"require":"clike","owner":"Golmote"},"kumir":{"title":"KuMir (КуМир)","alias":"kum","owner":"edukisto"},"kusto":{"title":"Kusto","owner":"RunDevelopment"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","require":"markup-templating","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"log":{"title":"Log file","optional":"javastacktrace","owner":"RunDevelopment"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"magma":{"title":"Magma (CAS)","owner":"RunDevelopment"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","optional":"yaml","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"maxscript":{"title":"MAXScript","owner":"RunDevelopment"},"mel":{"title":"MEL","owner":"Golmote"},"mermaid":{"title":"Mermaid","owner":"RunDevelopment"},"mizar":{"title":"Mizar","owner":"Golmote"},"mongodb":{"title":"MongoDB","owner":"airs0urce","require":"javascript"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"naniscript":{"title":"Naninovel Script","owner":"Elringus","alias":"nani"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nevod":{"title":"Nevod","owner":"nezaboodka"},"nginx":{"title":"nginx","owner":"volado"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"openqasm":{"title":"OpenQasm","alias":"qasm","owner":"RunDevelopment"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"psl":{"title":"PATROL Scripting Language","owner":"bertysentry"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":"markup-templating","owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"promql":{"title":"PromQL","owner":"arendjr"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"purebasic":{"title":"PureBasic","require":"clike","alias":"pbfasm","owner":"HeX0R101"},"purescript":{"title":"PureScript","require":"haskell","alias":"purs","owner":"sriharshachilakapati"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"qsharp":{"title":"Q#","require":"clike","alias":"qs","owner":"fedonman"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"racket":{"title":"Racket","require":"scheme","alias":"rkt","owner":"RunDevelopment"},"cshtml":{"title":"Razor C#","alias":"razor","require":["markup","csharp"],"optional":["css","css-extras","javascript","js-extras"],"owner":"RunDevelopment"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","owner":"RunDevelopment"},"rego":{"title":"Rego","owner":"JordanSh"},"renpy":{"title":"Ren'py","alias":"rpy","owner":"HyuchiaDiego"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","optional":"css-extras","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","alias":["sh-session","shellsession"],"owner":"RunDevelopment"},"smali":{"title":"Smali","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sml":{"title":"SML","alias":"smlnj","aliasTitles":{"smlnj":"SML/NJ"},"owner":"RunDevelopment"},"solidity":{"title":"Solidity (Ethereum)","alias":"sol","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"squirrel":{"title":"Squirrel","require":"clike","owner":"RunDevelopment"},"stan":{"title":"Stan","owner":"RunDevelopment"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","owner":"chrischares"},"systemd":{"title":"Systemd configuration file","owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","vbnet"],"owner":"RunDevelopment"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tremor":{"title":"Tremor","alias":["trickle","troy"],"owner":"darach","aliasTitles":{"trickle":"trickle","troy":"troy"}},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"typoscript":{"title":"TypoScript","alias":"tsconfig","aliasTitles":{"tsconfig":"TSConfig"},"owner":"dkern"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"uri":{"title":"URI","alias":"url","aliasTitles":{"url":"URL"},"owner":"RunDevelopment"},"v":{"title":"V","require":"clike","owner":"taggon"},"vala":{"title":"Vala","require":"clike","optional":"regex","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":["vb","vba"],"aliasTitles":{"vba":"VBA"},"owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"wolfram":{"title":"Wolfram language","alias":["mathematica","nb","wl"],"aliasTitles":{"mathematica":"Mathematica","nb":"Mathematica Notebook"},"owner":"msollami"},"wren":{"title":"Wren","owner":"clsource"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xml-doc":{"title":"XML doc (.net)","require":"markup","modify":["csharp","fsharp","vbnet"],"owner":"RunDevelopment"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"yang":{"title":"YANG","owner":"RunDevelopment"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword for fine-grained highlighting.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml","ssml","atom","rss"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","ssml":"SSML","atom":"Atom","rss":"RSS"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","optional":"regex","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"ABNF","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"agda":{"title":"Agda","owner":"xy-ren"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apex":{"title":"Apex","require":["clike","sql"],"owner":"RunDevelopment"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","alias":"ino","owner":"dkern"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"asmatmel":{"title":"Atmel AVR Assembly","owner":"cerkit"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"avisynth":{"title":"AviSynth","alias":"avs","owner":"Zinfidel"},"avro-idl":{"title":"Avro IDL","alias":"avdl","owner":"RunDevelopment"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"bicep":{"title":"Bicep","owner":"johnnyreilly"},"birb":{"title":"Birb","require":"clike","owner":"Calamity210"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"BNF","alias":"rbnf","aliasTitles":{"rbnf":"RBNF"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"bsl":{"title":"BSL (1C:Enterprise)","alias":"oscript","aliasTitles":{"oscript":"OneScript"},"owner":"Diversus23"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cfscript":{"title":"CFScript","require":"clike","alias":"cfc","owner":"mjclemente"},"chaiscript":{"title":"ChaiScript","require":["clike","cpp"],"owner":"RunDevelopment"},"cil":{"title":"CIL","owner":"sbrl"},"clojure":{"title":"Clojure","owner":"troglotit"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"cobol":{"title":"COBOL","owner":"RunDevelopment"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"coq":{"title":"Coq","owner":"RunDevelopment"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"csv":{"title":"CSV","owner":"RunDevelopment"},"cypher":{"title":"Cypher","owner":"RunDevelopment"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dataweave":{"title":"DataWeave","owner":"machaval"},"dax":{"title":"DAX","owner":"peterbud"},"dhall":{"title":"Dhall","owner":"RunDevelopment"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"dot":{"title":"DOT (Graphviz)","alias":"gv","optional":"markup","owner":"RunDevelopment"},"ebnf":{"title":"EBNF","owner":"RunDevelopment"},"editorconfig":{"title":"EditorConfig","owner":"osipxd"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"false":{"title":"False","owner":"edukisto"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"gap":{"title":"GAP (CAS)","owner":"RunDevelopment"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"c","owner":"Golmote"},"gn":{"title":"GN","alias":"gni","owner":"RunDevelopment"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","optional":"markdown","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","alias":"hbs","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"hlsl":{"title":"HLSL","require":"c","owner":"RunDevelopment"},"hoon":{"title":"Hoon","owner":"matildepark"},"http":{"title":"HTTP","optional":["css","javascript","json","markup","uri"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"icu-message-format":{"title":"ICU Message Format","owner":"RunDevelopment"},"idris":{"title":"Idris","alias":"idr","owner":"KeenS","require":"haskell"},"ignore":{"title":".ignore","owner":"osipxd","alias":["gitignore","hgignore","npmignore"],"aliasTitles":{"gitignore":".gitignore","hgignore":".hgignore","npmignore":".npmignore"}},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jexl":{"title":"Jexl","owner":"czosel"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike","typescript"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","alias":"webmanifest","aliasTitles":{"webmanifest":"Web App Manifest"},"owner":"CupOfTea696"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"jsstacktrace":{"title":"JS stack trace","owner":"sbrl"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup","sql"],"owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keepalived":{"title":"Keepalived Configure","owner":"dev-itsheng"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","alias":["kt","kts"],"aliasTitles":{"kts":"Kotlin Script"},"require":"clike","owner":"Golmote"},"kumir":{"title":"KuMir (КуМир)","alias":"kum","owner":"edukisto"},"kusto":{"title":"Kusto","owner":"RunDevelopment"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","require":"markup-templating","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"log":{"title":"Log file","optional":"javastacktrace","owner":"RunDevelopment"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"magma":{"title":"Magma (CAS)","owner":"RunDevelopment"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","optional":"yaml","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"maxscript":{"title":"MAXScript","owner":"RunDevelopment"},"mel":{"title":"MEL","owner":"Golmote"},"mermaid":{"title":"Mermaid","owner":"RunDevelopment"},"mizar":{"title":"Mizar","owner":"Golmote"},"mongodb":{"title":"MongoDB","owner":"airs0urce","require":"javascript"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"naniscript":{"title":"Naninovel Script","owner":"Elringus","alias":"nani"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nevod":{"title":"Nevod","owner":"nezaboodka"},"nginx":{"title":"nginx","owner":"volado"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"openqasm":{"title":"OpenQasm","alias":"qasm","owner":"RunDevelopment"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"psl":{"title":"PATROL Scripting Language","owner":"bertysentry"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":"markup-templating","owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"promql":{"title":"PromQL","owner":"arendjr"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"purebasic":{"title":"PureBasic","require":"clike","alias":"pbfasm","owner":"HeX0R101"},"purescript":{"title":"PureScript","require":"haskell","alias":"purs","owner":"sriharshachilakapati"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"qsharp":{"title":"Q#","require":"clike","alias":"qs","owner":"fedonman"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"racket":{"title":"Racket","require":"scheme","alias":"rkt","owner":"RunDevelopment"},"cshtml":{"title":"Razor C#","alias":"razor","require":["markup","csharp"],"optional":["css","css-extras","javascript","js-extras"],"owner":"RunDevelopment"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","owner":"RunDevelopment"},"rego":{"title":"Rego","owner":"JordanSh"},"renpy":{"title":"Ren'py","alias":"rpy","owner":"HyuchiaDiego"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","optional":"css-extras","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","alias":["sh-session","shellsession"],"owner":"RunDevelopment"},"smali":{"title":"Smali","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sml":{"title":"SML","alias":"smlnj","aliasTitles":{"smlnj":"SML/NJ"},"owner":"RunDevelopment"},"solidity":{"title":"Solidity (Ethereum)","alias":"sol","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"squirrel":{"title":"Squirrel","require":"clike","owner":"RunDevelopment"},"stan":{"title":"Stan","owner":"RunDevelopment"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","owner":"chrischares"},"systemd":{"title":"Systemd configuration file","owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","vbnet"],"owner":"RunDevelopment"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tremor":{"title":"Tremor","alias":["trickle","troy"],"owner":"darach","aliasTitles":{"trickle":"trickle","troy":"troy"}},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"typoscript":{"title":"TypoScript","alias":"tsconfig","aliasTitles":{"tsconfig":"TSConfig"},"owner":"dkern"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"uri":{"title":"URI","alias":"url","aliasTitles":{"url":"URL"},"owner":"RunDevelopment"},"v":{"title":"V","require":"clike","owner":"taggon"},"vala":{"title":"Vala","require":"clike","optional":"regex","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":["vb","vba"],"aliasTitles":{"vba":"VBA"},"owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"wolfram":{"title":"Wolfram language","alias":["mathematica","nb","wl"],"aliasTitles":{"mathematica":"Mathematica","nb":"Mathematica Notebook"},"owner":"msollami"},"wren":{"title":"Wren","owner":"clsource"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xml-doc":{"title":"XML doc (.net)","require":"markup","modify":["csharp","fsharp","vbnet"],"owner":"RunDevelopment"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"yang":{"title":"YANG","owner":"RunDevelopment"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword for fine-grained highlighting.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; if (typeof module !== 'undefined' && module.exports) { module.exports = components; } \ No newline at end of file diff --git a/components.json b/components.json index abe3b1594f..d2428a09b5 100644 --- a/components.json +++ b/components.json @@ -153,6 +153,10 @@ "title": "6502 Assembly", "owner": "kzurawel" }, + "asmatmel": { + "title": "Atmel AVR Assembly", + "owner": "cerkit" + }, "autohotkey": { "title": "AutoHotkey", "owner": "aviaryan" diff --git a/components/prism-asmatmel.js b/components/prism-asmatmel.js new file mode 100644 index 0000000000..6e83ea4ac5 --- /dev/null +++ b/components/prism-asmatmel.js @@ -0,0 +1,43 @@ +Prism.languages.asmatmel = { + 'comment': { + pattern: /;.*/, + greedy: true + }, + 'string': { + pattern: /(["'`])(?:\\.|(?!\1)[^\\\r\n])*\1/, + greedy: true + }, + + 'constant': /\b(?:PORT[A-Z]|DDR[A-Z]|(?:DD|P)[A-Z](?:\d|[0-2]\d|3[0-1]))\b/, + + 'directive': { + pattern: /\.\w+(?= )/, + alias: 'property' + }, + 'r-register': { + pattern: /\br(?:\d|[1-2]\d|3[0-1])\b/, + alias: 'variable' + }, + 'op-code': { + pattern: /\b(?:ADC|ADD|ADIW|AND|ANDI|ASR|BCLR|BLD|BRBC|BRBS|BRCC|BRCS|BREAK|BREQ|BRGE|BRHC|BRHS|BRID|BRIE|BRLO|BRLT|BRMI|BRNE|BRPL|BRSH|BRTC|BRTS|BRVC|BRVS|BSET|BST|CALL|CBI|CBR|CLC|CLH|CLI|CLN|CLR|CLS|CLT|CLV|CLZ|COM|CP|CPC|CPI|CPSE|DEC|DES|EICALL|EIJMP|ELPM|EOR|FMUL|FMULS|FMULSU|ICALL|IJMP|IN|INC|JMP|LAC|LAS|LAT|LD|LD[A-Za-z0-9]|LPM|LSL|LSR|MOV|MOVW|MUL|MULS|MULSU|NEG|NOP|OR|ORI|OUT|POP|PUSH|RCALL|RET|RETI|RJMP|ROL|ROR|SBC|SBCI|SBI|SBIC|SBIS|SBIW|SBR|SBRC|SBRS|SEC|SEH|SEI|SEN|SER|SES|SET|SEV|SEZ|SLEEP|SPM|ST|ST[A-Z0-9]|SUB|SUBI|SWAP|TST|WDR|XCH|adc|add|adiw|and|andi|asr|bclr|bld|brbc|brbs|brcc|brcs|break|breq|brge|brhc|brhs|brid|brie|brlo|brlt|brmi|brne|brpl|brsh|brtc|brts|brvc|brvs|bset|bst|call|cbi|cbr|clc|clh|cli|cln|clr|cls|clt|clv|clz|com|cp|cpc|cpi|cpse|dec|des|eicall|eijmp|elpm|eor|fmul|fmuls|fmulsu|icall|ijmp|in|inc|jmp|lac|las|lat|ld|ld[a-z0-9]|lpm|lsl|lsr|mov|movw|mul|muls|mulsu|neg|nop|or|ori|out|pop|push|rcall|ret|reti|rjmp|rol|ror|sbc|sbci|sbi|sbic|sbis|sbiw|sbr|sbrc|sbrs|sec|seh|sei|sen|ser|ses|set|sev|sez|sleep|spm|st|st[a-zA-Z0-9]|sub|subi|swap|tst|wdr|xch)\b/, + alias: 'keyword' + }, + 'hex-number': { + pattern: /#?\$[\da-f]{2,4}\b/i, + alias: 'number' + }, + 'binary-number': { + pattern: /#?%[01]+\b/, + alias: 'number' + }, + 'decimal-number': { + pattern: /#?\b\d+\b/, + alias: 'number' + }, + 'register': { + pattern: /\b[acznvshtixy]\b/i, + alias: 'variable' + }, + 'operator': />>=?|<<=?|&&?|\|\|?|[-+*/%&|^!=<>?]=?/, + 'punctuation': /[(),:]/ +}; diff --git a/components/prism-asmatmel.min.js b/components/prism-asmatmel.min.js new file mode 100644 index 0000000000..99df2d796b --- /dev/null +++ b/components/prism-asmatmel.min.js @@ -0,0 +1 @@ +Prism.languages.asmatmel={comment:{pattern:/;.*/,greedy:!0},string:{pattern:/(["'`])(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0},constant:/\b(?:PORT[A-Z]|DDR[A-Z]|(?:DD|P)[A-Z](?:\d|[0-2]\d|3[0-1]))\b/,directive:{pattern:/\.\w+(?= )/,alias:"property"},"r-register":{pattern:/\br(?:\d|[1-2]\d|3[0-1])\b/,alias:"variable"},"op-code":{pattern:/\b(?:ADC|ADD|ADIW|AND|ANDI|ASR|BCLR|BLD|BRBC|BRBS|BRCC|BRCS|BREAK|BREQ|BRGE|BRHC|BRHS|BRID|BRIE|BRLO|BRLT|BRMI|BRNE|BRPL|BRSH|BRTC|BRTS|BRVC|BRVS|BSET|BST|CALL|CBI|CBR|CLC|CLH|CLI|CLN|CLR|CLS|CLT|CLV|CLZ|COM|CP|CPC|CPI|CPSE|DEC|DES|EICALL|EIJMP|ELPM|EOR|FMUL|FMULS|FMULSU|ICALL|IJMP|IN|INC|JMP|LAC|LAS|LAT|LD|LD[A-Za-z0-9]|LPM|LSL|LSR|MOV|MOVW|MUL|MULS|MULSU|NEG|NOP|OR|ORI|OUT|POP|PUSH|RCALL|RET|RETI|RJMP|ROL|ROR|SBC|SBCI|SBI|SBIC|SBIS|SBIW|SBR|SBRC|SBRS|SEC|SEH|SEI|SEN|SER|SES|SET|SEV|SEZ|SLEEP|SPM|ST|ST[A-Z0-9]|SUB|SUBI|SWAP|TST|WDR|XCH|adc|add|adiw|and|andi|asr|bclr|bld|brbc|brbs|brcc|brcs|break|breq|brge|brhc|brhs|brid|brie|brlo|brlt|brmi|brne|brpl|brsh|brtc|brts|brvc|brvs|bset|bst|call|cbi|cbr|clc|clh|cli|cln|clr|cls|clt|clv|clz|com|cp|cpc|cpi|cpse|dec|des|eicall|eijmp|elpm|eor|fmul|fmuls|fmulsu|icall|ijmp|in|inc|jmp|lac|las|lat|ld|ld[a-z0-9]|lpm|lsl|lsr|mov|movw|mul|muls|mulsu|neg|nop|or|ori|out|pop|push|rcall|ret|reti|rjmp|rol|ror|sbc|sbci|sbi|sbic|sbis|sbiw|sbr|sbrc|sbrs|sec|seh|sei|sen|ser|ses|set|sev|sez|sleep|spm|st|st[a-zA-Z0-9]|sub|subi|swap|tst|wdr|xch)\b/,alias:"keyword"},"hex-number":{pattern:/#?\$[\da-f]{2,4}\b/i,alias:"number"},"binary-number":{pattern:/#?%[01]+\b/,alias:"number"},"decimal-number":{pattern:/#?\b\d+\b/,alias:"number"},register:{pattern:/\b[acznvshtixy]\b/i,alias:"variable"},operator:/>>=?|<<=?|&&?|\|\|?|[-+*/%&|^!=<>?]=?/,punctuation:/[(),:]/}; \ No newline at end of file diff --git a/examples/prism-asmatmel.html b/examples/prism-asmatmel.html new file mode 100644 index 0000000000..577916c292 --- /dev/null +++ b/examples/prism-asmatmel.html @@ -0,0 +1,78 @@ +

            Comments

            +
            ; This is a comment
            + +

            Labels

            +
            label1:   ; a label
            + +

            Opcodes

            +
            LD
            +OUT
            +
            +; lowercase
            +ldi
            +jmp label1
            +
            + +

            Assembler directives

            +
            .segment CODE
            +.word $07d3
            +
            + +

            Registers

            +
            LD A  ; "A"
            +LDA label1,x  ; "x"
            +
            + +

            Strings

            +
            .include "header.asm"
            +
            + +

            Numbers

            +
            ldi r24,#127
            +ldi r24,$80f0
            +ldi r24,#%01011000
            +
            + +

            Constants

            +
            ldi r16, (0<<PB5)|(1<<PB4)|(1<<PB3)|(1<<PB2)|(1<<PB1)|(1<<PB0)
            + +

            Example program to light up LEDs

            +

            Attach an LED (through a 220 ohm resistor) to any of the pins 0-12

            +
            ; Pin Constant Values (Tested on Arduino UNO)
            +; PD0 - 0
            +; PD1 - 1
            +; PD2 - 2
            +; PD3 - 3
            +; PD4 - 4
            +; PD5 - 5
            +; PD6 - 6
            +; PD7 - 7
            +
            +; PB0 - 8
            +; PB1 - 9
            +; PB2 - 10
            +; PB3 - 11
            +; PB4 - 12
            +; PB5 - 13 - System LED
            +
            +start:
            +
            +	; Set pins 0-7 to high
            +	ldi		r17, (1<<PD7)|(1<<PD6)|(1<<PD5)|(1<<PD4)|(1<<PD3)|(1<<PD2)|(1<<PD1)|(1<<PD0)
            +	out		PORTD, r17
            +
            +	; Set pins 8-13 to high
            +	ldi		r16, (1<<PB5)|(1<<PB4)|(1<<PB3)|(1<<PB2)|(1<<PB1)|(1<<PB0)
            +	out		PORTB, r16
            +
            +	; Set pins 0-7 to output mode
            +	ldi		r18, (1<<DDD7)|(1<<DDD6)|(1<<DDD5)|(1<<DDD4)|(1<<DDD3)|(1<<DDD2)|(1<<DDD1)|(1<<DDD0)
            +	out		DDRD, r18
            +
            +	; Set pins 8-13 to output mode
            +	ldi		r19, (1<<DDB5)|(1<<DDB4)|(1<<DDB3)|(1<<DDB2)|(1<<DDB1)|(1<<DDB0)
            +	out		DDRB, r19
            +
            +loop:
            +	rjmp loop ; loop forever
            +
            diff --git a/plugins/show-language/prism-show-language.js b/plugins/show-language/prism-show-language.js index 4f6d911633..76f3d78bb6 100644 --- a/plugins/show-language/prism-show-language.js +++ b/plugins/show-language/prism-show-language.js @@ -42,6 +42,7 @@ "adoc": "AsciiDoc", "aspnet": "ASP.NET (C#)", "asm6502": "6502 Assembly", + "asmatmel": "Atmel AVR Assembly", "autohotkey": "AutoHotkey", "autoit": "AutoIt", "avisynth": "AviSynth", diff --git a/plugins/show-language/prism-show-language.min.js b/plugins/show-language/prism-show-language.min.js index 68293b6093..cde9ef5865 100644 --- a/plugins/show-language/prism-show-language.min.js +++ b/plugins/show-language/prism-show-language.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof Prism&&"undefined"!=typeof document)if(Prism.plugins.toolbar){var i={none:"Plain text",plain:"Plain text",plaintext:"Plain text",text:"Plain text",txt:"Plain text",html:"HTML",xml:"XML",svg:"SVG",mathml:"MathML",ssml:"SSML",rss:"RSS",css:"CSS",clike:"C-like",js:"JavaScript",abap:"ABAP",abnf:"ABNF",al:"AL",antlr4:"ANTLR4",g4:"ANTLR4",apacheconf:"Apache Configuration",apl:"APL",aql:"AQL",ino:"Arduino",arff:"ARFF",asciidoc:"AsciiDoc",adoc:"AsciiDoc",aspnet:"ASP.NET (C#)",asm6502:"6502 Assembly",autohotkey:"AutoHotkey",autoit:"AutoIt",avisynth:"AviSynth",avs:"AviSynth","avro-idl":"Avro IDL",avdl:"Avro IDL",basic:"BASIC",bbcode:"BBcode",bnf:"BNF",rbnf:"RBNF",bsl:"BSL (1C:Enterprise)",oscript:"OneScript",csharp:"C#",cs:"C#",dotnet:"C#",cpp:"C++",cfscript:"CFScript",cfc:"CFScript",cil:"CIL",cmake:"CMake",cobol:"COBOL",coffee:"CoffeeScript",conc:"Concurnas",csp:"Content-Security-Policy","css-extras":"CSS Extras",csv:"CSV",dataweave:"DataWeave",dax:"DAX",django:"Django/Jinja2",jinja2:"Django/Jinja2","dns-zone-file":"DNS zone file","dns-zone":"DNS zone file",dockerfile:"Docker",dot:"DOT (Graphviz)",gv:"DOT (Graphviz)",ebnf:"EBNF",editorconfig:"EditorConfig",ejs:"EJS",etlua:"Embedded Lua templating",erb:"ERB","excel-formula":"Excel Formula",xlsx:"Excel Formula",xls:"Excel Formula",fsharp:"F#","firestore-security-rules":"Firestore security rules",ftl:"FreeMarker Template Language",gml:"GameMaker Language",gamemakerlanguage:"GameMaker Language",gap:"GAP (CAS)",gcode:"G-code",gdscript:"GDScript",gedcom:"GEDCOM",glsl:"GLSL",gn:"GN",gni:"GN",graphql:"GraphQL",hbs:"Handlebars",hs:"Haskell",hcl:"HCL",hlsl:"HLSL",http:"HTTP",hpkp:"HTTP Public-Key-Pins",hsts:"HTTP Strict-Transport-Security",ichigojam:"IchigoJam","icu-message-format":"ICU Message Format",idr:"Idris",ignore:".ignore",gitignore:".gitignore",hgignore:".hgignore",npmignore:".npmignore",inform7:"Inform 7",javadoc:"JavaDoc",javadoclike:"JavaDoc-like",javastacktrace:"Java stack trace",jq:"JQ",jsdoc:"JSDoc","js-extras":"JS Extras",json:"JSON",webmanifest:"Web App Manifest",json5:"JSON5",jsonp:"JSONP",jsstacktrace:"JS stack trace","js-templates":"JS Templates",keepalived:"Keepalived Configure",kts:"Kotlin Script",kt:"Kotlin",kumir:"KuMir (КуМир)",kum:"KuMir (КуМир)",latex:"LaTeX",tex:"TeX",context:"ConTeXt",lilypond:"LilyPond",ly:"LilyPond",emacs:"Lisp",elisp:"Lisp","emacs-lisp":"Lisp",llvm:"LLVM IR",log:"Log file",lolcode:"LOLCODE",magma:"Magma (CAS)",md:"Markdown","markup-templating":"Markup templating",matlab:"MATLAB",maxscript:"MAXScript",mel:"MEL",mongodb:"MongoDB",moon:"MoonScript",n1ql:"N1QL",n4js:"N4JS",n4jsd:"N4JS","nand2tetris-hdl":"Nand To Tetris HDL",naniscript:"Naninovel Script",nani:"Naninovel Script",nasm:"NASM",neon:"NEON",nginx:"nginx",nsis:"NSIS",objectivec:"Objective-C",objc:"Objective-C",ocaml:"OCaml",opencl:"OpenCL",openqasm:"OpenQasm",qasm:"OpenQasm",parigp:"PARI/GP",objectpascal:"Object Pascal",psl:"PATROL Scripting Language",pcaxis:"PC-Axis",px:"PC-Axis",peoplecode:"PeopleCode",pcode:"PeopleCode",php:"PHP",phpdoc:"PHPDoc","php-extras":"PHP Extras",plsql:"PL/SQL",powerquery:"PowerQuery",pq:"PowerQuery",mscript:"PowerQuery",powershell:"PowerShell",promql:"PromQL",properties:".properties",protobuf:"Protocol Buffers",purebasic:"PureBasic",pbfasm:"PureBasic",purs:"PureScript",py:"Python",qsharp:"Q#",qs:"Q#",q:"Q (kdb+ database)",qml:"QML",rkt:"Racket",cshtml:"Razor C#",razor:"Razor C#",jsx:"React JSX",tsx:"React TSX",renpy:"Ren'py",rpy:"Ren'py",rest:"reST (reStructuredText)",robotframework:"Robot Framework",robot:"Robot Framework",rb:"Ruby",sas:"SAS",sass:"Sass (Sass)",scss:"Sass (Scss)","shell-session":"Shell session","sh-session":"Shell session",shellsession:"Shell session",sml:"SML",smlnj:"SML/NJ",solidity:"Solidity (Ethereum)",sol:"Solidity (Ethereum)","solution-file":"Solution file",sln:"Solution file",soy:"Soy (Closure Template)",sparql:"SPARQL",rq:"SPARQL","splunk-spl":"Splunk SPL",sqf:"SQF: Status Quo Function (Arma 3)",sql:"SQL",iecst:"Structured Text (IEC 61131-3)",systemd:"Systemd configuration file","t4-templating":"T4 templating","t4-cs":"T4 Text Templates (C#)",t4:"T4 Text Templates (C#)","t4-vb":"T4 Text Templates (VB)",tap:"TAP",tt2:"Template Toolkit 2",toml:"TOML",trickle:"trickle",troy:"troy",trig:"TriG",ts:"TypeScript",tsconfig:"TSConfig",uscript:"UnrealScript",uc:"UnrealScript",uri:"URI",url:"URL",vbnet:"VB.Net",vhdl:"VHDL",vim:"vim","visual-basic":"Visual Basic",vba:"VBA",vb:"Visual Basic",wasm:"WebAssembly",wiki:"Wiki markup",wolfram:"Wolfram language",nb:"Mathematica Notebook",wl:"Wolfram language",xeoracube:"XeoraCube","xml-doc":"XML doc (.net)",xojo:"Xojo (REALbasic)",xquery:"XQuery",yaml:"YAML",yml:"YAML",yang:"YANG"};Prism.plugins.toolbar.registerButton("show-language",function(e){var a=e.element.parentNode;if(a&&/pre/i.test(a.nodeName)){var t,o=a.getAttribute("data-language")||i[e.language]||((t=e.language)?(t.substring(0,1).toUpperCase()+t.substring(1)).replace(/s(?=cript)/,"S"):t);if(o){var s=document.createElement("span");return s.textContent=o,s}}})}else console.warn("Show Languages plugin loaded before Toolbar plugin.")}(); \ No newline at end of file +!function(){if("undefined"!=typeof Prism&&"undefined"!=typeof document)if(Prism.plugins.toolbar){var i={none:"Plain text",plain:"Plain text",plaintext:"Plain text",text:"Plain text",txt:"Plain text",html:"HTML",xml:"XML",svg:"SVG",mathml:"MathML",ssml:"SSML",rss:"RSS",css:"CSS",clike:"C-like",js:"JavaScript",abap:"ABAP",abnf:"ABNF",al:"AL",antlr4:"ANTLR4",g4:"ANTLR4",apacheconf:"Apache Configuration",apl:"APL",aql:"AQL",ino:"Arduino",arff:"ARFF",asciidoc:"AsciiDoc",adoc:"AsciiDoc",aspnet:"ASP.NET (C#)",asm6502:"6502 Assembly",asmatmel:"Atmel AVR Assembly",autohotkey:"AutoHotkey",autoit:"AutoIt",avisynth:"AviSynth",avs:"AviSynth","avro-idl":"Avro IDL",avdl:"Avro IDL",basic:"BASIC",bbcode:"BBcode",bnf:"BNF",rbnf:"RBNF",bsl:"BSL (1C:Enterprise)",oscript:"OneScript",csharp:"C#",cs:"C#",dotnet:"C#",cpp:"C++",cfscript:"CFScript",cfc:"CFScript",cil:"CIL",cmake:"CMake",cobol:"COBOL",coffee:"CoffeeScript",conc:"Concurnas",csp:"Content-Security-Policy","css-extras":"CSS Extras",csv:"CSV",dataweave:"DataWeave",dax:"DAX",django:"Django/Jinja2",jinja2:"Django/Jinja2","dns-zone-file":"DNS zone file","dns-zone":"DNS zone file",dockerfile:"Docker",dot:"DOT (Graphviz)",gv:"DOT (Graphviz)",ebnf:"EBNF",editorconfig:"EditorConfig",ejs:"EJS",etlua:"Embedded Lua templating",erb:"ERB","excel-formula":"Excel Formula",xlsx:"Excel Formula",xls:"Excel Formula",fsharp:"F#","firestore-security-rules":"Firestore security rules",ftl:"FreeMarker Template Language",gml:"GameMaker Language",gamemakerlanguage:"GameMaker Language",gap:"GAP (CAS)",gcode:"G-code",gdscript:"GDScript",gedcom:"GEDCOM",glsl:"GLSL",gn:"GN",gni:"GN",graphql:"GraphQL",hbs:"Handlebars",hs:"Haskell",hcl:"HCL",hlsl:"HLSL",http:"HTTP",hpkp:"HTTP Public-Key-Pins",hsts:"HTTP Strict-Transport-Security",ichigojam:"IchigoJam","icu-message-format":"ICU Message Format",idr:"Idris",ignore:".ignore",gitignore:".gitignore",hgignore:".hgignore",npmignore:".npmignore",inform7:"Inform 7",javadoc:"JavaDoc",javadoclike:"JavaDoc-like",javastacktrace:"Java stack trace",jq:"JQ",jsdoc:"JSDoc","js-extras":"JS Extras",json:"JSON",webmanifest:"Web App Manifest",json5:"JSON5",jsonp:"JSONP",jsstacktrace:"JS stack trace","js-templates":"JS Templates",keepalived:"Keepalived Configure",kts:"Kotlin Script",kt:"Kotlin",kumir:"KuMir (КуМир)",kum:"KuMir (КуМир)",latex:"LaTeX",tex:"TeX",context:"ConTeXt",lilypond:"LilyPond",ly:"LilyPond",emacs:"Lisp",elisp:"Lisp","emacs-lisp":"Lisp",llvm:"LLVM IR",log:"Log file",lolcode:"LOLCODE",magma:"Magma (CAS)",md:"Markdown","markup-templating":"Markup templating",matlab:"MATLAB",maxscript:"MAXScript",mel:"MEL",mongodb:"MongoDB",moon:"MoonScript",n1ql:"N1QL",n4js:"N4JS",n4jsd:"N4JS","nand2tetris-hdl":"Nand To Tetris HDL",naniscript:"Naninovel Script",nani:"Naninovel Script",nasm:"NASM",neon:"NEON",nginx:"nginx",nsis:"NSIS",objectivec:"Objective-C",objc:"Objective-C",ocaml:"OCaml",opencl:"OpenCL",openqasm:"OpenQasm",qasm:"OpenQasm",parigp:"PARI/GP",objectpascal:"Object Pascal",psl:"PATROL Scripting Language",pcaxis:"PC-Axis",px:"PC-Axis",peoplecode:"PeopleCode",pcode:"PeopleCode",php:"PHP",phpdoc:"PHPDoc","php-extras":"PHP Extras",plsql:"PL/SQL",powerquery:"PowerQuery",pq:"PowerQuery",mscript:"PowerQuery",powershell:"PowerShell",promql:"PromQL",properties:".properties",protobuf:"Protocol Buffers",purebasic:"PureBasic",pbfasm:"PureBasic",purs:"PureScript",py:"Python",qsharp:"Q#",qs:"Q#",q:"Q (kdb+ database)",qml:"QML",rkt:"Racket",cshtml:"Razor C#",razor:"Razor C#",jsx:"React JSX",tsx:"React TSX",renpy:"Ren'py",rpy:"Ren'py",rest:"reST (reStructuredText)",robotframework:"Robot Framework",robot:"Robot Framework",rb:"Ruby",sas:"SAS",sass:"Sass (Sass)",scss:"Sass (Scss)","shell-session":"Shell session","sh-session":"Shell session",shellsession:"Shell session",sml:"SML",smlnj:"SML/NJ",solidity:"Solidity (Ethereum)",sol:"Solidity (Ethereum)","solution-file":"Solution file",sln:"Solution file",soy:"Soy (Closure Template)",sparql:"SPARQL",rq:"SPARQL","splunk-spl":"Splunk SPL",sqf:"SQF: Status Quo Function (Arma 3)",sql:"SQL",iecst:"Structured Text (IEC 61131-3)",systemd:"Systemd configuration file","t4-templating":"T4 templating","t4-cs":"T4 Text Templates (C#)",t4:"T4 Text Templates (C#)","t4-vb":"T4 Text Templates (VB)",tap:"TAP",tt2:"Template Toolkit 2",toml:"TOML",trickle:"trickle",troy:"troy",trig:"TriG",ts:"TypeScript",tsconfig:"TSConfig",uscript:"UnrealScript",uc:"UnrealScript",uri:"URI",url:"URL",vbnet:"VB.Net",vhdl:"VHDL",vim:"vim","visual-basic":"Visual Basic",vba:"VBA",vb:"Visual Basic",wasm:"WebAssembly",wiki:"Wiki markup",wolfram:"Wolfram language",nb:"Mathematica Notebook",wl:"Wolfram language",xeoracube:"XeoraCube","xml-doc":"XML doc (.net)",xojo:"Xojo (REALbasic)",xquery:"XQuery",yaml:"YAML",yml:"YAML",yang:"YANG"};Prism.plugins.toolbar.registerButton("show-language",function(e){var a=e.element.parentNode;if(a&&/pre/i.test(a.nodeName)){var t,s=a.getAttribute("data-language")||i[e.language]||((t=e.language)?(t.substring(0,1).toUpperCase()+t.substring(1)).replace(/s(?=cript)/,"S"):t);if(s){var o=document.createElement("span");return o.textContent=s,o}}})}else console.warn("Show Languages plugin loaded before Toolbar plugin.")}(); \ No newline at end of file diff --git a/tests/languages/asmatmel/comment_feature.test b/tests/languages/asmatmel/comment_feature.test new file mode 100644 index 0000000000..1d5bc02c8a --- /dev/null +++ b/tests/languages/asmatmel/comment_feature.test @@ -0,0 +1,13 @@ +; +; foo bar baz + +---------------------------------------------------- + +[ + ["comment", ";"], + ["comment", "; foo bar baz"] +] + +---------------------------------------------------- + +Check for comments diff --git a/tests/languages/asmatmel/constant_feature.test b/tests/languages/asmatmel/constant_feature.test new file mode 100644 index 0000000000..9ed01f0b4f --- /dev/null +++ b/tests/languages/asmatmel/constant_feature.test @@ -0,0 +1,70 @@ +OUT PORTD,x +ldi r17,PD06 +ldi r19,(1< Date: Tue, 5 Oct 2021 12:53:51 +0200 Subject: [PATCH 0931/1100] Update test and example pages to use Autoloader (#1936) --- assets/examples.js | 64 ++++++-------------------------- examples.html | 1 + examples/prism-js-templates.html | 12 +++--- test.html | 62 +++---------------------------- 4 files changed, 24 insertions(+), 115 deletions(-) diff --git a/assets/examples.js b/assets/examples.js index fe1c275b1b..a72b37e8d7 100644 --- a/assets/examples.js +++ b/assets/examples.js @@ -179,62 +179,22 @@ language.examplesPromise.then(function (contents) { examples[id].innerHTML = buildContentsHeader(id) + contents; - loadLanguage(id).then(function () { - Prism.highlightAllUnder(examples[id]); + /** @type {HTMLElement} */ + var container = examples[id]; + container.innerHTML = buildContentsHeader(id) + contents; + + // the current language might be an extension of a language + // so to be safe, we explicitly add a dependency to the current language + $$('pre', container).forEach(/** @param {HTMLElement} pre */function (pre) { + var dependencies = (pre.getAttribute('data-dependencies') || '').trim(); + dependencies = dependencies ? dependencies + ',' + id : id; + pre.setAttribute('data-dependencies', dependencies); }); + + Prism.highlightAllUnder(container); }); } else { examples[id].innerHTML = ''; } } - - /** - * Loads a language, including all dependencies - * - * @param {string} lang the language to load - * @returns {Promise} the promise which resolves as soon as everything is loaded - */ - function loadLanguage(lang) { - // at first we need to fetch all dependencies for the main language - // Note: we need to do this, even if the main language already is loaded (just to be sure..) - // - // We load an array of all dependencies and call recursively this function on each entry - // - // dependencies is now an (possibly empty) array of loading-promises - var dependencies = getDependenciesOfLanguage(lang).map(loadLanguage); - - // We create a promise, which will resolve, as soon as all dependencies are loaded. - // They need to be fully loaded because the main language may extend them. - return Promise.all(dependencies) - .then(function () { - - // If the main language itself isn't already loaded, load it now - // and return the newly created promise (we chain the promises). - // If the language is already loaded, just do nothing - the next .then() - // will immediately be called - if (!Prism.languages[lang]) { - return new Promise(function (resolve) { - $u.script('components/prism-' + lang + '.js', resolve); - }); - } - }); - } - - - /** - * Returns all dependencies (as identifiers) of a specific language - * - * @param {string} lang - * @returns {string[]} the list of dependencies. Empty if the language has none. - */ - function getDependenciesOfLanguage(lang) { - if (!components.languages[lang] || !components.languages[lang].require) { - return []; - } - - return ($u.type(components.languages[lang].require) === 'array') - ? components.languages[lang].require - : [components.languages[lang].require]; - } - }()); diff --git a/examples.html b/examples.html index 6ce28fe6ec..0d979d5981 100644 --- a/examples.html +++ b/examples.html @@ -101,6 +101,7 @@

            Per language examples

            + diff --git a/examples/prism-js-templates.html b/examples/prism-js-templates.html index 2fc947aa76..e1fd09dc6c 100644 --- a/examples/prism-js-templates.html +++ b/examples/prism-js-templates.html @@ -1,25 +1,25 @@

            HTML template literals

            -
            html`
            +
            html`
             <p>
             	Foo.
             </p>`;

            JS DOM

            -
            div.innerHTML = `<p></p>`;
            +
            div.innerHTML = `<p></p>`;
             div.outerHTML = `<p></p>`;

            styled-jsx CSS template literals

            -
            css`a:hover { color: blue; }`;
            +
            css`a:hover { color: blue; }`;

            styled-components CSS template literals

            -
            const Button = styled.button`
            +
            const Button = styled.button`
             	color: blue;
             	background: red;
             `;

            Markdown template literals

            -
            markdown`# My title`;
            +
            markdown`# My title`;

            GraphQL template literals

            -
            gql`{ foo }`;
            +
            gql`{ foo }`;
             graphql`{ foo }`;
            diff --git a/test.html b/test.html index 0f363e8b47..04a0dfc59f 100644 --- a/test.html +++ b/test.html @@ -173,6 +173,10 @@

            Test drive

            + + @@ -266,10 +270,7 @@

            Test drive

            updateHashLanguage(lang); updateShareLink(); - // loadLanguage() returns a promise, so we use highlightCode() - // as resolve callback. The promise will be immediately - // resolved if there is nothing to load. - loadLanguage(lang).then(highlightCode); + highlightCode(); } } }, name @@ -279,59 +280,6 @@

            Test drive

            } -/** - * Loads a language, including all dependencies - * - * @param {string} lang the language to load - * @type {Promise} the promise which resolves as soon as everything is loaded - */ -function loadLanguage (lang) -{ - // at first we need to fetch all dependencies for the main language - // Note: we need to do this, even if the main language already is loaded (just to be sure..) - // - // We load an array of all dependencies and call recursively this function on each entry - // - // dependencies is now an (possibly empty) array of loading-promises - var dependencies = getDependenciesOfLanguage(lang).map(loadLanguage); - - // We create a promise, which will resolve, as soon as all dependencies are loaded. - // They need to be fully loaded because the main language may extend them. - return Promise.all(dependencies) - .then(function () { - - // If the main language itself isn't already loaded, load it now - // and return the newly created promise (we chain the promises). - // If the language is already loaded, just do nothing - the next .then() - // will immediately be called - if (!Prism.languages[lang]) { - return new Promise(function (resolve) { - $u.script('components/prism-' + lang + '.js', resolve); - }); - } - }); -} - - -/** - * Returns all dependencies (as identifiers) of a specific language - * - * @param {string} lang - * @returns {Array.} the list of dependencies. Empty if the language has none. - */ -function getDependenciesOfLanguage (lang) -{ - if (!components.languages[lang] || !components.languages[lang].require) - { - return []; - } - - return ($u.type(components.languages[lang].require) === "array") - ? components.languages[lang].require - : [components.languages[lang].require]; -} - - var radios = $$('input[name=language]'); var selectedRadio = radios[0]; From 18bd101cc5e0a11d68d24bbdbd514cc53f313671 Mon Sep 17 00:00:00 2001 From: Wei Ting <59229084+hoonweiting@users.noreply.github.com> Date: Tue, 5 Oct 2021 23:53:12 +0800 Subject: [PATCH 0932/1100] Python: Recognise walrus operator (#3126) --- components/prism-python.js | 2 +- components/prism-python.min.js | 2 +- tests/languages/python/operator_feature.test | 4 +++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/components/prism-python.js b/components/prism-python.js index 9cf2fcca12..0dba9bbc91 100644 --- a/components/prism-python.js +++ b/components/prism-python.js @@ -55,7 +55,7 @@ Prism.languages.python = { 'builtin': /\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/, 'boolean': /\b(?:False|None|True)\b/, 'number': /\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i, - 'operator': /[-+%=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/, + 'operator': /[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/, 'punctuation': /[{}[\];(),.:]/ }; diff --git a/components/prism-python.min.js b/components/prism-python.min.js index ddddefdd0a..9b7cbee9e3 100644 --- a/components/prism-python.min.js +++ b/components/prism-python.min.js @@ -1 +1 @@ -Prism.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/im,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:and|as|assert|async|await|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},Prism.languages.python["string-interpolation"].inside.interpolation.inside.rest=Prism.languages.python,Prism.languages.py=Prism.languages.python; \ No newline at end of file +Prism.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/im,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:and|as|assert|async|await|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},Prism.languages.python["string-interpolation"].inside.interpolation.inside.rest=Prism.languages.python,Prism.languages.py=Prism.languages.python; \ No newline at end of file diff --git a/tests/languages/python/operator_feature.test b/tests/languages/python/operator_feature.test index 6785336627..dd6f20dfbf 100644 --- a/tests/languages/python/operator_feature.test +++ b/tests/languages/python/operator_feature.test @@ -7,6 +7,7 @@ > >= >> = == != +:= & | ^ ~ ---------------------------------------------------- @@ -21,9 +22,10 @@ ["operator", ">"], ["operator", ">="], ["operator", ">>"], ["operator", "="], ["operator", "=="], ["operator", "!="], + ["operator", ":="], ["operator", "&"], ["operator", "|"], ["operator", "^"], ["operator", "~"] ] ---------------------------------------------------- -Checks for all operators. \ No newline at end of file +Checks for all operators. From 3ef7153345c59168501816c0f3ef8e62551158c8 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Tue, 5 Oct 2021 20:03:08 +0200 Subject: [PATCH 0933/1100] TAP: Conform to quoted-properties style (#3127) --- components/prism-tap.js | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/components/prism-tap.js b/components/prism-tap.js index 7caa2d1e17..abd9107b87 100644 --- a/components/prism-tap.js +++ b/components/prism-tap.js @@ -1,17 +1,19 @@ +// https://en.wikipedia.org/wiki/Test_Anything_Protocol + Prism.languages.tap = { - fail: /not ok[^#{\n\r]*/, - pass: /ok[^#{\n\r]*/, - pragma: /pragma [+-][a-z]+/, - bailout: /bail out!.*/i, - version: /TAP version \d+/i, - plan: /\b\d+\.\.\d+(?: +#.*)?/, - subtest: { + 'fail': /not ok[^#{\n\r]*/, + 'pass': /ok[^#{\n\r]*/, + 'pragma': /pragma [+-][a-z]+/, + 'bailout': /bail out!.*/i, + 'version': /TAP version \d+/i, + 'plan': /\b\d+\.\.\d+(?: +#.*)?/, + 'subtest': { pattern: /# Subtest(?:: .*)?/, greedy: true }, - punctuation: /[{}]/, - directive: /#.*/, - yamlish: { + 'punctuation': /[{}]/, + 'directive': /#.*/, + 'yamlish': { pattern: /(^[ \t]*)---[\s\S]*?[\r\n][ \t]*\.\.\.$/m, lookbehind: true, inside: Prism.languages.yaml, From 2f7f736495e3214d720888e718b6dea549380a24 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Tue, 5 Oct 2021 21:15:33 +0200 Subject: [PATCH 0934/1100] Added more language tests (#3131) --- tests/languages/ada/punctuation_feature.test | 14 + .../applescript/punctuation_feature.test | 18 + tests/languages/aql/boolean_feature.test | 13 + tests/languages/arduino/builtin_feature.test | 667 +++ tests/languages/arduino/constant_feature.test | 43 + tests/languages/arduino/keyword_feature.test | 75 + tests/languages/asm6502/opcode_feature.test | 234 +- .../languages/basic/punctuation_feature.test | 11 + tests/languages/batch/command_feature.test | 53 +- tests/languages/batch/label_feature.test | 9 +- tests/languages/bison/number_feature.test | 16 +- tests/languages/cfscript/type_feature.test | 4 +- tests/languages/cil/directive_feature.test | 15 + tests/languages/cil/number_feature.test | 13 + tests/languages/cil/punctuation_feature.test | 21 + .../languages/concurnas/keyword_feature.test | 34 +- .../languages/concurnas/operator_feature.test | 44 +- tests/languages/concurnas/string_feature.test | 34 +- tests/languages/coq/attribute_feature.test | 24 +- .../class-name-declaration_feature.test | 15 +- .../csharp/interpolation-string_feature.test | 30 + .../css!+css-extras/color_feature.test | 341 ++ tests/languages/dart/class-name_feature.test | 123 +- tests/languages/dhall/builtin_feature.test | 9 + .../languages/eiffel/punctuation_feature.test | 29 + tests/languages/ejs+pug/ejs_inclusion.test | 24 + tests/languages/erb+haml/erb_inclusion.test | 39 + .../excel-formula/comment_feature.test | 10 + tests/languages/factor/comments_feature.test | 73 +- tests/languages/factor/numbers_feature.test | 78 +- tests/languages/factor/strings_feature.test | 127 +- .../languages/false/non-standard_feature.test | 13 + .../path_feature.test | 15 + .../fortran/punctuation_feature.test | 15 + tests/languages/ftl/directive_feature.test | 16 + tests/languages/gdscript/number_feature.test | 9 +- tests/languages/haml/filter_feature.test | 20 + .../languages/hcl/interpolation_feature.test | 425 +- tests/languages/hlsl/keyword_feature.test | 1404 +++--- .../ichigojam/punctuation_feature.test | 13 + .../arg-skeleton_feature.test | 36 +- .../plural-style_feature.test | 18 +- .../icu-message-format/string_feature.test | 36 + tests/languages/iecst/boolean_feature.test | 11 + tests/languages/iecst/comment_feature.test | 11 + tests/languages/io/builtin_feature.test | 161 + tests/languages/io/keyword_feature.test | 141 + tests/languages/j/operator_feature.test | 14 + tests/languages/java/class-name_feature.test | 44 +- tests/languages/jolie/builtin_feature.test | 27 + .../languages/jolie/punctuation_feature.test | 8 + .../languages/jsstacktrace/alias_feature.test | 26 + .../jsstacktrace/function_feature.test | 51 +- .../jsstacktrace/notmycode_feature.test | 27 + .../kumir/system-variable_feature.test | 7 + tests/languages/kumir/type_feature.test | 12 +- tests/languages/less/variable_feature.test | 9 + .../lilypond/class-name_feature.test | 15 + .../livescript+pug/livescript_inclusion.test | 28 + .../livescript/punctuation_feature.test | 18 + tests/languages/log/email_feature.test | 10 + tests/languages/log/level_feature.test | 14 +- tests/languages/log/mac-address_feature.test | 7 + .../lolcode/punctuation_feature.test | 10 + tests/languages/lolcode/string_feature.test | 21 +- .../markup+http/text-xml_inclusion.test | 30 + .../moonscript/function_feature.test | 715 +++ tests/languages/nevod/full_feature.test | 280 ++ tests/languages/nevod/package_feature.test | 79 + tests/languages/nevod/pattern_feature.test | 282 ++ tests/languages/nevod/search_feature.test | 95 + .../languages/openqasm/function_feature.test | 23 + .../openqasm/punctuation_feature.test | 18 + .../pascaligo/class-name_feature.test | 42 + .../peoplecode/class-name_feature.test | 264 + .../peoplecode/function_feature.test | 9 + tests/languages/perl/variable_feature.test | 9 +- .../languages/phpdoc/class-name_feature.test | 141 +- tests/languages/promql/keyword_feature.test | 43 + tests/languages/promql/number_feature.test | 17 + tests/languages/promql/operator_feature.test | 25 + .../promql/time_series_selection.test | 8 + tests/languages/pug/filter_feature.test | 11 + tests/languages/pure/punctuation_feature.test | 13 + .../languages/purebasic/function_feature.test | 220 +- .../languages/purebasic/keyword_feature.test | 211 + .../languages/purescript/keyword_feature.test | 2 + tests/languages/q/comment_feature.test | 8 +- tests/languages/q/punctuation_feature.test | 17 + tests/languages/qsharp/keyword_feature.test | 129 + tests/languages/qsharp/string_feature.test | 39 + tests/languages/r/punctuation_feature.test | 14 + .../languages/racket/identifier_feature.test | 7 + tests/languages/rip/punctuation_feature.test | 28 + tests/languages/ruby+haml/ruby_inclusion.test | 58 + tests/languages/rust/namespace_feature.test | 37 +- tests/languages/sas/number_feature.test | 8 +- .../languages/sass/variable-line_feature.test | 10 +- tests/languages/smali/builtin_feature.test | 73 + tests/languages/smali/label_feature.test | 13 + tests/languages/smali/register_feature.test | 28 + tests/languages/sparql/keyword_feature.test | 174 +- .../languages/splunk-spl/boolean_feature.test | 9 + .../splunk-spl/property_feature.test | 9 + .../splunk-spl/punctuation_feature.test | 11 + tests/languages/sqf/function_feature.test | 4397 +++++++++++++++++ tests/languages/sql+sas/sql_inclusion.test | 365 +- .../languages/stan/function-arg_feature.test | 21 + tests/languages/tap/subtest_feature.test | 7 + tests/languages/tcl/punctuation_feature.test | 12 + .../textile+haml/textile_inclusion.test | 50 + tests/languages/textile/tag_feature.test | 20 + .../unrealscript/category_feature.test | 52 + tests/languages/v/attribute_feature.test | 59 + tests/languages/vala/constant_feature.test | 7 + tests/languages/vala/regex_feature.test | 11 + .../languages/warpscript/keyword_feature.test | 49 + tests/languages/warpscript/macro_feature.test | 7 + .../warpscript/variable_feature.test | 7 + tests/languages/xojo/punctuation_feature.test | 12 + 120 files changed, 11590 insertions(+), 1627 deletions(-) create mode 100644 tests/languages/ada/punctuation_feature.test create mode 100644 tests/languages/applescript/punctuation_feature.test create mode 100644 tests/languages/aql/boolean_feature.test create mode 100644 tests/languages/arduino/builtin_feature.test create mode 100644 tests/languages/arduino/constant_feature.test create mode 100644 tests/languages/arduino/keyword_feature.test create mode 100644 tests/languages/basic/punctuation_feature.test create mode 100644 tests/languages/cil/directive_feature.test create mode 100644 tests/languages/cil/number_feature.test create mode 100644 tests/languages/cil/punctuation_feature.test create mode 100644 tests/languages/css!+css-extras/color_feature.test create mode 100644 tests/languages/dhall/builtin_feature.test create mode 100644 tests/languages/eiffel/punctuation_feature.test create mode 100644 tests/languages/ejs+pug/ejs_inclusion.test create mode 100644 tests/languages/erb+haml/erb_inclusion.test create mode 100644 tests/languages/excel-formula/comment_feature.test create mode 100644 tests/languages/false/non-standard_feature.test create mode 100644 tests/languages/fortran/punctuation_feature.test create mode 100644 tests/languages/haml/filter_feature.test create mode 100644 tests/languages/ichigojam/punctuation_feature.test create mode 100644 tests/languages/icu-message-format/string_feature.test create mode 100644 tests/languages/iecst/boolean_feature.test create mode 100644 tests/languages/iecst/comment_feature.test create mode 100644 tests/languages/io/builtin_feature.test create mode 100644 tests/languages/io/keyword_feature.test create mode 100644 tests/languages/j/operator_feature.test create mode 100644 tests/languages/jolie/builtin_feature.test create mode 100644 tests/languages/jolie/punctuation_feature.test create mode 100644 tests/languages/jsstacktrace/alias_feature.test create mode 100644 tests/languages/kumir/system-variable_feature.test create mode 100644 tests/languages/less/variable_feature.test create mode 100644 tests/languages/lilypond/class-name_feature.test create mode 100644 tests/languages/livescript+pug/livescript_inclusion.test create mode 100644 tests/languages/livescript/punctuation_feature.test create mode 100644 tests/languages/log/email_feature.test create mode 100644 tests/languages/log/mac-address_feature.test create mode 100644 tests/languages/lolcode/punctuation_feature.test create mode 100644 tests/languages/markup+http/text-xml_inclusion.test create mode 100644 tests/languages/moonscript/function_feature.test create mode 100644 tests/languages/nevod/full_feature.test create mode 100644 tests/languages/nevod/package_feature.test create mode 100644 tests/languages/nevod/pattern_feature.test create mode 100644 tests/languages/nevod/search_feature.test create mode 100644 tests/languages/openqasm/function_feature.test create mode 100644 tests/languages/openqasm/punctuation_feature.test create mode 100644 tests/languages/pascaligo/class-name_feature.test create mode 100644 tests/languages/peoplecode/class-name_feature.test create mode 100644 tests/languages/peoplecode/function_feature.test create mode 100644 tests/languages/promql/keyword_feature.test create mode 100644 tests/languages/promql/number_feature.test create mode 100644 tests/languages/promql/operator_feature.test create mode 100644 tests/languages/pug/filter_feature.test create mode 100644 tests/languages/pure/punctuation_feature.test create mode 100644 tests/languages/purebasic/keyword_feature.test create mode 100644 tests/languages/q/punctuation_feature.test create mode 100644 tests/languages/qsharp/keyword_feature.test create mode 100644 tests/languages/qsharp/string_feature.test create mode 100644 tests/languages/r/punctuation_feature.test create mode 100644 tests/languages/racket/identifier_feature.test create mode 100644 tests/languages/rip/punctuation_feature.test create mode 100644 tests/languages/ruby+haml/ruby_inclusion.test create mode 100644 tests/languages/smali/builtin_feature.test create mode 100644 tests/languages/smali/label_feature.test create mode 100644 tests/languages/smali/register_feature.test create mode 100644 tests/languages/splunk-spl/boolean_feature.test create mode 100644 tests/languages/splunk-spl/property_feature.test create mode 100644 tests/languages/splunk-spl/punctuation_feature.test create mode 100644 tests/languages/sqf/function_feature.test create mode 100644 tests/languages/stan/function-arg_feature.test create mode 100644 tests/languages/tap/subtest_feature.test create mode 100644 tests/languages/tcl/punctuation_feature.test create mode 100644 tests/languages/textile+haml/textile_inclusion.test create mode 100644 tests/languages/textile/tag_feature.test create mode 100644 tests/languages/unrealscript/category_feature.test create mode 100644 tests/languages/v/attribute_feature.test create mode 100644 tests/languages/vala/constant_feature.test create mode 100644 tests/languages/vala/regex_feature.test create mode 100644 tests/languages/warpscript/keyword_feature.test create mode 100644 tests/languages/warpscript/macro_feature.test create mode 100644 tests/languages/warpscript/variable_feature.test create mode 100644 tests/languages/xojo/punctuation_feature.test diff --git a/tests/languages/ada/punctuation_feature.test b/tests/languages/ada/punctuation_feature.test new file mode 100644 index 0000000000..46bf069344 --- /dev/null +++ b/tests/languages/ada/punctuation_feature.test @@ -0,0 +1,14 @@ +. .. +, ; ( ) : + +---------------------------------------------------- + +[ + ["punctuation", "."], + ["punctuation", ".."], + ["punctuation", ","], + ["punctuation", ";"], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", ":"] +] diff --git a/tests/languages/applescript/punctuation_feature.test b/tests/languages/applescript/punctuation_feature.test new file mode 100644 index 0000000000..183ea153e7 --- /dev/null +++ b/tests/languages/applescript/punctuation_feature.test @@ -0,0 +1,18 @@ +{ } ( ) : , +¬ « » 《 》 + +---------------------------------------------------- + +[ + ["punctuation", "{"], + ["punctuation", "}"], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", ":"], + ["punctuation", ","], + ["punctuation", "¬"], + ["punctuation", "«"], + ["punctuation", "»"], + ["punctuation", "《"], + ["punctuation", "》"] +] diff --git a/tests/languages/aql/boolean_feature.test b/tests/languages/aql/boolean_feature.test new file mode 100644 index 0000000000..6d5c41a781 --- /dev/null +++ b/tests/languages/aql/boolean_feature.test @@ -0,0 +1,13 @@ +true +false +TRUE +FALSE + +---------------------------------------------------- + +[ + ["boolean", "true"], + ["boolean", "false"], + ["boolean", "TRUE"], + ["boolean", "FALSE"] +] diff --git a/tests/languages/arduino/builtin_feature.test b/tests/languages/arduino/builtin_feature.test new file mode 100644 index 0000000000..29bf7785b7 --- /dev/null +++ b/tests/languages/arduino/builtin_feature.test @@ -0,0 +1,667 @@ +KeyboardController +MouseController +SoftwareSerial +EthernetServer +EthernetClient +LiquidCrystal +LiquidCrystal_I2C +RobotControl +GSMVoiceCall +EthernetUDP +EsploraTFT +HttpClient +RobotMotor +WiFiClient +GSMScanner +FileSystem +Scheduler +GSMServer +YunClient +YunServer +IPAddress +GSMClient +GSMModem +Keyboard +Ethernet +Console +GSMBand +Esplora +Stepper +Process +WiFiUDP +GSM_SMS +Mailbox +USBHost +Firmata +PImage +Client +Server +GSMPIN +FileIO +Bridge +Serial +EEPROM +Stream +Mouse +Audio +Servo +File +Task +GPRS +WiFi +Wire +TFT +GSM +SPI +SD +runShellCommandAsynchronously +analogWriteResolution +retrieveCallingNumber +printFirmwareVersion +analogReadResolution +sendDigitalPortPair +noListenOnLocalhost +readJoystickButton +setFirmwareVersion +readJoystickSwitch +scrollDisplayRight +getVoiceCallStatus +scrollDisplayLeft +writeMicroseconds +delayMicroseconds +beginTransmission +getSignalStrength +runAsynchronously +getAsynchronously +listenOnLocalhost +getCurrentCarrier +readAccelerometer +messageAvailable +sendDigitalPorts +lineFollowConfig +countryNameWrite +runShellCommand +readStringUntil +rewindDirectory +readTemperature +setClockDivider +readLightSensor +endTransmission +analogReference +detachInterrupt +countryNameRead +attachInterrupt +encryptionType +readBytesUntil +robotNameWrite +readMicrophone +robotNameRead +cityNameWrite +userNameWrite +readJoystickY +readJoystickX +mouseReleased +openNextFile +scanNetworks +noInterrupts +digitalWrite +beginSpeaker +mousePressed +isActionDone +mouseDragged +displayLogos +noAutoscroll +addParameter +remoteNumber +getModifiers +keyboardRead +userNameRead +waitContinue +processInput +parseCommand +printVersion +readNetworks +writeMessage +blinkVersion +cityNameRead +readMessage +setDataMode +parsePacket +isListening +setBitOrder +beginPacket +isDirectory +motorsWrite +drawCompass +digitalRead +clearScreen +serialEvent +rightToLeft +setTextSize +leftToRight +requestFrom +keyReleased +compassRead +analogWrite +interrupts +WiFiServer +disconnect +playMelody +parseFloat +autoscroll +getPINUsed +setPINUsed +setTimeout +sendAnalog +readSlider +analogRead +beginWrite +createChar +motorsStop +keyPressed +tempoWrite +readButton +subnetMask +debugPrint +macAddress +writeGreen +randomSeed +attachGPRS +readString +sendString +remotePort +releaseAll +mouseMoved +background +getXChange +getYChange +answerCall +getResult +voiceCall +endPacket +constrain +getSocket +writeJSON +getButton +available +connected +findUntil +readBytes +exitValue +readGreen +writeBlue +startLoop +isPressed +sendSysex +pauseMode +gatewayIP +setCursor +getOemKey +tuneWrite +noDisplay +loadImage +switchPIN +onRequest +onReceive +changePIN +playFile +noBuffer +parseInt +overflow +checkPIN +knobRead +beginTFT +bitClear +updateIR +bitWrite +position +writeRGB +highByte +writeRed +setSpeed +readBlue +noStroke +remoteIP +transfer +shutdown +hangCall +beginSMS +endWrite +attached +maintain +noCursor +checkReg +checkPUK +shiftOut +isValid +shiftIn +pulseIn +connect +println +localIP +pinMode +getIMEI +display +noBlink +process +getBand +running +beginSD +drawBMP +lowByte +setBand +release +bitRead +prepare +pointTo +readRed +setMode +noFill +remove +listen +stroke +detach +attach +noTone +exists +buffer +height +bitSet +circle +config +cursor +random +IRread +setDNS +endSMS +getKey +micros +millis +begin +print +write +ready +flush +width +isPIN +blink +clear +press +mkdir +rmdir +close +point +yield +image +BSSID +click +delay +read +text +move +peek +beep +rect +line +open +seek +fill +size +turn +stop +home +find +step +tone +sqrt +RSSI +SSID +end +bit +tan +cos +sin +pow +map +abs +max +min +get +run +put + +---------------------------------------------------- + +[ + ["builtin", "KeyboardController"], + ["builtin", "MouseController"], + ["builtin", "SoftwareSerial"], + ["builtin", "EthernetServer"], + ["builtin", "EthernetClient"], + ["builtin", "LiquidCrystal"], + ["builtin", "LiquidCrystal_I2C"], + ["builtin", "RobotControl"], + ["builtin", "GSMVoiceCall"], + ["builtin", "EthernetUDP"], + ["builtin", "EsploraTFT"], + ["builtin", "HttpClient"], + ["builtin", "RobotMotor"], + ["builtin", "WiFiClient"], + ["builtin", "GSMScanner"], + ["builtin", "FileSystem"], + ["builtin", "Scheduler"], + ["builtin", "GSMServer"], + ["builtin", "YunClient"], + ["builtin", "YunServer"], + ["builtin", "IPAddress"], + ["builtin", "GSMClient"], + ["builtin", "GSMModem"], + ["builtin", "Keyboard"], + ["builtin", "Ethernet"], + ["builtin", "Console"], + ["builtin", "GSMBand"], + ["builtin", "Esplora"], + ["builtin", "Stepper"], + ["builtin", "Process"], + ["builtin", "WiFiUDP"], + ["builtin", "GSM_SMS"], + ["builtin", "Mailbox"], + ["builtin", "USBHost"], + ["builtin", "Firmata"], + ["builtin", "PImage"], + ["builtin", "Client"], + ["builtin", "Server"], + ["builtin", "GSMPIN"], + ["builtin", "FileIO"], + ["builtin", "Bridge"], + ["builtin", "Serial"], + ["builtin", "EEPROM"], + ["builtin", "Stream"], + ["builtin", "Mouse"], + ["builtin", "Audio"], + ["builtin", "Servo"], + ["builtin", "File"], + ["builtin", "Task"], + ["builtin", "GPRS"], + ["builtin", "WiFi"], + ["builtin", "Wire"], + ["builtin", "TFT"], + ["builtin", "GSM"], + ["builtin", "SPI"], + ["builtin", "SD"], + ["builtin", "runShellCommandAsynchronously"], + ["builtin", "analogWriteResolution"], + ["builtin", "retrieveCallingNumber"], + ["builtin", "printFirmwareVersion"], + ["builtin", "analogReadResolution"], + ["builtin", "sendDigitalPortPair"], + ["builtin", "noListenOnLocalhost"], + ["builtin", "readJoystickButton"], + ["builtin", "setFirmwareVersion"], + ["builtin", "readJoystickSwitch"], + ["builtin", "scrollDisplayRight"], + ["builtin", "getVoiceCallStatus"], + ["builtin", "scrollDisplayLeft"], + ["builtin", "writeMicroseconds"], + ["builtin", "delayMicroseconds"], + ["builtin", "beginTransmission"], + ["builtin", "getSignalStrength"], + ["builtin", "runAsynchronously"], + ["builtin", "getAsynchronously"], + ["builtin", "listenOnLocalhost"], + ["builtin", "getCurrentCarrier"], + ["builtin", "readAccelerometer"], + ["builtin", "messageAvailable"], + ["builtin", "sendDigitalPorts"], + ["builtin", "lineFollowConfig"], + ["builtin", "countryNameWrite"], + ["builtin", "runShellCommand"], + ["builtin", "readStringUntil"], + ["builtin", "rewindDirectory"], + ["builtin", "readTemperature"], + ["builtin", "setClockDivider"], + ["builtin", "readLightSensor"], + ["builtin", "endTransmission"], + ["builtin", "analogReference"], + ["builtin", "detachInterrupt"], + ["builtin", "countryNameRead"], + ["builtin", "attachInterrupt"], + ["builtin", "encryptionType"], + ["builtin", "readBytesUntil"], + ["builtin", "robotNameWrite"], + ["builtin", "readMicrophone"], + ["builtin", "robotNameRead"], + ["builtin", "cityNameWrite"], + ["builtin", "userNameWrite"], + ["builtin", "readJoystickY"], + ["builtin", "readJoystickX"], + ["builtin", "mouseReleased"], + ["builtin", "openNextFile"], + ["builtin", "scanNetworks"], + ["builtin", "noInterrupts"], + ["builtin", "digitalWrite"], + ["builtin", "beginSpeaker"], + ["builtin", "mousePressed"], + ["builtin", "isActionDone"], + ["builtin", "mouseDragged"], + ["builtin", "displayLogos"], + ["builtin", "noAutoscroll"], + ["builtin", "addParameter"], + ["builtin", "remoteNumber"], + ["builtin", "getModifiers"], + ["builtin", "keyboardRead"], + ["builtin", "userNameRead"], + ["builtin", "waitContinue"], + ["builtin", "processInput"], + ["builtin", "parseCommand"], + ["builtin", "printVersion"], + ["builtin", "readNetworks"], + ["builtin", "writeMessage"], + ["builtin", "blinkVersion"], + ["builtin", "cityNameRead"], + ["builtin", "readMessage"], + ["builtin", "setDataMode"], + ["builtin", "parsePacket"], + ["builtin", "isListening"], + ["builtin", "setBitOrder"], + ["builtin", "beginPacket"], + ["builtin", "isDirectory"], + ["builtin", "motorsWrite"], + ["builtin", "drawCompass"], + ["builtin", "digitalRead"], + ["builtin", "clearScreen"], + ["builtin", "serialEvent"], + ["builtin", "rightToLeft"], + ["builtin", "setTextSize"], + ["builtin", "leftToRight"], + ["builtin", "requestFrom"], + ["builtin", "keyReleased"], + ["builtin", "compassRead"], + ["builtin", "analogWrite"], + ["builtin", "interrupts"], + ["builtin", "WiFiServer"], + ["builtin", "disconnect"], + ["builtin", "playMelody"], + ["builtin", "parseFloat"], + ["builtin", "autoscroll"], + ["builtin", "getPINUsed"], + ["builtin", "setPINUsed"], + ["builtin", "setTimeout"], + ["builtin", "sendAnalog"], + ["builtin", "readSlider"], + ["builtin", "analogRead"], + ["builtin", "beginWrite"], + ["builtin", "createChar"], + ["builtin", "motorsStop"], + ["builtin", "keyPressed"], + ["builtin", "tempoWrite"], + ["builtin", "readButton"], + ["builtin", "subnetMask"], + ["builtin", "debugPrint"], + ["builtin", "macAddress"], + ["builtin", "writeGreen"], + ["builtin", "randomSeed"], + ["builtin", "attachGPRS"], + ["builtin", "readString"], + ["builtin", "sendString"], + ["builtin", "remotePort"], + ["builtin", "releaseAll"], + ["builtin", "mouseMoved"], + ["builtin", "background"], + ["builtin", "getXChange"], + ["builtin", "getYChange"], + ["builtin", "answerCall"], + ["builtin", "getResult"], + ["builtin", "voiceCall"], + ["builtin", "endPacket"], + ["builtin", "constrain"], + ["builtin", "getSocket"], + ["builtin", "writeJSON"], + ["builtin", "getButton"], + ["builtin", "available"], + ["builtin", "connected"], + ["builtin", "findUntil"], + ["builtin", "readBytes"], + ["builtin", "exitValue"], + ["builtin", "readGreen"], + ["builtin", "writeBlue"], + ["builtin", "startLoop"], + ["builtin", "isPressed"], + ["builtin", "sendSysex"], + ["builtin", "pauseMode"], + ["builtin", "gatewayIP"], + ["builtin", "setCursor"], + ["builtin", "getOemKey"], + ["builtin", "tuneWrite"], + ["builtin", "noDisplay"], + ["builtin", "loadImage"], + ["builtin", "switchPIN"], + ["builtin", "onRequest"], + ["builtin", "onReceive"], + ["builtin", "changePIN"], + ["builtin", "playFile"], + ["builtin", "noBuffer"], + ["builtin", "parseInt"], + ["builtin", "overflow"], + ["builtin", "checkPIN"], + ["builtin", "knobRead"], + ["builtin", "beginTFT"], + ["builtin", "bitClear"], + ["builtin", "updateIR"], + ["builtin", "bitWrite"], + ["builtin", "position"], + ["builtin", "writeRGB"], + ["builtin", "highByte"], + ["builtin", "writeRed"], + ["builtin", "setSpeed"], + ["builtin", "readBlue"], + ["builtin", "noStroke"], + ["builtin", "remoteIP"], + ["builtin", "transfer"], + ["builtin", "shutdown"], + ["builtin", "hangCall"], + ["builtin", "beginSMS"], + ["builtin", "endWrite"], + ["builtin", "attached"], + ["builtin", "maintain"], + ["builtin", "noCursor"], + ["builtin", "checkReg"], + ["builtin", "checkPUK"], + ["builtin", "shiftOut"], + ["builtin", "isValid"], + ["builtin", "shiftIn"], + ["builtin", "pulseIn"], + ["builtin", "connect"], + ["builtin", "println"], + ["builtin", "localIP"], + ["builtin", "pinMode"], + ["builtin", "getIMEI"], + ["builtin", "display"], + ["builtin", "noBlink"], + ["builtin", "process"], + ["builtin", "getBand"], + ["builtin", "running"], + ["builtin", "beginSD"], + ["builtin", "drawBMP"], + ["builtin", "lowByte"], + ["builtin", "setBand"], + ["builtin", "release"], + ["builtin", "bitRead"], + ["builtin", "prepare"], + ["builtin", "pointTo"], + ["builtin", "readRed"], + ["builtin", "setMode"], + ["builtin", "noFill"], + ["builtin", "remove"], + ["builtin", "listen"], + ["builtin", "stroke"], + ["builtin", "detach"], + ["builtin", "attach"], + ["builtin", "noTone"], + ["builtin", "exists"], + ["builtin", "buffer"], + ["builtin", "height"], + ["builtin", "bitSet"], + ["builtin", "circle"], + ["builtin", "config"], + ["builtin", "cursor"], + ["builtin", "random"], + ["builtin", "IRread"], + ["builtin", "setDNS"], + ["builtin", "endSMS"], + ["builtin", "getKey"], + ["builtin", "micros"], + ["builtin", "millis"], + ["builtin", "begin"], + ["builtin", "print"], + ["builtin", "write"], + ["builtin", "ready"], + ["builtin", "flush"], + ["builtin", "width"], + ["builtin", "isPIN"], + ["builtin", "blink"], + ["builtin", "clear"], + ["builtin", "press"], + ["builtin", "mkdir"], + ["builtin", "rmdir"], + ["builtin", "close"], + ["builtin", "point"], + ["builtin", "yield"], + ["builtin", "image"], + ["builtin", "BSSID"], + ["builtin", "click"], + ["builtin", "delay"], + ["builtin", "read"], + ["builtin", "text"], + ["builtin", "move"], + ["builtin", "peek"], + ["builtin", "beep"], + ["builtin", "rect"], + ["builtin", "line"], + ["builtin", "open"], + ["builtin", "seek"], + ["builtin", "fill"], + ["builtin", "size"], + ["builtin", "turn"], + ["builtin", "stop"], + ["builtin", "home"], + ["builtin", "find"], + ["builtin", "step"], + ["builtin", "tone"], + ["builtin", "sqrt"], + ["builtin", "RSSI"], + ["builtin", "SSID"], + ["builtin", "end"], + ["builtin", "bit"], + ["builtin", "tan"], + ["builtin", "cos"], + ["builtin", "sin"], + ["builtin", "pow"], + ["builtin", "map"], + ["builtin", "abs"], + ["builtin", "max"], + ["builtin", "min"], + ["builtin", "get"], + ["builtin", "run"], + ["builtin", "put"] +] diff --git a/tests/languages/arduino/constant_feature.test b/tests/languages/arduino/constant_feature.test new file mode 100644 index 0000000000..ea33346ac5 --- /dev/null +++ b/tests/languages/arduino/constant_feature.test @@ -0,0 +1,43 @@ +DIGITAL_MESSAGE +FIRMATA_STRING +ANALOG_MESSAGE +REPORT_DIGITAL +REPORT_ANALOG +INPUT_PULLUP +SET_PIN_MODE +INTERNAL2V56 +SYSTEM_RESET +LED_BUILTIN +INTERNAL1V1 +SYSEX_START +INTERNAL +EXTERNAL +DEFAULT +OUTPUT +INPUT +HIGH +LOW + +---------------------------------------------------- + +[ + ["constant", "DIGITAL_MESSAGE"], + ["constant", "FIRMATA_STRING"], + ["constant", "ANALOG_MESSAGE"], + ["constant", "REPORT_DIGITAL"], + ["constant", "REPORT_ANALOG"], + ["constant", "INPUT_PULLUP"], + ["constant", "SET_PIN_MODE"], + ["constant", "INTERNAL2V56"], + ["constant", "SYSTEM_RESET"], + ["constant", "LED_BUILTIN"], + ["constant", "INTERNAL1V1"], + ["constant", "SYSEX_START"], + ["constant", "INTERNAL"], + ["constant", "EXTERNAL"], + ["constant", "DEFAULT"], + ["constant", "OUTPUT"], + ["constant", "INPUT"], + ["constant", "HIGH"], + ["constant", "LOW"] +] diff --git a/tests/languages/arduino/keyword_feature.test b/tests/languages/arduino/keyword_feature.test new file mode 100644 index 0000000000..7b44538984 --- /dev/null +++ b/tests/languages/arduino/keyword_feature.test @@ -0,0 +1,75 @@ +setup +if +else +while +do +for +return +in +instanceof +default +function +loop +goto +switch +case +new +try +throw +catch +finally +null +break +continue +boolean +bool +void +byte +word +string +String +array +int +long +integer +double + +---------------------------------------------------- + +[ + ["keyword", "setup"], + ["keyword", "if"], + ["keyword", "else"], + ["keyword", "while"], + ["keyword", "do"], + ["keyword", "for"], + ["keyword", "return"], + ["keyword", "in"], + ["keyword", "instanceof"], + ["keyword", "default"], + ["keyword", "function"], + ["keyword", "loop"], + ["keyword", "goto"], + ["keyword", "switch"], + ["keyword", "case"], + ["keyword", "new"], + ["keyword", "try"], + ["keyword", "throw"], + ["keyword", "catch"], + ["keyword", "finally"], + ["keyword", "null"], + ["keyword", "break"], + ["keyword", "continue"], + ["keyword", "boolean"], + ["keyword", "bool"], + ["keyword", "void"], + ["keyword", "byte"], + ["keyword", "word"], + ["keyword", "string"], + ["keyword", "String"], + ["keyword", "array"], + ["keyword", "int"], + ["keyword", "long"], + ["keyword", "integer"], + ["keyword", "double"] +] diff --git a/tests/languages/asm6502/opcode_feature.test b/tests/languages/asm6502/opcode_feature.test index 75e7b42806..8410fd2cbe 100644 --- a/tests/languages/asm6502/opcode_feature.test +++ b/tests/languages/asm6502/opcode_feature.test @@ -1,17 +1,233 @@ -LDA -BNE -inx +adc +and +asl +bcc +bcs +beq +bit +bmi +bne +bpl +brk +bvc +bvs clc +cld +cli +clv +cmp +cpx +cpy +dec +dex +dey +eor +inc +inx +iny +jmp +jsr +lda +ldx +ldy +lsr +nop +ora +pha +php +pla +plp +rol +ror +rti +rts +sbc +sec +sed +sei +sta +stx +sty +tax +tay +tsx +txa +txs +tya +ADC +AND +ASL +BCC +BCS +BEQ +BIT +BMI +BNE +BPL +BRK +BVC +BVS +CLC +CLD +CLI +CLV +CMP +CPX +CPY +DEC +DEX +DEY +EOR +INC +INX +INY +JMP +JSR +LDA +LDX +LDY +LSR +NOP +ORA +PHA +PHP +PLA +PLP +ROL +ROR +RTI +RTS +SBC +SEC +SED +SEI +STA +STX +STY +TAX +TAY +TSX +TXA +TXS +TYA -------------------------------------- +---------------------------------------------------- [ - ["opcode", "LDA"], - ["opcode", "BNE"], - ["opcode", "inx"], - ["opcode", "clc"] + ["opcode", "adc"], + ["opcode", "and"], + ["opcode", "asl"], + ["opcode", "bcc"], + ["opcode", "bcs"], + ["opcode", "beq"], + ["opcode", "bit"], + ["opcode", "bmi"], + ["opcode", "bne"], + ["opcode", "bpl"], + ["opcode", "brk"], + ["opcode", "bvc"], + ["opcode", "bvs"], + ["opcode", "clc"], + ["opcode", "cld"], + ["opcode", "cli"], + ["opcode", "clv"], + ["opcode", "cmp"], + ["opcode", "cpx"], + ["opcode", "cpy"], + ["opcode", "dec"], + ["opcode", "dex"], + ["opcode", "dey"], + ["opcode", "eor"], + ["opcode", "inc"], + ["opcode", "inx"], + ["opcode", "iny"], + ["opcode", "jmp"], + ["opcode", "jsr"], + ["opcode", "lda"], + ["opcode", "ldx"], + ["opcode", "ldy"], + ["opcode", "lsr"], + ["opcode", "nop"], + ["opcode", "ora"], + ["opcode", "pha"], + ["opcode", "php"], + ["opcode", "pla"], + ["opcode", "plp"], + ["opcode", "rol"], + ["opcode", "ror"], + ["opcode", "rti"], + ["opcode", "rts"], + ["opcode", "sbc"], + ["opcode", "sec"], + ["opcode", "sed"], + ["opcode", "sei"], + ["opcode", "sta"], + ["opcode", "stx"], + ["opcode", "sty"], + ["opcode", "tax"], + ["opcode", "tay"], + ["opcode", "tsx"], + ["opcode", "txa"], + ["opcode", "txs"], + ["opcode", "tya"], + ["opcode", "ADC"], + ["opcode", "AND"], + ["opcode", "ASL"], + ["opcode", "BCC"], + ["opcode", "BCS"], + ["opcode", "BEQ"], + ["opcode", "BIT"], + ["opcode", "BMI"], + ["opcode", "BNE"], + ["opcode", "BPL"], + ["opcode", "BRK"], + ["opcode", "BVC"], + ["opcode", "BVS"], + ["opcode", "CLC"], + ["opcode", "CLD"], + ["opcode", "CLI"], + ["opcode", "CLV"], + ["opcode", "CMP"], + ["opcode", "CPX"], + ["opcode", "CPY"], + ["opcode", "DEC"], + ["opcode", "DEX"], + ["opcode", "DEY"], + ["opcode", "EOR"], + ["opcode", "INC"], + ["opcode", "INX"], + ["opcode", "INY"], + ["opcode", "JMP"], + ["opcode", "JSR"], + ["opcode", "LDA"], + ["opcode", "LDX"], + ["opcode", "LDY"], + ["opcode", "LSR"], + ["opcode", "NOP"], + ["opcode", "ORA"], + ["opcode", "PHA"], + ["opcode", "PHP"], + ["opcode", "PLA"], + ["opcode", "PLP"], + ["opcode", "ROL"], + ["opcode", "ROR"], + ["opcode", "RTI"], + ["opcode", "RTS"], + ["opcode", "SBC"], + ["opcode", "SEC"], + ["opcode", "SED"], + ["opcode", "SEI"], + ["opcode", "STA"], + ["opcode", "STX"], + ["opcode", "STY"], + ["opcode", "TAX"], + ["opcode", "TAY"], + ["opcode", "TSX"], + ["opcode", "TXA"], + ["opcode", "TXS"], + ["opcode", "TYA"] ] -------------------------------------- +---------------------------------------------------- Check for opcodes diff --git a/tests/languages/basic/punctuation_feature.test b/tests/languages/basic/punctuation_feature.test new file mode 100644 index 0000000000..318275a6e6 --- /dev/null +++ b/tests/languages/basic/punctuation_feature.test @@ -0,0 +1,11 @@ +, ; : ( ) + +---------------------------------------------------- + +[ + ["punctuation", ","], + ["punctuation", ";"], + ["punctuation", ":"], + ["punctuation", "("], + ["punctuation", ")"] +] diff --git a/tests/languages/batch/command_feature.test b/tests/languages/batch/command_feature.test index 350788a8bd..77c928ca4b 100644 --- a/tests/languages/batch/command_feature.test +++ b/tests/languages/batch/command_feature.test @@ -1,10 +1,19 @@ FOR /l %%a in (5,-1,1) do (TITLE %title% -- closing in %%as) + +FOR /F %%A IN ('TYPE "%InFile%"^|find /v /c ""') + SET title=%~n0 + echo.Hello World + @ECHO OFF + if not defined ProgressFormat set "ProgressFormat=[PPPP]" + EXIT /b + set /a ProgressCnt+=1 + IF "%~1" NEQ "" (SET %~1=%new%) ELSE (echo.%new%) ---------------------------------------------------- @@ -12,13 +21,18 @@ IF "%~1" NEQ "" (SET %~1=%new%) ELSE (echo.%new%) [ ["command", [ ["keyword", "FOR"], - ["parameter", ["/l"]], + ["parameter", [ + "/l" + ]], ["variable", "%%a"], ["keyword", "in"], ["punctuation", "("], - ["number", "5"], ["punctuation", ","], - ["number", "-1"], ["punctuation", ","], - ["number", "1"], ["punctuation", ")"], + ["number", "5"], + ["punctuation", ","], + ["number", "-1"], + ["punctuation", ","], + ["number", "1"], + ["punctuation", ")"], ["keyword", "do"] ]], ["punctuation", "("], @@ -30,6 +44,27 @@ IF "%~1" NEQ "" (SET %~1=%new%) ELSE (echo.%new%) ]], ["punctuation", ")"], + ["command", [ + ["keyword", "FOR"], + ["parameter", [ + "/F" + ]], + ["variable", "%%A"], + " IN ('TYPE ", + ["string", "\"%InFile%\""], + ["operator", "^"], + "|find ", + ["parameter", [ + "/v" + ]], + ["parameter", [ + "/c" + ]], + ["string", "\"\""], + "'" + ]], + ["punctuation", ")"], + ["command", [ ["keyword", "SET"], ["variable", "title"], @@ -61,12 +96,16 @@ IF "%~1" NEQ "" (SET %~1=%new%) ELSE (echo.%new%) ["command", [ ["keyword", "EXIT"], - ["parameter", ["/b"]] + ["parameter", [ + "/b" + ]] ]], ["command", [ ["keyword", "set"], - ["parameter", ["/a"]], + ["parameter", [ + "/a" + ]], ["variable", "ProgressCnt"], ["operator", "+="], ["number", "1"] @@ -100,4 +139,4 @@ IF "%~1" NEQ "" (SET %~1=%new%) ELSE (echo.%new%) ---------------------------------------------------- -Checks for commands. \ No newline at end of file +Checks for commands. diff --git a/tests/languages/batch/label_feature.test b/tests/languages/batch/label_feature.test index a672ba0cc3..547bda0200 100644 --- a/tests/languages/batch/label_feature.test +++ b/tests/languages/batch/label_feature.test @@ -1,13 +1,18 @@ :foo :Foo_Bar +GOTO:eof ---------------------------------------------------- [ ["label", ":foo"], - ["label", ":Foo_Bar"] + ["label", ":Foo_Bar"], + ["command", [ + ["keyword", "GOTO"], + ["label", ":eof"] + ]] ] ---------------------------------------------------- -Checks for labels. \ No newline at end of file +Checks for labels. diff --git a/tests/languages/bison/number_feature.test b/tests/languages/bison/number_feature.test index ddbacff94b..3b8e397c61 100644 --- a/tests/languages/bison/number_feature.test +++ b/tests/languages/bison/number_feature.test @@ -1,3 +1,9 @@ +%% +42 +0 +0xBadFace +%% + 42 0 0xBadFace @@ -5,6 +11,14 @@ ---------------------------------------------------- [ + ["bison", [ + ["punctuation", "%%"], + ["number", "42"], + ["number", "0"], + ["number", "0xBadFace"], + ["punctuation", "%%"] + ]], + ["number", "42"], ["number", "0"], ["number", "0xBadFace"] @@ -12,4 +26,4 @@ ---------------------------------------------------- -Checks for numbers. \ No newline at end of file +Checks for numbers. diff --git a/tests/languages/cfscript/type_feature.test b/tests/languages/cfscript/type_feature.test index b87a21a8a6..120ab7b911 100644 --- a/tests/languages/cfscript/type_feature.test +++ b/tests/languages/cfscript/type_feature.test @@ -10,7 +10,7 @@ string struct uuid void -xml +xml= ---------------------------------------------------- @@ -27,7 +27,7 @@ xml ["type", "struct"], ["type", "uuid"], ["type", "void"], - ["keyword", "xml"] + ["type", "xml"], ["operator", "="] ] ---------------------------------------------------- diff --git a/tests/languages/cil/directive_feature.test b/tests/languages/cil/directive_feature.test new file mode 100644 index 0000000000..452b558c95 --- /dev/null +++ b/tests/languages/cil/directive_feature.test @@ -0,0 +1,15 @@ +.class public Foo { +.method +.maxstack 2 + +---------------------------------------------------- + +[ + ["directive", ".class"], + ["keyword", "public"], + " Foo ", + ["punctuation", "{"], + ["directive", ".method"], + ["directive", ".maxstack"], + ["number", "2"] +] diff --git a/tests/languages/cil/number_feature.test b/tests/languages/cil/number_feature.test new file mode 100644 index 0000000000..fe3fe8900a --- /dev/null +++ b/tests/languages/cil/number_feature.test @@ -0,0 +1,13 @@ +0x0 +0xFF.5F +-0x1 +-0xFF.5F + +---------------------------------------------------- + +[ + ["number", "0x0"], + ["number", "0xFF.5F"], + "\r\n-", ["number", "0x1"], + "\r\n-", ["number", "0xFF.5F"] +] diff --git a/tests/languages/cil/punctuation_feature.test b/tests/languages/cil/punctuation_feature.test new file mode 100644 index 0000000000..57d6604dc0 --- /dev/null +++ b/tests/languages/cil/punctuation_feature.test @@ -0,0 +1,21 @@ +( ) [ ] { } +; , : = + +IL_001f + +---------------------------------------------------- + +[ + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", "["], + ["punctuation", "]"], + ["punctuation", "{"], + ["punctuation", "}"], + ["punctuation", ";"], + ["punctuation", ","], + ["punctuation", ":"], + ["punctuation", "="], + + ["punctuation", "IL_001f"] +] diff --git a/tests/languages/concurnas/keyword_feature.test b/tests/languages/concurnas/keyword_feature.test index cdf3fdb9d3..45e38f7aaf 100644 --- a/tests/languages/concurnas/keyword_feature.test +++ b/tests/languages/concurnas/keyword_feature.test @@ -1,20 +1,20 @@ -as +abstract +actor +also +annotation assert async await -band bool boolean -bor break -bxor byte case catch changed char +class closed -comp constant continue def @@ -23,6 +23,7 @@ del double elif else +enum every extends false @@ -39,14 +40,11 @@ in init inject int -is -isnot lambda local long loop match -mod new nodefault null @@ -63,6 +61,7 @@ pre private protected provide +provider public return shared @@ -74,6 +73,7 @@ super sync this throw +trait trans transient true @@ -90,23 +90,23 @@ with ---------------------------------------------------- [ - ["operator", "as"], + ["keyword", "abstract"], + ["keyword", "actor"], + ["keyword", "also"], + ["keyword", "annotation"], ["keyword", "assert"], ["keyword", "async"], ["keyword", "await"], - ["operator", "band"], ["keyword", "bool"], ["keyword", "boolean"], - ["operator", "bor"], ["keyword", "break"], - ["operator", "bxor"], ["keyword", "byte"], ["keyword", "case"], ["keyword", "catch"], ["keyword", "changed"], ["keyword", "char"], + ["keyword", "class"], ["keyword", "closed"], - ["operator", "comp"], ["keyword", "constant"], ["keyword", "continue"], ["keyword", "def"], @@ -115,6 +115,7 @@ with ["keyword", "double"], ["keyword", "elif"], ["keyword", "else"], + ["keyword", "enum"], ["keyword", "every"], ["keyword", "extends"], ["keyword", "false"], @@ -131,14 +132,11 @@ with ["keyword", "init"], ["keyword", "inject"], ["keyword", "int"], - ["operator", "is"], - ["operator", "isnot"], ["keyword", "lambda"], ["keyword", "local"], ["keyword", "long"], ["keyword", "loop"], ["keyword", "match"], - ["operator", "mod"], ["keyword", "new"], ["keyword", "nodefault"], ["keyword", "null"], @@ -155,6 +153,7 @@ with ["keyword", "private"], ["keyword", "protected"], ["keyword", "provide"], + ["keyword", "provider"], ["keyword", "public"], ["keyword", "return"], ["keyword", "shared"], @@ -166,6 +165,7 @@ with ["keyword", "sync"], ["keyword", "this"], ["keyword", "throw"], + ["keyword", "trait"], ["keyword", "trans"], ["keyword", "transient"], ["keyword", "true"], @@ -182,4 +182,4 @@ with ---------------------------------------------------- -Checks for keywords. \ No newline at end of file +Checks for keywords. diff --git a/tests/languages/concurnas/operator_feature.test b/tests/languages/concurnas/operator_feature.test index 41e009a889..4854a85681 100644 --- a/tests/languages/concurnas/operator_feature.test +++ b/tests/languages/concurnas/operator_feature.test @@ -4,30 +4,50 @@ &== &<> isnot is as +comp / /= * *= mod mod= < <== > >== and or -bor bxor +band bor bxor ^ ---------------------------------------------------- [ - ["operator", "+"], ["operator", "++"], ["operator", "+="], - ["operator", "-"], ["operator", "--"], ["operator", "-="], - ["operator", "="], ["operator", "=="], ["operator", "<>"], - ["operator", "&=="], ["operator", "&<>"], + ["operator", "+"], + ["operator", "++"], + ["operator", "+="], + ["operator", "-"], + ["operator", "--"], + ["operator", "-="], + ["operator", "="], + ["operator", "=="], + ["operator", "<>"], + ["operator", "&=="], + ["operator", "&<>"], ["operator", "isnot"], - ["operator", "is"], ["operator", "as"], - ["operator", "/"], ["operator", "/="], ["operator", "*"], ["operator", "*="], - ["operator", "mod"], ["operator", "mod="], - ["operator", "<"], ["operator", "<=="], ["operator", ">"], ["operator", ">=="], - ["operator", "and"], ["operator", "or"], - ["operator", "bor"], ["operator", "bxor"], + ["operator", "is"], + ["operator", "as"], + ["operator", "comp"], + ["operator", "/"], + ["operator", "/="], + ["operator", "*"], + ["operator", "*="], + ["operator", "mod"], + ["operator", "mod="], + ["operator", "<"], + ["operator", "<=="], + ["operator", ">"], + ["operator", ">=="], + ["operator", "and"], + ["operator", "or"], + ["operator", "band"], + ["operator", "bor"], + ["operator", "bxor"], ["operator", "^"] ] ---------------------------------------------------- -Checks for operators. \ No newline at end of file +Checks for operators. diff --git a/tests/languages/concurnas/string_feature.test b/tests/languages/concurnas/string_feature.test index 609a5b38fb..a9930c8413 100644 --- a/tests/languages/concurnas/string_feature.test +++ b/tests/languages/concurnas/string_feature.test @@ -1,4 +1,5 @@ "hi" +"addition result: {1+2}" 'hi' r'say' r"hello" @@ -9,15 +10,36 @@ myAPL || x[⍋x←6?40] || ---------------------------------------------------- [ - ["string", [["string", "\"hi\""]]], - ["string", [["string", "'hi'"]]], - ["string", [["string", "r'say'"]]], - ["string", [["string", "r\"hello\""]]], - ["string", [["string", "'contains: \"'"]]], + ["string", [ + ["string", "\"hi\""] + ]], + ["string", [ + ["string", "\"addition result: "], + ["interpolation", [ + ["punctuation", "{"], + ["number", "1"], + ["operator", "+"], + ["number", "2"], + ["punctuation", "}"] + ]], + ["string", "\""] + ]], + ["string", [ + ["string", "'hi'"] + ]], + ["string", [ + ["string", "r'say'"] + ]], + ["string", [ + ["string", "r\"hello\""] + ]], + ["string", [ + ["string", "'contains: \"'"] + ]], ["langext", "myAPL || x[⍋x←6?40] ||"], "\r\n || invalid ||" ] ---------------------------------------------------- -Checks for raw strings. \ No newline at end of file +Checks for raw strings. diff --git a/tests/languages/coq/attribute_feature.test b/tests/languages/coq/attribute_feature.test index a4636681ea..7d727fc1a0 100644 --- a/tests/languages/coq/attribute_feature.test +++ b/tests/languages/coq/attribute_feature.test @@ -6,6 +6,16 @@ #[canonical=yes, canonical=no] #[ export ] +(* legacy *) +Cumulative +Global +Local +Monomorphic +NonCumulative +Polymorphic +Private +Program + ---------------------------------------------------- [ @@ -69,5 +79,15 @@ ["punctuation", "#["], " export ", ["punctuation", "]"] - ]] -] \ No newline at end of file + ]], + + ["comment", "(* legacy *)"], + ["attribute", "Cumulative"], + ["attribute", "Global"], + ["attribute", "Local"], + ["attribute", "Monomorphic"], + ["attribute", "NonCumulative"], + ["attribute", "Polymorphic"], + ["attribute", "Private"], + ["attribute", "Program"] +] diff --git a/tests/languages/csharp/class-name-declaration_feature.test b/tests/languages/csharp/class-name-declaration_feature.test index a1c96fab7b..0d347ed4f5 100644 --- a/tests/languages/csharp/class-name-declaration_feature.test +++ b/tests/languages/csharp/class-name-declaration_feature.test @@ -17,6 +17,8 @@ public static RGBColor FromRainbow(Rainbow colorBand) => _ => throw new ArgumentException(message: "invalid enum value", paramName: nameof(colorBand)), }; +try {} catch (ArgumentException e) {} + ---------------------------------------------------- [ @@ -126,7 +128,18 @@ public static RGBColor FromRainbow(Rainbow colorBand) => ["punctuation", ","], ["punctuation", "}"], - ["punctuation", ";"] + ["punctuation", ";"], + + ["keyword", "try"], + ["punctuation", "{"], + ["punctuation", "}"], + ["keyword", "catch"], + ["punctuation", "("], + ["class-name", ["ArgumentException"]], + " e", + ["punctuation", ")"], + ["punctuation", "{"], + ["punctuation", "}"] ] ---------------------------------------------------- diff --git a/tests/languages/csharp/interpolation-string_feature.test b/tests/languages/csharp/interpolation-string_feature.test index 323962e0f8..fba1721ffe 100644 --- a/tests/languages/csharp/interpolation-string_feature.test +++ b/tests/languages/csharp/interpolation-string_feature.test @@ -1,4 +1,5 @@ $"Hello, {{ {name} }}! Today is {date.DayOfWeek}, it's {date:HH:mm} now." +@$"Hello, {{ {name} }}! Today is {date.DayOfWeek}, it's {date:HH:mm} now." $"{a,5} and {b + "" /* foo ":} */:format} {h(a, b)}" $"{1}{2}{3}" @@ -43,6 +44,35 @@ $@"{ ]], ["string", " now.\""] ]], + ["interpolation-string", [ + ["string", "@$\"Hello, {{ "], + ["interpolation", [ + ["punctuation", "{"], + ["expression", ["name"]], + ["punctuation", "}"] + ]], + ["string", " }}! Today is "], + ["interpolation", [ + ["punctuation", "{"], + ["expression", [ + "date", + ["punctuation", "."], + "DayOfWeek" + ]], + ["punctuation", "}"] + ]], + ["string", ", it's "], + ["interpolation", [ + ["punctuation", "{"], + ["expression", ["date"]], + ["format-string", [ + ["punctuation", ":"], + "HH:mm" + ]], + ["punctuation", "}"] + ]], + ["string", " now.\""] + ]], ["interpolation-string", [ ["string", "$\""], ["interpolation", [ diff --git a/tests/languages/css!+css-extras/color_feature.test b/tests/languages/css!+css-extras/color_feature.test new file mode 100644 index 0000000000..261b6690e0 --- /dev/null +++ b/tests/languages/css!+css-extras/color_feature.test @@ -0,0 +1,341 @@ +AliceBlue +AntiqueWhite +Aqua +Aquamarine +Azure +Beige +Bisque +Black +BlanchedAlmond +Blue +BlueViolet +Brown +BurlyWood +CadetBlue +Chartreuse +Chocolate +Coral +CornflowerBlue +Cornsilk +Crimson +Cyan +DarkBlue +DarkCyan +DarkGoldenRod +DarkGrey +DarkGreen +DarkKhaki +DarkMagenta +DarkOliveGreen +DarkOrange +DarkOrchid +DarkRed +DarkSalmon +DarkSeaGreen +DarkSlateBlue +DarkSlateGrey +DarkTurquoise +DarkViolet +DeepPink +DeepSkyBlue +DimGrey +DodgerBlue +FireBrick +FloralWhite +ForestGreen +Fuchsia +Gainsboro +GhostWhite +Gold +GoldenRod +Grey +Green +GreenYellow +HoneyDew +HotPink +IndianRed +Indigo +Ivory +Khaki +Lavender +LavenderBlush +LawnGreen +LemonChiffon +LightBlue +LightCoral +LightCyan +LightGoldenRodYellow +LightGrey +LightGreen +LightPink +LightSalmon +LightSeaGreen +LightSkyBlue +LightSlateGrey +LightSteelBlue +LightYellow +Lime +LimeGreen +Linen +Magenta +Maroon +MediumAquaMarine +MediumBlue +MediumOrchid +MediumPurple +MediumSeaGreen +MediumSlateBlue +MediumSpringGreen +MediumTurquoise +MediumVioletRed +MidnightBlue +MintCream +MistyRose +Moccasin +NavajoWhite +Navy +OldLace +Olive +OliveDrab +Orange +OrangeRed +Orchid +PaleGoldenRod +PaleGreen +PaleTurquoise +PaleVioletRed +PapayaWhip +PeachPuff +Peru +Pink +Plum +PowderBlue +Purple +Red +RosyBrown +RoyalBlue +SaddleBrown +Salmon +SandyBrown +SeaGreen +SeaShell +Sienna +Silver +SkyBlue +SlateBlue +SlateGrey +Snow +SpringGreen +SteelBlue +Tan +Teal +Thistle +Tomato +Transparent +Turquoise +Violet +Wheat +White +WhiteSmoke +Yellow +YellowGreen + +rgb(0,0,0) +rgba(0 , 255 , 0, 0.123) +hsl(170, 50%, 45%) +hsla(120,100%,50%,0.3) + +---------------------------------------------------- + +[ + ["color", "AliceBlue"], + ["color", "AntiqueWhite"], + ["color", "Aqua"], + ["color", "Aquamarine"], + ["color", "Azure"], + ["color", "Beige"], + ["color", "Bisque"], + ["color", "Black"], + ["color", "BlanchedAlmond"], + ["color", "Blue"], + ["color", "BlueViolet"], + ["color", "Brown"], + ["color", "BurlyWood"], + ["color", "CadetBlue"], + ["color", "Chartreuse"], + ["color", "Chocolate"], + ["color", "Coral"], + ["color", "CornflowerBlue"], + ["color", "Cornsilk"], + ["color", "Crimson"], + ["color", "Cyan"], + ["color", "DarkBlue"], + ["color", "DarkCyan"], + ["color", "DarkGoldenRod"], + ["color", "DarkGrey"], + ["color", "DarkGreen"], + ["color", "DarkKhaki"], + ["color", "DarkMagenta"], + ["color", "DarkOliveGreen"], + ["color", "DarkOrange"], + ["color", "DarkOrchid"], + ["color", "DarkRed"], + ["color", "DarkSalmon"], + ["color", "DarkSeaGreen"], + ["color", "DarkSlateBlue"], + ["color", "DarkSlateGrey"], + ["color", "DarkTurquoise"], + ["color", "DarkViolet"], + ["color", "DeepPink"], + ["color", "DeepSkyBlue"], + ["color", "DimGrey"], + ["color", "DodgerBlue"], + ["color", "FireBrick"], + ["color", "FloralWhite"], + ["color", "ForestGreen"], + ["color", "Fuchsia"], + ["color", "Gainsboro"], + ["color", "GhostWhite"], + ["color", "Gold"], + ["color", "GoldenRod"], + ["color", "Grey"], + ["color", "Green"], + ["color", "GreenYellow"], + ["color", "HoneyDew"], + ["color", "HotPink"], + ["color", "IndianRed"], + ["color", "Indigo"], + ["color", "Ivory"], + ["color", "Khaki"], + ["color", "Lavender"], + ["color", "LavenderBlush"], + ["color", "LawnGreen"], + ["color", "LemonChiffon"], + ["color", "LightBlue"], + ["color", "LightCoral"], + ["color", "LightCyan"], + ["color", "LightGoldenRodYellow"], + ["color", "LightGrey"], + ["color", "LightGreen"], + ["color", "LightPink"], + ["color", "LightSalmon"], + ["color", "LightSeaGreen"], + ["color", "LightSkyBlue"], + ["color", "LightSlateGrey"], + ["color", "LightSteelBlue"], + ["color", "LightYellow"], + ["color", "Lime"], + ["color", "LimeGreen"], + ["color", "Linen"], + ["color", "Magenta"], + ["color", "Maroon"], + ["color", "MediumAquaMarine"], + ["color", "MediumBlue"], + ["color", "MediumOrchid"], + ["color", "MediumPurple"], + ["color", "MediumSeaGreen"], + ["color", "MediumSlateBlue"], + ["color", "MediumSpringGreen"], + ["color", "MediumTurquoise"], + ["color", "MediumVioletRed"], + ["color", "MidnightBlue"], + ["color", "MintCream"], + ["color", "MistyRose"], + ["color", "Moccasin"], + ["color", "NavajoWhite"], + ["color", "Navy"], + ["color", "OldLace"], + ["color", "Olive"], + ["color", "OliveDrab"], + ["color", "Orange"], + ["color", "OrangeRed"], + ["color", "Orchid"], + ["color", "PaleGoldenRod"], + ["color", "PaleGreen"], + ["color", "PaleTurquoise"], + ["color", "PaleVioletRed"], + ["color", "PapayaWhip"], + ["color", "PeachPuff"], + ["color", "Peru"], + ["color", "Pink"], + ["color", "Plum"], + ["color", "PowderBlue"], + ["color", "Purple"], + ["color", "Red"], + ["color", "RosyBrown"], + ["color", "RoyalBlue"], + ["color", "SaddleBrown"], + ["color", "Salmon"], + ["color", "SandyBrown"], + ["color", "SeaGreen"], + ["color", "SeaShell"], + ["color", "Sienna"], + ["color", "Silver"], + ["color", "SkyBlue"], + ["color", "SlateBlue"], + ["color", "SlateGrey"], + ["color", "Snow"], + ["color", "SpringGreen"], + ["color", "SteelBlue"], + ["color", "Tan"], + ["color", "Teal"], + ["color", "Thistle"], + ["color", "Tomato"], + ["color", "Transparent"], + ["color", "Turquoise"], + ["color", "Violet"], + ["color", "Wheat"], + ["color", "White"], + ["color", "WhiteSmoke"], + ["color", "Yellow"], + ["color", "YellowGreen"], + + ["color", [ + ["function", "rgb"], + ["punctuation", "("], + ["number", "0"], + ["punctuation", ","], + ["number", "0"], + ["punctuation", ","], + ["number", "0"], + ["punctuation", ")"] + ]], + ["color", [ + ["function", "rgba"], + ["punctuation", "("], + ["number", "0"], + ["punctuation", ","], + ["number", "255"], + ["punctuation", ","], + ["number", "0"], + ["punctuation", ","], + ["number", "0.123"], + ["punctuation", ")"] + ]], + ["color", [ + ["function", "hsl"], + ["punctuation", "("], + ["number", "170"], + ["punctuation", ","], + ["number", "50"], + ["unit", "%"], + ["punctuation", ","], + ["number", "45"], + ["unit", "%"], + ["punctuation", ")"] + ]], + ["color", [ + ["function", "hsla"], + ["punctuation", "("], + ["number", "120"], + ["punctuation", ","], + ["number", "100"], + ["unit", "%"], + ["punctuation", ","], + ["number", "50"], + ["unit", "%"], + ["punctuation", ","], + ["number", "0.3"], + ["punctuation", ")"] + ]] +] diff --git a/tests/languages/dart/class-name_feature.test b/tests/languages/dart/class-name_feature.test index f13f8cdb8b..f97d9ab6f6 100644 --- a/tests/languages/dart/class-name_feature.test +++ b/tests/languages/dart/class-name_feature.test @@ -9,6 +9,18 @@ class Foo with ns.Bar { } +class MyWidget extends SingleChildStatelessWidget { + MyWidget({Key key, Widget child}): super(key: key, child: child); + + @override + Widget buildWithChild(BuildContext context, Widget child) { + return SomethingWidget(child: child); + } +} + +var copy = Foo.Bar.from(foo); +ID foo = something(); + ---------------------------------------------------- [ @@ -30,13 +42,10 @@ class Foo with ns.Bar { ["keyword", "this"], ["punctuation", "."], "bar", - ["punctuation", ")"], - ["punctuation", ";"], + ["punctuation", ")"], + ["punctuation", ";"], - ["keyword", "final"], - ["class-name", ["Bar"]], - " bar", - ["punctuation", ";"], + ["keyword", "final"], ["class-name", ["Bar"]], " bar", ["punctuation", ";"], ["class-name", ["Baz"]], ["generics", [ @@ -62,28 +71,102 @@ class Foo with ns.Bar { " bat", ["punctuation", ")"], ["punctuation", "{"], + ["keyword", "return"], - ["class-name", [ - "Baz" + ["class-name", ["Baz"]], + ["generics", [ + ["punctuation", "<"], + ["class-name", [ + ["namespace", [ + "ns", + ["punctuation", "."] + ]], + "Bat" + ]], + ["punctuation", ">"] ]], - ["generics", [ - ["punctuation", "<"], - ["class-name", [ - ["namespace", [ - "ns", - ["punctuation", "."] - ]], - "Bat" - ]], - ["punctuation", ">"] - ]], ["punctuation", "("], "bat", ["punctuation", ")"], ["punctuation", ";"], + + ["punctuation", "}"], + + ["punctuation", "}"], + + ["keyword", "class"], + ["class-name", ["MyWidget"]], + ["keyword", "extends"], + ["class-name", ["SingleChildStatelessWidget"]], + ["punctuation", "{"], + + ["class-name", ["MyWidget"]], + ["punctuation", "("], + ["punctuation", "{"], + ["class-name", ["Key"]], + " key", + ["punctuation", ","], + ["class-name", ["Widget"]], + " child", + ["punctuation", "}"], + ["punctuation", ")"], + ["punctuation", ":"], + ["keyword", "super"], + ["punctuation", "("], + "key", + ["punctuation", ":"], + " key", + ["punctuation", ","], + " child", + ["punctuation", ":"], + " child", + ["punctuation", ")"], + ["punctuation", ";"], + + ["metadata", "@override"], + + ["class-name", ["Widget"]], + ["function", "buildWithChild"], + ["punctuation", "("], + ["class-name", ["BuildContext"]], + " context", + ["punctuation", ","], + ["class-name", ["Widget"]], + " child", + ["punctuation", ")"], + ["punctuation", "{"], + + ["keyword", "return"], + ["class-name", ["SomethingWidget"]], + ["punctuation", "("], + "child", + ["punctuation", ":"], + " child", + ["punctuation", ")"], + ["punctuation", ";"], + ["punctuation", "}"], - ["punctuation", "}"] + ["punctuation", "}"], + + ["keyword", "var"], + " copy ", + ["operator", "="], + ["class-name", ["Foo.Bar"]], + ["punctuation", "."], + ["function", "from"], + ["punctuation", "("], + "foo", + ["punctuation", ")"], + ["punctuation", ";"], + + ["class-name", ["ID"]], + " foo ", + ["operator", "="], + ["function", "something"], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", ";"] ] ---------------------------------------------------- diff --git a/tests/languages/dhall/builtin_feature.test b/tests/languages/dhall/builtin_feature.test new file mode 100644 index 0000000000..8ec35a04ec --- /dev/null +++ b/tests/languages/dhall/builtin_feature.test @@ -0,0 +1,9 @@ +Some +None + +---------------------------------------------------- + +[ + ["builtin", "Some"], + ["builtin", "None"] +] diff --git a/tests/languages/eiffel/punctuation_feature.test b/tests/languages/eiffel/punctuation_feature.test new file mode 100644 index 0000000000..efa8051984 --- /dev/null +++ b/tests/languages/eiffel/punctuation_feature.test @@ -0,0 +1,29 @@ +:= << >> (| |) -> + +.foo + +{ } [ ] ; ( ) , : ? + +---------------------------------------------------- + +[ + ["punctuation", ":="], + ["punctuation", "<<"], + ["punctuation", ">>"], + ["punctuation", "(|"], + ["punctuation", "|)"], + ["punctuation", "->"], + + ["punctuation", "."], "foo\r\n\r\n", + + ["punctuation", "{"], + ["punctuation", "}"], + ["punctuation", "["], + ["punctuation", "]"], + ["punctuation", ";"], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", ","], + ["punctuation", ":"], + ["punctuation", "?"] +] diff --git a/tests/languages/ejs+pug/ejs_inclusion.test b/tests/languages/ejs+pug/ejs_inclusion.test new file mode 100644 index 0000000000..bbd9452970 --- /dev/null +++ b/tests/languages/ejs+pug/ejs_inclusion.test @@ -0,0 +1,24 @@ +:ejs + <% var foo = '', bar = false; %> + +---------------------------------------------------- + +[ + ["filter-ejs", [ + ["filter-name", ":ejs"], + ["language-javascript", [ + ["operator", "<"], + ["operator", "%"], + ["keyword", "var"], + " foo ", + ["operator", "="], + ["string", "''"], + ["punctuation", ","], + " bar ", + ["operator", "="], + ["boolean", "false"], + ["punctuation", ";"] + ]], + ["delimiter", "%>"] + ]] +] diff --git a/tests/languages/erb+haml/erb_inclusion.test b/tests/languages/erb+haml/erb_inclusion.test new file mode 100644 index 0000000000..1a75c72b54 --- /dev/null +++ b/tests/languages/erb+haml/erb_inclusion.test @@ -0,0 +1,39 @@ +:erb + <%= render @products || "empty_list" %> + +~ + :erb + <%= render @products || "empty_list" %> + +---------------------------------------------------- + +[ + ["filter-erb", [ + ["filter-name", ":erb"], + ["operator", "<"], + ["operator", "%"], + ["operator", "="], + " render ", + ["variable", "@products"], + ["operator", "||"], + ["string", [ + "\"empty_list\"" + ]], + ["operator", "%"], + ["operator", ">"] + ]], + ["punctuation", "~"], + ["filter-erb", [ + ["filter-name", ":erb"], + ["operator", "<"], + ["operator", "%"], + ["operator", "="], + " render ", + ["variable", "@products"], + ["operator", "||"], + ["string", [ + "\"empty_list\"" + ]], + ["delimiter", "%>"] + ]] +] diff --git a/tests/languages/excel-formula/comment_feature.test b/tests/languages/excel-formula/comment_feature.test new file mode 100644 index 0000000000..4a6c0de506 --- /dev/null +++ b/tests/languages/excel-formula/comment_feature.test @@ -0,0 +1,10 @@ +N("comment") + +---------------------------------------------------- + +[ + ["function-name", "N"], + ["punctuation", "("], + ["comment", "\"comment\""], + ["punctuation", ")"] +] diff --git a/tests/languages/factor/comments_feature.test b/tests/languages/factor/comments_feature.test index 5dc45765ea..8dba7827b1 100644 --- a/tests/languages/factor/comments_feature.test +++ b/tests/languages/factor/comments_feature.test @@ -1,6 +1,7 @@ a! ! word !a ! word ! comment +! TODO: something ! bad ! fine ! "also a comment" @@ -28,47 +29,47 @@ ment*/ /* "comment" */ "/* "strings" */" - ---------------------------------------------------- [ - [ "conventionally-named-word", "a!"], - [ "comment", [ "! word" ] ], - [ "normal-word", "!a"], - [ "comment", [ "! word" ] ], - [ "comment", [ "! comment" ] ], + ["conventionally-named-word", "a!"], + ["comment", ["! word"]], + ["normal-word", "!a"], + ["comment", ["! word"]], + ["comment", ["! comment"]], + ["comment", [ + "! ", + ["function", "TODO"], + ": something" + ]], + ["normal-word", "!"], + ["normal-word", "bad"], + ["comment", ["! \tfine"]], + ["comment", ["! \"also a comment\""]], + ["comment", ["! : ( -- ) ;"]], + ["comment", ["! ! leading comment-like token"]], + ["comment", ["! whitespace before"]], + ["normal-word", "words"], + ["normal-word", "blah"], + ["comment", ["! comment after code on a line"]], - [ "normal-word", "!" ], [ "normal-word", "bad" ], - [ "comment", [ "! \tfine" ] ], + ["comment", ["![[ comment ]]"]], + ["string", ["\"![[ string ]]\""]], + ["comment", ["![[ \"comment\" ]]"]], - [ "comment", [ "! \"also a comment\"" ] ], - [ "comment", [ "! : ( -- ) ;" ] ], - [ "comment", [ "! ! leading comment-like token" ] ], - [ "comment", [ "! whitespace before" ] ], - [ "normal-word", "words" ], - [ "normal-word", "blah" ], - [ "comment", [ "! comment after code on a line" ] ], + ["comment", ["![[ comment]]"]], + ["comment", ["![==[ comment ]==]"]], + ["comment", ["![==[ comment]==]"]], + ["normal-word", "![=[word"], + ["normal-word", "]=]"], + ["normal-word", "![=======["], + ["normal-word", "words"], + ["normal-word", "]=======]"], - [ "comment", [ "![[ comment ]]" ] ], - [ "string", [ "\"![[ string ]]\"" ] ], - [ "comment", [ "![[ \"comment\" ]]" ] ], - [ "comment", [ "![[ comment]]" ] ], - [ "comment", [ "![==[ comment ]==]" ] ], - [ "comment", [ "![==[ comment]==]" ] ], + ["comment", ["/* com\r\nment */"]], + ["comment", ["/* com\r\nment*/"]], + ["normal-word", "/*word"], ["normal-word", "*/"], - [ "normal-word", "![=[word" ], - [ "normal-word", "]=]" ], - [ "normal-word", "![=======[" ], - [ "normal-word", "words" ], - [ "normal-word", "]=======]" ], - [ "comment", [ "/* com\r\nment */" ] ], - [ "comment", [ "/* com\r\nment*/" ] ], - [ "normal-word", "/*word" ], - [ "normal-word", "*/" ], - [ "comment", ["/* \"comment\" */"] ], - [ "string", ["\"/* \""] ], - "strings", - [ "string", ["\" */\""] ] + ["comment", ["/* \"comment\" */"]], + ["string", ["\"/* \""]], "strings", ["string", ["\" */\""]] ] - ----------------------------------------------------- diff --git a/tests/languages/factor/numbers_feature.test b/tests/languages/factor/numbers_feature.test index 3526183d87..304f3d821c 100644 --- a/tests/languages/factor/numbers_feature.test +++ b/tests/languages/factor/numbers_feature.test @@ -8,42 +8,54 @@ NAN: 80000deadbeef ---------------------------------------------------- +0x1.0p3 +0b1.010p2 +0x1.p1 + +---------------------------------------------------- [ - [ "number", "5" ], - [ "number", "1/5" ], - [ "number", "+9" ], - [ "number", "-9" ], - [ "number", "+1/5" ], - [ "number", "-1/5" ], - [ "number", "23+1/5" ], - [ "number", "-23-1/5" ], - [ "normal-word", "23-1/5" ], - [ "comment", [ "! last one = word" ] ], - [ "number", "0.01" ], - [ "number", "0e0" ], - [ "number", "3E4" ], - [ "number", "3e-4" ], - [ "number", "3E-4" ], - [ "number", "030" ], - [ "number", "0xd" ], - [ "number", "0o30" ], - [ "number", "0b1100" ], - [ "number", "-0" ], - [ "number", "-0.01" ], - [ "number", "-0e0" ], - [ "number", "-3E4" ], - [ "number", "-3E-4" ], - [ "number", "-030" ], - [ "number", "-0xd" ], - [ "number", "-0o30" ], - [ "number", "-0b1100" ], - [ "number", "348756424956392657834385437598743583648756332457" ], - [ "number", "-348756424956392657834385437598743583648756332457" ], - [ "number", "NAN: 80000deadbeef" ] + ["number", "5"], + ["number", "1/5"], + ["number", "+9"], + ["number", "-9"], + ["number", "+1/5"], + ["number", "-1/5"], + ["number", "23+1/5"], + ["number", "-23-1/5"], + ["normal-word", "23-1/5"], + ["comment", ["! last one = word"]], + + ["number", "0.01"], + ["number", "0e0"], + ["number", "3E4"], + ["number", "3e-4"], + ["number", "3E-4"], + ["number", "030"], + ["number", "0xd"], + ["number", "0o30"], + ["number", "0b1100"], + + ["number", "-0"], + ["number", "-0.01"], + ["number", "-0e0"], + ["number", "-3E4"], + ["number", "-3E-4"], + ["number", "-030"], + ["number", "-0xd"], + ["number", "-0o30"], + ["number", "-0b1100"], + + ["number", "348756424956392657834385437598743583648756332457"], + ["number", "-348756424956392657834385437598743583648756332457"], + + ["number", "NAN: 80000deadbeef"], + + ["number", "0x1.0p3"], + ["number", "0b1.010p2"], + ["number", "0x1.p1"] ] ---------------------------------------------------- +---------------------------------------------------- numbers diff --git a/tests/languages/factor/strings_feature.test b/tests/languages/factor/strings_feature.test index 94e77b0c3f..08d7a3fc3b 100644 --- a/tests/languages/factor/strings_feature.test +++ b/tests/languages/factor/strings_feature.test @@ -19,6 +19,8 @@ "+5" "-5" +"sssssh" "(" ")" surround . + HEREDOC: marker text \n marker @@ -40,88 +42,81 @@ P" " P"" P" as\\"" ----------------------------------------------------------- +---------------------------------------------------- [ - [ "string", ["\"s\""] ], - [ "normal-word", "word\"word\"" ], - [ "comment", ["! word: word\"word\""] ], - [ "string", ["\"adjacent\""] ], - [ "string", ["\"strings\""] ], - [ "string", ["\" ! str not comment\""] ], - [ "comment", ["! comment"] ], - - [ "string", ["\"!\""] ], - [ "string", ["\" ! \""] ], - [ "string", ["\"! \""] ], - - [ "string", [ + ["string", ["\"s\""]], + ["normal-word", "word\"word\""], + ["comment", ["! word: word\"word\""]], + ["string", ["\"adjacent\""]], + ["string", ["\"strings\""]], + ["string", ["\" ! str not comment\""]], + ["comment", ["! comment"]], + ["string", ["\"!\""]], + ["string", ["\" ! \""]], + ["string", ["\"! \""]], + + ["string", [ "\"", - [ "number", "\\\"" ], + ["number", "\\\""], "\"" - ] ], - [ "string", ["\"'\""] ], - [ "string", [ + ]], + ["string", ["\"'\""]], + ["string", [ "\"", ["number", "\\n"], "\"" - ] ], - [ "string", ["\"", ["number", "\\\\"], "\""] ], - - [ "string", ["\"str\""] ], - "5\r\n", + ]], + ["string", [ + "\"", + ["number", "\\\\"], + "\"" + ]], + + ["string", ["\"str\""]], "5\r\n", + ["string", ["\"str\""]], "[ ", ["quotation-delimiter", "]"], + ["string", ["\"str\""]], "{ ", ["curly-brace-literal-delimiter", "}"], + ["curly-brace-literal-delimiter", "{"], ["string", ["\"a\""]], "}\r\n", + ["string", ["\"5\""]], + ["string", ["\"1/5\""]], + ["string", ["\"+5\""]], + ["string", ["\"-5\""]], + + ["string", ["\"sssssh\""]], + ["string", ["\"(\""]], + ["string", ["\")\""]], + ["sequences-builtin", "surround"], + ["normal-word", "."], + + ["multiline-string", [ + "HEREDOC: marker\r\ntext ", ["number", "\\n"], + "\r\nmarker" + ]], - ["string", ["\"str\""] ], - "[ ", - [ "quotation-delimiter", "]" ], + ["multiline-string", [ + "STRING: name\r\ntext ", ["number", "\\n"], + ["semicolon-or-setlocal", ";"] + ]], - [ "string", ["\"str\""] ], - "{ ", - [ "curly-brace-literal-delimiter", "}" ], + ["multiline-string", ["[[ string ]]"]], + ["multiline-string", ["[[ string]]"]], + ["multiline-string", ["[==[ string ]==]"]], + ["multiline-string", ["[==[ string]==]"]], - [ "curly-brace-literal-delimiter", "{" ], - [ "string", ["\"a\""] ], - "}\r\n", + ["normal-word", "[[word"], ["normal-word", "]]"], - [ "string", ["\"5\""] ], - [ "string", ["\"1/5\""] ], - [ "string", ["\"+5\""] ], - [ "string", ["\"-5\""] ], + ["custom-string", ["URL\" \""]], ["normal-word", "URL\"\""], + ["custom-string", ["SBUF\" \""]], ["normal-word", "SBUF\"\""], + ["custom-string", ["P\" \""]], ["normal-word", "P\"\""], - [ "multiline-string", [ - "HEREDOC: marker\r\ntext ", - [ "number", "\\n" ], - "\r\nmarker" - ] ], - - [ "multiline-string", [ - "STRING: name\r\ntext ", - [ "number", "\\n" ], - [ "semicolon-or-setlocal", ";" ] - ] ], - - [ "multiline-string", [ "[[ string ]]" ] ], - [ "multiline-string", [ "[[ string]]" ] ], - [ "multiline-string", [ "[==[ string ]==]" ] ], - [ "multiline-string", [ "[==[ string]==]" ] ], - [ "normal-word", "[[word" ], - [ "normal-word", "]]" ], - [ "custom-string", ["URL\" \""] ], - [ "normal-word", "URL\"\"" ], - - [ "custom-string", ["SBUF\" \""] ], - [ "normal-word", "SBUF\"\"" ], - - [ "custom-string", ["P\" \""] ], - [ "normal-word", "P\"\"" ], - [ "custom-string", [ + ["custom-string", [ "P\" as", - [ "number", "\\\\" ], + ["number", "\\\\"], "\"" - ] ], + ]], "\"" ] ----------------------------------------------------------- +---------------------------------------------------- string kinds diff --git a/tests/languages/false/non-standard_feature.test b/tests/languages/false/non-standard_feature.test new file mode 100644 index 0000000000..6558de0240 --- /dev/null +++ b/tests/languages/false/non-standard_feature.test @@ -0,0 +1,13 @@ +( ) < B D O ® + +---------------------------------------------------- + +[ + ["non-standard", "("], + ["non-standard", ")"], + ["non-standard", "<"], + ["non-standard", "B"], + ["non-standard", "D"], + ["non-standard", "O"], + ["non-standard", "®"] +] diff --git a/tests/languages/firestore-security-rules/path_feature.test b/tests/languages/firestore-security-rules/path_feature.test index 1ff01e6dc6..be4ec96aaf 100644 --- a/tests/languages/firestore-security-rules/path_feature.test +++ b/tests/languages/firestore-security-rules/path_feature.test @@ -5,6 +5,7 @@ /foo/{x}/{y}/{z}/bar /foo/$(x)/$(y)/bar/$(request.auth.uid) +/cities/{document=**} ---------------------------------------------------- @@ -15,6 +16,7 @@ ["punctuation", "/"], "foo" ]], + ["path", [ ["punctuation", "/"], "foo", @@ -61,6 +63,7 @@ ["punctuation", "/"], "bar" ]], + ["path", [ ["punctuation", "/"], "foo", @@ -91,6 +94,18 @@ "uid", ["punctuation", ")"] ]] + ]], + ["path", [ + ["punctuation", "/"], + "cities", + ["punctuation", "/"], + ["variable", [ + ["punctuation", "{"], + "document", + ["operator", "="], + ["keyword", "**"], + ["punctuation", "}"] + ]] ]] ] diff --git a/tests/languages/fortran/punctuation_feature.test b/tests/languages/fortran/punctuation_feature.test new file mode 100644 index 0000000000..62b123306d --- /dev/null +++ b/tests/languages/fortran/punctuation_feature.test @@ -0,0 +1,15 @@ +(/ /) +( ) , ; : & + +---------------------------------------------------- + +[ + ["punctuation", "(/"], + ["punctuation", "/)"], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", ","], + ["punctuation", ";"], + ["punctuation", ":"], + ["punctuation", "&"] +] diff --git a/tests/languages/ftl/directive_feature.test b/tests/languages/ftl/directive_feature.test index 783c3027b2..42a0c5f0d0 100644 --- a/tests/languages/ftl/directive_feature.test +++ b/tests/languages/ftl/directive_feature.test @@ -1,3 +1,5 @@ +<#import "/libs/commons.ftl" as com> + <#if a < b> a is less than b <#elseif (a > b)> @@ -12,6 +14,19 @@ ---------------------------------------------------- [ + ["ftl", [ + ["ftl-directive", [ + ["punctuation", "<"], + ["directive", "#import"], + ["content", [ + ["string", ["\"/libs/commons.ftl\""]], + ["keyword", "as"], + " com" + ]], + ["punctuation", ">"] + ]] + ]], + ["ftl", [ ["ftl-directive", [ ["punctuation", "<"], @@ -70,6 +85,7 @@ ["punctuation", ">"] ]] ]], + ["ftl", [ ["ftl-directive", [ ["punctuation", "<"], diff --git a/tests/languages/gdscript/number_feature.test b/tests/languages/gdscript/number_feature.test index 00ad250b01..32f37f2275 100644 --- a/tests/languages/gdscript/number_feature.test +++ b/tests/languages/gdscript/number_feature.test @@ -11,12 +11,13 @@ 0xBAD_FACE 0b_0010_0010_0100_0100 +INF NAN PI TAU + ---------------------------------------------------- [ ["number", "123"], - ["operator", "-"], - ["number", "123"], + ["operator", "-"], ["number", "123"], ["number", "123.456"], ["number", ".5"], ["number", "1.2e-34"], @@ -26,7 +27,9 @@ ["number", "1_000_000_000_000"], ["number", "0xBAD_FACE"], - ["number", "0b_0010_0010_0100_0100"] + ["number", "0b_0010_0010_0100_0100"], + + ["number", "INF"], ["number", "NAN"], ["number", "PI"], ["number", "TAU"] ] ---------------------------------------------------- diff --git a/tests/languages/haml/filter_feature.test b/tests/languages/haml/filter_feature.test new file mode 100644 index 0000000000..834d2ede5f --- /dev/null +++ b/tests/languages/haml/filter_feature.test @@ -0,0 +1,20 @@ +:some-language + some code + +~ + :some-language + some code + +---------------------------------------------------- + +[ + ["filter", [ + ["filter-name", ":some-language"], + "\r\n\tsome code\r\n\r" + ]], + ["punctuation", "~"], + ["filter", [ + ["filter-name", ":some-language"], + "\r\n\t\tsome code" + ]] +] diff --git a/tests/languages/hcl/interpolation_feature.test b/tests/languages/hcl/interpolation_feature.test index fc2b9b79f6..0a8f50eb37 100644 --- a/tests/languages/hcl/interpolation_feature.test +++ b/tests/languages/hcl/interpolation_feature.test @@ -8,199 +8,246 @@ "${replace(var.sub_domain, ".", "\\\\\\\\.")}" "${filepath.foo}" +// keywords +"${terraform}" +"${var}" +"${self}" +"${count}" +"${module}" +"${path}" +"${data}" +"${local}" + ---------------------------------------------------- [ - ["string", - [ - "\"", - [ - "interpolation", - [ - ["punctuation", "$"], - ["punctuation", "{"], - ["keyword", "data"], - ["punctuation", "."], - ["type", "aws_availability_zones"], - ["punctuation", "."], - "available", - ["punctuation", "."], - "names", - ["punctuation", "["], - ["number", "0"], - ["punctuation", "]"], - ["punctuation", "}"] - ] - ], - "\"" - ] - ], - ["string", - [ - "\"", - [ - "interpolation", - [ - ["punctuation", "$"], - ["punctuation", "{"], - "aws_db_subnet_group", - ["punctuation", "."], - "default", - ["punctuation", "."], - "id", - ["punctuation", "}"] - ] - ], - "\"" - ] - ], - ["string", - [ - "\"", - [ - "interpolation", - [ - ["punctuation", "$"], - ["punctuation", "{"], - ["keyword", "var"], - ["punctuation", "."], - ["type", "something"], - ["punctuation", "?"], - ["number", "1"], - ["punctuation", ":"], - ["number", "0"], - ["punctuation", "}"] - ] - ], - "\"" - ] - ], - ["string", - [ - "\"", - [ - "interpolation", - [ - ["punctuation", "$"], - ["punctuation", "{"], - ["keyword", "var"], - ["punctuation", "."], - ["type", "num"], - ["punctuation", "?"], - ["number", "1.02"], - ["punctuation", ":"], - ["number", "0"], - ["punctuation", "}"] - ] - ], - "\"" - ] - ], - ["string", - [ - "\"", - [ - "interpolation", - [ - ["punctuation", "$"], - ["punctuation", "{"], - ["function", "length"], - ["punctuation", "("], - ["keyword", "var"], - ["punctuation", "."], - ["type", "hostnames"], - ["punctuation", ")"], - ["punctuation", "}"] - ] - ], - "\"" - ] - ], - ["string", - [ - "\"", - [ - "interpolation", - [ - ["punctuation", "$"], - ["punctuation", "{"], - ["function", "format"], - ["punctuation", "("], - ["string", "\"web-%03d\""], - ["punctuation", ","], - ["keyword", "count"], - ["punctuation", "."], - ["type", "index"], - ["punctuation", "+"], - ["number", "1"], - ["punctuation", ")"], - ["punctuation", "}"] - ] - ], - "\"" - ] - ], - ["string", - [ - "\"", - [ - "interpolation", - [ - ["punctuation", "$"], - ["punctuation", "{"], - ["function", "file"], - ["punctuation", "("], - ["string", "\"templates/web_init.tpl\""], - ["punctuation", ")"], - ["punctuation", "}"] - ] - ], - "\"" - ] - ], - ["string", - [ - "\"", - [ - "interpolation", - [ - ["punctuation", "$"], - ["punctuation", "{"], - ["function", "replace"], - ["punctuation", "("], - ["keyword", "var"], - ["punctuation", "."], - ["type", "sub_domain"], - ["punctuation", ","], - ["string", "\".\""], - ["punctuation", ","], - ["string", "\"\\\\\\\\\\\\\\\\.\""], - ["punctuation", ")"], - ["punctuation", "}"] - ] - ], - "\"" - ] - ], - ["string", - [ - "\"", - [ - "interpolation", - [ - ["punctuation", "$"], - ["punctuation", "{"], - "filepath", - ["punctuation", "."], - "foo", - ["punctuation", "}"] - ] - ], - "\"" - ] - ] + ["string", [ + "\"", + ["interpolation", [ + ["punctuation", "$"], + ["punctuation", "{"], + ["keyword", "data"], + ["punctuation", "."], + ["type", "aws_availability_zones"], + ["punctuation", "."], + "available", + ["punctuation", "."], + "names", + ["punctuation", "["], + ["number", "0"], + ["punctuation", "]"], + ["punctuation", "}"] + ]], + "\"" + ]], + ["string", [ + "\"", + ["interpolation", [ + ["punctuation", "$"], + ["punctuation", "{"], + "aws_db_subnet_group", + ["punctuation", "."], + "default", + ["punctuation", "."], + "id", + ["punctuation", "}"] + ]], + "\"" + ]], + ["string", [ + "\"", + ["interpolation", [ + ["punctuation", "$"], + ["punctuation", "{"], + ["keyword", "var"], + ["punctuation", "."], + ["type", "something"], + ["punctuation", "?"], + ["number", "1"], + ["punctuation", ":"], + ["number", "0"], + ["punctuation", "}"] + ]], + "\"" + ]], + ["string", [ + "\"", + ["interpolation", [ + ["punctuation", "$"], + ["punctuation", "{"], + ["keyword", "var"], + ["punctuation", "."], + ["type", "num"], + ["punctuation", "?"], + ["number", "1.02"], + ["punctuation", ":"], + ["number", "0"], + ["punctuation", "}"] + ]], + "\"" + ]], + ["string", [ + "\"", + ["interpolation", [ + ["punctuation", "$"], + ["punctuation", "{"], + ["function", "length"], + ["punctuation", "("], + ["keyword", "var"], + ["punctuation", "."], + ["type", "hostnames"], + ["punctuation", ")"], + ["punctuation", "}"] + ]], + "\"" + ]], + ["string", [ + "\"", + ["interpolation", [ + ["punctuation", "$"], + ["punctuation", "{"], + ["function", "format"], + ["punctuation", "("], + ["string", "\"web-%03d\""], + ["punctuation", ","], + ["keyword", "count"], + ["punctuation", "."], + ["type", "index"], + ["punctuation", "+"], + ["number", "1"], + ["punctuation", ")"], + ["punctuation", "}"] + ]], + "\"" + ]], + ["string", [ + "\"", + ["interpolation", [ + ["punctuation", "$"], + ["punctuation", "{"], + ["function", "file"], + ["punctuation", "("], + ["string", "\"templates/web_init.tpl\""], + ["punctuation", ")"], + ["punctuation", "}"] + ]], + "\"" + ]], + ["string", [ + "\"", + ["interpolation", [ + ["punctuation", "$"], + ["punctuation", "{"], + ["function", "replace"], + ["punctuation", "("], + ["keyword", "var"], + ["punctuation", "."], + ["type", "sub_domain"], + ["punctuation", ","], + ["string", "\".\""], + ["punctuation", ","], + ["string", "\"\\\\\\\\\\\\\\\\.\""], + ["punctuation", ")"], + ["punctuation", "}"] + ]], + "\"" + ]], + ["string", [ + "\"", + ["interpolation", [ + ["punctuation", "$"], + ["punctuation", "{"], + "filepath", + ["punctuation", "."], + "foo", + ["punctuation", "}"] + ]], + "\"" + ]], + + ["comment", "// keywords"], + ["string", [ + "\"", + ["interpolation", [ + ["punctuation", "$"], + ["punctuation", "{"], + ["keyword", "terraform"], + ["punctuation", "}"] + ]], + "\"" + ]], + ["string", [ + "\"", + ["interpolation", [ + ["punctuation", "$"], + ["punctuation", "{"], + ["keyword", "var"], + ["punctuation", "}"] + ]], + "\"" + ]], + ["string", [ + "\"", + ["interpolation", [ + ["punctuation", "$"], + ["punctuation", "{"], + ["keyword", "self"], + ["punctuation", "}"] + ]], + "\"" + ]], + ["string", [ + "\"", + ["interpolation", [ + ["punctuation", "$"], + ["punctuation", "{"], + ["keyword", "count"], + ["punctuation", "}"] + ]], + "\"" + ]], + ["string", [ + "\"", + ["interpolation", [ + ["punctuation", "$"], + ["punctuation", "{"], + ["keyword", "module"], + ["punctuation", "}"] + ]], + "\"" + ]], + ["string", [ + "\"", + ["interpolation", [ + ["punctuation", "$"], + ["punctuation", "{"], + ["keyword", "path"], + ["punctuation", "}"] + ]], + "\"" + ]], + ["string", [ + "\"", + ["interpolation", [ + ["punctuation", "$"], + ["punctuation", "{"], + ["keyword", "data"], + ["punctuation", "}"] + ]], + "\"" + ]], + ["string", [ + "\"", + ["interpolation", [ + ["punctuation", "$"], + ["punctuation", "{"], + ["keyword", "local"], + ["punctuation", "}"] + ]], + "\"" + ]] ] ---------------------------------------------------- -Checks for all interpolation. \ No newline at end of file +Checks for all interpolation. diff --git a/tests/languages/hlsl/keyword_feature.test b/tests/languages/hlsl/keyword_feature.test index 9af9d38290..6365cd28ed 100644 --- a/tests/languages/hlsl/keyword_feature.test +++ b/tests/languages/hlsl/keyword_feature.test @@ -1,709 +1,709 @@ -asm -asm_fragment -auto -break -case -catch -cbuffer -centroid -char -class -column_major -compile -compile_fragment -const -const_cast -continue -default -delete -discard -do -dynamic_cast -else -enum -explicit -export -extern -for -friend -fxgroup -goto -groupshared -if -in -inline -inout -interface -line -lineadj -linear -long -matrix -mutable -namespace -new -nointerpolation -noperspective -operator -out -packoffset -pass -pixelfragment -point -precise -private -protected -public -register -reinterpret_cast -return -row_major -sample -sampler -shared -short -signed -sizeof -snorm -stateblock -stateblock_state -static -static_cast -string -struct -switch -tbuffer -technique -technique10 -technique11 -template -texture -this -throw -triangle -triangleadj -try -typedef -typename -uniform -union -unorm -unsigned -using -vector -vertexfragment -virtual -void -volatile -while - -bool -bool1 -bool1x1 -bool1x2 -bool1x3 -bool1x4 -bool2 -bool2x1 -bool2x2 -bool2x3 -bool2x4 -bool3 -bool3x1 -bool3x2 -bool3x3 -bool3x4 -bool4 -bool4x1 -bool4x2 -bool4x3 -bool4x4 -double -double1 -double1x1 -double1x2 -double1x3 -double1x4 -double2 -double2x1 -double2x2 -double2x3 -double2x4 -double3 -double3x1 -double3x2 -double3x3 -double3x4 -double4 -double4x1 -double4x2 -double4x3 -double4x4 -dword -dword1 -dword1x1 -dword1x2 -dword1x3 -dword1x4 -dword2 -dword2x1 -dword2x2 -dword2x3 -dword2x4 -dword3 -dword3x1 -dword3x2 -dword3x3 -dword3x4 -dword4 -dword4x1 -dword4x2 -dword4x3 -dword4x4 -float -float1 -float1x1 -float1x2 -float1x3 -float1x4 -float2 -float2x1 -float2x2 -float2x3 -float2x4 -float3 -float3x1 -float3x2 -float3x3 -float3x4 -float4 -float4x1 -float4x2 -float4x3 -float4x4 -half -half1 -half1x1 -half1x2 -half1x3 -half1x4 -half2 -half2x1 -half2x2 -half2x3 -half2x4 -half3 -half3x1 -half3x2 -half3x3 -half3x4 -half4 -half4x1 -half4x2 -half4x3 -half4x4 -int -int1 -int1x1 -int1x2 -int1x3 -int1x4 -int2 -int2x1 -int2x2 -int2x3 -int2x4 -int3 -int3x1 -int3x2 -int3x3 -int3x4 -int4 -int4x1 -int4x2 -int4x3 -int4x4 -min10float -min10float1 -min10float1x1 -min10float1x2 -min10float1x3 -min10float1x4 -min10float2 -min10float2x1 -min10float2x2 -min10float2x3 -min10float2x4 -min10float3 -min10float3x1 -min10float3x2 -min10float3x3 -min10float3x4 -min10float4 -min10float4x1 -min10float4x2 -min10float4x3 -min10float4x4 -min12int -min12int1 -min12int1x1 -min12int1x2 -min12int1x3 -min12int1x4 -min12int2 -min12int2x1 -min12int2x2 -min12int2x3 -min12int2x4 -min12int3 -min12int3x1 -min12int3x2 -min12int3x3 -min12int3x4 -min12int4 -min12int4x1 -min12int4x2 -min12int4x3 -min12int4x4 -min16float -min16float1 -min16float1x1 -min16float1x2 -min16float1x3 -min16float1x4 -min16float2 -min16float2x1 -min16float2x2 -min16float2x3 -min16float2x4 -min16float3 -min16float3x1 -min16float3x2 -min16float3x3 -min16float3x4 -min16float4 -min16float4x1 -min16float4x2 -min16float4x3 -min16float4x4 -min16int -min16int1 -min16int1x1 -min16int1x2 -min16int1x3 -min16int1x4 -min16int2 -min16int2x1 -min16int2x2 -min16int2x3 -min16int2x4 -min16int3 -min16int3x1 -min16int3x2 -min16int3x3 -min16int3x4 -min16int4 -min16int4x1 -min16int4x2 -min16int4x3 -min16int4x4 -min16uint -min16uint1 -min16uint1x1 -min16uint1x2 -min16uint1x3 -min16uint1x4 -min16uint2 -min16uint2x1 -min16uint2x2 -min16uint2x3 -min16uint2x4 -min16uint3 -min16uint3x1 -min16uint3x2 -min16uint3x3 -min16uint3x4 -min16uint4 -min16uint4x1 -min16uint4x2 -min16uint4x3 -min16uint4x4 -uint -uint1 -uint1x1 -uint1x2 -uint1x3 -uint1x4 -uint2 -uint2x1 -uint2x2 -uint2x3 -uint2x4 -uint3 -uint3x1 -uint3x2 -uint3x3 -uint3x4 -uint4 -uint4x1 -uint4x2 -uint4x3 -uint4x4 +asm; +asm_fragment; +auto; +break; +case; +catch; +cbuffer; +centroid; +char; +class; +column_major; +compile; +compile_fragment; +const; +const_cast; +continue; +default; +delete; +discard; +do; +dynamic_cast; +else; +enum; +explicit; +export; +extern; +for; +friend; +fxgroup; +goto; +groupshared; +if; +in; +inline; +inout; +interface; +line; +lineadj; +linear; +long; +matrix; +mutable; +namespace; +new; +nointerpolation; +noperspective; +operator; +out; +packoffset; +pass; +pixelfragment; +point; +precise; +private; +protected; +public; +register; +reinterpret_cast; +return; +row_major; +sample; +sampler; +shared; +short; +signed; +sizeof; +snorm; +stateblock; +stateblock_state; +static; +static_cast; +string; +struct; +switch; +tbuffer; +technique; +technique10; +technique11; +template; +texture; +this; +throw; +triangle; +triangleadj; +try; +typedef; +typename; +uniform; +union; +unorm; +unsigned; +using; +vector; +vertexfragment; +virtual; +void; +volatile; +while; +; +bool; +bool1; +bool1x1; +bool1x2; +bool1x3; +bool1x4; +bool2; +bool2x1; +bool2x2; +bool2x3; +bool2x4; +bool3; +bool3x1; +bool3x2; +bool3x3; +bool3x4; +bool4; +bool4x1; +bool4x2; +bool4x3; +bool4x4; +double; +double1; +double1x1; +double1x2; +double1x3; +double1x4; +double2; +double2x1; +double2x2; +double2x3; +double2x4; +double3; +double3x1; +double3x2; +double3x3; +double3x4; +double4; +double4x1; +double4x2; +double4x3; +double4x4; +dword; +dword1; +dword1x1; +dword1x2; +dword1x3; +dword1x4; +dword2; +dword2x1; +dword2x2; +dword2x3; +dword2x4; +dword3; +dword3x1; +dword3x2; +dword3x3; +dword3x4; +dword4; +dword4x1; +dword4x2; +dword4x3; +dword4x4; +float; +float1; +float1x1; +float1x2; +float1x3; +float1x4; +float2; +float2x1; +float2x2; +float2x3; +float2x4; +float3; +float3x1; +float3x2; +float3x3; +float3x4; +float4; +float4x1; +float4x2; +float4x3; +float4x4; +half; +half1; +half1x1; +half1x2; +half1x3; +half1x4; +half2; +half2x1; +half2x2; +half2x3; +half2x4; +half3; +half3x1; +half3x2; +half3x3; +half3x4; +half4; +half4x1; +half4x2; +half4x3; +half4x4; +int; +int1; +int1x1; +int1x2; +int1x3; +int1x4; +int2; +int2x1; +int2x2; +int2x3; +int2x4; +int3; +int3x1; +int3x2; +int3x3; +int3x4; +int4; +int4x1; +int4x2; +int4x3; +int4x4; +min10float; +min10float1; +min10float1x1; +min10float1x2; +min10float1x3; +min10float1x4; +min10float2; +min10float2x1; +min10float2x2; +min10float2x3; +min10float2x4; +min10float3; +min10float3x1; +min10float3x2; +min10float3x3; +min10float3x4; +min10float4; +min10float4x1; +min10float4x2; +min10float4x3; +min10float4x4; +min12int; +min12int1; +min12int1x1; +min12int1x2; +min12int1x3; +min12int1x4; +min12int2; +min12int2x1; +min12int2x2; +min12int2x3; +min12int2x4; +min12int3; +min12int3x1; +min12int3x2; +min12int3x3; +min12int3x4; +min12int4; +min12int4x1; +min12int4x2; +min12int4x3; +min12int4x4; +min16float; +min16float1; +min16float1x1; +min16float1x2; +min16float1x3; +min16float1x4; +min16float2; +min16float2x1; +min16float2x2; +min16float2x3; +min16float2x4; +min16float3; +min16float3x1; +min16float3x2; +min16float3x3; +min16float3x4; +min16float4; +min16float4x1; +min16float4x2; +min16float4x3; +min16float4x4; +min16int; +min16int1; +min16int1x1; +min16int1x2; +min16int1x3; +min16int1x4; +min16int2; +min16int2x1; +min16int2x2; +min16int2x3; +min16int2x4; +min16int3; +min16int3x1; +min16int3x2; +min16int3x3; +min16int3x4; +min16int4; +min16int4x1; +min16int4x2; +min16int4x3; +min16int4x4; +min16uint; +min16uint1; +min16uint1x1; +min16uint1x2; +min16uint1x3; +min16uint1x4; +min16uint2; +min16uint2x1; +min16uint2x2; +min16uint2x3; +min16uint2x4; +min16uint3; +min16uint3x1; +min16uint3x2; +min16uint3x3; +min16uint3x4; +min16uint4; +min16uint4x1; +min16uint4x2; +min16uint4x3; +min16uint4x4; +uint; +uint1; +uint1x1; +uint1x2; +uint1x3; +uint1x4; +uint2; +uint2x1; +uint2x2; +uint2x3; +uint2x4; +uint3; +uint3x1; +uint3x2; +uint3x3; +uint3x4; +uint4; +uint4x1; +uint4x2; +uint4x3; +uint4x4; ---------------------------------------------------- [ - ["keyword", "asm"], - ["keyword", "asm_fragment"], - ["keyword", "auto"], - ["keyword", "break"], - ["keyword", "case"], - ["keyword", "catch"], - ["keyword", "cbuffer"], - ["keyword", "centroid"], - ["keyword", "char"], - ["keyword", "class"], - ["keyword", "column_major"], - ["keyword", "compile"], - ["keyword", "compile_fragment"], - ["keyword", "const"], - ["keyword", "const_cast"], - ["keyword", "continue"], - ["keyword", "default"], - ["keyword", "delete"], - ["keyword", "discard"], - ["keyword", "do"], - ["keyword", "dynamic_cast"], - ["keyword", "else"], - ["keyword", "enum"], - ["class-name", "explicit"], - ["keyword", "export"], - ["keyword", "extern"], - ["keyword", "for"], - ["keyword", "friend"], - ["keyword", "fxgroup"], - ["keyword", "goto"], - ["keyword", "groupshared"], - ["keyword", "if"], - ["keyword", "in"], - ["keyword", "inline"], - ["keyword", "inout"], - ["keyword", "interface"], - ["keyword", "line"], - ["keyword", "lineadj"], - ["keyword", "linear"], - ["keyword", "long"], - ["keyword", "matrix"], - ["keyword", "mutable"], - ["keyword", "namespace"], - ["keyword", "new"], - ["keyword", "nointerpolation"], - ["keyword", "noperspective"], - ["keyword", "operator"], - ["keyword", "out"], - ["keyword", "packoffset"], - ["keyword", "pass"], - ["keyword", "pixelfragment"], - ["keyword", "point"], - ["keyword", "precise"], - ["keyword", "private"], - ["keyword", "protected"], - ["keyword", "public"], - ["keyword", "register"], - ["keyword", "reinterpret_cast"], - ["keyword", "return"], - ["keyword", "row_major"], - ["keyword", "sample"], - ["keyword", "sampler"], - ["keyword", "shared"], - ["keyword", "short"], - ["keyword", "signed"], - ["keyword", "sizeof"], - ["keyword", "snorm"], - ["keyword", "stateblock"], - ["keyword", "stateblock_state"], - ["keyword", "static"], - ["keyword", "static_cast"], - ["keyword", "string"], - ["keyword", "struct"], - ["class-name", "switch"], - ["keyword", "tbuffer"], - ["keyword", "technique"], - ["keyword", "technique10"], - ["keyword", "technique11"], - ["keyword", "template"], - ["keyword", "texture"], - ["keyword", "this"], - ["keyword", "throw"], - ["keyword", "triangle"], - ["keyword", "triangleadj"], - ["keyword", "try"], - ["keyword", "typedef"], - ["keyword", "typename"], - ["keyword", "uniform"], - ["keyword", "union"], - ["keyword", "unorm"], - ["keyword", "unsigned"], - ["keyword", "using"], - ["keyword", "vector"], - ["keyword", "vertexfragment"], - ["keyword", "virtual"], - ["keyword", "void"], - ["keyword", "volatile"], - ["keyword", "while"], - - ["keyword", "bool"], - ["keyword", "bool1"], - ["keyword", "bool1x1"], - ["keyword", "bool1x2"], - ["keyword", "bool1x3"], - ["keyword", "bool1x4"], - ["keyword", "bool2"], - ["keyword", "bool2x1"], - ["keyword", "bool2x2"], - ["keyword", "bool2x3"], - ["keyword", "bool2x4"], - ["keyword", "bool3"], - ["keyword", "bool3x1"], - ["keyword", "bool3x2"], - ["keyword", "bool3x3"], - ["keyword", "bool3x4"], - ["keyword", "bool4"], - ["keyword", "bool4x1"], - ["keyword", "bool4x2"], - ["keyword", "bool4x3"], - ["keyword", "bool4x4"], - ["keyword", "double"], - ["keyword", "double1"], - ["keyword", "double1x1"], - ["keyword", "double1x2"], - ["keyword", "double1x3"], - ["keyword", "double1x4"], - ["keyword", "double2"], - ["keyword", "double2x1"], - ["keyword", "double2x2"], - ["keyword", "double2x3"], - ["keyword", "double2x4"], - ["keyword", "double3"], - ["keyword", "double3x1"], - ["keyword", "double3x2"], - ["keyword", "double3x3"], - ["keyword", "double3x4"], - ["keyword", "double4"], - ["keyword", "double4x1"], - ["keyword", "double4x2"], - ["keyword", "double4x3"], - ["keyword", "double4x4"], - ["keyword", "dword"], - ["keyword", "dword1"], - ["keyword", "dword1x1"], - ["keyword", "dword1x2"], - ["keyword", "dword1x3"], - ["keyword", "dword1x4"], - ["keyword", "dword2"], - ["keyword", "dword2x1"], - ["keyword", "dword2x2"], - ["keyword", "dword2x3"], - ["keyword", "dword2x4"], - ["keyword", "dword3"], - ["keyword", "dword3x1"], - ["keyword", "dword3x2"], - ["keyword", "dword3x3"], - ["keyword", "dword3x4"], - ["keyword", "dword4"], - ["keyword", "dword4x1"], - ["keyword", "dword4x2"], - ["keyword", "dword4x3"], - ["keyword", "dword4x4"], - ["keyword", "float"], - ["keyword", "float1"], - ["keyword", "float1x1"], - ["keyword", "float1x2"], - ["keyword", "float1x3"], - ["keyword", "float1x4"], - ["keyword", "float2"], - ["keyword", "float2x1"], - ["keyword", "float2x2"], - ["keyword", "float2x3"], - ["keyword", "float2x4"], - ["keyword", "float3"], - ["keyword", "float3x1"], - ["keyword", "float3x2"], - ["keyword", "float3x3"], - ["keyword", "float3x4"], - ["keyword", "float4"], - ["keyword", "float4x1"], - ["keyword", "float4x2"], - ["keyword", "float4x3"], - ["keyword", "float4x4"], - ["keyword", "half"], - ["keyword", "half1"], - ["keyword", "half1x1"], - ["keyword", "half1x2"], - ["keyword", "half1x3"], - ["keyword", "half1x4"], - ["keyword", "half2"], - ["keyword", "half2x1"], - ["keyword", "half2x2"], - ["keyword", "half2x3"], - ["keyword", "half2x4"], - ["keyword", "half3"], - ["keyword", "half3x1"], - ["keyword", "half3x2"], - ["keyword", "half3x3"], - ["keyword", "half3x4"], - ["keyword", "half4"], - ["keyword", "half4x1"], - ["keyword", "half4x2"], - ["keyword", "half4x3"], - ["keyword", "half4x4"], - ["keyword", "int"], - ["keyword", "int1"], - ["keyword", "int1x1"], - ["keyword", "int1x2"], - ["keyword", "int1x3"], - ["keyword", "int1x4"], - ["keyword", "int2"], - ["keyword", "int2x1"], - ["keyword", "int2x2"], - ["keyword", "int2x3"], - ["keyword", "int2x4"], - ["keyword", "int3"], - ["keyword", "int3x1"], - ["keyword", "int3x2"], - ["keyword", "int3x3"], - ["keyword", "int3x4"], - ["keyword", "int4"], - ["keyword", "int4x1"], - ["keyword", "int4x2"], - ["keyword", "int4x3"], - ["keyword", "int4x4"], - ["keyword", "min10float"], - ["keyword", "min10float1"], - ["keyword", "min10float1x1"], - ["keyword", "min10float1x2"], - ["keyword", "min10float1x3"], - ["keyword", "min10float1x4"], - ["keyword", "min10float2"], - ["keyword", "min10float2x1"], - ["keyword", "min10float2x2"], - ["keyword", "min10float2x3"], - ["keyword", "min10float2x4"], - ["keyword", "min10float3"], - ["keyword", "min10float3x1"], - ["keyword", "min10float3x2"], - ["keyword", "min10float3x3"], - ["keyword", "min10float3x4"], - ["keyword", "min10float4"], - ["keyword", "min10float4x1"], - ["keyword", "min10float4x2"], - ["keyword", "min10float4x3"], - ["keyword", "min10float4x4"], - ["keyword", "min12int"], - ["keyword", "min12int1"], - ["keyword", "min12int1x1"], - ["keyword", "min12int1x2"], - ["keyword", "min12int1x3"], - ["keyword", "min12int1x4"], - ["keyword", "min12int2"], - ["keyword", "min12int2x1"], - ["keyword", "min12int2x2"], - ["keyword", "min12int2x3"], - ["keyword", "min12int2x4"], - ["keyword", "min12int3"], - ["keyword", "min12int3x1"], - ["keyword", "min12int3x2"], - ["keyword", "min12int3x3"], - ["keyword", "min12int3x4"], - ["keyword", "min12int4"], - ["keyword", "min12int4x1"], - ["keyword", "min12int4x2"], - ["keyword", "min12int4x3"], - ["keyword", "min12int4x4"], - ["keyword", "min16float"], - ["keyword", "min16float1"], - ["keyword", "min16float1x1"], - ["keyword", "min16float1x2"], - ["keyword", "min16float1x3"], - ["keyword", "min16float1x4"], - ["keyword", "min16float2"], - ["keyword", "min16float2x1"], - ["keyword", "min16float2x2"], - ["keyword", "min16float2x3"], - ["keyword", "min16float2x4"], - ["keyword", "min16float3"], - ["keyword", "min16float3x1"], - ["keyword", "min16float3x2"], - ["keyword", "min16float3x3"], - ["keyword", "min16float3x4"], - ["keyword", "min16float4"], - ["keyword", "min16float4x1"], - ["keyword", "min16float4x2"], - ["keyword", "min16float4x3"], - ["keyword", "min16float4x4"], - ["keyword", "min16int"], - ["keyword", "min16int1"], - ["keyword", "min16int1x1"], - ["keyword", "min16int1x2"], - ["keyword", "min16int1x3"], - ["keyword", "min16int1x4"], - ["keyword", "min16int2"], - ["keyword", "min16int2x1"], - ["keyword", "min16int2x2"], - ["keyword", "min16int2x3"], - ["keyword", "min16int2x4"], - ["keyword", "min16int3"], - ["keyword", "min16int3x1"], - ["keyword", "min16int3x2"], - ["keyword", "min16int3x3"], - ["keyword", "min16int3x4"], - ["keyword", "min16int4"], - ["keyword", "min16int4x1"], - ["keyword", "min16int4x2"], - ["keyword", "min16int4x3"], - ["keyword", "min16int4x4"], - ["keyword", "min16uint"], - ["keyword", "min16uint1"], - ["keyword", "min16uint1x1"], - ["keyword", "min16uint1x2"], - ["keyword", "min16uint1x3"], - ["keyword", "min16uint1x4"], - ["keyword", "min16uint2"], - ["keyword", "min16uint2x1"], - ["keyword", "min16uint2x2"], - ["keyword", "min16uint2x3"], - ["keyword", "min16uint2x4"], - ["keyword", "min16uint3"], - ["keyword", "min16uint3x1"], - ["keyword", "min16uint3x2"], - ["keyword", "min16uint3x3"], - ["keyword", "min16uint3x4"], - ["keyword", "min16uint4"], - ["keyword", "min16uint4x1"], - ["keyword", "min16uint4x2"], - ["keyword", "min16uint4x3"], - ["keyword", "min16uint4x4"], - ["keyword", "uint"], - ["keyword", "uint1"], - ["keyword", "uint1x1"], - ["keyword", "uint1x2"], - ["keyword", "uint1x3"], - ["keyword", "uint1x4"], - ["keyword", "uint2"], - ["keyword", "uint2x1"], - ["keyword", "uint2x2"], - ["keyword", "uint2x3"], - ["keyword", "uint2x4"], - ["keyword", "uint3"], - ["keyword", "uint3x1"], - ["keyword", "uint3x2"], - ["keyword", "uint3x3"], - ["keyword", "uint3x4"], - ["keyword", "uint4"], - ["keyword", "uint4x1"], - ["keyword", "uint4x2"], - ["keyword", "uint4x3"], - ["keyword", "uint4x4"] + ["keyword", "asm"], ["punctuation", ";"], + ["keyword", "asm_fragment"], ["punctuation", ";"], + ["keyword", "auto"], ["punctuation", ";"], + ["keyword", "break"], ["punctuation", ";"], + ["keyword", "case"], ["punctuation", ";"], + ["keyword", "catch"], ["punctuation", ";"], + ["keyword", "cbuffer"], ["punctuation", ";"], + ["keyword", "centroid"], ["punctuation", ";"], + ["keyword", "char"], ["punctuation", ";"], + ["keyword", "class"], ["punctuation", ";"], + ["keyword", "column_major"], ["punctuation", ";"], + ["keyword", "compile"], ["punctuation", ";"], + ["keyword", "compile_fragment"], ["punctuation", ";"], + ["keyword", "const"], ["punctuation", ";"], + ["keyword", "const_cast"], ["punctuation", ";"], + ["keyword", "continue"], ["punctuation", ";"], + ["keyword", "default"], ["punctuation", ";"], + ["keyword", "delete"], ["punctuation", ";"], + ["keyword", "discard"], ["punctuation", ";"], + ["keyword", "do"], ["punctuation", ";"], + ["keyword", "dynamic_cast"], ["punctuation", ";"], + ["keyword", "else"], ["punctuation", ";"], + ["keyword", "enum"], ["punctuation", ";"], + ["keyword", "explicit"], ["punctuation", ";"], + ["keyword", "export"], ["punctuation", ";"], + ["keyword", "extern"], ["punctuation", ";"], + ["keyword", "for"], ["punctuation", ";"], + ["keyword", "friend"], ["punctuation", ";"], + ["keyword", "fxgroup"], ["punctuation", ";"], + ["keyword", "goto"], ["punctuation", ";"], + ["keyword", "groupshared"], ["punctuation", ";"], + ["keyword", "if"], ["punctuation", ";"], + ["keyword", "in"], ["punctuation", ";"], + ["keyword", "inline"], ["punctuation", ";"], + ["keyword", "inout"], ["punctuation", ";"], + ["keyword", "interface"], ["punctuation", ";"], + ["keyword", "line"], ["punctuation", ";"], + ["keyword", "lineadj"], ["punctuation", ";"], + ["keyword", "linear"], ["punctuation", ";"], + ["keyword", "long"], ["punctuation", ";"], + ["keyword", "matrix"], ["punctuation", ";"], + ["keyword", "mutable"], ["punctuation", ";"], + ["keyword", "namespace"], ["punctuation", ";"], + ["keyword", "new"], ["punctuation", ";"], + ["keyword", "nointerpolation"], ["punctuation", ";"], + ["keyword", "noperspective"], ["punctuation", ";"], + ["keyword", "operator"], ["punctuation", ";"], + ["keyword", "out"], ["punctuation", ";"], + ["keyword", "packoffset"], ["punctuation", ";"], + ["keyword", "pass"], ["punctuation", ";"], + ["keyword", "pixelfragment"], ["punctuation", ";"], + ["keyword", "point"], ["punctuation", ";"], + ["keyword", "precise"], ["punctuation", ";"], + ["keyword", "private"], ["punctuation", ";"], + ["keyword", "protected"], ["punctuation", ";"], + ["keyword", "public"], ["punctuation", ";"], + ["keyword", "register"], ["punctuation", ";"], + ["keyword", "reinterpret_cast"], ["punctuation", ";"], + ["keyword", "return"], ["punctuation", ";"], + ["keyword", "row_major"], ["punctuation", ";"], + ["keyword", "sample"], ["punctuation", ";"], + ["keyword", "sampler"], ["punctuation", ";"], + ["keyword", "shared"], ["punctuation", ";"], + ["keyword", "short"], ["punctuation", ";"], + ["keyword", "signed"], ["punctuation", ";"], + ["keyword", "sizeof"], ["punctuation", ";"], + ["keyword", "snorm"], ["punctuation", ";"], + ["keyword", "stateblock"], ["punctuation", ";"], + ["keyword", "stateblock_state"], ["punctuation", ";"], + ["keyword", "static"], ["punctuation", ";"], + ["keyword", "static_cast"], ["punctuation", ";"], + ["keyword", "string"], ["punctuation", ";"], + ["keyword", "struct"], ["punctuation", ";"], + ["keyword", "switch"], ["punctuation", ";"], + ["keyword", "tbuffer"], ["punctuation", ";"], + ["keyword", "technique"], ["punctuation", ";"], + ["keyword", "technique10"], ["punctuation", ";"], + ["keyword", "technique11"], ["punctuation", ";"], + ["keyword", "template"], ["punctuation", ";"], + ["keyword", "texture"], ["punctuation", ";"], + ["keyword", "this"], ["punctuation", ";"], + ["keyword", "throw"], ["punctuation", ";"], + ["keyword", "triangle"], ["punctuation", ";"], + ["keyword", "triangleadj"], ["punctuation", ";"], + ["keyword", "try"], ["punctuation", ";"], + ["keyword", "typedef"], ["punctuation", ";"], + ["keyword", "typename"], ["punctuation", ";"], + ["keyword", "uniform"], ["punctuation", ";"], + ["keyword", "union"], ["punctuation", ";"], + ["keyword", "unorm"], ["punctuation", ";"], + ["keyword", "unsigned"], ["punctuation", ";"], + ["keyword", "using"], ["punctuation", ";"], + ["keyword", "vector"], ["punctuation", ";"], + ["keyword", "vertexfragment"], ["punctuation", ";"], + ["keyword", "virtual"], ["punctuation", ";"], + ["keyword", "void"], ["punctuation", ";"], + ["keyword", "volatile"], ["punctuation", ";"], + ["keyword", "while"], ["punctuation", ";"], + ["punctuation", ";"], + ["keyword", "bool"], ["punctuation", ";"], + ["keyword", "bool1"], ["punctuation", ";"], + ["keyword", "bool1x1"], ["punctuation", ";"], + ["keyword", "bool1x2"], ["punctuation", ";"], + ["keyword", "bool1x3"], ["punctuation", ";"], + ["keyword", "bool1x4"], ["punctuation", ";"], + ["keyword", "bool2"], ["punctuation", ";"], + ["keyword", "bool2x1"], ["punctuation", ";"], + ["keyword", "bool2x2"], ["punctuation", ";"], + ["keyword", "bool2x3"], ["punctuation", ";"], + ["keyword", "bool2x4"], ["punctuation", ";"], + ["keyword", "bool3"], ["punctuation", ";"], + ["keyword", "bool3x1"], ["punctuation", ";"], + ["keyword", "bool3x2"], ["punctuation", ";"], + ["keyword", "bool3x3"], ["punctuation", ";"], + ["keyword", "bool3x4"], ["punctuation", ";"], + ["keyword", "bool4"], ["punctuation", ";"], + ["keyword", "bool4x1"], ["punctuation", ";"], + ["keyword", "bool4x2"], ["punctuation", ";"], + ["keyword", "bool4x3"], ["punctuation", ";"], + ["keyword", "bool4x4"], ["punctuation", ";"], + ["keyword", "double"], ["punctuation", ";"], + ["keyword", "double1"], ["punctuation", ";"], + ["keyword", "double1x1"], ["punctuation", ";"], + ["keyword", "double1x2"], ["punctuation", ";"], + ["keyword", "double1x3"], ["punctuation", ";"], + ["keyword", "double1x4"], ["punctuation", ";"], + ["keyword", "double2"], ["punctuation", ";"], + ["keyword", "double2x1"], ["punctuation", ";"], + ["keyword", "double2x2"], ["punctuation", ";"], + ["keyword", "double2x3"], ["punctuation", ";"], + ["keyword", "double2x4"], ["punctuation", ";"], + ["keyword", "double3"], ["punctuation", ";"], + ["keyword", "double3x1"], ["punctuation", ";"], + ["keyword", "double3x2"], ["punctuation", ";"], + ["keyword", "double3x3"], ["punctuation", ";"], + ["keyword", "double3x4"], ["punctuation", ";"], + ["keyword", "double4"], ["punctuation", ";"], + ["keyword", "double4x1"], ["punctuation", ";"], + ["keyword", "double4x2"], ["punctuation", ";"], + ["keyword", "double4x3"], ["punctuation", ";"], + ["keyword", "double4x4"], ["punctuation", ";"], + ["keyword", "dword"], ["punctuation", ";"], + ["keyword", "dword1"], ["punctuation", ";"], + ["keyword", "dword1x1"], ["punctuation", ";"], + ["keyword", "dword1x2"], ["punctuation", ";"], + ["keyword", "dword1x3"], ["punctuation", ";"], + ["keyword", "dword1x4"], ["punctuation", ";"], + ["keyword", "dword2"], ["punctuation", ";"], + ["keyword", "dword2x1"], ["punctuation", ";"], + ["keyword", "dword2x2"], ["punctuation", ";"], + ["keyword", "dword2x3"], ["punctuation", ";"], + ["keyword", "dword2x4"], ["punctuation", ";"], + ["keyword", "dword3"], ["punctuation", ";"], + ["keyword", "dword3x1"], ["punctuation", ";"], + ["keyword", "dword3x2"], ["punctuation", ";"], + ["keyword", "dword3x3"], ["punctuation", ";"], + ["keyword", "dword3x4"], ["punctuation", ";"], + ["keyword", "dword4"], ["punctuation", ";"], + ["keyword", "dword4x1"], ["punctuation", ";"], + ["keyword", "dword4x2"], ["punctuation", ";"], + ["keyword", "dword4x3"], ["punctuation", ";"], + ["keyword", "dword4x4"], ["punctuation", ";"], + ["keyword", "float"], ["punctuation", ";"], + ["keyword", "float1"], ["punctuation", ";"], + ["keyword", "float1x1"], ["punctuation", ";"], + ["keyword", "float1x2"], ["punctuation", ";"], + ["keyword", "float1x3"], ["punctuation", ";"], + ["keyword", "float1x4"], ["punctuation", ";"], + ["keyword", "float2"], ["punctuation", ";"], + ["keyword", "float2x1"], ["punctuation", ";"], + ["keyword", "float2x2"], ["punctuation", ";"], + ["keyword", "float2x3"], ["punctuation", ";"], + ["keyword", "float2x4"], ["punctuation", ";"], + ["keyword", "float3"], ["punctuation", ";"], + ["keyword", "float3x1"], ["punctuation", ";"], + ["keyword", "float3x2"], ["punctuation", ";"], + ["keyword", "float3x3"], ["punctuation", ";"], + ["keyword", "float3x4"], ["punctuation", ";"], + ["keyword", "float4"], ["punctuation", ";"], + ["keyword", "float4x1"], ["punctuation", ";"], + ["keyword", "float4x2"], ["punctuation", ";"], + ["keyword", "float4x3"], ["punctuation", ";"], + ["keyword", "float4x4"], ["punctuation", ";"], + ["keyword", "half"], ["punctuation", ";"], + ["keyword", "half1"], ["punctuation", ";"], + ["keyword", "half1x1"], ["punctuation", ";"], + ["keyword", "half1x2"], ["punctuation", ";"], + ["keyword", "half1x3"], ["punctuation", ";"], + ["keyword", "half1x4"], ["punctuation", ";"], + ["keyword", "half2"], ["punctuation", ";"], + ["keyword", "half2x1"], ["punctuation", ";"], + ["keyword", "half2x2"], ["punctuation", ";"], + ["keyword", "half2x3"], ["punctuation", ";"], + ["keyword", "half2x4"], ["punctuation", ";"], + ["keyword", "half3"], ["punctuation", ";"], + ["keyword", "half3x1"], ["punctuation", ";"], + ["keyword", "half3x2"], ["punctuation", ";"], + ["keyword", "half3x3"], ["punctuation", ";"], + ["keyword", "half3x4"], ["punctuation", ";"], + ["keyword", "half4"], ["punctuation", ";"], + ["keyword", "half4x1"], ["punctuation", ";"], + ["keyword", "half4x2"], ["punctuation", ";"], + ["keyword", "half4x3"], ["punctuation", ";"], + ["keyword", "half4x4"], ["punctuation", ";"], + ["keyword", "int"], ["punctuation", ";"], + ["keyword", "int1"], ["punctuation", ";"], + ["keyword", "int1x1"], ["punctuation", ";"], + ["keyword", "int1x2"], ["punctuation", ";"], + ["keyword", "int1x3"], ["punctuation", ";"], + ["keyword", "int1x4"], ["punctuation", ";"], + ["keyword", "int2"], ["punctuation", ";"], + ["keyword", "int2x1"], ["punctuation", ";"], + ["keyword", "int2x2"], ["punctuation", ";"], + ["keyword", "int2x3"], ["punctuation", ";"], + ["keyword", "int2x4"], ["punctuation", ";"], + ["keyword", "int3"], ["punctuation", ";"], + ["keyword", "int3x1"], ["punctuation", ";"], + ["keyword", "int3x2"], ["punctuation", ";"], + ["keyword", "int3x3"], ["punctuation", ";"], + ["keyword", "int3x4"], ["punctuation", ";"], + ["keyword", "int4"], ["punctuation", ";"], + ["keyword", "int4x1"], ["punctuation", ";"], + ["keyword", "int4x2"], ["punctuation", ";"], + ["keyword", "int4x3"], ["punctuation", ";"], + ["keyword", "int4x4"], ["punctuation", ";"], + ["keyword", "min10float"], ["punctuation", ";"], + ["keyword", "min10float1"], ["punctuation", ";"], + ["keyword", "min10float1x1"], ["punctuation", ";"], + ["keyword", "min10float1x2"], ["punctuation", ";"], + ["keyword", "min10float1x3"], ["punctuation", ";"], + ["keyword", "min10float1x4"], ["punctuation", ";"], + ["keyword", "min10float2"], ["punctuation", ";"], + ["keyword", "min10float2x1"], ["punctuation", ";"], + ["keyword", "min10float2x2"], ["punctuation", ";"], + ["keyword", "min10float2x3"], ["punctuation", ";"], + ["keyword", "min10float2x4"], ["punctuation", ";"], + ["keyword", "min10float3"], ["punctuation", ";"], + ["keyword", "min10float3x1"], ["punctuation", ";"], + ["keyword", "min10float3x2"], ["punctuation", ";"], + ["keyword", "min10float3x3"], ["punctuation", ";"], + ["keyword", "min10float3x4"], ["punctuation", ";"], + ["keyword", "min10float4"], ["punctuation", ";"], + ["keyword", "min10float4x1"], ["punctuation", ";"], + ["keyword", "min10float4x2"], ["punctuation", ";"], + ["keyword", "min10float4x3"], ["punctuation", ";"], + ["keyword", "min10float4x4"], ["punctuation", ";"], + ["keyword", "min12int"], ["punctuation", ";"], + ["keyword", "min12int1"], ["punctuation", ";"], + ["keyword", "min12int1x1"], ["punctuation", ";"], + ["keyword", "min12int1x2"], ["punctuation", ";"], + ["keyword", "min12int1x3"], ["punctuation", ";"], + ["keyword", "min12int1x4"], ["punctuation", ";"], + ["keyword", "min12int2"], ["punctuation", ";"], + ["keyword", "min12int2x1"], ["punctuation", ";"], + ["keyword", "min12int2x2"], ["punctuation", ";"], + ["keyword", "min12int2x3"], ["punctuation", ";"], + ["keyword", "min12int2x4"], ["punctuation", ";"], + ["keyword", "min12int3"], ["punctuation", ";"], + ["keyword", "min12int3x1"], ["punctuation", ";"], + ["keyword", "min12int3x2"], ["punctuation", ";"], + ["keyword", "min12int3x3"], ["punctuation", ";"], + ["keyword", "min12int3x4"], ["punctuation", ";"], + ["keyword", "min12int4"], ["punctuation", ";"], + ["keyword", "min12int4x1"], ["punctuation", ";"], + ["keyword", "min12int4x2"], ["punctuation", ";"], + ["keyword", "min12int4x3"], ["punctuation", ";"], + ["keyword", "min12int4x4"], ["punctuation", ";"], + ["keyword", "min16float"], ["punctuation", ";"], + ["keyword", "min16float1"], ["punctuation", ";"], + ["keyword", "min16float1x1"], ["punctuation", ";"], + ["keyword", "min16float1x2"], ["punctuation", ";"], + ["keyword", "min16float1x3"], ["punctuation", ";"], + ["keyword", "min16float1x4"], ["punctuation", ";"], + ["keyword", "min16float2"], ["punctuation", ";"], + ["keyword", "min16float2x1"], ["punctuation", ";"], + ["keyword", "min16float2x2"], ["punctuation", ";"], + ["keyword", "min16float2x3"], ["punctuation", ";"], + ["keyword", "min16float2x4"], ["punctuation", ";"], + ["keyword", "min16float3"], ["punctuation", ";"], + ["keyword", "min16float3x1"], ["punctuation", ";"], + ["keyword", "min16float3x2"], ["punctuation", ";"], + ["keyword", "min16float3x3"], ["punctuation", ";"], + ["keyword", "min16float3x4"], ["punctuation", ";"], + ["keyword", "min16float4"], ["punctuation", ";"], + ["keyword", "min16float4x1"], ["punctuation", ";"], + ["keyword", "min16float4x2"], ["punctuation", ";"], + ["keyword", "min16float4x3"], ["punctuation", ";"], + ["keyword", "min16float4x4"], ["punctuation", ";"], + ["keyword", "min16int"], ["punctuation", ";"], + ["keyword", "min16int1"], ["punctuation", ";"], + ["keyword", "min16int1x1"], ["punctuation", ";"], + ["keyword", "min16int1x2"], ["punctuation", ";"], + ["keyword", "min16int1x3"], ["punctuation", ";"], + ["keyword", "min16int1x4"], ["punctuation", ";"], + ["keyword", "min16int2"], ["punctuation", ";"], + ["keyword", "min16int2x1"], ["punctuation", ";"], + ["keyword", "min16int2x2"], ["punctuation", ";"], + ["keyword", "min16int2x3"], ["punctuation", ";"], + ["keyword", "min16int2x4"], ["punctuation", ";"], + ["keyword", "min16int3"], ["punctuation", ";"], + ["keyword", "min16int3x1"], ["punctuation", ";"], + ["keyword", "min16int3x2"], ["punctuation", ";"], + ["keyword", "min16int3x3"], ["punctuation", ";"], + ["keyword", "min16int3x4"], ["punctuation", ";"], + ["keyword", "min16int4"], ["punctuation", ";"], + ["keyword", "min16int4x1"], ["punctuation", ";"], + ["keyword", "min16int4x2"], ["punctuation", ";"], + ["keyword", "min16int4x3"], ["punctuation", ";"], + ["keyword", "min16int4x4"], ["punctuation", ";"], + ["keyword", "min16uint"], ["punctuation", ";"], + ["keyword", "min16uint1"], ["punctuation", ";"], + ["keyword", "min16uint1x1"], ["punctuation", ";"], + ["keyword", "min16uint1x2"], ["punctuation", ";"], + ["keyword", "min16uint1x3"], ["punctuation", ";"], + ["keyword", "min16uint1x4"], ["punctuation", ";"], + ["keyword", "min16uint2"], ["punctuation", ";"], + ["keyword", "min16uint2x1"], ["punctuation", ";"], + ["keyword", "min16uint2x2"], ["punctuation", ";"], + ["keyword", "min16uint2x3"], ["punctuation", ";"], + ["keyword", "min16uint2x4"], ["punctuation", ";"], + ["keyword", "min16uint3"], ["punctuation", ";"], + ["keyword", "min16uint3x1"], ["punctuation", ";"], + ["keyword", "min16uint3x2"], ["punctuation", ";"], + ["keyword", "min16uint3x3"], ["punctuation", ";"], + ["keyword", "min16uint3x4"], ["punctuation", ";"], + ["keyword", "min16uint4"], ["punctuation", ";"], + ["keyword", "min16uint4x1"], ["punctuation", ";"], + ["keyword", "min16uint4x2"], ["punctuation", ";"], + ["keyword", "min16uint4x3"], ["punctuation", ";"], + ["keyword", "min16uint4x4"], ["punctuation", ";"], + ["keyword", "uint"], ["punctuation", ";"], + ["keyword", "uint1"], ["punctuation", ";"], + ["keyword", "uint1x1"], ["punctuation", ";"], + ["keyword", "uint1x2"], ["punctuation", ";"], + ["keyword", "uint1x3"], ["punctuation", ";"], + ["keyword", "uint1x4"], ["punctuation", ";"], + ["keyword", "uint2"], ["punctuation", ";"], + ["keyword", "uint2x1"], ["punctuation", ";"], + ["keyword", "uint2x2"], ["punctuation", ";"], + ["keyword", "uint2x3"], ["punctuation", ";"], + ["keyword", "uint2x4"], ["punctuation", ";"], + ["keyword", "uint3"], ["punctuation", ";"], + ["keyword", "uint3x1"], ["punctuation", ";"], + ["keyword", "uint3x2"], ["punctuation", ";"], + ["keyword", "uint3x3"], ["punctuation", ";"], + ["keyword", "uint3x4"], ["punctuation", ";"], + ["keyword", "uint4"], ["punctuation", ";"], + ["keyword", "uint4x1"], ["punctuation", ";"], + ["keyword", "uint4x2"], ["punctuation", ";"], + ["keyword", "uint4x3"], ["punctuation", ";"], + ["keyword", "uint4x4"], ["punctuation", ";"] ] ---------------------------------------------------- diff --git a/tests/languages/ichigojam/punctuation_feature.test b/tests/languages/ichigojam/punctuation_feature.test new file mode 100644 index 0000000000..5bd5632654 --- /dev/null +++ b/tests/languages/ichigojam/punctuation_feature.test @@ -0,0 +1,13 @@ +[ ] , ; : ( ) + +---------------------------------------------------- + +[ + ["punctuation", "["], + ["punctuation", "]"], + ["punctuation", ","], + ["punctuation", ";"], + ["punctuation", ":"], + ["punctuation", "("], + ["punctuation", ")"] +] diff --git a/tests/languages/icu-message-format/arg-skeleton_feature.test b/tests/languages/icu-message-format/arg-skeleton_feature.test index c198ea362b..c822826fce 100644 --- a/tests/languages/icu-message-format/arg-skeleton_feature.test +++ b/tests/languages/icu-message-format/arg-skeleton_feature.test @@ -1,5 +1,9 @@ At {1,time,::jmm} on {1,date,::dMMMM}, there was {2} on planet {3,number,integer}. +{foo,spellout} +{foo,ordinal} +{foo,duration} + ---------------------------------------------------- [ @@ -47,5 +51,33 @@ At {1,time,::jmm} on {1,date,::dMMMM}, there was {2} on planet {3,number,integer ]], ["argument-delimiter", "}"] ]], - "." -] \ No newline at end of file + ".\r\n\r\n", + + ["argument", [ + ["argument-delimiter", "{"], + ["content", [ + ["argument-name", "foo"], + ["punctuation", ","], + ["arg-type", "spellout"] + ]], + ["argument-delimiter", "}"] + ]], + ["argument", [ + ["argument-delimiter", "{"], + ["content", [ + ["argument-name", "foo"], + ["punctuation", ","], + ["arg-type", "ordinal"] + ]], + ["argument-delimiter", "}"] + ]], + ["argument", [ + ["argument-delimiter", "{"], + ["content", [ + ["argument-name", "foo"], + ["punctuation", ","], + ["arg-type", "duration"] + ]], + ["argument-delimiter", "}"] + ]] +] diff --git a/tests/languages/icu-message-format/plural-style_feature.test b/tests/languages/icu-message-format/plural-style_feature.test index 516f1bda4d..8c3478b7fd 100644 --- a/tests/languages/icu-message-format/plural-style_feature.test +++ b/tests/languages/icu-message-format/plural-style_feature.test @@ -20,6 +20,8 @@ https://unicode-org.github.io/icu/userguide/format_parse/messages/ =2 {{host} invites {guest} and one other person to their party.} other {{host} invites {guest} and # other people to their party.}}}} +{num_guests, selectordinal, foo} + ---------------------------------------------------- [ @@ -371,5 +373,19 @@ https://unicode-org.github.io/icu/userguide/format_parse/messages/ ]] ]], ["argument-delimiter", "}"] + ]], + + ["argument", [ + ["argument-delimiter", "{"], + ["content", [ + ["argument-name", "num_guests"], + ["punctuation", ","], + ["keyword", "selectordinal"], + ["punctuation", ","], + ["plural-style", [ + ["selector", ["foo"]] + ]] + ]], + ["argument-delimiter", "}"] ]] -] \ No newline at end of file +] diff --git a/tests/languages/icu-message-format/string_feature.test b/tests/languages/icu-message-format/string_feature.test new file mode 100644 index 0000000000..83d2724dec --- /dev/null +++ b/tests/languages/icu-message-format/string_feature.test @@ -0,0 +1,36 @@ +foo '{1}' {1} '' {1} + +foo {foo, '{1}'} + +---------------------------------------------------- + +[ + "foo ", + ["string", ["'{1}'"]], + ["argument", [ + ["argument-delimiter", "{"], + ["content", [ + ["argument-name", "1"] + ]], + ["argument-delimiter", "}"] + ]], + ["escape", "''"], + ["argument", [ + ["argument-delimiter", "{"], + ["content", [ + ["argument-name", "1"] + ]], + ["argument-delimiter", "}"] + ]], + + "\r\n\r\nfoo ", + ["argument", [ + ["argument-delimiter", "{"], + ["content", [ + ["argument-name", "foo"], + ["punctuation", ","], + ["arg-style-text", "'{1}'"] + ]], + ["argument-delimiter", "}"] + ]] +] diff --git a/tests/languages/iecst/boolean_feature.test b/tests/languages/iecst/boolean_feature.test new file mode 100644 index 0000000000..5860b1f4a9 --- /dev/null +++ b/tests/languages/iecst/boolean_feature.test @@ -0,0 +1,11 @@ +TRUE +FALSE +NULL + +---------------------------------------------------- + +[ + ["boolean", "TRUE"], + ["boolean", "FALSE"], + ["boolean", "NULL"] +] diff --git a/tests/languages/iecst/comment_feature.test b/tests/languages/iecst/comment_feature.test new file mode 100644 index 0000000000..90cfdeadc6 --- /dev/null +++ b/tests/languages/iecst/comment_feature.test @@ -0,0 +1,11 @@ +// comment +(* comment *) +/* comment */ + +---------------------------------------------------- + +[ + ["comment", "// comment"], + ["comment", "(* comment *)"], + ["comment", "/* comment */"] +] diff --git a/tests/languages/io/builtin_feature.test b/tests/languages/io/builtin_feature.test new file mode 100644 index 0000000000..6dbfd21216 --- /dev/null +++ b/tests/languages/io/builtin_feature.test @@ -0,0 +1,161 @@ +Array +AudioDevice +AudioMixer +Block +Box +Buffer +CFunction +CGI +Color +Curses +DBM +DNSResolver +DOConnection +DOProxy +DOServer +Date +Directory +Duration +DynLib +Error +Exception +FFT +File +Fnmatch +Font +Future +GL +GLE +GLScissor +GLU +GLUCylinder +GLUQuadric +GLUSphere +GLUT +Host +Image +Importer +LinkList +List +Lobby +Locals +MD5 +MP3Decoder +MP3Encoder +Map +Message +Movie +Notification +Number +Object +OpenGL +Point +Protos +Regex +SGML +SGMLElement +SGMLParser +SQLite +Server +Sequence +ShowMessage +SleepyCat +SleepyCatCursor +Socket +SocketManager +Sound +Soup +Store +String +Tree +UDPSender +UPDReceiver +URL +User +Warning +WeakLink +Random +BigNum + +---------------------------------------------------- + +[ + ["builtin", "Array"], + ["builtin", "AudioDevice"], + ["builtin", "AudioMixer"], + ["builtin", "Block"], + ["builtin", "Box"], + ["builtin", "Buffer"], + ["builtin", "CFunction"], + ["builtin", "CGI"], + ["builtin", "Color"], + ["builtin", "Curses"], + ["builtin", "DBM"], + ["builtin", "DNSResolver"], + ["builtin", "DOConnection"], + ["builtin", "DOProxy"], + ["builtin", "DOServer"], + ["builtin", "Date"], + ["builtin", "Directory"], + ["builtin", "Duration"], + ["builtin", "DynLib"], + ["builtin", "Error"], + ["builtin", "Exception"], + ["builtin", "FFT"], + ["builtin", "File"], + ["builtin", "Fnmatch"], + ["builtin", "Font"], + ["builtin", "Future"], + ["builtin", "GL"], + ["builtin", "GLE"], + ["builtin", "GLScissor"], + ["builtin", "GLU"], + ["builtin", "GLUCylinder"], + ["builtin", "GLUQuadric"], + ["builtin", "GLUSphere"], + ["builtin", "GLUT"], + ["builtin", "Host"], + ["builtin", "Image"], + ["builtin", "Importer"], + ["builtin", "LinkList"], + ["builtin", "List"], + ["builtin", "Lobby"], + ["builtin", "Locals"], + ["builtin", "MD5"], + ["builtin", "MP3Decoder"], + ["builtin", "MP3Encoder"], + ["builtin", "Map"], + ["builtin", "Message"], + ["builtin", "Movie"], + ["builtin", "Notification"], + ["builtin", "Number"], + ["builtin", "Object"], + ["builtin", "OpenGL"], + ["builtin", "Point"], + ["builtin", "Protos"], + ["builtin", "Regex"], + ["builtin", "SGML"], + ["builtin", "SGMLElement"], + ["builtin", "SGMLParser"], + ["builtin", "SQLite"], + ["builtin", "Server"], + ["builtin", "Sequence"], + ["builtin", "ShowMessage"], + ["builtin", "SleepyCat"], + ["builtin", "SleepyCatCursor"], + ["builtin", "Socket"], + ["builtin", "SocketManager"], + ["builtin", "Sound"], + ["builtin", "Soup"], + ["builtin", "Store"], + ["builtin", "String"], + ["builtin", "Tree"], + ["builtin", "UDPSender"], + ["builtin", "UPDReceiver"], + ["builtin", "URL"], + ["builtin", "User"], + ["builtin", "Warning"], + ["builtin", "WeakLink"], + ["builtin", "Random"], + ["builtin", "BigNum"] +] diff --git a/tests/languages/io/keyword_feature.test b/tests/languages/io/keyword_feature.test new file mode 100644 index 0000000000..35cc9070c8 --- /dev/null +++ b/tests/languages/io/keyword_feature.test @@ -0,0 +1,141 @@ +activate +activeCoroCount +asString +block +break +catch +clone +collectGarbage +compileString +continue +do +doFile +doMessage +doString +else +elseif +exit +for +foreach +forward +getSlot +getEnvironmentVariable +hasSlot +if +ifFalse +ifNil +ifNilEval +ifTrue +isActive +isNil +isResumable +list +message +method +parent +pass +pause +perform +performWithArgList +print +println +proto +raise +raiseResumable +removeSlot +resend +resume +schedulerSleepSeconds +self +sender +setSchedulerSleepSeconds +setSlot +shallowCopy +slotNames +super +system +then +thisBlock +thisContext +call +try +type +uniqueId +updateSlot +wait +while +write +yield + +---------------------------------------------------- + +[ + ["keyword", "activate"], + ["keyword", "activeCoroCount"], + ["keyword", "asString"], + ["keyword", "block"], + ["keyword", "break"], + ["keyword", "catch"], + ["keyword", "clone"], + ["keyword", "collectGarbage"], + ["keyword", "compileString"], + ["keyword", "continue"], + ["keyword", "do"], + ["keyword", "doFile"], + ["keyword", "doMessage"], + ["keyword", "doString"], + ["keyword", "else"], + ["keyword", "elseif"], + ["keyword", "exit"], + ["keyword", "for"], + ["keyword", "foreach"], + ["keyword", "forward"], + ["keyword", "getSlot"], + ["keyword", "getEnvironmentVariable"], + ["keyword", "hasSlot"], + ["keyword", "if"], + ["keyword", "ifFalse"], + ["keyword", "ifNil"], + ["keyword", "ifNilEval"], + ["keyword", "ifTrue"], + ["keyword", "isActive"], + ["keyword", "isNil"], + ["keyword", "isResumable"], + ["keyword", "list"], + ["keyword", "message"], + ["keyword", "method"], + ["keyword", "parent"], + ["keyword", "pass"], + ["keyword", "pause"], + ["keyword", "perform"], + ["keyword", "performWithArgList"], + ["keyword", "print"], + ["keyword", "println"], + ["keyword", "proto"], + ["keyword", "raise"], + ["keyword", "raiseResumable"], + ["keyword", "removeSlot"], + ["keyword", "resend"], + ["keyword", "resume"], + ["keyword", "schedulerSleepSeconds"], + ["keyword", "self"], + ["keyword", "sender"], + ["keyword", "setSchedulerSleepSeconds"], + ["keyword", "setSlot"], + ["keyword", "shallowCopy"], + ["keyword", "slotNames"], + ["keyword", "super"], + ["keyword", "system"], + ["keyword", "then"], + ["keyword", "thisBlock"], + ["keyword", "thisContext"], + ["keyword", "call"], + ["keyword", "try"], + ["keyword", "type"], + ["keyword", "uniqueId"], + ["keyword", "updateSlot"], + ["keyword", "wait"], + ["keyword", "while"], + ["keyword", "write"], + ["keyword", "yield"] +] diff --git a/tests/languages/j/operator_feature.test b/tests/languages/j/operator_feature.test new file mode 100644 index 0000000000..2094f0990b --- /dev/null +++ b/tests/languages/j/operator_feature.test @@ -0,0 +1,14 @@ +_. +=. =: +a. +a: + +---------------------------------------------------- + +[ + ["operator", "_."], + ["operator", "=."], + ["operator", "=:"], + ["operator", "a."], + ["operator", "a:"] +] diff --git a/tests/languages/java/class-name_feature.test b/tests/languages/java/class-name_feature.test index a5929a721c..71530bb5be 100644 --- a/tests/languages/java/class-name_feature.test +++ b/tests/languages/java/class-name_feature.test @@ -1,18 +1,22 @@ class Foo extends foo.bar.Foo { - java.util.List bar(foo.bar.Baz bat) throws java.lang.IOException { - throw new java.lang.UnsupportedOperationException("Not implemented"); + java.util.List bar(foo.bar.Baz bat) throws java.lang.Exception { + var foo = new java.lang.UnsupportedOperationException("Not implemented"); + Exception e = foo; + throw e; } } +ID id; + +String.valueOf(5); + ---------------------------------------------------- [ ["keyword", "class"], - ["class-name", [ - "Foo" - ]], + ["class-name", ["Foo"]], ["keyword", "extends"], ["class-name", [ ["namespace", [ @@ -70,10 +74,13 @@ class Foo extends foo.bar.Foo { "lang", ["punctuation", "."] ]], - "IOException" + "Exception" ]], ["punctuation", "{"], - ["keyword", "throw"], + + ["keyword", "var"], + " foo ", + ["operator", "="], ["keyword", "new"], ["class-name", [ ["namespace", [ @@ -88,7 +95,28 @@ class Foo extends foo.bar.Foo { ["string", "\"Not implemented\""], ["punctuation", ")"], ["punctuation", ";"], + + ["class-name", ["Exception"]], + " e ", + ["operator", "="], + " foo", + ["punctuation", ";"], + + ["keyword", "throw"], + " e", + ["punctuation", ";"], + ["punctuation", "}"], - ["punctuation", "}"] + ["punctuation", "}"], + + ["class-name", ["ID"]], " id", ["punctuation", ";"], + + ["class-name", ["String"]], + ["punctuation", "."], + ["function", "valueOf"], + ["punctuation", "("], + ["number", "5"], + ["punctuation", ")"], + ["punctuation", ";"] ] diff --git a/tests/languages/jolie/builtin_feature.test b/tests/languages/jolie/builtin_feature.test new file mode 100644 index 0000000000..3571e81a8c --- /dev/null +++ b/tests/languages/jolie/builtin_feature.test @@ -0,0 +1,27 @@ +undefined +string +int +void +long +Byte +bool +double +float +char +any + +---------------------------------------------------- + +[ + ["builtin", "undefined"], + ["builtin", "string"], + ["builtin", "int"], + ["builtin", "void"], + ["builtin", "long"], + ["builtin", "Byte"], + ["builtin", "bool"], + ["builtin", "double"], + ["builtin", "float"], + ["builtin", "char"], + ["builtin", "any"] +] diff --git a/tests/languages/jolie/punctuation_feature.test b/tests/languages/jolie/punctuation_feature.test new file mode 100644 index 0000000000..4d0041ea5d --- /dev/null +++ b/tests/languages/jolie/punctuation_feature.test @@ -0,0 +1,8 @@ +, . + +---------------------------------------------------- + +[ + ["punctuation", ","], + ["punctuation", "."] +] diff --git a/tests/languages/jsstacktrace/alias_feature.test b/tests/languages/jsstacktrace/alias_feature.test new file mode 100644 index 0000000000..2c925f21cb --- /dev/null +++ b/tests/languages/jsstacktrace/alias_feature.test @@ -0,0 +1,26 @@ +Foo + at REPLServer.runBound [as eval] (domain.js:293:12) + +---------------------------------------------------- + +[ + ["error-message", "Foo"], + ["stack-frame", [ + ["keyword", "at"], + ["function", [ + "REPLServer", + ["punctuation", "."], + "runBound" + ]], + ["alias", "[as eval]"], + ["punctuation", "("], + ["filename", "domain.js"], + ["line-number", [ + ["punctuation", ":"], + "293", + ["punctuation", ":"], + "12" + ]], + ["punctuation", ")"] + ]] +] diff --git a/tests/languages/jsstacktrace/function_feature.test b/tests/languages/jsstacktrace/function_feature.test index 2b5b51ce0f..f6ec334359 100644 --- a/tests/languages/jsstacktrace/function_feature.test +++ b/tests/languages/jsstacktrace/function_feature.test @@ -1,24 +1,47 @@ Some text at foo.bar + at DenoError (deno/js/errors.ts:22:5) + at new (_http_common.js:159:16) ---------------------------------------------------- [ ["error-message", "Some text"], - [ - "stack-frame", - [ - ["keyword", "at"], - [ - "function", - [ - "foo", - [ "punctuation", "." ], - "bar" - ] - ] - ] - ] + ["stack-frame", [ + ["keyword", "at"], + ["function", [ + "foo", + ["punctuation", "."], + "bar" + ]] + ]], + ["stack-frame", [ + ["keyword", "at"], + ["function", ["DenoError"]], + ["punctuation", "("], + ["filename", "deno/js/errors.ts"], + ["line-number", [ + ["punctuation", ":"], + "22", + ["punctuation", ":"], + "5" + ]], + ["punctuation", ")"] + ]], + ["stack-frame", [ + ["keyword", "at"], + ["keyword", "new"], + ["function", [""]], + ["punctuation", "("], + ["filename", "_http_common.js"], + ["line-number", [ + ["punctuation", ":"], + "159", + ["punctuation", ":"], + "16" + ]], + ["punctuation", ")"] + ]] ] ---------------------------------------------------- diff --git a/tests/languages/jsstacktrace/notmycode_feature.test b/tests/languages/jsstacktrace/notmycode_feature.test index a853ca5eb7..05fa15c2a3 100644 --- a/tests/languages/jsstacktrace/notmycode_feature.test +++ b/tests/languages/jsstacktrace/notmycode_feature.test @@ -1,12 +1,39 @@ Some text + at new Foo (foo.js:3:7) at processTicksAndRejections (internal/process/task_queues.js:98:32) +Foo + at throwsA (:1:23) + at :1:13 + ---------------------------------------------------- [ ["error-message", "Some text"], + ["stack-frame", [ + ["keyword", "at"], + ["keyword", "new"], + ["function", ["Foo"]], + ["punctuation", "("], + ["filename", "foo.js"], + ["line-number", [ + ["punctuation", ":"], + "3", + ["punctuation", ":"], + "7" + ]], + ["punctuation", ")"] + ]], ["stack-frame", [ ["not-my-code", "at processTicksAndRejections (internal/process/task_queues.js:98:32)"] + ]], + + ["error-message", "Foo"], + ["stack-frame", [ + ["not-my-code", "at throwsA (:1:23)"] + ]], + ["stack-frame", [ + ["not-my-code", "at :1:13"] ]] ] diff --git a/tests/languages/kumir/system-variable_feature.test b/tests/languages/kumir/system-variable_feature.test new file mode 100644 index 0000000000..ee3a545089 --- /dev/null +++ b/tests/languages/kumir/system-variable_feature.test @@ -0,0 +1,7 @@ +знач + +---------------------------------------------------- + +[ + ["system-variable", "знач"] +] diff --git a/tests/languages/kumir/type_feature.test b/tests/languages/kumir/type_feature.test index d5e6731f14..02ad78ee0f 100644 --- a/tests/languages/kumir/type_feature.test +++ b/tests/languages/kumir/type_feature.test @@ -4,6 +4,11 @@ цел таб целтаб +компл +сканкод +файл +цвет + ---------------------------------------------------- [ @@ -11,7 +16,12 @@ ["type", "цел"], ["type", "цел таб"], ["type", "цел таб"], - ["type", "целтаб"] + ["type", "целтаб"], + + ["type", "компл"], + ["type", "сканкод"], + ["type", "файл"], + ["type", "цвет"] ] ---------------------------------------------------- diff --git a/tests/languages/less/variable_feature.test b/tests/languages/less/variable_feature.test new file mode 100644 index 0000000000..eb9152db0b --- /dev/null +++ b/tests/languages/less/variable_feature.test @@ -0,0 +1,9 @@ +@foo +@@foo + +---------------------------------------------------- + +[ + ["variable", "@foo"], + ["variable", "@@foo"] +] diff --git a/tests/languages/lilypond/class-name_feature.test b/tests/languages/lilypond/class-name_feature.test new file mode 100644 index 0000000000..6614ab30f5 --- /dev/null +++ b/tests/languages/lilypond/class-name_feature.test @@ -0,0 +1,15 @@ +\new Staff \hornNotes + +---------------------------------------------------- + +[ + ["keyword", [ + ["punctuation", "\\"], + "new" + ]], + ["class-name", "Staff"], + ["keyword", [ + ["punctuation", "\\"], + "hornNotes" + ]] +] diff --git a/tests/languages/livescript+pug/livescript_inclusion.test b/tests/languages/livescript+pug/livescript_inclusion.test new file mode 100644 index 0000000000..ae2c878436 --- /dev/null +++ b/tests/languages/livescript+pug/livescript_inclusion.test @@ -0,0 +1,28 @@ +:livescript + "#foo #{ if /test/ == 'test' then 3 else 4}" + +---------------------------------------------------- + +[ + ["filter-livescript", [ + ["filter-name", ":livescript"], + ["interpolated-string", [ + ["string", "\""], + ["variable", "#foo"], + ["string", " "], + ["interpolation", [ + ["interpolation-punctuation", "#{"], + ["keyword", "if"], + ["regex", "/test/"], + ["operator", "=="], + ["string", "'test'"], + ["keyword", "then"], + ["number", "3"], + ["keyword", "else"], + ["number", "4"], + ["interpolation-punctuation", "}"] + ]], + ["string", "\""] + ]] + ]] +] diff --git a/tests/languages/livescript/punctuation_feature.test b/tests/languages/livescript/punctuation_feature.test new file mode 100644 index 0000000000..4e419cc8aa --- /dev/null +++ b/tests/languages/livescript/punctuation_feature.test @@ -0,0 +1,18 @@ +( ) { } [ ] | ., : ; ` + +---------------------------------------------------- + +[ + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", "{"], + ["punctuation", "}"], + ["punctuation", "["], + ["punctuation", "]"], + ["punctuation", "|"], + ["punctuation", "."], + ["punctuation", ","], + ["punctuation", ":"], + ["punctuation", ";"], + ["punctuation", "`"] +] diff --git a/tests/languages/log/email_feature.test b/tests/languages/log/email_feature.test new file mode 100644 index 0000000000..19ffd0e285 --- /dev/null +++ b/tests/languages/log/email_feature.test @@ -0,0 +1,10 @@ +foo.bar@mail.com ... + +---------------------------------------------------- + +[ + ["email", "foo.bar@mail.com"], + ["punctuation", "."], + ["punctuation", "."], + ["punctuation", "."] +] diff --git a/tests/languages/log/level_feature.test b/tests/languages/log/level_feature.test index ab47dbb8db..0ea1163dbd 100644 --- a/tests/languages/log/level_feature.test +++ b/tests/languages/log/level_feature.test @@ -11,19 +11,24 @@ SEVERE WARN WARNING +WRN DISPLAY INFO +INF NOTICE STATUS +DBG DEBUG FINE FINER FINEST TRACE +TRC VERBOSE +VRB ---------------------------------------------------- @@ -41,17 +46,22 @@ VERBOSE ["level", "WARN"], ["level", "WARNING"], + ["level", "WRN"], ["level", "DISPLAY"], ["level", "INFO"], + ["level", "INF"], ["level", "NOTICE"], ["level", "STATUS"], + ["level", "DBG"], ["level", "DEBUG"], ["level", "FINE"], ["level", "FINER"], ["level", "FINEST"], ["level", "TRACE"], - ["level", "VERBOSE"] -] \ No newline at end of file + ["level", "TRC"], + ["level", "VERBOSE"], + ["level", "VRB"] +] diff --git a/tests/languages/log/mac-address_feature.test b/tests/languages/log/mac-address_feature.test new file mode 100644 index 0000000000..24424a2afd --- /dev/null +++ b/tests/languages/log/mac-address_feature.test @@ -0,0 +1,7 @@ +01:23:45:67:89:ab + +---------------------------------------------------- + +[ + ["mac-address", "01:23:45:67:89:ab"] +] diff --git a/tests/languages/lolcode/punctuation_feature.test b/tests/languages/lolcode/punctuation_feature.test new file mode 100644 index 0000000000..3b865b7bec --- /dev/null +++ b/tests/languages/lolcode/punctuation_feature.test @@ -0,0 +1,10 @@ +... … , ! + +---------------------------------------------------- + +[ + ["punctuation", "..."], + ["punctuation", "…"], + ["punctuation", ","], + ["punctuation", "!"] +] diff --git a/tests/languages/lolcode/string_feature.test b/tests/languages/lolcode/string_feature.test index e3a25a9cda..67555db892 100644 --- a/tests/languages/lolcode/string_feature.test +++ b/tests/languages/lolcode/string_feature.test @@ -2,6 +2,8 @@ "foobar" "fo:"o" "foo:)bar:>baz" +"foo:(FF)baz" +"foo:[bar]baz" "foo:{bar}baz" "foo BTW bar" BTW and out @@ -9,12 +11,15 @@ [ ["string", ["\"\""]], + ["string", ["\"foobar\""]], + ["string", [ "\"fo", ["symbol", ":\""], "o\"" ]], + ["string", [ "\"foo", ["symbol", ":)"], @@ -22,15 +27,29 @@ ["symbol", ":>"], "baz\"" ]], + + ["string", [ + "\"foo", + ["symbol", ":(FF)"], + "baz\"" + ]], + + ["string", [ + "\"foo", + ["symbol", ":[bar]"], + "baz\"" + ]], + ["string", [ "\"foo", ["variable", ":{bar}"], "baz\"" ]], + ["string", ["\"foo BTW bar\""]], ["comment", "BTW and out"] ] ---------------------------------------------------- -Checks for strings, with variables and symbols in them. \ No newline at end of file +Checks for strings, with variables and symbols in them. diff --git a/tests/languages/markup+http/text-xml_inclusion.test b/tests/languages/markup+http/text-xml_inclusion.test new file mode 100644 index 0000000000..ecc0c71c6b --- /dev/null +++ b/tests/languages/markup+http/text-xml_inclusion.test @@ -0,0 +1,30 @@ +Content-type: text/xml + + + +---------------------------------------------------- + +[ + ["header-name", "Content-type:"], + " text/xml", + ["text-xml", [ + ["tag", [ + ["tag", [ + ["punctuation", "<"], + "foo" + ]], + ["punctuation", ">"] + ]], + ["tag", [ + ["tag", [ + ["punctuation", ""] + ]] + ]] +] + +---------------------------------------------------- + +Checks for XML content in HTTP. diff --git a/tests/languages/moonscript/function_feature.test b/tests/languages/moonscript/function_feature.test new file mode 100644 index 0000000000..697ac714f4 --- /dev/null +++ b/tests/languages/moonscript/function_feature.test @@ -0,0 +1,715 @@ +_G +_VERSION +assert +collectgarbage +coroutine.create +coroutine.resume +coroutine.running +coroutine.status +coroutine.wrap +coroutine.yield +debug.debug +debug.getfenv +debug.gethook +debug.getinfo +debug.getlocal +debug.getmetatable +debug.getregistry +debug.getupvalue +debug.setfenv +debug.sethook +debug.setlocal +debug.setmetatable +debug.setupvalue +debug.traceback +dofile +error +getfenv +getmetatable +io.close +io.flush +io.input +io.lines +io.open +io.output +io.popen +io.read +io.stderr +io.stdin +io.stdout +io.tmpfile +io.type +io.write +ipairs +load +loadfile +loadstring +math.abs +math.acos +math.asin +math.atan +math.atan2 +math.ceil +math.cos +math.cosh +math.deg +math.exp +math.floor +math.fmod +math.frexp +math.ldexp +math.log +math.log10 +math.max +math.min +math.modf +math.pi +math.pow +math.rad +math.random +math.randomseed +math.sin +math.sinh +math.sqrt +math.tan +math.tanh +module +next +os.clock +os.date +os.difftime +os.execute +os.exit +os.getenv +os.remove +os.rename +os.setlocale +os.time +os.tmpname +package.cpath +package.loaded +package.loadlib +package.path +package.preload +package.seeall +pairs +pcall +print +rawequal +rawget +rawset +require +select +setfenv +setmetatable +string.byte +string.char +string.dump +string.find +string.format +string.gmatch +string.gsub +string.len +string.lower +string.match +string.rep +string.reverse +string.sub +string.upper +table.concat +table.insert +table.maxn +table.remove +table.sort +tonumber +tostring +type +unpack +xpcall + +---------------------------------------------------- + +[ + ["function", [ + "_G" + ]], + ["function", [ + "_VERSION" + ]], + ["function", [ + "assert" + ]], + ["function", [ + "collectgarbage" + ]], + ["function", [ + "coroutine", + ["punctuation", "."], + "create" + ]], + ["function", [ + "coroutine", + ["punctuation", "."], + "resume" + ]], + ["function", [ + "coroutine", + ["punctuation", "."], + "running" + ]], + ["function", [ + "coroutine", + ["punctuation", "."], + "status" + ]], + ["function", [ + "coroutine", + ["punctuation", "."], + "wrap" + ]], + ["function", [ + "coroutine", + ["punctuation", "."], + "yield" + ]], + ["function", [ + "debug", + ["punctuation", "."], + "debug" + ]], + ["function", [ + "debug", + ["punctuation", "."], + "getfenv" + ]], + ["function", [ + "debug", + ["punctuation", "."], + "gethook" + ]], + ["function", [ + "debug", + ["punctuation", "."], + "getinfo" + ]], + ["function", [ + "debug", + ["punctuation", "."], + "getlocal" + ]], + ["function", [ + "debug", + ["punctuation", "."], + "getmetatable" + ]], + ["function", [ + "debug", + ["punctuation", "."], + "getregistry" + ]], + ["function", [ + "debug", + ["punctuation", "."], + "getupvalue" + ]], + ["function", [ + "debug", + ["punctuation", "."], + "setfenv" + ]], + ["function", [ + "debug", + ["punctuation", "."], + "sethook" + ]], + ["function", [ + "debug", + ["punctuation", "."], + "setlocal" + ]], + ["function", [ + "debug", + ["punctuation", "."], + "setmetatable" + ]], + ["function", [ + "debug", + ["punctuation", "."], + "setupvalue" + ]], + ["function", [ + "debug", + ["punctuation", "."], + "traceback" + ]], + ["function", [ + "dofile" + ]], + ["function", [ + "error" + ]], + ["function", [ + "getfenv" + ]], + ["function", [ + "getmetatable" + ]], + ["function", [ + "io", + ["punctuation", "."], + "close" + ]], + ["function", [ + "io", + ["punctuation", "."], + "flush" + ]], + ["function", [ + "io", + ["punctuation", "."], + "input" + ]], + ["function", [ + "io", + ["punctuation", "."], + "lines" + ]], + ["function", [ + "io", + ["punctuation", "."], + "open" + ]], + ["function", [ + "io", + ["punctuation", "."], + "output" + ]], + ["function", [ + "io", + ["punctuation", "."], + "popen" + ]], + ["function", [ + "io", + ["punctuation", "."], + "read" + ]], + ["function", [ + "io", + ["punctuation", "."], + "stderr" + ]], + ["function", [ + "io", + ["punctuation", "."], + "stdin" + ]], + ["function", [ + "io", + ["punctuation", "."], + "stdout" + ]], + ["function", [ + "io", + ["punctuation", "."], + "tmpfile" + ]], + ["function", [ + "io", + ["punctuation", "."], + "type" + ]], + ["function", [ + "io", + ["punctuation", "."], + "write" + ]], + ["function", [ + "ipairs" + ]], + ["function", [ + "load" + ]], + ["function", [ + "loadfile" + ]], + ["function", [ + "loadstring" + ]], + ["function", [ + "math", + ["punctuation", "."], + "abs" + ]], + ["function", [ + "math", + ["punctuation", "."], + "acos" + ]], + ["function", [ + "math", + ["punctuation", "."], + "asin" + ]], + ["function", [ + "math", + ["punctuation", "."], + "atan" + ]], + ["function", [ + "math", + ["punctuation", "."], + "atan2" + ]], + ["function", [ + "math", + ["punctuation", "."], + "ceil" + ]], + ["function", [ + "math", + ["punctuation", "."], + "cos" + ]], + ["function", [ + "math", + ["punctuation", "."], + "cosh" + ]], + ["function", [ + "math", + ["punctuation", "."], + "deg" + ]], + ["function", [ + "math", + ["punctuation", "."], + "exp" + ]], + ["function", [ + "math", + ["punctuation", "."], + "floor" + ]], + ["function", [ + "math", + ["punctuation", "."], + "fmod" + ]], + ["function", [ + "math", + ["punctuation", "."], + "frexp" + ]], + ["function", [ + "math", + ["punctuation", "."], + "ldexp" + ]], + ["function", [ + "math", + ["punctuation", "."], + "log" + ]], + ["function", [ + "math", + ["punctuation", "."], + "log10" + ]], + ["function", [ + "math", + ["punctuation", "."], + "max" + ]], + ["function", [ + "math", + ["punctuation", "."], + "min" + ]], + ["function", [ + "math", + ["punctuation", "."], + "modf" + ]], + ["function", [ + "math", + ["punctuation", "."], + "pi" + ]], + ["function", [ + "math", + ["punctuation", "."], + "pow" + ]], + ["function", [ + "math", + ["punctuation", "."], + "rad" + ]], + ["function", [ + "math", + ["punctuation", "."], + "random" + ]], + ["function", [ + "math", + ["punctuation", "."], + "randomseed" + ]], + ["function", [ + "math", + ["punctuation", "."], + "sin" + ]], + ["function", [ + "math", + ["punctuation", "."], + "sinh" + ]], + ["function", [ + "math", + ["punctuation", "."], + "sqrt" + ]], + ["function", [ + "math", + ["punctuation", "."], + "tan" + ]], + ["function", [ + "math", + ["punctuation", "."], + "tanh" + ]], + ["function", [ + "module" + ]], + ["function", [ + "next" + ]], + ["function", [ + "os", + ["punctuation", "."], + "clock" + ]], + ["function", [ + "os", + ["punctuation", "."], + "date" + ]], + ["function", [ + "os", + ["punctuation", "."], + "difftime" + ]], + ["function", [ + "os", + ["punctuation", "."], + "execute" + ]], + ["function", [ + "os", + ["punctuation", "."], + "exit" + ]], + ["function", [ + "os", + ["punctuation", "."], + "getenv" + ]], + ["function", [ + "os", + ["punctuation", "."], + "remove" + ]], + ["function", [ + "os", + ["punctuation", "."], + "rename" + ]], + ["function", [ + "os", + ["punctuation", "."], + "setlocale" + ]], + ["function", [ + "os", + ["punctuation", "."], + "time" + ]], + ["function", [ + "os", + ["punctuation", "."], + "tmpname" + ]], + ["function", [ + "package", + ["punctuation", "."], + "cpath" + ]], + ["function", [ + "package", + ["punctuation", "."], + "loaded" + ]], + ["function", [ + "package", + ["punctuation", "."], + "loadlib" + ]], + ["function", [ + "package", + ["punctuation", "."], + "path" + ]], + ["function", [ + "package", + ["punctuation", "."], + "preload" + ]], + ["function", [ + "package", + ["punctuation", "."], + "seeall" + ]], + ["function", [ + "pairs" + ]], + ["function", [ + "pcall" + ]], + ["function", [ + "print" + ]], + ["function", [ + "rawequal" + ]], + ["function", [ + "rawget" + ]], + ["function", [ + "rawset" + ]], + ["function", [ + "require" + ]], + ["function", [ + "select" + ]], + ["function", [ + "setfenv" + ]], + ["function", [ + "setmetatable" + ]], + ["function", [ + "string", + ["punctuation", "."], + "byte" + ]], + ["function", [ + "string", + ["punctuation", "."], + "char" + ]], + ["function", [ + "string", + ["punctuation", "."], + "dump" + ]], + ["function", [ + "string", + ["punctuation", "."], + "find" + ]], + ["function", [ + "string", + ["punctuation", "."], + "format" + ]], + ["function", [ + "string", + ["punctuation", "."], + "gmatch" + ]], + ["function", [ + "string", + ["punctuation", "."], + "gsub" + ]], + ["function", [ + "string", + ["punctuation", "."], + "len" + ]], + ["function", [ + "string", + ["punctuation", "."], + "lower" + ]], + ["function", [ + "string", + ["punctuation", "."], + "match" + ]], + ["function", [ + "string", + ["punctuation", "."], + "rep" + ]], + ["function", [ + "string", + ["punctuation", "."], + "reverse" + ]], + ["function", [ + "string", + ["punctuation", "."], + "sub" + ]], + ["function", [ + "string", + ["punctuation", "."], + "upper" + ]], + ["function", [ + "table", + ["punctuation", "."], + "concat" + ]], + ["function", [ + "table", + ["punctuation", "."], + "insert" + ]], + ["function", [ + "table", + ["punctuation", "."], + "maxn" + ]], + ["function", [ + "table", + ["punctuation", "."], + "remove" + ]], + ["function", [ + "table", + ["punctuation", "."], + "sort" + ]], + ["function", [ + "tonumber" + ]], + ["function", [ + "tostring" + ]], + ["function", [ + "type" + ]], + ["function", [ + "unpack" + ]], + ["function", [ + "xpcall" + ]] +] diff --git a/tests/languages/nevod/full_feature.test b/tests/languages/nevod/full_feature.test new file mode 100644 index 0000000000..ba0dbbf099 --- /dev/null +++ b/tests/languages/nevod/full_feature.test @@ -0,0 +1,280 @@ +@namespace Basic +{ + @search @pattern Url(Domain, Path, Query, Anchor) = + Method + Domain:Url.Domain + ?Port + ?Path:Url.Path + + ?Query:Url.Query + ?Anchor:Url.Anchor + @where { + Method = {'http', 'https' , 'ftp', 'mailto', 'file', 'data', + 'irc'} + '://'; + Domain = Word + [1+ '.' + Word + [0+ {Word, '_', '-'}]]; + Port = ':' + Num; + Path = ?'/' + [0+ {Word, '/', '_', '+', '-', '%', '.'}]; + + Query = '?' + ?(Param + [0+ '&' + Param]) + @where + { + Param = Identifier + '=' + Identifier + @where + { + Identifier = {Alpha, AlphaNum, '_'} + [0+ {Word, '_'}]; + }; + }; + + Anchor(Value) = '#' + Value:{Word}; + }; +} + +---------------------------------------------------- + +[ + ["keyword", "@namespace"], + ["namespace", "Basic"], + + ["operator", "{"], + + ["keyword", "@search"], + ["keyword", "@pattern"], + ["pattern", [ + ["pattern-name", "Url"], + ["fields", [ + ["punctuation", "("], + ["field-name", "Domain"], + ["punctuation", ","], + ["field-name", "Path"], + ["punctuation", ","], + ["field-name", "Query"], + ["punctuation", ","], + ["field-name", "Anchor"], + ["punctuation", ")"] + ]] + ]], + ["operator", "="], + + ["name", "Method"], + ["operator", "+"], + ["field-capture", [ + ["field-name", "Domain"], + ["colon", ":"] + ]], + ["name", "Url.Domain"], + ["operator", "+"], + ["operator", "?"], + ["name", "Port"], + ["operator", "+"], + ["operator", "?"], + ["field-capture", [ + ["field-name", "Path"], + ["colon", ":"] + ]], + ["name", "Url.Path"], + ["operator", "+"], + + ["operator", "?"], + ["field-capture", [ + ["field-name", "Query"], + ["colon", ":"] + ]], + ["name", "Url.Query"], + ["operator", "+"], + ["operator", "?"], + ["field-capture", [ + ["field-name", "Anchor"], + ["colon", ":"] + ]], + ["name", "Url.Anchor"], + + ["keyword", "@where"], + ["operator", "{"], + + ["pattern", [ + ["pattern-name", "Method"] + ]], + ["operator", "="], + ["operator", "{"], + ["string", ["'http'"]], + ["punctuation", ","], + ["string", ["'https'"]], + ["punctuation", ","], + ["string", ["'ftp'"]], + ["punctuation", ","], + ["string", ["'mailto'"]], + ["punctuation", ","], + ["string", ["'file'"]], + ["punctuation", ","], + ["string", ["'data'"]], + ["punctuation", ","], + + ["string", ["'irc'"]], + ["operator", "}"], + ["operator", "+"], + ["string", ["'://'"]], + ["punctuation", ";"], + + ["pattern", [ + ["pattern-name", "Domain"] + ]], + ["operator", "="], + ["standard-pattern", [ + ["standard-pattern-name", "Word"] + ]], + ["operator", "+"], + ["operator", "["], + ["quantifier", "1+"], + ["string", ["'.'"]], + ["operator", "+"], + ["standard-pattern", [ + ["standard-pattern-name", "Word"] + ]], + ["operator", "+"], + ["operator", "["], + ["quantifier", "0+"], + ["operator", "{"], + ["standard-pattern", [ + ["standard-pattern-name", "Word"] + ]], + ["punctuation", ","], + ["string", ["'_'"]], + ["punctuation", ","], + ["string", ["'-'"]], + ["operator", "}"], + ["operator", "]"], + ["operator", "]"], + ["punctuation", ";"], + + ["pattern", [ + ["pattern-name", "Port"] + ]], + ["operator", "="], + ["string", ["':'"]], + ["operator", "+"], + ["standard-pattern", [ + ["standard-pattern-name", "Num"] + ]], + ["punctuation", ";"], + + ["pattern", [ + ["pattern-name", "Path"] + ]], + ["operator", "="], + ["operator", "?"], + ["string", ["'/'"]], + ["operator", "+"], + ["operator", "["], + ["quantifier", "0+"], + ["operator", "{"], + ["standard-pattern", [ + ["standard-pattern-name", "Word"] + ]], + ["punctuation", ","], + ["string", ["'/'"]], + ["punctuation", ","], + ["string", ["'_'"]], + ["punctuation", ","], + ["string", ["'+'"]], + ["punctuation", ","], + ["string", ["'-'"]], + ["punctuation", ","], + ["string", ["'%'"]], + ["punctuation", ","], + ["string", ["'.'"]], + ["operator", "}"], + ["operator", "]"], + ["punctuation", ";"], + + ["pattern", [ + ["pattern-name", "Query"] + ]], + ["operator", "="], + ["string", ["'?'"]], + ["operator", "+"], + ["operator", "?"], + ["punctuation", "("], + ["name", "Param"], + ["operator", "+"], + ["operator", "["], + ["quantifier", "0+"], + ["string", ["'&'"]], + ["operator", "+"], + ["name", "Param"], + ["operator", "]"], + ["punctuation", ")"], + + ["keyword", "@where"], + + ["operator", "{"], + + ["pattern", [ + ["pattern-name", "Param"] + ]], + ["operator", "="], + ["name", "Identifier"], + ["operator", "+"], + ["string", ["'='"]], + ["operator", "+"], + ["name", "Identifier"], + + ["keyword", "@where"], + + ["operator", "{"], + + ["pattern", [ + ["pattern-name", "Identifier"] + ]], + ["operator", "="], + ["operator", "{"], + ["standard-pattern", [ + ["standard-pattern-name", "Alpha"] + ]], + ["punctuation", ","], + ["standard-pattern", [ + ["standard-pattern-name", "AlphaNum"] + ]], + ["punctuation", ","], + ["string", ["'_'"]], + ["operator", "}"], + ["operator", "+"], + ["operator", "["], + ["quantifier", "0+"], + ["operator", "{"], + ["standard-pattern", [ + ["standard-pattern-name", "Word"] + ]], + ["punctuation", ","], + ["string", ["'_'"]], + ["operator", "}"], + ["operator", "]"], + ["punctuation", ";"], + + ["operator", "}"], + ["punctuation", ";"], + + ["operator", "}"], + ["punctuation", ";"], + + ["pattern", [ + ["pattern-name", "Anchor"], + ["fields", [ + ["punctuation", "("], + ["field-name", "Value"], + ["punctuation", ")"] + ]] + ]], + ["operator", "="], + ["string", ["'#'"]], + ["operator", "+"], + ["field-capture", [ + ["field-name", "Value"], + ["colon", ":"] + ]], + ["operator", "{"], + ["standard-pattern", [ + ["standard-pattern-name", "Word"] + ]], + ["operator", "}"], + ["punctuation", ";"], + + ["operator", "}"], + ["punctuation", ";"], + + ["operator", "}"] +] diff --git a/tests/languages/nevod/package_feature.test b/tests/languages/nevod/package_feature.test new file mode 100644 index 0000000000..bc6b83b379 --- /dev/null +++ b/tests/languages/nevod/package_feature.test @@ -0,0 +1,79 @@ +@namespace Basic +{ + @search @pattern GUID = Word(8) + [3 '-' + Word(4)] + '-' + Word(12); +} + +@require "GUID.np"; + +@namespace Basic +{ + @search @pattern GUID-in-Braces = '{' + GUID + '}'; +} + +---------------------------------------------------- + +[ + ["keyword", "@namespace"], + ["namespace", "Basic"], + + ["operator", "{"], + + ["keyword", "@search"], + ["keyword", "@pattern"], + ["pattern", [ + ["pattern-name", "GUID"] + ]], + ["operator", "="], + ["standard-pattern", [ + ["standard-pattern-name", "Word"], + ["punctuation", "("], + ["quantifier", "8"], + ["punctuation", ")"] + ]], + ["operator", "+"], + ["operator", "["], + ["quantifier", "3"], + ["string", ["'-'"]], + ["operator", "+"], + ["standard-pattern", [ + ["standard-pattern-name", "Word"], + ["punctuation", "("], + ["quantifier", "4"], + ["punctuation", ")"] + ]], + ["operator", "]"], + ["operator", "+"], + ["string", ["'-'"]], + ["operator", "+"], + ["standard-pattern", [ + ["standard-pattern-name", "Word"], + ["punctuation", "("], + ["quantifier", "12"], + ["punctuation", ")"] + ]], + ["punctuation", ";"], + + ["operator", "}"], + + ["keyword", "@require"], ["string", ["\"GUID.np\""]], ["punctuation", ";"], + + ["keyword", "@namespace"], + ["namespace", "Basic"], + + ["operator", "{"], + + ["keyword", "@search"], + ["keyword", "@pattern"], + ["pattern", [ + ["pattern-name", "GUID-in-Braces"] + ]], + ["operator", "="], + ["string", ["'{'"]], + ["operator", "+"], + ["name", "GUID"], + ["operator", "+"], + ["string", ["'}'"]], + ["punctuation", ";"], + + ["operator", "}"] +] diff --git a/tests/languages/nevod/pattern_feature.test b/tests/languages/nevod/pattern_feature.test new file mode 100644 index 0000000000..91d3924dc5 --- /dev/null +++ b/tests/languages/nevod/pattern_feature.test @@ -0,0 +1,282 @@ +P = "text"; +P = Alpha; +P2 = P1; P1 = Word; +P = A + B; +P = {A, B}; +P = [1+ A]; + +#P = "text"; + +@pattern P = Alpha; +@search @pattern P = Alpha; +@pattern P = W @where { @pattern W = Word; }; +@pattern #P = W + S @where { @pattern #W = Word; @pattern S = Space; }; + +#P(X, Y) = X: A ... Y: B; +#P(X) = A .. X .. B; +#P1(X, Y) = P2(X: Q, Y: S); +#P(X) = X: Word ... X; +#P(X, Y) = {X: Punct + X, Y: Symbol + Y}; + +---------------------------------------------------- + +[ + ["pattern", [ + ["pattern-name", "P"] + ]], + ["operator", "="], + ["string", ["\"text\""]], + ["punctuation", ";"], + + ["pattern", [ + ["pattern-name", "P"] + ]], + ["operator", "="], + ["standard-pattern", [ + ["standard-pattern-name", "Alpha"] + ]], + ["punctuation", ";"], + + ["pattern", [ + ["pattern-name", "P2"] + ]], + ["operator", "="], + ["name", "P1"], + ["punctuation", ";"], + ["pattern", [ + ["pattern-name", "P1"] + ]], + ["operator", "="], + ["standard-pattern", [ + ["standard-pattern-name", "Word"] + ]], + ["punctuation", ";"], + + ["pattern", [ + ["pattern-name", "P"] + ]], + ["operator", "="], + ["name", "A"], + ["operator", "+"], + ["name", "B"], + ["punctuation", ";"], + + ["pattern", [ + ["pattern-name", "P"] + ]], + ["operator", "="], + ["operator", "{"], + ["name", "A"], + ["punctuation", ","], + ["name", "B"], + ["operator", "}"], + ["punctuation", ";"], + + ["pattern", [ + ["pattern-name", "P"] + ]], + ["operator", "="], + ["operator", "["], + ["quantifier", "1+"], + ["name", "A"], + ["operator", "]"], + ["punctuation", ";"], + + ["pattern", [ + ["pattern-name", "#P"] + ]], + ["operator", "="], + ["string", ["\"text\""]], + ["punctuation", ";"], + + ["keyword", "@pattern"], + ["pattern", [ + ["pattern-name", "P"] + ]], + ["operator", "="], + ["standard-pattern", [ + ["standard-pattern-name", "Alpha"] + ]], + ["punctuation", ";"], + + ["keyword", "@search"], + ["keyword", "@pattern"], + ["pattern", [ + ["pattern-name", "P"] + ]], + ["operator", "="], + ["standard-pattern", [ + ["standard-pattern-name", "Alpha"] + ]], + ["punctuation", ";"], + + ["keyword", "@pattern"], + ["pattern", [ + ["pattern-name", "P"] + ]], + ["operator", "="], + ["name", "W"], + ["keyword", "@where"], + ["operator", "{"], + ["keyword", "@pattern"], + ["pattern", [ + ["pattern-name", "W"] + ]], + ["operator", "="], + ["standard-pattern", [ + ["standard-pattern-name", "Word"] + ]], + ["punctuation", ";"], + ["operator", "}"], + ["punctuation", ";"], + + ["keyword", "@pattern"], + ["pattern", [ + ["pattern-name", "#P"] + ]], + ["operator", "="], + ["name", "W"], + ["operator", "+"], + ["name", "S"], + ["keyword", "@where"], + ["operator", "{"], + ["keyword", "@pattern"], + ["pattern", [ + ["pattern-name", "#W"] + ]], + ["operator", "="], + ["standard-pattern", [ + ["standard-pattern-name", "Word"] + ]], + ["punctuation", ";"], + ["keyword", "@pattern"], + ["pattern", [ + ["pattern-name", "S"] + ]], + ["operator", "="], + ["standard-pattern", [ + ["standard-pattern-name", "Space"] + ]], + ["punctuation", ";"], + ["operator", "}"], + ["punctuation", ";"], + + ["pattern", [ + ["pattern-name", "#P"], + ["fields", [ + ["punctuation", "("], + ["field-name", "X"], + ["punctuation", ","], + ["field-name", "Y"], + ["punctuation", ")"] + ]] + ]], + ["operator", "="], + ["field-capture", [ + ["field-name", "X"], + ["colon", ":"] + ]], + ["name", "A"], + ["operator", "..."], + ["field-capture", [ + ["field-name", "Y"], + ["colon", ":"] + ]], + ["name", "B"], + ["punctuation", ";"], + + ["pattern", [ + ["pattern-name", "#P"], + ["fields", [ + ["punctuation", "("], + ["field-name", "X"], + ["punctuation", ")"] + ]] + ]], + ["operator", "="], + ["name", "A"], + ["operator", ".."], + ["name", "X"], + ["operator", ".."], + ["name", "B"], + ["punctuation", ";"], + + ["pattern", [ + ["pattern-name", "#P1"], + ["fields", [ + ["punctuation", "("], + ["field-name", "X"], + ["punctuation", ","], + ["field-name", "Y"], + ["punctuation", ")"] + ]] + ]], + ["operator", "="], + ["name", "P2"], + ["punctuation", "("], + ["field-capture", [ + ["field-name", "X"], + ["colon", ":"], + ["field-name", "Q"], + ", ", + ["field-name", "Y"], + ["colon", ":"], + ["field-name", "S"] + ]], + ["punctuation", ")"], + ["punctuation", ";"], + + ["pattern", [ + ["pattern-name", "#P"], + ["fields", [ + ["punctuation", "("], + ["field-name", "X"], + ["punctuation", ")"] + ]] + ]], + ["operator", "="], + ["field-capture", [ + ["field-name", "X"], + ["colon", ":"] + ]], + ["standard-pattern", [ + ["standard-pattern-name", "Word"] + ]], + ["operator", "..."], + ["name", "X"], + ["punctuation", ";"], + + ["pattern", [ + ["pattern-name", "#P"], + ["fields", [ + ["punctuation", "("], + ["field-name", "X"], + ["punctuation", ","], + ["field-name", "Y"], + ["punctuation", ")"] + ]] + ]], + ["operator", "="], + ["operator", "{"], + ["field-capture", [ + ["field-name", "X"], + ["colon", ":"] + ]], + ["standard-pattern", [ + ["standard-pattern-name", "Punct"] + ]], + ["operator", "+"], + ["name", "X"], + ["punctuation", ","], + ["field-capture", [ + ["field-name", "Y"], + ["colon", ":"] + ]], + ["standard-pattern", [ + ["standard-pattern-name", "Symbol"] + ]], + ["operator", "+"], + ["name", "Y"], + ["operator", "}"], + ["punctuation", ";"] +] diff --git a/tests/languages/nevod/search_feature.test b/tests/languages/nevod/search_feature.test new file mode 100644 index 0000000000..c3dcf45207 --- /dev/null +++ b/tests/languages/nevod/search_feature.test @@ -0,0 +1,95 @@ +@namespace Basic +{ + @search @pattern GUID-in-Braces = '{' + GUID + '}'; +} + +@search Basic.GUID; +@search Basic.GUID-in-Braces; + +@namespace Basic +{ + @pattern GUID-in-Braces = '{' + GUID + '}'; +} + +@require "GUID.np"; + +@search Basic.*; + +@namespace Basic +{ + @pattern GUID-in-Braces = '{' + GUID + '}'; +} + +---------------------------------------------------- + +[ + ["keyword", "@namespace"], + ["namespace", "Basic"], + + ["operator", "{"], + + ["keyword", "@search"], + ["keyword", "@pattern"], + ["pattern", [ + ["pattern-name", "GUID-in-Braces"] + ]], + ["operator", "="], + ["string", ["'{'"]], + ["operator", "+"], + ["name", "GUID"], + ["operator", "+"], + ["string", ["'}'"]], + ["punctuation", ";"], + + ["operator", "}"], + + ["keyword", "@search"], + ["search", "Basic.GUID"], + ["punctuation", ";"], + + ["keyword", "@search"], + ["search", "Basic.GUID-in-Braces"], + ["punctuation", ";"], + + ["keyword", "@namespace"], + ["namespace", "Basic"], + + ["operator", "{"], + + ["keyword", "@pattern"], + ["pattern", [ + ["pattern-name", "GUID-in-Braces"] + ]], + ["operator", "="], + ["string", ["'{'"]], + ["operator", "+"], + ["name", "GUID"], + ["operator", "+"], + ["string", ["'}'"]], + ["punctuation", ";"], + + ["operator", "}"], + + ["keyword", "@require"], ["string", ["\"GUID.np\""]], ["punctuation", ";"], + + ["keyword", "@search"], ["search", "Basic.*"], ["punctuation", ";"], + + ["keyword", "@namespace"], + ["namespace", "Basic"], + + ["operator", "{"], + + ["keyword", "@pattern"], + ["pattern", [ + ["pattern-name", "GUID-in-Braces"] + ]], + ["operator", "="], + ["string", ["'{'"]], + ["operator", "+"], + ["name", "GUID"], + ["operator", "+"], + ["string", ["'}'"]], + ["punctuation", ";"], + + ["operator", "}"] +] diff --git a/tests/languages/openqasm/function_feature.test b/tests/languages/openqasm/function_feature.test new file mode 100644 index 0000000000..cf018998fc --- /dev/null +++ b/tests/languages/openqasm/function_feature.test @@ -0,0 +1,23 @@ +sin( +cos( +tan( +exp( +ln( +sqrt( +rotl( +rotr( +popcount( + +---------------------------------------------------- + +[ + ["function", "sin"], ["punctuation", "("], + ["function", "cos"], ["punctuation", "("], + ["function", "tan"], ["punctuation", "("], + ["function", "exp"], ["punctuation", "("], + ["function", "ln"], ["punctuation", "("], + ["function", "sqrt"], ["punctuation", "("], + ["function", "rotl"], ["punctuation", "("], + ["function", "rotr"], ["punctuation", "("], + ["function", "popcount"], ["punctuation", "("] +] diff --git a/tests/languages/openqasm/punctuation_feature.test b/tests/languages/openqasm/punctuation_feature.test new file mode 100644 index 0000000000..462695fdef --- /dev/null +++ b/tests/languages/openqasm/punctuation_feature.test @@ -0,0 +1,18 @@ +( ) { } [ ] +; , : . + +---------------------------------------------------- + +[ + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", "{"], + ["punctuation", "}"], + ["punctuation", "["], + ["punctuation", "]"], + + ["punctuation", ";"], + ["punctuation", ","], + ["punctuation", ":"], + ["punctuation", "."] +] diff --git a/tests/languages/pascaligo/class-name_feature.test b/tests/languages/pascaligo/class-name_feature.test new file mode 100644 index 0000000000..8b5ee2b52b --- /dev/null +++ b/tests/languages/pascaligo/class-name_feature.test @@ -0,0 +1,42 @@ +type storage is int + +function add (const store : storage; const delta : int) : storage is store + delta + +---------------------------------------------------- + +[ + ["keyword", "type"], + ["class-name", [ + "storage" + ]], + ["keyword", "is"], + ["class-name", [ + ["builtin", "int"] + ]], + + ["keyword", "function"], + ["function", "add"], + ["punctuation", "("], + ["keyword", "const"], + " store ", + ["punctuation", ":"], + ["class-name", [ + "storage" + ]], + ["punctuation", ";"], + ["keyword", "const"], + " delta ", + ["punctuation", ":"], + ["class-name", [ + ["builtin", "int"] + ]], + ["punctuation", ")"], + ["punctuation", ":"], + ["class-name", [ + "storage" + ]], + ["keyword", "is"], + " store ", + ["operator", "+"], + " delta" +] diff --git a/tests/languages/peoplecode/class-name_feature.test b/tests/languages/peoplecode/class-name_feature.test new file mode 100644 index 0000000000..51091f7f09 --- /dev/null +++ b/tests/languages/peoplecode/class-name_feature.test @@ -0,0 +1,264 @@ +class FactorialClass + method factorial(&I as number) returns number; +end-class; + +class Fruit + property number FruitCount; +end-class; + +class Banana extends Fruit + property number BananaCount; +end-class; + +local Banana &MyBanana = Create Banana(); +local Fruit &MyFruit = &MyBanana; /* okay, Banana is a subtype of Fruit */ +local number &Num = &MyBanana.BananaCount; + +/* generic building class */ +class BuildingAsset + method Acquire(); + method DisasterPrep(); +end-class; + +method Acquire + %This.DisasterPrep(); +end-method;method DisasterPrep + PrepareForFire(); +end-method; + +/* building in Vancouver */ +class VancouverBuilding extends BuildingAssetmethod DisasterPrep(); +end-class; + +method DisasterPrep + PrepareForEarthquake();%Super.DisasterPrep(); /* call superclass method */ +end-method; + +/* building in Edmonton */ +class EdmontonBuilding extends BuildingAssetmethod DisasterPrep(); +end-class; + +method DisasterPrep + PrepareForFreezing();%Super.DisasterPrep(); /* call superclass method */ +end-method; + +local BuildingAsset &Building = Create VancouverBuilding(); + +&Building.Acquire(); /* calls PrepareForEarthquake then PrepareForFire */ + +&Building = Create EdmontonBuilding(); + +&Building.Acquire(); /* calls PrepareForFreezing then PrepareForFire */ + +---------------------------------------------------- + +[ + ["keyword", "class"], + ["class-name", ["FactorialClass"]], + + ["keyword", "method"], + ["function-definition", "factorial"], + ["punctuation", "("], + "&I ", + ["keyword", "as"], + ["class-name", ["number"]], + ["punctuation", ")"], + ["keyword", "returns"], + ["class-name", ["number"]], + ["punctuation", ";"], + + ["keyword", "end-class"], + ["punctuation", ";"], + + ["keyword", "class"], + ["class-name", ["Fruit"]], + + ["keyword", "property"], + ["class-name", ["number"]], + " FruitCount", + ["punctuation", ";"], + + ["keyword", "end-class"], + ["punctuation", ";"], + + ["keyword", "class"], + ["class-name", ["Banana"]], + ["keyword", "extends"], + ["class-name", ["Fruit"]], + + ["keyword", "property"], + ["class-name", ["number"]], + " BananaCount", + ["punctuation", ";"], + + ["keyword", "end-class"], + ["punctuation", ";"], + + ["keyword", "local"], + ["class-name", ["Banana"]], + " &MyBanana ", + ["operator", "="], + ["keyword", "Create"], + ["class-name", ["Banana"]], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", ";"], + + ["keyword", "local"], + ["class-name", ["Fruit"]], + " &MyFruit ", + ["operator", "="], + " &MyBanana", + ["punctuation", ";"], + ["comment", "/* okay, Banana is a subtype of Fruit */"], + + ["keyword", "local"], + ["class-name", ["number"]], + " &Num ", + ["operator", "="], + " &MyBanana", + ["punctuation", "."], + "BananaCount", + ["punctuation", ";"], + + ["comment", "/* generic building class */"], + + ["keyword", "class"], + ["class-name", ["BuildingAsset"]], + + ["keyword", "method"], + ["function-definition", "Acquire"], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", ";"], + + ["keyword", "method"], + ["function-definition", "DisasterPrep"], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", ";"], + + ["keyword", "end-class"], + ["punctuation", ";"], + + ["keyword", "method"], + ["function-definition", "Acquire"], + + ["variable", "%This"], + ["punctuation", "."], + ["function", "DisasterPrep"], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", ";"], + + ["keyword", "end-method"], + ["punctuation", ";"], + ["keyword", "method"], + ["function-definition", "DisasterPrep"], + + ["function", "PrepareForFire"], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", ";"], + + ["keyword", "end-method"], + ["punctuation", ";"], + + ["comment", "/* building in Vancouver */"], + + ["keyword", "class"], + ["class-name", ["VancouverBuilding"]], + ["keyword", "extends"], + ["class-name", ["BuildingAssetmethod"]], + ["function", "DisasterPrep"], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", ";"], + + ["keyword", "end-class"], + ["punctuation", ";"], + + ["keyword", "method"], + ["function-definition", "DisasterPrep"], + + ["function", "PrepareForEarthquake"], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", ";"], + ["variable", "%Super"], + ["punctuation", "."], + ["function", "DisasterPrep"], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", ";"], + ["comment", "/* call superclass method */"], + + ["keyword", "end-method"], + ["punctuation", ";"], + + ["comment", "/* building in Edmonton */"], + + ["keyword", "class"], + ["class-name", ["EdmontonBuilding"]], + ["keyword", "extends"], + ["class-name", ["BuildingAssetmethod"]], + ["function", "DisasterPrep"], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", ";"], + + ["keyword", "end-class"], + ["punctuation", ";"], + + ["keyword", "method"], + ["function-definition", "DisasterPrep"], + + ["function", "PrepareForFreezing"], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", ";"], + ["variable", "%Super"], + ["punctuation", "."], + ["function", "DisasterPrep"], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", ";"], + ["comment", "/* call superclass method */"], + + ["keyword", "end-method"], + ["punctuation", ";"], + + ["keyword", "local"], + ["class-name", ["BuildingAsset"]], + " &Building ", + ["operator", "="], + ["keyword", "Create"], + ["class-name", ["VancouverBuilding"]], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", ";"], + + "\r\n\r\n&Building", + ["punctuation", "."], + ["function", "Acquire"], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", ";"], + ["comment", "/* calls PrepareForEarthquake then PrepareForFire */"], + + "\r\n\r\n&Building ", + ["operator", "="], + ["keyword", "Create"], + ["class-name", ["EdmontonBuilding"]], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", ";"], + + "\r\n\r\n&Building", + ["punctuation", "."], + ["function", "Acquire"], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", ";"], + ["comment", "/* calls PrepareForFreezing then PrepareForFire */"] +] diff --git a/tests/languages/peoplecode/function_feature.test b/tests/languages/peoplecode/function_feature.test new file mode 100644 index 0000000000..f3edb215f4 --- /dev/null +++ b/tests/languages/peoplecode/function_feature.test @@ -0,0 +1,9 @@ +GetCurrEffRow() + +---------------------------------------------------- + +[ + ["function", "GetCurrEffRow"], + ["punctuation", "("], + ["punctuation", ")"] +] diff --git a/tests/languages/perl/variable_feature.test b/tests/languages/perl/variable_feature.test index aad023c485..4425d59785 100644 --- a/tests/languages/perl/variable_feature.test +++ b/tests/languages/perl/variable_feature.test @@ -3,6 +3,8 @@ $#foo ${^POSTMATCH} +${...} + $^V @1 @@ -26,6 +28,11 @@ $foo::'bar ["variable", "${^POSTMATCH}"], + ["variable", "$"], + ["punctuation", "{"], + ["operator", "..."], + ["punctuation", "}"], + ["variable", "$^V"], ["variable", "@1"], @@ -44,4 +51,4 @@ $foo::'bar ---------------------------------------------------- -Checks for variables. \ No newline at end of file +Checks for variables. diff --git a/tests/languages/phpdoc/class-name_feature.test b/tests/languages/phpdoc/class-name_feature.test index 9003407d55..b0a5880687 100644 --- a/tests/languages/phpdoc/class-name_feature.test +++ b/tests/languages/phpdoc/class-name_feature.test @@ -5,6 +5,26 @@ * @throws \foo\MyException if something bad happens */ +/** + * @param callback $parameter + * @param resource $parameter + * @param boolean $parameter + * @param integer $parameter + * @param double $parameter + * @param object $parameter + * @param string $parameter + * @param array $parameter + * @param false $parameter + * @param float $parameter + * @param mixed $parameter + * @param bool $parameter + * @param null $parameter + * @param self $parameter + * @param true $parameter + * @param void $parameter + * @param int $parameter + */ + ---------------------------------------------------- [ @@ -39,7 +59,126 @@ ["punctuation", "\\"], "MyException" ]], - " if something bad happens\r\n */" + " if something bad happens\r\n */\r\n\r\n/**\r\n * ", + ["keyword", "@param"], + ["class-name", [ + ["keyword", "callback"] + ]], + ["parameter", "$parameter"], + + "\r\n * ", + ["keyword", "@param"], + ["class-name", [ + ["keyword", "resource"] + ]], + ["parameter", "$parameter"], + + "\r\n * ", + ["keyword", "@param"], + ["class-name", [ + ["keyword", "boolean"] + ]], + ["parameter", "$parameter"], + + "\r\n * ", + ["keyword", "@param"], + ["class-name", [ + ["keyword", "integer"] + ]], + ["parameter", "$parameter"], + + "\r\n * ", + ["keyword", "@param"], + ["class-name", [ + ["keyword", "double"] + ]], + ["parameter", "$parameter"], + + "\r\n * ", + ["keyword", "@param"], + ["class-name", [ + ["keyword", "object"] + ]], + ["parameter", "$parameter"], + + "\r\n * ", + ["keyword", "@param"], + ["class-name", [ + ["keyword", "string"] + ]], + ["parameter", "$parameter"], + + "\r\n * ", + ["keyword", "@param"], + ["class-name", [ + ["keyword", "array"] + ]], + ["parameter", "$parameter"], + + "\r\n * ", + ["keyword", "@param"], + ["class-name", [ + ["keyword", "false"] + ]], + ["parameter", "$parameter"], + + "\r\n * ", + ["keyword", "@param"], + ["class-name", [ + ["keyword", "float"] + ]], + ["parameter", "$parameter"], + + "\r\n * ", + ["keyword", "@param"], + ["class-name", [ + ["keyword", "mixed"] + ]], + ["parameter", "$parameter"], + + "\r\n * ", + ["keyword", "@param"], + ["class-name", [ + ["keyword", "bool"] + ]], + ["parameter", "$parameter"], + + "\r\n * ", + ["keyword", "@param"], + ["class-name", [ + ["keyword", "null"] + ]], + ["parameter", "$parameter"], + + "\r\n * ", + ["keyword", "@param"], + ["class-name", [ + ["keyword", "self"] + ]], + ["parameter", "$parameter"], + + "\r\n * ", + ["keyword", "@param"], + ["class-name", [ + ["keyword", "true"] + ]], + ["parameter", "$parameter"], + + "\r\n * ", + ["keyword", "@param"], + ["class-name", [ + ["keyword", "void"] + ]], + ["parameter", "$parameter"], + + "\r\n * ", + ["keyword", "@param"], + ["class-name", [ + ["keyword", "int"] + ]], + ["parameter", "$parameter"], + + "\r\n */" ] ---------------------------------------------------- diff --git a/tests/languages/promql/keyword_feature.test b/tests/languages/promql/keyword_feature.test new file mode 100644 index 0000000000..f579e7f1e3 --- /dev/null +++ b/tests/languages/promql/keyword_feature.test @@ -0,0 +1,43 @@ +sum +min +max +avg +group +stddev +stdvar +count +count_values +bottomk +topk +quantile +on +ignoring +group_right +group_left +by +without +offset + +---------------------------------------------------- + +[ + ["keyword", "sum"], + ["keyword", "min"], + ["keyword", "max"], + ["keyword", "avg"], + ["keyword", "group"], + ["keyword", "stddev"], + ["keyword", "stdvar"], + ["keyword", "count"], + ["keyword", "count_values"], + ["keyword", "bottomk"], + ["keyword", "topk"], + ["keyword", "quantile"], + ["keyword", "on"], + ["keyword", "ignoring"], + ["keyword", "group_right"], + ["keyword", "group_left"], + ["keyword", "by"], + ["keyword", "without"], + ["keyword", "offset"] +] diff --git a/tests/languages/promql/number_feature.test b/tests/languages/promql/number_feature.test new file mode 100644 index 0000000000..39af1314ed --- /dev/null +++ b/tests/languages/promql/number_feature.test @@ -0,0 +1,17 @@ +23 +-2.43 +3.4e-9 +0x8f +-Inf +NaN + +---------------------------------------------------- + +[ + ["number", "23"], + ["number", "-2.43"], + ["number", "3.4e-9"], + ["number", "0x8f"], + ["number", "-Inf"], + ["number", "NaN"] +] diff --git a/tests/languages/promql/operator_feature.test b/tests/languages/promql/operator_feature.test new file mode 100644 index 0000000000..f3b638fc67 --- /dev/null +++ b/tests/languages/promql/operator_feature.test @@ -0,0 +1,25 @@ +^ * / % + - +== != <= < >= > + +and unless or + +---------------------------------------------------- + +[ + ["operator", "^"], + ["operator", "*"], + ["operator", "/"], + ["operator", "%"], + ["operator", "+"], + ["operator", "-"], + ["operator", "=="], + ["operator", "!="], + ["operator", "<="], + ["operator", "<"], + ["operator", ">="], + ["operator", ">"], + + ["operator", "and"], + ["operator", "unless"], + ["operator", "or"] +] diff --git a/tests/languages/promql/time_series_selection.test b/tests/languages/promql/time_series_selection.test index dc7edbe954..a933e53da8 100644 --- a/tests/languages/promql/time_series_selection.test +++ b/tests/languages/promql/time_series_selection.test @@ -1,5 +1,7 @@ http_requests_total{job="apiserver", handler="/api/comments"}[5m] +http_requests_total offset 5m + http_requests_total{job=~".*server"} ---------------------------------------------------- @@ -23,6 +25,12 @@ http_requests_total{job=~".*server"} ["punctuation", "]"] ]], + "\r\n\r\nhttp_requests_total ", + ["keyword", "offset"], + ["context-range", [ + ["range-duration", "5m"] + ]], + "\r\n\r\nhttp_requests_total", ["context-labels", [ ["punctuation", "{"], diff --git a/tests/languages/pug/filter_feature.test b/tests/languages/pug/filter_feature.test new file mode 100644 index 0000000000..0e23802161 --- /dev/null +++ b/tests/languages/pug/filter_feature.test @@ -0,0 +1,11 @@ +:language + code + +---------------------------------------------------- + +[ + ["filter", [ + ["filter-name", ":language"], + "\r\n\tcode" + ]] +] diff --git a/tests/languages/pure/punctuation_feature.test b/tests/languages/pure/punctuation_feature.test new file mode 100644 index 0000000000..dfad5774e3 --- /dev/null +++ b/tests/languages/pure/punctuation_feature.test @@ -0,0 +1,13 @@ +( ) { } [ ] ; + +---------------------------------------------------- + +[ + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", "{"], + ["punctuation", "}"], + ["punctuation", "["], + ["punctuation", "]"], + ["punctuation", ";"] +] diff --git a/tests/languages/purebasic/function_feature.test b/tests/languages/purebasic/function_feature.test index a2d62b58e7..896990e8e7 100644 --- a/tests/languages/purebasic/function_feature.test +++ b/tests/languages/purebasic/function_feature.test @@ -1,211 +1,9 @@ -DECLARECDLL -DECLAREDLL -COMPILERSELECT -COMPILERCASE -COMPILERDEFAULT -COMPILERENDSELECT -COMPILERERROR -ENABLEEXPLICIT -DISABLEEXPLICIT -NOT -AND -OR -XOR -CALLDEBUGGER -DEBUGLEVEL -ENABLEDEBUGGER -DISABLEDEBUGGER -RESTORE -READ -INCLUDEPATH -INCLUDEBINARY -THREADED -RUNTIME -WITH -ENDWITH -STRUCTUREUNION -ENDSTRUCTUREUNION -ALIGN -NEWLIST -NEWMAP -INTERFACE -ENDINTERFACE -EXTENDS -ENUMERATION -ENDENUMERATION -SWAP -FOREACH -CONTINUE -FAKERETURN -GOTO -GOSUB -RETURN -BREAK -MODULE -ENDMODULE -DECLAREMODULE -ENDDECLAREMODULE -DECLARE -DECLAREC -PROTOTYPE -PROTOTYPEC -ENABLEASM -DISABLEASM -DIM -REDIM -DATA -DATASECTION -ENDDATASECTION -TO -PROCEDURERETURN -DEBUG -DEFAULT -CASE -SELECT -ENDSELECT -AS -IMPORT -ENDIMPORT -IMPORTC -COMPILERIF -COMPILERELSE -COMPILERENDIF -COMPILERELSEIF -END -STRUCTURE -ENDSTRUCTURE -WHILE -WEND -FOR -NEXT -STEP -IF -ELSE -ELSEIF -ENDIF -REPEAT -UNTIL -PROCEDURE -PROCEDUREDLL -PROCEDUREC -PROCEDURECDLL -ENDPROCEDURE -PROTECTED -SHARED -STATIC -GLOBAL -DEFINE -INCLUDEFILE -XINCLUDEFILE -MACRO -ENDMACRO - ----------------------------------------------------- - -[ - ["keyword", "DECLARECDLL"], - ["keyword", "DECLAREDLL"], - ["keyword", "COMPILERSELECT"], - ["keyword", "COMPILERCASE"], - ["keyword", "COMPILERDEFAULT"], - ["keyword", "COMPILERENDSELECT"], - ["keyword", "COMPILERERROR"], - ["keyword", "ENABLEEXPLICIT"], - ["keyword", "DISABLEEXPLICIT"], - ["keyword", "NOT"], - ["keyword", "AND"], - ["keyword", "OR"], - ["keyword", "XOR"], - ["keyword", "CALLDEBUGGER"], - ["keyword", "DEBUGLEVEL"], - ["keyword", "ENABLEDEBUGGER"], - ["keyword", "DISABLEDEBUGGER"], - ["keyword", "RESTORE"], - ["keyword", "READ"], - ["keyword", "INCLUDEPATH"], - ["keyword", "INCLUDEBINARY"], - ["keyword", "THREADED"], - ["keyword", "RUNTIME"], - ["keyword", "WITH"], - ["keyword", "ENDWITH"], - ["keyword", "STRUCTUREUNION"], - ["keyword", "ENDSTRUCTUREUNION"], - ["keyword", "ALIGN"], - ["keyword", "NEWLIST"], - ["keyword", "NEWMAP"], - ["keyword", "INTERFACE"], - ["keyword", "ENDINTERFACE"], - ["keyword", "EXTENDS"], - ["keyword", "ENUMERATION"], - ["keyword", "ENDENUMERATION"], - ["keyword", "SWAP"], - ["keyword", "FOREACH"], - ["keyword", "CONTINUE"], - ["keyword", "FAKERETURN"], - ["keyword", "GOTO"], - ["keyword", "GOSUB"], - ["keyword", "RETURN"], - ["keyword", "BREAK"], - ["keyword", "MODULE"], - ["keyword", "ENDMODULE"], - ["keyword", "DECLAREMODULE"], - ["keyword", "ENDDECLAREMODULE"], - ["keyword", "DECLARE"], - ["keyword", "DECLAREC"], - ["keyword", "PROTOTYPE"], - ["keyword", "PROTOTYPEC"], - ["keyword", "ENABLEASM"], - ["keyword", "DISABLEASM"], - ["keyword", "DIM"], - ["keyword", "REDIM"], - ["keyword", "DATA"], - ["keyword", "DATASECTION"], - ["keyword", "ENDDATASECTION"], - ["keyword", "TO"], - ["keyword", "PROCEDURERETURN"], - ["keyword", "DEBUG"], - ["keyword", "DEFAULT"], - ["keyword", "CASE"], - ["keyword", "SELECT"], - ["keyword", "ENDSELECT"], - ["keyword", "AS"], - ["keyword", "IMPORT"], - ["keyword", "ENDIMPORT"], - ["keyword", "IMPORTC"], - ["keyword", "COMPILERIF"], - ["keyword", "COMPILERELSE"], - ["keyword", "COMPILERENDIF"], - ["keyword", "COMPILERELSEIF"], - ["keyword", "END"], - ["keyword", "STRUCTURE"], - ["keyword", "ENDSTRUCTURE"], - ["keyword", "WHILE"], - ["keyword", "WEND"], - ["keyword", "FOR"], - ["keyword", "NEXT"], - ["keyword", "STEP"], - ["keyword", "IF"], - ["keyword", "ELSE"], - ["keyword", "ELSEIF"], - ["keyword", "ENDIF"], - ["keyword", "REPEAT"], - ["keyword", "UNTIL"], - ["keyword", "PROCEDURE"], - ["keyword", "PROCEDUREDLL"], - ["keyword", "PROCEDUREC"], - ["keyword", "PROCEDURECDLL"], - ["keyword", "ENDPROCEDURE"], - ["keyword", "PROTECTED"], - ["keyword", "SHARED"], - ["keyword", "STATIC"], - ["keyword", "GLOBAL"], - ["keyword", "DEFINE"], - ["keyword", "INCLUDEFILE"], - ["keyword", "XINCLUDEFILE"], - ["keyword", "MACRO"], - ["keyword", "ENDMACRO"] -] - ----------------------------------------------------- - -Checks for keywords. \ No newline at end of file +foo() + +---------------------------------------------------- + +[ + ["function", "foo"], + ["punctuation", "("], + ["punctuation", ")"] +] diff --git a/tests/languages/purebasic/keyword_feature.test b/tests/languages/purebasic/keyword_feature.test new file mode 100644 index 0000000000..0d3f51f2f2 --- /dev/null +++ b/tests/languages/purebasic/keyword_feature.test @@ -0,0 +1,211 @@ +DECLARECDLL +DECLAREDLL +COMPILERSELECT +COMPILERCASE +COMPILERDEFAULT +COMPILERENDSELECT +COMPILERERROR +ENABLEEXPLICIT +DISABLEEXPLICIT +NOT +AND +OR +XOR +CALLDEBUGGER +DEBUGLEVEL +ENABLEDEBUGGER +DISABLEDEBUGGER +RESTORE +READ +INCLUDEPATH +INCLUDEBINARY +THREADED +RUNTIME +WITH +ENDWITH +STRUCTUREUNION +ENDSTRUCTUREUNION +ALIGN +NEWLIST +NEWMAP +INTERFACE +ENDINTERFACE +EXTENDS +ENUMERATION +ENDENUMERATION +SWAP +FOREACH +CONTINUE +FAKERETURN +GOTO +GOSUB +RETURN +BREAK +MODULE +ENDMODULE +DECLAREMODULE +ENDDECLAREMODULE +DECLARE +DECLAREC +PROTOTYPE +PROTOTYPEC +ENABLEASM +DISABLEASM +DIM +REDIM +DATA +DATASECTION +ENDDATASECTION +TO +PROCEDURERETURN +DEBUG +DEFAULT +CASE +SELECT +ENDSELECT +AS +IMPORT +ENDIMPORT +IMPORTC +COMPILERIF +COMPILERELSE +COMPILERENDIF +COMPILERELSEIF +END +STRUCTURE +ENDSTRUCTURE +WHILE +WEND +FOR +NEXT +STEP +IF +ELSE +ELSEIF +ENDIF +REPEAT +UNTIL +PROCEDURE +PROCEDUREDLL +PROCEDUREC +PROCEDURECDLL +ENDPROCEDURE +PROTECTED +SHARED +STATIC +GLOBAL +DEFINE +INCLUDEFILE +XINCLUDEFILE +MACRO +ENDMACRO + +---------------------------------------------------- + +[ + ["keyword", "DECLARECDLL"], + ["keyword", "DECLAREDLL"], + ["keyword", "COMPILERSELECT"], + ["keyword", "COMPILERCASE"], + ["keyword", "COMPILERDEFAULT"], + ["keyword", "COMPILERENDSELECT"], + ["keyword", "COMPILERERROR"], + ["keyword", "ENABLEEXPLICIT"], + ["keyword", "DISABLEEXPLICIT"], + ["keyword", "NOT"], + ["keyword", "AND"], + ["keyword", "OR"], + ["keyword", "XOR"], + ["keyword", "CALLDEBUGGER"], + ["keyword", "DEBUGLEVEL"], + ["keyword", "ENABLEDEBUGGER"], + ["keyword", "DISABLEDEBUGGER"], + ["keyword", "RESTORE"], + ["keyword", "READ"], + ["keyword", "INCLUDEPATH"], + ["keyword", "INCLUDEBINARY"], + ["keyword", "THREADED"], + ["keyword", "RUNTIME"], + ["keyword", "WITH"], + ["keyword", "ENDWITH"], + ["keyword", "STRUCTUREUNION"], + ["keyword", "ENDSTRUCTUREUNION"], + ["keyword", "ALIGN"], + ["keyword", "NEWLIST"], + ["keyword", "NEWMAP"], + ["keyword", "INTERFACE"], + ["keyword", "ENDINTERFACE"], + ["keyword", "EXTENDS"], + ["keyword", "ENUMERATION"], + ["keyword", "ENDENUMERATION"], + ["keyword", "SWAP"], + ["keyword", "FOREACH"], + ["keyword", "CONTINUE"], + ["keyword", "FAKERETURN"], + ["keyword", "GOTO"], + ["keyword", "GOSUB"], + ["keyword", "RETURN"], + ["keyword", "BREAK"], + ["keyword", "MODULE"], + ["keyword", "ENDMODULE"], + ["keyword", "DECLAREMODULE"], + ["keyword", "ENDDECLAREMODULE"], + ["keyword", "DECLARE"], + ["keyword", "DECLAREC"], + ["keyword", "PROTOTYPE"], + ["keyword", "PROTOTYPEC"], + ["keyword", "ENABLEASM"], + ["keyword", "DISABLEASM"], + ["keyword", "DIM"], + ["keyword", "REDIM"], + ["keyword", "DATA"], + ["keyword", "DATASECTION"], + ["keyword", "ENDDATASECTION"], + ["keyword", "TO"], + ["keyword", "PROCEDURERETURN"], + ["keyword", "DEBUG"], + ["keyword", "DEFAULT"], + ["keyword", "CASE"], + ["keyword", "SELECT"], + ["keyword", "ENDSELECT"], + ["keyword", "AS"], + ["keyword", "IMPORT"], + ["keyword", "ENDIMPORT"], + ["keyword", "IMPORTC"], + ["keyword", "COMPILERIF"], + ["keyword", "COMPILERELSE"], + ["keyword", "COMPILERENDIF"], + ["keyword", "COMPILERELSEIF"], + ["keyword", "END"], + ["keyword", "STRUCTURE"], + ["keyword", "ENDSTRUCTURE"], + ["keyword", "WHILE"], + ["keyword", "WEND"], + ["keyword", "FOR"], + ["keyword", "NEXT"], + ["keyword", "STEP"], + ["keyword", "IF"], + ["keyword", "ELSE"], + ["keyword", "ELSEIF"], + ["keyword", "ENDIF"], + ["keyword", "REPEAT"], + ["keyword", "UNTIL"], + ["keyword", "PROCEDURE"], + ["keyword", "PROCEDUREDLL"], + ["keyword", "PROCEDUREC"], + ["keyword", "PROCEDURECDLL"], + ["keyword", "ENDPROCEDURE"], + ["keyword", "PROTECTED"], + ["keyword", "SHARED"], + ["keyword", "STATIC"], + ["keyword", "GLOBAL"], + ["keyword", "DEFINE"], + ["keyword", "INCLUDEFILE"], + ["keyword", "XINCLUDEFILE"], + ["keyword", "MACRO"], + ["keyword", "ENDMACRO"] +] + +---------------------------------------------------- + +Checks for keywords. \ No newline at end of file diff --git a/tests/languages/purescript/keyword_feature.test b/tests/languages/purescript/keyword_feature.test index 3d47c6bc59..d440a53166 100644 --- a/tests/languages/purescript/keyword_feature.test +++ b/tests/languages/purescript/keyword_feature.test @@ -5,6 +5,7 @@ data derive do else +forall if in infixl @@ -30,6 +31,7 @@ where ["keyword", "derive"], ["keyword", "do"], ["keyword", "else"], + ["keyword", "forall"], ["keyword", "if"], ["keyword", "in"], ["keyword", "infixl"], diff --git a/tests/languages/q/comment_feature.test b/tests/languages/q/comment_feature.test index c78bb33618..fac469913c 100644 --- a/tests/languages/q/comment_feature.test +++ b/tests/languages/q/comment_feature.test @@ -6,6 +6,8 @@ Foo bar "baz" \ +`john / an atom of type symbol + \ Foo Bar "baz" @@ -15,10 +17,14 @@ Bar "baz" [ ["comment", "#!/usr/bin/env q"], ["comment", "/ Foobar \"baz\""], + ["comment", "/\r\nFoo\r\nbar \"baz\"\r\n\\"], + + ["symbol", "`john"], ["comment", "/ an atom of type symbol"], + ["comment", "\\\r\nFoo\r\nBar \"baz\""] ] ---------------------------------------------------- -Checks for comments. \ No newline at end of file +Checks for comments. diff --git a/tests/languages/q/punctuation_feature.test b/tests/languages/q/punctuation_feature.test new file mode 100644 index 0000000000..ca50be4266 --- /dev/null +++ b/tests/languages/q/punctuation_feature.test @@ -0,0 +1,17 @@ +( ) { } [ ] ; + +sp.s + +---------------------------------------------------- + +[ + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", "{"], + ["punctuation", "}"], + ["punctuation", "["], + ["punctuation", "]"], + ["punctuation", ";"], + + "\r\n\r\nsp", ["punctuation", "."], "s" +] diff --git a/tests/languages/qsharp/keyword_feature.test b/tests/languages/qsharp/keyword_feature.test new file mode 100644 index 0000000000..ec67ccfcd2 --- /dev/null +++ b/tests/languages/qsharp/keyword_feature.test @@ -0,0 +1,129 @@ +// type +Adj +BigInt +Bool +Ctl +Double +false +Int +One +Pauli +PauliI +PauliX +PauliY +PauliZ +Qubit +Range +Result +String +true +Unit +Zero + +// other +Adjoint +adjoint +apply +as +auto +body +borrow +borrowing +Controlled +controlled +distribute +elif +else +fail +fixup +for +function +if +in +internal +intrinsic +invert +is +let +mutable +namespace +new +newtype +open +operation +repeat +return +self +set +until +use +using +while +within + +---------------------------------------------------- + +[ + ["comment", "// type"], + ["keyword", "Adj"], + ["keyword", "BigInt"], + ["keyword", "Bool"], + ["keyword", "Ctl"], + ["keyword", "Double"], + ["keyword", "false"], + ["keyword", "Int"], + ["keyword", "One"], + ["keyword", "Pauli"], + ["keyword", "PauliI"], + ["keyword", "PauliX"], + ["keyword", "PauliY"], + ["keyword", "PauliZ"], + ["keyword", "Qubit"], + ["keyword", "Range"], + ["keyword", "Result"], + ["keyword", "String"], + ["keyword", "true"], + ["keyword", "Unit"], + ["keyword", "Zero"], + + ["comment", "// other"], + ["keyword", "Adjoint"], + ["keyword", "adjoint"], + ["keyword", "apply"], + ["keyword", "as"], + ["keyword", "auto"], + ["keyword", "body"], + ["keyword", "borrow"], + ["keyword", "borrowing"], + ["keyword", "Controlled"], + ["keyword", "controlled"], + ["keyword", "distribute"], + ["keyword", "elif"], + ["keyword", "else"], + ["keyword", "fail"], + ["keyword", "fixup"], + ["keyword", "for"], + ["keyword", "function"], + ["keyword", "if"], + ["keyword", "in"], + ["keyword", "internal"], + ["keyword", "intrinsic"], + ["keyword", "invert"], + ["keyword", "is"], + ["keyword", "let"], + ["keyword", "mutable"], + ["keyword", "namespace"], + ["keyword", "new"], + ["keyword", "newtype"], + ["keyword", "open"], + ["keyword", "operation"], + ["keyword", "repeat"], + ["keyword", "return"], + ["keyword", "self"], + ["keyword", "set"], + ["keyword", "until"], + ["keyword", "use"], + ["keyword", "using"], + ["keyword", "while"], + ["keyword", "within"] +] diff --git a/tests/languages/qsharp/string_feature.test b/tests/languages/qsharp/string_feature.test new file mode 100644 index 0000000000..146080fd29 --- /dev/null +++ b/tests/languages/qsharp/string_feature.test @@ -0,0 +1,39 @@ +"" +"foo" +"foo\"\n" + +$"" +$"foo" +$"\"" +$"foo{1+1}baz" + +---------------------------------------------------- + +[ + ["string", "\"\""], + ["string", "\"foo\""], + ["string", "\"foo\\\"\\n\""], + + ["interpolation-string", [ + ["string", "$\"\""] + ]], + ["interpolation-string", [ + ["string", "$\"foo\""] + ]], + ["interpolation-string", [ + ["string", "$\"\\\"\""] + ]], + ["interpolation-string", [ + ["string", "$\"foo"], + ["interpolation", [ + ["punctuation", "{"], + ["expression", [ + ["number", "1"], + ["operator", "+"], + ["number", "1"] + ]], + ["punctuation", "}"] + ]], + ["string", "baz\""] + ]] +] diff --git a/tests/languages/r/punctuation_feature.test b/tests/languages/r/punctuation_feature.test new file mode 100644 index 0000000000..4a7c5ff4c3 --- /dev/null +++ b/tests/languages/r/punctuation_feature.test @@ -0,0 +1,14 @@ +( ) { } [ ] , ; + +---------------------------------------------------- + +[ + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", "{"], + ["punctuation", "}"], + ["punctuation", "["], + ["punctuation", "]"], + ["punctuation", ","], + ["punctuation", ";"] +] diff --git a/tests/languages/racket/identifier_feature.test b/tests/languages/racket/identifier_feature.test new file mode 100644 index 0000000000..e57533ce55 --- /dev/null +++ b/tests/languages/racket/identifier_feature.test @@ -0,0 +1,7 @@ +|\x9;\x9;| + +---------------------------------------------------- + +[ + ["identifier", "|\\x9;\\x9;|"] +] diff --git a/tests/languages/rip/punctuation_feature.test b/tests/languages/rip/punctuation_feature.test new file mode 100644 index 0000000000..2ef1910a00 --- /dev/null +++ b/tests/languages/rip/punctuation_feature.test @@ -0,0 +1,28 @@ +.. ... + +` , . : ; = / \ +( ) < > [ ] { } + +---------------------------------------------------- + +[ + ["punctuation", ".."], ["punctuation", "..."], + + ["punctuation", "`"], + ["punctuation", ","], + ["punctuation", "."], + ["punctuation", ":"], + ["punctuation", ";"], + ["punctuation", "="], + ["punctuation", "/"], + ["punctuation", "\\"], + + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", "<"], + ["punctuation", ">"], + ["punctuation", "["], + ["punctuation", "]"], + ["punctuation", "{"], + ["punctuation", "}"] +] diff --git a/tests/languages/ruby+haml/ruby_inclusion.test b/tests/languages/ruby+haml/ruby_inclusion.test new file mode 100644 index 0000000000..dc1cd7cb25 --- /dev/null +++ b/tests/languages/ruby+haml/ruby_inclusion.test @@ -0,0 +1,58 @@ +:ruby + def circumference + Math::PI * radius ** 2 + end + +~ + :ruby + def circumference + Math::PI * radius ** 2 + end + +---------------------------------------------------- + +[ + ["filter-ruby", [ + ["filter-name", ":ruby"], + + ["keyword", "def"], + ["method-definition", [ + ["function", "circumference"] + ]], + + ["constant", "Math"], + ["punctuation", ":"], + ["punctuation", ":"], + ["constant", "PI"], + ["operator", "*"], + " radius ", + ["operator", "*"], + ["operator", "*"], + ["number", "2"], + + ["keyword", "end"] + ]], + + ["punctuation", "~"], + + ["filter-ruby", [ + ["filter-name", ":ruby"], + + ["keyword", "def"], + ["method-definition", [ + ["function", "circumference"] + ]], + + ["constant", "Math"], + ["punctuation", ":"], + ["punctuation", ":"], + ["constant", "PI"], + ["operator", "*"], + " radius ", + ["operator", "*"], + ["operator", "*"], + ["number", "2"], + + ["keyword", "end"] + ]] +] diff --git a/tests/languages/rust/namespace_feature.test b/tests/languages/rust/namespace_feature.test index f858e07bbd..3ccfa1ad52 100644 --- a/tests/languages/rust/namespace_feature.test +++ b/tests/languages/rust/namespace_feature.test @@ -19,6 +19,9 @@ pub static ALLOCATOR: alloc::Tracing = alloc::Tracing::new(); unsafe fn alloc(&self, layout: std::alloc::Layout) -> *mut u8 {} +use crate::cool::function as root_function; +self::cool::function(); + ---------------------------------------------------- [ @@ -28,12 +31,14 @@ unsafe fn alloc(&self, layout: std::alloc::Layout) -> *mut u8 {} ["punctuation", "::"] ]], ["punctuation", "{"], + ["namespace", [ "fs", ["punctuation", "::"] ]], ["class-name", "File"], ["punctuation", ","], + ["namespace", [ "io", ["punctuation", "::"] @@ -44,14 +49,17 @@ unsafe fn alloc(&self, layout: std::alloc::Layout) -> *mut u8 {} ["class-name", "BufReader"], ["punctuation", "}"], ["punctuation", ","], + ["namespace", [ "path", ["punctuation", "::"] ]], ["class-name", "PathBuf"], ["punctuation", ","], + ["punctuation", "}"], ["punctuation", ";"], + ["keyword", "use"], ["punctuation", "::"], ["namespace", [ @@ -66,6 +74,7 @@ unsafe fn alloc(&self, layout: std::alloc::Layout) -> *mut u8 {} ["class-name", "Visitor"], ["punctuation", "}"], ["punctuation", ";"], + ["keyword", "use"], ["namespace", [ "std", @@ -81,10 +90,12 @@ unsafe fn alloc(&self, layout: std::alloc::Layout) -> *mut u8 {} ["class-name", "Ordering"], ["punctuation", "}"], ["punctuation", ";"], + ["keyword", "pub"], ["keyword", "mod"], ["module-declaration", "sample"], ["punctuation", ";"], + ["keyword", "extern"], ["keyword", "crate"], ["module-declaration", "test"], @@ -121,6 +132,7 @@ unsafe fn alloc(&self, layout: std::alloc::Layout) -> *mut u8 {} ["operator", "&"], "line", ["punctuation", ")"], + ["keyword", "self"], ["punctuation", "."], ["function", "read_records"], @@ -178,7 +190,30 @@ unsafe fn alloc(&self, layout: std::alloc::Layout) -> *mut u8 {} ["keyword", "mut"], ["keyword", "u8"], ["punctuation", "{"], - ["punctuation", "}"] + ["punctuation", "}"], + + ["keyword", "use"], + ["keyword", "crate"], + ["module-declaration", [ + ["punctuation", "::"], + "cool", + ["punctuation", "::"] + ]], + "function ", + ["keyword", "as"], + " root_function", + ["punctuation", ";"], + + ["keyword", "self"], + ["module-declaration", [ + ["punctuation", "::"], + "cool", + ["punctuation", "::"] + ]], + ["function", "function"], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", ";"] ] ---------------------------------------------------- diff --git a/tests/languages/sas/number_feature.test b/tests/languages/sas/number_feature.test index 317a3212cc..add7c32f96 100644 --- a/tests/languages/sas/number_feature.test +++ b/tests/languages/sas/number_feature.test @@ -7,6 +7,9 @@ BadFacex 0c1x 0b0ax +"3132,3334"x +'3132,3334'x + ---------------------------------------------------- [ @@ -17,7 +20,10 @@ BadFacex ["number", "1.4E+2"], "\r\nBadFacex\r\n", ["number", "0c1x"], - ["number", "0b0ax"] + ["number", "0b0ax"], + + ["numeric-constant", "\"3132,3334\"x"], + ["numeric-constant", "'3132,3334'x"] ] ---------------------------------------------------- diff --git a/tests/languages/sass/variable-line_feature.test b/tests/languages/sass/variable-line_feature.test index a7f62ffcfb..445c85ca5a 100644 --- a/tests/languages/sass/variable-line_feature.test +++ b/tests/languages/sass/variable-line_feature.test @@ -1,5 +1,6 @@ $width: 5em $foo: $bar + $baz +$foo: $bar - $baz $bar: #{$baz} ---------------------------------------------------- @@ -17,6 +18,13 @@ $bar: #{$baz} ["operator", "+"], ["variable", "$baz"] ]], + ["variable-line", [ + ["variable", "$foo"], + ["punctuation", ":"], + ["variable", "$bar"], + ["operator", "-"], + ["variable", "$baz"] + ]], ["variable-line", [ ["variable", "$bar"], ["punctuation", ":"], @@ -26,4 +34,4 @@ $bar: #{$baz} ---------------------------------------------------- -Checks for variable declarations. \ No newline at end of file +Checks for variable declarations. diff --git a/tests/languages/smali/builtin_feature.test b/tests/languages/smali/builtin_feature.test new file mode 100644 index 0000000000..46eba70331 --- /dev/null +++ b/tests/languages/smali/builtin_feature.test @@ -0,0 +1,73 @@ +new-array v0, v0, [I + +.method static constructor ()V + +.field mWifiOnUid:I + +.field public static mWifiRunning:Z = false +.field public static final PI:D = 3.141592653589793 + +.field static final LOG_TAG:Ljava/lang/String; = "CDMA" + +---------------------------------------------------- + +[ + "new-array ", + ["register", "v0"], + ["punctuation", ","], + ["register", "v0"], + ["punctuation", ","], + ["operator", "["], + ["builtin", "I"], + + ["keyword", ".method"], + ["keyword", "static"], + ["keyword", "constructor"], + ["function", ""], + ["punctuation", "("], + ["punctuation", ")"], + ["builtin", "V"], + + ["keyword", ".field"], + ["field", "mWifiOnUid"], + ["punctuation", ":"], + ["builtin", "I"], + + ["keyword", ".field"], + ["keyword", "public"], + ["keyword", "static"], + ["field", "mWifiRunning"], + ["punctuation", ":"], + ["builtin", "Z"], + ["operator", "="], + ["boolean", "false"], + + ["keyword", ".field"], + ["keyword", "public"], + ["keyword", "static"], + ["keyword", "final"], + ["field", "PI"], + ["punctuation", ":"], + ["builtin", "D"], + ["operator", "="], + ["number", "3.141592653589793"], + + ["keyword", ".field"], + ["keyword", "static"], + ["keyword", "final"], + ["field", "LOG_TAG"], + ["punctuation", ":"], + ["class-name", [ + ["builtin", "L"], + ["namespace", [ + "java", + ["punctuation", "/"], + "lang", + ["punctuation", "/"] + ]], + ["class-name", "String"] + ]], + ["punctuation", ";"], + ["operator", "="], + ["string", "\"CDMA\""] +] diff --git a/tests/languages/smali/label_feature.test b/tests/languages/smali/label_feature.test new file mode 100644 index 0000000000..6a45b9bfdb --- /dev/null +++ b/tests/languages/smali/label_feature.test @@ -0,0 +1,13 @@ +.line 989 +:cond_2b + +goto :goto_1f + +---------------------------------------------------- + +[ + ["keyword", ".line"], ["number", "989"], + ["punctuation", ":"], ["label", "cond_2b"], + + "\r\n\r\ngoto ", ["punctuation", ":"], ["label", "goto_1f"] +] diff --git a/tests/languages/smali/register_feature.test b/tests/languages/smali/register_feature.test new file mode 100644 index 0000000000..33eaa86a51 --- /dev/null +++ b/tests/languages/smali/register_feature.test @@ -0,0 +1,28 @@ +move v1, p1 + +move v2, p2 + +move-object v4, p3 + +move v5, p4 + +---------------------------------------------------- + +[ + "move ", ["register", "v1"], ["punctuation", ","], ["register", "p1"], + + "\r\n\r\nmove ", + ["register", "v2"], + ["punctuation", ","], + ["register", "p2"], + + "\r\n\r\nmove-object ", + ["register", "v4"], + ["punctuation", ","], + ["register", "p3"], + + "\r\n\r\nmove ", + ["register", "v5"], + ["punctuation", ","], + ["register", "p4"] +] diff --git a/tests/languages/sparql/keyword_feature.test b/tests/languages/sparql/keyword_feature.test index a4a2c48ed0..3449171fa5 100644 --- a/tests/languages/sparql/keyword_feature.test +++ b/tests/languages/sparql/keyword_feature.test @@ -102,6 +102,10 @@ UCASE( URI( YEAR( +GRAPH +BASE +PREFIX + ---------------------------------------------------- [ @@ -153,118 +157,66 @@ YEAR( ["keyword", "UUID"], ["keyword", "VALUES"], ["keyword", "WHERE"], - ["keyword", "ABS"], - ["punctuation", "("], - ["keyword", "AVG"], - ["punctuation", "("], - ["keyword", "BIND"], - ["punctuation", "("], - ["keyword", "BOUND"], - ["punctuation", "("], - ["keyword", "CEIL"], - ["punctuation", "("], - ["keyword", "COALESCE"], - ["punctuation", "("], - ["keyword", "CONCAT"], - ["punctuation", "("], - ["keyword", "CONTAINS"], - ["punctuation", "("], - ["keyword", "COUNT"], - ["punctuation", "("], - ["keyword", "DATATYPE"], - ["punctuation", "("], - ["keyword", "DAY"], - ["punctuation", "("], - ["keyword", "ENCODE_FOR_URI"], - ["punctuation", "("], - ["keyword", "FLOOR"], - ["punctuation", "("], - ["keyword", "GROUP_CONCAT"], - ["punctuation", "("], - ["keyword", "HOURS"], - ["punctuation", "("], - ["keyword", "IF"], - ["punctuation", "("], - ["keyword", "IRI"], - ["punctuation", "("], - ["keyword", "isBLANK"], - ["punctuation", "("], - ["keyword", "isIRI"], - ["punctuation", "("], - ["keyword", "isLITERAL"], - ["punctuation", "("], - ["keyword", "isNUMERIC"], - ["punctuation", "("], - ["keyword", "isURI"], - ["punctuation", "("], - ["keyword", "LANG"], - ["punctuation", "("], - ["keyword", "LANGMATCHES"], - ["punctuation", "("], - ["keyword", "LCASE"], - ["punctuation", "("], - ["keyword", "MAX"], - ["punctuation", "("], - ["keyword", "MD5"], - ["punctuation", "("], - ["keyword", "MIN"], - ["punctuation", "("], - ["keyword", "MINUTES"], - ["punctuation", "("], - ["keyword", "MONTH"], - ["punctuation", "("], - ["keyword", "ROUND"], - ["punctuation", "("], - ["keyword", "REGEX"], - ["punctuation", "("], - ["keyword", "REPLACE"], - ["punctuation", "("], - ["keyword", "sameTerm"], - ["punctuation", "("], - ["keyword", "SAMPLE"], - ["punctuation", "("], - ["keyword", "SECONDS"], - ["punctuation", "("], - ["keyword", "SHA1"], - ["punctuation", "("], - ["keyword", "SHA256"], - ["punctuation", "("], - ["keyword", "SHA384"], - ["punctuation", "("], - ["keyword", "SHA512"], - ["punctuation", "("], - ["keyword", "STR"], - ["punctuation", "("], - ["keyword", "STRAFTER"], - ["punctuation", "("], - ["keyword", "STRBEFORE"], - ["punctuation", "("], - ["keyword", "STRDT"], - ["punctuation", "("], - ["keyword", "STRENDS"], - ["punctuation", "("], - ["keyword", "STRLANG"], - ["punctuation", "("], - ["keyword", "STRLEN"], - ["punctuation", "("], - ["keyword", "STRSTARTS"], - ["punctuation", "("], - ["keyword", "SUBSTR"], - ["punctuation", "("], - ["keyword", "SUM"], - ["punctuation", "("], - ["keyword", "TIMEZONE"], - ["punctuation", "("], - ["keyword", "TZ"], - ["punctuation", "("], - ["keyword", "UCASE"], - ["punctuation", "("], - ["keyword", "URI"], - ["punctuation", "("], - ["keyword", "YEAR"], - ["punctuation", "("] -] + ["keyword", "ABS"], ["punctuation", "("], + ["keyword", "AVG"], ["punctuation", "("], + ["keyword", "BIND"], ["punctuation", "("], + ["keyword", "BOUND"], ["punctuation", "("], + ["keyword", "CEIL"], ["punctuation", "("], + ["keyword", "COALESCE"], ["punctuation", "("], + ["keyword", "CONCAT"], ["punctuation", "("], + ["keyword", "CONTAINS"], ["punctuation", "("], + ["keyword", "COUNT"], ["punctuation", "("], + ["keyword", "DATATYPE"], ["punctuation", "("], + ["keyword", "DAY"], ["punctuation", "("], + ["keyword", "ENCODE_FOR_URI"], ["punctuation", "("], + ["keyword", "FLOOR"], ["punctuation", "("], + ["keyword", "GROUP_CONCAT"], ["punctuation", "("], + ["keyword", "HOURS"], ["punctuation", "("], + ["keyword", "IF"], ["punctuation", "("], + ["keyword", "IRI"], ["punctuation", "("], + ["keyword", "isBLANK"], ["punctuation", "("], + ["keyword", "isIRI"], ["punctuation", "("], + ["keyword", "isLITERAL"], ["punctuation", "("], + ["keyword", "isNUMERIC"], ["punctuation", "("], + ["keyword", "isURI"], ["punctuation", "("], + ["keyword", "LANG"], ["punctuation", "("], + ["keyword", "LANGMATCHES"], ["punctuation", "("], + ["keyword", "LCASE"], ["punctuation", "("], + ["keyword", "MAX"], ["punctuation", "("], + ["keyword", "MD5"], ["punctuation", "("], + ["keyword", "MIN"], ["punctuation", "("], + ["keyword", "MINUTES"], ["punctuation", "("], + ["keyword", "MONTH"], ["punctuation", "("], + ["keyword", "ROUND"], ["punctuation", "("], + ["keyword", "REGEX"], ["punctuation", "("], + ["keyword", "REPLACE"], ["punctuation", "("], + ["keyword", "sameTerm"], ["punctuation", "("], + ["keyword", "SAMPLE"], ["punctuation", "("], + ["keyword", "SECONDS"], ["punctuation", "("], + ["keyword", "SHA1"], ["punctuation", "("], + ["keyword", "SHA256"], ["punctuation", "("], + ["keyword", "SHA384"], ["punctuation", "("], + ["keyword", "SHA512"], ["punctuation", "("], + ["keyword", "STR"], ["punctuation", "("], + ["keyword", "STRAFTER"], ["punctuation", "("], + ["keyword", "STRBEFORE"], ["punctuation", "("], + ["keyword", "STRDT"], ["punctuation", "("], + ["keyword", "STRENDS"], ["punctuation", "("], + ["keyword", "STRLANG"], ["punctuation", "("], + ["keyword", "STRLEN"], ["punctuation", "("], + ["keyword", "STRSTARTS"], ["punctuation", "("], + ["keyword", "SUBSTR"], ["punctuation", "("], + ["keyword", "SUM"], ["punctuation", "("], + ["keyword", "TIMEZONE"], ["punctuation", "("], + ["keyword", "TZ"], ["punctuation", "("], + ["keyword", "UCASE"], ["punctuation", "("], + ["keyword", "URI"], ["punctuation", "("], + ["keyword", "YEAR"], ["punctuation", "("], + ["keyword", "GRAPH"], + ["keyword", "BASE"], + ["keyword", "PREFIX"] +] ---------------------------------------------------- diff --git a/tests/languages/splunk-spl/boolean_feature.test b/tests/languages/splunk-spl/boolean_feature.test new file mode 100644 index 0000000000..22b8d3878a --- /dev/null +++ b/tests/languages/splunk-spl/boolean_feature.test @@ -0,0 +1,9 @@ +T F +true false + +---------------------------------------------------- + +[ + ["boolean", "T"], ["boolean", "F"], + ["boolean", "true"], ["boolean", "false"] +] diff --git a/tests/languages/splunk-spl/property_feature.test b/tests/languages/splunk-spl/property_feature.test new file mode 100644 index 0000000000..abf1af31da --- /dev/null +++ b/tests/languages/splunk-spl/property_feature.test @@ -0,0 +1,9 @@ +host="mailsecure_log" + +---------------------------------------------------- + +[ + ["property", "host"], + ["operator", "="], + ["string", "\"mailsecure_log\""] +] diff --git a/tests/languages/splunk-spl/punctuation_feature.test b/tests/languages/splunk-spl/punctuation_feature.test new file mode 100644 index 0000000000..553ff08f01 --- /dev/null +++ b/tests/languages/splunk-spl/punctuation_feature.test @@ -0,0 +1,11 @@ +( ) [ ] , + +---------------------------------------------------- + +[ + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", "["], + ["punctuation", "]"], + ["punctuation", ","] +] diff --git a/tests/languages/sqf/function_feature.test b/tests/languages/sqf/function_feature.test new file mode 100644 index 0000000000..8e45bb8fc7 --- /dev/null +++ b/tests/languages/sqf/function_feature.test @@ -0,0 +1,4397 @@ +abs +accTime +acos +action +actionIDs +actionKeys +actionKeysImages +actionKeysNames +actionKeysNamesArray +actionName +actionParams +activateAddons +activatedAddons +activateKey +add3DENConnection +add3DENEventHandler +add3DENLayer +addAction +addBackpack +addBackpackCargo +addBackpackCargoGlobal +addBackpackGlobal +addCamShake +addCuratorAddons +addCuratorCameraArea +addCuratorEditableObjects +addCuratorEditingArea +addCuratorPoints +addEditorObject +addEventHandler +addForce +addForceGeneratorRTD +addGoggles +addGroupIcon +addHandgunItem +addHeadgear +addItem +addItemCargo +addItemCargoGlobal +addItemPool +addItemToBackpack +addItemToUniform +addItemToVest +addLiveStats +addMagazine +addMagazineAmmoCargo +addMagazineCargo +addMagazineCargoGlobal +addMagazineGlobal +addMagazinePool +addMagazines +addMagazineTurret +addMenu +addMenuItem +addMissionEventHandler +addMPEventHandler +addMusicEventHandler +addOwnedMine +addPlayerScores +addPrimaryWeaponItem +addPublicVariableEventHandler +addRating +addResources +addScore +addScoreSide +addSecondaryWeaponItem +addSwitchableUnit +addTeamMember +addToRemainsCollector +addTorque +addUniform +addVehicle +addVest +addWaypoint +addWeapon +addWeaponCargo +addWeaponCargoGlobal +addWeaponGlobal +addWeaponItem +addWeaponPool +addWeaponTurret +admin +agent +agents +AGLToASL +aimedAtTarget +aimPos +airDensityCurveRTD +airDensityRTD +airplaneThrottle +airportSide +AISFinishHeal +alive +all3DENEntities +allAirports +allControls +allCurators +allCutLayers +allDead +allDeadMen +allDisplays +allGroups +allMapMarkers +allMines +allMissionObjects +allow3DMode +allowCrewInImmobile +allowCuratorLogicIgnoreAreas +allowDamage +allowDammage +allowFileOperations +allowFleeing +allowGetIn +allowSprint +allPlayers +allSimpleObjects +allSites +allTurrets +allUnits +allUnitsUAV +allVariables +ammo +ammoOnPylon +animate +animateBay +animateDoor +animatePylon +animateSource +animationNames +animationPhase +animationSourcePhase +animationState +append +apply +armoryPoints +arrayIntersect +asin +ASLToAGL +ASLToATL +assert +assignAsCargo +assignAsCargoIndex +assignAsCommander +assignAsDriver +assignAsGunner +assignAsTurret +assignCurator +assignedCargo +assignedCommander +assignedDriver +assignedGunner +assignedItems +assignedTarget +assignedTeam +assignedVehicle +assignedVehicleRole +assignItem +assignTeam +assignToAirport +atan +atan2 +atg +ATLToASL +attachedObject +attachedObjects +attachedTo +attachObject +attachTo +attackEnabled +backpack +backpackCargo +backpackContainer +backpackItems +backpackMagazines +backpackSpaceFor +behaviour +benchmark +binocular +blufor +boundingBox +boundingBoxReal +boundingCenter +briefingName +buildingExit +buildingPos +buldozer_EnableRoadDiag +buldozer_IsEnabledRoadDiag +buldozer_LoadNewRoads +buldozer_reloadOperMap +buttonAction +buttonSetAction +cadetMode +callExtension +camCommand +camCommit +camCommitPrepared +camCommitted +camConstuctionSetParams +camCreate +camDestroy +cameraEffect +cameraEffectEnableHUD +cameraInterest +cameraOn +cameraView +campaignConfigFile +camPreload +camPreloaded +camPrepareBank +camPrepareDir +camPrepareDive +camPrepareFocus +camPrepareFov +camPrepareFovRange +camPreparePos +camPrepareRelPos +camPrepareTarget +camSetBank +camSetDir +camSetDive +camSetFocus +camSetFov +camSetFovRange +camSetPos +camSetRelPos +camSetTarget +camTarget +camUseNVG +canAdd +canAddItemToBackpack +canAddItemToUniform +canAddItemToVest +cancelSimpleTaskDestination +canFire +canMove +canSlingLoad +canStand +canSuspend +canTriggerDynamicSimulation +canUnloadInCombat +canVehicleCargo +captive +captiveNum +cbChecked +cbSetChecked +ceil +channelEnabled +cheatsEnabled +checkAIFeature +checkVisibility +civilian +className +clear3DENAttribute +clear3DENInventory +clearAllItemsFromBackpack +clearBackpackCargo +clearBackpackCargoGlobal +clearForcesRTD +clearGroupIcons +clearItemCargo +clearItemCargoGlobal +clearItemPool +clearMagazineCargo +clearMagazineCargoGlobal +clearMagazinePool +clearOverlay +clearRadio +clearVehicleInit +clearWeaponCargo +clearWeaponCargoGlobal +clearWeaponPool +clientOwner +closeDialog +closeDisplay +closeOverlay +collapseObjectTree +collect3DENHistory +collectiveRTD +combatMode +commandArtilleryFire +commandChat +commander +commandFire +commandFollow +commandFSM +commandGetOut +commandingMenu +commandMove +commandRadio +commandStop +commandSuppressiveFire +commandTarget +commandWatch +comment +commitOverlay +compile +compileFinal +completedFSM +composeText +configClasses +configFile +configHierarchy +configName +configNull +configProperties +configSourceAddonList +configSourceMod +configSourceModList +confirmSensorTarget +connectTerminalToUAV +controlNull +controlsGroupCtrl +copyFromClipboard +copyToClipboard +copyWaypoints +cos +count +countEnemy +countFriendly +countSide +countType +countUnknown +create3DENComposition +create3DENEntity +createAgent +createCenter +createDialog +createDiaryLink +createDiaryRecord +createDiarySubject +createDisplay +createGearDialog +createGroup +createGuardedPoint +createLocation +createMarker +createMarkerLocal +createMenu +createMine +createMissionDisplay +createMPCampaignDisplay +createSimpleObject +createSimpleTask +createSite +createSoundSource +createTask +createTeam +createTrigger +createUnit +createVehicle +createVehicleCrew +createVehicleLocal +crew +ctAddHeader +ctAddRow +ctClear +ctCurSel +ctData +ctFindHeaderRows +ctFindRowHeader +ctHeaderControls +ctHeaderCount +ctRemoveHeaders +ctRemoveRows +ctrlActivate +ctrlAddEventHandler +ctrlAngle +ctrlAutoScrollDelay +ctrlAutoScrollRewind +ctrlAutoScrollSpeed +ctrlChecked +ctrlClassName +ctrlCommit +ctrlCommitted +ctrlCreate +ctrlDelete +ctrlEnable +ctrlEnabled +ctrlFade +ctrlHTMLLoaded +ctrlIDC +ctrlIDD +ctrlMapAnimAdd +ctrlMapAnimClear +ctrlMapAnimCommit +ctrlMapAnimDone +ctrlMapCursor +ctrlMapMouseOver +ctrlMapScale +ctrlMapScreenToWorld +ctrlMapWorldToScreen +ctrlModel +ctrlModelDirAndUp +ctrlModelScale +ctrlParent +ctrlParentControlsGroup +ctrlPosition +ctrlRemoveAllEventHandlers +ctrlRemoveEventHandler +ctrlScale +ctrlSetActiveColor +ctrlSetAngle +ctrlSetAutoScrollDelay +ctrlSetAutoScrollRewind +ctrlSetAutoScrollSpeed +ctrlSetBackgroundColor +ctrlSetChecked +ctrlSetDisabledColor +ctrlSetEventHandler +ctrlSetFade +ctrlSetFocus +ctrlSetFont +ctrlSetFontH1 +ctrlSetFontH1B +ctrlSetFontH2 +ctrlSetFontH2B +ctrlSetFontH3 +ctrlSetFontH3B +ctrlSetFontH4 +ctrlSetFontH4B +ctrlSetFontH5 +ctrlSetFontH5B +ctrlSetFontH6 +ctrlSetFontH6B +ctrlSetFontHeight +ctrlSetFontHeightH1 +ctrlSetFontHeightH2 +ctrlSetFontHeightH3 +ctrlSetFontHeightH4 +ctrlSetFontHeightH5 +ctrlSetFontHeightH6 +ctrlSetFontHeightSecondary +ctrlSetFontP +ctrlSetFontPB +ctrlSetFontSecondary +ctrlSetForegroundColor +ctrlSetModel +ctrlSetModelDirAndUp +ctrlSetModelScale +ctrlSetPixelPrecision +ctrlSetPosition +ctrlSetScale +ctrlSetStructuredText +ctrlSetText +ctrlSetTextColor +ctrlSetTextColorSecondary +ctrlSetTextSecondary +ctrlSetTooltip +ctrlSetTooltipColorBox +ctrlSetTooltipColorShade +ctrlSetTooltipColorText +ctrlShow +ctrlShown +ctrlText +ctrlTextHeight +ctrlTextSecondary +ctrlTextWidth +ctrlType +ctrlVisible +ctRowControls +ctRowCount +ctSetCurSel +ctSetData +ctSetHeaderTemplate +ctSetRowTemplate +ctSetValue +ctValue +curatorAddons +curatorCamera +curatorCameraArea +curatorCameraAreaCeiling +curatorCoef +curatorEditableObjects +curatorEditingArea +curatorEditingAreaType +curatorMouseOver +curatorPoints +curatorRegisteredObjects +curatorSelected +curatorWaypointCost +current3DENOperation +currentChannel +currentCommand +currentMagazine +currentMagazineDetail +currentMagazineDetailTurret +currentMagazineTurret +currentMuzzle +currentNamespace +currentTask +currentTasks +currentThrowable +currentVisionMode +currentWaypoint +currentWeapon +currentWeaponMode +currentWeaponTurret +currentZeroing +cursorObject +cursorTarget +customChat +customRadio +cutFadeOut +cutObj +cutRsc +cutText +damage +date +dateToNumber +daytime +deActivateKey +debriefingText +debugFSM +debugLog +deg +delete3DENEntities +deleteAt +deleteCenter +deleteCollection +deleteEditorObject +deleteGroup +deleteGroupWhenEmpty +deleteIdentity +deleteLocation +deleteMarker +deleteMarkerLocal +deleteRange +deleteResources +deleteSite +deleteStatus +deleteTeam +deleteVehicle +deleteVehicleCrew +deleteWaypoint +detach +detectedMines +diag_activeMissionFSMs +diag_activeScripts +diag_activeSQFScripts +diag_activeSQSScripts +diag_captureFrame +diag_captureFrameToFile +diag_captureSlowFrame +diag_codePerformance +diag_drawMode +diag_dynamicSimulationEnd +diag_enable +diag_enabled +diag_fps +diag_fpsMin +diag_frameNo +diag_lightNewLoad +diag_list +diag_log +diag_logSlowFrame +diag_mergeConfigFile +diag_recordTurretLimits +diag_setLightNew +diag_tickTime +diag_toggle +dialog +diarySubjectExists +didJIP +didJIPOwner +difficulty +difficultyEnabled +difficultyEnabledRTD +difficultyOption +direction +directSay +disableAI +disableCollisionWith +disableConversation +disableDebriefingStats +disableMapIndicators +disableNVGEquipment +disableRemoteSensors +disableSerialization +disableTIEquipment +disableUAVConnectability +disableUserInput +displayAddEventHandler +displayCtrl +displayNull +displayParent +displayRemoveAllEventHandlers +displayRemoveEventHandler +displaySetEventHandler +dissolveTeam +distance +distance2D +distanceSqr +distributionRegion +do3DENAction +doArtilleryFire +doFire +doFollow +doFSM +doGetOut +doMove +doorPhase +doStop +doSuppressiveFire +doTarget +doWatch +drawArrow +drawEllipse +drawIcon +drawIcon3D +drawLine +drawLine3D +drawLink +drawLocation +drawPolygon +drawRectangle +drawTriangle +driver +drop +dynamicSimulationDistance +dynamicSimulationDistanceCoef +dynamicSimulationEnabled +dynamicSimulationSystemEnabled +east +edit3DENMissionAttributes +editObject +editorSetEventHandler +effectiveCommander +emptyPositions +enableAI +enableAIFeature +enableAimPrecision +enableAttack +enableAudioFeature +enableAutoStartUpRTD +enableAutoTrimRTD +enableCamShake +enableCaustics +enableChannel +enableCollisionWith +enableCopilot +enableDebriefingStats +enableDiagLegend +enableDynamicSimulation +enableDynamicSimulationSystem +enableEndDialog +enableEngineArtillery +enableEnvironment +enableFatigue +enableGunLights +enableInfoPanelComponent +enableIRLasers +enableMimics +enablePersonTurret +enableRadio +enableReload +enableRopeAttach +enableSatNormalOnDetail +enableSaving +enableSentences +enableSimulation +enableSimulationGlobal +enableStamina +enableStressDamage +enableTeamSwitch +enableTraffic +enableUAVConnectability +enableUAVWaypoints +enableVehicleCargo +enableVehicleSensor +enableWeaponDisassembly +endl +endLoadingScreen +endMission +engineOn +enginesIsOnRTD +enginesPowerRTD +enginesRpmRTD +enginesTorqueRTD +entities +environmentEnabled +estimatedEndServerTime +estimatedTimeLeft +evalObjectArgument +everyBackpack +everyContainer +exec +execEditorScript +exp +expectedDestination +exportJIPMessages +eyeDirection +eyePos +face +faction +fadeMusic +fadeRadio +fadeSound +fadeSpeech +failMission +fillWeaponsFromPool +find +findCover +findDisplay +findEditorObject +findEmptyPosition +findEmptyPositionReady +findIf +findNearestEnemy +finishMissionInit +finite +fire +fireAtTarget +firstBackpack +flag +flagAnimationPhase +flagOwner +flagSide +flagTexture +fleeing +floor +flyInHeight +flyInHeightASL +fog +fogForecast +fogParams +forceAddUniform +forceAtPositionRTD +forcedMap +forceEnd +forceFlagTexture +forceFollowRoad +forceGeneratorRTD +forceMap +forceRespawn +forceSpeed +forceWalk +forceWeaponFire +forceWeatherChange +forgetTarget +format +formation +formationDirection +formationLeader +formationMembers +formationPosition +formationTask +formatText +formLeader +freeLook +fromEditor +fuel +fullCrew +gearIDCAmmoCount +gearSlotAmmoCount +gearSlotData +get3DENActionState +get3DENAttribute +get3DENCamera +get3DENConnections +get3DENEntity +get3DENEntityID +get3DENGrid +get3DENIconsVisible +get3DENLayerEntities +get3DENLinesVisible +get3DENMissionAttribute +get3DENMouseOver +get3DENSelected +getAimingCoef +getAllEnvSoundControllers +getAllHitPointsDamage +getAllOwnedMines +getAllSoundControllers +getAmmoCargo +getAnimAimPrecision +getAnimSpeedCoef +getArray +getArtilleryAmmo +getArtilleryComputerSettings +getArtilleryETA +getAssignedCuratorLogic +getAssignedCuratorUnit +getBackpackCargo +getBleedingRemaining +getBurningValue +getCameraViewDirection +getCargoIndex +getCenterOfMass +getClientState +getClientStateNumber +getCompatiblePylonMagazines +getConnectedUAV +getContainerMaxLoad +getCursorObjectParams +getCustomAimCoef +getDammage +getDescription +getDir +getDirVisual +getDLCAssetsUsage +getDLCAssetsUsageByName +getDLCs +getDLCUsageTime +getEditorCamera +getEditorMode +getEditorObjectScope +getElevationOffset +getEngineTargetRpmRTD +getEnvSoundController +getFatigue +getFieldManualStartPage +getForcedFlagTexture +getFriend +getFSMVariable +getFuelCargo +getGroupIcon +getGroupIconParams +getGroupIcons +getHideFrom +getHit +getHitIndex +getHitPointDamage +getItemCargo +getMagazineCargo +getMarkerColor +getMarkerPos +getMarkerSize +getMarkerType +getMass +getMissionConfig +getMissionConfigValue +getMissionDLCs +getMissionLayerEntities +getMissionLayers +getModelInfo +getMousePosition +getMusicPlayedTime +getNumber +getObjectArgument +getObjectChildren +getObjectDLC +getObjectMaterials +getObjectProxy +getObjectTextures +getObjectType +getObjectViewDistance +getOxygenRemaining +getPersonUsedDLCs +getPilotCameraDirection +getPilotCameraPosition +getPilotCameraRotation +getPilotCameraTarget +getPlateNumber +getPlayerChannel +getPlayerScores +getPlayerUID +getPlayerUIDOld +getPos +getPosASL +getPosASLVisual +getPosASLW +getPosATL +getPosATLVisual +getPosVisual +getPosWorld +getPylonMagazines +getRelDir +getRelPos +getRemoteSensorsDisabled +getRepairCargo +getResolution +getRotorBrakeRTD +getShadowDistance +getShotParents +getSlingLoad +getSoundController +getSoundControllerResult +getSpeed +getStamina +getStatValue +getSuppression +getTerrainGrid +getTerrainHeightASL +getText +getTotalDLCUsageTime +getTrimOffsetRTD +getUnitLoadout +getUnitTrait +getUserMFDText +getUserMFDValue +getVariable +getVehicleCargo +getWeaponCargo +getWeaponSway +getWingsOrientationRTD +getWingsPositionRTD +getWPPos +glanceAt +globalChat +globalRadio +goggles +group +groupChat +groupFromNetId +groupIconSelectable +groupIconsVisible +groupId +groupOwner +groupRadio +groupSelectedUnits +groupSelectUnit +grpNull +gunner +gusts +halt +handgunItems +handgunMagazine +handgunWeapon +handsHit +hasInterface +hasPilotCamera +hasWeapon +hcAllGroups +hcGroupParams +hcLeader +hcRemoveAllGroups +hcRemoveGroup +hcSelected +hcSelectGroup +hcSetGroup +hcShowBar +hcShownBar +headgear +hideBody +hideObject +hideObjectGlobal +hideSelection +hint +hintC +hintCadet +hintSilent +hmd +hostMission +htmlLoad +HUDMovementLevels +humidity +image +importAllGroups +importance +in +inArea +inAreaArray +incapacitatedState +independent +inflame +inflamed +infoPanel +infoPanelComponentEnabled +infoPanelComponents +infoPanels +inGameUISetEventHandler +inheritsFrom +initAmbientLife +inPolygon +inputAction +inRangeOfArtillery +insertEditorObject +intersect +is3DEN +is3DENMultiplayer +isAbleToBreathe +isAgent +isAimPrecisionEnabled +isArray +isAutoHoverOn +isAutonomous +isAutoStartUpEnabledRTD +isAutotest +isAutoTrimOnRTD +isBleeding +isBurning +isClass +isCollisionLightOn +isCopilotEnabled +isDamageAllowed +isDedicated +isDLCAvailable +isEngineOn +isEqualTo +isEqualType +isEqualTypeAll +isEqualTypeAny +isEqualTypeArray +isEqualTypeParams +isFilePatchingEnabled +isFlashlightOn +isFlatEmpty +isForcedWalk +isFormationLeader +isGroupDeletedWhenEmpty +isHidden +isInRemainsCollector +isInstructorFigureEnabled +isIRLaserOn +isKeyActive +isKindOf +isLaserOn +isLightOn +isLocalized +isManualFire +isMarkedForCollection +isMultiplayer +isMultiplayerSolo +isNil +isNull +isNumber +isObjectHidden +isObjectRTD +isOnRoad +isPipEnabled +isPlayer +isRealTime +isRemoteExecuted +isRemoteExecutedJIP +isServer +isShowing3DIcons +isSimpleObject +isSprintAllowed +isStaminaEnabled +isSteamMission +isStreamFriendlyUIEnabled +isStressDamageEnabled +isText +isTouchingGround +isTurnedOut +isTutHintsEnabled +isUAVConnectable +isUAVConnected +isUIContext +isUniformAllowed +isVehicleCargo +isVehicleRadarOn +isVehicleSensorEnabled +isWalking +isWeaponDeployed +isWeaponRested +itemCargo +items +itemsWithMagazines +join +joinAs +joinAsSilent +joinSilent +joinString +kbAddDatabase +kbAddDatabaseTargets +kbAddTopic +kbHasTopic +kbReact +kbRemoveTopic +kbTell +kbWasSaid +keyImage +keyName +knowsAbout +land +landAt +landResult +language +laserTarget +lbAdd +lbClear +lbColor +lbColorRight +lbCurSel +lbData +lbDelete +lbIsSelected +lbPicture +lbPictureRight +lbSelection +lbSetColor +lbSetColorRight +lbSetCurSel +lbSetData +lbSetPicture +lbSetPictureColor +lbSetPictureColorDisabled +lbSetPictureColorSelected +lbSetPictureRight +lbSetPictureRightColor +lbSetPictureRightColorDisabled +lbSetPictureRightColorSelected +lbSetSelectColor +lbSetSelectColorRight +lbSetSelected +lbSetText +lbSetTextRight +lbSetTooltip +lbSetValue +lbSize +lbSort +lbSortByValue +lbText +lbTextRight +lbValue +leader +leaderboardDeInit +leaderboardGetRows +leaderboardInit +leaderboardRequestRowsFriends +leaderboardRequestRowsGlobal +leaderboardRequestRowsGlobalAroundUser +leaderboardsRequestUploadScore +leaderboardsRequestUploadScoreKeepBest +leaderboardState +leaveVehicle +libraryCredits +libraryDisclaimers +lifeState +lightAttachObject +lightDetachObject +lightIsOn +lightnings +limitSpeed +linearConversion +lineBreak +lineIntersects +lineIntersectsObjs +lineIntersectsSurfaces +lineIntersectsWith +linkItem +list +listObjects +listRemoteTargets +listVehicleSensors +ln +lnbAddArray +lnbAddColumn +lnbAddRow +lnbClear +lnbColor +lnbColorRight +lnbCurSelRow +lnbData +lnbDeleteColumn +lnbDeleteRow +lnbGetColumnsPosition +lnbPicture +lnbPictureRight +lnbSetColor +lnbSetColorRight +lnbSetColumnsPos +lnbSetCurSelRow +lnbSetData +lnbSetPicture +lnbSetPictureColor +lnbSetPictureColorRight +lnbSetPictureColorSelected +lnbSetPictureColorSelectedRight +lnbSetPictureRight +lnbSetText +lnbSetTextRight +lnbSetValue +lnbSize +lnbSort +lnbSortByValue +lnbText +lnbTextRight +lnbValue +load +loadAbs +loadBackpack +loadFile +loadGame +loadIdentity +loadMagazine +loadOverlay +loadStatus +loadUniform +loadVest +local +localize +locationNull +locationPosition +lock +lockCameraTo +lockCargo +lockDriver +locked +lockedCargo +lockedDriver +lockedTurret +lockIdentity +lockTurret +lockWP +log +logEntities +logNetwork +logNetworkTerminate +lookAt +lookAtPos +magazineCargo +magazines +magazinesAllTurrets +magazinesAmmo +magazinesAmmoCargo +magazinesAmmoFull +magazinesDetail +magazinesDetailBackpack +magazinesDetailUniform +magazinesDetailVest +magazinesTurret +magazineTurretAmmo +mapAnimAdd +mapAnimClear +mapAnimCommit +mapAnimDone +mapCenterOnCamera +mapGridPosition +markAsFinishedOnSteam +markerAlpha +markerBrush +markerColor +markerDir +markerPos +markerShape +markerSize +markerText +markerType +max +members +menuAction +menuAdd +menuChecked +menuClear +menuCollapse +menuData +menuDelete +menuEnable +menuEnabled +menuExpand +menuHover +menuPicture +menuSetAction +menuSetCheck +menuSetData +menuSetPicture +menuSetValue +menuShortcut +menuShortcutText +menuSize +menuSort +menuText +menuURL +menuValue +min +mineActive +mineDetectedBy +missionConfigFile +missionDifficulty +missionName +missionNamespace +missionStart +missionVersion +modelToWorld +modelToWorldVisual +modelToWorldVisualWorld +modelToWorldWorld +modParams +moonIntensity +moonPhase +morale +move +move3DENCamera +moveInAny +moveInCargo +moveInCommander +moveInDriver +moveInGunner +moveInTurret +moveObjectToEnd +moveOut +moveTime +moveTo +moveToCompleted +moveToFailed +musicVolume +name +nameSound +nearEntities +nearestBuilding +nearestLocation +nearestLocations +nearestLocationWithDubbing +nearestObject +nearestObjects +nearestTerrainObjects +nearObjects +nearObjectsReady +nearRoads +nearSupplies +nearTargets +needReload +netId +netObjNull +newOverlay +nextMenuItemIndex +nextWeatherChange +nMenuItems +numberOfEnginesRTD +numberToDate +objectCurators +objectFromNetId +objectParent +objNull +objStatus +onBriefingGear +onBriefingGroup +onBriefingNotes +onBriefingPlan +onBriefingTeamSwitch +onCommandModeChanged +onDoubleClick +onEachFrame +onGroupIconClick +onGroupIconOverEnter +onGroupIconOverLeave +onHCGroupSelectionChanged +onMapSingleClick +onPlayerConnected +onPlayerDisconnected +onPreloadFinished +onPreloadStarted +onShowNewObject +onTeamSwitch +openCuratorInterface +openDLCPage +openDSInterface +openMap +openSteamApp +openYoutubeVideo +opfor +orderGetIn +overcast +overcastForecast +owner +param +params +parseNumber +parseSimpleArray +parseText +parsingNamespace +particlesQuality +pi +pickWeaponPool +pitch +pixelGrid +pixelGridBase +pixelGridNoUIScale +pixelH +pixelW +playableSlotsNumber +playableUnits +playAction +playActionNow +player +playerRespawnTime +playerSide +playersNumber +playGesture +playMission +playMove +playMoveNow +playMusic +playScriptedMission +playSound +playSound3D +position +positionCameraToWorld +posScreenToWorld +posWorldToScreen +ppEffectAdjust +ppEffectCommit +ppEffectCommitted +ppEffectCreate +ppEffectDestroy +ppEffectEnable +ppEffectEnabled +ppEffectForceInNVG +precision +preloadCamera +preloadObject +preloadSound +preloadTitleObj +preloadTitleRsc +primaryWeapon +primaryWeaponItems +primaryWeaponMagazine +priority +processDiaryLink +processInitCommands +productVersion +profileName +profileNamespace +profileNameSteam +progressLoadingScreen +progressPosition +progressSetPosition +publicVariable +publicVariableClient +publicVariableServer +pushBack +pushBackUnique +putWeaponPool +queryItemsPool +queryMagazinePool +queryWeaponPool +rad +radioChannelAdd +radioChannelCreate +radioChannelRemove +radioChannelSetCallSign +radioChannelSetLabel +radioVolume +rain +rainbow +random +rank +rankId +rating +rectangular +registeredTasks +registerTask +reload +reloadEnabled +remoteControl +remoteExec +remoteExecCall +remoteExecutedOwner +remove3DENConnection +remove3DENEventHandler +remove3DENLayer +removeAction +removeAll3DENEventHandlers +removeAllActions +removeAllAssignedItems +removeAllContainers +removeAllCuratorAddons +removeAllCuratorCameraAreas +removeAllCuratorEditingAreas +removeAllEventHandlers +removeAllHandgunItems +removeAllItems +removeAllItemsWithMagazines +removeAllMissionEventHandlers +removeAllMPEventHandlers +removeAllMusicEventHandlers +removeAllOwnedMines +removeAllPrimaryWeaponItems +removeAllWeapons +removeBackpack +removeBackpackGlobal +removeCuratorAddons +removeCuratorCameraArea +removeCuratorEditableObjects +removeCuratorEditingArea +removeDrawIcon +removeDrawLinks +removeEventHandler +removeFromRemainsCollector +removeGoggles +removeGroupIcon +removeHandgunItem +removeHeadgear +removeItem +removeItemFromBackpack +removeItemFromUniform +removeItemFromVest +removeItems +removeMagazine +removeMagazineGlobal +removeMagazines +removeMagazinesTurret +removeMagazineTurret +removeMenuItem +removeMissionEventHandler +removeMPEventHandler +removeMusicEventHandler +removeOwnedMine +removePrimaryWeaponItem +removeSecondaryWeaponItem +removeSimpleTask +removeSwitchableUnit +removeTeamMember +removeUniform +removeVest +removeWeapon +removeWeaponAttachmentCargo +removeWeaponCargo +removeWeaponGlobal +removeWeaponTurret +reportRemoteTarget +requiredVersion +resetCamShake +resetSubgroupDirection +resistance +resize +resources +respawnVehicle +restartEditorCamera +reveal +revealMine +reverse +reversedMouseY +roadAt +roadsConnectedTo +roleDescription +ropeAttachedObjects +ropeAttachedTo +ropeAttachEnabled +ropeAttachTo +ropeCreate +ropeCut +ropeDestroy +ropeDetach +ropeEndPosition +ropeLength +ropes +ropeUnwind +ropeUnwound +rotorsForcesRTD +rotorsRpmRTD +round +runInitScript +safeZoneH +safeZoneW +safeZoneWAbs +safeZoneX +safeZoneXAbs +safeZoneY +save3DENInventory +saveGame +saveIdentity +saveJoysticks +saveOverlay +saveProfileNamespace +saveStatus +saveVar +savingEnabled +say +say2D +say3D +score +scoreSide +screenshot +screenToWorld +scriptDone +scriptName +scriptNull +scudState +secondaryWeapon +secondaryWeaponItems +secondaryWeaponMagazine +select +selectBestPlaces +selectDiarySubject +selectedEditorObjects +selectEditorObject +selectionNames +selectionPosition +selectLeader +selectMax +selectMin +selectNoPlayer +selectPlayer +selectRandom +selectRandomWeighted +selectWeapon +selectWeaponTurret +sendAUMessage +sendSimpleCommand +sendTask +sendTaskResult +sendUDPMessage +serverCommand +serverCommandAvailable +serverCommandExecutable +serverName +serverTime +set +set3DENAttribute +set3DENAttributes +set3DENGrid +set3DENIconsVisible +set3DENLayer +set3DENLinesVisible +set3DENLogicType +set3DENMissionAttribute +set3DENMissionAttributes +set3DENModelsVisible +set3DENObjectType +set3DENSelected +setAccTime +setActualCollectiveRTD +setAirplaneThrottle +setAirportSide +setAmmo +setAmmoCargo +setAmmoOnPylon +setAnimSpeedCoef +setAperture +setApertureNew +setArmoryPoints +setAttributes +setAutonomous +setBehaviour +setBleedingRemaining +setBrakesRTD +setCameraInterest +setCamShakeDefParams +setCamShakeParams +setCamUseTI +setCaptive +setCenterOfMass +setCollisionLight +setCombatMode +setCompassOscillation +setConvoySeparation +setCuratorCameraAreaCeiling +setCuratorCoef +setCuratorEditingAreaType +setCuratorWaypointCost +setCurrentChannel +setCurrentTask +setCurrentWaypoint +setCustomAimCoef +setCustomWeightRTD +setDamage +setDammage +setDate +setDebriefingText +setDefaultCamera +setDestination +setDetailMapBlendPars +setDir +setDirection +setDrawIcon +setDriveOnPath +setDropInterval +setDynamicSimulationDistance +setDynamicSimulationDistanceCoef +setEditorMode +setEditorObjectScope +setEffectCondition +setEngineRpmRTD +setFace +setFaceAnimation +setFatigue +setFeatureType +setFlagAnimationPhase +setFlagOwner +setFlagSide +setFlagTexture +setFog +setForceGeneratorRTD +setFormation +setFormationTask +setFormDir +setFriend +setFromEditor +setFSMVariable +setFuel +setFuelCargo +setGroupIcon +setGroupIconParams +setGroupIconsSelectable +setGroupIconsVisible +setGroupId +setGroupIdGlobal +setGroupOwner +setGusts +setHideBehind +setHit +setHitIndex +setHitPointDamage +setHorizonParallaxCoef +setHUDMovementLevels +setIdentity +setImportance +setInfoPanel +setLeader +setLightAmbient +setLightAttenuation +setLightBrightness +setLightColor +setLightDayLight +setLightFlareMaxDistance +setLightFlareSize +setLightIntensity +setLightnings +setLightUseFlare +setLocalWindParams +setMagazineTurretAmmo +setMarkerAlpha +setMarkerAlphaLocal +setMarkerBrush +setMarkerBrushLocal +setMarkerColor +setMarkerColorLocal +setMarkerDir +setMarkerDirLocal +setMarkerPos +setMarkerPosLocal +setMarkerShape +setMarkerShapeLocal +setMarkerSize +setMarkerSizeLocal +setMarkerText +setMarkerTextLocal +setMarkerType +setMarkerTypeLocal +setMass +setMimic +setMousePosition +setMusicEffect +setMusicEventHandler +setName +setNameSound +setObjectArguments +setObjectMaterial +setObjectMaterialGlobal +setObjectProxy +setObjectTexture +setObjectTextureGlobal +setObjectViewDistance +setOvercast +setOwner +setOxygenRemaining +setParticleCircle +setParticleClass +setParticleFire +setParticleParams +setParticleRandom +setPilotCameraDirection +setPilotCameraRotation +setPilotCameraTarget +setPilotLight +setPiPEffect +setPitch +setPlateNumber +setPlayable +setPlayerRespawnTime +setPos +setPosASL +setPosASL2 +setPosASLW +setPosATL +setPosition +setPosWorld +setPylonLoadOut +setPylonsPriority +setRadioMsg +setRain +setRainbow +setRandomLip +setRank +setRectangular +setRepairCargo +setRotorBrakeRTD +setShadowDistance +setShotParents +setSide +setSimpleTaskAlwaysVisible +setSimpleTaskCustomData +setSimpleTaskDescription +setSimpleTaskDestination +setSimpleTaskTarget +setSimpleTaskType +setSimulWeatherLayers +setSize +setSkill +setSlingLoad +setSoundEffect +setSpeaker +setSpeech +setSpeedMode +setStamina +setStaminaScheme +setStatValue +setSuppression +setSystemOfUnits +setTargetAge +setTaskMarkerOffset +setTaskResult +setTaskState +setTerrainGrid +setText +setTimeMultiplier +setTitleEffect +setToneMapping +setToneMappingParams +setTrafficDensity +setTrafficDistance +setTrafficGap +setTrafficSpeed +setTriggerActivation +setTriggerArea +setTriggerStatements +setTriggerText +setTriggerTimeout +setTriggerType +setType +setUnconscious +setUnitAbility +setUnitLoadout +setUnitPos +setUnitPosWeak +setUnitRank +setUnitRecoilCoefficient +setUnitTrait +setUnloadInCombat +setUserActionText +setUserMFDText +setUserMFDValue +setVariable +setVectorDir +setVectorDirAndUp +setVectorUp +setVehicleAmmo +setVehicleAmmoDef +setVehicleArmor +setVehicleCargo +setVehicleId +setVehicleInit +setVehicleLock +setVehiclePosition +setVehicleRadar +setVehicleReceiveRemoteTargets +setVehicleReportOwnPosition +setVehicleReportRemoteTargets +setVehicleTIPars +setVehicleVarName +setVelocity +setVelocityModelSpace +setVelocityTransformation +setViewDistance +setVisibleIfTreeCollapsed +setWantedRpmRTD +setWaves +setWaypointBehaviour +setWaypointCombatMode +setWaypointCompletionRadius +setWaypointDescription +setWaypointForceBehaviour +setWaypointFormation +setWaypointHousePosition +setWaypointLoiterRadius +setWaypointLoiterType +setWaypointName +setWaypointPosition +setWaypointScript +setWaypointSpeed +setWaypointStatements +setWaypointTimeout +setWaypointType +setWaypointVisible +setWeaponReloadingTime +setWind +setWindDir +setWindForce +setWindStr +setWingForceScaleRTD +setWPPos +show3DIcons +showChat +showCinemaBorder +showCommandingMenu +showCompass +showCuratorCompass +showGPS +showHUD +showLegend +showMap +shownArtilleryComputer +shownChat +shownCompass +shownCuratorCompass +showNewEditorObject +shownGPS +shownHUD +shownMap +shownPad +shownRadio +shownScoretable +shownUAVFeed +shownWarrant +shownWatch +showPad +showRadio +showScoretable +showSubtitles +showUAVFeed +showWarrant +showWatch +showWaypoint +showWaypoints +side +sideAmbientLife +sideChat +sideEmpty +sideEnemy +sideFriendly +sideLogic +sideRadio +sideUnknown +simpleTasks +simulationEnabled +simulCloudDensity +simulCloudOcclusion +simulInClouds +simulWeatherSync +sin +size +sizeOf +skill +skillFinal +skipTime +sleep +sliderPosition +sliderRange +sliderSetPosition +sliderSetRange +sliderSetSpeed +sliderSpeed +slingLoadAssistantShown +soldierMagazines +someAmmo +sort +soundVolume +speaker +speed +speedMode +splitString +sqrt +squadParams +stance +startLoadingScreen +stop +stopEngineRTD +stopped +str +sunOrMoon +supportInfo +suppressFor +surfaceIsWater +surfaceNormal +surfaceType +swimInDepth +switchableUnits +switchAction +switchCamera +switchGesture +switchLight +switchMove +synchronizedObjects +synchronizedTriggers +synchronizedWaypoints +synchronizeObjectsAdd +synchronizeObjectsRemove +synchronizeTrigger +synchronizeWaypoint +systemChat +systemOfUnits +tan +targetKnowledge +targets +targetsAggregate +targetsQuery +taskAlwaysVisible +taskChildren +taskCompleted +taskCustomData +taskDescription +taskDestination +taskHint +taskMarkerOffset +taskNull +taskParent +taskResult +taskState +taskType +teamMember +teamMemberNull +teamName +teams +teamSwitch +teamSwitchEnabled +teamType +terminate +terrainIntersect +terrainIntersectASL +terrainIntersectAtASL +text +textLog +textLogFormat +tg +time +timeMultiplier +titleCut +titleFadeOut +titleObj +titleRsc +titleText +toArray +toFixed +toLower +toString +toUpper +triggerActivated +triggerActivation +triggerArea +triggerAttachedVehicle +triggerAttachObject +triggerAttachVehicle +triggerDynamicSimulation +triggerStatements +triggerText +triggerTimeout +triggerTimeoutCurrent +triggerType +turretLocal +turretOwner +turretUnit +tvAdd +tvClear +tvCollapse +tvCollapseAll +tvCount +tvCurSel +tvData +tvDelete +tvExpand +tvExpandAll +tvPicture +tvPictureRight +tvSetColor +tvSetCurSel +tvSetData +tvSetPicture +tvSetPictureColor +tvSetPictureColorDisabled +tvSetPictureColorSelected +tvSetPictureRight +tvSetPictureRightColor +tvSetPictureRightColorDisabled +tvSetPictureRightColorSelected +tvSetSelectColor +tvSetText +tvSetTooltip +tvSetValue +tvSort +tvSortByValue +tvText +tvTooltip +tvValue +type +typeName +typeOf +UAVControl +uiNamespace +uiSleep +unassignCurator +unassignItem +unassignTeam +unassignVehicle +underwater +uniform +uniformContainer +uniformItems +uniformMagazines +unitAddons +unitAimPosition +unitAimPositionVisual +unitBackpack +unitIsUAV +unitPos +unitReady +unitRecoilCoefficient +units +unitsBelowHeight +unlinkItem +unlockAchievement +unregisterTask +updateDrawIcon +updateMenuItem +updateObjectTree +useAIOperMapObstructionTest +useAISteeringComponent +useAudioTimeForMoves +userInputDisabled +vectorAdd +vectorCos +vectorCrossProduct +vectorDiff +vectorDir +vectorDirVisual +vectorDistance +vectorDistanceSqr +vectorDotProduct +vectorFromTo +vectorMagnitude +vectorMagnitudeSqr +vectorModelToWorld +vectorModelToWorldVisual +vectorMultiply +vectorNormalized +vectorUp +vectorUpVisual +vectorWorldToModel +vectorWorldToModelVisual +vehicle +vehicleCargoEnabled +vehicleChat +vehicleRadio +vehicleReceiveRemoteTargets +vehicleReportOwnPosition +vehicleReportRemoteTargets +vehicles +vehicleVarName +velocity +velocityModelSpace +verifySignature +vest +vestContainer +vestItems +vestMagazines +viewDistance +visibleCompass +visibleGPS +visibleMap +visiblePosition +visiblePositionASL +visibleScoretable +visibleWatch +waitUntil +waves +waypointAttachedObject +waypointAttachedVehicle +waypointAttachObject +waypointAttachVehicle +waypointBehaviour +waypointCombatMode +waypointCompletionRadius +waypointDescription +waypointForceBehaviour +waypointFormation +waypointHousePosition +waypointLoiterRadius +waypointLoiterType +waypointName +waypointPosition +waypoints +waypointScript +waypointsEnabledUAV +waypointShow +waypointSpeed +waypointStatements +waypointTimeout +waypointTimeoutCurrent +waypointType +waypointVisible +weaponAccessories +weaponAccessoriesCargo +weaponCargo +weaponDirection +weaponInertia +weaponLowered +weapons +weaponsItems +weaponsItemsCargo +weaponState +weaponsTurret +weightRTD +west +WFSideText +wind +windDir +windRTD +windStr +wingsForcesRTD +worldName +worldSize +worldToModel +worldToModelVisual +worldToScreen + +---------------------------------------------------- + +[ + ["function", "abs"], + ["function", "accTime"], + ["function", "acos"], + ["function", "action"], + ["function", "actionIDs"], + ["function", "actionKeys"], + ["function", "actionKeysImages"], + ["function", "actionKeysNames"], + ["function", "actionKeysNamesArray"], + ["function", "actionName"], + ["function", "actionParams"], + ["function", "activateAddons"], + ["function", "activatedAddons"], + ["function", "activateKey"], + ["function", "add3DENConnection"], + ["function", "add3DENEventHandler"], + ["function", "add3DENLayer"], + ["function", "addAction"], + ["function", "addBackpack"], + ["function", "addBackpackCargo"], + ["function", "addBackpackCargoGlobal"], + ["function", "addBackpackGlobal"], + ["function", "addCamShake"], + ["function", "addCuratorAddons"], + ["function", "addCuratorCameraArea"], + ["function", "addCuratorEditableObjects"], + ["function", "addCuratorEditingArea"], + ["function", "addCuratorPoints"], + ["function", "addEditorObject"], + ["function", "addEventHandler"], + ["function", "addForce"], + ["function", "addForceGeneratorRTD"], + ["function", "addGoggles"], + ["function", "addGroupIcon"], + ["function", "addHandgunItem"], + ["function", "addHeadgear"], + ["function", "addItem"], + ["function", "addItemCargo"], + ["function", "addItemCargoGlobal"], + ["function", "addItemPool"], + ["function", "addItemToBackpack"], + ["function", "addItemToUniform"], + ["function", "addItemToVest"], + ["function", "addLiveStats"], + ["function", "addMagazine"], + ["function", "addMagazineAmmoCargo"], + ["function", "addMagazineCargo"], + ["function", "addMagazineCargoGlobal"], + ["function", "addMagazineGlobal"], + ["function", "addMagazinePool"], + ["function", "addMagazines"], + ["function", "addMagazineTurret"], + ["function", "addMenu"], + ["function", "addMenuItem"], + ["function", "addMissionEventHandler"], + ["function", "addMPEventHandler"], + ["function", "addMusicEventHandler"], + ["function", "addOwnedMine"], + ["function", "addPlayerScores"], + ["function", "addPrimaryWeaponItem"], + ["function", "addPublicVariableEventHandler"], + ["function", "addRating"], + ["function", "addResources"], + ["function", "addScore"], + ["function", "addScoreSide"], + ["function", "addSecondaryWeaponItem"], + ["function", "addSwitchableUnit"], + ["function", "addTeamMember"], + ["function", "addToRemainsCollector"], + ["function", "addTorque"], + ["function", "addUniform"], + ["function", "addVehicle"], + ["function", "addVest"], + ["function", "addWaypoint"], + ["function", "addWeapon"], + ["function", "addWeaponCargo"], + ["function", "addWeaponCargoGlobal"], + ["function", "addWeaponGlobal"], + ["function", "addWeaponItem"], + ["function", "addWeaponPool"], + ["function", "addWeaponTurret"], + ["function", "admin"], + ["function", "agent"], + ["function", "agents"], + ["function", "AGLToASL"], + ["function", "aimedAtTarget"], + ["function", "aimPos"], + ["function", "airDensityCurveRTD"], + ["function", "airDensityRTD"], + ["function", "airplaneThrottle"], + ["function", "airportSide"], + ["function", "AISFinishHeal"], + ["function", "alive"], + ["function", "all3DENEntities"], + ["function", "allAirports"], + ["function", "allControls"], + ["function", "allCurators"], + ["function", "allCutLayers"], + ["function", "allDead"], + ["function", "allDeadMen"], + ["function", "allDisplays"], + ["function", "allGroups"], + ["function", "allMapMarkers"], + ["function", "allMines"], + ["function", "allMissionObjects"], + ["function", "allow3DMode"], + ["function", "allowCrewInImmobile"], + ["function", "allowCuratorLogicIgnoreAreas"], + ["function", "allowDamage"], + ["function", "allowDammage"], + ["function", "allowFileOperations"], + ["function", "allowFleeing"], + ["function", "allowGetIn"], + ["function", "allowSprint"], + ["function", "allPlayers"], + ["function", "allSimpleObjects"], + ["function", "allSites"], + ["function", "allTurrets"], + ["function", "allUnits"], + ["function", "allUnitsUAV"], + ["function", "allVariables"], + ["function", "ammo"], + ["function", "ammoOnPylon"], + ["function", "animate"], + ["function", "animateBay"], + ["function", "animateDoor"], + ["function", "animatePylon"], + ["function", "animateSource"], + ["function", "animationNames"], + ["function", "animationPhase"], + ["function", "animationSourcePhase"], + ["function", "animationState"], + ["function", "append"], + ["function", "apply"], + ["function", "armoryPoints"], + ["function", "arrayIntersect"], + ["function", "asin"], + ["function", "ASLToAGL"], + ["function", "ASLToATL"], + ["function", "assert"], + ["function", "assignAsCargo"], + ["function", "assignAsCargoIndex"], + ["function", "assignAsCommander"], + ["function", "assignAsDriver"], + ["function", "assignAsGunner"], + ["function", "assignAsTurret"], + ["function", "assignCurator"], + ["function", "assignedCargo"], + ["function", "assignedCommander"], + ["function", "assignedDriver"], + ["function", "assignedGunner"], + ["function", "assignedItems"], + ["function", "assignedTarget"], + ["function", "assignedTeam"], + ["function", "assignedVehicle"], + ["function", "assignedVehicleRole"], + ["function", "assignItem"], + ["function", "assignTeam"], + ["function", "assignToAirport"], + ["function", "atan"], + ["function", "atan2"], + ["function", "atg"], + ["function", "ATLToASL"], + ["function", "attachedObject"], + ["function", "attachedObjects"], + ["function", "attachedTo"], + ["function", "attachObject"], + ["function", "attachTo"], + ["function", "attackEnabled"], + ["function", "backpack"], + ["function", "backpackCargo"], + ["function", "backpackContainer"], + ["function", "backpackItems"], + ["function", "backpackMagazines"], + ["function", "backpackSpaceFor"], + ["function", "behaviour"], + ["function", "benchmark"], + ["function", "binocular"], + ["function", "blufor"], + ["function", "boundingBox"], + ["function", "boundingBoxReal"], + ["function", "boundingCenter"], + ["function", "briefingName"], + ["function", "buildingExit"], + ["function", "buildingPos"], + ["function", "buldozer_EnableRoadDiag"], + ["function", "buldozer_IsEnabledRoadDiag"], + ["function", "buldozer_LoadNewRoads"], + ["function", "buldozer_reloadOperMap"], + ["function", "buttonAction"], + ["function", "buttonSetAction"], + ["function", "cadetMode"], + ["function", "callExtension"], + ["function", "camCommand"], + ["function", "camCommit"], + ["function", "camCommitPrepared"], + ["function", "camCommitted"], + ["function", "camConstuctionSetParams"], + ["function", "camCreate"], + ["function", "camDestroy"], + ["function", "cameraEffect"], + ["function", "cameraEffectEnableHUD"], + ["function", "cameraInterest"], + ["function", "cameraOn"], + ["function", "cameraView"], + ["function", "campaignConfigFile"], + ["function", "camPreload"], + ["function", "camPreloaded"], + ["function", "camPrepareBank"], + ["function", "camPrepareDir"], + ["function", "camPrepareDive"], + ["function", "camPrepareFocus"], + ["function", "camPrepareFov"], + ["function", "camPrepareFovRange"], + ["function", "camPreparePos"], + ["function", "camPrepareRelPos"], + ["function", "camPrepareTarget"], + ["function", "camSetBank"], + ["function", "camSetDir"], + ["function", "camSetDive"], + ["function", "camSetFocus"], + ["function", "camSetFov"], + ["function", "camSetFovRange"], + ["function", "camSetPos"], + ["function", "camSetRelPos"], + ["function", "camSetTarget"], + ["function", "camTarget"], + ["function", "camUseNVG"], + ["function", "canAdd"], + ["function", "canAddItemToBackpack"], + ["function", "canAddItemToUniform"], + ["function", "canAddItemToVest"], + ["function", "cancelSimpleTaskDestination"], + ["function", "canFire"], + ["function", "canMove"], + ["function", "canSlingLoad"], + ["function", "canStand"], + ["function", "canSuspend"], + ["function", "canTriggerDynamicSimulation"], + ["function", "canUnloadInCombat"], + ["function", "canVehicleCargo"], + ["function", "captive"], + ["function", "captiveNum"], + ["function", "cbChecked"], + ["function", "cbSetChecked"], + ["function", "ceil"], + ["function", "channelEnabled"], + ["function", "cheatsEnabled"], + ["function", "checkAIFeature"], + ["function", "checkVisibility"], + ["function", "civilian"], + ["function", "className"], + ["function", "clear3DENAttribute"], + ["function", "clear3DENInventory"], + ["function", "clearAllItemsFromBackpack"], + ["function", "clearBackpackCargo"], + ["function", "clearBackpackCargoGlobal"], + ["function", "clearForcesRTD"], + ["function", "clearGroupIcons"], + ["function", "clearItemCargo"], + ["function", "clearItemCargoGlobal"], + ["function", "clearItemPool"], + ["function", "clearMagazineCargo"], + ["function", "clearMagazineCargoGlobal"], + ["function", "clearMagazinePool"], + ["function", "clearOverlay"], + ["function", "clearRadio"], + ["function", "clearVehicleInit"], + ["function", "clearWeaponCargo"], + ["function", "clearWeaponCargoGlobal"], + ["function", "clearWeaponPool"], + ["function", "clientOwner"], + ["function", "closeDialog"], + ["function", "closeDisplay"], + ["function", "closeOverlay"], + ["function", "collapseObjectTree"], + ["function", "collect3DENHistory"], + ["function", "collectiveRTD"], + ["function", "combatMode"], + ["function", "commandArtilleryFire"], + ["function", "commandChat"], + ["function", "commander"], + ["function", "commandFire"], + ["function", "commandFollow"], + ["function", "commandFSM"], + ["function", "commandGetOut"], + ["function", "commandingMenu"], + ["function", "commandMove"], + ["function", "commandRadio"], + ["function", "commandStop"], + ["function", "commandSuppressiveFire"], + ["function", "commandTarget"], + ["function", "commandWatch"], + ["function", "comment"], + ["function", "commitOverlay"], + ["function", "compile"], + ["function", "compileFinal"], + ["function", "completedFSM"], + ["function", "composeText"], + ["function", "configClasses"], + ["function", "configFile"], + ["function", "configHierarchy"], + ["function", "configName"], + ["function", "configNull"], + ["function", "configProperties"], + ["function", "configSourceAddonList"], + ["function", "configSourceMod"], + ["function", "configSourceModList"], + ["function", "confirmSensorTarget"], + ["function", "connectTerminalToUAV"], + ["function", "controlNull"], + ["function", "controlsGroupCtrl"], + ["function", "copyFromClipboard"], + ["function", "copyToClipboard"], + ["function", "copyWaypoints"], + ["function", "cos"], + ["function", "count"], + ["function", "countEnemy"], + ["function", "countFriendly"], + ["function", "countSide"], + ["function", "countType"], + ["function", "countUnknown"], + ["function", "create3DENComposition"], + ["function", "create3DENEntity"], + ["function", "createAgent"], + ["function", "createCenter"], + ["function", "createDialog"], + ["function", "createDiaryLink"], + ["function", "createDiaryRecord"], + ["function", "createDiarySubject"], + ["function", "createDisplay"], + ["function", "createGearDialog"], + ["function", "createGroup"], + ["function", "createGuardedPoint"], + ["function", "createLocation"], + ["function", "createMarker"], + ["function", "createMarkerLocal"], + ["function", "createMenu"], + ["function", "createMine"], + ["function", "createMissionDisplay"], + ["function", "createMPCampaignDisplay"], + ["function", "createSimpleObject"], + ["function", "createSimpleTask"], + ["function", "createSite"], + ["function", "createSoundSource"], + ["function", "createTask"], + ["function", "createTeam"], + ["function", "createTrigger"], + ["function", "createUnit"], + ["function", "createVehicle"], + ["function", "createVehicleCrew"], + ["function", "createVehicleLocal"], + ["function", "crew"], + ["function", "ctAddHeader"], + ["function", "ctAddRow"], + ["function", "ctClear"], + ["function", "ctCurSel"], + ["function", "ctData"], + ["function", "ctFindHeaderRows"], + ["function", "ctFindRowHeader"], + ["function", "ctHeaderControls"], + ["function", "ctHeaderCount"], + ["function", "ctRemoveHeaders"], + ["function", "ctRemoveRows"], + ["function", "ctrlActivate"], + ["function", "ctrlAddEventHandler"], + ["function", "ctrlAngle"], + ["function", "ctrlAutoScrollDelay"], + ["function", "ctrlAutoScrollRewind"], + ["function", "ctrlAutoScrollSpeed"], + ["function", "ctrlChecked"], + ["function", "ctrlClassName"], + ["function", "ctrlCommit"], + ["function", "ctrlCommitted"], + ["function", "ctrlCreate"], + ["function", "ctrlDelete"], + ["function", "ctrlEnable"], + ["function", "ctrlEnabled"], + ["function", "ctrlFade"], + ["function", "ctrlHTMLLoaded"], + ["function", "ctrlIDC"], + ["function", "ctrlIDD"], + ["function", "ctrlMapAnimAdd"], + ["function", "ctrlMapAnimClear"], + ["function", "ctrlMapAnimCommit"], + ["function", "ctrlMapAnimDone"], + ["function", "ctrlMapCursor"], + ["function", "ctrlMapMouseOver"], + ["function", "ctrlMapScale"], + ["function", "ctrlMapScreenToWorld"], + ["function", "ctrlMapWorldToScreen"], + ["function", "ctrlModel"], + ["function", "ctrlModelDirAndUp"], + ["function", "ctrlModelScale"], + ["function", "ctrlParent"], + ["function", "ctrlParentControlsGroup"], + ["function", "ctrlPosition"], + ["function", "ctrlRemoveAllEventHandlers"], + ["function", "ctrlRemoveEventHandler"], + ["function", "ctrlScale"], + ["function", "ctrlSetActiveColor"], + ["function", "ctrlSetAngle"], + ["function", "ctrlSetAutoScrollDelay"], + ["function", "ctrlSetAutoScrollRewind"], + ["function", "ctrlSetAutoScrollSpeed"], + ["function", "ctrlSetBackgroundColor"], + ["function", "ctrlSetChecked"], + ["function", "ctrlSetDisabledColor"], + ["function", "ctrlSetEventHandler"], + ["function", "ctrlSetFade"], + ["function", "ctrlSetFocus"], + ["function", "ctrlSetFont"], + ["function", "ctrlSetFontH1"], + ["function", "ctrlSetFontH1B"], + ["function", "ctrlSetFontH2"], + ["function", "ctrlSetFontH2B"], + ["function", "ctrlSetFontH3"], + ["function", "ctrlSetFontH3B"], + ["function", "ctrlSetFontH4"], + ["function", "ctrlSetFontH4B"], + ["function", "ctrlSetFontH5"], + ["function", "ctrlSetFontH5B"], + ["function", "ctrlSetFontH6"], + ["function", "ctrlSetFontH6B"], + ["function", "ctrlSetFontHeight"], + ["function", "ctrlSetFontHeightH1"], + ["function", "ctrlSetFontHeightH2"], + ["function", "ctrlSetFontHeightH3"], + ["function", "ctrlSetFontHeightH4"], + ["function", "ctrlSetFontHeightH5"], + ["function", "ctrlSetFontHeightH6"], + ["function", "ctrlSetFontHeightSecondary"], + ["function", "ctrlSetFontP"], + ["function", "ctrlSetFontPB"], + ["function", "ctrlSetFontSecondary"], + ["function", "ctrlSetForegroundColor"], + ["function", "ctrlSetModel"], + ["function", "ctrlSetModelDirAndUp"], + ["function", "ctrlSetModelScale"], + ["function", "ctrlSetPixelPrecision"], + ["function", "ctrlSetPosition"], + ["function", "ctrlSetScale"], + ["function", "ctrlSetStructuredText"], + ["function", "ctrlSetText"], + ["function", "ctrlSetTextColor"], + ["function", "ctrlSetTextColorSecondary"], + ["function", "ctrlSetTextSecondary"], + ["function", "ctrlSetTooltip"], + ["function", "ctrlSetTooltipColorBox"], + ["function", "ctrlSetTooltipColorShade"], + ["function", "ctrlSetTooltipColorText"], + ["function", "ctrlShow"], + ["function", "ctrlShown"], + ["function", "ctrlText"], + ["function", "ctrlTextHeight"], + ["function", "ctrlTextSecondary"], + ["function", "ctrlTextWidth"], + ["function", "ctrlType"], + ["function", "ctrlVisible"], + ["function", "ctRowControls"], + ["function", "ctRowCount"], + ["function", "ctSetCurSel"], + ["function", "ctSetData"], + ["function", "ctSetHeaderTemplate"], + ["function", "ctSetRowTemplate"], + ["function", "ctSetValue"], + ["function", "ctValue"], + ["function", "curatorAddons"], + ["function", "curatorCamera"], + ["function", "curatorCameraArea"], + ["function", "curatorCameraAreaCeiling"], + ["function", "curatorCoef"], + ["function", "curatorEditableObjects"], + ["function", "curatorEditingArea"], + ["function", "curatorEditingAreaType"], + ["function", "curatorMouseOver"], + ["function", "curatorPoints"], + ["function", "curatorRegisteredObjects"], + ["function", "curatorSelected"], + ["function", "curatorWaypointCost"], + ["function", "current3DENOperation"], + ["function", "currentChannel"], + ["function", "currentCommand"], + ["function", "currentMagazine"], + ["function", "currentMagazineDetail"], + ["function", "currentMagazineDetailTurret"], + ["function", "currentMagazineTurret"], + ["function", "currentMuzzle"], + ["function", "currentNamespace"], + ["function", "currentTask"], + ["function", "currentTasks"], + ["function", "currentThrowable"], + ["function", "currentVisionMode"], + ["function", "currentWaypoint"], + ["function", "currentWeapon"], + ["function", "currentWeaponMode"], + ["function", "currentWeaponTurret"], + ["function", "currentZeroing"], + ["function", "cursorObject"], + ["function", "cursorTarget"], + ["function", "customChat"], + ["function", "customRadio"], + ["function", "cutFadeOut"], + ["function", "cutObj"], + ["function", "cutRsc"], + ["function", "cutText"], + ["function", "damage"], + ["function", "date"], + ["function", "dateToNumber"], + ["function", "daytime"], + ["function", "deActivateKey"], + ["function", "debriefingText"], + ["function", "debugFSM"], + ["function", "debugLog"], + ["function", "deg"], + ["function", "delete3DENEntities"], + ["function", "deleteAt"], + ["function", "deleteCenter"], + ["function", "deleteCollection"], + ["function", "deleteEditorObject"], + ["function", "deleteGroup"], + ["function", "deleteGroupWhenEmpty"], + ["function", "deleteIdentity"], + ["function", "deleteLocation"], + ["function", "deleteMarker"], + ["function", "deleteMarkerLocal"], + ["function", "deleteRange"], + ["function", "deleteResources"], + ["function", "deleteSite"], + ["function", "deleteStatus"], + ["function", "deleteTeam"], + ["function", "deleteVehicle"], + ["function", "deleteVehicleCrew"], + ["function", "deleteWaypoint"], + ["function", "detach"], + ["function", "detectedMines"], + ["function", "diag_activeMissionFSMs"], + ["function", "diag_activeScripts"], + ["function", "diag_activeSQFScripts"], + ["function", "diag_activeSQSScripts"], + ["function", "diag_captureFrame"], + ["function", "diag_captureFrameToFile"], + ["function", "diag_captureSlowFrame"], + ["function", "diag_codePerformance"], + ["function", "diag_drawMode"], + ["function", "diag_dynamicSimulationEnd"], + ["function", "diag_enable"], + ["function", "diag_enabled"], + ["function", "diag_fps"], + ["function", "diag_fpsMin"], + ["function", "diag_frameNo"], + ["function", "diag_lightNewLoad"], + ["function", "diag_list"], + ["function", "diag_log"], + ["function", "diag_logSlowFrame"], + ["function", "diag_mergeConfigFile"], + ["function", "diag_recordTurretLimits"], + ["function", "diag_setLightNew"], + ["function", "diag_tickTime"], + ["function", "diag_toggle"], + ["function", "dialog"], + ["function", "diarySubjectExists"], + ["function", "didJIP"], + ["function", "didJIPOwner"], + ["function", "difficulty"], + ["function", "difficultyEnabled"], + ["function", "difficultyEnabledRTD"], + ["function", "difficultyOption"], + ["function", "direction"], + ["function", "directSay"], + ["function", "disableAI"], + ["function", "disableCollisionWith"], + ["function", "disableConversation"], + ["function", "disableDebriefingStats"], + ["function", "disableMapIndicators"], + ["function", "disableNVGEquipment"], + ["function", "disableRemoteSensors"], + ["function", "disableSerialization"], + ["function", "disableTIEquipment"], + ["function", "disableUAVConnectability"], + ["function", "disableUserInput"], + ["function", "displayAddEventHandler"], + ["function", "displayCtrl"], + ["function", "displayNull"], + ["function", "displayParent"], + ["function", "displayRemoveAllEventHandlers"], + ["function", "displayRemoveEventHandler"], + ["function", "displaySetEventHandler"], + ["function", "dissolveTeam"], + ["function", "distance"], + ["function", "distance2D"], + ["function", "distanceSqr"], + ["function", "distributionRegion"], + ["function", "do3DENAction"], + ["function", "doArtilleryFire"], + ["function", "doFire"], + ["function", "doFollow"], + ["function", "doFSM"], + ["function", "doGetOut"], + ["function", "doMove"], + ["function", "doorPhase"], + ["function", "doStop"], + ["function", "doSuppressiveFire"], + ["function", "doTarget"], + ["function", "doWatch"], + ["function", "drawArrow"], + ["function", "drawEllipse"], + ["function", "drawIcon"], + ["function", "drawIcon3D"], + ["function", "drawLine"], + ["function", "drawLine3D"], + ["function", "drawLink"], + ["function", "drawLocation"], + ["function", "drawPolygon"], + ["function", "drawRectangle"], + ["function", "drawTriangle"], + ["function", "driver"], + ["function", "drop"], + ["function", "dynamicSimulationDistance"], + ["function", "dynamicSimulationDistanceCoef"], + ["function", "dynamicSimulationEnabled"], + ["function", "dynamicSimulationSystemEnabled"], + ["function", "east"], + ["function", "edit3DENMissionAttributes"], + ["function", "editObject"], + ["function", "editorSetEventHandler"], + ["function", "effectiveCommander"], + ["function", "emptyPositions"], + ["function", "enableAI"], + ["function", "enableAIFeature"], + ["function", "enableAimPrecision"], + ["function", "enableAttack"], + ["function", "enableAudioFeature"], + ["function", "enableAutoStartUpRTD"], + ["function", "enableAutoTrimRTD"], + ["function", "enableCamShake"], + ["function", "enableCaustics"], + ["function", "enableChannel"], + ["function", "enableCollisionWith"], + ["function", "enableCopilot"], + ["function", "enableDebriefingStats"], + ["function", "enableDiagLegend"], + ["function", "enableDynamicSimulation"], + ["function", "enableDynamicSimulationSystem"], + ["function", "enableEndDialog"], + ["function", "enableEngineArtillery"], + ["function", "enableEnvironment"], + ["function", "enableFatigue"], + ["function", "enableGunLights"], + ["function", "enableInfoPanelComponent"], + ["function", "enableIRLasers"], + ["function", "enableMimics"], + ["function", "enablePersonTurret"], + ["function", "enableRadio"], + ["function", "enableReload"], + ["function", "enableRopeAttach"], + ["function", "enableSatNormalOnDetail"], + ["function", "enableSaving"], + ["function", "enableSentences"], + ["function", "enableSimulation"], + ["function", "enableSimulationGlobal"], + ["function", "enableStamina"], + ["function", "enableStressDamage"], + ["function", "enableTeamSwitch"], + ["function", "enableTraffic"], + ["function", "enableUAVConnectability"], + ["function", "enableUAVWaypoints"], + ["function", "enableVehicleCargo"], + ["function", "enableVehicleSensor"], + ["function", "enableWeaponDisassembly"], + ["function", "endl"], + ["function", "endLoadingScreen"], + ["function", "endMission"], + ["function", "engineOn"], + ["function", "enginesIsOnRTD"], + ["function", "enginesPowerRTD"], + ["function", "enginesRpmRTD"], + ["function", "enginesTorqueRTD"], + ["function", "entities"], + ["function", "environmentEnabled"], + ["function", "estimatedEndServerTime"], + ["function", "estimatedTimeLeft"], + ["function", "evalObjectArgument"], + ["function", "everyBackpack"], + ["function", "everyContainer"], + ["function", "exec"], + ["function", "execEditorScript"], + ["function", "exp"], + ["function", "expectedDestination"], + ["function", "exportJIPMessages"], + ["function", "eyeDirection"], + ["function", "eyePos"], + ["function", "face"], + ["function", "faction"], + ["function", "fadeMusic"], + ["function", "fadeRadio"], + ["function", "fadeSound"], + ["function", "fadeSpeech"], + ["function", "failMission"], + ["function", "fillWeaponsFromPool"], + ["function", "find"], + ["function", "findCover"], + ["function", "findDisplay"], + ["function", "findEditorObject"], + ["function", "findEmptyPosition"], + ["function", "findEmptyPositionReady"], + ["function", "findIf"], + ["function", "findNearestEnemy"], + ["function", "finishMissionInit"], + ["function", "finite"], + ["function", "fire"], + ["function", "fireAtTarget"], + ["function", "firstBackpack"], + ["function", "flag"], + ["function", "flagAnimationPhase"], + ["function", "flagOwner"], + ["function", "flagSide"], + ["function", "flagTexture"], + ["function", "fleeing"], + ["function", "floor"], + ["function", "flyInHeight"], + ["function", "flyInHeightASL"], + ["function", "fog"], + ["function", "fogForecast"], + ["function", "fogParams"], + ["function", "forceAddUniform"], + ["function", "forceAtPositionRTD"], + ["function", "forcedMap"], + ["function", "forceEnd"], + ["function", "forceFlagTexture"], + ["function", "forceFollowRoad"], + ["function", "forceGeneratorRTD"], + ["function", "forceMap"], + ["function", "forceRespawn"], + ["function", "forceSpeed"], + ["function", "forceWalk"], + ["function", "forceWeaponFire"], + ["function", "forceWeatherChange"], + ["function", "forgetTarget"], + ["function", "format"], + ["function", "formation"], + ["function", "formationDirection"], + ["function", "formationLeader"], + ["function", "formationMembers"], + ["function", "formationPosition"], + ["function", "formationTask"], + ["function", "formatText"], + ["function", "formLeader"], + ["function", "freeLook"], + ["function", "fromEditor"], + ["function", "fuel"], + ["function", "fullCrew"], + ["function", "gearIDCAmmoCount"], + ["function", "gearSlotAmmoCount"], + ["function", "gearSlotData"], + ["function", "get3DENActionState"], + ["function", "get3DENAttribute"], + ["function", "get3DENCamera"], + ["function", "get3DENConnections"], + ["function", "get3DENEntity"], + ["function", "get3DENEntityID"], + ["function", "get3DENGrid"], + ["function", "get3DENIconsVisible"], + ["function", "get3DENLayerEntities"], + ["function", "get3DENLinesVisible"], + ["function", "get3DENMissionAttribute"], + ["function", "get3DENMouseOver"], + ["function", "get3DENSelected"], + ["function", "getAimingCoef"], + ["function", "getAllEnvSoundControllers"], + ["function", "getAllHitPointsDamage"], + ["function", "getAllOwnedMines"], + ["function", "getAllSoundControllers"], + ["function", "getAmmoCargo"], + ["function", "getAnimAimPrecision"], + ["function", "getAnimSpeedCoef"], + ["function", "getArray"], + ["function", "getArtilleryAmmo"], + ["function", "getArtilleryComputerSettings"], + ["function", "getArtilleryETA"], + ["function", "getAssignedCuratorLogic"], + ["function", "getAssignedCuratorUnit"], + ["function", "getBackpackCargo"], + ["function", "getBleedingRemaining"], + ["function", "getBurningValue"], + ["function", "getCameraViewDirection"], + ["function", "getCargoIndex"], + ["function", "getCenterOfMass"], + ["function", "getClientState"], + ["function", "getClientStateNumber"], + ["function", "getCompatiblePylonMagazines"], + ["function", "getConnectedUAV"], + ["function", "getContainerMaxLoad"], + ["function", "getCursorObjectParams"], + ["function", "getCustomAimCoef"], + ["function", "getDammage"], + ["function", "getDescription"], + ["function", "getDir"], + ["function", "getDirVisual"], + ["function", "getDLCAssetsUsage"], + ["function", "getDLCAssetsUsageByName"], + ["function", "getDLCs"], + ["function", "getDLCUsageTime"], + ["function", "getEditorCamera"], + ["function", "getEditorMode"], + ["function", "getEditorObjectScope"], + ["function", "getElevationOffset"], + ["function", "getEngineTargetRpmRTD"], + ["function", "getEnvSoundController"], + ["function", "getFatigue"], + ["function", "getFieldManualStartPage"], + ["function", "getForcedFlagTexture"], + ["function", "getFriend"], + ["function", "getFSMVariable"], + ["function", "getFuelCargo"], + ["function", "getGroupIcon"], + ["function", "getGroupIconParams"], + ["function", "getGroupIcons"], + ["function", "getHideFrom"], + ["function", "getHit"], + ["function", "getHitIndex"], + ["function", "getHitPointDamage"], + ["function", "getItemCargo"], + ["function", "getMagazineCargo"], + ["function", "getMarkerColor"], + ["function", "getMarkerPos"], + ["function", "getMarkerSize"], + ["function", "getMarkerType"], + ["function", "getMass"], + ["function", "getMissionConfig"], + ["function", "getMissionConfigValue"], + ["function", "getMissionDLCs"], + ["function", "getMissionLayerEntities"], + ["function", "getMissionLayers"], + ["function", "getModelInfo"], + ["function", "getMousePosition"], + ["function", "getMusicPlayedTime"], + ["function", "getNumber"], + ["function", "getObjectArgument"], + ["function", "getObjectChildren"], + ["function", "getObjectDLC"], + ["function", "getObjectMaterials"], + ["function", "getObjectProxy"], + ["function", "getObjectTextures"], + ["function", "getObjectType"], + ["function", "getObjectViewDistance"], + ["function", "getOxygenRemaining"], + ["function", "getPersonUsedDLCs"], + ["function", "getPilotCameraDirection"], + ["function", "getPilotCameraPosition"], + ["function", "getPilotCameraRotation"], + ["function", "getPilotCameraTarget"], + ["function", "getPlateNumber"], + ["function", "getPlayerChannel"], + ["function", "getPlayerScores"], + ["function", "getPlayerUID"], + ["function", "getPlayerUIDOld"], + ["function", "getPos"], + ["function", "getPosASL"], + ["function", "getPosASLVisual"], + ["function", "getPosASLW"], + ["function", "getPosATL"], + ["function", "getPosATLVisual"], + ["function", "getPosVisual"], + ["function", "getPosWorld"], + ["function", "getPylonMagazines"], + ["function", "getRelDir"], + ["function", "getRelPos"], + ["function", "getRemoteSensorsDisabled"], + ["function", "getRepairCargo"], + ["function", "getResolution"], + ["function", "getRotorBrakeRTD"], + ["function", "getShadowDistance"], + ["function", "getShotParents"], + ["function", "getSlingLoad"], + ["function", "getSoundController"], + ["function", "getSoundControllerResult"], + ["function", "getSpeed"], + ["function", "getStamina"], + ["function", "getStatValue"], + ["function", "getSuppression"], + ["function", "getTerrainGrid"], + ["function", "getTerrainHeightASL"], + ["function", "getText"], + ["function", "getTotalDLCUsageTime"], + ["function", "getTrimOffsetRTD"], + ["function", "getUnitLoadout"], + ["function", "getUnitTrait"], + ["function", "getUserMFDText"], + ["function", "getUserMFDValue"], + ["function", "getVariable"], + ["function", "getVehicleCargo"], + ["function", "getWeaponCargo"], + ["function", "getWeaponSway"], + ["function", "getWingsOrientationRTD"], + ["function", "getWingsPositionRTD"], + ["function", "getWPPos"], + ["function", "glanceAt"], + ["function", "globalChat"], + ["function", "globalRadio"], + ["function", "goggles"], + ["function", "group"], + ["function", "groupChat"], + ["function", "groupFromNetId"], + ["function", "groupIconSelectable"], + ["function", "groupIconsVisible"], + ["function", "groupId"], + ["function", "groupOwner"], + ["function", "groupRadio"], + ["function", "groupSelectedUnits"], + ["function", "groupSelectUnit"], + ["function", "grpNull"], + ["function", "gunner"], + ["function", "gusts"], + ["function", "halt"], + ["function", "handgunItems"], + ["function", "handgunMagazine"], + ["function", "handgunWeapon"], + ["function", "handsHit"], + ["function", "hasInterface"], + ["function", "hasPilotCamera"], + ["function", "hasWeapon"], + ["function", "hcAllGroups"], + ["function", "hcGroupParams"], + ["function", "hcLeader"], + ["function", "hcRemoveAllGroups"], + ["function", "hcRemoveGroup"], + ["function", "hcSelected"], + ["function", "hcSelectGroup"], + ["function", "hcSetGroup"], + ["function", "hcShowBar"], + ["function", "hcShownBar"], + ["function", "headgear"], + ["function", "hideBody"], + ["function", "hideObject"], + ["function", "hideObjectGlobal"], + ["function", "hideSelection"], + ["function", "hint"], + ["function", "hintC"], + ["function", "hintCadet"], + ["function", "hintSilent"], + ["function", "hmd"], + ["function", "hostMission"], + ["function", "htmlLoad"], + ["function", "HUDMovementLevels"], + ["function", "humidity"], + ["function", "image"], + ["function", "importAllGroups"], + ["function", "importance"], + ["function", "in"], + ["function", "inArea"], + ["function", "inAreaArray"], + ["function", "incapacitatedState"], + ["function", "independent"], + ["function", "inflame"], + ["function", "inflamed"], + ["function", "infoPanel"], + ["function", "infoPanelComponentEnabled"], + ["function", "infoPanelComponents"], + ["function", "infoPanels"], + ["function", "inGameUISetEventHandler"], + ["function", "inheritsFrom"], + ["function", "initAmbientLife"], + ["function", "inPolygon"], + ["function", "inputAction"], + ["function", "inRangeOfArtillery"], + ["function", "insertEditorObject"], + ["function", "intersect"], + ["function", "is3DEN"], + ["function", "is3DENMultiplayer"], + ["function", "isAbleToBreathe"], + ["function", "isAgent"], + ["function", "isAimPrecisionEnabled"], + ["function", "isArray"], + ["function", "isAutoHoverOn"], + ["function", "isAutonomous"], + ["function", "isAutoStartUpEnabledRTD"], + ["function", "isAutotest"], + ["function", "isAutoTrimOnRTD"], + ["function", "isBleeding"], + ["function", "isBurning"], + ["function", "isClass"], + ["function", "isCollisionLightOn"], + ["function", "isCopilotEnabled"], + ["function", "isDamageAllowed"], + ["function", "isDedicated"], + ["function", "isDLCAvailable"], + ["function", "isEngineOn"], + ["function", "isEqualTo"], + ["function", "isEqualType"], + ["function", "isEqualTypeAll"], + ["function", "isEqualTypeAny"], + ["function", "isEqualTypeArray"], + ["function", "isEqualTypeParams"], + ["function", "isFilePatchingEnabled"], + ["function", "isFlashlightOn"], + ["function", "isFlatEmpty"], + ["function", "isForcedWalk"], + ["function", "isFormationLeader"], + ["function", "isGroupDeletedWhenEmpty"], + ["function", "isHidden"], + ["function", "isInRemainsCollector"], + ["function", "isInstructorFigureEnabled"], + ["function", "isIRLaserOn"], + ["function", "isKeyActive"], + ["function", "isKindOf"], + ["function", "isLaserOn"], + ["function", "isLightOn"], + ["function", "isLocalized"], + ["function", "isManualFire"], + ["function", "isMarkedForCollection"], + ["function", "isMultiplayer"], + ["function", "isMultiplayerSolo"], + ["function", "isNil"], + ["function", "isNull"], + ["function", "isNumber"], + ["function", "isObjectHidden"], + ["function", "isObjectRTD"], + ["function", "isOnRoad"], + ["function", "isPipEnabled"], + ["function", "isPlayer"], + ["function", "isRealTime"], + ["function", "isRemoteExecuted"], + ["function", "isRemoteExecutedJIP"], + ["function", "isServer"], + ["function", "isShowing3DIcons"], + ["function", "isSimpleObject"], + ["function", "isSprintAllowed"], + ["function", "isStaminaEnabled"], + ["function", "isSteamMission"], + ["function", "isStreamFriendlyUIEnabled"], + ["function", "isStressDamageEnabled"], + ["function", "isText"], + ["function", "isTouchingGround"], + ["function", "isTurnedOut"], + ["function", "isTutHintsEnabled"], + ["function", "isUAVConnectable"], + ["function", "isUAVConnected"], + ["function", "isUIContext"], + ["function", "isUniformAllowed"], + ["function", "isVehicleCargo"], + ["function", "isVehicleRadarOn"], + ["function", "isVehicleSensorEnabled"], + ["function", "isWalking"], + ["function", "isWeaponDeployed"], + ["function", "isWeaponRested"], + ["function", "itemCargo"], + ["function", "items"], + ["function", "itemsWithMagazines"], + ["function", "join"], + ["function", "joinAs"], + ["function", "joinAsSilent"], + ["function", "joinSilent"], + ["function", "joinString"], + ["function", "kbAddDatabase"], + ["function", "kbAddDatabaseTargets"], + ["function", "kbAddTopic"], + ["function", "kbHasTopic"], + ["function", "kbReact"], + ["function", "kbRemoveTopic"], + ["function", "kbTell"], + ["function", "kbWasSaid"], + ["function", "keyImage"], + ["function", "keyName"], + ["function", "knowsAbout"], + ["function", "land"], + ["function", "landAt"], + ["function", "landResult"], + ["function", "language"], + ["function", "laserTarget"], + ["function", "lbAdd"], + ["function", "lbClear"], + ["function", "lbColor"], + ["function", "lbColorRight"], + ["function", "lbCurSel"], + ["function", "lbData"], + ["function", "lbDelete"], + ["function", "lbIsSelected"], + ["function", "lbPicture"], + ["function", "lbPictureRight"], + ["function", "lbSelection"], + ["function", "lbSetColor"], + ["function", "lbSetColorRight"], + ["function", "lbSetCurSel"], + ["function", "lbSetData"], + ["function", "lbSetPicture"], + ["function", "lbSetPictureColor"], + ["function", "lbSetPictureColorDisabled"], + ["function", "lbSetPictureColorSelected"], + ["function", "lbSetPictureRight"], + ["function", "lbSetPictureRightColor"], + ["function", "lbSetPictureRightColorDisabled"], + ["function", "lbSetPictureRightColorSelected"], + ["function", "lbSetSelectColor"], + ["function", "lbSetSelectColorRight"], + ["function", "lbSetSelected"], + ["function", "lbSetText"], + ["function", "lbSetTextRight"], + ["function", "lbSetTooltip"], + ["function", "lbSetValue"], + ["function", "lbSize"], + ["function", "lbSort"], + ["function", "lbSortByValue"], + ["function", "lbText"], + ["function", "lbTextRight"], + ["function", "lbValue"], + ["function", "leader"], + ["function", "leaderboardDeInit"], + ["function", "leaderboardGetRows"], + ["function", "leaderboardInit"], + ["function", "leaderboardRequestRowsFriends"], + ["function", "leaderboardRequestRowsGlobal"], + ["function", "leaderboardRequestRowsGlobalAroundUser"], + ["function", "leaderboardsRequestUploadScore"], + ["function", "leaderboardsRequestUploadScoreKeepBest"], + ["function", "leaderboardState"], + ["function", "leaveVehicle"], + ["function", "libraryCredits"], + ["function", "libraryDisclaimers"], + ["function", "lifeState"], + ["function", "lightAttachObject"], + ["function", "lightDetachObject"], + ["function", "lightIsOn"], + ["function", "lightnings"], + ["function", "limitSpeed"], + ["function", "linearConversion"], + ["function", "lineBreak"], + ["function", "lineIntersects"], + ["function", "lineIntersectsObjs"], + ["function", "lineIntersectsSurfaces"], + ["function", "lineIntersectsWith"], + ["function", "linkItem"], + ["function", "list"], + ["function", "listObjects"], + ["function", "listRemoteTargets"], + ["function", "listVehicleSensors"], + ["function", "ln"], + ["function", "lnbAddArray"], + ["function", "lnbAddColumn"], + ["function", "lnbAddRow"], + ["function", "lnbClear"], + ["function", "lnbColor"], + ["function", "lnbColorRight"], + ["function", "lnbCurSelRow"], + ["function", "lnbData"], + ["function", "lnbDeleteColumn"], + ["function", "lnbDeleteRow"], + ["function", "lnbGetColumnsPosition"], + ["function", "lnbPicture"], + ["function", "lnbPictureRight"], + ["function", "lnbSetColor"], + ["function", "lnbSetColorRight"], + ["function", "lnbSetColumnsPos"], + ["function", "lnbSetCurSelRow"], + ["function", "lnbSetData"], + ["function", "lnbSetPicture"], + ["function", "lnbSetPictureColor"], + ["function", "lnbSetPictureColorRight"], + ["function", "lnbSetPictureColorSelected"], + ["function", "lnbSetPictureColorSelectedRight"], + ["function", "lnbSetPictureRight"], + ["function", "lnbSetText"], + ["function", "lnbSetTextRight"], + ["function", "lnbSetValue"], + ["function", "lnbSize"], + ["function", "lnbSort"], + ["function", "lnbSortByValue"], + ["function", "lnbText"], + ["function", "lnbTextRight"], + ["function", "lnbValue"], + ["function", "load"], + ["function", "loadAbs"], + ["function", "loadBackpack"], + ["function", "loadFile"], + ["function", "loadGame"], + ["function", "loadIdentity"], + ["function", "loadMagazine"], + ["function", "loadOverlay"], + ["function", "loadStatus"], + ["function", "loadUniform"], + ["function", "loadVest"], + ["function", "local"], + ["function", "localize"], + ["function", "locationNull"], + ["function", "locationPosition"], + ["function", "lock"], + ["function", "lockCameraTo"], + ["function", "lockCargo"], + ["function", "lockDriver"], + ["function", "locked"], + ["function", "lockedCargo"], + ["function", "lockedDriver"], + ["function", "lockedTurret"], + ["function", "lockIdentity"], + ["function", "lockTurret"], + ["function", "lockWP"], + ["function", "log"], + ["function", "logEntities"], + ["function", "logNetwork"], + ["function", "logNetworkTerminate"], + ["function", "lookAt"], + ["function", "lookAtPos"], + ["function", "magazineCargo"], + ["function", "magazines"], + ["function", "magazinesAllTurrets"], + ["function", "magazinesAmmo"], + ["function", "magazinesAmmoCargo"], + ["function", "magazinesAmmoFull"], + ["function", "magazinesDetail"], + ["function", "magazinesDetailBackpack"], + ["function", "magazinesDetailUniform"], + ["function", "magazinesDetailVest"], + ["function", "magazinesTurret"], + ["function", "magazineTurretAmmo"], + ["function", "mapAnimAdd"], + ["function", "mapAnimClear"], + ["function", "mapAnimCommit"], + ["function", "mapAnimDone"], + ["function", "mapCenterOnCamera"], + ["function", "mapGridPosition"], + ["function", "markAsFinishedOnSteam"], + ["function", "markerAlpha"], + ["function", "markerBrush"], + ["function", "markerColor"], + ["function", "markerDir"], + ["function", "markerPos"], + ["function", "markerShape"], + ["function", "markerSize"], + ["function", "markerText"], + ["function", "markerType"], + ["function", "max"], + ["function", "members"], + ["function", "menuAction"], + ["function", "menuAdd"], + ["function", "menuChecked"], + ["function", "menuClear"], + ["function", "menuCollapse"], + ["function", "menuData"], + ["function", "menuDelete"], + ["function", "menuEnable"], + ["function", "menuEnabled"], + ["function", "menuExpand"], + ["function", "menuHover"], + ["function", "menuPicture"], + ["function", "menuSetAction"], + ["function", "menuSetCheck"], + ["function", "menuSetData"], + ["function", "menuSetPicture"], + ["function", "menuSetValue"], + ["function", "menuShortcut"], + ["function", "menuShortcutText"], + ["function", "menuSize"], + ["function", "menuSort"], + ["function", "menuText"], + ["function", "menuURL"], + ["function", "menuValue"], + ["function", "min"], + ["function", "mineActive"], + ["function", "mineDetectedBy"], + ["function", "missionConfigFile"], + ["function", "missionDifficulty"], + ["function", "missionName"], + ["function", "missionNamespace"], + ["function", "missionStart"], + ["function", "missionVersion"], + ["function", "modelToWorld"], + ["function", "modelToWorldVisual"], + ["function", "modelToWorldVisualWorld"], + ["function", "modelToWorldWorld"], + ["function", "modParams"], + ["function", "moonIntensity"], + ["function", "moonPhase"], + ["function", "morale"], + ["function", "move"], + ["function", "move3DENCamera"], + ["function", "moveInAny"], + ["function", "moveInCargo"], + ["function", "moveInCommander"], + ["function", "moveInDriver"], + ["function", "moveInGunner"], + ["function", "moveInTurret"], + ["function", "moveObjectToEnd"], + ["function", "moveOut"], + ["function", "moveTime"], + ["function", "moveTo"], + ["function", "moveToCompleted"], + ["function", "moveToFailed"], + ["function", "musicVolume"], + ["function", "name"], + ["function", "nameSound"], + ["function", "nearEntities"], + ["function", "nearestBuilding"], + ["function", "nearestLocation"], + ["function", "nearestLocations"], + ["function", "nearestLocationWithDubbing"], + ["function", "nearestObject"], + ["function", "nearestObjects"], + ["function", "nearestTerrainObjects"], + ["function", "nearObjects"], + ["function", "nearObjectsReady"], + ["function", "nearRoads"], + ["function", "nearSupplies"], + ["function", "nearTargets"], + ["function", "needReload"], + ["function", "netId"], + ["function", "netObjNull"], + ["function", "newOverlay"], + ["function", "nextMenuItemIndex"], + ["function", "nextWeatherChange"], + ["function", "nMenuItems"], + ["function", "numberOfEnginesRTD"], + ["function", "numberToDate"], + ["function", "objectCurators"], + ["function", "objectFromNetId"], + ["function", "objectParent"], + ["function", "objNull"], + ["function", "objStatus"], + ["function", "onBriefingGear"], + ["function", "onBriefingGroup"], + ["function", "onBriefingNotes"], + ["function", "onBriefingPlan"], + ["function", "onBriefingTeamSwitch"], + ["function", "onCommandModeChanged"], + ["function", "onDoubleClick"], + ["function", "onEachFrame"], + ["function", "onGroupIconClick"], + ["function", "onGroupIconOverEnter"], + ["function", "onGroupIconOverLeave"], + ["function", "onHCGroupSelectionChanged"], + ["function", "onMapSingleClick"], + ["function", "onPlayerConnected"], + ["function", "onPlayerDisconnected"], + ["function", "onPreloadFinished"], + ["function", "onPreloadStarted"], + ["function", "onShowNewObject"], + ["function", "onTeamSwitch"], + ["function", "openCuratorInterface"], + ["function", "openDLCPage"], + ["function", "openDSInterface"], + ["function", "openMap"], + ["function", "openSteamApp"], + ["function", "openYoutubeVideo"], + ["function", "opfor"], + ["function", "orderGetIn"], + ["function", "overcast"], + ["function", "overcastForecast"], + ["function", "owner"], + ["function", "param"], + ["function", "params"], + ["function", "parseNumber"], + ["function", "parseSimpleArray"], + ["function", "parseText"], + ["function", "parsingNamespace"], + ["function", "particlesQuality"], + ["function", "pi"], + ["function", "pickWeaponPool"], + ["function", "pitch"], + ["function", "pixelGrid"], + ["function", "pixelGridBase"], + ["function", "pixelGridNoUIScale"], + ["function", "pixelH"], + ["function", "pixelW"], + ["function", "playableSlotsNumber"], + ["function", "playableUnits"], + ["function", "playAction"], + ["function", "playActionNow"], + ["function", "player"], + ["function", "playerRespawnTime"], + ["function", "playerSide"], + ["function", "playersNumber"], + ["function", "playGesture"], + ["function", "playMission"], + ["function", "playMove"], + ["function", "playMoveNow"], + ["function", "playMusic"], + ["function", "playScriptedMission"], + ["function", "playSound"], + ["function", "playSound3D"], + ["function", "position"], + ["function", "positionCameraToWorld"], + ["function", "posScreenToWorld"], + ["function", "posWorldToScreen"], + ["function", "ppEffectAdjust"], + ["function", "ppEffectCommit"], + ["function", "ppEffectCommitted"], + ["function", "ppEffectCreate"], + ["function", "ppEffectDestroy"], + ["function", "ppEffectEnable"], + ["function", "ppEffectEnabled"], + ["function", "ppEffectForceInNVG"], + ["function", "precision"], + ["function", "preloadCamera"], + ["function", "preloadObject"], + ["function", "preloadSound"], + ["function", "preloadTitleObj"], + ["function", "preloadTitleRsc"], + ["function", "primaryWeapon"], + ["function", "primaryWeaponItems"], + ["function", "primaryWeaponMagazine"], + ["function", "priority"], + ["function", "processDiaryLink"], + ["function", "processInitCommands"], + ["function", "productVersion"], + ["function", "profileName"], + ["function", "profileNamespace"], + ["function", "profileNameSteam"], + ["function", "progressLoadingScreen"], + ["function", "progressPosition"], + ["function", "progressSetPosition"], + ["function", "publicVariable"], + ["function", "publicVariableClient"], + ["function", "publicVariableServer"], + ["function", "pushBack"], + ["function", "pushBackUnique"], + ["function", "putWeaponPool"], + ["function", "queryItemsPool"], + ["function", "queryMagazinePool"], + ["function", "queryWeaponPool"], + ["function", "rad"], + ["function", "radioChannelAdd"], + ["function", "radioChannelCreate"], + ["function", "radioChannelRemove"], + ["function", "radioChannelSetCallSign"], + ["function", "radioChannelSetLabel"], + ["function", "radioVolume"], + ["function", "rain"], + ["function", "rainbow"], + ["function", "random"], + ["function", "rank"], + ["function", "rankId"], + ["function", "rating"], + ["function", "rectangular"], + ["function", "registeredTasks"], + ["function", "registerTask"], + ["function", "reload"], + ["function", "reloadEnabled"], + ["function", "remoteControl"], + ["function", "remoteExec"], + ["function", "remoteExecCall"], + ["function", "remoteExecutedOwner"], + ["function", "remove3DENConnection"], + ["function", "remove3DENEventHandler"], + ["function", "remove3DENLayer"], + ["function", "removeAction"], + ["function", "removeAll3DENEventHandlers"], + ["function", "removeAllActions"], + ["function", "removeAllAssignedItems"], + ["function", "removeAllContainers"], + ["function", "removeAllCuratorAddons"], + ["function", "removeAllCuratorCameraAreas"], + ["function", "removeAllCuratorEditingAreas"], + ["function", "removeAllEventHandlers"], + ["function", "removeAllHandgunItems"], + ["function", "removeAllItems"], + ["function", "removeAllItemsWithMagazines"], + ["function", "removeAllMissionEventHandlers"], + ["function", "removeAllMPEventHandlers"], + ["function", "removeAllMusicEventHandlers"], + ["function", "removeAllOwnedMines"], + ["function", "removeAllPrimaryWeaponItems"], + ["function", "removeAllWeapons"], + ["function", "removeBackpack"], + ["function", "removeBackpackGlobal"], + ["function", "removeCuratorAddons"], + ["function", "removeCuratorCameraArea"], + ["function", "removeCuratorEditableObjects"], + ["function", "removeCuratorEditingArea"], + ["function", "removeDrawIcon"], + ["function", "removeDrawLinks"], + ["function", "removeEventHandler"], + ["function", "removeFromRemainsCollector"], + ["function", "removeGoggles"], + ["function", "removeGroupIcon"], + ["function", "removeHandgunItem"], + ["function", "removeHeadgear"], + ["function", "removeItem"], + ["function", "removeItemFromBackpack"], + ["function", "removeItemFromUniform"], + ["function", "removeItemFromVest"], + ["function", "removeItems"], + ["function", "removeMagazine"], + ["function", "removeMagazineGlobal"], + ["function", "removeMagazines"], + ["function", "removeMagazinesTurret"], + ["function", "removeMagazineTurret"], + ["function", "removeMenuItem"], + ["function", "removeMissionEventHandler"], + ["function", "removeMPEventHandler"], + ["function", "removeMusicEventHandler"], + ["function", "removeOwnedMine"], + ["function", "removePrimaryWeaponItem"], + ["function", "removeSecondaryWeaponItem"], + ["function", "removeSimpleTask"], + ["function", "removeSwitchableUnit"], + ["function", "removeTeamMember"], + ["function", "removeUniform"], + ["function", "removeVest"], + ["function", "removeWeapon"], + ["function", "removeWeaponAttachmentCargo"], + ["function", "removeWeaponCargo"], + ["function", "removeWeaponGlobal"], + ["function", "removeWeaponTurret"], + ["function", "reportRemoteTarget"], + ["function", "requiredVersion"], + ["function", "resetCamShake"], + ["function", "resetSubgroupDirection"], + ["function", "resistance"], + ["function", "resize"], + ["function", "resources"], + ["function", "respawnVehicle"], + ["function", "restartEditorCamera"], + ["function", "reveal"], + ["function", "revealMine"], + ["function", "reverse"], + ["function", "reversedMouseY"], + ["function", "roadAt"], + ["function", "roadsConnectedTo"], + ["function", "roleDescription"], + ["function", "ropeAttachedObjects"], + ["function", "ropeAttachedTo"], + ["function", "ropeAttachEnabled"], + ["function", "ropeAttachTo"], + ["function", "ropeCreate"], + ["function", "ropeCut"], + ["function", "ropeDestroy"], + ["function", "ropeDetach"], + ["function", "ropeEndPosition"], + ["function", "ropeLength"], + ["function", "ropes"], + ["function", "ropeUnwind"], + ["function", "ropeUnwound"], + ["function", "rotorsForcesRTD"], + ["function", "rotorsRpmRTD"], + ["function", "round"], + ["function", "runInitScript"], + ["function", "safeZoneH"], + ["function", "safeZoneW"], + ["function", "safeZoneWAbs"], + ["function", "safeZoneX"], + ["function", "safeZoneXAbs"], + ["function", "safeZoneY"], + ["function", "save3DENInventory"], + ["function", "saveGame"], + ["function", "saveIdentity"], + ["function", "saveJoysticks"], + ["function", "saveOverlay"], + ["function", "saveProfileNamespace"], + ["function", "saveStatus"], + ["function", "saveVar"], + ["function", "savingEnabled"], + ["function", "say"], + ["function", "say2D"], + ["function", "say3D"], + ["function", "score"], + ["function", "scoreSide"], + ["function", "screenshot"], + ["function", "screenToWorld"], + ["function", "scriptDone"], + ["function", "scriptName"], + ["function", "scriptNull"], + ["function", "scudState"], + ["function", "secondaryWeapon"], + ["function", "secondaryWeaponItems"], + ["function", "secondaryWeaponMagazine"], + ["function", "select"], + ["function", "selectBestPlaces"], + ["function", "selectDiarySubject"], + ["function", "selectedEditorObjects"], + ["function", "selectEditorObject"], + ["function", "selectionNames"], + ["function", "selectionPosition"], + ["function", "selectLeader"], + ["function", "selectMax"], + ["function", "selectMin"], + ["function", "selectNoPlayer"], + ["function", "selectPlayer"], + ["function", "selectRandom"], + ["function", "selectRandomWeighted"], + ["function", "selectWeapon"], + ["function", "selectWeaponTurret"], + ["function", "sendAUMessage"], + ["function", "sendSimpleCommand"], + ["function", "sendTask"], + ["function", "sendTaskResult"], + ["function", "sendUDPMessage"], + ["function", "serverCommand"], + ["function", "serverCommandAvailable"], + ["function", "serverCommandExecutable"], + ["function", "serverName"], + ["function", "serverTime"], + ["function", "set"], + ["function", "set3DENAttribute"], + ["function", "set3DENAttributes"], + ["function", "set3DENGrid"], + ["function", "set3DENIconsVisible"], + ["function", "set3DENLayer"], + ["function", "set3DENLinesVisible"], + ["function", "set3DENLogicType"], + ["function", "set3DENMissionAttribute"], + ["function", "set3DENMissionAttributes"], + ["function", "set3DENModelsVisible"], + ["function", "set3DENObjectType"], + ["function", "set3DENSelected"], + ["function", "setAccTime"], + ["function", "setActualCollectiveRTD"], + ["function", "setAirplaneThrottle"], + ["function", "setAirportSide"], + ["function", "setAmmo"], + ["function", "setAmmoCargo"], + ["function", "setAmmoOnPylon"], + ["function", "setAnimSpeedCoef"], + ["function", "setAperture"], + ["function", "setApertureNew"], + ["function", "setArmoryPoints"], + ["function", "setAttributes"], + ["function", "setAutonomous"], + ["function", "setBehaviour"], + ["function", "setBleedingRemaining"], + ["function", "setBrakesRTD"], + ["function", "setCameraInterest"], + ["function", "setCamShakeDefParams"], + ["function", "setCamShakeParams"], + ["function", "setCamUseTI"], + ["function", "setCaptive"], + ["function", "setCenterOfMass"], + ["function", "setCollisionLight"], + ["function", "setCombatMode"], + ["function", "setCompassOscillation"], + ["function", "setConvoySeparation"], + ["function", "setCuratorCameraAreaCeiling"], + ["function", "setCuratorCoef"], + ["function", "setCuratorEditingAreaType"], + ["function", "setCuratorWaypointCost"], + ["function", "setCurrentChannel"], + ["function", "setCurrentTask"], + ["function", "setCurrentWaypoint"], + ["function", "setCustomAimCoef"], + ["function", "setCustomWeightRTD"], + ["function", "setDamage"], + ["function", "setDammage"], + ["function", "setDate"], + ["function", "setDebriefingText"], + ["function", "setDefaultCamera"], + ["function", "setDestination"], + ["function", "setDetailMapBlendPars"], + ["function", "setDir"], + ["function", "setDirection"], + ["function", "setDrawIcon"], + ["function", "setDriveOnPath"], + ["function", "setDropInterval"], + ["function", "setDynamicSimulationDistance"], + ["function", "setDynamicSimulationDistanceCoef"], + ["function", "setEditorMode"], + ["function", "setEditorObjectScope"], + ["function", "setEffectCondition"], + ["function", "setEngineRpmRTD"], + ["function", "setFace"], + ["function", "setFaceAnimation"], + ["function", "setFatigue"], + ["function", "setFeatureType"], + ["function", "setFlagAnimationPhase"], + ["function", "setFlagOwner"], + ["function", "setFlagSide"], + ["function", "setFlagTexture"], + ["function", "setFog"], + ["function", "setForceGeneratorRTD"], + ["function", "setFormation"], + ["function", "setFormationTask"], + ["function", "setFormDir"], + ["function", "setFriend"], + ["function", "setFromEditor"], + ["function", "setFSMVariable"], + ["function", "setFuel"], + ["function", "setFuelCargo"], + ["function", "setGroupIcon"], + ["function", "setGroupIconParams"], + ["function", "setGroupIconsSelectable"], + ["function", "setGroupIconsVisible"], + ["function", "setGroupId"], + ["function", "setGroupIdGlobal"], + ["function", "setGroupOwner"], + ["function", "setGusts"], + ["function", "setHideBehind"], + ["function", "setHit"], + ["function", "setHitIndex"], + ["function", "setHitPointDamage"], + ["function", "setHorizonParallaxCoef"], + ["function", "setHUDMovementLevels"], + ["function", "setIdentity"], + ["function", "setImportance"], + ["function", "setInfoPanel"], + ["function", "setLeader"], + ["function", "setLightAmbient"], + ["function", "setLightAttenuation"], + ["function", "setLightBrightness"], + ["function", "setLightColor"], + ["function", "setLightDayLight"], + ["function", "setLightFlareMaxDistance"], + ["function", "setLightFlareSize"], + ["function", "setLightIntensity"], + ["function", "setLightnings"], + ["function", "setLightUseFlare"], + ["function", "setLocalWindParams"], + ["function", "setMagazineTurretAmmo"], + ["function", "setMarkerAlpha"], + ["function", "setMarkerAlphaLocal"], + ["function", "setMarkerBrush"], + ["function", "setMarkerBrushLocal"], + ["function", "setMarkerColor"], + ["function", "setMarkerColorLocal"], + ["function", "setMarkerDir"], + ["function", "setMarkerDirLocal"], + ["function", "setMarkerPos"], + ["function", "setMarkerPosLocal"], + ["function", "setMarkerShape"], + ["function", "setMarkerShapeLocal"], + ["function", "setMarkerSize"], + ["function", "setMarkerSizeLocal"], + ["function", "setMarkerText"], + ["function", "setMarkerTextLocal"], + ["function", "setMarkerType"], + ["function", "setMarkerTypeLocal"], + ["function", "setMass"], + ["function", "setMimic"], + ["function", "setMousePosition"], + ["function", "setMusicEffect"], + ["function", "setMusicEventHandler"], + ["function", "setName"], + ["function", "setNameSound"], + ["function", "setObjectArguments"], + ["function", "setObjectMaterial"], + ["function", "setObjectMaterialGlobal"], + ["function", "setObjectProxy"], + ["function", "setObjectTexture"], + ["function", "setObjectTextureGlobal"], + ["function", "setObjectViewDistance"], + ["function", "setOvercast"], + ["function", "setOwner"], + ["function", "setOxygenRemaining"], + ["function", "setParticleCircle"], + ["function", "setParticleClass"], + ["function", "setParticleFire"], + ["function", "setParticleParams"], + ["function", "setParticleRandom"], + ["function", "setPilotCameraDirection"], + ["function", "setPilotCameraRotation"], + ["function", "setPilotCameraTarget"], + ["function", "setPilotLight"], + ["function", "setPiPEffect"], + ["function", "setPitch"], + ["function", "setPlateNumber"], + ["function", "setPlayable"], + ["function", "setPlayerRespawnTime"], + ["function", "setPos"], + ["function", "setPosASL"], + ["function", "setPosASL2"], + ["function", "setPosASLW"], + ["function", "setPosATL"], + ["function", "setPosition"], + ["function", "setPosWorld"], + ["function", "setPylonLoadOut"], + ["function", "setPylonsPriority"], + ["function", "setRadioMsg"], + ["function", "setRain"], + ["function", "setRainbow"], + ["function", "setRandomLip"], + ["function", "setRank"], + ["function", "setRectangular"], + ["function", "setRepairCargo"], + ["function", "setRotorBrakeRTD"], + ["function", "setShadowDistance"], + ["function", "setShotParents"], + ["function", "setSide"], + ["function", "setSimpleTaskAlwaysVisible"], + ["function", "setSimpleTaskCustomData"], + ["function", "setSimpleTaskDescription"], + ["function", "setSimpleTaskDestination"], + ["function", "setSimpleTaskTarget"], + ["function", "setSimpleTaskType"], + ["function", "setSimulWeatherLayers"], + ["function", "setSize"], + ["function", "setSkill"], + ["function", "setSlingLoad"], + ["function", "setSoundEffect"], + ["function", "setSpeaker"], + ["function", "setSpeech"], + ["function", "setSpeedMode"], + ["function", "setStamina"], + ["function", "setStaminaScheme"], + ["function", "setStatValue"], + ["function", "setSuppression"], + ["function", "setSystemOfUnits"], + ["function", "setTargetAge"], + ["function", "setTaskMarkerOffset"], + ["function", "setTaskResult"], + ["function", "setTaskState"], + ["function", "setTerrainGrid"], + ["function", "setText"], + ["function", "setTimeMultiplier"], + ["function", "setTitleEffect"], + ["function", "setToneMapping"], + ["function", "setToneMappingParams"], + ["function", "setTrafficDensity"], + ["function", "setTrafficDistance"], + ["function", "setTrafficGap"], + ["function", "setTrafficSpeed"], + ["function", "setTriggerActivation"], + ["function", "setTriggerArea"], + ["function", "setTriggerStatements"], + ["function", "setTriggerText"], + ["function", "setTriggerTimeout"], + ["function", "setTriggerType"], + ["function", "setType"], + ["function", "setUnconscious"], + ["function", "setUnitAbility"], + ["function", "setUnitLoadout"], + ["function", "setUnitPos"], + ["function", "setUnitPosWeak"], + ["function", "setUnitRank"], + ["function", "setUnitRecoilCoefficient"], + ["function", "setUnitTrait"], + ["function", "setUnloadInCombat"], + ["function", "setUserActionText"], + ["function", "setUserMFDText"], + ["function", "setUserMFDValue"], + ["function", "setVariable"], + ["function", "setVectorDir"], + ["function", "setVectorDirAndUp"], + ["function", "setVectorUp"], + ["function", "setVehicleAmmo"], + ["function", "setVehicleAmmoDef"], + ["function", "setVehicleArmor"], + ["function", "setVehicleCargo"], + ["function", "setVehicleId"], + ["function", "setVehicleInit"], + ["function", "setVehicleLock"], + ["function", "setVehiclePosition"], + ["function", "setVehicleRadar"], + ["function", "setVehicleReceiveRemoteTargets"], + ["function", "setVehicleReportOwnPosition"], + ["function", "setVehicleReportRemoteTargets"], + ["function", "setVehicleTIPars"], + ["function", "setVehicleVarName"], + ["function", "setVelocity"], + ["function", "setVelocityModelSpace"], + ["function", "setVelocityTransformation"], + ["function", "setViewDistance"], + ["function", "setVisibleIfTreeCollapsed"], + ["function", "setWantedRpmRTD"], + ["function", "setWaves"], + ["function", "setWaypointBehaviour"], + ["function", "setWaypointCombatMode"], + ["function", "setWaypointCompletionRadius"], + ["function", "setWaypointDescription"], + ["function", "setWaypointForceBehaviour"], + ["function", "setWaypointFormation"], + ["function", "setWaypointHousePosition"], + ["function", "setWaypointLoiterRadius"], + ["function", "setWaypointLoiterType"], + ["function", "setWaypointName"], + ["function", "setWaypointPosition"], + ["function", "setWaypointScript"], + ["function", "setWaypointSpeed"], + ["function", "setWaypointStatements"], + ["function", "setWaypointTimeout"], + ["function", "setWaypointType"], + ["function", "setWaypointVisible"], + ["function", "setWeaponReloadingTime"], + ["function", "setWind"], + ["function", "setWindDir"], + ["function", "setWindForce"], + ["function", "setWindStr"], + ["function", "setWingForceScaleRTD"], + ["function", "setWPPos"], + ["function", "show3DIcons"], + ["function", "showChat"], + ["function", "showCinemaBorder"], + ["function", "showCommandingMenu"], + ["function", "showCompass"], + ["function", "showCuratorCompass"], + ["function", "showGPS"], + ["function", "showHUD"], + ["function", "showLegend"], + ["function", "showMap"], + ["function", "shownArtilleryComputer"], + ["function", "shownChat"], + ["function", "shownCompass"], + ["function", "shownCuratorCompass"], + ["function", "showNewEditorObject"], + ["function", "shownGPS"], + ["function", "shownHUD"], + ["function", "shownMap"], + ["function", "shownPad"], + ["function", "shownRadio"], + ["function", "shownScoretable"], + ["function", "shownUAVFeed"], + ["function", "shownWarrant"], + ["function", "shownWatch"], + ["function", "showPad"], + ["function", "showRadio"], + ["function", "showScoretable"], + ["function", "showSubtitles"], + ["function", "showUAVFeed"], + ["function", "showWarrant"], + ["function", "showWatch"], + ["function", "showWaypoint"], + ["function", "showWaypoints"], + ["function", "side"], + ["function", "sideAmbientLife"], + ["function", "sideChat"], + ["function", "sideEmpty"], + ["function", "sideEnemy"], + ["function", "sideFriendly"], + ["function", "sideLogic"], + ["function", "sideRadio"], + ["function", "sideUnknown"], + ["function", "simpleTasks"], + ["function", "simulationEnabled"], + ["function", "simulCloudDensity"], + ["function", "simulCloudOcclusion"], + ["function", "simulInClouds"], + ["function", "simulWeatherSync"], + ["function", "sin"], + ["function", "size"], + ["function", "sizeOf"], + ["function", "skill"], + ["function", "skillFinal"], + ["function", "skipTime"], + ["function", "sleep"], + ["function", "sliderPosition"], + ["function", "sliderRange"], + ["function", "sliderSetPosition"], + ["function", "sliderSetRange"], + ["function", "sliderSetSpeed"], + ["function", "sliderSpeed"], + ["function", "slingLoadAssistantShown"], + ["function", "soldierMagazines"], + ["function", "someAmmo"], + ["function", "sort"], + ["function", "soundVolume"], + ["function", "speaker"], + ["function", "speed"], + ["function", "speedMode"], + ["function", "splitString"], + ["function", "sqrt"], + ["function", "squadParams"], + ["function", "stance"], + ["function", "startLoadingScreen"], + ["function", "stop"], + ["function", "stopEngineRTD"], + ["function", "stopped"], + ["function", "str"], + ["function", "sunOrMoon"], + ["function", "supportInfo"], + ["function", "suppressFor"], + ["function", "surfaceIsWater"], + ["function", "surfaceNormal"], + ["function", "surfaceType"], + ["function", "swimInDepth"], + ["function", "switchableUnits"], + ["function", "switchAction"], + ["function", "switchCamera"], + ["function", "switchGesture"], + ["function", "switchLight"], + ["function", "switchMove"], + ["function", "synchronizedObjects"], + ["function", "synchronizedTriggers"], + ["function", "synchronizedWaypoints"], + ["function", "synchronizeObjectsAdd"], + ["function", "synchronizeObjectsRemove"], + ["function", "synchronizeTrigger"], + ["function", "synchronizeWaypoint"], + ["function", "systemChat"], + ["function", "systemOfUnits"], + ["function", "tan"], + ["function", "targetKnowledge"], + ["function", "targets"], + ["function", "targetsAggregate"], + ["function", "targetsQuery"], + ["function", "taskAlwaysVisible"], + ["function", "taskChildren"], + ["function", "taskCompleted"], + ["function", "taskCustomData"], + ["function", "taskDescription"], + ["function", "taskDestination"], + ["function", "taskHint"], + ["function", "taskMarkerOffset"], + ["function", "taskNull"], + ["function", "taskParent"], + ["function", "taskResult"], + ["function", "taskState"], + ["function", "taskType"], + ["function", "teamMember"], + ["function", "teamMemberNull"], + ["function", "teamName"], + ["function", "teams"], + ["function", "teamSwitch"], + ["function", "teamSwitchEnabled"], + ["function", "teamType"], + ["function", "terminate"], + ["function", "terrainIntersect"], + ["function", "terrainIntersectASL"], + ["function", "terrainIntersectAtASL"], + ["function", "text"], + ["function", "textLog"], + ["function", "textLogFormat"], + ["function", "tg"], + ["function", "time"], + ["function", "timeMultiplier"], + ["function", "titleCut"], + ["function", "titleFadeOut"], + ["function", "titleObj"], + ["function", "titleRsc"], + ["function", "titleText"], + ["function", "toArray"], + ["function", "toFixed"], + ["function", "toLower"], + ["function", "toString"], + ["function", "toUpper"], + ["function", "triggerActivated"], + ["function", "triggerActivation"], + ["function", "triggerArea"], + ["function", "triggerAttachedVehicle"], + ["function", "triggerAttachObject"], + ["function", "triggerAttachVehicle"], + ["function", "triggerDynamicSimulation"], + ["function", "triggerStatements"], + ["function", "triggerText"], + ["function", "triggerTimeout"], + ["function", "triggerTimeoutCurrent"], + ["function", "triggerType"], + ["function", "turretLocal"], + ["function", "turretOwner"], + ["function", "turretUnit"], + ["function", "tvAdd"], + ["function", "tvClear"], + ["function", "tvCollapse"], + ["function", "tvCollapseAll"], + ["function", "tvCount"], + ["function", "tvCurSel"], + ["function", "tvData"], + ["function", "tvDelete"], + ["function", "tvExpand"], + ["function", "tvExpandAll"], + ["function", "tvPicture"], + ["function", "tvPictureRight"], + ["function", "tvSetColor"], + ["function", "tvSetCurSel"], + ["function", "tvSetData"], + ["function", "tvSetPicture"], + ["function", "tvSetPictureColor"], + ["function", "tvSetPictureColorDisabled"], + ["function", "tvSetPictureColorSelected"], + ["function", "tvSetPictureRight"], + ["function", "tvSetPictureRightColor"], + ["function", "tvSetPictureRightColorDisabled"], + ["function", "tvSetPictureRightColorSelected"], + ["function", "tvSetSelectColor"], + ["function", "tvSetText"], + ["function", "tvSetTooltip"], + ["function", "tvSetValue"], + ["function", "tvSort"], + ["function", "tvSortByValue"], + ["function", "tvText"], + ["function", "tvTooltip"], + ["function", "tvValue"], + ["function", "type"], + ["function", "typeName"], + ["function", "typeOf"], + ["function", "UAVControl"], + ["function", "uiNamespace"], + ["function", "uiSleep"], + ["function", "unassignCurator"], + ["function", "unassignItem"], + ["function", "unassignTeam"], + ["function", "unassignVehicle"], + ["function", "underwater"], + ["function", "uniform"], + ["function", "uniformContainer"], + ["function", "uniformItems"], + ["function", "uniformMagazines"], + ["function", "unitAddons"], + ["function", "unitAimPosition"], + ["function", "unitAimPositionVisual"], + ["function", "unitBackpack"], + ["function", "unitIsUAV"], + ["function", "unitPos"], + ["function", "unitReady"], + ["function", "unitRecoilCoefficient"], + ["function", "units"], + ["function", "unitsBelowHeight"], + ["function", "unlinkItem"], + ["function", "unlockAchievement"], + ["function", "unregisterTask"], + ["function", "updateDrawIcon"], + ["function", "updateMenuItem"], + ["function", "updateObjectTree"], + ["function", "useAIOperMapObstructionTest"], + ["function", "useAISteeringComponent"], + ["function", "useAudioTimeForMoves"], + ["function", "userInputDisabled"], + ["function", "vectorAdd"], + ["function", "vectorCos"], + ["function", "vectorCrossProduct"], + ["function", "vectorDiff"], + ["function", "vectorDir"], + ["function", "vectorDirVisual"], + ["function", "vectorDistance"], + ["function", "vectorDistanceSqr"], + ["function", "vectorDotProduct"], + ["function", "vectorFromTo"], + ["function", "vectorMagnitude"], + ["function", "vectorMagnitudeSqr"], + ["function", "vectorModelToWorld"], + ["function", "vectorModelToWorldVisual"], + ["function", "vectorMultiply"], + ["function", "vectorNormalized"], + ["function", "vectorUp"], + ["function", "vectorUpVisual"], + ["function", "vectorWorldToModel"], + ["function", "vectorWorldToModelVisual"], + ["function", "vehicle"], + ["function", "vehicleCargoEnabled"], + ["function", "vehicleChat"], + ["function", "vehicleRadio"], + ["function", "vehicleReceiveRemoteTargets"], + ["function", "vehicleReportOwnPosition"], + ["function", "vehicleReportRemoteTargets"], + ["function", "vehicles"], + ["function", "vehicleVarName"], + ["function", "velocity"], + ["function", "velocityModelSpace"], + ["function", "verifySignature"], + ["function", "vest"], + ["function", "vestContainer"], + ["function", "vestItems"], + ["function", "vestMagazines"], + ["function", "viewDistance"], + ["function", "visibleCompass"], + ["function", "visibleGPS"], + ["function", "visibleMap"], + ["function", "visiblePosition"], + ["function", "visiblePositionASL"], + ["function", "visibleScoretable"], + ["function", "visibleWatch"], + ["function", "waitUntil"], + ["function", "waves"], + ["function", "waypointAttachedObject"], + ["function", "waypointAttachedVehicle"], + ["function", "waypointAttachObject"], + ["function", "waypointAttachVehicle"], + ["function", "waypointBehaviour"], + ["function", "waypointCombatMode"], + ["function", "waypointCompletionRadius"], + ["function", "waypointDescription"], + ["function", "waypointForceBehaviour"], + ["function", "waypointFormation"], + ["function", "waypointHousePosition"], + ["function", "waypointLoiterRadius"], + ["function", "waypointLoiterType"], + ["function", "waypointName"], + ["function", "waypointPosition"], + ["function", "waypoints"], + ["function", "waypointScript"], + ["function", "waypointsEnabledUAV"], + ["function", "waypointShow"], + ["function", "waypointSpeed"], + ["function", "waypointStatements"], + ["function", "waypointTimeout"], + ["function", "waypointTimeoutCurrent"], + ["function", "waypointType"], + ["function", "waypointVisible"], + ["function", "weaponAccessories"], + ["function", "weaponAccessoriesCargo"], + ["function", "weaponCargo"], + ["function", "weaponDirection"], + ["function", "weaponInertia"], + ["function", "weaponLowered"], + ["function", "weapons"], + ["function", "weaponsItems"], + ["function", "weaponsItemsCargo"], + ["function", "weaponState"], + ["function", "weaponsTurret"], + ["function", "weightRTD"], + ["function", "west"], + ["function", "WFSideText"], + ["function", "wind"], + ["function", "windDir"], + ["function", "windRTD"], + ["function", "windStr"], + ["function", "wingsForcesRTD"], + ["function", "worldName"], + ["function", "worldSize"], + ["function", "worldToModel"], + ["function", "worldToModelVisual"], + ["function", "worldToScreen"] +] diff --git a/tests/languages/sql+sas/sql_inclusion.test b/tests/languages/sql+sas/sql_inclusion.test index 4b4bd553c1..4aca904d09 100644 --- a/tests/languages/sql+sas/sql_inclusion.test +++ b/tests/languages/sql+sas/sql_inclusion.test @@ -38,193 +38,234 @@ proc sql; select * form proclib.jobs(pw=red); title +proc sql; + connect to oracle as ora2 (user=user-id password=password); + select * from connection to ora2 (select lname, fname, state from staff); + disconnect from ora2; +quit; + ---------------------------------------------------- [ ["step", "proc sql"], ["punctuation", ";"], - ["proc-sql", - [ - ["sql", - [ - ["keyword", "select"], - ["operator", "*"], - ["keyword", "from"], - " proclib", - ["punctuation", "."], - "paylist", - ["punctuation", ";"] - ] - ] - ] - ], + ["proc-sql", [ + ["sql", [ + ["keyword", "select"], + ["operator", "*"], + + ["keyword", "from"], + " proclib", + ["punctuation", "."], + "paylist", + ["punctuation", ";"] + ]] + ]], ["step", "proc print"], ["punctuation", ";"], + ["step", "proc sql"], - ["proc-args", - [ - ["arg", "outobs"], - ["operator", "="], - ["number", "10"], - ["punctuation", ";"] - ] - ], - ["proc-sql", - [ - ["global-statements", "title"], - ["string", "'Proclib.Payroll'"], - ["punctuation", ";"], - ["sql", - [ - ["keyword", "select"], - ["operator", "*"], - ["keyword", "from"], - " proclib", - ["punctuation", "."], - "payroll", - ["punctuation", ";"] - ] - ], - ["global-statements", "title"], + ["proc-args", [ + ["arg", "outobs"], + ["operator", "="], + ["number", "10"], + ["punctuation", ";"] + ]], + ["proc-sql", [ + ["global-statements", "title"], + ["string", "'Proclib.Payroll'"], + ["punctuation", ";"], + + ["sql", [ + ["keyword", "select"], + ["operator", "*"], + ["keyword", "from"], + " proclib", + ["punctuation", "."], + "payroll", ["punctuation", ";"] - ] - ], + ]], + + ["global-statements", "title"], + ["punctuation", ";"] + ]], ["step", "quit"], ["punctuation", ";"], + ["step", "proc sql"], ["punctuation", ";"], - ["proc-sql", - [ - ["sql", - [ - ["keyword", "select"], - " BookingDate", - ["punctuation", ","], - "\r\n\tReleaseDate", - ["punctuation", ","], - "\r\n\tReleaseCode\r\n\t", - ["keyword", "from"], - " SASclass", - ["punctuation", "."], - "Bookings", - ["punctuation", ";"] - ] - ] - ] - ], + ["proc-sql", [ + ["sql", [ + ["keyword", "select"], + " BookingDate", + ["punctuation", ","], + + "\r\n\tReleaseDate", + ["punctuation", ","], + + "\r\n\tReleaseCode\r\n\t", + + ["keyword", "from"], + " SASclass", + ["punctuation", "."], + "Bookings", + ["punctuation", ";"] + ]] + ]], ["step", "quit"], ["punctuation", ";"], + ["step", "proc sql"], ["punctuation", ";"], - ["proc-sql", - [ - ["sql", - [ - ["keyword", "select"], - " BookingDate", - ["punctuation", ","], - "\r\n\tReleaseDate", - ["punctuation", ","], - "\r\n\tReleaseCode\r\n\t", - ["keyword", "from"], - " SASclass", - ["punctuation", "."], - "Bookings", - ["punctuation", ";"] - ] - ] - ] - ], + ["proc-sql", [ + ["sql", [ + ["keyword", "select"], + " BookingDate", + ["punctuation", ","], + + "\r\n\tReleaseDate", + ["punctuation", ","], + + "\r\n\tReleaseCode\r\n\t", + + ["keyword", "from"], + " SASclass", + ["punctuation", "."], + "Bookings", + ["punctuation", ";"] + ]] + ]], ["step", "quit"], ["punctuation", ";"], + ["keyword", "libname"], " proclib ", ["string", "'SAS-library'"], ["punctuation", ";"], + + ["step", "proc sql"], + ["punctuation", ";"], + ["proc-sql", [ + ["sql", [ + ["keyword", "create"], + ["keyword", "view"], + " proclib", + ["punctuation", "."], + "jobs", + ["punctuation", "("], + "pw", + ["operator", "-"], + "red", + ["punctuation", ")"], + ["keyword", "as"], + + ["keyword", "select"], + " Jobcode", + ["punctuation", ","], + + ["function", "count"], + ["punctuation", "("], + "jobcode", + ["punctuation", ")"], + ["keyword", "as"], + " number label", + ["operator", "="], + ["string", "'Number'"], + ["punctuation", ","], + + ["function", "avg"], + ["punctuation", "("], + ["keyword", "int"], + ["punctuation", "("], + "today", + ["punctuation", "("], + ["punctuation", ")"], + ["operator", "-"], + "birth", + ["operator", "/"], + ["number", "365.25"], + ["punctuation", ")"], + ["punctuation", ")"], + ["keyword", "as"], + " avgage\r\n\t\t\tformat", + ["operator", "="], + ["number", "2."], + " label", + ["operator", "="], + ["string", "'Average Salary'"], + + ["keyword", "from"], + " Payroll\r\n\t", + + ["keyword", "group"], + ["keyword", "by"], + " Jobcode\r\n\t", + + ["keyword", "having"], + " avage ge ", + ["number", "30"], + ["punctuation", ";"] + ]], + + ["global-statements", "title1"], + ["string", "'Current Summary Information for Each Job category'"], + ["punctuation", ";"], + + ["global-statements", "title2"], + ["string", "'Average Age Greater Than or Equal to 30'"], + ["punctuation", ";"], + + ["sql", [ + ["keyword", "select"], + ["operator", "*"], + " form proclib", + ["punctuation", "."], + "jobs", + ["punctuation", "("], + "pw", + ["operator", "="], + "red", + ["punctuation", ")"], + ["punctuation", ";"] + ]], + + ["global-statements", "title"] + ]], ["step", "proc sql"], ["punctuation", ";"], - ["proc-sql", - [ - ["sql", - [ - ["keyword", "create"], - ["keyword", "view"], - " proclib", - ["punctuation", "."], - "jobs", - ["punctuation", "("], - "pw", - ["operator", "-"], - "red", - ["punctuation", ")"], - ["keyword", "as"], - ["keyword", "select"], - " Jobcode", - ["punctuation", ","], - ["function", "count"], - ["punctuation", "("], - "jobcode", - ["punctuation", ")"], - ["keyword", "as"], - " number label", - ["operator", "="], - ["string", "'Number'"], - ["punctuation", ","], - ["function", "avg"], - ["punctuation", "("], - ["keyword", "int"], - ["punctuation", "("], - "today", - ["punctuation", "("], - ["punctuation", ")"], - ["operator", "-"], - "birth", - ["operator", "/"], - ["number", "365.25"], - ["punctuation", ")"], - ["punctuation", ")"], - ["keyword", "as"], - " avgage\r\n\t\t\tformat", - ["operator", "="], - ["number", "2."], - " label", - ["operator", "="], - ["string", "'Average Salary'"], - ["keyword", "from"], - " Payroll\r\n\t", - ["keyword", "group"], - ["keyword", "by"], - " Jobcode\r\n\t", - ["keyword", "having"], - " avage ge ", - ["number", "30"], - ["punctuation", ";"] - ] - ], - ["global-statements", "title1"], - ["string", "'Current Summary Information for Each Job category'"], - ["punctuation", ";"], - ["global-statements", "title2"], - ["string", "'Average Age Greater Than or Equal to 30'"], - ["punctuation", ";"], - ["sql", - [ - ["keyword", "select"], - ["operator", "*"], - " form proclib", - ["punctuation", "."], - "jobs", - ["punctuation", "("], - "pw", - ["operator", "="], - "red", - ["punctuation", ")"], - ["punctuation", ";"] - ] - ], - ["global-statements", "title"] - ] - ] + ["proc-sql", [ + "\r\n\tconnect to oracle as ora2 ", + ["punctuation", "("], + "user=user-id password=password", + ["punctuation", ")"], + ["punctuation", ";"], + + ["sql", [ + ["keyword", "select"], + ["operator", "*"], + ["keyword", "from"], + " connection ", + ["keyword", "to"], + " ora2 ", + ["punctuation", "("], + ["keyword", "select"], + " lname", + ["punctuation", ","], + " fname", + ["punctuation", ","], + " state ", + ["keyword", "from"], + " staff", + ["punctuation", ")"], + ["punctuation", ";"] + ]], + + ["sql-statements", "disconnect from"], + " ora2", + ["punctuation", ";"] + ]], + ["step", "quit"], + ["punctuation", ";"] ] ---------------------------------------------------- diff --git a/tests/languages/stan/function-arg_feature.test b/tests/languages/stan/function-arg_feature.test new file mode 100644 index 0000000000..5ddf974c69 --- /dev/null +++ b/tests/languages/stan/function-arg_feature.test @@ -0,0 +1,21 @@ +y = algebra_solver(system, y_guess, theta, x_r, x_i); + +---------------------------------------------------- + +[ + "y ", + ["operator", "="], + ["keyword", "algebra_solver"], + ["punctuation", "("], + ["function-arg", "system"], + ["punctuation", ","], + " y_guess", + ["punctuation", ","], + " theta", + ["punctuation", ","], + " x_r", + ["punctuation", ","], + " x_i", + ["punctuation", ")"], + ["punctuation", ";"] +] diff --git a/tests/languages/tap/subtest_feature.test b/tests/languages/tap/subtest_feature.test new file mode 100644 index 0000000000..14b1339a48 --- /dev/null +++ b/tests/languages/tap/subtest_feature.test @@ -0,0 +1,7 @@ +# Subtest + +---------------------------------------------------- + +[ + ["subtest", "# Subtest"] +] diff --git a/tests/languages/tcl/punctuation_feature.test b/tests/languages/tcl/punctuation_feature.test new file mode 100644 index 0000000000..62fc1d096a --- /dev/null +++ b/tests/languages/tcl/punctuation_feature.test @@ -0,0 +1,12 @@ +{ } ( ) [ ] + +---------------------------------------------------- + +[ + ["punctuation", "{"], + ["punctuation", "}"], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", "["], + ["punctuation", "]"] +] diff --git a/tests/languages/textile+haml/textile_inclusion.test b/tests/languages/textile+haml/textile_inclusion.test new file mode 100644 index 0000000000..c6474027ef --- /dev/null +++ b/tests/languages/textile+haml/textile_inclusion.test @@ -0,0 +1,50 @@ +:textile +
            + +~ + :textile +
            + +---------------------------------------------------- + +[ + ["filter-textile", [ + ["filter-name", ":textile"], + + ["tag", [ + ["tag", [ + ["punctuation", "<"], + "div" + ]], + ["punctuation", ">"] + ]], + ["tag", [ + ["tag", [ + ["punctuation", ""] + ]] + ]], + + ["punctuation", "~"], + + ["filter-textile", [ + ["filter-name", ":textile"], + + ["tag", [ + ["tag", [ + ["punctuation", "<"], + "div" + ]], + ["punctuation", ">"] + ]], + ["tag", [ + ["tag", [ + ["punctuation", ""] + ]] + ]] +] diff --git a/tests/languages/textile/tag_feature.test b/tests/languages/textile/tag_feature.test new file mode 100644 index 0000000000..18aadbe19d --- /dev/null +++ b/tests/languages/textile/tag_feature.test @@ -0,0 +1,20 @@ +
            + +---------------------------------------------------- + +[ + ["tag", [ + ["tag", [ + ["punctuation", "<"], + "details" + ]], + ["punctuation", ">"] + ]], + ["tag", [ + ["tag", [ + ["punctuation", ""] + ]] +] diff --git a/tests/languages/unrealscript/category_feature.test b/tests/languages/unrealscript/category_feature.test new file mode 100644 index 0000000000..dd215ce82b --- /dev/null +++ b/tests/languages/unrealscript/category_feature.test @@ -0,0 +1,52 @@ +// MyBool is visible but not editable in UnrealEd +var(MyCategory) editconst bool MyBool; + +// MyBool is visible but not editable in UnrealEd and +// not changeable in script +var(MyCategory) const editconst bool MyBool; + +// MyBool is visible and can be set in UnrealEd but +// not changeable in script +var(MyCategory) const bool MyBool; + +---------------------------------------------------- + +[ + ["comment", "// MyBool is visible but not editable in UnrealEd"], + + ["keyword", "var"], + ["punctuation", "("], + ["category", "MyCategory"], + ["punctuation", ")"], + ["keyword", "editconst"], + ["keyword", "bool"], + " MyBool", + ["punctuation", ";"], + + ["comment", "// MyBool is visible but not editable in UnrealEd and"], + + ["comment", "// not changeable in script"], + + ["keyword", "var"], + ["punctuation", "("], + ["category", "MyCategory"], + ["punctuation", ")"], + ["keyword", "const"], + ["keyword", "editconst"], + ["keyword", "bool"], + " MyBool", + ["punctuation", ";"], + + ["comment", "// MyBool is visible and can be set in UnrealEd but"], + + ["comment", "// not changeable in script"], + + ["keyword", "var"], + ["punctuation", "("], + ["category", "MyCategory"], + ["punctuation", ")"], + ["keyword", "const"], + ["keyword", "bool"], + " MyBool", + ["punctuation", ";"] +] diff --git a/tests/languages/v/attribute_feature.test b/tests/languages/v/attribute_feature.test new file mode 100644 index 0000000000..877e2b8664 --- /dev/null +++ b/tests/languages/v/attribute_feature.test @@ -0,0 +1,59 @@ +[deprecated] +[unsafe_fn] +[typedef] +[live] +[inline] +[flag] +[ref_only] +[windows_stdcall] +[direct_array_access] + +---------------------------------------------------- + +[ + ["attribute", [ + ["punctuation", "["], + ["keyword", "deprecated"], + ["punctuation", "]"] + ]], + ["attribute", [ + ["punctuation", "["], + ["keyword", "unsafe_fn"], + ["punctuation", "]"] + ]], + ["attribute", [ + ["punctuation", "["], + ["keyword", "typedef"], + ["punctuation", "]"] + ]], + ["attribute", [ + ["punctuation", "["], + ["keyword", "live"], + ["punctuation", "]"] + ]], + ["attribute", [ + ["punctuation", "["], + ["keyword", "inline"], + ["punctuation", "]"] + ]], + ["attribute", [ + ["punctuation", "["], + ["keyword", "flag"], + ["punctuation", "]"] + ]], + ["attribute", [ + ["punctuation", "["], + ["keyword", "ref_only"], + ["punctuation", "]"] + ]], + ["attribute", [ + ["punctuation", "["], + ["keyword", "windows_stdcall"], + ["punctuation", "]"] + ]], + ["attribute", [ + ["punctuation", "["], + ["keyword", "direct_array_access"], + ["punctuation", "]"] + ]] +] diff --git a/tests/languages/vala/constant_feature.test b/tests/languages/vala/constant_feature.test new file mode 100644 index 0000000000..49adc66704 --- /dev/null +++ b/tests/languages/vala/constant_feature.test @@ -0,0 +1,7 @@ +FOO + +---------------------------------------------------- + +[ + ["constant", "FOO"] +] diff --git a/tests/languages/vala/regex_feature.test b/tests/languages/vala/regex_feature.test new file mode 100644 index 0000000000..6f77366e3f --- /dev/null +++ b/tests/languages/vala/regex_feature.test @@ -0,0 +1,11 @@ +/(\d+\.\d+\.\d+)/ + +---------------------------------------------------- + +[ + ["regex", [ + ["regex-delimiter", "/"], + ["regex-source", "(\\d+\\.\\d+\\.\\d+)"], + ["regex-delimiter", "/"] + ]] +] diff --git a/tests/languages/warpscript/keyword_feature.test b/tests/languages/warpscript/keyword_feature.test new file mode 100644 index 0000000000..fb1531b3f4 --- /dev/null +++ b/tests/languages/warpscript/keyword_feature.test @@ -0,0 +1,49 @@ +BREAK +CHECKMACRO +CONTINUE +CUDF +DEFINED +DEFINEDMACRO +EVAL +FAIL +FOR +FOREACH +FORSTEP +IFT +IFTE +MSGFAIL +NRETURN +RETHROW +RETURN +SWITCH +TRY +UDF +UNTIL +WHILE + +---------------------------------------------------- + +[ + ["keyword", "BREAK"], + ["keyword", "CHECKMACRO"], + ["keyword", "CONTINUE"], + ["keyword", "CUDF"], + ["keyword", "DEFINED"], + ["keyword", "DEFINEDMACRO"], + ["keyword", "EVAL"], + ["keyword", "FAIL"], + ["keyword", "FOR"], + ["keyword", "FOREACH"], + ["keyword", "FORSTEP"], + ["keyword", "IFT"], + ["keyword", "IFTE"], + ["keyword", "MSGFAIL"], + ["keyword", "NRETURN"], + ["keyword", "RETHROW"], + ["keyword", "RETURN"], + ["keyword", "SWITCH"], + ["keyword", "TRY"], + ["keyword", "UDF"], + ["keyword", "UNTIL"], + ["keyword", "WHILE"] +] diff --git a/tests/languages/warpscript/macro_feature.test b/tests/languages/warpscript/macro_feature.test new file mode 100644 index 0000000000..72b8c76096 --- /dev/null +++ b/tests/languages/warpscript/macro_feature.test @@ -0,0 +1,7 @@ +@foo + +---------------------------------------------------- + +[ + ["macro", "@foo"] +] diff --git a/tests/languages/warpscript/variable_feature.test b/tests/languages/warpscript/variable_feature.test new file mode 100644 index 0000000000..fbb7a4110d --- /dev/null +++ b/tests/languages/warpscript/variable_feature.test @@ -0,0 +1,7 @@ +$foo + +---------------------------------------------------- + +[ + ["variable", "$foo"] +] diff --git a/tests/languages/xojo/punctuation_feature.test b/tests/languages/xojo/punctuation_feature.test new file mode 100644 index 0000000000..29e203e997 --- /dev/null +++ b/tests/languages/xojo/punctuation_feature.test @@ -0,0 +1,12 @@ +. , ; : ( ) + +---------------------------------------------------- + +[ + ["punctuation", "."], + ["punctuation", ","], + ["punctuation", ";"], + ["punctuation", ":"], + ["punctuation", "("], + ["punctuation", ")"] +] From d7017bebb3d70f3ef39bbe340a3f224ba3d9304c Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Tue, 5 Oct 2021 21:17:13 +0200 Subject: [PATCH 0935/1100] Birb: Fixed class name false positives (#3111) --- components/prism-birb.js | 2 +- components/prism-birb.min.js | 2 +- tests/languages/birb/class-name_feature.test | 63 ++++++++++++++++++++ tests/languages/birb/function_feature.test | 4 +- tests/languages/birb/keyword_feature.test | 62 ++++++++++++------- 5 files changed, 108 insertions(+), 25 deletions(-) create mode 100644 tests/languages/birb/class-name_feature.test diff --git a/components/prism-birb.js b/components/prism-birb.js index 6937117d9f..ff994d8a5d 100644 --- a/components/prism-birb.js +++ b/components/prism-birb.js @@ -7,7 +7,7 @@ Prism.languages.birb = Prism.languages.extend('clike', { /\b[A-Z](?:[\d_]*[a-zA-Z]\w*)?\b/, // matches variable and function return types (parameters as well). - /\b[A-Z]\w*(?=\s+\w+\s*[;,=()])/ + /\b(?:[A-Z]\w*|(?!(?:var|void)\b)[a-z]\w*)(?=\s+\w+\s*[;,=()])/ ], 'keyword': /\b(?:assert|break|case|class|const|default|else|enum|final|follows|for|grab|if|nest|new|next|noSeeb|return|static|switch|throw|var|void|while)\b/, 'operator': /\+\+|--|&&|\|\||<<=?|>>=?|~(?:\/=?)?|[+\-*\/%&^|=!<>]=?|\?|:/, diff --git a/components/prism-birb.min.js b/components/prism-birb.min.js index 660a5401f3..c61079e1ea 100644 --- a/components/prism-birb.min.js +++ b/components/prism-birb.min.js @@ -1 +1 @@ -Prism.languages.birb=Prism.languages.extend("clike",{string:{pattern:/r?("|')(?:\\.|(?!\1)[^\\])*\1/,greedy:!0},"class-name":[/\b[A-Z](?:[\d_]*[a-zA-Z]\w*)?\b/,/\b[A-Z]\w*(?=\s+\w+\s*[;,=()])/],keyword:/\b(?:assert|break|case|class|const|default|else|enum|final|follows|for|grab|if|nest|new|next|noSeeb|return|static|switch|throw|var|void|while)\b/,operator:/\+\+|--|&&|\|\||<<=?|>>=?|~(?:\/=?)?|[+\-*\/%&^|=!<>]=?|\?|:/,variable:/\b[a-z_]\w*\b/}),Prism.languages.insertBefore("birb","function",{metadata:{pattern:/<\w+>/,greedy:!0,alias:"symbol"}}); \ No newline at end of file +Prism.languages.birb=Prism.languages.extend("clike",{string:{pattern:/r?("|')(?:\\.|(?!\1)[^\\])*\1/,greedy:!0},"class-name":[/\b[A-Z](?:[\d_]*[a-zA-Z]\w*)?\b/,/\b(?:[A-Z]\w*|(?!(?:var|void)\b)[a-z]\w*)(?=\s+\w+\s*[;,=()])/],keyword:/\b(?:assert|break|case|class|const|default|else|enum|final|follows|for|grab|if|nest|new|next|noSeeb|return|static|switch|throw|var|void|while)\b/,operator:/\+\+|--|&&|\|\||<<=?|>>=?|~(?:\/=?)?|[+\-*\/%&^|=!<>]=?|\?|:/,variable:/\b[a-z_]\w*\b/}),Prism.languages.insertBefore("birb","function",{metadata:{pattern:/<\w+>/,greedy:!0,alias:"symbol"}}); \ No newline at end of file diff --git a/tests/languages/birb/class-name_feature.test b/tests/languages/birb/class-name_feature.test new file mode 100644 index 0000000000..946c751f70 --- /dev/null +++ b/tests/languages/birb/class-name_feature.test @@ -0,0 +1,63 @@ +class Birb { + String name = "Birb"; + int age = 5; + bool isMale = true; + + String getName() { + return name; + } +} + +List list = ["Seeb", 10, false]; + +---------------------------------------------------- + +[ + ["keyword", "class"], + ["class-name", "Birb"], + ["punctuation", "{"], + + ["class-name", "String"], + ["variable", "name"], + ["operator", "="], + ["string", "\"Birb\""], + ["punctuation", ";"], + + ["class-name", "int"], + ["variable", "age"], + ["operator", "="], + ["number", "5"], + ["punctuation", ";"], + + ["class-name", "bool"], + ["variable", "isMale"], + ["operator", "="], + ["boolean", "true"], + ["punctuation", ";"], + + ["class-name", "String"], + ["function", "getName"], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", "{"], + + ["class-name", "return"], + ["variable", "name"], + ["punctuation", ";"], + + ["punctuation", "}"], + + ["punctuation", "}"], + + ["class-name", "List"], + ["variable", "list"], + ["operator", "="], + ["punctuation", "["], + ["string", "\"Seeb\""], + ["punctuation", ","], + ["number", "10"], + ["punctuation", ","], + ["boolean", "false"], + ["punctuation", "]"], + ["punctuation", ";"] +] diff --git a/tests/languages/birb/function_feature.test b/tests/languages/birb/function_feature.test index 9b61b4b65a..ab0b6f823e 100644 --- a/tests/languages/birb/function_feature.test +++ b/tests/languages/birb/function_feature.test @@ -7,7 +7,7 @@ foo(0); ["keyword", "void"], ["function", "foo"], ["punctuation", "("], - ["variable", "int"], + ["class-name", "int"], ["variable", "a"], ["punctuation", ")"], ["punctuation", "{"], @@ -22,4 +22,4 @@ foo(0); ---------------------------------------------------- -Checks for functions. \ No newline at end of file +Checks for functions. diff --git a/tests/languages/birb/keyword_feature.test b/tests/languages/birb/keyword_feature.test index 8d1c1a3777..3105071968 100644 --- a/tests/languages/birb/keyword_feature.test +++ b/tests/languages/birb/keyword_feature.test @@ -1,37 +1,57 @@ -assert break case +assert; +break; +case; class; -const default -else enum -final +const; +default; +else; +enum; +final; follows; -for grab -if nest +for; +grab; +if; +nest; next; new; -noSeeb return -static switch -throw var -void while +noSeeb; +return; +static; +switch; +throw; +var; +void; +while; ---------------------------------------------------- [ - ["keyword", "assert"], ["keyword", "break"], ["keyword", "case"], + ["keyword", "assert"], ["punctuation", ";"], + ["keyword", "break"], ["punctuation", ";"], + ["keyword", "case"], ["punctuation", ";"], ["keyword", "class"], ["punctuation", ";"], - ["keyword", "const"], ["keyword", "default"], - ["keyword", "else"], ["keyword", "enum"], - ["keyword", "final"], + ["keyword", "const"], ["punctuation", ";"], + ["keyword", "default"], ["punctuation", ";"], + ["keyword", "else"], ["punctuation", ";"], + ["keyword", "enum"], ["punctuation", ";"], + ["keyword", "final"], ["punctuation", ";"], ["keyword", "follows"], ["punctuation", ";"], - ["keyword", "for"], ["keyword", "grab"], - ["keyword", "if"], ["keyword", "nest"], + ["keyword", "for"], ["punctuation", ";"], + ["keyword", "grab"], ["punctuation", ";"], + ["keyword", "if"], ["punctuation", ";"], + ["keyword", "nest"], ["punctuation", ";"], ["keyword", "next"], ["punctuation", ";"], ["keyword", "new"], ["punctuation", ";"], - ["keyword", "noSeeb"], ["keyword", "return"], - ["keyword", "static"], ["keyword", "switch"], - ["keyword", "throw"], ["keyword", "var"], - ["keyword", "void"], ["keyword", "while"] + ["keyword", "noSeeb"], ["punctuation", ";"], + ["keyword", "return"], ["punctuation", ";"], + ["keyword", "static"], ["punctuation", ";"], + ["keyword", "switch"], ["punctuation", ";"], + ["keyword", "throw"], ["punctuation", ";"], + ["keyword", "var"], ["punctuation", ";"], + ["keyword", "void"], ["punctuation", ";"], + ["keyword", "while"], ["punctuation", ";"] ] ---------------------------------------------------- -Checks for all keywords. \ No newline at end of file +Checks for all keywords. From 5c412cbb2765fe494c45981c6c95658a68a6a6a7 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Tue, 5 Oct 2021 21:17:43 +0200 Subject: [PATCH 0936/1100] BSL: Made `directive` greedy (#3112) --- components/prism-bsl.js | 8 +++++--- components/prism-bsl.min.js | 2 +- tests/languages/bsl/directive_feature.test | 13 +++++++++++++ tests/languages/bsl/punctuation_feature.test | 18 ++++++++++++++++++ tests/languages/bsl/string_feature.test | 10 ++++++++-- 5 files changed, 45 insertions(+), 6 deletions(-) create mode 100644 tests/languages/bsl/directive_feature.test create mode 100644 tests/languages/bsl/punctuation_feature.test diff --git a/components/prism-bsl.js b/components/prism-bsl.js index ba3a5a9b83..ae2cd8fa37 100644 --- a/components/prism-bsl.js +++ b/components/prism-bsl.js @@ -44,15 +44,15 @@ Prism.languages.bsl = { { pattern: /\b(?:and|not|or)\b/i } - ], 'punctuation': /\(\.|\.\)|[()\[\]:;,.]/, 'directive': [ // Теги препроцессора вида &Клиент, &Сервер, ... // Preprocessor tags of the type &Client, &Server, ... { - pattern: /^(\s*)&.*/m, + pattern: /^([ \t]*)&.*/m, lookbehind: true, + greedy: true, alias: 'important' }, // Инструкции препроцессора вида: @@ -64,7 +64,9 @@ Prism.languages.bsl = { // ... // #EndIf { - pattern: /^\s*#.*/gm, + pattern: /^([ \t]*)#.*/gm, + lookbehind: true, + greedy: true, alias: 'important' } ] diff --git a/components/prism-bsl.min.js b/components/prism-bsl.min.js index 7d5cbe8f71..4c93478087 100644 --- a/components/prism-bsl.min.js +++ b/components/prism-bsl.min.js @@ -1 +1 @@ -Prism.languages.bsl={comment:/\/\/.*/,string:[{pattern:/"(?:[^"]|"")*"(?!")/,greedy:!0},{pattern:/'(?:[^'\r\n\\]|\\.)*'/}],keyword:[{pattern:/(^|[^\w\u0400-\u0484\u0487-\u052f\u1d2b\u1d78\u2de0-\u2dff\ua640-\ua69f\ufe2e\ufe2f])(?:пока|для|новый|прервать|попытка|исключение|вызватьисключение|иначе|конецпопытки|неопределено|функция|перем|возврат|конецфункции|если|иначеесли|процедура|конецпроцедуры|тогда|знач|экспорт|конецесли|из|каждого|истина|ложь|по|цикл|конеццикла|выполнить)(?![\w\u0400-\u0484\u0487-\u052f\u1d2b\u1d78\u2de0-\u2dff\ua640-\ua69f\ufe2e\ufe2f])/i,lookbehind:!0},{pattern:/\b(?:break|do|each|else|elseif|enddo|endfunction|endif|endprocedure|endtry|except|execute|export|false|for|function|if|in|new|null|procedure|raise|return|then|to|true|try|undefined|val|var|while)\b/i}],number:{pattern:/(^(?=\d)|[^\w\u0400-\u0484\u0487-\u052f\u1d2b\u1d78\u2de0-\u2dff\ua640-\ua69f\ufe2e\ufe2f])(?:\d+(?:\.\d*)?|\.\d+)(?:E[+-]?\d+)?/i,lookbehind:!0},operator:[/[<>+\-*/]=?|[%=]/,{pattern:/(^|[^\w\u0400-\u0484\u0487-\u052f\u1d2b\u1d78\u2de0-\u2dff\ua640-\ua69f\ufe2e\ufe2f])(?:и|или|не)(?![\w\u0400-\u0484\u0487-\u052f\u1d2b\u1d78\u2de0-\u2dff\ua640-\ua69f\ufe2e\ufe2f])/i,lookbehind:!0},{pattern:/\b(?:and|not|or)\b/i}],punctuation:/\(\.|\.\)|[()\[\]:;,.]/,directive:[{pattern:/^(\s*)&.*/m,lookbehind:!0,alias:"important"},{pattern:/^\s*#.*/gm,alias:"important"}]},Prism.languages.oscript=Prism.languages.bsl; \ No newline at end of file +Prism.languages.bsl={comment:/\/\/.*/,string:[{pattern:/"(?:[^"]|"")*"(?!")/,greedy:!0},{pattern:/'(?:[^'\r\n\\]|\\.)*'/}],keyword:[{pattern:/(^|[^\w\u0400-\u0484\u0487-\u052f\u1d2b\u1d78\u2de0-\u2dff\ua640-\ua69f\ufe2e\ufe2f])(?:пока|для|новый|прервать|попытка|исключение|вызватьисключение|иначе|конецпопытки|неопределено|функция|перем|возврат|конецфункции|если|иначеесли|процедура|конецпроцедуры|тогда|знач|экспорт|конецесли|из|каждого|истина|ложь|по|цикл|конеццикла|выполнить)(?![\w\u0400-\u0484\u0487-\u052f\u1d2b\u1d78\u2de0-\u2dff\ua640-\ua69f\ufe2e\ufe2f])/i,lookbehind:!0},{pattern:/\b(?:break|do|each|else|elseif|enddo|endfunction|endif|endprocedure|endtry|except|execute|export|false|for|function|if|in|new|null|procedure|raise|return|then|to|true|try|undefined|val|var|while)\b/i}],number:{pattern:/(^(?=\d)|[^\w\u0400-\u0484\u0487-\u052f\u1d2b\u1d78\u2de0-\u2dff\ua640-\ua69f\ufe2e\ufe2f])(?:\d+(?:\.\d*)?|\.\d+)(?:E[+-]?\d+)?/i,lookbehind:!0},operator:[/[<>+\-*/]=?|[%=]/,{pattern:/(^|[^\w\u0400-\u0484\u0487-\u052f\u1d2b\u1d78\u2de0-\u2dff\ua640-\ua69f\ufe2e\ufe2f])(?:и|или|не)(?![\w\u0400-\u0484\u0487-\u052f\u1d2b\u1d78\u2de0-\u2dff\ua640-\ua69f\ufe2e\ufe2f])/i,lookbehind:!0},{pattern:/\b(?:and|not|or)\b/i}],punctuation:/\(\.|\.\)|[()\[\]:;,.]/,directive:[{pattern:/^([ \t]*)&.*/m,lookbehind:!0,greedy:!0,alias:"important"},{pattern:/^([ \t]*)#.*/gm,lookbehind:!0,greedy:!0,alias:"important"}]},Prism.languages.oscript=Prism.languages.bsl; \ No newline at end of file diff --git a/tests/languages/bsl/directive_feature.test b/tests/languages/bsl/directive_feature.test new file mode 100644 index 0000000000..df0b91ee07 --- /dev/null +++ b/tests/languages/bsl/directive_feature.test @@ -0,0 +1,13 @@ +&Client + +#If Server Then +#EndIf + +---------------------------------------------------- + +[ + ["directive", "&Client"], + + ["directive", "#If Server Then"], + ["directive", "#EndIf"] +] diff --git a/tests/languages/bsl/punctuation_feature.test b/tests/languages/bsl/punctuation_feature.test new file mode 100644 index 0000000000..9a6f11899f --- /dev/null +++ b/tests/languages/bsl/punctuation_feature.test @@ -0,0 +1,18 @@ +(. .) +( ) [ ] : ; , . + +---------------------------------------------------- + +[ + ["punctuation", "(."], + ["punctuation", ".)"], + + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", "["], + ["punctuation", "]"], + ["punctuation", ":"], + ["punctuation", ";"], + ["punctuation", ","], + ["punctuation", "."] +] diff --git a/tests/languages/bsl/string_feature.test b/tests/languages/bsl/string_feature.test index 4df2508a87..abb8b2dba4 100644 --- a/tests/languages/bsl/string_feature.test +++ b/tests/languages/bsl/string_feature.test @@ -1,13 +1,19 @@ "" "fo" +'' +'foo' + ---------------------------------------------------- [ ["string", "\"\""], - ["string", "\"fo\""] + ["string", "\"fo\""], + + ["string", "''"], + ["string", "'foo'"] ] ---------------------------------------------------- -Checks for strings and chars. \ No newline at end of file +Checks for strings and chars. From 532212b26587fc99993ac3d9e5d7468dcb95fcd9 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Tue, 5 Oct 2021 21:18:09 +0200 Subject: [PATCH 0937/1100] Dataweave: Fixed keywords being highlighted as functions (#3113) --- components/prism-dataweave.js | 2 +- components/prism-dataweave.min.js | 2 +- tests/languages/dataweave/keywords_feature.test | 16 ++++++++++++---- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/components/prism-dataweave.js b/components/prism-dataweave.js index 986b3a1c8f..be525e5992 100644 --- a/components/prism-dataweave.js +++ b/components/prism-dataweave.js @@ -30,12 +30,12 @@ pattern: /\/(?:[^\\\/\r\n]|\\[^\r\n])+\//, greedy: true }, + 'keyword': /\b(?:and|as|at|case|do|else|fun|if|input|is|match|not|ns|null|or|output|type|unless|update|using|var)\b/, 'function': /\b[A-Z_]\w*(?=\s*\()/i, 'number': /-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i, 'punctuation': /[{}[\];(),.:@]/, 'operator': /<<|>>|->|[<>~=]=?|!=|--?-?|\+\+?|!|\?/, 'boolean': /\b(?:false|true)\b/, - 'keyword': /\b(?:and|as|at|case|do|else|fun|if|input|is|match|not|ns|null|or|output|type|unless|update|using|var)\b/ }; }(Prism)); diff --git a/components/prism-dataweave.min.js b/components/prism-dataweave.min.js index 52ac90d264..ef2b7f9b76 100644 --- a/components/prism-dataweave.min.js +++ b/components/prism-dataweave.min.js @@ -1 +1 @@ -Prism.languages.dataweave={url:/\b[A-Za-z]+:\/\/[\w/:.?=&-]+|\burn:[\w:.?=&-]+/,property:{pattern:/(?:\b\w+#)?(?:"(?:\\.|[^\\"\r\n])*"|\b\w+)(?=\s*[:@])/,greedy:!0},string:{pattern:/(["'`])(?:\\[\s\S]|(?!\1)[^\\])*\1/,greedy:!0},"mime-type":/\b(?:application|audio|image|multipart|text|video)\/[\w+-]+/,date:{pattern:/\|[\w:+-]+\|/,greedy:!0},comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],regex:{pattern:/\/(?:[^\\\/\r\n]|\\[^\r\n])+\//,greedy:!0},function:/\b[A-Z_]\w*(?=\s*\()/i,number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\];(),.:@]/,operator:/<<|>>|->|[<>~=]=?|!=|--?-?|\+\+?|!|\?/,boolean:/\b(?:false|true)\b/,keyword:/\b(?:and|as|at|case|do|else|fun|if|input|is|match|not|ns|null|or|output|type|unless|update|using|var)\b/}; \ No newline at end of file +Prism.languages.dataweave={url:/\b[A-Za-z]+:\/\/[\w/:.?=&-]+|\burn:[\w:.?=&-]+/,property:{pattern:/(?:\b\w+#)?(?:"(?:\\.|[^\\"\r\n])*"|\b\w+)(?=\s*[:@])/,greedy:!0},string:{pattern:/(["'`])(?:\\[\s\S]|(?!\1)[^\\])*\1/,greedy:!0},"mime-type":/\b(?:application|audio|image|multipart|text|video)\/[\w+-]+/,date:{pattern:/\|[\w:+-]+\|/,greedy:!0},comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],regex:{pattern:/\/(?:[^\\\/\r\n]|\\[^\r\n])+\//,greedy:!0},keyword:/\b(?:and|as|at|case|do|else|fun|if|input|is|match|not|ns|null|or|output|type|unless|update|using|var)\b/,function:/\b[A-Z_]\w*(?=\s*\()/i,number:/-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,punctuation:/[{}[\];(),.:@]/,operator:/<<|>>|->|[<>~=]=?|!=|--?-?|\+\+?|!|\?/,boolean:/\b(?:false|true)\b/}; \ No newline at end of file diff --git a/tests/languages/dataweave/keywords_feature.test b/tests/languages/dataweave/keywords_feature.test index bf163b9026..73d4e58bf0 100644 --- a/tests/languages/dataweave/keywords_feature.test +++ b/tests/languages/dataweave/keywords_feature.test @@ -15,11 +15,15 @@ update { if(true or false and not true) do { } -else +else payload match { case a is String -> x as String } +null +unless +using + ---------------------------------------------------- [ @@ -89,7 +93,7 @@ payload match { ["punctuation", "}"], - ["function", "if"], + ["keyword", "if"], ["punctuation", "("], ["boolean", "true"], ["keyword", "or"], @@ -105,7 +109,7 @@ payload match { ["keyword", "else"], - " \r\npayload ", + "\r\npayload ", ["keyword", "match"], ["punctuation", "{"], @@ -118,7 +122,11 @@ payload match { ["keyword", "as"], " String\r\n", - ["punctuation", "}"] + ["punctuation", "}"], + + ["keyword", "null"], + ["keyword", "unless"], + ["keyword", "using"] ] ---------------------------------------------------- From d359eeaedc8a86cd97644622ea305c3aa276c660 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Tue, 5 Oct 2021 21:18:38 +0200 Subject: [PATCH 0938/1100] GML: Fixed `operator` token and added tests (#3114) --- components/prism-gml.js | 2 +- components/prism-gml.min.js | 2 +- tests/languages/gml/function_feature.test | 55 ++++++++++ tests/languages/gml/keyword_feature.test | 39 +++++++ tests/languages/gml/number_feature.test | 25 +++++ tests/languages/gml/operator_feature.test | 62 +++++++++++ tests/languages/gml/variable_feature.test | 126 ++++++++++++++++++++++ 7 files changed, 309 insertions(+), 2 deletions(-) create mode 100644 tests/languages/gml/function_feature.test create mode 100644 tests/languages/gml/keyword_feature.test create mode 100644 tests/languages/gml/number_feature.test create mode 100644 tests/languages/gml/operator_feature.test create mode 100644 tests/languages/gml/variable_feature.test diff --git a/components/prism-gml.js b/components/prism-gml.js index 60e4196244..63e3e9883c 100644 --- a/components/prism-gml.js +++ b/components/prism-gml.js @@ -1,7 +1,7 @@ Prism.languages.gamemakerlanguage = Prism.languages.gml = Prism.languages.extend('clike', { 'keyword': /\b(?:break|case|continue|default|do|else|enum|exit|for|globalvar|if|repeat|return|switch|until|var|while)\b/, 'number': /(?:\b0x[\da-f]+|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ulf]{0,4}/i, - 'operator': /[-+%=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]|\b(?:and|at|not|or|with|xor)\b/, + 'operator': /--|\+\+|[-+%/=]=?|!=|\*\*?=?|<[<=>]?|>[=>]?|&&?|\^\^?|\|\|?|~|\b(?:and|at|not|or|with|xor)\b/, 'constant': /\b(?:GM_build_date|GM_version|action_(?:continue|restart|reverse|stop)|all|gamespeed_(?:fps|microseconds)|global|local|noone|other|pi|pointer_(?:invalid|null)|self|timezone_(?:local|utc)|undefined|ev_(?:create|destroy|step|alarm|keyboard|mouse|collision|other|draw|draw_(?:begin|end|post|pre)|keypress|keyrelease|trigger|(?:left|middle|no|right)_button|(?:left|middle|right)_press|(?:left|middle|right)_release|mouse_(?:enter|leave|wheel_down|wheel_up)|global_(?:left|middle|right)_button|global_(?:left|middle|right)_press|global_(?:left|middle|right)_release|joystick(?:1|2)_(?:button1|button2|button3|button4|button5|button6|button7|button8|down|left|right|up)|outside|boundary|game_start|game_end|room_start|room_end|no_more_lives|animation_end|end_of_path|no_more_health|user\d|gui|gui_begin|gui_end|step_(?:begin|end|normal))|vk_(?:alt|anykey|backspace|control|delete|down|end|enter|escape|home|insert|left|nokey|pagedown|pageup|pause|printscreen|return|right|shift|space|tab|up|f\d|numpad\d|add|decimal|divide|lalt|lcontrol|lshift|multiply|ralt|rcontrol|rshift|subtract)|achievement_(?:filter_(?:all_players|favorites_only|friends_only)|friends_info|info|leaderboard_info|our_info|pic_loaded|show_(?:achievement|bank|friend_picker|leaderboard|profile|purchase_prompt|ui)|type_challenge|type_score_challenge)|asset_(?:font|object|path|room|script|shader|sound|sprite|tiles|timeline|unknown)|audio_(?:3d|falloff_(?:exponent_distance|exponent_distance_clamped|inverse_distance|inverse_distance_clamped|linear_distance|linear_distance_clamped|none)|mono|new_system|old_system|stereo)|bm_(?:add|complex|dest_alpha|dest_color|dest_colour|inv_dest_alpha|inv_dest_color|inv_dest_colour|inv_src_alpha|inv_src_color|inv_src_colour|max|normal|one|src_alpha|src_alpha_sat|src_color|src_colour|subtract|zero)|browser_(?:chrome|firefox|ie|ie_mobile|not_a_browser|opera|safari|safari_mobile|tizen|unknown|windows_store)|buffer_(?:bool|f16|f32|f64|fast|fixed|generalerror|grow|invalidtype|network|outofbounds|outofspace|s16|s32|s8|seek_end|seek_relative|seek_start|string|text|u16|u32|u64|u8|vbuffer|wrap)|c_(?:aqua|black|blue|dkgray|fuchsia|gray|green|lime|ltgray|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow)|cmpfunc_(?:always|equal|greater|greaterequal|less|lessequal|never|notequal)|cr_(?:appstart|arrow|beam|cross|default|drag|handpoint|hourglass|none|size_all|size_nesw|size_ns|size_nwse|size_we|uparrow)|cull_(?:clockwise|counterclockwise|noculling)|device_(?:emulator|tablet)|device_ios_(?:ipad|ipad_retina|iphone|iphone5|iphone6|iphone6plus|iphone_retina|unknown)|display_(?:landscape|landscape_flipped|portrait|portrait_flipped)|dll_(?:cdecl|cdel|stdcall)|ds_type_(?:grid|list|map|priority|queue|stack)|ef_(?:cloud|ellipse|explosion|firework|flare|rain|ring|smoke|smokeup|snow|spark|star)|fa_(?:archive|bottom|center|directory|hidden|left|middle|readonly|right|sysfile|top|volumeid)|fb_login_(?:default|fallback_to_webview|forcing_safari|forcing_webview|no_fallback_to_webview|use_system_account)|iap_(?:available|canceled|ev_consume|ev_product|ev_purchase|ev_restore|ev_storeload|failed|purchased|refunded|status_available|status_loading|status_processing|status_restoring|status_unavailable|status_uninitialised|storeload_failed|storeload_ok|unavailable)|leaderboard_type_(?:number|time_mins_secs)|lighttype_(?:dir|point)|matrix_(?:projection|view|world)|mb_(?:any|left|middle|none|right)|network_(?:config_(?:connect_timeout|disable_reliable_udp|enable_reliable_udp|use_non_blocking_socket)|socket_(?:bluetooth|tcp|udp)|type_(?:connect|data|disconnect|non_blocking_connect))|of_challenge_(?:lose|tie|win)|os_(?:android|ios|linux|macosx|ps3|ps4|psvita|unknown|uwp|win32|win8native|windows|winphone|xboxone)|phy_debug_render_(?:aabb|collision_pairs|coms|core_shapes|joints|obb|shapes)|phy_joint_(?:anchor_1_x|anchor_1_y|anchor_2_x|anchor_2_y|angle|angle_limits|damping_ratio|frequency|length_1|length_2|lower_angle_limit|max_force|max_length|max_motor_force|max_motor_torque|max_torque|motor_force|motor_speed|motor_torque|reaction_force_x|reaction_force_y|reaction_torque|speed|translation|upper_angle_limit)|phy_particle_data_flag_(?:category|color|colour|position|typeflags|velocity)|phy_particle_flag_(?:colormixing|colourmixing|elastic|powder|spring|tensile|viscous|wall|water|zombie)|phy_particle_group_flag_(?:rigid|solid)|pr_(?:linelist|linestrip|pointlist|trianglefan|trianglelist|trianglestrip)|ps_(?:distr|shape)_(?:diamond|ellipse|gaussian|invgaussian|line|linear|rectangle)|pt_shape_(?:circle|cloud|disk|explosion|flare|line|pixel|ring|smoke|snow|spark|sphere|square|star)|ty_(?:real|string)|gp_(?:face\d|axislh|axislv|axisrh|axisrv|padd|padl|padr|padu|select|shoulderl|shoulderlb|shoulderr|shoulderrb|start|stickl|stickr)|lb_disp_(?:none|numeric|time_ms|time_sec)|lb_sort_(?:ascending|descending|none)|ov_(?:achievements|community|friends|gamegroup|players|settings)|ugc_(?:filetype_(?:community|microtrans)|list_(?:Favorited|Followed|Published|Subscribed|UsedOrPlayed|VotedDown|VotedOn|VotedUp|WillVoteLater)|match_(?:AllGuides|Artwork|Collections|ControllerBindings|IntegratedGuides|Items|Items_Mtx|Items_ReadyToUse|Screenshots|UsableInGame|Videos|WebGuides)|query_(?:AcceptedForGameRankedByAcceptanceDate|CreatedByFriendsRankedByPublicationDate|FavoritedByFriendsRankedByPublicationDate|NotYetRated)|query_RankedBy(?:NumTimesReported|PublicationDate|TextSearch|TotalVotesAsc|Trend|Vote|VotesUp)|result_success|sortorder_CreationOrder(?:Asc|Desc)|sortorder_(?:ForModeration|LastUpdatedDesc|SubscriptionDateDesc|TitleAsc|VoteScoreDesc)|visibility_(?:friends_only|private|public))|vertex_usage_(?:binormal|blendindices|blendweight|color|colour|depth|fog|normal|position|psize|sample|tangent|texcoord|textcoord)|vertex_type_(?:float\d|color|colour|ubyte4)|input_type|layerelementtype_(?:background|instance|oldtilemap|particlesystem|sprite|tile|tilemap|undefined)|se_(?:chorus|compressor|echo|equalizer|flanger|gargle|none|reverb)|text_type|tile_(?:flip|index_mask|mirror|rotate)|(?:obj|rm|scr|spr)\w+)\b/, 'variable': /\b(?:alarm|application_surface|async_load|background_(?:alpha|blend|color|colour|foreground|height|hspeed|htiled|index|showcolor|showcolour|visible|vspeed|vtiled|width|x|xscale|y|yscale)|bbox_(?:bottom|left|right|top)|browser_(?:height|width)|caption_(?:health|lives|score)|current_(?:day|hour|minute|month|second|time|weekday|year)|cursor_sprite|debug_mode|delta_time|direction|display_aa|error_(?:last|occurred)|event_(?:action|number|object|type)|fps|fps_real|friction|game_(?:display|project|save)_(?:id|name)|gamemaker_(?:pro|registered|version)|gravity|gravity_direction|(?:h|v)speed|health|iap_data|id|image_(?:alpha|angle|blend|depth|index|number|speed|xscale|yscale)|instance_(?:count|id)|keyboard_(?:key|lastchar|lastkey|string)|layer|lives|mask_index|mouse_(?:button|lastbutton|x|y)|object_index|os_(?:browser|device|type|version)|path_(?:endaction|index|orientation|position|positionprevious|scale|speed)|persistent|phy_(?:rotation|(?:col_normal|collision|com|linear_velocity|position|speed)_(?:x|y)|angular_(?:damping|velocity)|position_(?:x|y)previous|speed|linear_damping|bullet|fixed_rotation|active|mass|inertia|dynamic|kinematic|sleeping|collision_points)|pointer_(?:invalid|null)|room|room_(?:caption|first|height|last|persistent|speed|width)|score|secure_mode|show_(?:health|lives|score)|solid|speed|sprite_(?:height|index|width|xoffset|yoffset)|temp_directory|timeline_(?:index|loop|position|running|speed)|transition_(?:color|kind|steps)|undefined|view_(?:angle|current|enabled|(?:h|v)(?:border|speed)|(?:h|w|x|y)port|(?:h|w|x|y)view|object|surface_id|visible)|visible|webgl_enabled|working_directory|(?:x|y)(?:previous|start)|x|y|argument(?:_relitive|_count|\d)|argument|global|local|other|self)\b/ }); diff --git a/components/prism-gml.min.js b/components/prism-gml.min.js index ca35ab6518..42b508de75 100644 --- a/components/prism-gml.min.js +++ b/components/prism-gml.min.js @@ -1 +1 @@ -Prism.languages.gamemakerlanguage=Prism.languages.gml=Prism.languages.extend("clike",{keyword:/\b(?:break|case|continue|default|do|else|enum|exit|for|globalvar|if|repeat|return|switch|until|var|while)\b/,number:/(?:\b0x[\da-f]+|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ulf]{0,4}/i,operator:/[-+%=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]|\b(?:and|at|not|or|with|xor)\b/,constant:/\b(?:GM_build_date|GM_version|action_(?:continue|restart|reverse|stop)|all|gamespeed_(?:fps|microseconds)|global|local|noone|other|pi|pointer_(?:invalid|null)|self|timezone_(?:local|utc)|undefined|ev_(?:create|destroy|step|alarm|keyboard|mouse|collision|other|draw|draw_(?:begin|end|post|pre)|keypress|keyrelease|trigger|(?:left|middle|no|right)_button|(?:left|middle|right)_press|(?:left|middle|right)_release|mouse_(?:enter|leave|wheel_down|wheel_up)|global_(?:left|middle|right)_button|global_(?:left|middle|right)_press|global_(?:left|middle|right)_release|joystick(?:1|2)_(?:button1|button2|button3|button4|button5|button6|button7|button8|down|left|right|up)|outside|boundary|game_start|game_end|room_start|room_end|no_more_lives|animation_end|end_of_path|no_more_health|user\d|gui|gui_begin|gui_end|step_(?:begin|end|normal))|vk_(?:alt|anykey|backspace|control|delete|down|end|enter|escape|home|insert|left|nokey|pagedown|pageup|pause|printscreen|return|right|shift|space|tab|up|f\d|numpad\d|add|decimal|divide|lalt|lcontrol|lshift|multiply|ralt|rcontrol|rshift|subtract)|achievement_(?:filter_(?:all_players|favorites_only|friends_only)|friends_info|info|leaderboard_info|our_info|pic_loaded|show_(?:achievement|bank|friend_picker|leaderboard|profile|purchase_prompt|ui)|type_challenge|type_score_challenge)|asset_(?:font|object|path|room|script|shader|sound|sprite|tiles|timeline|unknown)|audio_(?:3d|falloff_(?:exponent_distance|exponent_distance_clamped|inverse_distance|inverse_distance_clamped|linear_distance|linear_distance_clamped|none)|mono|new_system|old_system|stereo)|bm_(?:add|complex|dest_alpha|dest_color|dest_colour|inv_dest_alpha|inv_dest_color|inv_dest_colour|inv_src_alpha|inv_src_color|inv_src_colour|max|normal|one|src_alpha|src_alpha_sat|src_color|src_colour|subtract|zero)|browser_(?:chrome|firefox|ie|ie_mobile|not_a_browser|opera|safari|safari_mobile|tizen|unknown|windows_store)|buffer_(?:bool|f16|f32|f64|fast|fixed|generalerror|grow|invalidtype|network|outofbounds|outofspace|s16|s32|s8|seek_end|seek_relative|seek_start|string|text|u16|u32|u64|u8|vbuffer|wrap)|c_(?:aqua|black|blue|dkgray|fuchsia|gray|green|lime|ltgray|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow)|cmpfunc_(?:always|equal|greater|greaterequal|less|lessequal|never|notequal)|cr_(?:appstart|arrow|beam|cross|default|drag|handpoint|hourglass|none|size_all|size_nesw|size_ns|size_nwse|size_we|uparrow)|cull_(?:clockwise|counterclockwise|noculling)|device_(?:emulator|tablet)|device_ios_(?:ipad|ipad_retina|iphone|iphone5|iphone6|iphone6plus|iphone_retina|unknown)|display_(?:landscape|landscape_flipped|portrait|portrait_flipped)|dll_(?:cdecl|cdel|stdcall)|ds_type_(?:grid|list|map|priority|queue|stack)|ef_(?:cloud|ellipse|explosion|firework|flare|rain|ring|smoke|smokeup|snow|spark|star)|fa_(?:archive|bottom|center|directory|hidden|left|middle|readonly|right|sysfile|top|volumeid)|fb_login_(?:default|fallback_to_webview|forcing_safari|forcing_webview|no_fallback_to_webview|use_system_account)|iap_(?:available|canceled|ev_consume|ev_product|ev_purchase|ev_restore|ev_storeload|failed|purchased|refunded|status_available|status_loading|status_processing|status_restoring|status_unavailable|status_uninitialised|storeload_failed|storeload_ok|unavailable)|leaderboard_type_(?:number|time_mins_secs)|lighttype_(?:dir|point)|matrix_(?:projection|view|world)|mb_(?:any|left|middle|none|right)|network_(?:config_(?:connect_timeout|disable_reliable_udp|enable_reliable_udp|use_non_blocking_socket)|socket_(?:bluetooth|tcp|udp)|type_(?:connect|data|disconnect|non_blocking_connect))|of_challenge_(?:lose|tie|win)|os_(?:android|ios|linux|macosx|ps3|ps4|psvita|unknown|uwp|win32|win8native|windows|winphone|xboxone)|phy_debug_render_(?:aabb|collision_pairs|coms|core_shapes|joints|obb|shapes)|phy_joint_(?:anchor_1_x|anchor_1_y|anchor_2_x|anchor_2_y|angle|angle_limits|damping_ratio|frequency|length_1|length_2|lower_angle_limit|max_force|max_length|max_motor_force|max_motor_torque|max_torque|motor_force|motor_speed|motor_torque|reaction_force_x|reaction_force_y|reaction_torque|speed|translation|upper_angle_limit)|phy_particle_data_flag_(?:category|color|colour|position|typeflags|velocity)|phy_particle_flag_(?:colormixing|colourmixing|elastic|powder|spring|tensile|viscous|wall|water|zombie)|phy_particle_group_flag_(?:rigid|solid)|pr_(?:linelist|linestrip|pointlist|trianglefan|trianglelist|trianglestrip)|ps_(?:distr|shape)_(?:diamond|ellipse|gaussian|invgaussian|line|linear|rectangle)|pt_shape_(?:circle|cloud|disk|explosion|flare|line|pixel|ring|smoke|snow|spark|sphere|square|star)|ty_(?:real|string)|gp_(?:face\d|axislh|axislv|axisrh|axisrv|padd|padl|padr|padu|select|shoulderl|shoulderlb|shoulderr|shoulderrb|start|stickl|stickr)|lb_disp_(?:none|numeric|time_ms|time_sec)|lb_sort_(?:ascending|descending|none)|ov_(?:achievements|community|friends|gamegroup|players|settings)|ugc_(?:filetype_(?:community|microtrans)|list_(?:Favorited|Followed|Published|Subscribed|UsedOrPlayed|VotedDown|VotedOn|VotedUp|WillVoteLater)|match_(?:AllGuides|Artwork|Collections|ControllerBindings|IntegratedGuides|Items|Items_Mtx|Items_ReadyToUse|Screenshots|UsableInGame|Videos|WebGuides)|query_(?:AcceptedForGameRankedByAcceptanceDate|CreatedByFriendsRankedByPublicationDate|FavoritedByFriendsRankedByPublicationDate|NotYetRated)|query_RankedBy(?:NumTimesReported|PublicationDate|TextSearch|TotalVotesAsc|Trend|Vote|VotesUp)|result_success|sortorder_CreationOrder(?:Asc|Desc)|sortorder_(?:ForModeration|LastUpdatedDesc|SubscriptionDateDesc|TitleAsc|VoteScoreDesc)|visibility_(?:friends_only|private|public))|vertex_usage_(?:binormal|blendindices|blendweight|color|colour|depth|fog|normal|position|psize|sample|tangent|texcoord|textcoord)|vertex_type_(?:float\d|color|colour|ubyte4)|input_type|layerelementtype_(?:background|instance|oldtilemap|particlesystem|sprite|tile|tilemap|undefined)|se_(?:chorus|compressor|echo|equalizer|flanger|gargle|none|reverb)|text_type|tile_(?:flip|index_mask|mirror|rotate)|(?:obj|rm|scr|spr)\w+)\b/,variable:/\b(?:alarm|application_surface|async_load|background_(?:alpha|blend|color|colour|foreground|height|hspeed|htiled|index|showcolor|showcolour|visible|vspeed|vtiled|width|x|xscale|y|yscale)|bbox_(?:bottom|left|right|top)|browser_(?:height|width)|caption_(?:health|lives|score)|current_(?:day|hour|minute|month|second|time|weekday|year)|cursor_sprite|debug_mode|delta_time|direction|display_aa|error_(?:last|occurred)|event_(?:action|number|object|type)|fps|fps_real|friction|game_(?:display|project|save)_(?:id|name)|gamemaker_(?:pro|registered|version)|gravity|gravity_direction|(?:h|v)speed|health|iap_data|id|image_(?:alpha|angle|blend|depth|index|number|speed|xscale|yscale)|instance_(?:count|id)|keyboard_(?:key|lastchar|lastkey|string)|layer|lives|mask_index|mouse_(?:button|lastbutton|x|y)|object_index|os_(?:browser|device|type|version)|path_(?:endaction|index|orientation|position|positionprevious|scale|speed)|persistent|phy_(?:rotation|(?:col_normal|collision|com|linear_velocity|position|speed)_(?:x|y)|angular_(?:damping|velocity)|position_(?:x|y)previous|speed|linear_damping|bullet|fixed_rotation|active|mass|inertia|dynamic|kinematic|sleeping|collision_points)|pointer_(?:invalid|null)|room|room_(?:caption|first|height|last|persistent|speed|width)|score|secure_mode|show_(?:health|lives|score)|solid|speed|sprite_(?:height|index|width|xoffset|yoffset)|temp_directory|timeline_(?:index|loop|position|running|speed)|transition_(?:color|kind|steps)|undefined|view_(?:angle|current|enabled|(?:h|v)(?:border|speed)|(?:h|w|x|y)port|(?:h|w|x|y)view|object|surface_id|visible)|visible|webgl_enabled|working_directory|(?:x|y)(?:previous|start)|x|y|argument(?:_relitive|_count|\d)|argument|global|local|other|self)\b/}); \ No newline at end of file +Prism.languages.gamemakerlanguage=Prism.languages.gml=Prism.languages.extend("clike",{keyword:/\b(?:break|case|continue|default|do|else|enum|exit|for|globalvar|if|repeat|return|switch|until|var|while)\b/,number:/(?:\b0x[\da-f]+|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ulf]{0,4}/i,operator:/--|\+\+|[-+%/=]=?|!=|\*\*?=?|<[<=>]?|>[=>]?|&&?|\^\^?|\|\|?|~|\b(?:and|at|not|or|with|xor)\b/,constant:/\b(?:GM_build_date|GM_version|action_(?:continue|restart|reverse|stop)|all|gamespeed_(?:fps|microseconds)|global|local|noone|other|pi|pointer_(?:invalid|null)|self|timezone_(?:local|utc)|undefined|ev_(?:create|destroy|step|alarm|keyboard|mouse|collision|other|draw|draw_(?:begin|end|post|pre)|keypress|keyrelease|trigger|(?:left|middle|no|right)_button|(?:left|middle|right)_press|(?:left|middle|right)_release|mouse_(?:enter|leave|wheel_down|wheel_up)|global_(?:left|middle|right)_button|global_(?:left|middle|right)_press|global_(?:left|middle|right)_release|joystick(?:1|2)_(?:button1|button2|button3|button4|button5|button6|button7|button8|down|left|right|up)|outside|boundary|game_start|game_end|room_start|room_end|no_more_lives|animation_end|end_of_path|no_more_health|user\d|gui|gui_begin|gui_end|step_(?:begin|end|normal))|vk_(?:alt|anykey|backspace|control|delete|down|end|enter|escape|home|insert|left|nokey|pagedown|pageup|pause|printscreen|return|right|shift|space|tab|up|f\d|numpad\d|add|decimal|divide|lalt|lcontrol|lshift|multiply|ralt|rcontrol|rshift|subtract)|achievement_(?:filter_(?:all_players|favorites_only|friends_only)|friends_info|info|leaderboard_info|our_info|pic_loaded|show_(?:achievement|bank|friend_picker|leaderboard|profile|purchase_prompt|ui)|type_challenge|type_score_challenge)|asset_(?:font|object|path|room|script|shader|sound|sprite|tiles|timeline|unknown)|audio_(?:3d|falloff_(?:exponent_distance|exponent_distance_clamped|inverse_distance|inverse_distance_clamped|linear_distance|linear_distance_clamped|none)|mono|new_system|old_system|stereo)|bm_(?:add|complex|dest_alpha|dest_color|dest_colour|inv_dest_alpha|inv_dest_color|inv_dest_colour|inv_src_alpha|inv_src_color|inv_src_colour|max|normal|one|src_alpha|src_alpha_sat|src_color|src_colour|subtract|zero)|browser_(?:chrome|firefox|ie|ie_mobile|not_a_browser|opera|safari|safari_mobile|tizen|unknown|windows_store)|buffer_(?:bool|f16|f32|f64|fast|fixed|generalerror|grow|invalidtype|network|outofbounds|outofspace|s16|s32|s8|seek_end|seek_relative|seek_start|string|text|u16|u32|u64|u8|vbuffer|wrap)|c_(?:aqua|black|blue|dkgray|fuchsia|gray|green|lime|ltgray|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow)|cmpfunc_(?:always|equal|greater|greaterequal|less|lessequal|never|notequal)|cr_(?:appstart|arrow|beam|cross|default|drag|handpoint|hourglass|none|size_all|size_nesw|size_ns|size_nwse|size_we|uparrow)|cull_(?:clockwise|counterclockwise|noculling)|device_(?:emulator|tablet)|device_ios_(?:ipad|ipad_retina|iphone|iphone5|iphone6|iphone6plus|iphone_retina|unknown)|display_(?:landscape|landscape_flipped|portrait|portrait_flipped)|dll_(?:cdecl|cdel|stdcall)|ds_type_(?:grid|list|map|priority|queue|stack)|ef_(?:cloud|ellipse|explosion|firework|flare|rain|ring|smoke|smokeup|snow|spark|star)|fa_(?:archive|bottom|center|directory|hidden|left|middle|readonly|right|sysfile|top|volumeid)|fb_login_(?:default|fallback_to_webview|forcing_safari|forcing_webview|no_fallback_to_webview|use_system_account)|iap_(?:available|canceled|ev_consume|ev_product|ev_purchase|ev_restore|ev_storeload|failed|purchased|refunded|status_available|status_loading|status_processing|status_restoring|status_unavailable|status_uninitialised|storeload_failed|storeload_ok|unavailable)|leaderboard_type_(?:number|time_mins_secs)|lighttype_(?:dir|point)|matrix_(?:projection|view|world)|mb_(?:any|left|middle|none|right)|network_(?:config_(?:connect_timeout|disable_reliable_udp|enable_reliable_udp|use_non_blocking_socket)|socket_(?:bluetooth|tcp|udp)|type_(?:connect|data|disconnect|non_blocking_connect))|of_challenge_(?:lose|tie|win)|os_(?:android|ios|linux|macosx|ps3|ps4|psvita|unknown|uwp|win32|win8native|windows|winphone|xboxone)|phy_debug_render_(?:aabb|collision_pairs|coms|core_shapes|joints|obb|shapes)|phy_joint_(?:anchor_1_x|anchor_1_y|anchor_2_x|anchor_2_y|angle|angle_limits|damping_ratio|frequency|length_1|length_2|lower_angle_limit|max_force|max_length|max_motor_force|max_motor_torque|max_torque|motor_force|motor_speed|motor_torque|reaction_force_x|reaction_force_y|reaction_torque|speed|translation|upper_angle_limit)|phy_particle_data_flag_(?:category|color|colour|position|typeflags|velocity)|phy_particle_flag_(?:colormixing|colourmixing|elastic|powder|spring|tensile|viscous|wall|water|zombie)|phy_particle_group_flag_(?:rigid|solid)|pr_(?:linelist|linestrip|pointlist|trianglefan|trianglelist|trianglestrip)|ps_(?:distr|shape)_(?:diamond|ellipse|gaussian|invgaussian|line|linear|rectangle)|pt_shape_(?:circle|cloud|disk|explosion|flare|line|pixel|ring|smoke|snow|spark|sphere|square|star)|ty_(?:real|string)|gp_(?:face\d|axislh|axislv|axisrh|axisrv|padd|padl|padr|padu|select|shoulderl|shoulderlb|shoulderr|shoulderrb|start|stickl|stickr)|lb_disp_(?:none|numeric|time_ms|time_sec)|lb_sort_(?:ascending|descending|none)|ov_(?:achievements|community|friends|gamegroup|players|settings)|ugc_(?:filetype_(?:community|microtrans)|list_(?:Favorited|Followed|Published|Subscribed|UsedOrPlayed|VotedDown|VotedOn|VotedUp|WillVoteLater)|match_(?:AllGuides|Artwork|Collections|ControllerBindings|IntegratedGuides|Items|Items_Mtx|Items_ReadyToUse|Screenshots|UsableInGame|Videos|WebGuides)|query_(?:AcceptedForGameRankedByAcceptanceDate|CreatedByFriendsRankedByPublicationDate|FavoritedByFriendsRankedByPublicationDate|NotYetRated)|query_RankedBy(?:NumTimesReported|PublicationDate|TextSearch|TotalVotesAsc|Trend|Vote|VotesUp)|result_success|sortorder_CreationOrder(?:Asc|Desc)|sortorder_(?:ForModeration|LastUpdatedDesc|SubscriptionDateDesc|TitleAsc|VoteScoreDesc)|visibility_(?:friends_only|private|public))|vertex_usage_(?:binormal|blendindices|blendweight|color|colour|depth|fog|normal|position|psize|sample|tangent|texcoord|textcoord)|vertex_type_(?:float\d|color|colour|ubyte4)|input_type|layerelementtype_(?:background|instance|oldtilemap|particlesystem|sprite|tile|tilemap|undefined)|se_(?:chorus|compressor|echo|equalizer|flanger|gargle|none|reverb)|text_type|tile_(?:flip|index_mask|mirror|rotate)|(?:obj|rm|scr|spr)\w+)\b/,variable:/\b(?:alarm|application_surface|async_load|background_(?:alpha|blend|color|colour|foreground|height|hspeed|htiled|index|showcolor|showcolour|visible|vspeed|vtiled|width|x|xscale|y|yscale)|bbox_(?:bottom|left|right|top)|browser_(?:height|width)|caption_(?:health|lives|score)|current_(?:day|hour|minute|month|second|time|weekday|year)|cursor_sprite|debug_mode|delta_time|direction|display_aa|error_(?:last|occurred)|event_(?:action|number|object|type)|fps|fps_real|friction|game_(?:display|project|save)_(?:id|name)|gamemaker_(?:pro|registered|version)|gravity|gravity_direction|(?:h|v)speed|health|iap_data|id|image_(?:alpha|angle|blend|depth|index|number|speed|xscale|yscale)|instance_(?:count|id)|keyboard_(?:key|lastchar|lastkey|string)|layer|lives|mask_index|mouse_(?:button|lastbutton|x|y)|object_index|os_(?:browser|device|type|version)|path_(?:endaction|index|orientation|position|positionprevious|scale|speed)|persistent|phy_(?:rotation|(?:col_normal|collision|com|linear_velocity|position|speed)_(?:x|y)|angular_(?:damping|velocity)|position_(?:x|y)previous|speed|linear_damping|bullet|fixed_rotation|active|mass|inertia|dynamic|kinematic|sleeping|collision_points)|pointer_(?:invalid|null)|room|room_(?:caption|first|height|last|persistent|speed|width)|score|secure_mode|show_(?:health|lives|score)|solid|speed|sprite_(?:height|index|width|xoffset|yoffset)|temp_directory|timeline_(?:index|loop|position|running|speed)|transition_(?:color|kind|steps)|undefined|view_(?:angle|current|enabled|(?:h|v)(?:border|speed)|(?:h|w|x|y)port|(?:h|w|x|y)view|object|surface_id|visible)|visible|webgl_enabled|working_directory|(?:x|y)(?:previous|start)|x|y|argument(?:_relitive|_count|\d)|argument|global|local|other|self)\b/}); \ No newline at end of file diff --git a/tests/languages/gml/function_feature.test b/tests/languages/gml/function_feature.test new file mode 100644 index 0000000000..6351c8533a --- /dev/null +++ b/tests/languages/gml/function_feature.test @@ -0,0 +1,55 @@ +buff = buffer_create(16384, buffer_grow, 2); +ini_open("Save.ini"); +var str = ini_read_string("Save", "Slot1", ""); +buffer_base64_decode_ext(buff, str, 0); +ini_close(); + +---------------------------------------------------- + +[ + "buff ", + ["operator", "="], + ["function", "buffer_create"], + ["punctuation", "("], + ["number", "16384"], + ["punctuation", ","], + ["constant", "buffer_grow"], + ["punctuation", ","], + ["number", "2"], + ["punctuation", ")"], + ["punctuation", ";"], + + ["function", "ini_open"], + ["punctuation", "("], + ["string", "\"Save.ini\""], + ["punctuation", ")"], + ["punctuation", ";"], + + ["keyword", "var"], + " str ", + ["operator", "="], + ["function", "ini_read_string"], + ["punctuation", "("], + ["string", "\"Save\""], + ["punctuation", ","], + ["string", "\"Slot1\""], + ["punctuation", ","], + ["string", "\"\""], + ["punctuation", ")"], + ["punctuation", ";"], + + ["function", "buffer_base64_decode_ext"], + ["punctuation", "("], + "buff", + ["punctuation", ","], + " str", + ["punctuation", ","], + ["number", "0"], + ["punctuation", ")"], + ["punctuation", ";"], + + ["function", "ini_close"], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", ";"] +] diff --git a/tests/languages/gml/keyword_feature.test b/tests/languages/gml/keyword_feature.test new file mode 100644 index 0000000000..2b4a7a8b60 --- /dev/null +++ b/tests/languages/gml/keyword_feature.test @@ -0,0 +1,39 @@ +if +else +switch +case +default +break +for +repeat +while +do +until +continue +exit +return +globalvar +var +enum + +---------------------------------------------------- + +[ + ["keyword", "if"], + ["keyword", "else"], + ["keyword", "switch"], + ["keyword", "case"], + ["keyword", "default"], + ["keyword", "break"], + ["keyword", "for"], + ["keyword", "repeat"], + ["keyword", "while"], + ["keyword", "do"], + ["keyword", "until"], + ["keyword", "continue"], + ["keyword", "exit"], + ["keyword", "return"], + ["keyword", "globalvar"], + ["keyword", "var"], + ["keyword", "enum"] +] diff --git a/tests/languages/gml/number_feature.test b/tests/languages/gml/number_feature.test new file mode 100644 index 0000000000..06358c5df5 --- /dev/null +++ b/tests/languages/gml/number_feature.test @@ -0,0 +1,25 @@ +0 +123 +123.456 +123. +.456 +1e5 +1.2e-5f + +0xFF +0xFFul + +---------------------------------------------------- + +[ + ["number", "0"], + ["number", "123"], + ["number", "123.456"], + ["number", "123."], + ["number", ".456"], + ["number", "1e5"], + ["number", "1.2e-5f"], + + ["number", "0xFF"], + ["number", "0xFFul"] +] diff --git a/tests/languages/gml/operator_feature.test b/tests/languages/gml/operator_feature.test new file mode 100644 index 0000000000..fb19b87241 --- /dev/null +++ b/tests/languages/gml/operator_feature.test @@ -0,0 +1,62 @@ ++ - % * ** / ++= -= %= *= **= /= +>> << ++ -- + += +== != <> +< <= => > + +& | ^ ~ +&& || ^^ + +or +and +not +with +at +xor + +---------------------------------------------------- + +[ + ["operator", "+"], + ["operator", "-"], + ["operator", "%"], + ["operator", "*"], + ["operator", "**"], + ["operator", "/"], + + ["operator", "+="], + ["operator", "-="], + ["operator", "%="], + ["operator", "*="], + ["operator", "**="], + ["operator", "/="], + + ["operator", ">>"], + ["operator", "<<"], + ["operator", "++"], + ["operator", "--"], + + ["operator", "="], + + ["operator", "=="], + ["operator", "!="], + ["operator", "<>"], + + ["operator", "<"], + ["operator", "<="], + ["operator", "="], + ["operator", ">"], + ["operator", ">"], + + ["operator", "&"], ["operator", "|"], ["operator", "^"], ["operator", "~"], + ["operator", "&&"], ["operator", "||"], ["operator", "^^"], + + ["operator", "or"], + ["operator", "and"], + ["operator", "not"], + ["operator", "with"], + ["operator", "at"], + ["operator", "xor"] +] diff --git a/tests/languages/gml/variable_feature.test b/tests/languages/gml/variable_feature.test new file mode 100644 index 0000000000..dd593062d9 --- /dev/null +++ b/tests/languages/gml/variable_feature.test @@ -0,0 +1,126 @@ +if browser_height > window_get_height() || browser_width > window_get_width() + { + var xx, yy; + if browser_width > window_get_width() + { + xx = (browser_width - window_get_width()) / 2; + } + else + { + xx = 0; + } + if browser_height > window_get_height() + { + yy = (browser_height - window_get_height()) / 2; + } + else + { + yy = 0; + } + window_set_position(xx, yy); + } + +---------------------------------------------------- + +[ + ["keyword", "if"], + ["variable", "browser_height"], + ["operator", ">"], + ["function", "window_get_height"], + ["punctuation", "("], + ["punctuation", ")"], + ["operator", "||"], + ["variable", "browser_width"], + ["operator", ">"], + ["function", "window_get_width"], + ["punctuation", "("], + ["punctuation", ")"], + + ["punctuation", "{"], + + ["keyword", "var"], + " xx", + ["punctuation", ","], + " yy", + ["punctuation", ";"], + + ["keyword", "if"], + ["variable", "browser_width"], + ["operator", ">"], + ["function", "window_get_width"], + ["punctuation", "("], + ["punctuation", ")"], + + ["punctuation", "{"], + + "\r\n\t\txx ", + ["operator", "="], + ["punctuation", "("], + ["variable", "browser_width"], + ["operator", "-"], + ["function", "window_get_width"], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", ")"], + ["operator", "/"], + ["number", "2"], + ["punctuation", ";"], + + ["punctuation", "}"], + + ["keyword", "else"], + + ["punctuation", "{"], + + "\r\n\t\txx ", + ["operator", "="], + ["number", "0"], + ["punctuation", ";"], + + ["punctuation", "}"], + + ["keyword", "if"], + ["variable", "browser_height"], + ["operator", ">"], + ["function", "window_get_height"], + ["punctuation", "("], + ["punctuation", ")"], + + ["punctuation", "{"], + + "\r\n\t\tyy ", + ["operator", "="], + ["punctuation", "("], + ["variable", "browser_height"], + ["operator", "-"], + ["function", "window_get_height"], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", ")"], + ["operator", "/"], + ["number", "2"], + ["punctuation", ";"], + + ["punctuation", "}"], + + ["keyword", "else"], + + ["punctuation", "{"], + + "\r\n\t\tyy ", + ["operator", "="], + ["number", "0"], + ["punctuation", ";"], + + ["punctuation", "}"], + + ["function", "window_set_position"], + ["punctuation", "("], + "xx", + ["punctuation", ","], + " yy", + ["punctuation", ")"], + ["punctuation", ";"], + + ["punctuation", "}"] +] From 15cb3b78ff52345ab96d4c7356eb81b2c55778bc Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Tue, 5 Oct 2021 21:19:53 +0200 Subject: [PATCH 0939/1100] Idris: Fixed import statements (#3115) --- components/prism-idris.js | 14 ++- components/prism-idris.min.js | 2 +- .../idris/import_statement_feature.test | 10 +- tests/languages/idris/keyword_feature.test | 94 +++++++++++++++++-- 4 files changed, 105 insertions(+), 15 deletions(-) diff --git a/components/prism-idris.js b/components/prism-idris.js index 6c2dfec4ca..3717ea02ab 100644 --- a/components/prism-idris.js +++ b/components/prism-idris.js @@ -3,11 +3,17 @@ Prism.languages.idris = Prism.languages.extend('haskell', { pattern: /(?:(?:--|\|\|\|).*$|\{-[\s\S]*?-\})/m, }, 'keyword': /\b(?:Type|case|class|codata|constructor|corecord|data|do|dsl|else|export|if|implementation|implicit|import|impossible|in|infix|infixl|infixr|instance|interface|let|module|mutual|namespace|of|parameters|partial|postulate|private|proof|public|quoteGoal|record|rewrite|syntax|then|total|using|where|with)\b/, - 'import-statement': { - pattern: /(^\s*)import\s+(?:[A-Z][\w']*)(?:\.[A-Z][\w']*)*/m, - lookbehind: true - }, 'builtin': undefined }); +Prism.languages.insertBefore('idris', 'keyword', { + 'import-statement': { + pattern: /(^\s*import\s+)(?:[A-Z][\w']*)(?:\.[A-Z][\w']*)*/m, + lookbehind: true, + inside: { + 'punctuation': /\./ + } + } +}); + Prism.languages.idr = Prism.languages.idris; diff --git a/components/prism-idris.min.js b/components/prism-idris.min.js index 1de39a3076..5e2bd727ab 100644 --- a/components/prism-idris.min.js +++ b/components/prism-idris.min.js @@ -1 +1 @@ -Prism.languages.idris=Prism.languages.extend("haskell",{comment:{pattern:/(?:(?:--|\|\|\|).*$|\{-[\s\S]*?-\})/m},keyword:/\b(?:Type|case|class|codata|constructor|corecord|data|do|dsl|else|export|if|implementation|implicit|import|impossible|in|infix|infixl|infixr|instance|interface|let|module|mutual|namespace|of|parameters|partial|postulate|private|proof|public|quoteGoal|record|rewrite|syntax|then|total|using|where|with)\b/,"import-statement":{pattern:/(^\s*)import\s+(?:[A-Z][\w']*)(?:\.[A-Z][\w']*)*/m,lookbehind:!0},builtin:void 0}),Prism.languages.idr=Prism.languages.idris; \ No newline at end of file +Prism.languages.idris=Prism.languages.extend("haskell",{comment:{pattern:/(?:(?:--|\|\|\|).*$|\{-[\s\S]*?-\})/m},keyword:/\b(?:Type|case|class|codata|constructor|corecord|data|do|dsl|else|export|if|implementation|implicit|import|impossible|in|infix|infixl|infixr|instance|interface|let|module|mutual|namespace|of|parameters|partial|postulate|private|proof|public|quoteGoal|record|rewrite|syntax|then|total|using|where|with)\b/,builtin:void 0}),Prism.languages.insertBefore("idris","keyword",{"import-statement":{pattern:/(^\s*import\s+)(?:[A-Z][\w']*)(?:\.[A-Z][\w']*)*/m,lookbehind:!0,inside:{punctuation:/\./}}}),Prism.languages.idr=Prism.languages.idris; \ No newline at end of file diff --git a/tests/languages/idris/import_statement_feature.test b/tests/languages/idris/import_statement_feature.test index 5554b07990..8652944543 100644 --- a/tests/languages/idris/import_statement_feature.test +++ b/tests/languages/idris/import_statement_feature.test @@ -1,10 +1,18 @@ import Foo +import Maths.NumOps ---------------------------------------------------- [ ["keyword", "import"], - ["constant", ["Foo"]] + ["import-statement", ["Foo"]], + + ["keyword", "import"], + ["import-statement", [ + "Maths", + ["punctuation", "."], + "NumOps" + ]] ] ---------------------------------------------------- diff --git a/tests/languages/idris/keyword_feature.test b/tests/languages/idris/keyword_feature.test index 6a3c0f72d4..476bc8d128 100644 --- a/tests/languages/idris/keyword_feature.test +++ b/tests/languages/idris/keyword_feature.test @@ -1,17 +1,93 @@ -case data do else if implementation -in infixl infixr interface let -module of then where +Type +case +class +codata +constructor +corecord +data +do +dsl +else +export +if +implementation +implicit +import +impossible +in +infix +infixl +infixr +instance +interface +let +module +mutual +namespace +of +parameters +partial +postulate +private +proof +public +quoteGoal +record +rewrite +syntax +then +total +using +where +with ---------------------------------------------------- [ - ["keyword", "case"], ["keyword", "data"], ["keyword", "do"], - ["keyword", "else"], ["keyword", "if"], ["keyword", "implementation"], - ["keyword", "in"], ["keyword", "infixl"], ["keyword", "infixr"], - ["keyword", "interface"], ["keyword", "let"], ["keyword", "module"], - ["keyword", "of"], ["keyword", "then"], ["keyword", "where"] + ["keyword", "Type"], + ["keyword", "case"], + ["keyword", "class"], + ["keyword", "codata"], + ["keyword", "constructor"], + ["keyword", "corecord"], + ["keyword", "data"], + ["keyword", "do"], + ["keyword", "dsl"], + ["keyword", "else"], + ["keyword", "export"], + ["keyword", "if"], + ["keyword", "implementation"], + ["keyword", "implicit"], + ["keyword", "import"], + ["keyword", "impossible"], + ["keyword", "in"], + ["keyword", "infix"], + ["keyword", "infixl"], + ["keyword", "infixr"], + ["keyword", "instance"], + ["keyword", "interface"], + ["keyword", "let"], + ["keyword", "module"], + ["keyword", "mutual"], + ["keyword", "namespace"], + ["keyword", "of"], + ["keyword", "parameters"], + ["keyword", "partial"], + ["keyword", "postulate"], + ["keyword", "private"], + ["keyword", "proof"], + ["keyword", "public"], + ["keyword", "quoteGoal"], + ["keyword", "record"], + ["keyword", "rewrite"], + ["keyword", "syntax"], + ["keyword", "then"], + ["keyword", "total"], + ["keyword", "using"], + ["keyword", "where"], + ["keyword", "with"] ] ---------------------------------------------------- -Checks for some keywords. \ No newline at end of file +Checks for some keywords. From 75331beae314321ea22c5d2eb79dace86ce8905e Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Tue, 5 Oct 2021 21:20:46 +0200 Subject: [PATCH 0940/1100] Nim: Fixed backtick identifier (#3118) --- components/prism-nim.js | 3 ++- components/prism-nim.min.js | 2 +- tests/languages/nim/identifier_feature.test | 14 ++++++++++++++ 3 files changed, 17 insertions(+), 2 deletions(-) create mode 100644 tests/languages/nim/identifier_feature.test diff --git a/components/prism-nim.js b/components/prism-nim.js index aaed5e1f82..8a240da0eb 100644 --- a/components/prism-nim.js +++ b/components/prism-nim.js @@ -16,8 +16,9 @@ Prism.languages.nim = { } }, // We don't want to highlight operators inside backticks - 'ignore': { + 'identifier': { pattern: /`[^`\r\n]+`/, + greedy: true, inside: { 'punctuation': /`/ } diff --git a/components/prism-nim.min.js b/components/prism-nim.min.js index 7fde3f6af0..091339a45f 100644 --- a/components/prism-nim.min.js +++ b/components/prism-nim.min.js @@ -1 +1 @@ -Prism.languages.nim={comment:/#.*/,string:{pattern:/(?:(?:\b(?!\d)(?:\w|\\x[8-9a-fA-F][0-9a-fA-F])+)?(?:"""[\s\S]*?"""(?!")|"(?:\\[\s\S]|""|[^"\\])*")|'(?:\\(?:\d+|x[\da-fA-F]{2}|.)|[^'])')/,greedy:!0},number:/\b(?:0[xXoObB][\da-fA-F_]+|\d[\d_]*(?:(?!\.\.)\.[\d_]*)?(?:[eE][+-]?\d[\d_]*)?)(?:'?[iuf]\d*)?/,keyword:/\b(?:addr|as|asm|atomic|bind|block|break|case|cast|concept|const|continue|converter|defer|discard|distinct|do|elif|else|end|enum|except|export|finally|for|from|func|generic|if|import|include|interface|iterator|let|macro|method|mixin|nil|object|out|proc|ptr|raise|ref|return|static|template|try|tuple|type|using|var|when|while|with|without|yield)\b/,function:{pattern:/(?:(?!\d)(?:\w|\\x[8-9a-fA-F][0-9a-fA-F])+|`[^`\r\n]+`)\*?(?:\[[^\]]+\])?(?=\s*\()/,inside:{operator:/\*$/}},ignore:{pattern:/`[^`\r\n]+`/,inside:{punctuation:/`/}},operator:{pattern:/(^|[({\[](?=\.\.)|(?![({\[]\.).)(?:(?:[=+\-*\/<>@$~&%|!?^:\\]|\.\.|\.(?![)}\]]))+|\b(?:and|div|in|is|isnot|mod|not|notin|of|or|shl|shr|xor)\b)/m,lookbehind:!0},punctuation:/[({\[]\.|\.[)}\]]|[`(){}\[\],:]/}; \ No newline at end of file +Prism.languages.nim={comment:/#.*/,string:{pattern:/(?:(?:\b(?!\d)(?:\w|\\x[8-9a-fA-F][0-9a-fA-F])+)?(?:"""[\s\S]*?"""(?!")|"(?:\\[\s\S]|""|[^"\\])*")|'(?:\\(?:\d+|x[\da-fA-F]{2}|.)|[^'])')/,greedy:!0},number:/\b(?:0[xXoObB][\da-fA-F_]+|\d[\d_]*(?:(?!\.\.)\.[\d_]*)?(?:[eE][+-]?\d[\d_]*)?)(?:'?[iuf]\d*)?/,keyword:/\b(?:addr|as|asm|atomic|bind|block|break|case|cast|concept|const|continue|converter|defer|discard|distinct|do|elif|else|end|enum|except|export|finally|for|from|func|generic|if|import|include|interface|iterator|let|macro|method|mixin|nil|object|out|proc|ptr|raise|ref|return|static|template|try|tuple|type|using|var|when|while|with|without|yield)\b/,function:{pattern:/(?:(?!\d)(?:\w|\\x[8-9a-fA-F][0-9a-fA-F])+|`[^`\r\n]+`)\*?(?:\[[^\]]+\])?(?=\s*\()/,inside:{operator:/\*$/}},identifier:{pattern:/`[^`\r\n]+`/,greedy:!0,inside:{punctuation:/`/}},operator:{pattern:/(^|[({\[](?=\.\.)|(?![({\[]\.).)(?:(?:[=+\-*\/<>@$~&%|!?^:\\]|\.\.|\.(?![)}\]]))+|\b(?:and|div|in|is|isnot|mod|not|notin|of|or|shl|shr|xor)\b)/m,lookbehind:!0},punctuation:/[({\[]\.|\.[)}\]]|[`(){}\[\],:]/}; \ No newline at end of file diff --git a/tests/languages/nim/identifier_feature.test b/tests/languages/nim/identifier_feature.test new file mode 100644 index 0000000000..d547eb882e --- /dev/null +++ b/tests/languages/nim/identifier_feature.test @@ -0,0 +1,14 @@ +var `var` = 42 + +---------------------------------------------------- + +[ + ["keyword", "var"], + ["identifier", [ + ["punctuation", "`"], + "var", + ["punctuation", "`"] + ]], + ["operator", "="], + ["number", "42"] +] From dc1e808f22a275408ba61f325c0243bc6a099cc8 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Tue, 5 Oct 2021 21:21:05 +0200 Subject: [PATCH 0941/1100] Nix: Removed unmatchable token (#3119) --- components/prism-nix.js | 10 ++-------- components/prism-nix.min.js | 2 +- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/components/prism-nix.js b/components/prism-nix.js index d1cf657d95..46063611a8 100644 --- a/components/prism-nix.js +++ b/components/prism-nix.js @@ -8,13 +8,7 @@ Prism.languages.nix = { // The lookbehind ensures the ${} is not preceded by \ or '' pattern: /(^|(?:^|(?!'').)[^\\])\$\{(?:[^{}]|\{[^}]*\})*\}/, lookbehind: true, - inside: { - 'antiquotation': { - pattern: /^\$(?=\{)/, - alias: 'variable' - } - // See rest below - } + inside: null // see below } } }, @@ -37,4 +31,4 @@ Prism.languages.nix = { 'punctuation': /[{}()[\].,:;]/ }; -Prism.languages.nix.string.inside.interpolation.inside.rest = Prism.languages.nix; +Prism.languages.nix.string.inside.interpolation.inside = Prism.languages.nix; diff --git a/components/prism-nix.min.js b/components/prism-nix.min.js index f721364670..4f2f738fd3 100644 --- a/components/prism-nix.min.js +++ b/components/prism-nix.min.js @@ -1 +1 @@ -Prism.languages.nix={comment:/\/\*[\s\S]*?\*\/|#.*/,string:{pattern:/"(?:[^"\\]|\\[\s\S])*"|''(?:(?!'')[\s\S]|''(?:'|\\|\$\{))*''/,greedy:!0,inside:{interpolation:{pattern:/(^|(?:^|(?!'').)[^\\])\$\{(?:[^{}]|\{[^}]*\})*\}/,lookbehind:!0,inside:{antiquotation:{pattern:/^\$(?=\{)/,alias:"variable"}}}}},url:[/\b(?:[a-z]{3,7}:\/\/)[\w\-+%~\/.:#=?&]+/,{pattern:/([^\/])(?:[\w\-+%~.:#=?&]*(?!\/\/)[\w\-+%~\/.:#=?&])?(?!\/\/)\/[\w\-+%~\/.:#=?&]*/,lookbehind:!0}],antiquotation:{pattern:/\$(?=\{)/,alias:"variable"},number:/\b\d+\b/,keyword:/\b(?:assert|builtins|else|if|in|inherit|let|null|or|then|with)\b/,function:/\b(?:abort|add|all|any|attrNames|attrValues|baseNameOf|compareVersions|concatLists|currentSystem|deepSeq|derivation|dirOf|div|elem(?:At)?|fetch(?:Tarball|url)|filter(?:Source)?|fromJSON|genList|getAttr|getEnv|hasAttr|hashString|head|import|intersectAttrs|is(?:Attrs|Bool|Function|Int|List|Null|String)|length|lessThan|listToAttrs|map|mul|parseDrvName|pathExists|read(?:Dir|File)|removeAttrs|replaceStrings|seq|sort|stringLength|sub(?:string)?|tail|throw|to(?:File|JSON|Path|String|XML)|trace|typeOf)\b|\bfoldl'\B/,boolean:/\b(?:false|true)\b/,operator:/[=!<>]=?|\+\+?|\|\||&&|\/\/|->?|[?@]/,punctuation:/[{}()[\].,:;]/},Prism.languages.nix.string.inside.interpolation.inside.rest=Prism.languages.nix; \ No newline at end of file +Prism.languages.nix={comment:/\/\*[\s\S]*?\*\/|#.*/,string:{pattern:/"(?:[^"\\]|\\[\s\S])*"|''(?:(?!'')[\s\S]|''(?:'|\\|\$\{))*''/,greedy:!0,inside:{interpolation:{pattern:/(^|(?:^|(?!'').)[^\\])\$\{(?:[^{}]|\{[^}]*\})*\}/,lookbehind:!0,inside:null}}},url:[/\b(?:[a-z]{3,7}:\/\/)[\w\-+%~\/.:#=?&]+/,{pattern:/([^\/])(?:[\w\-+%~.:#=?&]*(?!\/\/)[\w\-+%~\/.:#=?&])?(?!\/\/)\/[\w\-+%~\/.:#=?&]*/,lookbehind:!0}],antiquotation:{pattern:/\$(?=\{)/,alias:"variable"},number:/\b\d+\b/,keyword:/\b(?:assert|builtins|else|if|in|inherit|let|null|or|then|with)\b/,function:/\b(?:abort|add|all|any|attrNames|attrValues|baseNameOf|compareVersions|concatLists|currentSystem|deepSeq|derivation|dirOf|div|elem(?:At)?|fetch(?:Tarball|url)|filter(?:Source)?|fromJSON|genList|getAttr|getEnv|hasAttr|hashString|head|import|intersectAttrs|is(?:Attrs|Bool|Function|Int|List|Null|String)|length|lessThan|listToAttrs|map|mul|parseDrvName|pathExists|read(?:Dir|File)|removeAttrs|replaceStrings|seq|sort|stringLength|sub(?:string)?|tail|throw|to(?:File|JSON|Path|String|XML)|trace|typeOf)\b|\bfoldl'\B/,boolean:/\b(?:false|true)\b/,operator:/[=!<>]=?|\+\+?|\|\||&&|\/\/|->?|[?@]/,punctuation:/[{}()[\].,:;]/},Prism.languages.nix.string.inside.interpolation.inside=Prism.languages.nix; \ No newline at end of file From ee62a080239699526881b2854458a7b81d245d7a Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Tue, 5 Oct 2021 21:23:44 +0200 Subject: [PATCH 0942/1100] PHP: Removed useless keyword tokens (#3121) --- components/prism-php.js | 16 ++-------- components/prism-php.min.js | 2 +- tests/languages/php/class-name_feature.test | 33 +++++++++++++++++++++ 3 files changed, 36 insertions(+), 15 deletions(-) diff --git a/components/prism-php.js b/components/prism-php.js index a5066e43a5..c79d6bb385 100644 --- a/components/prism-php.js +++ b/components/prism-php.js @@ -66,12 +66,6 @@ greedy: true, lookbehind: true }, - { - pattern: /([(,?]\s*[\w|]\|\s*)(?:false|null)\b(?=\s*\$)/i, - alias: 'type-hint', - greedy: true, - lookbehind: true - }, { pattern: /(\)\s*:\s*(?:\?\s*)?)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|object|self|static|string|void)\b/i, alias: 'return-type', @@ -79,18 +73,12 @@ lookbehind: true }, { - pattern: /(\)\s*:\s*(?:\?\s*)?[\w|]\|\s*)(?:false|null)\b/i, - alias: 'return-type', - greedy: true, - lookbehind: true - }, - { - pattern: /\b(?:array(?!\s*\()|bool|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|object|string|void)\b/i, + pattern: /\b(?:array(?!\s*\()|bool|float|int|iterable|mixed|object|string|void)\b/i, alias: 'type-declaration', greedy: true }, { - pattern: /(\|\s*)(?:false|null)\b/i, + pattern: /(\|\s*)(?:false|null)\b|\b(?:false|null)(?=\s*\|)/i, alias: 'type-declaration', greedy: true, lookbehind: true diff --git a/components/prism-php.min.js b/components/prism-php.min.js index a3efd7e38e..8e503ddd01 100644 --- a/components/prism-php.min.js +++ b/components/prism-php.min.js @@ -1 +1 @@ -!function(a){var e=/\/\*[\s\S]*?\*\/|\/\/.*|#(?!\[).*/,t=[{pattern:/\b(?:false|true)\b/i,alias:"boolean"},{pattern:/(::\s*)\b[a-z_]\w*\b(?!\s*\()/i,greedy:!0,lookbehind:!0},{pattern:/(\b(?:case|const)\s+)\b[a-z_]\w*(?=\s*[;=])/i,greedy:!0,lookbehind:!0},/\b(?:null)\b/i,/\b[A-Z_][A-Z0-9_]*\b(?!\s*\()/],i=/\b0b[01]+(?:_[01]+)*\b|\b0o[0-7]+(?:_[0-7]+)*\b|\b0x[\da-f]+(?:_[\da-f]+)*\b|(?:\b\d+(?:_\d+)*\.?(?:\d+(?:_\d+)*)?|\B\.\d+)(?:e[+-]?\d+)?/i,n=/|\?\?=?|\.{3}|\??->|[!=]=?=?|::|\*\*=?|--|\+\+|&&|\|\||<<|>>|[?~]|[/^|%*&<>.+-]=?/,s=/[{}\[\](),:;]/;a.languages.php={delimiter:{pattern:/\?>$|^<\?(?:php(?=\s)|=)?/i,alias:"important"},comment:e,variable:/\$+(?:\w+\b|(?=\{))/i,package:{pattern:/(namespace\s+|use\s+(?:function\s+)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,lookbehind:!0,inside:{punctuation:/\\/}},"class-name-definition":{pattern:/(\b(?:class|enum|interface|trait)\s+)\b[a-z_]\w*(?!\\)\b/i,lookbehind:!0,alias:"class-name"},"function-definition":{pattern:/(\bfunction\s+)[a-z_]\w*(?=\s*\()/i,lookbehind:!0,alias:"function"},keyword:[{pattern:/(\(\s*)\b(?:array|bool|boolean|float|int|integer|object|string)\b(?=\s*\))/i,alias:"type-casting",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|object|self|static|string)\b(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*[\w|]\|\s*)(?:false|null)\b(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|object|self|static|string|void)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?[\w|]\|\s*)(?:false|null)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/\b(?:array(?!\s*\()|bool|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|object|string|void)\b/i,alias:"type-declaration",greedy:!0},{pattern:/(\|\s*)(?:false|null)\b/i,alias:"type-declaration",greedy:!0,lookbehind:!0},{pattern:/\b(?:parent|self|static)(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(\byield\s+)from\b/i,lookbehind:!0},/\bclass\b/i,{pattern:/((?:^|[^\s>:]|(?:^|[^-])>|(?:^|[^:]):)\s*)\b(?:abstract|and|array|as|break|callable|case|catch|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|enum|eval|exit|extends|final|finally|fn|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|match|namespace|new|or|parent|print|private|protected|public|require|require_once|return|self|static|switch|throw|trait|try|unset|use|var|while|xor|yield|__halt_compiler)\b/i,lookbehind:!0}],"argument-name":{pattern:/([(,]\s+)\b[a-z_]\w*(?=\s*:(?!:))/i,lookbehind:!0},"class-name":[{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self|\s+static))\s+|\bcatch\s*\()\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/(\|\s*)\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/\b[a-z_]\w*(?!\\)\b(?=\s*\|)/i,greedy:!0},{pattern:/(\|\s*)(?:\\?\b[a-z_]\w*)+\b/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(?:\\?\b[a-z_]\w*)+\b(?=\s*\|)/i,alias:"class-name-fully-qualified",greedy:!0,inside:{punctuation:/\\/}},{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self\b|\s+static\b))\s+|\bcatch\s*\()(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*\$)/i,alias:"type-declaration",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-declaration"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*::)/i,alias:["class-name-fully-qualified","static-context"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/([(,?]\s*)[a-z_]\w*(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-hint"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b[a-z_]\w*(?!\\)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:["class-name-fully-qualified","return-type"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:t,function:{pattern:/(^|[^\\\w])\\?[a-z_](?:[\w\\]*\w)?(?=\s*\()/i,lookbehind:!0,inside:{punctuation:/\\/}},property:{pattern:/(->\s*)\w+/,lookbehind:!0},number:i,operator:n,punctuation:s};var l={pattern:/\{\$(?:\{(?:\{[^{}]+\}|[^{}]+)\}|[^{}])+\}|(^|[^\\{])\$+(?:\w+(?:\[[^\r\n\[\]]+\]|->\w+)?)/,lookbehind:!0,inside:a.languages.php},r=[{pattern:/<<<'([^']+)'[\r\n](?:.*[\r\n])*?\1;/,alias:"nowdoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<'[^']+'|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<'?|[';]$/}}}},{pattern:/<<<(?:"([^"]+)"[\r\n](?:.*[\r\n])*?\1;|([a-z_]\w*)[\r\n](?:.*[\r\n])*?\2;)/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<(?:"[^"]+"|[a-z_]\w*)|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<"?|[";]$/}},interpolation:l}},{pattern:/`(?:\\[\s\S]|[^\\`])*`/,alias:"backtick-quoted-string",greedy:!0},{pattern:/'(?:\\[\s\S]|[^\\'])*'/,alias:"single-quoted-string",greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,alias:"double-quoted-string",greedy:!0,inside:{interpolation:l}}];a.languages.insertBefore("php","variable",{string:r,attribute:{pattern:/#\[(?:[^"'\/#]|\/(?![*/])|\/\/.*$|#(?!\[).*$|\/\*(?:[^*]|\*(?!\/))*\*\/|"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*')+\](?=\s*[a-z$#])/im,greedy:!0,inside:{"attribute-content":{pattern:/^(#\[)[\s\S]+(?=\]$)/,lookbehind:!0,inside:{comment:e,string:r,"attribute-class-name":[{pattern:/([^:]|^)\b[a-z_]\w*(?!\\)\b/i,alias:"class-name",greedy:!0,lookbehind:!0},{pattern:/([^:]|^)(?:\\?\b[a-z_]\w*)+/i,alias:["class-name","class-name-fully-qualified"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:t,number:i,operator:n,punctuation:s}},delimiter:{pattern:/^#\[|\]$/,alias:"punctuation"}}}}),a.hooks.add("before-tokenize",function(e){if(/<\?/.test(e.code)){a.languages["markup-templating"].buildPlaceholders(e,"php",/<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#(?!\[))(?:[^?\n\r]|\?(?!>))*(?=$|\?>|[\r\n])|#\[|\/\*(?:[^*]|\*(?!\/))*(?:\*\/|$))*?(?:\?>|$)/gi)}}),a.hooks.add("after-tokenize",function(e){a.languages["markup-templating"].tokenizePlaceholders(e,"php")})}(Prism); \ No newline at end of file +!function(a){var e=/\/\*[\s\S]*?\*\/|\/\/.*|#(?!\[).*/,t=[{pattern:/\b(?:false|true)\b/i,alias:"boolean"},{pattern:/(::\s*)\b[a-z_]\w*\b(?!\s*\()/i,greedy:!0,lookbehind:!0},{pattern:/(\b(?:case|const)\s+)\b[a-z_]\w*(?=\s*[;=])/i,greedy:!0,lookbehind:!0},/\b(?:null)\b/i,/\b[A-Z_][A-Z0-9_]*\b(?!\s*\()/],i=/\b0b[01]+(?:_[01]+)*\b|\b0o[0-7]+(?:_[0-7]+)*\b|\b0x[\da-f]+(?:_[\da-f]+)*\b|(?:\b\d+(?:_\d+)*\.?(?:\d+(?:_\d+)*)?|\B\.\d+)(?:e[+-]?\d+)?/i,n=/|\?\?=?|\.{3}|\??->|[!=]=?=?|::|\*\*=?|--|\+\+|&&|\|\||<<|>>|[?~]|[/^|%*&<>.+-]=?/,s=/[{}\[\](),:;]/;a.languages.php={delimiter:{pattern:/\?>$|^<\?(?:php(?=\s)|=)?/i,alias:"important"},comment:e,variable:/\$+(?:\w+\b|(?=\{))/i,package:{pattern:/(namespace\s+|use\s+(?:function\s+)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,lookbehind:!0,inside:{punctuation:/\\/}},"class-name-definition":{pattern:/(\b(?:class|enum|interface|trait)\s+)\b[a-z_]\w*(?!\\)\b/i,lookbehind:!0,alias:"class-name"},"function-definition":{pattern:/(\bfunction\s+)[a-z_]\w*(?=\s*\()/i,lookbehind:!0,alias:"function"},keyword:[{pattern:/(\(\s*)\b(?:array|bool|boolean|float|int|integer|object|string)\b(?=\s*\))/i,alias:"type-casting",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|object|self|static|string)\b(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|object|self|static|string|void)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/\b(?:array(?!\s*\()|bool|float|int|iterable|mixed|object|string|void)\b/i,alias:"type-declaration",greedy:!0},{pattern:/(\|\s*)(?:false|null)\b|\b(?:false|null)(?=\s*\|)/i,alias:"type-declaration",greedy:!0,lookbehind:!0},{pattern:/\b(?:parent|self|static)(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(\byield\s+)from\b/i,lookbehind:!0},/\bclass\b/i,{pattern:/((?:^|[^\s>:]|(?:^|[^-])>|(?:^|[^:]):)\s*)\b(?:abstract|and|array|as|break|callable|case|catch|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|enum|eval|exit|extends|final|finally|fn|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|match|namespace|new|or|parent|print|private|protected|public|require|require_once|return|self|static|switch|throw|trait|try|unset|use|var|while|xor|yield|__halt_compiler)\b/i,lookbehind:!0}],"argument-name":{pattern:/([(,]\s+)\b[a-z_]\w*(?=\s*:(?!:))/i,lookbehind:!0},"class-name":[{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self|\s+static))\s+|\bcatch\s*\()\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/(\|\s*)\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/\b[a-z_]\w*(?!\\)\b(?=\s*\|)/i,greedy:!0},{pattern:/(\|\s*)(?:\\?\b[a-z_]\w*)+\b/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(?:\\?\b[a-z_]\w*)+\b(?=\s*\|)/i,alias:"class-name-fully-qualified",greedy:!0,inside:{punctuation:/\\/}},{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self\b|\s+static\b))\s+|\bcatch\s*\()(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*\$)/i,alias:"type-declaration",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-declaration"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*::)/i,alias:["class-name-fully-qualified","static-context"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/([(,?]\s*)[a-z_]\w*(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-hint"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b[a-z_]\w*(?!\\)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:["class-name-fully-qualified","return-type"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:t,function:{pattern:/(^|[^\\\w])\\?[a-z_](?:[\w\\]*\w)?(?=\s*\()/i,lookbehind:!0,inside:{punctuation:/\\/}},property:{pattern:/(->\s*)\w+/,lookbehind:!0},number:i,operator:n,punctuation:s};var l={pattern:/\{\$(?:\{(?:\{[^{}]+\}|[^{}]+)\}|[^{}])+\}|(^|[^\\{])\$+(?:\w+(?:\[[^\r\n\[\]]+\]|->\w+)?)/,lookbehind:!0,inside:a.languages.php},r=[{pattern:/<<<'([^']+)'[\r\n](?:.*[\r\n])*?\1;/,alias:"nowdoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<'[^']+'|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<'?|[';]$/}}}},{pattern:/<<<(?:"([^"]+)"[\r\n](?:.*[\r\n])*?\1;|([a-z_]\w*)[\r\n](?:.*[\r\n])*?\2;)/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<(?:"[^"]+"|[a-z_]\w*)|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<"?|[";]$/}},interpolation:l}},{pattern:/`(?:\\[\s\S]|[^\\`])*`/,alias:"backtick-quoted-string",greedy:!0},{pattern:/'(?:\\[\s\S]|[^\\'])*'/,alias:"single-quoted-string",greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,alias:"double-quoted-string",greedy:!0,inside:{interpolation:l}}];a.languages.insertBefore("php","variable",{string:r,attribute:{pattern:/#\[(?:[^"'\/#]|\/(?![*/])|\/\/.*$|#(?!\[).*$|\/\*(?:[^*]|\*(?!\/))*\*\/|"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*')+\](?=\s*[a-z$#])/im,greedy:!0,inside:{"attribute-content":{pattern:/^(#\[)[\s\S]+(?=\]$)/,lookbehind:!0,inside:{comment:e,string:r,"attribute-class-name":[{pattern:/([^:]|^)\b[a-z_]\w*(?!\\)\b/i,alias:"class-name",greedy:!0,lookbehind:!0},{pattern:/([^:]|^)(?:\\?\b[a-z_]\w*)+/i,alias:["class-name","class-name-fully-qualified"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:t,number:i,operator:n,punctuation:s}},delimiter:{pattern:/^#\[|\]$/,alias:"punctuation"}}}}),a.hooks.add("before-tokenize",function(e){if(/<\?/.test(e.code)){a.languages["markup-templating"].buildPlaceholders(e,"php",/<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#(?!\[))(?:[^?\n\r]|\?(?!>))*(?=$|\?>|[\r\n])|#\[|\/\*(?:[^*]|\*(?!\/))*(?:\*\/|$))*?(?:\?>|$)/gi)}}),a.hooks.add("after-tokenize",function(e){a.languages["markup-templating"].tokenizePlaceholders(e,"php")})}(Prism); \ No newline at end of file diff --git a/tests/languages/php/class-name_feature.test b/tests/languages/php/class-name_feature.test index cda1575973..bf5319919a 100644 --- a/tests/languages/php/class-name_feature.test +++ b/tests/languages/php/class-name_feature.test @@ -16,6 +16,9 @@ function f($variable): ?Foo {} function f(Foo|Bar $variable): Foo|Bar {} +function f(Foo|false $variable): Foo|Bar {} +function f(Foo|null $variable): Foo|Bar {} + function f(\Package\Foo|\Package\Bar $variable): \Package\Foo|\Package\Bar {} class Foo extends Bar implements Baz {} @@ -134,6 +137,36 @@ class Foo extends \Package\Bar implements App\Baz {} ["punctuation", "{"], ["punctuation", "}"], + ["keyword", "function"], + ["function-definition", "f"], + ["punctuation", "("], + ["class-name", "Foo"], + ["operator", "|"], + ["keyword", "false"], + ["variable", "$variable"], + ["punctuation", ")"], + ["punctuation", ":"], + ["class-name", "Foo"], + ["operator", "|"], + ["class-name", "Bar"], + ["punctuation", "{"], + ["punctuation", "}"], + + ["keyword", "function"], + ["function-definition", "f"], + ["punctuation", "("], + ["class-name", "Foo"], + ["operator", "|"], + ["keyword", "null"], + ["variable", "$variable"], + ["punctuation", ")"], + ["punctuation", ":"], + ["class-name", "Foo"], + ["operator", "|"], + ["class-name", "Bar"], + ["punctuation", "{"], + ["punctuation", "}"], + ["keyword", "function"], ["function-definition", "f"], ["punctuation", "("], From eeb139965c7da503c7ab960fd2238f5cf879a6d7 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Tue, 5 Oct 2021 21:23:59 +0200 Subject: [PATCH 0943/1100] Powerquery: Removed useless `data-type` alternative (#3122) --- components/prism-powerquery.js | 2 +- components/prism-powerquery.min.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/components/prism-powerquery.js b/components/prism-powerquery.js index 8e8c28c91b..6ba473760a 100644 --- a/components/prism-powerquery.js +++ b/components/prism-powerquery.js @@ -40,7 +40,7 @@ Prism.languages.powerquery = { lookbehind: true }, 'data-type': { - pattern: /\b(?:any|anynonnull|binary|date|datetime|datetimezone|duration|function|list|logical|none|number|record|table|text|time|type)\b/, + pattern: /\b(?:any|anynonnull|binary|date|datetime|datetimezone|duration|function|list|logical|none|number|record|table|text|time)\b/, alias: 'variable' }, 'number': { diff --git a/components/prism-powerquery.min.js b/components/prism-powerquery.min.js index d04a74eaf1..fa5b3f1346 100644 --- a/components/prism-powerquery.min.js +++ b/components/prism-powerquery.min.js @@ -1 +1 @@ -Prism.languages.powerquery={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:\/\/).*)/,lookbehind:!0},"quoted-identifier":{pattern:/#"(?:[^"\r\n]|"")*"(?!")/,greedy:!0,alias:"variable"},string:{pattern:/"(?:[^"\r\n]|"")*"(?!")/,greedy:!0},constant:[/\bDay\.(?:Friday|Monday|Saturday|Sunday|Thursday|Tuesday|Wednesday)\b/,/\bTraceLevel\.(?:Critical|Error|Information|Verbose|Warning)\b/,/\bOccurrence\.(?:All|First|Last)\b/,/\bOrder\.(?:Ascending|Descending)\b/,/\bRoundingMode\.(?:AwayFromZero|Down|ToEven|TowardZero|Up)\b/,/\bMissingField\.(?:Error|Ignore|UseNull)\b/,/\bQuoteStyle\.(?:Csv|None)\b/,/\bJoinKind\.(?:FullOuter|Inner|LeftAnti|LeftOuter|RightAnti|RightOuter)\b/,/\bGroupKind\.(?:Global|Local)\b/,/\bExtraValues\.(?:Error|Ignore|List)\b/,/\bJoinAlgorithm\.(?:Dynamic|LeftHash|LeftIndex|PairwiseHash|RightHash|RightIndex|SortMerge)\b/,/\bJoinSide\.(?:Left|Right)\b/,/\bPrecision\.(?:Decimal|Double)\b/,/\bRelativePosition\.From(?:End|Start)\b/,/\bTextEncoding\.(?:Ascii|BigEndianUnicode|Unicode|Utf16|Utf8|Windows)\b/,/\b(?:Any|Binary|Date|DateTime|DateTimeZone|Duration|Function|Int16|Int32|Int64|Int8|List|Logical|None|Number|Record|Table|Text|Time)\.Type\b/,/\bnull\b/],boolean:/\b(?:false|true)\b/,keyword:/\b(?:and|as|each|else|error|if|in|is|let|meta|not|nullable|optional|or|otherwise|section|shared|then|try|type)\b|#(?:binary|date|datetime|datetimezone|duration|infinity|nan|sections|shared|table|time)\b/,function:{pattern:/(^|[^#\w.])(?!\d)[\w.]+(?=\s*\()/,lookbehind:!0},"data-type":{pattern:/\b(?:any|anynonnull|binary|date|datetime|datetimezone|duration|function|list|logical|none|number|record|table|text|time|type)\b/,alias:"variable"},number:{pattern:/\b0x[\da-f]+\b|(?:[+-]?(?:\b\d+\.)?\b\d+|[+-]\.\d+|(^|[^.])\B\.\d+)(?:e[+-]?\d+)?\b/i,lookbehind:!0},operator:/[-+*\/&?@^]|<(?:=>?|>)?|>=?|=>?|\.\.\.?/,punctuation:/[,;\[\](){}]/},Prism.languages.pq=Prism.languages.powerquery,Prism.languages.mscript=Prism.languages.powerquery; \ No newline at end of file +Prism.languages.powerquery={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:\/\/).*)/,lookbehind:!0},"quoted-identifier":{pattern:/#"(?:[^"\r\n]|"")*"(?!")/,greedy:!0,alias:"variable"},string:{pattern:/"(?:[^"\r\n]|"")*"(?!")/,greedy:!0},constant:[/\bDay\.(?:Friday|Monday|Saturday|Sunday|Thursday|Tuesday|Wednesday)\b/,/\bTraceLevel\.(?:Critical|Error|Information|Verbose|Warning)\b/,/\bOccurrence\.(?:All|First|Last)\b/,/\bOrder\.(?:Ascending|Descending)\b/,/\bRoundingMode\.(?:AwayFromZero|Down|ToEven|TowardZero|Up)\b/,/\bMissingField\.(?:Error|Ignore|UseNull)\b/,/\bQuoteStyle\.(?:Csv|None)\b/,/\bJoinKind\.(?:FullOuter|Inner|LeftAnti|LeftOuter|RightAnti|RightOuter)\b/,/\bGroupKind\.(?:Global|Local)\b/,/\bExtraValues\.(?:Error|Ignore|List)\b/,/\bJoinAlgorithm\.(?:Dynamic|LeftHash|LeftIndex|PairwiseHash|RightHash|RightIndex|SortMerge)\b/,/\bJoinSide\.(?:Left|Right)\b/,/\bPrecision\.(?:Decimal|Double)\b/,/\bRelativePosition\.From(?:End|Start)\b/,/\bTextEncoding\.(?:Ascii|BigEndianUnicode|Unicode|Utf16|Utf8|Windows)\b/,/\b(?:Any|Binary|Date|DateTime|DateTimeZone|Duration|Function|Int16|Int32|Int64|Int8|List|Logical|None|Number|Record|Table|Text|Time)\.Type\b/,/\bnull\b/],boolean:/\b(?:false|true)\b/,keyword:/\b(?:and|as|each|else|error|if|in|is|let|meta|not|nullable|optional|or|otherwise|section|shared|then|try|type)\b|#(?:binary|date|datetime|datetimezone|duration|infinity|nan|sections|shared|table|time)\b/,function:{pattern:/(^|[^#\w.])(?!\d)[\w.]+(?=\s*\()/,lookbehind:!0},"data-type":{pattern:/\b(?:any|anynonnull|binary|date|datetime|datetimezone|duration|function|list|logical|none|number|record|table|text|time)\b/,alias:"variable"},number:{pattern:/\b0x[\da-f]+\b|(?:[+-]?(?:\b\d+\.)?\b\d+|[+-]\.\d+|(^|[^.])\B\.\d+)(?:e[+-]?\d+)?\b/i,lookbehind:!0},operator:/[-+*\/&?@^]|<(?:=>?|>)?|>=?|=>?|\.\.\.?/,punctuation:/[,;\[\](){}]/},Prism.languages.pq=Prism.languages.powerquery,Prism.languages.mscript=Prism.languages.powerquery; \ No newline at end of file From 314d6994c000bc0360bdf64693b51f64338cfc4e Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Tue, 5 Oct 2021 21:24:28 +0200 Subject: [PATCH 0944/1100] Ocaml: Removed unmatchable punctuation variant (#3120) --- components/prism-ocaml.js | 2 +- components/prism-ocaml.min.js | 2 +- .../languages/ocaml/punctuation_feature.test | 21 +++++++++++++++++++ 3 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 tests/languages/ocaml/punctuation_feature.test diff --git a/components/prism-ocaml.js b/components/prism-ocaml.js index 8f89471140..d9b06a385d 100644 --- a/components/prism-ocaml.js +++ b/components/prism-ocaml.js @@ -37,5 +37,5 @@ Prism.languages.ocaml = { 'boolean': /\b(?:false|true)\b/, // Custom operators are allowed 'operator': /:=|[=<>@^|&+\-*\/$%!?~][!$%&*+\-.\/:<=>?@^|~]*|\b(?:and|asr|land|lor|lsl|lsr|lxor|mod|or)\b/, - 'punctuation': /[(){}\[\]|.,:;]|\b_\b/ + 'punctuation': /[(){}\[\].,:;]|\b_\b/ }; diff --git a/components/prism-ocaml.min.js b/components/prism-ocaml.min.js index 3145e94d84..1b7d7bccc4 100644 --- a/components/prism-ocaml.min.js +++ b/components/prism-ocaml.min.js @@ -1 +1 @@ -Prism.languages.ocaml={comment:/\(\*[\s\S]*?\*\)/,string:[{pattern:/"(?:\\.|[^\\\r\n"])*"/,greedy:!0},{pattern:/(['`])(?:\\(?:\d+|x[\da-f]+|.)|(?!\1)[^\\\r\n])\1/i,greedy:!0}],number:/\b(?:0x[\da-f][\da-f_]+|(?:0[bo])?\d[\d_]*(?:\.[\d_]*)?(?:e[+-]?[\d_]+)?)/i,directive:{pattern:/\B#\w+/,alias:"important"},label:{pattern:/\B~\w+/,alias:"function"},"type-variable":{pattern:/\B'\w+/,alias:"function"},variant:{pattern:/`\w+/,alias:"variable"},module:{pattern:/\b[A-Z]\w+/,alias:"variable"},keyword:/\b(?:as|assert|begin|class|constraint|do|done|downto|else|end|exception|external|for|fun|function|functor|if|in|include|inherit|initializer|lazy|let|match|method|module|mutable|new|nonrec|object|of|open|private|rec|sig|struct|then|to|try|type|val|value|virtual|when|where|while|with)\b/,boolean:/\b(?:false|true)\b/,operator:/:=|[=<>@^|&+\-*\/$%!?~][!$%&*+\-.\/:<=>?@^|~]*|\b(?:and|asr|land|lor|lsl|lsr|lxor|mod|or)\b/,punctuation:/[(){}\[\]|.,:;]|\b_\b/}; \ No newline at end of file +Prism.languages.ocaml={comment:/\(\*[\s\S]*?\*\)/,string:[{pattern:/"(?:\\.|[^\\\r\n"])*"/,greedy:!0},{pattern:/(['`])(?:\\(?:\d+|x[\da-f]+|.)|(?!\1)[^\\\r\n])\1/i,greedy:!0}],number:/\b(?:0x[\da-f][\da-f_]+|(?:0[bo])?\d[\d_]*(?:\.[\d_]*)?(?:e[+-]?[\d_]+)?)/i,directive:{pattern:/\B#\w+/,alias:"important"},label:{pattern:/\B~\w+/,alias:"function"},"type-variable":{pattern:/\B'\w+/,alias:"function"},variant:{pattern:/`\w+/,alias:"variable"},module:{pattern:/\b[A-Z]\w+/,alias:"variable"},keyword:/\b(?:as|assert|begin|class|constraint|do|done|downto|else|end|exception|external|for|fun|function|functor|if|in|include|inherit|initializer|lazy|let|match|method|module|mutable|new|nonrec|object|of|open|private|rec|sig|struct|then|to|try|type|val|value|virtual|when|where|while|with)\b/,boolean:/\b(?:false|true)\b/,operator:/:=|[=<>@^|&+\-*\/$%!?~][!$%&*+\-.\/:<=>?@^|~]*|\b(?:and|asr|land|lor|lsl|lsr|lxor|mod|or)\b/,punctuation:/[(){}\[\].,:;]|\b_\b/}; \ No newline at end of file diff --git a/tests/languages/ocaml/punctuation_feature.test b/tests/languages/ocaml/punctuation_feature.test new file mode 100644 index 0000000000..48b2a53cc0 --- /dev/null +++ b/tests/languages/ocaml/punctuation_feature.test @@ -0,0 +1,21 @@ +( ) { } [ ] +. , : ; +_ + +---------------------------------------------------- + +[ + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", "{"], + ["punctuation", "}"], + ["punctuation", "["], + ["punctuation", "]"], + + ["punctuation", "."], + ["punctuation", ","], + ["punctuation", ":"], + ["punctuation", ";"], + + ["punctuation", "_"] +] From f3b257865f5c1420c95ec4f711c7033436f4ee82 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Tue, 5 Oct 2021 21:25:23 +0200 Subject: [PATCH 0945/1100] PureBasic: Fixed token order inside `asm` token (#3123) --- components/prism-purebasic.js | 8 +- components/prism-purebasic.min.js | 2 +- tests/languages/purebasic/asm_feature.test | 375 +++++++++++++++++++++ 3 files changed, 380 insertions(+), 5 deletions(-) create mode 100644 tests/languages/purebasic/asm_feature.test diff --git a/components/prism-purebasic.js b/components/prism-purebasic.js index 258e573721..d5d98a403e 100644 --- a/components/prism-purebasic.js +++ b/components/prism-purebasic.js @@ -39,6 +39,10 @@ Prism.languages.insertBefore('purebasic', 'keyword', { lookbehind: true, alias: 'fasm-label' }, + 'keyword': [ + /\b(?:extern|global)\b[^;\r\n]*/i, + /\b(?:CPU|DEFAULT|FLOAT)\b.*/ + ], 'function': { pattern: /^([\t ]*!\s*)[\da-z]+(?=\s|$)/im, lookbehind: true @@ -53,10 +57,6 @@ Prism.languages.insertBefore('purebasic', 'keyword', { lookbehind: true, alias: 'fasm-label' }, - 'keyword': [ - /\b(?:extern|global)\b[^;\r\n]*/i, - /\b(?:CPU|DEFAULT|FLOAT)\b.*/ - ], 'register': /\b(?:st\d|[xyz]mm\d\d?|[cdt]r\d|r\d\d?[bwd]?|[er]?[abcd]x|[abcd][hl]|[er]?(?:bp|di|si|sp)|[cdefgs]s|mm\d+)\b/i, 'number': /(?:\b|-|(?=\$))(?:0[hx](?:[\da-f]*\.)?[\da-f]+(?:p[+-]?\d+)?|\d[\da-f]+[hx]|\$\d[\da-f]*|0[oq][0-7]+|[0-7]+[oq]|0[by][01]+|[01]+[by]|0[dt]\d+|(?:\d+(?:\.\d+)?|\.\d+)(?:\.?e[+-]?\d+)?[dt]?)\b/i, 'operator': /[\[\]*+\-/%<>=&|$!,.:]/ diff --git a/components/prism-purebasic.min.js b/components/prism-purebasic.min.js index 18963ea987..e40cc6a1b8 100644 --- a/components/prism-purebasic.min.js +++ b/components/prism-purebasic.min.js @@ -1 +1 @@ -Prism.languages.purebasic=Prism.languages.extend("clike",{comment:/;.*/,keyword:/\b(?:align|and|as|break|calldebugger|case|compilercase|compilerdefault|compilerelse|compilerelseif|compilerendif|compilerendselect|compilererror|compilerif|compilerselect|continue|data|datasection|debug|debuglevel|declare|declarec|declarecdll|declaredll|declaremodule|default|define|dim|disableasm|disabledebugger|disableexplicit|else|elseif|enableasm|enabledebugger|enableexplicit|end|enddatasection|enddeclaremodule|endenumeration|endif|endimport|endinterface|endmacro|endmodule|endprocedure|endselect|endstructure|endstructureunion|endwith|enumeration|extends|fakereturn|for|foreach|global|gosub|goto|if|import|importc|includebinary|includefile|includepath|interface|macro|module|newlist|newmap|next|not|or|procedure|procedurec|procedurecdll|proceduredll|procedurereturn|protected|prototype|prototypec|read|redim|repeat|restore|return|runtime|select|shared|static|step|structure|structureunion|swap|threaded|to|until|wend|while|with|xincludefile|xor)\b/i,function:/\b\w+(?:\.\w+)?\s*(?=\()/,number:/(?:\$[\da-f]+|\b-?(?:\d+(?:\.\d+)?|\.\d+)(?:e[+-]?\d+)?)\b/i,operator:/(?:@\*?|\?|\*)\w+|-[>-]?|\+\+?|!=?|<>?=?|==?|&&?|\|?\||[~^%?*/@]/}),Prism.languages.insertBefore("purebasic","keyword",{tag:/#\w+/,asm:{pattern:/(^[\t ]*)!.*/m,lookbehind:!0,alias:"tag",inside:{comment:/;.*/,string:{pattern:/(["'`])(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0},"label-reference-anonymous":{pattern:/(!\s*j[a-z]+\s+)@[fb]/i,lookbehind:!0,alias:"fasm-label"},"label-reference-addressed":{pattern:/(!\s*j[a-z]+\s+)[A-Z._?$@][\w.?$@~#]*/i,lookbehind:!0,alias:"fasm-label"},function:{pattern:/^([\t ]*!\s*)[\da-z]+(?=\s|$)/im,lookbehind:!0},"function-inline":{pattern:/(:\s*)[\da-z]+(?=\s)/i,lookbehind:!0,alias:"function"},label:{pattern:/^([\t ]*!\s*)[A-Za-z._?$@][\w.?$@~#]*(?=:)/m,lookbehind:!0,alias:"fasm-label"},keyword:[/\b(?:extern|global)\b[^;\r\n]*/i,/\b(?:CPU|DEFAULT|FLOAT)\b.*/],register:/\b(?:st\d|[xyz]mm\d\d?|[cdt]r\d|r\d\d?[bwd]?|[er]?[abcd]x|[abcd][hl]|[er]?(?:bp|di|si|sp)|[cdefgs]s|mm\d+)\b/i,number:/(?:\b|-|(?=\$))(?:0[hx](?:[\da-f]*\.)?[\da-f]+(?:p[+-]?\d+)?|\d[\da-f]+[hx]|\$\d[\da-f]*|0[oq][0-7]+|[0-7]+[oq]|0[by][01]+|[01]+[by]|0[dt]\d+|(?:\d+(?:\.\d+)?|\.\d+)(?:\.?e[+-]?\d+)?[dt]?)\b/i,operator:/[\[\]*+\-/%<>=&|$!,.:]/}}}),delete Prism.languages.purebasic["class-name"],delete Prism.languages.purebasic.boolean,Prism.languages.pbfasm=Prism.languages.purebasic; \ No newline at end of file +Prism.languages.purebasic=Prism.languages.extend("clike",{comment:/;.*/,keyword:/\b(?:align|and|as|break|calldebugger|case|compilercase|compilerdefault|compilerelse|compilerelseif|compilerendif|compilerendselect|compilererror|compilerif|compilerselect|continue|data|datasection|debug|debuglevel|declare|declarec|declarecdll|declaredll|declaremodule|default|define|dim|disableasm|disabledebugger|disableexplicit|else|elseif|enableasm|enabledebugger|enableexplicit|end|enddatasection|enddeclaremodule|endenumeration|endif|endimport|endinterface|endmacro|endmodule|endprocedure|endselect|endstructure|endstructureunion|endwith|enumeration|extends|fakereturn|for|foreach|global|gosub|goto|if|import|importc|includebinary|includefile|includepath|interface|macro|module|newlist|newmap|next|not|or|procedure|procedurec|procedurecdll|proceduredll|procedurereturn|protected|prototype|prototypec|read|redim|repeat|restore|return|runtime|select|shared|static|step|structure|structureunion|swap|threaded|to|until|wend|while|with|xincludefile|xor)\b/i,function:/\b\w+(?:\.\w+)?\s*(?=\()/,number:/(?:\$[\da-f]+|\b-?(?:\d+(?:\.\d+)?|\.\d+)(?:e[+-]?\d+)?)\b/i,operator:/(?:@\*?|\?|\*)\w+|-[>-]?|\+\+?|!=?|<>?=?|==?|&&?|\|?\||[~^%?*/@]/}),Prism.languages.insertBefore("purebasic","keyword",{tag:/#\w+/,asm:{pattern:/(^[\t ]*)!.*/m,lookbehind:!0,alias:"tag",inside:{comment:/;.*/,string:{pattern:/(["'`])(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0},"label-reference-anonymous":{pattern:/(!\s*j[a-z]+\s+)@[fb]/i,lookbehind:!0,alias:"fasm-label"},"label-reference-addressed":{pattern:/(!\s*j[a-z]+\s+)[A-Z._?$@][\w.?$@~#]*/i,lookbehind:!0,alias:"fasm-label"},keyword:[/\b(?:extern|global)\b[^;\r\n]*/i,/\b(?:CPU|DEFAULT|FLOAT)\b.*/],function:{pattern:/^([\t ]*!\s*)[\da-z]+(?=\s|$)/im,lookbehind:!0},"function-inline":{pattern:/(:\s*)[\da-z]+(?=\s)/i,lookbehind:!0,alias:"function"},label:{pattern:/^([\t ]*!\s*)[A-Za-z._?$@][\w.?$@~#]*(?=:)/m,lookbehind:!0,alias:"fasm-label"},register:/\b(?:st\d|[xyz]mm\d\d?|[cdt]r\d|r\d\d?[bwd]?|[er]?[abcd]x|[abcd][hl]|[er]?(?:bp|di|si|sp)|[cdefgs]s|mm\d+)\b/i,number:/(?:\b|-|(?=\$))(?:0[hx](?:[\da-f]*\.)?[\da-f]+(?:p[+-]?\d+)?|\d[\da-f]+[hx]|\$\d[\da-f]*|0[oq][0-7]+|[0-7]+[oq]|0[by][01]+|[01]+[by]|0[dt]\d+|(?:\d+(?:\.\d+)?|\.\d+)(?:\.?e[+-]?\d+)?[dt]?)\b/i,operator:/[\[\]*+\-/%<>=&|$!,.:]/}}}),delete Prism.languages.purebasic["class-name"],delete Prism.languages.purebasic.boolean,Prism.languages.pbfasm=Prism.languages.purebasic; \ No newline at end of file diff --git a/tests/languages/purebasic/asm_feature.test b/tests/languages/purebasic/asm_feature.test new file mode 100644 index 0000000000..a2646f509a --- /dev/null +++ b/tests/languages/purebasic/asm_feature.test @@ -0,0 +1,375 @@ +Procedure.i XorTwoBlocks2(*buffer1, *buffer2, length) + ; move all the required data to source reg, destination reg and counter reg + !mov esi, [p.p_buffer1] ; read 32-bit integer from p.p_buffer1 and move to esi + !mov edi, [p.p_buffer2] ; read 32-bit integer from p.p_buffer2 and move to edi + !mov ecx, [p.v_length] ; read 32-bit integer from p.v_length and move to ecx + + !@@: ; anonymous label, can be reached by @b (back) or @f (forward) + !mov al, byte [edi + ecx - 1] ; read byte from destination + !xor byte [esi + ecx - 1], al ; xor source with destination (i.e. xor bytes from both blocks) + !dec ecx ; decrease counter + !jne @b ; jumb back to first anonymous label behind + ProcedureReturn 0 +EndProcedure + +!jne label1 +!jmp @b +!EXTERN printf +!DEFAULT rel + +; source: http://www.jose.it-berater.org/smfforum/index.php?topic=5091.0 +Procedure PopCount64(x.q) + !mov rax, [p.v_x] + !mov rdx, rax + !shr rdx, 1 + !and rdx, [popcount64_v55] + !sub rax, rdx + ;x = (x & $3333333333333333) + ((x >> 2) & $3333333333333333) + !mov rdx, rax ;x + !and rax, [popcount64_v33] + !shr rdx, 2 + !and rdx, [popcount64_v33] + !add rax, rdx + ;x = (x + (x >> 4)) & $0f0f0f0f0f0f0f0f0f0f + !mov rdx, rax + !shr rdx, 4 + !add rax, rdx + !and rax, [popcount64_v0f] + ;x * $0101010101010101 >> 56 + !imul rax, [popcount64_v01] + !shr rax, 56 + ProcedureReturn + !popcount64_v01: dq 0x0101010101010101 + !popcount64_v0f: dq 0x0f0f0f0f0f0f0f0f + !popcount64_v33: dq 0x3333333333333333 + !popcount64_v55: dq 0x5555555555555555 +EndProcedure + +---------------------------------------------------- + +[ + ["keyword", "Procedure"], + ["punctuation", "."], + "i ", + ["function", "XorTwoBlocks2"], + ["punctuation", "("], + ["operator", "*buffer1"], + ["punctuation", ","], + ["operator", "*buffer2"], + ["punctuation", ","], + " length", + ["punctuation", ")"], + + ["comment", "; move all the required data to source reg, destination reg and counter reg"], + + ["asm", [ + ["operator", "!"], + ["function", "mov"], + ["register", "esi"], + ["operator", ","], + ["operator", "["], + "p", + ["operator", "."], + "p_buffer1", + ["operator", "]"] + ]], + ["comment", "; read 32-bit integer from p.p_buffer1 and move to esi"], + + ["asm", [ + ["operator", "!"], + ["function", "mov"], + ["register", "edi"], + ["operator", ","], + ["operator", "["], + "p", + ["operator", "."], + "p_buffer2", + ["operator", "]"] + ]], + ["comment", "; read 32-bit integer from p.p_buffer2 and move to edi"], + + ["asm", [ + ["operator", "!"], + ["function", "mov"], + ["register", "ecx"], + ["operator", ","], + ["operator", "["], + "p", + ["operator", "."], + "v_length", + ["operator", "]"] + ]], + ["comment", "; read 32-bit integer from p.v_length and move to ecx"], + + ["asm", [ + ["operator", "!"], + ["label", "@@"], + ["operator", ":"] + ]], + ["comment", "; anonymous label, can be reached by @b (back) or @f (forward)"], + + ["asm", [ + ["operator", "!"], + ["function", "mov"], + ["register", "al"], + ["operator", ","], + " byte ", + ["operator", "["], + ["register", "edi"], + ["operator", "+"], + ["register", "ecx"], + ["operator", "-"], + ["number", "1"], + ["operator", "]"] + ]], + ["comment", "; read byte from destination"], + + ["asm", [ + ["operator", "!"], + ["function", "xor"], + " byte ", + ["operator", "["], + ["register", "esi"], + ["operator", "+"], + ["register", "ecx"], + ["operator", "-"], + ["number", "1"], + ["operator", "]"], + ["operator", ","], + ["register", "al"] + ]], + ["comment", "; xor source with destination (i.e. xor bytes from both blocks)"], + + ["asm", [ + ["operator", "!"], + ["function", "dec"], + ["register", "ecx"] + ]], + ["comment", "; decrease counter"], + + ["asm", [ + ["operator", "!"], + ["function", "jne"], + ["label-reference-anonymous", "@b"] + ]], + ["comment", "; jumb back to first anonymous label behind"], + + ["keyword", "ProcedureReturn"], + ["number", "0"], + + ["keyword", "EndProcedure"], + + ["asm", [ + ["operator", "!"], + ["function", "jne"], + ["label-reference-addressed", "label1"] + ]], + ["asm", [ + ["operator", "!"], + ["function", "jmp"], + ["label-reference-anonymous", "@b"] + ]], + ["asm", [ + ["operator", "!"], + ["keyword", "EXTERN printf"] + ]], + ["asm", [ + ["operator", "!"], + ["keyword", "DEFAULT rel"] + ]], + + ["comment", "; source: http://www.jose.it-berater.org/smfforum/index.php?topic=5091.0"], + + ["keyword", "Procedure"], + ["function", "PopCount64"], + ["punctuation", "("], + "x", + ["punctuation", "."], + "q", + ["punctuation", ")"], + + ["asm", [ + ["operator", "!"], + ["function", "mov"], + ["register", "rax"], + ["operator", ","], + ["operator", "["], + "p", + ["operator", "."], + "v_x", + ["operator", "]"] + ]], + + ["asm", [ + ["operator", "!"], + ["function", "mov"], + ["register", "rdx"], + ["operator", ","], + ["register", "rax"] + ]], + + ["asm", [ + ["operator", "!"], + ["function", "shr"], + ["register", "rdx"], + ["operator", ","], + ["number", "1"] + ]], + + ["asm", [ + ["operator", "!"], + ["function", "and"], + ["register", "rdx"], + ["operator", ","], + ["operator", "["], + "popcount64_v55", + ["operator", "]"] + ]], + + ["asm", [ + ["operator", "!"], + ["function", "sub"], + ["register", "rax"], + ["operator", ","], + ["register", "rdx"] + ]], + + ["comment", ";x = (x & $3333333333333333) + ((x >> 2) & $3333333333333333)"], + + ["asm", [ + ["operator", "!"], + ["function", "mov"], + ["register", "rdx"], + ["operator", ","], + ["register", "rax"] + ]], + ["comment", ";x"], + + ["asm", [ + ["operator", "!"], + ["function", "and"], + ["register", "rax"], + ["operator", ","], + ["operator", "["], + "popcount64_v33", + ["operator", "]"] + ]], + + ["asm", [ + ["operator", "!"], + ["function", "shr"], + ["register", "rdx"], + ["operator", ","], + ["number", "2"] + ]], + + ["asm", [ + ["operator", "!"], + ["function", "and"], + ["register", "rdx"], + ["operator", ","], + ["operator", "["], + "popcount64_v33", + ["operator", "]"] + ]], + + ["asm", [ + ["operator", "!"], + ["function", "add"], + ["register", "rax"], + ["operator", ","], + ["register", "rdx"] + ]], + + ["comment", ";x = (x + (x >> 4)) & $0f0f0f0f0f0f0f0f0f0f"], + + ["asm", [ + ["operator", "!"], + ["function", "mov"], + ["register", "rdx"], + ["operator", ","], + ["register", "rax"] + ]], + + ["asm", [ + ["operator", "!"], + ["function", "shr"], + ["register", "rdx"], + ["operator", ","], + ["number", "4"] + ]], + + ["asm", [ + ["operator", "!"], + ["function", "add"], + ["register", "rax"], + ["operator", ","], + ["register", "rdx"] + ]], + + ["asm", [ + ["operator", "!"], + ["function", "and"], + ["register", "rax"], + ["operator", ","], + ["operator", "["], + "popcount64_v0f", + ["operator", "]"] + ]], + + ["comment", ";x * $0101010101010101 >> 56"], + + ["asm", [ + ["operator", "!"], + ["function", "imul"], + ["register", "rax"], + ["operator", ","], + ["operator", "["], + "popcount64_v01", + ["operator", "]"] + ]], + + ["asm", [ + ["operator", "!"], + ["function", "shr"], + ["register", "rax"], + ["operator", ","], + ["number", "56"] + ]], + + ["keyword", "ProcedureReturn"], + + ["asm", [ + ["operator", "!"], + ["label", "popcount64_v01"], + ["operator", ":"], + ["function-inline", "dq"], + ["number", "0x0101010101010101"] + ]], + + ["asm", [ + ["operator", "!"], + ["label", "popcount64_v0f"], + ["operator", ":"], + ["function-inline", "dq"], + ["number", "0x0f0f0f0f0f0f0f0f"] + ]], + + ["asm", [ + ["operator", "!"], + ["label", "popcount64_v33"], + ["operator", ":"], + ["function-inline", "dq"], + ["number", "0x3333333333333333"] + ]], + + ["asm", [ + ["operator", "!"], + ["label", "popcount64_v55"], + ["operator", ":"], + ["function-inline", "dq"], + ["number", "0x5555555555555555"] + ]], + + ["keyword", "EndProcedure"] +] From ede55b2cef3e5bbeef495d675b3dc33756aa5e2d Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Tue, 5 Oct 2021 21:26:05 +0200 Subject: [PATCH 0946/1100] Renpy: Improved language + added tests (#3125) --- components/prism-renpy.js | 6 +- components/prism-renpy.min.js | 2 +- tests/languages/renpy/boolean_feature.test | 9 + tests/languages/renpy/comment_feature.test | 7 + tests/languages/renpy/function_feature.test | 43 ++ tests/languages/renpy/keyword_feature.test | 239 ++++++++++ tests/languages/renpy/property_feature.test | 469 ++++++++++++++++++++ tests/languages/renpy/string_feature.test | 29 ++ tests/languages/renpy/tag_feature.test | 75 ++++ 9 files changed, 874 insertions(+), 5 deletions(-) create mode 100644 tests/languages/renpy/boolean_feature.test create mode 100644 tests/languages/renpy/comment_feature.test create mode 100644 tests/languages/renpy/function_feature.test create mode 100644 tests/languages/renpy/keyword_feature.test create mode 100644 tests/languages/renpy/property_feature.test create mode 100644 tests/languages/renpy/string_feature.test create mode 100644 tests/languages/renpy/tag_feature.test diff --git a/components/prism-renpy.js b/components/prism-renpy.js index d543681bb2..dc0b02ecc0 100644 --- a/components/prism-renpy.js +++ b/components/prism-renpy.js @@ -1,13 +1,11 @@ Prism.languages.renpy = { - // TODO Write tests. - 'comment': { pattern: /(^|[^\\])#.+/, lookbehind: true }, 'string': { - pattern: /("""|''')[\s\S]+?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2|(?:^#?(?:(?:[0-9a-fA-F]){3}|[0-9a-fA-F]{6})$)/m, + pattern: /("""|''')[\s\S]+?\1|("|')(?:\\.|(?!\2)[^\\])*\2|(?:^#?(?:(?:[0-9a-fA-F]){3}|[0-9a-fA-F]{6})$)/m, greedy: true }, @@ -17,7 +15,7 @@ Prism.languages.renpy = { 'tag': /\b(?:bar|block|button|buttoscreenn|drag|draggroup|fixed|frame|grid|[hv]box|hotbar|hotspot|image|imagebutton|imagemap|input|key|label|menu|mm_menu_frame|mousearea|nvl|parallel|screen|self|side|tag|text|textbutton|timer|vbar|viewport|window)\b|\$/, - 'keyword': /\b(?:None|add|adjustment|alignaround|allow|angle|animation|around|as|assert|behind|box_layout|break|build|cache|call|center|changed|child_size|choice|circles|class|clear|clicked|clipping|clockwise|config|contains|continue|corner1|corner2|counterclockwise|def|default|define|del|delay|disabled|disabled_text|dissolve|elif|else|event|except|exclude|exec|expression|fade|finally|for|from|function|global|gm_root|has|hide|id|if|import|in|init|is|jump|knot|lambda|left|less_rounded|mm_root|movie|music|null|on|onlayer|pass|pause|persistent|play|print|python|queue|raise|random|renpy|repeat|return|right|rounded_window|scene|scope|set|show|slow|slow_abortable|slow_done|sound|stop|store|style|style_group|substitute|suffix|theme|transform|transform_anchor|transpose|try|ui|unhovered|updater|use|voice|while|widget|widget_hover|widget_selected|widget_text|window|yield)\b/, + 'keyword': /\b(?:None|add|adjustment|alignaround|allow|angle|animation|around|as|assert|behind|box_layout|break|build|cache|call|center|changed|child_size|choice|circles|class|clear|clicked|clipping|clockwise|config|contains|continue|corner1|corner2|counterclockwise|def|default|define|del|delay|disabled|disabled_text|dissolve|elif|else|event|except|exclude|exec|expression|fade|finally|for|from|function|global|gm_root|has|hide|id|if|import|in|init|is|jump|knot|lambda|left|less_rounded|mm_root|movie|music|null|on|onlayer|pass|pause|persistent|play|print|python|queue|raise|random|renpy|repeat|return|right|rounded_window|scene|scope|set|show|slow|slow_abortable|slow_done|sound|stop|store|style|style_group|substitute|suffix|theme|transform|transform_anchor|transpose|try|ui|unhovered|updater|use|voice|while|widget|widget_hover|widget_selected|widget_text|yield)\b/, 'boolean': /\b(?:[Ff]alse|[Tt]rue)\b/, diff --git a/components/prism-renpy.min.js b/components/prism-renpy.min.js index 160c29dcc9..06bd925671 100644 --- a/components/prism-renpy.min.js +++ b/components/prism-renpy.min.js @@ -1 +1 @@ -Prism.languages.renpy={comment:{pattern:/(^|[^\\])#.+/,lookbehind:!0},string:{pattern:/("""|''')[\s\S]+?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2|(?:^#?(?:(?:[0-9a-fA-F]){3}|[0-9a-fA-F]{6})$)/m,greedy:!0},function:/\b[a-z_]\w*(?=\()/i,property:/\b(?:Update|UpdateVersion|action|activate_sound|adv_nvl_transition|after_load_transition|align|alpha|alt|anchor|antialias|area|auto|background|bar_invert|bar_resizing|bar_vertical|black_color|bold|bottom_bar|bottom_gutter|bottom_margin|bottom_padding|box_reverse|box_wrap|can_update|caret|child|color|crop|default_afm_enable|default_afm_time|default_fullscreen|default_text_cps|developer|directory_name|drag_handle|drag_joined|drag_name|drag_raise|draggable|dragged|drop_shadow|drop_shadow_color|droppable|dropped|easein|easeout|edgescroll|end_game_transition|end_splash_transition|enter_replay_transition|enter_sound|enter_transition|enter_yesno_transition|executable_name|exit_replay_transition|exit_sound|exit_transition|exit_yesno_transition|fadein|fadeout|first_indent|first_spacing|fit_first|focus|focus_mask|font|foreground|game_main_transition|get_installed_packages|google_play_key|google_play_salt|ground|has_music|has_sound|has_voice|height|help|hinting|hover|hover_background|hover_color|hover_sound|hovered|hyperlink_functions|idle|idle_color|image_style|include_update|insensitive|insensitive_background|insensitive_color|inside|intra_transition|italic|justify|kerning|keyboard_focus|language|layer_clipping|layers|layout|left_bar|left_gutter|left_margin|left_padding|length|line_leading|line_overlap_split|line_spacing|linear|main_game_transition|main_menu_music|maximum|min_width|minimum|minwidth|modal|mouse|mousewheel|name|narrator_menu|newline_indent|nvl_adv_transition|offset|order_reverse|outlines|overlay_functions|pos|position|prefix|radius|range|rest_indent|right_bar|right_gutter|right_margin|right_padding|rotate|rotate_pad|ruby_style|sample_sound|save_directory|say_attribute_transition|screen_height|screen_width|scrollbars|selected_hover|selected_hover_color|selected_idle|selected_idle_color|selected_insensitive|show_side_image|show_two_window|side_spacing|side_xpos|side_ypos|size|size_group|slow_cps|slow_cps_multiplier|spacing|strikethrough|subpixel|text_align|text_style|text_xpos|text_y_fudge|text_ypos|thumb|thumb_offset|thumb_shadow|thumbnail_height|thumbnail_width|time|top_bar|top_gutter|top_margin|top_padding|translations|underline|unscrollable|update|value|version|version_name|version_tuple|vertical|width|window_hide_transition|window_icon|window_left_padding|window_show_transition|window_title|windows_icon|xadjustment|xalign|xanchor|xanchoraround|xaround|xcenter|xfill|xinitial|xmargin|xmaximum|xminimum|xoffset|xofsset|xpadding|xpos|xsize|xzoom|yadjustment|yalign|yanchor|yanchoraround|yaround|ycenter|yfill|yinitial|ymargin|ymaximum|yminimum|yoffset|ypadding|ypos|ysize|ysizexysize|yzoom|zoom|zorder)\b/,tag:/\b(?:bar|block|button|buttoscreenn|drag|draggroup|fixed|frame|grid|[hv]box|hotbar|hotspot|image|imagebutton|imagemap|input|key|label|menu|mm_menu_frame|mousearea|nvl|parallel|screen|self|side|tag|text|textbutton|timer|vbar|viewport|window)\b|\$/,keyword:/\b(?:None|add|adjustment|alignaround|allow|angle|animation|around|as|assert|behind|box_layout|break|build|cache|call|center|changed|child_size|choice|circles|class|clear|clicked|clipping|clockwise|config|contains|continue|corner1|corner2|counterclockwise|def|default|define|del|delay|disabled|disabled_text|dissolve|elif|else|event|except|exclude|exec|expression|fade|finally|for|from|function|global|gm_root|has|hide|id|if|import|in|init|is|jump|knot|lambda|left|less_rounded|mm_root|movie|music|null|on|onlayer|pass|pause|persistent|play|print|python|queue|raise|random|renpy|repeat|return|right|rounded_window|scene|scope|set|show|slow|slow_abortable|slow_done|sound|stop|store|style|style_group|substitute|suffix|theme|transform|transform_anchor|transpose|try|ui|unhovered|updater|use|voice|while|widget|widget_hover|widget_selected|widget_text|window|yield)\b/,boolean:/\b(?:[Ff]alse|[Tt]rue)\b/,number:/(?:\b(?:0[bo])?(?:(?:\d|0x[\da-f])[\da-f]*(?:\.\d*)?)|\B\.\d+)(?:e[+-]?\d+)?j?/i,operator:/[-+%=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]|\b(?:and|at|not|or|with)\b/,punctuation:/[{}[\];(),.:]/},Prism.languages.rpy=Prism.languages.renpy; \ No newline at end of file +Prism.languages.renpy={comment:{pattern:/(^|[^\\])#.+/,lookbehind:!0},string:{pattern:/("""|''')[\s\S]+?\1|("|')(?:\\.|(?!\2)[^\\])*\2|(?:^#?(?:(?:[0-9a-fA-F]){3}|[0-9a-fA-F]{6})$)/m,greedy:!0},function:/\b[a-z_]\w*(?=\()/i,property:/\b(?:Update|UpdateVersion|action|activate_sound|adv_nvl_transition|after_load_transition|align|alpha|alt|anchor|antialias|area|auto|background|bar_invert|bar_resizing|bar_vertical|black_color|bold|bottom_bar|bottom_gutter|bottom_margin|bottom_padding|box_reverse|box_wrap|can_update|caret|child|color|crop|default_afm_enable|default_afm_time|default_fullscreen|default_text_cps|developer|directory_name|drag_handle|drag_joined|drag_name|drag_raise|draggable|dragged|drop_shadow|drop_shadow_color|droppable|dropped|easein|easeout|edgescroll|end_game_transition|end_splash_transition|enter_replay_transition|enter_sound|enter_transition|enter_yesno_transition|executable_name|exit_replay_transition|exit_sound|exit_transition|exit_yesno_transition|fadein|fadeout|first_indent|first_spacing|fit_first|focus|focus_mask|font|foreground|game_main_transition|get_installed_packages|google_play_key|google_play_salt|ground|has_music|has_sound|has_voice|height|help|hinting|hover|hover_background|hover_color|hover_sound|hovered|hyperlink_functions|idle|idle_color|image_style|include_update|insensitive|insensitive_background|insensitive_color|inside|intra_transition|italic|justify|kerning|keyboard_focus|language|layer_clipping|layers|layout|left_bar|left_gutter|left_margin|left_padding|length|line_leading|line_overlap_split|line_spacing|linear|main_game_transition|main_menu_music|maximum|min_width|minimum|minwidth|modal|mouse|mousewheel|name|narrator_menu|newline_indent|nvl_adv_transition|offset|order_reverse|outlines|overlay_functions|pos|position|prefix|radius|range|rest_indent|right_bar|right_gutter|right_margin|right_padding|rotate|rotate_pad|ruby_style|sample_sound|save_directory|say_attribute_transition|screen_height|screen_width|scrollbars|selected_hover|selected_hover_color|selected_idle|selected_idle_color|selected_insensitive|show_side_image|show_two_window|side_spacing|side_xpos|side_ypos|size|size_group|slow_cps|slow_cps_multiplier|spacing|strikethrough|subpixel|text_align|text_style|text_xpos|text_y_fudge|text_ypos|thumb|thumb_offset|thumb_shadow|thumbnail_height|thumbnail_width|time|top_bar|top_gutter|top_margin|top_padding|translations|underline|unscrollable|update|value|version|version_name|version_tuple|vertical|width|window_hide_transition|window_icon|window_left_padding|window_show_transition|window_title|windows_icon|xadjustment|xalign|xanchor|xanchoraround|xaround|xcenter|xfill|xinitial|xmargin|xmaximum|xminimum|xoffset|xofsset|xpadding|xpos|xsize|xzoom|yadjustment|yalign|yanchor|yanchoraround|yaround|ycenter|yfill|yinitial|ymargin|ymaximum|yminimum|yoffset|ypadding|ypos|ysize|ysizexysize|yzoom|zoom|zorder)\b/,tag:/\b(?:bar|block|button|buttoscreenn|drag|draggroup|fixed|frame|grid|[hv]box|hotbar|hotspot|image|imagebutton|imagemap|input|key|label|menu|mm_menu_frame|mousearea|nvl|parallel|screen|self|side|tag|text|textbutton|timer|vbar|viewport|window)\b|\$/,keyword:/\b(?:None|add|adjustment|alignaround|allow|angle|animation|around|as|assert|behind|box_layout|break|build|cache|call|center|changed|child_size|choice|circles|class|clear|clicked|clipping|clockwise|config|contains|continue|corner1|corner2|counterclockwise|def|default|define|del|delay|disabled|disabled_text|dissolve|elif|else|event|except|exclude|exec|expression|fade|finally|for|from|function|global|gm_root|has|hide|id|if|import|in|init|is|jump|knot|lambda|left|less_rounded|mm_root|movie|music|null|on|onlayer|pass|pause|persistent|play|print|python|queue|raise|random|renpy|repeat|return|right|rounded_window|scene|scope|set|show|slow|slow_abortable|slow_done|sound|stop|store|style|style_group|substitute|suffix|theme|transform|transform_anchor|transpose|try|ui|unhovered|updater|use|voice|while|widget|widget_hover|widget_selected|widget_text|yield)\b/,boolean:/\b(?:[Ff]alse|[Tt]rue)\b/,number:/(?:\b(?:0[bo])?(?:(?:\d|0x[\da-f])[\da-f]*(?:\.\d*)?)|\B\.\d+)(?:e[+-]?\d+)?j?/i,operator:/[-+%=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]|\b(?:and|at|not|or|with)\b/,punctuation:/[{}[\];(),.:]/},Prism.languages.rpy=Prism.languages.renpy; \ No newline at end of file diff --git a/tests/languages/renpy/boolean_feature.test b/tests/languages/renpy/boolean_feature.test new file mode 100644 index 0000000000..30c2be15d9 --- /dev/null +++ b/tests/languages/renpy/boolean_feature.test @@ -0,0 +1,9 @@ +true false +True False + +---------------------------------------------------- + +[ + ["boolean", "true"], ["boolean", "false"], + ["boolean", "True"], ["boolean", "False"] +] diff --git a/tests/languages/renpy/comment_feature.test b/tests/languages/renpy/comment_feature.test new file mode 100644 index 0000000000..7883a734b3 --- /dev/null +++ b/tests/languages/renpy/comment_feature.test @@ -0,0 +1,7 @@ +# comment + +---------------------------------------------------- + +[ + ["comment", "# comment"] +] diff --git a/tests/languages/renpy/function_feature.test b/tests/languages/renpy/function_feature.test new file mode 100644 index 0000000000..3ec94de787 --- /dev/null +++ b/tests/languages/renpy/function_feature.test @@ -0,0 +1,43 @@ +renpy.register_bmfont("bmfont", 22, filename="bmfont.fnt") + +# Resize the background of the text window if it's too small. +init python: + style.window.background = Frame("frame.png", 10, 10) + +---------------------------------------------------- + +[ + ["keyword", "renpy"], + ["punctuation", "."], + ["function", "register_bmfont"], + ["punctuation", "("], + ["string", "\"bmfont\""], + ["punctuation", ","], + ["number", "22"], + ["punctuation", ","], + " filename", + ["operator", "="], + ["string", "\"bmfont.fnt\""], + ["punctuation", ")"], + + ["comment", "# Resize the background of the text window if it's too small."], + + ["keyword", "init"], + ["keyword", "python"], + ["punctuation", ":"], + + ["keyword", "style"], + ["punctuation", "."], + ["tag", "window"], + ["punctuation", "."], + ["property", "background"], + ["operator", "="], + ["function", "Frame"], + ["punctuation", "("], + ["string", "\"frame.png\""], + ["punctuation", ","], + ["number", "10"], + ["punctuation", ","], + ["number", "10"], + ["punctuation", ")"] +] diff --git a/tests/languages/renpy/keyword_feature.test b/tests/languages/renpy/keyword_feature.test new file mode 100644 index 0000000000..410cacf4ca --- /dev/null +++ b/tests/languages/renpy/keyword_feature.test @@ -0,0 +1,239 @@ +; None +; add +; adjustment +; alignaround +; allow +; angle +; animation +; around +; as +; assert +; behind +; box_layout +; break +; build +; cache +; call +; center +; changed +; child_size +; choice +; circles +; class +; clear +; clicked +; clipping +; clockwise +; config +; contains +; continue +; corner1 +; corner2 +; counterclockwise +; def +; default +; define +; del +; delay +; disabled +; disabled_text +; dissolve +; elif +; else +; event +; except +; exclude +; exec +; expression +; fade +; finally +; for +; from +; function +; global +; gm_root +; has +; hide +; id +; if +; import +; in +; init +; is +; jump +; knot +; lambda +; left +; less_rounded +; mm_root +; movie +; music +; null +; on +; onlayer +; pass +; pause +; persistent +; play +; print +; python +; queue +; raise +; random +; renpy +; repeat +; return +; right +; rounded_window +; scene +; scope +; set +; show +; slow +; slow_abortable +; slow_done +; sound +; stop +; store +; style +; style_group +; substitute +; suffix +; theme +; transform +; transform_anchor +; transpose +; try +; ui +; unhovered +; updater +; use +; voice +; while +; widget +; widget_hover +; widget_selected +; widget_text +; yield + +---------------------------------------------------- + +[ + ["punctuation", ";"], ["keyword", "None"], + ["punctuation", ";"], ["keyword", "add"], + ["punctuation", ";"], ["keyword", "adjustment"], + ["punctuation", ";"], ["keyword", "alignaround"], + ["punctuation", ";"], ["keyword", "allow"], + ["punctuation", ";"], ["keyword", "angle"], + ["punctuation", ";"], ["keyword", "animation"], + ["punctuation", ";"], ["keyword", "around"], + ["punctuation", ";"], ["keyword", "as"], + ["punctuation", ";"], ["keyword", "assert"], + ["punctuation", ";"], ["keyword", "behind"], + ["punctuation", ";"], ["keyword", "box_layout"], + ["punctuation", ";"], ["keyword", "break"], + ["punctuation", ";"], ["keyword", "build"], + ["punctuation", ";"], ["keyword", "cache"], + ["punctuation", ";"], ["keyword", "call"], + ["punctuation", ";"], ["keyword", "center"], + ["punctuation", ";"], ["keyword", "changed"], + ["punctuation", ";"], ["keyword", "child_size"], + ["punctuation", ";"], ["keyword", "choice"], + ["punctuation", ";"], ["keyword", "circles"], + ["punctuation", ";"], ["keyword", "class"], + ["punctuation", ";"], ["keyword", "clear"], + ["punctuation", ";"], ["keyword", "clicked"], + ["punctuation", ";"], ["keyword", "clipping"], + ["punctuation", ";"], ["keyword", "clockwise"], + ["punctuation", ";"], ["keyword", "config"], + ["punctuation", ";"], ["keyword", "contains"], + ["punctuation", ";"], ["keyword", "continue"], + ["punctuation", ";"], ["keyword", "corner1"], + ["punctuation", ";"], ["keyword", "corner2"], + ["punctuation", ";"], ["keyword", "counterclockwise"], + ["punctuation", ";"], ["keyword", "def"], + ["punctuation", ";"], ["keyword", "default"], + ["punctuation", ";"], ["keyword", "define"], + ["punctuation", ";"], ["keyword", "del"], + ["punctuation", ";"], ["keyword", "delay"], + ["punctuation", ";"], ["keyword", "disabled"], + ["punctuation", ";"], ["keyword", "disabled_text"], + ["punctuation", ";"], ["keyword", "dissolve"], + ["punctuation", ";"], ["keyword", "elif"], + ["punctuation", ";"], ["keyword", "else"], + ["punctuation", ";"], ["keyword", "event"], + ["punctuation", ";"], ["keyword", "except"], + ["punctuation", ";"], ["keyword", "exclude"], + ["punctuation", ";"], ["keyword", "exec"], + ["punctuation", ";"], ["keyword", "expression"], + ["punctuation", ";"], ["keyword", "fade"], + ["punctuation", ";"], ["keyword", "finally"], + ["punctuation", ";"], ["keyword", "for"], + ["punctuation", ";"], ["keyword", "from"], + ["punctuation", ";"], ["keyword", "function"], + ["punctuation", ";"], ["keyword", "global"], + ["punctuation", ";"], ["keyword", "gm_root"], + ["punctuation", ";"], ["keyword", "has"], + ["punctuation", ";"], ["keyword", "hide"], + ["punctuation", ";"], ["keyword", "id"], + ["punctuation", ";"], ["keyword", "if"], + ["punctuation", ";"], ["keyword", "import"], + ["punctuation", ";"], ["keyword", "in"], + ["punctuation", ";"], ["keyword", "init"], + ["punctuation", ";"], ["keyword", "is"], + ["punctuation", ";"], ["keyword", "jump"], + ["punctuation", ";"], ["keyword", "knot"], + ["punctuation", ";"], ["keyword", "lambda"], + ["punctuation", ";"], ["keyword", "left"], + ["punctuation", ";"], ["keyword", "less_rounded"], + ["punctuation", ";"], ["keyword", "mm_root"], + ["punctuation", ";"], ["keyword", "movie"], + ["punctuation", ";"], ["keyword", "music"], + ["punctuation", ";"], ["keyword", "null"], + ["punctuation", ";"], ["keyword", "on"], + ["punctuation", ";"], ["keyword", "onlayer"], + ["punctuation", ";"], ["keyword", "pass"], + ["punctuation", ";"], ["keyword", "pause"], + ["punctuation", ";"], ["keyword", "persistent"], + ["punctuation", ";"], ["keyword", "play"], + ["punctuation", ";"], ["keyword", "print"], + ["punctuation", ";"], ["keyword", "python"], + ["punctuation", ";"], ["keyword", "queue"], + ["punctuation", ";"], ["keyword", "raise"], + ["punctuation", ";"], ["keyword", "random"], + ["punctuation", ";"], ["keyword", "renpy"], + ["punctuation", ";"], ["keyword", "repeat"], + ["punctuation", ";"], ["keyword", "return"], + ["punctuation", ";"], ["keyword", "right"], + ["punctuation", ";"], ["keyword", "rounded_window"], + ["punctuation", ";"], ["keyword", "scene"], + ["punctuation", ";"], ["keyword", "scope"], + ["punctuation", ";"], ["keyword", "set"], + ["punctuation", ";"], ["keyword", "show"], + ["punctuation", ";"], ["keyword", "slow"], + ["punctuation", ";"], ["keyword", "slow_abortable"], + ["punctuation", ";"], ["keyword", "slow_done"], + ["punctuation", ";"], ["keyword", "sound"], + ["punctuation", ";"], ["keyword", "stop"], + ["punctuation", ";"], ["keyword", "store"], + ["punctuation", ";"], ["keyword", "style"], + ["punctuation", ";"], ["keyword", "style_group"], + ["punctuation", ";"], ["keyword", "substitute"], + ["punctuation", ";"], ["keyword", "suffix"], + ["punctuation", ";"], ["keyword", "theme"], + ["punctuation", ";"], ["keyword", "transform"], + ["punctuation", ";"], ["keyword", "transform_anchor"], + ["punctuation", ";"], ["keyword", "transpose"], + ["punctuation", ";"], ["keyword", "try"], + ["punctuation", ";"], ["keyword", "ui"], + ["punctuation", ";"], ["keyword", "unhovered"], + ["punctuation", ";"], ["keyword", "updater"], + ["punctuation", ";"], ["keyword", "use"], + ["punctuation", ";"], ["keyword", "voice"], + ["punctuation", ";"], ["keyword", "while"], + ["punctuation", ";"], ["keyword", "widget"], + ["punctuation", ";"], ["keyword", "widget_hover"], + ["punctuation", ";"], ["keyword", "widget_selected"], + ["punctuation", ";"], ["keyword", "widget_text"], + ["punctuation", ";"], ["keyword", "yield"] +] diff --git a/tests/languages/renpy/property_feature.test b/tests/languages/renpy/property_feature.test new file mode 100644 index 0000000000..0eab089fbd --- /dev/null +++ b/tests/languages/renpy/property_feature.test @@ -0,0 +1,469 @@ +insensitive +idle +hover +selected_idle +selected_hover +background +position +alt +xpos +ypos +pos +xanchor +yanchor +anchor +xalign +yalign +align +xcenter +ycenter +xofsset +yoffset +ymaximum +maximum +xmaximum +xminimum +yminimum +minimum +xsize +ysizexysize +xfill +yfill +area +antialias +black_color +bold +caret +color +first_indent +font +size +italic +justify +kerning +language +layout +line_leading +line_overlap_split +line_spacing +min_width +newline_indent +outlines +rest_indent +ruby_style +slow_cps +slow_cps_multiplier +strikethrough +text_align +underline +hyperlink_functions +vertical +hinting +foreground +left_margin +xmargin +top_margin +bottom_margin +ymargin +left_padding +right_padding +xpadding +top_padding +bottom_padding +ypadding +size_group +child +hover_sound +activate_sound +mouse +focus_mask +keyboard_focus +bar_vertical +bar_invert +bar_resizing +left_gutter +right_gutter +top_gutter +bottom_gutter +left_bar +right_bar +top_bar +bottom_bar +thumb +thumb_shadow +thumb_offset +unscrollable +spacing +first_spacing +box_reverse +box_wrap +order_reverse +fit_first +ysize +thumbnail_width +thumbnail_height +help +text_ypos +text_xpos +idle_color +hover_color +selected_idle_color +selected_hover_color +insensitive_color +alpha +insensitive_background +hover_background +zorder +value +width +xadjustment +xanchoraround +xaround +xinitial +xoffset +xzoom +yadjustment +yanchoraround +yaround +yinitial +yzoom +zoom +ground +height +text_style +text_y_fudge +selected_insensitive +has_sound +has_music +has_voice +focus +hovered +image_style +length +minwidth +mousewheel +offset +prefix +radius +range +right_margin +rotate +rotate_pad +developer +screen_width +screen_height +window_title +name +version +windows_icon +default_fullscreen +default_text_cps +default_afm_time +main_menu_music +sample_sound +enter_sound +exit_sound +save_directory +enter_transition +exit_transition +intra_transition +main_game_transition +game_main_transition +end_splash_transition +end_game_transition +after_load_transition +window_show_transition +window_hide_transition +adv_nvl_transition +nvl_adv_transition +enter_yesno_transition +exit_yesno_transition +enter_replay_transition +exit_replay_transition +say_attribute_transition +directory_name +executable_name +include_update +window_icon +modal +google_play_key +google_play_salt +drag_name +drag_handle +draggable +dragged +droppable +dropped +narrator_menu +action +default_afm_enable +version_name +version_tuple +inside +fadeout +fadein +layers +layer_clipping +linear +scrollbars +side_xpos +side_ypos +side_spacing +edgescroll +drag_joined +drag_raise +drop_shadow +drop_shadow_color +subpixel +easein +easeout +time +crop +auto +update +get_installed_packages +can_update +UpdateVersion +Update +overlay_functions +translations +window_left_padding +show_side_image +show_two_window + +---------------------------------------------------- + +[ + ["property", "insensitive"], + ["property", "idle"], + ["property", "hover"], + ["property", "selected_idle"], + ["property", "selected_hover"], + ["property", "background"], + ["property", "position"], + ["property", "alt"], + ["property", "xpos"], + ["property", "ypos"], + ["property", "pos"], + ["property", "xanchor"], + ["property", "yanchor"], + ["property", "anchor"], + ["property", "xalign"], + ["property", "yalign"], + ["property", "align"], + ["property", "xcenter"], + ["property", "ycenter"], + ["property", "xofsset"], + ["property", "yoffset"], + ["property", "ymaximum"], + ["property", "maximum"], + ["property", "xmaximum"], + ["property", "xminimum"], + ["property", "yminimum"], + ["property", "minimum"], + ["property", "xsize"], + ["property", "ysizexysize"], + ["property", "xfill"], + ["property", "yfill"], + ["property", "area"], + ["property", "antialias"], + ["property", "black_color"], + ["property", "bold"], + ["property", "caret"], + ["property", "color"], + ["property", "first_indent"], + ["property", "font"], + ["property", "size"], + ["property", "italic"], + ["property", "justify"], + ["property", "kerning"], + ["property", "language"], + ["property", "layout"], + ["property", "line_leading"], + ["property", "line_overlap_split"], + ["property", "line_spacing"], + ["property", "min_width"], + ["property", "newline_indent"], + ["property", "outlines"], + ["property", "rest_indent"], + ["property", "ruby_style"], + ["property", "slow_cps"], + ["property", "slow_cps_multiplier"], + ["property", "strikethrough"], + ["property", "text_align"], + ["property", "underline"], + ["property", "hyperlink_functions"], + ["property", "vertical"], + ["property", "hinting"], + ["property", "foreground"], + ["property", "left_margin"], + ["property", "xmargin"], + ["property", "top_margin"], + ["property", "bottom_margin"], + ["property", "ymargin"], + ["property", "left_padding"], + ["property", "right_padding"], + ["property", "xpadding"], + ["property", "top_padding"], + ["property", "bottom_padding"], + ["property", "ypadding"], + ["property", "size_group"], + ["property", "child"], + ["property", "hover_sound"], + ["property", "activate_sound"], + ["property", "mouse"], + ["property", "focus_mask"], + ["property", "keyboard_focus"], + ["property", "bar_vertical"], + ["property", "bar_invert"], + ["property", "bar_resizing"], + ["property", "left_gutter"], + ["property", "right_gutter"], + ["property", "top_gutter"], + ["property", "bottom_gutter"], + ["property", "left_bar"], + ["property", "right_bar"], + ["property", "top_bar"], + ["property", "bottom_bar"], + ["property", "thumb"], + ["property", "thumb_shadow"], + ["property", "thumb_offset"], + ["property", "unscrollable"], + ["property", "spacing"], + ["property", "first_spacing"], + ["property", "box_reverse"], + ["property", "box_wrap"], + ["property", "order_reverse"], + ["property", "fit_first"], + ["property", "ysize"], + ["property", "thumbnail_width"], + ["property", "thumbnail_height"], + ["property", "help"], + ["property", "text_ypos"], + ["property", "text_xpos"], + ["property", "idle_color"], + ["property", "hover_color"], + ["property", "selected_idle_color"], + ["property", "selected_hover_color"], + ["property", "insensitive_color"], + ["property", "alpha"], + ["property", "insensitive_background"], + ["property", "hover_background"], + ["property", "zorder"], + ["property", "value"], + ["property", "width"], + ["property", "xadjustment"], + ["property", "xanchoraround"], + ["property", "xaround"], + ["property", "xinitial"], + ["property", "xoffset"], + ["property", "xzoom"], + ["property", "yadjustment"], + ["property", "yanchoraround"], + ["property", "yaround"], + ["property", "yinitial"], + ["property", "yzoom"], + ["property", "zoom"], + ["property", "ground"], + ["property", "height"], + ["property", "text_style"], + ["property", "text_y_fudge"], + ["property", "selected_insensitive"], + ["property", "has_sound"], + ["property", "has_music"], + ["property", "has_voice"], + ["property", "focus"], + ["property", "hovered"], + ["property", "image_style"], + ["property", "length"], + ["property", "minwidth"], + ["property", "mousewheel"], + ["property", "offset"], + ["property", "prefix"], + ["property", "radius"], + ["property", "range"], + ["property", "right_margin"], + ["property", "rotate"], + ["property", "rotate_pad"], + ["property", "developer"], + ["property", "screen_width"], + ["property", "screen_height"], + ["property", "window_title"], + ["property", "name"], + ["property", "version"], + ["property", "windows_icon"], + ["property", "default_fullscreen"], + ["property", "default_text_cps"], + ["property", "default_afm_time"], + ["property", "main_menu_music"], + ["property", "sample_sound"], + ["property", "enter_sound"], + ["property", "exit_sound"], + ["property", "save_directory"], + ["property", "enter_transition"], + ["property", "exit_transition"], + ["property", "intra_transition"], + ["property", "main_game_transition"], + ["property", "game_main_transition"], + ["property", "end_splash_transition"], + ["property", "end_game_transition"], + ["property", "after_load_transition"], + ["property", "window_show_transition"], + ["property", "window_hide_transition"], + ["property", "adv_nvl_transition"], + ["property", "nvl_adv_transition"], + ["property", "enter_yesno_transition"], + ["property", "exit_yesno_transition"], + ["property", "enter_replay_transition"], + ["property", "exit_replay_transition"], + ["property", "say_attribute_transition"], + ["property", "directory_name"], + ["property", "executable_name"], + ["property", "include_update"], + ["property", "window_icon"], + ["property", "modal"], + ["property", "google_play_key"], + ["property", "google_play_salt"], + ["property", "drag_name"], + ["property", "drag_handle"], + ["property", "draggable"], + ["property", "dragged"], + ["property", "droppable"], + ["property", "dropped"], + ["property", "narrator_menu"], + ["property", "action"], + ["property", "default_afm_enable"], + ["property", "version_name"], + ["property", "version_tuple"], + ["property", "inside"], + ["property", "fadeout"], + ["property", "fadein"], + ["property", "layers"], + ["property", "layer_clipping"], + ["property", "linear"], + ["property", "scrollbars"], + ["property", "side_xpos"], + ["property", "side_ypos"], + ["property", "side_spacing"], + ["property", "edgescroll"], + ["property", "drag_joined"], + ["property", "drag_raise"], + ["property", "drop_shadow"], + ["property", "drop_shadow_color"], + ["property", "subpixel"], + ["property", "easein"], + ["property", "easeout"], + ["property", "time"], + ["property", "crop"], + ["property", "auto"], + ["property", "update"], + ["property", "get_installed_packages"], + ["property", "can_update"], + ["property", "UpdateVersion"], + ["property", "Update"], + ["property", "overlay_functions"], + ["property", "translations"], + ["property", "window_left_padding"], + ["property", "show_side_image"], + ["property", "show_two_window"] +] diff --git a/tests/languages/renpy/string_feature.test b/tests/languages/renpy/string_feature.test new file mode 100644 index 0000000000..426f944043 --- /dev/null +++ b/tests/languages/renpy/string_feature.test @@ -0,0 +1,29 @@ +"# This isn't a comment, since it's part of a string." + +"Since this line contains a string, it continues + even when the line ends." + +$ a = [ "Because of parenthesis, this line also", + "spans more than one line." ] + +'Strings can\'t contain their delimiter, unless you escape it.' + +---------------------------------------------------- + +[ + ["string", "\"# This isn't a comment, since it's part of a string.\""], + + ["string", "\"Since this line contains a string, it continues\r\n even when the line ends.\""], + + ["tag", "$"], + " a ", + ["operator", "="], + ["punctuation", "["], + ["string", "\"Because of parenthesis, this line also\""], + ["punctuation", ","], + + ["string", "\"spans more than one line.\""], + ["punctuation", "]"], + + ["string", "'Strings can\\'t contain their delimiter, unless you escape it.'"] +] diff --git a/tests/languages/renpy/tag_feature.test b/tests/languages/renpy/tag_feature.test new file mode 100644 index 0000000000..1bc9484d88 --- /dev/null +++ b/tests/languages/renpy/tag_feature.test @@ -0,0 +1,75 @@ +label +image +menu +hbox +vbox +frame +text +imagemap +imagebutton +bar +vbar +screen +textbutton +buttoscreenn +fixed +grid +input +key +mousearea +side +timer +viewport +window +hotspot +hotbar +self +button +drag +draggroup +tag +mm_menu_frame +nvl +block + +$ + +---------------------------------------------------- + +[ + ["tag", "label"], + ["tag", "image"], + ["tag", "menu"], + ["tag", "hbox"], + ["tag", "vbox"], + ["tag", "frame"], + ["tag", "text"], + ["tag", "imagemap"], + ["tag", "imagebutton"], + ["tag", "bar"], + ["tag", "vbar"], + ["tag", "screen"], + ["tag", "textbutton"], + ["tag", "buttoscreenn"], + ["tag", "fixed"], + ["tag", "grid"], + ["tag", "input"], + ["tag", "key"], + ["tag", "mousearea"], + ["tag", "side"], + ["tag", "timer"], + ["tag", "viewport"], + ["tag", "window"], + ["tag", "hotspot"], + ["tag", "hotbar"], + ["tag", "self"], + ["tag", "button"], + ["tag", "drag"], + ["tag", "draggroup"], + ["tag", "tag"], + ["tag", "mm_menu_frame"], + ["tag", "nvl"], + ["tag", "block"], + + ["tag", "$"] +] From cfb2e782a13517b217eb12567e94671a445c9759 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Tue, 5 Oct 2021 21:26:28 +0200 Subject: [PATCH 0947/1100] JavaStackTrace: Added missing lookbehinds (#3116) --- components/prism-javastacktrace.js | 17 ++++++++++------- components/prism-javastacktrace.min.js | 2 +- .../_java_stack_trace_inclusion.test | 6 +++--- .../_minecraft_javastacktrace_inclusion.test | 12 ++++++------ 4 files changed, 20 insertions(+), 17 deletions(-) diff --git a/components/prism-javastacktrace.js b/components/prism-javastacktrace.js index 1c09650999..fd4f223c50 100644 --- a/components/prism-javastacktrace.js +++ b/components/prism-javastacktrace.js @@ -9,10 +9,11 @@ Prism.languages.javastacktrace = { // Caused by: MidLevelException: LowLevelException // Suppressed: Resource$CloseFailException: Resource ID = 0 'summary': { - pattern: /^[\t ]*(?:(?:Caused by:|Suppressed:|Exception in thread "[^"]*")[\t ]+)?[\w$.]+(?::.*)?$/m, + pattern: /^([\t ]*)(?:(?:Caused by:|Suppressed:|Exception in thread "[^"]*")[\t ]+)?[\w$.]+(?::.*)?$/m, + lookbehind: true, inside: { 'keyword': { - pattern: /^(\s*)(?:(?:Caused by|Suppressed)(?=:)|Exception in thread)/m, + pattern: /^([\t ]*)(?:(?:Caused by|Suppressed)(?=:)|Exception in thread)/m, lookbehind: true }, @@ -26,7 +27,7 @@ Prism.languages.javastacktrace = { lookbehind: true, inside: { 'class-name': /[\w$]+(?=$|:)/, - 'namespace': /[a-z]\w*/, + 'namespace': /\b[a-z]\w*\b/, 'punctuation': /[.:]/ } }, @@ -61,7 +62,8 @@ Prism.languages.javastacktrace = { // https://github.com/matcdac/jdk/blob/2305df71d1b7710266ae0956d73927a225132c0f/src/java.base/share/classes/java/lang/module/ModuleDescriptor.java#L1108 // However, to keep this simple, a version will be matched by the pattern /@[\w$.+-]*/. 'stack-frame': { - pattern: /^[\t ]*at (?:[\w$./]|@[\w$.+-]*\/)+(?:)?\([^()]*\)/m, + pattern: /^([\t ]*)at (?:[\w$./]|@[\w$.+-]*\/)+(?:)?\([^()]*\)/m, + lookbehind: true, inside: { 'keyword': { pattern: /^(\s*)at(?= )/, @@ -77,7 +79,7 @@ Prism.languages.javastacktrace = { 'file': /^\w+\.\w+/, 'punctuation': /:/, 'line-number': { - pattern: /\d+/, + pattern: /\b\d+\b/, alias: 'number' } } @@ -116,7 +118,7 @@ Prism.languages.javastacktrace = { } }, 'namespace': { - pattern: /(?:[a-z]\w*\.)+/, + pattern: /(?:\b[a-z]\w*\.)+/, inside: { 'punctuation': /\./ } @@ -128,7 +130,8 @@ Prism.languages.javastacktrace = { // ... 32 more // ... 32 common frames omitted 'more': { - pattern: /^[\t ]*\.{3} \d+ [a-z]+(?: [a-z]+)*/m, + pattern: /^([\t ]*)\.{3} \d+ [a-z]+(?: [a-z]+)*/m, + lookbehind: true, inside: { 'punctuation': /\.{3}/, 'number': /\d+/, diff --git a/components/prism-javastacktrace.min.js b/components/prism-javastacktrace.min.js index a61d466448..8a40730df5 100644 --- a/components/prism-javastacktrace.min.js +++ b/components/prism-javastacktrace.min.js @@ -1 +1 @@ -Prism.languages.javastacktrace={summary:{pattern:/^[\t ]*(?:(?:Caused by:|Suppressed:|Exception in thread "[^"]*")[\t ]+)?[\w$.]+(?::.*)?$/m,inside:{keyword:{pattern:/^(\s*)(?:(?:Caused by|Suppressed)(?=:)|Exception in thread)/m,lookbehind:!0},string:{pattern:/^(\s*)"[^"]*"/,lookbehind:!0},exceptions:{pattern:/^(:?\s*)[\w$.]+(?=:|$)/,lookbehind:!0,inside:{"class-name":/[\w$]+(?=$|:)/,namespace:/[a-z]\w*/,punctuation:/[.:]/}},message:{pattern:/(:\s*)\S.*/,lookbehind:!0,alias:"string"},punctuation:/:/}},"stack-frame":{pattern:/^[\t ]*at (?:[\w$./]|@[\w$.+-]*\/)+(?:)?\([^()]*\)/m,inside:{keyword:{pattern:/^(\s*)at(?= )/,lookbehind:!0},source:[{pattern:/(\()\w+\.\w+:\d+(?=\))/,lookbehind:!0,inside:{file:/^\w+\.\w+/,punctuation:/:/,"line-number":{pattern:/\d+/,alias:"number"}}},{pattern:/(\()[^()]*(?=\))/,lookbehind:!0,inside:{keyword:/^(?:Native Method|Unknown Source)$/}}],"class-name":/[\w$]+(?=\.(?:|[\w$]+)\()/,function:/(?:|[\w$]+)(?=\()/,"class-loader":{pattern:/(\s)[a-z]\w*(?:\.[a-z]\w*)*(?=\/[\w@$.]*\/)/,lookbehind:!0,alias:"namespace",inside:{punctuation:/\./}},module:{pattern:/([\s/])[a-z]\w*(?:\.[a-z]\w*)*(?:@[\w$.+-]*)?(?=\/)/,lookbehind:!0,inside:{version:{pattern:/(@)[\s\S]+/,lookbehind:!0,alias:"number"},punctuation:/[@.]/}},namespace:{pattern:/(?:[a-z]\w*\.)+/,inside:{punctuation:/\./}},punctuation:/[()/.]/}},more:{pattern:/^[\t ]*\.{3} \d+ [a-z]+(?: [a-z]+)*/m,inside:{punctuation:/\.{3}/,number:/\d+/,keyword:/\b[a-z]+(?: [a-z]+)*\b/}}}; \ No newline at end of file +Prism.languages.javastacktrace={summary:{pattern:/^([\t ]*)(?:(?:Caused by:|Suppressed:|Exception in thread "[^"]*")[\t ]+)?[\w$.]+(?::.*)?$/m,lookbehind:!0,inside:{keyword:{pattern:/^([\t ]*)(?:(?:Caused by|Suppressed)(?=:)|Exception in thread)/m,lookbehind:!0},string:{pattern:/^(\s*)"[^"]*"/,lookbehind:!0},exceptions:{pattern:/^(:?\s*)[\w$.]+(?=:|$)/,lookbehind:!0,inside:{"class-name":/[\w$]+(?=$|:)/,namespace:/\b[a-z]\w*\b/,punctuation:/[.:]/}},message:{pattern:/(:\s*)\S.*/,lookbehind:!0,alias:"string"},punctuation:/:/}},"stack-frame":{pattern:/^([\t ]*)at (?:[\w$./]|@[\w$.+-]*\/)+(?:)?\([^()]*\)/m,lookbehind:!0,inside:{keyword:{pattern:/^(\s*)at(?= )/,lookbehind:!0},source:[{pattern:/(\()\w+\.\w+:\d+(?=\))/,lookbehind:!0,inside:{file:/^\w+\.\w+/,punctuation:/:/,"line-number":{pattern:/\b\d+\b/,alias:"number"}}},{pattern:/(\()[^()]*(?=\))/,lookbehind:!0,inside:{keyword:/^(?:Native Method|Unknown Source)$/}}],"class-name":/[\w$]+(?=\.(?:|[\w$]+)\()/,function:/(?:|[\w$]+)(?=\()/,"class-loader":{pattern:/(\s)[a-z]\w*(?:\.[a-z]\w*)*(?=\/[\w@$.]*\/)/,lookbehind:!0,alias:"namespace",inside:{punctuation:/\./}},module:{pattern:/([\s/])[a-z]\w*(?:\.[a-z]\w*)*(?:@[\w$.+-]*)?(?=\/)/,lookbehind:!0,inside:{version:{pattern:/(@)[\s\S]+/,lookbehind:!0,alias:"number"},punctuation:/[@.]/}},namespace:{pattern:/(?:\b[a-z]\w*\.)+/,inside:{punctuation:/\./}},punctuation:/[()/.]/}},more:{pattern:/^([\t ]*)\.{3} \d+ [a-z]+(?: [a-z]+)*/m,lookbehind:!0,inside:{punctuation:/\.{3}/,number:/\d+/,keyword:/\b[a-z]+(?: [a-z]+)*\b/}}}; \ No newline at end of file diff --git a/tests/languages/log!+javastacktrace/_java_stack_trace_inclusion.test b/tests/languages/log!+javastacktrace/_java_stack_trace_inclusion.test index 361c9efe98..db9acad878 100644 --- a/tests/languages/log!+javastacktrace/_java_stack_trace_inclusion.test +++ b/tests/languages/log!+javastacktrace/_java_stack_trace_inclusion.test @@ -77,7 +77,7 @@ Caused by: org.apache.maven.wagon.TransferFailedException: Failed to transfer fi ]], ["punctuation", ")"] ]], - " ~[na:1.8.0_171]\r\n", + " ~[na:1.8.0_171]\r\n\t", ["stack-frame", [ ["keyword", "at"], @@ -100,7 +100,7 @@ Caused by: org.apache.maven.wagon.TransferFailedException: Failed to transfer fi ]], ["punctuation", ")"] ]], - " ~[na:1.8.0_171]\r\n", + " ~[na:1.8.0_171]\r\n\t", ["stack-frame", [ ["keyword", "at"], @@ -123,7 +123,7 @@ Caused by: org.apache.maven.wagon.TransferFailedException: Failed to transfer fi ]], ["punctuation", ")"] ]], - " ~[na:1.8.0_171]\r\n", + " ~[na:1.8.0_171]\r\n\t", ["stack-frame", [ ["keyword", "at"], diff --git a/tests/languages/log!+javastacktrace/_minecraft_javastacktrace_inclusion.test b/tests/languages/log!+javastacktrace/_minecraft_javastacktrace_inclusion.test index 52d67c66cf..43f3ac30f7 100644 --- a/tests/languages/log!+javastacktrace/_minecraft_javastacktrace_inclusion.test +++ b/tests/languages/log!+javastacktrace/_minecraft_javastacktrace_inclusion.test @@ -259,7 +259,7 @@ net.minecraftforge.fml.common.MissingModsException: Mod thaumcraft (Thaumcraft) ]], ["punctuation", ")"] ]], - " ~[Loader.class:?]\r\n", + " ~[Loader.class:?]\r\n\t", ["stack-frame", [ ["keyword", "at"], @@ -284,7 +284,7 @@ net.minecraftforge.fml.common.MissingModsException: Mod thaumcraft (Thaumcraft) ]], ["punctuation", ")"] ]], - " ~[Loader.class:?]\r\n", + " ~[Loader.class:?]\r\n\t", ["stack-frame", [ ["keyword", "at"], @@ -309,7 +309,7 @@ net.minecraftforge.fml.common.MissingModsException: Mod thaumcraft (Thaumcraft) ]], ["punctuation", ")"] ]], - " ~[FMLServerHandler.class:?]\r\n", + " ~[FMLServerHandler.class:?]\r\n\t", ["stack-frame", [ ["keyword", "at"], @@ -334,7 +334,7 @@ net.minecraftforge.fml.common.MissingModsException: Mod thaumcraft (Thaumcraft) ]], ["punctuation", ")"] ]], - " ~[FMLCommonHandler.class:?]\r\n", + " ~[FMLCommonHandler.class:?]\r\n\t", ["stack-frame", [ ["keyword", "at"], @@ -359,7 +359,7 @@ net.minecraftforge.fml.common.MissingModsException: Mod thaumcraft (Thaumcraft) ]], ["punctuation", ")"] ]], - " ~[nz.class:?]\r\n", + " ~[nz.class:?]\r\n\t", ["stack-frame", [ ["keyword", "at"], @@ -382,7 +382,7 @@ net.minecraftforge.fml.common.MissingModsException: Mod thaumcraft (Thaumcraft) ]], ["punctuation", ")"] ]], - " [MinecraftServer.class:?]\r\n", + " [MinecraftServer.class:?]\r\n\t", ["stack-frame", [ ["keyword", "at"], From 23d9aec1c34a5e28f2230c555811ef311ec81181 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Tue, 5 Oct 2021 21:26:39 +0200 Subject: [PATCH 0948/1100] JS stack trace: Added missing boundary assertion (#3117) --- components/prism-jsstacktrace.js | 2 +- components/prism-jsstacktrace.min.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/components/prism-jsstacktrace.js b/components/prism-jsstacktrace.js index 118c9dcc94..690fe7b56d 100644 --- a/components/prism-jsstacktrace.js +++ b/components/prism-jsstacktrace.js @@ -20,7 +20,7 @@ Prism.languages.jsstacktrace = { }, 'function': { - pattern: /(at\s+(?:new\s+)?)(?!\s)[_$a-zA-Z\xA0-\uFFFF<][.$\w\xA0-\uFFFF<>]*/, + pattern: /(\bat\s+(?:new\s+)?)(?!\s)[_$a-zA-Z\xA0-\uFFFF<][.$\w\xA0-\uFFFF<>]*/, lookbehind: true, inside: { 'punctuation': /\./ diff --git a/components/prism-jsstacktrace.min.js b/components/prism-jsstacktrace.min.js index 12174e89be..328156a476 100644 --- a/components/prism-jsstacktrace.min.js +++ b/components/prism-jsstacktrace.min.js @@ -1 +1 @@ -Prism.languages.jsstacktrace={"error-message":{pattern:/^\S.*/m,alias:"string"},"stack-frame":{pattern:/(^[ \t]+)at[ \t].*/m,lookbehind:!0,inside:{"not-my-code":{pattern:/^at[ \t]+(?!\s)(?:node\.js||.*(?:node_modules|\(\)|\(|$|\(internal\/|\(node\.js)).*/m,alias:"comment"},filename:{pattern:/(\bat\s+(?!\s)|\()(?:[a-zA-Z]:)?[^():]+(?=:)/,lookbehind:!0,alias:"url"},function:{pattern:/(at\s+(?:new\s+)?)(?!\s)[_$a-zA-Z\xA0-\uFFFF<][.$\w\xA0-\uFFFF<>]*/,lookbehind:!0,inside:{punctuation:/\./}},punctuation:/[()]/,keyword:/\b(?:at|new)\b/,alias:{pattern:/\[(?:as\s+)?(?!\s)[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*\]/,alias:"variable"},"line-number":{pattern:/:\d+(?::\d+)?\b/,alias:"number",inside:{punctuation:/:/}}}}}; \ No newline at end of file +Prism.languages.jsstacktrace={"error-message":{pattern:/^\S.*/m,alias:"string"},"stack-frame":{pattern:/(^[ \t]+)at[ \t].*/m,lookbehind:!0,inside:{"not-my-code":{pattern:/^at[ \t]+(?!\s)(?:node\.js||.*(?:node_modules|\(\)|\(|$|\(internal\/|\(node\.js)).*/m,alias:"comment"},filename:{pattern:/(\bat\s+(?!\s)|\()(?:[a-zA-Z]:)?[^():]+(?=:)/,lookbehind:!0,alias:"url"},function:{pattern:/(\bat\s+(?:new\s+)?)(?!\s)[_$a-zA-Z\xA0-\uFFFF<][.$\w\xA0-\uFFFF<>]*/,lookbehind:!0,inside:{punctuation:/\./}},punctuation:/[()]/,keyword:/\b(?:at|new)\b/,alias:{pattern:/\[(?:as\s+)?(?!\s)[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*\]/,alias:"variable"},"line-number":{pattern:/:\d+(?::\d+)?\b/,alias:"number",inside:{punctuation:/:/}}}}}; \ No newline at end of file From 599e30ee6de2068fa3393bb5b7859efdbe9f34a8 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Tue, 5 Oct 2021 21:27:25 +0200 Subject: [PATCH 0949/1100] URI: Fixed IPv4 regex (#3128) --- components/prism-uri.js | 2 +- components/prism-uri.min.js | 2 +- tests/languages/uri/authority_feature.test | 25 ++++++++++++++++++++-- tests/languages/uri/full.test | 6 ++++-- 4 files changed, 29 insertions(+), 6 deletions(-) diff --git a/components/prism-uri.js b/components/prism-uri.js index cdbf8dba3b..5831c7dd3b 100644 --- a/components/prism-uri.js +++ b/components/prism-uri.js @@ -80,7 +80,7 @@ Prism.languages.uri = { 'ipv6-address': /^[\s\S]+/ } }, - 'ipv4-address': /^(?:(?:[03-9]\d?|[12]\d{0,2})\.){3}(?:[03-9]\d?|[12]{0,2})$/ + 'ipv4-address': /^(?:(?:[03-9]\d?|[12]\d{0,2})\.){3}(?:[03-9]\d?|[12]\d{0,2})$/ } } } diff --git a/components/prism-uri.min.js b/components/prism-uri.min.js index aecc7c8ff0..c6479c0593 100644 --- a/components/prism-uri.min.js +++ b/components/prism-uri.min.js @@ -1 +1 @@ -Prism.languages.uri={scheme:{pattern:/^[a-z][a-z0-9+.-]*:/im,greedy:!0,inside:{"scheme-delimiter":/:$/}},fragment:{pattern:/#[\w\-.~!$&'()*+,;=%:@/?]*/,inside:{"fragment-delimiter":/^#/}},query:{pattern:/\?[\w\-.~!$&'()*+,;=%:@/?]*/,inside:{"query-delimiter":{pattern:/^\?/,greedy:!0},"pair-delimiter":/[&;]/,pair:{pattern:/^[^=][\s\S]*/,inside:{key:/^[^=]+/,value:{pattern:/(^=)[\s\S]+/,lookbehind:!0}}}}},authority:{pattern:RegExp("^//(?:[\\w\\-.~!$&'()*+,;=%:]*@)?(?:\\[(?:[0-9a-fA-F:.]{2,48}|v[0-9a-fA-F]+\\.[\\w\\-.~!$&'()*+,;=]+)\\]|[\\w\\-.~!$&'()*+,;=%]*)(?::\\d*)?","m"),inside:{"authority-delimiter":/^\/\//,"user-info-segment":{pattern:/^[\w\-.~!$&'()*+,;=%:]*@/,inside:{"user-info-delimiter":/@$/,"user-info":/^[\w\-.~!$&'()*+,;=%:]+/}},"port-segment":{pattern:/:\d*$/,inside:{"port-delimiter":/^:/,port:/^\d+/}},host:{pattern:/[\s\S]+/,inside:{"ip-literal":{pattern:/^\[[\s\S]+\]$/,inside:{"ip-literal-delimiter":/^\[|\]$/,"ipv-future":/^v[\s\S]+/,"ipv6-address":/^[\s\S]+/}},"ipv4-address":/^(?:(?:[03-9]\d?|[12]\d{0,2})\.){3}(?:[03-9]\d?|[12]{0,2})$/}}}},path:{pattern:/^[\w\-.~!$&'()*+,;=%:@/]+/m,inside:{"path-separator":/\//}}},Prism.languages.url=Prism.languages.uri; \ No newline at end of file +Prism.languages.uri={scheme:{pattern:/^[a-z][a-z0-9+.-]*:/im,greedy:!0,inside:{"scheme-delimiter":/:$/}},fragment:{pattern:/#[\w\-.~!$&'()*+,;=%:@/?]*/,inside:{"fragment-delimiter":/^#/}},query:{pattern:/\?[\w\-.~!$&'()*+,;=%:@/?]*/,inside:{"query-delimiter":{pattern:/^\?/,greedy:!0},"pair-delimiter":/[&;]/,pair:{pattern:/^[^=][\s\S]*/,inside:{key:/^[^=]+/,value:{pattern:/(^=)[\s\S]+/,lookbehind:!0}}}}},authority:{pattern:RegExp("^//(?:[\\w\\-.~!$&'()*+,;=%:]*@)?(?:\\[(?:[0-9a-fA-F:.]{2,48}|v[0-9a-fA-F]+\\.[\\w\\-.~!$&'()*+,;=]+)\\]|[\\w\\-.~!$&'()*+,;=%]*)(?::\\d*)?","m"),inside:{"authority-delimiter":/^\/\//,"user-info-segment":{pattern:/^[\w\-.~!$&'()*+,;=%:]*@/,inside:{"user-info-delimiter":/@$/,"user-info":/^[\w\-.~!$&'()*+,;=%:]+/}},"port-segment":{pattern:/:\d*$/,inside:{"port-delimiter":/^:/,port:/^\d+/}},host:{pattern:/[\s\S]+/,inside:{"ip-literal":{pattern:/^\[[\s\S]+\]$/,inside:{"ip-literal-delimiter":/^\[|\]$/,"ipv-future":/^v[\s\S]+/,"ipv6-address":/^[\s\S]+/}},"ipv4-address":/^(?:(?:[03-9]\d?|[12]\d{0,2})\.){3}(?:[03-9]\d?|[12]\d{0,2})$/}}}},path:{pattern:/^[\w\-.~!$&'()*+,;=%:@/]+/m,inside:{"path-separator":/\//}}},Prism.languages.url=Prism.languages.uri; \ No newline at end of file diff --git a/tests/languages/uri/authority_feature.test b/tests/languages/uri/authority_feature.test index 48679b14d8..0d37c29fee 100644 --- a/tests/languages/uri/authority_feature.test +++ b/tests/languages/uri/authority_feature.test @@ -1,6 +1,7 @@ https://john.doe@www.example.com:123/forum/questions ftp://ftp.is.co.za/rfc/rfc1808.txt ldap://[2001:db8::7]/ +https://[v1.foo]/ //192.0.2.16:80/ //example.com/path/resource.txt @@ -63,9 +64,29 @@ ldap://[2001:db8::7]/ ["path-separator", "/"] ]], + ["scheme", [ + "https", + ["scheme-delimiter", ":"] + ]], ["authority", [ ["authority-delimiter", "//"], - ["host", ["192.0.2.16"]], + ["host", [ + ["ip-literal", [ + ["ip-literal-delimiter", "["], + ["ipv-future", "v1.foo"], + ["ip-literal-delimiter", "]"] + ]] + ]] + ]], + ["path", [ + ["path-separator", "/"] + ]], + + ["authority", [ + ["authority-delimiter", "//"], + ["host", [ + ["ipv4-address", "192.0.2.16"] + ]], ["port-segment", [ ["port-delimiter", ":"], ["port", "80"] @@ -85,4 +106,4 @@ ldap://[2001:db8::7]/ ["path-separator", "/"], "resource.txt" ]] -] \ No newline at end of file +] diff --git a/tests/languages/uri/full.test b/tests/languages/uri/full.test index 277c039cc1..c4877b2aa3 100644 --- a/tests/languages/uri/full.test +++ b/tests/languages/uri/full.test @@ -93,7 +93,9 @@ https://example.com/path/resource.txt#fragment ]], ["authority", [ ["authority-delimiter", "//"], - ["host", ["192.0.2.16"]], + ["host", [ + ["ipv4-address", "192.0.2.16"] + ]], ["port-segment", [ ["port-delimiter", ":"], ["port", "80"] @@ -121,4 +123,4 @@ https://example.com/path/resource.txt#fragment ["fragment-delimiter", "#"], "fragment" ]] -] \ No newline at end of file +] From 09a0e2ba1bf44036ff86a8e3f87f4a1ddf1d93f5 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Tue, 5 Oct 2021 21:27:49 +0200 Subject: [PATCH 0950/1100] Zig: Fixed module comments and astral chars (#3129) --- components/prism-zig.js | 4 +- components/prism-zig.min.js | 2 +- tests/languages/zig/comment_feature.test | 21 +++ tests/languages/zig/string_feature.test | 160 +++++++++++++++++++++++ 4 files changed, 184 insertions(+), 3 deletions(-) create mode 100644 tests/languages/zig/comment_feature.test create mode 100644 tests/languages/zig/string_feature.test diff --git a/components/prism-zig.js b/components/prism-zig.js index 6517294f7c..e7bf61be88 100644 --- a/components/prism-zig.js +++ b/components/prism-zig.js @@ -32,7 +32,7 @@ Prism.languages.zig = { 'comment': [ { - pattern: /\/{3}.*/, + pattern: /\/\/[/!].*/, alias: 'doc-comment' }, /\/{2}.*/ @@ -52,7 +52,7 @@ }, { // characters 'a', '\n', '\xFF', '\u{10FFFF}' - pattern: /(^|[^\\])'(?:[^'\\\r\n]|\\(?:.|x[a-fA-F\d]{2}|u\{[a-fA-F\d]{1,6}\}))'/, + pattern: /(^|[^\\])'(?:[^'\\\r\n]|[\uD800-\uDFFF]{2}|\\(?:.|x[a-fA-F\d]{2}|u\{[a-fA-F\d]{1,6}\}))'/, lookbehind: true, greedy: true } diff --git a/components/prism-zig.min.js b/components/prism-zig.min.js index b03a228f8a..98cb6fea37 100644 --- a/components/prism-zig.min.js +++ b/components/prism-zig.min.js @@ -1 +1 @@ -!function(n){function e(e){return function(){return e}}var r=/\b(?:align|allowzero|and|asm|async|await|break|cancel|catch|comptime|const|continue|defer|else|enum|errdefer|error|export|extern|fn|for|if|inline|linksection|nakedcc|noalias|null|or|orelse|packed|promise|pub|resume|return|stdcallcc|struct|suspend|switch|test|threadlocal|try|undefined|union|unreachable|usingnamespace|var|volatile|while)\b/,a="\\b(?!"+r.source+")(?!\\d)\\w+\\b",o="align\\s*\\((?:[^()]|\\([^()]*\\))*\\)",s="(?!\\s)(?:!?\\s*(?:"+"(?:\\?|\\bpromise->|(?:\\[[^[\\]]*\\]|\\*(?!\\*)|\\*\\*)(?:\\s*|\\s*const\\b|\\s*volatile\\b|\\s*allowzero\\b)*)".replace(//g,e(o))+"\\s*)*"+"(?:\\bpromise\\b|(?:\\berror\\.)?(?:\\.)*(?!\\s+))".replace(//g,e(a))+")+";n.languages.zig={comment:[{pattern:/\/{3}.*/,alias:"doc-comment"},/\/{2}.*/],string:[{pattern:/(^|[^\\@])c?"(?:[^"\\\r\n]|\\.)*"/,lookbehind:!0,greedy:!0},{pattern:/([\r\n])([ \t]+c?\\{2}).*(?:(?:\r\n?|\n)\2.*)*/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\])'(?:[^'\\\r\n]|\\(?:.|x[a-fA-F\d]{2}|u\{[a-fA-F\d]{1,6}\}))'/,lookbehind:!0,greedy:!0}],builtin:/\B@(?!\d)\w+(?=\s*\()/,label:{pattern:/(\b(?:break|continue)\s*:\s*)\w+\b|\b(?!\d)\w+\b(?=\s*:\s*(?:\{|while\b))/,lookbehind:!0},"class-name":[/\b(?!\d)\w+(?=\s*=\s*(?:(?:extern|packed)\s+)?(?:enum|struct|union)\s*[({])/,{pattern:RegExp("(:\\s*)(?=\\s*(?:\\s*)?[=;,)])|(?=\\s*(?:\\s*)?\\{)".replace(//g,e(s)).replace(//g,e(o))),lookbehind:!0,inside:null},{pattern:RegExp("(\\)\\s*)(?=\\s*(?:\\s*)?;)".replace(//g,e(s)).replace(//g,e(o))),lookbehind:!0,inside:null}],"builtin-types":{pattern:/\b(?:anyerror|bool|c_u?(?:int|long|longlong|short)|c_longdouble|c_void|comptime_(?:float|int)|f(?:16|32|64|128)|[iu](?:8|16|32|64|128|size)|noreturn|type|void)\b/,alias:"keyword"},keyword:r,function:/\b(?!\d)\w+(?=\s*\()/,number:/\b(?:0b[01]+|0o[0-7]+|0x[a-fA-F\d]+(?:\.[a-fA-F\d]*)?(?:[pP][+-]?[a-fA-F\d]+)?|\d+(?:\.\d*)?(?:[eE][+-]?\d+)?)\b/,boolean:/\b(?:false|true)\b/,operator:/\.[*?]|\.{2,3}|[-=]>|\*\*|\+\+|\|\||(?:<<|>>|[-+*]%|[-+*/%^&|<>!=])=?|[?~]/,punctuation:/[.:,;(){}[\]]/},n.languages.zig["class-name"].forEach(function(e){null===e.inside&&(e.inside=n.languages.zig)})}(Prism); \ No newline at end of file +!function(n){function e(e){return function(){return e}}var r=/\b(?:align|allowzero|and|asm|async|await|break|cancel|catch|comptime|const|continue|defer|else|enum|errdefer|error|export|extern|fn|for|if|inline|linksection|nakedcc|noalias|null|or|orelse|packed|promise|pub|resume|return|stdcallcc|struct|suspend|switch|test|threadlocal|try|undefined|union|unreachable|usingnamespace|var|volatile|while)\b/,a="\\b(?!"+r.source+")(?!\\d)\\w+\\b",o="align\\s*\\((?:[^()]|\\([^()]*\\))*\\)",s="(?!\\s)(?:!?\\s*(?:"+"(?:\\?|\\bpromise->|(?:\\[[^[\\]]*\\]|\\*(?!\\*)|\\*\\*)(?:\\s*|\\s*const\\b|\\s*volatile\\b|\\s*allowzero\\b)*)".replace(//g,e(o))+"\\s*)*"+"(?:\\bpromise\\b|(?:\\berror\\.)?(?:\\.)*(?!\\s+))".replace(//g,e(a))+")+";n.languages.zig={comment:[{pattern:/\/\/[/!].*/,alias:"doc-comment"},/\/{2}.*/],string:[{pattern:/(^|[^\\@])c?"(?:[^"\\\r\n]|\\.)*"/,lookbehind:!0,greedy:!0},{pattern:/([\r\n])([ \t]+c?\\{2}).*(?:(?:\r\n?|\n)\2.*)*/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\])'(?:[^'\\\r\n]|[\uD800-\uDFFF]{2}|\\(?:.|x[a-fA-F\d]{2}|u\{[a-fA-F\d]{1,6}\}))'/,lookbehind:!0,greedy:!0}],builtin:/\B@(?!\d)\w+(?=\s*\()/,label:{pattern:/(\b(?:break|continue)\s*:\s*)\w+\b|\b(?!\d)\w+\b(?=\s*:\s*(?:\{|while\b))/,lookbehind:!0},"class-name":[/\b(?!\d)\w+(?=\s*=\s*(?:(?:extern|packed)\s+)?(?:enum|struct|union)\s*[({])/,{pattern:RegExp("(:\\s*)(?=\\s*(?:\\s*)?[=;,)])|(?=\\s*(?:\\s*)?\\{)".replace(//g,e(s)).replace(//g,e(o))),lookbehind:!0,inside:null},{pattern:RegExp("(\\)\\s*)(?=\\s*(?:\\s*)?;)".replace(//g,e(s)).replace(//g,e(o))),lookbehind:!0,inside:null}],"builtin-types":{pattern:/\b(?:anyerror|bool|c_u?(?:int|long|longlong|short)|c_longdouble|c_void|comptime_(?:float|int)|f(?:16|32|64|128)|[iu](?:8|16|32|64|128|size)|noreturn|type|void)\b/,alias:"keyword"},keyword:r,function:/\b(?!\d)\w+(?=\s*\()/,number:/\b(?:0b[01]+|0o[0-7]+|0x[a-fA-F\d]+(?:\.[a-fA-F\d]*)?(?:[pP][+-]?[a-fA-F\d]+)?|\d+(?:\.\d*)?(?:[eE][+-]?\d+)?)\b/,boolean:/\b(?:false|true)\b/,operator:/\.[*?]|\.{2,3}|[-=]>|\*\*|\+\+|\|\||(?:<<|>>|[-+*]%|[-+*/%^&|<>!=])=?|[?~]/,punctuation:/[.:,;(){}[\]]/},n.languages.zig["class-name"].forEach(function(e){null===e.inside&&(e.inside=n.languages.zig)})}(Prism); \ No newline at end of file diff --git a/tests/languages/zig/comment_feature.test b/tests/languages/zig/comment_feature.test new file mode 100644 index 0000000000..0bbe6b193b --- /dev/null +++ b/tests/languages/zig/comment_feature.test @@ -0,0 +1,21 @@ +// normal comment + +/// A structure for storing a timestamp, with nanosecond precision (this is a +/// multiline doc comment). + +//! This module provides functions for retrieving the current date and +//! time with varying degrees of precision and accuracy. It does not +//! depend on libc, but will use functions from it if available. + +---------------------------------------------------- + +[ + ["comment", "// normal comment"], + + ["comment", "/// A structure for storing a timestamp, with nanosecond precision (this is a"], + ["comment", "/// multiline doc comment)."], + + ["comment", "//! This module provides functions for retrieving the current date and"], + ["comment", "//! time with varying degrees of precision and accuracy. It does not"], + ["comment", "//! depend on libc, but will use functions from it if available."] +] diff --git a/tests/languages/zig/string_feature.test b/tests/languages/zig/string_feature.test new file mode 100644 index 0000000000..06b8ec952d --- /dev/null +++ b/tests/languages/zig/string_feature.test @@ -0,0 +1,160 @@ +// source: https://ziglang.org/documentation/master/#String-Literals-and-Character-Literals + +const expect = @import("std").testing.expect; +const mem = @import("std").mem; + +test "string literals" { + const bytes = "hello"; + expect(@TypeOf(bytes) == *const [5:0]u8); + expect(bytes.len == 5); + expect(bytes[1] == 'e'); + expect(bytes[5] == 0); + expect('e' == '\x65'); + expect('\u{1f4a9}' == 128169); + expect('💯' == 128175); + expect(mem.eql(u8, "hello", "h\x65llo")); +} + +const hello_world_in_c = + \\#include + \\ + \\int main(int argc, char **argv) { + \\ printf("hello world\n"); + \\ return 0; + \\} +; + +---------------------------------------------------- + +[ + ["comment", "// source: https://ziglang.org/documentation/master/#String-Literals-and-Character-Literals"], + + ["keyword", "const"], + " expect ", + ["operator", "="], + ["builtin", "@import"], + ["punctuation", "("], + ["string", "\"std\""], + ["punctuation", ")"], + ["punctuation", "."], + "testing", + ["punctuation", "."], + "expect", + ["punctuation", ";"], + + ["keyword", "const"], + " mem ", + ["operator", "="], + ["builtin", "@import"], + ["punctuation", "("], + ["string", "\"std\""], + ["punctuation", ")"], + ["punctuation", "."], + "mem", + ["punctuation", ";"], + + ["keyword", "test"], + ["string", "\"string literals\""], + ["punctuation", "{"], + + ["keyword", "const"], + " bytes ", + ["operator", "="], + ["string", "\"hello\""], + ["punctuation", ";"], + + ["function", "expect"], + ["punctuation", "("], + ["builtin", "@TypeOf"], + ["punctuation", "("], + "bytes", + ["punctuation", ")"], + ["operator", "=="], + ["operator", "*"], + ["keyword", "const"], + ["punctuation", "["], + ["number", "5"], + ["punctuation", ":"], + ["number", "0"], + ["punctuation", "]"], + ["builtin-types", "u8"], + ["punctuation", ")"], + ["punctuation", ";"], + + ["function", "expect"], + ["punctuation", "("], + "bytes", + ["punctuation", "."], + "len ", + ["operator", "=="], + ["number", "5"], + ["punctuation", ")"], + ["punctuation", ";"], + + ["function", "expect"], + ["punctuation", "("], + "bytes", + ["punctuation", "["], + ["number", "1"], + ["punctuation", "]"], + ["operator", "=="], + ["string", "'e'"], + ["punctuation", ")"], + ["punctuation", ";"], + + ["function", "expect"], + ["punctuation", "("], + "bytes", + ["punctuation", "["], + ["number", "5"], + ["punctuation", "]"], + ["operator", "=="], + ["number", "0"], + ["punctuation", ")"], + ["punctuation", ";"], + + ["function", "expect"], + ["punctuation", "("], + ["string", "'e'"], + ["operator", "=="], + ["string", "'\\x65'"], + ["punctuation", ")"], + ["punctuation", ";"], + + ["function", "expect"], + ["punctuation", "("], + ["string", "'\\u{1f4a9}'"], + ["operator", "=="], + ["number", "128169"], + ["punctuation", ")"], + ["punctuation", ";"], + + ["function", "expect"], + ["punctuation", "("], + ["string", "'💯'"], + ["operator", "=="], + ["number", "128175"], + ["punctuation", ")"], + ["punctuation", ";"], + + ["function", "expect"], + ["punctuation", "("], + "mem", + ["punctuation", "."], + ["function", "eql"], + ["punctuation", "("], + ["builtin-types", "u8"], + ["punctuation", ","], + ["string", "\"hello\""], + ["punctuation", ","], + ["string", "\"h\\x65llo\""], + ["punctuation", ")"], + ["punctuation", ")"], + ["punctuation", ";"], + + ["punctuation", "}"], + + ["keyword", "const"], " hello_world_in_c ", ["operator", "="], + ["string", " \\\\#include \r\n \\\\\r\n \\\\int main(int argc, char **argv) {\r\n \\\\ printf(\"hello world\\n\");\r\n \\\\ return 0;\r\n \\\\}"], + ["punctuation", ";"] +] From 4dde2e20e68b8d91a1cfb01020954e473522696c Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Tue, 5 Oct 2021 21:30:45 +0200 Subject: [PATCH 0951/1100] Regex: Fixed char-class/char-set confusion (#3124) --- components/prism-regex.js | 14 +++--- components/prism-regex.min.js | 2 +- .../javascript!+regex/regex_inclusion.test | 8 ++-- tests/languages/regex/char-class_feature.test | 48 +++++++++++++++++++ tests/languages/regex/char-set_feature.test | 21 ++++++++ tests/languages/regex/charclass_feature.test | 25 ---------- tests/languages/regex/charset_feature.test | 44 ----------------- tests/languages/regex/range_feature.test | 22 ++++----- 8 files changed, 91 insertions(+), 93 deletions(-) create mode 100644 tests/languages/regex/char-class_feature.test create mode 100644 tests/languages/regex/char-set_feature.test delete mode 100644 tests/languages/regex/charclass_feature.test delete mode 100644 tests/languages/regex/charset_feature.test diff --git a/components/prism-regex.js b/components/prism-regex.js index 6a1020d3e4..a565e23407 100644 --- a/components/prism-regex.js +++ b/components/prism-regex.js @@ -5,11 +5,11 @@ alias: 'escape' }; var escape = /\\(?:x[\da-fA-F]{2}|u[\da-fA-F]{4}|u\{[\da-fA-F]+\}|0[0-7]{0,2}|[123][0-7]{2}|c[a-zA-Z]|.)/; - var charClass = { + var charSet = { pattern: /\.|\\[wsd]|\\p\{[^{}]+\}/i, alias: 'class-name' }; - var charClassWithoutDot = { + var charSetWithoutDot = { pattern: /\\[wsd]|\\p\{[^{}]+\}/i, alias: 'class-name' }; @@ -25,16 +25,16 @@ }; Prism.languages.regex = { - 'charset': { + 'char-class': { pattern: /((?:^|[^\\])(?:\\\\)*)\[(?:[^\\\]]|\\[\s\S])*\]/, lookbehind: true, inside: { - 'charset-negation': { + 'char-class-negation': { pattern: /(^\[)\^/, lookbehind: true, alias: 'operator' }, - 'charset-punctuation': { + 'char-class-punctuation': { pattern: /^\[|\]$/, alias: 'punctuation' }, @@ -49,12 +49,12 @@ } }, 'special-escape': specialEscape, - 'charclass': charClassWithoutDot, + 'char-set': charSetWithoutDot, 'escape': escape } }, 'special-escape': specialEscape, - 'charclass': charClass, + 'char-set': charSet, 'backreference': [ { // a backreference which is not an octal escape diff --git a/components/prism-regex.min.js b/components/prism-regex.min.js index 044af823f8..f14e7f0a5f 100644 --- a/components/prism-regex.min.js +++ b/components/prism-regex.min.js @@ -1 +1 @@ -!function(a){var e={pattern:/\\[\\(){}[\]^$+*?|.]/,alias:"escape"},n=/\\(?:x[\da-fA-F]{2}|u[\da-fA-F]{4}|u\{[\da-fA-F]+\}|0[0-7]{0,2}|[123][0-7]{2}|c[a-zA-Z]|.)/,t="(?:[^\\\\-]|"+n.source+")",s=RegExp(t+"-"+t),i={pattern:/(<|')[^<>']+(?=[>']$)/,lookbehind:!0,alias:"variable"};a.languages.regex={charset:{pattern:/((?:^|[^\\])(?:\\\\)*)\[(?:[^\\\]]|\\[\s\S])*\]/,lookbehind:!0,inside:{"charset-negation":{pattern:/(^\[)\^/,lookbehind:!0,alias:"operator"},"charset-punctuation":{pattern:/^\[|\]$/,alias:"punctuation"},range:{pattern:s,inside:{escape:n,"range-punctuation":{pattern:/-/,alias:"operator"}}},"special-escape":e,charclass:{pattern:/\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},escape:n}},"special-escape":e,charclass:{pattern:/\.|\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},backreference:[{pattern:/\\(?![123][0-7]{2})[1-9]/,alias:"keyword"},{pattern:/\\k<[^<>']+>/,alias:"keyword",inside:{"group-name":i}}],anchor:{pattern:/[$^]|\\[ABbGZz]/,alias:"function"},escape:n,group:[{pattern:/\((?:\?(?:<[^<>']+>|'[^<>']+'|[>:]|']+(?=[>']$)/,lookbehind:!0,alias:"variable"};a.languages.regex={"char-class":{pattern:/((?:^|[^\\])(?:\\\\)*)\[(?:[^\\\]]|\\[\s\S])*\]/,lookbehind:!0,inside:{"char-class-negation":{pattern:/(^\[)\^/,lookbehind:!0,alias:"operator"},"char-class-punctuation":{pattern:/^\[|\]$/,alias:"punctuation"},range:{pattern:s,inside:{escape:n,"range-punctuation":{pattern:/-/,alias:"operator"}}},"special-escape":e,"char-set":{pattern:/\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},escape:n}},"special-escape":e,"char-set":{pattern:/\.|\\[wsd]|\\p\{[^{}]+\}/i,alias:"class-name"},backreference:[{pattern:/\\(?![123][0-7]{2})[1-9]/,alias:"keyword"},{pattern:/\\k<[^<>']+>/,alias:"keyword",inside:{"group-name":i}}],anchor:{pattern:/[$^]|\\[ABbGZz]/,alias:"function"},escape:n,group:[{pattern:/\((?:\?(?:<[^<>']+>|'[^<>']+'|[>:]| Date: Tue, 5 Oct 2021 21:31:02 +0200 Subject: [PATCH 0952/1100] Lisp: Improved `defun` (#3130) --- components/prism-lisp.js | 70 ++--- components/prism-lisp.min.js | 2 +- tests/languages/lisp/defun_feature.test | 290 +++++++++++++++++- tests/languages/lisp/punctuation_feature.test | 11 +- 4 files changed, 323 insertions(+), 50 deletions(-) diff --git a/components/prism-lisp.js b/components/prism-lisp.js index 8de9386221..e0e2392fde 100644 --- a/components/prism-lisp.js +++ b/components/prism-lisp.js @@ -1,20 +1,29 @@ (function (Prism) { - // Functions to construct regular expressions - // simple form - // e.g. (interactive ... or (interactive) + /** + * Functions to construct regular expressions + * e.g. (interactive ... or (interactive) + * + * @param {string} name + * @returns {RegExp} + */ function simple_form(name) { - return RegExp('(\\()' + name + '(?=[\\s\\)])'); + return RegExp(/(\()/.source + '(?:' + name + ')' + /(?=[\s\)])/.source); } - // booleans and numbers + /** + * booleans and numbers + * + * @param {string} pattern + * @returns {RegExp} + */ function primitive(pattern) { - return RegExp('([\\s([])' + pattern + '(?=[\\s)])'); + return RegExp(/([\s([])/.source + '(?:' + pattern + ')' + /(?=[\s)])/.source); } // Patterns in regular expressions // Symbol name. See https://www.gnu.org/software/emacs/manual/html_node/elisp/Symbol-Type.html // & and : are excluded as they are usually used for special purposes - var symbol = '[-+*/~!@$%^=<>{}\\w]+'; + var symbol = /(?!\d)[-+*/~!@$%^=<>{}\w]+/.source; // symbol starting with & used in function arguments var marker = '&' + symbol; // Open parenthesis for look-behind @@ -22,6 +31,7 @@ var endpar = '(?=\\))'; // End the pattern with look-ahead space var space = '(?=\\s)'; + var nestedPar = /(?:[^()]|\((?:[^()]|\((?:[^()]|\((?:[^()]|\((?:[^()]|\([^()]*\))*\))*\))*\))*\))*/.source; var language = { // Three or four semicolons are considered a heading. @@ -68,21 +78,21 @@ }, ], declare: { - pattern: simple_form('declare'), + pattern: simple_form(/declare/.source), lookbehind: true, alias: 'keyword' }, interactive: { - pattern: simple_form('interactive'), + pattern: simple_form(/interactive/.source), lookbehind: true, alias: 'keyword' }, boolean: { - pattern: primitive('(?:t|nil)'), + pattern: primitive(/nil|t/.source), lookbehind: true }, number: { - pattern: primitive('[-+]?\\d+(?:\\.\\d*)?'), + pattern: primitive(/[-+]?\d+(?:\.\d*)?/.source), lookbehind: true }, defvar: { @@ -94,13 +104,9 @@ } }, defun: { - pattern: RegExp( - par + - '(?:cl-)?(?:defmacro|defun\\*?)\\s+' + - symbol + - '\\s+\\([\\s\\S]*?\\)' - ), + pattern: RegExp(par + /(?:cl-)?(?:defmacro|defun\*?)\s+/.source + symbol + /\s+\(/.source + nestedPar + /\)/.source), lookbehind: true, + greedy: true, inside: { keyword: /^(?:cl-)?def\S+/, // See below, this property needs to be defined later so that it can @@ -116,6 +122,7 @@ lambda: { pattern: RegExp(par + 'lambda\\s+\\(\\s*(?:&?' + symbol + '(?:\\s+&?' + symbol + ')*\\s*)?\\)'), lookbehind: true, + greedy: true, inside: { keyword: /^lambda/, // See below, this property needs to be defined later so that it can @@ -141,29 +148,22 @@ var arg = { 'lisp-marker': RegExp(marker), - rest: { - argument: { - pattern: RegExp(symbol), - alias: 'variable' - }, - varform: { - pattern: RegExp(par + symbol + '\\s+\\S[\\s\\S]*' + endpar), - lookbehind: true, - inside: { - string: language.string, - boolean: language.boolean, - number: language.number, - symbol: language.symbol, - punctuation: /[()]/ - } - } - } + 'varform': { + pattern: RegExp(/\(/.source + symbol + /\s+(?=\S)/.source + nestedPar + /\)/.source), + inside: language + }, + 'argument': { + pattern: RegExp(/(^|[\s(])/.source + symbol), + lookbehind: true, + alias: 'variable' + }, + rest: language }; var forms = '\\S+(?:\\s+\\S+)*'; var arglist = { - pattern: RegExp(par + '[\\s\\S]*' + endpar), + pattern: RegExp(par + nestedPar + endpar), lookbehind: true, inside: { 'rest-vars': { diff --git a/components/prism-lisp.min.js b/components/prism-lisp.min.js index 1c638fa70e..4ee5290b13 100644 --- a/components/prism-lisp.min.js +++ b/components/prism-lisp.min.js @@ -1 +1 @@ -!function(e){function n(e){return RegExp("(\\()"+e+"(?=[\\s\\)])")}function a(e){return RegExp("([\\s([])"+e+"(?=[\\s)])")}var t="[-+*/~!@$%^=<>{}\\w]+",r="(\\()",s="(?=\\))",i="(?=\\s)",o={heading:{pattern:/;;;.*/,alias:["comment","title"]},comment:/;.*/,string:{pattern:/"(?:[^"\\]|\\.)*"/,greedy:!0,inside:{argument:/[-A-Z]+(?=[.,\s])/,symbol:RegExp("`"+t+"'")}},"quoted-symbol":{pattern:RegExp("#?'"+t),alias:["variable","symbol"]},"lisp-property":{pattern:RegExp(":"+t),alias:"property"},splice:{pattern:RegExp(",@?"+t),alias:["symbol","variable"]},keyword:[{pattern:RegExp(r+"(?:and|(?:cl-)?letf|cl-loop|cond|cons|error|if|(?:lexical-)?let\\*?|message|not|null|or|provide|require|setq|unless|use-package|when|while)"+i),lookbehind:!0},{pattern:RegExp(r+"(?:append|by|collect|concat|do|finally|for|in|return)"+i),lookbehind:!0}],declare:{pattern:n("declare"),lookbehind:!0,alias:"keyword"},interactive:{pattern:n("interactive"),lookbehind:!0,alias:"keyword"},boolean:{pattern:a("(?:t|nil)"),lookbehind:!0},number:{pattern:a("[-+]?\\d+(?:\\.\\d*)?"),lookbehind:!0},defvar:{pattern:RegExp(r+"def(?:const|custom|group|var)\\s+"+t),lookbehind:!0,inside:{keyword:/^def[a-z]+/,variable:RegExp(t)}},defun:{pattern:RegExp(r+"(?:cl-)?(?:defmacro|defun\\*?)\\s+"+t+"\\s+\\([\\s\\S]*?\\)"),lookbehind:!0,inside:{keyword:/^(?:cl-)?def\S+/,arguments:null,function:{pattern:RegExp("(^\\s)"+t),lookbehind:!0},punctuation:/[()]/}},lambda:{pattern:RegExp(r+"lambda\\s+\\(\\s*(?:&?"+t+"(?:\\s+&?"+t+")*\\s*)?\\)"),lookbehind:!0,inside:{keyword:/^lambda/,arguments:null,punctuation:/[()]/}},car:{pattern:RegExp(r+t),lookbehind:!0},punctuation:[/(?:['`,]?\(|[)\[\]])/,{pattern:/(\s)\.(?=\s)/,lookbehind:!0}]},l={"lisp-marker":RegExp("&[-+*/~!@$%^=<>{}\\w]+"),rest:{argument:{pattern:RegExp(t),alias:"variable"},varform:{pattern:RegExp(r+t+"\\s+\\S[\\s\\S]*"+s),lookbehind:!0,inside:{string:o.string,boolean:o.boolean,number:o.number,symbol:o.symbol,punctuation:/[()]/}}}},p="\\S+(?:\\s+\\S+)*",d={pattern:RegExp(r+"[\\s\\S]*"+s),lookbehind:!0,inside:{"rest-vars":{pattern:RegExp("&(?:body|rest)\\s+"+p),inside:l},"other-marker-vars":{pattern:RegExp("&(?:aux|optional)\\s+"+p),inside:l},keys:{pattern:RegExp("&key\\s+"+p+"(?:\\s+&allow-other-keys)?"),inside:l},argument:{pattern:RegExp(t),alias:"variable"},punctuation:/[()]/}};o.lambda.inside.arguments=d,o.defun.inside.arguments=e.util.clone(d),o.defun.inside.arguments.inside.sublist=d,e.languages.lisp=o,e.languages.elisp=o,e.languages.emacs=o,e.languages["emacs-lisp"]=o}(Prism); \ No newline at end of file +!function(e){function n(e){return RegExp("(\\()(?:"+e+")(?=[\\s\\)])")}function a(e){return RegExp("([\\s([])(?:"+e+")(?=[\\s)])")}var t="(?!\\d)[-+*/~!@$%^=<>{}\\w]+",r="(\\()",i="(?=\\s)",s="(?:[^()]|\\((?:[^()]|\\((?:[^()]|\\((?:[^()]|\\((?:[^()]|\\([^()]*\\))*\\))*\\))*\\))*\\))*",l={heading:{pattern:/;;;.*/,alias:["comment","title"]},comment:/;.*/,string:{pattern:/"(?:[^"\\]|\\.)*"/,greedy:!0,inside:{argument:/[-A-Z]+(?=[.,\s])/,symbol:RegExp("`"+t+"'")}},"quoted-symbol":{pattern:RegExp("#?'"+t),alias:["variable","symbol"]},"lisp-property":{pattern:RegExp(":"+t),alias:"property"},splice:{pattern:RegExp(",@?"+t),alias:["symbol","variable"]},keyword:[{pattern:RegExp(r+"(?:and|(?:cl-)?letf|cl-loop|cond|cons|error|if|(?:lexical-)?let\\*?|message|not|null|or|provide|require|setq|unless|use-package|when|while)"+i),lookbehind:!0},{pattern:RegExp(r+"(?:append|by|collect|concat|do|finally|for|in|return)"+i),lookbehind:!0}],declare:{pattern:n("declare"),lookbehind:!0,alias:"keyword"},interactive:{pattern:n("interactive"),lookbehind:!0,alias:"keyword"},boolean:{pattern:a("nil|t"),lookbehind:!0},number:{pattern:a("[-+]?\\d+(?:\\.\\d*)?"),lookbehind:!0},defvar:{pattern:RegExp(r+"def(?:const|custom|group|var)\\s+"+t),lookbehind:!0,inside:{keyword:/^def[a-z]+/,variable:RegExp(t)}},defun:{pattern:RegExp(r+"(?:cl-)?(?:defmacro|defun\\*?)\\s+"+t+"\\s+\\("+s+"\\)"),lookbehind:!0,greedy:!0,inside:{keyword:/^(?:cl-)?def\S+/,arguments:null,function:{pattern:RegExp("(^\\s)"+t),lookbehind:!0},punctuation:/[()]/}},lambda:{pattern:RegExp(r+"lambda\\s+\\(\\s*(?:&?"+t+"(?:\\s+&?"+t+")*\\s*)?\\)"),lookbehind:!0,greedy:!0,inside:{keyword:/^lambda/,arguments:null,punctuation:/[()]/}},car:{pattern:RegExp(r+t),lookbehind:!0},punctuation:[/(?:['`,]?\(|[)\[\]])/,{pattern:/(\s)\.(?=\s)/,lookbehind:!0}]},o={"lisp-marker":RegExp("&(?!\\d)[-+*/~!@$%^=<>{}\\w]+"),varform:{pattern:RegExp("\\("+t+"\\s+(?=\\S)"+s+"\\)"),inside:l},argument:{pattern:RegExp("(^|[\\s(])"+t),lookbehind:!0,alias:"variable"},rest:l},p="\\S+(?:\\s+\\S+)*",d={pattern:RegExp(r+s+"(?=\\))"),lookbehind:!0,inside:{"rest-vars":{pattern:RegExp("&(?:body|rest)\\s+"+p),inside:o},"other-marker-vars":{pattern:RegExp("&(?:aux|optional)\\s+"+p),inside:o},keys:{pattern:RegExp("&key\\s+"+p+"(?:\\s+&allow-other-keys)?"),inside:o},argument:{pattern:RegExp(t),alias:"variable"},punctuation:/[()]/}};l.lambda.inside.arguments=d,l.defun.inside.arguments=e.util.clone(d),l.defun.inside.arguments.inside.sublist=d,e.languages.lisp=l,e.languages.elisp=l,e.languages.emacs=l,e.languages["emacs-lisp"]=l}(Prism); \ No newline at end of file diff --git a/tests/languages/lisp/defun_feature.test b/tests/languages/lisp/defun_feature.test index b9c1f7fdc5..85fa71f2ab 100644 --- a/tests/languages/lisp/defun_feature.test +++ b/tests/languages/lisp/defun_feature.test @@ -1,27 +1,297 @@ (defun foo ()) (defun foo (bar)) + (defun foo (bar &body arg1) ) + (defun foo (bar &rest arg1) ) + (defun foo (bar &body arg1 arg2) ) + (defun foo (bar &key arg1) ) (defun foo (bar &key arg1 &allow-other-keys) ) + (defun foo (&optional arg1) ) + (defun defabc ()) +(defun show-members (a b &rest values) (write (list a b values))) +(cl-defun find-thing (thing &rest rest &key need &allow-other-keys) + (or (apply 'cl-member thing thing-list :allow-other-keys t rest) + (if need (error "Thing not found")))) + +(defun foo (a b &optional (c 3 c-supplied-p)) + (list a b c c-supplied-p)) + +(defun foo (&key ((:apple a)) ((:box b) 0) ((:charlie c) 0 c-supplied-p)) + (list a b c c-supplied-p)) + ---------------------------------------------------- [ - ["punctuation", "("], ["defun", [ ["keyword", "defun" ], ["function", "foo"], ["punctuation", "("], ["arguments", []], ["punctuation", ")"]]], ["punctuation", ")"], - ["punctuation", "("], ["defun", [ ["keyword", "defun" ], ["function", "foo"], ["punctuation", "("], ["arguments", [[ "argument", "bar" ]]], ["punctuation", ")"]]], ["punctuation", ")"], - ["punctuation", "("], ["defun", [ ["keyword", "defun" ], ["function", "foo"], ["punctuation", "("], ["arguments", [[ "argument", "bar" ], ["rest-vars", [["lisp-marker", "&body" ], ["argument", "arg1"]]]]], ["punctuation", ")"]] ], ["punctuation", ")"], - ["punctuation", "("], ["defun", [ ["keyword", "defun" ], ["function", "foo"], ["punctuation", "("], ["arguments", [[ "argument", "bar" ], ["rest-vars", [["lisp-marker", "&rest" ], ["argument", "arg1"]]]]], ["punctuation", ")"]] ], ["punctuation", ")"], - ["punctuation", "("], ["defun", [ ["keyword", "defun" ], ["function", "foo"], ["punctuation", "("], ["arguments", [[ "argument", "bar" ], ["rest-vars", [["lisp-marker", "&body" ], ["argument", "arg1"], ["argument", "arg2"]]]]], ["punctuation", ")"]] ], ["punctuation", ")"], - ["punctuation", "("], ["defun", [ ["keyword", "defun" ], ["function", "foo"], ["punctuation", "("], ["arguments", [[ "argument", "bar" ], ["keys", [["lisp-marker", "&key" ], ["argument", "arg1"]]]]], ["punctuation", ")"]] ], ["punctuation", ")"], - ["punctuation", "("], ["defun", [ ["keyword", "defun" ], ["function", "foo"], ["punctuation", "("], ["arguments", [[ "argument", "bar" ], ["keys", [["lisp-marker", "&key" ], ["argument", "arg1"], ["lisp-marker", "&allow-other-keys"]]]]], ["punctuation", ")"]] ], ["punctuation", ")"], - ["punctuation", "("], ["defun", [ ["keyword", "defun" ], ["function", "foo"], ["punctuation", "("], ["arguments", [["other-marker-vars", [["lisp-marker", "&optional" ], ["argument", "arg1"]]]]], ["punctuation", ")"]] ], ["punctuation", ")"], - ["punctuation", "("], ["defun", [ ["keyword", "defun" ], ["function", "defabc"], ["punctuation", "("], ["arguments", []], ["punctuation", ")"]]], ["punctuation", ")"] + ["punctuation", "("], + ["defun", [ + ["keyword", "defun"], + ["function", "foo"], + ["punctuation", "("], + ["arguments", [ + ]], + ["punctuation", ")"] + ]], + ["punctuation", ")"], + + ["punctuation", "("], + ["defun", [ + ["keyword", "defun"], + ["function", "foo"], + ["punctuation", "("], + ["arguments", [ + ["argument", "bar"] + ]], + ["punctuation", ")"] + ]], + ["punctuation", ")"], + + ["punctuation", "("], + ["defun", [ + ["keyword", "defun"], + ["function", "foo"], + ["punctuation", "("], + ["arguments", [ + ["argument", "bar"], + ["rest-vars", [ + ["lisp-marker", "&body"], + ["argument", "arg1"] + ]] + ]], + ["punctuation", ")"] + ]], + ["punctuation", ")"], + + ["punctuation", "("], + ["defun", [ + ["keyword", "defun"], + ["function", "foo"], + ["punctuation", "("], + ["arguments", [ + ["argument", "bar"], + ["rest-vars", [ + ["lisp-marker", "&rest"], + ["argument", "arg1"] + ]] + ]], + ["punctuation", ")"] + ]], + ["punctuation", ")"], + + ["punctuation", "("], + ["defun", [ + ["keyword", "defun"], + ["function", "foo"], + ["punctuation", "("], + ["arguments", [ + ["argument", "bar"], + ["rest-vars", [ + ["lisp-marker", "&body"], + ["argument", "arg1"], + ["argument", "arg2"] + ]] + ]], + ["punctuation", ")"] + ]], + ["punctuation", ")"], + + ["punctuation", "("], + ["defun", [ + ["keyword", "defun"], + ["function", "foo"], + ["punctuation", "("], + ["arguments", [ + ["argument", "bar"], + ["keys", [ + ["lisp-marker", "&key"], + ["argument", "arg1"] + ]] + ]], + ["punctuation", ")"] + ]], + ["punctuation", ")"], + + ["punctuation", "("], + ["defun", [ + ["keyword", "defun"], + ["function", "foo"], + ["punctuation", "("], + ["arguments", [ + ["argument", "bar"], + ["keys", [ + ["lisp-marker", "&key"], + ["argument", "arg1"], + ["lisp-marker", "&allow-other-keys"] + ]] + ]], + ["punctuation", ")"] + ]], + ["punctuation", ")"], + + ["punctuation", "("], + ["defun", [ + ["keyword", "defun"], + ["function", "foo"], + ["punctuation", "("], + ["arguments", [ + ["other-marker-vars", [ + ["lisp-marker", "&optional"], + ["argument", "arg1"] + ]] + ]], + ["punctuation", ")"] + ]], + ["punctuation", ")"], + + ["punctuation", "("], + ["defun", [ + ["keyword", "defun"], + ["function", "defabc"], + ["punctuation", "("], + ["arguments", [ + ]], + ["punctuation", ")"] + ]], + ["punctuation", ")"], + + ["punctuation", "("], + ["defun", [ + ["keyword", "defun"], + ["function", "show-members"], + ["punctuation", "("], + ["arguments", [ + ["argument", "a"], + ["argument", "b"], + ["rest-vars", [ + ["lisp-marker", "&rest"], + ["argument", "values"] + ]] + ]], + ["punctuation", ")"] + ]], + ["punctuation", "("], + ["car", "write"], + ["punctuation", "("], + ["car", "list"], + " a b values", + ["punctuation", ")"], + ["punctuation", ")"], + ["punctuation", ")"], + + ["punctuation", "("], + ["defun", [ + ["keyword", "cl-defun"], + ["function", "find-thing"], + ["punctuation", "("], + ["arguments", [ + ["argument", "thing"], + ["rest-vars", [ + ["lisp-marker", "&rest"], + ["argument", "rest"], + ["lisp-marker", "&key"], + ["argument", "need"], + ["lisp-marker", "&allow-other-keys"] + ]] + ]], + ["punctuation", ")"] + ]], + + ["punctuation", "("], + ["keyword", "or"], + ["punctuation", "("], + ["car", "apply"], + ["quoted-symbol", "'cl-member"], + " thing thing-list ", + ["lisp-property", ":allow-other-keys"], + ["boolean", "t"], + " rest", + ["punctuation", ")"], + + ["punctuation", "("], + ["keyword", "if"], + " need ", + ["punctuation", "("], + ["keyword", "error"], + ["string", ["\"Thing not found\""]], + ["punctuation", ")"], + ["punctuation", ")"], + ["punctuation", ")"], + ["punctuation", ")"], + + ["punctuation", "("], + ["defun", [ + ["keyword", "defun"], + ["function", "foo"], + ["punctuation", "("], + ["arguments", [ + ["argument", "a"], + ["argument", "b"], + ["other-marker-vars", [ + ["lisp-marker", "&optional"], + ["varform", [ + ["punctuation", "("], + ["car", "c"], + ["number", "3"], + " c-supplied-p", + ["punctuation", ")"] + ]] + ]] + ]], + ["punctuation", ")"] + ]], + + ["punctuation", "("], + ["car", "list"], + " a b c c-supplied-p", + ["punctuation", ")"], + ["punctuation", ")"], + + ["punctuation", "("], + ["defun", [ + ["keyword", "defun"], + ["function", "foo"], + ["punctuation", "("], + ["arguments", [ + ["keys", [ + ["lisp-marker", "&key"], + ["punctuation", "("], + ["punctuation", "("], + ["lisp-property", ":apple"], + ["argument", "a"], + ["punctuation", ")"], + ["punctuation", ")"], + ["punctuation", "("], + ["punctuation", "("], + ["lisp-property", ":box"], + ["argument", "b"], + ["punctuation", ")"], + ["number", "0"], + ["punctuation", ")"], + ["punctuation", "("], + ["punctuation", "("], + ["lisp-property", ":charlie"], + ["argument", "c"], + ["punctuation", ")"], + ["number", "0"], + ["argument", "c-supplied-p"], + ["punctuation", ")"] + ]] + ]], + ["punctuation", ")"] + ]], + + ["punctuation", "("], + ["car", "list"], + " a b c c-supplied-p", + ["punctuation", ")"], + ["punctuation", ")"] ] ---------------------------------------------------- -Checks for defun. \ No newline at end of file +Checks for defun. diff --git a/tests/languages/lisp/punctuation_feature.test b/tests/languages/lisp/punctuation_feature.test index 904ef79f48..d0dba5f017 100644 --- a/tests/languages/lisp/punctuation_feature.test +++ b/tests/languages/lisp/punctuation_feature.test @@ -1,16 +1,19 @@ () ( ) [] +. ( ---------------------------------------------------- [ - ["punctuation", "("], ["punctuation", ")"], - ["punctuation", "("], ["punctuation", ")"], - ["punctuation", "["], ["punctuation", "]"], + ["punctuation", "("], ["punctuation", ")"], + ["punctuation", "("], ["punctuation", ")"], + ["punctuation", "["], ["punctuation", "]"], + ["punctuation", "."], ["punctuation", "("] ] + ---------------------------------------------------- -Checks for punctuation. \ No newline at end of file +Checks for punctuation. From a394a14d0ec47d7d32b99cdee7c9a18989e14153 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Tue, 5 Oct 2021 22:13:13 +0200 Subject: [PATCH 0953/1100] Added more plugin tests (#1969) --- package-lock.json | 711 +++++++----------- package.json | 2 +- tests/helper/prism-dom-util.js | 58 ++ tests/helper/prism-loader.js | 98 ++- .../copy-to-clipboard/basic-functionality.js | 71 ++ .../custom-class/basic-functionality.js | 69 ++ .../highlight-keywords/basic-functionality.js | 20 + tests/plugins/keep-markup/test.js | 105 +-- .../show-invisibles/basic-functionality.js | 28 + .../show-language/basic-functionality.js | 36 + .../unescaped-markup/basic-functionality.js | 36 + 11 files changed, 723 insertions(+), 511 deletions(-) create mode 100644 tests/helper/prism-dom-util.js create mode 100644 tests/plugins/copy-to-clipboard/basic-functionality.js create mode 100644 tests/plugins/custom-class/basic-functionality.js create mode 100644 tests/plugins/highlight-keywords/basic-functionality.js create mode 100644 tests/plugins/show-invisibles/basic-functionality.js create mode 100644 tests/plugins/show-language/basic-functionality.js create mode 100644 tests/plugins/unescaped-markup/basic-functionality.js diff --git a/package-lock.json b/package-lock.json index 97d4410f94..6e085eef66 100644 --- a/package-lock.json +++ b/package-lock.json @@ -322,6 +322,12 @@ "@types/node": ">= 8" } }, + "@tootallnate/once": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-1.1.2.tgz", + "integrity": "sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw==", + "dev": true + }, "@types/events": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/@types/events/-/events-3.0.0.tgz", @@ -390,9 +396,9 @@ "dev": true }, "abab": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.0.tgz", - "integrity": "sha512-sY5AXXVZv4Y1VACTtR11UJCPHHudgY5i26Qj5TypE6DKlIApbwb5uqhXcJ5UUGbvZNRh7EeIoW+LrJumBsKp7w==", + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.5.tgz", + "integrity": "sha512-9IK9EadsbHo6jLWIpxpR6pL0sazTXV6+SQv25ZB+F7Bj9mJNaOc4nCRabwd5M/JwmUa8idz6Eci6eKfJryPs6Q==", "dev": true }, "abort-controller": { @@ -405,19 +411,27 @@ } }, "acorn": { - "version": "6.4.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.4.1.tgz", - "integrity": "sha512-ZVA9k326Nwrj3Cj9jlh3wGFutC2ZornPNARZwsNYqQYgN0EsV2d53w5RN/co65Ohn4sUAUtb1rSUAOD6XN9idA==", + "version": "8.5.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.5.0.tgz", + "integrity": "sha512-yXbYeFy+jUuYd3/CDcg2NkIYE991XYX/bje7LmjJigUciaeO1JR4XxXgCIV1/Zc/dRuFEyw1L0pbA+qynJkW5Q==", "dev": true }, "acorn-globals": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/acorn-globals/-/acorn-globals-4.3.0.tgz", - "integrity": "sha512-hMtHj3s5RnuhvHPowpBYvJVj3rAar82JiDQHvGs1zO0l10ocX/xEdBShNHTJaboucJUsScghp74pH3s7EnHHQw==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/acorn-globals/-/acorn-globals-6.0.0.tgz", + "integrity": "sha512-ZQl7LOWaF5ePqqcX4hLuv/bLXYQNfNWw2c0/yX/TsPRKamzHcTGQnlCjHT3TsmkOUVEPS3crCxiPfdzE/Trlhg==", "dev": true, "requires": { - "acorn": "^6.0.1", - "acorn-walk": "^6.0.1" + "acorn": "^7.1.1", + "acorn-walk": "^7.1.1" + }, + "dependencies": { + "acorn": { + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", + "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", + "dev": true + } } }, "acorn-jsx": { @@ -427,9 +441,9 @@ "dev": true }, "acorn-walk": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-6.1.1.tgz", - "integrity": "sha512-OtUw6JUTgxA2QoqqmrmQ7F2NYqiBPi/L2jqHyFtllhOUvXYQXf0Z1CYUinIfyT4bTCGmrA7gX9FvHA81uzCoVw==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-7.2.0.tgz", + "integrity": "sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA==", "dev": true }, "agent-base": { @@ -568,12 +582,6 @@ "integrity": "sha1-p5SvDAWrF1KEbudTofIRoFugxE8=", "dev": true }, - "array-equal": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/array-equal/-/array-equal-1.0.0.tgz", - "integrity": "sha1-jCpe8kcv2ep0KwTHenUJO6J1fJM=", - "dev": true - }, "array-find-index": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz", @@ -673,21 +681,6 @@ "integrity": "sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY=", "dev": true }, - "asn1": { - "version": "0.2.4", - "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", - "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", - "dev": true, - "requires": { - "safer-buffer": "~2.1.0" - } - }, - "assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", - "dev": true - }, "assertion-error": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", @@ -733,12 +726,6 @@ "integrity": "sha512-z/WhQ5FPySLdvREByI2vZiTWwCnF0moMJ1hK9YQwDTHKh6I7/uSckMetoRGb5UBZPC1z0jlw+n/XCgjeH7y1AQ==", "dev": true }, - "async-limiter": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.0.tgz", - "integrity": "sha512-jp/uFnooOiO+L211eZOoSyzpOITMXx1rBITauYykG3BRYPu8h0UcxsPNB04RR5vo4Tyz3+ay17tR6JVf9qzYWg==", - "dev": true - }, "async-retry": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/async-retry/-/async-retry-1.2.3.tgz", @@ -775,18 +762,6 @@ "integrity": "sha1-D+9a1G8b16hQLGVyfwNn1e5D1pY=", "dev": true }, - "aws-sign2": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", - "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=", - "dev": true - }, - "aws4": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.8.0.tgz", - "integrity": "sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ==", - "dev": true - }, "bach": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/bach/-/bach-1.2.0.tgz", @@ -871,15 +846,6 @@ "integrity": "sha1-RSIe5Cn37h5QNb4/UVM/HN/SmIQ=", "dev": true }, - "bcrypt-pbkdf": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", - "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", - "dev": true, - "requires": { - "tweetnacl": "^0.14.3" - } - }, "beeper": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/beeper/-/beeper-2.0.0.tgz", @@ -973,9 +939,9 @@ } }, "browser-process-hrtime": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/browser-process-hrtime/-/browser-process-hrtime-0.1.3.tgz", - "integrity": "sha512-bRFnI4NnjO6cnyLmOV/7PVoDEMJChlcfN0z4s1YMBY989/SvlfMI1lgCnkFUs53e9gQF+w7qu7XdllSTiSl8Aw==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/browser-process-hrtime/-/browser-process-hrtime-1.0.0.tgz", + "integrity": "sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow==", "dev": true }, "browser-stdout": { @@ -1090,12 +1056,6 @@ } } }, - "caseless": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", - "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", - "dev": true - }, "catharsis": { "version": "0.8.11", "resolved": "https://registry.npmjs.org/catharsis/-/catharsis-0.8.11.tgz", @@ -1460,18 +1420,26 @@ } }, "cssom": { - "version": "0.3.6", - "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.3.6.tgz", - "integrity": "sha512-DtUeseGk9/GBW0hl0vVPpU22iHL6YB5BUX7ml1hB+GMpo0NX5G4voX3kdWiMSEguFtcW3Vh3djqNF4aIe6ne0A==", + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.4.4.tgz", + "integrity": "sha512-p3pvU7r1MyyqbTk+WbNJIgJjG2VmTIaB10rI93LzVPrmDJKkzKYMtxxyAvQXR/NS6otuzveI7+7BBq3SjBS2mw==", "dev": true }, "cssstyle": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-1.2.1.tgz", - "integrity": "sha512-7DYm8qe+gPx/h77QlCyFmX80+fGaE/6A/Ekl0zaszYOubvySO2saYFdQ78P29D0UsULxFKCetDGNaNRUdSF+2A==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-2.3.0.tgz", + "integrity": "sha512-AZL67abkUzIuvcHqk7c09cezpGNcxUxU4Ioi/05xHk4DQeTkWmGYftIE6ctU6AEt+Gn4n1lDStOtj7FKycP71A==", "dev": true, "requires": { - "cssom": "0.3.x" + "cssom": "~0.3.6" + }, + "dependencies": { + "cssom": { + "version": "0.3.8", + "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.3.8.tgz", + "integrity": "sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg==", + "dev": true + } } }, "cubic2quad": { @@ -1560,24 +1528,43 @@ } } }, - "dashdash": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", - "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", - "dev": true, - "requires": { - "assert-plus": "^1.0.0" - } - }, "data-urls": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-1.1.0.tgz", - "integrity": "sha512-YTWYI9se1P55u58gL5GkQHW4P6VJBJ5iBT+B5a7i2Tjadhv52paJG0qHX4A0OR6/t52odI64KP2YvFpkDOi3eQ==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-2.0.0.tgz", + "integrity": "sha512-X5eWTSXO/BJmpdIKCRuKUgSCgAN0OwliVK3yPKbwIWU1Tdw5BRajxlzMidvh+gwko9AfQ9zIj52pzF91Q3YAvQ==", "dev": true, "requires": { - "abab": "^2.0.0", - "whatwg-mimetype": "^2.2.0", - "whatwg-url": "^7.0.0" + "abab": "^2.0.3", + "whatwg-mimetype": "^2.3.0", + "whatwg-url": "^8.0.0" + }, + "dependencies": { + "tr46": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-2.1.0.tgz", + "integrity": "sha512-15Ih7phfcdP5YxqiB+iDtLoaTz4Nd35+IiAv0kQ5FNKHzXgdWqPoTIqEDDJmXceQt4JZk6lVPT8lnDlPpGDppw==", + "dev": true, + "requires": { + "punycode": "^2.1.1" + } + }, + "webidl-conversions": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-6.1.0.tgz", + "integrity": "sha512-qBIvFLGiBpLjfwmYAaHPXsn+ho5xZnGvyGvsarywGNc8VyQJUMHJ8OBKGGrPER0okBeMDaan4mNBlgBROxuI8w==", + "dev": true + }, + "whatwg-url": { + "version": "8.7.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-8.7.0.tgz", + "integrity": "sha512-gAojqb/m9Q8a5IV96E3fHJM70AzCkgt4uXYX2O7EmuyOnLrViCQlsEBmF9UQIu3/aeAIp2U17rtbpZWNntQqdg==", + "dev": true, + "requires": { + "lodash": "^4.7.0", + "tr46": "^2.1.0", + "webidl-conversions": "^6.1.0" + } + } } }, "debug": { @@ -1613,6 +1600,12 @@ } } }, + "decimal.js": { + "version": "10.3.1", + "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.3.1.tgz", + "integrity": "sha512-V0pfhfr8suzyPGOx3nmq4aHqabehUZn6Ch9kyFpV79TGDTWFmHqUqXdabR7QHqxzrYolF4+tVmJhUG4OURg5dQ==", + "dev": true + }, "decode-uri-component": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", @@ -1824,12 +1817,20 @@ "dev": true }, "domexception": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/domexception/-/domexception-1.0.1.tgz", - "integrity": "sha512-raigMkn7CJNNo6Ihro1fzG7wr3fHuYVytzquZKX5n0yizGsTcYgzdIUwj1X9pK0VvjeihV+XiclP+DjwbsSKug==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/domexception/-/domexception-2.0.1.tgz", + "integrity": "sha512-yxJ2mFy/sibVQlu5qHjOkf9J3K6zgmCxgJ94u2EdvDOV09H+32LtRswEcUsmUWN72pVLOEnTSRaIVVzVQgS0dg==", "dev": true, "requires": { - "webidl-conversions": "^4.0.2" + "webidl-conversions": "^5.0.0" + }, + "dependencies": { + "webidl-conversions": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-5.0.0.tgz", + "integrity": "sha512-VlZwKPCkYKxQgeSbH5EyngOmRp7Ww7I9rQLERETtf5ofd9pGeswWiOtogpEO850jziPRarreGxn5QIiTqpb2wA==", + "dev": true + } } }, "domhandler": { @@ -1880,16 +1881,6 @@ "object.defaults": "^1.1.0" } }, - "ecc-jsbn": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", - "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", - "dev": true, - "requires": { - "jsbn": "~0.1.0", - "safer-buffer": "^2.1.0" - } - }, "ecdsa-sig-formatter": { "version": "1.0.11", "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz", @@ -2063,18 +2054,24 @@ "dev": true }, "escodegen": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.11.1.tgz", - "integrity": "sha512-JwiqFD9KdGVVpeuRa68yU3zZnBEOcPs0nKW7wZzXky8Z7tffdYUHbe11bPCV5jYlK6DVdKLWLm0f5I/QlL0Kmw==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-2.0.0.tgz", + "integrity": "sha512-mmHKys/C8BFUGI+MAWNcSYoORYLMdPzjrknd2Vc+bUsjN5bXcr8EhrNB+UTqfL1y3I9c4fw2ihgtMPQLBRiQxw==", "dev": true, "requires": { - "esprima": "^3.1.3", - "estraverse": "^4.2.0", + "esprima": "^4.0.1", + "estraverse": "^5.2.0", "esutils": "^2.0.2", "optionator": "^0.8.1", "source-map": "~0.6.1" }, "dependencies": { + "estraverse": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", + "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", + "dev": true + }, "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", @@ -2483,9 +2480,9 @@ } }, "esprima": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-3.1.3.tgz", - "integrity": "sha1-/cpRzuYTOJXjyI1TXOSdv/YqRjM=", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", "dev": true }, "esquery": { @@ -2714,12 +2711,6 @@ } } }, - "extsprintf": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", - "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=", - "dev": true - }, "fancy-log": { "version": "1.3.3", "resolved": "https://registry.npmjs.org/fancy-log/-/fancy-log-1.3.3.tgz", @@ -2925,21 +2916,26 @@ "for-in": "^1.0.1" } }, - "forever-agent": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", - "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", - "dev": true - }, "form-data": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", - "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.1.tgz", + "integrity": "sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg==", "dev": true, "requires": { "asynckit": "^0.4.0", - "combined-stream": "^1.0.6", + "combined-stream": "^1.0.8", "mime-types": "^2.1.12" + }, + "dependencies": { + "combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "dev": true, + "requires": { + "delayed-stream": "~1.0.0" + } + } } }, "fragment-cache": { @@ -3065,15 +3061,6 @@ "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=", "dev": true }, - "getpass": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", - "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", - "dev": true, - "requires": { - "assert-plus": "^1.0.0" - } - }, "git-config-path": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/git-config-path/-/git-config-path-1.0.1.tgz", @@ -3486,22 +3473,6 @@ } } }, - "har-schema": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", - "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=", - "dev": true - }, - "har-validator": { - "version": "5.1.3", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.3.tgz", - "integrity": "sha512-sNvOCzEQNr/qrvJgc3UG/kD4QtlHycrzwS+6mfTrrSq97BvaYcPZZI1ZSqGSPR73Cxn4LKTD4PttRwfU7jWq5g==", - "dev": true, - "requires": { - "ajv": "^6.5.5", - "har-schema": "^2.0.0" - } - }, "has": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", @@ -3598,12 +3569,12 @@ "dev": true }, "html-encoding-sniffer": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-1.0.2.tgz", - "integrity": "sha512-71lZziiDnsuabfdYiUeWdCVyKuqwWi23L8YeIgV9jSSZHCtb6wB1BKWooH7L3tn4/FuZJMVWyNaIDr4RGmaSYw==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-2.0.1.tgz", + "integrity": "sha512-D5JbOMBIR/TVZkubHT+OyT2705QvogUW4IBn6nHd756OwieSF9aDYFj4dv6HHEVGYbHaLETa3WggZYWWMyy3ZQ==", "dev": true, "requires": { - "whatwg-encoding": "^1.0.1" + "whatwg-encoding": "^1.0.5" } }, "htmlparser2": { @@ -3676,17 +3647,6 @@ } } }, - "http-signature": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", - "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", - "dev": true, - "requires": { - "assert-plus": "^1.0.0", - "jsprim": "^1.2.2", - "sshpk": "^1.7.0" - } - }, "https-proxy-agent": { "version": "2.2.4", "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-2.2.4.tgz", @@ -4045,6 +4005,12 @@ "isobject": "^3.0.1" } }, + "is-potential-custom-element-name": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz", + "integrity": "sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==", + "dev": true + }, "is-regex": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.4.tgz", @@ -4084,12 +4050,6 @@ "has-symbols": "^1.0.0" } }, - "is-typedarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", - "dev": true - }, "is-unc-path": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-unc-path/-/is-unc-path-1.0.0.tgz", @@ -4135,12 +4095,6 @@ "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", "dev": true }, - "isstream": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", - "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=", - "dev": true - }, "istextorbinary": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/istextorbinary/-/istextorbinary-2.2.1.tgz", @@ -4185,12 +4139,6 @@ "xmlcreate": "^2.0.3" } }, - "jsbn": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", - "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", - "dev": true - }, "jsdoc": { "version": "3.6.4", "resolved": "https://registry.npmjs.org/jsdoc/-/jsdoc-3.6.4.tgz", @@ -4240,37 +4188,111 @@ "dev": true }, "jsdom": { - "version": "13.2.0", - "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-13.2.0.tgz", - "integrity": "sha512-cG1NtMWO9hWpqRNRR3dSvEQa8bFI6iLlqU2x4kwX51FQjp0qus8T9aBaAO6iGp3DeBrhdwuKxckknohkmfvsFw==", - "dev": true, - "requires": { - "abab": "^2.0.0", - "acorn": "^6.0.4", - "acorn-globals": "^4.3.0", - "array-equal": "^1.0.0", - "cssom": "^0.3.4", - "cssstyle": "^1.1.1", - "data-urls": "^1.1.0", - "domexception": "^1.0.1", - "escodegen": "^1.11.0", - "html-encoding-sniffer": "^1.0.2", - "nwsapi": "^2.0.9", - "parse5": "5.1.0", - "pn": "^1.1.0", - "request": "^2.88.0", - "request-promise-native": "^1.0.5", - "saxes": "^3.1.5", - "symbol-tree": "^3.2.2", - "tough-cookie": "^2.5.0", - "w3c-hr-time": "^1.0.1", - "w3c-xmlserializer": "^1.0.1", - "webidl-conversions": "^4.0.2", + "version": "16.7.0", + "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-16.7.0.tgz", + "integrity": "sha512-u9Smc2G1USStM+s/x1ru5Sxrl6mPYCbByG1U/hUmqaVsm4tbNyS7CicOSRyuGQYZhTu0h84qkZZQ/I+dzizSVw==", + "dev": true, + "requires": { + "abab": "^2.0.5", + "acorn": "^8.2.4", + "acorn-globals": "^6.0.0", + "cssom": "^0.4.4", + "cssstyle": "^2.3.0", + "data-urls": "^2.0.0", + "decimal.js": "^10.2.1", + "domexception": "^2.0.1", + "escodegen": "^2.0.0", + "form-data": "^3.0.0", + "html-encoding-sniffer": "^2.0.1", + "http-proxy-agent": "^4.0.1", + "https-proxy-agent": "^5.0.0", + "is-potential-custom-element-name": "^1.0.1", + "nwsapi": "^2.2.0", + "parse5": "6.0.1", + "saxes": "^5.0.1", + "symbol-tree": "^3.2.4", + "tough-cookie": "^4.0.0", + "w3c-hr-time": "^1.0.2", + "w3c-xmlserializer": "^2.0.0", + "webidl-conversions": "^6.1.0", "whatwg-encoding": "^1.0.5", "whatwg-mimetype": "^2.3.0", - "whatwg-url": "^7.0.0", - "ws": "^6.1.2", + "whatwg-url": "^8.5.0", + "ws": "^7.4.6", "xml-name-validator": "^3.0.0" + }, + "dependencies": { + "agent-base": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", + "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", + "dev": true, + "requires": { + "debug": "4" + } + }, + "debug": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", + "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "http-proxy-agent": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-4.0.1.tgz", + "integrity": "sha512-k0zdNgqWTGA6aeIRVpvfVob4fL52dTfaehylg0Y4UvSySvOq/Y+BOyPrgpUrA7HylqvU8vIZGsRuXmspskV0Tg==", + "dev": true, + "requires": { + "@tootallnate/once": "1", + "agent-base": "6", + "debug": "4" + } + }, + "https-proxy-agent": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.0.tgz", + "integrity": "sha512-EkYm5BcKUGiduxzSt3Eppko+PiNWNEpa4ySk9vTC6wDsQJW9rHSa+UhGNJoRYp7bz6Ht1eaRIa6QaJqO5rCFbA==", + "dev": true, + "requires": { + "agent-base": "6", + "debug": "4" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "tr46": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-2.1.0.tgz", + "integrity": "sha512-15Ih7phfcdP5YxqiB+iDtLoaTz4Nd35+IiAv0kQ5FNKHzXgdWqPoTIqEDDJmXceQt4JZk6lVPT8lnDlPpGDppw==", + "dev": true, + "requires": { + "punycode": "^2.1.1" + } + }, + "webidl-conversions": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-6.1.0.tgz", + "integrity": "sha512-qBIvFLGiBpLjfwmYAaHPXsn+ho5xZnGvyGvsarywGNc8VyQJUMHJ8OBKGGrPER0okBeMDaan4mNBlgBROxuI8w==", + "dev": true + }, + "whatwg-url": { + "version": "8.7.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-8.7.0.tgz", + "integrity": "sha512-gAojqb/m9Q8a5IV96E3fHJM70AzCkgt4uXYX2O7EmuyOnLrViCQlsEBmF9UQIu3/aeAIp2U17rtbpZWNntQqdg==", + "dev": true, + "requires": { + "lodash": "^4.7.0", + "tr46": "^2.1.0", + "webidl-conversions": "^6.1.0" + } + } } }, "json-parse-better-errors": { @@ -4279,12 +4301,6 @@ "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", "dev": true }, - "json-schema": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", - "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=", - "dev": true - }, "json-schema-traverse": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", @@ -4297,12 +4313,6 @@ "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", "dev": true }, - "json-stringify-safe": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", - "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", - "dev": true - }, "json5": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/json5/-/json5-2.1.3.tgz", @@ -4361,18 +4371,6 @@ } } }, - "jsprim": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", - "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", - "dev": true, - "requires": { - "assert-plus": "1.0.0", - "extsprintf": "1.3.0", - "json-schema": "0.2.3", - "verror": "1.10.0" - } - }, "just-debounce": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/just-debounce/-/just-debounce-1.0.0.tgz", @@ -5550,15 +5548,9 @@ } }, "nwsapi": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.1.1.tgz", - "integrity": "sha512-T5GaA1J/d34AC8mkrFD2O0DR17kwJ702ZOtJOsS8RpbsQZVOC2/xYFb1i/cw+xdM54JIlMuojjDOYct8GIWtwg==", - "dev": true - }, - "oauth-sign": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", - "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.0.tgz", + "integrity": "sha512-h2AatdwYH+JHiZpv7pt/gSX1XoRGb7L/qSIeuqA6GwYoF9w1vP1cw42TO0aI2pNyshRK5893hNSl+1//vHK7hQ==", "dev": true }, "object-assign": { @@ -5704,17 +5696,17 @@ "dev": true }, "optionator": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz", - "integrity": "sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=", + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", + "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", "dev": true, "requires": { "deep-is": "~0.1.3", - "fast-levenshtein": "~2.0.4", + "fast-levenshtein": "~2.0.6", "levn": "~0.3.0", "prelude-ls": "~1.1.2", "type-check": "~0.3.2", - "wordwrap": "~1.0.0" + "word-wrap": "~1.2.3" } }, "ordered-read-streams": { @@ -5887,9 +5879,9 @@ "dev": true }, "parse5": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/parse5/-/parse5-5.1.0.tgz", - "integrity": "sha512-fxNG2sQjHvlVAYmzBZS9YlDp6PTSSDwa98vkD4QgVDDCAo84z5X1t5XyJQ62ImdLXx5NdIIfihey6xpum9/gRQ==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-6.0.1.tgz", + "integrity": "sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw==", "dev": true }, "pascalcase": { @@ -5969,12 +5961,6 @@ "integrity": "sha1-uULm1L3mUwBe9rcTYd74cn0GReA=", "dev": true }, - "performance-now": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", - "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=", - "dev": true - }, "picomatch": { "version": "2.2.2", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz", @@ -6033,12 +6019,6 @@ "extend-shallow": "^3.0.2" } }, - "pn": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/pn/-/pn-1.1.0.tgz", - "integrity": "sha512-2qHaIQr2VLRFoxe2nASzsV6ef4yOOH+Fi9FBOVH6cqeSgUnoyySPZkxzLuzd+RYOQTRpROA0ztTMqxROKSb/nA==", - "dev": true - }, "portfinder": { "version": "1.0.28", "resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.28.tgz", @@ -6159,9 +6139,9 @@ "dev": true }, "psl": { - "version": "1.1.31", - "resolved": "https://registry.npmjs.org/psl/-/psl-1.1.31.tgz", - "integrity": "sha512-/6pt4+C+T+wZUieKR620OpzN/LlnNKuWjy1iFLQ/UG35JqHlR/89MP1d96dUfkf6Dne3TuLQzOYEYshJ+Hx8mw==", + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", + "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==", "dev": true }, "pump": { @@ -6420,72 +6400,6 @@ "readable-stream": "^2.0.2" } }, - "request": { - "version": "2.88.0", - "resolved": "https://registry.npmjs.org/request/-/request-2.88.0.tgz", - "integrity": "sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg==", - "dev": true, - "requires": { - "aws-sign2": "~0.7.0", - "aws4": "^1.8.0", - "caseless": "~0.12.0", - "combined-stream": "~1.0.6", - "extend": "~3.0.2", - "forever-agent": "~0.6.1", - "form-data": "~2.3.2", - "har-validator": "~5.1.0", - "http-signature": "~1.2.0", - "is-typedarray": "~1.0.0", - "isstream": "~0.1.2", - "json-stringify-safe": "~5.0.1", - "mime-types": "~2.1.19", - "oauth-sign": "~0.9.0", - "performance-now": "^2.1.0", - "qs": "~6.5.2", - "safe-buffer": "^5.1.2", - "tough-cookie": "~2.4.3", - "tunnel-agent": "^0.6.0", - "uuid": "^3.3.2" - }, - "dependencies": { - "punycode": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", - "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", - "dev": true - }, - "tough-cookie": { - "version": "2.4.3", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.4.3.tgz", - "integrity": "sha512-Q5srk/4vDM54WJsJio3XNn6K2sCG+CQ8G5Wz6bZhRZoAe/+TxjWB/GlFAnYEbkYVlON9FMk/fE3h2RLpPXo4lQ==", - "dev": true, - "requires": { - "psl": "^1.1.24", - "punycode": "^1.4.1" - } - } - } - }, - "request-promise-core": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/request-promise-core/-/request-promise-core-1.1.2.tgz", - "integrity": "sha512-UHYyq1MO8GsefGEt7EprS8UrXsm1TxEvFUX1IMTuSLU2Rh7fTIdFtl8xD7JiEYiWU2dl+NYAjCTksTehQUxPag==", - "dev": true, - "requires": { - "lodash": "^4.17.11" - } - }, - "request-promise-native": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/request-promise-native/-/request-promise-native-1.0.7.tgz", - "integrity": "sha512-rIMnbBdgNViL37nZ1b3L/VfPOpSi0TqVDQPAvO6U14lMzOLrt5nilxCQqtDKhZeDiW0/hkCXGoQjhgJd/tCh6w==", - "dev": true, - "requires": { - "request-promise-core": "1.1.2", - "stealthy-require": "^1.1.1", - "tough-cookie": "^2.3.3" - } - }, "require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", @@ -6636,12 +6550,12 @@ "dev": true }, "saxes": { - "version": "3.1.9", - "resolved": "https://registry.npmjs.org/saxes/-/saxes-3.1.9.tgz", - "integrity": "sha512-FZeKhJglhJHk7eWG5YM0z46VHmI3KJpMBAQm3xa9meDvd+wevB5GuBB0wc0exPInZiBBHqi00DbS8AcvCGCFMw==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/saxes/-/saxes-5.0.1.tgz", + "integrity": "sha512-5LBh1Tls8c9xgGjw3QrMwETmTMVk0oFgvrFSvWx62llR2hcEInrKNZ2GZCCuuy2lvWrdl5jhbpeqc5hRYKFOcw==", "dev": true, "requires": { - "xmlchars": "^1.3.1" + "xmlchars": "^2.2.0" } }, "scslre": { @@ -7004,23 +6918,6 @@ "integrity": "sha512-00kZI87TdRKwt+P8jj8UZxbfp7mK2ufxcIMWvhAOZNJTRROimpHeruWrGvCZneiuVDLqdyHefVp748ECTnyUBQ==", "dev": true }, - "sshpk": { - "version": "1.16.1", - "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz", - "integrity": "sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==", - "dev": true, - "requires": { - "asn1": "~0.2.3", - "assert-plus": "^1.0.0", - "bcrypt-pbkdf": "^1.0.0", - "dashdash": "^1.12.0", - "ecc-jsbn": "~0.1.1", - "getpass": "^0.1.1", - "jsbn": "~0.1.0", - "safer-buffer": "^2.0.2", - "tweetnacl": "~0.14.0" - } - }, "stack-trace": { "version": "0.0.10", "resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.10.tgz", @@ -7048,12 +6945,6 @@ } } }, - "stealthy-require": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/stealthy-require/-/stealthy-require-1.1.1.tgz", - "integrity": "sha1-NbCYdbT/SfJqd35QmzCQoyJr8ks=", - "dev": true - }, "stream-exhaust": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/stream-exhaust/-/stream-exhaust-1.0.2.tgz", @@ -7347,9 +7238,9 @@ "dev": true }, "symbol-tree": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.2.tgz", - "integrity": "sha1-rifbOPZgp64uHDt9G8KQgZuFGeY=", + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz", + "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==", "dev": true }, "table": { @@ -7543,13 +7434,14 @@ } }, "tough-cookie": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", - "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.0.0.tgz", + "integrity": "sha512-tHdtEpQCMrc1YLrMaqXXcj6AxhYi/xgit6mZu1+EDWUn+qhUf8wMQoFIy9NXuq23zAwtcB0t/MjACGR18pcRbg==", "dev": true, "requires": { - "psl": "^1.1.28", - "punycode": "^2.1.1" + "psl": "^1.1.33", + "punycode": "^2.1.1", + "universalify": "^0.1.2" } }, "tr46": { @@ -7594,21 +7486,6 @@ "pako": "^1.0.0" } }, - "tunnel-agent": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", - "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", - "dev": true, - "requires": { - "safe-buffer": "^5.0.1" - } - }, - "tweetnacl": { - "version": "0.14.5", - "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", - "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", - "dev": true - }, "type": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/type/-/type-1.2.0.tgz", @@ -7856,12 +7733,6 @@ "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", "dev": true }, - "uuid": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", - "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==", - "dev": true - }, "v8-compile-cache": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz", @@ -7928,17 +7799,6 @@ } } }, - "verror": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", - "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", - "dev": true, - "requires": { - "assert-plus": "^1.0.0", - "core-util-is": "1.0.2", - "extsprintf": "^1.2.0" - } - }, "vinyl": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-2.2.0.tgz", @@ -8003,22 +7863,20 @@ } }, "w3c-hr-time": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/w3c-hr-time/-/w3c-hr-time-1.0.1.tgz", - "integrity": "sha1-gqwr/2PZUOqeMYmlimViX+3xkEU=", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/w3c-hr-time/-/w3c-hr-time-1.0.2.tgz", + "integrity": "sha512-z8P5DvDNjKDoFIHK7q8r8lackT6l+jo/Ye3HOle7l9nICP9lf1Ci25fy9vHd0JOWewkIFzXIEig3TdKT7JQ5fQ==", "dev": true, "requires": { - "browser-process-hrtime": "^0.1.2" + "browser-process-hrtime": "^1.0.0" } }, "w3c-xmlserializer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-1.0.1.tgz", - "integrity": "sha512-XZGI1OH/OLQr/NaJhhPmzhngwcAnZDLytsvXnRmlYeRkmbb0I7sqFFA22erq4WQR0sUu17ZSQOAV9mFwCqKRNg==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-2.0.0.tgz", + "integrity": "sha512-4tzD0mF8iSiMiNs30BiLO3EpfGLZUT2MSX/G+o7ZywDzliWQ3OPtTZ0PTC3B3ca1UAf4cJMHB+2Bf56EriJuRA==", "dev": true, "requires": { - "domexception": "^1.0.1", - "webidl-conversions": "^4.0.2", "xml-name-validator": "^3.0.0" } }, @@ -8178,12 +8036,6 @@ "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", "dev": true }, - "wordwrap": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", - "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", - "dev": true - }, "wrap-ansi": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", @@ -8201,13 +8053,10 @@ "dev": true }, "ws": { - "version": "6.2.2", - "resolved": "https://registry.npmjs.org/ws/-/ws-6.2.2.tgz", - "integrity": "sha512-zmhltoSR8u1cnDsD43TX59mzoMZsLKqUweyYBAIvTngR3shc0W6aOZylZmq/7hqyVxPdi+5Ud2QInblgyE72fw==", - "dev": true, - "requires": { - "async-limiter": "~1.0.0" - } + "version": "7.5.5", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.5.tgz", + "integrity": "sha512-BAkMFcAzl8as1G/hArkxOxq3G7pjUqQ3gzYbLL0/5zNkph70e+lCoxBGnm6AW1+/aiNeV4fnKqZ8m4GZewmH2w==", + "dev": true }, "xml-name-validator": { "version": "3.0.0", @@ -8232,9 +8081,9 @@ "dev": true }, "xmlchars": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/xmlchars/-/xmlchars-1.3.1.tgz", - "integrity": "sha512-tGkGJkN8XqCod7OT+EvGYK5Z4SfDQGD30zAa58OcnAa0RRWgzUEK72tkXhsX1FZd+rgnhRxFtmO+ihkp8LHSkw==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/xmlchars/-/xmlchars-2.2.0.tgz", + "integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==", "dev": true }, "xmlcreate": { diff --git a/package.json b/package.json index daaf0feb67..117da0448a 100755 --- a/package.json +++ b/package.json @@ -57,7 +57,7 @@ "gzip-size": "^5.1.1", "htmlparser2": "^4.0.0", "http-server": "^0.12.3", - "jsdom": "^13.0.0", + "jsdom": "^16.7.0", "mocha": "^6.2.0", "node-fetch": "^2.6.0", "npm-run-all": "^4.1.5", diff --git a/tests/helper/prism-dom-util.js b/tests/helper/prism-dom-util.js new file mode 100644 index 0000000000..86de3645fe --- /dev/null +++ b/tests/helper/prism-dom-util.js @@ -0,0 +1,58 @@ +const { assert } = require('chai'); +const PrismLoader = require('./prism-loader'); + +/** + * @typedef {import("./prism-loader").PrismDOM} PrismDOM + * @typedef {import("./prism-loader").PrismWindow} PrismWindow + */ + +module.exports = { + /** + * @param {PrismWindow} window + */ + createUtil(window) { + const { Prism, document } = window; + + const util = { + assert: { + highlight({ language = 'none', code, expected }) { + assert.strictEqual(Prism.highlight(code, Prism.languages[language], language), expected); + }, + highlightElement({ language = 'none', code, expected }) { + const element = document.createElement('CODE'); + element.classList.add('language-' + language); + element.textContent = code; + + Prism.highlightElement(element); + + assert.strictEqual(element.innerHTML, expected); + } + }, + }; + + return util; + }, + + /** + * Creates a Prism DOM instance that will be automatically cleaned up after the given test suite finished. + * + * @param {ReturnType} suite + * @param {Partial>} options + */ + createScopedPrismDom(suite, options = {}) { + const dom = PrismLoader.createPrismDOM(); + + suite.afterAll(function () { + dom.window.close(); + }); + + if (options.languages) { + dom.loadLanguages(options.languages); + } + if (options.plugins) { + dom.loadPlugins(options.plugins); + } + + return dom; + } +}; diff --git a/tests/helper/prism-loader.js b/tests/helper/prism-loader.js index a3a0c1d585..1a9ef4dd98 100644 --- a/tests/helper/prism-loader.js +++ b/tests/helper/prism-loader.js @@ -1,18 +1,34 @@ 'use strict'; - const fs = require('fs'); +const { JSDOM } = require('jsdom'); const components = require('../../components.json'); const getLoader = require('../../dependencies'); -const languagesCatalog = components.languages; const coreChecks = require('./checks'); +const { languages: languagesCatalog, plugins: pluginsCatalog } = components; + +/** + * @typedef {import('../../components/prism-core')} Prism + */ /** * @typedef PrismLoaderContext - * @property {import('../../components/prism-core')} Prism The Prism instance. + * @property {Prism} Prism The Prism instance. * @property {Set} loaded A set of loaded components. */ +/** + * @typedef {import("jsdom").DOMWindow & { Prism: Prism }} PrismWindow + * + * @typedef PrismDOM + * @property {JSDOM} dom + * @property {PrismWindow} window + * @property {Document} document + * @property {Prism} Prism + * @property {(languages: string | string[]) => void} loadLanguages + * @property {(plugins: string | string[]) => void} loadPlugins + */ + /** @type {Map} */ const fileSourceCache = new Map(); /** @type {() => any} */ @@ -39,6 +55,54 @@ module.exports = { return context.Prism; }, + /** + * Creates a new JavaScript DOM instance with Prism being loaded. + * + * @returns {PrismDOM} + */ + createPrismDOM() { + const dom = new JSDOM(``, { + runScripts: 'outside-only' + }); + const window = dom.window; + + window.self = window; // set self for plugins + window.eval(this.loadComponentSource('core')); + + /** The set of loaded languages and plugins */ + const loaded = new Set(); + + /** + * Loads the given languages or plugins. + * + * @param {string | string[]} languagesOrPlugins + */ + const load = (languagesOrPlugins) => { + getLoader(components, toArray(languagesOrPlugins), [...loaded]).load(id => { + let source; + if (languagesCatalog[id]) { + source = this.loadComponentSource(id); + } else if (pluginsCatalog[id]) { + source = this.loadPluginSource(id); + } else { + throw new Error(`Language or plugin '${id}' not found.`); + } + + window.eval(source); + loaded.add(id); + }); + }; + + return { + dom, + window: /** @type {PrismWindow} */ (window), + document: window.document, + Prism: window.Prism, + loadLanguages: load, + loadPlugins: load, + }; + }, + /** * Loads the given languages and appends the config to the given Prism object. * @@ -48,11 +112,7 @@ module.exports = { * @returns {PrismLoaderContext} */ loadLanguages(languages, context) { - if (typeof languages === 'string') { - languages = [languages]; - } - - getLoader(components, languages, [...context.loaded]).load(id => { + getLoader(components, toArray(languages), [...context.loaded]).load(id => { if (!languagesCatalog[id]) { throw new Error(`Language '${id}' not found.`); } @@ -112,6 +172,17 @@ module.exports = { return this.loadFileSource(__dirname + '/../../components/prism-' + name + '.js'); }, + /** + * Loads the given plugin's file source as string + * + * @private + * @param {string} name + * @returns {string} + */ + loadPluginSource(name) { + return this.loadFileSource(`${__dirname}/../../plugins/${name}/prism-${name}.js`); + }, + /** * Loads the given file source as string * @@ -127,3 +198,14 @@ module.exports = { return content; } }; + +/** + * Wraps the given value in an array if it's not an array already. + * + * @param {T[] | T} value + * @returns {T[]} + * @template T + */ +function toArray(value) { + return Array.isArray(value) ? value : [value]; +} diff --git a/tests/plugins/copy-to-clipboard/basic-functionality.js b/tests/plugins/copy-to-clipboard/basic-functionality.js new file mode 100644 index 0000000000..89502f4c8d --- /dev/null +++ b/tests/plugins/copy-to-clipboard/basic-functionality.js @@ -0,0 +1,71 @@ +const { assert } = require('chai'); +const { createScopedPrismDom } = require('../../helper/prism-dom-util'); + + +class DummyClipboard { + constructor() { + this.text = ''; + } + async readText() { + return this.text; + } + /** @param {string} data */ + writeText(data) { + this.text = data; + return Promise.resolve(); + } +} + +describe('Copy to Clipboard', function () { + const { Prism, document, window } = createScopedPrismDom(this, { + languages: 'javascript', + plugins: 'copy-to-clipboard', + }); + + + it('should work', function () { + const clipboard = new DummyClipboard(); + window.navigator.clipboard = clipboard; + + document.body.innerHTML = `
            foo
            `; + Prism.highlightAll(); + + const button = document.querySelector('button'); + assert.notStrictEqual(button, null); + + button.click(); + + assert.strictEqual(clipboard.text, 'foo'); + }); + + it('should copy the current text even after the code block changes its text', function () { + const clipboard = new DummyClipboard(); + window.navigator.clipboard = clipboard; + + document.body.innerHTML = `
            foo
            `; + Prism.highlightAll(); + + const button = document.querySelector('button'); + assert.notStrictEqual(button, null); + + button.click(); + + assert.strictEqual(clipboard.text, 'foo'); + + // change text + document.querySelector('code').textContent = 'bar'; + // and click + button.click(); + + assert.strictEqual(clipboard.text, 'bar'); + + // change text + document.querySelector('code').textContent = 'baz'; + Prism.highlightAll(); + // and click + button.click(); + + assert.strictEqual(clipboard.text, 'baz'); + }); + +}); diff --git a/tests/plugins/custom-class/basic-functionality.js b/tests/plugins/custom-class/basic-functionality.js new file mode 100644 index 0000000000..54444d7886 --- /dev/null +++ b/tests/plugins/custom-class/basic-functionality.js @@ -0,0 +1,69 @@ +const { createUtil, createScopedPrismDom } = require('../../helper/prism-dom-util'); + + +describe('Custom class', function () { + const { Prism, window } = createScopedPrismDom(this, { + languages: 'javascript', + plugins: 'custom-class' + }); + const util = createUtil(window); + + + it('should set prefix', function () { + Prism.plugins.customClass.prefix('prism-'); + + util.assert.highlight({ + language: 'javascript', + code: `var a = true;`, + expected: `var a = true;` + }); + }); + + it('should reset prefix', function () { + Prism.plugins.customClass.prefix(''); + + util.assert.highlight({ + language: 'javascript', + code: `var a = true;`, + expected: `var a = true;` + }); + }); + + it('should map class names using a function', function () { + Prism.plugins.customClass.map(function (cls, language) { + return `${language}-${cls}`; + }); + + util.assert.highlight({ + language: 'javascript', + code: `var a = true;`, + expected: `var a = true;` + }); + }); + + it('should map class names using an object', function () { + Prism.plugins.customClass.map({ + boolean: 'b', + keyword: 'kw', + operator: 'op', + punctuation: 'p' + }); + + util.assert.highlight({ + language: 'javascript', + code: `var a = true;`, + expected: `var a = true;` + }); + }); + + it('should reset map', function () { + Prism.plugins.customClass.map({}); + + util.assert.highlight({ + language: 'javascript', + code: `var a = true;`, + expected: `var a = true;` + }); + }); + +}); diff --git a/tests/plugins/highlight-keywords/basic-functionality.js b/tests/plugins/highlight-keywords/basic-functionality.js new file mode 100644 index 0000000000..1d7fffa61e --- /dev/null +++ b/tests/plugins/highlight-keywords/basic-functionality.js @@ -0,0 +1,20 @@ +const { createUtil, createScopedPrismDom } = require('../../helper/prism-dom-util'); + + +describe('Highlight Keywords', function () { + const { window } = createScopedPrismDom(this, { + languages: 'javascript', + plugins: 'highlight-keywords' + }); + const util = createUtil(window); + + + it('should highlight keywords', function () { + util.assert.highlightElement({ + language: 'javascript', + code: `import * from ''; const foo;`, + expected: `import * from ''; const foo;` + }); + }); + +}); diff --git a/tests/plugins/keep-markup/test.js b/tests/plugins/keep-markup/test.js index 946d1246c9..006ce3c11a 100644 --- a/tests/plugins/keep-markup/test.js +++ b/tests/plugins/keep-markup/test.js @@ -1,89 +1,52 @@ -/* eslint-disable no-undef */ -const expect = require('chai').expect; -const jsdom = require('jsdom'); -const { JSDOM } = jsdom; +const { assert } = require('chai'); +const { createScopedPrismDom } = require('../../helper/prism-dom-util'); -require('../../../prism'); -// fake DOM -global.self = {}; -global.self.Prism = Prism; -global.document = {}; -document.createRange = function () { -}; -global.self.document = document; -require('../../../plugins/keep-markup/prism-keep-markup'); +describe('Keep Markup', function () { + const { Prism, document } = createScopedPrismDom(this, { + plugins: 'keep-markup' + }); + -describe('Prism Keep Markup Plugin', function () { + /** + * @param {string} html + * @param {string} language + */ + function highlightInElement(html, language = 'none') { + const pre = document.createElement('pre'); + pre.className = `language-${language}`; + pre.innerHTML = `${html}`; - function execute(code) { - const start = []; - const end = []; - const nodes = []; - document.createRange = function () { - return { - setStart: function (node, offset) { - start.push({ node, offset }); - }, - setEnd: function (node, offset) { - end.push({ node, offset }); - }, - extractContents: function () { - return new JSDOM('').window.document.createTextNode(''); - }, - insertNode: function (node) { - nodes.push(node); - }, - detach: function () { - } - }; - }; - const beforeHighlight = Prism.hooks.all['before-highlight'][0]; - const afterHighlight = Prism.hooks.all['after-highlight'][0]; - const env = { - element: new JSDOM(code).window.document.getElementsByTagName('code')[0], - language: 'javascript' - }; - beforeHighlight(env); - afterHighlight(env); - return { start, end, nodes }; + Prism.highlightElement(pre); + + return pre.querySelector('code').innerHTML; + } + + /** + * @param {string} html + * @param {string} language + */ + function keepMarkup(html, language = 'none') { + assert.equal(highlightInElement(html, language), html); } it('should keep markup', function () { - const result = execute(`xay`); - expect(result.start.length).to.equal(1); - expect(result.end.length).to.equal(1); - expect(result.nodes.length).to.equal(1); - expect(result.nodes[0].nodeName).to.equal('SPAN'); + keepMarkup(`xay`); }); it('should preserve markup order', function () { - const result = execute(`xy`); - expect(result.start.length).to.equal(2); - expect(result.start[0].offset).to.equal(0); - expect(result.start[0].node.textContent).to.equal('y'); - expect(result.start[1].offset).to.equal(0); - expect(result.start[1].node.textContent).to.equal('y'); - expect(result.end.length).to.equal(2); - expect(result.end[0].offset).to.equal(0); - expect(result.end[0].node.textContent).to.equal('y'); - expect(result.end[1].offset).to.equal(0); - expect(result.end[1].node.textContent).to.equal('y'); - expect(result.nodes.length).to.equal(2); - expect(result.nodes[0].nodeName).to.equal('A'); - expect(result.nodes[1].nodeName).to.equal('B'); + keepMarkup(`xy`); }); - it('should keep last markup', function () { - const result = execute(`xya`); - expect(result.start.length).to.equal(1); - expect(result.end.length).to.equal(1); - expect(result.nodes.length).to.equal(1); - expect(result.nodes[0].nodeName).to.equal('SPAN'); + + it('should keep last markup', function () { + keepMarkup(`xya`); + keepMarkup(`xya`); }); + // The markup is removed if it's the last element and the element's name is a single letter: a(nchor), b(old), i(talic)... // https://github.com/PrismJS/prism/issues/1618 /* it('should keep last single letter empty markup', function () { - const result = execute(`xy`) + const result = execute(`xy`) expect(result.start.length).to.equal(1) expect(result.end.length).to.equal(1) expect(result.nodes.length).to.equal(1) diff --git a/tests/plugins/show-invisibles/basic-functionality.js b/tests/plugins/show-invisibles/basic-functionality.js new file mode 100644 index 0000000000..2a3cbcebc9 --- /dev/null +++ b/tests/plugins/show-invisibles/basic-functionality.js @@ -0,0 +1,28 @@ +const { createUtil, createScopedPrismDom } = require('../../helper/prism-dom-util'); + + +describe('Show Invisibles', function () { + const { window } = createScopedPrismDom(this, { + languages: 'javascript', + plugins: 'show-invisibles' + }); + const util = createUtil(window); + + + it('should show invisible characters', function () { + util.assert.highlightElement({ + language: 'javascript', + code: ` \t\n\r\n\t\t`, + expected: ` \t\n\n\t\t` + }); + }); + + it('should show invisible characters inside tokens', function () { + util.assert.highlightElement({ + language: 'javascript', + code: `/* \n */`, + expected: `/* \n */` + }); + }); + +}); diff --git a/tests/plugins/show-language/basic-functionality.js b/tests/plugins/show-language/basic-functionality.js new file mode 100644 index 0000000000..3f97d84f69 --- /dev/null +++ b/tests/plugins/show-language/basic-functionality.js @@ -0,0 +1,36 @@ +const { assert } = require('chai'); +const { createScopedPrismDom } = require('../../helper/prism-dom-util'); + + +describe('Show language', function () { + const { Prism, document } = createScopedPrismDom(this, { + languages: ['markup', 'javascript'], + plugins: 'show-language' + }); + + + function test(expectedLanguage, code) { + document.body.innerHTML = code; + Prism.highlightAll(); + + assert.strictEqual(document.querySelector('.toolbar-item > span').textContent, expectedLanguage); + } + + it('should work with component titles', function () { + // simple title + test('JavaScript', `
            foo
            `); + test('Markup', `
            foo
            `); + + // aliases with the same title + test('JavaScript', `
            foo
            `); + + // aliases with a different title + test('HTML', `
            foo
            `); + test('SVG', `
            foo
            `); + }); + + it('should work with custom titles', function () { + test('Foo', `
            foo
            `); + }); + +}); diff --git a/tests/plugins/unescaped-markup/basic-functionality.js b/tests/plugins/unescaped-markup/basic-functionality.js new file mode 100644 index 0000000000..eedfaedd73 --- /dev/null +++ b/tests/plugins/unescaped-markup/basic-functionality.js @@ -0,0 +1,36 @@ +const { assert } = require('chai'); +const { createScopedPrismDom } = require('../../helper/prism-dom-util'); + + +describe('Show language', function () { + const { Prism, document } = createScopedPrismDom(this, { + languages: 'markup', + plugins: 'unescaped-markup' + }); + + + function test(expectedText, code) { + document.body.innerHTML = code; + Prism.highlightAll(); + + assert.strictEqual(document.querySelector('code').textContent, expectedText); + } + + it('should work with comments', function () { + test('\n

            Example

            \n', `
            `); + + test('\n

            Example 2

            \n', `
            `); + }); + + it('should work with script tags', function () { + test('

            Example

            ', ``); + + // inherit language + test('

            Example 2

            ', `
            `); + }); + +}); From 91060fd6dd8e0b8759ed4aaad236dc34f3b5928a Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Tue, 5 Oct 2021 23:06:46 +0200 Subject: [PATCH 0954/1100] TypeScript: Removed duplicate keywords (#3132) --- components/prism-typescript.js | 2 +- components/prism-typescript.min.js | 2 +- tests/languages/typescript/keyword_feature.test | 10 +++++++++- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/components/prism-typescript.js b/components/prism-typescript.js index 454a558ae6..fcd73eb043 100644 --- a/components/prism-typescript.js +++ b/components/prism-typescript.js @@ -12,7 +12,7 @@ // The keywords TypeScript adds to JavaScript Prism.languages.typescript.keyword.push( - /\b(?:abstract|as|declare|implements|is|keyof|readonly|require)\b/, + /\b(?:abstract|declare|is|keyof|readonly|require)\b/, // keywords that have to be followed by an identifier /\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/, // This is for `import type *, {}` diff --git a/components/prism-typescript.min.js b/components/prism-typescript.min.js index 491963dc62..03d8a3286d 100644 --- a/components/prism-typescript.min.js +++ b/components/prism-typescript.min.js @@ -1 +1 @@ -!function(e){e.languages.typescript=e.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),e.languages.typescript.keyword.push(/\b(?:abstract|as|declare|implements|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete e.languages.typescript.parameter;var s=e.languages.extend("typescript",{});delete s["class-name"],e.languages.typescript["class-name"].inside=s,e.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:s}}}}),e.languages.ts=e.languages.typescript}(Prism); \ No newline at end of file +!function(e){e.languages.typescript=e.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),e.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete e.languages.typescript.parameter;var s=e.languages.extend("typescript",{});delete s["class-name"],e.languages.typescript["class-name"].inside=s,e.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:s}}}}),e.languages.ts=e.languages.typescript}(Prism); \ No newline at end of file diff --git a/tests/languages/typescript/keyword_feature.test b/tests/languages/typescript/keyword_feature.test index 11ad7463d0..181f1d06e8 100644 --- a/tests/languages/typescript/keyword_feature.test +++ b/tests/languages/typescript/keyword_feature.test @@ -80,6 +80,7 @@ namespace foo; type foo; import type { Component } from "react"; +import type *, {} ---------------------------------------------------- @@ -269,7 +270,14 @@ import type { Component } from "react"; ["punctuation", "}"], ["keyword", "from"], ["string", "\"react\""], - ["punctuation", ";"] + ["punctuation", ";"], + + ["keyword", "import"], + ["keyword", "type"], + ["operator", "*"], + ["punctuation", ","], + ["punctuation", "{"], + ["punctuation", "}"] ] ---------------------------------------------------- From a28a86ad745d8ae0a1a5dbaa0d3cd691c1815255 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Tue, 5 Oct 2021 23:28:18 +0200 Subject: [PATCH 0955/1100] Wolfram: Removed unmatchable punctuation variant (#3133) --- components/prism-wolfram.js | 4 ++-- components/prism-wolfram.min.js | 2 +- .../languages/wolfram/punctuation_feature.test | 18 ++++++++++++++++++ 3 files changed, 21 insertions(+), 3 deletions(-) create mode 100644 tests/languages/wolfram/punctuation_feature.test diff --git a/components/prism-wolfram.js b/components/prism-wolfram.js index c206e9673c..fbd0716c57 100644 --- a/components/prism-wolfram.js +++ b/components/prism-wolfram.js @@ -7,7 +7,7 @@ Prism.languages.wolfram = { }, 'keyword': /\b(?:Abs|AbsArg|Accuracy|Block|Do|For|Function|If|Manipulate|Module|Nest|NestList|None|Return|Switch|Table|Which|While)\b/, 'context': { - pattern: /\w+`+\w*/, + pattern: /\b\w+`+\w*/, alias: 'class-name' }, 'blank': { @@ -21,7 +21,7 @@ Prism.languages.wolfram = { 'boolean': /\b(?:False|True)\b/, 'number': /(?:\b(?=\d)|\B(?=\.))(?:0[bo])?(?:(?:\d|0x[\da-f])[\da-f]*(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?j?\b/i, 'operator': /\/\.|;|=\.|\^=|\^:=|:=|<<|>>|<\||\|>|:>|\|->|->|<-|@@@|@@|@|\/@|=!=|===|==|=|\+|-|\^|\[\/-+%=\]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/, - 'punctuation': /[\|{}[\];(),.:]/ + 'punctuation': /[{}[\];(),.:]/ }; Prism.languages.mathematica = Prism.languages.wolfram; diff --git a/components/prism-wolfram.min.js b/components/prism-wolfram.min.js index 1c25f81350..03309bf0aa 100644 --- a/components/prism-wolfram.min.js +++ b/components/prism-wolfram.min.js @@ -1 +1 @@ -Prism.languages.wolfram={comment:/\(\*(?:\(\*(?:[^*]|\*(?!\)))*\*\)|(?!\(\*)[\s\S])*?\*\)/,string:{pattern:/"(?:\\.|[^"\\\r\n])*"/,greedy:!0},keyword:/\b(?:Abs|AbsArg|Accuracy|Block|Do|For|Function|If|Manipulate|Module|Nest|NestList|None|Return|Switch|Table|Which|While)\b/,context:{pattern:/\w+`+\w*/,alias:"class-name"},blank:{pattern:/\b\w+_\b/,alias:"regex"},"global-variable":{pattern:/\$\w+/,alias:"variable"},boolean:/\b(?:False|True)\b/,number:/(?:\b(?=\d)|\B(?=\.))(?:0[bo])?(?:(?:\d|0x[\da-f])[\da-f]*(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?j?\b/i,operator:/\/\.|;|=\.|\^=|\^:=|:=|<<|>>|<\||\|>|:>|\|->|->|<-|@@@|@@|@|\/@|=!=|===|==|=|\+|-|\^|\[\/-+%=\]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[\|{}[\];(),.:]/},Prism.languages.mathematica=Prism.languages.wolfram,Prism.languages.wl=Prism.languages.wolfram,Prism.languages.nb=Prism.languages.wolfram; \ No newline at end of file +Prism.languages.wolfram={comment:/\(\*(?:\(\*(?:[^*]|\*(?!\)))*\*\)|(?!\(\*)[\s\S])*?\*\)/,string:{pattern:/"(?:\\.|[^"\\\r\n])*"/,greedy:!0},keyword:/\b(?:Abs|AbsArg|Accuracy|Block|Do|For|Function|If|Manipulate|Module|Nest|NestList|None|Return|Switch|Table|Which|While)\b/,context:{pattern:/\b\w+`+\w*/,alias:"class-name"},blank:{pattern:/\b\w+_\b/,alias:"regex"},"global-variable":{pattern:/\$\w+/,alias:"variable"},boolean:/\b(?:False|True)\b/,number:/(?:\b(?=\d)|\B(?=\.))(?:0[bo])?(?:(?:\d|0x[\da-f])[\da-f]*(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?j?\b/i,operator:/\/\.|;|=\.|\^=|\^:=|:=|<<|>>|<\||\|>|:>|\|->|->|<-|@@@|@@|@|\/@|=!=|===|==|=|\+|-|\^|\[\/-+%=\]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},Prism.languages.mathematica=Prism.languages.wolfram,Prism.languages.wl=Prism.languages.wolfram,Prism.languages.nb=Prism.languages.wolfram; \ No newline at end of file diff --git a/tests/languages/wolfram/punctuation_feature.test b/tests/languages/wolfram/punctuation_feature.test new file mode 100644 index 0000000000..73912910e5 --- /dev/null +++ b/tests/languages/wolfram/punctuation_feature.test @@ -0,0 +1,18 @@ +{ } [ ] ( ) +, ; . : + +---------------------------------------------------- + +[ + ["punctuation", "{"], + ["punctuation", "}"], + ["punctuation", "["], + ["punctuation", "]"], + ["punctuation", "("], + ["punctuation", ")"], + + ["punctuation", ","], + ["operator", ";"], + ["punctuation", "."], + ["punctuation", ":"] +] From c6574e6b721d593d0c0047305ac852b5de0828b4 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Tue, 5 Oct 2021 23:33:31 +0200 Subject: [PATCH 0956/1100] Maxscript: Fixed booleans not being highlighted (#3134) --- components/prism-maxscript.js | 2 +- components/prism-maxscript.min.js | 2 +- tests/languages/maxscript/boolean_feature.test | 4 +++- tests/languages/maxscript/keyword_feature.test | 4 ---- 4 files changed, 5 insertions(+), 7 deletions(-) diff --git a/components/prism-maxscript.js b/components/prism-maxscript.js index d5e58e009f..0c775aa88a 100644 --- a/components/prism-maxscript.js +++ b/components/prism-maxscript.js @@ -25,7 +25,7 @@ Prism.languages.maxscript = { alias: 'attr-name' }, - 'keyword': /\b(?:about|and|animate|as|at|attributes|by|case|catch|collect|continue|coordsys|do|else|exit|fn|for|from|function|global|if|in|local|macroscript|mapped|max|not|of|off|on|or|parameters|persistent|plugin|rcmenu|return|rollout|set|struct|then|throw|to|tool|try|undo|utility|when|where|while|with)\b/i, + 'keyword': /\b(?:about|and|animate|as|at|attributes|by|case|catch|collect|continue|coordsys|do|else|exit|fn|for|from|function|global|if|in|local|macroscript|mapped|max|not|of|or|parameters|persistent|plugin|rcmenu|return|rollout|set|struct|then|throw|to|tool|try|undo|utility|when|where|while|with)\b/i, 'boolean': /\b(?:false|off|on|true)\b/, 'time': { diff --git a/components/prism-maxscript.min.js b/components/prism-maxscript.min.js index 7502744b1c..4716930cf5 100644 --- a/components/prism-maxscript.min.js +++ b/components/prism-maxscript.min.js @@ -1 +1 @@ -Prism.languages.maxscript={comment:{pattern:/\/\*[\s\S]*?(?:\*\/|$)|--.*/,greedy:!0},string:{pattern:/(^|[^"\\@])(?:"(?:[^"\\]|\\[\s\S])*"|@"[^"]*")/,lookbehind:!0,greedy:!0},path:{pattern:/\$(?:[\w/\\.*?]|'[^']*')*/,greedy:!0,alias:"string"},"function-definition":{pattern:/(\b(?:fn|function)\s+)\w+\b/,lookbehind:!0,alias:"function"},argument:{pattern:/\b[a-z_]\w*(?=:)/i,alias:"attr-name"},keyword:/\b(?:about|and|animate|as|at|attributes|by|case|catch|collect|continue|coordsys|do|else|exit|fn|for|from|function|global|if|in|local|macroscript|mapped|max|not|of|off|on|or|parameters|persistent|plugin|rcmenu|return|rollout|set|struct|then|throw|to|tool|try|undo|utility|when|where|while|with)\b/i,boolean:/\b(?:false|off|on|true)\b/,time:{pattern:/(^|[^\w.])(?:(?:(?:\d+(?:\.\d*)?|\.\d+)(?:[eEdD][+-]\d+|[LP])?[msft])+|\d+:\d+(?:\.\d*)?)(?![\w.:])/,lookbehind:!0,alias:"number"},number:[{pattern:/(^|[^\w.])(?:(?:\d+(?:\.\d*)?|\.\d+)(?:[eEdD][+-]\d+|[LP])?|0x[a-fA-F0-9]+)(?![\w.:])/,lookbehind:!0},/\b(?:e|pi)\b/],constant:/\b(?:black|blue|brown|gray|green|orange|red|white|yellow)\b/,color:{pattern:/\b(?:dontcollect|ok|silentValue|undefined|unsupplied)\b/i,alias:"constant"},operator:/[-+*/<>=!]=?|[&^]|#(?!\()/,punctuation:/[()\[\]{}.:,;]|#(?=\()|\\$/m}; \ No newline at end of file +Prism.languages.maxscript={comment:{pattern:/\/\*[\s\S]*?(?:\*\/|$)|--.*/,greedy:!0},string:{pattern:/(^|[^"\\@])(?:"(?:[^"\\]|\\[\s\S])*"|@"[^"]*")/,lookbehind:!0,greedy:!0},path:{pattern:/\$(?:[\w/\\.*?]|'[^']*')*/,greedy:!0,alias:"string"},"function-definition":{pattern:/(\b(?:fn|function)\s+)\w+\b/,lookbehind:!0,alias:"function"},argument:{pattern:/\b[a-z_]\w*(?=:)/i,alias:"attr-name"},keyword:/\b(?:about|and|animate|as|at|attributes|by|case|catch|collect|continue|coordsys|do|else|exit|fn|for|from|function|global|if|in|local|macroscript|mapped|max|not|of|or|parameters|persistent|plugin|rcmenu|return|rollout|set|struct|then|throw|to|tool|try|undo|utility|when|where|while|with)\b/i,boolean:/\b(?:false|off|on|true)\b/,time:{pattern:/(^|[^\w.])(?:(?:(?:\d+(?:\.\d*)?|\.\d+)(?:[eEdD][+-]\d+|[LP])?[msft])+|\d+:\d+(?:\.\d*)?)(?![\w.:])/,lookbehind:!0,alias:"number"},number:[{pattern:/(^|[^\w.])(?:(?:\d+(?:\.\d*)?|\.\d+)(?:[eEdD][+-]\d+|[LP])?|0x[a-fA-F0-9]+)(?![\w.:])/,lookbehind:!0},/\b(?:e|pi)\b/],constant:/\b(?:black|blue|brown|gray|green|orange|red|white|yellow)\b/,color:{pattern:/\b(?:dontcollect|ok|silentValue|undefined|unsupplied)\b/i,alias:"constant"},operator:/[-+*/<>=!]=?|[&^]|#(?!\()/,punctuation:/[()\[\]{}.:,;]|#(?=\()|\\$/m}; \ No newline at end of file diff --git a/tests/languages/maxscript/boolean_feature.test b/tests/languages/maxscript/boolean_feature.test index 6d7dfb5191..42f44fd639 100644 --- a/tests/languages/maxscript/boolean_feature.test +++ b/tests/languages/maxscript/boolean_feature.test @@ -1,7 +1,9 @@ true false +on off ---------------------------------------------------- [ - ["boolean", "true"], ["boolean", "false"] + ["boolean", "true"], ["boolean", "false"], + ["boolean", "on"], ["boolean", "off"] ] diff --git a/tests/languages/maxscript/keyword_feature.test b/tests/languages/maxscript/keyword_feature.test index 200aac37ca..1df37aacac 100644 --- a/tests/languages/maxscript/keyword_feature.test +++ b/tests/languages/maxscript/keyword_feature.test @@ -26,8 +26,6 @@ mapped; max; not; of; -off; -on; or; parameters; persistent; @@ -80,8 +78,6 @@ with; ["keyword", "max"], ["punctuation", ";"], ["keyword", "not"], ["punctuation", ";"], ["keyword", "of"], ["punctuation", ";"], - ["keyword", "off"], ["punctuation", ";"], - ["keyword", "on"], ["punctuation", ";"], ["keyword", "or"], ["punctuation", ";"], ["keyword", "parameters"], ["punctuation", ";"], ["keyword", "persistent"], ["punctuation", ";"], From 05e7ab0457656dfeec5696f184d20da22512d1d7 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Tue, 5 Oct 2021 23:38:00 +0200 Subject: [PATCH 0957/1100] Liquid: Removed unmatchable object variants (#3135) --- components/prism-liquid.js | 2 +- components/prism-liquid.min.js | 2 +- tests/languages/liquid/object_feature.test | 30 ---------------------- 3 files changed, 2 insertions(+), 32 deletions(-) diff --git a/components/prism-liquid.js b/components/prism-liquid.js index b8f27fe455..8b9981a7a6 100644 --- a/components/prism-liquid.js +++ b/components/prism-liquid.js @@ -12,7 +12,7 @@ Prism.languages.liquid = { greedy: true }, 'keyword': /\b(?:as|assign|break|(?:end)?(?:capture|case|comment|for|form|if|paginate|raw|style|tablerow|unless)|continue|cycle|decrement|echo|else|elsif|in|include|increment|limit|liquid|offset|range|render|reversed|section|when|with)\b/, - 'object': /\b(?:address|all_country_option_tags|article|block|blog|cart|checkout|collection|color|comment|country|country_option_tags|currency|current_page|current_tags|customer|customer_address|date|discount_allocation|discount_application|external_video|filter|filter_value|font|forloop|form|fulfillment|generic_file|gift_card|group|handle|image|line_item|link|linklist|localization|location|measurement|media|metafield|model|model_source|order|page|page_description|page_image|page_title|paginate|part|policy|product|product_option|recommendations|request|robots|routes|rule|script|search|section|selling_plan|selling_plan_allocation|selling_plan_group|shipping_method|shop|shop_locale|sitemap|store_availability|tablerow|tax_line|template|theme|transaction|unit_price_measurement|user_agent|variant|video|video_source)\b/, + 'object': /\b(?:address|all_country_option_tags|article|block|blog|cart|checkout|collection|color|country|country_option_tags|currency|current_page|current_tags|customer|customer_address|date|discount_allocation|discount_application|external_video|filter|filter_value|font|forloop|fulfillment|generic_file|gift_card|group|handle|image|line_item|link|linklist|localization|location|measurement|media|metafield|model|model_source|order|page|page_description|page_image|page_title|part|policy|product|product_option|recommendations|request|robots|routes|rule|script|search|selling_plan|selling_plan_allocation|selling_plan_group|shipping_method|shop|shop_locale|sitemap|store_availability|tax_line|template|theme|transaction|unit_price_measurement|user_agent|variant|video|video_source)\b/, 'function': [ { pattern: /(\|\s*)\w+/, diff --git a/components/prism-liquid.min.js b/components/prism-liquid.min.js index 98b04aeba6..a405414fac 100644 --- a/components/prism-liquid.min.js +++ b/components/prism-liquid.min.js @@ -1 +1 @@ -Prism.languages.liquid={comment:{pattern:/(^\{%\s*comment\s*%\})[\s\S]+(?=\{%\s*endcomment\s*%\}$)/,lookbehind:!0},delimiter:{pattern:/^\{(?:\{\{|[%\{])-?|-?(?:\}\}|[%\}])\}$/,alias:"punctuation"},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},keyword:/\b(?:as|assign|break|(?:end)?(?:capture|case|comment|for|form|if|paginate|raw|style|tablerow|unless)|continue|cycle|decrement|echo|else|elsif|in|include|increment|limit|liquid|offset|range|render|reversed|section|when|with)\b/,object:/\b(?:address|all_country_option_tags|article|block|blog|cart|checkout|collection|color|comment|country|country_option_tags|currency|current_page|current_tags|customer|customer_address|date|discount_allocation|discount_application|external_video|filter|filter_value|font|forloop|form|fulfillment|generic_file|gift_card|group|handle|image|line_item|link|linklist|localization|location|measurement|media|metafield|model|model_source|order|page|page_description|page_image|page_title|paginate|part|policy|product|product_option|recommendations|request|robots|routes|rule|script|search|section|selling_plan|selling_plan_allocation|selling_plan_group|shipping_method|shop|shop_locale|sitemap|store_availability|tablerow|tax_line|template|theme|transaction|unit_price_measurement|user_agent|variant|video|video_source)\b/,function:[{pattern:/(\|\s*)\w+/,lookbehind:!0,alias:"filter"},{pattern:/(\.\s*)(?:first|last|size)/,lookbehind:!0}],boolean:/\b(?:false|nil|true)\b/,range:{pattern:/\.\./,alias:"operator"},number:/\b\d+(?:\.\d+)?\b/,operator:/[!=]=|<>|[<>]=?|[|?:=-]|\b(?:and|contains(?=\s)|or)\b/,punctuation:/[.,\[\]()]/,empty:{pattern:/\bempty\b/,alias:"keyword"}},Prism.hooks.add("before-tokenize",function(e){var a=!1;Prism.languages["markup-templating"].buildPlaceholders(e,"liquid",/\{%\s*comment\s*%\}[\s\S]*?\{%\s*endcomment\s*%\}|\{(?:%[\s\S]*?%|\{\{[\s\S]*?\}\}|\{[\s\S]*?\})\}/g,function(e){var t=/^\{%-?\s*(\w+)/.exec(e);if(t){var n=t[1];if("raw"===n&&!a)return a=!0;if("endraw"===n)return!(a=!1)}return!a})}),Prism.hooks.add("after-tokenize",function(e){Prism.languages["markup-templating"].tokenizePlaceholders(e,"liquid")}); \ No newline at end of file +Prism.languages.liquid={comment:{pattern:/(^\{%\s*comment\s*%\})[\s\S]+(?=\{%\s*endcomment\s*%\}$)/,lookbehind:!0},delimiter:{pattern:/^\{(?:\{\{|[%\{])-?|-?(?:\}\}|[%\}])\}$/,alias:"punctuation"},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},keyword:/\b(?:as|assign|break|(?:end)?(?:capture|case|comment|for|form|if|paginate|raw|style|tablerow|unless)|continue|cycle|decrement|echo|else|elsif|in|include|increment|limit|liquid|offset|range|render|reversed|section|when|with)\b/,object:/\b(?:address|all_country_option_tags|article|block|blog|cart|checkout|collection|color|country|country_option_tags|currency|current_page|current_tags|customer|customer_address|date|discount_allocation|discount_application|external_video|filter|filter_value|font|forloop|fulfillment|generic_file|gift_card|group|handle|image|line_item|link|linklist|localization|location|measurement|media|metafield|model|model_source|order|page|page_description|page_image|page_title|part|policy|product|product_option|recommendations|request|robots|routes|rule|script|search|selling_plan|selling_plan_allocation|selling_plan_group|shipping_method|shop|shop_locale|sitemap|store_availability|tax_line|template|theme|transaction|unit_price_measurement|user_agent|variant|video|video_source)\b/,function:[{pattern:/(\|\s*)\w+/,lookbehind:!0,alias:"filter"},{pattern:/(\.\s*)(?:first|last|size)/,lookbehind:!0}],boolean:/\b(?:false|nil|true)\b/,range:{pattern:/\.\./,alias:"operator"},number:/\b\d+(?:\.\d+)?\b/,operator:/[!=]=|<>|[<>]=?|[|?:=-]|\b(?:and|contains(?=\s)|or)\b/,punctuation:/[.,\[\]()]/,empty:{pattern:/\bempty\b/,alias:"keyword"}},Prism.hooks.add("before-tokenize",function(e){var i=!1;Prism.languages["markup-templating"].buildPlaceholders(e,"liquid",/\{%\s*comment\s*%\}[\s\S]*?\{%\s*endcomment\s*%\}|\{(?:%[\s\S]*?%|\{\{[\s\S]*?\}\}|\{[\s\S]*?\})\}/g,function(e){var t=/^\{%-?\s*(\w+)/.exec(e);if(t){var n=t[1];if("raw"===n&&!i)return i=!0;if("endraw"===n)return!(i=!1)}return!i})}),Prism.hooks.add("after-tokenize",function(e){Prism.languages["markup-templating"].tokenizePlaceholders(e,"liquid")}); \ No newline at end of file diff --git a/tests/languages/liquid/object_feature.test b/tests/languages/liquid/object_feature.test index 441e8edc5d..b2af4d4673 100644 --- a/tests/languages/liquid/object_feature.test +++ b/tests/languages/liquid/object_feature.test @@ -7,7 +7,6 @@ {{ checkout }} {{ collection }} {{ color }} -{{ comment }} {{ country }} {{ country_option_tags }} {{ currency }} @@ -23,7 +22,6 @@ {{ filter_value }} {{ font }} {{ forloop }} -{{ form }} {{ fulfillment }} {{ generic_file }} {{ gift_card }} @@ -45,7 +43,6 @@ {{ page_description }} {{ page_image }} {{ page_title }} -{{ paginate }} {{ part }} {{ policy }} {{ product }} @@ -57,7 +54,6 @@ {{ rule }} {{ script }} {{ search }} -{{ section }} {{ selling_plan }} {{ selling_plan_allocation }} {{ selling_plan_group }} @@ -66,7 +62,6 @@ {{ shop_locale }} {{ sitemap }} {{ store_availability }} -{{ tablerow }} {{ tax_line }} {{ template }} {{ theme }} @@ -125,11 +120,6 @@ ["object", "color"], ["delimiter", "}}"] ]], - ["liquid", [ - ["delimiter", "{{"], - ["keyword", "comment"], - ["delimiter", "}}"] - ]], ["liquid", [ ["delimiter", "{{"], ["object", "country"], @@ -205,11 +195,6 @@ ["object", "forloop"], ["delimiter", "}}"] ]], - ["liquid", [ - ["delimiter", "{{"], - ["keyword", "form"], - ["delimiter", "}}"] - ]], ["liquid", [ ["delimiter", "{{"], ["object", "fulfillment"], @@ -315,11 +300,6 @@ ["object", "page_title"], ["delimiter", "}}"] ]], - ["liquid", [ - ["delimiter", "{{"], - ["keyword", "paginate"], - ["delimiter", "}}"] - ]], ["liquid", [ ["delimiter", "{{"], ["object", "part"], @@ -375,11 +355,6 @@ ["object", "search"], ["delimiter", "}}"] ]], - ["liquid", [ - ["delimiter", "{{"], - ["keyword", "section"], - ["delimiter", "}}"] - ]], ["liquid", [ ["delimiter", "{{"], ["object", "selling_plan"], @@ -420,11 +395,6 @@ ["object", "store_availability"], ["delimiter", "}}"] ]], - ["liquid", [ - ["delimiter", "{{"], - ["keyword", "tablerow"], - ["delimiter", "}}"] - ]], ["liquid", [ ["delimiter", "{{"], ["object", "tax_line"], From 8494519ee133cf6be8eab4875b5a51a80737dcd8 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Tue, 5 Oct 2021 23:43:54 +0200 Subject: [PATCH 0958/1100] GraphQl: Optimized regexes (#3136) --- components/prism-graphql.js | 4 ++-- components/prism-graphql.min.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/components/prism-graphql.js b/components/prism-graphql.js index e7b009b96a..988f4e606a 100644 --- a/components/prism-graphql.js +++ b/components/prism-graphql.js @@ -24,11 +24,11 @@ Prism.languages.graphql = { alias: 'function' }, 'attr-name': { - pattern: /[a-z_]\w*(?=\s*(?:\((?:[^()"]|"(?:\\.|[^\\"\r\n])*")*\))?:)/i, + pattern: /\b[a-z_]\w*(?=\s*(?:\((?:[^()"]|"(?:\\.|[^\\"\r\n])*")*\))?:)/i, greedy: true }, 'atom-input': { - pattern: /[A-Z]\w*Input(?=!?.*$)/m, + pattern: /\b[A-Z]\w*Input\b/, alias: 'class-name' }, 'scalar': /\b(?:Boolean|Float|ID|Int|String)\b/, diff --git a/components/prism-graphql.min.js b/components/prism-graphql.min.js index e20dbd9b5b..b60589c308 100644 --- a/components/prism-graphql.min.js +++ b/components/prism-graphql.min.js @@ -1 +1 @@ -Prism.languages.graphql={comment:/#.*/,description:{pattern:/(?:"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*")(?=\s*[a-z_])/i,greedy:!0,alias:"string",inside:{"language-markdown":{pattern:/(^"(?:"")?)(?!\1)[\s\S]+(?=\1$)/,lookbehind:!0,inside:Prism.languages.markdown}}},string:{pattern:/"""(?:[^"]|(?!""")")*"""|"(?:\\.|[^\\"\r\n])*"/,greedy:!0},number:/(?:\B-|\b)\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,boolean:/\b(?:false|true)\b/,variable:/\$[a-z_]\w*/i,directive:{pattern:/@[a-z_]\w*/i,alias:"function"},"attr-name":{pattern:/[a-z_]\w*(?=\s*(?:\((?:[^()"]|"(?:\\.|[^\\"\r\n])*")*\))?:)/i,greedy:!0},"atom-input":{pattern:/[A-Z]\w*Input(?=!?.*$)/m,alias:"class-name"},scalar:/\b(?:Boolean|Float|ID|Int|String)\b/,constant:/\b[A-Z][A-Z_\d]*\b/,"class-name":{pattern:/(\b(?:enum|implements|interface|on|scalar|type|union)\s+|&\s*|:\s*|\[)[A-Z_]\w*/,lookbehind:!0},fragment:{pattern:/(\bfragment\s+|\.{3}\s*(?!on\b))[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-mutation":{pattern:/(\bmutation\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},"definition-query":{pattern:/(\bquery\s+)[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},keyword:/\b(?:directive|enum|extend|fragment|implements|input|interface|mutation|on|query|repeatable|scalar|schema|subscription|type|union)\b/,operator:/[!=|&]|\.{3}/,"property-query":/\w+(?=\s*\()/,object:/\w+(?=\s*\{)/,punctuation:/[!(){}\[\]:=,]/,property:/\w+/},Prism.hooks.add("after-tokenize",function(n){if("graphql"===n.language)for(var o=n.tokens.filter(function(n){return"string"!=typeof n&&"comment"!==n.type&&"scalar"!==n.type}),s=0;s Date: Tue, 5 Oct 2021 23:51:30 +0200 Subject: [PATCH 0959/1100] Added even more language tests (#3137) --- tests/languages/bicep/property_feature.test | 23 +++++++++ tests/languages/clojure/string_feature.test | 4 +- .../gn/builtin-function_feature.test | 49 +++++++++++++++++++ tests/languages/gn/constant_feature.test | 31 ++++++++++++ tests/languages/gn/keyword_feature.test | 9 ++++ .../languages/graphql/atom-input_feature.test | 7 +++ tests/languages/graphql/mutation_feature.test | 10 ++++ tests/languages/graphql/scalar_feature.test | 15 ++++++ .../control-flow_feature.test | 35 +++++++++++++ .../exports_feature.test | 26 +++++++++- .../javascript!+js-extras/nil_feature.test | 9 ++++ tests/languages/magma/shell_feature.test | 9 ++++ tests/languages/tremor/function_feature.test | 9 ++++ tests/languages/wolfram/black_feature.test | 9 ++++ tests/languages/wolfram/context_feature.test | 9 ++++ tests/languages/wolfram/keyword_feature.test | 41 ++++++++++++++++ tests/languages/wren/constant_feature.test | 7 +++ 17 files changed, 299 insertions(+), 3 deletions(-) create mode 100644 tests/languages/bicep/property_feature.test create mode 100644 tests/languages/gn/builtin-function_feature.test create mode 100644 tests/languages/gn/constant_feature.test create mode 100644 tests/languages/gn/keyword_feature.test create mode 100644 tests/languages/graphql/atom-input_feature.test create mode 100644 tests/languages/graphql/mutation_feature.test create mode 100644 tests/languages/graphql/scalar_feature.test create mode 100644 tests/languages/javascript!+js-extras/control-flow_feature.test create mode 100644 tests/languages/javascript!+js-extras/nil_feature.test create mode 100644 tests/languages/magma/shell_feature.test create mode 100644 tests/languages/tremor/function_feature.test create mode 100644 tests/languages/wolfram/black_feature.test create mode 100644 tests/languages/wolfram/context_feature.test create mode 100644 tests/languages/wolfram/keyword_feature.test create mode 100644 tests/languages/wren/constant_feature.test diff --git a/tests/languages/bicep/property_feature.test b/tests/languages/bicep/property_feature.test new file mode 100644 index 0000000000..4bb02cdde2 --- /dev/null +++ b/tests/languages/bicep/property_feature.test @@ -0,0 +1,23 @@ +var myObjWithSpecialChars = { + '$special\tchars!': true + normalKey: 'val' +} + +---------------------------------------------------- + +[ + ["keyword", "var"], + " myObjWithSpecialChars ", + ["operator", "="], + ["punctuation", "{"], + + ["property", "'$special\\tchars!'"], + ["operator", ":"], + ["boolean", "true"], + + ["property", "normalKey"], + ["operator", ":"], + ["string", "'val'"], + + ["punctuation", "}"] +] diff --git a/tests/languages/clojure/string_feature.test b/tests/languages/clojure/string_feature.test index 03738e8cb7..e715134cf0 100644 --- a/tests/languages/clojure/string_feature.test +++ b/tests/languages/clojure/string_feature.test @@ -2,13 +2,15 @@ "Fo\"obar" "multi-line string" +\NewLine ---------------------------------------------------- [ ["string", "\"\""], ["string", "\"Fo\\\"obar\""], - ["string", "\"multi-line\r\nstring\""] + ["string", "\"multi-line\r\nstring\""], + ["string", "\\NewLine"] ] ---------------------------------------------------- diff --git a/tests/languages/gn/builtin-function_feature.test b/tests/languages/gn/builtin-function_feature.test new file mode 100644 index 0000000000..f167f9aeec --- /dev/null +++ b/tests/languages/gn/builtin-function_feature.test @@ -0,0 +1,49 @@ +assert() +defined() +foreach() +import() +pool() +print() +template() +tool() +toolchain() + +---------------------------------------------------- + +[ + ["builtin-function", "assert"], + ["punctuation", "("], + ["punctuation", ")"], + + ["builtin-function", "defined"], + ["punctuation", "("], + ["punctuation", ")"], + + ["builtin-function", "foreach"], + ["punctuation", "("], + ["punctuation", ")"], + + ["builtin-function", "import"], + ["punctuation", "("], + ["punctuation", ")"], + + ["builtin-function", "pool"], + ["punctuation", "("], + ["punctuation", ")"], + + ["builtin-function", "print"], + ["punctuation", "("], + ["punctuation", ")"], + + ["builtin-function", "template"], + ["punctuation", "("], + ["punctuation", ")"], + + ["builtin-function", "tool"], + ["punctuation", "("], + ["punctuation", ")"], + + ["builtin-function", "toolchain"], + ["punctuation", "("], + ["punctuation", ")"] +] diff --git a/tests/languages/gn/constant_feature.test b/tests/languages/gn/constant_feature.test new file mode 100644 index 0000000000..0992f0378f --- /dev/null +++ b/tests/languages/gn/constant_feature.test @@ -0,0 +1,31 @@ +current_cpu +current_os +current_toolchain +default_toolchain +host_cpu +host_os +root_build_dir +root_gen_dir +root_out_dir +target_cpu +target_gen_dir +target_os +target_out_dir + +---------------------------------------------------- + +[ + ["constant", "current_cpu"], + ["constant", "current_os"], + ["constant", "current_toolchain"], + ["constant", "default_toolchain"], + ["constant", "host_cpu"], + ["constant", "host_os"], + ["constant", "root_build_dir"], + ["constant", "root_gen_dir"], + ["constant", "root_out_dir"], + ["constant", "target_cpu"], + ["constant", "target_gen_dir"], + ["constant", "target_os"], + ["constant", "target_out_dir"] +] diff --git a/tests/languages/gn/keyword_feature.test b/tests/languages/gn/keyword_feature.test new file mode 100644 index 0000000000..8eaf16e7ff --- /dev/null +++ b/tests/languages/gn/keyword_feature.test @@ -0,0 +1,9 @@ +if +else + +---------------------------------------------------- + +[ + ["keyword", "if"], + ["keyword", "else"] +] diff --git a/tests/languages/graphql/atom-input_feature.test b/tests/languages/graphql/atom-input_feature.test new file mode 100644 index 0000000000..aae416211f --- /dev/null +++ b/tests/languages/graphql/atom-input_feature.test @@ -0,0 +1,7 @@ +FooInput + +---------------------------------------------------- + +[ + ["atom-input", "FooInput"] +] diff --git a/tests/languages/graphql/mutation_feature.test b/tests/languages/graphql/mutation_feature.test new file mode 100644 index 0000000000..658a9c0ff8 --- /dev/null +++ b/tests/languages/graphql/mutation_feature.test @@ -0,0 +1,10 @@ +mutation foo {} + +---------------------------------------------------- + +[ + ["keyword", "mutation"], + ["definition-mutation", "foo"], + ["punctuation", "{"], + ["punctuation", "}"] +] diff --git a/tests/languages/graphql/scalar_feature.test b/tests/languages/graphql/scalar_feature.test new file mode 100644 index 0000000000..3a4f400ac4 --- /dev/null +++ b/tests/languages/graphql/scalar_feature.test @@ -0,0 +1,15 @@ +Boolean +Float +ID +Int +String + +---------------------------------------------------- + +[ + ["scalar", "Boolean"], + ["scalar", "Float"], + ["scalar", "ID"], + ["scalar", "Int"], + ["scalar", "String"] +] diff --git a/tests/languages/javascript!+js-extras/control-flow_feature.test b/tests/languages/javascript!+js-extras/control-flow_feature.test new file mode 100644 index 0000000000..7dd9d4683d --- /dev/null +++ b/tests/languages/javascript!+js-extras/control-flow_feature.test @@ -0,0 +1,35 @@ +await +break +catch +continue +do +else +finally +for +if +return +switch +throw +try +while +yield + +---------------------------------------------------- + +[ + ["keyword", "await"], + ["keyword", "break"], + ["keyword", "catch"], + ["keyword", "continue"], + ["keyword", "do"], + ["keyword", "else"], + ["keyword", "finally"], + ["keyword", "for"], + ["keyword", "if"], + ["keyword", "return"], + ["keyword", "switch"], + ["keyword", "throw"], + ["keyword", "try"], + ["keyword", "while"], + ["keyword", "yield"] +] diff --git a/tests/languages/javascript!+js-extras/exports_feature.test b/tests/languages/javascript!+js-extras/exports_feature.test index 67b7647bbb..4c7aa50c4f 100644 --- a/tests/languages/javascript!+js-extras/exports_feature.test +++ b/tests/languages/javascript!+js-extras/exports_feature.test @@ -12,6 +12,7 @@ export {d} export {d,} export {d as Foo, b as Bar} export {d as Foo, b as Bar,} +export default function() { } ---------------------------------------------------- @@ -23,6 +24,7 @@ export {d as Foo, b as Bar,} ["keyword", "from"], ["string", "\"mod\""], ["punctuation", ";"], + ["keyword", "export"], ["exports", [ ["operator", "*"], @@ -32,6 +34,7 @@ export {d as Foo, b as Bar,} ["keyword", "from"], ["string", "\"mod\""], ["punctuation", ";"], + ["keyword", "export"], ["exports", [ ["punctuation", "{"], @@ -40,6 +43,7 @@ export {d as Foo, b as Bar,} ["keyword", "from"], ["string", "\"mod\""], ["punctuation", ";"], + ["keyword", "export"], ["exports", [ ["punctuation", "{"], @@ -49,6 +53,7 @@ export {d as Foo, b as Bar,} ["keyword", "from"], ["string", "\"mod\""], ["punctuation", ";"], + ["keyword", "export"], ["exports", [ ["punctuation", "{"], @@ -58,6 +63,7 @@ export {d as Foo, b as Bar,} ["keyword", "from"], ["string", "\"mod\""], ["punctuation", ";"], + ["keyword", "export"], ["exports", [ ["punctuation", "{"], @@ -68,6 +74,7 @@ export {d as Foo, b as Bar,} ["keyword", "from"], ["string", "\"mod\""], ["punctuation", ";"], + ["keyword", "export"], ["exports", [ ["punctuation", "{"], @@ -83,6 +90,7 @@ export {d as Foo, b as Bar,} ["keyword", "from"], ["string", "\"mod\""], ["punctuation", ";"], + ["keyword", "export"], ["exports", [ ["punctuation", "{"], @@ -99,23 +107,27 @@ export {d as Foo, b as Bar,} ["keyword", "from"], ["string", "\"mod\""], ["punctuation", ";"], + ["keyword", "export"], ["exports", [ ["punctuation", "{"], ["punctuation", "}"] ]], + ["keyword", "export"], ["exports", [ ["punctuation", "{"], "x", ["punctuation", "}"] ]], + ["keyword", "export"], ["exports", [ ["punctuation", "{"], "d", ["punctuation", "}"] ]], + ["keyword", "export"], ["exports", [ ["punctuation", "{"], @@ -123,6 +135,7 @@ export {d as Foo, b as Bar,} ["punctuation", ","], ["punctuation", "}"] ]], + ["keyword", "export"], ["exports", [ ["punctuation", "{"], @@ -135,6 +148,7 @@ export {d as Foo, b as Bar,} ["maybe-class-name", "Bar"], ["punctuation", "}"] ]], + ["keyword", "export"], ["exports", [ ["punctuation", "{"], @@ -147,5 +161,13 @@ export {d as Foo, b as Bar,} ["maybe-class-name", "Bar"], ["punctuation", ","], ["punctuation", "}"] - ]] -] \ No newline at end of file + ]], + + ["keyword", "export"], + ["keyword", "default"], + ["keyword", "function"], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", "{"], + ["punctuation", "}"] +] diff --git a/tests/languages/javascript!+js-extras/nil_feature.test b/tests/languages/javascript!+js-extras/nil_feature.test new file mode 100644 index 0000000000..e5dded24a4 --- /dev/null +++ b/tests/languages/javascript!+js-extras/nil_feature.test @@ -0,0 +1,9 @@ +null +undefined + +---------------------------------------------------- + +[ + ["keyword", "null"], + ["keyword", "undefined"] +] diff --git a/tests/languages/magma/shell_feature.test b/tests/languages/magma/shell_feature.test new file mode 100644 index 0000000000..2ef308c6f5 --- /dev/null +++ b/tests/languages/magma/shell_feature.test @@ -0,0 +1,9 @@ +> 1 +1 + +---------------------------------------------------- + +[ + ["punctuation", ">"], ["number", "1"], + ["output", "1"] +] diff --git a/tests/languages/tremor/function_feature.test b/tests/languages/tremor/function_feature.test new file mode 100644 index 0000000000..896990e8e7 --- /dev/null +++ b/tests/languages/tremor/function_feature.test @@ -0,0 +1,9 @@ +foo() + +---------------------------------------------------- + +[ + ["function", "foo"], + ["punctuation", "("], + ["punctuation", ")"] +] diff --git a/tests/languages/wolfram/black_feature.test b/tests/languages/wolfram/black_feature.test new file mode 100644 index 0000000000..33d87d5ed2 --- /dev/null +++ b/tests/languages/wolfram/black_feature.test @@ -0,0 +1,9 @@ +__ +x__ + +---------------------------------------------------- + +[ + ["blank", "__"], + ["blank", "x__"] +] diff --git a/tests/languages/wolfram/context_feature.test b/tests/languages/wolfram/context_feature.test new file mode 100644 index 0000000000..871beb18c9 --- /dev/null +++ b/tests/languages/wolfram/context_feature.test @@ -0,0 +1,9 @@ +Global` +System`Foo + +---------------------------------------------------- + +[ + ["context", "Global`"], + ["context", "System`Foo"] +] diff --git a/tests/languages/wolfram/keyword_feature.test b/tests/languages/wolfram/keyword_feature.test new file mode 100644 index 0000000000..88144e0799 --- /dev/null +++ b/tests/languages/wolfram/keyword_feature.test @@ -0,0 +1,41 @@ +Abs +AbsArg +Accuracy +Block +Do +For +Function +If +Manipulate +Module +Nest +NestList +None +Return +Switch +Table +Which +While + +---------------------------------------------------- + +[ + ["keyword", "Abs"], + ["keyword", "AbsArg"], + ["keyword", "Accuracy"], + ["keyword", "Block"], + ["keyword", "Do"], + ["keyword", "For"], + ["keyword", "Function"], + ["keyword", "If"], + ["keyword", "Manipulate"], + ["keyword", "Module"], + ["keyword", "Nest"], + ["keyword", "NestList"], + ["keyword", "None"], + ["keyword", "Return"], + ["keyword", "Switch"], + ["keyword", "Table"], + ["keyword", "Which"], + ["keyword", "While"] +] diff --git a/tests/languages/wren/constant_feature.test b/tests/languages/wren/constant_feature.test new file mode 100644 index 0000000000..49adc66704 --- /dev/null +++ b/tests/languages/wren/constant_feature.test @@ -0,0 +1,7 @@ +FOO + +---------------------------------------------------- + +[ + ["constant", "FOO"] +] From 3f24dc727b3e186b6ad6ef651812a15f8cd8fc04 Mon Sep 17 00:00:00 2001 From: Wei Ting <59229084+hoonweiting@users.noreply.github.com> Date: Fri, 8 Oct 2021 01:27:12 +0800 Subject: [PATCH 0960/1100] Python: Add `match` and `case` (soft) keywords (#3142) --- components/prism-python.js | 2 +- components/prism-python.min.js | 2 +- tests/languages/python/keyword_feature.test | 6 ++++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/components/prism-python.js b/components/prism-python.js index 0dba9bbc91..d11dd9adaa 100644 --- a/components/prism-python.js +++ b/components/prism-python.js @@ -51,7 +51,7 @@ Prism.languages.python = { 'punctuation': /\./ } }, - 'keyword': /\b(?:and|as|assert|async|await|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/, + 'keyword': /\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/, 'builtin': /\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/, 'boolean': /\b(?:False|None|True)\b/, 'number': /\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i, diff --git a/components/prism-python.min.js b/components/prism-python.min.js index 9b7cbee9e3..fb2230ef8b 100644 --- a/components/prism-python.min.js +++ b/components/prism-python.min.js @@ -1 +1 @@ -Prism.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/im,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:and|as|assert|async|await|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},Prism.languages.python["string-interpolation"].inside.interpolation.inside.rest=Prism.languages.python,Prism.languages.py=Prism.languages.python; \ No newline at end of file +Prism.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/im,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},Prism.languages.python["string-interpolation"].inside.interpolation.inside.rest=Prism.languages.python,Prism.languages.py=Prism.languages.python; \ No newline at end of file diff --git a/tests/languages/python/keyword_feature.test b/tests/languages/python/keyword_feature.test index 56685da88e..faf1dc04aa 100644 --- a/tests/languages/python/keyword_feature.test +++ b/tests/languages/python/keyword_feature.test @@ -9,6 +9,7 @@ pass print raise return try while with yield nonlocal and not or +match case _: ---------------------------------------------------- @@ -23,9 +24,10 @@ and not or ["keyword", "pass"], ["keyword", "print"], ["keyword", "raise"], ["keyword", "return"], ["keyword", "try"], ["keyword", "while"], ["keyword", "with"], ["keyword", "yield"], ["keyword", "nonlocal"], - ["keyword", "and"], ["keyword", "not"], ["keyword", "or"] + ["keyword", "and"], ["keyword", "not"], ["keyword", "or"], + ["keyword", "match"], ["keyword", "case"], ["keyword", "_"], ["punctuation", ":"] ] ---------------------------------------------------- -Checks for all keywords. \ No newline at end of file +Checks for all keywords. From 3b2238fa8ffd81f25e638468d0260045a72b9bfd Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Sun, 10 Oct 2021 19:36:58 +0200 Subject: [PATCH 0961/1100] JS: Added properties (#3099) --- components/prism-actionscript.js | 4 + components/prism-actionscript.min.js | 2 +- components/prism-javascript.js | 14 + components/prism-javascript.min.js | 2 +- components/prism-tsx.js | 1 + components/prism-tsx.min.js | 2 +- components/prism-typescript.js | 1 + components/prism-typescript.min.js | 2 +- prism.js | 14 + .../languages/javascript+http/issue2733.test | 26 +- .../javascript/class-method_feature.test | 4 +- .../javascript/function-variable_feature.test | 29 +- .../javascript/function_feature.test | 77 +++- .../languages/javascript/keyword_feature.test | 2 +- .../javascript/property_feature.test | 159 +++++++ .../javascript/template-string_feature.test | 12 +- tests/languages/jsx/issue1235.test | 2 +- tests/languages/jsx/issue1335.test | 38 +- tests/languages/jsx/issue1408.test | 6 +- tests/languages/mongodb/document_feature.test | 402 ++++++++---------- tests/languages/pug/tag_feature.test | 45 +- 21 files changed, 527 insertions(+), 317 deletions(-) create mode 100644 tests/languages/javascript/property_feature.test diff --git a/components/prism-actionscript.js b/components/prism-actionscript.js index 6d91121632..72a4d232be 100644 --- a/components/prism-actionscript.js +++ b/components/prism-actionscript.js @@ -4,6 +4,10 @@ Prism.languages.actionscript = Prism.languages.extend('javascript', { }); Prism.languages.actionscript['class-name'].alias = 'function'; +// doesn't work with AS because AS is too complex +delete Prism.languages.actionscript['parameter']; +delete Prism.languages.actionscript['literal-property']; + if (Prism.languages.markup) { Prism.languages.insertBefore('actionscript', 'string', { 'xml': { diff --git a/components/prism-actionscript.min.js b/components/prism-actionscript.min.js index 187430b78d..30844f1fa8 100644 --- a/components/prism-actionscript.min.js +++ b/components/prism-actionscript.min.js @@ -1 +1 @@ -Prism.languages.actionscript=Prism.languages.extend("javascript",{keyword:/\b(?:as|break|case|catch|class|const|default|delete|do|dynamic|each|else|extends|final|finally|for|function|get|if|implements|import|in|include|instanceof|interface|internal|is|namespace|native|new|null|override|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|use|var|void|while|with)\b/,operator:/\+\+|--|(?:[+\-*\/%^]|&&?|\|\|?|<>?>?|[!=]=?)=?|[~?@]/}),Prism.languages.actionscript["class-name"].alias="function",Prism.languages.markup&&Prism.languages.insertBefore("actionscript","string",{xml:{pattern:/(^|[^.])<\/?\w+(?:\s+[^\s>\/=]+=("|')(?:\\[\s\S]|(?!\2)[^\\])*\2)*\s*\/?>/,lookbehind:!0,inside:Prism.languages.markup}}); \ No newline at end of file +Prism.languages.actionscript=Prism.languages.extend("javascript",{keyword:/\b(?:as|break|case|catch|class|const|default|delete|do|dynamic|each|else|extends|final|finally|for|function|get|if|implements|import|in|include|instanceof|interface|internal|is|namespace|native|new|null|override|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|use|var|void|while|with)\b/,operator:/\+\+|--|(?:[+\-*\/%^]|&&?|\|\|?|<>?>?|[!=]=?)=?|[~?@]/}),Prism.languages.actionscript["class-name"].alias="function",delete Prism.languages.actionscript.parameter,delete Prism.languages.actionscript["literal-property"],Prism.languages.markup&&Prism.languages.insertBefore("actionscript","string",{xml:{pattern:/(^|[^.])<\/?\w+(?:\s+[^\s>\/=]+=("|')(?:\\[\s\S]|(?!\2)[^\\])*\2)*\s*\/?>/,lookbehind:!0,inside:Prism.languages.markup}}); \ No newline at end of file diff --git a/components/prism-javascript.js b/components/prism-javascript.js index 9b5f9b8591..9471cbfc93 100644 --- a/components/prism-javascript.js +++ b/components/prism-javascript.js @@ -98,9 +98,23 @@ Prism.languages.insertBefore('javascript', 'string', { }, 'string': /[\s\S]+/ } + }, + 'string-property': { + pattern: /((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m, + lookbehind: true, + greedy: true, + alias: 'property' } }); +Prism.languages.insertBefore('javascript', 'operator', { + 'literal-property': { + pattern: /((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m, + lookbehind: true, + alias: 'property' + }, +}); + if (Prism.languages.markup) { Prism.languages.markup.tag.addInlined('script', 'javascript'); diff --git a/components/prism-javascript.min.js b/components/prism-javascript.min.js index 0e14ff07bd..75b4d33434 100644 --- a/components/prism-javascript.min.js +++ b/components/prism-javascript.min.js @@ -1 +1 @@ -Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:/\b(?:(?:0[xX](?:[\dA-Fa-f](?:_[\dA-Fa-f])?)+|0[bB](?:[01](?:_[01])?)+|0[oO](?:[0-7](?:_[0-7])?)+)n?|(?:\d(?:_\d)?)+n|NaN|Infinity)\b|(?:\b(?:\d(?:_\d)?)+\.?(?:\d(?:_\d)?)*|\B\.(?:\d(?:_\d)?)+)(?:[Ee][+-]?(?:\d(?:_\d)?)+)?/,operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)\/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/,lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:Prism.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),Prism.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}}}),Prism.languages.markup&&(Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.markup.tag.addAttribute("on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)","javascript")),Prism.languages.js=Prism.languages.javascript; \ No newline at end of file +Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:/\b(?:(?:0[xX](?:[\dA-Fa-f](?:_[\dA-Fa-f])?)+|0[bB](?:[01](?:_[01])?)+|0[oO](?:[0-7](?:_[0-7])?)+)n?|(?:\d(?:_\d)?)+n|NaN|Infinity)\b|(?:\b(?:\d(?:_\d)?)+\.?(?:\d(?:_\d)?)*|\B\.(?:\d(?:_\d)?)+)(?:[Ee][+-]?(?:\d(?:_\d)?)+)?/,operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)\/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/,lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:Prism.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),Prism.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),Prism.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),Prism.languages.markup&&(Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.markup.tag.addAttribute("on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)","javascript")),Prism.languages.js=Prism.languages.javascript; \ No newline at end of file diff --git a/components/prism-tsx.js b/components/prism-tsx.js index 2bb2fdc9d6..33b0ec6e1c 100644 --- a/components/prism-tsx.js +++ b/components/prism-tsx.js @@ -4,6 +4,7 @@ // doesn't work with TS because TS is too complex delete Prism.languages.tsx['parameter']; + delete Prism.languages.tsx['literal-property']; // This will prevent collisions between TSX tags and TS generic types. // Idea by https://github.com/karlhorky diff --git a/components/prism-tsx.min.js b/components/prism-tsx.min.js index 79b70fd034..5819dcdd2b 100644 --- a/components/prism-tsx.min.js +++ b/components/prism-tsx.min.js @@ -1 +1 @@ -!function(e){var a=e.util.clone(e.languages.typescript);e.languages.tsx=e.languages.extend("jsx",a),delete e.languages.tsx.parameter;var t=e.languages.tsx.tag;t.pattern=RegExp("(^|[^\\w$]|(?=]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),e.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete e.languages.typescript.parameter;var s=e.languages.extend("typescript",{});delete s["class-name"],e.languages.typescript["class-name"].inside=s,e.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:s}}}}),e.languages.ts=e.languages.typescript}(Prism); \ No newline at end of file +!function(e){e.languages.typescript=e.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),e.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete e.languages.typescript.parameter,delete e.languages.typescript["literal-property"];var s=e.languages.extend("typescript",{});delete s["class-name"],e.languages.typescript["class-name"].inside=s,e.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:s}}}}),e.languages.ts=e.languages.typescript}(Prism); \ No newline at end of file diff --git a/prism.js b/prism.js index 00d8cedf40..41d8ef3af0 100644 --- a/prism.js +++ b/prism.js @@ -1647,9 +1647,23 @@ Prism.languages.insertBefore('javascript', 'string', { }, 'string': /[\s\S]+/ } + }, + 'string-property': { + pattern: /((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m, + lookbehind: true, + greedy: true, + alias: 'property' } }); +Prism.languages.insertBefore('javascript', 'operator', { + 'literal-property': { + pattern: /((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m, + lookbehind: true, + alias: 'property' + }, +}); + if (Prism.languages.markup) { Prism.languages.markup.tag.addInlined('script', 'javascript'); diff --git a/tests/languages/javascript+http/issue2733.test b/tests/languages/javascript+http/issue2733.test index cdd0e2e827..aa07a46d5a 100644 --- a/tests/languages/javascript+http/issue2733.test +++ b/tests/languages/javascript+http/issue2733.test @@ -47,61 +47,61 @@ transfer-encoding: chunked ["application-json", [ ["punctuation", "{"], - ["string", "\"id\""], + ["string-property", "\"id\""], ["operator", ":"], ["number", "1"], ["punctuation", ","], - ["string", "\"name\""], + ["string-property", "\"name\""], ["operator", ":"], ["string", "\"John Doe\""], ["punctuation", ","], - ["string", "\"userName\""], + ["string-property", "\"userName\""], ["operator", ":"], ["string", "\"jdoe\""], ["punctuation", ","], - ["string", "\"email\""], + ["string-property", "\"email\""], ["operator", ":"], ["string", "\"whatever@something.zzz\""], ["punctuation", ","], - ["string", "\"phone\""], + ["string-property", "\"phone\""], ["operator", ":"], ["string", "\"1234567890\""], ["punctuation", ","], - ["string", "\"birthDate\""], + ["string-property", "\"birthDate\""], ["operator", ":"], ["string", "\"1878-05-06\""], ["punctuation", ","], - ["string", "\"address\""], + ["string-property", "\"address\""], ["operator", ":"], ["punctuation", "{"], - ["string", "\"street\""], + ["string-property", "\"street\""], ["operator", ":"], ["string", "\"Fake St\""], ["punctuation", ","], - ["string", "\"street2\""], + ["string-property", "\"street2\""], ["operator", ":"], ["string", "\"Apt. 556\""], ["punctuation", ","], - ["string", "\"city\""], + ["string-property", "\"city\""], ["operator", ":"], ["string", "\"Gwenborough\""], ["punctuation", ","], - ["string", "\"state\""], + ["string-property", "\"state\""], ["operator", ":"], ["string", "\"ZZ\""], ["punctuation", ","], - ["string", "\"zip\""], + ["string-property", "\"zip\""], ["operator", ":"], ["string", "\"12345\""], @@ -109,4 +109,4 @@ transfer-encoding: chunked ["punctuation", "}"] ]] -] \ No newline at end of file +] diff --git a/tests/languages/javascript/class-method_feature.test b/tests/languages/javascript/class-method_feature.test index f2f1e2dedf..31d08e3415 100644 --- a/tests/languages/javascript/class-method_feature.test +++ b/tests/languages/javascript/class-method_feature.test @@ -57,10 +57,10 @@ class Test { ["punctuation", "("], ["parameter", [ ["punctuation", "{"], - " props", + ["literal-property", "props"], ["operator", ":"], ["punctuation", "{"], - " a", + ["literal-property", "a"], ["operator", ":"], " _A", ["punctuation", ","], diff --git a/tests/languages/javascript/function-variable_feature.test b/tests/languages/javascript/function-variable_feature.test index 37d08f9c18..2ebc2a97e5 100644 --- a/tests/languages/javascript/function-variable_feature.test +++ b/tests/languages/javascript/function-variable_feature.test @@ -43,8 +43,8 @@ a = function () {}, b = () => {} ["punctuation", "("], ["punctuation", ")"], ["punctuation", "{"], - ["punctuation","}"], - ["punctuation","}"], + ["punctuation", "}"], + ["punctuation", "}"], ["function-variable", "bar"], ["operator", "="], @@ -52,9 +52,7 @@ a = function () {}, b = () => {} ["keyword", "function"], ["function", "baz"], ["punctuation", "("], - ["parameter", [ - "x" - ]], + ["parameter", ["x"]], ["punctuation", ")"], ["punctuation", "{"], ["punctuation", "}"], @@ -63,18 +61,16 @@ a = function () {}, b = () => {} ["operator", "="], ["keyword", "async"], ["punctuation", "("], - ["parameter", [ - "x" - ]], + ["parameter", ["x"]], ["punctuation", ")"], - ["operator", "=>"], " x\r\n", + ["operator", "=>"], + " x\r\n", ["function-variable", "fooBar"], ["operator", "="], - ["parameter", [ - "x" - ]], - ["operator", "=>"], " x\r\n", + ["parameter", ["x"]], + ["operator", "=>"], + " x\r\n", ["function-variable", "fooBar"], ["operator", "="], @@ -85,7 +81,8 @@ a = function () {}, b = () => {} " y" ]], ["punctuation", ")"], - ["operator", "=>"], " x\r\n", + ["operator", "=>"], + " x\r\n", ["function-variable", "ಠ_ಠ"], ["operator", "="], @@ -118,10 +115,10 @@ a = function () {}, b = () => {} ["punctuation", "("], ["parameter", [ ["punctuation", "{"], - " props", + ["literal-property", "props"], ["operator", ":"], ["punctuation", "{"], - " a", + ["literal-property", "a"], ["operator", ":"], " _A", ["punctuation", ","], diff --git a/tests/languages/javascript/function_feature.test b/tests/languages/javascript/function_feature.test index 3665f673c1..fcd88c97f3 100644 --- a/tests/languages/javascript/function_feature.test +++ b/tests/languages/javascript/function_feature.test @@ -15,19 +15,70 @@ foo({ y: fun() }) ---------------------------------------------------- [ - ["function", "foo"], ["punctuation", "("], ["punctuation", ")"], - ["function", "foo"], ["punctuation", "("], ["punctuation", ")"], - ["function", "foo"], ["punctuation", "."], ["function", "call"], ["punctuation", "("], ["punctuation", ")"], - ["function", "foo_bar"], ["punctuation", "("], ["punctuation", ")"], - ["function", "foo_bar"], ["punctuation", "("], ["punctuation", ")"], - ["function", "f42"], ["punctuation", "("], ["punctuation", ")"], - ["function", "_"], ["punctuation", "("], ["punctuation", ")"], - ["function", "$"], ["punctuation", "("], ["punctuation", ")"], - ["function", "ಠ_ಠ"], ["punctuation", "("], ["punctuation", ")"], - ["function", "Ƞȡ_҇"], ["punctuation", "("], ["punctuation", ")"], - ["keyword", "if"], ["punctuation", "("], "notAFunction", ["punctuation", ")"], - ["function", "foo"], ["punctuation", "("], ["punctuation", "{"], " x ", ["punctuation", "}"], ["punctuation", ")"], - ["function", "foo"], ["punctuation", "("], ["punctuation", "{"], " y", ["operator", ":"], ["function", "fun"], ["punctuation", "("], ["punctuation", ")"], ["punctuation", "}"], ["punctuation", ")"] + ["function", "foo"], + ["punctuation", "("], + ["punctuation", ")"], + + ["function", "foo"], + ["punctuation", "("], + ["punctuation", ")"], + + ["function", "foo"], + ["punctuation", "."], + ["function", "call"], + ["punctuation", "("], + ["punctuation", ")"], + + ["function", "foo_bar"], + ["punctuation", "("], + ["punctuation", ")"], + + ["function", "foo_bar"], + ["punctuation", "("], + ["punctuation", ")"], + + ["function", "f42"], + ["punctuation", "("], + ["punctuation", ")"], + + ["function", "_"], + ["punctuation", "("], + ["punctuation", ")"], + + ["function", "$"], + ["punctuation", "("], + ["punctuation", ")"], + + ["function", "ಠ_ಠ"], + ["punctuation", "("], + ["punctuation", ")"], + + ["function", "Ƞȡ_҇"], + ["punctuation", "("], + ["punctuation", ")"], + + ["keyword", "if"], + ["punctuation", "("], + "notAFunction", + ["punctuation", ")"], + + ["function", "foo"], + ["punctuation", "("], + ["punctuation", "{"], + " x ", + ["punctuation", "}"], + ["punctuation", ")"], + + ["function", "foo"], + ["punctuation", "("], + ["punctuation", "{"], + ["literal-property", "y"], + ["operator", ":"], + ["function", "fun"], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", "}"], + ["punctuation", ")"] ] ---------------------------------------------------- diff --git a/tests/languages/javascript/keyword_feature.test b/tests/languages/javascript/keyword_feature.test index ee4eab02c9..b303733569 100644 --- a/tests/languages/javascript/keyword_feature.test +++ b/tests/languages/javascript/keyword_feature.test @@ -207,7 +207,7 @@ assert.equal(foo, bar); ["string", "\"./foo.json\""], ["keyword", "assert"], ["punctuation", "{"], - " type", + ["literal-property", "type"], ["operator", ":"], ["string", "\"json\""], ["punctuation", "}"], diff --git a/tests/languages/javascript/property_feature.test b/tests/languages/javascript/property_feature.test new file mode 100644 index 0000000000..594cfb4cc2 --- /dev/null +++ b/tests/languages/javascript/property_feature.test @@ -0,0 +1,159 @@ +{ foo: 0, bar: 0 }; +{ 'foo': 0, "bar": 0 }; +{ + // comment + foo: 0, + // comment + "bar": 0 +} + +const test = new TYPE.Application({ + key1: viewDim.x, + key2: viewDim.y, + key3: 0x89ddff, + key4: window.devicePixelRatio || 1, + key5: resize() +}); + +// doesn't conflict with function properties +{ + foo: () => 0, + bar: async function () {} +} + +// no problem with keywords +switch(foo) { + default: return true; +} + +---------------------------------------------------- + +[ + ["punctuation", "{"], + ["literal-property", "foo"], + ["operator", ":"], + ["number", "0"], + ["punctuation", ","], + ["literal-property", "bar"], + ["operator", ":"], + ["number", "0"], + ["punctuation", "}"], + ["punctuation", ";"], + + ["punctuation", "{"], + ["string-property", "'foo'"], + ["operator", ":"], + ["number", "0"], + ["punctuation", ","], + ["string-property", "\"bar\""], + ["operator", ":"], + ["number", "0"], + ["punctuation", "}"], + ["punctuation", ";"], + + ["punctuation", "{"], + + ["comment", "// comment"], + + ["literal-property", "foo"], + ["operator", ":"], + ["number", "0"], + ["punctuation", ","], + + ["comment", "// comment"], + + ["string-property", "\"bar\""], + ["operator", ":"], + ["number", "0"], + + ["punctuation", "}"], + + ["keyword", "const"], + " test ", + ["operator", "="], + ["keyword", "new"], + ["class-name", [ + "TYPE", + ["punctuation", "."], + "Application" + ]], + ["punctuation", "("], + ["punctuation", "{"], + + ["literal-property", "key1"], + ["operator", ":"], + " viewDim", + ["punctuation", "."], + "x", + ["punctuation", ","], + + ["literal-property", "key2"], + ["operator", ":"], + " viewDim", + ["punctuation", "."], + "y", + ["punctuation", ","], + + ["literal-property", "key3"], + ["operator", ":"], + ["number", "0x89ddff"], + ["punctuation", ","], + + ["literal-property", "key4"], + ["operator", ":"], + " window", + ["punctuation", "."], + "devicePixelRatio ", + ["operator", "||"], + ["number", "1"], + ["punctuation", ","], + + ["literal-property", "key5"], + ["operator", ":"], + ["function", "resize"], + ["punctuation", "("], + ["punctuation", ")"], + + ["punctuation", "}"], + ["punctuation", ")"], + ["punctuation", ";"], + + ["comment", "// doesn't conflict with function properties"], + + ["punctuation", "{"], + + ["function-variable", "foo"], + ["operator", ":"], + ["punctuation", "("], + ["punctuation", ")"], + ["operator", "=>"], + ["number", "0"], + ["punctuation", ","], + + ["function-variable", "bar"], + ["operator", ":"], + ["keyword", "async"], + ["keyword", "function"], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", "{"], + ["punctuation", "}"], + + ["punctuation", "}"], + + ["comment", "// no problem with keywords"], + + ["keyword", "switch"], + ["punctuation", "("], + "foo", + ["punctuation", ")"], + ["punctuation", "{"], + + ["keyword", "default"], + ["operator", ":"], + ["keyword", "return"], + ["boolean", "true"], + ["punctuation", ";"], + + ["punctuation", "}"] +] diff --git a/tests/languages/javascript/template-string_feature.test b/tests/languages/javascript/template-string_feature.test index 97e7d0e396..10a2924581 100644 --- a/tests/languages/javascript/template-string_feature.test +++ b/tests/languages/javascript/template-string_feature.test @@ -18,11 +18,13 @@ console.log(`This is ${it.with({ type: false })}!`) ["string", "foo bar"], ["template-punctuation", "`"] ]], + ["template-string", [ ["template-punctuation", "`"], ["string", "foo\r\nbar"], ["template-punctuation", "`"] ]], + ["template-string", [ ["template-punctuation", "`"], ["string", "40+2="], @@ -35,6 +37,7 @@ console.log(`This is ${it.with({ type: false })}!`) ]], ["template-punctuation", "`"] ]], + ["template-string", [ ["template-punctuation", "`"], ["interpolation", [ @@ -46,6 +49,7 @@ console.log(`This is ${it.with({ type: false })}!`) ]], ["template-punctuation", "`"] ]], + ["template-string", [ ["template-punctuation", "`"], ["string", "\\${foo}"], @@ -56,13 +60,16 @@ console.log(`This is ${it.with({ type: false })}!`) ]], ["template-punctuation", "`"] ]], + ["string", "\"foo `a` `b` `c` `d` bar\""], + ["string", "\"test // test\""], ["template-string", [ ["template-punctuation", "`"], ["string", "template"], ["template-punctuation", "`"] ]], + "\r\n\r\nconsole", ["punctuation", "."], ["function", "log"], @@ -77,7 +84,7 @@ console.log(`This is ${it.with({ type: false })}!`) ["function", "with"], ["punctuation", "("], ["punctuation", "{"], - " type", + ["literal-property", "type"], ["operator", ":"], ["boolean", "false"], ["punctuation", "}"], @@ -88,12 +95,13 @@ console.log(`This is ${it.with({ type: false })}!`) ["template-punctuation", "`"] ]], ["punctuation", ")"], + ["template-string", [ ["template-punctuation", "`"], ["interpolation", [ ["interpolation-punctuation", "${"], ["punctuation", "{"], - "foo", + ["literal-property", "foo"], ["operator", ":"], ["string", "'bar'"], ["punctuation", "}"], diff --git a/tests/languages/jsx/issue1235.test b/tests/languages/jsx/issue1235.test index 97c5178683..7021b8de37 100644 --- a/tests/languages/jsx/issue1235.test +++ b/tests/languages/jsx/issue1235.test @@ -13,7 +13,7 @@ ["script-punctuation", "="], ["punctuation", "{"], ["punctuation", "{"], - " track", + ["literal-property", "track"], ["operator", ":"], ["boolean", "true"], ["punctuation", "}"], diff --git a/tests/languages/jsx/issue1335.test b/tests/languages/jsx/issue1335.test index c7863f27b8..be0d3e0b4b 100644 --- a/tests/languages/jsx/issue1335.test +++ b/tests/languages/jsx/issue1335.test @@ -16,16 +16,12 @@ ["punctuation", "<"], ["class-name", "Button"] ]], - ["attr-name", [ - "onClick" - ]], + ["attr-name", ["onClick"]], ["script", [ ["script-punctuation", "="], ["punctuation", "{"], ["punctuation", "("], - ["parameter", [ - "e" - ]], + ["parameter", ["e"]], ["punctuation", ")"], ["operator", "=>"], ["keyword", "this"], @@ -33,7 +29,7 @@ ["function", "setState"], ["punctuation", "("], ["punctuation", "{"], - "clicked", + ["literal-property", "clicked"], ["operator", ":"], ["boolean", "true"], ["punctuation", "}"], @@ -42,51 +38,54 @@ ]], ["punctuation", "/>"] ]], + ["tag", [ ["tag", [ ["punctuation", "<"], ["class-name", "Component"] ]], - ["attr-name", [ - "data" - ]], + + ["attr-name", ["data"]], ["script", [ ["script-punctuation", "="], ["punctuation", "{"], ["punctuation", "["], + ["punctuation", "{"], - "id", + ["literal-property", "id"], ["operator", ":"], ["number", "0"], ["punctuation", ","], - " name", + ["literal-property", "name"], ["operator", ":"], ["string", "'Joe'"], ["punctuation", "}"], ["punctuation", ","], + ["punctuation", "{"], - "id", + ["literal-property", "id"], ["operator", ":"], ["number", "1"], ["punctuation", ","], - " name", + ["literal-property", "name"], ["operator", ":"], ["string", "'Sue'"], ["punctuation", "}"], ["punctuation", ","], + ["punctuation", "]"], ["punctuation", "}"] ]], + ["punctuation", "/>"] ]], + ["tag", [ ["tag", [ ["punctuation", "<"], ["class-name", "Component"] ]], - ["attr-name", [ - "title" - ]], + ["attr-name", ["title"]], ["script", [ ["script-punctuation", "="], ["punctuation", "{"], @@ -103,14 +102,13 @@ ]], ["punctuation", "/>"] ]], + ["tag", [ ["tag", [ ["punctuation", "<"], ["class-name", "Component"] ]], - ["attr-name", [ - "title" - ]], + ["attr-name", ["title"]], ["script", [ ["script-punctuation", "="], ["punctuation", "{"], diff --git a/tests/languages/jsx/issue1408.test b/tests/languages/jsx/issue1408.test index 395f1dd317..2e458670b8 100644 --- a/tests/languages/jsx/issue1408.test +++ b/tests/languages/jsx/issue1408.test @@ -8,14 +8,12 @@ ["punctuation", "<"], "div" ]], - ["attr-name", [ - "style" - ]], + ["attr-name", ["style"]], ["script", [ ["script-punctuation", "="], ["punctuation", "{"], ["punctuation", "{"], - " marginLeft", + ["literal-property", "marginLeft"], ["operator", ":"], ["template-string", [ ["template-punctuation", "`"], diff --git a/tests/languages/mongodb/document_feature.test b/tests/languages/mongodb/document_feature.test index 51f167d99e..6d5c5fff1f 100644 --- a/tests/languages/mongodb/document_feature.test +++ b/tests/languages/mongodb/document_feature.test @@ -25,234 +25,180 @@ ---------------------------------------------------- [ - ["punctuation", "{"], - ["property", [ - "'_id'" - ]], - ["operator", ":"], - ["builtin", "ObjectId"], - ["punctuation", "("], - ["string", [ - "'5ec72ffe00316be87cab3927'" - ]], - ["punctuation", ")"], - ["punctuation", ","], - ["property", [ - "'code'" - ]], - ["operator", ":"], - ["builtin", "Code"], - ["punctuation", "("], - ["string", [ - "'function () { return 22; }'" - ]], - ["punctuation", ")"], - ["punctuation", ","], - ["property", [ - "'binary'" - ]], - ["operator", ":"], - ["builtin", "BinData"], - ["punctuation", "("], - ["number", "1"], - ["punctuation", ","], - ["string", [ - "'232sa3d323sd232a32sda3s2d3a2s1d23s21d3sa'" - ]], - ["punctuation", ")"], - ["punctuation", ","], - ["property", [ - "'dbref'" - ]], - ["operator", ":"], - ["builtin", "DBRef"], - ["punctuation", "("], - ["string", [ - "'namespace'" - ]], - ["punctuation", ","], - ["builtin", "ObjectId"], - ["punctuation", "("], - ["string", [ - "'5ec72f4200316be87cab3926'" - ]], - ["punctuation", ")"], - ["punctuation", ","], - ["string", [ - "'db'" - ]], - ["punctuation", ")"], - ["punctuation", ","], - ["property", [ - "'timestamp'" - ]], - ["operator", ":"], - ["builtin", "Timestamp"], - ["punctuation", "("], - ["number", "0"], - ["punctuation", ","], - ["number", "0"], - ["punctuation", ")"], - ["punctuation", ","], - ["property", [ - "'long'" - ]], - ["operator", ":"], - ["builtin", "NumberLong"], - ["punctuation", "("], - ["number", "9223372036854775807"], - ["punctuation", ")"], - ["punctuation", ","], - ["property", [ - "'decimal'" - ]], - ["operator", ":"], - ["builtin", "NumberDecimal"], - ["punctuation", "("], - ["string", [ - "'1000.55'" - ]], - ["punctuation", ")"], - ["punctuation", ","], - ["property", [ - "'integer'" - ]], - ["operator", ":"], - ["number", "100"], - ["punctuation", ","], - ["property", [ - "'maxkey'" - ]], - ["operator", ":"], - ["builtin", "MaxKey"], - ["punctuation", "("], - ["punctuation", ")"], - ["punctuation", ","], - ["property", [ - "'minkey'" - ]], - ["operator", ":"], - ["builtin", "MinKey"], - ["punctuation", "("], - ["punctuation", ")"], - ["punctuation", ","], - ["property", [ - "'isodate'" - ]], - ["operator", ":"], - ["builtin", "ISODate"], - ["punctuation", "("], - ["string", [ - "'2012-01-01T00:00:00.000Z'" - ]], - ["punctuation", ")"], - ["punctuation", ","], - ["property", [ - "'regexp'" - ]], - ["operator", ":"], - ["builtin", "RegExp"], - ["punctuation", "("], - ["string", [ - "'prism(js)?'" - ]], - ["punctuation", ","], - ["string", [ - "'i'" - ]], - ["punctuation", ")"], - ["punctuation", ","], - ["property", [ - "'string'" - ]], - ["operator", ":"], - ["string", [ - "'Hello World'" - ]], - ["punctuation", ","], - ["property", [ - "'numberArray'" - ]], - ["operator", ":"], - ["punctuation", "["], - ["number", "1"], - ["punctuation", ","], - ["number", "2"], - ["punctuation", ","], - ["number", "3"], - ["punctuation", "]"], - ["punctuation", ","], - ["property", [ - "'stringArray'" - ]], - ["operator", ":"], - ["punctuation", "["], - ["string", [ - "'1'" - ]], - ["punctuation", ","], - ["string", [ - "'2'" - ]], - ["punctuation", ","], - ["string", [ - "'3'" - ]], - ["punctuation", "]"], - ["punctuation", ","], - ["property", [ - "'randomKey'" - ]], - ["operator", ":"], - ["keyword", "null"], - ["punctuation", ","], - ["property", [ - "'object'" - ]], - ["operator", ":"], - ["punctuation", "{"], - ["property", [ - "'a'" - ]], - ["operator", ":"], - ["number", "1"], - ["punctuation", ","], - ["property", [ - "'b'" - ]], - ["operator", ":"], - ["number", "2"], - ["punctuation", "}"], - ["punctuation", ","], - ["property", [ - "'max_key2'" - ]], - ["operator", ":"], - ["builtin", "MaxKey"], - ["punctuation", "("], - ["punctuation", ")"], - ["punctuation", ","], - ["property", [ - "'number'" - ]], - ["operator", ":"], - ["number", "1234"], - ["punctuation", ","], - ["property", [ - "'invalid-key'" - ]], - ["operator", ":"], - ["number", "123"], - ["punctuation", ","], - ["property", [ - "noQuotesKey" - ]], - ["operator", ":"], - ["string", [ - "'value'" - ]], - ["punctuation", ","], - ["punctuation", "}"] + ["punctuation", "{"], + + ["string-property", "'_id'"], + ["operator", ":"], + ["builtin", "ObjectId"], + ["punctuation", "("], + ["string", ["'5ec72ffe00316be87cab3927'"]], + ["punctuation", ")"], + ["punctuation", ","], + + ["string-property", "'code'"], + ["operator", ":"], + ["builtin", "Code"], + ["punctuation", "("], + ["string", ["'function () { return 22; }'"]], + ["punctuation", ")"], + ["punctuation", ","], + + ["string-property", "'binary'"], + ["operator", ":"], + ["builtin", "BinData"], + ["punctuation", "("], + ["number", "1"], + ["punctuation", ","], + ["string", ["'232sa3d323sd232a32sda3s2d3a2s1d23s21d3sa'"]], + ["punctuation", ")"], + ["punctuation", ","], + + ["string-property", "'dbref'"], + ["operator", ":"], + ["builtin", "DBRef"], + ["punctuation", "("], + ["string", ["'namespace'"]], + ["punctuation", ","], + ["builtin", "ObjectId"], + ["punctuation", "("], + ["string", ["'5ec72f4200316be87cab3926'"]], + ["punctuation", ")"], + ["punctuation", ","], + ["string", ["'db'"]], + ["punctuation", ")"], + ["punctuation", ","], + + ["string-property", "'timestamp'"], + ["operator", ":"], + ["builtin", "Timestamp"], + ["punctuation", "("], + ["number", "0"], + ["punctuation", ","], + ["number", "0"], + ["punctuation", ")"], + ["punctuation", ","], + + ["string-property", "'long'"], + ["operator", ":"], + ["builtin", "NumberLong"], + ["punctuation", "("], + ["number", "9223372036854775807"], + ["punctuation", ")"], + ["punctuation", ","], + + ["string-property", "'decimal'"], + ["operator", ":"], + ["builtin", "NumberDecimal"], + ["punctuation", "("], + ["string", ["'1000.55'"]], + ["punctuation", ")"], + ["punctuation", ","], + + ["string-property", "'integer'"], + ["operator", ":"], + ["number", "100"], + ["punctuation", ","], + + ["string-property", "'maxkey'"], + ["operator", ":"], + ["builtin", "MaxKey"], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", ","], + + ["string-property", "'minkey'"], + ["operator", ":"], + ["builtin", "MinKey"], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", ","], + + ["string-property", "'isodate'"], + ["operator", ":"], + ["builtin", "ISODate"], + ["punctuation", "("], + ["string", ["'2012-01-01T00:00:00.000Z'"]], + ["punctuation", ")"], + ["punctuation", ","], + + ["string-property", "'regexp'"], + ["operator", ":"], + ["builtin", "RegExp"], + ["punctuation", "("], + ["string", ["'prism(js)?'"]], + ["punctuation", ","], + ["string", ["'i'"]], + ["punctuation", ")"], + ["punctuation", ","], + + ["string-property", "'string'"], + ["operator", ":"], + ["string", ["'Hello World'"]], + ["punctuation", ","], + + ["string-property", "'numberArray'"], + ["operator", ":"], + ["punctuation", "["], + ["number", "1"], + ["punctuation", ","], + ["number", "2"], + ["punctuation", ","], + ["number", "3"], + ["punctuation", "]"], + ["punctuation", ","], + + ["string-property", "'stringArray'"], + ["operator", ":"], + ["punctuation", "["], + ["string", ["'1'"]], + ["punctuation", ","], + ["string", ["'2'"]], + ["punctuation", ","], + ["string", ["'3'"]], + ["punctuation", "]"], + ["punctuation", ","], + + ["string-property", "'randomKey'"], + ["operator", ":"], + ["keyword", "null"], + ["punctuation", ","], + + ["string-property", "'object'"], + ["operator", ":"], + ["punctuation", "{"], + ["string-property", "'a'"], + ["operator", ":"], + ["number", "1"], + ["punctuation", ","], + ["string-property", "'b'"], + ["operator", ":"], + ["number", "2"], + ["punctuation", "}"], + ["punctuation", ","], + + ["string-property", "'max_key2'"], + ["operator", ":"], + ["builtin", "MaxKey"], + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", ","], + + ["string-property", "'number'"], + ["operator", ":"], + ["number", "1234"], + ["punctuation", ","], + + ["string-property", "'invalid-key'"], + ["operator", ":"], + ["number", "123"], + ["punctuation", ","], + + ["property", ["noQuotesKey"]], + ["operator", ":"], + ["string", ["'value'"]], + ["punctuation", ","], + + ["punctuation", "}"] ] ---------------------------------------------------- diff --git a/tests/languages/pug/tag_feature.test b/tests/languages/pug/tag_feature.test index 9f07b5fa9b..97e3618e71 100644 --- a/tests/languages/pug/tag_feature.test +++ b/tests/languages/pug/tag_feature.test @@ -29,7 +29,7 @@ a: span ["function", "attributes"], ["punctuation", "("], ["punctuation", "{"], - ["string", "'data-foo'"], + ["string-property", "'data-foo'"], ["operator", ":"], ["string", "'bar'"], ["punctuation", "}"], @@ -43,11 +43,15 @@ a: span ["punctuation", "("], ["attr-name", "data-bar"], ["punctuation", "="], - ["attr-value", [["string", "\"foo\""]]], + ["attr-value", [ + ["string", "\"foo\""] + ]], ["punctuation", ","], ["attr-name", "type"], ["punctuation", "="], - ["attr-value", [["string", "'checkbox'"]]], + ["attr-value", [ + ["string", "'checkbox'"] + ]], ["punctuation", ","], ["attr-name", "checked"], ["punctuation", ")"] @@ -62,11 +66,11 @@ a: span ["punctuation", "="], ["attr-value", [ ["punctuation", "{"], - "color", + ["literal-property", "color"], ["operator", ":"], ["string", "'red'"], ["punctuation", ","], - " background", + ["literal-property", "background"], ["operator", ":"], ["string", "'green'"], ["punctuation", "}"] @@ -81,30 +85,45 @@ a: span ["punctuation", "("], ["attr-name", "unescaped"], ["punctuation", "!="], - ["attr-value", [["string", "\"\""]]], + ["attr-value", [ + ["string", "\"\""] + ]], ["punctuation", ")"] ]] ]], ["tag", [ "a", - ["attr-class", ".button"]]], - ["tag", [["attr-class", ".content"]]], + ["attr-class", ".button"] + ]], + ["tag", [ + ["attr-class", ".content"] + ]], + ["tag", [ "a", - ["attr-id", "#main-link"]]], - ["tag", [["attr-id", "#content"]]], + ["attr-id", "#main-link"] + ]], + ["tag", [ + ["attr-id", "#content"] + ]], + ["tag", [ "div", ["attr-id", "#test-id"], ["attr-class", ".test-class1"], - ["attr-class", ".test-class2"]]], + ["attr-class", ".test-class2"] + ]], ["tag", [ ["attr-class", ".test-class1"], ["attr-id", "#test-id"], - ["attr-class", ".test-class2"]]], + ["attr-class", ".test-class2"] + ]], - ["tag", ["a", ["punctuation", ":"]]], + ["tag", [ + "a", + ["punctuation", ":"] + ]], ["tag", ["span"]] ] From ef53f0214c3f9a027030bb6e148339ec6e5c3d4e Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Mon, 11 Oct 2021 16:52:12 +0200 Subject: [PATCH 0962/1100] Added support for Web IDL (#3107) --- components.js | 2 +- components.json | 5 + components/prism-web-idl.js | 101 +++++ components/prism-web-idl.min.js | 1 + examples/prism-web-idl.html | 28 ++ plugins/autoloader/prism-autoloader.js | 1 + plugins/autoloader/prism-autoloader.min.js | 2 +- plugins/show-language/prism-show-language.js | 2 + .../show-language/prism-show-language.min.js | 2 +- tests/languages/web-idl/boolean_feature.test | 9 + tests/languages/web-idl/builtin_feature.test | 43 ++ .../languages/web-idl/class-name_feature.test | 410 ++++++++++++++++++ tests/languages/web-idl/comment_feature.test | 9 + tests/languages/web-idl/keyword_feature.test | 55 +++ .../languages/web-idl/namespace_feature.test | 30 ++ tests/languages/web-idl/number_feature.test | 29 ++ tests/languages/web-idl/operator_feature.test | 14 + .../web-idl/primitive-type_feature.test | 43 ++ .../web-idl/punctuation_feature.test | 17 + tests/languages/web-idl/string_feature.test | 11 + 20 files changed, 811 insertions(+), 3 deletions(-) create mode 100644 components/prism-web-idl.js create mode 100644 components/prism-web-idl.min.js create mode 100644 examples/prism-web-idl.html create mode 100644 tests/languages/web-idl/boolean_feature.test create mode 100644 tests/languages/web-idl/builtin_feature.test create mode 100644 tests/languages/web-idl/class-name_feature.test create mode 100644 tests/languages/web-idl/comment_feature.test create mode 100644 tests/languages/web-idl/keyword_feature.test create mode 100644 tests/languages/web-idl/namespace_feature.test create mode 100644 tests/languages/web-idl/number_feature.test create mode 100644 tests/languages/web-idl/operator_feature.test create mode 100644 tests/languages/web-idl/primitive-type_feature.test create mode 100644 tests/languages/web-idl/punctuation_feature.test create mode 100644 tests/languages/web-idl/string_feature.test diff --git a/components.js b/components.js index 8d6614484e..aace39ae61 100644 --- a/components.js +++ b/components.js @@ -1,2 +1,2 @@ -var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml","ssml","atom","rss"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","ssml":"SSML","atom":"Atom","rss":"RSS"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","optional":"regex","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"ABNF","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"agda":{"title":"Agda","owner":"xy-ren"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apex":{"title":"Apex","require":["clike","sql"],"owner":"RunDevelopment"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","alias":"ino","owner":"dkern"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"asmatmel":{"title":"Atmel AVR Assembly","owner":"cerkit"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"avisynth":{"title":"AviSynth","alias":"avs","owner":"Zinfidel"},"avro-idl":{"title":"Avro IDL","alias":"avdl","owner":"RunDevelopment"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"bicep":{"title":"Bicep","owner":"johnnyreilly"},"birb":{"title":"Birb","require":"clike","owner":"Calamity210"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"BNF","alias":"rbnf","aliasTitles":{"rbnf":"RBNF"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"bsl":{"title":"BSL (1C:Enterprise)","alias":"oscript","aliasTitles":{"oscript":"OneScript"},"owner":"Diversus23"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cfscript":{"title":"CFScript","require":"clike","alias":"cfc","owner":"mjclemente"},"chaiscript":{"title":"ChaiScript","require":["clike","cpp"],"owner":"RunDevelopment"},"cil":{"title":"CIL","owner":"sbrl"},"clojure":{"title":"Clojure","owner":"troglotit"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"cobol":{"title":"COBOL","owner":"RunDevelopment"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"coq":{"title":"Coq","owner":"RunDevelopment"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"csv":{"title":"CSV","owner":"RunDevelopment"},"cypher":{"title":"Cypher","owner":"RunDevelopment"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dataweave":{"title":"DataWeave","owner":"machaval"},"dax":{"title":"DAX","owner":"peterbud"},"dhall":{"title":"Dhall","owner":"RunDevelopment"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"dot":{"title":"DOT (Graphviz)","alias":"gv","optional":"markup","owner":"RunDevelopment"},"ebnf":{"title":"EBNF","owner":"RunDevelopment"},"editorconfig":{"title":"EditorConfig","owner":"osipxd"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"false":{"title":"False","owner":"edukisto"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"gap":{"title":"GAP (CAS)","owner":"RunDevelopment"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"c","owner":"Golmote"},"gn":{"title":"GN","alias":"gni","owner":"RunDevelopment"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","optional":"markdown","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","alias":"hbs","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"hlsl":{"title":"HLSL","require":"c","owner":"RunDevelopment"},"hoon":{"title":"Hoon","owner":"matildepark"},"http":{"title":"HTTP","optional":["css","javascript","json","markup","uri"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"icu-message-format":{"title":"ICU Message Format","owner":"RunDevelopment"},"idris":{"title":"Idris","alias":"idr","owner":"KeenS","require":"haskell"},"ignore":{"title":".ignore","owner":"osipxd","alias":["gitignore","hgignore","npmignore"],"aliasTitles":{"gitignore":".gitignore","hgignore":".hgignore","npmignore":".npmignore"}},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jexl":{"title":"Jexl","owner":"czosel"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike","typescript"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","alias":"webmanifest","aliasTitles":{"webmanifest":"Web App Manifest"},"owner":"CupOfTea696"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"jsstacktrace":{"title":"JS stack trace","owner":"sbrl"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup","sql"],"owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keepalived":{"title":"Keepalived Configure","owner":"dev-itsheng"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","alias":["kt","kts"],"aliasTitles":{"kts":"Kotlin Script"},"require":"clike","owner":"Golmote"},"kumir":{"title":"KuMir (КуМир)","alias":"kum","owner":"edukisto"},"kusto":{"title":"Kusto","owner":"RunDevelopment"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","require":"markup-templating","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"log":{"title":"Log file","optional":"javastacktrace","owner":"RunDevelopment"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"magma":{"title":"Magma (CAS)","owner":"RunDevelopment"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","optional":"yaml","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"maxscript":{"title":"MAXScript","owner":"RunDevelopment"},"mel":{"title":"MEL","owner":"Golmote"},"mermaid":{"title":"Mermaid","owner":"RunDevelopment"},"mizar":{"title":"Mizar","owner":"Golmote"},"mongodb":{"title":"MongoDB","owner":"airs0urce","require":"javascript"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"naniscript":{"title":"Naninovel Script","owner":"Elringus","alias":"nani"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nevod":{"title":"Nevod","owner":"nezaboodka"},"nginx":{"title":"nginx","owner":"volado"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"openqasm":{"title":"OpenQasm","alias":"qasm","owner":"RunDevelopment"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"psl":{"title":"PATROL Scripting Language","owner":"bertysentry"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":"markup-templating","owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"promql":{"title":"PromQL","owner":"arendjr"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"purebasic":{"title":"PureBasic","require":"clike","alias":"pbfasm","owner":"HeX0R101"},"purescript":{"title":"PureScript","require":"haskell","alias":"purs","owner":"sriharshachilakapati"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"qsharp":{"title":"Q#","require":"clike","alias":"qs","owner":"fedonman"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"racket":{"title":"Racket","require":"scheme","alias":"rkt","owner":"RunDevelopment"},"cshtml":{"title":"Razor C#","alias":"razor","require":["markup","csharp"],"optional":["css","css-extras","javascript","js-extras"],"owner":"RunDevelopment"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","owner":"RunDevelopment"},"rego":{"title":"Rego","owner":"JordanSh"},"renpy":{"title":"Ren'py","alias":"rpy","owner":"HyuchiaDiego"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","optional":"css-extras","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","alias":["sh-session","shellsession"],"owner":"RunDevelopment"},"smali":{"title":"Smali","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sml":{"title":"SML","alias":"smlnj","aliasTitles":{"smlnj":"SML/NJ"},"owner":"RunDevelopment"},"solidity":{"title":"Solidity (Ethereum)","alias":"sol","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"squirrel":{"title":"Squirrel","require":"clike","owner":"RunDevelopment"},"stan":{"title":"Stan","owner":"RunDevelopment"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","owner":"chrischares"},"systemd":{"title":"Systemd configuration file","owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","vbnet"],"owner":"RunDevelopment"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tremor":{"title":"Tremor","alias":["trickle","troy"],"owner":"darach","aliasTitles":{"trickle":"trickle","troy":"troy"}},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"typoscript":{"title":"TypoScript","alias":"tsconfig","aliasTitles":{"tsconfig":"TSConfig"},"owner":"dkern"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"uri":{"title":"URI","alias":"url","aliasTitles":{"url":"URL"},"owner":"RunDevelopment"},"v":{"title":"V","require":"clike","owner":"taggon"},"vala":{"title":"Vala","require":"clike","optional":"regex","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":["vb","vba"],"aliasTitles":{"vba":"VBA"},"owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"wolfram":{"title":"Wolfram language","alias":["mathematica","nb","wl"],"aliasTitles":{"mathematica":"Mathematica","nb":"Mathematica Notebook"},"owner":"msollami"},"wren":{"title":"Wren","owner":"clsource"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xml-doc":{"title":"XML doc (.net)","require":"markup","modify":["csharp","fsharp","vbnet"],"owner":"RunDevelopment"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"yang":{"title":"YANG","owner":"RunDevelopment"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword for fine-grained highlighting.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; +var components = {"core":{"meta":{"path":"components/prism-core.js","option":"mandatory"},"core":"Core"},"themes":{"meta":{"path":"themes/{id}.css","link":"index.html?theme={id}","exclusive":true},"prism":{"title":"Default","option":"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{"title":"Okaidia","owner":"ocodia"},"prism-twilight":{"title":"Twilight","owner":"remybach"},"prism-coy":{"title":"Coy","owner":"tshedor"},"prism-solarizedlight":{"title":"Solarized Light","owner":"hectormatos2011 "},"prism-tomorrow":{"title":"Tomorrow Night","owner":"Rosey"}},"languages":{"meta":{"path":"components/prism-{id}","noCSS":true,"examplesPath":"examples/prism-{id}","addCheckAll":true},"markup":{"title":"Markup","alias":["html","xml","svg","mathml","ssml","atom","rss"],"aliasTitles":{"html":"HTML","xml":"XML","svg":"SVG","mathml":"MathML","ssml":"SSML","atom":"Atom","rss":"RSS"},"option":"default"},"css":{"title":"CSS","option":"default","modify":"markup"},"clike":{"title":"C-like","option":"default"},"javascript":{"title":"JavaScript","require":"clike","modify":"markup","optional":"regex","alias":"js","option":"default"},"abap":{"title":"ABAP","owner":"dellagustin"},"abnf":{"title":"ABNF","owner":"RunDevelopment"},"actionscript":{"title":"ActionScript","require":"javascript","modify":"markup","owner":"Golmote"},"ada":{"title":"Ada","owner":"Lucretia"},"agda":{"title":"Agda","owner":"xy-ren"},"al":{"title":"AL","owner":"RunDevelopment"},"antlr4":{"title":"ANTLR4","alias":"g4","owner":"RunDevelopment"},"apacheconf":{"title":"Apache Configuration","owner":"GuiTeK"},"apex":{"title":"Apex","require":["clike","sql"],"owner":"RunDevelopment"},"apl":{"title":"APL","owner":"ngn"},"applescript":{"title":"AppleScript","owner":"Golmote"},"aql":{"title":"AQL","owner":"RunDevelopment"},"arduino":{"title":"Arduino","require":"cpp","alias":"ino","owner":"dkern"},"arff":{"title":"ARFF","owner":"Golmote"},"asciidoc":{"alias":"adoc","title":"AsciiDoc","owner":"Golmote"},"aspnet":{"title":"ASP.NET (C#)","require":["markup","csharp"],"owner":"nauzilus"},"asm6502":{"title":"6502 Assembly","owner":"kzurawel"},"asmatmel":{"title":"Atmel AVR Assembly","owner":"cerkit"},"autohotkey":{"title":"AutoHotkey","owner":"aviaryan"},"autoit":{"title":"AutoIt","owner":"Golmote"},"avisynth":{"title":"AviSynth","alias":"avs","owner":"Zinfidel"},"avro-idl":{"title":"Avro IDL","alias":"avdl","owner":"RunDevelopment"},"bash":{"title":"Bash","alias":"shell","aliasTitles":{"shell":"Shell"},"owner":"zeitgeist87"},"basic":{"title":"BASIC","owner":"Golmote"},"batch":{"title":"Batch","owner":"Golmote"},"bbcode":{"title":"BBcode","alias":"shortcode","aliasTitles":{"shortcode":"Shortcode"},"owner":"RunDevelopment"},"bicep":{"title":"Bicep","owner":"johnnyreilly"},"birb":{"title":"Birb","require":"clike","owner":"Calamity210"},"bison":{"title":"Bison","require":"c","owner":"Golmote"},"bnf":{"title":"BNF","alias":"rbnf","aliasTitles":{"rbnf":"RBNF"},"owner":"RunDevelopment"},"brainfuck":{"title":"Brainfuck","owner":"Golmote"},"brightscript":{"title":"BrightScript","owner":"RunDevelopment"},"bro":{"title":"Bro","owner":"wayward710"},"bsl":{"title":"BSL (1C:Enterprise)","alias":"oscript","aliasTitles":{"oscript":"OneScript"},"owner":"Diversus23"},"c":{"title":"C","require":"clike","owner":"zeitgeist87"},"csharp":{"title":"C#","require":"clike","alias":["cs","dotnet"],"owner":"mvalipour"},"cpp":{"title":"C++","require":"c","owner":"zeitgeist87"},"cfscript":{"title":"CFScript","require":"clike","alias":"cfc","owner":"mjclemente"},"chaiscript":{"title":"ChaiScript","require":["clike","cpp"],"owner":"RunDevelopment"},"cil":{"title":"CIL","owner":"sbrl"},"clojure":{"title":"Clojure","owner":"troglotit"},"cmake":{"title":"CMake","owner":"mjrogozinski"},"cobol":{"title":"COBOL","owner":"RunDevelopment"},"coffeescript":{"title":"CoffeeScript","require":"javascript","alias":"coffee","owner":"R-osey"},"concurnas":{"title":"Concurnas","alias":"conc","owner":"jasontatton"},"csp":{"title":"Content-Security-Policy","owner":"ScottHelme"},"coq":{"title":"Coq","owner":"RunDevelopment"},"crystal":{"title":"Crystal","require":"ruby","owner":"MakeNowJust"},"css-extras":{"title":"CSS Extras","require":"css","modify":"css","owner":"milesj"},"csv":{"title":"CSV","owner":"RunDevelopment"},"cypher":{"title":"Cypher","owner":"RunDevelopment"},"d":{"title":"D","require":"clike","owner":"Golmote"},"dart":{"title":"Dart","require":"clike","owner":"Golmote"},"dataweave":{"title":"DataWeave","owner":"machaval"},"dax":{"title":"DAX","owner":"peterbud"},"dhall":{"title":"Dhall","owner":"RunDevelopment"},"diff":{"title":"Diff","owner":"uranusjr"},"django":{"title":"Django/Jinja2","require":"markup-templating","alias":"jinja2","owner":"romanvm"},"dns-zone-file":{"title":"DNS zone file","owner":"RunDevelopment","alias":"dns-zone"},"docker":{"title":"Docker","alias":"dockerfile","owner":"JustinBeckwith"},"dot":{"title":"DOT (Graphviz)","alias":"gv","optional":"markup","owner":"RunDevelopment"},"ebnf":{"title":"EBNF","owner":"RunDevelopment"},"editorconfig":{"title":"EditorConfig","owner":"osipxd"},"eiffel":{"title":"Eiffel","owner":"Conaclos"},"ejs":{"title":"EJS","require":["javascript","markup-templating"],"owner":"RunDevelopment","alias":"eta","aliasTitles":{"eta":"Eta"}},"elixir":{"title":"Elixir","owner":"Golmote"},"elm":{"title":"Elm","owner":"zwilias"},"etlua":{"title":"Embedded Lua templating","require":["lua","markup-templating"],"owner":"RunDevelopment"},"erb":{"title":"ERB","require":["ruby","markup-templating"],"owner":"Golmote"},"erlang":{"title":"Erlang","owner":"Golmote"},"excel-formula":{"title":"Excel Formula","alias":["xlsx","xls"],"owner":"RunDevelopment"},"fsharp":{"title":"F#","require":"clike","owner":"simonreynolds7"},"factor":{"title":"Factor","owner":"catb0t"},"false":{"title":"False","owner":"edukisto"},"firestore-security-rules":{"title":"Firestore security rules","require":"clike","owner":"RunDevelopment"},"flow":{"title":"Flow","require":"javascript","owner":"Golmote"},"fortran":{"title":"Fortran","owner":"Golmote"},"ftl":{"title":"FreeMarker Template Language","require":"markup-templating","owner":"RunDevelopment"},"gml":{"title":"GameMaker Language","alias":"gamemakerlanguage","require":"clike","owner":"LiarOnce"},"gap":{"title":"GAP (CAS)","owner":"RunDevelopment"},"gcode":{"title":"G-code","owner":"RunDevelopment"},"gdscript":{"title":"GDScript","owner":"RunDevelopment"},"gedcom":{"title":"GEDCOM","owner":"Golmote"},"gherkin":{"title":"Gherkin","owner":"hason"},"git":{"title":"Git","owner":"lgiraudel"},"glsl":{"title":"GLSL","require":"c","owner":"Golmote"},"gn":{"title":"GN","alias":"gni","owner":"RunDevelopment"},"go":{"title":"Go","require":"clike","owner":"arnehormann"},"graphql":{"title":"GraphQL","optional":"markdown","owner":"Golmote"},"groovy":{"title":"Groovy","require":"clike","owner":"robfletcher"},"haml":{"title":"Haml","require":"ruby","optional":["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],"owner":"Golmote"},"handlebars":{"title":"Handlebars","require":"markup-templating","alias":"hbs","owner":"Golmote"},"haskell":{"title":"Haskell","alias":"hs","owner":"bholst"},"haxe":{"title":"Haxe","require":"clike","owner":"Golmote"},"hcl":{"title":"HCL","owner":"outsideris"},"hlsl":{"title":"HLSL","require":"c","owner":"RunDevelopment"},"hoon":{"title":"Hoon","owner":"matildepark"},"http":{"title":"HTTP","optional":["css","javascript","json","markup","uri"],"owner":"danielgtaylor"},"hpkp":{"title":"HTTP Public-Key-Pins","owner":"ScottHelme"},"hsts":{"title":"HTTP Strict-Transport-Security","owner":"ScottHelme"},"ichigojam":{"title":"IchigoJam","owner":"BlueCocoa"},"icon":{"title":"Icon","owner":"Golmote"},"icu-message-format":{"title":"ICU Message Format","owner":"RunDevelopment"},"idris":{"title":"Idris","alias":"idr","owner":"KeenS","require":"haskell"},"ignore":{"title":".ignore","owner":"osipxd","alias":["gitignore","hgignore","npmignore"],"aliasTitles":{"gitignore":".gitignore","hgignore":".hgignore","npmignore":".npmignore"}},"inform7":{"title":"Inform 7","owner":"Golmote"},"ini":{"title":"Ini","owner":"aviaryan"},"io":{"title":"Io","owner":"AlesTsurko"},"j":{"title":"J","owner":"Golmote"},"java":{"title":"Java","require":"clike","owner":"sherblot"},"javadoc":{"title":"JavaDoc","require":["markup","java","javadoclike"],"modify":"java","optional":"scala","owner":"RunDevelopment"},"javadoclike":{"title":"JavaDoc-like","modify":["java","javascript","php"],"owner":"RunDevelopment"},"javastacktrace":{"title":"Java stack trace","owner":"RunDevelopment"},"jexl":{"title":"Jexl","owner":"czosel"},"jolie":{"title":"Jolie","require":"clike","owner":"thesave"},"jq":{"title":"JQ","owner":"RunDevelopment"},"jsdoc":{"title":"JSDoc","require":["javascript","javadoclike","typescript"],"modify":"javascript","optional":["actionscript","coffeescript"],"owner":"RunDevelopment"},"js-extras":{"title":"JS Extras","require":"javascript","modify":"javascript","optional":["actionscript","coffeescript","flow","n4js","typescript"],"owner":"RunDevelopment"},"json":{"title":"JSON","alias":"webmanifest","aliasTitles":{"webmanifest":"Web App Manifest"},"owner":"CupOfTea696"},"json5":{"title":"JSON5","require":"json","owner":"RunDevelopment"},"jsonp":{"title":"JSONP","require":"json","owner":"RunDevelopment"},"jsstacktrace":{"title":"JS stack trace","owner":"sbrl"},"js-templates":{"title":"JS Templates","require":"javascript","modify":"javascript","optional":["css","css-extras","graphql","markdown","markup","sql"],"owner":"RunDevelopment"},"julia":{"title":"Julia","owner":"cdagnino"},"keepalived":{"title":"Keepalived Configure","owner":"dev-itsheng"},"keyman":{"title":"Keyman","owner":"mcdurdin"},"kotlin":{"title":"Kotlin","alias":["kt","kts"],"aliasTitles":{"kts":"Kotlin Script"},"require":"clike","owner":"Golmote"},"kumir":{"title":"KuMir (КуМир)","alias":"kum","owner":"edukisto"},"kusto":{"title":"Kusto","owner":"RunDevelopment"},"latex":{"title":"LaTeX","alias":["tex","context"],"aliasTitles":{"tex":"TeX","context":"ConTeXt"},"owner":"japborst"},"latte":{"title":"Latte","require":["clike","markup-templating","php"],"owner":"nette"},"less":{"title":"Less","require":"css","optional":"css-extras","owner":"Golmote"},"lilypond":{"title":"LilyPond","require":"scheme","alias":"ly","owner":"RunDevelopment"},"liquid":{"title":"Liquid","require":"markup-templating","owner":"cinhtau"},"lisp":{"title":"Lisp","alias":["emacs","elisp","emacs-lisp"],"owner":"JuanCaicedo"},"livescript":{"title":"LiveScript","owner":"Golmote"},"llvm":{"title":"LLVM IR","owner":"porglezomp"},"log":{"title":"Log file","optional":"javastacktrace","owner":"RunDevelopment"},"lolcode":{"title":"LOLCODE","owner":"Golmote"},"lua":{"title":"Lua","owner":"Golmote"},"magma":{"title":"Magma (CAS)","owner":"RunDevelopment"},"makefile":{"title":"Makefile","owner":"Golmote"},"markdown":{"title":"Markdown","require":"markup","optional":"yaml","alias":"md","owner":"Golmote"},"markup-templating":{"title":"Markup templating","require":"markup","owner":"Golmote"},"matlab":{"title":"MATLAB","owner":"Golmote"},"maxscript":{"title":"MAXScript","owner":"RunDevelopment"},"mel":{"title":"MEL","owner":"Golmote"},"mermaid":{"title":"Mermaid","owner":"RunDevelopment"},"mizar":{"title":"Mizar","owner":"Golmote"},"mongodb":{"title":"MongoDB","owner":"airs0urce","require":"javascript"},"monkey":{"title":"Monkey","owner":"Golmote"},"moonscript":{"title":"MoonScript","alias":"moon","owner":"RunDevelopment"},"n1ql":{"title":"N1QL","owner":"TMWilds"},"n4js":{"title":"N4JS","require":"javascript","optional":"jsdoc","alias":"n4jsd","owner":"bsmith-n4"},"nand2tetris-hdl":{"title":"Nand To Tetris HDL","owner":"stephanmax"},"naniscript":{"title":"Naninovel Script","owner":"Elringus","alias":"nani"},"nasm":{"title":"NASM","owner":"rbmj"},"neon":{"title":"NEON","owner":"nette"},"nevod":{"title":"Nevod","owner":"nezaboodka"},"nginx":{"title":"nginx","owner":"volado"},"nim":{"title":"Nim","owner":"Golmote"},"nix":{"title":"Nix","owner":"Golmote"},"nsis":{"title":"NSIS","owner":"idleberg"},"objectivec":{"title":"Objective-C","require":"c","alias":"objc","owner":"uranusjr"},"ocaml":{"title":"OCaml","owner":"Golmote"},"opencl":{"title":"OpenCL","require":"c","modify":["c","cpp"],"owner":"Milania1"},"openqasm":{"title":"OpenQasm","alias":"qasm","owner":"RunDevelopment"},"oz":{"title":"Oz","owner":"Golmote"},"parigp":{"title":"PARI/GP","owner":"Golmote"},"parser":{"title":"Parser","require":"markup","owner":"Golmote"},"pascal":{"title":"Pascal","alias":"objectpascal","aliasTitles":{"objectpascal":"Object Pascal"},"owner":"Golmote"},"pascaligo":{"title":"Pascaligo","owner":"DefinitelyNotAGoat"},"psl":{"title":"PATROL Scripting Language","owner":"bertysentry"},"pcaxis":{"title":"PC-Axis","alias":"px","owner":"RunDevelopment"},"peoplecode":{"title":"PeopleCode","alias":"pcode","owner":"RunDevelopment"},"perl":{"title":"Perl","owner":"Golmote"},"php":{"title":"PHP","require":"markup-templating","owner":"milesj"},"phpdoc":{"title":"PHPDoc","require":["php","javadoclike"],"modify":"php","owner":"RunDevelopment"},"php-extras":{"title":"PHP Extras","require":"php","modify":"php","owner":"milesj"},"plsql":{"title":"PL/SQL","require":"sql","owner":"Golmote"},"powerquery":{"title":"PowerQuery","alias":["pq","mscript"],"owner":"peterbud"},"powershell":{"title":"PowerShell","owner":"nauzilus"},"processing":{"title":"Processing","require":"clike","owner":"Golmote"},"prolog":{"title":"Prolog","owner":"Golmote"},"promql":{"title":"PromQL","owner":"arendjr"},"properties":{"title":".properties","owner":"Golmote"},"protobuf":{"title":"Protocol Buffers","require":"clike","owner":"just-boris"},"pug":{"title":"Pug","require":["markup","javascript"],"optional":["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],"owner":"Golmote"},"puppet":{"title":"Puppet","owner":"Golmote"},"pure":{"title":"Pure","optional":["c","cpp","fortran"],"owner":"Golmote"},"purebasic":{"title":"PureBasic","require":"clike","alias":"pbfasm","owner":"HeX0R101"},"purescript":{"title":"PureScript","require":"haskell","alias":"purs","owner":"sriharshachilakapati"},"python":{"title":"Python","alias":"py","owner":"multipetros"},"qsharp":{"title":"Q#","require":"clike","alias":"qs","owner":"fedonman"},"q":{"title":"Q (kdb+ database)","owner":"Golmote"},"qml":{"title":"QML","require":"javascript","owner":"RunDevelopment"},"qore":{"title":"Qore","require":"clike","owner":"temnroegg"},"r":{"title":"R","owner":"Golmote"},"racket":{"title":"Racket","require":"scheme","alias":"rkt","owner":"RunDevelopment"},"cshtml":{"title":"Razor C#","alias":"razor","require":["markup","csharp"],"optional":["css","css-extras","javascript","js-extras"],"owner":"RunDevelopment"},"jsx":{"title":"React JSX","require":["markup","javascript"],"optional":["jsdoc","js-extras","js-templates"],"owner":"vkbansal"},"tsx":{"title":"React TSX","require":["jsx","typescript"]},"reason":{"title":"Reason","require":"clike","owner":"Golmote"},"regex":{"title":"Regex","owner":"RunDevelopment"},"rego":{"title":"Rego","owner":"JordanSh"},"renpy":{"title":"Ren'py","alias":"rpy","owner":"HyuchiaDiego"},"rest":{"title":"reST (reStructuredText)","owner":"Golmote"},"rip":{"title":"Rip","owner":"ravinggenius"},"roboconf":{"title":"Roboconf","owner":"Golmote"},"robotframework":{"title":"Robot Framework","alias":"robot","owner":"RunDevelopment"},"ruby":{"title":"Ruby","require":"clike","alias":"rb","owner":"samflores"},"rust":{"title":"Rust","owner":"Golmote"},"sas":{"title":"SAS","optional":["groovy","lua","sql"],"owner":"Golmote"},"sass":{"title":"Sass (Sass)","require":"css","optional":"css-extras","owner":"Golmote"},"scss":{"title":"Sass (Scss)","require":"css","optional":"css-extras","owner":"MoOx"},"scala":{"title":"Scala","require":"java","owner":"jozic"},"scheme":{"title":"Scheme","owner":"bacchus123"},"shell-session":{"title":"Shell session","require":"bash","alias":["sh-session","shellsession"],"owner":"RunDevelopment"},"smali":{"title":"Smali","owner":"RunDevelopment"},"smalltalk":{"title":"Smalltalk","owner":"Golmote"},"smarty":{"title":"Smarty","require":"markup-templating","owner":"Golmote"},"sml":{"title":"SML","alias":"smlnj","aliasTitles":{"smlnj":"SML/NJ"},"owner":"RunDevelopment"},"solidity":{"title":"Solidity (Ethereum)","alias":"sol","require":"clike","owner":"glachaud"},"solution-file":{"title":"Solution file","alias":"sln","owner":"RunDevelopment"},"soy":{"title":"Soy (Closure Template)","require":"markup-templating","owner":"Golmote"},"sparql":{"title":"SPARQL","require":"turtle","owner":"Triply-Dev","alias":"rq"},"splunk-spl":{"title":"Splunk SPL","owner":"RunDevelopment"},"sqf":{"title":"SQF: Status Quo Function (Arma 3)","require":"clike","owner":"RunDevelopment"},"sql":{"title":"SQL","owner":"multipetros"},"squirrel":{"title":"Squirrel","require":"clike","owner":"RunDevelopment"},"stan":{"title":"Stan","owner":"RunDevelopment"},"iecst":{"title":"Structured Text (IEC 61131-3)","owner":"serhioromano"},"stylus":{"title":"Stylus","owner":"vkbansal"},"swift":{"title":"Swift","owner":"chrischares"},"systemd":{"title":"Systemd configuration file","owner":"RunDevelopment"},"t4-templating":{"title":"T4 templating","owner":"RunDevelopment"},"t4-cs":{"title":"T4 Text Templates (C#)","require":["t4-templating","csharp"],"alias":"t4","owner":"RunDevelopment"},"t4-vb":{"title":"T4 Text Templates (VB)","require":["t4-templating","vbnet"],"owner":"RunDevelopment"},"tap":{"title":"TAP","owner":"isaacs","require":"yaml"},"tcl":{"title":"Tcl","owner":"PeterChaplin"},"tt2":{"title":"Template Toolkit 2","require":["clike","markup-templating"],"owner":"gflohr"},"textile":{"title":"Textile","require":"markup","optional":"css","owner":"Golmote"},"toml":{"title":"TOML","owner":"RunDevelopment"},"tremor":{"title":"Tremor","alias":["trickle","troy"],"owner":"darach","aliasTitles":{"trickle":"trickle","troy":"troy"}},"turtle":{"title":"Turtle","alias":"trig","aliasTitles":{"trig":"TriG"},"owner":"jakubklimek"},"twig":{"title":"Twig","require":"markup","owner":"brandonkelly"},"typescript":{"title":"TypeScript","require":"javascript","optional":"js-templates","alias":"ts","owner":"vkbansal"},"typoscript":{"title":"TypoScript","alias":"tsconfig","aliasTitles":{"tsconfig":"TSConfig"},"owner":"dkern"},"unrealscript":{"title":"UnrealScript","alias":["uscript","uc"],"owner":"RunDevelopment"},"uri":{"title":"URI","alias":"url","aliasTitles":{"url":"URL"},"owner":"RunDevelopment"},"v":{"title":"V","require":"clike","owner":"taggon"},"vala":{"title":"Vala","require":"clike","optional":"regex","owner":"TemplarVolk"},"vbnet":{"title":"VB.Net","require":"basic","owner":"Bigsby"},"velocity":{"title":"Velocity","require":"markup","owner":"Golmote"},"verilog":{"title":"Verilog","owner":"a-rey"},"vhdl":{"title":"VHDL","owner":"a-rey"},"vim":{"title":"vim","owner":"westonganger"},"visual-basic":{"title":"Visual Basic","alias":["vb","vba"],"aliasTitles":{"vba":"VBA"},"owner":"Golmote"},"warpscript":{"title":"WarpScript","owner":"RunDevelopment"},"wasm":{"title":"WebAssembly","owner":"Golmote"},"web-idl":{"title":"Web IDL","alias":"webidl","owner":"RunDevelopment"},"wiki":{"title":"Wiki markup","require":"markup","owner":"Golmote"},"wolfram":{"title":"Wolfram language","alias":["mathematica","nb","wl"],"aliasTitles":{"mathematica":"Mathematica","nb":"Mathematica Notebook"},"owner":"msollami"},"wren":{"title":"Wren","owner":"clsource"},"xeora":{"title":"Xeora","require":"markup","alias":"xeoracube","aliasTitles":{"xeoracube":"XeoraCube"},"owner":"freakmaxi"},"xml-doc":{"title":"XML doc (.net)","require":"markup","modify":["csharp","fsharp","vbnet"],"owner":"RunDevelopment"},"xojo":{"title":"Xojo (REALbasic)","owner":"Golmote"},"xquery":{"title":"XQuery","require":"markup","owner":"Golmote"},"yaml":{"title":"YAML","alias":"yml","owner":"hason"},"yang":{"title":"YANG","owner":"RunDevelopment"},"zig":{"title":"Zig","owner":"RunDevelopment"}},"plugins":{"meta":{"path":"plugins/{id}/prism-{id}","link":"plugins/{id}/"},"line-highlight":{"title":"Line Highlight","description":"Highlights specific lines and/or line ranges."},"line-numbers":{"title":"Line Numbers","description":"Line number at the beginning of code lines.","owner":"kuba-kubula"},"show-invisibles":{"title":"Show Invisibles","description":"Show hidden characters such as tabs and line breaks.","optional":["autolinker","data-uri-highlight"]},"autolinker":{"title":"Autolinker","description":"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},"wpd":{"title":"WebPlatform Docs","description":"Makes tokens link to WebPlatform.org documentation. The links open in a new tab."},"custom-class":{"title":"Custom Class","description":"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.","owner":"dvkndn","noCSS":true},"file-highlight":{"title":"File Highlight","description":"Fetch external files and highlight them with Prism. Used on the Prism website itself.","noCSS":true},"show-language":{"title":"Show Language","description":"Display the highlighted language in code blocks (inline code does not show the label).","owner":"nauzilus","noCSS":true,"require":"toolbar"},"jsonp-highlight":{"title":"JSONP Highlight","description":"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).","noCSS":true,"owner":"nauzilus"},"highlight-keywords":{"title":"Highlight Keywords","description":"Adds special CSS classes for each keyword for fine-grained highlighting.","owner":"vkbansal","noCSS":true},"remove-initial-line-feed":{"title":"Remove initial line feed","description":"Removes the initial line feed in code blocks.","owner":"Golmote","noCSS":true},"inline-color":{"title":"Inline color","description":"Adds a small inline preview for colors in style sheets.","require":"css-extras","owner":"RunDevelopment"},"previewers":{"title":"Previewers","description":"Previewers for angles, colors, gradients, easing and time.","require":"css-extras","owner":"Golmote"},"autoloader":{"title":"Autoloader","description":"Automatically loads the needed languages to highlight the code blocks.","owner":"Golmote","noCSS":true},"keep-markup":{"title":"Keep Markup","description":"Prevents custom markup from being dropped out during highlighting.","owner":"Golmote","optional":"normalize-whitespace","noCSS":true},"command-line":{"title":"Command Line","description":"Display a command line with a prompt and, optionally, the output/response from the commands.","owner":"chriswells0"},"unescaped-markup":{"title":"Unescaped Markup","description":"Write markup without having to escape anything."},"normalize-whitespace":{"title":"Normalize Whitespace","description":"Supports multiple operations to normalize whitespace in code blocks.","owner":"zeitgeist87","optional":"unescaped-markup","noCSS":true},"data-uri-highlight":{"title":"Data-URI Highlight","description":"Highlights data-URI contents.","owner":"Golmote","noCSS":true},"toolbar":{"title":"Toolbar","description":"Attach a toolbar for plugins to easily register buttons on the top of a code block.","owner":"mAAdhaTTah"},"copy-to-clipboard":{"title":"Copy to Clipboard Button","description":"Add a button that copies the code block to the clipboard when clicked.","owner":"mAAdhaTTah","require":"toolbar","noCSS":true},"download-button":{"title":"Download Button","description":"A button in the toolbar of a code block adding a convenient way to download a code file.","owner":"Golmote","require":"toolbar","noCSS":true},"match-braces":{"title":"Match braces","description":"Highlights matching braces.","owner":"RunDevelopment"},"diff-highlight":{"title":"Diff Highlight","description":"Highlights the code inside diff blocks.","owner":"RunDevelopment","require":"diff"},"filter-highlight-all":{"title":"Filter highlightAll","description":"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.","owner":"RunDevelopment","noCSS":true},"treeview":{"title":"Treeview","description":"A language with special styles to highlight file system tree structures.","owner":"Golmote"}}}; if (typeof module !== 'undefined' && module.exports) { module.exports = components; } \ No newline at end of file diff --git a/components.json b/components.json index d2428a09b5..dfc7385c22 100644 --- a/components.json +++ b/components.json @@ -1424,6 +1424,11 @@ "title": "WebAssembly", "owner": "Golmote" }, + "web-idl": { + "title": "Web IDL", + "alias": "webidl", + "owner": "RunDevelopment" + }, "wiki": { "title": "Wiki markup", "require": "markup", diff --git a/components/prism-web-idl.js b/components/prism-web-idl.js new file mode 100644 index 0000000000..939ec8922d --- /dev/null +++ b/components/prism-web-idl.js @@ -0,0 +1,101 @@ +(function (Prism) { + + var id = /(?:\B-|\b_|\b)[A-Za-z][\w-]*(?![\w-])/.source; + var type = + '(?:' + + /\b(?:unsigned\s+)?long\s+long(?![\w-])/.source + + '|' + + /\b(?:unrestricted|unsigned)\s+[a-z]+(?![\w-])/.source + + '|' + + /(?!(?:unrestricted|unsigned)\b)/.source + id + /(?:\s*<(?:[^<>]|<[^<>]*>)*>)?/.source + + ')' + /(?:\s*\?)?/.source; + + var typeInside = {}; + + Prism.languages['web-idl'] = { + 'comment': { + pattern: /\/\/.*|\/\*[\s\S]*?\*\//, + greedy: true + }, + 'string': { + pattern: /"[^"]*"/, + greedy: true + }, + + 'namespace': { + pattern: RegExp(/(\bnamespace\s+)/.source + id), + lookbehind: true, + }, + 'class-name': [ + { + pattern: /(^|[^\w-])(?:iterable|maplike|setlike)\s*<(?:[^<>]|<[^<>]*>)*>/, + lookbehind: true, + inside: typeInside + }, + { + pattern: RegExp(/(\b(?:attribute|const|deleter|getter|optional|setter)\s+)/.source + type), + lookbehind: true, + inside: typeInside + }, + { + // callback return type + pattern: RegExp('(' + /\bcallback\s+/.source + id + /\s*=\s*/.source + ')' + type), + lookbehind: true, + inside: typeInside + }, + { + // typedef + pattern: RegExp(/(\btypedef\b\s*)/.source + type), + lookbehind: true, + inside: typeInside + }, + + { + pattern: RegExp(/(\b(?:callback|dictionary|enum|interface(?:\s+mixin)?)\s+)(?!(?:interface|mixin)\b)/.source + id), + lookbehind: true, + }, + { + // inheritance + pattern: RegExp(/(:\s*)/.source + id), + lookbehind: true, + }, + + // includes and implements + RegExp(id + /(?=\s+(?:implements|includes)\b)/.source), + { + pattern: RegExp(/(\b(?:implements|includes)\s+)/.source + id), + lookbehind: true, + }, + + { + // function return type, parameter types, and dictionary members + pattern: RegExp(type + '(?=' + /\s*(?:\.{3}\s*)?/.source + id + /\s*[(),;=]/.source + ')'), + inside: typeInside + }, + ], + + 'builtin': /\b(?:ArrayBuffer|BigInt64Array|BigUint64Array|ByteString|DOMString|DataView|Float32Array|Float64Array|FrozenArray|Int16Array|Int32Array|Int8Array|ObservableArray|Promise|USVString|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray)\b/, + 'keyword': [ + /\b(?:async|attribute|callback|const|constructor|deleter|dictionary|enum|getter|implements|includes|inherit|interface|mixin|namespace|null|optional|or|partial|readonly|required|setter|static|stringifier|typedef|unrestricted)\b/, + // type keywords + /\b(?:any|bigint|boolean|byte|double|float|iterable|long|maplike|object|octet|record|sequence|setlike|short|symbol|undefined|unsigned|void)\b/ + ], + 'boolean': /\b(?:false|true)\b/, + + 'number': { + pattern: /(^|[^\w-])-?(?:0x[0-9a-f]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|NaN|Infinity)(?![\w-])/i, + lookbehind: true + }, + 'operator': /\.{3}|[=:?<>-]/, + 'punctuation': /[(){}[\].,;]/ + }; + + for (var key in Prism.languages['web-idl']) { + if (key !== 'class-name') { + typeInside[key] = Prism.languages['web-idl'][key]; + } + } + + Prism.languages['webidl'] = Prism.languages['web-idl']; + +}(Prism)); diff --git a/components/prism-web-idl.min.js b/components/prism-web-idl.min.js new file mode 100644 index 0000000000..2ea1c79b73 --- /dev/null +++ b/components/prism-web-idl.min.js @@ -0,0 +1 @@ +!function(e){var n="(?:\\B-|\\b_|\\b)[A-Za-z][\\w-]*(?![\\w-])",t="(?:\\b(?:unsigned\\s+)?long\\s+long(?![\\w-])|\\b(?:unrestricted|unsigned)\\s+[a-z]+(?![\\w-])|(?!(?:unrestricted|unsigned)\\b)"+n+"(?:\\s*<(?:[^<>]|<[^<>]*>)*>)?)(?:\\s*\\?)?",i={};for(var r in e.languages["web-idl"]={comment:{pattern:/\/\/.*|\/\*[\s\S]*?\*\//,greedy:!0},string:{pattern:/"[^"]*"/,greedy:!0},namespace:{pattern:RegExp("(\\bnamespace\\s+)"+n),lookbehind:!0},"class-name":[{pattern:/(^|[^\w-])(?:iterable|maplike|setlike)\s*<(?:[^<>]|<[^<>]*>)*>/,lookbehind:!0,inside:i},{pattern:RegExp("(\\b(?:attribute|const|deleter|getter|optional|setter)\\s+)"+t),lookbehind:!0,inside:i},{pattern:RegExp("(\\bcallback\\s+"+n+"\\s*=\\s*)"+t),lookbehind:!0,inside:i},{pattern:RegExp("(\\btypedef\\b\\s*)"+t),lookbehind:!0,inside:i},{pattern:RegExp("(\\b(?:callback|dictionary|enum|interface(?:\\s+mixin)?)\\s+)(?!(?:interface|mixin)\\b)"+n),lookbehind:!0},{pattern:RegExp("(:\\s*)"+n),lookbehind:!0},RegExp(n+"(?=\\s+(?:implements|includes)\\b)"),{pattern:RegExp("(\\b(?:implements|includes)\\s+)"+n),lookbehind:!0},{pattern:RegExp(t+"(?=\\s*(?:\\.{3}\\s*)?"+n+"\\s*[(),;=])"),inside:i}],builtin:/\b(?:ArrayBuffer|BigInt64Array|BigUint64Array|ByteString|DOMString|DataView|Float32Array|Float64Array|FrozenArray|Int16Array|Int32Array|Int8Array|ObservableArray|Promise|USVString|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray)\b/,keyword:[/\b(?:async|attribute|callback|const|constructor|deleter|dictionary|enum|getter|implements|includes|inherit|interface|mixin|namespace|null|optional|or|partial|readonly|required|setter|static|stringifier|typedef|unrestricted)\b/,/\b(?:any|bigint|boolean|byte|double|float|iterable|long|maplike|object|octet|record|sequence|setlike|short|symbol|undefined|unsigned|void)\b/],boolean:/\b(?:false|true)\b/,number:{pattern:/(^|[^\w-])-?(?:0x[0-9a-f]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|NaN|Infinity)(?![\w-])/i,lookbehind:!0},operator:/\.{3}|[=:?<>-]/,punctuation:/[(){}[\].,;]/},e.languages["web-idl"])"class-name"!==r&&(i[r]=e.languages["web-idl"][r]);e.languages.webidl=e.languages["web-idl"]}(Prism); \ No newline at end of file diff --git a/examples/prism-web-idl.html b/examples/prism-web-idl.html new file mode 100644 index 0000000000..7f2c9a91f1 --- /dev/null +++ b/examples/prism-web-idl.html @@ -0,0 +1,28 @@ +

            Full example

            +
            [Exposed=Window]
            +interface Paint { };
            +
            +[Exposed=Window]
            +interface SolidColor : Paint {
            +	attribute double red;
            +	attribute double green;
            +	attribute double blue;
            +};
            +
            +[Exposed=Window]
            +interface Pattern : Paint {
            +	attribute DOMString imageURL;
            +};
            +
            +[Exposed=Window]
            +interface GraphicalWindow {
            +	constructor();
            +	readonly attribute unsigned long width;
            +	readonly attribute unsigned long height;
            +
            +	attribute Paint currentPaint;
            +
            +	undefined drawRectangle(double x, double y, double width, double height);
            +
            +	undefined drawText(double x, double y, DOMString text);
            +};
            diff --git a/plugins/autoloader/prism-autoloader.js b/plugins/autoloader/prism-autoloader.js index eaab16b686..ef9aaae88f 100644 --- a/plugins/autoloader/prism-autoloader.js +++ b/plugins/autoloader/prism-autoloader.js @@ -250,6 +250,7 @@ "url": "uri", "vb": "visual-basic", "vba": "visual-basic", + "webidl": "web-idl", "mathematica": "wolfram", "nb": "wolfram", "wl": "wolfram", diff --git a/plugins/autoloader/prism-autoloader.min.js b/plugins/autoloader/prism-autoloader.min.js index 62645b3560..e16e8cfcb2 100644 --- a/plugins/autoloader/prism-autoloader.min.js +++ b/plugins/autoloader/prism-autoloader.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof Prism&&"undefined"!=typeof document){var l={javascript:"clike",actionscript:"javascript",apex:["clike","sql"],arduino:"cpp",aspnet:["markup","csharp"],birb:"clike",bison:"c",c:"clike",csharp:"clike",cpp:"c",cfscript:"clike",chaiscript:["clike","cpp"],coffeescript:"javascript",crystal:"ruby","css-extras":"css",d:"clike",dart:"clike",django:"markup-templating",ejs:["javascript","markup-templating"],etlua:["lua","markup-templating"],erb:["ruby","markup-templating"],fsharp:"clike","firestore-security-rules":"clike",flow:"javascript",ftl:"markup-templating",gml:"clike",glsl:"c",go:"clike",groovy:"clike",haml:"ruby",handlebars:"markup-templating",haxe:"clike",hlsl:"c",idris:"haskell",java:"clike",javadoc:["markup","java","javadoclike"],jolie:"clike",jsdoc:["javascript","javadoclike","typescript"],"js-extras":"javascript",json5:"json",jsonp:"json","js-templates":"javascript",kotlin:"clike",latte:["clike","markup-templating","php"],less:"css",lilypond:"scheme",liquid:"markup-templating",markdown:"markup","markup-templating":"markup",mongodb:"javascript",n4js:"javascript",objectivec:"c",opencl:"c",parser:"markup",php:"markup-templating",phpdoc:["php","javadoclike"],"php-extras":"php",plsql:"sql",processing:"clike",protobuf:"clike",pug:["markup","javascript"],purebasic:"clike",purescript:"haskell",qsharp:"clike",qml:"javascript",qore:"clike",racket:"scheme",cshtml:["markup","csharp"],jsx:["markup","javascript"],tsx:["jsx","typescript"],reason:"clike",ruby:"clike",sass:"css",scss:"css",scala:"java","shell-session":"bash",smarty:"markup-templating",solidity:"clike",soy:"markup-templating",sparql:"turtle",sqf:"clike",squirrel:"clike","t4-cs":["t4-templating","csharp"],"t4-vb":["t4-templating","vbnet"],tap:"yaml",tt2:["clike","markup-templating"],textile:"markup",twig:"markup",typescript:"javascript",v:"clike",vala:"clike",vbnet:"basic",velocity:"markup",wiki:"markup",xeora:"markup","xml-doc":"markup",xquery:"markup"},n={html:"markup",xml:"markup",svg:"markup",mathml:"markup",ssml:"markup",atom:"markup",rss:"markup",js:"javascript",g4:"antlr4",ino:"arduino",adoc:"asciidoc",avs:"avisynth",avdl:"avro-idl",shell:"bash",shortcode:"bbcode",rbnf:"bnf",oscript:"bsl",cs:"csharp",dotnet:"csharp",cfc:"cfscript",coffee:"coffeescript",conc:"concurnas",jinja2:"django","dns-zone":"dns-zone-file",dockerfile:"docker",gv:"dot",eta:"ejs",xlsx:"excel-formula",xls:"excel-formula",gamemakerlanguage:"gml",gni:"gn",hbs:"handlebars",hs:"haskell",idr:"idris",gitignore:"ignore",hgignore:"ignore",npmignore:"ignore",webmanifest:"json",kt:"kotlin",kts:"kotlin",kum:"kumir",tex:"latex",context:"latex",ly:"lilypond",emacs:"lisp",elisp:"lisp","emacs-lisp":"lisp",md:"markdown",moon:"moonscript",n4jsd:"n4js",nani:"naniscript",objc:"objectivec",qasm:"openqasm",objectpascal:"pascal",px:"pcaxis",pcode:"peoplecode",pq:"powerquery",mscript:"powerquery",pbfasm:"purebasic",purs:"purescript",py:"python",qs:"qsharp",rkt:"racket",razor:"cshtml",rpy:"renpy",robot:"robotframework",rb:"ruby","sh-session":"shell-session",shellsession:"shell-session",smlnj:"sml",sol:"solidity",sln:"solution-file",rq:"sparql",t4:"t4-cs",trickle:"tremor",troy:"tremor",trig:"turtle",ts:"typescript",tsconfig:"typoscript",uscript:"unrealscript",uc:"unrealscript",url:"uri",vb:"visual-basic",vba:"visual-basic",mathematica:"wolfram",nb:"wolfram",wl:"wolfram",xeoracube:"xeora",yml:"yaml"},p={},e="components/",a=Prism.util.currentScript();if(a){var r=/\bplugins\/autoloader\/prism-autoloader\.(?:min\.)?js(?:\?[^\r\n/]*)?$/i,s=/(^|\/)[\w-]+\.(?:min\.)?js(?:\?[^\r\n/]*)?$/i,i=a.getAttribute("data-autoloader-path");if(null!=i)e=i.trim().replace(/\/?$/,"/");else{var t=a.src;r.test(t)?e=t.replace(r,"components/"):s.test(t)&&(e=t.replace(s,"$1components/"))}}var o=Prism.plugins.autoloader={languages_path:e,use_minified:!0,loadLanguages:m};Prism.hooks.add("complete",function(e){var a=e.element,r=e.language;if(a&&r&&"none"!==r){var s=function(e){var a=(e.getAttribute("data-dependencies")||"").trim();if(!a){var r=e.parentElement;r&&"pre"===r.tagName.toLowerCase()&&(a=(r.getAttribute("data-dependencies")||"").trim())}return a?a.split(/\s*,\s*/g):[]}(a);/^diff-./i.test(r)?(s.push("diff"),s.push(r.substr("diff-".length))):s.push(r),s.every(u)||m(s,function(){Prism.highlightElement(a)})}})}function u(e){if(0<=e.indexOf("!"))return!1;if((e=n[e]||e)in Prism.languages)return!0;var a=p[e];return a&&!a.error&&!1===a.loading}function m(e,a,r){"string"==typeof e&&(e=[e]);var s=e.length,i=0,t=!1;function c(){t||++i===s&&a&&a(e)}0!==s?e.forEach(function(e){!function(a,r,s){var i=0<=a.indexOf("!");function e(){var e=p[a];e||(e=p[a]={callbacks:[]}),e.callbacks.push({success:r,error:s}),!i&&u(a)?k(a,"success"):!i&&e.error?k(a,"error"):!i&&e.loading||(e.loading=!0,e.error=!1,function(e,a,r){var s=document.createElement("script");s.src=e,s.async=!0,s.onload=function(){document.body.removeChild(s),a&&a()},s.onerror=function(){document.body.removeChild(s),r&&r()},document.body.appendChild(s)}(function(e){return o.languages_path+"prism-"+e+(o.use_minified?".min":"")+".js"}(a),function(){e.loading=!1,k(a,"success")},function(){e.loading=!1,e.error=!0,k(a,"error")}))}a=a.replace("!",""),a=n[a]||a;var t=l[a];t&&t.length?m(t,e,s):e()}(e,c,function(){t||(t=!0,r&&r(e))})}):a&&setTimeout(a,0)}function k(e,a){if(p[e]){for(var r=p[e].callbacks,s=0,i=r.length;s; +}; + +// dictionary + +dictionary identifier { + type identifier; +}; +dictionary identifier { + type identifier = "value"; +}; +dictionary identifier { + required type identifier; +}; +dictionary B : A { + long b; + long a; +}; + +// callback + +callback AsyncOperationCallback = undefined (DOMString status); + +// enum + +enum MealType { "rice", "noodles", "other" }; + +// typedef + +typedef sequence Points; + +// includes and implements +Foo includes Bar; +Foo implements Bar; + +---------------------------------------------------- + +[ + ["comment", "// names"], + + ["keyword", "interface"], + ["class-name", "interface_identifier"], + ["punctuation", "{"], + ["comment", "/* interface_members... */"], + ["punctuation", "}"], + ["punctuation", ";"], + + ["keyword", "partial"], + ["keyword", "interface"], + ["class-name", "interface_identifier"], + ["punctuation", "{"], + ["comment", "/* interface_members... */"], + ["punctuation", "}"], + ["punctuation", ";"], + + ["keyword", "dictionary"], + ["class-name", "dictionary_identifier"], + ["punctuation", "{"], + ["comment", "/* dictionary_members... */"], + ["punctuation", "}"], + ["punctuation", ";"], + + ["keyword", "partial"], + ["keyword", "dictionary"], + ["class-name", "dictionary_identifier"], + ["punctuation", "{"], + ["comment", "/* dictionary_members... */"], + ["punctuation", "}"], + ["punctuation", ";"], + + ["keyword", "enum"], + ["class-name", "enumeration_identifier"], + ["punctuation", "{"], + ["string", "\"enum\""], + ["punctuation", ","], + ["string", "\"values\""], + ["comment", "/* , ... */"], + ["punctuation", "}"], + ["punctuation", ";"], + + ["keyword", "callback"], + ["class-name", "callback_identifier"], + ["operator", "="], + ["class-name", ["return_type"]], + ["punctuation", "("], + ["comment", "/* arguments... */"], + ["punctuation", ")"], + ["punctuation", ";"], + + ["keyword", "callback"], + ["keyword", "interface"], + ["class-name", "callback_interface_identifier"], + ["punctuation", "{"], + ["comment", "/* interface_members... */"], + ["punctuation", "}"], + ["punctuation", ";"], + + ["comment", "// interfaces"], + + ["keyword", "interface"], + ["class-name", "interface_identifier"], + ["punctuation", "{"], + + ["class-name", ["return_type"]], + " identifier", + ["punctuation", "("], + ["punctuation", "["], + "extended_attributes", + ["punctuation", "]"], + ["class-name", ["type"]], + " identifier", + ["punctuation", ","], + ["punctuation", "["], + "extended_attributes", + ["punctuation", "]"], + ["class-name", ["type"]], + " identifier", + ["punctuation", ")"], + ["punctuation", ";"], + + ["punctuation", "}"], + ["punctuation", ";"], + + ["keyword", "interface"], + ["class-name", "interface_identifier"], + ["punctuation", "{"], + + ["class-name", ["return_type"]], + " identifier", + ["punctuation", "("], + ["class-name", ["type"]], + ["operator", "..."], + " identifier", + ["punctuation", ")"], + ["punctuation", ";"], + + ["class-name", ["return_type"]], + " identifier", + ["punctuation", "("], + ["class-name", ["type"]], + " identifier", + ["punctuation", ","], + ["class-name", ["type"]], + ["operator", "..."], + " identifier", + ["punctuation", ")"], + ["punctuation", ";"], + + ["punctuation", "}"], + ["punctuation", ";"], + + ["keyword", "interface"], + ["class-name", "SolidColor"], + ["operator", ":"], + ["class-name", "Paint"], + ["punctuation", "{"], + + ["keyword", "constructor"], + ["punctuation", "("], + ["class-name", [ + ["keyword", "double"] + ]], + " radius", + ["punctuation", ")"], + ["punctuation", ";"], + + ["keyword", "attribute"], + ["class-name", [ + ["keyword", "double"] + ]], + " red", + ["punctuation", ";"], + + ["keyword", "readonly"], + ["keyword", "attribute"], + ["class-name", [ + ["keyword", "unsigned"], + ["keyword", "long"] + ]], + " width", + ["punctuation", ";"], + + ["class-name", [ + ["keyword", "undefined"] + ]], + " drawText", + ["punctuation", "("], + ["class-name", [ + ["keyword", "double"] + ]], + " x", + ["punctuation", ","], + ["class-name", [ + ["keyword", "double"] + ]], + " y", + ["punctuation", ","], + ["class-name", [ + ["builtin", "DOMString"] + ]], + " text", + ["punctuation", ")"], + ["punctuation", ";"], + + ["keyword", "getter"], + ["class-name", [ + ["builtin", "DOMString"] + ]], + ["punctuation", "("], + ["class-name", [ + ["builtin", "DOMString"] + ]], + " keyName", + ["punctuation", ")"], + ["punctuation", ";"], + + ["keyword", "getter"], + ["class-name", [ + ["builtin", "DOMString"] + ]], + " foo", + ["punctuation", "("], + ["class-name", [ + ["builtin", "DOMString"] + ]], + " keyName", + ["punctuation", ")"], + ["punctuation", ";"], + + ["class-name", [ + ["keyword", "boolean"] + ]], + " hasAddressForName", + ["punctuation", "("], + ["class-name", [ + ["builtin", "USVString"] + ]], + " name", + ["punctuation", ","], + ["keyword", "optional"], + ["class-name", ["LookupOptions"]], + " options ", + ["operator", "="], + ["punctuation", "{"], + ["punctuation", "}"], + ["punctuation", ")"], + ["punctuation", ";"], + + ["keyword", "const"], + ["class-name", [ + ["keyword", "unsigned"], + ["keyword", "long"] + ]], + " BIT_MASK ", + ["operator", "="], + ["number", "0x0000fc00"], + ["punctuation", ";"], + + ["class-name", [ + ["keyword", "iterable"], + ["operator", "<"], + ["builtin", "DOMString"], + ["punctuation", ","], + " Session", + ["operator", ">"] + ]], + ["punctuation", ";"], + + ["punctuation", "}"], + ["punctuation", ";"], + + ["comment", "// dictionary"], + + ["keyword", "dictionary"], + ["class-name", "identifier"], + ["punctuation", "{"], + + ["class-name", ["type"]], + " identifier", + ["punctuation", ";"], + + ["punctuation", "}"], + ["punctuation", ";"], + + ["keyword", "dictionary"], + ["class-name", "identifier"], + ["punctuation", "{"], + + ["class-name", ["type"]], + " identifier ", + ["operator", "="], + ["string", "\"value\""], + ["punctuation", ";"], + + ["punctuation", "}"], + ["punctuation", ";"], + + ["keyword", "dictionary"], + ["class-name", "identifier"], + ["punctuation", "{"], + + ["keyword", "required"], + ["class-name", ["type"]], + " identifier", + ["punctuation", ";"], + + ["punctuation", "}"], + ["punctuation", ";"], + + ["keyword", "dictionary"], + ["class-name", "B"], + ["operator", ":"], + ["class-name", "A"], + ["punctuation", "{"], + + ["class-name", [ + ["keyword", "long"] + ]], + " b", + ["punctuation", ";"], + + ["class-name", [ + ["keyword", "long"] + ]], + " a", + ["punctuation", ";"], + + ["punctuation", "}"], + ["punctuation", ";"], + + ["comment", "// callback"], + + ["keyword", "callback"], + ["class-name", "AsyncOperationCallback"], + ["operator", "="], + ["class-name", [ + ["keyword", "undefined"] + ]], + ["punctuation", "("], + ["class-name", [ + ["builtin", "DOMString"] + ]], + " status", + ["punctuation", ")"], + ["punctuation", ";"], + + ["comment", "// enum"], + + ["keyword", "enum"], + ["class-name", "MealType"], + ["punctuation", "{"], + ["string", "\"rice\""], + ["punctuation", ","], + ["string", "\"noodles\""], + ["punctuation", ","], + ["string", "\"other\""], + ["punctuation", "}"], + ["punctuation", ";"], + + ["comment", "// typedef"], + + ["keyword", "typedef"], + ["class-name", [ + ["keyword", "sequence"], + ["operator", "<"], + "Point", + ["operator", ">"] + ]], + " Points", + ["punctuation", ";"], + + ["comment", "// includes and implements"], + + ["class-name", "Foo"], + ["keyword", "includes"], + ["class-name", "Bar"], + ["punctuation", ";"], + + ["class-name", "Foo"], + ["keyword", "implements"], + ["class-name", "Bar"], + ["punctuation", ";"] +] diff --git a/tests/languages/web-idl/comment_feature.test b/tests/languages/web-idl/comment_feature.test new file mode 100644 index 0000000000..a4a1d8faf2 --- /dev/null +++ b/tests/languages/web-idl/comment_feature.test @@ -0,0 +1,9 @@ +// comment +/* comment */ + +---------------------------------------------------- + +[ + ["comment", "// comment"], + ["comment", "/* comment */"] +] diff --git a/tests/languages/web-idl/keyword_feature.test b/tests/languages/web-idl/keyword_feature.test new file mode 100644 index 0000000000..b3c3130cf4 --- /dev/null +++ b/tests/languages/web-idl/keyword_feature.test @@ -0,0 +1,55 @@ +async; +attribute; +callback; +const; +constructor; +deleter; +dictionary; +enum; +getter; +includes; +inherit; +interface; +mixin; +namespace; +null; +optional; +or; +partial; +readonly; +required; +setter; +static; +stringifier; +typedef; +unrestricted; + +---------------------------------------------------- + +[ + ["keyword", "async"], ["punctuation", ";"], + ["keyword", "attribute"], ["punctuation", ";"], + ["keyword", "callback"], ["punctuation", ";"], + ["keyword", "const"], ["punctuation", ";"], + ["keyword", "constructor"], ["punctuation", ";"], + ["keyword", "deleter"], ["punctuation", ";"], + ["keyword", "dictionary"], ["punctuation", ";"], + ["keyword", "enum"], ["punctuation", ";"], + ["keyword", "getter"], ["punctuation", ";"], + ["keyword", "includes"], ["punctuation", ";"], + ["keyword", "inherit"], ["punctuation", ";"], + ["keyword", "interface"], ["punctuation", ";"], + ["keyword", "mixin"], ["punctuation", ";"], + ["keyword", "namespace"], ["punctuation", ";"], + ["keyword", "null"], ["punctuation", ";"], + ["keyword", "optional"], ["punctuation", ";"], + ["keyword", "or"], ["punctuation", ";"], + ["keyword", "partial"], ["punctuation", ";"], + ["keyword", "readonly"], ["punctuation", ";"], + ["keyword", "required"], ["punctuation", ";"], + ["keyword", "setter"], ["punctuation", ";"], + ["keyword", "static"], ["punctuation", ";"], + ["keyword", "stringifier"], ["punctuation", ";"], + ["keyword", "typedef"], ["punctuation", ";"], + ["keyword", "unrestricted"], ["punctuation", ";"] +] diff --git a/tests/languages/web-idl/namespace_feature.test b/tests/languages/web-idl/namespace_feature.test new file mode 100644 index 0000000000..7ef2734ecf --- /dev/null +++ b/tests/languages/web-idl/namespace_feature.test @@ -0,0 +1,30 @@ +namespace SomeNamespace { + /* namespace_members... */ +}; + +partial namespace SomeNamespace { + /* namespace_members... */ +}; + +---------------------------------------------------- + +[ + ["keyword", "namespace"], + ["namespace", "SomeNamespace"], + ["punctuation", "{"], + + ["comment", "/* namespace_members... */"], + + ["punctuation", "}"], + ["punctuation", ";"], + + ["keyword", "partial"], + ["keyword", "namespace"], + ["namespace", "SomeNamespace"], + ["punctuation", "{"], + + ["comment", "/* namespace_members... */"], + + ["punctuation", "}"], + ["punctuation", ";"] +] diff --git a/tests/languages/web-idl/number_feature.test b/tests/languages/web-idl/number_feature.test new file mode 100644 index 0000000000..72d317370c --- /dev/null +++ b/tests/languages/web-idl/number_feature.test @@ -0,0 +1,29 @@ +0xfff +123423 +-123423 + +123.456 +123.e64 +123.324e-4 +.324e+4 + +NaN +Infinity +-Infinity + +---------------------------------------------------- + +[ + ["number", "0xfff"], + ["number", "123423"], + ["number", "-123423"], + + ["number", "123.456"], + ["number", "123.e64"], + ["number", "123.324e-4"], + ["number", ".324e+4"], + + ["number", "NaN"], + ["number", "Infinity"], + ["number", "-Infinity"] +] diff --git a/tests/languages/web-idl/operator_feature.test b/tests/languages/web-idl/operator_feature.test new file mode 100644 index 0000000000..b27e286444 --- /dev/null +++ b/tests/languages/web-idl/operator_feature.test @@ -0,0 +1,14 @@ +... += : ? < > + +---------------------------------------------------- + +[ + ["operator", "..."], + + ["operator", "="], + ["operator", ":"], + ["operator", "?"], + ["operator", "<"], + ["operator", ">"] +] diff --git a/tests/languages/web-idl/primitive-type_feature.test b/tests/languages/web-idl/primitive-type_feature.test new file mode 100644 index 0000000000..a56623fa2f --- /dev/null +++ b/tests/languages/web-idl/primitive-type_feature.test @@ -0,0 +1,43 @@ +any +bigint +boolean +byte +double +float +iterable +long +maplike +object +octet +record +sequence +setlike +short +symbol +undefined +unsigned +void + +---------------------------------------------------- + +[ + ["keyword", "any"], + ["keyword", "bigint"], + ["keyword", "boolean"], + ["keyword", "byte"], + ["keyword", "double"], + ["keyword", "float"], + ["keyword", "iterable"], + ["keyword", "long"], + ["keyword", "maplike"], + ["keyword", "object"], + ["keyword", "octet"], + ["keyword", "record"], + ["keyword", "sequence"], + ["keyword", "setlike"], + ["keyword", "short"], + ["keyword", "symbol"], + ["keyword", "undefined"], + ["keyword", "unsigned"], + ["keyword", "void"] +] diff --git a/tests/languages/web-idl/punctuation_feature.test b/tests/languages/web-idl/punctuation_feature.test new file mode 100644 index 0000000000..4437034113 --- /dev/null +++ b/tests/languages/web-idl/punctuation_feature.test @@ -0,0 +1,17 @@ +( ) [ ] { } +. , ; + +---------------------------------------------------- + +[ + ["punctuation", "("], + ["punctuation", ")"], + ["punctuation", "["], + ["punctuation", "]"], + ["punctuation", "{"], + ["punctuation", "}"], + + ["punctuation", "."], + ["punctuation", ","], + ["punctuation", ";"] +] diff --git a/tests/languages/web-idl/string_feature.test b/tests/languages/web-idl/string_feature.test new file mode 100644 index 0000000000..c6f23ce437 --- /dev/null +++ b/tests/languages/web-idl/string_feature.test @@ -0,0 +1,11 @@ +"" +"foo" +"\" + +---------------------------------------------------- + +[ + ["string", "\"\""], + ["string", "\"foo\""], + ["string", "\"\\\""] +] From e7ba877bc1ba4980072a61336bbcf9652ed01771 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Mon, 11 Oct 2021 16:54:19 +0200 Subject: [PATCH 0963/1100] PL/SQL: Updated keywords + other improvements (#3109) --- components/prism-plsql.js | 41 +- components/prism-plsql.min.js | 2 +- tests/languages/plsql/keyword_feature.test | 392 ++++++++++++++++---- tests/languages/plsql/label_feature.test | 7 + tests/languages/plsql/operator_feature.test | 37 +- 5 files changed, 386 insertions(+), 93 deletions(-) create mode 100644 tests/languages/plsql/label_feature.test diff --git a/components/prism-plsql.js b/components/prism-plsql.js index 0197bc383a..15967b9ed1 100644 --- a/components/prism-plsql.js +++ b/components/prism-plsql.js @@ -1,26 +1,17 @@ -(function (Prism) { +Prism.languages.plsql = Prism.languages.extend('sql', { + 'comment': { + pattern: /\/\*[\s\S]*?\*\/|--.*/, + greedy: true + }, + // https://docs.oracle.com/en/database/oracle/oracle-database/21/lnpls/plsql-reserved-words-keywords.html + 'keyword': /\b(?:A|ACCESSIBLE|ADD|AGENT|AGGREGATE|ALL|ALTER|AND|ANY|ARRAY|AS|ASC|AT|ATTRIBUTE|AUTHID|AVG|BEGIN|BETWEEN|BFILE_BASE|BINARY|BLOB_BASE|BLOCK|BODY|BOTH|BOUND|BULK|BY|BYTE|C|CALL|CALLING|CASCADE|CASE|CHAR|CHARACTER|CHARSET|CHARSETFORM|CHARSETID|CHAR_BASE|CHECK|CLOB_BASE|CLONE|CLOSE|CLUSTER|CLUSTERS|COLAUTH|COLLECT|COLUMNS|COMMENT|COMMIT|COMMITTED|COMPILED|COMPRESS|CONNECT|CONSTANT|CONSTRUCTOR|CONTEXT|CONTINUE|CONVERT|COUNT|CRASH|CREATE|CREDENTIAL|CURRENT|CURSOR|CUSTOMDATUM|DANGLING|DATA|DATE|DATE_BASE|DAY|DECLARE|DEFAULT|DEFINE|DELETE|DESC|DETERMINISTIC|DIRECTORY|DISTINCT|DOUBLE|DROP|DURATION|ELEMENT|ELSE|ELSIF|EMPTY|END|ESCAPE|EXCEPT|EXCEPTION|EXCEPTIONS|EXCLUSIVE|EXECUTE|EXISTS|EXIT|EXTERNAL|FETCH|FINAL|FIRST|FIXED|FLOAT|FOR|FORALL|FORCE|FROM|FUNCTION|GENERAL|GOTO|GRANT|GROUP|HASH|HAVING|HEAP|HIDDEN|HOUR|IDENTIFIED|IF|IMMEDIATE|IMMUTABLE|IN|INCLUDING|INDEX|INDEXES|INDICATOR|INDICES|INFINITE|INSERT|INSTANTIABLE|INT|INTERFACE|INTERSECT|INTERVAL|INTO|INVALIDATE|IS|ISOLATION|JAVA|LANGUAGE|LARGE|LEADING|LENGTH|LEVEL|LIBRARY|LIKE|LIKE2|LIKE4|LIKEC|LIMIT|LIMITED|LOCAL|LOCK|LONG|LOOP|MAP|MAX|MAXLEN|MEMBER|MERGE|MIN|MINUS|MINUTE|MOD|MODE|MODIFY|MONTH|MULTISET|MUTABLE|NAME|NAN|NATIONAL|NATIVE|NCHAR|NEW|NOCOMPRESS|NOCOPY|NOT|NOWAIT|NULL|NUMBER_BASE|OBJECT|OCICOLL|OCIDATE|OCIDATETIME|OCIDURATION|OCIINTERVAL|OCILOBLOCATOR|OCINUMBER|OCIRAW|OCIREF|OCIREFCURSOR|OCIROWID|OCISTRING|OCITYPE|OF|OLD|ON|ONLY|OPAQUE|OPEN|OPERATOR|OPTION|OR|ORACLE|ORADATA|ORDER|ORGANIZATION|ORLANY|ORLVARY|OTHERS|OUT|OVERLAPS|OVERRIDING|PACKAGE|PARALLEL_ENABLE|PARAMETER|PARAMETERS|PARENT|PARTITION|PASCAL|PERSISTABLE|PIPE|PIPELINED|PLUGGABLE|POLYMORPHIC|PRAGMA|PRECISION|PRIOR|PRIVATE|PROCEDURE|PUBLIC|RAISE|RANGE|RAW|READ|RECORD|REF|REFERENCE|RELIES_ON|REM|REMAINDER|RENAME|RESOURCE|RESULT|RESULT_CACHE|RETURN|RETURNING|REVERSE|REVOKE|ROLLBACK|ROW|SAMPLE|SAVE|SAVEPOINT|SB1|SB2|SB4|SECOND|SEGMENT|SELECT|SELF|SEPARATE|SEQUENCE|SERIALIZABLE|SET|SHARE|SHORT|SIZE|SIZE_T|SOME|SPARSE|SQL|SQLCODE|SQLDATA|SQLNAME|SQLSTATE|STANDARD|START|STATIC|STDDEV|STORED|STRING|STRUCT|STYLE|SUBMULTISET|SUBPARTITION|SUBSTITUTABLE|SUBTYPE|SUM|SYNONYM|TABAUTH|TABLE|TDO|THE|THEN|TIME|TIMESTAMP|TIMEZONE_ABBR|TIMEZONE_HOUR|TIMEZONE_MINUTE|TIMEZONE_REGION|TO|TRAILING|TRANSACTION|TRANSACTIONAL|TRUSTED|TYPE|UB1|UB2|UB4|UNDER|UNION|UNIQUE|UNPLUG|UNSIGNED|UNTRUSTED|UPDATE|USE|USING|VALIST|VALUE|VALUES|VARIABLE|VARIANCE|VARRAY|VARYING|VIEW|VIEWS|VOID|WHEN|WHERE|WHILE|WITH|WORK|WRAPPED|WRITE|YEAR|ZONE)\b/i, + // https://docs.oracle.com/en/database/oracle/oracle-database/21/lnpls/plsql-language-fundamentals.html#GUID-96A42F7C-7A71-4B90-8255-CA9C8BD9722E + 'operator': /:=?|=>|[<>^~!]=|\.\.|\|\||\*\*|[-+*/%<>=@]/ +}); - var plsql = Prism.languages.plsql = Prism.languages.extend('sql', { - 'comment': [ - /\/\*[\s\S]*?\*\//, - /--.*/ - ] - }); - - var keyword = plsql['keyword']; - if (!Array.isArray(keyword)) { - keyword = plsql['keyword'] = [keyword]; - } - keyword.unshift( - /\b(?:ACCESS|AGENT|AGGREGATE|ARRAY|ARROW|AT|ATTRIBUTE|AUDIT|AUTHID|BFILE_BASE|BLOB_BASE|BLOCK|BODY|BOTH|BOUND|BYTE|CALLING|CHARSET(?:FORM|ID)|CHAR_BASE|CLOB_BASE|CLUSTERS?|COLAUTH|COLLECT|COMPILED|COMPRESS|CONSTANT|CONSTRUCTOR|CONTEXT|CRASH|CUSTOMDATUM|DANGLING|DATE_BASE|DEFINE|DETERMINISTIC|DURATION|ELEMENT|EMPTY|EXCEPTIONS?|EXCLUSIVE|EXTERNAL|FINAL|FORALL|FORM|FOUND|GENERAL|HEAP|HIDDEN|IDENTIFIED|IMMEDIATE|INCLUDING|INCREMENT|INDEXES|INDICATOR|INDICES|INFINITE|INITIAL|INSTANTIABLE|INTERFACE|INVALIDATE|ISOPEN|JAVA|LARGE|LEADING|LENGTH|LIBRARY|LIKE[24C]|LIMITED|LONG|LOOP|MAP|MAXEXTENTS|MAXLEN|MEMBER|MINUS|MLSLABEL|MULTISET|NAME|NAN|NATIVE|NEW|NOAUDIT|NOCOMPRESS|NOCOPY|NOTFOUND|NOWAIT|NUMBER(?:_BASE)?|OBJECT|OCI(?:COLL|DATE|DATETIME|DURATION|INTERVAL|LOBLOCATOR|NUMBER|RAW|REF|REFCURSOR|ROWID|STRING|TYPE)|OFFLINE|ONLINE|ONLY|OPAQUE|OPERATOR|ORACLE|ORADATA|ORGANIZATION|ORL(?:ANY|VARY)|OTHERS|OVERLAPS|OVERRIDING|PACKAGE|PARALLEL_ENABLE|PARAMETERS?|PASCAL|PCTFREE|PIPE(?:LINED)?|PRAGMA|PRIOR|PRIVATE|RAISE|RANGE|RAW|RECORD|REF|REFERENCE|REM|REMAINDER|RESOURCE|RESULT|RETURNING|REVERSE|ROW(?:ID|NUM|TYPE)|SAMPLE|SB[124]|SEGMENT|SELF|SEPARATE|SEQUENCE|SHORT|SIZE(?:_T)?|SPARSE|SQL(?:CODE|DATA|NAME|STATE)|STANDARD|STATIC|STDDEV|STORED|STRING|STRUCT|STYLE|SUBMULTISET|SUBPARTITION|SUBSTITUTABLE|SUBTYPE|SUCCESSFUL|SYNONYM|SYSDATE|TABAUTH|TDO|THE|TIMEZONE_(?:ABBR|HOUR|MINUTE|REGION)|TRAILING|TRANSAC(?:TIONAL)?|TRUSTED|UB[124]|UID|UNDER|UNTRUSTED|VALIDATE|VALIST|VARCHAR2|VARIABLE|VARIANCE|VARRAY|VIEWS|VOID|WHENEVER|WRAPPED|ZONE)\b/i - ); - - var operator = plsql['operator']; - if (!Array.isArray(operator)) { - operator = plsql['operator'] = [operator]; - } - operator.unshift( - /:=/ - ); - -}(Prism)); +Prism.languages.insertBefore('plsql', 'operator', { + 'label': { + pattern: /<<\s*\w+\s*>>/, + alias: 'symbol' + }, +}); diff --git a/components/prism-plsql.min.js b/components/prism-plsql.min.js index ffd7438813..e20f68e456 100644 --- a/components/prism-plsql.min.js +++ b/components/prism-plsql.min.js @@ -1 +1 @@ -!function(E){var A=E.languages.plsql=E.languages.extend("sql",{comment:[/\/\*[\s\S]*?\*\//,/--.*/]}),T=A.keyword;Array.isArray(T)||(T=A.keyword=[T]),T.unshift(/\b(?:ACCESS|AGENT|AGGREGATE|ARRAY|ARROW|AT|ATTRIBUTE|AUDIT|AUTHID|BFILE_BASE|BLOB_BASE|BLOCK|BODY|BOTH|BOUND|BYTE|CALLING|CHARSET(?:FORM|ID)|CHAR_BASE|CLOB_BASE|CLUSTERS?|COLAUTH|COLLECT|COMPILED|COMPRESS|CONSTANT|CONSTRUCTOR|CONTEXT|CRASH|CUSTOMDATUM|DANGLING|DATE_BASE|DEFINE|DETERMINISTIC|DURATION|ELEMENT|EMPTY|EXCEPTIONS?|EXCLUSIVE|EXTERNAL|FINAL|FORALL|FORM|FOUND|GENERAL|HEAP|HIDDEN|IDENTIFIED|IMMEDIATE|INCLUDING|INCREMENT|INDEXES|INDICATOR|INDICES|INFINITE|INITIAL|INSTANTIABLE|INTERFACE|INVALIDATE|ISOPEN|JAVA|LARGE|LEADING|LENGTH|LIBRARY|LIKE[24C]|LIMITED|LONG|LOOP|MAP|MAXEXTENTS|MAXLEN|MEMBER|MINUS|MLSLABEL|MULTISET|NAME|NAN|NATIVE|NEW|NOAUDIT|NOCOMPRESS|NOCOPY|NOTFOUND|NOWAIT|NUMBER(?:_BASE)?|OBJECT|OCI(?:COLL|DATE|DATETIME|DURATION|INTERVAL|LOBLOCATOR|NUMBER|RAW|REF|REFCURSOR|ROWID|STRING|TYPE)|OFFLINE|ONLINE|ONLY|OPAQUE|OPERATOR|ORACLE|ORADATA|ORGANIZATION|ORL(?:ANY|VARY)|OTHERS|OVERLAPS|OVERRIDING|PACKAGE|PARALLEL_ENABLE|PARAMETERS?|PASCAL|PCTFREE|PIPE(?:LINED)?|PRAGMA|PRIOR|PRIVATE|RAISE|RANGE|RAW|RECORD|REF|REFERENCE|REM|REMAINDER|RESOURCE|RESULT|RETURNING|REVERSE|ROW(?:ID|NUM|TYPE)|SAMPLE|SB[124]|SEGMENT|SELF|SEPARATE|SEQUENCE|SHORT|SIZE(?:_T)?|SPARSE|SQL(?:CODE|DATA|NAME|STATE)|STANDARD|STATIC|STDDEV|STORED|STRING|STRUCT|STYLE|SUBMULTISET|SUBPARTITION|SUBSTITUTABLE|SUBTYPE|SUCCESSFUL|SYNONYM|SYSDATE|TABAUTH|TDO|THE|TIMEZONE_(?:ABBR|HOUR|MINUTE|REGION)|TRAILING|TRANSAC(?:TIONAL)?|TRUSTED|UB[124]|UID|UNDER|UNTRUSTED|VALIDATE|VALIST|VARCHAR2|VARIABLE|VARIANCE|VARRAY|VIEWS|VOID|WHENEVER|WRAPPED|ZONE)\b/i);var R=A.operator;Array.isArray(R)||(R=A.operator=[R]),R.unshift(/:=/)}(Prism); \ No newline at end of file +Prism.languages.plsql=Prism.languages.extend("sql",{comment:{pattern:/\/\*[\s\S]*?\*\/|--.*/,greedy:!0},keyword:/\b(?:A|ACCESSIBLE|ADD|AGENT|AGGREGATE|ALL|ALTER|AND|ANY|ARRAY|AS|ASC|AT|ATTRIBUTE|AUTHID|AVG|BEGIN|BETWEEN|BFILE_BASE|BINARY|BLOB_BASE|BLOCK|BODY|BOTH|BOUND|BULK|BY|BYTE|C|CALL|CALLING|CASCADE|CASE|CHAR|CHARACTER|CHARSET|CHARSETFORM|CHARSETID|CHAR_BASE|CHECK|CLOB_BASE|CLONE|CLOSE|CLUSTER|CLUSTERS|COLAUTH|COLLECT|COLUMNS|COMMENT|COMMIT|COMMITTED|COMPILED|COMPRESS|CONNECT|CONSTANT|CONSTRUCTOR|CONTEXT|CONTINUE|CONVERT|COUNT|CRASH|CREATE|CREDENTIAL|CURRENT|CURSOR|CUSTOMDATUM|DANGLING|DATA|DATE|DATE_BASE|DAY|DECLARE|DEFAULT|DEFINE|DELETE|DESC|DETERMINISTIC|DIRECTORY|DISTINCT|DOUBLE|DROP|DURATION|ELEMENT|ELSE|ELSIF|EMPTY|END|ESCAPE|EXCEPT|EXCEPTION|EXCEPTIONS|EXCLUSIVE|EXECUTE|EXISTS|EXIT|EXTERNAL|FETCH|FINAL|FIRST|FIXED|FLOAT|FOR|FORALL|FORCE|FROM|FUNCTION|GENERAL|GOTO|GRANT|GROUP|HASH|HAVING|HEAP|HIDDEN|HOUR|IDENTIFIED|IF|IMMEDIATE|IMMUTABLE|IN|INCLUDING|INDEX|INDEXES|INDICATOR|INDICES|INFINITE|INSERT|INSTANTIABLE|INT|INTERFACE|INTERSECT|INTERVAL|INTO|INVALIDATE|IS|ISOLATION|JAVA|LANGUAGE|LARGE|LEADING|LENGTH|LEVEL|LIBRARY|LIKE|LIKE2|LIKE4|LIKEC|LIMIT|LIMITED|LOCAL|LOCK|LONG|LOOP|MAP|MAX|MAXLEN|MEMBER|MERGE|MIN|MINUS|MINUTE|MOD|MODE|MODIFY|MONTH|MULTISET|MUTABLE|NAME|NAN|NATIONAL|NATIVE|NCHAR|NEW|NOCOMPRESS|NOCOPY|NOT|NOWAIT|NULL|NUMBER_BASE|OBJECT|OCICOLL|OCIDATE|OCIDATETIME|OCIDURATION|OCIINTERVAL|OCILOBLOCATOR|OCINUMBER|OCIRAW|OCIREF|OCIREFCURSOR|OCIROWID|OCISTRING|OCITYPE|OF|OLD|ON|ONLY|OPAQUE|OPEN|OPERATOR|OPTION|OR|ORACLE|ORADATA|ORDER|ORGANIZATION|ORLANY|ORLVARY|OTHERS|OUT|OVERLAPS|OVERRIDING|PACKAGE|PARALLEL_ENABLE|PARAMETER|PARAMETERS|PARENT|PARTITION|PASCAL|PERSISTABLE|PIPE|PIPELINED|PLUGGABLE|POLYMORPHIC|PRAGMA|PRECISION|PRIOR|PRIVATE|PROCEDURE|PUBLIC|RAISE|RANGE|RAW|READ|RECORD|REF|REFERENCE|RELIES_ON|REM|REMAINDER|RENAME|RESOURCE|RESULT|RESULT_CACHE|RETURN|RETURNING|REVERSE|REVOKE|ROLLBACK|ROW|SAMPLE|SAVE|SAVEPOINT|SB1|SB2|SB4|SECOND|SEGMENT|SELECT|SELF|SEPARATE|SEQUENCE|SERIALIZABLE|SET|SHARE|SHORT|SIZE|SIZE_T|SOME|SPARSE|SQL|SQLCODE|SQLDATA|SQLNAME|SQLSTATE|STANDARD|START|STATIC|STDDEV|STORED|STRING|STRUCT|STYLE|SUBMULTISET|SUBPARTITION|SUBSTITUTABLE|SUBTYPE|SUM|SYNONYM|TABAUTH|TABLE|TDO|THE|THEN|TIME|TIMESTAMP|TIMEZONE_ABBR|TIMEZONE_HOUR|TIMEZONE_MINUTE|TIMEZONE_REGION|TO|TRAILING|TRANSACTION|TRANSACTIONAL|TRUSTED|TYPE|UB1|UB2|UB4|UNDER|UNION|UNIQUE|UNPLUG|UNSIGNED|UNTRUSTED|UPDATE|USE|USING|VALIST|VALUE|VALUES|VARIABLE|VARIANCE|VARRAY|VARYING|VIEW|VIEWS|VOID|WHEN|WHERE|WHILE|WITH|WORK|WRAPPED|WRITE|YEAR|ZONE)\b/i,operator:/:=?|=>|[<>^~!]=|\.\.|\|\||\*\*|[-+*/%<>=@]/}),Prism.languages.insertBefore("plsql","operator",{label:{pattern:/<<\s*\w+\s*>>/,alias:"symbol"}}); \ No newline at end of file diff --git a/tests/languages/plsql/keyword_feature.test b/tests/languages/plsql/keyword_feature.test index e000f7273b..db916e7485 100644 --- a/tests/languages/plsql/keyword_feature.test +++ b/tests/languages/plsql/keyword_feature.test @@ -1,94 +1,181 @@ -ACCESS +A +ACCESSIBLE +ADD AGENT AGGREGATE +ALL +ALTER +AND +ANY ARRAY -ARROW +AS +ASC AT ATTRIBUTE -AUDIT AUTHID +AVG +BEGIN +BETWEEN BFILE_BASE +BINARY BLOB_BASE BLOCK BODY BOTH BOUND +BULK +BY BYTE +C +CALL CALLING +CASCADE +CASE +CHAR CHAR_BASE +CHARACTER +CHARSET CHARSETFORM CHARSETID +CHECK CLOB_BASE -COLAUTH -COLLECT +CLONE +CLOSE CLUSTER CLUSTERS +COLAUTH +COLLECT +COLUMNS +COMMENT +COMMIT +COMMITTED COMPILED COMPRESS +CONNECT CONSTANT CONSTRUCTOR CONTEXT +CONTINUE +CONVERT +COUNT CRASH +CREATE +CREDENTIAL +CURRENT +CURSOR CUSTOMDATUM DANGLING +DATA +DATE DATE_BASE +DAY +DECLARE +DEFAULT DEFINE +DELETE +DESC DETERMINISTIC +DIRECTORY +DISTINCT +DOUBLE +DROP DURATION ELEMENT +ELSE +ELSIF EMPTY +END +ESCAPE +EXCEPT EXCEPTION EXCEPTIONS EXCLUSIVE +EXECUTE +EXISTS +EXIT EXTERNAL +FETCH FINAL +FIRST +FIXED +FLOAT +FOR FORALL -FORM -FOUND +FORCE +FROM +FUNCTION GENERAL +GOTO +GRANT +GROUP +HASH +HAVING HEAP HIDDEN +HOUR IDENTIFIED +IF IMMEDIATE +IMMUTABLE +IN INCLUDING -INCREMENT -INDICATOR +INDEX INDEXES +INDICATOR INDICES INFINITE -INITIAL -ISOPEN +INSERT INSTANTIABLE +INT INTERFACE +INTERSECT +INTERVAL +INTO INVALIDATE +IS +ISOLATION JAVA +LANGUAGE LARGE LEADING LENGTH +LEVEL LIBRARY +LIKE LIKE2 LIKE4 LIKEC +LIMIT LIMITED +LOCAL +LOCK LONG LOOP MAP -MAXEXTENTS +MAX MAXLEN MEMBER +MERGE +MIN MINUS -MLSLABEL +MINUTE +MOD +MODE +MODIFY +MONTH MULTISET +MUTABLE NAME NAN +NATIONAL NATIVE +NCHAR NEW -NOAUDIT NOCOMPRESS NOCOPY -NOTFOUND +NOT NOWAIT -NUMBER +NULL NUMBER_BASE OBJECT OCICOLL @@ -104,62 +191,90 @@ OCIREFCURSOR OCIROWID OCISTRING OCITYPE -OFFLINE -ONLINE +OF +OLD +ON ONLY OPAQUE +OPEN OPERATOR +OPTION +OR ORACLE ORADATA +ORDER ORGANIZATION ORLANY ORLVARY OTHERS +OUT OVERLAPS OVERRIDING PACKAGE PARALLEL_ENABLE PARAMETER PARAMETERS +PARENT +PARTITION PASCAL -PCTFREE +PERSISTABLE PIPE PIPELINED +PLUGGABLE +POLYMORPHIC PRAGMA +PRECISION PRIOR PRIVATE +PROCEDURE +PUBLIC RAISE RANGE RAW +READ RECORD REF REFERENCE +RELIES_ON REM REMAINDER -RESULT +RENAME RESOURCE +RESULT +RESULT_CACHE +RETURN RETURNING REVERSE -ROWID -ROWNUM -ROWTYPE +REVOKE +ROLLBACK +ROW SAMPLE +SAVE +SAVEPOINT SB1 SB2 SB4 +SECOND SEGMENT +SELECT SELF SEPARATE SEQUENCE +SERIALIZABLE +SET +SHARE SHORT SIZE SIZE_T +SOME SPARSE +SQL SQLCODE SQLDATA SQLNAME SQLSTATE STANDARD +START STATIC STDDEV STORED @@ -170,132 +285,238 @@ SUBMULTISET SUBPARTITION SUBSTITUTABLE SUBTYPE -SUCCESSFUL +SUM SYNONYM -SYSDATE TABAUTH +TABLE TDO THE +THEN +TIME +TIMESTAMP TIMEZONE_ABBR TIMEZONE_HOUR TIMEZONE_MINUTE TIMEZONE_REGION +TO TRAILING -TRANSAC +TRANSACTION TRANSACTIONAL TRUSTED +TYPE UB1 UB2 UB4 -UID UNDER +UNION +UNIQUE +UNPLUG +UNSIGNED UNTRUSTED -VALIDATE +UPDATE +USE +USING VALIST -VARCHAR2 +VALUE +VALUES VARIABLE VARIANCE VARRAY +VARYING +VIEW VIEWS VOID -WHENEVER +WHEN +WHERE +WHILE +WITH +WORK WRAPPED +WRITE +YEAR ZONE ---------------------------------------------------- [ - ["keyword", "ACCESS"], + ["keyword", "A"], + ["keyword", "ACCESSIBLE"], + ["keyword", "ADD"], ["keyword", "AGENT"], ["keyword", "AGGREGATE"], + ["keyword", "ALL"], + ["keyword", "ALTER"], + ["keyword", "AND"], + ["keyword", "ANY"], ["keyword", "ARRAY"], - ["keyword", "ARROW"], + ["keyword", "AS"], + ["keyword", "ASC"], ["keyword", "AT"], ["keyword", "ATTRIBUTE"], - ["keyword", "AUDIT"], ["keyword", "AUTHID"], + ["keyword", "AVG"], + ["keyword", "BEGIN"], + ["keyword", "BETWEEN"], ["keyword", "BFILE_BASE"], + ["keyword", "BINARY"], ["keyword", "BLOB_BASE"], ["keyword", "BLOCK"], ["keyword", "BODY"], ["keyword", "BOTH"], ["keyword", "BOUND"], + ["keyword", "BULK"], + ["keyword", "BY"], ["keyword", "BYTE"], + ["keyword", "C"], + ["keyword", "CALL"], ["keyword", "CALLING"], + ["keyword", "CASCADE"], + ["keyword", "CASE"], + ["keyword", "CHAR"], ["keyword", "CHAR_BASE"], + ["keyword", "CHARACTER"], + ["keyword", "CHARSET"], ["keyword", "CHARSETFORM"], ["keyword", "CHARSETID"], + ["keyword", "CHECK"], ["keyword", "CLOB_BASE"], - ["keyword", "COLAUTH"], - ["keyword", "COLLECT"], + ["keyword", "CLONE"], + ["keyword", "CLOSE"], ["keyword", "CLUSTER"], ["keyword", "CLUSTERS"], + ["keyword", "COLAUTH"], + ["keyword", "COLLECT"], + ["keyword", "COLUMNS"], + ["keyword", "COMMENT"], + ["keyword", "COMMIT"], + ["keyword", "COMMITTED"], ["keyword", "COMPILED"], ["keyword", "COMPRESS"], + ["keyword", "CONNECT"], ["keyword", "CONSTANT"], ["keyword", "CONSTRUCTOR"], ["keyword", "CONTEXT"], + ["keyword", "CONTINUE"], + ["keyword", "CONVERT"], + ["keyword", "COUNT"], ["keyword", "CRASH"], + ["keyword", "CREATE"], + ["keyword", "CREDENTIAL"], + ["keyword", "CURRENT"], + ["keyword", "CURSOR"], ["keyword", "CUSTOMDATUM"], ["keyword", "DANGLING"], + ["keyword", "DATA"], + ["keyword", "DATE"], ["keyword", "DATE_BASE"], + ["keyword", "DAY"], + ["keyword", "DECLARE"], + ["keyword", "DEFAULT"], ["keyword", "DEFINE"], + ["keyword", "DELETE"], + ["keyword", "DESC"], ["keyword", "DETERMINISTIC"], + ["keyword", "DIRECTORY"], + ["keyword", "DISTINCT"], + ["keyword", "DOUBLE"], + ["keyword", "DROP"], ["keyword", "DURATION"], ["keyword", "ELEMENT"], + ["keyword", "ELSE"], + ["keyword", "ELSIF"], ["keyword", "EMPTY"], + ["keyword", "END"], + ["keyword", "ESCAPE"], + ["keyword", "EXCEPT"], ["keyword", "EXCEPTION"], ["keyword", "EXCEPTIONS"], ["keyword", "EXCLUSIVE"], + ["keyword", "EXECUTE"], + ["keyword", "EXISTS"], + ["keyword", "EXIT"], ["keyword", "EXTERNAL"], + ["keyword", "FETCH"], ["keyword", "FINAL"], + ["keyword", "FIRST"], + ["keyword", "FIXED"], + ["keyword", "FLOAT"], + ["keyword", "FOR"], ["keyword", "FORALL"], - ["keyword", "FORM"], - ["keyword", "FOUND"], + ["keyword", "FORCE"], + ["keyword", "FROM"], + ["keyword", "FUNCTION"], ["keyword", "GENERAL"], + ["keyword", "GOTO"], + ["keyword", "GRANT"], + ["keyword", "GROUP"], + ["keyword", "HASH"], + ["keyword", "HAVING"], ["keyword", "HEAP"], ["keyword", "HIDDEN"], + ["keyword", "HOUR"], ["keyword", "IDENTIFIED"], + ["keyword", "IF"], ["keyword", "IMMEDIATE"], + ["keyword", "IMMUTABLE"], + ["keyword", "IN"], ["keyword", "INCLUDING"], - ["keyword", "INCREMENT"], - ["keyword", "INDICATOR"], + ["keyword", "INDEX"], ["keyword", "INDEXES"], + ["keyword", "INDICATOR"], ["keyword", "INDICES"], ["keyword", "INFINITE"], - ["keyword", "INITIAL"], - ["keyword", "ISOPEN"], + ["keyword", "INSERT"], ["keyword", "INSTANTIABLE"], + ["keyword", "INT"], ["keyword", "INTERFACE"], + ["keyword", "INTERSECT"], + ["keyword", "INTERVAL"], + ["keyword", "INTO"], ["keyword", "INVALIDATE"], + ["keyword", "IS"], + ["keyword", "ISOLATION"], ["keyword", "JAVA"], + ["keyword", "LANGUAGE"], ["keyword", "LARGE"], ["keyword", "LEADING"], ["keyword", "LENGTH"], + ["keyword", "LEVEL"], ["keyword", "LIBRARY"], + ["keyword", "LIKE"], ["keyword", "LIKE2"], ["keyword", "LIKE4"], ["keyword", "LIKEC"], + ["keyword", "LIMIT"], ["keyword", "LIMITED"], + ["keyword", "LOCAL"], + ["keyword", "LOCK"], ["keyword", "LONG"], ["keyword", "LOOP"], ["keyword", "MAP"], - ["keyword", "MAXEXTENTS"], + ["keyword", "MAX"], ["keyword", "MAXLEN"], ["keyword", "MEMBER"], + ["keyword", "MERGE"], + ["keyword", "MIN"], ["keyword", "MINUS"], - ["keyword", "MLSLABEL"], + ["keyword", "MINUTE"], + ["keyword", "MOD"], + ["keyword", "MODE"], + ["keyword", "MODIFY"], + ["keyword", "MONTH"], ["keyword", "MULTISET"], + ["keyword", "MUTABLE"], ["keyword", "NAME"], ["keyword", "NAN"], + ["keyword", "NATIONAL"], ["keyword", "NATIVE"], + ["keyword", "NCHAR"], ["keyword", "NEW"], - ["keyword", "NOAUDIT"], ["keyword", "NOCOMPRESS"], ["keyword", "NOCOPY"], - ["keyword", "NOTFOUND"], + ["keyword", "NOT"], ["keyword", "NOWAIT"], - ["keyword", "NUMBER"], + ["keyword", "NULL"], ["keyword", "NUMBER_BASE"], ["keyword", "OBJECT"], ["keyword", "OCICOLL"], @@ -311,62 +532,90 @@ ZONE ["keyword", "OCIROWID"], ["keyword", "OCISTRING"], ["keyword", "OCITYPE"], - ["keyword", "OFFLINE"], - ["keyword", "ONLINE"], + ["keyword", "OF"], + ["keyword", "OLD"], + ["keyword", "ON"], ["keyword", "ONLY"], ["keyword", "OPAQUE"], + ["keyword", "OPEN"], ["keyword", "OPERATOR"], + ["keyword", "OPTION"], + ["keyword", "OR"], ["keyword", "ORACLE"], ["keyword", "ORADATA"], + ["keyword", "ORDER"], ["keyword", "ORGANIZATION"], ["keyword", "ORLANY"], ["keyword", "ORLVARY"], ["keyword", "OTHERS"], + ["keyword", "OUT"], ["keyword", "OVERLAPS"], ["keyword", "OVERRIDING"], ["keyword", "PACKAGE"], ["keyword", "PARALLEL_ENABLE"], ["keyword", "PARAMETER"], ["keyword", "PARAMETERS"], + ["keyword", "PARENT"], + ["keyword", "PARTITION"], ["keyword", "PASCAL"], - ["keyword", "PCTFREE"], + ["keyword", "PERSISTABLE"], ["keyword", "PIPE"], ["keyword", "PIPELINED"], + ["keyword", "PLUGGABLE"], + ["keyword", "POLYMORPHIC"], ["keyword", "PRAGMA"], + ["keyword", "PRECISION"], ["keyword", "PRIOR"], ["keyword", "PRIVATE"], + ["keyword", "PROCEDURE"], + ["keyword", "PUBLIC"], ["keyword", "RAISE"], ["keyword", "RANGE"], ["keyword", "RAW"], + ["keyword", "READ"], ["keyword", "RECORD"], ["keyword", "REF"], ["keyword", "REFERENCE"], + ["keyword", "RELIES_ON"], ["keyword", "REM"], ["keyword", "REMAINDER"], - ["keyword", "RESULT"], + ["keyword", "RENAME"], ["keyword", "RESOURCE"], + ["keyword", "RESULT"], + ["keyword", "RESULT_CACHE"], + ["keyword", "RETURN"], ["keyword", "RETURNING"], ["keyword", "REVERSE"], - ["keyword", "ROWID"], - ["keyword", "ROWNUM"], - ["keyword", "ROWTYPE"], + ["keyword", "REVOKE"], + ["keyword", "ROLLBACK"], + ["keyword", "ROW"], ["keyword", "SAMPLE"], + ["keyword", "SAVE"], + ["keyword", "SAVEPOINT"], ["keyword", "SB1"], ["keyword", "SB2"], ["keyword", "SB4"], + ["keyword", "SECOND"], ["keyword", "SEGMENT"], + ["keyword", "SELECT"], ["keyword", "SELF"], ["keyword", "SEPARATE"], ["keyword", "SEQUENCE"], + ["keyword", "SERIALIZABLE"], + ["keyword", "SET"], + ["keyword", "SHARE"], ["keyword", "SHORT"], ["keyword", "SIZE"], ["keyword", "SIZE_T"], + ["keyword", "SOME"], ["keyword", "SPARSE"], + ["keyword", "SQL"], ["keyword", "SQLCODE"], ["keyword", "SQLDATA"], ["keyword", "SQLNAME"], ["keyword", "SQLSTATE"], ["keyword", "STANDARD"], + ["keyword", "START"], ["keyword", "STATIC"], ["keyword", "STDDEV"], ["keyword", "STORED"], @@ -377,39 +626,54 @@ ZONE ["keyword", "SUBPARTITION"], ["keyword", "SUBSTITUTABLE"], ["keyword", "SUBTYPE"], - ["keyword", "SUCCESSFUL"], + ["keyword", "SUM"], ["keyword", "SYNONYM"], - ["keyword", "SYSDATE"], ["keyword", "TABAUTH"], + ["keyword", "TABLE"], ["keyword", "TDO"], ["keyword", "THE"], + ["keyword", "THEN"], + ["keyword", "TIME"], + ["keyword", "TIMESTAMP"], ["keyword", "TIMEZONE_ABBR"], ["keyword", "TIMEZONE_HOUR"], ["keyword", "TIMEZONE_MINUTE"], ["keyword", "TIMEZONE_REGION"], + ["keyword", "TO"], ["keyword", "TRAILING"], - ["keyword", "TRANSAC"], + ["keyword", "TRANSACTION"], ["keyword", "TRANSACTIONAL"], ["keyword", "TRUSTED"], + ["keyword", "TYPE"], ["keyword", "UB1"], ["keyword", "UB2"], ["keyword", "UB4"], - ["keyword", "UID"], ["keyword", "UNDER"], + ["keyword", "UNION"], + ["keyword", "UNIQUE"], + ["keyword", "UNPLUG"], + ["keyword", "UNSIGNED"], ["keyword", "UNTRUSTED"], - ["keyword", "VALIDATE"], + ["keyword", "UPDATE"], + ["keyword", "USE"], + ["keyword", "USING"], ["keyword", "VALIST"], - ["keyword", "VARCHAR2"], + ["keyword", "VALUE"], + ["keyword", "VALUES"], ["keyword", "VARIABLE"], ["keyword", "VARIANCE"], ["keyword", "VARRAY"], + ["keyword", "VARYING"], + ["keyword", "VIEW"], ["keyword", "VIEWS"], ["keyword", "VOID"], - ["keyword", "WHENEVER"], + ["keyword", "WHEN"], + ["keyword", "WHERE"], + ["keyword", "WHILE"], + ["keyword", "WITH"], + ["keyword", "WORK"], ["keyword", "WRAPPED"], + ["keyword", "WRITE"], + ["keyword", "YEAR"], ["keyword", "ZONE"] ] - ----------------------------------------------------- - -Checks for all keywords. \ No newline at end of file diff --git a/tests/languages/plsql/label_feature.test b/tests/languages/plsql/label_feature.test new file mode 100644 index 0000000000..478b3cb1c2 --- /dev/null +++ b/tests/languages/plsql/label_feature.test @@ -0,0 +1,7 @@ +<< foo >> + +---------------------------------------------------- + +[ + ["label", "<< foo >>"] +] diff --git a/tests/languages/plsql/operator_feature.test b/tests/languages/plsql/operator_feature.test index 1422bca469..3935118d32 100644 --- a/tests/languages/plsql/operator_feature.test +++ b/tests/languages/plsql/operator_feature.test @@ -1,11 +1,42 @@ -:= ++ - * / ** +:= : +=> +% +|| +.. + += != <> ~= ^= < > <= >= +@ ---------------------------------------------------- [ - ["operator", ":="] + ["operator", "+"], + ["operator", "-"], + ["operator", "*"], + ["operator", "/"], + ["operator", "**"], + ["operator", ":="], + ["operator", ":"], + ["operator", "=>"], + ["operator", "%"], + ["operator", "||"], + ["operator", ".."], + + ["operator", "="], + ["operator", "!="], + ["operator", "<"], + ["operator", ">"], + ["operator", "~="], + ["operator", "^="], + ["operator", "<"], + ["operator", ">"], + ["operator", "<="], + ["operator", ">="], + + ["operator", "@"] ] ---------------------------------------------------- -Checks for all operators. \ No newline at end of file +Checks for all operators. From a8bacc7ba47ca4dc31a66443a02f8327bcc96438 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Mon, 11 Oct 2021 17:02:31 +0200 Subject: [PATCH 0964/1100] Update to `eslint-plugin-regexp@1.4.0` (#3139) --- components/prism-django.js | 2 +- components/prism-django.min.js | 2 +- package-lock.json | 6 +++--- package.json | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/components/prism-django.js b/components/prism-django.js index 8a4a3b7f0c..98501b48b8 100644 --- a/components/prism-django.js +++ b/components/prism-django.js @@ -33,7 +33,7 @@ 'operator': /[-+%=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/, 'number': /\b\d+(?:\.\d+)?\b/, 'boolean': /[Ff]alse|[Nn]one|[Tt]rue/, - 'variable': /\b\w+?\b/, + 'variable': /\b\w+\b/, 'punctuation': /[{}[\](),.:;]/ }; diff --git a/components/prism-django.min.js b/components/prism-django.min.js index 68fe55c001..91bbaa7fc3 100644 --- a/components/prism-django.min.js +++ b/components/prism-django.min.js @@ -1 +1 @@ -!function(e){e.languages.django={comment:/^\{#[\s\S]*?#\}$/,tag:{pattern:/(^\{%[+-]?\s*)\w+/,lookbehind:!0,alias:"keyword"},delimiter:{pattern:/^\{[{%][+-]?|[+-]?[}%]\}$/,alias:"punctuation"},string:{pattern:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0},filter:{pattern:/(\|)\w+/,lookbehind:!0,alias:"function"},test:{pattern:/(\bis\s+(?:not\s+)?)(?!not\b)\w+/,lookbehind:!0,alias:"function"},function:/\b[a-z_]\w+(?=\s*\()/i,keyword:/\b(?:and|as|by|else|for|if|import|in|is|loop|not|or|recursive|with|without)\b/,operator:/[-+%=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,number:/\b\d+(?:\.\d+)?\b/,boolean:/[Ff]alse|[Nn]one|[Tt]rue/,variable:/\b\w+?\b/,punctuation:/[{}[\](),.:;]/};var n=/\{\{[\s\S]*?\}\}|\{%[\s\S]*?%\}|\{#[\s\S]*?#\}/g,o=e.languages["markup-templating"];e.hooks.add("before-tokenize",function(e){o.buildPlaceholders(e,"django",n)}),e.hooks.add("after-tokenize",function(e){o.tokenizePlaceholders(e,"django")}),e.languages.jinja2=e.languages.django,e.hooks.add("before-tokenize",function(e){o.buildPlaceholders(e,"jinja2",n)}),e.hooks.add("after-tokenize",function(e){o.tokenizePlaceholders(e,"jinja2")})}(Prism); \ No newline at end of file +!function(e){e.languages.django={comment:/^\{#[\s\S]*?#\}$/,tag:{pattern:/(^\{%[+-]?\s*)\w+/,lookbehind:!0,alias:"keyword"},delimiter:{pattern:/^\{[{%][+-]?|[+-]?[}%]\}$/,alias:"punctuation"},string:{pattern:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0},filter:{pattern:/(\|)\w+/,lookbehind:!0,alias:"function"},test:{pattern:/(\bis\s+(?:not\s+)?)(?!not\b)\w+/,lookbehind:!0,alias:"function"},function:/\b[a-z_]\w+(?=\s*\()/i,keyword:/\b(?:and|as|by|else|for|if|import|in|is|loop|not|or|recursive|with|without)\b/,operator:/[-+%=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,number:/\b\d+(?:\.\d+)?\b/,boolean:/[Ff]alse|[Nn]one|[Tt]rue/,variable:/\b\w+\b/,punctuation:/[{}[\](),.:;]/};var n=/\{\{[\s\S]*?\}\}|\{%[\s\S]*?%\}|\{#[\s\S]*?#\}/g,o=e.languages["markup-templating"];e.hooks.add("before-tokenize",function(e){o.buildPlaceholders(e,"django",n)}),e.hooks.add("after-tokenize",function(e){o.tokenizePlaceholders(e,"django")}),e.languages.jinja2=e.languages.django,e.hooks.add("before-tokenize",function(e){o.buildPlaceholders(e,"jinja2",n)}),e.hooks.add("after-tokenize",function(e){o.tokenizePlaceholders(e,"jinja2")})}(Prism); \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 6e085eef66..c9647b2c3b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2385,9 +2385,9 @@ } }, "eslint-plugin-regexp": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-regexp/-/eslint-plugin-regexp-1.2.0.tgz", - "integrity": "sha512-yHn5D8jTmT1gmPA4Dj2ut0aGg03CkgvpKu3kG/CEQ1OcUmkoykZsiXCysaENpq/BXs60WEpz+tN2n/h4lp+Q0Q==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-regexp/-/eslint-plugin-regexp-1.4.0.tgz", + "integrity": "sha512-H+APSyKFrhPOaVAdsLa3qLPD6SgkzNPypxM+lnx5fwbUY9Pcw5XV3bJkxt7JIjdsL1B5NMdQXOhN3N8LtyVa5A==", "dev": true, "requires": { "comment-parser": "^1.1.2", diff --git a/package.json b/package.json index 117da0448a..487ccd738b 100755 --- a/package.json +++ b/package.json @@ -45,7 +45,7 @@ "docdash": "^1.2.0", "eslint": "^7.22.0", "eslint-plugin-jsdoc": "^32.3.0", - "eslint-plugin-regexp": "^1.2.0", + "eslint-plugin-regexp": "^1.4.0", "gulp": "^4.0.2", "gulp-clean-css": "^4.3.0", "gulp-concat": "^2.3.4", From 4e00cddde61a056f7cad37b97bcba3356681b24b Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Thu, 14 Oct 2021 13:57:45 +0200 Subject: [PATCH 0965/1100] SQL: Added identifier token (#3141) --- components/prism-sql.js | 8 +++ components/prism-sql.min.js | 2 +- tests/languages/sql/identifier_feature.test | 41 ++++++++++++ tests/languages/sql/issue3140.test | 72 +++++++++++++++++++++ 4 files changed, 122 insertions(+), 1 deletion(-) create mode 100644 tests/languages/sql/identifier_feature.test create mode 100644 tests/languages/sql/issue3140.test diff --git a/components/prism-sql.js b/components/prism-sql.js index 71e64b7649..c7020b88a5 100644 --- a/components/prism-sql.js +++ b/components/prism-sql.js @@ -15,6 +15,14 @@ Prism.languages.sql = { greedy: true, lookbehind: true }, + 'identifier': { + pattern: /(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/, + greedy: true, + lookbehind: true, + inside: { + 'punctuation': /^`|`$/ + } + }, 'function': /\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i, // Should we highlight user defined functions too? 'keyword': /\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i, 'boolean': /\b(?:FALSE|NULL|TRUE)\b/i, diff --git a/components/prism-sql.min.js b/components/prism-sql.min.js index 83da6942eb..86259a6b4f 100644 --- a/components/prism-sql.min.js +++ b/components/prism-sql.min.js @@ -1 +1 @@ -Prism.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/}; \ No newline at end of file +Prism.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/}; \ No newline at end of file diff --git a/tests/languages/sql/identifier_feature.test b/tests/languages/sql/identifier_feature.test new file mode 100644 index 0000000000..c79145772b --- /dev/null +++ b/tests/languages/sql/identifier_feature.test @@ -0,0 +1,41 @@ +`5Customers` +`tableName~` +` SELECT ` +foo.`GROUP` +`a``b` + +---------------------------------------------------- + +[ + ["identifier", [ + ["punctuation", "`"], + "5Customers", + ["punctuation", "`"] + ]], + + ["identifier", [ + ["punctuation", "`"], + "tableName~", + ["punctuation", "`"] + ]], + + ["identifier", [ + ["punctuation", "`"], + " SELECT ", + ["punctuation", "`"] + ]], + + "\r\nfoo", + ["punctuation", "."], + ["identifier", [ + ["punctuation", "`"], + "GROUP", + ["punctuation", "`"] + ]], + + ["identifier", [ + ["punctuation", "`"], + "a``b", + ["punctuation", "`"] + ]] +] diff --git a/tests/languages/sql/issue3140.test b/tests/languages/sql/issue3140.test new file mode 100644 index 0000000000..0f969c7a67 --- /dev/null +++ b/tests/languages/sql/issue3140.test @@ -0,0 +1,72 @@ +select + `t`.`col1`, `t`.`col2`, `t`.`col3`, `t`.`col4` +from + `test_table` as `t` + +---------------------------------------------------- + +[ + ["keyword", "select"], + + ["identifier", [ + ["punctuation", "`"], + "t", + ["punctuation", "`"] + ]], + ["punctuation", "."], + ["identifier", [ + ["punctuation", "`"], + "col1", + ["punctuation", "`"] + ]], + ["punctuation", ","], + ["identifier", [ + ["punctuation", "`"], + "t", + ["punctuation", "`"] + ]], + ["punctuation", "."], + ["identifier", [ + ["punctuation", "`"], + "col2", + ["punctuation", "`"] + ]], + ["punctuation", ","], + ["identifier", [ + ["punctuation", "`"], + "t", + ["punctuation", "`"] + ]], + ["punctuation", "."], + ["identifier", [ + ["punctuation", "`"], + "col3", + ["punctuation", "`"] + ]], + ["punctuation", ","], + ["identifier", [ + ["punctuation", "`"], + "t", + ["punctuation", "`"] + ]], + ["punctuation", "."], + ["identifier", [ + ["punctuation", "`"], + "col4", + ["punctuation", "`"] + ]], + + ["keyword", "from"], + + ["identifier", [ + ["punctuation", "`"], + "test_table", + ["punctuation", "`"] + ]], + ["keyword", "as"], + ["identifier", [ + ["punctuation", "`"], + "t", + ["punctuation", "`"] + ]] +] From 71b7d46cd69bd74f5412843024f71516a68a004f Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Thu, 14 Oct 2021 13:59:51 +0200 Subject: [PATCH 0966/1100] ESLint: Added `regexp/prefer-{plus,question,star}-quantifier` rules (#3152) --- .eslintrc.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.eslintrc.js b/.eslintrc.js index 1737156f66..bd8946a155 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -76,6 +76,9 @@ module.exports = { 'regexp/no-trivially-nested-quantifier': 'warn', 'regexp/no-useless-character-class': 'warn', 'regexp/no-useless-lazy': 'warn', + 'regexp/prefer-plus-quantifier': 'warn', + 'regexp/prefer-question-quantifier': 'warn', + 'regexp/prefer-star-quantifier': 'warn', 'regexp/prefer-w': 'warn', 'regexp/sort-alternatives': 'warn', 'regexp/sort-flags': 'warn', From 3c61c8f7ce439da7588979d84d251bd5e86cf6c6 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Thu, 14 Oct 2021 14:01:11 +0200 Subject: [PATCH 0967/1100] ESLint: Added `regexp/no-useless-flag` rule (#3150) --- .eslintrc.js | 1 + components/prism-abap.js | 2 +- components/prism-abap.min.js | 2 +- components/prism-ada.js | 4 ++-- components/prism-ada.min.js | 2 +- components/prism-aspnet.js | 8 ++++---- components/prism-aspnet.min.js | 2 +- components/prism-autohotkey.js | 4 ++-- components/prism-autohotkey.min.js | 2 +- components/prism-basic.js | 2 +- components/prism-basic.min.js | 2 +- components/prism-batch.js | 4 ++-- components/prism-batch.min.js | 2 +- components/prism-bbcode.js | 2 +- components/prism-bbcode.min.js | 2 +- components/prism-brightscript.js | 2 +- components/prism-brightscript.min.js | 2 +- components/prism-dax.js | 2 +- components/prism-dax.min.js | 2 +- components/prism-elixir.js | 2 +- components/prism-elixir.min.js | 2 +- components/prism-erb.js | 2 +- components/prism-erb.min.js | 2 +- components/prism-git.js | 4 ++-- components/prism-git.min.js | 2 +- components/prism-handlebars.js | 4 ++-- components/prism-handlebars.min.js | 2 +- components/prism-ichigojam.js | 4 ++-- components/prism-ichigojam.min.js | 2 +- components/prism-jsx.js | 4 ++-- components/prism-jsx.min.js | 2 +- components/prism-latex.js | 2 +- components/prism-latex.min.js | 2 +- components/prism-less.js | 2 +- components/prism-less.min.js | 2 +- components/prism-log.js | 2 +- components/prism-log.min.js | 2 +- components/prism-nsis.js | 4 ++-- components/prism-nsis.min.js | 2 +- components/prism-pascal.js | 2 +- components/prism-pascal.min.js | 2 +- components/prism-pascaligo.js | 2 +- components/prism-pascaligo.min.js | 2 +- components/prism-perl.js | 2 +- components/prism-perl.min.js | 2 +- components/prism-php.js | 4 ++-- components/prism-php.min.js | 2 +- components/prism-python.js | 2 +- components/prism-python.min.js | 2 +- components/prism-sas.js | 8 ++++---- components/prism-sas.min.js | 2 +- components/prism-sass.js | 2 +- components/prism-sass.min.js | 2 +- components/prism-scss.js | 2 +- components/prism-scss.min.js | 2 +- components/prism-smarty.js | 2 +- components/prism-smarty.min.js | 2 +- components/prism-vbnet.js | 2 +- components/prism-vbnet.min.js | 2 +- components/prism-wasm.js | 2 +- components/prism-wasm.min.js | 2 +- components/prism-xquery.js | 4 ++-- components/prism-xquery.min.js | 2 +- gulpfile.js/changelog.js | 2 +- plugins/diff-highlight/prism-diff-highlight.js | 2 +- plugins/diff-highlight/prism-diff-highlight.min.js | 2 +- tests/helper/token-stream-transformer.js | 2 +- tests/pattern-tests.js | 2 +- 68 files changed, 84 insertions(+), 83 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index bd8946a155..38bc220f0e 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -75,6 +75,7 @@ module.exports = { 'regexp/no-trivially-nested-assertion': 'warn', 'regexp/no-trivially-nested-quantifier': 'warn', 'regexp/no-useless-character-class': 'warn', + 'regexp/no-useless-flag': 'warn', 'regexp/no-useless-lazy': 'warn', 'regexp/prefer-plus-quantifier': 'warn', 'regexp/prefer-question-quantifier': 'warn', diff --git a/components/prism-abap.js b/components/prism-abap.js index ff7a4ca020..ba7c4acbbe 100644 --- a/components/prism-abap.js +++ b/components/prism-abap.js @@ -1,6 +1,6 @@ Prism.languages.abap = { 'comment': /^\*.*/m, - 'string': /(`|')(?:\\.|(?!\1)[^\\\r\n])*\1/m, + 'string': /(`|')(?:\\.|(?!\1)[^\\\r\n])*\1/, 'string-template': { pattern: /([|}])(?:\\.|[^\\|{\r\n])*(?=[|{])/, lookbehind: true, diff --git a/components/prism-abap.min.js b/components/prism-abap.min.js index af64487ad6..dd3bf65eea 100644 --- a/components/prism-abap.min.js +++ b/components/prism-abap.min.js @@ -1 +1 @@ -Prism.languages.abap={comment:/^\*.*/m,string:/(`|')(?:\\.|(?!\1)[^\\\r\n])*\1/m,"string-template":{pattern:/([|}])(?:\\.|[^\\|{\r\n])*(?=[|{])/,lookbehind:!0,alias:"string"},"eol-comment":{pattern:/(^|\s)".*/m,lookbehind:!0,alias:"comment"},keyword:{pattern:/(\s|\.|^)(?:SCIENTIFIC_WITH_LEADING_ZERO|SCALE_PRESERVING_SCIENTIFIC|RMC_COMMUNICATION_FAILURE|END-ENHANCEMENT-SECTION|MULTIPLY-CORRESPONDING|SUBTRACT-CORRESPONDING|VERIFICATION-MESSAGE|DIVIDE-CORRESPONDING|ENHANCEMENT-SECTION|CURRENCY_CONVERSION|RMC_SYSTEM_FAILURE|START-OF-SELECTION|MOVE-CORRESPONDING|RMC_INVALID_STATUS|CUSTOMER-FUNCTION|END-OF-DEFINITION|ENHANCEMENT-POINT|SYSTEM-EXCEPTIONS|ADD-CORRESPONDING|SCALE_PRESERVING|SELECTION-SCREEN|CURSOR-SELECTION|END-OF-SELECTION|LOAD-OF-PROGRAM|SCROLL-BOUNDARY|SELECTION-TABLE|EXCEPTION-TABLE|IMPLEMENTATIONS|PARAMETER-TABLE|RIGHT-JUSTIFIED|UNIT_CONVERSION|AUTHORITY-CHECK|LIST-PROCESSING|SIGN_AS_POSTFIX|COL_BACKGROUND|IMPLEMENTATION|INTERFACE-POOL|TRANSFORMATION|IDENTIFICATION|ENDENHANCEMENT|LINE-SELECTION|INITIALIZATION|LEFT-JUSTIFIED|SELECT-OPTIONS|SELECTION-SETS|COMMUNICATION|CORRESPONDING|DECIMAL_SHIFT|PRINT-CONTROL|VALUE-REQUEST|CHAIN-REQUEST|FUNCTION-POOL|FIELD-SYMBOLS|FUNCTIONALITY|INVERTED-DATE|SELECTION-SET|CLASS-METHODS|OUTPUT-LENGTH|CLASS-CODING|COL_NEGATIVE|ERRORMESSAGE|FIELD-GROUPS|HELP-REQUEST|NO-EXTENSION|NO-TOPOFPAGE|REDEFINITION|DISPLAY-MODE|ENDINTERFACE|EXIT-COMMAND|FIELD-SYMBOL|NO-SCROLLING|SHORTDUMP-ID|ACCESSPOLICY|CLASS-EVENTS|COL_POSITIVE|DECLARATIONS|ENHANCEMENTS|FILTER-TABLE|SWITCHSTATES|SYNTAX-CHECK|TRANSPORTING|ASYNCHRONOUS|SYNTAX-TRACE|TOKENIZATION|USER-COMMAND|WITH-HEADING|ABAP-SOURCE|BREAK-POINT|CHAIN-INPUT|COMPRESSION|FIXED-POINT|NEW-SECTION|NON-UNICODE|OCCURRENCES|RESPONSIBLE|SYSTEM-CALL|TRACE-TABLE|ABBREVIATED|CHAR-TO-HEX|END-OF-FILE|ENDFUNCTION|ENVIRONMENT|ASSOCIATION|COL_HEADING|EDITOR-CALL|END-OF-PAGE|ENGINEERING|IMPLEMENTED|INTENSIFIED|RADIOBUTTON|SYSTEM-EXIT|TOP-OF-PAGE|TRANSACTION|APPLICATION|CONCATENATE|DESTINATION|ENHANCEMENT|IMMEDIATELY|NO-GROUPING|PRECOMPILED|REPLACEMENT|TITLE-LINES|ACTIVATION|BYTE-ORDER|CLASS-POOL|CONNECTION|CONVERSION|DEFINITION|DEPARTMENT|EXPIRATION|INHERITING|MESSAGE-ID|NO-HEADING|PERFORMING|QUEUE-ONLY|RIGHTSPACE|SCIENTIFIC|STATUSINFO|STRUCTURES|SYNCPOINTS|WITH-TITLE|ATTRIBUTES|BOUNDARIES|CLASS-DATA|COL_NORMAL|DD\/MM\/YYYY|DESCENDING|INTERFACES|LINE-COUNT|MM\/DD\/YYYY|NON-UNIQUE|PRESERVING|SELECTIONS|STATEMENTS|SUBROUTINE|TRUNCATION|TYPE-POOLS|ARITHMETIC|BACKGROUND|ENDPROVIDE|EXCEPTIONS|IDENTIFIER|INDEX-LINE|OBLIGATORY|PARAMETERS|PERCENTAGE|PUSHBUTTON|RESOLUTION|COMPONENTS|DEALLOCATE|DISCONNECT|DUPLICATES|FIRST-LINE|HEAD-LINES|NO-DISPLAY|OCCURRENCE|RESPECTING|RETURNCODE|SUBMATCHES|TRACE-FILE|ASCENDING|BYPASSING|ENDMODULE|EXCEPTION|EXCLUDING|EXPORTING|INCREMENT|MATCHCODE|PARAMETER|PARTIALLY|PREFERRED|REFERENCE|REPLACING|RETURNING|SELECTION|SEPARATED|SPECIFIED|STATEMENT|TIMESTAMP|TYPE-POOL|ACCEPTING|APPENDAGE|ASSIGNING|COL_GROUP|COMPARING|CONSTANTS|DANGEROUS|IMPORTING|INSTANCES|LEFTSPACE|LOG-POINT|QUICKINFO|READ-ONLY|SCROLLING|SQLSCRIPT|STEP-LOOP|TOP-LINES|TRANSLATE|APPENDING|AUTHORITY|CHARACTER|COMPONENT|CONDITION|DIRECTORY|DUPLICATE|MESSAGING|RECEIVING|SUBSCREEN|ACCORDING|COL_TOTAL|END-LINES|ENDMETHOD|ENDSELECT|EXPANDING|EXTENSION|INCLUDING|INFOTYPES|INTERFACE|INTERVALS|LINE-SIZE|PF-STATUS|PROCEDURE|PROTECTED|REQUESTED|RESUMABLE|RIGHTPLUS|SAP-SPOOL|SECONDARY|STRUCTURE|SUBSTRING|TABLEVIEW|NUMOFCHAR|ADJACENT|ANALYSIS|ASSIGNED|BACKWARD|CHANNELS|CHECKBOX|CONTINUE|CRITICAL|DATAINFO|DD\/MM\/YY|DURATION|ENCODING|ENDCLASS|FUNCTION|LEFTPLUS|LINEFEED|MM\/DD\/YY|OVERFLOW|RECEIVED|SKIPPING|SORTABLE|STANDARD|SUBTRACT|SUPPRESS|TABSTRIP|TITLEBAR|TRUNCATE|UNASSIGN|WHENEVER|ANALYZER|COALESCE|COMMENTS|CONDENSE|DECIMALS|DEFERRED|ENDWHILE|EXPLICIT|KEYWORDS|MESSAGES|POSITION|PRIORITY|RECEIVER|RENAMING|TIMEZONE|TRAILING|ALLOCATE|CENTERED|CIRCULAR|CONTROLS|CURRENCY|DELETING|DESCRIBE|DISTANCE|ENDCATCH|EXPONENT|EXTENDED|GENERATE|IGNORING|INCLUDES|INTERNAL|MAJOR-ID|MODIFIER|NEW-LINE|OPTIONAL|PROPERTY|ROLLBACK|STARTING|SUPPLIED|ABSTRACT|CHANGING|CONTEXTS|CREATING|CUSTOMER|DATABASE|DAYLIGHT|DEFINING|DISTINCT|DIVISION|ENABLING|ENDCHAIN|ESCAPING|HARMLESS|IMPLICIT|INACTIVE|LANGUAGE|MINOR-ID|MULTIPLY|NEW-PAGE|NO-TITLE|POS_HIGH|SEPARATE|TEXTPOOL|TRANSFER|SELECTOR|DBMAXLEN|ITERATOR|ARCHIVE|BIT-XOR|BYTE-CO|COLLECT|COMMENT|CURRENT|DEFAULT|DISPLAY|ENDFORM|EXTRACT|LEADING|LISTBOX|LOCATOR|MEMBERS|METHODS|NESTING|POS_LOW|PROCESS|PROVIDE|RAISING|RESERVE|SECONDS|SUMMARY|VISIBLE|BETWEEN|BIT-AND|BYTE-CS|CLEANUP|COMPUTE|CONTROL|CONVERT|DATASET|ENDCASE|FORWARD|HEADERS|HOTSPOT|INCLUDE|INVERSE|KEEPING|NO-ZERO|OBJECTS|OVERLAY|PADDING|PATTERN|PROGRAM|REFRESH|SECTION|SUMMING|TESTING|VERSION|WINDOWS|WITHOUT|BIT-NOT|BYTE-CA|BYTE-NA|CASTING|CONTEXT|COUNTRY|DYNAMIC|ENABLED|ENDLOOP|EXECUTE|FRIENDS|HANDLER|HEADING|INITIAL|\*-INPUT|LOGFILE|MAXIMUM|MINIMUM|NO-GAPS|NO-SIGN|PRAGMAS|PRIMARY|PRIVATE|REDUCED|REPLACE|REQUEST|RESULTS|UNICODE|WARNING|ALIASES|BYTE-CN|BYTE-NS|CALLING|COL_KEY|COLUMNS|CONNECT|ENDEXEC|ENTRIES|EXCLUDE|FILTERS|FURTHER|HELP-ID|LOGICAL|MAPPING|MESSAGE|NAMETAB|OPTIONS|PACKAGE|PERFORM|RECEIVE|STATICS|VARYING|BINDING|CHARLEN|GREATER|XSTRLEN|ACCEPT|APPEND|DETAIL|ELSEIF|ENDING|ENDTRY|FORMAT|FRAMES|GIVING|HASHED|HEADER|IMPORT|INSERT|MARGIN|MODULE|NATIVE|OBJECT|OFFSET|REMOTE|RESUME|SAVING|SIMPLE|SUBMIT|TABBED|TOKENS|UNIQUE|UNPACK|UPDATE|WINDOW|YELLOW|ACTUAL|ASPECT|CENTER|CURSOR|DELETE|DIALOG|DIVIDE|DURING|ERRORS|EVENTS|EXTEND|FILTER|HANDLE|HAVING|IGNORE|LITTLE|MEMORY|NO-GAP|OCCURS|OPTION|PERSON|PLACES|PUBLIC|REDUCE|REPORT|RESULT|SINGLE|SORTED|SWITCH|SYNTAX|TARGET|VALUES|WRITER|ASSERT|BLOCKS|BOUNDS|BUFFER|CHANGE|COLUMN|COMMIT|CONCAT|COPIES|CREATE|DDMMYY|DEFINE|ENDIAN|ESCAPE|EXPAND|KERNEL|LAYOUT|LEGACY|LEVELS|MMDDYY|NUMBER|OUTPUT|RANGES|READER|RETURN|SCREEN|SEARCH|SELECT|SHARED|SOURCE|STABLE|STATIC|SUBKEY|SUFFIX|TABLES|UNWIND|YYMMDD|ASSIGN|BACKUP|BEFORE|BINARY|BIT-OR|BLANKS|CLIENT|CODING|COMMON|DEMAND|DYNPRO|EXCEPT|EXISTS|EXPORT|FIELDS|GLOBAL|GROUPS|LENGTH|LOCALE|MEDIUM|METHOD|MODIFY|NESTED|OTHERS|REJECT|SCROLL|SUPPLY|SYMBOL|ENDFOR|STRLEN|ALIGN|BEGIN|BOUND|ENDAT|ENTRY|EVENT|FINAL|FLUSH|GRANT|INNER|SHORT|USING|WRITE|AFTER|BLACK|BLOCK|CLOCK|COLOR|COUNT|DUMMY|EMPTY|ENDDO|ENDON|GREEN|INDEX|INOUT|LEAVE|LEVEL|LINES|MODIF|ORDER|OUTER|RANGE|RESET|RETRY|RIGHT|SMART|SPLIT|STYLE|TABLE|THROW|UNDER|UNTIL|UPPER|UTF-8|WHERE|ALIAS|BLANK|CLEAR|CLOSE|EXACT|FETCH|FIRST|FOUND|GROUP|LLANG|LOCAL|OTHER|REGEX|SPOOL|TITLE|TYPES|VALID|WHILE|ALPHA|BOXED|CATCH|CHAIN|CHECK|CLASS|COVER|ENDIF|EQUIV|FIELD|FLOOR|FRAME|INPUT|LOWER|MATCH|NODES|PAGES|PRINT|RAISE|ROUND|SHIFT|SPACE|SPOTS|STAMP|STATE|TASKS|TIMES|TRMAC|ULINE|UNION|VALUE|WIDTH|EQUAL|LOG10|TRUNC|BLOB|CASE|CEIL|CLOB|COND|EXIT|FILE|GAPS|HOLD|INCL|INTO|KEEP|KEYS|LAST|LINE|LONG|LPAD|MAIL|MODE|OPEN|PINK|READ|ROWS|TEST|THEN|ZERO|AREA|BACK|BADI|BYTE|CAST|EDIT|EXEC|FAIL|FIND|FKEQ|FONT|FREE|GKEQ|HIDE|INIT|ITNO|LATE|LOOP|MAIN|MARK|MOVE|NEXT|NULL|RISK|ROLE|UNIT|WAIT|ZONE|BASE|CALL|CODE|DATA|DATE|FKGE|GKGE|HIGH|KIND|LEFT|LIST|MASK|MESH|NAME|NODE|PACK|PAGE|POOL|SEND|SIGN|SIZE|SOME|STOP|TASK|TEXT|TIME|USER|VARY|WITH|WORD|BLUE|CONV|COPY|DEEP|ELSE|FORM|FROM|HINT|ICON|JOIN|LIKE|LOAD|ONLY|PART|SCAN|SKIP|SORT|TYPE|UNIX|VIEW|WHEN|WORK|ACOS|ASIN|ATAN|COSH|EACH|FRAC|LESS|RTTI|SINH|SQRT|TANH|AVG|BIT|DIV|ISO|LET|OUT|PAD|SQL|ALL|CI_|CPI|END|LOB|LPI|MAX|MIN|NEW|OLE|RUN|SET|\?TO|YES|ABS|ADD|AND|BIG|FOR|HDB|JOB|LOW|NOT|SAP|TRY|VIA|XML|ANY|GET|IDS|KEY|MOD|OFF|PUT|RAW|RED|REF|SUM|TAB|XSD|CNT|COS|EXP|LOG|SIN|TAN|XOR|AT|CO|CP|DO|GT|ID|IF|NS|OR|BT|CA|CS|GE|NA|NB|EQ|IN|LT|NE|NO|OF|ON|PF|TO|AS|BY|CN|IS|LE|NP|UP|E|I|M|O|Z|C|X)\b/i,lookbehind:!0},number:/\b\d+\b/,operator:{pattern:/(\s)(?:\*\*?|<[=>]?|>=?|\?=|[-+\/=])(?=\s)/,lookbehind:!0},"string-operator":{pattern:/(\s)&&?(?=\s)/,lookbehind:!0,alias:"keyword"},"token-operator":[{pattern:/(\w)(?:->?|=>|[~|{}])(?=\w)/,lookbehind:!0,alias:"punctuation"},{pattern:/[|{}]/,alias:"punctuation"}],punctuation:/[,.:()]/}; \ No newline at end of file +Prism.languages.abap={comment:/^\*.*/m,string:/(`|')(?:\\.|(?!\1)[^\\\r\n])*\1/,"string-template":{pattern:/([|}])(?:\\.|[^\\|{\r\n])*(?=[|{])/,lookbehind:!0,alias:"string"},"eol-comment":{pattern:/(^|\s)".*/m,lookbehind:!0,alias:"comment"},keyword:{pattern:/(\s|\.|^)(?:SCIENTIFIC_WITH_LEADING_ZERO|SCALE_PRESERVING_SCIENTIFIC|RMC_COMMUNICATION_FAILURE|END-ENHANCEMENT-SECTION|MULTIPLY-CORRESPONDING|SUBTRACT-CORRESPONDING|VERIFICATION-MESSAGE|DIVIDE-CORRESPONDING|ENHANCEMENT-SECTION|CURRENCY_CONVERSION|RMC_SYSTEM_FAILURE|START-OF-SELECTION|MOVE-CORRESPONDING|RMC_INVALID_STATUS|CUSTOMER-FUNCTION|END-OF-DEFINITION|ENHANCEMENT-POINT|SYSTEM-EXCEPTIONS|ADD-CORRESPONDING|SCALE_PRESERVING|SELECTION-SCREEN|CURSOR-SELECTION|END-OF-SELECTION|LOAD-OF-PROGRAM|SCROLL-BOUNDARY|SELECTION-TABLE|EXCEPTION-TABLE|IMPLEMENTATIONS|PARAMETER-TABLE|RIGHT-JUSTIFIED|UNIT_CONVERSION|AUTHORITY-CHECK|LIST-PROCESSING|SIGN_AS_POSTFIX|COL_BACKGROUND|IMPLEMENTATION|INTERFACE-POOL|TRANSFORMATION|IDENTIFICATION|ENDENHANCEMENT|LINE-SELECTION|INITIALIZATION|LEFT-JUSTIFIED|SELECT-OPTIONS|SELECTION-SETS|COMMUNICATION|CORRESPONDING|DECIMAL_SHIFT|PRINT-CONTROL|VALUE-REQUEST|CHAIN-REQUEST|FUNCTION-POOL|FIELD-SYMBOLS|FUNCTIONALITY|INVERTED-DATE|SELECTION-SET|CLASS-METHODS|OUTPUT-LENGTH|CLASS-CODING|COL_NEGATIVE|ERRORMESSAGE|FIELD-GROUPS|HELP-REQUEST|NO-EXTENSION|NO-TOPOFPAGE|REDEFINITION|DISPLAY-MODE|ENDINTERFACE|EXIT-COMMAND|FIELD-SYMBOL|NO-SCROLLING|SHORTDUMP-ID|ACCESSPOLICY|CLASS-EVENTS|COL_POSITIVE|DECLARATIONS|ENHANCEMENTS|FILTER-TABLE|SWITCHSTATES|SYNTAX-CHECK|TRANSPORTING|ASYNCHRONOUS|SYNTAX-TRACE|TOKENIZATION|USER-COMMAND|WITH-HEADING|ABAP-SOURCE|BREAK-POINT|CHAIN-INPUT|COMPRESSION|FIXED-POINT|NEW-SECTION|NON-UNICODE|OCCURRENCES|RESPONSIBLE|SYSTEM-CALL|TRACE-TABLE|ABBREVIATED|CHAR-TO-HEX|END-OF-FILE|ENDFUNCTION|ENVIRONMENT|ASSOCIATION|COL_HEADING|EDITOR-CALL|END-OF-PAGE|ENGINEERING|IMPLEMENTED|INTENSIFIED|RADIOBUTTON|SYSTEM-EXIT|TOP-OF-PAGE|TRANSACTION|APPLICATION|CONCATENATE|DESTINATION|ENHANCEMENT|IMMEDIATELY|NO-GROUPING|PRECOMPILED|REPLACEMENT|TITLE-LINES|ACTIVATION|BYTE-ORDER|CLASS-POOL|CONNECTION|CONVERSION|DEFINITION|DEPARTMENT|EXPIRATION|INHERITING|MESSAGE-ID|NO-HEADING|PERFORMING|QUEUE-ONLY|RIGHTSPACE|SCIENTIFIC|STATUSINFO|STRUCTURES|SYNCPOINTS|WITH-TITLE|ATTRIBUTES|BOUNDARIES|CLASS-DATA|COL_NORMAL|DD\/MM\/YYYY|DESCENDING|INTERFACES|LINE-COUNT|MM\/DD\/YYYY|NON-UNIQUE|PRESERVING|SELECTIONS|STATEMENTS|SUBROUTINE|TRUNCATION|TYPE-POOLS|ARITHMETIC|BACKGROUND|ENDPROVIDE|EXCEPTIONS|IDENTIFIER|INDEX-LINE|OBLIGATORY|PARAMETERS|PERCENTAGE|PUSHBUTTON|RESOLUTION|COMPONENTS|DEALLOCATE|DISCONNECT|DUPLICATES|FIRST-LINE|HEAD-LINES|NO-DISPLAY|OCCURRENCE|RESPECTING|RETURNCODE|SUBMATCHES|TRACE-FILE|ASCENDING|BYPASSING|ENDMODULE|EXCEPTION|EXCLUDING|EXPORTING|INCREMENT|MATCHCODE|PARAMETER|PARTIALLY|PREFERRED|REFERENCE|REPLACING|RETURNING|SELECTION|SEPARATED|SPECIFIED|STATEMENT|TIMESTAMP|TYPE-POOL|ACCEPTING|APPENDAGE|ASSIGNING|COL_GROUP|COMPARING|CONSTANTS|DANGEROUS|IMPORTING|INSTANCES|LEFTSPACE|LOG-POINT|QUICKINFO|READ-ONLY|SCROLLING|SQLSCRIPT|STEP-LOOP|TOP-LINES|TRANSLATE|APPENDING|AUTHORITY|CHARACTER|COMPONENT|CONDITION|DIRECTORY|DUPLICATE|MESSAGING|RECEIVING|SUBSCREEN|ACCORDING|COL_TOTAL|END-LINES|ENDMETHOD|ENDSELECT|EXPANDING|EXTENSION|INCLUDING|INFOTYPES|INTERFACE|INTERVALS|LINE-SIZE|PF-STATUS|PROCEDURE|PROTECTED|REQUESTED|RESUMABLE|RIGHTPLUS|SAP-SPOOL|SECONDARY|STRUCTURE|SUBSTRING|TABLEVIEW|NUMOFCHAR|ADJACENT|ANALYSIS|ASSIGNED|BACKWARD|CHANNELS|CHECKBOX|CONTINUE|CRITICAL|DATAINFO|DD\/MM\/YY|DURATION|ENCODING|ENDCLASS|FUNCTION|LEFTPLUS|LINEFEED|MM\/DD\/YY|OVERFLOW|RECEIVED|SKIPPING|SORTABLE|STANDARD|SUBTRACT|SUPPRESS|TABSTRIP|TITLEBAR|TRUNCATE|UNASSIGN|WHENEVER|ANALYZER|COALESCE|COMMENTS|CONDENSE|DECIMALS|DEFERRED|ENDWHILE|EXPLICIT|KEYWORDS|MESSAGES|POSITION|PRIORITY|RECEIVER|RENAMING|TIMEZONE|TRAILING|ALLOCATE|CENTERED|CIRCULAR|CONTROLS|CURRENCY|DELETING|DESCRIBE|DISTANCE|ENDCATCH|EXPONENT|EXTENDED|GENERATE|IGNORING|INCLUDES|INTERNAL|MAJOR-ID|MODIFIER|NEW-LINE|OPTIONAL|PROPERTY|ROLLBACK|STARTING|SUPPLIED|ABSTRACT|CHANGING|CONTEXTS|CREATING|CUSTOMER|DATABASE|DAYLIGHT|DEFINING|DISTINCT|DIVISION|ENABLING|ENDCHAIN|ESCAPING|HARMLESS|IMPLICIT|INACTIVE|LANGUAGE|MINOR-ID|MULTIPLY|NEW-PAGE|NO-TITLE|POS_HIGH|SEPARATE|TEXTPOOL|TRANSFER|SELECTOR|DBMAXLEN|ITERATOR|ARCHIVE|BIT-XOR|BYTE-CO|COLLECT|COMMENT|CURRENT|DEFAULT|DISPLAY|ENDFORM|EXTRACT|LEADING|LISTBOX|LOCATOR|MEMBERS|METHODS|NESTING|POS_LOW|PROCESS|PROVIDE|RAISING|RESERVE|SECONDS|SUMMARY|VISIBLE|BETWEEN|BIT-AND|BYTE-CS|CLEANUP|COMPUTE|CONTROL|CONVERT|DATASET|ENDCASE|FORWARD|HEADERS|HOTSPOT|INCLUDE|INVERSE|KEEPING|NO-ZERO|OBJECTS|OVERLAY|PADDING|PATTERN|PROGRAM|REFRESH|SECTION|SUMMING|TESTING|VERSION|WINDOWS|WITHOUT|BIT-NOT|BYTE-CA|BYTE-NA|CASTING|CONTEXT|COUNTRY|DYNAMIC|ENABLED|ENDLOOP|EXECUTE|FRIENDS|HANDLER|HEADING|INITIAL|\*-INPUT|LOGFILE|MAXIMUM|MINIMUM|NO-GAPS|NO-SIGN|PRAGMAS|PRIMARY|PRIVATE|REDUCED|REPLACE|REQUEST|RESULTS|UNICODE|WARNING|ALIASES|BYTE-CN|BYTE-NS|CALLING|COL_KEY|COLUMNS|CONNECT|ENDEXEC|ENTRIES|EXCLUDE|FILTERS|FURTHER|HELP-ID|LOGICAL|MAPPING|MESSAGE|NAMETAB|OPTIONS|PACKAGE|PERFORM|RECEIVE|STATICS|VARYING|BINDING|CHARLEN|GREATER|XSTRLEN|ACCEPT|APPEND|DETAIL|ELSEIF|ENDING|ENDTRY|FORMAT|FRAMES|GIVING|HASHED|HEADER|IMPORT|INSERT|MARGIN|MODULE|NATIVE|OBJECT|OFFSET|REMOTE|RESUME|SAVING|SIMPLE|SUBMIT|TABBED|TOKENS|UNIQUE|UNPACK|UPDATE|WINDOW|YELLOW|ACTUAL|ASPECT|CENTER|CURSOR|DELETE|DIALOG|DIVIDE|DURING|ERRORS|EVENTS|EXTEND|FILTER|HANDLE|HAVING|IGNORE|LITTLE|MEMORY|NO-GAP|OCCURS|OPTION|PERSON|PLACES|PUBLIC|REDUCE|REPORT|RESULT|SINGLE|SORTED|SWITCH|SYNTAX|TARGET|VALUES|WRITER|ASSERT|BLOCKS|BOUNDS|BUFFER|CHANGE|COLUMN|COMMIT|CONCAT|COPIES|CREATE|DDMMYY|DEFINE|ENDIAN|ESCAPE|EXPAND|KERNEL|LAYOUT|LEGACY|LEVELS|MMDDYY|NUMBER|OUTPUT|RANGES|READER|RETURN|SCREEN|SEARCH|SELECT|SHARED|SOURCE|STABLE|STATIC|SUBKEY|SUFFIX|TABLES|UNWIND|YYMMDD|ASSIGN|BACKUP|BEFORE|BINARY|BIT-OR|BLANKS|CLIENT|CODING|COMMON|DEMAND|DYNPRO|EXCEPT|EXISTS|EXPORT|FIELDS|GLOBAL|GROUPS|LENGTH|LOCALE|MEDIUM|METHOD|MODIFY|NESTED|OTHERS|REJECT|SCROLL|SUPPLY|SYMBOL|ENDFOR|STRLEN|ALIGN|BEGIN|BOUND|ENDAT|ENTRY|EVENT|FINAL|FLUSH|GRANT|INNER|SHORT|USING|WRITE|AFTER|BLACK|BLOCK|CLOCK|COLOR|COUNT|DUMMY|EMPTY|ENDDO|ENDON|GREEN|INDEX|INOUT|LEAVE|LEVEL|LINES|MODIF|ORDER|OUTER|RANGE|RESET|RETRY|RIGHT|SMART|SPLIT|STYLE|TABLE|THROW|UNDER|UNTIL|UPPER|UTF-8|WHERE|ALIAS|BLANK|CLEAR|CLOSE|EXACT|FETCH|FIRST|FOUND|GROUP|LLANG|LOCAL|OTHER|REGEX|SPOOL|TITLE|TYPES|VALID|WHILE|ALPHA|BOXED|CATCH|CHAIN|CHECK|CLASS|COVER|ENDIF|EQUIV|FIELD|FLOOR|FRAME|INPUT|LOWER|MATCH|NODES|PAGES|PRINT|RAISE|ROUND|SHIFT|SPACE|SPOTS|STAMP|STATE|TASKS|TIMES|TRMAC|ULINE|UNION|VALUE|WIDTH|EQUAL|LOG10|TRUNC|BLOB|CASE|CEIL|CLOB|COND|EXIT|FILE|GAPS|HOLD|INCL|INTO|KEEP|KEYS|LAST|LINE|LONG|LPAD|MAIL|MODE|OPEN|PINK|READ|ROWS|TEST|THEN|ZERO|AREA|BACK|BADI|BYTE|CAST|EDIT|EXEC|FAIL|FIND|FKEQ|FONT|FREE|GKEQ|HIDE|INIT|ITNO|LATE|LOOP|MAIN|MARK|MOVE|NEXT|NULL|RISK|ROLE|UNIT|WAIT|ZONE|BASE|CALL|CODE|DATA|DATE|FKGE|GKGE|HIGH|KIND|LEFT|LIST|MASK|MESH|NAME|NODE|PACK|PAGE|POOL|SEND|SIGN|SIZE|SOME|STOP|TASK|TEXT|TIME|USER|VARY|WITH|WORD|BLUE|CONV|COPY|DEEP|ELSE|FORM|FROM|HINT|ICON|JOIN|LIKE|LOAD|ONLY|PART|SCAN|SKIP|SORT|TYPE|UNIX|VIEW|WHEN|WORK|ACOS|ASIN|ATAN|COSH|EACH|FRAC|LESS|RTTI|SINH|SQRT|TANH|AVG|BIT|DIV|ISO|LET|OUT|PAD|SQL|ALL|CI_|CPI|END|LOB|LPI|MAX|MIN|NEW|OLE|RUN|SET|\?TO|YES|ABS|ADD|AND|BIG|FOR|HDB|JOB|LOW|NOT|SAP|TRY|VIA|XML|ANY|GET|IDS|KEY|MOD|OFF|PUT|RAW|RED|REF|SUM|TAB|XSD|CNT|COS|EXP|LOG|SIN|TAN|XOR|AT|CO|CP|DO|GT|ID|IF|NS|OR|BT|CA|CS|GE|NA|NB|EQ|IN|LT|NE|NO|OF|ON|PF|TO|AS|BY|CN|IS|LE|NP|UP|E|I|M|O|Z|C|X)\b/i,lookbehind:!0},number:/\b\d+\b/,operator:{pattern:/(\s)(?:\*\*?|<[=>]?|>=?|\?=|[-+\/=])(?=\s)/,lookbehind:!0},"string-operator":{pattern:/(\s)&&?(?=\s)/,lookbehind:!0,alias:"keyword"},"token-operator":[{pattern:/(\w)(?:->?|=>|[~|{}])(?=\w)/,lookbehind:!0,alias:"punctuation"},{pattern:/[|{}]/,alias:"punctuation"}],punctuation:/[,.:()]/}; \ No newline at end of file diff --git a/components/prism-ada.js b/components/prism-ada.js index b01af741d7..21226f63a2 100644 --- a/components/prism-ada.js +++ b/components/prism-ada.js @@ -1,6 +1,6 @@ Prism.languages.ada = { 'comment': /--.*/, - 'string': /"(?:""|[^"\r\f\n])*"/i, + 'string': /"(?:""|[^"\r\f\n])*"/, 'number': [ { pattern: /\b\d(?:_?\d)*#[\dA-F](?:_?[\dA-F])*(?:\.[\dA-F](?:_?[\dA-F])*)?#(?:E[+-]?\d(?:_?\d)*)?/i @@ -9,7 +9,7 @@ Prism.languages.ada = { pattern: /\b\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:E[+-]?\d(?:_?\d)*)?\b/i } ], - 'attr-name': /\b'\w+/i, + 'attr-name': /\b'\w+/, 'keyword': /\b(?:abort|abs|abstract|accept|access|aliased|all|and|array|at|begin|body|case|constant|declare|delay|delta|digits|do|else|elsif|end|entry|exception|exit|for|function|generic|goto|if|in|interface|is|limited|loop|mod|new|not|null|of|others|out|overriding|package|pragma|private|procedure|protected|raise|range|record|rem|renames|requeue|return|reverse|select|separate|some|subtype|synchronized|tagged|task|terminate|then|type|until|use|when|while|with|xor)\b/i, 'boolean': /\b(?:false|true)\b/i, 'operator': /<[=>]?|>=?|=>?|:=|\/=?|\*\*?|[&+-]/, diff --git a/components/prism-ada.min.js b/components/prism-ada.min.js index 9ae2457461..f58b0ea9f3 100644 --- a/components/prism-ada.min.js +++ b/components/prism-ada.min.js @@ -1 +1 @@ -Prism.languages.ada={comment:/--.*/,string:/"(?:""|[^"\r\f\n])*"/i,number:[{pattern:/\b\d(?:_?\d)*#[\dA-F](?:_?[\dA-F])*(?:\.[\dA-F](?:_?[\dA-F])*)?#(?:E[+-]?\d(?:_?\d)*)?/i},{pattern:/\b\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:E[+-]?\d(?:_?\d)*)?\b/i}],"attr-name":/\b'\w+/i,keyword:/\b(?:abort|abs|abstract|accept|access|aliased|all|and|array|at|begin|body|case|constant|declare|delay|delta|digits|do|else|elsif|end|entry|exception|exit|for|function|generic|goto|if|in|interface|is|limited|loop|mod|new|not|null|of|others|out|overriding|package|pragma|private|procedure|protected|raise|range|record|rem|renames|requeue|return|reverse|select|separate|some|subtype|synchronized|tagged|task|terminate|then|type|until|use|when|while|with|xor)\b/i,boolean:/\b(?:false|true)\b/i,operator:/<[=>]?|>=?|=>?|:=|\/=?|\*\*?|[&+-]/,punctuation:/\.\.?|[,;():]/,char:/'.'/,variable:/\b[a-z](?:\w)*\b/i}; \ No newline at end of file +Prism.languages.ada={comment:/--.*/,string:/"(?:""|[^"\r\f\n])*"/,number:[{pattern:/\b\d(?:_?\d)*#[\dA-F](?:_?[\dA-F])*(?:\.[\dA-F](?:_?[\dA-F])*)?#(?:E[+-]?\d(?:_?\d)*)?/i},{pattern:/\b\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:E[+-]?\d(?:_?\d)*)?\b/i}],"attr-name":/\b'\w+/,keyword:/\b(?:abort|abs|abstract|accept|access|aliased|all|and|array|at|begin|body|case|constant|declare|delay|delta|digits|do|else|elsif|end|entry|exception|exit|for|function|generic|goto|if|in|interface|is|limited|loop|mod|new|not|null|of|others|out|overriding|package|pragma|private|procedure|protected|raise|range|record|rem|renames|requeue|return|reverse|select|separate|some|subtype|synchronized|tagged|task|terminate|then|type|until|use|when|while|with|xor)\b/i,boolean:/\b(?:false|true)\b/i,operator:/<[=>]?|>=?|=>?|:=|\/=?|\*\*?|[&+-]/,punctuation:/\.\.?|[,;():]/,char:/'.'/,variable:/\b[a-z](?:\w)*\b/i}; \ No newline at end of file diff --git a/components/prism-aspnet.js b/components/prism-aspnet.js index adb90d34d1..1b1348c5d1 100644 --- a/components/prism-aspnet.js +++ b/components/prism-aspnet.js @@ -1,6 +1,6 @@ Prism.languages.aspnet = Prism.languages.extend('markup', { 'page-directive': { - pattern: /<%\s*@.*%>/i, + pattern: /<%\s*@.*%>/, alias: 'tag', inside: { 'page-directive': { @@ -11,11 +11,11 @@ Prism.languages.aspnet = Prism.languages.extend('markup', { } }, 'directive': { - pattern: /<%.*%>/i, + pattern: /<%.*%>/, alias: 'tag', inside: { 'directive': { - pattern: /<%\s*?[$=%#:]{0,2}|%>/i, + pattern: /<%\s*?[$=%#:]{0,2}|%>/, alias: 'tag' }, rest: Prism.languages.csharp @@ -23,7 +23,7 @@ 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>\/=]+(?:=(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s'">=]+))?)*\s*\/?>/i; +Prism.languages.aspnet.tag.pattern = /<(?!%)\/?[^\s>\/]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s'">=]+))?)*\s*\/?>/; // match directives of attribute value foo="<% Bar %>" Prism.languages.insertBefore('inside', 'punctuation', { diff --git a/components/prism-aspnet.min.js b/components/prism-aspnet.min.js index 4896d2493e..f9161fc659 100644 --- a/components/prism-aspnet.min.js +++ b/components/prism-aspnet.min.js @@ -1 +1 @@ -Prism.languages.aspnet=Prism.languages.extend("markup",{"page-directive":{pattern:/<%\s*@.*%>/i,alias:"tag",inside:{"page-directive":{pattern:/<%\s*@\s*(?:Assembly|Control|Implements|Import|Master(?:Type)?|OutputCache|Page|PreviousPageType|Reference|Register)?|%>/i,alias:"tag"},rest:Prism.languages.markup.tag.inside}},directive:{pattern:/<%.*%>/i,alias:"tag",inside:{directive:{pattern:/<%\s*?[$=%#:]{0,2}|%>/i,alias:"tag"},rest:Prism.languages.csharp}}}),Prism.languages.aspnet.tag.pattern=/<(?!%)\/?[^\s>\/]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s'">=]+))?)*\s*\/?>/i,Prism.languages.insertBefore("inside","punctuation",{directive:Prism.languages.aspnet.directive},Prism.languages.aspnet.tag.inside["attr-value"]),Prism.languages.insertBefore("aspnet","comment",{"asp-comment":{pattern:/<%--[\s\S]*?--%>/,alias:["asp","comment"]}}),Prism.languages.insertBefore("aspnet",Prism.languages.javascript?"script":"tag",{"asp-script":{pattern:/(]*>)[\s\S]*?(?=<\/script>)/i,lookbehind:!0,alias:["asp","script"],inside:Prism.languages.csharp||{}}}); \ No newline at end of file +Prism.languages.aspnet=Prism.languages.extend("markup",{"page-directive":{pattern:/<%\s*@.*%>/,alias:"tag",inside:{"page-directive":{pattern:/<%\s*@\s*(?:Assembly|Control|Implements|Import|Master(?:Type)?|OutputCache|Page|PreviousPageType|Reference|Register)?|%>/i,alias:"tag"},rest:Prism.languages.markup.tag.inside}},directive:{pattern:/<%.*%>/,alias:"tag",inside:{directive:{pattern:/<%\s*?[$=%#:]{0,2}|%>/,alias:"tag"},rest:Prism.languages.csharp}}}),Prism.languages.aspnet.tag.pattern=/<(?!%)\/?[^\s>\/]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s'">=]+))?)*\s*\/?>/,Prism.languages.insertBefore("inside","punctuation",{directive:Prism.languages.aspnet.directive},Prism.languages.aspnet.tag.inside["attr-value"]),Prism.languages.insertBefore("aspnet","comment",{"asp-comment":{pattern:/<%--[\s\S]*?--%>/,alias:["asp","comment"]}}),Prism.languages.insertBefore("aspnet",Prism.languages.javascript?"script":"tag",{"asp-script":{pattern:/(]*>)[\s\S]*?(?=<\/script>)/i,lookbehind:!0,alias:["asp","script"],inside:Prism.languages.csharp||{}}}); \ No newline at end of file diff --git a/components/prism-autohotkey.js b/components/prism-autohotkey.js index 7f24633678..dbd0751c94 100644 --- a/components/prism-autohotkey.js +++ b/components/prism-autohotkey.js @@ -16,7 +16,7 @@ Prism.languages.autohotkey = { pattern: /^([ \t]*)[^\s,`":]+(?=:[ \t]*$)/m, lookbehind: true }, - 'string': /"(?:[^"\n\r]|"")*"/m, + 'string': /"(?:[^"\n\r]|"")*"/, 'variable': /%\w+%/, 'number': /\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/, 'operator': /\?|\/\/?=?|:=|\|[=|]?|&[=&]?|\+[=+]?|-[=-]?|\*[=*]?|<(?:<=?|>|=)?|>>?=?|[.^!=~]=?|\b(?:AND|NOT|OR)\b/, @@ -33,6 +33,6 @@ Prism.languages.autohotkey = { 'important': /#\b(?:AllowSameLineComments|ClipboardTimeout|CommentFlag|DerefChar|ErrorStdOut|EscapeChar|HotkeyInterval|HotkeyModifierTimeout|Hotstring|If|IfTimeout|IfWinActive|IfWinExist|IfWinNotActive|IfWinNotExist|Include|IncludeAgain|InputLevel|InstallKeybdHook|InstallMouseHook|KeyHistory|MaxHotkeysPerInterval|MaxMem|MaxThreads|MaxThreadsBuffer|MaxThreadsPerHotkey|MenuMaskKey|NoEnv|NoTrayIcon|Persistent|SingleInstance|UseHook|Warn|WinActivateForce)\b/i, 'keyword': /\b(?:Abort|AboveNormal|Add|ahk_class|ahk_exe|ahk_group|ahk_id|ahk_pid|All|Alnum|Alpha|AltSubmit|AltTab|AltTabAndMenu|AltTabMenu|AltTabMenuDismiss|AlwaysOnTop|AutoSize|Background|BackgroundTrans|BelowNormal|between|BitAnd|BitNot|BitOr|BitShiftLeft|BitShiftRight|BitXOr|Bold|Border|Button|ByRef|Catch|Checkbox|Checked|CheckedGray|Choose|ChooseString|Close|Color|ComboBox|Contains|ControlList|Count|Date|DateTime|Days|DDL|Default|DeleteAll|Delimiter|Deref|Destroy|Digit|Disable|Disabled|DropDownList|Edit|Eject|Else|Enable|Enabled|Error|Exist|Expand|ExStyle|FileSystem|Finally|First|Flash|Float|FloatFast|Focus|Font|for|global|Grid|Group|GroupBox|GuiClose|GuiContextMenu|GuiDropFiles|GuiEscape|GuiSize|Hdr|Hidden|Hide|High|HKCC|HKCR|HKCU|HKEY_CLASSES_ROOT|HKEY_CURRENT_CONFIG|HKEY_CURRENT_USER|HKEY_LOCAL_MACHINE|HKEY_USERS|HKLM|HKU|Hours|HScroll|Icon|IconSmall|ID|IDLast|If|IfEqual|IfExist|IfGreater|IfGreaterOrEqual|IfInString|IfLess|IfLessOrEqual|IfMsgBox|IfNotEqual|IfNotExist|IfNotInString|IfWinActive|IfWinExist|IfWinNotActive|IfWinNotExist|Ignore|ImageList|in|Integer|IntegerFast|Interrupt|is|italic|Join|Label|LastFound|LastFoundExist|Limit|Lines|List|ListBox|ListView|local|Lock|Logoff|Low|Lower|Lowercase|MainWindow|Margin|Maximize|MaximizeBox|MaxSize|Minimize|MinimizeBox|MinMax|MinSize|Minutes|MonthCal|Mouse|Move|Multi|NA|No|NoActivate|NoDefault|NoHide|NoIcon|NoMainWindow|norm|Normal|NoSort|NoSortHdr|NoStandard|Not|NoTab|NoTimers|Number|Off|Ok|On|OwnDialogs|Owner|Parse|Password|Picture|Pixel|Pos|Pow|Priority|ProcessName|Radio|Range|Read|ReadOnly|Realtime|Redraw|Region|REG_BINARY|REG_DWORD|REG_EXPAND_SZ|REG_MULTI_SZ|REG_SZ|Relative|Rename|Report|Resize|Restore|Retry|RGB|Screen|Seconds|Section|Serial|SetLabel|ShiftAltTab|Show|Single|Slider|SortDesc|Standard|static|Status|StatusBar|StatusCD|strike|Style|Submit|SysMenu|Tab2|TabStop|Text|Theme|Throw|Tile|ToggleCheck|ToggleEnable|ToolWindow|Top|Topmost|TransColor|Transparent|Tray|TreeView|Try|TryAgain|Type|UnCheck|underline|Unicode|Unlock|Until|UpDown|Upper|Uppercase|UseErrorLevel|Vis|VisFirst|Visible|VScroll|Wait|WaitClose|WantCtrlA|WantF2|WantReturn|While|Wrap|Xdigit|xm|xp|xs|Yes|ym|yp|ys)\b/i, - 'function': /[^(); \t,\n+*\-=?>:\\\/<&%\[\]]+(?=\()/m, + 'function': /[^(); \t,\n+*\-=?>:\\\/<&%\[\]]+(?=\()/, 'punctuation': /[{}[\]():,]/ }; diff --git a/components/prism-autohotkey.min.js b/components/prism-autohotkey.min.js index 666d86f6c2..d7e1894410 100644 --- a/components/prism-autohotkey.min.js +++ b/components/prism-autohotkey.min.js @@ -1 +1 @@ -Prism.languages.autohotkey={comment:[{pattern:/(^|\s);.*/,lookbehind:!0},{pattern:/(^[\t ]*)\/\*(?:[\r\n](?![ \t]*\*\/)|[^\r\n])*(?:[\r\n][ \t]*\*\/)?/m,lookbehind:!0,greedy:!0}],tag:{pattern:/^([ \t]*)[^\s,`":]+(?=:[ \t]*$)/m,lookbehind:!0},string:/"(?:[^"\n\r]|"")*"/m,variable:/%\w+%/,number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/\?|\/\/?=?|:=|\|[=|]?|&[=&]?|\+[=+]?|-[=-]?|\*[=*]?|<(?:<=?|>|=)?|>>?=?|[.^!=~]=?|\b(?:AND|NOT|OR)\b/,boolean:/\b(?:false|true)\b/,selector:/\b(?:AutoTrim|BlockInput|Break|Click|ClipWait|Continue|Control|ControlClick|ControlFocus|ControlGet|ControlGetFocus|ControlGetPos|ControlGetText|ControlMove|ControlSend|ControlSendRaw|ControlSetText|CoordMode|Critical|DetectHiddenText|DetectHiddenWindows|Drive|DriveGet|DriveSpaceFree|EnvAdd|EnvDiv|EnvGet|EnvMult|EnvSet|EnvSub|EnvUpdate|Exit|ExitApp|FileAppend|FileCopy|FileCopyDir|FileCreateDir|FileCreateShortcut|FileDelete|FileEncoding|FileGetAttrib|FileGetShortcut|FileGetSize|FileGetTime|FileGetVersion|FileInstall|FileMove|FileMoveDir|FileRead|FileReadLine|FileRecycle|FileRecycleEmpty|FileRemoveDir|FileSelectFile|FileSelectFolder|FileSetAttrib|FileSetTime|FormatTime|GetKeyState|Gosub|Goto|GroupActivate|GroupAdd|GroupClose|GroupDeactivate|Gui|GuiControl|GuiControlGet|Hotkey|ImageSearch|IniDelete|IniRead|IniWrite|Input|InputBox|KeyWait|ListHotkeys|ListLines|ListVars|Loop|Menu|MouseClick|MouseClickDrag|MouseGetPos|MouseMove|MsgBox|OnExit|OutputDebug|Pause|PixelGetColor|PixelSearch|PostMessage|Process|Progress|Random|RegDelete|RegRead|RegWrite|Reload|Repeat|Return|Run|RunAs|RunWait|Send|SendEvent|SendInput|SendMessage|SendMode|SendPlay|SendRaw|SetBatchLines|SetCapslockState|SetControlDelay|SetDefaultMouseSpeed|SetEnv|SetFormat|SetKeyDelay|SetMouseDelay|SetNumlockState|SetRegView|SetScrollLockState|SetStoreCapslockMode|SetTimer|SetTitleMatchMode|SetWinDelay|SetWorkingDir|Shutdown|Sleep|Sort|SoundBeep|SoundGet|SoundGetWaveVolume|SoundPlay|SoundSet|SoundSetWaveVolume|SplashImage|SplashTextOff|SplashTextOn|SplitPath|StatusBarGetText|StatusBarWait|StringCaseSense|StringGetPos|StringLeft|StringLen|StringLower|StringMid|StringReplace|StringRight|StringSplit|StringTrimLeft|StringTrimRight|StringUpper|Suspend|SysGet|Thread|ToolTip|Transform|TrayTip|URLDownloadToFile|WinActivate|WinActivateBottom|WinClose|WinGet|WinGetActiveStats|WinGetActiveTitle|WinGetClass|WinGetPos|WinGetText|WinGetTitle|WinHide|WinKill|WinMaximize|WinMenuSelectItem|WinMinimize|WinMinimizeAll|WinMinimizeAllUndo|WinMove|WinRestore|WinSet|WinSetTitle|WinShow|WinWait|WinWaitActive|WinWaitClose|WinWaitNotActive)\b/i,constant:/\b(?:a_ahkpath|a_ahkversion|a_appdata|a_appdatacommon|a_autotrim|a_batchlines|a_caretx|a_carety|a_computername|a_controldelay|a_cursor|a_dd|a_ddd|a_dddd|a_defaultmousespeed|a_desktop|a_desktopcommon|a_detecthiddentext|a_detecthiddenwindows|a_endchar|a_eventinfo|a_exitreason|a_fileencoding|a_formatfloat|a_formatinteger|a_gui|a_guicontrol|a_guicontrolevent|a_guievent|a_guiheight|a_guiwidth|a_guix|a_guiy|a_hour|a_iconfile|a_iconhidden|a_iconnumber|a_icontip|a_index|a_ipaddress1|a_ipaddress2|a_ipaddress3|a_ipaddress4|a_is64bitos|a_isadmin|a_iscompiled|a_iscritical|a_ispaused|a_issuspended|a_isunicode|a_keydelay|a_language|a_lasterror|a_linefile|a_linenumber|a_loopfield|a_loopfileattrib|a_loopfiledir|a_loopfileext|a_loopfilefullpath|a_loopfilelongpath|a_loopfilename|a_loopfileshortname|a_loopfileshortpath|a_loopfilesize|a_loopfilesizekb|a_loopfilesizemb|a_loopfiletimeaccessed|a_loopfiletimecreated|a_loopfiletimemodified|a_loopreadline|a_loopregkey|a_loopregname|a_loopregsubkey|a_loopregtimemodified|a_loopregtype|a_mday|a_min|a_mm|a_mmm|a_mmmm|a_mon|a_mousedelay|a_msec|a_mydocuments|a_now|a_nowutc|a_numbatchlines|a_ostype|a_osversion|a_priorhotkey|a_priorkey|a_programfiles|a_programs|a_programscommon|a_ptrsize|a_regview|a_screendpi|a_screenheight|a_screenwidth|a_scriptdir|a_scriptfullpath|a_scripthwnd|a_scriptname|a_sec|a_space|a_startmenu|a_startmenucommon|a_startup|a_startupcommon|a_stringcasesense|a_tab|a_temp|a_thisfunc|a_thishotkey|a_thislabel|a_thismenu|a_thismenuitem|a_thismenuitempos|a_tickcount|a_timeidle|a_timeidlephysical|a_timesincepriorhotkey|a_timesincethishotkey|a_titlematchmode|a_titlematchmodespeed|a_username|a_wday|a_windelay|a_windir|a_workingdir|a_yday|a_year|a_yweek|a_yyyy|clipboard|clipboardall|comspec|errorlevel|programfiles)\b/i,builtin:/\b(?:abs|acos|asc|asin|atan|ceil|chr|class|comobjactive|comobjarray|comobjconnect|comobjcreate|comobjerror|comobjflags|comobjget|comobjquery|comobjtype|comobjvalue|cos|dllcall|exp|fileexist|Fileopen|floor|format|il_add|il_create|il_destroy|instr|isfunc|islabel|IsObject|ln|log|ltrim|lv_add|lv_delete|lv_deletecol|lv_getcount|lv_getnext|lv_gettext|lv_insert|lv_insertcol|lv_modify|lv_modifycol|lv_setimagelist|mod|numget|numput|onmessage|regexmatch|regexreplace|registercallback|round|rtrim|sb_seticon|sb_setparts|sb_settext|sin|sqrt|strlen|strreplace|strsplit|substr|tan|tv_add|tv_delete|tv_get|tv_getchild|tv_getcount|tv_getnext|tv_getparent|tv_getprev|tv_getselection|tv_gettext|tv_modify|varsetcapacity|winactive|winexist|__Call|__Get|__New|__Set)\b/i,symbol:/\b(?:alt|altdown|altup|appskey|backspace|browser_back|browser_favorites|browser_forward|browser_home|browser_refresh|browser_search|browser_stop|bs|capslock|ctrl|ctrlbreak|ctrldown|ctrlup|del|delete|down|end|enter|esc|escape|f1|f10|f11|f12|f13|f14|f15|f16|f17|f18|f19|f2|f20|f21|f22|f23|f24|f3|f4|f5|f6|f7|f8|f9|home|ins|insert|joy1|joy10|joy11|joy12|joy13|joy14|joy15|joy16|joy17|joy18|joy19|joy2|joy20|joy21|joy22|joy23|joy24|joy25|joy26|joy27|joy28|joy29|joy3|joy30|joy31|joy32|joy4|joy5|joy6|joy7|joy8|joy9|joyaxes|joybuttons|joyinfo|joyname|joypov|joyr|joyu|joyv|joyx|joyy|joyz|lalt|launch_app1|launch_app2|launch_mail|launch_media|lbutton|lcontrol|lctrl|left|lshift|lwin|lwindown|lwinup|mbutton|media_next|media_play_pause|media_prev|media_stop|numlock|numpad0|numpad1|numpad2|numpad3|numpad4|numpad5|numpad6|numpad7|numpad8|numpad9|numpadadd|numpadclear|numpaddel|numpaddiv|numpaddot|numpaddown|numpadend|numpadenter|numpadhome|numpadins|numpadleft|numpadmult|numpadpgdn|numpadpgup|numpadright|numpadsub|numpadup|pgdn|pgup|printscreen|ralt|rbutton|rcontrol|rctrl|right|rshift|rwin|rwindown|rwinup|scrolllock|shift|shiftdown|shiftup|space|tab|up|volume_down|volume_mute|volume_up|wheeldown|wheelleft|wheelright|wheelup|xbutton1|xbutton2)\b/i,important:/#\b(?:AllowSameLineComments|ClipboardTimeout|CommentFlag|DerefChar|ErrorStdOut|EscapeChar|HotkeyInterval|HotkeyModifierTimeout|Hotstring|If|IfTimeout|IfWinActive|IfWinExist|IfWinNotActive|IfWinNotExist|Include|IncludeAgain|InputLevel|InstallKeybdHook|InstallMouseHook|KeyHistory|MaxHotkeysPerInterval|MaxMem|MaxThreads|MaxThreadsBuffer|MaxThreadsPerHotkey|MenuMaskKey|NoEnv|NoTrayIcon|Persistent|SingleInstance|UseHook|Warn|WinActivateForce)\b/i,keyword:/\b(?:Abort|AboveNormal|Add|ahk_class|ahk_exe|ahk_group|ahk_id|ahk_pid|All|Alnum|Alpha|AltSubmit|AltTab|AltTabAndMenu|AltTabMenu|AltTabMenuDismiss|AlwaysOnTop|AutoSize|Background|BackgroundTrans|BelowNormal|between|BitAnd|BitNot|BitOr|BitShiftLeft|BitShiftRight|BitXOr|Bold|Border|Button|ByRef|Catch|Checkbox|Checked|CheckedGray|Choose|ChooseString|Close|Color|ComboBox|Contains|ControlList|Count|Date|DateTime|Days|DDL|Default|DeleteAll|Delimiter|Deref|Destroy|Digit|Disable|Disabled|DropDownList|Edit|Eject|Else|Enable|Enabled|Error|Exist|Expand|ExStyle|FileSystem|Finally|First|Flash|Float|FloatFast|Focus|Font|for|global|Grid|Group|GroupBox|GuiClose|GuiContextMenu|GuiDropFiles|GuiEscape|GuiSize|Hdr|Hidden|Hide|High|HKCC|HKCR|HKCU|HKEY_CLASSES_ROOT|HKEY_CURRENT_CONFIG|HKEY_CURRENT_USER|HKEY_LOCAL_MACHINE|HKEY_USERS|HKLM|HKU|Hours|HScroll|Icon|IconSmall|ID|IDLast|If|IfEqual|IfExist|IfGreater|IfGreaterOrEqual|IfInString|IfLess|IfLessOrEqual|IfMsgBox|IfNotEqual|IfNotExist|IfNotInString|IfWinActive|IfWinExist|IfWinNotActive|IfWinNotExist|Ignore|ImageList|in|Integer|IntegerFast|Interrupt|is|italic|Join|Label|LastFound|LastFoundExist|Limit|Lines|List|ListBox|ListView|local|Lock|Logoff|Low|Lower|Lowercase|MainWindow|Margin|Maximize|MaximizeBox|MaxSize|Minimize|MinimizeBox|MinMax|MinSize|Minutes|MonthCal|Mouse|Move|Multi|NA|No|NoActivate|NoDefault|NoHide|NoIcon|NoMainWindow|norm|Normal|NoSort|NoSortHdr|NoStandard|Not|NoTab|NoTimers|Number|Off|Ok|On|OwnDialogs|Owner|Parse|Password|Picture|Pixel|Pos|Pow|Priority|ProcessName|Radio|Range|Read|ReadOnly|Realtime|Redraw|Region|REG_BINARY|REG_DWORD|REG_EXPAND_SZ|REG_MULTI_SZ|REG_SZ|Relative|Rename|Report|Resize|Restore|Retry|RGB|Screen|Seconds|Section|Serial|SetLabel|ShiftAltTab|Show|Single|Slider|SortDesc|Standard|static|Status|StatusBar|StatusCD|strike|Style|Submit|SysMenu|Tab2|TabStop|Text|Theme|Throw|Tile|ToggleCheck|ToggleEnable|ToolWindow|Top|Topmost|TransColor|Transparent|Tray|TreeView|Try|TryAgain|Type|UnCheck|underline|Unicode|Unlock|Until|UpDown|Upper|Uppercase|UseErrorLevel|Vis|VisFirst|Visible|VScroll|Wait|WaitClose|WantCtrlA|WantF2|WantReturn|While|Wrap|Xdigit|xm|xp|xs|Yes|ym|yp|ys)\b/i,function:/[^(); \t,\n+*\-=?>:\\\/<&%\[\]]+(?=\()/m,punctuation:/[{}[\]():,]/}; \ No newline at end of file +Prism.languages.autohotkey={comment:[{pattern:/(^|\s);.*/,lookbehind:!0},{pattern:/(^[\t ]*)\/\*(?:[\r\n](?![ \t]*\*\/)|[^\r\n])*(?:[\r\n][ \t]*\*\/)?/m,lookbehind:!0,greedy:!0}],tag:{pattern:/^([ \t]*)[^\s,`":]+(?=:[ \t]*$)/m,lookbehind:!0},string:/"(?:[^"\n\r]|"")*"/,variable:/%\w+%/,number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/\?|\/\/?=?|:=|\|[=|]?|&[=&]?|\+[=+]?|-[=-]?|\*[=*]?|<(?:<=?|>|=)?|>>?=?|[.^!=~]=?|\b(?:AND|NOT|OR)\b/,boolean:/\b(?:false|true)\b/,selector:/\b(?:AutoTrim|BlockInput|Break|Click|ClipWait|Continue|Control|ControlClick|ControlFocus|ControlGet|ControlGetFocus|ControlGetPos|ControlGetText|ControlMove|ControlSend|ControlSendRaw|ControlSetText|CoordMode|Critical|DetectHiddenText|DetectHiddenWindows|Drive|DriveGet|DriveSpaceFree|EnvAdd|EnvDiv|EnvGet|EnvMult|EnvSet|EnvSub|EnvUpdate|Exit|ExitApp|FileAppend|FileCopy|FileCopyDir|FileCreateDir|FileCreateShortcut|FileDelete|FileEncoding|FileGetAttrib|FileGetShortcut|FileGetSize|FileGetTime|FileGetVersion|FileInstall|FileMove|FileMoveDir|FileRead|FileReadLine|FileRecycle|FileRecycleEmpty|FileRemoveDir|FileSelectFile|FileSelectFolder|FileSetAttrib|FileSetTime|FormatTime|GetKeyState|Gosub|Goto|GroupActivate|GroupAdd|GroupClose|GroupDeactivate|Gui|GuiControl|GuiControlGet|Hotkey|ImageSearch|IniDelete|IniRead|IniWrite|Input|InputBox|KeyWait|ListHotkeys|ListLines|ListVars|Loop|Menu|MouseClick|MouseClickDrag|MouseGetPos|MouseMove|MsgBox|OnExit|OutputDebug|Pause|PixelGetColor|PixelSearch|PostMessage|Process|Progress|Random|RegDelete|RegRead|RegWrite|Reload|Repeat|Return|Run|RunAs|RunWait|Send|SendEvent|SendInput|SendMessage|SendMode|SendPlay|SendRaw|SetBatchLines|SetCapslockState|SetControlDelay|SetDefaultMouseSpeed|SetEnv|SetFormat|SetKeyDelay|SetMouseDelay|SetNumlockState|SetRegView|SetScrollLockState|SetStoreCapslockMode|SetTimer|SetTitleMatchMode|SetWinDelay|SetWorkingDir|Shutdown|Sleep|Sort|SoundBeep|SoundGet|SoundGetWaveVolume|SoundPlay|SoundSet|SoundSetWaveVolume|SplashImage|SplashTextOff|SplashTextOn|SplitPath|StatusBarGetText|StatusBarWait|StringCaseSense|StringGetPos|StringLeft|StringLen|StringLower|StringMid|StringReplace|StringRight|StringSplit|StringTrimLeft|StringTrimRight|StringUpper|Suspend|SysGet|Thread|ToolTip|Transform|TrayTip|URLDownloadToFile|WinActivate|WinActivateBottom|WinClose|WinGet|WinGetActiveStats|WinGetActiveTitle|WinGetClass|WinGetPos|WinGetText|WinGetTitle|WinHide|WinKill|WinMaximize|WinMenuSelectItem|WinMinimize|WinMinimizeAll|WinMinimizeAllUndo|WinMove|WinRestore|WinSet|WinSetTitle|WinShow|WinWait|WinWaitActive|WinWaitClose|WinWaitNotActive)\b/i,constant:/\b(?:a_ahkpath|a_ahkversion|a_appdata|a_appdatacommon|a_autotrim|a_batchlines|a_caretx|a_carety|a_computername|a_controldelay|a_cursor|a_dd|a_ddd|a_dddd|a_defaultmousespeed|a_desktop|a_desktopcommon|a_detecthiddentext|a_detecthiddenwindows|a_endchar|a_eventinfo|a_exitreason|a_fileencoding|a_formatfloat|a_formatinteger|a_gui|a_guicontrol|a_guicontrolevent|a_guievent|a_guiheight|a_guiwidth|a_guix|a_guiy|a_hour|a_iconfile|a_iconhidden|a_iconnumber|a_icontip|a_index|a_ipaddress1|a_ipaddress2|a_ipaddress3|a_ipaddress4|a_is64bitos|a_isadmin|a_iscompiled|a_iscritical|a_ispaused|a_issuspended|a_isunicode|a_keydelay|a_language|a_lasterror|a_linefile|a_linenumber|a_loopfield|a_loopfileattrib|a_loopfiledir|a_loopfileext|a_loopfilefullpath|a_loopfilelongpath|a_loopfilename|a_loopfileshortname|a_loopfileshortpath|a_loopfilesize|a_loopfilesizekb|a_loopfilesizemb|a_loopfiletimeaccessed|a_loopfiletimecreated|a_loopfiletimemodified|a_loopreadline|a_loopregkey|a_loopregname|a_loopregsubkey|a_loopregtimemodified|a_loopregtype|a_mday|a_min|a_mm|a_mmm|a_mmmm|a_mon|a_mousedelay|a_msec|a_mydocuments|a_now|a_nowutc|a_numbatchlines|a_ostype|a_osversion|a_priorhotkey|a_priorkey|a_programfiles|a_programs|a_programscommon|a_ptrsize|a_regview|a_screendpi|a_screenheight|a_screenwidth|a_scriptdir|a_scriptfullpath|a_scripthwnd|a_scriptname|a_sec|a_space|a_startmenu|a_startmenucommon|a_startup|a_startupcommon|a_stringcasesense|a_tab|a_temp|a_thisfunc|a_thishotkey|a_thislabel|a_thismenu|a_thismenuitem|a_thismenuitempos|a_tickcount|a_timeidle|a_timeidlephysical|a_timesincepriorhotkey|a_timesincethishotkey|a_titlematchmode|a_titlematchmodespeed|a_username|a_wday|a_windelay|a_windir|a_workingdir|a_yday|a_year|a_yweek|a_yyyy|clipboard|clipboardall|comspec|errorlevel|programfiles)\b/i,builtin:/\b(?:abs|acos|asc|asin|atan|ceil|chr|class|comobjactive|comobjarray|comobjconnect|comobjcreate|comobjerror|comobjflags|comobjget|comobjquery|comobjtype|comobjvalue|cos|dllcall|exp|fileexist|Fileopen|floor|format|il_add|il_create|il_destroy|instr|isfunc|islabel|IsObject|ln|log|ltrim|lv_add|lv_delete|lv_deletecol|lv_getcount|lv_getnext|lv_gettext|lv_insert|lv_insertcol|lv_modify|lv_modifycol|lv_setimagelist|mod|numget|numput|onmessage|regexmatch|regexreplace|registercallback|round|rtrim|sb_seticon|sb_setparts|sb_settext|sin|sqrt|strlen|strreplace|strsplit|substr|tan|tv_add|tv_delete|tv_get|tv_getchild|tv_getcount|tv_getnext|tv_getparent|tv_getprev|tv_getselection|tv_gettext|tv_modify|varsetcapacity|winactive|winexist|__Call|__Get|__New|__Set)\b/i,symbol:/\b(?:alt|altdown|altup|appskey|backspace|browser_back|browser_favorites|browser_forward|browser_home|browser_refresh|browser_search|browser_stop|bs|capslock|ctrl|ctrlbreak|ctrldown|ctrlup|del|delete|down|end|enter|esc|escape|f1|f10|f11|f12|f13|f14|f15|f16|f17|f18|f19|f2|f20|f21|f22|f23|f24|f3|f4|f5|f6|f7|f8|f9|home|ins|insert|joy1|joy10|joy11|joy12|joy13|joy14|joy15|joy16|joy17|joy18|joy19|joy2|joy20|joy21|joy22|joy23|joy24|joy25|joy26|joy27|joy28|joy29|joy3|joy30|joy31|joy32|joy4|joy5|joy6|joy7|joy8|joy9|joyaxes|joybuttons|joyinfo|joyname|joypov|joyr|joyu|joyv|joyx|joyy|joyz|lalt|launch_app1|launch_app2|launch_mail|launch_media|lbutton|lcontrol|lctrl|left|lshift|lwin|lwindown|lwinup|mbutton|media_next|media_play_pause|media_prev|media_stop|numlock|numpad0|numpad1|numpad2|numpad3|numpad4|numpad5|numpad6|numpad7|numpad8|numpad9|numpadadd|numpadclear|numpaddel|numpaddiv|numpaddot|numpaddown|numpadend|numpadenter|numpadhome|numpadins|numpadleft|numpadmult|numpadpgdn|numpadpgup|numpadright|numpadsub|numpadup|pgdn|pgup|printscreen|ralt|rbutton|rcontrol|rctrl|right|rshift|rwin|rwindown|rwinup|scrolllock|shift|shiftdown|shiftup|space|tab|up|volume_down|volume_mute|volume_up|wheeldown|wheelleft|wheelright|wheelup|xbutton1|xbutton2)\b/i,important:/#\b(?:AllowSameLineComments|ClipboardTimeout|CommentFlag|DerefChar|ErrorStdOut|EscapeChar|HotkeyInterval|HotkeyModifierTimeout|Hotstring|If|IfTimeout|IfWinActive|IfWinExist|IfWinNotActive|IfWinNotExist|Include|IncludeAgain|InputLevel|InstallKeybdHook|InstallMouseHook|KeyHistory|MaxHotkeysPerInterval|MaxMem|MaxThreads|MaxThreadsBuffer|MaxThreadsPerHotkey|MenuMaskKey|NoEnv|NoTrayIcon|Persistent|SingleInstance|UseHook|Warn|WinActivateForce)\b/i,keyword:/\b(?:Abort|AboveNormal|Add|ahk_class|ahk_exe|ahk_group|ahk_id|ahk_pid|All|Alnum|Alpha|AltSubmit|AltTab|AltTabAndMenu|AltTabMenu|AltTabMenuDismiss|AlwaysOnTop|AutoSize|Background|BackgroundTrans|BelowNormal|between|BitAnd|BitNot|BitOr|BitShiftLeft|BitShiftRight|BitXOr|Bold|Border|Button|ByRef|Catch|Checkbox|Checked|CheckedGray|Choose|ChooseString|Close|Color|ComboBox|Contains|ControlList|Count|Date|DateTime|Days|DDL|Default|DeleteAll|Delimiter|Deref|Destroy|Digit|Disable|Disabled|DropDownList|Edit|Eject|Else|Enable|Enabled|Error|Exist|Expand|ExStyle|FileSystem|Finally|First|Flash|Float|FloatFast|Focus|Font|for|global|Grid|Group|GroupBox|GuiClose|GuiContextMenu|GuiDropFiles|GuiEscape|GuiSize|Hdr|Hidden|Hide|High|HKCC|HKCR|HKCU|HKEY_CLASSES_ROOT|HKEY_CURRENT_CONFIG|HKEY_CURRENT_USER|HKEY_LOCAL_MACHINE|HKEY_USERS|HKLM|HKU|Hours|HScroll|Icon|IconSmall|ID|IDLast|If|IfEqual|IfExist|IfGreater|IfGreaterOrEqual|IfInString|IfLess|IfLessOrEqual|IfMsgBox|IfNotEqual|IfNotExist|IfNotInString|IfWinActive|IfWinExist|IfWinNotActive|IfWinNotExist|Ignore|ImageList|in|Integer|IntegerFast|Interrupt|is|italic|Join|Label|LastFound|LastFoundExist|Limit|Lines|List|ListBox|ListView|local|Lock|Logoff|Low|Lower|Lowercase|MainWindow|Margin|Maximize|MaximizeBox|MaxSize|Minimize|MinimizeBox|MinMax|MinSize|Minutes|MonthCal|Mouse|Move|Multi|NA|No|NoActivate|NoDefault|NoHide|NoIcon|NoMainWindow|norm|Normal|NoSort|NoSortHdr|NoStandard|Not|NoTab|NoTimers|Number|Off|Ok|On|OwnDialogs|Owner|Parse|Password|Picture|Pixel|Pos|Pow|Priority|ProcessName|Radio|Range|Read|ReadOnly|Realtime|Redraw|Region|REG_BINARY|REG_DWORD|REG_EXPAND_SZ|REG_MULTI_SZ|REG_SZ|Relative|Rename|Report|Resize|Restore|Retry|RGB|Screen|Seconds|Section|Serial|SetLabel|ShiftAltTab|Show|Single|Slider|SortDesc|Standard|static|Status|StatusBar|StatusCD|strike|Style|Submit|SysMenu|Tab2|TabStop|Text|Theme|Throw|Tile|ToggleCheck|ToggleEnable|ToolWindow|Top|Topmost|TransColor|Transparent|Tray|TreeView|Try|TryAgain|Type|UnCheck|underline|Unicode|Unlock|Until|UpDown|Upper|Uppercase|UseErrorLevel|Vis|VisFirst|Visible|VScroll|Wait|WaitClose|WantCtrlA|WantF2|WantReturn|While|Wrap|Xdigit|xm|xp|xs|Yes|ym|yp|ys)\b/i,function:/[^(); \t,\n+*\-=?>:\\\/<&%\[\]]+(?=\()/,punctuation:/[{}[\]():,]/}; \ No newline at end of file diff --git a/components/prism-basic.js b/components/prism-basic.js index fedca6006c..2a2e4a4dc9 100644 --- a/components/prism-basic.js +++ b/components/prism-basic.js @@ -6,7 +6,7 @@ Prism.languages.basic = { } }, 'string': { - pattern: /"(?:""|[!#$%&'()*,\/:;<=>?^\w +\-.])*"/i, + pattern: /"(?:""|[!#$%&'()*,\/:;<=>?^\w +\-.])*"/, greedy: true }, 'number': /(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:E[+-]?\d+)?/i, diff --git a/components/prism-basic.min.js b/components/prism-basic.min.js index aca059fa30..991e81ff8a 100644 --- a/components/prism-basic.min.js +++ b/components/prism-basic.min.js @@ -1 +1 @@ -Prism.languages.basic={comment:{pattern:/(?:!|REM\b).+/i,inside:{keyword:/^REM/i}},string:{pattern:/"(?:""|[!#$%&'()*,\/:;<=>?^\w +\-.])*"/i,greedy:!0},number:/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:E[+-]?\d+)?/i,keyword:/\b(?:AS|BEEP|BLOAD|BSAVE|CALL(?: ABSOLUTE)?|CASE|CHAIN|CHDIR|CLEAR|CLOSE|CLS|COM|COMMON|CONST|DATA|DECLARE|DEF(?: FN| SEG|DBL|INT|LNG|SNG|STR)|DIM|DO|DOUBLE|ELSE|ELSEIF|END|ENVIRON|ERASE|ERROR|EXIT|FIELD|FILES|FOR|FUNCTION|GET|GOSUB|GOTO|IF|INPUT|INTEGER|IOCTL|KEY|KILL|LINE INPUT|LOCATE|LOCK|LONG|LOOP|LSET|MKDIR|NAME|NEXT|OFF|ON(?: COM| ERROR| KEY| TIMER)?|OPEN|OPTION BASE|OUT|POKE|PUT|READ|REDIM|REM|RESTORE|RESUME|RETURN|RMDIR|RSET|RUN|SELECT CASE|SHARED|SHELL|SINGLE|SLEEP|STATIC|STEP|STOP|STRING|SUB|SWAP|SYSTEM|THEN|TIMER|TO|TROFF|TRON|TYPE|UNLOCK|UNTIL|USING|VIEW PRINT|WAIT|WEND|WHILE|WRITE)(?:\$|\b)/i,function:/\b(?:ABS|ACCESS|ACOS|ANGLE|AREA|ARITHMETIC|ARRAY|ASIN|ASK|AT|ATN|BASE|BEGIN|BREAK|CAUSE|CEIL|CHR|CLIP|COLLATE|COLOR|CON|COS|COSH|COT|CSC|DATE|DATUM|DEBUG|DECIMAL|DEF|DEG|DEGREES|DELETE|DET|DEVICE|DISPLAY|DOT|ELAPSED|EPS|ERASABLE|EXLINE|EXP|EXTERNAL|EXTYPE|FILETYPE|FIXED|FP|GO|GRAPH|HANDLER|IDN|IMAGE|IN|INT|INTERNAL|IP|IS|KEYED|LBOUND|LCASE|LEFT|LEN|LENGTH|LET|LINE|LINES|LOG|LOG10|LOG2|LTRIM|MARGIN|MAT|MAX|MAXNUM|MID|MIN|MISSING|MOD|NATIVE|NUL|NUMERIC|OF|OPTION|ORD|ORGANIZATION|OUTIN|OUTPUT|PI|POINT|POINTER|POINTS|POS|PRINT|PROGRAM|PROMPT|RAD|RADIANS|RANDOMIZE|RECORD|RECSIZE|RECTYPE|RELATIVE|REMAINDER|REPEAT|REST|RETRY|REWRITE|RIGHT|RND|ROUND|RTRIM|SAME|SEC|SELECT|SEQUENTIAL|SET|SETTER|SGN|SIN|SINH|SIZE|SKIP|SQR|STANDARD|STATUS|STR|STREAM|STYLE|TAB|TAN|TANH|TEMPLATE|TEXT|THERE|TIME|TIMEOUT|TRACE|TRANSFORM|TRUNCATE|UBOUND|UCASE|USE|VAL|VARIABLE|VIEWPORT|WHEN|WINDOW|WITH|ZER|ZONEWIDTH)(?:\$|\b)/i,operator:/<[=>]?|>=?|[+\-*\/^=&]|\b(?:AND|EQV|IMP|NOT|OR|XOR)\b/i,punctuation:/[,;:()]/}; \ No newline at end of file +Prism.languages.basic={comment:{pattern:/(?:!|REM\b).+/i,inside:{keyword:/^REM/i}},string:{pattern:/"(?:""|[!#$%&'()*,\/:;<=>?^\w +\-.])*"/,greedy:!0},number:/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:E[+-]?\d+)?/i,keyword:/\b(?:AS|BEEP|BLOAD|BSAVE|CALL(?: ABSOLUTE)?|CASE|CHAIN|CHDIR|CLEAR|CLOSE|CLS|COM|COMMON|CONST|DATA|DECLARE|DEF(?: FN| SEG|DBL|INT|LNG|SNG|STR)|DIM|DO|DOUBLE|ELSE|ELSEIF|END|ENVIRON|ERASE|ERROR|EXIT|FIELD|FILES|FOR|FUNCTION|GET|GOSUB|GOTO|IF|INPUT|INTEGER|IOCTL|KEY|KILL|LINE INPUT|LOCATE|LOCK|LONG|LOOP|LSET|MKDIR|NAME|NEXT|OFF|ON(?: COM| ERROR| KEY| TIMER)?|OPEN|OPTION BASE|OUT|POKE|PUT|READ|REDIM|REM|RESTORE|RESUME|RETURN|RMDIR|RSET|RUN|SELECT CASE|SHARED|SHELL|SINGLE|SLEEP|STATIC|STEP|STOP|STRING|SUB|SWAP|SYSTEM|THEN|TIMER|TO|TROFF|TRON|TYPE|UNLOCK|UNTIL|USING|VIEW PRINT|WAIT|WEND|WHILE|WRITE)(?:\$|\b)/i,function:/\b(?:ABS|ACCESS|ACOS|ANGLE|AREA|ARITHMETIC|ARRAY|ASIN|ASK|AT|ATN|BASE|BEGIN|BREAK|CAUSE|CEIL|CHR|CLIP|COLLATE|COLOR|CON|COS|COSH|COT|CSC|DATE|DATUM|DEBUG|DECIMAL|DEF|DEG|DEGREES|DELETE|DET|DEVICE|DISPLAY|DOT|ELAPSED|EPS|ERASABLE|EXLINE|EXP|EXTERNAL|EXTYPE|FILETYPE|FIXED|FP|GO|GRAPH|HANDLER|IDN|IMAGE|IN|INT|INTERNAL|IP|IS|KEYED|LBOUND|LCASE|LEFT|LEN|LENGTH|LET|LINE|LINES|LOG|LOG10|LOG2|LTRIM|MARGIN|MAT|MAX|MAXNUM|MID|MIN|MISSING|MOD|NATIVE|NUL|NUMERIC|OF|OPTION|ORD|ORGANIZATION|OUTIN|OUTPUT|PI|POINT|POINTER|POINTS|POS|PRINT|PROGRAM|PROMPT|RAD|RADIANS|RANDOMIZE|RECORD|RECSIZE|RECTYPE|RELATIVE|REMAINDER|REPEAT|REST|RETRY|REWRITE|RIGHT|RND|ROUND|RTRIM|SAME|SEC|SELECT|SEQUENTIAL|SET|SETTER|SGN|SIN|SINH|SIZE|SKIP|SQR|STANDARD|STATUS|STR|STREAM|STYLE|TAB|TAN|TANH|TEMPLATE|TEXT|THERE|TIME|TIMEOUT|TRACE|TRANSFORM|TRUNCATE|UBOUND|UCASE|USE|VAL|VARIABLE|VIEWPORT|WHEN|WINDOW|WITH|ZER|ZONEWIDTH)(?:\$|\b)/i,operator:/<[=>]?|>=?|[+\-*\/^=&]|\b(?:AND|EQV|IMP|NOT|OR|XOR)\b/i,punctuation:/[,;:()]/}; \ No newline at end of file diff --git a/components/prism-batch.js b/components/prism-batch.js index 27d9f6db65..405731800f 100644 --- a/components/prism-batch.js +++ b/components/prism-batch.js @@ -76,10 +76,10 @@ }, { // Other commands - pattern: /((?:^|[&(])[ \t]*@?)\w+\b(?:"(?:[\\"]"|[^"])*"(?!")|[^"^&)\r\n]|\^(?:\r\n|[\s\S]))*/im, + pattern: /((?:^|[&(])[ \t]*@?)\w+\b(?:"(?:[\\"]"|[^"])*"(?!")|[^"^&)\r\n]|\^(?:\r\n|[\s\S]))*/m, lookbehind: true, inside: { - 'keyword': /^\w+\b/i, + 'keyword': /^\w+\b/, 'string': string, 'parameter': parameter, 'label': { diff --git a/components/prism-batch.min.js b/components/prism-batch.min.js index 3c22c1ce1e..f49a688dc4 100644 --- a/components/prism-batch.min.js +++ b/components/prism-batch.min.js @@ -1 +1 @@ -!function(e){var r=/%%?[~:\w]+%?|!\S+!/,t={pattern:/\/[a-z?]+(?=[ :]|$):?|-[a-z]\b|--[a-z-]+\b/im,alias:"attr-name",inside:{punctuation:/:/}},n=/"(?:[\\"]"|[^"])*"(?!")/,i=/(?:\b|-)\d+\b/;Prism.languages.batch={comment:[/^::.*/m,{pattern:/((?:^|[&(])[ \t]*)rem\b(?:[^^&)\r\n]|\^(?:\r\n|[\s\S]))*/im,lookbehind:!0}],label:{pattern:/^:.*/m,alias:"property"},command:[{pattern:/((?:^|[&(])[ \t]*)for(?: \/[a-z?](?:[ :](?:"[^"]*"|[^\s"/]\S*))?)* \S+ in \([^)]+\) do/im,lookbehind:!0,inside:{keyword:/\b(?:do|in)\b|^for\b/i,string:n,parameter:t,variable:r,number:i,punctuation:/[()',]/}},{pattern:/((?:^|[&(])[ \t]*)if(?: \/[a-z?](?:[ :](?:"[^"]*"|[^\s"/]\S*))?)* (?:not )?(?:cmdextversion \d+|defined \w+|errorlevel \d+|exist \S+|(?:"[^"]*"|(?!")(?:(?!==)\S)+)?(?:==| (?:equ|geq|gtr|leq|lss|neq) )(?:"[^"]*"|[^\s"]\S*))/im,lookbehind:!0,inside:{keyword:/\b(?:cmdextversion|defined|errorlevel|exist|not)\b|^if\b/i,string:n,parameter:t,variable:r,number:i,operator:/\^|==|\b(?:equ|geq|gtr|leq|lss|neq)\b/i}},{pattern:/((?:^|[&()])[ \t]*)else\b/im,lookbehind:!0,inside:{keyword:/^else\b/i}},{pattern:/((?:^|[&(])[ \t]*)set(?: \/[a-z](?:[ :](?:"[^"]*"|[^\s"/]\S*))?)* (?:[^^&)\r\n]|\^(?:\r\n|[\s\S]))*/im,lookbehind:!0,inside:{keyword:/^set\b/i,string:n,parameter:t,variable:[r,/\w+(?=(?:[*\/%+\-&^|]|<<|>>)?=)/],number:i,operator:/[*\/%+\-&^|]=?|<<=?|>>=?|[!~_=]/,punctuation:/[()',]/}},{pattern:/((?:^|[&(])[ \t]*@?)\w+\b(?:"(?:[\\"]"|[^"])*"(?!")|[^"^&)\r\n]|\^(?:\r\n|[\s\S]))*/im,lookbehind:!0,inside:{keyword:/^\w+\b/i,string:n,parameter:t,label:{pattern:/(^\s*):\S+/m,lookbehind:!0,alias:"property"},variable:r,number:i,operator:/\^/}}],operator:/[&@]/,punctuation:/[()']/}}(); \ No newline at end of file +!function(e){var r=/%%?[~:\w]+%?|!\S+!/,t={pattern:/\/[a-z?]+(?=[ :]|$):?|-[a-z]\b|--[a-z-]+\b/im,alias:"attr-name",inside:{punctuation:/:/}},n=/"(?:[\\"]"|[^"])*"(?!")/,i=/(?:\b|-)\d+\b/;Prism.languages.batch={comment:[/^::.*/m,{pattern:/((?:^|[&(])[ \t]*)rem\b(?:[^^&)\r\n]|\^(?:\r\n|[\s\S]))*/im,lookbehind:!0}],label:{pattern:/^:.*/m,alias:"property"},command:[{pattern:/((?:^|[&(])[ \t]*)for(?: \/[a-z?](?:[ :](?:"[^"]*"|[^\s"/]\S*))?)* \S+ in \([^)]+\) do/im,lookbehind:!0,inside:{keyword:/\b(?:do|in)\b|^for\b/i,string:n,parameter:t,variable:r,number:i,punctuation:/[()',]/}},{pattern:/((?:^|[&(])[ \t]*)if(?: \/[a-z?](?:[ :](?:"[^"]*"|[^\s"/]\S*))?)* (?:not )?(?:cmdextversion \d+|defined \w+|errorlevel \d+|exist \S+|(?:"[^"]*"|(?!")(?:(?!==)\S)+)?(?:==| (?:equ|geq|gtr|leq|lss|neq) )(?:"[^"]*"|[^\s"]\S*))/im,lookbehind:!0,inside:{keyword:/\b(?:cmdextversion|defined|errorlevel|exist|not)\b|^if\b/i,string:n,parameter:t,variable:r,number:i,operator:/\^|==|\b(?:equ|geq|gtr|leq|lss|neq)\b/i}},{pattern:/((?:^|[&()])[ \t]*)else\b/im,lookbehind:!0,inside:{keyword:/^else\b/i}},{pattern:/((?:^|[&(])[ \t]*)set(?: \/[a-z](?:[ :](?:"[^"]*"|[^\s"/]\S*))?)* (?:[^^&)\r\n]|\^(?:\r\n|[\s\S]))*/im,lookbehind:!0,inside:{keyword:/^set\b/i,string:n,parameter:t,variable:[r,/\w+(?=(?:[*\/%+\-&^|]|<<|>>)?=)/],number:i,operator:/[*\/%+\-&^|]=?|<<=?|>>=?|[!~_=]/,punctuation:/[()',]/}},{pattern:/((?:^|[&(])[ \t]*@?)\w+\b(?:"(?:[\\"]"|[^"])*"(?!")|[^"^&)\r\n]|\^(?:\r\n|[\s\S]))*/m,lookbehind:!0,inside:{keyword:/^\w+\b/,string:n,parameter:t,label:{pattern:/(^\s*):\S+/m,lookbehind:!0,alias:"property"},variable:r,number:i,operator:/\^/}}],operator:/[&@]/,punctuation:/[()']/}}(); \ No newline at end of file diff --git a/components/prism-bbcode.js b/components/prism-bbcode.js index 386fbd1825..c80e5e8c3e 100644 --- a/components/prism-bbcode.js +++ b/components/prism-bbcode.js @@ -9,7 +9,7 @@ Prism.languages.bbcode = { } }, 'attr-value': { - pattern: /=\s*(?:"[^"]*"|'[^']*'|[^\s'"\]=]+)/i, + pattern: /=\s*(?:"[^"]*"|'[^']*'|[^\s'"\]=]+)/, inside: { 'punctuation': [ /^=/, diff --git a/components/prism-bbcode.min.js b/components/prism-bbcode.min.js index b795a1fe95..4cadf4950f 100644 --- a/components/prism-bbcode.min.js +++ b/components/prism-bbcode.min.js @@ -1 +1 @@ -Prism.languages.bbcode={tag:{pattern:/\[\/?[^\s=\]]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'"\]=]+))?(?:\s+[^\s=\]]+\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'"\]=]+))*\s*\]/,inside:{tag:{pattern:/^\[\/?[^\s=\]]+/,inside:{punctuation:/^\[\/?/}},"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'"\]=]+)/i,inside:{punctuation:[/^=/,{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\]/,"attr-name":/[^\s=\]]+/}}},Prism.languages.shortcode=Prism.languages.bbcode; \ No newline at end of file +Prism.languages.bbcode={tag:{pattern:/\[\/?[^\s=\]]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'"\]=]+))?(?:\s+[^\s=\]]+\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'"\]=]+))*\s*\]/,inside:{tag:{pattern:/^\[\/?[^\s=\]]+/,inside:{punctuation:/^\[\/?/}},"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'"\]=]+)/,inside:{punctuation:[/^=/,{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\]/,"attr-name":/[^\s=\]]+/}}},Prism.languages.shortcode=Prism.languages.bbcode; \ No newline at end of file diff --git a/components/prism-brightscript.js b/components/prism-brightscript.js index a95e8f5162..a75e55bf08 100644 --- a/components/prism-brightscript.js +++ b/components/prism-brightscript.js @@ -34,7 +34,7 @@ Prism.languages.brightscript = { }, 'keyword': /\b(?:As|Dim|Each|Else|Elseif|End|Exit|For|Function|Goto|If|In|Print|Return|Step|Stop|Sub|Then|To|While)\b/i, 'boolean': /\b(?:false|true)\b/i, - 'function': /\b(?!\d)\w+(?=[\t ]*\()/i, + 'function': /\b(?!\d)\w+(?=[\t ]*\()/, 'number': /(?:\b\d+(?:\.\d+)?(?:[ed][+-]\d+)?|&h[a-f\d]+)\b[%&!#]?/i, 'operator': /--|\+\+|>>=?|<<=?|<>|[-+*/\\<>]=?|[:^=?]|\b(?:and|mod|not|or)\b/i, 'punctuation': /[.,;()[\]{}]/, diff --git a/components/prism-brightscript.min.js b/components/prism-brightscript.min.js index e47e28e3ce..af39c1bc85 100644 --- a/components/prism-brightscript.min.js +++ b/components/prism-brightscript.min.js @@ -1 +1 @@ -Prism.languages.brightscript={comment:/(?:\brem|').*/i,"directive-statement":{pattern:/(^[\t ]*)#(?:const|else(?:[\t ]+if)?|end[\t ]+if|error|if).*/im,lookbehind:!0,alias:"property",inside:{"error-message":{pattern:/(^#error).+/,lookbehind:!0},directive:{pattern:/^#(?:const|else(?:[\t ]+if)?|end[\t ]+if|error|if)/,alias:"keyword"},expression:{pattern:/[\s\S]+/,inside:null}}},property:{pattern:/([\r\n{,][\t ]*)(?:(?!\d)\w+|"(?:[^"\r\n]|"")*"(?!"))(?=[ \t]*:)/,lookbehind:!0,greedy:!0},string:{pattern:/"(?:[^"\r\n]|"")*"(?!")/,greedy:!0},"class-name":{pattern:/(\bAs[\t ]+)\w+/i,lookbehind:!0},keyword:/\b(?:As|Dim|Each|Else|Elseif|End|Exit|For|Function|Goto|If|In|Print|Return|Step|Stop|Sub|Then|To|While)\b/i,boolean:/\b(?:false|true)\b/i,function:/\b(?!\d)\w+(?=[\t ]*\()/i,number:/(?:\b\d+(?:\.\d+)?(?:[ed][+-]\d+)?|&h[a-f\d]+)\b[%&!#]?/i,operator:/--|\+\+|>>=?|<<=?|<>|[-+*/\\<>]=?|[:^=?]|\b(?:and|mod|not|or)\b/i,punctuation:/[.,;()[\]{}]/,constant:/\b(?:LINE_NUM)\b/i},Prism.languages.brightscript["directive-statement"].inside.expression.inside=Prism.languages.brightscript; \ No newline at end of file +Prism.languages.brightscript={comment:/(?:\brem|').*/i,"directive-statement":{pattern:/(^[\t ]*)#(?:const|else(?:[\t ]+if)?|end[\t ]+if|error|if).*/im,lookbehind:!0,alias:"property",inside:{"error-message":{pattern:/(^#error).+/,lookbehind:!0},directive:{pattern:/^#(?:const|else(?:[\t ]+if)?|end[\t ]+if|error|if)/,alias:"keyword"},expression:{pattern:/[\s\S]+/,inside:null}}},property:{pattern:/([\r\n{,][\t ]*)(?:(?!\d)\w+|"(?:[^"\r\n]|"")*"(?!"))(?=[ \t]*:)/,lookbehind:!0,greedy:!0},string:{pattern:/"(?:[^"\r\n]|"")*"(?!")/,greedy:!0},"class-name":{pattern:/(\bAs[\t ]+)\w+/i,lookbehind:!0},keyword:/\b(?:As|Dim|Each|Else|Elseif|End|Exit|For|Function|Goto|If|In|Print|Return|Step|Stop|Sub|Then|To|While)\b/i,boolean:/\b(?:false|true)\b/i,function:/\b(?!\d)\w+(?=[\t ]*\()/,number:/(?:\b\d+(?:\.\d+)?(?:[ed][+-]\d+)?|&h[a-f\d]+)\b[%&!#]?/i,operator:/--|\+\+|>>=?|<<=?|<>|[-+*/\\<>]=?|[:^=?]|\b(?:and|mod|not|or)\b/i,punctuation:/[.,;()[\]{}]/,constant:/\b(?:LINE_NUM)\b/i},Prism.languages.brightscript["directive-statement"].inside.expression.inside=Prism.languages.brightscript; \ No newline at end of file diff --git a/components/prism-dax.js b/components/prism-dax.js index 03490c5e43..5fac5c131f 100644 --- a/components/prism-dax.js +++ b/components/prism-dax.js @@ -21,7 +21,7 @@ Prism.languages.dax = { pattern: /\b(?:FALSE|NULL|TRUE)\b/i, alias: 'constant' }, - 'number': /\b\d+(?:\.\d*)?|\B\.\d+\b/i, + 'number': /\b\d+(?:\.\d*)?|\B\.\d+\b/, 'operator': /:=|[-+*\/=^]|&&?|\|\||<(?:=>?|<|>)?|>[>=]?|\b(?:IN|NOT)\b/i, 'punctuation': /[;\[\](){}`,.]/ }; diff --git a/components/prism-dax.min.js b/components/prism-dax.min.js index fa1864f9dd..b4276160b2 100644 --- a/components/prism-dax.min.js +++ b/components/prism-dax.min.js @@ -1 +1 @@ -Prism.languages.dax={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/).*)/,lookbehind:!0},"data-field":{pattern:/'(?:[^']|'')*'(?!')(?:\[[ \w\xA0-\uFFFF]+\])?|\w+\[[ \w\xA0-\uFFFF]+\]/,alias:"symbol"},measure:{pattern:/\[[ \w\xA0-\uFFFF]+\]/,alias:"constant"},string:{pattern:/"(?:[^"]|"")*"(?!")/,greedy:!0},function:/\b(?:ABS|ACOS|ACOSH|ACOT|ACOTH|ADDCOLUMNS|ADDMISSINGITEMS|ALL|ALLCROSSFILTERED|ALLEXCEPT|ALLNOBLANKROW|ALLSELECTED|AND|APPROXIMATEDISTINCTCOUNT|ASIN|ASINH|ATAN|ATANH|AVERAGE|AVERAGEA|AVERAGEX|BETA\.DIST|BETA\.INV|BLANK|CALCULATE|CALCULATETABLE|CALENDAR|CALENDARAUTO|CEILING|CHISQ\.DIST|CHISQ\.DIST\.RT|CHISQ\.INV|CHISQ\.INV\.RT|CLOSINGBALANCEMONTH|CLOSINGBALANCEQUARTER|CLOSINGBALANCEYEAR|COALESCE|COMBIN|COMBINA|COMBINEVALUES|CONCATENATE|CONCATENATEX|CONFIDENCE\.NORM|CONFIDENCE\.T|CONTAINS|CONTAINSROW|CONTAINSSTRING|CONTAINSSTRINGEXACT|CONVERT|COS|COSH|COT|COTH|COUNT|COUNTA|COUNTAX|COUNTBLANK|COUNTROWS|COUNTX|CROSSFILTER|CROSSJOIN|CURRENCY|CURRENTGROUP|CUSTOMDATA|DATATABLE|DATE|DATEADD|DATEDIFF|DATESBETWEEN|DATESINPERIOD|DATESMTD|DATESQTD|DATESYTD|DATEVALUE|DAY|DEGREES|DETAILROWS|DISTINCT|DISTINCTCOUNT|DISTINCTCOUNTNOBLANK|DIVIDE|EARLIER|EARLIEST|EDATE|ENDOFMONTH|ENDOFQUARTER|ENDOFYEAR|EOMONTH|ERROR|EVEN|EXACT|EXCEPT|EXP|EXPON\.DIST|FACT|FALSE|FILTER|FILTERS|FIND|FIRSTDATE|FIRSTNONBLANK|FIRSTNONBLANKVALUE|FIXED|FLOOR|FORMAT|GCD|GENERATE|GENERATEALL|GENERATESERIES|GEOMEAN|GEOMEANX|GROUPBY|HASONEFILTER|HASONEVALUE|HOUR|IF|IF\.EAGER|IFERROR|IGNORE|INT|INTERSECT|ISBLANK|ISCROSSFILTERED|ISEMPTY|ISERROR|ISEVEN|ISFILTERED|ISINSCOPE|ISLOGICAL|ISNONTEXT|ISNUMBER|ISO\.CEILING|ISODD|ISONORAFTER|ISSELECTEDMEASURE|ISSUBTOTAL|ISTEXT|KEEPFILTERS|KEYWORDMATCH|LASTDATE|LASTNONBLANK|LASTNONBLANKVALUE|LCM|LEFT|LEN|LN|LOG|LOG10|LOOKUPVALUE|LOWER|MAX|MAXA|MAXX|MEDIAN|MEDIANX|MID|MIN|MINA|MINUTE|MINX|MOD|MONTH|MROUND|NATURALINNERJOIN|NATURALLEFTOUTERJOIN|NEXTDAY|NEXTMONTH|NEXTQUARTER|NEXTYEAR|NONVISUAL|NORM\.DIST|NORM\.INV|NORM\.S\.DIST|NORM\.S\.INV|NOT|NOW|ODD|OPENINGBALANCEMONTH|OPENINGBALANCEQUARTER|OPENINGBALANCEYEAR|OR|PARALLELPERIOD|PATH|PATHCONTAINS|PATHITEM|PATHITEMREVERSE|PATHLENGTH|PERCENTILE\.EXC|PERCENTILE\.INC|PERCENTILEX\.EXC|PERCENTILEX\.INC|PERMUT|PI|POISSON\.DIST|POWER|PREVIOUSDAY|PREVIOUSMONTH|PREVIOUSQUARTER|PREVIOUSYEAR|PRODUCT|PRODUCTX|QUARTER|QUOTIENT|RADIANS|RAND|RANDBETWEEN|RANK\.EQ|RANKX|RELATED|RELATEDTABLE|REMOVEFILTERS|REPLACE|REPT|RIGHT|ROLLUP|ROLLUPADDISSUBTOTAL|ROLLUPGROUP|ROLLUPISSUBTOTAL|ROUND|ROUNDDOWN|ROUNDUP|ROW|SAMEPERIODLASTYEAR|SAMPLE|SEARCH|SECOND|SELECTCOLUMNS|SELECTEDMEASURE|SELECTEDMEASUREFORMATSTRING|SELECTEDMEASURENAME|SELECTEDVALUE|SIGN|SIN|SINH|SQRT|SQRTPI|STARTOFMONTH|STARTOFQUARTER|STARTOFYEAR|STDEV\.P|STDEV\.S|STDEVX\.P|STDEVX\.S|SUBSTITUTE|SUBSTITUTEWITHINDEX|SUM|SUMMARIZE|SUMMARIZECOLUMNS|SUMX|SWITCH|T\.DIST|T\.DIST\.2T|T\.DIST\.RT|T\.INV|T\.INV\.2T|TAN|TANH|TIME|TIMEVALUE|TODAY|TOPN|TOPNPERLEVEL|TOPNSKIP|TOTALMTD|TOTALQTD|TOTALYTD|TREATAS|TRIM|TRUE|TRUNC|UNICHAR|UNICODE|UNION|UPPER|USERELATIONSHIP|USERNAME|USEROBJECTID|USERPRINCIPALNAME|UTCNOW|UTCTODAY|VALUE|VALUES|VAR\.P|VAR\.S|VARX\.P|VARX\.S|WEEKDAY|WEEKNUM|XIRR|XNPV|YEAR|YEARFRAC)(?=\s*\()/i,keyword:/\b(?:DEFINE|EVALUATE|MEASURE|ORDER\s+BY|RETURN|VAR|START\s+AT|ASC|DESC)\b/i,boolean:{pattern:/\b(?:FALSE|NULL|TRUE)\b/i,alias:"constant"},number:/\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/:=|[-+*\/=^]|&&?|\|\||<(?:=>?|<|>)?|>[>=]?|\b(?:IN|NOT)\b/i,punctuation:/[;\[\](){}`,.]/}; \ No newline at end of file +Prism.languages.dax={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/).*)/,lookbehind:!0},"data-field":{pattern:/'(?:[^']|'')*'(?!')(?:\[[ \w\xA0-\uFFFF]+\])?|\w+\[[ \w\xA0-\uFFFF]+\]/,alias:"symbol"},measure:{pattern:/\[[ \w\xA0-\uFFFF]+\]/,alias:"constant"},string:{pattern:/"(?:[^"]|"")*"(?!")/,greedy:!0},function:/\b(?:ABS|ACOS|ACOSH|ACOT|ACOTH|ADDCOLUMNS|ADDMISSINGITEMS|ALL|ALLCROSSFILTERED|ALLEXCEPT|ALLNOBLANKROW|ALLSELECTED|AND|APPROXIMATEDISTINCTCOUNT|ASIN|ASINH|ATAN|ATANH|AVERAGE|AVERAGEA|AVERAGEX|BETA\.DIST|BETA\.INV|BLANK|CALCULATE|CALCULATETABLE|CALENDAR|CALENDARAUTO|CEILING|CHISQ\.DIST|CHISQ\.DIST\.RT|CHISQ\.INV|CHISQ\.INV\.RT|CLOSINGBALANCEMONTH|CLOSINGBALANCEQUARTER|CLOSINGBALANCEYEAR|COALESCE|COMBIN|COMBINA|COMBINEVALUES|CONCATENATE|CONCATENATEX|CONFIDENCE\.NORM|CONFIDENCE\.T|CONTAINS|CONTAINSROW|CONTAINSSTRING|CONTAINSSTRINGEXACT|CONVERT|COS|COSH|COT|COTH|COUNT|COUNTA|COUNTAX|COUNTBLANK|COUNTROWS|COUNTX|CROSSFILTER|CROSSJOIN|CURRENCY|CURRENTGROUP|CUSTOMDATA|DATATABLE|DATE|DATEADD|DATEDIFF|DATESBETWEEN|DATESINPERIOD|DATESMTD|DATESQTD|DATESYTD|DATEVALUE|DAY|DEGREES|DETAILROWS|DISTINCT|DISTINCTCOUNT|DISTINCTCOUNTNOBLANK|DIVIDE|EARLIER|EARLIEST|EDATE|ENDOFMONTH|ENDOFQUARTER|ENDOFYEAR|EOMONTH|ERROR|EVEN|EXACT|EXCEPT|EXP|EXPON\.DIST|FACT|FALSE|FILTER|FILTERS|FIND|FIRSTDATE|FIRSTNONBLANK|FIRSTNONBLANKVALUE|FIXED|FLOOR|FORMAT|GCD|GENERATE|GENERATEALL|GENERATESERIES|GEOMEAN|GEOMEANX|GROUPBY|HASONEFILTER|HASONEVALUE|HOUR|IF|IF\.EAGER|IFERROR|IGNORE|INT|INTERSECT|ISBLANK|ISCROSSFILTERED|ISEMPTY|ISERROR|ISEVEN|ISFILTERED|ISINSCOPE|ISLOGICAL|ISNONTEXT|ISNUMBER|ISO\.CEILING|ISODD|ISONORAFTER|ISSELECTEDMEASURE|ISSUBTOTAL|ISTEXT|KEEPFILTERS|KEYWORDMATCH|LASTDATE|LASTNONBLANK|LASTNONBLANKVALUE|LCM|LEFT|LEN|LN|LOG|LOG10|LOOKUPVALUE|LOWER|MAX|MAXA|MAXX|MEDIAN|MEDIANX|MID|MIN|MINA|MINUTE|MINX|MOD|MONTH|MROUND|NATURALINNERJOIN|NATURALLEFTOUTERJOIN|NEXTDAY|NEXTMONTH|NEXTQUARTER|NEXTYEAR|NONVISUAL|NORM\.DIST|NORM\.INV|NORM\.S\.DIST|NORM\.S\.INV|NOT|NOW|ODD|OPENINGBALANCEMONTH|OPENINGBALANCEQUARTER|OPENINGBALANCEYEAR|OR|PARALLELPERIOD|PATH|PATHCONTAINS|PATHITEM|PATHITEMREVERSE|PATHLENGTH|PERCENTILE\.EXC|PERCENTILE\.INC|PERCENTILEX\.EXC|PERCENTILEX\.INC|PERMUT|PI|POISSON\.DIST|POWER|PREVIOUSDAY|PREVIOUSMONTH|PREVIOUSQUARTER|PREVIOUSYEAR|PRODUCT|PRODUCTX|QUARTER|QUOTIENT|RADIANS|RAND|RANDBETWEEN|RANK\.EQ|RANKX|RELATED|RELATEDTABLE|REMOVEFILTERS|REPLACE|REPT|RIGHT|ROLLUP|ROLLUPADDISSUBTOTAL|ROLLUPGROUP|ROLLUPISSUBTOTAL|ROUND|ROUNDDOWN|ROUNDUP|ROW|SAMEPERIODLASTYEAR|SAMPLE|SEARCH|SECOND|SELECTCOLUMNS|SELECTEDMEASURE|SELECTEDMEASUREFORMATSTRING|SELECTEDMEASURENAME|SELECTEDVALUE|SIGN|SIN|SINH|SQRT|SQRTPI|STARTOFMONTH|STARTOFQUARTER|STARTOFYEAR|STDEV\.P|STDEV\.S|STDEVX\.P|STDEVX\.S|SUBSTITUTE|SUBSTITUTEWITHINDEX|SUM|SUMMARIZE|SUMMARIZECOLUMNS|SUMX|SWITCH|T\.DIST|T\.DIST\.2T|T\.DIST\.RT|T\.INV|T\.INV\.2T|TAN|TANH|TIME|TIMEVALUE|TODAY|TOPN|TOPNPERLEVEL|TOPNSKIP|TOTALMTD|TOTALQTD|TOTALYTD|TREATAS|TRIM|TRUE|TRUNC|UNICHAR|UNICODE|UNION|UPPER|USERELATIONSHIP|USERNAME|USEROBJECTID|USERPRINCIPALNAME|UTCNOW|UTCTODAY|VALUE|VALUES|VAR\.P|VAR\.S|VARX\.P|VARX\.S|WEEKDAY|WEEKNUM|XIRR|XNPV|YEAR|YEARFRAC)(?=\s*\()/i,keyword:/\b(?:DEFINE|EVALUATE|MEASURE|ORDER\s+BY|RETURN|VAR|START\s+AT|ASC|DESC)\b/i,boolean:{pattern:/\b(?:FALSE|NULL|TRUE)\b/i,alias:"constant"},number:/\b\d+(?:\.\d*)?|\B\.\d+\b/,operator:/:=|[-+*\/=^]|&&?|\|\||<(?:=>?|<|>)?|>[>=]?|\b(?:IN|NOT)\b/i,punctuation:/[;\[\](){}`,.]/}; \ No newline at end of file diff --git a/components/prism-elixir.js b/components/prism-elixir.js index fb3ee58c79..23fafc0514 100644 --- a/components/prism-elixir.js +++ b/components/prism-elixir.js @@ -7,7 +7,7 @@ Prism.languages.elixir = { } }, 'comment': { - pattern: /#.*/m, + pattern: /#.*/, greedy: true }, // ~r"""foo""" (multi-line), ~r'''foo''' (multi-line), ~r/foo/, ~r|foo|, ~r"foo", ~r'foo', ~r(foo), ~r[foo], ~r{foo}, ~r diff --git a/components/prism-elixir.min.js b/components/prism-elixir.min.js index c70fc61111..ec0d974d78 100644 --- a/components/prism-elixir.min.js +++ b/components/prism-elixir.min.js @@ -1 +1 @@ -Prism.languages.elixir={doc:{pattern:/@(?:doc|moduledoc)\s+(?:("""|''')[\s\S]*?\1|("|')(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2)/,inside:{attribute:/^@\w+/,string:/['"][\s\S]+/}},comment:{pattern:/#.*/m,greedy:!0},regex:{pattern:/~[rR](?:("""|''')(?:\\[\s\S]|(?!\1)[^\\])+\1|([\/|"'])(?:\\.|(?!\2)[^\\\r\n])+\2|\((?:\\.|[^\\)\r\n])+\)|\[(?:\\.|[^\\\]\r\n])+\]|\{(?:\\.|[^\\}\r\n])+\}|<(?:\\.|[^\\>\r\n])+>)[uismxfr]*/,greedy:!0},string:[{pattern:/~[cCsSwW](?:("""|''')(?:\\[\s\S]|(?!\1)[^\\])+\1|([\/|"'])(?:\\.|(?!\2)[^\\\r\n])+\2|\((?:\\.|[^\\)\r\n])+\)|\[(?:\\.|[^\\\]\r\n])+\]|\{(?:\\.|#\{[^}]+\}|#(?!\{)|[^#\\}\r\n])+\}|<(?:\\.|[^\\>\r\n])+>)[csa]?/,greedy:!0,inside:{}},{pattern:/("""|''')[\s\S]*?\1/,greedy:!0,inside:{}},{pattern:/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0,inside:{}}],atom:{pattern:/(^|[^:]):\w+/,lookbehind:!0,alias:"symbol"},module:{pattern:/\b[A-Z]\w*\b/,alias:"class-name"},"attr-name":/\b\w+\??:(?!:)/,argument:{pattern:/(^|[^&])&\d+/,lookbehind:!0,alias:"variable"},attribute:{pattern:/@\w+/,alias:"variable"},function:/\b[_a-zA-Z]\w*[?!]?(?:(?=\s*(?:\.\s*)?\()|(?=\/\d))/,number:/\b(?:0[box][a-f\d_]+|\d[\d_]*)(?:\.[\d_]+)?(?:e[+-]?[\d_]+)?\b/i,keyword:/\b(?:after|alias|and|case|catch|cond|def(?:callback|delegate|exception|impl|macro|module|n|np|p|protocol|struct)?|do|else|end|fn|for|if|import|not|or|quote|raise|require|rescue|try|unless|unquote|use|when)\b/,boolean:/\b(?:false|nil|true)\b/,operator:[/\bin\b|&&?|\|[|>]?|\\\\|::|\.\.\.?|\+\+?|-[->]?|<[-=>]|>=|!==?|\B!|=(?:==?|[>~])?|[*\/^]/,{pattern:/([^<])<(?!<)/,lookbehind:!0},{pattern:/([^>])>(?!>)/,lookbehind:!0}],punctuation:/<<|>>|[.,%\[\]{}()]/},Prism.languages.elixir.string.forEach(function(e){e.inside={interpolation:{pattern:/#\{[^}]+\}/,inside:{delimiter:{pattern:/^#\{|\}$/,alias:"punctuation"},rest:Prism.languages.elixir}}}}); \ No newline at end of file +Prism.languages.elixir={doc:{pattern:/@(?:doc|moduledoc)\s+(?:("""|''')[\s\S]*?\1|("|')(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2)/,inside:{attribute:/^@\w+/,string:/['"][\s\S]+/}},comment:{pattern:/#.*/,greedy:!0},regex:{pattern:/~[rR](?:("""|''')(?:\\[\s\S]|(?!\1)[^\\])+\1|([\/|"'])(?:\\.|(?!\2)[^\\\r\n])+\2|\((?:\\.|[^\\)\r\n])+\)|\[(?:\\.|[^\\\]\r\n])+\]|\{(?:\\.|[^\\}\r\n])+\}|<(?:\\.|[^\\>\r\n])+>)[uismxfr]*/,greedy:!0},string:[{pattern:/~[cCsSwW](?:("""|''')(?:\\[\s\S]|(?!\1)[^\\])+\1|([\/|"'])(?:\\.|(?!\2)[^\\\r\n])+\2|\((?:\\.|[^\\)\r\n])+\)|\[(?:\\.|[^\\\]\r\n])+\]|\{(?:\\.|#\{[^}]+\}|#(?!\{)|[^#\\}\r\n])+\}|<(?:\\.|[^\\>\r\n])+>)[csa]?/,greedy:!0,inside:{}},{pattern:/("""|''')[\s\S]*?\1/,greedy:!0,inside:{}},{pattern:/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0,inside:{}}],atom:{pattern:/(^|[^:]):\w+/,lookbehind:!0,alias:"symbol"},module:{pattern:/\b[A-Z]\w*\b/,alias:"class-name"},"attr-name":/\b\w+\??:(?!:)/,argument:{pattern:/(^|[^&])&\d+/,lookbehind:!0,alias:"variable"},attribute:{pattern:/@\w+/,alias:"variable"},function:/\b[_a-zA-Z]\w*[?!]?(?:(?=\s*(?:\.\s*)?\()|(?=\/\d))/,number:/\b(?:0[box][a-f\d_]+|\d[\d_]*)(?:\.[\d_]+)?(?:e[+-]?[\d_]+)?\b/i,keyword:/\b(?:after|alias|and|case|catch|cond|def(?:callback|delegate|exception|impl|macro|module|n|np|p|protocol|struct)?|do|else|end|fn|for|if|import|not|or|quote|raise|require|rescue|try|unless|unquote|use|when)\b/,boolean:/\b(?:false|nil|true)\b/,operator:[/\bin\b|&&?|\|[|>]?|\\\\|::|\.\.\.?|\+\+?|-[->]?|<[-=>]|>=|!==?|\B!|=(?:==?|[>~])?|[*\/^]/,{pattern:/([^<])<(?!<)/,lookbehind:!0},{pattern:/([^>])>(?!>)/,lookbehind:!0}],punctuation:/<<|>>|[.,%\[\]{}()]/},Prism.languages.elixir.string.forEach(function(e){e.inside={interpolation:{pattern:/#\{[^}]+\}/,inside:{delimiter:{pattern:/^#\{|\}$/,alias:"punctuation"},rest:Prism.languages.elixir}}}}); \ No newline at end of file diff --git a/components/prism-erb.js b/components/prism-erb.js index 989d56f35f..3f118cfcf0 100644 --- a/components/prism-erb.js +++ b/components/prism-erb.js @@ -9,7 +9,7 @@ }); Prism.hooks.add('before-tokenize', function (env) { - var erbPattern = /<%=?(?:[^\r\n]|[\r\n](?!=begin)|[\r\n]=begin\s(?:[^\r\n]|[\r\n](?!=end))*[\r\n]=end)+?%>/gm; + var erbPattern = /<%=?(?:[^\r\n]|[\r\n](?!=begin)|[\r\n]=begin\s(?:[^\r\n]|[\r\n](?!=end))*[\r\n]=end)+?%>/g; Prism.languages['markup-templating'].buildPlaceholders(env, 'erb', erbPattern); }); diff --git a/components/prism-erb.min.js b/components/prism-erb.min.js index a9ca5e42a1..c7add59889 100644 --- a/components/prism-erb.min.js +++ b/components/prism-erb.min.js @@ -1 +1 @@ -!function(n){n.languages.erb=n.languages.extend("ruby",{}),n.languages.insertBefore("erb","comment",{delimiter:{pattern:/^<%=?|%>$/,alias:"punctuation"}}),n.hooks.add("before-tokenize",function(e){n.languages["markup-templating"].buildPlaceholders(e,"erb",/<%=?(?:[^\r\n]|[\r\n](?!=begin)|[\r\n]=begin\s(?:[^\r\n]|[\r\n](?!=end))*[\r\n]=end)+?%>/gm)}),n.hooks.add("after-tokenize",function(e){n.languages["markup-templating"].tokenizePlaceholders(e,"erb")})}(Prism); \ No newline at end of file +!function(n){n.languages.erb=n.languages.extend("ruby",{}),n.languages.insertBefore("erb","comment",{delimiter:{pattern:/^<%=?|%>$/,alias:"punctuation"}}),n.hooks.add("before-tokenize",function(e){n.languages["markup-templating"].buildPlaceholders(e,"erb",/<%=?(?:[^\r\n]|[\r\n](?!=begin)|[\r\n]=begin\s(?:[^\r\n]|[\r\n](?!=end))*[\r\n]=end)+?%>/g)}),n.hooks.add("after-tokenize",function(e){n.languages["markup-templating"].tokenizePlaceholders(e,"erb")})}(Prism); \ No newline at end of file diff --git a/components/prism-git.js b/components/prism-git.js index d9bee8fcb6..365a5c771e 100644 --- a/components/prism-git.js +++ b/components/prism-git.js @@ -19,7 +19,7 @@ Prism.languages.git = { /* * a string (double and simple quote) */ - 'string': /("|')(?:\\.|(?!\1)[^\\\r\n])*\1/m, + 'string': /("|')(?:\\.|(?!\1)[^\\\r\n])*\1/, /* * a git command. It starts with a random prompt finishing by a $, then "git" then some other parameters @@ -35,7 +35,7 @@ Prism.languages.git = { * $ git diff --cached * $ git log -p */ - 'parameter': /\s--?\w+/m + 'parameter': /\s--?\w+/ } }, diff --git a/components/prism-git.min.js b/components/prism-git.min.js index 3d5831a780..b472661960 100644 --- a/components/prism-git.min.js +++ b/components/prism-git.min.js @@ -1 +1 @@ -Prism.languages.git={comment:/^#.*/m,deleted:/^[-–].*/m,inserted:/^\+.*/m,string:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/m,command:{pattern:/^.*\$ git .*$/m,inside:{parameter:/\s--?\w+/m}},coord:/^@@.*@@$/m,"commit-sha1":/^commit \w{40}$/m}; \ No newline at end of file +Prism.languages.git={comment:/^#.*/m,deleted:/^[-–].*/m,inserted:/^\+.*/m,string:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,command:{pattern:/^.*\$ git .*$/m,inside:{parameter:/\s--?\w+/}},coord:/^@@.*@@$/m,"commit-sha1":/^commit \w{40}$/m}; \ No newline at end of file diff --git a/components/prism-handlebars.js b/components/prism-handlebars.js index 0ea4115233..20f413bbb0 100644 --- a/components/prism-handlebars.js +++ b/components/prism-handlebars.js @@ -3,14 +3,14 @@ Prism.languages.handlebars = { 'comment': /\{\{![\s\S]*?\}\}/, 'delimiter': { - pattern: /^\{\{\{?|\}\}\}?$/i, + pattern: /^\{\{\{?|\}\}\}?$/, alias: 'punctuation' }, 'string': /(["'])(?:\\.|(?!\1)[^\\\r\n])*\1/, 'number': /\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee][+-]?\d+)?/, 'boolean': /\b(?:false|true)\b/, 'block': { - pattern: /^(\s*(?:~\s*)?)[#\/]\S+?(?=\s*(?:~\s*)?$|\s)/i, + pattern: /^(\s*(?:~\s*)?)[#\/]\S+?(?=\s*(?:~\s*)?$|\s)/, lookbehind: true, alias: 'keyword' }, diff --git a/components/prism-handlebars.min.js b/components/prism-handlebars.min.js index 9964abef30..bcad7a26e4 100644 --- a/components/prism-handlebars.min.js +++ b/components/prism-handlebars.min.js @@ -1 +1 @@ -!function(e){e.languages.handlebars={comment:/\{\{![\s\S]*?\}\}/,delimiter:{pattern:/^\{\{\{?|\}\}\}?$/i,alias:"punctuation"},string:/(["'])(?:\\.|(?!\1)[^\\\r\n])*\1/,number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee][+-]?\d+)?/,boolean:/\b(?:false|true)\b/,block:{pattern:/^(\s*(?:~\s*)?)[#\/]\S+?(?=\s*(?:~\s*)?$|\s)/i,lookbehind:!0,alias:"keyword"},brackets:{pattern:/\[[^\]]+\]/,inside:{punctuation:/\[|\]/,variable:/[\s\S]+/}},punctuation:/[!"#%&':()*+,.\/;<=>@\[\\\]^`{|}~]/,variable:/[^!"#%&'()*+,\/;<=>@\[\\\]^`{|}~\s]+/},e.hooks.add("before-tokenize",function(a){e.languages["markup-templating"].buildPlaceholders(a,"handlebars",/\{\{\{[\s\S]+?\}\}\}|\{\{[\s\S]+?\}\}/g)}),e.hooks.add("after-tokenize",function(a){e.languages["markup-templating"].tokenizePlaceholders(a,"handlebars")}),e.languages.hbs=e.languages.handlebars}(Prism); \ No newline at end of file +!function(e){e.languages.handlebars={comment:/\{\{![\s\S]*?\}\}/,delimiter:{pattern:/^\{\{\{?|\}\}\}?$/,alias:"punctuation"},string:/(["'])(?:\\.|(?!\1)[^\\\r\n])*\1/,number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee][+-]?\d+)?/,boolean:/\b(?:false|true)\b/,block:{pattern:/^(\s*(?:~\s*)?)[#\/]\S+?(?=\s*(?:~\s*)?$|\s)/,lookbehind:!0,alias:"keyword"},brackets:{pattern:/\[[^\]]+\]/,inside:{punctuation:/\[|\]/,variable:/[\s\S]+/}},punctuation:/[!"#%&':()*+,.\/;<=>@\[\\\]^`{|}~]/,variable:/[^!"#%&'()*+,\/;<=>@\[\\\]^`{|}~\s]+/},e.hooks.add("before-tokenize",function(a){e.languages["markup-templating"].buildPlaceholders(a,"handlebars",/\{\{\{[\s\S]+?\}\}\}|\{\{[\s\S]+?\}\}/g)}),e.hooks.add("after-tokenize",function(a){e.languages["markup-templating"].tokenizePlaceholders(a,"handlebars")}),e.languages.hbs=e.languages.handlebars}(Prism); \ No newline at end of file diff --git a/components/prism-ichigojam.js b/components/prism-ichigojam.js index 15e75b7dc3..84cfd42d47 100644 --- a/components/prism-ichigojam.js +++ b/components/prism-ichigojam.js @@ -3,13 +3,13 @@ Prism.languages.ichigojam = { 'comment': /(?:\B'|REM)(?:[^\n\r]*)/i, 'string': { - pattern: /"(?:""|[!#$%&'()*,\/:;<=>?^\w +\-.])*"/i, + pattern: /"(?:""|[!#$%&'()*,\/:;<=>?^\w +\-.])*"/, greedy: true }, 'number': /\B#[0-9A-F]+|\B`[01]+|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:E[+-]?\d+)?/i, 'keyword': /\b(?:BEEP|BPS|CASE|CLEAR|CLK|CLO|CLP|CLS|CLT|CLV|CONT|COPY|ELSE|END|FILE|FILES|FOR|GOSUB|GOTO|GSB|IF|INPUT|KBD|LED|LET|LIST|LOAD|LOCATE|LRUN|NEW|NEXT|OUT|PLAY|POKE|PRINT|PWM|REM|RENUM|RESET|RETURN|RIGHT|RTN|RUN|SAVE|SCROLL|SLEEP|SRND|STEP|STOP|SUB|TEMPO|THEN|TO|UART|VIDEO|WAIT)(?:\$|\b)/i, 'function': /\b(?:ABS|ANA|ASC|BIN|BTN|DEC|END|FREE|HELP|HEX|I2CR|I2CW|IN|INKEY|LEN|LINE|PEEK|RND|SCR|SOUND|STR|TICK|USR|VER|VPEEK|ZER)(?:\$|\b)/i, - 'label': /(?:\B@\S+)/i, + 'label': /(?:\B@\S+)/, 'operator': /<[=>]?|>=?|\|\||&&|[+\-*\/=|&^~!]|\b(?:AND|NOT|OR)\b/i, 'punctuation': /[\[,;:()\]]/ }; diff --git a/components/prism-ichigojam.min.js b/components/prism-ichigojam.min.js index f139f57130..445d2db436 100644 --- a/components/prism-ichigojam.min.js +++ b/components/prism-ichigojam.min.js @@ -1 +1 @@ -Prism.languages.ichigojam={comment:/(?:\B'|REM)(?:[^\n\r]*)/i,string:{pattern:/"(?:""|[!#$%&'()*,\/:;<=>?^\w +\-.])*"/i,greedy:!0},number:/\B#[0-9A-F]+|\B`[01]+|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:E[+-]?\d+)?/i,keyword:/\b(?:BEEP|BPS|CASE|CLEAR|CLK|CLO|CLP|CLS|CLT|CLV|CONT|COPY|ELSE|END|FILE|FILES|FOR|GOSUB|GOTO|GSB|IF|INPUT|KBD|LED|LET|LIST|LOAD|LOCATE|LRUN|NEW|NEXT|OUT|PLAY|POKE|PRINT|PWM|REM|RENUM|RESET|RETURN|RIGHT|RTN|RUN|SAVE|SCROLL|SLEEP|SRND|STEP|STOP|SUB|TEMPO|THEN|TO|UART|VIDEO|WAIT)(?:\$|\b)/i,function:/\b(?:ABS|ANA|ASC|BIN|BTN|DEC|END|FREE|HELP|HEX|I2CR|I2CW|IN|INKEY|LEN|LINE|PEEK|RND|SCR|SOUND|STR|TICK|USR|VER|VPEEK|ZER)(?:\$|\b)/i,label:/(?:\B@\S+)/i,operator:/<[=>]?|>=?|\|\||&&|[+\-*\/=|&^~!]|\b(?:AND|NOT|OR)\b/i,punctuation:/[\[,;:()\]]/}; \ No newline at end of file +Prism.languages.ichigojam={comment:/(?:\B'|REM)(?:[^\n\r]*)/i,string:{pattern:/"(?:""|[!#$%&'()*,\/:;<=>?^\w +\-.])*"/,greedy:!0},number:/\B#[0-9A-F]+|\B`[01]+|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:E[+-]?\d+)?/i,keyword:/\b(?:BEEP|BPS|CASE|CLEAR|CLK|CLO|CLP|CLS|CLT|CLV|CONT|COPY|ELSE|END|FILE|FILES|FOR|GOSUB|GOTO|GSB|IF|INPUT|KBD|LED|LET|LIST|LOAD|LOCATE|LRUN|NEW|NEXT|OUT|PLAY|POKE|PRINT|PWM|REM|RENUM|RESET|RETURN|RIGHT|RTN|RUN|SAVE|SCROLL|SLEEP|SRND|STEP|STOP|SUB|TEMPO|THEN|TO|UART|VIDEO|WAIT)(?:\$|\b)/i,function:/\b(?:ABS|ANA|ASC|BIN|BTN|DEC|END|FREE|HELP|HEX|I2CR|I2CW|IN|INKEY|LEN|LINE|PEEK|RND|SCR|SOUND|STR|TICK|USR|VER|VPEEK|ZER)(?:\$|\b)/i,label:/(?:\B@\S+)/,operator:/<[=>]?|>=?|\|\||&&|[+\-*\/=|&^~!]|\b(?:AND|NOT|OR)\b/i,punctuation:/[\[,;:()\]]/}; \ No newline at end of file diff --git a/components/prism-jsx.js b/components/prism-jsx.js index 068a5f997a..38bb2ccd2c 100644 --- a/components/prism-jsx.js +++ b/components/prism-jsx.js @@ -26,8 +26,8 @@ /<\/?(?:[\w.:-]+(?:+(?:[\w.:$-]+(?:=(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s{'"/>=]+|))?|))**\/?)?>/.source ); - Prism.languages.jsx.tag.inside['tag'].pattern = /^<\/?[^\s>\/]*/i; - Prism.languages.jsx.tag.inside['attr-value'].pattern = /=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/i; + Prism.languages.jsx.tag.inside['tag'].pattern = /^<\/?[^\s>\/]*/; + Prism.languages.jsx.tag.inside['attr-value'].pattern = /=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/; Prism.languages.jsx.tag.inside['tag'].inside['class-name'] = /^[A-Z]\w*(?:\.[A-Z]\w*)*$/; Prism.languages.jsx.tag.inside['comment'] = javascript['comment']; diff --git a/components/prism-jsx.min.js b/components/prism-jsx.min.js index ee3a8b1dee..8ab166f111 100644 --- a/components/prism-jsx.min.js +++ b/components/prism-jsx.min.js @@ -1 +1 @@ -!function(i){var t=i.util.clone(i.languages.javascript),e="(?:\\{*\\.{3}(?:[^{}]|)*\\})";function n(t,n){return t=t.replace(//g,function(){return"(?:\\s|//.*(?!.)|/\\*(?:[^*]|\\*(?!/))\\*/)"}).replace(//g,function(){return"(?:\\{(?:\\{(?:\\{[^{}]*\\}|[^{}])*\\}|[^{}])*\\})"}).replace(//g,function(){return e}),RegExp(t,n)}e=n(e).source,i.languages.jsx=i.languages.extend("markup",t),i.languages.jsx.tag.pattern=n("+(?:[\\w.:$-]+(?:=(?:\"(?:\\\\[^]|[^\\\\\"])*\"|'(?:\\\\[^]|[^\\\\'])*'|[^\\s{'\"/>=]+|))?|))**/?)?>"),i.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/i,i.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/i,i.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,i.languages.jsx.tag.inside.comment=t.comment,i.languages.insertBefore("inside","attr-name",{spread:{pattern:n(""),inside:i.languages.jsx}},i.languages.jsx.tag),i.languages.insertBefore("inside","special-attr",{script:{pattern:n("="),inside:{"script-punctuation":{pattern:/^=(?=\{)/,alias:"punctuation"},rest:i.languages.jsx},alias:"language-javascript"}},i.languages.jsx.tag);var o=function(t){return t?"string"==typeof t?t:"string"==typeof t.content?t.content:t.content.map(o).join(""):""},r=function(t){for(var n=[],e=0;e"===a.content[a.content.length-1].content||n.push({tagName:o(a.content[0].content[1]),openedBraces:0}):0*\\.{3}(?:[^{}]|)*\\})";function n(t,n){return t=t.replace(//g,function(){return"(?:\\s|//.*(?!.)|/\\*(?:[^*]|\\*(?!/))\\*/)"}).replace(//g,function(){return"(?:\\{(?:\\{(?:\\{[^{}]*\\}|[^{}])*\\}|[^{}])*\\})"}).replace(//g,function(){return e}),RegExp(t,n)}e=n(e).source,o.languages.jsx=o.languages.extend("markup",t),o.languages.jsx.tag.pattern=n("+(?:[\\w.:$-]+(?:=(?:\"(?:\\\\[^]|[^\\\\\"])*\"|'(?:\\\\[^]|[^\\\\'])*'|[^\\s{'\"/>=]+|))?|))**/?)?>"),o.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/,o.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*'|[^\s'">]+)/,o.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,o.languages.jsx.tag.inside.comment=t.comment,o.languages.insertBefore("inside","attr-name",{spread:{pattern:n(""),inside:o.languages.jsx}},o.languages.jsx.tag),o.languages.insertBefore("inside","special-attr",{script:{pattern:n("="),inside:{"script-punctuation":{pattern:/^=(?=\{)/,alias:"punctuation"},rest:o.languages.jsx},alias:"language-javascript"}},o.languages.jsx.tag);var i=function(t){return t?"string"==typeof t?t:"string"==typeof t.content?t.content:t.content.map(i).join(""):""},r=function(t){for(var n=[],e=0;e"===a.content[a.content.length-1].content||n.push({tagName:i(a.content[0].content[1]),openedBraces:0}):0.]/,email:{pattern:/(^|\s)[-\w+.]+@[a-z][a-z0-9-]*(?:\.[a-z][a-z0-9-]*)+(?=\s)/,lookbehind:!0,alias:"url"},"ip-address":{pattern:/\b(?:\d{1,3}(?:\.\d{1,3}){3})\b/i,alias:"constant"},"mac-address":{pattern:/\b[a-f0-9]{2}(?::[a-f0-9]{2}){5}\b/i,alias:"constant"},domain:{pattern:/(^|\s)[a-z][a-z0-9-]*(?:\.[a-z][a-z0-9-]*)*\.[a-z][a-z0-9-]+(?=\s)/,lookbehind:!0,alias:"constant"},uuid:{pattern:/\b[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\b/i,alias:"constant"},hash:{pattern:/\b(?:[a-f0-9]{32}){1,2}\b/i,alias:"constant"},"file-path":{pattern:/\b[a-z]:[\\/][^\s|,;:(){}\[\]"']+|(^|[\s:\[\](>|])\.{0,2}\/\w[^\s|,;:(){}\[\]"']*/i,lookbehind:!0,greedy:!0,alias:"string"},date:{pattern:RegExp("\\b\\d{4}[-/]\\d{2}[-/]\\d{2}(?:T(?=\\d{1,2}:)|(?=\\s\\d{1,2}:))|\\b\\d{1,4}[-/ ](?:\\d{1,2}|Apr|Aug|Dec|Feb|Jan|Jul|Jun|Mar|May|Nov|Oct|Sep)[-/ ]\\d{2,4}T?\\b|\\b(?:(?:Fri|Mon|Sat|Sun|Thu|Tue|Wed)(?:\\s{1,2}(?:Apr|Aug|Dec|Feb|Jan|Jul|Jun|Mar|May|Nov|Oct|Sep))?|Apr|Aug|Dec|Feb|Jan|Jul|Jun|Mar|May|Nov|Oct|Sep)\\s{1,2}\\d{1,2}\\b","i"),alias:"number"},time:{pattern:/\b\d{1,2}:\d{1,2}:\d{1,2}(?:[.,:]\d+)?(?:\s?[+-]\d{2}:?\d{2}|Z)?\b/,alias:"number"},boolean:/\b(?:false|null|true)\b/i,number:{pattern:/(^|[^.\w])(?:0x[a-f0-9]+|0o[0-7]+|0b[01]+|v?\d[\da-f]*(?:\.\d+)*(?:e[+-]?\d+)?[a-z]{0,3}\b)\b(?!\.\w)/i,lookbehind:!0},operator:/[;:?<=>~/@!$%&+\-|^(){}*#]/,punctuation:/[\[\].,]/}; \ No newline at end of file +Prism.languages.log={string:{pattern:/"(?:[^"\\\r\n]|\\.)*"|'(?![st] | \w)(?:[^'\\\r\n]|\\.)*'/,greedy:!0},exception:{pattern:/(^|[^\w.])[a-z][\w.]*(?:Error|Exception):.*(?:(?:\r\n?|\n)[ \t]*(?:at[ \t].+|\.{3}.*|Caused by:.*))+(?:(?:\r\n?|\n)[ \t]*\.\.\. .*)?/,lookbehind:!0,greedy:!0,alias:["javastacktrace","language-javastacktrace"],inside:Prism.languages.javastacktrace||{keyword:/\bat\b/,function:/[a-z_][\w$]*(?=\()/,punctuation:/[.:()]/}},level:[{pattern:/\b(?:ALERT|CRIT|CRITICAL|EMERG|EMERGENCY|ERR|ERROR|FAILURE|FATAL|SEVERE)\b/,alias:["error","important"]},{pattern:/\b(?:WARN|WARNING|WRN)\b/,alias:["warning","important"]},{pattern:/\b(?:DISPLAY|INF|INFO|NOTICE|STATUS)\b/,alias:["info","keyword"]},{pattern:/\b(?:DBG|DEBUG|FINE)\b/,alias:["debug","keyword"]},{pattern:/\b(?:FINER|FINEST|TRACE|TRC|VERBOSE|VRB)\b/,alias:["trace","comment"]}],property:{pattern:/((?:^|[\]|])[ \t]*)[a-z_](?:[\w-]|\b\/\b)*(?:[. ]\(?\w(?:[\w-]|\b\/\b)*\)?)*:(?=\s)/im,lookbehind:!0},separator:{pattern:/(^|[^-+])-{3,}|={3,}|\*{3,}|- - /m,lookbehind:!0,alias:"comment"},url:/\b(?:file|ftp|https?):\/\/[^\s|,;'"]*[^\s|,;'">.]/,email:{pattern:/(^|\s)[-\w+.]+@[a-z][a-z0-9-]*(?:\.[a-z][a-z0-9-]*)+(?=\s)/,lookbehind:!0,alias:"url"},"ip-address":{pattern:/\b(?:\d{1,3}(?:\.\d{1,3}){3})\b/,alias:"constant"},"mac-address":{pattern:/\b[a-f0-9]{2}(?::[a-f0-9]{2}){5}\b/i,alias:"constant"},domain:{pattern:/(^|\s)[a-z][a-z0-9-]*(?:\.[a-z][a-z0-9-]*)*\.[a-z][a-z0-9-]+(?=\s)/,lookbehind:!0,alias:"constant"},uuid:{pattern:/\b[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\b/i,alias:"constant"},hash:{pattern:/\b(?:[a-f0-9]{32}){1,2}\b/i,alias:"constant"},"file-path":{pattern:/\b[a-z]:[\\/][^\s|,;:(){}\[\]"']+|(^|[\s:\[\](>|])\.{0,2}\/\w[^\s|,;:(){}\[\]"']*/i,lookbehind:!0,greedy:!0,alias:"string"},date:{pattern:RegExp("\\b\\d{4}[-/]\\d{2}[-/]\\d{2}(?:T(?=\\d{1,2}:)|(?=\\s\\d{1,2}:))|\\b\\d{1,4}[-/ ](?:\\d{1,2}|Apr|Aug|Dec|Feb|Jan|Jul|Jun|Mar|May|Nov|Oct|Sep)[-/ ]\\d{2,4}T?\\b|\\b(?:(?:Fri|Mon|Sat|Sun|Thu|Tue|Wed)(?:\\s{1,2}(?:Apr|Aug|Dec|Feb|Jan|Jul|Jun|Mar|May|Nov|Oct|Sep))?|Apr|Aug|Dec|Feb|Jan|Jul|Jun|Mar|May|Nov|Oct|Sep)\\s{1,2}\\d{1,2}\\b","i"),alias:"number"},time:{pattern:/\b\d{1,2}:\d{1,2}:\d{1,2}(?:[.,:]\d+)?(?:\s?[+-]\d{2}:?\d{2}|Z)?\b/,alias:"number"},boolean:/\b(?:false|null|true)\b/i,number:{pattern:/(^|[^.\w])(?:0x[a-f0-9]+|0o[0-7]+|0b[01]+|v?\d[\da-f]*(?:\.\d+)*(?:e[+-]?\d+)?[a-z]{0,3}\b)\b(?!\.\w)/i,lookbehind:!0},operator:/[;:?<=>~/@!$%&+\-|^(){}*#]/,punctuation:/[\[\].,]/}; \ No newline at end of file diff --git a/components/prism-nsis.js b/components/prism-nsis.js index af2cb6cac4..aa84cca030 100644 --- a/components/prism-nsis.js +++ b/components/prism-nsis.js @@ -17,8 +17,8 @@ Prism.languages.nsis = { lookbehind: true }, 'property': /\b(?:ARCHIVE|FILE_(?:ATTRIBUTE_ARCHIVE|ATTRIBUTE_NORMAL|ATTRIBUTE_OFFLINE|ATTRIBUTE_READONLY|ATTRIBUTE_SYSTEM|ATTRIBUTE_TEMPORARY)|HK(?:(?:CR|CU|LM)(?:32|64)?|DD|PD|U)|HKEY_(?:CLASSES_ROOT|CURRENT_CONFIG|CURRENT_USER|DYN_DATA|LOCAL_MACHINE|PERFORMANCE_DATA|USERS)|ID(?:ABORT|CANCEL|IGNORE|NO|OK|RETRY|YES)|MB_(?:ABORTRETRYIGNORE|DEFBUTTON1|DEFBUTTON2|DEFBUTTON3|DEFBUTTON4|ICONEXCLAMATION|ICONINFORMATION|ICONQUESTION|ICONSTOP|OK|OKCANCEL|RETRYCANCEL|RIGHT|RTLREADING|SETFOREGROUND|TOPMOST|USERICON|YESNO)|NORMAL|OFFLINE|READONLY|SHCTX|SHELL_CONTEXT|SYSTEM|TEMPORARY|admin|all|auto|both|colored|false|force|hide|highest|lastused|leave|listonly|none|normal|notset|off|on|open|print|show|silent|silentlog|smooth|textonly|true|user)\b/, - 'constant': /\$\{[\w\.:\^-]+\}|\$\([\w\.:\^-]+\)/i, - 'variable': /\$\w+/i, + 'constant': /\$\{[\w\.:\^-]+\}|\$\([\w\.:\^-]+\)/, + 'variable': /\$\w+/, 'number': /\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/, 'operator': /--?|\+\+?|<=?|>=?|==?=?|&&?|\|\|?|[?*\/~^%]/, 'punctuation': /[{}[\];(),.:]/, diff --git a/components/prism-nsis.min.js b/components/prism-nsis.min.js index 2af392cdf4..2e8cdea419 100644 --- a/components/prism-nsis.min.js +++ b/components/prism-nsis.min.js @@ -1 +1 @@ -Prism.languages.nsis={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|[#;].*)/,lookbehind:!0},string:{pattern:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0},keyword:{pattern:/(^[\t ]*)(?:Abort|Add(?:BrandingImage|Size)|AdvSplash|Allow(?:RootDirInstall|SkipFiles)|AutoCloseWindow|BG(?:Font|Gradient|Image)|Banner|BrandingText|BringToFront|CRCCheck|Call(?:InstDLL)?|Caption|ChangeUI|CheckBitmap|ClearErrors|CompletedText|ComponentText|CopyFiles|Create(?:Directory|Font|ShortCut)|Delete(?:INISec|INIStr|RegKey|RegValue)?|Detail(?:Print|sButtonText)|Dialer|Dir(?:Text|Var|Verify)|EnableWindow|Enum(?:RegKey|RegValue)|Exch|Exec(?:Shell(?:Wait)?|Wait)?|ExpandEnvStrings|File(?:BufSize|Close|ErrorText|Open|Read|ReadByte|ReadUTF16LE|ReadWord|Seek|Write|WriteByte|WriteUTF16LE|WriteWord)?|Find(?:Close|First|Next|Window)|FlushINI|Get(?:CurInstType|CurrentAddress|DLLVersion(?:Local)?|DlgItem|ErrorLevel|FileTime(?:Local)?|FullPathName|Function(?:Address|End)?|InstDirError|LabelAddress|TempFileName)|Goto|HideWindow|Icon|If(?:Abort|Errors|FileExists|RebootFlag|Silent)|InitPluginsDir|InstProgressFlags|Inst(?:Type(?:GetText|SetText)?)|Install(?:ButtonText|Colors|Dir(?:RegKey)?)|Int(?:64|Ptr)?CmpU?|Int(?:64)?Fmt|Int(?:Ptr)?Op|IsWindow|Lang(?:DLL|String)|License(?:BkColor|Data|ForceSelection|LangString|Text)|LoadLanguageFile|LockWindow|Log(?:Set|Text)|Manifest(?:DPIAware|SupportedOS)|Math|MessageBox|MiscButtonText|NSISdl|Name|Nop|OutFile|PE(?:DllCharacteristics|SubsysVer)|Page(?:Callbacks)?|Pop|Push|Quit|RMDir|Read(?:EnvStr|INIStr|RegDWORD|RegStr)|Reboot|RegDLL|Rename|RequestExecutionLevel|ReserveFile|Return|SearchPath|Section(?:End|GetFlags|GetInstTypes|GetSize|GetText|Group|In|SetFlags|SetInstTypes|SetSize|SetText)?|SendMessage|Set(?:AutoClose|BrandingImage|Compress|Compressor(?:DictSize)?|CtlColors|CurInstType|DatablockOptimize|DateSave|Details(?:Print|View)|ErrorLevel|Errors|FileAttributes|Font|OutPath|Overwrite|PluginUnload|RebootFlag|RegView|ShellVarContext|Silent)|Show(?:InstDetails|UninstDetails|Window)|Silent(?:Install|UnInstall)|Sleep|SpaceTexts|Splash|StartMenu|Str(?:CmpS?|Cpy|Len)|SubCaption|System|UnRegDLL|Unicode|UninstPage|Uninstall(?:ButtonText|Caption|Icon|SubCaption|Text)|UserInfo|VI(?:AddVersionKey|FileVersion|ProductVersion)|VPatch|Var|WindowIcon|Write(?:INIStr|Reg(?:Bin|DWORD|ExpandStr|MultiStr|None|Str)|Uninstaller)|XPStyle|ns(?:Dialogs|Exec))\b/m,lookbehind:!0},property:/\b(?:ARCHIVE|FILE_(?:ATTRIBUTE_ARCHIVE|ATTRIBUTE_NORMAL|ATTRIBUTE_OFFLINE|ATTRIBUTE_READONLY|ATTRIBUTE_SYSTEM|ATTRIBUTE_TEMPORARY)|HK(?:(?:CR|CU|LM)(?:32|64)?|DD|PD|U)|HKEY_(?:CLASSES_ROOT|CURRENT_CONFIG|CURRENT_USER|DYN_DATA|LOCAL_MACHINE|PERFORMANCE_DATA|USERS)|ID(?:ABORT|CANCEL|IGNORE|NO|OK|RETRY|YES)|MB_(?:ABORTRETRYIGNORE|DEFBUTTON1|DEFBUTTON2|DEFBUTTON3|DEFBUTTON4|ICONEXCLAMATION|ICONINFORMATION|ICONQUESTION|ICONSTOP|OK|OKCANCEL|RETRYCANCEL|RIGHT|RTLREADING|SETFOREGROUND|TOPMOST|USERICON|YESNO)|NORMAL|OFFLINE|READONLY|SHCTX|SHELL_CONTEXT|SYSTEM|TEMPORARY|admin|all|auto|both|colored|false|force|hide|highest|lastused|leave|listonly|none|normal|notset|off|on|open|print|show|silent|silentlog|smooth|textonly|true|user)\b/,constant:/\$\{[\w\.:\^-]+\}|\$\([\w\.:\^-]+\)/i,variable:/\$\w+/i,number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--?|\+\+?|<=?|>=?|==?=?|&&?|\|\|?|[?*\/~^%]/,punctuation:/[{}[\];(),.:]/,important:{pattern:/(^[\t ]*)!(?:addincludedir|addplugindir|appendfile|cd|define|delfile|echo|else|endif|error|execute|finalize|getdllversion|gettlbversion|if|ifdef|ifmacrodef|ifmacrondef|ifndef|include|insertmacro|macro|macroend|makensis|packhdr|pragma|searchparse|searchreplace|system|tempfile|undef|verbose|warning)\b/im,lookbehind:!0}}; \ No newline at end of file +Prism.languages.nsis={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|[#;].*)/,lookbehind:!0},string:{pattern:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0},keyword:{pattern:/(^[\t ]*)(?:Abort|Add(?:BrandingImage|Size)|AdvSplash|Allow(?:RootDirInstall|SkipFiles)|AutoCloseWindow|BG(?:Font|Gradient|Image)|Banner|BrandingText|BringToFront|CRCCheck|Call(?:InstDLL)?|Caption|ChangeUI|CheckBitmap|ClearErrors|CompletedText|ComponentText|CopyFiles|Create(?:Directory|Font|ShortCut)|Delete(?:INISec|INIStr|RegKey|RegValue)?|Detail(?:Print|sButtonText)|Dialer|Dir(?:Text|Var|Verify)|EnableWindow|Enum(?:RegKey|RegValue)|Exch|Exec(?:Shell(?:Wait)?|Wait)?|ExpandEnvStrings|File(?:BufSize|Close|ErrorText|Open|Read|ReadByte|ReadUTF16LE|ReadWord|Seek|Write|WriteByte|WriteUTF16LE|WriteWord)?|Find(?:Close|First|Next|Window)|FlushINI|Get(?:CurInstType|CurrentAddress|DLLVersion(?:Local)?|DlgItem|ErrorLevel|FileTime(?:Local)?|FullPathName|Function(?:Address|End)?|InstDirError|LabelAddress|TempFileName)|Goto|HideWindow|Icon|If(?:Abort|Errors|FileExists|RebootFlag|Silent)|InitPluginsDir|InstProgressFlags|Inst(?:Type(?:GetText|SetText)?)|Install(?:ButtonText|Colors|Dir(?:RegKey)?)|Int(?:64|Ptr)?CmpU?|Int(?:64)?Fmt|Int(?:Ptr)?Op|IsWindow|Lang(?:DLL|String)|License(?:BkColor|Data|ForceSelection|LangString|Text)|LoadLanguageFile|LockWindow|Log(?:Set|Text)|Manifest(?:DPIAware|SupportedOS)|Math|MessageBox|MiscButtonText|NSISdl|Name|Nop|OutFile|PE(?:DllCharacteristics|SubsysVer)|Page(?:Callbacks)?|Pop|Push|Quit|RMDir|Read(?:EnvStr|INIStr|RegDWORD|RegStr)|Reboot|RegDLL|Rename|RequestExecutionLevel|ReserveFile|Return|SearchPath|Section(?:End|GetFlags|GetInstTypes|GetSize|GetText|Group|In|SetFlags|SetInstTypes|SetSize|SetText)?|SendMessage|Set(?:AutoClose|BrandingImage|Compress|Compressor(?:DictSize)?|CtlColors|CurInstType|DatablockOptimize|DateSave|Details(?:Print|View)|ErrorLevel|Errors|FileAttributes|Font|OutPath|Overwrite|PluginUnload|RebootFlag|RegView|ShellVarContext|Silent)|Show(?:InstDetails|UninstDetails|Window)|Silent(?:Install|UnInstall)|Sleep|SpaceTexts|Splash|StartMenu|Str(?:CmpS?|Cpy|Len)|SubCaption|System|UnRegDLL|Unicode|UninstPage|Uninstall(?:ButtonText|Caption|Icon|SubCaption|Text)|UserInfo|VI(?:AddVersionKey|FileVersion|ProductVersion)|VPatch|Var|WindowIcon|Write(?:INIStr|Reg(?:Bin|DWORD|ExpandStr|MultiStr|None|Str)|Uninstaller)|XPStyle|ns(?:Dialogs|Exec))\b/m,lookbehind:!0},property:/\b(?:ARCHIVE|FILE_(?:ATTRIBUTE_ARCHIVE|ATTRIBUTE_NORMAL|ATTRIBUTE_OFFLINE|ATTRIBUTE_READONLY|ATTRIBUTE_SYSTEM|ATTRIBUTE_TEMPORARY)|HK(?:(?:CR|CU|LM)(?:32|64)?|DD|PD|U)|HKEY_(?:CLASSES_ROOT|CURRENT_CONFIG|CURRENT_USER|DYN_DATA|LOCAL_MACHINE|PERFORMANCE_DATA|USERS)|ID(?:ABORT|CANCEL|IGNORE|NO|OK|RETRY|YES)|MB_(?:ABORTRETRYIGNORE|DEFBUTTON1|DEFBUTTON2|DEFBUTTON3|DEFBUTTON4|ICONEXCLAMATION|ICONINFORMATION|ICONQUESTION|ICONSTOP|OK|OKCANCEL|RETRYCANCEL|RIGHT|RTLREADING|SETFOREGROUND|TOPMOST|USERICON|YESNO)|NORMAL|OFFLINE|READONLY|SHCTX|SHELL_CONTEXT|SYSTEM|TEMPORARY|admin|all|auto|both|colored|false|force|hide|highest|lastused|leave|listonly|none|normal|notset|off|on|open|print|show|silent|silentlog|smooth|textonly|true|user)\b/,constant:/\$\{[\w\.:\^-]+\}|\$\([\w\.:\^-]+\)/,variable:/\$\w+/,number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--?|\+\+?|<=?|>=?|==?=?|&&?|\|\|?|[?*\/~^%]/,punctuation:/[{}[\];(),.:]/,important:{pattern:/(^[\t ]*)!(?:addincludedir|addplugindir|appendfile|cd|define|delfile|echo|else|endif|error|execute|finalize|getdllversion|gettlbversion|if|ifdef|ifmacrodef|ifmacrondef|ifndef|include|insertmacro|macro|macroend|makensis|packhdr|pragma|searchparse|searchreplace|system|tempfile|undef|verbose|warning)\b/im,lookbehind:!0}}; \ No newline at end of file diff --git a/components/prism-pascal.js b/components/prism-pascal.js index 5e8facdf83..2f9f5c0e06 100644 --- a/components/prism-pascal.js +++ b/components/prism-pascal.js @@ -53,7 +53,7 @@ Prism.languages.pascal = { /\b\d+(?:\.\d+)?(?:e[+-]?\d+)?/i ], 'operator': [ - /\.\.|\*\*|:=|<[<=>]?|>[>=]?|[+\-*\/]=?|[@^=]/i, + /\.\.|\*\*|:=|<[<=>]?|>[>=]?|[+\-*\/]=?|[@^=]/, { pattern: /(^|[^&])\b(?:and|as|div|exclude|in|include|is|mod|not|or|shl|shr|xor)\b/, lookbehind: true diff --git a/components/prism-pascal.min.js b/components/prism-pascal.min.js index 94f0fd5c2f..3f21ba69b3 100644 --- a/components/prism-pascal.min.js +++ b/components/prism-pascal.min.js @@ -1 +1 @@ -Prism.languages.pascal={directive:{pattern:/\{\$[\s\S]*?\}/,greedy:!0,alias:["marco","property"]},comment:{pattern:/\(\*[\s\S]*?\*\)|\{[\s\S]*?\}|\/\/.*/,greedy:!0},string:{pattern:/(?:'(?:''|[^'\r\n])*'(?!')|#[&$%]?[a-f\d]+)+|\^[a-z]/i,greedy:!0},asm:{pattern:/(\basm\b)[\s\S]+?(?=\bend\s*[;[])/i,lookbehind:!0,greedy:!0,inside:null},keyword:[{pattern:/(^|[^&])\b(?:absolute|array|asm|begin|case|const|constructor|destructor|do|downto|else|end|file|for|function|goto|if|implementation|inherited|inline|interface|label|nil|object|of|operator|packed|procedure|program|record|reintroduce|repeat|self|set|string|then|to|type|unit|until|uses|var|while|with)\b/i,lookbehind:!0},{pattern:/(^|[^&])\b(?:dispose|exit|false|new|true)\b/i,lookbehind:!0},{pattern:/(^|[^&])\b(?:class|dispinterface|except|exports|finalization|finally|initialization|inline|library|on|out|packed|property|raise|resourcestring|threadvar|try)\b/i,lookbehind:!0},{pattern:/(^|[^&])\b(?:absolute|abstract|alias|assembler|bitpacked|break|cdecl|continue|cppdecl|cvar|default|deprecated|dynamic|enumerator|experimental|export|external|far|far16|forward|generic|helper|implements|index|interrupt|iochecks|local|message|name|near|nodefault|noreturn|nostackframe|oldfpccall|otherwise|overload|override|pascal|platform|private|protected|public|published|read|register|reintroduce|result|safecall|saveregisters|softfloat|specialize|static|stdcall|stored|strict|unaligned|unimplemented|varargs|virtual|write)\b/i,lookbehind:!0}],number:[/(?:[&%]\d+|\$[a-f\d]+)/i,/\b\d+(?:\.\d+)?(?:e[+-]?\d+)?/i],operator:[/\.\.|\*\*|:=|<[<=>]?|>[>=]?|[+\-*\/]=?|[@^=]/i,{pattern:/(^|[^&])\b(?:and|as|div|exclude|in|include|is|mod|not|or|shl|shr|xor)\b/,lookbehind:!0}],punctuation:/\(\.|\.\)|[()\[\]:;,.]/},Prism.languages.pascal.asm.inside=Prism.languages.extend("pascal",{asm:void 0,keyword:void 0,operator:void 0}),Prism.languages.objectpascal=Prism.languages.pascal; \ No newline at end of file +Prism.languages.pascal={directive:{pattern:/\{\$[\s\S]*?\}/,greedy:!0,alias:["marco","property"]},comment:{pattern:/\(\*[\s\S]*?\*\)|\{[\s\S]*?\}|\/\/.*/,greedy:!0},string:{pattern:/(?:'(?:''|[^'\r\n])*'(?!')|#[&$%]?[a-f\d]+)+|\^[a-z]/i,greedy:!0},asm:{pattern:/(\basm\b)[\s\S]+?(?=\bend\s*[;[])/i,lookbehind:!0,greedy:!0,inside:null},keyword:[{pattern:/(^|[^&])\b(?:absolute|array|asm|begin|case|const|constructor|destructor|do|downto|else|end|file|for|function|goto|if|implementation|inherited|inline|interface|label|nil|object|of|operator|packed|procedure|program|record|reintroduce|repeat|self|set|string|then|to|type|unit|until|uses|var|while|with)\b/i,lookbehind:!0},{pattern:/(^|[^&])\b(?:dispose|exit|false|new|true)\b/i,lookbehind:!0},{pattern:/(^|[^&])\b(?:class|dispinterface|except|exports|finalization|finally|initialization|inline|library|on|out|packed|property|raise|resourcestring|threadvar|try)\b/i,lookbehind:!0},{pattern:/(^|[^&])\b(?:absolute|abstract|alias|assembler|bitpacked|break|cdecl|continue|cppdecl|cvar|default|deprecated|dynamic|enumerator|experimental|export|external|far|far16|forward|generic|helper|implements|index|interrupt|iochecks|local|message|name|near|nodefault|noreturn|nostackframe|oldfpccall|otherwise|overload|override|pascal|platform|private|protected|public|published|read|register|reintroduce|result|safecall|saveregisters|softfloat|specialize|static|stdcall|stored|strict|unaligned|unimplemented|varargs|virtual|write)\b/i,lookbehind:!0}],number:[/(?:[&%]\d+|\$[a-f\d]+)/i,/\b\d+(?:\.\d+)?(?:e[+-]?\d+)?/i],operator:[/\.\.|\*\*|:=|<[<=>]?|>[>=]?|[+\-*\/]=?|[@^=]/,{pattern:/(^|[^&])\b(?:and|as|div|exclude|in|include|is|mod|not|or|shl|shr|xor)\b/,lookbehind:!0}],punctuation:/\(\.|\.\)|[()\[\]:;,.]/},Prism.languages.pascal.asm.inside=Prism.languages.extend("pascal",{asm:void 0,keyword:void 0,operator:void 0}),Prism.languages.objectpascal=Prism.languages.pascal; \ No newline at end of file diff --git a/components/prism-pascaligo.js b/components/prism-pascaligo.js index cc9a575616..e9f57ebacf 100644 --- a/components/prism-pascaligo.js +++ b/components/prism-pascaligo.js @@ -39,7 +39,7 @@ pattern: /(^|[^&])\b(?:bool|int|list|map|nat|record|string|unit)\b/i, lookbehind: true }, - 'function': /\b\w+(?=\s*\()/i, + 'function': /\b\w+(?=\s*\()/, 'number': [ // Hexadecimal, octal and binary /%[01]+|&[0-7]+|\$[a-f\d]+/i, diff --git a/components/prism-pascaligo.min.js b/components/prism-pascaligo.min.js index 6c8f828fd0..fe17122272 100644 --- a/components/prism-pascaligo.min.js +++ b/components/prism-pascaligo.min.js @@ -1 +1 @@ -!function(e){var n="(?:\\b\\w+(?:)?|)".replace(//g,function(){return"\\((?:[^()]|\\((?:[^()]|\\([^()]*\\))*\\))*\\)"}),t=e.languages.pascaligo={comment:/\(\*[\s\S]+?\*\)|\/\/.*/,string:{pattern:/(["'`])(?:\\[\s\S]|(?!\1)[^\\])*\1|\^[a-z]/i,greedy:!0},"class-name":[{pattern:RegExp("(\\btype\\s+\\w+\\s+is\\s+)".replace(//g,function(){return n}),"i"),lookbehind:!0,inside:null},{pattern:RegExp("(?=\\s+is\\b)".replace(//g,function(){return n}),"i"),inside:null},{pattern:RegExp("(:\\s*)".replace(//g,function(){return n})),lookbehind:!0,inside:null}],keyword:{pattern:/(^|[^&])\b(?:begin|block|case|const|else|end|fail|for|from|function|if|is|nil|of|remove|return|skip|then|type|var|while|with)\b/i,lookbehind:!0},boolean:{pattern:/(^|[^&])\b(?:False|True)\b/i,lookbehind:!0},builtin:{pattern:/(^|[^&])\b(?:bool|int|list|map|nat|record|string|unit)\b/i,lookbehind:!0},function:/\b\w+(?=\s*\()/i,number:[/%[01]+|&[0-7]+|\$[a-f\d]+/i,/\b\d+(?:\.\d+)?(?:e[+-]?\d+)?(?:mtz|n)?/i],operator:/->|=\/=|\.\.|\*\*|:=|<[<=>]?|>[>=]?|[+\-*\/]=?|[@^=|]|\b(?:and|mod|or)\b/,punctuation:/\(\.|\.\)|[()\[\]:;,.{}]/},i=["comment","keyword","builtin","operator","punctuation"].reduce(function(e,n){return e[n]=t[n],e},{});t["class-name"].forEach(function(e){e.inside=i})}(Prism); \ No newline at end of file +!function(e){var n="(?:\\b\\w+(?:)?|)".replace(//g,function(){return"\\((?:[^()]|\\((?:[^()]|\\([^()]*\\))*\\))*\\)"}),t=e.languages.pascaligo={comment:/\(\*[\s\S]+?\*\)|\/\/.*/,string:{pattern:/(["'`])(?:\\[\s\S]|(?!\1)[^\\])*\1|\^[a-z]/i,greedy:!0},"class-name":[{pattern:RegExp("(\\btype\\s+\\w+\\s+is\\s+)".replace(//g,function(){return n}),"i"),lookbehind:!0,inside:null},{pattern:RegExp("(?=\\s+is\\b)".replace(//g,function(){return n}),"i"),inside:null},{pattern:RegExp("(:\\s*)".replace(//g,function(){return n})),lookbehind:!0,inside:null}],keyword:{pattern:/(^|[^&])\b(?:begin|block|case|const|else|end|fail|for|from|function|if|is|nil|of|remove|return|skip|then|type|var|while|with)\b/i,lookbehind:!0},boolean:{pattern:/(^|[^&])\b(?:False|True)\b/i,lookbehind:!0},builtin:{pattern:/(^|[^&])\b(?:bool|int|list|map|nat|record|string|unit)\b/i,lookbehind:!0},function:/\b\w+(?=\s*\()/,number:[/%[01]+|&[0-7]+|\$[a-f\d]+/i,/\b\d+(?:\.\d+)?(?:e[+-]?\d+)?(?:mtz|n)?/i],operator:/->|=\/=|\.\.|\*\*|:=|<[<=>]?|>[>=]?|[+\-*\/]=?|[@^=|]|\b(?:and|mod|or)\b/,punctuation:/\(\.|\.\)|[()\[\]:;,.{}]/},i=["comment","keyword","builtin","operator","punctuation"].reduce(function(e,n){return e[n]=t[n],e},{});t["class-name"].forEach(function(e){e.inside=i})}(Prism); \ No newline at end of file diff --git a/components/prism-perl.js b/components/prism-perl.js index 9938c8ffa3..398bf01a5e 100644 --- a/components/prism-perl.js +++ b/components/prism-perl.js @@ -161,7 +161,7 @@ Prism.languages.perl = { // ${...} /[&*$@%]#?(?=\{)/, // $foo - /[&*$@%]#?(?:(?:::)*'?(?!\d)[\w$]+(?![\w$]))+(?:::)*/i, + /[&*$@%]#?(?:(?:::)*'?(?!\d)[\w$]+(?![\w$]))+(?:::)*/, // $1 /[&*$@%]\d+/, // $_, @_, %! diff --git a/components/prism-perl.min.js b/components/prism-perl.min.js index ec5cc16fce..eade8d7501 100644 --- a/components/prism-perl.min.js +++ b/components/prism-perl.min.js @@ -1 +1 @@ -Prism.languages.perl={comment:[{pattern:/(^\s*)=\w[\s\S]*?=cut.*/m,lookbehind:!0},{pattern:/(^|[^\\$])#.*/,lookbehind:!0}],string:[{pattern:/\b(?:q|qq|qw|qx)\s*([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1/,greedy:!0},{pattern:/\b(?:q|qq|qw|qx)\s+([a-zA-Z0-9])(?:(?!\1)[^\\]|\\[\s\S])*\1/,greedy:!0},{pattern:/\b(?:q|qq|qw|qx)\s*\((?:[^()\\]|\\[\s\S])*\)/,greedy:!0},{pattern:/\b(?:q|qq|qw|qx)\s*\{(?:[^{}\\]|\\[\s\S])*\}/,greedy:!0},{pattern:/\b(?:q|qq|qw|qx)\s*\[(?:[^[\]\\]|\\[\s\S])*\]/,greedy:!0},{pattern:/\b(?:q|qq|qw|qx)\s*<(?:[^<>\\]|\\[\s\S])*>/,greedy:!0},{pattern:/("|`)(?:(?!\1)[^\\]|\\[\s\S])*\1/,greedy:!0},{pattern:/'(?:[^'\\\r\n]|\\.)*'/,greedy:!0}],regex:[{pattern:/\b(?:m|qr)\s*([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1[msixpodualngc]*/,greedy:!0},{pattern:/\b(?:m|qr)\s+([a-zA-Z0-9])(?:(?!\1)[^\\]|\\[\s\S])*\1[msixpodualngc]*/,greedy:!0},{pattern:/\b(?:m|qr)\s*\((?:[^()\\]|\\[\s\S])*\)[msixpodualngc]*/,greedy:!0},{pattern:/\b(?:m|qr)\s*\{(?:[^{}\\]|\\[\s\S])*\}[msixpodualngc]*/,greedy:!0},{pattern:/\b(?:m|qr)\s*\[(?:[^[\]\\]|\\[\s\S])*\][msixpodualngc]*/,greedy:!0},{pattern:/\b(?:m|qr)\s*<(?:[^<>\\]|\\[\s\S])*>[msixpodualngc]*/,greedy:!0},{pattern:/(^|[^-]\b)(?:s|tr|y)\s*([^a-zA-Z0-9\s{(\[<])(?:(?!\2)[^\\]|\\[\s\S])*\2(?:(?!\2)[^\\]|\\[\s\S])*\2[msixpodualngcer]*/,lookbehind:!0,greedy:!0},{pattern:/(^|[^-]\b)(?:s|tr|y)\s+([a-zA-Z0-9])(?:(?!\2)[^\\]|\\[\s\S])*\2(?:(?!\2)[^\\]|\\[\s\S])*\2[msixpodualngcer]*/,lookbehind:!0,greedy:!0},{pattern:/(^|[^-]\b)(?:s|tr|y)\s*\((?:[^()\\]|\\[\s\S])*\)\s*\((?:[^()\\]|\\[\s\S])*\)[msixpodualngcer]*/,lookbehind:!0,greedy:!0},{pattern:/(^|[^-]\b)(?:s|tr|y)\s*\{(?:[^{}\\]|\\[\s\S])*\}\s*\{(?:[^{}\\]|\\[\s\S])*\}[msixpodualngcer]*/,lookbehind:!0,greedy:!0},{pattern:/(^|[^-]\b)(?:s|tr|y)\s*\[(?:[^[\]\\]|\\[\s\S])*\]\s*\[(?:[^[\]\\]|\\[\s\S])*\][msixpodualngcer]*/,lookbehind:!0,greedy:!0},{pattern:/(^|[^-]\b)(?:s|tr|y)\s*<(?:[^<>\\]|\\[\s\S])*>\s*<(?:[^<>\\]|\\[\s\S])*>[msixpodualngcer]*/,lookbehind:!0,greedy:!0},{pattern:/\/(?:[^\/\\\r\n]|\\.)*\/[msixpodualngc]*(?=\s*(?:$|[\r\n,.;})&|\-+*~<>!?^]|(?:and|cmp|eq|ge|gt|le|lt|ne|not|or|x|xor)\b))/,greedy:!0}],variable:[/[&*$@%]\{\^[A-Z]+\}/,/[&*$@%]\^[A-Z_]/,/[&*$@%]#?(?=\{)/,/[&*$@%]#?(?:(?:::)*'?(?!\d)[\w$]+(?![\w$]))+(?:::)*/i,/[&*$@%]\d+/,/(?!%=)[$@%][!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~]/],filehandle:{pattern:/<(?![<=])\S*>|\b_\b/,alias:"symbol"},vstring:{pattern:/v\d+(?:\.\d+)*|\d+(?:\.\d+){2,}/,alias:"string"},function:{pattern:/sub \w+/i,inside:{keyword:/sub/}},keyword:/\b(?:any|break|continue|default|delete|die|do|else|elsif|eval|for|foreach|given|goto|if|last|local|my|next|our|package|print|redo|require|return|say|state|sub|switch|undef|unless|until|use|when|while)\b/,number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)\b/,operator:/-[rwxoRWXOezsfdlpSbctugkTBMAC]\b|\+[+=]?|-[-=>]?|\*\*?=?|\/\/?=?|=[=~>]?|~[~=]?|\|\|?=?|&&?=?|<(?:=>?|<=?)?|>>?=?|![~=]?|[%^]=?|\.(?:=|\.\.?)?|[\\?]|\bx(?:=|\b)|\b(?:and|cmp|eq|ge|gt|le|lt|ne|not|or|xor)\b/,punctuation:/[{}[\];(),:]/}; \ No newline at end of file +Prism.languages.perl={comment:[{pattern:/(^\s*)=\w[\s\S]*?=cut.*/m,lookbehind:!0},{pattern:/(^|[^\\$])#.*/,lookbehind:!0}],string:[{pattern:/\b(?:q|qq|qw|qx)\s*([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1/,greedy:!0},{pattern:/\b(?:q|qq|qw|qx)\s+([a-zA-Z0-9])(?:(?!\1)[^\\]|\\[\s\S])*\1/,greedy:!0},{pattern:/\b(?:q|qq|qw|qx)\s*\((?:[^()\\]|\\[\s\S])*\)/,greedy:!0},{pattern:/\b(?:q|qq|qw|qx)\s*\{(?:[^{}\\]|\\[\s\S])*\}/,greedy:!0},{pattern:/\b(?:q|qq|qw|qx)\s*\[(?:[^[\]\\]|\\[\s\S])*\]/,greedy:!0},{pattern:/\b(?:q|qq|qw|qx)\s*<(?:[^<>\\]|\\[\s\S])*>/,greedy:!0},{pattern:/("|`)(?:(?!\1)[^\\]|\\[\s\S])*\1/,greedy:!0},{pattern:/'(?:[^'\\\r\n]|\\.)*'/,greedy:!0}],regex:[{pattern:/\b(?:m|qr)\s*([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1[msixpodualngc]*/,greedy:!0},{pattern:/\b(?:m|qr)\s+([a-zA-Z0-9])(?:(?!\1)[^\\]|\\[\s\S])*\1[msixpodualngc]*/,greedy:!0},{pattern:/\b(?:m|qr)\s*\((?:[^()\\]|\\[\s\S])*\)[msixpodualngc]*/,greedy:!0},{pattern:/\b(?:m|qr)\s*\{(?:[^{}\\]|\\[\s\S])*\}[msixpodualngc]*/,greedy:!0},{pattern:/\b(?:m|qr)\s*\[(?:[^[\]\\]|\\[\s\S])*\][msixpodualngc]*/,greedy:!0},{pattern:/\b(?:m|qr)\s*<(?:[^<>\\]|\\[\s\S])*>[msixpodualngc]*/,greedy:!0},{pattern:/(^|[^-]\b)(?:s|tr|y)\s*([^a-zA-Z0-9\s{(\[<])(?:(?!\2)[^\\]|\\[\s\S])*\2(?:(?!\2)[^\\]|\\[\s\S])*\2[msixpodualngcer]*/,lookbehind:!0,greedy:!0},{pattern:/(^|[^-]\b)(?:s|tr|y)\s+([a-zA-Z0-9])(?:(?!\2)[^\\]|\\[\s\S])*\2(?:(?!\2)[^\\]|\\[\s\S])*\2[msixpodualngcer]*/,lookbehind:!0,greedy:!0},{pattern:/(^|[^-]\b)(?:s|tr|y)\s*\((?:[^()\\]|\\[\s\S])*\)\s*\((?:[^()\\]|\\[\s\S])*\)[msixpodualngcer]*/,lookbehind:!0,greedy:!0},{pattern:/(^|[^-]\b)(?:s|tr|y)\s*\{(?:[^{}\\]|\\[\s\S])*\}\s*\{(?:[^{}\\]|\\[\s\S])*\}[msixpodualngcer]*/,lookbehind:!0,greedy:!0},{pattern:/(^|[^-]\b)(?:s|tr|y)\s*\[(?:[^[\]\\]|\\[\s\S])*\]\s*\[(?:[^[\]\\]|\\[\s\S])*\][msixpodualngcer]*/,lookbehind:!0,greedy:!0},{pattern:/(^|[^-]\b)(?:s|tr|y)\s*<(?:[^<>\\]|\\[\s\S])*>\s*<(?:[^<>\\]|\\[\s\S])*>[msixpodualngcer]*/,lookbehind:!0,greedy:!0},{pattern:/\/(?:[^\/\\\r\n]|\\.)*\/[msixpodualngc]*(?=\s*(?:$|[\r\n,.;})&|\-+*~<>!?^]|(?:and|cmp|eq|ge|gt|le|lt|ne|not|or|x|xor)\b))/,greedy:!0}],variable:[/[&*$@%]\{\^[A-Z]+\}/,/[&*$@%]\^[A-Z_]/,/[&*$@%]#?(?=\{)/,/[&*$@%]#?(?:(?:::)*'?(?!\d)[\w$]+(?![\w$]))+(?:::)*/,/[&*$@%]\d+/,/(?!%=)[$@%][!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~]/],filehandle:{pattern:/<(?![<=])\S*>|\b_\b/,alias:"symbol"},vstring:{pattern:/v\d+(?:\.\d+)*|\d+(?:\.\d+){2,}/,alias:"string"},function:{pattern:/sub \w+/i,inside:{keyword:/sub/}},keyword:/\b(?:any|break|continue|default|delete|die|do|else|elsif|eval|for|foreach|given|goto|if|last|local|my|next|our|package|print|redo|require|return|say|state|sub|switch|undef|unless|until|use|when|while)\b/,number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)\b/,operator:/-[rwxoRWXOezsfdlpSbctugkTBMAC]\b|\+[+=]?|-[-=>]?|\*\*?=?|\/\/?=?|=[=~>]?|~[~=]?|\|\|?=?|&&?=?|<(?:=>?|<=?)?|>>?=?|![~=]?|[%^]=?|\.(?:=|\.\.?)?|[\\?]|\bx(?:=|\b)|\b(?:and|cmp|eq|ge|gt|le|lt|ne|not|or|xor)\b/,punctuation:/[{}[\];(),:]/}; \ No newline at end of file diff --git a/components/prism-php.js b/components/prism-php.js index c79d6bb385..30ac2dc6af 100644 --- a/components/prism-php.js +++ b/components/prism-php.js @@ -35,7 +35,7 @@ alias: 'important' }, 'comment': comment, - 'variable': /\$+(?:\w+\b|(?=\{))/i, + 'variable': /\$+(?:\w+\b|(?=\{))/, 'package': { pattern: /(namespace\s+|use\s+(?:function\s+)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i, lookbehind: true, @@ -331,7 +331,7 @@ return; } - var phpPattern = /<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#(?!\[))(?:[^?\n\r]|\?(?!>))*(?=$|\?>|[\r\n])|#\[|\/\*(?:[^*]|\*(?!\/))*(?:\*\/|$))*?(?:\?>|$)/gi; + var phpPattern = /<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#(?!\[))(?:[^?\n\r]|\?(?!>))*(?=$|\?>|[\r\n])|#\[|\/\*(?:[^*]|\*(?!\/))*(?:\*\/|$))*?(?:\?>|$)/g; Prism.languages['markup-templating'].buildPlaceholders(env, 'php', phpPattern); }); diff --git a/components/prism-php.min.js b/components/prism-php.min.js index 8e503ddd01..75f1f18df3 100644 --- a/components/prism-php.min.js +++ b/components/prism-php.min.js @@ -1 +1 @@ -!function(a){var e=/\/\*[\s\S]*?\*\/|\/\/.*|#(?!\[).*/,t=[{pattern:/\b(?:false|true)\b/i,alias:"boolean"},{pattern:/(::\s*)\b[a-z_]\w*\b(?!\s*\()/i,greedy:!0,lookbehind:!0},{pattern:/(\b(?:case|const)\s+)\b[a-z_]\w*(?=\s*[;=])/i,greedy:!0,lookbehind:!0},/\b(?:null)\b/i,/\b[A-Z_][A-Z0-9_]*\b(?!\s*\()/],i=/\b0b[01]+(?:_[01]+)*\b|\b0o[0-7]+(?:_[0-7]+)*\b|\b0x[\da-f]+(?:_[\da-f]+)*\b|(?:\b\d+(?:_\d+)*\.?(?:\d+(?:_\d+)*)?|\B\.\d+)(?:e[+-]?\d+)?/i,n=/|\?\?=?|\.{3}|\??->|[!=]=?=?|::|\*\*=?|--|\+\+|&&|\|\||<<|>>|[?~]|[/^|%*&<>.+-]=?/,s=/[{}\[\](),:;]/;a.languages.php={delimiter:{pattern:/\?>$|^<\?(?:php(?=\s)|=)?/i,alias:"important"},comment:e,variable:/\$+(?:\w+\b|(?=\{))/i,package:{pattern:/(namespace\s+|use\s+(?:function\s+)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,lookbehind:!0,inside:{punctuation:/\\/}},"class-name-definition":{pattern:/(\b(?:class|enum|interface|trait)\s+)\b[a-z_]\w*(?!\\)\b/i,lookbehind:!0,alias:"class-name"},"function-definition":{pattern:/(\bfunction\s+)[a-z_]\w*(?=\s*\()/i,lookbehind:!0,alias:"function"},keyword:[{pattern:/(\(\s*)\b(?:array|bool|boolean|float|int|integer|object|string)\b(?=\s*\))/i,alias:"type-casting",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|object|self|static|string)\b(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|object|self|static|string|void)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/\b(?:array(?!\s*\()|bool|float|int|iterable|mixed|object|string|void)\b/i,alias:"type-declaration",greedy:!0},{pattern:/(\|\s*)(?:false|null)\b|\b(?:false|null)(?=\s*\|)/i,alias:"type-declaration",greedy:!0,lookbehind:!0},{pattern:/\b(?:parent|self|static)(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(\byield\s+)from\b/i,lookbehind:!0},/\bclass\b/i,{pattern:/((?:^|[^\s>:]|(?:^|[^-])>|(?:^|[^:]):)\s*)\b(?:abstract|and|array|as|break|callable|case|catch|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|enum|eval|exit|extends|final|finally|fn|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|match|namespace|new|or|parent|print|private|protected|public|require|require_once|return|self|static|switch|throw|trait|try|unset|use|var|while|xor|yield|__halt_compiler)\b/i,lookbehind:!0}],"argument-name":{pattern:/([(,]\s+)\b[a-z_]\w*(?=\s*:(?!:))/i,lookbehind:!0},"class-name":[{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self|\s+static))\s+|\bcatch\s*\()\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/(\|\s*)\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/\b[a-z_]\w*(?!\\)\b(?=\s*\|)/i,greedy:!0},{pattern:/(\|\s*)(?:\\?\b[a-z_]\w*)+\b/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(?:\\?\b[a-z_]\w*)+\b(?=\s*\|)/i,alias:"class-name-fully-qualified",greedy:!0,inside:{punctuation:/\\/}},{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self\b|\s+static\b))\s+|\bcatch\s*\()(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*\$)/i,alias:"type-declaration",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-declaration"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*::)/i,alias:["class-name-fully-qualified","static-context"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/([(,?]\s*)[a-z_]\w*(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-hint"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b[a-z_]\w*(?!\\)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:["class-name-fully-qualified","return-type"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:t,function:{pattern:/(^|[^\\\w])\\?[a-z_](?:[\w\\]*\w)?(?=\s*\()/i,lookbehind:!0,inside:{punctuation:/\\/}},property:{pattern:/(->\s*)\w+/,lookbehind:!0},number:i,operator:n,punctuation:s};var l={pattern:/\{\$(?:\{(?:\{[^{}]+\}|[^{}]+)\}|[^{}])+\}|(^|[^\\{])\$+(?:\w+(?:\[[^\r\n\[\]]+\]|->\w+)?)/,lookbehind:!0,inside:a.languages.php},r=[{pattern:/<<<'([^']+)'[\r\n](?:.*[\r\n])*?\1;/,alias:"nowdoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<'[^']+'|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<'?|[';]$/}}}},{pattern:/<<<(?:"([^"]+)"[\r\n](?:.*[\r\n])*?\1;|([a-z_]\w*)[\r\n](?:.*[\r\n])*?\2;)/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<(?:"[^"]+"|[a-z_]\w*)|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<"?|[";]$/}},interpolation:l}},{pattern:/`(?:\\[\s\S]|[^\\`])*`/,alias:"backtick-quoted-string",greedy:!0},{pattern:/'(?:\\[\s\S]|[^\\'])*'/,alias:"single-quoted-string",greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,alias:"double-quoted-string",greedy:!0,inside:{interpolation:l}}];a.languages.insertBefore("php","variable",{string:r,attribute:{pattern:/#\[(?:[^"'\/#]|\/(?![*/])|\/\/.*$|#(?!\[).*$|\/\*(?:[^*]|\*(?!\/))*\*\/|"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*')+\](?=\s*[a-z$#])/im,greedy:!0,inside:{"attribute-content":{pattern:/^(#\[)[\s\S]+(?=\]$)/,lookbehind:!0,inside:{comment:e,string:r,"attribute-class-name":[{pattern:/([^:]|^)\b[a-z_]\w*(?!\\)\b/i,alias:"class-name",greedy:!0,lookbehind:!0},{pattern:/([^:]|^)(?:\\?\b[a-z_]\w*)+/i,alias:["class-name","class-name-fully-qualified"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:t,number:i,operator:n,punctuation:s}},delimiter:{pattern:/^#\[|\]$/,alias:"punctuation"}}}}),a.hooks.add("before-tokenize",function(e){if(/<\?/.test(e.code)){a.languages["markup-templating"].buildPlaceholders(e,"php",/<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#(?!\[))(?:[^?\n\r]|\?(?!>))*(?=$|\?>|[\r\n])|#\[|\/\*(?:[^*]|\*(?!\/))*(?:\*\/|$))*?(?:\?>|$)/gi)}}),a.hooks.add("after-tokenize",function(e){a.languages["markup-templating"].tokenizePlaceholders(e,"php")})}(Prism); \ No newline at end of file +!function(a){var e=/\/\*[\s\S]*?\*\/|\/\/.*|#(?!\[).*/,t=[{pattern:/\b(?:false|true)\b/i,alias:"boolean"},{pattern:/(::\s*)\b[a-z_]\w*\b(?!\s*\()/i,greedy:!0,lookbehind:!0},{pattern:/(\b(?:case|const)\s+)\b[a-z_]\w*(?=\s*[;=])/i,greedy:!0,lookbehind:!0},/\b(?:null)\b/i,/\b[A-Z_][A-Z0-9_]*\b(?!\s*\()/],i=/\b0b[01]+(?:_[01]+)*\b|\b0o[0-7]+(?:_[0-7]+)*\b|\b0x[\da-f]+(?:_[\da-f]+)*\b|(?:\b\d+(?:_\d+)*\.?(?:\d+(?:_\d+)*)?|\B\.\d+)(?:e[+-]?\d+)?/i,n=/|\?\?=?|\.{3}|\??->|[!=]=?=?|::|\*\*=?|--|\+\+|&&|\|\||<<|>>|[?~]|[/^|%*&<>.+-]=?/,s=/[{}\[\](),:;]/;a.languages.php={delimiter:{pattern:/\?>$|^<\?(?:php(?=\s)|=)?/i,alias:"important"},comment:e,variable:/\$+(?:\w+\b|(?=\{))/,package:{pattern:/(namespace\s+|use\s+(?:function\s+)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,lookbehind:!0,inside:{punctuation:/\\/}},"class-name-definition":{pattern:/(\b(?:class|enum|interface|trait)\s+)\b[a-z_]\w*(?!\\)\b/i,lookbehind:!0,alias:"class-name"},"function-definition":{pattern:/(\bfunction\s+)[a-z_]\w*(?=\s*\()/i,lookbehind:!0,alias:"function"},keyword:[{pattern:/(\(\s*)\b(?:array|bool|boolean|float|int|integer|object|string)\b(?=\s*\))/i,alias:"type-casting",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|object|self|static|string)\b(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|object|self|static|string|void)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/\b(?:array(?!\s*\()|bool|float|int|iterable|mixed|object|string|void)\b/i,alias:"type-declaration",greedy:!0},{pattern:/(\|\s*)(?:false|null)\b|\b(?:false|null)(?=\s*\|)/i,alias:"type-declaration",greedy:!0,lookbehind:!0},{pattern:/\b(?:parent|self|static)(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(\byield\s+)from\b/i,lookbehind:!0},/\bclass\b/i,{pattern:/((?:^|[^\s>:]|(?:^|[^-])>|(?:^|[^:]):)\s*)\b(?:abstract|and|array|as|break|callable|case|catch|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|enum|eval|exit|extends|final|finally|fn|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|match|namespace|new|or|parent|print|private|protected|public|require|require_once|return|self|static|switch|throw|trait|try|unset|use|var|while|xor|yield|__halt_compiler)\b/i,lookbehind:!0}],"argument-name":{pattern:/([(,]\s+)\b[a-z_]\w*(?=\s*:(?!:))/i,lookbehind:!0},"class-name":[{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self|\s+static))\s+|\bcatch\s*\()\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/(\|\s*)\b[a-z_]\w*(?!\\)\b/i,greedy:!0,lookbehind:!0},{pattern:/\b[a-z_]\w*(?!\\)\b(?=\s*\|)/i,greedy:!0},{pattern:/(\|\s*)(?:\\?\b[a-z_]\w*)+\b/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(?:\\?\b[a-z_]\w*)+\b(?=\s*\|)/i,alias:"class-name-fully-qualified",greedy:!0,inside:{punctuation:/\\/}},{pattern:/(\b(?:extends|implements|instanceof|new(?!\s+self\b|\s+static\b))\s+|\bcatch\s*\()(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:"class-name-fully-qualified",greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*\$)/i,alias:"type-declaration",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-declaration"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/\b[a-z_]\w*(?=\s*::)/i,alias:"static-context",greedy:!0},{pattern:/(?:\\?\b[a-z_]\w*)+(?=\s*::)/i,alias:["class-name-fully-qualified","static-context"],greedy:!0,inside:{punctuation:/\\/}},{pattern:/([(,?]\s*)[a-z_]\w*(?=\s*\$)/i,alias:"type-hint",greedy:!0,lookbehind:!0},{pattern:/([(,?]\s*)(?:\\?\b[a-z_]\w*)+(?=\s*\$)/i,alias:["class-name-fully-qualified","type-hint"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}},{pattern:/(\)\s*:\s*(?:\?\s*)?)\b[a-z_]\w*(?!\\)\b/i,alias:"return-type",greedy:!0,lookbehind:!0},{pattern:/(\)\s*:\s*(?:\?\s*)?)(?:\\?\b[a-z_]\w*)+\b(?!\\)/i,alias:["class-name-fully-qualified","return-type"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:t,function:{pattern:/(^|[^\\\w])\\?[a-z_](?:[\w\\]*\w)?(?=\s*\()/i,lookbehind:!0,inside:{punctuation:/\\/}},property:{pattern:/(->\s*)\w+/,lookbehind:!0},number:i,operator:n,punctuation:s};var l={pattern:/\{\$(?:\{(?:\{[^{}]+\}|[^{}]+)\}|[^{}])+\}|(^|[^\\{])\$+(?:\w+(?:\[[^\r\n\[\]]+\]|->\w+)?)/,lookbehind:!0,inside:a.languages.php},r=[{pattern:/<<<'([^']+)'[\r\n](?:.*[\r\n])*?\1;/,alias:"nowdoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<'[^']+'|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<'?|[';]$/}}}},{pattern:/<<<(?:"([^"]+)"[\r\n](?:.*[\r\n])*?\1;|([a-z_]\w*)[\r\n](?:.*[\r\n])*?\2;)/i,alias:"heredoc-string",greedy:!0,inside:{delimiter:{pattern:/^<<<(?:"[^"]+"|[a-z_]\w*)|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<"?|[";]$/}},interpolation:l}},{pattern:/`(?:\\[\s\S]|[^\\`])*`/,alias:"backtick-quoted-string",greedy:!0},{pattern:/'(?:\\[\s\S]|[^\\'])*'/,alias:"single-quoted-string",greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,alias:"double-quoted-string",greedy:!0,inside:{interpolation:l}}];a.languages.insertBefore("php","variable",{string:r,attribute:{pattern:/#\[(?:[^"'\/#]|\/(?![*/])|\/\/.*$|#(?!\[).*$|\/\*(?:[^*]|\*(?!\/))*\*\/|"(?:\\[\s\S]|[^\\"])*"|'(?:\\[\s\S]|[^\\'])*')+\](?=\s*[a-z$#])/im,greedy:!0,inside:{"attribute-content":{pattern:/^(#\[)[\s\S]+(?=\]$)/,lookbehind:!0,inside:{comment:e,string:r,"attribute-class-name":[{pattern:/([^:]|^)\b[a-z_]\w*(?!\\)\b/i,alias:"class-name",greedy:!0,lookbehind:!0},{pattern:/([^:]|^)(?:\\?\b[a-z_]\w*)+/i,alias:["class-name","class-name-fully-qualified"],greedy:!0,lookbehind:!0,inside:{punctuation:/\\/}}],constant:t,number:i,operator:n,punctuation:s}},delimiter:{pattern:/^#\[|\]$/,alias:"punctuation"}}}}),a.hooks.add("before-tokenize",function(e){if(/<\?/.test(e.code)){a.languages["markup-templating"].buildPlaceholders(e,"php",/<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#(?!\[))(?:[^?\n\r]|\?(?!>))*(?=$|\?>|[\r\n])|#\[|\/\*(?:[^*]|\*(?!\/))*(?:\*\/|$))*?(?:\?>|$)/g)}}),a.hooks.add("after-tokenize",function(e){a.languages["markup-templating"].tokenizePlaceholders(e,"php")})}(Prism); \ No newline at end of file diff --git a/components/prism-python.js b/components/prism-python.js index d11dd9adaa..9a46736abb 100644 --- a/components/prism-python.js +++ b/components/prism-python.js @@ -44,7 +44,7 @@ Prism.languages.python = { lookbehind: true }, 'decorator': { - pattern: /(^[\t ]*)@\w+(?:\.\w+)*/im, + pattern: /(^[\t ]*)@\w+(?:\.\w+)*/m, lookbehind: true, alias: ['annotation', 'punctuation'], inside: { diff --git a/components/prism-python.min.js b/components/prism-python.min.js index fb2230ef8b..0098b877d2 100644 --- a/components/prism-python.min.js +++ b/components/prism-python.min.js @@ -1 +1 @@ -Prism.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/im,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},Prism.languages.python["string-interpolation"].inside.interpolation.inside.rest=Prism.languages.python,Prism.languages.py=Prism.languages.python; \ No newline at end of file +Prism.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},Prism.languages.python["string-interpolation"].inside.interpolation.inside.rest=Prism.languages.python,Prism.languages.py=Prism.languages.python; \ No newline at end of file diff --git a/components/prism-sas.js b/components/prism-sas.js index c0ae8f5abc..8d6f3710c0 100644 --- a/components/prism-sas.js +++ b/components/prism-sas.js @@ -63,12 +63,12 @@ }; var format = { - pattern: /\b(?:format|put)\b=?[\w'$.]+/im, + pattern: /\b(?:format|put)\b=?[\w'$.]+/i, inside: { 'keyword': /^(?:format|put)(?==)/i, 'equals': /=/, 'format': { - pattern: /(?:\w|\$\d)+\.\d?/i, + pattern: /(?:\w|\$\d)+\.\d?/, alias: 'number' } } @@ -259,7 +259,7 @@ 'macro-keyword': macroKeyword, 'macro-variable': macroVariable, 'escaped-char': { - pattern: /%['"()<>=¬^~;,#]/i, + pattern: /%['"()<>=¬^~;,#]/, }, 'punctuation': punctuation } @@ -319,7 +319,7 @@ }, // Decimal (1.2e23), hexadecimal (0c1x) 'number': number, - 'operator': /\*\*?|\|\|?|!!?|¦¦?|<[>=]?|>[<=]?|[-+\/=&]|[~¬^]=?/i, + 'operator': /\*\*?|\|\|?|!!?|¦¦?|<[>=]?|>[<=]?|[-+\/=&]|[~¬^]=?/, 'punctuation': punctuation }; diff --git a/components/prism-sas.min.js b/components/prism-sas.min.js index be23cd902d..698175d0ee 100644 --- a/components/prism-sas.min.js +++ b/components/prism-sas.min.js @@ -1 +1 @@ -!function(e){var t="(?:\"(?:\"\"|[^\"])*\"(?!\")|'(?:''|[^'])*'(?!'))",a=/\b(?:\d[\da-f]*x|\d+(?:\.\d+)?(?:e[+-]?\d+)?)\b/i,n={pattern:RegExp(t+"[bx]"),alias:"number"},i={pattern:/&[a-z_]\w*/i},r={pattern:/((?:^|\s|=|\())%(?:ABORT|BY|CMS|COPY|DISPLAY|DO|ELSE|END|EVAL|GLOBAL|GO|GOTO|IF|INC|INCLUDE|INDEX|INPUT|KTRIM|LENGTH|LET|LIST|LOCAL|PUT|QKTRIM|QSCAN|QSUBSTR|QSYSFUNC|QUPCASE|RETURN|RUN|SCAN|SUBSTR|SUPERQ|SYMDEL|SYMEXIST|SYMGLOBL|SYMLOCAL|SYSCALL|SYSEVALF|SYSEXEC|SYSFUNC|SYSGET|SYSRPUT|THEN|TO|TSO|UNQUOTE|UNTIL|UPCASE|WHILE|WINDOW)\b/i,lookbehind:!0,alias:"keyword"},s={pattern:/(^|\s)(?:proc\s+\w+|data(?!=)|quit|run)\b/i,alias:"keyword",lookbehind:!0},o=[/\/\*[\s\S]*?\*\//,{pattern:/(^[ \t]*|;\s*)\*[^;]*;/m,lookbehind:!0}],l={pattern:RegExp(t),greedy:!0},c=/[$%@.(){}\[\];,\\]/,d={pattern:/%?\b\w+(?=\()/,alias:"keyword"},p={function:d,"arg-value":{pattern:/(=\s*)[A-Z\.]+/i,lookbehind:!0},operator:/=/,"macro-variable":i,arg:{pattern:/[A-Z]+/i,alias:"keyword"},number:a,"numeric-constant":n,punctuation:c,string:l},u={pattern:/\b(?:format|put)\b=?[\w'$.]+/im,inside:{keyword:/^(?:format|put)(?==)/i,equals:/=/,format:{pattern:/(?:\w|\$\d)+\.\d?/i,alias:"number"}}},m={pattern:/\b(?:format|put)\s+[\w']+(?:\s+[$.\w]+)+(?=;)/i,inside:{keyword:/^(?:format|put)/i,format:{pattern:/[\w$]+\.\d?/,alias:"number"}}},b={pattern:/((?:^|\s)=?)(?:catname|checkpoint execute_always|dm|endsas|filename|footnote|%include|libname|%list|lock|missing|options|page|resetline|%run|sasfile|skip|sysecho|title\d?)\b/i,lookbehind:!0,alias:"keyword"},g={pattern:/(^|\s)(?:submit(?:\s+(?:load|norun|parseonly))?|endsubmit)\b/i,lookbehind:!0,alias:"keyword"},k="aStore|accessControl|aggregation|audio|autotune|bayesianNetClassifier|bioMedImage|boolRule|builtins|cardinality|cdm|clustering|conditionalRandomFields|configuration|copula|countreg|dataDiscovery|dataPreprocess|dataSciencePilot|dataStep|decisionTree|deduplication|deepLearn|deepNeural|deepRnn|ds2|ecm|entityRes|espCluster|explainModel|factmac|fastKnn|fcmpact|fedSql|freqTab|gVarCluster|gam|gleam|graphSemiSupLearn|hiddenMarkovModel|hyperGroup|ica|image|iml|kernalPca|langModel|ldaTopic|loadStreams|mbc|mixed|mlTools|modelPublishing|network|neuralNet|nmf|nonParametricBayes|nonlinear|optNetwork|optimization|panel|pca|percentile|phreg|pls|qkb|qlim|quantreg|recommend|regression|reinforcementLearn|robustPca|ruleMining|sampling|sandwich|sccasl|search(?:Analytics)?|sentimentAnalysis|sequence|session(?:Prop)?|severity|simSystem|simple|smartData|sparkEmbeddedProcess|sparseML|spatialreg|spc|stabilityMonitoring|svDataDescription|svm|table|text(?:Filters|Frequency|Mining|Parse|Rule(?:Develop|Score)|Topic|Util)|timeData|transpose|tsInfo|tsReconcile|uniTimeSeries|varReduce",y={pattern:RegExp("(^|\\s)(?:action\\s+)?(?:)\\.[a-z]+\\b[^;]+".replace(//g,function(){return k}),"i"),lookbehind:!0,inside:{keyword:RegExp("(?:)\\.[a-z]+\\b".replace(//g,function(){return k}),"i"),action:{pattern:/(?:action)/i,alias:"keyword"},comment:o,function:d,"arg-value":p["arg-value"],operator:p.operator,argument:p.arg,number:a,"numeric-constant":n,punctuation:c,string:l}},S={pattern:/((?:^|\s)=?)(?:after|analysis|and|array|barchart|barwidth|begingraph|by|call|cas|cbarline|cfill|class(?:lev)?|close|column|computed?|contains|continue|data(?==)|define|delete|describe|document|do\s+over|do|dol|drop|dul|else|end(?:comp|source)?|entryTitle|eval(?:uate)?|exec(?:ute)?|exit|file(?:name)?|fill(?:attrs)?|flist|fnc|function(?:list)?|global|goto|group(?:by)?|headline|headskip|histogram|if|infile|keep|keylabel|keyword|label|layout|leave|legendlabel|length|libname|loadactionset|merge|midpoints|_?null_|name|noobs|nowd|ods|options|or|otherwise|out(?:put)?|over(?:lay)?|plot|print|put|raise|ranexp|rannor|rbreak|retain|return|select|session|sessref|set|source|statgraph|sum|summarize|table|temp|terminate|then\s+do|then|title\d?|to|var|when|where|xaxisopts|y2axisopts|yaxisopts)\b/i,lookbehind:!0};e.languages.sas={datalines:{pattern:/^([ \t]*)(?:cards|(?:data)?lines);[\s\S]+?^[ \t]*;/im,lookbehind:!0,alias:"string",inside:{keyword:{pattern:/^(?:cards|(?:data)?lines)/i},punctuation:/;/}},"proc-sql":{pattern:/(^proc\s+(?:fed)?sql(?:\s+[\w|=]+)?;)[\s\S]+?(?=^(?:proc\s+\w+|data|quit|run);|(?![\s\S]))/im,lookbehind:!0,inside:{sql:{pattern:RegExp("^[ \t]*(?:select|alter\\s+table|(?:create|describe|drop)\\s+(?:index|table(?:\\s+constraints)?|view)|create\\s+unique\\s+index|insert\\s+into|update)(?:|[^;\"'])+;".replace(//g,function(){return t}),"im"),alias:"language-sql",inside:e.languages.sql},"global-statements":b,"sql-statements":{pattern:/(^|\s)(?:disconnect\s+from|begin|commit|exec(?:ute)?|reset|rollback|validate)\b/i,lookbehind:!0,alias:"keyword"},number:a,"numeric-constant":n,punctuation:c,string:l}},"proc-groovy":{pattern:/(^proc\s+groovy(?:\s+[\w|=]+)?;)[\s\S]+?(?=^(?:proc\s+\w+|data|quit|run);|(?![\s\S]))/im,lookbehind:!0,inside:{comment:o,groovy:{pattern:RegExp("(^[ \t]*submit(?:\\s+(?:load|norun|parseonly))?)(?:|[^\"'])+?(?=endsubmit;)".replace(//g,function(){return t}),"im"),lookbehind:!0,alias:"language-groovy",inside:e.languages.groovy},keyword:S,"submit-statement":g,"global-statements":b,number:a,"numeric-constant":n,punctuation:c,string:l}},"proc-lua":{pattern:/(^proc\s+lua(?:\s+[\w|=]+)?;)[\s\S]+?(?=^(?:proc\s+\w+|data|quit|run);|(?![\s\S]))/im,lookbehind:!0,inside:{comment:o,lua:{pattern:RegExp("(^[ \t]*submit(?:\\s+(?:load|norun|parseonly))?)(?:|[^\"'])+?(?=endsubmit;)".replace(//g,function(){return t}),"im"),lookbehind:!0,alias:"language-lua",inside:e.languages.lua},keyword:S,"submit-statement":g,"global-statements":b,number:a,"numeric-constant":n,punctuation:c,string:l}},"proc-cas":{pattern:/(^proc\s+cas(?:\s+[\w|=]+)?;)[\s\S]+?(?=^(?:proc\s+\w+|quit|data);|(?![\s\S]))/im,lookbehind:!0,inside:{comment:o,"statement-var":{pattern:/((?:^|\s)=?)saveresult\s[^;]+/im,lookbehind:!0,inside:{statement:{pattern:/^saveresult\s+\S+/i,inside:{keyword:/^(?:saveresult)/i}},rest:p}},"cas-actions":y,statement:{pattern:/((?:^|\s)=?)(?:default|(?:un)?set|on|output|upload)[^;]+/im,lookbehind:!0,inside:p},step:s,keyword:S,function:d,format:u,altformat:m,"global-statements":b,number:a,"numeric-constant":n,punctuation:c,string:l}},"proc-args":{pattern:RegExp("(^proc\\s+\\w+\\s+)(?!\\s)(?:[^;\"']|)+;".replace(//g,function(){return t}),"im"),lookbehind:!0,inside:p},"macro-keyword":r,"macro-variable":i,"macro-string-functions":{pattern:/((?:^|\s|=))%(?:BQUOTE|NRBQUOTE|NRQUOTE|NRSTR|QUOTE|STR)\(.*?(?:[^%]\))/i,lookbehind:!0,inside:{function:{pattern:/%(?:BQUOTE|NRBQUOTE|NRQUOTE|NRSTR|QUOTE|STR)/i,alias:"keyword"},"macro-keyword":r,"macro-variable":i,"escaped-char":{pattern:/%['"()<>=¬^~;,#]/i},punctuation:c}},"macro-declaration":{pattern:/^%macro[^;]+(?=;)/im,inside:{keyword:/%macro/i}},"macro-end":{pattern:/^%mend[^;]+(?=;)/im,inside:{keyword:/%mend/i}},macro:{pattern:/%_\w+(?=\()/,alias:"keyword"},input:{pattern:/\binput\s[-\w\s/*.$&]+;/i,inside:{input:{alias:"keyword",pattern:/^input/i},comment:o,number:a,"numeric-constant":n}},"options-args":{pattern:/(^options)[-'"|/\\<>*+=:()\w\s]*(?=;)/im,lookbehind:!0,inside:p},"cas-actions":y,comment:o,function:d,format:u,altformat:m,"numeric-constant":n,datetime:{pattern:RegExp(t+"(?:dt?|t)"),alias:"number"},string:l,step:s,keyword:S,"operator-keyword":{pattern:/\b(?:eq|ge|gt|in|le|lt|ne|not)\b/i,alias:"operator"},number:a,operator:/\*\*?|\|\|?|!!?|¦¦?|<[>=]?|>[<=]?|[-+\/=&]|[~¬^]=?/i,punctuation:c}}(Prism); \ No newline at end of file +!function(e){var t="(?:\"(?:\"\"|[^\"])*\"(?!\")|'(?:''|[^'])*'(?!'))",a=/\b(?:\d[\da-f]*x|\d+(?:\.\d+)?(?:e[+-]?\d+)?)\b/i,n={pattern:RegExp(t+"[bx]"),alias:"number"},i={pattern:/&[a-z_]\w*/i},r={pattern:/((?:^|\s|=|\())%(?:ABORT|BY|CMS|COPY|DISPLAY|DO|ELSE|END|EVAL|GLOBAL|GO|GOTO|IF|INC|INCLUDE|INDEX|INPUT|KTRIM|LENGTH|LET|LIST|LOCAL|PUT|QKTRIM|QSCAN|QSUBSTR|QSYSFUNC|QUPCASE|RETURN|RUN|SCAN|SUBSTR|SUPERQ|SYMDEL|SYMEXIST|SYMGLOBL|SYMLOCAL|SYSCALL|SYSEVALF|SYSEXEC|SYSFUNC|SYSGET|SYSRPUT|THEN|TO|TSO|UNQUOTE|UNTIL|UPCASE|WHILE|WINDOW)\b/i,lookbehind:!0,alias:"keyword"},s={pattern:/(^|\s)(?:proc\s+\w+|data(?!=)|quit|run)\b/i,alias:"keyword",lookbehind:!0},o=[/\/\*[\s\S]*?\*\//,{pattern:/(^[ \t]*|;\s*)\*[^;]*;/m,lookbehind:!0}],l={pattern:RegExp(t),greedy:!0},c=/[$%@.(){}\[\];,\\]/,d={pattern:/%?\b\w+(?=\()/,alias:"keyword"},p={function:d,"arg-value":{pattern:/(=\s*)[A-Z\.]+/i,lookbehind:!0},operator:/=/,"macro-variable":i,arg:{pattern:/[A-Z]+/i,alias:"keyword"},number:a,"numeric-constant":n,punctuation:c,string:l},u={pattern:/\b(?:format|put)\b=?[\w'$.]+/i,inside:{keyword:/^(?:format|put)(?==)/i,equals:/=/,format:{pattern:/(?:\w|\$\d)+\.\d?/,alias:"number"}}},m={pattern:/\b(?:format|put)\s+[\w']+(?:\s+[$.\w]+)+(?=;)/i,inside:{keyword:/^(?:format|put)/i,format:{pattern:/[\w$]+\.\d?/,alias:"number"}}},b={pattern:/((?:^|\s)=?)(?:catname|checkpoint execute_always|dm|endsas|filename|footnote|%include|libname|%list|lock|missing|options|page|resetline|%run|sasfile|skip|sysecho|title\d?)\b/i,lookbehind:!0,alias:"keyword"},g={pattern:/(^|\s)(?:submit(?:\s+(?:load|norun|parseonly))?|endsubmit)\b/i,lookbehind:!0,alias:"keyword"},k="aStore|accessControl|aggregation|audio|autotune|bayesianNetClassifier|bioMedImage|boolRule|builtins|cardinality|cdm|clustering|conditionalRandomFields|configuration|copula|countreg|dataDiscovery|dataPreprocess|dataSciencePilot|dataStep|decisionTree|deduplication|deepLearn|deepNeural|deepRnn|ds2|ecm|entityRes|espCluster|explainModel|factmac|fastKnn|fcmpact|fedSql|freqTab|gVarCluster|gam|gleam|graphSemiSupLearn|hiddenMarkovModel|hyperGroup|ica|image|iml|kernalPca|langModel|ldaTopic|loadStreams|mbc|mixed|mlTools|modelPublishing|network|neuralNet|nmf|nonParametricBayes|nonlinear|optNetwork|optimization|panel|pca|percentile|phreg|pls|qkb|qlim|quantreg|recommend|regression|reinforcementLearn|robustPca|ruleMining|sampling|sandwich|sccasl|search(?:Analytics)?|sentimentAnalysis|sequence|session(?:Prop)?|severity|simSystem|simple|smartData|sparkEmbeddedProcess|sparseML|spatialreg|spc|stabilityMonitoring|svDataDescription|svm|table|text(?:Filters|Frequency|Mining|Parse|Rule(?:Develop|Score)|Topic|Util)|timeData|transpose|tsInfo|tsReconcile|uniTimeSeries|varReduce",y={pattern:RegExp("(^|\\s)(?:action\\s+)?(?:)\\.[a-z]+\\b[^;]+".replace(//g,function(){return k}),"i"),lookbehind:!0,inside:{keyword:RegExp("(?:)\\.[a-z]+\\b".replace(//g,function(){return k}),"i"),action:{pattern:/(?:action)/i,alias:"keyword"},comment:o,function:d,"arg-value":p["arg-value"],operator:p.operator,argument:p.arg,number:a,"numeric-constant":n,punctuation:c,string:l}},S={pattern:/((?:^|\s)=?)(?:after|analysis|and|array|barchart|barwidth|begingraph|by|call|cas|cbarline|cfill|class(?:lev)?|close|column|computed?|contains|continue|data(?==)|define|delete|describe|document|do\s+over|do|dol|drop|dul|else|end(?:comp|source)?|entryTitle|eval(?:uate)?|exec(?:ute)?|exit|file(?:name)?|fill(?:attrs)?|flist|fnc|function(?:list)?|global|goto|group(?:by)?|headline|headskip|histogram|if|infile|keep|keylabel|keyword|label|layout|leave|legendlabel|length|libname|loadactionset|merge|midpoints|_?null_|name|noobs|nowd|ods|options|or|otherwise|out(?:put)?|over(?:lay)?|plot|print|put|raise|ranexp|rannor|rbreak|retain|return|select|session|sessref|set|source|statgraph|sum|summarize|table|temp|terminate|then\s+do|then|title\d?|to|var|when|where|xaxisopts|y2axisopts|yaxisopts)\b/i,lookbehind:!0};e.languages.sas={datalines:{pattern:/^([ \t]*)(?:cards|(?:data)?lines);[\s\S]+?^[ \t]*;/im,lookbehind:!0,alias:"string",inside:{keyword:{pattern:/^(?:cards|(?:data)?lines)/i},punctuation:/;/}},"proc-sql":{pattern:/(^proc\s+(?:fed)?sql(?:\s+[\w|=]+)?;)[\s\S]+?(?=^(?:proc\s+\w+|data|quit|run);|(?![\s\S]))/im,lookbehind:!0,inside:{sql:{pattern:RegExp("^[ \t]*(?:select|alter\\s+table|(?:create|describe|drop)\\s+(?:index|table(?:\\s+constraints)?|view)|create\\s+unique\\s+index|insert\\s+into|update)(?:|[^;\"'])+;".replace(//g,function(){return t}),"im"),alias:"language-sql",inside:e.languages.sql},"global-statements":b,"sql-statements":{pattern:/(^|\s)(?:disconnect\s+from|begin|commit|exec(?:ute)?|reset|rollback|validate)\b/i,lookbehind:!0,alias:"keyword"},number:a,"numeric-constant":n,punctuation:c,string:l}},"proc-groovy":{pattern:/(^proc\s+groovy(?:\s+[\w|=]+)?;)[\s\S]+?(?=^(?:proc\s+\w+|data|quit|run);|(?![\s\S]))/im,lookbehind:!0,inside:{comment:o,groovy:{pattern:RegExp("(^[ \t]*submit(?:\\s+(?:load|norun|parseonly))?)(?:|[^\"'])+?(?=endsubmit;)".replace(//g,function(){return t}),"im"),lookbehind:!0,alias:"language-groovy",inside:e.languages.groovy},keyword:S,"submit-statement":g,"global-statements":b,number:a,"numeric-constant":n,punctuation:c,string:l}},"proc-lua":{pattern:/(^proc\s+lua(?:\s+[\w|=]+)?;)[\s\S]+?(?=^(?:proc\s+\w+|data|quit|run);|(?![\s\S]))/im,lookbehind:!0,inside:{comment:o,lua:{pattern:RegExp("(^[ \t]*submit(?:\\s+(?:load|norun|parseonly))?)(?:|[^\"'])+?(?=endsubmit;)".replace(//g,function(){return t}),"im"),lookbehind:!0,alias:"language-lua",inside:e.languages.lua},keyword:S,"submit-statement":g,"global-statements":b,number:a,"numeric-constant":n,punctuation:c,string:l}},"proc-cas":{pattern:/(^proc\s+cas(?:\s+[\w|=]+)?;)[\s\S]+?(?=^(?:proc\s+\w+|quit|data);|(?![\s\S]))/im,lookbehind:!0,inside:{comment:o,"statement-var":{pattern:/((?:^|\s)=?)saveresult\s[^;]+/im,lookbehind:!0,inside:{statement:{pattern:/^saveresult\s+\S+/i,inside:{keyword:/^(?:saveresult)/i}},rest:p}},"cas-actions":y,statement:{pattern:/((?:^|\s)=?)(?:default|(?:un)?set|on|output|upload)[^;]+/im,lookbehind:!0,inside:p},step:s,keyword:S,function:d,format:u,altformat:m,"global-statements":b,number:a,"numeric-constant":n,punctuation:c,string:l}},"proc-args":{pattern:RegExp("(^proc\\s+\\w+\\s+)(?!\\s)(?:[^;\"']|)+;".replace(//g,function(){return t}),"im"),lookbehind:!0,inside:p},"macro-keyword":r,"macro-variable":i,"macro-string-functions":{pattern:/((?:^|\s|=))%(?:BQUOTE|NRBQUOTE|NRQUOTE|NRSTR|QUOTE|STR)\(.*?(?:[^%]\))/i,lookbehind:!0,inside:{function:{pattern:/%(?:BQUOTE|NRBQUOTE|NRQUOTE|NRSTR|QUOTE|STR)/i,alias:"keyword"},"macro-keyword":r,"macro-variable":i,"escaped-char":{pattern:/%['"()<>=¬^~;,#]/},punctuation:c}},"macro-declaration":{pattern:/^%macro[^;]+(?=;)/im,inside:{keyword:/%macro/i}},"macro-end":{pattern:/^%mend[^;]+(?=;)/im,inside:{keyword:/%mend/i}},macro:{pattern:/%_\w+(?=\()/,alias:"keyword"},input:{pattern:/\binput\s[-\w\s/*.$&]+;/i,inside:{input:{alias:"keyword",pattern:/^input/i},comment:o,number:a,"numeric-constant":n}},"options-args":{pattern:/(^options)[-'"|/\\<>*+=:()\w\s]*(?=;)/im,lookbehind:!0,inside:p},"cas-actions":y,comment:o,function:d,format:u,altformat:m,"numeric-constant":n,datetime:{pattern:RegExp(t+"(?:dt?|t)"),alias:"number"},string:l,step:s,keyword:S,"operator-keyword":{pattern:/\b(?:eq|ge|gt|in|le|lt|ne|not)\b/i,alias:"operator"},number:a,operator:/\*\*?|\|\|?|!!?|¦¦?|<[>=]?|>[<=]?|[-+\/=&]|[~¬^]=?/,punctuation:c}}(Prism); \ No newline at end of file diff --git a/components/prism-sass.js b/components/prism-sass.js index d630bd6134..4bbd6cfdcd 100644 --- a/components/prism-sass.js +++ b/components/prism-sass.js @@ -15,7 +15,7 @@ pattern: /^(?:[ \t]*)[@+=].+/m, greedy: true, inside: { - 'atrule': /(?:@[\w-]+|[+=])/m + 'atrule': /(?:@[\w-]+|[+=])/ } } }); diff --git a/components/prism-sass.min.js b/components/prism-sass.min.js index ad25ba06d3..f6ce6f154a 100644 --- a/components/prism-sass.min.js +++ b/components/prism-sass.min.js @@ -1 +1 @@ -!function(e){e.languages.sass=e.languages.extend("css",{comment:{pattern:/^([ \t]*)\/[\/*].*(?:(?:\r?\n|\r)\1[ \t].+)*/m,lookbehind:!0,greedy:!0}}),e.languages.insertBefore("sass","atrule",{"atrule-line":{pattern:/^(?:[ \t]*)[@+=].+/m,greedy:!0,inside:{atrule:/(?:@[\w-]+|[+=])/m}}}),delete e.languages.sass.atrule;var r=/\$[-\w]+|#\{\$[-\w]+\}/,t=[/[+*\/%]|[=!]=|<=?|>=?|\b(?:and|not|or)\b/,{pattern:/(\s)-(?=\s)/,lookbehind:!0}];e.languages.insertBefore("sass","property",{"variable-line":{pattern:/^[ \t]*\$.+/m,greedy:!0,inside:{punctuation:/:/,variable:r,operator:t}},"property-line":{pattern:/^[ \t]*(?:[^:\s]+ *:.*|:[^:\s].*)/m,greedy:!0,inside:{property:[/[^:\s]+(?=\s*:)/,{pattern:/(:)[^:\s]+/,lookbehind:!0}],punctuation:/:/,variable:r,operator:t,important:e.languages.sass.important}}}),delete e.languages.sass.property,delete e.languages.sass.important,e.languages.insertBefore("sass","punctuation",{selector:{pattern:/^([ \t]*)\S(?:,[^,\r\n]+|[^,\r\n]*)(?:,[^,\r\n]+)*(?:,(?:\r?\n|\r)\1[ \t]+\S(?:,[^,\r\n]+|[^,\r\n]*)(?:,[^,\r\n]+)*)*/m,lookbehind:!0,greedy:!0}})}(Prism); \ No newline at end of file +!function(e){e.languages.sass=e.languages.extend("css",{comment:{pattern:/^([ \t]*)\/[\/*].*(?:(?:\r?\n|\r)\1[ \t].+)*/m,lookbehind:!0,greedy:!0}}),e.languages.insertBefore("sass","atrule",{"atrule-line":{pattern:/^(?:[ \t]*)[@+=].+/m,greedy:!0,inside:{atrule:/(?:@[\w-]+|[+=])/}}}),delete e.languages.sass.atrule;var r=/\$[-\w]+|#\{\$[-\w]+\}/,t=[/[+*\/%]|[=!]=|<=?|>=?|\b(?:and|not|or)\b/,{pattern:/(\s)-(?=\s)/,lookbehind:!0}];e.languages.insertBefore("sass","property",{"variable-line":{pattern:/^[ \t]*\$.+/m,greedy:!0,inside:{punctuation:/:/,variable:r,operator:t}},"property-line":{pattern:/^[ \t]*(?:[^:\s]+ *:.*|:[^:\s].*)/m,greedy:!0,inside:{property:[/[^:\s]+(?=\s*:)/,{pattern:/(:)[^:\s]+/,lookbehind:!0}],punctuation:/:/,variable:r,operator:t,important:e.languages.sass.important}}}),delete e.languages.sass.property,delete e.languages.sass.important,e.languages.insertBefore("sass","punctuation",{selector:{pattern:/^([ \t]*)\S(?:,[^,\r\n]+|[^,\r\n]*)(?:,[^,\r\n]+)*(?:,(?:\r?\n|\r)\1[ \t]+\S(?:,[^,\r\n]+|[^,\r\n]*)(?:,[^,\r\n]+)*)*/m,lookbehind:!0,greedy:!0}})}(Prism); \ No newline at end of file diff --git a/components/prism-scss.js b/components/prism-scss.js index 0cff128584..0b12276171 100644 --- a/components/prism-scss.js +++ b/components/prism-scss.js @@ -21,7 +21,7 @@ Prism.languages.scss = Prism.languages.extend('css', { // this one was hard to do, so please be careful if you edit this one :) 'selector': { // Initial look-ahead is used to prevent matching of blank selectors - pattern: /(?=\S)[^@;{}()]?(?:[^@;{}()\s]|\s+(?!\s)|#\{\$[-\w]+\})+(?=\s*\{(?:\}|\s|[^}][^:{}]*[:{][^}]))/m, + pattern: /(?=\S)[^@;{}()]?(?:[^@;{}()\s]|\s+(?!\s)|#\{\$[-\w]+\})+(?=\s*\{(?:\}|\s|[^}][^:{}]*[:{][^}]))/, inside: { 'parent': { pattern: /&/, diff --git a/components/prism-scss.min.js b/components/prism-scss.min.js index 26ca277666..61f069c076 100644 --- a/components/prism-scss.min.js +++ b/components/prism-scss.min.js @@ -1 +1 @@ -Prism.languages.scss=Prism.languages.extend("css",{comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0},atrule:{pattern:/@[\w-](?:\([^()]+\)|[^()\s]|\s+(?!\s))*?(?=\s+[{;])/,inside:{rule:/@[\w-]+/}},url:/(?:[-a-z]+-)?url(?=\()/i,selector:{pattern:/(?=\S)[^@;{}()]?(?:[^@;{}()\s]|\s+(?!\s)|#\{\$[-\w]+\})+(?=\s*\{(?:\}|\s|[^}][^:{}]*[:{][^}]))/m,inside:{parent:{pattern:/&/,alias:"important"},placeholder:/%[-\w]+/,variable:/\$[-\w]+|#\{\$[-\w]+\}/}},property:{pattern:/(?:[-\w]|\$[-\w]|#\{\$[-\w]+\})+(?=\s*:)/,inside:{variable:/\$[-\w]+|#\{\$[-\w]+\}/}}}),Prism.languages.insertBefore("scss","atrule",{keyword:[/@(?:content|debug|each|else(?: if)?|extend|for|forward|function|if|import|include|mixin|return|use|warn|while)\b/i,{pattern:/( )(?:from|through)(?= )/,lookbehind:!0}]}),Prism.languages.insertBefore("scss","important",{variable:/\$[-\w]+|#\{\$[-\w]+\}/}),Prism.languages.insertBefore("scss","function",{"module-modifier":{pattern:/\b(?:as|hide|show|with)\b/i,alias:"keyword"},placeholder:{pattern:/%[-\w]+/,alias:"selector"},statement:{pattern:/\B!(?:default|optional)\b/i,alias:"keyword"},boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"},operator:{pattern:/(\s)(?:[-+*\/%]|[=!]=|<=?|>=?|and|not|or)(?=\s)/,lookbehind:!0}}),Prism.languages.scss.atrule.inside.rest=Prism.languages.scss; \ No newline at end of file +Prism.languages.scss=Prism.languages.extend("css",{comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0},atrule:{pattern:/@[\w-](?:\([^()]+\)|[^()\s]|\s+(?!\s))*?(?=\s+[{;])/,inside:{rule:/@[\w-]+/}},url:/(?:[-a-z]+-)?url(?=\()/i,selector:{pattern:/(?=\S)[^@;{}()]?(?:[^@;{}()\s]|\s+(?!\s)|#\{\$[-\w]+\})+(?=\s*\{(?:\}|\s|[^}][^:{}]*[:{][^}]))/,inside:{parent:{pattern:/&/,alias:"important"},placeholder:/%[-\w]+/,variable:/\$[-\w]+|#\{\$[-\w]+\}/}},property:{pattern:/(?:[-\w]|\$[-\w]|#\{\$[-\w]+\})+(?=\s*:)/,inside:{variable:/\$[-\w]+|#\{\$[-\w]+\}/}}}),Prism.languages.insertBefore("scss","atrule",{keyword:[/@(?:content|debug|each|else(?: if)?|extend|for|forward|function|if|import|include|mixin|return|use|warn|while)\b/i,{pattern:/( )(?:from|through)(?= )/,lookbehind:!0}]}),Prism.languages.insertBefore("scss","important",{variable:/\$[-\w]+|#\{\$[-\w]+\}/}),Prism.languages.insertBefore("scss","function",{"module-modifier":{pattern:/\b(?:as|hide|show|with)\b/i,alias:"keyword"},placeholder:{pattern:/%[-\w]+/,alias:"selector"},statement:{pattern:/\B!(?:default|optional)\b/i,alias:"keyword"},boolean:/\b(?:false|true)\b/,null:{pattern:/\bnull\b/,alias:"keyword"},operator:{pattern:/(\s)(?:[-+*\/%]|[=!]=|<=?|>=?|and|not|or)(?=\s)/,lookbehind:!0}}),Prism.languages.scss.atrule.inside.rest=Prism.languages.scss; \ No newline at end of file diff --git a/components/prism-smarty.js b/components/prism-smarty.js index 92f48d7f5e..ec79668c3b 100644 --- a/components/prism-smarty.js +++ b/components/prism-smarty.js @@ -8,7 +8,7 @@ Prism.languages.smarty = { 'comment': /\{\*[\s\S]*?\*\}/, 'delimiter': { - pattern: /^\{|\}$/i, + pattern: /^\{|\}$/, alias: 'punctuation' }, 'string': /(["'])(?:\\.|(?!\1)[^\\\r\n])*\1/, diff --git a/components/prism-smarty.min.js b/components/prism-smarty.min.js index 3edf84c006..ef0b328a62 100644 --- a/components/prism-smarty.min.js +++ b/components/prism-smarty.min.js @@ -1 +1 @@ -!function(n){n.languages.smarty={comment:/\{\*[\s\S]*?\*\}/,delimiter:{pattern:/^\{|\}$/i,alias:"punctuation"},string:/(["'])(?:\\.|(?!\1)[^\\\r\n])*\1/,number:/\b0x[\dA-Fa-f]+|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee][-+]?\d+)?/,variable:[/\$(?!\d)\w+/,/#(?!\d)\w+#/,{pattern:/(\.|->)(?!\d)\w+/,lookbehind:!0},{pattern:/(\[)(?!\d)\w+(?=\])/,lookbehind:!0}],function:[{pattern:/(\|\s*)@?(?!\d)\w+/,lookbehind:!0},/^\/?(?!\d)\w+/,/(?!\d)\w+(?=\()/],"attr-name":{pattern:/\w+\s*=\s*(?:(?!\d)\w+)?/,inside:{variable:{pattern:/(=\s*)(?!\d)\w+/,lookbehind:!0},operator:/=/}},punctuation:[/[\[\]().,:`]|->/],operator:[/[+\-*\/%]|==?=?|[!<>]=?|&&|\|\|?/,/\bis\s+(?:not\s+)?(?:div|even|odd)(?:\s+by)?\b/,/\b(?:and|eq|gt?e|gt|lt?e|lt|mod|neq?|not|or)\b/],keyword:/\b(?:false|no|off|on|true|yes)\b/},n.hooks.add("before-tokenize",function(e){var t=!1;n.languages["markup-templating"].buildPlaceholders(e,"smarty",/\{\*[\s\S]*?\*\}|\{[\s\S]+?\}/g,function(e){return"{/literal}"===e&&(t=!1),!t&&("{literal}"===e&&(t=!0),!0)})}),n.hooks.add("after-tokenize",function(e){n.languages["markup-templating"].tokenizePlaceholders(e,"smarty")})}(Prism); \ No newline at end of file +!function(n){n.languages.smarty={comment:/\{\*[\s\S]*?\*\}/,delimiter:{pattern:/^\{|\}$/,alias:"punctuation"},string:/(["'])(?:\\.|(?!\1)[^\\\r\n])*\1/,number:/\b0x[\dA-Fa-f]+|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee][-+]?\d+)?/,variable:[/\$(?!\d)\w+/,/#(?!\d)\w+#/,{pattern:/(\.|->)(?!\d)\w+/,lookbehind:!0},{pattern:/(\[)(?!\d)\w+(?=\])/,lookbehind:!0}],function:[{pattern:/(\|\s*)@?(?!\d)\w+/,lookbehind:!0},/^\/?(?!\d)\w+/,/(?!\d)\w+(?=\()/],"attr-name":{pattern:/\w+\s*=\s*(?:(?!\d)\w+)?/,inside:{variable:{pattern:/(=\s*)(?!\d)\w+/,lookbehind:!0},operator:/=/}},punctuation:[/[\[\]().,:`]|->/],operator:[/[+\-*\/%]|==?=?|[!<>]=?|&&|\|\|?/,/\bis\s+(?:not\s+)?(?:div|even|odd)(?:\s+by)?\b/,/\b(?:and|eq|gt?e|gt|lt?e|lt|mod|neq?|not|or)\b/],keyword:/\b(?:false|no|off|on|true|yes)\b/},n.hooks.add("before-tokenize",function(e){var t=!1;n.languages["markup-templating"].buildPlaceholders(e,"smarty",/\{\*[\s\S]*?\*\}|\{[\s\S]+?\}/g,function(e){return"{/literal}"===e&&(t=!1),!t&&("{literal}"===e&&(t=!0),!0)})}),n.hooks.add("after-tokenize",function(e){n.languages["markup-templating"].tokenizePlaceholders(e,"smarty")})}(Prism); \ No newline at end of file diff --git a/components/prism-vbnet.js b/components/prism-vbnet.js index eb893822cc..e0bc91c340 100644 --- a/components/prism-vbnet.js +++ b/components/prism-vbnet.js @@ -13,7 +13,7 @@ Prism.languages.vbnet = Prism.languages.extend('basic', { } ], 'string': { - pattern: /(^|[^"])"(?:""|[^"])*"(?!")/i, + pattern: /(^|[^"])"(?:""|[^"])*"(?!")/, lookbehind: true, greedy: true }, diff --git a/components/prism-vbnet.min.js b/components/prism-vbnet.min.js index beb26592f2..8a148a86fc 100644 --- a/components/prism-vbnet.min.js +++ b/components/prism-vbnet.min.js @@ -1 +1 @@ -Prism.languages.vbnet=Prism.languages.extend("basic",{comment:[{pattern:/(?:!|REM\b).+/i,inside:{keyword:/^REM/i}},{pattern:/(^|[^\\:])'.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(^|[^"])"(?:""|[^"])*"(?!")/i,lookbehind:!0,greedy:!0},keyword:/(?:\b(?:ADDHANDLER|ADDRESSOF|ALIAS|AND|ANDALSO|AS|BEEP|BLOAD|BOOLEAN|BSAVE|BYREF|BYTE|BYVAL|CALL(?: ABSOLUTE)?|CASE|CATCH|CBOOL|CBYTE|CCHAR|CDATE|CDBL|CDEC|CHAIN|CHAR|CHDIR|CINT|CLASS|CLEAR|CLNG|CLOSE|CLS|COBJ|COM|COMMON|CONST|CONTINUE|CSBYTE|CSHORT|CSNG|CSTR|CTYPE|CUINT|CULNG|CUSHORT|DATA|DATE|DECIMAL|DECLARE|DEF(?: FN| SEG|DBL|INT|LNG|SNG|STR)|DEFAULT|DELEGATE|DIM|DIRECTCAST|DO|DOUBLE|ELSE|ELSEIF|END|ENUM|ENVIRON|ERASE|ERROR|EVENT|EXIT|FALSE|FIELD|FILES|FINALLY|FOR(?: EACH)?|FRIEND|FUNCTION|GET|GETTYPE|GETXMLNAMESPACE|GLOBAL|GOSUB|GOTO|HANDLES|IF|IMPLEMENTS|IMPORTS|IN|INHERITS|INPUT|INTEGER|INTERFACE|IOCTL|IS|ISNOT|KEY|KILL|LET|LIB|LIKE|LINE INPUT|LOCATE|LOCK|LONG|LOOP|LSET|ME|MKDIR|MOD|MODULE|MUSTINHERIT|MUSTOVERRIDE|MYBASE|MYCLASS|NAME|NAMESPACE|NARROWING|NEW|NEXT|NOT|NOTHING|NOTINHERITABLE|NOTOVERRIDABLE|OBJECT|OF|OFF|ON(?: COM| ERROR| KEY| TIMER)?|OPEN|OPERATOR|OPTION(?: BASE)?|OPTIONAL|OR|ORELSE|OUT|OVERLOADS|OVERRIDABLE|OVERRIDES|PARAMARRAY|PARTIAL|POKE|PRIVATE|PROPERTY|PROTECTED|PUBLIC|PUT|RAISEEVENT|READ|READONLY|REDIM|REM|REMOVEHANDLER|RESTORE|RESUME|RETURN|RMDIR|RSET|RUN|SBYTE|SELECT(?: CASE)?|SET|SHADOWS|SHARED|SHELL|SHORT|SINGLE|SLEEP|STATIC|STEP|STOP|STRING|STRUCTURE|SUB|SWAP|SYNCLOCK|SYSTEM|THEN|THROW|TIMER|TO|TROFF|TRON|TRUE|TRY|TRYCAST|TYPE|TYPEOF|UINTEGER|ULONG|UNLOCK|UNTIL|USHORT|USING|VIEW PRINT|WAIT|WEND|WHEN|WHILE|WIDENING|WITH|WITHEVENTS|WRITE|WRITEONLY|XOR)|\B(?:#CONST|#ELSE|#ELSEIF|#END|#IF))(?:\$|\b)/i,punctuation:/[,;:(){}]/}); \ No newline at end of file +Prism.languages.vbnet=Prism.languages.extend("basic",{comment:[{pattern:/(?:!|REM\b).+/i,inside:{keyword:/^REM/i}},{pattern:/(^|[^\\:])'.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(^|[^"])"(?:""|[^"])*"(?!")/,lookbehind:!0,greedy:!0},keyword:/(?:\b(?:ADDHANDLER|ADDRESSOF|ALIAS|AND|ANDALSO|AS|BEEP|BLOAD|BOOLEAN|BSAVE|BYREF|BYTE|BYVAL|CALL(?: ABSOLUTE)?|CASE|CATCH|CBOOL|CBYTE|CCHAR|CDATE|CDBL|CDEC|CHAIN|CHAR|CHDIR|CINT|CLASS|CLEAR|CLNG|CLOSE|CLS|COBJ|COM|COMMON|CONST|CONTINUE|CSBYTE|CSHORT|CSNG|CSTR|CTYPE|CUINT|CULNG|CUSHORT|DATA|DATE|DECIMAL|DECLARE|DEF(?: FN| SEG|DBL|INT|LNG|SNG|STR)|DEFAULT|DELEGATE|DIM|DIRECTCAST|DO|DOUBLE|ELSE|ELSEIF|END|ENUM|ENVIRON|ERASE|ERROR|EVENT|EXIT|FALSE|FIELD|FILES|FINALLY|FOR(?: EACH)?|FRIEND|FUNCTION|GET|GETTYPE|GETXMLNAMESPACE|GLOBAL|GOSUB|GOTO|HANDLES|IF|IMPLEMENTS|IMPORTS|IN|INHERITS|INPUT|INTEGER|INTERFACE|IOCTL|IS|ISNOT|KEY|KILL|LET|LIB|LIKE|LINE INPUT|LOCATE|LOCK|LONG|LOOP|LSET|ME|MKDIR|MOD|MODULE|MUSTINHERIT|MUSTOVERRIDE|MYBASE|MYCLASS|NAME|NAMESPACE|NARROWING|NEW|NEXT|NOT|NOTHING|NOTINHERITABLE|NOTOVERRIDABLE|OBJECT|OF|OFF|ON(?: COM| ERROR| KEY| TIMER)?|OPEN|OPERATOR|OPTION(?: BASE)?|OPTIONAL|OR|ORELSE|OUT|OVERLOADS|OVERRIDABLE|OVERRIDES|PARAMARRAY|PARTIAL|POKE|PRIVATE|PROPERTY|PROTECTED|PUBLIC|PUT|RAISEEVENT|READ|READONLY|REDIM|REM|REMOVEHANDLER|RESTORE|RESUME|RETURN|RMDIR|RSET|RUN|SBYTE|SELECT(?: CASE)?|SET|SHADOWS|SHARED|SHELL|SHORT|SINGLE|SLEEP|STATIC|STEP|STOP|STRING|STRUCTURE|SUB|SWAP|SYNCLOCK|SYSTEM|THEN|THROW|TIMER|TO|TROFF|TRON|TRUE|TRY|TRYCAST|TYPE|TYPEOF|UINTEGER|ULONG|UNLOCK|UNTIL|USHORT|USING|VIEW PRINT|WAIT|WEND|WHEN|WHILE|WIDENING|WITH|WITHEVENTS|WRITE|WRITEONLY|XOR)|\B(?:#CONST|#ELSE|#ELSEIF|#END|#IF))(?:\$|\b)/i,punctuation:/[,;:(){}]/}); \ No newline at end of file diff --git a/components/prism-wasm.js b/components/prism-wasm.js index 99e4b8adb9..47dfc5eeaf 100644 --- a/components/prism-wasm.js +++ b/components/prism-wasm.js @@ -25,7 +25,7 @@ Prism.languages.wasm = { }, /\b(?:anyfunc|block|br(?:_if|_table)?|call(?:_indirect)?|data|drop|elem|else|end|export|func|get_(?:global|local)|global|if|import|local|loop|memory|module|mut|nop|offset|param|result|return|select|set_(?:global|local)|start|table|tee_local|then|type|unreachable)\b/ ], - 'variable': /\$[\w!#$%&'*+\-./:<=>?@\\^`|~]+/i, + 'variable': /\$[\w!#$%&'*+\-./:<=>?@\\^`|~]+/, 'number': /[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/, 'punctuation': /[()]/ }; diff --git a/components/prism-wasm.min.js b/components/prism-wasm.min.js index 7de0c670b0..c62a5f4702 100644 --- a/components/prism-wasm.min.js +++ b/components/prism-wasm.min.js @@ -1 +1 @@ -Prism.languages.wasm={comment:[/\(;[\s\S]*?;\)/,{pattern:/;;.*/,greedy:!0}],string:{pattern:/"(?:\\[\s\S]|[^"\\])*"/,greedy:!0},keyword:[{pattern:/\b(?:align|offset)=/,inside:{operator:/=/}},{pattern:/\b(?:(?:f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|neg?|nearest|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|sqrt|store(?:8|16|32)?|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))?|memory\.(?:grow|size))\b/,inside:{punctuation:/\./}},/\b(?:anyfunc|block|br(?:_if|_table)?|call(?:_indirect)?|data|drop|elem|else|end|export|func|get_(?:global|local)|global|if|import|local|loop|memory|module|mut|nop|offset|param|result|return|select|set_(?:global|local)|start|table|tee_local|then|type|unreachable)\b/],variable:/\$[\w!#$%&'*+\-./:<=>?@\\^`|~]+/i,number:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/,punctuation:/[()]/}; \ No newline at end of file +Prism.languages.wasm={comment:[/\(;[\s\S]*?;\)/,{pattern:/;;.*/,greedy:!0}],string:{pattern:/"(?:\\[\s\S]|[^"\\])*"/,greedy:!0},keyword:[{pattern:/\b(?:align|offset)=/,inside:{operator:/=/}},{pattern:/\b(?:(?:f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|neg?|nearest|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|sqrt|store(?:8|16|32)?|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))?|memory\.(?:grow|size))\b/,inside:{punctuation:/\./}},/\b(?:anyfunc|block|br(?:_if|_table)?|call(?:_indirect)?|data|drop|elem|else|end|export|func|get_(?:global|local)|global|if|import|local|loop|memory|module|mut|nop|offset|param|result|return|select|set_(?:global|local)|start|table|tee_local|then|type|unreachable)\b/],variable:/\$[\w!#$%&'*+\-./:<=>?@\\^`|~]+/,number:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/,punctuation:/[()]/}; \ No newline at end of file diff --git a/components/prism-xquery.js b/components/prism-xquery.js index 05bfc8e52e..b394d4325a 100644 --- a/components/prism-xquery.js +++ b/components/prism-xquery.js @@ -55,8 +55,8 @@ 'punctuation': /[[\](){},;:/]/ }); - Prism.languages.xquery.tag.pattern = /<\/?(?!\d)[^\s>\/=$<%]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\[\s\S]|\{(?!\{)(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])+\}|(?!\1)[^\\])*\1|[^\s'">=]+))?)*\s*\/?>/i; - Prism.languages.xquery['tag'].inside['attr-value'].pattern = /=(?:("|')(?:\\[\s\S]|\{(?!\{)(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])+\}|(?!\1)[^\\])*\1|[^\s'">=]+)/i; + Prism.languages.xquery.tag.pattern = /<\/?(?!\d)[^\s>\/=$<%]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\[\s\S]|\{(?!\{)(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])+\}|(?!\1)[^\\])*\1|[^\s'">=]+))?)*\s*\/?>/; + Prism.languages.xquery['tag'].inside['attr-value'].pattern = /=(?:("|')(?:\\[\s\S]|\{(?!\{)(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])+\}|(?!\1)[^\\])*\1|[^\s'">=]+)/; Prism.languages.xquery['tag'].inside['attr-value'].inside['punctuation'] = /^="|"$/; Prism.languages.xquery['tag'].inside['attr-value'].inside['expression'] = { // Allow for two levels of nesting diff --git a/components/prism-xquery.min.js b/components/prism-xquery.min.js index 23e133df1d..14db8f8de4 100644 --- a/components/prism-xquery.min.js +++ b/components/prism-xquery.min.js @@ -1 +1 @@ -!function(r){r.languages.xquery=r.languages.extend("markup",{"xquery-comment":{pattern:/\(:[\s\S]*?:\)/,greedy:!0,alias:"comment"},string:{pattern:/(["'])(?:\1\1|(?!\1)[\s\S])*\1/,greedy:!0},extension:{pattern:/\(#.+?#\)/,alias:"symbol"},variable:/\$[-\w:]+/,axis:{pattern:/(^|[^-])(?:ancestor(?:-or-self)?|attribute|child|descendant(?:-or-self)?|following(?:-sibling)?|parent|preceding(?:-sibling)?|self)(?=::)/,lookbehind:!0,alias:"operator"},"keyword-operator":{pattern:/(^|[^:-])\b(?:and|castable as|div|eq|except|ge|gt|idiv|instance of|intersect|is|le|lt|mod|ne|or|union)\b(?=$|[^:-])/,lookbehind:!0,alias:"operator"},keyword:{pattern:/(^|[^:-])\b(?:as|ascending|at|base-uri|boundary-space|case|cast as|collation|construction|copy-namespaces|declare|default|descending|else|empty (?:greatest|least)|encoding|every|external|for|function|if|import|in|inherit|lax|let|map|module|namespace|no-inherit|no-preserve|option|order(?: by|ed|ing)?|preserve|return|satisfies|schema|some|stable|strict|strip|then|to|treat as|typeswitch|unordered|validate|variable|version|where|xquery)\b(?=$|[^:-])/,lookbehind:!0},function:/[\w-]+(?::[\w-]+)*(?=\s*\()/,"xquery-element":{pattern:/(element\s+)[\w-]+(?::[\w-]+)*/,lookbehind:!0,alias:"tag"},"xquery-attribute":{pattern:/(attribute\s+)[\w-]+(?::[\w-]+)*/,lookbehind:!0,alias:"attr-name"},builtin:{pattern:/(^|[^:-])\b(?:attribute|comment|document|element|processing-instruction|text|xs:(?:ENTITIES|ENTITY|ID|IDREFS?|NCName|NMTOKENS?|NOTATION|Name|QName|anyAtomicType|anyType|anyURI|base64Binary|boolean|byte|date|dateTime|dayTimeDuration|decimal|double|duration|float|gDay|gMonth|gMonthDay|gYear|gYearMonth|hexBinary|int|integer|language|long|negativeInteger|nonNegativeInteger|nonPositiveInteger|normalizedString|positiveInteger|short|string|time|token|unsigned(?:Byte|Int|Long|Short)|untyped(?:Atomic)?|yearMonthDuration))\b(?=$|[^:-])/,lookbehind:!0},number:/\b\d+(?:\.\d+)?(?:E[+-]?\d+)?/,operator:[/[+*=?|@]|\.\.?|:=|!=|<[=<]?|>[=>]?/,{pattern:/(\s)-(?=\s)/,lookbehind:!0}],punctuation:/[[\](){},;:/]/}),r.languages.xquery.tag.pattern=/<\/?(?!\d)[^\s>\/=$<%]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\[\s\S]|\{(?!\{)(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])+\}|(?!\1)[^\\])*\1|[^\s'">=]+))?)*\s*\/?>/i,r.languages.xquery.tag.inside["attr-value"].pattern=/=(?:("|')(?:\\[\s\S]|\{(?!\{)(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])+\}|(?!\1)[^\\])*\1|[^\s'">=]+)/i,r.languages.xquery.tag.inside["attr-value"].inside.punctuation=/^="|"$/,r.languages.xquery.tag.inside["attr-value"].inside.expression={pattern:/\{(?!\{)(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])+\}/,inside:r.languages.xquery,alias:"language-xquery"};var s=function(e){return"string"==typeof e?e:"string"==typeof e.content?e.content:e.content.map(s).join("")},l=function(e){for(var t=[],n=0;n"===a.content[a.content.length-1].content||t.push({tagName:s(a.content[0].content[1]),openedBraces:0}):!(0[=>]?/,{pattern:/(\s)-(?=\s)/,lookbehind:!0}],punctuation:/[[\](){},;:/]/}),r.languages.xquery.tag.pattern=/<\/?(?!\d)[^\s>\/=$<%]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\[\s\S]|\{(?!\{)(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])+\}|(?!\1)[^\\])*\1|[^\s'">=]+))?)*\s*\/?>/,r.languages.xquery.tag.inside["attr-value"].pattern=/=(?:("|')(?:\\[\s\S]|\{(?!\{)(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])+\}|(?!\1)[^\\])*\1|[^\s'">=]+)/,r.languages.xquery.tag.inside["attr-value"].inside.punctuation=/^="|"$/,r.languages.xquery.tag.inside["attr-value"].inside.expression={pattern:/\{(?!\{)(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])+\}/,inside:r.languages.xquery,alias:"language-xquery"};var s=function(e){return"string"==typeof e?e:"string"==typeof e.content?e.content:e.content.map(s).join("")},l=function(e){for(var t=[],n=0;n"===a.content[a.content.length-1].content||t.push({tagName:s(a.content[0].content[1]),openedBraces:0}):!(0>\s*/g); + const path = category.split(/\s*>>\s*/); if (path[path.length - 1] !== '') { path.push(''); } diff --git a/plugins/diff-highlight/prism-diff-highlight.js b/plugins/diff-highlight/prism-diff-highlight.js index 7487f065f7..aa7bcf3f3f 100644 --- a/plugins/diff-highlight/prism-diff-highlight.js +++ b/plugins/diff-highlight/prism-diff-highlight.js @@ -6,7 +6,7 @@ var LANGUAGE_REGEX = /^diff-([\w-]+)/i; - var HTML_TAG = /<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/gi; + var HTML_TAG = /<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/g; //this will match a line plus the line break while ignoring the line breaks HTML tags may contain. var HTML_LINE = RegExp(/(?:__|[^\r\n<])*(?:\r\n?|\n|(?:__|[^\r\n<])(?![^\r\n]))/.source.replace(/__/g, function () { return HTML_TAG.source; }), 'gi'); diff --git a/plugins/diff-highlight/prism-diff-highlight.min.js b/plugins/diff-highlight/prism-diff-highlight.min.js index 8b3160be27..a6cf1c2fce 100644 --- a/plugins/diff-highlight/prism-diff-highlight.min.js +++ b/plugins/diff-highlight/prism-diff-highlight.min.js @@ -1 +1 @@ -!function(){if("undefined"!=typeof Prism){var m=/^diff-([\w-]+)/i,d=/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/gi,c=RegExp("(?:__|[^\r\n<])*(?:\r\n?|\n|(?:__|[^\r\n<])(?![^\r\n]))".replace(/__/g,function(){return d.source}),"gi"),a=!1;Prism.hooks.add("before-sanity-check",function(e){var i=e.language;m.test(i)&&!e.grammar&&(e.grammar=Prism.languages[i]=Prism.languages.diff)}),Prism.hooks.add("before-tokenize",function(e){a||Prism.languages.diff||Prism.plugins.autoloader||(a=!0,console.warn("Prism's Diff Highlight plugin requires the Diff language definition (prism-diff.js).Make sure the language definition is loaded or use Prism's Autoloader plugin."));var i=e.language;m.test(i)&&!Prism.languages[i]&&(Prism.languages[i]=Prism.languages.diff)}),Prism.hooks.add("wrap",function(e){var i,a;if("diff"!==e.language){var s=m.exec(e.language);if(!s)return;i=s[1],a=Prism.languages[i]}var r=Prism.languages.diff&&Prism.languages.diff.PREFIXES;if(r&&e.type in r){var n,g=e.content.replace(d,"").replace(/</g,"<").replace(/&/g,"&"),f=g.replace(/(^|[\r\n])./g,"$1");n=a?Prism.highlight(f,a,i):Prism.util.encode(f);var u,l=new Prism.Token("prefix",r[e.type],[/\w+/.exec(e.type)[0]]),t=Prism.Token.stringify(l,e.language),o=[];for(c.lastIndex=0;u=c.exec(n);)o.push(t+u[0]);/(?:^|[\r\n]).$/.test(g)&&o.push(t),e.content=o.join(""),a&&e.classes.push("language-"+i)}})}}(); \ No newline at end of file +!function(){if("undefined"!=typeof Prism){var m=/^diff-([\w-]+)/i,d=/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/g,c=RegExp("(?:__|[^\r\n<])*(?:\r\n?|\n|(?:__|[^\r\n<])(?![^\r\n]))".replace(/__/g,function(){return d.source}),"gi"),a=!1;Prism.hooks.add("before-sanity-check",function(e){var i=e.language;m.test(i)&&!e.grammar&&(e.grammar=Prism.languages[i]=Prism.languages.diff)}),Prism.hooks.add("before-tokenize",function(e){a||Prism.languages.diff||Prism.plugins.autoloader||(a=!0,console.warn("Prism's Diff Highlight plugin requires the Diff language definition (prism-diff.js).Make sure the language definition is loaded or use Prism's Autoloader plugin."));var i=e.language;m.test(i)&&!Prism.languages[i]&&(Prism.languages[i]=Prism.languages.diff)}),Prism.hooks.add("wrap",function(e){var i,a;if("diff"!==e.language){var s=m.exec(e.language);if(!s)return;i=s[1],a=Prism.languages[i]}var r=Prism.languages.diff&&Prism.languages.diff.PREFIXES;if(r&&e.type in r){var n,g=e.content.replace(d,"").replace(/</g,"<").replace(/&/g,"&"),f=g.replace(/(^|[\r\n])./g,"$1");n=a?Prism.highlight(f,a,i):Prism.util.encode(f);var u,l=new Prism.Token("prefix",r[e.type],[/\w+/.exec(e.type)[0]]),t=Prism.Token.stringify(l,e.language),o=[];for(c.lastIndex=0;u=c.exec(n);)o.push(t+u[0]);/(?:^|[\r\n]).$/.test(g)&&o.push(t),e.content=o.join(""),a&&e.classes.push("language-"+i)}})}}(); \ No newline at end of file diff --git a/tests/helper/token-stream-transformer.js b/tests/helper/token-stream-transformer.js index a704bf5d5c..8a92a548b7 100644 --- a/tests/helper/token-stream-transformer.js +++ b/tests/helper/token-stream-transformer.js @@ -306,7 +306,7 @@ function isBlank(str) { * @returns {number} */ function countLineBreaks(str) { - return str.split(/\r\n?|\n/g).length - 1; + return str.split(/\r\n?|\n/).length - 1; } /** diff --git a/tests/pattern-tests.js b/tests/pattern-tests.js index 5ebaaa64bb..cc0ae71b21 100644 --- a/tests/pattern-tests.js +++ b/tests/pattern-tests.js @@ -761,7 +761,7 @@ function highlight(highlights, offset = 0) { * @returns {string} */ function indent(str, amount = ' ') { - return str.split(/\r?\n/g).map(m => m === '' ? '' : amount + m).join('\n'); + return str.split(/\r?\n/).map(m => m === '' ? '' : amount + m).join('\n'); } /** From 5a24cbffd76d29c055808283aea6386031a1680d Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Thu, 14 Oct 2021 14:01:46 +0200 Subject: [PATCH 0968/1100] JS: Improved `number` pattern (#3149) --- components/prism-javascript.js | 29 +++++++- components/prism-javascript.min.js | 2 +- prism.js | 29 +++++++- .../languages/javascript/number_feature.test | 71 ++++++++++++++++++- 4 files changed, 127 insertions(+), 4 deletions(-) diff --git a/components/prism-javascript.js b/components/prism-javascript.js index 9471cbfc93..e4d93114e9 100644 --- a/components/prism-javascript.js +++ b/components/prism-javascript.js @@ -18,7 +18,34 @@ Prism.languages.javascript = Prism.languages.extend('clike', { ], // Allow for all non-ASCII characters (See http://stackoverflow.com/a/2008444) 'function': /#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/, - 'number': /\b(?:(?:0[xX](?:[\dA-Fa-f](?:_[\dA-Fa-f])?)+|0[bB](?:[01](?:_[01])?)+|0[oO](?:[0-7](?:_[0-7])?)+)n?|(?:\d(?:_\d)?)+n|NaN|Infinity)\b|(?:\b(?:\d(?:_\d)?)+\.?(?:\d(?:_\d)?)*|\B\.(?:\d(?:_\d)?)+)(?:[Ee][+-]?(?:\d(?:_\d)?)+)?/, + 'number': { + pattern: RegExp( + /(^|[^\w$])/.source + + '(?:' + + ( + // constant + /NaN|Infinity/.source + + '|' + + // binary integer + /0[bB][01]+(?:_[01]+)*n?/.source + + '|' + + // octal integer + /0[oO][0-7]+(?:_[0-7]+)*n?/.source + + '|' + + // hexadecimal integer + /0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source + + '|' + + // decimal bigint + /\d+(?:_\d+)*n/.source + + '|' + + // decimal number (integer or float) but no bigint + /(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source + ) + + ')' + + /(?![\w$])/.source + ), + lookbehind: true + }, 'operator': /--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/ }); diff --git a/components/prism-javascript.min.js b/components/prism-javascript.min.js index 75b4d33434..cfd9412ef9 100644 --- a/components/prism-javascript.min.js +++ b/components/prism-javascript.min.js @@ -1 +1 @@ -Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:/\b(?:(?:0[xX](?:[\dA-Fa-f](?:_[\dA-Fa-f])?)+|0[bB](?:[01](?:_[01])?)+|0[oO](?:[0-7](?:_[0-7])?)+)n?|(?:\d(?:_\d)?)+n|NaN|Infinity)\b|(?:\b(?:\d(?:_\d)?)+\.?(?:\d(?:_\d)?)*|\B\.(?:\d(?:_\d)?)+)(?:[Ee][+-]?(?:\d(?:_\d)?)+)?/,operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)\/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/,lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:Prism.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),Prism.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),Prism.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),Prism.languages.markup&&(Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.markup.tag.addAttribute("on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)","javascript")),Prism.languages.js=Prism.languages.javascript; \ No newline at end of file +Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp("(^|[^\\w$])(?:NaN|Infinity|0[bB][01]+(?:_[01]+)*n?|0[oO][0-7]+(?:_[0-7]+)*n?|0[xX][\\dA-Fa-f]+(?:_[\\dA-Fa-f]+)*n?|\\d+(?:_\\d+)*n|(?:\\d+(?:_\\d+)*(?:\\.(?:\\d+(?:_\\d+)*)?)?|\\.\\d+(?:_\\d+)*)(?:[Ee][+-]?\\d+(?:_\\d+)*)?)(?![\\w$])"),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)\/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/,lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:Prism.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),Prism.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),Prism.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),Prism.languages.markup&&(Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.markup.tag.addAttribute("on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)","javascript")),Prism.languages.js=Prism.languages.javascript; \ No newline at end of file diff --git a/prism.js b/prism.js index 41d8ef3af0..faa7c5891c 100644 --- a/prism.js +++ b/prism.js @@ -1567,7 +1567,34 @@ Prism.languages.javascript = Prism.languages.extend('clike', { ], // Allow for all non-ASCII characters (See http://stackoverflow.com/a/2008444) 'function': /#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/, - 'number': /\b(?:(?:0[xX](?:[\dA-Fa-f](?:_[\dA-Fa-f])?)+|0[bB](?:[01](?:_[01])?)+|0[oO](?:[0-7](?:_[0-7])?)+)n?|(?:\d(?:_\d)?)+n|NaN|Infinity)\b|(?:\b(?:\d(?:_\d)?)+\.?(?:\d(?:_\d)?)*|\B\.(?:\d(?:_\d)?)+)(?:[Ee][+-]?(?:\d(?:_\d)?)+)?/, + 'number': { + pattern: RegExp( + /(^|[^\w$])/.source + + '(?:' + + ( + // constant + /NaN|Infinity/.source + + '|' + + // binary integer + /0[bB][01]+(?:_[01]+)*n?/.source + + '|' + + // octal integer + /0[oO][0-7]+(?:_[0-7]+)*n?/.source + + '|' + + // hexadecimal integer + /0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source + + '|' + + // decimal bigint + /\d+(?:_\d+)*n/.source + + '|' + + // decimal number (integer or float) but no bigint + /(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source + ) + + ')' + + /(?![\w$])/.source + ), + lookbehind: true + }, 'operator': /--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/ }); diff --git a/tests/languages/javascript/number_feature.test b/tests/languages/javascript/number_feature.test index 817a7b0d68..d31c70ae02 100644 --- a/tests/languages/javascript/number_feature.test +++ b/tests/languages/javascript/number_feature.test @@ -23,6 +23,39 @@ Infinity 0.000_001 1e10_000 +0xf_f_f_f_ffn +0xf_f_f_f_f +0b1_1_1_1 +0b0_0_1_0_1_0_1n +0o1_1_3_2 +0o1_1_3_2n +2.2_4_54e64_33 +2.2_4_54e+64_33 +2.2_4_54e-64_33 +3_4_5 +3_4_5n +3_4_5.5_5_6 + +// not numbers +$1234; +$0xFF; +$0b0101; +$1234n; +$0xFFn; +$0b0101n; +_1234; +_0xFF; +_0b0101; +_1234n; +_0xFFn; +_0b0101n; +abc1234; +abc0xFF; +abc0b0101; +abc1234n; +abc0xFFn; +abc0b0101n; + ---------------------------------------------------- [ @@ -35,10 +68,13 @@ Infinity ["number", "0o571"], ["number", "0xbabe"], ["number", "0xBABE"], + ["number", "NaN"], ["number", "Infinity"], + ["number", "123n"], ["number", "0x123n"], + ["number", "1_000_000_000_000"], ["number", "1_000_000.220_720"], ["number", "0b0101_0110_0011_1000"], @@ -46,7 +82,40 @@ Infinity ["number", "0x40_76_38_6A_73"], ["number", "4_642_473_943_484_686_707n"], ["number", "0.000_001"], - ["number", "1e10_000"] + ["number", "1e10_000"], + + ["number", "0xf_f_f_f_ffn"], + ["number", "0xf_f_f_f_f"], + ["number", "0b1_1_1_1"], + ["number", "0b0_0_1_0_1_0_1n"], + ["number", "0o1_1_3_2"], + ["number", "0o1_1_3_2n"], + ["number", "2.2_4_54e64_33"], + ["number", "2.2_4_54e+64_33"], + ["number", "2.2_4_54e-64_33"], + ["number", "3_4_5"], + ["number", "3_4_5n"], + ["number", "3_4_5.5_5_6"], + + ["comment", "// not numbers"], + "\r\n$1234", ["punctuation", ";"], + "\r\n$0xFF", ["punctuation", ";"], + "\r\n$0b0101", ["punctuation", ";"], + "\r\n$1234n", ["punctuation", ";"], + "\r\n$0xFFn", ["punctuation", ";"], + "\r\n$0b0101n", ["punctuation", ";"], + "\r\n_1234", ["punctuation", ";"], + "\r\n_0xFF", ["punctuation", ";"], + "\r\n_0b0101", ["punctuation", ";"], + "\r\n_1234n", ["punctuation", ";"], + "\r\n_0xFFn", ["punctuation", ";"], + "\r\n_0b0101n", ["punctuation", ";"], + "\r\nabc1234", ["punctuation", ";"], + "\r\nabc0xFF", ["punctuation", ";"], + "\r\nabc0b0101", ["punctuation", ";"], + "\r\nabc1234n", ["punctuation", ";"], + "\r\nabc0xFFn", ["punctuation", ";"], + "\r\nabc0b0101n", ["punctuation", ";"] ] ---------------------------------------------------- From 50b16e4f559deb35e216239635b4f701c47c5ee6 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Thu, 14 Oct 2021 14:06:25 +0200 Subject: [PATCH 0969/1100] ESLint: Added `regexp/no-useless-range` rule (#3151) --- .eslintrc.js | 1 + components/prism-asmatmel.js | 4 ++-- components/prism-asmatmel.min.js | 2 +- components/prism-nim.js | 4 ++-- components/prism-nim.min.js | 2 +- components/prism-tremor.js | 2 +- components/prism-tremor.min.js | 2 +- 7 files changed, 9 insertions(+), 8 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 38bc220f0e..426001a33a 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -77,6 +77,7 @@ module.exports = { 'regexp/no-useless-character-class': 'warn', 'regexp/no-useless-flag': 'warn', 'regexp/no-useless-lazy': 'warn', + 'regexp/no-useless-range': 'warn', 'regexp/prefer-plus-quantifier': 'warn', 'regexp/prefer-question-quantifier': 'warn', 'regexp/prefer-star-quantifier': 'warn', diff --git a/components/prism-asmatmel.js b/components/prism-asmatmel.js index 6e83ea4ac5..b24883c666 100644 --- a/components/prism-asmatmel.js +++ b/components/prism-asmatmel.js @@ -8,14 +8,14 @@ Prism.languages.asmatmel = { greedy: true }, - 'constant': /\b(?:PORT[A-Z]|DDR[A-Z]|(?:DD|P)[A-Z](?:\d|[0-2]\d|3[0-1]))\b/, + 'constant': /\b(?:PORT[A-Z]|DDR[A-Z]|(?:DD|P)[A-Z](?:\d|[0-2]\d|3[01]))\b/, 'directive': { pattern: /\.\w+(?= )/, alias: 'property' }, 'r-register': { - pattern: /\br(?:\d|[1-2]\d|3[0-1])\b/, + pattern: /\br(?:\d|[12]\d|3[01])\b/, alias: 'variable' }, 'op-code': { diff --git a/components/prism-asmatmel.min.js b/components/prism-asmatmel.min.js index 99df2d796b..6e6f8c6912 100644 --- a/components/prism-asmatmel.min.js +++ b/components/prism-asmatmel.min.js @@ -1 +1 @@ -Prism.languages.asmatmel={comment:{pattern:/;.*/,greedy:!0},string:{pattern:/(["'`])(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0},constant:/\b(?:PORT[A-Z]|DDR[A-Z]|(?:DD|P)[A-Z](?:\d|[0-2]\d|3[0-1]))\b/,directive:{pattern:/\.\w+(?= )/,alias:"property"},"r-register":{pattern:/\br(?:\d|[1-2]\d|3[0-1])\b/,alias:"variable"},"op-code":{pattern:/\b(?:ADC|ADD|ADIW|AND|ANDI|ASR|BCLR|BLD|BRBC|BRBS|BRCC|BRCS|BREAK|BREQ|BRGE|BRHC|BRHS|BRID|BRIE|BRLO|BRLT|BRMI|BRNE|BRPL|BRSH|BRTC|BRTS|BRVC|BRVS|BSET|BST|CALL|CBI|CBR|CLC|CLH|CLI|CLN|CLR|CLS|CLT|CLV|CLZ|COM|CP|CPC|CPI|CPSE|DEC|DES|EICALL|EIJMP|ELPM|EOR|FMUL|FMULS|FMULSU|ICALL|IJMP|IN|INC|JMP|LAC|LAS|LAT|LD|LD[A-Za-z0-9]|LPM|LSL|LSR|MOV|MOVW|MUL|MULS|MULSU|NEG|NOP|OR|ORI|OUT|POP|PUSH|RCALL|RET|RETI|RJMP|ROL|ROR|SBC|SBCI|SBI|SBIC|SBIS|SBIW|SBR|SBRC|SBRS|SEC|SEH|SEI|SEN|SER|SES|SET|SEV|SEZ|SLEEP|SPM|ST|ST[A-Z0-9]|SUB|SUBI|SWAP|TST|WDR|XCH|adc|add|adiw|and|andi|asr|bclr|bld|brbc|brbs|brcc|brcs|break|breq|brge|brhc|brhs|brid|brie|brlo|brlt|brmi|brne|brpl|brsh|brtc|brts|brvc|brvs|bset|bst|call|cbi|cbr|clc|clh|cli|cln|clr|cls|clt|clv|clz|com|cp|cpc|cpi|cpse|dec|des|eicall|eijmp|elpm|eor|fmul|fmuls|fmulsu|icall|ijmp|in|inc|jmp|lac|las|lat|ld|ld[a-z0-9]|lpm|lsl|lsr|mov|movw|mul|muls|mulsu|neg|nop|or|ori|out|pop|push|rcall|ret|reti|rjmp|rol|ror|sbc|sbci|sbi|sbic|sbis|sbiw|sbr|sbrc|sbrs|sec|seh|sei|sen|ser|ses|set|sev|sez|sleep|spm|st|st[a-zA-Z0-9]|sub|subi|swap|tst|wdr|xch)\b/,alias:"keyword"},"hex-number":{pattern:/#?\$[\da-f]{2,4}\b/i,alias:"number"},"binary-number":{pattern:/#?%[01]+\b/,alias:"number"},"decimal-number":{pattern:/#?\b\d+\b/,alias:"number"},register:{pattern:/\b[acznvshtixy]\b/i,alias:"variable"},operator:/>>=?|<<=?|&&?|\|\|?|[-+*/%&|^!=<>?]=?/,punctuation:/[(),:]/}; \ No newline at end of file +Prism.languages.asmatmel={comment:{pattern:/;.*/,greedy:!0},string:{pattern:/(["'`])(?:\\.|(?!\1)[^\\\r\n])*\1/,greedy:!0},constant:/\b(?:PORT[A-Z]|DDR[A-Z]|(?:DD|P)[A-Z](?:\d|[0-2]\d|3[01]))\b/,directive:{pattern:/\.\w+(?= )/,alias:"property"},"r-register":{pattern:/\br(?:\d|[12]\d|3[01])\b/,alias:"variable"},"op-code":{pattern:/\b(?:ADC|ADD|ADIW|AND|ANDI|ASR|BCLR|BLD|BRBC|BRBS|BRCC|BRCS|BREAK|BREQ|BRGE|BRHC|BRHS|BRID|BRIE|BRLO|BRLT|BRMI|BRNE|BRPL|BRSH|BRTC|BRTS|BRVC|BRVS|BSET|BST|CALL|CBI|CBR|CLC|CLH|CLI|CLN|CLR|CLS|CLT|CLV|CLZ|COM|CP|CPC|CPI|CPSE|DEC|DES|EICALL|EIJMP|ELPM|EOR|FMUL|FMULS|FMULSU|ICALL|IJMP|IN|INC|JMP|LAC|LAS|LAT|LD|LD[A-Za-z0-9]|LPM|LSL|LSR|MOV|MOVW|MUL|MULS|MULSU|NEG|NOP|OR|ORI|OUT|POP|PUSH|RCALL|RET|RETI|RJMP|ROL|ROR|SBC|SBCI|SBI|SBIC|SBIS|SBIW|SBR|SBRC|SBRS|SEC|SEH|SEI|SEN|SER|SES|SET|SEV|SEZ|SLEEP|SPM|ST|ST[A-Z0-9]|SUB|SUBI|SWAP|TST|WDR|XCH|adc|add|adiw|and|andi|asr|bclr|bld|brbc|brbs|brcc|brcs|break|breq|brge|brhc|brhs|brid|brie|brlo|brlt|brmi|brne|brpl|brsh|brtc|brts|brvc|brvs|bset|bst|call|cbi|cbr|clc|clh|cli|cln|clr|cls|clt|clv|clz|com|cp|cpc|cpi|cpse|dec|des|eicall|eijmp|elpm|eor|fmul|fmuls|fmulsu|icall|ijmp|in|inc|jmp|lac|las|lat|ld|ld[a-z0-9]|lpm|lsl|lsr|mov|movw|mul|muls|mulsu|neg|nop|or|ori|out|pop|push|rcall|ret|reti|rjmp|rol|ror|sbc|sbci|sbi|sbic|sbis|sbiw|sbr|sbrc|sbrs|sec|seh|sei|sen|ser|ses|set|sev|sez|sleep|spm|st|st[a-zA-Z0-9]|sub|subi|swap|tst|wdr|xch)\b/,alias:"keyword"},"hex-number":{pattern:/#?\$[\da-f]{2,4}\b/i,alias:"number"},"binary-number":{pattern:/#?%[01]+\b/,alias:"number"},"decimal-number":{pattern:/#?\b\d+\b/,alias:"number"},register:{pattern:/\b[acznvshtixy]\b/i,alias:"variable"},operator:/>>=?|<<=?|&&?|\|\|?|[-+*/%&|^!=<>?]=?/,punctuation:/[(),:]/}; \ No newline at end of file diff --git a/components/prism-nim.js b/components/prism-nim.js index 8a240da0eb..4f18bc36fa 100644 --- a/components/prism-nim.js +++ b/components/prism-nim.js @@ -3,14 +3,14 @@ Prism.languages.nim = { // Double-quoted strings can be prefixed by an identifier (Generalized raw string literals) // Character literals are handled specifically to prevent issues with numeric type suffixes 'string': { - pattern: /(?:(?:\b(?!\d)(?:\w|\\x[8-9a-fA-F][0-9a-fA-F])+)?(?:"""[\s\S]*?"""(?!")|"(?:\\[\s\S]|""|[^"\\])*")|'(?:\\(?:\d+|x[\da-fA-F]{2}|.)|[^'])')/, + pattern: /(?:(?:\b(?!\d)(?:\w|\\x[89a-fA-F][0-9a-fA-F])+)?(?:"""[\s\S]*?"""(?!")|"(?:\\[\s\S]|""|[^"\\])*")|'(?:\\(?:\d+|x[\da-fA-F]{2}|.)|[^'])')/, greedy: true }, // The negative look ahead prevents wrong highlighting of the .. operator 'number': /\b(?:0[xXoObB][\da-fA-F_]+|\d[\d_]*(?:(?!\.\.)\.[\d_]*)?(?:[eE][+-]?\d[\d_]*)?)(?:'?[iuf]\d*)?/, 'keyword': /\b(?:addr|as|asm|atomic|bind|block|break|case|cast|concept|const|continue|converter|defer|discard|distinct|do|elif|else|end|enum|except|export|finally|for|from|func|generic|if|import|include|interface|iterator|let|macro|method|mixin|nil|object|out|proc|ptr|raise|ref|return|static|template|try|tuple|type|using|var|when|while|with|without|yield)\b/, 'function': { - pattern: /(?:(?!\d)(?:\w|\\x[8-9a-fA-F][0-9a-fA-F])+|`[^`\r\n]+`)\*?(?:\[[^\]]+\])?(?=\s*\()/, + pattern: /(?:(?!\d)(?:\w|\\x[89a-fA-F][0-9a-fA-F])+|`[^`\r\n]+`)\*?(?:\[[^\]]+\])?(?=\s*\()/, inside: { 'operator': /\*$/ } diff --git a/components/prism-nim.min.js b/components/prism-nim.min.js index 091339a45f..cb2b093094 100644 --- a/components/prism-nim.min.js +++ b/components/prism-nim.min.js @@ -1 +1 @@ -Prism.languages.nim={comment:/#.*/,string:{pattern:/(?:(?:\b(?!\d)(?:\w|\\x[8-9a-fA-F][0-9a-fA-F])+)?(?:"""[\s\S]*?"""(?!")|"(?:\\[\s\S]|""|[^"\\])*")|'(?:\\(?:\d+|x[\da-fA-F]{2}|.)|[^'])')/,greedy:!0},number:/\b(?:0[xXoObB][\da-fA-F_]+|\d[\d_]*(?:(?!\.\.)\.[\d_]*)?(?:[eE][+-]?\d[\d_]*)?)(?:'?[iuf]\d*)?/,keyword:/\b(?:addr|as|asm|atomic|bind|block|break|case|cast|concept|const|continue|converter|defer|discard|distinct|do|elif|else|end|enum|except|export|finally|for|from|func|generic|if|import|include|interface|iterator|let|macro|method|mixin|nil|object|out|proc|ptr|raise|ref|return|static|template|try|tuple|type|using|var|when|while|with|without|yield)\b/,function:{pattern:/(?:(?!\d)(?:\w|\\x[8-9a-fA-F][0-9a-fA-F])+|`[^`\r\n]+`)\*?(?:\[[^\]]+\])?(?=\s*\()/,inside:{operator:/\*$/}},identifier:{pattern:/`[^`\r\n]+`/,greedy:!0,inside:{punctuation:/`/}},operator:{pattern:/(^|[({\[](?=\.\.)|(?![({\[]\.).)(?:(?:[=+\-*\/<>@$~&%|!?^:\\]|\.\.|\.(?![)}\]]))+|\b(?:and|div|in|is|isnot|mod|not|notin|of|or|shl|shr|xor)\b)/m,lookbehind:!0},punctuation:/[({\[]\.|\.[)}\]]|[`(){}\[\],:]/}; \ No newline at end of file +Prism.languages.nim={comment:/#.*/,string:{pattern:/(?:(?:\b(?!\d)(?:\w|\\x[89a-fA-F][0-9a-fA-F])+)?(?:"""[\s\S]*?"""(?!")|"(?:\\[\s\S]|""|[^"\\])*")|'(?:\\(?:\d+|x[\da-fA-F]{2}|.)|[^'])')/,greedy:!0},number:/\b(?:0[xXoObB][\da-fA-F_]+|\d[\d_]*(?:(?!\.\.)\.[\d_]*)?(?:[eE][+-]?\d[\d_]*)?)(?:'?[iuf]\d*)?/,keyword:/\b(?:addr|as|asm|atomic|bind|block|break|case|cast|concept|const|continue|converter|defer|discard|distinct|do|elif|else|end|enum|except|export|finally|for|from|func|generic|if|import|include|interface|iterator|let|macro|method|mixin|nil|object|out|proc|ptr|raise|ref|return|static|template|try|tuple|type|using|var|when|while|with|without|yield)\b/,function:{pattern:/(?:(?!\d)(?:\w|\\x[89a-fA-F][0-9a-fA-F])+|`[^`\r\n]+`)\*?(?:\[[^\]]+\])?(?=\s*\()/,inside:{operator:/\*$/}},identifier:{pattern:/`[^`\r\n]+`/,greedy:!0,inside:{punctuation:/`/}},operator:{pattern:/(^|[({\[](?=\.\.)|(?![({\[]\.).)(?:(?:[=+\-*\/<>@$~&%|!?^:\\]|\.\.|\.(?![)}\]]))+|\b(?:and|div|in|is|isnot|mod|not|notin|of|or|shl|shr|xor)\b)/m,lookbehind:!0},punctuation:/[({\[]\.|\.[)}\]]|[`(){}\[\],:]/}; \ No newline at end of file diff --git a/components/prism-tremor.js b/components/prism-tremor.js index 8e8e43ed24..5d9e7bb879 100644 --- a/components/prism-tremor.js +++ b/components/prism-tremor.js @@ -24,7 +24,7 @@ 'keyword': /\b(?:args|as|by|case|config|connect|connector|const|copy|create|default|define|deploy|drop|each|emit|end|erase|event|flow|fn|for|from|group|having|insert|into|intrinsic|let|links|match|merge|mod|move|of|operator|patch|pipeline|recur|script|select|set|sliding|state|stream|to|tumbling|update|use|when|where|window|with)\b/, 'boolean': /\b(?:false|null|true)\b/i, - 'number': /\b(?:0b[0-1_]*|0x[0-9a-fA-F_]*|\d[\d_]*(?:\.\d[\d_]*)?(?:[Ee][+-]?[\d_]+)?)\b/, + 'number': /\b(?:0b[01_]*|0x[0-9a-fA-F_]*|\d[\d_]*(?:\.\d[\d_]*)?(?:[Ee][+-]?[\d_]+)?)\b/, 'pattern-punctuation': { pattern: /%(?=[({[])/, diff --git a/components/prism-tremor.min.js b/components/prism-tremor.min.js index 096a82d086..9d4886505f 100644 --- a/components/prism-tremor.min.js +++ b/components/prism-tremor.min.js @@ -1 +1 @@ -!function(e){e.languages.tremor={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},"interpolated-string":null,extractor:{pattern:/\b[a-z_]\w*\|(?:[^\r\n\\|]|\\(?:\r\n|[\s\S]))*\|/i,greedy:!0,inside:{function:/^\w+/,regex:/\|[\s\S]+/}},identifier:{pattern:/`[^`]*`/,greedy:!0},function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())\b/,keyword:/\b(?:args|as|by|case|config|connect|connector|const|copy|create|default|define|deploy|drop|each|emit|end|erase|event|flow|fn|for|from|group|having|insert|into|intrinsic|let|links|match|merge|mod|move|of|operator|patch|pipeline|recur|script|select|set|sliding|state|stream|to|tumbling|update|use|when|where|window|with)\b/,boolean:/\b(?:false|null|true)\b/i,number:/\b(?:0b[0-1_]*|0x[0-9a-fA-F_]*|\d[\d_]*(?:\.\d[\d_]*)?(?:[Ee][+-]?[\d_]+)?)\b/,"pattern-punctuation":{pattern:/%(?=[({[])/,alias:"punctuation"},operator:/[-+*\/%~!^]=?|=[=>]?|&[&=]?|\|[|=]?|<>?>?=?|(?:absent|and|not|or|present|xor)\b/,punctuation:/::|[;\[\]()\{\},.:]/};var n='#\\{(?:[^"{}]|\\{[^{}]*\\}|"(?:[^"\\\\\r\n]|\\\\(?:\r\n|[^]))*")*\\}';e.languages.tremor["interpolated-string"]={pattern:RegExp('(^|[^\\\\])(?:"""(?:[^"\\\\#]|\\\\[^]|"(?!"")|#(?!\\{)|'+n+')*"""|"(?:[^"\\\\\r\n#]|\\\\(?:\r\n|[^])|#(?!\\{)|'+n+')*")'),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:RegExp(n),inside:{punctuation:/^#\{|\}$/,expression:{pattern:/[\s\S]+/,inside:e.languages.tremor}}},string:/[\s\S]+/}},e.languages.troy=e.languages.tremor,e.languages.trickle=e.languages.tremor}(Prism); \ No newline at end of file +!function(e){e.languages.tremor={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},"interpolated-string":null,extractor:{pattern:/\b[a-z_]\w*\|(?:[^\r\n\\|]|\\(?:\r\n|[\s\S]))*\|/i,greedy:!0,inside:{function:/^\w+/,regex:/\|[\s\S]+/}},identifier:{pattern:/`[^`]*`/,greedy:!0},function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())\b/,keyword:/\b(?:args|as|by|case|config|connect|connector|const|copy|create|default|define|deploy|drop|each|emit|end|erase|event|flow|fn|for|from|group|having|insert|into|intrinsic|let|links|match|merge|mod|move|of|operator|patch|pipeline|recur|script|select|set|sliding|state|stream|to|tumbling|update|use|when|where|window|with)\b/,boolean:/\b(?:false|null|true)\b/i,number:/\b(?:0b[01_]*|0x[0-9a-fA-F_]*|\d[\d_]*(?:\.\d[\d_]*)?(?:[Ee][+-]?[\d_]+)?)\b/,"pattern-punctuation":{pattern:/%(?=[({[])/,alias:"punctuation"},operator:/[-+*\/%~!^]=?|=[=>]?|&[&=]?|\|[|=]?|<>?>?=?|(?:absent|and|not|or|present|xor)\b/,punctuation:/::|[;\[\]()\{\},.:]/};var n='#\\{(?:[^"{}]|\\{[^{}]*\\}|"(?:[^"\\\\\r\n]|\\\\(?:\r\n|[^]))*")*\\}';e.languages.tremor["interpolated-string"]={pattern:RegExp('(^|[^\\\\])(?:"""(?:[^"\\\\#]|\\\\[^]|"(?!"")|#(?!\\{)|'+n+')*"""|"(?:[^"\\\\\r\n#]|\\\\(?:\r\n|[^])|#(?!\\{)|'+n+')*")'),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:RegExp(n),inside:{punctuation:/^#\{|\}$/,expression:{pattern:/[\s\S]+/,inside:e.languages.tremor}}},string:/[\s\S]+/}},e.languages.troy=e.languages.tremor,e.languages.trickle=e.languages.tremor}(Prism); \ No newline at end of file From faedfe85152b12eaae7117cfd944eab7fbeccef9 Mon Sep 17 00:00:00 2001 From: Michael Schmidt Date: Tue, 19 Oct 2021 14:23:23 +0200 Subject: [PATCH 0970/1100] Website: Updated plugin header template (#3144) --- assets/templates/header-main.html | 2 +- assets/templates/header-plugins.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/templates/header-main.html b/assets/templates/header-main.html index d346d61176..be01eeb48f 100644 --- a/assets/templates/header-main.html +++ b/assets/templates/header-main.html @@ -4,7 +4,7 @@

            Prism

            Prism is a lightweight, extensible syntax highlighter, built with modern web standards in mind. - It’s used in millions of websites, including some of those you visit daily. + It’s used in millions of websites, including some of those you visit daily.